Add support for Loongson MMI instructions.
[gcc.git] / gcc / ChangeLog
1 2018-11-07 Chenghua Xu <paul.hua.gm@gmail.com>
2
3 * config.gcc (extra_headers): Add loongson-mmiintrin.h.
4 * config/mips/loongson.md: Move to ...
5 * config/mips/loongson-mmi.md: here; Adjustment.
6 * config/mips/loongson.h: Move to ...
7 State as deprecated. Include loongson-mmiintrin.h for back
8 compatibility and warning.
9 * config/mips/loongson-mmiintrin.h: ... here.
10 * config/mips/mips.c (mips_hard_regno_mode_ok_uncached,
11 mips_vector_mode_supported_p, AVAIL_NON_MIPS16): Use
12 TARGET_LOONGSON_MMI instead of TARGET_LOONGSON_VECTORS.
13 (mips_option_override): Make sure MMI use hard float;
14 (mips_shift_truncation_mask, mips_expand_vpc_loongson_even_odd,
15 mips_expand_vpc_loongson_pshufh, mips_expand_vpc_loongson_bcast,
16 mips_expand_vector_init): Use TARGET_LOONGSON_MMI instead of
17 TARGET_LOONGSON_VECTORS.
18 * gcc/config/mips/mips.h (TARGET_LOONGSON_VECTORS): Delete.
19 (TARGET_CPU_CPP_BUILTINS): Add __mips_loongson_mmi.
20 (MIPS_ASE_DSP_SPEC, MIPS_ASE_LOONGSON_MMI_SPEC): New.
21 (BASE_DRIVER_SELF_SPECS): march=loongson2e/2f/3a implies
22 -mloongson-mmi.
23 (SHIFT_COUNT_TRUNCATED): Use TARGET_LOONGSON_MMI instead of
24 TARGET_LOONGSON_VECTORS.
25 * gcc/config/mips/mips.md (MOVE64, MOVE128): Use
26 TARGET_LOONGSON_MMI instead of TARGET_LOONGSON_VECTORS.
27 (Loongson MMI patterns): Include loongson-mmi.md instead of
28 loongson.md.
29 * gcc/config/mips/mips.opt (-mloongson-mmi): New option.
30 * gcc/doc/invoke.texi (-mloongson-mmi): Document.
31
32 2018-11-07 Richard Biener <rguenther@suse.de>
33
34 PR lto/87906
35 * tree-streamer-in.c (lto_input_ts_block_tree_pointers): Fixup
36 BLOCK_ABSTRACT_ORIGIN to be the ultimate origin.
37
38 2018-11-07 Alexandre Oliva <aoliva@redhat.com>
39
40 PR rtl-optimization/87874
41 * lra.c (lra_substitute_pseudo): Do not create a subreg for
42 const wide ints.
43
44 2018-11-06 Aaron Sawdey <acsawdey@linux.ibm.com>
45
46 * config/rs6000/rs6000.md (bswap<mode>2): Force address into register
47 if not in indexed or indirect form.
48 (bswap<mode>2_load): Change predicate to indexed_or_indirect_operand.
49 (bswap<mode>2_store): Ditto.
50
51 2018-11-06 Richard Earnshaw <rearnsha@arm.com>
52
53 * config/aarch64/aarch64.md (speculation_tracker): Set the mode for
54 the UNSPEC.
55
56 2018-11-06 Richard Biener <rguenther@suse.de>
57
58 PR tree-optimization/86850
59 * vec.h (vec<T, va_heap, vl_ptr>::splice): Check src.length ()
60 instead of src.m_vec.
61
62 2018-11-06 Jan Hubicka <jh@suse.cz>
63
64 * tree.c (fld_simplified_type_name): Break out form ...
65 (free_lang_data_in_type): ... here.
66 (fld_type_variant_equal_p): Use it.
67
68 2018-11-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
69
70 * config/default-d.c: Include memmodel.h.
71
72 * config/sol2-d.c: New file.
73 * config/t-sol2 (sol2-d.o): New rule.
74 * config.gcc <*-*-solaris2*>: Set d_target_objs,
75 target_has_targetdm.
76
77 2018-11-06 Jan Hubicka <jh@suse.cz>
78
79 * tree.c (fld_type_variant): Also copy alignment; be sure that
80 new variant is equal.
81
82 2018-11-06 Ilya Leoshkevich <iii@linux.ibm.com>
83
84 PR target/87762
85 * config/s390/s390.md: Add relative_long attribute.
86
87 2018-11-06 Jan Hubicka <jh@suse.cz>
88
89 * ipa-pure-const.c (check_decl): Do not test TYPE_NEEDS_CONSTRUCTING.
90 * lto-streamer-out.c (hash_tree): Do not hash TYPE_NEEDS_CONSTRUCTING.
91 * tree-streamer-in.c (unpack_ts_type_common_value_fields): Do not
92 stream TYPE_NEEDS_CONSTRUCTING.
93 * tree-streamer-out.c (pack_ts_type_common_value_fields): Likewise.
94 * tree.c (free_lang_data_in_type): Clear TYPE_NEEDS_CONSTRUCTING.
95
96 2018-11-06 Richard Biener <rguenther@suse.de>
97
98 * tree-vect-slp.c (vect_slp_bb): Move opening of vect_slp_analyze_bb
99 dump-scope ...
100 (vect_slp_analyze_bb_1): ... here to avoid hiding optimized locations.
101
102 2018-11-06 Jozef Lawrynowicz <jozef.l@mittosystems.com>
103
104 * gcc/config/msp430/msp430.h (REG_CLASS_CONTENTS): Add R0 to
105 REG_CLASS_CONTENTS[GEN_REGS].
106 (REGNO_REG_CLASS): Return NO_REGS for R2 and R3.
107
108 2018-11-06 Jan Hubicka <jh@suse.cz>
109
110 * tree.c (fld_simplified_type_of): Clear TYPELESS_STORAGE flag.
111
112 2018-11-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
113
114 PR sanitizer/80953
115 * config/sol2.h (ASAN_CC1_SPEC): Define.
116 (LD_WHOLE_ARCHIVE_OPTION): Define.
117 (LD_NO_WHOLE_ARCHIVE_OPTION): Define.
118 (ASAN_REJECT_SPEC): Provide default.
119 (LIBASAN_EARLY_SPEC): Define.
120 (LIBTSAN_EARLY_SPEC): Define.
121 (LIBLSAN_EARLY_SPEC): Define.
122 * config/i386/sol2.h (CC1_SPEC): Redefine.
123 (ASAN_REJECT_SPEC): Define.
124
125 * config/sparc/sparc.c (sparc_asan_shadow_offset): Declare.
126 (TARGET_ASAN_SHADOW_OFFSET): Define.
127 (sparc_asan_shadow_offset): New function.
128 * config/sparc/sol2.h (CC1_SPEC): Append ASAN_CC1_SPEC.
129 (ASAN_REJECT_SPEC): Define.
130
131 2018-11-06 Jan Hubicka <jh@suse.cz>
132
133 * tree.c (fld_type_variant): Copy canonical type.
134 (fld_incomplete_type_of): Check that canonical types looks sane;
135 copy canonical type.
136 (verify_type): Accept when incomplete type has complete canonical type.
137
138 2018-11-06 Jan Hubicka <jh@suse.cz>
139
140 * tree.c (free_lang_data): Reset overwite_assembler_name,
141 print_xnode, print_decl, print_type and print_identifier of
142 langhooks.
143
144 2018-11-06 Richard Biener <rguenther@suse.de>
145
146 PR tree-optimization/87889
147 * tree-vect-loop-manip.c (slpeel_duplicate_current_defs_from_edges):
148 Do nothing if old and new arg are the same
149
150 2018-11-06 Andreas Krebbel <krebbel@linux.ibm.com>
151
152 PR target/87723
153 * config/s390/s390.md ("*r<noxa>sbg_di_rotl"): Remove mode
154 attributes for operands 3 and 4.
155
156 2018-11-06 Richard Biener <rguenther@suse.de>
157
158 PR middle-end/18041
159 * simplify-rtx.c (simplify_binary_operation_1): Add pattern
160 matching bitfield insertion.
161
162 2018-11-06 Alexandre Oliva <aoliva@redhat.com>
163
164 * auto-inc-dec.c: Include valtrack.h. Improve comments.
165 (reg_next_debug_use): New.
166 (attempt_change): Propagate adjusted expression into affected
167 debug insns.
168 (merge_in_block): Track uses in debug insns.
169 (pass_inc_dec::execute): Allocate and release
170 reg_next_debug_use.
171
172 2018-11-06 Wei Xiao <wei3.xiao@intel.com>
173
174 * config/i386/avx512fintrin.h: Update VFIXUPIMM* intrinsics.
175 (_mm512_fixupimm_round_pd): Update parameters and builtin.
176 (_mm512_maskz_fixupimm_round_pd): Ditto.
177 (_mm512_fixupimm_round_ps): Ditto.
178 (_mm512_maskz_fixupimm_round_ps): Ditto.
179 (_mm_fixupimm_round_sd): Ditto.
180 (_mm_maskz_fixupimm_round_sd): Ditto.
181 (_mm_fixupimm_round_ss): Ditto.
182 (_mm_maskz_fixupimm_round_ss): Ditto.
183 (_mm512_fixupimm_pd): Ditto.
184 (_mm512_maskz_fixupimm_pd): Ditto.
185 (_mm512_fixupimm_ps): Ditto.
186 (_mm512_maskz_fixupimm_ps): Ditto.
187 (_mm_fixupimm_sd): Ditto.
188 (_mm_maskz_fixupimm_sd): Ditto.
189 (_mm_fixupimm_ss): Ditto.
190 (_mm_maskz_fixupimm_ss): Ditto.
191 (_mm512_mask_fixupimm_round_pd): Update builtin.
192 (_mm512_mask_fixupimm_round_ps): Ditto.
193 (_mm_mask_fixupimm_round_sd): Ditto.
194 (_mm_mask_fixupimm_round_ss): Ditto.
195 (_mm512_mask_fixupimm_pd): Ditto.
196 (_mm512_mask_fixupimm_ps): Ditto.
197 (_mm_mask_fixupimm_sd): Ditto.
198 (_mm_mask_fixupimm_ss): Ditto.
199 * config/i386/avx512vlintrin.h:
200 (_mm256_fixupimm_pd): Update parameters and builtin.
201 (_mm256_maskz_fixupimm_pd): Ditto.
202 (_mm256_fixupimm_ps): Ditto.
203 (_mm256_maskz_fixupimm_ps): Ditto.
204 (_mm_fixupimm_pd): Ditto.
205 (_mm_maskz_fixupimm_pd): Ditto.
206 (_mm_fixupimm_ps): Ditto.
207 (_mm_maskz_fixupimm_ps): Ditto.
208 (_mm256_mask_fixupimm_pd): Update builtin.
209 (_mm256_mask_fixupimm_ps): Ditto.
210 (_mm_mask_fixupimm_pd): Ditto.
211 (_mm_mask_fixupimm_ps): Ditto.
212 * config/i386/i386-builtin-types.def: Add new types and remove useless ones.
213 * config/i386/i386-builtin.def: Update builtin definitions.
214 * config/i386/i386.c: Handle new builtin types and remove useless ones.
215 * config/i386/sse.md: Update VFIXUPIMM* patterns.
216 (<avx512>_fixupimm<mode>_maskz<round_saeonly_expand_name>): Update.
217 (<avx512>_fixupimm<mode><sd_maskz_name><round_saeonly_name>): Update.
218 (<avx512>_fixupimm<mode>_mask<round_saeonly_name>): Update.
219 (avx512f_sfixupimm<mode>_maskz<round_saeonly_expand_name>): Update.
220 (avx512f_sfixupimm<mode><sd_maskz_name><round_saeonly_name>): Update.
221 (avx512f_sfixupimm<mode>_mask<round_saeonly_name>): Update.
222 * config/i386/subst.md:
223 (round_saeonly_sd_mask_operand4): Add new subst_attr.
224 (round_saeonly_sd_mask_op4): Ditto.
225 (round_saeonly_expand_operand5): Ditto.
226 (round_saeonly_expand): Update.
227
228 2018-11-05 Max Filippov <jcmvbkbc@gmail.com>
229
230 * config/xtensa/uclinux.h (XTENSA_ALWAYS_PIC): Change to 0.
231
232 2018-11-05 Segher Boessenkool <segher@kernel.crashing.org>
233
234 PR rtl-optimization/87871
235 * combine.c (make_more_copies): Skip if dest is frame_pointer_rtx.
236
237 2018-11-05 Paul Koning <ni1d@arrl.net>
238
239 * doc/sourcebuild.texi (target attributes): Document new "inf"
240 effective target keyword.
241
242 2018-11-05 Robin Dapp <rdapp@linux.ibm.com>
243
244 * config/s390/s390.c (s390_register_move_cost): Increase costs for
245 moves involving the CC reg.
246
247 2018-11-05 Richard Biener <rguenther@suse.de>
248
249 PR tree-optimization/87873
250 * tree-ssa-loop-manip.h (split_loop_exit_edge): Add copy_constants_p
251 argument.
252 * tree-ssa-loop-manip.c (split_loop_exit_edge): Likewise.
253 * tree-vect-loop.c (vect_transform_loop): When splitting the
254 loop exit also create forwarder PHIs for constants.
255 * tree-vect-loop-manip.c (slpeel_duplicate_current_defs_from_edges):
256 Handle constant to_arg, add extra checking we match up the correct
257 PHIs.
258
259 2018-11-05 Robin Dapp <rdapp@linux.ibm.com>
260
261 * config/s390/s390.md: QImode and HImode for load on condition.
262
263 2018-11-05 Robin Dapp <rdapp@linux.ibm.com>
264
265 * config/s390/predicates.md: Fix typo.
266 * config/s390/s390.md: Allow immediates for load on condition.
267
268 2018-11-05 Martin Liska <mliska@suse.cz>
269
270 * alloc-pool.h (struct pool_usage): Use SIZE_AMOUNT.
271 * bitmap.h (struct bitmap_usage): Likewise.
272 * ggc-common.c (SCALE): Remove.
273 (LABEL): Likewise.
274 (struct ggc_usage): Use SIZE_AMOUNT. And update
275 compare method.
276 * ggc-page.c (SCALE): Remove.
277 (STAT_LABEL): Remove.
278 (ggc_print_statistics): Use SIZE_AMOUNT.
279 * gimple.h (SCALE): Remove.
280 (LABEL): Likewise.
281 * input.c (ONE_K): Remove.
282 (ONE_M): Likewise.
283 (SCALE): Likewise.
284 (STAT_LABEL): Likewise.
285 (FORMAT_AMOUNT): Likewise.
286 (dump_line_table_statistics): Use SIZE_AMOUNT.
287 * mem-stats.h (struct mem_usage): Likewise.
288 * rtl.c (dump_rtx_statistics): Likewise.
289 (rtx_alloc_counts): Change type to size_t.
290 (rtx_alloc_sizes): Likewise.
291 (rtx_count_cmp): New.
292 (dump_rtx_statistics): Sort first based on counts.
293 * tree.c (tree_nodes_cmp): New.
294 (tree_codes_cmp): New.
295 (dump_tree_statistics): Sort first based on counts.
296 * system.h (ONE_K): New.
297 (ONE_M): Likewise.
298 (SIZE_SCALE): Likewise.
299 (SIZE_LABEL): Likewise.
300 (SIZE_AMOUNT): Likewise.
301 * tree-cfg.c (dump_cfg_stats): Use SIZE_AMOUNT.
302 * tree-dfa.c (dump_dfa_stats): Likewise.
303 * tree-phinodes.c (phinodes_print_statistics): Likewise.
304 * tree-ssanames.c (ssanames_print_statistics): Likewise.
305 * tree.c (dump_tree_statistics): Likewise.
306 * vec.c (struct vec_usage): Likewise.
307 * trans-mem.c (tm_mangle): Enlarge buffer in order to not
308 trigger a -Werror=format-overflow with
309 --enable-gather-detailed-stats.
310
311 2018-11-05 Martin Liska <mliska@suse.cz>
312
313 * mem-stats.h (mem_alloc_description::release_instance_overhead):
314 Return T *.
315 * vec.c (struct vec_usage): Register m_element_size.
316 (vec_prefix::register_overhead): New arguments: elements and
317 element_size.
318 (vec_prefix::release_overhead): Subtract elements.
319 * vec.h (struct vec_prefix): Change signature.
320 (va_heap::reserve): Pass proper arguments.
321 (va_heap::release): Likewise.
322
323 2018-11-05 Martin Liska <mliska@suse.cz>
324
325 * mem-stats.h (mem_alloc_description::get_list): Fix GNU coding
326 style.
327 * vec.c: Likewise.
328
329 2018-11-05 Richard Biener <rguenther@suse.de>
330
331 * tree-scalar-evolution.h (final_value_replacement_loop): Update
332 prototype.
333 * tree-scalar-evolution.c (final_value_replacement_loop): Return
334 whether anything was done.
335 (scev_const_prop): Remove constant propagation part, fold
336 remains into ...
337 * tree-ssa-loop.c (pass_scev_cprop::execute): ... here.
338 (pass_data_scev_cprop): TODO_cleanup_cfg is now done
339 conditionally.
340
341 2018-11-05 Jakub Jelinek <jakub@redhat.com>
342
343 PR tree-optimization/87859
344 * gimple-ssa-store-merging.c (struct merged_store_group): Add
345 only_constants and first_nonmergeable_order members.
346 (merged_store_group::merged_store_group): Initialize them.
347 (merged_store_group::do_merge): Clear only_constants member if
348 adding something other than INTEGER_CST store.
349 (imm_store_chain_info::coalesce_immediate_stores): Don't merge
350 stores with order >= first_nonmergeable_order. Use
351 merged_store->only_constants instead of always recomputing it.
352 Set merged_store->first_nonmergeable_order if we've skipped any
353 stores. Attempt to merge overlapping INTEGER_CST stores that
354 we would otherwise skip.
355
356 PR sanitizer/87837
357 * match.pd (X + Y < X): Don't optimize if TYPE_OVERFLOW_SANITIZED.
358
359 2018-11-05 Xuepeng Guo <xuepeng.guo@intel.com>
360
361 PR target/87853
362 * config/i386/emmintrin.h (__v16qs): New to cope with option
363 -funsigned-char.
364 (_mm_cmpeq_epi8): Replace __v16qi with __v16qs.
365 (_mm_cmplt_epi8): Likewise.
366 (_mm_cmpgt_epi8): Likewise.
367
368 2018-11-05 Richard Biener <rguenther@suse.de>
369
370 PR rtl-optimization/87852
371 * fwprop.c (use_killed_between): Only consider single-defs of the
372 use whose definition statement dominates the use.
373
374 2018-11-05 Martin Liska <mliska@suse.cz>
375
376 PR web/87829
377 * doc/invoke.texi: Remove options that are
378 not disabled with -Os.
379
380 2018-11-05 Martin Liska <mliska@suse.cz>
381
382 PR c/87811
383 * doc/extend.texi: Update constrain about the last argument
384 of __builtin_expect_with_probability.
385
386 2018-11-05 Martin Liska <mliska@suse.cz>
387
388 PR c/87811
389 * predict.c (expr_expected_value_1): Verify
390 that last argument is a real constants and emit
391 error.
392
393 2018-11-05 Martin Liska <mliska@suse.cz>
394
395 PR gcov-profile/77698
396 * ipa-profile.c (ipa_profile): Adjust hotness threshold
397 only in LTO mode.
398
399 2018-11-04 Bernd Edlinger <bernd.edlinger@hotmail.de>
400
401 PR tree-optimization/86572
402 * builtins.c (c_strlen): Handle negative offsets in a safe way.
403
404 2018-11-04 Bernd Edlinger <bernd.edlinger@hotmail.de>
405
406 PR tree-optimization/87672
407 * gimple-fold.c (gimple_fold_builtin_stxcpy_chk): Gimplify.
408 * tree-ssa-strlen.c (handle_builtin_strcat): Adjust object size.
409
410 2018-11-04 Uros Bizjak <ubizjak@gmail.com>
411
412 PR middle-end/58372
413 * cfgexpand.c (pass_expand::execute): Move the call to
414 finish_eh_generation in front of the call to expand_stack_alignment.
415
416 2018-11-04 Venkataramanan Kumar <venkataramanan.kumar@amd.com>
417
418 * common/config/i386/i386-common.c (processor_alias_table): Add
419 znver2 entry.
420 * config.gcc (i[34567]86-*-linux* | ...): Add znver2.
421 (case ${target}): Add znver2.
422 * config/i386/driver-i386.c: (host_detect_local_cpu): Let
423 -march=native recognize znver2 processors.
424 * config/i386/i386-c.c (ix86_target_macros_internal): Add znver2.
425 * config/i386/i386.c (m_znver2): New definition.
426 (m_ZNVER): New definition.
427 (m_AMD_MULTIPLE): Includes m_znver2.
428 (processor_cost_table): Add znver2 entry.
429 (processor_target_table): Add znver2 entry.
430 (get_builtin_code_for_version): Set priority for
431 PROCESSOR_ZNVER2.
432 (processor_model): Add M_AMDFAM17H_ZNVER2.
433 (arch_names_table): Ditto.
434 (ix86_reassociation_width): Include znver2.
435 * config/i386/i386.h (TARGET_znver2): New definition.
436 (struct ix86_size_cost): Add TARGET_ZNVER2.
437 (enum processor_type): Add PROCESSOR_ZNVER2.
438 * config/i386/i386.md (define_attr "cpu"): Add znver2.
439 * config/i386/x86-tune-costs.h: (processor_costs) Add znver2 costs.
440 * config/i386/x86-tune-sched.c: (ix86_issue_rate): Add znver2.
441 (ix86_adjust_cost): Add znver2.
442 * config/i386/x86-tune.def: Replace m_ZNVER1 by m_ZNVER.
443 * gcc/doc/extend.texi: Add details about znver2.
444 * gcc/doc/invoke.texi: Add details about znver2.
445
446 2018-11-03 Sandra Loosemore <sandra@codesourcery.com>
447
448 PR target/87079
449
450 * config/nios2/nios2.c (nios2_rtx_costs): Recognize <mul>sidi3
451 pattern.
452
453 2018-11-02 Aaron Sawdey <acsawdey@linux.ibm.com>
454
455 * config/rs6000/rs6000-string.c (expand_strncmp_gpr_sequence): Pay
456 attention to TARGET_AVOID_XFORM and BYTES_BIG_ENDIAN.
457
458 2018-11-02 Richard Earnshaw <rearnsha@arm.com>
459
460 * config/aarch64/aarch64.c ((aarch64_override_options): Disable
461 shrink-wrapping when -mtrack-speculation.
462
463 2018-11-02 Richard Biener <rguenther@suse.de>
464
465 * tree-ssa-coalesce.c (struct coalesce_list): Add obstack member.
466 (pop_cost_one_pair): Do not free pair.
467 (pop_best_coalesce): Likewise.
468 (create_coalesce_list): Initialize obstack.
469 (delete_coalesce_list): Free obstack.
470 (find_coalesce_pair): Obstack-allocate coalesce pairs.
471 (add_cost_one_coalesce): Likewise.
472 (struct live_track): Remove bitmap pointer indirections.
473 (new_live_track): Adjust.
474 (delete_live_track): Likewise.
475 (live_track_remove_partition): Likewise.
476 (live_track_add_partition): Likewise.
477 (live_track_live_p): Likewise.
478 (live_track_process_def): Likewise.
479 (live_track_clear_base_vars): Likewise.
480
481 2018-11-02 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
482
483 * configure.ac (gcc_cv_as_sparc_register_op): Remove.
484 * configure: Regenerate.
485 * config.in: Regenerate.
486 * config/sparc/sparc.c (sparc_output_scratch_registers): Remove
487 HAVE_AS_REGISTER_PSEUDO_OP guard.
488 * config/sparc/sparc.h (ASM_ARCH64_SPEC): Remove
489 !HAVE_AS_REGISTER_PSEUDO_OP support.
490 (ASM_DECLARE_REGISTER_GLOBAL): Remove HAVE_AS_REGISTER_PSEUDO_OP
491 guard.
492
493 2018-11-02 Richard Biener <rguenther@suse.de>
494
495 * dwarf2out.c (build_abbrev_table): Guard lookup_external_ref call
496 with is_type_die.
497
498 2018-11-02 Richard Biener <rguenther@suse.de>
499
500 PR tree-optimization/87776
501 * tree-ssa-sccvn.c (do_rpo_vn): Do not mark backedges
502 executable when iterating but running into rpo-vn-max-loop-depth
503 and not eliding the iteration.
504
505 2018-11-30 Jan Hubicka <jh@suse.cz>
506
507 * tree.c (free_lang_data_in_decl): Free TREE_TYPE and alignment of
508 TYPE_DECL.
509
510 2018-11-01 Aaron Sawdey <acsawdey@linux.ibm.com>
511
512 * config/rs6000/rs6000-protos.h (rs6000_address_for_fpconvert): Remove
513 prototype.
514 * config/rs6000/rs6000.c (rs6000_force_indexed_or_indirect_mem):
515 Combine with rs6000_address_for_fpconvert.
516 (rs6000_address_for_fpconvert): Combine with
517 rs6000_force_indexed_or_indirect_mem.
518 (rs6000_expand_vector_init): Change function call from
519 rs6000_address_for_fpconvert to rs6000_force_indexed_or_indirect_mem.
520 * config/rs6000/rs6000.md (floatsi<mode>2_lfiwax): Change call from
521 rs6000_address_for_fpconvert to rs6000_force_indexed_or_indirect_mem.
522 (floatsi<mode>2_lfiwax_mem): Ditto.
523 (floatunssi<mode>2_lfiwzx): Ditto.
524 (floatunssi<mode>2_lfiwzx_mem): Ditto.
525 (float<QHI:mode><FP_ISA3:mode>2): Ditto.
526 (floatuns<QHI:mode><FP_ISA3:mode>2): Ditto.
527 (fix_trunc<mode>si2_stfiwx): Ditto.
528 (fixuns_trunc<mode>si2_stfiwx): Ditto.
529 (float_<mode>si2_hw): Ditto.
530 (floatuns_<mode>si2_hw): Ditto.
531 * config/rs6000/vsx.md (*vsx_extract_si): Ditto.
532 (vsx_splat_<mode>): Ditto.
533
534 2018-11-01 Joseph Myers <joseph@codesourcery.com>
535
536 * configure.ac (gcc_cv_as_ia64_ltoffx_ldxmov_relocs): Add newline
537 at end of assembler input text.
538 * configure: Regenerate.
539
540 2018-11-01 Jakub Jelinek <jakub@redhat.com>
541
542 PR tree-optimization/87826
543 * gimple-ssa-store-merging.c (do_shift_rotate): Punt if count is
544 negative or larger or equal to type's precision.
545
546 2018-10-31 Alexandre Oliva <aoliva@redhat.com>
547
548 * opts.c (default_options_table): Do not enable
549 OPT_fdelayed_branch at -Og.
550 * doc/invoke.texi (-fdelayed-branch): Document it.
551
552 2018-10-31 Richard Henderson <richard.henderson@linaro.org>
553
554 * optabs-libfuncs.c (build_libfunc_function_visibility):
555 New, split out from...
556 (build_libfunc_function): ... here.
557 (init_one_libfunc_visibility): New, split out from ...
558 (init_one_libfunc): ... here.
559
560 * config/aarch64/atomics.md (aarch64_atomic_<ATOMIC_LDOP><ALLI>_lse):
561 scratch register need not be early-clobber. Document the reason
562 why we cannot use ST<OP>.
563
564 2018-10-31 Joseph Myers <joseph@codesourcery.com>
565
566 PR bootstrap/82856
567 * configure.ac: Remove AC_PREREQ. Use AC_LANG_SOURCE. Use single
568 line for second argument of AC_DEFINE_UNQUOTED.
569 * doc/install.texi (Tools/packages necessary for modifying GCC):
570 Update to autoconf 2.69 and automake 1.15.1.
571 * aclocal.m4, config.in, configure: Regenerate.
572
573 2018-10-31 Pat Haugen <pthaugen@us.ibm.com>
574
575 * tree-ssa-loop-ivcanon.c (try_peel_loop): Fix typo and remove dead
576 initialization.
577
578 2018-10-31 Martin Liska <mliska@suse.cz>
579
580 PR driver/83193
581 * common/config/aarch64/aarch64-common.c (aarch64_parse_extension):
582 Add new argument invalid_extension.
583 (aarch64_get_all_extension_candidates): New function.
584 (aarch64_rewrite_selected_cpu): Add NULL to function call.
585 * config/aarch64/aarch64-protos.h (aarch64_parse_extension): Add
586 new argument.
587 (aarch64_get_all_extension_candidates): New function.
588 * config/aarch64/aarch64.c (aarch64_parse_arch): Add new
589 argument invalid_extension.
590 (aarch64_parse_cpu): Likewise.
591 (aarch64_print_hint_for_extensions): New function.
592 (aarch64_validate_mcpu): Provide hint about invalid extension.
593 (aarch64_validate_march): Likewise.
594 (aarch64_handle_attr_arch): Pass new argument.
595 (aarch64_handle_attr_cpu): Provide hint about invalid extension.
596 (aarch64_handle_attr_isa_flags): Likewise.
597
598 2018-10-31 Richard Biener <rguenther@suse.de>
599
600 PR middle-end/70359
601 PR middle-end/86270
602 * tree-outof-ssa.c (insert_backedge_copies): Restrict
603 copy generation to useful cases. Place the copy before
604 the definition of the backedge value when possible.
605
606 2018-10-31 Claudiu Zissulescu <claziss@synopsys.com>
607
608 * config/arc/arc-arch.h (ARC_TUNE_ARC7XX): New tune value.
609 * config/arc/arc.c (arc_active_insn): New function.
610 (check_store_cacheline_hazard): Likewise.
611 (workaround_arc_anomaly): Use check_store_cacheline_hazard.
612 (arc_override_options): Disable delay slot scheduler for older
613 A7.
614 (arc_store_addr_hazard_p): New implementation, old one renamed to
615 ...
616 (arc_store_addr_hazard_internal_p): Renamed.
617 (arc_reorg): Don't combine into brcc instructions which are part
618 of hardware hazard solution.
619 * config/arc/arc.md (attr tune): Consider new arc7xx tune value.
620 (tune_arc700): Likewise.
621 * config/arc/arc.opt (arc7xx): New tune value.
622 * config/arc/arc700.md: Improve A7 scheduler.
623
624 2018-10-31 Claudiu Zissulescu <claziss@synopsys.com>
625
626 * config/arc/arc.c (arc_override_options): Remove
627 TARGET_COMPACT_CASESI.
628 * config/arc/arc.h (ASM_OUTPUT_ADDR_DIFF_ELT): Update.
629 (CASE_VECTOR_MODE): Likewise.
630 (CASE_VECTOR_PC_RELATIVE): Likewise.
631 (CASE_VECTOR_SHORTEN_MODE): Likewise.
632 (CASE_VECTOR_SHORTEN_MODE1): Delete.
633 (ADDR_VEC_ALIGN): Update.
634 (ASM_OUTPUT_CASE_LABEL): Undefine.
635 (ASM_OUTPUT_BEFORE_CASE_LABEL): Undefine.
636 (TARGET_BI_BIH): Define.
637 (DEFAULT_BRANCH_INDEX): Likewise.
638 * config/arc/arc.md (casesi): Rework to accept BI/BIH
639 instructions, remove compact_casesi use case.
640 (casesi_compact_jump): Remove.
641 (casesi_dispatch): New pattern.
642 * config/arc/arc.opt: Add mbranch-index option. Deprecate
643 compact_casesi option.
644 * doc/invoke.texi: Document mbranch-index option.
645
646 2018-10-31 Claudiu Zissulescu <claziss@synopsys.com>
647
648 * config/arc/arc.c (arc_get_tp): Remove function.
649 (arc_emit_call_tls_get_addr): Likewise.
650 (arc_call_tls_get_addr): New function.
651 (arc_legitimize_tls_address): Make use of arc_call_tls_get_addr.
652 * config/arc/arc.md (tls_load_tp_soft): Remove.
653 (tls_gd_get_addr): Likewise.
654
655 2018-10-31 Claudiu Zissulescu <claziss@synopsys.com>
656
657 * config/arc/arc.md (mulsi3): Remove call to mulsi_600_lib.
658 (mulsi3_600_lib): Remove pattern.
659 (umulsi3_highpart_600_lib_le): Likewise.
660 (umulsi3_highpart): Remove call to umulsi3_highpart_600_lib_le.
661 (umulsidi3): Remove call to umulsidi3_600_lib.
662 (umulsidi3_600_lib): Remove pattern.
663 (peephole2): Remove peephole using the above deprecated patterns.
664
665 2018-10-31 Thomas Preud'homme <thomas.preudhomme@linaro.org>
666
667 PR target/87374
668 * config/arm/arm.c (arm_option_check_internal): Disable the combined
669 use of -mslow-flash-data and -mword-relocations.
670 (arm_option_override): Enable -mword-relocations if -fpic or -fPIC.
671 * config/arm/arm.md (SYMBOL_REF MOVT splitter): Stop checking for
672 flag_pic.
673 * doc/invoke.texi (-mword-relocations): Mention conflict with
674 -mslow-flash-data.
675 (-mslow-flash-data): Reciprocally.
676
677 2018-10-31 Richard Henderson <richard.henderson@linaro.org>
678
679 * config/aarch64/aarch64.c (aarch64_hard_regno_mode_ok): Force
680 16-byte modes held in GP registers to use an even regno.
681
682 * config/aarch64/aarch64.c (aarch64_emit_bic): Remove.
683 (aarch64_atomic_ldop_supported_p): Remove.
684 (aarch64_gen_atomic_ldop): Remove.
685 * config/aarch64/atomic.md (atomic_<atomic_optab><ALLI>):
686 Fully expand LSE operations here.
687 (atomic_fetch_<atomic_optab><ALLI>): Likewise.
688 (atomic_<atomic_optab>_fetch<ALLI>): Likewise.
689 (aarch64_atomic_<ATOMIC_LDOP><ALLI>_lse): Drop atomic_op iterator
690 and use ATOMIC_LDOP instead; use register_operand for the input;
691 drop the split and emit insns directly.
692 (aarch64_atomic_fetch_<ATOMIC_LDOP><ALLI>_lse): Likewise.
693 (aarch64_atomic_<atomic_op>_fetch<ALLI>_lse): Remove.
694 (@aarch64_atomic_load<ATOMIC_LDOP><ALLI>): Remove.
695
696 * config/aarch64/aarch64.c (aarch64_emit_atomic_swap): Remove.
697 (aarch64_gen_atomic_ldop): Don't call it.
698 * config/aarch64/atomics.md (atomic_exchange<ALLI>):
699 Use aarch64_reg_or_zero.
700 (aarch64_atomic_exchange<ALLI>): Likewise.
701 (aarch64_atomic_exchange<ALLI>_lse): Remove split; remove & from
702 operand 0; use aarch64_reg_or_zero for input; merge ...
703 (@aarch64_atomic_swp<ALLI>): ... this and remove.
704
705 * config/aarch64/aarch64.c (aarch64_gen_compare_reg_maybe_ze): New.
706 (aarch64_split_compare_and_swap): Use it.
707 (aarch64_expand_compare_and_swap): Likewise. Remove convert_modes;
708 test oldval against the proper predicate.
709 * config/aarch64/atomics.md (@atomic_compare_and_swap<ALLI>):
710 Use nonmemory_operand for expected.
711 (cas_short_expected_pred): New.
712 (@aarch64_compare_and_swap<SHORT>): Use it; use "rn" not "rI" to match.
713 (@aarch64_compare_and_swap<GPI>): Use "rn" not "rI" for expected.
714 * config/aarch64/predicates.md (aarch64_plushi_immediate): New.
715 (aarch64_plushi_operand): New.
716
717 * config/aarch64/aarch64.c (aarch64_expand_compare_and_swap):
718 Force oldval into the rval register for TARGET_LSE; emit the compare
719 during initial expansion so that it may be deleted if unused.
720 (aarch64_gen_atomic_cas): Remove.
721 * config/aarch64/atomics.md (@aarch64_compare_and_swap<SHORT>_lse):
722 Change =&r to +r for operand 0; use match_dup for operand 2;
723 remove is_weak and mod_f operands as unused. Drop the split
724 and merge with...
725 (@aarch64_atomic_cas<SHORT>): ... this pattern's output; remove.
726 (@aarch64_compare_and_swap<GPI>_lse): Similarly.
727 (@aarch64_atomic_cas<GPI>): Similarly.
728
729 2018-10-31 Richard Biener <rguenther@suse.de>
730
731 * tree-eh.c (replace_trapping_overflow): Simplify ABS_EXPR case
732 using ABSU_EXPR.
733
734 2018-10-31 Sameera Deshpande <sameera.deshpande@linaro.org>
735
736 * config/aarch64/aarch64-cores.def (saphira): Use saphira pipeline.
737 * config/aarch64/aarch64.md: Include saphira.md
738 * config/aarch64/saphira.md: New file for pipeline description.
739
740 2018-10-30 Martin Sebor <msebor@redhat.com>
741
742 PR middle-end/87041
743 * gimple-ssa-sprintf.c (format_directive): Use %G to include
744 inlining context.
745 (sprintf_dom_walker::compute_format_length):
746 Avoid setting POSUNDER4K here.
747 (get_destination_size): Handle null argument values.
748 (get_user_idx_format): New function.
749 (sprintf_dom_walker::handle_gimple_call): Handle all printf-like
750 functions, including user-defined with attribute format printf.
751 Use %G to include inlining context.
752 Set POSUNDER4K here.
753
754 2018-10-30 Jan Hubicka <jh@suse.cz>
755
756 * params.def (lto-partitions): Bump from 32 to 128.
757
758 2018-10-30 Jan Hubicka <jh@suse.cz>
759
760 * tree.c
761 (free_lang_data_d, add_tree_to_fld_list, fld_worklist_push): Move
762 head in file.
763 (free_lang_data_in_type): Forward declare.
764 (fld_type_variant_equal_p): New function.
765 (fld_type_variant): New function
766 (fld_incomplete_types): New hash.
767 (fld_incomplete_type_of): New function
768 (fld_simplfied-type): New function.
769 (free_lang_data_in_decl): Add fld parameter; simplify type of FIELD_DECL
770 (free_lang_data): Allocate and free fld_incomplete_type; update call
771 of free_lang_data_in_decl.
772
773 2018-10-30 Eric Botcazou <ebotcazou@adacore.com>
774
775 * gcov.c (output_lines): Remove duplicate line.
776
777 2018-10-30 Aaron Sawdey <acsawdey@linux.ibm.com>
778
779 * config/rs6000/rs6000.md (bswapdi2): Force address into register
780 if not in indexed or indirect form.
781 (bswapdi2_load): Change predicate to indexed_or_indirect_operand.
782 (bswapdi2_store): Ditto.
783 * config/rs6000/rs6000.c (rs6000_force_indexed_or_indirect_mem): New
784 helper function.
785 * config/rs6000/rs6000-protos.h (rs6000_force_indexed_or_indirect_mem):
786 Prototype for helper function.
787
788 2018-10-30 Martin Sebor <msebor@redhat.com>
789
790 * doc/extend.texi (optimize): Clarify/expand attribute documentation.
791 (target, pragma GCC optimize, pragma GCC target): Ditto.
792
793 2018-10-30 Jonathan Wakely <jwakely@redhat.com>
794
795 * doc/extend.texi: Fix prototype and description of
796 __builtin_expect_with_probability.
797
798 2018-10-30 Michael Ploujnikov <michael.ploujnikov@oracle.com>
799
800 * cgraph.h (clone_function_name_1): Replaced by new
801 clone_function_name_numbered that takes name as string; for
802 privatize_symbol_name_1 use only.
803 (clone_function_name): Renamed to
804 clone_function_name_numbered to be explicit about numbering.
805 (clone_function_name): New two-argument function that does
806 not number its output.
807 (clone_function_name): New three-argument function that
808 takes a number to append to its output.
809 * cgraphclones.c (duplicate_thunk_for_node):
810 (clone_function_name_1): Renamed.
811 (clone_function_name_numbered): Two new functions.
812 (clone_function_name): Improved documentation.
813 (cgraph_node::create_virtual_clone): Use clone_function_name_numbered.
814 * config/rs6000/rs6000.c (make_resolver_func): Ditto.
815 * final.c (final_scan_insn_1): Use the new clone_function_name
816 without numbering.
817 * multiple_target.c (create_dispatcher_calls): Ditto.
818 (create_target_clone): Ditto.
819 * omp-expand.c (grid_expand_target_grid_body): Ditto.
820 * omp-low.c (create_omp_child_function_name): Ditto.
821 * omp-simd-clone.c (simd_clone_create): Ditto.
822 * symtab.c (simd_symtab_node::noninterposable_alias): Use the
823 new clone_function_name without numbering.
824
825 2018-10-30 Richard Earnshaw <rearnsha@arm.com>
826
827 * alloc-pool.h (base_pool_allocator <TBlockAllocator>::initialize):
828 Assert that the allocation size is not zero.
829
830 2018-10-30 Richard Biener <rguenther@suse.de>
831
832 PR tree-optimization/87800
833 * tree-vect-slp.c (vect_build_slp_tree_2): Reject any
834 non-induction or reduction PHIs.
835
836 2018-10-30 Sameera Deshpande <sameera.deshpande@linaro.org
837
838 * config/aarch64/falkor-tag-collision-avoidance.c
839 (execute_tag_collision_avoidance): Call df_note_add_problem.
840
841 2018-10-30 Martin Liska <mliska@suse.cz>
842
843 * doc/extend.texi: Fix typo in documentation
844 of __builtin_expect_with_probability.
845
846 2018-10-29 David Malcolm <dmalcolm@redhat.com>
847
848 PR c++/87721
849 * input.c (get_substring_ranges_for_loc): Detect if
850 linemap_resolve_location gives us a NULL map, and reject
851 this case.
852
853 2018-10-29 Iain Buclaw <ibuclaw@gdcproject.org>
854
855 * config.gcc (xstormy16-*-elf): Set tm_d_file.
856
857 2018-10-29 David Malcolm <dmalcolm@redhat.com>
858 Martin Sebor <msebor@redhat.com>
859 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
860
861 * doc/ux.texi (Quoting): New subsection, adapted from material at
862 https://gcc.gnu.org/wiki/DiagnosticsGuidelines written by
863 MartinSebor and ManuelLopezIbanez.
864 (Fix-it hints): Note that fix-it hints shouldn't be marked for
865 translation.
866
867 2018-10-29 Kugan Vivekanandarajah <kuganv@linaro.org>
868
869 PR middle-end/87469
870 * tree-ssa-loop-niter.c (number_of_iterations_popcount): Fix niter
871 max value.
872
873 2018-10-29 Paul A. Clarke <pc@us.ibm.com>
874
875 * gcc.target/powerpc/ssse3-check.h: Remove inaccurate comment.
876
877 2018-10-29 Paul Koning <ni1d@arrl.net>
878
879 * doc/rtl.texi (CONST_WIDE_INT_ELT): Give correct macro name.
880
881 2018-10-29 Paul A. Clarke <pc@us.ibm.com>
882
883 * gcc/config/rs6000/mmintrin.h (_mm_packs_pi16, _mm_packs_pi32,
884 _mm_packs_pu16, _mm_unpackhi_pi8, _mm_unpacklo_pi8, _mm_add_pi8,
885 _mm_add_pi16, _mm_add_pi32, _mm_sub_pi8, _mm_sub_pi16, _mm_sub_pi32,
886 _mm_cmpgt_pi8, _mm_cmpeq_pi16, _mm_cmpgt_pi16, _mm_cmpeq_pi32,
887 _mm_cmpgt_pi32, _mm_adds_pi8, _mm_adds_pi16, _mm_adds_pu8,
888 _mm_adds_pu16, _mm_subs_pi8, _mm_subs_pi16, _mm_subs_pu8,
889 _mm_subs_pu16, _mm_madd_pi16, _mm_mulhi_pi16, _mm_mullo_pi16,
890 _mm_sll_pi16, _mm_sra_pi16, _mm_srl_pi16, _mm_set1_pi16, _mm_set1_pi8):
891 Change 'vector' to '__vector'.
892 * gcc/config/rs6000/xmmintrin.h (_mm_cvtps_pi32, _mm_cvttps_pi32,
893 _mm_cvtps_pi16, _mm_cvtps_pi8, _mm_max_pi16, _mm_max_pu8, _mm_min_pi16,
894 _mm_min_pu8, _mm_mulhi_pu16, _mm_shuffle_pi16, _mm_avg_pu8,
895 _mm_avg_pu16): Likewise. And, whitespace corrections.
896
897 2018-10-29 Richard Biener <rguenther@suse.de>
898
899 PR tree-optimization/87785
900 * tree-vect-slp.c (vect_gather_slp_loads): Only gather
901 internal defs.
902
903 2018-10-29 Olivier Hainque <hainque@adacore.com>
904
905 * VXWORKS_NET_LIBS_RTP: New macro, network part of VXWORKS_LIBS_RTP.
906
907 2018-10-29 Olivier Hainque <hainque@adacore.com>
908
909 * config/vxworks.h (VXWORKS_PERSONALITY): New VxWorks
910 ports configuration macro, defaults to "gnu".
911 (VXWORKS_OS_CPP_BUILTINS): Use it. Feed TOOL and
912 TOOL_FAMILY instead of _VX_TOOL/_VXTOOL_FAMILY.
913
914 2018-10-29 Olivier Hainque <hainque@adacore.com>
915
916 * config/vxworks.h (CLEAR_INSN_CACHE): #undef before #define.
917
918 2018-10-29 Richard Biener <rguenther@suse.de>
919
920 PR tree-optimization/87790
921 * tree-vect-slp.c (vect_mark_slp_stmts): Simplify.
922 (vect_make_slp_decision): Adjust.
923 (vect_slp_analyze_bb_1): Likewise.
924 (vect_detect_hybrid_slp_stmts): Properly union SLP type over
925 edges.
926
927 2018-10-29 Richard Biener <rguenther@suse.de>
928
929 PR tree-optimization/87785
930 * tree-vect-slp.c (vect_build_slp_tree_2): Remove loads argument
931 and processing.
932 (vect_build_slp_tree): Likewise.
933 (vect_gather_slp_loads): New function.
934 (vect_analyze_slp_instance): Gather loads separately from the
935 SLP tree build.
936
937 2018-10-29 Martin Liska <mliska@suse.cz>
938
939 * Makefile.in: Make dependency to json.o.
940 * doc/gcov.texi: Document new JSON format, remove
941 old intermediate format documentation.
942 * gcov.c (struct function_info): Come up with m_name and
943 m_demangled_name.
944 (function_info::function_info): Initialize it.
945 (function_info::~function_info): Release it.
946 (main): Rename flag_intermediate_format to flag_json_format.
947 (print_usage): Describe --json-format.
948 (process_args): Set flag_json_format.
949 (output_intermediate_line): Remove.
950 (output_intermediate_json_line): Likewise.
951 (get_gcov_intermediate_filename): Return new extension
952 ".gcov.json.gz".
953 (output_intermediate_file): Implement JSON emission.
954 (output_json_intermediate_file): Implement JSON emission.
955 (generate_results): Use ::get_name for function name.
956 Handle JSON output file.
957 (read_graph_file): Use ::get_name instead of cplus_demangle.
958 (read_count_file): Likewise.
959 (solve_flow_graph): Likewise.
960 (add_line_counts): Likewise.
961 (accumulate_line_counts): Use new flag_json_format.
962 (output_function_details): Use ::get_name instead of cplus_demangle.
963 (output_lines): Likewise.
964 * json.cc (test_writing_literals): Add new tests.
965 * json.h (class literal): Add new boolean constructor.
966
967 2018-10-29 Segher Boessenkool <segher@kernel.crashing.org>
968
969 PR rtl-optimization/87701
970 PR rtl-optimization/87780
971 * combine.c (make_more_copies): Rewrite.
972
973 2018-10-28 Kugan Vivekanandarajah <kuganv@linaro.org>
974
975 * doc/generic.texi (ABSU_EXPR): Document.
976 * match.pd (absu(x)*absu(x) -> x*x): Handle.
977 (absu(absu(X)) -> absu(X)): Likewise.
978 (absu(-X) -> absu(X)): Likewise.
979 (absu(X) where X is nonnegative -> X): Likewise.
980
981 2018-10-28 Iain Buclaw <ibuclaw@gdcproject.org>
982
983 * Makefile.in (tm_d_file_list, tm_d_include_list): New variables.
984 (TM_D_H, D_TARGET_DEF, D_TARGET_H, D_TARGET_OBJS): New variables.
985 (tm_d.h, cs-tm_d.h, default-d.o): New rules.
986 (d/d-target-hooks-def.h, s-d-target-hooks-def-h): New rules.
987 (s-tm-texi): Also check timestamp on d-target.def.
988 (generated_files): Add TM_D_H and d-target-hooks-def.h.
989 (build/genhooks.o): Also depend on D_TARGET_DEF.
990 * config.gcc (tm_d_file, d_target_objs, target_has_targetdm): New
991 variables.
992 * config/aarch64/aarch64-d.c: New file.
993 * config/aarch64/aarch64-linux.h (GNU_USER_TARGET_D_CRITSEC_SIZE):
994 Define.
995 * config/aarch64/aarch64-protos.h (aarch64_d_target_versions): New
996 prototype.
997 * config/aarch64/aarch64.h (TARGET_D_CPU_VERSIONS): Define.
998 * config/aarch64/t-aarch64 (aarch64-d.o): New rule.
999 * config/arm/arm-d.c: New file.
1000 * config/arm/arm-protos.h (arm_d_target_versions): New prototype.
1001 * config/arm/arm.h (TARGET_D_CPU_VERSIONS): Define.
1002 * config/arm/linux-eabi.h (EXTRA_TARGET_D_OS_VERSIONS): Define.
1003 * config/arm/t-arm (arm-d.o): New rule.
1004 * config/default-d.c: New file.
1005 * config/glibc-d.c: New file.
1006 * config/gnu.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
1007 * config/i386/i386-d.c: New file.
1008 * config/i386/i386-protos.h (ix86_d_target_versions): New prototype.
1009 * config/i386/i386.h (TARGET_D_CPU_VERSIONS): Define.
1010 * config/i386/linux-common.h (EXTRA_TARGET_D_OS_VERSIONS): Define.
1011 (GNU_USER_TARGET_D_CRITSEC_SIZE): Define.
1012 * config/i386/t-i386 (i386-d.o): New rule.
1013 * config/kfreebsd-gnu.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
1014 * config/kopensolaris-gnu.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
1015 * config/linux-android.h (ANDROID_TARGET_D_OS_VERSIONS): Define.
1016 * config/linux.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
1017 * config/mips/linux-common.h (EXTRA_TARGET_D_OS_VERSIONS): Define.
1018 * config/mips/mips-d.c: New file.
1019 * config/mips/mips-protos.h (mips_d_target_versions): New prototype.
1020 * config/mips/mips.h (TARGET_D_CPU_VERSIONS): Define.
1021 * config/mips/t-mips (mips-d.o): New rule.
1022 * config/powerpcspe/linux.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
1023 * config/powerpcspe/linux64.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
1024 * config/powerpcspe/powerpcspe-d.c: New file.
1025 * config/powerpcspe/powerpcspe-protos.h (rs6000_d_target_versions):
1026 New prototype.
1027 * config/powerpcspe/powerpcspe.c (rs6000_output_function_epilogue):
1028 Support GNU D by using 0 as the language type.
1029 * config/powerpcspe/powerpcspe.h (TARGET_D_CPU_VERSIONS): Define.
1030 * config/powerpcspe/t-powerpcspe (powerpcspe-d.o): New rule.
1031 * config/riscv/riscv-d.c: New file.
1032 * config/riscv/riscv-protos.h (riscv_d_target_versions): New
1033 prototype.
1034 * config/riscv/riscv.h (TARGET_D_CPU_VERSIONS): Define.
1035 * config/riscv/t-riscv (riscv-d.o): New rule.
1036 * config/rs6000/linux.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
1037 * config/rs6000/linux64.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
1038 * config/rs6000/rs6000-d.c: New file.
1039 * config/rs6000/rs6000-protos.h (rs6000_d_target_versions): New
1040 prototype.
1041 * config/rs6000/rs6000.c (rs6000_output_function_epilogue):
1042 Support GNU D by using 0 as the language type.
1043 * config/rs6000/rs6000.h (TARGET_D_CPU_VERSIONS): Define.
1044 * config/rs6000/t-rs6000 (rs6000-d.o): New rule.
1045 * config/s390/s390-d.c: New file.
1046 * config/s390/s390-protos.h (s390_d_target_versions): New prototype.
1047 * config/s390/s390.h (TARGET_D_CPU_VERSIONS): Define.
1048 * config/s390/t-s390 (s390-d.o): New rule.
1049 * config/sparc/sparc-d.c: New file.
1050 * config/sparc/sparc-protos.h (sparc_d_target_versions): New
1051 prototype.
1052 * config/sparc/sparc.h (TARGET_D_CPU_VERSIONS): Define.
1053 * config/sparc/t-sparc (sparc-d.o): New rule.
1054 * config/t-glibc (glibc-d.o): New rule.
1055 * configure: Regenerated.
1056 * configure.ac (tm_d_file): New variable.
1057 (tm_d_file_list, tm_d_include_list, d_target_objs): Add substitutes.
1058 * doc/contrib.texi (Contributors): Add self for the D frontend.
1059 * doc/frontends.texi (G++ and GCC): Mention D as a supported language.
1060 * doc/install.texi (Configuration): Mention libphobos as an option for
1061 --enable-shared. Mention d as an option for --enable-languages.
1062 (Testing): Mention check-d as a target.
1063 * doc/invoke.texi (Overall Options): Mention .d, .dd, and .di as file
1064 name suffixes. Mention d as a -x option.
1065 * doc/sourcebuild.texi (Top Level): Mention libphobos.
1066 * doc/standards.texi (Standards): Add section on D language.
1067 * doc/tm.texi: Regenerated.
1068 * doc/tm.texi.in: Add @node for D language and ABI, and @hook for
1069 TARGET_CPU_VERSIONS, TARGET_D_OS_VERSIONS, and TARGET_D_CRITSEC_SIZE.
1070 * dwarf2out.c (is_dlang): New function.
1071 (gen_compile_unit_die): Use DW_LANG_D for D.
1072 (declare_in_namespace): Return module die for D, instead of adding
1073 extra declarations into the namespace.
1074 (gen_namespace_die): Generate DW_TAG_module for D.
1075 (gen_decl_die): Handle CONST_DECLSs for D.
1076 (dwarf2out_decl): Likewise.
1077 (prune_unused_types_walk_local_classes): Handle DW_tag_interface_type.
1078 (prune_unused_types_walk): Handle DW_tag_interface_type same as other
1079 kinds of aggregates.
1080 * gcc.c (default_compilers): Add entries for .d, .dd and .di.
1081 * genhooks.c: Include d/d-target.def.
1082
1083 2018-10-28 Iain Sandoe <iain@sandoe.co.uk>
1084
1085 PR target/85669
1086 * config/rs6000/darwin.h (STACK_BOUNDARY): New.
1087 (RS6000_STARTING_FRAME_OFFSET): Adjust to preserve 16byte alignment.
1088 (STACK_DYNAMIC_OFFSET): Likewise.
1089
1090 2018-10-27 Sandra Loosemore <sandra@codesourcery.com>
1091
1092 PR target/80024
1093 * config/nios2/nios2.c (nios2_valid_target_attribute_rec): Fix
1094 error message.
1095
1096 2018-10-26 Tulio Magno Quites Machado Filho <tuliom@linux.ibm.com>
1097
1098 * doc/extend.texi (PowerPC builtins): Fix __builtin_unpack_ibm128
1099 return type and other typos.
1100
1101 2018-10-26 Aaron Sawdey <acsawdey@linux.ibm.com>
1102
1103 * config/rs6000/rs6000-string.c (expand_strncmp_gpr_sequence): Change to
1104 a shorter sequence with fewer branches.
1105 (emit_final_str_compare_gpr): Ditto.
1106
1107 2018-10-26 Paul A. Clarke <pc@us.ibm.com>
1108
1109 * config/rs6000/tmmintrin.h: New file.
1110 * config.gcc (powerpc*-*-*): Add tmmintrin.h to extra_headers.
1111
1112 2018-10-26 Paul A. Clarke <pc@us.ibm.com>
1113
1114 * config/rs6000/mmintrin.h: Enable 32bit compilation.
1115 * config/rs6000/xmmintrin.h: Likewise.
1116
1117 2018-10-26 Paul A. Clarke <pc@us.ibm.com>
1118
1119 * config/rs6000/xmmintrin.h (_mm_extract_pi16): Fix for big-endian.
1120
1121 2018-10-26 Richard Biener <rguenther@suse.de>
1122
1123 * tree-vect-slp.c (vect_mark_slp_stmts): Add visited hash_set
1124 and wrapper.
1125 (vect_mark_slp_stmts_relevant): Likewise.
1126 (vect_detect_hybrid_slp_stmts): Likewise.
1127 (vect_bb_slp_scalar_cost): Likewise.
1128 (vect_remove_slp_scalar_calls): Likewise.
1129
1130 2018-10-26 Jan Hubicka <jh@suse.cz>
1131
1132 * ipa-devirt.c (odr_subtypes_equivalent_p): Fix recursion.
1133 (warn_types_mismatch): Fix walk of DECL_NAME.
1134 (odr_types_equivalent_p): Fix overactive assert.
1135
1136 2018-10-26 Richard Biener <rguenther@suse.de>
1137
1138 PR tree-optimization/87105
1139 * tree-vectorizer.h (_slp_tree::refcnt): New member.
1140 * tree-vect-slp.c (vect_free_slp_tree): Decrement and honor
1141 refcnt.
1142 (vect_create_new_slp_node): Initialize refcnt to one.
1143 (bst_traits): Move.
1144 (scalar_stmts_set_t, bst_fail): Remove.
1145 (vect_build_slp_tree_2): Add bst_map argument and adjust calls.
1146 (vect_build_slp_tree): Add bst_map argument and lookup
1147 already created SLP nodes.
1148 (vect_print_slp_tree): Handle a SLP graph, print SLP node
1149 addresses.
1150 (vect_slp_rearrange_stmts): Handle a SLP graph.
1151 (vect_analyze_slp_instance): Adjust and free SLP nodes from
1152 the CSE map. Fix indenting.
1153 (vect_schedule_slp_instance): Add short-cut.
1154
1155 2018-10-26 Martin Liska <mliska@suse.cz>
1156
1157 PR testsuite/86158
1158 * ipa-prop.c (struct ipa_vr_ggc_hash_traits): Hash with
1159 addr_expr and not with pointers.
1160
1161 2018-10-26 Jan Hubicka <jh@suse.cz>
1162
1163 * tree.c (free_lang_data_in_type): Only check main variants.
1164 * ipa-devirt.c (warn_odr): Make static.
1165 (types_same_for_odr): Drop strict variant.
1166 (types_odr_comparable): Likewise.
1167 (odr_or_derived_type_p): Look for main variants.
1168 (odr_name_hasher::equal): Cleanup comment.
1169 (odr_subtypes_equivalent): Add warn and warned arguments; check main
1170 variants.
1171 (type_variants_equivalent_p): break out from ...
1172 (odr_types_equivalent): ... here; go for main variants where needed.
1173 (warn_odr): ... here; turn static.
1174 (warn_types_mismatch): Compare mangled names of main variants.
1175 * ipa-utils.h (types_odr_comparable): Drop strict parameter.
1176 (type_with_linkage_p): Sanity check that we look at main variant.
1177 * lto.c (lto_read_decls): Only consider main variant to be ODR type.
1178 * tree.h (types_same_for_odr): Drop strict argument.
1179
1180 2018-10-26 Richard Biener <rguenther@suse.de>
1181
1182 PR tree-optimization/87746
1183 * tree-vect-data-refs.c (vect_update_misalignment_for_peel):
1184 Simplify and fix WRT strided store groups with size not
1185 equal to step in element count.
1186 (vect_analyze_group_access_1): Dump the whole group.
1187
1188 2018-10-25 Carl Love <cel@us.ibm.com>
1189
1190 * config/rs6000/rs6000-c.c (P9V_BUILTIN_VEC_VSCEDPGT,
1191 P9V_BUILTIN_VEC_VSCEDPLT, P9V_BUILTIN_VEC_VSCEDPEQ,
1192 P9V_BUILTIN_VEC_VSCEDPUO): Rename base overloaded name. Add quad
1193 precicion entry for each overloaded builtin.
1194 * config/rs6000/rs6000-builtin.def (VSCEDPGT, VSCEDPLT, VSCEDPEQ,
1195 VSCEDPUO): Rename overloaded name.
1196 (VSCEDPGT, VSCEQPGT, VSCEDPLT, VSCEQPLT, VSCEDPEQ, VSCEQPEQ,
1197 VSCEDPUO, VSCEQPUO): Add defitions for overloaded builtins.
1198 * config/rs6000/vsx.md (xscmpexpqp_<code>_<mode>): Add
1199 define_expand for xscmpexqp instruction.
1200 (*xscmpexpqp): Add define_insn for the xscmpexqp instruction.
1201
1202 2018-10-25 Bill Schmidt <wschmidt@linux.ibm.com>
1203 Jinsong Ji <jji@us.ibm.com>
1204
1205 * config/rs6000/emmintrin.h (_mm_slli_epi16): Replace deprecated
1206 function with vec_sl.
1207 (_mm_slli_epi32): Likewise.
1208 (_mm_slli_epi64): Likewise.
1209 (_mm_srai_epi16): Replace deprecated function with vec_sra.
1210 (_mm_srai_epi32): Likewise.
1211 (_mm_srli_epi16): Replace deprecated function with vec_sr.
1212 (_mm_srli_epi32): Likewise.
1213 (_mm_srli_epi64): Likewise.
1214 (_mm_sll_epi16): Replace deprecated function with vec_sl.
1215 (_mm_sll_epi32): Likewise.
1216 (_mm_sll_epi64): Likewise.
1217 (_mm_sra_epi16): Replace deprecated function with vec_sra.
1218 (_mm_sra_epi32): Likewise.
1219 (_mm_srl_epi16): Replace deprecated function with vec_sr.
1220 (_mm_srl_epi32): Likewise.
1221 (_mm_srl_epi64): Likewise.
1222
1223 2018-10-25 Bill Schmidt <wschmidt@linux.ibm.com>
1224 Jinsong Ji <jji@us.ibm.com>
1225
1226 * gcc/config/rs6000/emmintrin.h (_mm_sll_epi16): Replace
1227 comparison operators with vec_cmp* for compatibility due to
1228 unfortunate history; clean up formatting and use types more
1229 appropriately.
1230 (_mm_sll_epi32): Likewise.
1231 (_mm_sll_epi64): Likewise.
1232 (_mm_srl_epi16): Likewise.
1233 (_mm_srl_epi32): Likewise.
1234 (_mm_srl_epi64): Likewise.
1235
1236 2018-10-25 Bill Schmidt <wschmidt@linux.ibm.com>
1237 Jinsong Ji <jji@us.ibm.com>
1238
1239 * config/rs6000/emmintrin.h (_mm_sll_epi64): Remove wrong cast.
1240 * config/rs6000/xmmintrin.h (_mm_min_ps): Change m's type to
1241 __vector __bool int. Use vec_cmpgt in preference to deprecated
1242 function vec_vcmpgtfp.
1243 (_mm_max_ps): Likewise.
1244
1245 2018-10-25 Jeff Law <law@redhat.com>
1246
1247 * config/rl78/rl78.c (insn_ok_now): Always re-recognize the insn
1248 if returning false.
1249
1250 2018-10-25 Martin Sebor <msebor@redhat.com>
1251
1252 * doc/extend.texi (aligned): Expand attribute description.
1253 (Alignment): Rename section. Discuss function arguments.
1254
1255 2018-10-25 Jan Hubicka <jh@suse.cz>
1256
1257 * ipa-devirt.c (main_odr_variant): Remove.
1258 (hash_odr_name, types_same_for_odr, types_odr_comparable,
1259 odr_name_hasher::equal, odr_subtypes_equivalent_p):
1260 Drop use of main_odr_variant.
1261 (add_type_duplicate): Silence confused warnings on integer types.
1262 (get_odr_type): Always look for main variant.
1263 (register_odr_type): Simplify.
1264
1265 2018-10-25 Richard Biener <rguenther@suse.de>
1266
1267 * tree-vect-data-refs.c (vect_analyze_data_ref_accesses):
1268 Initialize ng to silence error with release checking bootstrap.
1269
1270 2018-10-25 Richard Biener <rguenther@suse.de>
1271
1272 * tree-if-conv.c: Include tree-ssa-sccvn.h.
1273 (tree_if_conversion): Run CSE on the if-converted loop body.
1274
1275 2018-10-25 Ilya Leoshkevich <iii@linux.ibm.com>
1276
1277 * config/s390/constraints.md (ZL): New constraint.
1278 * config/s390/s390.c (legitimate_pic_operand_p): Accept LARL
1279 operands.
1280 * config/s390/s390.md (movdi_larl): Remove.
1281 (movdi_64): Add the LARL alternative.
1282
1283 2018-10-25 Ilya Leoshkevich <iii@linux.ibm.com>
1284
1285 PR bootstrap/87747
1286 * rtl.c (RTX_CODE_HWINT_P_1): New helper macro.
1287 (RTX_CODE_HWINT_P): New macro.
1288 (rtx_code_size): Use RTX_CODE_HWINT_P ().
1289
1290 2018-10-25 Jan Hubicka <jh@suse.cz>
1291
1292 * ipa-devirt.c (odr_types_equivalent_p): Do not ICE if one of types
1293 is anonymous.
1294
1295 2018-10-25 Richard Biener <rguenther@suse.de>
1296
1297 PR tree-optimization/87665
1298 PR tree-optimization/87745
1299 * tree-vectorizer.h (get_earlier_stmt): Remove.
1300 (get_later_stmt): Pick up UID from the original non-pattern stmt.
1301
1302 2018-10-25 Sam Tebbs <sam.tebbs@arm.com>
1303
1304 * options.texi (Deprecated): Move list to Var section.
1305
1306 2018-10-24 Bill Schmidt <wschmidt@linux.ibm.com>
1307 Jinsong Ji <jji@us.ibm.com>
1308
1309 * config/rs6000/emmintrin.h (_mm_cvtpd_epi32): Change deprecated
1310 __vector long to __vector long long.
1311 (_mm_cvtpd_ps): Likewise.
1312 (_mm_cvttpd_epi32): Likewise.
1313 (_mm_cvtpi32_pd): Likewise.
1314 (_mm_unpackhi_epi64): Likewise.
1315 (_mm_unpacklo_epi64): Likewise.
1316
1317 2018-10-24 Segher Boessenkool <segher@kernel.crashing.org>
1318
1319 PR rtl-optimization/87720
1320 * combine.c (make_more_copies): Skip if the dest is pc_rtx.
1321
1322 2018-10-24 Alexandre Oliva <aoliva@redhat.com>
1323
1324 * gimple-ssa-isolate-paths.c
1325 (find_implicit_erroneous_behavior): Do not change code if the
1326 pass is running for warnings only.
1327 (find_explicit_erroneous_behavior): Likewise.
1328
1329 2018-10-24 Michael Meissner <meissner@linux.ibm.com>
1330
1331 * config/rs6000/rs6000.c (TARGET_MANGLE_DECL_ASSEMBLER_NAME):
1332 Define as rs6000_mangle_decl_assembler_name.
1333 (rs6000_mangle_decl_assembler_name): If the user switched from IBM
1334 long double to IEEE long double, switch the names of the long
1335 double built-in functions to be <func>f128 instead of <func>l.
1336
1337 2018-10-24 Martin Sebor <msebor@redhat.com>
1338
1339 * doc/extend.texi (nonnull): List no-argument form. Reference
1340 -fno-delete-null-pointer-checks and -fisolate-erroneous-paths-attribute.
1341
1342 2018-10-24 Richard Biener <rguenther@suse.de>
1343
1344 * tree-ssa-sccvn.c (do_rpo_vn): Free rpo_state.
1345
1346 2018-10-24 Martin Liska <mliska@suse.cz>
1347
1348 PR tree-optimization/84436
1349 * tree-switch-conversion.c (switch_conversion::contains_same_values_p):
1350 Remove.
1351 (switch_conversion::contains_linear_function_p): New.
1352 (switch_conversion::build_one_array): Support linear
1353 transformation on input.
1354 * tree-switch-conversion.h (struct switch_conversion): Add
1355 contains_linear_function_p declaration.
1356
1357 2018-10-24 Richard Biener <rguenther@suse.de>
1358
1359 * varasm.c (const_hash_1): Return hash of ADDR_EXPR
1360 if its argument is CONSTANT_CLASS_P.
1361
1362 2018-10-11 Jan Hubicka <hubicka@ucw.cz>
1363
1364 * ipa-utils.h (type_with_linkage_p): No longer check for TYPE_STUB_DECL;
1365 it is wrong for forward declarations.
1366
1367 2018-10-24 Ilya Leoshkevich <iii@linux.ibm.com>
1368
1369 * config/s390/s390.c (s390_check_qrst_address): Add the missing
1370 SYMBOL_REF_P () check.
1371
1372 2018-10-24 Richard Biener <rguenther@suse.de>
1373
1374 PR tree-optimization/87105
1375 * tree-vect-data-refs.c (vect_analyze_group_access_1): Adjust
1376 dump classification.
1377 (vect_analyze_data_ref_accesses): Handle duplicate loads and
1378 stores by splitting the affected group after the fact.
1379 * tree-vect-slp.c (vect_build_slp_tree_2): Dump when we
1380 fail the SLP build because of size constraints.
1381
1382 2018-10-24 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1383
1384 * configure.ac (gcc_cv_ld_aligned_shf_merge): New test.
1385 * configure: Regenerate.
1386 * config.in: Regenerate.
1387 * varasm.c (mergeable_string_section): Use readonly_data_section
1388 if linker doesn't support SHF_MERGE with alignment > 8.
1389 (mergeable_constant_section): Likewise.
1390
1391 2018-10-24 Richard Biener <rguenther@suse.de>
1392
1393 PR tree-optimization/84013
1394 * tree-ssa-structalias.c (struct msdi_data): New struct for
1395 marshalling data to walk_stmt_load_store_ops.
1396 (maybe_set_dependence_info): Refactor as callback for
1397 walk_stmt_load_store_ops.
1398 (compute_dependence_clique): Set restrict info on all stmt kinds.
1399
1400 2018-10-24 Martin Liska <mliska@suse.cz>
1401
1402 * cgraph.c (cgraph_node::dump):
1403 Remove reduntant dumps and make tp_first_run dump more compact.
1404
1405 2018-10-24 Richard Biener <rguenther@suse.de>
1406
1407 PR tree-optimization/87665
1408 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Adjust
1409 to reflect reality.
1410
1411 2018-10-12 Jeff Law <law@redhat.com>
1412
1413 * config/h8300/h8300.c (h8300_expand_prologue): Fix stm generation
1414 for H8/S.
1415
1416 2018-10-23 Richard Biener <rguenther@suse.de>
1417
1418 * tree-vrp.c (add_assert_info): Guard dump_printf with
1419 dump_enabled_p.
1420 * gimple-ssa-evrp-analyze.c
1421 (evrp_range_analyzer::record_ranges_from_incoming_edge):
1422 Use value_range::ignore_equivs_equal_p.
1423
1424 2018-10-23 Richard Biener <rguenther@suse.de>
1425
1426 PR tree-optimization/87105
1427 PR tree-optimization/87608
1428 * passes.def (pass_all_early_optimizations): Add early phi-opt
1429 after dce.
1430 * tree-ssa-phiopt.c (value_replacement): Ignore NOPs and predicts in
1431 addition to debug stmts.
1432 (tree_ssa_phiopt_worker): Add early_p argument, do only min/max
1433 and abs replacement early.
1434 * tree-cfg.c (gimple_empty_block_p): Likewise.
1435
1436 2018-10-23 Richard Earnshaw <rearnsha@arm.com>
1437
1438 PR target/86383
1439 * config.gcc (arm*-*-netbsdelf*): Default to StrongARM if no CPU
1440 specified to configure.
1441 (arm*-*-*): Use ARM7TDMI as the target CPU if no default provided.
1442
1443 2018-10-23 Richard Biener <rguenther@suse.de>
1444
1445 PR tree-optimization/87700
1446 * tree-ssa-copy.c (set_copy_of_val): Fix change detection logic.
1447
1448 2018-10-23 Jakub Jelinek <jakub@redhat.com>
1449
1450 PR target/87674
1451 * config/i386/avx512vlintrin.h (_mm_mask_mullo_epi32): Change type of
1452 second argument from __mmask16 to __mmask8.
1453 * config/i386/avx512vlbwintrin.h (_mm_mask_packus_epi32,
1454 _mm_mask_packs_epi32): Likewise.
1455 * config/i386/avx512pfintrin.h (_mm512_mask_prefetch_i64scatter_ps):
1456 Likewise.
1457 (_mm512_mask_prefetch_i64scatter_pd): Likewise. Formatting fix.
1458
1459 2018-10-23 Richard Biener <rguenther@suse.de>
1460
1461 * tree-vect-stmts.c (vect_analyze_stmt): Fix typo in comment.
1462
1463 2018-10-23 Richard Biener <rguenther@suse.de>
1464
1465 PR tree-optimization/86144
1466 * tree-vect-stmts.c (vect_analyze_stmt): Prefer -mveclibabi
1467 over simd attribute.
1468
1469 2018-10-23 Richard Biener <rguenther@suse.de>
1470
1471 PR tree-optimization/87693
1472 * tree-ssa-threadedge.c (thread_around_empty_blocks): Handle
1473 the case we do not find the taken edge.
1474
1475 2018-10-22 Bill Schmidt <wschmidt@linux.ibm.com>
1476 Jinsong Ji <jji@us.ibm.com>
1477
1478 * config/rs6000/emmintrin.h (_MM_SHUFFLE2): Comment cleanup.
1479 (_mm_store_pd): Use unaligned vector type for pointer cast.
1480 (_mm_maskmoveu_si128): Likewise.
1481 * config/rs6000/xmmintrin.h (__m128_u): New typedef.
1482 (_mm_store_ps): Use unaligned vector type for pointer cast.
1483
1484 2018-10-22 Paul Koning <ni1d@arrl.net>
1485
1486 * symtab.c (symtab_node::increase_alignment): Correct max
1487 alignment check.
1488
1489 2018-10-22 Yury Gribov <tetra2005@gmail.com>
1490
1491 PR tree-optimization/87633
1492 * match.pd: Do not generate unordered integer comparisons.
1493
1494 2018-10-22 Segher Boessenkool <segher@kernel.crashing.org>
1495
1496 PR rtl-optimization/87600
1497 * combine.c: Add include of expr.h.
1498 (cant_combine_insn_p): Do not combine moves from any hard non-fixed
1499 register to a pseudo.
1500 (make_more_copies): New function, add a copy to a new pseudo after
1501 the moves from hard registers into pseudos.
1502 (rest_of_handle_combine): Declare rebuild_jump_labels_after_combine
1503 later. Call make_more_copies.
1504
1505 2018-10-22 Andrew Stubbs <ams@codesourcery.com>
1506
1507 * lra-constraints.c (process_alt_operands): New local array,
1508 matching_early_clobber. Check matching_early_clobber before
1509 decrementing reject, and set matching_early_clobber after.
1510
1511 2018-10-22 Segher Boessenkool <segher@kernel.crashing.org>
1512
1513 PR target/87598
1514 * config/rs6000/rs6000.c (print_operand_address): For unexpected RTL
1515 call output_addr_const and hope for the best.
1516
1517 2018-10-22 Richard Biener <rguenther@suse.de>
1518
1519 * gimple-ssa-evrp-analyze.c
1520 (evrp_range_analyzer::record_ranges_from_incoming_edge): Be
1521 smarter about what ranges to use.
1522 * tree-vrp.c (add_assert_info): Dump here.
1523 (register_edge_assert_for_2): Instead of here at multiple but
1524 not all places.
1525
1526 * gcc.dg/tree-ssa/evrp12.c: New testcase.
1527 * gcc.dg/predict-6.c: Adjust.
1528 * gcc.dg/tree-ssa/vrp33.c: Disable EVRP.
1529 * gcc.dg/tree-ssa/vrp02.c: Likewise.
1530 * gcc.dg/tree-ssa/cunroll-9.c: Likewise.
1531
1532 2018-10-22 Steven Bosscher <steven@gcc.gnu.org>
1533 Richard Biener <rguenther@suse.de>
1534
1535 * bitmap.h: Update data structure documentation, including a
1536 description of bitmap views as either linked-lists or splay trees.
1537 (struct bitmap_element_def): Update comments for splay tree bitmaps.
1538 (struct bitmap_head_def): Likewise.
1539 (bitmap_list_view, bitmap_tree_view): New prototypes.
1540 (bitmap_initialize_stat): Initialize a bitmap_head's indx and
1541 tree_form fields.
1542 (bmp_iter_set_init): Assert the iterated bitmaps are in list form.
1543 (bmp_iter_and_init, bmp_iter_and_compl_init): Likewise.
1544 * bitmap.c (bitmap_elem_to_freelist): Unregister overhead of a
1545 released bitmap element here.
1546 (bitmap_element_free): Remove.
1547 (bitmap_elt_clear_from): Work on splay tree bitmaps.
1548 (bitmap_list_link_element): Renamed from bitmap_element_link. Move
1549 this function similar ones such that linked-list bitmap implementation
1550 functions are grouped.
1551 (bitmap_list_unlink_element): Renamed from bitmap_element_unlink,
1552 and moved for grouping.
1553 (bitmap_list_insert_element_after): Renamed from
1554 bitmap_elt_insert_after, and moved for grouping.
1555 (bitmap_list_find_element): New function spliced from bitmap_find_bit.
1556 (bitmap_tree_link_left, bitmap_tree_link_right,
1557 bitmap_tree_rotate_left, bitmap_tree_rotate_right, bitmap_tree_splay,
1558 bitmap_tree_link_element, bitmap_tree_unlink_element,
1559 bitmap_tree_find_element): New functions for splay-tree bitmap
1560 implementation.
1561 (bitmap_element_link, bitmap_element_unlink, bitmap_elt_insert_after):
1562 Renamed and moved, see above entries.
1563 (bitmap_tree_listify_from): New function to convert part of a splay
1564 tree bitmap to a linked-list bitmap.
1565 (bitmap_list_view): Convert a splay tree bitmap to linked-list form.
1566 (bitmap_tree_view): Convert a linked-list bitmap to splay tree form.
1567 (bitmap_find_bit): Remove.
1568 (bitmap_clear, bitmap_clear_bit, bitmap_set_bit,
1569 bitmap_single_bit_set_p, bitmap_first_set_bit, bitmap_last_set_bit):
1570 Handle splay tree bitmaps.
1571 (bitmap_copy, bitmap_count_bits, bitmap_and, bitmap_and_into,
1572 bitmap_elt_copy, bitmap_and_compl, bitmap_and_compl_into,
1573 bitmap_compl_and_into, bitmap_elt_ior, bitmap_ior, bitmap_ior_into,
1574 bitmap_xor, bitmap_xor_into, bitmap_equal_p, bitmap_intersect_p,
1575 bitmap_intersect_compl_p, bitmap_ior_and_compl,
1576 bitmap_ior_and_compl_into, bitmap_set_range, bitmap_clear_range,
1577 bitmap_hash): Reject trying to act on splay tree bitmaps. Make
1578 corresponding changes to use linked-list specific bitmap_element
1579 manipulation functions as applicable for efficiency.
1580 (bitmap_tree_to_vec): New function.
1581 (debug_bitmap_elt_file): New function split out from ...
1582 (debug_bitmap_file): ... here. Handle splay tree bitmaps.
1583 (bitmap_print): Likewise.
1584
1585 PR tree-optimization/63155
1586 * tree-ssa-propagate.c (ssa_prop_init): Use tree-view for the
1587 SSA edge worklists.
1588 * tree-ssa-coalesce.c (coalesce_ssa_name): Populate used_in_copies
1589 in tree-view.
1590
1591 2018-10-22 Martin Liska <mliska@suse.cz>
1592
1593 PR tree-optimization/87686
1594 Revert
1595 2018-08-29 Martin Liska <mliska@suse.cz>
1596
1597 * tree-switch-conversion.c (switch_conversion::expand):
1598 Strenghten assumption about gswitch statements.
1599
1600 2018-10-22 Martin Liska <mliska@suse.cz>
1601
1602 * ipa-icf.c (sem_item::compare_attributes): Remove.
1603 (sem_item::compare_referenced_symbol_properties): Use
1604 attribute_list_equal instead.
1605 (sem_function::equals_wpa): Likewise.
1606 * ipa-icf.h: Remove compare_attributes.
1607
1608 2018-10-22 Richard Biener <rguenther@suse.de>
1609
1610 PR middle-end/87682
1611 * mem-stats.h (mem_usage::operator==): Fix pasto.
1612
1613 2018-10-22 Richard Biener <rguenther@suse.de>
1614
1615 PR tree-optimization/87640
1616 * tree-vrp.c (set_value_range_with_overflow): Decompose
1617 incomplete result.
1618 (extract_range_from_binary_expr_1): Adjust.
1619
1620 2018-10-22 Martin Jambor <mjambor@suse.cz>
1621
1622 * tree-eh.h (stmt_could_throw_p): Add function parameter.
1623 (stmt_can_throw_external): Likewise.
1624 (stmt_can_throw_internal): Likewise.
1625 * tree-eh.c (lower_eh_constructs_2): Pass cfun to stmt_could_throw_p.
1626 (lower_eh_constructs_2): Likewise.
1627 (stmt_could_throw_p): Add fun parameter, use it instead of cfun.
1628 (stmt_can_throw_external): Likewise.
1629 (stmt_can_throw_internal): Likewise.
1630 (maybe_clean_eh_stmt_fn): Pass cfun to stmt_could_throw_p.
1631 (maybe_clean_or_replace_eh_stmt): Pass cfun to stmt_could_throw_p.
1632 (maybe_duplicate_eh_stmt_fn): Pass new_fun to stmt_could_throw_p.
1633 (maybe_duplicate_eh_stmt): Pass cfun to stmt_could_throw_p.
1634 (pass_lower_eh_dispatch::execute): Pass cfun to
1635 stmt_can_throw_external.
1636 (cleanup_empty_eh): Likewise.
1637 (verify_eh_edges): Pass cfun to stmt_could_throw_p.
1638 * cgraph.c (cgraph_edge::set_call_stmt): Pass a function to
1639 stmt_can_throw_external instead of pushing it to cfun.
1640 (symbol_table::create_edge): Likewise.
1641 * gimple-fold.c (fold_builtin_atomic_compare_exchange): Pass cfun to
1642 stmt_can_throw_internal.
1643 * gimple-ssa-evrp.c (evrp_dom_walker::before_dom_children): Pass cfun
1644 to stmt_could_throw_p.
1645 * gimple-ssa-store-merging.c (handled_load): Pass cfun to
1646 stmt_can_throw_internal.
1647 (pass_store_merging::execute): Likewise.
1648 * gimple-ssa-strength-reduction.c
1649 (find_candidates_dom_walker::before_dom_children): Pass cfun to
1650 stmt_could_throw_p.
1651 * gimplify-me.c (gimple_regimplify_operands): Pass cfun to
1652 stmt_can_throw_internal.
1653 * ipa-pure-const.c (check_call): Pass cfun to stmt_could_throw_p and
1654 to stmt_can_throw_external.
1655 (check_stmt): Pass cfun to stmt_could_throw_p.
1656 (check_stmt): Pass cfun to stmt_can_throw_external.
1657 (pass_nothrow::execute): Likewise.
1658 * trans-mem.c (expand_call_tm): Pass cfun to stmt_can_throw_internal.
1659 * tree-cfg.c (is_ctrl_altering_stmt): Pass cfun to
1660 stmt_can_throw_internal.
1661 (verify_gimple_in_cfg): Pass cfun to stmt_could_throw_p.
1662 (stmt_can_terminate_bb_p): Pass cfun to stmt_can_throw_external.
1663 (gimple_purge_dead_eh_edges): Pass cfun to stmt_can_throw_internal.
1664 * tree-complex.c (expand_complex_libcall): Pass cfun to
1665 stmt_could_throw_p and to stmt_can_throw_internal.
1666 (expand_complex_multiplication): Pass cfun to stmt_can_throw_internal.
1667 * tree-inline.c (copy_edges_for_bb): Likewise.
1668 (maybe_move_debug_stmts_to_successors): Likewise.
1669 * tree-outof-ssa.c (ssa_is_replaceable_p): Pass cfun to
1670 stmt_could_throw_p.
1671 * tree-parloops.c (oacc_entry_exit_ok_1): Likewise.
1672 * tree-sra.c (scan_function): Pass cfun to stmt_can_throw_external.
1673 * tree-ssa-alias.c (stmt_kills_ref_p): Pass cfun to
1674 stmt_can_throw_internal.
1675 * tree-ssa-ccp.c (optimize_atomic_bit_test_and): Likewise.
1676 * tree-ssa-dce.c (mark_stmt_if_obviously_necessary): Pass cfun to
1677 stmt_could_throw_p.
1678 (mark_aliased_reaching_defs_necessary_1): Pass cfun to
1679 stmt_can_throw_internal.
1680 * tree-ssa-forwprop.c (pass_forwprop::execute): Likewise.
1681 * tree-ssa-loop-im.c (movement_possibility): Pass cfun to
1682 stmt_could_throw_p.
1683 * tree-ssa-loop-ivopts.c (find_givs_in_stmt_scev): Likewise.
1684 (add_autoinc_candidates): Pass cfun to stmt_can_throw_internal.
1685 * tree-ssa-math-opts.c (pass_cse_reciprocals::execute): Likewise.
1686 (convert_mult_to_fma_1): Likewise.
1687 (convert_to_divmod): Likewise.
1688 * tree-ssa-phiprop.c (propagate_with_phi): Likewise.
1689 * tree-ssa-pre.c (compute_avail): Pass cfun to stmt_could_throw_p.
1690 * tree-ssa-propagate.c
1691 (substitute_and_fold_dom_walker::before_dom_children): Likewise.
1692 * tree-ssa-reassoc.c (suitable_cond_bb): Likewise.
1693 (maybe_optimize_range_tests): Likewise.
1694 (linearize_expr_tree): Likewise.
1695 (reassociate_bb): Likewise.
1696 * tree-ssa-sccvn.c (copy_reference_ops_from_call): Likewise.
1697 * tree-ssa-scopedtables.c (hashable_expr_equal_p): Likewise.
1698 * tree-ssa-strlen.c (adjust_last_stmt): Likewise.
1699 (handle_char_store): Likewise.
1700 * tree-vect-data-refs.c (vect_find_stmt_data_reference): Pass cfun to
1701 stmt_can_throw_internal.
1702 * tree-vect-patterns.c (check_bool_pattern): Pass cfun to
1703 stmt_could_throw_p.
1704 * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
1705 (vectorizable_call): Pass cfun to stmt_can_throw_internal.
1706 (vectorizable_simd_clone_call): Likewise.
1707 * value-prof.c (gimple_ic): Pass cfun to stmt_could_throw_p.
1708 (gimple_stringop_fixed_value): Likewise.
1709
1710 2018-10-22 Ilya Leoshkevich <iii@linux.ibm.com>
1711
1712 * config/s390/s390.c (s390_loadrelative_operand_p): Accept
1713 literal pool references.
1714 (s390_check_qrst_address): Adapt to the new behavior of
1715 s390_loadrelative_operand_p ().
1716
1717 2018-10-22 H.J. Lu <hongjiu.lu@intel.com>
1718
1719 PR target/72782
1720 * config/i386/sse.md (*andnot<mode>3_bcst): New.
1721
1722 2018-10-22 H.J. Lu <hongjiu.lu@intel.com>
1723
1724 PR target/72782
1725 * config/i386/sse.md (*<code><mode>3_bcst): New.
1726
1727 2018-10-22 H.J. Lu <hongjiu.lu@intel.com>
1728
1729 PR target/72782
1730 * config/i386/sse.md (avx512bcst): Updated for V4SI, V2DI, V8SI,
1731 V4DI, V16SI and V8DI.
1732 (*sub<mode>3<mask_name>_bcst): New.
1733 (*add<mode>3<mask_name>_bcst): Likewise.
1734
1735 2018-10-21 Bill Schmidt <wschmidt@linux.ibm.com>
1736 Jinsong Ji <jji@us.ibm.com>
1737
1738 * config/rs6000/emmintrin.h (_mm_movemask_pd): Replace __vector
1739 __m64 with __vector unsigned long long for compatibility.
1740 (_mm_movemask_epi8): Likewise.
1741 * config/rs6000/xmmintrin.h (_mm_cvtps_pi32): Likewise.
1742 (_mm_cvttps_pi32): Likewise.
1743 (_mm_cvtpi32_ps): Likewise.
1744 (_mm_cvtps_pi16): Likewise.
1745 (_mm_loadh_pi): Likewise.
1746 (_mm_storeh_pi): Likewise.
1747 (_mm_movehl_ps): Likewise.
1748 (_mm_movelh_ps): Likewise.
1749 (_mm_loadl_pi): Likewise.
1750 (_mm_storel_pi): Likewise.
1751 (_mm_movemask_ps): Likewise.
1752 (_mm_shuffle_pi16): Likewise.
1753
1754 2018-10-21 H.J. Lu <hongjiu.lu@intel.com>
1755
1756 PR target/72782
1757 * config/i386/avx512fintrin.h (_mm512_fnmsub_round_pd): Use
1758 __builtin_ia32_vfnmsubpd512_mask.
1759 (_mm512_mask_fnmsub_round_pd): Likewise.
1760 (_mm512_fnmsub_pd): Likewise.
1761 (_mm512_mask_fnmsub_pd): Likewise.
1762 (_mm512_maskz_fnmsub_round_pd): Use
1763 __builtin_ia32_vfnmsubpd512_maskz.
1764 (_mm512_maskz_fnmsub_pd): Likewise.
1765 (_mm512_fnmsub_round_ps): Use __builtin_ia32_vfnmsubps512_mask.
1766 (_mm512_mask_fnmsub_round_ps): Likewise.
1767 (_mm512_fnmsub_ps): Likewise.
1768 (_mm512_mask_fnmsub_ps): Likewise.
1769 (_mm512_maskz_fnmsub_round_ps): Use
1770 __builtin_ia32_vfnmsubps512_maskz.
1771 (_mm512_maskz_fnmsub_ps): Likewise.
1772 * config/i386/avx512vlintrin.h (_mm256_mask_fnmsub_pd): Use
1773 __builtin_ia32_vfnmsubpd256_mask.
1774 (_mm256_maskz_fnmsub_pd): Use __builtin_ia32_vfnmsubpd256_maskz.
1775 (_mm_mask_fnmsub_pd): Use __builtin_ia32_vfmaddpd128_mask
1776 (_mm_maskz_fnmsub_pd): Use __builtin_ia32_vfnmsubpd128_maskz.
1777 (_mm256_mask_fnmsub_ps): Use __builtin_ia32_vfnmsubps256_mask.
1778 (_mm256_mask_fnmsub_ps): Use __builtin_ia32_vfnmsubps256_mask.
1779 (_mm256_maskz_fnmsub_ps): Use __builtin_ia32_vfnmsubps256_maskz.
1780 (_mm_mask_fnmsub_ps): Use __builtin_ia32_vfnmsubps128_mask.
1781 (_mm_maskz_fnmsub_ps): Use __builtin_ia32_vfnmsubps128_maskz.
1782 * config/i386/fmaintrin.h (_mm_fnmsub_pd): Use
1783 __builtin_ia32_vfnmsubpd.
1784 (_mm256_fnmsub_pd): Use __builtin_ia32_vfnmsubpd256.
1785 (_mm_fnmsub_ps): Use __builtin_ia32_vfnmsubps.
1786 (_mm256_fnmsub_ps): Use __builtin_ia32_vfnmsubps256.
1787 (_mm_fnmsub_sd): Use __builtin_ia32_vfnmsubsd3.
1788 (_mm_fnmsub_ss): Use __builtin_ia32_vfnmsubss3.
1789 * config/i386/i386-builtin.def: Add
1790 __builtin_ia32_vfnmsubpd256_mask,
1791 __builtin_ia32_vfnmsubpd256_maskz,
1792 __builtin_ia32_vfnmsubpd128_mask,
1793 __builtin_ia32_vfnmsubpd128_maskz,
1794 __builtin_ia32_vfnmsubps256_mask,
1795 __builtin_ia32_vfnmsubps256_maskz,
1796 __builtin_ia32_vfnmsubps128_mask,
1797 __builtin_ia32_vfnmsubps128_maskz,
1798 __builtin_ia32_vfnmsubpd512_mask,
1799 __builtin_ia32_vfnmsubpd512_maskz,
1800 __builtin_ia32_vfnmsubps512_mask,
1801 __builtin_ia32_vfnmsubps512_maskz, __builtin_ia32_vfnmsubss3,
1802 __builtin_ia32_vfnmsubsd3, __builtin_ia32_vfnmsubps,
1803 __builtin_ia32_vfnmsubpd, __builtin_ia32_vfnmsubps256 and.
1804 __builtin_ia32_vfnmsubpd256.
1805 * config/i386/sse.md (fma4i_fnmsub_<mode>): New.
1806 (<avx512>_fnmsub_<mode>_maskz<round_expand_name>): Likewise.
1807 (*<sd_mask_codefor>fma_fnmsub_<mode><sd_maskz_name>_bcst_1):
1808 Likewise.
1809 (*<sd_mask_codefor>fma_fnmsub_<mode><sd_maskz_name>_bcst_2):
1810 Likewise.
1811 (*<sd_mask_codefor>fma_fnmsub_<mode><sd_maskz_name>_bcst_3):
1812 Likewise.
1813 (fmai_vmfnmsub_<mode><round_name>): Likewise.
1814
1815 2018-10-21 H.J. Lu <hongjiu.lu@intel.com>
1816
1817 PR target/72782
1818 * config/i386/avx512fintrin.h (_mm512_fnmadd_round_pd): Use
1819 __builtin_ia32_vfnmaddpd512_mask.
1820 (_mm512_mask_fnmadd_round_pd): Likewise.
1821 (_mm512_fnmadd_pd): Likewise.
1822 (_mm512_mask_fnmadd_pd): Likewise.
1823 (_mm512_maskz_fnmadd_round_pd): Use
1824 __builtin_ia32_vfnmaddpd512_maskz.
1825 (_mm512_maskz_fnmadd_pd): Likewise.
1826 (_mm512_fnmadd_round_ps): Use __builtin_ia32_vfnmaddps512_mask.
1827 (_mm512_mask_fnmadd_round_ps): Likewise.
1828 (_mm512_fnmadd_ps): Likewise.
1829 (_mm512_mask_fnmadd_ps): Likewise.
1830 (_mm512_maskz_fnmadd_round_ps): Use
1831 __builtin_ia32_vfnmaddps512_maskz.
1832 (_mm512_maskz_fnmadd_ps): Likewise.
1833 * config/i386/avx512vlintrin.h (_mm256_mask_fnmadd_pd): Use
1834 __builtin_ia32_vfnmaddpd256_mask.
1835 (_mm256_maskz_fnmadd_pd): Use __builtin_ia32_vfnmaddpd256_maskz.
1836 (_mm_mask_fnmadd_pd): Use __builtin_ia32_vfmaddpd128_mask
1837 (_mm_maskz_fnmadd_pd): Use __builtin_ia32_vfnmaddpd128_maskz.
1838 (_mm256_mask_fnmadd_ps): Use __builtin_ia32_vfnmaddps256_mask.
1839 (_mm256_mask_fnmadd_ps): Use __builtin_ia32_vfnmaddps256_mask.
1840 (_mm256_maskz_fnmadd_ps): Use __builtin_ia32_vfnmaddps256_maskz.
1841 (_mm_mask_fnmadd_ps): Use __builtin_ia32_vfnmaddps128_mask.
1842 (_mm_maskz_fnmadd_ps): Use __builtin_ia32_vfnmaddps128_maskz.
1843 * config/i386/fmaintrin.h (_mm_fnmadd_pd): Use
1844 __builtin_ia32_vfnmaddpd.
1845 (_mm256_fnmadd_pd): Use __builtin_ia32_vfnmaddpd256.
1846 (_mm_fnmadd_ps): Use __builtin_ia32_vfnmaddps.
1847 (_mm256_fnmadd_ps): Use __builtin_ia32_vfnmaddps256.
1848 (_mm_fnmadd_sd): Use __builtin_ia32_vfnmaddsd3.
1849 (_mm_fnmadd_ss): Use __builtin_ia32_vfnmaddss3.
1850 * config/i386/i386-builtin.def: Add
1851 __builtin_ia32_vfnmaddpd256_mask,
1852 __builtin_ia32_vfnmaddpd256_maskz,
1853 __builtin_ia32_vfnmaddpd128_mask,
1854 __builtin_ia32_vfnmaddpd128_maskz,
1855 __builtin_ia32_vfnmaddps256_mask,
1856 __builtin_ia32_vfnmaddps256_maskz,
1857 __builtin_ia32_vfnmaddps128_mask,
1858 __builtin_ia32_vfnmaddps128_maskz,
1859 __builtin_ia32_vfnmaddpd512_mask,
1860 __builtin_ia32_vfnmaddpd512_maskz,
1861 __builtin_ia32_vfnmaddps512_mask,
1862 __builtin_ia32_vfnmaddps512_maskz, __builtin_ia32_vfnmaddss3,
1863 __builtin_ia32_vfnmaddsd3, __builtin_ia32_vfnmaddps,
1864 __builtin_ia32_vfnmaddpd, __builtin_ia32_vfnmaddps256 and.
1865 __builtin_ia32_vfnmaddpd256.
1866 * config/i386/sse.md (fma4i_fnmadd_<mode>): New.
1867 (<avx512>_fnmadd_<mode>_maskz<round_expand_name>): Likewise.
1868 (*<sd_mask_codefor>fma_fnmadd_<mode><sd_maskz_name>_bcst_1):
1869 Likewise.
1870 (*<sd_mask_codefor>fma_fnmadd_<mode><sd_maskz_name>_bcst_2):
1871 Likewise.
1872 (*<sd_mask_codefor>fma_fnmadd_<mode><sd_maskz_name>_bcst_3):
1873 Likewise.
1874 (fmai_vmfnmadd_<mode><round_name>): Likewise.
1875
1876 2018-10-21 H.J. Lu <hongjiu.lu@intel.com>
1877
1878 PR target/72782
1879 * config/i386/avx512fintrin.h (_mm512_fmsub_round_pd): Use
1880 __builtin_ia32_vfmsubpd512_mask.
1881 (_mm512_mask_fmsub_round_pd): Likewise.
1882 (_mm512_fmsub_pd): Likewise.
1883 (_mm512_mask_fmsub_pd): Likewise.
1884 (_mm512_maskz_fmsub_round_pd): Use
1885 __builtin_ia32_vfmsubpd512_maskz.
1886 (_mm512_maskz_fmsub_pd): Likewise.
1887 (_mm512_fmsub_round_ps): Use __builtin_ia32_vfmsubps512_mask.
1888 (_mm512_mask_fmsub_round_ps): Likewise.
1889 (_mm512_fmsub_ps): Likewise.
1890 (_mm512_mask_fmsub_ps): Likewise.
1891 (_mm512_maskz_fmsub_round_ps): Use
1892 __builtin_ia32_vfmsubps512_maskz.
1893 (_mm512_maskz_fmsub_ps): Likewise.
1894 * config/i386/avx512vlintrin.h (_mm256_mask_fmsub_pd): Use
1895 __builtin_ia32_vfmsubpd256_mask.
1896 (_mm256_maskz_fmsub_pd): Use __builtin_ia32_vfmsubpd256_maskz.
1897 (_mm_mask_fmsub_pd): Use __builtin_ia32_vfmaddpd128_mask
1898 (_mm_maskz_fmsub_pd): Use __builtin_ia32_vfmsubpd128_maskz.
1899 (_mm256_mask_fmsub_ps): Use __builtin_ia32_vfmsubps256_mask.
1900 (_mm256_mask_fmsub_ps): Use __builtin_ia32_vfmsubps256_mask.
1901 (_mm256_maskz_fmsub_ps): Use __builtin_ia32_vfmsubps256_maskz.
1902 (_mm_mask_fmsub_ps): Use __builtin_ia32_vfmsubps128_mask.
1903 (_mm_maskz_fmsub_ps): Use __builtin_ia32_vfmsubps128_maskz.
1904 * config/i386/fmaintrin.h (_mm_fmsub_pd): Use
1905 __builtin_ia32_vfmsubpd.
1906 (_mm256_fmsub_pd): Use __builtin_ia32_vfmsubpd256.
1907 (_mm_fmsub_ps): Use __builtin_ia32_vfmsubps.
1908 (_mm256_fmsub_ps): Use __builtin_ia32_vfmsubps256.
1909 (_mm_fmsub_sd): Use __builtin_ia32_vfmsubsd3.
1910 (_mm_fmsub_ss): Use __builtin_ia32_vfmsubss3.
1911 * config/i386/i386-builtin.def: Add
1912 __builtin_ia32_vfmsubpd256_mask,
1913 __builtin_ia32_vfmsubpd256_maskz,
1914 __builtin_ia32_vfmsubpd128_mask,
1915 __builtin_ia32_vfmsubpd128_maskz,
1916 __builtin_ia32_vfmsubps256_mask,
1917 __builtin_ia32_vfmsubps256_maskz,
1918 __builtin_ia32_vfmsubps128_mask,
1919 __builtin_ia32_vfmsubps128_maskz,
1920 __builtin_ia32_vfmsubpd512_mask,
1921 __builtin_ia32_vfmsubpd512_maskz,
1922 __builtin_ia32_vfmsubps512_mask,
1923 __builtin_ia32_vfmsubps512_maskz, __builtin_ia32_vfmsubss3,
1924 __builtin_ia32_vfmsubsd3, __builtin_ia32_vfmsubps,
1925 __builtin_ia32_vfmsubpd, __builtin_ia32_vfmsubps256 and.
1926 __builtin_ia32_vfmsubpd256.
1927 * config/i386/sse.md (fma4i_fmsub_<mode>): New.
1928 (<avx512>_fmsub_<mode>_maskz<round_expand_name>): Likewise.
1929 (*<sd_mask_codefor>fma_fmsub_<mode><sd_maskz_name>_bcst_1):
1930 Likewise.
1931 (*<sd_mask_codefor>fma_fmsub_<mode><sd_maskz_name>_bcst_2):
1932 Likewise.
1933 (*<sd_mask_codefor>fma_fmsub_<mode><sd_maskz_name>_bcst_3):
1934 Likewise.
1935 (fmai_vmfmsub_<mode><round_name>): Likewise.
1936
1937 2018-10-21 H.J. Lu <hongjiu.lu@intel.com>
1938
1939 * config/i386/sse.md (*<plusminus_insn><mode>3<mask_name>_bcst_1):
1940 Remove plus. Renamed to ...
1941 (*sub<mode>3<mask_name>_bcst): This.
1942 (*add<mode>3<mask_name>_bcst_2): Renamede to ...
1943 (*add<mode>3<mask_name>_bcst): This.
1944
1945 2018-10-21 H.J. Lu <hongjiu.lu@intel.com>
1946
1947 PR target/72782
1948 * config/i386/sse.md (*mul<mode>3<mask_name>_bcst): New.
1949
1950 2018-10-21 H.J. Lu <hongjiu.lu@intel.com>
1951
1952 PR target/87662
1953 * i386/avx512vlintrin.h (_mm256_or_epi32): New.
1954 (_mm_or_epi32): Likewise.
1955 (_mm256_xor_epi32): Likewise.
1956 (_mm_xor_epi32): Likewise.
1957 (_mm256_or_epi64): Likewise.
1958 (_mm_or_epi64): Likewise.
1959 (_mm256_xor_epi64): Likewise.
1960 (_mm_xor_epi64): Likewise.
1961
1962 2018-10-20 H.J. Lu <hongjiu.lu@intel.com>
1963
1964 PR target/72782
1965 * config/i386/sse.md (*<avx512>_div<mode>3<mask_name>_bcst): New.
1966
1967 2018-10-20 Jakub Jelinek <jakub@redhat.com>
1968
1969 PR middle-end/87647
1970 * varasm.c (decode_addr_const): Handle COMPOUND_LITERAL_EXPR.
1971
1972 2018-10-20 Andreas Schwab <schwab@linux-m68k.org>
1973
1974 * doc/ux.texi: Move @section directly after @node.
1975
1976 2018-10-19 Jakub Jelinek <jakub@redhat.com>
1977
1978 PR middle-end/85488
1979 PR middle-end/87649
1980 * omp-low.c (check_omp_nesting_restrictions): Diagnose ordered without
1981 depend closely nested inside of loop with ordered clause with
1982 a parameter.
1983
1984 2018-10-19 David Malcolm <dmalcolm@redhat.com>
1985
1986 * Makefile.in (TEXI_GCCINT_FILES): Add ux.texi.
1987 * doc/gccint.texi: Include ux.texi and use it in top-level menu.
1988 * doc/ux.texi: New file.
1989
1990 2018-10-19 Segher Boessenkool <segher@kernel.crashing.org>
1991
1992 * config/rs6000/rs6000.h (REG_ALLOC_ORDER): Move 68 (that is, CR0) to
1993 be the first CR field allocated.
1994
1995 2018-10-19 Richard Biener <rguenther@suse.de>
1996
1997 PR target/87657
1998 * config/i386/i386.c (ix86_builtin_vectorization_cost): Use
1999 TYPE_VECTOR_SUBPARTS and avoid relying on vector mode.
2000
2001 2018-10-19 H.J. Lu <hongjiu.lu@intel.com>
2002
2003 PR target/72782
2004 * config/i386/sse.md
2005 (*<plusminus_insn><mode>3<mask_name>_bcst_1): New.
2006 (*add<mode>3<mask_name>_bcst_2): Likewise.
2007
2008 2018-10-19 H.J. Lu <hongjiu.lu@intel.com>
2009
2010 * config/i386/sse.md
2011 (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_1):
2012 Replace nonimmediate_operand with register_operand.
2013 (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_2):
2014 Likewise.
2015 (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_3):
2016 Likewise.
2017
2018 2018-10-19 Ilya Leoshkevich <iii@linux.ibm.com>
2019
2020 PR rtl-optimization/87596
2021 * lra-constraints.c (spill_hard_reg_in_range): Use INSN_P () +
2022 lra_get_insn_recog_data () instead of lra_insn_recog_data[]
2023 for instructions in FROM..TO range.
2024
2025 2018-10-19 Eric Botcazou <ebotcazou@adacore.com>
2026
2027 * cfgexpand.c (expand_one_var): Use specific wording in error message
2028 for non-local frame variables.
2029 * stor-layout.c (layout_decl): Do not issue a warning for them.
2030
2031 2018-10-19 Robin Dapp <rdapp@linux.ibm.com>
2032
2033 * haifa-sched.c (priority): Add force_recompute parameter.
2034 (apply_replacement): Call priority () with force_recompute = true.
2035 (restore_pattern): Likewise.
2036
2037 2018-10-18 H.J. Lu <hongjiu.lu@intel.com>
2038
2039 * simplify-rtx.c (simplify_subreg): Limit mask of vec_merge to
2040 HOST_BITS_PER_WIDE_INT.
2041 (test_vector_ops_duplicate): Likewise.
2042
2043 2018-10-18 H.J. Lu <hongjiu.lu@intel.com>
2044
2045 PR target/72782
2046 * config/i386/sse.md (VF_AVX512): New.
2047 (avx512bcst): Likewise.
2048 (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_1):
2049 Likewise.
2050 (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_2):
2051 Likewise.
2052 (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_3):
2053 Likewise.
2054
2055 2018-10-18 Jonathan Wakely <jwakely@redhat.com>
2056
2057 * doc/invoke.texi (-dumpversion): Improve grammar.
2058 (-dumpfullversion): Make more consistent with -dumpversion.
2059
2060 2018-10-18 Uros Bizjak <ubizjak@gmail.com>
2061
2062 * config/i386/i386.c (ix86_emit_fp_unordered_jump):
2063 Set JUMP_LABEL to the jump insn.
2064 (ix86_emit_i387_log1p): Use ix86_expand_branch to expand branch.
2065 Predict emitted jump and add label to jump insn.
2066
2067 2018-10-18 David Malcolm <dmalcolm@redhat.com>
2068
2069 PR tree-optimization/87562
2070 * input.c (get_substring_ranges_for_loc): Use
2071 LRK_SPELLING_LOCATION rather than LRK_MACRO_EXPANSION_POINT when
2072 getting the linemap for the endpoint. Verify that it's either
2073 in the same linemap as the start point's spelling location, or
2074 at least in the same file.
2075
2076 2018-10-18 Richard Biener <rguenther@suse.de>
2077
2078 * config/i386/i386.c (ix86_builtin_vectorization_cost): Do not
2079 feed width-specific load/store costs through ix86_vec_cost.
2080 * config/i386/x86-tune-costs.h (athlon_cost): Adjust.
2081 (k8_cost): Likewise.
2082 (bdver_cost): Likewise.
2083 (znver1_cost): Likewise.
2084 (btver1_cost): Likewise.
2085 (btver2_cost): Likewise.
2086
2087 2018-10-18 H.J. Lu <hongjiu.lu@intel.com>
2088
2089 * simplify-rtx.c (simplify_subreg): Call simplify_gen_subreg
2090 to simplify subreg of vec_merge.
2091
2092 2018-10-18 Richard Biener <rguenther@suse.de>
2093
2094 * config/i386/i386.c: Fix costing of vector FMA.
2095
2096 2018-10-18 Richard Biener <rguenther@suse.de>
2097
2098 * config/i386/i386.c (ix86_vec_cost): Remove !parallel path
2099 and argument.
2100 (ix86_builtin_vectorization_cost): For vec_construct properly
2101 cost insertion into SSE regs.
2102 (...): Adjust calls to ix86_vec_cost.
2103
2104 2018-10-18 Richard Biener <rguenther@suse.de>
2105
2106 PR middle-end/87087
2107 Revert
2108 2018-02-07 Richard Biener <rguenther@suse.de>
2109
2110 PR tree-optimization/84204
2111 * tree-chrec.c (chrec_fold_plus_1): Remove size limiting in
2112 this place.
2113
2114 2018-10-18 H.J. Lu <hongjiu.lu@intel.com>
2115
2116 PR target/87537
2117 * simplify-rtx.c (simplify_subreg): Simplify subreg of vec_merge
2118 of vec_duplicate.
2119 (test_vector_ops_duplicate): Add test for a scalar subreg of a
2120 VEC_MERGE of a VEC_DUPLICATE.
2121
2122 2018-10-17 Joseph Myers <joseph@codesourcery.com>
2123
2124 * doc/cpp.texi (__STDC_VERSION__): Document C2X handling.
2125 * doc/invoke.texi (-std=c2x, -std=gnu2x): Document new options.
2126 * doc/standards.texi (C Language): Document C2X.
2127 * dwarf2out.c (highest_c_language), config/rl78/rl78.c
2128 (rl78_option_override): Handle "GNU C2X" language name.
2129
2130 2018-10-17 Joseph Myers <joseph@codesourcery.com>
2131
2132 * doc/invoke.texi (-std=c17), doc/standards.texi (C Language):
2133 Document C17 as published in 2018.
2134
2135 2018-10-17 Eric Botcazou <ebotcazou@adacore.com>
2136
2137 PR middle-end/87623
2138 * fold-const.c (fold_truth_andor_1): If the right side is not constant,
2139 bail out if both sides do not have the same storage order.
2140
2141 2018-10-17 Aldy Hernandez <aldyh@redhat.com>
2142
2143 * bitmap.c (bitmap_head::dump): New.
2144 * bitmap.h (bitmap_head): Add dump().
2145 * gimple-ssa-evrp-analyze.c
2146 (evrp_range_analyzer::try_find_new_range): Adjust for value_range API.
2147 (evrp_range_analyzer::set_ssa_range_info): Same.
2148 (evrp_range_analyzer::record_ranges_from_phis): Same.
2149 (evrp_range_analyzer::record_ranges_from_stmt): Same.
2150 * gimple-ssa-evrp.c (evrp_dom_walker::before_dom_children): Same.
2151 * gimple-ssa-sprintf.c (get_int_range): Same.
2152 (format_integer): Same.
2153 (sprintf_dom_walker::handle_gimple_call): Same.
2154 * ipa-cp.c (ipcp_vr_lattice::meet_with_1): Same.
2155 (ipcp_vr_lattice::top_p): Same.
2156 (ipcp_vr_lattice::bottom_p): Same.
2157 (ipcp_vr_lattice::set_to_bottom): Same.
2158 (ipa_vr_operation_and_type_effects): Same.
2159 (propagate_vr_across_jump_function): Same.
2160 (ipcp_store_vr_results): Same.
2161 * ipa-prop.c (struct ipa_vr_ggc_hash_traits): Same.
2162 (ipa_print_node_jump_functions_for_edge): Same.
2163 (ipa_get_value_range): Same.
2164 (ipa_compute_jump_functions_for_edge): Same.
2165 (ipa_write_jump_function): Same.
2166 * tree-ssa-dom.c (simplify_stmt_for_jump_threading): Same.
2167 * tree-ssa-threadedge.c (record_temporary_equivalences_from_phis):
2168 Same.
2169 * vr-values.c (set_value_range_to_nonnegative): Same.
2170 (set_value_range_to_truthvalue): Same.
2171 (vr_values::get_value_range): Same.
2172 (vr_values::set_defs_to_varying): Same.
2173 (vr_values::update_value_range): Same.
2174 (symbolic_range_based_on_p): Same.
2175 (vr_values::op_with_boolean_value_range_p): Same.
2176 (vr_values::extract_range_for_var_from_comparison_expr): Same.
2177 (vr_values::extract_range_from_ssa_name): Same.
2178 (vr_values::extract_range_from_binary_expr): Same.
2179 (vr_values::extract_range_from_unary_expr): Same.
2180 (vr_values::extract_range_from_cond_expr): Same.
2181 (vr_values::extract_range_from_comparison): Same.
2182 (vr_values::check_for_binary_op_overflow): Same.
2183 (vr_values::extract_range_basic): Same.
2184 (vr_values::extract_range_from_assignment): Same.
2185 (compare_ranges): Same.
2186 (compare_range_with_value): Same.
2187 (vr_values::adjust_range_with_scev): Same.
2188 (vrp_valueize): Same.
2189 (vrp_valueize_1): Same.
2190 (vr_values::get_vr_for_comparison): Same.
2191 (vr_values::compare_name_with_value): Same.
2192 (vr_values::compare_names): Same.
2193 (vr_values::vrp_evaluate_conditional): Same.
2194 (find_case_label_ranges): Same.
2195 (vr_values::vrp_visit_switch_stmt): Same.
2196 (vr_values::extract_range_from_phi_node): Same.
2197 (vr_values::simplify_div_or_mod_using_ranges): Same.
2198 (vr_values::simplify_bit_ops_using_ranges): Same.
2199 (test_for_singularity): Same.
2200 (range_fits_type_p): Same.
2201 (vr_values::simplify_cond_using_ranges_1): Same.
2202 (vr_values::simplify_switch_using_ranges): Same.
2203 (vr_values::simplify_float_conversion_using_ranges): Same.
2204 (vr_values::two_valued_val_range_p): Same.
2205 (vr_values::add_equivalence): Move to value_range::equiv_add.
2206 * vr-values.h (vr_values::add_equivalence): Remove.
2207 (VR_INITIALIZER): Remove.
2208 * tree-vrp.c (value_range::set): New.
2209 (value_range::equiv_add): New.
2210 (value_range::value_range): New.
2211 (value_range::deep_copy): New.
2212 (value_range::check): New.
2213 (value_range::equal_p): New.
2214 (value_range::ignore_equivs_equal_p): New.
2215 (value_range::operator==): New.
2216 (value_range::operator!=): New.
2217 (value_range::symbolic_p): New.
2218 (value_range::numeric_p): New.
2219 (value_range::set_undefined): New.
2220 (value_range::set_varying): New.
2221 (value_range::may_contain_p): New.
2222 (value_range::equiv_clear): New.
2223 (value_range::singleton_p): New.
2224 (value_range::intersect): New.
2225 (value_range::dump): New.
2226 (value_range::set_and_canonicalize): New.
2227 (set_value_range): Adjust for value_range API.
2228 (set_value_range_to_undefined): Same.
2229 (set_value_range_to_varying): Same.
2230 (set_and_canonicalize_value_range): Same.
2231 (set_value_range_to_nonnull): Same.
2232 (set_value_range_to_null): Same.
2233 (range_is_null): Same.
2234 (range_is_nonnull): Same.
2235 (range_int_cst_p): Same.
2236 (range_int_cst_singleton_p): Same.
2237 (symbolic_range_p): Same.
2238 (range_includes_zero_p): Same.
2239 (value_range_constant_singleton): Same.
2240 (vrp_set_zero_nonzero_bits): Same.
2241 (ranges_from_anti_range): Same.
2242 (extract_range_into_wide_ints): Same.
2243 (extract_range_from_multiplicative_op): Same.
2244 (set_value_range_with_overflow): Same.
2245 (extract_range_from_binary_expr_1): Same.
2246 (extract_range_from_unary_expr): Same.
2247 (dump_value_range): Same.
2248 (debug_value_range): Same.
2249 (vrp_prop::check_array_ref): Same.
2250 (vrp_prop::check_mem_ref): Same.
2251 (vrp_prop::vrp_initialize): Same.
2252 (vrp_prop::visit_stmt): Same.
2253 (intersect_ranges): Same.
2254 (vrp_prop::visit_phi): Same.
2255 (vrp_prop::vrp_finalize): Same.
2256 (determine_value_range_1): Same.
2257 (determine_value_range): Same.
2258 (vrp_intersect_ranges_1): Rename to...
2259 (vrp_intersect_1): this.
2260 (vrp_intersect_ranges): Rename to...
2261 (value_range::intersect_helper): ...this.
2262 (vrp_meet_1): Rename to...
2263 (value_range::union_helper): ...this.
2264 (vrp_meet): Rename to...
2265 (value_range::union_): ...this.
2266 (copy_value_range): Remove.
2267 * tree-vrp.h (struct value_range): Rewrite into a proper class.
2268 (value_range::vrtype): New.
2269 (value_range::type): New.
2270 (value_range::equiv): New.
2271 (value_range::min): New.
2272 (value_range::max): New.
2273 (value_range::varying_p): New.
2274 (value_range::undefined_p): New.
2275 (value_range::null_p): New.
2276 (value_range::equiv_add): New.
2277 (copy_value_range): Remove.
2278
2279 2018-10-17 David Malcolm <dmalcolm@redhat.com>
2280
2281 * Makefile.in (SELFTEST_TARGETS): New.
2282 (selftest) Change from s-selftest-c to $(SELFTEST_TARGETS).
2283 (C_SELFTEST_FLAGS, C_SELFTEST_DEPS, s-selftest-c, selftest-c-gdb)
2284 (selftest-gdb, selftest-c-valgrind, selftest-valgrind): Move to
2285 c/Make-lang.in.
2286 (CPP_SELFTEST_FLAGS, CPP_SELFTEST_DEPS, s-selftest-c++)
2287 (selftest-c++-gdb, selftest-c++-valgrind): Move to
2288 cp/Make-lang.in.
2289 * configure: Regenerate.
2290 * configure.ac (selftest_languages): New.
2291
2292 2018-10-17 Aldy Hernandez <aldyh@redhat.com>
2293
2294 * tree-vrp.c (extract_range_from_multiplicative_op): Remove
2295 overflow wraps argument.
2296 (extract_range_from_binary_expr_1): Do not pass overflow wraps to
2297 wide_int_range_multiplicative_op.
2298 * wide-int-range.cc (wide_int_range_mult_wrapping): Remove
2299 overflow wraps argument.
2300 (wide_int_range_multiplicative_op): Same.
2301 (wide_int_range_lshift): Same.
2302 (wide_int_range_div): Same.
2303 * wide-int-range.h (wide_int_range_multiplicative_op): Same.
2304 (wide_int_range_lshift): Same.
2305 (wide_int_range_div): Same.
2306
2307 2018-10-17 Aldy Hernandez <aldyh@redhat.com>
2308
2309 * wide-int-range.h (wide_int_range_shift_undefined_p): Adjust to
2310 use sign as argument.
2311 * tree-vrp.c (extract_range_from_binary_expr_1): Pass sign to
2312 wide_int_range_shift_undefined_p.
2313
2314 2018-10-16 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
2315
2316 * config/aarch64/aarch64.md (despeculate_copy<ALLI_TI:mode>):
2317 Rename to...
2318 (@despeculate_copy<ALLI_TI:mode>): ... This.
2319 * config/aarch64/aarch64.c (aarch64_speculation_safe_value): Remove
2320 switch statement.
2321
2322 2018-10-16 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2323
2324 * config.gcc: Obsolete *-*-solaris2.10*.
2325 * doc/install.texi (Specific, *-*-solaris2*): Document it.
2326
2327 2018-10-12 Jeff Law <law@redhat.com>
2328
2329 * config/ft32/ft32.md (ft32_general_movsrc_operand): Disable
2330 reg + sym +- const_int addressing modes.
2331
2332 2018-10-15 David Malcolm <dmalcolm@redhat.com>
2333
2334 * common.opt (fdiagnostics-minimum-margin-width=): New option.
2335 * diagnostic-show-locus.c (layout::layout): Apply the minimum
2336 margin width.
2337 (layout::start_annotation_line): Only print up to 3 of the
2338 margin character, to avoid touching the left-hand side.
2339 (selftest::test_diagnostic_show_locus_fixit_lines): Update for
2340 minimum margin width, as set by test_diagnostic_context's ctor.
2341 (selftest::test_fixit_insert_containing_newline): Likewise.
2342 (selftest::test_fixit_insert_containing_newline_2): Likewise.
2343 (selftest::test_line_numbers_multiline_range): Clear
2344 dc.min_margin_width.
2345 * diagnostic.c (diagnostic_initialize): Initialize
2346 min_margin_width.
2347 * diagnostic.h (struct diagnostic_context): Add field
2348 "min_margin_width".
2349 * doc/invoke.texi: Add -fdiagnostics-minimum-margin-width=.
2350 * opts.c (common_handle_option): Handle
2351 OPT_fdiagnostics_minimum_margin_width_.
2352 * selftest-diagnostic.c
2353 (selftest::test_diagnostic_context::test_diagnostic_context):
2354 Initialize min_margin_width to 6.
2355 * toplev.c (general_init): Initialize global_dc->min_margin_width.
2356
2357 2018-10-15 David Malcolm <dmalcolm@redhat.com>
2358
2359 * gcc-rich-location.h (gcc_rich_location::add_location_if_nearby):
2360 Fix usage of "error_at_rich_loc" in the comment.
2361
2362 2018-10-15 Renlin Li <renlin.li@arm.com>
2363
2364 PR target/87563
2365 * tree-vectorizer.c (try_vectorize_loop_1): Don't use
2366 if-conversioned loop when it contains ifn with types not
2367 supported by backend.
2368 * internal-fn.c (expand_direct_optab_fn): Add an assert.
2369 (direct_internal_fn_supported_p): New helper function.
2370 * internal-fn.h (direct_internal_fn_supported_p): Declare.
2371
2372 2018-10-15 Jakub Jelinek <jakub@redhat.com>
2373
2374 PR target/87572
2375 * common/config/i386/i386-common.c (OPTION_MASK_ISA_AVX512F_UNSET):
2376 Remove OPTION_MASK_ISA_AVX5124FMAPS_UNSET and
2377 OPTION_MASK_ISA_AVX5124VNNIW_UNSET.
2378
2379 2018-10-15 Bin Cheng <bin.cheng@linux.alibaba.com>
2380
2381 PR tree-optimization/87022
2382 * tree-loop-distribution.c (pg_add_dependence_edges): Check all
2383 bits in dist vector rather than the first one.
2384
2385 2018-10-15 Richard Biener <rguenther@suse.de>
2386
2387 PR middle-end/87610
2388 * tree-ssa-structalias.c (struct vls_data): Add escaped_p member.
2389 (visit_loadstore): When a used restrict tag escaped verify that
2390 the points-to solution of "other" pointers do not include
2391 escaped.
2392 (compute_dependence_clique): If a used restrict tag escaped
2393 communicated that down to visit_loadstore.
2394
2395 2018-10-15 Andreas Krebbel <krebbel@linux.ibm.com>
2396
2397 * config/s390/s390.c (s390_expand_vec_init): Force vector element
2398 into reg if it isn't a general operand.
2399
2400 2018-10-14 H.J. Lu <hongjiu.lu@intel.com>
2401
2402 PR target/87599
2403 * config/i386/sse.md (*vec_dupv2di): Add register source to
2404 movddup.
2405
2406 2018-10-14 H.J. Lu <hongjiu.lu@intel.com>
2407
2408 PR target/87572
2409 * common/config/i386/i386-common.c (OPTION_MASK_ISA_AVX512F_UNSET):
2410 Add OPTION_MASK_ISA_AVX512IFMA_UNSET,
2411 OPTION_MASK_ISA_AVX5124FMAPS_UNSET and
2412 OPTION_MASK_ISA_AVX5124VNNIW_UNSET.
2413
2414 2018-10-13 Eric Botcazou <ebotcazou@adacore.com>
2415
2416 * dwarf2cfi.c (struct dw_trace_info): Add args_size_defined_for_eh.
2417 (notice_args_size): Set it in the current trace if no insn that can
2418 throw internally has been seen yet.
2419 (connect_traces): When connecting args_size between traces, allow the
2420 incoming values not to match if there is an insn setting it before the
2421 first insn that can throw internally; in that case, force the creation
2422 of a CFI note on this latter insn.
2423
2424 2018-10-13 Jonathan Wakely <jwakely@redhat.com>
2425
2426 * opt-problem.h (opt_wrapper): Use template-argument-list when naming
2427 the base class, because using the injected-class-name was not clearly
2428 specified until DR 176.
2429
2430 2018-10-12 Paul Koning <ni1d@arrl.net>
2431
2432 * config/pdp11/pdp11.md (doloop_end): New expander.
2433 (doloop_end_insn): renamed from "doloop_end".
2434 (addqi3): New pattern.
2435 (subqi3): New pattern.
2436 * config/pdp11/predicates.md (incdec_operand): New predicate.
2437
2438 2018-10-12 Yury Gribov <tetra2005@gmail.com>
2439
2440 PR middle-end/81376
2441 * real.c (format_helper::can_represent_integral_type_p): New function
2442 * real.h (format_helper::can_represent_integral_type_p): Ditto.
2443 * match.pd: New pattern.
2444
2445 2018-10-12 Alexandre Oliva <oliva@adacore.com>
2446
2447 * configure.ac: Introduce --enable-large-address-aware
2448 to define MINGW_DEFAULT_LARGE_ADDR_AWARE.
2449 * doc/install.texi: Document it.
2450 * configure, config.in: Rebuilt.
2451 * config/i386/mingw32.h (LINK_SPEC_LARGE_ADDR_AWARE): Define,
2452 based on MINGW_DEFAULT_LARGE_ADDR_AWARE.
2453 (LINK_SPEC): Insert it.
2454 * config/i386/mingw-w64.h: Likewise.
2455
2456 * cygming.h (HAVE_GAS_ALIGNED_COMM): Fallback-define.
2457
2458 2018-10-12 Peter Bergner <bergner@linux.ibm.com>
2459
2460 PR rtl-optimization/87600
2461 * ira-lives (non_conflicting_reg_copy_p): Disable for non LRA targets.
2462
2463 2018-10-12 Paul Koning <ni1d@arrl.net>
2464
2465 * doc/md.texi (doloop_end): Document that the pattern code may
2466 need to check operand mode.
2467
2468 2018-10-12 Wilco Dijkstra <wdijkstr@arm.com>
2469
2470 * config/aarch64/aarch64.md (zero_extendsidi2_aarch64): Add alternatives
2471 to zero-extend between int and floating-point registers.
2472 (load_pair_zero_extendsidi2_aarch64): Add alternative for zero-extended
2473 ldp into floating-point registers. Add type and arch attributes.
2474 (zero_extend<SHORT:mode><GPI:mode>2_aarch64): Add arch attribute.
2475 Use f_loads for type attribute.
2476
2477 2018-10-11 Martin Sebor <msebor@redhat.com>
2478
2479 * doc/extend.texi (attribute packed): Correct typos.
2480
2481 2018-10-11 Martin Sebor <msebor@redhat.com>
2482
2483 * doc/extend.texi (attribute flatten): Mention interaction with
2484 noinline.
2485
2486 2018-10-11 Jan Hubicka <hubicka@ucw.cz>
2487
2488 PR target/87156
2489 * cgraphclones.c (cgraph_node::create_version_clone_with_body):
2490 Set new_decl virtual flag to zero.
2491
2492 2018-10-11 Martin Sebor <msebor@redhat.com>
2493
2494 PR middle-end/87593
2495 * doc/extend.texi (attribute format_arg): Discuss using multiple
2496 attributes on a single function.
2497
2498 2018-10-11 Giuliano Belinassi <giuliano.belinassi@usp.br>
2499
2500 PR tree-optimization/86829
2501 * match.pd (sin (atan (x))): New simplification rules.
2502 (cos (atan (x))): Likewise.
2503 * real.c (build_sinatan_real): New function.
2504 * real.h (build_sinatan_real): Prototype.
2505
2506 2018-10-11 Will Schmidt <will_schmidt@vnet.ibm.com>
2507
2508 * config/rs6000/rs6000.c (map_to_integral_tree_type): New helper
2509 function.
2510 (fold_mergeeo_helper): New helper function.
2511 (rs6000_gimple_fold_builtin): Add hooks for vec_mergee and vec_mergeo
2512 intrinsics. Correct some whitespace indentation issues.
2513
2514 2018-10-11 Wilco Dijkstra <wdijkstr@arm.com>
2515
2516 PR target/87511
2517 * config/aarch64/aarch64.c (aarch64_mask_and_shift_for_ubfiz_p):
2518 Use HOST_WIDE_INT_1U for shift.
2519
2520 2018-10-11 Doug Rupp <rupp@adacore.com>
2521 Olivier Hainque <hainque@adacore.com>
2522
2523 * config/rs6000/vxworks.h (VXWORKS_RELAX_LINK_SPEC): New macro.
2524 Pass --relax to the linker for RTPs.
2525 (LINK_SPEC): Append VXWORKS_RELAX_LINK_SPEC.
2526
2527 2018-10-11 Andrew Stubbs <ams@codesourcery.com>
2528 Jan Hubicka <jh@suse.cz>
2529 Martin Jambor <mjambor@suse.cz>
2530
2531 * print-rtl.c (print_rtx_operand_codes_E_and_V): Print how many times
2532 the same elements are repeated rather than printing all of them.
2533 * read-rtl.c (rtx_reader::read_rtx_operand): Recognize and expand
2534 "repeated" elements.
2535 * read-rtl-function.c (test_loading_repeat): New function.
2536 (read_rtl_function_c_tests): Call test_loading_repeat.
2537 * rtl-tests.c (test_dumping_repeat): New function.
2538 (rtl_tests_c_tests): Call test_dumping_repeat.
2539
2540 2018-10-11 Richard Biener <rguenther@suse.de>
2541
2542 * config/i386/x86-tune-costs.h (bdver?_memcpy, bdver?_memset,
2543 bdver?_cost): Unify to ...
2544 (bdver_memcpy, bdver_memset, bdver_cost): ... this.
2545 * config/i386/i386.c (processor_cost_table): Adjust.
2546
2547 2018-10-10 Eric Botcazou <ebotcazou@adacore.com>
2548
2549 PR middle-end/87574
2550 * cgraphunit.c (cgraph_node::expand_thunk): Force DECL_IGNORED_P on
2551 the thunk when expanding to GIMPLE.
2552
2553 2018-10-10 Bernd Edlinger <bernd.edlinger@hotmail.de>
2554
2555 * varasm.c (mergeable_string_section): Don't try to move zero-length
2556 strings to the merge section.
2557
2558 2018-10-10 Uros Bizjak <ubizjak@gmail.com>
2559
2560 PR target/87573
2561 * config/i386/mmx.md (const_vector 0 -> mem splitter): New splitter.
2562
2563 2018-10-10 Jakub Jelinek <jakub@redhat.com>
2564
2565 PR target/87550
2566 * config/i386/i386-builtin.def (IX86_BUILTIN_RDPMC): Move from args set
2567 to special_args set.
2568
2569 2018-10-10 Richard Biener <rguenther@suse.de>
2570
2571 * config/i386/sse.md (reduc_plus_scal_v8df, reduc_plus_scal_v4df,
2572 reduc_plus_scal_v2df, reduc_plus_scal_v16sf, reduc_plus_scal_v8sf,
2573 reduc_plus_scal_v4sf): Merge into pattern reducing to half width
2574 and recursing and pattern terminating the recursion on SSE
2575 vector width using ix86_expand_reduc.
2576 (reduc_sminmax_scal_<mode>): Split into part reducing to half
2577 width and recursing and SSE2 vector variant doing the final
2578 reduction with ix86_expand_reduc.
2579 (reduc_uminmax_scal_<mode>): Likewise for the AVX512 variants
2580 with terminating the recursion at AVX level, splitting that
2581 to SSE there.
2582
2583 2018-10-09 David Malcolm <dmalcolm@redhat.com>
2584
2585 * genmatch.c (error_cb): Rename to...
2586 (diagnostic_cb): ...this, converting int params to enums.
2587 (fatal_at): Update for renaming.
2588 (warning_at): Likewise.
2589 (main): Likewise.
2590 * input.c (selftest::ebcdic_execution_charset::apply):
2591 Update for renaming of...
2592 (selftest::ebcdic_execution_charset::on_error): ...this, renaming
2593 to...
2594 (selftest::ebcdic_execution_charset::on_diagnostic): ...this,
2595 converting level and reason to enums.
2596 (class selftest::lexer_error_sink): Rename to...
2597 (class selftest::lexer_test_options): ...this, renaming field
2598 "m_errors" to "m_diagnostics".
2599 (selftest::lexer_test_options::apply): Update for renaming of...
2600 (selftest::lexer_test_options::on_error): ...this, renaming to...
2601 (selftest::lexer_test_options::on_diagnostic): ...this
2602 converting level and reason to enums.
2603 (selftest::test_lexer_string_locations_raw_string_unterminated):
2604 Update for renamings.
2605 * opth-gen.awk (struct cpp_reason_option_codes_t): Use enum for
2606 "reason".
2607
2608 2018-10-09 Paul A. Clarke <pc@us.ibm.com>
2609
2610 * config.gcc (powerpc*-*-*): Add pmmintrin.h to extra_headers.
2611 * config/rs6000/pmmintrin.h: New file.
2612
2613 2018-10-09 Eric Botcazou <ebotcazou@adacore.com>
2614
2615 PR tree-optimization/86659
2616 * gimple-match.h (gimple_match_op constructors): Initialize reverse.
2617
2618 2018-10-09 Richard Biener <rguenther@suse.de>
2619
2620 PR tree-optimization/63155
2621 * tree-ssa-structalias.c: Include tree-ssa.h.
2622 (get_constraint_for_ssa_var): For undefs return nothing_id.
2623 (find_func_aliases): Cleanup PHI handling.
2624
2625 2018-10-09 Richard Biener <rguenther@suse.de>
2626
2627 * tree-vectorizer.c (dump_stmt_cost): Fix cut&paste missing
2628 replacements.
2629
2630 2018-10-09 Martin Liska <mliska@suse.cz>
2631
2632 * asan.c (asan_emit_stack_protection): If a stack variable
2633 is located in a same file as current function, then emit
2634 line info into variable definition string.
2635
2636 2018-10-08 Eric Botcazou <ebotcazou@adacore.com>
2637
2638 * print-rtl.c (rtx_writer::print_rtx_operand_code_i): Print column
2639 information.
2640
2641 2018-10-08 Eric Botcazou <ebotcazou@adacore.com>
2642
2643 * cgraphunit.c (cgraph_node::expand_thunk): Do not force DECL_IGNORED_P
2644 on the thunk.
2645
2646 2018-10-08 Eric Botcazou <ebotcazou@adacore.com>
2647
2648 PR tree-optimization/86659
2649 * gimple-match.h (struct gimple_match_op): Add reverse field.
2650 (gimple_match_op::set_op): New overloaded method.
2651 * gimple-match-head.c (maybe_build_generic_op) <BIT_FIELD_REF>: Set
2652 the REF_REVERSE_STORAGE_ORDER flag on the value.
2653 (gimple_simplify) <GIMPLE_ASSIGN>: For BIT_FIELD_REF, propagate the
2654 REF_REVERSE_STORAGE_ORDER flag and avoid simplifying if it is set.
2655
2656 2018-10-08 Richard Sandiford <richard.sandiford@arm.com>
2657
2658 PR middle-end/63155
2659 * gimple-ssa-backprop.c (backprop::intersect_uses): Use
2660 FOR_EACH_IMM_USE_FAST instead of FOR_EACH_IMM_USE_STMT.
2661
2662 2018-10-08 H.J. Lu <hongjiu.lu@intel.com>
2663
2664 PR target/87517
2665 * config/i386/avx512fintrin.h (_mm512_mask_fmaddsub_round_pd):
2666 Defined with __builtin_ia32_vfmaddsubpd512_mask.
2667
2668 2018-10-08 Richard Biener <rguenther@suse.de>
2669
2670 * config/i386/x86-tune-costs.h (znver1_cost): Make AVX256 vector loads
2671 cost the same as AVX128 ones.
2672
2673 2018-10-08 Paul Koning <ni1d@arrl.net>
2674
2675 * config/pdp11/pdp11-protos.h (output_block_move): Remove.
2676 (expand_block_move): New function.
2677 * config/pdp11/pdp11.c (output_block_move): Remove.
2678 (expand_block_move): New function.
2679 * config/pdp11/pdp11.h (MOVE_RATIO): New definition.
2680 * config/pdp11/pdp11.md (movmemhi): Use expand_block_move.
2681 (*movmemhi1): Remove.
2682
2683 2018-10-08 Robin Dapp <rdapp@linux.ibm.com>
2684
2685 * config/s390/2827.md: Increase latencies for some FP instructions.
2686
2687 2018-10-08 Richard Biener <rguenther@suse.de>
2688
2689 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost):
2690 Open a dump scope.
2691 * tree-vectorizer.c (dump_stmt_cost): Add cost param and dump it.
2692 * tree-vectorizer.h (dump_stmt_cost): Adjust.
2693 (add_stmt_cost): Dump return value of the hook.
2694
2695 2018-10-08 Richard Biener <rguenther@suse.de>
2696
2697 PR tree-optimization/63155
2698 * tree-ssa-propagate.c (add_ssa_edge): Do cheap check first.
2699 (ssa_propagation_engine::ssa_propagate): Remove redundant
2700 bitmap bit clearing.
2701
2702 2018-10-05 Peter Bergner <bergner@linux.ibm.com>
2703
2704 PR rtl-optimization/86939
2705 PR rtl-optimization/87479
2706 * ira.h (non_conflicting_reg_copy_p): New prototype.
2707 * ira-lives.c (ignore_reg_for_conflicts): New static variable.
2708 (make_hard_regno_dead): Don't add conflicts for register
2709 ignore_reg_for_conflicts.
2710 (make_object_dead): Likewise.
2711 (non_conflicting_reg_copy_p): New function.
2712 (process_bb_node_lives): Set ignore_reg_for_conflicts for copies.
2713 Remove special conflict handling of REAL_PIC_OFFSET_TABLE_REGNUM.
2714 * lra-lives.c (ignore_reg_for_conflicts): New static variable.
2715 (make_hard_regno_dead): Don't add conflicts for register
2716 ignore_reg_for_conflicts. Remove special conflict handling of
2717 REAL_PIC_OFFSET_TABLE_REGNUM. Remove now unused argument
2718 check_pic_pseudo_p and update callers.
2719 (mark_pseudo_dead): Don't add conflicts for register
2720 ignore_reg_for_conflicts.
2721 (process_bb_lives): Set ignore_reg_for_conflicts for copies.
2722
2723 2018-10-05 Andrew Waterman <andrew@sifive.com>
2724 Jim Wilson <jimw@sifive.com>
2725
2726 * config/riscv/riscv.md (f<quiet_pattern>_quiet<ANYF:mode><X:mode>4):
2727 Add define_expand. Add ! HONOR_SNANS check to current pattern. Add
2728 new pattern using HONOR_SNANS that emits one extra instruction.
2729
2730 2018-10-05 Segher Boessenkool <segher@kernel.crashing.org>
2731
2732 * config/rs6000/rs6000.md (unnamed mfcr scc_comparison_operator
2733 patterns): Merge SI and DI patterns to a GPR pattern.
2734 (unnamed define_insn and define_split for record form of that): Merge
2735 to a single define_insn_and_split pattern.
2736
2737 2018-10-05 David Malcolm <dmalcolm@redhat.com>
2738
2739 PR c++/56856
2740 * input.c (expand_location_to_spelling_point): Add param "aspect"
2741 and use rather than hardcoding LOCATION_ASPECT_CARET.
2742 (get_substring_ranges_for_loc): Handle the case of a single token
2743 within a macro expansion.
2744 * input.h (expand_location_to_spelling_point): Add "aspect" param,
2745 defaulting to LOCATION_ASPECT_CARET.
2746
2747 2018-10-05 Paul Koning <ni1d@arrl.net>
2748
2749 * config/pdp11/pdp11.c (TARGET_CXX_GUARD_TYPE): Define.
2750 (TARGET_CXX_CLASS_DATA_ALWAYS_COMDAT): Define.
2751 (TARGET_CXX_LIBRARY_RTTI_COMDAT): Define.
2752 (pdp11_guard_type): New function.
2753
2754 2018-10-05 Paul Koning <ni1d@arrl.net>
2755
2756 * config/pdp11/pdp11.h (FLOAT_TYPE_SIZE): Always 32.
2757 * config/pdp11/pdp11.opt (mfloat32): Remove.
2758 (mfloat64): Remove.
2759 * doc/invoke.texi (pdp11 -mfloat32): Remove:
2760 (pdp11 -mfloat64): Remove.
2761
2762 2018-10-05 Uros Bizjak <ubizjak@gmail.com>
2763
2764 * config/i386/i386.md (*cmpxf_cc_i387): Remove pattern.
2765 (*cmp<mode>_cc_i387): Ditto.
2766 (*cmpu<mode>_cc_i387): Ditto.
2767 (*cmp<X87MODEF:mode>_<SWI24:mode>_cc_i387): Ditto.
2768 * config/i386/i386.c (ix86_expand_fp_compare): Remove
2769 "scratch" argument.
2770 <case IX86_FPCMP_SAHF>: Do not generate pattern with HImode clobber.
2771 Emit x86_sahf_1 pattern.
2772 (ix86_expand_compare): Update call to ix86_expand_fp_compare.
2773 (ix86_expand_carry_flag_compare): Ditto.
2774
2775 2018-10-05 Uros Bizjak <ubizjak@gmail.com>
2776
2777 * config/i386/i386.md (*cmpxf_i387): Change operand 2 predicate
2778 to reg_or_0_operand. Add "C" constraint.
2779 (*cmpxf_cc_i387): Ditto.
2780 (*cmp<mode>_i387): Change operand 2 predicate
2781 to nonimm_or_0_operand. Add "C" constraint.
2782 (*cmp<mode>_cc_i387): Ditto.
2783 (*cmp<mode>_0_i387): Remove insn pattern.
2784 (*cmp<mode>_0_cc_i387): Ditto.
2785
2786 2018-10-05 Uros Bizjak <ubizjak@gmail.com>
2787
2788 * config/i386/constraints.md ("C"): Do not depend on TARGET_SSE.
2789 * config/i386/predicates.md (nonimm_or_0_operand): Rename
2790 from vector_move_operand. Update all uses.
2791
2792 2018-10-05 Martin Sebor <msebor@redhat.com>
2793
2794 PR tree-optimization/87490
2795 * builtins.c (expand_builtin_strnlen): Handle a null data.decl
2796 consistently.
2797
2798 2018-10-05 Richard Biener <rguenther@suse.de>
2799
2800 PR tree-optimization/63155
2801 * tree-ssa-ccp.c (ccp_propagate::visit_phi): Avoid excess
2802 vertical space in dumpfiles.
2803 * tree-ssa-propagate.h
2804 (ssa_propagation_engine::process_ssa_edge_worklist): Remove.
2805 * tree-ssa-propagate.c (cfg_blocks_back): New global.
2806 (ssa_edge_worklist_back): Likewise.
2807 (curr_order): Likewise.
2808 (cfg_blocks_get): Remove abstraction.
2809 (cfg_blocks_add): Likewise.
2810 (cfg_blocks_empty_p): Likewise.
2811 (add_ssa_edge): Add to current or next worklist based on
2812 RPO index.
2813 (add_control_edge): Likewise.
2814 (ssa_propagation_engine::process_ssa_edge_worklist): Fold
2815 into ...
2816 (ssa_propagation_engine::ssa_propagate): ... here. Unify
2817 iteration from CFG and SSA edge worklist so we process
2818 everything in RPO order, prioritizing forward progress
2819 over iteration.
2820 (ssa_prop_init): Allocate new worklists, do not dump
2821 immediate uses.
2822 (ssa_prop_fini): Free new worklists.
2823
2824 2018-10-05 Richard Biener <rguenther@suse.de>
2825
2826 * tree-core.h (tree_block::abstract_flag): Remove.
2827 (tree_block::block_num): Make full 32bits.
2828 * tree.def (BLOCK): Remove docs about BLOCK_ABSTRACT.
2829 * tree.h (BLOCK_ABSTRACT): Remove.
2830 * dwarf2out.c (gen_lexical_block_die): Remove dead code
2831 resulting from BLOCK_ABSTRACT being always false.
2832 (gen_inlined_subroutine_die): Likewise.
2833 (gen_block_die): Likewise.
2834 * tree.c (block_ultimate_origin): Likewise.
2835 * tree-pretty-print.c (dump_block_node): Remove code dealing
2836 with BLOCK_ABSTRACT.
2837 * tree-ssa-live.c (dump_scope_block): Likewise.
2838 * tree-streamer-in.c (unpack_ts_block_value_fields): Likewise.
2839 * tree-streamer-out.c (pack_ts_block_value_fields): Likewise.
2840
2841 2018-10-05 Richard Biener <rguenther@suse.de>
2842
2843 * config/i386/i386.c (ix86_add_stmt_cost): When scalar cost
2844 is asked for initialize mode to the component mode of the
2845 vector type.
2846
2847 2018-10-05 H.J. Lu <hongjiu.lu@intel.com>
2848
2849 PR target/87522
2850 * config/i386/gnu-user.h (ASM_SPEC): Don't pass -msse2avx to
2851 assembler for -mavx.
2852 * config/i386/gnu-user64.h (ASM_SPEC): Likewise.
2853
2854 2018-10-05 Segher Boessenkool <segher@kernel.crashing.org>
2855
2856 PR target/87509
2857 * config/rs6000/rs6000-builtin.def (RS6000_BUILTIN_SET_FPSCR_DRN): Use
2858 RS6000_BTM_DFP.
2859 * config/rs6000/rs6000.md (rs6000_set_fpscr_rn): Require the operand
2860 to be DImode. When using mffscrn, force the operand to a register.
2861
2862 2018-10-04 Uros Bizjak <ubizjak@gmail.com>
2863
2864 * config/i386/i386.md (*fop_<X87MODEF:mode>_2_i387): Macroize insn
2865 from *fop_<MODEF:mode>_2_i387 and *fop_xf_2_i387 using
2866 X87MODEF mode iterator.
2867 (*fop_<X87MODEF:mode>_3_i387): Macroize insn from
2868 *fop_<MODEF:mode>_3_i387 and *fop_xf_3_i387 using
2869 X87MODEF mode iterator.
2870
2871 2018-10-04 Vinay Kumar <vinay.kumar@blackfigtech.com>
2872
2873 * doc/invoke.texi (-Wno-prio-ctor-dtor): Document new warning
2874 -Wno-prio-ctor-dtor.
2875
2876 2018-10-04 David Malcolm <dmalcolm@redhat.com>
2877
2878 * Makefile.in (OBJS): Add opt-problem.o.
2879 * dump-context.h: Include "selftest.h.
2880 (selftest::temp_dump_context): New forward decl.
2881 (class dump_context): Make friend of class
2882 selftest::temp_dump_context.
2883 (dump_context::dump_loc_immediate): New decl.
2884 (class dump_pretty_printer): Move here from dumpfile.c.
2885 (class temp_dump_context): Move to namespace selftest.
2886 (temp_dump_context::temp_dump_context): Add param
2887 "forcibly_enable_dumping".
2888 (selftest::verify_dumped_text):
2889 (ASSERT_DUMPED_TEXT_EQ): Move here from dumpfile.c.
2890 (selftest::verify_item):
2891 (ASSERT_IS_TEXT): Move here from dumpfile.c.
2892 (ASSERT_IS_TREE): Likewise.
2893 (ASSERT_IS_GIMPLE): Likewise.
2894 * dumpfile.c (dump_context::dump_loc): Move immediate dumping
2895 to...
2896 (dump_context::dump_loc_immediate): ...this new function.
2897 (class dump_pretty_printer): Move to dump-context.h.
2898 (dump_switch_p_1): Don't enable MSG_PRIORITY_REEMITTED.
2899 (opt_info_switch_p_1): Enable MSG_PRIORITY_REEMITTED.
2900 (temp_dump_context::temp_dump_context): Move to "selftest"
2901 namespace. Add param "forcibly_enable_dumping", and use it to
2902 conditionalize the use of m_pp;
2903 (selftest::verify_dumped_text): Make non-static.
2904 (ASSERT_DUMPED_TEXT_EQ): Move to dump-context.h.
2905 (selftest::verify_item): Make non-static.
2906 (ASSERT_IS_TEXT): Move to dump-context.h.
2907 (ASSERT_IS_TREE): Likewise.
2908 (ASSERT_IS_GIMPLE): Likewise.
2909 (selftest::test_capture_of_dump_calls): Pass "true" for new
2910 param of temp_dump_context.
2911 * dumpfile.h (enum dump_flag): Add MSG_PRIORITY_REEMITTED, adding
2912 it to MSG_ALL_PRIORITIES. Update values of TDF_COMPARE_DEBUG and
2913 TDF_COMPARE_DEBUG.
2914 * opt-problem.cc: New file.
2915 * opt-problem.h: New file.
2916 * optinfo-emit-json.cc
2917 (selftest::test_building_json_from_dump_calls): Pass "true" for
2918 new param of temp_dump_context.
2919 * optinfo.cc (optinfo_kind_to_dump_flag): New function.
2920 (optinfo::emit_for_opt_problem): New function.
2921 (optinfo::emit): Clarity which emit_item is used.
2922 * optinfo.h (optinfo::get_dump_location): New accessor.
2923 (optinfo::emit_for_opt_problem): New decl.
2924 (optinfo::emit): Make const.
2925 * selftest-run-tests.c (selftest::run_tests): Call
2926 selftest::opt_problem_cc_tests.
2927 * selftest.h (selftest::opt_problem_cc_tests): New decl.
2928 * tree-data-ref.c (dr_analyze_innermost): Convert return type from
2929 bool to opt_result, converting fprintf messages to
2930 opt_result::failure_at calls. Add "stmt" param for use by the
2931 failure_at calls.
2932 (create_data_ref): Pass "stmt" to the dr_analyze_innermost call.
2933 (runtime_alias_check_p): Convert return type from bool to
2934 opt_result, converting dump_printf calls to
2935 opt_result::failure_at, using the statement DDR_A for their
2936 location.
2937 (find_data_references_in_stmt): Convert return type from bool to
2938 opt_result, converting "return false" to opt_result::failure_at
2939 with a new message.
2940 * tree-data-ref.h: Include "opt-problem.h".
2941 (dr_analyze_innermost): Convert return type from bool to opt_result,
2942 and add a const gimple * param.
2943 (find_data_references_in_stmt): Convert return type from bool to
2944 opt_result.
2945 (runtime_alias_check_p): Likewise.
2946 * tree-predcom.c (find_looparound_phi): Pass "init_stmt" to
2947 dr_analyze_innermost.
2948 * tree-vect-data-refs.c (vect_mark_for_runtime_alias_test):
2949 Convert return type from bool to opt_result, adding a message for
2950 the PARAM_VECT_MAX_VERSION_FOR_ALIAS_CHECKS zero case.
2951 (vect_analyze_data_ref_dependence): Convert return type from bool
2952 to opt_result. Change sense of return type from "false"
2953 effectively meaning "no problems" to "false" meaning a problem,
2954 so that "return false" becomes "return opt_result::success".
2955 Convert "return true" calls to opt_result::failure_at, using
2956 the location of statement A rather than vect_location.
2957 (vect_analyze_data_ref_dependences): Convert return type from bool
2958 to opt_result.
2959 (verify_data_ref_alignment): Likewise, converting dump_printf_loc
2960 calls to opt_result::failure_at, using the stmt location rather
2961 than vect_location.
2962 (vect_verify_datarefs_alignment): Convert return type from bool
2963 to opt_result.
2964 (vect_enhance_data_refs_alignment): Likewise. Split local "stat"
2965 into multiple more-tightly-scoped copies.
2966 (vect_analyze_data_refs_alignment): Convert return type from bool
2967 to opt_result.
2968 (vect_analyze_data_ref_accesses): Likewise, converting a
2969 "return false" to a "return opt_result::failure_at", adding a
2970 new message.
2971 (vect_prune_runtime_alias_test_list): Convert return type from
2972 bool to opt_result, converting dump_printf_loc to
2973 opt_result::failure_at. Add a %G to show the pertinent statement,
2974 and use the stmt's location rather than vect_location.
2975 (vect_find_stmt_data_reference): Convert return type from
2976 bool to opt_result, converting dump_printf_loc to
2977 opt_result::failure_at, using stmt's location.
2978 (vect_analyze_data_refs): Convert return type from bool to
2979 opt_result. Convert "return false" to "return
2980 opt_result::failure_at", adding messages as needed.
2981 * tree-vect-loop.c (vect_determine_vf_for_stmt_1): Convert return
2982 type from bool to opt_result.
2983 (vect_determine_vf_for_stmt): Likewise.
2984 (vect_determine_vectorization_factor): Likewise, converting
2985 dump_printf_loc to opt_result::failure_at, using location of phi
2986 rather than vect_location.
2987 (vect_analyze_loop_form_1): Convert return type from bool to
2988 opt_result, converting dump_printf_loc calls, retaining the use of
2989 vect_location.
2990 (vect_analyze_loop_form): Convert return type from loop_vec_info
2991 to opt_loop_vec_info.
2992 (vect_analyze_loop_operations): Convert return type from bool to
2993 opt_result, converting dump_printf_loc calls, using the location
2994 of phi/stmt rather than vect_location where available. Convert
2995 various "return false" to "return opt_result::failure_at" with
2996 "unsupported phi" messages.
2997 (vect_get_datarefs_in_loop): Convert return type from bool to
2998 opt_result. Add a message for the
2999 PARAM_LOOP_MAX_DATAREFS_FOR_DATADEPS failure.
3000 (vect_analyze_loop_2): Convert return type from bool to
3001 opt_result. Ensure "ok" is set to a opt_result::failure_at before
3002 each "goto again;", adding new messages where needed.
3003 Add "unsupported grouped {store|load}" messages.
3004 (vect_analyze_loop): Convert return type from loop_vec_info to
3005 opt_loop_vec_info.
3006 * tree-vect-slp.c (vect_analyze_slp): Convert return type from
3007 bool to opt_result.
3008 * tree-vect-stmts.c (process_use): Likewise, converting
3009 dump_printf_loc call and using stmt location, rather than
3010 vect_location.
3011 (vect_mark_stmts_to_be_vectorized): Likeise.
3012 (vect_analyze_stmt): Likewise, adding a %G.
3013 (vect_get_vector_types_for_stmt): Convert return type from bool to
3014 opt_result, converting dump_printf_loc calls and using stmt
3015 location, rather than vect_location.
3016 (vect_get_mask_type_for_stmt): Convert return type from tree to
3017 opt_tree, converting dump_printf_loc calls and using stmt location.
3018 * tree-vectorizer.c: Include "opt-problem.h.
3019 (try_vectorize_loop_1): Flag "Analyzing loop at" dump message as
3020 MSG_PRIORITY_INTERNALS. Convert local "loop_vinfo" from
3021 loop_vec_info to opt_loop_vec_info. If if fails, and dumping is
3022 enabled, use it to report at the top level "couldn't vectorize
3023 loop" followed by the problem.
3024 * tree-vectorizer.h (opt_loop_vec_info): New typedef.
3025 (vect_mark_stmts_to_be_vectorized): Convert return type from bool
3026 to opt_result.
3027 (vect_analyze_stmt): Likewise.
3028 (vect_get_vector_types_for_stmt): Likewise.
3029 (tree vect_get_mask_type_for_stmt): Likewise.
3030 (vect_analyze_data_ref_dependences): Likewise.
3031 (vect_enhance_data_refs_alignment): Likewise.
3032 (vect_analyze_data_refs_alignment): Likewise.
3033 (vect_verify_datarefs_alignment): Likewise.
3034 (vect_analyze_data_ref_accesses): Likewise.
3035 (vect_prune_runtime_alias_test_list): Likewise.
3036 (vect_find_stmt_data_reference): Likewise.
3037 (vect_analyze_data_refs): Likewise.
3038 (vect_analyze_loop): Convert return type from loop_vec_info to
3039 opt_loop_vec_info.
3040 (vect_analyze_loop_form): Likewise.
3041 (vect_analyze_slp): Convert return type from bool to opt_result.
3042
3043 2018-10-04 David Malcolm <dmalcolm@redhat.com>
3044
3045 * doc/invoke.texi (-fopt-info): Document new "internals"
3046 sub-option.
3047 * dump-context.h (dump_context::apply_dump_filter_p): New decl.
3048 * dumpfile.c (dump_options): Update for renaming of MSG_ALL to
3049 MSG_ALL_KINDS.
3050 (optinfo_verbosity_options): Add "internals".
3051 (kind_as_string): Update for renaming of MSG_ALL to MSG_ALL_KINDS.
3052 (dump_context::apply_dump_filter_p): New member function.
3053 (dump_context::dump_loc): Use apply_dump_filter_p rather than
3054 explicitly masking the dump_kind.
3055 (dump_context::begin_scope): Increment the scope depth first. Use
3056 apply_dump_filter_p rather than explicitly masking the dump_kind.
3057 (dump_context::emit_item): Use apply_dump_filter_p rather than
3058 explicitly masking the dump_kind.
3059 (dump_dec): Likewise.
3060 (dump_hex): Likewise.
3061 (dump_switch_p_1): Default to MSG_ALL_PRIORITIES.
3062 (opt_info_switch_p_1): Default to MSG_PRIORITY_USER_FACING.
3063 (opt_info_switch_p): Update handling of default
3064 MSG_OPTIMIZED_LOCATIONS to cope with default of
3065 MSG_PRIORITY_USER_FACING.
3066 (dump_basic_block): Use apply_dump_filter_p rather than explicitly
3067 masking the dump_kind.
3068 (selftest::test_capture_of_dump_calls): Update test_dump_context
3069 instances to use MSG_ALL_KINDS | MSG_PRIORITY_USER_FACING rather
3070 than MSG_ALL. Generalize scope test to be run at all four
3071 combinations of with/without MSG_PRIORITY_USER_FACING and
3072 MSG_PRIORITY_INTERNALS, adding examples of explicit priority
3073 for each of the two values.
3074 * dumpfile.h (enum dump_flag): Add comment about the MSG_* flags.
3075 Rename MSG_ALL to MSG_ALL_KINDS. Add MSG_PRIORITY_USER_FACING,
3076 MSG_PRIORITY_INTERNALS, and MSG_ALL_PRIORITIES, updating the
3077 values for TDF_COMPARE_DEBUG and TDF_ALL_VALUES.
3078 (AUTO_DUMP_SCOPE): Add a note to the comment about the interaction
3079 with MSG_PRIORITY_*.
3080 * tree-vect-loop-manip.c (vect_loop_versioning): Mark versioning
3081 dump messages as MSG_PRIORITY_USER_FACING.
3082 * tree-vectorizer.h (DUMP_VECT_SCOPE): Add a note to the comment
3083 about the interaction with MSG_PRIORITY_*.
3084
3085 2018-10-04 Bernd Edlinger <bernd.edlinger@hotmail.de>
3086
3087 * varasm.c (output_constant): Add new parameter merge_strings.
3088 Make strings properly zero terminated in merge string sections.
3089 (mergeable_string_section): Don't fail if the last char is non-zero.
3090 (assemble_variable_contents): Handle merge string sections.
3091 (assemble_variable): Likewise.
3092 (assemble_constant_contents): Likewise.
3093 (output_constant_def_contents): Likewise.
3094 (output_constructor_array_range,
3095 output_constructor_regular_field): Adjust call to output_constant.
3096 (output_object_block): Adjust call to assemble_constant_contents
3097 and assemble_variable_contents.
3098
3099 2018-10-04 Martin Liska <mliska@suse.cz>
3100
3101 PR c/87483
3102 * cgraphunit.c (process_function_and_variable_attributes):
3103 Warn about a function with alias attribute and a body.
3104
3105 2018-10-04 Martin Liska <mliska@suse.cz>
3106
3107 PR ipa/82625
3108 * multiple_target.c (redirect_to_specific_clone): New function.
3109 (ipa_target_clone): Use it.
3110 * tree-inline.c: Fix comment.
3111
3112 2018-10-04 David Malcolm <dmalcolm@redhat.com>
3113
3114 * dumpfile.c (gcc::dump_manager::dump_manager): Initialize new
3115 fields.
3116 (gcc::dump_manager::~dump_manager): Free m_optinfo_filename.
3117 (gcc::dump_manager::register_pass): New member function, adapted
3118 from loop body in gcc::pass_manager::register_pass, adding a
3119 call to update_dfi_for_opt_info.
3120 (gcc::dump_manager::opt_info_enable_passes): Store the
3121 -fopt-info options into the new fields. Move the loop
3122 bodies into...
3123 (gcc::dump_manager::update_dfi_for_opt_info): ...this new member
3124 function.
3125 * dumpfile.h (struct opt_pass): New forward decl.
3126 (gcc::dump_manager::register_pass): New decl.
3127 (gcc::dump_manager::update_dfi_for_opt_info): New decl.
3128 (class gcc::dump_manager): Add fields "m_optgroup_flags",
3129 "m_optinfo_flags", and "m_optinfo_filename".
3130 * passes.c (gcc::pass_manager::register_pass): Move all of the
3131 dump-handling code to gcc::dump_manager::register_pass.
3132
3133 2018-10-04 Peter Bergner <bergner@linux.ibm.com>
3134
3135 PR rtl-optimization/87466
3136 * target.def (setjmp_preserves_nonvolatile_regs_p): New target hook.
3137 * doc/tm.texi.in (TARGET_SETJMP_PRESERVES_NONVOLATILE_REGS_P): New hook.
3138 * doc/tm.texi: Regenerate.
3139 * ira-lives.c (process_bb_node_lives): Use the new target hook.
3140 * lra-lives.c (process_bb_lives): Likewise.
3141 * config/rs6000/rs6000.c (TARGET_SETJMP_PRESERVES_NONVOLATILE_REGS_P):
3142 Define.
3143
3144 2018-10-04 Tamar Christina <tamar.christina@arm.com>
3145
3146 * params.c (add_params): Fix initialization.
3147
3148 2018-10-04 Martin Liska <mliska@suse.cz>
3149
3150 PR gcov-profile/84107
3151 * tree-profile.c (init_ic_make_global_vars):
3152 Remove ic_void_ptr_var and ic_gcov_type_ptr_var.
3153 Come up with new ic_tuple* variables. Emit
3154 __gcov_indirect_call{,_topn} variables.
3155 (gimple_gen_ic_profiler): Access the variable
3156 and emit gimple.
3157 (gimple_gen_ic_func_profiler): Access
3158 __gcov_indirect_call.callee field.
3159 (gimple_init_gcov_profiler): Use ptr_type_node.
3160 * value-prof.c (gimple_ic): Use ptr_type_node.
3161
3162 2018-10-04 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3163
3164 PR tree-optimization/85787
3165 * ipa-pure-const.c (malloc_candidate_p_1): Move most of malloc_candidate_p
3166 into this function and add support for detecting multiple phis.
3167 (DUMP_AND_RETURN): Move from malloc_candidate_p into top-level macro.
3168
3169 2018-10-04 Martin Liska <mliska@suse.cz>
3170
3171 PR ipa/87491
3172 * ipa-inline.c (inline_to_all_callers_1):
3173 Call ultimate_alias_target for node being inlined.
3174
3175 2018-10-03 Jeff Law <law@redhat.com>
3176
3177 * gimple-ssa-sprintf.c (format_string): Do not hardcode size of
3178 target's wchar_t.
3179 * tree.c (get_typenode_from_name): Moved from fortran/trans-types.c.
3180 * tree.h (get_typenode_from_name): Prototype.
3181
3182 2018-10-03 Uros Bizjak <ubizjak@gmail.com>
3183
3184 * config/i386/i386.md (*cmp<X87MODEF:mode>_<SWI24:mode>_i387):
3185 Change operand 2 predicate to nonimmediate_operand.
3186 (*cmp<X87MODEF:mode>_<SWI24:mode>_cc_i387): Ditto.
3187
3188 2018-10-03 Martin Sebor <msebor@redhat.com>
3189 Jeff Law <law@redhat.com>
3190
3191 * gimple-ssa-sprintf.c (struct fmtresult): Add new member and
3192 initialize it.
3193 (get_string_length): Detect unterminated arrays.
3194 (format_string): Same.
3195 (format_directive): Warn about unterminated arrays.
3196 (handle_gimple_call): Mark statements with no_warning as needed.
3197
3198 2018-10-03 Jim Wilson <jimw@sifive.com>
3199
3200 * config/riscv/riscv-c.c (riscv_cpu_cpp_builtins): For ABI_ILP32E,
3201 also define __riscv_abi_rve. Delete trailing white space.
3202
3203 2018-10-03 Paul Koning <ni1d@arrl.net>
3204
3205 Enable LRA register allocator for PDP11.
3206 * config/pdp11/constraints.md (Q): Use define_memory_constraint.
3207 (R): Likewise.
3208 (D): Likewise.
3209 * config/pdp11/pdp11.c (pdp11_lra_p): New function.
3210 * config/pdp11/pdp11.opt (-mlra): New option.
3211 * doc/invoke.texi (PDP-11 Options): Document -mlra.
3212
3213 2018-10-03 Uros Bizjak <ubizjak@gmail.com>
3214
3215 * config/i386/i386.md (*<absneg:code>extendsfdf2): Remove.
3216 (*<absneg:code>extend<mode>xf2): Ditto.
3217
3218 2018-10-03 Aldy Hernandez <aldyh@redhat.com>
3219
3220 PR tree-optimization/87415
3221 * tree-vrp.c (set_value_range_with_overflow): Special case one bit
3222 precision fields.
3223
3224 2018-10-02 Jeff Law <law@redhat.com>
3225
3226 * gimple-fold.c (get_range_strlen): Only set *nonstr when
3227 an unterminated string is discovered. Bubble up range
3228 even for unterminated strings.
3229 (gimple_fold_builtin_strlen): Do not fold if get_range_strlen
3230 indicates the string was not terminated via NONSTR.
3231
3232 2018-10-03 Aldy Hernandez <aldyh@redhat.com>
3233
3234 * tree-vrp.c (extract_range_from_unary_expr): Special case all
3235 pointer conversions.
3236 Do not do anything special for anti-ranges.
3237
3238 2018-10-03 Jérôme Lambourg <lambourg@adacore.com>
3239
3240 * config/arm/vxworks.h (ARM_TARGET2_DWARF_FORMAT): Adjust to
3241 DW_EH_PE_pcrel | DW_EH_PE_indirect for RTPs.
3242
3243 2018-10-03 Martin Liska <mliska@suse.cz>
3244
3245 PR gcov-profile/86109
3246 * coverage.c (coverage_begin_function): Do not
3247 mark lambdas as artificial.
3248 * tree-core.h (struct GTY): Remove tm_clone_flag
3249 and introduce new lambda_function.
3250 * tree.h (DECL_LAMBDA_FUNCTION): New macro.
3251
3252 2018-10-02 Aaron Sawdey <acsawdey@linux.ibm.com>
3253
3254 PR target/87474
3255 * config/rs6000/rs6000-string.c (expand_strn_compare): Check that both
3256 P8_VECTOR and VSX are enabled.
3257
3258 2018-10-02 Andreas Krebbel <krebbel@linux.ibm.com>
3259
3260 * config/s390/driver-native.c (s390_host_detect_local_cpu): Add
3261 0x3907 as CPU model number.
3262
3263 2018-10-02 Andreas Krebbel <krebbel@linux.ibm.com>
3264
3265 * common/config/s390/s390-common.c: Rename PF_ARCH12 to PF_Z14.
3266 * config/s390/s390.h (enum processor_flags): Rename PF_ARCH12 to
3267 PF_Z14. Rename TARGET_CPU_ARCH12 to TARGET_CPU_Z14,
3268 TARGET_CPU_ARCH12_P to TARGET_CPU_Z14_P, TARGET_ARCH12 to
3269 TARGET_Z14, and TARGET_ARCH12_P to TARGET_Z14_P.
3270 * config/s390/s390.md: Likewise. Rename also the cpu attribute
3271 value from arch12 to z14.
3272
3273 2018-10-02 Uros Bizjak <ubizjak@gmail.com>
3274
3275 * config/i386/i386.md (fxam<mode>2_i387_with_temp): Remove.
3276 (isinfxf2): Ditto.
3277 (isinf<mode>2): Ditto.
3278
3279 2018-10-02 Uros Bizjak <ubizjak@gmail.com>
3280
3281 * config/i386/i386.c (ix86_emit_i387_round): Extend op1 to XFmode
3282 before emitting fxam. Perform calculations in XFmode.
3283
3284 2018-10-02 Marc Glisse <marc.glisse@inria.fr>
3285
3286 * match.pd (((X /[ex] A) +- B) * A): New transformation.
3287
3288 2018-10-02 Marc Glisse <marc.glisse@inria.fr>
3289
3290 PR middle-end/87319
3291 * fold-const.c (fold_plusminus_mult_expr): Handle complex and vectors.
3292 * tree.c (signed_or_unsigned_type_for): Handle complex.
3293
3294 2018-10-02 Jeff Law <law@redhat.com>
3295
3296 * gimple-fold.c (get_range_strlen): Remove dead code.
3297
3298 2018-10-02 Martin Sebor <msebor@redhat.com>
3299 Jeff Law <law@redhat.com>
3300
3301 * builtins.c (unterminated_array): Add new arguments.
3302 If argument is not terminated, bubble up size and exact
3303 state to callers.
3304 (expand_builtin_strnlen): Detect, avoid expanding
3305 and diagnose unterminated arrays.
3306 (c_strlen): Fill in offset of start of unterminated strings.
3307 * builtins.h (unterminated_array): Update prototype.
3308
3309 2018-10-02 Richard Biener <rguenther@suse.de>
3310
3311 * config/i386/sse.md (reduc_plus_scal_v4df): Avoid the use
3312 of haddv4df, first reduce to SSE width and exploit the fact
3313 that we only need element zero with the reduction result.
3314 (reduc_plus_scal_v2df): Likewise.
3315
3316 2018-10-02 Eric Botcazou <ebotcazou@adacore.com>
3317
3318 * dojump.h (do_jump): Delete.
3319 (do_jump_1): Likewise.
3320 (split_comparison): Move around.
3321 * dojump.c (do_jump): Make static.
3322 (do_jump_1): Likewise.
3323 (jumpifnot): Move around.
3324 (jumpifnot_1): Likewise.
3325 (jumpif): Likewise.
3326 (jumpif_1): Likewise.
3327 * expr.c (expand_expr_real_1): Call jumpif[not] instead of do_jump.
3328
3329 2018-10-02 Eric Botcazou <ebotcazou@adacore.com>
3330
3331 * reorg.c (make_return_insns): Use emit_copy_of_insn_after for the
3332 insns in the delay slot and add_insn_after for the jump insn.
3333
3334 2018-10-02 Richard Biener <rguenther@suse.de>
3335
3336 * tree-inline.c (expand_call_inline): Use the location of
3337 the callee declaration for the inline-entry marker.
3338 * final.c (notice_source_line): Remove special-casing of
3339 NOTE_INSN_INLINE_ENTRY.
3340
3341 2018-10-01 Carl Love <cel@us.ibm.com>
3342
3343 PR 69431
3344 * config/rs6000/rs6000-builtin.def (__builtin_mffsl): New.
3345 (__builtin_mtfsb0): New.
3346 (__builtin_mtfsb1): New.
3347 ( __builtin_set_fpscr_rn): New.
3348 (__builtin_set_fpscr_drn): New.
3349 * config/rs6000/rs6000.c (rs6000_expand_mtfsb_builtin): Add.
3350 (rs6000_expand_set_fpscr_rn_builtin): Add.
3351 (rs6000_expand_set_fpscr_drn_builtin): Add.
3352 (rs6000_expand_builtin): Add case statement entries for
3353 RS6000_BUILTIN_MTFSB0, RS6000_BUILTIN_MTFSB1,
3354 RS6000_BUILTIN_SET_FPSCR_RN, RS6000_BUILTIN_SET_FPSCR_DRN,
3355 RS6000_BUILTIN_MFFSL.
3356 (rs6000_init_builtins): Add ftype initialization and def_builtin
3357 calls for __builtin_mffsl, __builtin_mtfsb0, __builtin_mtfsb1,
3358 __builtin_set_fpscr_rn, __builtin_set_fpscr_drn.
3359 * config/rs6000.md (rs6000_mtfsb0, rs6000_mtfsb1, rs6000_mffscrn,
3360 rs6000_mffscdrn): Add define_insn.
3361 (rs6000_set_fpscr_rn, rs6000_set_fpscr_drn): Add define_expand.
3362 * doc/extend.texi: Add documentation for the builtins.
3363
3364 2018-10-01 Richard Biener <rguenther@suse.de>
3365
3366 PR tree-optimization/87465
3367 * tree-ssa-loop-ivcanon.c (tree_estimate_loop_size): Fix typo
3368 causing branch miscounts.
3369
3370 2018-10-01 Tamar Christina <tamar.christina@arm.com>
3371
3372 * common/config/aarch64/aarch64-common.c (TARGET_OPTION_DEFAULT_PARAM,
3373 aarch64_option_default_param): New.
3374 (params.h): Include.
3375 (TARGET_OPTION_VALIDATE_PARAM, aarch64_option_validate_param): New.
3376 * config/aarch64/aarch64.c (aarch64_override_options_internal): Simplify
3377 stack-clash protection validation code.
3378
3379 2018-10-01 Tamar Christina <tamar.christina@arm.com>
3380
3381 * params.c (validate_param): New.
3382 (add_params): Use it.
3383 (set_param_value): Refactor param validation into validate_param.
3384 (diagnostic.h): Include.
3385 * diagnostic.h (diagnostic_ready_p): New.
3386
3387 2018-10-01 Tamar Christina <tamar.christina@arm.com>
3388
3389 * params.c (set_param_value):
3390 Add index of parameter being validated.
3391 * common/common-target.def (option_validate_param): New.
3392 * common/common-targhooks.h (default_option_validate_param): New.
3393 * common/common-targhooks.c (default_option_validate_param): New.
3394 * doc/tm.texi.in (TARGET_OPTION_VALIDATE_PARAM): New.
3395 * doc/tm.texi: Regenerate.
3396
3397 2018-10-01 Tamar Christina <tamar.christina@arm.com>
3398
3399 PR target/86486
3400 * config/aarch64/aarch64.c (aarch64_override_options_internal):
3401 Add validation for stack-clash parameters and set defaults.
3402
3403 2018-10-01 Tamar Christina <tamar.christina@arm.com>
3404
3405 PR target/86486
3406 * configure.ac: Add stack-clash-protection-guard-size.
3407 * doc/install.texi: Document it.
3408 * config.in (DEFAULT_STK_CLASH_GUARD_SIZE): New.
3409 * params.def: Update comment for guard-size.
3410 (PARAM_STACK_CLASH_PROTECTION_GUARD_SIZE,
3411 PARAM_STACK_CLASH_PROTECTION_PROBE_INTERVAL): Update description.
3412 * configure: Regenerate.
3413
3414 2018-10-01 Tamar Christina <tamar.christina@arm.com>
3415
3416 PR target/86486
3417 * config/aarch64/aarch64.h (STACK_CLASH_MIN_BYTES_OUTGOING_ARGS,
3418 STACK_DYNAMIC_OFFSET): New.
3419 * config/aarch64/aarch64.c (aarch64_layout_frame):
3420 Update outgoing args size.
3421 (aarch64_stack_clash_protection_alloca_probe_range,
3422 TARGET_STACK_CLASH_PROTECTION_ALLOCA_PROBE_RANGE): New.
3423
3424 2018-10-01 Tamar Christina <tamar.christina@arm.com>
3425
3426 PR target/86486
3427 * explow.c (anti_adjust_stack_and_probe_stack_clash): Support custom
3428 probe ranges.
3429 * target.def (stack_clash_protection_alloca_probe_range): New.
3430 (stack_clash_protection_final_dynamic_probe): Remove.
3431 * targhooks.h (default_stack_clash_protection_alloca_probe_range) New.
3432 (default_stack_clash_protection_final_dynamic_probe): Remove.
3433 * targhooks.c: Likewise.
3434 * doc/tm.texi.in (TARGET_STACK_CLASH_PROTECTION_ALLOCA_PROBE_RANGE): New.
3435 (TARGET_STACK_CLASH_PROTECTION_FINAL_DYNAMIC_PROBE): Remove.
3436 * doc/tm.texi: Regenerate.
3437
3438 2018-10-01 Tamar Christina <tamar.christina@arm.com>
3439
3440 PR target/86486
3441 * config/aarch64/aarch64-protos.h (aarch64_output_probe_sve_stack_clash): New.
3442 * config/aarch64/aarch64.c (aarch64_output_probe_sve_stack_clash,
3443 aarch64_clamp_to_uimm12_shift): New.
3444 (aarch64_allocate_and_probe_stack_space): Add SVE specific section.
3445 * config/aarch64/aarch64.md (probe_sve_stack_clash): New.
3446
3447 2018-10-01 Tamar Christina <tamar.christina@arm.com>
3448
3449 PR target/86486
3450 * config/aarch64/aarch64.c (aarch64_layout_frame): Add assert.
3451
3452 2018-10-01 Jeff Law <law@redhat.com>
3453 Richard Sandiford <richard.sandiford@linaro.org>
3454 Tamar Christina <tamar.christina@arm.com>
3455
3456 PR target/86486
3457 * config/aarch64/aarch64.md
3458 (probe_stack_range): Add k (SP) constraint.
3459 * config/aarch64/aarch64.h (STACK_CLASH_CALLER_GUARD,
3460 STACK_CLASH_MAX_UNROLL_PAGES): New.
3461 * config/aarch64/aarch64.c (aarch64_output_probe_stack_range): Emit
3462 stack probes for stack clash.
3463 (aarch64_allocate_and_probe_stack_space): New.
3464 (aarch64_expand_prologue): Use it.
3465 (aarch64_expand_epilogue): Likewise and update IP regs re-use criteria.
3466 (aarch64_sub_sp): Add emit_move_imm optional param.
3467
3468 2018-10-01 MCC CS <deswurstes@users.noreply.github.com>
3469
3470 PR tree-optimization/87261
3471 * match.pd: Remove trailing whitespace.
3472 Add (x & y) | ~(x | y) -> ~(x ^ y),
3473 (~x | y) ^ (x ^ y) -> x | ~y and (x ^ y) | ~(x | y) -> ~(x & y)
3474
3475 2018-10-01 Claudiu Zissulescu <claziss@synopsys.com>
3476
3477 * config/arc/arc.md (*add_n): Clean up pattern, update instruction
3478 constraints.
3479 (ashlsi3_insn): Update instruction constraints.
3480 (ashrsi3_insn): Likewise.
3481 (rotrsi3): Likewise.
3482 (add_shift): Likewise.
3483 * config/arc/constraints.md (Csz): New 32 bit constraint. It
3484 avoids placing in the limm field small constants which, otherwise,
3485 could end into a small instruction.
3486
3487 2018-10-01 Claudiu Zissulescu <claziss@synopsys.com>
3488
3489 * config/arc/arc.md (maddsidi4_split): Don't use dmac if the
3490 destination register is not odd-even.
3491 (umaddsidi4_split): Likewise.
3492
3493 2018-10-01 Richard Biener <rguenther@suse.de>
3494
3495 * tree-inline.c (expand_call_inline): Store origin of fn
3496 in BLOCK_ABSTRACT_ORIGIN for the inline BLOCK.
3497 * tree.c (block_ultimate_origin): Simplify and do some
3498 checking.
3499
3500 2018-09-30 Uros Bizjak <ubizjak@gmail.com>
3501
3502 * config/i386/mmx.md (EMMS): New int iterator.
3503 (emms): New int attribute.
3504 (mmx_<emms>): Macroize insn from *mmx_emms and *mmx_femms using
3505 EMMS int iterator. Explicitly declare clobbers.
3506 (mmx_emms): Remove expander.
3507 (mmx_femms): Ditto.
3508 * config/i386/predicates.md (emms_operation): Remove predicate.
3509 (vzeroall_pattern): New predicate.
3510 (vzeroupper_pattern): Rename from vzeroupper_operation.
3511 * config/i386/i386.c (ix86_avx_u128_mode_after): Use
3512 vzeroupper_pattern and vzeroall_pattern predicates.
3513
3514 2018-09-30 Peter Bergner <bergner@linux.ibm.com>
3515
3516 PR rtl-optimization/86939
3517 * ira-lives.c (make_hard_regno_born): Rename from this...
3518 (make_hard_regno_live): ... to this. Remove update to conflict
3519 information. Update function comment.
3520 (make_hard_regno_dead): Add conflict information update. Update
3521 function comment.
3522 (make_object_born): Rename from this...
3523 (make_object_live): ... to this. Remove update to conflict information.
3524 Update function comment.
3525 (make_object_dead): Add conflict information update. Update function
3526 comment.
3527 (mark_pseudo_regno_live): Call make_object_live.
3528 (mark_pseudo_regno_subword_live): Likewise.
3529 (mark_hard_reg_dead): Update function comment.
3530 (mark_hard_reg_live): Call make_hard_regno_live.
3531 (process_bb_node_lives): Likewise.
3532 * lra-lives.c (make_hard_regno_born): Rename from this...
3533 (make_hard_regno_live): ... to this. Remove update to conflict
3534 information. Remove now uneeded check_pic_pseudo_p argument.
3535 Update function comment.
3536 (make_hard_regno_dead): Add check_pic_pseudo_p argument and add update
3537 to conflict information. Update function comment.
3538 (mark_pseudo_live): Remove update to conflict information. Update
3539 function comment.
3540 (mark_pseudo_dead): Add conflict information update.
3541 (mark_regno_live): Call make_hard_regno_live.
3542 (mark_regno_dead): Call make_hard_regno_dead with new arguement.
3543 (process_bb_lives): Call make_hard_regno_live and make_hard_regno_dead.
3544
3545 2018-09-29 H.J. Lu <hongjiu.lu@intel.com>
3546
3547 PR target/87370
3548 * config/i386/i386.c (construct_container): Use TImode for
3549 BLKmode values in 2 integer registers.
3550
3551 2018-09-29 Jeff Law <law@redhat.com>
3552
3553 * builtins.c (unterminated_array): Pass in c_strlen_data * to
3554 c_strlen rather than just a tree *.
3555 (c_strlen): Change NONSTR argument to a c_strlen_data pointer.
3556 Update recursive calls appropriately. If caller did not provide a
3557 suitable data pointer, create a local one. When a non-terminated
3558 string is discovered, bubble up information about the string via the
3559 c_strlen_data object.
3560 * builtins.h (c_strlen): Update prototype.
3561 (c_strlen_data): New structure.
3562 * gimple-fold.c (get_range_strlen): Update calls to c_strlen.
3563 For a type 2 call, if c_strlen indicates a non-terminated string
3564 use the length of the non-terminated string.
3565 (gimple_fold_builtin_stpcpy): Update calls to c_strlen.
3566
3567 2018-09-29 Jakub Jelinek <jakub@redhat.com>
3568
3569 PR target/87467
3570 * config/i386/avx512fintrin.h (_mm512_abs_pd, _mm512_mask_abs_pd): Use
3571 __m512d type for __A argument rather than __m512.
3572
3573 2018-09-28 John David Anglin <danglin@gcc.gnu.org>
3574
3575 * match.pd (simple_comparison): Don't optimize if either operand is
3576 a function pointer when target needs function pointer canonicalization.
3577
3578 2018-09-28 Segher Boessenkool <segher@kernel.crashing.org>
3579
3580 * config/rs6000/driver-rs6000.c (asm_names): Adjust the entries for
3581 power5 .. power9 to remove indirection.
3582 * config/rs6000/rs6000.h (ASM_CPU_POWER5_SPEC, ASM_CPU_POWER6_SPEC,
3583 ASM_CPU_POWER7_SPEC, ASM_CPU_POWER8_SPEC, ASM_CPU_POWER9_SPEC,
3584 ASM_CPU_476_SPEC): Delete.
3585 (ASM_CPU_SPEC): Adjust.
3586 (EXTRA_SPECS): Delete asm_cpu_power5, asm_cpu_power6, asm_cpu_power7,
3587 asm_cpu_power8, asm_cpu_power9, asm_cpu_476.
3588
3589 2018-09-28 Segher Boessenkool <segher@kernel.crashing.org>
3590
3591 * config.in: Delete HAVE_AS_DCI.
3592 * config/powerpcspe/powerpcspe.h: Treat HAVE_AS_DCI as always true.
3593 * config/rs6000/rs6000.h: Ditto.
3594 * configure.ac: Delete HAVE_AS_DCI.
3595 * configure: Regenerate.
3596
3597 2018-09-28 Segher Boessenkool <segher@kernel.crashing.org>
3598
3599 * config.in (HAVE_AS_LWSYNC): Delete.
3600 * config/powerpcspe/powerpcspe.h (TARGET_LWSYNC_INSTRUCTION): Delete.
3601 * config/powerpcspe/sync.md (*lwsync): Always generate lwsync, never
3602 do it as a .long .
3603 * config/rs6000/rs6000.h (TARGET_LWSYNC_INSTRUCTION): Delete.
3604 * config/rs6000/sync.md (*lwsync): Always generate lwsync, never do it
3605 as a .long .
3606 * configure.ac: Delete HAVE_AS_LWSYNC.
3607 * configure: Regenerate.
3608
3609 2018-09-28 Eric Botcazou <ebotcazou@adacore.com>
3610 Pierre-Marie de Rodat <derodat@adacore.com>
3611
3612 * calls.c (expand_call): Try to do a tail call for thunks at -O0 too.
3613 * cgraph.h (struct cgraph_thunk_info): Add indirect_offset.
3614 (cgraph_node::create_thunk): Add indirect_offset parameter.
3615 (thunk_adjust): Likewise.
3616 * cgraph.c (cgraph_node::create_thunk): Add indirect_offset parameter
3617 and initialize the corresponding field with it.
3618 (cgraph_node::dump): Dump indirect_offset field.
3619 * cgraphclones.c (duplicate_thunk_for_node): Deal with indirect_offset.
3620 * cgraphunit.c (cgraph_node::analyze): Be prepared for external thunks.
3621 (thunk_adjust): Add indirect_offset parameter and deal with it.
3622 (cgraph_node::expand_thunk): Deal with the indirect_offset field and
3623 pass it to thunk_adjust. Do not call the target hook if it's non-zero
3624 or if the thunk is external or local. Fix formatting. Do not chain
3625 the RESULT_DECL to BLOCK_VARS. Pass the static chain to the target,
3626 if any, in the GIMPLE representation.
3627 * ipa-icf.c (sem_function::equals_wpa): Deal with indirect_offset.
3628 * lto-cgraph.c (lto_output_node): Write indirect_offset field.
3629 (input_node): Read indirect_offset field.
3630 * tree-inline.c (expand_call_inline): Pass indirect_offset field in the
3631 call to thunk_adjust.
3632 * tree-nested.c (struct nesting_info): Add thunk_p field.
3633 (create_nesting_tree): Set it.
3634 (convert_all_function_calls): Copy static chain from targets to thunks.
3635 (finalize_nesting_tree_1): Return early for thunks.
3636 (unnest_nesting_tree_1): Do not finalize thunks.
3637 (gimplify_all_functions): Do not gimplify thunks.
3638
3639 2018-09-28 David Malcolm <dmalcolm@redhat.com>
3640
3641 * opt-suggestions.c (option_proposer::build_option_suggestions):
3642 Release "option_values".
3643
3644 2018-09-28 David Malcolm <dmalcolm@redhat.com>
3645
3646 * coverage.c (get_coverage_counts): Convert problem-reporting dump
3647 messages from MSG_OPTIMIZED_LOCATIONS to MSG_MISSED_OPTIMIZATION.
3648 * dumpfile.c (kind_as_string): New function.
3649 (dump_loc): Rather than a hardcoded prefix of "note: ", use
3650 kind_as_string to vary the prefix based on dump_kind.
3651 (selftest::test_capture_of_dump_calls): Update for above.
3652
3653 2018-09-28 Uros Bizjak <ubizjak@gmail.com>
3654
3655 * config/i386/i386.h (SSE_REGNO): Fix check for FIRST_REX_SSE_REG.
3656 (GET_SSE_REGNO): Rename from SSE_REGNO. Update all uses for rename.
3657
3658 2018-09-28 Uros Bizjak <ubizjak@gmail.com>
3659
3660 * config/i386/i386.h (CC_REGNO): Remove FPSR_REG.
3661 * config/i386/i386.c (ix86_fixed_condition_code_regs): Use
3662 INVALID_REGNUM instead of FPSR_REG.
3663 (ix86_md_asm_adjust): Do not clobber FPSR_REG.
3664 * config/i386/i386.md: Update comment of FP compares.
3665 (fldenv): Do not clobber FPSR_REG.
3666
3667 2018-09-28 Richard Biener <rguenther@suse.de>
3668
3669 * tree.h (BLOCK_ORIGIN): New.
3670 * omp-expand.c (grid_expand_target_grid_body): Assign
3671 BLOCK_ORIGIN to BLOCK_ABSTRACT_ORIGIN.
3672 * tree-inline.c (remap_block): Likewise.
3673 * auto-profile.c (get_function_decl_from_block): Simplify
3674 by eliding the BLOCK_ABSTRACT_ORIGIN chasing.
3675 * langhooks.c (lhd_print_error_function): Likewise.
3676 * optinfo-emit-json.cc (optrecord_json_writer::inlining_chain_to):
3677 Likewise.
3678 * tree-ssa-live.c (remove_unused_scope_block_p): Likewise.
3679 * tree.c (block_nonartificial_location): Likewise.
3680 (block_ultimate_origin): Likewise.
3681 * tree-pretty-print.c (percent_K_format): Likewise. Remove
3682 no longer needed LTO case.
3683
3684 2018-09-28 Andrew Stubbs <ams@codesourcery.com>
3685 Jan Hubicka <jh@suse.cz>
3686 Martin Jambor <mjambor@suse.cz>
3687
3688 * simplify-rtx.c (simplify_merge_mask): New function.
3689 (simplify_ternary_operation): Use it, also see if VEC_MERGEs with the
3690 same masks are used in op1 or op2.
3691 (test_vec_merge): New function.
3692 (test_vector_ops): Call test_vec_merge.
3693
3694 2018-09-28 Eric Botcazou <ebotcazou@adacore.com>
3695
3696 * config/sparc/sparc-protos.h (sparc_branch_cost): Declare.
3697 * config/sparc/sparc.h (BRANCH_COST): Call sparc_branch_cost.
3698 * config/sparc/sparc.c (struct processor_costs): Add branch_cost field.
3699 (cypress_costs): Set it.
3700 (supersparc_costs): Likewise.
3701 (hypersparc_costs): Likewise.
3702 (leon_cost): Likewise.
3703 (leon3_costs): Likewise.
3704 (sparclet_costs): Likewise.
3705 (ultrasparc_costs): Likewise.
3706 (ultrasparc_costs): Likewise.
3707 (niagara_costs): Likewise.
3708 (niagara2_costs): Likewise.
3709 (niagara3_costs): Likewise.
3710 (niagara4_costs): Likewise.
3711 (niagara7_costs): Likewise.
3712 (m8_costs): Likewise.
3713 (TARGET_CAN_FOLLOW_JUMP): Define.
3714 (pass_work_around_errata::gate): Minor tweak.
3715 (sparc_option_override): Remove MASK_FSMULD mask for V7 processors.
3716 Do not set both MASK_VIS4 and MASK_VIS4B for M8 processor.
3717 Automaitcally clear MASK_FSMULD mask for V7 processors.
3718 (sparc_can_follow_jump): New static function.
3719 (output_ubranch): Deal with CROSSING_JUMP_P.
3720 (sparc_use_sched_lookahead): Rewrite using switch statement.
3721 (sparc_issue_rate): Reorder.
3722 (sparc_branch_cost): New function.
3723
3724 2018-09-27 Martin Sebor <msebor@redhat.com>
3725
3726 * tree.h (tree_to_shwi): Add attribute nonnull and pure.
3727 (tree_to_poly_int64, tree_to_uhwi, tree_to_poly_uint64): Same.
3728 (int_fits_type_p): Same.
3729
3730 2018-09-27 Uros Bizjak <ubizjak@gmail.com>
3731
3732 * config/i386/i386.md (FPCR_REG): Remove.
3733 (UNSPEC_FLDCW): Remove.
3734 (x86_fnstcw_1): Use (const_int 0) instead of FPCR_REG.
3735 (x86_fldcw_1): Remove insn pattern.
3736 (fnstenv): Do not clobber FPCR_REG.
3737 (fldenv): Ditto.
3738 * config/i386/i386.h (FIXED_REGISTERS) Remove fpsr register.
3739 (CALL_USED_REGISTERS): Ditto.
3740 (REG_ALLOC_ORDER): Ditto.
3741 (REG_CLASS_CONTENTS): Ditto.
3742 (HI_REGISTER_NAMES): Ditto.
3743 (ADDITIONAL_REGISTER_NAMES): Use defines instead
3744 of numerical constants.
3745 * config/i386/i386.c (regclass_map): Remove fpsr register.
3746 (dbx_register_map): Ditto.
3747 (dbx64_register_map): Ditto.
3748 (svr4_dbx_register_map): Ditto.
3749 (print_reg): Do not handle FPCR_REG.
3750
3751 2018-09-27 Segher Boessenkool <segher@kernel.crashing.org>
3752
3753 PR target/87149
3754 * config.in (HAVE_AS_CMPB, HAVE_AS_DFP, HAVE_AS_FPRND, HAVE_AS_MFPGPR,
3755 HAVE_AS_POPCNTB, HAVE_AS_POPCNTD, HAVE_AS_POWER8, HAVE_AS_POWER9):
3756 Delete, always treat as true.
3757 * config/powerpcspe/powerpcspe.c (rs6000_option_override_internal):
3758 Ditto. Simplify remaining code.
3759 * config/powerpcspe/powerpcspe.h: Ditto.
3760 * config/rs6000/rs6000.c (rs6000_option_override_internal): Ditto.
3761 Simplify remaining code.
3762 (rs6000_expand_builtin): Ditto.
3763 * config/rs6000/rs6000.h: Ditto.
3764 * configure.ac: Ditto.
3765 * configure: Regenerate.
3766
3767 2018-09-27 Martin Liska <mliska@suse.cz>
3768
3769 * coverage.c (get_coverage_counts): Revert the formatting
3770 of missing profile opt info.
3771
3772 2018-09-27 Richard Biener <rguenther@suse.de>
3773
3774 PR debug/37801
3775 PR debug/87440
3776 * dwarf2out.c (set_block_origin_self): Do not mark outermost
3777 block as we do not output that.
3778 (gen_inlined_subroutine_die): Elide the originally outermost
3779 block, matching what we do for concrete instances.
3780 (decls_for_scope): Add parameter specifying whether to recurse
3781 to subblocks.
3782
3783 2018-09-27 Andrew Stubbs <ams@codesourcery.com>
3784 Tom de Vries <tom@codesourcery.com>
3785
3786 PR 82089
3787
3788 * expmed.c (emit_cstore): Fix handling of result_mode == BImode and
3789 STORE_FLAG_VALUE == 1.
3790
3791 2018-09-27 Andreas Krebbel <krebbel@linux.ibm.com>
3792
3793 * config/s390/s390.md (PPA_TX_ABORT, PPA_OOO_BARRIER): New
3794 constant definitions.
3795 ("tx_assist"): Replace magic number with PPA_TX_ABORT.
3796 ("*ppa"): Enable pattern also for -march=zEC12 -mno-htm.
3797 ("speculation_barrier"): New expander definition.
3798
3799 2018-09-26 Indu Bhagat <indu.bhagat@oracle.com>
3800
3801 PR gcov-profile/86957
3802 * common.opt: New warning option -Wmissing-profile.
3803 * coverage.c (get_coverage_counts): Add warning for missing .gcda file.
3804 * doc/invoke.texi: Document -Wmissing-profile.
3805
3806 2018-09-26 Jim Wilson <jimw@sifive.com>
3807
3808 * config/riscv/riscv.md (subsi3_extended2): Add J constraint.
3809 (negdi2, negsi2, negsi2_extended, negsi2_extended2): New.
3810
3811 2018-09-26 Martin Sebor <msebor@redhat.com>
3812
3813 * tree.c (zerop): Change return type to bool.
3814 (integer_zerop, integer_onep, integer_each_onep): Same.
3815 (integer_all_onesp, integer_minus_onep, integer_pow2p): Same.
3816 (integer_nonzerop, integer_truep, tree_ctz, real_zerop): Same.
3817 (real_onep, real_minus_onep, chain_index): Same.
3818 (print_type_hash_statistics, type_list_equal): Same.
3819 * tree.h (zerop): Same.
3820 (zerop, integer_zerop, integer_onep, integer_each_onep): Same.
3821 (integer_all_onesp, integer_minus_onep, integer_pow2p): Same.
3822 (integer_nonzerop, integer_truep, tree_ctz, real_zerop): Same.
3823 (real_onep, real_minus_onep, chain_index): Same.
3824 (print_type_hash_statistics, type_list_equal): Same.
3825
3826 2018-09-26 Jim Wilson <jimw@sifive.com>
3827
3828 * config/riscv/riscv.h (FUNCTION_ARG_REGNO_P): Fix comment.
3829
3830 2018-09-26 Jakub Jelinek <jakub@redhat.com>
3831
3832 PR target/87414
3833 * config/i386/i386.c: Include debug.h and dwarf2out.h.
3834 (output_indirect_thunk): Emit DW_CFA_def_cfa_offset after the
3835 call.
3836
3837 2018-09-25 Andrew Stubbs <ams@codesourcery.com>
3838
3839 * builtins.c (get_builtin_sync_mem): Force address mode conversion.
3840
3841 2018-09-26 Uros Bizjak <ubizjak@gmail.com>
3842
3843 * config/i386/i386.h (enum reg_class): Remove FP_TOP_SSE_REGS
3844 and FP_SECOND_SSE_REGS.
3845 (REG_CLASS_NAMES): Ditto.
3846 (REG_CLASS_CONTENTS): Ditto.
3847 * config/i386/i386.c (ix86_preferred_reload_class) Do not handle
3848 FP_TOP_SSE_REGS and FP_SECOND_SSE_REGS classes.
3849 (ix86_preferred_output_reload_class): Ditto.
3850 * config/i386/i386.md (fix_trunc<mode>_i387_fisttp): Change "=&1f"
3851 clobber constraint to "=&f".
3852 (fix_truncdi_i387): Ditto.
3853 (lrintxfdi2): Ditto.
3854 (fistdi2_<rounding>): Ditto.
3855 (fpremxf4_i387): Change "=u" constraint to "=f".
3856 (fprem1xf4_i387): Ditto.
3857 (sincosxf3): Ditto.
3858 (fptanxf4_i387): Ditto.
3859 (fxtractxf3_i387): Ditto.
3860 (fscalexf4_i387): Ditto.
3861 (atan2xf3): Change "u" constraint to "f".
3862 (fyl2xxf3_i387): Ditto.
3863 (fyl2xp1xf3_i387): Ditto.
3864
3865 2018-09-26 Uros Bizjak <ubizjak@gmail.com>
3866
3867 PR target/87439
3868 * config/i386/i386.h (NUM_MODES_FOR_MODE_SWITCHING): Update
3869 for removed I387_MASK_PM entity.
3870
3871
3872 2018-09-26 Jeff Law <law@redhat.com>
3873 Revert
3874 2018-09-26 Alexey Neyman <stilor@att.net>
3875
3876 * graphite.h: Include <isl/id.h> and <isl/space.h>; these
3877 headers are no longer pulled in by <isl/val.h>.
3878
3879 2018-09-26 Richard Biener <rguenther@suse.de>
3880
3881 PR debug/87443
3882 * dwarf2out.c (gen_lexical_block_die): Do not equate inline
3883 or concrete instance DIE to the tree. Create abstract origin
3884 attributes also for concrete instances.
3885
3886 2018-09-26 Alexey Neyman <stilor@att.net>
3887
3888 * graphite.h: Include <isl/id.h> and <isl/space.h>; these
3889 headers are no longer pulled in by <isl/val.h>.
3890
3891 2018-09-26 Matthew Malcomson <matthew.malcomson@arm.com>
3892
3893 * config/arm/arm.c (arm_split_compare_and_swap, arm_split_atomic_op):
3894 Use new helper functions.
3895 * config/arm/sync.md (atomic_load<mode>, atomic_store<mode>):
3896 Use new helper functions.
3897 * config/arm/aarch-common-protos.h (aarch_mm_needs_acquire,
3898 aarch_mm_needs_release): New declarations.
3899 * config/arm/aarch-common.c (aarch_mm_needs_acquire,
3900 aarch_mm_needs_release): New.
3901
3902 2018-09-26 Eric Botcazou <ebotcazou@adacore.com>
3903
3904 * config/arm/arm.c (arm_reorg): Skip Thumb reorg pass for thunks.
3905 (arm32_output_mi_thunk): Deal with long calls.
3906
3907 2018-09-26 Richard Biener <rguenther@suse.de>
3908
3909 PR debug/87428
3910 PR debug/87362
3911 * tree-inline.c (expand_call_inline): When the location
3912 of the call is UNKNOWN_LOCATION use DECL_SOURCE_LOCATION
3913 or BUILTINS_LOCATION for the BLOCK_SOURCE_LOCATION of
3914 the inserted BLOCK to make inlined_function_outer_scope_p
3915 recognize it.
3916 * dwarf2out.c (add_call_src_coords_attributes): Do not add
3917 coords for reserved locations.
3918
3919 2018-09-25 Segher Boessenkool <segher@kernel.crashing.org>
3920
3921 * config/rs6000/rs6000.md (*movcc_internal1): Use set_attr_alternative.
3922 (*call_indirect_nonlocal_sysv<mode>): Ditto.
3923 (*call_value_indirect_nonlocal_sysv<mode>): Ditto.
3924 (*sibcall_nonlocal_sysv<mode>): Ditto.
3925 (*sibcall_value_nonlocal_sysv<mode>): Ditto.
3926 (<bd>_<mode>): Ditto.
3927 (<bd>tf_<mode>): Ditto.
3928
3929 2018-09-25 Segher Boessenkool <segher@kernel.crashing.org>
3930
3931 * config/rs6000/altivec.md (*altivec_mov<mode>): Write the output
3932 control string as a list of templates instead of as C code.
3933 (*altivec_movti): Ditto.
3934 * config/rs6000/darwin.md (movdf_low_di): Ditto.
3935
3936 2018-09-25 Jim Wilson <jimw@sifive.com>
3937
3938 * config/riscv/riscv.c (riscv_split_symbol): Mark auipc label as weak
3939 when target symbol is weak.
3940
3941 2018-09-25 Bernd Edlinger <bernd.edlinger@hotmail.de>
3942
3943 PR c/87387
3944 * builtins.c (unterminated_array): Simplify.
3945 * expr.c (string_constant): Handle SSA_NAME. Add more exceptions
3946 where pointer arithmetic is safe.
3947
3948 2018-09-25 Segher Boessenkool <segher@kernel.crashing.org>
3949
3950 PR target/86987
3951 * config/rs6000/altivec.md (altivec_vspltb): Use
3952 const_0_to_15_operand instead of u5bit_cint_operand.
3953 (*altivec_vspltb_internal): Ditto.
3954 (altivec_vspltb_direct): Ditto.
3955 (altivec_vsplth): Use const_0_to_7_operand instead of
3956 u5bit_cint_operand.
3957 (*altivec_vsplth_internal): Ditto.
3958 (altivec_vsplth_direct): Ditto.
3959 (altivec_vspltw): Use const_0_to_3_operand instead of
3960 u5bit_cint_operand.
3961 (*altivec_vspltw_internal): Ditto.
3962 (altivec_vspltw_direct): Ditto.
3963 (altivec_vspltsf): Ditto.
3964 (*altivec_vspltsf_internal): Ditto.
3965 * config/rs6000/rs6000.c (rs6000_expand_binop_builtin): Handle the
3966 various splats with the proper size immediate. Reorder the various
3967 cases by ascending size of immediate, and put all such together.
3968
3969 2018-09-25 Richard Biener <rguenther@suse.de>
3970
3971 PR debug/83941
3972 * dwarf2out.c (add_AT_external_die_ref): Remove now redundant
3973 GC-ification.
3974 (maybe_create_die_with_external_ref): Do not create
3975 DW_TAG_imported_unit here.
3976 (add_abstract_origin_attribute): Handle external BLOCK refs.
3977 (dwarf2out_abstract_function): Simplify LTO case.
3978 (dwarf2out_early_finish): Create DW_TAG_imported_unit explicitely
3979 rather than using maybe_create_die_with_external_ref.
3980
3981 2018-09-25 Uros Bizjak <ubizjak@gmail.com>
3982
3983 PR target/71278
3984 * config/i386/i386.md (frndintxf2_mask_pm): Remove.
3985 (frndintxf2_mask_pm_i387): Ditto.
3986 (nearbyintxf2): Rewrite expander pattern to match rintxf2.
3987 Enable for !flag_trapping_math.
3988 (nearbyint<mode>2): Enable x87 modes for !flag_trapping_math.
3989 Enable SSE modes for TARGET_SSE4_1 and expand them with round insn.
3990 Change operand 1 predicate to nonimmediate_operand.
3991 (attr "i387_cw"): Remove mask_pm.
3992 * config/i386/i386.h (enum ix86_stack_slot): Remove SLOT_CW_MASK_PM.
3993 (enum ix86_entity): Remove I387_MASK_PM.
3994 * config/i386/i386.c (ix86_i387_mode_needed): Do not
3995 handle I387_MASK_PM.
3996 (ix86_mode_needed): Ditto.
3997 (ix86_mode_after): Ditto.
3998 (ix86_mode_entry): Ditto.
3999 (ix86_mode_exit): Ditto.
4000 (emit_i387_cw_initialization): Do not handle I387_CW_MASK_PM.
4001
4002 2018-09-25 Jakub Jelinek <jakub@redhat.com>
4003
4004 * vr-values.c (vr_values::vr_values): Initialize to_remove_edges and
4005 to_update_switch_stmts to vNULL instead of calling create on them
4006 immediately.
4007
4008 2018-09-25 Richard Biener <rguenther@suse.de>
4009
4010 PR tree-optimization/87402
4011 * tree-ssa-sccvn.c (SSA_VISITED): Remove unused function.
4012 (visit_phi): Re-instantiate handling of supposed to be VARYING
4013 but non-VARYING backedge value.
4014
4015 2018-09-25 Richard Biener <rguenther@suse.de>
4016
4017 PR debug/83941
4018 * dwarf2out.c (struct sym_off_pair): New.
4019 (external_die_map): New global.
4020 (lookup_decl_die): When in LTO create DIEs lazily from the
4021 external_die_map.
4022 (lookup_block_die): New function, create DIEs lazily in LTO.
4023 (equate_block_to_die): New function.
4024 (dwarf2out_die_ref_for_decl): During WPA get the association
4025 from the external DIE map.
4026 (dwarf2out_register_external_die): Record mapping into the
4027 external DIE map.
4028 (maybe_create_die_with_external_ref): New function split out from
4029 DIE generation part of old dwarf2out_register_external_die.
4030 (add_abstract_origin_attribute): Do not return the DIE. When
4031 in LTO reference externals directly.
4032 (dwarf2out_abstract_function): When in LTO ignore calls for
4033 decls with external DIEs (already present abstract instances).
4034 (gen_call_site_die): Adjust.
4035 (add_high_low_attributes): Likewise.
4036 (gen_lexical_block_die): Likewise.
4037 (gen_inlined_subroutine_die): Likewie.
4038 (gen_block_die): Likewise.
4039 (dwarf2out_inline_entry): Likewise.
4040 (dwarf2out_early_finish): In LTRANS phase create DW_TAG_imported_unit
4041 DIEs.
4042
4043 2018-09-25 Martin Liska <mliska@suse.cz>
4044
4045 * ipa-fnsummary.c (estimate_node_size_and_time): Scale by two
4046 integers and not by a float value.
4047
4048 2018-09-25 Martin Liska <mliska@suse.cz>
4049
4050 PR fortran/87394
4051 * dbgcnt.c (dbg_cnt_process_single_pair): Return false
4052 instead of NULL.
4053 * dumpfile.c (dump_enable_all): Remove extra parenthesis.
4054 * gcov-tool.c: Declare the function with ATTRIBUTE_NORETURN.
4055 * godump.c (go_format_type): Remove extra parenthesis.
4056
4057 2018-09-25 Martin Liska <mliska@suse.cz>
4058
4059 * alias.c (set_dest_equal_p): Remove unused function.
4060 * config/i386/i386.c (def_builtin_pure2): Likewise.
4061 * diagnostic-show-locus.c (class layout): Remove
4062 unused field.
4063 (layout::layout): Likewise here.
4064 * dump-context.h (class temp_dump_context): Likewise.
4065 * dwarf2out.c (add_AT_fde_ref): Remove unused function.
4066 (add_AT_loclistsptr): Likewise.
4067 (add_AT_offset): Likewise.
4068 (get_AT_hi_pc): Likewise.
4069 (is_comdat_die): Likewise.
4070 (type_is_enum): Likewise.
4071 (ceiling): Likewise.
4072 (add_AT_vms_delta): Likewise.
4073 (is_class_die): Likewise.
4074 * edit-context.c (class line_event): Remove unused field.
4075 * graphite-sese-to-poly.c (tree_int_to_gmp): Remove
4076 unused function.
4077 * ipa-cp.c (ipa_get_vr_lat): Likewise.
4078 * lra-constraints.c (ok_for_index_p_nonstrict): Likewise.
4079 (ok_for_base_p_nonstrict): Likewise.
4080 * tree-chrec.c (is_not_constant_evolution): Likewise.
4081 (chrec_fold_poly_cst): Likewise.
4082 * tree-if-conv.c (has_pred_critical_p): Likewise.
4083 * tree-ssa-coalesce.c (print_exprs): Likewise.
4084 * tree-ssa-pre.c (bitmap_set_contains_expr): Likewise.
4085 * tree-ssa-uninit.c (is_and_or_or_p): Likewise.
4086 * tree-vrp.c (value_ranges_intersect_p): Likewise.
4087 (value_range_nonnegative_p): Likewise.
4088
4089 2018-09-25 Martin Liska <mliska@suse.cz>
4090
4091 * config/powerpcspe/powerpcspe.c (rs6000_output_function_epilogue):
4092 Do not handle "GNU Pascal".
4093 * config/rs6000/rs6000.c (rs6000_output_function_epilogue):
4094 Likewise.
4095 * config/sparc/sparc.c (sparc_pass_by_reference): Remove Pascal
4096 from documentation. Likewise.
4097 * dbxout.c (dbxout_range_type): Likewise.
4098 * doc/cpp.texi: Likewise.
4099 * doc/extend.texi: Likewise.
4100 * doc/frontends.texi: Likewise.
4101 * doc/invoke.texi: Remove Pascal entry.
4102 * tree.def (CLEANUP_POINT_EXPR): Likewise.
4103 * doc/rtl.texi (MODE_FUNCTION): Remove not used entry.
4104
4105 2018-09-25 Martin Liska <mliska@suse.cz>
4106
4107 PR middle-end/86078
4108 * doc/invoke.texi: Document all parameters and remove default
4109 of the parameters.
4110
4111 2018-09-25 Ilya Leoshkevich <iii@linux.ibm.com>
4112
4113 PR bootstrap/87417
4114 * rtl.c (rtx_code_size): Take into account that EQ_ATTR_ALT
4115 contains HOST_WIDE_INTs when computing its size.
4116
4117 2018-09-24 Jim Wilson <jimw@sifive.com>
4118
4119 PR target/87391
4120 * config/riscv/riscv.h (STACK_BOUNDARY): Test riscv_abi == ABI_ILP32E
4121 not TARGET_RVE.
4122 (ABI_STACK_BOUNDARY, MAX_ARGS_IN_REGISTERS): Likewise.
4123
4124 2018-09-24 Andrew Pinski <apinski@marvell.com>
4125
4126 * config/aarch64/aarch64.c (aarch_macro_fusion_pair_p): Don't
4127 access prev before checking it for NULLness in the
4128 AARCH64_FUSE_CMP_BRANCH case.
4129
4130 2018-09-24 H.J. Lu <hongjiu.lu@intel.com>
4131
4132 PR target/82699
4133 * config/i386/i386.c (rest_of_insert_endbranch): Set
4134 endbr_queued_at_entrance to true and don't insert ENDBR if
4135 x86_function_profiler will be called.
4136 (x86_function_profiler): Insert ENDBR if endbr_queued_at_entrance
4137 is true.
4138 * config/i386/i386.h (machine_function): Add
4139 endbr_queued_at_entrance.
4140
4141 2018-09-24 Ilya Leoshkevich <iii@linux.ibm.com>
4142
4143 * genattrtab.c (mk_attr_alt): Use alternative_mask.
4144 (attr_rtx_1): Adjust caching to match the new EQ_ATTR_ALT field
4145 types.
4146 (check_attr_test): Use alternative_mask.
4147 (get_attr_value): Likewise.
4148 (compute_alternative_mask): Use alternative_mask and XWINT.
4149 (make_alternative_compare): Use alternative_mask.
4150 (attr_alt_subset_p): Use XWINT.
4151 (attr_alt_subset_of_compl_p): Likewise.
4152 (attr_alt_intersection): Use alternative_mask and XWINT.
4153 (attr_alt_union): Likewise.
4154 (attr_alt_complement): Use HOST_WIDE_INT and XWINT.
4155 (mk_attr_alt): Use alternative_mask and HOST_WIDE_INT.
4156 (simplify_test_exp): Use alternative_mask and XWINT.
4157 (write_test_expr): Use alternative_mask and XWINT, adjust bit
4158 number calculation to support 64 bits. Generate code that
4159 checks 64-bit masks.
4160 (main): Use alternative_mask.
4161 * rtl.def (EQ_ATTR_ALT): Change field types from ii to ww.
4162
4163 2018-09-24 Ilya Leoshkevich <iii@linux.ibm.com>
4164
4165 PR target/80080
4166 * config/s390/s390.c (s390_emit_epilogue): Do not use PARALLEL
4167 RETURN+USE when returning via %r14.
4168
4169 2018-09-24 Martin Liska <mliska@suse.cz>
4170
4171 * gcov.c (output_lines): Print colorization legend
4172 for both flag_use_colors and flag_use_hotness_colors.
4173 Reword the help.
4174
4175 2018-09-24 Martin Liska <mliska@suse.cz>
4176
4177 * coverage.c (get_coverage_counts): Use warning_at
4178 with current_function_decl location. Use %qD in warning
4179 message.
4180
4181 2018-09-24 Martin Liska <mliska@suse.cz>
4182
4183 * memory-block.h (memory_block_pool::release): Annotate with
4184 valgrind that the memory is not accessible.
4185
4186 2018-09-24 Martin Liska <mliska@suse.cz>
4187
4188 PR sanitizer/85774
4189 * asan.c: Make asan_handled_variables extern.
4190 * asan.h: Likewise.
4191 * cfgexpand.c (expand_stack_vars): Make sure
4192 a representative is unpoison if another
4193 variable in the partition is handled by
4194 use-after-scope sanitization.
4195
4196 2018-09-24 Richard Biener <rguenther@suse.de>
4197
4198 PR tree-optimization/63155
4199 * tree-ssa-propagate.c (add_ssa_edge): Avoid adding PHIs to
4200 the worklist when the edge of the respective argument isn't
4201 executable.
4202
4203 2018-09-23 Uros Bizjak <ubizjak@gmail.com>
4204
4205 * config/i386/i386.h (enum reg_class): Rename MASK_REGS to
4206 ALL_MASK_REGS and MASK_EVEX_REGS to MASK_REGS.
4207 (MASK_CLASS_P): Update for rename.
4208 (MAYBE_MASK_CLASS_P): Ditto.
4209 (REG_CLASS_NAMES): Update.
4210 (REG_CLASS_CONTENT): Update.
4211 * config/i386/i386.c (regclass_map): Update for MASK_REG
4212 and ALL_MASK_REGS rename.
4213 * config/i386/constraints.md (Yk): Update for rename.
4214 (k): Ditto.
4215
4216 2018-09-23 Uros Bizjak <ubizjak@gmail.com>
4217
4218 * config/i386/i386.h (enum reg_class): Remove
4219 EVEX_SSE_REGS and MOD4_SSE_REGS.
4220 (REG_CLASS_NAMES): Update.
4221 (REG_CLASS_CONTENT): Update.
4222 * config/i386/i386.c (regclass_map): Declare AVX-512 SSE
4223 registers as ALL_SSE_REGS.
4224 (ix86_additional_allocno_class_p): Remove.
4225 (TARGET_ADDITIONAL_ALLOCNO_CLASS_P): Remove.
4226 (ix86_register_priority): Lower priority of EVEX SSE registers.
4227 Use IN_RANGE macro where appropriate.
4228 (ix86_hard_regno_mode_ok): Merge AVX-5124FMAPS and
4229 AVX-5124VNNIW checks.
4230 (ix86_modes_tieable_p): Tie 512-bit SSE modes.
4231 * config/i386/sse.md (avx5124fmaddps_4fmaddps)
4232 (avx5124fmaddps_4fmaddps_mask, avx5124fmaddps_4fmaddps_maskz)
4233 (avx5124fmaddps_4fmaddss, avx5124fmaddps_4fmaddss_mask)
4234 (avx5124fmaddps_4fmaddss_maskz, avx5124fmaddps_4fnmaddps)
4235 (avx5124fmaddps_4fnmaddps_mask, avx5124fmaddps_4fnmaddps_maskz)
4236 (avx5124fmaddps_4fnmaddss, avx5124fmaddps_4fnmaddss_mask)
4237 (avx5124fmaddps_4fnmaddss_maskz, avx5124vnniw_vp4dpwssd)
4238 (avx5124vnniw_vp4dpwssd_mask, avx5124vnniw_vp4dpwssd_maskz)
4239 (avx5124vnniw_vp4dpwssds, avx5124vnniw_vp4dpwssds_mask)
4240 (avx5124vnniw_vp4dpwssds_maskz): Use "v" instead of "Yh" constraint.
4241 * config/i386/constraints.md (Yh): Remove.
4242
4243 2018-09-23 Uros Bizjak <ubizjak@gmail.com>
4244
4245 * config/i386/i386.c (regclass_map): Declare integer REX registers
4246 as GENERAL_REGS.
4247
4248 2018-09-23 Gerald Pfeifer <gerald@pfeifer.com>
4249
4250 * doc/service.texi (Service): Switch the fsf.org link to https.
4251
4252 2018-09-22 Chung-Ju Wu <jasonwucj@gmail.com>
4253
4254 PR target/86798
4255 * config/nds32/nds32.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
4256 Define to speculation_safe_value_not_needed.
4257
4258 2018-09-21 Florian Weimer <fweimer@redhat.com>
4259
4260 PR middle-end/81035
4261 * doc/extend.texi (Common Function Attributes): Mention that
4262 noreturn suppresses tail call optimization.
4263
4264 2018-09-21 Jeff Law <law@redhat.com>
4265
4266 * gimple-ssa-evrp.c (evrp_dom_walker::cleanup): Call
4267 vr_values::cleanup_edges_and_switches.
4268 * tree-vrp.c (to_remove_edges, to_update_switch_stmts): Moved into
4269 vr_values class.
4270 (identify_jump_threads): Remove EDGE_IGNORE handling.
4271 (execute_vrp): Move handling of to_remove_edges and
4272 to_update_switch_stmts into vr_values class member functions.
4273 * tree-vrp.h (switch_update, to_remove_edges): Remove declarations.
4274 (to_update_switch_stmts): Likewise.
4275 * vr-values.c: Include cfghooks.h.
4276 (vr_values::vr_values): Initialize to_remove_edges and
4277 to_update_switch_stmts.
4278 (vr_values::~vr_values): Verify to_remove_edges and
4279 to_update_switch_stmts are empty.
4280 (vr_values::simplify_switch_using_ranges): Set EDGE_IGNORE as needed.
4281 (vr_values::cleanup_edges_and_switches): New member function.
4282 * vr-values.h (vr_values): Add cleanup_edges_and_switches member
4283 function. Add new data members.
4284
4285 2018-09-21 David Malcolm <dmalcolm@redhat.com>
4286
4287 PR tree-optimization/87309
4288 * dumpfile.c (dump_context::begin_scope): Filter the dump_loc
4289 calls with pflags and alt_flags.
4290 (selftest::test_capture_of_dump_calls): Add test of interaction of
4291 MSG_OPTIMIZED_LOCATIONS with AUTO_DUMP_SCOPE.
4292
4293 2018-09-21 Olivier Hainque <hainque@adacore.com>
4294
4295 * config.gcc: Factorize and comment inclusion of vxworks-dummy.h.
4296
4297 2018-09-21 Olivier Hainque <hainque@adacore.com>
4298
4299 * config/vxworks.h (CLEAR_INSN_CACHE): #define to 1.
4300
4301 2018-09-21 Olivier Hainque <hainque@adacore.com>
4302
4303 * config/vxworks.h (VXWORKS_LIBGCC_SPEC): Remove -lc_internal.
4304 Merge block comment with the one ahead of VXWORKS_LIBS_RTP. Then:
4305 (VXWORKS_LIBS_RTP): Minor reordering.
4306
4307 2018-09-21 Olivier Hainque <hainque@adacore.com>
4308
4309 * config/vxworks.h (STARTFILE_PREFIX_SPEC): Define.
4310 (VXWORKS_LIBS_DIR_RTP): Remove definition and use.
4311
4312 2018-09-21 Olivier Hainque <hainque@adacore.com>
4313
4314 * config/vxworks.h (SIZE_TYPE): Account for TARGET_VXWORKS64.
4315 (PTRDIFF_TYPE): Likewise.
4316
4317 2018-09-21 Olivier Hainque <hainque@adacore.com>
4318
4319 * config.gcc: Enforce def of TARGET_VXWORKS64 to 1 from
4320 triplet, similar to support for VxWorks7.
4321 * config/vxworks-dummy.h: Provide a default definition
4322 of TARGET_VXWORKS64 to 0.
4323
4324 2018-09-21 Olivier Hainque <hainque@adacore.com>
4325
4326 * config/vxworks.h (TARGET_VXWORKS7): Move default definition ...
4327 * config/vxworks-dummy.h: here.
4328
4329 2018-09-21 Olivier Hainque <hainque@adacore.com>
4330
4331 * config.gcc: Prepend vxworks-dummy.h to tm_file for powerpc*
4332
4333 2018-09-21 Shaokun Zhang <zhangshaokun@hisilicon.com>
4334 Bo Zhou <zbo.zhou@hisilicon.com>
4335
4336 * config/aarch64/aarch64-cores.def (tsv110): New CPU.
4337 * config/aarch64/aarch64-tune.md: Regenerated.
4338 * doc/invoke.texi (AArch64 Options/-mtune): Add "tsv110".
4339 * config/aarch64/aarch64.c (tsv110_tunings): New tuning table.
4340 * config/aarch64/aarch64-cost-tables.h: Add "tsv110" extra costs.
4341
4342 2018-09-21 Andrew Stubbs <ams@codesourcery.com>
4343 Julian Brown <julian@codesourcery.com>
4344
4345 * builtins.c (get_builtin_sync_mem): Handle address spaces.
4346
4347 2018-09-21 Eric Botcazou <ebotcazou@adacore.com>
4348
4349 * config/rs6000/rs6000.c (rs6000_function_ok_for_sibcall): Return false
4350 if the call takes a static chain.
4351
4352 2018-09-21 Martin Liska <mliska@suse.cz>
4353
4354 * auto-profile.c (autofdo_source_profile::read): Do not
4355 set sum_all.
4356 (read_profile): Do not add working sets.
4357 (read_autofdo_file): Remove sum_all.
4358 (afdo_callsite_hot_enough_for_early_inline): Remove const
4359 qualifier.
4360 * coverage.c (struct counts_entry): Remove gcov_summary.
4361 (read_counts_file): Read new GCOV_TAG_OBJECT_SUMMARY,
4362 do not support GCOV_TAG_PROGRAM_SUMMARY.
4363 (get_coverage_counts): Remove summary and expected
4364 arguments.
4365 * coverage.h (get_coverage_counts): Likewise.
4366 * doc/gcov-dump.texi: Remove -w option.
4367 * gcov-dump.c (dump_working_sets): Remove.
4368 (main): Do not support '-w' option.
4369 (print_usage): Likewise.
4370 (tag_summary): Likewise.
4371 * gcov-io.c (gcov_write_summary): Do not dump
4372 histogram.
4373 (gcov_read_summary): Likewise.
4374 (gcov_histo_index): Remove.
4375 (gcov_histogram_merge): Likewise.
4376 (compute_working_sets): Likewise.
4377 * gcov-io.h (GCOV_TAG_OBJECT_SUMMARY): Mark
4378 it not obsolete.
4379 (GCOV_TAG_PROGRAM_SUMMARY): Mark it obsolete.
4380 (GCOV_TAG_SUMMARY_LENGTH): Adjust.
4381 (GCOV_HISTOGRAM_SIZE): Remove.
4382 (GCOV_HISTOGRAM_BITVECTOR_SIZE): Likewise.
4383 (struct gcov_summary): Simplify rapidly just
4384 to runs and sum_max fields.
4385 (gcov_histo_index): Remove.
4386 (NUM_GCOV_WORKING_SETS): Likewise.
4387 (compute_working_sets): Likewise.
4388 * gcov-tool.c (print_overlap_usage_message): Remove
4389 trailing empty line.
4390 * gcov.c (read_count_file): Read GCOV_TAG_OBJECT_SUMMARY.
4391 (output_lines): Remove program related line.
4392 * ipa-profile.c (ipa_profile): Do not consider GCOV histogram.
4393 * lto-cgraph.c (output_profile_summary): Do not stream GCOV
4394 histogram.
4395 (input_profile_summary): Do not read it.
4396 (merge_profile_summaries): And do not merge it.
4397 (input_symtab): Do not call removed function.
4398 * modulo-sched.c (sms_schedule): Do not print sum_max.
4399 * params.def (HOT_BB_COUNT_FRACTION): Reincarnate param that was
4400 removed when histogram method was invented.
4401 (HOT_BB_COUNT_WS_PERMILLE): Mention that it's used only in LTO
4402 mode.
4403 * postreload-gcse.c (eliminate_partially_redundant_load): Fix
4404 GCOV coding style.
4405 * predict.c (get_hot_bb_threshold): Use HOT_BB_COUNT_FRACTION
4406 and dump selected value.
4407 * profile.c (add_working_set): Remove.
4408 (get_working_sets): Likewise.
4409 (find_working_set): Likewise.
4410 (get_exec_counts): Do not work with working sets.
4411 (read_profile_edge_counts): Do not inform as sum_max is removed.
4412 (compute_branch_probabilities): Likewise.
4413 (compute_value_histograms): Remove argument for call of
4414 get_coverage_counts.
4415 * profile.h: Do not make gcov_summary const.
4416
4417 2018-09-21 Monk Chiang <sh.chiang04@gmail.com>
4418
4419 * config.gcc (nds32*-*-*): Set TARGET_DEFAULT_TLSDESC_TRAMPOLINE=0.
4420
4421 2018-09-21 Eric Botcazou <ebotcazou@adacore.com>
4422
4423 PR tree-optimization/86990
4424 * gimple-ssa-store-merging.c (imm_store_chain_info:coalesce_immediate):
4425 Check that the entire merged store group is made of constants only for
4426 overlapping stores.
4427
4428 2018-09-20 Allan Sandfeld Jensen <allan.jensen@qt.io>
4429
4430 * gcc.c (LINK_COMMAND_SPEC): Handle -r like -nostdlib.
4431 (VTABLE_VERIFICATION_SPEC): Likewise.
4432 (SANITIZER_EARLY_SPEC): Likewise.
4433 (SANITIZER_SPEC): Likewise.
4434 * config/darwin.h (LINK_COMMAND_SPEC): Likewise.
4435 * doc/invoke.texi (Link Options): Document -r.
4436
4437 2018-09-20 Richard Biener <rguenther@suse.de>
4438
4439 PR middle-end/87054
4440 * gimplify.c (gimplify_expr): Retain alignment of
4441 addressable lvalue in dereference.
4442
4443 2018-09-20 Alexandre Oliva <aoliva@redhat.com>
4444
4445 PR bootstrap/87013
4446 * configure.ac: Check for .loc is_stmt support.
4447 * configure, config.in: Rebuilt.
4448 * dwarf2out.c (dwarf2out_source_line): Skip is_stmt
4449 if not supported.
4450
4451 2018-09-20 Segher Boessenkool <segher@kernel.crashing.org>
4452
4453 * config/rs6000/rs6000.opt (misel=no, misel=yes): Delete.
4454 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -misel=yes and
4455 -misel=no.
4456
4457 2018-09-20 Segher Boessenkool <segher@kernel.crashing.org>
4458
4459 * config/rs6000/rs6000-opts.h (enum rs6000_vector): Delete
4460 VECTOR_OTHER.
4461 * config/rs6000/rs6000.c (rs6000_debug_vector_unit): Delete
4462 case VECTOR_OTHER.
4463
4464 2018-09-20 Marek Polacek <polacek@redhat.com>
4465
4466 * doc/invoke.texi: Add -Wno-init-list-lifetime to C++ Language Options.
4467
4468 2018-09-20 Richard Sandiford <richard.sandiford@arm.com>
4469
4470 PR tree-optimization/87288
4471 * tree-vect-loop.c (vect_analyze_loop_2): Take PEELING_FOR_GAPS
4472 into account when determining PEELING_FOR_NITERS.
4473
4474 2018-09-20 Richard Sandiford <richard.sandiford@arm.com>
4475
4476 PR tree-optimization/86877
4477 * tree-vect-loop.c (vect_analyze_loop_2): Call
4478 vect_verify_datarefs_alignment.
4479
4480 2018-09-19 Marek Polacek <polacek@redhat.com>
4481
4482 * doc/invoke.texi: Document -Wclass-conversion.
4483
4484 2018-09-19 John David Anglin <danglin@gcc.gnu.org>
4485
4486 * config/pa/pa.c (pa_adjust_priority): Delete.
4487 (TARGET_SCHED_ADJUST_PRIORITY): Delete define.
4488
4489 * config/pa/pa.md (atomic_storeqi): Restore deleted expander.
4490 (atomic_storehi): Likewise.
4491 (atomic_storesi): Likewise.
4492 (atomic_loaddi): Restore compare and swap exchange loop code.
4493
4494 2018-09-19 Segher Boessenkool <segher@kernel.crashing.org>
4495
4496 PR rtl-optimization/86902
4497 * combine.c (try_combine): When changing the CC mode used, don't change
4498 an unrelated mode in other_insn to that new CC mode.
4499
4500 2018-09-19 David Malcolm <dmalcolm@redhat.com>
4501
4502 * tree-data-ref.c (runtime_alias_check_p): Use formatted printing
4503 with %T in place of calls to dump_generic_expr.
4504 (prune_runtime_alias_test_list): Likewise.
4505 (create_runtime_alias_checks): Likewise.
4506 * tree-vect-data-refs.c (vect_check_nonzero_value): Likewise.
4507 (vect_analyze_data_ref_dependence): Likewise.
4508 (vect_slp_analyze_data_ref_dependence): Likewise.
4509 (vect_record_base_alignment): Likewise. Use %G in place of call
4510 to dump_gimple_stmt.
4511 (vect_compute_data_ref_alignment): Likewise.
4512 (verify_data_ref_alignment): Likewise.
4513 (vect_find_same_alignment_drs): Likewise.
4514 (vect_analyze_group_access_1): Likewise.
4515 (vect_analyze_data_ref_accesses): Likewise.
4516 (dependence_distance_ge_vf): Likewise.
4517 (dump_lower_bound): Likewise.
4518 (vect_prune_runtime_alias_test_list): Likewise.
4519 (vect_find_stmt_data_reference): Likewise.
4520 (vect_analyze_data_refs): Likewise.
4521 (vect_create_addr_base_for_vector_ref): Likewise.
4522 (vect_create_data_ref_ptr): Likewise.
4523 * tree-vect-loop-manip.c (vect_set_loop_condition): Likewise.
4524 (vect_can_advance_ivs_p): Likewise.
4525 (vect_update_ivs_after_vectorizer): Likewise.
4526 (vect_gen_prolog_loop_niters): Likewise.
4527 (vect_prepare_for_masked_peels): Likewise.
4528 * tree-vect-loop.c (vect_determine_vf_for_stmt): Likewise.
4529 (vect_determine_vectorization_factor): Likewise.
4530 (vect_is_simple_iv_evolution): Likewise.
4531 (vect_analyze_scalar_cycles_1): Likewise.
4532 (vect_analyze_loop_operations): Likewise.
4533 (report_vect_op): Likewise.
4534 (vect_is_slp_reduction): Likewise.
4535 (check_reduction_path): Likewise.
4536 (vect_is_simple_reduction): Likewise.
4537 (vect_create_epilog_for_reduction): Likewise.
4538 (vect_finalize_reduction:): Likewise.
4539 (vectorizable_induction): Likewise.
4540 (vect_transform_loop_stmt): Likewise.
4541 (vect_transform_loop): Likewise.
4542 (optimize_mask_stores): Likewise.
4543 * tree-vect-patterns.c (vect_pattern_detected): Likewise.
4544 (vect_split_statement): Likewise.
4545 (vect_recog_over_widening_pattern): Likewise.
4546 (vect_recog_average_pattern): Likewise.
4547 (vect_determine_min_output_precision_1): Likewise.
4548 (vect_determine_precisions_from_range): Likewise.
4549 (vect_determine_precisions_from_users): Likewise.
4550 (vect_mark_pattern_stmts): Likewise.
4551 (vect_pattern_recog_1): Likewise.
4552 * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
4553 (vect_record_max_nunits): Likewise.
4554 (vect_build_slp_tree_1): Likewise.
4555 (vect_build_slp_tree_2): Likewise.
4556 (vect_print_slp_tree): Likewise.
4557 (vect_analyze_slp_instance): Likewise.
4558 (vect_detect_hybrid_slp_stmts): Likewise.
4559 (vect_detect_hybrid_slp_1): Likewise.
4560 (vect_slp_analyze_operations): Likewise.
4561 (vect_slp_analyze_bb_1): Likewise.
4562 (vect_transform_slp_perm_load): Likewise.
4563 (vect_schedule_slp_instance): Likewise.
4564 * tree-vect-stmts.c (vect_mark_relevant): Likewise.
4565 (vect_mark_stmts_to_be_vectorized): Likewise.
4566 (vect_init_vector_1): Likewise.
4567 (vect_get_vec_def_for_operand): Likewise.
4568 (vect_finish_stmt_generation_1): Likewise.
4569 (vect_check_load_store_mask): Likewise.
4570 (vectorizable_call): Likewise.
4571 (vectorizable_conversion): Likewise.
4572 (vectorizable_operation): Likewise.
4573 (vectorizable_load): Likewise.
4574 (vect_analyze_stmt): Likewise.
4575 (vect_is_simple_use): Likewise.
4576 (vect_get_vector_types_for_stmt): Likewise.
4577 (vect_get_mask_type_for_stmt): Likewise.
4578 * tree-vectorizer.c (increase_alignment): Likewise.
4579
4580 2018-09-19 Andrew Stubbs <ams@codesourcery.com>
4581
4582 * doc/rtl.texi: Adjust vec_select description.
4583 * simplify-rtx.c (simplify_binary_operation_1): Allow VEC_SELECT to use
4584 non-constant selectors.
4585
4586 2018-09-19 Matthew Malcomson <matthew.malcomson@arm.com>
4587
4588 * config/aarch64/aarch64-protos.h
4589 (aarch64_offset_9bit_signed_unscaled_p): New declaration.
4590 * config/aarch64/aarch64.md (arches): New "rcpc8_4" attribute value.
4591 (arch_enabled): Add check for "rcpc8_4" attribute value of "arch".
4592 * config/aarch64/aarch64.h (AARCH64_FL_RCPC8_4): New bitfield.
4593 (AARCH64_FL_FOR_ARCH8_4): Include AARCH64_FL_RCPC8_4.
4594 (AARCH64_FL_PROFILE): Move index so flags are ordered.
4595 (AARCH64_ISA_RCPC8_4): New flag.
4596 * config/aarch64/aarch64.c (offset_9bit_signed_unscaled_p): Renamed
4597 to aarch64_offset_9bit_signed_unscaled_p.
4598 * config/aarch64/atomics.md (atomic_store<mode>): Allow offset
4599 and use stlur.
4600 * config/aarch64/constraints.md (Ust): New constraint.
4601 * config/aarch64/predicates.md.
4602 (aarch64_9bit_offset_memory_operand): New predicate.
4603 (aarch64_rcpc_memory_operand): New predicate.
4604
4605 2018-09-19 Eric Botcazou <ebotcazou@adacore.com>
4606
4607 PR rtl-optimization/87361
4608 * rtlanal.c (nonzero_bits1): Revert accidental change.
4609
4610 2018-09-19 Richard Biener <rguenther@suse.de>
4611
4612 PR tree-optimization/87349
4613 PR tree-optimization/87342
4614 * tree-ssa-sccvn.c (do_rpo_vn): Iterate max_rpo computation.
4615
4616 2018-09-18 Marek Polacek <polacek@redhat.com>
4617
4618 P1064R0 - Allowing Virtual Function Calls in Constant Expressions
4619 * gimple-fold.c (gimple_get_virt_method_for_vtable): Adjust assert.
4620
4621 2018-09-18 Segher Boessenkool <segher@kernel.crashing.org>
4622
4623 * config/rs6000/rs6000.md: Remove old "Cygnus sibcall" comment.
4624
4625 2018-09-18 Segher Boessenkool <segher@kernel.crashing.org>
4626
4627 PR rtl-optimization/86882
4628 * rtlanal.c (reg_overlap_mentioned_p): Handle CLOBBER.
4629
4630 2018-09-18 Uros Bizjak <ubizjak@gmail.com>
4631
4632 * config/i386/i386.md (*<code>extend<mode>xf2): Macroize insn from
4633 *<code>extendsfxf2 and *<code>extenddfxf2 using MODEF mode iterator.
4634
4635 2018-09-18 Jonathan Wakely <jwakely@redhat.com>
4636
4637 PR other/87353
4638 * doc/invoke.texi (Link Options): Fix formatting and grammar.
4639
4640 2018-09-18 Richard Biener <rguenther@suse.de>
4641
4642 PR middle-end/63155
4643 * tree-ssa-coalesce.c (tree_int_map_hasher): Remove.
4644 (compute_samebase_partition_bases): Likewise.
4645 (coalesce_ssa_name): Always use compute_optimized_partition_bases.
4646 (gimple_can_coalesce_p): Simplify.
4647
4648 2018-09-18 Hans-Peter Nilsson <hp@bitrange.com>
4649
4650 Handle a library implementation of ffs calling __builtin_ffs.
4651 * config/mmix/mmix.c (TARGET_INIT_LIBFUNCS): Override with...
4652 (mmix_init_libfuncs): New function: make __builtin_ffs expand
4653 to __ffsdi2.
4654
4655 2018-09-17 David Malcolm <dmalcolm@redhat.com>
4656
4657 * diagnostic-show-locus.c (class layout_range): Add field
4658 "m_original_idx".
4659 (layout_range::layout_range): Add "original_idx" param and use it
4660 to initialize new field.
4661 (make_range): Use 0 for original_idx.
4662 (layout::layout): Pass in index to calls to
4663 maybe_add_location_range.
4664 (layout::maybe_add_location_range): Add param "original_idx" and
4665 pass it on to layout_range.
4666 (layout::print_any_labels): Pass on range->m_original_idx to
4667 get_text call.
4668 (gcc_rich_location::add_location_if_nearby): Use 0 for
4669 original_idx.
4670 * gcc-rich-location.h (text_range_label::get_text): Update for new
4671 param.
4672 (range_label_for_type_mismatch::get_text): Likewise.
4673
4674 2018-09-17 Uros Bizjak <ubizjak@gmail.com>
4675
4676 * config/i386/i386.c (ix86_emit_i387_log1p): Emit fldln2 earlier.
4677
4678 2018-09-17 David Malcolm <dmalcolm@redhat.com>
4679
4680 * gimple-ssa-sprintf.c (fmtwarn): Update for introduction of
4681 format_string_diagnostic_t.
4682 (fmtwarn_n): Likewise.
4683 * substring-locations.c
4684 (format_string_diagnostic_t::format_string_diagnostic_t) New ctor.
4685 (format_warning_n_va): Convert to...
4686 (format_string_diagnostic_t::emit_warning_n_va): ...this.
4687 (format_warning_va): Convert to...
4688 (format_string_diagnostic_t::emit_warning_va): ...this.
4689 (format_warning_at_substring): Convert to...
4690 (format_string_diagnostic_t::emit_warning): ...this.
4691 (format_warning_at_substring_n): Convert to...
4692 (format_string_diagnostic_t::emit_warning_n): ...this.
4693 * substring-locations.h (class format_string_diagnostic_t): New
4694 class.
4695 (format_warning_va): Convert to
4696 format_string_diagnostic_t::emit_warning_va.
4697 (format_warning_n_va): Convert to
4698 format_string_diagnostic_t::emit_warning_n_va.
4699 (format_warning_at_substring): Convert to
4700 format_string_diagnostic_t::emit_warning.
4701 (format_warning_at_substring_n): Convert to
4702 format_string_diagnostic_t::emit_warning_n.
4703
4704 2018-09-17 Cesar Philippidis <cesar@codesourcery.com>
4705 Bernd Schmidt <bernds_cb1@t-online.de>
4706
4707 * config/nvptx/nvptx.md (atomic_fetch_<logic><mode>): Enable with
4708 SImode args.
4709
4710 2018-09-17 Uros Bizjak <ubizjak@gmail.com>
4711
4712 * config/i386/i386.md (truncxf<mode>2_i387_noop_unspec): Change
4713 operand 0 predicate to nonimmediate operand.
4714 (rint<mode>2_frndint): Remove insn pattern.
4715 (rint<mode>2): Change operand 1 predicate to general_operand.
4716 Extend operand 1 to XFmode and generate rintxf2 insn.
4717 (frndintxf2_<rounding>): Rename from frndint<mode>2_<rounding>.
4718 Do not use X87MODEF mode macro.
4719 (frndintxf2_<rounding>_i387): Rename from
4720 frndint<mode>2_<rounding>_i387. Do not use X87MODEF mode macro.
4721 (<rounding_insn><mode>2): For non-SSE modes, extend operand 1
4722 to XFmode and generate significandxf3 insn.
4723
4724 2018-09-17 Richard Biener <rguenther@suse.de>
4725
4726 PR tree-optimization/87328
4727 * tree-ssa-sccvn.c (process_bb): Remove assertion about not
4728 visiting unexecutable backedges when not iterating.
4729 (do_rpo_vn): Mark all edges not executable even when not
4730 iterating.
4731
4732 2018-09-17 Martin Jambor <mjambor@suse.cz>
4733
4734 PR c/63886
4735 * doc/invoke.texi (Warning Options): Likewise.
4736
4737 2018-09-17 Richard Biener <rguenther@suse.de>
4738
4739 PR tree-optimization/87301
4740 * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_cleanup): Properly
4741 clean EH info from leftover copy assignments.
4742
4743 2018-09-17 Martin Liska <mliska@suse.cz>
4744
4745 PR gcov-profile/85871
4746 * gcov.c (output_intermediate_file): Fix out of bounds
4747 access.
4748
4749 2018-09-17 Vineet Gupta <vgupta@synopsys.com>
4750
4751 * config/arc/arc.c: Object attributes for core4 not reflected
4752 correctly.
4753 * config/arc/arc.h: Don't restrict DBNZ to core3 (core4 includes
4754 core3).
4755
4756 2018-09-17 Alexey Brodkin <abrodkin@synopsys.com>
4757
4758 * config/arc/linux.h (LINK_EH_SPEC): Add missing space.
4759
4760 2018-09-17 Martin Liska <mliska@suse.cz>
4761
4762 * doc/gcov.texi: Document new option --use-hotness-colors.
4763 * gcov.c (struct source_info): Declare new field.
4764 (source_info::source_info): Set default for maximum_count.
4765 (print_usage): Add new -q option.
4766 (process_args): Process it.
4767 (accumulate_line_info): Save src->maximum_count.
4768 (output_line_beginning): Make color line number if
4769 flag_use_hotness_colors is set.
4770 (output_line_details): Pass default argument value.
4771 (output_lines): Pass src->maximum_count.
4772
4773 2018-09-17 Martin Liska <mliska@suse.cz>
4774
4775 * common/config/i386/i386-common.c (ix86_get_valid_option_values):
4776 Use processor_names table.
4777 * config/i386/i386.c (ix86_default_align): Use
4778 processor_cost_table for alignment values.
4779 (ix86_option_override_internal): Use processor_names.
4780 (ix86_function_specific_print): Likewise.
4781 * config/i386/i386.h (struct processor_costs):
4782 Add alignment values.
4783 (struct ptt): Remove and replace with const char *.
4784 * config/i386/x86-tune-costs.h (struct processor_costs):
4785 Declare default alignments for all costs.
4786
4787 2018-09-17 Aldy Hernandez <aldyh@redhat.com>
4788
4789 * tree-vrp.c (extract_range_from_unary_expr): Do not special case
4790 symbolics or VR_VARYING ranges for ABS_EXPR.
4791 * wide-int-range.cc (wide_int_range_abs): Return positive numbers
4792 when range will wrap.
4793
4794 2018-09-15 Eric Botcazou <ebotcazou@adacore.com>
4795
4796 PR middle-end/86864
4797 * cfgexpand.c (expand_gimple_basic_block): Be prepared for a BARRIER
4798 before and after a JUMP_TABLE_DATA.
4799
4800 2018-09-14 John David Anglin <danglin@gcc.gnu.org>
4801
4802 PR middle-end/87188
4803 * dojump.c (do_compare_and_jump): Canonicalize function pointers
4804 when one operand is a function pointer. Use POINTER_TYPE_P and
4805 FUNC_OR_METHOD_TYPE_P.
4806 * expr.c (do_store_flag): Use POINTER_TYPE_P and FUNC_OR_METHOD_TYPE_P.
4807 * fold-const.c (build_range_check): Likewise.
4808 * match.pd (simple_comparison): Likewise.
4809
4810 2018-09-14 David Malcolm <dmalcolm@redhat.com>
4811
4812 PR c/82967
4813 * spellcheck.c (get_edit_distance_cutoff): New function.
4814 (selftest::test_edit_distance_unit_test_oneway): Rename to...
4815 (selftest::test_get_edit_distance_one_way): ...this.
4816 (selftest::test_get_edit_distance_unit): Rename to...
4817 (selftest::test_get_edit_distance_both_ways): ...this.
4818 (selftest::test_edit_distances): Move tests to this new function,
4819 and test some more pairs of strings. Update for above renaming.
4820 (selftest::get_old_cutoff): New function.
4821 (selftest::test_get_edit_distance_cutoff): New function.
4822 (selftest::assert_suggested_for): New function.
4823 (ASSERT_SUGGESTED_FOR): New macro.
4824 (selftest::assert_not_suggested_for): New function.
4825 (ASSERT_NOT_SUGGESTED_FOR): New macro.
4826 (selftest::test_suggestions): New function.
4827 (selftest::spellcheck_c_tests): Move test_get_edit_distance_unit
4828 tests to selftest::test_edit_distances and call it. Add calls to
4829 selftest::test_get_edit_distance_cutoff and
4830 selftest::test_suggestions.
4831 * spellcheck.h (get_edit_distance_cutoff): New function declaration.
4832 (best_match::consider): Replace hard-coded cutoff calculation with
4833 a call to...
4834 (best_match::get_cutoff): New declaration.
4835 (best_match::get_best_meaningful_candidate): Likewise.
4836
4837 2018-09-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
4838
4839 * builtins.c (fold_builtin_strlen): Remove TODO comment.
4840
4841 2018-09-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
4842
4843 revert:
4844 2018-07-30 Bernd Edlinger <bernd.edlinger@hotmail.de>
4845
4846 * tree-ssa-forwprop.c (simplify_builtin_call): Don't create a not NUL
4847 terminated string literal.
4848
4849 2018-09-14 Martin Sebor <msebor@redhat.com>
4850
4851 * builtins.c (unterminated_array): Handle ARRAY_REF.
4852 (expand_builtin_stpcpy_1): Detect unterminated char arrays.
4853 * builtins.h (unterminated_array): Declare extern.
4854 * gimple-fold.c (gimple_fold_builtin_stpcpy): Detect unterminated
4855 arrays.
4856 (gimple_fold_builtin_sprintf): Propagate NO_WARNING to transformed
4857 calls.
4858
4859 2018-09-14 Martin Sebor <msebor@redhat.com>
4860 Jeff Law <law@redhat.com>
4861
4862 * builtins.c (unterminated_array): New.
4863 (expand_builtin_strcpy): Adjust.
4864 (expand_builtin_strcpy_args): Detect unterminated arrays.
4865 * gimple-fold.c (get_maxval_strlen): Add argument. Detect
4866 unterminated arrays.
4867 * gimple-fold.h (get_maxval_strlen): Add argument.
4868 (gimple_fold_builtin_strcpy): Detec unterminated arrays.
4869
4870 * gimple-fold.c (get_range_strlen): Add argument.
4871 (get_maxval_strlen): Adjust.
4872 * gimple-fold.h (get_range_strlen): Add argument.
4873
4874 2018-09-14 Wei Xiao <wei3.xiao@intel.com>
4875
4876 * config/i386/movdirintrin.h: Fix copyright year.
4877
4878 2018-09-14 Uros Bizjak <ubizjak@gmail.com>
4879
4880 * reg-stack.c: Include regs.h.
4881 (replace_reg): Assert that mode is MODE_FLOAT or MODE_COMPLEX_FLOAT.
4882 (emit_pop_insn): Default pop insn mode to the reg_raw_mode of
4883 FIRST_STACK_REG, not DFmode.
4884 (emit_swap_insn): Default swap insn mode to the reg_raw_mode of
4885 FIRST_STACK_REG, not XFmode. Explicitly construct swap RTX.
4886 (change stack): Default register mode to the reg_raw_mode of
4887 FIRST_STACK_REG, not DFmode.
4888 * config/i386/i386.md (*swap<mode>): Remove insn pattern.
4889 (*swapxf): Rename from swapxf.
4890
4891 2018-09-14 Carl Love <cel@us.ibm.com>
4892
4893 * config/rs6000/emmintrin.h: Add _MM_SHUFFLE2.
4894 * config/rs6000/xmmintrin.h: Add _MM_SHUFFLE.
4895
4896 2018-09-14 Segher Boessenkool <segher@kernel.crashing.org>
4897
4898 PR target/87224
4899 * config/rs6000/rs6000.md (*mov<mode>_hardfloat64): Add Z to the Y
4900 alternatives.
4901
4902 2018-09-14 Sam Tebbs <sam.tebbs@arm.com>
4903
4904 PR target/85628
4905 * config/aarch64/aarch64.md (*aarch64_bfxilsi_uxtw): Define.
4906
4907 2018-09-14 Jason Merrill <jason@redhat.com>
4908
4909 Fix --enable-gather-detailed-mem-stats.
4910 * hash-table.c (hash_table_usage): Change from variable to function.
4911 * hash-table.h: Adjust.
4912 * Makefile.in: Add missing dependencies on hash-table.h.
4913
4914 2018-09-14 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
4915
4916 PR tree-optimization/87259
4917 PR lto/87283
4918 (pass_cse_reciprocals::execute): Run optimize_recip_sqrt after
4919 execute_cse_reciprocals_1 has tried transforming.
4920
4921 2018-09-14 Aldy Hernandez <aldyh@redhat.com>
4922
4923 * tree-vrp.c (extract_range_from_binary_expr_1): Normalize
4924 VR_VARYING for PLUS/MINUS_EXPR.
4925
4926 2018-09-14 Ilya Leoshkevich <iii@linux.ibm.com>
4927
4928 * config/s390/s390-passes.def (INSERT_PASS_BEFORE): Improve
4929 formatting.
4930
4931 2018-09-14 Richard Biener <rguenther@suse.de>
4932
4933 PR middle-end/63155
4934 * tree-ssa-coalesce.c (ssa_conflicts_merge): Remove conflict
4935 bits for the merged partition.
4936
4937 2018-09-13 Martin Sebor <msebor@redhat.com>
4938 Bernd Edlinger <bernd.edlinger@hotmail.de>
4939
4940 * builtins.h (c_srlen): Add argument.
4941 * builtins.c (warn_string_no_nul): New function.
4942 (c_strlen): Add argument and use it. Update recursive calls.
4943 Pass DECL argument to string_constant to get info on non
4944 terminated strings. Update *NONSTR as needed.
4945 (fold_builtin_strlen): Add argument to calls to c_strlen.
4946 Warn for unterminated arrays.
4947 (warn_string_no_null): Add prototype.
4948 * expr.c (string_constant): Update arguments. Update recursive
4949 calls appropriately. Detect missing NUL terminator and outermost
4950 declaration its missing in.
4951 Improve checks for arrays with nonzero lower bound or elements
4952 that are not a single byte. Simplify offset computation.
4953 Simplify checks for non-NUL terminated strings.
4954 * gimple-fold.c (get_range_strlen): Add argument to c_strlen call.
4955 * gimple-ssa-sprintf.c (get_string_length): Remove unnecessary code.
4956
4957 2018-09-13 Bernd Edlinger <bernd.edlinger@hotmail.de>
4958
4959 * builtins.c (c_strlen): Handle not zero terminated STRING_CSTs
4960 correctly.
4961 * fold-const.c (c_getstr): Fix function comment. Remove unused third
4962 argument. Fix range checks.
4963 * fold-const.h (c_getstr): Adjust protoype.
4964 * gimple-fold.c (gimple_fold_builtin_memory_op): Avoid folding when
4965 string is constant but contains no NUL byte.
4966
4967 * expr.c (string_constant): Adjust function comment.
4968 Remove bogus check for zero termination.
4969
4970 * fold-const.c (c_getstr): Clamp STRING_LENGTH to STRING_SIZE.
4971
4972 * varasm.c (compare_constant): Compare type size of STRING_CSTs.
4973 (get_constant_size): Don't make STRING_CSTs larger than they are.
4974 (check_string_literal): New check function for STRING_CSTs.
4975 (output_constant): Use it.
4976
4977 2018-09-13 Eric Botcazou <ebotcazou@adacore.com>
4978
4979 PR target/86812
4980 * config/visium/visium.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define.
4981
4982 2018-09-13 Richard Biener <rguenther@suse.de>
4983
4984 PR tree-optimization/87263
4985 * tree-ssa-sccvn.c (visit_phi): Revert some earlier changes.
4986 (struct unwind_state): Add max_rpo field.
4987 (do_rpo_vn): Allow up-to-date loop state to be used when not iterating.
4988 Compute max_rpo, the max RPO number a block can be backwards reached
4989 from. Re-write non-iterating mode to a RPO ordered worklist approach,
4990 separating it from the iterating mode.
4991
4992 2018-09-13 Vlad Lazar <vlad.lazar@arm.com>
4993
4994 * haifa-sched.c (rank_for_schedule): Schedule by INSN_COST.
4995 (rfs_decision): New scheduling decision.
4996
4997 2018-09-13 Richard Biener <rguenther@suse.de>
4998
4999 PR bootstrap/87134
5000 * tree-ssa-sccvn.c (vn_nary_op_insert_into): Fix assert.
5001 (vn_nary_op_insert_pieces_predicated): Do not write useless
5002 valid_dominated_by_p entry outside of the allocated storage.
5003
5004 2018-09-13 Omar Sandoval <osandov@osandov.com>
5005 Tom de Vries <tdevries@suse.de>
5006
5007 PR debug/86985
5008 * dwarf2out.c (is_c): New function.
5009 (add_subscript_info): Add DW_AT_count of 0 for C zero-length arrays.
5010
5011 2018-09-13 Sam Tebbs <sam.tebbs@arm.com>
5012
5013 PR target/85628
5014 * config/aarch64/aarch64.md (*aarch64_bfxil):
5015 Define.
5016 * config/aarch64/constraints.md (Ulc): Define.
5017 * config/aarch64/aarch64-protos.h (aarch64_high_bits_all_ones_p):
5018 Define.
5019 * config/aarch64/aarch64.c (aarch64_high_bits_all_ones_p):
5020 New function.
5021
5022 2018-09-13 Vlad Lazar <vlad.lazar@arm.com>
5023
5024 * config/aarch64/aarch64.h (TARGET_COMPUTE_FRAME_LAYOUT): Define.
5025 * config/aarch64/aarch64.c (aarch64_expand_prologue): Remove
5026 aarch64_layout_frame call.
5027 (aarch64_expand_epilogue): Likewise.
5028 (aarch64_initial_elimination_offset): Likewise.
5029 (aarch64_get_separate_components): Likewise.
5030 (aarch64_use_return_insn_p): Likewise.
5031 (aarch64_layout_frame): Remove unneeded check.
5032
5033 2018-09-13 Jakub Jelinek <jakub@redhat.com>
5034
5035 * configure.ac: Only append
5036 " : (reconfigured) $TOPLEVEL_CONFIGURE_ARGUMENTS" to
5037 gcc_config_arguments if it was never reconfigured or last reconfigure
5038 was with different arguments.
5039 * configure: Regenerated.
5040
5041 2018-09-13 Jakub Jelinek <jakub@redhat.com>
5042 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
5043
5044 PR middle-end/87290
5045 * expr.c (maybe_optimize_pow2p_mod_cmp): New function.
5046 (maybe_optimize_mod_cmp): Use it if integer_pow2p treeop1.
5047
5048 2018-09-13 Jakub Jelinek <jakub@redhat.com>
5049
5050 PR tree-optimization/87287
5051 * fold-const.c (fold_binary_loc) <case EQ_EXPR>: Move signed modulo
5052 X % C == 0 to X % (unsigned) C == 0 optimization to ...
5053 * match.pd (X % C == 0): ... here. New optimization.
5054
5055 2018-09-12 Jakub Jelinek <jakub@redhat.com>
5056
5057 PR middle-end/82853
5058 * expr.h (maybe_optimize_mod_cmp): Declare.
5059 * expr.c (mod_inv): New function.
5060 (maybe_optimize_mod_cmp): New function.
5061 (do_store_flag): Use it.
5062 * cfgexpand.c (expand_gimple_cond): Likewise.
5063
5064 2018-09-09 Cesar Philippidis <cesar@codesourcery.com>
5065 Julian Brown <julian@codesourcery.com>
5066
5067 PR middle-end/86336
5068 * gimplify.c (gimplify_scan_omp_clauses): Set
5069 target_firstprivatize_array_bases in OpenACC parallel and kernels
5070 region contexts. Remove GOMP_MAP_FIRSTPRIVATE_REFERENCE clauses from
5071 OpenACC data regions.
5072
5073 2018-09-12 Uros Bizjak <ubizjak@gmail.com>
5074
5075 * config/i386/i386.md (sqrt_extend<mode>xf3_i387): Remove.
5076 (sqrt<mode>2): Extend operand 1 to XFmode and generate sqrtxf3 insn.
5077
5078 2018-09-12 Richard Biener <rguenther@suse.de>
5079
5080 PR tree-optimization/87280
5081 * tree-ssa-sccvn.c (process_bb): Handle the case of executable
5082 edge but unreachable target.
5083 (do_rpo_vn): For conservatively handling a PHI only mark
5084 the backedge executable but not the block reachable.
5085
5086 2018-09-12 Richard Biener <rguenther@suse.de>
5087
5088 PR tree-optimization/87266
5089 * tree-ssa-sccvn.c (do_rpo_vn): Always iterate to not yet
5090 visited blocks.
5091
5092 2018-09-12 Andreas Krebbel <krebbel@linux.ibm.com>
5093
5094 * config/s390/s390.md (PFPO_RND_MODE_DFP, PFPO_RND_MODE_BFP): New
5095 constants.
5096 ("trunc<BFP:mode><DFP_ALL:mode>2")
5097 ("trunc<DFP_ALL:mode><BFP:mode>2")
5098 ("extend<BFP:mode><DFP_ALL:mode>2")
5099 ("extend<DFP_ALL:mode><BFP:mode>2"): Set proper rounding mode
5100 according to the target operand type.
5101
5102 2018-09-12 Jakub Jelinek <jakub@redhat.com>
5103 Andreas Krebbel <krebbel@linux.ibm.com>
5104
5105 PR tree-optimization/86844
5106 * gimple-ssa-store-merging.c
5107 (imm_store_chain_info::coalesce_immediate): For overlapping stores, if
5108 there are any overlapping stores in between them, make sure they are
5109 also coalesced or we give up completely.
5110
5111 2018-09-12 Jakub Jelinek <jakub@redhat.com>
5112
5113 PR middle-end/87248
5114 * fold-const.c (fold_ternary_loc) <case COND_EXPR>: Verify also that
5115 BIT_AND_EXPR's second operand is a power of two. Formatting fix.
5116
5117 2018-09-12 Tom de Vries <tdevries@suse.de>
5118
5119 * common.opt (gdescribe-dies): Add option.
5120 * dwarf2out.c (add_name_and_src_coords_attributes): Add description
5121 attribute for artifical and nameless decls.
5122 (dwarf2out_register_external_die): Add description attribute to
5123 external reference die.
5124 (add_desc_attribute): New functions.
5125 (gen_subprogram_die): Add description attribute to
5126 DW_TAG_call_site_parameter.
5127 * tree-pretty-print.c (print_generic_expr_to_str): New function.
5128 * tree-pretty-print.h (print_generic_expr_to_str): Declare.
5129 * doc/invoke.texi (@item Debugging Options): Add -gdescribe-dies and
5130 -gno-describe-dies.
5131 (@item -gdescribe-dies): Add.
5132
5133 2018-09-12 Aldy Hernandez <aldyh@redhat.com>
5134
5135 * tree-vrp.c (vrp_shift_undefined_p): Remove.
5136 (extract_range_from_binary_expr_1: Call
5137 wide_int_range_shift_undefined_p instead of vrp_shift_undefined_p.
5138 * wide-int-range.h (wide_int_range_shift_undefined_p): Do not
5139 depend on sign.
5140
5141 2018-09-12 Aldy Hernandez <aldyh@redhat.com>
5142
5143 * gimple-ssa-warn-alloca.c
5144 (alloca_type_and_limit::alloca_type_and_limit): Initialize limit
5145 field for ALLOCA_BOUND_*_LARGE.
5146
5147 2018-09-11 Nathan Sidwell <nathan@acm.org>
5148
5149 * gcc.c (load_specs, execute, run_attempt): Use %qs not '%s'.
5150
5151 2018-09-11 Uros Bizjak <ubizjak@gmail.com>
5152
5153 * reg-stack.c (subst_asm_stack_regs): Call replace_reg also
5154 for clobbers. Remove obsolete comment.
5155
5156 2018-09-11 Uros Bizjak <ubizjak@gmail.com>
5157
5158 * config/i386/i386.md (define_attr "type"): Remove mpxmov, mpxmk,
5159 mpxchk, mpxld and mpxst types.
5160 (define_attr length_immediate): Remove all processing of mpx types.
5161 (define_attr prefix_0f): Ditto.
5162 (define_attr memory): Ditto.
5163
5164 2018-09-11 Uros Bizjak <ubizjak@gmail.com>
5165
5166 * config/i386/i386.md (fyl2x_extend<mode>xf3_i387): Remove.
5167 (log<mode>2): Change operand 1 predicate to general_operand.
5168 Extend operand 1 to XFmode and generate logxf3 insn.
5169 (log10<mode>2): Change operand 1 predicate to general_operand.
5170 Extend operand 1 to XFmode and generate log10xf3 insn.
5171 (log2<mode>2): Change operand 1 predicate to general_operand.
5172 Extend operand 1 to XFmode and generate log2xf3 insn.
5173 (fyl2xp1_extend<mode>xf3_i387): Remove.
5174 (log1p<mode>2): Change operand 1 predicate to general_operand.
5175 Extend operand 1 to XFmode and generate log1pxf3 insn.
5176 (fxtract_extend<mode>xf3_i387): Remove.
5177 (logb<mode>2): Change operand 1 predicate to general_operand.
5178 Extend operand 1 to XFmode and generate logbxf3 insn.
5179 (ilogb<mode>2): Change operand 1 predicate to general_operand.
5180 Extend operand 1 to XFmode and generate fxtractxf3_i387 insn.
5181 (significand<mode>2): Change operand 1 predicate to general_operand.
5182 Extend operand 1 to XFmode and generate significandxf3 insn.
5183
5184 2018-09-11 Nathan Sidwell <nathan@acm.org>
5185
5186 * gcc.c (perror_with_name, pfatal_with_name): Delete.
5187 (load_specs): Use fatal_error.
5188 (DELETE_IF_ORDINARY, process_command): Use error.
5189 (execute, run_attempt): Use fatal_error.
5190
5191 2018-09-11 Andrew Stubbs <ams@codesourcery.com>
5192
5193 * diagnostic-core.h (sorry_at): New prototype.
5194 * diagnostic.c (sorry_at): New function.
5195
5196 2018-09-11 Aldy Hernandez <aldyh@redhat.com>
5197
5198 * tree-vrp.c (extract_range_from_binary_expr_1): Treat all divisions
5199 by zero as VR_UNDEFINED.
5200
5201 2018-09-10 Uros Bizjak <ubizjak@gmail.com>
5202
5203 * config/i386/i386.md (<sincos>xf2): Rename from *<sincos>xf2_i387.
5204 (*<sincos>_extend<mode>xf2_i387): Remove insn pattern.
5205 (<sincos>mode2): New expander.
5206 (sincos_extend<mode>xf3_i387): Remove insn pattern.
5207 (sincos -> sin, cos splitters): Remove splitter patterns.
5208 (sincos<mode>3): Change operand 2 predicate to general_operand.
5209 Extend operand 2 to XFmode and generate sincosxf3 insn.
5210 (fptanxf4_i387): Change mode of operands 0 and 3 to SFmode.
5211 Change operand 3 predicate to const1_operand.
5212 (fptan_extend<mode>xf4_i387): Remove insn pattern.
5213 (tanxf2): Update operands in the call to fptanxf4_i387.
5214 (tan<mode>2): Change operand 1 predicate to general_operand.
5215 Extend operand 1 to XFmode and generate tanxf3 insn.
5216 (atan2xf3): Rename from *fpatanxf3_i387.
5217 (fpatan_extend<mode>xf3_i387): Remove insn pattern.
5218 (atan2xf3): Remove expander.
5219 (atan2<mode<3): Change operand 1 and 2 predicates to general_operand.
5220 Extend operands 1 and 2 to XFmode and generate atan2xf3 insn.
5221 (atan<mode>2): Change operand 1 predicate to general_operand.
5222 Extend operand 1 to XFmode and generate atanxf3 insn.
5223
5224 2018-09-10 Uros Bizjak <ubizjak@gmail.com>
5225
5226 * config/i386/i386.md (x87/SSE constant load splitter): Use
5227 memory_operand instead of nonimmediate_operand for input operand
5228 predicate.
5229
5230 2018-09-09 Uros Bizjak <ubizjak@gmail.com>
5231
5232 * config/i386/i386.md (float partial SSE register stall splitter): Move
5233 splitter near its instruction pattern.
5234 (float_extend partial SSE register stall splitter): Ditto.
5235 (float_truncate partial SSE register stall splitter): Ditto.
5236
5237 2018-09-09 Hans-Peter Nilsson <hp@bitrange.com>
5238
5239 PR target/86794
5240 * config/mmix/mmix.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
5241 to speculation_safe_value_not_needed.
5242
5243 PR target/85666
5244 * config/mmix/mmix.c (mmix_assemble_integer): Handle byte-size
5245 non-CONST_INT rtx:es using assemble_integer_with_op ".byte".
5246 (MMIX_CFUN_NEEDS_SAVED_EH_RETURN_ADDRESS): Don't call
5247 leaf_function_p, instead use has_hard_reg_initial_val.
5248
5249 2018-09-09 Nathan Sidwell <nathan@acm.org>
5250
5251 * gcc.h (pfatal_with_name): Don't declare here.
5252 * gcc.c (pfatal_with_name): Make static.
5253
5254 2018-09-09 Xianmiao Qu <xianmiao_qu@c-sky.com>
5255
5256 * config/csky/csky.md (*cskyv2_adddi3, *cskyv2_subdi3): Add
5257 earlyclobber.
5258
5259 2018-09-08 John David Anglin <danglin@gcc.gnu.org>
5260
5261 PR rtl-optimization/85458
5262 * sel-sched.c (sel_target_adjust_priority): Allow backend adjust
5263 priority hook to reduce the priority of EXPR.
5264
5265 2018-09-07 Uros Bizjak <ubizjak@gmail.com>
5266
5267 * config/i386/i386.md (float<SWI48x:mode><MODEF:mode>2) Enable
5268 DImode for x87 on 32bit targets. Conditionally disable x87 modes
5269 with X87_ENABLE_FLOAT. Remove preparation code.
5270 (*float<SWI48:mode><MODEF:mode>2): Rename from
5271 *float<SWI48:mode><MODEF:mode>2_mixed. Handle x87, SSE and mixed
5272 math using "enabled" attribute.
5273 (*floatdi<MODEF:mode>2_i387): Rename from
5274 *float<SWI48x:mode><MODEF:mode>2_i387. Handle only DImode and
5275 enable for 32bit targets only.
5276 (floatdi<X87MODEF:mode>2_i387_with_xmm pre-reload splitter): New
5277 splitter.
5278 (floatdi<X87MODEF:mode>2_i387_with_xmm): Use register_operand
5279 as operand 1 predicate. Rewrite as define_insn_and_split.
5280 (floatdi<X87MODEF:mode>2_i387_with_xmm memory input splitter): Remove.
5281
5282 2018-09-06 Uros Bizjak <ubizjak@gmail.com>
5283
5284 * reg-stack.c (get_true_reg) <case FLOAT_TRUNCATE>: Reorder
5285 to fallthru to FLOAT case.
5286
5287 2018-09-06 Will Schmidt <will_schmidt@vnet.ibm.com>
5288
5289 PR target/86731
5290 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Update logic
5291 around folding of vec_sl to handle out of range shift values.
5292
5293 2018-09-06 Uros Bizjak <ubizjak@gmail.com>
5294
5295 * config/i386/i386.md (fix_trunc<mode>_fisttp_i387_1): Remove.
5296 Update callers to gen_fix_trunc<mode>_i387_fisttp
5297 (fix_trunc<mode>_i387_fisttp): Change operand 0 predicate to
5298 nonimmediate_operand.
5299 (fix_trunc<mode>_i387_fisttp_with_temp): Remove insn pattern
5300 and corresponding splitters.
5301 (*fix_trunc<mode>_i387_1): Always expand with fix_trunc<mode>_i387.
5302 (fix_truncdi_i387): Change operand 0 predicate to nonimmediate_operand.
5303 (fix_truncdi_i387_with_temp): Remove insn pattern
5304 and corresponding splitters.
5305 (fix_trunc<mode>_i387): Change operand 0 predicate to
5306 nonimmediate_operand.
5307 (fix_trunc<mode>_i387_with_temp): Remove insn pattern
5308 and corresponding splitters.
5309 (*fistdi2_1): Remove.
5310 (fistdi2): Ditto.
5311 (fistdi2_with_temp): Remove insn pattern and corresponding splitters.
5312 (lrintxfdi2): Remove expander. Reimplement as define_insn.
5313 (*fist<mode>2_1): Remove.
5314 (fist<mode>2): Ditto.
5315 (fist<mode>2_with_temp): Remove insn pattern and corresponding
5316 splitters.
5317 (lrintxf<mode>2): Remove expander. Reimplement as define_insn.
5318 (*fist<mode>2_<rounding>_1): Always expand with fist<mode>2_<rounding>.
5319 (fistdi2_<rounding>): Change operand 0 predicate to
5320 nonimmediate_operand.
5321 (fistdi2_<rounding>_with_temp): Remove insn pattern
5322 and corresponding splitters.
5323 (fist<mode>2_<rounding>): Change operand 0 predicate to
5324 nonimmediate_operand.
5325 (fist<mode>2_<rounding>_with_temp): Remove insn pattern
5326 and corresponding splitters.
5327
5328 (*fixuns_trunc<mode>si2_avx512f_zext): Depend on TARGET_SSE_MATH.
5329
5330 2018-09-06 Bernd Edlinger <bernd.edlinger@hotmail.de>
5331
5332 * varasm.c (output_constructor_regular_field): Check TYPE_SIZE_UNIT of
5333 the init value.
5334
5335 2018-09-06 Will Schmidt <will_schmidt@vnet.ibm.com>
5336
5337 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add support for
5338 early gimple folding of vec_splat().
5339 * tree-vect-generic.c: Remove static from tree_vec_extract() definition.
5340 * gimple-fold.h: Add an extern define for tree_vec_extract().
5341
5342 2018-09-06 Will Schmidt <will_schmidt@vnet.ibm.com>
5343
5344 * config/rs6000/rs6000.c (fold_mergehl_helper): Add types_compatible_p
5345 wrappers around TREE_TYPE comparisons.
5346
5347 2018-09-06 Ilya Leoshkevich <iii@linux.ibm.com>
5348
5349 PR target/80080
5350 * config/s390/predicates.md: Add nonsym_memory_operand.
5351 * config/s390/s390.c (s390_legitimize_cs_operand): If operand
5352 contains a SYMBOL_REF, load it into an intermediate pseudo.
5353 (s390_emit_compare_and_swap): Legitimize operand.
5354 * config/s390/s390.md: Use the new nonsym_memory_operand
5355 with UNSPECV_CAS patterns.
5356
5357 2018-09-06 Ilya Leoshkevich <iii@linux.ibm.com>
5358
5359 PR target/80080
5360 * config/s390/s390-passes.def: New file.
5361 * config/s390/s390-protos.h (class rtl_opt_pass): Add forward
5362 declaration.
5363 (make_pass_s390_early_mach): Add declaration.
5364 * config/s390/s390.c (make_pass_s390_early_mach):
5365 (s390_option_override): Remove dynamic registration.
5366 * config/s390/t-s390: Add s390-passes.def.
5367
5368 2018-09-06 Ilya Leoshkevich <iii@linux.ibm.com>
5369
5370 * config/s390/s390.c (s390_decompose_constant_pool_ref):
5371 Remove UNSPEC_LTREL_BASE check.
5372 (annotate_constant_pool_refs): Likewise.
5373 (find_constant_pool_ref): Likewise.
5374 (find_ltrel_base): Removed.
5375 (replace_ltrel_base): Removed.
5376 (s390_mainpool_finish): Remove replace_ltrel_base call.
5377 (s390_chunkify_start): Remove pending LTREL_BASE logic.
5378 (s390_chunkify_finish): Remove replace_ltrel_base call.
5379 * config/s390/s390.md: Remove UNSPEC_LTREL_BASE.
5380
5381 2018-09-06 Hans-Peter Nilsson <hp@axis.com>
5382
5383 PR target/86779
5384 * config/cris/cris.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
5385 to speculation_safe_value_not_needed.
5386
5387 2018-09-05 Cesar Philippidis <cesar@codesourcery.com>
5388 Bernd Schmidt <bernds_cb1@t-online.de>
5389
5390 * config/nvptx/nvptx-opts.h: New file.
5391 * config/nvptx/nvptx.c (nvptx_file_start): Print the correct .target.
5392 * config/nvptx/nvptx.h: Include "nvptx-opts.h".
5393 (ASM_SPEC): Define.
5394 (TARGET_SM35): New macro.
5395 * config/nvptx/nvptx.md (atomic_fetch_<logic><mode>): Enable with the
5396 correct predicate.
5397 * config/nvptx/nvptx.opt (ptx_isa, sm_30, sm_35): New enum and its
5398 values.
5399 (misa=): New option.
5400 * doc/invoke.texi (Nvidia PTX Options): Document -misa.
5401
5402 2018-09-05 Uros Bizjak <ubizjak@gmail.com>
5403
5404 * config/i386/i386.md (truncdfsf2): Remove expander.
5405 (truncdfsf2_with_temp): Ditto.
5406 (truncxf<mode>2): Ditto.
5407 (*truncdfsf_fast_mixed): Remove insn pattern.
5408 (*truncdfsf_fast_i387): Ditto.
5409 (*truncdfsf_mixed): Ditto.
5410 (*truncdfsf_i387): Ditto.
5411 (*truncdfsf2_i387_1): Ditto.
5412 (*truncxfsf2_mixed): Ditto.
5413 (*truncxfdf2_mixed): Ditto.
5414 (*truncxf<mode>2_i387_noop): Ditto. Update callers
5415 to call gen_truncxf<mode>2 instead.
5416 (*truncxf<mode>2_i387): Remove.
5417 (reg->reg splitters): Remove splitter pattern.
5418 (reg->mem splitters): Ditto.
5419
5420 (truncdfsf2): New insn pattern.
5421 (truncxf<mode>2): Ditto.
5422
5423 2018-09-05 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
5424
5425 * tree-ssa-math-opts.c (is_mult_by): New function.
5426 (is_square_of): Use the above.
5427 (optimize_recip_sqrt): New function.
5428 (pass_cse_reciprocals::execute): Use the above.
5429
5430 2018-09-05 Richard Biener <rguenther@suse.de>
5431
5432 PR bootstrap/87134
5433 * tree-ssa-sccvn.c (rpo_elim::eliminate_push_avail): Make sure
5434 to zero-init the emplaced vec.
5435
5436 2018-09-05 Martin Liska <mliska@suse.cz>
5437
5438 PR tree-optimization/87205
5439 * tree-switch-conversion.c (pass_lower_switch::execute):
5440 Group cases for switch statements.
5441
5442 2018-09-05 Richard Biener <rguenther@suse.de>
5443
5444 PR tree-optimization/87217
5445 * tree-ssa-sccvn.c (vuse_valueize): New.
5446 (vn_reference_lookup_pieces): Use it.
5447 (vn_reference_lookup): Likewise.
5448
5449 2018-09-05 Nathan Sidwell <nathan@acm.org>
5450
5451 PR c++/87137
5452 * stor-layout.c (place_field): Scan forwards to check last
5453 bitfield when ms_bitfield_placement is in effect.
5454
5455 2018-09-05 Richard Biener <rguenther@suse.de>
5456
5457 PR bootstrap/87225
5458 * tree-vect-stmts.c (vectorizable_simd_clone_call): Fix bogus
5459 return.
5460
5461 2018-09-05 Siddhesh Poyarekar <siddhesh@sourceware.org>
5462 Kugan Vivekanandarajah <kugan.vivekanandarajah@linaro.org>
5463
5464 * config/aarch64/falkor-tag-collision-avoidance.c: New file.
5465 * config.gcc (extra_objs): Build it.
5466 * config/aarch64/t-aarch64 (falkor-tag-collision-avoidance.o):
5467 Likewise.
5468 * config/aarch64/aarch64-passes.def
5469 (pass_tag_collision_avoidance): New pass.
5470 * config/aarch64/aarch64.c (qdf24xx_tunings): Add
5471 AARCH64_EXTRA_TUNE_RENAME_LOAD_REGS to tuning_flags.
5472 (aarch64_classify_address): Remove static qualifier.
5473 (aarch64_address_info, aarch64_address_type): Move to...
5474 * config/aarch64/aarch64-protos.h: ... here.
5475 (make_pass_tag_collision_avoidance): New function.
5476 * config/aarch64/aarch64-tuning-flags.def (rename_load_regs):
5477 New tuning flag.
5478
5479 2018-09-05 Martin Liska <mliska@suse.cz>
5480
5481 * doc/gcov.texi: Update documentation of humar
5482 readable mode.
5483 * gcov.c (format_count): Print one decimal place, it provides
5484 more fine number of situations like '1G' vs. '1.4G'.
5485
5486 2018-09-05 Martin Liska <mliska@suse.cz>
5487
5488 PR target/87164
5489 * config/rs6000/rs6000.opt: Mark the option as Deprecated.
5490 * optc-gen.awk: Allow 'Var' for Deprecated options in order
5491 to generate a MASK value.
5492
5493 2018-09-04 H.J. Lu <hongjiu.lu@intel.com>
5494
5495 PR debug/86593
5496 * dwarf2out.c (based_loc_descr): Allow hard frame pointer even
5497 if frame pointer isn't used.
5498 (compute_frame_pointer_to_fb_displacement): Likewise.
5499
5500 2018-09-04 Jakub Jelinek <jakub@redhat.com>
5501
5502 PR target/87198
5503 * common/config/i386/i386-common.c (OPTION_MASK_ISA_XSAVEOPT_SET,
5504 OPTION_MASK_ISA_XSAVES_SET, OPTION_MASK_ISA_XSAVEC_SET): Use
5505 OPTION_MASK_ISA_XSAVE_SET instead of OPTION_MASK_ISA_XSAVE.
5506 (OPTION_MASK_ISA_XSAVE_UNSET): Add OPTION_MASK_ISA_XSAVES_UNSET
5507 and OPTION_MASK_ISA_XSAVEC_UNSET.
5508
5509 2018-09-04 Max Filippov <jcmvbkbc@gmail.com>
5510
5511 * config/xtensa/xtensa.c (xtensa_expand_atomic): Reorder AND and
5512 XOR operations in NAND case.
5513
5514 2018-09-04 Aldy Hernandez <aldyh@redhat.com>
5515
5516 * wide-int-range.cc (wide_int_range_convert): New.
5517 * wide-int-range.h (wide_int_range_convert): New.
5518 * tree-vrp.c (extract_range_from_unary_expr): Abstract wide int
5519 code into wide_int_range_convert.
5520 (extract_range_into_wide_ints): Do not munge anti range constants
5521 into the entire domain. Just return the range back.
5522
5523 2018-09-04 Martin Liska <mliska@suse.cz>
5524
5525 * genmatch.c (output_line_directive): Add new argument
5526 fnargs.
5527 (dt_simplify::gen_1): Encapsulate dump within __builtin_expect.
5528
5529 2018-09-04 Jonathan Wakely <jwakely@redhat.com>
5530
5531 * doc/invoke.texi (Option Summary): Add whitespace.
5532
5533 * doc/invoke.texi (Option Summary): Add -Waligned-new.
5534
5535 2018-09-04 Richard Biener <rguenther@suse.de>
5536
5537 PR tree-optimization/87211
5538 * tree-ssa-sccvn.c (visit_phi): When value-numbering to a
5539 backedge value we're supposed to treat as VARYING also number
5540 the PHI to VARYING in case it got a different value-number already.
5541
5542 2018-09-04 Aldy Hernandez <aldyh@redhat.com>
5543
5544 * tree-vrp.c (vrp_can_optimize_bit_op): Remove.
5545 (extract_range_from_binary_expr_1): Do not call
5546 vrp_can_optimize_bit_op.
5547 * wide-int-range.cc (wide_int_range_can_optimize_bit_op): Make
5548 static.
5549 (wide_int_range_get_mask_and_bounds): New.
5550 (wide_int_range_optimize_bit_op): New.
5551 (wide_int_range_bit_ior): Call wide_int_range_optimize_bit_op.
5552 (wide_int_range_bit_and): Same.
5553 * wide-int-range.h (wide_int_range_can_optimize_bit_op): Remove.
5554 (wide_int_range_optimize_bit_op): New.
5555 (wide_int_range_get_mask_and_bounds): New.
5556
5557 2018-09-04 Richard Biener <rguenther@suse.de>
5558
5559 PR tree-optimization/87176
5560 * tree-ssa-sccvn.c (visit_phi): Remove redundant allsame
5561 variable. When value-numbering a virtual PHI node make sure
5562 to not value-number to the backedge value.
5563
5564 2018-09-04 Jonathan Wakely <jwakely@redhat.com>
5565
5566 * doc/extend.texi (Long Long, Hex Floats): Document support for
5567 long long and hex floats in more recent versions of ISO C++.
5568
5569 2018-09-03 Richard Biener <rguenther@suse.de>
5570
5571 PR tree-optimization/87177
5572 * tree-ssa-sccvn.c (vuse_ssa_val): Revert previous change, keep
5573 cleanup.
5574
5575 2018-09-03 Alexander Monakov <amonakov@ispras.ru>
5576
5577 * bb-reorder.c (edge_order): Convert to C-qsort-style
5578 tri-state comparator.
5579 (reorder_basic_blocks_simple): Change std::stable_sort to
5580 gcc_stablesort.
5581
5582 2018-09-03 Alexander Monakov <amonakov@ispras.ru>
5583
5584 * tree-loop-distribution.c (offset_cmp): Convert to C-qsort-style
5585 tri-state comparator.
5586 (fuse_memset_builtins): Change std::stable_sort to gcc_stablesort.
5587
5588 2018-09-03 Alexander Monakov <amonakov@ispras.ru>
5589
5590 * sort.cc (struct sort_ctx): New field 'nlim'. Use it...
5591 (mergesort): ... here as maximum count for using netsort.
5592 (gcc_qsort): Set nlim to 3 if stable sort is requested.
5593 (gcc_stablesort): New.
5594 * system.h (gcc_stablesort): Declare.
5595
5596 2018-09-03 Alexander Monakov <amonakov@ispras.ru>
5597
5598 * sort.cc (gcc_qsort) [CHECKING_P]: Call qsort_chk.
5599 * system.h (qsort): Always redirect to gcc_qsort. Update comment.
5600 * vec.c (qsort_chk): Do not call gcc_qsort. Update comment.
5601
5602 2018-09-03 Segher Boessenkool <segher@kernel.crashing.org>
5603
5604 * config/rs6000/rs6000.md (*mov<mode>_hardfloat32): Remove %U from the
5605 lxsdx and stxsdx alternatives.
5606 (*mov<mode>_hardfloat64): Ditto.
5607 * config/rs6000/vsx.md (*vsx_extract_<mode>_store): Ditto.
5608
5609 2018-09-03 Richard Biener <rguenther@suse.de>
5610
5611 PR tree-optimization/87200
5612 * tree-ssa-sccvn.c (vn_nary_build_or_lookup_1): Valueize a
5613 simplify result.
5614
5615 2018-09-03 Martin Liska <mliska@suse.cz>
5616
5617 PR tree-optimization/87201
5618 * tree-switch-conversion.c (switch_decision_tree::balance_case_nodes):
5619 Fix parenthesis in an expression.
5620
5621 2018-09-03 Richard Biener <rguenther@suse.de>
5622
5623 PR tree-optimization/87197
5624 * tree-ssa-sccvn.c (vn_nary_build_or_lookup_1): Mark the new def
5625 visited. CSE the VN_INFO hashtable lookup.
5626
5627 PR tree-optimization/87169
5628 * tree-ssa-sccvn.c (do_rpo_vn): When marking loops for not
5629 iterating make sure there's no extra backedges from irreducible
5630 regions feeding the header. Mark the destination block
5631 executable.
5632
5633 2018-09-03 Martin Liska <mliska@suse.cz>
5634
5635 PR driver/83193
5636 * common/common-target.def: Add TARGET_GET_VALID_OPTION_VALUES.
5637 * common/common-targhooks.c (default_get_valid_option_values):
5638 New function.
5639 * common/common-targhooks.h (default_get_valid_option_values):
5640 Likewise.
5641 * common/config/i386/i386-common.c: Move processor_target_table
5642 from i386.c.
5643 (ix86_get_valid_option_values): New function.
5644 (TARGET_GET_VALID_OPTION_VALUES): New macro.
5645 * config/i386/i386.c (struct ptt): Move to i386-common.c.
5646 (PTA_*): Move all defined masks into i386-common.c.
5647 (ix86_function_specific_restore): Use new processor_cost_table.
5648 * config/i386/i386.h (struct ptt): Moved from i386.c.
5649 (struct pta): Likewise.
5650 * doc/tm.texi: Document new TARGET_GET_VALID_OPTION_VALUES.
5651 * doc/tm.texi.in: Likewise.
5652 * opt-suggestions.c (option_proposer::suggest_option):
5653 Pass prefix to build_option_suggestions.
5654 (option_proposer::get_completions): Likewise.
5655 (option_proposer::build_option_suggestions): Use the new target
5656 hook.
5657 * opts.c (struct option_help_tuple): New struct.
5658 (print_filtered_help): Use the new target hook.
5659
5660 2018-09-03 Martin Liska <mliska@suse.cz>
5661
5662 PR middle-end/59521
5663 * predict.c (set_even_probabilities): Add likely_edges
5664 argument and handle cases where we have precisely one
5665 likely edge.
5666 (combine_predictions_for_bb): Catch also likely_edges.
5667 (tree_predict_by_opcode): Handle gswitch statements.
5668 * tree-cfg.h (find_case_label_for_value): New declaration.
5669 (find_taken_edge_switch_expr): Likewise.
5670 * tree-switch-conversion.c (switch_decision_tree::balance_case_nodes):
5671 Find pivot in decision tree based on probabily, not by number of
5672 nodes.
5673
5674 2018-09-02 Gerald Pfeifer <gerald@pfeifer.com>
5675
5676 * doc/standards.texi (Standards): Update Objective-C reference.
5677
5678 2018-09-01 Gerald Pfeifer <gerald@pfeifer.com>
5679
5680 * doc/install.texi (Prerequisites): Update link for MPC.
5681
5682 2018-09-01 Michael Matz <matz@suse.de>
5683
5684 PR tree-optimization/87074
5685 * gimple-loop-jam.c (unroll_jam_possible_p): Check loop exit
5686 PHIs for outer-loop uses.
5687
5688 2018-09-01 Gerald Pfeifer <gerald@pfeifer.com>
5689
5690 * doc/generic.texi (OpenMP): Adjust link to openmp.org.
5691 * doc/invoke.texi (C Dialect Options): Ditto.
5692
5693 2018-09-01 Gerald Pfeifer <gerald@pfeifer.com>
5694
5695 * doc/install.texi (Prerequisites): Adjust link mpfr.org.
5696
5697 2018-08-31 Richard Biener <rguenther@suse.de>
5698
5699 PR tree-optimization/87168
5700 * tree-ssa-sccvn.c (SSA_VAL): Add visited output parameter.
5701 (rpo_elim::eliminate_avail): When OP was not visited it must
5702 be available.
5703
5704 2018-08-31 David Malcolm <dmalcolm@redhat.com>
5705
5706 * tree-vrp.c (copy_value_range): Convert param "from" from
5707 "value_range *" to "const value_range *".
5708 (range_is_null): Likewise for param "vr".
5709 (range_int_cst_p): Likewise.
5710 (range_int_cst_singleton_p): Likewise.
5711 (symbolic_range_p): Likewise.
5712 (value_ranges_intersect_p): Likewise for both params.
5713 (value_range_nonnegative_p): Likewise for param "vr".
5714 (value_range_constant_singleton): Likewise.
5715 (vrp_set_zero_nonzero_bits): Likewise for param "ar".
5716 (extract_range_into_wide_ints): Likewise for param "vr".
5717 (extract_range_from_multiplicative_op): Likewise for params "vr0"
5718 and "vr1".
5719 (vrp_can_optimize_bit_op): Likewise.
5720 (extract_range_from_binary_expr_1): Likewise for params "vr0_" and
5721 "vr1_".
5722 (extract_range_from_unary_expr): Likewise.
5723 (debug_value_range): Likewise for param "vr".
5724 (value_range::dump): Add "const" qualifier.
5725 (vrp_prop::check_array_ref): Convert local "vr" from
5726 "value_range *" to "const value_range *".
5727 (vrp_prop::check_mem_ref): Likewise.
5728 (vrp_prop::visit_stmt): Likewise for local "old_vr".
5729 (vrp_intersect_ranges_1): Likewise for param "vr_1".
5730 (vrp_intersect_ranges): Likewise.
5731 (simplify_stmt_for_jump_threading): Likewise for local "vr".
5732 (vrp_prop::vrp_finalize): Likewise.
5733 * tree-vrp.h (value_range::dump): Add "const" qualifier.
5734 (vrp_intersect_ranges): Add "const" qualifier to params as above.
5735 (extract_range_from_unary_expr): Likewise.
5736 (value_range_constant_singleton): Likewise.
5737 (symbolic_range_p): Likewise.
5738 (copy_value_range): Likewise.
5739 (extract_range_from_binary_expr_1): Likewise.
5740 (range_int_cst_p): Likewise.
5741 (vrp_set_zero_nonzero_bits): Likewise.
5742 (range_int_cst_singleton_p): Likewise.
5743
5744 2018-08-31 Vlad Lazar <vlad.lazar@arm.com>
5745
5746 * config/aarch64/arm_neon.h (vabsd_s64): New.
5747 (vnegd_s64): Likewise.
5748
5749 2018-08-31 Martin Jambor <mjambor@suse.cz>
5750
5751 * ipa-cp.c (estimate_local_effects): Replace wrong MAX with MIN.
5752
5753 2018-08-31 Martin Liska <mliska@suse.cz>
5754
5755 * ipa-icf.c (sem_item::add_type): Use
5756 sem_item::m_type_hash_cache.
5757 * ipa-icf.h: Move the cache from sem_item_optimizer
5758 to sem_item.
5759
5760 2018-08-31 Nathan Sidwell <nathan@acm.org>
5761
5762 * doc/extend.texi (Backwards Compatibility): Remove implicit
5763 extern C leeway of () being (...).
5764
5765 2018-08-31 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
5766
5767 * ipa-inline.c (can_inline_edge_by_limits_p): Fix typos in comment.
5768
5769 2018-08-31 Segher Boessenkool <segher@kernel.crashing.org>
5770
5771 PR target/86684
5772 PR target/87149
5773 * config/rs6000/rs6000.md (lround<mode>di2): Gate on TARGET_FPRND.
5774
5775 2018-08-31 Jakub Jelinek <jakub@redhat.com>
5776
5777 PR middle-end/87138
5778 * expmed.c (expand_mult_const): Use immed_wide_int_const instead of
5779 gen_int_mode. Formatting fixes.
5780
5781 2018-08-30 Sandra Loosemore <sandra@codesourcery.com>
5782
5783 * target.def (custom_function_descriptors): Improve documentation.
5784 * doc/tm.texi.in (Trampolines): Expand discussion of function
5785 descriptors and move TARGET_CUSTOM_FUNCTION_DESCRIPTORS to the
5786 beginning of the section.
5787 * doc/tm.texi: Regenerated.
5788
5789 2018-08-30 Jose E. Marchesi <jose.marchesi@oracle.com>
5790
5791 * cfg.h (class auto_edge_flag): Spell out the template-id of the
5792 base class in the initializer list. This is a workaround for
5793 building with older GCC.
5794 (class auto_bb_flag): Likewise.
5795
5796 2018-08-30 Aaron Sawdey <acsawdey@linux.ibm.com>
5797
5798 * config/rs6000/altivec.md (altivec_eq<mode>): Remove star.
5799 (altivec_vcmpequ<VI_char>_p): Remove star.
5800 * config/rs6000/rs6000-string.c (do_load_for_compare): Support
5801 vector load modes.
5802 (expand_strncmp_vec_sequence): New function.
5803 (emit_final_str_compare_vec): New function.
5804 (expand_strn_compare): Add support for vector strncmp.
5805 * config/rs6000/rs6000.opt (-mstring-compare-inline-limit): Change
5806 length specification to bytes.
5807 * config/rs6000/vsx.md (vsx_ld_elemrev_v16qi_internal): Remove star.
5808 (vcmpnezb_p): New pattern.
5809 * doc/invoke.texi (RS/6000 and PowerPC Options): Update documentation
5810 for option -mstring-compare-inline-limit.
5811
5812 2018-08-30 Thiago Macieira <thiago.macieira@intel.com>
5813
5814 * config/i386/i386.c (PTA_WESTMERE): Remove PTA_AES.
5815 (PTA_SKYLAKE): Add PTA_AES.
5816 (PTA_GOLDMONT): Likewise.
5817
5818 2018-08-29 Jan Hubicka <jh@suse.cz>
5819
5820 PR lto/86517
5821 * lto-opts.c (lto_write_options): Always stream PIC/PIE mode.
5822 * lto-wrapper.c (merge_and_complain): Fix merging of PIC/PIE.
5823
5824 2018-08-29 Jan Hubicka <jh@suse.cz>
5825
5826 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not follow
5827 TYPE_STUB_DECL.
5828 (hash_tree): Do not visit TYPE_STUB_DECL.
5829 * tree-streamer-out.c (write_ts_type_common_tree_pointers): Do not
5830 stream TYPE_STUB_DECL.
5831 * tree-streamer-in.c (lto_input_ts_type_common_tree_pointers): Likewise.
5832 * ipa-utils.h (type_with_linkage_p): Do not rely on TYPE_STUB_DECL
5833 after free_lang_data.
5834 (type_in_anonymous_namespace_p): Likewise.
5835
5836 2018-08-29 Jan Hubicka <jh@suse.cz>
5837
5838 * sreal.h (SREAL_PART_BITS): Change to 31; remove seemingly unnecessary
5839 comment that it has to be even number.
5840 (class sreal): Change m_sig type to int32_t.
5841 * sreal.c (sreal::dump, sreal::to_int, opreator+, operator-): Use
5842 int64_t for temporary calculations.
5843 (sreal_verify_basics): Drop one bit from minimum and maximum.
5844
5845 2018-08-30 Richard Biener <rguenther@suse.de>
5846
5847 PR tree-optimization/87147
5848 * tree-ssa-sccvn.c (SSA_VISITED): New function.
5849 (visit_phi): When the degenerate result is from the backedge and
5850 we didn't visit its definition yet drop to VARYING.
5851 (do_rpo_vn): Properly mark blocks with incoming backedges as executable.
5852
5853 2018-08-29 Jan Hubicka <jh@suse.cz>
5854
5855 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not walk
5856 DECL_VINDEX.
5857 (hash_tree): Likewise.
5858
5859 2018-08-29 Jan Hubicka <jh@suse.cz>
5860
5861 * tree.c (find_decls_types_r): Walk also TYPE_NEXT_PTR_TO
5862 and TYPE_NEXT_REF_TO.
5863
5864 2018-08-29 Jan Hubicka <jh@suse.cz>
5865
5866 * sreal.h (SREAL_PART_BITS): Change to 31; remove seemingly unnecessary
5867 comment that it has to be even number.
5868 (class sreal): Change m_sig type to int32_t.
5869 * sreal.c (sreal::dump, sreal::to_int, opreator+, operator-): Use
5870 int64_t for temporary calculations.
5871 (sreal_verify_basics): Drop one bit from minimum and maximum.
5872
5873 2018-08-30 Tamar Christina <tamar.christina@arm.com>
5874
5875 * config/aarch64/aarch64.c (aarch64_expand_movmem): Set TImode max.
5876
5877 2018-08-30 Vlad Lazar <vlad.lazar@arm.com>
5878
5879 PR middle-end/86995
5880 * expmed.c (canonicalize_comparison): Use wi::sub instead of wi::add
5881 if to_add is negative.
5882
5883 2018-08-29 Bernd Edlinger <bernd.edlinger@hotmail.de>
5884
5885 PR middle-end/87053
5886 * builtins.c (c_strlen): Improve range checks.
5887
5888 2018-08-29 Martin Sebor <msebor@redhat.com>
5889 Jeff Law <law@redhat.com>
5890
5891 PR tree-optimization/86714
5892 PR tree-optimization/86711
5893 * builtins.c (c_strlen): Add arguments to call to string_constant.
5894 * expr.c (string_constant): Add argument. Detect missing nul
5895 terminator and outermost declaration it's missing in.
5896 * expr.h (string_constant): Add argument.
5897 * fold-const.c (read_from_constant_string): Add arguments to call to
5898 string_constant.
5899 (c_getstr): Likewise.
5900 * tree-ssa-forwprop.c (simplify_builtin_call): Likewise.
5901 to string_constant.
5902 * tree-ssa-strlen.c (get_stridx): Likewise.
5903
5904 2018-08-29 Jan Hubicka <jh@suse.cz>
5905
5906 * tree-streamer-in.c (lto_input_ts_function_decl_tree_pointers):
5907 Do not stream DECL_VINDEX.
5908 * tree-streamer-out.c (write_ts_function_decl_tree_pointers): Likewise.
5909 * tree.c (free_lang_data_in_decl): Clear DECL_VINDEX.
5910 (decl_function_context): Use DECL_VIRTUAL_P rather than DECL_VINDEX.
5911
5912 2018-08-29 Richard Biener <rguenther@suse.de>
5913
5914 * tree-ssa-sccvn.c (vuse_ssa_val): Return NULL for unvisited
5915 virtual operands that are not default defs to honor region
5916 boundaries.
5917 (rpo_vn_valueize): Remove ineffective code here.
5918
5919 2018-08-29 Richard Biener <rguenther@suse.de>
5920
5921 PR tree-optimization/87132
5922 * tree-ssa-alias.c (get_continuation_for_phi): Do not translate
5923 when skipping defs reachable over backedges.
5924
5925 2018-08-29 Richard Biener <rguenther@suse.de>
5926
5927 * tree-core.h: Document use of deprecated_flag in SSA_NAME.
5928 * tree.h (SSA_NAME_POINTS_TO_READONLY_MEMORY): Define.
5929 * tree-into-ssa.c (pass_build_ssa::execute): Initialize
5930 function parameters SSA_NAME_POINTS_TO_READONLY_MEMORY from fnspec.
5931 * tree-ssa-sccvn.c (const_parms, init_const_parms): Remove.
5932 (vn_reference_lookup_3): Remove use of const_parms.
5933 (free_rpo_vn): Do not free const_parms.
5934 (do_rpo_vn): Do not call init_const_parms.
5935 * tree-ssa-alias.c (refs_may_alias_p_1): Honor
5936 SSA_NAME_POINTS_TO_READONLY_MEMORY.
5937 (call_may_clobber_ref_p_1): Likewise.
5938
5939 2018-08-29 Alexander Monakov <amonakov@ispras.ru>
5940
5941 PR other/86726
5942 * invoke.texi (Optimization Options): List -ftree-scev-cprop.
5943 (-O): Ditto.
5944 (-ftree-scev-cprop): Document.
5945
5946 2018-08-29 Jan Hubicka <jh@suse.cz>
5947
5948 * sreal.h (normalize, normalize_up, normalize_down): Add new_sig/new_exp
5949 parameters.
5950 (sreal constructor): Update.
5951 * sreal.c (sreal:operator+, sreal:operator-, sreal:operator*,
5952 sreal:operator/): Update.
5953
5954 2018-08-29 Martin Liska <mliska@suse.cz>
5955
5956 * tree-switch-conversion.c (switch_conversion::expand):
5957 Strenghten assumption about gswitch statements.
5958
5959 2018-08-29 Richard Biener <rguenther@suse.de>
5960
5961 PR tree-optimization/87117
5962 * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_stmt): Only
5963 re-value-number released SSA VDEFs.
5964
5965 2018-08-29 Richard Biener <rguenther@suse.de>
5966
5967 PR tree-optimization/87126
5968 * tree-ssa-sccvn.c (vn_reference_insert): Remove assert.
5969
5970 2018-08-28 Jim Wilson <jimw@sifive.com>
5971
5972 * config/riscv/pic.md: Rewrite.
5973 * config/riscv/riscv.c (riscv_address_insns): Return cost of 3 for
5974 invalid address.
5975 * config/riscv/riscv.md (ZERO_EXTEND_LOAD): Delete.
5976 (SOFTF, default_load, softload, softstore): New.
5977
5978 2018-08-28 Jeff Law <law@redhat.com>
5979
5980 * fold-const.c (fold_binary_loc): Remove recently added assert.
5981
5982 2018-08-28 Joern Rennecke <joern.rennecke@riscy-ip.com>
5983
5984 * genpreds.c (write_predicate_subfunction): Also add ATTRIBUTE_UNUSED
5985 to OP parmeter of generated function.
5986
5987 2018-08-28 MCC CS <deswurstes@users.noreply.github.com>
5988
5989 PR tree-optimization/87009
5990 * match.pd: Add boolean optimizations.
5991
5992 2018-08-28 Martin Sebor <msebor@redhat.com>
5993
5994 PR middle-end/86631
5995 * calls.c (alloc_max_size): Treat HOST_WIDE_INT special.
5996 * gimple-ssa-warn-alloca.c (adjusted_warn_limit): New function.
5997 (pass_walloca::gate): Use it.
5998 (alloca_call_type): Same.
5999 (pass_walloca::execute): Same.
6000 * stor-layout.c (layout_decl): Treat HOST_WIDE_INT special.
6001
6002 2018-08-28 David Malcolm <dmalcolm@redhat.com>
6003
6004 * dumpfile.h (ATTRIBUTE_GCC_DUMP_PRINTF): Change version check on
6005 GCC_VERSION for usage of "__gcc_dump_printf__" format from
6006 >= 3005 to >= 9000.
6007
6008 2018-08-28 Richard Biener <rguenther@suse.de>
6009
6010 PR tree-optimization/87124
6011 * tree-ssa-sccvn.c (vn_lookup_simplify_result): Guard against
6012 constants before looking up avail.
6013
6014 2018-08-28 Jakub Jelinek <jakub@redhat.com>
6015
6016 PR middle-end/87099
6017 * calls.c (maybe_warn_nonstring_arg): Punt early if
6018 warn_stringop_overflow is zero. Don't call get_range_strlen
6019 on 3rd argument, keep iterating until lenrng[1] is INTEGER_CST.
6020 Swap comparison operands to have constants on rhs. Only use
6021 lenrng[1] if non-NULL and INTEGER_CST. Don't uselessly
6022 increment lenrng[0].
6023
6024 2018-08-28 Richard Sandiford <richard.sandiford@arm.com>
6025
6026 * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Fix unguarded
6027 use of tree_to_shwi. Remove duplicated test for the size being
6028 a whole number of bytes.
6029
6030 2018-08-28 Richard Biener <rguenther@suse.de>
6031
6032 PR tree-optimization/87117
6033 * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_cleanup):
6034 Handle removed stmt without LHS (GIMPLE_NOP).
6035
6036 2018-08-28 Richard Biener <rguenther@suse.de>
6037
6038 PR tree-optimization/87117
6039 * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Exclude
6040 void which is is_gimple_reg_type by checking for COMPLETE_TYPE_P.
6041
6042 2018-08-28 Richard Biener <rguenther@suse.de>
6043
6044 PR tree-optimization/87117
6045 * tree-ssa-pre.c (compute_avail): Do not make expressions
6046 with predicated values available.
6047 (get_expr_value_id): Assert we do not run into predicated value
6048 expressions.
6049
6050 2018-08-28 Richard Biener <rguenther@suse.de>
6051
6052 PR tree-optimization/87117
6053 * tree-ssa-operands.c (add_stmt_operand): STRING_CST may
6054 get virtual operands.
6055 (get_expr_operands): Handle STRING_CST like other decls.
6056
6057 2018-08-28 Martin Liska <mliska@suse.cz>
6058
6059 * tree.h: Update documentation of fndecl_built_in_p
6060 functions.
6061
6062
6063 2018-08-27 Jeff Law <law@redhat.com>
6064 PR tree-optimization/87110
6065 * tree-ssa-dse.c (compute_trims): Handle non-constant
6066 TYPE_SIZE_UNIT.
6067
6068 2018-08-27 Martin Sebor <msebor@redhat.com>
6069
6070 PR tree-optimization/86914
6071 * tree-ssa-strlen.c (maybe_set_strlen_range): Avoid MEM_REF.
6072
6073 2018-08-27 Martin Sebor <msebor@redhat.com>
6074
6075 PR tree-optimization/87112
6076 * builtins.c (expand_builtin_strnlen): Convert c_strlen result to
6077 the type of the bound argument.
6078
6079 2018-08-27 Jeff Law <law@redhat.com>
6080
6081 * tree-ssa-dse.c (compute_trims): Handle case where the reference's
6082 type does not have a TYPE_SIZE_UNIT.
6083
6084 2018-08-27 Steve Ellcey <sellcey@cavium.com>
6085
6086 * config/aarch64/aarch64-speculation.cc: Replace include of cfg.h
6087 with include of backend.h.
6088
6089 2018-08-27 Richard Biener <rguenther@suse.de>
6090
6091 PR tree-optimization/86927
6092 * tree-vect-loop.c (vect_create_epilog_for_reduction): Properly
6093 use const cond reduction code.
6094
6095 2018-08-27 Alexander Monakov <amonakov@ispras.ru>
6096
6097 PR tree-optimization/85758
6098 * match.pd ((X & Y) ^ Y): Add :s qualifier to inner expression.
6099
6100 2018-08-27 David Malcolm <dmalcolm@redhat.com>
6101
6102 PR c++/87091
6103 * diagnostic-show-locus.c (class layout_range): Update for
6104 conversion of show_caret_p to a tri-state.
6105 (layout_range::layout_range): Likewise.
6106 (make_range): Likewise.
6107 (layout::maybe_add_location_range): Likewise.
6108 (layout::should_print_annotation_line_p): Don't show annotation
6109 lines for ranges that are SHOW_LINES_WITHOUT_RANGE.
6110 (layout::get_state_at_point): Update for conversion of
6111 show_caret_p to a tri-state. Bail out early for
6112 SHOW_LINES_WITHOUT_RANGE, so that such ranges don't affect
6113 underlining or source colorization.
6114 (gcc_rich_location::add_location_if_nearby): Update for conversion
6115 of show_caret_p to a tri-state.
6116 (selftest::test_one_liner_multiple_carets_and_ranges): Likewise.
6117 (selftest::test_one_liner_fixit_replace_equal_secondary_range):
6118 Likewise.
6119 (selftest::test_one_liner_labels): Likewise.
6120 * gcc-rich-location.c (gcc_rich_location::add_expr): Update for
6121 conversion of show_caret_p to a tri-state.
6122 * pretty-print.c (text_info::set_location): Likewise.
6123 * pretty-print.h (text_info::set_location): Likewise.
6124 * substring-locations.c (format_warning_n_va): Likewise.
6125 * tree-diagnostic.c (default_tree_printer): Likewise.
6126 * tree-pretty-print.c (newline_and_indent): Likewise.
6127
6128 2018-08-27 David Malcolm <dmalcolm@redhat.com>
6129
6130 PR c++/87091
6131 * diagnostic-show-locus.c (get_line_span_for_fixit_hint): Show the
6132 line above for line-insertion fix-it hints.
6133 (selftest::test_fixit_insert_containing_newline): Update the
6134 expected results, and add a test with line-numbering enabled.
6135
6136 2018-08-27 Martin Liska <mliska@suse.cz>
6137
6138 PR sanitizer/86962
6139 * sanopt.c (sanitize_rewrite_addressable_params): Ignore
6140 params with DECL_HAS_VALUE_EXPR_P.
6141
6142 2018-08-27 Martin Liska <mliska@suse.cz>
6143
6144 * config/i386/i386.c (ix86_expand_set_or_movmem): Dump
6145 selected expansion strategy.
6146
6147 2018-08-27 Martin Liska <mliska@suse.cz>
6148
6149 * builtins.h (is_builtin_fn): Remove and fndecl_built_in_p.
6150 * builtins.c (is_builtin_fn): Likewise.
6151 * attribs.c (diag_attr_exclusions): Use new function
6152 fndecl_built_in_p and remove check for FUNCTION_DECL if
6153 possible.
6154 (builtin_mathfn_code): Likewise.
6155 (fold_builtin_expect): Likewise.
6156 (fold_call_expr): Likewise.
6157 (fold_builtin_call_array): Likewise.
6158 (fold_call_stmt): Likewise.
6159 (set_builtin_user_assembler_name): Likewise.
6160 (is_simple_builtin): Likewise.
6161 * calls.c (gimple_alloca_call_p): Likewise.
6162 (maybe_warn_nonstring_arg): Likewise.
6163 * cfgexpand.c (expand_call_stmt): Likewise.
6164 * cgraph.c (cgraph_update_edges_for_call_stmt_node): Likewise.
6165 (cgraph_edge::verify_corresponds_to_fndecl): Likewise.
6166 (cgraph_node::verify_node): Likewise.
6167 * cgraphclones.c (build_function_decl_skip_args): Likewise.
6168 (cgraph_node::create_clone): Likewise.
6169 * config/arm/arm.c (arm_insert_attributes): Likewise.
6170 * config/i386/i386.c (ix86_gimple_fold_builtin): Likewise.
6171 * dse.c (scan_insn): Likewise.
6172 * expr.c (expand_expr_real_1): Likewise.
6173 * fold-const.c (operand_equal_p): Likewise.
6174 (fold_binary_loc): Likewise.
6175 * gimple-fold.c (gimple_fold_stmt_to_constant_1): Likewise.
6176 * gimple-low.c (lower_stmt): Likewise.
6177 * gimple-pretty-print.c (dump_gimple_call): Likewise.
6178 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call):
6179 Likewise.
6180 * gimple.c (gimple_build_call_from_tree): Likewise.
6181 (gimple_call_builtin_p): Likewise.
6182 (gimple_call_combined_fn): Likewise.
6183 * gimplify.c (gimplify_call_expr): Likewise.
6184 (gimple_boolify): Likewise.
6185 (gimplify_modify_expr): Likewise.
6186 (gimplify_addr_expr): Likewise.
6187 * hsa-gen.c (gen_hsa_insns_for_call): Likewise.
6188 * ipa-cp.c (determine_versionability): Likewise.
6189 * ipa-fnsummary.c (compute_fn_summary): Likewise.
6190 * ipa-param-manipulation.c (ipa_modify_formal_parameters): Likewise.
6191 * ipa-split.c (visit_bb): Likewise.
6192 (split_function): Likewise.
6193 * ipa-visibility.c (cgraph_externally_visible_p): Likewise.
6194 * lto-cgraph.c (input_node): Likewise.
6195 * lto-streamer-out.c (write_symbol): Likewise.
6196 * omp-low.c (setjmp_or_longjmp_p): Likewise.
6197 (lower_omp_1): Likewise.
6198 * predict.c (strip_predict_hints): Likewise.
6199 * print-tree.c (print_node): Likewise.
6200 * symtab.c (symtab_node::output_to_lto_symbol_table_p): Likewise.
6201 * trans-mem.c (is_tm_irrevocable): Likewise.
6202 (is_tm_load): Likewise.
6203 (is_tm_simple_load): Likewise.
6204 (is_tm_store): Likewise.
6205 (is_tm_simple_store): Likewise.
6206 (is_tm_abort): Likewise.
6207 (tm_region_init_1): Likewise.
6208 * tree-call-cdce.c (gen_shrink_wrap_conditions): Likewise.
6209 * tree-cfg.c (verify_gimple_call): Likewise.
6210 (move_stmt_r): Likewise.
6211 (stmt_can_terminate_bb_p): Likewise.
6212 * tree-eh.c (lower_eh_constructs_2): Likewise.
6213 * tree-if-conv.c (if_convertible_stmt_p): Likewise.
6214 * tree-inline.c (remap_gimple_stmt): Likewise.
6215 (copy_bb): Likewise.
6216 (estimate_num_insns): Likewise.
6217 (fold_marked_statements): Likewise.
6218 * tree-sra.c (scan_function): Likewise.
6219 * tree-ssa-ccp.c (surely_varying_stmt_p): Likewise.
6220 (optimize_stack_restore): Likewise.
6221 (pass_fold_builtins::execute): Likewise.
6222 * tree-ssa-dce.c (mark_stmt_if_obviously_necessary): Likewise.
6223 (mark_all_reaching_defs_necessary_1): Likewise.
6224 * tree-ssa-dom.c (dom_opt_dom_walker::optimize_stmt): Likewise.
6225 * tree-ssa-forwprop.c (simplify_builtin_call): Likewise.
6226 (pass_forwprop::execute): Likewise.
6227 * tree-ssa-loop-im.c (stmt_cost): Likewise.
6228 * tree-ssa-math-opts.c (pass_cse_reciprocals::execute): Likewise.
6229 * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Likewise.
6230 * tree-ssa-strlen.c (get_string_length): Likewise.
6231 * tree-ssa-structalias.c (handle_lhs_call): Likewise.
6232 (find_func_aliases_for_call): Likewise.
6233 * tree-ssa-ter.c (find_replaceable_in_bb): Likewise.
6234 * tree-stdarg.c (optimize_va_list_gpr_fpr_size): Likewise.
6235 * tree-tailcall.c (find_tail_calls): Likewise.
6236 * tree.c (need_assembler_name_p): Likewise.
6237 (free_lang_data_in_decl): Likewise.
6238 (get_call_combined_fn): Likewise.
6239 * ubsan.c (is_ubsan_builtin_p): Likewise.
6240 * varasm.c (incorporeal_function_p): Likewise.
6241 * tree.h (DECL_BUILT_IN): Remove and replace with
6242 fndecl_built_in_p.
6243 (DECL_BUILT_IN_P): Transfort to fndecl_built_in_p.
6244 (fndecl_built_in_p): New.
6245
6246 2018-08-27 Martin Liska <mliska@suse.cz>
6247
6248 PR tree-optimization/86847
6249 * tree-switch-conversion.c (switch_decision_tree::dump_case_nodes):
6250 Dump also subtree probability.
6251 (switch_decision_tree::do_jump_if_equal): New function.
6252 (switch_decision_tree::emit_case_nodes): Handle special
6253 situations in balanced tree that can be emitted much simpler.
6254 Fix calculation of probabilities that happen in tree expansion.
6255 * tree-switch-conversion.h (struct cluster): Add
6256 is_single_value_p.
6257 (struct simple_cluster): Likewise.
6258 (struct case_tree_node): Add new function has_child.
6259 (do_jump_if_equal): New.
6260
6261 2018-08-27 Martin Liska <mliska@suse.cz>
6262
6263 * tree-switch-conversion.c (bit_test_cluster::find_bit_tests):
6264 Add new argument to bit_test_cluster constructor.
6265 (bit_test_cluster::emit): Set bits really number of values
6266 handlel by a test.
6267 (bit_test_cluster::hoist_edge_and_branch_if_true): Add
6268 probability argument.
6269 * tree-switch-conversion.h (struct bit_test_cluster):
6270 Add m_handles_entire_switch.
6271
6272 2018-08-27 Martin Liska <mliska@suse.cz>
6273
6274 PR tree-optimization/86702
6275 * tree-switch-conversion.c (jump_table_cluster::emit):
6276 Make probabilities even for values in jump table
6277 according to number of cases handled.
6278 (switch_decision_tree::compute_cases_per_edge): Pass
6279 argument to reset_out_edges_aux function.
6280 (switch_decision_tree::analyze_switch_statement): Likewise.
6281 * tree-switch-conversion.h (switch_decision_tree::reset_out_edges_aux):
6282 Make it static.
6283
6284 2018-08-27 Martin Liska <mliska@suse.cz>
6285
6286 * cfgexpand.c (expand_asm_stmt): Use label_to_block and pass
6287 cfun argument explicitly.
6288 * gimple-pretty-print.c (dump_gimple_switch): Likewise.
6289 * hsa-gen.c (gen_hsa_insns_for_switch_stmt): Use new
6290 function gimple_switch_default_bb.
6291 (convert_switch_statements):
6292 (expand_builtins):
6293 * ipa-fnsummary.c (set_switch_stmt_execution_predicate):
6294 * stmt.c (label_to_block_fn): Use label_to_block and pass
6295 cfun argument explicitly and use gimple_switch_label_bb.
6296 (expand_case): Likewise.
6297 * tree-cfg.c (lower_phi_internal_fn): Use label_to_block and pass
6298 cfun argument explicitly. Likewise.
6299 (make_edges_bb): Likewise.
6300 (make_cond_expr_edges): Likewise.
6301 (get_cases_for_edge): Likewise.
6302 (make_gimple_switch_edges): Likewise.
6303 (label_to_block_fn): Likewise.
6304 (label_to_block): Likewise.
6305 (make_goto_expr_edges): Likewise.
6306 (make_gimple_asm_edges): Likewise.
6307 (main_block_label): Likewise.
6308 (group_case_labels_stmt): Likewise.
6309 (find_taken_edge_computed_goto): Likewise.
6310 (find_taken_edge_switch_expr): Likewise.
6311 (gimple_verify_flow_info): Likewise.
6312 (gimple_redirect_edge_and_branch): Likewise.
6313 (gimple_switch_label_bb): New function.
6314 (gimple_switch_default_bb): Likewise.
6315 (gimple_switch_edge): Likewise.
6316 (gimple_switch_default_edge): Likewise.
6317 * tree-cfg.h (label_to_block_fn): Remove and replace ...
6318 (label_to_block): ... with this.
6319 (gimple_switch_label_bb): New.
6320 (gimple_switch_default_bb): Likewise.
6321 (gimple_switch_edge): Likewise.
6322 (gimple_switch_default_edge): Likewise.
6323 * tree-cfgcleanup.c (convert_single_case_switch): Use
6324 new gimple functions and pass new argument to label_to_block.
6325 (cleanup_control_flow_bb):
6326 * tree-eh.c (make_eh_dispatch_edges): Use label_to_block and pass
6327 cfun argument explicitly.
6328 (make_eh_edges): Likewise.
6329 (redirect_eh_dispatch_edge): Likewise.
6330 (lower_resx): Likewise.
6331 (lower_eh_dispatch): Likewise.
6332 (maybe_remove_unreachable_handlers): Likewise.
6333 (unsplit_eh): Likewise.
6334 (cleanup_empty_eh): Likewise.
6335 (verify_eh_edges): Likewise.
6336 (verify_eh_dispatch_edge): Likewise.
6337 * tree-ssa-dom.c (record_edge_info): Likewise.
6338 * tree-ssa-forwprop.c (simplify_gimple_switch_label_vec): Likewise.
6339 * tree-ssa-threadedge.c (thread_around_empty_blocks): Likewise.
6340 (thread_through_normal_block): Likewise.
6341 * tree-ssa-uncprop.c (associate_equivalences_with_edges): Likewise.
6342 * tree-ssa-uninit.c (convert_control_dep_chain_into_preds):
6343 * tree-switch-conversion.c (switch_conversion::collect): Use new
6344 gimple functions.
6345 (switch_conversion::check_final_bb): Likewise.
6346 (switch_conversion::gather_default_values): Pass new argument
6347 to label_to_block.
6348 (switch_conversion::build_constructors): Likewise.
6349 (switch_decision_tree::compute_cases_per_edge): Use new
6350 gimple_switch_edge function.
6351 (switch_decision_tree::analyze_switch_statement): Pass new argument
6352 to label_to_block.
6353 (switch_decision_tree::try_switch_expansion): Use
6354 gimple_switch_default_edge.
6355 * tree-vrp.c (find_switch_asserts): Pass new argument
6356 to label_to_block.
6357 * vr-values.c (vr_values::vrp_visit_switch_stmt): Likewise.
6358 (vr_values::simplify_switch_using_ranges): Likewise.
6359
6360 2018-08-27 Richard Biener <rguenther@suse.de>
6361
6362 * cfganal.h (rev_post_order_and_mark_dfs_back_seme): Declare.
6363 * cfganal.c (rev_post_order_and_mark_dfs_back_seme): New function.
6364
6365 * tree-ssa-sccvn.h (struct vn_pval): New structure.
6366 (struct vn_nary_op_s): Add unwind_to member. Add
6367 predicated_values flag and put result into a union together
6368 with a linked list of vn_pval.
6369 (struct vn_ssa_aux): Add name member to make maintaining
6370 a map of SSA name to vn_ssa_aux possible. Remove no longer
6371 needed info, dfsnum, low, visited, on_sccstack, use_processed
6372 and range_info_anti_range_p members.
6373 (run_scc_vn, vn_eliminate, free_scc_vn, vn_valueize): Remove.
6374 (do_rpo_vn, run_rpo_vn, eliminate_with_rpo_vn, free_rpo_vn):
6375 New functions.
6376 (vn_valueize): New global.
6377 (vn_context_bb): Likewise.
6378 (VN_INFO_RANGE_INFO, VN_INFO_ANTI_RANGE_P, VN_INFO_RANGE_TYPE,
6379 VN_INFO_PTR_INFO): Remove.
6380 * tree-ssa-sccvn.c: ... (rewrite)
6381 (pass_fre::execute): For -O2+ initialize loops and run
6382 RPO VN in optimistic mode (iterating). For -O1 and -Og
6383 run RPO VN in non-optimistic mode.
6384 * params.def (PARAM_SCCVN_MAX_SCC_SIZE): Remove.
6385 (PARAM_RPO_VN_MAX_LOOP_DEPTH): Add.
6386 * doc/invoke.texi (sccvn-max-scc-size): Remove.
6387 (rpo-vn-max-loop-depth): Document.
6388 * tree-ssa-alias.c (walk_non_aliased_vuses): Stop walking
6389 when valuezing the VUSE signals we walked out of the region.
6390 * tree-ssa-pre.c (phi_translate_1): Ignore predicated values.
6391 (phi_translate): Set VN context block to use for availability
6392 lookup.
6393 (compute_avail): Likewise.
6394 (pre_valueize): New function.
6395 (pass_pre::execute): Adjust to the RPO VN API.
6396
6397 * tree-ssa-loop-ivcanon.c: Include tree-ssa-sccvn.h.
6398 (propagate_constants_for_unrolling): Remove.
6399 (tree_unroll_loops_completely): Perform value-numbering
6400 on the unrolled bodies loop parent.
6401
6402 2018-08-27 Richard Biener <rguenther@suse.de>
6403
6404 * tree-ssa-pre.c (compute_antic): Re-use inverted postorder
6405 for partial antic compute.
6406
6407 2018-08-27 Jakub Jelinek <jakub@redhat.com>
6408
6409 PR rtl-optimization/87065
6410 * combine.c (simplify_if_then_else): Formatting fix.
6411 (if_then_else_cond): Guard MULT optimization with SCALAR_INT_MODE_P
6412 check.
6413 (known_cond): Don't return const_true_rtx for vector modes. Use
6414 CONST0_RTX instead of const0_rtx. Formatting fixes.
6415
6416 2018-08-27 Martin Liska <mliska@suse.cz>
6417
6418 PR gcov-profile/87069
6419 * gcov.c (process_file): Record files already processed
6420 and warn about a file being processed multiple times.
6421
6422 2018-08-27 Martin Liska <mliska@suse.cz>
6423
6424 PR driver/83193
6425 * config/aarch64/aarch64.c (aarch64_override_options_internal):
6426 Set default values for x_aarch64_*_string strings.
6427 * config/aarch64/aarch64.opt: Remove --{march,mcpu,mtune}==
6428 prefix. For -mabi do not print '=ABI' in help and use
6429 <option_value> format for -msve-vector-bits and -moverride
6430 options.
6431
6432 2018-08-26 Jeff Law <law@redhat.com>
6433
6434 * config/mips/frame-header-opt.c: Include "backend.h" rather than
6435 "cfg.h"
6436
6437 2018-08-26 Marek Polacek <polacek@redhat.com>
6438
6439 PR c++/87029, Implement -Wredundant-move.
6440 * doc/invoke.texi: Document -Wredundant-move.
6441
6442 2018-08-25 Martin Sebor <msebor@redhat.com>
6443
6444 PR tree-optimization/87059
6445 * builtins.c (expand_builtin_strncmp): Convert MIN_EXPR operand
6446 to the same type as the other.
6447 * fold-const.c (fold_binary_loc): Assert expectation.
6448
6449 2018-08-25 Iain Sandoe <iain@sandoe.co.uk>
6450
6451 * config/darwin.c (machopic_legitimize_pic_address): Clean up
6452 extraneous parentheses, dead code section and formatting.
6453
6454 2018-08-24 David Malcolm <dmalcolm@redhat.com>
6455
6456 PR c++/87091
6457 * diagnostic-show-locus.c (layout::layout): Ensure the margin is
6458 wide enough for jumps in the line-numbering to be visible.
6459 (layout::print_gap_in_line_numbering): New member function.
6460 (layout::calculate_line_spans): When using line numbering, merge
6461 line spans that are only 1 line apart.
6462 (diagnostic_show_locus): When printing line numbers, show gaps in
6463 line numbering directly, rather than printing headers.
6464 (selftest::test_diagnostic_show_locus_fixit_lines): Add test of
6465 line-numbering with multiple line spans.
6466 (selftest::test_fixit_insert_containing_newline_2): Add test of
6467 line-numbering, in which the spans are close enough to be merged.
6468
6469 2018-08-24 Aldy Hernandez <aldyh@redhat.com>
6470
6471 * gimple-ssa-evrp-analyze.c (set_ssa_range_info): Pass value_range
6472 to range_includes_zero_p. Do not special case VR_ANTI_RANGE.
6473 * tree-vrp.c (range_is_nonnull): Remove.
6474 (range_includes_zero_p): Accept value_range instead of min/max.
6475 (extract_range_from_binary_expr_1): Do not early bail on
6476 POINTER_PLUS_EXPR.
6477 Use range_includes_zero_p instead of range_is_nonnull.
6478 (extract_range_from_unary_expr): Use range_includes_zero_p instead
6479 of range_is_nonnull.
6480 (vrp_meet_1): Pass value_range to range_includes_zero_p. Do not
6481 special case VR_ANTI_RANGE.
6482 (vrp_finalize): Same.
6483 * tree-vrp.h (range_includes_zero_p): Pass value_range as argument
6484 instead of min/max.
6485 (range_is_nonnull): Remove.
6486 * vr-values.c (vrp_stmt_computes_nonzero): Use
6487 range_includes_zero_p instead of range_is_nonnull.
6488 (extract_range_basic): Pass value_range to range_includes_zero_p
6489 instead of range_is_nonnull.
6490
6491 2018-08-24 Uros Bizjak <ubizjak@gmail.com>
6492
6493 * emit-rtl.c (init_emit_once): Do not emit MODE_POINTER_BOUNDS RTXes.
6494 * emit-rtl.h (rtl_data): Remove return_bnd.
6495 * explow.c (trunc_int_for_mode): Do not handle POINTER_BOUNDS_MODE_P.
6496 * function.c (diddle_return_value): Do not handle crtl->return_bnd.
6497 * genmodes.c (complete_mode): Do not handle MODE_POINTER_BOUNDS.
6498 (POINTER_BOUNDS_MODE): Remove definition.
6499 (make_pointer_bounds_mode): Remove.
6500 (get_mode_class): Do not handle MODE_POINTER_BOUNDS.
6501 * machmode.h (POINTER_BOUNDS_MODE_P): Remove definition.
6502 (scalare_mode::includes_p): Do not handle MODE_POINTER_BOUNDS.
6503 * mode-classes.def: Do not define MODE_POINTER_BOUNDS.
6504 * stor-layout.c (int_mode_for_mode): Do not handle MODE_POINTER_BOUNDS.
6505 * tree-core.h (enum tree_index): Remove TI_POINTER_BOUNDS_TYPE.
6506 * varasm.c (output_constant_pool_2): Do not handle MODE_POINTER_BOUNDS.
6507
6508 * config/i386/i386-modes.def (BND32, BND64): Remove.
6509 * config/i386/i386.c (dbx_register_map): Remove bound registers.
6510 (dbx64_register_map): Ditto.
6511 (svr4_dbx_register_map): Ditto.
6512 (indirect_thunk_bnd_needed): Remove.
6513 (indirect_thunks_bnd_used): Ditto.
6514 (indirect_return_bnd_needed): Ditto.
6515 (indirect_return_via_cx_bnd): Ditto.
6516 (enum indirect_thunk_prefix): Remove indirect_thunk_prefix_bnd.
6517 (indirect_thunk_name): Remove handling of indirect_thunk_prefix_bnd.
6518 (output_indirect_thunk): Ditto. Remove need_prefix argument.
6519 (output_indirect_thunk_function): Remove handling of
6520 indirect_return_bnd_needed, indirect_return_via_cx_bnd,
6521 indirect_thunk_bnd_needed and indirect_thunks_bnd_used variables.
6522 (ix86_save_reg): Remove handling of crtl->return_bnd.
6523 (ix86_legitimate_constant_p): Remove handling of POINTER_BOUNDS_MODE_P.
6524 (ix86_print_operand_address_as): Remove handling of UNSPEC_BNDMK_ADDR
6525 and UNSPEC_BNDLX_ADDR.
6526 (ix86_output_indirect_branch_via_reg): Remove handling of
6527 indirect_thunk_prefix_bnd.
6528 (ix86_output_indirect_branch_via_push): Ditto.
6529 (ix86_output_function_return): Ditto.
6530 (ix86_output_indirect_function_return): Ditto.
6531 (avoid_func_arg_motion): Do not handle UNSPEC_BNDSTX.
6532 * config/i386/i386.h (FIXED_REGISTERS): Remove bound registers.
6533 (CALL_USED_REGISTERS): Ditto.
6534 (REG_ALLOC_ORDER): Update for removal of bound registers.
6535 (HI_REGISTER_NAMES): Ditto.
6536 * config/i386/i386.md (UNSPEC_BNDMK, UNSPEC_BNDMK_ADDR, UNSPEC_BNDSTX)
6537 (UNSPEC_BNDLDX, UNSPEC_BNDLDX_ADDR, UNSPEC_BNDCL, UNSPEC_BNDCU)
6538 (UNSPEC_BNDCN, UNSPEC_MPX_FENCE): Remove.
6539 (BND0_REG, BND1_REG, BND2_REG, BND3_REG): Remove
6540 (FIRST_PSEUDO_REG): Update.
6541 (BND): Remove mode iterator.
6542 * config/i386/predicates.md (bnd_mem_operator): Remove.
6543
6544 2018-08-24 Richard Sandiford <richard.sandiford@arm.com>
6545
6546 * tree-vect-stmts.c (vectorizable_bswap): Handle variable-length
6547 vectors.
6548
6549 2018-08-24 Richard Sandiford <richard.sandiford@arm.com>
6550
6551 * tree-vect-slp.c (vect_transform_slp_perm_load): Separate out
6552 the case in which the permute needs only a single element and
6553 repeats for every vector of the result. Extend that case to
6554 handle variable-length vectors.
6555 * tree-vect-stmts.c (vectorizable_load): Update accordingly.
6556
6557 2018-08-24 H.J. Lu <hongjiu.lu@intel.com>
6558
6559 PR debug/79342
6560 * dwarf2out.c (save_macinfo_strings): Call set_indirect_string
6561 on DW_MACINFO_start_file for -gsplit-dwarf -g3.
6562
6563 2018-08-24 Richard Biener <rguenther@suse.de>
6564
6565 * cfg.h (struct control_flow_graph): Add edge_flags_allocated and
6566 bb_flags_allocated members.
6567 (auto_flag): New RAII class for allocating flags.
6568 (auto_edge_flag): New RAII class for allocating edge flags.
6569 (auto_bb_flag): New RAII class for allocating bb flags.
6570 * cfgloop.c (verify_loop_structure): Allocate temporary edge
6571 flag dynamically.
6572 * cfganal.c (dfs_enumerate_from): Remove use of visited sbitmap
6573 in favor of temporarily allocated BB flag.
6574 * hsa-brig.c: Re-order includes.
6575 * hsa-dump.c: Likewise.
6576 * hsa-regalloc.c: Likewise.
6577 * print-rtl.c: Likewise.
6578 * profile-count.c: Likewise.
6579
6580 2018-08-24 Segher Boessenkool <segher@kernel.crashing.org>
6581
6582 PR target/86989
6583 * config/rs6000/rs6000.c (toc_relative_expr_p): Check that the base is
6584 the TOC register.
6585
6586 2018-08-24 Aldy Hernandez <aldyh@redhat.com>
6587
6588 PR 87073/bootstrap
6589 * wide-int-range.cc (wide_int_range_div): Do not ignore result
6590 from wide_int_range_multiplicative_op.
6591
6592 2018-08-23 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
6593
6594 * tree-vect-data-refs.c (vect_grouped_store_supported): Fix typo
6595 "permutaion".
6596
6597 2018-08-23 Giuliano Belinassi <giuliano.belinassi@usp.br>
6598
6599 * genmatch.c (parser::parse_operation): Fix typo 'exapnded'
6600 to 'expanded'.
6601
6602 2018-08-23 Alexander Monakov <amonakov@ispras.ru>
6603
6604 * tree-scalar-evolution.c (final_value_replacement_loop): Dump
6605 full GENERIC expression used for replacement.
6606
6607 2018-08-23 Aldy Hernandez <aldyh@redhat.com>
6608
6609 * tree-vrp.c (abs_extent_range): Remove.
6610 (extract_range_into_wide_ints): Pass wide ints by reference.
6611 (extract_range_from_binary_expr_1): Rewrite the *DIV_EXPR code.
6612 Pass wide ints by reference in all calls to
6613 extract_range_into_wide_ints.
6614 * wide-int-range.cc (wide_int_range_div): New.
6615 * wide-int-range.h (wide_int_range_div): New.
6616 (wide_int_range_includes_zero_p): New.
6617 (wide_int_range_zero_p): New.
6618
6619 2018-08-23 Matthew Malcomson <matthew.malcomson@arm.com>
6620
6621 * config/aarch64/aarch64.md (arches): New enum.
6622 (arch): New enum attr.
6623 (arch_enabled): New attr.
6624 (enabled): Now uses arch_enabled only.
6625 (simd, sve, fp16): Removed attribute.
6626 (fp): Attr now defined in terms of 'arch'.
6627 (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64, *movti_aarch64,
6628 *movhf_aarch64, <optab><fcvt_target><GPF:mode>2,
6629 <FCVT_F2FIXED:fcvt_fixed_insn><GPF:mode>3,
6630 <FCVT_FIXED2F:fcvt_fixed_insn><GPI:mode>3): Merge 'fp' and 'simd'
6631 attributes into 'arch'.
6632 (*movsf_aarch64, *movdf_aarch64, *movtf_aarch64, *add<mode>3_aarch64,
6633 subdi3, neg<mode>2, <optab><mode>3, one_cmpl<mode>2,
6634 *<NLOGICAL:optab>_one_cmpl<mode>3, *xor_one_cmpl<mode>3,
6635 *aarch64_ashl_sisd_or_int_<mode>3, *aarch64_lshr_sisd_or_int_<mode>3,
6636 *aarch64_ashr_sisd_or_int_<mode>3, *aarch64_sisd_ushl): Convert use of
6637 'simd' attribute into 'arch'.
6638 (load_pair_sw_<SX:mode><SX2:mode>, load_pair_dw_<DX:mode><DX2:mode>,
6639 store_pair_sw_<SX:mode><SX2:mode>, store_pair_dw_<DX:mode><DX2:mode>):
6640 Convert use of 'fp' attribute to 'arch'.
6641 * config/aarch64/aarch64-simd.md (move_lo_quad_internal_<mode>,
6642 move_lo_quad_internal_<mode>): (different modes) Merge 'fp' and 'simd'
6643 into 'arch'.
6644 (move_lo_quad_internal_be_<mode>, move_lo_quad_internal_be_<mode>):
6645 (different modes) Merge 'fp' and 'simd' into 'arch'.
6646 (*aarch64_combinez<mode>, *aarch64_combinez_be<mode>): Merge 'fp' and
6647 'simd' into 'arch'.
6648
6649 2018-08-23 Segher Boessenkool <segher@kernel.crashing.org>
6650
6651 PR rtl-optimization/87026
6652 * expmed.c (canonicalize_comparison): If we can no longer create
6653 pseudoregisters, don't.
6654
6655 2018-08-23 Richard Earnshaw <rearnsha@arm.com>
6656
6657 PR target/86951
6658 * config/arm/arm-protos.h (arm_emit_speculation_barrier): New
6659 prototype.
6660 * config/arm/arm.c (speculation_barrier_libfunc): New static
6661 variable.
6662 (arm_init_libfuncs): Initialize it.
6663 (arm_emit_speculation_barrier): New function.
6664 * config/arm/arm.md (speculation_barrier): Call
6665 arm_emit_speculation_barrier for architectures that do not have
6666 DSB or ISB.
6667 (speculation_barrier_insn): Only match on Armv7 or later.
6668
6669 2018-08-23 Richard Biener <rguenther@suse.de>
6670
6671 PR middle-end/87024
6672 * tree-inline.c (copy_bb): Drop unused __builtin_va_arg_pack_len
6673 calls.
6674
6675 2018-08-23 Richard Sandiford <richard.sandiford@arm.com>
6676
6677 * config/aarch64/aarch64.c (aarch64_evpc_sve_tbl): Fix handling
6678 of single-vector TBLs.
6679 (aarch64_vectorize_vec_perm_const): Set one_vector_p when only
6680 one input is given.
6681
6682 2018-08-23 Richard Sandiford <richard.sandiford@arm.com>
6683
6684 PR target/85910
6685 * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const_1): Fix
6686 aarch64_evpc_tbl guard.
6687
6688 2018-08-22 Bernd Edlinger <bernd.edlinger@hotmail.de>
6689
6690 * tree-ssa-dse.c (compute_trims): Avoid folding away undefined
6691 behaviour.
6692
6693 2018-08-22 Martin Sebor <msebor@redhat.com>
6694
6695 PR middle-end/87052
6696 * tree-pretty-print.c (pretty_print_string): Add argument.
6697 (dump_generic_node): Call to pretty_print_string with string size.
6698
6699 2018-08-22 Segher Boessenkool <segher@kernel.crashing.org>
6700
6701 PR rtl-optimization/86771
6702 * combine.c (try_combine): Do not allow splitting a resulting PARALLEL
6703 of two SETs into those two SETs, one to be placed at i2, if that SETs
6704 destination is modified between i2 and i3.
6705
6706 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
6707
6708 PR tree-optimization/86725
6709 * tree-vect-loop.c (vect_inner_phi_in_double_reduction_p): New
6710 function.
6711 (vect_analyze_scalar_cycles_1): Check it.
6712
6713 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
6714
6715 PR tree-optimization/86725
6716 * tree-vect-loop.c (vect_is_simple_reduction): When treating
6717 an outer loop phi as a double reduction, make sure that the
6718 single user of the phi result is an inner loop phi.
6719
6720 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
6721
6722 * tree-vect-data-refs.c (vect_analyze_group_access_1): Convert
6723 grouped stores with gaps to a strided group.
6724
6725 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
6726
6727 * tree-vect-stmts.c (get_group_load_store_type)
6728 (get_load_store_type): Only test STMT_VINFO_STRIDED_P for the
6729 first statement in a group.
6730
6731 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
6732
6733 * config/darwin.h (LINK_COMMAND_SPEC_A): Sync LTO options with
6734 the sequence used in gcc/gcc.c.
6735
6736 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
6737
6738 PR other/704
6739 * gcc-ar.c (main): Don’t try to invoke the plug-in if we’re not
6740 building it.
6741
6742 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
6743
6744 * config/darwin10.h (LINK_GCC_C_SEQUENCE_SPEC): Adjust to use the
6745 Darwin10-specific unwinder-shim.
6746 * config/darwin12.h (LINK_GCC_C_SEQUENCE_SPEC): Remove.
6747 * config/rs6000/darwin.h (DARWIN_CRT1_SPEC, DARWIN_DYLIB1_SPEC):
6748 New to cater for Darwin10 Rosetta.
6749
6750 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
6751
6752 * config/i386/i386.c (ix86_output_addr_diff_elt): Move the MACH-O
6753 specific test before the one for HAVE_AS_GOTOFF_IN_DATA.
6754
6755 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
6756
6757 PR bootstrap/81033
6758 PR target/81733
6759 PR target/52795
6760 * gcc/dwarf2out.c (FUNC_SECOND_SECT_LABEL): New.
6761 (dwarf2out_switch_text_section): Generate a local label for the
6762 second function sub-section and apply it as the second FDE start
6763 label.
6764 * gcc/final.c (final_scan_insn_1): Emit second FDE label after the
6765 second sub-section start.
6766
6767 2018-08-22 Richard Biener <rguenther@suse.de>
6768
6769 PR tree-optimization/86988
6770 * tree-vrp.c (vrp_prop::check_mem_ref): Bail out on VLAs.
6771
6772 2018-08-22 Richard Biener <rguenther@suse.de>
6773
6774 PR tree-optimization/86945
6775 * tree-cfg.c (generate_range_test): Use unsigned arithmetic.
6776
6777 2018-08-22 Alexandre Oliva <oliva@adacore.com>
6778
6779 * config/rs6000/rs6000.c (SMALL_DATA_RELOC, SMALL_DATA_REG): Add
6780 a comment about how uses of r2 for .sdata2 come about.
6781
6782 2018-08-22 Alexandre Oliva <aoliva@redhat.com>
6783
6784 * tree-ssa-reassoc.c (is_reassociable_op): Fix cut&pasto.
6785
6786 2018-08-21 Marek Polacek <polacek@redhat.com>
6787
6788 PR c++/86981, Implement -Wpessimizing-move.
6789 * doc/invoke.texi: Document -Wpessimizing-move.
6790
6791 2018-08-21 Jan Hubicka <jh@suse.cz>
6792
6793 * tree.c (find_decls_types_r): Do not check for redundant typedefs.
6794 * tree.h (is_redundant_typedef): Remove.
6795 * dwarf2out.c (is_redundant_typedef): Turn into static function.
6796
6797 2018-08-21 Jan Hubicka <jh@suse.cz>
6798
6799 * tree.c (free_lang_data_in_decl): Remove types from DECL_CONTEXT
6800 when possible.
6801
6802 2018-08-21 Tamar Christina <tamar.christina@arm.com>
6803
6804 * expmed.c (extract_low_bits): Reject invalid subregs early.
6805
6806 2018-08-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
6807
6808 PR middle-end/86121
6809 * tree-ssa-strlen.c (adjust_last_stmt): Avoid folding away undefined
6810 behaviour.
6811
6812 2018-08-21 Rasmus Villemoes <rv@rasmusvillemoes.dk>
6813
6814 * config/vxworks.h: Guard vxworks_asm_out_constructor and
6815 vxworks_asm_out_destructor by !HAVE_INITFINI_ARRAY_SUPPORT
6816 * config/vxworks.c: Likewise.
6817
6818 2018-08-21 Rasmus Villemoes <rv@rasmusvillemoes.dk>
6819
6820 * config/vxworks.c: Set targetm.have_ctors_dtors
6821 if HAVE_INITFINI_ARRAY_SUPPORT.
6822 * config/vxworks.h: Set SUPPORTS_INIT_PRIORITY
6823 if HAVE_INITFINI_ARRAY_SUPPORT.
6824
6825 2018-08-21 Rasmus Villemoes <rv@rasmusvillemoes.dk>
6826
6827 * config/vxworks.h: Add $(WIND_BASE)/target/h/wrn/coreip to
6828 default search path for VxWorks < 7.
6829
6830 2018-08-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
6831
6832 * gimple-ssa-sprintf.c (decl_constant_value): Remove.
6833 (get_format_string): Refer to c_getstr.
6834
6835 2018-08-21 Tom de Vries <tdevries@suse.de>
6836
6837 * cgraph.h (debuginfo_early_init, debuginfo_init, debuginfo_fini)
6838 (debuginfo_start, debuginfo_stop, debuginfo_early_start)
6839 (debuginfo_early_stop): Declare.
6840 * cgraphunit.c (debuginfo_early_init, debuginfo_init, debuginfo_fini)
6841 (debuginfo_start, debuginfo_stop, debuginfo_early_start)
6842 (debuginfo_early_stop): New function.
6843 (symbol_table::finalize_compilation_unit): Call debuginfo_early_start
6844 and debuginfo_early_stop.
6845 * dwarf2out.c (dwarf2out_finish, dwarf2out_early_finish): Dump dwarf.
6846 * toplev.c (compile_file): Call debuginfo_start and debuginfo_stop.
6847 (general_init): Call debuginfo_early_init.
6848 (finalize): Call debuginfo_fini.
6849 (do_compile): Call debuginfo_init.
6850 * doc/invoke.texi (@gccoptlist): Add -fdump-debug and
6851 -fdump-early-debug.
6852 (@item -fdump-debug, @item -fdump-earlydebug): Add.
6853
6854 2018-08-21 Tom de Vries <tdevries@suse.de>
6855
6856 * dwarf2out.c (print_dw_val, print_loc_descr, print_die): Handle
6857 flag_dump_noaddr and flag_dump_unnumbered.
6858
6859 2018-08-21 Aldy Hernandez <aldyh@redhat.com>
6860
6861 * wide-int-range.cc (wide_int_range_abs): New.
6862 (wide_int_range_order_set): Rename from wide_int_range_min_max.
6863 * wide-int-range.h (wide_int_range_abs): New.
6864 (wide_int_range_min_max): New.
6865 * tree-vrp.c (extract_range_from_unary_expr): Rewrite ABS_EXPR
6866 case to call wide_int_range_abs.
6867 Rewrite MIN/MAX_EXPR to call wide_int_range_min_max.
6868 (extract_range_from_abs_expr): Delete.
6869
6870 2018-08-20 Michael Meissner <meissner@linux.ibm.com>
6871
6872 PR target/87033
6873 * config/rs6000/rs6000.md (extendsi<mode>2): Change constraints
6874 from 'Y' to 'YZ' to enable the LWAX instruction to be generated
6875 for indexed loads.
6876
6877 2018-08-20 Nathan Sidwell <nathan@acm.org>
6878 Jeff Law <law@redhat.com>
6879
6880 * config/s390/s390-c (s390_macro_to_expand): Use cpp_macro_p.
6881 * config/spu/spu-c.c (spu_macro_to_expand): Likewise.
6882
6883 2018-08-20 David Malcolm <dmalcolm@redhat.com>
6884
6885 PR other/84889
6886 * attribs.c (diag_attr_exclusions): Add auto_diagnostic_group instance.
6887 (decl_attributes): Likewise.
6888 * calls.c (maybe_warn_nonstring_arg): Add auto_diagnostic_group
6889 instance.
6890 * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
6891 * diagnostic-core.h (class auto_diagnostic_group): New class.
6892 * diagnostic.c (diagnostic_initialize): Initialize the new fields.
6893 (diagnostic_report_diagnostic): Handle the first diagnostics within
6894 a group.
6895 (emit_diagnostic): Add auto_diagnostic_group instance.
6896 (inform): Likewise.
6897 (inform_n): Likewise.
6898 (warning): Likewise.
6899 (warning_at): Likewise.
6900 (warning_n): Likewise.
6901 (pedwarn): Likewise.
6902 (permerror): Likewise.
6903 (error): Likewise.
6904 (error_n): Likewise.
6905 (error_at): Likewise.
6906 (sorry): Likewise.
6907 (fatal_error): Likewise.
6908 (internal_error): Likewise.
6909 (internal_error_no_backtrace): Likewise.
6910 (auto_diagnostic_group::auto_diagnostic_group): New ctor.
6911 (auto_diagnostic_group::~auto_diagnostic_group): New dtor.
6912 * diagnostic.h (struct diagnostic_context): Add fields
6913 "diagnostic_group_nesting_depth",
6914 "diagnostic_group_emission_count", "begin_group_cb",
6915 "end_group_cb".
6916 * gimple-ssa-isolate-paths.c (find_implicit_erroneous_behavior):
6917 Add auto_diagnostic_group instance(s).
6918 (find_explicit_erroneous_behavior): Likewise.
6919 * gimple-ssa-warn-alloca.c (pass_walloca::execute): Likewise.
6920 * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Likewise.
6921 * gimplify.c (warn_implicit_fallthrough_r): Likewise.
6922 (gimplify_va_arg_expr): Likewise.
6923 * hsa-gen.c (HSA_SORRY_ATV): Likewise.
6924 (HSA_SORRY_AT): Likewise.
6925 * ipa-devirt.c (compare_virtual_tables): Likewise.
6926 (warn_odr): Likewise.
6927 * multiple_target.c (expand_target_clones): Likewise.
6928 * opts-common.c (cmdline_handle_error): Likewise.
6929 * reginfo.c (globalize_reg): Likewise.
6930 * substring-locations.c (format_warning_n_va): Likewise.
6931 * tree-inline.c (expand_call_inline): Likewise.
6932 * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Likewise.
6933 * tree-ssa-loop-niter.c
6934 (do_warn_aggressive_loop_optimizations): Likewise.
6935 * tree-ssa-uninit.c (warn_uninit): Likewise.
6936 * tree.c (warn_deprecated_use): Likewise.
6937
6938 2018-08-20 H.J. Lu <hongjiu.lu@intel.com>
6939
6940 PR target/87014
6941 * config/i386/i386.md (eh_return): Always update EH return
6942 address in word_mode.
6943
6944 2018-08-20 Chung-Lin Tang <cltang@codesourcery.com>
6945
6946 * targhooks.c (std_gimplify_va_arg_expr): Properly handle case of when
6947 TARGET_SPLIT_COMPLEX_ARG is defined.
6948
6949 2018-08-20 Bernd Edlinger <bernd.edlinger@hotmail.de>
6950
6951 * expr.c (store_field): Change gcc_assert to gcc_checking_assert.
6952
6953 2018-08-20 Bernd Edlinger <bernd.edlinger@hotmail.de>
6954
6955 PR target/86984
6956 * expr.c (expand_assignment): Assert that bitpos is positive.
6957 (store_field): Likewise
6958 (expand_expr_real_1): Make sure that bitpos is positive.
6959 * config/alpha/alpha.h (CONSTANT_ADDRESS_P): Avoid signed
6960 integer overflow.
6961
6962 2018-08-20 Nathan Sidwell <nathan@acm.org>
6963
6964 * Makefile.in (CPP_ID_DATA_H): Delete.
6965 (CPP_INTERNAL_H): Don't add it.
6966 (GTFILES): Replace CPP_ID_DATA_H with CPPLIB_H.
6967 * gengtype.c (open_base_files): Replace cpp-id-data.h with cpplib.h
6968
6969 2018-08-20 Richard Biener <rguenther@suse.de>
6970
6971 PR tree-optimization/78655
6972 * tree-vrp.c (extract_range_from_binary_expr_1): Make
6973 pointer + offset nonnull if either operand is nonnull work.
6974
6975 2018-08-20 Tom de Vries <tdevries@suse.de>
6976
6977 * dwarf2out.c (add_scalar_info): Don't add reference to existing die
6978 unless the referenced die describes the added property using
6979 DW_AT_location or DW_AT_const_value. Fall back to exprloc case.
6980 Otherwise, add a DW_AT_location to the referenced die.
6981
6982 2018-08-19 Uros Bizjak <ubizjak@gmail.com>
6983
6984 PR target/86994
6985 * config/i386/i386.c (ix86_rtx_costs) [case SET]: Check source for
6986 register_operand when calling ix86_set_reg_reg_cost.
6987 [case CONST_INT, case CONST, case LABEL_REF, case SYMBOL_REF]:
6988 Set *total to 0 for operands that satisfy x86_64_immediate_operand
6989 predicate and to 1 otherwise.
6990
6991 2018-08-18 Iain Sandoe <iain@sandoe.co.uk>
6992
6993 * config/darwin.c (darwin_override_options): If -gsplit-dwarf is set,
6994 emit a diagnostic that it is not supported and reset the option.
6995 * config/darwin.h (DRIVER_SELF_SPECS): Note that gsplit-dwarf is not
6996 supported and consume the option. (ASM_FINAL_SPEC): New.
6997
6998 2018-08-17 Segher Boessenkool <segher@kernel.crashing.org>
6999
7000 * doc/md.texi (Patterns): Use @ref instead of @xref in the middle of
7001 a sentence.
7002
7003 2018-08-17 Sandra Loosemore <sandra@codesourcery.com>
7004
7005 C-SKY port: Documentation
7006
7007 * doc/extend.texi (C-SKY Function Attributes): New section.
7008 * doc/invoke.texi (Option Summary): Add C-SKY options.
7009 (C-SKY Options): New section.
7010 * doc/md.texi (Machine Constraints): Document C-SKY constraints.
7011
7012 2018-08-17 Jojo <jijie_rong@c-sky.com>
7013 Huibin Wang <huibin_wang@c-sky.com>
7014 Sandra Loosemore <sandra@codesourcery.com>
7015 Chung-Lin Tang <cltang@codesourcery.com>
7016
7017 C-SKY port: Backend implementation
7018
7019 * config/csky/*: New.
7020 * common/config/csky/*: New.
7021
7022 2018-08-17 Jojo <jijie_rong@c-sky.com>
7023 Huibin Wang <huibin_wang@c-sky.com>
7024 Sandra Loosemore <sandra@codesourcery.com>
7025 Chung-Lin Tang <cltang@codesourcery.com>
7026 Andrew Jenner <andrew@codesourcery.com>
7027
7028 C-SKY port: Configury
7029
7030 * config.gcc (csky-*-*): New.
7031 * configure.ac: Add csky to targets for dwarf2 debug_line support.
7032 * configure: Regenerated.
7033
7034 2018-08-17 David Malcolm <dmalcolm@redhat.com>
7035
7036 * dump-context.h: Include "dumpfile.h".
7037 (dump_context::dump_printf_va): Convert final param from va_list
7038 to va_list *. Convert from ATTRIBUTE_PRINTF to
7039 ATTRIBUTE_GCC_DUMP_PRINTF.
7040 (dump_context::dump_printf_loc_va): Likewise.
7041 * dumpfile.c: Include "stringpool.h".
7042 (make_item_for_dump_printf_va): Delete.
7043 (make_item_for_dump_printf): Delete.
7044 (class dump_pretty_printer): New class.
7045 (dump_pretty_printer::dump_pretty_printer): New ctor.
7046 (dump_pretty_printer::emit_items): New member function.
7047 (dump_pretty_printer::emit_any_pending_textual_chunks): New member
7048 function.
7049 (dump_pretty_printer::emit_item): New member function.
7050 (dump_pretty_printer::stash_item): New member function.
7051 (dump_pretty_printer::format_decoder_cb): New member function.
7052 (dump_pretty_printer::decode_format): New member function.
7053 (dump_context::dump_printf_va): Reimplement in terms of
7054 dump_pretty_printer.
7055 (dump_context::dump_printf_loc_va): Convert final param from va_list
7056 to va_list *.
7057 (dump_context::begin_scope): Reimplement call to
7058 make_item_for_dump_printf.
7059 (dump_printf): Update for change to dump_printf_va.
7060 (dump_printf_loc): Likewise.
7061 (selftest::test_capture_of_dump_calls): Convert "stmt" from
7062 greturn * to gimple *. Add a test_decl. Add tests of dump_printf
7063 with %T, %E, and %G.
7064 * dumpfile.h (ATTRIBUTE_GCC_DUMP_PRINTF): New macro.
7065 (dump_printf): Replace ATTRIBUTE_PRINTF_2 with
7066 ATTRIBUTE_GCC_DUMP_PRINTF (2, 3).
7067 (dump_printf_loc): Replace ATTRIBUTE_PRINTF_3 with
7068 ATTRIBUTE_GCC_DUMP_PRINTF (3, 0).
7069 * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Convert
7070 use of HOST_WIDE_INT_PRINT_DEC on unsigned HOST_WIDE_INT "count"
7071 within a dump_printf_loc call to "%wu".
7072 (vector_alignment_reachable_p): Merge two dump_printf[_loc] calls,
7073 converting a use of HOST_WIDE_INT_PRINT_DEC to "%wd". Add a
7074 missing space after "=".
7075 * tree-vect-loop.c (vect_analyze_loop_2) Within a dump_printf
7076 call, convert use of HOST_WIDE_INT_PRINT_DEC to "%wd".
7077 * tree-vect-slp.c (vect_slp_bb): Within a dump_printf_loc call,
7078 convert use of HOST_WIDE_INT_PRINT_UNSIGNED to "%wu".
7079 * tree-vectorizer.c (try_vectorize_loop_1): Likewise. Remove
7080 duplicate "vectorized" from message.
7081
7082 2018-08-17 Szabolcs Nagy <szabolcs.nagy@arm.com>
7083
7084 * config/arm/arm-builtins.c (arm_init_simd_builtin_types): Clear
7085 polyNxK_t element's TYPE_STRING_FLAG.
7086
7087 2018-08-17 Segher Boessenkool <segher@kernel.crashing.org>
7088
7089 * config/rs6000/rs6000.md (*cbranch, *creturn): Name these patterns
7090 (they were unnamed before). Fix comments.
7091
7092 2018-08-17 Nathan Sidwell <nathan@acm.org>
7093
7094 * cppbuiltin.c: Include "cpplib.h", not "cpp-id-data.h".
7095
7096 2018-08-17 Richard Biener <rguenther@suse.de>
7097
7098 PR tree-optimization/86841
7099 * wide-int-range.cc (wide_int_range_lshift): Use to_uhwi.
7100
7101 2018-08-17 Martin Liska <mliska@suse.cz>
7102
7103 * common.opt: Remove Warn, Init and Report for options with
7104 Ignore/Deprecated flag. Warning is done automatically for
7105 Deprecated flags.
7106 * config/i386/i386.opt: Likewise.
7107 * config/ia64/ia64.opt: Likewise.
7108 * config/rs6000/rs6000.opt: Likewise.
7109 * cppbuiltin.c (define_builtin_macros_for_compilation_flags):
7110 Remove usage of flag_check_pointer_bounds.
7111 * lto-wrapper.c (merge_and_complain): Do not handle
7112 OPT_fcheck_pointer_bounds.
7113 (append_compiler_options): Likewise.
7114 * opt-functions.awk: Do not handle Deprecated.
7115 * optc-gen.awk: Check that Var, Report and Init are not
7116 used for an option with Ignore/Deprecated flag.
7117 * opts-common.c (decode_cmdline_option): Do not report
7118 CL_ERR_DEPRECATED.
7119 (read_cmdline_option): Report warning for OPT_SPECIAL_deprecated
7120 options.
7121 * opts.h (struct cl_option): Remove cl_deprecated flag.
7122 (CL_ERR_DEPRECATED): Remove error enum value.
7123
7124 2018-08-17 Richard Biener <rguenther@suse.de>
7125
7126 PR middle-end/86505
7127 * tree-inline.c (copy_bb): When inlining __builtin_va_arg_pack_len ()
7128 across a va-arg-pack using call adjust its return value accordingly.
7129
7130 2018-08-16 Martin Sebor <msebor@redhat.com>
7131
7132 PR tree-optimization/86853
7133 * gimple-ssa-sprintf.c (struct format_result): Rename member.
7134 (struct fmtresult): Add member and initialize it in ctors.
7135 (format_character): Handle %C. Extend range to NUL. Set MAYFAIL.
7136 (format_string): Handle %S the same as %ls. Set MAYFAIL.
7137 (format_directive): Set POSUNDER4K when MAYFAIL is set.
7138 (parse_directive): Handle %C same as %c.
7139 (sprintf_dom_walker::compute_format_length): Adjust.
7140 (is_call_safe): Adjust.
7141
7142 2018-08-16 Bernd Edlinger <bernd.edlinger@hotmail.de>
7143
7144 * builtins.c (c_strlen): Add new parameter eltsize. Use it
7145 for determining how to count the elements.
7146 * builtins.h (c_strlen): Adjust prototype.
7147 * expr.c (string_constant): Add new parameter mem_size.
7148 Set *mem_size appropriately.
7149 * expr.h (string_constant): Adjust protoype.
7150 * gimple-fold.c (get_range_strlen): Add new parameter eltsize.
7151 * gimple-fold.h (get_range_strlen): Adjust prototype.
7152 * gimple-ssa-sprintf.c (get_string_length): Add new parameter eltsize.
7153 (format_string): Call get_string_length with eltsize.
7154
7155 2018-08-16 David Malcolm <dmalcolm@redhat.com>
7156
7157 * diagnostic.c (default_diagnostic_start_span_fn): Call pp_string
7158 to emit the span, rather than setting it as the prefix.
7159
7160 2018-08-16 David Malcolm <dmalcolm@redhat.com>
7161
7162 * diagnostic-show-locus.c (layout::start_annotation_line): Add
7163 "margin_char" parameter, defaulting to space. Use it in place
7164 of pp_space for the initial part of the margin.
7165 (layout::print_leading_fixits): Use '+' when filling the margin
7166 of line-insertion fix-it hints.
7167
7168 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
7169
7170 * config/rs6000/rs6000.md (two unnamed define_insn and define_split):
7171 Delete.
7172
7173 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
7174
7175 * config/rs6000/altivec.md: Don't set length attribute to the default
7176 value.
7177 * config/rs6000/darwin.md: Ditto.
7178 * config/rs6000/dfp.md: Ditto.
7179 * config/rs6000/htm.md: Ditto.
7180 * config/rs6000/rs6000.md: Ditto.
7181 * config/rs6000/sync.md: Ditto.
7182 * config/rs6000/vsx.md: Ditto.
7183
7184 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
7185
7186 * config/rs6000/altivec.md: Don't set length attribute to the default
7187 value, for branch instructions.
7188 * config/rs6000/darwin.md: Ditto.
7189 * config/rs6000/rs6000.md: Ditto.
7190
7191 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
7192
7193 * config/rs6000/rs6000.md (length): Always define as const_int 4.
7194 (unnamed conditional branch define_insn): Set length to 4 or 8
7195 depending on offset.
7196 (<bd>_<mode>): Similar, for alternative 0.
7197 (<bd>tf_<mode>): Ditto.
7198
7199 2018-08-16 Tamar Christina <tamar.christina@arm.com>
7200
7201 * expr.c (copy_blkmode_to_reg): Perform larger copies when safe.
7202
7203 2018-08-16 Matthew Malcomson <matthew.malcomson@arm.com>
7204
7205 * doc/rtl.texi: Replace old RTX class names with new names.
7206
7207
7208 2018-08-16 Vlad Lazar <vlad.lazar@arm.com>
7209
7210 * expmed.h (canonicalize_comparison): New declaration.
7211 * expmed.c (canonicalize_comparison, equivalent_cmp_code): New function.
7212 * expmed.c (emit_store_flag_1): Add call to canonicalize_comparison.
7213 * optabs.c (prepare_cmp_insn): Likewise.
7214 * rtl.h (unsigned_condition_p): New function which checks if a
7215 comparison operator is unsigned.
7216
7217 2018-08-16 Nathan Sidwell <nathan@acm.org>
7218
7219 * config/rs6000/rs6000-c.c (rs6000_macro_to_expend): Use cpp_macro_p.
7220 * config/powerpcspc/powerpcspe-c.c (rs6000_macro_to_expend): Likewise.
7221
7222 2018-08-16 Tamar Christina <tamar.christina@arm.com>
7223
7224 PR target/84711
7225 * config/arm/arm.c (arm_can_change_mode_class): Disallow subreg.
7226 * config/arm/neon.md (movv4hf, movv8hf): Refactored to..
7227 (mov<mov>): ..this and enable unconditionally.
7228
7229 2018-08-16 Tamar Christina <tamar.christina@arm.com>
7230
7231 * config/arm/neon.md (*neon_mov<mode>): Remove reg-to-reg alternative.
7232
7233 2018-08-16 Sam Tebbs <sam.tebbs@arm.com>
7234
7235 * config/aarch64/aarch64.opt (mlow-precision-recip-sqrt)
7236 (mlow-precision-sqrt, mlow-precision-div, mverbose-cost-dump): Replace
7237 "Common" with "Target".
7238
7239 2018-08-15 Uros Bizjak <ubizjak@gmail.com>
7240
7241 * config/i386/i386.opt (mmitigate-rop): Mark as deprecated.
7242 * doc/invoke.texi (mmitigate-rop): Remove.
7243 * config/i386/i386.c: Do not include "regrename.h".
7244 (ix86_rop_should_change_byte_p, reg_encoded_number)
7245 (ix86_get_modrm_for_rop, set_rop_modrm_reg_bits, ix86_mitigate_rop):
7246 Remove.
7247 (ix86_reorg): Remove call to ix86_mitigate_rop.
7248 * config/i386/i386.md (attr "modrm_class"): Remove.
7249 (cmp<mode>_ccno_1, mov<mode>_xor, movstrict<mode>_xor)
7250 (x86_mov<mode>cc_0_m1. x86_mov<mode>cc_0_m1_se)
7251 (x86_mov<mode>cc_0_m1_neg): Remove modrm_class attribute override.
7252
7253 2018-08-15 Will Schmidt <will_schmidt@vnet.ibm.com>
7254
7255 * config/rs6000/rs600.c (rs6000_gimple_fold_builtin): Add entries to
7256 allow folding of mergeh() and mergel() for the float and double types.
7257 (fold_mergehl_helper): Rework to handle building a permute tree
7258 for float vectors.
7259
7260 2018-08-15 Uros Bizjak <ubizjak@gmail.com>
7261
7262 * config/i386/i386.c (expand_vec_perm_movs): Enable V4SFmode
7263 for TARGET_SSE.
7264
7265 2018-08-15 David Malcolm <dmalcolm@redhat.com>
7266
7267 * common.opt (fdiagnostics-show-labels): New option.
7268 * diagnostic-show-locus.c (class layout_range): Add field
7269 "m_label".
7270 (class layout): Add field "m_show_labels_p".
7271 (layout_range::layout_range): Add param "label" and use it to
7272 initialize m_label.
7273 (make_range): Pass in NULL for new "label" param of layout_range's
7274 ctor.
7275 (layout::layout): Initialize m_show_labels_p.
7276 (layout::maybe_add_location_range): Pass in loc_range->m_label
7277 when constructing layout_range instances.
7278 (struct line_label): New struct.
7279 (layout::print_any_labels): New member function.
7280 (layout::print_line): Call it if label-printing is enabled.
7281 (selftest::test_one_liner_labels): New test.
7282 (selftest::test_diagnostic_show_locus_one_liner): Call it.
7283 * diagnostic.c (diagnostic_initialize): Initialize
7284 context->show_labels_p.
7285 * diagnostic.h (struct diagnostic_context): Add field
7286 "show_labels_p".
7287 * doc/invoke.texi (Diagnostic Message Formatting Options): Add
7288 -fno-diagnostics-show-labels.
7289 * dwarf2out.c (gen_producer_string): Add
7290 OPT_fdiagnostics_show_labels to the ignored options.
7291 * gcc-rich-location.c (gcc_rich_location::add_expr): Add "label"
7292 param.
7293 (gcc_rich_location::maybe_add_expr): Likewise.
7294 * gcc-rich-location.h (gcc_rich_location::gcc_rich_location): Add
7295 label" param, defaulting to NULL.
7296 (gcc_rich_location::add_expr): Add "label" param.
7297 (gcc_rich_location::maybe_add_expr): Likewise.
7298 (class text_range_label): New class.
7299 (class range_label_for_type_mismatch): New class.
7300 * gimple-ssa-sprintf.c (fmtwarn): Pass NULL for new label params
7301 of format_warning_va.
7302 (fmtwarn_n): Likewise for new params of format_warning_n_va.
7303 * lto-wrapper.c (merge_and_complain): Add
7304 OPT_fdiagnostics_show_labels to the "pick one setting" options.
7305 (append_compiler_options): Likewise to the dropped options.
7306 (append_diag_options): Likewise to the passed-on options.
7307 * opts.c (common_handle_option): Handle the new option.
7308 * selftest-diagnostic.c
7309 (test_diagnostic_context::test_diagnostic_context): Enable
7310 show_labels_p.
7311 * substring-locations.c: Include "gcc-rich-location.h".
7312 (format_warning_n_va): Add "fmt_label" and "param_label" params
7313 and use them as appropriate.
7314 (format_warning_va): Add "fmt_label" and "param_label" params,
7315 passing them on to format_warning_n_va.
7316 (format_warning_at_substring): Likewise.
7317 (format_warning_at_substring_n): Likewise.
7318 * substring-locations.h (format_warning_va): Add "fmt_label" and
7319 "param_label" params.
7320 (format_warning_n_va): Likewise.
7321 (format_warning_at_substring): Likewise.
7322 (format_warning_at_substring_n): Likewise.
7323 * toplev.c (general_init): Initialize global_dc->show_labels_p.
7324
7325 2018-08-15 Qing Zhao <qing.zhao@oracle.com>
7326
7327 PR testsuite/86519
7328 * builtins.c (expand_builtin_memcmp): Do not expand the call
7329 when overflow is detected.
7330
7331 2018-08-15 Martin Sebor <msebor@redhat.com>
7332
7333 PR tree-optimization/71625
7334 * config/aarch64/aarch64-builtins.c
7335 (aarch64_init_simd_builtin_types): Clear Poly8_t's TYPE_STRING_FLAG.
7336
7337 2018-08-15 Ilya Leoshkevich <iii@linux.ibm.com>
7338
7339 * config/s390/s390.c (s390_reorg): Remove loop.
7340
7341 2018-08-15 Iain Sandoe <iain@sandoe.co.uk>
7342
7343 * config/darwin.c
7344 (darwin_function_switched_text_sections): Delete.
7345 * gcc/config/darwin.h
7346 (TARGET_ASM_FUNCTION_SWITCHED_TEXT_SECTIONS): Likewise.
7347
7348 2018-08-15 Iain Sandoe <iain@sandoe.co.uk>
7349
7350 PR target/81685
7351 * config/darwin.h: (DEBUG_STR_OFFSETS_SECTION, DEBUG_LOCLISTS_SECTION,
7352 DEBUG_RNGLISTS_SECTION) new macros. (DEBUG_PUBNAMES_SECTION,
7353 DEBUG_PUBTYPES_SECTION) update to include GNU variant.
7354
7355 2018-08-15 Martin Liska <mliska@suse.cz>
7356
7357 PR tree-optimization/86925
7358 * predict.c (expr_expected_value_1): When taking
7359 later predictor, assign also probability.
7360 Use fold_build2_initializer_loc in order to fold
7361 the expression in -frounding-math.
7362
7363 2018-08-14 Allan Sandfeld Jensen <allan.jensen@qt.io>
7364
7365 * config/i386/i386.c (expand_vec_perm_movs): New method matching movs
7366 patterns.
7367 (expand_vec_perm_1): Try the new method.
7368
7369 2018-08-14 Ilya Leoshkevich <iii@linux.ibm.com>
7370
7371 PR target/86547
7372 * lra-lives.c (remove_some_program_points_and_update_live_ranges):
7373 Check whether lra_live_max_point is 0 before dividing.
7374
7375 2018-08-14 Martin Sebor <msebor@redhat.com>
7376
7377 PR tree-optimization/86650
7378 * tree-vrp.c (vrp_prop::check_array_ref): Print an inform message.
7379 (vrp_prop::check_mem_ref): Same.
7380
7381 2018-08-13 Liu Hao <lh_mouse@126.com>
7382
7383 * pretty-print.c (eat_esc_sequence): Swap the foreground and
7384 background colors if the COMMON_LVB_REVERSE_VIDEO flag is set,
7385 and clear it thereafter, as it only works for DBCS.
7386
7387 2018-08-13 Liu Hao <lh_mouse@126.com>
7388
7389 * pretty-print.c (mingw_ansi_fputs): Do not call _close() on the
7390 handle returned by _get_osf_handle().
7391
7392 2018-08-13 Will Schmidt <will_schmidt@vnet.ibm.com>
7393
7394 * gcc/config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add support
7395 for folding vec_perm.
7396
7397 2018-08-13 Will Schmidt <will_schmidt@vnet.ibm.com>
7398
7399 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin):
7400 Add support for gimple-folding of vec_pack() and vec_unpack()
7401 intrinsics.
7402
7403 2018-08-13 Will Schmidt <will_schmidt@vnet.ibm.com>
7404
7405 * config/rs6000/rs6000.c (rs6000_builtin_valid_without_lhs): Add
7406 vec_xst variants to the list.
7407 (rs6000_gimple_fold_builtin): Add support for folding unaligned
7408 vector loads and stores.
7409
7410 2018-08-13 David Edelsohn <dje.gcc@gmail.com>
7411
7412 * config.gcc (rs6000-ibm-aix4.x): Delete.
7413 (rs6000-ibm-aix5.1): Delete.
7414 (rs6000-ibm-aix5.2): Delete.
7415 (rs6000-ibm-aix5.3): Delete.
7416 * config/rs6000/aix43.h: Delete.
7417 * config/rs6000/aix51.h: Delete.
7418 * config/rs6000/aix52.h: Delete.
7419 * config/rs6000/t-aix43: Delete.
7420
7421 2018-08-13 Ilya Leoshkevich <iii@linux.ibm.com>
7422
7423 * config/s390/s390.c (s390_decompose_constant_pool_ref):
7424 New function.
7425 (s390_decompose_address): Factor out constant pool ref
7426 decomposition.
7427
7428 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
7429
7430 * config/nds32/nds32-predicates.c
7431 (nds32_can_use_bclr_p): Change return type as bool.
7432 (nds32_can_use_bset_p): Ditto.
7433 (nds32_can_use_btgl_p): Ditto.
7434 (nds32_can_use_bitci_p): Ditto.
7435 * config/nds32/nds32-protos.h
7436 (nds32_can_use_bclr_p): Change declaration.
7437 (nds32_can_use_bset_p): Ditto.
7438 (nds32_can_use_btgl_p): Ditto.
7439 (nds32_can_use_bitci_p): Ditto.
7440
7441 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
7442
7443 * config/nds32/nds32.c (nds32_expand_prologue, nds32_expand_epilogue):
7444 Support -msched-prolog-epilog option.
7445 * config/nds32/nds32.opt (msched-prolog-epilog): New option.
7446
7447 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
7448
7449 * common/config/nds32/nds32-common.c
7450 (nds32_option_optimization_table): Enalbe -malways-align.
7451
7452 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
7453
7454 * config.gcc (nds32*): Add nds32_isr.h and nds32_init.inc in
7455 extra_headers.
7456 * common/config/nds32/nds32-common.c (nds32_handle_option): Handle
7457 OPT_misr_secure_ case.
7458 * config/nds32/nds32-isr.c: Implementation of backward compatibility.
7459 * config/nds32/nds32-protos.h (nds32_isr_function_critical_p): New.
7460 * config/nds32/nds32.c (nds32_attribute_table): Add critical and
7461 secure attribute.
7462 * config/nds32/nds32.h (nds32_isr_nested_type): Add NDS32_CRITICAL.
7463 (nds32_isr_info): New field security_level.
7464 (TARGET_ISR_VECTOR_SIZE_4_BYTE): New macro.
7465 * config/nds32/nds32.md (return_internal): Consider critical attribute.
7466 * config/nds32/nds32.opt (misr-secure): New option.
7467 * config/nds32/nds32_init.inc: New file.
7468 * config/nds32/nds32_isr.h: New file.
7469
7470 2018-08-11 John David Anglin <danglin@gcc.gnu.org>
7471
7472 * config/pa/pa.md (UNSPEC_MEMORY_BARRIER): New unspec enum.
7473 Update comment for atomic instructions.
7474 (atomic_storeqi, atomic_storehi, atomic_storesi, atomic_storesf,
7475 atomic_loaddf, atomic_loaddf_1, atomic_storedf, atomic_storedf_1):
7476 Remove.
7477 (atomic_loaddi): Revise fence expansion to only emit fence prior to
7478 load for __ATOMIC_SEQ_CST model.
7479 (atomic_loaddi_1): Remove float register target.
7480 (atomic_storedi): Handle CONST_INT values.
7481 (atomic_storedi_1): Remove float register source. Add special case
7482 for zero value.
7483 (memory_barrier): New expander and insn.
7484
7485 2018-08-11 Jakub Jelinek <jakub@redhat.com>
7486
7487 PR tree-optimization/86835
7488 * tree-ssa-math-opts.c (insert_reciprocals): Even when inserting
7489 new_stmt after def_gsi, make sure to insert new_square_stmt after
7490 that stmt, not 2 stmts before it.
7491
7492 2018-08-10 Alexander Monakov <amonakov@ispras.ru>
7493
7494 PR target/82418
7495 * config/i386/i386.md (<s>mul<mode>3_highpart): Use DWIH mode iterator
7496 instead of SWI48.
7497
7498 2018-08-10 Martin Liska <mliska@suse.cz>
7499
7500 PR target/83610
7501 * builtin-types.def (BT_FN_LONG_LONG_LONG_DOUBLE): Add new
7502 function type.
7503 * builtins.c (expand_builtin_expect_with_probability):
7504 New function.
7505 (expand_builtin_expect_with_probability): New function.
7506 (build_builtin_expect_predicate): Add new argumnet probability
7507 for BUILT_IN_EXPECT_WITH_PROBABILITY.
7508 (fold_builtin_expect):
7509 (fold_builtin_2):
7510 (fold_builtin_3):
7511 * builtins.def (BUILT_IN_EXPECT_WITH_PROBABILITY):
7512 * builtins.h (fold_builtin_expect): Set new argument.
7513 * doc/extend.texi: Document __builtin_expect_with_probability.
7514 * doc/invoke.texi: Likewise.
7515 * gimple-fold.c (gimple_fold_call): Pass new argument.
7516 * ipa-fnsummary.c (find_foldable_builtin_expect): Handle
7517 also BUILT_IN_EXPECT_WITH_PROBABILITY.
7518 * predict.c (get_predictor_value): New function.
7519 (expr_expected_value): Add new argument probability. Assume
7520 that predictor and probability are always non-null.
7521 (expr_expected_value_1): Likewise. For __builtin_expect and
7522 __builtin_expect_with_probability set probability. Handle
7523 combination in binary expressions.
7524 (tree_predict_by_opcode): Simplify code by simply calling
7525 get_predictor_value.
7526 (pass_strip_predict_hints::execute): Add handling of
7527 BUILT_IN_EXPECT_WITH_PROBABILITY.
7528 * predict.def (PRED_BUILTIN_EXPECT_WITH_PROBABILITY): Add
7529 new predictor.
7530 * tree.h (DECL_BUILT_IN_P): New function.
7531
7532 2018-08-10 Martin Liska <mliska@suse.cz>
7533
7534 PR tree-optimization/85799
7535 * passes.def: Add argument for pass_strip_predict_hints.
7536 * predict.c (class pass_strip_predict_hints): Add new argument
7537 early_p.
7538 (strip_predictor_early): New function.
7539 (pass_strip_predict_hints::execute): Call the function to
7540 strip predictors.
7541 (strip_predict_hints): New function.
7542 * predict.def: Fix comment.
7543
7544 2018-08-10 Thomas Preud'homme <thomas.preudhomme@linaro.org>
7545
7546 * Makefile.in: Clarify which tm.texi to copy over to assert the
7547 right to grant a GFDL license for all.
7548
7549 2018-08-09 Jeff Law <law@redhat.com>
7550
7551 * config/m68k/m68k.c (m68k_adjust_decorated_operand): Remove
7552 unused variable.
7553
7554 2018-08-09 Andreas Schwab <schwab@linux-m68k.org>
7555
7556 * config/m68k/m68k-protos.h (m68k_final_prescan_insn): Remove
7557 prototype.
7558
7559 2018-08-09 Richard Sandiford <richard.sandiford@arm.com>
7560
7561 * tree-vect-loop.c (vectorizable_reduction): Allow inner-loop
7562 reductions for variable-length vectors.
7563
7564 2018-08-09 David Malcolm <dmalcolm@redhat.com>
7565
7566 PR other/84889
7567 * common.opt (fdiagnostics-show-line-numbers): New option.
7568 * diagnostic-show-locus.c (class layout): Add fields
7569 "m_show_line_numbers_p" and "m_linenum_width";
7570 (num_digits): New function.
7571 (test_num_digits): New function.
7572 (layout::layout): Initialize new fields. Update m_x_offset
7573 logic to handle any left margin.
7574 (layout::print_source_line): Print line number when requested.
7575 (layout::start_annotation_line): New member function.
7576 (layout::print_annotation_line): Call it.
7577 (layout::print_leading_fixits): Likewise.
7578 (layout::print_trailing_fixits): Likewise. Update calls to
7579 move_to_column for new parameter.
7580 (layout::get_x_bound_for_row): Add "add_left_margin" param and use
7581 it to potentially call start_annotation_line.
7582 (layout::show_ruler): Call start_annotation_line.
7583 (selftest::test_line_numbers_multiline_range): New selftest.
7584 (selftest::diagnostic_show_locus_c_tests): Call test_num_digits
7585 and selftest::test_line_numbers_multiline_range.
7586 * diagnostic.c (diagnostic_initialize): Initialize
7587 show_line_numbers_p.
7588 * diagnostic.h (struct diagnostic_context): Add field
7589 "show_line_numbers_p".
7590 * doc/invoke.texi (Diagnostic Message Formatting Options): Add
7591 -fno-diagnostics-show-line-numbers.
7592 * dwarf2out.c (gen_producer_string): Add
7593 OPT_fdiagnostics_show_line_numbers to the ignored options.
7594 * lto-wrapper.c (merge_and_complain): Likewise to the "pick
7595 one setting" options.
7596 (append_compiler_options): Likewise to the dropped options.
7597 (append_diag_options): Likewise to the passed-on options.
7598 * opts.c (common_handle_option): Handle the new option.
7599 * toplev.c (general_init): Set up global_dc->show_line_numbers_p.
7600
7601 2018-08-09 Kelvin Nilsen <kelvin@gcc.gnu.org>
7602
7603 * doc/extend.texi (PowerPC AltiVec Built-in Functions Available on
7604 ISA 2.07): Correct spelling of bcdsub to be __builtin_bcdsub. Add
7605 third argument of type "const signed char" to descriptions of
7606 __builtin_bcdadd, __builtin_bcdadd_lt, __builtin_bcdadd_eq,
7607 __builtin_bcdadd_gt, __builtin_bcdadd_ov, __builtin_bcdsub,
7608 __builtin_bcdsub_lt, __builtin_bcdsub_eq, __builtin_bcdsub_gt,
7609 __builtin_bcdsub_ov functions.
7610
7611 2018-08-09 Richard Sandiford <richard.sandiford@arm.com>
7612
7613 PR tree-optimization/86858
7614 * tree-vect-loop.c (vect_is_simple_reduction): Restore
7615 flow_bb_inside_loop_p calls.
7616
7617 2018-08-09 Richard Sandiford <richard.sandiford@arm.com>
7618
7619 PR tree-optimization/86871
7620 * tree-vect-stmts.c (vect_transform_stmt): Use gimple_get_lhs
7621 instead of gimple_assign_lhs.
7622
7623 2018-08-09 Richard Earnshaw <rearnsha@arm.com>
7624
7625 PR target/86887
7626 * config/aarch64/aarch64.md (add<mode>3_carryinC_zero): Add missing
7627 register constraint to operand 0.
7628 (add<mode>3_carryinC): Likewise.
7629 (add<mode>3_carryinV_zero, add<mode>3_carryinV): Likewise.
7630
7631 2018-08-09 Martin Liska <mliska@suse.cz>
7632
7633 PR c/86895
7634 * common.opt: Remove extra line.
7635
7636 2018-08-09 Martin Liska <mliska@suse.cz>
7637
7638 * params.def (PARAM_ALIGN_LOOP_ITERATIONS): Remove double dots
7639 at the end of a line, make first letter capital and end up
7640 a sentence with a dot.
7641 (PARAM_LOOP_INTERCHANGE_STRIDE_RATIO): Likewise.
7642 (PARAM_LOOP_BLOCK_TILE_SIZE): Likewise.
7643 (PARAM_GRAPHITE_MAX_NB_SCOP_PARAMS): Likewise.
7644 (PARAM_GRAPHITE_MAX_ARRAYS_PER_SCOP): Likewise.
7645 (PARAM_MAX_ISL_OPERATIONS): Likewise.
7646 (PARAM_GRAPHITE_ALLOW_CODEGEN_ERRORS): Likewise.
7647 (PARAM_PROFILE_FUNC_INTERNAL_ID): Likewise.
7648 (PARAM_INDIR_CALL_TOPN_PROFILE): Likewise.
7649 (PARAM_SLP_MAX_INSNS_IN_BB): Likewise.
7650 (PARAM_IPA_CP_EVAL_THRESHOLD): Likewise.
7651 (PARAM_IPA_CP_RECURSION_PENALTY): Likewise.
7652 (PARAM_IPA_CP_SINGLE_CALL_PENALTY): Likewise.
7653 (PARAM_IPA_CP_LOOP_HINT_BONUS): Likewise.
7654 (PARAM_IPA_CP_ARRAY_INDEX_HINT_BONUS): Likewise.
7655 (PARAM_TREE_REASSOC_WIDTH): Likewise.
7656 (PARAM_HSA_GEN_DEBUG_STORES): Likewise.
7657 (PARAM_MAX_SPECULATIVE_DEVIRT_MAYDEFS): Likewise.
7658 (PARAM_MAX_VRP_SWITCH_ASSERTIONS): Likewise.
7659
7660 2018-08-09 Andreas Krebbel <krebbel@linux.ibm.com>
7661
7662 PR target/84332
7663 * config/s390/s390.c (s390_option_override_internal): Reduce the
7664 stack-clash-protection-probe-interval param if it would be too big
7665 for z900.
7666
7667 2018-08-08 Andreas Schwab <schwab@linux-m68k.org>
7668
7669 PR target/46179
7670 * config/m68k/m68k.h (FINAL_PRESCAN_INSN): Don't define.
7671 * config/m68k/m68k.c (handle_move_double): Don't call
7672 m68k_final_prescan_insn.
7673 (m68k_adjust_decorated_operand): Renamed from
7674 m68k_final_prescan_insn, remove first and third operand and
7675 simplify.
7676 (print_operand): Call it.
7677 (print_operand_address): Call it.
7678
7679 2018-08-08 Nathan Sidwell <nathan@acm.org>
7680
7681 * diagnostic.c (diagnostic_report_current_module): Use
7682 linemap_included_from & linemap_included_from_linemap.
7683
7684 2018-08-08 Hongbo Zhang <hongbo.zhang@linaro.org>
7685
7686 * config/aarch64/aarch64-cores.def: Add phecda core.
7687 * config/aarch64/aarch64-tune.md: Regenerate.
7688 * doc/invoke.texi: Add phecda core.
7689
7690 2018-08-08 Andreas Krebbel <krebbel@linux.ibm.com>
7691
7692 PR target/85295
7693 * config/s390/constraints.md ("NxHD0", "NxSD0"): New constraint
7694 definitions.
7695 * config/s390/s390.md ("movti"): Add more alternatives for
7696 constant to GPR copies.
7697
7698 2018-08-08 Andreas Krebbel <krebbel@linux.ibm.com>
7699
7700 * config/s390/s390.c: Fix whitespace damage throughout the file.
7701 * config/s390/s390.h: Likewise.
7702 * config/s390/tpf.h: Likewise.
7703
7704 2018-08-08 Ilya Leoshkevich <iii@linux.ibm.com>
7705
7706 * config/s390/s390.c (s390_loadrelative_operand_p):
7707 Remove TARGET_CPU_ZARCH usages.
7708 (s390_rtx_costs): Likewise.
7709 (s390_legitimate_constant_p): Likewise.
7710 (s390_cannot_force_const_mem): Likewise.
7711 (legitimate_reload_constant_p): Likewise.
7712 (s390_preferred_reload_class): Likewise.
7713 (legitimize_pic_address): Likewise.
7714 (legitimize_tls_address): Likewise.
7715 (s390_split_branches): Removed.
7716 (s390_add_execute): Removed.
7717 (s390_dump_pool): Remove TARGET_CPU_ZARCH usages.
7718 (s390_mainpool_start): Likewise.
7719 (s390_mainpool_finish): Likewise.
7720 (s390_mainpool_cancel): Removed.
7721 (s390_chunkify_start): Remove TARGET_CPU_ZARCH usages.
7722 (s390_chunkify_cancel): Likewise.
7723 (s390_return_addr_rtx): Likewise.
7724 (s390_register_info): Remove split_branches_pending_p uages.
7725 (s390_optimize_register_info): Likewise.
7726 (s390_init_frame_layout): Remove TARGET_CPU_ZARCH and
7727 split_branches_pending_p usages.
7728 (s390_can_eliminate): Remove TARGET_CPU_ZARCH usages.
7729 (s390_load_got): Likewise.
7730 (s390_expand_split_stack_prologue): Likewise.
7731 (output_asm_nops): Likewise.
7732 (s390_function_profiler): Likewise.
7733 (s390_emit_call): Likewise.
7734 (s390_conditional_register_usage): Likewise.
7735 (s390_optimize_prologue): Likewise.
7736 (s390_reorg): Remove TARGET_CPU_ZARCH and
7737 split_branches_pending_p usages.
7738 (s390_option_override_internal): Remove TARGET_CPU_ZARCH
7739 usages.
7740 (s390_output_indirect_thunk_function): Likewise.
7741 * config/s390/s390.h (TARGET_CPU_ZARCH): Removed.
7742 (TARGET_CPU_ZARCH_P): Removed.
7743 (struct machine_function): Remove split_branches_pending_p.
7744 * config/s390/s390.md: Remove TARGET_CPU_ZARCH usages.
7745
7746 2018-08-08 Ilya Leoshkevich <iii@linux.ibm.com>
7747
7748 * common/config/s390/s390-common.c (processor_flags_table):
7749 Remove flags.
7750 * config.gcc: Remove with_arch/with_tune support.
7751 * config/s390/2064.md: Remove cpu attribute comparisons.
7752 * config/s390/driver-native.c (s390_host_detect_local_cpu):
7753 Remove MTN.
7754 * config/s390/linux.h (ASM_SPEC):
7755 Remove -march support.
7756 * config/s390/s390-c.c (s390_cpu_cpp_builtins_internal):
7757 Use a table to get an arch level.
7758 * config/s390/s390-opts.h (enum processor_type):
7759 Remove enum values.
7760 * config/s390/s390.c
7761 (processor_table): Remove entries, add arch_level values.
7762 (s390_issue_rate): Remove cases.
7763 (s390_option_override): Adjust
7764 s390_option_override_internal() call.
7765 (s390_option_override_internal): Remove deprecation warning.
7766 (s390_valid_target_attribute_tree): Adjust
7767 s390_option_override_internal() call.
7768 * config/s390/s390.h (struct s390_processor):
7769 Share with s390-c.c, add arch_level field.
7770 * config/s390/s390.md:
7771 Remove occurrences in cpu attribute.
7772 * config/s390/s390.opt: Remove -march/-mtune support.
7773 * config/s390/tpf.h (ASM_SPEC): Remove -march support.
7774 * doc/invoke.texi: Remove deprecation warning.
7775
7776 2018-08-08 Luis Machado <luis.machado@linaro.org>
7777
7778 * config/aarch64/aarch64.c (qdf24xx_vector_cost): New static
7779 global.
7780 (qdf24xx_tunings): Set vector cost structure to
7781 qdf24xx_vector_cost.
7782
7783 * config/aarch64/aarch64.c (qdf24xx_addrcost_table)
7784 <register_sextend>: Set to 3.
7785
7786 2018-08-07 Richard Sandiford <richard.sandiford@arm.com>
7787
7788 PR target/86838
7789 * config/aarch64/iterators.md (FRECP, frecp_suffix): Delete.
7790 * config/aarch64/aarch64-simd.md
7791 (aarch64_frecp<FRECP:frecp_suffix><mode>): Fold FRECPE into...
7792 (@aarch64_frecpe<mode>): ...here and the move FRECPX to...
7793 (aarch64_frecpx<mode>): ...this new pattern.
7794 * config/aarch64/aarch64-simd-builtins.def: Remove comment
7795 about aarch64_frecp<FRECP:frecp_suffix><mode>.
7796
7797 2018-08-07 Martin Liska <mliska@suse.cz>
7798
7799 PR middle-end/83023
7800 * predict.c (expr_expected_value_1): Handle DECL_IS_MALLOC,
7801 BUILT_IN_REALLOC and DECL_IS_OPERATOR_NEW.
7802 * predict.def (PRED_MALLOC_NONNULL): New predictor.
7803 * doc/extend.texi: Document that malloc attribute adds
7804 hit to compiler.
7805
7806 2018-08-06 John David Anglin <danglin@gcc.gnu.org>
7807
7808 PR target/86785
7809 * config/pa/pa.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
7810 Define to speculation_safe_value_not_needed.
7811
7812 2018-08-06 Jeff Law <law@redhat.com>
7813
7814 * tree-ssa-dom.c (dom_opt_dom_walker::optimize_stmt): Pass down
7815 the vr_values instance to cprop_into_stmt.
7816 (cprop_into_stmt): Pass vr_values instance down to cprop_operand.
7817 (cprop_operand): Also query EVRP to determine if OP is a constant.
7818
7819 2018-08-06 Nathan Sidwell <nathan@acm.org>
7820
7821 * diagnostic.c (diagnostic_report_current_module): Reroll
7822 included-at loop. Translate text.
7823
7824 2018-08-06 David Malcolm <dmalcolm@redhat.com>
7825
7826 * function-tests.c (selftest::test_expansion_to_rtl): Call
7827 free_after_compilation.
7828
7829 2018-08-06 Alan Hayward <alan.hayward@arm.com>
7830
7831 * config/aarch64/aarch64.md: Add clobber highs to tls_desc.
7832
7833 2018-08-06 Andreas Krebbel <krebbel@linux.ibm.com>
7834
7835 * config/s390/s390.c (s390_loop_unroll_adjust): Prevent small
7836 loops with memory block operations from getting unrolled.
7837
7838 2018-08-06 Ulrich Weigand <uweigand@de.ibm.com>
7839
7840 PR target/86807
7841 * config/spu/spu.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
7842 Define to speculation_safe_value_not_needed.
7843
7844 2018-08-06 Jeff Law <law@redhat.com>
7845
7846 * reload1.c (forget_old_reloads_1): Adjust CLOBBER_HIGH
7847 assert.
7848
7849 2018-08-06 Jozef Lawrynowicz <jozef.l@mittosystems.com>
7850
7851 PR target/86662
7852 * gcc/tree.c (build_common_tree_nodes): Initialize integer_types array
7853 with all enabled __intN types.
7854
7855 * gcc/testsuite/gcc.target/msp430/pr86662.c: New test.
7856
7857 2018-08-06 Alan Hayward <alan.hayward@arm.com>
7858
7859 * alias.c (record_set): Check for clobber high.
7860 * cfgexpand.c (expand_gimple_stmt): Likewise.
7861 * combine-stack-adj.c (single_set_for_csa): Likewise.
7862 * combine.c (find_single_use_1): Likewise.
7863 (set_nonzero_bits_and_sign_copies): Likewise.
7864 (get_combine_src_dest): Likewise.
7865 (is_parallel_of_n_reg_sets): Likewise.
7866 (try_combine): Likewise.
7867 (record_dead_and_set_regs_1): Likewise.
7868 (reg_dead_at_p_1): Likewise.
7869 (reg_dead_at_p): Likewise.
7870 * dce.c (deletable_insn_p): Likewise.
7871 (mark_nonreg_stores_1): Likewise.
7872 (mark_nonreg_stores_2): Likewise.
7873 * df-scan.c (df_find_hard_reg_defs): Likewise.
7874 (df_uses_record): Likewise.
7875 (df_get_call_refs): Likewise.
7876 * dwarf2out.c (mem_loc_descriptor): Likewise.
7877 * haifa-sched.c (haifa_classify_rtx): Likewise.
7878 * ira-build.c (create_insn_allocnos): Likewise.
7879 * ira-costs.c (scan_one_insn): Likewise.
7880 * ira.c (equiv_init_movable_p): Likewise.
7881 (rtx_moveable_p): Likewise.
7882 (interesting_dest_for_shprep): Likewise.
7883 * jump.c (mark_jump_label_1): Likewise.
7884 * postreload-gcse.c (record_opr_changes): Likewise.
7885 * postreload.c (reload_cse_simplify): Likewise.
7886 (struct reg_use): Add source expr.
7887 (reload_combine): Check for clobber high.
7888 (reload_combine_note_use): Likewise.
7889 (reload_cse_move2add): Likewise.
7890 (move2add_note_store): Likewise.
7891 * print-rtl.c (print_pattern): Likewise.
7892 * recog.c (decode_asm_operands): Likewise.
7893 (store_data_bypass_p): Likewise.
7894 (if_test_bypass_p): Likewise.
7895 * regcprop.c (kill_clobbered_value): Likewise.
7896 (kill_set_value): Likewise.
7897 * reginfo.c (reg_scan_mark_refs): Likewise.
7898 * reload1.c (maybe_fix_stack_asms): Likewise.
7899 (eliminate_regs_1): Likewise.
7900 (elimination_effects): Likewise.
7901 (mark_not_eliminable): Likewise.
7902 (scan_paradoxical_subregs): Likewise.
7903 (forget_old_reloads_1): Likewise.
7904 * reorg.c (find_end_label): Likewise.
7905 (try_merge_delay_insns): Likewise.
7906 (redundant_insn): Likewise.
7907 (own_thread_p): Likewise.
7908 (fill_simple_delay_slots): Likewise.
7909 (fill_slots_from_thread): Likewise.
7910 (dbr_schedule): Likewise.
7911 * resource.c (update_live_status): Likewise.
7912 (mark_referenced_resources): Likewise.
7913 (mark_set_resources): Likewise.
7914 * rtl.c (copy_rtx): Likewise.
7915 * rtlanal.c (reg_referenced_p): Likewise.
7916 (single_set_2): Likewise.
7917 (noop_move_p): Likewise.
7918 (note_stores): Likewise.
7919 * sched-deps.c (sched_analyze_reg): Likewise.
7920 (sched_analyze_insn): Likewise.
7921
7922 2018-08-06 Alan Hayward <alan.hayward@arm.com>
7923
7924 * cse.c (invalidate_reg): New function extracted from...
7925 (invalidate): ...here.
7926 (canonicalize_insn): Check for clobber high.
7927 (invalidate_from_clobbers): invalidate clobber highs.
7928 (invalidate_from_sets_and_clobbers): Likewise.
7929 (count_reg_usage): Check for clobber high.
7930 (insn_live_p): Likewise.
7931 * cselib.c (cselib_expand_value_rtx_1):Likewise.
7932 (cselib_invalidate_regno): Check for clobber in setter.
7933 (cselib_invalidate_rtx): Pass through setter.
7934 (cselib_invalidate_rtx_note_stores):
7935 (cselib_process_insn): Check for clobber high.
7936 * cselib.h (cselib_invalidate_rtx): Add operand.
7937
7938 2018-08-06 Alan Hayward <alan.hayward@arm.com>
7939
7940 * lra-eliminations.c (lra_eliminate_regs_1): Check for clobber high.
7941 (mark_not_eliminable): Likewise.
7942 * lra-int.h (struct lra_insn_reg): Add clobber high marker.
7943 * lra-lives.c (process_bb_lives): Check for clobber high.
7944 * lra.c (new_insn_reg): Remember clobber highs.
7945 (collect_non_operand_hard_regs): Check for clobber high.
7946 (lra_set_insn_recog_data): Likewise.
7947 (add_regs_to_insn_regno_info): Likewise.
7948 (lra_update_insn_regno_info): Likewise.
7949
7950 2018-08-06 Alan Hayward <alan.hayward@arm.com>
7951
7952 * rtl.h (reg_is_clobbered_by_clobber_high): Add declarations.
7953 * rtlanal.c (reg_is_clobbered_by_clobber_high): Add function.
7954
7955 2018-08-06 Alan Hayward <alan.hayward@arm.com>
7956
7957 * emit-rtl.c (verify_rtx_sharing): Check for CLOBBER_HIGH.
7958 (copy_insn_1): Likewise.
7959 (gen_hard_reg_clobber_high): New gen function.
7960 * genconfig.c (walk_insn_part): Check for CLOBBER_HIGH.
7961 * genemit.c (gen_exp): Likewise.
7962 (gen_emit_seq): Pass through info.
7963 (gen_insn): Check for CLOBBER_HIGH.
7964 (gen_expand): Pass through info.
7965 (gen_split): Likewise.
7966 (output_add_clobbers): Likewise.
7967 * genrecog.c (validate_pattern): Check for CLOBBER_HIGH.
7968 (remove_clobbers): Likewise.
7969 * rtl.h (gen_hard_reg_clobber_high): New declaration.
7970
7971 2018-08-06 Alan Hayward <alan.hayward@arm.com>
7972
7973 * doc/rtl.texi (clobber_high): Add.
7974 (parallel): Add in clobber high
7975 * rtl.c (rtl_check_failed_code3): Add function.
7976 * rtl.def (CLOBBER_HIGH): Add expression.
7977 * rtl.h (RTL_CHECKC3): Add macro.
7978 (rtl_check_failed_code3): Add declaration.
7979 (XC3EXP): Add macro.
7980
7981 2018-08-05 H.J. Lu <hongjiu.lu@intel.com>
7982
7983 PR target/86386
7984 * config/i386/i386.c (ix86_finalize_stack_frame_flags): Set
7985 cfun->machine->max_used_stack_alignment if needed.
7986
7987 2018-08-04 Martin Sebor <msebor@redhat.com>
7988
7989 PR tree-optimization/86571
7990 * gimple-ssa-sprintf.c (format_floating): Extend upper bound of
7991 NaN output to 4.
7992
7993 2018-08-03 Sandra Loosemore <sandra@codesourcery.com>
7994
7995 PR target/86799
7996 * config/nios2/nios2.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
7997 Define.
7998
7999 2018-08-03 Jeff Law <law@redhat.com>
8000
8001 PR target/86795
8002 * config/mn10300/mn10300.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
8003 Define to speculation_safe_value_not_needed.
8004
8005 2018-08-03 David Malcolm <dmalcolm@redhat.com>
8006
8007 * doc/gcov.texi (-x): Remove duplicate "to".
8008 * doc/invoke.texi (-Wnoexcept-type): Remove duplicate "calls".
8009 (-Wif-not-aligned): Remove duplicate "is".
8010 (-flto): Remove duplicate "the".
8011 (MicroBlaze Options): In examples of "-mcpu=cpu-type", remove
8012 duplicate "v5.00.b".
8013 (MSP430 Options): Remove duplicate "and" from the description
8014 of "-mgprel-sec=regexp".
8015 (x86 Options): Remove duplicate copies of "vmldLog102" and
8016 vmlsLog104 from description of "-mveclibabi=type".
8017
8018 2018-08-03 Richard Sandiford <richard.sandiford@arm.com>
8019
8020 * internal-fn.h (first_commutative_argument): Declare.
8021 * internal-fn.c (first_commutative_argument): New function.
8022 * tree-vect-slp.c (vect_get_and_check_slp_defs): Remove extra
8023 restrictions for pattern statements. Use first_commutative_argument
8024 to look for commutative operands in calls to internal functions.
8025
8026 2018-08-03 Aldy Hernandez <aldyh@redhat.com>
8027
8028 * Makefile.in (wide-int-range.o): New.
8029 * tree-vrp.c: Move all the wide_int_* functions to...
8030 * wide-int-range.cc: ...here.
8031 * tree-vrp.h: Move all the wide_int_* prototypes to...
8032 * wide-int-range.h: ...here.
8033
8034 2018-08-03 Tom de Vries <tdevries@suse.de>
8035
8036 * common/config/nvptx/nvptx-common.c (nvptx_except_unwind_info): Return
8037 UI_NONE.
8038 * config/nvptx/nvptx.c (TARGET_ASM_BYTE_OP): Remove define.
8039 * except.c (output_function_exception_table): Do early exit if
8040 targetm_common.except_unwind_info (&global_options) == UI_NONE.
8041
8042 2018-08-03 Martin Liska <mliska@suse.cz>
8043
8044 * predict.c (dump_prediction): Change to 2 digits
8045 in fraction part.
8046
8047 2018-08-03 Siddhesh Poyarekar <siddhesh@sourceware.org>
8048
8049 * config/aarch64/falkor.md (falkor_am_1_vxvy_vxvy): Move
8050 neon_dup_q to...
8051 (falkor_am_1_gtov_gtov): ... a new insn reservation.
8052
8053 2018-07-19 Ilya Leoshkevich <iii@linux.ibm.com>
8054
8055 * config/nds32/nds32.c (nds32_hard_regno_mode_ok): Replace > with >=.
8056 * df-problems.c (df_remove_dead_eq_notes): Replace > with >=.
8057 * dwarf2out.c (mem_loc_descriptor): Replace > with >=.
8058 * lra-constraints.c (spill_hard_reg_in_range): Replace <= with <.
8059 * lra-remat.c (call_used_input_regno_present_p): Replace <= with <.
8060
8061 2018-08-02 David Malcolm <dmalcolm@redhat.com>
8062
8063 * diagnostic-show-locus.c (diagnostic_show_locus): Use
8064 pp_take_prefix when saving the existing prefix.
8065 * diagnostic.c (diagnostic_append_note): Likewise.
8066 * langhooks.c (lhd_print_error_function): Likewise.
8067 * pretty-print.c (pp_set_prefix): Drop the "const" from "prefix"
8068 param's type. Free the existing prefix.
8069 (pp_take_prefix): New function.
8070 (pretty_printer::pretty_printer): Drop the prefix parameter.
8071 Rename the length parameter to match the comment.
8072 (pretty_printer::~pretty_printer): Free the prefix.
8073 * pretty-print.h (pretty_printer::pretty_printer): Drop the prefix
8074 parameter.
8075 (struct pretty_printer): Drop the "const" from "prefix" field's
8076 type and clarify memory management.
8077 (pp_set_prefix): Drop the "const" from the 2nd param.
8078 (pp_take_prefix): New decl.
8079
8080 2018-08-02 Aaron Sawdey <acsawdey@linux.ibm.com>
8081
8082 * config/rs6000/rs6000-string.c (select_block_compare_mode): Move test
8083 for word_mode_ok here instead of passing as argument.
8084 (expand_block_compare): Change select_block_compare_mode() call.
8085 (expand_strncmp_gpr_sequence): New function.
8086 (expand_strn_compare): Make use of expand_strncmp_gpr_sequence.
8087
8088 2018-08-02 Jeff Law <law@redhat.com>
8089
8090 PR target/86790
8091 * config/m68k/m68k.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
8092 Define to speculation_safe_value_not_needed.
8093
8094 PR target/86784
8095 * config/h8300/h8300.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
8096 Define to speculation_safe_value_not_needed.
8097
8098 2018-08-02 Tom de Vries <tdevries@suse.de>
8099
8100 PR target/86660
8101 * common/config/nvptx/nvptx-common.c (nvptx_except_unwind_info): New
8102 function. Return UI_TARGET unconditionally.
8103 (TARGET_EXCEPT_UNWIND_INFO): Redefine to nvptx_except_unwind_info.
8104 * config/nvptx/nvptx.c (TARGET_ASM_BYTE_OP): Emit commented out '.byte'.
8105
8106 2018-08-02 Richard Sandiford <richard.sandiford@arm.com>
8107
8108 * genemit.c (print_overload_test): Fix typo.
8109
8110 2018-08-02 Richard Biener <rguenther@suse.de>
8111
8112 PR tree-optimization/86816
8113 * tree-ssa-tail-merge.c (tail_merge_valueize): New function
8114 which checks for value availability before querying it.
8115 (gvn_uses_equal): Use it.
8116 (same_succ_hash): Likewise.
8117 (gimple_equal_p): Likewise.
8118
8119 2018-08-02 Nick Clifton <nickc@redhat.com>
8120
8121 PR target/86813
8122 * config/stormy16/stormy16.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
8123 Define to speculation_safe_value_not_needed.
8124
8125 PR target/86810
8126 * config/v850/v850.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
8127 Define to speculation_safe_value_not_needed.
8128
8129 PR target/86810
8130 * config/v850/v850.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
8131 Define to speculation_safe_value_not_needed.
8132
8133 PR target/86803
8134 * config/rx/rx.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
8135 Define to speculation_safe_value_not_needed.
8136
8137 PR target/86797
8138 * config/msp430/msp430.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
8139 Define to speculation_safe_value_not_needed.
8140
8141 PR target/86791
8142 * config/mcore/mcore.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
8143 Define to speculation_safe_value_not_needed.
8144
8145 PR target/86789
8146 * config/m32r/m32r.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
8147 Define to speculation_safe_value_not_needed.
8148
8149 PR target/86787
8150 * config/iq2000/iq2000.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
8151 Define to speculation_safe_value_not_needed.
8152
8153 PR target/86782
8154 * config/frv/frv.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define to
8155 speculation_safe_value_not_needed.
8156
8157 PR target/86781
8158 * config/fr30/fr30.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define
8159 to speculation_safe_value_not_needed.
8160
8161 2018-08-02 Richard Sandiford <richard.sandiford@arm.com>
8162
8163 * doc/md.texi: Expand the documentation of instruction names
8164 to mention port-local uses. Document '@' in pattern names.
8165 * read-md.h (overloaded_instance, overloaded_name): New structs.
8166 (mapping): Declare.
8167 (md_reader::handle_overloaded_name): New member function.
8168 (md_reader::get_overloads): Likewise.
8169 (md_reader::m_first_overload): New member variable.
8170 (md_reader::m_next_overload_ptr): Likewise.
8171 (md_reader::m_overloads_htab): Likewise.
8172 * read-md.c (md_reader::md_reader): Initialize m_first_overload,
8173 m_next_overload_ptr and m_overloads_htab.
8174 * read-rtl.c (iterator_group): Add "type" and "get_c_token" fields.
8175 (get_mode_token, get_code_token, get_int_token): New functions.
8176 (map_attr_string): Add an optional argument that passes back
8177 the associated iterator.
8178 (overloaded_name_hash, overloaded_name_eq_p, named_rtx_p):
8179 (md_reader::handle_overloaded_name, add_overload_instance): New
8180 functions.
8181 (apply_iterators): Handle '@' names. Report an error if '@'
8182 is used without iterators.
8183 (initialize_iterators): Initialize the new iterator_group fields.
8184 * genopinit.c (handle_overloaded_code_for)
8185 (handle_overloaded_gen): New functions.
8186 (main): Use them to print declarations of maybe_code_for_* and
8187 maybe_gen_* functions, and inline definitions of code_for_* and gen_*.
8188 * genemit.c (print_overload_arguments, print_overload_test)
8189 (handle_overloaded_code_for, handle_overloaded_gen): New functions.
8190 (main): Use it to print definitions of maybe_code_for_* and
8191 maybe_gen_* functions.
8192 * config/aarch64/aarch64.c (aarch64_split_128bit_move): Use
8193 gen_aarch64_mov{low,high}_di and gen_aarch64_movdi_{low,high}
8194 instead of explicit mode checks.
8195 (aarch64_split_simd_combine): Likewise gen_aarch64_simd_combine.
8196 (aarch64_split_simd_move): Likewise gen_aarch64_split_simd_mov.
8197 (aarch64_emit_load_exclusive): Likewise gen_aarch64_load_exclusive.
8198 (aarch64_emit_store_exclusive): Likewise gen_aarch64_store_exclusive.
8199 (aarch64_expand_compare_and_swap): Likewise
8200 gen_aarch64_compare_and_swap and gen_aarch64_compare_and_swap_lse
8201 (aarch64_gen_atomic_cas): Likewise gen_aarch64_atomic_cas.
8202 (aarch64_emit_atomic_swap): Likewise gen_aarch64_atomic_swp.
8203 (aarch64_constant_pool_reload_icode): Delete.
8204 (aarch64_secondary_reload): Use code_for_aarch64_reload_movcp
8205 instead of aarch64_constant_pool_reload_icode. Use
8206 code_for_aarch64_reload_mov instead of explicit mode checks.
8207 (rsqrte_type, get_rsqrte_type, rsqrts_type, get_rsqrts_type): Delete.
8208 (aarch64_emit_approx_sqrt): Use gen_aarch64_rsqrte instead of
8209 get_rsqrte_type and gen_aarch64_rsqrts instead of gen_rqrts_type.
8210 (recpe_type, get_recpe_type, recps_type, get_recps_type): Delete.
8211 (aarch64_emit_approx_div): Use gen_aarch64_frecpe instead of
8212 get_recpe_type and gen_aarch64_frecps instead of get_recps_type.
8213 (aarch64_atomic_load_op_code): Delete.
8214 (aarch64_emit_atomic_load_op): Likewise.
8215 (aarch64_gen_atomic_ldop): Use UNSPECV_ATOMIC_* instead of
8216 aarch64_atomic_load_op_code. Use gen_aarch64_atomic_load
8217 instead of aarch64_emit_atomic_load_op.
8218 * config/aarch64/aarch64.md (aarch64_reload_movcp<GPF_TF:mode><P:mode>)
8219 (aarch64_reload_movcp<VALL:mode><P:mode>, aarch64_reload_mov<mode>)
8220 (aarch64_movdi_<mode>low, aarch64_movdi_<mode>high)
8221 (aarch64_mov<mode>high_di, aarch64_mov<mode>low_di): Add a '@'
8222 character before the pattern name.
8223 * config/aarch64/aarch64-simd.md (aarch64_split_simd_mov<mode>)
8224 (aarch64_rsqrte<mode>, aarch64_rsqrts<mode>)
8225 (aarch64_simd_combine<mode>, aarch64_frecpe<mode>)
8226 (aarch64_frecps<mode>): Likewise.
8227 * config/aarch64/atomics.md (atomic_compare_and_swap<mode>)
8228 (aarch64_compare_and_swap<mode>, aarch64_compare_and_swap<mode>_lse)
8229 (aarch64_load_exclusive<mode>, aarch64_store_exclusive<mode>)
8230 (aarch64_atomic_swp<mode>, aarch64_atomic_cas<mode>)
8231 (aarch64_atomic_load<atomic_ldop><mode>): Likewise.
8232
8233 2018-08-02 Richard Sandiford <richard.sandiford@arm.com>
8234
8235 * config/aarch64/aarch64.c (aarch64_float_const_representable_p):
8236 Allow HFmode constants if TARGET_FP_F16INST.
8237
8238 2018-08-02 Jackson Woodruff <jackson.woodruff@arm.com>
8239
8240 PR target/86014
8241 * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp):
8242 No longer check last store for clobber of address register.
8243
8244 2018-08-02 Martin Liska <mliska@suse.cz>
8245
8246 PR gcov-profile/86817
8247 * gcov.c (process_all_functions): New function.
8248 (main): Call it.
8249 (process_file): Move functions processing to
8250 process_all_functions.
8251
8252 2018-08-02 David Malcolm <dmalcolm@redhat.com>
8253
8254 * dumpfile.c (dump_user_location_t::dump_user_location_t): Add
8255 "const" to the "gimple *" and "rtx_insn *" parameters.
8256 * dumpfile.h (dump_user_location_t::dump_user_location_t):
8257 Likewise.
8258 (dump_location_t::dump_location_t): Likewise.
8259
8260 2018-08-01 Martin Sebor <msebor@redhat.com>
8261
8262 PR tree-optimization/86650
8263 * gimple-pretty-print.c (percent_G_format): Accept a "gimple *"
8264 rather than a "gcall *". Directly pass the data of interest
8265 to percent_K_format, rather than building a temporary CALL_EXPR
8266 to hold it.
8267 * gimple-fold.c (gimple_fold_builtin_strncpy): Adjust.
8268 (gimple_fold_builtin_strncat): Adjust.
8269 * gimple-ssa-warn-restrict.h (check_bounds_or_overlap): Replace
8270 gcall* argument with gimple*.
8271 * gimple-ssa-warn-restrict.c (check_call): Same.
8272 (wrestrict_dom_walker::before_dom_children): Same.
8273 (builtin_access::builtin_access): Same.
8274 (check_bounds_or_overlap): Same
8275 (maybe_diag_overlap): Same.
8276 (maybe_diag_offset_bounds): Same.
8277 * tree-diagnostic.c (default_tree_printer): Move usage of
8278 EXPR_LOCATION (t) and TREE_BLOCK (t) from within percent_K_format
8279 to this callsite.
8280 * tree-pretty-print.c (percent_K_format): Add argument.
8281 * tree-pretty-print.h: Add argument.
8282 * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Adjust.
8283 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Adjust.
8284 (maybe_diag_stxncpy_trunc): Same.
8285 (handle_builtin_stxncpy): Same.
8286 (handle_builtin_strcat): Same.
8287
8288 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
8289
8290 * match.pd: Optimise pointer range checks.
8291
8292 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
8293
8294 PR tree-optimization/86758
8295 * tree-vect-stmts.c (vectorizable_simd_clone_call): Don't try
8296 to remove pattern statements.
8297
8298 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
8299
8300 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Use the
8301 result of dfs_enumerate_from when constructing stmt_vec_infos,
8302 instead of additionally calling get_loop_body.
8303
8304 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
8305
8306 * tree-vectorizer.h (vect_create_data_ref_ptr): Remove inv_p
8307 parameter.
8308 * tree-vect-data-refs.c (vect_create_data_ref_ptr): Likewise.
8309 When creating an iv, assert that the step is not known to be zero.
8310 (vect_setup_realignment): Update call accordingly.
8311 * tree-vect-stmts.c (vectorizable_store): Likewise.
8312 (vectorizable_load): Likewise. Handle VMAT_INVARIANT separately.
8313
8314 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
8315
8316 * tree-vectorizer.h (vect_stmt_to_vectorize): New function.
8317 * tree-vect-loop.c (vect_update_vf_for_slp): Use it.
8318 (vectorizable_reduction): Likewise.
8319 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
8320 (vect_detect_hybrid_slp_stmts): Likewise.
8321 * tree-vect-stmts.c (vect_is_simple_use): Likewise.
8322
8323 2018-08-01 Aldy Hernandez <aldyh@redhat.com>
8324
8325 * tree-vrp (zero_nonzero_bits_from_bounds): Rename to...
8326 (wide_int_set_zero_nonzero_bits): ...this.
8327 (zero_nonzero_bits_from_vr): Rename to...
8328 (vrp_set_zero_nonzero_bits): ...this.
8329 (extract_range_from_multiplicative_op_1): Abstract wide int
8330 code...
8331 (wide_int_range_multiplicative_op): ...here.
8332 (extract_range_from_binary_expr_1): Extract wide int binary
8333 operations into their own functions.
8334 (wide_int_range_lshift): New.
8335 (wide_int_range_can_optimize_bit_op): New.
8336 (wide_int_range_shift_undefined_p): New.
8337 (wide_int_range_bit_xor): New.
8338 (wide_int_range_bit_ior): New.
8339 (wide_int_range_bit_and): New.
8340 (wide_int_range_trunc_mod): New.
8341 (extract_range_into_wide_ints): New.
8342 (vrp_shift_undefined_p): New.
8343 (extract_range_from_multiplicative_op): New.
8344 (vrp_can_optimize_bit_op): New.
8345 * tree-vrp.h (value_range::dump): New.
8346 (wide_int_range_multiplicative_op): New.
8347 (wide_int_range_lshift):New.
8348 (wide_int_range_shift_undefined_p): New.
8349 (wide_int_range_bit_xor): New.
8350 (wide_int_range_bit_ior): New.
8351 (wide_int_range_bit_and): New.
8352 (wide_int_range_trunc_mod): New.
8353 (zero_nonzero_bits_from_bounds): Rename to...
8354 (wide_int_set_zero_nonzero_bits): ...this.
8355 (zero_nonzero_bits_from_vr): Rename to...
8356 (vrp_set_zero_nonzero_bits): ...this.
8357 (range_easy_mask_min_max): Rename to...
8358 (wide_int_range_can_optimize_bit_op): this.
8359 * vr-values.c (simplify_bit_ops_using_ranges): Rename
8360 zero_nonzero_bits_from_vr into vrp_set_zero_nonzero_bits.
8361
8362 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
8363
8364 * tree-vectorizer.h (vect_orig_stmt): New function.
8365 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Use it.
8366 * tree-vect-loop.c (vect_model_reduction_cost): Likewise.
8367 (vect_create_epilog_for_reduction): Likewise.
8368 (vectorizable_live_operation): Likewise.
8369 * tree-vect-slp.c (vect_find_last_scalar_stmt_in_slp): Likewise.
8370 (vect_detect_hybrid_slp_stmts, vect_schedule_slp): Likewise.
8371 * tree-vect-stmts.c (vectorizable_call): Likewise.
8372 (vectorizable_simd_clone_call, vect_remove_stores): Likewise.
8373
8374 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
8375
8376 * tree-vectorizer.h (vect_transform_stmt): Remove grouped_store
8377 argument.
8378 * tree-vect-stmts.c (vect_transform_stmt): Likewise.
8379 * tree-vect-loop.c (vect_transform_loop_stmt): Update call accordingly.
8380 (vect_transform_loop): Likewise.
8381 * tree-vect-slp.c (vect_schedule_slp_instance): Likewise.
8382
8383 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
8384
8385 * tree-vectorizer.h (vect_schedule_slp): Return void.
8386 * tree-vect-slp.c (vect_schedule_slp_instance): Likewise.
8387 (vect_schedule_slp): Likewise.
8388
8389 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
8390
8391 * tree-vect-loop.c (vect_transform_loop_stmt): Remove slp_scheduled
8392 argument.
8393 (vect_transform_loop): Update calls accordingly. Schedule SLP
8394 instances before the main loop, if any exist.
8395
8396 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
8397
8398 PR tree-optimization/86749
8399 * tree-vect-patterns.c (vect_determine_min_output_precision_1):
8400 If the lhs is used in a COND_EXPR, check that it is being used
8401 as the "then" or "else" value.
8402
8403 2018-08-01 Tom de Vries <tdevries@suse.de>
8404
8405 PR target/86800
8406 * config/nvptx/nvptx.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define to
8407 speculation_safe_value_not_needed.
8408
8409 2018-08-01 Richard Biener <rguenther@suse.de>
8410
8411 * tree-ssa-sccvn.c (visit_phi): Compare invariant addresses
8412 as base and offset.
8413
8414 2018-08-01 Martin Liska <mliska@suse.cz>
8415
8416 * value-prof.c (gimple_divmod_fixed_value_transform): Unify
8417 format how successful transformation is dumped.
8418 (gimple_mod_pow2_value_transform): Likewise.
8419 (gimple_mod_subtract_transform): Likewise.
8420 (gimple_stringops_transform): Likewise.
8421
8422 2018-08-01 Martin Liska <mliska@suse.cz>
8423
8424 PR value-prof/35543
8425 * value-prof.c (interesting_stringop_to_profile_p):
8426 Simplify the code and add BUILT_IN_MEMMOVE.
8427 (gimple_stringops_transform): Likewise.
8428
8429 2018-08-01 Sam Tebbs <sam.tebbs@arm.com>
8430
8431 * config/aarch64/aarch64-simd.md
8432 (*aarch64_get_lane_zero_extendsi<mode>): Rename to...
8433 (*aarch64_get_lane_zero_extend<GPI:mode><VDQQH:mode>): ... This and
8434 use GPI iterator instead of SI mode.
8435
8436 2018-08-01 Richard Earnshaw <rearnsha@arm.com>
8437
8438 * config/rs6000/rs6000.md (speculation_barrier): Renamed from
8439 rs6000_speculation_barrier.
8440 * config/rs6000/rs6000.c (rs6000_expand_builtin): Adjust for
8441 new barrier pattern name.
8442
8443 2018-08-01 Richard Earnshaw <rearnsha@arm.com>
8444
8445 * config/i386/i386.md (unspecv): Add UNSPECV_SPECULATION_BARRIER.
8446 (speculation_barrier): New insn.
8447
8448 2018-08-01 Richard Biener <rguenther@suse.de>
8449
8450 PR bootstrap/86724
8451 * graphite.h: Include isl/id.h and isl/space.h to allow build
8452 with ISL 0.20.
8453
8454 2018-08-01 Jan Willem Jagersma <jwjagersma@gmail.com>
8455
8456 PR target/86651
8457 * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
8458 mode for COFF targets.
8459 * defaults.h (TARGET_COFF): Define.
8460 * config/i386/djgpp.h (TARGET_ASM_LTO_START, TARGET_ASM_LTO_END,
8461 TARGET_COFF): Define.
8462 (i386_djgpp_asm_lto_start, i386_djgpp_asm_lto_end): Declare.
8463 * config/i386/djgpp.c (saved_debug_info_level): New static variable.
8464 (i386_djgpp_asm_lto_start, i386_djgpp_asm_lto_end): New functions.
8465
8466 2018-07-31 Alexandre Oliva <oliva@adacore.com>
8467
8468 * gimple-streamer-in.c (input_bb): Restore BB discriminator.
8469 * gimple-streamer-out.c (output_bb): Save it.
8470 * lto-streamer-in.c (input_struct_function_base): Restore
8471 instance discriminator if available. Create map on demand.
8472 * lto-streamer-out.c (output_struct_function_base): Save it if
8473 available.
8474 * final.c (decl_to_instance_map): Document LTO strategy.
8475
8476 2018-07-31 Alexandre Oliva <oliva@adacore.com>
8477 Olivier Hainque <hainque@adacore.com>
8478
8479 * debug.h (decl_to_instance_map_t): New type.
8480 (decl_to_instance_map): Declare.
8481 (maybe_create_decl_to_instance_map): New inline function.
8482 * final.c (bb_discriminator, last_bb_discriminator): New statics,
8483 to track basic block discriminators.
8484 (final_start_function_1): Initialize them.
8485 (final_scan_insn_1): On NOTE_INSN_BASIC_BLOCK, track
8486 bb_discriminator.
8487 (decl_to_instance_map): New variable.
8488 (map_decl_to_instance, maybe_set_discriminator): New functions.
8489 (notice_source_line): Set discriminator.
8490
8491 2018-07-31 Ian Lance Taylor <iant@golang.org>
8492
8493 * targhooks.c (default_have_speculation_safe_value): Add
8494 ATTRIBUTE_UNUSED.
8495
8496 2018-07-31 David Malcolm <dmalcolm@redhat.com>
8497
8498 * dump-context.h: Include "pretty-print.h".
8499 (dump_context::refresh_dumps_are_enabled): New decl.
8500 (dump_context::emit_item): New decl.
8501 (class dump_context): Add fields "m_test_pp" and
8502 "m_test_pp_flags".
8503 (temp_dump_context::temp_dump_context): Add param "test_pp_flags".
8504 (temp_dump_context::get_dumped_text): New decl.
8505 (class temp_dump_context): Add field "m_pp".
8506 * dumpfile.c (refresh_dumps_are_enabled): Convert to...
8507 (dump_context::refresh_dumps_are_enabled): ...and add a test for
8508 m_test_pp.
8509 (set_dump_file): Update for above change.
8510 (set_alt_dump_file): Likewise.
8511 (dump_loc): New overload, taking a pretty_printer *.
8512 (dump_context::dump_loc): Call end_any_optinfo. Dump the location
8513 to any test pretty-printer.
8514 (make_item_for_dump_gimple_stmt): New function, adapted from
8515 optinfo::add_gimple_stmt.
8516 (dump_context::dump_gimple_stmt): Call it, and use the result,
8517 eliminating the direct usage of dump_file and alt_dump_file in
8518 favor of indirectly using them via emit_item.
8519 (make_item_for_dump_gimple_expr): New function, adapted from
8520 optinfo::add_gimple_expr.
8521 (dump_context::dump_gimple_expr): Call it, and use the result,
8522 eliminating the direct usage of dump_file and alt_dump_file in
8523 favor of indirectly using them via emit_item.
8524 (make_item_for_dump_generic_expr): New function, adapted from
8525 optinfo::add_tree.
8526 (dump_context::dump_generic_expr): Call it, and use the result,
8527 eliminating the direct usage of dump_file and alt_dump_file in
8528 favor of indirectly using them via emit_item.
8529 (make_item_for_dump_printf_va): New function, adapted from
8530 optinfo::add_printf_va.
8531 (make_item_for_dump_printf): New function.
8532 (dump_context::dump_printf_va): Call make_item_for_dump_printf_va,
8533 and use the result, eliminating the direct usage of dump_file and
8534 alt_dump_file in favor of indirectly using them via emit_item.
8535 (make_item_for_dump_dec): New function.
8536 (dump_context::dump_dec): Call it, and use the result,
8537 eliminating the direct usage of dump_file and alt_dump_file in
8538 favor of indirectly using them via emit_item.
8539 (make_item_for_dump_symtab_node): New function, adapted from
8540 optinfo::add_symtab_node.
8541 (dump_context::dump_symtab_node): Call it, and use the result,
8542 eliminating the direct usage of dump_file and alt_dump_file in
8543 favor of indirectly using them via emit_item.
8544 (dump_context::begin_scope): Reimplement, avoiding direct usage
8545 of dump_file and alt_dump_file in favor of indirectly using them
8546 via emit_item.
8547 (dump_context::emit_item): New member function.
8548 (temp_dump_context::temp_dump_context): Add param "test_pp_flags".
8549 Set up test pretty-printer on the underlying context. Call
8550 refresh_dumps_are_enabled.
8551 (temp_dump_context::~temp_dump_context): Call
8552 refresh_dumps_are_enabled.
8553 (temp_dump_context::get_dumped_text): New member function.
8554 (selftest::verify_dumped_text): New function.
8555 (ASSERT_DUMPED_TEXT_EQ): New macro.
8556 (selftest::test_capture_of_dump_calls): Run all tests twice, with
8557 and then without optinfo enabled. Add uses of
8558 ASSERT_DUMPED_TEXT_EQ to all tests. Add test of nested scopes.
8559 * dumpfile.h: Update comment for the dump_* API.
8560 * optinfo-emit-json.cc
8561 (selftest::test_building_json_from_dump_calls): Update for new
8562 param for temp_dump_context ctor.
8563 * optinfo.cc (optinfo_item::optinfo_item): Remove "owned" param
8564 and "m_owned" field.
8565 (optinfo_item::~optinfo_item): Likewise.
8566 (optinfo::add_item): New member function.
8567 (optinfo::emit): Update comment.
8568 (optinfo::add_string): Delete.
8569 (optinfo::add_printf): Delete.
8570 (optinfo::add_printf_va): Delete.
8571 (optinfo::add_gimple_stmt): Delete.
8572 (optinfo::add_gimple_expr): Delete.
8573 (optinfo::add_tree): Delete.
8574 (optinfo::add_symtab_node): Delete.
8575 (optinfo::add_dec): Delete.
8576 * optinfo.h (class dump_context): New forward decl.
8577 (optinfo::add_item): New decl.
8578 (optinfo::add_string): Delete.
8579 (optinfo::add_printf): Delete.
8580 (optinfo::add_printf_va): Delete.
8581 (optinfo::add_gimple_stmt): Delete.
8582 (optinfo::add_gimple_expr): Delete.
8583 (optinfo::add_tree): Delete.
8584 (optinfo::add_symtab_node): Delete.
8585 (optinfo::add_dec): Delete.
8586 (optinfo::add_poly_int): Delete.
8587 (optinfo_item::optinfo_item): Remove "owned" param.
8588 (class optinfo_item): Remove field "m_owned".
8589
8590 2018-07-31 Jozef Lawrynowicz <jozef.l@mittosystems.com>
8591
8592 PR middle-end/86705
8593 * gcc/cfgexpand.c (set_parm_rtl): Use the alignment of Pmode when
8594 MAX_SUPPORTED_STACK_ALIGNMENT would otherwise be exceeded by the
8595 requested variable alignment.
8596 (expand_one_ssa_partition): Likewise.
8597 (expand_one_var): Likewise.
8598
8599 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
8600
8601 * config/pdp11/pdp11.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
8602 to speculation_safe_value_not_needed.
8603
8604 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
8605
8606 * targhooks.h (speculation_safe_value_not_needed): New prototype.
8607 * targhooks.c (speculation_safe_value_not_needed): New function.
8608 * target.def (have_speculation_safe_value): Update documentation.
8609 * doc/tm.texi: Regenerated.
8610
8611 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
8612
8613 * config/aarch64/iterators.md (ALLI_TI): New iterator.
8614 * config/aarch64/aarch64.md (despeculate_copy<ALLI_TI:mode>): New
8615 expand.
8616 (despeculate_copy<ALLI:mode>_insn): New insn.
8617 (despeculate_copyti_insn): New insn.
8618 (despeculate_simple<ALLI:mode>): New insn
8619 (despeculate_simpleti): New insn.
8620 * config/aarch64/aarch64.c (aarch64_speculation_safe_value): New
8621 function.
8622 (TARGET_SPECULATION_SAFE_VALUE): Redefine to
8623 aarch64_speculation_safe_value.
8624 (aarch64_print_operand): Handle const0_rtx in modifier 'H'.
8625
8626 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
8627
8628 * config/aarch64/aarch64-speculation.cc: New file.
8629 * config/aarch64/aarch64-passes.def (pass_track_speculation): Add
8630 before pass_reorder_blocks.
8631 * config/aarch64/aarch64-protos.h (make_pass_track_speculation): Add
8632 prototype.
8633 * config/aarch64/aarch64.c (aarch64_conditional_register_usage): Fix
8634 X14 and X15 when tracking speculation.
8635 * config/aarch64/aarch64.md (register name constants): Add
8636 SPECULATION_TRACKER_REGNUM and SPECULATION_SCRATCH_REGNUM.
8637 (unspec): Add UNSPEC_SPECULATION_TRACKER.
8638 (speculation_barrier): New insn attribute.
8639 (cmp<mode>): Allow SP in comparisons.
8640 (speculation_tracker): New insn.
8641 (speculation_barrier): Add speculation_barrier attribute.
8642 * config/aarch64/t-aarch64: Add make rule for aarch64-speculation.o.
8643 * config.gcc (aarch64*-*-*): Add aarch64-speculation.o to extra_objs.
8644 * doc/invoke.texi (AArch64 Options): Document -mtrack-speculation.
8645
8646 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
8647
8648 * config/aarch64/aarch64.md (cb<optab><mode>1): Disable when
8649 aarch64_track_speculation is true.
8650 (tb<optab><mode>1): Likewise.
8651 * config/aarch64/aarch64.c (aarch64_split_compare_regs): Do not
8652 generate CB[N]Z when tracking speculation.
8653 (aarch64_split_compare_and_swap): Likewise.
8654 (aarch64_split_atomic_op): Likewise.
8655
8656 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
8657
8658 * config/aarch64/aarch64.opt (mtrack-speculation): New target option.
8659
8660 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
8661
8662 * config/aarch64.md (unspecv): Add UNSPECV_SPECULAION_BARRIER.
8663 (speculation_barrier): New insn.
8664
8665 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
8666
8667 * config/arm/unspecs.md (unspecv): Add VUNSPEC_SPECULATION_BARRIER.
8668 * config/arm/arm.md (speculation_barrier): New expand.
8669 (speculation_barrier_insn): New pattern.
8670
8671 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
8672
8673 * builtin-types.def (BT_FN_PTR_PTR_VAR): New function type.
8674 (BT_FN_I1_I1_VAR, BT_FN_I2_I2_VAR, BT_FN_I4_I4_VAR): Likewise.
8675 (BT_FN_I8_I8_VAR, BT_FN_I16_I16_VAR): Likewise.
8676 * builtin-attrs.def (ATTR_NOVOPS_NOTHROW_LEAF_LIST): New attribute
8677 list.
8678 * builtins.def (BUILT_IN_SPECULATION_SAFE_VALUE_N): New builtin.
8679 (BUILT_IN_SPECULATION_SAFE_VALUE_PTR): New internal builtin.
8680 (BUILT_IN_SPECULATION_SAFE_VALUE_1): Likewise.
8681 (BUILT_IN_SPECULATION_SAFE_VALUE_2): Likewise.
8682 (BUILT_IN_SPECULATION_SAFE_VALUE_4): Likewise.
8683 (BUILT_IN_SPECULATION_SAFE_VALUE_8): Likewise.
8684 (BUILT_IN_SPECULATION_SAFE_VALUE_16): Likewise.
8685 * builtins.c (expand_speculation_safe_value): New function.
8686 (expand_builtin): Call it.
8687 * doc/cpp.texi: Document predefine __HAVE_SPECULATION_SAFE_VALUE.
8688 * doc/extend.texi: Document __builtin_speculation_safe_value.
8689 * doc/md.texi: Document "speculation_barrier" pattern.
8690 * doc/tm.texi.in: Pull in TARGET_SPECULATION_SAFE_VALUE and
8691 TARGET_HAVE_SPECULATION_SAFE_VALUE.
8692 * doc/tm.texi: Regenerated.
8693 * target.def (have_speculation_safe_value, speculation_safe_value): New
8694 hooks.
8695 * targhooks.c (default_have_speculation_safe_value): New function.
8696 (default_speculation_safe_value): New function.
8697 * targhooks.h (default_have_speculation_safe_value): Add prototype.
8698 (default_speculation_safe_value): Add prototype.
8699
8700 2018-07-31 David Malcolm <dmalcolm@redhat.com>
8701
8702 * dump-context.h (dump_context::dump_loc): New decl.
8703 * dumpfile.c (dump_context::dump_loc): New member function.
8704 (dump_context::dump_gimple_stmt_loc): Reimplement using dump_loc
8705 and dump_gimple_stmt.
8706 (dump_context::dump_gimple_expr_loc): Likewise, using
8707 dump_gimple_expr.
8708 (dump_context::dump_generic_expr_loc): Likewise, using
8709 dump_generic_expr.
8710 (dump_context::dump_printf_loc_va): Likewise, using
8711 dump_printf_va.
8712 (dump_context::begin_scope): Explicitly using the global function
8713 "dump_loc", rather than the member function.
8714
8715 2018-07-31 Martin Sebor <msebor@redhat.com>
8716
8717 PR tree-optimization/86741
8718 * tree-vrp.c (vrp_prop::check_mem_ref): Avoid incomplete types.
8719
8720 2018-07-31 Andreas Krebbel <krebbel@linux.ibm.com>
8721
8722 * config/s390/s390.c (s390_expand_setmem): Make the unrolling to
8723 depend on whether prefetch instructions will be emitted or not.
8724 Use TARGET_SETMEM_PFD for checking whether prefetch instructions
8725 will be emitted or not.
8726 * config/s390/s390.h (TARGET_SETMEM_PREFETCH_DISTANCE)
8727 (TARGET_SETMEM_PFD): New macros.
8728
8729 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8730
8731 * tree-vectorizer.h (stmt_vec_info): Turn back into a typedef.
8732 (NULL_STMT_VEC_INFO): Delete.
8733 (stmt_vec_info::operator*): Likewise.
8734 (stmt_vec_info::operator gimple *): Likewise.
8735 * tree-vect-loop.c (vectorizable_reduction): Use NULL instead
8736 of NULL_STMT_VEC_INFO.
8737 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
8738 (vect_reassociating_reduction_p): Likewise.
8739 * tree-vect-stmts.c (vect_build_gather_load_calls): Likewise.
8740 (vectorizable_store): Likewise.
8741 * tree-vectorizer.c (vec_info::set_vinfo_for_stmt): Likewise.
8742 (vec_info::free_stmt_vec_infos): Likewise.
8743
8744 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8745
8746 * tree-vectorizer.h (vect_stmt_in_region_p): Delete.
8747 * tree-vectorizer.c (vect_stmt_in_region_p): Likewise.
8748
8749 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8750
8751 * tree-vectorizer.h (vec_info::new_vinfo_for_stmt)
8752 (vec_info::set_vinfo_for_stmt, vec_info::free_stmt_vec_infos)
8753 (vec_info::free_stmt_vec_info): New private member functions.
8754 (set_stmt_vec_info_vec, free_stmt_vec_infos, vinfo_for_stmt)
8755 (set_vinfo_for_stmt, new_stmt_vec_info, free_stmt_vec_info): Delete.
8756 * tree-parloops.c (gather_scalar_reductions): Remove calls to
8757 set_stmt_vec_info_vec and free_stmt_vec_infos.
8758 * tree-vect-loop.c (_loop_vec_info): Remove call to
8759 set_stmt_vec_info_vec.
8760 * tree-vect-stmts.c (new_stmt_vec_info, set_stmt_vec_info_vec)
8761 (free_stmt_vec_infos, free_stmt_vec_info): Delete in favor of...
8762 * tree-vectorizer.c (vec_info::new_stmt_vec_info)
8763 (vec_info::set_vinfo_for_stmt, vec_info::free_stmt_vec_infos)
8764 (vec_info::free_stmt_vec_info): ...these new functions. Remove
8765 assignments in {vec_info::,}new_stmt_vec_info that are redundant
8766 with the clearing in the xcalloc.
8767 (stmt_vec_info_vec): Delete.
8768 (vec_info::vec_info): Don't call set_stmt_vec_info_vec.
8769 (vectorize_loops): Likewise.
8770 (vec_info::~vec_info): Remove argument from call to
8771 free_stmt_vec_infos.
8772 (vec_info::add_stmt): Remove vinfo argument from call to
8773 new_stmt_vec_info.
8774
8775 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8776
8777 * tree-vectorizer.h (free_stmt_vec_info): Take a stmt_vec_info
8778 rather than a gimple stmt.
8779 * tree-vect-stmts.c (free_stmt_vec_info): Likewise. Don't free
8780 information for pattern statements when passed the original
8781 statement; instead wait to be passed the pattern statement itself.
8782 Don't call set_vinfo_for_stmt here.
8783 (free_stmt_vec_infos): Update call to free_stmt_vec_info.
8784 * tree-vect-loop.c (_loop_vec_info::~loop_vec_info): Don't free
8785 stmt_vec_infos here.
8786 * tree-vect-slp.c (_bb_vec_info::~bb_vec_info): Likewise.
8787 * tree-vectorizer.c (vec_info::remove_stmt): Nullify the statement's
8788 stmt_vec_infos entry.
8789
8790 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8791
8792 * tree-vectorizer.h (vec_info::replace_stmt): Declare.
8793 * tree-vectorizer.c (vec_info::replace_stmt): New function.
8794 * tree-vect-slp.c (vect_remove_slp_scalar_calls): Use it.
8795 * tree-vect-stmts.c (vectorizable_call): Likewise.
8796 (vectorizable_simd_clone_call): Likewise.
8797
8798 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8799
8800 * tree-vectorizer.h (vec_info::remove_stmt): Declare.
8801 * tree-vectorizer.c (vec_info::remove_stmt): New function.
8802 * tree-vect-loop-manip.c (vect_set_loop_condition): Use it.
8803 * tree-vect-loop.c (vect_transform_loop): Likewise.
8804 * tree-vect-slp.c (vect_schedule_slp): Likewise.
8805 * tree-vect-stmts.c (vect_remove_stores): Likewise.
8806
8807 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8808
8809 * tree-vectorizer.h (vec_info::lookup_dr): New member function.
8810 (vect_dr_stmt): Delete.
8811 * tree-vectorizer.c (vec_info::lookup_dr): New function.
8812 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Use it instead
8813 of DR_VECT_AUX.
8814 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
8815 (vect_analyze_data_ref_dependence, vect_record_base_alignments)
8816 (vect_verify_datarefs_alignment, vect_peeling_supportable)
8817 (vect_analyze_data_ref_accesses, vect_prune_runtime_alias_test_list)
8818 (vect_analyze_data_refs): Likewise.
8819 (vect_slp_analyze_data_ref_dependence): Likewise. Take a vec_info
8820 argument.
8821 (vect_find_same_alignment_drs): Likewise.
8822 (vect_slp_analyze_node_dependences): Update calls accordingly.
8823 (vect_analyze_data_refs_alignment): Likewise. Use vec_info::lookup_dr
8824 instead of DR_VECT_AUX.
8825 (vect_get_peeling_costs_all_drs): Take a loop_vec_info instead
8826 of a vector data references. Use vec_info::lookup_dr instead of
8827 DR_VECT_AUX.
8828 (vect_peeling_hash_get_lowest_cost): Update calls accordingly.
8829 (vect_enhance_data_refs_alignment): Likewise. Use vec_info::lookup_dr
8830 instead of DR_VECT_AUX.
8831
8832 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8833
8834 * tree-vectorizer.h (_loop_vec_info::unaligned_dr): Change to
8835 dr_vec_info.
8836 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Update
8837 accordingly.
8838 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
8839 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
8840 (vect_gen_prolog_loop_niters): Likewise.
8841
8842 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8843
8844 * tree-vectorizer.h (set_dr_misalignment, dr_misalignment)
8845 (DR_TARGET_ALIGNMENT, aligned_access_p, known_alignment_for_access_p)
8846 (vect_known_alignment_in_bytes, vect_dr_behavior)
8847 (vect_get_scalar_dr_size): Take references as dr_vec_infos
8848 instead of data_references. Update calls to other routines for
8849 which the same change has been made.
8850 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Take
8851 dr_vec_infos instead of stmt_vec_infos.
8852 (vect_analyze_data_ref_dependence): Update call accordingly.
8853 (vect_slp_analyze_data_ref_dependence)
8854 (vect_record_base_alignments): Use DR_VECT_AUX.
8855 (vect_calculate_target_alignment, vect_compute_data_ref_alignment)
8856 (vect_update_misalignment_for_peel, verify_data_ref_alignment)
8857 (vector_alignment_reachable_p, vect_get_data_access_cost)
8858 (vect_peeling_supportable, vect_analyze_group_access_1)
8859 (vect_analyze_group_access, vect_analyze_data_ref_access)
8860 (vect_vfa_segment_size, vect_vfa_access_size, vect_vfa_align)
8861 (vect_compile_time_alias, vect_small_gap_p)
8862 (vectorizable_with_step_bound_p, vect_duplicate_ssa_name_ptr_info):
8863 (vect_supportable_dr_alignment): Take references as dr_vec_infos
8864 instead of data_references. Update calls to other routines for
8865 which the same change has been made.
8866 (vect_verify_datarefs_alignment, vect_get_peeling_costs_all_drs)
8867 (vect_find_same_alignment_drs, vect_analyze_data_refs_alignment)
8868 (vect_slp_analyze_and_verify_node_alignment)
8869 (vect_analyze_data_ref_accesses, vect_prune_runtime_alias_test_list)
8870 (vect_create_addr_base_for_vector_ref, vect_create_data_ref_ptr)
8871 (vect_setup_realignment): Use dr_vec_infos. Update calls after
8872 above changes.
8873 (_vect_peel_info::dr): Replace with...
8874 (_vect_peel_info::dr_info): ...this new field.
8875 (vect_peeling_hash_get_most_frequent)
8876 (vect_peeling_hash_choose_best_peeling): Update accordingly.
8877 (vect_peeling_hash_get_lowest_cost):
8878 (vect_enhance_data_refs_alignment): Likewise. Update calls to other
8879 routines for which the same change has been made.
8880 (vect_peeling_hash_insert): Likewise. Take a dr_vec_info instead of a
8881 data_reference.
8882 * tree-vect-loop-manip.c (get_misalign_in_elems)
8883 (vect_gen_prolog_loop_niters): Use dr_vec_infos. Update calls after
8884 above changes.
8885 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
8886 * tree-vect-stmts.c (vect_get_store_cost, vect_get_load_cost)
8887 (vect_truncate_gather_scatter_offset, compare_step_with_zero)
8888 (get_group_load_store_type, get_negative_load_store_type)
8889 (vect_get_data_ptr_increment, vectorizable_store)
8890 (vectorizable_load): Likewise.
8891 (ensure_base_align): Take a dr_vec_info instead of a data_reference.
8892 Update calls to other routines for which the same change has been made.
8893
8894 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8895
8896 * tree-vectorizer.h (vec_info::move_dr): New member function.
8897 (dataref_aux): Rename to...
8898 (dr_vec_info): ...this and add "dr" and "stmt" fields.
8899 (_stmt_vec_info::dr_aux): Update accordingly.
8900 (_stmt_vec_info::data_ref_info): Delete.
8901 (STMT_VINFO_GROUPED_ACCESS, DR_GROUP_FIRST_ELEMENT)
8902 (DR_GROUP_NEXT_ELEMENT, DR_GROUP_SIZE, DR_GROUP_STORE_COUNT)
8903 (DR_GROUP_GAP, DR_GROUP_SAME_DR_STMT, REDUC_GROUP_FIRST_ELEMENT):
8904 (REDUC_GROUP_NEXT_ELEMENT, REDUC_GROUP_SIZE): Use dr_aux.dr instead
8905 of data_ref.
8906 (STMT_VINFO_DATA_REF): Likewise. Turn into an lvalue.
8907 (STMT_VINFO_DR_INFO): New macro.
8908 (DR_VECT_AUX): Use STMT_VINFO_DR_INKFO and vect_dr_stmt.
8909 (set_dr_misalignment): Update after rename of dataref_aux.
8910 (vect_dr_stmt): Move earlier in file. Return dr_aux.stmt.
8911 * tree-vect-stmts.c (new_stmt_vec_info): Remove redundant
8912 initialization of STMT_VINFO_DATA_REF.
8913 * tree-vectorizer.c (vec_info::move_dr): New function.
8914 * tree-vect-patterns.c (vect_recog_bool_pattern)
8915 (vect_recog_mask_conversion_pattern)
8916 (vect_recog_gather_scatter_pattern): Use it.
8917 * tree-vect-data-refs.c (vect_analyze_data_refs): Initialize
8918 the "dr" and "stmt" fields of dr_vec_info instead of
8919 STMT_VINFO_DATA_REF.
8920
8921 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8922
8923 * tree-vectorizer.h (_stmt_vec_info::pattern_stmt_p): New field.
8924 (is_pattern_stmt_p): Use it.
8925 * tree-vect-patterns.c (vect_init_pattern_stmt): Set pattern_stmt_p
8926 on pattern statements.
8927
8928 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8929
8930 * tree-vect-patterns.c (vect_mark_pattern_stmts): Take the
8931 original stmt as a stmt_vec_info rather than a gimple stmt.
8932 (vect_pattern_recog_1): Take the statement directly as a
8933 stmt_vec_info, rather than via a gimple_stmt_iterator.
8934 Update call to vect_mark_pattern_stmts.
8935 (vect_pattern_recog): Update calls accordingly.
8936
8937 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8938
8939 * tree-vectorizer.h (vect_get_vec_defs_for_stmt_copy)
8940 (vect_get_vec_def_for_stmt_copy): Take a vec_info rather than
8941 a vect_def_type for the first argument.
8942 * tree-vect-stmts.c (vect_get_vec_defs_for_stmt_copy): Likewise.
8943 (vect_get_vec_def_for_stmt_copy): Likewise. Return the original
8944 operand if it isn't defined by a vectorized statement.
8945 (vect_build_gather_load_calls): Remove the mask_dt argument and
8946 update calls to vect_get_vec_def_for_stmt_copy.
8947 (vectorizable_bswap): Likewise the dt argument.
8948 (vectorizable_call): Update calls to vectorizable_bswap and
8949 vect_get_vec_def_for_stmt_copy.
8950 (vectorizable_simd_clone_call, vectorizable_assignment)
8951 (vectorizable_shift, vectorizable_operation, vectorizable_condition)
8952 (vectorizable_comparison): Update calls to
8953 vect_get_vec_def_for_stmt_copy.
8954 (vectorizable_store): Likewise. Remove now-unnecessary calls to
8955 vect_is_simple_use.
8956 (vect_get_loop_based_defs): Remove dt argument and update call
8957 to vect_get_vec_def_for_stmt_copy.
8958 (vectorizable_conversion): Update calls to vect_get_loop_based_defs
8959 and vect_get_vec_def_for_stmt_copy.
8960 (vectorizable_load): Update calls to vect_build_gather_load_calls
8961 and vect_get_vec_def_for_stmt_copy.
8962 * tree-vect-loop.c (vect_create_epilog_for_reduction)
8963 (vectorizable_reduction, vectorizable_live_operation): Update calls
8964 to vect_get_vec_def_for_stmt_copy.
8965
8966 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8967
8968 * tree-vect-data-refs.c (vect_record_base_alignment): Replace vec_info
8969 and gimple stmt arguments with a stmt_vec_info.
8970 (vect_record_base_alignments): Update calls accordingly.
8971 * tree-vect-slp.c (vect_record_max_nunits): Replace vec_info
8972 and gimple stmt arguments with a stmt_vec_info.
8973 (vect_build_slp_tree_1): Remove vinfo argument and update call
8974 to vect_record_max_nunits.
8975 (vect_build_slp_tree_2): Update calls to vect_build_slp_tree_1
8976 and vect_record_max_nunits.
8977
8978 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8979
8980 * tree-vectorizer.h (nested_in_vect_loop_p): Move further down
8981 file and take a stmt_vec_info instead of a gimple stmt.
8982 (supportable_widening_operation, vect_finish_replace_stmt)
8983 (vect_finish_stmt_generation, vect_get_store_rhs)
8984 (vect_get_vec_def_for_operand_1, vect_get_vec_def_for_operand)
8985 (vect_get_vec_defs, vect_init_vector, vect_transform_stmt)
8986 (vect_remove_stores, vect_analyze_stmt, vectorizable_condition)
8987 (vect_get_smallest_scalar_type, vect_check_gather_scatter)
8988 (vect_create_data_ref_ptr, bump_vector_ptr)
8989 (vect_permute_store_chain, vect_setup_realignment)
8990 (vect_transform_grouped_load, vect_record_grouped_load_vectors)
8991 (vect_create_addr_base_for_vector_ref, vectorizable_live_operation)
8992 (vectorizable_reduction, vectorizable_induction)
8993 (get_initial_def_for_reduction, is_simple_and_all_uses_invariant)
8994 (vect_get_place_in_interleaving_chain): Take stmt_vec_infos rather
8995 than gimple stmts as arguments.
8996 * tree-vect-data-refs.c (vect_get_smallest_scalar_type)
8997 (vect_preserves_scalar_order_p, vect_slp_analyze_node_dependences)
8998 (can_group_stmts_p, vect_check_gather_scatter)
8999 (vect_create_addr_base_for_vector_ref, vect_create_data_ref_ptr)
9000 (bump_vector_ptr, vect_permute_store_chain, vect_setup_realignment)
9001 (vect_permute_load_chain, vect_shift_permute_load_chain)
9002 (vect_transform_grouped_load)
9003 (vect_record_grouped_load_vectors): Likewise.
9004 * tree-vect-loop.c (vect_fixup_reduc_chain)
9005 (get_initial_def_for_reduction, vect_create_epilog_for_reduction)
9006 (vectorize_fold_left_reduction, is_nonwrapping_integer_induction)
9007 (vectorizable_reduction, vectorizable_induction)
9008 (vectorizable_live_operation, vect_loop_kill_debug_uses): Likewise.
9009 * tree-vect-patterns.c (type_conversion_p, adjust_bool_stmts)
9010 (vect_get_load_store_mask): Likewise.
9011 * tree-vect-slp.c (vect_get_place_in_interleaving_chain)
9012 (vect_analyze_slp_instance, vect_mask_constant_operand_p): Likewise.
9013 * tree-vect-stmts.c (vect_mark_relevant)
9014 (is_simple_and_all_uses_invariant)
9015 (exist_non_indexing_operands_for_use_p, process_use)
9016 (vect_init_vector_1, vect_init_vector, vect_get_vec_def_for_operand_1)
9017 (vect_get_vec_def_for_operand, vect_get_vec_defs)
9018 (vect_finish_stmt_generation_1, vect_finish_replace_stmt)
9019 (vect_finish_stmt_generation, vect_truncate_gather_scatter_offset)
9020 (compare_step_with_zero, vect_get_store_rhs, get_group_load_store_type)
9021 (get_negative_load_store_type, get_load_store_type)
9022 (vect_check_load_store_mask, vect_check_store_rhs)
9023 (vect_build_gather_load_calls, vect_get_strided_load_store_ops)
9024 (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
9025 (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
9026 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
9027 (get_group_alias_ptr_type, vectorizable_store, hoist_defs_of_uses)
9028 (vectorizable_load, vectorizable_condition, vectorizable_comparison)
9029 (vect_analyze_stmt, vect_transform_stmt, vect_remove_stores)
9030 (supportable_widening_operation): Likewise.
9031
9032 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
9033
9034 * tree-vect-data-refs.c (vect_describe_gather_scatter_call): Take
9035 a stmt_vec_info instead of a gcall.
9036 (vect_check_gather_scatter): Update call accordingly.
9037 * tree-vect-loop-manip.c (iv_phi_p): Take a stmt_vec_info instead
9038 of a gphi.
9039 (vect_can_advance_ivs_p, vect_update_ivs_after_vectorizer)
9040 (slpeel_update_phi_nodes_for_loops):): Update calls accordingly.
9041 * tree-vect-loop.c (vect_transform_loop_stmt): Take a stmt_vec_info
9042 instead of a gimple stmt.
9043 (vect_transform_loop): Update calls accordingly.
9044 * tree-vect-slp.c (vect_split_slp_store_group): Take and return
9045 stmt_vec_infos instead of gimple stmts.
9046 (vect_analyze_slp_instance): Update use accordingly.
9047 * tree-vect-stmts.c (read_vector_array, write_vector_array)
9048 (vect_clobber_variable, vect_stmt_relevant_p, permute_vec_elements)
9049 (vect_use_strided_gather_scatters_p, vect_build_all_ones_mask)
9050 (vect_build_zero_merge_argument, vect_get_gather_scatter_ops)
9051 (vect_gen_widened_results_half, vect_get_loop_based_defs)
9052 (vect_create_vectorized_promotion_stmts, can_vectorize_live_stmts):
9053 Take a stmt_vec_info instead of a gimple stmt and pass stmt_vec_infos
9054 down to subroutines.
9055
9056 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
9057
9058 * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Change the type
9059 of the worklist from a vector of gimple stmts to a vector of
9060 stmt_vec_infos.
9061 * tree-vect-stmts.c (vect_mark_relevant, process_use)
9062 (vect_mark_stmts_to_be_vectorized): Likewise
9063
9064 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
9065
9066 * tree-vect-loop.c (vect_analyze_loop_operations): Look up the
9067 statement before passing it to vect_analyze_stmt.
9068 (vect_create_epilog_for_reduction): Use a stmt_vec_info to walk
9069 the chain of phi vector definitions. Track the exit phi via its
9070 stmt_vec_info.
9071 (vectorizable_reduction): Set cond_stmt_vinfo directly from the
9072 STMT_VINFO_REDUC_DEF.
9073 * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Use
9074 stmt_vec_infos to handle the statement chains.
9075 (vect_get_slp_defs): Record the first statement in the node
9076 using a stmt_vec_info.
9077 * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Look up
9078 statements here and pass their stmt_vec_info down to subroutines.
9079 (vect_init_vector_1): Hoist call to vinfo_for_stmt and pass it
9080 down to vect_finish_stmt_generation.
9081 (vect_init_vector, vect_get_vec_defs, vect_finish_replace_stmt)
9082 (vect_finish_stmt_generation): Call vinfo_for_stmt and pass
9083 stmt_vec_infos to subroutines.
9084 (vect_remove_stores): Use stmt_vec_infos to handle the statement
9085 chains.
9086
9087 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
9088
9089 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences):
9090 (vect_check_gather_scatter, vect_create_data_ref_ptr, bump_vector_ptr)
9091 (vect_permute_store_chain, vect_setup_realignment)
9092 (vect_permute_load_chain, vect_shift_permute_load_chain)
9093 (vect_transform_grouped_load): Use stmt_vec_info rather than gimple
9094 stmts internally, and when passing values to other vectorizer routines.
9095 * tree-vect-loop-manip.c (vect_can_advance_ivs_p): Likewise.
9096 * tree-vect-loop.c (vect_analyze_scalar_cycles_1)
9097 (vect_analyze_loop_operations, get_initial_def_for_reduction)
9098 (vect_create_epilog_for_reduction, vectorize_fold_left_reduction)
9099 (vectorizable_reduction, vectorizable_induction)
9100 (vectorizable_live_operation, vect_transform_loop_stmt)
9101 (vect_transform_loop): Likewise.
9102 * tree-vect-patterns.c (vect_reassociating_reduction_p)
9103 (vect_recog_widen_op_pattern, vect_recog_mixed_size_cond_pattern)
9104 (vect_recog_bool_pattern, vect_recog_gather_scatter_pattern): Likewise.
9105 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
9106 (vect_slp_analyze_node_operations_1): Likewise.
9107 * tree-vect-stmts.c (vect_mark_relevant, process_use)
9108 (exist_non_indexing_operands_for_use_p, vect_init_vector_1)
9109 (vect_mark_stmts_to_be_vectorized, vect_get_vec_def_for_operand)
9110 (vect_finish_stmt_generation_1, get_group_load_store_type)
9111 (get_load_store_type, vect_build_gather_load_calls)
9112 (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
9113 (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
9114 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
9115 (vectorizable_store, vectorizable_load, vectorizable_condition)
9116 (vectorizable_comparison, vect_analyze_stmt, vect_transform_stmt)
9117 (supportable_widening_operation): Likewise.
9118 (vect_get_vector_types_for_stmt): Likewise.
9119 * tree-vectorizer.h (vect_dr_behavior): Likewise.
9120
9121 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
9122
9123 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
9124 (vect_slp_analyze_node_dependences, vect_analyze_data_ref_accesses)
9125 (vect_permute_store_chain, vect_permute_load_chain)
9126 (vect_shift_permute_load_chain, vect_transform_grouped_load): Avoid
9127 repeated stmt_vec_info lookups.
9128 * tree-vect-loop-manip.c (vect_can_advance_ivs_p): Likewise.
9129 (vect_update_ivs_after_vectorizer): Likewise.
9130 * tree-vect-loop.c (vect_is_simple_reduction): Likewise.
9131 (vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
9132 * tree-vect-patterns.c (adjust_bool_stmts): Likewise.
9133 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
9134 (vect_bb_slp_scalar_cost): Likewise.
9135 * tree-vect-stmts.c (get_group_alias_ptr_type): Likewise.
9136
9137 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
9138
9139 * tree-vect-data-refs.c (vect_check_gather_scatter): Pass the
9140 gcall rather than the generic gimple stmt to gimple_call_internal_fn.
9141 (vect_get_smallest_scalar_type, can_group_stmts_p): Use dyn_cast
9142 to get gassigns and gcalls, rather than operating on generc gimple
9143 stmts.
9144 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p)
9145 (vect_mark_stmts_to_be_vectorized, vectorizable_store)
9146 (vectorizable_load, vect_analyze_stmt): Likewise.
9147 * tree-vect-loop.c (vectorizable_reduction): Likewise gphi.
9148
9149 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
9150
9151 * tree-vectorizer.h (get_earlier_stmt, get_later_stmt): Take and
9152 return stmt_vec_infos rather than gimple stmts. Do not accept
9153 null arguments.
9154 (vect_find_last_scalar_stmt_in_slp): Return a stmt_vec_info instead
9155 of a gimple stmt.
9156 * tree-vect-slp.c (vect_find_last_scalar_stmt_in_slp): Likewise.
9157 Update use of get_later_stmt.
9158 (vect_get_constant_vectors): Update call accordingly.
9159 (vect_schedule_slp_instance): Likewise
9160 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Likewise.
9161 (vect_slp_analyze_instance_dependence): Likewise.
9162 (vect_preserves_scalar_order_p): Update use of get_earlier_stmt.
9163
9164 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
9165
9166 * tree-vectorizer.h (stmt_info_for_cost::stmt): Replace with...
9167 (stmt_info_for_cost::stmt_info): ...this new field.
9168 (add_stmt_costs): Update accordingly.
9169 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
9170 (vect_get_known_peeling_cost): Likewise.
9171 (vect_estimate_min_profitable_iters): Likewise.
9172 * tree-vect-stmts.c (record_stmt_cost): Likewise.
9173
9174 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
9175
9176 * tree-vectorizer.h (_loop_vec_info::may_misalign_stmts): Change
9177 from an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
9178 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Update
9179 accordingly.
9180 * tree-vect-loop-manip.c (vect_create_cond_for_align_checks): Likewise.
9181
9182 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
9183
9184 * tree-vectorizer.h (_stmt_vec_info::same_dr_stmt): Change from
9185 a gimple stmt to a stmt_vec_info.
9186 * tree-vect-stmts.c (vectorizable_load): Update accordingly.
9187
9188 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
9189
9190 * tree-vectorizer.h (vec_info::grouped_stores): Change from
9191 an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
9192 (_loop_vec_info::reduction_chains): Likewise.
9193 * tree-vect-loop.c (vect_fixup_scalar_cycles_with_patterns): Update
9194 accordingly.
9195 * tree-vect-slp.c (vect_analyze_slp): Likewise.
9196
9197 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
9198
9199 * tree-vectorizer.h (_stmt_vec_info::first_element): Change from
9200 a gimple stmt to a stmt_vec_info.
9201 (_stmt_vec_info::next_element): Likewise.
9202 * tree-vect-data-refs.c (vect_update_misalignment_for_peel)
9203 (vect_slp_analyze_and_verify_node_alignment)
9204 (vect_analyze_group_access_1, vect_analyze_group_access)
9205 (vect_small_gap_p, vect_prune_runtime_alias_test_list)
9206 (vect_create_data_ref_ptr, vect_record_grouped_load_vectors)
9207 (vect_supportable_dr_alignment): Update accordingly.
9208 * tree-vect-loop.c (vect_fixup_reduc_chain): Likewise.
9209 (vect_fixup_scalar_cycles_with_patterns, vect_is_slp_reduction)
9210 (vect_is_simple_reduction, vectorizable_reduction): Likewise.
9211 * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
9212 * tree-vect-slp.c (vect_build_slp_tree_1)
9213 (vect_attempt_slp_rearrange_stmts, vect_supported_load_permutation_p)
9214 (vect_split_slp_store_group, vect_analyze_slp_instance)
9215 (vect_analyze_slp, vect_transform_slp_perm_load): Likewise.
9216 * tree-vect-stmts.c (vect_model_store_cost, vect_model_load_cost)
9217 (get_group_load_store_type, get_load_store_type)
9218 (get_group_alias_ptr_type, vectorizable_store, vectorizable_load)
9219 (vect_transform_stmt, vect_remove_stores): Likewise.
9220
9221 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
9222
9223 * tree-vectorizer.h (vect_dr_stmt): Return a stmt_vec_info rather
9224 than a gimple stmt.
9225 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
9226 (vect_slp_analyze_data_ref_dependence, vect_record_base_alignments)
9227 (vect_calculate_target_alignmentm, vect_compute_data_ref_alignment)
9228 (vect_update_misalignment_for_peel, vect_verify_datarefs_alignment)
9229 (vector_alignment_reachable_p, vect_get_data_access_cost)
9230 (vect_get_peeling_costs_all_drs, vect_peeling_hash_get_lowest_cost)
9231 (vect_peeling_supportable, vect_enhance_data_refs_alignment)
9232 (vect_find_same_alignment_drs, vect_analyze_data_refs_alignment)
9233 (vect_analyze_group_access_1, vect_analyze_group_access)
9234 (vect_analyze_data_ref_access, vect_analyze_data_ref_accesses)
9235 (vect_vfa_access_size, vect_small_gap_p, vect_analyze_data_refs)
9236 (vect_supportable_dr_alignment): Remove vinfo_for_stmt from the
9237 result of vect_dr_stmt and use the stmt_vec_info instead of
9238 the associated gimple stmt.
9239 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
9240 (vect_gen_prolog_loop_niters): Likewise.
9241 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
9242
9243 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
9244
9245 * tree-vectorizer.h (_slp_tree::stmts): Change from a vec<gimple *>
9246 to a vec<stmt_vec_info>.
9247 * tree-vect-slp.c (vect_free_slp_tree): Update accordingly.
9248 (vect_create_new_slp_node): Take a vec<gimple *> instead of a
9249 vec<stmt_vec_info>.
9250 (_slp_oprnd_info::def_stmts): Change from a vec<gimple *>
9251 to a vec<stmt_vec_info>.
9252 (bst_traits::value_type, bst_traits::value_type): Likewise.
9253 (bst_traits::hash): Update accordingly.
9254 (vect_get_and_check_slp_defs): Change the stmts parameter from
9255 a vec<gimple *> to a vec<stmt_vec_info>.
9256 (vect_two_operations_perm_ok_p, vect_build_slp_tree_1): Likewise.
9257 (vect_build_slp_tree): Likewise.
9258 (vect_build_slp_tree_2): Likewise. Update uses of
9259 SLP_TREE_SCALAR_STMTS.
9260 (vect_print_slp_tree): Update uses of SLP_TREE_SCALAR_STMTS.
9261 (vect_mark_slp_stmts, vect_mark_slp_stmts_relevant)
9262 (vect_slp_rearrange_stmts, vect_attempt_slp_rearrange_stmts)
9263 (vect_supported_load_permutation_p, vect_find_last_scalar_stmt_in_slp)
9264 (vect_detect_hybrid_slp_stmts, vect_slp_analyze_node_operations_1)
9265 (vect_slp_analyze_node_operations, vect_slp_analyze_operations)
9266 (vect_bb_slp_scalar_cost, vect_slp_analyze_bb_1)
9267 (vect_get_constant_vectors, vect_get_slp_defs)
9268 (vect_transform_slp_perm_load, vect_schedule_slp_instance)
9269 (vect_remove_slp_scalar_calls, vect_schedule_slp): Likewise.
9270 (vect_analyze_slp_instance): Build up a vec of stmt_vec_infos
9271 instead of gimple stmts.
9272 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Change
9273 the stores parameter for a vec<gimple *> to a vec<stmt_vec_info>.
9274 (vect_slp_analyze_instance_dependence): Update uses of
9275 SLP_TREE_SCALAR_STMTS.
9276 (vect_slp_analyze_and_verify_node_alignment): Likewise.
9277 (vect_slp_analyze_and_verify_instance_alignment): Likewise.
9278 * tree-vect-loop.c (neutral_op_for_slp_reduction): Likewise.
9279 (get_initial_defs_for_reduction): Likewise.
9280 (vect_create_epilog_for_reduction): Likewise.
9281 (vectorize_fold_left_reduction): Likewise.
9282 * tree-vect-stmts.c (vect_prologue_cost_for_slp_op): Likewise.
9283 (vect_model_simple_cost, vectorizable_shift, vectorizable_load)
9284 (can_vectorize_live_stmts): Likewise.
9285
9286 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
9287
9288 * tree-vectorizer.h (_loop_vec_info::reductions): Change from an
9289 auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
9290 (vect_force_simple_reduction): Take and return stmt_vec_infos rather
9291 than gimple stmts.
9292 * tree-parloops.c (valid_reduction_p): Take a stmt_vec_info instead
9293 of a gimple stmt.
9294 (gather_scalar_reductions): Update after above interface changes.
9295 * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Likewise.
9296 (vect_is_simple_reduction): Take and return stmt_vec_infos rather
9297 than gimple stmts.
9298 (vect_force_simple_reduction): Likewise.
9299 * tree-vect-patterns.c (vect_pattern_recog_1): Update use of
9300 LOOP_VINFO_REDUCTIONS.
9301 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
9302
9303 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
9304
9305 * tree-vectorizer.h (_stmt_vec_info::reduc_def): Change from
9306 a gimple stmt to a stmt_vec_info.
9307 * tree-vect-loop.c (vect_active_double_reduction_p)
9308 (vect_force_simple_reduction, vectorizable_reduction): Update
9309 accordingly.
9310
9311 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
9312
9313 * tree-vectorizer.h (_slp_tree::vec_stmts): Change from a
9314 vec<gimple *> to a vec<stmt_vec_info>.
9315 * tree-vect-loop.c (vect_create_epilog_for_reduction): Change
9316 the reduction_phis argument from a vec<gimple *> to a
9317 vec<stmt_vec_info>.
9318 (vectorizable_reduction): Likewise the phis local variable that
9319 is passed to vect_create_epilog_for_reduction. Update for new type
9320 of SLP_TREE_VEC_STMTS.
9321 (vectorizable_induction): Update for new type of SLP_TREE_VEC_STMTS.
9322 (vectorizable_live_operation): Likewise.
9323 * tree-vect-slp.c (vect_get_slp_vect_defs): Likewise.
9324 (vect_transform_slp_perm_load, vect_schedule_slp_instance): Likewise.
9325
9326 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
9327
9328 * tree-vectorizer.h (_stmt_vec_info::vectorized_stmt): Change from
9329 a gimple stmt to a stmt_vec_info.
9330 (vectorizable_condition, vectorizable_live_operation)
9331 (vectorizable_reduction, vectorizable_induction): Pass back the
9332 vectorized statement as a stmt_vec_info.
9333 * tree-vect-data-refs.c (vect_record_grouped_load_vectors): Update
9334 use of STMT_VINFO_VEC_STMT.
9335 * tree-vect-loop.c (vect_create_epilog_for_reduction): Likewise,
9336 accumulating the inner phis that feed the STMT_VINFO_VEC_STMT
9337 as stmt_vec_infos rather than gimple stmts.
9338 (vectorize_fold_left_reduction): Change vec_stmt from a gimple stmt
9339 to a stmt_vec_info.
9340 (vectorizable_live_operation): Likewise.
9341 (vectorizable_reduction, vectorizable_induction): Likewise,
9342 updating use of STMT_VINFO_VEC_STMT.
9343 * tree-vect-stmts.c (vect_get_vec_def_for_operand_1): Update use
9344 of STMT_VINFO_VEC_STMT.
9345 (vect_build_gather_load_calls, vectorizable_bswap, vectorizable_call)
9346 (vectorizable_simd_clone_call, vectorizable_conversion)
9347 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
9348 (vectorizable_store, vectorizable_load, vectorizable_condition)
9349 (vectorizable_comparison, can_vectorize_live_stmts): Change vec_stmt
9350 from a gimple stmt to a stmt_vec_info.
9351 (vect_transform_stmt): Update use of STMT_VINFO_VEC_STMT. Pass a
9352 pointer to a stmt_vec_info to the vectorizable_* routines.
9353
9354 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
9355
9356 * tree-vectorizer.h (_stmt_vec_info::related_stmt): Change from
9357 a gimple stmt to a stmt_vec_info.
9358 (is_pattern_stmt_p): Update accordingly.
9359 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Likewise.
9360 (vect_record_grouped_load_vectors): Likewise.
9361 * tree-vect-loop.c (vect_determine_vf_for_stmt): Likewise.
9362 (vect_fixup_reduc_chain, vect_update_vf_for_slp): Likewise.
9363 (vect_model_reduction_cost): Likewise.
9364 (vect_create_epilog_for_reduction): Likewise.
9365 (vectorizable_reduction, vectorizable_induction): Likewise.
9366 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
9367 Return the stmt_vec_info for the pattern statement.
9368 (vect_set_pattern_stmt): Update use of STMT_VINFO_RELATED_STMT.
9369 (vect_split_statement, vect_mark_pattern_stmts): Likewise.
9370 * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
9371 (vect_detect_hybrid_slp, vect_get_slp_defs): Likewise.
9372 * tree-vect-stmts.c (vect_mark_relevant): Likewise.
9373 (vect_get_vec_def_for_operand_1, vectorizable_call): Likewise.
9374 (vectorizable_simd_clone_call, vect_analyze_stmt, new_stmt_vec_info)
9375 (free_stmt_vec_info, vect_is_simple_use): Likewise.
9376
9377 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
9378
9379 * tree-vectorizer.h (vect_finish_replace_stmt): Return a stmt_vec_info
9380 (vect_finish_stmt_generation): Likewise.
9381 * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
9382 (vect_finish_replace_stmt, vect_finish_stmt_generation): Likewise.
9383 (vect_build_gather_load_calls): Use the return value of the above
9384 functions instead of a separate call to vinfo_for_stmt. Use narrow
9385 scopes for the input gimple stmt and wider scopes for the associated
9386 stmt_vec_info. Use vec_info::lookup_def when setting these
9387 stmt_vec_infos from an SSA_NAME definition.
9388 (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
9389 (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
9390 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
9391 (vectorizable_store, vectorizable_load, vectorizable_condition)
9392 (vectorizable_comparison): Likewise.
9393 * tree-vect-loop.c (vectorize_fold_left_reduction): Likewise.
9394 (vectorizable_reduction): Likewise.
9395
9396 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
9397
9398 * tree-vectorizer.h (vect_is_simple_use): Add an optional
9399 stmt_vec_info * parameter before the optional gimple **.
9400 * tree-vect-stmts.c (vect_is_simple_use): Likewise.
9401 (process_use, vect_get_vec_def_for_operand_1): Update callers.
9402 (vect_get_vec_def_for_operand, vectorizable_shift): Likewise.
9403 * tree-vect-loop.c (vectorizable_reduction): Likewise.
9404 (vectorizable_live_operation): Likewise.
9405 * tree-vect-patterns.c (type_conversion_p): Likewise.
9406 (vect_look_through_possible_promotion): Likewise.
9407 (vect_recog_rotate_pattern): Likewise.
9408 * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
9409
9410 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
9411
9412 * tree-vectorizer.h (stmt_vec_info): Temporarily change from
9413 a typedef to a wrapper class.
9414 (NULL_STMT_VEC_INFO): New macro.
9415 (vec_info::stmt_infos): Change to vec<stmt_vec_info>.
9416 (stmt_vec_info::operator*): New function.
9417 (stmt_vec_info::operator gimple *): Likewise.
9418 (set_vinfo_for_stmt): Use NULL_STMT_VEC_INFO.
9419 (add_stmt_costs): Likewise.
9420 * tree-vect-loop-manip.c (iv_phi_p): Likewise.
9421 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
9422 (vect_get_known_peeling_cost): Likewise.
9423 (vect_estimate_min_profitable_iters): Likewise.
9424 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
9425 * tree-vect-slp.c (vect_remove_slp_scalar_calls): Likewise.
9426 * tree-vect-stmts.c (vect_build_gather_load_calls): Likewise.
9427 (vectorizable_store, free_stmt_vec_infos): Likewise.
9428 (new_stmt_vec_info): Change return type of xcalloc to
9429 _stmt_vec_info *.
9430
9431 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
9432
9433 * tree-vectorizer.h (vec_info::lookup_single_use): Declare.
9434 * tree-vectorizer.c (vec_info::lookup_single_use): New function.
9435 * tree-vect-loop.c (vectorizable_reduction): Use it instead of
9436 a single_imm_use-based sequence.
9437 * tree-vect-stmts.c (supportable_widening_operation): Likewise.
9438
9439 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
9440
9441 * tree-vectorizer.h (vec_info::lookup_def): Declare.
9442 * tree-vectorizer.c (vec_info::lookup_def): New function.
9443 * tree-vect-patterns.c (vect_get_internal_def): Use it.
9444 (vect_widened_op_tree): Likewise.
9445 * tree-vect-stmts.c (vect_is_simple_use): Likewise.
9446 * tree-vect-loop.c (vect_analyze_loop_operations): Likewise.
9447 (vectorizable_reduction): Likewise.
9448 (vect_valid_reduction_input_p): Take a stmt_vec_info instead
9449 of a gimple *.
9450 (vect_is_slp_reduction): Update calls accordingly. Use
9451 vec_info::lookup_def.
9452 (vect_is_simple_reduction): Likewise
9453 * tree-vect-slp.c (vect_detect_hybrid_slp_1): Use vec_info::lookup_def.
9454
9455 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
9456
9457 * tree-vectorizer.h (vec_info::lookup_stmt): Declare.
9458 * tree-vectorizer.c (vec_info::lookup_stmt): New function.
9459 * tree-vect-loop.c (vect_determine_vf_for_stmt): Use it instead
9460 of vinfo_for_stmt.
9461 (vect_determine_vectorization_factor, vect_analyze_scalar_cycles_1)
9462 (vect_compute_single_scalar_iteration_cost, vect_analyze_loop_form)
9463 (vect_update_vf_for_slp, vect_analyze_loop_operations)
9464 (vect_is_slp_reduction, vectorizable_induction)
9465 (vect_transform_loop_stmt, vect_transform_loop): Likewise.
9466 * tree-vect-patterns.c (vect_init_pattern_stmt):
9467 (vect_determine_min_output_precision_1, vect_determine_precisions)
9468 (vect_pattern_recog): Likewise.
9469 * tree-vect-stmts.c (vect_analyze_stmt, vect_transform_stmt): Likewise.
9470 * config/powerpcspe/powerpcspe.c (rs6000_density_test): Likewise.
9471 * config/rs6000/rs6000.c (rs6000_density_test): Likewise.
9472 * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
9473 (vect_detect_hybrid_slp_1, vect_detect_hybrid_slp_2)
9474 (vect_detect_hybrid_slp): Likewise. Change the walk_stmt_info
9475 info field from a loop to a loop_vec_info.
9476
9477 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
9478
9479 * tree-vectorizer.h (stmt_vec_info): Move typedef earlier in file.
9480 (vec_info::add_stmt): Declare.
9481 * tree-vectorizer.c (vec_info::add_stmt): New function.
9482 * tree-vect-data-refs.c (vect_create_data_ref_ptr): Use it.
9483 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Likewise.
9484 (vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
9485 (vectorizable_induction): Likewise.
9486 * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Likewise.
9487 * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
9488 (vectorizable_simd_clone_call, vectorizable_store): Likewise.
9489 (vectorizable_load): Likewise.
9490 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
9491 (vect_recog_bool_pattern, vect_recog_mask_conversion_pattern)
9492 (vect_recog_gather_scatter_pattern): Likewise.
9493 (append_pattern_def_seq): Likewise. Remove a check that is
9494 performed by add_stmt itself.
9495
9496 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
9497
9498 * tree-vect-loop.c (vectorizable_reduction): Fix an instance in
9499 which make_ssa_name was called with new_stmt before new_stmt
9500 had been created.
9501
9502 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
9503
9504 * tree-vect-loop.c (vect_valid_reduction_input_p): New function,
9505 split out from...
9506 (vect_is_slp_reduction): ...here...
9507 (vect_is_simple_reduction): ...and here. Remove repetition of tests
9508 that are already known to be false.
9509
9510 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
9511
9512 * tree-vectorizer.h (vect_free_slp_instance): Add a final_p parameter.
9513 * tree-vect-slp.c (vect_free_slp_tree): Likewise. Don't update
9514 STMT_VINFO_NUM_SLP_USES when it's true.
9515 (vect_free_slp_instance): Add a final_p parameter and pass it to
9516 vect_free_slp_tree.
9517 (vect_build_slp_tree_2): Update call to vect_free_slp_instance.
9518 (vect_analyze_slp_instance): Likewise.
9519 (vect_slp_analyze_operations): Likewise.
9520 (vect_slp_analyze_bb_1): Likewise.
9521 * tree-vectorizer.c (vec_info): Likewise.
9522 * tree-vect-loop.c (vect_transform_loop): Likewise.
9523
9524 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
9525
9526 * tree-vect-loop.c (vectorizable_reduction): Assert that the
9527 function is not called for second and subsequent members of
9528 a reduction group.
9529
9530 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
9531
9532 * tree-vect-loop.c (get_initial_def_for_reduction): Move special
9533 cases for nested loops from here to ...
9534 (vect_create_epilog_for_reduction): ...here. Only call
9535 vect_is_simple_use for inner-loop reductions.
9536
9537 2018-07-31 Martin Liska <mliska@suse.cz>
9538
9539 PR gcov-profile/85338
9540 PR gcov-profile/85350
9541 PR gcov-profile/85372
9542 * profile.c (struct location_triplet): New.
9543 (struct location_triplet_hash): Likewise.
9544 (output_location): Do not output a BB that
9545 is already recorded for a line.
9546 (branch_prob): Use streamed_locations.
9547
9548 2018-07-31 Martin Liska <mliska@suse.cz>
9549
9550 PR gcov-profile/85370
9551 * coverage.c (coverage_begin_function): Do not mark target
9552 clones as artificial functions.
9553
9554 2018-07-31 Martin Liska <mliska@suse.cz>
9555
9556 PR gcov-profile/83813
9557 PR gcov-profile/84758
9558 PR gcov-profile/85217
9559 PR gcov-profile/85332
9560 * profile.c (branch_prob): Do not record GOTO expressions
9561 for GIMPLE statements which locations are already streamed.
9562
9563 2018-07-31 Olivier Hainque <hainque@adacore.com>
9564
9565 * gcc.c (handle_spec_function): Accept a soft_matched_part
9566 argument, as do_spec_1. Pass it down to ...
9567 (eval_spec_function): Accept a soft_matched_part argument,
9568 and pass it down to ...
9569 (do_spec_2): Accept a soft_matched_part argument, and pass
9570 it down to do_spec_1.
9571 (do_spec_1): Pass soft_matched_part to handle_spec_function.
9572 (handle_braces): Update call to handle_spec_function.
9573 (driver::set_up_specs): Update calls to do_spec_2.
9574 (compare_debug_dump_opt_spec_function): Likewise.
9575 (compare_debug_self_opt_spec_function): Likewise.
9576
9577 2018-07-31 Olivier Hainque <hainque@adacore.com>
9578
9579 * common.opt (nolibc): New option.
9580 * doc/invoke.texi (Link Options): Document it.
9581 * gcc.c (LINK_GCC_C_SEQUENCE_SPEC): Honor nolibc.
9582 * config/alpha/linux.h: Likewise.
9583 * config/arc/elf.h: Likewise.
9584 * config/arm/uclinux-elf.h: Likewise.
9585 * config/arm/unknown-elf.h: Likewise.
9586 * config/avr/avrlibc.h: Likewise.
9587 * config/bfin/bfin.h: Likewise.
9588 * config/bfin/linux.h: Likewise.
9589 * config/bfin/uclinux.h: Likewise.
9590 * config/darwin.h: Likewise.
9591 * config/darwin10.h: Likewise.
9592 * config/darwin12.h: Likewise.
9593 * config/gnu-user.h: Likewise.
9594 * config/lm32/uclinux-elf.h: Likewise.
9595 * config/pa/pa-hpux11.h: Likewise.
9596 * config/pa/pa64-hpux.h: Likewise.
9597 * config/sparc/sparc.h: Likewise.
9598
9599 2018-07-31 Olivier Hainque <hainque@adacore.com>
9600
9601 * gcc.c (getenv_spec_function): Prepend '/' to value for allowed
9602 undefined variables.
9603
9604 2018-07-30 Segher Boessenkool <segher@kernel.crashing.org>
9605
9606 PR target/86640
9607 * config/arm/arm.c (arm_block_set_aligned_vect): Use gen_int_mode
9608 instead of GEN_INT.
9609
9610 2018-07-30 Bernd Edlinger <bernd.edlinger@hotmail.de>
9611
9612 * tree-ssa-forwprop.c (simplify_builtin_call): Don't create a not NUL
9613 terminated string literal.
9614
9615 2018-07-30 Segher Boessenkool <segher@kernel.crashing.org>
9616
9617 PR rtl-optimization/85160
9618 * combine.c (is_just_move): New function.
9619 (try_combine): Allow combining two instructions into two if neither of
9620 the original instructions was a move.
9621
9622 2018-07-30 Alexander Monakov <amonakov@ispras.ru>
9623
9624 PR target/86673
9625 * doc/extend.texi (Global Register Variables): Discourage use of type
9626 qualifiers.
9627 (Local Register Variables): Likewise.
9628
9629 2018-07-30 Richard Sandiford <richard.sandiford@arm.com>
9630
9631 PR tree-optimization/86506
9632 * hwint.h (ceil_log2): Resync with hwint.c implementation.
9633
9634 2018-07-30 Ilya Leoshkevich <iii@linux.ibm.com>
9635
9636 PR target/86547
9637 * lra-constraints.c (spill_hard_reg_in_range): When selecting the
9638 hard_regno, make sure no insn between `from` and `to` clobbers it.
9639
9640 2018-07-30 Cesar Philippidis <cesar@codesourcery.com>
9641 Tom de Vries <tdevries@suse.de>
9642
9643 * config/nvptx/nvptx.c (PTX_GANG_DEFAULT): Rename to ...
9644 (PTX_DEFAULT_RUNTIME_DIM): ... this.
9645 (nvptx_goacc_validate_dims): Set default worker and gang dims to
9646 PTX_DEFAULT_RUNTIME_DIM.
9647 (nvptx_dim_limit): Ignore GOMP_DIM_WORKER.
9648
9649 2018-07-29 John David Anglin <danglin@gcc.gnu.org>
9650
9651 * config/pa/pa.c (pa_output_addr_vec): Align address table.
9652 * config/pa/pa.h (JUMP_TABLES_IN_TEXT_SECTION): Revise comment.
9653 * config/pa/pa32-linux.h (JUMP_TABLES_IN_TEXT_SECTION): Define.
9654
9655 2018-07-27 Michael Meissner <meissner@linux.ibm.com>
9656
9657 * config/rs6000/constraints.md (wG constraint): Delete, no longer
9658 used.
9659 * config/rs6000/predicates.md (p9_fusion_reg_operand): Rename
9660 predicate to reflect toc fusion has been deleted.
9661 (toc_fusion_mem_raw): Delete, no longer used.
9662 (toc_fusion_mem_wrapped): Likewise.
9663 * config/rs6000/rs6000-cpus.def (POWERPC_MASKS): Delete toc
9664 fusion mask bit.
9665 * config/rs6000/rs6000-protos.h (fusion_wrap_memory_address):
9666 Delete, no longer used.
9667 * config/rs6000/rs6000.c (struct rs6000_reg_addr): Delete fields
9668 meant to be used for toc fusion.
9669 (rs6000_debug_print_mode): Delete toc fusion debugging.
9670 (rs6000_debug_reg_global): Likewise.
9671 (rs6000_init_hard_regno_mode_ok): Delete setting up fields for toc
9672 fusion and secondary reload support that were never used.
9673 (rs6000_option_override_internal): Delete TOC fusion, that was only
9674 partially defined, and it did not work unless you also used the
9675 -mcmodel= switch.
9676 (rs6000_legitimate_address_p): Delete TOC fusion support.
9677 (rs6000_opt_masks): Likewise.
9678 (fusion_wrap_memory_address): Delete function, no longer used.
9679 (fusion_split_address); Delete TOC fusion support.
9680 * config/rs6000/rs6000.h (TARGET_TOC_FUSION_INT): Delete, no
9681 longer used with toc fusion being deleted.
9682 (TARGET_TOC_FUSION_FP): Likewise.
9683 * config/rs6000/rs6000.md (UNSPEC_FUSION_ADDIS): Delete TOC fusion
9684 UNSPEC.
9685 (toc fusion spliter): Delete TOC fusion support.
9686 (toc_fusionload_<mode>): Likewise.
9687 (toc_fusionload_di): Likewise.
9688 (fusion_gpr_load_<mode>): Delete generator function, this insn no
9689 longer needs to be named. Rename predicate to delete TOC fusion.
9690 (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
9691 (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
9692 (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
9693 (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
9694 (p9 fusion peephole2s): Rename predicate to delete TOC fusion.
9695
9696 2018-07-27 Kelvin Nilsen <kelvin@gcc.gnu.org>
9697
9698 * doc/extend.texi (Basic PowerPC Built-in Functions Available on
9699 ISA 2.05): Replace __uint128_t with __uint128 and __int128_t with
9700 __int128 in built-in function prototypes.
9701 (PowerPC AltiVec Built-in Functions on ISA 2.07): Likewise.
9702 (PowerPC AltiVec Built-in Functions on ISA 3.0): Likewise.
9703
9704 2018-07-27 Martin Sebor <msebor@redhat.com>
9705
9706 PR tree-optimization/86696
9707 * tree-ssa-strlen.c (get_min_string_length): Handle all integer
9708 types, including enums.
9709 (handle_char_store): Be prepared for the above function to fail.
9710
9711 2018-07-26 Qing Zhao <qing.zhao@oracle.com>
9712
9713 * builtins.c (inline_expand_builtin_string_cmp): Disable inlining
9714 when optimization level is lower than 2 or optimize for size.
9715
9716 2018-07-26 Martin Sebor <msebor@redhat.com>
9717
9718 PR tree-optimization/86043
9719 PR tree-optimization/86042
9720 * tree-ssa-strlen.c (handle_builtin_memcpy): Handle strict overlaps.
9721 (get_string_cst_length): Rename...
9722 (get_min_string_length): ...to this. Add argument.
9723 (handle_char_store): Extend to handle multi-character stores by
9724 MEM_REF.
9725 * tree.c (initializer_zerop): Use new argument. Handle MEM_REF.
9726 * tree.h (initializer_zerop): Add argument.
9727
9728 2018-07-26 Jakub Jelinek <jakub@redhat.com>
9729
9730 PR middle-end/86660
9731 * omp-low.c (scan_sharing_clauses): Don't ignore map clauses for
9732 declare target to variables if they have always,{to,from,tofrom} map
9733 kinds.
9734
9735 2018-07-26 Martin Liska <mliska@suse.cz>
9736
9737 PR lto/86548
9738 * lto-wrapper.c: Add linker_output as prefix
9739 for ltrans_output_file.
9740
9741 2018-07-26 Segher Boessenkool <segher@kernel.crashing.org>
9742
9743 PR rtl-optimization/85805
9744 * combine.c (reg_nonzero_bits_for_combine): Only use the last set
9745 value for hard registers if that was written in the same mode.
9746
9747 2018-07-26 Martin Liska <mliska@suse.cz>
9748
9749 PR gcov-profile/86536
9750 * gcov.c (format_gcov): Use printf format %.*f directly
9751 and do not handle special values.
9752
9753 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
9754
9755 * common/config/arc/arc-common.c (arc_option_optimization_table):
9756 Update default optimizations for size.
9757
9758 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
9759
9760 * config/arc/arc.md (movsf_insn): Add short instruction selection.
9761 * config/arc/constraints.md (CfZ): New constraint.
9762 * config/arc/fpu.md (addssf3_fpu): Use CfZ constraint.
9763 (subsf3_fpu): Likewise.
9764 (cmpsf_fpu): Likewise.
9765 (cmpsf_fpu_uneq): Likewise.
9766
9767 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
9768
9769 * config/arc/arc.c (compact_memory_operand_p): Check for uncached
9770 accesses as well.
9771 (arc_is_uncached_mem_p): uncached applies to both the variable and
9772 the pointer.
9773
9774 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
9775
9776 * config/arc/arc.h (ADDITIONAL_REGISTER_NAMES): Add additional
9777 register names.
9778
9779 2018-07-25 David Malcolm <dmalcolm@redhat.com>
9780
9781 * optinfo-emit-json.cc (class optrecord_json_writer): Convert
9782 field "m_scopes" from vec to auto_vec.
9783
9784 2018-07-25 Martin Liska <mliska@suse.cz>
9785
9786 * config/powerpcspe/powerpcspe-protos.h (rs6000_loop_align): Fix
9787 return type.
9788
9789 2018-07-25 Richard Biener <rguenther@suse.de>
9790
9791 PR debug/86654
9792 * dwarf2out.c (dwarf2out_decl): Do not handle nested functions
9793 special wrt context_die late.
9794 (gen_subprogram_die): Re-use DIEs in local scope.
9795
9796 2018-07-25 Richard Sandiford <richard.sandiford@arm.com>
9797
9798 PR tree-optimization/86644
9799 * hwint.c (ceil_log2): Fix comment. Return 0 for 0.
9800
9801 2018-07-25 Martin Liska <mliska@suse.cz>
9802
9803 PR middle-end/86645
9804 * dumpfile.c: And excluded values with TDF_ALL_VALUES.
9805 * dumpfile.h (enum dump_flag): Defince TDF_ALL_VALUES.
9806
9807 2018-07-25 Martin Liska <mliska@suse.cz>
9808
9809 PR sanitizer/79635
9810 * params.def: Explain ASan abbreviation and provide
9811 a documentation link.
9812
9813 2018-07-24 Martin Sebor <msebor@redhat.com>
9814
9815 PR tree-optimization/86622
9816 PR tree-optimization/86532
9817 * builtins.h (string_length): Declare.
9818 * builtins.c (c_strlen): Correct handling of non-constant offsets.
9819 (check_access): Be prepared for non-constant length ranges.
9820 (string_length): Make extern.
9821 * expr.c (string_constant): Only handle the minor non-constant
9822 array index. Use string_constant to compute the length of
9823 a generic string constant.
9824
9825 2018-07-24 Richard Sandiford <richard.sandiford@arm.com>
9826
9827 PR tree-optimization/86618
9828 * tree-vect-stmts.c (vectorizable_call): Don't take the address
9829 of LOOP_VINFO_MASKS (loop_vinfo) when loop_vinfo is null.
9830
9831 2018-07-24 David Malcolm <dmalcolm@redhat.com>
9832
9833 PR tree-optimization/86636
9834 * json.cc (json::object::set): Fix comment. Add assertions.
9835 (json::array::append): Move here from json.h. Add comment and an
9836 assertion.
9837 (json::string::string): Likewise.
9838 * json.h (json::array::append): Move to json.cc.
9839 (json::string::string): Likewise.
9840 * optinfo-emit-json.cc
9841 (optrecord_json_writer::impl_location_to_json): Assert that we
9842 aren't attempting to write out UNKNOWN_LOCATION, or an ad-hoc
9843 wrapper around it. Expand the location once, rather than three
9844 times.
9845 (optrecord_json_writer::inlining_chain_to_json): Fix the check for
9846 UNKNOWN_LOCATION, to use LOCATION_LOCUS to look through ad-hoc
9847 wrappers.
9848 (optrecord_json_writer::optinfo_to_json): Likewise, in four
9849 places. Fix some overlong lines.
9850
9851 2018-07-24 Matthew Malcomson <matthew.malcomson@arm.com>
9852
9853 * config/aarch64/aarch64-simd.md
9854 (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>): Split into...
9855 (aarch64_<ANY_EXTEND:su>subw<mode>): ... This...
9856 (aarch64_<ANY_EXTEND:su>addw<mode>): ... And this.
9857 (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>_internal): Split into...
9858 (aarch64_<ANY_EXTEND:su>subw<mode>_internal): ... This...
9859 (aarch64_<ANY_EXTEND:su>addw<mode>_internal): ... And this.
9860 (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w2<mode>_internal): Split into...
9861 (aarch64_<ANY_EXTEND:su>subw2<mode>_internal): ... This...
9862 (aarch64_<ANY_EXTEND:su>addw2<mode>_internal): ... And this.
9863
9864 2018-07-24 Jakub Jelinek <jakub@redhat.com>
9865
9866 PR middle-end/86627
9867 * expmed.c (expand_divmod): Punt if d == HOST_WIDE_INT_MIN
9868 and size > HOST_BITS_PER_WIDE_INT. For size > HOST_BITS_PER_WIDE_INT
9869 and abs_d == d, do the power of two handling if profitable.
9870
9871 2018-07-24 Richard Biener <rguenther@suse.de>
9872
9873 * match.pd: Add BIT_FIELD_REF canonicalizations.
9874
9875 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
9876
9877 PR c/86617
9878 * genmatch.c (dt_operand::gen_match_op): Avoid folding volatile values.
9879
9880 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
9881
9882 * gimple-fold.c (gimple_fold_builtin_printf): Don't create a not NUL
9883 terminated STRING_CST object.
9884
9885 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
9886
9887 hsa-dump.c (dump_hsa_symbol): Avoid out of scope access to buf.
9888
9889 2018-07-23 Segher Boessenkool <segher@kernel.crashing.org>
9890
9891 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Adjust.
9892 * config/rs6000/rs6000-protos.h (rs6000_split_v4si_init): Delete.
9893 * config/rs6000/rs6000.c (rs6000_expand_vector_init): Always force
9894 the elements into a register.
9895 (rs6000_split_v4si_init_di_reg): Delete.
9896 (rs6000_split_v4si_init): Delete.
9897 * config/rs6000/vsx.md (unspec): Delete UNSPEC_VSX_VEC_INIT.
9898 (vsx_init_v4si): Rewrite as a define_expand.
9899
9900 2018-07-23 Segher Boessenkool <segher@kernel.crashing.org>
9901
9902 * config/rs6000/rs6000.md (splitters for rldimi and rlwimi with the
9903 zero_extend argument from memory): New.
9904
9905 2018-07-22 Martin Sebor <msebor@redhat.com>
9906
9907 PR bootstrap/86621
9908 * gimple-ssa-warn-alloca.c (alloca_call_type_by_arg): Avoid
9909 diagnosing calls with unknown arguments unless -Walloca-larger-than
9910 is restricted to less than PTRDIFF_MAX bytes.
9911
9912 2018-07-22 Gerald Pfeifer <gerald@pfeifer.com>
9913
9914 * doc/gcov.texi (Invoking Gcov): Editorial changes.
9915
9916 2018-07-20 David Malcolm <dmalcolm@redhat.com>
9917
9918 * pretty-print.c (text_info::set_location): Remove redundant
9919 "line_table" parameter from call to rich_location::set_range.
9920
9921 2018-07-20 Martin Sebor <msebor@redhat.com>
9922
9923 PR middle-end/82063
9924 * builtins.c (expand_builtin_alloca): Adjust.
9925 * calls.c (alloc_max_size): Simplify.
9926 * cgraphunit.c (cgraph_node::expand): Adjust.
9927 * common.opt (larger_than_size, warn_frame_larger_than): Remove
9928 variables.
9929 (frame_larger_than_size): Same.
9930 (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Change options
9931 to take a HOST_WIDE_INT argument and accept a byte-size suffix.
9932 Initialize.
9933 * doc/invoke.texi (GCC Command Options): Document option arguments.
9934 Explain byte-size arguments and suffixes.
9935 (-Wvla-larger-than, -Wno-alloc-size-larger-than): Update.
9936 (-Wno-alloca-larger-than, -Wno-vla-larger-than): Same.
9937 (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Same.
9938 * doc/options.texi (UInteger): Expand.
9939 (Host_Wide_Int, ByteSize): Document new properties.
9940 * final.c (final_start_function_1): Include sizes in an error message.
9941 * function.c (frame_offset_overflow): Same.
9942 * gimple-ssa-warn-alloca.c (pass_walloca::gate): Adjust.
9943 (alloca_call_type_by_arg): Change function argument to HOST_WIDE_INT.
9944 Diagnose unbounded alloca calls only for limits of less than
9945 PTRDIFF_MAX.
9946 (alloca_call_type): Adjust. Diagnose possibly out-of-bounds alloca
9947 calls and VLA size only for limits of less than PTRDIFF_MAX. Same
9948 for alloca(0).
9949 (pass_walloca::execute): Adjust. Diagnose alloca calls in loops
9950 only for limits of less than PTRDIFF_MAX.
9951 * langhooks-def.h (lhd_handle_option): Change function argument
9952 to HOST_WIDE_INT.
9953 * langhooks.c (lhd_handle_option): Same.
9954 * langhooks.h (handle_option): Same.
9955 * opt-functions.awk (switch_bit_fields): Handle Host_Wide_Int and
9956 ByteSize flags.
9957 (var_type, var_type_struct): Same.
9958 (var_set): Handle ByteSize flag.
9959 * optc-gen.awk: Add comments to output to ease debugging. Make
9960 use of HOST_WIDE_INT where appropriate.
9961 * opts-gen-save.awk: Use %lx to format unsigned long.
9962 * opth-gen.awk: Change function argument to HOST_WIDE_INT.
9963 * opts-common.c (integral_argument): Return HOST_WIDE_INT and add
9964 arguments. Parse bytes-size suffixes.
9965 (enum_arg_to_value): Change function argument to HOST_WIDE_INT.
9966 (enum_value_to_arg): Same.
9967 (decode_cmdline_option): Handle cl_host_wide_int. Adjust.
9968 (handle_option): Adjust.
9969 (generate_option): Change function argument to HOST_WIDE_INT.
9970 (cmdline_handle_error): Adjust.
9971 (read_cmdline_option): Change function argument to HOST_WIDE_INT.
9972 (set_option): Change function argument to HOST_WIDE_INT.
9973 (option_enabled): Handle cl_host_wide_int.
9974 (get_option_state): Handle CLVC_SIZE.
9975 (control_warning_option): Same.
9976 * opts.c (common_handle_option): Change function argument to
9977 HOST_WIDE_INT. Remove handling of OPT_Walloca_larger_than_ and
9978 OPT_Wvla_larger_than_.
9979 * opts.h (enum cl_var_type): Add an enumerator.
9980 * stor-layout.c (layout_decl): Print a more meaningful warning.
9981 * toplev.c (output_stack_usage): Adjust.
9982
9983 2018-07-20 Qing Zhao <qing.zhao@oracle.com>
9984
9985 * builtins.c (expand_builtin_memcmp): Delete the last parameter for
9986 call to inline_expand_builtin_string_cmp.
9987 (expand_builtin_strcmp): Likewise.
9988 (expand_builtin_strncmp): Likewise.
9989 (inline_string_cmp): Delete the last parameter, change char_type_node
9990 to unsigned_char_type_node for strcmp/strncmp, add conversions to the
9991 two operands.
9992 (inline_expand_builtin_string_cmp): Delete the last parameter, give up
9993 the inlining expansion on target where the type of the call has same or
9994 narrower precision than unsigned char.
9995
9996 2018-07-20 David Malcolm <dmalcolm@redhat.com>
9997
9998 * Makefile.in (OBJS): Add json.o and optinfo-emit-json.o.
9999 (CFLAGS-optinfo-emit-json.o): Define TARGET_NAME.
10000 * common.opt (fsave-optimization-record): New option.
10001 * coretypes.h (struct kv_pair): Move here from dumpfile.c.
10002 * doc/invoke.texi (-fsave-optimization-record): New option.
10003 * dumpfile.c: Include "optinfo-emit-json.h".
10004 (struct kv_pair): Move to coretypes.h.
10005 (optgroup_options): Make non-static.
10006 (dump_context::end_scope): Call
10007 optimization_records_maybe_pop_dump_scope.
10008 * dumpfile.h (optgroup_options): New decl.
10009 * json.cc: New file.
10010 * json.h: New file.
10011 * optinfo-emit-json.cc: New file.
10012 * optinfo-emit-json.h: New file.
10013 * optinfo.cc: Include "optinfo-emit-json.h".
10014 (optinfo::emit): Call optimization_records_maybe_record_optinfo.
10015 (optinfo_enabled_p): Check optimization_records_enabled_p.
10016 (optinfo_wants_inlining_info_p): Likewise.
10017 * optinfo.h: Update comment.
10018 * profile-count.c (profile_quality_as_string): New function.
10019 * profile-count.h (profile_quality_as_string): New decl.
10020 (profile_count::quality): New accessor.
10021 * selftest-run-tests.c (selftest::run_tests): Call json_cc_tests
10022 and optinfo_emit_json_cc_tests.
10023 * selftest.h (selftest::json_cc_tests): New decl.
10024 (selftest::optinfo_emit_json_cc_tests): New decl.
10025 * toplev.c: Include "optinfo-emit-json.h".
10026 (compile_file): Call optimization_records_finish.
10027 (do_compile): Call optimization_records_start.
10028 * tree-ssa-live.c: Include optinfo.h.
10029 (remove_unused_scope_block_p): Retain inlining information if
10030 optinfo_wants_inlining_info_p returns true.
10031
10032 2018-07-20 Richard Biener <rguenther@suse.de>
10033
10034 PR debug/86585
10035 * dwarf2out.c (dwarf2out_die_ref_for_decl): Test in_lto_p
10036 to cover -flto-partition=none.
10037
10038 2018-07-20 Martin Liska <mliska@suse.cz>
10039
10040 * tree.h (DECL_LOCATION_RANGE): Remove unused macro.
10041 (get_decl_source_range): Remove unused function.
10042
10043 2018-07-20 Richard Biener <rguenther@suse.de>
10044
10045 * tree-ssa-sccvn.h (struct vn_nary_op_s): Add next member.
10046 (struct vn_phi_s): Likewise.
10047 (struct vn_reference_s): Likewise.
10048 * tree-ssa-sccvn.c (vn_nary_op_hasher::equal): Add shortcut
10049 for searching the slot of an entry known to be in the hash itself.
10050 (vn_phi_hasher::equal): Likewise.
10051 (vn_reference_hasher::equal): Likewise.
10052 (last_inserted_ref, last_inserted_phi, last_inserted_nary): New
10053 globals.
10054 (optimistic_info, current_info): Remove, keeping only valid_info.
10055 (vn_reference_lookup_1): Remove fallback lookup.
10056 (vn_reference_lookup_2): Likewise.
10057 (vn_nary_op_lookup_1): Likewise.
10058 (vn_phi_lookup): Likewise.
10059 (vn_nary_build_or_lookup_1): Make sure to not chain the built
10060 hash element.
10061 (vn_reference_insert): Adjust, chain the inserted hash element
10062 at last_inserted_ref.
10063 (vn_reference_insert_pieces): Likewise.
10064 (visit_reference_op_call): Likewise.
10065 (vn_nary_op_insert_into): Chain the inserted hash element at
10066 last_inserted_nary.
10067 (vn_nary_op_insert_pieces): Adjust.
10068 (vn_nary_op_insert): Likewise.
10069 (vn_nary_op_insert_stmt): Likewise.
10070 (vn_phi_insert): Adjust, chain the inserted hash element at
10071 last_inserted_phi.
10072 (process_scc): Remove clearing and copying the optimistic
10073 table. Instead remove elements inserted during an optimistic
10074 iteration from the single table we maintain.
10075 (init_scc_vn): Adjust.
10076 (free_scc_vn): Likewise.
10077 (sccvn_dom_walker::record_cond): Likewise.
10078 (sccvn_dom_walker::after_dom_children): Likewise.
10079
10080 2018-07-19 Martin Sebor <msebor@redhat.com>
10081
10082 PR tree-optimization/84047
10083 PR tree-optimization/83776
10084 * tree-vrp.c (vrp_prop::check_mem_ref): New function.
10085 (check_array_bounds): Call it.
10086
10087 2018-07-19 Martin Sebor <msebor@redhat.com>
10088
10089 * align.h (align_flags): Use member initialization.
10090
10091 2018-07-19 David Malcolm <dmalcolm@redhat.com>
10092
10093 * Makefile.in (OBJS): Add optinfo.o.
10094 * coretypes.h (class symtab_node): New forward decl.
10095 (struct cgraph_node): New forward decl.
10096 (class varpool_node): New forward decl.
10097 * dump-context.h: New file.
10098 * dumpfile.c: Include "optinfo.h", "dump-context.h", "cgraph.h",
10099 "tree-pass.h".
10100 (refresh_dumps_are_enabled): Use optinfo_enabled_p.
10101 (set_dump_file): Call dumpfile_ensure_any_optinfo_are_flushed.
10102 (set_alt_dump_file): Likewise.
10103 (dump_context::~dump_context): New dtor.
10104 (dump_gimple_stmt): Move implementation to...
10105 (dump_context::dump_gimple_stmt): ...this new member function.
10106 Add the stmt to any pending optinfo, creating one if need be.
10107 (dump_gimple_stmt_loc): Move implementation to...
10108 (dump_context::dump_gimple_stmt_loc): ...this new member function.
10109 Start a new optinfo and add the stmt to it.
10110 (dump_gimple_expr): Move implementation to...
10111 (dump_context::dump_gimple_expr): ...this new member function.
10112 Add the stmt to any pending optinfo, creating one if need be.
10113 (dump_gimple_expr_loc): Move implementation to...
10114 (dump_context::dump_gimple_expr_loc): ...this new member function.
10115 Start a new optinfo and add the stmt to it.
10116 (dump_generic_expr): Move implementation to...
10117 (dump_context::dump_generic_expr): ...this new member function.
10118 Add the tree to any pending optinfo, creating one if need be.
10119 (dump_generic_expr_loc): Move implementation to...
10120 (dump_context::dump_generic_expr_loc): ...this new member
10121 function. Add the tree to any pending optinfo, creating one if
10122 need be.
10123 (dump_printf): Move implementation to...
10124 (dump_context::dump_printf_va): ...this new member function. Add
10125 the text to any pending optinfo, creating one if need be.
10126 (dump_printf_loc): Move implementation to...
10127 (dump_context::dump_printf_loc_va): ...this new member function.
10128 Start a new optinfo and add the stmt to it.
10129 (dump_dec): Move implementation to...
10130 (dump_context::dump_dec): ...this new member function. Add the
10131 value to any pending optinfo, creating one if need be.
10132 (dump_context::dump_symtab_node): New member function.
10133 (dump_context::get_scope_depth): New member function.
10134 (dump_context::begin_scope): New member function.
10135 (dump_context::end_scope): New member function.
10136 (dump_context::ensure_pending_optinfo): New member function.
10137 (dump_context::begin_next_optinfo): New member function.
10138 (dump_context::end_any_optinfo): New member function.
10139 (dump_context::s_current): New global.
10140 (dump_context::s_default): New global.
10141 (dump_scope_depth): Delete global.
10142 (dumpfile_ensure_any_optinfo_are_flushed): New function.
10143 (dump_symtab_node): New function.
10144 (get_dump_scope_depth): Reimplement in terms of dump_context.
10145 (dump_begin_scope): Likewise.
10146 (dump_end_scope): Likewise.
10147 (selftest::temp_dump_context::temp_dump_context): New ctor.
10148 (selftest::temp_dump_context::~temp_dump_context): New dtor.
10149 (selftest::verify_item): New function.
10150 (ASSERT_IS_TEXT): New macro.
10151 (ASSERT_IS_TREE): New macro.
10152 (ASSERT_IS_GIMPLE): New macro.
10153 (selftest::test_capture_of_dump_calls): New test.
10154 (selftest::dumpfile_c_tests): Call it.
10155 * dumpfile.h (dump_printf, dump_printf_loc, dump_basic_block)
10156 (dump_generic_expr_loc, dump_generic_expr, dump_gimple_stmt_loc)
10157 (dump_gimple_stmt, dump_dec): Gather these related decls and add a
10158 descriptive comment.
10159 (dump_function, print_combine_total_stats, enable_rtl_dump_file)
10160 (dump_node, dump_bb): Move these unrelated decls.
10161 (class dump_manager): Add leading comment.
10162 * optinfo.cc: New file.
10163 * optinfo.h: New file.
10164
10165 2018-07-19 Michael Collison <michael.collison@arm.com>
10166 Richard Henderson <rth@redhat.com>
10167
10168 * config/aarch64/aarch64.md (subv<GPI>4, usubv<GPI>4): New patterns.
10169 (subti): Handle op1 zero.
10170 (subvti4, usub4ti4): New.
10171 (*sub<GPI>3_compare1_imm): New.
10172 (sub<GPI>3_carryinCV): New.
10173 (*sub<GPI>3_carryinCV_z1_z2, *sub<GPI>3_carryinCV_z1): New.
10174 (*sub<GPI>3_carryinCV_z2, *sub<GPI>3_carryinCV): New.
10175
10176 2018-07-19 Michael Collison <michael.collison@arm.com>
10177 Richard Henderson <rth@redhat.com>
10178
10179 * config/aarch64/aarch64.md: (addv<GPI>4, uaddv<GPI>4): New.
10180 (addti3): Create simpler code if low part is already known to be 0.
10181 (addvti4, uaddvti4): New.
10182 (*add<GPI>3_compareC_cconly_imm): New.
10183 (*add<GPI>3_compareC_cconly): New.
10184 (*add<GPI>3_compareC_imm): New.
10185 (*add<GPI>3_compareC): Rename from add<GPI>3_compare1; do not
10186 handle constants within this pattern..
10187 (*add<GPI>3_compareV_cconly_imm): New.
10188 (*add<GPI>3_compareV_cconly): New.
10189 (*add<GPI>3_compareV_imm): New.
10190 (add<GPI>3_compareV): New.
10191 (add<GPI>3_carryinC, add<GPI>3_carryinV): New.
10192 (*add<GPI>3_carryinC_zero, *add<GPI>3_carryinV_zero): New.
10193 (*add<GPI>3_carryinC, *add<GPI>3_carryinV): New.
10194 ((*add<GPI>3_compareC_cconly_imm): Replace 'ne' operator
10195 with 'comparison' operator.
10196 (*add<GPI>3_compareV_cconly_imm): Ditto.
10197 (*add<GPI>3_compareV_cconly): Ditto.
10198 (*add<GPI>3_compareV_imm): Ditto.
10199 (add<GPI>3_compareV): Ditto.
10200 (add<mode>3_carryinC): Ditto.
10201 (*add<mode>3_carryinC_zero): Ditto.
10202 (*add<mode>3_carryinC): Ditto.
10203 (add<mode>3_carryinV): Ditto.
10204 (*add<mode>3_carryinV_zero): Ditto.
10205 (*add<mode>3_carryinV): Ditto.
10206
10207 2018-07-19 Michael Collison <michael.collison@arm.com>
10208 Richard Henderson <rth@redhat.com>
10209
10210 * config/aarch64/aarch64-modes.def (CC_V): New.
10211 * config/aarch64/aarch64-protos.h
10212 (aarch64_addti_scratch_regs): Declare
10213 (aarch64_subvti_scratch_regs): Declare.
10214 (aarch64_expand_subvti): Declare.
10215 (aarch64_gen_unlikely_cbranch): Declare
10216 * config/aarch64/aarch64.c (aarch64_select_cc_mode): Test
10217 for signed overflow using CC_Vmode.
10218 (aarch64_get_condition_code_1): Handle CC_Vmode.
10219 (aarch64_gen_unlikely_cbranch): New function.
10220 (aarch64_addti_scratch_regs): New function.
10221 (aarch64_subvti_scratch_regs): New function.
10222 (aarch64_expand_subvti): New function.
10223
10224 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
10225
10226 * config/aarch64/aarch64-option-extensions.def: New entry for profile
10227 extension.
10228 * config/aarch64/aarch64.h (AARCH64_FL_PROFILE): New.
10229 * doc/invoke.texi (aarch64-feature-modifiers): New entry for profile
10230 extension.
10231
10232 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
10233
10234 PR target/83009
10235 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
10236 address check not strict.
10237
10238 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
10239
10240 * config/aarch64/aarch64-simd.md (aarch64_simd_mov<VQ:mode>): Replace
10241 Umq with Umn.
10242 (store_pair_lanes<mode>): Likewise.
10243 * config/aarch64/aarch64-protos.h (aarch64_addr_query_type): Add new
10244 enum value 'ADDR_QUERY_LDP_STP_N'.
10245 * config/aarch64/aarch64.c (aarch64_addr_query_type): Likewise.
10246 (aarch64_print_address_internal): Add declaration.
10247 (aarch64_print_ldpstp_address): Remove.
10248 (aarch64_classify_address): Adapt mode for 'ADDR_QUERY_LDP_STP_N'.
10249 (aarch64_print_operand): Change printing of 'y'.
10250 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Use
10251 new enum value 'ADDR_QUERY_LDP_STP_N', don't hardcode mode and use
10252 'true' rather than '1'.
10253 * config/aarch64/constraints.md (Uml): Likewise.
10254 (Uml): Rename to Umn.
10255 (Umq): Remove.
10256
10257 2018-07-19 Richard Biener <rguenther@suse.de>
10258
10259 * tree-ssa-sccvn.h (struct vn_phi_s): Make phiargs member
10260 a trailing array.
10261 * tree-ssa-sccvn.c: Remove alloc-pool.h use.
10262 (vn_phi_hasher): Derive from nofree_ptr_hash and remove remove method.
10263 (vn_reference_hasher): Likewise.
10264 (struct vn_tables_s): Remove obstack and alloc-pool members.
10265 (vn_tables_obstack, vn_tables_insert_obstack): New global obstacks.
10266 (vn_nary_build_or_lookup_1): Manually build in vn_tables_insert_obstack.
10267 (vn_reference_insert): Allocate from obstack instead of from alloc-pool.
10268 (vn_reference_insert_pieces): Likewise.
10269 (alloc_vn_nary_op_noinit): Adjust.
10270 (vn_nary_op_insert_stmt): Allocate phiargs in-place.
10271 (vn_phi_eq): Adjust.
10272 (shared_lookup_phiargs): Remove.
10273 (vn_phi_lookup): Allocate temporary vn_phi_s on the stack.
10274 (vn_phi_insert): Allocate from obstack instead of from alloc-pool.
10275 (visit_reference_op_call): Likewise.
10276 (copy_nary, copy_phi, copy_reference): Remove.
10277 (process_scc): Rewind the obstack when iterating. Do not
10278 copy the elements to valid_info but just move them from one
10279 hashtable to the other.
10280 (allocate_vn_table): Adjust.
10281 (free_vn_table): Likewise.
10282 (init_scc_vn): Likewise.
10283 (free_scc_vn): Likewise.
10284
10285 2018-07-19 H.J. Lu <hongjiu.lu@intel.com>
10286
10287 PR target/86560
10288 * config/i386/i386.c (rest_of_insert_endbranch): Lookup
10289 indirect_return as function type attribute.
10290 (ix86_attribute_table): Change indirect_return to function
10291 type attribute.
10292 * doc/extend.texi: Update indirect_return attribute.
10293
10294 2018-07-19 Aldy Hernandez <aldyh@redhat.com>
10295
10296 * wide-int.h (widest2_int): New.
10297 * gimple-fold.c (arith_overflowed_p): Use it.
10298 * tree.h (widest2_int_cst): New.
10299 * tree-vrp.c (wide_int_binop_overflow): Rename from
10300 vrp_int_const_binop.
10301 Rewrite to work on trees.
10302 (extract_range_from_multiplicative_op_1): Abstract code to...
10303 (wide_int_range_min_max): ...here.
10304 (wide_int_range_cross_product): ...and here.
10305 (extract_range_from_binary_expr_1): Abstract overflow code to...
10306 (wide_int_range_mult_wrapping): ...here.
10307 * tree-vrp.h (wide_int_range_cross_product): New.
10308 (wide_int_range_mult_wrapping): New.
10309
10310 2018-07-19 Andrew Senkevich <andrew.senkevich@intel.com>
10311 Julia Koval <julia.koval@intel.com>
10312
10313 * config/i386/x86-tune-costs.h (skylake_memcpy,
10314 skylake_memset): Replace rep_prefix with unrolling for size 512.
10315
10316 2018-07-18 Kugan Vivekanandarajah <kuganv@linaro.org>
10317
10318 PR middle-end/86544
10319 * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): Handle
10320 comparision with EQ_EXPR in last stmt.
10321
10322 2018-07-18 Kelvin Nilsen <kelvin@gcc.gnu.org>
10323
10324 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Rename
10325 this subsection to "PowerPC AltiVec/VSX Built-in Functions".
10326 (PowerPC AltiVec/VSX Built-in Functions): New name for subsection
10327 previously known as "PowerPC AltiVec Built-in Functions". Move
10328 some material to new subsubsections "PowerPC AltiVec Built-in
10329 Functions on ISA 2.06" and "PowerPC AltiVec Built-in Functions on
10330 ISA 2.07".
10331 (PowerPC Altivec Built-in Functions on ISA 2.05): New subsubsection.
10332 (PowerPC Altivec Built-in Functions on ISA 2.06): Likewise.
10333 (PowerPC Altivec Built-in Functions on ISA 2.07): Likewise.
10334 (PowerPC Altivec Built-in Functions on ISA 3.0): Likewise.
10335
10336 2018-07-18 Richard Biener <rguenther@suse.de>
10337
10338 PR tree-optimization/86557
10339 * tree-vect-patterns.c (vect_recog_divmod_pattern): Also handle
10340 EXACT_DIV_EXPR.
10341
10342 2018-07-18 Ilya Leoshkevich <iii@linux.ibm.com>
10343
10344 * config/s390/s390.c (s390_function_profiler): Generate CFI.
10345
10346 2018-07-17 Jeff Law <law@redhat.com>
10347
10348 * config/arm/arm.c (get_label_padding): Update for recent
10349 changes to label_to_alignment.
10350
10351 PR tree-optimization/86010
10352 * tree-ssa-dse.c (compute_trims): Fix typo/thinko.
10353
10354 * config/mips/mips.c (vr4130_align_insns): Update for recent
10355 changes to label_to_alignment.
10356
10357 * config/frv/frv.c (frv_label_align): Update for recent changes
10358 to label_to_alignment.
10359
10360 * config/nios2/nios2.c (nios2_label_align): Update for recent
10361 changes which dropped ALIGN_LABELS_LOG.
10362
10363 2018-07-17 Andreas Schwab <schwab@linux-m68k.org>
10364
10365 * config/m68k/m68k.md (umulsi3_highpart+1, const_umulsi3_highpart)
10366 (smulsi3_highpart+1, const_smulsi3_highpart): Add CC_STATUS_INIT.
10367
10368 2018-07-17 Claudiu Zissulescu <claziss@synopsys.com>
10369
10370 * config/arc/arc.c (arc_label_align): Use align_labels instead of
10371 deprecated align_labels_log.
10372
10373 2018-07-17 Richard Biener <rguenther@suse.de>
10374
10375 PR lto/86456
10376 * dwarf2out.c (init_sections_and_labels): Always generate
10377 a debug_line_str_section for early LTO debug.
10378 (dwarf2out_finish): Reset debug_line_str_hash output early.
10379 Bump counter for extra dwarf5 .debug_loc labels to not conflict
10380 with fat LTO part.
10381 (dwarf2out_early_finish): Output debug_line_str.
10382
10383 2018-07-17 Robin Dapp <rdapp@linux.ibm.com>
10384
10385 * config/s390/s390.c (preferred_la_operand_p): Do not use LA with
10386 index register on z196 or later.
10387
10388 2018-07-17 Robin Dapp <rdapp@linux.ibm.com>
10389
10390 * config/s390/s390.c (s390_default_align): Set default function
10391 alignment to 16.
10392 (s390_override_options_after_change): Call s390_default align.
10393 (s390_option_override_internal): Call s390_default_align.
10394 (TARGET_OVERRIDE_OPTIONS_AFTER_CHANGE): Define.
10395
10396 2018-07-17 Jakub Jelinek <jakub@redhat.com>
10397
10398 PR middle-end/86542
10399 * omp-low.c (create_task_copyfn): Copy over also fields corresponding
10400 to _looptemp_ clauses, other than the first two.
10401
10402 2018-07-17 Martin Liska <mliska@suse.cz>
10403
10404 * opts.c: Do not enable OPT_falign_* for -Os.
10405
10406 2018-07-17 Martin Liska <mliska@suse.cz>
10407
10408 * align.h (MAX_CODE_ALIGN): New.
10409 (MAX_CODE_ALIGN_VALUE): New.
10410 * common/config/i386/i386-common.c (ix86_handle_option):
10411 (MAX_CODE_ALIGN): Moved to align.h.
10412 * final.c (MAX_CODE_ALIGN): Likewise.
10413 * opts.c (parse_and_check_align_values):
10414 (MAX_CODE_ALIGN): Likewise.
10415 (MAX_CODE_ALIGN_VALUE): Likewise.
10416
10417 2018-07-17 Martin Liska <mliska@suse.cz>
10418
10419 * config/i386/att.h (ASM_OUTPUT_ALIGN): Fix spacing
10420 in order to fulfil coding style.
10421 * config/i386/cygming.h (ASM_OUTPUT_ALIGN): Likewise.
10422 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
10423 * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
10424 * config/iq2000/iq2000.h (ASM_OUTPUT_ALIGN): Likewise.
10425 * config/pa/pa.h (ASM_OUTPUT_ALIGN): Likewise.
10426 * config/sparc/sol2.h (ASM_OUTPUT_ALIGN_WITH_NOP): Likewise.
10427 * config/sparc/sparc.h (ASM_OUTPUT_ALIGN): Likewise.
10428 * config/visium/visium.h (ASM_OUTPUT_ALIGN): Likewise.
10429 (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
10430
10431 2018-07-17 Martin Liska <mliska@suse.cz>
10432
10433 * align.h: New file.
10434 * config/alpha/alpha.c (alpha_align_insns_1): Use align_functions
10435 directly.
10436 * config/i386/i386.c (ix86_avoid_jump_mispredicts): Use new return type
10437 align_flags of label_to_alignment.
10438 * config/m32r/m32r.h (LOOP_ALIGN): Wrap returned values into
10439 align_flags class.
10440 * config/m68k/m68k.c: Do not use removed align_labels_value and
10441 align_loops_value.
10442 * config/nds32/nds32.h (JUMP_ALIGN): Wrap result into align_flags class.
10443 (LOOP_ALIGN): Likewise.
10444 (LABEL_ALIGN): Likewise.
10445 * config/powerpcspe/powerpcspe.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
10446 Remove not used macro.
10447 (rs6000_loop_align): Change return type to align_flags.
10448 (rs6000_loop_align_max_skip): Remove.
10449 * config/rs6000/rs6000-protos.h (rs6000_loop_align):
10450 Change return type to align_flags.
10451 * config/rs6000/rs6000.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
10452 Remove not used macro.
10453 (rs6000_loop_align): Change return type to align_flags.
10454 (rs6000_loop_align_max_skip): Remove.
10455 * config/rx/rx.h (JUMP_ALIGN): Wrap integer values
10456 * config/rx/rx-protos.h (rx_align_for_label): Make it
10457 static function.
10458 * config/rx/rx.c (rx_align_for_label): Change return type
10459 to align_flags.
10460 (rx_max_skip_for_label): Remove TARGET_ASM_*_ALIGN_MAX_SKIP
10461 macro definitions.
10462 into align_flags class.
10463 (LABEL_ALIGN): Likewise.
10464 (LOOP_ALIGN): Likewise.
10465 * config/s390/s390.c (s390_label_align): Use align_flags
10466 class member.
10467 (s390_asm_output_function_label): Likewise.
10468 * config/sh/sh.c (sh_override_options_after_change):
10469 Use align_flags class directly without macros.
10470 (find_barrier): Likewise.
10471 (barrier_align): Likewise.
10472 (sh_loop_align): Likewise.
10473 * config/spu/spu.c (spu_option_override):
10474 Use align_flags_tuple::get_value instead of removed macros.
10475 (spu_sched_init): Likewise.
10476 * config/spu/spu.h (GTY): Likewise.
10477 * config/visium/visium.c (visium_option_override):
10478 Set "8" as default secondary alignment.
10479 * config/visium/visium.h (SUBALIGN_LOG): Define to 3
10480 in order to guarantee secondary alignment of 8.
10481 * coretypes.h: Include align.h header file.
10482 * doc/tm.texi: Remove TARGET_ASM_JUMP_ALIGN_MAX_SKIP,
10483 TARGET_ASM_LOOP_ALIGN_MAX_SKIP, TARGET_ASM_LABEL_ALIGN_MAX_SKIP
10484 and TARGET_ASM_LABEL_ALIGN_AFTER_BARRIER_MAX_SKIP macros.
10485 * doc/tm.texi.in: Likewise.
10486 * final.c (struct label_alignment): Remove not used structure.
10487 (LABEL_ALIGN): Change type to align_flags.
10488 (LOOP_ALIGN): Likewise.
10489 (JUMP_ALIGN): Likewise.
10490 (default_loop_align_max_skip): Remove.
10491 (default_label_align_max_skip): Likewise.
10492 (default_jump_align_max_skip): Likewise.
10493 (default_label_align_after_barrier_max_skip):
10494 (LABEL_TO_ALIGNMENT): Change to access label_align vector.
10495 (LABEL_TO_MAX_SKIP): Remove.
10496 (label_to_alignment): Return align_flags type instead of integer.
10497 (label_to_max_skip): Remove.
10498 (align_fuzz): Use align_flags type.
10499 (compute_alignments): Use align_flags type and use align_flags::max
10500 to combine multiple alignments.
10501 (grow_label_align): Grow vec instead of C array.
10502 (update_alignments): Assign just LABEL_TO_ALIGNMENT.
10503 (shorten_branches): Use align_flags type and use align_flags::max
10504 to combine multiple alignments.
10505 (final_scan_insn_1): Remove usage of secondary alignment that comes
10506 from label alignment, but instead use proper secondary alignment
10507 which is computed in grow_label_align.
10508 * flags.h (struct align_flags_tuple): Move to align.h.
10509 (struct align_flags): Likewise.
10510 (state_align_loops): Rename to align_loops.
10511 (state_align_jumps): Rename to align_jumps.
10512 (state_align_labels): Rename to align_labels.
10513 (state_align_functions): Rename to align_functions.
10514 (align_loops_log): Remove.
10515 (align_jumps_log): Remove.
10516 (align_labels_log): Remove.
10517 (align_functions_log): Remove.
10518 (align_loops_max_skip): Remove.
10519 (align_jumps_max_skip): Remove.
10520 (align_labels_max_skip): Remove.
10521 (align_functions_max_skip): Remove.
10522 (align_loops_value): Remove.
10523 (align_jumps_value): Remove.
10524 (align_labels_value): Remove.
10525 (align_functions_value): Remove.
10526 * output.h (label_to_alignment): Change return type to align_flags.
10527 (label_to_max_skip): Remove.
10528 * target.def: Remove loop_align_max_skip, label_align_max_skip,
10529 jump_align_max_skip macros.
10530 * targhooks.h (default_loop_align_max_skip): Remove.
10531 (default_label_align_max_skip): Likewise.
10532 (default_jump_align_max_skip): Likewise.
10533 (default_label_align_after_barrier_max_skip): Remove.
10534 * toplev.c (read_log_maxskip): Use ::normalize function.
10535 (parse_N_M): Remove not used argument and also call ::normalize.
10536 (parse_alignment_opts): Do not pass unused arguments.
10537 * varasm.c (assemble_start_function): Use directly align_functions
10538 instead of removed macros.
10539 * system.h: Do not poison removed macros.
10540
10541 2018-07-17 Jakub Jelinek <jakub@redhat.com>
10542
10543 PR middle-end/86539
10544 * gimplify.c (gimplify_omp_for): Ensure taskloop firstprivatized init
10545 and cond temporaries don't have reference type if iterator has
10546 pointer type. For init use &for_pre_body instead of pre_p if
10547 for_pre_body is non-empty.
10548
10549 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
10550
10551 * config/rs6000/rs6000.md (trunc<mode>sf2): Expand truncates of
10552 double-double modes to SFmode directly directly.
10553 (trunc<mode>sf2_fprs): Delete.
10554
10555 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
10556
10557 * config/rs6000/rs6000.c (init_float128_ibm): Use the correct names
10558 for conversions between IFmode and the decimal floating point modes.
10559 (init_float128_ieee): Use the correct names for conversions between
10560 KFmode and the decimal floating point modes.
10561
10562 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
10563
10564 * config/rs6000/rs6000.c (init_float128_ibm): Use more correct names
10565 for the conversions between TDmode and IFmode.
10566 (init_float128_ieee): Use more correct names for the conversions
10567 between TDmode and KFmode.
10568
10569 2018-07-16 Jakub Jelinek <jakub@redhat.com>
10570
10571 PR tree-optimization/86526
10572 * builtins.c (expand_builtin_memcmp): Formatting fixes.
10573 (inline_expand_builtin_string_cmp): Likewise.
10574 (inline_string_cmp): Likewise. Use c_readstr instead of
10575 builtin_memcpy_read_str. Add unit_mode temporary.
10576
10577 2018-07-16 Bernd Edlinger <bernd.edlinger@hotmail.de>
10578
10579 PR middle-end/86528
10580 * builtins.c (check_access): Bail out if range[0] is no INTEGER_CST.
10581 * expr.c (string_constant): Fix the element size of ARRAY_TYPE.
10582
10583 2018-07-16 Kelvin Nilsen <kelvin@gcc.gnu.org>
10584
10585 * doc/extend.texi (PowerPC AltiVec Built-in Functions):
10586 Alphabetize prototypes of built-in functions, separating out
10587 built-in functions that are listed in this section but should be
10588 described elsewhere.
10589
10590 2018-07-16 Uros Bizjak <ubizjak@gmail.com>
10591
10592 PR target/86511
10593 * expmed.c (emit_store_flag): Do not emit setcc followed by a
10594 conditional move when trapping comparison was split to a
10595 non-trapping one (and vice versa).
10596
10597 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
10598
10599 * config/s390/s390.c (s390_function_profiler): Generate nops
10600 instead of profiler call sequences.
10601 * config/s390/s390.opt: Add the new option.
10602
10603 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
10604
10605 * config/s390/s390.c (s390_function_profiler): Generate
10606 __mcount_loc section.
10607 * config/s390/s390.opt: Add the new option.
10608
10609 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
10610
10611 * common.opt: Add the new warning.
10612 * config/s390/s390.c (s390_function_profiler): Emit "brasl
10613 %r0,__fentry__" when -mfentry is specified.
10614 (s390_option_override_internal): Disallow -mfentry for 31-bit
10615 CPUs.
10616 * config/s390/s390.opt: Add the new option.
10617
10618 2018-07-16 Richard Biener <rguenther@suse.de>
10619
10620 PR lto/86523
10621 * dwarf2out.c (dwarf2out_register_external_die): Assign DIE parents
10622 for function-local FUNCTION_DECL and RESULT_DECL immediately.
10623
10624 2018-07-16 Martin Liska <mliska@suse.cz>
10625
10626 PR ipa/86529
10627 * ipa-pure-const.c (malloc_candidate_p): Revert ::get
10628 to ::get_create.
10629
10630 2017-07-16 Claudiu Zissulescu <claziss@synopsys.com>
10631
10632 * config/arc/arcHS.md: Update ARCHS scheduling rules.
10633
10634 2017-07-16 Claudiu Zissulescu <claziss@synopsys.com>
10635
10636 * config/arc/arc-arch.h (arc_tune_attr): Add new tune parameters
10637 for ARCHS4x.
10638 * config/arc/arc-cpus.def (hs4x): New cpu.
10639 (hs4xd): Likewise.
10640 * config/arc/arc-tables.opt: Regenerate.
10641 * config/arc/arc.c (arc_sched_issue_rate): New function.
10642 (TARGET_SCHED_ISSUE_RATE): Define.
10643 (TARGET_SCHED_EXPOSED_PIPELINE): Likewise.
10644 * config/arc/arc.md (attr type): Add fpu_fuse, fpu_sdiv, fpu_ddiv,
10645 fpu_cvt.
10646 (attr tune): Add ARCHS4x tune values.
10647 (attr tune_dspmpy): Define.
10648 (*tst): Correct instruction type.
10649 * config/arc/arcHS.md: Don't use this automaton for ARCHS4x cpus.
10650 * config/arc/arcHS4x.md: New file.
10651 * config/arc/fpu.md: Update instruction type attributes.
10652 * config/arc/t-multilib: Regenerate.
10653
10654 2018-07-16 Tom de Vries <tdevries@suse.de>
10655
10656 PR debug/86455
10657 * var-tracking.c (vt_initialize): Fix pre_dec handling.
10658
10659 2018-07-16 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
10660
10661 * config/aarch64/atomics.md (aarch64_store_execlusive<mode>): Add
10662 early clobber.
10663
10664 2018-07-16 Eric Botcazou <ebotcazou@adacore.com>
10665
10666 PR tree-optimization/86514
10667 * tree-ssa-reassoc.c (init_range_entry) <CASE_CONVERT>: Return for a
10668 conversion to a boolean type from a type with greater precision.
10669
10670 2018-07-16 Tom de Vries <tdevries@suse.de>
10671
10672 * var-tracking.c (vt_initialize): Print adjusted insn slim if
10673 dump_flags request TDF_SLIM.
10674
10675 2018-07-16 Aldy Hernandez <aldyh@redhat.com>
10676
10677 * fold-const.c (int_const_binop_1): Abstract...
10678 (wide_int_binop): ...wide int code here.
10679 (poly_int_binop): ...poly int code here.
10680 Abstract the rest of int_const_binop_1 into int_const_binop.
10681 * fold-const.h (wide_int_binop): New.
10682 * tree-vrp.c (vrp_int_const_binop): Call wide_int_binop.
10683 Remove useless PLUS/MINUS_EXPR case.
10684 (zero_nonzero_bits_from_vr): Move wide int code...
10685 (zero_nonzero_bits_from_bounds): ...here.
10686 (extract_range_from_binary_expr_1): Move mask optimization code...
10687 (range_easy_mask_min_max): ...here.
10688 * tree-vrp.h (zero_nonzero_bits_from_bounds): New.
10689 (range_easy_mask_min_max): New.
10690
10691 2018-07-15 Jeff Law <law@redhat.com>
10692
10693 PR target/85993
10694 * config/sh/sh.c (output_mi_thunk): Remove dead conditional
10695 block.
10696
10697 2018-07-14 Jim Wilson <jimw@sifive.com>
10698
10699 * config/riscv/linux.h (TARGET_ASM_FILE_END): New.
10700
10701 2018-07-14 Paul Koning <ni1d@arrl.net>
10702
10703 * config/pdp11/pdp11.c (pdp11_rtx_costs): Bugfixes.
10704
10705 2018-07-13 Jan Hubicka <hubicka@ucw.cz>
10706
10707 * lto-streamer-out.c (copy_function_or_variable): Dump info about
10708 copying section.
10709
10710 2018-07-13 Bill Schmidt <wschmidt@linux.ibm.com>
10711 Steve Munroe <munroesj52@gmail.com>
10712
10713 * config/rs6000/emmintrin.h (_mm_and_si128): New function.
10714 (_mm_andnot_si128): Likewise.
10715 (_mm_or_si128): Likewise.
10716 (_mm_xor_si128): Likewise.
10717
10718 2018-07-13 Qing Zhao <qing.zhao@oracle.com>
10719
10720 PR middle-end/78809
10721 * builtins.c (expand_builtin_memcmp): Inline the calls first
10722 when result_eq is false.
10723 (expand_builtin_strcmp): Inline the calls first.
10724 (expand_builtin_strncmp): Likewise.
10725 (inline_string_cmp): New routine. Expand a string compare
10726 call by using a sequence of char comparison.
10727 (inline_expand_builtin_string_cmp): New routine. Inline expansion
10728 a call to str(n)cmp/memcmp.
10729 * doc/invoke.texi (--param builtin-string-cmp-inline-length):
10730 New option.
10731 * params.def (BUILTIN_STRING_CMP_INLINE_LENGTH): New.
10732
10733 2018-07-13 Richard Earnshaw <rearnsha@arm.com>
10734
10735 * config/arm/driver-arm.c: Include arm-native.h.
10736 (host_detect_local_cpu): Use auto-generated data tables.
10737 (vendors, arm_cpu_table): Delete. Move part information to ...
10738 * config/arm/arm-cpus.in: ... here.
10739 * config/arm/parsecpu.awk (gen_native): New function.
10740 (vendor, part): New CPU fields.
10741 (END): Add support for building the native CPU detection tables.
10742 * config/arm/t-arm (arm-native.h): Add build rule.
10743 (driver-arm.o): Add dependency on arm-native.h.
10744
10745 2018-07-13 Richard Biener <rguenther@suse.de>
10746
10747 PR middle-end/85974
10748 * match.pd (addr1 - addr2): Allow either of the operand to
10749 have a conversion.
10750
10751 2018-07-13 Tom de Vries <tdevries@suse.de>
10752
10753 * tree-inline.c (remap_ssa_name): Save and reuse debug exprs generated
10754 in remap_ssa_name.
10755
10756 2018-07-13 Jackson Woodruff <jackson.woodruff@arm.com>
10757
10758 * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp): Use
10759 arrays instead of numbered variables.
10760
10761 2018-07-13 Eric Botcazou <ebotcazou@adacore.com>
10762
10763 * config/sparc/sparc-protos.h (sparc_compute_frame_size): Delete.
10764 * config/sparc/sparc.c (sparc_compute_frame_size): Make static.
10765
10766 2018-07-13 Richard Biener <rguenther@suse.de>
10767
10768 PR debug/86452
10769 * dwarf2out.c (gen_type_die_with_usage): Use scope_die_for
10770 instead of get_context_die.
10771
10772 2018-07-13 Kugan Vivekanandarajah <kuganv@linaro.org>
10773 Richard Biener <rguenther@suse.de>
10774
10775 PR middle-end/86489
10776 * tree-ssa-loop-niter.c (number_of_iterations_popcount): Check
10777 that the loop latch destination where phi is defined.
10778
10779 2018-07-12 Kito Cheng <kito.cheng@gmail.com>
10780
10781 * config/riscv/riscv.c (enum riscv_privilege_levels): Add UNKNOWN_MODE.
10782 (riscv_expand_epilogue): Add assertion to check interrupt mode.
10783 (riscv_set_current_function): Extract getting interrupt type to new
10784 function.
10785 (riscv_get_interrupt_type): New function.
10786 (riscv_merge_decl_attributes): New function, checking interrupt type is
10787 same.
10788 (TARGET_MERGE_DECL_ATTRIBUTES): Define.
10789
10790 2018-07-12 Paul Koning <ni1d@arrl.net>
10791
10792 * config/pdp11/pdp11.c (pdp11_output_def): Fix typo in .set
10793 directive.
10794
10795 2018-07-12 Paul Koning <ni1d@arrl.net>
10796
10797 * doc/rtl.texi (REG_NONNEG): Remove decrement and branch until
10798 zero reference, add doloop_end instead.
10799 * doc/md.texi (decrement_and_branch_until_zero): Remove.
10800 (Looping patterns): Remove decrement_and_branch_until_zero. Add
10801 detail for doloop_end.
10802
10803 2018-07-12 Martin Sebor <msebor@redhat.com>
10804
10805 PR c/86453
10806 * attribs.c (decl_attributes): Reject conflicting attributes before
10807 calling attribute handlers.
10808
10809 2018-07-12 Jan Hubicka <hubicka@ucw.cz>
10810
10811 * dumpfile.c (gcc::dump_manager::get_dump_file_name): Add PART
10812 parameter.
10813 (gcc::dump_manager::get_dump_file_name): likewise.
10814 (dump_begin): Likewise.
10815 * dumpfile.h (dump_begin): Update prototype.
10816 (gcc::dump_manager::get_dump_file_name,
10817 gcc::dump_manager::get_dump_file_name): Update prototype.
10818
10819 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
10820
10821 * internal-fn.h (vectorizable_internal_fn_p): New function.
10822 * tree-vect-slp.c (compatible_calls_p): Likewise.
10823 (vect_build_slp_tree_1): Remove nops argument. Handle calls
10824 to internal functions.
10825 (vect_build_slp_tree_2): Update call to vect_build_slp_tree_1.
10826
10827 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
10828
10829 * fold-const.h (inverse_conditions_p): Declare.
10830 * fold-const.c (inverse_conditions_p): New function.
10831 * match.pd: Use inverse_conditions_p. Add folds of view_converts
10832 that test the inverse condition of a conditional internal function.
10833 * internal-fn.h (vectorized_internal_fn_supported_p): Declare.
10834 * internal-fn.c (internal_fn_mask_index): Handle conditional
10835 internal functions.
10836 (vectorized_internal_fn_supported_p): New function.
10837 * tree-if-conv.c: Include internal-fn.h and fold-const.h.
10838 (any_pred_load_store): Replace with...
10839 (need_to_predicate): ...this new variable.
10840 (redundant_ssa_names): New variable.
10841 (ifcvt_can_use_mask_load_store): Move initial checks to...
10842 (ifcvt_can_predicate): ...this new function. Handle tree codes
10843 for which a conditional internal function exists.
10844 (if_convertible_gimple_assign_stmt_p): Use ifcvt_can_predicate
10845 instead of ifcvt_can_use_mask_load_store. Update after variable
10846 name change.
10847 (predicate_load_or_store): New function, split out from
10848 predicate_mem_writes.
10849 (check_redundant_cond_expr): New function.
10850 (value_available_p): Likewise.
10851 (predicate_rhs_code): Likewise.
10852 (predicate_mem_writes): Rename to...
10853 (predicate_statements): ...this. Use predicate_load_or_store
10854 and predicate_rhs_code.
10855 (combine_blocks, tree_if_conversion): Update after above name changes.
10856 (ifcvt_local_dce): Handle redundant_ssa_names.
10857 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): Handle
10858 general conditional functions.
10859 * tree-vect-stmts.c (vectorizable_call): Likewise.
10860
10861 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
10862 Alan Hayward <alan.hayward@arm.com>
10863 David Sherwood <david.sherwood@arm.com>
10864
10865 * internal-fn.h (can_interpret_as_conditional_op_p): Declare.
10866 * internal-fn.c (can_interpret_as_conditional_op_p): New function.
10867 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Handle conditional
10868 plus and minus and convert them into IFN_COND_FMA-based sequences.
10869 (convert_mult_to_fma): Handle conditional plus and minus.
10870
10871 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
10872
10873 * doc/md.texi (cond_fma, cond_fms, cond_fnma, cond_fnms): Document.
10874 * optabs.def (cond_fma_optab, cond_fms_optab, cond_fnma_optab)
10875 (cond_fnms_optab): New optabs.
10876 * internal-fn.def (COND_FMA, COND_FMS, COND_FNMA, COND_FNMS): New
10877 internal functions.
10878 (FMA): Use DEF_INTERNAL_FLT_FN rather than DEF_INTERNAL_FLT_FLOATN_FN.
10879 * internal-fn.h (get_conditional_internal_fn): Declare.
10880 (get_unconditional_internal_fn): Likewise.
10881 * internal-fn.c (cond_ternary_direct): New macro.
10882 (expand_cond_ternary_optab_fn): Likewise.
10883 (direct_cond_ternary_optab_supported_p): Likewise.
10884 (FOR_EACH_COND_FN_PAIR): Likewise.
10885 (get_conditional_internal_fn): New function.
10886 (get_unconditional_internal_fn): Likewise.
10887 * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 5.
10888 (gimple_match_op::gimple_match_op): Add a new overload for 5
10889 operands.
10890 (gimple_match_op::set_op): Likewise.
10891 (gimple_resimplify5): Declare.
10892 * genmatch.c (decision_tree::gen): Generate simplifications for
10893 5 operands.
10894 * gimple-match-head.c (gimple_simplify): Define an overload for
10895 5 operands. Handle calls with 5 arguments in the top-level overload.
10896 (convert_conditional_op): Handle conversions from unconditional
10897 internal functions to conditional ones.
10898 (gimple_resimplify5): New function.
10899 (build_call_internal): Pass a fifth operand.
10900 (maybe_push_res_to_seq): Likewise.
10901 (try_conditional_simplification): Try converting conditional
10902 internal functions to unconditional internal functions.
10903 Handle 3-operand unconditional forms.
10904 * match.pd (UNCOND_TERNARY, COND_TERNARY): Operator lists.
10905 Define ternary equivalents of the current rules for binary conditional
10906 internal functions.
10907 * config/aarch64/aarch64.c (aarch64_preferred_else_value): Handle
10908 ternary operations.
10909 * config/aarch64/iterators.md (UNSPEC_COND_FMLA, UNSPEC_COND_FMLS)
10910 (UNSPEC_COND_FNMLA, UNSPEC_COND_FNMLS): New unspecs.
10911 (optab): Handle them.
10912 (SVE_COND_FP_TERNARY): New int iterator.
10913 (sve_fmla_op, sve_fmad_op): New int attributes.
10914 * config/aarch64/aarch64-sve.md (cond_<optab><mode>)
10915 (*cond_<optab><mode>_2, *cond_<optab><mode_4)
10916 (*cond_<optab><mode>_any): New SVE_COND_FP_TERNARY patterns.
10917
10918 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
10919
10920 * target.def (preferred_else_value): New target hook.
10921 * doc/tm.texi.in (TARGET_PREFERRED_ELSE_VALUE): New hook.
10922 * doc/tm.texi: Regenerate.
10923 * targhooks.h (default_preferred_else_value): Declare.
10924 * targhooks.c (default_preferred_else_value): New function.
10925 * internal-fn.h (conditional_internal_fn_code): Declare.
10926 * internal-fn.c (FOR_EACH_CODE_MAPPING): New macro.
10927 (get_conditional_internal_fn): Use it.
10928 (conditional_internal_fn_code): New function.
10929 * gimple-match.h (gimple_match_cond): New struct.
10930 (gimple_match_op): Add a cond member function.
10931 (gimple_match_op::gimple_match_op): Update all forms to take a
10932 gimple_match_cond.
10933 * genmatch.c (expr::gen_transform): Use the same condition as res_op
10934 for the suboperation, but don't specify a particular else_value.
10935 * tree-ssa-sccvn.c (vn_nary_simplify, vn_reference_lookup_3)
10936 (visit_nary_op, visit_reference_op_load): Pass
10937 gimple_match_cond::UNCOND to the gimple_match_op constructor.
10938 * gimple-match-head.c: Include tree-eh.h
10939 (convert_conditional_op): New function.
10940 (maybe_resimplify_conditional_op): Likewise.
10941 (gimple_resimplify1): Call maybe_resimplify_conditional_op.
10942 (gimple_resimplify2): Likewise.
10943 (gimple_resimplify3): Likewise.
10944 (gimple_resimplify4): Likewise.
10945 (maybe_push_res_to_seq): Return null for conditional operations.
10946 (try_conditional_simplification): New function.
10947 (gimple_simplify): Call it. Pass conditions to the gimple_match_op
10948 constructor.
10949 * match.pd: Fold VEC_COND_EXPRs of an IFN_COND_* call to a new
10950 IFN_COND_* call.
10951 * config/aarch64/aarch64.c (aarch64_preferred_else_value): New
10952 function.
10953 (TARGET_PREFERRED_ELSE_VALUE): Redefine.
10954
10955 2018-07-12 Jan Hubicka <hubicka@ucw.cz>
10956
10957 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
10958 DECL_FCONTEXT
10959 (hash_tree): Do not hash DECL_FCONTEXT
10960 * tree-streamer-in.c (lto_input_ts_field_decl_tree_pointers):
10961 Do not stream DECL_FCONTEXT.
10962 * tree-streamer-out.c (write_ts_field_decl_tree_pointers): Likewise.
10963 * tree.c (free_lang_data_in_decl): Free DECL_FCONTEXT.
10964
10965 2018-07-12 Richard Biener <rguenther@suse.de>
10966
10967 PR debug/86462
10968 * dwarf2out.c (gen_block_die): Only output blocks when they have
10969 at least one !DECL_IGNORED_P variable.
10970
10971 2018-07-12 Richard Biener <rguenther@suse.de>
10972
10973 PR target/84829
10974 * config/gnu-user.h (GNU_USER_TARGET_NO_PTHREADS_LIB_SPEC):
10975 Remove -mieee-fp handling.
10976
10977 2018-07-12 Richard Biener <rguenther@suse.de>
10978
10979 * tree-ssa-sccvn.c (vn_lookup_simplify_result): Remove bogus
10980 left-over from last patch.
10981
10982 2018-07-12 Jakub Jelinek <jakub@redhat.com>
10983
10984 PR tree-optimization/86492
10985 * gimple-ssa-store-merging.c
10986 (imm_store_chain_info::coalesce_immediate_stores): Call
10987 check_no_overlap even for the merge_overlapping case. Formatting fix.
10988
10989 2018-07-12 Richard Biener <rguenther@suse.de>
10990
10991 PR middle-end/86479
10992 * fold-const.c (fold_binary_op_with_conditional_arg): Do not
10993 move possibly trapping operations into the conditional.
10994
10995 2018-07-12 Richard Biener <rguenther@suse.de>
10996
10997 * tree-ssa-sccvn.c (mprts_hook_cnt): Remove.
10998 (vn_lookup_simplify_result): Remove recursion limit applied
10999 here.
11000 (vn_nary_build_or_lookup_1): Adjust.
11001 (try_to_simplify): Likewise.
11002 * gimple-match-head.c (gimple_resimplify1): Instead apply one
11003 here.
11004 (gimple_resimplify2): Likewise.
11005 (gimple_resimplify3): Likewise.
11006 (gimple_resimplify4): Likewise.
11007
11008 2018-07-11 Jakub Jelinek <jakub@redhat.com>
11009
11010 * config/i386/avx512bitalgintrin.h (_mm512_mask_bitshuffle_epi64_mask):
11011 Use __mmask64 type instead of __mmask8 for __M argument.
11012 * config/i386/avx512fintrin.h (_mm512_mask_xor_epi64,
11013 _mm512_maskz_xor_epi64): Use __mmask8 type instead of __mmask16 for
11014 __U argument.
11015 (_mm512_mask_cmpneq_epi64_mask): Use __mmask8 type instead of
11016 __mmask16 for __M argument.
11017 (_mm512_maskz_insertf32x4, _mm512_maskz_inserti32x4,
11018 _mm512_mask_insertf32x4, _mm512_mask_inserti32x4): Cast last argument
11019 to __mmask16 instead of __mmask8.
11020 * config/i386/avx512vlintrin.h (_mm_mask_add_ps, _mm_maskz_add_ps,
11021 _mm256_mask_add_ps, _mm256_maskz_add_ps, _mm_mask_sub_ps,
11022 _mm_maskz_sub_ps, _mm256_mask_sub_ps, _mm256_maskz_sub_ps,
11023 _mm256_maskz_cvtepi32_ps, _mm_maskz_cvtepi32_ps): Use __mmask8 type
11024 instead of __mmask16 for __U argument.
11025 * config/i386/avx512vlbwintrin.h (_mm_mask_cmp_epi8_mask): Use
11026 __mmask16 instead of __mmask8 for __U argument.
11027 (_mm256_mask_cmp_epi8_mask): Use __mmask32 instead of __mmask16 for
11028 __U argument.
11029 (_mm256_cmp_epi8_mask): Use __mmask32 return type instead of
11030 __mmask16.
11031 (_mm_mask_cmp_epu8_mask): Use __mmask16 instead of __mmask8 for __U
11032 argument.
11033 (_mm256_mask_cmp_epu8_mask): Use __mmask32 instead of __mmask16 for
11034 __U argument.
11035 (_mm256_cmp_epu8_mask): Use __mmask32 return type instead of
11036 __mmask16.
11037 (_mm_mask_cmp_epi16_mask): Cast last argument to __mmask8 instead
11038 of __mmask16.
11039 (_mm256_mask_cvtepi8_epi16): Use __mmask16 instead of __mmask32 for
11040 __U argument.
11041 (_mm_mask_cvtepi8_epi16): Use __mmask8 instead of __mmask32 for
11042 __U argument.
11043 (_mm256_mask_cvtepu8_epi16): Use __mmask16 instead of __mmask32 for
11044 __U argument.
11045 (_mm_mask_cvtepu8_epi16): Use __mmask8 instead of __mmask32 for
11046 __U argument.
11047 (_mm256_mask_cmpneq_epu8_mask, _mm256_mask_cmplt_epu8_mask,
11048 _mm256_mask_cmpge_epu8_mask, _mm256_mask_cmple_epu8_mask): Change
11049 return type as well as __M argument type and all casts from __mmask8
11050 to __mmask32.
11051 (_mm256_mask_cmpneq_epu16_mask, _mm256_mask_cmplt_epu16_mask,
11052 _mm256_mask_cmpge_epu16_mask, _mm256_mask_cmple_epu16_mask): Change
11053 return type as well as __M argument type and all casts from __mmask8
11054 to __mmask16.
11055 (_mm256_mask_cmpneq_epi8_mask, _mm256_mask_cmplt_epi8_mask,
11056 _mm256_mask_cmpge_epi8_mask, _mm256_mask_cmple_epi8_mask): Change
11057 return type as well as __M argument type and all casts from __mmask8
11058 to __mmask32.
11059 (_mm256_mask_cmpneq_epi16_mask, _mm256_mask_cmplt_epi16_mask,
11060 _mm256_mask_cmpge_epi16_mask, _mm256_mask_cmple_epi16_mask): Change
11061 return type as well as __M argument type and all casts from __mmask8
11062 to __mmask16.
11063 * config/i386/avx512vbmi2vlintrin.h (_mm_mask_shrdi_epi32,
11064 _mm_mask_shldi_epi32): Cast last argument to __mmask8 instead of
11065 __mmask16.
11066
11067 2018-07-11 Grazvydas Ignotas <notasas@gmail.com>
11068
11069 * config/i386/avx512bwintrin.h: (_mm512_mask_cmp_epi8_mask,
11070 _mm512_mask_cmp_epu8_mask): Use __mmask64 type instead of __mmask32
11071 for __U argument.
11072
11073 2018-07-11 Paul Koning <ni1d@arrl.net>
11074
11075 * doc/md.texi (define_subst): Document how multiple occurrences of
11076 the same argument in the replacement pattern are handled.
11077
11078 2018-07-11 Paul Koning <ni1d@arrl.net>
11079
11080 * doc/extend.texi (Common Variable Attributes): Move "mode" into
11081 alphabetical order.
11082 (Common Type Attributes): Add "mode" attribute.
11083
11084 2018-07-11 Jan Hubicka <hubicka@ucw.cz>
11085
11086 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not
11087 stream DECL_ORIGINAL_TYPE.
11088 (DFS::DFS_write_tree_body): Drop hack handling local external decls.
11089 (hash_tree): Do not walk DECL_ORIGINAL_TYPE.
11090 * tree-streamer-in.c (lto_input_ts_decl_non_common_tree_pointers):
11091 Do not walk original type.
11092 * tree-streamer-out.c (streamer_write_chain): Drop hack handling
11093 external decls.
11094 (write_ts_decl_non_common_tree_pointers): Do not stream
11095 DECL_ORIGINAL_TYPE
11096 * tree.c (free_lang_data_in_decl): Clear DECL_ORIGINAL_TYPE.
11097 (find_decls_types_r): Do not walk DEC_ORIGINAL_TYPE.
11098
11099 2018-07-11 Aldy Hernandez <aldyh@redhat.com>
11100
11101 * tree-ssa-threadupdate.c (thread_through_all_blocks): Do not jump
11102 thread twice from the same starting edge.
11103
11104 2018-07-11 Aldy Hernandez <aldyh@redhat.com>
11105
11106 * vr-values.c (gimple_stmt_nonzero_p): Abstract common code to...
11107 * gimple.c (gimple_call_nonnull_result_p): ...here...
11108 (gimple_call_nonnull_arg): ...and here.
11109 * gimple.h (gimple_call_nonnull_result_p): New.
11110 (gimple_call_nonnull_arg): New.
11111
11112 2018-07-11 Richard Earnshaw <rearnsha@arm.com>
11113
11114 * config/arm/arm-cpus.in: Move information from fpu field of each
11115 cpu definition to the isa field.
11116 * config/arm/parsecpu.awk (fpu): Delete match rule.
11117 (gen_comm_data): Don't add bits from the CPU's FPU entry.
11118
11119 2018-07-11 Richard Biener <rguenther@suse.de>
11120
11121 PR debug/86457
11122 * dwarf2out.c (init_sections_and_labels): Use
11123 output_asm_line_debug_info consistently.
11124 (dwarf2out_early_finish): Likewise.
11125 (dwarf2out_finish): Remove DW_AT_stmt_list from early generated
11126 type units.
11127
11128 2018-07-11 Richard Biener <rguenther@suse.de>
11129
11130 * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1):
11131 Rework father_bb setting in a way to avoid propagating constants
11132 multiple times on a loop body.
11133
11134 2018-07-10 Mark Wielaard <mark@klomp.org>
11135
11136 PR debug/86459
11137 * dwarf2out.c (output_macinfo_op): Fix dwarf_FORM typo in gcc_assert.
11138
11139 2018-07-10 Richard Biener <rguenther@suse.de>
11140
11141 * hash-map.h (hash_map::iterator::operator*): Return
11142 references to key and value.
11143
11144 2018-07-10 Jakub Jelinek <jakub@redhat.com>
11145
11146 PR c++/86443
11147 * gimplify.c (find_combined_omp_for): Add DATA argument, in addition
11148 to finding the inner OMP_FOR/OMP_SIMD stmt find non-trivial wrappers,
11149 BLOCKs with BLOCK_VARs, OMP_PARALLEL in between, OMP_FOR in between.
11150 (gimplify_omp_for): For composite loops, move outer
11151 OMP_{DISTRIBUTE,TASKLOOP,FOR,PARALLEL} right around innermost
11152 OMP_FOR/OMP_SIMD if there are any non-trivial wrappers. For class
11153 iterators add any needed clauses. Allow OMP_FOR_ORIG_DECLS to contain
11154 TREE_LIST for both the original class iterator and the "last" helper
11155 var. Gimplify OMP_FOR_PRE_BODY before the outermost composite
11156 loop, remember has_decl_expr from outer composite loops for the
11157 innermost OMP_SIMD in TREE_PRIVATE bit on OMP_FOR_INIT.
11158
11159 2018-07-09 Martin Sebor <msebor@redhat.com>
11160
11161 PR middle-end/77357
11162 PR middle-end/86428
11163 * builtins.c (c_strlen): Avoid out-of-bounds warnings when
11164 accessing implicitly initialized array elements.
11165 * expr.c (string_constant): Handle string initializers of
11166 character arrays within aggregates.
11167 * gimple-fold.c (fold_array_ctor_reference): Add argument.
11168 Store element offset. As a special case, handle zero size.
11169 (fold_nonarray_ctor_reference): Same.
11170 (fold_ctor_reference): Add argument. Store subobject offset.
11171 * gimple-fold.h (fold_ctor_reference): Add argument.
11172
11173 2018-07-09 Paul Koning <ni1d@arrl.net>
11174
11175 * config/pdp11/pdp11.c (pdp11_addr_cost): New function.
11176 (pdp11_insn_cost): New function.
11177 (pdp11_md_asm_adjust): New function.
11178 (TARGET_INVALID_WITHIN_DOLOOP): Define.
11179 (pdp11_rtx_costs): Update to match machine better.
11180 (output_addr_const_pdp11): Correct format mismatch warnings.
11181 * config/pdp11/pdp11.h (SLOW_BYTE_ACCESS): Correct definition.
11182 * config/pdp11/pdp11.md: General change to add base_cost and/or
11183 length attributes for use by new pdp11_insn_cost function.
11184 (MIN_BRANCH): Correct definition.
11185 (MIN_SOB): Ditto.
11186 (doloop_end): Use standard pattern name for looping pattern.
11187 (doloop_end_nocc): New.
11188 (movsf): Add another constraint alternative.
11189 (zero_extendqihi2): Add constraint alternatives for not in place
11190 extend.
11191 (zero_extendhisi2): Remove.
11192 (shift patterns): Add CC handling variants.
11193 (bswaphi2): New.
11194 (bswapsi2): New.
11195 (rothi3): New.
11196 (define_peephole2): New peephole to recognize mov that sets CC for
11197 subsequent test.
11198
11199 2018-07-09 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
11200
11201 * config/sparc/sparc.c (sparc_fold_builtin) <SPARC_BUILTIN_PDIST,
11202 SPARC_BUILTIN_PDISTN>: Adapt for signature change of wi::neg,
11203 wi::add.
11204
11205 2018-07-09 Jakub Jelinek <jakub@redhat.com>
11206
11207 PR c/86420
11208 * real.c (real_nextafter): Return true if result is denormal.
11209
11210 2018-07-09 Martin Liska <mliska@suse.cz>
11211
11212 * common.opt: Add back wrongly removed attribute.
11213
11214 2018-07-09 Richard Biener <rguenther@suse.de>
11215
11216 PR debug/86413
11217 * dwarf2out.c (gen_block_die): For an early generated DIE
11218 always output high/low PC attributes.
11219
11220 2018-07-09 Tom de Vries <tdevries@suse.de>
11221
11222 * cfgexpand.c (expand_debug_source_expr): Handle VAR_DECL.
11223 * tree-inline.c (remap_ssa_name): Handle default def ssa_name mapping
11224 onto VAR_DECL with abstract origin.
11225
11226 2018-07-07 Jim Wilson <jimw@sifive.com>
11227
11228 * config/riscv/riscv.c (TARGET_CUSTOM_FUNCTION_DESCRIPTORS): New.
11229
11230 2018-07-07 Tom de Vries <tdevries@suse.de>
11231
11232 * tree-dfa.c (dump_enumerated_decls): Handle cfun->cfg == NULL.
11233
11234 2018-07-07 Aldy Hernandez <aldyh@redhat.com>
11235
11236 * tree-vrp.c (vrp_int_const_binop): Change overflow type to
11237 overflow_type.
11238 (combine_bound): Use wide-int overflow calculation instead of
11239 rolling our own.
11240 * calls.c (maybe_warn_alloc_args_overflow): Change overflow type to
11241 overflow_type.
11242 * fold-const.c (int_const_binop_2): Same.
11243 (extract_muldiv_1): Same.
11244 (fold_div_compare): Same.
11245 (fold_abs_const): Same.
11246 * match.pd: Same.
11247 * poly-int.h (add): Same.
11248 (sub): Same.
11249 (neg): Same.
11250 (mul): Same.
11251 * predict.c (predict_iv_comparison): Same.
11252 * profile-count.c (slow_safe_scale_64bit): Same.
11253 * simplify-rtx.c (simplify_const_binary_operation): Same.
11254 * tree-chrec.c (tree_fold_binomial): Same.
11255 * tree-data-ref.c (split_constant_offset_1): Same.
11256 * tree-if-conv.c (idx_within_array_bound): Same.
11257 * tree-scalar-evolution.c (iv_can_overflow_p): Same.
11258 * tree-ssa-phiopt.c (minmax_replacement): Same.
11259 * tree-vect-loop.c (is_nonwrapping_integer_induction): Same.
11260 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Same.
11261 * vr-values.c (vr_values::adjust_range_with_scev): Same.
11262 * wide-int.cc (wi::add_large): Same.
11263 (wi::mul_internal): Same.
11264 (wi::sub_large): Same.
11265 (wi::divmod_internal): Same.
11266 * wide-int.h: Change overflow type to overflow_type for neg, add,
11267 mul, smul, umul, div_trunc, div_floor, div_ceil, div_round,
11268 mod_trunc, mod_ceil, mod_round, add_large, sub_large,
11269 mul_internal, divmod_internal.
11270 (overflow_type): New enum.
11271 (accumulate_overflow): New.
11272
11273 2018-07-06 Kugan Vivekanandarajah <kugan.vivekanandarajah@linaro.org>
11274
11275 * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): New.
11276 (tree_ssa_phiopt_worker): Call cond_removal_in_popcount_pattern.
11277
11278 2018-07-06 Kugan Vivekanandarajah <kuganv@linaro.org>
11279
11280 * tree-ssa-loop-niter.c (number_of_iterations_popcount): If popcount
11281 argument is checked for zero before entering loop, avoid checking again.
11282
11283 2018-07-06 Kugan Vivekanandarajah <kuganv@linaro.org>
11284
11285 * gimplify.h (generic_expr_could_trap_p): Set as global function.
11286 * gimplify.h (generic_expr_could_trap_p): Likwise.
11287 * tree-scalar-evolution.c (expression_expensive_p): Handle COND_EXPR.
11288
11289 2018-07-06 Jakub Jelinek <jakub@redhat.com>
11290
11291 PR tree-optimization/86401
11292 * fold-const.c (fold_binary_loc) <case BIT_AND_EXPR>: Move the
11293 ((A & N) + B) & M -> (A + B) & M etc. optimization into ...
11294 (fold_bit_and_mask): ... here. New helper function for match.pd.
11295 * fold-const.h (fold_bit_and_mask): Declare.
11296 * match.pd (((A & N) + B) & M -> (A + B) & M): New optimization.
11297
11298 2018-07-06 Peter Bergner <bergner@linux.ibm.com>
11299
11300 PR target/86324
11301 * target.def (translate_mode_attribute): New hook.
11302 * targhooks.h (default_translate_mode_attribute): Declare.
11303 * targhooks.c (default_translate_mode_attribute): New function.
11304 * doc/tm.texi.in (TARGET_TRANSLATE_MODE_ATTRIBUTE): New hook.
11305 * doc/tm.texi: Regenerate.
11306 * config/rs6000/rs6000.c (TARGET_TRANSLATE_MODE_ATTRIBUTE): Define.
11307 (rs6000_translate_mode_attribute): New function.
11308
11309 2018-07-06 Paul Koning <ni1d@arrl.net>
11310
11311 * doc/md.texi (define_split): Document DONE and FAIL.
11312 (define_peephole2): Ditto.
11313
11314 2018-07-05 Jeff Law <law@redhat.com>
11315
11316 PR tree-optimization/86010
11317 * tree-ssa-dse.c (compute_trims): More aggressively trim at
11318 both the head and tail of mem* and str* calls.
11319
11320 2018-07-05 Jim Wilson <jimw@sifive.com>
11321
11322 * config.gcc (riscv*-*-*): When setting xlen, handle riscv-*.
11323
11324 2018-07-05 Indu Bhagat <indu.bhagat@oracle.com>
11325
11326 * config/aarch64/aarch64-simd.md: correct flags text for
11327 MIN_EXPR replacement.
11328
11329 2018-07-05 James Clarke <jrtc27@jrtc27.com>
11330
11331 * configure: Regenerated.
11332
11333 2018-07-05 Carl Love <cel@us.ibm.com>
11334
11335 * config/rs6000/rs6000-c.c: Map ALTIVEC_BUILTIN_VEC_UNPACKH for
11336 float argument to VSX_BUILTIN_DOUBLEH_V4SF.
11337 Map ALTIVEC_BUILTIN_VEC_UNPACKL for float argument to
11338 VSX_BUILTIN_DOUBLEL_V4SF.
11339
11340 2018-07-05 Martin Sebor <msebor@redhat.com>
11341
11342 PR c++/86400
11343 * tree-ssa-strlen.c (maybe_set_strlen_range): Use type size rather
11344 than its domain to compute its the upper bound of a char array.
11345
11346 2018-07-05 Nathan Sidwell <nathan@acm.org>
11347
11348 Replace NO_IMPLICIT_EXTERN_C with SYSTEM_IMPLICIT_EXTERN_C.
11349 * doc/cpp.texi: Update comment.
11350 * doc/tm.texi: Rebuilt.
11351 * doc/tm.texi.in (NO_IMPLICIT_EXTERN_C): Replace with ...
11352 (SYSTEM_IMPLICIT_EXTERN_C): ... this, opposite sense.
11353 * doc/extend.texi (Backwards Compatibility): Clarify it is system
11354 headers affected by extern "C".
11355 * system.h: Poison NO_IMPLICIT_EXTERN_C.
11356 * config/alpha/alpha.h, config/arm/uclinux-elf.h,
11357 config/bfin/elf.h, config/cris/cris.h, config/darwin.h,
11358 config/dragonfly.h, config/freebsd.h, config/gnu-user.h,
11359 config/i386/cygming.h, config/i386/djgpp.h, config/i386/nto.h,
11360 config/ia64/hpux.h, config/lm32/lm32.h, config/lm32/uclinux-elf.h,
11361 config/lynx.h, config/mips/elf.h, config/mmix/mmix.h,
11362 config/netbsd.h, config/pa/pa-hpux.h, config/powerpcspe/sysv4.h,
11363 config/riscv/elf.h, config/rs6000/sysv4.h, config/rtems.h,
11364 config/s390/tpf.h, config/sh/newlib.h, config/sol2.h,
11365 config/sparc/openbsd64.h, config/sparc/sp-elf.h,
11366 config/sparc/sp64-elf.h, config/spu/spu.h,
11367 config/stormy16/stormy16.h, config/v850/v850.h,
11368 config/visium/visium.h, config/vx-common.h, config/xtensa/elf.h: Don't
11369 define NO_IMPLICIT_EXTERN_C.
11370 * config/rs6000/aix.h: Set SYSTEM_IMPLICIT_EXTERN_C.
11371
11372 2018-07-05 Tamar Christina <tamar.christina@arm.com>
11373
11374 PR target/84711
11375 * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
11376 instead of GET_MODE_SIZE when comparing Units.
11377
11378 2018-07-05 Tamar Christina <tamar.christina@arm.com>
11379
11380 PR target/84711
11381 * rtlanal.c (set_noop_p): Constrain on mode change,
11382 include hard-reg-set.h
11383
11384 2018-07-05 Tamar Christina <tamar.christina@arm.com>
11385
11386 * config/aarch64/aarch64.c (aarch64_expand_movmem): Fix mode size.
11387
11388 2018-07-05 Jakub Jelinek <jakub@redhat.com>
11389
11390 Revert
11391 2018-07-04 Maxim Ostapenko <m.ostapenko@samsung.com>
11392
11393 PR sanitizer/84250
11394 * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
11395 libasan.
11396 * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
11397
11398 2018-07-04 Maxim Ostapenko <m.ostapenko@samsung.com>
11399
11400 PR sanitizer/84250
11401 * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
11402 libasan.
11403 * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
11404
11405 2018-07-04 Eric Botcazou <ebotcazou@adacore.com>
11406
11407 PR middle-end/86380
11408 * expmed.c (choose_multiplier): Fix incorrect comparison with mask.
11409
11410 2018-07-04 Aldy Hernandez <aldyh@redhat.com>
11411
11412 * tree-vrp.c (extract_range_from_binary_expr_1): Initialize
11413 neg_*_op* variables.
11414
11415 2018-07-04 Martin Liska <mliska@suse.cz>
11416
11417 * tree-switch-conversion.c: Define
11418 max_ratio_for_speed and max_ratio_for_size constants.
11419
11420 2018-07-04 Denys Vlasenko <dvlasenk@redhat.com>
11421 Martin Liska <mliska@suse.cz>
11422
11423 PR middle-end/66240
11424 PR target/45996
11425 PR c/84100
11426 * common.opt: Rename align options with 'str_' prefix.
11427 * common/config/i386/i386-common.c (set_malign_value): New
11428 function.
11429 (ix86_handle_option): Use it to set -falign-* options/
11430 * config/aarch64/aarch64-protos.h (struct tune_params): Change
11431 type from int to string.
11432 * config/aarch64/aarch64.c: Update default values from int
11433 to string.
11434 * config/alpha/alpha.c (alpha_override_options_after_change):
11435 Likewise.
11436 * config/arm/arm.c (arm_override_options_after_change_1): Likewise.
11437 * config/i386/dragonfly.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
11438 max skip conditionally.
11439 * config/i386/freebsd.h (SUBALIGN_LOG): New.
11440 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
11441 max skip conditionally.
11442 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
11443 max skip conditionally.
11444 * config/i386/gnu-user.h (SUBALIGN_LOG): New.
11445 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
11446 max skip conditionally.
11447 * config/i386/i386.c (struct ptt): Change type from int to
11448 string.
11449 (ix86_default_align): Set default values.
11450 * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Print
11451 max skip conditionally.
11452 * config/i386/iamcu.h (SUBALIGN_LOG): New.
11453 (ASM_OUTPUT_MAX_SKIP_ALIGN):
11454 * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN):
11455 * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
11456 max skip conditionally.
11457 * config/i386/openbsdelf.h (SUBALIGN_LOG): New.
11458 (ASM_OUTPUT_MAX_SKIP_ALIGN) Print max skip conditionally.:
11459 * config/i386/x86-64.h (SUBALIGN_LOG): New.
11460 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
11461 max skip conditionally.
11462 (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
11463 * config/ia64/ia64.c (ia64_option_override): Set default values
11464 for alignment options.
11465 * config/m68k/m68k.c: Handle new str_align_* options.
11466 * config/mips/mips.c (mips_set_compression_mode): Change
11467 type of constants.
11468 (mips_option_override): Set default values for options.
11469 * config/powerpcspe/powerpcspe.c (rs6000_option_override_internal):
11470 Likewise.
11471 * config/rs6000/rs6000.c (rs6000_option_override_internal):
11472 Likewise.
11473 * config/rx/rx.c (rx_option_override): Likewise.
11474 * config/rx/rx.h (JUMP_ALIGN): Use align_jumps_log.
11475 (LABEL_ALIGN): Use align_labels_log.
11476 (LOOP_ALIGN): Use align_loops_align.
11477 * config/s390/s390.c (s390_asm_output_function_label): Use new
11478 macros.
11479 * config/sh/sh.c (sh_override_options_after_change):
11480 Change type of constants.
11481 * config/spu/spu.c (spu_sched_init): Likewise.
11482 * config/sparc/sparc.c (sparc_option_override): Set default
11483 values for options.
11484 * config/visium/visium.c (visium_option_override): Likewise.
11485 * config/visium/visium.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Do not
11486 emit p2align format with last argument if it's not needed.
11487 * doc/invoke.texi: Document extended format of -falign-*.
11488 * final.c: Use align_labels alignment.
11489 * flags.h (struct target_flag_state): Change type to use
11490 align_flags.
11491 (struct align_flags_tuple): New.
11492 (struct align_flags): Likewise.
11493 (align_loops_log): Redefine macro to use new types.
11494 (align_loops_max_skip): Redefine macro to use new types.
11495 (align_jumps_log): Redefine macro to use new types.
11496 (align_jumps_max_skip): Redefine macro to use new types.
11497 (align_labels_log): Redefine macro to use new types.
11498 (align_labels_max_skip): Redefine macro to use new types.
11499 (align_functions_log): Redefine macro to use new types.
11500 (align_loops): Redefine macro to use new types.
11501 (align_jumps): Redefine macro to use new types.
11502 (align_labels): Redefine macro to use new types.
11503 (align_functions): Redefine macro to use new types.
11504 (align_functions_max_skip): Redefine macro to use new types.
11505 (align_loops_value): New macro.
11506 (align_jumps_value): New macro.
11507 (align_labels_value): New macro.
11508 (align_functions_value): New macro.
11509 * function.c (invoke_set_current_function_hook): Propagate
11510 alignment values from flags to global variables default in
11511 topleev.h.
11512 * ipa-icf.c (sem_function::equals_wpa): Use
11513 cl_optimization_option_eq instead of memcmp.
11514 * lto-streamer.h (cl_optimization_stream_out): Support streaming
11515 of string types.
11516 (cl_optimization_stream_in): Likewise.
11517 * optc-save-gen.awk: Support strings in cl_optimization.
11518 * opth-gen.awk: Likewise.
11519 * opts.c (finish_options): Remove error checking of invalid
11520 value ranges.
11521 (MAX_CODE_ALIGN): Remove.
11522 (MAX_CODE_ALIGN_VALUE): Likewise.
11523 (parse_and_check_align_values): New function.
11524 (check_alignment_argument): Likewise.
11525 (common_handle_option): Use check_alignment_argument.
11526 * opts.h (parse_and_check_align_values): Declare.
11527 * toplev.c (init_alignments): Remove.
11528 (read_log_maxskip): New.
11529 (parse_N_M): Likewise.
11530 (parse_alignment_opts): Likewise.
11531 (backend_init_target): Remove usage of init_alignments.
11532 * toplev.h (parse_alignment_opts): Declare.
11533 * tree-streamer-in.c (streamer_read_tree_bitfields): Add new
11534 argument.
11535 * tree-streamer-out.c (streamer_write_tree_bitfields): Likewise.
11536 * tree.c (cl_option_hasher::equal): New.
11537 * varasm.c: Use new global macros.
11538
11539 2018-07-04 Denys Vlasenko <dvlasenk@redhat.com>
11540
11541 * config/i386/dragonfly.h: (ASM_OUTPUT_MAX_SKIP_ALIGN):
11542 Use a simpler align directive also if MAXSKIP = ALIGN-1.
11543 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
11544 * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
11545 * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
11546 * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
11547 * config/i386/freebsd.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Remove "If N
11548 is large, do at least 8 byte alignment" code. Add SUBALIGN_LOG
11549 define. Use a simpler align directive also if MAXSKIP = ALIGN-1.
11550 * config/i386/gnu-user.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
11551 * config/i386/iamcu.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
11552 * config/i386/openbsdelf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
11553 * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
11554
11555 2018-07-04 Martin Liska <mliska@suse.cz>
11556 Jonathan Wakely <jwakely@redhat.com>
11557
11558 * coverage.c: Use correct type.
11559 * doc/invoke.texi: Language correction.
11560
11561 2018-07-03 H.J. Lu <hongjiu.lu@intel.com>
11562
11563 PR target/85620
11564 * config/i386/i386.c (rest_of_insert_endbranch): Also generate
11565 ENDBRANCH for non-tail call which may return via indirect branch.
11566 * doc/extend.texi: Document indirect_return attribute.
11567
11568 2018-07-03 Martin Sebor <msebor@redhat.com>
11569
11570 PR tree-optimization/86274
11571 * gimple-ssa-sprintf.c (fmtresult::type_max_digits): Verify
11572 precondition.
11573 (format_floating): Correct handling of infinities and NaNs.
11574
11575 2018-07-03 Martin Sebor <msebor@redhat.com>
11576
11577 * print-tree.c (print_real_cst): New function.
11578 (print_node_brief): Call it.
11579 (print_node): Ditto.
11580
11581 2018-07-03 Jeff Law <law@redhat.com>
11582
11583 * config/h8300/h8300.md (logical<mode>3_sn, logical<mode>3): Merge
11584 into a single pattern.
11585
11586 * config/h8300/h8300.md (ors code_iterator): New.
11587 (bsetqi_msx, bnotqi_msx patterns and splitters): Consolidate into
11588 a single pattern and single splitter.
11589 (bsethi_msx, bnothi_msx patterns): Consolidate into a single pattern.
11590 (iorqi3_1, xorqi3_1): Likewise.
11591 (iorqi3, xorqi3 expanders): Similarly.
11592
11593 * config/h8300/h8300.md (movmd_internal_normal): Consolidated with
11594 (movmd_internal) into a single pattern using the P mode iterator.
11595 (movmd splitters): Similarly.
11596 (stpcpy_internal_normal, stpcpy_internal): Similarly for thes patterns.
11597 (movsd splitters): Similarly.
11598
11599 * config/h8300/h8300.c (h8300_insn_length_from_table): Consolidate
11600 ADDB, ADDW and ADDL into a single ADD attribute which selects the
11601 right table based on the size of the operand.
11602 * config/h8300/h8300.md (length_table): Corresponding changes. All
11603 references to "addb", "addw" and "addl" changed to "add".
11604 (btst patterns): Merge two variants into a single pattern.
11605 (tstqi, tsthi): Likewise.
11606 (addhi3_incdec, addsi3_incdec): Likewise.
11607 (subhi3_h8300hs, subsi3_h8300hs): Likewise.
11608 (mulhi3, mulsi3): Likewise.
11609 (udivhi3, udivsi3): Likewise.
11610 (divhi3, divsi3): Likewise.
11611 (andorqi3, andorhi3, andorsi3): Likewise.
11612
11613 2018-07-03 Uros Bizjak <ubizjak@gmail.com>
11614
11615 PR target/85694
11616 * config/i386/sse.md (uavg<mode>3_ceil): New expander.
11617 (<sse2_avx2>_uavg<mode>3<mask_name>): Simplify expander.
11618
11619 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
11620
11621 PR tree-optimization/85694
11622 * config/aarch64/iterators.md (HADD, RHADD): New int iterators.
11623 (u): Handle UNSPEC_SHADD, UNSPEC_UHADD, UNSPEC_SRHADD and
11624 UNSPEC_URHADD.
11625 * config/aarch64/aarch64-simd.md (<u>avg<mode>3_floor)
11626 (<u>avg<mode>3_ceil): New patterns.
11627
11628 2018-07-03 David Malcolm <dmalcolm@redhat.com>
11629
11630 * gcc.dg/vect/slp-perm-1.c: Remove "note: " prefix from
11631 scan-tree-dump directive.
11632 * gcc.dg/vect/slp-perm-2.c: Likewise.
11633 * gcc.dg/vect/slp-perm-3.c: Likewise.
11634 * gcc.dg/vect/slp-perm-5.c: Likewise.
11635 * gcc.dg/vect/slp-perm-6.c: Likewise.
11636 * gcc.dg/vect/slp-perm-7.c: Likewise.
11637 * gcc.dg/vect/slp-perm-8.c: Likewise.
11638
11639 2018-07-03 Marek Polacek <polacek@redhat.com>
11640
11641 PR middle-end/86202
11642 * gimple-fold.c (size_must_be_zero_p): Check the type of the size.
11643
11644 2018-07-03 Richard Biener <rguenther@suse.de>
11645
11646 PR ipa/86389
11647 * tree-ssa-structalias.c (find_func_clobbers): Properly
11648 handle indirect calls.
11649
11650 2018-07-03 Jeff Law <law@redhat.com>
11651
11652 * config/h8300/h8300.md (HSI, QHSI, QHSIF): New mode iterators.
11653 (shifts): New code iterator.
11654 (movqi, movhi, movsi, movsf expanders): Consolidate into a single
11655 expander. Fix HImode handling on H8/SX.
11656 (addqi3, addhi3, addsi3 expanders): Consolidate into a single expander.
11657 (subqi3, subhi3, subsi3 expanders): Likewise.
11658 (andqi3, andhi3, andsi3 expanders): Likewise.
11659 (iorqi3, iorhi3, iorsi3 expanders): Likewise.
11660 (xorqi3, xorhi3, xorsi3 expanders): Likewise.
11661 (negqi2, neghi2, negsi2, negsf2 expanders): Likewise.
11662 (one_cmplqi2, one_cmplhi2, one_cmplsi2): Likewise.
11663 (zero_extendqihi2, zero_extendqisi2): Likewise.
11664 (extendqihi2, extendqisi2): Likewise.
11665 (rotlqi3, rotlhi3, rotlsi3): Likewise.
11666 (neghi2_h8300, negsi2_h8300): Likewise for these patterns.
11667 (rotlqi3_1, rotlhi3_1): Likewise.
11668 (logicalhi3_sn, logicalsi3_sn): Likewise.
11669 (logicalhi3, logicalsi3): Likewise.
11670
11671 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
11672
11673 * tree-vect-patterns.c (vect_recog_rotate_pattern)
11674 (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
11675 (vect_recog_mixed_size_cond_pattern, adjust_bool_pattern_cast)
11676 (adjust_bool_pattern, vect_recog_bool_pattern): Pass the vector
11677 type to append_pattern_def_seq instead of creating a stmt_vec_info
11678 directly.
11679 (build_mask_conversion): Likewise. Remove vinfo argument.
11680 (vect_add_conversion_to_patterm): Likewise, renaming to...
11681 (vect_add_conversion_to_pattern): ...this.
11682 (vect_recog_mask_conversion_pattern): Update call to
11683 build_mask_conversion. Pass the vector type to
11684 append_pattern_def_seq here too.
11685 (vect_recog_gather_scatter_pattern): Update call to
11686 vect_add_conversion_to_pattern.
11687
11688 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
11689
11690 * tree-vect-patterns.c (new_pattern_def_seq): Delete.
11691 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
11692 (vect_recog_widen_op_pattern, vect_recog_over_widening_pattern)
11693 (vect_recog_rotate_pattern, vect_synth_mult_by_constant): Don't set
11694 STMT_VINFO_PATTERN_DEF_SEQ to null here.
11695 (vect_recog_pow_pattern, vect_recog_vector_vector_shift_pattern)
11696 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern): Use
11697 append_pattern_def_seq instead of new_pattern_def_seq.
11698 (vect_recog_divmod_pattern): Do both of the above.
11699 (vect_pattern_recog_1): Assert that STMT_VINO_PATTERN_DEF_SEQ
11700 is null.
11701
11702 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
11703
11704 * tree-vect-patterns.c (vect_recog_dot_prod_pattern):
11705 (vect_recog_sad_pattern, vect_recog_widen_op_pattern)
11706 (vect_recog_widen_mult_pattern, vect_recog_pow_pattern):
11707 (vect_recog_widen_sum_pattern, vect_recog_over_widening_pattern)
11708 (vect_recog_average_pattern, vect_recog_cast_forwprop_pattern)
11709 (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
11710 (vect_recog_vector_vector_shift_pattern, vect_synth_mult_by_constant)
11711 (vect_recog_mult_pattern, vect_recog_divmod_pattern)
11712 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
11713 (vect_recog_mask_conversion_pattern): Replace vec<gimple *>
11714 parameter with a single stmt_vec_info.
11715 (vect_recog_func_ptr): Likewise.
11716 (vect_recog_gather_scatter_pattern): Likewise, folding in...
11717 (vect_try_gather_scatter_pattern): ...this.
11718 (vect_pattern_recog_1): Remove stmts_to_replace and just pass
11719 the stmt_vec_info of the statement to be matched. Don't clear
11720 STMT_VINFO_RELATED_STMT.
11721 (vect_pattern_recog): Update call accordingly.
11722
11723 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
11724
11725 PR tree-optimization/85694
11726 * doc/md.texi (avgM3_floor, uavgM3_floor, avgM3_ceil)
11727 (uavgM3_ceil): Document new optabs.
11728 * doc/sourcebuild.texi (vect_avg_qi): Document new target selector.
11729 * internal-fn.def (IFN_AVG_FLOOR, IFN_AVG_CEIL): New internal
11730 functions.
11731 * optabs.def (savg_floor_optab, uavg_floor_optab, savg_ceil_optab)
11732 (savg_ceil_optab): New optabs.
11733 * tree-vect-patterns.c (vect_recog_average_pattern): New function.
11734 (vect_vect_recog_func_ptrs): Add it.
11735 * tree-vect-stmts.c (vectorizable_call): Get the type of the zero
11736 constant directly from the associated lhs.
11737
11738 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
11739
11740 * tree-vect-patterns.c (vect_split_statement): New function.
11741 (vect_convert_input): Use it to try to split an existing cast.
11742
11743 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
11744
11745 * poly-int.h (print_hex): New function.
11746 * dumpfile.h (dump_dec, dump_hex): Declare.
11747 * dumpfile.c (dump_dec, dump_hex): New poly_wide_int functions.
11748 * tree-vectorizer.h (_stmt_vec_info): Add min_output_precision,
11749 min_input_precision, operation_precision and operation_sign.
11750 * tree-vect-patterns.c (vect_get_range_info): New function.
11751 (vect_same_loop_or_bb_p, vect_single_imm_use)
11752 (vect_operation_fits_smaller_type): Delete.
11753 (vect_look_through_possible_promotion): Add an optional
11754 single_use_p parameter.
11755 (vect_recog_over_widening_pattern): Rewrite to use new
11756 stmt_vec_info infomration. Handle one operation at a time.
11757 (vect_recog_cast_forwprop_pattern, vect_narrowable_type_p)
11758 (vect_truncatable_operation_p, vect_set_operation_type)
11759 (vect_set_min_input_precision): New functions.
11760 (vect_determine_min_output_precision_1): Likewise.
11761 (vect_determine_min_output_precision): Likewise.
11762 (vect_determine_precisions_from_range): Likewise.
11763 (vect_determine_precisions_from_users): Likewise.
11764 (vect_determine_stmt_precisions, vect_determine_precisions): Likewise.
11765 (vect_vect_recog_func_ptrs): Put over_widening first.
11766 Add cast_forwprop.
11767 (vect_pattern_recog): Call vect_determine_precisions.
11768
11769 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
11770
11771 * tree-vect-patterns.c (vect_mark_pattern_stmts): Remove pattern
11772 statements that have been replaced by further pattern statements.
11773 (vect_pattern_recog_1): Clear STMT_VINFO_PATTERN_DEF_SEQ on failure.
11774
11775 2018-07-03 Richard Biener <rguenther@suse.de>
11776
11777 * tree-vect-stmts.c (vect_is_simple_use): Consolidate dumping,
11778 always set *dt. Dump vectype in vectype overload.
11779 * dumpfile.h (dump_gimple_expr): New function.
11780 (dump_gimple_expr_loc): Likewise.
11781 * dumpfile.c (dump_gimple_expr): New function.
11782 (dump_gimple_expr_loc): Likewise.
11783
11784 2018-07-02 Jeff Law <law@redhat.com>
11785
11786 * config/h8300/h8300.md (movqi_h8300, movqi_h8300hs): Consolidate
11787 the H8/300, H8/300H and H8/S variants into a single pattern.
11788 (movhi_h8300, movqi_h8300hs): Similarly.
11789 (pushqi_h8300hs, pushhi_h8300hs): Consolidate into a single pattern.
11790 (QHI mode iterator): New.
11791
11792 * config/h8300/h8300.md: Remove trailing whitespace.
11793
11794 2018-07-02 Jim Wilson <jimw@sifive.com>
11795
11796 * config/riscv/riscv.c (riscv_expand_epilogue): Use emit_jump_insn
11797 instead of emit_insn for interrupt returns.
11798 * config/riscv/riscv.md (riscv_met): Add (return) to rtl.
11799 (riscv_sret, riscv_uret): Likewise.
11800
11801 2018-07-02 David Malcolm <dmalcolm@redhat.com>
11802
11803 * pretty-print.c (selftest::test_pp_format): Move save and restore
11804 of quotes to class auto_fix_quotes, and add an instance.
11805 * selftest.c: Include "intl.h".
11806 (selftest::auto_fix_quotes::auto_fix_quotes): New ctor.
11807 (selftest::auto_fix_quotes::~auto_fix_quotes): New dtor.
11808 * selftest.h (selftest::auto_fix_quotes): New class.
11809
11810 2018-07-02 Richard Henderson <richard.henderson@linaro.org>
11811
11812 * config/aarch64/aarch64-protos.h, config/aarch64/aarch64.c
11813 (aarch64_sve_prepare_conditional_op): Remove.
11814 * config/aarch64/aarch64-sve.md (cond_<SVE_INT_BINARY><SVE_I>):
11815 Allow aarch64_simd_reg_or_zero as select operand; remove
11816 the aarch64_sve_prepare_conditional_op call.
11817 (cond_<SVE_INT_BINARY_SD><SVE_SDI>): Likewise.
11818 (cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
11819 (*cond_<SVE_INT_BINARY><SVE_I>_z): New pattern.
11820 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_z): New pattern.
11821 (*cond_<SVE_COND_FP_BINARY><SVE_F>_z): New pattern.
11822 (*cond_<SVE_INT_BINARY><SVE_I>_any): New pattern.
11823 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_any): New pattern.
11824 (*cond_<SVE_COND_FP_BINARY><SVE_F>_any): New pattern
11825 and a splitters to match all of the *_any patterns.
11826 * config/aarch64/predicates.md (aarch64_sve_any_binary_operator): New.
11827
11828 * config/aarch64/iterators.md (SVE_INT_BINARY_REV): Remove.
11829 (SVE_COND_FP_BINARY_REV): Remove.
11830 (sve_int_op_rev, sve_fp_op_rev): New.
11831 * config/aarch64/aarch64-sve.md (*cond_<SVE_INT_BINARY><SVE_I>_0): New.
11832 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_0): New.
11833 (*cond_<SVE_COND_FP_BINARY><SVE_F>_0): New.
11834 (*cond_<SVE_INT_BINARY><SVE_I>_2): Rename, add movprfx alternative.
11835 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_2): Similarly.
11836 (*cond_<SVE_COND_FP_BINARY><SVE_F>_2): Similarly.
11837 (*cond_<SVE_INT_BINARY><SVE_I>_3): Similarly; use sve_int_op_rev.
11838 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_3): Similarly.
11839 (*cond_<SVE_COND_FP_BINARY><SVE_F>_3): Similarly; use sve_fp_op_rev.
11840
11841 * config/aarch64/aarch64-sve.md (cond_<SVE_COND_FP_BINARY><SVE_F>):
11842 Remove match_dup 1 from the inner unspec.
11843 (*cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
11844
11845 * config/aarch64/aarch64.md (movprfx): New attr.
11846 (length): Default movprfx to 8.
11847 * config/aarch64/aarch64-sve.md (*mul<SVE_I>3): Add movprfx alt.
11848 (*madd<SVE_I>, *msub<SVE_I): Likewise.
11849 (*<su>mul<SVE_I>3_highpart): Likewise.
11850 (*<SVE_INT_BINARY_SD><SVE_SDI>3): Likewise.
11851 (*v<ASHIFT><SVE_I>3): Likewise.
11852 (*<su><MAXMIN><SVE_I>3): Likewise.
11853 (*<su><MAXMIN><SVE_F>3): Likewise.
11854 (*fma<SVE_F>4, *fnma<SVE_F>4): Likewise.
11855 (*fms<SVE_F>4, *fnms<SVE_F>4): Likewise.
11856 (*div<SVE_F>4): Likewise.
11857
11858 2018-07-02 Richard Sandiford <richard.sandiford@arm.com>
11859
11860 * tree-vect-patterns.c (vect_recog_widen_shift_pattern): Fix typo
11861 in dump string.
11862
11863 2018-07-02 Richard Biener <rguenther@suse.de>
11864
11865 PR tree-optimization/86363
11866 * tree-ssa-sccvn.c (vn_reference_lookup_3): Check the
11867 memset argument refers to a non-variable address.
11868
11869 2018-07-02 Aldy Hernandez <aldyh@redhat.com>
11870
11871 * tree-vrp.c (extract_range_from_binary_expr_1): Abstract a lot of the
11872 {PLUS,MINUS}_EXPR code to...
11873 (adjust_symbolic_bound): ...here,
11874 (combine_bound): ...here,
11875 (set_value_range_with_overflow): ...and here.
11876
11877 2018-07-02 Aldy Hernandez <aldyh@redhat.com>
11878
11879 * tree-vrp.c (extract_range_from_unary_expr): Abstract ABS_EXPR
11880 code...
11881 (extract_range_from_abs_expr): ...here.
11882
11883 2018-07-02 Eric Botcazou <ebotcazou@adacore.com>
11884
11885 * config/i386/i386.c (ix86_finalize_stack_frame_flags): Do not overrule
11886 -fno-omit-frame-pointer when not optimizing.
11887
11888 2018-07-02 Martin Liska <mliska@suse.cz>
11889
11890 PR ipa/86279
11891 * ipa-pure-const.c (malloc_candidate_p): Revert usage of ::get.
11892 (propagate_nothrow): Likewise.
11893
11894 2018-07-02 Martin Liska <mliska@suse.cz>
11895
11896 PR ipa/86323
11897 * ipa-inline.c (early_inliner): Revert wrongly added ::get call.
11898
11899 2018-07-02 David Malcolm <dmalcolm@redhat.com>
11900
11901 * dumpfile.c (dump_generic_expr_loc): Undo removal of this
11902 function in r262149, changing "loc" param from source_location to
11903 const dump_location_t &.
11904 * dumpfile.h (dump_generic_expr_loc): Undo removal of this
11905 declaration, as above.
11906
11907 2018-07-01 Paul Koning <ni1d@arrl.net>
11908
11909 * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
11910 -munit-asm, -mgnu-asm, -mdec-asm.
11911 * config/pdp11/pdp11-protos.h (pdp11_gen_int_label): New.
11912 (pdp11_output_labelref): New.
11913 (pdp11_output_def): New.
11914 (pdp11_output_addr_vec_elt): New.
11915 * config/pdp11/pdp11.c: Use tab between opcode and operands. Use
11916 %# and %@ format codes.
11917 (pdp11_option_override): New.
11918 (TARGET_ASM_FILE_START_FILE_DIRECTIVE): Define.
11919 (pdp11_output_ident): New.
11920 (pdp11_asm_named_section): New.
11921 (pdp11_asm_init_sections): New.
11922 (pdp11_file_start): New.
11923 (pdp11_file_end): New.
11924 (output_ascii): Use .ascii/.asciz for -mdec-asm.
11925 (pdp11_asm_print_operand): Update %# and %$ for -mdec-asm. Add
11926 %o, like %c but octal.
11927 (pdp11_option_override): New.
11928 * config/pdp11/pdp11.h (TEXT_SECTION_ASM_OP): Update for
11929 -mdec-asm.
11930 (DATA_SECTION_ASM_OP): Ditto.
11931 (READONLY_DATA_SECTION_ASM_OP): New.
11932 (IS_ASM_LOGICAL_LINE_SEPARATOR): New.
11933 (ASM_GENERATE_INTERNAL_LABEL): Use new function.
11934 (ASM_OUTPUT_LABELREF): Ditto.
11935 (ASM_OUTPUT_DEF): Ditto.
11936 (ASM_OUTPUT_EXTERNAL): New.
11937 (ASM_OUTPUT_SOURCE_FILENAME): New.
11938 (ASM_OUTPUT_ADDR_VEC_ELT): Use new function.
11939 (ASM_OUTPUT_SKIP): Update for -mdec-asm.
11940 * config/pdp11/pdp11.md: Use tab between opcode and operands. Use
11941 %# and %@ format codes.
11942 * config/pdp11/pdp11.opt (mgnu-asm): New.
11943 (mdec-asm): Conflicts with -mgnu-asm and -munix-asm.
11944 (munix-asm): Conflicts with -mdec-asm and -mgnu-asm.
11945 * doc/invoke.txt (PDP-11 Options): Add -mgnu-asm.
11946
11947 2018-07-01 Aldy Hernandez <aldyh@redhat.com>
11948
11949 * tree-ssa-threadupdate.c (mark_threaded_blocks): Avoid
11950 dereferencing path[] beyond its length.
11951 (debug_path): New.
11952 (debug_all_paths): New.
11953 (rewire_first_differing_edge): New.
11954 (adjust_paths_after_duplication): New.
11955 (duplicate_thread_path): Call adjust_paths_after_duplication.
11956 Add new argument.
11957 (thread_through_all_blocks): Add new argument to
11958 duplicate_thread_path.
11959
11960 2018-06-30 Jim Wilson <jimw@sifive.com>
11961
11962 * config/riscv/predicates.md (p2m1_shift_operand): New.
11963 (high_mask_shift_operand): New.
11964 * config/riscv/riscv.md (lshrsi3_zero_extend_3+1): New combiner
11965 pattern using p2m1_shift_operand.
11966 (lshsi3_zero_extend_3+2): New combiner pattern using
11967 high_mask_shift_operand.
11968
11969 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
11970
11971 * tree-vect-patterns.c (vect_get_external_def_edge): New function,
11972 split out from...
11973 (vect_recog_rotate_pattern): ...here.
11974 (vect_convert_input): Try to insert casts of invariants in the
11975 preheader.
11976 * tree-vect-loop-manip.c (vect_loop_versioning): Don't require the
11977 preheader to be empty.
11978
11979 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
11980
11981 * tree-vect-patterns.c (append_pattern_def_seq): Take an optional
11982 vector type. If given, install it in the new statement's
11983 STMT_VINFO_VECTYPE.
11984 (vect_element_precision): New function.
11985 (vect_unpromoted_value): New struct.
11986 (vect_unpromoted_value::vect_unpromoted_value): New function.
11987 (vect_unpromoted_value::set_op): Likewise.
11988 (vect_look_through_possible_promotion): Likewise.
11989 (vect_joust_widened_integer, vect_joust_widened_type): Likewise.
11990 (vect_widened_op_tree, vect_convert_input): Likewise.
11991 (vect_convert_inputs, vect_convert_output): Likewise.
11992 (vect_recog_dot_prod_pattern): Use vect_look_through_possible_promotion
11993 to handle the optional cast of the multiplication result and
11994 vect_widened_op_tree to detect the widened multiplication itself.
11995 Do not require the input and output of promotion casts to have
11996 the same sign, but base the signedness of the operation on the
11997 input rather than the result. If the pattern includes two
11998 promotions, check that those promotions have the same sign.
11999 Do not restrict the MULT_EXPR handling to a double-width result;
12000 handle quadruple-width results and wider. Use vect_convert_inputs
12001 to convert the inputs to the common type.
12002 (vect_recog_sad_pattern): Use vect_look_through_possible_promotion
12003 to handle the optional cast of the ABS result. Also allow a sign
12004 change or a sign extension between the ABS and MINUS.
12005 Use vect_widened_op_tree to detect the widened subtraction and use
12006 vect_convert_inputs to convert the inputs to the common type.
12007 (vect_handle_widen_op_by_const): Delete.
12008 (vect_recog_widen_op_pattern): New function.
12009 (vect_recog_widen_mult_pattern): Use it.
12010 (vect_recog_widen_shift_pattern): Likewise.
12011 (vect_recog_widen_sum_pattern): Use
12012 vect_look_through_possible_promotion to handle the promoted
12013 PLUS_EXPR operand.
12014
12015 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
12016
12017 * gimple-iterator.c (gsi_for_stmt): Add a new overload that takes
12018 the containing gimple_seq *.
12019 * gimple-iterator.h (gsi_for_stmt): Declare it.
12020 * tree-vect-patterns.c (vect_recog_dot_prod_pattern)
12021 (vect_recog_sad_pattern, vect_recog_widen_sum_pattern)
12022 (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
12023 (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
12024 (vect_recog_mask_conversion_pattern): Remove STMT_VINFO_IN_PATTERN_P
12025 checks.
12026 (vect_init_pattern_stmt, vect_set_pattern_stmt): New functions,
12027 split out from...
12028 (vect_mark_pattern_stmts): ...here. Handle cases in which the
12029 statement being replaced is part of an existing pattern
12030 definition sequence, inserting the new pattern statements before
12031 the original one.
12032 (vect_pattern_recog_1): Don't return a bool. If the statement
12033 is already part of a pattern, instead apply pattern matching
12034 to the pattern definition statements. Don't clear the
12035 STMT_VINFO_RELATED_STMT if is_pattern_stmt_p.
12036 (vect_pattern_recog): Don't break after the first match;
12037 continue processing the pattern definition statements instead.
12038 Don't bail out for STMT_VINFO_IN_PATTERN_P here.
12039
12040 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
12041
12042 * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
12043 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
12044 (vect_recog_widen_sum_pattern): Use it.
12045
12046 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
12047
12048 * tree-vect-loop.c (vectorizable_reduction): Assert that the
12049 phi is not a pattern statement and has not been replaced by
12050 a pattern statement.
12051 * tree-vect-patterns.c (type_conversion_p): Don't check
12052 STMT_VINFO_IN_PATTERN_P.
12053 (vect_recog_vector_vector_shift_pattern): Likewise.
12054 (vect_recog_dot_prod_pattern): Expect vect_is_simple_use to return
12055 the pattern statement rather than the original statement; check
12056 directly for a WIDEN_MULT_EXPR here.
12057 * tree-vect-slp.c (vect_get_and_check_slp_defs): Expect
12058 vect_is_simple_use to return the pattern statement rather
12059 than the original statement; use is_pattern_stmt_p to check
12060 for such a pattern statement.
12061 * tree-vect-stmts.c (process_use): Expect vect_is_simple_use
12062 to return the pattern statement rather than the original statement;
12063 don't do the same transformation here.
12064 (vect_is_simple_use): If the defining statement has been replaced
12065 by a pattern statement, return the pattern statement instead.
12066 Remove the corresponding (local) transformation from the vectype
12067 overload.
12068
12069 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
12070
12071 * tree-vectorizer.h (vect_is_simple_use): Move the gimple ** to the
12072 end and default to null.
12073 * tree-vect-loop.c (vect_create_epilog_for_reduction)
12074 (vectorizable_reduction): Update calls accordingly, dropping the
12075 gimple ** argument if the passed-back statement isn't needed.
12076 * tree-vect-patterns.c (vect_get_internal_def, type_conversion_p)
12077 (vect_recog_rotate_pattern): Likewise.
12078 (vect_recog_mask_conversion_pattern): Likewise.
12079 * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
12080 (vect_mask_constant_operand_p): Likewise.
12081 * tree-vect-stmts.c (is_simple_and_all_uses_invariant, process_use):
12082 (vect_model_simple_cost, vect_get_vec_def_for_operand): Likewise.
12083 (get_group_load_store_type, get_load_store_type): Likewise.
12084 (vect_check_load_store_mask, vect_check_store_rhs): Likewise.
12085 (vectorizable_call, vectorizable_simd_clone_call): Likewise.
12086 (vectorizable_conversion, vectorizable_assignment): Likewise.
12087 (vectorizable_shift, vectorizable_operation): Likewise.
12088 (vectorizable_store, vect_is_simple_cond): Likewise.
12089 (vectorizable_condition, vectorizable_comparison): Likewise.
12090 (get_same_sized_vectype, vect_get_mask_type_for_stmt): Likewise.
12091 (vect_is_simple_use): Rename the def_stmt argument to def_stmt_out
12092 and move it to the end. Cope with null def_stmt_outs.
12093
12094 2018-06-30 Bernd Edlinger <bernd.edlinger@hotmail.de>
12095
12096 * Makefile.in (FLAGS_TO_PASS): Add RANLIB_FOR_TARGET.
12097
12098 2018-06-29 Jeff Law <law@redhat.com>
12099
12100 * config/v850/v850.c (v850_legitimate_address_p): Handle large
12101 displacements for TARGET_V850E2V3 and newer.
12102 (TARGET_LRA_P): Remove. Defaults to LRA now.
12103 * config/v850/v850.md (sign23byte_load): Remove.
12104 (unsign23byte_load, sign23hword_load, unsign23hword_load): Likewise.
12105 (23word_load, 23byte_store, 23hword_store, 23word_store): Likewise.
12106
12107 2018-06-29 Martin Liska <mliska@suse.cz>
12108
12109 PR lto/85759
12110 * coverage.c (coverage_init): Mangle full path name.
12111 * doc/invoke.texi: Document the change.
12112 * gcov-io.c (mangle_path): New.
12113 * gcov-io.h (mangle_path): Likewise.
12114 * gcov.c (mangle_name): Use mangle_path for path mangling.
12115
12116 2018-06-29 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
12117
12118 * config/arm/arm.c (output_move_double): Don't allow STRD instructions
12119 if starting source register is not even.
12120
12121 2018-06-29 Martin Liska <mliska@suse.cz>
12122
12123 PR tree-optimization/86263
12124 * tree-switch-conversion.c (switch_decision_tree::try_switch_expansion):
12125 Make edge redirection.
12126
12127 2018-06-29 David Malcolm <dmalcolm@redhat.com>
12128
12129 * dumpfile.c (dump_loc): Add indentation based on scope depth.
12130 (dump_scope_depth): New variable.
12131 (get_dump_scope_depth): New function.
12132 (dump_begin_scope): New function.
12133 (dump_end_scope): New function.
12134 * dumpfile.h (get_dump_scope_depth): New declaration.
12135 (dump_begin_scope): New declaration.
12136 (dump_end_scope): New declaration.
12137 (class auto_dump_scope): New class.
12138 (AUTO_DUMP_SCOPE): New macro.
12139 * tree-vectorizer.h (DUMP_VECT_SCOPE): Reimplement in terms of
12140 AUTO_DUMP_SCOPE.
12141
12142 2018-06-29 Richard Biener <rguenther@suse.de>
12143
12144 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences): Assert
12145 compute_all_dependences succeeds.
12146 * tree-vect-loop.c (vect_get_datarefs_in_loop): Fail early if we
12147 exceed --param loop-max-datarefs-for-datadeps.
12148
12149 2018-06-29 Jakub Jelinek <jakub@redhat.com>
12150
12151 * config/rs6000/t-rs6000: Append rs6000-modes.h to TM_H.
12152
12153 2018-06-28 Uros Bizjak <ubizjak@gmail.com>
12154
12155 PR target/86348
12156 * config/i386/sse.md (*vec_extractv4si_0_zext_sse4): Use
12157 alternative 0 in preferred_for_speed attribute.
12158
12159 2018-06-28 Paul Koning <ni1d@arrl.net>
12160
12161 * config/pdp11/pdp11-protos.h (pdp11_shift_length): New function.
12162 * config/pdp11/pdp11.c (pdp11_shift_length): New function.
12163 * config/pdp11/pdp11.h (ADJUST_INSN_LENGTH): Remove.
12164 * config/pdp11/pdp11.md: Correct "length" attribute calculation
12165 for shift insn patterns.
12166
12167 2018-06-28 David Malcolm <dmalcolm@redhat.com>
12168
12169 * cgraph.c (cgraph_node::get_body): Replace assignments to
12170 "dump_file" with calls to set_dump_file.
12171 * dumpfile.c (alt_dump_file): Make static, and group with...
12172 (alt_flags): ...this definition.
12173 (dumps_are_enabled): New variable.
12174 (refresh_dumps_are_enabled): New function.
12175 (set_dump_file): New function.
12176 (set_alt_dump_file): New function.
12177 (gcc::dump_manager::dump_start): Replace assignments to
12178 "dump_file" and "alt_dump_file" with calls to set_dump_file and
12179 set_alt_dump_file.
12180 (gcc::dump_manager::dump_finish): Likewise.
12181 * dumpfile.h (alt_dump_file): Delete decl.
12182 (dumps_are_enabled): New variable decl.
12183 (set_dump_file): New function decl.
12184 (dump_enabled_p): Rewrite in terms of new "dumps_are_enabled"
12185 global.
12186 * tree-nested.c (lower_nested_functions): Replace assignments to
12187 "dump_file" with calls to set_dump_file.
12188
12189 2018-06-28 Eric Botcazou <ebotcazou@adacore.com>
12190
12191 * tree-cfg.c (verify_gimple_in_cfg): Call verify_location on the
12192 goto_locus of each outgoing edge of each basic block.
12193
12194 2018-06-28 Richard Biener <rguenther@suse.de>
12195
12196 * dwarf2out.c (decl_scope_table): Remove.
12197 (push_decl_scope): Likewise.
12198 (pop_decl_scope): Likewise.
12199 (gen_type_die_for_member): Do not call push/pop_decl_scope.
12200 (gen_struct_or_union_type_die): Likewise.
12201 (gen_tagged_type_die): Likewise.
12202 (dwarf2out_init): Do not initialize decl_scope_table.
12203 (dwarf2out_c_finalize): Do not free it.
12204
12205 2018-06-28 Richard Biener <rguenther@suse.de>
12206
12207 * dwarf2out.c (gen_subprogram_die): Use is_unit_die when
12208 deciding whether to not re-use a DIE.
12209
12210 2018-06-28 Richard Biener <rguenther@suse.de>
12211
12212 * dwarf2out.c (gen_subprogram_die): Always re-use DIEs with an
12213 DW_AT_abstract_origin attribute.
12214
12215 2018-06-28 Martin Liska <mliska@suse.cz>
12216
12217 * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
12218 Use newly introduced constants.
12219 * tree-switch-conversion.h (struct jump_table_cluster):
12220 Define max_ratio_for_size and max_ratio_for_speed.
12221
12222 2018-06-28 Martin Liska <mliska@suse.cz>
12223
12224 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
12225 Add new checking assert to catch invalid state.
12226 (jump_table_cluster::can_be_handled): Handle single case
12227 clusters.
12228 (jump_table_cluster::is_beneficial): Bail out for such case.
12229 (bit_test_cluster::find_bit_tests):
12230 Add new checking assert to catch invalid state.
12231 (bit_test_cluster::can_be_handled): Handle single case
12232 clusters.
12233 (bit_test_cluster::is_beneficial): Bail out for such case.
12234 (switch_decision_tree::analyze_switch_statement):
12235 Fix comment.
12236
12237 2018-06-28 Martin Liska <mliska@suse.cz>
12238
12239 * common.opt: Introduce -completion option.
12240 * gcc.c (driver_handle_option): Handle it.
12241 (driver::main): Print completions if completion
12242 is set.
12243 * opt-suggestions.c (option_proposer::get_completions):
12244 New function.
12245 (option_proposer::suggest_completion): Likewise.
12246 (option_proposer::find_param_completions): Likewise.
12247 (verify_autocompletions): Likewise.
12248 (test_completion_valid_options): Likewise.
12249 (test_completion_valid_params): Likewise.
12250 (in_completion_p): Likewise.
12251 (empty_completion_p): Likewise.
12252 (test_completion_partial_match): Likewise.
12253 (test_completion_garbage): Likewise.
12254 (opt_proposer_c_tests): Likewise.
12255 * opt-suggestions.h: Declare new functions.
12256 * opts.c (common_handle_option): Handle OPT__completion_.
12257 * selftest-run-tests.c (selftest::run_tests): Add
12258 opt_proposer_c_tests.
12259 * selftest.c (assert_str_startswith): New.
12260 * selftest.h (assert_str_startswith): Likewise.
12261 (opt_proposer_c_tests): New.
12262 (ASSERT_STR_STARTSWITH): Likewise.
12263
12264 2018-06-28 Martin Liska <mliska@suse.cz>
12265
12266 * Makefile.in: Add opt-suggestions.o.
12267 * gcc-main.c: Include opt-suggestions.h.
12268 * gcc.c (driver::driver): Likewise.
12269 (driver::~driver): Remove m_option_suggestions.
12270 (driver::build_option_suggestions): Moved to option_proposer.
12271 (driver::suggest_option): Likewise.
12272 (driver::handle_unrecognized_options): Use option_proposer.
12273 * gcc.h (class driver): Add new memver m_option_proposer.
12274 * opt-suggestions.c: New file.
12275 * opt-suggestions.h: New file.
12276
12277 2018-06-28 Martin Liska <mliska@suse.cz>
12278
12279 * vec.h (class auto_string_vec): New (moved from auto_argvec).
12280 (auto_string_vec::~auto_string_vec): Likewise.
12281
12282 2018-06-28 Eric Botcazou <ebotcazou@adacore.com>
12283
12284 * tree-inline.h (struct copy_body_data): Move remapping_type_depth and
12285 prevent_decl_creation_for_types fields up and add reset_location field.
12286 * tree-inline.c (remap_gimple_stmt): Force input_location on the new
12287 statement if id->reset_location is true.
12288 (copy_edges_for_bb): Do not set goto_locus on the new edges if
12289 id->reset_location is true.
12290 (copy_phis_for_bb): Force input_location on the arguments if
12291 id->reset_location is true.
12292 (expand_call_inline): Set id->reset_location if DECL_IGNORED_P
12293 is set on the function to be inlined.
12294
12295 2018-06-27 Stephan Bergmann <sbergman@redhat.com>
12296
12297 * doc/invoke.texi (Debugging Options): Add -gsplit-dwarf.
12298
12299 2018-06-27 Dimitar Dimitrov <dimitar@dinux.eu>
12300
12301 * lra-eliminations.c (update_reg_eliminate): Mark all spanning hard
12302 registers for Pmode.
12303 * lra-lives.c (check_pseudos_live_through_calls): Mark all spanning
12304 hard registers for the clobbered pseudo.
12305
12306 2018-06-27 Paul Koning <ni1d@arrl.net>
12307
12308 * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
12309 mutually exclusive options.
12310 * config/pdp11/constraints.md (h): New constraint.
12311 (O): Update definition to match shift code generation.
12312 (D): New constraint.
12313 * config/pdp11/pdp11-modes.def (CCNZ): Define mode.
12314 (CCFP): Remove.
12315 * config/pdp11/pdp11-protos.h (int_no_side_effect_operand): New
12316 function.
12317 (output_jump): Change arguments.
12318 (pdp11_fixed_cc_regs): New function.
12319 (pdp11_cc_mode): Ditto.
12320 (pdp11_expand_shift): Ditto.
12321 (pdp11_assemble_shift): Ditto.
12322 (pdp11_small_shift): Ditto.
12323 (pdp11_branch_cost): Remove.
12324 * config/pdp11/pdp11.c (pdp11_assemble_integer): Remove comments
12325 from output.
12326 (pdp11_register_move_cost): Update for CC registers.
12327 (pdp11_rtx_costs): Add case for LSHIFTRT.
12328 (pdp11_output_jump): Add CCNZ mode conditional branches.
12329 (notice_update_cc_on_set): Remove.
12330 (pdp11_cc_mode): New function.
12331 (simple_memory_operand): Correct pre/post decrement case.
12332 (no_side_effect_operand): New function.
12333 (pdp11_regno_reg_class): Add CC_REGS class.
12334 (pdp11_fixed_cc_regs): New function.
12335 (pdp11_small_shift): New function.
12336 (pdp11_expand_shift): New function to expand shift insns.
12337 (pdp11_assemble_shift): New function to output shifts.
12338 (pdp11_branch_cost): Remove.
12339 (pdp11_modes_tieable_p): Make QI/HI modes tieable.
12340 * config/pdp11/pdp11.h (SIZE_TYPE): Ensure 16-bit type.
12341 (WCHAR_TYPE): Ditto.
12342 (PTRDIFF_TYPE): Ditto.
12343 (ADJUST_INSN_LENGTH): New macro.
12344 (FIXED_REGISTERS): Add CC registers.
12345 (CALL_USED_REGISTERS): Ditto.
12346 (reg_class): Ditto.
12347 (REG_CLASS_NAMES): Ditto.
12348 (REG_CLASS_CONTENTS): Ditto.
12349 (SELECT_CC_MODE): Use new function.
12350 (TARGET_FLAGS_REGNUM): New macro.
12351 (TARGET_FIXED_CONDITION_CODE_REGS): Ditto.
12352 (cc0_reg_rtx): Remove.
12353 (CC_STATUS_MDEP): Remove.
12354 (CC_STATUS_MDEFP_INIT): Remove.
12355 (CC_IN_FPU): Remove.
12356 (NOTICE_UPDATE_CC): Remove.
12357 (REGISTER_NAMES): Add CC registers.
12358 (BRANCH_COST): Change to constant 1.
12359 * config/pdp11/pdp11.md: Rewrite for CCmode condition code
12360 handling.
12361 * config/pdp11/pdp11.opt (mbcopy): Remove.
12362 (mbcopy-builtin): Remove.
12363 (mbranch-cheap): Remove.
12364 (mbranch-expensive): Remove.
12365 * config/pdp11/predicates.md (expand_shift_operand): Update to
12366 match shift code generation.
12367 (ccnz_operator): New predicate.
12368 * doc/invoke.texi (PDP-11 Options): Remove deleted options
12369 -mbcopy, -mbcopy-builtin, -mbranch-cheap, -mbranch-expensive.
12370 Remove non-existent option -mabshi, -mno-abshi. Document mutually
12371 exclusive options.
12372 * doc/md.texi (PDP-11): Document new D and h constraints. Update
12373 description of O constraint.
12374
12375 2018-06-27 Jeff Law <law@redhat.com>
12376 Austin Law <austinklaw@gmail.com>
12377
12378 * config/v850/v850.md (addsi3_set_flags): New pattern.
12379 (subsi3_set_flags, negsi2_set_flags, andsi3_set_flags): Likewise.
12380 (iorsi3_set_flags, xorsi3_set_flags, one_cmplsi2_set_flags): Likewise.
12381 (zero_extendhisi2_v850_set_flags): Likewise.
12382 (zero_extendqisi2_v850_set_flags): Likewise.
12383 (ashlsi3_set_flags, ashlsi3_v850e2_set_flags): Likewise.
12384 (lshrsi3_set_flags, lshrsi3_v850e2_set_flags): Likewise.
12385 (ashrsi3_set_flags, ashrsi3_v850e2_set_flags): Likewise.
12386
12387 * config/v850/v850-protos.h (notice_update_cc): Remove.
12388 * config/v850/v850.c (v850_compare_op0, v850_compare_op1): Remove.
12389 (v850_print_operand): Handle 'D' and "d".
12390 (v850_select_cc_mode): Remove ATTRIBUTE_UNUSED for last argument.
12391 Add handling of arithmetic/logical operations compared against zero.
12392 (v850_gen_float_compare): Remove ATTRIBUTE_UNUSED for last argument.
12393 Do not look at v850_compare_op, instead get mode from last argument.
12394 (v850_gen_compare): Remove
12395 (increment_stack): Use addsi3_clobber_flags to avoid splitting failure
12396 after reload for prologue insns.
12397 (expand_prologue): Account for CLOBBER of CC_REGNUM in various
12398 patterns.
12399 (construct_save_jarl): Likewise.
12400 (TARGET_FLAGS_REGNUM): Define.
12401 * config/v850/v850.h (v850_compare_op0, v850_compare_op1): Remove.
12402 (NOTICE_UPDATE_CC): Remove.
12403 * config/v850/v850.md (v850_tst1): Use (reg:CCZ CC_REGNUM) rather
12404 than cc0. Conditionalize on reload_completed.
12405 (cmpsi_insn, setfcc_insn): Likewise.
12406 (tst1 splitter): Turn into define_and_split which sets the flags
12407 after reload.
12408 (cstoresi4, cbranchsf4, cbranchdf4, cbranchsi4_insn): Likewise.
12409 (cbranchsi4, branch_normal, branch_invert): Do not expose cc0 here.
12410 (cstoresf4, cstoredf4): Clobber the flags.
12411 (cmpsi, cmpsf, cmpdf): Remove expanders.
12412 (setf_insn): Remove pattern.
12413 (addsi3): Turn into define_and_split which clobbers the flags after
12414 reload and a suitable pattern (addsi3_clobber_flags) for use after
12415 reload.
12416 (subsi3, negsi2, andsi3, iorsi3, xorsi3, one_cmplsi2) Likewise.
12417 (ashlsi3, ashlsi3_v850e2, lshrsi3, lsh4si3_v850e2): Likewise.
12418 (ashrsi3, ashrsi3_v850e2): Likewise.
12419 (bins): Clobber the flags.
12420 (movsicc_normal_cc, movsicc_normal, movsicc_tst1): Likewise.
12421 (movsicc_tst1_revesed, sasf, swap and rotate patterns): Likewise.
12422 (fix_loop_counter, call_internal_short, call_internal_long): Likewise.
12423 (call_value_internal_short, call_value_internal_long): Likewise.
12424 (callt_save_interrupt, callt_return_interrupt): Likewise.
12425 (save_interrupt, return_interrupt): Likewise.
12426 (callt_save_all_interrupt, save_all_interrupt): Likewise.
12427 (_save_all_interrupt, callt_restore_all_interrupt): Likewise.
12428 (restore_all_interrupt, _restore_all_interrupt): Likewise.
12429 (All FP comparisons): Only allow after reload has completed.
12430 (trfsr): Likewise.
12431 (divh, divhu): Tweak output template.
12432 (branch_z_normal, branch_z_invert): Remove
12433 (branch_nz_normal, branch_nz_invert): Likewise.
12434 (extendhisi_insn, extendqisi_insn): Do not clobber flags.
12435
12436 * config/v850/v850-modes.def (CCZ, CCNZ): Add new modes.
12437 * config/v850/v850.c (notice_update_cc): Remove.
12438 * config/v850/v850.h (CC_OVERFLOW_UNUSABLE): Remove
12439 (CC_NO_CARRY): Likewise.
12440 (NOTICE_UPDATE_CC): Define to nothing.
12441 * config/v850/v850.md: Remove block comment on cc0 handling
12442 Remove "cc" attribute from all patterns. Remove cc_status handling
12443 from all patterns. Minor formatting fixes.
12444
12445 2018-06-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
12446
12447 * config/aarch64/aarch64-cores.def (cortex-a76): New entry.
12448 (cortex-a76.cortex-a55): Likewise.
12449 * config/aarch64/aarch64-tune.md: Regenerate.
12450 * doc/invoke.texi (AArch64 Options): Document cortex-a76 and
12451 cortex-a76.cortex-a55.
12452
12453 2018-06-27 Jeff Law <law@redhat.com>
12454
12455 * config/v850/t-v850 (MULTILIB_OPTIONS): Remove 8byte-align.
12456 (MULTILIB_DIRNAMES): Similarly.
12457
12458 2018-06-27 Eric Botcazou <ebotcazou@adacore.com>
12459
12460 * gimple.h (gimple_return_retbnd): Delete.
12461 (gimple_return_set_retbnd): Likewise.
12462 * cgraphunit.c (cgraph_node::expand_thunk): Remove call to
12463 gimple_return_set_retbnd.
12464 * gimple-pretty-print.c (dump_gimple_return): Remove call to
12465 gimple_return_retbnd and adjust.
12466 * tree-inline.h (struct copy_body_data): Remove retbnd field.
12467 * tree-inline.c (remap_gimple_stmt): Remove handling of retbnd.
12468 Explicitly return NULL in a couple more cases. Move assertion
12469 on debug statements and remove unreachable code.
12470 (reset_debug_binding): Do not test id->retbnd.
12471 (expand_call_inline): Do not set it.
12472
12473 2018-06-27 Rasmus Villemoes <rv@rasmusvillemoes.dk>
12474
12475 * configure.ac: Add --disable-gcov option.
12476 * configure: Regenerate.
12477 * Makefile.in: Honour @enable_gcov@.
12478 * doc/install.texi: Document --disable-gcov.
12479
12480 2018-06-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
12481
12482 * config/arm/arm-cpus.in (cortex-a76): New entry.
12483 (cortex-a76.cortex-a55): Likewise.
12484 * config/arm/arm-tables.opt: Regenerate.
12485 * config/arm/arm-tune.md: Likewise.
12486 * config/arm/driver-arm.c (arm_cpu_table): Add Cortex-A76 entry.
12487 * doc/invoke.texi (ARM Options): Document cortex-a76 and
12488 cortex-a76.cortex-a55.
12489
12490 2018-06-27 Tamar Christina <tamar.christina@arm.com>
12491
12492 PR target/85769
12493 * config/aarch64/aarch64.md (*movhf_aarch64): Add dup v0.4h pattern.
12494
12495 2018-06-27 Siddhesh Poyarekar <siddhesh@sourceware.org>
12496
12497 * config/aarch64/aarch64.h (CALL_USE_REGISTERS): Fix obsolete
12498 comment.
12499 (EPILOGUE_USES): Likewise.
12500
12501 2018-06-26 Eric Botcazou <ebotcazou@adacore.com>
12502
12503 * tree-inline.c (remap_location): New function extracted from...
12504 (copy_edges_for_bb): Add ID parameter. Remap goto_locus.
12505 (copy_phis_for_bb): ...here. Call remap_location.
12506 (copy_cfg_body): Adjust call to copy_edges_for_bb.
12507
12508 2018-06-26 Aaron Sawdey <acsawdey@linux.ibm.com>
12509
12510 * config/rs6000/rs6000-string.c (expand_block_clear): Don't use
12511 unaligned vsx for 16B memset.
12512
12513 2018-06-26 Segher Boessenkool <segher@kernel.crashing.org>
12514
12515 PR target/86285
12516 * config/rs6000/rs6000.c (rs6000_init_builtins): Do not set
12517 ieee128_float_type_node to long_double_type_node unless
12518 TARGET_LONG_DOUBLE_128 is set.
12519
12520 2018-06-26 David Malcolm <dmalcolm@redhat.com>
12521
12522 * cfgloop.c (get_loop_location): Convert return type from
12523 location_t to dump_user_location_t, replacing INSN_LOCATION lookups
12524 by implicit construction from rtx_insn *, and using
12525 dump_user_location_t::from_function_decl for the fallback case.
12526 * cfgloop.h (get_loop_location): Convert return type from
12527 location_t to dump_user_location_t.
12528 * cgraphunit.c (walk_polymorphic_call_targets): Update call to
12529 dump_printf_loc to pass in a dump_location_t rather than a
12530 location_t, via the gimple stmt.
12531 * coverage.c (get_coverage_counts): Update calls to
12532 dump_printf_loc to pass in dump_location_t rather than a
12533 location_t.
12534 * doc/optinfo.texi (Dump types): Convert example of
12535 dump_printf_loc from taking "locus" to taking "insn". Update
12536 description of the "_loc" calls to cover dump_location_t.
12537 * dumpfile.c: Include "backend.h", "gimple.h", "rtl.h", and
12538 "selftest.h".
12539 (dump_user_location_t::dump_user_location_t): New constructors,
12540 from gimple *stmt and rtx_insn *.
12541 (dump_user_location_t::from_function_decl): New function.
12542 (dump_loc): Make static.
12543 (dump_gimple_stmt_loc): Convert param "loc" from location_t to
12544 const dump_location_t &.
12545 (dump_generic_expr_loc): Delete.
12546 (dump_printf_loc): Convert param "loc" from location_t to
12547 const dump_location_t &.
12548 (selftest::test_impl_location): New function.
12549 (selftest::dumpfile_c_tests): New function.
12550 * dumpfile.h: Include "profile-count.h".
12551 (class dump_user_location_t): New class.
12552 (struct dump_impl_location_t): New struct.
12553 (class dump_location_t): New class.
12554 (dump_printf_loc): Convert 2nd param from source_location to
12555 const dump_location_t &.
12556 (dump_generic_expr_loc): Delete.
12557 (dump_gimple_stmt_loc): Convert 2nd param from source_location to
12558 const dump_location_t &.
12559 * gimple-fold.c (fold_gimple_assign): Update call to
12560 dump_printf_loc to pass in a dump_location_t rather than a
12561 location_t, via the gimple stmt.
12562 (gimple_fold_call): Likewise.
12563 * gimple-loop-interchange.cc
12564 (loop_cand::analyze_iloop_reduction_var): Update for change to
12565 check_reduction_path.
12566 (tree_loop_interchange::interchange): Update for change to
12567 find_loop_location.
12568 * graphite-isl-ast-to-gimple.c (scop_to_isl_ast): Update for
12569 change in return-type of find_loop_location.
12570 (graphite_regenerate_ast_isl): Likewise.
12571 * graphite-optimize-isl.c (optimize_isl): Likewise.
12572 * graphite.c (graphite_transform_loops): Likewise.
12573 * ipa-devirt.c (ipa_devirt): Update call to dump_printf_loc to
12574 pass in a dump_location_t rather than a location_t, via the
12575 gimple stmt.
12576 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
12577 * ipa.c (walk_polymorphic_call_targets): Likewise.
12578 * loop-unroll.c (report_unroll): Convert "locus" param from
12579 location_t to dump_location_t.
12580 (decide_unrolling): Update for change to get_loop_location's
12581 return type.
12582 * omp-grid.c (struct grid_prop): Convert field "target_loc" from
12583 location_t to dump_user_location_t.
12584 (grid_find_single_omp_among_assignments_1): Updates calls to
12585 dump_printf_loc to pass in a dump_location_t rather than a
12586 location_t, via the gimple stmt.
12587 (grid_parallel_clauses_gridifiable): Convert "tloc" from
12588 location_t to dump_location_t. Updates calls to dump_printf_loc
12589 to pass in a dump_location_t rather than a location_t, via the
12590 gimple stmt.
12591 (grid_inner_loop_gridifiable_p): Likewise.
12592 (grid_dist_follows_simple_pattern): Likewise.
12593 (grid_gfor_follows_tiling_pattern): Likewise.
12594 (grid_target_follows_gridifiable_pattern): Likewise.
12595 (grid_attempt_target_gridification): Convert initialization
12596 of local "grid" from memset to zero-initialization; FIXME: does
12597 this require C++11? Update call to dump_printf_loc to pass in a
12598 optinfo_location rather than a location_t, via the gimple stmt.
12599 * profile.c (read_profile_edge_counts): Updates call to
12600 dump_printf_loc to pass in a dump_location_t rather than a
12601 location_t
12602 (compute_branch_probabilities): Likewise.
12603 * selftest-run-tests.c (selftest::run_tests): Call
12604 dumpfile_c_tests.
12605 * selftest.h (dumpfile_c_tests): New decl.
12606 * tree-loop-distribution.c (pass_loop_distribution::execute):
12607 Update for change in return type of find_loop_location.
12608 * tree-parloops.c (parallelize_loops): Likewise.
12609 * tree-ssa-loop-ivcanon.c (try_unroll_loop_completely): Convert
12610 "locus" from location_t to dump_user_location_t.
12611 (canonicalize_loop_induction_variables): Likewise.
12612 * tree-ssa-loop-ivopts.c (tree_ssa_iv_optimize_loop): Update
12613 for change in return type of find_loop_location.
12614 * tree-ssa-loop-niter.c (number_of_iterations_exit): Update call
12615 to dump_printf_loc to pass in a dump_location_t rather than a
12616 location_t, via the stmt.
12617 * tree-ssa-sccvn.c (eliminate_dom_walker::before_dom_children):
12618 Likewise.
12619 * tree-vect-loop-manip.c (find_loop_location): Convert return
12620 type from source_location to dump_user_location_t.
12621 (vect_do_peeling): Update for above change.
12622 (vect_loop_versioning): Update for change in type of
12623 vect_location.
12624 * tree-vect-loop.c (check_reduction_path): Convert "loc" param
12625 from location_t to dump_user_location_t.
12626 (vect_estimate_min_profitable_iters): Update for change in type
12627 of vect_location.
12628 * tree-vect-slp.c (vect_print_slp_tree): Convert param "loc" from
12629 location_t to dump_location_t.
12630 (vect_slp_bb): Update for change in type of vect_location.
12631 * tree-vectorizer.c (vect_location): Convert from source_location
12632 to dump_user_location_t.
12633 (try_vectorize_loop_1): Update for change in vect_location's type.
12634 (vectorize_loops): Likewise.
12635 (increase_alignment): Likewise.
12636 * tree-vectorizer.h (vect_location): Convert from source_location
12637 to dump_user_location_t.
12638 (find_loop_location): Convert return type from source_location to
12639 dump_user_location_t.
12640 (check_reduction_path): Convert 1st param from location_t to
12641 dump_user_location_t.
12642 * value-prof.c (check_counter): Update call to dump_printf_loc to
12643 pass in a dump_user_location_t rather than a location_t; update
12644 call to error_at for change in type of "locus".
12645 (check_ic_target): Update call to dump_printf_loc to
12646 pass in a dump_user_location_t rather than a location_t, via the
12647 call_stmt.
12648
12649 2018-06-26 Robin Dapp <rdapp@linux.vnet.ibm.com>
12650
12651 * config/s390/s390.h (enum processor_flags): Do not use
12652 default tune parameter when -march was specified.
12653
12654 2018-06-26 Jakub Jelinek <jakub@redhat.com>
12655
12656 PR target/86314
12657 * config/i386/i386.md (setcc + movzbl to xor + setcc peephole2s):
12658 Check reg_overlap_mentioned_p in addition to reg_set_p with the same
12659 operands.
12660
12661 2018-06-26 Richard Biener <rguenther@suse.de>
12662
12663 PR tree-optimization/86287
12664 PR bootstrap/86316
12665 * tree-vect-loop.c (vect_transform_loop_stmt): Fix read-after-free.
12666 (vect_analyze_loop): Initialize n_stmts.
12667
12668 2018-06-26 Richard Biener <rguenther@suse.de>
12669
12670 PR middle-end/86271
12671 * fold-const.c (fold_convertible_p): Pointer extension
12672 isn't valid.
12673
12674 2018-06-26 Alexandre Oliva <aoliva@redhat.com>
12675
12676 PR debug/86064
12677 * dwarf2out.c (loc_list_has_views): Adjust comments.
12678 (dw_loc_list): Split single cross-partition range with
12679 nonzero locview.
12680
12681 2018-06-25 Jeff Law <law@redhat.com>
12682
12683 * common/config/v850/v850-common.c (TARGET_DEFAULT_TARGET_FLAGS): Turn
12684 on -mbig-switch by default.
12685
12686 * config/v850/predicates.md (const_float_1_operand): Fix match_code
12687 test.
12688 (const_float_0_operand): Remove unused predicate.
12689 * config/v850/v850.md (define_constants): Remove UNSPEC_LOOP.
12690 (define_c_enum unspec): Add LOOP, RCP and RSQRT constants.
12691 (recipsf2): New expander. Original pattern now called
12692 (recipsf2_insn).
12693 (recipdf2, recipdf2_insn): Similarly.
12694 (rsqrtsf2, rsqrtsf2_insn): Similarly
12695 (rsqrtdf2, rsqrtdf2_insn): Similarly
12696
12697 2018-06-26 Gerald Pfeifer <gerald@pfeifer.com>
12698
12699 * ginclude/stddef.h: Remove an obsolete comment on FreeBSD 5.
12700 Simplify logic for FreeBSD (twice).
12701
12702 2018-06-25 Martin Sebor <msebor@redhat.com>
12703
12704 PR tree-optimization/86204
12705 * tree-ssa-strlen.c (handle_builtin_strlen): Avoid storing
12706 a strnlen result if it's less than the length of the string.
12707
12708 2018-06-25 Martin Sebor <msebor@redhat.com>
12709
12710 PR tree-optimization/85700
12711 * gimple-fold.c (gimple_fold_builtin_strncat): Adjust comment.
12712 * tree-ssa-strlen.c (is_strlen_related_p): Handle integer subtraction.
12713 (maybe_diag_stxncpy_trunc): Distinguish strncat from strncpy.
12714
12715 2018-06-25 Martin Sebor <msebor@redhat.com>
12716
12717 * doc/extend.texi (Zero-length arrays): Update and clarify.
12718
12719 2018-06-25 Michael Meissner <meissner@linux.ibm.com>
12720
12721 * config.gcc (powerpc64le*): Revert January 16th, 2018 patch that
12722 added IEEE/IBM long double multilib support on PowerPC little
12723 endian Linux systems.
12724 * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Likewise.
12725 (MULTILIB_DEFAULTS): Likewise.
12726 * config/rs6000/rs6000.c (rs6000_option_override_internal):
12727 Likewise.
12728 * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Likewise.
12729 * config/rs6000/t-ldouble-linux64le-ibm: Delete, no longer used.
12730 * config/rs6000/t-ldouble-linux64le-ieee: Delete, no longer used.
12731
12732 2018-06-25 Alexander Monakov <amonakov@ispras.ru>
12733
12734 PR middle-end/86311
12735 * sort.cc (REORDER_23): Avoid memcpy with same destination and source.
12736 (REORDER_45): Likewise.
12737
12738 2018-06-25 Jeff Law <law@redhat.com>
12739
12740 * config/v850/v850.md (divmodhi4): Make sure to sign extend the
12741 dividend to 32 bits. Adjust length.
12742 (udivmodhi4): Cleanup output template. Fix length.
12743
12744 2018-06-25 Carl Love <cel@us.ibm.com>
12745
12746 * config/rs6000/vsx.md: Change word selector to prefered location.
12747
12748 2018-06-25 Richard Biener <rguenther@suse.de>
12749
12750 PR tree-optimization/86304
12751 * tree-vectorizer.c (vectorize_loops): Walk over new possibly
12752 epilogue-if-converted loops as well.
12753
12754 2018-06-25 Jan Hubicka <hubicka@ucw.cz>
12755
12756 * lto-section-out.c (lto_begin_section): Do not print section
12757 name for noaddr and unnumbered dumps.
12758
12759 2018-06-25 Richard Biener <rguenther@suse.de>
12760
12761 * tree-vectorizer.h (struct vec_info_shared): New structure
12762 with parts split out from struct vec_info and loop_nest from
12763 struct _loop_vec_info.
12764 (struct vec_info): Adjust accordingly.
12765 (struct _loop_vec_info): Likewise.
12766 (LOOP_VINFO_LOOP_NEST): Adjust.
12767 (LOOP_VINFO_DATAREFS): Likewise.
12768 (LOOP_VINFO_DDRS): Likewise.
12769 (struct _bb_vec_info): Likewise.
12770 (BB_VINFO_DATAREFS): Likewise.
12771 (BB_VINFO_DDRS): Likewise.
12772 (struct _stmt_vec_info): Add dr_aux member.
12773 (DR_VECT_AUX): Adjust to refer to member of DR_STMTs vinfo.
12774 (DR_MISALIGNMENT_UNINITIALIZED): New.
12775 (set_dr_misalignment): Adjust.
12776 (dr_misalignment): Assert misalign isn't DR_MISALIGNMENT_UNINITIALIZED.
12777 (vect_analyze_loop): Adjust prototype.
12778 (vect_analyze_loop_form): Likewise.
12779 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
12780 Compute dependences lazily.
12781 (vect_record_base_alignments): Use shared datarefs/ddrs.
12782 (vect_verify_datarefs_alignment): Likewise.
12783 (vect_analyze_data_refs_alignment): Likewise.
12784 (vect_analyze_data_ref_accesses): Likewise.
12785 (vect_analyze_data_refs): Likewise.
12786 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Add
12787 constructor parameter for shared part.
12788 (vect_analyze_loop_form): Pass in shared part and adjust.
12789 (vect_analyze_loop_2): Pass in storage for the number of
12790 stmts. Move loop nest finding to the caller. Compute
12791 datarefs lazily.
12792 (vect_analyze_loop): Pass in shared part.
12793 (vect_transform_loop): Verify shared datarefs are unchanged.
12794 * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Add
12795 constructor parameter for shared part.
12796 (vect_slp_analyze_bb_1): Pass in shared part and adjust.
12797 (vect_slp_bb): Verify shared datarefs are unchanged before
12798 transform.
12799 * tree-vect-stmts.c (ensure_base_align): Adjust for DR_AUX
12800 change.
12801 (new_stmt_vec_info): Initialize DR_AUX misalignment to
12802 DR_MISALIGNMENT_UNINITIALIZED.
12803 * tree-vectorizer.c (vec_info::vec_info): Add constructor
12804 parameter for shared part.
12805 (vec_info::~vec_info): Adjust.
12806 (vec_info_shared::vec_info_shared): New.
12807 (vec_info_shared::~vec_info_shared): Likewise.
12808 (vec_info_shared::save_datarefs): Likewise.
12809 (vec_info_shared::check_datarefs): Likewise.
12810 (try_vectorize_loop_1): Construct shared part live for analyses
12811 of a single loop for multiple vector sizes.
12812 * tree-parloops.c (gather_scalar_reductions): Adjust.
12813
12814 2018-06-25 Richard Biener <rguenther@suse.de>
12815
12816 * tree-vect-data-refs.c (vect_find_stmt_data_reference): Modify
12817 DR for SIMD lane accesses here and mark DR with (void *)-1 aux.
12818 (vect_analyze_data_refs): Remove similar code from here and
12819 simplify accordingly.
12820
12821 2018-06-25 Richard Biener <rguenther@suse.de>
12822
12823 * tree-vect-data-refs.c (vect_check_gather_scatter): Fail
12824 for reverse storage order accesses rather than asserting
12825 they cannot happen here.
12826
12827 2018-06-25 Tom de Vries <tdevries@suse.de>
12828
12829 PR debug/86257
12830 * config/i386/i386.md (define_insn "*tls_global_dynamic_64_<mode>"):
12831 Use data16 instead of .byte for insn prefix.
12832
12833 2018-06-25 Andreas Krebbel <krebbel@linux.ibm.com>
12834
12835 PR C++/86082
12836 * parser.c (make_char_string_pack): Pass this literal chars
12837 through cpp_interpret_string.
12838 (cp_parser_userdef_numeric_literal): Check the result of
12839 make_char_string_pack.
12840
12841 2018-06-24 Maya Rashish <coypu@sdf.org>
12842
12843 * ginclude/stddef.h: Simplify conditions around avoiding
12844 re-definition of __size_t.
12845
12846 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
12847
12848 * lto-streamer-out.c (tree_is_indexable): Make LABEL_DECL nonindexable
12849 unless it is forced or nonlocal; assert that we stream no IMPORTED_DECL.
12850
12851 2018-06-22 Maya Rashish <coypu@sdf.org>
12852
12853 * doc/invoke.texi (mno-fancy-math-387): Update for changes
12854 made to OpenBSD and NetBSD through the years.
12855
12856 2018-06-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
12857
12858 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
12859 behavior of vec_pack (vector double, vector double) to match
12860 behavior of vec_float2 (vector double, vector double).
12861
12862 2018-06-22 Olivier Hainque <hainque@adacore.com>
12863
12864 * gimplify.c (gimplify_function_tree): Prevent creation
12865 of a trampoline for the address of the current function
12866 passed to entry/exit instrumentation hooks.
12867
12868 2018-06-22 Aaron Sawdey <acsawdey@linux.ibm.com>
12869
12870 PR target/86222
12871 * config/rs6000/rs6000-string.c (expand_strn_compare): Handle -m32
12872 correctly.
12873
12874 2018-06-22 Martin Liska <mliska@suse.cz>
12875
12876 PR tree-optimization/86263
12877 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
12878 Bail out if is_enabled is false.
12879 * tree-switch-conversion.h (jump_table_cluster::is_enabled):
12880 New declaration.
12881 (jump_table_cluster::is_enabled): New function.
12882
12883 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
12884
12885 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
12886 BINFO_BASE_ACCESSES and BINFO_VPTR_FIELD.
12887 * tree-streamer-in.c (streamer_read_tree_bitfields): Likewise.
12888 (lto_input_ts_binfo_tree_pointers): Likewise.
12889 * tree-streamer-out.c (streamer_write_tree_bitfields,
12890 write_ts_binfo_tree_pointers): Likewise.
12891 * tree.c (free_lang_data_in_binfo): Clear BINFO_VPTR_FIELD.
12892
12893 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
12894
12895 * tree.c (free_lang_data_in_type): Free all TYPE_VFIELDs.
12896
12897 2018-06-22 Martin Liska <mliska@suse.cz>
12898
12899 * symbol-summary.h (get): Make it pure and inline move
12900 functionality from ::get function.
12901 (get): Remove and inline into ::get and ::get_create.
12902 (get_create): Move code from ::get function.
12903
12904 2018-06-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
12905
12906 PR target/85994
12907 * config/i386/sol2.h (CPP_SPEC): Don't pass -P for
12908 -x assembler-with-cpp.
12909
12910 2018-06-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
12911
12912 * config/sol2.h (TARGET_OS_CPP_BUILTINS): Define
12913 _FILE_OFFSET_BITS=64 for C++.
12914
12915 2018-06-21 Michael Meissner <meissner@linux.ibm.com>
12916
12917 * config/rs6000/rs6000.md (extendtfif2): Add missing 128-bit
12918 conversion insn that shows up when pr85657-3.c is compiled using
12919 IEEE 128-bit long double.
12920 (neg<mode>2_internal): Use the correct mode to check whether the
12921 mode is IBM extended.
12922 * config/rs6000/rs6000.c (init_float128_ieee): Prevent complex
12923 multiply and divide external functions from being created more
12924 than once.
12925
12926 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
12927
12928 * cfgrtl.c (fixup_reorder_chain): Do not emit NOPs in DECL_IGNORED_P
12929 functions.
12930 (rtl_merge_blocks): Likewise. Do not emit a NOP if the location of
12931 the edge can be forwarded.
12932 (cfg_layout_merge_blocks): Likewise.
12933
12934 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
12935
12936 * except.c (finish_eh_generation): Commit edge insertions only after
12937 the EH edges have been redirected from post-landing to landing pads.
12938
12939 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
12940
12941 * tree-nested.c (get_frame_type): Use create_tmp_var_raw instead of
12942 create_tmp_var_for to create the FRAME decl.
12943 (finalize_nesting_tree_1): Do not unchain the FRAME decl.
12944
12945 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
12946
12947 * tree-inline.c (copy_edges_for_bb): Minor tweak.
12948 (maybe_move_debug_stmts_to_successors): Also reset the locus of the
12949 debug statement when resetting its value.
12950 (expand_call_inline): Copy the locus of the call onto the assignment
12951 of the return value, if any. Use local variable in more cases.
12952
12953 2018-06-21 Martin Liska <mliska@suse.cz>
12954
12955 * ipa-pure-const.c (propagate_nothrow): Use
12956 funct_state_summaries->get.
12957 (dump_malloc_lattice): Likewise.
12958 (propagate_malloc): Likewise.
12959
12960 2018-06-21 Richard Biener <rguenther@suse.de>
12961
12962 * lto-streamer-out.c (DFS::DFS_write_tree_body): Update outdated
12963 comment. Follow BLOCK_ABSTRACT_ORIGIN unconditionally.
12964 * tree-streamer-in.c (lto_input_ts_block_tree_pointers): Update
12965 comment.
12966 * tree-streamer-out.c (write_ts_block_tree_pointers): Stream
12967 BLOCK_ABSTRACT_ORIGIN unconditionally.
12968
12969 2018-06-21 David Malcolm <dmalcolm@redhat.com>
12970
12971 * ipa-cp.c (ipcp_driver): Set edge_clone_summaries to NULL after
12972 deleting it.
12973 * ipa-reference.c (ipa_reference_c_finalize): Delete
12974 ipa_ref_opt_sum_summaries and set it to NULL.
12975
12976 2018-06-21 Tom de Vries <tdevries@suse.de>
12977
12978 PR tree-optimization/85859
12979 * tree-ssa-tail-merge.c (stmt_local_def): Copy gimple_is_call
12980 test with comment from bb_no_side_effects_p.
12981
12982 2018-06-21 Richard Biener <rguenther@suse.de>
12983
12984 PR tree-optimization/86232
12985 * tree-ssa-loop-niter.c (number_of_iterations_popcount): Adjust
12986 max for constant niter.
12987
12988 2018-06-21 Andre Vieira <andre.simoesdiasvieira@arm.com>
12989
12990 * config/aarch64/aarch64-simd.md
12991 (*aarch64_crypto_aes<aes_op>v16qi_xor_combine): New.
12992
12993 2018-06-21 Andre Vieira <andre.simoesdiasvieira@arm.com>
12994
12995 * config/aarch64/aarch64-simd.md (aarch64_crypto_aes<aes_op>v16qi):
12996 Make opernads of the unspec commutative.
12997
12998 2018-06-21 Richard Biener <rguenther@suse.de>
12999
13000 * tree-data-ref.c (dr_step_indicator): Handle NULL DR_STEP.
13001 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr):
13002 Avoid calling vect_mark_for_runtime_alias_test with gathers or scatters.
13003 (vect_analyze_data_ref_dependence): Re-order checks to deal with
13004 NULL DR_STEP.
13005 (vect_record_base_alignments): Do not record base alignment
13006 for gathers or scatters.
13007 (vect_compute_data_ref_alignment): Drop return value that is always
13008 true. Bail out early for gathers or scatters.
13009 (vect_enhance_data_refs_alignment): Bail out early for gathers
13010 or scatters.
13011 (vect_find_same_alignment_drs): Likewise.
13012 (vect_analyze_data_refs_alignment): Remove dead code.
13013 (vect_slp_analyze_and_verify_node_alignment): Likewise.
13014 (vect_analyze_data_refs): For possible gathers or scatters do
13015 not create an alternate DR, just check their possible validity
13016 and mark them. Adjust DECL_NONALIASED handling to not rely
13017 on DR_BASE_ADDRESS.
13018 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Do not
13019 update inits of gathers or scatters.
13020 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern):
13021 Also copy gather/scatter flag to pattern vinfo.
13022
13023 2018-06-20 Kelvin Nilsen <kelvin@gcc.gnu.org>
13024
13025 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
13026 behavior of vec_packsu (vector unsigned long long, vector unsigned
13027 long long) to match behavior of vec_packs with same signature.
13028
13029 2018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
13030 Thomas Schwinge <thomas@codesourcery.com>
13031 Cesar Philippidis <cesar@codesourcery.com>
13032
13033 * gimplify.c (gimplify_scan_omp_clauses): Add support for
13034 OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
13035 (gimplify_adjust_omp_clauses): Likewise.
13036 (gimplify_oacc_declare_1): Add support for GOMP_MAP_RELEASE, remove
13037 support for GOMP_MAP_FORCE_{ALLOC,TO,FROM,TOFROM}.
13038 (gimplify_omp_target_update): Update handling of acc update and
13039 enter/exit data.
13040 * omp-low.c (install_var_field): Remove unused parameter
13041 base_pointers_restrict.
13042 (scan_sharing_clauses): Remove base_pointers_restrict parameter.
13043 Update call to install_var_field. Handle OMP_CLAUSE_{IF_PRESENT,
13044 FINALIZE}
13045 (omp_target_base_pointers_restrict_p): Delete.
13046 (scan_omp_target): Update call to scan_sharing_clauses.
13047 * tree-core.h (enum omp_clause_code): Add OMP_CLAUSE_{IF_PRESENT,
13048 FINALIZE}.
13049 * tree-nested.c (convert_nonlocal_omp_clauses): Handle
13050 OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
13051 (convert_local_omp_clauses): Likewise.
13052 * tree-pretty-print.c (dump_omp_clause): Likewise.
13053 * tree.c (omp_clause_num_ops): Add entries for OMP_CLAUSE_{IF_PRESENT,
13054 FINALIZE}.
13055 (omp_clause_code_name): Likewise.
13056
13057 2018-06-20 Jakub Jelinek <jakub@redhat.com>
13058
13059 PR debug/86194
13060 * var-tracking.c (use_narrower_mode_test): Check if shift amount can
13061 be narrowed.
13062
13063 PR tree-optimization/86231
13064 * tree-vrp.c (union_ranges): For ( [ ) ] or ( )[ ] range and
13065 anti-range don't overwrite *vr0min before using it to compute *vr0max.
13066
13067 2018-06-20 Tom de Vries <tdevries@suse.de>
13068
13069 PR tree-optimization/86097
13070 * tree-ssa-loop-manip.c (canonicalize_loop_ivs): Also convert *nit to
13071 iv type if signedness of iv type is not the same as that of *nit.
13072
13073 2018-06-20 Jakub Jelinek <jakub@redhat.com>
13074
13075 * cfgrtl.c (rtl_verify_edges): Formatting fix. If bb->preds has any
13076 EDGE_EH edges, verify they are all EDGE_EH.
13077
13078 2018-06-20 Maya Rashish <coypu@sdf.org>
13079
13080 * ginclude/stddef.h: Limit #include <machine/ansi.h> to NetBSD.
13081
13082 2018-06-20 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
13083
13084 * config/aarch64/aarch64-tuning-flags.def (no_ldp_stp_qregs): New.
13085 * config/aarch64/aarch64.c (xgene1_tunings): Add
13086 AARCH64_EXTRA_TUNE_NO_LDP_STP_QREGS to tune_flags.
13087 (aarch64_mode_valid_for_sched_fusion_p):
13088 Allow 16-byte modes.
13089 (aarch64_classify_address): Allow 16-byte modes for load_store_pair_p.
13090 * config/aarch64/aarch64-ldpstp.md: Add peepholes for LDP STP of
13091 128-bit modes.
13092 * config/aarch64/aarch64-simd.md (load_pair<VQ:mode><VQ2:mode>):
13093 New pattern.
13094 (vec_store_pair<VQ:mode><VQ2:mode>): Likewise.
13095 * config/aarch64/iterators.md (VQ2): New mode iterator.
13096
13097 2018-06-20 Martin Liska <mliska@suse.cz>
13098
13099 * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
13100 Change default ratio from 10 to 8.
13101
13102 2018-06-20 Martin Liska <mliska@suse.cz>
13103
13104 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
13105 New.
13106 (bit_test_cluster::find_bit_tests): Likewise.
13107 (switch_decision_tree::analyze_switch_statement): Find clusters.
13108 * tree-switch-conversion.h (struct jump_table_cluster): Document
13109 hierarchy.
13110
13111 2018-06-20 Martin Liska <mliska@suse.cz>
13112
13113 * tree-switch-conversion.c (switch_conversion::collect):
13114 Record m_uniq property.
13115 (switch_conversion::expand): Bail out for special conditions.
13116 (group_cluster::~group_cluster): New.
13117 (group_cluster::group_cluster): Likewise.
13118 (group_cluster::dump): Likewise.
13119 (jump_table_cluster::emit): New.
13120 (switch_decision_tree::fix_phi_operands_for_edges): New.
13121 (struct case_node): Remove struct.
13122 (jump_table_cluster::can_be_handled): New.
13123 (case_values_threshold): Moved to header.
13124 (reset_out_edges_aux): Likewise.
13125 (jump_table_cluster::is_beneficial): New.
13126 (bit_test_cluster::can_be_handled): Likewise.
13127 (add_case_node): Remove.
13128 (bit_test_cluster::is_beneficial): New.
13129 (case_bit_test::cmp): New.
13130 (bit_test_cluster::emit): New.
13131 (expand_switch_as_decision_tree_p): Remove.
13132 (bit_test_cluster::hoist_edge_and_branch_if_true): New.
13133 (fix_phi_operands_for_edge): Likewise.
13134 (switch_decision_tree::analyze_switch_statement): New.
13135 (compute_cases_per_edge): Move ...
13136 (switch_decision_tree::compute_cases_per_edge): ... here.
13137 (try_switch_expansion): Likewise.
13138 (switch_decision_tree::try_switch_expansion): Likewise.
13139 (record_phi_operand_mapping): Likewise.
13140 (switch_decision_tree::record_phi_operand_mapping): Likewise.
13141 (emit_case_decision_tree): Likewise.
13142 (switch_decision_tree::emit): Likewise.
13143 (balance_case_nodes): Likewise.
13144 (switch_decision_tree::balance_case_nodes): Likewise.
13145 (dump_case_nodes): Likewise.
13146 (switch_decision_tree::dump_case_nodes): Likewise.
13147 (emit_jump): Likewise.
13148 (switch_decision_tree::emit_jump): Likewise.
13149 (emit_cmp_and_jump_insns): Likewise.
13150 (switch_decision_tree::emit_cmp_and_jump_insns): Likewise.
13151 (emit_case_nodes): Likewise.
13152 (switch_decision_tree::emit_case_nodes): Likewise.
13153 (conditional_probability): Remove.
13154 * tree-switch-conversion.h (enum cluster_type): New.
13155 (PRINT_CASE): New.
13156 (struct cluster): Likewise.
13157 (cluster::cluster): Likewise.
13158 (struct simple_cluster): Likewise.
13159 (simple_cluster::simple_cluster): Likewise.
13160 (struct group_cluster): Likewise.
13161 (struct jump_table_cluster): Likewise.
13162 (struct bit_test_cluster): Likewise.
13163 (struct min_cluster_item): Likewise.
13164 (struct case_tree_node): Likewise.
13165 (case_tree_node::case_tree_node): Likewise.
13166 (jump_table_cluster::case_values_threshold): Likewise.
13167 (struct case_bit_test): Likewise.
13168 (struct switch_decision_tree): Likewise.
13169 (struct switch_conversion): Likewise.
13170 (switch_decision_tree::reset_out_edges_aux): Likewise.
13171
13172 2018-06-20 Martin Liska <mliska@suse.cz>
13173
13174 * tree-switch-conversion.c (MAX_CASE_BIT_TESTS): Remove.
13175 (hoist_edge_and_branch_if_true): Likewise.
13176 (expand_switch_using_bit_tests_p): Likewise.
13177 (struct case_bit_test): Likewise.
13178 (case_bit_test_cmp): Likewise.
13179 (emit_case_bit_tests): Likewise.
13180 (switch_conversion::switch_conversion): New class.
13181 (struct switch_conv_info): Remove old struct.
13182 (collect_switch_conv_info): More to ...
13183 (switch_conversion::collect): ... this.
13184 (check_range): Likewise.
13185 (switch_conversion::check_range): Likewise.
13186 (check_all_empty_except_final): Likewise.
13187 (switch_conversion::check_all_empty_except_final): Likewise.
13188 (check_final_bb): Likewise.
13189 (switch_conversion::check_final_bb): Likewise.
13190 (create_temp_arrays): Likewise.
13191 (switch_conversion::create_temp_arrays): Likewise.
13192 (free_temp_arrays): Likewise.
13193 (gather_default_values): Likewise.
13194 (switch_conversion::gather_default_values): Likewise.
13195 (build_constructors): Likewise.
13196 (switch_conversion::build_constructors): Likewise.
13197 (constructor_contains_same_values_p): Likewise.
13198 (switch_conversion::contains_same_values_p): Likewise.
13199 (array_value_type): Likewise.
13200 (switch_conversion::array_value_type): Likewise.
13201 (build_one_array): Likewise.
13202 (switch_conversion::build_one_array): Likewise.
13203 (build_arrays): Likewise.
13204 (switch_conversion::build_arrays): Likewise.
13205 (gen_def_assigns): Likewise.
13206 (switch_conversion::gen_def_assigns): Likewise.
13207 (prune_bbs): Likewise.
13208 (switch_conversion::prune_bbs): Likewise.
13209 (fix_phi_nodes): Likewise.
13210 (switch_conversion::fix_phi_nodes): Likewise.
13211 (gen_inbound_check): Likewise.
13212 (switch_conversion::gen_inbound_check): Likewise.
13213 (process_switch): Use the newly created class.
13214 (switch_conversion::expand): New.
13215 (switch_conversion::~switch_conversion): New.
13216 * tree-switch-conversion.h: New file.
13217
13218 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
13219
13220 * tree-vectorizer.h (NUM_PATTERNS, vect_recog_func_ptr): Move to
13221 tree-vect-patterns.c.
13222 * tree-vect-patterns.c (vect_supportable_direct_optab_p): New function.
13223 (vect_recog_dot_prod_pattern): Use it. Remove the type_in argument.
13224 (vect_recog_sad_pattern): Likewise.
13225 (vect_recog_widen_sum_pattern): Likewise.
13226 (vect_recog_pow_pattern): Likewise. Check for a null vectype.
13227 (vect_recog_widen_shift_pattern): Remove the type_in argument.
13228 (vect_recog_rotate_pattern): Likewise.
13229 (vect_recog_mult_pattern): Likewise.
13230 (vect_recog_vector_vector_shift_pattern): Likewise.
13231 (vect_recog_divmod_pattern): Likewise.
13232 (vect_recog_mixed_size_cond_pattern): Likewise.
13233 (vect_recog_bool_pattern): Likewise.
13234 (vect_recog_mask_conversion_pattern): Likewise.
13235 (vect_try_gather_scatter_pattern): Likewise.
13236 (vect_recog_widen_mult_pattern): Likewise. Check for a null vectype.
13237 (vect_recog_over_widening_pattern): Likewise.
13238 (vect_recog_gather_scatter_pattern): Likewise.
13239 (vect_recog_func_ptr): Move from tree-vectorizer.h
13240 (vect_vect_recog_func_ptrs): Move further down the file.
13241 (vect_recog_func): Likewise. Remove the third argument.
13242 (NUM_PATTERNS): Define based on vect_vect_recog_func_ptrs.
13243 (vect_pattern_recog_1): Expect the pattern function to do any
13244 necessary target tests. Also expect it to provide a vector type.
13245 Remove the type_in handling.
13246
13247 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
13248
13249 * tree-vect-patterns.c (vect_pattern_detected): New function.
13250 (vect_recog_dot_prod_patternm, vect_recog_sad_pattern)
13251 (vect_recog_widen_mult_pattern, vect_recog_widen_sum_pattern)
13252 (vect_recog_over_widening_pattern, vect_recog_widen_shift_pattern
13253 (vect_recog_rotate_pattern, vect_recog_vector_vector_shift_pattern)
13254 (vect_recog_mult_pattern, vect_recog_divmod_pattern)
13255 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
13256 (vect_recog_mask_conversion_pattern)
13257 (vect_try_gather_scatter_pattern): Likewise.
13258
13259 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
13260
13261 * tree-vect-patterns.c (vect_get_internal_def): New function.
13262 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
13263 (vect_recog_vector_vector_shift_pattern, check_bool_pattern)
13264 (search_type_for_mask_1): Use it.
13265
13266 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
13267
13268 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
13269 redundant WIDEN_SUM_EXPR handling.
13270 (vect_recog_sad_pattern): Likewise.
13271
13272 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
13273
13274 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
13275 redundant check that the types of a PLUS_EXPR or MULT_EXPR agree.
13276 (vect_recog_sad_pattern): Likewise PLUS_EXPR, ABS_EXPR and MINUS_EXPR.
13277 (vect_recog_widen_mult_pattern): Likewise MULT_EXPR.
13278 (vect_recog_widen_sum_pattern): Likewise PLUS_EXPR.
13279
13280 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
13281
13282 * tree-vect-stmts.c (vectorizable_call): Make sure that we
13283 use the stmt_vec_info of the original bb statement for the
13284 new zero assignment, even if the call is part of a pattern.
13285
13286 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
13287
13288 * tree-vectorizer.h (_stmt_vec_info): Note above pattern_def_seq
13289 that the sequence is attached to the original statement rather
13290 than the pattern statement.
13291 * tree-vect-loop.c (vect_determine_vf_for_stmt): Take the
13292 PATTERN_DEF_SEQ from the original statement rather than
13293 the main pattern statement.
13294 * tree-vect-stmts.c (free_stmt_vec_info): Likewise.
13295 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Likewise.
13296 (vect_mark_pattern_stmts): Don't copy the PATTERN_DEF_SEQ.
13297
13298 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
13299
13300 * tree-vect-stmts.c (vect_analyze_stmt): Move the handling of pattern
13301 definition statements before the early exit for statements that aren't
13302 live or relevant.
13303 * tree-vect-loop.c (vect_transform_loop_stmt): New function,
13304 split out from...
13305 (vect_transform_loop): ...here. Process pattern definition
13306 statements without first checking whether the main pattern
13307 statement is live or relevant.
13308
13309 2018-06-19 Eric Botcazou <ebotcazou@adacore.com>
13310
13311 * tree-cfgcleanup.c (tree_forwarder_block_p): Do not return false at
13312 -O0 if the locus represent UNKNOWN_LOCATION but have different values.
13313
13314 2018-06-19 Aaron Sawdey <acsawdey@linux.ibm.com>
13315
13316 * config/rs6000/rs6000-string.c (select_block_compare_mode): Check
13317 TARGET_EFFICIENT_OVERLAPPING_UNALIGNED here instead of in caller.
13318 (do_and3, do_and3_mask, do_compb3, do_rotl3): New functions.
13319 (expand_block_compare): Change select_block_compare_mode call.
13320 (expand_strncmp_align_check): Use new functions, fix comment.
13321 (emit_final_str_compare_gpr): New function.
13322 (expand_strn_compare): Refactor and clean up code.
13323 * config/rs6000/vsx.md (vsx_mov<mode>_64bit): Remove *.
13324
13325 2018-06-19 Tony Reix <tony.reix@atos.com>
13326 Damien Bergamini <damien.bergamini@atos.com>
13327 David Edelsohn <dje.gcc@gmail.com>
13328
13329 * collect2.c (static_obj): New variable.
13330 (static_libs): New variable.
13331 (is_in_list): Uncomment declaration.
13332 (main): Track AIX libraries linked statically.
13333 (is_in_list): Uncomment definition.
13334 (scan_prog_file): Don't add AIX shared libraries initializer
13335 to constructor list if linking statically.
13336
13337 2018-06-19 Max Filippov <jcmvbkbc@gmail.com>
13338
13339 * config/xtensa/xtensa.md (UNSPEC_FRAME_BLOCKAGE): New unspec
13340 constant.
13341 (allocate_stack, frame_blockage, *frame_blockage): New patterns.
13342
13343 2018-06-19 Jan Hubicka <hubicka@ucw.cz>
13344
13345 * tree.c (find_decls_types_r): Remove all non-VAR_DECLs from
13346 blocks.
13347
13348 2018-06-19 Martin Liska <mliska@suse.cz>
13349
13350 * config/i386/i386.c (ix86_can_inline_p): Do not use
13351 ipa_fn_summaries::get_create.
13352 * ipa-cp.c (ipcp_cloning_candidate_p): Replace get_create with
13353 get.
13354 (devirtualization_time_bonus): Likewise.
13355 (ipcp_propagate_stage): Likewise.
13356 * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
13357 (edge_set_predicate): Likewise.
13358 (evaluate_conditions_for_known_args): Likewise.
13359 (evaluate_properties_for_edge): Likewise.
13360 (ipa_call_summary::reset): Tranform to ...
13361 (ipa_call_summary::~ipa_call_summary): ... this.
13362 (ipa_fn_summary::reset): Transform to ...
13363 (ipa_fn_summary::~ipa_fn_summary): ... this.
13364 (ipa_fn_summary_t::remove): Rename to ...
13365 (ipa_fn_summary_t::remove_callees): ... this.
13366 (ipa_fn_summary_t::duplicate): Use placement new
13367 instead of memory copy.
13368 (ipa_call_summary_t::duplicate): Likewise.
13369 (ipa_call_summary_t::remove): Remove.
13370 (dump_ipa_call_summary): Change get_create to get.
13371 (ipa_dump_fn_summary): Dump only when summary exists.
13372 (analyze_function_body): Use symbol_summary::get instead
13373 of get_create.
13374 (compute_fn_summary): Likewise.
13375 (estimate_edge_devirt_benefit): Likewise.
13376 (estimate_edge_size_and_time): Likewise.
13377 (inline_update_callee_summaries): Likewise.
13378 (remap_edge_change_prob): Likewise.
13379 (remap_edge_summaries): Likewise.
13380 (ipa_merge_fn_summary_after_inlining): Likewise.
13381 (write_ipa_call_summary): Likewise.
13382 (ipa_fn_summary_write): Likewise.
13383 (ipa_free_fn_summary): Likewise.
13384 * ipa-fnsummary.h (struct GTY): Add new ctor and copy ctor.
13385 (struct ipa_call_summary): Likewise.
13386 * ipa-icf.c (sem_function::merge): Use symbol_summary::get instead
13387 of get_create.
13388 * ipa-inline-analysis.c (do_estimate_edge_time): Likewise.
13389 (estimate_size_after_inlining): Likewise.
13390 (estimate_growth): Likewise.
13391 (growth_likely_positive): Likewise.
13392 * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
13393 (inline_call): Likewise.
13394 * ipa-inline.c (caller_growth_limits): Likewise.
13395 (can_inline_edge_p): Likewise.
13396 (can_inline_edge_by_limits_p): Likewise.
13397 (compute_uninlined_call_time): Likewise.
13398 (compute_inlined_call_time): Likewise.
13399 (want_inline_small_function_p): Likewise.
13400 (edge_badness): Likewise.
13401 (update_caller_keys): Likewise.
13402 (update_callee_keys): Likewise.
13403 (inline_small_functions): Likewise.
13404 (inline_to_all_callers_1): Likewise.
13405 (dump_overall_stats): Likewise.
13406 (early_inline_small_functions): Likewise.
13407 (early_inliner): Likewise.
13408 * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
13409 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
13410 * ipa-pure-const.c (malloc_candidate_p): Likewise.
13411 * ipa-split.c (execute_split_functions): Likewise.
13412 * symbol-summary.h: Likewise.
13413 * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
13414
13415 2018-06-19 Richard Biener <rguenther@suse.de>
13416
13417 * tree-vectorizer.c (try_vectorize_loop_1): Split out of ...
13418 (vectorize_loops): ... here. Fix dbgcnt handling.
13419 (try_vectorize_loop): Wrap try_vectorize_loop_1.
13420
13421 2018-06-19 Segher Boessenkool <segher@kernel.crashing.org>
13422
13423 PR target/86197
13424 * config/rs6000/rs6000.md (rs6000_discover_homogeneous_aggregate): An
13425 ieee128 argument takes up only one (vector) register, not two (floating
13426 point) registers.
13427
13428 2018-06-19 Eric Botcazou <ebotcazou@adacore.com>
13429
13430 * gimplify.c (gimplify_init_constructor): Really never clear for an
13431 incomplete constructor if CONSTRUCTOR_NO_CLEARING is set.
13432
13433 2018-06-19 Richard Biener <rguenther@suse.de>
13434
13435 PR tree-optimization/86179
13436 * tree-vect-patterns.c (vect_pattern_recog_1): Clean up
13437 after failed recognition.
13438
13439 2018-06-18 Martin Sebor <msebor@redhat.com>
13440
13441 PR middle-end/85602
13442 * calls.c (maybe_warn_nonstring_arg): Handle strncat.
13443 * tree-ssa-strlen.c (is_strlen_related_p): Make extern.
13444 Handle integer subtraction.
13445 (maybe_diag_stxncpy_trunc): Handle nonstring source arguments.
13446 * tree-ssa-strlen.h (is_strlen_related_p): Declare.
13447
13448 2018-06-18 David Malcolm <dmalcolm@redhat.com>
13449
13450 * config/frv/frv-protos.h (frv_ifcvt_modify_insn): Strengthen 3rd
13451 param from rtx to rtx_insn *.
13452 * config/frv/frv.c (frv_ifcvt_add_insn): Likewise for "insn"
13453 param.
13454 (frv_ifcvt_modify_insn): Likwise.
13455 (frv_ifcvt_modify_final): Likwise for local "existing_insn",
13456 adding an as_a <rtx_insn *> cast. Likewise for local "insn".
13457 * config/mips/mips.c (r10k_insert_cache_barriers): Add an
13458 as_a <rtx_insn *> cast to local "unprotected_region" once
13459 it's been established that it's not NULL or pc_rtx.
13460 * config/nds32/nds32-relax-opt.c (nds32_group_insns): Strengthen
13461 param "sethi" from rtx to rtx_insn *.
13462 (nds32_group_float_insns): Likewise for param "insn".
13463 * config/vax/vax-protos.h (vax_output_int_add): Likewise for 1st
13464 param.
13465 (vax_output_int_subtract): Likewise.
13466 * config/vax/vax.c (vax_output_int_add): Likewise for param
13467 "insn".
13468 (vax_output_int_subtract): Likewise.
13469 * emit-rtl.c (set_insn_deleted): Likewise, removing cast.
13470 (emit_pattern_after): Likewise for param "after".
13471 (emit_insn_after): Likewise.
13472 (emit_jump_insn_after): Likewise.
13473 (emit_call_insn_after): Likewise.
13474 (emit_debug_insn_after): Likewise.
13475 (emit_pattern_before): Likewise for param "before".
13476 (emit_insn_before): Likewise.
13477 (emit_jump_insn_before): Likewise.
13478 * final.c (get_insn_template): Likewise for param "insn", removing
13479 a cast.
13480 * output.h (get_insn_template): Likewise for 2nd param.
13481 * rtl.h (emit_insn_before): Likewise.
13482 (emit_jump_insn_before): Likewise.
13483 (emit_debug_insn_before_noloc): Likewise.
13484 (emit_insn_after): Likewise.
13485 (emit_jump_insn_after): Likewise.
13486 (emit_call_insn_after): Likewise.
13487 (emit_debug_insn_after): Likewise.
13488 (set_insn_deleted): Likewise for param.
13489
13490 2018-06-18 Michael Meissner <meissner@linux.ibm.com>
13491
13492 PR target/85358
13493 * config/rs6000/rs6000-modes.def (toplevel): Rework the 128-bit
13494 floating point modes, so that IFmode is numerically greater than
13495 TFmode, which is greater than KFmode using FRACTIONAL_FLOAT_MODE
13496 to declare the ordering. This prevents IFmode from being
13497 converted to TFmode when long double is IEEE 128-bit on an ISA 3.0
13498 machine. Include rs6000-modes.h to share the fractional values
13499 between genmodes* and the rest of the compiler.
13500 (IFmode): Likewise.
13501 (KFmode): Likewise.
13502 (TFmode): Likewise.
13503 * config/rs6000/rs6000-modes.h: New file.
13504 * config/rs6000/rs6000.c (rs6000_debug_reg_global): Change the
13505 meaning of rs6000_long_double_size so that 126..128 selects an
13506 appropriate 128-bit floating point type.
13507 (rs6000_option_override_internal): Likewise.
13508 * config/rs6000/rs6000.h (toplevel): Include rs6000-modes.h.
13509 (TARGET_LONG_DOUBLE_128): Change the meaning of
13510 rs6000_long_double_size so that 126..128 selects an appropriate
13511 128-bit floating point type.
13512 (LONG_DOUBLE_TYPE_SIZE): Update comment.
13513 * config/rs6000/rs6000.md (trunciftf2): Correct the modes of the
13514 source and destination to match the standard usage.
13515 (truncifkf2): Likewise.
13516 (copysign<mode>3, IEEE iterator): Rework copysign of float128 on
13517 ISA 2.07 to use an explicit clobber, instead of passing in a
13518 temporary.
13519 (copysign<mode>3_soft): Likewise.
13520
13521 2018-06-18 David Malcolm <dmalcolm@redhat.com>
13522
13523 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
13524 Replace dump_printf_loc call with DUMP_VECT_SCOPE.
13525 (vect_slp_analyze_instance_dependence): Likewise.
13526 (vect_enhance_data_refs_alignment): Likewise.
13527 (vect_analyze_data_refs_alignment): Likewise.
13528 (vect_slp_analyze_and_verify_instance_alignment
13529 (vect_analyze_data_ref_accesses): Likewise.
13530 (vect_prune_runtime_alias_test_list): Likewise.
13531 (vect_analyze_data_refs): Likewise.
13532 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Likewise.
13533 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
13534 (vect_analyze_scalar_cycles_1): Likewise.
13535 (vect_get_loop_niters): Likewise.
13536 (vect_analyze_loop_form_1): Likewise.
13537 (vect_update_vf_for_slp): Likewise.
13538 (vect_analyze_loop_operations): Likewise.
13539 (vect_analyze_loop): Likewise.
13540 (vectorizable_induction): Likewise.
13541 (vect_transform_loop): Likewise.
13542 * tree-vect-patterns.c (vect_pattern_recog): Likewise.
13543 * tree-vect-slp.c (vect_analyze_slp): Likewise.
13544 (vect_make_slp_decision): Likewise.
13545 (vect_detect_hybrid_slp): Likewise.
13546 (vect_slp_analyze_operations): Likewise.
13547 (vect_slp_bb): Likewise.
13548 * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Likewise.
13549 (vectorizable_bswap): Likewise.
13550 (vectorizable_call): Likewise.
13551 (vectorizable_simd_clone_call): Likewise.
13552 (vectorizable_conversion): Likewise.
13553 (vectorizable_assignment): Likewise.
13554 (vectorizable_shift): Likewise.
13555 (vectorizable_operation): Likewise.
13556 * tree-vectorizer.h (DUMP_VECT_SCOPE): New macro.
13557
13558 2018-06-18 Martin Sebor <msebor@redhat.com>
13559
13560 PR tree-optimization/81384
13561 * builtin-types.def (BT_FN_SIZE_CONST_STRING_SIZE): New.
13562 * builtins.c (expand_builtin_strnlen): New function.
13563 (expand_builtin): Call it.
13564 (fold_builtin_n): Avoid setting TREE_NO_WARNING.
13565 * builtins.def (BUILT_IN_STRNLEN): New.
13566 * calls.c (maybe_warn_nonstring_arg): Handle BUILT_IN_STRNLEN.
13567 Warn for bounds in excess of maximum object size.
13568 * tree-ssa-strlen.c (maybe_set_strlen_range): Return tree representing
13569 single-value ranges. Handle strnlen.
13570 (handle_builtin_strlen): Handle strnlen.
13571 (strlen_check_and_optimize_stmt): Same.
13572 * doc/extend.texi (Other Builtins): Document strnlen.
13573
13574 2018-06-18 Maya Rashish <coypu@sdf.org>
13575
13576 * config/alpha/openbsd.h (TARGET_DEFAULT): Define.
13577 (LINK_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): Likewise.
13578 (INTMAX_TYPE, UINTMAX_TYPE, WINT_TYPE): Likewise.
13579
13580 * config/alpha/elf.h (STARTFILE_SPEC, ENDFILE_SPEC): Move from
13581 here to ...
13582 * config/alpha/linux.h (STARTFILE_SPEC, ENDFILE_SPEC): Here.
13583
13584 2018-06-18 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
13585
13586 * tree.c (escaped_string::escape): Replace cast to char * by
13587 const_cast<char *> (unescaped).
13588
13589 2018-06-18 Nick Clifton <nickc@redhat.com>
13590
13591 PR 84195
13592 * tree.c (escaped_string): New class. Converts an unescaped
13593 string into its escaped equivalent.
13594 (warn_deprecated_use): Use the new class to convert the
13595 deprecation message, if present.
13596 (test_escaped_strings): New self test.
13597 (test_c_tests): Add test_escaped_strings.
13598 * doc/extend.texi (deprecated): Add a note that the
13599 deprecation message is affected by the -fmessage-length
13600 option, and that control characters will be escaped.
13601 (#pragma GCC error): Document this pragma.
13602 (#pragma GCC warning): Likewise.
13603 * doc/invoke.texi (-fmessage-length): Document this option's
13604 effect on the #warning and #error preprocessor directives and
13605 the deprecated attribute.
13606
13607 2018-06-18 Eric Botcazou <ebotcazou@adacore.com>
13608
13609 * tree.c (decl_value_expr_lookup): Revert latest change.
13610 (decl_value_expr_insert): Likewise.
13611
13612 2018-06-17 Eric Botcazou <ebotcazou@adacore.com>
13613
13614 * gimplify.c (nonlocal_vlas): Delete.
13615 (nonlocal_vla_vars): Likewise.
13616 (gimplify_var_or_parm_decl): Do not add debug VAR_DECLs for non-local
13617 referenced VLAs.
13618 (gimplify_body): Do not create and destroy nonlocal_vlas.
13619 * tree-nested.c: Include diagnostic.h.
13620 (use_pointer_in_frame): Tweak.
13621 (lookup_field_for_decl): Add assertion and declare the transformation.
13622 (convert_nonlocal_reference_op) <PARM_DECL>: Rework and issue an
13623 internal error when the reference is in a wrong context. Do not
13624 create a debug decl by default.
13625 (note_nonlocal_block_vlas): Delete.
13626 (convert_nonlocal_reference_stmt) <GIMPLE_BIND>: Do not call it.
13627 (convert_local_reference_op) <PARM_DECL>: Skip the frame decl. Do not
13628 create a debug decl by default.
13629 (convert_gimple_call) <GIMPLE_CALL>: Issue an internal error when the
13630 call is in a wrong context.
13631 (fixup_vla_decls): New function.
13632 (finalize_nesting_tree_1): Adjust comment. Call fixup_vla_decls if no
13633 debug variables were created.
13634 * tree.c (decl_value_expr_lookup): Add checking assertion.
13635 (decl_value_expr_insert): Likewise.
13636
13637 2018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
13638
13639 PR middle-end/82479
13640 * ipa-fnsummary.c (will_be_nonconstant_expr_predicate): Handle CALL_EXPR.
13641 * tree-scalar-evolution.c (interpret_expr): Likewise.
13642 (expression_expensive_p): Likewise.
13643 * tree-ssa-loop-ivopts.c (contains_abnormal_ssa_name_p): Likewise.
13644 * tree-ssa-loop-niter.c (number_of_iterations_popcount): New.
13645 (number_of_iterations_exit_assumptions): Use number_of_iterations_popcount.
13646 (ssa_defined_by_minus_one_stmt_p): New.
13647
13648 2018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
13649
13650 PR middle-end/64946
13651 * cfgexpand.c (expand_debug_expr): Hande ABSU_EXPR.
13652 * config/i386/i386.c (ix86_add_stmt_cost): Likewise.
13653 * dojump.c (do_jump): Likewise.
13654 * expr.c (expand_expr_real_2): Check operand type's sign.
13655 * fold-const.c (const_unop): Handle ABSU_EXPR.
13656 (fold_abs_const): Likewise.
13657 * gimple-pretty-print.c (dump_unary_rhs): Likewise.
13658 * gimple-ssa-backprop.c (backprop::process_assign_use): Likesie.
13659 (strip_sign_op_1): Likesise.
13660 * match.pd: Add new pattern to generate ABSU_EXPR.
13661 * optabs-tree.c (optab_for_tree_code): Handle ABSU_EXPR.
13662 * tree-cfg.c (verify_gimple_assign_unary): Likewise.
13663 * tree-eh.c (operation_could_trap_helper_p): Likewise.
13664 * tree-inline.c (estimate_operator_cost): Likewise.
13665 * tree-pretty-print.c (dump_generic_node): Likewise.
13666 * tree-vect-patterns.c (vect_recog_sad_pattern): Likewise.
13667 * tree.def (ABSU_EXPR): New.
13668
13669 2018-06-16 Jakub Jelinek <jakub@redhat.com>
13670
13671 PR middle-end/86095
13672 * common.opt (Wunsafe-loop-optimizations): Add Ignore, remove Var,
13673 documented as preserved for backward compatibility only.
13674 * doc/invoke.texi: Remove -Wunsafe-loop-optimizations documentation.
13675
13676 PR rtl-optimization/86108
13677 * bb-reorder.c (create_forwarder_block): Renamed to ...
13678 (create_eh_forwarder_block): ... this. Split OLD_BB after labels and
13679 jump from new landing pad to the second part.
13680 (sjlj_fix_up_crossing_landing_pad, dw2_fix_up_crossing_landing_pad):
13681 Adjust callers.
13682
13683 2018-06-15 Jakub Jelinek <jakub@redhat.com>
13684
13685 PR middle-end/85878
13686 * expr.c (expand_assignment): Remove now redundant COMPLEX_MODE_P
13687 check from first store_expr, use to_mode instead of GET_MODE (to_rtx).
13688 Only call store_expr for halves if the mode is the same.
13689
13690 PR middle-end/86123
13691 * match.pd ((X / Y) == 0 -> X < Y): Don't transform complex divisions.
13692 Fix up comment formatting.
13693
13694 2018-06-15 Bernd Edlinger <bernd.edlinger@hotmail.de>
13695
13696 * typed-splay-tree.h (typed_splay_tree::remove): New function.
13697 (typed_splay_tree::closure,
13698 typed_splay_tree::inner_foreach_fn, typed_splay_tree::m_inner): Deleted.
13699 (typed_splay_tree::typed_splay_tree,
13700 typed_splay_tree::operator =): Declared private.
13701 (typed_splay_tree::splay_tree_key, typed_splay_tree::splay_tree_value,
13702 typed_splay_tree::splay_tree_node_s, typed_splay_tree::KDEL,
13703 typed_splay_tree::VDEL, typed_splay_tree::splay_tree_delete_helper,
13704 typed_splay_tree::rotate_left, typed_splay_tree::rotate_right,
13705 typed_splay_tree::splay_tree_splay,
13706 typed_splay_tree::splay_tree_foreach_helper,
13707 typed_splay_tree::splay_tree_insert,
13708 typed_splay_tree::splay_tree_remove,
13709 typed_splay_tree::splay_tree_lookup,
13710 typed_splay_tree::splay_tree_predecessor,
13711 typed_splay_tree::splay_tree_successor,
13712 typed_splay_tree::splay_tree_min,
13713 typed_splay_tree::splay_tree_max): Took over from splay-tree.c/.h.
13714 (typed_splay_tree::root, typed_splay_tree::comp,
13715 typed_splay_tree::delete_key,
13716 typed_splay_tree::delete_value): New data members.
13717 * typed-splay-tree.c (selftest::test_str_to_int): Add a test for
13718 typed_splay_tree::remove.
13719
13720 2018-06-15 Matthew Fortune <matthew.fortune@mips.com>
13721
13722 * config/mips/mips.h (ASM_SPEC): Pass through -mcrc, -mno-crc,
13723 -mginv and -mno-ginv to the assembler.
13724 * config/mips/mips.opt (-mcrc): New option.
13725 (-mginv): Likewise.
13726 * doc/invoke.text (-mcrc): Document.
13727 (-mginv): Likewise.
13728
13729 2018-06-15 Nick Clifton <nickc@redhat.com>
13730
13731 PR 84195
13732 * tree.c (escaped_string): New class. Converts an unescaped
13733 string into its escaped equivalent.
13734 (warn_deprecated_use): Use the new class to convert the
13735 deprecation message, if present.
13736 (test_escaped_strings): New self test.
13737 (test_c_tests): Add test_escaped_strings.
13738 * doc/extend.texi (deprecated): Add a note that the
13739 deprecation message is affected by the -fmessage-length
13740 option, and that control characters will be escaped.
13741 (#pragma GCC error): Document this pragma.
13742 (#pragma GCC warning): Likewise.
13743 * doc/invoke.texi (-fmessage-length): Document this option's
13744 effect on the #warning and #error preprocessor directives and
13745 the deprecated attribute.
13746
13747 2018-06-15 Richard Biener <rguenther@suse.de>
13748
13749 * tree-vect-slp.c (vect_slp_bb): Dump MSG_OPTIMIZED_LOCATIONS
13750 here, also noting vector size used.
13751 * tree-vectorizer.c (vectorize_loops): Adjust. Note vector
13752 size used in MSG_OPTIMIZED_LOCATIONS dump.
13753 (pass_slp_vectorize::execute): Adjust.
13754
13755 2018-06-15 Claudiu Zissulescu <claziss@synopsys.com>
13756
13757 PR target/85968
13758 * config/arc/arc.c (arc_return_address_register): Fix
13759 if-condition.
13760
13761 2018-06-15 Richard Biener <rguenther@suse.de>
13762
13763 PR middle-end/86159
13764 * tree-cfg.c (gimplify_build3): Do not strip sign conversions,
13765 leave useless conversion stripping to force_gimple_operand_gsi.
13766 (gimplify_build2): Likewise.
13767 (gimplify_build1): Likewise.
13768
13769 2018-06-15 Richard Biener <rguenther@suse.de>
13770
13771 PR middle-end/86076
13772 * tree-cfg.c (move_stmt_op): unshare invariant addresses
13773 before adjusting their block.
13774
13775 2018-06-15 Sebastian Huber <sebastian.huber@embedded-brains.de>
13776
13777 * config.gcc (riscv*-*-elf* | riscv*-*-rtems*): Use custom
13778 multilibs for *-*-rtems*.
13779 * config/riscv/t-rtems: New file.
13780
13781 2018-06-14 Jakub Jelinek <jakub@redhat.com>
13782
13783 PR middle-end/86122
13784 * match.pd ((A +- CST1) +- CST2): Punt if last resort
13785 unsigned_type_for returns NULL.
13786
13787 PR target/85945
13788 * lower-subreg.c (find_decomposable_subregs): Don't decompose float
13789 subregs of multi-word pseudos unless the float mode has word size.
13790
13791 2018-06-14 Richard Biener <rguenther@suse.de>
13792
13793 PR middle-end/86139
13794 * tree-vect-generic.c (build_word_mode_vector_type): Remove
13795 duplicate and harmful type_hash_canon.
13796 * tree.c (type_hash_canon): Assert we didn't find ourselves.
13797
13798 2018-06-14 Richard Biener <rguenther@suse.de>
13799
13800 PR ipa/86124
13801 * tree-ssa-struct-alias.c (create_variable_info_for): Handle
13802 NULL cgraph_node.
13803
13804 2018-06-14 Sebastian Huber <sebastian.huber@embedded-brains.de>
13805
13806 * config/rtems.h (STDINT_LONG32): Define.
13807
13808 2018-06-13 Matthew Fortune <matthew.fortune@mips.com>
13809 Prachi Godbole <prachi.godbole@imgtec.com>
13810
13811 * config/mips/mips-cpus.def: Define P6600.
13812 * config/mips/mips-tables.opt: Regenerate.
13813 * config/mips/mips.c (mips_ucbranch_type): New enum.
13814 (mips_rtx_cost_data): Add support for P6600.
13815 (mips_issue_rate): Likewise.
13816 (mips_multipass_dfa_lookahead): Likewise.
13817 (mips_avoid_hazard): Likewise.
13818 (mips_reorg_process_insns): Likewise.
13819 (mips_classify_branch_p6600): New function.
13820 * config/mips/mips.h (TUNE_P6600): New define.
13821 (MIPS_ISA_LEVEL_SPEC): Infer mips64r6 from p6600.
13822 (ENABLE_LD_ST_PAIRS): Enable load/store bonding for p6600.
13823 * config/mips/mips.md: Include p6600.md.
13824 (processor): Add p6600.
13825 * config/mips/p6600.md: New file.
13826 * doc/invoke.texi: Add p6600 to supported architectures.
13827
13828 2018-06-13 Martin Sebor <msebor@redhat.com>
13829
13830 PR tree-optimization/86114
13831 * gimple-fold.c (gimple_fold_builtin_strlen): Only handle LHS
13832 of integer types.
13833 * tree-ssa-strlen.c (maybe_set_strlen_range): Same.
13834
13835 2018-06-13 Richard Biener <rguenther@suse.de>
13836
13837 * tree-vect-patterns.c (vect_recog_vector_vector_shift_pattern):
13838 Properly set vector type of the intermediate stmt.
13839 * tree-vect-stmts.c (vectorizable_operation): The destination
13840 var always has vectype_out type.
13841
13842 2018-06-13 Jeff Law <law@redhat.com>
13843
13844 * config/rl78/rl78.c (move_elim_pass): Use TDF_NONE rather than
13845 integer 0 for argument to print_rtl_with_bb.
13846 (rl78_reorg): Likewise.
13847
13848 2018-06-13 David Malcolm <dmalcolm@redhat.com>
13849
13850 * config/arc/arc.c (hwloop_optimize): Strengthen local "end_label"
13851 from rtx to rtx_insn *.
13852 * config/bfin/bfin.c (hwloop_optimize): Likewise for local
13853 "label".
13854 (add_sched_insns_for_speculation): Likewise for local "target",
13855 converting usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
13856 * config/c6x/c6x.c (reorg_split_calls): Strengthen param "call_labels"
13857 from rtx_insn ** to rtx_code_label **.
13858 (reorg_emit_nops): Likewise.
13859 (c6x_reorg): Likewise for local "call_labels".
13860 * config/sh/sh-protos.h (get_dest_uid): Strengthen 1st param from
13861 rtx to rtx_insn *.
13862 * config/sh/sh.c (dump_table): Strengthen local "lab" from rtx to
13863 rtx_code_label *, adding safe_as_a <rtx_code_label *> casts to
13864 the loops over LABEL_REFS.
13865 (fixup_addr_diff_vecs): Add as_a <rtx_insn *> to usage of
13866 braf_label.
13867 (barrier_align): Convert usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
13868 (get_dest_uid): Strengthen param "label" from rtx to rtx_insn *.
13869 (split_branches): Strengthen local "olabel" from rtx to
13870 rtx_insn *, adding a safe_as_a cast.
13871 * emit-rtl.c (next_real_insn): Strengthen param from "rtx"
13872 to "rtx_insn *".
13873 (add_insn_after): Likewise for first two params.
13874 (add_insn_before): Likewise.
13875 (remove_insn): Likewise for param.
13876 (emit_pattern_before_noloc): Likewise for second and third params.
13877 (emit_jump_insn_before_noloc): Convert NULL_RTX to NULL.
13878 (emit_call_insn_before_noloc): Likewise.
13879 (emit_debug_insn_before_noloc): Strengthen "before" param from "rtx"
13880 to "rtx_insn *".
13881 (emit_barrier_before): Likewise.
13882 (emit_label_before): Strengthen "label" param from "rtx" to
13883 "rtx_code_label *". Strengthen "before" param from "rtx" to
13884 "rtx_insn *".
13885 (emit_insn_after_1): Strengthen "after" param from "rtx" to
13886 "rtx_insn *".
13887 (emit_pattern_after_noloc): Likewise.
13888 (emit_insn_after_noloc): Likewise.
13889 (emit_jump_insn_after_noloc): Likewise.
13890 (emit_call_insn_after_noloc): Likewise.
13891 (emit_debug_insn_after_noloc): Likewise.
13892 (emit_barrier_after): Likewise.
13893 (emit_label_after): Likewise for both params.
13894 (emit_pattern_after_setloc): Likewise for "after" param. Convert
13895 "loc" param from "int" to "location_t".
13896 (emit_insn_after_setloc): Likewise.
13897 (emit_jump_insn_after_setloc): Likewise.
13898 (emit_call_insn_after_setloc): Likewise.
13899 (emit_debug_insn_after_setloc): Likewise.
13900 (emit_pattern_before_setloc): Likewise for "before" param. Convert
13901 "loc" param from "int" to "location_t".
13902 (emit_pattern_before): Convert NULL_RTX to NULL.
13903 (emit_insn_before_setloc): Convert "loc" param from "int" to
13904 "location_t".
13905 (emit_jump_insn_before_setloc): Likewise.
13906 (emit_call_insn_before_setloc): Likewise.
13907 (emit_debug_insn_before_setloc): Strengthen "before" param from rtx to
13908 rtx_insn *. Convert "loc" param from "int" to "location_t".
13909 * rtl.h (emit_insn_before_setloc, emit_jump_insn_before_setloc,
13910 emit_call_insn_before_setloc, emit_debug_insn_before_setloc):
13911 Convert 3rd param from "int" to "location_t".
13912 (emit_barrier_before, emit_barrier_after, next_real_insn):
13913 Strengthen param from rtx to rtx_insn *.
13914 (emit_label_before): Strengthen 1st param from "rtx" to
13915 "rtx_code_label *". Strengthen 2nd param from "rtx" to
13916 "rtx_insn *".
13917 (emit_insn_after_noloc, emit_jump_insn_after_noloc,
13918 emit_call_insn_after_noloc, emit_debug_insn_after_noloc):
13919 Strengthen 2nd param from "rtx" to "rtx_insn *".
13920 (emit_insn_after_setloc, emit_jump_insn_after_setloc)
13921 emit_call_insn_after_setloc, emit_debug_insn_after_setloc):
13922 Likewise. Convert 3rd param from "int" to "location_t".
13923 (emit_label_after): Strengthen 1st param from "rtx" to
13924 "rtx_code_label *".
13925 (next_real_insn, remove_insn): Strengthen param from "rtx" to
13926 "rtx_insn *".
13927 (add_insn_before, add_insn_after): Strengthen 1st and 2nd params
13928 from "rtx" to "rtx_insn *".
13929
13930 2018-06-13 Jan Hubicka <hubicka@gcc.gnu.org>
13931
13932 * cgraph.c (cgraph_node::get_untransformed_body): Dump function
13933 bodies streamed in with -Q.
13934 * dumpfile.c (dump_files): Add lto-stream-out dump file.
13935 * dumpfile.h (tree_dump_index): Add lto_stream_out.
13936 * gimple-streamer-out.c: Include gimple-pretty-print.h
13937 (output_bb): Dump stmts streamed.
13938 * lto-section-out.c: Include print-tree.h
13939 (lto_begin_section): Dump sections created.
13940 (lto_output_decl_index): Dump decl encoded.
13941 * lto-streamer-out.c: Include print-tree.h
13942 (create_output_block): Dump output block created.
13943 (DFS::DFS_write_tree_body): Dump DFS SCCs streamed.
13944 (output_function): Dump function output.
13945 (output_constructor): Dump constructor streamed.
13946 (write_global_stream): Output indexes encoded.
13947 (produce_asm_for_decls): Dump streams encoded.
13948 * lto-streamer.c (streamer_dump_file): New global var.
13949 * lto-streamer.h (streamer_dump_file): Declare.
13950 * passes.c (ipa_write_summaries): Initialize streamer dump.
13951 * varpool.c (varpool_node::get_constructor): Dump constructors streamed
13952 in.
13953
13954 2018-06-13 Eric Botcazou <ebotcazou@adacore.com>
13955
13956 PR target/86048
13957 * config/i386/winnt.c (i386_pe_seh_cold_init): Do not emit negative
13958 offsets for register save directives. Emit a second batch of save
13959 directives, if need be, when the function accesses prior frames.
13960
13961 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
13962
13963 * config/arc/fpu.md (fmasf4): Force operand to register.
13964 (fnmasf4): Likewise.
13965
13966 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
13967
13968 * config/arc/arc-protos.h (arc_pad_return): Remove.
13969 * config/arc/arc.c (machine_function): Remove force_short_suffix
13970 and size_reason.
13971 (arc_print_operand): Adjust printing of '&'.
13972 (arc_verify_short): Remove conditional printing of short suffix.
13973 (arc_final_prescan_insn): Remove reference to size_reason.
13974 (pad_return): New function.
13975 (arc_reorg): Call pad_return.
13976 (arc_pad_return): Remove.
13977 (arc_init_machine_status): Remove reference to force_short_suffix.
13978 * config/arc/arc.md (vunspec): Add VUNSPEC_ARC_BLOCKAGE.
13979 (attr length): When attribute iscompact is true force to 2
13980 regardless; in the case of maybe check if we want to force the
13981 instruction to have 4 bytes length.
13982 (nopv): Change it to generate 4 byte long nop as well.
13983 (blockage): New pattern.
13984 (simple_return): Remove call to arc_pad_return.
13985 (p_return_i): Likewise.
13986
13987 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
13988
13989 * config/arc/elf.h (LINK_GCC_C_SEQUENCE_SPEC): Define.
13990
13991 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
13992
13993 * config/arc/builtins.def (SYNC): SYNC instruction is valid on all
13994 ARC cores.
13995
13996 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
13997
13998 * config/arc/arc.c (atomic_exchangesi): EX instruction is default
13999 for ARC700 and ARCv2.
14000
14001 2018-06-13 Chenghua Xu <paul.hua.gm@gmail.com>
14002
14003 PR target/86076
14004 * config/mips/loongson.md (vec_setv4hi): Gen_lowpart for
14005 operands[2] instead of operands[1].
14006
14007
14008 2018-06-12 Richard Sandiford <richard.sandiford@linaro.org>
14009
14010 * lra-constraints.c (simplify_operand_subreg): In the paradoxical
14011 case, check whether the outer register overlaps an unallocatable
14012 register, not just whether it fits the required class.
14013
14014 2018-06-12 Richard Sandiford <richard.sandiford@linaro.org>
14015
14016 * poly-int.h (can_div_trunc_p): Add new overload in which all values
14017 are poly_ints.
14018 * alias.c (get_addr): Extend CONST_INT handling to poly_int_rtx_p.
14019 (memrefs_conflict_p): Likewise.
14020 (init_alias_analysis): Likewise.
14021 * cfgexpand.c (expand_debug_expr): Likewise.
14022 * combine.c (combine_simplify_rtx, force_int_to_mode): Likewise.
14023 * cse.c (fold_rtx): Likewise.
14024 * explow.c (adjust_stack, anti_adjust_stack): Likewise.
14025 * expr.c (emit_block_move_hints): Likewise.
14026 (clear_storage_hints, push_block, emit_push_insn): Likewise.
14027 (store_expr_with_bounds, reduce_to_bit_field_precision): Likewise.
14028 (emit_group_load_1): Use rtx_to_poly_int64 for group offsets.
14029 (emit_group_store): Likewise.
14030 (find_args_size_adjust): Use strip_offset. Use rtx_to_poly_int64
14031 to read the PRE/POST_MODIFY increment.
14032 * calls.c (store_one_arg): Use strip_offset.
14033 * rtlanal.c (rtx_addr_can_trap_p_1): Extend CONST_INT handling to
14034 poly_int_rtx_p.
14035 (set_noop_p): Use rtx_to_poly_int64 for the elements selected
14036 by a VEC_SELECT.
14037 * simplify-rtx.c (avoid_constant_pool_reference): Use strip_offset.
14038 (simplify_binary_operation_1): Extend CONST_INT handling to
14039 poly_int_rtx_p.
14040 * var-tracking.c (compute_cfa_pointer): Take a poly_int64 rather
14041 than a HOST_WIDE_INT.
14042 (hard_frame_pointer_adjustment): Change from HOST_WIDE_INT to
14043 poly_int64.
14044 (adjust_mems, add_stores): Update accodingly.
14045 (vt_canonicalize_addr): Track polynomial offsets.
14046 (emit_note_insn_var_location): Likewise.
14047 (vt_add_function_parameter): Likewise.
14048 (vt_initialize): Likewise.
14049
14050 2018-06-12 Jeff Law <law@redhat.com>
14051
14052 * config.gcc (alpha*-*-freebsd*): Remove.
14053 * config/alpha/freebsd.h: Remove.
14054
14055 2018-06-12 David Malcolm <dmalcolm@redhat.com>
14056
14057 PR other/69968
14058 * spellcheck-tree.c (levenshtein_distance): Rename to...
14059 (get_edit_distance): ...this, and update for underlying renaming.
14060 * spellcheck-tree.h (levenshtein_distance): Rename to...
14061 (get_edit_distance): ...this.
14062 * spellcheck.c (levenshtein_distance): Rename to...
14063 (get_edit_distance): ...this. Convert from Levenshtein distance
14064 to Damerau-Levenshtein distance by supporting transpositions of
14065 adjacent characters. Rename "v1" to "v_next" and "v0" to
14066 "v_one_ago".
14067 (selftest::levenshtein_distance_unit_test_oneway): Rename to...
14068 (selftest::test_edit_distance_unit_test_oneway): ...this, and
14069 update for underlying renaming.
14070 (selftest::levenshtein_distance_unit_test): Rename to...
14071 (selftest::test_get_edit_distance_unit): ...this, and update for
14072 underlying renaming.
14073 (selftest::test_find_closest_string): Add example from PR 69968
14074 where transposition helps
14075 (selftest::test_metric_conditions): Update for renaming.
14076 (selftest::test_metric_conditions): Likewise.
14077 (selftest::spellcheck_c_tests): Likewise.
14078 * spellcheck.h (levenshtein_distance): Rename both overloads to...
14079 (get_edit_distance): ...this.
14080 (best_match::consider): Update for renaming.
14081
14082 2018-06-12 Martin Sebor <msebor@redhat.com>
14083
14084 PR tree-optimization/85259
14085 * builtins.c (compute_objsize): Handle constant offsets.
14086 * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Return
14087 true iff a warning has been issued.
14088 * gimple.h (gimple_nonartificial_location): New function.
14089 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Call
14090 gimple_nonartificial_location and handle -Wno-system-headers.
14091 (handle_builtin_stxncpy): Same.
14092
14093 2018-06-12 Martin Sebor <msebor@redhat.com>
14094
14095 PR c/85931
14096 * fold-const.c (operand_equal_p): Handle SAVE_EXPR.
14097
14098 2018-06-12 Will Schmidt <will_schmidt@vnet.ibm.com>
14099
14100 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add
14101 BUILTIN_VEC_XST entries for pointer to double and long long.
14102
14103 2018-06-12 H.J. Lu <hongjiu.lu@intel.com>
14104
14105 PR target/85990
14106 * config/i386/gnu-user.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
14107 Update comments.
14108 * config/i386/gnu-user64.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
14109 Likewise.
14110
14111 2018-06-12 Martin Liska <mliska@suse.cz>
14112
14113 * doc/options.texi: Document IntegerRange.
14114
14115 2018-06-12 Martin Liska <mliska@suse.cz>
14116
14117 * config/i386/i386.opt: Make MPX-related options as Deprecated.
14118 * opt-functions.awk: Handle Deprecated flag.
14119 * opts-common.c (decode_cmdline_option): Handle cl_deprecated
14120 and report error.
14121 (read_cmdline_option): Report warning for a deprecated option.
14122 * opts.h (struct cl_option): Add new field cl_deprecated.
14123 (CL_ERR_DEPRECATED): New.
14124
14125 2018-06-12 Martin Liska <mliska@suse.cz>
14126
14127 * doc/options.texi: Document Deprecated option flag.
14128
14129 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
14130
14131 * config/arc/arc-arch.h (arc_extras): New enum.
14132 (arc_cpu_t):Add field extra.
14133 (arc_cpu_types): Consider the extras.
14134 * config/arc/arc-cpus.def: Add extras info.
14135 * config/arc/arc-opts.h (processor_type): Consider extra field.
14136 * config/arc/arc.c (arc_override_options): Handle extra field.
14137
14138 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
14139
14140 * config/arc/arc-arch.h: Update ARC_OPTX macro.
14141 * config/arc/arc-options.def (ARC_OPTX): Introduce a new doc
14142 field.
14143 * config/arc/arc.c (arc_init): Update pic warning.
14144 (irq_range): Update irq range parsing warnings.
14145 (arc_override_options): Update various warning messages.
14146 (arc_handle_aux_attribute): Likewise.
14147
14148 2018-06-12 Robert Suchanek <robert.suchanek@mips.com>
14149
14150 * config/mips/i6400.md (i6400_fpu_fadd): Remove frint.
14151
14152 2018-06-12 Jozef Lawrynowicz <jozef.l@mittosystems.com>
14153
14154 * doc/sourcebuild.texi: Document usage of line number 0 in verify
14155 compiler messages directives.
14156
14157 2018-06-12 Matthew Fortune <mfortune@gmail.com>
14158
14159 * config/mips/mips-cpus.def: New MIPS_CPU for i6500.
14160 * config/mips/mips-tables.opt: Regenerate.
14161 * config/mips/mips.h (MIPS_ISA_LEVEL_SPEC): Mark i6500 as
14162 mips64r6.
14163 * doc/invoke.texi: Document -march=i6500.
14164
14165 2018-06-12 Prachi Godbole <prachi.godbole@imgtec.com>
14166
14167 * config/mips/i6400.md (i6400_gpmuldiv): Remove cpu_unit.
14168 (i6400_gpmul): Add cpu_unit.
14169 (i6400_gpdiv): Likewise.
14170 (i6400_msa_add_d): Update reservations.
14171 (i6400_msa_int_add) Likewise.
14172 (i6400_msa_short_logic3) Likewise.
14173 (i6400_msa_short_logic2) Likewise.
14174 (i6400_msa_short_logic) Likewise.
14175 (i6400_msa_move) Likewise.
14176 (i6400_msa_cmp) Likewise.
14177 (i6400_msa_short_float2) Likewise.
14178 (i6400_msa_div_d) Likewise.
14179 (i6400_msa_long_logic1) Likewise.
14180 (i6400_msa_long_logic2) Likewise.
14181 (i6400_msa_mult) Likewise.
14182 (i6400_msa_long_float2) Likewise.
14183 (i6400_msa_long_float4) Likewise.
14184 (i6400_msa_long_float5) Likewise.
14185 (i6400_msa_long_float8) Likewise.
14186 (i6400_fpu_fadd): Include frint type.
14187 (i6400_fpu_store): New define_insn_reservation.
14188 (i6400_fpu_load): Likewise.
14189 (i6400_fpu_move): Likewise.
14190 (i6400_fpu_fcmp): Likewise.
14191 (i6400_fpu_fmadd): Likewise.
14192 (i6400_int_mult): Include imul3nc type and update reservation.
14193 (i6400_int_div): Include idiv3 type and update reservation.
14194 (i6400_int_load): Update to check type not move_type.
14195 (i6400_int_store): Likewise.
14196 (i6400_int_prefetch): Set zero latency.
14197
14198 2018-06-12 Eric Botcazou <ebotcazou@adacore.com>
14199
14200 * gcc.c: Document new %@{...} sequence.
14201 (LINK_COMMAND_SPEC): Use it for the -L switches.
14202 (cpp_unique_options): Use it for the -I switches.
14203 (at_file_argbuf): New global variable.
14204 (in_at_file): Likewise.
14205 (alloc_args): Create at_file_argbuf.
14206 (clear_args): Truncate at_file_argbuf.
14207 (store_arg): If in_at_file, push the argument onto at_file_argbuf.
14208 (open_at_file): New function.
14209 (close_at_file): Likewise.
14210 (create_at_file): Delete.
14211 (do_spec_1) <'i'>: Use open_at_file/close_at_file.
14212 <'o'>: Likewise.
14213 <'@'>: New case.
14214 (validate_switches_from_spec): Deal with %@{...} sequence.
14215 (validate_switches): Likewise.
14216 (driver::finalize): Call clear_args.
14217
14218 2018-06-11 Rasmus Villemoes <rasmus.villemoes@prevas.dk>
14219
14220 * config/vx-common.h (USE_TM_CLONE_REGISTRY): #define to 0.
14221
14222 2018-06-11 Martin Sebor <msebor@redhat.com>
14223
14224 * doc/invoke.texi (-Wall): List -Wc++17-compat.
14225 (Wno-class-memaccess): Add @opindex.
14226 (Wno-templates, Wno-multiple-inheritance): Same.
14227 (Wno-virtual-inheritance, Wno-namespaces): Same.
14228 (Wno-pedantic, Wno-chkp, Wcoverage-mismatch): Same.
14229 (Wno-format-overflow, Wno-format-truncation): Same.
14230 (Wno-unused-local-typedefs, Walloc-size-larger-than): Same.
14231 (Wno-alloc-size-larger-than, Wframe-larger-than): Same
14232 (Wno-stack-usage, Wno-c++-compat, Wno-c++11-compat): Same.
14233 (Wno-c++14-compat, Wno-c++17-compat, Wno-openmp-simd): Same.
14234 (Wno-unsuffixed-float-constants, Wno-addr-space-convert): Same.
14235 (Wno-misspelled-isr): Same.
14236
14237 2018-06-11 Martin Sebor <msebor@redhat.com>
14238
14239 * PR tree-optimization/86083
14240 * tree-ssa-strlen.c (handle_char_store): Use tree_expr_nonzero_p.
14241
14242 2018-06-11 Zhouyi Zhou <zhouzhouyi@gmail.com>
14243
14244 * tree-eh.c (lower_eh_constructs_2): Add a comma to comment.
14245
14246 2018-06-11 Segher Boessenkool <segher@kernel.crashing.org>
14247
14248 PR target/85755
14249 * config/rs6000/rs6000.md (*movdi_internal32): Put constraint modifiers
14250 on the correct operand.
14251 (*movdi_internal64): Ditto.
14252
14253 2018-06-11 Martin Liska <mliska@suse.cz>
14254
14255 PR tree-optimization/86089
14256 * tree-ssa-strlen.c (get_string_length): Move back removed hunk.
14257
14258 2018-06-11 Julia Koval <julia.koval@intel.com>
14259
14260 * config/i386/vaesintrin.h (_mm_aesdec_epi128, _mm_aesdeclast_epi128)
14261 _mm_aesenc_epi128, _mm_aesenclast_epi128: Remove.
14262 * config/i386/vpclmulqdqintrin.h (_mm_clmulepi64_epi128): Remove.
14263
14264 2018-06-11 Olivier Hainque <hainque@adacore.com>
14265
14266 * dwarf2out.c (gen_compile_unit_die): Fallout to DW_LANG_Ada83
14267 for Ada with strict dwarf2.
14268
14269 2018-06-08 Peter Bergner <bergner@vnet.ibm.com>
14270
14271 PR target/85755
14272 * config/rs6000/rs6000.c (mem_operand_gpr): Enable PRE_INC and PRE_DEC
14273 addresses.
14274
14275 2018-06-08 Jan Hubicka <hubicka@ucw.cz>
14276
14277 * dumpfile.c (FIRST_ME_AUTO_NUMBERED_DUMP): Bump to 4.
14278
14279 2018-06-08 David Edelsohn <dje.gcc@gmail.com>
14280
14281 * config/rs6000/rs6000.c (rs6000_passes_ieee128): Protect with #if
14282 TARGET_ELF.
14283
14284 2018-06-08 Martin Liska <mliska@suse.cz>
14285
14286 * tree-cfg.h (debug_function): Fix argument type to match
14287 implementation.
14288
14289 2018-06-08 Martin Liska <mliska@suse.cz>
14290
14291 * config/powerpcspe/powerpcspe.c (rs6000_xcoff_visibility):
14292 Remove usage of MPX-related (and removed) fields.
14293 * config/rs6000/rs6000.c (rs6000_xcoff_visibility): Likewise.
14294
14295 2018-06-08 David Malcolm <dmalcolm@redhat.com>
14296
14297 * cfg.c (debug): Use TDF_NONE rather than 0.
14298 * cfghooks.c (debug): Likewise.
14299 * dumpfile.c (DUMP_FILE_INFO): Likewise; also for OPTGROUP.
14300 (struct dump_option_value_info): Convert to...
14301 (struct kv_pair): ...this template type.
14302 (dump_options): Convert to kv_pair<dump_flags_t>; use TDF_NONE
14303 rather than 0.
14304 (optinfo_verbosity_options): Likewise.
14305 (optgroup_options): Convert to kv_pair<optgroup_flags_t>; use
14306 OPTGROUP_NONE.
14307 (gcc::dump_manager::dump_register): Use optgroup_flags_t rather
14308 than int for "optgroup_flags" param.
14309 (dump_generic_expr_loc): Use dump_flags_t rather than int for
14310 "dump_kind" param.
14311 (dump_dec): Likewise.
14312 (dump_finish): Use TDF_NONE rather than 0.
14313 (gcc::dump_manager::opt_info_enable_passes): Use optgroup_flags_t
14314 rather than int for "optgroup_flags" param. Use TDF_NONE rather
14315 than 0. Update for change to option_ptr.
14316 (opt_info_switch_p_1): Convert "optgroup_flags" param from int *
14317 to optgroup_flags_t *. Use TDF_NONE and OPTGROUP_NONE rather than
14318 0. Update for changes to optinfo_verbosity_options and
14319 optgroup_options.
14320 (opt_info_switch_p): Convert optgroup_flags from int to
14321 optgroup_flags_t.
14322 (dump_basic_block): Use dump_flags_t rather than int
14323 for "dump_kind" param.
14324 * dumpfile.h (TDF_ADDRESS, TDF_SLIM, TDF_RAW, TDF_DETAILS,
14325 TDF_STATS, TDF_BLOCKS, TDF_VOPS, TDF_LINENO, TDF_UID)
14326 TDF_STMTADDR, TDF_GRAPH, TDF_MEMSYMS, TDF_RHS_ONLY, TDF_ASMNAME,
14327 TDF_EH, TDF_NOUID, TDF_ALIAS, TDF_ENUMERATE_LOCALS, TDF_CSELIB,
14328 TDF_SCEV, TDF_GIMPLE, TDF_FOLDING, MSG_OPTIMIZED_LOCATIONS,
14329 MSG_MISSED_OPTIMIZATION, MSG_NOTE, MSG_ALL, TDF_COMPARE_DEBUG,
14330 TDF_NONE): Convert from macros to...
14331 (enum dump_flag): ...this new enum.
14332 (dump_flags_t): Update to use enum.
14333 (operator|, operator&, operator~, operator|=, operator&=):
14334 Implement for dump_flags_t.
14335 (OPTGROUP_NONE, OPTGROUP_IPA, OPTGROUP_LOOP, OPTGROUP_INLINE,
14336 OPTGROUP_OMP, OPTGROUP_VEC, OPTGROUP_OTHER, OPTGROUP_ALL):
14337 Convert from macros to...
14338 (enum optgroup_flag): ...this new enum.
14339 (optgroup_flags_t): New typedef.
14340 (operator|, operator|=): Implement for optgroup_flags_t.
14341 (struct dump_file_info): Convert field "alt_flags" to
14342 dump_flags_t. Convert field "optgroup_flags" to
14343 optgroup_flags_t.
14344 (dump_basic_block): Use dump_flags_t rather than int for param.
14345 (dump_generic_expr_loc): Likewise.
14346 (dump_dec): Likewise.
14347 (dump_register): Convert param "optgroup_flags" to
14348 optgroup_flags_t.
14349 (opt_info_enable_passes): Likewise.
14350 * early-remat.c (early_remat::dump_edge_list): Use TDF_NONE rather
14351 than 0.
14352 * gimple-pretty-print.c (debug): Likewise.
14353 * gimple-ssa-store-merging.c (bswap_replace): Likewise.
14354 (merged_store_group::apply_stores): Likewise.
14355 * gimple-ssa-strength-reduction.c (insert_initializers): Likewise.
14356 * gimple.c (verify_gimple_pp): Likewise.
14357 * graphite-poly.c (print_pbb_body): Likewise.
14358 * passes.c (pass_manager::register_one_dump_file): Convert
14359 local "optgroup_flags" to optgroup_flags_t.
14360 * print-tree.c (print_node): Use TDF_NONE rather than 0.
14361 (debug): Likewise.
14362 (debug_body): Likewise.
14363 * tree-pass.h (struct pass_data): Convert field "optgroup_flags"
14364 to optgroup_flags_t.
14365 * tree-pretty-print.c (print_struct_decl): Use TDF_NONE rather
14366 than 0.
14367 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Likewise.
14368 (convert_mult_to_fma): Likewise.
14369 * tree-ssa-reassoc.c (undistribute_ops_list): Likewise.
14370 * tree-ssa-sccvn.c (vn_eliminate): Likewise.
14371 * tree-vect-data-refs.c (dump_lower_bound): Convert param
14372 "dump_kind" to dump_flags_t.
14373
14374 2018-06-08 Segher Boessenkool <segher@kernel.crashing.org>
14375
14376 * config/rs6000/rs6000.c (min, max): Delete.
14377
14378 2018-06-08 Segher Boessenkool <segher@kernel.crashing.org>
14379
14380 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete mention of
14381 -mabi=spe and -mabi=no-spe.
14382
14383 2018-06-08 Martin Liska <mliska@suse.cz>
14384
14385 * ipa-pure-const.c (propagate_pure_const): Use ::get at places
14386 where we expect an existing summary.
14387
14388 2018-06-08 Martin Liska <mliska@suse.cz>
14389
14390 * ipa-inline-analysis.c (simple_edge_hints): Use ::get method.
14391 * ipa-inline.h (estimate_edge_growth): Likewise.
14392
14393 2018-06-08 Martin Liska <mliska@suse.cz>
14394
14395 * cgraph.c (function_version_hasher::hash): Use
14396 cgraph_node::get_uid ().
14397 (function_version_hasher::equal):
14398 * cgraph.h (cgraph_node::get_uid): New method.
14399 * ipa-inline.c (update_caller_keys): Use
14400 cgraph_node::get_uid ().
14401 (update_callee_keys): Likewise.
14402 * ipa-utils.c (searchc): Likewise.
14403 (ipa_reduced_postorder): Likewise.
14404 * lto-cgraph.c (input_node): Likewise.
14405 * passes.c (is_pass_explicitly_enabled_or_disabled): Likewise.
14406 * symbol-summary.h (symtab_insertion): Likewise.
14407 (symtab_removal): Likewise.
14408 (symtab_duplication): Likewise.
14409 * tree-pretty-print.c (dump_function_header): Likewise.
14410 * tree-sra.c (convert_callers_for_node): Likewise.
14411
14412 2018-06-08 Martin Liska <mliska@suse.cz>
14413
14414 * cgraph.c (symbol_table::create_edge): Always assign a new
14415 unique number.
14416 (symbol_table::free_edge): Do not recycle numbers.
14417 * cgraph.h (cgraph_edge::get): New method.
14418 * symbol-summary.h (symtab_removal): Use it.
14419 (symtab_duplication): Likewise.
14420 (call_summary::hashable_uid): Remove.
14421
14422 2018-06-08 Martin Liska <mliska@suse.cz>
14423
14424 * ipa-inline-analysis.c (inline_edge_removal_hook): Remove.
14425 (initialize_growth_caches): Remove.
14426 (free_growth_caches): Likewise.
14427 (do_estimate_edge_time): Use edge_growth_cache.
14428 (do_estimate_edge_size): Likewise.
14429 (do_estimate_edge_hints): Likewise.
14430 * ipa-inline.c (reset_edge_caches): Likewise.
14431 (recursive_inlining): Likewise.
14432 (inline_small_functions): Likewise.
14433 * ipa-inline.h (initialize_growth_caches): Remove.
14434 (estimate_edge_size): Likewise.
14435 (estimate_edge_time): Likewise.
14436 (estimate_edge_hints): Likewise.
14437 (reset_edge_growth_cache): Likewise.
14438 * symbol-summary.h (call_summary::remove): New method.
14439
14440 2018-06-08 Martin Liska <mliska@suse.cz>
14441
14442 * ipa-cp.c (class edge_clone_summary): New summary.
14443 (grow_edge_clone_vectors): Remove.
14444 (ipcp_edge_duplication_hook): Remove.
14445 (class edge_clone_summary_t): New call_summary class.
14446 (ipcp_edge_removal_hook): Remove.
14447 (edge_clone_summary_t::duplicate): New function.
14448 (get_next_cgraph_edge_clone): Use edge_clone_summaries.
14449 (create_specialized_node): Likewise.
14450 (ipcp_driver): Initialize edge_clone_summaries and do not
14451 register hooks.
14452
14453 2018-06-08 Martin Liska <mliska@suse.cz>
14454
14455 * symbol-summary.h (get): New function.
14456 (call_summary::m_initialize_when_cloning): New class member.
14457
14458 2018-06-08 Martin Liska <mliska@suse.cz>
14459
14460 * cgraph.c (cgraph_node::remove): Do not recycle uid.
14461 * cgraph.h (symbol_table::release_symbol): Do not pass uid.
14462 (symbol_table::allocate_cgraph_symbol): Do not set uid.
14463 * passes.c (uid_hash_t): Record removed_nodes by their uids.
14464 (remove_cgraph_node_from_order): Use the removed_nodes set.
14465 (do_per_function_toporder): Likwise.
14466 * symbol-summary.h (symtab_insertion): Use cgraph_node::uid
14467 instead of summary_uid.
14468 (symtab_removal): Likewise.
14469 (symtab_duplication): Likewise.
14470
14471 2018-06-08 Martin Liska <mliska@suse.cz>
14472
14473 * ipa-cp.c (ipcp_store_bits_results): Use
14474 ipcp_transformation_sum.
14475 (ipcp_store_vr_results): Likewise.
14476 * ipa-prop.c (ipcp_grow_transformations_if_necessary): Renamed
14477 to ...
14478 (ipcp_transformation_initialize): ... this.
14479 (ipa_set_node_agg_value_chain):
14480 (ipa_node_params_t::duplicate): Use ipcp_transformation_sum.
14481 (write_ipcp_transformation_info): Likewise.
14482 (read_ipcp_transformation_info): Likewise.
14483 (ipcp_update_bits): Likewise.
14484 (ipcp_update_vr): Likewise.
14485 (ipcp_transform_function): Likewise.
14486 * ipa-prop.h: Rename ipcp_transformation_summary to
14487 ipcp_transformation.
14488 (class ipcp_transformation_t): New function summary.
14489 (ipcp_get_transformation_summary): Use ipcp_transformation_sum.
14490 (ipa_get_agg_replacements_for_node): Likewise.
14491
14492 2018-06-08 Martin Liska <mliska@suse.cz>
14493
14494 * ipa-pure-const.c (struct funct_state_d): Do it class instead
14495 of struct.
14496 (class funct_state_summary_t): New function_summary class.
14497 (has_function_state): Remove.
14498 (get_function_state): Likewise.
14499 (set_function_state): Likewise.
14500 (add_new_function): Likewise.
14501 (funct_state_summary_t::insert): New function.
14502 (duplicate_node_data): Remove.
14503 (remove_node_data): Remove.
14504 (funct_state_summary_t::duplicate): New function.
14505 (register_hooks): Create new funct_state_summaries.
14506 (pure_const_generate_summary): Use it.
14507 (pure_const_write_summary): Likewise.
14508 (pure_const_read_summary): Likewise.
14509 (propagate_pure_const): Likewise.
14510 (propagate_nothrow): Likewise.
14511 (dump_malloc_lattice): Likewise.
14512 (propagate_malloc): Likewise.
14513 (execute): Do not register hooks, just remove summary
14514 instead.
14515 (pass_ipa_pure_const::pass_ipa_pure_const): Simplify
14516 constructor.
14517
14518 2018-06-08 Martin Liska <mliska@suse.cz>
14519
14520 * ipa-reference.c (remove_node_data): Remove.
14521 (duplicate_node_data): Likewise.
14522 (class ipa_ref_var_info_summary_t): New class.
14523 (class ipa_ref_opt_summary_t): Likewise.
14524 (get_reference_vars_info): Use ipa_ref_var_info_summaries.
14525 (get_reference_optimization_summary): Use
14526 ipa_ref_opt_sum_summaries.
14527 (set_reference_vars_info): Remove.
14528 (set_reference_optimization_summary): Likewise.
14529 (ipa_init): Create summaries.
14530 (init_function_info): Use function summary.
14531 (ipa_ref_opt_summary_t::duplicate): New function.
14532 (ipa_ref_opt_summary_t::remove): New function.
14533 (get_read_write_all_from_node): Fix GNU coding style.
14534 (propagate): Use function summary.
14535 (write_node_summary_p): Fix GNU coding style.
14536 (stream_out_bitmap): Likewise.
14537 (ipa_reference_read_optimization_summary): Use function summary.
14538 (ipa_reference_c_finalize): Do not release hooks.
14539
14540 2018-06-08 Martin Liska <mliska@suse.cz>
14541
14542 * ipa-fnsummary.c (dump_ipa_call_summary): Use ::get method.
14543 (analyze_function_body): Extract multiple calls of get_create.
14544 * ipa-inline-analysis.c (simple_edge_hints): Likewise.
14545 * ipa-inline.c (recursive_inlining): Use ::get method.
14546 * ipa-inline.h (estimate_edge_growth): Likewise.
14547
14548 2018-06-08 Martin Liska <mliska@suse.cz>
14549
14550 * hsa-common.h (enum hsa_function_kind): Rename HSA_NONE to
14551 HSA_INVALID.
14552 (hsa_function_summary::hsa_function_summary): Use the new enum
14553 value.
14554 (hsa_gpu_implementation_p): Use hsa_summaries::get.
14555 * hsa-gen.c (hsa_get_host_function): Likewise.
14556 (get_brig_function_name): Likewise.
14557 * ipa-hsa.c (process_hsa_functions): Likewise.
14558 (ipa_hsa_write_summary): Likewise.
14559 * symbol-summary.h (symtab_duplication): Use ::get function/
14560 (get): New function.
14561
14562 2018-06-08 Martin Liska <mliska@suse.cz>
14563
14564 * config/i386/i386.c (ix86_can_inline_p): Use get_create instead
14565 of get.
14566 * hsa-common.c (hsa_summary_t::link_functions): Likewise.
14567 (hsa_register_kernel): Likewise.
14568 * hsa-common.h (hsa_gpu_implementation_p): Likewise.
14569 * hsa-gen.c (hsa_get_host_function): Likewise.
14570 (get_brig_function_name): Likewise.
14571 (generate_hsa): Likewise.
14572 (pass_gen_hsail::execute): Likewise.
14573 * ipa-cp.c (ipcp_cloning_candidate_p): Likewise.
14574 (devirtualization_time_bonus): Likewise.
14575 (ipcp_propagate_stage): Likewise.
14576 * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
14577 (edge_set_predicate): Likewise.
14578 (evaluate_conditions_for_known_args): Likewise.
14579 (evaluate_properties_for_edge): Likewise.
14580 (ipa_fn_summary::reset): Likewise.
14581 (ipa_fn_summary_t::duplicate): Likewise.
14582 (dump_ipa_call_summary): Likewise.
14583 (ipa_dump_fn_summary): Likewise.
14584 (analyze_function_body): Likewise.
14585 (compute_fn_summary): Likewise.
14586 (estimate_edge_devirt_benefit): Likewise.
14587 (estimate_edge_size_and_time): Likewise.
14588 (estimate_calls_size_and_time): Likewise.
14589 (estimate_node_size_and_time): Likewise.
14590 (inline_update_callee_summaries): Likewise.
14591 (remap_edge_change_prob): Likewise.
14592 (remap_edge_summaries): Likewise.
14593 (ipa_merge_fn_summary_after_inlining): Likewise.
14594 (ipa_update_overall_fn_summary): Likewise.
14595 (read_ipa_call_summary): Likewise.
14596 (inline_read_section): Likewise.
14597 (write_ipa_call_summary): Likewise.
14598 (ipa_fn_summary_write): Likewise.
14599 (ipa_free_fn_summary): Likewise.
14600 * ipa-hsa.c (process_hsa_functions): Likewise.
14601 (ipa_hsa_write_summary): Likewise.
14602 (ipa_hsa_read_section): Likewise.
14603 * ipa-icf.c (sem_function::merge): Likewise.
14604 * ipa-inline-analysis.c (simple_edge_hints): Likewise.
14605 (do_estimate_edge_time): Likewise.
14606 (estimate_size_after_inlining): Likewise.
14607 (estimate_growth): Likewise.
14608 (growth_likely_positive): Likewise.
14609 * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
14610 (inline_call): Likewise.
14611 * ipa-inline.c (caller_growth_limits): Likewise.
14612 (can_inline_edge_p): Likewise.
14613 (can_inline_edge_by_limits_p): Likewise.
14614 (compute_uninlined_call_time): Likewise.
14615 (compute_inlined_call_time): Likewise.
14616 (want_inline_small_function_p): Likewise.
14617 (edge_badness): Likewise.
14618 (update_caller_keys): Likewise.
14619 (update_callee_keys): Likewise.
14620 (recursive_inlining): Likewise.
14621 (inline_small_functions): Likewise.
14622 (inline_to_all_callers_1): Likewise.
14623 (dump_overall_stats): Likewise.
14624 (early_inline_small_functions): Likewise.
14625 (early_inliner): Likewise.
14626 * ipa-inline.h (estimate_edge_growth): Likewise.
14627 * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
14628 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
14629 * ipa-prop.h (IPA_NODE_REF): Likewise.
14630 (IPA_EDGE_REF): Likewise.
14631 * ipa-pure-const.c (malloc_candidate_p): Likewise.
14632 (propagate_malloc): Likewise.
14633 * ipa-split.c (execute_split_functions): Likewise.
14634 * symbol-summary.h: Rename get to get_create.
14635 (get): Likewise.
14636 (get_create): Likewise.
14637 * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
14638
14639 2018-06-08 Martin Liska <mliska@suse.cz>
14640
14641 * symbol-summary.h (release): Move definition out of class
14642 declaration.
14643 (symtab_removal): Likewise.
14644 (symtab_duplication): Likewise.
14645
14646 2018-06-08 Martin Liska <mliska@suse.cz>
14647
14648 * symbol-summary.h (function_summary): Move constructor
14649 implementation out of class declaration.
14650 (release): Likewise.
14651 (symtab_insertion): Likewise.
14652 (symtab_removal): Likewise.
14653 (symtab_duplication): Likewise.
14654 (get): Likewise.
14655
14656 2018-06-08 Martin Liska <mliska@suse.cz>
14657
14658 * Makefile.in: Remove support for MPX (macros, related functions,
14659 fields in cgraph_node, ...).
14660 * builtin-types.def (BT_BND): Likewise.
14661 (BT_FN_BND_CONST_PTR): Likewise.
14662 (BT_FN_CONST_PTR_BND): Likewise.
14663 (BT_FN_VOID_PTR_BND): Likewise.
14664 (BT_FN_BND_CONST_PTR_SIZE): Likewise.
14665 (BT_FN_VOID_CONST_PTR_BND_CONST_PTR): Likewise.
14666 * builtins.c (expand_builtin_memcpy_with_bounds): Likewise.
14667 (expand_builtin_mempcpy_with_bounds): Likewise.
14668 (expand_builtin_memset_with_bounds): Likewise.
14669 (expand_builtin_memset_args): Likewise.
14670 (std_expand_builtin_va_start): Likewise.
14671 (expand_builtin): Likewise.
14672 (expand_builtin_with_bounds): Likewise.
14673 * builtins.def (DEF_BUILTIN_CHKP): Likewise.
14674 (DEF_LIB_BUILTIN_CHKP): Likewise.
14675 (DEF_EXT_LIB_BUILTIN_CHKP): Likewise.
14676 (DEF_CHKP_BUILTIN): Likewise.
14677 (BUILT_IN_MEMCPY): Likewise.
14678 (BUILT_IN_MEMMOVE): Likewise.
14679 (BUILT_IN_MEMPCPY): Likewise.
14680 (BUILT_IN_MEMSET): Likewise.
14681 (BUILT_IN_STPCPY): Likewise.
14682 (BUILT_IN_STRCAT): Likewise.
14683 (BUILT_IN_STRCHR): Likewise.
14684 (BUILT_IN_STRCPY): Likewise.
14685 (BUILT_IN_STRLEN): Likewise.
14686 (BUILT_IN_MEMCPY_CHK): Likewise.
14687 (BUILT_IN_MEMMOVE_CHK): Likewise.
14688 (BUILT_IN_MEMPCPY_CHK): Likewise.
14689 (BUILT_IN_MEMSET_CHK): Likewise.
14690 (BUILT_IN_STPCPY_CHK): Likewise.
14691 (BUILT_IN_STRCAT_CHK): Likewise.
14692 (BUILT_IN_STRCPY_CHK): Likewise.
14693 * calls.c (store_bounds): Likewise.
14694 (emit_call_1): Likewise.
14695 (special_function_p): Likewise.
14696 (maybe_warn_nonstring_arg): Likewise.
14697 (initialize_argument_information): Likewise.
14698 (finalize_must_preallocate): Likewise.
14699 (compute_argument_addresses): Likewise.
14700 (expand_call): Likewise.
14701 * cfgexpand.c (expand_call_stmt): Likewise.
14702 (expand_return): Likewise.
14703 (expand_gimple_stmt_1): Likewise.
14704 (pass_expand::execute): Likewise.
14705 * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Likewise.
14706 (cgraph_node::remove): Likewise.
14707 (cgraph_node::dump): Likewise.
14708 (cgraph_node::verify_node): Likewise.
14709 * cgraph.h (chkp_function_instrumented_p): Likewise.
14710 (symtab_node::get_alias_target): Likewise.
14711 (cgraph_node::can_remove_if_no_direct_calls_and_refs_p): Likewise.
14712 (cgraph_local_p): Likewise.
14713 * cgraphbuild.c (cgraph_edge::rebuild_edges): Likewise.
14714 (cgraph_edge::rebuild_references): Likewise.
14715 * cgraphunit.c (varpool_node::finalize_decl): Likewise.
14716 (walk_polymorphic_call_targets): Likewise.
14717 (cgraph_node::expand_thunk): Likewise.
14718 (symbol_table::output_weakrefs): Likewise.
14719 * common/config/i386/i386-common.c (OPTION_MASK_ISA2_GENERAL_REGS_ONLY_UNSET): Likewise.
14720 (ix86_handle_option): Likewise.
14721 * config/i386/constraints.md: Likewise.
14722 * config/i386/i386-builtin-types.def (BND): Likewise.
14723 (VOID): Likewise.
14724 (PVOID): Likewise.
14725 (ULONG): Likewise.
14726 * config/i386/i386-builtin.def (BDESC_END): Likewise.
14727 (BDESC_FIRST): Likewise.
14728 (BDESC): Likewise.
14729 * config/i386/i386-c.c (ix86_target_macros_internal): Likewise.
14730 * config/i386/i386-protos.h (ix86_bnd_prefixed_insn_p): Likewise.
14731 * config/i386/i386.c (enum reg_class): Likewise.
14732 (ix86_target_string): Likewise.
14733 (ix86_option_override_internal): Likewise.
14734 (ix86_conditional_register_usage): Likewise.
14735 (ix86_valid_target_attribute_inner_p): Likewise.
14736 (ix86_set_indirect_branch_type): Likewise.
14737 (ix86_set_current_function): Likewise.
14738 (ix86_function_arg_regno_p): Likewise.
14739 (init_cumulative_args): Likewise.
14740 (ix86_function_arg_advance): Likewise.
14741 (ix86_function_arg): Likewise.
14742 (ix86_pass_by_reference): Likewise.
14743 (ix86_function_value_regno_p): Likewise.
14744 (ix86_function_value_1): Likewise.
14745 (ix86_function_value_bounds): Likewise.
14746 (ix86_return_in_memory): Likewise.
14747 (ix86_setup_incoming_vararg_bounds): Likewise.
14748 (ix86_va_start): Likewise.
14749 (indirect_thunk_need_prefix): Likewise.
14750 (print_reg): Likewise.
14751 (ix86_print_operand): Likewise.
14752 (ix86_expand_call): Likewise.
14753 (ix86_output_function_return): Likewise.
14754 (reg_encoded_number): Likewise.
14755 (BDESC_VERIFYS): Likewise.
14756 (ix86_init_mpx_builtins): Likewise.
14757 (ix86_init_builtins): Likewise.
14758 (ix86_emit_cmove): Likewise.
14759 (ix86_emit_move_max): Likewise.
14760 (ix86_expand_builtin): Likewise.
14761 (ix86_builtin_mpx_function): Likewise.
14762 (ix86_get_arg_address_for_bt): Likewise.
14763 (ix86_load_bounds): Likewise.
14764 (ix86_store_bounds): Likewise.
14765 (ix86_load_returned_bounds): Likewise.
14766 (ix86_store_returned_bounds): Likewise.
14767 (ix86_class_likely_spilled_p): Likewise.
14768 (ix86_hard_regno_mode_ok): Likewise.
14769 (x86_order_regs_for_local_alloc): Likewise.
14770 (ix86_mitigate_rop): Likewise.
14771 (ix86_bnd_prefixed_insn_p): Likewise.
14772 (ix86_mpx_bound_mode): Likewise.
14773 (ix86_make_bounds_constant): Likewise.
14774 (ix86_initialize_bounds): Likewise.
14775 (TARGET_LOAD_BOUNDS_FOR_ARG): Likewise.
14776 (TARGET_STORE_BOUNDS_FOR_ARG): Likewise.
14777 (TARGET_LOAD_RETURNED_BOUNDS): Likewise.
14778 (TARGET_STORE_RETURNED_BOUNDS): Likewise.
14779 (TARGET_CHKP_BOUND_MODE): Likewise.
14780 (TARGET_BUILTIN_CHKP_FUNCTION): Likewise.
14781 (TARGET_CHKP_FUNCTION_VALUE_BOUNDS): Likewise.
14782 (TARGET_CHKP_MAKE_BOUNDS_CONSTANT): Likewise.
14783 (TARGET_CHKP_INITIALIZE_BOUNDS): Likewise.
14784 * config/i386/i386.h (TARGET_MPX): Likewise.
14785 (TARGET_MPX_P): Likewise.
14786 (VALID_BND_REG_MODE): Likewise.
14787 (FIRST_BND_REG): Likewise.
14788 (LAST_BND_REG): Likewise.
14789 (enum reg_class): Likewise.
14790 (BND_REG_P): Likewise.
14791 (BND_REGNO_P): Likewise.
14792 (BNDmode): Likewise.
14793 (ADJUST_INSN_LENGTH): Likewise.
14794 * config/i386/i386.md: Likewise.
14795 * config/i386/i386.opt: Likewise.
14796 * config/i386/linux-common.h (LIBMPX_LIBS): Likewise.
14797 (defined): Likewise.
14798 (LINK_MPX): Likewise.
14799 (MPX_SPEC): Likewise.
14800 (LIBMPX_SPEC): Likewise.
14801 (LIBMPXWRAPPERS_SPEC): Likewise.
14802 (CHKP_SPEC): Likewise.
14803 * config/i386/predicates.md: Likewise.
14804 * dbxout.c (dbxout_type): Likewise.
14805 * doc/extend.texi: Likewise.
14806 * doc/invoke.texi: Likewise.
14807 * doc/md.texi: Likewise.
14808 * doc/tm.texi: Likewise.
14809 * doc/tm.texi.in: Likewise.
14810 * dwarf2out.c (is_base_type): Likewise.
14811 (gen_formal_types_die): Likewise.
14812 (gen_subprogram_die): Likewise.
14813 (gen_type_die_with_usage): Likewise.
14814 (gen_decl_die): Likewise.
14815 (dwarf2out_late_global_decl): Likewise.
14816 * expr.c (expand_assignment): Likewise.
14817 (emit_storent_insn): Likewise.
14818 (store_expr_with_bounds): Likewise.
14819 (store_expr): Likewise.
14820 (expand_expr_real_1): Likewise.
14821 * expr.h (store_expr_with_bounds): Likewise.
14822 * function.c (use_register_for_decl): Likewise.
14823 (struct bounds_parm_data): Likewise.
14824 (assign_parms_augmented_arg_list): Likewise.
14825 (assign_parm_find_entry_rtl): Likewise.
14826 (assign_parm_is_stack_parm): Likewise.
14827 (assign_parm_load_bounds): Likewise.
14828 (assign_bounds): Likewise.
14829 (assign_parms): Likewise.
14830 (expand_function_start): Likewise.
14831 * gcc.c (CHKP_SPEC): Likewise.
14832 * gimple-fold.c (gimple_fold_builtin_memory_op): Likewise.
14833 * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Likewise.
14834 (wrestrict_dom_walker::check_call): Likewise.
14835 * gimple.c (gimple_build_call_from_tree): Likewise.
14836 * gimple.h (enum gf_mask): Likewise.
14837 (gimple_call_with_bounds_p): Likewise.
14838 (gimple_call_set_with_bounds): Likewise.
14839 * gimplify.c (gimplify_init_constructor): Likewise.
14840 * ipa-cp.c (initialize_node_lattices): Likewise.
14841 (propagate_constants_across_call): Likewise.
14842 (find_more_scalar_values_for_callers_subset): Likewise.
14843 * ipa-hsa.c (process_hsa_functions): Likewise.
14844 * ipa-icf-gimple.c (func_checker::compare_gimple_call): Likewise.
14845 * ipa-icf.c (sem_function::merge): Likewise.
14846 * ipa-inline.c (early_inliner): Likewise.
14847 * ipa-pure-const.c (warn_function_noreturn): Likewise.
14848 (warn_function_cold): Likewise.
14849 (propagate_pure_const): Likewise.
14850 * ipa-ref.h (enum GTY): Likewise.
14851 * ipa-split.c (find_retbnd): Likewise.
14852 (consider_split): Likewise.
14853 (split_function): Likewise.
14854 * ipa-visibility.c (cgraph_externally_visible_p): Likewise.
14855 * ipa.c (walk_polymorphic_call_targets): Likewise.
14856 (symbol_table::remove_unreachable_nodes): Likewise.
14857 (process_references): Likewise.
14858 (cgraph_build_static_cdtor_1): Likewise.
14859 * lto-cgraph.c (lto_output_node): Likewise.
14860 (output_refs): Likewise.
14861 (compute_ltrans_boundary): Likewise.
14862 (input_overwrite_node): Likewise.
14863 (input_node): Likewise.
14864 (input_cgraph_1): Likewise.
14865 * params.def (PARAM_CHKP_MAX_CTOR_SIZE): Likewise.
14866 * passes.c (pass_manager::execute_early_local_passes): Likewise.
14867 (class pass_chkp_instrumentation_passes): Likewise.
14868 (make_pass_chkp_instrumentation_passes): Likewise.
14869 * passes.def: Likewise.
14870 * rtl.h (struct GTY): Likewise.
14871 (CALL_EXPR_WITH_BOUNDS_P): Likewise.
14872 * stor-layout.c (layout_type): Likewise.
14873 * symtab.c: Likewise.
14874 * target.def: Likewise.
14875 * targhooks.c (default_chkp_bound_type): Likewise.
14876 (default_chkp_bound_mode): Likewise.
14877 (default_builtin_chkp_function): Likewise.
14878 (default_chkp_function_value_bounds): Likewise.
14879 (default_chkp_make_bounds_constant): Likewise.
14880 (default_chkp_initialize_bounds): Likewise.
14881 * targhooks.h (default_chkp_bound_type): Likewise.
14882 (default_chkp_bound_mode): Likewise.
14883 (default_builtin_chkp_function): Likewise.
14884 (default_chkp_function_value_bounds): Likewise.
14885 (default_chkp_make_bounds_constant): Likewise.
14886 (default_chkp_initialize_bounds): Likewise.
14887 * toplev.c (compile_file): Likewise.
14888 (process_options): Likewise.
14889 * tree-core.h (DEF_BUILTIN): Likewise.
14890 (DEF_BUILTIN_CHKP): Likewise.
14891 * tree-inline.c (declare_return_variable): Likewise.
14892 (remap_gimple_stmt): Likewise.
14893 (copy_bb): Likewise.
14894 (initialize_inlined_parameters): Likewise.
14895 (expand_call_inline): Likewise.
14896 * tree-pass.h (make_pass_ipa_chkp_versioning): Likewise.
14897 (make_pass_ipa_chkp_early_produce_thunks): Likewise.
14898 (make_pass_ipa_chkp_produce_thunks): Likewise.
14899 (make_pass_chkp): Likewise.
14900 (make_pass_chkp_opt): Likewise.
14901 (make_pass_chkp_instrumentation_passes): Likewise.
14902 * tree-pretty-print.c (dump_generic_node): Likewise.
14903 * tree-ssa-ccp.c (insert_clobber_before_stack_restore): Likewise.
14904 * tree-ssa-dce.c (propagate_necessity): Likewise.
14905 (eliminate_unnecessary_stmts): Likewise.
14906 * tree-ssa-pre.c (create_expression_by_pieces): Likewise.
14907 * tree-ssa-sccvn.c (copy_reference_ops_from_call): Likewise.
14908 * tree-ssa-sccvn.h: Likewise.
14909 * tree-ssa-strlen.c (get_string_length): Likewise.
14910 (valid_builtin_call): Likewise.
14911 (adjust_last_stmt): Likewise.
14912 (handle_builtin_strchr): Likewise.
14913 (handle_builtin_strcpy): Likewise.
14914 (handle_builtin_stxncpy): Likewise.
14915 (handle_builtin_memcpy): Likewise.
14916 (handle_builtin_strcat): Likewise.
14917 (strlen_check_and_optimize_stmt): Likewise.
14918 * tree-stdarg.c (expand_ifn_va_arg_1): Likewise.
14919 * tree-streamer-in.c: Likewise.
14920 * tree-streamer.c (record_common_node): Likewise.
14921 * tree.c (tree_code_size): Likewise.
14922 (wide_int_to_tree_1): Likewise.
14923 (type_contains_placeholder_1): Likewise.
14924 (build_common_tree_nodes): Likewise.
14925 * tree.def (POINTER_BOUNDS_TYPE): Likewise.
14926 * tree.h (POINTER_BOUNDS_TYPE_P): Likewise.
14927 (POINTER_BOUNDS_P): Likewise.
14928 (BOUNDED_TYPE_P): Likewise.
14929 (BOUNDED_P): Likewise.
14930 (CALL_WITH_BOUNDS_P): Likewise.
14931 (pointer_bounds_type_node): Likewise.
14932 * value-prof.c (gimple_ic): Likewise.
14933 * var-tracking.c (vt_add_function_parameters): Likewise.
14934 * varasm.c (make_decl_rtl): Likewise.
14935 (assemble_start_function): Likewise.
14936 (output_constant): Likewise.
14937 (maybe_assemble_visibility): Likewise.
14938 * varpool.c (ctor_for_folding): Likewise.
14939 * chkp-builtins.def: Remove.
14940 * ipa-chkp.c: Remove.
14941 * ipa-chkp.h: Remove.
14942 * rtl-chkp.c: Remove.
14943 * rtl-chkp.h: Remove.
14944 * tree-chkp-opt.c: Remove.
14945 * tree-chkp.c: Remove.
14946 * tree-chkp.h: Remove.
14947
14948 2018-06-07 Carl Love <cel@us.ibm.com>
14949
14950 * config/rs6000/vsx.md (vextract_fp_from_shorth,
14951 vextract_fp_from_shortl): Add BE support.
14952
14953 2018-06-07 Paul Koning <ni1d@arrl.net>
14954
14955 * compare-elim.c (try_merge_compare): Don't merge compare if
14956 address contains a side effect.
14957 (try_eliminate_compare): Likewise.
14958
14959 2018-06-07 Olga Makhotina <olga.makhotina@intel.com>
14960
14961 * config.gcc: Support "tremont".
14962 * config/i386/driver-i386.c (host_detect_local_cpu): Detect "tremont".
14963 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
14964 PROCESSOR_TREMONT.
14965 * config/i386/i386.c (m_TREMONT): Define.
14966 (processor_target_table): Add "tremont".
14967 (PTA_TREMONT): Define.
14968 (ix86_lea_outperforms): Add TARGET_TREMONT.
14969 (get_builtin_code_for_version): Handle PROCESSOR_TREMONT.
14970 (fold_builtin_cpu): Add M_INTEL_TREMONT, replace M_INTEL_GOLDMONT
14971 and M_INTEL_GOLDMONT_PLUS.
14972 (fold_builtin_cpu): Add "tremont".
14973 (ix86_add_stmt_cost): Add TARGET_TREMONT.
14974 (ix86_option_override_internal): Add "tremont".
14975 * config/i386/i386.h (processor_costs): Define TARGET_TREMONT.
14976 (processor_type): Add PROCESSOR_TREMONT.
14977 * config/i386/x86-tune.def: Add m_TREMONT.
14978 * doc/invoke.texi: Add tremont as x86 -march=/-mtune= CPU type.
14979
14980 2018-06-07 Jozef Lawrynowicz <jozef.l@mittosystems.com>
14981
14982 * config/msp430/msp430.c (msp430_mcu_name): Set the "i" in the
14983 symbol defined for msp430i* devices to be lower case.
14984
14985 2018-06-07 Richard Biener <rguenther@suse.de>
14986
14987 * graphite-sese-to-poly.c (extract_affine): Avoid unneded
14988 wrapping. Properly wrap the result of a BIT_NOT_EXPR.
14989 Properly wrap signed arithmetic if overflow wraps.
14990
14991 2018-06-07 Jakub Jelinek <jakub@redhat.com>
14992
14993 PR tree-optimization/69615
14994 * tree-ssa-reassoc.c (optimize_range_tests_var_bound): If rhs2 is lhs
14995 of a cast from a same precision integral SSA_NAME in a bb dominated
14996 by first_bb, retry with rhs2 set to the rhs1 of the cast. Don't emit
14997 cast to utype if rhs2 has already a compatible type.
14998
14999 2018-06-07 Richard Biener <rguenther@suse.de>
15000
15001 PR tree-optimization/85935
15002 * graphite-scop-detection.c (find_params_in_bb): Analyze
15003 condition operands with respect to the correct loop. Assert
15004 the analysis doesn't fail.
15005
15006 2018-06-04 Carl Love <cel@us.ibm.com>
15007
15008 * config/rs6000/vsx.md (first_match_index_<mode>): Calculate index
15009 using natural element order. Use gen_lshrsi3 instead of gen_ashrsi3
15010 as it is slightly cheaper.
15011 (first_match_or_eos_index_<mode>):
15012 Calculate index using natural element order.
15013 (first_match_index_<mode>):
15014 Calculate index using natural element order.
15015 (first_match_or_eos_index_<mode>):
15016 Calculate index using natural order.
15017 (define_insn vclzlsbb): Change to define_insn vclzlsbb_<mode>.
15018 for BE and LE modes.
15019 * config/rs6000/rs6000-c.c: Rename P9V_BUILTIN_VCLZLSBB,
15020 P9V_BUILTIN_VCLZLSBB_V16QI.
15021 * config/rs6000/rs6000-builtin.def: Make VCLZLSBB mode
15022 specific.
15023
15024 2018-06-06 Kelvin Nilsen <kelvin@gcc.gnu.org>
15025
15026 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Adjust
15027 indentation and line wrap for many prototypes. Add missing
15028 @smallexample directives around block of prototypes for vec_xl and
15029 vec_xst.
15030
15031 2018-06-05 Michael Meissner <meissner@linux.ibm.com>
15032
15033 * config/rs6000/rs6000.c (rs6000_passes_ieee128): New boolean to
15034 track if we pass or return IEEE 128-bit floating point.
15035 (ieee128_mangling_gcc_8_1): New boolean to say whether to generate
15036 C++ mangling that is compatible with GCC 8.1.
15037 (TARGET_ASM_GLOBALIZE_DECL_NAME): Override target hook.
15038 (init_cumulative_args): Note if we pass or return IEEE 128-bit
15039 floating point types.
15040 (rs6000_function_arg_advance_1): Likewise.
15041 (rs6000_mangle_type): Optionally generate mangled names that match
15042 what GCC 8.1 generated for IEEE 128-bit floating point types.
15043 (rs6000_globalize_decl_name): If we have an external function that
15044 passes or returns IEEE 128-bit types, generate a weak reference
15045 from the mangled name used in GCC 8.1 to the current mangled
15046 name.
15047 (rs6000_init_builtins): Make __ibm128 use the long double type if
15048 long double is IBM extended double. Make __float128 use the long
15049 double type if long double is IEEE 128-bit.
15050
15051 PR target/85657
15052 * config/rs6000/rs6000-builtin.def (BU_IBM128_2): New helper
15053 macro for __ibm128 built-in functions.
15054 (PACK_IF): Add __ibm128 pack/unpack functions.
15055 (UNPACK_IF): Likewise.
15056 * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Do not
15057 enable long double built-in functions if long double is IEEE
15058 128-bit floating point.
15059 (rs6000_invalid_builtin): Update long double built-in function
15060 error message.
15061 (rs6000_expand_builtin): For PACK_IF and UNPACK_IF built-in
15062 functions, adjust the built-in function to use the long double
15063 built-in function if __ibm128 and long double are the same type.
15064 * doc/extend.texi (PowerPC builtins): Update documention for
15065 __builtin_{,un}pack_longdouble. Add documentation for
15066 __builtin_{,un}pack_ibm128.
15067
15068 2018-06-06 Jim Wilson <jimw@sifive.com>
15069
15070 * config/riscv/riscv.c (enum riscv_privilege_levels): New.
15071 (struct machine_function): New field interrupt_mode.
15072 (riscv_handle_type_attribute): New function. Add forward declaration.
15073 (riscv_attribute_table) <interrupt>: Use riscv_handle_type_attribute.
15074 (riscv_expand_epilogue): Check interrupt_mode field.
15075 (riscv_set_current_function): Check interrupt attribute args and
15076 set interrupt_mode field.
15077 * config/riscv/riscv.md (UNSPECV_SRET, UNSPECV_URET): New.
15078 (riscv_sret, riscv_uret): New.
15079 * doc/extend.texi (RISC-V Function Attributes) <interrupt>: Document
15080 new arguments to interrupt attribute.
15081
15082 2018-06-06 Peter Bergner <bergner@vnet.ibm.com>
15083
15084 PR target/63177
15085 * /config/rs6000/rs6000.h (ASM_CPU_SPEC): Add support for -mpower9.
15086 Don't handle -mcpu=power8 if -mpower9-vector is also used.
15087
15088 2018-06-06 Kelvin Nilsen <kelvin@gcc.gnu.org>
15089
15090 * config/rs6000/rs6000-builtin.def (VSX_BUILTIN_VEC_LD,
15091 VSX_BUILTIN_VEC_ST): Add comment to explain non-traditional uses.
15092 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
15093 several redundant entries.
15094
15095 2018-06-06 David Malcolm <dmalcolm@redhat.com>
15096
15097 * config/i386/i386-protos.h (ix86_expand_call): Strengthen return
15098 type from "rtx" to "rtx_insn *".
15099 * config/i386/i386.c (ix86_expand_split_stack_prologue): Likewise
15100 for local "call_insn", removing cast.
15101 (ix86_expand_call): Likewise, introducing a "call_insn" local.
15102
15103 2018-06-06 Eric Botcazou <ebotcazou@adacore.com>
15104
15105 PR tree-optimization/86066
15106 * gimple-ssa-store-merging.c (process_store): Do not bypass BIT_NOT_EXPR
15107 for BIT_INSERT_EXPR stores.
15108
15109 2018-06-06 Richard Biener <rguenther@suse.de>
15110
15111 PR tree-optimization/86062
15112 * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
15113 component refs ontop
15114 of to be offsetted base.
15115
15116 2018-06-06 Jozef Lawrynowicz <jozef.l@mittosystems.com>
15117
15118 * config/msp430/msp430.c (msp430_attr): Allow interrupt handlers
15119 to be static and remove check on interrupt attribute name.
15120
15121 2018-06-05 Kelvin Nilsen <kelvin@gcc.gnu.org>
15122
15123 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
15124 volatile qualifier from vec_lvsl and vec_lvsr argument prototypes.
15125
15126 2018-06-05 Steve Ellcey <sellcey@cavium.com>
15127
15128 PR target/79924
15129 * config/aarch64/aarch64-protos.h (aarch64_err_no_fpadvsimd): Remove
15130 second argument.
15131 * config/aarch64/aarch64-protos..c (aarch64_err_no_fpadvsimd):
15132 Remove second argument, change how error is called.
15133 (aarch64_layout_arg): Remove second argument from
15134 aarch64_err_no_fpadvsimd call.
15135 (aarch64_init_cumulative_args): Ditto.
15136 (aarch64_gimplify_va_arg_expr): Ditto.
15137 * config/aarch64/aarch64.md (mov<mode>): Ditto.
15138
15139 2018-06-05 Uros Bizjak <ubizjak@gmail.com>
15140
15141 * config/i386/i386.md (simple_return_indirect_internal): New expander.
15142 (*simple_return_indirect_internal<mode>): Rename from
15143 simple_return_indirect_internal. Use W mode iterator.
15144 (rstorssp): New expander.
15145 (*rstorssp<mode>): Rename from rstorssp. Use P mode iterator.
15146 (clrssbsy): New expander.
15147 (*clrssbsy<mode>): Rename from clrssbsy. Use P mode iterator.
15148
15149 2018-06-05 Andre Vieira <andre.simoesdiasvieira@arm.com>
15150
15151 * config/arm/arm_cmse.h (cmse_nsfptr_create): Change typeof to
15152 __typeof__.
15153 (cmse_check_pointed_object): Likewise.
15154
15155 2018-06-05 Martin Liska <mliska@suse.cz>
15156
15157 PR gcov-profile/47618
15158 * doc/invoke.texi: Document how -fprofile-dir format
15159 is extended.
15160
15161 2018-06-05 Richard Biener <rguenther@suse.de>
15162
15163 * tree-cfgcleanup.c (cleanup_control_flow_pre): For edge
15164 removal pretend DOM info isn't available so we do not update
15165 it and only remove edges, not dominated blocks. Actually free
15166 DOM info in case we removed something. Remove unreachable blocks.
15167 (mfb_keep_latches): Work with either DOM info or marked backedges.
15168 (cleanup_tree_cfg_noloop): Do not remove unreachable blocks
15169 first. Mark backedges if DOM info isn't available.
15170 (Re-)compute DOM info after cleanup_control_flow_pre.
15171
15172 2018-06-05 Richard Biener <rguenther@suse.de>
15173
15174 * tree-cfg.c (struct locus_discrim_map): Store line, not location.
15175 (locus_discrim_hasher::hash): Adjust.
15176 (locus_discrim_hasher::equal): Likewise.
15177 (next_discriminator_for_locus): Work on line directly.
15178 (same_line_p): Pass in expanded locus1 as well.
15179 (assign_discriminators): Avoid redundant location expansions.
15180
15181 2018-06-05 Richard Biener <rguenther@suse.de>
15182
15183 PR tree-optimization/86046
15184 * tree-ssa.c (maybe_optimize_var): Clear DECL_GIMPLE_REG_P
15185 if required after clearing TREE_ADDRESSABLE.
15186
15187 2018-06-05 Richard Biener <rguenther@suse.de>
15188
15189 PR tree-optimization/86047
15190 * tree-ssa-loop.c (for_each_index): Glob handling of all
15191 decls and constants and really handle all of them.
15192
15193 2018-06-05 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
15194
15195 PR target/81497
15196 * config/arm/arm-builtins.c (arm_type_qualifiers): Add
15197 qualifier_void_pointer and qualifier_const_void_pointer.
15198 (arm_ldc_qualifiers, arm_stc_qualifiers): Use the above.
15199 (arm_init_builtins): Handle the above.
15200 * config/arm/arm_acle.h (__arm_cdp, __arm_ldc, __arm_ldcl, __arm_stc,
15201 __arm_stcl, __arm_mcr, __arm_cdp2, __arm_ldc2, __arm_ldcl2, __arm_stc2,
15202 __arm_stcl2,__arm_mcr2, __arm_mcrr, __arm_mcrr2): Remove return for
15203 void intrinsics.
15204
15205 2018-06-05 Martin Liska <mliska@suse.cz>
15206
15207 * auto-profile.c (read_autofdo_file): Do not use
15208 gcov_ctr_summary struct.
15209 (afdo_callsite_hot_enough_for_early_inline): Likewise.
15210 * coverage.c (struct counts_entry): Likewise.
15211 (read_counts_file): Read just single summary entry.
15212 (get_coverage_counts): Use gcov_summary struct.
15213 * coverage.h (get_coverage_counts): Likewise.
15214 * gcov-dump.c (dump_working_sets): Likewise.
15215 (tag_summary): Dump just single summary.
15216 * gcov-io.c (gcov_write_summary): Write just histogram
15217 summary.
15218 (gcov_read_summary): Read just single summary.
15219 (compute_working_sets): Use gcov_summary struct.
15220 * gcov-io.h (GCOV_TAG_SUMMARY_LENGTH): Remove usage
15221 of GCOV_COUNTERS_SUMMABLE.
15222 (GCOV_COUNTERS_SUMMABLE): Remove.
15223 (GCOV_FIRST_VALUE_COUNTER): Replace with
15224 GCOV_COUNTER_V_INTERVAL.
15225 (struct gcov_ctr_summary): Remove.
15226 (struct gcov_summary): Directly use fields of former
15227 gcov_ctr_summary.
15228 (compute_working_sets): Use gcov_summary struct.
15229 * gcov.c (read_count_file): Do not use ctrs fields.
15230 * lto-cgraph.c (merge_profile_summaries): Use gcov_summary
15231 struct.
15232 * lto-streamer.h (struct GTY): Make profile_info gcov_summary
15233 struct.
15234 * profile.c: Likewise.
15235 * profile.h: Likewise.
15236
15237 2018-06-05 Martin Liska <mliska@suse.cz>
15238
15239 PR gcov-profile/84846
15240 * gcov.c (output_lines): Print working directory only
15241 in intermediate format.
15242
15243 2018-06-05 Andreas Krebbel <krebbel@linux.ibm.com>
15244
15245 * config/s390/s390-builtin-types.def: Add void function type.
15246 * config/s390/s390-builtins.def: Use the function type for the
15247 tbeginc builtin.
15248
15249 2018-06-04 Jim Wilson <jimw@sifive.com>
15250
15251 * config/riscv/riscv-protos.h (riscv_expand_epilogue): Change bool arg
15252 to int.
15253 * config/riscv/riscv.c (riscv_for_each_saved_reg): New args epilogue
15254 and maybe_eh_return. Change regno to unsigned int. Use new args to
15255 handle EH_RETURN_DATA_REGNO registers properly.
15256 (riscv_expand_prologue): Pass new args to riscv_for_each_saved_reg.
15257 (riscv_expand_epilogue): Update comment. Change argument name and
15258 type. Update code to use new name and type. Pass new args to
15259 riscv_for_each_saved_reg. Only use EH_RETURN_STACKADJ_RTX when
15260 EXCEPTION_RETURN.
15261 * config/riscv/riscv.md (NORMAL_RETURN): New.
15262 (SIBCALL_RETURN, EXCEPTION_RETURN): New.
15263 (epilogue, sibcall_epilogue): Update riscv_expand_epilogue arg.
15264 (eh_return): Call gen_eh_return_internal and emit barrier.
15265 (eh_return_internal): Call riscv_expand_epilogue.
15266
15267 2018-06-04 Eric Botcazou <ebotcazou@adacore.com>
15268
15269 * gimple-ssa-store-merging.c (struct merged_store_group): Move up
15270 bit_insertion field and declare can_be_merged_into method.
15271 (merged_store_group::can_be_merged_into): New method.
15272 (imm_store_chain_info::coalesce_immediate): Call it to decide whether
15273 consecutive non-overlapping stores can be merged. Turn MEM_REF stores
15274 into BIT_INSERT_EXPR stores if the group contains a non-MEM_REF store.
15275
15276 2018-06-04 Richard Biener <rguenther@suse.de>
15277
15278 PR tree-optimization/85955
15279 * builtins.c (fold_builtin_sincos): Convert pointers to
15280 destination to appropriate type before dereferencing.
15281
15282 2018-06-04 Segher Boessenkool <segher@kernel.crashing.org>
15283
15284 * config/rs6000/rs6000.md (abs<mode>2 for FLOAT128): Handle IFmode.
15285
15286 2018-06-04 Richard Sandiford <richard.sandiford@linaro.org>
15287
15288 * expr.c (expand_expr_real_1): Force the operand into memory if
15289 its TYPE_MODE is BLKmode and if there is no integer mode for
15290 the number of bits being extracted.
15291
15292 2018-06-04 Jakub Jelinek <jakub@redhat.com>
15293
15294 PR target/85832
15295 PR target/86036
15296 * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
15297 Use vptestnm rather than vptestm in (=Yc,v,C) variant.
15298
15299 2018-06-04 Richard Biener <rguenther@suse.de>
15300
15301 * tree-cfgcleanup.c (cleanup_tree_cfg_1): Fold into...
15302 (cleanup_tree_cfg_noloop): ... single caller. Do
15303 start_recording_case_labels later.
15304
15305 2018-06-04 Sebastian Peryt <sebastian.peryt@intel.com>
15306
15307 * config/i386/cldemoteintrin.h: Change define from _X86INTRIN_H_INCLUDED
15308 to _IMMINTRIN_H_INCLUDED.
15309 * config/i386/pconfigintrin.h: Ditto.
15310 * config/i386/waitpkgintrin.h: Ditto.
15311 * config/i386/immintrin.h: Add includes for sgxintrin.h,
15312 pconfigintrin.h, waitpkgintrin.h and cldemoteintrin.h.
15313 * config/i386/x86intrin.h: Remove includes for mintrin.h, xmmintrin.h,
15314 emmintrin.h, pmmintrin.h, tmmintrin.h, smmintrin.h, wmmintrin.h,
15315 bmiintrin.h, bmi2intrin.h, lzcntintrin.h, sgxintrin.h, pconfigintrin.h,
15316 waitpkgintrin.h and cldemoteintrin.h.
15317
15318 2018-06-04 Richard Biener <rguenther@suse.de>
15319
15320 PR tree-optimization/86038
15321 * tracer.c (find_best_successor): Check probability for
15322 being initialized, bail out if not.
15323
15324 2018-06-04 Richard Earnshaw <rearnsha@arm.com>
15325
15326 PR target/86003
15327 * config/arm/arm-cpus.in (ALL_QUIRKS): Add xscale feature to the list
15328 of bits to ignore when comparing architectures.
15329
15330 2018-06-04 Jakub Jelinek <jakub@redhat.com>
15331
15332 PR tree-optimization/69615
15333 * fold-const.c (merge_ranges): If range1 is - [x, x] and x is the
15334 maximum or minimum of the type, try to merge it also as if
15335 range1 is + [-, x - 1] or + [x + 1, -].
15336
15337 PR c++/86025
15338 * tree.c (inchash::add_expr): Handle IDENTIFIER_NODE.
15339
15340 2018-06-03 Eric Botcazou <ebotcazou@adacore.com>
15341
15342 PR tree-optimization/86034
15343 * gimple-ssa-store-merging.c (output_merged_store): Convert the RHS to
15344 the unsigned bitfield type in a bit insertion sequence if it does not
15345 have a larger precision than the bitfield size.
15346 (process_store): Also bypass widening conversions for BIT_INSERT_EXPR.
15347
15348 2018-06-03 Kito Cheng <kito.cheng@gmail.com>
15349
15350 * config/nds32/nds32-peephole2.md: Add new patterns for code size.
15351
15352 2018-06-03 Chung-Ju Wu <jasonwucj@gmail.com>
15353
15354 * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3J.
15355 * config/nds32/nds32.c (nds32_option_override): Consider ARCH_V3J.
15356 * config/nds32/nds32.h (TARGET_ISA_V3): Add ARCH_V3J checking.
15357 * config/nds32/nds32.opt (march): Add enum value Value(ARCH_V3J).
15358
15359 2018-06-03 Chung-Ju Wu <jasonwucj@gmail.com>
15360
15361 * common/config/nds32/nds32-common.c (nds32_option_optimization_table):
15362 Disable -fdelete-null-pointer-checks for ELF toolchain.
15363
15364 2018-06-02 Chung-Ju Wu <jasonwucj@gmail.com>
15365 Kito Cheng <kito.cheng@gmail.com>
15366
15367 * config.gcc (nds32*): Use nds32-linux.opt and nds32-elf.opt.
15368 (nds32le-*-*, nds32be-*-*): Integrate checking process.
15369 (nds32*-*-*): Add glibc and uclibc conditions.
15370 * common/config/nds32/nds32-common.c (nds32_except_unwind_info): New.
15371 (TARGET_EXCEPT_UNWIND_INFO): Define.
15372 * config/nds32/elf.h: New file.
15373 * config/nds32/linux.h: New file.
15374 * config/nds32/nds32-elf.opt: New file.
15375 * config/nds32/nds32-linux.opt: New file.
15376 * config/nds32/nds32-fp-as-gp.c
15377 (pass_nds32_fp_as_gp::gate): Consider TARGET_LINUX_ABI.
15378 * config/nds32/nds32.c (nds32_conditional_register_usage): Consider
15379 TARGET_LINUX_ABI.
15380 (nds32_asm_file_end): Ditto.
15381 (nds32_print_operand): Ditto.
15382 (nds32_insert_attributes): Ditto.
15383 (nds32_init_libfuncs): New function.
15384 (TARGET_HAVE_TLS): Define.
15385 (TARGET_INIT_LIBFUNCS): Define.
15386 * config/nds32/nds32.h (TARGET_DEFAULT_RELAX): Apply different relax
15387 spec content.
15388 (TARGET_ELF): Apply different mcmodel setting.
15389 (LINK_SPEC, LIB_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): The content has
15390 been migrated into elf.h and linux.h files.
15391 * config/nds32/nds32.md (add_pc): Consider TARGET_LINUX_ABI.
15392 * config/nds32/nds32.opt (mvh): Consider TARGET_LINUX_ABI.
15393 (mcmodel): The content has been migrated into nds32-elf.opt and
15394 nds32-linux.opt files.
15395 * config/nds32/t-elf: New file.
15396 * config/nds32/t-linux: New file.
15397
15398 2018-06-02 Chung-Ju Wu <jasonwucj@gmail.com>
15399 Shiva Chen <shiva0217@gmail.com>
15400
15401 * config/nds32/constants.md (unspec_volatile_element): Add
15402 UNSPEC_VOLATILE_OMIT_FP_BEGIN and UNSPEC_VOLATILE_OMIT_FP_END.
15403 * config/nds32/nds32-fp-as-gp.c: New implementation of fp_as_gp
15404 optimization.
15405 * config/nds32/nds32-protos.h (nds32_naked_function_p): Declare.
15406 (make_pass_nds32_fp_as_gp): Declare.
15407 * config/nds32/nds32.c (nds32_register_passes): Add fp_as_gp as one
15408 optmization pass.
15409 (nds32_asm_function_end_prologue): Remove unused asm output.
15410 (nds32_asm_function_begin_epilogue): Remove unused asm output.
15411 (nds32_asm_file_start): Output necessary fp_as_gp information.
15412 (nds32_option_override): Adjust register usage.
15413 (nds32_expand_prologue): Consider fp_as_gp situation.
15414 (nds32_expand_prologue_v3push): Consider fp_as_gp situation.
15415 * config/nds32/nds32.md (prologue): Check fp_as_gp_p and naked_p.
15416 (epilogue): Ditto.
15417 (return): Ditto.
15418 (simple_return): Ditto.
15419 (omit_fp_begin): Output special directive for fp_as_gp.
15420 (omit_fp_end): Output special directive for fp_as_gp.
15421 * config/nds32/nds32.opt (mfp-as-gp, mno-fp-as-gp, mforce-fp-as-gp,
15422 mforbid-fp-as-gp): New options.
15423
15424 2018-06-01 Mark Wielaard <mark@klomp.org>
15425
15426 * dwarf2out.c (dwarf2out_finish): Remove generation of
15427 DW_AT_loclists_base.
15428
15429 2018-06-01 Eric Botcazou <ebotcazou@adacore.com>
15430
15431 * gimple-ssa-store-merging.c: Include gimple-fold.h.
15432 (struct store_immediate_info): Document BIT_INSERT_EXPR stores.
15433 (struct merged_store_group): Add bit_insertion field.
15434 (dump_char_array): Use standard hexadecimal format.
15435 (merged_store_group::merged_store_group): Set bit_insertion to false.
15436 (merged_store_group::apply_stores): Use optimal buffer size. Deal
15437 with BIT_INSERT_EXPR stores. Move up code updating the mask and
15438 also print the mask in the dump file.
15439 (pass_store_merging::gate): Minor tweak.
15440 (imm_store_chain_info::coalesce_immediate): Fix wrong association
15441 of stores with groups in dump. Allow coalescing of BIT_INSERT_EXPR
15442 stores with INTEGER_CST stores.
15443 (count_multiple_uses) <BIT_INSERT_EXPR>: New case.
15444 (imm_store_chain_info::output_merged_store): Add try_bitpos variable
15445 and use it throughout. Generate bit insertion sequences if need be.
15446 (pass_store_merging::process_store): Remove redundant condition.
15447 Record stores from a SSA name to a bit-field with BIT_INSERT_EXPR.
15448
15449 2018-06-01 Segher Boessenkool <segher@kernel.crashing.org>
15450
15451 * config/rs6000/rs6000.c (rs6000_mangle_type): Change the mangling of
15452 the 128-bit floating point types. Fix function comment.
15453
15454 2018-06-01 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
15455
15456 * config/aarch64/aarch64-simd.md
15457 (aarch64_simd_vec_unpack<su>_lo_<mode>): Use UXTL and SXTL assembler
15458 mnemonics.
15459 (aarch64_simd_vec_unpack<su>_hi_<mode>): Use UXTL2 and SXTL2 assembler
15460 mnemonics.
15461
15462 2018-06-01 Richard Sandiford <richard.sandiford@linaro.org>
15463
15464 PR tree-optimization/85989
15465 * gimple-ssa-backprop.c (backprop::m_visited_phis): New member
15466 variable.
15467 (backprop::intersect_uses): Check it when deciding whether this
15468 is a backedge reference.
15469 (backprop::process_block): Add each phi to m_visited_phis
15470 after visiting it, then clear it at the end.
15471
15472 2018-06-01 Richard Biener <rguenther@suse.de>
15473
15474 * tree-vectorizer.h (vect_dr_stmt): New function.
15475 (vect_get_load_cost): Adjust.
15476 (vect_get_store_cost): Likewise.
15477 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence):
15478 Use vect_dr_stmt instead of DR_SMTT.
15479 (vect_record_base_alignments): Likewise.
15480 (vect_calculate_target_alignment): Likewise.
15481 (vect_compute_data_ref_alignment): Likewise and make static.
15482 (vect_update_misalignment_for_peel): Likewise.
15483 (vect_verify_datarefs_alignment): Likewise.
15484 (vector_alignment_reachable_p): Likewise.
15485 (vect_get_data_access_cost): Likewise. Pass down
15486 vinfo to vect_get_load_cost/vect_get_store_cost instead of DR.
15487 (vect_get_peeling_costs_all_drs): Likewise.
15488 (vect_peeling_hash_get_lowest_cost): Likewise.
15489 (vect_enhance_data_refs_alignment): Likewise.
15490 (vect_find_same_alignment_drs): Likewise.
15491 (vect_analyze_data_refs_alignment): Likewise.
15492 (vect_analyze_group_access_1): Likewise.
15493 (vect_analyze_group_access): Likewise.
15494 (vect_analyze_data_ref_access): Likewise.
15495 (vect_analyze_data_ref_accesses): Likewise.
15496 (vect_vfa_segment_size): Likewise.
15497 (vect_small_gap_p): Likewise.
15498 (vectorizable_with_step_bound_p): Likewise.
15499 (vect_prune_runtime_alias_test_list): Likewise.
15500 (vect_analyze_data_refs): Likewise.
15501 (vect_supportable_dr_alignment): Likewise.
15502 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
15503 (vect_gen_prolog_loop_niters): Likewise.
15504 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
15505 * tree-vect-patterns.c (vect_recog_bool_pattern): Do not
15506 modify DR_STMT.
15507 (vect_recog_mask_conversion_pattern): Likewise.
15508 (vect_try_gather_scatter_pattern): Likewise.
15509 * tree-vect-stmts.c (vect_model_store_cost): Pass stmt_info
15510 to vect_get_store_cost.
15511 (vect_get_store_cost): Get stmt_info instead of DR.
15512 (vect_model_load_cost): Pass stmt_info to vect_get_load_cost.
15513 (vect_get_load_cost): Get stmt_info instead of DR.
15514
15515 2018-06-01 Richard Biener <rguenther@suse.de>
15516
15517 PR middle-end/86017
15518 * gimple-fold.c (var_decl_component_p): Also allow offsetted
15519 vars wrapped in MEM_REFs.
15520
15521 2018-06-01 Richard Sandiford <richard.sandiford@linaro.org>
15522
15523 * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
15524 Fix subreg tests so that we only return a choice between
15525 GENERAL_REGS and FP_REGS if the original classes included both.
15526
15527 2018-06-01 Richard Biener <rguenther@suse.de>
15528
15529 PR ipa/85960
15530 * tree-ssa-structalias.c (get_function_part_constraint):
15531 Handle NULL fi->decl.
15532 (find_func_aliases_for_call): Properly handle indirect
15533 fi from direct call.
15534 (find_func_clobbers): Likewise.
15535 (ipa_pta_execute): Likewise.
15536 (create_variable_info_for): For functions that are ifunc_resolver
15537 resolve to a varinfo that contains the result of the resolver call.
15538 (associate_varinfo_to_alias): Do not treat ifunc resolvers as
15539 aliases.
15540
15541 2018-05-31 Michael Collison <michael.collison@arm.com>
15542
15543 * config/aarch64/aarch64.md:
15544 (*fix_to_zero_extenddfdi2): New pattern.
15545 * gcc.target/aarch64/fix_extend1.c: New testcase.
15546
15547 2018-05-31 Qing Zhao <qing.zhao@oracle.com>
15548
15549 PR middle-end/78809
15550 PR middle-end/83026
15551 * builtins.c (expand_builtin): Add the handling of BUILT_IN_STRCMP_EQ
15552 and BUILT_IN_STRNCMP_EQ.
15553 * builtins.def: Add new builtins BUILT_IN_STRCMP_EQ and
15554 BUILT_IN_STRNCMP_EQ.
15555 * gimple-fold.c (gimple_fold_builtin_string_compare): Add the
15556 handling of BUILTIN_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
15557 (gimple_fold_builtin): Likewise.
15558 * tree-ssa-strlen.c (compute_string_length): New function.
15559 (determine_min_obsize): New function.
15560 (handle_builtin_string_cmp): New function to handle calls to
15561 string compare functions.
15562 (strlen_optimize_stmt): Add handling to builtin string compare
15563 calls.
15564 * tree-ssa-structalias.c (find_func_aliases_for_builtin_call):
15565 Add the handling of BUILT_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
15566 * tree.c (build_common_builtin_nodes): Add new defines of
15567 BUILT_IN_STRNCMP_EQ and BUILT_IN_STRCMP_EQ.
15568
15569 2018-05-31 Jakub Jelinek <jakub@redhat.com>
15570
15571 PR target/85984
15572 * bb-reorder.c (pass_partition_blocks::gate): Return false for
15573 functions with naked attribute.
15574
15575 2018-05-31 Uros Bizjak <ubizjak@gmail.com>
15576
15577 * config/i386/sse.md (avx_vec_concat<mode>):
15578 Substitute concat_tg_mode mode attribute with xtg_mode.
15579 (<mask_codefor>avx512dq_broadcast<mode><mask_name>_1): Ditto.
15580 (concat_tg_mode): Remove mode attribute.
15581
15582 2018-05-31 Martin Sebor <msebor@redhat.com>
15583
15584 PR c/82063
15585 * calls.c (alloc_max_size): Correct a logic error/typo.
15586 Treat excessive arguments as infinite. Warn for invalid arguments.
15587 * doc/invoke.texi (-Walloc-size-larger-than): Update.
15588
15589 2018-05-31 H.J. Lu <hongjiu.lu@intel.com>
15590
15591 PR target/85829
15592 * config/i386/x86-tune.def: Re-enable partial_reg_dependency
15593 and movx for Haswell.
15594
15595 2018-05-31 Chung-Lin Tang <cltang@codesourcery.com>
15596 Cesar Philippidis <cesar@codesourcery.com>
15597
15598 PR middle-end/85879
15599 * gimplify.c (gimplify_adjust_omp_clauses): Add 'remove = true'
15600 when emitting error on private/firstprivate reductions.
15601 * omp-low.c (lower_omp_target): Avoid reference-type processing
15602 on pointers for firstprivate clause.
15603
15604 2018-05-31 Sameera Deshpande <sameera.deshpande@linaro.org>
15605
15606 * config/aarch64/aarch64-simd-builtins.def (ld1x3): New.
15607 (st1x2): Likewise.
15608 (st1x3): Likewise.
15609 * config/aarch64/aarch64-simd.md
15610 (aarch64_ld1x3<VALLDIF:mode>): New pattern.
15611 (aarch64_ld1_x3_<mode>): Likewise
15612 (aarch64_st1x2<VALLDIF:mode>): Likewise
15613 (aarch64_st1_x2_<mode>): Likewise
15614 (aarch64_st1x3<VALLDIF:mode>): Likewise
15615 (aarch64_st1_x3_<mode>): Likewise
15616 * config/aarch64/arm_neon.h (vld1_u8_x3): New function.
15617 (vld1_s8_x3): Likewise.
15618 (vld1_u16_x3): Likewise.
15619 (vld1_s16_x3): Likewise.
15620 (vld1_u32_x3): Likewise.
15621 (vld1_s32_x3): Likewise.
15622 (vld1_u64_x3): Likewise.
15623 (vld1_s64_x3): Likewise.
15624 (vld1_f16_x3): Likewise.
15625 (vld1_f32_x3): Likewise.
15626 (vld1_f64_x3): Likewise.
15627 (vld1_p8_x3): Likewise.
15628 (vld1_p16_x3): Likewise.
15629 (vld1_p64_x3): Likewise.
15630 (vld1q_u8_x3): Likewise.
15631 (vld1q_s8_x3): Likewise.
15632 (vld1q_u16_x3): Likewise.
15633 (vld1q_s16_x3): Likewise.
15634 (vld1q_u32_x3): Likewise.
15635 (vld1q_s32_x3): Likewise.
15636 (vld1q_u64_x3): Likewise.
15637 (vld1q_s64_x3): Likewise.
15638 (vld1q_f16_x3): Likewise.
15639 (vld1q_f32_x3): Likewise.
15640 (vld1q_f64_x3): Likewise.
15641 (vld1q_p8_x3): Likewise.
15642 (vld1q_p16_x3): Likewise.
15643 (vld1q_p64_x3): Likewise.
15644 (vst1_s64_x2): Likewise.
15645 (vst1_u64_x2): Likewise.
15646 (vst1_f64_x2): Likewise.
15647 (vst1_s8_x2): Likewise.
15648 (vst1_p8_x2): Likewise.
15649 (vst1_s16_x2): Likewise.
15650 (vst1_p16_x2): Likewise.
15651 (vst1_s32_x2): Likewise.
15652 (vst1_u8_x2): Likewise.
15653 (vst1_u16_x2): Likewise.
15654 (vst1_u32_x2): Likewise.
15655 (vst1_f16_x2): Likewise.
15656 (vst1_f32_x2): Likewise.
15657 (vst1_p64_x2): Likewise.
15658 (vst1q_s8_x2): Likewise.
15659 (vst1q_p8_x2): Likewise.
15660 (vst1q_s16_x2): Likewise.
15661 (vst1q_p16_x2): Likewise.
15662 (vst1q_s32_x2): Likewise.
15663 (vst1q_s64_x2): Likewise.
15664 (vst1q_u8_x2): Likewise.
15665 (vst1q_u16_x2): Likewise.
15666 (vst1q_u32_x2): Likewise.
15667 (vst1q_u64_x2): Likewise.
15668 (vst1q_f16_x2): Likewise.
15669 (vst1q_f32_x2): Likewise.
15670 (vst1q_f64_x2): Likewise.
15671 (vst1q_p64_x2): Likewise.
15672 (vst1_s64_x3): Likewise.
15673 (vst1_u64_x3): Likewise.
15674 (vst1_f64_x3): Likewise.
15675 (vst1_s8_x3): Likewise.
15676 (vst1_p8_x3): Likewise.
15677 (vst1_s16_x3): Likewise.
15678 (vst1_p16_x3): Likewise.
15679 (vst1_s32_x3): Likewise.
15680 (vst1_u8_x3): Likewise.
15681 (vst1_u16_x3): Likewise.
15682 (vst1_u32_x3): Likewise.
15683 (vst1_f16_x3): Likewise.
15684 (vst1_f32_x3): Likewise.
15685 (vst1_p64_x3): Likewise.
15686 (vst1q_s8_x3): Likewise.
15687 (vst1q_p8_x3): Likewise.
15688 (vst1q_s16_x3): Likewise.
15689 (vst1q_p16_x3): Likewise.
15690 (vst1q_s32_x3): Likewise.
15691 (vst1q_s64_x3): Likewise.
15692 (vst1q_u8_x3): Likewise.
15693 (vst1q_u16_x3): Likewise.
15694 (vst1q_u32_x3): Likewise.
15695 (vst1q_u64_x3): Likewise.
15696 (vst1q_f16_x3): Likewise.
15697 (vst1q_f32_x3): Likewise.
15698 (vst1q_f64_x3): Likewise.
15699 (vst1q_p64_x3): Likewise.
15700
15701 2018-05-30 Jozef Lawrynowicz <jozef.l@mittosystems.com>
15702
15703 * config/msp430/msp430.c (msp430_output_labelref): Prepend
15704 user_label_prefix to name.
15705
15706 * tree-core.h: Update comment about the format of NAME string
15707 passed to handler in attribute_spec.
15708
15709 * config/msp430/msp430.md: Remove erroneous subreg expression from
15710 zero_extendqisi2 insn pattern. Remove msp430x ISA restriction on
15711 zero_extend{q,h}isi2.
15712
15713 2018-05-30 Borislav Petkov <bp@suse.de>
15714
15715 * doc/extend.texi: Document some architecture specific
15716 constraints and sort entries.
15717
15718 2018-05-30 Martin Sebor <msebor@redhat.com>
15719
15720 PR middle-end/85369
15721 * builtins.c (expand_builtin_stpcpy_1): New function.
15722 (expand_builtin_stpcpy): Call it, and call maybe_warn_nonstring_arg
15723 only if the former succeeds.
15724
15725 2018-05-31 Sameera Deshpande <sameera.deshpande@linaro.org>
15726
15727 * config/aarch64/aarch64-cores.def (saphira) : Add support for ARMv8.4
15728 in saphira.
15729
15730 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
15731
15732 * doc/invoke.texi (-flinker-output): Document
15733
15734 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
15735
15736 * passes.c (ipa_write_summaries): Only modify statements if body
15737 is in memory.
15738 * cgraphunit.c (ipa_passes): Also produce intermeidate code when
15739 incrementally linking.
15740 (ipa_passes): Likewise.
15741 * lto-cgraph.c (lto_output_node): When incrementally linking do not
15742 pass down resolution info.
15743 * common.opt (flag_incremental_link): Update info.
15744 * gcc.c (plugin specs): Turn flinker-output=* to
15745 -plugin-opt=-linker-output-known
15746 * toplev.c (compile_file): Also cut compilation when doing incremental
15747 link.
15748 * flag-types. (enum lto_partition_model): Add
15749 LTO_LINKER_OUTPUT_NOLTOREL.
15750 (invoke.texi): Add -flinker-output docs.
15751 * ipa.c (symbol_table::remove_unreachable_nodes): Handle LTO incremental
15752 link same way as WPA; do not stream in dead initializers.
15753
15754 * dwarf2out.c (dwarf2out_die_ref_for_decl,
15755 darf2out_register_external_decl): Support incremental link.
15756
15757 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
15758
15759 * lto-opts.c (lto_write_options): Skip OPT_dumpdir, OPT_fresolution_.
15760
15761 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
15762
15763 * lto-wrapper.c (debug_objcopy): Add rename parameter; pass
15764 it down to simple_object_copy_lto_debug_sections.
15765 (run_gcc): Determine incremental LTO link time and configure
15766 lto1 into non-wpa mode, disable renaming of debug sections.
15767
15768 2018-05-30 Kelvin Nilsen <kelvin@gcc.gnu.org>
15769
15770 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
15771 descriptions of various incorrectly documented functions.
15772
15773 2018-05-30 Andre Vieira <andre.simoesdiasvieira@arm.com>
15774
15775 Revert:
15776 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
15777 address check not strict.
15778
15779 2018-05-30 Richard Biener <rguenther@suse.de>
15780
15781 PR tree-optimization/85964
15782 * tracer.c (better_p): Drop initialized count check, we only
15783 call the function with initialized counts now.
15784 (find_best_successor): Do find a best edge if one
15785 has uninitialized count.
15786 (find_best_predecessor): Likewise. Do BB frequency check only
15787 if count is initialized.
15788
15789 2017-05-30 Jackson Woodruff <jackson.woodruff@arm.com>
15790
15791 * config/aarch64/aarch64.c (aarch64_host_wide_int_compare): New.
15792 (aarch64_ldrstr_offset_compare): New.
15793 (aarch64_operands_adjust_ok_for_ldpstp): Update to consider all
15794 load/store orderings.
15795 (aarch64_gen_adjusted_ldpstp): Likewise.
15796
15797 2018-05-30 Wilco Dijkstra <wdijkstr@arm.com>
15798
15799 * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
15800 Check for subset of GENERAL_REGS and FP_REGS.
15801 * config/aarch64/aarch64-simd.md (aarch64_get_lane): Increase cost of
15802 r=w alternative.
15803
15804 2018-05-30 Richard Sandiford <richard.sandiford@linaro.org>
15805
15806 * alias.c (adjust_offset_for_component_ref): Use poly_int_tree_p
15807 and wi::to_poly_offset. Add the current offset and then check
15808 whether the sum fits, rather than using an unchecked addition of
15809 a checked term. Check for a shwi rather than a uhwi.
15810 * expr.c (get_bit_range): Use tree_to_poly_uint64.
15811 (store_constructor): Use poly_int_tree_p.
15812 (expand_expr_real_1): Likewise.
15813 * function.c (assign_temp): Likewise.
15814 * fold-const.c (const_binop): Use poly_int_tree_p and
15815 wi::to_poly_offset.
15816 (fold_indirect_ref_1): Likewise. Use multiple_p to attempt an exact
15817 division.
15818 * ipa-icf-gimple.c (func_checker::compare_operand): Use
15819 to_poly_offset for MEM offsets.
15820 * ipa-icf.c (sem_variable::equals): Likewise.
15821 * stor-layout.c (compute_record_mode): Use poly_int_tree_p.
15822 * tree-ssa-sccvn.c (ao_ref_init_from_vn_reference): Use
15823 wi::to_poly_offset for BIT_FIELD_REF offsets.
15824 (vn_reference_maybe_forwprop_address): Use poly_int_tree_p and
15825 wi::to_poly_offset.
15826 * var-tracking.c (emit_note_insn_var_location): Use
15827 tree_to_poly_uint64.
15828
15829 2018-05-29 Jim Wilson <jimw@sifive.com>
15830
15831 * config/riscv/riscv.c (riscv_interrupt_type): Fix comment typo.
15832
15833 2018-05-29 Uros Bizjak <ubizjak@gmail.com>
15834
15835 PR target/85950
15836 * config/i386/i386.md (l<rounding_insn><MODEF:mode><SWI48:mode>2):
15837 Enable for TARGET_SSE4_1 and generate rounds{s,d} and cvtts{s,d}2si{,q}
15838 sequence.
15839 (sse4_1_round<mode>2): Use nonimmediate_operand
15840 for operand 1 predicate.
15841
15842 2018-05-29 Martin Sebor <msebor@redhat.com>
15843 Richard Biener <rguenther@suse.de>
15844
15845 PR testsuite/85888
15846 * calls.c (get_size_range): Call determine_value_range instead
15847 of get_value_range..
15848 * tree-vrp.h (determine_value_range): Declared new function.
15849 * tree-vrp.c (determine_value_range_1, determine_value_range): New.
15850
15851 2018-05-29 Richard Biener <rguenther@suse.de>
15852
15853 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Make
15854 sure to use non-pattern stmts for get_earlier_stmt arguments.
15855 * tree-vectorizer.h (get_earlier_stmt): Assert we do not get
15856 called on pattern stmts.
15857 (get_later_stmt): Likewise.
15858
15859 2018-05-29 Martin Liska <mliska@suse.cz>
15860
15861 PR gcov-profile/85759
15862 * doc/gcov.texi: Document GCOV_ERROR_FILE and GCOV_EXIT_AT_ERROR
15863 env variables.
15864
15865 2018-05-29 Jakub Jelinek <jakub@redhat.com>
15866
15867 * tree-cfg.c (verify_gimple_assign_unary): Add checking for
15868 VEC_UNPACK_*_EXPR.
15869 (verify_gimple_assign_binary): Check TYPE_VECTOR_SUBPARTS for
15870 VEC_PACK_*_EXPR.
15871
15872 PR target/85918
15873 * tree.def (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
15874 VEC_PACK_FLOAT_EXPR): New tree codes.
15875 * tree-pretty-print.c (op_code_prio): Handle
15876 VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR.
15877 (dump_generic_node): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
15878 VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
15879 * tree-inline.c (estimate_operator_cost): Likewise.
15880 * gimple-pretty-print.c (dump_binary_rhs): Handle VEC_PACK_FLOAT_EXPR.
15881 * fold-const.c (const_binop): Likewise.
15882 (const_unop): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR and
15883 VEC_UNPACK_FIX_TRUNC_LO_EXPR.
15884 * tree-cfg.c (verify_gimple_assign_unary): Likewise.
15885 (verify_gimple_assign_binary): Handle VEC_PACK_FLOAT_EXPR.
15886 * cfgexpand.c (expand_debug_expr): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
15887 VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
15888 * expr.c (expand_expr_real_2): Likewise.
15889 * optabs.def (vec_packs_float_optab, vec_packu_float_optab,
15890 vec_unpack_sfix_trunc_hi_optab, vec_unpack_sfix_trunc_lo_optab,
15891 vec_unpack_ufix_trunc_hi_optab, vec_unpack_ufix_trunc_lo_optab): New
15892 optabs.
15893 * optabs.c (expand_widen_pattern_expr): For
15894 VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR use
15895 sign from result type rather than operand's type.
15896 (expand_binop_directly): For vec_packu_float_optab and
15897 vec_packs_float_optab allow result type to be different from operand's
15898 type.
15899 * optabs-tree.c (optab_for_tree_code): Handle
15900 VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
15901 VEC_PACK_FLOAT_EXPR. Formatting fixes.
15902 * tree-vect-generic.c (expand_vector_operations_1): Handle
15903 VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
15904 VEC_PACK_FLOAT_EXPR.
15905 * tree-vect-stmts.c (supportable_widening_operation): Handle
15906 FIX_TRUNC_EXPR.
15907 (supportable_narrowing_operation): Handle FLOAT_EXPR.
15908 * config/i386/i386.md (fixprefix, floatprefix): New code attributes.
15909 * config/i386/sse.md (*float<floatunssuffix>v2div2sf2): Rename to ...
15910 (float<floatunssuffix>v2div2sf2): ... this. Formatting fix.
15911 (vpckfloat_concat_mode, vpckfloat_temp_mode, vpckfloat_op_mode): New
15912 mode attributes.
15913 (vec_pack<floatprefix>_float_<mode>): New expander.
15914 (vunpckfixt_mode, vunpckfixt_model, vunpckfixt_extract_mode): New mode
15915 attributes.
15916 (vec_unpack_<fixprefix>fix_trunc_lo_<mode>,
15917 vec_unpack_<fixprefix>fix_trunc_hi_<mode>): New expanders.
15918 * doc/md.texi (vec_packs_float_@var{m}, vec_packu_float_@var{m},
15919 vec_unpack_sfix_trunc_hi_@var{m}, vec_unpack_sfix_trunc_lo_@var{m},
15920 vec_unpack_ufix_trunc_hi_@var{m}, vec_unpack_ufix_trunc_lo_@var{m}):
15921 Document.
15922 * doc/generic.texi (VEC_UNPACK_FLOAT_HI_EXPR,
15923 VEC_UNPACK_FLOAT_LO_EXPR): Fix pasto in description.
15924 (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
15925 VEC_PACK_FLOAT_EXPR): Document.
15926
15927 2018-05-29 Richard Biener <rguenther@suse.de>
15928
15929 * tree-vectorizer.h (struct vec_info): Add stmt_vec_infos
15930 member.
15931 (stmt_vec_info_vec): Make pointer.
15932 (init_stmt_vec_info_vec): Remove.
15933 (free_stmt_vec_info_vec): Likewise.
15934 (set_stmt_vec_info_vec): New function.
15935 (free_stmt_vec_infos): Likewise.
15936 (vinfo_for_stmt): Adjust for stmt_vec_info_vec indirection.
15937 (set_vinfo_for_stmt): Likewise.
15938 (get_earlier_stmt): Likewise.
15939 (get_later_stmt): Likewise.
15940 * tree-vectorizer.c (stmt_vec_info_vec): Make pointer.
15941 (vec_info::vec_info): Allocate stmt_vec_infos and set the global.
15942 (vec_info::~vec_info): Free stmt_vec_infos.
15943 (vectorize_loops): Set the global stmt_vec_info_vec to NULL.
15944 Remove old init_stmt_vec_info_vec/free_stmt_vec_info_vec calls.
15945 (pass_slp_vectorize::execute): Likewise.
15946 * tree-vect-stmts.c (init_stmt_vec_info_vec): Remove.
15947 (free_stmt_vec_info_vec): Likewise.
15948 (set_stmt_vec_info_vec): New function.
15949 (free_stmt_vec_infos): Likewise.
15950 * tree-vect-loop.c (_loop_vec_info::~_loop_vec_info): Set
15951 the global stmt_vec_info_vec.
15952 * tree-parloops.c (gather_scalar_reductions): Use
15953 set_stmt_vec_info_vec/free_stmt_vec_infos and maintain a local
15954 vector.
15955
15956 2018-05-29 Richard Biener <rguenther@suse.de>
15957
15958 * dominance.c (iterate_fix_dominators): Push/pop TV_DOMINANCE.
15959
15960 2018-05-29 Martin Liska <mliska@suse.cz>
15961 David Malcolm <dmalcolm@redhat.com>
15962
15963 * vec.c (test_reverse): New.
15964 (vec_c_tests): Add new test.
15965 * vec.h (vl_ptr>::reverse): New function.
15966
15967 2018-05-29 Gerald Pfeifer <gerald@pfeifer.com>
15968
15969 * config.gcc: Identify FreeBSD 3.x and 4.x as unsupported.
15970
15971 * config/freebsd-spec.h (FBSD_LIB_SPEC): Only consider FreeBSD 5
15972 and later.
15973
15974 2018-05-28 Bernd Edlinger <bernd.edlinger@hotmail.de>
15975
15976 * tree-dump.c (dump_node): Use splay_tree_delete_pointers.
15977
15978 2018-05-28 Richard Biener <rguenther@suse.de>
15979
15980 PR tree-optimization/85933
15981 * tree-vect-data-refs.c (vect_record_base_alignments): Only
15982 look at stmts marked as vectorizable.
15983
15984 2018-05-28 Richard Biener <rguenther@suse.de>
15985
15986 PR tree-optimization/85934
15987 * tree-vect-generic.c (expand_vector_operations_1): Hoist
15988 vector boolean check before scalar optimization.
15989
15990 2018-05-28 Jakub Jelinek <jakub@redhat.com>
15991
15992 * doc/invoke.texi (ARM Options): Use @item instead of @itemx
15993 for armv5te.
15994
15995 2018-05-28 Mark Wielaard <mark@klomp.org>
15996
15997 * dwarf2asm.c (dw2_asm_output_delta_uleb128): Add brackets around lab2
15998 if it is an expression containing a minus sign.
15999
16000 2018-05-27 John David Anglin <danglin@gcc.gnu.org>
16001
16002 * config/pa/pa-linux.h (NEED_INDICATE_EXEC_STACK): Define to 0.
16003
16004 2018-05-27 Paul Koning <ni1d@arrl.net>
16005
16006 * config/pdp11/pdp11.md (truncsihi2): Remove.
16007
16008 2018-05-27 Monk Chiang <sh.chiang04@gmail.com>
16009 Chung-Ju Wu <jasonwucj@gmail.com>
16010
16011 * config/nds32/nds32-intrinsic.md (unaligned_storedi): Modify patterns
16012 implementation.
16013 (unaligned_store_dw): Ditto.
16014 * config/nds32/nds32-memory-manipulation.c
16015 (nds32_expand_movmemsi_loop_known_size): Refactoring implementation.
16016 (nds32_gen_dup_4_byte_to_word_value): Rename to ...
16017 (nds32_gen_dup_4_byte_to_word_value_aux): ... this.
16018 (emit_setmem_word_loop): Rename to ...
16019 (emit_setmem_doubleword_loop): ... this.
16020 (nds32_gen_dup_4_byte_to_word_value): New function.
16021 (nds32_gen_dup_8_byte_to_double_word_value): New function.
16022 (nds32_expand_setmem_loop): Refine implementation.
16023 (nds32_expand_setmem_loop_v3m): Ditto.
16024 * config/nds32/nds32-multiple.md (unaligned_store_update_base_dw): New
16025 pattern.
16026
16027 2018-05-27 Chung-Ju Wu <jasonwucj@gmail.com>
16028
16029 * config/nds32/nds32.md (bswapsi2, bswaphi2): New patterns.
16030
16031 2018-05-27 Chung-Ju Wu <jasonwucj@gmail.com>
16032
16033 * config/nds32/nds32.c (nds32_attribute_table): Add "no_prologue".
16034 (nds32_init_machine_status): Initialize machine->attr_naked_p and
16035 machine->attr_no_prologue_p.
16036 (nds32_compute_stack_frame): Check "naked" and "no_prologue" attributes.
16037 (nds32_naked_function_p): Handle "naked" and "no_prologue" attributes.
16038 (nds32_expand_epilogue): Consider attr_naked_p.
16039 (nds32_expand_epilogue_v3pop): Likewise.
16040 (nds32_can_use_return_insn): Likewise.
16041 * config/nds32/nds32.h (machine_function): Add attr_naked_p and
16042 attr_no_prologue_p fields.
16043 * config/nds32/nds32.opt (mret-in-naked-func): New option.
16044
16045 2018-05-27 Jakub Jelinek <jakub@redhat.com>
16046
16047 PR target/85918
16048 * config/i386/i386.md (fixunssuffix, floatunssuffix): New code
16049 attributes.
16050 * config/i386/sse.md
16051 (<floatsuffix>float<sseintvecmodelower><mode>2<mask_name><round_name>):
16052 Rename to ...
16053 (float<floatunssuffix><sseintvecmodelower><mode>2<mask_name><round_name>):
16054 ... this.
16055 (<floatsuffix>float<sselongvecmodelower><mode>2<mask_name><round_name>):
16056 Rename to ...
16057 (float<floatunssuffix><sselongvecmodelower><mode>2<mask_name><round_name>):
16058 ... this.
16059 (*<floatsuffix>floatv2div2sf2): Rename to ...
16060 (*float<floatunssuffix>v2div2sf2): ... this.
16061 (<floatsuffix>floatv2div2sf2_mask): Rename to ...
16062 (float<floatunssuffix>v2div2sf2_mask): ... this.
16063 (*<floatsuffix>floatv2div2sf2_mask_1): Rename to ...
16064 (*float<floatunssuffix>v2div2sf2_mask_1): ... this.
16065 (<fixsuffix>fix_truncv8dfv8si2<mask_name><round_saeonly_name>): Rename
16066 to ...
16067 (fix<fixunssuffix>_truncv8dfv8si2<mask_name><round_saeonly_name>):
16068 ... this.
16069 (<fixsuffix>fix_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
16070 Rename to ...
16071 (fix<fixunssuffix>_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
16072 ... this.
16073 (<fixsuffix>fix_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
16074 Rename to ...
16075 (fix<fixunssuffix>_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
16076 ... this.
16077 (<fixsuffix>fix_truncv2sfv2di2<mask_name>): Rename to ...
16078 (fix<fixunssuffix>_truncv2sfv2di2<mask_name>): ... this.
16079 (vec_pack_ufix_trunc_<mode>): Use gen_fixuns_truncv8dfv8si2 instead of
16080 gen_ufix_truncv8dfv8si2.
16081 * config/i386/i386-builtin.def (__builtin_ia32_cvttpd2uqq256_mask,
16082 __builtin_ia32_cvttpd2uqq128_mask, __builtin_ia32_cvttps2uqq256_mask,
16083 __builtin_ia32_cvttps2uqq128_mask, __builtin_ia32_cvtuqq2ps256_mask,
16084 __builtin_ia32_cvtuqq2ps128_mask, __builtin_ia32_cvtuqq2pd256_mask,
16085 __builtin_ia32_cvtuqq2pd128_mask, __builtin_ia32_cvttpd2udq512_mask,
16086 __builtin_ia32_cvtuqq2ps512_mask, __builtin_ia32_cvtuqq2pd512_mask,
16087 __builtin_ia32_cvttps2uqq512_mask, __builtin_ia32_cvttpd2uqq512_mask):
16088 Use fixuns instead ufix or floatuns instead ufloat in CODE_FOR_ names.
16089
16090 2018-05-24 H.J. Lu <hongjiu.lu@intel.com>
16091
16092 PR target/85900
16093 PR target/85345
16094 * varasm.c (assemble_alias): Lookup ifunc attribute on error.
16095
16096 2018-05-25 Jim Wilson <jimw@sifive.com>
16097
16098 * config/riscv/riscv-protos.h (riscv_epilogue_uses): New.
16099 * config/riscv/riscv.c (struct machine_function): Add
16100 interrupt_handler_p and attribute_checked_p fields.
16101 (riscv_attribute_table): Add interrupt.
16102 (riscv_interrupt_type_p): New.
16103 (riscv_save_reg_p): Save extra regs for interrupt handler.
16104 (riscv_use_save_libcall): Return false for interrupt handler.
16105 (riscv_first_stack_step): Add forward declaration.
16106 (riscv_compute_frame_info): New local interrupt_save_t1. Set it
16107 for interrupt handler with large frame. Use it for saved reg list.
16108 (riscv_expand_prologue): Move flag_stack_usage_info support to
16109 eliminate duplication.
16110 (riscv_expand_epilogue): Generate mret for interrupt handler.
16111 (riscv_epilogue_uses): New.
16112 (riscv_can_use_return_insn): Return false for interrupt handler.
16113 (riscv_function_ok_for_sibcall): Likewise.
16114 (riscv_set_current_function): Add interrupt handler support.
16115 * config/riscv/riscv.h (EPILOGUE_USES): Call riscv_epilogue_uses.
16116 * config/riscv/riscv.md (UNSPECV_MRET): New.
16117 (GP_REGNUM): New.
16118 (riscv_frflags, riscv_fsflags): Use tab after opcode.
16119 (riscv_mret): New.
16120 * doc/extend.texi (RISC-V Function Attributes) <interrupt>: New.
16121
16122 2018-05-25 Bill Schmidt <wschmidt@linux.ibm.com>
16123
16124 PR tree-optimization/85712
16125 * gimple-ssa-strength-reduction.c (replace_one_candidate): Skip if
16126 this candidate has already been replaced in-situ by a copy.
16127
16128 2018-05-25 Jason Merrill <jason@redhat.com>
16129
16130 PR c++/80485 - inline function non-zero address.
16131 * symtab.c (nonzero_address): Check DECL_COMDAT.
16132
16133 2018-05-25 Uros Bizjak <ubizjak@gmail.com>
16134
16135 PR target/83628
16136 * config/alpha/alpha.md (ashlsi3): New insn pattern.
16137 (*ashlsi_se): Rename from *ashldi_se. Define as sign
16138 extension of SImode operation. Use const123_operand predicate.
16139 (*saddsi_1): Remove.
16140 (*saddl_se_1): Ditto.
16141 (*ssubsi_1): Ditto.
16142 (*ssubl_se_1): Ditto.
16143 * config/alpha/predicates.md (const123_operand): New predicate.
16144 * config/alpha/constraints.md (P): Use IN_RANGE.
16145
16146 2018-05-25 Richard Biener <rguenther@suse.de>
16147
16148 * tree-ssa-alias.h (refs_may_alias_p): Add tbaa_p bool parameter,
16149 defaulted to true.
16150 (ref_maybe_used_by_stmt_p): Likewise.
16151 (stmt_may_clobber_ref_p): Likewise.
16152 (stmt_may_clobber_ref_p_1): Likewise.
16153 * tree-ssa-alias.c (refs_may_alias_p): Add tbaa_p bool parameter
16154 and pass it along.
16155 (ref_maybe_used_by_stmt_p): Likewise.
16156 (stmt_may_clobber_ref_p): Likewise.
16157 (stmt_may_clobber_ref_p_1): Likewise.
16158 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Use
16159 the alias oracle to disambiguate DRs with stmts DR analysis
16160 couldn't handle.
16161 (vect_analyze_data_refs): Do not give up on not analyzable
16162 DRs for BB vectorization. Remove code truncating the dataref
16163 vector.
16164
16165 2018-05-25 Jakub Jelinek <jakub@redhat.com>
16166
16167 PR target/85832
16168 * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
16169 Add (=Yk,v,C) variant using vptestm insn. Use TARGET_AVX512BW
16170 in test instead of TARGET_AVX512F for VI12_AVX512VL iterator.
16171
16172 2018-05-25 Richard Biener <rguenther@suse.de>
16173
16174 * tree-vect-data-refs.c (vect_find_stmt_data_reference): New
16175 function, combining stmt data ref gathering and fatal analysis
16176 parts.
16177 (vect_analyze_data_refs): Remove now redudnant code and simplify.
16178 * tree-vect-loop.c (vect_get_datarefs_in_loop): Factor out from
16179 vect_analyze_loop_2 and use vect_find_stmt_data_reference.
16180 * tree-vect-slp.c (vect_slp_bb): Use vect_find_stmt_data_reference.
16181 * tree-vectorizer.h (vect_find_stmt_data_reference): Declare.
16182
16183 2018-05-25 Bin Cheng <bin.cheng@arm.com>
16184
16185 PR tree-optimization/85720
16186 * tree-loop-distribution.c (break_alias_scc_partitions): Don't merge
16187 SCC if all partitions are builtins.
16188 (version_loop_by_alias_check): New parameter. Generate cancelable
16189 runtime alias check if all partitions are builtins.
16190 (distribute_loop): Update call to above function.
16191
16192 2018-05-25 Bin Cheng <bin.cheng@arm.com>
16193
16194 * tree-outof-ssa.c (tree-ssa.h, tree-dfa.h): Include header files.
16195 (create_default_def, for_all_parms): Moved from tree-ssa-coalesce.c.
16196 (parm_default_def_partition_arg): Ditto.
16197 (set_parm_default_def_partition): Ditto.
16198 (get_parm_default_def_partitions): Ditto and make it static.
16199 (get_undefined_value_partitions): Ditto and make it static.
16200 (remove_ssa_form): Refactor call to init_var_map here.
16201 * tree-ssa-coalesce.c (build_ssa_conflict_graph): Support live range
16202 computation for loop region.
16203 (coalesce_partitions, compute_optimized_partition_bases): Ditto.
16204 (register_default_def): Delete.
16205 (for_all_parms, create_default_def): Move to tree-outof-ssa.c.
16206 (parm_default_def_partition_arg): Ditto.
16207 (set_parm_default_def_partition): Ditto.
16208 (get_parm_default_def_partitions): Ditto and make it static.
16209 (get_undefined_value_partitions): Ditto and make it static.
16210 (coalesce_with_default, coalesce_with_default): Update comment.
16211 (create_coalesce_list_for_region): New func factored out from
16212 create_outofssa_var_map.
16213 (populate_coalesce_list_for_outofssa): New func factored out from
16214 create_outofssa_var_map and coalesce_ssa_name.
16215 (create_outofssa_var_map): Delete.
16216 (coalesce_ssa_name): Refactor to support live range computation.
16217 * tree-ssa-coalesce.h (coalesce_ssa_name): Change decl.
16218 (get_parm_default_def_partitions): Delete.
16219 (get_undefined_value_partitions): Ditto.
16220 * tree-ssa-live.c (init_var_map, delete_var_map): Support live range
16221 computation for loop region.
16222 (new_tree_live_info, loe_visit_block): Ditto.
16223 (live_worklist, set_var_live_on_entry): Ditto.
16224 (calculate_live_on_exit, verify_live_on_entry): Ditto.
16225 * tree-ssa-live.h (struct _var_map): New fields.
16226 (init_var_map): Change decl.
16227 (region_contains_p): New.
16228
16229 2018-05-25 Bin Cheng <bin.cheng@arm.com>
16230
16231 * tree-ssa-live.h (live_merge_and_clear): Delete.
16232
16233 2018-05-25 Richard Biener <rguenther@suse.de>
16234
16235 PR c++/85912
16236 * tree-dump.c (dequeue_and_dump): Remove access to removed
16237 operand 2 of a SWITCH_EXPR.
16238
16239 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
16240
16241 * doc/sourcebuild.texi (vect_double_cond_arith): Include
16242 multiplication and division.
16243 * doc/md.texi (cond_mul@var{m}, cond_div@var{m}, cond_mod@var{m})
16244 (cond_udiv@var{m}, cond_umod@var{m}): Document.
16245 * optabs.def (cond_smul_optab, cond_sdiv_optab, cond_smod_optab)
16246 (cond_udiv_optab, cond_umod_optab): New optabs.
16247 * internal-fn.def (IFN_COND_MUL, IFN_COND_DIV, IFN_COND_MOD)
16248 (IFN_COND_RDIV): New internal functions.
16249 * internal-fn.c (get_conditional_internal_fn): Handle TRUNC_DIV_EXPR,
16250 TRUNC_MOD_EXPR and RDIV_EXPR.
16251 * match.pd (UNCOND_BINARY, COND_BINARY): Handle them.
16252 * config/aarch64/iterators.md (UNSPEC_COND_MUL, UNSPEC_COND_DIV):
16253 New unspecs.
16254 (SVE_INT_BINARY): Include mult.
16255 (SVE_COND_FP_BINARY): Include UNSPEC_MUL and UNSPEC_DIV.
16256 (optab, sve_int_op): Handle mult.
16257 (optab, sve_fp_op, commutative): Handle UNSPEC_COND_MUL and
16258 UNSPEC_COND_DIV.
16259 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New pattern
16260 for SVE_INT_BINARY_SD.
16261
16262 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
16263
16264 * config/aarch64/iterators.md (SVE_INT_BINARY_SD): New code iterator.
16265 (optab, sve_int_op): Handle div and udiv.
16266 * config/aarch64/aarch64-sve.md (<optab><mode>3): New expander
16267 for SVE_INT_BINARY_SD.
16268 (*<optab><mode>3): New insn for the same.
16269
16270 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
16271
16272 * tree-vect-patterns.c: Include predict.h.
16273 (vect_recog_divmod_pattern): Restrict check for division support
16274 to when optimizing for size.
16275
16276 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
16277
16278 * doc/sourcebuild.texi (vect_double_cond_arith: Document.
16279 * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 4.
16280 (gimple_match_op::gimple_match_op): Add an overload for 4 operands.
16281 (gimple_match_op::set_op): Likewise.
16282 (gimple_resimplify4): Declare.
16283 * genmatch.c (get_operand_type): Handle CFN_COND_* functions.
16284 (expr::gen_transform): Likewise.
16285 (decision_tree::gen): Generate a simplification routine for 4 operands.
16286 * gimple-match-head.c (gimple_simplify): Add an overload for
16287 4 operands. In the top-level function, handle up to 4 call
16288 arguments and call gimple_resimplify4.
16289 (gimple_resimplify4): New function.
16290 (build_call_internal): Pass a fourth operand.
16291 (maybe_push_to_seq): Likewise.
16292 * match.pd (UNCOND_BINARY, COND_BINARY): New operator lists.
16293 Fold VEC_COND_EXPRs of an operation and a default value into
16294 an IFN_COND_* function if possible.
16295 * config/aarch64/iterators.md (UNSPEC_COND_MAX, UNSPEC_COND_MIN):
16296 New unspecs.
16297 (SVE_COND_FP_BINARY): Include them.
16298 (optab, sve_fp_op): Handle them.
16299 (SVE_INT_BINARY_REV): New code iterator.
16300 (SVE_COND_FP_BINARY_REV): New int iterator.
16301 (commutative): New int attribute.
16302 * config/aarch64/aarch64-protos.h (aarch64_sve_prepare_conditional_op):
16303 Declare.
16304 * config/aarch64/aarch64.c (aarch64_sve_prepare_conditional_op): New
16305 function.
16306 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Use it.
16307 (*cond_<optab><mode>): New patterns for reversed operands.
16308
16309 2018-05-25 Richard Biener <rguenther@suse.de>
16310
16311 * tree-vectorizer.h (STMT_VINFO_GROUP_*, GROUP_*): Remove.
16312 (DR_GROUP_*): New, assert we have non-NULL ->data_ref_info.
16313 (REDUC_GROUP_*): New, assert we have NULL ->data_ref_info.
16314 (STMT_VINFO_GROUPED_ACCESS): Adjust.
16315 * tree-vect-data-refs.c (everywhere): Adjust users.
16316 * tree-vect-loop.c (everywhere): Likewise.
16317 * tree-vect-slp.c (everywhere): Likewise.
16318 * tree-vect-stmts.c (everywhere): Likewise.
16319 * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
16320
16321 2018-05-25 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
16322
16323 * configure.ac (gcc_cv_as_section_has_e): Move to common section.
16324 Rename to...
16325 (gcc_cv_as_section_exclude): ... this.
16326 Try Solaris as #exclude syntax.
16327 * configure: Regenerate.
16328 * config.in: Regenerate.
16329 * config/i386/i386.c (i386_solaris_elf_named_section): Handle
16330 SECTION_EXCLUDE.
16331 * config/sparc/sparc.c (sparc_solaris_elf_asm_named_section)
16332 [HAVE_GAS_SECTION_EXCLUDE]: Handle SECTION_EXCLUDE.
16333
16334 * varasm.c (default_elf_asm_named_section): Don't check if
16335 HAVE_GAS_SECTION_EXCLUDE is defined.
16336
16337 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
16338
16339 * doc/md.texi: Update the documentation of the cond_* optabs
16340 to mention the new final operand. Fix GET_MODE_NUNITS call.
16341 Describe the scalar case too.
16342 * internal-fn.def (IFN_EXTRACT_LAST): Change type to fold_left.
16343 * internal-fn.c (expand_cond_unary_optab_fn): Expect 3 operands
16344 instead of 2.
16345 (expand_cond_binary_optab_fn): Expect 4 operands instead of 3.
16346 (get_conditional_internal_fn): Update comment.
16347 * tree-vect-loop.c (vectorizable_reduction): Pass the original
16348 accumulator value as a final argument to conditional functions.
16349 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Turn into
16350 a define_expand and add an "else" operand. Assert for now that
16351 the else operand is equal to operand 2. Use SVE_INT_BINARY and
16352 SVE_COND_FP_BINARY instead of SVE_COND_INT_OP and SVE_COND_FP_OP.
16353 (*cond_<optab><mode>): New patterns.
16354 * config/aarch64/iterators.md (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX)
16355 (UNSPEC_COND_SMIN, UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
16356 (UNSPEC_COND_EOR): Delete.
16357 (optab): Remove associated mappings.
16358 (SVE_INT_BINARY): New code iterator.
16359 (sve_int_op): Remove int attribute and add "minus" to the code
16360 attribute.
16361 (SVE_COND_INT_OP): Delete.
16362 (SVE_COND_FP_OP): Rename to...
16363 (SVE_COND_FP_BINARY): ...this.
16364
16365 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
16366
16367 * optabs.c (can_reuse_operands_p): New function.
16368 (maybe_legitimize_operands): Try to reuse the results for
16369 earlier operands.
16370
16371 2018-05-24 Uros Bizjak <ubizjak@gmail.com>
16372
16373 * config/i386/sse.md (cvtusi2<ssescalarmodesuffix>64<round_name>):
16374 Add {q} suffix to insn mnemonic.
16375
16376 2018-05-23 Jozef Lawrynowicz <jozef.l@mittosystems.com>
16377
16378 * config/msp430/msp430.c (TARGET_WARN_FUNC_RETURN): Define.
16379 (msp430_warn_func_return): New.
16380
16381 2018-05-24 Roger Sayle <roger@nextmovesoftware.com>
16382
16383 * fold-const.c (tree_nonzero_bits): New function.
16384 * fold-const.h (tree_nonzero_bits): Likewise.
16385 * match.pd (POPCOUNT): New patterns to fold BUILTIN_POPCOUNT and
16386 friends. POPCOUNT(x&1) => x&1, POPCOUNT(x)==0 => x==0, etc.
16387
16388 2018-05-24 H.J. Lu <hongjiu.lu@intel.com>
16389
16390 PR target/85900
16391 PR target/85345
16392 * varasm.c (assemble_alias): Check ifunc_resolver only on
16393 FUNCTION_DECL.
16394
16395 2018-05-24 Uros Bizjak <ubizjak@gmail.com>
16396
16397 PR target/85903
16398 * config/i386/sse.md (movdi_to_sse): Do not generate pseudo
16399 when memory input operand is handled.
16400
16401 2018-05-24 Luis Machado <luis.machado@linaro.org>
16402
16403 * config/aarch64/aarch64.c (qdf24xx_addrcost_table): New static
16404 global.
16405 (qdf24xx_tunings) <addr_costs>: Set to qdf24xx_addrcost_table.
16406
16407 2018-05-24 Richard Sandiford <richard.sandiford@linaro.org>
16408
16409 * match.pd: Delay FMA folds until after vectorization.
16410
16411 2018-05-24 Andre Vieira <andre.simoesdiasvieira@arm.com>
16412
16413 PR target/83009
16414 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
16415 address check not strict.
16416
16417 2018-05-24 Richard Sandiford <richard.sandiford@linaro.org>
16418
16419 * gimple-match.h (gimple_match_op): New class.
16420 (mprts_hook): Replace parameters with a gimple_match_op *.
16421 (maybe_build_generic_op): Likewise.
16422 (gimple_simplified_result_is_gimple_val): Replace parameters with
16423 a const gimple_match_op *.
16424 (gimple_simplify): Replace code_helper * and tree * parameters with
16425 a gimple_match_op * parameter.
16426 (gimple_resimplify1): Replace code_helper *, tree and tree *
16427 parameters with a gimple_match_op * parameter.
16428 (gimple_resimplify2): Likewise.
16429 (gimple_resimplify3): Likewise.
16430 (maybe_push_res_to_seq): Replace code_helper, tree and tree *
16431 parameters with a gimple_match_op * parameter.
16432 * gimple-match-head.c (gimple_simplify): Change prototypes of
16433 auto-generated functions to take a gimple_match_op * instead of
16434 separate code_helper * and tree * parameters. Make the same
16435 change in the top-level overload and update calls to the
16436 gimple_resimplify routines. Update calls to the auto-generated
16437 functions and to maybe_push_res_to_seq in the publicly-facing
16438 operation-specific gimple_simplify overloads.
16439 (gimple_match_op::MAX_NUM_OPS): Define.
16440 (gimple_resimplify1): Replace rcode and ops with a single res_op
16441 parameter. Update call to gimple_simplify.
16442 (gimple_resimplify2): Likewise.
16443 (gimple_resimplify3): Likewise.
16444 (mprts_hook): Replace parameters with a gimple_match_op *.
16445 (maybe_build_generic_op): Likewise.
16446 (build_call_internal): Replace type, nargs and ops with
16447 a gimple_match_op *.
16448 (maybe_push_res_to_seq): Replace res_code, type and ops parameters
16449 with a single gimple_match_op *. Update calls to mprts_hook,
16450 build_call_internal and gimple_simplified_result_is_gimple_val.
16451 Factor out code that is common to the tree_code and combined_fn cases.
16452 * genmatch.c (expr::gen_transform): Replace tem_code and
16453 tem_ops with a gimple_match_op called tem_op. Update calls
16454 to the gimple_resimplify functions and maybe_push_res_to_seq.
16455 (dt_simplify::gen_1): Manipulate res_op instead of res_code and
16456 res_ops. Update call to the gimple_resimplify functions.
16457 (dt_simplify::gen): Pass res_op instead of res_code and res_ops.
16458 (decision_tree::gen): Make the functions take a gimple_match_op *
16459 called res_op instead of separate res_code and res_ops parameters.
16460 Update call accordingly.
16461 * gimple-fold.c (replace_stmt_with_simplification): Replace rcode
16462 and ops with a single res_op parameter. Update calls to
16463 maybe_build_generic_op and maybe_push_res_to_seq.
16464 (fold_stmt_1): Update calls to gimple_simplify and
16465 replace_stmt_with_simplification.
16466 (gimple_fold_stmt_to_constant_1): Update calls to gimple_simplify
16467 and gimple_simplified_result_is_gimple_val.
16468 * tree-cfgcleanup.c (cleanup_control_expr_graph): Update call to
16469 gimple_simplify.
16470 * tree-ssa-sccvn.c (vn_lookup_simplify_result): Replace parameters
16471 with a gimple_match_op *.
16472 (vn_nary_build_or_lookup): Likewise. Update call to
16473 vn_nary_build_or_lookup_1.
16474 (vn_nary_build_or_lookup_1): Replace rcode, type and ops with a
16475 gimple_match_op *. Update calls to the gimple_resimplify routines
16476 and to gimple_simplified_result_is_gimple_val.
16477 (vn_nary_simplify): Update call to vn_nary_build_or_lookup_1.
16478 Use gimple_match_op::MAX_NUM_OPS instead of a hard-coded 3.
16479 (vn_reference_lookup_3): Update call to vn_nary_build_or_lookup.
16480 (visit_nary_op): Likewise.
16481 (visit_reference_op_load): Likewise.
16482
16483 2018-05-23 Luis Machado <luis.machado@linaro.org>
16484
16485 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Use correct type
16486 modifier for printing the step amount.
16487
16488 2018-05-23 Jozef Lawrynowicz <jozef.l@somniumtech.com>
16489
16490 PR target/78849
16491 * tree.c (build_common_tree_nodes): Dont set TYPE_SIZE for __intN
16492 types.
16493
16494 2018-05-23 Segher Boessenkool <segher@kernel.crashing.org>
16495
16496 * doc/sourcebuild.texi (Endianness): New subsubsection.
16497
16498 2018-05-23 Luis Machado <luis.machado@linaro.org>
16499
16500 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
16501 <prefetch_dynamic_strides>: New const bool field.
16502 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
16503 prefetch_dynamic_strides.
16504 (exynosm1_prefetch_tune): Likewise.
16505 (thunderxt88_prefetch_tune): Likewise.
16506 (thunderx_prefetch_tune): Likewise.
16507 (thunderx2t99_prefetch_tune): Likewise.
16508 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides to
16509 false.
16510 (aarch64_override_options_internal): Update to set
16511 PARAM_PREFETCH_DYNAMIC_STRIDES.
16512 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
16513 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
16514 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
16515 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
16516 prefetch-dynamic-strides setting.
16517
16518 2018-05-23 Luis Machado <luis.machado@linaro.org>
16519
16520 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
16521 <minimum_stride>: New const int field.
16522 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
16523 minimum_stride field defaulting to -1.
16524 (exynosm1_prefetch_tune): Likewise.
16525 (thunderxt88_prefetch_tune): Likewise.
16526 (thunderx_prefetch_tune): Likewise.
16527 (thunderx2t99_prefetch_tune): Likewise.
16528 (qdf24xx_prefetch_tune) <minimum_stride>: Set to 2048.
16529 <default_opt_level>: Set to 3.
16530 (aarch64_override_options_internal): Update to set
16531 PARAM_PREFETCH_MINIMUM_STRIDE.
16532 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
16533 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
16534 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
16535 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
16536 stride is constant and is below the minimum stride threshold.
16537
16538 2018-05-23 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
16539
16540 * config/arm/arm-cpus.in (mode26): Delete.
16541 (armv4): Delete mode26 reference.
16542 * config/arm/arm.c (arm_configure_build_target): Delete use of
16543 isa_bit_mode26.
16544
16545 2018-05-23 Uros Bizjak <ubizjak@gmail.com>
16546
16547 * config/i386/i386.md (*floatuns<SWI48:mode><MODEF:mode>2_avx512):
16548 New insn pattern.
16549 (floatunssi<mode>2): Also enable for AVX512F and TARGET_SSE_MATH.
16550 Rewrite expander pattern. Emit gen_floatunssi<mode>2_i387_with_xmm
16551 for non-SSE modes.
16552 (floatunsdisf2): Rewrite expander pattern. Hanlde TARGET_AVX512F.
16553 (floatunsdidf2): Ditto.
16554
16555 2018-05-23 Uros Bizjak <ubizjak@gmail.com>
16556
16557 * config/i386/i386.md (fixuns_trunc<mode>di2): New insn pattern.
16558 (fixuns_trunc<mode>si2_avx512f): Ditto.
16559 (*fixuns_trunc<mode>si2_avx512f_zext): Ditto.
16560 (fixuns_trunc<mode>si2): Also enable for AVX512F and TARGET_SSE_MATH.
16561 Emit fixuns_trunc<mode>si2_avx512f for AVX512F targets.
16562
16563 2018-05-23 Alexander Monakov <amonakov@ispras.ru>
16564
16565 PR rtl-optimization/79985
16566 * df-scan.c (df_insn_refs_collect): Remove special case for
16567 global registers and asm statements.
16568
16569 2018-05-23 Alexander Monakov <amonakov@ispras.ru>
16570
16571 * extend.texi (Global Register Variables): Rewrite the bullet list.
16572 Note that the register is available for allocation. Note that access
16573 via inline asm must use constraints. Add note about async-signal
16574 handlers. Remove paragraph about automagic register selection.
16575
16576 2018-05-23 Richard Biener <rguenther@suse.de>
16577
16578 * tree-ssa-sccvn.c (vn_reference_lookup_3): Remove restriction
16579 of fixed offset from memset VN.
16580
16581 2018-05-23 Bill Schmidt <wschmidt@linux.ibm.com>
16582
16583 * gimple-ssa-strength-reduction.c (struct slsr_cand_d): Add
16584 first_interp field.
16585 (alloc_cand_and_find_basis): Initialize first_interp field.
16586 (slsr_process_mul): Modify first_interp field.
16587 (slsr_process_add): Likewise.
16588 (slsr_process_cast): Modify first_interp field for each new
16589 interpretation.
16590 (slsr_process_copy): Likewise.
16591 (dump_candidate): Dump first_interp field.
16592 (replace_mult_candidate): Process all interpretations, not just
16593 subsequent ones.
16594 (replace_rhs_if_not_dup): Likewise.
16595 (replace_one_candidate): Likewise.
16596
16597 2018-05-23 Wilco Dijkstra <wdijkstr@arm.com>
16598
16599 * config/aarch64/aarch64.c (aarch64_use_frame_pointer):
16600 Add new boolean.
16601 (aarch64_needs_frame_chain): New function.
16602 (aarch64_parse_override_string): Set aarch64_use_frame_pointer.
16603
16604 2018-05-23 Sudakshina Das <sudi.das@arm.com>
16605
16606 PR target/84882
16607 * common/config/aarch64/aarch64-common.c (aarch64_handle_option):
16608 Check val before adding MASK_STRICT_ALIGN to opts->x_target_flags.
16609 * config/aarch64/aarch64.opt (mstrict-align): Remove RejectNegative.
16610 * config/aarch64/aarch64.c (aarch64_attributes): Mark allow_neg
16611 as true for strict-align.
16612 (aarch64_can_inline_p): Perform checks even when callee has no
16613 attributes to check for strict alignment.
16614 * doc/extend.texi (AArch64 Function Attributes): Document
16615 no-strict-align.
16616 * doc/invoke.texi: (AArch64 Options): Likewise.
16617
16618 2018-05-23 Richard Sandiford <richard.sandiford@linaro.org>
16619
16620 PR tree-optimization/85853
16621 * tree-vect-slp.c (vect_slp_analyze_node_operations): Split out
16622 the handling of the root of the node to...
16623 (vect_slp_analyze_node_operations_1): ...this new function,
16624 and run the whole thing with the child nodes' def types
16625 set according to their SLP node's def type.
16626
16627 2018-05-23 Richard Biener <rguenther@suse.de>
16628
16629 PR middle-end/85874
16630 * tree-data-ref.c (create_runtime_alias_checks): Defer
16631 and ignore overflow warnings.
16632
16633 2018-05-23 Yury Gribov <tetra2005@gmail.com>
16634
16635 PR tree-optimization/85822
16636 * tree-vrp.c (is_masked_range_test): Fix handling of negative
16637 constants.
16638
16639 2018-05-23 Richard Biener <rguenther@suse.de>
16640
16641 * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
16642 memset constants via native_interpret_expr.
16643
16644 2018-05-22 H.J. Lu <hongjiu.lu@intel.com>
16645
16646 PR target/85345
16647 * cgraph.h (cgraph_node::create): Set ifunc_resolver for ifunc
16648 attribute.
16649 (cgraph_node::create_alias): Likewise.
16650 (cgraph_node::get_availability): Check ifunc_resolver instead
16651 of looking up ifunc attribute.
16652 * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
16653 * varasm.c (do_assemble_alias): Likewise.
16654 (assemble_alias): Likewise.
16655 (default_binds_local_p_3): Likewise.
16656 * cgraph.h (cgraph_node): Add ifunc_resolver.
16657 (cgraph_node::only_called_directly_or_aliased_p): Return false
16658 for IFUNC resolver.
16659 * lto-cgraph.c (input_node): Set ifunc_resolver for ifunc
16660 attribute.
16661 * symtab.c (symtab_node::verify_base): Verify that ifunc_resolver
16662 is equivalent to lookup_attribute ("ifunc", DECL_ATTRIBUTES (decl)).
16663 (symtab_node::binds_to_current_def_p): Check ifunc_resolver
16664 instead of looking up ifunc attribute.
16665
16666 2018-05-22 Luis Machado <luis.machado@linaro.org>
16667
16668 * config/aarch64/aarch64.md (*ashift<mode>_extv_bfiz): New pattern.
16669
16670 2018-05-22 Martin Sebor <msebor@redhat.com>
16671
16672 PR middle-end/85359
16673 * builtins.c (expand_builtin_strcpy): Call maybe_warn_nonstring_arg
16674 only when expasion succeeds.
16675 (expand_builtin_strcmp): Same.
16676 (expand_builtin_strncmp): Same.
16677
16678 2018-05-22 Martin Sebor <msebor@redhat.com>
16679
16680 * calls.c (maybe_warn_nonstring_arg): Fix a typo in a comment.
16681
16682 2018-05-22 Jackson Woodruff <jackson.woodruff@arm.com>
16683 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
16684
16685 * config/aarch64/aarch64-ldpstp.md: Replace uses of
16686 aarch64_mem_pair_operand with memory_operand and delete operand swapping
16687 code.
16688 * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
16689 Add check for legitimate_address.
16690 (aarch64_gen_adjusted_ldpstp): Swap operands where appropriate.
16691 (aarch64_swap_ldrstr_operands): New.
16692 * config/aarch64/aarch64-protos.h (aarch64_swap_ldrstr_operands):
16693 Define prototype.
16694
16695 2018-05-22 Jackson Woodruff <jackson.woodruff@arm.com>
16696 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
16697
16698 * config/aarch64/aarch64.md: New patterns to generate stp
16699 and ldp.
16700 (store_pair_sw, store_pair_dw): New patterns to generate stp for
16701 single words and double words.
16702 (load_pair_sw, load_pair_dw): Likewise.
16703 (store_pair_sf, store_pair_df, store_pair_si, store_pair_di):
16704 Delete.
16705 (load_pair_sf, load_pair_df, load_pair_si, load_pair_di):
16706 Delete.
16707 * config/aarch64/aarch64-ldpstp.md: Modify peephole
16708 for different mode ldpstp and add peephole for merged zero stores.
16709 Likewise for loads.
16710 * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
16711 Add size check.
16712 (aarch64_gen_store_pair): Rename calls to match new patterns.
16713 (aarch64_gen_load_pair): Rename calls to match new patterns.
16714 * config/aarch64/aarch64-simd.md (load_pair<mode>): Rename to...
16715 (load_pair<DREG:mode><DREG2:mode>): ... This.
16716 (store_pair<mode>): Rename to...
16717 (vec_store_pair<DREG:mode><DREG2:mode>): ... This.
16718 * config/aarch64/iterators.md (DREG, DREG2, DX2, SX, SX2, DSX):
16719 New mode iterators.
16720 (V_INT_EQUIV): Handle SImode.
16721 * config/aarch64/predicates.md (aarch64_reg_zero_or_fp_zero):
16722 New predicate.
16723
16724 2018-05-22 Martin Sebor <msebor@redhat.com>
16725
16726 PR c/85623
16727 * calls.c (maybe_warn_nonstring_arg): Use string length to set
16728 or ajust the presumed bound on an operation to avoid unnecessary
16729 warnings.
16730
16731 2018-05-22 Martin Sebor <msebor@redhat.com>
16732
16733 PR tree-optimization/85826
16734 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Avoid
16735 assuming that a DECL necesarily has a constant size.
16736
16737 2018-05-22 Richard Sandiford <richard.sandiford@linaro.org>
16738
16739 PR middle-end/85862
16740 * internal-fn.c (expand_direct_optab_fn): Cope with a null lhs.
16741
16742 2018-05-22 Richard Biener <rguenther@suse.de>
16743
16744 PR tree-optimization/85834
16745 * tree-ssa-sccvn.c (vn_reference_lookup_3): Properly handle
16746 non-constant and non-zero memset arguments.
16747
16748 2018-05-22 Martin Liska <mliska@suse.cz>
16749
16750 PR ipa/85607
16751 * ipa-icf.c (sem_item::add_type): Do not ICE for incomplete types.
16752
16753 2018-05-22 Richard Biener <rguenther@suse.de>
16754
16755 PR tree-optimization/85863
16756 * tree-vect-stmts.c (vect_is_simple_cond): Only widen invariant
16757 comparisons when vectype is specified.
16758 (vectorizable_condition): Do not specify vectype for
16759 vect_is_simple_cond when SLP vectorizing.
16760
16761 2018-05-21 Michael Meissner <meissner@linux.ibm.com>
16762
16763 PR target/85657
16764 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Do not
16765 define __ibm128 as long double.
16766 * config/rs6000/rs6000.c (rs6000_init_builtins): Create __ibm128
16767 as a distinct type when IEEE 128-bit support is enabled.
16768 (init_float128_ieee): Fix up conversions between IFmode and IEEE
16769 128-bit types to use the correct functions.
16770 (rs6000_expand_float128_convert): Use explicit FLOAT_EXTEND to
16771 convert between 128-bit floating point types that have different
16772 modes but the same representation, instead of using gen_lowpart to
16773 makean alias.
16774 * config/rs6000/rs6000.md (IFKF): New iterator for IFmode and
16775 KFmode.
16776 (IFKF_reg): New attributes to give the register constraints for
16777 IFmode and KFmode.
16778 (extend<mode>tf2_internal): New insns to mark an explicit
16779 conversion between 128-bit floating point types that have a
16780 different mode but share the same representation.
16781
16782 2018-05-21 Richard Sandiford <richard.sandiford@linaro.org>
16783
16784 PR tree-optimization/85814
16785 * tree-ssa-strlen.c (get_stridx_plus_constant): Cope with
16786 a null return from get_strinfo when unsharing the next
16787 strinfo in the chain.
16788
16789 2018-05-21 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
16790
16791 PR gcc/84923
16792 * varasm.c (weak_finish): Clean up weak_decls.
16793
16794 2018-05-21 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
16795
16796 * config/aarch64/aarch64.md ("unspec"): Define UNSPEC_SABAL,
16797 UNSPEC_SABDL2, UNSPEC_SADALP, UNSPEC_UABAL, UNSPEC_UABDL2,
16798 UNSPEC_UADALP values.
16799 * config/aarch64/iterators.md (ABAL): New int iterator.
16800 (ABDL2): Likewise.
16801 (ADALP): Likewise.
16802 (sur): Add mappings for the above.
16803 * config/aarch64/aarch64-simd.md (aarch64_<sur>abdl2<mode>_3):
16804 New define_insn.
16805 (aarch64_<sur>abal<mode>_4): Likewise.
16806 (aarch64_<sur>adalp<mode>_3): Likewise.
16807 (<sur>sadv16qi): New define_expand.
16808
16809 2018-05-21 Alexander Nesterovskiy <alexander.nesterovskiy@intel.com>
16810
16811 * config/i386/i386.md (*movsf_internal): AVX falsedep fix.
16812 (*movdf_internal): Ditto.
16813 (*rcpsf2_sse): Ditto.
16814 (*rsqrtsf2_sse): Ditto.
16815 (*sqrt<mode>2_sse): Ditto.
16816
16817 2018-05-21 Tamar Christina <tamar.christina@arm.com>
16818
16819 * config/aarch64/aarch64-simd.md (aarch64_eor3qv8hi): Change to
16820 eor3q<mode>4.
16821 (aarch64_bcaxqv8hi): Change to bcaxq<mode>4.
16822 * config/aarch64/aarch64-simd-builtins.def (veor3q_u8, veor3q_u32,
16823 veor3q_u64, veor3q_s8, veor3q_s16, veor3q_s32, veor3q_s64, vbcaxq_u8,
16824 vbcaxq_u32, vbcaxq_u64, vbcaxq_s8, vbcaxq_s16, vbcaxq_s32,
16825 vbcaxq_s64): New.
16826 * config/aarch64/arm_neon.h: Likewise.
16827 * config/aarch64/iterators.md (VQ_I): New.
16828
16829 2018-05-21 Alexey Brodkin <abrodkin@synopsys.com>
16830
16831 * config.gcc: Add arc/t-multilib-linux to tmake_file for
16832 arc*-*-linux*.
16833 * config/arc/t-multilib-linux: Specify MULTILIB_OPTIONS and
16834 MULTILIB_DIRNAMES
16835
16836 2018-05-20 Chung-Ju Wu <jasonwucj@gmail.com>
16837
16838 * config/nds32/constraints.md (S): New constraint.
16839 * config/nds32/nds32.md (call_internal): Use constraint S.
16840 (call_value_internal): Likewise.
16841 (sibcall_internal): Likewise.
16842 (sibcall_value_internal): Likewise.
16843
16844 2018-05-20 Kito Cheng <kito.cheng@gmail.com>
16845 Chung-Ju Wu <jasonwucj@gmail.com>
16846
16847 * config/nds32/nds32.c (nds32_register_move_cost): Take garywolf cpu
16848 into consideration.
16849
16850 2018-05-20 Kito Cheng <kito.cheng@gmail.com>
16851 Chung-Ju Wu <jasonwucj@gmail.com>
16852
16853 * config/nds32/nds32-cost.c (rtx_cost_model_t): New structure.
16854 (insn_size_16bit, insn_size_32bit): New variables for cost evaluation.
16855 (nds32_rtx_costs_impl): Simplify.
16856 (nds32_address_cost_impl): Simplify.
16857 (nds32_init_rtx_costs): New function.
16858 (nds32_rtx_costs_speed_prefer): Likewise.
16859 (nds32_rtx_costs_size_prefer): Likewise.
16860 (nds32_address_cost_speed_prefer): Likewise.
16861 (nds32_address_cost_speed_fwprop): Likewise.
16862 (nds32_address_cost_size_prefer): Likewise.
16863 * config/nds32/nds32-protos.h (nds32_init_rtx_costs): Declare.
16864 * config/nds32/nds32.c (nds32_option_override): Use
16865 nds32_init_rtx_costs function.
16866
16867 2018-05-20 Chung-Ju Wu <jasonwucj@gmail.com>
16868
16869 * config/nds32/nds32.c (nds32_asm_file_start): Output pipeline model.
16870 * config/nds32/nds32.h (TARGET_PIPELINE_N7): Define.
16871 (TARGET_PIPELINE_N8): Likewise.
16872 (TARGET_PIPELINE_N10): Likewise.
16873 (TARGET_PIPELINE_N13): Likewise.
16874 (TARGET_PIPELINE_GRAYWOLF): Likewise.
16875
16876 2018-05-19 Monk Chiang <sh.chiang04@gmail.com>
16877
16878 * config/nds32/nds32-fpu.md: Update copyright year.
16879
16880 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
16881
16882 * config/nds32/nds32.h (ASM_SPEC): Adjust spec rule.
16883
16884 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
16885
16886 * config/nds32/nds32.c
16887 (nds32_md_asm_adjust): Consider flag_inline_asm_r15 variable.
16888 * config/nds32/nds32.opt (minline-asm-r15): New option.
16889
16890 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
16891
16892 * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS): Add
16893 MASK_HW_ABS.
16894 * config/nds32/nds32.md (abssi2): New pattern.
16895
16896 2018-05-19 Uros Bizjak <ubizjak@gmail.com>
16897
16898 * config/i386/i386.md (rex64namesuffix): New mode attribute.
16899 * config/i386/sse.md (sse_cvtsi2ss<rex64namesuffix><round_name>):
16900 Merge insn pattern from sse_cvtsi2ss<round_name> and
16901 sse_cvtsi2ssq<round_name> using SWI48 mode iterator.
16902 (sse_cvtss2si<rex64namesuffix><round_name>): Merge insn pattern
16903 from sse_cvtss2si<round_name> and sse_cvtss2siq<round_name>
16904 using SWI48 mode iterator.
16905 (sse_cvtss2si<rex64namesuffix>_2): Merge insn pattern from
16906 sse_cvtss2si_2 and sse_cvtss2siq_2 using SWI48 mode iterator.
16907 (sse_cvttss2si<rex64namesuffix><round_saeonly_name>): Merge insn
16908 pattern from sse_cvttss2si<round_saeonly_name>
16909 and sse_cvttss2siq<round_saeonly_name> using SWI48 mode iterator.
16910 (avx512f_vcvtss2usi<rex64namesuffix><round_name>): Merge insn pattern
16911 from avx512f_vcvtss2usi<round_name> and avx512f_vcvtss2usiq<round_name>
16912 using SWI48 mode iterator.
16913 (avx512f_vcvttss2usi<rex64namesuffix><round_saeonly_name>): Merge
16914 insn pattern from avx512f_vcvttss2usi<round_saeonly_name> and
16915 avx512f_vcvttss2usiq<round_saeonly_name> using SWI48 mode iterator.
16916 (avx512f_vcvtsd2usi<rex64namesuffix><round_name>): Merge insn pattern
16917 from avx512f_vcvtsd2usi<round_name> and avx512f_vcvtsd2usiq<round_name>
16918 using SWI48 mode iterator.
16919 (avx512f_vcvttsd2usi<rex64namesuffix><round_saeonly_name>): Merge
16920 insn pattern from avx512f_vcvttsd2usi<round_saeonly_name> and
16921 avx512f_vcvttsd2usiq<round_saeonly_name> using SWI48 mode iterator.
16922 (sse2_cvtsd2si<rex64namesuffix><round_name>): Merge insn pattern from
16923 sse2_cvtsd2si<round_name> and sse2_cvtsd2siq<round_name> using
16924 SWI48 mode iterator.
16925 (sse2_cvtsd2si<rex64namesuffix>_2): Merge insn pattern from
16926 sse2_cvtsd2si_2 and sse2_cvtsd2siq_2 using SWI48 mode iterator.
16927 (sse_cvttsd2si<rex64namesuffix><round_saeonly_name>): Merge insn
16928 pattern from sse_cvttsd2si<round_saeonly_name>
16929 and sse_cvttsd2siq<round_saeonly_name> using SWI48 mode iterator.
16930
16931 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
16932
16933 * config/nds32/nds32-md-auxiliary.c
16934 (nds32_valid_smw_lwm_base_p): Refine.
16935 (nds32_output_smw_single_word): Refine.
16936 (nds32_output_smw_double_word): New.
16937 * config/nds32/nds32-protos.h (nds32_output_smw_double_word): New.
16938
16939 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
16940
16941 * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push): Refine.
16942 (nds32_output_stack_pop): Refine.
16943 (nds32_expand_unaligned_load): Refine.
16944 (nds32_expand_unaligned_store): Refine.
16945
16946 2018-05-19 Kuan-Lin Chen <kuanlinchentw@gmail.com>
16947 Chung-Ju Wu <jasonwucj@gmail.com>
16948
16949 * config/nds32/constants.md: Add TP_REGNUM constant.
16950 (unspec_element): Add UNSPEC_GOTINIT, UNSPEC_GOT, UNSPEC_GOTOFF,
16951 UNSPEC_PLT, UNSPEC_TLSGD, UNSPEC_TLSLD, UNSPEC_TLSIE, UNSPEC_TLSLE and
16952 UNSPEC_ADD32.
16953 * config/nds32/nds32-doubleword.md: Consider flag_pic.
16954 * config/nds32/nds32-dspext.md (mov<mode>): Expand TLS and PIC cases.
16955 * config/nds32/nds32-predicates.c (nds32_const_unspec_p): New.
16956 * config/nds32/nds32-md-auxiliary.c: Implementation that support TLS
16957 and PIC code generation.
16958 * config/nds32/nds32-protos.h: Declarations that support TLS and PIC
16959 code generation.
16960 * config/nds32/nds32-relax-opt.c: Consider TLS and PIC for relax
16961 optimization.
16962 * config/nds32/nds32.md: Support TLS and PIC.
16963 * config/nds32/nds32.c: Support TLS and PIC.
16964 * config/nds32/nds32.h (nds32_relax_insn_type): New enum type.
16965 * config/nds32/predicates.md (nds32_nonunspec_symbolic_operand): New
16966 predicate.
16967
16968 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
16969
16970 * config/nds32/nds32-predicates.c (const_vector_to_hwint): Use machine
16971 mode with E_ prefix.
16972
16973 2018-05-19 Kuan-Lin Chen <kuanlinchentw@gmail.com>
16974 Chung-Ju Wu <jasonwucj@gmail.com>
16975
16976 * config/nds32/constants.md (unspec_element): Add UNSPEC_ICT.
16977 * config/nds32/nds32-md-auxiliary.c
16978 (symbolic_reference_mentioned_p): New.
16979 (nds32_legitimize_ict_address): New.
16980 (nds32_expand_ict_move): New.
16981 (nds32_indirect_call_referenced_p): New.
16982 (nds32_symbol_binds_local_p): Delete.
16983 (nds32_long_call_p): Modify.
16984 * config/nds32/nds32-opts.h (nds32_ict_model_type): New enum type.
16985 * config/nds32/nds32-protos.h
16986 (symbolic_reference_mentioned_p): Declare.
16987 (nds32_legitimize_ict_address): Declare.
16988 (nds32_expand_ict_move): Declare.
16989 (nds32_indirect_call_referenced_p): Declare.
16990 * config/nds32/nds32-relax-opt.c (nds32_ict_const_p): New.
16991 (nds32_relax_group): Use nds32_ict_const_p as condition.
16992 * config/nds32/nds32.c (nds32_attribute_table): Add "indirect_call".
16993 (nds32_asm_file_start): Output ict_model directive in asm code.
16994 (nds32_legitimate_address_p): Consider indirect call.
16995 (nds32_print_operand): Consider indirect call.
16996 (nds32_print_operand_address): Consider indirect call.
16997 (nds32_insert_attributes): Handle "indirect_call" attribute.
16998 (TARGET_LEGITIMATE_ADDRESS_P): Define.
16999 (TARGET_LEGITIMATE_CONSTANT_P): Define.
17000 (TARGET_CANNOT_FORCE_CONST_MEM): Define.
17001 (TARGET_DELEGITIMIZE_ADDRESS): Define.
17002 (TARGET_ASM_OUTPUT_ADDR_CONST_EXTRA): Define.
17003 * config/nds32/nds32.h (SYMBOLIC_CONST_P): Define.
17004 (TARGET_ICT_MODEL_SMALL): Define.
17005 (TARGET_ICT_MODEL_LARGE): Define.
17006 * config/nds32/nds32.md (movsi): Consider ict model.
17007 (call, call_value): Consider ict model.
17008 (sibcall, sibcall_value): Consider ict model.
17009 * config/nds32/nds32.opt (mict-model): New option.
17010 * config/nds32/predicates.md (nds32_symbolic_operand): Consider ict
17011 model.
17012
17013 2018-05-18 Kito Cheng <kito.cheng@gmail.com>
17014 Monk Chiang <sh.chiang04@gmail.com>
17015 Jim Wilson <jimw@sifive.com>
17016
17017 * common/config/riscv/riscv-common.c (riscv_parse_arch_string):
17018 Add support to parse rv32e*. Clear MASK_RVE for rv32i and rv64i.
17019 * config.gcc (riscv*-*-*): Add support for rv32e* and ilp32e.
17020 * config/riscv/riscv-c.c (riscv_cpu_cpp_builtins): Define
17021 __riscv_32e when TARGET_RVE. Handle ABI_ILP32E as soft-float ABI.
17022 * config/riscv/riscv-opts.h (riscv_abi_type): Add ABI_ILP32E.
17023 * config/riscv/riscv.c (riscv_compute_frame_info): When TARGET_RVE,
17024 compute save_libcall_adjustment properly.
17025 (riscv_option_override): Call error if TARGET_RVE and not ABI_ILP32E.
17026 (riscv_conditional_register_usage): Handle TARGET_RVE and ABI_ILP32E.
17027 * config/riscv/riscv.h (UNITS_PER_FP_ARG): Handle ABI_ILP32E.
17028 (STACK_BOUNDARY, ABI_STACK_BOUNDARY): Handle TARGET_RVE.
17029 (GP_REG_LAST, MAX_ARGS_IN_REGISTERS): Likewise.
17030 (ABI_SPEC): Handle mabi=ilp32e.
17031 * config/riscv/riscv.opt (abi_type): Add ABI_ILP32E.
17032 (RVE): Add RVE mask.
17033 * doc/invoke.texi (RISC-V options) <-mabi>: Add ilp32e info.
17034 <-march>: Add rv32e as an example.
17035
17036 2018-05-18 Marc Glisse <marc.glisse@inria.fr>
17037
17038 PR c++/82899
17039 * tree-ssa-structalias.c (create_variable_info_for_1): Extra argument.
17040 (intra_create_variable_infos): Handle C++ constructors.
17041
17042 2018-05-18 Martin Liska <mliska@suse.cz>
17043
17044 * passes.def: Remove a redundant pass.
17045
17046 2018-05-18 Eric Botcazou <ebotcazou@adacore.com>
17047
17048 PR bootstrap/85838
17049 * config/sparc/sparc.c (sparc_expand_builtin): Always initialize op[0].
17050
17051 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
17052
17053 * config/arm/arm-cpus.in (armv3m, mode32): Delete features.
17054 (ARMv4): Update.
17055 (ARMv2, ARMv3, ARMv3m): Delete fgroups.
17056 (ARMv6m): Update.
17057 (armv2, armv2a, armv3, armv3m): Delete architectures.
17058 (arm2, arm250, arm3, arm6, arm60, arm600, arm610, arm620,
17059 arm7, arm7d, arm7di, arm70, arm700, arm700i, arm710, arm720,
17060 arm710c, arm7100, arm7500, arm7500fe, arm7m, arm7dm, arm7dmi):
17061 Delete cpus.
17062 * config/arm/arm.md (maddsidi4): Remove check for arm_arch3m.
17063 (*mulsidi3adddi): Likewise.
17064 (mulsidi3): Likewise.
17065 (*mulsidi3_nov6): Likewise.
17066 (umulsidi3): Likewise.
17067 (umulsidi3_nov6): Likewise.
17068 (umaddsidi4): Likewise.
17069 (*umulsidi3adddi): Likewise.
17070 (smulsi3_highpart): Likewise.
17071 (*smulsi3_highpart_nov6): Likewise.
17072 (umulsi3_highpart): Likewise.
17073 (*umulsi3_highpart_nov6): Likewise.
17074 * config/arm/arm.h (arm_arch3m): Delete.
17075 * config/arm/arm.c (arm_arch3m): Delete.
17076 (arm_option_override_internal): Update armv3-related comment.
17077 (arm_configure_build_target): Delete use of isa_bit_mode32.
17078 (arm_option_reconfigure_globals): Delete set of arm_ach3m.
17079 (arm_rtx_costs_internal): Delete check of arm_arch3m.
17080 * config/arm/arm-fixed.md (mulsq3): Delete check for arm_arch3m.
17081 (mulsa3): Likewise.
17082 (mulusa3): Likewise.
17083 * config/arm/arm-protos.h (arm_arch3m): Delete.
17084 * config/arm/arm-tables.opt: Regenerate.
17085 * config/arm/arm-tune.md: Likewise.
17086 * config/arm/t-arm-elf (all_early_nofp): Delete mentions of
17087 deleted architectures.
17088
17089 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
17090
17091 * config/arm/arm-cpus.in (armv5, armv5e): Delete features.
17092 (armv5t, armv5te): New features.
17093 (ARMv5, ARMv5e): Delete fgroups.
17094 (ARMv5t, ARMv5te): Adjust for above changes.
17095 (ARMv6m): Likewise.
17096 (armv5, armv5e): Delete arches.
17097 * config/arm/arm.md (*call_reg_armv5): Use arm_arch5t instead of
17098 arm_arch5.
17099 (*call_reg_arm): Likewise.
17100 (*call_value_reg_armv5): Likewise.
17101 (*call_value_reg_arm): Likewise.
17102 (*call_symbol): Likewise.
17103 (*call_value_symbol): Likewise.
17104 (*sibcall_insn): Likewise.
17105 (*sibcall_value_insn): Likewise.
17106 (clzsi2): Likewise.
17107 (prefetch): Likewise.
17108 (define_split and define_peephole2 dependent on arm_arch5):
17109 Likewise.
17110 * config/arm/arm.h (TARGET_LDRD): Use arm_arch5te instead of
17111 arm_arch5e.
17112 (TARGET_ARM_QBIT): Likewise.
17113 (TARGET_DSP_MULTIPLY): Likewise.
17114 (enum base_architecture): Delete BASE_ARCH_5, BASE_ARCH_5E.
17115 (arm_arch5, arm_arch5e): Delete.
17116 (arm_arch5t, arm_arch5te): Declare.
17117 * config/arm/arm.c (arm_arch5, arm_arch5e): Delete.
17118 (arm_arch5t): Declare.
17119 (arm_option_reconfigure_globals): Update for the above.
17120 (arm_options_perform_arch_sanity_checks): Update comment, replace
17121 use of arm_arch5 with arm_arch5t.
17122 (use_return_insn): Likewise.
17123 (arm_emit_call_insn): Likewise.
17124 (output_return_instruction): Likewise.
17125 (arm_final_prescan_insn): Likewise.
17126 (arm_coproc_builtin_available): Likewise.
17127 * config/arm/arm-c.c (arm_cpu_builtins): Replace arm_arch5 and
17128 arm_arch5e with arm_arch5t and arm_arch5te.
17129 * config/arm/arm-protos.h (arm_arch5, arm_arch5e): Delete.
17130 (arm_arch5t, arm_arch5te): Declare.
17131 * config/arm/arm-tables.opt: Regenerate.
17132 * config/arm/t-arm-elf: Remove references to armv5, armv5e.
17133 * config/arm/t-multilib: Likewise.
17134 * config/arm/thumb1.md (*call_reg_thumb1_v5): Check arm_arch5t
17135 instead of arm_arch5.
17136 (*call_reg_thumb1): Likewise.
17137 (*call_value_reg_thumb1_v5): Likewise.
17138 (*call_value_reg_thumb1): Likewise.
17139 * config/arm/vxworks.h (TARGET_OS_CPP_BUILTINS): Remove now
17140 unreachable path.
17141 * doc/invoke.texi (ARM Options): Remove references to armv5, armv5e.
17142
17143 2018-05-18 Martin Liska <mliska@suse.cz>
17144
17145 PR gcov-profile/84846
17146 * doc/gcov.texi: Document -t option of gcov tool.
17147
17148 2018-05-18 Martin Liska <mliska@suse.cz>
17149
17150 PR gcov-profile/84846
17151 * gcov.c (print_usage): Add new -t option.
17152 (process_args): Handle the option.
17153 (generate_results): Use stdout as output when requested by
17154 the option.
17155
17156 2018-05-18 Martin Liska <mliska@suse.cz>
17157
17158 PR gcov-profile/84846
17159 * coverage.c (coverage_init): Write PWD to .gcno file.
17160 * doc/gcov.texi: Document how working directory is printed.
17161 * gcov-dump.c (dump_gcov_file): Print PWD.
17162 * gcov.c (output_intermediate_file): Likewise.
17163 (read_graph_file): Read PWD string.
17164 (output_lines): Print PWD.
17165
17166 2018-05-18 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
17167
17168 PR middle-end/85817
17169 * ipa-pure-const.c (malloc_candidate_p): Remove the check integer_zerop
17170 for retval and return false if all args to phi are zero.
17171
17172 2018-05-18 Richard Biener <rguenther@suse.de>
17173
17174 * gimple-ssa-evrp.c (class evrp_folder): Add simplify_stmt_using_ranges
17175 method.
17176 (evrp_dom_walker::before_dom_children): Call it.
17177
17178 2018-05-18 Richard Biener <rguenther@suse.de>
17179
17180 * tree-dfa.c (get_ref_base_and_extent): Use range-info to refine
17181 results when processing array refs with variable index.
17182
17183 2018-05-18 Toon Moene <toon@moene.org>
17184
17185 * doc/invoke.texi: Move -floop-unroll-and-jam documentation
17186 directly after that of -floop-interchange. Indicate that both
17187 options are enabled by default when specifying -O3.
17188
17189 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
17190
17191 * config/aarch64/aarch64-simd.md (vec_set<mode>): Use VALL_F16 mode
17192 iterator. Delete separate integer-mode vec_set<mode> expander.
17193 (aarch64_simd_vec_setv2di): Delete.
17194 (vec_setv2di): Delete.
17195 (aarch64_simd_vec_set<mode>): Delete all other patterns with that name.
17196 Use VALL_F16 mode iterator. Add LD1 alternative and use vwcore for
17197 the "w, r" alternative.
17198
17199 2018-05-18 Martin Liska <mliska@suse.cz>
17200
17201 * passes.def: Add pass_lower_switch and pass_lower_switch_O0.
17202 * tree-pass.h (make_pass_lower_switch_O0): New function.
17203 * tree-switch-conversion.c (node_has_low_bound): Remove.
17204 (node_has_high_bound): Likewise.
17205 (node_is_bounded): Likewise.
17206 (class pass_lower_switch): Make it a template type and create
17207 two instances.
17208 (pass_lower_switch::execute): Add template argument.
17209 (make_pass_lower_switch): New function.
17210 (make_pass_lower_switch_O0): New function.
17211 (do_jump_if_equal): Remove.
17212 (emit_case_nodes): Simplify to just handle all 3 cases and leave
17213 all the hard work to tree optimization passes.
17214
17215 2018-05-18 Martin Liska <mliska@suse.cz>
17216
17217 * dbgcnt.c (limit_low): Renamed from limit.
17218 (limit_high): New variable.
17219 (dbg_cnt_is_enabled): Check for upper limit.
17220 (dbg_cnt): Adjust dumping.
17221 (dbg_cnt_set_limit_by_index): Add new argument for high
17222 value.
17223 (dbg_cnt_set_limit_by_name): Likewise.
17224 (dbg_cnt_process_single_pair): Parse new format.
17225 (dbg_cnt_process_opt): Use strtok.
17226 (dbg_cnt_list_all_counters): Remove 'value' and add
17227 'limit_high'.
17228 * doc/invoke.texi: Document changes.
17229
17230 2018-05-18 Richard Sandiford <richard.sandiford@linaro.org>
17231
17232 * doc/sourcebuild.texi (scalar_all_fma): Document.
17233 * tree.def (FMA_EXPR): Delete.
17234 * internal-fn.def (FMA, FMS, FNMA, FNMS): New internal functions.
17235 * internal-fn.c (ternary_direct): New macro.
17236 (expand_ternary_optab_fn): Likewise.
17237 (direct_ternary_optab_supported_p): Likewise.
17238 * Makefile.in (build/genmatch.o): Depend on case-fn-macros.h.
17239 * builtins.c (fold_builtin_fma): Delete.
17240 (fold_builtin_3): Don't call it.
17241 * cfgexpand.c (expand_debug_expr): Remove FMA_EXPR handling.
17242 * expr.c (expand_expr_real_2): Likewise.
17243 * fold-const.c (operand_equal_p): Likewise.
17244 (fold_ternary_loc): Likewise.
17245 * gimple-pretty-print.c (dump_ternary_rhs): Likewise.
17246 * gimple.c (DEFTREECODE): Likewise.
17247 * gimplify.c (gimplify_expr): Likewise.
17248 * optabs-tree.c (optab_for_tree_code): Likewise.
17249 * tree-cfg.c (verify_gimple_assign_ternary): Likewise.
17250 * tree-eh.c (operation_could_trap_p): Likewise.
17251 (stmt_could_throw_1_p): Likewise.
17252 * tree-inline.c (estimate_operator_cost): Likewise.
17253 * tree-pretty-print.c (dump_generic_node): Likewise.
17254 (op_code_prio): Likewise.
17255 * tree-ssa-loop-im.c (stmt_cost): Likewise.
17256 * tree-ssa-operands.c (get_expr_operands): Likewise.
17257 * tree.c (commutative_ternary_tree_code, add_expr): Likewise.
17258 * fold-const-call.h (fold_fma): Delete.
17259 * fold-const-call.c (fold_const_call_ssss): Handle CFN_FMS,
17260 CFN_FNMA and CFN_FNMS.
17261 (fold_fma): Delete.
17262 * genmatch.c (combined_fn): New enum.
17263 (commutative_ternary_tree_code): Remove FMA_EXPR handling.
17264 (commutative_op): New function.
17265 (commutate): Use it. Handle more than 2 operands.
17266 (dt_operand::gen_gimple_expr): Use commutative_op.
17267 (parser::parse_expr): Allow :c to be used with non-binary
17268 operators if the commutative operand is known.
17269 * gimple-ssa-backprop.c (backprop::process_builtin_call_use): Handle
17270 CFN_FMS, CFN_FNMA and CFN_FNMS.
17271 (backprop::process_assign_use): Remove FMA_EXPR handling.
17272 * hsa-gen.c (gen_hsa_insns_for_operation_assignment): Likewise.
17273 (gen_hsa_fma): New function.
17274 (gen_hsa_insn_for_internal_fn_call): Use it for IFN_FMA, IFN_FMS,
17275 IFN_FNMA and IFN_FNMS.
17276 * match.pd: Add folds for IFN_FMS, IFN_FNMA and IFN_FNMS.
17277 * gimple-fold.h (follow_all_ssa_edges): Declare.
17278 * gimple-fold.c (follow_all_ssa_edges): New function.
17279 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Use the
17280 gimple_build interface and use follow_all_ssa_edges to fold the result.
17281 (convert_mult_to_fma): Use direct_internal_fn_suppoerted_p
17282 instead of checking for optabs directly.
17283 * config/i386/i386.c (ix86_add_stmt_cost): Recognize FMAs as calls
17284 rather than FMA_EXPRs.
17285 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Create a
17286 call to IFN_FMA instead of an FMA_EXPR.
17287
17288 2018-05-17 Jim Wilson <jimw@sifive.com>
17289
17290 * expr.c (do_tablejump): When converting index to Pmode, if we have a
17291 sign extended promoted subreg, and the range does not have the sign bit
17292 set, then do a sign extend.
17293
17294 * config/riscv/riscv.c (riscv_extend_comparands): In unsigned QImode
17295 test, check for sign extended subreg and/or constant operands, and
17296 do a sign extend in that case.
17297
17298 2018-05-17 Steve Ellcey <sellcey@cavium.com>
17299
17300 * config/aarch64/thunderx2t99.md (thunderx2t99_ls_both): Delete.
17301 (thunderx2t99_multiple): Delete psuedo-units from used cpus.
17302 Add untyped.
17303 (thunderx2t99_alu_shift): Remove alu_shift_reg, alus_shift_reg.
17304 Change logics_shift_reg to logics_shift_imm.
17305 (thunderx2t99_fp_loadpair_basic): Delete.
17306 (thunderx2t99_fp_storepair_basic): Delete.
17307 (thunderx2t99_asimd_int): Add neon_sub and neon_sub_q types.
17308 (thunderx2t99_asimd_polynomial): Delete.
17309 (thunderx2t99_asimd_fp_simple): Add neon_fp_mul_s_scalar_q
17310 and neon_fp_mul_d_scalar_q.
17311 (thunderx2t99_asimd_fp_conv): Add *int_to_fp* types.
17312 (thunderx2t99_asimd_misc): Delete neon_dup and neon_dup_q.
17313 (thunderx2t99_asimd_recip_step): Add missing *sqrt* types.
17314 (thunderx2t99_asimd_lut): Add missing tbl types.
17315 (thunderx2t99_asimd_ext): Delete.
17316 (thunderx2t99_asimd_load1_1_mult): Delete.
17317 (thunderx2t99_asimd_load1_2_mult): Delete.
17318 (thunderx2t99_asimd_load1_ldp): New.
17319 (thunderx2t99_asimd_load1): New.
17320 (thunderx2t99_asimd_load2): Add missing *load2* types.
17321 (thunderx2t99_asimd_load3): New.
17322 (thunderx2t99_asimd_load4): New.
17323 (thunderx2t99_asimd_store1_1_mult): Delete.
17324 (thunderx2t99_asimd_store1_2_mult): Delete.
17325 (thunderx2t99_asimd_store2_mult): Delete.
17326 (thunderx2t99_asimd_store2_onelane): Delete.
17327 (thunderx2t99_asimd_store_stp): New.
17328 (thunderx2t99_asimd_store1): New.
17329 (thunderx2t99_asimd_store2): New.
17330 (thunderx2t99_asimd_store3): New.
17331 (thunderx2t99_asimd_store4): New.
17332
17333 2018-05-17 Jerome Lambourg <lambourg@adacore.com>
17334
17335 * config/arm/arm_cmse.h (cmse_nsfptr_create, cmse_is_nsfptr): Remove
17336 #include <stdint.h>. Replace intptr_t with __INTPTR_TYPE__.
17337
17338 2018-05-17 Pat Haugen <pthaugen@us.ibm.com>
17339 Segher Boessenkool <segher@kernel.crashing.org>
17340
17341 PR target/85698
17342 * config/rs6000/rs6000.c (rs6000_output_move_128bit): Check dest
17343 operand.
17344
17345 2018-05-17 Richard Biener <rguenther@suse.de>
17346
17347 * tree-ssa-dse.c (dse_classify_store): Fix iterator increment
17348 for pruning loop and prune defs feeding only already visited PHIs.
17349
17350 2018-05-17 Richard Biener <rguenther@suse.de>
17351
17352 * tree-ssa-sccvn.c (vn_reference_lookup_3): Improve memset handling.
17353
17354 2018-05-17 Bin Cheng <bin.cheng@arm.com>
17355 Richard Biener <rguenther@suse.de>
17356
17357 PR tree-optimization/85793
17358 * tree-vect-stmts.c (vectorizable_load): Handle 1 element-wise load
17359 for VMAT_ELEMENTWISE.
17360
17361 2018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
17362
17363 * internal-fn.h (lookup_internal_fn): Declare
17364 * internal-fn.c (lookup_internal_fn): New function.
17365 * gimple.c (gimple_build_call_from_tree): Handle calls to
17366 internal functions.
17367 * gimple-pretty-print.c (dump_gimple_call): Print "." before
17368 internal function names.
17369 * tree-pretty-print.c (dump_generic_node): Likewise.
17370 * tree-ssa-scopedtables.c (expr_hash_elt::print): Likewise.
17371
17372 2018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
17373
17374 * gimple-fold.h (gimple_build): Make the function forms take
17375 combined_fn rather than built_in_function.
17376 (gimple_simplify): Likewise.
17377 * gimple-match-head.c (gimple_simplify): Likewise.
17378 * gimple-fold.c (gimple_build): Likewise.
17379 * tree-vect-loop.c (get_initial_def_for_reduction): Use gimple_build
17380 rather than gimple_build_call_internal.
17381 (get_initial_defs_for_reduction): Likewise.
17382 (vect_create_epilog_for_reduction): Likewise.
17383 (vectorizable_live_operation): Likewise.
17384
17385 2018-05-17 Martin Liska <mliska@suse.cz>
17386
17387 * gimple-ssa-sprintf.c (format_directive): Do not use
17388 space in between 'G_' and '('.
17389
17390 2018-05-17 Jakub Jelinek <jakub@redhat.com>
17391
17392 PR target/85323
17393 * config/i386/i386.c (ix86_fold_builtin): Handle masked shifts
17394 even if the mask is not all ones.
17395
17396 PR target/85323
17397 * config/i386/i386.c (ix86_fold_builtin): Fold shift builtins by
17398 vector.
17399 (ix86_gimple_fold_builtin): Likewise.
17400
17401 PR target/85323
17402 * config/i386/i386.c: Include tree-vector-builder.h.
17403 (ix86_vector_shift_count): New function.
17404 (ix86_fold_builtin): Fold shift builtins by scalar count.
17405 (ix86_gimple_fold_builtin): Likewise.
17406
17407 * config/i386/avx512fintrin.h (_mm512_set_epi16, _mm512_set_epi8,
17408 _mm512_setzero): New intrinsics.
17409
17410 2018-05-17 James Greenhalgh <james.greenhalgh@arm.com>
17411 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
17412
17413 * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify
17414 code generation for cases where splatting a value is not useful.
17415 * simplify-rtx.c (simplify_ternary_operation): Simplify
17416 vec_merge across a vec_duplicate and a paradoxical subreg forming
17417 a vector mode to a vec_concat.
17418
17419 2018-05-17 Olga Makhotina <olga.makhotina@intel.com>
17420
17421 * config.gcc: Support "goldmont-plus".
17422 * config/i386/driver-i386.c (host_detect_local_cpu): Detect
17423 "goldmont-plus".
17424 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
17425 PROCESSOR_GOLDMONT_PLUS.
17426 * config/i386/i386.c (m_GOLDMONT_PLUS): Define.
17427 (processor_target_table): Add "goldmont-plus".
17428 (PTA_GOLDMONT_PLUS): Define.
17429 (ix86_lea_outperforms): Add TARGET_GOLDMONT_PLUS.
17430 (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT_PLUS.
17431 (fold_builtin_cpu): Add M_INTEL_GOLDMONT_PLUS.
17432 (fold_builtin_cpu): Add "goldmont-plus".
17433 (ix86_add_stmt_cost): Add TARGET_GOLDMONT_PLUS.
17434 (ix86_option_override_internal): Add "goldmont-plus".
17435 * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT_PLUS.
17436 (processor_type): Add PROCESSOR_GOLDMONT_PLUS.
17437 * config/i386/x86-tune.def: Add m_GOLDMONT_PLUS.
17438 * doc/invoke.texi: Add goldmont-plus as x86 -march=/-mtune= CPU type.
17439
17440 2018-05-17 Richard Biener <rguenther@suse.de>
17441
17442 PR tree-optimization/85757
17443 * tree-ssa-dse.c (dse_classify_store): Record a PHI def and
17444 remove defs that only feed that PHI from further processing.
17445
17446 2018-05-16 Jim Wilson <jimw@sifive.com>
17447
17448 * config/riscv/riscv.md (<optab>si3_mask, <optab>si3_mask_1): Prepend
17449 asterisk to name.
17450 (<optab>di3_mask, <optab>di3_mask_1): Likewise.
17451
17452 2018-05-16 Mark Wielaard <mark@klomp.org>
17453
17454 * dwarf2out.c (count_index_strings): New function.
17455 (output_indirect_strings): Call count_index_strings and generate
17456 header for dwarf_version >= 5.
17457
17458 2018-05-16 Mark Wielaard <mark@klomp.org>
17459
17460 * dwarf2out.c (dwarf_FORM): New function.
17461 (set_indirect_string): Use dwarf_FORM.
17462 (reset_indirect_string): Likewise.
17463 (size_of_die): Likewise.
17464 (value_format): Likewise.
17465 (output_die): Likewise.
17466 (add_skeleton_AT_string): Likewise.
17467 (output_macinfo_op): Likewise.
17468 (index_string): Likewise.
17469 (output_index_string_offset): Likewise.
17470 (output_index_string): Likewise.
17471 (count_index_strings): Likewise.
17472
17473 2018-05-16 Carl Love <cel@us.ibm.com>
17474
17475 * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
17476 dcbt and dcbtstt with TH=16 if operands[2] is 0 and Power 8 or newer.
17477
17478 2018-05-16 Martin Jambor <mjambor@suse.cz>
17479
17480 * ipa-prop.c (ipa_free_all_edge_args): Remove.
17481 * ipa-prop.h (ipa_free_all_edge_args): Likewise.
17482
17483 2018-05-16 Wilco Dijkstra <wdijkstr@arm.com>
17484
17485 * config/aarch64/aarch64.md (fma<mode>4): Change into expand pattern.
17486 (fnma<mode>4): Likewise.
17487 (fms<mode>4): Likewise.
17488 (fnms<mode>4): Likewise.
17489 (aarch64_fma<mode>4): Rename insn, reorder accumulator operand.
17490 (aarch64_fnma<mode>4): Likewise.
17491 (aarch64_fms<mode>4): Likewise.
17492 (aarch64_fnms<mode>4): Likewise.
17493 (aarch64_fnmadd<mode>4): Likewise.
17494
17495 2018-05-16 Jason Merrill <jason@redhat.com>
17496
17497 * tree.c (warn_deprecated_use): Return bool. Simplify logic.
17498
17499 2018-05-16 Richard Biener <rguenther@suse.de>
17500
17501 * tree-vectorizer.h (struct stmt_info_for_cost): Add where member.
17502 (dump_stmt_cost): Declare.
17503 (add_stmt_cost): Dump cost we add.
17504 (add_stmt_costs): New function.
17505 (vect_model_simple_cost, vect_model_store_cost, vect_model_load_cost):
17506 No longer exported.
17507 (vect_analyze_stmt): Adjust prototype.
17508 (vectorizable_condition): Likewise.
17509 (vectorizable_live_operation): Likewise.
17510 (vectorizable_reduction): Likewise.
17511 (vectorizable_induction): Likewise.
17512 * tree-vect-loop.c (vect_analyze_loop_operations): Create local
17513 cost vector to pass to vectorizable_ and record afterwards.
17514 (vect_model_reduction_cost): Take cost vector argument and adjust.
17515 (vect_model_induction_cost): Likewise.
17516 (vectorizable_reduction): Likewise.
17517 (vectorizable_induction): Likewise.
17518 (vectorizable_live_operation): Likewise.
17519 * tree-vect-slp.c (vect_create_new_slp_node): Initialize
17520 SLP_TREE_NUMBER_OF_VEC_STMTS.
17521 (vect_analyze_slp_cost_1): Remove.
17522 (vect_analyze_slp_cost): Likewise.
17523 (vect_slp_analyze_node_operations): Take visited args and
17524 a target cost vector. Avoid processing already visited stmt sets.
17525 (vect_slp_analyze_operations): Use a local cost vector to gather
17526 costs and register those of non-discarded instances.
17527 (vect_bb_vectorization_profitable_p): Use add_stmt_costs.
17528 (vect_schedule_slp_instance): Remove copying of
17529 SLP_TREE_NUMBER_OF_VEC_STMTS. Instead assert that it is not
17530 zero.
17531 * tree-vect-stmts.c (record_stmt_cost): Remove path directly
17532 adding cost. Record cost entry location.
17533 (vect_prologue_cost_for_slp_op): Function to compute cost of
17534 a constant or invariant generated for SLP vect in the prologue,
17535 split out from vect_analyze_slp_cost_1.
17536 (vect_model_simple_cost): Make static. Adjust for SLP costing.
17537 (vect_model_promotion_demotion_cost): Likewise.
17538 (vect_model_store_cost): Likewise, make static.
17539 (vect_model_load_cost): Likewise.
17540 (vectorizable_bswap): Add cost vector arg and adjust.
17541 (vectorizable_call): Likewise.
17542 (vectorizable_simd_clone_call): Likewise.
17543 (vectorizable_conversion): Likewise.
17544 (vectorizable_assignment): Likewise.
17545 (vectorizable_shift): Likewise.
17546 (vectorizable_operation): Likewise.
17547 (vectorizable_store): Likewise.
17548 (vectorizable_load): Likewise.
17549 (vectorizable_condition): Likewise.
17550 (vectorizable_comparison): Likewise.
17551 (can_vectorize_live_stmts): Likewise.
17552 (vect_analyze_stmt): Likewise.
17553 (vect_transform_stmt): Adjust calls to vectorizable_*.
17554 * tree-vectorizer.c: Include gimple-pretty-print.h.
17555 (dump_stmt_cost): New function.
17556
17557 2018-05-16 Richard Biener <rguenther@suse.de>
17558
17559 * params.def (PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE): New param.
17560 * doc/invoke.texi (dse-max-alias-queries-per-store): Document.
17561 * tree-ssa-dse.c: Include tree-ssa-loop.h.
17562 (check_name): New callback.
17563 (dse_classify_store): Track cycles via a visited bitmap of PHI
17564 defs and simplify handling of in-loop and across loop dead stores
17565 and properly fail for loop-variant refs. Handle byte-tracking with
17566 multiple defs. Use PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE for
17567 limiting the walk.
17568
17569 2018-05-16 Richard Sandiford <richard.sandiford@linaro.org>
17570
17571 * tree-vectorizer.h (vect_get_vector_types_for_stmt): Declare.
17572 (vect_get_mask_type_for_stmt): Likewise.
17573 * tree-vect-slp.c (vect_two_operations_perm_ok_p): New function,
17574 split out from...
17575 (vect_build_slp_tree_1): ...here. Use vect_get_vector_types_for_stmt
17576 to determine the statement's vector type and the vector type that
17577 should be used for calculating nunits. Deal with cases in which
17578 the type has to be deferred.
17579 (vect_slp_analyze_node_operations): Use vect_get_vector_types_for_stmt
17580 and vect_get_mask_type_for_stmt to calculate STMT_VINFO_VECTYPE.
17581 * tree-vect-loop.c (vect_determine_vf_for_stmt_1)
17582 (vect_determine_vf_for_stmt): New functions, split out from...
17583 (vect_determine_vectorization_factor): ...here.
17584 * tree-vect-stmts.c (vect_get_vector_types_for_stmt)
17585 (vect_get_mask_type_for_stmt): New functions, split out from
17586 vect_determine_vectorization_factor.
17587
17588 2018-05-16 Richard Biener <rguenther@suse.de>
17589
17590 * tree-cfg.c (verify_gimple_assign_ternary): Properly
17591 verify the [VEC_]COND_EXPR embedded comparison.
17592
17593 2018-05-15 Martin Sebor <msebor@redhat.com>
17594
17595 PR tree-optimization/85753
17596 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Handle
17597 RECORD_TYPE in addition to ARRAY_TYPE.
17598
17599 2018-05-15 Martin Sebor <msebor@redhat.com>
17600
17601 PR middle-end/85643
17602 * calls.c (get_attr_nonstring_decl): Handle MEM_REF.
17603
17604 2018-05-15 Richard Biener <rguenther@suse.de>
17605
17606 * tree-ssa-dse.c (dse_classify_store): Remove use_stmt parameter,
17607 add by_clobber_p one. Change algorithm to collect all defs
17608 representing uses we need to walk and try reducing them to
17609 a single one before failing.
17610 (dse_dom_walker::dse_optimize_stmt): Adjust.
17611
17612 2018-05-13 Mark Wielaard <mark@klomp.org>
17613
17614 * dwarf2out.c (dwarf_OP): Handle DW_OP_addrx and DW_OP_constx.
17615 (size_of_loc_descr): Likewise.
17616 (output_loc_operands): Likewise.
17617 (output_loc_operands_raw): Likewise.
17618 (dw_addr_op): Use dwarf_OP () for DW_OP_constx and DW_OP_addrx.
17619 (resolve_addr_in_expr): Handle DW_OP_addrx and DW_OP_constx.
17620 (hash_loc_operands): Likewise.
17621 (compare_loc_operands): Likewise.
17622
17623 2018-05-14 Mark Wielaard <mark@klomp.org>
17624
17625 * dwarf2out.c (count_index_addrs): New function.
17626 (dwarf2out_finish): Use count_index_addrs to calculate addrs_length.
17627
17628 2018-05-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
17629
17630 PR tree-optimization/83648
17631 * ipa-pure-const.c (malloc_candidate_p): Allow function with NULL
17632 return value as malloc candidate.
17633
17634 2018-05-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
17635
17636 PR ipa/85734
17637 * ipa-pure-const.c (warn_function_malloc): Pass value of known_finite
17638 param as true in call to suggest_attribute.
17639
17640 2018-05-14 Segher Boessenkool <segher@kernel.crashing.org>
17641
17642 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete @itemx for
17643 -mreadonly-in-sdata.
17644
17645 2018-05-14 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
17646
17647 * config/aarch64/aarch64-simd.md (*aarch64_crypto_aese_fused):
17648 New pattern.
17649 (aarch64_crypto_aesd_fused): Likewise.
17650
17651 2018-05-14 Wilco Dijkstra <wdijkstr@arm.com>
17652
17653 * config/aarch64/aarch64.md (mov<mode>): Remove '*' in alternatives.
17654 (movsi_aarch64): Likewise.
17655 (load_pairsi): Likewise.
17656 (load_pairdi): Likewise.
17657 (store_pairsi): Likewise.
17658 (store_pairdi): Likewise.
17659 (load_pairsf): Likewise.
17660 (load_pairdf): Likewise.
17661 (store_pairsf): Likewise.
17662 (store_pairdf): Likewise.
17663 (zero_extend): Likewise.
17664 (trunc): Swap alternatives.
17665 (fcvt_target): Add '?' to prefer w over r.
17666
17667 2018-05-14 Jakub Jelinek <jakub@redhat.com>
17668
17669 PR target/85756
17670 * config/i386/i386.md: Disallow non-commutative arithmetics in
17671 last twpeephole for mem {+,-,&,|,^}= x; mem != 0 after cmpelim
17672 optimization. Use COMMUTATIVE_ARITH_P test rather than != MINUS
17673 in the peephole2 before it.
17674
17675 2018-05-14 Sebastian Peryt <sebastian.peryt@intel.com>
17676
17677 * common/config/i386/i386-common.c (OPTION_MASK_ISA_CLDEMOTE_SET,
17678 OPTION_MASK_ISA_CLDEMOTE_UNSET): New defines.
17679 (ix86_handle_option): Handle -mcldemote.
17680 * config.gcc: New header.
17681 * config/i386/cldemoteintrin.h: New file.
17682 * config/i386/cpuid.h (bit_CLDEMOTE): New bit.
17683 * config/i386/driver-i386.c (host_detect_local_cpu): Detect
17684 -mcldemote.
17685 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
17686 OPTION_MASK_ISA_CLDEMOTE.
17687 * config/i386/i386.c (ix86_target_string): Add -mcldemote.
17688 (ix86_valid_target_attribute_inner_p): Ditto.
17689 (enum ix86_builtins): Add IX86_BUILTIN_CLDEMOTE.
17690 (ix86_init_mmx_sse_builtins): Define __builtin_ia32_cldemote.
17691 (ix86_expand_builtin): Expand IX86_BUILTIN_CLDEMOTE.
17692 * config/i386/i386.h (TARGET_CLDEMOTE, TARGET_CLDEMOTE_P): New.
17693 * config/i386/i386.md (UNSPECV_CLDEMOTE): New.
17694 (cldemote): New.
17695 * config/i386/i386.opt: Add -mcldemote.
17696 * config/i386/x86intrin.h: New header.
17697 * doc/invoke.texi: Add -mcldemote.
17698
17699 2018-05-14 Richard Biener <rguenther@suse.de>
17700
17701 * doc/match-and-simplify.texi: Adjust :s documentation.
17702
17703 2018-05-14 Alexander Monakov <amonakov@ispras.ru>
17704
17705 * sort.cc (REORDER_23): Pass the type for the temporaries instead of
17706 intended memcpy size.
17707 (REORDER_45): Likewise.
17708
17709 2018-05-13 Alexander Monakov <amonakov@ispras.ru>
17710
17711 * sort.cc: New file.
17712 * system.h [!CHECKING_P] (qsort): Redirect to gcc_qsort.
17713 * vec.c (qsort_chk): Use gcc_qsort.
17714 * Makefile.in (OBJS-libcommon): Add sort.o.
17715 (build/sort.o): New target. Use it...
17716 (BUILD_RTL): ... here, and...
17717 (build/gencfn-macros): ... here, and...
17718 (build/genmatch): ... here.
17719
17720 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
17721 Chung-Ju Wu <jasonwucj@gmail.com>
17722
17723 * config.gcc (nds32*-*-*): Check that n15 is valid to --with-cpu.
17724 * config/nds32/nds32-graywolf.md: New file.
17725 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_GRAYWOLF.
17726 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n15
17727 pipeline.
17728 * config/nds32/nds32-protos.h: More declarations for n15 pipeline.
17729 * config/nds32/nds32-utils.c: More implementations for n15 pipeline.
17730 * config/nds32/nds32.md (pipeline_model): Add graywolf.
17731 * config/nds32/nds32.opt (mcpu): Support n15 pipeline cpus.
17732 * config/nds32/pipelines.md: Include n15 settings.
17733
17734 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
17735 Chung-Ju Wu <jasonwucj@gmail.com>
17736
17737 * config.gcc (nds32*-*-*): Check that n12/n13 are valid to --with-cpu.
17738 * config/nds32/nds32-n13.md: New file.
17739 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N12 and CPU_N13.
17740 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n12/n13
17741 pipeline.
17742 * config/nds32/nds32-protos.h: More declarations for n12/n13 pipeline.
17743 * config/nds32/nds32.md (pipeline_model): Add n13.
17744 * config/nds32/nds32.opt (mcpu): Support n12/n13 pipeline cpus.
17745 * config/nds32/pipelines.md: Include n13 settings.
17746
17747 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
17748 Chung-Ju Wu <jasonwucj@gmail.com>
17749
17750 * config.gcc (nds32*-*-*): Check that n10/d10 are valid to --with-cpu.
17751 * config/nds32/nds32-n10.md: New file.
17752 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N10.
17753 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n10
17754 pipeline.
17755 * config/nds32/nds32-protos.h: More declarations for n10 pipeline.
17756 * config/nds32/nds32-utils.c: More implementations for n10 pipeline.
17757 * config/nds32/nds32.md (pipeline_model): Add n10.
17758 * config/nds32/nds32.opt (mcpu): Support n10 pipeline cpus.
17759 * config/nds32/pipelines.md: Include n10 settings.
17760
17761 2018-05-13 Monk Chiang <sh.chiang04@gmail.com>
17762 Kito Cheng <kito.cheng@gmail.com>
17763 Chung-Ju Wu <jasonwucj@gmail.com>
17764
17765 * config.gcc (nds32be-*-*): Handle --with-ext-dsp.
17766 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
17767 Add enum values for DSP extension instructions.
17768 * config/nds32/constraints.md (Iu06, IU06, CVp5, CVs5, CVs2, CVhi):
17769 New constraints.
17770 * config/nds32/iterators.md (shifts, shiftrt, sat_plus, all_plus,
17771 sat_minus, all_minus, plus_minus, extend, sumax, sumin, sumin_max):
17772 New code iterators.
17773 (su, zs, uk, opcode, add_rsub, add_sub): New code attributes.
17774 * config/nds32/nds32-dspext.md: New file for DSP implementation.
17775 * config/nds32/nds32-intrinsic.c: Implementation of DSP extension.
17776 * config/nds32/nds32-intrinsic.md: Likewise.
17777 * config/nds32/nds32_intrinsic.h: Likewise.
17778 * config/nds32/nds32-md-auxiliary.c: Likewise.
17779 * config/nds32/nds32-memory-manipulation.c: Consider DSP extension.
17780 * config/nds32/nds32-predicates.c (const_vector_to_hwint): New.
17781 (nds32_valid_CVp5_p, nds32_valid_CVs5_p): New.
17782 (nds32_valid_CVs2_p, nds32_valid_CVhi_p): New.
17783 * config/nds32/nds32-protos.h: New declarations for DSP extension.
17784 * config/nds32/nds32-utils.c (extract_mac_non_acc_rtx): New case
17785 TYPE_DMAC in switch statement.
17786 * config/nds32/nds32.c: New checking and implementation for DSP
17787 extension instructions.
17788 * config/nds32/nds32.h: Likewise.
17789 * config/nds32/nds32.md: Likewise.
17790 * config/nds32/nds32.opt (mhw-abs, mext-dsp): New options.
17791 * config/nds32/predicates.md: Implement new predicates for DSP
17792 extension.
17793
17794 2018-05-11 Michael Meissner <meissner@linux.vnet.ibm.com>
17795
17796 * config/rs6000/rs6000.md (mov<mode>_softfloat, FMOVE32):
17797 Reformat alternatives and attributes so it is easier to identify
17798 which constraints/attributes go with which instruction.
17799 (mov<mode>_hardfloat32, FMOVE64): Likewise.
17800 (mov<mode>_softfloat32, FMOVE64): Likewise.
17801 (mov<mode>_hardfloat64, FMOVE64): Likewise.
17802 (mov<mode>_softfloat64, FMOVE64): Likewise.
17803
17804 2018-05-11 Kelvin Nilsen <kelvin@gcc.gnu.org>
17805
17806 * doc/extend.texi (PowerPC Built-in Functions): Rename this
17807 subsection.
17808 (Basic PowerPC Built-in Functions): The new name of the
17809 subsection previously known as "PowerPC Built-in Functions".
17810 (Basic PowerPC Built-in Functions Available on all Configurations):
17811 New subsubsection.
17812 (Basic PowerPC Built-in Functions Available on ISA 2.05): Likewise.
17813 (Basic PowerPC Built-in Functions Available on ISA 2.06): Likewise.
17814 (Basic PowerPC Built-in Functions Available on ISA 2.07): Likewise.
17815 (Basic PowerPC Built-in Functions Available on ISA 3.0): Likewise.
17816
17817 2018-05-11 Martin Jambor <mjambor@suse.cz>
17818
17819 PR ipa/85655
17820 * ipa-cp.c (intersect_with_plats): Check that the lattice contains
17821 single const.
17822
17823 2018-05-11 Richard Earnshaw <rearnsha@arm.com>
17824
17825 PR target/85733
17826 * config/arm/arm-cpus.in (fgroup ARMv6m): Add be8 feature.
17827
17828 2018-05-11 Sebastian Peryt <sebastian.peryt@intel.com>
17829
17830 * common/config/i386/i386-common.c (OPTION_MASK_ISA_WAITPKG_SET,
17831 OPTION_MASK_ISA_WAITPKG_UNSET): New defines.
17832 (ix86_handle_option): Handle -mwaitpkg.
17833 * config.gcc: New header.
17834 * config/i386/cpuid.h (bit_WAITPKG): New bit.
17835 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mwaitpkg.
17836 * config/i386/i386-builtin-types.def ((UINT8, UNSIGNED, UINT64)): New
17837 function type.
17838 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
17839 OPTION_MASK_ISA_WAITPKG.
17840 * config/i386/i386.c (ix86_target_string): Add -mwaitpkg.
17841 (ix86_option_override_internal): Add PTA_WAITPKG.
17842 (ix86_valid_target_attribute_inner_p): Add -mwaitpkg.
17843 (enum ix86_builtins): Add IX86_BUILTIN_UMONITOR, IX86_BUILTIN_UMWAIT,
17844 IX86_BUILTIN_TPAUSE.
17845 (ix86_init_mmx_sse_builtins): Define __builtin_ia32_umonitor,
17846 __builtin_ia32_umwait and __builtin_ia32_tpause.
17847 (ix86_expand_builtin): Expand IX86_BUILTIN_UMONITOR,
17848 IX86_BUILTIN_UMWAIT, IX86_BUILTIN_TPAUSE.
17849 * config/i386/i386.h (TARGET_WAITPKG, TARGET_WAITPKG_P): New.
17850 * config/i386/i386.md (UNSPECV_UMWAIT, UNSPECV_UMONITOR,
17851 UNSPECV_TPAUSE): New.
17852 (umwait, umwait_rex64, umonitor_<mode>, tpause, tpause_rex64): New.
17853 * config/i386/i386.opt: Add -mwaitpkg.
17854 * config/i386/waitpkgintrin.h: New file.
17855 * config/i386/x86intrin.h: New header.
17856 * doc/invoke.texi: Add -mwaitpkg.
17857
17858 2018-05-11 Richard Earnshaw <rearnsha@arm.com>
17859
17860 PR target/85606
17861 * config/arm/arm-cpus.in: Add comment that ARMv6-m and ARMv6S-m are now
17862 equivalent.
17863 (cortex-m0): Use armv6s-m isa.
17864 (cortex-m0plus): Likewise.
17865 (cortex-m1): Likewise.
17866 (cortex-m0.small-multiply): Likewise.
17867 (cortex-m0plus.small-multiply): Likewise.
17868 (cortex-m1.small-multiply): Likewise.
17869
17870 2018-05-11 Allan Sandfeld Jensen <allan.jensen@qt.io>
17871 Jakub Jelinek <jakub@redhat.com>
17872
17873 PR tree-optimization/85692
17874 * tree-ssa-forwprop.c (simplify_vector_constructor): Try two
17875 source permute as well.
17876
17877 2018-05-11 Martin Liska <mliska@suse.cz>
17878
17879 PR sanitizer/85556
17880 * doc/extend.texi: Document LLVM style format for no_sanitize
17881 attribute.
17882
17883 2018-05-10 Michael Meissner <meissner@linux.vnet.ibm.com>
17884
17885 * config/rs6000/rs6000.c (mode_supports_dq_form): Rename
17886 mode_supports_vsx_dform_quad to mode_supports_dq_form.
17887 (mode_supports_vsx_dform_quad): Likewise.
17888 (mode_supports_vmx_dform): Move these functions to be next to the
17889 other mode_supports functions.
17890 (mode_supports_dq_form): Likewise.
17891 (quad_address_p): Change calls of mode_supports_vsx_dform_quad to
17892 mode_supports_dq_form.
17893 (reg_offset_addressing_ok_p): Likewise.
17894 (offsettable_ok_by_alignment): Likewise.
17895 (rs6000_legitimate_offset_address_p): Likewise.
17896 (legitimate_lo_sum_address_p): Likewise.
17897 (rs6000_legitimize_address): Likewise.
17898 (rs6000_legitimize_reload_address): Likewise.
17899 (rs6000_secondary_reload_inner): Likewise.
17900 (rs6000_preferred_reload_class): Likewise.
17901 (rs6000_output_move_128bit): Likewise.
17902
17903 2018-05-10 Uros Bizjak <ubizjak@gmail.com>
17904
17905 * config/i386/i386.c (ix86_expand_builtin) <case IX86_BUILTIN_RDPID>:
17906 Generate SImode target register for null target.
17907 <case IX86_BUILTIN_XGETBV>: Ditto.
17908 <case IX86_BUILTIN_XSETBV>: Optimize LSHIFTRT generation.
17909 * config/i386/xsaveintrin.h (_xgetbv): Add missing return.
17910
17911 2018-05-10 Carl Love <cel@us.ibm.com>
17912
17913 * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
17914 dcbtt and dcbtstt if operands[2] is 0.
17915
17916 2018-05-10 Uros Bizjak <ubizjak@gmail.com>
17917
17918 PR target/85693
17919 * config/i386/sse.md (usadv64qi): New expander.
17920
17921 2018-05-10 Segher Boessenkool <segher@kernel.crashing.org>
17922
17923 * config/rs6000/altivec.md (altivec_vmrghb, altivec_vmrghh,
17924 altivec_vmrghw, altivec_vmrglb, altivec_vmrglh, altivec_vmrglw): Remove
17925 -maltivec=be support.
17926 (vec_widen_umult_even_v16qi, vec_widen_smult_even_v16qi,
17927 vec_widen_umult_even_v8hi, vec_widen_smult_even_v8hi,
17928 vec_widen_umult_even_v4si, vec_widen_smult_even_v4si,
17929 vec_widen_umult_odd_v16qi, vec_widen_smult_odd_v16qi,
17930 vec_widen_umult_odd_v8hi, vec_widen_smult_odd_v8hi,
17931 vec_widen_umult_odd_v4si, vec_widen_smult_odd_v4si, altivec_vpkpx,
17932 altivec_vpks<VI_char>ss, altivec_vpks<VI_char>us,
17933 altivec_vpku<VI_char>us, altivec_vpku<VI_char>um, altivec_vsum2sws,
17934 altivec_vsumsws): Adjust.
17935 (altivec_vspltb *altivec_vspltb_internal, altivec_vsplth,
17936 *altivec_vsplth_internal, altivec_vspltw, *altivec_vspltw_internal,
17937 altivec_vspltsf, *altivec_vspltsf_internal): Remove -maltivec=be
17938 support.
17939 (altivec_vperm_<mode>, altivec_vperm_<mode>_uns,
17940 altivec_vupkhs<VU_char>, altivec_vupkls<VU_char>, altivec_vupkhpx,
17941 altivec_vupklpx, altivec_lvsl, altivec_lvsr): Adjust.
17942 (altivec_lve<VI_char>x): Delete expand.
17943 (*altivec_lve<VI_char>x_internal): Rename to...
17944 (altivec_lve<VI_char>x): ... this.
17945 (altivec_lvxl_<mode>): Delete expand.
17946 (*altivec_lvxl_<mode>_internal): Rename to ...
17947 (altivec_lvxl_<mode>): ... this.
17948 (altivec_stvxl_<mode>): Delete expand.
17949 (*altivec_stvxl_<mode>_internal): Rename to ...
17950 (altivec_stvxl_<mode>): ... this.
17951 (altivec_stve<VI_char>x): Delete expand.
17952 (*altivec_stve<VI_char>x_internal): Rename to ...
17953 (altivec_stve<VI_char>x): ... this.
17954 (doublee<mode>2, unsdoubleev4si2, doubleo<mode>2, unsdoubleov4si2,
17955 doubleh<mode>2, unsdoublehv4si2, doublel<mode>2, unsdoublelv4si2,
17956 reduc_plus_scal_<mode>): Adjust.
17957 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Adjust
17958 comment.
17959 (rs6000_cpu_cpp_builtins): Adjust.
17960 (altivec_resolve_overloaded_builtin): Remove -maltivec=be support.
17961 * config/rs6000/rs6000-protos.h (altivec_expand_lvx_be,
17962 altivec_expand_stvx_be, altivec_expand_stvex_be): Delete.
17963 * config/rs6000/rs6000.c (rs6000_option_override_internal): Remove
17964 -maltivec=be support.
17965 (rs6000_split_vec_extract_var): Adjust.
17966 (rs6000_split_v4si_init): Adjust.
17967 (swap_selector_for_mode): Delete.
17968 (altivec_expand_lvx_be, altivec_expand_stvx_be,
17969 altivec_expand_stvex_be): Delete.
17970 (altivec_expand_lv_builtin, altivec_expand_stv_builtin): Remove
17971 -maltivec=be support.
17972 (rs6000_gimple_fold_builtin): Ditto.
17973 (rs6000_generate_float2_double_code, rs6000_generate_float2_code):
17974 Adjust.
17975 * config/rs6000/rs6000.h (VECTOR_ELT_ORDER_BIG): Delete.
17976 (TARGET_DIRECT_MOVE_64BIT): Adjust.
17977 * config/rs6000/rs6000.md (split for extendsidi2 for vectors): Adjust.
17978 * config/rs6000/rs6000.opt (maltivec=le, maltivec=be): Delete.
17979 * config/rs6000/vsx.md (floate<mode>, unsfloatev2di, floato<mode>,
17980 unsfloatov2di, vsignedo_v2df, vsignede_v2df, vunsignedo_v2df,
17981 vunsignede_v2df, vsx_extract_<mode>_p9, *vsx_extract_si,
17982 *vsx_extract_<mode>_p8, *vsx_extract_si_<uns>float_df,
17983 *vsx_extract_si_<uns>float_<mode>, vsx_set_<mode>_p9, vsx_set_v4sf_p9,
17984 *vsx_insert_extract_v4sf_p9, *vsx_insert_extract_v4sf_p9_2, and an
17985 anonymous split): Adjust.
17986 (vsx_mergel_<mode>, vsx_mergeh_<mode>): Remove -maltivec=be support.
17987 (vsx_xxspltd_<mode>, extract4b, insert4b): Adjust.
17988
17989 2018-05-10 Eric Botcazou <ebotcazou@adacore.com>
17990
17991 * configure.ac (gcc_gxx_include_dir_add_sysroot): Set it to 1 only
17992 when --with-gxx-include-dir is also specified.
17993 * configure: Regenerate.
17994
17995 2018-05-09 Jim Wilson <jimw@sifive.com>
17996
17997 PR target/84797
17998 * config.gcc (riscv*-*-*): Handle --with-multilib-list.
17999 * config/riscv/t-withmultilib: New.
18000 * config/riscv/withmultilib.h: New.
18001 * doc/install.texi: Document RISC-V --with-multilib-list support.
18002
18003 2018-05-09 Richard Biener <rguenther@suse.de>
18004
18005 * tree-vect-slp.c (vect_bb_slp_scalar_cost): Fill a cost
18006 vector.
18007 (vect_bb_vectorization_profitable_p): Adjust. Compute
18008 actual scalar cost using the cost vector and the add_stmt_cost
18009 machinery.
18010
18011 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
18012
18013 PR rtl-optimization/85645
18014 * config/rs6000/rs6000.c (rs6000_emit_prologue_components): Put a SET
18015 in the REG_CFA_REGISTER note for LR, don't leave it empty.
18016
18017 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
18018
18019 PR rtl-optimization/85645
18020 * shrink-wrap.c (spread_components): Return a boolean saying if
18021 anything was changed.
18022 (try_shrink_wrapping_separate): Iterate spread_components until
18023 nothing changes anymore.
18024
18025 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
18026
18027 PR rtl-optimization/85645
18028 * regrename.c (build_def_use): Also kill the chains that include the
18029 destination of a REG_CFA_REGISTER note.
18030
18031 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
18032
18033 PR rtl-optimization/85645
18034 * regcprop.c (copyprop_hardreg_forward_1): Don't propagate into an
18035 insn that has a REG_CFA_REGISTER note.
18036
18037 2018-05-09 Richard Sandiford <richard.sandiford@linaro.org>
18038
18039 * cfgexpand.c (expand_clobber): New function.
18040 (expand_gimple_stmt_1): Use it.
18041 * tree-vect-stmts.c (vect_clobber_variable): New function,
18042 split out from...
18043 (vectorizable_simd_clone_call): ...here.
18044 (vectorizable_store): Emit a clobber either side of an
18045 IFN_STORE_LANES sequence.
18046 (vectorizable_load): Emit a clobber after an IFN_LOAD_LANES sequence.
18047
18048 2018-05-09 Tom de Vries <tom@codesourcery.com>
18049
18050 PR target/85626
18051 * config/nvptx/nvptx.md (define_insn "trap", define_insn "trap_if_true")
18052 (define_insn "trap_if_false"): Add exit after trap.
18053
18054 2018-05-09 Eric Botcazou <ebotcazou@adacore.com>
18055
18056 PR rtl-optimization/85638
18057 * bb-reorder.c: Include common/common-target.h.
18058 (create_forwarder_block): New function extracted from...
18059 (fix_up_crossing_landing_pad): ...here. Rename into...
18060 (dw2_fix_up_crossing_landing_pad): ...this.
18061 (sjlj_fix_up_crossing_landing_pad): New function.
18062 (find_rarely_executed_basic_blocks_and_crossing_edges): In SJLJ mode,
18063 call sjlj_fix_up_crossing_landing_pad if there are incoming EH edges
18064 from both partitions and exit the loop after one iteration.
18065
18066 2018-05-08 Kelvin Nilsen <kelvin@gcc.gnu.org>
18067
18068 Revert:
18069 * doc/extend.texi (PowerPC Built-in Functions): Rename this
18070 subsection.
18071 (Basic PowerPC Built-in Functions): The new name of the
18072 subsection previously known as "PowerPC Built-in Functions".
18073 (Basic PowerPC Built-in Functions Available on all Configurations):
18074 New subsubsection.
18075 (Basic PowerPC Built-in Functions Available on ISA 2.05): New
18076 subsubsection.
18077 (Basic PowerPC Built-in Functions Available on ISA 2.06): New
18078 subsubsection.
18079 (Basic PowerPC Built-in Functions Available on ISA 2.07): New
18080 subsubsection.
18081 (Basic PowerPC Built-in Functions Available on ISA 3.0): New
18082 subsubsection.
18083
18084 2018-05-08 Jim Wilson <jimw@sifive.com>
18085
18086 * config/riscv/linux.h (MUSL_ABI_SUFFIX): Delete unnecessary backslash.
18087 (LD_EMUL_SUFFIX): New.
18088 (LINK_SPEC): Use it.
18089
18090 2018-05-08 Kelvin Nilsen <kelvin@gcc.gnu.org>
18091
18092 * doc/extend.texi (PowerPC Built-in Functions): Rename this
18093 subsection.
18094 (Basic PowerPC Built-in Functions): The new name of the
18095 subsection previously known as "PowerPC Built-in Functions".
18096 (Basic PowerPC Built-in Functions Available on all Configurations):
18097 New subsubsection.
18098 (Basic PowerPC Built-in Functions Available on ISA 2.05): New
18099 subsubsection.
18100 (Basic PowerPC Built-in Functions Available on ISA 2.06): New
18101 subsubsection.
18102 (Basic PowerPC Built-in Functions Available on ISA 2.07): New
18103 subsubsection.
18104 (Basic PowerPC Built-in Functions Available on ISA 3.0): New
18105 subsubsection.
18106
18107 2018-05-08 Jakub Jelinek <jakub@redhat.com>
18108
18109 PR target/85683
18110 * config/i386/i386.md: Add peepholes for mem {+,-,&,|,^}= x; mem != 0
18111 after cmpelim optimization.
18112
18113 2018-05-08 Olga Makhotina <olga.makhotina@intel.com>
18114
18115 * config.gcc: Support "goldmont".
18116 * config/i386/driver-i386.c (host_detect_local_cpu): Detect "goldmont".
18117 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
18118 PROCESSOR_GOLDMONT.
18119 * config/i386/i386.c (m_GOLDMONT): Define.
18120 (processor_target_table): Add "goldmont".
18121 (PTA_GOLDMONT): Define.
18122 (ix86_lea_outperforms): Add TARGET_GOLDMONT.
18123 (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT.
18124 (fold_builtin_cpu): Add M_INTEL_GOLDMONT.
18125 (fold_builtin_cpu): Add "goldmont".
18126 (ix86_add_stmt_cost): Add TARGET_GOLDMONT.
18127 (ix86_option_override_internal): Add "goldmont".
18128 * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT.
18129 (processor_type): Add PROCESSOR_GOLDMONT.
18130 * config/i386/i386.md: Add CPU "glm".
18131 * config/i386/glm.md: New file.
18132 * config/i386/x86-tune.def: Add m_GOLDMONT.
18133 * doc/invoke.texi: Add goldmont as x86 -march=/-mtune= CPU type.
18134
18135 2018-05-08 Jakub Jelinek <jakub@redhat.com>
18136
18137 PR target/85572
18138 * config/i386/i386.c (ix86_expand_sse2_abs): Handle E_V2DImode and
18139 E_V4DImode.
18140 * config/i386/sse.md (abs<mode>2): Use VI_AVX2 iterator instead of
18141 VI1248_AVX512VL_AVX512BW. Handle V2DImode and V4DImode if not
18142 TARGET_AVX512VL using ix86_expand_sse2_abs. Formatting fixes.
18143
18144 PR target/85317
18145 * config/i386/i386.c (ix86_fold_builtin): Handle
18146 IX86_BUILTIN_{,P}MOVMSK{PS,PD,B}{,128,256}.
18147
18148 PR target/85480
18149 * config/i386/sse.md (ssequaterinsnmode): New mode attribute.
18150 (*<extract_type>_vinsert<shuffletype><extract_suf>_0): New pattern.
18151
18152 2018-05-08 Richard Earnshaw <rearnsha@arm.com>
18153
18154 PR target/85658
18155 * config/arm/parsecpu.awk (check_cpu): Fix operator precedence.
18156 (check_arch): Likewise.
18157 (check_fpu): Return the result rather than printing it.
18158 (end arch): Fix operator precedence.
18159 (end cpu): Likewise.
18160 (END): Print the result from check_fpu.
18161
18162 2018-05-08 Richard Sandiford <richard.sandiford@linaro.org>
18163 Alan Hayward <alan.hayward@arm.com>
18164 David Sherwood <david.sherwood@arm.com>
18165
18166 * config/aarch64/aarch64-sve.md (*pred_cmp<cmp_op><mode>_combine)
18167 (*pred_cmp<cmp_op><mode>, *fcm<cmp_op><mode>_and_combine)
18168 (*fcmuo<mode>_and_combine, *fcm<cmp_op><mode>_and)
18169 (*fcmuo<mode>_and): New patterns.
18170
18171 2018-05-08 Richard Sandiford <richard.sandiford@linaro.org>
18172
18173 * config/aarch64/iterators.md (UNSPEC_COND_LO, UNSPEC_COND_LS)
18174 (UNSPEC_COND_HI, UNSPEC_COND_HS, UNSPEC_COND_UO): Delete.
18175 (SVE_INT_CMP, SVE_FP_CMP): New code iterators.
18176 (cmp_op, sve_imm_con): New code attributes.
18177 (SVE_COND_INT_CMP, imm_con): Delete.
18178 (cmp_op): Remove above unspecs from int attribute.
18179 * config/aarch64/aarch64-sve.md (*vec_cmp<cmp_op>_<mode>): Rename
18180 to...
18181 (*cmp<cmp_op><mode>): ...this. Use UNSPEC_MERGE_PTRUE instead of
18182 comparison-specific unspecs.
18183 (*vec_cmp<cmp_op>_<mode>_ptest): Rename to...
18184 (*cmp<cmp_op><mode>_ptest): ...this and adjust likewise.
18185 (*vec_cmp<cmp_op>_<mode>_cc): Rename to...
18186 (*cmp<cmp_op><mode>_cc): ...this and adjust likewise.
18187 (*vec_fcm<cmp_op><mode>): Rename to...
18188 (*fcm<cmp_op><mode>): ...this and adjust likewise.
18189 (*vec_fcmuo<mode>): Rename to...
18190 (*fcmuo<mode>): ...this and adjust likewise.
18191 (*pred_fcm<cmp_op><mode>): New pattern.
18192 * config/aarch64/aarch64.c (aarch64_emit_unop, aarch64_emit_binop)
18193 (aarch64_emit_sve_ptrue_op, aarch64_emit_sve_ptrue_op_cc): New
18194 functions.
18195 (aarch64_unspec_cond_code): Remove handling of LTU, GTU, LEU, GEU
18196 and UNORDERED.
18197 (aarch64_gen_unspec_cond, aarch64_emit_unspec_cond): Delete.
18198 (aarch64_emit_sve_predicated_cond): New function.
18199 (aarch64_expand_sve_vec_cmp_int): Use aarch64_emit_sve_ptrue_op_cc.
18200 (aarch64_emit_unspec_cond_or): Replace with...
18201 (aarch64_emit_sve_or_conds): ...this new function. Use
18202 aarch64_emit_sve_ptrue_op for the individual comparisons and
18203 aarch64_emit_binop to OR them together.
18204 (aarch64_emit_inverted_unspec_cond): Replace with...
18205 (aarch64_emit_sve_inverted_cond): ...this new function. Use
18206 aarch64_emit_sve_ptrue_op for the comparison and
18207 aarch64_emit_unop to invert the result.
18208 (aarch64_expand_sve_vec_cmp_float): Update after the above
18209 changes. Use aarch64_emit_sve_ptrue_op for native comparisons.
18210
18211 2018-05-07 Nathan Sidwell <nathan@acm.org>
18212
18213 * doc/invoke.texi (C++ Dialect Options): Remove -ffor-scope.
18214 * doc/extend.texi (Deprecated Features): Remove -fno-for-scope
18215 (Backwards Compatibility): Likewise.
18216
18217 2018-05-07 Luis Machado <luis.machado@linaro.org>
18218
18219 PR bootstrap/85681
18220 Revert:
18221 2018-05-07 Luis Machado <luis.machado@linaro.org>
18222
18223 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
18224 <prefetch_dynamic_strides>: New const bool field.
18225 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
18226 prefetch_dynamic_strides.
18227 (exynosm1_prefetch_tune): Likewise.
18228 (thunderxt88_prefetch_tune): Likewise.
18229 (thunderx_prefetch_tune): Likewise.
18230 (thunderx2t99_prefetch_tune): Likewise.
18231 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
18232 to false.
18233 (aarch64_override_options_internal): Update to set
18234 PARAM_PREFETCH_DYNAMIC_STRIDES.
18235 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
18236 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
18237 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
18238 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
18239 prefetch-dynamic-strides setting.
18240
18241 2018-05-07 Luis Machado <luis.machado@linaro.org>
18242
18243 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
18244 <minimum_stride>: New const int field.
18245 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
18246 minimum_stride field.
18247 (exynosm1_prefetch_tune): Likewise.
18248 (thunderxt88_prefetch_tune): Likewise.
18249 (thunderx_prefetch_tune): Likewise.
18250 (thunderx2t99_prefetch_tune): Likewise.
18251 (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
18252 (aarch64_override_options_internal): Update to set
18253 PARAM_PREFETCH_MINIMUM_STRIDE.
18254 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
18255 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
18256 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
18257 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
18258 stride is constant and is below the minimum stride threshold.
18259
18260 2018-05-07 Luis Machado <luis.machado@linaro.org>
18261
18262 * config/aarch64/aarch64.c (qdf24xx_prefetch_tune) <l2_cache_size>: Set
18263 to 512.
18264
18265 2018-05-07 Luis Machado <luis.machado@linaro.org>
18266
18267 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
18268 <prefetch_dynamic_strides>: New const bool field.
18269 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
18270 prefetch_dynamic_strides.
18271 (exynosm1_prefetch_tune): Likewise.
18272 (thunderxt88_prefetch_tune): Likewise.
18273 (thunderx_prefetch_tune): Likewise.
18274 (thunderx2t99_prefetch_tune): Likewise.
18275 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
18276 to false.
18277 (aarch64_override_options_internal): Update to set
18278 PARAM_PREFETCH_DYNAMIC_STRIDES.
18279 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
18280 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
18281 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
18282 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
18283 prefetch-dynamic-strides setting.
18284
18285 2018-05-07 Luis Machado <luis.machado@linaro.org>
18286
18287 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
18288 <minimum_stride>: New const int field.
18289 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
18290 minimum_stride field.
18291 (exynosm1_prefetch_tune): Likewise.
18292 (thunderxt88_prefetch_tune): Likewise.
18293 (thunderx_prefetch_tune): Likewise.
18294 (thunderx2t99_prefetch_tune): Likewise.
18295 (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
18296 (aarch64_override_options_internal): Update to set
18297 PARAM_PREFETCH_MINIMUM_STRIDE.
18298 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
18299 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
18300 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
18301 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
18302 stride is constant and is below the minimum stride threshold.
18303
18304 2018-05-06 Jakub Jelinek <jakub@redhat.com>
18305
18306 PR c++/85659
18307 * cfgexpand.c (expand_asm_stmt): Don't create a temporary if
18308 the type is addressable. Don't force op into register if it has
18309 BLKmode.
18310
18311 2018-05-05 Roland McGrath <mcgrathr@google.com>
18312
18313 PR other/77609
18314 * varasm.c (default_section_type_flags): Set SECTION_NOTYPE for
18315 any section for which we don't know a specific type it should have,
18316 regardless of name. Previously this was done only for the exact
18317 names ".init_array", ".fini_array", and ".preinit_array".
18318 (default_elf_asm_named_section): Add comment about
18319 relationship with default_section_type_flags and SECTION_NOTYPE.
18320 (get_section): Don't consider it a type conflict if one side has
18321 SECTION_NOTYPE and the other doesn't, as long as neither has the
18322 SECTION_BSS et al used in the default_section_type_flags logic.
18323
18324 2018-05-05 Tom de Vries <tom@codesourcery.com>
18325
18326 PR target/85653
18327 * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_3): Define.
18328 (workaround_barsyncs): New function.
18329 (nvptx_reorg): Use workaround_barsyncs.
18330 * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
18331 (define_expand "nvptx_membar_cta"): New define_expand.
18332 (define_insn "*nvptx_membar_cta"): New insn.
18333
18334 2018-05-04 Pekka Jääskeläinen <pekka.jaaskelainen@parmance.com>
18335
18336 * brig-builtins.def: Add consts to ptrs etc. in BRIG builtin defs.
18337 To improve optimization opportunities.
18338 * builtin-types.def: The new needed builtin types for the above.
18339
18340 2018-05-04 Richard Biener <rguenther@suse.de>
18341
18342 * bb-reorder.c (sanitize_hot_paths): Release hot_bbs_to_check.
18343 * gimple-ssa-store-merging.c
18344 (imm_store_chain_info::output_merged_store): Remove redundant create,
18345 release split_store vector contents on failure.
18346 * tree-vect-slp.c (vect_schedule_slp_instance): Avoid leaking
18347 scalar stmt vector on cache hit.
18348
18349 2018-05-04 Segher Boessenkool <segher@kernel.crashing.org>
18350
18351 * common/config/rs6000/rs6000-common.c (rs6000_handle_option): Remove
18352 Xilinx FP support.
18353 * config.gcc (powerpc-xilinx-eabi*): Remove.
18354 * config/rs6000/predicates.md (easy_fp_constant): Remove Xilinx FP
18355 support.
18356 (fusion_addis_mem_combo_load): Ditto.
18357 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Remove Xilinx
18358 FP support.
18359 (rs6000_cpu_cpp_builtins): Ditto.
18360 * config/rs6000/rs6000-linux.c
18361 (rs6000_linux_float_exceptions_rounding_supported_p): Ditto.
18362 * config/rs6000/rs6000-opts.h (enum fpu_type_t): Delete.
18363 * config/rs6000/rs6000.c (rs6000_debug_reg_global): Remove Xilinx FP
18364 support.
18365 (rs6000_setup_reg_addr_masks): Ditto.
18366 (rs6000_init_hard_regno_mode_ok): Ditto.
18367 (rs6000_option_override_internal): Ditto.
18368 (legitimate_lo_sum_address_p): Ditto.
18369 (rs6000_legitimize_address): Ditto.
18370 (rs6000_legitimize_reload_address): Ditto.
18371 (rs6000_legitimate_address_p): Ditto.
18372 (abi_v4_pass_in_fpr): Ditto.
18373 (setup_incoming_varargs): Ditto.
18374 (rs6000_gimplify_va_arg): Ditto.
18375 (rs6000_split_multireg_move): Ditto.
18376 (rs6000_savres_strategy): Ditto.
18377 (rs6000_emit_prologue_components): Ditto.
18378 (rs6000_emit_epilogue_components): Ditto.
18379 (rs6000_emit_prologue): Ditto.
18380 (rs6000_emit_epilogue): Ditto.
18381 (rs6000_elf_file_end): Ditto.
18382 (rs6000_function_value): Ditto.
18383 (rs6000_libcall_value): Ditto.
18384 * config/rs6000/rs6000.h: Ditto.
18385 (TARGET_MINMAX_SF, TARGET_MINMAX_DF): Delete, merge to ...
18386 (TARGET_MINMAX): ... this. New.
18387 (TARGET_SF_FPR, TARGET_DF_FPR, TARGET_SF_INSN, TARGET_DF_INSN): Delete.
18388 * config/rs6000/rs6000.md: Remove Xilinx FP support.
18389 (*movsi_internal1_single): Delete.
18390 * config/rs6000/rs6000.opt (msingle-float, mdouble-float, msimple-fpu,
18391 mfpu=, mxilinx-fpu): Delete.
18392 * config/rs6000/singlefp.h: Delete.
18393 * config/rs6000/sysv4.h: Remove Xilinx FP support.
18394 * config/rs6000/t-rs6000: Ditto.
18395 * config/rs6000/t-xilinx: Delete.
18396 * config/rs6000/titan.md: Adjust for fp_type removal.
18397 * config/rs6000/vsx.md: Remove Xilinx FP support.
18398 (VStype_simple): Delete.
18399 (VSfptype_simple, VSfptype_mul, VSfptype_div, VSfptype_sqrt): Delete.
18400 * config/rs6000/xfpu.h: Delete.
18401 * config/rs6000/xfpu.md: Delete.
18402 * config/rs6000/xilinx.h: Delete.
18403 * config/rs6000/xilinx.opt: Delete.
18404 * doc/invoke.texi (RS/6000 and PowerPC Options): Remove
18405 -msingle-float, -mdouble-float, -msimple-fpu, -mfpu=, and -mxilinx-fpu.
18406
18407 2018-05-04 Tom de Vries <tom@codesourcery.com>
18408
18409 PR libgomp/85639
18410 * builtins.c (expand_builtin_goacc_parlevel_id_size): Handle null target
18411 if ignore == 0.
18412
18413 2018-05-04 Richard Biener <rguenther@suse.de>
18414
18415 PR middle-end/85627
18416 * tree-complex.c (update_complex_assignment): We are always in SSA form.
18417 (expand_complex_div_wide): Likewise.
18418 (expand_complex_operations_1): Likewise.
18419 (expand_complex_libcall): Preserve EH info of the original stmt.
18420 (tree_lower_complex): Handle removed blocks.
18421 * tree.c (build_common_builtin_nodes): Do not set ECF_NOTRHOW
18422 on complex multiplication and division libcall builtins.
18423
18424 2018-05-04 Richard Biener <rguenther@suse.de>
18425
18426 PR middle-end/85574
18427 * fold-const.c (negate_expr_p): Restrict negation of operand
18428 zero of a division to when we know that can happen without
18429 overflow.
18430 (fold_negate_expr_1): Likewise.
18431
18432 2018-05-04 Jakub Jelinek <jakub@redhat.com>
18433
18434 PR libstdc++/85466
18435 * real.h (real_nextafter): Declare.
18436 * real.c (real_nextafter): New function.
18437 * fold-const-call.c (fold_const_nextafter): New function.
18438 (fold_const_call_sss): Call it for CASE_CFN_NEXTAFTER and
18439 CASE_CFN_NEXTTOWARD.
18440 (fold_const_call_1): For CASE_CFN_NEXTTOWARD call fold_const_call_sss
18441 even when arg1_mode is different from arg0_mode.
18442
18443 2018-05-03 Nathan Sidwell <nathan@acm.org>
18444
18445 * doc/extend.texi (Deprecated Features): Remove
18446 -ffriend-injection.
18447 (Backwards Compatibility): Likewise.
18448 * doc/invoke.texi (C++ Language Options): Likewise.
18449 (C++ Dialect Options): Likewise.
18450
18451 2018-05-03 Jakub Jelinek <jakub@redhat.com>
18452
18453 PR target/85530
18454 * config/i386/avx512fintrin.h (_mm512_mullox_epi64,
18455 _mm512_mask_mullox_epi64): New intrinsics.
18456
18457 2018-05-03 Tom de Vries <tom@codesourcery.com>
18458
18459 PR testsuite/85106
18460 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
18461 dump files): Add offload-tree.
18462
18463 2018-05-03 Richard Biener <rguenther@suse.de>
18464
18465 PR tree-optimization/85615
18466 * tree-ssa-threadupdate.c (thread_block_1): Only allow exits
18467 to loops not nested in BBs loop father to avoid creating multi-entry
18468 loops.
18469
18470 2018-05-03 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
18471
18472 PR tree-optimization/70291
18473 * tree-complex.c (expand_complex_libcall): Add type, inplace_p
18474 arguments. Change return type to tree. Emit libcall as a new
18475 statement rather than replacing existing one when inplace_p is true.
18476 (expand_complex_multiplication_components): New function.
18477 (expand_complex_multiplication): Expand floating-point complex
18478 multiplication using the above.
18479 (expand_complex_division): Rename inner_type parameter to type.
18480 Update expand_complex_libcall call-site.
18481 (expand_complex_operations_1): Update expand_complex_multiplication
18482 and expand_complex_division call-sites.
18483
18484 2018-05-02 Jakub Jelinek <jakub@redhat.com>
18485
18486 PR target/85582
18487 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
18488 *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
18489 *<shift_insn><dwi>3_doubleword_mask_1): In condition require that
18490 the highest significant bit of the shift count mask is clear. In
18491 check whether and[sq]i3 is needed verify that all significant bits
18492 of the shift count other than the highest are set.
18493
18494 2018-05-02 Tom de Vries <tom@codesourcery.com>
18495
18496 PR libgomp/82428
18497 * builtins.def (DEF_GOACC_BUILTIN_ONLY): Define.
18498 * omp-builtins.def (BUILT_IN_GOACC_PARLEVEL_ID)
18499 (BUILT_IN_GOACC_PARLEVEL_SIZE): New builtin.
18500 * builtins.c (expand_builtin_goacc_parlevel_id_size): New function.
18501 (expand_builtin): Call expand_builtin_goacc_parlevel_id_size.
18502 * doc/extend.texi (Other Builtins): Add __builtin_goacc_parlevel_id and
18503 __builtin_goacc_parlevel_size.
18504
18505 2018-05-02 Richard Biener <rguenther@suse.de>
18506
18507 PR tree-optimization/85597
18508 * tree-vect-stmts.c (vectorizable_operation): For ternary SLP
18509 do not use split vect_get_vec_defs call but call vect_get_slp_defs
18510 directly.
18511
18512 2018-05-02 Tom de Vries <tom@codesourcery.com>
18513
18514 PR testsuite/85106
18515 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
18516 dump files): Add ltrans-tree.
18517
18518 2018-05-02 Tom de Vries <tom@codesourcery.com>
18519
18520 PR testsuite/85106
18521 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
18522 dump files): Add wpa-ipa.
18523
18524 2018-05-02 Segher Boessenkool <segher@kernel.crashing.org>
18525
18526 * config.gcc (powerpc*-*-*): Remove paired.h. Unsupport the
18527 powerpc*-*-linux*paired* target.
18528 * config/rs6000/750cl.h: Delete.
18529 * config/rs6000/paired.h: Delete.
18530 * config/rs6000/paired.md: Delete.
18531 * config/rs6000/predicates.md (easy_vector_constant): Remove paired
18532 float support.
18533 * config/rs6000/rs6000-builtin.def: Remove paired float support.
18534 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Update
18535 comment. Remove paired float support.
18536 * config/rs6000/rs6000-modes.def: Remove V2SF and V2SI.
18537 * config/rs6000/rs6000-opts.h (enum rs6000_vector): Delete
18538 VECTOR_PAIRED.
18539 * config/rs6000/rs6000-protos.h (paired_expand_vector_init,
18540 paired_emit_vector_cond_expr, paired_expand_vector_move): Delete
18541 declarations.
18542 * config/rs6000/rs6000.c: Remove paired float support.
18543 (paired_expand_vector_init, paired_expand_vector_move,
18544 paired_emit_vector_compare, paired_emit_vector_cond_expr,
18545 (paired_expand_lv_builtin, paired_expand_stv_builtin,
18546 paired_expand_builtin, paired_expand_predicate_builtin,
18547 paired_init_builtins): Delete.
18548 * config/rs6000/rs6000.h: Remove paired float support.
18549 * config/rs6000/rs6000.md: Remove paired float support.
18550 (move_from_CR_ov_bit): Delete.
18551 * config/rs6000/rs6000.opt (mpaired): Delete.
18552 * config/rs6000/t-rs6000: Remove paired.md from MD_INCLUDES.
18553 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mpaired.
18554
18555 2018-05-02 Richard Biener <rguenther@suse.de>
18556
18557 PR middle-end/85567
18558 * gimplify.c (gimplify_save_expr): When in SSA form allow
18559 SAVE_EXPRs to compute to SSA vars.
18560
18561 2018-05-02 Jakub Jelinek <jakub@redhat.com>
18562
18563 PR target/85582
18564 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
18565 *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
18566 *<shift_insn><dwi>3_doubleword_mask_1): If and[sq]i3 is needed, don't
18567 clobber operands[2], instead use a new pseudo. Formatting fixes.
18568
18569 2018-05-02 Richard Sandiford <richard.sandiford@linaro.org>
18570
18571 PR tree-optimization/85586
18572 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence): Only
18573 exit early for statements in the same group if the accesses are
18574 not strided.
18575
18576 2018-05-02 Tom de Vries <tom@codesourcery.com>
18577
18578 PR lto/85451
18579 * lto-wrapper.c (compile_offload_image): Add "could not find mkoffload"
18580 error message.
18581
18582 2018-05-01 Marc Glisse <marc.glisse@inria.fr>
18583
18584 PR tree-optimization/85143
18585 * match.pd (A<B&A<C): Extend to BIT_IOR_EXPR.
18586
18587 2018-05-01 Tom de Vries <tom@codesourcery.com>
18588
18589 PR lto/85451
18590 * config/nvptx/mkoffload.c (main): Suggest using -B in "offload compiler
18591 not found" error message.
18592
18593 2018-05-01 Tom de Vries <tom@codesourcery.com>
18594
18595 PR other/83786
18596 * vec.h (VEC_ORDERED_REMOVE_IF, VEC_ORDERED_REMOVE_IF_FROM_TO): Define.
18597 * vec.c (test_ordered_remove_if): New function.
18598 (vec_c_tests): Call test_ordered_remove_if.
18599 * dwarf2cfi.c (connect_traces): Use VEC_ORDERED_REMOVE_IF_FROM_TO.
18600 * lto-streamer-out.c (prune_offload_funcs): Use VEC_ORDERED_REMOVE_IF.
18601 * tree-vect-patterns.c (vect_pattern_recog_1): Use
18602 VEC_ORDERED_REMOVE_IF.
18603
18604 2018-05-01 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
18605
18606 PR tree-optimization/82665
18607 * vr-values.c (vr_values::extract_range_from_binary_expr): Handle
18608 pointer subtraction where arguments come from a memchr call.
18609
18610 2018-05-01 Jakub Jelinek <jakub@redhat.com>
18611
18612 * configure.ac (LD_AS_NEEDED_OPTION, LD_NO_AS_NEEDED_OPTION): Use
18613 --push-state --as-needed and --pop-state instead of --as-needed and
18614 --no-as-needed if ld supports it.
18615 * configure: Regenerated.
18616
18617 PR web/85578
18618 * doc/install.texi2html: Replace _002d with - and _002a with * in
18619 generated html files using sed.
18620
18621 2018-04-30 David Malcolm <dmalcolm@redhat.com>
18622
18623 PR c++/85523
18624 * gcc-rich-location.c (blank_line_before_p): New function.
18625 (use_new_line): New function.
18626 (gcc_rich_location::add_fixit_insert_formatted): New function.
18627 * gcc-rich-location.h
18628 (gcc_rich_location::add_fixit_insert_formatted): New function.
18629
18630 2018-04-30 David Malcolm <dmalcolm@redhat.com>
18631
18632 * selftest.c (assert_streq): Rename "expected" and "actual" to
18633 "val1" and "val2". Extend NULL-handling to cover both inputs
18634 symmetrically, while still requiring both to be non-NULL for a pass.
18635 * selftest.h (assert_streq): Rename "expected" and "actual" to
18636 "val1" and "val2".
18637 (ASSERT_EQ): Likewise.
18638 (ASSERT_EQ_AT): Likewise.
18639 (ASSERT_KNOWN_EQ): Likewise.
18640 (ASSERT_KNOWN_EQ_AT): Likewise.
18641 (ASSERT_NE): Likewise.
18642 (ASSERT_MAYBE_NE): Likewise.
18643 (ASSERT_MAYBE_NE_AT): Likewise.
18644 (ASSERT_STREQ): Likewise. Clarify that both must be non-NULL for
18645 the assertion to pass.
18646 (ASSERT_STREQ_AT): Likewise.
18647
18648 2018-04-30 Jonathan Wakely <jwakely@redhat.com>
18649
18650 * doc/invoke.texi (-fpie, -fPIE): Fix grammar and clarify
18651 interaction with -pie.
18652
18653 2018-04-30 David Malcolm <dmalcolm@redhat.com>
18654
18655 * selftest.h: Fix alphabetization of per-source-file selftest
18656 declarations.
18657
18658 2018-04-30 Jason Merrill <jason@redhat.com>
18659
18660 PR c++/61982 - dead stores to destroyed objects.
18661 * gimplify.c (gimplify_modify_expr): Simplify complex lvalue on LHS
18662 of clobber.
18663
18664 2018-04-30 Jason Merrill <jason@redhat.com>
18665
18666 * tree.c (build_clobber): New.
18667 * tree.h: Declare it.
18668 * gimplify.c (gimplify_bind_expr, gimplify_target_expr): Use it.
18669
18670 2018-04-30 David Malcolm <dmalcolm@redhat.com>
18671
18672 * diagnostic-show-locus.c (layout::layout): Update for
18673 location_get_source_line returning a char_span.
18674 (struct char_span): Move to input.h.
18675 (struct correction): Update for fields in char_span becoming
18676 private.
18677 (struct source_line): Update for location_get_source_line
18678 returning a char_span.
18679 (layout::print_line): Likewise.
18680 * edit-context.c (edited_file::print_content): Likewise.
18681 (edited_file::print_diff_hunk): Likewise.
18682 (edited_file::print_run_of_changed_lines): Likewise.
18683 (edited_file::get_num_lines): Likewise.
18684 (edited_line::edited_line): Likewise.
18685 * final.c (asm_show_source): Likewise.
18686 * input.c (location_get_source_line): Convert return type
18687 from const char * to char_span, losing the final "line_len"
18688 param.
18689 (dump_location_info): Update for the above.
18690 (get_substring_ranges_for_loc): Likewise. Use a char_span
18691 when handling the literal within the line.
18692 (test_reading_source_line): Update for location_get_source_line
18693 returning a char_span.
18694 * input.h (class char_span): Move here from
18695 diagnostic-show-locus.c, converting from a struct to a class.
18696 Make data members private.
18697 (char_span::operator bool): New.
18698 (char_span::length): New.
18699 (char_span::get_buffer): New.
18700 (char_span::operator[]): New.
18701 (char_span::subspan): Make const.
18702 (char_span::xstrdup): New.
18703 (location_get_source_line): Convert return type from const char *
18704 to char_span, losing the final "line_size" param.
18705
18706 2018-04-30 Jan Hubicka <jh@suse.cz>
18707
18708 * lto-wrapper.c (ltrans_priorities): New static var.
18709 (cmp_priority): New.
18710 (run_gcc): Read priorities and if doing parallel build order
18711 the Makefile by them.
18712
18713 2018-04-30 David Malcolm <dmalcolm@redhat.com>
18714
18715 * input.h (builtins_location_check): Convert to a STATIC_ASSERT.
18716
18717 2018-04-30 Richard Biener <rguenther@suse.de>
18718
18719 * tree-cfg.c (verify_address): Remove base argument, add
18720 flag whether to check TREE_ADDRESSABLE and do that.
18721 (verify_expr): Remove.
18722 (verify_types_in_gimple_reference): Add pieces from verify_expr.
18723 (verify_gimple_assign_single): Likewise.
18724 (verify_gimple_switch): Likewise.
18725 (verify_expr_location_1): Dereference tp once. Add (disabled)
18726 piece from verify_expr.
18727 (verify_gimple_in_cfg): Do not call verify_expr on all ops.
18728
18729 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
18730
18731 * config/arc/linux.h (CLEAR_INSN_CACHE): Define.
18732
18733 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
18734
18735 * config/arc/arc-protos.h (prepare_extend_operands): Remove.
18736 (small_data_pattern): Likewise.
18737 (arc_rewrite_small_data): Likewise.
18738 * config/arc/arc.c (LEGITIMATE_SMALL_DATA_OFFSET_P): Remove.
18739 (LEGITIMATE_SMALL_DATA_ADDRESS_P): Likewise.
18740 (get_symbol_alignment): New function.
18741 (legitimate_small_data_address_p): Likewise.
18742 (legitimate_scaled_address): Update, call
18743 legitimate_small_data_address_p.
18744 (output_sdata): New static variable.
18745 (arc_print_operand): Update how we handle small data operands.
18746 (arc_print_operand_address): Likewise.
18747 (arc_legitimate_address_p): Update, use
18748 legitimate_small_data_address_p.
18749 (arc_rewrite_small_data_p): Remove.
18750 (arc_rewrite_small_data_1): Likewise.
18751 (arc_rewrite_small_data): Likewise.
18752 (small_data_pattern): Likewise.
18753 (compact_sda_memory_operand): Update to use
18754 legitimate_small_data_address_p and get_symbol_alignment.
18755 (prepare_move_operands): Don't rewite sdata pattern.
18756 (prepare_extend_operands): Remove.
18757 * config/arc/arc.md (zero_extendqihi2): Don't rewrite sdata
18758 pattern.
18759 (zero_extendqisi2): Likewise.
18760 (zero_extendhisi2): Likewise.
18761 (extendqihi2): Likewise.
18762 (extendqisi2): Likewise.
18763 (extendhisi2): Likewise.
18764 (addsi3): Likewise.
18765 (subsi3): Likewise.
18766 (andsi3): Likewise.
18767 * config/arc/constraints.md (Usd): Change it to memory constraint.
18768
18769 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
18770
18771 * config/arc/arc.c (arc_split_move): Allow signed 6-bit constants
18772 as source of std instructions.
18773 * config/arc/arc.md (movsi_insn): Update pattern predicate to
18774 allow 6-bit constants as source for store instructions.
18775 (movdi_insn): Update instruction pattern to allow 6-bit constants
18776 as source for store instructions.
18777
18778 2018-04-30 Jonathan Wakely <jwakely@redhat.com>
18779
18780 * doc/invoke.texi (-fdebug-types-section): Fix grammar.
18781
18782 2018-04-30 Nathan Sidwell <nathan@acm.org>
18783 Sandra Loosemore <sandra@codesourcery.com>
18784
18785 * dumpfile.c (dump_open): Allow '-' for stdout.
18786 * doc/invoke.texi (Developer Options): Document dump filename
18787 determination early. Document stdin/stdout selection.
18788
18789 2018-04-30 Andrew Sadek <andrew.sadek.se@gmail.com>
18790
18791 Microblaze Target: PIC data text relative
18792
18793 * config/microblaze/microblaze.opt: add new option -mpic-data-text-rel.
18794 * config/microblaze/microblaze-protos.h (microblaze_constant_address_p):
18795 Add declaration.
18796 * config/microblaze/microblaze.h (microblaze_constant_address_p):
18797 CONSTANT_ADDRESS_P definition to microblaze_constant_address_p.
18798 * config/microblaze/microblaze.c (TARGET_PIC_DATA_TEXT_REL):
18799 New addressing mode for data-text relative position indepenedent code.
18800 (microblaze_classify_unspec): add 'UNSPEC_TEXT' case ->
18801 'ADDRESS_SYMBOLIC_TXT_REL'.
18802 (microblaze_classify_address): Add handling for UNSPEC + CONST_INT.
18803 (microblaze_legitimate_pic_operand): Exclude function calls from
18804 pic operands in case of TARGET_PIC_DATA_TEXT_REL option.
18805 (microblaze_legitimize_address): Generate 'UNSPEC_TEXT' for all possible
18806 addresses cases.
18807 (microblaze_address_insns): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
18808 (print_operand): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
18809 (print_operand_address): Add 'ADDRESS_SYMBOLIC_TXT_REL' case + handling
18810 for 'address + offset'.
18811 (microblaze_expand_prologue): Add new function prologue call for
18812 'r20' assignation.
18813 (microblaze_asm_generate_pic_addr_dif_vec): Override new target hook
18814 'TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC' to disable address diff vector
18815 table in case of TARGET_PIC_DATA_TEXT_REL.
18816 (expand_pic_symbol_ref): Add handling for 'UNSPEC_TEXT'.
18817 * config/microblaze/microblaze.md (TARGET_PIC_DATA_TEXT_REL):
18818 Add new macros 'UNSPEC_TEXT',
18819 'UNSPEC_SET_TEXT' + add rule for setting r20 in function prologue
18820 + exclude function calls from 'UNSPEC_PLT' in case of data text
18821 relative mode.
18822 * doc/tm.texi.in (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
18823 new target hook for generating address diff vector tables in case of
18824 flag_pic.
18825 * doc/tm.texi : Regenerate.
18826 * stmt.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Append new condition
18827 'targetm.asm_out.generate_pic_addr_diff_vec' to flag_pic in case
18828 of addr diff vector generation.
18829 * target.def (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
18830 target hook definition.
18831 * targhooks.h, targhooks.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC):
18832 Add default function for generate_pic_addr_diff_vec -> flag_pic.
18833 * doc/invoke.texi (Add new pic option): Add new microblaze pic
18834 option for data text relative.
18835
18836 2018-04-30 Richard Biener <rguenther@suse.de>
18837
18838 * tree-chrec.h (evolution_function_is_constant_p): Remove
18839 redundant check.
18840 * tree-cfg.c (tree_node_can_be_shared): Re-order checks.
18841
18842 2018-04-30 Richard Biener <rguenther@suse.de>
18843
18844 PR bootstrap/85571
18845 * dwarf2out.c (gen_producer_string): Ignore -fchecking[=].
18846
18847 2018-04-30 Richard Biener <rguenther@suse.de>
18848
18849 PR tree-optimization/28364
18850 PR tree-optimization/85275
18851 * tree-ssa-loop-ch.c (ch_base::copy_headers): Stop after
18852 copying first exit test.
18853
18854 2018-04-28 Mark Wielaard <mark@klomp.org>
18855
18856 * dwarf2out.c (dwarf2out_finish): Add .debug_addr table header for
18857 dwarf_version >= 5.
18858 (dwarf_AT): Handle DW_AT_addr_base.
18859 (add_top_level_skeleton_die_attrs): Use dwarf_AT for DW_AT_addr_base.
18860
18861 2018-04-28 Uros Bizjak <ubizjak@gmail.com>
18862
18863 PR target/84431
18864 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask): New pattern.
18865 (*ashl<dwi>3_doubleword_mask_1): Ditto.
18866 (*<shift_insn><dwi>3_doubleword_mask): Ditto.
18867 (*<shift_insn><dwi>3_doubleword_mask_1): Ditto.
18868
18869 2018-04-28 Richard Biener <rguenther@suse.de>
18870
18871 * tree-cfg.c (verify_gimple_phi): Take a gphi * argument.
18872 (verify_gimple_in_cfg): Rename visited_stmts to visited_throwing_stmts
18873 to reflect use. Only add interesting stmts.
18874
18875 2018-04-27 Martin Jambor <mjambor@suse.cz>
18876
18877 PR ipa/85549
18878 * ipa-cp.c (find_aggregate_values_for_callers_subset): Make sure
18879 the jump function allows for passing through aggregate values.
18880
18881 2018-04-27 David Malcolm <dmalcolm@redhat.com>
18882
18883 * input.h (in_system_header_at): Convert from macro to inline
18884 function.
18885 (from_macro_expansion_at): Likewise.
18886 (from_macro_definition_at): Likewise.
18887
18888 2018-04-27 Jeff Law <law@redhat.com>
18889
18890 * config.gcc: Mark tile* targets as deprecated/obsolete.
18891
18892 2018-04-27 Richard Biener <rguenther@suse.de>
18893
18894 * config/aarch64/aarch64.c: Simplify ap.__stack advance and
18895 fix for ILP32.
18896
18897 2018-04-27 Richard Biener <rguenther@suse.de>
18898
18899 * tree-cfg.c (verify_expr): Make dead code hit gcc_unreachable.
18900
18901 2018-04-27 Uros Bizjak <ubizjak@gmail.com>
18902
18903 * config/i386/i386.md (*movti_internal): Substitute Ye constraint
18904 with Yd constraint. Set "preferred_for_speed" attribute from
18905 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for alternatives
18906 with Yd constraint.
18907 (*movdi_internal): Ditto.
18908 (movti_interunit splitters): Remove
18909 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC from insn condition.
18910 (movdi_interunit splitters): Ditto.
18911 * config/i386/constraints.md (Ye): Remove.
18912 (Yd): Do not depend on TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC.
18913
18914 2018-04-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
18915
18916 PR target/85512
18917 * config/aarch64/constraints.md (Usg): Limit to 31.
18918 (Usj): Limit to 63.
18919
18920 2018-04-27 Jakub Jelinek <jakub@redhat.com>
18921
18922 PR tree-optimization/85529
18923 * tree-ssa-reassoc.c (optimize_range_tests_var_bound): Add FIRST_BB
18924 argument. Don't call get_nonzero_bits if opcode is ERROR_MARK_NODE,
18925 rhs2 def stmt's bb is dominated by first_bb and it isn't an obvious
18926 zero extension or masking of the MSB bit.
18927 (optimize_range_tests): Add FIRST_BB argument, pass it through
18928 to optimize_range_tests_var_bound.
18929 (maybe_optimize_range_tests, reassociate_bb): Adjust
18930 optimize_range_tests callers.
18931
18932 2018-04-26 Richard Biener <rguenther@suse.de>
18933 Jakub Jelinek <jakub@redhat.com>
18934
18935 * cgraph.h (symbol_table): Just declare debug method here.
18936 * symtab.c (symbol_table::debug): Define.
18937
18938 2018-04-26 Eric Botcazou <ebotcazou@adacore.com>
18939
18940 * loop-invariant.c (may_assign_reg_p): Return false for frame pointer.
18941
18942 2018-04-26 Uros Bizjak <ubizjak@gmail.com>
18943
18944 * config/i386/i386.md ("isa" attribute): Add x64_sse2.
18945 ("enabled" attribute): Handle x64_sse2 "isa" attribute.
18946 (*movdi_internal): Substitute Yi and Yj constraint with x
18947 and Ym and Yn constraint with y constraint. Update "isa"
18948 attribute and set "preferred_for_speed" attribute from
18949 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for updated alternatives.
18950 (*movsi_internal): Ditto.
18951 (*movdf_internal): Ditto.
18952 (*movsf_internal): Ditto.
18953 (*zero_extendsidi2): Ditto.
18954 * config/i386/sse.md (vec_set<mode>_0): Ditto.
18955 (sse2_loadld): Ditto.
18956 (*vec_extract<ssevecmodelower>_0): Ditto.
18957 (*vec_extractv4si_0_zext_sse4): Ditto.
18958 (vec_concatv2di): Ditto.
18959 (*vec_dup<mode>): Ditto.
18960 * config/i386/mmx.md (*mov<mode>_internal): Ditto.
18961 * config/i386/constraints.md (Yi): Remove.
18962 (Yj): Remove.
18963 (Ym): Remove.
18964 (Yn): Remove.
18965
18966 2018-04-26 Nathan Sidwell <nathan@acm.org>
18967
18968 * dumpfile.c (dump_open): New.
18969 (dump_open_alternate_stream, dump_start, dump_begin): Call it.
18970 (dump_finish): Detect stdio/stderr by value not name.
18971
18972 2018-04-26 Jonathan Wakely <jwakely@redhat.com>
18973
18974 * doc/invoke.texi (-Wreturn-type): Document default status for C++.
18975
18976 2018-04-26 Tom de Vries <tom@codesourcery.com>
18977
18978 PR target/84952
18979 * config/nvptx/nvptx.c (verify_neutering_jumps)
18980 (verify_neutering_labels): New function
18981 (nvptx_single): Use verify_neutering_jumps and verify_neutering_labels.
18982
18983 2018-04-26 Tom de Vries <tom@codesourcery.com>
18984
18985 PR target/84025
18986 * config/nvptx/nvptx.c (needs_neutering_p): New function.
18987 (nvptx_single): Use needs_neutering_p to skip over insns that do not
18988 need neutering.
18989
18990 2018-04-26 Richard Biener <rguenther@suse.de>
18991 Tom de Vries <tom@codesourcery.com>
18992
18993 PR lto/85422
18994 * lto-streamer-out.c (output_function): Fixup loops if required to match
18995 discovery done in the reader.
18996
18997 2018-04-26 Richard Biener <rguenther@suse.de>
18998
18999 PR tree-optimization/85116
19000 * tree-ssa-loop-ch.c (do_while_loop_p): A do-while loop should
19001 have a loop exit from the single latch predecessor. Remove
19002 case of header with just condition.
19003 (ch_base::copy_headers): Exclude infinite loops from any
19004 processing.
19005 (pass_ch::execute): Record exits.
19006
19007 2018-04-26 Richard Biener <rguenther@suse.de>
19008
19009 * tree-vect-data-refs.c (vect_get_data_access_cost): Get
19010 prologue cost vector and pass it to vect_get_load_cost.
19011 (vect_get_peeling_costs_all_drs): Likewise.
19012 (vect_peeling_hash_get_lowest_cost): Likewise.
19013 (vect_enhance_data_refs_alignment): Likewise.
19014
19015 2018-04-26 Richard Biener <rguenther@suse.de>
19016
19017 PR middle-end/85450
19018 * tree-cfg.c (verify_gimple_assign_unary): Restore proper
19019 checking of integer<->pointer conversions.
19020 * omp-expand.c (expand_omp_for_static_nochunk): Avoid
19021 sign-/zero-extending pointer types.
19022 (expand_omp_for_static_chunk): Likewise.
19023
19024 2018-03-22 Hans-Peter Nilsson <hp@axis.com>
19025 Jean Lee <xiaoyur347@gmail.com>
19026
19027 * config/mips/mips.c (mips_asan_shadow_offset): New function.
19028 (TARGET_ASAN_SHADOW_OFFSET): Define.
19029 * config/mips/mips.h (FRAME_GROWS_DOWNWARD): Augment to also be
19030 true for -fsanitize=address.
19031
19032 2018-04-25 Mark Wielaard <mark@klomp.org>
19033
19034 * dwarf2out.c (file_info_cmp): Sort longer dir prefixes before
19035 shorter ones.
19036
19037 2018-04-25 Jakub Jelinek <jakub@redhat.com>
19038
19039 * config/i386/i386.md (*x86_mov<mode>cc_0_m1): Use type "alu1" rather
19040 than "alu", remove explicit "memory" and "imm_disp" attributes.
19041 (*x86_mov<mode>cc_0_m1_se, *x86_mov<mode>cc_0_m1_neg): Likewise.
19042
19043 PR middle-end/85414
19044 * simplify-rtx.c (simplify_unary_operation_1) <case SIGN_EXTEND,
19045 case ZERO_EXTEND>: Pass SUBREG_REG (op) rather than op to
19046 gen_lowpart_no_emit.
19047
19048 2018-04-25 Sebastian Peryt <sebastian.peryt@intel.com>
19049
19050 PR target/85473
19051 * config/i386/i386.c (ix86_expand_builtin): Change memory
19052 operand to XI, extend p0 to Pmode.
19053 * config/i386/i386.md: Change unspec volatile and operand
19054 1 mode to XI, change operand 0 mode to P.
19055
19056 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
19057
19058 * config/nds32/nds32-predicates.c (nds32_can_use_bclr_p): Mask with
19059 GET_MODE_MASK before any checking.
19060 (nds32_can_use_bset_p): Likewise.
19061 (nds32_can_use_btgl_p): Likewise.
19062
19063 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
19064
19065 * config/nds32/nds32-doubleword.md: New define_split pattern for
19066 illegal register number.
19067
19068 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
19069
19070 * config/nds32/nds32.c (nds32_print_operand): Set op_value ealier.
19071
19072 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
19073
19074 * config/nds32/nds32.h (ASM_APP_ON): Add missing newline character.
19075
19076 2018-04-25 Richard Biener <rguenther@suse.de>
19077
19078 * lto-streamer.h (LTO_major_version): Bump to 8.
19079
19080 2018-04-25 Jakub Jelinek <jakub@redhat.com>
19081
19082 * BASE-VER: Set to 9.0.0.
19083
19084 2018-04-24 Segher Boessenkool <segher@kernel.crashing.org>
19085
19086 * config/rs6000/rs6000.c (init_float128_ieee): Fix spelling mistakes
19087 in __abskf2 and __powikf2.
19088
19089 2018-04-24 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
19090
19091 PR target/85512
19092 * config/aarch64/constraints.md (Usg, Usj): New constraints.
19093 * config/aarch64/iterators.md (cmode_simd): New mode attribute.
19094 * config/aarch64/aarch64.md (*aarch64_ashr_sisd_or_int_<mode>3):
19095 Use the above on operand 2. Reindent.
19096 (*aarch64_lshr_sisd_or_int_<mode>3): Likewise.
19097
19098 2018-04-24 H.J. Lu <hongjiu.lu@intel.com>
19099
19100 PR target/85485
19101 * common/config/i386/i386-common.c (ix86_handle_option): Don't
19102 handle OPT_mcet.
19103 * config/i386/i386.opt (mcet): Removed.
19104 * doc/install.texi: Remove -mcet documentation.
19105 * doc/invoke.texi: Likewise.
19106
19107 2018-04-24 H.J. Lu <hongjiu.lu@intel.com>
19108
19109 PR target/85485
19110 * doc/install.texi: Remove -mcet from bootstrap-cet.
19111
19112 2018-04-24 Jakub Jelinek <jakub@redhat.com>
19113
19114 PR target/85511
19115 * config/i386/i386.c (ix86_init_mmx_sse_builtins): Don't define
19116 __builtin_ia32_readeflags_u32 and __builtin_ia32_writeeflags_u32
19117 if TARGET_64BIT.
19118
19119 PR target/85503
19120 * config/rs6000/rs6000-p8swap.c (const_load_sequence_p): Punt if
19121 const_vector is not CONST_VECTOR or SYMBOL_REF for a constant pool
19122 containing a CONST_VECTOR.
19123
19124 2018-04-24 Cesar Philippidis <cesar@codesourcery.com>
19125
19126 * doc/install.texi: Update newlib dependency for nvptx.
19127
19128 2018-04-24 Jakub Jelinek <jakub@redhat.com>
19129
19130 PR target/85508
19131 * config/i386/i386.c (ix86_expand_vector_init_one_var): Use UINTVAL
19132 instead of INTVAL when shifting x left.
19133
19134 2018-04-24 Andreas Krebbel <krebbel@linux.ibm.com>
19135
19136 PR tree-optimization/85478
19137 * tree-vect-loop.c (vect_analyze_loop_2): Do not call
19138 vect_grouped_store_supported for single element vectors.
19139
19140 2018-04-24 Richard Biener <rguenther@suse.de>
19141
19142 PR target/85491
19143 * config/i386/i386.c (ix86_add_stmt_cost): Restrict strided
19144 load cost increase to the case of non-constant step.
19145
19146 2018-04-24 Jakub Jelinek <jakub@redhat.com>
19147
19148 PR target/84828
19149 * reg-stack.c (move_for_stack_reg): Don't fail assertion about dead
19150 destination if any_malformed_asm.
19151
19152 2018-04-23 Eric Botcazou <ebotcazou@adacore.com>
19153
19154 PR middle-end/85496
19155 * expr.c (store_field): In the bitfield case, if the value comes from
19156 a function call and is returned in registers by means of a PARALLEL,
19157 do not change the mode of the temporary unless BLKmode and VOIDmode.
19158
19159 2018-04-23 Andrey Belevantsev <abel@ispras.ru>
19160
19161 PR rtl-optimization/85423
19162 * sel-sched-ir.c (has_dependence_note_mem_dep): Only discard
19163 dependencies to debug insns when the previous insn is non-debug.
19164
19165 2018-04-23 Claudiu Zissulescu <claziss@synopsys.com>
19166
19167 * config/arc/arc.md ("vunspec"): Delete it, unify all the unspec
19168 enums into a single definition.
19169 (fls): Fix predicates and printing.
19170 (seti): Likewise.
19171
19172 2018-04-23 Claudiu Zissulescu <claziss@synopsys.com>
19173
19174 * config/arc/arc-protos.h (check_if_valid_sleep_operand): Remove.
19175 * config/arc/arc.c (arc_expand_builtin): Sleep accepts registers
19176 and short u6 immediate.
19177 (check_if_valid_sleep_operand): Remove.
19178 * config/arc/arc.md (Sleep): Accepts registers and u6 immediates.
19179
19180 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
19181
19182 * config/nds32/nds32.c (nds32_compute_stack_frame): Consider
19183 flag_always_save_lp condition.
19184 * config/nds32/nds32.opt (malways-save-lp): New option.
19185
19186 2018-04-22 Shiva Chen <shiva0217@gmail.com>
19187
19188 * config/nds32/nds32-protos.h (nds32_use_load_post_increment): Declare.
19189 * config/nds32/nds32.c (nds32_use_load_post_increment): New.
19190 * config/nds32/nds32.h
19191 (USE_LOAD_POST_INCREMENT, USE_LOAD_POST_DECREMENT): Define.
19192 (USE_STORE_POST_INCREMENT, USE_STORE_POST_DECREMENT): Define.
19193
19194 2018-04-22 Shiva Chen <shiva0217@gmail.com>
19195
19196 * config/nds32/nds32-protos.h (nds32_ls_333_p): Remove.
19197 * config/nds32/nds32.c (nds32_ls_333_p): Remove.
19198
19199 2018-04-22 Shiva Chen <shiva0217@gmail.com>
19200 Chung-Ju Wu <jasonwucj@gmail.com>
19201
19202 * config/nds32/nds32-protos.h (nds32_case_vector_shorten_mode):
19203 Declare.
19204 * config/nds32/nds32.c (nds32_case_vector_shorten_mode): New function.
19205 * config/nds32/nds32.h (CASE_VECTOR_SHORTEN_MODE): Modify.
19206
19207 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
19208
19209 * config/nds32/nds32.c (nds32_compute_stack_frame): Fix wrong value.
19210
19211 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
19212
19213 * config/nds32/nds32-protos.h (nds32_data_alignment,
19214 nds32_local_alignment): Declare.
19215 * config/nds32/nds32.c (nds32_data_alignment, nds32_constant_alignment,
19216 nds32_local_alignment): New functions.
19217 (TARGET_CONSTANT_ALIGNMENT): Define.
19218 * config/nds32/nds32.h (DATA_ALIGNMENT, LOCAL_ALIGNMENT): Define.
19219
19220 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
19221
19222 * config/nds32/nds32.c
19223 (TARGET_HARD_REGNO_MODE_OK): Move to the bottom of file.
19224 (TARGET_MODES_TIEABLE_P): Likewise.
19225
19226 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
19227
19228 * config/nds32/nds32.c (nds32_asm_file_start): Display optimization
19229 level Ofast and Og.
19230
19231 2018-04-22 Monk Chiang <sh.chiang04@gmail.com>
19232 Chung-Ju Wu <jasonwucj@gmail.com>
19233
19234 * config/nds32/constants.md (unspec_volatile_element): Add enum values
19235 for unaligned access.
19236 * config/nds32/nds32-intrinsic.c: Implementation of expanding
19237 unaligned access.
19238 * config/nds32/nds32-intrinsic.md: Likewise.
19239 * config/nds32/nds32_intrinsic.h: Likewise.
19240 * config/nds32/nds32.h (nds32_builtins): Likewise.
19241 * config/nds32/nds32.opt (munaligned-access): New option.
19242 * config/nds32/nds32.c (nds32_asm_file_start): Display
19243 flag_unaligned_access status.
19244
19245 2018-04-20 Kito Cheng <kito.cheng@gmail.com>
19246
19247 * config/riscv/elf.h (LINK_SPEC): Pass --no-relax if
19248 -mno-relax is present.
19249 * config/riscv/linux.h (LINK_SPEC): Ditto.
19250
19251 2018-04-20 Martin Sebor <msebor@redhat.com>
19252
19253 PR c/85365
19254 * gimple-fold.c (gimple_fold_builtin_strcpy): Suppress -Wrestrict
19255 for null pointers.
19256 (gimple_fold_builtin_stxcpy_chk): Same.
19257 * gimple-ssa-warn-restrict.c (check_bounds_or_overlap): Same.
19258
19259 2018-04-20 Michael Meissner <meissner@linux.ibm.com>
19260
19261 PR target/85456
19262 * config/rs6000/rs6000.c (init_float128_ieee): Add support to call
19263 __powikf2 when long double is IEEE 128-bit.
19264
19265 2018-04-20 Kito Cheng <kito.cheng@gmail.com>
19266
19267 * config/riscv/riscv.c (riscv_first_stack_step): Round up min
19268 step to make sure stack always aligned.
19269
19270 2018-04-20 Carl Love <cel@us.ibm.com>
19271
19272 PR target/83402
19273 * config/rs6000/rs6000-c.c (rs6000_gimple_fold_builtin): Add
19274 size check for arg0.
19275
19276 2018-04-20 Nathan Sidwell <nathan@codesourcery.com>
19277 Tom de Vries <tom@codesourcery.com>
19278
19279 PR target/85445
19280 * config/nvptx/nvptx.c (nvptx_emit_forking, nvptx_emit_joining):
19281 Emit insns for calls too.
19282 (nvptx_find_par): Always look for worker-level predecessor insn.
19283 (nvptx_propagate): Add is_call parm, return bool. Copy frame for
19284 calls.
19285 (nvptx_vpropagate, nvptx_wpropagate): Adjust.
19286 (nvptx_process_pars): Propagate frames for calls.
19287
19288 2018-04-20 H.J. Lu <hongjiu.lu@intel.com>
19289
19290 PR target/85469
19291 * common/config/i386/i386-common.c (OPTION_MASK_ISA_IBT_SET):
19292 Removed.
19293 (OPTION_MASK_ISA_IBT_UNSET): Likewise.
19294 (ix86_handle_option): Don't handle OPT_mibt.
19295 * config/i386/cet.h: Check __CET__ instead of __IBT__ and
19296 __SHSTK__.
19297 * config/i386/driver-i386.c (host_detect_local_cpu): Remove
19298 has_ibt and ibt.
19299 * config/i386/i386-c.c (ix86_target_macros_internal): Don't
19300 check OPTION_MASK_ISA_IBT nor flag_cf_protection.
19301 (ix86_target_macros): Define __CET__ with flag_cf_protection
19302 for -fcf-protection.
19303 * config/i386/i386.c (isa2_opts): Remove -mibt.
19304 * config/i386/i386.h (TARGET_IBT): Removed.
19305 (TARGET_IBT_P): Likewise.
19306 (ix86_valid_target_attribute_inner_p): Don't check OPT_mibt.
19307 * config/i386/i386.md (nop_endbr): Don't check TARGET_IBT.
19308 * config/i386/i386.opt (mcet): Update help message.
19309 (mshstk): Likewise.
19310 (mibt): Removed.
19311 * doc/invoke.texi: Remove -mibt. Document __CET__. Document
19312 -mcet as an alias for -mshstk.
19313
19314 2018-04-20 Richard Biener <rguenther@suse.de>
19315
19316 PR middle-end/85475
19317 * match.pd ((X * CST) * Y -> (X * Y) * CST): Avoid exponential
19318 complexity by forcing a single use of the multiply operand.
19319
19320 2018-04-20 Martin Jambor <mjambor@suse.cz>
19321
19322 ipa/85449
19323 * ipa-cp.c (cgraph_edge_brings_value_p): Move check for self-feeding
19324 recursion dependency to only apply to non-clones.
19325
19326 2018-04-20 Martin Jambor <mjambor@suse.cz>
19327
19328 ipa/85447
19329 * ipa-cp.c (create_specialized_node): Check that clones of
19330 self-recursive edges exist during IPA-CP.
19331
19332 2018-04-19 Toon Moene <toon@moene.org>
19333
19334 * doc/invoke.texi: Add -floop-unroll-and-jam to options enabled
19335 by -O3.
19336
19337 2018-04-19 Jakub Jelinek <jakub@redhat.com>
19338
19339 PR tree-optimization/85467
19340 * fold-const.c (fold_ternary_loc) <case BIT_FIELD_REF>: Use
19341 VECTOR_TYPE_P macro. If type is vector type, VIEW_CONVERT_EXPR the
19342 VECTOR_CST element to type.
19343
19344 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
19345
19346 PR target/85397
19347 * config/i386/i386.h (STACK_SAVEAREA_MODE): New.
19348 * config/i386/i386.md (builtin_setjmp_setup): Removed.
19349 (builtin_longjmp): Likewise.
19350 (save_stack_nonlocal): New pattern.
19351 (restore_stack_nonlocal): Likewise.
19352
19353 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
19354
19355 PR target/85404
19356 * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
19357 Replace ASM_OUTPUT_LABEL with fprintf.
19358
19359 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
19360
19361 PR target/85417
19362 * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
19363 Check flag_cf_protection instead of TARGET_IBT and TARGET_SHSTK.
19364 * config/i386/i386-c.c (ix86_target_macros_internal): Also
19365 define __IBT__ and __SHSTK__ for -fcf-protection.
19366 * config/i386/i386.c (pass_insert_endbranch::gate): Don't check
19367 TARGET_IBT.
19368 (ix86_trampoline_init): Likewise.
19369 (x86_output_mi_thunk): Likewise.
19370 (ix86_notrack_prefixed_insn_p): Likewise.
19371 (ix86_option_override_internal): Don't disallow -fcf-protection.
19372 * config/i386/i386.md (rdssp<mode>): Also enable for
19373 -fcf-protection.
19374 (incssp<mode>): Likewise.
19375 (nop_endbr): Likewise.
19376 * config/i386/i386.opt (mcet): Change help message to built-in
19377 functions only.
19378 (mibt): Likewise.
19379 (mshstk): Likewise.
19380 * doc/invoke.texi: Remove -mcet, -mibt and -mshstk condition
19381 on -fcf-protection. Change -mcet, -mibt and -mshstk to only
19382 enable CET built-in functions.
19383
19384 2018-04-19 Sebastian Peryt <sebastian.peryt@intel.com>
19385
19386 * common/config/i386/i386-common.c
19387 (OPTION_MASK_ISA_MOVDIRI_SET, OPTION_MASK_ISA_MOVDIR64B_SET,
19388 OPTION_MASK_ISA_MOVDIRI_UNSET,
19389 OPTION_MASK_ISA_MOVDIR64B_UNSET): New defines.
19390 (ix86_handle_option): Handle -mmovdiri and -mmovdir64b.
19391 * config.gcc (movdirintrin.h): New header.
19392 * config/i386/cpuid.h (bit_MOVDIRI,
19393 bit_MOVDIR64B): New bits.
19394 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mmovdiri
19395 and -mmvodir64b.
19396 * config/i386/i386-builtin-types.def ((VOID, PUNSIGNED, UNSIGNED),
19397 (VOID, PVOID, PCVOID)): New function types.
19398 * config/i386/i386-builtin.def (__builtin_ia32_directstoreu_u32,
19399 __builtin_ia32_directstoreu_u64,
19400 __builtin_ia32_movdir64b): New builtins.
19401 * config/i386/i386-c.c (__MOVDIRI__, __MOVDIR64B__): New.
19402 * config/i386/i386.c (ix86_target_string): Added -mmovdir64b
19403 and -mmovdiri.
19404 (ix86_valid_target_attribute_inner_p): Ditto.
19405 (ix86_expand_special_args_builtin): Added VOID_FTYPE_PUNSIGNED_UNSIGNED
19406 and VOID_FTYPE_PUNSIGNED_UNSIGNED.
19407 (ix86_expand_builtin): Expand IX86_BUILTIN_MOVDIR64B.
19408 * config/i386/i386.h (TARGET_MOVDIRI, TARGET_MOVDIRI_P,
19409 TARGET_MOVDIR64B, TARGET_MOVDIR64B_P): New.
19410 * config/i386/i386.md (UNSPECV_MOVDIRI, UNSPECV_MOVDIR64B): New.
19411 (movdiri<mode>, movdir64b_<mode>): New.
19412 * config/i386/i386.opt: Add -mmovdiri and -mmovdir64b.
19413 * config/i386/immintrin.h: Include movdirintrin.h.
19414 * config/i386/movdirintrin.h: New file.
19415 * doc/invoke.texi: Added -mmovdiri and -mmovdir64b.
19416
19417 2018-04-19 Richard Biener <rguenther@suse.de>
19418
19419 PR middle-end/85455
19420 * cfg.c (clear_bb_flags): When loop state says we have
19421 marked irreducible regions also preserve BB_IRREDUCIBLE_LOOP.
19422
19423 2018-04-19 Richard Biener <rguenther@suse.de>
19424
19425 PR tree-optimization/84737
19426 * tree-vect-data-refs.c (vect_copy_ref_info): New function
19427 copying restrict info.
19428 (vect_setup_realignment): Use it.
19429 * tree-vectorizer.h (vect_copy_ref_info): Declare.
19430 * tree-vect-stmts.c (vectorizable_store): Copy ref info from
19431 the first DR to all generated stores.
19432 (vectorizable_load): Likewise for loads.
19433
19434 2018-04-19 Jakub Jelinek <jakub@redhat.com>
19435
19436 PR tree-optimization/85446
19437 * match.pd ((intptr_t) x eq/ne CST to x eq/ne (typeof x) cst): Require
19438 the integral and pointer types to have the same precision.
19439
19440 * doc/install.texi: Document --disable-cet being the default and
19441 --enable-cet=auto.
19442
19443 2018-04-18 Martin Liska <mliska@suse.cz>
19444
19445 * ipa-devirt.c (odr_subtypes_equivalent_p): Fix GNU coding
19446 style.
19447
19448 2018-04-18 Martin Liska <mliska@suse.cz>
19449
19450 Revert
19451 2018-03-02 Eric Botcazou <ebotcazou@adacore.com>
19452
19453 PR ipa/83983
19454 * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
19455 arguments if they are comparable.
19456
19457 2018-04-18 Martin Liska <mliska@suse.cz>
19458
19459 Revert
19460 2018-03-13 Eric Botcazou <ebotcazou@adacore.com>
19461
19462 PR lto/84805
19463 * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
19464 incomplete types.
19465
19466 2018-04-18 H.J. Lu <hongjiu.lu@intel.com>
19467
19468 PR target/85388
19469 * config/i386/i386.c (ix86_expand_split_stack_prologue): Insert
19470 ENDBR after calling __morestack.
19471
19472 2018-04-18 David Malcolm <dmalcolm@redhat.com>
19473
19474 PR jit/85384
19475 * configure.ac (gcc-driver-name.h): Honor --with-gcc-major-version
19476 by using gcc_base_ver to generate a gcc_driver_version, and use
19477 it when generating GCC_DRIVER_NAME.
19478 * configure: Regenerate.
19479
19480 2018-04-18 Jakub Jelinek <jakub@redhat.com>
19481
19482 PR target/81084
19483 * config.gcc: Obsolete powerpc*-*-*spe*.
19484
19485 2018-04-17 Jakub Jelinek <jakub@redhat.com>
19486
19487 PR debug/84637
19488 * dbxout.c (dbxout_int): Perform negation in unsigned int type.
19489 (stabstr_D): Change type of unum from unsigned int to
19490 unsigned HOST_WIDE_INT. Perform negation in unsigned HOST_WIDE_INT
19491 type.
19492
19493 2018-04-17 Jim Wilson <jimw@sifive.com>
19494
19495 PR 84856
19496 * config/riscv/riscv.c (riscv_compute_frame_info): Add calls to
19497 RISCV_STACK_ALIGN when using outgoing_args_size and pretend_args_size.
19498 Set arg_pointer_offset after using pretend_args_size.
19499
19500 2018-04-17 Jakub Jelinek <jakub@redhat.com>
19501
19502 PR rtl-optimization/85431
19503 * dse.c (record_store): Ignore zero width stores.
19504
19505 PR sanitizer/85230
19506 * asan.c (handle_builtin_stack_restore): Adjust comment. Emit
19507 __asan_allocas_unpoison call and last_alloca_addr = new_sp before
19508 __builtin_stack_restore rather than after it.
19509 * builtins.c (expand_asan_emit_allocas_unpoison): Pass
19510 arg1 + (virtual_dynamic_stack_rtx - stack_pointer_rtx) as second
19511 argument instead of virtual_dynamic_stack_rtx.
19512
19513 2018-04-17 Kelvin Nilsen <kelvin@gcc.gnu.org>
19514
19515 * config/rs6000/rs6000-protos.h (rs6000_builtin_is_supported_p):
19516 New prototype.
19517 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
19518 Add note to error message to explain internal mapping of overloaded
19519 built-in function name to non-overloaded built-in function name.
19520 * config/rs6000/rs6000.c (rs6000_builtin_is_supported_p): New
19521 function.
19522
19523 2018-04-17 Michael Meissner <meissner@linux.vnet.ibm.com>
19524
19525 PR target/85424
19526 * config/rs6000/rs6000.md (pack<mode>): Do not try handle a pack
19527 where the inputs overlap with the output.
19528
19529 2018-04-17 Jakub Jelinek <jakub@redhat.com>
19530
19531 * config/i386/sse.md (vec_extract_lo_<mode><mask_name>): Add
19532 (=v, v) alternative and explicit "memory" attribute.
19533 (vec_extract_lo_<mode><mask_name>): Likewise. Also add
19534 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
19535 attributes.
19536 (vec_extract_lo_<mode><mask_name>): Add (=v, v) alternative and use
19537 "sselog1" type instead of "sselog".
19538 (vec_extract_hi_<mode><mask_name>): Use "sselog1" type instead of
19539 "sselog". Remove explicit "memory" attribute.
19540 (vec_extract_lo_v32hi): Add (=v, v) alternative and explicit "memory",
19541 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
19542 attributes.
19543 (vec_extract_hi_v32hi): Merge all alternatives into one, use
19544 "sselog1" type instead of "sselog". Remove explicit "memory"
19545 attribute.
19546 (vec_extract_hi_v16hi): Merge each pair of alternatives into one,
19547 use "sselog1" type instead of "sselog". Remove explicit "memory"
19548 attribute.
19549 (vec_extract_lo_v64qi): Add (=v, v) alternative and explicit "memory",
19550 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
19551 attributes.
19552 (vec_extract_hi_v64qi): Merge all alternatives into one, use
19553 "sselog1" type instead of "sselog". Remove explicit "memory"
19554 attribute.
19555 (vec_extract_hi_v32qi): Merge each pair of alternatives into one,
19556 use "sselog1" type instead of "sselog". Remove explicit "memory"
19557 attribute.
19558
19559 PR target/85430
19560 * config/i386/i386.md (*ashlqi3_1_slp): Use alu1 type instead of alu.
19561
19562 PR middle-end/85414
19563 * rtlhooks.c (gen_lowpart_if_possible): Don't call gen_lowpart_SUBREG
19564 on a SUBREG.
19565
19566 2018-04-17 Martin Jambor <mjambor@suse.cz>
19567
19568 PR ipa/85421
19569 * ipa-cp.c (create_specialized_node): Call
19570 expand_all_artificial_thunks if necessary.
19571
19572 2018-04-17 Martin Liska <mliska@suse.cz>
19573
19574 PR lto/85405
19575 * ipa-devirt.c (odr_types_equivalent_p): Remove trailing
19576 in message, remote space in between '_G' and '('.
19577
19578 2018-04-17 Jakub Jelinek <jakub@redhat.com>
19579
19580 PR target/85281
19581 * config/i386/sse.md (reduces<mode><mask_scalar_name>,
19582 avx512f_vmcmp<mode>3<round_saeonly_name>,
19583 avx512f_vmcmp<mode>3_mask<round_saeonly_name>,
19584 avx512f_sgetexp<mode><mask_scalar_name><round_saeonly_scalar_name>,
19585 avx512f_rndscale<mode><round_saeonly_name>,
19586 avx512dq_ranges<mode><mask_scalar_name><round_saeonly_scalar_name>,
19587 avx512f_vgetmant<mode><mask_scalar_name><round_saeonly_scalar_name>):
19588 Use %<iptr>2 instead of %2 for -masm=intel.
19589 (avx512f_vcvtss2usi<round_name>, avx512f_vcvtss2usiq<round_name>,
19590 avx512f_vcvttss2usi<round_saeonly_name>,
19591 avx512f_vcvttss2usiq<round_saeonly_name>): Use %k1 instead of %1 for
19592 -masm=intel.
19593 (avx512f_vcvtsd2usi<round_name>, avx512f_vcvtsd2usiq<round_name>,
19594 avx512f_vcvttsd2usi<round_saeonly_name>,
19595 avx512f_vcvttsd2usiq<round_saeonly_name>, ufloatv2siv2df2<mask_name>):
19596 Use %q1 instead of %1 for -masm=intel.
19597 (avx512f_sfixupimm<mode><sd_maskz_name><round_saeonly_name>,
19598 avx512f_sfixupimm<mode>_mask<round_saeonly_name>): Use %<iptr>3 instead
19599 of %3 for -masm=intel.
19600 (sse2_shufpd_v2df_mask): Fix a typo, change %{6%} to %{%6%} for
19601 -masm=intel.
19602 (*avx512vl_<code>v2div2qi2_store): Use %w0 instead of %0 for
19603 -masm=intel.
19604 (*avx512vl_<code><mode>v4qi2_store): Use %k0 instead of %0 for
19605 -masm=intel.
19606 (avx512vl_<code><mode>v4qi2_mask_store): Use a single pattern with
19607 %k0 and %1 for -masm=intel rather than two patterns, one with %0 and
19608 %g1.
19609 (*avx512vl_<code><mode>v8qi2_store): Use %q0 instead of %0 for
19610 -masm=intel.
19611 (avx512vl_<code><mode>v8qi2_mask_store): Use a single pattern with
19612 %q0 and %1 for -masm=intel rather than two patterns, one with %0 and
19613 %g1 and one with %0 and %1.
19614 (avx512er_vmrcp28<mode><round_saeonly_name>,
19615 avx512er_vmrsqrt28<mode><round_saeonly_name>): Use %<iptr>1 instead of
19616 %1 for -masm=intel.
19617 (avx5124fmaddps_4fmaddps_mask, avx5124fmaddps_4fmaddss_mask,
19618 avx5124fmaddps_4fnmaddps_mask, avx5124fmaddps_4fnmaddss_mask,
19619 avx5124vnniw_vp4dpwssd_mask, avx5124vnniw_vp4dpwssds_mask): Swap order
19620 of %0 and %{%4%} for -masm=intel.
19621 (avx5124fmaddps_4fmaddps_maskz, avx5124fmaddps_4fmaddss_maskz,
19622 avx5124fmaddps_4fnmaddps_maskz, avx5124fmaddps_4fnmaddss_maskz,
19623 avx5124vnniw_vp4dpwssd_maskz, avx5124vnniw_vp4dpwssds_maskz): Swap
19624 order of %0 and %{%5%}%{z%} for -masm=intel.
19625
19626 2018-04-17 Jan Hubicka <jh@suse.cz>
19627
19628 PR lto/85405
19629 * ipa-devirt.c (odr_types_equivalent_p): Handle bit fields.
19630
19631 2018-04-17 Martin Liska <mliska@suse.cz>
19632
19633 PR ipa/85329
19634 * multiple_target.c (create_dispatcher_calls): Set apostrophes
19635 for target_clone error message. Make default implementation
19636 clone to be a local declaration.
19637 (separate_attrs): Add new argument and check for an empty
19638 string.
19639 (expand_target_clones): Handle it.
19640 (ipa_target_clone): Make redirection just for target_clones
19641 functions.
19642
19643 2018-04-16 Cesar Philippidis <cesar@codesourcery.com>
19644 Tom de Vries <tom@codesourcery.com>
19645
19646 PR middle-end/84955
19647 * omp-expand.c (expand_oacc_for): Add dummy false branch for
19648 tiled basic blocks without omp continue statements.
19649
19650 2018-04-16 Aaron Sawdey <acsawdey@linux.ibm.com>
19651
19652 PR target/83660
19653 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Mark
19654 vec_extract expression as having side effects to make sure it gets
19655 a cleanup point.
19656
19657 2018-04-16 H.J. Lu <hongjiu.lu@intel.com>
19658
19659 PR target/85403
19660 * config/i386/i386.c (get_builtin_code_for_version): Check
19661 error_mark_node.
19662
19663 2018-04-16 Olga Makhotina <olga.makhotina@intel.com>
19664
19665 PR target/84331
19666 * config.gcc: Support "skylake".
19667 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
19668 PROCESSOR_SKYLAKE.
19669 * config/i386/i386.c (m_SKYLAKE): Define.
19670 (processor_target_table): Add "skylake".
19671 (ix86_option_override_internal): Add "skylake".
19672 (get_builtin_code_for_version): Handle PROCESSOR_SKYLAKE,
19673 PROCESSOR_CANNONLAKE.
19674 (get_builtin_code_for_version): Fix priority for
19675 PROCESSOR_ICELAKE_CLIENT, PROCESSOR_ICELAKE_SERVER,
19676 PROCESSOR_SKYLAKE-AVX512.
19677 * config/i386/i386.h (processor_costs): Define TARGET_SKYLAKE.
19678 (processor_type): Add PROCESSOR_SKYLAKE.
19679
19680 2018-04-16 Paolo Carlini <paolo.carlini@oracle.com>
19681 Jason Merrill <jason@redhat.com>
19682
19683 PR c++/85112
19684 * convert.c (convert_to_integer_1): Use direct recursion for
19685 enumeral types and types with a precision less than the number
19686 of bits in their mode.
19687
19688 2018-04-16 Julia Koval <julia.koval@intel.com>
19689
19690 PR target/84413
19691 * config/i386/x86-tune.def (X86_TUNE_SSE_UNALIGNED_LOAD_OPTIMAL,
19692 X86_TUNE_SSE_UNALIGNED_STORE_OPTIMAL): Add m_SKYLAKE_AVX512
19693
19694 2018-04-14 Segher Boessenkool <segher@kernel.crashing.org>
19695
19696 PR target/85293
19697 * config/rs6000/rs6000.opt (mdirect-move): Make deprecated.
19698 * doc/invoke.texi (RS/6000 and PowerPC Options): Remove -mdirect-move
19699 and -mno-direct-move.
19700
19701 2018-04-13 Paul A. Clarke <pc@us.ibm.com>
19702
19703 PR target/83402
19704 * config/rs6000/emmintrin.h (_mm_slli_epi{16,32,64}):
19705 Ensure that vec_splat_s32 is only called with 0 <= shift < 16.
19706 Ensure negative shifts result in {0}.
19707
19708 2018-04-13 Vladimir Makarov <vmakarov@redhat.com>
19709
19710 PR rtl-optimization/79916
19711 * config/rs6000/rs6000.c (rs6000_emit_move): Use assigned hard
19712 regs (if any) to define how to gnerate SD moves when LRA is in
19713 progress.
19714
19715 2018-04-13 Jakub Jelinek <jakub@redhat.com>
19716
19717 PR rtl-optimization/85393
19718 * except.h (expand_dw2_landing_pad_for_region): Remove declaration.
19719 * except.c (expand_dw2_landing_pad_for_region): Make static.
19720 * bb-reorder.c (fix_up_crossing_landing_pad): In new_bb emit just
19721 a label and unconditional jump to old_bb, rather than
19722 expand_dw2_landing_pad_for_region insn(s) and jump to single_succ
19723 basic block.
19724
19725 PR rtl-optimization/85376
19726 * simplify-rtx.c (simplify_const_unary_operation): For CLZ and CTZ and
19727 zero op0, if C?Z_DEFINED_VALUE_AT_ZERO is false, return NULL_RTX
19728 instead of a specific value.
19729
19730 2018-04-13 Jan Hubicka <hubicka@ucw.cz>
19731 Bin Cheng <bin.cheng@arm.com>
19732
19733 PR tree-optimization/82965
19734 PR tree-optimization/83991
19735 * cfgloopanal.c (expected_loop_iterations_unbounded): Add
19736 by_profile_only parameter.
19737 * cfgloopmanip.c (scale_loop_profile): Further scale loop's profile
19738 information if the loop was predicted to iterate too many times.
19739 * cfgloop.h (expected_loop_iterations_unbounded): Update prototype
19740
19741 2018-04-13 Jan Hubicka <hubicka@ucw.cz>
19742
19743 PR lto/71991
19744 * config/i386/i386.c (ix86_can_inline_p): Allow safe transitions for
19745 always inline.
19746
19747 2018-04-13 Martin Liska <mliska@suse.cz>
19748 Jakub Jelinek <jakub@redhat.com>
19749
19750 PR middle-end/81657
19751 * expr.h (enum block_op_methods): Add BLOCK_OP_NO_LIBCALL_RET.
19752 * expr.c (emit_block_move_hints): Handle BLOCK_OP_NO_LIBCALL_RET.
19753 * builtins.c (expand_builtin_memory_copy_args): Use
19754 BLOCK_OP_NO_LIBCALL_RET method for mempcpy with non-ignored target,
19755 handle dest_addr == pc_rtx.
19756
19757 2018-04-12 Segher Boessenkool <segher@kernel.crashing.org>
19758
19759 PR target/85291
19760 * config/rs6000/rs6000.md (fix_trunc<mode>si2): Use legacy code if
19761 asked to not generate direct moves.
19762 (fix_trunc<mode>si2_stfiwx): Similar.
19763 (fix_trunc<mode>si2_internal): Similar.
19764
19765 2018-04-12 Jakub Jelinek <jakub@redhat.com>
19766
19767 PR debug/83157
19768 * var-tracking.c (add_stores): Handle STRICT_LOW_PART SET_DEST.
19769 * cselib.c (cselib_record_sets): For STRICT_LOW_PART dest,
19770 lookup if dest in some wider mode is known to be const0_rtx and
19771 if so, record permanent equivalence for it to be ZERO_EXTEND of
19772 the narrower mode destination.
19773
19774 2018-04-12 Cesar Philippidis <cesar@codesourcery.com>
19775
19776 * lto-streamer-out.c (output_function): Revert 259346.
19777 * omp-expand.c (expand_oacc_for): Likewise.
19778
19779 2018-04-12 Alexander Monakov <amonakov@ispras.ru>
19780
19781 PR rtl-optimization/85354
19782 * sel-sched-ir.c (sel_init_pipelining): Move cfg_cleanup call...
19783 * sel-sched.c (sel_global_init): ... here.
19784
19785 2018-04-12 Eric Botcazou <ebotcazou@adacore.com>
19786
19787 PR target/85238
19788 * lto-wrapper.c (debug_objcopy): Open the files in binary mode.
19789 * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
19790 mode for PE-COFF targets.
19791 * config/i386/i386-protos.h (i386_pe_asm_lto_start): Declare.
19792 (i386_pe_asm_lto_end): Likewise.
19793 * config/i386/cygming.h (TARGET_ASM_LTO_START): Define.
19794 (TARGET_ASM_LTO_END): Likewise.
19795 * config/i386/winnt.c (saved_debug_info_level): New static variable.
19796 (i386_pe_asm_lto_start): New function.
19797 (i386_pe_asm_lto_end): Likewise.
19798
19799 2018-04-12 Cesar Philippidis <cesar@codesourcery.com>
19800 Richard Biener <rguenther@suse.de>
19801
19802 PR middle-end/84955
19803 * lto-streamer-out.c (output_function): Fix CFG loop state before
19804 streaming out.
19805 * omp-expand.c (expand_oacc_for): Handle calls to internal
19806 functions like regular functions.
19807
19808 2018-04-12 Richard Biener <rguenther@suse.de>
19809
19810 PR lto/85371
19811 * dwarf2out.c (init_sections_and_labels): Use debug_line_section[_label]
19812 for the early LTO debug to properly generate references to it
19813 during DIE emission. Do not re-use that for the skeleton for
19814 split-dwarf.
19815 (dwarf2out_early_finish): Likewise.
19816
19817 2018-04-12 Jakub Jelinek <jakub@redhat.com>
19818
19819 PR target/85328
19820 * config/i386/sse.md
19821 (<mask_codefor>avx512dq_vextract<shuffletype>64x2_1<mask_name> split,
19822 <mask_codefor>avx512f_vextract<shuffletype>32x4_1<mask_name> split,
19823 vec_extract_lo_<mode><mask_name> split, vec_extract_lo_v32hi,
19824 vec_extract_lo_v64qi): For non-AVX512VL if input is xmm16+ reg
19825 and output is a reg, avoid creating invalid lowpart subreg, but
19826 instead split into a 512-bit move. Don't split if not AVX512VL,
19827 input is xmm16+ reg and output is a mem.
19828 (vec_extract_lo_<mode><mask_name>, vec_extract_lo_v32hi,
19829 vec_extract_lo_v64qi): Don't require split if not AVX512VL, input is
19830 xmm16+ reg and output is a mem.
19831
19832 2018-04-12 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
19833
19834 * config/s390/s390.c (s390_output_indirect_thunk_function): Check
19835 also for flag_dwarf2_cfi_asm.
19836
19837 2018-04-12 Jakub Jelinek <jakub@redhat.com>
19838
19839 PR rtl-optimization/85342
19840 * regcprop.c (copyprop_hardreg_forward_1): Remove replaced array, use
19841 a bool scalar var inside of the loop instead. Don't try to update
19842 recog_data.operand after failed apply_change_group.
19843
19844 2018-04-12 Tom de Vries <tom@codesourcery.com>
19845
19846 PR target/85296
19847 * config/nvptx/nvptx.c (flexible_array_member_type_p): New function.
19848 (nvptx_assemble_decl_begin): Add undefined param. Declare undefined
19849 array with flexible array member as array without given dimension.
19850 (nvptx_assemble_undefined_decl): Set nvptx_assemble_decl_begin call
19851 argument for undefined param to true.
19852
19853 2018-04-11 Aaron Sawdey <acsawdey@linux.ibm.com>
19854
19855 PR target/85321
19856 * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
19857 -mcall- and -mtraceback=. Remove options -mabi=spe and -mabi=no-spe
19858 from PowerPC section.
19859 * config/rs6000/sysv4.opt (mcall-): Improve help text.
19860 * config/rs6000/rs6000.opt (mblock-compare-inline-limit=): Trim
19861 help text that is too long.
19862 * config/rs6000/rs6000.opt (mblock-compare-inline-loop-limit=): Trim
19863 help text that is too long.
19864 * config/rs6000/rs6000.opt (mstring-compare-inline-limit=): Trim
19865 help text that is too long.
19866
19867 2018-04-11 Uros Bizjak <ubizjak@gmail.com>
19868
19869 * config/alpha/alpha.md (stack_probe_internal): Rename
19870 from "probe_stack". Update all callers.
19871
19872 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
19873
19874 PR rtl-optimization/84566
19875 * sched-deps.c (sched_analyze_insn): Check deps->readonly when invoking
19876 sched_macro_fuse_insns.
19877
19878 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
19879
19880 PR target/84301
19881 * sched-rgn.c (add_branch_dependences): Move sel_sched_p check here...
19882 (compute_block_dependences): ... from here.
19883
19884 2018-04-11 Jakub Jelinek <jakub@redhat.com>
19885
19886 PR tree-optimization/85331
19887 * vec-perm-indices.h (vec_perm_indices::clamp): Change input type
19888 from int to HOST_WIDE_INT.
19889
19890 2018-04-11 Martin Jambor <mjambor@suse.cz>
19891
19892 PR ipa/84149
19893 * ipa-cp.c (propagate_vals_across_pass_through): Expand comment.
19894 (cgraph_edge_brings_value_p): New parameter dest_val, check if it is
19895 not the same as the source val.
19896 (cgraph_edge_brings_value_p): New parameter.
19897 (gather_edges_for_value): Pass destination value to
19898 cgraph_edge_brings_value_p.
19899 (perhaps_add_new_callers): Likewise.
19900 (get_info_about_necessary_edges): Likewise and exclude values brought
19901 only by self-recursive edges.
19902 (create_specialized_node): Redirect only clones of self-calling edges.
19903 (+self_recursive_pass_through_p): New function.
19904 (find_more_scalar_values_for_callers_subset): Use it.
19905 (find_aggregate_values_for_callers_subset): Likewise.
19906 (known_aggs_to_agg_replacement_list): Removed.
19907 (decide_whether_version_node): Re-calculate known constants for all
19908 remaining context clones.
19909
19910 2018-04-11 Richard Biener <rguenther@suse.de>
19911
19912 PR lto/85339
19913 * dwarf2out.c (dwarf2out_finish): Remove DW_AT_stmt_list attribute
19914 from early DWARF output.
19915 (dwarf2out_early_finish): Output line info unconditionally into
19916 early DWARF and add reference to it.
19917
19918 2018-04-11 Jakub Jelinek <jakub@redhat.com>
19919
19920 PR target/85281
19921 * config/i386/sse.md (iptr): Add V16SFmode and V8DFmode cases.
19922 (<avx512>_vec_dup<mode><mask_name>): Use a single pattern for modes
19923 other than V2DFmode using iptr mode attribute.
19924 (<avx512>_vec_dup<mode><mask_name>): Use iptr mode attribute.
19925
19926 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
19927
19928 PR rtl-optimization/84659
19929 * sel-sched-ir.c (sel_init_pipelining): Invoke cleanup_cfg.
19930
19931 2018-04-11 Jakub Jelinek <jakub@redhat.com>
19932
19933 PR debug/85302
19934 * dwarf2out.c (skip_loc_list_entry): Don't call size_of_locs if
19935 SIZEP is NULL.
19936 (output_loc_list): Pass address of a dummy size variable even in the
19937 locview handling loop.
19938 (index_location_lists): Add comment on why skip_loc_list_entry can't
19939 call size_of_locs.
19940
19941 2018-04-11 Thomas Preud'homme <thomas.preudhomme@arm.com>
19942
19943 PR target/85261
19944 * config/arm/arm-builtins.c (arm_expand_builtin): Force input operand
19945 into register.
19946
19947 2018-04-10 Aaron Sawdey <acsawdey@linux.ibm.com>
19948
19949 PR target/85321
19950 * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
19951 -mblock-compare-inline-limit, -mblock-compare-inline-loop-limit,
19952 and -mstring-compare-inline-limit.
19953
19954 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
19955
19956 PR target/85287
19957 * config/rs6000/rs6000.md (allocate_stack): Put the residual size
19958 for stack clash protection in a register whenever we need it to be in
19959 a register.
19960
19961 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
19962
19963 * common/config/rs6000/rs6000-common.c (rs6000_option_init_struct):
19964 Enable -fasynchronous-unwind-tables by default if OBJECT_FORMAT_ELF.
19965
19966 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
19967
19968 PR target/85321
19969 * config/rs6000/rs6000.opt (mtraceback=): Show the allowed values in
19970 the help text.
19971 (mlong-double-): Ditto.
19972 * config/rs6000/sysv4.opt (msdata=): Ditto.
19973 (mtls-size=): Ditto.
19974
19975 2018-04-10 Kelvin Nilsen <kelvin@gcc.gnu.org>
19976
19977 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
19978 erroneous entries for
19979 "vector int vec_ldl (int, long int *)", and
19980 "vector unsigned int vec_ldl (int, unsigned long int *)".
19981 Add comments and entries for
19982 "vector bool char vec_ldl (int, bool char *)",
19983 "vector bool short vec_ldl (int, bool short *)",
19984 "vector bool int vec_ldl (int, bool int *)",
19985 "vector bool long long vec_ldl (int, bool long long *)",
19986 "vector pixel vec_ldl (int, pixel *)",
19987 "vector long long vec_ldl (int, long long *)",
19988 "vector unsigned long long vec_ldl (int, unsigned long long *)".
19989 * config/rs6000/rs6000.c (rs6000_init_builtins): Initialize new
19990 type tree bool_long_long_type_node and correct definition of
19991 bool_V2DI_type_node to make reference to this new type tree.
19992 (rs6000_mangle_type): Replace erroneous reference to
19993 bool_long_type_node with bool_long_long_type_node.
19994 * config/rs6000/rs6000.h (enum rs6000_builtin_type_index): Add
19995 comments to emphasize sign distinctions for char and int types and
19996 replace RS6000_BTI_bool_long constant with
19997 RS6000_BTI_bool_long_long constant. Also add comment to restrict
19998 use of RS6000_BTI_pixel.
19999 (bool_long_type_node): Remove this macro definition.
20000 (bool_long_long_type_node): New macro definition
20001
20002 2018-04-10 Jakub Jelinek <jakub@redhat.com>
20003
20004 PR rtl-optimization/85300
20005 * combine.c (subst): Handle subst of CONST_SCALAR_INT_P new_rtx also
20006 into FLOAT and UNSIGNED_FLOAT like ZERO_EXTEND, return a CLOBBER if
20007 simplify_unary_operation fails.
20008
20009 2018-04-10 Martin Liska <mliska@suse.cz>
20010
20011 * gdbhooks.py: Add pretty-printers for varpool_node, symtab_node,
20012 cgraph_edge and ipa_ref.
20013
20014 2018-04-10 Jakub Jelinek <jakub@redhat.com>
20015
20016 PR target/85177
20017 PR target/85255
20018 * config/i386/sse.md
20019 (<extract_type>_vinsert<shuffletype><extract_suf>_mask): Fix
20020 computation of the VEC_MERGE selector from mask.
20021 (<extract_type>_vinsert<shuffletype><extract_suf>_1<mask_name>):
20022 Fix decoding of the VEC_MERGE selector into mask.
20023
20024 2018-04-10 Richard Sandiford <richard.sandiford@linaro.org>
20025
20026 PR tree-optimization/85286
20027 * tree-vect-data-refs.c (vect_get_smallest_scalar_type):
20028
20029 2018-04-10 Richard Sandiford <richard.sandiford@linaro.org>
20030
20031 * final.c (final_1): Set insn_last_address as well as
20032 insn_current_address.
20033
20034 2018-04-10 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
20035
20036 PR target/85173
20037 * explow.c (emit_stack_probe): Call validize_mem on memory location
20038 before passing it to gen_probe_stack. Create address operand and
20039 legitimize it for the probe_stack_address case.
20040
20041 2018-04-09 Jan Hubicka <jh@suse.cz>
20042
20043 PR lto/85078
20044 * ipa-devirt.c (rebuild_type_inheritance-hash): New.
20045 * ipa-utils.h (rebuild_type_inheritance-hash): Declare.
20046 * tree.c (free_lang_data_in_type): Fix handling of binfos;
20047 walk basetypes.
20048 (free_lang_data): Rebuild type inheritance graph.
20049
20050 2018-04-09 Martin Sebor <msebor@redhat.com>
20051
20052 * invoke.texi (-finline-small-functions): Mention other optimization
20053 options.
20054 (-findirect-inlining, -fpartial-inlining): Same.
20055 (-finline-functions-called-once): Same.
20056 (-freorder-blocks-and-partition): Same.
20057
20058 2018-04-09 Jan Hubicka <jh@suse.cz>
20059
20060 PR rtl/84058
20061 * cfgcleanup.c (try_forward_edges): Do not give up on crossing
20062 jumps; choose last target that matches the criteria (i.e.
20063 no partition changes for non-crossing jumps).
20064 * cfgrtl.c (cfg_layout_redirect_edge_and_branch): Add basic
20065 support for redirecting crossing jumps to non-crossing.
20066
20067 2018-04-09 Alexey Brodkin <abrodkin@synopsys.com>
20068
20069 * config/arc/arc.c (arc_expand_prologue): Set stack usage info
20070 also for naked functions.
20071
20072 2018-04-09 Claudiu Zissulescu <claziss@synopsys.com>
20073
20074 * config/arc/arc.md (add_shift): New pattern.
20075 (add_shift2): Likewise.
20076 (sub_shift): Likewise.
20077 (sub_shift_cmp0_noout): Likewise.
20078 (compare_si_ashiftsi): Likewise.
20079 (xbfu_cmp0_noout): New combine pattern.
20080 (xbfu_cmp0"): Likewise.
20081 (movsi_set_cc_insn): Place the predicable variant first.
20082 (commutative_binary_cmp0_noout): Remove clobber.
20083 (commutative_binary_cmp0): New pattern.
20084 (noncommutative_binary_cmp0): Likewise.
20085 (noncommutative_binary_cmp0_noout): Likewise.
20086 (noncommutative_binary_comparison_result_used): Removed.
20087 (rsub_cmp0): New pattern.
20088 (rsub_cmp0_noout): Likewise.
20089 (extzvsi): Changed, keep only meaningful variants.
20090 (SQH, SEZ): New iterators.
20091 (SQH_postfix): New mode attribute.
20092 (SEZ_prefix): New code attribute.
20093 (<SEZ_prefix>xt<SQH_postfix>_cmp0_noout): New instruction pattern.
20094 (<SEZ_prefix>xt<SQH_postfix>_cmp0): Likewise.
20095 * config/arc/predicates.md (cc_set_register): Use CC_REG instead
20096 of numerical value.
20097 (noncommutative_operator): Check the availability of barrel
20098 shifter option.
20099
20100 2018-04-09 Richard Biener <rguenther@suse.de>
20101
20102 PR tree-optimization/85284
20103 * tree-ssa-loop-niter.c (number_of_iterations_exit_assumptions):
20104 Only use the niter constraining form of simple_iv when the exit
20105 is always executed.
20106
20107 2018-04-09 Tom de Vries <tom@codesourcery.com>
20108
20109 PR target/84041
20110 * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
20111 (define_expand "*memory_barrier"): New define_expand.
20112 (define_insn "memory_barrier"): New insn.
20113
20114 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
20115
20116 PR rtl-optimization/80463
20117 PR rtl-optimization/83972
20118 PR rtl-optimization/83480
20119
20120 * sel-sched-ir.c (has_dependence_note_mem_dep): Take into account the
20121 correct producer for the insn.
20122 (tidy_control_flow): Fixup seqnos in case of debug insns.
20123
20124 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
20125
20126 PR rtl-optimization/83913
20127
20128 * sel-sched-ir.c (merge_expr_data): Choose the middle between two
20129 different sched-times when merging exprs.
20130
20131 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
20132
20133 PR rtl-optimization/83962
20134
20135 * sel-sched-ir.c (tidy_control_flow): Correct the order in which we call
20136 tidy_fallthru_edge and tidy_control_flow.
20137
20138 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
20139
20140 PR rtl-optimization/83530
20141
20142 * sel-sched.c (force_next_insn): New global variable.
20143 (remove_insn_for_debug): When force_next_insn is true, also leave only
20144 next insn in the ready list.
20145 (sel_sched_region): When the region wasn't scheduled, make another pass
20146 over it with force_next_insn set to 1.
20147
20148 2018-04-08 Monk Chiang <sh.chiang04@gmail.com>
20149
20150 * config.gcc (nds32le-*-*, nds32be-*-*): Add nds32/nds32_intrinsic.h
20151 into tm_file.
20152 * config/nds32/constants.md (unspec_volatile_element): Add enum values
20153 for interrupt control.
20154 * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
20155 functions for interrupt control.
20156 * config/nds32/nds32-intrinsic.md: Likewise.
20157 * config/nds32/nds32_intrinsic.h: Likewise.
20158 * config/nds32/nds32.h (nds32_builtins): Likewise.
20159
20160 2018-04-08 Chung-Ju Wu <jasonwucj@gmail.com>
20161
20162 * config/nds32/nds32.c (nds32_init_machine_status,
20163 nds32_legitimate_index_p, nds32_legitimate_address_p): Consider
20164 strict_aligned_p field.
20165 (nds32_expand_to_rtl_hook): New function.
20166 (TARGET_EXPAND_TO_RTL_HOOK): Define.
20167 * config/nds32/nds32.h (machine_function): Add strict_aligned_p field.
20168
20169 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
20170 Chung-Ju Wu <jasonwucj@gmail.com>
20171
20172 * config.gcc (nds32*-*-*): Check that n7 is valid to --with-cpu.
20173 * config/nds32/nds32-n7.md: New file.
20174 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N7.
20175 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n7
20176 pipeline.
20177 * config/nds32/nds32-protos.h: More declarations for n7 pipeline.
20178 * config/nds32/nds32.md (pipeline_model): Add n7.
20179 * config/nds32/nds32.opt (mcpu): Support n7 pipeline cpus.
20180 * config/nds32/pipelines.md: Include n7 settings.
20181
20182 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
20183 Chung-Ju Wu <jasonwucj@gmail.com>
20184
20185 * config.gcc (nds32*-*-*): Check that e8 is valid to --with-cpu.
20186 * config/nds32/nds32-e8.md: New file.
20187 * config/nds32/nds32-opts.h (nds32-cpu_type): Add CPU_E8.
20188 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for e8
20189 pipeline.
20190 * config/nds32/nds32-protos.h: More declarations for e8 pipeline.
20191 * config/nds32/nds32.md (pipeline_model): Add e8.
20192 * config/nds32/nds32.opt (mcpu): Support e8 pipeline cpus.
20193 * config/nds32/pipelines.md: Include e8 settings.
20194
20195 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
20196 Chung-Ju Wu <jasonwucj@gmail.com>
20197
20198 * config.gcc (nds32*-*-*): Check that n6/n8/s8 are valid to --with-cpu.
20199 * config/nds32/nds32-n8.md: New file.
20200 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N6 and CPU_N8.
20201 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n8
20202 pipeline.
20203 * config/nds32/nds32-protos.h: More declarations for n8 pipeline.
20204 * config/nds32/nds32-utils.c: More implementations for n8 pipeline.
20205 * config/nds32/nds32.md (pipeline_model): Add n8.
20206 * config/nds32/nds32.opt (mcpu): Support n8 pipeline cpus.
20207 * config/nds32/pipelines.md: Include n8 settings.
20208
20209 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
20210 Chung-Ju Wu <jasonwucj@gmail.com>
20211
20212 * config.gcc (nds32*): Add nds32-utils.o into extra_objs.
20213 * config/nds32/nds32-n9-2r1w.md: New file.
20214 * config/nds32/nds32-n9-3r2w.md: New file.
20215 * config/nds32/nds32-opts.h (nds32_cpu_type, nds32_mul_type,
20216 nds32_register_ports): New or modify for cpu n9.
20217 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n9
20218 pipeline.
20219 * config/nds32/nds32-protos.h: More declarations for n9 pipeline.
20220 * config/nds32/nds32-utils.c: New file.
20221 * config/nds32/nds32.h (TARGET_PIPELINE_N9, TARGET_PIPELINE_SIMPLE,
20222 TARGET_MUL_SLOW): Define.
20223 * config/nds32/nds32.md (pipeline_model): New attribute.
20224 * config/nds32/nds32.opt (mcpu, mconfig-mul, mconfig-register-ports):
20225 New options that support cpu n9.
20226 * config/nds32/pipelines.md: Include n9 settings.
20227 * config/nds32/t-nds32 (nds32-utils.o): Add dependency.
20228
20229 2018-04-08 Chung-Ju Wu <jasonwucj@gmail.com>
20230
20231 * config/nds32/nds32-md-auxiliary.c (output_cond_branch): Output align
20232 information if necessary.
20233 (output_cond_branch_compare_zero): Likewise.
20234 * config/nds32/nds32.c (nds32_adjust_insn_length): Consider align case.
20235 (nds32_target_alignment): Refine for alignment.
20236 * config/nds32/nds32.h (NDS32_ALIGN_P): Define.
20237 (FUNCTION_BOUNDARY): Modify.
20238 * config/nds32/nds32.md (call_internal, call_value_internal): Consider
20239 align case.
20240 * config/nds32/nds32.opt (malways-align, malign-functions): New.
20241
20242 2018-04-08 Monk Chiang <sh.chiang04@gmail.com>
20243
20244 * config/nds32/constants.md (unspec_volatile_element): Add values for
20245 TLB operation and data prefetch.
20246 * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
20247 functions for TLB operation and data prefetch.
20248 * config/nds32/nds32-intrinsic.md: Likewise.
20249 * config/nds32/nds32_intrinsic.h: Likewise.
20250 * config/nds32/nds32.c (nds32_dpref_names): Likewise.
20251 (nds32_print_operand): Likewise.
20252 * config/nds32/nds32.h (nds32_builtins): Likewise.
20253
20254 2018-04-07 Thomas Koenig <tkoenig@gcc.gnu.org>
20255 Andrew Pinski <pinsika@gcc.gnu.org>
20256
20257 PR middle-end/82976
20258 * match.pd: Use constant_boolean_node of correct type instead of
20259 boolean_true_node or boolean_false_node for simplifying
20260 pointer comparisons to zero.
20261
20262 2018-04-07 Jakub Jelinek <jakub@redhat.com>
20263
20264 PR tree-optimization/80021
20265 * tree.c (verify_type_variant): Make error call in verify_variant_match
20266 translatable and remove final full stop.
20267
20268 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
20269
20270 * config/nds32/constants.md (unspec_volatile_element): Add
20271 UNSPEC_VOLATILE_EH_RETURN.
20272 * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push,
20273 nds32_output_stack_pop): Support dwarf exception handling process.
20274 * config/nds32/nds32-protos.h (nds32_dynamic_chain_address): Declare.
20275 * config/nds32/nds32.c (nds32_init_machine_status): Support dwarf
20276 exception handling process.
20277 (nds32_compute_stack_frame): Likewise.
20278 (nds32_return_addr_rtx): Likewise.
20279 (nds32_initial_elimination_offset): Likewise.
20280 (nds32_expand_prologue): Likewise.
20281 (nds32_expand_epilogue): Likewise.
20282 (nds32_dynamic_chain_address): New function.
20283 * config/nds32/nds32.h (machine_function): Add fields for dwarf
20284 exception handling.
20285 (DYNAMIC_CHAIN_ADDRESS): Define.
20286 (EH_RETURN_DATA_REGNO): Define.
20287 (EH_RETURN_STACKADJ_RTX): Define.
20288 * config/nds32/nds32.md (eh_return, nds32_eh_return): Implement
20289 patterns for dwarf exception handling.
20290
20291 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
20292
20293 * config/nds32/nds32.h: Clean up obsolete macros.
20294
20295 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
20296
20297 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
20298 Add enum values for particular instructions.
20299 * config/nds32/nds32-intrinsic.c: Implementation of expanding
20300 particular intrinsic functions.
20301 * config/nds32/nds32-intrinsic.md: Likewise.
20302 * config/nds32/nds32_intrinsic.h: Likewise.
20303 * config/nds32/nds32.h (nds32_builtins): Likewise.
20304 * config/nds32/nds32.md (type): Add pbsad and pbsada.
20305 (btst, ave): New patterns for particular instructions.
20306
20307 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
20308
20309 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
20310 Add enum values for atomic load/store and memory sync.
20311 * config/nds32/nds32-intrinsic.c: Implementation for atomic load/store
20312 and memory sync.
20313 * config/nds32/nds32-intrinsic.md: Likewise.
20314 * config/nds32/nds32_intrinsic.h: Likewise.
20315 * config/nds32/nds32.h (nds32_builtins): Likewise.
20316
20317 2018-04-07 Jakub Jelinek <jakub@redhat.com>
20318
20319 PR tree-optimization/85257
20320 * fold-const.c (native_encode_vector): If not all elts could fit
20321 and off is -1, return 0 rather than offset.
20322 * tree-ssa-sccvn.c (vn_reference_lookup_3): Pass
20323 (offseti - offset2) / BITS_PER_UNIT as 4th argument to
20324 native_encode_expr. Verify len * BITS_PER_UNIT >= maxsizei. Don't
20325 adjust buffer in native_interpret_expr call.
20326
20327 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
20328
20329 * config/nds32/constants.md (unspec_volatile_element): Add cache
20330 control enum values.
20331 * config/nds32/nds32-intrinsic.c: Add cache control expand functions.
20332 * config/nds32/nds32-intrinsic.md: Add cache control patterns.
20333 * config/nds32/nds32.c (nds32_cctl_names): New.
20334 (nds32_print_operand): Handle cache control register names.
20335 * config/nds32/nds32.h (nds32_builtins): New enum values.
20336 * config/nds32/nds32_intrinsic.h: Add cache control enum types and
20337 macros.
20338 * config/nds32/nds32.md (type): Add mmu.
20339 * config/nds32/pipelines.md (simple_insn): Add mmu.
20340
20341 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
20342
20343 * config/nds32/nds32.md (type): Remove call.
20344 * config/nds32/pipelines.md (simple_insn): Likewise.
20345
20346 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
20347
20348 * config/nds32/constants.md (unspec_volatile_element): Add
20349 UNSPEC_VOLATILE_FMFCSR, UNSPEC_VOLATILE_FMTCSR and
20350 UNSPEC_VOLATILE_FMFCFG.
20351 * config/nds32/nds32-intrinsic.c (bdesc_noarg): New builtin
20352 description for fmfcfg and fmfcsr.
20353 (bdesc_1arg): Add fmtcsr.
20354 (bdesc_2arg): Add fcpynss, fcpyss, fcpynsd and fcpysd.
20355 (nds32_expand_builtin_impl): Deal with FPU intrinsic functions.
20356 * config/nds32/nds32-intrinsic.md (unspec_fcpynsd, unspec_fcpysd,
20357 unspec_fcpynss, unspec_fcpysd, unspec_fcpyss, unspec_fmfcsr,
20358 unspec_fmfcfg): New patterns.
20359 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FMFCFG,
20360 NDS32_BUILTIN_FMFCSR, NDS32_BUILTIN_FMTCSR, NDS32_BUILTIN_FCPYNSS,
20361 NDS32_BUILTIN_FCPYSS,NDS32_BUILTIN_FCPYNSD and NDS32_BUILTIN_FCPYSD.
20362 * config/nds32/nds32_intrinsic.h (__nds32__fcpynsd, __nds32__fcpynss,
20363 __nds32__fcpysd, __nds32__fcpyss, __nds32__fmfcsr, __nds32__fmtcsr,
20364 __nds32__fmfcfg): Define.
20365
20366 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
20367
20368 * config/nds32/nds32.c (nds32_intrinsic_register_names): Add more
20369 intrinsic register names.
20370 * config/nds32/nds32_intrinsic.h (nds32_intrinsic_registers): Add more
20371 intrinsic register enum values and macros.
20372
20373 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
20374
20375 * config/nds32/nds32.c (nds32_legitimate_index_p): Modify condition
20376 for load/store addressing form.
20377 (nds32_print_operand_address): Likewise.
20378
20379 2018-04-06 Eric Botcazou <ebotcazou@adacore.com>
20380
20381 PR target/85196
20382 * config/sparc/sparc.c (sparc_expand_move): Deal with symbolic operands
20383 based on LABEL_REF. Remove useless assertion.
20384 (pic_address_needs_scratch): Fix formatting.
20385 (sparc_legitimize_pic_address): Minor tweaks.
20386 (sparc_delegitimize_address): Adjust assertion accordingly.
20387 * config/sparc/sparc.md (movsi_pic_label_ref): Change label_ref_operand
20388 into symbolic_operand.
20389 (movsi_high_pic_label_ref): Likewise.
20390 (movsi_lo_sum_pic_label_ref): Likewise.
20391 (movdi_pic_label_ref): Likewise.
20392 (movdi_high_pic_label_ref): Likewise.
20393 (movdi_lo_sum_pic_label_ref): Likewise.
20394
20395 2018-04-06 Amaan Cheval <amaan.cheval@gmail.com>
20396
20397 * config.gcc (x86_64-*-rtems*): Add rtems.h to tm_file for
20398 custom LIB_SPEC setup.
20399
20400 2018-04-06 Ruslan Bukin <br@bsdpad.com>
20401 Kito Cheng <kito.cheng@gmail.com>
20402
20403 * config.gcc (riscv*-*-freebsd*): Add RISC-V FreeBSD support.
20404 * config/riscv/freebsd.h: New.
20405
20406 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
20407
20408 * config/nds32/nds32.c (nds32_adjust_insn_length): Refine.
20409 * config/nds32/nds32.h (ADJUST_INSN_LENGTH): Change the location in
20410 file.
20411
20412 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
20413 Kito Cheng <kito.cheng@gmail.com>
20414
20415 * config/nds32/nds32-md-auxiliary.c (nds32_output_return,
20416 nds32_output_call, nds32_symbol_binds_local_p): New functions.
20417 * config/nds32/nds32-protos.h (nds32_output_call,
20418 nds32_output_return): Declare.
20419 * config/nds32/nds32.md: Refine all the call and return patterns.
20420
20421 2018-04-06 Jakub Jelinek <jakub@redhat.com>
20422
20423 PR debug/85252
20424 * dwarf2out.c (rtl_for_decl_init): For STRING_CST initializer only
20425 build CONST_STRING if TYPE_MAX_VALUE is non-NULL and is INTEGER_CST.
20426
20427 PR rtl-optimization/84872
20428 * cfgloopmanip.c (create_preheader): Use make_forwarder_block even if
20429 nentry == 1 when CP_FALLTHRU_PREHEADERS and single_entry is
20430 EDGE_CROSSING edge.
20431
20432 2018-04-06 Tamar Christina <tamar.christina@arm.com>
20433
20434 * expr.c (copy_blkmode_to_reg): Revert 254862.
20435 * doc/sourcebuild.texi (word_mode_no_slow_unalign): Likewise.
20436
20437 2018-04-06 Richard Biener <rguenther@suse.de>
20438
20439 PR middle-end/85244
20440 * tree-dfa.c (get_ref_base_and_extent): Reset seen_variable_array_ref
20441 after seeing a component reference with an adjacent field. Treat
20442 refs to arrays at struct end of external decls similar to
20443 refs to unconstrained commons.
20444
20445 2018-04-06 Jakub Jelinek <jakub@redhat.com>
20446
20447 PR sanitizer/85213
20448 * fold-const.c (twoval_comparison_p): Remove SAVE_P argument and don't
20449 look through SAVE_EXPRs with non-side-effects argument. Adjust
20450 recursive calls.
20451 (fold_comparison): Adjust twoval_comparison_p caller, don't handle
20452 save_p here.
20453
20454 2018-04-06 Richard Biener <rguenther@suse.de>
20455
20456 PR middle-end/85180
20457 * alias.c (find_base_term): New wrapper around find_base_term
20458 unwinding CSELIB_VAL_PTR changes.
20459 (find_base_term): Do not restore CSELIB_VAL_PTR during the
20460 recursion.
20461
20462 2018-04-06 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
20463
20464 * config/s390/s390.c (s390_z10_optimize_cmp): Expand dedicated NOP
20465 instructions.
20466 * config/s390/s390.md (UNSPECV_NOP_LR_0, UNSPECV_NOP_LR_1): New
20467 constant definitions.
20468 ("nop"): lr 0,0 -> nopr r0
20469 ("nop_lr0", "nop_lr1"): New insn definitions.
20470
20471 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
20472
20473 * config/nds32/nds32.md (*stack_push, *stack_pop): Use
20474 NDS32_V3PUSH_AVAILABLE_P macro.
20475
20476 2018-04-06 Monk Chiang <sh.chiang04@gmail.com>
20477 Chung-Ju Wu <jasonwucj@gmail.com>
20478
20479 * config.gcc (nds32*-*-*): Add v2j v3f v3s checking.
20480 (nds32*-*-*): Add float and fpu_config into supported_defaults.
20481 * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS):
20482 Include TARGET_DEFAULT_FPU_ISA and TARGET_DEFAULT_FPU_FMA.
20483 * config/nds32/constants.md (unspec_element): Add UNSPEC_COPYSIGN,
20484 UNSPEC_FCPYNSD, UNSPEC_FCPYNSS, UNSPEC_FCPYSD and UNSPEC_FCPYSS.
20485 * config/nds32/constraints.md: New constraints and checking for hard
20486 float configuration.
20487 * config/nds32/iterators.md: New mode iterator and attribute for hard
20488 float configuration.
20489 * config/nds32/nds32-doubleword.md: Use hard float alternatives and
20490 patterns.
20491 * config/nds32/nds32-fpu.md: New file.
20492 * config/nds32/nds32-md-auxiliary.c: New functions and checkings to
20493 deal with hard float code generation.
20494 * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3F and
20495 ARCH_V3S.
20496 (abi_type, float_reg_number): New enum type.
20497 * config/nds32/nds32-predicates.c: New predicates for hard float.
20498 * config/nds32/nds32-protos.h: Declare functions for hard float.
20499 * config/nds32/nds32.c: Implementation for hard float configuration.
20500 * config/nds32/nds32.h: Definitions for hard float configuration.
20501 * config/nds32/nds32.md: Include hard float machine description and
20502 modify patterns for hard float configuration.
20503 * config/nds32/nds32.opt: New options for hard float configuration.
20504 * config/nds32/predicates.md: New predicates for hard float
20505 configuration.
20506
20507 2018-04-06 Kuan-Lin Chen <kuanlinchentw@gmail.com>
20508
20509 * common/config/nds32/nds32-common.c
20510 (nds32_option_optimization_table): Enable -mreleax-hint by default.
20511
20512 2018-04-05 Jakub Jelinek <jakub@redhat.com>
20513
20514 PR middle-end/85195
20515 * match.pd (BIT_FIELD_REF CONSTRUCTOR@0 @1 @2): Use view_convert around
20516 CONSTRUCTOR_ELT (ctor, ...)->value.
20517
20518 2018-04-05 Uros Bizjak <ubizjak@gmail.com>
20519
20520 PR target/85193
20521 * config/i386/i386.md (define_attr "memory"): Handle rotate1 type.
20522
20523 2018-04-05 Tom de Vries <tom@codesourcery.com>
20524
20525 PR target/85204
20526 * config/nvptx/nvptx.c (nvptx_single): Fix neutering of bb with only
20527 cond jump.
20528
20529 2018-04-05 Shiva Chen <shiva0217@gmail.com>
20530 Kito Cheng <kito.cheng@gmail.com>
20531
20532 * config/nds32/constraints.md (U33): Fine-tune checking condition.
20533 * config/nds32/nds32-md-auxiliary.c (nds32_mem_format): Ditto.
20534 * config/nds32/nds32.h (nds32_16bit_address_type): Add
20535 ADDRESS_POST_MODIFY_LO_REG_IMM3U.
20536
20537 2018-04-05 Shiva Chen <shiva0217@gmail.com>
20538 Kito Cheng <kito.cheng@gmail.com>
20539
20540 * config/nds32/constraints.md (Ufe): New memory constraint.
20541 * config/nds32/nds32-md-auxiliary.c (nds32_mem_format,
20542 nds32_output_16bit_load): Consider r8 register for lwi45.fe format.
20543 * config/nds32/nds32.c (nds32_print_operand): Output lwi45.fe
20544 operands.
20545 * config/nds32/nds32.h (nds32_16bit_address_type): Add ADDRESS_R8_IMM7U.
20546 * config/nds32/nds32.md (*mov<mode>): Adjust pattern.
20547
20548 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
20549
20550 * config/nds32/nds32.md: Use optimize_size in the condition for
20551 alu-shift instructions.
20552
20553 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
20554
20555 * config/nds32/nds32.md (divsi4, udivsi4): New patterns.
20556
20557 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
20558
20559 * config/nds32/nds32.md (negsi2): Refine pattern.
20560
20561 2018-04-05 Kito Cheng <kito.cheng@gmail.com>
20562 Chung-Ju Wu <jasonwucj@gmail.com>
20563
20564 * config/nds32/iterators.md (shift_rotate): New code iterator.
20565 (shift): New code attribute.
20566 * config/nds32/nds32-md-auxiliary.c (nds32_expand_constant): New.
20567 * config/nds32/nds32-protos.h (nds32_expand_constant): Declare.
20568 * config/nds32/nds32.c (nds32_print_operand): Deal with more cases.
20569 * config/nds32/nds32.md (addsi3, *add_srli): Refine implementation for
20570 bit-wise operations.
20571 (andsi3, *andsi3): Ditto.
20572 (iorsi3, *iorsi3, *or_slli, *or_srli): Ditto.
20573 (xorsi3, *xorsi3, *xor_slli, *xor_srli): Ditto.
20574 (<shift>si3, *ashlsi3, *ashrsi3, *lshrsi3, *rotrsi3): Ditto.
20575 * config/nds32/predicates.md (nds32_rimm5u_operand, nds32_and_operand,
20576 nds32_ior_operand, nds32_xor_operand): New predicates.
20577
20578 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
20579
20580 * config/nds32/nds32.md (add<mode>3, sub<mode>3): Rename to ...
20581 (addsi3, subsi3): ... this.
20582
20583 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
20584
20585 * config/nds32/nds32.md (*sub_srli, *and_slli): Fine-tune predicator.
20586
20587 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
20588
20589 * config/nds32/nds32.md: Adjust indention.
20590
20591 2018-04-05 Kito Cheng <kito.cheng@gmail.com>
20592
20593 * config/nds32/nds32.md (feature): New attribute.
20594
20595 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
20596
20597 * config/nds32/nds32.md (subtype): New attribute.
20598
20599 2018-04-04 Thomas Preud'homme <thomas.preudhomme@arm.com>
20600
20601 PR target/85203
20602 * config/arm/arm-builtins.c (arm_expand_builtin): Change
20603 expansion to perform a bitwise AND of the argument followed by a
20604 boolean negation of the result.
20605
20606 2018-04-04 Peter Bergner <bergner@vnet.ibm.com>
20607
20608 PR rtl-optimization/84878
20609 * ddg.c (add_cross_iteration_register_deps): Use DF_REF_BB to determine
20610 the basic block. Assert the use reference is not artificial and that
20611 it has an associated insn.
20612
20613 2018-04-04 Michael Matz <matz@suse.de>
20614
20615 * builtins.c (compute_objsize): Pass correct operand
20616 to array_at_struct_end_p.
20617
20618 2018-04-04 Richard Biener <rguenther@suse.de>
20619
20620 PR lto/85176
20621 * dwarf2out.c (dwarf2out_register_external_die): Peel namespaces
20622 from contexts for DINFO_LEVEL_TERSE and below.
20623
20624 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
20625
20626 * config/nds32/nds32-doubleword.md (move_<mode>): Require
20627 resiter_operand condition.
20628 * config/nds32/nds32.md (*move<mode>): Ditto.
20629
20630 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
20631 Monk Chiang <sh.chiang04@gmail.com>
20632
20633 * config/nds32/nds32.md (movmisalign<mode>): New pattern.
20634
20635 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
20636
20637 * config/nds32/nds32.md (movqi, movhi): Merge into mov<mode>.
20638
20639 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
20640 Kito Cheng <kito.cheng@gmail.com>
20641
20642 * config/nds32/nds32-md-auxiliary.c (nds32_inverse_cond_code,
20643 nds32_cond_code_str, output_cond_branch,
20644 output_cond_branch_compare_zero, nds32_expand_cbranch,
20645 nds32_expand_cstore, nds32_expand_movcc,
20646 nds32_output_cbranchsi4_equality_zero,
20647 nds32_output_cbranchsi4_equality_reg,
20648 nds32_output_cbranchsi4_equality_reg_or_const_int,
20649 nds32_output_cbranchsi4_greater_less_zero: New functions.
20650 * config/nds32/nds32-protos.h (nds32_expand_cbranch,
20651 nds32_expand_cstore, nds32_expand_movcc,
20652 nds32_output_cbranchsi4_equality_zero,
20653 nds32_output_cbranchsi4_equality_reg,
20654 nds32_output_cbranchsi4_equality_reg_or_const_int,
20655 nds32_output_cbranchsi4_greater_less_zero): Declare.
20656 * config/nds32/predicates.md (nds32_movecc_comparison_operator,
20657 nds32_rimm11s_operand): New predicates.
20658 * config/nds32/nds32.h (nds32_expand_result_type): New enum type.
20659 * config/nds32/nds32.md: Rewrite all the branch and conditional move
20660 patterns.
20661
20662 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
20663
20664 * config/nds32/nds32-doubleword.md: Refine all the instruction type.
20665 * config/nds32/nds32.md: Ditto.
20666 * config/nds32/pipelines.md: Ditto.
20667
20668 2018-04-04 Richard Biener <rguenther@suse.de>
20669
20670 PR tree-optimization/85168
20671 * tree-ssa-sccvn.c (vn_reference_maybe_forwprop_address): Avoid
20672 propagating abnormals.
20673
20674 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
20675
20676 * config/nds32/nds32.md (enabled): Use yes/no for this attribute.
20677
20678 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
20679 Kito Cheng <kito.cheng@gmail.com>
20680
20681 * config/nds32/nds32-md-auxiliary.c (nds32_long_call_p): New function.
20682 * config/nds32/nds32-protos.h (nds32_long_call_p): Declare.
20683 * config/nds32/nds32.c (nds32_function_ok_for_sibcall): New function.
20684 (TARGET_FUNCTION_OK_FOR_SIBCALL): Define.
20685 * config/nds32/nds32.md (sibcall_internal): New.
20686 (sibcall_register): Remove.
20687 (sibcall_immediate): Remove.
20688 (sibcall_value_internal): New.
20689 (sibcall_value_register): Remove.
20690 (sibcall_value_immediate): Remove.
20691 * config/nds32/predicates.md (nds32_general_register_operand): New.
20692 (nds32_call_address_operand): New.
20693
20694 2018-04-03 Jakub Jelinek <jakub@redhat.com>
20695
20696 PR rtl-optimization/85167
20697 * shrink-wrap.c (move_insn_for_shrink_wrap): Don't set bb_uses and
20698 bb_defs if *split_p, instead preinitialize it to NULL.
20699
20700 PR tree-optimization/85156
20701 * builtins.c (fold_builtin_expect): Use save_expr on arg1 to avoid
20702 evaluating the argument multiple times.
20703
20704 2018-04-03 Bill Schmidt <wschmidt@linux.ibm.com>
20705
20706 * config/rs6000/emmintrin.h (_mm_cvtpd_epi32): Use __vector rather
20707 than vector.
20708 (_mm_cvtpd_ps): Likewise.
20709 (_mm_cvttpd_epi32): Likewise.
20710 * config/rs6000/mmintrin.h (_mm_unpacklo_pi8): Likewise.
20711 * config/rs6000/xmmintrin.h: For strict-ANSI C++ or C11, undefine
20712 vector, pixel, and bool following altivec.h include.
20713
20714 2018-04-03 Martin Sebor <msebor@redhat.com>
20715
20716 * doc/extend.texi (Common Function Attributes): Clarify.
20717 (const attribute): Likewise.
20718 (pure attribute): Likewise.
20719
20720 2018-04-03 Jakub Jelinek <jakub@redhat.com>
20721
20722 PR target/85169
20723 * config/i386/i386.c (ix86_expand_vector_set): Use
20724 HOST_WIDE_INT_1U << elt instead of 1 << elt. Formatting fix.
20725
20726 2018-04-03 Uros Bizjak <ubizjak@gmail.com>
20727
20728 * config/i386/i386.c (emit_i387_cw_initialization): Always use logic
20729 instructions when changing rounding bits to preserve precision bits
20730 in the x87 control word.
20731
20732 2018-04-03 Martin Liska <mliska@suse.cz>
20733
20734 PR tree-optimization/82491
20735 * rtl.h (strip_offset_and_add): Replace += suboffset with
20736 poly_uint64 () + suboffset.
20737
20738 2018-03-29 Martin Liska <mliska@suse.cz>
20739 Martin Jambor <mjambor@suse.cz>
20740
20741 PR ipa/84947
20742 * ipa-cp.c (propagate_bits_across_jump_function): Bail out if
20743 param_type is not an integral or pointer type.
20744
20745 2018-04-03 Richard Biener <rguenther@suse.de>
20746
20747 * sese.h (recompute_all_dominators): Remove.
20748
20749 2018-04-02 Martin Sebor <msebor@redhat.com>
20750
20751 * doc/invoke.texi (-Wrestrict): Fix typos.
20752
20753 2018-04-02 Jim Wilson <jimw@sifive.com>
20754
20755 * config/riscv/riscv.h (SHIFT_COUNT_TRUNCATED): Set to zero.
20756 * config/riscv/riscv.md (<optab>si3): Use QImode shift count.
20757 (<optab>di3, <optab>si3_extend): Likewise.
20758 (<optab>si3_mask, <optab>si3_mask_1): New.
20759 (<optab>di3_mask, <optab>di3_mask_1): New.
20760 (<optab>si3_extend_mask, <optab>si3_extend_mask_1): New.
20761 (lshrsi3_zero_extend_1): Use VOIDmode shift count.
20762 * config/riscv/sync.md (atomic_test_and_set): Emit QImode shift count.
20763
20764 2018-04-02 Gerald Pfeifer <gerald@pfeifer.com>
20765
20766 * doc/cpp.texi (Variadic Macros): Fix line continuation in an
20767 example.
20768
20769 2018-04-02 Chung-Ju Wu <jasonwucj@gmail.com>
20770
20771 * config/nds32/nds32.c (TARGET_CANONICALIZE_COMPARISON): Define.
20772 (nds32_canonicalize_comparison): New function.
20773
20774 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
20775 Kito Cheng <kito.cheng@gmail.com>
20776 Kuan-Lin Chen <kuanlinchentw@gmail.com>
20777
20778 * config.gcc (nds32): Add nds32-relax-opt.o into extra_objs.
20779 * config/nds32/constants.md (unspec_volatile_element): Add
20780 UNSPEC_VOLATILE_RELAX_GROUP.
20781 * config/nds32/nds32-relax-opt.c: New file.
20782 * config/nds32/nds32-predicates.c
20783 (nds32_symbol_load_store_p): New function.
20784 * config/nds32/nds32-protos.h
20785 (nds32_symbol_load_store_p): Declare function.
20786 (make_pass_nds32_relax_opt): Declare new rtl pass function.
20787 * config/nds32/nds32.c
20788 (nds32_register_pass): New function to register pass.
20789 (nds32_register_passes): New function to register passes.
20790 * config/nds32/nds32.md (relax_group): New pattern.
20791 * config/nds32/nds32.opt (mrelax-hint): New option.
20792 * config/nds32/t-nds32 (nds32-relax-opt.o): New dependency.
20793
20794 2018-04-01 Kito Cheng <kito.cheng@gmail.com>
20795
20796 * config/nds32/t-nds32: Modify files dependency.
20797
20798 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
20799
20800 * config/nds32/nds32.h (FUNCTION_PROFILER): Output newline character.
20801 (PROFILE_HOOK): Define its implementation.
20802
20803 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
20804
20805 * config/nds32/nds32.h (WCHAR_TYPE, WCHAR_TYPE_SIZE): Use unsigned int
20806 type and 32-bit size.
20807
20808 2018-04-01 Jakub Jelinek <jakub@redhat.com>
20809
20810 PR middle-end/85090
20811 * config/i386/sse.md (V): Add V64QI and V32HI for TARGET_AVX512F.
20812 (V_128_256): New mode iterator.
20813 (*avx512dq_vextract<shuffletype>64x2_1 splitter): New define_split.
20814 (*avx512f_vextract<shuffletype>32x4_1 splitter): Likewise.
20815 (xop_pcmov_<mode><avxsizesuffix>): Use V_128_256 mode iterator instead
20816 of V.
20817 * config/i386/i386.c (ix86_expand_vector_set): Improve V32HImode and
20818 V64QImode expansion for !TARGET_AVX512BW && TARGET_AVX512F.
20819
20820 2018-03-31 Segher Boessenkool <segher@kernel.crashing.org>
20821
20822 PR target/83315
20823 * config/rs6000/xmmintrin.h (_mm_set_ps, _mm_max_ps): Handle (quiet)
20824 NaN inputs correctly.
20825
20826 2018-03-30 Peter Bergner <bergner@vnet.ibm.com>
20827
20828 PR target/80546
20829 * config/rs6000/vsx.md (??r): New mode attribute.
20830 (*vsx_mov<mode>_64bit): Use it.
20831 (*vsx_mov<mode>_32bit): Likewise.
20832
20833 2018-03-30 Martin Sebor <msebor@redhat.com>
20834
20835 PR tree-optimization/84818
20836 * builtins.c (check_access): Use warning_n.
20837
20838 2018-03-30 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
20839
20840 PR target/83822
20841 * config/rs6000/rs6000-string.c (expand_compare_loop): Fix redundant
20842 condition.
20843 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Fix redundant
20844 condition.
20845
20846 2018-03-30 Julia Koval <julia.koval@intel.com>
20847
20848 PR target/84413
20849 * x86-tune.def (movx, partial_reg_dependency): Enable for
20850 m_SKYLAKE_AVX512.
20851
20852 2018-03-29 Vladimir Makarov <vmakarov@redhat.com>
20853
20854 PR inline-asm/84985
20855 * lra-constraints.c (process_alt_operands): Move setting
20856 this_alternative_matches below.
20857
20858 2018-03-29 Martin Liska <mliska@suse.cz>
20859
20860 PR lto/84995.
20861 * doc/invoke.texi: Document how LTO works with debug info.
20862 Describe auto-load support of binutils. Mention 'x86-64'
20863 as valid option value of -march option.
20864
20865 2018-03-29 Jakub Jelinek <jakub@redhat.com>
20866
20867 * config/i386/sse.md (<avx512>_blendm<mode>): Use <sseintprefix>.
20868
20869 PR c/85094
20870 * fold-const.c (operand_equal_p): Handle DEBUG_BEGIN_STMT.
20871 For STATEMENT_LIST, pass down OEP_LEXICOGRAPHIC and maybe
20872 OEP_NO_HASH_CHECK for recursive call, to avoid exponential
20873 checking.
20874
20875 2018-03-28 Peter Bergner <bergner@vnet.ibm.com>
20876
20877 PR target/84912
20878 * config/rs6000/rs6000.h (RS6000_BTM_POWERPC64): New define.
20879 (RS6000_BTM_COMMON): Add RS6000_BTM_POWERPC64.
20880 * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Add support
20881 for RS6000_BTM_POWERPC64.
20882 (rs6000_invalid_builtin): Add handling for RS6000_BTM_POWERPC64
20883 (rs6000_builtin_mask_names): Add RS6000_BTM_POWERPC64.
20884 * config/rs6000/rs6000-builtin.def (BU_P7_POWERPC64_MISC_2): New macro
20885 definition.
20886 (DIVDE): Use it.
20887 (DIVDEU): Likewise.
20888
20889 2018-03-28 Carl Love <cel@us.ibm.com>
20890
20891 Revert
20892 2017-09-27 Carl Love <cel@us.ibm.com>
20893
20894 * config/rs6000/rs6000-builtin.def (BU_FP_1MISC_1): Add define macro.
20895 (FCTID, FCTIW): Add BU_FP_MISC_1 macro expansion for builtins.
20896 * config/rs6000/rs6000.md (lrintsfsi2): Add define_insn for the
20897 fctiw instruction.
20898
20899 2018-03-28 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
20900
20901 * config/rs6000/xmmintrin.h (_mm_max_pi16): Use __vector __bool
20902 instead of __vector bool.
20903 (_mm_max_pu8): Likewise.
20904 (_mm_min_pi16): Likewise.
20905
20906 2018-03-28 Peter Bergner <bergner@vnet.ibm.com>
20907
20908 PR target/84912
20909 * config/rs6000/rs6000-builtin.def (DIVWEO): Delete macro expansion.
20910 (DIVWEUO): Likewise.
20911 (DIVDEO): Likewise.
20912 (DIVDEUO): Likewise.
20913 * config/rs6000/rs6000.c (builtin_function_type): Remove support for
20914 DIVWEUO and DIVDEUO.
20915 * config/rs6000/rs6000.md (UNSPEC_DIVEO, UNSPEC_DIVEUO): Delete unspecs.
20916 (UNSPEC_DIV_EXTEND): Remove deleted unspecs.
20917 (div_extend): Likewise.
20918 * doc/extend.texi (__builtin_divweo): Remove documentation for deleted
20919 builtin function.
20920 (__builtin_divweuo): Likewise.
20921 (__builtin_divdeo): Likewise.
20922 (__builtin_divdeuo): Likewise.
20923
20924 2018-03-28 Jakub Jelinek <jakub@redhat.com>
20925
20926 PR target/85095
20927 * config/i386/i386.md (*add<mode>3_carry_0, *addsi3_carry_zext_0,
20928 *sub<mode>3_carry_0, *subsi3_carry_zext_0): New patterns.
20929
20930 PR tree-optimization/82004
20931 * gimple-match-head.c (optimize_pow_to_exp): New function.
20932 * match.pd (pow(C,x) -> exp(log(C)*x)): Wrap with #if GIMPLE.
20933 Don't fold to exp if optimize_pow_to_exp is false.
20934
20935 2018-03-28 Martin Liska <mliska@suse.cz>
20936
20937 PR other/84819
20938 * calls.c (initialize_argument_information): Fix trailing space.
20939 * common.opt: Fix typo and provide better explanation for
20940 -fsanitize-coverage option.
20941 * config/i386/i386.opt: Fix typo.
20942
20943 2018-03-28 Jakub Jelinek <jakub@redhat.com>
20944 Martin Liska <mliska@suse.cz>
20945
20946 PR sanitizer/85081
20947 * gimplify.c (asan_poison_variable): Don't do the check for
20948 gimplify_omp_ctxp here.
20949 (gimplify_decl_expr): Do it here.
20950 (gimplify_target_expr): Likewise.
20951
20952 2018-03-28 Martin Liska <mliska@suse.cz>
20953
20954 PR target/84988
20955 * config/i386/i386.c (ix86_function_arg_advance): Do not call
20956 chkp_type_bounds_count if MPX is not enabled.
20957
20958 2018-03-27 Chung-Ju Wu <jasonwucj@gmail.com>
20959
20960 * config/nds32/nds32.h (BRANCH_COST): Adjust cost.
20961
20962 2018-03-27 Michael Meissner <meissner@linux.vnet.ibm.com>
20963
20964 PR target/84914
20965 * config/rs6000/rs6000.c (create_complex_muldiv): New helper
20966 function to create the function decl for complex long double
20967 multiply and divide for -mabi=ieeelongdouble.
20968 (init_float128_ieee): Call it.
20969
20970 2018-03-27 H.J. Lu <hongjiu.lu@intel.com>
20971
20972 PR target/85044
20973 * config/i386/i386.c (ix86_trampoline_init): Insert ENDBR for
20974 -fcf-protection=branch -mibt.
20975 * config/i386/i386.h (TRAMPOLINE_SIZE): Increased by 4 bytes.
20976
20977 2018-03-27 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
20978
20979 PR target/81863
20980 * config/arm/arm.c (arm_valid_symbolic_address): Handle
20981 arm_word_relocations.
20982
20983 2018-03-27 Cesar Philippidis <cesar@codesourcery.com>
20984
20985 PR target/85056
20986 * config/nvptx/nvptx.c (nvptx_assemble_decl_begin): Add '[]' to
20987 extern array declarations.
20988
20989 2018-03-27 Richard Biener <rguenther@suse.de>
20990
20991 PR middle-end/84067
20992 * match.pd ((A * C) +- (B * C) -> (A+-B) * C): Guard with
20993 explicit single_use checks.
20994
20995 2018-03-27 Richard Biener <rguenther@suse.de>
20996
20997 PR tree-optimization/85082
20998 * tree-ssa-sccvn.c (vn_reference_lookup_or_insert_for_pieces):
20999 Valueize the VUSE.
21000
21001 2018-03-27 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
21002
21003 * config.gcc (aarch64*-*-linux*): New TARGET_DEFAULT_ASYNC_UNWIND_TABLES
21004 * common/config/aarch64/aarch64-common.c (aarch64_optimization_table[]):
21005 Turn on fasynchronous-unwind-tables and funwind-tables.
21006
21007 2018-03-26 Uros Bizjak <ubizjak@gmail.com>
21008
21009 PR target/85073
21010 * config/i386/i386.md (*bmi_blsr_<mode>_cmp): New insn pattern.
21011 (*bmi_blsr_<mode>_ccz): Ditto.
21012
21013 2018-03-26 Tom de Vries <tom@codesourcery.com>
21014
21015 PR tree-optimization/85063
21016 * omp-general.c (offloading_function_p): New function. Factor out
21017 of ...
21018 * omp-offload.c (pass_omp_target_link::gate): ... here.
21019 * omp-general.h (offloading_function_p): Declare.
21020 * tree-switch-conversion.c (build_one_array): Mark CSWTCH.x variable
21021 with attribute omp declare target for offloading functions.
21022
21023 2018-03-24 Richard Sandiford <richard.sandiford@linaro.org>
21024
21025 PR tree-optimization/84005
21026 * tree-data-ref.h (get_base_for_alignment): Declare.
21027 * tree-data-ref.c (get_base_for_alignment_1): New function.
21028 (get_base_for_alignment): Likewise.
21029 * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Use
21030 get_base_for_alignment to find a suitable base object, instead
21031 of always using drb->base_address.
21032
21033 2018-03-23 Jakub Jelinek <jakub@redhat.com>
21034
21035 PR inline-asm/85022
21036 * emit-rtl.c (init_emit_regs): Indicate that VOIDmode MEMs don't have
21037 known size by default.
21038
21039 2018-03-23 Vladimir Makarov <vmakarov@redhat.com>
21040
21041 PR inline-asm/85030
21042 * lra-constraints.c (process_alt_operands): Don't match BLKmode
21043 and non BLKmode operands.
21044
21045 2018-03-23 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
21046
21047 PR target/85026
21048 * config/arm/arm.md (unaligned_loadhis): Remove first alternative.
21049 Clean up attributes.
21050
21051 2018-03-23 Richard Biener <rguenther@suse.de>
21052
21053 PR debug/85020
21054 * dwarf2out.c (rtl_for_decl_location): Do not generate RTL early when
21055 we are going to emit early debug for LTO.
21056
21057 2018-03-23 Jakub Jelinek <jakub@redhat.com>
21058
21059 PR inline-asm/85034
21060 * function.c (match_asm_constraints_1): Don't optimize if input
21061 doesn't satisfy general_operand predicate for output's mode.
21062
21063 PR inline-asm/85022
21064 * alias.c (write_dependence_p): Don't require for x_canonicalized
21065 non-VOIDmode if x has VOIDmode.
21066
21067 PR sanitizer/85029
21068 * sanopt.c (maybe_optimize_ubsan_ptr_ifn): If DECL_REGISTER (base),
21069 just don't try to optimize it rather than assert it never happens.
21070
21071 2018-03-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
21072
21073 * config/rs6000/rs6000-builtin.def: Remove various BU_ALTIVEC_X
21074 macro expansions for definition of ST_INTERNAL_<mode> and
21075 LD_INTERNAL_<mode> builtins.
21076 * config/rs6000/rs6000-protos.h (rs6000_address_for_altivec):
21077 Remove prototype.
21078 * config/rs6000/rs6000.c (altivec_expand_ld_builtin): Delete this
21079 function.
21080 (altivec_expand_st_builtin): Likewise.
21081 (altivec_expand_builtin): Remove calls to deleted functions.
21082 (rs6000_address_for_altivec): Delete this function.
21083 * config/rs6000/vector.md: Remove expands for
21084 vector_altivec_load_<mode> and vector_altivec_store_<mode>.
21085
21086 2018-03-22 Sudakshina Das <sudi.das@arm.com>
21087
21088 PR target/84826
21089 * config/arm/arm.h (machine_function): Add static_chain_stack_bytes.
21090 * config/arm/arm.c (arm_compute_static_chain_stack_bytes): Avoid
21091 re-computing once computed.
21092 (arm_expand_prologue): Compute machine->static_chain_stack_bytes.
21093 (arm_init_machine_status): Initialize
21094 machine->static_chain_stack_bytes.
21095
21096 2018-03-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
21097
21098 PR target/84760
21099 * doc/extend.texi: Add four new prototypes for vec_ld.
21100 * config/rs6000/rs6000-builtin.def (LVX_V1TI): Reorder symbol
21101 definitions for more logical presentation.
21102 * config/rs6000/rs6000-c.c: (altivec_overloaded_builtins): Add
21103 entries for V1TI variants of __builtin_altivec_ld builtin.
21104 * config/rs6000/rs6000.c: (altivec_expand_lv_builtin): Add test and
21105 handling of V1TI variant of LVX icode pattern.
21106 (altivec_expand_builtin): Add case for ALTIVEC_BUILTIN_LVX_V1TI.
21107 (rs6000_gimple_fold_builtin): Likewise.
21108 (altivec_init_builtins): Add code to define
21109 __builtin_altivec_lvx_v1ti function.
21110
21111 2018-03-22 Jakub Jelinek <jakub@redhat.com>
21112
21113 PR inline-asm/84941
21114 * function.c (match_asm_constraints_1): Don't do the optimization
21115 if input isn't a REG, SUBREG, MEM or constant.
21116
21117 2018-03-22 Tom de Vries <tom@codesourcery.com>
21118
21119 PR tree-optimization/84956
21120 * tree-ssa-tail-merge.c (find_clusters_1): Skip bbs with
21121 bb_has_abnormal_pred.
21122
21123 2018-03-22 Jakub Jelinek <jakub@redhat.com>
21124
21125 PR sanitizer/85018
21126 * dwarf2asm.c (dw2_output_indirect_constant_1): Set
21127 DECL_INITIAL (decl) to decl at the end.
21128 * varasm.c (use_blocks_for_decl_p): Revert the 2018-03-20 change,
21129 adjust the comment.
21130
21131 2018-03-21 Joseph Myers <joseph@codesourcery.com>
21132
21133 * doc/extend.texi (__builtin_tgmath): Document when complex
21134 integer types are treated as _Complex _Float64.
21135
21136 2018-03-21 Tom de Vries <tom@codesourcery.com>
21137
21138 * doc/extend.texi (__builtin_extend_pointer): Remove pasto.
21139
21140 2018-03-21 Jakub Jelinek <jakub@redhat.com>
21141
21142 PR tree-optimization/84960
21143 * tree-cfg.c (remove_bb): Don't move forced labels into bb->prev_bb
21144 if it is ENTRY block, move them into single succ of ENTRY in that case.
21145
21146 2018-03-21 Richard Sandiford <richard.sandiford@linaro.org>
21147
21148 PR tree-optimization/84811
21149 * poly-int.h (poly_span_traits): Remove the T3 parameter and
21150 promote HOST_WIDE_INT T2 - T1 results to unsigned HOST_WIDE_INT.
21151 (maybe_in_range_p, known_in_range_p, ranges_known_overlap_p):
21152 (known_subrange_p): Update accordingly. Cast each value involved
21153 in the size comparison, rather than casting the result of the
21154 subtraction.
21155
21156 2018-03-21 Jakub Jelinek <jakub@redhat.com>
21157
21158 PR tree-optimization/84982
21159 * gimple-ssa-store-merging.c (invert_op): Handle boolean inversion
21160 by flipping the least significant bit rather than all bits from
21161 bitpos to bitpos + bitsize - 1.
21162
21163 2018-03-21 Nathan Sidwell <nathan@acm.org>
21164
21165 * doc/extend.texi (Deprecated Features): Remove mention of
21166 long-deleted deprecations.
21167
21168 2018-03-21 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
21169
21170 PR jit/84288
21171 * configure.ac (gcc_cv_ld_soname) <*-*-solaris2*>: Set.
21172 * configure: Regenerate.
21173
21174 2018-03-21 Tom de Vries <tom@codesourcery.com>
21175
21176 PR tree-optimization/83126
21177 * tree-parloops.c (num_phis): New function.
21178 (gen_parallel_loop): Detect and handle canonicalize_loop_ivs failure.
21179
21180 2018-03-21 Nathan Sidwell <nathan@acm.org>
21181
21182 * doc/extend.texi (Deprecated Features): Update deprecated flags,
21183 mention anon-struct/union members and trailing attributes.
21184
21185 2018-03-21 Bin Cheng <bin.cheng@arm.com>
21186
21187 PR tree-optimization/84969
21188 * tree-loop-distribution.c (fuse_memset_builtins): Don't reorder
21189 builtin memset partitions if they set different rhs values.
21190
21191 2018-03-21 Jakub Jelinek <jakub@redhat.com>
21192
21193 PR rtl-optimization/84989
21194 * simplify-rtx.c (simplify_unary_operation_1): Don't try to simplify
21195 VEC_DUPLICATE with scalar result mode.
21196
21197 2018-03-21 Martin Liska <mliska@suse.cz>
21198
21199 PR ipa/84963
21200 * ipa-icf.c (sem_item_optimizer::fixup_points_to_sets): Remove
21201 not intended return statement.
21202
21203 2018-03-21 Martin Liska <mliska@suse.cz>
21204
21205 PR target/84988
21206 * tree-chkp.c (CHKP_ARRAY_MAX_CHECK_STEPS): Define a new macro.
21207 (chkp_find_bound_slots_1): Limit number of iterations.
21208
21209 2018-03-20 David H. Gutteridge <dhgutteridge@sympatico.ca>
21210
21211 PR target/84838
21212 * Minor grammar fixes for x86 options.
21213
21214 2018-03-20 Jakub Jelinek <jakub@redhat.com>
21215
21216 PR debug/84875
21217 * dce.c (delete_unmarked_insns): Don't remove frame related noop moves
21218 holding REG_CFA_RESTORE notes, instead turn them into a USE.
21219
21220 2018-03-20 Peter Bergner <bergner@vnet.ibm.com>
21221
21222 PR target/83789
21223 * config/rs6000/altivec.md (altivec_lvx_<mode>_2op): Delete define_insn.
21224 (altivec_lvx_<mode>_1op): Likewise.
21225 (altivec_stvx_<mode>_2op): Likewise.
21226 (altivec_stvx_<mode>_1op): Likewise.
21227 (altivec_lvx_<VM2:mode>): New define_expand.
21228 (altivec_stvx_<VM2:mode>): Likewise.
21229 (altivec_lvx_<VM2:mode>_2op_<P:mptrsize>): New define_insn.
21230 (altivec_lvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
21231 (altivec_stvx_<VM2:mode>_2op_<P:mptrsize>): Likewise.
21232 (altivec_stvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
21233 * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Use new expanders.
21234 (rs6000_gen_lvx): Likewise.
21235 * config/rs6000/rs6000.c (altivec_expand_lv_builtin): Likewise.
21236 (altivec_expand_stv_builtin): Likewise.
21237 (altivec_expand_builtin): Likewise.
21238 * config/rs6000/vector.md: Likewise.
21239
21240 2018-03-20 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
21241
21242 PR target/82518
21243 * config/arm/arm.c (arm_array_mode_supported_p): Return false for
21244 BYTES_BIG_ENDIAN.
21245
21246 2018-03-20 Richard Biener <rguenther@suse.de>
21247
21248 PR target/84986
21249 * config/i386/i386.c (ix86_add_stmt_cost): Only cost
21250 sign-conversions as zero, fall back to standard scalar_stmt
21251 cost for the rest.
21252
21253 2018-03-20 Martin Liska <mliska@suse.cz>
21254
21255 PR ipa/84825
21256 * predict.c (rebuild_frequencies): Handle case when we have
21257 PROFILE_ABSENT, but flag_guess_branch_prob is false.
21258
21259 2018-03-20 Jakub Jelinek <jakub@redhat.com>
21260
21261 PR target/84990
21262 * dwarf2asm.c (dw2_output_indirect_constant_1): Temporarily turn off
21263 flag_section_anchors.
21264 * varasm.c (use_blocks_for_decl_p): Remove hack for
21265 dw2_force_const_mem.
21266
21267 PR target/84845
21268 * config/aarch64/aarch64.md (*aarch64_reg_<mode>3_neg_mask2): Rename
21269 to ...
21270 (*aarch64_<optab>_reg_<mode>3_neg_mask2): ... this. If pseudos can't
21271 be created, use lowpart_subreg of operands[0] rather than operands[0]
21272 itself.
21273 (*aarch64_reg_<mode>3_minus_mask): Rename to ...
21274 (*aarch64_ashl_reg_<mode>3_minus_mask): ... this.
21275 (*aarch64_<optab>_reg_di3_mask2): Use const_int_operand predicate
21276 and n constraint instead of aarch64_shift_imm_di and Usd.
21277 (*aarch64_reg_<optab>_minus<mode>3): Rename to ...
21278 (*aarch64_<optab>_reg_minus<mode>3): ... this.
21279
21280 2018-03-20 Sudakshina Das <sudi.das@arm.com>
21281
21282 PR target/82989
21283 * config/arm/neon.md (ashldi3_neon): Update ?s for constraints
21284 to favor GPR over NEON registers.
21285 (<shift>di3_neon): Likewise.
21286
21287 2018-03-20 Tom de Vries <tom@codesourcery.com>
21288
21289 PR target/84952
21290 * config/nvptx/nvptx.c (nvptx_single): Don't neuter bar.sync.
21291 (nvptx_process_pars): Emit bar.sync asap and alap.
21292
21293 2018-03-20 Tom de Vries <tom@codesourcery.com>
21294
21295 PR target/84954
21296 * config/nvptx/nvptx.c (prevent_branch_around_nothing): Also update
21297 seen_label if seen_label is already set.
21298
21299 2018-03-20 Jakub Jelinek <jakub@redhat.com>
21300
21301 PR target/84945
21302 * config/i386/i386.c (fold_builtin_cpu): For features above 31
21303 use __cpu_features2 variable instead of __cpu_model.__cpu_features[0].
21304 Use 1U instead of 1. Formatting fixes.
21305
21306 PR c/84953
21307 * builtins.c (fold_builtin_strpbrk): For strpbrk(x, "") use type
21308 instead of TREE_TYPE (s1) for the return value.
21309
21310 2018-03-19 Jakub Jelinek <jakub@redhat.com>
21311
21312 PR tree-optimization/84946
21313 * gimple-ssa-store-merging.c (mem_valid_for_store_merging): Compute
21314 bitsize + bitsize in poly_uint64 rather than poly_int64.
21315
21316 PR sanitizer/78651
21317 * dwarf2asm.c: Include fold-const.c.
21318 (dw2_output_indirect_constant_1): Set DECL_INITIAL (decl) to ADDR_EXPR
21319 of decl rather than decl itself.
21320
21321 PR rtl-optimization/84643
21322 * memmodel.h (enum memmodel): Add MEMMODEL_MAX enumerator.
21323
21324 2018-03-19 Maxim Ostapenko <m.ostapenko@samsung.com>
21325
21326 PR sanitizer/78651
21327 * dwarf2asm.c (dw2_output_indirect_constant_1): Disable ASan before
21328 calling assemble_variable.
21329
21330 2018-03-19 Sudakshina Das <sudi.das@arm.com>
21331
21332 PR target/81647
21333 * config/aarch64/aarch64-simd.md (vec_cmp<mode><v_int_equiv>): Modify
21334 instructions for UNLT, UNLE, UNGT, UNGE, UNEQ, UNORDERED and ORDERED.
21335
21336 2018-03-19 Jim Wilson <jimw@sifive.com>
21337
21338 PR bootstrap/84856
21339 * config/riscv/riscv.c (riscv_function_arg_boundary): Use
21340 PREFERRED_STACK_BOUNDARY instead of STACK_BOUNDARY.
21341 (riscv_first_stack_step): Likewise.
21342 (riscv_option_override): Use STACK_BOUNDARY instead of
21343 MIN_STACK_BOUNDARY.
21344 * config/riscv/riscv.h (STACK_BOUNDARY): Renamed from
21345 MIN_STACK_BOUNDARY.
21346 (BIGGEST_ALIGNMENT): Set to 128.
21347 (PREFERRED_STACK_BOUNDARY): Renamed from STACK_BOUNDARY.
21348 (RISCV_STACK_ALIGN): Use PREFERRED_STACK_BOUNDARY instead of
21349 STACK_BOUNDARY.
21350
21351 2018-03-19 Richard Biener <rguenther@suse.de>
21352
21353 PR tree-optimization/84933
21354 * tree-vrp.c (set_and_canonicalize_value_range): Treat out-of-bound
21355 values as -INF/INF when canonicalizing an ANTI_RANGE to a RANGE.
21356
21357 2018-03-19 Richard Biener <rguenther@suse.de>
21358
21359 PR tree-optimization/84859
21360 * tree-ssa-phiopt.c (single_trailing_store_in_bb): New function.
21361 (cond_if_else_store_replacement): Perform sinking operation on
21362 single-store BBs regardless of MAX_STORES_TO_SINK setting.
21363 Generalize what a BB with a single eligible store is.
21364
21365 2018-03-19 Richard Biener <rguenther@suse.de>
21366
21367 PR tree-optimization/84929
21368 * tree-data-ref.c (analyze_siv_subscript_cst_affine): Guard
21369 chrec_is_positive against non-chrec arg.
21370
21371 2018-03-19 Tamar Christina <tamar.christina@arm.com>
21372
21373 PR target/84711
21374 * config/arm/arm.c (arm_can_change_mode_class): revert r258554.
21375
21376 2018-03-18 Martin Liska <mliska@suse.cz>
21377
21378 PR rtl-optimization/84635
21379 * regrename.c (build_def_use): Use matches_mode only when
21380 matches >= 0.
21381
21382 2018-03-18 Richard Sandiford <richard.sandiford@linaro.org>
21383
21384 PR tree-optimization/84913
21385 * tree-vect-loop.c (vectorizable_reduction): Don't try to
21386 vectorize chains of COND_EXPRs.
21387
21388 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
21389
21390 * config/nds32/nds32.h (MAX_REGS_PER_ADDRESS): Fix the value.
21391
21392 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
21393
21394 * config/nds32/nds32.h (LOGICAL_OP_NON_SHORT_CIRCUIT): Define.
21395
21396 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
21397
21398 * config/nds32/nds32.h (CLZ_DEFINED_VALUE_AT_ZERO): Define.
21399
21400 2018-03-17 Chung-Ju Wu <jasonwucj@gmail.com>
21401 Kito Cheng <kito.cheng@gmail.com>
21402
21403 * config/nds32/nds32-protos.h (nds32_adjust_reg_alloc_order): Declare.
21404 * config/nds32/nds32.c (nds32_reg_alloc_order_for_speed): New array.
21405 (nds32_adjust_reg_alloc_order): New function.
21406 * config/nds32/nds32.h (ADJUST_REG_ALLOC_ORDER): Define.
21407
21408 2018-03-17 Kito Cheng <kito.cheng@gmail.com>
21409
21410 * config/nds32/nds32.c (nds32_asm_output_mi_thunk,
21411 nds32_print_operand, nds32_print_operand_address): Use
21412 HOST_WIDE_INT_PRINT_DEC instead.
21413
21414 2018-03-17 Chung-Ju Wu <jasonwucj@gmail.com>
21415
21416 * config/nds32/nds32.c (nds32_register_priority): Modify cost.
21417
21418 2018-03-17 Jakub Jelinek <jakub@redhat.com>
21419
21420 PR target/84902
21421 * config/i386/i386.c (initial_ix86_tune_features,
21422 initial_ix86_arch_features): Use unsigned HOST_WIDE_INT rather than
21423 unsigned long long.
21424 (set_ix86_tune_features): Change ix86_tune_mask from unsigned int
21425 to unsigned HOST_WIDE_INT, initialize to HOST_WIDE_INT_1U << ix86_tune
21426 rather than 1u << ix86_tune. Formatting fix.
21427 (ix86_option_override_internal): Change ix86_arch_mask from
21428 unsigned int to unsigned HOST_WIDE_INT, initialize to
21429 HOST_WIDE_INT_1U << ix86_arch rather than 1u << ix86_arch.
21430 (ix86_function_specific_restore): Likewise.
21431
21432 2018-03-16 Jakub Jelinek <jakub@redhat.com>
21433
21434 PR target/84899
21435 * postreload.c (reload_combine_recognize_pattern): Perform
21436 INTVAL addition in unsigned HOST_WIDE_INT type to avoid UB and
21437 truncate_int_for_mode the result for the destination's mode.
21438
21439 PR c/84909
21440 * hsa-gen.c (mem_type_for_type): Fix comment typo.
21441 * tree-vect-loop-manip.c (vect_create_cond_for_niters_checks):
21442 Likewise.
21443 * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
21444 Likewise.
21445
21446 2018-03-16 Vladimir Makarov <vmakarov@redhat.com>
21447
21448 PR target/84876
21449 * lra-assigns.c (lra_split_hard_reg_for): Don't use
21450 regno_allocno_class_array and sorted_pseudos.
21451 * lra-constraints.c (spill_hard_reg_in_range): Ignore hard regs in
21452 insns where regno is used.
21453
21454 2018-03-16 Martin Liska <mliska@suse.cz>
21455
21456 PR ipa/84833
21457 * multiple_target.c (create_dispatcher_calls): Redirect
21458 reference in the symbol table.
21459
21460 2018-03-16 Martin Liska <mliska@suse.cz>
21461
21462 PR ipa/84722
21463 * multiple_target.c (create_dispatcher_calls): Redirect also
21464 an alias.
21465
21466 2018-03-16 Jakub Jelinek <jakub@redhat.com>
21467
21468 PR c++/79937
21469 PR c++/82410
21470 * tree.h (TARGET_EXPR_NO_ELIDE): Define.
21471 * gimplify.c (gimplify_modify_expr_rhs): Don't elide TARGET_EXPRs with
21472 TARGET_EXPR_NO_ELIDE flag set unless *expr_p is INIT_EXPR.
21473
21474 2018-03-16 Julia Koval <julia.koval@intel.com>
21475
21476 * doc/invoke.texi (Skylake Server): Add CLWB.
21477 Cannonlake): Remove CLWB.
21478
21479 2018-03-16 Jakub Jelinek <jakub@redhat.com>
21480
21481 PR tree-optimization/84841
21482 * tree-ssa-reassoc.c (INTEGER_CONST_TYPE): Change to 1 << 4 from
21483 1 << 3.
21484 (FLOAT_ONE_CONST_TYPE): Define.
21485 (constant_type): Return FLOAT_ONE_CONST_TYPE for -1.0 and 1.0.
21486 (sort_by_operand_rank): Put entries with higher constant_type last
21487 rather than first to match comments.
21488
21489 2018-03-15 Sandra Loosemore <sandra@codesourcery.com>
21490
21491 * config/nios2/nios2.md (movsi_internal): Fix thinko in
21492 split predicate.
21493
21494 2018-03-15 Jakub Jelinek <jakub@redhat.com>
21495
21496 PR c++/79085
21497 * calls.c (expand_call): For TREE_ADDRESSABLE rettype ignore alignment
21498 check and use address of target always.
21499
21500 2018-03-15 H.J. Lu <hongjiu.lu@intel.com>
21501
21502 PR target/84574
21503 * config/i386/i386.c (indirect_thunk_needed): Update comments.
21504 (indirect_thunk_bnd_needed): Likewise.
21505 (indirect_thunks_used): Likewise.
21506 (indirect_thunks_bnd_used): Likewise.
21507 (indirect_return_needed): New.
21508 (indirect_return_bnd_needed): Likewise.
21509 (output_indirect_thunk_function): Add a bool argument for
21510 function return.
21511 (output_indirect_thunk_function): Don't generate alias for
21512 function return thunk.
21513 (ix86_code_end): Call output_indirect_thunk_function to generate
21514 function return thunks.
21515 (ix86_output_function_return): Set indirect_return_bnd_needed
21516 and indirect_return_needed instead of indirect_thunk_bnd_needed
21517 and indirect_thunk_needed.
21518
21519 2018-03-15 Olga Makhotina <olga.makhotina@intel.com>
21520
21521 * config/i386/sgxintrin.h (_enclv_u32): New intrinsic.
21522 (__enclv_bc, __enclv_cd, __enclv_generic): New definitions.
21523 (ERDINFO, ETRACKC, ELDBC, ELDUC): New leaves.
21524
21525 2018-03-15 David Malcolm <dmalcolm@redhat.com>
21526 Paul Hua <paul.hua.gm@gmail.com>
21527
21528 PR c/84852
21529 * gcc.dg/fixits-pr84852-1.c: Fix filename in dg-regexp.
21530
21531 2018-03-15 Segher Boessenkool <segher@kernel.crashing.org>
21532
21533 * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add back the
21534 TARGET_DOUBLE_FLOAT and TARGET_SINGLE_FLOAT conditions on the DFmode
21535 resp. SFmode cases.
21536
21537 2018-03-15 Tamar Christina <tamar.christina@arm.com>
21538
21539 PR target/84711
21540 * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
21541 instead of GET_MODE_SIZE when comparing Units.
21542
21543 2018-03-15 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
21544
21545 PR target/68256
21546 * varasm.c (hash_section): Return an unchangeble hash value
21547 * config/aarch64/aarch64.c (aarch64_use_blocks_for_constant_p):
21548 Return !aarch64_can_use_per_function_literal_pools_p ().
21549
21550 2018-03-15 Jakub Jelinek <jakub@redhat.com>
21551
21552 PR target/84860
21553 * optabs.c (emit_conditional_move): Pass address of cmode's copy
21554 rather than address of cmode as last argument to prepare_cmp_insn.
21555
21556 2018-03-15 Julia Koval <julia.koval@intel.com>
21557
21558 * config/i386/i386.c (F_AVX512VBMI2, F_GFNI, F_VPCLMULQDQ,
21559 F_AVX512VNNI, F_AVX512BITALG): New.
21560
21561 2018-03-14 John David Anglin <danglin@gcc.gnu.org>
21562
21563 PR target/83451
21564 * config/pa/pa.c (pa_emit_move_sequence): Always emit secondary reload
21565 insn for floating-point loads and stores.
21566
21567 2018-03-14 Carl Love <cel@us.ibm.com>
21568
21569 * config/rs6000/rs6000-c.c: Add macro definitions for
21570 ALTIVEC_BUILTIN_VEC_PERMXOR.
21571 * config/rs6000/rs6000.h: Add #define for vec_permxor builtin.
21572 * config/rs6000/rs6000-builtin.def: Add macro expansions for VPERMXOR.
21573 * config/rs6000/altivec.md (altivec_vpermxor): New define expand.
21574 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Add case
21575 UNSPEC_VPERMXOR.
21576 * config/doc/extend.texi: Add prototypes for vec_permxor.
21577
21578 2018-03-14 David Malcolm <dmalcolm@redhat.com>
21579
21580 PR c/84852
21581 * diagnostic-show-locus.c (class layout_point): Convert m_line
21582 from int to linenum_type.
21583 (line_span::comparator): Use linenum "compare" function when
21584 comparing line numbers.
21585 (test_line_span): New function.
21586 (layout_range::contains_point): Convert param "row" from int to
21587 linenum_type.
21588 (layout_range::intersects_line_p): Likewise.
21589 (layout::will_show_line_p): Likewise.
21590 (layout::print_source_line): Likewise.
21591 (layout::should_print_annotation_line_p): Likewise.
21592 (layout::print_annotation_line): Likewise.
21593 (layout::print_leading_fixits): Likewise.
21594 (layout::annotation_line_showed_range_p): Likewise.
21595 (struct line_corrections): Likewise for field m_row.
21596 (line_corrections::line_corrections): Likewise for param "row".
21597 (layout::print_trailing_fixits): Likewise.
21598 (layout::get_state_at_point): Likewise.
21599 (layout::get_x_bound_for_row): Likewise.
21600 (layout::print_line): Likewise.
21601 (diagnostic_show_locus): Likewise for locals "last_line" and "row".
21602 (selftest::diagnostic_show_locus_c_tests): Call test_line_span.
21603 * input.c (selftest::test_linenum_comparisons): New function.
21604 (selftest::input_c_tests): Call it.
21605 * selftest.c (selftest::test_assertions): Test ASSERT_GT,
21606 ASSERT_GT_AT, ASSERT_LT, and ASSERT_LT_AT.
21607 * selftest.h (ASSERT_GT): New macro.
21608 (ASSERT_GT_AT): New macro.
21609 (ASSERT_LT): New macro.
21610 (ASSERT_LT_AT): New macro.
21611
21612 2018-03-14 Segher Boessenkool <segher@kernel.crashing.org>
21613
21614 PR rtl-optimization/84780
21615 * combine.c (distribute_links): Don't make a link based on pc_rtx.
21616
21617 2018-03-14 Martin Liska <mliska@suse.cz>
21618
21619 * tree.c (record_node_allocation_statistics): Use
21620 get_stats_node_kind.
21621 (get_stats_node_kind): New function extracted from
21622 record_node_allocation_statistics.
21623 (free_node): Use get_stats_node_kind.
21624
21625 2018-03-14 Richard Biener <rguenther@suse.de>
21626
21627 * tree-ssa-pre.c (compute_antic_aux): Remove code that asserts
21628 that the value-set of ANTIC_IN doesn't grow.
21629
21630 Revert
21631 * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
21632 member.
21633 (BB_VISITED_WITH_VISITED_SUCCS): New define.
21634 (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
21635
21636 2018-03-14 Julia Koval <julia.koval@intel.com>
21637
21638 * config.gcc (icelake-client, icelake-server): New.
21639 (icelake): Remove.
21640 * config/i386/i386.c (initial_ix86_tune_features): Extend to 64 bit.
21641 (initial_ix86_arch_features): Ditto.
21642 (PTA_SKYLAKE): Add SGX.
21643 (PTA_ICELAKE): Remove.
21644 (PTA_ICELAKE_CLIENT): New.
21645 (PTA_ICELAKE_SERVER): New.
21646 (ix86_option_override_internal): Split up icelake on icelake client and
21647 icelake server.
21648 (get_builtin_code_for_version): Ditto.
21649 (fold_builtin_cpu): Ditto.
21650 * config/i386/driver-i386.c (config/i386/driver-i386.c): Ditto.
21651 * config/i386/i386-c.c (ix86_target_macros_internal): Ditto
21652 * config/i386/i386.h (processor_type): Ditto.
21653 * doc/invoke.texi: Ditto.
21654
21655 2018-03-14 Jakub Jelinek <jakub@redhat.com>
21656
21657 PR sanitizer/83392
21658 * sanopt.c (maybe_optimize_ubsan_ptr_ifn): Handle also
21659 INTEGER_CST offset, add it together with bitpos / 8 and
21660 sign extend based on POINTER_SIZE.
21661
21662 PR target/84844
21663 Revert
21664 2017-04-20 Uros Bizjak <ubizjak@gmail.com>
21665
21666 PR target/78090
21667 * config/i386/constraints.md (Yc): New register constraint.
21668 * config/i386/i386.md (*float<SWI48:mode><MODEF:mode>2_mixed):
21669 Use Yc constraint for alternative 2 of operand 0. Remove
21670 preferred_for_speed attribute.
21671
21672 2018-03-14 Richard Biener <rguenther@suse.de>
21673
21674 PR tree-optimization/84830
21675 * tree-ssa-pre.c (compute_antic_aux): Intersect the new ANTIC_IN
21676 with the old one to avoid oscillations.
21677
21678 2018-03-13 Vladimir Makarov <vmakarov@redhat.com>
21679
21680 PR target/83712
21681 * lra-assigns.c (find_all_spills_for): Ignore uninteresting
21682 pseudos.
21683 (assign_by_spills): Return a flag of reload assignment failure.
21684 Do not process the reload assignment failures. Do not spill other
21685 reload pseudos if they has the same reg class. Update n if
21686 necessary.
21687 (lra_assign): Add a return arg. Set up from the result of
21688 assign_by_spills call.
21689 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
21690 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
21691 usage_insns if it is not NULL.
21692 (spill_hard_reg_in_range): New function.
21693 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
21694 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
21695 function prototypes.
21696 (lra_assign): Change prototype.
21697 * lra.c (lra): Add code to deal with fails by splitting hard reg
21698 live ranges.
21699
21700 2018-03-01 Palmer Dabbelt <palmer@sifive.com>
21701
21702 * config/riscv/riscv.opt (mrelax): New option.
21703 * config/riscv/riscv.c (riscv_file_start): Emit ".option
21704 "norelax" when riscv_mrelax is disabled.
21705 * doc/invoke.texi (RISC-V): Document "-mrelax" and "-mno-relax".
21706
21707 2018-03-13 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
21708
21709 PR target/84743
21710 * config/rs6000/rs6000.c (rs6000_reassociation_width): Disable parallel
21711 reassociation for int modes.
21712
21713 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
21714
21715 * tree-vect-loop-manip.c (vect_maybe_permute_loop_masks):
21716 Reverse the choice between VEC_UNPACK_LO_EXPR and VEC_UNPACK_HI_EXPR
21717 for big-endian.
21718 * config/aarch64/iterators.md (hi_lanes_optab): New int attribute.
21719 * config/aarch64/aarch64-sve.md
21720 (*aarch64_sve_<perm_insn><perm_hilo><mode>): Rename to...
21721 (aarch64_sve_<perm_insn><perm_hilo><mode>): ...this.
21722 (*extend<mode><Vwide>2): Rename to...
21723 (aarch64_sve_extend<mode><Vwide>2): ...this.
21724 (vec_unpack<su>_<perm_hilo>_<mode>): Turn into a define_expand,
21725 renaming the old pattern to...
21726 (aarch64_sve_punpk<perm_hilo>_<mode>): ...this. Only define
21727 unsigned packs.
21728 (vec_unpack<su>_<perm_hilo>_<SVE_BHSI:mode>): Turn into a
21729 define_expand, renaming the old pattern to...
21730 (aarch64_sve_<su>unpk<perm_hilo>_<SVE_BHSI:mode>): ...this.
21731 (*vec_unpacku_<perm_hilo>_<mode>_no_convert): Delete.
21732 (vec_unpacks_<perm_hilo>_<mode>): Take BYTES_BIG_ENDIAN into
21733 account when deciding which SVE instruction the optab should use.
21734 (vec_unpack<su_optab>_float_<perm_hilo>_vnx4si): Likewise.
21735
21736 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
21737
21738 * config/aarch64/aarch64.md (V4_REGNUM, V8_REGNUM, V12_REGNUM)
21739 (V20_REGNUM, V24_REGNUM, V28_REGNUM, P1_REGNUM, P2_REGNUM, P3_REGNUM)
21740 (P4_REGNUM, P5_REGNUM, P6_REGNUM, P8_REGNUM, P9_REGNUM, P10_REGNUM)
21741 (P11_REGNUM, P12_REGNUM, P13_REGNUM, P14_REGNUM): New define_constants.
21742 (tlsdesc_small_<mode>): Turn a define_expand and use
21743 tlsdesc_small_sve_<mode> for SVE. Rename original define_insn to...
21744 (tlsdesc_small_advsimd_<mode>): ...this.
21745 (tlsdesc_small_sve_<mode>): New pattern.
21746
21747 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
21748
21749 * config/aarch64/iterators.md (UNSPEC_SMUL_HIGHPART)
21750 (UNSPEC_UMUL_HIGHPART): New constants.
21751 (MUL_HIGHPART): New int iteraor.
21752 (su): Handle UNSPEC_SMUL_HIGHPART and UNSPEC_UMUL_HIGHPART.
21753 * config/aarch64/aarch64-sve.md (<su>mul<mode>3_highpart): New
21754 define_expand.
21755 (*<su>mul<mode>3_highpart): New define_insn.
21756
21757 2018-03-13 Eric Botcazou <ebotcazou@adacore.com>
21758
21759 PR lto/84805
21760 * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
21761 incomplete types.
21762
21763 2018-03-13 Martin Liska <mliska@suse.cz>
21764
21765 PR ipa/84658.
21766 * (sem_item_optimizer::sem_item_optimizer): Initialize new
21767 vector.
21768 (sem_item_optimizer::~sem_item_optimizer): Release it.
21769 (sem_item_optimizer::merge_classes): Register variable aliases.
21770 (sem_item_optimizer::fixup_pt_set): New function.
21771 (sem_item_optimizer::fixup_points_to_sets): Likewise.
21772 * ipa-icf.h: Declare new variables and functions.
21773
21774 2018-03-13 Jakub Jelinek <jakub@redhat.com>
21775
21776 PR middle-end/84834
21777 * match.pd ((A & C) != 0 ? D : 0): Use INTEGER_CST@2 instead of
21778 integer_pow2p@2 and test integer_pow2p in condition.
21779 (A < 0 ? C : 0): Similarly for @1.
21780
21781 PR middle-end/84831
21782 * stmt.c (parse_output_constraint): If the CONSTRAINT_LEN (*p, p)
21783 characters starting at p contain '\0' character, don't look beyond
21784 that.
21785
21786 PR target/84827
21787 * config/i386/i386.md (round<mode>2): For 387 fancy math, disable
21788 pattern if -ftrapping-math -fno-fp-int-builtin-inexact.
21789
21790 PR target/84828
21791 * reg-stack.c (change_stack): Change update_end var from int to
21792 rtx_insn *, if non-NULL don't update just BB_END (current_block), but
21793 also call set_block_for_insn on the newly added insns and rescan.
21794
21795 PR target/84786
21796 * config/i386/sse.md (sse2_loadhpd): Use Yv constraint rather than v
21797 on the last operand.
21798
21799 PR c++/84704
21800 * tree.c (stabilize_reference_1): Return save_expr (e) for
21801 STATEMENT_LIST even if it doesn't have side-effects.
21802
21803 2018-03-12 Jonathan Wakely <jwakely@redhat.com>
21804
21805 * doc/invoke.texi (-mclflushopt): Fix spelling of option.
21806
21807 2018-03-12 Renlin Li <renlin.li@arm.com>
21808
21809 * config/aarch64/aarch64.md (movhf_aarch64): Fix mode argument to
21810 aarch64_output_scalar_simd_mov_immediate.
21811
21812 2018-03-12 Martin Sebor <msebor@redhat.com>
21813
21814 PR tree-optimization/83456
21815 * gimple-fold.c (gimple_fold_builtin_memory_op): Avoid warning
21816 for perfectly overlapping calls to memcpy.
21817 (gimple_fold_builtin_memory_chk): Same.
21818 (gimple_fold_builtin_strcpy): Handle no-warning.
21819 (gimple_fold_builtin_stxcpy_chk): Same.
21820 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Handle no-warning.
21821
21822 2018-03-12 Segher Boessenkool <segher@kernel.crashing.org>
21823
21824 * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add bool "named"
21825 parameter. Use it for SFmode.
21826 (rs6000_function_arg_advance_1): Adjust.
21827 (rs6000_function_arg): Adjust.
21828 (rs6000_gimplify_va_arg): Pass false for that new parameter.
21829
21830 2018-03-12 Segher Boessenkool <segher@kernel.crashing.org>
21831
21832 PR rtl-optimization/84169
21833 PR rtl-optimization/84780
21834 * combine.c (can_combine_p): Check for a 2-insn combination whether
21835 the destination register is used between the two insns, too.
21836
21837 2018-03-12 Richard Biener <rguenther@suse.de>
21838
21839 PR tree-optimization/84803
21840 * tree-if-conv.c (ifcvt_memrefs_wont_trap): Don't do anything
21841 for refs DR analysis didn't process.
21842
21843 2018-03-12 Richard Biener <rguenther@suse.de>
21844
21845 PR tree-optimization/84777
21846 * tree-ssa-loop-ch.c (should_duplicate_loop_header_p): For
21847 force-vectorize loops ignore whether we are optimizing for size.
21848
21849 2018-03-12 Chung-Ju Wu <jasonwucj@gmail.com>
21850
21851 * config/nds32/nds32.c (nds32_md_asm_adjust): New function.
21852 (TARGET_MD_ASM_ADJUST): Define.
21853
21854 2018-03-12 Monk Chiang <sh.chiang04@gmail.com>
21855 Kito Cheng <kito.cheng@gmail.com>
21856 Chung-Ju Wu <jasonwucj@gmail.com>
21857
21858 * config/nds32/nds32.c (nds32_compute_stack_frame,
21859 nds32_emit_stack_push_multiple, nds32_emit_stack_pop_multiple,
21860 nds32_emit_stack_v3push, nds32_emit_stack_v3pop,
21861 nds32_emit_adjust_frame, nds32_expand_prologue, nds32_expand_epilogue,
21862 nds32_expand_prologue_v3push, nds32_expand_epilogue_v3pop): Refine.
21863 * config/nds32/nds32.h (NDS32_FIRST_CALLEE_SAVE_GPR_REGNUM,
21864 NDS32_LAST_CALLEE_SAVE_GPR_REGNUM, NDS32_V3PUSH_AVAILABLE_P): New.
21865 * config/nds32/nds32.md (prologue, epilogue): Use macro
21866 NDS32_V3PUSH_AVAILABLE_P to do checking.
21867
21868 2018-03-11 Jakub Jelinek <jakub@redhat.com>
21869
21870 PR debug/58150
21871 * dwarf2out.c (gen_enumeration_type_die): Don't guard adding
21872 DW_AT_declaration for ENUM_IS_OPAQUE on -gdwarf-4 or -gno-strict-dwarf,
21873 but on TYPE_SIZE. Don't do anything for ENUM_IS_OPAQUE if not creating
21874 a new die. Don't set TREE_ASM_WRITTEN if ENUM_IS_OPAQUE. Guard
21875 addition of most attributes on !orig_type_die or the attribute not
21876 being present already. Assert TYPE_VALUES is NULL for ENUM_IS_OPAQUE.
21877
21878 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
21879 Chung-Ju Wu <jasonwucj@gmail.com>
21880
21881 * config/nds32/nds32.c (nds32_cpu_cpp_builtins): Modify to define
21882 __NDS32_VH__ macro.
21883 * config/nds32/nds32.opt (mvh): New option.
21884
21885 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
21886 Chung-Ju Wu <jasonwucj@gmail.com>
21887
21888 * config/nds32/nds32-protos.h (nds32_cpu_cpp_builtins): Declare
21889 function.
21890 * config/nds32/nds32.c (nds32_cpu_cpp_builtins): New function.
21891 * config/nds32/nds32.h (TARGET_CPU_CPP_BUILTINS): Modify its
21892 definition.
21893
21894 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
21895 Chung-Ju Wu <jasonwucj@gmail.com>
21896
21897 * config/nds32/nds32-memory-manipulation.c (nds32_expand_strlen): New
21898 function.
21899 * config/nds32/nds32-multiple.md (strlensi): New pattern.
21900 * config/nds32/nds32-protos.h (nds32_expand_strlen): Declare function.
21901
21902 2018-03-11 Monk Chiang <sh.chiang04@gmail.com>
21903 Kito Cheng <kito.cheng@gmail.com>
21904 Chung-Ju Wu <jasonwucj@gmail.com>
21905
21906 * config/nds32/constants.md (unspec_element): Add UNSPEC_FFB,
21907 UNSPEC_FFMISM and UNSPEC_FLMISM.
21908 * config/nds32/nds32-intrinsic.c (bdesc_2arg): Add builtin description
21909 for ffb, ffmism and flmism.
21910 * config/nds32/nds32-intrinsic.md (unspec_ffb): Define new pattern.
21911 (unspec_ffmism): Ditto.
21912 (unspec_flmism): Ditto.
21913 (nds32_expand_builtin_impl): Check if string extension is available.
21914 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FFB,
21915 NDS32_BUILTIN_FFMISM and NDS32_BUILTIN_FLMISM.
21916
21917 2018-03-10 Vladimir Makarov <vmakarov@redhat.com>
21918
21919 Reverting patch:
21920 2018-03-09 Vladimir Makarov <vmakarov@redhat.com>
21921
21922 PR target/83712
21923 * lra-assigns.c (assign_by_spills): Return a flag of reload
21924 assignment failure. Do not process the reload assignment
21925 failures. Do not spill other reload pseudos if they has the same
21926 reg class.
21927 (lra_assign): Add a return arg. Set up from the result of
21928 assign_by_spills call.
21929 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
21930 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
21931 usage_insns if it is not NULL.
21932 (spill_hard_reg_in_range): New function.
21933 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
21934 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
21935 function prototypes.
21936 (lra_assign): Change prototype.
21937 * lra.c (lra): Add code to deal with fails by splitting hard reg
21938 live ranges.
21939
21940 2018-03-10 H.J. Lu <hongjiu.lu@intel.com>
21941
21942 PR target/84807
21943 * config/i386/i386.opt: Replace Enforcment with Enforcement.
21944
21945 2018-03-10 Alexandre Oliva <aoliva@redhat.com>
21946
21947 PR debug/84620
21948 * dwarf2out.h (dw_val_class): Add dw_val_class_symview.
21949 (dw_val_node): Add val_symbolic_view.
21950 * dwarf2out.c (dw_line_info_table): Add symviews_since_reset.
21951 (symview_upper_bound): New.
21952 (new_line_info_table): Initialize symviews_since_reset.
21953 (dwarf2out_source_line): Count symviews_since_reset and set
21954 symview_upper_bound.
21955 (dw_val_equal_p): Handle symview.
21956 (add_AT_symview): New.
21957 (print_dw_val): Handle symview.
21958 (attr_checksum, attr_checksum_ordered): Likewise.
21959 (same_dw_val_p, size_of_die): Likewise.
21960 (value_format, output_die): Likewise.
21961 (add_high_low_attributes): Use add_AT_symview for entry_view.
21962 (dwarf2out_finish): Reset symview_upper_bound, clear
21963 zero_view_p.
21964
21965 2018-03-09 Peter Bergner <bergner@vnet.ibm.com>
21966
21967 PR target/83969
21968 * config/rs6000/rs6000.c (rs6000_offsettable_memref_p): New prototype.
21969 Add strict argument and use it.
21970 (rs6000_split_multireg_move): Update for new strict argument.
21971 (mem_operand_gpr): Disallow all non-offsettable addresses.
21972 * config/rs6000/rs6000.md (*movdi_internal64): Use YZ constraint.
21973
21974 2018-03-09 Jakub Jelinek <jakub@redhat.com>
21975
21976 PR target/84772
21977 * config/rs6000/rs6000.c (rs6000_gimplify_va_arg): Mark va_arg_tmp
21978 temporary TREE_ADDRESSABLE before gimplification of BUILT_IN_MEMCPY.
21979 * config/powerpcspe/powerpcspe.c (rs6000_gimplify_va_arg): Likewise.
21980
21981 PR c++/84767
21982 * tree-inline.c (copy_tree_body_r): For INDIRECT_REF of a remapped
21983 decl, use remap_type if we want to use the type.
21984
21985 2018-03-09 Martin Sebor <msebor@redhat.com>
21986
21987 PR tree-optimization/84526
21988 * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
21989 Remove dead code.
21990 (builtin_access::generic_overlap): Be prepared to handle non-array
21991 base objects.
21992
21993 2018-03-09 Alexandre Oliva <aoliva@redhat.com>
21994
21995 PR rtl-optimization/84682
21996 * lra-constraints.c (process_address_1): Check is_address flag
21997 for address constraints.
21998 (process_alt_operands): Likewise.
21999 * lra.c (lra_set_insn_recog_data): Pass asm operand locs to
22000 preprocess_constraints.
22001 * recog.h (preprocess_constraints): Add oploc parameter.
22002 Adjust callers.
22003 * recog.c (preprocess_constraints): Test address_operand for
22004 CT_ADDRESS constraints.
22005
22006 2018-03-09 Vladimir Makarov <vmakarov@redhat.com>
22007
22008 PR target/83712
22009 * lra-assigns.c (assign_by_spills): Return a flag of reload
22010 assignment failure. Do not process the reload assignment
22011 failures. Do not spill other reload pseudos if they has the same
22012 reg class.
22013 (lra_assign): Add a return arg. Set up from the result of
22014 assign_by_spills call.
22015 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
22016 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
22017 usage_insns if it is not NULL.
22018 (spill_hard_reg_in_range): New function.
22019 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
22020 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
22021 function prototypes.
22022 (lra_assign): Change prototype.
22023 * lra.c (lra): Add code to deal with fails by splitting hard reg
22024 live ranges.
22025
22026 2018-03-09 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
22027
22028 PR target/83193
22029 * common/config/arm/arm-common.c (arm_parse_arch_option_name):
22030 Accept complain bool parameter. Only emit errors if it is true.
22031 (arm_parse_cpu_option_name): Likewise.
22032 (arm_target_thumb_only): Adjust callers of the above.
22033 * config/arm/arm-protos.h (arm_parse_cpu_option_name): Adjust
22034 prototype to take a default true bool parameter.
22035 (arm_parse_arch_option_name): Likewise.
22036
22037 2018-03-09 David Malcolm <dmalcolm@redhat.com>
22038 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
22039
22040 PR jit/64089
22041 PR jit/84288
22042 * Makefile.in (LD_VERSION_SCRIPT_OPTION, LD_SONAME_OPTION): New.
22043 * configure: Regenerate.
22044 * configure.ac ("linker --version-script option"): New.
22045 ("linker soname option"): New.
22046
22047 2018-03-09 Richard Biener <rguenther@suse.de>
22048
22049 PR tree-optimization/84775
22050 * tree-if-conv.c (add_bb_predicate_gimplified_stmts): Delink
22051 immediate uses of predicate stmts and mark them modified.
22052
22053 Revert
22054 PR tree-optimization/84178
22055 * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
22056 to caller.
22057 (version_loop_for_if_conversion): Delay update_ssa call.
22058 (tree_if_conversion): Delay update_ssa until after predicate
22059 insertion.
22060
22061 2018-03-09 Eric Botcazou <ebotcazou@adacore.com>
22062
22063 PR target/84763
22064 * config/i386/winnt.c (i386_pe_seh_cold_init): Use small pre-allocation
22065 when the function accesses prior frames.
22066
22067 2018-03-08 Jakub Jelinek <jakub@redhat.com>
22068
22069 PR debug/84456
22070 * dwarf2out.c (dw_loc_list): If list && loc_list->first->next, call
22071 gen_llsym, otherwise call maybe_gen_llsym.
22072
22073 PR inline-asm/84742
22074 * recog.c (asm_operand_ok): Return 0 if multi-character constraint
22075 has ',' character inside of it.
22076
22077 2018-03-08 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
22078
22079 PR target/84748
22080 * config/aarch64/aarch64.md (*compare_cstore<mode>_insn): Mark pattern
22081 as clobbering CC_REGNUM.
22082
22083 2018-03-08 Richard Biener <rguenther@suse.de>
22084
22085 PR middle-end/84552
22086 * tree-scalar-evolution.c: Include tree-into-ssa.h.
22087 (follow_copies_to_constant): Do not follow SSA names registered
22088 for update.
22089
22090 2018-03-08 Richard Biener <rguenther@suse.de>
22091
22092 PR tree-optimization/84178
22093 * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
22094 to caller.
22095 (version_loop_for_if_conversion): Delay update_ssa call.
22096 (tree_if_conversion): Delay update_ssa until after predicate
22097 insertion.
22098
22099 2018-03-08 David Malcolm <dmalcolm@redhat.com>
22100
22101 PR tree-optimization/84178
22102 * tree-if-conv.c (release_bb_predicate): Remove the
22103 the assertion that the stmts have NULL use_ops.
22104 Discard the statements, asserting that they haven't
22105 yet been added to a BB.
22106
22107 2018-03-08 Richard Biener <rguenther@suse.de>
22108
22109 PR tree-optimization/84746
22110 * tree-ssa-pre.c (find_leader_in_sets): Deal with SET1 being NULL.
22111 (phi_translate): Pass in destination ANTIC_OUT set.
22112 (phi_translate_1): Likewise. For a simplified result lookup
22113 a leader in ANTIC_OUT and AVAIL_OUT, not the ANTIC_IN sets.
22114 (phi_translate_set): Adjust.
22115 (do_pre_regular_insertion): Likewise.
22116 (do_pre_partial_partial_insertion): Likewise.
22117
22118 2018-03-08 Martin Liska <mliska@suse.cz>
22119
22120 PR gcov-profile/84735
22121 * doc/gcov.texi: Document usage of profile files.
22122 * gcov-io.h: Document changes in the format.
22123
22124 2018-03-08 Alexandre Oliva <aoliva@redhat.com>
22125
22126 PR debug/84404
22127 PR debug/84408
22128 * dwarf2out.c (struct dw_line_info_table): Update comments for
22129 view == -1.
22130 (FORCE_RESET_NEXT_VIEW): New.
22131 (FORCE_RESETTING_VIEW_P): New.
22132 (RESETTING_VIEW_P): Check for -1 too.
22133 (ZERO_VIEW_P): Likewise.
22134 (new_line_info_table): Force-reset next view.
22135 (dwarf2out_begin_function): Likewise.
22136 (dwarf2out_source_line): Simplify zero_view_p initialization.
22137 Test FORCE_RESETTING_VIEW_P and RESETTING_VIEW_P instead of
22138 view directly. Omit view when omitting .loc at line 0.
22139
22140 2018-03-08 Jakub Jelinek <jakub@redhat.com>
22141
22142 PR tree-optimization/84740
22143 * tree-switch-conversion.c (process_switch): Call build_constructors
22144 only if info.phi_count is non-zero.
22145
22146 PR tree-optimization/84739
22147 * tree-tailcall.c (find_tail_calls): Check call arguments against
22148 DECL_ARGUMENTS (current_function_decl) rather than
22149 DECL_ARGUMENTS (func) when checking for tail recursion.
22150
22151 2018-03-07 Jakub Jelinek <jakub@redhat.com>
22152
22153 * doc/contrib.texi: Add entries for Martin Liska, David Malcolm,
22154 Marek Polacek, extend Vladimir Makarov's, Jonathan Wakely's and
22155 Volker Reichelt's entry and add entries for people that perform
22156 GCC fuzzy testing and report numerous bugs.
22157
22158 2018-03-07 Segher Boessenkool <segher@kernel.crashing.org>
22159
22160 PR target/82411
22161 * config/rs6000/rs6000.c (rs6000_elf_in_small_data_p): Don't put
22162 readonly data in sdata, if that is disabled.
22163 * config/rs6000/sysv4.opt (mreadonly-in-sdata): New option.
22164 * doc/invoke.texi (RS/6000 and PowerPC Options): Document
22165 -mreadonly-in-sdata option.
22166
22167 2018-03-07 Martin Sebor <msebor@redhat.com>
22168
22169 PR tree-optimization/84468
22170 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Consider successor
22171 basic block when looking for nul assignment.
22172
22173 2018-03-07 Eric Botcazou <ebotcazou@adacore.com>
22174
22175 PR target/84277
22176 * except.h (output_function_exception_table): Adjust prototype.
22177 * except.c (output_function_exception_table): Remove FNNAME parameter
22178 and add SECTION parameter. Ouput one part of the table at a time.
22179 * final.c (final_scan_insn_1) <NOTE_INSN_SWITCH_TEXT_SECTIONS>: Output
22180 the first part of the exception table and emit unwind directives.
22181 * config/i386/i386-protos.h (i386_pe_end_cold_function): Declare.
22182 (i386_pe_seh_cold_init): Likewise.
22183 * config/i386/cygming.h (ASM_DECLARE_COLD_FUNCTION_NAME): New macro.
22184 (ASM_DECLARE_COLD_FUNCTION_SIZE): Likewise.
22185 * config/i386/i386.c (x86_expand_epilogue): Fix wording in comment.
22186 (ix86_output_call_insn): Emit a nop in one more case for SEH.
22187 * config/i386/winnt.c: Include except.h.
22188 (struct seh_frame_state): Add reg_offset, after_prologue and
22189 in_cold_section fields.
22190 (i386_pe_seh_end_prologue): Set seh->after_prologue.
22191 (i386_pe_seh_cold_init): New function.
22192 (i386_pe_seh_fini): Add COLD parameter and bail out if it is not equal
22193 to seh->in_cold_section.
22194 (seh_emit_push): Record the offset of the push.
22195 (seh_emit_save): Record the offet of the save.
22196 (i386_pe_seh_unwind_emit): Deal with NOTE_INSN_SWITCH_TEXT_SECTIONS.
22197 Test seh->after_prologue to disregard the epilogue.
22198 (i386_pe_end_function): Pass FALSE to i386_pe_seh_fini.
22199 (i386_pe_end_cold_function): New function.
22200
22201 2018-03-07 Jakub Jelinek <jakub@redhat.com>
22202
22203 PR fortran/84565
22204 * config/aarch64/predicates.md (aarch64_simd_reg_or_zero): Use
22205 aarch64_simd_or_scalar_imm_zero rather than aarch64_simd_imm_zero.
22206
22207 PR c++/84704
22208 * gimple-expr.c (create_tmp_var_raw): Set DECL_NAMELESS flag
22209 on tmp_var.
22210 * tree-pretty-print.c (dump_decl_name): For TDF_COMPARE_DEBUG,
22211 don't print names of DECL_NAMELESS DECL_IGNORED_P decls.
22212
22213 PR middle-end/84723
22214 * multiple_target.c: Include tree-inline.h and intl.h.
22215 (expand_target_clones): Diagnose and fail if node->definition and
22216 !tree_versionable_function_p (node->decl).
22217
22218 2018-03-06 John David Anglin <danglin@gcc.gnu.org>
22219
22220 * config/pa/pa.h (ASM_GENERATE_INTERNAL_LABEL): Revise to use
22221 sprint_ul.
22222 (ASM_OUTPUT_ADDR_VEC_ELT): Revise for above change.
22223 (ASM_OUTPUT_ADDR_DIFF_ELT): Likewise.
22224 * config/pa/pa64-hpux.h (ASM_GENERATE_INTERNAL_LABEL): Revise as above.
22225
22226 2018-03-06 Jakub Jelinek <jakub@redhat.com>
22227
22228 PR target/84710
22229 * combine.c (try_combine): Use reg_or_subregno instead of handling
22230 just paradoxical SUBREGs and REGs.
22231
22232 2018-03-06 Claudiu Zissulescu <claziss@synopsys.com>
22233
22234 * config/arc/arc.c (arc_finalize_pic): Remove function.
22235 (arc_must_save_register): We use single base PIC register, remove
22236 checks to save/restore the PIC register.
22237 (arc_expand_prologue): Likewise.
22238 * config/arc/arc-protos.h (arc_set_default_type_attributes):
22239 Remove.
22240 (arc_verify_short): Likewise.
22241 (arc_attr_type): Likewise.
22242 * config/arc/arc.c (arc_set_default_type_attributes): Remove.
22243 (walk_stores): Likewise.
22244 (arc_address_cost): Make it static.
22245 (arc_verify_short): Likewise.
22246 (branch_dest): Likewise.
22247 (arc_attr_type): Likewise.
22248 * config/arc/arc.c (TARGET_ADJUST_INSN_LENGTH): Remove.
22249 (TARGET_INSN_LENGTH_PARAMETERS): Likewise.
22250 (arc_final_prescan_insn): Remove inserting the nops due to
22251 hardware hazards. It is done in reorg step.
22252 (insn_length_variant_t): Remove.
22253 (insn_length_parameters_t): Likewise.
22254 (arc_insn_length_parameters): Likewise.
22255 (arc_get_insn_variants): Likewise.
22256 * config/arc/arc.h (TARGET_UPSIZE_DBR): Remove.
22257
22258 2018-03-06 Jakub Jelinek <jakub@redhat.com>
22259
22260 PR inline-asm/84683
22261 * reg-stack.c (move_for_stack_reg): If any_malformed_asm, avoid
22262 assertion failure.
22263
22264 PR tree-optimization/84687
22265 * omp-simd-clone.c (simd_clone_create): Clear DECL_BUILT_IN_CLASS
22266 on new_node->decl.
22267 * match.pd (pow(C,x)*expN(y) -> expN(logN(C)*x+y)): New optimization.
22268
22269 2018-03-05 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
22270
22271 * config/rs6000/rs6000-builtin.def (rs6000_speculation_barrier):
22272 Rename to ppc_speculation_barrier.
22273 * config/rs6000/rs6000.c (rs6000_init_builtins): Rename builtin to
22274 __builtin_ppc_speculation_barrier.
22275
22276 2018-03-05 Jakub Jelinek <jakub@redhat.com>
22277
22278 PR target/84700
22279 * combine.c (combine_simplify_rtx): Don't try to simplify if
22280 if_then_else_cond returned non-NULL, but either true_rtx or false_rtx
22281 are equal to x.
22282
22283 2018-03-05 Segher Boessenkool <segher@kernel.crashing.org>
22284
22285 * config/rs6000/rs6000.c (rs6000_loop_align): Don't align tiny loops
22286 to 32 bytes when compiling for POWER9.
22287
22288 2018-03-05 Jakub Jelinek <jakub@redhat.com>
22289
22290 PR target/84564
22291 * config/i386/i386.c (ix86_function_ok_for_sibcall): Check for
22292 regparm >= 3 with no arg reg available also for calls with
22293 flag_force_indirect_call. Pass decl to ix86_function_regparm.
22294
22295 PR target/84524
22296 * config/i386/sse.md (*<code><mode>3): Replace <mask_prefix3> with
22297 orig,vex.
22298 (*<plusminus_insn><mode>3): Likewise. Remove <mask_operand3> uses.
22299
22300 2018-03-05 Peter Bergner <bergner@vnet.ibm.com>
22301
22302 PR target/84264
22303 * config/rs6000/vector.md (mov<mode>): Disallow altivec memory operands.
22304
22305 2018-03-05 Richard Biener <rguenther@suse.de>
22306
22307 PR tree-optimization/84486
22308 * tree-ssa-pre.c (create_expression_by_pieces): Remove dead code.
22309 When inserting a __builtin_assume_aligned call set the LHS
22310 SSA name alignment info accordingly.
22311
22312 2018-03-05 Wilco Dijkstra <wdijkstr@arm.com>
22313
22314 PR tree-optimization/84114
22315 * config/aarch64/aarch64.c (aarch64_reassociation_width)
22316 Avoid reassociation of FLOAT_MODE addition.
22317
22318 2018-03-05 Olga Makhotina <olga.makhotina@intel.com>
22319
22320 * common/config/i386/i386-common.c (OPTION_MASK_ISA_PCONFIG_SET,
22321 OPTION_MASK_ISA_PCONFIG_UNSET, OPTION_MASK_ISA_WBNOINVD_SET,
22322 OPTION_MASK_ISA_WBNOINVD_UNSET): New definitions.
22323 (ix86_handle_option): Handle -mpconfig and -mwbnoinvd.
22324 * config.gcc (pconfigintrin.h, wbnoinvdintrin.h) : Add headers.
22325 * config/i386/cpuid.h (bit_PCONFIG, bit_WBNOINVD): New.
22326 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mpconfig
22327 and -mwbnoinvd.
22328 * config/i386/i386-builtin.def (__builtin_ia32_wbnoinvd,
22329 __builtin_ia32_wbinvd): New builtins.
22330 (SPECIAL_ARGS2): New.
22331 * config/i386/i386-c.c (__WBNOINVD__, __PCONFIG__): New.
22332 (SPECIAL_ARGS2): New.
22333 * config/i386/i386.c (ix86_target_string): Add -mpconfig and -mwbnoinvd.
22334 (ix86_valid_target_attribute_inner_p): Ditto.
22335 (ix86_init_mmx_sse_builtins): Add special_args2.
22336 * config/i386/i386.h (TARGET_PCONFIG, TARGET_PCONFIG_P, TARGET_WBNOINVD,
22337 TARGET_WBNOINVD_P): New.
22338 * config/i386/i386.md (UNSPECV_WBINVD, UNSPECV_WBNOINVD): New.
22339 (define_insn "wbinvd", define_insn "wbnoinvd"): New.
22340 * config/i386/i386.opt: Add -mpconfig and -mwbnoinvd.
22341 * config/i386/immintrin.h (_wbinvd): New intrinsic.
22342 * config/i386/pconfigintrin.h: New file.
22343 * config/i386/wbnoinvdintrin.h: Ditto.
22344 * config/i386/x86intrin.h: Add headers pconfigintrin.h and
22345 wbnoinvdintrin.h.
22346 * doc/invoke.texi (-mpconfig, -mwbnoinvd): New.
22347
22348 2018-03-05 Richard Biener <rguenther@suse.de>
22349
22350 PR tree-optimization/84670
22351 * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
22352 member.
22353 (BB_VISITED_WITH_VISITED_SUCCS): New define.
22354 (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
22355 (compute_antic_aux): Only assert the number of values in ANTIC_IN
22356 doesn't grow if all successors (recursively) were visited at least
22357 once.
22358
22359 2018-03-05 Richard Biener <rguenther@suse.de>
22360
22361 PR tree-optimization/84650
22362 * tree-ssa-loop-im.c (pass_lim::execute): Reset the SCEV cache
22363 if executed in the loop pipeline.
22364
22365 2018-03-05 Sandra Loosemore <sandra@codesourcery.com>
22366
22367 * doc/configfiles.texi (Configuration Files): Move info about
22368 conditionalizing $target-protos.h to...
22369 * doc/sourcebuild.texi (Back End): Here. Explain how $target.h
22370 differs from $target-protos.h.
22371
22372 2018-03-05 Kito Cheng <kito.cheng@gmail.com>
22373 Chung-Ju Wu <jasonwucj@gmail.com>
22374
22375 * config/nds32/nds32-protos.h (nds32_expand_setmem): Declare.
22376 * config/nds32/nds32-multiple.md (setmemsi): Define.
22377 * config/nds32/nds32-memory-manipulation.c
22378 (nds32_gen_dup_4_byte_to_word_value): New.
22379 (emit_setmem_word_loop): New.
22380 (emit_setmem_byte_loop): New.
22381 (nds32_expand_setmem_loop): New.
22382 (nds32_expand_setmem_loop_v3m): New.
22383 (nds32_expand_setmem_unroll): New.
22384 (nds32_expand_setmem): New.
22385
22386 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
22387 Chung-Ju Wu <jasonwucj@gmail.com>
22388
22389 * config/nds32/nds32-memory-manipulation.c
22390 (nds32_emit_load_store): New.
22391 (nds32_emit_post_inc_load_store): New.
22392 (nds32_emit_mem_move): New.
22393 (nds32_emit_mem_move_block): New.
22394 (nds32_expand_movmemsi_loop_unknown_size): New.
22395 (nds32_expand_movmemsi_loop_known_size): New.
22396 (nds32_expand_movmemsi_loop): New.
22397 (nds32_expand_movmemsi_unroll): New.
22398 (nds32_expand_movmemqi): Rename ...
22399 (nds32_expand_movmemsi): ... to this.
22400 * config/nds32/nds32-multiple.md (movmemqi): Rename ...
22401 (movmemsi): ... to this.
22402 * config/nds32/nds32-protos.h (nds32_expand_movmemqi): Rename ...
22403 (nds32_expand_movmemsi): ... to this.
22404
22405 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
22406 Monk Chiang <sh.chiang04@gmail.com>
22407 Chung-Ju Wu <jasonwucj@gmail.com>
22408
22409 * config/nds32/nds32-protos.h
22410 (nds32_expand_load_multiple): New arguments.
22411 (nds32_expand_store_multiple): Ditto.
22412 (nds32_valid_multiple_load_store): Rename ...
22413 (nds32_valid_multiple_load_store_p): ... to this.
22414 * config/nds32/nds32-memory-manipulation.c
22415 (nds32_expand_load_multiple): Refine implementation.
22416 (nds32_expand_store_multiple): Ditto.
22417 * config/nds32/nds32-multiple.md
22418 (load_multiple): Update nds32_expand_load_multiple interface.
22419 (store_multiple): Update nds32_expand_store_multiple interface.
22420 * config/nds32/nds32-predicates.c
22421 (nds32_valid_multiple_load_store): Rename ...
22422 (nds32_valid_multiple_load_store_p): ... to this and refine
22423 implementation.
22424 * config/nds32/predicates.md
22425 (nds32_load_multiple_and_update_address_operation): New predicate.
22426 (nds32_store_multiple_and_update_address_operation): New predicate.
22427
22428 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
22429 Chung-Ju Wu <jasonwucj@gmail.com>
22430
22431 * config/nds32/nds32.md (type): Add load_multiple and store_multiple.
22432 (combo): New attribute.
22433 * config/nds32/nds32-multiple.md: Refine patterns with new attributes.
22434
22435 2018-03-03 Chung-Ju Wu <jasonwucj@gmail.com>
22436
22437 * config/nds32/nds32.opt: Change -mcmodel= default value.
22438
22439 2018-03-03 Kito Cheng <kito.cheng@gmail.com>
22440 Monk Chiang <sh.chiang04@gmail.com>
22441 Chung-Ju Wu <jasonwucj@gmail.com>
22442
22443 * config/nds32/constants.md (unspec_element): New enum.
22444 * config/nds32/constraints.md (Umw): New constraint.
22445 * config/nds32/nds32-intrinsic.c: Add more builtin functions.
22446 * config/nds32/nds32-intrinsic.md: Likewise.
22447 * config/nds32/nds32-md-auxiliary.c (nds32_regno_to_enable4): New.
22448 (nds32_valid_smw_lwm_base_p): New.
22449 (nds32_output_smw_single_word): New.
22450 (nds32_output_lmw_single_word): New.
22451 (nds32_expand_unaligned_load): New.
22452 (nds32_expand_unaligned_store): New.
22453 * config/nds32/nds32-protos.h (nds32_valid_smw_lwm_base_p): Declare.
22454 (nds32_output_smw_single_word): Declare.
22455 (nds32_output_lmw_single_word): Declare.
22456 (nds32_expand_unaligned_load): Declare.
22457 (nds32_expand_unaligned_store): Declare.
22458 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_UALOAD_HW,
22459 NDS32_BUILTIN_UALOAD_W, NDS32_BUILTIN_UALOAD_DW,
22460 NDS32_BUILTIN_UASTORE_HW, NDS32_BUILTIN_UASTORE_W,
22461 NDS32_BUILTIN_UASTORE_DW.
22462 * config/nds32/predicates.md (nds32_lmw_smw_base_operand): New
22463 predicate.
22464
22465 2018-03-03 Monk Chiang <sh.chiang04@gmail.com>
22466 Kito Cheng <kito.cheng@gmail.com>
22467 Chung-Ju Wu <jasonwucj@gmail.com>
22468
22469 * config/nds32/nds32-intrinsic.c
22470 (nds32_expand_builtin_null_ftype_reg): Delete.
22471 (nds32_expand_builtin_reg_ftype_imm): Ditto.
22472 (nds32_expand_builtin_null_ftype_reg_imm): Ditto.
22473 (nds32_read_argument): New.
22474 (nds32_legitimize_target): Ditto.
22475 (nds32_legitimize_argument): Ditto.
22476 (nds32_check_constant_argument): Ditto.
22477 (nds32_expand_unop_builtin): Ditto.
22478 (nds32_expand_unopimm_builtin): Ditto.
22479 (nds32_expand_binop_builtin): Ditto.
22480 (nds32_builtin_decl_impl): Ditto.
22481 (builtin_description): Ditto.
22482 (nds32_expand_builtin_impl): Rewrite with new infrastructure.
22483 (nds32_init_builtins_impl): Ditto.
22484 * config/nds32/nds32.c (TARGET_BUILTIN_DECL): Define.
22485 (nds32_builtin_decl): New.
22486 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_COUNT.
22487 * config/nds32/nds32-protos.h (nds32_builtin_decl_impl): Declare.
22488
22489 2018-03-02 Jeff Law <law@redhat.com>
22490
22491 * reorg.c (stop_search_p): Handle DEBUG_INSN.
22492 (redundant_insn, fill_simple_delay_slots): Likewise.
22493 (fill_slots_from_thread): Likewise.
22494 * resource.c (mark_referenced_resources): Likewise.
22495 (mark_set_resources, find_dead_or_set_registers): Likewise.
22496
22497 2018-03-02 Jakub Jelinek <jakub@redhat.com>
22498
22499 * substring-locations.h (format_warning_va): Formatting fix for
22500 ATTRIBUTE_GCC_DIAG.
22501 (format_warning_at_substring): Fix up ATTRIBUTE_GCC_DIAG second
22502 argument.
22503 (format_warning_n_va, format_warning_at_substring_n): New prototypes.
22504 * substring-locations.c: Include intl.h.
22505 (format_warning_va): Turned into small wrapper around
22506 format_warning_n_va, renamed to ...
22507 (format_warning_n_va): ... this, add N and PLURAL_GMSGID arguments,
22508 rename GMSGID to SINGULAR_GMSGID, if SINGULAR_GMSGID != PLURAL_GMSGID,
22509 use ngettext.
22510 (format_warning_at_substring_n): New function.
22511 * gimple-ssa-sprintf.c: Remove GCC diagnostic ignored pragma.
22512 (fmtwarn): Add ATTRIBUTE_GCC_DIAG. Turn into a copy of
22513 format_warning_at_substring with just a shorter name instead of
22514 const function pointer.
22515 (fmtwarn_n): New function.
22516 (maybe_warn, format_directive, parse_directive): Use fmtwarn_n where
22517 appropriate, get rid of all the fmtstr temporaries, move conditionals
22518 with G_() wrapped string literals directly into fmtwarn arguments,
22519 cast dir.len to (int), formatting fixes.
22520
22521 2018-03-02 Thomas Schwinge <thomas@codesourcery.com>
22522
22523 * doc/invoke.texi: Remove "Cilk Plus" references.
22524
22525 2018-03-02 Jakub Jelinek <jakub@redhat.com>
22526 Richard Biener <rguenther@suse.de>
22527
22528 PR ipa/84628
22529 * expr.c (expand_expr_real_1) <case CALL_EXPR>: Don't emit diagnostics
22530 for error or warning attributes if CALL_FROM_THUNK_P is set.
22531 Formatting fixes.
22532
22533 2018-03-02 Jakub Jelinek <jakub@redhat.com>
22534
22535 PR target/56540
22536 * config/pa/pa.h (TARGET_CPU_CPP_BUILTINS): Predefine
22537 __SIZEOF_128__ macro if HPUX_LONG_DOUBLE_LIBRARY.
22538
22539 PR target/56540
22540 * config/ia64/ia64.h (TARGET_CPU_CPP_BUILTINS): Predefine
22541 __SIZEOF_{FPREG,FLOAT{80,128}}__ macros.
22542
22543 * predict.c (test_prediction_value_range): Use PROB_UNINITIALIZED
22544 instead of -1U in last predictors element's probability member.
22545
22546 2018-03-02 Eric Botcazou <ebotcazou@adacore.com>
22547
22548 PR ipa/83983
22549 * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
22550 arguments if they are comparable.
22551
22552 2018-03-02 Richard Sandiford <richard.sandiford@linaro.org>
22553
22554 PR tree-optimization/84634
22555 * tree-vect-stmts.c (vectorizable_store, vectorizable_load): Replace
22556 masks and masked_loop_p with a single loop_masks, making sure it's
22557 null for bb vectorization.
22558
22559 2018-03-02 Richard Sandiford <richard.sandiford@linaro.org>
22560
22561 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
22562 (vect_analyze_data_ref_access): Use loop->safe_len rather than
22563 loop->force_vectorize to check whether there is no alias.
22564
22565 2018-03-02 Jakub Jelinek <jakub@redhat.com>
22566
22567 PR target/84614
22568 * rtl.h (prev_real_nondebug_insn, next_real_nondebug_insn): New
22569 prototypes.
22570 * emit-rtl.c (next_real_insn, prev_real_insn): Fix up function
22571 comments.
22572 (next_real_nondebug_insn, prev_real_nondebug_insn): New functions.
22573 * cfgcleanup.c (try_head_merge_bb): Use prev_real_nondebug_insn
22574 instead of a loop around prev_real_insn.
22575 * combine.c (move_deaths): Use prev_real_nondebug_insn instead of
22576 prev_real_insn.
22577
22578 PR inline-asm/84625
22579 * config/i386/i386.c (ix86_print_operand): Use conditional
22580 output_operand_lossage instead of gcc_assert if CONST_VECTOR is not
22581 zero vector.
22582
22583 2018-03-02 Richard Biener <rguenther@suse.de>
22584
22585 PR tree-optimization/84427
22586 * tree-ssa-pre.c (bitmap_remove_expr_from_set): Remove.
22587 (bitmap_set_subtract_values): Rewrite to handle multiple
22588 exprs per value.
22589 (clean): Likewise.
22590 (prune_clobbered_mems): Likewise.
22591 (phi_translate): Take edge instead of pred/phiblock.
22592 (phi_translate_1): Likewise.
22593 (phi_translate_set): Likewise. Insert all translated
22594 exprs for a value into the set, keeping possibly multiple
22595 expressions per value.
22596 (compute_antic_aux): Adjust for phi_translate changes.
22597 When intersecting union the expressions and prune those
22598 not in the final value set, keeping possibly multiple
22599 expressions per value. Do not use value-insertion
22600 for unioning ANTIC_OUT U EXP_GEN - TMP_GEN but merge
22601 all expressions. Add verification that the value-sets
22602 only shrink during iteration.
22603 (compute_partial_antic_aux): Adjust for the phi_translate changes.
22604 (do_pre_regular_insertion): Likewise.
22605 (do_pre_partial_partial_insertion): Likewise.
22606
22607 2018-03-02 Richard Biener <rguenther@suse.de>
22608
22609 PR target/82005
22610 * config/darwin.c (saved_debug_info_level): New static global.
22611 (darwin_asm_lto_start): Disable debug info generation for LTO out.
22612 (darwin_asm_lto_end): Restore debug info generation settings.
22613
22614 2018-03-01 Martin Liska <mliska@suse.cz>
22615
22616 PR sanitizer/82484
22617 * sanopt.c (sanitize_rewrite_addressable_params): Do not handle
22618 volatile arguments.
22619
22620 2018-03-01 Richard Biener <rguenther@suse.de>
22621
22622 PR debug/84645
22623 * dwarf2out.c (gen_variable_die): Properly handle late VLA
22624 type annotation with LTO when debug was disabled at compile-time.
22625
22626 2018-03-01 Matthew Fortune <mfortune@gmail.com>
22627
22628 * config/mips/mips.c (mips_final_prescan_insn): Fix incorrect
22629 XINT with INTVAL.
22630 (mips_final_postscan_insn): Likewise.
22631
22632 2018-03-01 Richard Sandiford <richard.sandiford@linaro.org>
22633
22634 PR rtl-optimization/84528
22635 * alias.c (init_alias_target): Add commentary.
22636 (init_alias_analysis): Only give HARD_FRAME_POINTER_REGNUM
22637 a unique base value if the frame pointer is not eliminated
22638 to the stack pointer.
22639
22640 2018-03-01 Tom de Vries <tom@codesourcery.com>
22641
22642 PR rtl-optimization/83327
22643 * lra-int.h (hard_regs_spilled_into): Declare.
22644 * lra.c (hard_regs_spilled_into): Define.
22645 (init_reg_info): Init hard_regs_spilled_into.
22646 * lra-spills.c (assign_spill_hard_regs): Update hard_regs_spilled_into.
22647 * lra-lives.c (make_hard_regno_born, make_hard_regno_dead)
22648 (process_bb_lives): Handle hard_regs_spilled_into.
22649 (lra_create_live_ranges_1): Before doing liveness propagation, clear
22650 regs in all_hard_regs_bitmap if set in hard_regs_spilled_into.
22651
22652 2018-02-28 David Edelsohn <dje.gcc@gmail.com>
22653
22654 * config.gcc (powerpc-ibm-aix7.1.*): New stanza.
22655 (powerpc-ibm-aix[789]*): Default to AIX 7.2.
22656 * config/rs6000/aix71.h (TARGET_DEFAULT): Revert to Power4 ISA.
22657 * config/rs6000/aix72.h: New file.
22658
22659 2018-02-28 Jakub Jelinek <jakub@redhat.com>
22660
22661 * gimple-ssa-warn-restrict.c (maybe_diag_overlap): Use warning_n
22662 instead of warning_at with conditional singular and plural messages
22663 where possible.
22664
22665 PR target/52991
22666 * stor-layout.c (update_alignment_for_field): For
22667 targetm.ms_bitfield_layout_p (rli->t), if !is_bitfield
22668 && !DECL_PACKED (field), do the alignment update, just use
22669 only desired_align instead of MAX (type_align, desired_align)
22670 as the alignment.
22671 (place_field): Don't do known_align < desired_align handling
22672 early if targetm.ms_bitfield_layout_p (rli->t) and rli->prev_field
22673 is non-NULL, instead do it after rli->prev_field handling and
22674 only if not within a bitfield word. For DECL_PACKED (field)
22675 use type_align of BITS_PER_UNIT.
22676
22677 2018-02-28 Eric Botcazou <ebotcazou@adacore.com>
22678
22679 * config/aarch64/aarch64.c (aarch64_emit_probe_stack_range): Remove
22680 superfluous parentheses and trailing spaces.
22681
22682 2018-02-28 Richard Biener <rguenther@suse.de>
22683
22684 PR tree-optimization/84584
22685 * graphite-scop-detection.c (scop_detection::add_scop): Discard
22686 SCoPs with fake exit edge.
22687
22688 2018-02-28 Martin Liska <mliska@suse.cz>
22689
22690 PR testsuite/84597
22691 * timevar.c (timer::print): Fix format to properly print 100%
22692 values.
22693
22694 2018-02-28 Richard Biener <rguenther@suse.de>
22695
22696 PR middle-end/84607
22697 * genmatch.c (capture_info::walk_match): Do not mark
22698 captured expressions without operands as expr_p given
22699 they act more like predicates and should be subject to
22700 "lost tail" side-effect preserving.
22701
22702 2018-02-28 Alexandre Oliva <aoliva@redhat.com>
22703
22704 PR rtl-optimization/81611
22705 * auto-inc-dec.c (attempt_change): Move dead note from
22706 mem_insn if it's the next use of regno
22707 (find_address): Take address use of reg holding
22708 non-incremented value. Add parm to limit search to the named
22709 reg only.
22710 (merge_in_block): Attempt to use a mem insn that is the next
22711 use of the original regno.
22712
22713 2018-02-27 Martin Sebor <msebor@redhat.com>
22714
22715 PR c++/83871
22716 * doc/invoke.texi (-Wmissing-attributes): New option.
22717 * print-tree.c (print_node): Handle DECL_UNINLINABLE.
22718
22719 2018-02-27 Martin Sebor <msebor@redhat.com>
22720
22721 PR translation/84207
22722 * diagnostic-core.h (warning_n, error_n, inform_n): Change
22723 n argument to unsigned HOST_WIDE_INT.
22724 * diagnostic.c (warning_n, error_n, inform_n): Ditto.
22725 (diagnostic_n_impl): Ditto. Handle arguments in excess of LONG_MAX.
22726 * gimple-ssa-sprintf.c (format_directive): Simplify inform_n call.
22727 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Use warning_n.
22728
22729 2018-02-27 Richard Biener <rguenther@suse.de>
22730
22731 PR tree-optimization/84512
22732 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost):
22733 Do not use the estimate returned from record_stmt_cost for
22734 the scalar iteration cost but sum properly using add_stmt_cost.
22735
22736 2018-02-27 Richard Biener <rguenther@suse.de>
22737
22738 PR tree-optimization/84466
22739 * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
22740 Adjust last change to less strictly validate use operands.
22741
22742 2018-02-27 Martin Liska <mliska@suse.cz>
22743
22744 PR gcov-profile/84548
22745 * gcov.c (process_file): Allow partial overlap and consider it
22746 also as group functions.
22747 (output_lines): Properly calculate range of lines for a group.
22748
22749 2018-02-27 Martin Liska <mliska@suse.cz>
22750
22751 * timevar.c (timer::print_row): Remove 'usr', 'sys', 'wall' and
22752 'ggc' suffixes. Change first column width.
22753 (timer::print): Fix formatting of the column.
22754
22755 2018-02-27 Alexandre Oliva <aoliva@redhat.com>
22756
22757 * tree-ssa-live.c (remove_unused_scope_block_p): Do not
22758 preserve inline entry blocks for the sake of debug inline
22759 entry point markers alone.
22760 (remove_unused_locals): Suggest in comments a better place to
22761 force the preservation of inline entry blocks that are
22762 otherwise unused, but do not preserve them.
22763
22764 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
22765
22766 * config/i386/i386.c (ix86_output_indirect_jmp): Update comments.
22767
22768 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
22769
22770 PR target/84039
22771 * config/i386/constraints.md (Bs): Replace
22772 ix86_indirect_branch_register with
22773 TARGET_INDIRECT_BRANCH_REGISTER.
22774 (Bw): Likewise.
22775 * config/i386/i386.md (indirect_jump): Likewise.
22776 (tablejump): Likewise.
22777 (*sibcall_memory): Likewise.
22778 (*sibcall_value_memory): Likewise.
22779 Peepholes of indirect call and jump via memory: Likewise.
22780 (*sibcall_GOT_32): Disallowed for TARGET_INDIRECT_BRANCH_REGISTER.
22781 (*sibcall_value_GOT_32): Likewise.
22782 * config/i386/predicates.md (indirect_branch_operand): Likewise.
22783 (GOT_memory_operand): Likewise.
22784 (call_insn_operand): Likewise.
22785 (sibcall_insn_operand): Likewise.
22786 (GOT32_symbol_operand): Likewise.
22787 * config/i386/i386.h (TARGET_INDIRECT_BRANCH_REGISTER): New.
22788
22789 2018-02-26 Eric Botcazou <ebotcazou@adacore.com>
22790
22791 PR rtl-optimization/83496
22792 * reorg.c (steal_delay_list_from_target): Change REDUNDANT array from
22793 booleans to RTXes. Call fix_reg_dead_note on every non-null element.
22794 (steal_delay_list_from_fallthrough): Call fix_reg_dead_note on a
22795 redundant insn, if any.
22796 (relax_delay_slots): Likewise.
22797 (update_reg_unused_notes): Rename REDUNDANT_INSN to OTHER_INSN.
22798
22799 2018-02-26 Richard Sandiford <richard.sandiford@linaro.org>
22800
22801 PR tree-optimization/83965
22802 * tree-vect-patterns.c (vect_reassociating_reduction_p): Assume
22803 that grouped statements are part of a reduction chain. Return
22804 true if the statement is not marked as a reduction itself but
22805 is part of a group.
22806 (vect_recog_dot_prod_pattern): Don't check whether the statement
22807 is part of a group here.
22808 (vect_recog_sad_pattern): Likewise.
22809 (vect_recog_widen_sum_pattern): Likewise.
22810
22811 2018-02-26 Eric Botcazou <ebotcazou@adacore.com>
22812
22813 PR debug/84545
22814 * final.c (rest_of_clean_state): Also look for calls inside sequences.
22815
22816 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
22817
22818 PR target/84530
22819 * config/i386/i386-protos.h (ix86_output_indirect_jmp): Remove
22820 the bool argument.
22821 (ix86_output_indirect_function_return): New prototype.
22822 (ix86_split_simple_return_pop_internal): Likewise.
22823 * config/i386/i386.c (indirect_return_via_cx): New.
22824 (indirect_return_via_cx_bnd): Likewise.
22825 (indirect_thunk_name): Handle return va CX_REG.
22826 (output_indirect_thunk_function): Create alias for
22827 __x86_return_thunk_[re]cx and __x86_return_thunk_[re]cx_bnd.
22828 (ix86_output_indirect_jmp): Remove the bool argument.
22829 (ix86_output_indirect_function_return): New function.
22830 (ix86_split_simple_return_pop_internal): Likewise.
22831 * config/i386/i386.md (*indirect_jump): Don't pass false
22832 to ix86_output_indirect_jmp.
22833 (*tablejump_1): Likewise.
22834 (simple_return_pop_internal): Change it to define_insn_and_split.
22835 Call ix86_split_simple_return_pop_internal to split it for
22836 -mfunction-return=.
22837 (simple_return_indirect_internal): Call
22838 ix86_output_indirect_function_return instead of
22839 ix86_output_indirect_jmp.
22840
22841 2018-02-26 Jakub Jelinek <jakub@redhat.com>
22842
22843 PR bootstrap/84405
22844 * vec.h (vec_default_construct): For BROKEN_VALUE_INITIALIZATION use
22845 memset and value initialization afterwards.
22846
22847 2018-02-26 Christophe Lyon <christophe.lyon@linaro.org>
22848
22849 * Makefile.in (lto-wrapper): Use ALL_LINKERFLAGS.
22850
22851 2018-02-26 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
22852
22853 PR target/84521
22854 * common/config/aarch64/aarch64-common.c
22855 (aarch_option_optimization_table[]): Switch
22856 off fomit-frame-pointer
22857
22858 2018-02-26 Kito Cheng <kito.cheng@gmail.com>
22859 Chung-Ju Wu <jasonwucj@gmail.com>
22860
22861 * config/nds32/nds32-multiple.md (load_multiple): Disallow
22862 volatile memory.
22863 (store_multiple): Ditto.
22864
22865 2018-02-26 Kito Cheng <kito.cheng@gmail.com>
22866
22867 * config.gcc: Add --with-cpu support for nds32 target.
22868 * config/nds32/nds32-opts.h (nds32_cpu_type): New.
22869 * config/nds32/nds32.opt: Add -mcpu= option.
22870
22871 2018-02-25 Segher Boessenkool <segher@kernel.crashing.org>
22872
22873 * config/rs6000/rs6000.opt (mvrsave=no, mvrsave=yes, isel=no,
22874 isel=yes): Warn for these deprecated options.
22875
22876 2018-02-23 David Edelsohn <dje.gcc@gmail.com>
22877
22878 * config/rs6000/aix71.h (TARGET_DEFAULT): Change to
22879 ISA_2_5_MASKS_EMBEDDED.
22880
22881 2018-02-23 Jakub Jelinek <jakub@redhat.com>
22882
22883 * ipa-prop.c (ipa_vr_ggc_hash_traits::hash): Hash p->min and
22884 p->max as pointers rather than using iterative_hash_expr.
22885
22886 2018-02-23 Carl Love <cel@us.ibm.com>
22887
22888 * config/rs6000/rs6000-builtin.def: Change VSIGNED2 and VUNSIGNED2
22889 macro expansions from BU_VSX_2 to BU_P8V_VSX_2 and BU_VSX_OVERLOAD_2 to
22890 BU_P8V_OVERLOAD_2.
22891 * config/rs6000/rs6000-c.c: Change VSX_BUILTIN_VEC_VSIGNED2 to
22892 P8V_BUILTIN_VEC_VSIGNED2. Change VSX_BUILTIN_VEC_VUNSIGNED2 to
22893 P8V_BUILTIN_VEC_VUNSIGNED2.
22894
22895 2018-02-22 Vladimir Makarov <vmakarov@redhat.com>
22896
22897 PR target/81572
22898 * lra-int.h (LRA_UNKNOWN_ALT, LRA_NON_CLOBBERED_ALT): New macros.
22899 * lra.c (lra_set_insn_recog_data, lra_update_insn_recog_data): Use
22900 LRA_UNKNOWN_ALT.
22901 * lra-constraints.c (curr_insn_transform): Set up
22902 LRA_NON_CLOBBERED_ALT for moves processed on the fast path. Use
22903 LRA_UNKNOWN_ALT.
22904 (remove_inheritance_pseudos): Use LRA_UNKNOWN_ALT.
22905 * lra-eliminations.c (spill_pseudos): Ditto.
22906 (process_insn_for_elimination): Ditto.
22907 * lra-lives.c (reg_early_clobber_p): Use the new macros.
22908 * lra-spills.c (spill_pseudos): Use LRA_UNKNOWN_ALT and
22909 LRA_NON_CLOBBERED_ALT.
22910
22911 2018-02-22 Martin Sebor <msebor@redhat.com>
22912
22913 PR tree-optimization/84480
22914 * gimple-fold.c (gimple_fold_builtin_strcpy): Move warnings
22915 to maybe_diag_stxncpy_trunc. Call it.
22916 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Integrate warnings
22917 from gimple_fold_builtin_strcpy. Print inlining stack.
22918 (handle_builtin_stxncpy): Print inlining stack.
22919 * tree-ssa-strlen.h (maybe_diag_stxncpy_trunc): Declare.
22920
22921 2018-02-22 H.J. Lu <hongjiu.lu@intel.com>
22922
22923 PR target/84176
22924 * config/i386/i386.c (ix86_set_indirect_branch_type): Issue an
22925 error when -mindirect-branch=thunk-extern, -fcf-protection=branch
22926 and -fcheck-pointer-bounds are used together.
22927 (indirect_thunk_prefix): New enum.
22928 (indirect_thunk_need_prefix): New function.
22929 (indirect_thunk_name): Replace need_bnd_p with need_prefix. Use
22930 "_nt" instead of "_bnd" for NOTRACK prefix.
22931 (output_indirect_thunk): Replace need_bnd_p with need_prefix.
22932 (output_indirect_thunk_function): Likewise.
22933 (): Likewise.
22934 (ix86_code_end): Update output_indirect_thunk_function calls.
22935 (ix86_output_indirect_branch_via_reg): Replace
22936 ix86_bnd_prefixed_insn_p with indirect_thunk_need_prefix.
22937 (ix86_output_indirect_branch_via_push): Likewise.
22938 (ix86_output_function_return): Likewise.
22939 * doc/invoke.texi: Document -mindirect-branch=thunk-extern is
22940 incompatible with -fcf-protection=branch and
22941 -fcheck-pointer-bounds.
22942
22943 2018-02-22 Steve Ellcey <sellcey@cavium.com>
22944
22945 PR target/83335
22946 * config/aarch64/aarch64.c (aarch64_print_address_internal):
22947 Change gcc_assert call to output_operand_lossage.
22948
22949 2018-02-22 Steve Ellcey <sellcey@cavium.com>
22950
22951 * doc/extend.texi (__builtin_extend_pointer): Document builtin.
22952
22953 2018-02-22 DJ Delorie <dj@redhat.com>
22954 Sebastian Perta <sebastian.perta@renesas.com>
22955 Oleg Endo <olegendo@gcc.gnu.org>
22956
22957 * config/rx/rx.c (rx_rtx_costs): New function.
22958 (TARGET_RTX_COSTS): Override to use rx_rtx_costs.
22959
22960 2018-02-22 Thomas Preud'homme <thomas.preudhomme@arm.com>
22961
22962 * config/arm/t-multilib: Map Armv8-R to Armv7 multilibs.
22963
22964 2018-02-22 Martin Liska <mliska@suse.cz>
22965
22966 PR driver/83193
22967 * common/config/arm/arm-common.c (arm_print_hint_for_cpu_option):
22968 Add "native" as a possible value.
22969
22970 2018-02-22 Martin Liska <mliska@suse.cz>
22971
22972 PR driver/83193
22973 * config/i386/i386.c (ix86_option_override_internal):
22974 Add "native" as a possible value for -march and -mtune.
22975
22976 2018-02-22 Jakub Jelinek <jakub@redhat.com>
22977
22978 PR target/84502
22979 * stor-layout.c (finalize_type_size): Propagate TYPE_EMPTY_P flag
22980 to all type variants.
22981
22982 PR tree-optimization/84503
22983 * gimple-ssa-store-merging.c (merged_store_group::merge_into): Compute
22984 width as info->bitpos + info->bitsize - start.
22985 (merged_store_group::merge_overlapping): Simplify width computation.
22986 (check_no_overlap): New function.
22987 (imm_store_chain_info::try_coalesce_bswap): Compute expected
22988 start + width and last_order of the group, fail if check_no_overlap
22989 fails.
22990 (imm_store_chain_info::coalesce_immediate_stores): Don't merge info
22991 to group if check_no_overlap fails.
22992
22993 2018-02-21 Segher Boessenkool <segher@kernel.crashing.org>
22994
22995 * config/rs6000/altivec.md: Delete contraint arguments to
22996 define_expand, define_split, and define_peephole2, and in
22997 define_insn_and_split if always unused.
22998 * config/rs6000/darwin.md: Ditto.
22999 * config/rs6000/dfp.md: Ditto.
23000 * config/rs6000/rs6000.md: Ditto.
23001 * config/rs6000/sync.md: Ditto.
23002 * config/rs6000/vector.md: Ditto.
23003 * config/rs6000/vsx.md: Ditto.
23004
23005 2018-02-21 Segher Boessenkool <segher@kernel.crashing.org>
23006
23007 * config/rs6000/altivec.md: Write output control strings as braced
23008 blocks instead of double-quoted strings.
23009 * config/rs6000/darwin.md: Ditto.
23010 * config/rs6000/rs6000.md: Ditto.
23011 * config/rs6000/vector.md: Ditto.
23012 * config/rs6000/vsx.md: Ditto.
23013
23014 2018-02-21 Jason Merrill <jason@redhat.com>
23015
23016 PR c++/84314 - ICE with templates and fastcall attribute.
23017 * attribs.c (build_type_attribute_qual_variant): Remove assert.
23018
23019 2018-02-21 Jan Hubicka <hubicka@ucw.cz>
23020
23021 * ipa-cp.c (determine_versionability): Fix comment typos.
23022
23023 2018-02-21 Jan Hubicka <hubicka@ucw.cz>
23024
23025 PR c/84229
23026 * ipa-cp.c (determine_versionability): Do not version functions caling
23027 va_arg_pack.
23028
23029 2018-02-21 Martin Liska <mliska@suse.cz>
23030
23031 PR driver/83193
23032 * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch):
23033 Add "native" as a possible value.
23034 * config/aarch64/aarch64.h (HAVE_LOCAL_CPU_DETECT): Define
23035 the macro when native cpu detection is available.
23036
23037 2018-02-21 Martin Liska <mliska@suse.cz>
23038
23039 PR driver/83193
23040 * common/config/arm/arm-common.c (arm_print_hint_for_arch_option):
23041 Add "native" as a possible value.
23042 * config/arm/arm.h (HAVE_LOCAL_CPU_DETECT): Define the macro
23043 when native cpu detection is available.
23044
23045 2018-02-21 Jakub Jelinek <jakub@redhat.com>
23046 Martin Sebor <msebor@redhat.com>
23047
23048 PR tree-optimization/84478
23049 * gimple-fold.h (get_range_strlen): Add a bool argument defaulted to
23050 false.
23051 * gimple-fold.c (get_range_strlen): Make minlen const and assume it
23052 can't be NULL. Change FUZZY from bool to int, for 1 add PHI/COND_EXPR
23053 support which is conservatively correct, for 2 only stay conservative
23054 for maxlen. Formatting and comment capitalization fixes. Add STRICT
23055 argument to the 2 argument get_range_strlen, adjust 6 arg
23056 get_range_strlen caller and clear minmaxlen[0] and [1] if it returned
23057 false.
23058 (get_maxval_strlen): Adjust 6 arg get_range_strlen caller.
23059 (gimple_fold_builtin_strlen): Pass true as last argument to
23060 get_range_strlen.
23061
23062 2018-02-20 Martin Sebor <msebor@redhat.com>
23063
23064 PR middle-end/84095
23065 * gimple-ssa-warn-restrict.c (builtin_memref::extend_offset_range): New.
23066 (builtin_memref::set_base_and_offset): Same. Handle inner references.
23067 (builtin_memref::builtin_memref): Factor out parts into
23068 set_base_and_offset and call it.
23069
23070 2018-02-20 Richard Sandiford <richard.sandiford@linaro.org>
23071
23072 PR middle-end/84406
23073 * optabs-query.c (find_widening_optab_handler_and_mode): If from_mode
23074 is a scalar_int_mode, assert that to_mode is a scalar_int_mode with
23075 greater precision. If to_mode is a MODE_PARTIAL_INT, stop the
23076 search at the associated MODE_INT.
23077
23078 2018-02-20 Jeff Law <law@redhat.com>
23079
23080 PR middle-end/82123
23081 PR tree-optimization/81592
23082 PR middle-end/79257
23083 * gimple-ssa-sprintf.c (format_integer): Query EVRP range analyzer
23084 for range data rather than using global data.
23085 * gimple-ssa-sprintf.c (get_int_range): Query EVRP range analyzer for
23086 range data rather than using global data.
23087 * gimple-ssa-sprintf.c (get_int_range): Accept vr_values parameter
23088 pass it to children as needed.
23089 (struct directive::fmtresult): Similarly.
23090 (struct directive::set_width): Similarly.
23091 (struct directive::set_precision): Similarly.
23092 (format_integer, format_directive, parse_directive): Similarly.
23093 (format_none): Accept unnamed vr_values parameter.
23094 (format_percent, format_floating, format_character): Similarly.
23095 (format_string, format_plain): Similarly.
23096 * gimple-ssa-sprintf.c (sprintf_dom_walker::handle_gimple_call): Query
23097 the EVRP range analyzer for range data rather than using global data.
23098 * gimple-ssa-sprintf.c: Include alloc-pool.h, vr-values.h and
23099 gimple-ssa-evrp-analyze.h
23100 (class sprintf_dom_walker): Add after_dom_children member function.
23101 Add evrp_range_analyzer member.
23102 (sprintf_dom_walker::before_dom_children): Call into the EVRP
23103 range analyzer as needed.
23104 (sprintf_dom_walker::after_dom_children): New member function.
23105 * gimple-ssa-evrp-analyze.c (evrp_range_analyzer::enter): Do nothing
23106 if not optimizing.
23107 (evrp_range_analyzer::record_ranges_from_stmt): Likewise.
23108 (evrp_range_analyzer::pop_to_marker): Likewise.
23109
23110 2018-02-20 Richard Sandiford <richard.sandiford@linaro.org>
23111
23112 PR tree-optimization/84419
23113 * internal-fn.c (expand_call_mem_ref): Create a TARGET_MEM_REF
23114 with the required type if its current type is compatible but
23115 different.
23116
23117 2018-02-20 Jakub Jelinek <jakub@redhat.com>
23118
23119 PR middle-end/82004
23120 * match.pd (pow(C,x) -> exp(log(C)*x)): Delay all folding until
23121 after vectorization.
23122
23123 2018-02-20 Martin Liska <mliska@suse.cz>
23124
23125 PR driver/83193
23126 * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch): Print
23127 possible values if we don't have a hint.
23128
23129 2018-02-20 Martin Liska <mliska@suse.cz>
23130
23131 PR c/84310
23132 PR target/79747
23133 * final.c (shorten_branches): Build align_tab array with one
23134 more element.
23135 * opts.c (finish_options): Add alignment option limit check.
23136 (MAX_CODE_ALIGN): Likewise.
23137 (MAX_CODE_ALIGN_VALUE): Likewise.
23138 * doc/invoke.texi: Document maximum allowed option value for
23139 all -falign-* options.
23140
23141 2018-02-19 Jakub Jelinek <jakub@redhat.com>
23142
23143 PR target/84146
23144 * reg-notes.def (REG_CALL_ARG_LOCATION): New reg note.
23145 * insn-notes.def (NOTE_INSN_CALL_ARG_LOCATION): Remove.
23146 * var-tracking.c (emit_note_insn_var_location): Remove all references
23147 to NOTE_INSN_CALL_ARG_LOCATION.
23148 (emit_notes_in_bb): Emit arguments as REG_CALL_ARG_LOCATION note on
23149 the CALL_INSN rather than separate NOTE_INSN_CALL_ARG_LOCATION note.
23150 Use copy_rtx_if_shared.
23151 * dwarf2out.c (gen_subprogram_die): Use XEXP with 0 instead of
23152 NOTE_VAR_LOCATION on ca_loc->call_arg_loc_note.
23153 (dwarf2out_var_location): Remove handling of
23154 NOTE_INSN_CALL_ARG_LOCATION, instead handle REG_CALL_ARG_LOCATION note
23155 on call_insn.
23156 * final.c (final_scan_insn): Remove all references to
23157 NOTE_INSN_CALL_ARG_LOCATION.
23158 (rest_of_clean_state): Likewise. Remove REG_CALL_ARG_LOCATION notes
23159 before dumping final insns.
23160 * except.c (emit_note_eh_region_end): Remove all references to
23161 NOTE_INSN_CALL_ARG_LOCATION.
23162 * config/alpha/alpha.c (alpha_pad_function_end): Likewise.
23163 * config/c6x/c6x.c (c6x_gen_bundles): Likewise.
23164 * config/arc/arc.c (hwloop_optimize): Likewise.
23165 * config/arm/arm.c (create_fix_barrier): Likewise.
23166 * config/s390/s390.c (s390_chunkify_start): Likewise.
23167 * config/sh/sh.c (find_barrier): Likewise.
23168 * config/i386/i386.c (rest_of_insert_endbranch,
23169 ix86_seh_fixup_eh_fallthru): Likewise.
23170 * config/xtensa/xtensa.c (hwloop_optimize): Likewise.
23171 * config/iq2000/iq2000.c (final_prescan_insn): Likewise.
23172 * config/frv/frv.c (frv_function_prologue): Likewise.
23173 * emit-rtl.c (try_split): Likewise. Copy over REG_CALL_ARG_LOCATION
23174 reg note.
23175 (note_outside_basic_block_p): Remove all references to
23176 NOTE_INSN_CALL_ARG_LOCATION.
23177 * gengtype.c (adjust_field_rtx_def): Likewise.
23178 * print-rtl.c (rtx_writer::print_rtx_operand_code_0, print_insn):
23179 Likewise.
23180 * jump.c (cleanup_barriers, delete_related_insns): Likewise.
23181 * cfgrtl.c (force_nonfallthru_and_redirect): Likewise.
23182
23183 PR c++/84444
23184 * builtins.c (builtin_mathfn_code): Don't check if CALL_EXPR_FN (t)
23185 is ADDR_EXPR.
23186
23187 PR tree-optimization/84452
23188 * tree-vect-patterns.c (vect_recog_pow_pattern): Don't call
23189 expand_simd_clones if targetm.simd_clone.compute_vecsize_and_simdlen
23190 is NULL.
23191
23192 2018-02-19 Martin Liska <mliska@suse.cz>
23193
23194 PR sanitizer/82183
23195 * passes.def: Put pass_sancov_O0 before pass_lower_switch with -O0.
23196
23197 2018-02-19 Martin Liska <mliska@suse.cz>
23198 Richard Sandiford <richard.sandiford@linaro.org>
23199
23200 PR tree-optimization/82491
23201 * gimple-fold.c (get_base_constructor): Make earlier bail out
23202 to prevent ubsan.
23203
23204 2018-02-19 Carl Love <cel@us.ibm.com>
23205
23206 * config/rs6000/rs6000-builtin.def: Change NEG macro expansions from
23207 BU_ALTIVEC_A to BU_P8V_AV_1 and BU_ALTIVEC_OVERLOAD_1 to
23208 BU_P8V_OVERLOAD_1.
23209 * config/rs6000/rs6000-c.c: Change ALTIVEC_BUILTIN_VEC_NEG to
23210 P8V_BUILTIN_VEC_NEG.
23211
23212 2018-02-19 Sebastian Perta <sebastian.perta@renesas.com>
23213
23214 * config/rl78/rl78.md (movdf): New define expand.
23215
23216 2018-02-19 Martin Liska <mliska@suse.cz>
23217
23218 PR other/80589
23219 * doc/invoke.texi: Fix typo.
23220 * params.def (PARAM_MAX_LOOP_HEADER_INSNS): Likewise.
23221
23222 2018-02-18 Segher Boessenkool <segher@kernel.crashing.org>
23223
23224 * config/rs6000/rs6000.c (rs6000_option_override_internal): Don't
23225 handle rs6000_single_float and rs6000_double_float specially for
23226 e500 family CPUs.
23227
23228 2018-02-16 Jeff Law <law@redhat.com>
23229
23230 * config/rx/rx.c (add_pop_cfi_notes): New function.;
23231 (pop_regs): Use it.
23232
23233 2018-02-16 Jakub Jelinek <jakub@redhat.com>
23234
23235 PR ipa/84425
23236 * ipa-inline.c (inline_small_functions): Fix a typo.
23237
23238 2018-02-16 Nathan Sidwell <nathan@acm.org>
23239
23240 * doc/extend.texi (Backwards Compatibility): Americanize 'behaviour'.
23241
23242 2018-02-16 Carl Love <cel@us.ibm.com>
23243
23244 * config/rs6000/rs6000-builtin.def: Add BU_P8V_VSX_2 macro definition.
23245 Change FLOAT2 expansions from BU_VSX_2 to BU_P8V_VSX_2 and
23246 from BU_VSX_OVERLOAD_2 to BU_P8V_OVERLOAD_2.
23247 * config/rs6000/rs6000-c.c: Changed macro VSX_BUILTIN_VEC_FLOAT2
23248 expansion to P8V_BUILTIN_VEC_FLOAT2.
23249
23250 2018-02-16 Vladimir Makarov <vmakarov@redhat.com>
23251
23252 PR rtl-optimization/70023
23253 * lra-constraints.c (inherit_in_ebb): Take hard reg mode of
23254 src_regno into account.
23255
23256 2018-02-16 Carl Love <cel@us.ibm.com>
23257
23258 * config/rs6000/altivec.h: Remove vec_vextract4b and vec_vinsert4b.
23259 * config/rs6000/rs6000-builtin.def: Remove macro expansion for
23260 VEXTRACT4B, VINSERT4B, VINSERT4B_DI and VEXTRACT4B.
23261 * config/rs6000/rs6000.c: Remove case statements for
23262 P9V_BUILTIN_VEXTRACT4B, P9V_BUILTIN_VEC_VEXTRACT4B,
23263 P9V_BUILTIN_VINSERT4B, P9V_BUILTIN_VINSERT4B_DI,
23264 and P9V_BUILTIN_VEC_VINSERT4B.
23265 * config/rs6000/rs6000-c.c (altivec_expand_builtin): Remove entries for
23266 P9V_BUILTIN_VEC_VEXTRACT4B and P9V_BUILTIN_VEC_VINSERT4B.
23267 * config/rs6000/vsx.md:
23268 * doc/extend.texi: Remove vec_vextract4b, non ABI definitions for
23269 vec_insert4b.
23270
23271 2018-02-16 Carl Love <cel@us.ibm.com>
23272
23273 * config/rs6000/altivec.h: Add builtin names vec_extract4b
23274 vec_insert4b.
23275 * config/rs6000/rs6000-builtin.def: Add INSERT4B and EXTRACT4B
23276 definitions.
23277 * config/rs6000/rs6000-c.c: Add the definitions for
23278 P9V_BUILTIN_VEC_EXTRACT4B and P9V_BUILTIN_VEC_INSERT4B.
23279 * config/rs6000/rs6000.c (altivec_expand_builtin): Add
23280 P9V_BUILTIN_EXTRACT4B and P9V_BUILTIN_INSERT4B case statements.
23281 * config/rs6000/vsx.md: Add define_insn extract4b. Add define_expand
23282 definition for insert4b and define insn *insert3b_internal.
23283 * doc/extend.texi: Add documentation for vec_extract4b.
23284
23285 2018-02-16 Nathan Sidwell <nathan@acm.org>
23286
23287 * doc/extend.texi (Backwards Compatibility): Mention friend
23288 injection. Note for-scope is deprecated.
23289 * doc/invoke.texi (-ffriend-injection): Deprecate.
23290
23291 2018-02-16 Segher Boessenkool <segher@kernel.crashing.org>
23292
23293 * combine.c (try_combine): When adjusting LOG_LINKS for the destination
23294 that moved to I2, also allow destinations that are a paradoxical
23295 subreg (instead of a normal reg).
23296
23297 2018-02-16 Oleg Endo <olegendo@gcc.gnu.org>
23298
23299 PR target/83831
23300 * config/rx/rx.c (rx_fuse_in_memory_bitop): Convert shift operand
23301 to QImode.
23302
23303 2018-02-16 Richard Biener <rguenther@suse.de>
23304
23305 PR tree-optimization/84037
23306 PR tree-optimization/84016
23307 PR target/82862
23308 * config/i386/i386.c (ix86_builtin_vectorization_cost):
23309 Adjust vec_construct for the fact we need additional higher latency
23310 128bit inserts for AVX256 and AVX512 vector builds.
23311 (ix86_add_stmt_cost): Scale vector construction cost for
23312 elementwise loads.
23313
23314 2018-02-16 Richard Biener <rguenther@suse.de>
23315
23316 PR tree-optimization/84417
23317 * tree-ssa.c (non_rewritable_mem_ref_base): Properly constrain
23318 the MEM_REF offset when conversion to BIT_FIELD_REF is desired.
23319 (non_rewritable_lvalue_p): Likewise, use poly-ints.
23320
23321 2018-02-16 Martin Liska <mliska@suse.cz>
23322
23323 PR sanitizer/84307
23324 * internal-fn.def (ASAN_CHECK): Set proper flags.
23325 (ASAN_MARK): Likewise.
23326
23327 2018-02-16 Julia Koval <julia.koval@intel.com>
23328
23329 * config/i386/i386.c (ix86_option_override_internal): Remove PTA_CLWB
23330 from PTA_CANNONLAKE.
23331
23332 2018-02-16 Jakub Jelinek <jakub@redhat.com>
23333
23334 PR target/84272
23335 * config/aarch64/cortex-a57-fma-steering.c (fma_forest::merge_forest):
23336 Use ++iter rather than iter++ for std::list iterators.
23337 (func_fma_steering::dfs): Likewise. Don't delete nodes right away,
23338 defer deleting them until all nodes in the forest are processed. Do
23339 free even leaf nodes. Change to_process into auto_vec.
23340
23341 PR bootstrap/84405
23342 * system.h (BROKEN_VALUE_INITIALIZATION): Define for GCC < 4.3.
23343 * vec.h (vec_default_construct): Use memset instead of placement new
23344 if BROKEN_VALUE_INITIALIZATION is defined.
23345 * hash-table.h (hash_table<Descriptor, Allocator>::empty_slow): Use
23346 memset instead of value initialization if BROKEN_VALUE_INITIALIZATION
23347 is defined.
23348
23349 PR rtl-optimization/83723
23350 * lra-int.h (lra_substitute_pseudo): Add DEBUG_P argument.
23351 * lra.c (lra_substitute_pseudo): Likewise. If true, use
23352 gen_rtx_raw_SUBREG instead of gen_rtx_SUBREG. Pass DEBUG_P to
23353 recursive calls.
23354 (lra_substitute_pseudo_within_insn): Adjust lra_substitute_pseudo
23355 callers.
23356 * lra-constraints.c (inherit_reload_reg, split_reg): Likewise.
23357
23358 2018-02-16 Eric Botcazou <ebotcazou@adacore.com>
23359
23360 PR rtl-optimization/81443
23361 * rtlanal.c (num_sign_bit_copies1) <SUBREG>: Do not propagate results
23362 from inner REGs to paradoxical SUBREGs.
23363
23364 2018-02-16 Richard Biener <rguenther@suse.de>
23365
23366 PR tree-optimization/84399
23367 * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
23368 For operands we can analyze at their definition make sure we can
23369 analyze them at each use as well.
23370
23371 2018-02-16 Richard Biener <rguenther@suse.de>
23372
23373 PR tree-optimization/84190
23374 * tree-ssa.c (non_rewritable_mem_ref_base): Do not touch
23375 volatile accesses if the decl isn't volatile.
23376
23377 2018-02-15 Jason Merrill <jason@redhat.com>
23378
23379 PR c++/84314 - ICE with templates and fastcall attribute.
23380 * attribs.c (build_type_attribute_qual_variant): Don't clobber
23381 TYPE_CANONICAL on an existing type.
23382
23383 2018-02-15 Jakub Jelinek <jakub@redhat.com>
23384
23385 PR tree-optimization/84383
23386 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Don't look at
23387 dstoff nor call operand_equal_p if dstbase is NULL.
23388
23389 PR tree-optimization/84334
23390 * match.pd ((A +- CST1) +- CST2 -> A + CST3): If A is
23391 also a CONSTANT_CLASS_P, punt.
23392
23393 2018-02-14 Jim Wilson <jimw@sifive.com>
23394
23395 * config/riscv/riscv.c (riscv_first_stack_step): Move locals after
23396 first SMALL_OPERAND check. New local min_second_step. Move assert
23397 to where locals are set. Add TARGET_RVC support.
23398 * config/riscv/riscv.h (C_SxSP_BITS, SWSP_REACH, SDSP_REACH): New.
23399
23400 2018-02-14 Indu Bhagat <indu.bhagat@oracle.com>
23401
23402 * doc/invoke.texi: Correct -Wformat-overflow code sample.
23403
23404 2018-02-14 Martin Sebor <msebor@redhat.com>
23405
23406 PR tree-optimization/83698
23407 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For
23408 arrays constrain the offset range to their bounds.
23409 (builtin_access::strcat_overlap): Adjust the bounds of overlap offset.
23410 (builtin_access::overlap): Avoid setting the size of overlap if it's
23411 already been set.
23412 (maybe_diag_overlap): Also consider arrays when deciding what values
23413 of offsets to include in diagnostics.
23414
23415 2018-02-14 Martin Sebor <msebor@redhat.com>
23416
23417 PR c/84108
23418 * attribs.c (diag_attr_exclusions): Consider the exclusion(s)
23419 that correspond to the kind of a declaration.
23420
23421 2018-02-14 John David Anglin <danglin@gcc.gnu.org>
23422
23423 PR target/83984
23424 * config/pa/pa.md: Load address of PIC label using the linkage table
23425 if the label is nonlocal.
23426
23427 2018-02-14 Kelvin Nilsen <kelvin@gcc.gnu.org>
23428
23429 * config/rs6000/rs6000.c (rs6000_option_override_internal): Issue
23430 warning message if user requests -maltivec=be.
23431 * doc/invoke.texi: Document deprecation of -maltivec=be.
23432
23433 2018-02-14 Will Schmidt <will_schmidt@vnet.ibm.com>
23434
23435 PR target/84220
23436 * config/rs6000/rs6000-c.c: Update definitions for
23437 ALTIVEC_BUILTIN_VEC_SLD, ALTIVEC_BUILTIN_VEC_SLDW,
23438 VEC_XXSLDWI and ALTIVEC_BUILTIN_VEC_XXPERMDI builtins.
23439
23440 2018-02-14 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
23441
23442 PR target/84239
23443 * config/i386/cetintrin.h: Remove _rdssp[d|q] and
23444 add _get_ssp intrinsics. Remove argument from
23445 __builtin_ia32_rdssp[d|q].
23446 * config/i386/i386-builtin-types.def: Add UINT_FTYPE_VOID.
23447 * config/i386/i386-builtin.def: Remove argument from
23448 __builtin_ia32_rdssp[d|q].
23449 * config/i386/i386.c: Use UINT_FTYPE_VOID. Use
23450 ix86_expand_special_args_builtin for _rdssp[d|q].
23451 * config/i386/i386.md: Remove argument from rdssp[si|di] insn.
23452 Clear register before usage.
23453 * doc/extend.texi: Remove argument from __builtin_ia32_rdssp[d|q].
23454 Add documentation for new _get_ssp and _inc_ssp intrinsics.
23455
23456 2018-02-14 Richard Sandiford <richard.sandiford@linaro.org>
23457
23458 PR tree-optimization/84357
23459 * tree-data-ref.c (object_address_invariant_in_loop_p): Check
23460 operand 1 of an ARRAY_REF too.
23461
23462 2018-02-14 Oleg Endo <olegendo@gcc.gnu.org>
23463
23464 PR target/83831
23465 * config/rx/rx-protos.h (rx_reg_dead_or_unused_after_insn,
23466 rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
23467 declarations.
23468 (set_of_reg): New struct.
23469 (rx_find_set_of_reg, rx_find_use_of_reg): New functions.
23470 * config/rx/rx.c (rx_reg_dead_or_unused_after_insn,
23471 rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
23472 functions.
23473 * config/rx/rx.md (andsi3, iorsi3, xorsi3): Convert to insn_and_split.
23474 Split into bitclr, bitset, bitinvert patterns if appropriate.
23475 (*bitset, *bitinvert, *bitclr): Convert to named insn_and_split and
23476 use rx_fuse_in_memory_bitop.
23477 (*bitset_in_memory, *bitinvert_in_memory, *bitclr_in_memory): Convert
23478 to named insn, correct maximum insn length.
23479
23480 2018-02-14 Jozef Lawrynowicz <jozefl.gcc@gmail.com>
23481
23482 PR target/79242
23483 * machmode.def: Define a complex mode for PARTIAL_INT.
23484 * genmodes.c (complex_class): Return MODE_COMPLEX_INT for
23485 MODE_PARTIAL_INT.
23486 * doc/rtl.texi: Document CSPImode.
23487 * config/msp430/msp430.c (msp430_hard_regno_nregs): Add CPSImode
23488 handling.
23489 (msp430_hard_regno_nregs_with_padding): Likewise.
23490
23491 2018-02-13 Peter Bergner <bergner@vnet.ibm.com>
23492
23493 PR target/84279
23494 * config/rs6000/rs6000.c (mem_operand_gpr): Disallow altivec addresses.
23495
23496 2018-02-13 Segher Boessenkool <segher@kernel.crashing.org>
23497
23498 PR rtl-optimization/84169
23499 * combine.c (try_combine): New variable split_i2i3. Set it to true if
23500 we generated a parallel as new i3 and we split that to new i2 and i3
23501 instructions. Handle split_i2i3 similar to swap_i2i3: scan the
23502 LOG_LINKs of i3 to see which of those need to link to i2 now. Link
23503 those to i2, not i1. Partially rewrite this scan code.
23504
23505 2018-02-13 Jakub Jelinek <jakub@redhat.com>
23506
23507 PR c/82210
23508 * stor-layout.c (place_field): For variable length fields, adjust
23509 offset_align afterwards not just based on the field's alignment,
23510 but also on the size.
23511
23512 PR middle-end/84309
23513 * match.pd (pow(C,x) -> exp(log(C)*x)): Use exp2s and log2s instead
23514 of exps and logs in the use_exp2 case.
23515
23516 2018-02-13 Jeff Law <law@redhat.com>
23517
23518 * config/rl/rl78.c (rl78_attribute_table): Fix terminator and
23519 entry for "vector".
23520
23521 * config/rl78/rl78.c (rl78_handle_func_attribute): Mark
23522 ARGS as unused.
23523
23524 2018-02-13 Alexandre Oliva <aoliva@redhat.com>
23525
23526 PR debug/84342
23527 PR debug/84319
23528 * common.opt (gas-loc-support, gas-locview-support): New.
23529 (ginline-points, ginternal-reset-location-views): New.
23530 * doc/invoke.texi: Document them. Use @itemx where intended.
23531 (gvariable-location-views): Adjust.
23532 * target.def (reset_location_view): New.
23533 * doc/tm.texi.in (DWARF2_ASM_VIEW_DEBUG_INFO): New.
23534 (TARGET_RESET_LOCATION_VIEW): New.
23535 * doc/tm.texi: Rebuilt.
23536 * dwarf2out.c (dwarf2out_default_as_loc_support): New.
23537 (dwarf2out_default_as_locview_support): New.
23538 (output_asm_line_debug_info): Use option variables.
23539 (dwarf2out_maybe_output_loclist_view_pair): Likewise.
23540 (output_loc_list): Likewise.
23541 (add_high_low_attributes): Check option variables.
23542 Don't output entry view attribute in strict mode.
23543 (gen_inlined_subroutine_die): Check option variables.
23544 (dwarf2out_inline_entry): Likewise.
23545 (init_sections_and_labels): Likewise.
23546 (dwarf2out_early_finish): Likewise.
23547 (maybe_reset_location_view): New, from...
23548 (dwarf2out_var_location): ... here. Call it.
23549 * debug.h (dwarf2out_default_as_loc_support): Declare.
23550 (dwarf2out_default_as_locview_support): Declare.
23551 * hooks.c (hook_int_rtx_insn_0): New.
23552 * hooks.h (hook_int_rtx_insn_0): Declare.
23553 * toplev.c (process_options): Take -gas-loc-support and
23554 -gas-locview-support from dwarf2out. Enable
23555 -gvariable-location-views by default only with locview
23556 assembler support. Enable -ginternal-reset-location-views by
23557 default only if the target defines the corresponding hook.
23558 Enable -ginline-points by default if location views are
23559 enabled; force it disabled if statement frontiers are
23560 disabled.
23561 * tree-inline.c (expand_call_inline): Check option variables.
23562 * tree-ssa-live.c (remove_unused_scope_block_p): Likewise.
23563
23564 2018-02-13 Richard Sandiford <richard.sandiford@linaro.org>
23565
23566 PR tree-optimization/84321
23567 * tree-vrp.c (intersect_range_with_nonzero_bits): Fix VR_ANTI_RANGE
23568 handling. Also check whether the anti-range contains any values
23569 that satisfy the mask; switch to a VR_RANGE if not.
23570
23571 2018-02-13 Paolo Bonzini <bonzini@gnu.org>
23572
23573 PR sanitizer/84340
23574 * internal-fn.def (ASAN_CHECK, ASAN_MARK): Revert changes to fnspec.
23575
23576 2018-02-13 Martin Jambor <mjambor@suse.cz>
23577
23578 PR c++/83990
23579 * ipa-param-manipulation.c (ipa_modify_call_arguments): Use location
23580 of call statements, also set location of a load to a temporary.
23581
23582 2018-02-13 Sebastian Perta <sebastian.perta@renesas.com>
23583
23584 * config/rl78/rl78.c (add_vector_labels): New function.
23585 * config/rl78/rl78.c (rl78_handle_vector_attribute): New function.
23586 * config/rl78/rl78.c (rl78_start_function): Call add_vector_labels.
23587 * config/rl78/rl78.c (rl78_handle_func_attribute): Removed the assert
23588 which checks that no arguments are passed.
23589 * config/rl78/rl78.c (rl78_attribute_table): Add "vector" attribute.
23590 * doc/extend.texi: Documentation for the new attribute.
23591
23592 2018-02-13 Andreas Schwab <schwab@suse.de>
23593
23594 * config/riscv/linux.h (CPP_SPEC): Define.
23595
23596 2018-02-13 Jakub Jelinek <jakub@redhat.com>
23597
23598 PR target/84335
23599 * config/i386/i386.c (ix86_init_mmx_sse_builtins): Pass
23600 OPTION_MASK_ISA_AES | OPTION_MASK_ISA_SSE2 instead of
23601 OPTION_MASK_ISA_AES as first argument to def_builtin_const
23602 for AES builtins. Pass OPTION_MASK_ISA_PCLMUL | OPTION_MASK_ISA_SSE2
23603 instead of OPTION_MASK_ISA_PCLMUL as first argument to
23604 def_builtin_const for __builtin_ia32_pclmulqdq128 builtin.
23605 * config/i386/wmmintrin.h: If __SSE2__ is not defined, enable it
23606 temporarily for AES and PCLMUL builtins.
23607
23608 PR tree-optimization/84339
23609 * gimple-fold.c (get_range_strlen): Set *FLEXP to true when handling
23610 ARRAY_REF where first operand is array_at_struct_end_p COMPONENT_REF.
23611 Formatting fixes.
23612
23613 PR middle-end/84309
23614 * match.pd (pow(C,x) -> exp(log(C)*x)): Optimize instead into
23615 exp2(log2(C)*x) if C is a power of 2 and c99 runtime is available.
23616 * generic-match-head.c (canonicalize_math_after_vectorization_p): New
23617 inline function.
23618 * gimple-match-head.c (canonicalize_math_after_vectorization_p): New
23619 inline function.
23620 * omp-simd-clone.h: New file.
23621 * omp-simd-clone.c: Include omp-simd-clone.h.
23622 (expand_simd_clones): No longer static.
23623 * tree-vect-patterns.c: Include fold-const-call.h, attribs.h,
23624 cgraph.h and omp-simd-clone.h.
23625 (vect_recog_pow_pattern): Optimize pow(C,x) to exp(log(C)*x).
23626 (vect_recog_widen_shift_pattern): Formatting fix.
23627 (vect_pattern_recog_1): Don't check optab for calls.
23628
23629 PR target/84336
23630 * config/i386/sse.md (<avx512>_vpermi2var<mode>3_mask): Force
23631 operands[2] into a REG before using gen_lowpart on it.
23632
23633 2018-02-12 Jeff Law <law@redhat.com>
23634
23635 PR target/83760
23636 * config/sh/sh.c (find_barrier): Consider a sibling call
23637 a barrier as well.
23638
23639 * cse.c (try_back_substitute_reg): Move any REG_ARGS_SIZE note when
23640 successfully back substituting a reg.
23641
23642 2018-02-12 Richard Biener <rguenther@suse.de>
23643
23644 PR tree-optimization/84037
23645 * tree-vect-slp.c (vect_analyze_slp_cost): Add visited
23646 parameter, move visited init to caller.
23647 (vect_slp_analyze_operations): Separate cost from validity
23648 check, initialize visited once for all instances.
23649 (vect_schedule_slp): Analyze map to CSE vectorized nodes once
23650 for all instances.
23651 * tree-vect-stmts.c (vect_model_simple_cost): Make early
23652 out an assert.
23653 (vect_model_promotion_demotion_cost): Likewise.
23654 (vectorizable_bswap): Guard cost modeling with !slp_node
23655 instead of !PURE_SLP_STMT to avoid double-counting on hybrid
23656 SLP stmts.
23657 (vectorizable_call): Likewise.
23658 (vectorizable_conversion): Likewise.
23659 (vectorizable_assignment): Likewise.
23660 (vectorizable_shift): Likewise.
23661 (vectorizable_operation): Likewise.
23662 (vectorizable_store): Likewise.
23663 (vectorizable_load): Likewise.
23664 (vectorizable_condition): Likewise.
23665 (vectorizable_comparison): Likewise.
23666
23667 2018-02-12 Paolo Bonzini <bonzini@gnu.org>
23668
23669 PR sanitizer/84307
23670 * internal-fn.def (ASAN_CHECK): Fix fnspec to account for return value.
23671 (ASAN_MARK): Fix fnspec to account for return value, change pointer
23672 argument from 'R' to 'W' so that the pointed-to datum is clobbered.
23673
23674 2018-02-08 Jan Hubicka <hubicka@ucw.cz>
23675
23676 PR middle-end/83665
23677 * params.def (inline-min-speedup): Increase from 8 to 15.
23678 (max-inline-insns-auto): Decrease from 40 to 30.
23679 * ipa-split.c (consider_split): Add some buffer for function to
23680 be considered inlining candidate.
23681 * invoke.texi (max-inline-insns-auto, inline-min-speedup): UPdate
23682 default values.
23683
23684 2018-02-12 Richard Biener <rguenther@suse.de>
23685
23686 PR tree-optimization/84037
23687 * tree-vect-slp.c (vect_build_slp_tree_2): Try swapping the
23688 matched stmts if we cannot swap the non-matched ones.
23689
23690 2018-02-12 Olga Makhotina <olga.makhotina@intel.com>
23691
23692 * config/i386/avx512fintrin.h (_mm_mask_scalef_round_sd,
23693 _mm_maskz_scalef_round_sd, _mm_mask_scalef_round_ss,
23694 _mm_maskz_scalef_round_ss): New intrinsics.
23695 (__builtin_ia32_scalefsd_round, __builtin_ia32_scalefss_round): Fix.
23696 * config/i386/i386-builtin.def (__builtin_ia32_scalefsd_round,
23697 __builtin_ia32_scalefss_round): Remove.
23698 (__builtin_ia32_scalefsd_mask_round,
23699 __builtin_ia32_scalefss_mask_round): New intrinsics.
23700 * config/i386/sse.md (vmscalef<mode><round_name>): Renamed to ...
23701 (vmscalef<mode><mask_scalar_name><round_scalar_name>): ... this.
23702 ((match_operand:VF_128 2 "<round_nimm_predicate>"
23703 "<round_constraint>")): Changed to ...
23704 ((match_operand:VF_128 2 "<round_scalar_nimm_predicate>"
23705 "<round_scalar_constraint>")): ... this.
23706 ("vscalef<ssescalarmodesuffix>\t{<round_op3>%2, %1, %0|
23707 %0, %1, %2<round_op3>}"): Changed to ...
23708 ("vscalef<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%2, %1,
23709 %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %1,
23710 %2<round_scalar_mask_op3>}"): ... this.
23711 * config/i386/subst.md (round_scalar_nimm_predicate): New.
23712
23713 2018-02-12 Olga Makhotina <olga.makhotina@intel.com>
23714
23715 * config/i386/avx512fintrin.h (_mm_mask_sqrt_round_sd)
23716 (_mm_maskz_sqrt_round_sd, _mm_mask_sqrt_round_ss)
23717 (_mm_maskz_sqrt_round_ss): New intrinsics.
23718 (__builtin_ia32_sqrtsd_round, __builtin_ia32_sqrtss_round): Remove.
23719 (__builtin_ia32_sqrtsd_mask_round)
23720 (__builtin_ia32_sqrtss_mask_round): New builtins.
23721 * config/i386/i386-builtin.def (__builtin_ia32_sqrtsd_round)
23722 (__builtin_ia32_sqrtss_round): Remove.
23723 (__builtin_ia32_sqrtsd_mask_round)
23724 (__builtin_ia32_sqrtss_mask_round): New builtins.
23725 * config/i386/sse.md (vmsqrt<mode>2<round_name>): Renamed to ...
23726 (vmsqrt<mode>2<mask_scalar_name><round_scalar_name>): ... this.
23727 ((match_operand:VF_128 1 "vector_operand"
23728 "xBm,<round_constraint>")): Changed to ...
23729 ((match_operand:VF_128 1 "vector_operand"
23730 "xBm,<round_scalar_constraint>")): ... this.
23731 (vsqrt<ssescalarmodesuffix>\t{<round_op3>%1, %2, %0|
23732 %0, %2, %<iptr>1<round_op3>}): Changed to ...
23733 (vsqrt<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%1, %2,
23734 %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %2,
23735 %<iptr>1<round_scalar_mask_op3>}): ... this.
23736 ((set_attr "prefix" "<round_prefix>")): Changed to ...
23737 ((set_attr "prefix" "<round_scalar_prefix>")): ... this.
23738
23739 2018-02-11 Steven Munroe <munroesj@gcc.gnu.org>
23740
23741 PR target/84266
23742 * config/rs6000/mmintrin.h (_mm_cmpeq_pi32 [_ARCH_PWR9]):
23743 Cast vec_cmpeq result to correct type.
23744 * config/rs6000/mmintrin.h (_mm_cmpgt_pi32 [_ARCH_PWR9]):
23745 Cast vec_cmpgt result to correct type.
23746
23747 2018-02-11 Alexandre Oliva <aoliva@redhat.com>
23748
23749 * final.c (final_scan_insn_1): Renamed from...
23750 (final_scan_insn): ... this. New wrapper, to recover
23751 seen from the outermost call in recursive ones.
23752 * config/sparc/sparc.c (output_return): Drop seen from call.
23753 (output_sibcall): Likewise.
23754 * config/visium/visium.c (output_branch): Likewise.
23755
23756 2018-02-10 John David Anglin <danglin@gcc.gnu.org>
23757
23758 * config/pa/pa.c (hppa_profile_hook): Mark SYMBOL_REF for _mcount as
23759 function label.
23760
23761 2018-02-10 Alan Modra <amodra@gmail.com>
23762
23763 PR target/84300
23764 * config/rs6000/rs6000.md (split_stack_return): Remove (use ..).
23765 Specify LR as an input.
23766
23767 2018-02-10 Jakub Jelinek <jakub@redhat.com>
23768
23769 PR sanitizer/83987
23770 * omp-low.c (maybe_remove_omp_member_access_dummy_vars,
23771 remove_member_access_dummy_vars): New functions.
23772 (lower_omp_for, lower_omp_taskreg, lower_omp_target,
23773 lower_omp_1, execute_lower_omp): Use them.
23774
23775 PR rtl-optimization/84308
23776 * shrink-wrap.c (spread_components): Release todo vector.
23777
23778 2018-02-09 Vladimir Makarov <vmakarov@redhat.com>
23779
23780 PR rtl-optimization/57193
23781 * ira-color.c (struct allocno_color_data): Add member
23782 conflict_allocno_hard_prefs.
23783 (update_conflict_allocno_hard_prefs): New.
23784 (bucket_allocno_compare_func): Add a preference based on
23785 conflict_allocno_hard_prefs.
23786 (push_allocno_to_stack): Update conflict_allocno_hard_prefs.
23787 (color_allocnos): Remove a dead code. Initiate
23788 conflict_allocno_hard_prefs. Call update_costs_from_prefs.
23789
23790 2018-02-09 Jakub Jelinek <jakub@redhat.com>
23791
23792 PR target/84226
23793 * config/rs6000/vsx.md (p9_xxbrq_v16qi): Change input operand
23794 constraint from =wa to wa. Avoid a subreg on the output operand,
23795 instead use a pseudo and subreg it in a move.
23796 (p9_xxbrd_<mode>): Changed to ...
23797 (p9_xxbrd_v2di): ... this insn, without VSX_D iterator.
23798 (p9_xxbrd_v2df): New expander.
23799 (p9_xxbrw_<mode>): Changed to ...
23800 (p9_xxbrw_v4si): ... this insn, without VSX_W iterator.
23801 (p9_xxbrw_v4sf): New expander.
23802
23803 2018-02-09 Sebastian Perta <sebastian.perta@renesas.com>
23804
23805 * config/rx/rx.md (movsicc): Update expander to be matched by GCC.
23806
23807 2018-02-09 Peter Bergner <bergner@vnet.ibm.com>
23808
23809 PR target/83926
23810 * config/rs6000/vsx.md (vsx_mul_v2di): Handle generating a 64-bit
23811 multiply in 32-bit mode.
23812 (vsx_div_v2di): Handle generating a 64-bit signed divide in 32-bit mode.
23813 (vsx_udiv_v2di): Handle generating a 64-bit unsigned divide in 32-bit
23814 mode.
23815
23816 2018-02-09 Sebastian Perta <sebastian.perta@renesas.com>
23817
23818 * config/rx/constraints.md (CALL_OP_SYMBOL_REF): Added new constraint
23819 to allow or block "symbol_ref" depending on the value of TARGET_JSR.
23820 * config/rx/rx.md (call_internal): Use CALL_OP_SYMBOL_REF.
23821 * config/rx/rx.md (call_value_internal): Use CALL_OP_SYMBOL_REF.
23822
23823 2018-02-09 Pierre-Marie de Rodat <derodat@adacore.com>
23824
23825 PR lto/84213
23826 * dwarf2out.c (is_trivial_indirect_ref): New function.
23827 (dwarf2out_late_global_decl): Do not generate a location
23828 attribute for variables that have a non-trivial DECL_VALUE_EXPR
23829 and that are not defined in the current unit.
23830
23831 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
23832
23833 * optabs.c (prepare_cmp_insn): Try harder to emit a direct comparison
23834 instead of a libcall for UNORDERED.
23835
23836 2018-02-09 Tamar Christina <tamar.christina@arm.com>
23837
23838 PR target/82641
23839 * config/arm/arm-c.c (arm_cpu_builtins): Un-define __ARM_FEATURE_LDREX,
23840 __ARM_ARCH_PROFILE, __ARM_ARCH_ISA_THUMB, __ARM_FP and __ARM_NEON_FP.
23841
23842 2018-02-09 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
23843
23844 PR target/PR84295
23845 * config/s390/s390.c (s390_set_current_function): Invoke
23846 s390_indirect_branch_settings also if fndecl didn't change.
23847
23848 2018-02-09 Alexandre Oliva <aoliva@redhat.com>
23849
23850 * config/rs6000/rs6000.md (blockage): Set length to zero.
23851
23852 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
23853
23854 * expr.c (optimize_bitfield_assignment_op): Remove obsolete assertion.
23855
23856 2018-02-09 Jakub Jelinek <jakub@redhat.com>
23857
23858 PR sanitizer/84285
23859 * gcc.c (STATIC_LIBASAN_LIBS, STATIC_LIBTSAN_LIBS,
23860 STATIC_LIBLSAN_LIBS, STATIC_LIBUBSAN_LIBS): Handle -static like
23861 -static-lib*san.
23862
23863 PR debug/84252
23864 * var-tracking.c (vt_add_function_parameter): Punt for non-onepart
23865 PARALLEL incoming that failed vt_get_decl_and_offset check.
23866
23867 PR middle-end/84237
23868 * output.h (bss_initializer_p): Add NAMED argument, defaulted to false.
23869 * varasm.c (bss_initializer_p): Add NAMED argument, if true, ignore
23870 TREE_READONLY bit.
23871 (get_variable_section): For decls in named .bss* sections pass true as
23872 second argument to bss_initializer_p.
23873
23874 2018-02-09 Marek Polacek <polacek@redhat.com>
23875 Jakub Jelinek <jakub@redhat.com>
23876
23877 PR c++/83659
23878 * fold-const.c (fold_indirect_ref_1): Use VECTOR_TYPE_P macro.
23879 Formatting fixes. Verify first that tree_fits_poly_int64_p (op01).
23880 Sync some changes from cxx_fold_indirect_ref.
23881
23882 2018-02-09 Alexandre Oliva <aoliva@redhat.com>
23883
23884 * cfgexpand.c (expand_gimple_basic_block): Handle inline entry
23885 markers.
23886 * dwarf2out.c (dwarf2_debug_hooks): Enable inline_entry hook.
23887 (BLOCK_INLINE_ENTRY_LABEL): New.
23888 (dwarf2out_var_location): Disregard inline entry markers.
23889 (inline_entry_data): New struct.
23890 (inline_entry_data_hasher): New hashtable type.
23891 (inline_entry_data_hasher::hash): New.
23892 (inline_entry_data_hasher::equal): New.
23893 (inline_entry_data_table): New variable.
23894 (add_high_low_attributes): Add DW_AT_entry_pc and
23895 DW_AT_GNU_entry_view attributes if a pending entry is found
23896 in inline_entry_data_table. Add old entry_pc attribute only
23897 if debug nonbinding markers are disabled.
23898 (gen_inlined_subroutine_die): Set BLOCK_DIE if nonbinding
23899 markers are enabled.
23900 (block_within_block_p, dwarf2out_inline_entry): New.
23901 (dwarf2out_finish): Check that no entries remained in
23902 inline_entry_data_table.
23903 * final.c (reemit_insn_block_notes): Handle inline entry notes.
23904 (final_scan_insn, notice_source_line): Likewise.
23905 (rest_of_clean_state): Skip inline entry markers.
23906 * gimple-pretty-print.c (dump_gimple_debug): Handle inline entry
23907 markers.
23908 * gimple.c (gimple_build_debug_inline_entry): New.
23909 * gimple.h (enum gimple_debug_subcode): Add
23910 GIMPLE_DEBUG_INLINE_ENTRY.
23911 (gimple_build_debug_inline_entry): Declare.
23912 (gimple_debug_inline_entry_p): New.
23913 (gimple_debug_nonbind_marker_p): Adjust.
23914 * insn-notes.def (INLINE_ENTRY): New.
23915 * print-rtl.c (rtx_writer::print_rtx_operand_code_0): Handle
23916 inline entry marker notes.
23917 (print_insn): Likewise.
23918 * rtl.h (NOTE_MARKER_P): Add INLINE_ENTRY support.
23919 (INSN_DEBUG_MARKER_KIND): Likewise.
23920 (GEN_RTX_DEBUG_MARKER_INLINE_ENTRY_PAT): New.
23921 * tree-inline.c (expand_call_inline): Build and insert
23922 debug_inline_entry stmt.
23923 * tree-ssa-live.c (remove_unused_scope_block_p): Preserve
23924 inline entry blocks early, if nonbind markers are enabled.
23925 (dump_scope_block): Dump fragment info.
23926 * var-tracking.c (reemit_marker_as_note): Handle inline entry note.
23927 * doc/gimple.texi (gimple_debug_inline_entry_p): New.
23928 (gimple_build_debug_inline_entry): New.
23929 * doc/invoke.texi (gstatement-frontiers, gno-statement-frontiers):
23930 Enable/disable inline entry points too.
23931 * doc/rtl.texi (NOTE_INSN_INLINE_ENTRY): New.
23932 (DEBUG_INSN): Describe inline entry markers.
23933
23934 * common.opt (gvariable-location-views): New.
23935 (gvariable-location-views=incompat5): New.
23936 * config.in: Rebuilt.
23937 * configure: Rebuilt.
23938 * configure.ac: Test assembler for view support.
23939 * dwarf2asm.c (dw2_asm_output_symname_uleb128): New.
23940 * dwarf2asm.h (dw2_asm_output_symname_uleb128): Declare.
23941 * dwarf2out.c (var_loc_view): New typedef.
23942 (struct dw_loc_list_struct): Add vl_symbol, vbegin, vend.
23943 (dwarf2out_locviews_in_attribute): New.
23944 (dwarf2out_locviews_in_loclist): New.
23945 (dw_val_equal_p): Compare val_view_list of dw_val_class_view_lists.
23946 (enum dw_line_info_opcode): Add LI_adv_address.
23947 (struct dw_line_info_table): Add view.
23948 (RESET_NEXT_VIEW, RESETTING_VIEW_P): New macros.
23949 (DWARF2_ASM_VIEW_DEBUG_INFO): Define default.
23950 (zero_view_p): New variable.
23951 (ZERO_VIEW_P): New macro.
23952 (output_asm_line_debug_info): New.
23953 (struct var_loc_node): Add view.
23954 (add_AT_view_list, AT_loc_list): New.
23955 (add_var_loc_to_decl): Add view param. Test it against last.
23956 (new_loc_list): Add view params. Record them.
23957 (AT_loc_list_ptr): Handle loc and view lists.
23958 (view_list_to_loc_list_val_node): New.
23959 (print_dw_val): Handle dw_val_class_view_list.
23960 (size_of_die): Likewise.
23961 (value_format): Likewise.
23962 (loc_list_has_views): New.
23963 (gen_llsym): Set vl_symbol too.
23964 (maybe_gen_llsym, skip_loc_list_entry): New.
23965 (dwarf2out_maybe_output_loclist_view_pair): New.
23966 (output_loc_list): Output view list or entries too.
23967 (output_view_list_offset): New.
23968 (output_die): Handle dw_val_class_view_list.
23969 (output_dwarf_version): New.
23970 (output_compilation_unit_header): Use it.
23971 (output_skeleton_debug_sections): Likewise.
23972 (output_rnglists, output_line_info): Likewise.
23973 (output_pubnames, output_aranges): Update version comments.
23974 (output_one_line_info_table): Output view numbers in asm comments.
23975 (dw_loc_list): Determine current endview, pass it to new_loc_list.
23976 Call maybe_gen_llsym.
23977 (loc_list_from_tree_1): Adjust.
23978 (add_AT_location_description): Create view list attribute if
23979 needed, check it's absent otherwise.
23980 (convert_cfa_to_fb_loc_list): Adjust.
23981 (maybe_emit_file): Call output_asm_line_debug_info for test.
23982 (dwarf2out_var_location): Reset views as needed. Precompute
23983 add_var_loc_to_decl args. Call get_attr_min_length only if we have the
23984 attribute. Set view.
23985 (new_line_info_table): Reset next view.
23986 (set_cur_line_info_table): Call output_asm_line_debug_info for test.
23987 (dwarf2out_source_line): Likewise. Output view resets and labels to
23988 the assembler, or select appropriate line info opcodes.
23989 (prune_unused_types_walk_attribs): Handle dw_val_class_view_list.
23990 (optimize_string_length): Catch it. Adjust.
23991 (resolve_addr): Copy vl_symbol along with ll_symbol. Handle
23992 dw_val_class_view_list, and remove it if no longer needed.
23993 (hash_loc_list): Hash view numbers.
23994 (loc_list_hasher::equal): Compare them.
23995 (optimize_location_lists): Check whether a view list symbol is
23996 needed, and whether the locview attribute is present, and
23997 whether they match. Remove the locview attribute if no longer
23998 needed.
23999 (index_location_lists): Call skip_loc_list_entry for test.
24000 (dwarf2out_finish): Call output_asm_line_debug_info for test.
24001 Use output_dwarf_version.
24002 * dwarf2out.h (enum dw_val_class): Add dw_val_class_view_list.
24003 (struct dw_val_node): Add val_view_list.
24004 * final.c (SEEN_NEXT_VIEW): New.
24005 (set_next_view_needed): New.
24006 (clear_next_view_needed): New.
24007 (maybe_output_next_view): New.
24008 (final_start_function): Rename to...
24009 (final_start_function_1): ... this. Take pointer to FIRST,
24010 add SEEN parameter. Emit param bindings in the initial view.
24011 (final_start_function): Reintroduce SEEN-less interface.
24012 (final): Rename to...
24013 (final_1): ... this. Take SEEN parameter. Output final pending
24014 next view at the end.
24015 (final): Reintroduce seen-less interface.
24016 (final_scan_insn): Output pending next view before switching
24017 sections or ending a block. Mark the next view as needed when
24018 outputting variable locations. Notify debug backend of section
24019 changes, and of location view changes.
24020 (rest_of_handle_final): Adjust.
24021 * toplev.c (process_options): Autodetect value for debug variable
24022 location views option. Warn on incompat5 without -gdwarf-5.
24023 * doc/invoke.texi (gvariable-location-views): New.
24024 (gvariable-location-views=incompat5): New.
24025 (gno-variable-location-views): New.
24026
24027 2018-02-08 David Malcolm <dmalcolm@redhat.com>
24028
24029 PR tree-optimization/84136
24030 * tree-cfg.c (find_taken_edge_computed_goto): Remove assertion
24031 that the result of find_edge is non-NULL.
24032
24033 2018-02-08 Sergey Shalnov <sergey.shalnov@intel.com>
24034
24035 PR target/83008
24036 * config/i386/x86-tune-costs.h (skylake_cost): Fix cost of
24037 storing integer register in SImode. Fix cost of 256 and 512
24038 byte aligned SSE register store.
24039
24040 2018-02-08 Sergey Shalnov <sergey.shalnov@intel.com>
24041
24042 * config/i386/i386.c (ix86_multiplication_cost): Fix
24043 multiplication cost for TARGET_AVX512DQ.
24044
24045 2018-02-08 Marek Polacek <polacek@redhat.com>
24046
24047 PR tree-optimization/84238
24048 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Verify the result of
24049 get_range_strlen.
24050
24051 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
24052
24053 PR tree-optimization/84265
24054 * tree-vect-stmts.c (vectorizable_store): Don't treat
24055 VMAT_CONTIGUOUS accesses as grouped.
24056 (vectorizable_load): Likewise.
24057
24058 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
24059
24060 PR tree-optimization/81635
24061 * wide-int.h (wi::round_down_for_mask, wi::round_up_for_mask): Declare.
24062 * wide-int.cc (wi::round_down_for_mask, wi::round_up_for_mask)
24063 (test_round_for_mask): New functions.
24064 (wide_int_cc_tests): Call test_round_for_mask.
24065 * tree-vrp.h (intersect_range_with_nonzero_bits): Declare.
24066 * tree-vrp.c (intersect_range_with_nonzero_bits): New function.
24067 * tree-data-ref.c (split_constant_offset_1): Use it to refine the
24068 range returned by get_range_info.
24069
24070 2018-02-08 Jan Hubicka <hubicka@ucw.cz>
24071
24072 PR ipa/81360
24073 * cgraph.h (symtab_node::output_to_lto_symbol_table_p): Declare
24074 * symtab.c: Include builtins.h
24075 (symtab_node::output_to_lto_symbol_table_p): Move here
24076 from lto-streamer-out.c:output_symbol_p.
24077 * lto-streamer-out.c (write_symbol): Turn early exit to assert.
24078 (output_symbol_p): Move all logic to symtab.c
24079 (produce_symtab): Update.
24080
24081 2018-02-08 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
24082
24083 * config/s390/s390-opts.h (enum indirect_branch): Define.
24084 * config/s390/s390-protos.h (s390_return_addr_from_memory)
24085 (s390_indirect_branch_via_thunk)
24086 (s390_indirect_branch_via_inline_thunk): Add function prototypes.
24087 (enum s390_indirect_branch_type): Define.
24088 * config/s390/s390.c (struct s390_frame_layout, struct
24089 machine_function): Remove.
24090 (indirect_branch_prez10thunk_mask, indirect_branch_z10thunk_mask)
24091 (indirect_branch_table_label_no, indirect_branch_table_name):
24092 Define variables.
24093 (INDIRECT_BRANCH_NUM_OPTIONS): Define macro.
24094 (enum s390_indirect_branch_option): Define.
24095 (s390_return_addr_from_memory): New function.
24096 (s390_handle_string_attribute): New function.
24097 (s390_attribute_table): Add new attribute handler.
24098 (s390_execute_label): Handle UNSPEC_EXECUTE_JUMP patterns.
24099 (s390_indirect_branch_via_thunk): New function.
24100 (s390_indirect_branch_via_inline_thunk): New function.
24101 (s390_function_ok_for_sibcall): When jumping via thunk disallow
24102 sibling call optimization for non z10 compiles.
24103 (s390_emit_call): Force indirect branch target to be a single
24104 register. Add r1 clobber for non-z10 compiles.
24105 (s390_emit_epilogue): Emit return jump via return_use expander.
24106 (s390_reorg): Handle JUMP_INSNs as execute targets.
24107 (s390_option_override_internal): Perform validity checks for the
24108 new command line options.
24109 (s390_indirect_branch_attrvalue): New function.
24110 (s390_indirect_branch_settings): New function.
24111 (s390_set_current_function): Invoke s390_indirect_branch_settings.
24112 (s390_output_indirect_thunk_function): New function.
24113 (s390_code_end): Implement target hook.
24114 (s390_case_values_threshold): Implement target hook.
24115 (TARGET_ASM_CODE_END, TARGET_CASE_VALUES_THRESHOLD): Define target
24116 macros.
24117 * config/s390/s390.h (struct s390_frame_layout)
24118 (struct machine_function): Move here from s390.c.
24119 (TARGET_INDIRECT_BRANCH_NOBP_RET)
24120 (TARGET_INDIRECT_BRANCH_NOBP_JUMP)
24121 (TARGET_INDIRECT_BRANCH_NOBP_JUMP_THUNK)
24122 (TARGET_INDIRECT_BRANCH_NOBP_JUMP_INLINE_THUNK)
24123 (TARGET_INDIRECT_BRANCH_NOBP_CALL)
24124 (TARGET_DEFAULT_INDIRECT_BRANCH_TABLE)
24125 (TARGET_INDIRECT_BRANCH_THUNK_NAME_EXRL)
24126 (TARGET_INDIRECT_BRANCH_THUNK_NAME_EX)
24127 (TARGET_INDIRECT_BRANCH_TABLE): Define macros.
24128 * config/s390/s390.md (UNSPEC_EXECUTE_JUMP)
24129 (INDIRECT_BRANCH_THUNK_REGNUM): Define constants.
24130 (mnemonic attribute): Add values which aren't recognized
24131 automatically.
24132 ("*cjump_long", "*icjump_long", "*basr", "*basr_r"): Disable
24133 pattern for branch conversion. Fix mnemonic attribute.
24134 ("*c<code>", "*sibcall_br", "*sibcall_value_br", "*return"): Emit
24135 indirect branch via thunk if requested.
24136 ("indirect_jump", "<code>"): Expand patterns for branch conversion.
24137 ("*indirect_jump"): Disable for branch conversion using out of
24138 line thunks.
24139 ("indirect_jump_via_thunk<mode>_z10")
24140 ("indirect_jump_via_thunk<mode>")
24141 ("indirect_jump_via_inlinethunk<mode>_z10")
24142 ("indirect_jump_via_inlinethunk<mode>", "*casesi_jump")
24143 ("casesi_jump_via_thunk<mode>_z10", "casesi_jump_via_thunk<mode>")
24144 ("casesi_jump_via_inlinethunk<mode>_z10")
24145 ("casesi_jump_via_inlinethunk<mode>", "*basr_via_thunk<mode>_z10")
24146 ("*basr_via_thunk<mode>", "*basr_r_via_thunk_z10")
24147 ("*basr_r_via_thunk", "return<mode>_prez10"): New pattern.
24148 ("*indirect2_jump"): Disable for branch conversion.
24149 ("casesi_jump"): Turn into expander and expand patterns for branch
24150 conversion.
24151 ("return_use"): New expander.
24152 ("*return"): Emit return via thunk and rename it to ...
24153 ("*return<mode>"): ... this one.
24154 * config/s390/s390.opt: Add new options and and enum for the
24155 option values.
24156
24157 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
24158
24159 * lra-constraints.c (match_reload): Unconditionally use
24160 gen_lowpart_SUBREG, rather than selecting between that
24161 and equivalent gen_rtx_SUBREG code.
24162
24163 2018-02-08 Richard Biener <rguenther@suse.de>
24164
24165 PR tree-optimization/84233
24166 * tree-ssa-phiprop.c (propagate_with_phi): Use separate
24167 changed flag instead of boguously re-using phi_inserted.
24168
24169 2018-02-08 Martin Jambor <mjambor@suse.cz>
24170
24171 * hsa-gen.c (get_symbol_for_decl): Set program allocation for
24172 static local variables.
24173
24174 2018-02-08 Richard Biener <rguenther@suse.de>
24175
24176 PR tree-optimization/84278
24177 * tree-vect-stmts.c (vectorizable_store): When looking for
24178 smaller vector types to perform grouped strided loads/stores
24179 make sure the mode is supported by the target.
24180 (vectorizable_load): Likewise.
24181
24182 2018-02-08 Wilco Dijkstra <wdijkstr@arm.com>
24183
24184 * config/aarch64/aarch64.c (aarch64_components_for_bb):
24185 Increase LDP/STP opportunities by adding adjacent callee-saves.
24186
24187 2018-02-08 Wilco Dijkstra <wdijkstr@arm.com>
24188
24189 PR rtl-optimization/84068
24190 PR rtl-optimization/83459
24191 * haifa-sched.c (rank_for_schedule): Fix SCHED_PRESSURE_MODEL sorting.
24192
24193 2018-02-08 Aldy Hernandez <aldyh@redhat.com>
24194
24195 PR tree-optimization/84224
24196 * gimple-ssa-warn-alloca.c (pass_walloca::execute): Remove assert.
24197 * calls.c (gimple_alloca_call_p): Only return TRUE when we have
24198 non-zero arguments.
24199
24200 2018-02-07 Iain Sandoe <iain@codesourcery.com>
24201
24202 PR target/84113
24203 * config/rs6000/altivec.md (*restore_world): Remove LR use.
24204 * config/rs6000/predicates.md (restore_world_operation): Adjust op
24205 count, remove one USE.
24206
24207 2018-02-07 Michael Meissner <meissner@linux.vnet.ibm.com>
24208
24209 * doc/install.texi (Configuration): Document the
24210 --with-long-double-format={ibm,ieee} PowerPC configuration
24211 options.
24212
24213 PR target/84154
24214 * config/rs6000/rs6000.md (fix_trunc<SFDF:mode><QHI:mode>2):
24215 Convert from define_expand to be define_insn_and_split. Rework
24216 float/double/_Float128 conversions to QI/HI/SImode to work with
24217 both ISA 2.07 (power8) or ISA 3.0 (power9). Fix regression where
24218 conversions to QI/HImode types did a store and then a load to
24219 truncate the value. For conversions to VSX registers, don't split
24220 the insn, instead emit the code directly. Use the code iterator
24221 any_fix to combine signed and unsigned conversions.
24222 (fix<uns>_trunc<SFDF:mode>si2_p8): Likewise.
24223 (fixuns_trunc<SFDF:mode><QHI:mode>2): Likewise.
24224 (fix_trunc<IEEE128:mode><QHI:mode>2): Likewise.
24225 (fix<uns>_trunc<SFDF:mode><QHI:mode>2): Likewise.
24226 (fix_<mode>di2_hw): Likewise.
24227 (fixuns_<mode>di2_hw): Likewise.
24228 (fix_<mode>si2_hw): Likewise.
24229 (fixuns_<mode>si2_hw): Likewise.
24230 (fix<uns>_<IEEE128:mode><SDI:mode>2_hw): Likewise.
24231 (fix<uns>_trunc<IEEE128:mode><QHI:mode>2): Likewise.
24232 (fctiw<u>z_<mode>_smallint): Rename fctiw<u>z_<mode>_smallint to
24233 fix<uns>_trunc<SFDF:mode>si2_p8.
24234 (fix_trunc<SFDF:mode><QHI:mode>2_internal): Delete, no longer used.
24235 (fixuns_trunc<SFDF:mode><QHI:mode>2_internal): Likewise.
24236 (fix<uns>_<mode>_mem): Likewise.
24237 (fctiw<u>z_<mode>_mem): Likewise.
24238 (fix<uns>_<mode>_mem): Likewise.
24239 (fix<uns>_trunc<SFDF:mode><QHSI:mode>2_mem): On ISA 3.0, prevent
24240 the register allocator from doing a direct move to the GPRs to do
24241 a store, and instead use the ISA 3.0 store byte/half-word from
24242 vector register instruction. For IEEE 128-bit floating point,
24243 also optimize stores of 32-bit ints.
24244 (fix<uns>_trunc<IEEE128:mode><QHSI:mode>2_mem): Likewise.
24245
24246 2018-02-07 Alan Hayward <alan.hayward@arm.com>
24247
24248 * genextract.c (push_pathstr_operand): New function to support
24249 [a-zA-Z].
24250 (walk_rtx): Call push_pathstr_operand.
24251 (print_path): Support [a-zA-Z].
24252
24253 2018-02-07 Richard Biener <rguenther@suse.de>
24254
24255 PR tree-optimization/84037
24256 * tree-vectorizer.h (struct _loop_vec_info): Add ivexpr_map member.
24257 (cse_and_gimplify_to_preheader): Declare.
24258 (vect_get_place_in_interleaving_chain): Likewise.
24259 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
24260 ivexpr_map.
24261 (_loop_vec_info::~_loop_vec_info): Delete it.
24262 (cse_and_gimplify_to_preheader): New function.
24263 * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Export.
24264 * tree-vect-stmts.c (vectorizable_store): CSE base and steps.
24265 (vectorizable_load): Likewise. For grouped stores always base
24266 the IV on the first element.
24267 * tree-vect-loop-manip.c (vect_loop_versioning): Unshare versioning
24268 condition before gimplifying.
24269
24270 2018-02-07 Jakub Jelinek <jakub@redhat.com>
24271
24272 * tree-eh.c (operation_could_trap_helper_p): Ignore honor_trapv for
24273 *DIV_EXPR and *MOD_EXPR.
24274
24275 2018-02-07 H.J. Lu <hongjiu.lu@intel.com>
24276
24277 PR target/84248
24278 * config/i386/i386.c (ix86_option_override_internal): Mask out
24279 the CF_SET bit when checking -fcf-protection.
24280
24281 2018-02-07 Tom de Vries <tom@codesourcery.com>
24282
24283 PR libgomp/84217
24284 * omp-expand.c (expand_oacc_collapse_init): Ensure diff_type is large
24285 enough.
24286
24287 2018-02-07 Richard Biener <rguenther@suse.de>
24288
24289 PR tree-optimization/84204
24290 * tree-chrec.c (chrec_fold_plus_1): Remove size limiting in
24291 this place.
24292
24293 PR tree-optimization/84205
24294 * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Also
24295 special-case isl_ast_op_zdiv_r.
24296
24297 PR tree-optimization/84223
24298 * graphite-scop-detection.c (gather_bbs::before_dom_children):
24299 Only add conditions from within the region.
24300 (gather_bbs::after_dom_children): Adjust.
24301
24302 2018-02-07 Georg-Johann Lay <avr@gjlay.de>
24303
24304 PR target/84209
24305 * config/avr/avr.h (GENERAL_REGNO_P, GENERAL_REG_P): New macros.
24306 * config/avr/avr.md: Only post-reload split REG-REG moves if
24307 either register is GENERAL_REG_P.
24308
24309 2018-02-07 Jakub Jelinek <jakub@redhat.com>
24310
24311 PR tree-optimization/84235
24312 * tree-ssa-scopedtables.c
24313 (avail_exprs_stack::simplify_binary_operation): Fir MINUS_EXPR, punt
24314 if the subtraction is performed in floating point type where NaNs are
24315 honored. For *DIV_EXPR, punt for ALL_FRACT_MODE_Ps where we can't
24316 build 1. Formatting fix.
24317
24318 2018-02-06 Jakub Jelinek <jakub@redhat.com>
24319
24320 PR target/84146
24321 * config/i386/i386.c (rest_of_insert_endbranch): Only skip
24322 NOTE_INSN_CALL_ARG_LOCATION after a call, not anything else,
24323 and skip it regardless of bb boundaries. Use CALL_P macro,
24324 don't test INSN_P (insn) together with CALL_P or JUMP_P check
24325 unnecessarily, formatting fix.
24326
24327 2018-02-06 Michael Collison <michael.collison@arm.com>
24328
24329 * config/arm/thumb2.md:
24330 (*thumb2_mov_negscc): Split only if TARGET_THUMB2 && !arm_restrict_it.
24331 (*thumb_mov_notscc): Ditto.
24332
24333 2018-02-06 Michael Meissner <meissner@linux.vnet.ibm.com>
24334
24335 PR target/84154
24336 * config/rs6000/rs6000.md (su code attribute): Use "u" for
24337 unsigned_fix, not "s".
24338
24339 2018-02-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
24340
24341 * configure.ac (gcc_fn_eh_frame_ro): New function.
24342 (gcc_cv_as_cfi_directive): Check both 32 and 64-bit assembler for
24343 correct .eh_frame permissions.
24344 * configure: Regenerate.
24345
24346 2018-02-06 Andrew Jenner <andrew@codeourcery.com>
24347
24348 * doc/invoke.texi: Add section for the PowerPC SPE backend. Remove
24349 irrelevant options.
24350
24351 2018-02-06 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
24352
24353 * config/rs6000/rs6000.c (rs6000_option_override_internal):
24354 Display warning message for -mno-speculate-indirect-jumps.
24355
24356 2018-02-06 Andrew Jenner <andrew@codesourcery.com>
24357
24358 * config/powerpcspe/powerpcspe.opt: (msimple-fpu, mfpu) Add
24359 Undocumented.
24360 * config/powerpcspe/sysv4.opt (mbit-align): Likewise.
24361
24362 2018-02-06 Aldy Hernandez <aldyh@redhat.com>
24363
24364 PR tree-optimization/84225
24365 * tree-eh.c (find_trapping_overflow): Only call
24366 operation_no_trapping_overflow when ANY_INTEGRAL_TYPE_P.
24367
24368 2018-02-06 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
24369
24370 PR target/84145
24371 * config/i386/i386.c: Reimplement the check of possible options
24372 -mibt/-mshstk conbination. Change error messages.
24373 * doc/invoke.texi: Fix a typo: remove extra '='.
24374
24375 2018-02-06 Marek Polacek <polacek@redhat.com>
24376
24377 PR tree-optimization/84228
24378 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Skip debug statements.
24379
24380 2018-02-06 Tamar Christina <tamar.christina@arm.com>
24381
24382 PR target/82641
24383 * config/arm/arm.c (arm_print_asm_arch_directives): Record already
24384 emitted arch directives.
24385 * config/arm/arm-c.c (arm_cpu_builtins): Undefine __ARM_ARCH and
24386 __ARM_FEATURE_COPROC before changing architectures.
24387
24388 2018-02-06 Richard Biener <rguenther@suse.de>
24389
24390 * config/i386/i386.c (print_reg): Fix typo.
24391 (ix86_loop_unroll_adjust): Do not unroll beyond the original nunroll.
24392
24393 2018-02-06 Eric Botcazou <ebotcazou@adacore.com>
24394
24395 * configure: Regenerate.
24396
24397 2018-02-05 Martin Sebor <msebor@redhat.com>
24398
24399 PR tree-optimization/83369
24400 * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Use %G to print
24401 inlining context.
24402
24403 2018-02-05 Martin Liska <mliska@suse.cz>
24404
24405 * doc/invoke.texi: Cherry-pick upstream r323995.
24406
24407 2018-02-05 Richard Sandiford <richard.sandiford@linaro.org>
24408
24409 * ira.c (ira_init_register_move_cost): Adjust comment.
24410
24411 2018-02-05 Martin Liska <mliska@suse.cz>
24412
24413 PR gcov-profile/84137
24414 * doc/gcov.texi: Fix typo in documentation.
24415
24416 2018-02-05 Martin Liska <mliska@suse.cz>
24417
24418 PR gcov-profile/83879
24419 * doc/gcov.texi: Document necessity of --dynamic-list-data when
24420 using dlopen functionality.
24421
24422 2018-02-05 Olga Makhotina <olga.makhotina@intel.com>
24423
24424 * config/i386/avx512dqintrin.h (_mm_mask_range_sd, _mm_maskz_range_sd,
24425 _mm_mask_range_round_sd, _mm_maskz_range_round_sd, _mm_mask_range_ss,
24426 _mm_maskz_range_ss, _mm_mask_range_round_ss,
24427 _mm_maskz_range_round_ss): New intrinsics.
24428 (__builtin_ia32_rangesd128_round)
24429 (__builtin_ia32_rangess128_round): Remove.
24430 (__builtin_ia32_rangesd128_mask_round,
24431 __builtin_ia32_rangess128_mask_round): New builtins.
24432 * config/i386/i386-builtin.def (__builtin_ia32_rangesd128_round,
24433 __builtin_ia32_rangess128_round): Remove.
24434 (__builtin_ia32_rangesd128_mask_round,
24435 __builtin_ia32_rangess128_mask_round): New builtins.
24436 * config/i386/sse.md (ranges<mode><round_saeonly_name>): Renamed to ...
24437 (ranges<mode><mask_scalar_name><round_saeonly_scalar_name>): ... this.
24438 ((match_operand:VF_128 2 "<round_saeonly_nimm_predicate>"
24439 "<round_saeonly_constraint>")): Changed to ...
24440 ((match_operand:VF_128 2 "<round_saeonly_scalar_nimm_predicate>"
24441 "<round_saeonly_scalar_constraint>")): ... this.
24442 ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_op4>%2, %1, %0|
24443 %0, %1, %2<round_saeonly_op4>, %3}"): Changed to ...
24444 ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_scalar_mask_op4>%2,
24445 %1, %0<mask_scalar_operand4>|%0<mask_scalar_operand4>, %1,
24446 %2<round_saeonly_scalar_mask_op4>, %3}"): ... this.
24447
24448 2018-02-02 Andrew Jenner <andrew@codesourcery.com>
24449
24450 * config/powerpcspe/powerpcspe.opt: Add Undocumented to irrelevant
24451 options.
24452 * config/powerpcspe/powerpcspe-tables.opt (rs6000_cpu_opt_value):
24453 Remove all values except native, 8540 and 8548.
24454
24455 2018-02-02 H.J. Lu <hongjiu.lu@intel.com>
24456
24457 * config/i386/i386.c (ix86_output_function_return): Pass
24458 INVALID_REGNUM, instead of -1, as invalid register number to
24459 indirect_thunk_name and output_indirect_thunk.
24460
24461 2018-02-02 Julia Koval <julia.koval@intel.com>
24462
24463 * config.gcc: Add -march=icelake.
24464 * config/i386/driver-i386.c (host_detect_local_cpu): Detect icelake.
24465 * config/i386/i386-c.c (ix86_target_macros_internal): Handle icelake.
24466 * config/i386/i386.c (processor_costs): Add m_ICELAKE.
24467 (PTA_ICELAKE, PTA_AVX512VNNI, PTA_GFNI, PTA_VAES, PTA_AVX512VBMI2,
24468 PTA_VPCLMULQDQ, PTA_RDPID, PTA_AVX512BITALG): New.
24469 (processor_target_table): Add icelake.
24470 (ix86_option_override_internal): Handle new PTAs.
24471 (get_builtin_code_for_version): Handle icelake.
24472 (M_INTEL_COREI7_ICELAKE): New.
24473 (fold_builtin_cpu): Handle icelake.
24474 * config/i386/i386.h (TARGET_ICELAKE, PROCESSOR_ICELAKE): New.
24475 * doc/invoke.texi: Add -march=icelake.
24476
24477 2018-02-02 Julia Koval <julia.koval@intel.com>
24478
24479 * config/i386/i386.c (ix86_option_override_internal): Change flags type
24480 to wide_int_bitmask.
24481 * wide-int-bitmask.h: New.
24482
24483 2018-02-02 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
24484
24485 PR target/84066
24486 * config/i386/i386.md: Replace Pmode with word_mode in
24487 builtin_setjmp_setup and builtin_longjmp to support x32.
24488
24489 2018-02-01 Peter Bergner <bergner@vnet.ibm.com>
24490
24491 PR target/56010
24492 PR target/83743
24493 * config/rs6000/driver-rs6000.c: #include "diagnostic.h".
24494 #include "opts.h".
24495 (rs6000_supported_cpu_names): New static variable.
24496 (linux_cpu_translation_table): Likewise.
24497 (elf_platform) <cpu>: Define new static variable and use it.
24498 Translate kernel AT_PLATFORM name to canonical name if needed.
24499 Error if platform name is unknown.
24500
24501 2018-02-01 Aldy Hernandez <aldyh@redhat.com>
24502
24503 PR target/84089
24504 * config/pa/predicates.md (base14_operand): Handle E_VOIDmode.
24505
24506 2018-02-01 Jeff Law <law@redhat.com>
24507
24508 PR target/84128
24509 * config/i386/i386.c (release_scratch_register_on_entry): Add new
24510 OFFSET and RELEASE_VIA_POP arguments. Use SP+OFFSET to restore
24511 the scratch if RELEASE_VIA_POP is false.
24512 (ix86_adjust_stack_and_probe_stack_clash): Un-constify SIZE.
24513 If we have to save a temporary register, decrement SIZE appropriately.
24514 Pass new arguments to release_scratch_register_on_entry.
24515 (ix86_adjust_stack_and_probe): Likewise.
24516 (ix86_emit_probe_stack_range): Pass new arguments to
24517 release_scratch_register_on_entry.
24518
24519 2018-02-01 Uros Bizjak <ubizjak@gmail.com>
24520
24521 PR rtl-optimization/84157
24522 * combine.c (change_zero_ext): Use REG_P predicate in
24523 front of HARD_REGISTER_P predicate.
24524
24525 2018-02-01 Georg-Johann Lay <avr@gjlay.de>
24526
24527 * config/avr/avr.c (avr_option_override): Move disabling of
24528 -fdelete-null-pointer-checks to...
24529 * common/config/avr/avr-common.c (avr_option_optimization_table):
24530 ...here.
24531
24532 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
24533
24534 PR tree-optimization/81635
24535 * tree-data-ref.c (split_constant_offset_1): For types that
24536 wrap on overflow, try to use range info to prove that wrapping
24537 cannot occur.
24538
24539 2018-02-01 Renlin Li <renlin.li@arm.com>
24540
24541 PR target/83370
24542 * config/aarch64/aarch64.c (aarch64_class_max_nregs): Handle
24543 TAILCALL_ADDR_REGS.
24544 (aarch64_register_move_cost): Likewise.
24545 * config/aarch64/aarch64.h (reg_class): Rename CALLER_SAVE_REGS to
24546 TAILCALL_ADDR_REGS.
24547 (REG_CLASS_NAMES): Likewise.
24548 (REG_CLASS_CONTENTS): Rename CALLER_SAVE_REGS to
24549 TAILCALL_ADDR_REGS. Remove IP registers.
24550 * config/aarch64/aarch64.md (Ucs): Update register constraint.
24551
24552 2018-02-01 Richard Biener <rguenther@suse.de>
24553
24554 * domwalk.h (dom_walker::dom_walker): Add additional constructor
24555 for specifying RPO order and allow NULL for that.
24556 * domwalk.c (dom_walker::dom_walker): Likewise.
24557 (dom_walker::walk): Handle NULL RPO order.
24558 * tree-into-ssa.c (rewrite_dom_walker): Do not walk dom children
24559 in RPO order.
24560 (rewrite_update_dom_walker): Likewise.
24561 (mark_def_dom_walker): Likewise.
24562
24563 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
24564
24565 * config/aarch64/aarch64-protos.h (aarch64_split_sve_subreg_move)
24566 (aarch64_maybe_expand_sve_subreg_move): Declare.
24567 * config/aarch64/aarch64.md (UNSPEC_REV_SUBREG): New unspec.
24568 * config/aarch64/predicates.md (aarch64_any_register_operand): New
24569 predicate.
24570 * config/aarch64/aarch64-sve.md (mov<mode>): Optimize subreg moves
24571 that are semantically a reverse operation.
24572 (*aarch64_sve_mov<mode>_subreg_be): New pattern.
24573 * config/aarch64/aarch64.c (aarch64_maybe_expand_sve_subreg_move):
24574 (aarch64_replace_reg_mode, aarch64_split_sve_subreg_move): New
24575 functions.
24576 (aarch64_can_change_mode_class): For big-endian, forbid changes
24577 between two SVE modes if they have different element sizes.
24578
24579 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
24580
24581 * config/aarch64/aarch64.c (aarch64_expand_sve_const_vector): Prefer
24582 the TImode handling for big-endian targets.
24583
24584 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
24585
24586 * config/aarch64/aarch64-sve.md (sve_ld1rq): Replace with...
24587 (*sve_ld1rq<Vesize>): ... this new pattern. Handle all element sizes,
24588 not just bytes.
24589 * config/aarch64/aarch64.c (aarch64_expand_sve_widened_duplicate):
24590 Remove BSWAP handing for big-endian targets and use the form of
24591 LD1RQ appropariate for the mode.
24592
24593 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
24594
24595 * config/aarch64/aarch64.c (aarch64_simd_valid_immediate): Handle
24596 all CONST_VECTOR_DUPLICATE_P vectors, not just those with a single
24597 duplicated element.
24598
24599 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
24600
24601 PR tearget/83845
24602 * config/aarch64/aarch64.c (aarch64_secondary_reload): Tighten
24603 check for operands that need to go through aarch64_sve_reload_be.
24604
24605 2018-02-01 Jakub Jelinek <jakub@redhat.com>
24606
24607 PR tree-optimization/81661
24608 PR tree-optimization/84117
24609 * tree-eh.h (rewrite_to_non_trapping_overflow): Declare.
24610 * tree-eh.c: Include gimplify.h.
24611 (find_trapping_overflow, replace_trapping_overflow,
24612 rewrite_to_non_trapping_overflow): New functions.
24613 * tree-vect-loop.c: Include tree-eh.h.
24614 (vect_get_loop_niters): Use rewrite_to_non_trapping_overflow.
24615 * tree-data-ref.c: Include tree-eh.h.
24616 (get_segment_min_max): Use rewrite_to_non_trapping_overflow.
24617
24618 2018-01-31 Uros Bizjak <ubizjak@gmail.com>
24619
24620 PR rtl-optimization/84123
24621 * combine.c (change_zero_ext): Check if hard register satisfies
24622 can_change_dest_mode before calling gen_lowpart_SUBREG.
24623
24624 2018-01-31 Vladimir Makarov <vmakarov@redhat.com>
24625
24626 PR target/82444
24627 * ira.c (ira_init_register_move_cost): Remove assert.
24628
24629 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
24630
24631 PR rtl-optimization/84071
24632 * doc/tm.texi.in (WORD_REGISTER_OPERATIONS): Add explicit case.
24633 * doc/tm.texi: Regenerate.
24634
24635 2018-01-31 Richard Biener <rguenther@suse.de>
24636
24637 PR tree-optimization/84132
24638 * tree-data-ref.c (analyze_miv_subscript): Properly
24639 check whether evolution_function_is_affine_multivariate_p
24640 before calling gcd_of_steps_may_divide_p.
24641
24642 2018-01-31 Julia Koval <julia.koval@intel.com>
24643
24644 PR target/83618
24645 * config/i386/i386.c (ix86_expand_builtin): Handle IX86_BUILTIN_RDPID.
24646 * config/i386/i386.md (rdpid_rex64) New.
24647 (rdpid): Make 32bit only.
24648
24649 2018-01-29 Aldy Hernandez <aldyh@redhat.com>
24650
24651 PR lto/84105
24652 * tree-pretty-print.c (dump_generic_node): Handle a TYPE_NAME with
24653 an IDENTIFIER_NODE for FUNCTION_TYPE's.
24654
24655 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
24656
24657 Revert
24658 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
24659
24660 * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
24661
24662 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
24663
24664 PR rtl-optimization/84071
24665 * combine.c (record_dead_and_set_regs_1): Record the source unmodified
24666 for a paradoxical SUBREG on a WORD_REGISTER_OPERATIONS target.
24667
24668 2018-01-31 Claudiu Zissulescu <claziss@synopsys.com>
24669
24670 * config/arc/arc.c (arc_handle_aux_attribute): New function.
24671 (arc_attribute_table): Add 'aux' attribute.
24672 (arc_in_small_data_p): Consider aux like variables.
24673 (arc_is_aux_reg_p): New function.
24674 (arc_asm_output_aligned_decl_local): Ignore 'aux' like variables.
24675 (arc_get_aux_arg): New function.
24676 (prepare_move_operands): Handle aux-register access.
24677 (arc_handle_aux_attribute): New function.
24678 * doc/extend.texi (ARC Variable attributes): Add subsection.
24679
24680 2018-01-31 Claudiu Zissulescu <claziss@synopsys.com>
24681
24682 * config/arc/arc-protos.h (arc_is_uncached_mem_p): Function proto.
24683 * config/arc/arc.c (arc_handle_uncached_attribute): New function.
24684 (arc_attribute_table): Add 'uncached' attribute.
24685 (arc_print_operand): Print '.di' flag for uncached memory
24686 accesses.
24687 (arc_in_small_data_p): Do not consider for small data the uncached
24688 types.
24689 (arc_is_uncached_mem_p): New function.
24690 * config/arc/predicates.md (compact_store_memory_operand): Check
24691 for uncached memory accesses.
24692 (nonvol_nonimm_operand): Likewise.
24693 * doc/extend.texi (ARC Type Attribute): New subsection.
24694
24695 2018-01-31 Jakub Jelinek <jakub@redhat.com>
24696
24697 PR c/84100
24698 * common.opt (falign-functions=, falign-jumps=, falign-labels=,
24699 falign-loops=): Add Optimization flag.
24700
24701 2018-01-30 Jeff Law <law@redhat.com>
24702
24703 PR target/84064
24704 * i386.c (ix86_adjust_stack_and_probe_stack_clash): New argument
24705 INT_REGISTERS_SAVED. Check it prior to calling
24706 get_scratch_register_on_entry.
24707 (ix86_adjust_stack_and_probe): Similarly.
24708 (ix86_emit_probe_stack_range): Similarly.
24709 (ix86_expand_prologue): Corresponding changes.
24710
24711 2018-01-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
24712
24713 PR target/40411
24714 * config/sol2.h (STARTFILE_ARCH_SPEC): Use -std=c*,
24715 -std=iso9899:199409 instead of -pedantic to select values-Xc.o.
24716
24717 2018-01-30 Vladimir Makarov <vmakarov@redhat.com>
24718
24719 PR target/84112
24720 * lra-constraints.c (curr_insn_transform): Process AND in the
24721 address.
24722
24723 2018-01-30 Jakub Jelinek <jakub@redhat.com>
24724
24725 PR rtl-optimization/83986
24726 * sched-deps.c (sched_analyze_insn): For frame related insns, add anti
24727 dependence against last_pending_memory_flush in addition to
24728 pending_jump_insns.
24729
24730 2018-01-30 Alexandre Oliva <aoliva@redhat.com>
24731
24732 PR tree-optimization/81611
24733 * tree-ssa-dom.c (simple_iv_increment_p): Skip intervening
24734 copies.
24735
24736 2018-01-30 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
24737
24738 PR target/83758
24739 * config/rs6000/rs6000.c (rs6000_internal_arg_pointer): Only return
24740 a reg rtx.
24741
24742 2018-01-30 Richard Biener <rguenther@suse.de>
24743 Jakub Jelinek <jakub@redhat.com>
24744
24745 PR tree-optimization/84111
24746 * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1): Skip
24747 inner loops added during recursion, as they don't have up-to-date
24748 SSA form.
24749
24750 2018-01-30 Jan Hubicka <hubicka@ucw.cz>
24751
24752 PR ipa/81360
24753 * ipa-inline.c (can_inline_edge_p): Break out late tests to...
24754 (can_inline_edge_by_limits_p): ... here.
24755 (can_early_inline_edge_p, check_callers,
24756 update_caller_keys, update_callee_keys, recursive_inlining,
24757 add_new_edges_to_heap, speculation_useful_p,
24758 inline_small_functions,
24759 inline_small_functions, flatten_function,
24760 inline_to_all_callers_1): Update.
24761
24762 2018-01-30 Jan Hubicka <hubicka@ucw.cz>
24763
24764 * profile-count.c (profile_count::combine_with_ipa_count): Handle
24765 zeros correctly.
24766
24767 2018-01-30 Richard Biener <rguenther@suse.de>
24768
24769 PR tree-optimization/83008
24770 * tree-vect-slp.c (vect_analyze_slp_cost_1): Properly cost
24771 invariant and constant vector uses in stmts when they need
24772 more than one stmt.
24773
24774 2018-01-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
24775
24776 PR bootstrap/84017
24777 * configure.ac (gcc_cv_as_shf_merge): Disable on Solaris 10/x86.
24778 * configure: Regenerate.
24779
24780 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
24781
24782 * config/aarch64/aarch64-sve.md (*vec_extract<mode><Vel>_0): New
24783 pattern.
24784 (*vec_extract<mode><Vel>_v128): Require a nonzero lane number.
24785 Use gen_rtx_REG rather than gen_lowpart.
24786
24787 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
24788
24789 * lra-constraints.c (match_reload): Use subreg_lowpart_offset
24790 rather than 0 when creating partial subregs.
24791
24792 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
24793
24794 * vec-perm-indices.c (vec_perm_indices::series_p): Give examples
24795 of usage.
24796
24797 2018-01-29 Michael Meissner <meissner@linux.vnet.ibm.com>
24798
24799 PR target/81550
24800 * config/rs6000/rs6000.c (rs6000_setup_reg_addr_masks): If DFmode
24801 and SFmode can go in Altivec registers (-mcpu=power7 for DFmode,
24802 -mcpu=power8 for SFmode) don't set the PRE_INCDEC or PRE_MODIFY
24803 flags. This restores the settings used before the 2017-07-24.
24804 Turning off pre increment/decrement/modify allows IVOPTS to
24805 optimize DF/SF loops where the index is an int.
24806
24807 2018-01-29 Richard Biener <rguenther@suse.de>
24808 Kelvin Nilsen <kelvin@gcc.gnu.org>
24809
24810 PR bootstrap/80867
24811 * tree-vect-stmts.c (vectorizable_call): Don't call
24812 targetm.vectorize_builtin_md_vectorized_function if callee is
24813 NULL.
24814
24815 2018-01-22 Carl Love <cel@us.ibm.com>
24816
24817 * doc/extend.tex: Fix typo in second arg in
24818 __builtin_bcdadd_{lt|eq|gt|ov} and __builtin_bcdsub_{lt|eq|gt|ov}.
24819
24820 2018-01-29 Richard Biener <rguenther@suse.de>
24821
24822 PR tree-optimization/84086
24823 * tree-ssanames.c: Include cfgloop.h and tree-scalar-evolution.h.
24824 (flush_ssaname_freelist): When SSA names were released reset
24825 the SCEV hash table.
24826
24827 2018-01-29 Richard Biener <rguenther@suse.de>
24828
24829 PR tree-optimization/84057
24830 * tree-ssa-loop-ivcanon.c (unloop_loops): Deal with already
24831 removed paths when removing edges.
24832
24833 2018-01-27 H.J. Lu <hongjiu.lu@intel.com>
24834
24835 * doc/invoke.texi: Replace -mfunction-return==@var{choice} with
24836 -mfunction-return=@var{choice}.
24837
24838 2018-01-27 Bernd Edlinger <bernd.edlinger@hotmail.de>
24839
24840 PR diagnostic/84034
24841 * diagnostic-show-locus.c (get_line_width_without_trailing_whitespace):
24842 Handle CR like TAB.
24843 (layout::print_source_line): Likewise.
24844 (test_get_line_width_without_trailing_whitespace): Add test cases.
24845
24846 2018-01-27 Jakub Jelinek <jakub@redhat.com>
24847
24848 PR middle-end/84040
24849 * sched-deps.c (sched_macro_fuse_insns): Return immediately for
24850 debug insns.
24851
24852 2018-01-26 Jim Wilson <jimw@sifive.com>
24853
24854 * config/riscv/riscv.h (MAX_FIXED_MODE_SIZE): New.
24855
24856 * config/riscv/elf.h (LIB_SPEC): Don't include -lgloss when nosys.specs
24857 specified.
24858
24859 2018-01-26 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
24860
24861 * config/aarch64/aarch64.md: Add peepholes for CMP + SUB -> SUBS
24862 and CMP + SUB-immediate -> SUBS.
24863
24864 2018-01-26 Martin Sebor <msebor@redhat.com>
24865
24866 PR tree-optimization/83896
24867 * tree-ssa-strlen.c (get_string_len): Rename...
24868 (get_string_cst_length): ...to this. Return HOST_WIDE_INT.
24869 Avoid assuming length is constant.
24870 (handle_char_store): Use HOST_WIDE_INT for string length.
24871
24872 2018-01-26 Uros Bizjak <ubizjak@gmail.com>
24873
24874 PR target/81763
24875 * config/i386/i386.md (*andndi3_doubleword): Add earlyclobber
24876 to (=&r,r,rm) alternative. Add (=r,0,rm) and (=r,r,0) alternatives.
24877
24878 2018-01-26 Richard Biener <rguenther@suse.de>
24879
24880 PR rtl-optimization/84003
24881 * dse.c (record_store): Only record redundant stores when
24882 the earlier store aliases at least all accesses the later one does.
24883
24884 2018-01-26 Jakub Jelinek <jakub@redhat.com>
24885
24886 PR rtl-optimization/83985
24887 * dce.c (deletable_insn_p): Return false for separate shrink wrapping
24888 REG_CFA_RESTORE insns.
24889 (delete_unmarked_insns): Don't ignore separate shrink wrapping
24890 REG_CFA_RESTORE insns here.
24891
24892 PR c/83989
24893 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Don't
24894 use SSA_NAME_VAR as base for SSA_NAMEs with non-NULL SSA_NAME_VAR.
24895
24896 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
24897
24898 * config/arc/arc-arch.h (arc_tune_attr): Add ARC_TUNE_CORE_3.
24899 * config/arc/arc.c (arc_sched_issue_rate): Use ARC_TUNE_... .
24900 (arc_init): Likewise.
24901 (arc_override_options): Likewise.
24902 (arc_file_start): Choose Tag_ARC_CPU_variation based on arc_tune
24903 value.
24904 (hwloop_fail): Use TARGET_DBNZ when we want to check for dbnz insn
24905 support.
24906 * config/arc/arc.h (TARGET_DBNZ): Define.
24907 * config/arc/arc.md (attr tune): Add core_3, use ARC_TUNE_... to
24908 properly set the tune attribute.
24909 (dbnz): Use TARGET_DBNZ guard.
24910 * config/arc/arc.opt (mtune): Add core3 option.
24911
24912 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
24913
24914 * config/arc/arc.c (arc_delegitimize_address_0): Refactored to
24915 recognize new pic like addresses.
24916 (arc_delegitimize_address): Clean up.
24917
24918 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
24919
24920 * config/arc/arc-arches.def: Option mrf16 valid for all
24921 architectures.
24922 * config/arc/arc-c.def (__ARC_RF16__): New predefined macro.
24923 * config/arc/arc-cpus.def (em_mini): New cpu with rf16 on.
24924 * config/arc/arc-options.def (FL_RF16): Add mrf16 option.
24925 * config/arc/arc-tables.opt: Regenerate.
24926 * config/arc/arc.c (arc_conditional_register_usage): Handle
24927 reduced register file case.
24928 (arc_file_start): Set must have build attributes.
24929 * config/arc/arc.h (MAX_ARC_PARM_REGS): Conditional define using
24930 mrf16 option value.
24931 * config/arc/arc.opt (mrf16): Add new option.
24932 * config/arc/elf.h (ATTRIBUTE_PCS): Define.
24933 * config/arc/genmultilib.awk: Handle new mrf16 option.
24934 * config/arc/linux.h (ATTRIBUTE_PCS): Define.
24935 * config/arc/t-multilib: Regenerate.
24936 * doc/invoke.texi (ARC Options): Document mrf16 option.
24937
24938 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
24939
24940 * config/arc/arc-protos.h: Add arc_is_secure_call_p proto.
24941 * config/arc/arc.c (arc_handle_secure_attribute): New function.
24942 (arc_attribute_table): Add 'secure_call' attribute.
24943 (arc_print_operand): Print secure call operand.
24944 (arc_function_ok_for_sibcall): Don't optimize tail calls when
24945 secure.
24946 (arc_is_secure_call_p): New function. * config/arc/arc.md
24947 (call_i): Add support for sjli instruction.
24948 (call_value_i): Likewise.
24949 * config/arc/constraints.md (Csc): New constraint.
24950
24951 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
24952 John Eric Martin <John.Martin@emmicro-us.com>
24953
24954 * config/arc/arc-protos.h: Add arc_is_jli_call_p proto.
24955 * config/arc/arc.c (_arc_jli_section): New struct.
24956 (arc_jli_section): New type.
24957 (rc_jli_sections): New static variable.
24958 (arc_handle_jli_attribute): New function.
24959 (arc_attribute_table): Add jli_always and jli_fixed attribute.
24960 (arc_file_end): New function.
24961 (TARGET_ASM_FILE_END): Define.
24962 (arc_print_operand): Reuse 'S' letter for JLI output instruction.
24963 (arc_add_jli_section): New function.
24964 (jli_call_scan): Likewise.
24965 (arc_reorg): Call jli_call_scan.
24966 (arc_output_addsi): Remove 'S' from printing asm operand.
24967 (arc_is_jli_call_p): New function.
24968 * config/arc/arc.md (movqi_insn): Remove 'S' from printing asm
24969 operand.
24970 (movhi_insn): Likewise.
24971 (movsi_insn): Likewise.
24972 (movsi_set_cc_insn): Likewise.
24973 (loadqi_update): Likewise.
24974 (load_zeroextendqisi_update): Likewise.
24975 (load_signextendqisi_update): Likewise.
24976 (loadhi_update): Likewise.
24977 (load_zeroextendhisi_update): Likewise.
24978 (load_signextendhisi_update): Likewise.
24979 (loadsi_update): Likewise.
24980 (loadsf_update): Likewise.
24981 (movsicc_insn): Likewise.
24982 (bset_insn): Likewise.
24983 (bxor_insn): Likewise.
24984 (bclr_insn): Likewise.
24985 (bmsk_insn): Likewise.
24986 (bicsi3_insn): Likewise.
24987 (cmpsi_cc_c_insn): Likewise.
24988 (movsi_ne): Likewise.
24989 (movsi_cond_exec): Likewise.
24990 (clrsbsi2): Likewise.
24991 (norm_f): Likewise.
24992 (normw): Likewise.
24993 (swap): Likewise.
24994 (divaw): Likewise.
24995 (flag): Likewise.
24996 (sr): Likewise.
24997 (kflag): Likewise.
24998 (ffs): Likewise.
24999 (ffs_f): Likewise.
25000 (fls): Likewise.
25001 (call_i): Remove 'S' asm letter, add jli instruction.
25002 (call_value_i): Likewise.
25003 * config/arc/arc.op (mjli-always): New option.
25004 * config/arc/constraints.md (Cji): New constraint.
25005 * config/arc/fpx.md (addsf3_fpx): Remove 'S' from printing asm
25006 operand.
25007 (subsf3_fpx): Likewise.
25008 (mulsf3_fpx): Likewise.
25009 * config/arc/simdext.md (vendrec_insn): Remove 'S' from printing
25010 asm operand.
25011 * doc/extend.texi (ARC): Document 'jli-always' and 'jli-fixed'
25012 function attrbutes.
25013 * doc/invoke.texi (ARC): Document mjli-always option.
25014
25015 2018-01-26 Sebastian Perta <sebastian.perta@renesas.com>
25016
25017 * config/rl78/rl78.c (rl78_addsi3_internal): If operand 2 is const
25018 avoid addition with 0 and use incw and decw where possible.
25019
25020 2018-01-26 Richard Biener <rguenther@suse.de>
25021
25022 PR tree-optimization/81082
25023 * fold-const.c (fold_plusminus_mult_expr): Do not perform the
25024 association if it requires casting to unsigned.
25025 * match.pd ((A * C) +- (B * C) -> (A+-B)): New patterns derived
25026 from fold_plusminus_mult_expr to catch important cases late when
25027 range info is available.
25028
25029 2018-01-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
25030
25031 * config/i386/sol2.h (USE_HIDDEN_LINKONCE): Remove.
25032 * configure.ac (hidden_linkonce): New test.
25033 * configure: Regenerate.
25034 * config.in: Regenerate.
25035
25036 2018-01-26 Julia Koval <julia.koval@intel.com>
25037
25038 * config/i386/avx512bitalgintrin.h (_mm512_bitshuffle_epi64_mask,
25039 _mm512_mask_bitshuffle_epi64_mask, _mm256_bitshuffle_epi64_mask,
25040 _mm256_mask_bitshuffle_epi64_mask, _mm_bitshuffle_epi64_mask,
25041 _mm_mask_bitshuffle_epi64_mask): Fix type.
25042 * config/i386/i386-builtin-types.def (UHI_FTYPE_V2DI_V2DI_UHI,
25043 USI_FTYPE_V4DI_V4DI_USI): Remove.
25044 * config/i386/i386-builtin.def (__builtin_ia32_vpshufbitqmb512_mask,
25045 __builtin_ia32_vpshufbitqmb256_mask,
25046 __builtin_ia32_vpshufbitqmb128_mask): Fix types.
25047 * config/i386/i386.c (ix86_expand_args_builtin): Remove old types.
25048 * config/i386/sse.md (VI1_AVX512VLBW): Change types.
25049
25050 2018-01-26 Alan Modra <amodra@gmail.com>
25051
25052 PR target/84033
25053 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Exclude
25054 UNSPEC_VBPERMQ. Sort other unspecs.
25055
25056 2018-01-25 David Edelsohn <dje.gcc@gmail.com>
25057
25058 * doc/invoke.texi (PowerPC Options): Document 'native' cpu type.
25059
25060 2018-01-25 Jan Hubicka <hubicka@ucw.cz>
25061
25062 PR middle-end/83055
25063 * predict.c (drop_profile): Do not push/pop cfun; update also
25064 node->count.
25065 (handle_missing_profiles): Fix logic looking for zero profiles.
25066
25067 2018-01-25 Jakub Jelinek <jakub@redhat.com>
25068
25069 PR middle-end/83977
25070 * ipa-fnsummary.c (compute_fn_summary): Clear can_change_signature
25071 on functions with #pragma omp declare simd or functions with simd
25072 attribute.
25073 * omp-simd-clone.c (expand_simd_clones): Revert 2018-01-24 change.
25074 * config/i386/i386.c (ix86_simd_clone_compute_vecsize_and_simdlen):
25075 Remove trailing \n from warning_at calls.
25076
25077 2018-01-25 Tom de Vries <tom@codesourcery.com>
25078
25079 PR target/84028
25080 * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
25081 for neutered workers.
25082
25083 2018-01-24 Joseph Myers <joseph@codesourcery.com>
25084
25085 PR target/68467
25086 * config/m68k/m68k.c (m68k_promote_function_mode): New function.
25087 (TARGET_PROMOTE_FUNCTION_MODE): New macro.
25088
25089 2018-01-24 Jeff Law <law@redhat.com>
25090
25091 PR target/83994
25092 * i386.c (get_probe_interval): Move to earlier point.
25093 (ix86_compute_frame_layout): If -fstack-clash-protection and
25094 the frame is larger than the probe interval, then use pushes
25095 to save registers rather than reg->mem moves.
25096 (ix86_expand_prologue): Remove conditional for int_registers_saved
25097 assertion.
25098
25099 2018-01-24 Vladimir Makarov <vmakarov@redhat.com>
25100
25101 PR target/84014
25102 * ira-build.c (setup_min_max_allocno_live_range_point): Set up
25103 min/max for never referenced object.
25104
25105 2018-01-24 Jakub Jelinek <jakub@redhat.com>
25106
25107 PR middle-end/83977
25108 * tree.c (free_lang_data_in_decl): Don't clear DECL_ABSTRACT_ORIGIN
25109 here.
25110 * omp-low.c (create_omp_child_function): Remove "omp declare simd"
25111 attributes from DECL_ATTRIBUTES (decl) without affecting
25112 DECL_ATTRIBUTES (current_function_decl).
25113 * omp-simd-clone.c (expand_simd_clones): Ignore DECL_ARTIFICIAL
25114 functions with non-NULL DECL_ABSTRACT_ORIGIN.
25115
25116 2018-01-24 Richard Sandiford <richard.sandiford@linaro.org>
25117
25118 PR tree-optimization/83979
25119 * fold-const.c (fold_comparison): Use constant_boolean_node
25120 instead of boolean_{true,false}_node.
25121
25122 2018-01-24 Jan Hubicka <hubicka@ucw.cz>
25123
25124 * ipa-profile.c (ipa_propagate_frequency_1): Fix logic skipping calls
25125 with zero counts.
25126
25127 2018-01-24 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
25128
25129 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
25130 Simplify the clause that sets the length attribute.
25131 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
25132 (*sibcall_nonlocal_sysv<mode>): Clean up code block; simplify the
25133 clause that sets the length attribute.
25134 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
25135
25136 2018-01-24 Tom de Vries <tom@codesourcery.com>
25137
25138 PR target/83589
25139 * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_2): Define to 1.
25140 (nvptx_pc_set, nvptx_condjump_label): New function. Copy from jump.c.
25141 Add strict parameter.
25142 (prevent_branch_around_nothing): Insert dummy insn between branch to
25143 label and label with no ptx insn inbetween.
25144 * config/nvptx/nvptx.md (define_insn "fake_nop"): New insn.
25145
25146 2018-01-24 Tom de Vries <tom@codesourcery.com>
25147
25148 PR target/81352
25149 * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
25150 for neutered threads in warp.
25151 * config/nvptx/nvptx.md (define_insn "exit"): New insn.
25152
25153 2018-01-24 Richard Biener <rguenther@suse.de>
25154
25155 PR tree-optimization/83176
25156 * tree-chrec.c (chrec_fold_plus_1): Handle (signed T){(T) .. }
25157 operands.
25158
25159 2018-01-24 Richard Biener <rguenther@suse.de>
25160
25161 PR tree-optimization/82819
25162 * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Avoid
25163 code generating pluses that are no-ops in the target precision.
25164
25165 2018-01-24 Richard Biener <rguenther@suse.de>
25166
25167 PR middle-end/84000
25168 * tree-cfg.c (replace_loop_annotate): Handle annot_expr_parallel_kind.
25169
25170 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
25171
25172 * cfgcleanup.c (try_crossjump_to_edge): Use combine_with_count
25173 to merge probabilities.
25174 * predict.c (probably_never_executed): Also mark as cold functions
25175 with global 0 profile and guessed local profile.
25176 * profile-count.c (profile_probability::combine_with_count): New
25177 member function.
25178 * profile-count.h (profile_probability::operator*,
25179 profile_probability::operator*=, profile_probability::operator/,
25180 profile_probability::operator/=): Reduce precision to adjusted
25181 and set value to guessed on contradictory divisions.
25182 (profile_probability::combine_with_freq): Remove.
25183 (profile_probability::combine_wiht_count): Declare.
25184 (profile_count::force_nonzero):: Set to adjusted.
25185 (profile_count::probability_in):: Set quality to adjusted.
25186 * tree-ssa-tail-merge.c (replace_block_by): Use
25187 combine_with_count.
25188
25189 2018-01-23 Andrew Waterman <andrew@sifive.com>
25190 Jim Wilson <jimw@sifive.com>
25191
25192 * config/riscv/riscv.c (riscv_stack_boundary): New.
25193 (riscv_option_override): Set riscv_stack_boundary. Handle
25194 riscv_preferred_stack_boundary_arg.
25195 * config/riscv/riscv.h (MIN_STACK_BOUNDARY, ABI_STACK_BOUNDARY): New.
25196 (BIGGEST_ALIGNMENT): Set to STACK_BOUNDARY.
25197 (STACK_BOUNDARY): Set to riscv_stack_boundary.
25198 (RISCV_STACK_ALIGN): Use STACK_BOUNDARY.
25199 * config/riscv/riscv.opt (mpreferred-stack-boundary): New.
25200 * doc/invoke.tex (RISC-V Options): Add -mpreferred-stack-boundary.
25201
25202 2018-01-23 H.J. Lu <hongjiu.lu@intel.com>
25203
25204 PR target/83905
25205 * config/i386/i386.c (ix86_expand_prologue): Use cost reference
25206 of struct ix86_frame.
25207 (ix86_expand_epilogue): Likewise. Add a local variable for
25208 the reg_save_offset field in struct ix86_frame.
25209
25210 2018-01-23 Bin Cheng <bin.cheng@arm.com>
25211
25212 PR tree-optimization/82604
25213 * tree-loop-distribution.c (enum partition_kind): New enum item
25214 PKIND_PARTIAL_MEMSET.
25215 (partition_builtin_p): Support above new enum item.
25216 (generate_code_for_partition): Ditto.
25217 (compute_access_range): Differentiate cases that equality can be
25218 proven at all loops, the innermost loops or no loops.
25219 (classify_builtin_st, classify_builtin_ldst): Adjust call to above
25220 function. Set PKIND_PARTIAL_MEMSET for partition appropriately.
25221 (finalize_partitions, distribute_loop): Don't fuse partition of
25222 PKIND_PARTIAL_MEMSET kind when distributing 3-level loop nest.
25223 (prepare_perfect_loop_nest): Distribute 3-level loop nest only if
25224 parloop is enabled.
25225
25226 2018-01-23 Martin Liska <mliska@suse.cz>
25227
25228 * predict.def (PRED_INDIR_CALL): Set probability to PROB_EVEN in
25229 order to ignore the predictor.
25230 (PRED_POLYMORPHIC_CALL): Likewise.
25231 (PRED_RECURSIVE_CALL): Likewise.
25232
25233 2018-01-23 Martin Liska <mliska@suse.cz>
25234
25235 * tree-profile.c (tree_profiling): Print function header to
25236 aware reader which function we are working on.
25237 * value-prof.c (gimple_find_values_to_profile): Do not print
25238 not interesting value histograms.
25239
25240 2018-01-23 Martin Liska <mliska@suse.cz>
25241
25242 * profile-count.h (enum profile_quality): Add
25243 profile_uninitialized as the first value. Do not number values
25244 as they are zero based.
25245 (profile_count::verify): Update sanity check.
25246 (profile_probability::verify): Likewise.
25247
25248 2018-01-23 Nathan Sidwell <nathan@acm.org>
25249
25250 * doc/invoke.texi (ffor-scope): Deprecate.
25251
25252 2018-01-23 David Malcolm <dmalcolm@redhat.com>
25253
25254 PR tree-optimization/83510
25255 * domwalk.c (set_all_edges_as_executable): New function.
25256 (dom_walker::dom_walker): Convert bool param
25257 "skip_unreachable_blocks" to enum reachability. Move setup of
25258 edge flags to set_all_edges_as_executable and only do it when
25259 reachability is REACHABLE_BLOCKS.
25260 * domwalk.h (enum dom_walker::reachability): New enum.
25261 (dom_walker::dom_walker): Convert bool param
25262 "skip_unreachable_blocks" to enum reachability.
25263 (set_all_edges_as_executable): New decl.
25264 * graphite-scop-detection.c (gather_bbs::gather_bbs): Convert
25265 from false for "skip_unreachable_blocks" to ALL_BLOCKS for
25266 "reachability".
25267 * tree-ssa-dom.c (dom_opt_dom_walker::dom_opt_dom_walker): Likewise,
25268 but converting true to REACHABLE_BLOCKS.
25269 * tree-ssa-sccvn.c (sccvn_dom_walker::sccvn_dom_walker): Likewise.
25270 * tree-vrp.c
25271 (check_array_bounds_dom_walker::check_array_bounds_dom_walker):
25272 Likewise, but converting it to REACHABLE_BLOCKS_PRESERVING_FLAGS.
25273 (vrp_dom_walker::vrp_dom_walker): Likewise, but converting it to
25274 REACHABLE_BLOCKS.
25275 (vrp_prop::vrp_finalize): Call set_all_edges_as_executable
25276 if check_all_array_refs will be called.
25277
25278 2018-01-23 David Malcolm <dmalcolm@redhat.com>
25279
25280 * tree.c (selftest::test_location_wrappers): Add more test
25281 coverage.
25282
25283 2018-01-23 David Malcolm <dmalcolm@redhat.com>
25284
25285 * sbitmap.c (selftest::test_set_range): Fix memory leaks.
25286 (selftest::test_bit_in_range): Likewise.
25287
25288 2018-01-23 Richard Sandiford <richard.sandiford@linaro.org>
25289
25290 PR testsuite/83888
25291 * doc/sourcebuild.texi (vect_float): Say that the selector
25292 only describes the situation when -funsafe-math-optimizations is on.
25293 (vect_float_strict): Document.
25294
25295 2018-01-23 Richard Sandiford <richard.sandiford@linaro.org>
25296
25297 PR tree-optimization/83965
25298 * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
25299 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern): Use it
25300 instead of checking only for a reduction.
25301 (vect_recog_widen_sum_pattern): Likewise.
25302
25303 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
25304
25305 * predict.c (probably_never_executed): Only use precise profile info.
25306 (compute_function_frequency): Skip after inlining hack since we now
25307 have quality checking.
25308
25309 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
25310
25311 * profile-count.h (profile_probability::very_unlikely,
25312 profile_probability::unlikely, profile_probability::even): Set
25313 precision to guessed.
25314
25315 2018-01-23 Richard Biener <rguenther@suse.de>
25316
25317 PR tree-optimization/83963
25318 * graphite-scop-detection.c (scop_detection::harmful_loop_in_region):
25319 Properly terminate dominator walk when crossing the exit edge not
25320 when visiting its source block.
25321
25322 2018-01-23 Jakub Jelinek <jakub@redhat.com>
25323
25324 PR c++/83918
25325 * tree.c (maybe_wrap_with_location): Use NON_LVALUE_EXPR rather than
25326 VIEW_CONVERT_EXPR to wrap CONST_DECLs.
25327
25328 2018-01-22 Jakub Jelinek <jakub@redhat.com>
25329
25330 PR tree-optimization/83957
25331 * omp-expand.c (expand_omp_for_generic): Ignore virtual PHIs. Remove
25332 semicolon after for body surrounded by braces.
25333
25334 PR tree-optimization/83081
25335 * profile-count.h (profile_probability::split): New method.
25336 * dojump.c (do_jump_1) <case TRUTH_ANDIF_EXPR, case TRUTH_ORIF_EXPR>:
25337 Use profile_probability::split.
25338 (do_compare_rtx_and_jump): Fix adjustment of probabilities
25339 when splitting a single conditional jump into 2.
25340
25341 2018-01-22 David Malcolm <dmalcolm@redhat.com>
25342
25343 PR tree-optimization/69452
25344 * tree-ssa-loop-im.c (class move_computations_dom_walker): Remove
25345 decl.
25346
25347 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
25348
25349 * config/rl78/rl78-expand.md (bswaphi2): New define_expand.
25350 * config/rl78/rl78-virt.md (*bswaphi2_virt): New define_insn.
25351 * config/rl78/rl78-real.md (*bswaphi2_real): New define_insn.
25352
25353 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
25354
25355 * config/rl78/rl78-protos.h (rl78_split_movdi): New function
25356 declaration.
25357 * config/rl78/rl78.md (movdi): New define_expand.
25358 * config/rl78/rl78.c (rl78_split_movdi): New function.
25359
25360 2018-01-22 Michael Meissner <meissner@linux.vnet.ibm.com>
25361
25362 PR target/83862
25363 * config/rs6000/rs6000-protos.h (rs6000_split_signbit): Delete,
25364 no longer used.
25365 * config/rs6000/rs6000.c (rs6000_split_signbit): Likewise.
25366 * config/rs6000/rs6000.md (signbit<mode>2): Change code for IEEE
25367 128-bit to produce an UNSPEC move to get the double word with the
25368 signbit and then a shift directly to do signbit.
25369 (signbit<mode>2_dm): Replace old IEEE 128-bit signbit
25370 implementation with a new version that just does either a direct
25371 move or a regular move. Move memory interface to separate insns.
25372 Move insns so they are next to the expander.
25373 (signbit<mode>2_dm_mem_be): New combiner insns to combine load
25374 with signbit move. Split big and little endian case.
25375 (signbit<mode>2_dm_mem_le): Likewise.
25376 (signbit<mode>2_dm_<su>ext): Delete, no longer used.
25377 (signbit<mode>2_dm2): Likewise.
25378
25379 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
25380
25381 * config/rl78/rl78.md (anddi3): New define_expand.
25382
25383 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
25384
25385 * config/rl78/rl78.md (umindi3): New define_expand.
25386
25387 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
25388
25389 * config/rl78/rl78.md (smindi3): New define_expand.
25390
25391 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
25392
25393 * config/rl78/rl78.md (smaxdi3): New define_expand.
25394
25395 2018-01-22 Carl Love <cel@us.ibm.com>
25396
25397 * config/rs6000/rs6000-builtin.def (ST_ELEMREV_V1TI, LD_ELEMREV_V1TI,
25398 LVX_V1TI): Add macro expansion.
25399 * config/rs6000/rs6000-c.c (altivec_builtin_types): Add argument
25400 definitions for VSX_BUILTIN_VEC_XST_BE, VSX_BUILTIN_VEC_ST,
25401 VSX_BUILTIN_VEC_XL, LD_ELEMREV_V1TI builtins.
25402 * config/rs6000/rs6000-p8swap.c (insn_is_swappable_p);
25403 Change check to determine if the instruction is a byte reversing
25404 entry. Fix typo in comment.
25405 * config/rs6000/rs6000.c (altivec_expand_builtin): Add case entry
25406 for VSX_BUILTIN_ST_ELEMREV_V1TI and VSX_BUILTIN_LD_ELEMREV_V1TI.
25407 Add def_builtin calls for new builtins.
25408 * config/rs6000/vsx.md (vsx_st_elemrev_v1ti, vsx_ld_elemrev_v1ti):
25409 Add define_insn expansion.
25410
25411 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
25412
25413 * config/rl78/rl78.md (umaxdi3): New define_expand.
25414
25415 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
25416
25417 * config/rl78/rl78.c (rl78_note_reg_set): Fixed dead reg check
25418 for non-QImode registers.
25419
25420 2018-01-22 Richard Biener <rguenther@suse.de>
25421
25422 PR tree-optimization/83963
25423 * graphite-scop-detection.c (scop_detection::get_sese): Delay
25424 including the loop exit block.
25425 (scop_detection::merge_sese): Likewise.
25426 (scop_detection::add_scop): Do it here instead.
25427
25428 2018-01-22 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
25429
25430 * doc/sourcebuild.texi (arm_softfloat): Document.
25431
25432 2018-01-21 John David Anglin <danglin@gcc.gnu.org>
25433
25434 PR gcc/77734
25435 * config/pa/pa.c (pa_function_ok_for_sibcall): Use
25436 targetm.binds_local_p instead of TREE_PUBLIC to check local binding.
25437 Move TARGET_PORTABLE_RUNTIME check after TARGET_64BIT check.
25438
25439 2018-01-21 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
25440 David Edelsohn <dje.gcc@gmail.com>
25441
25442 PR target/83946
25443 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
25444 Change "crset eq" to "crset 2".
25445 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
25446 (*call_indirect_aix<mode>_nospec): Likewise.
25447 (*call_value_indirect_aix<mode>_nospec): Likewise.
25448 (*call_indirect_elfv2<mode>_nospec): Likewise.
25449 (*call_value_indirect_elfv2<mode>_nospec): Likewise.
25450 (*sibcall_nonlocal_sysv<mode>): Change "crset eq" to "crset 2";
25451 change assembly output from . to $.
25452 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
25453 (indirect_jump<mode>_nospec): Change assembly output from . to $.
25454 (*tablejump<mode>_internal1_nospec): Likewise.
25455
25456 2018-01-21 Oleg Endo <olegendo@gcc.gnu.org>
25457
25458 PR target/80870
25459 * config/sh/sh_optimize_sett_clrt.cc:
25460 Use INCLUDE_ALGORITHM and INCLUDE_VECTOR instead of direct includes.
25461
25462 2018-01-20 Richard Sandiford <richard.sandiford@linaro.org>
25463
25464 PR tree-optimization/83940
25465 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Set
25466 offset_dt to vect_constant_def rather than vect_unknown_def_type.
25467 (vect_check_load_store_mask): Add a mask_dt_out parameter and
25468 use it to pass back the definition type.
25469 (vect_check_store_rhs): Likewise rhs_dt_out.
25470 (vect_build_gather_load_calls): Add a mask_dt argument and use
25471 it instead of a call to vect_is_simple_use.
25472 (vectorizable_store): Update calls to vect_check_load_store_mask
25473 and vect_check_store_rhs. Use the dt returned by the latter instead
25474 of scatter_src_dt. Use the cached mask_dt and gs_info.offset_dt
25475 instead of calls to vect_is_simple_use. Pass the scalar rather
25476 than the vector operand to vect_is_simple_use when handling
25477 second and subsequent copies of an rhs value.
25478 (vectorizable_load): Update calls to vect_check_load_store_mask
25479 and vect_build_gather_load_calls. Use the cached mask_dt and
25480 gs_info.offset_dt instead of calls to vect_is_simple_use.
25481
25482 2018-01-20 Jakub Jelinek <jakub@redhat.com>
25483
25484 PR middle-end/83945
25485 * tree-emutls.c: Include gimplify.h.
25486 (lower_emutls_2): New function.
25487 (lower_emutls_1): If ADDR_EXPR is a gimple invariant and walk_tree
25488 with lower_emutls_2 callback finds some TLS decl in it, unshare_expr
25489 it before further processing.
25490
25491 PR target/83930
25492 * simplify-rtx.c (simplify_binary_operation_1) <case UMOD>: Use
25493 UINTVAL (trueop1) instead of INTVAL (op1).
25494
25495 2018-01-19 Jakub Jelinek <jakub@redhat.com>
25496
25497 PR debug/81570
25498 PR debug/83728
25499 * dwarf2cfi.c (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define to
25500 INCOMING_FRAME_SP_OFFSET if not defined.
25501 (scan_trace): Add ENTRY argument. If true and
25502 DEFAULT_INCOMING_FRAME_SP_OFFSET != INCOMING_FRAME_SP_OFFSET,
25503 emit a note to adjust the CFA offset.
25504 (create_cfi_notes): Adjust scan_trace callers.
25505 (create_cie_data): Use DEFAULT_INCOMING_FRAME_SP_OFFSET rather than
25506 INCOMING_FRAME_SP_OFFSET in the CIE.
25507 * config/i386/i386.h (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define.
25508 * config/stormy16/stormy16.h (DEFAULT_INCOMING_FRAME_SP_OFFSET):
25509 Likewise.
25510 * doc/tm.texi.in (DEFAULT_INCOMING_FRAME_SP_OFFSET): Document.
25511 * doc/tm.texi: Regenerated.
25512
25513 2018-01-19 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
25514
25515 PR rtl-optimization/83147
25516 * lra-constraints.c (remove_inheritance_pseudos): Use
25517 lra_substitute_pseudo_within_insn.
25518
25519 2018-01-19 Tom de Vries <tom@codesourcery.com>
25520 Cesar Philippidis <cesar@codesourcery.com>
25521
25522 PR target/83920
25523 * config/nvptx/nvptx.c (nvptx_single): Fix jit workaround.
25524
25525 2018-01-19 Cesar Philippidis <cesar@codesourcery.com>
25526
25527 PR target/83790
25528 * config/nvptx/nvptx.c (output_init_frag): Don't use generic address
25529 spaces for function labels.
25530
25531 2018-01-19 Martin Liska <mliska@suse.cz>
25532
25533 * predict.def (PRED_LOOP_EXIT): Change from 85 to 89.
25534 (PRED_LOOP_EXIT_WITH_RECURSION): Change from 72 to 78.
25535 (PRED_LOOP_EXTRA_EXIT): Change from 83 to 67.
25536 (PRED_OPCODE_POSITIVE): Change from 64 to 59.
25537 (PRED_TREE_OPCODE_POSITIVE): Change from 64 to 59.
25538 (PRED_CONST_RETURN): Change from 69 to 65.
25539 (PRED_NULL_RETURN): Change from 91 to 71.
25540 (PRED_LOOP_IV_COMPARE_GUESS): Change from 98 to 64.
25541 (PRED_LOOP_GUARD): Change from 66 to 73.
25542
25543 2018-01-19 Martin Liska <mliska@suse.cz>
25544
25545 * predict.c (predict_insn_def): Add new assert.
25546 (struct branch_predictor): Change type to signed integer.
25547 (test_prediction_value_range): Amend test to cover
25548 PROB_UNINITIALIZED.
25549 * predict.def (PRED_LOOP_ITERATIONS): Use the new constant.
25550 (PRED_LOOP_ITERATIONS_GUESSED): Likewise.
25551 (PRED_LOOP_ITERATIONS_MAX): Likewise.
25552 (PRED_LOOP_IV_COMPARE): Likewise.
25553 * predict.h (PROB_UNINITIALIZED): Define new constant.
25554
25555 2018-01-19 Martin Liska <mliska@suse.cz>
25556
25557 * predict.c (dump_prediction): Add new format for
25558 analyze_brprob.py script which is enabled with -details
25559 suboption.
25560 * profile-count.h (precise_p): New function.
25561
25562 2018-01-19 Richard Sandiford <richard.sandiford@linaro.org>
25563
25564 PR tree-optimization/83922
25565 * tree-vect-loop.c (vect_verify_full_masking): Return false if
25566 there are no statements that need masking.
25567 (vect_active_double_reduction_p): New function.
25568 (vect_analyze_loop_operations): Use it when handling phis that
25569 are not in the loop header.
25570
25571 2018-01-19 Richard Sandiford <richard.sandiford@linaro.org>
25572
25573 PR tree-optimization/83914
25574 * tree-vect-loop.c (vectorizable_induction): Don't convert
25575 init_expr or apply the peeling adjustment for inductions
25576 that are nested within the vectorized loop.
25577
25578 2018-01-19 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
25579
25580 * config/arm/thumb2.md (*thumb2_negsi2_short): Use RSB mnemonic
25581 instead of NEG.
25582
25583 2018-01-18 Jakub Jelinek <jakub@redhat.com>
25584
25585 PR sanitizer/81715
25586 PR testsuite/83882
25587 * function.h (gimplify_parameters): Add gimple_seq * argument.
25588 * function.c: Include gimple.h and options.h.
25589 (gimplify_parameters): Add cleanup argument, add CLOBBER stmts
25590 for the added local temporaries if needed.
25591 * gimplify.c (gimplify_body): Adjust gimplify_parameters caller,
25592 if there are any parameter cleanups, wrap whole body into a
25593 try/finally with the cleanups.
25594
25595 2018-01-18 Wilco Dijkstra <wdijkstr@arm.com>
25596
25597 PR target/82964
25598 * config/aarch64/aarch64.c (aarch64_legitimate_constant_p):
25599 Use GET_MODE_CLASS for scalar floating point.
25600
25601 2018-01-18 Jan Hubicka <hubicka@ucw.cz>
25602
25603 PR ipa/82256
25604 patch by PaX Team
25605 * cgraphclones.c (cgraph_node::create_version_clone_with_body):
25606 Fix call of call_cgraph_insertion_hooks.
25607
25608 2018-01-18 Martin Sebor <msebor@redhat.com>
25609
25610 * doc/invoke.texi (-Wclass-memaccess): Tweak text.
25611
25612 2018-01-18 Jan Hubicka <hubicka@ucw.cz>
25613
25614 PR ipa/83619
25615 * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Update edge
25616 frequencies.
25617
25618 2018-01-18 Boris Kolpackov <boris@codesynthesis.com>
25619
25620 PR other/70268
25621 * common.opt: (-ffile-prefix-map): New option.
25622 * opts.c (common_handle_option): Defer it.
25623 * opts-global.c (handle_common_deferred_options): Handle it.
25624 * debug.h (remap_debug_filename, add_debug_prefix_map): Move to...
25625 * file-prefix-map.h: New file.
25626 (remap_debug_filename, add_debug_prefix_map): ...here.
25627 (add_macro_prefix_map, add_file_prefix_map, remap_macro_filename): New.
25628 * final.c (debug_prefix_map, add_debug_prefix_map
25629 remap_debug_filename): Move to...
25630 * file-prefix-map.c: New file.
25631 (file_prefix_map, add_prefix_map, remap_filename) ...here and rename,
25632 generalize, get rid of alloca(), use strrchr() instead of strchr().
25633 (add_macro_prefix_map, add_debug_prefix_map, add_file_prefix_map):
25634 Implement in terms of add_prefix_map().
25635 (remap_macro_filename, remap_debug_filename): Implement in term of
25636 remap_filename().
25637 * Makefile.in (OBJS, PLUGIN_HEADERS): Add new files.
25638 * builtins.c (fold_builtin_FILE): Call remap_macro_filename().
25639 * dbxout.c: Include file-prefix-map.h.
25640 * varasm.c: Likewise.
25641 * vmsdbgout.c: Likewise.
25642 * xcoffout.c: Likewise.
25643 * dwarf2out.c: Likewise plus omit new options from DW_AT_producer.
25644 * doc/cppopts.texi (-fmacro-prefix-map): Document.
25645 * doc/invoke.texi (-ffile-prefix-map): Document.
25646 (-fdebug-prefix-map): Update description.
25647
25648 2018-01-18 Martin Liska <mliska@suse.cz>
25649
25650 * config/i386/i386.c (indirect_thunk_name): Document that also
25651 lfence is emitted.
25652 (output_indirect_thunk): Document why both instructions
25653 (pause and lfence) are generated.
25654
25655 2018-01-18 Richard Biener <rguenther@suse.de>
25656
25657 PR tree-optimization/83887
25658 * graphite-scop-detection.c
25659 (scop_detection::get_nearest_dom_with_single_entry): Remove.
25660 (scop_detection::get_nearest_pdom_with_single_exit): Likewise.
25661 (scop_detection::merge_sese): Re-implement with a flood-fill
25662 algorithm that properly finds a SESE region if it exists.
25663
25664 2018-01-18 Jakub Jelinek <jakub@redhat.com>
25665
25666 PR c/61240
25667 * match.pd ((P + A) - P, P - (P + A), (P + A) - (P + B)): For
25668 pointer_diff optimizations use view_convert instead of convert.
25669
25670 2018-01-17 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
25671
25672 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
25673 Generate different code for -mno-speculate-indirect-jumps.
25674 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
25675 (*call_indirect_aix<mode>): Disable for
25676 -mno-speculate-indirect-jumps.
25677 (*call_indirect_aix<mode>_nospec): New define_insn.
25678 (*call_value_indirect_aix<mode>): Disable for
25679 -mno-speculate-indirect-jumps.
25680 (*call_value_indirect_aix<mode>_nospec): New define_insn.
25681 (*sibcall_nonlocal_sysv<mode>): Generate different code for
25682 -mno-speculate-indirect-jumps.
25683 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
25684
25685 2018-01-17 Michael Meissner <meissner@linux.vnet.ibm.com>
25686
25687 * config/rs6000/rs6000.c (rs6000_emit_move): If we load or store a
25688 long double type, set the flags for noting the default long double
25689 type, even if we don't pass or return a long double type.
25690
25691 2018-01-17 Jan Hubicka <hubicka@ucw.cz>
25692
25693 PR ipa/83051
25694 * ipa-inline.c (flatten_function): Do not overwrite final inlining
25695 failure.
25696
25697 2018-01-17 Will Schmidt <will_schmidt@vnet.ibm.com>
25698
25699 * config/rs6000/rs6000.c (rs6000_gimple_builtin): Add gimple folding
25700 support for merge[hl].
25701 (fold_mergehl_helper): New helper function.
25702 (tree-vector-builder.h): New #include for tree_vector_builder usage.
25703 * config/rs6000/altivec.md (altivec_vmrghw_direct): Add xxmrghw insn.
25704 (altivec_vmrglw_direct): Add xxmrglw insn.
25705
25706 2018-01-17 Andrew Waterman <andrew@sifive.com>
25707
25708 * config/riscv/riscv.c (riscv_conditional_register_usage): If
25709 UNITS_PER_FP_ARG is 0, set call_used_regs to 1 for all FP regs.
25710
25711 2018-01-17 David Malcolm <dmalcolm@redhat.com>
25712
25713 PR lto/83121
25714 * ipa-devirt.c (add_type_duplicate): When comparing memory layout,
25715 call the lto_location_cache before reading the
25716 DECL_SOURCE_LOCATION of the types.
25717
25718 2018-01-17 Wilco Dijkstra <wdijkstr@arm.com>
25719 Richard Sandiford <richard.sandiford@linaro.org>
25720
25721 * config/aarch64/aarch64.md (movti_aarch64): Use Uti constraint.
25722 * config/aarch64/aarch64.c (aarch64_mov128_immediate): New function.
25723 (aarch64_legitimate_constant_p): Just support CONST_DOUBLE
25724 SF/DF/TF mode to avoid creating illegal CONST_WIDE_INT immediates.
25725 * config/aarch64/aarch64-protos.h (aarch64_mov128_immediate):
25726 Add declaration.
25727 * config/aarch64/constraints.md (aarch64_movti_operand):
25728 Limit immediates.
25729 * config/aarch64/predicates.md (Uti): Add new constraint.
25730
25731 2018-01-17 Carl Love <cel@us.ibm.com>
25732
25733 * config/rs6000/vsx.md (define_expand xl_len_r,
25734 define_expand stxvl, define_expand *stxvl): Add match_dup argument.
25735 (define_insn): Add, match_dup 1 argument to define_insn stxvll and
25736 lxvll.
25737 (define_expand, define_insn): Move the shift left from the
25738 define_insn to the define_expand for lxvl and stxvl instructions.
25739 * config/rs6000/rs6000-builtin.def (BU_P9V_64BIT_VSX_2): Change LXVL
25740 and XL_LEN_R definitions to PURE.
25741
25742 2018-01-17 Uros Bizjak <ubizjak@gmail.com>
25743
25744 * config/i386/i386.c (indirect_thunk_name): Declare regno
25745 as unsigned int. Compare regno with INVALID_REGNUM.
25746 (output_indirect_thunk): Ditto.
25747 (output_indirect_thunk_function): Ditto.
25748 (ix86_code_end): Declare regno as unsigned int. Use INVALID_REGNUM
25749 in the call to output_indirect_thunk_function.
25750
25751 2018-01-17 Richard Sandiford <richard.sandiford@linaro.org>
25752
25753 PR middle-end/83884
25754 * expr.c (expand_expr_real_1): Use the size of GET_MODE (op0)
25755 rather than the size of inner_type to determine the stack slot size
25756 when handling VIEW_CONVERT_EXPRs on strict-alignment targets.
25757
25758 2018-01-16 Sebastian Peryt <sebastian.peryt@intel.com>
25759
25760 PR target/83546
25761 * config/i386/i386.c (ix86_option_override_internal): Add PTA_RDRND
25762 to PTA_SILVERMONT.
25763
25764 2018-01-16 Michael Meissner <meissner@linux.vnet.ibm.com>
25765
25766 * config.gcc (powerpc*-linux*-*): Add support for 64-bit little
25767 endian Linux systems to optionally enable multilibs for selecting
25768 the long double type if the user configured an explicit type.
25769 * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Indicate we
25770 have no long double multilibs if not defined.
25771 * config/rs6000/rs6000.c (rs6000_option_override_internal): Do not
25772 warn if the user used -mabi={ieee,ibm}longdouble and we built
25773 multilibs for long double.
25774 * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Define as the
25775 appropriate multilib option.
25776 (MULTILIB_DEFAULTS): Add MULTILIB_DEFAULTS_IEEE to the default
25777 multilib options.
25778 * config/rs6000/t-ldouble-linux64le-ibm: New configuration files
25779 for building long double multilibs.
25780 * config/rs6000/t-ldouble-linux64le-ieee: Likewise.
25781
25782 2018-01-16 John David Anglin <danglin@gcc.gnu.org>
25783
25784 * config.gcc (hppa*-*-linux*): Change callee copies ABI to caller
25785 copies.
25786
25787 * config/pa.h (MALLOC_ABI_ALIGNMENT): Set 32-bit alignment default to
25788 64 bits.
25789 * config/pa/pa32-linux.h (MALLOC_ABI_ALIGNMENT): Set alignment to
25790 128 bits.
25791
25792 * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Cleanup type and mode
25793 variables.
25794
25795 * config/pa/pa.c (pa_function_arg_size): Apply CEIL to GET_MODE_SIZE
25796 return value.
25797
25798 2018-01-16 Eric Botcazou <ebotcazou@adacore.com>
25799
25800 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For an
25801 ADDR_EXPR, do not count the offset of a COMPONENT_REF twice.
25802
25803 2018-01-16 Kelvin Nilsen <kelvin@gcc.gnu.org>
25804
25805 * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Generate
25806 different rtl trees depending on TARGET_64BIT.
25807 (rs6000_gen_lvx): Likewise.
25808
25809 2018-01-16 Eric Botcazou <ebotcazou@adacore.com>
25810
25811 * config/visium/visium.md (nop): Tweak comment.
25812 (hazard_nop): Likewise.
25813
25814 2018-01-16 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
25815
25816 * config/rs6000/rs6000.c (rs6000_opt_vars): Add entry for
25817 -mspeculate-indirect-jumps.
25818 * config/rs6000/rs6000.md (*call_indirect_elfv2<mode>): Disable
25819 for -mno-speculate-indirect-jumps.
25820 (*call_indirect_elfv2<mode>_nospec): New define_insn.
25821 (*call_value_indirect_elfv2<mode>): Disable for
25822 -mno-speculate-indirect-jumps.
25823 (*call_value_indirect_elfv2<mode>_nospec): New define_insn.
25824 (indirect_jump): Emit different RTL for
25825 -mno-speculate-indirect-jumps.
25826 (*indirect_jump<mode>): Disable for
25827 -mno-speculate-indirect-jumps.
25828 (*indirect_jump<mode>_nospec): New define_insn.
25829 (tablejump): Emit different RTL for
25830 -mno-speculate-indirect-jumps.
25831 (tablejumpsi): Disable for -mno-speculate-indirect-jumps.
25832 (tablejumpsi_nospec): New define_expand.
25833 (tablejumpdi): Disable for -mno-speculate-indirect-jumps.
25834 (tablejumpdi_nospec): New define_expand.
25835 (*tablejump<mode>_internal1): Disable for
25836 -mno-speculate-indirect-jumps.
25837 (*tablejump<mode>_internal1_nospec): New define_insn.
25838 * config/rs6000/rs6000.opt (mspeculate-indirect-jumps): New
25839 option.
25840
25841 2018-01-16 Artyom Skrobov tyomitch@gmail.com
25842
25843 * caller-save.c (insert_save): Drop unnecessary parameter. All
25844 callers updated.
25845
25846 2018-01-16 Jakub Jelinek <jakub@redhat.com>
25847 Richard Biener <rguenth@suse.de>
25848
25849 PR libgomp/83590
25850 * gimplify.c (gimplify_one_sizepos): For is_gimple_constant (expr)
25851 return early, inline manually is_gimple_sizepos. Make sure if we
25852 call gimplify_expr we don't end up with a gimple constant.
25853 * tree.c (variably_modified_type_p): Don't return true for
25854 is_gimple_constant (_t). Inline manually is_gimple_sizepos.
25855 * gimplify.h (is_gimple_sizepos): Remove.
25856
25857 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
25858
25859 PR tree-optimization/83857
25860 * tree-vect-loop.c (vect_analyze_loop_operations): Don't call
25861 vectorizable_live_operation for pure SLP statements.
25862 (vectorizable_live_operation): Handle PHIs.
25863
25864 2018-01-16 Richard Biener <rguenther@suse.de>
25865
25866 PR tree-optimization/83867
25867 * tree-vect-stmts.c (vect_transform_stmt): Precompute
25868 nested_in_vect_loop_p since the scalar stmt may get invalidated.
25869
25870 2018-01-16 Jakub Jelinek <jakub@redhat.com>
25871
25872 PR c/83844
25873 * stor-layout.c (handle_warn_if_not_align): Use byte_position and
25874 multiple_of_p instead of unchecked tree_to_uhwi and UHWI check.
25875 If off is not INTEGER_CST, issue a may not be aligned warning
25876 rather than isn't aligned. Use isn%'t rather than isn't.
25877 * fold-const.c (multiple_of_p) <case BIT_AND_EXPR>: Don't fall through
25878 into MULT_EXPR.
25879 <case MULT_EXPR>: Improve the case when bottom and one of the
25880 MULT_EXPR operands are INTEGER_CSTs and bottom is multiple of that
25881 operand, in that case check if the other operand is multiple of
25882 bottom divided by the INTEGER_CST operand.
25883
25884 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
25885
25886 PR target/83858
25887 * config/pa/pa.h (FUNCTION_ARG_SIZE): Delete.
25888 * config/pa/pa-protos.h (pa_function_arg_size): Declare.
25889 * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Use
25890 pa_function_arg_size instead of FUNCTION_ARG_SIZE.
25891 * config/pa/pa.c (pa_function_arg_advance): Likewise.
25892 (pa_function_arg, pa_arg_partial_bytes): Likewise.
25893 (pa_function_arg_size): New function.
25894
25895 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
25896
25897 * fold-const.c (fold_ternary_loc): Construct the vec_perm_indices
25898 in a separate statement.
25899
25900 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
25901
25902 PR tree-optimization/83847
25903 * tree-vect-data-refs.c (vect_analyze_data_ref_accesses): Don't
25904 group gathers and scatters.
25905
25906 2018-01-16 Jakub Jelinek <jakub@redhat.com>
25907
25908 PR rtl-optimization/86620
25909 * params.def (max-sched-ready-insns): Bump minimum value to 1.
25910
25911 PR rtl-optimization/83213
25912 * recog.c (peep2_attempt): Copy over CROSSING_JUMP_P from peepinsn
25913 to last if both are JUMP_INSNs.
25914
25915 PR tree-optimization/83843
25916 * gimple-ssa-store-merging.c
25917 (imm_store_chain_info::output_merged_store): Handle bit_not_p on
25918 store_immediate_info for bswap/nop orig_stores.
25919
25920 2018-01-15 Andrew Waterman <andrew@sifive.com>
25921
25922 * config/riscv/riscv.c (riscv_rtx_costs) <MULT>: Increase cost if
25923 !TARGET_MUL.
25924 <UDIV>: Increase cost if !TARGET_DIV.
25925
25926 2018-01-15 Segher Boessenkool <segher@kernel.crashing.org>
25927
25928 * config/rs6000/rs6000.md (define_attr "type"): Remove delayed_cr.
25929 (define_attr "cr_logical_3op"): New.
25930 (cceq_ior_compare): Adjust.
25931 (cceq_ior_compare_complement): Adjust.
25932 (*cceq_rev_compare): Adjust.
25933 * config/rs6000/rs6000.c (rs6000_adjust_cost): Adjust.
25934 (is_cracked_insn): Adjust.
25935 (insn_must_be_first_in_group): Adjust.
25936 * config/rs6000/40x.md: Adjust.
25937 * config/rs6000/440.md: Adjust.
25938 * config/rs6000/476.md: Adjust.
25939 * config/rs6000/601.md: Adjust.
25940 * config/rs6000/603.md: Adjust.
25941 * config/rs6000/6xx.md: Adjust.
25942 * config/rs6000/7450.md: Adjust.
25943 * config/rs6000/7xx.md: Adjust.
25944 * config/rs6000/8540.md: Adjust.
25945 * config/rs6000/cell.md: Adjust.
25946 * config/rs6000/e300c2c3.md: Adjust.
25947 * config/rs6000/e500mc.md: Adjust.
25948 * config/rs6000/e500mc64.md: Adjust.
25949 * config/rs6000/e5500.md: Adjust.
25950 * config/rs6000/e6500.md: Adjust.
25951 * config/rs6000/mpc.md: Adjust.
25952 * config/rs6000/power4.md: Adjust.
25953 * config/rs6000/power5.md: Adjust.
25954 * config/rs6000/power6.md: Adjust.
25955 * config/rs6000/power7.md: Adjust.
25956 * config/rs6000/power8.md: Adjust.
25957 * config/rs6000/power9.md: Adjust.
25958 * config/rs6000/rs64.md: Adjust.
25959 * config/rs6000/titan.md: Adjust.
25960
25961 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
25962
25963 * config/i386/predicates.md (indirect_branch_operand): Rewrite
25964 ix86_indirect_branch_register logic.
25965
25966 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
25967
25968 * config/i386/constraints.md (Bs): Update
25969 ix86_indirect_branch_register check. Don't check
25970 ix86_indirect_branch_register with GOT_memory_operand.
25971 (Bw): Likewise.
25972 * config/i386/predicates.md (GOT_memory_operand): Don't check
25973 ix86_indirect_branch_register here.
25974 (GOT32_symbol_operand): Likewise.
25975
25976 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
25977
25978 * config/i386/predicates.md (constant_call_address_operand):
25979 Rewrite ix86_indirect_branch_register logic.
25980 (sibcall_insn_operand): Likewise.
25981
25982 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
25983
25984 * config/i386/constraints.md (Bs): Replace
25985 ix86_indirect_branch_thunk_register with
25986 ix86_indirect_branch_register.
25987 (Bw): Likewise.
25988 * config/i386/i386.md (indirect_jump): Likewise.
25989 (tablejump): Likewise.
25990 (*sibcall_memory): Likewise.
25991 (*sibcall_value_memory): Likewise.
25992 Peepholes of indirect call and jump via memory: Likewise.
25993 * config/i386/i386.opt: Likewise.
25994 * config/i386/predicates.md (indirect_branch_operand): Likewise.
25995 (GOT_memory_operand): Likewise.
25996 (call_insn_operand): Likewise.
25997 (sibcall_insn_operand): Likewise.
25998 (GOT32_symbol_operand): Likewise.
25999
26000 2018-01-15 Jakub Jelinek <jakub@redhat.com>
26001
26002 PR middle-end/83837
26003 * omp-expand.c (expand_omp_atomic_pipeline): Use loaded_val
26004 type rather than type addr's type points to.
26005 (expand_omp_atomic_mutex): Likewise.
26006 (expand_omp_atomic): Likewise.
26007
26008 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
26009
26010 PR target/83839
26011 * config/i386/i386.c (output_indirect_thunk_function): Use
26012 ASM_OUTPUT_LABEL, instead of ASM_OUTPUT_DEF, for TARGET_MACHO
26013 for __x86_return_thunk.
26014
26015 2018-01-15 Richard Biener <rguenther@suse.de>
26016
26017 PR middle-end/83850
26018 * expmed.c (extract_bit_field_1): Fix typo.
26019
26020 2018-01-15 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
26021
26022 PR target/83687
26023 * config/arm/iterators.md (VF): New mode iterator.
26024 * config/arm/neon.md (neon_vabd<mode>_2): Use the above.
26025 Remove integer-related logic from pattern.
26026 (neon_vabd<mode>_3): Likewise.
26027
26028 2018-01-15 Jakub Jelinek <jakub@redhat.com>
26029
26030 PR middle-end/82694
26031 * common.opt (fstrict-overflow): No longer an alias.
26032 (fwrapv-pointer): New option.
26033 * tree.h (TYPE_OVERFLOW_WRAPS, TYPE_OVERFLOW_UNDEFINED): Define
26034 also for pointer types based on flag_wrapv_pointer.
26035 * opts.c (common_handle_option) <case OPT_fstrict_overflow>: Set
26036 opts->x_flag_wrap[pv] to !value, clear opts->x_flag_trapv if
26037 opts->x_flag_wrapv got set.
26038 * fold-const.c (fold_comparison, fold_binary_loc): Revert 2017-08-01
26039 changes, just use TYPE_OVERFLOW_UNDEFINED on pointer type instead of
26040 POINTER_TYPE_OVERFLOW_UNDEFINED.
26041 * match.pd: Likewise in address comparison pattern.
26042 * doc/invoke.texi: Document -fwrapv and -fstrict-overflow.
26043
26044 2018-01-15 Richard Biener <rguenther@suse.de>
26045
26046 PR lto/83804
26047 * tree.c (free_lang_data_in_type): Always unlink TYPE_DECLs
26048 from TYPE_FIELDS. Free TYPE_BINFO if not used by devirtualization.
26049 Reset type names to their identifier if their TYPE_DECL doesn't
26050 have linkage (and thus is used for ODR and devirt).
26051 (save_debug_info_for_decl): Remove.
26052 (save_debug_info_for_type): Likewise.
26053 (add_tree_to_fld_list): Adjust.
26054 * tree-pretty-print.c (dump_generic_node): Make dumping of
26055 type names more robust.
26056
26057 2018-01-15 Richard Biener <rguenther@suse.de>
26058
26059 * BASE-VER: Bump to 8.0.1.
26060
26061 2018-01-14 Martin Sebor <msebor@redhat.com>
26062
26063 PR other/83508
26064 * builtins.c (check_access): Avoid warning when the no-warning bit
26065 is set.
26066
26067 2018-01-14 Cory Fields <cory-nospam-@coryfields.com>
26068
26069 * tree-ssa-loop-im.c (sort_bbs_in_loop_postorder_cmp): Stabilize sort.
26070 * ira-color (allocno_hard_regs_compare): Likewise.
26071
26072 2018-01-14 Nathan Rossi <nathan@nathanrossi.com>
26073
26074 PR target/83013
26075 * config/microblaze/microblaze.c (microblaze_asm_output_ident):
26076 Use .pushsection/.popsection.
26077
26078 2018-01-14 Martin Sebor <msebor@redhat.com>
26079
26080 PR c++/81327
26081 * doc/invoke.texi (-Wlass-memaccess): Document suppression by casting.
26082
26083 2018-01-14 Jakub Jelinek <jakub@redhat.com>
26084
26085 * config.gcc (i[34567]86-*-*): Remove one duplicate gfniintrin.h
26086 entry from extra_headers.
26087 (x86_64-*-*): Remove two duplicate gfniintrin.h entries from
26088 extra_headers, make the list bitwise identical to the i?86-*-* one.
26089
26090 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
26091
26092 * config/i386/i386.c (ix86_set_indirect_branch_type): Disallow
26093 -mcmodel=large with -mindirect-branch=thunk,
26094 -mindirect-branch=thunk-extern, -mfunction-return=thunk and
26095 -mfunction-return=thunk-extern.
26096 * doc/invoke.texi: Document -mcmodel=large is incompatible with
26097 -mindirect-branch=thunk, -mindirect-branch=thunk-extern,
26098 -mfunction-return=thunk and -mfunction-return=thunk-extern.
26099
26100 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
26101
26102 * config/i386/i386.c (print_reg): Print the name of the full
26103 integer register without '%'.
26104 (ix86_print_operand): Handle 'V'.
26105 * doc/extend.texi: Document 'V' modifier.
26106
26107 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
26108
26109 * config/i386/constraints.md (Bs): Disallow memory operand for
26110 -mindirect-branch-register.
26111 (Bw): Likewise.
26112 * config/i386/predicates.md (indirect_branch_operand): Likewise.
26113 (GOT_memory_operand): Likewise.
26114 (call_insn_operand): Likewise.
26115 (sibcall_insn_operand): Likewise.
26116 (GOT32_symbol_operand): Likewise.
26117 * config/i386/i386.md (indirect_jump): Call convert_memory_address
26118 for -mindirect-branch-register.
26119 (tablejump): Likewise.
26120 (*sibcall_memory): Likewise.
26121 (*sibcall_value_memory): Likewise.
26122 Disallow peepholes of indirect call and jump via memory for
26123 -mindirect-branch-register.
26124 (*call_pop): Replace m with Bw.
26125 (*call_value_pop): Likewise.
26126 (*sibcall_pop_memory): Replace m with Bs.
26127 * config/i386/i386.opt (mindirect-branch-register): New option.
26128 * doc/invoke.texi: Document -mindirect-branch-register option.
26129
26130 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
26131
26132 * config/i386/i386-protos.h (ix86_output_function_return): New.
26133 * config/i386/i386.c (ix86_set_indirect_branch_type): Also
26134 set function_return_type.
26135 (indirect_thunk_name): Add ret_p to indicate thunk for function
26136 return.
26137 (output_indirect_thunk_function): Pass false to
26138 indirect_thunk_name.
26139 (ix86_output_indirect_branch_via_reg): Likewise.
26140 (ix86_output_indirect_branch_via_push): Likewise.
26141 (output_indirect_thunk_function): Create alias for function
26142 return thunk if regno < 0.
26143 (ix86_output_function_return): New function.
26144 (ix86_handle_fndecl_attribute): Handle function_return.
26145 (ix86_attribute_table): Add function_return.
26146 * config/i386/i386.h (machine_function): Add
26147 function_return_type.
26148 * config/i386/i386.md (simple_return_internal): Use
26149 ix86_output_function_return.
26150 (simple_return_internal_long): Likewise.
26151 * config/i386/i386.opt (mfunction-return=): New option.
26152 (indirect_branch): Mention -mfunction-return=.
26153 * doc/extend.texi: Document function_return function attribute.
26154 * doc/invoke.texi: Document -mfunction-return= option.
26155
26156 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
26157
26158 * config/i386/i386-opts.h (indirect_branch): New.
26159 * config/i386/i386-protos.h (ix86_output_indirect_jmp): Likewise.
26160 * config/i386/i386.c (ix86_using_red_zone): Disallow red-zone
26161 with local indirect jump when converting indirect call and jump.
26162 (ix86_set_indirect_branch_type): New.
26163 (ix86_set_current_function): Call ix86_set_indirect_branch_type.
26164 (indirectlabelno): New.
26165 (indirect_thunk_needed): Likewise.
26166 (indirect_thunk_bnd_needed): Likewise.
26167 (indirect_thunks_used): Likewise.
26168 (indirect_thunks_bnd_used): Likewise.
26169 (INDIRECT_LABEL): Likewise.
26170 (indirect_thunk_name): Likewise.
26171 (output_indirect_thunk): Likewise.
26172 (output_indirect_thunk_function): Likewise.
26173 (ix86_output_indirect_branch_via_reg): Likewise.
26174 (ix86_output_indirect_branch_via_push): Likewise.
26175 (ix86_output_indirect_branch): Likewise.
26176 (ix86_output_indirect_jmp): Likewise.
26177 (ix86_code_end): Call output_indirect_thunk_function if needed.
26178 (ix86_output_call_insn): Call ix86_output_indirect_branch if
26179 needed.
26180 (ix86_handle_fndecl_attribute): Handle indirect_branch.
26181 (ix86_attribute_table): Add indirect_branch.
26182 * config/i386/i386.h (machine_function): Add indirect_branch_type
26183 and has_local_indirect_jump.
26184 * config/i386/i386.md (indirect_jump): Set has_local_indirect_jump
26185 to true.
26186 (tablejump): Likewise.
26187 (*indirect_jump): Use ix86_output_indirect_jmp.
26188 (*tablejump_1): Likewise.
26189 (simple_return_indirect_internal): Likewise.
26190 * config/i386/i386.opt (mindirect-branch=): New option.
26191 (indirect_branch): New.
26192 (keep): Likewise.
26193 (thunk): Likewise.
26194 (thunk-inline): Likewise.
26195 (thunk-extern): Likewise.
26196 * doc/extend.texi: Document indirect_branch function attribute.
26197 * doc/invoke.texi: Document -mindirect-branch= option.
26198
26199 2018-01-14 Jan Hubicka <hubicka@ucw.cz>
26200
26201 PR ipa/83051
26202 * ipa-inline.c (edge_badness): Tolerate roundoff errors.
26203
26204 2018-01-14 Richard Sandiford <richard.sandiford@linaro.org>
26205
26206 * ipa-inline.c (want_inline_small_function_p): Return false if
26207 inlining has already failed with CIF_FINAL_ERROR.
26208 (update_caller_keys): Call want_inline_small_function_p before
26209 can_inline_edge_p.
26210 (update_callee_keys): Likewise.
26211
26212 2018-01-10 Kelvin Nilsen <kelvin@gcc.gnu.org>
26213
26214 * config/rs6000/rs6000-p8swap.c (rs6000_sum_of_two_registers_p):
26215 New function.
26216 (rs6000_quadword_masked_address_p): Likewise.
26217 (quad_aligned_load_p): Likewise.
26218 (quad_aligned_store_p): Likewise.
26219 (const_load_sequence_p): Add comment to describe the outer-most loop.
26220 (mimic_memory_attributes_and_flags): New function.
26221 (rs6000_gen_stvx): Likewise.
26222 (replace_swapped_aligned_store): Likewise.
26223 (rs6000_gen_lvx): Likewise.
26224 (replace_swapped_aligned_load): Likewise.
26225 (replace_swapped_load_constant): Capitalize argument name in
26226 comment describing this function.
26227 (rs6000_analyze_swaps): Add a third pass to search for vector loads
26228 and stores that access quad-word aligned addresses and replace
26229 with stvx or lvx instructions when appropriate.
26230 * config/rs6000/rs6000-protos.h (rs6000_sum_of_two_registers_p):
26231 New function prototype.
26232 (rs6000_quadword_masked_address_p): Likewise.
26233 (rs6000_gen_lvx): Likewise.
26234 (rs6000_gen_stvx): Likewise.
26235 * config/rs6000/vsx.md (*vsx_le_perm_load_<mode>): For modes
26236 VSX_D (V2DF, V2DI), modify this split to select lvx instruction
26237 when memory address is aligned.
26238 (*vsx_le_perm_load_<mode>): For modes VSX_W (V4SF, V4SI), modify
26239 this split to select lvx instruction when memory address is aligned.
26240 (*vsx_le_perm_load_v8hi): Modify this split to select lvx
26241 instruction when memory address is aligned.
26242 (*vsx_le_perm_load_v16qi): Likewise.
26243 (four unnamed splitters): Modify to select the stvx instruction
26244 when memory is aligned.
26245
26246 2018-01-13 Jan Hubicka <hubicka@ucw.cz>
26247
26248 * predict.c (determine_unlikely_bbs): Handle correctly BBs
26249 which appears in the queue multiple times.
26250
26251 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26252 Alan Hayward <alan.hayward@arm.com>
26253 David Sherwood <david.sherwood@arm.com>
26254
26255 * tree-vectorizer.h (vec_lower_bound): New structure.
26256 (_loop_vec_info): Add check_nonzero and lower_bounds.
26257 (LOOP_VINFO_CHECK_NONZERO): New macro.
26258 (LOOP_VINFO_LOWER_BOUNDS): Likewise.
26259 (LOOP_REQUIRES_VERSIONING_FOR_ALIAS): Check lower_bounds too.
26260 * tree-data-ref.h (dr_with_seg_len): Add access_size and align
26261 fields. Make seg_len the distance travelled, not including the
26262 access size.
26263 (dr_direction_indicator): Declare.
26264 (dr_zero_step_indicator): Likewise.
26265 (dr_known_forward_stride_p): Likewise.
26266 * tree-data-ref.c: Include stringpool.h, tree-vrp.h and
26267 tree-ssanames.h.
26268 (runtime_alias_check_p): Allow runtime alias checks with
26269 variable strides.
26270 (operator ==): Compare access_size and align.
26271 (prune_runtime_alias_test_list): Rework for new distinction between
26272 the access_size and seg_len.
26273 (create_intersect_range_checks_index): Likewise. Cope with polynomial
26274 segment lengths.
26275 (get_segment_min_max): New function.
26276 (create_intersect_range_checks): Use it.
26277 (dr_step_indicator): New function.
26278 (dr_direction_indicator): Likewise.
26279 (dr_zero_step_indicator): Likewise.
26280 (dr_known_forward_stride_p): Likewise.
26281 * tree-loop-distribution.c (data_ref_segment_size): Return
26282 DR_STEP * (niters - 1).
26283 (compute_alias_check_pairs): Update call to the dr_with_seg_len
26284 constructor.
26285 * tree-vect-data-refs.c (vect_check_nonzero_value): New function.
26286 (vect_preserves_scalar_order_p): New function, split out from...
26287 (vect_analyze_data_ref_dependence): ...here. Check for zero steps.
26288 (vect_vfa_segment_size): Return DR_STEP * (length_factor - 1).
26289 (vect_vfa_access_size): New function.
26290 (vect_vfa_align): Likewise.
26291 (vect_compile_time_alias): Take access_size_a and access_b arguments.
26292 (dump_lower_bound): New function.
26293 (vect_check_lower_bound): Likewise.
26294 (vect_small_gap_p): Likewise.
26295 (vectorizable_with_step_bound_p): Likewise.
26296 (vect_prune_runtime_alias_test_list): Ignore cross-iteration
26297 depencies if the vectorization factor is 1. Convert the checks
26298 for nonzero steps into checks on the bounds of DR_STEP. Try using
26299 a bunds check for variable steps if the minimum required step is
26300 relatively small. Update calls to the dr_with_seg_len
26301 constructor and to vect_compile_time_alias.
26302 * tree-vect-loop-manip.c (vect_create_cond_for_lower_bounds): New
26303 function.
26304 (vect_loop_versioning): Call it.
26305 * tree-vect-loop.c (vect_analyze_loop_2): Clear LOOP_VINFO_LOWER_BOUNDS
26306 when retrying.
26307 (vect_estimate_min_profitable_iters): Account for any bounds checks.
26308
26309 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26310 Alan Hayward <alan.hayward@arm.com>
26311 David Sherwood <david.sherwood@arm.com>
26312
26313 * doc/sourcebuild.texi (vect_scatter_store): Document.
26314 * optabs.def (scatter_store_optab, mask_scatter_store_optab): New
26315 optabs.
26316 * doc/md.texi (scatter_store@var{m}, mask_scatter_store@var{m}):
26317 Document.
26318 * genopinit.c (main): Add supports_vec_scatter_store and
26319 supports_vec_scatter_store_cached to target_optabs.
26320 * gimple.h (gimple_expr_type): Handle IFN_SCATTER_STORE and
26321 IFN_MASK_SCATTER_STORE.
26322 * internal-fn.def (SCATTER_STORE, MASK_SCATTER_STORE): New internal
26323 functions.
26324 * internal-fn.h (internal_store_fn_p): Declare.
26325 (internal_fn_stored_value_index): Likewise.
26326 * internal-fn.c (scatter_store_direct): New macro.
26327 (expand_scatter_store_optab_fn): New function.
26328 (direct_scatter_store_optab_supported_p): New macro.
26329 (internal_store_fn_p): New function.
26330 (internal_gather_scatter_fn_p): Handle IFN_SCATTER_STORE and
26331 IFN_MASK_SCATTER_STORE.
26332 (internal_fn_mask_index): Likewise.
26333 (internal_fn_stored_value_index): New function.
26334 (internal_gather_scatter_fn_supported_p): Adjust operand numbers
26335 for scatter stores.
26336 * optabs-query.h (supports_vec_scatter_store_p): Declare.
26337 * optabs-query.c (supports_vec_scatter_store_p): New function.
26338 * tree-vectorizer.h (vect_get_store_rhs): Declare.
26339 * tree-vect-data-refs.c (vect_analyze_data_ref_access): Return
26340 true for scatter stores.
26341 (vect_gather_scatter_fn_p): Handle scatter stores too.
26342 (vect_check_gather_scatter): Consider using scatter stores if
26343 supports_vec_scatter_store_p.
26344 * tree-vect-patterns.c (vect_try_gather_scatter_pattern): Handle
26345 scatter stores too.
26346 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
26347 internal_fn_stored_value_index.
26348 (check_load_store_masking): Handle scatter stores too.
26349 (vect_get_store_rhs): Make public.
26350 (vectorizable_call): Use internal_store_fn_p.
26351 (vectorizable_store): Handle scatter store internal functions.
26352 (vect_transform_stmt): Compare GROUP_STORE_COUNT with GROUP_SIZE
26353 when deciding whether the end of the group has been reached.
26354 * config/aarch64/aarch64.md (UNSPEC_ST1_SCATTER): New unspec.
26355 * config/aarch64/aarch64-sve.md (scatter_store<mode>): New expander.
26356 (mask_scatter_store<mode>): New insns.
26357
26358 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26359 Alan Hayward <alan.hayward@arm.com>
26360 David Sherwood <david.sherwood@arm.com>
26361
26362 * tree-vectorizer.h (vect_gather_scatter_fn_p): Declare.
26363 * tree-vect-data-refs.c (vect_gather_scatter_fn_p): Make public.
26364 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): New
26365 function.
26366 (vect_use_strided_gather_scatters_p): Take a masked_p argument.
26367 Use vect_truncate_gather_scatter_offset if we can't treat the
26368 operation as a normal gather load or scatter store.
26369 (get_group_load_store_type): Take the gather_scatter_info
26370 as argument. Try using a gather load or scatter store for
26371 single-element groups.
26372 (get_load_store_type): Update calls to get_group_load_store_type
26373 and vect_use_strided_gather_scatters_p.
26374
26375 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26376 Alan Hayward <alan.hayward@arm.com>
26377 David Sherwood <david.sherwood@arm.com>
26378
26379 * tree-vectorizer.h (vect_create_data_ref_ptr): Take an extra
26380 optional tree argument.
26381 * tree-vect-data-refs.c (vect_check_gather_scatter): Check for
26382 null target hooks.
26383 (vect_create_data_ref_ptr): Take the iv_step as an optional argument,
26384 but continue to use the current value as a fallback.
26385 (bump_vector_ptr): Use operand_equal_p rather than tree_int_cst_compare
26386 to compare the updates.
26387 * tree-vect-stmts.c (vect_use_strided_gather_scatters_p): New function.
26388 (get_load_store_type): Use it when handling a strided access.
26389 (vect_get_strided_load_store_ops): New function.
26390 (vect_get_data_ptr_increment): Likewise.
26391 (vectorizable_load): Handle strided gather loads. Always pass
26392 a step to vect_create_data_ref_ptr and bump_vector_ptr.
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 (gather_load@var{m}): Document.
26399 (mask_gather_load@var{m}): Likewise.
26400 * genopinit.c (main): Add supports_vec_gather_load and
26401 supports_vec_gather_load_cached to target_optabs.
26402 * optabs-tree.c (init_tree_optimization_optabs): Use
26403 ggc_cleared_alloc to allocate target_optabs.
26404 * optabs.def (gather_load_optab, mask_gather_laod_optab): New optabs.
26405 * internal-fn.def (GATHER_LOAD, MASK_GATHER_LOAD): New internal
26406 functions.
26407 * internal-fn.h (internal_load_fn_p): Declare.
26408 (internal_gather_scatter_fn_p): Likewise.
26409 (internal_fn_mask_index): Likewise.
26410 (internal_gather_scatter_fn_supported_p): Likewise.
26411 * internal-fn.c (gather_load_direct): New macro.
26412 (expand_gather_load_optab_fn): New function.
26413 (direct_gather_load_optab_supported_p): New macro.
26414 (direct_internal_fn_optab): New function.
26415 (internal_load_fn_p): Likewise.
26416 (internal_gather_scatter_fn_p): Likewise.
26417 (internal_fn_mask_index): Likewise.
26418 (internal_gather_scatter_fn_supported_p): Likewise.
26419 * optabs-query.c (supports_at_least_one_mode_p): New function.
26420 (supports_vec_gather_load_p): Likewise.
26421 * optabs-query.h (supports_vec_gather_load_p): Declare.
26422 * tree-vectorizer.h (gather_scatter_info): Add ifn, element_type
26423 and memory_type field.
26424 (NUM_PATTERNS): Bump to 15.
26425 * tree-vect-data-refs.c: Include internal-fn.h.
26426 (vect_gather_scatter_fn_p): New function.
26427 (vect_describe_gather_scatter_call): Likewise.
26428 (vect_check_gather_scatter): Try using internal functions for
26429 gather loads. Recognize existing calls to a gather load function.
26430 (vect_analyze_data_refs): Consider using gather loads if
26431 supports_vec_gather_load_p.
26432 * tree-vect-patterns.c (vect_get_load_store_mask): New function.
26433 (vect_get_gather_scatter_offset_type): Likewise.
26434 (vect_convert_mask_for_vectype): Likewise.
26435 (vect_add_conversion_to_patterm): Likewise.
26436 (vect_try_gather_scatter_pattern): Likewise.
26437 (vect_recog_gather_scatter_pattern): New pattern recognizer.
26438 (vect_vect_recog_func_ptrs): Add it.
26439 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
26440 internal_fn_mask_index and internal_gather_scatter_fn_p.
26441 (check_load_store_masking): Take the gather_scatter_info as an
26442 argument and handle gather loads.
26443 (vect_get_gather_scatter_ops): New function.
26444 (vectorizable_call): Check internal_load_fn_p.
26445 (vectorizable_load): Likewise. Handle gather load internal
26446 functions.
26447 (vectorizable_store): Update call to check_load_store_masking.
26448 * config/aarch64/aarch64.md (UNSPEC_LD1_GATHER): New unspec.
26449 * config/aarch64/iterators.md (SVE_S, SVE_D): New mode iterators.
26450 * config/aarch64/predicates.md (aarch64_gather_scale_operand_w)
26451 (aarch64_gather_scale_operand_d): New predicates.
26452 * config/aarch64/aarch64-sve.md (gather_load<mode>): New expander.
26453 (mask_gather_load<mode>): New insns.
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 * optabs.def (fold_left_plus_optab): New optab.
26460 * doc/md.texi (fold_left_plus_@var{m}): Document.
26461 * internal-fn.def (IFN_FOLD_LEFT_PLUS): New internal function.
26462 * internal-fn.c (fold_left_direct): Define.
26463 (expand_fold_left_optab_fn): Likewise.
26464 (direct_fold_left_optab_supported_p): Likewise.
26465 * fold-const-call.c (fold_const_fold_left): New function.
26466 (fold_const_call): Use it to fold CFN_FOLD_LEFT_PLUS.
26467 * tree-parloops.c (valid_reduction_p): New function.
26468 (gather_scalar_reductions): Use it.
26469 * tree-vectorizer.h (FOLD_LEFT_REDUCTION): New vect_reduction_type.
26470 (vect_finish_replace_stmt): Declare.
26471 * tree-vect-loop.c (fold_left_reduction_fn): New function.
26472 (needs_fold_left_reduction_p): New function, split out from...
26473 (vect_is_simple_reduction): ...here. Accept reductions that
26474 forbid reassociation, but give them type FOLD_LEFT_REDUCTION.
26475 (vect_force_simple_reduction): Also store the reduction type in
26476 the assignment's STMT_VINFO_REDUC_TYPE.
26477 (vect_model_reduction_cost): Handle FOLD_LEFT_REDUCTION.
26478 (merge_with_identity): New function.
26479 (vect_expand_fold_left): Likewise.
26480 (vectorize_fold_left_reduction): Likewise.
26481 (vectorizable_reduction): Handle FOLD_LEFT_REDUCTION. Leave the
26482 scalar phi in place for it. Check for target support and reject
26483 cases that would reassociate the operation. Defer the transform
26484 phase to vectorize_fold_left_reduction.
26485 * config/aarch64/aarch64.md (UNSPEC_FADDA): New unspec.
26486 * config/aarch64/aarch64-sve.md (fold_left_plus_<mode>): New expander.
26487 (*fold_left_plus_<mode>, *pred_fold_left_plus_<mode>): New insns.
26488
26489 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26490
26491 * tree-if-conv.c (predicate_mem_writes): Remove redundant
26492 call to ifc_temp_var.
26493
26494 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26495 Alan Hayward <alan.hayward@arm.com>
26496 David Sherwood <david.sherwood@arm.com>
26497
26498 * target.def (legitimize_address_displacement): Take the original
26499 offset as a poly_int.
26500 * targhooks.h (default_legitimize_address_displacement): Update
26501 accordingly.
26502 * targhooks.c (default_legitimize_address_displacement): Likewise.
26503 * doc/tm.texi: Regenerate.
26504 * lra-constraints.c (base_plus_disp_to_reg): Take the displacement
26505 as an argument, moving assert of ad->disp == ad->disp_term to...
26506 (process_address_1): ...here. Update calls to base_plus_disp_to_reg.
26507 Try calling targetm.legitimize_address_displacement before expanding
26508 the address rather than afterwards, and adjust for the new interface.
26509 * config/aarch64/aarch64.c (aarch64_legitimize_address_displacement):
26510 Match the new hook interface. Handle SVE addresses.
26511 * config/sh/sh.c (sh_legitimize_address_displacement): Make the
26512 new hook interface.
26513
26514 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26515
26516 * Makefile.in (OBJS): Add early-remat.o.
26517 * target.def (select_early_remat_modes): New hook.
26518 * doc/tm.texi.in (TARGET_SELECT_EARLY_REMAT_MODES): New hook.
26519 * doc/tm.texi: Regenerate.
26520 * targhooks.h (default_select_early_remat_modes): Declare.
26521 * targhooks.c (default_select_early_remat_modes): New function.
26522 * timevar.def (TV_EARLY_REMAT): New timevar.
26523 * passes.def (pass_early_remat): New pass.
26524 * tree-pass.h (make_pass_early_remat): Declare.
26525 * early-remat.c: New file.
26526 * config/aarch64/aarch64.c (aarch64_select_early_remat_modes): New
26527 function.
26528 (TARGET_SELECT_EARLY_REMAT_MODES): Define.
26529
26530 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26531 Alan Hayward <alan.hayward@arm.com>
26532 David Sherwood <david.sherwood@arm.com>
26533
26534 * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Replace
26535 vfm1 with a bound_epilog parameter.
26536 (vect_do_peeling): Update calls accordingly, and move the prologue
26537 call earlier in the function. Treat the base bound_epilog as 0 for
26538 fully-masked loops and retain vf - 1 for other loops. Add 1 to
26539 this base when peeling for gaps.
26540 * tree-vect-loop.c (vect_analyze_loop_2): Allow peeling for gaps
26541 with fully-masked loops.
26542 (vect_estimate_min_profitable_iters): Handle the single peeled
26543 iteration in that case.
26544
26545 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26546 Alan Hayward <alan.hayward@arm.com>
26547 David Sherwood <david.sherwood@arm.com>
26548
26549 * tree-vect-data-refs.c (vect_analyze_group_access_1): Allow
26550 single-element interleaving even if the size is not a power of 2.
26551 * tree-vect-stmts.c (get_load_store_type): Disallow elementwise
26552 accesses for single-element interleaving if the group size is
26553 not a power of 2.
26554
26555 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26556 Alan Hayward <alan.hayward@arm.com>
26557 David Sherwood <david.sherwood@arm.com>
26558
26559 * doc/md.texi (fold_extract_last_@var{m}): Document.
26560 * doc/sourcebuild.texi (vect_fold_extract_last): Likewise.
26561 * optabs.def (fold_extract_last_optab): New optab.
26562 * internal-fn.def (FOLD_EXTRACT_LAST): New internal function.
26563 * internal-fn.c (fold_extract_direct): New macro.
26564 (expand_fold_extract_optab_fn): Likewise.
26565 (direct_fold_extract_optab_supported_p): Likewise.
26566 * tree-vectorizer.h (EXTRACT_LAST_REDUCTION): New vect_reduction_type.
26567 * tree-vect-loop.c (vect_model_reduction_cost): Handle
26568 EXTRACT_LAST_REDUCTION.
26569 (get_initial_def_for_reduction): Do not create an initial vector
26570 for EXTRACT_LAST_REDUCTION reductions.
26571 (vectorizable_reduction): Leave the scalar phi in place for
26572 EXTRACT_LAST_REDUCTIONs. Try using EXTRACT_LAST_REDUCTION
26573 ahead of INTEGER_INDUC_COND_REDUCTION. Do not check for an
26574 epilogue code for EXTRACT_LAST_REDUCTION and defer the
26575 transform phase to vectorizable_condition.
26576 * tree-vect-stmts.c (vect_finish_stmt_generation_1): New function,
26577 split out from...
26578 (vect_finish_stmt_generation): ...here.
26579 (vect_finish_replace_stmt): New function.
26580 (vectorizable_condition): Handle EXTRACT_LAST_REDUCTION.
26581 * config/aarch64/aarch64-sve.md (fold_extract_last_<mode>): New
26582 pattern.
26583 * config/aarch64/aarch64.md (UNSPEC_CLASTB): New unspec.
26584
26585 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26586 Alan Hayward <alan.hayward@arm.com>
26587 David Sherwood <david.sherwood@arm.com>
26588
26589 * doc/md.texi (extract_last_@var{m}): Document.
26590 * optabs.def (extract_last_optab): New optab.
26591 * internal-fn.def (EXTRACT_LAST): New internal function.
26592 * internal-fn.c (cond_unary_direct): New macro.
26593 (expand_cond_unary_optab_fn): Likewise.
26594 (direct_cond_unary_optab_supported_p): Likewise.
26595 * tree-vect-loop.c (vectorizable_live_operation): Allow fully-masked
26596 loops using EXTRACT_LAST.
26597 * config/aarch64/aarch64-sve.md (aarch64_sve_lastb<mode>): Rename to...
26598 (extract_last_<mode>): ...this optab.
26599 (vec_extract<mode><Vel>): Update accordingly.
26600
26601 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26602 Alan Hayward <alan.hayward@arm.com>
26603 David Sherwood <david.sherwood@arm.com>
26604
26605 * target.def (empty_mask_is_expensive): New hook.
26606 * doc/tm.texi.in (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): New hook.
26607 * doc/tm.texi: Regenerate.
26608 * targhooks.h (default_empty_mask_is_expensive): Declare.
26609 * targhooks.c (default_empty_mask_is_expensive): New function.
26610 * tree-vectorizer.c (vectorize_loops): Only call optimize_mask_stores
26611 if the target says that empty masks are expensive.
26612 * config/aarch64/aarch64.c (aarch64_empty_mask_is_expensive):
26613 New function.
26614 (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): Redefine.
26615
26616 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26617 Alan Hayward <alan.hayward@arm.com>
26618 David Sherwood <david.sherwood@arm.com>
26619
26620 * tree-vectorizer.h (_loop_vec_info::mask_skip_niters): New field.
26621 (LOOP_VINFO_MASK_SKIP_NITERS): New macro.
26622 (vect_use_loop_mask_for_alignment_p): New function.
26623 (vect_prepare_for_masked_peels, vect_gen_while_not): Declare.
26624 * tree-vect-loop-manip.c (vect_set_loop_masks_directly): Add an
26625 niters_skip argument. Make sure that the first niters_skip elements
26626 of the first iteration are inactive.
26627 (vect_set_loop_condition_masked): Handle LOOP_VINFO_MASK_SKIP_NITERS.
26628 Update call to vect_set_loop_masks_directly.
26629 (get_misalign_in_elems): New function, split out from...
26630 (vect_gen_prolog_loop_niters): ...here.
26631 (vect_update_init_of_dr): Take a code argument that specifies whether
26632 the adjustment should be added or subtracted.
26633 (vect_update_init_of_drs): Likewise.
26634 (vect_prepare_for_masked_peels): New function.
26635 (vect_do_peeling): Skip prologue peeling if we're using a mask
26636 instead. Update call to vect_update_inits_of_drs.
26637 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
26638 mask_skip_niters.
26639 (vect_analyze_loop_2): Allow fully-masked loops with peeling for
26640 alignment. Do not include the number of peeled iterations in
26641 the minimum threshold in that case.
26642 (vectorizable_induction): Adjust the start value down by
26643 LOOP_VINFO_MASK_SKIP_NITERS iterations.
26644 (vect_transform_loop): Call vect_prepare_for_masked_peels.
26645 Take the number of skipped iterations into account when calculating
26646 the loop bounds.
26647 * tree-vect-stmts.c (vect_gen_while_not): New function.
26648
26649 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26650 Alan Hayward <alan.hayward@arm.com>
26651 David Sherwood <david.sherwood@arm.com>
26652
26653 * doc/sourcebuild.texi (vect_fully_masked): Document.
26654 * params.def (PARAM_MIN_VECT_LOOP_BOUND): Change minimum and
26655 default value to 0.
26656 * tree-vect-loop.c (vect_analyze_loop_costing): New function,
26657 split out from...
26658 (vect_analyze_loop_2): ...here. Don't check the vectorization
26659 factor against the number of loop iterations if the loop is
26660 fully-masked.
26661
26662 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26663 Alan Hayward <alan.hayward@arm.com>
26664 David Sherwood <david.sherwood@arm.com>
26665
26666 * tree-ssa-loop-ivopts.c (USE_ADDRESS): Split into...
26667 (USE_REF_ADDRESS, USE_PTR_ADDRESS): ...these new use types.
26668 (dump_groups): Update accordingly.
26669 (iv_use::mem_type): New member variable.
26670 (address_p): New function.
26671 (record_use): Add a mem_type argument and initialize the new
26672 mem_type field.
26673 (record_group_use): Add a mem_type argument. Use address_p.
26674 Remove obsolete null checks of base_object. Update call to record_use.
26675 (find_interesting_uses_op): Update call to record_group_use.
26676 (find_interesting_uses_cond): Likewise.
26677 (find_interesting_uses_address): Likewise.
26678 (get_mem_type_for_internal_fn): New function.
26679 (find_address_like_use): Likewise.
26680 (find_interesting_uses_stmt): Try find_address_like_use before
26681 calling find_interesting_uses_op.
26682 (addr_offset_valid_p): Use the iv mem_type field as the type
26683 of the addressed memory.
26684 (add_autoinc_candidates): Likewise.
26685 (get_address_cost): Likewise.
26686 (split_small_address_groups_p): Use address_p.
26687 (split_address_groups): Likewise.
26688 (add_iv_candidate_for_use): Likewise.
26689 (autoinc_possible_for_pair): Likewise.
26690 (rewrite_groups): Likewise.
26691 (get_use_type): Check for USE_REF_ADDRESS instead of USE_ADDRESS.
26692 (determine_group_iv_cost): Update after split of USE_ADDRESS.
26693 (get_alias_ptr_type_for_ptr_address): New function.
26694 (rewrite_use_address): Rewrite address uses in calls that were
26695 identified by find_address_like_use.
26696
26697 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26698 Alan Hayward <alan.hayward@arm.com>
26699 David Sherwood <david.sherwood@arm.com>
26700
26701 * expr.c (expand_expr_addr_expr_1): Handle ADDR_EXPRs of
26702 TARGET_MEM_REFs.
26703 * gimple-expr.h (is_gimple_addressable: Likewise.
26704 * gimple-expr.c (is_gimple_address): Likewise.
26705 * internal-fn.c (expand_call_mem_ref): New function.
26706 (expand_mask_load_optab_fn): Use it.
26707 (expand_mask_store_optab_fn): Likewise.
26708
26709 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26710 Alan Hayward <alan.hayward@arm.com>
26711 David Sherwood <david.sherwood@arm.com>
26712
26713 * doc/md.texi (cond_add@var{mode}, cond_sub@var{mode})
26714 (cond_and@var{mode}, cond_ior@var{mode}, cond_xor@var{mode})
26715 (cond_smin@var{mode}, cond_smax@var{mode}, cond_umin@var{mode})
26716 (cond_umax@var{mode}): Document.
26717 * optabs.def (cond_add_optab, cond_sub_optab, cond_and_optab)
26718 (cond_ior_optab, cond_xor_optab, cond_smin_optab, cond_smax_optab)
26719 (cond_umin_optab, cond_umax_optab): New optabs.
26720 * internal-fn.def (COND_ADD, COND_SUB, COND_MIN, COND_MAX, COND_AND)
26721 (COND_IOR, COND_XOR): New internal functions.
26722 * internal-fn.h (get_conditional_internal_fn): Declare.
26723 * internal-fn.c (cond_binary_direct): New macro.
26724 (expand_cond_binary_optab_fn): Likewise.
26725 (direct_cond_binary_optab_supported_p): Likewise.
26726 (get_conditional_internal_fn): New function.
26727 * tree-vect-loop.c (vectorizable_reduction): Handle fully-masked loops.
26728 Cope with reduction statements that are vectorized as calls rather
26729 than assignments.
26730 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New insns.
26731 * config/aarch64/iterators.md (UNSPEC_COND_ADD, UNSPEC_COND_SUB)
26732 (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX, UNSPEC_COND_SMIN)
26733 (UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
26734 (UNSPEC_COND_EOR): New unspecs.
26735 (optab): Add mappings for them.
26736 (SVE_COND_INT_OP, SVE_COND_FP_OP): New int iterators.
26737 (sve_int_op, sve_fp_op): New int attributes.
26738
26739 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26740 Alan Hayward <alan.hayward@arm.com>
26741 David Sherwood <david.sherwood@arm.com>
26742
26743 * optabs.def (while_ult_optab): New optab.
26744 * doc/md.texi (while_ult@var{m}@var{n}): Document.
26745 * internal-fn.def (WHILE_ULT): New internal function.
26746 * internal-fn.h (direct_internal_fn_supported_p): New override
26747 that takes two types as argument.
26748 * internal-fn.c (while_direct): New macro.
26749 (expand_while_optab_fn): New function.
26750 (convert_optab_supported_p): Likewise.
26751 (direct_while_optab_supported_p): New macro.
26752 * wide-int.h (wi::udiv_ceil): New function.
26753 * tree-vectorizer.h (rgroup_masks): New structure.
26754 (vec_loop_masks): New typedef.
26755 (_loop_vec_info): Add masks, mask_compare_type, can_fully_mask_p
26756 and fully_masked_p.
26757 (LOOP_VINFO_CAN_FULLY_MASK_P, LOOP_VINFO_FULLY_MASKED_P)
26758 (LOOP_VINFO_MASKS, LOOP_VINFO_MASK_COMPARE_TYPE): New macros.
26759 (vect_max_vf): New function.
26760 (slpeel_make_loop_iterate_ntimes): Delete.
26761 (vect_set_loop_condition, vect_get_loop_mask_type, vect_gen_while)
26762 (vect_halve_mask_nunits, vect_double_mask_nunits): Declare.
26763 (vect_record_loop_mask, vect_get_loop_mask): Likewise.
26764 * tree-vect-loop-manip.c: Include tree-ssa-loop-niter.h,
26765 internal-fn.h, stor-layout.h and optabs-query.h.
26766 (vect_set_loop_mask): New function.
26767 (add_preheader_seq): Likewise.
26768 (add_header_seq): Likewise.
26769 (interleave_supported_p): Likewise.
26770 (vect_maybe_permute_loop_masks): Likewise.
26771 (vect_set_loop_masks_directly): Likewise.
26772 (vect_set_loop_condition_masked): Likewise.
26773 (vect_set_loop_condition_unmasked): New function, split out from
26774 slpeel_make_loop_iterate_ntimes.
26775 (slpeel_make_loop_iterate_ntimes): Rename to..
26776 (vect_set_loop_condition): ...this. Use vect_set_loop_condition_masked
26777 for fully-masked loops and vect_set_loop_condition_unmasked otherwise.
26778 (vect_do_peeling): Update call accordingly.
26779 (vect_gen_vector_loop_niters): Use VF as the step for fully-masked
26780 loops.
26781 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
26782 mask_compare_type, can_fully_mask_p and fully_masked_p.
26783 (release_vec_loop_masks): New function.
26784 (_loop_vec_info): Use it to free the loop masks.
26785 (can_produce_all_loop_masks_p): New function.
26786 (vect_get_max_nscalars_per_iter): Likewise.
26787 (vect_verify_full_masking): Likewise.
26788 (vect_analyze_loop_2): Save LOOP_VINFO_CAN_FULLY_MASK_P around
26789 retries, and free the mask rgroups before retrying. Check loop-wide
26790 reasons for disallowing fully-masked loops. Make the final decision
26791 about whether use a fully-masked loop or not.
26792 (vect_estimate_min_profitable_iters): Do not assume that peeling
26793 for the number of iterations will be needed for fully-masked loops.
26794 (vectorizable_reduction): Disable fully-masked loops.
26795 (vectorizable_live_operation): Likewise.
26796 (vect_halve_mask_nunits): New function.
26797 (vect_double_mask_nunits): Likewise.
26798 (vect_record_loop_mask): Likewise.
26799 (vect_get_loop_mask): Likewise.
26800 (vect_transform_loop): Handle the case in which the final loop
26801 iteration might handle a partial vector. Call vect_set_loop_condition
26802 instead of slpeel_make_loop_iterate_ntimes.
26803 * tree-vect-stmts.c: Include tree-ssa-loop-niter.h and gimple-fold.h.
26804 (check_load_store_masking): New function.
26805 (prepare_load_store_mask): Likewise.
26806 (vectorizable_store): Handle fully-masked loops.
26807 (vectorizable_load): Likewise.
26808 (supportable_widening_operation): Use vect_halve_mask_nunits for
26809 booleans.
26810 (supportable_narrowing_operation): Likewise vect_double_mask_nunits.
26811 (vect_gen_while): New function.
26812 * config/aarch64/aarch64.md (umax<mode>3): New expander.
26813 (aarch64_uqdec<mode>): New insn.
26814
26815 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26816 Alan Hayward <alan.hayward@arm.com>
26817 David Sherwood <david.sherwood@arm.com>
26818
26819 * optabs.def (reduc_and_scal_optab, reduc_ior_scal_optab)
26820 (reduc_xor_scal_optab): New optabs.
26821 * doc/md.texi (reduc_and_scal_@var{m}, reduc_ior_scal_@var{m})
26822 (reduc_xor_scal_@var{m}): Document.
26823 * doc/sourcebuild.texi (vect_logical_reduc): Likewise.
26824 * internal-fn.def (IFN_REDUC_AND, IFN_REDUC_IOR, IFN_REDUC_XOR): New
26825 internal functions.
26826 * fold-const-call.c (fold_const_call): Handle them.
26827 * tree-vect-loop.c (reduction_fn_for_scalar_code): Return the new
26828 internal functions for BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR.
26829 * config/aarch64/aarch64-sve.md (reduc_<bit_reduc>_scal_<mode>):
26830 (*reduc_<bit_reduc>_scal_<mode>): New patterns.
26831 * config/aarch64/iterators.md (UNSPEC_ANDV, UNSPEC_ORV)
26832 (UNSPEC_XORV): New unspecs.
26833 (optab): Add entries for them.
26834 (BITWISEV): New int iterator.
26835 (bit_reduc_op): New int attributes.
26836
26837 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26838 Alan Hayward <alan.hayward@arm.com>
26839 David Sherwood <david.sherwood@arm.com>
26840
26841 * doc/md.texi (vec_shl_insert_@var{m}): New optab.
26842 * internal-fn.def (VEC_SHL_INSERT): New internal function.
26843 * optabs.def (vec_shl_insert_optab): New optab.
26844 * tree-vectorizer.h (can_duplicate_and_interleave_p): Declare.
26845 (duplicate_and_interleave): Likewise.
26846 * tree-vect-loop.c: Include internal-fn.h.
26847 (neutral_op_for_slp_reduction): New function, split out from
26848 get_initial_defs_for_reduction.
26849 (get_initial_def_for_reduction): Handle option 2 for variable-length
26850 vectors by loading the neutral value into a vector and then shifting
26851 the initial value into element 0.
26852 (get_initial_defs_for_reduction): Replace the code argument with
26853 the neutral value calculated by neutral_op_for_slp_reduction.
26854 Use gimple_build_vector for constant-length vectors.
26855 Use IFN_VEC_SHL_INSERT for variable-length vectors if all
26856 but the first group_size elements have a neutral value.
26857 Use duplicate_and_interleave otherwise.
26858 (vect_create_epilog_for_reduction): Take a neutral_op parameter.
26859 Update call to get_initial_defs_for_reduction. Handle SLP
26860 reductions for variable-length vectors by creating one vector
26861 result for each scalar result, with the elements associated
26862 with other scalar results stubbed out with the neutral value.
26863 (vectorizable_reduction): Call neutral_op_for_slp_reduction.
26864 Require IFN_VEC_SHL_INSERT for double reductions on
26865 variable-length vectors, or SLP reductions that have
26866 a neutral value. Require can_duplicate_and_interleave_p
26867 support for variable-length unchained SLP reductions if there
26868 is no neutral value, such as for MIN/MAX reductions. Also require
26869 the number of vector elements to be a multiple of the number of
26870 SLP statements when doing variable-length unchained SLP reductions.
26871 Update call to vect_create_epilog_for_reduction.
26872 * tree-vect-slp.c (can_duplicate_and_interleave_p): Make public
26873 and remove initial values.
26874 (duplicate_and_interleave): Make public.
26875 * config/aarch64/aarch64.md (UNSPEC_INSR): New unspec.
26876 * config/aarch64/aarch64-sve.md (vec_shl_insert_<mode>): New insn.
26877
26878 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26879 Alan Hayward <alan.hayward@arm.com>
26880 David Sherwood <david.sherwood@arm.com>
26881
26882 * tree-vect-slp.c: Include gimple-fold.h and internal-fn.h
26883 (can_duplicate_and_interleave_p): New function.
26884 (vect_get_and_check_slp_defs): Take the vector of statements
26885 rather than just the current one. Remove excess parentheses.
26886 Restriction rejectinon of vect_constant_def and vect_external_def
26887 for variable-length vectors to boolean types, or types for which
26888 can_duplicate_and_interleave_p is false.
26889 (vect_build_slp_tree_2): Update call to vect_get_and_check_slp_defs.
26890 (duplicate_and_interleave): New function.
26891 (vect_get_constant_vectors): Use gimple_build_vector for
26892 constant-length vectors and suitable variable-length constant
26893 vectors. Use duplicate_and_interleave for other variable-length
26894 vectors. Don't defer the update when inserting new statements.
26895
26896 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26897 Alan Hayward <alan.hayward@arm.com>
26898 David Sherwood <david.sherwood@arm.com>
26899
26900 * tree-vect-loop.c (vect_estimate_min_profitable_iters): Make sure
26901 min_profitable_iters doesn't go negative.
26902
26903 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26904 Alan Hayward <alan.hayward@arm.com>
26905 David Sherwood <david.sherwood@arm.com>
26906
26907 * doc/md.texi (vec_mask_load_lanes@var{m}@var{n}): Document.
26908 (vec_mask_store_lanes@var{m}@var{n}): Likewise.
26909 * optabs.def (vec_mask_load_lanes_optab): New optab.
26910 (vec_mask_store_lanes_optab): Likewise.
26911 * internal-fn.def (MASK_LOAD_LANES): New internal function.
26912 (MASK_STORE_LANES): Likewise.
26913 * internal-fn.c (mask_load_lanes_direct): New macro.
26914 (mask_store_lanes_direct): Likewise.
26915 (expand_mask_load_optab_fn): Handle masked operations.
26916 (expand_mask_load_lanes_optab_fn): New macro.
26917 (expand_mask_store_optab_fn): Handle masked operations.
26918 (expand_mask_store_lanes_optab_fn): New macro.
26919 (direct_mask_load_lanes_optab_supported_p): Likewise.
26920 (direct_mask_store_lanes_optab_supported_p): Likewise.
26921 * tree-vectorizer.h (vect_store_lanes_supported): Take a masked_p
26922 parameter.
26923 (vect_load_lanes_supported): Likewise.
26924 * tree-vect-data-refs.c (strip_conversion): New function.
26925 (can_group_stmts_p): Likewise.
26926 (vect_analyze_data_ref_accesses): Use it instead of checking
26927 for a pair of assignments.
26928 (vect_store_lanes_supported): Take a masked_p parameter.
26929 (vect_load_lanes_supported): Likewise.
26930 * tree-vect-loop.c (vect_analyze_loop_2): Update calls to
26931 vect_store_lanes_supported and vect_load_lanes_supported.
26932 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
26933 * tree-vect-stmts.c (get_group_load_store_type): Take a masked_p
26934 parameter. Don't allow gaps for masked accesses.
26935 Use vect_get_store_rhs. Update calls to vect_store_lanes_supported
26936 and vect_load_lanes_supported.
26937 (get_load_store_type): Take a masked_p parameter and update
26938 call to get_group_load_store_type.
26939 (vectorizable_store): Update call to get_load_store_type.
26940 Handle IFN_MASK_STORE_LANES.
26941 (vectorizable_load): Update call to get_load_store_type.
26942 Handle IFN_MASK_LOAD_LANES.
26943
26944 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26945 Alan Hayward <alan.hayward@arm.com>
26946 David Sherwood <david.sherwood@arm.com>
26947
26948 * config/aarch64/aarch64-modes.def: Define x2, x3 and x4 vector
26949 modes for SVE.
26950 * config/aarch64/aarch64-protos.h
26951 (aarch64_sve_struct_memory_operand_p): Declare.
26952 * config/aarch64/iterators.md (SVE_STRUCT): New mode iterator.
26953 (vector_count, insn_length, VSINGLE, vsingle): New mode attributes.
26954 (VPRED, vpred): Handle SVE structure modes.
26955 * config/aarch64/constraints.md (Utx): New constraint.
26956 * config/aarch64/predicates.md (aarch64_sve_struct_memory_operand)
26957 (aarch64_sve_struct_nonimmediate_operand): New predicates.
26958 * config/aarch64/aarch64.md (UNSPEC_LDN, UNSPEC_STN): New unspecs.
26959 * config/aarch64/aarch64-sve.md (mov<mode>, *aarch64_sve_mov<mode>_le)
26960 (*aarch64_sve_mov<mode>_be, pred_mov<mode>): New patterns for
26961 structure modes. Split into pieces after RA.
26962 (vec_load_lanes<mode><vsingle>, vec_mask_load_lanes<mode><vsingle>)
26963 (vec_store_lanes<mode><vsingle>, vec_mask_store_lanes<mode><vsingle>):
26964 New patterns.
26965 * config/aarch64/aarch64.c (aarch64_classify_vector_mode): Handle
26966 SVE structure modes.
26967 (aarch64_classify_address): Likewise.
26968 (sizetochar): Move earlier in file.
26969 (aarch64_print_operand): Handle SVE register lists.
26970 (aarch64_array_mode): New function.
26971 (aarch64_sve_struct_memory_operand_p): Likewise.
26972 (TARGET_ARRAY_MODE): Redefine.
26973
26974 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26975 Alan Hayward <alan.hayward@arm.com>
26976 David Sherwood <david.sherwood@arm.com>
26977
26978 * target.def (array_mode): New target hook.
26979 * doc/tm.texi.in (TARGET_ARRAY_MODE): New hook.
26980 * doc/tm.texi: Regenerate.
26981 * hooks.h (hook_optmode_mode_uhwi_none): Declare.
26982 * hooks.c (hook_optmode_mode_uhwi_none): New function.
26983 * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Use
26984 targetm.array_mode.
26985 * stor-layout.c (mode_for_array): Likewise. Support polynomial
26986 type sizes.
26987
26988 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26989 Alan Hayward <alan.hayward@arm.com>
26990 David Sherwood <david.sherwood@arm.com>
26991
26992 * fold-const.c (fold_binary_loc): Check the argument types
26993 rather than the result type when testing for a vector operation.
26994
26995 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26996
26997 * doc/tm.texi.in (DWARF_LAZY_REGISTER_VALUE): Document.
26998 * doc/tm.texi: Regenerate.
26999
27000 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
27001 Alan Hayward <alan.hayward@arm.com>
27002 David Sherwood <david.sherwood@arm.com>
27003
27004 * doc/invoke.texi (-msve-vector-bits=): Document new option.
27005 (sve): Document new AArch64 extension.
27006 * doc/md.texi (w): Extend the description of the AArch64
27007 constraint to include SVE vectors.
27008 (Upl, Upa): Document new AArch64 predicate constraints.
27009 * config/aarch64/aarch64-opts.h (aarch64_sve_vector_bits_enum): New
27010 enum.
27011 * config/aarch64/aarch64.opt (sve_vector_bits): New enum.
27012 (msve-vector-bits=): New option.
27013 * config/aarch64/aarch64-option-extensions.def (fp, simd): Disable
27014 SVE when these are disabled.
27015 (sve): New extension.
27016 * config/aarch64/aarch64-modes.def: Define SVE vector and predicate
27017 modes. Adjust their number of units based on aarch64_sve_vg.
27018 (MAX_BITSIZE_MODE_ANY_MODE): Define.
27019 * config/aarch64/aarch64-protos.h (ADDR_QUERY_ANY): New
27020 aarch64_addr_query_type.
27021 (aarch64_const_vec_all_same_in_range_p, aarch64_sve_pred_mode)
27022 (aarch64_sve_cnt_immediate_p, aarch64_sve_addvl_addpl_immediate_p)
27023 (aarch64_sve_inc_dec_immediate_p, aarch64_add_offset_temporaries)
27024 (aarch64_split_add_offset, aarch64_output_sve_cnt_immediate)
27025 (aarch64_output_sve_addvl_addpl, aarch64_output_sve_inc_dec_immediate)
27026 (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): Declare.
27027 (aarch64_simd_imm_zero_p): Delete.
27028 (aarch64_check_zero_based_sve_index_immediate): Declare.
27029 (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
27030 (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
27031 (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
27032 (aarch64_sve_float_mul_immediate_p): Likewise.
27033 (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
27034 rather than an rtx.
27035 (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): Declare.
27036 (aarch64_expand_mov_immediate): Take a gen_vec_duplicate callback.
27037 (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move): Declare.
27038 (aarch64_expand_sve_vec_cmp_int, aarch64_expand_sve_vec_cmp_float)
27039 (aarch64_expand_sve_vcond, aarch64_expand_sve_vec_perm): Declare.
27040 (aarch64_regmode_natural_size): Likewise.
27041 * config/aarch64/aarch64.h (AARCH64_FL_SVE): New macro.
27042 (AARCH64_FL_V8_3, AARCH64_FL_RCPC, AARCH64_FL_DOTPROD): Shift
27043 left one place.
27044 (AARCH64_ISA_SVE, TARGET_SVE): New macros.
27045 (FIXED_REGISTERS, CALL_USED_REGISTERS, REGISTER_NAMES): Add entries
27046 for VG and the SVE predicate registers.
27047 (V_ALIASES): Add a "z"-prefixed alias.
27048 (FIRST_PSEUDO_REGISTER): Change to P15_REGNUM + 1.
27049 (AARCH64_DWARF_VG, AARCH64_DWARF_P0): New macros.
27050 (PR_REGNUM_P, PR_LO_REGNUM_P): Likewise.
27051 (PR_LO_REGS, PR_HI_REGS, PR_REGS): New reg_classes.
27052 (REG_CLASS_NAMES): Add entries for them.
27053 (REG_CLASS_CONTENTS): Likewise. Update ALL_REGS to include VG
27054 and the predicate registers.
27055 (aarch64_sve_vg): Declare.
27056 (BITS_PER_SVE_VECTOR, BYTES_PER_SVE_VECTOR, BYTES_PER_SVE_PRED)
27057 (SVE_BYTE_MODE, MAX_COMPILE_TIME_VEC_BYTES): New macros.
27058 (REGMODE_NATURAL_SIZE): Define.
27059 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins): Handle
27060 SVE macros.
27061 * config/aarch64/aarch64.c: Include cfgrtl.h.
27062 (simd_immediate_info): Add a constructor for series vectors,
27063 and an associated step field.
27064 (aarch64_sve_vg): New variable.
27065 (aarch64_dbx_register_number): Handle VG and the predicate registers.
27066 (aarch64_vect_struct_mode_p, aarch64_vector_mode_p): Delete.
27067 (VEC_ADVSIMD, VEC_SVE_DATA, VEC_SVE_PRED, VEC_STRUCT, VEC_ANY_SVE)
27068 (VEC_ANY_DATA, VEC_STRUCT): New constants.
27069 (aarch64_advsimd_struct_mode_p, aarch64_sve_pred_mode_p)
27070 (aarch64_classify_vector_mode, aarch64_vector_data_mode_p)
27071 (aarch64_sve_data_mode_p, aarch64_sve_pred_mode)
27072 (aarch64_get_mask_mode): New functions.
27073 (aarch64_hard_regno_nregs): Handle SVE data modes for FP_REGS
27074 and FP_LO_REGS. Handle PR_REGS, PR_LO_REGS and PR_HI_REGS.
27075 (aarch64_hard_regno_mode_ok): Handle VG. Also handle the SVE
27076 predicate modes and predicate registers. Explicitly restrict
27077 GPRs to modes of 16 bytes or smaller. Only allow FP registers
27078 to store a vector mode if it is recognized by
27079 aarch64_classify_vector_mode.
27080 (aarch64_regmode_natural_size): New function.
27081 (aarch64_hard_regno_caller_save_mode): Return the original mode
27082 for predicates.
27083 (aarch64_sve_cnt_immediate_p, aarch64_output_sve_cnt_immediate)
27084 (aarch64_sve_addvl_addpl_immediate_p, aarch64_output_sve_addvl_addpl)
27085 (aarch64_sve_inc_dec_immediate_p, aarch64_output_sve_inc_dec_immediate)
27086 (aarch64_add_offset_1_temporaries, aarch64_offset_temporaries): New
27087 functions.
27088 (aarch64_add_offset): Add a temp2 parameter. Assert that temp1
27089 does not overlap dest if the function is frame-related. Handle
27090 SVE constants.
27091 (aarch64_split_add_offset): New function.
27092 (aarch64_add_sp, aarch64_sub_sp): Add temp2 parameters and pass
27093 them aarch64_add_offset.
27094 (aarch64_allocate_and_probe_stack_space): Add a temp2 parameter
27095 and update call to aarch64_sub_sp.
27096 (aarch64_add_cfa_expression): New function.
27097 (aarch64_expand_prologue): Pass extra temporary registers to the
27098 functions above. Handle the case in which we need to emit new
27099 DW_CFA_expressions for registers that were originally saved
27100 relative to the stack pointer, but now have to be expressed
27101 relative to the frame pointer.
27102 (aarch64_output_mi_thunk): Pass extra temporary registers to the
27103 functions above.
27104 (aarch64_expand_epilogue): Likewise. Prevent inheritance of
27105 IP0 and IP1 values for SVE frames.
27106 (aarch64_expand_vec_series): New function.
27107 (aarch64_expand_sve_widened_duplicate): Likewise.
27108 (aarch64_expand_sve_const_vector): Likewise.
27109 (aarch64_expand_mov_immediate): Add a gen_vec_duplicate parameter.
27110 Handle SVE constants. Use emit_move_insn to move a force_const_mem
27111 into the register, rather than emitting a SET directly.
27112 (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move)
27113 (aarch64_get_reg_raw_mode, offset_4bit_signed_scaled_p)
27114 (offset_6bit_unsigned_scaled_p, aarch64_offset_7bit_signed_scaled_p)
27115 (offset_9bit_signed_scaled_p): New functions.
27116 (aarch64_replicate_bitmask_imm): New function.
27117 (aarch64_bitmask_imm): Use it.
27118 (aarch64_cannot_force_const_mem): Reject expressions involving
27119 a CONST_POLY_INT. Update call to aarch64_classify_symbol.
27120 (aarch64_classify_index): Handle SVE indices, by requiring
27121 a plain register index with a scale that matches the element size.
27122 (aarch64_classify_address): Handle SVE addresses. Assert that
27123 the mode of the address is VOIDmode or an integer mode.
27124 Update call to aarch64_classify_symbol.
27125 (aarch64_classify_symbolic_expression): Update call to
27126 aarch64_classify_symbol.
27127 (aarch64_const_vec_all_in_range_p): New function.
27128 (aarch64_print_vector_float_operand): Likewise.
27129 (aarch64_print_operand): Handle 'N' and 'C'. Use "zN" rather than
27130 "vN" for FP registers with SVE modes. Handle (const ...) vectors
27131 and the FP immediates 1.0 and 0.5.
27132 (aarch64_print_address_internal): Handle SVE addresses.
27133 (aarch64_print_operand_address): Use ADDR_QUERY_ANY.
27134 (aarch64_regno_regclass): Handle predicate registers.
27135 (aarch64_secondary_reload): Handle big-endian reloads of SVE
27136 data modes.
27137 (aarch64_class_max_nregs): Handle SVE modes and predicate registers.
27138 (aarch64_rtx_costs): Check for ADDVL and ADDPL instructions.
27139 (aarch64_convert_sve_vector_bits): New function.
27140 (aarch64_override_options): Use it to handle -msve-vector-bits=.
27141 (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
27142 rather than an rtx.
27143 (aarch64_legitimate_constant_p): Use aarch64_classify_vector_mode.
27144 Handle SVE vector and predicate modes. Accept VL-based constants
27145 that need only one temporary register, and VL offsets that require
27146 no temporary registers.
27147 (aarch64_conditional_register_usage): Mark the predicate registers
27148 as fixed if SVE isn't available.
27149 (aarch64_vector_mode_supported_p): Use aarch64_classify_vector_mode.
27150 Return true for SVE vector and predicate modes.
27151 (aarch64_simd_container_mode): Take the number of bits as a poly_int64
27152 rather than an unsigned int. Handle SVE modes.
27153 (aarch64_preferred_simd_mode): Update call accordingly. Handle
27154 SVE modes.
27155 (aarch64_autovectorize_vector_sizes): Add BYTES_PER_SVE_VECTOR
27156 if SVE is enabled.
27157 (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
27158 (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
27159 (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
27160 (aarch64_sve_float_mul_immediate_p): New functions.
27161 (aarch64_sve_valid_immediate): New function.
27162 (aarch64_simd_valid_immediate): Use it as the fallback for SVE vectors.
27163 Explicitly reject structure modes. Check for INDEX constants.
27164 Handle PTRUE and PFALSE constants.
27165 (aarch64_check_zero_based_sve_index_immediate): New function.
27166 (aarch64_simd_imm_zero_p): Delete.
27167 (aarch64_mov_operand_p): Use aarch64_simd_valid_immediate for
27168 vector modes. Accept constants in the range of CNT[BHWD].
27169 (aarch64_simd_scalar_immediate_valid_for_move): Explicitly
27170 ask for an Advanced SIMD mode.
27171 (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): New functions.
27172 (aarch64_simd_vector_alignment): Handle SVE predicates.
27173 (aarch64_vectorize_preferred_vector_alignment): New function.
27174 (aarch64_simd_vector_alignment_reachable): Use it instead of
27175 the vector size.
27176 (aarch64_shift_truncation_mask): Use aarch64_vector_data_mode_p.
27177 (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): New
27178 functions.
27179 (MAX_VECT_LEN): Delete.
27180 (expand_vec_perm_d): Add a vec_flags field.
27181 (emit_unspec2, aarch64_expand_sve_vec_perm): New functions.
27182 (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_zip)
27183 (aarch64_evpc_ext): Don't apply a big-endian lane correction
27184 for SVE modes.
27185 (aarch64_evpc_rev): Rename to...
27186 (aarch64_evpc_rev_local): ...this. Use a predicated operation for SVE.
27187 (aarch64_evpc_rev_global): New function.
27188 (aarch64_evpc_dup): Enforce a 64-byte range for SVE DUP.
27189 (aarch64_evpc_tbl): Use MAX_COMPILE_TIME_VEC_BYTES instead of
27190 MAX_VECT_LEN.
27191 (aarch64_evpc_sve_tbl): New function.
27192 (aarch64_expand_vec_perm_const_1): Update after rename of
27193 aarch64_evpc_rev. Handle SVE permutes too, trying
27194 aarch64_evpc_rev_global and using aarch64_evpc_sve_tbl rather
27195 than aarch64_evpc_tbl.
27196 (aarch64_vectorize_vec_perm_const): Initialize vec_flags.
27197 (aarch64_sve_cmp_operand_p, aarch64_unspec_cond_code)
27198 (aarch64_gen_unspec_cond, aarch64_expand_sve_vec_cmp_int)
27199 (aarch64_emit_unspec_cond, aarch64_emit_unspec_cond_or)
27200 (aarch64_emit_inverted_unspec_cond, aarch64_expand_sve_vec_cmp_float)
27201 (aarch64_expand_sve_vcond): New functions.
27202 (aarch64_modes_tieable_p): Use aarch64_vector_data_mode_p instead
27203 of aarch64_vector_mode_p.
27204 (aarch64_dwarf_poly_indeterminate_value): New function.
27205 (aarch64_compute_pressure_classes): Likewise.
27206 (aarch64_can_change_mode_class): Likewise.
27207 (TARGET_GET_RAW_RESULT_MODE, TARGET_GET_RAW_ARG_MODE): Redefine.
27208 (TARGET_VECTORIZE_PREFERRED_VECTOR_ALIGNMENT): Likewise.
27209 (TARGET_VECTORIZE_GET_MASK_MODE): Likewise.
27210 (TARGET_DWARF_POLY_INDETERMINATE_VALUE): Likewise.
27211 (TARGET_COMPUTE_PRESSURE_CLASSES): Likewise.
27212 (TARGET_CAN_CHANGE_MODE_CLASS): Likewise.
27213 * config/aarch64/constraints.md (Upa, Upl, Uav, Uat, Usv, Usi, Utr)
27214 (Uty, Dm, vsa, vsc, vsd, vsi, vsn, vsl, vsm, vsA, vsM, vsN): New
27215 constraints.
27216 (Dn, Dl, Dr): Accept const as well as const_vector.
27217 (Dz): Likewise. Compare against CONST0_RTX.
27218 * config/aarch64/iterators.md: Refer to "Advanced SIMD" instead
27219 of "vector" where appropriate.
27220 (SVE_ALL, SVE_BH, SVE_BHS, SVE_BHSI, SVE_HSDI, SVE_HSF, SVE_SD)
27221 (SVE_SDI, SVE_I, SVE_F, PRED_ALL, PRED_BHS): New mode iterators.
27222 (UNSPEC_SEL, UNSPEC_ANDF, UNSPEC_IORF, UNSPEC_XORF, UNSPEC_COND_LT)
27223 (UNSPEC_COND_LE, UNSPEC_COND_EQ, UNSPEC_COND_NE, UNSPEC_COND_GE)
27224 (UNSPEC_COND_GT, UNSPEC_COND_LO, UNSPEC_COND_LS, UNSPEC_COND_HS)
27225 (UNSPEC_COND_HI, UNSPEC_COND_UO): New unspecs.
27226 (Vetype, VEL, Vel, VWIDE, Vwide, vw, vwcore, V_INT_EQUIV)
27227 (v_int_equiv): Extend to SVE modes.
27228 (Vesize, V128, v128, Vewtype, V_FP_EQUIV, v_fp_equiv, VPRED): New
27229 mode attributes.
27230 (LOGICAL_OR, SVE_INT_UNARY, SVE_FP_UNARY): New code iterators.
27231 (optab): Handle popcount, smin, smax, umin, umax, abs and sqrt.
27232 (logical_nn, lr, sve_int_op, sve_fp_op): New code attributs.
27233 (LOGICALF, OPTAB_PERMUTE, UNPACK, UNPACK_UNSIGNED, SVE_COND_INT_CMP)
27234 (SVE_COND_FP_CMP): New int iterators.
27235 (perm_hilo): Handle the new unpack unspecs.
27236 (optab, logicalf_op, su, perm_optab, cmp_op, imm_con): New int
27237 attributes.
27238 * config/aarch64/predicates.md (aarch64_sve_cnt_immediate)
27239 (aarch64_sve_addvl_addpl_immediate, aarch64_split_add_offset_immediate)
27240 (aarch64_pluslong_or_poly_operand, aarch64_nonmemory_operand)
27241 (aarch64_equality_operator, aarch64_constant_vector_operand)
27242 (aarch64_sve_ld1r_operand, aarch64_sve_ldr_operand): New predicates.
27243 (aarch64_sve_nonimmediate_operand): Likewise.
27244 (aarch64_sve_general_operand): Likewise.
27245 (aarch64_sve_dup_operand, aarch64_sve_arith_immediate): Likewise.
27246 (aarch64_sve_sub_arith_immediate, aarch64_sve_inc_dec_immediate)
27247 (aarch64_sve_logical_immediate, aarch64_sve_mul_immediate): Likewise.
27248 (aarch64_sve_dup_immediate, aarch64_sve_cmp_vsc_immediate): Likewise.
27249 (aarch64_sve_cmp_vsd_immediate, aarch64_sve_index_immediate): Likewise.
27250 (aarch64_sve_float_arith_immediate): Likewise.
27251 (aarch64_sve_float_arith_with_sub_immediate): Likewise.
27252 (aarch64_sve_float_mul_immediate, aarch64_sve_arith_operand): Likewise.
27253 (aarch64_sve_add_operand, aarch64_sve_logical_operand): Likewise.
27254 (aarch64_sve_lshift_operand, aarch64_sve_rshift_operand): Likewise.
27255 (aarch64_sve_mul_operand, aarch64_sve_cmp_vsc_operand): Likewise.
27256 (aarch64_sve_cmp_vsd_operand, aarch64_sve_index_operand): Likewise.
27257 (aarch64_sve_float_arith_operand): Likewise.
27258 (aarch64_sve_float_arith_with_sub_operand): Likewise.
27259 (aarch64_sve_float_mul_operand): Likewise.
27260 (aarch64_sve_vec_perm_operand): Likewise.
27261 (aarch64_pluslong_operand): Include aarch64_sve_addvl_addpl_immediate.
27262 (aarch64_mov_operand): Accept const_poly_int and const_vector.
27263 (aarch64_simd_lshift_imm, aarch64_simd_rshift_imm): Accept const
27264 as well as const_vector.
27265 (aarch64_simd_imm_zero, aarch64_simd_imm_minus_one): Move earlier
27266 in file. Use CONST0_RTX and CONSTM1_RTX.
27267 (aarch64_simd_or_scalar_imm_zero): Likewise. Add match_codes.
27268 (aarch64_simd_reg_or_zero): Accept const as well as const_vector.
27269 Use aarch64_simd_imm_zero.
27270 * config/aarch64/aarch64-sve.md: New file.
27271 * config/aarch64/aarch64.md: Include it.
27272 (VG_REGNUM, P0_REGNUM, P7_REGNUM, P15_REGNUM): New register numbers.
27273 (UNSPEC_REV, UNSPEC_LD1_SVE, UNSPEC_ST1_SVE, UNSPEC_MERGE_PTRUE)
27274 (UNSPEC_PTEST_PTRUE, UNSPEC_UNPACKSHI, UNSPEC_UNPACKUHI)
27275 (UNSPEC_UNPACKSLO, UNSPEC_UNPACKULO, UNSPEC_PACK)
27276 (UNSPEC_FLOAT_CONVERT, UNSPEC_WHILE_LO): New unspec constants.
27277 (sve): New attribute.
27278 (enabled): Disable instructions with the sve attribute unless
27279 TARGET_SVE.
27280 (movqi, movhi): Pass CONST_POLY_INT operaneds through
27281 aarch64_expand_mov_immediate.
27282 (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64): Handle
27283 CNT[BHSD] immediates.
27284 (movti): Split CONST_POLY_INT moves into two halves.
27285 (add<mode>3): Accept aarch64_pluslong_or_poly_operand.
27286 Split additions that need a temporary here if the destination
27287 is the stack pointer.
27288 (*add<mode>3_aarch64): Handle ADDVL and ADDPL immediates.
27289 (*add<mode>3_poly_1): New instruction.
27290 (set_clobber_cc): New expander.
27291
27292 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
27293
27294 * simplify-rtx.c (simplify_immed_subreg): Add an inner_bytes
27295 parameter and use it instead of GET_MODE_SIZE (innermode). Use
27296 inner_bytes * BITS_PER_UNIT instead of GET_MODE_BITSIZE (innermode).
27297 Use CEIL (inner_bytes, GET_MODE_UNIT_SIZE (innermode)) instead of
27298 GET_MODE_NUNITS (innermode). Also add a first_elem parameter.
27299 Change innermode from fixed_mode_size to machine_mode.
27300 (simplify_subreg): Update call accordingly. Handle a constant-sized
27301 subreg of a variable-length CONST_VECTOR.
27302
27303 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
27304 Alan Hayward <alan.hayward@arm.com>
27305 David Sherwood <david.sherwood@arm.com>
27306
27307 * tree-ssa-address.c (mem_ref_valid_without_offset_p): New function.
27308 (add_offset_to_base): New function, split out from...
27309 (create_mem_ref): ...here. When handling a scale other than 1,
27310 check first whether the address is valid without the offset.
27311 Add it into the base if so, leaving the index and scale as-is.
27312
27313 2018-01-12 Jakub Jelinek <jakub@redhat.com>
27314
27315 PR c++/83778
27316 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Call
27317 fold_for_warn before checking if arg2 is INTEGER_CST.
27318
27319 2018-01-12 Segher Boessenkool <segher@kernel.crashing.org>
27320
27321 * config/rs6000/predicates.md (load_multiple_operation): Delete.
27322 (store_multiple_operation): Delete.
27323 * config/rs6000/rs6000-cpus.def (601): Remove MASK_STRING.
27324 * config/rs6000/rs6000-protos.h (rs6000_output_load_multiple): Delete.
27325 * config/rs6000/rs6000-string.c (expand_block_move): Delete everything
27326 guarded by TARGET_STRING.
27327 (rs6000_output_load_multiple): Delete.
27328 * config/rs6000/rs6000.c (rs6000_option_override_internal): Delete
27329 OPTION_MASK_STRING / TARGET_STRING handling.
27330 (print_operand) <'N', 'O'>: Add comment that these are unused now.
27331 (const rs6000_opt_masks) <"string">: Change mask to 0.
27332 * config/rs6000/rs6000.h (TARGET_DEFAULT): Remove MASK_STRING.
27333 (MASK_STRING): Delete.
27334 * config/rs6000/rs6000.md (*mov<mode>_string): Delete TARGET_STRING
27335 parts. Simplify.
27336 (load_multiple): Delete.
27337 (*ldmsi8): Delete.
27338 (*ldmsi7): Delete.
27339 (*ldmsi6): Delete.
27340 (*ldmsi5): Delete.
27341 (*ldmsi4): Delete.
27342 (*ldmsi3): Delete.
27343 (store_multiple): Delete.
27344 (*stmsi8): Delete.
27345 (*stmsi7): Delete.
27346 (*stmsi6): Delete.
27347 (*stmsi5): Delete.
27348 (*stmsi4): Delete.
27349 (*stmsi3): Delete.
27350 (movmemsi_8reg): Delete.
27351 (corresponding unnamed define_insn): Delete.
27352 (movmemsi_6reg): Delete.
27353 (corresponding unnamed define_insn): Delete.
27354 (movmemsi_4reg): Delete.
27355 (corresponding unnamed define_insn): Delete.
27356 (movmemsi_2reg): Delete.
27357 (corresponding unnamed define_insn): Delete.
27358 (movmemsi_1reg): Delete.
27359 (corresponding unnamed define_insn): Delete.
27360 * config/rs6000/rs6000.opt (mno-string): New.
27361 (mstring): Replace by deprecation warning stub.
27362 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mstring.
27363
27364 2018-01-12 Jakub Jelinek <jakub@redhat.com>
27365
27366 * regrename.c (regrename_do_replace): If replacing the same
27367 reg multiple times, try to reuse last created gen_raw_REG.
27368
27369 PR debug/81155
27370 * bb-reorder.c (pass_partition_blocks::gate): In lto don't partition
27371 main to workaround a bug in GDB.
27372
27373 2018-01-12 Tom de Vries <tom@codesourcery.com>
27374
27375 PR target/83737
27376 * config.gcc (nvptx*-*-*): Set use_gcc_stdint=wrap.
27377
27378 2018-01-12 Vladimir Makarov <vmakarov@redhat.com>
27379
27380 PR rtl-optimization/80481
27381 * ira-color.c (get_cap_member): New function.
27382 (allocnos_conflict_by_live_ranges_p): Use it.
27383 (slot_coalesced_allocno_live_ranges_intersect_p): Add assert.
27384 (setup_slot_coalesced_allocno_live_ranges): Ditto.
27385
27386 2018-01-12 Uros Bizjak <ubizjak@gmail.com>
27387
27388 PR target/83628
27389 * config/alpha/alpha.md (*saddsi_1): New insn_ans_split pattern.
27390 (*saddl_se_1): Ditto.
27391 (*ssubsi_1): Ditto.
27392 (*ssubl_se_1): Ditto.
27393
27394 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
27395
27396 * tree-predcom.c (aff_combination_dr_offset): Use wi::to_poly_widest
27397 rather than wi::to_widest for DR_INITs.
27398 * tree-vect-data-refs.c (vect_find_same_alignment_drs): Use
27399 wi::to_poly_offset rather than wi::to_offset for DR_INIT.
27400 (vect_analyze_data_ref_accesses): Require both DR_INITs to be
27401 INTEGER_CSTs.
27402 (vect_analyze_group_access_1): Note that here.
27403
27404 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
27405
27406 * tree-vectorizer.c (get_vec_alignment_for_array_type): Handle
27407 polynomial type sizes.
27408
27409 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
27410
27411 * gimplify.c (gimple_add_tmp_var_fn): Allow variables to have a
27412 poly_uint64 size, rather than requiring an unsigned HOST_WIDE_INT size.
27413 (gimple_add_tmp_var): Likewise.
27414
27415 2018-01-12 Martin Liska <mliska@suse.cz>
27416
27417 * gimple.c (gimple_alloc_counts): Use uint64_t instead of int.
27418 (gimple_alloc_sizes): Likewise.
27419 (dump_gimple_statistics): Use PRIu64 in printf format.
27420 * gimple.h: Change uint64_t to int.
27421
27422 2018-01-12 Martin Liska <mliska@suse.cz>
27423
27424 * tree-core.h: Use uint64_t instead of int.
27425 * tree.c (tree_node_counts): Likewise.
27426 (tree_node_sizes): Likewise.
27427 (dump_tree_statistics): Use PRIu64 in printf format.
27428
27429 2018-01-12 Martin Liska <mliska@suse.cz>
27430
27431 * Makefile.in: As qsort_chk is implemented in vec.c, add
27432 vec.o to linkage of gencfn-macros.
27433 * tree.c (build_new_poly_int_cst): Add CXX_MEM_STAT_INFO as it's
27434 passing the info to record_node_allocation_statistics.
27435 (test_vector_cst_patterns): Add CXX_MEM_STAT_INFO to declaration
27436 and pass the info.
27437 * ggc-common.c (struct ggc_usage): Add operator== and use
27438 it in operator< and compare function.
27439 * mem-stats.h (struct mem_usage): Likewise.
27440 * vec.c (struct vec_usage): Remove operator< and compare
27441 function. Can be simply inherited.
27442
27443 2018-01-12 Martin Jambor <mjambor@suse.cz>
27444
27445 PR target/81616
27446 * params.def: New parameter PARAM_AVOID_FMA_MAX_BITS.
27447 * tree-ssa-math-opts.c: Include domwalk.h.
27448 (convert_mult_to_fma_1): New function.
27449 (fma_transformation_info): New type.
27450 (fma_deferring_state): Likewise.
27451 (cancel_fma_deferring): New function.
27452 (result_of_phi): Likewise.
27453 (last_fma_candidate_feeds_initial_phi): Likewise.
27454 (convert_mult_to_fma): Added deferring logic, split actual
27455 transformation to convert_mult_to_fma_1.
27456 (math_opts_dom_walker): New type.
27457 (math_opts_dom_walker::after_dom_children): New method, body moved
27458 here from pass_optimize_widening_mul::execute, added deferring logic
27459 bits.
27460 (pass_optimize_widening_mul::execute): Moved most of code to
27461 math_opts_dom_walker::after_dom_children.
27462 * config/i386/x86-tune.def (X86_TUNE_AVOID_128FMA_CHAINS): New.
27463 * config/i386/i386.c (ix86_option_override_internal): Added
27464 maybe_setting of PARAM_AVOID_FMA_MAX_BITS.
27465
27466 2018-01-12 Richard Biener <rguenther@suse.de>
27467
27468 PR debug/83157
27469 * dwarf2out.c (gen_variable_die): Do not reset old_die for
27470 inline instance vars.
27471
27472 2018-01-12 Oleg Endo <olegendo@gcc.gnu.org>
27473
27474 PR target/81819
27475 * config/rx/rx.c (rx_is_restricted_memory_address):
27476 Handle SUBREG case.
27477
27478 2018-01-12 Richard Biener <rguenther@suse.de>
27479
27480 PR tree-optimization/80846
27481 * target.def (split_reduction): New target hook.
27482 * targhooks.c (default_split_reduction): New function.
27483 * targhooks.h (default_split_reduction): Declare.
27484 * tree-vect-loop.c (vect_create_epilog_for_reduction): If the
27485 target requests first reduce vectors by combining low and high
27486 parts.
27487 * tree-vect-stmts.c (vect_gen_perm_mask_any): Adjust.
27488 (get_vectype_for_scalar_type_and_size): Export.
27489 * tree-vectorizer.h (get_vectype_for_scalar_type_and_size): Declare.
27490 * doc/tm.texi.in (TARGET_VECTORIZE_SPLIT_REDUCTION): Document.
27491 * doc/tm.texi: Regenerate.
27492 * config/i386/i386.c (ix86_split_reduction): Implement
27493 TARGET_VECTORIZE_SPLIT_REDUCTION.
27494
27495 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
27496
27497 PR target/83368
27498 * config/sparc/sparc.h (PIC_OFFSET_TABLE_REGNUM): Set to INVALID_REGNUM
27499 in PIC mode except for TARGET_VXWORKS_RTP.
27500 * config/sparc/sparc.c: Include cfgrtl.h.
27501 (TARGET_INIT_PIC_REG): Define.
27502 (TARGET_USE_PSEUDO_PIC_REG): Likewise.
27503 (sparc_pic_register_p): New predicate.
27504 (sparc_legitimate_address_p): Use it.
27505 (sparc_legitimize_pic_address): Likewise.
27506 (sparc_delegitimize_address): Likewise.
27507 (sparc_mode_dependent_address_p): Likewise.
27508 (gen_load_pcrel_sym): Remove 4th parameter.
27509 (load_got_register): Adjust call to above. Remove obsolete stuff.
27510 (sparc_expand_prologue): Do not call load_got_register here.
27511 (sparc_flat_expand_prologue): Likewise.
27512 (sparc_output_mi_thunk): Set the pic_offset_table_rtx object.
27513 (sparc_use_pseudo_pic_reg): New function.
27514 (sparc_init_pic_reg): Likewise.
27515 * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
27516 (builtin_setjmp_receiver): Enable only for TARGET_VXWORKS_RTP.
27517
27518 2018-01-12 Christophe Lyon <christophe.lyon@linaro.org>
27519
27520 * doc/sourcebuild.texi (Effective-Target Keywords, Other attributes):
27521 Add item for branch_cost.
27522
27523 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
27524
27525 PR rtl-optimization/83565
27526 * rtlanal.c (nonzero_bits1): On WORD_REGISTER_OPERATIONS machines, do
27527 not extend the result to a larger mode for rotate operations.
27528 (num_sign_bit_copies1): Likewise.
27529
27530 2018-01-12 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
27531
27532 PR target/40411
27533 * config/sol2.h (STARTFILE_ARCH_SPEC): Don't use with -shared or
27534 -symbolic.
27535 Use values-Xc.o for -pedantic.
27536 Link with values-xpg4.o for C90, values-xpg6.o otherwise.
27537
27538 2018-01-12 Martin Liska <mliska@suse.cz>
27539
27540 PR ipa/83054
27541 * ipa-devirt.c (final_warning_record::grow_type_warnings):
27542 New function.
27543 (possible_polymorphic_call_targets): Use it.
27544 (ipa_devirt): Likewise.
27545
27546 2018-01-12 Martin Liska <mliska@suse.cz>
27547
27548 * profile-count.h (enum profile_quality): Use 0 as invalid
27549 enum value of profile_quality.
27550
27551 2018-01-12 Chung-Ju Wu <jasonwucj@gmail.com>
27552
27553 * doc/invoke.texi (NDS32 Options): Add -mext-perf, -mext-perf2 and
27554 -mext-string options.
27555
27556 2018-01-12 Richard Biener <rguenther@suse.de>
27557
27558 * lto-streamer-out.c (DFS::DFS_write_tree_body): Process
27559 DECL_DEBUG_EXPR conditional on DECL_HAS_DEBUG_EXPR_P.
27560 * tree-streamer-in.c (lto_input_ts_decl_common_tree_pointers):
27561 Likewise.
27562 * tree-streamer-out.c (write_ts_decl_common_tree_pointers): Likewise.
27563
27564 2018-01-11 Michael Meissner <meissner@linux.vnet.ibm.com>
27565
27566 * configure.ac (--with-long-double-format): Add support for the
27567 configuration option to change the default long double format on
27568 PowerPC systems.
27569 * config.gcc (powerpc*-linux*-*): Likewise.
27570 * configure: Regenerate.
27571 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): If long
27572 double is IEEE, define __KC__ and __KF__ to allow floatn.h to be
27573 used without modification.
27574
27575 2018-01-11 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
27576
27577 * config/rs6000/rs6000-builtin.def (BU_P7_MISC_X): New #define.
27578 (SPEC_BARRIER): New instantiation of BU_P7_MISC_X.
27579 * config/rs6000/rs6000.c (rs6000_expand_builtin): Handle
27580 MISC_BUILTIN_SPEC_BARRIER.
27581 (rs6000_init_builtins): Likewise.
27582 * config/rs6000/rs6000.md (UNSPECV_SPEC_BARRIER): New UNSPECV
27583 enum value.
27584 (speculation_barrier): New define_insn.
27585 * doc/extend.texi: Document __builtin_speculation_barrier.
27586
27587 2018-01-11 Jakub Jelinek <jakub@redhat.com>
27588
27589 PR target/83203
27590 * config/i386/i386.c (ix86_expand_vector_init_one_nonzero): If one_var
27591 is 0, for V{8,16}S[IF] and V[48]D[IF]mode use gen_vec_set<mode>_0.
27592 * config/i386/sse.md (VI8_AVX_AVX512F, VI4F_256_512): New mode
27593 iterators.
27594 (ssescalarmodesuffix): Add 512-bit vectors. Use "d" or "q" for
27595 integral modes instead of "ss" and "sd".
27596 (vec_set<mode>_0): New define_insns for 256-bit and 512-bit
27597 vectors with 32-bit and 64-bit elements.
27598 (vecdupssescalarmodesuffix): New mode attribute.
27599 (vec_dup<mode>): Use it.
27600
27601 2018-01-11 H.J. Lu <hongjiu.lu@intel.com>
27602
27603 PR target/83330
27604 * config/i386/i386.c (ix86_compute_frame_layout): Align stack
27605 frame if argument is passed on stack.
27606
27607 2018-01-11 Jakub Jelinek <jakub@redhat.com>
27608
27609 PR target/82682
27610 * ree.c (combine_reaching_defs): Optimize also
27611 reg2=exp; reg1=reg2; reg2=any_extend(reg1); into
27612 reg2=any_extend(exp); reg1=reg2;, formatting fix.
27613
27614 2018-01-11 Jan Hubicka <hubicka@ucw.cz>
27615
27616 PR middle-end/83189
27617 * gimple-ssa-isolate-paths.c (isolate_path): Fix profile update.
27618
27619 2018-01-11 Jan Hubicka <hubicka@ucw.cz>
27620
27621 PR middle-end/83718
27622 * tree-inline.c (copy_cfg_body): Adjust num&den for scaling
27623 after they are computed.
27624
27625 2018-01-11 Bin Cheng <bin.cheng@arm.com>
27626
27627 PR tree-optimization/83695
27628 * gimple-loop-linterchange.cc
27629 (tree_loop_interchange::interchange_loops): Call scev_reset_htab to
27630 reset cached scev information after interchange.
27631 (pass_linterchange::execute): Remove call to scev_reset_htab.
27632
27633 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
27634
27635 * config/arm/arm_neon.h (vfmlal_lane_low_u32, vfmlal_lane_high_u32,
27636 vfmlalq_laneq_low_u32, vfmlalq_lane_low_u32, vfmlal_laneq_low_u32,
27637 vfmlalq_laneq_high_u32, vfmlalq_lane_high_u32, vfmlal_laneq_high_u32,
27638 vfmlsl_lane_low_u32, vfmlsl_lane_high_u32, vfmlslq_laneq_low_u32,
27639 vfmlslq_lane_low_u32, vfmlsl_laneq_low_u32, vfmlslq_laneq_high_u32,
27640 vfmlslq_lane_high_u32, vfmlsl_laneq_high_u32): Define.
27641 * config/arm/arm_neon_builtins.def (vfmal_lane_low,
27642 vfmal_lane_lowv4hf, vfmal_lane_lowv8hf, vfmal_lane_high,
27643 vfmal_lane_highv4hf, vfmal_lane_highv8hf, vfmsl_lane_low,
27644 vfmsl_lane_lowv4hf, vfmsl_lane_lowv8hf, vfmsl_lane_high,
27645 vfmsl_lane_highv4hf, vfmsl_lane_highv8hf): New sets of builtins.
27646 * config/arm/iterators.md (VFMLSEL2, vfmlsel2): New mode attributes.
27647 (V_lane_reg): Likewise.
27648 * config/arm/neon.md (neon_vfm<vfml_op>l_lane_<vfml_half><VCVTF:mode>):
27649 New define_expand.
27650 (neon_vfm<vfml_op>l_lane_<vfml_half><vfmlsel2><mode>): Likewise.
27651 (vfmal_lane_low<mode>_intrinsic,
27652 vfmal_lane_low<vfmlsel2><mode>_intrinsic,
27653 vfmal_lane_high<vfmlsel2><mode>_intrinsic,
27654 vfmal_lane_high<mode>_intrinsic, vfmsl_lane_low<mode>_intrinsic,
27655 vfmsl_lane_low<vfmlsel2><mode>_intrinsic,
27656 vfmsl_lane_high<vfmlsel2><mode>_intrinsic,
27657 vfmsl_lane_high<mode>_intrinsic): New define_insns.
27658
27659 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
27660
27661 * config/arm/arm-cpus.in (fp16fml): New feature.
27662 (ALL_SIMD): Add fp16fml.
27663 (armv8.2-a): Add fp16fml as an option.
27664 (armv8.3-a): Likewise.
27665 (armv8.4-a): Add fp16fml as part of fp16.
27666 * config/arm/arm.h (TARGET_FP16FML): Define.
27667 * config/arm/arm-c.c (arm_cpu_builtins): Define __ARM_FEATURE_FP16_FML
27668 when appropriate.
27669 * config/arm/arm-modes.def (V2HF): Define.
27670 * config/arm/arm_neon.h (vfmlal_low_u32, vfmlsl_low_u32,
27671 vfmlal_high_u32, vfmlsl_high_u32, vfmlalq_low_u32,
27672 vfmlslq_low_u32, vfmlalq_high_u32, vfmlslq_high_u32): Define.
27673 * config/arm/arm_neon_builtins.def (vfmal_low, vfmal_high,
27674 vfmsl_low, vfmsl_high): New set of builtins.
27675 * config/arm/iterators.md (PLUSMINUS): New code iterator.
27676 (vfml_op): New code attribute.
27677 (VFMLHALVES): New int iterator.
27678 (VFML, VFMLSEL): New mode attributes.
27679 (V_reg): Define mapping for V2HF.
27680 (V_hi, V_lo): New mode attributes.
27681 (VF_constraint): Likewise.
27682 (vfml_half, vfml_half_selector): New int attributes.
27683 * config/arm/neon.md (neon_vfm<vfml_op>l_<vfml_half><mode>): New
27684 define_expand.
27685 (vfmal_low<mode>_intrinsic, vfmsl_high<mode>_intrinsic,
27686 vfmal_high<mode>_intrinsic, vfmsl_low<mode>_intrinsic):
27687 New define_insn.
27688 * config/arm/t-arm-elf (v8_fps): Add fp16fml.
27689 * config/arm/t-multilib (v8_2_a_simd_variants): Add fp16fml.
27690 * config/arm/unspecs.md (UNSPEC_VFML_LO, UNSPEC_VFML_HI): New unspecs.
27691 * doc/invoke.texi (ARM Options): Document fp16fml. Update armv8.4-a
27692 documentation.
27693 * doc/sourcebuild.texi (arm_fp16fml_neon_ok, arm_fp16fml_neon):
27694 Document new effective target and option set.
27695
27696 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
27697
27698 * config/arm/arm-cpus.in (armv8_4): New feature.
27699 (ARMv8_4a): New fgroup.
27700 (armv8.4-a): New arch.
27701 * config/arm/arm-tables.opt: Regenerate.
27702 * config/arm/t-aprofile: Add matching rules for -march=armv8.4-a.
27703 * config/arm/t-arm-elf (all_v8_archs): Add armv8.4-a.
27704 * config/arm/t-multilib (v8_4_a_simd_variants): New variable.
27705 Add matching rules for -march=armv8.4-a and extensions.
27706 * doc/invoke.texi (ARM Options): Document -march=armv8.4-a.
27707
27708 2018-01-11 Oleg Endo <olegendo@gcc.gnu.org>
27709
27710 PR target/81821
27711 * config/rx/rx.md (BW): New mode attribute.
27712 (sync_lock_test_and_setsi): Add mode suffix to insn output.
27713
27714 2018-01-11 Richard Biener <rguenther@suse.de>
27715
27716 PR tree-optimization/83435
27717 * graphite.c (canonicalize_loop_form): Ignore fake loop exit edges.
27718 * graphite-scop-detection.c (scop_detection::get_sese): Likewise.
27719 * tree-vrp.c (add_assert_info): Drop TREE_OVERFLOW if they appear.
27720
27721 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
27722 Alan Hayward <alan.hayward@arm.com>
27723 David Sherwood <david.sherwood@arm.com>
27724
27725 * config/aarch64/aarch64.c (aarch64_address_info): Add a const_offset
27726 field.
27727 (aarch64_classify_address): Initialize it. Track polynomial offsets.
27728 (aarch64_print_address_internal): Use it to check for a zero offset.
27729
27730 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
27731 Alan Hayward <alan.hayward@arm.com>
27732 David Sherwood <david.sherwood@arm.com>
27733
27734 * config/aarch64/aarch64-modes.def (NUM_POLY_INT_COEFFS): Set to 2.
27735 * config/aarch64/aarch64-protos.h (aarch64_initial_elimination_offset):
27736 Return a poly_int64 rather than a HOST_WIDE_INT.
27737 (aarch64_offset_7bit_signed_scaled_p): Take the offset as a poly_int64
27738 rather than a HOST_WIDE_INT.
27739 * config/aarch64/aarch64.h (aarch64_frame): Protect with
27740 HAVE_POLY_INT_H rather than HOST_WIDE_INT. Change locals_offset,
27741 hard_fp_offset, frame_size, initial_adjust, callee_offset and
27742 final_offset from HOST_WIDE_INT to poly_int64.
27743 * config/aarch64/aarch64-builtins.c (aarch64_simd_expand_args): Use
27744 to_constant when getting the number of units in an Advanced SIMD
27745 mode.
27746 (aarch64_builtin_vectorized_function): Check for a constant number
27747 of units.
27748 * config/aarch64/aarch64-simd.md (mov<mode>): Handle polynomial
27749 GET_MODE_SIZE.
27750 (aarch64_ld<VSTRUCT:nregs>_lane<VALLDIF:mode>): Use the nunits
27751 attribute instead of GET_MODE_NUNITS.
27752 * config/aarch64/aarch64.c (aarch64_hard_regno_nregs)
27753 (aarch64_class_max_nregs): Use the constant_lowest_bound of the
27754 GET_MODE_SIZE for fixed-size registers.
27755 (aarch64_const_vec_all_same_in_range_p): Use const_vec_duplicate_p.
27756 (aarch64_hard_regno_call_part_clobbered, aarch64_classify_index)
27757 (aarch64_mode_valid_for_sched_fusion_p, aarch64_classify_address)
27758 (aarch64_legitimize_address_displacement, aarch64_secondary_reload)
27759 (aarch64_print_operand, aarch64_print_address_internal)
27760 (aarch64_address_cost, aarch64_rtx_costs, aarch64_register_move_cost)
27761 (aarch64_short_vector_p, aapcs_vfp_sub_candidate)
27762 (aarch64_simd_attr_length_rglist, aarch64_operands_ok_for_ldpstp):
27763 Handle polynomial GET_MODE_SIZE.
27764 (aarch64_hard_regno_caller_save_mode): Likewise. Return modes
27765 wider than SImode without modification.
27766 (tls_symbolic_operand_type): Use strip_offset instead of split_const.
27767 (aarch64_pass_by_reference, aarch64_layout_arg, aarch64_pad_reg_upward)
27768 (aarch64_gimplify_va_arg_expr): Assert that we don't yet handle
27769 passing and returning SVE modes.
27770 (aarch64_function_value, aarch64_layout_arg): Use gen_int_mode
27771 rather than GEN_INT.
27772 (aarch64_emit_probe_stack_range): Take the size as a poly_int64
27773 rather than a HOST_WIDE_INT, but call sorry if it isn't constant.
27774 (aarch64_allocate_and_probe_stack_space): Likewise.
27775 (aarch64_layout_frame): Cope with polynomial offsets.
27776 (aarch64_save_callee_saves, aarch64_restore_callee_saves): Take the
27777 start_offset as a poly_int64 rather than a HOST_WIDE_INT. Track
27778 polynomial offsets.
27779 (offset_9bit_signed_unscaled_p, offset_12bit_unsigned_scaled_p)
27780 (aarch64_offset_7bit_signed_scaled_p): Take the offset as a
27781 poly_int64 rather than a HOST_WIDE_INT.
27782 (aarch64_get_separate_components, aarch64_process_components)
27783 (aarch64_expand_prologue, aarch64_expand_epilogue)
27784 (aarch64_use_return_insn_p): Handle polynomial frame offsets.
27785 (aarch64_anchor_offset): New function, split out from...
27786 (aarch64_legitimize_address): ...here.
27787 (aarch64_builtin_vectorization_cost): Handle polynomial
27788 TYPE_VECTOR_SUBPARTS.
27789 (aarch64_simd_check_vect_par_cnst_half): Handle polynomial
27790 GET_MODE_NUNITS.
27791 (aarch64_simd_make_constant, aarch64_expand_vector_init): Get the
27792 number of elements from the PARALLEL rather than the mode.
27793 (aarch64_shift_truncation_mask): Use GET_MODE_UNIT_BITSIZE
27794 rather than GET_MODE_BITSIZE.
27795 (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_ext)
27796 (aarch64_evpc_rev, aarch64_evpc_dup, aarch64_evpc_zip)
27797 (aarch64_expand_vec_perm_const_1): Handle polynomial
27798 d->perm.length () and d->perm elements.
27799 (aarch64_evpc_tbl): Likewise. Use nelt rather than GET_MODE_NUNITS.
27800 Apply to_constant to d->perm elements.
27801 (aarch64_simd_valid_immediate, aarch64_vec_fpconst_pow_of_2): Handle
27802 polynomial CONST_VECTOR_NUNITS.
27803 (aarch64_move_pointer): Take amount as a poly_int64 rather
27804 than an int.
27805 (aarch64_progress_pointer): Avoid temporary variable.
27806 * config/aarch64/aarch64.md (aarch64_<crc_variant>): Use
27807 the mode attribute instead of GET_MODE.
27808
27809 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
27810 Alan Hayward <alan.hayward@arm.com>
27811 David Sherwood <david.sherwood@arm.com>
27812
27813 * config/aarch64/aarch64.c (aarch64_force_temporary): Assert that
27814 x exists before using it.
27815 (aarch64_add_constant_internal): Rename to...
27816 (aarch64_add_offset_1): ...this. Replace regnum with separate
27817 src and dest rtxes. Handle the case in which they're different,
27818 including when the offset is zero. Replace scratchreg with an rtx.
27819 Use 2 additions if there is no spare register into which we can
27820 move a 16-bit constant.
27821 (aarch64_add_constant): Delete.
27822 (aarch64_add_offset): Replace reg with separate src and dest
27823 rtxes. Take a poly_int64 offset instead of a HOST_WIDE_INT.
27824 Use aarch64_add_offset_1.
27825 (aarch64_add_sp, aarch64_sub_sp): Take the scratch register as
27826 an rtx rather than an int. Take the delta as a poly_int64
27827 rather than a HOST_WIDE_INT. Use aarch64_add_offset.
27828 (aarch64_expand_mov_immediate): Update uses of aarch64_add_offset.
27829 (aarch64_expand_prologue): Update calls to aarch64_sub_sp,
27830 aarch64_allocate_and_probe_stack_space and aarch64_add_offset.
27831 (aarch64_expand_epilogue): Update calls to aarch64_add_offset
27832 and aarch64_add_sp.
27833 (aarch64_output_mi_thunk): Use aarch64_add_offset rather than
27834 aarch64_add_constant.
27835
27836 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
27837
27838 * config/aarch64/aarch64.c (aarch64_reinterpret_float_as_int):
27839 Use scalar_float_mode.
27840
27841 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
27842
27843 * config/aarch64/aarch64-simd.md
27844 (aarch64_fml<f16mac1>l<f16quad>_low<mode>): Avoid GET_MODE_NUNITS.
27845 (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Likewise.
27846 (aarch64_fml<f16mac1>l_lane_lowv2sf): Likewise.
27847 (aarch64_fml<f16mac1>l_lane_highv2sf): Likewise.
27848 (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Likewise.
27849 (aarch64_fml<f16mac1>lq_laneq_highv4sf): Likewise.
27850 (aarch64_fml<f16mac1>l_laneq_lowv2sf): Likewise.
27851 (aarch64_fml<f16mac1>l_laneq_highv2sf): Likewise.
27852 (aarch64_fml<f16mac1>lq_lane_lowv4sf): Likewise.
27853 (aarch64_fml<f16mac1>lq_lane_highv4sf): Likewise.
27854
27855 2018-01-11 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
27856
27857 PR target/83514
27858 * config/arm/arm.c (arm_declare_function_name): Set arch_to_print if
27859 targ_options->x_arm_arch_string is non NULL.
27860
27861 2018-01-11 Tamar Christina <tamar.christina@arm.com>
27862
27863 * config/aarch64/aarch64.h
27864 (AARCH64_FL_FOR_ARCH8_4): Add AARCH64_FL_DOTPROD.
27865
27866 2018-01-11 Sudakshina Das <sudi.das@arm.com>
27867
27868 PR target/82096
27869 * expmed.c (emit_store_flag_force): Swap if const op0
27870 and change VOIDmode to mode of op0.
27871
27872 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
27873
27874 PR rtl-optimization/83761
27875 * caller-save.c (replace_reg_with_saved_mem): Pass bits rather
27876 than bytes to mode_for_size.
27877
27878 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
27879
27880 PR middle-end/83189
27881 * gfortran.fortran-torture/compile/pr83189.f90: New testcase.
27882 * tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): Handle zero
27883 profile.
27884
27885 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
27886
27887 PR middle-end/83575
27888 * cfgrtl.c (rtl_verify_edges): Only verify fixability of partition
27889 when in layout mode.
27890 (cfg_layout_finalize): Do not verify cfg before we are out of layout.
27891 * cfgcleanup.c (try_optimize_cfg): Only verify flow info when doing
27892 partition fixup.
27893
27894 2018-01-10 Michael Collison <michael.collison@arm.com>
27895
27896 * config/aarch64/aarch64-modes.def (V2HF): New VECTOR_MODE.
27897 * config/aarch64/aarch64-option-extension.def: Add
27898 AARCH64_OPT_EXTENSION of 'fp16fml'.
27899 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
27900 (__ARM_FEATURE_FP16_FML): Define if TARGET_F16FML is true.
27901 * config/aarch64/predicates.md (aarch64_lane_imm3): New predicate.
27902 * config/aarch64/constraints.md (Ui7): New constraint.
27903 * config/aarch64/iterators.md (VFMLA_W): New mode iterator.
27904 (VFMLA_SEL_W): Ditto.
27905 (f16quad): Ditto.
27906 (f16mac1): Ditto.
27907 (VFMLA16_LOW): New int iterator.
27908 (VFMLA16_HIGH): Ditto.
27909 (UNSPEC_FMLAL): New unspec.
27910 (UNSPEC_FMLSL): Ditto.
27911 (UNSPEC_FMLAL2): Ditto.
27912 (UNSPEC_FMLSL2): Ditto.
27913 (f16mac): New code attribute.
27914 * config/aarch64/aarch64-simd-builtins.def
27915 (aarch64_fmlal_lowv2sf): Ditto.
27916 (aarch64_fmlsl_lowv2sf): Ditto.
27917 (aarch64_fmlalq_lowv4sf): Ditto.
27918 (aarch64_fmlslq_lowv4sf): Ditto.
27919 (aarch64_fmlal_highv2sf): Ditto.
27920 (aarch64_fmlsl_highv2sf): Ditto.
27921 (aarch64_fmlalq_highv4sf): Ditto.
27922 (aarch64_fmlslq_highv4sf): Ditto.
27923 (aarch64_fmlal_lane_lowv2sf): Ditto.
27924 (aarch64_fmlsl_lane_lowv2sf): Ditto.
27925 (aarch64_fmlal_laneq_lowv2sf): Ditto.
27926 (aarch64_fmlsl_laneq_lowv2sf): Ditto.
27927 (aarch64_fmlalq_lane_lowv4sf): Ditto.
27928 (aarch64_fmlsl_lane_lowv4sf): Ditto.
27929 (aarch64_fmlalq_laneq_lowv4sf): Ditto.
27930 (aarch64_fmlsl_laneq_lowv4sf): Ditto.
27931 (aarch64_fmlal_lane_highv2sf): Ditto.
27932 (aarch64_fmlsl_lane_highv2sf): Ditto.
27933 (aarch64_fmlal_laneq_highv2sf): Ditto.
27934 (aarch64_fmlsl_laneq_highv2sf): Ditto.
27935 (aarch64_fmlalq_lane_highv4sf): Ditto.
27936 (aarch64_fmlsl_lane_highv4sf): Ditto.
27937 (aarch64_fmlalq_laneq_highv4sf): Ditto.
27938 (aarch64_fmlsl_laneq_highv4sf): Ditto.
27939 * config/aarch64/aarch64-simd.md:
27940 (aarch64_fml<f16mac1>l<f16quad>_low<mode>): New pattern.
27941 (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
27942 (aarch64_simd_fml<f16mac1>l<f16quad>_low<mode>): Ditto.
27943 (aarch64_simd_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
27944 (aarch64_fml<f16mac1>l_lane_lowv2sf): Ditto.
27945 (aarch64_fml<f16mac1>l_lane_highv2sf): Ditto.
27946 (aarch64_simd_fml<f16mac>l_lane_lowv2sf): Ditto.
27947 (aarch64_simd_fml<f16mac>l_lane_highv2sf): Ditto.
27948 (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Ditto.
27949 (aarch64_fml<f16mac1>lq_laneq_highv4sf): Ditto.
27950 (aarch64_simd_fml<f16mac>lq_laneq_lowv4sf): Ditto.
27951 (aarch64_simd_fml<f16mac>lq_laneq_highv4sf): Ditto.
27952 (aarch64_fml<f16mac1>l_laneq_lowv2sf): Ditto.
27953 (aarch64_fml<f16mac1>l_laneq_highv2sf): Ditto.
27954 (aarch64_simd_fml<f16mac>l_laneq_lowv2sf): Ditto.
27955 (aarch64_simd_fml<f16mac>l_laneq_highv2sf): Ditto.
27956 (aarch64_fml<f16mac1>lq_lane_lowv4sf): Ditto.
27957 (aarch64_fml<f16mac1>lq_lane_highv4sf): Ditto.
27958 (aarch64_simd_fml<f16mac>lq_lane_lowv4sf): Ditto.
27959 (aarch64_simd_fml<f16mac>lq_lane_highv4sf): Ditto.
27960 * config/aarch64/arm_neon.h (vfmlal_low_u32): New intrinsic.
27961 (vfmlsl_low_u32): Ditto.
27962 (vfmlalq_low_u32): Ditto.
27963 (vfmlslq_low_u32): Ditto.
27964 (vfmlal_high_u32): Ditto.
27965 (vfmlsl_high_u32): Ditto.
27966 (vfmlalq_high_u32): Ditto.
27967 (vfmlslq_high_u32): Ditto.
27968 (vfmlal_lane_low_u32): Ditto.
27969 (vfmlsl_lane_low_u32): Ditto.
27970 (vfmlal_laneq_low_u32): Ditto.
27971 (vfmlsl_laneq_low_u32): Ditto.
27972 (vfmlalq_lane_low_u32): Ditto.
27973 (vfmlslq_lane_low_u32): Ditto.
27974 (vfmlalq_laneq_low_u32): Ditto.
27975 (vfmlslq_laneq_low_u32): Ditto.
27976 (vfmlal_lane_high_u32): Ditto.
27977 (vfmlsl_lane_high_u32): Ditto.
27978 (vfmlal_laneq_high_u32): Ditto.
27979 (vfmlsl_laneq_high_u32): Ditto.
27980 (vfmlalq_lane_high_u32): Ditto.
27981 (vfmlslq_lane_high_u32): Ditto.
27982 (vfmlalq_laneq_high_u32): Ditto.
27983 (vfmlslq_laneq_high_u32): Ditto.
27984 * config/aarch64/aarch64.h (AARCH64_FL_F16SML): New flag.
27985 (AARCH64_FL_FOR_ARCH8_4): New.
27986 (AARCH64_ISA_F16FML): New ISA flag.
27987 (TARGET_F16FML): New feature flag for fp16fml.
27988 (doc/invoke.texi): Document new fp16fml option.
27989
27990 2018-01-10 Michael Collison <michael.collison@arm.com>
27991
27992 * config/aarch64/aarch64-builtins.c:
27993 (aarch64_types_ternopu_imm_qualifiers, TYPES_TERNOPUI): New.
27994 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
27995 (__ARM_FEATURE_SHA3): Define if TARGET_SHA3 is true.
27996 * config/aarch64/aarch64.h (AARCH64_FL_SHA3): New flags.
27997 (AARCH64_ISA_SHA3): New ISA flag.
27998 (TARGET_SHA3): New feature flag for sha3.
27999 * config/aarch64/iterators.md (sha512_op): New int attribute.
28000 (CRYPTO_SHA512): New int iterator.
28001 (UNSPEC_SHA512H): New unspec.
28002 (UNSPEC_SHA512H2): Ditto.
28003 (UNSPEC_SHA512SU0): Ditto.
28004 (UNSPEC_SHA512SU1): Ditto.
28005 * config/aarch64/aarch64-simd-builtins.def
28006 (aarch64_crypto_sha512hqv2di): New builtin.
28007 (aarch64_crypto_sha512h2qv2di): Ditto.
28008 (aarch64_crypto_sha512su0qv2di): Ditto.
28009 (aarch64_crypto_sha512su1qv2di): Ditto.
28010 (aarch64_eor3qv8hi): Ditto.
28011 (aarch64_rax1qv2di): Ditto.
28012 (aarch64_xarqv2di): Ditto.
28013 (aarch64_bcaxqv8hi): Ditto.
28014 * config/aarch64/aarch64-simd.md:
28015 (aarch64_crypto_sha512h<sha512_op>qv2di): New pattern.
28016 (aarch64_crypto_sha512su0qv2di): Ditto.
28017 (aarch64_crypto_sha512su1qv2di): Ditto.
28018 (aarch64_eor3qv8hi): Ditto.
28019 (aarch64_rax1qv2di): Ditto.
28020 (aarch64_xarqv2di): Ditto.
28021 (aarch64_bcaxqv8hi): Ditto.
28022 * config/aarch64/arm_neon.h (vsha512hq_u64): New intrinsic.
28023 (vsha512h2q_u64): Ditto.
28024 (vsha512su0q_u64): Ditto.
28025 (vsha512su1q_u64): Ditto.
28026 (veor3q_u16): Ditto.
28027 (vrax1q_u64): Ditto.
28028 (vxarq_u64): Ditto.
28029 (vbcaxq_u16): Ditto.
28030 * config/arm/types.md (crypto_sha512): New type attribute.
28031 (crypto_sha3): Ditto.
28032 (doc/invoke.texi): Document new sha3 option.
28033
28034 2018-01-10 Michael Collison <michael.collison@arm.com>
28035
28036 * config/aarch64/aarch64-builtins.c:
28037 (aarch64_types_quadopu_imm_qualifiers, TYPES_QUADOPUI): New.
28038 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
28039 (__ARM_FEATURE_SM3): Define if TARGET_SM4 is true.
28040 (__ARM_FEATURE_SM4): Define if TARGET_SM4 is true.
28041 * config/aarch64/aarch64.h (AARCH64_FL_SM4): New flags.
28042 (AARCH64_ISA_SM4): New ISA flag.
28043 (TARGET_SM4): New feature flag for sm4.
28044 * config/aarch64/aarch64-simd-builtins.def
28045 (aarch64_sm3ss1qv4si): Ditto.
28046 (aarch64_sm3tt1aq4si): Ditto.
28047 (aarch64_sm3tt1bq4si): Ditto.
28048 (aarch64_sm3tt2aq4si): Ditto.
28049 (aarch64_sm3tt2bq4si): Ditto.
28050 (aarch64_sm3partw1qv4si): Ditto.
28051 (aarch64_sm3partw2qv4si): Ditto.
28052 (aarch64_sm4eqv4si): Ditto.
28053 (aarch64_sm4ekeyqv4si): Ditto.
28054 * config/aarch64/aarch64-simd.md:
28055 (aarch64_sm3ss1qv4si): Ditto.
28056 (aarch64_sm3tt<sm3tt_op>qv4si): Ditto.
28057 (aarch64_sm3partw<sm3part_op>qv4si): Ditto.
28058 (aarch64_sm4eqv4si): Ditto.
28059 (aarch64_sm4ekeyqv4si): Ditto.
28060 * config/aarch64/iterators.md (sm3tt_op): New int iterator.
28061 (sm3part_op): Ditto.
28062 (CRYPTO_SM3TT): Ditto.
28063 (CRYPTO_SM3PART): Ditto.
28064 (UNSPEC_SM3SS1): New unspec.
28065 (UNSPEC_SM3TT1A): Ditto.
28066 (UNSPEC_SM3TT1B): Ditto.
28067 (UNSPEC_SM3TT2A): Ditto.
28068 (UNSPEC_SM3TT2B): Ditto.
28069 (UNSPEC_SM3PARTW1): Ditto.
28070 (UNSPEC_SM3PARTW2): Ditto.
28071 (UNSPEC_SM4E): Ditto.
28072 (UNSPEC_SM4EKEY): Ditto.
28073 * config/aarch64/constraints.md (Ui2): New constraint.
28074 * config/aarch64/predicates.md (aarch64_imm2): New predicate.
28075 * config/arm/types.md (crypto_sm3): New type attribute.
28076 (crypto_sm4): Ditto.
28077 * config/aarch64/arm_neon.h (vsm3ss1q_u32): New intrinsic.
28078 (vsm3tt1aq_u32): Ditto.
28079 (vsm3tt1bq_u32): Ditto.
28080 (vsm3tt2aq_u32): Ditto.
28081 (vsm3tt2bq_u32): Ditto.
28082 (vsm3partw1q_u32): Ditto.
28083 (vsm3partw2q_u32): Ditto.
28084 (vsm4eq_u32): Ditto.
28085 (vsm4ekeyq_u32): Ditto.
28086 (doc/invoke.texi): Document new sm4 option.
28087
28088 2018-01-10 Michael Collison <michael.collison@arm.com>
28089
28090 * config/aarch64/aarch64-arches.def (armv8.4-a): New architecture.
28091 * config/aarch64/aarch64.h (AARCH64_ISA_V8_4): New ISA flag.
28092 (AARCH64_FL_FOR_ARCH8_4): New.
28093 (AARCH64_FL_V8_4): New flag.
28094 (doc/invoke.texi): Document new armv8.4-a option.
28095
28096 2018-01-10 Michael Collison <michael.collison@arm.com>
28097
28098 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
28099 (__ARM_FEATURE_AES): Define if TARGET_AES is true.
28100 (__ARM_FEATURE_SHA2): Define if TARGET_SHA2 is true.
28101 * config/aarch64/aarch64-option-extension.def: Add
28102 AARCH64_OPT_EXTENSION of 'sha2'.
28103 (aes): Add AARCH64_OPT_EXTENSION of 'aes'.
28104 (crypto): Disable sha2 and aes if crypto disabled.
28105 (crypto): Enable aes and sha2 if enabled.
28106 (simd): Disable sha2 and aes if simd disabled.
28107 * config/aarch64/aarch64.h (AARCH64_FL_AES, AARCH64_FL_SHA2):
28108 New flags.
28109 (AARCH64_ISA_AES, AARCH64_ISA_SHA2): New ISA flags.
28110 (TARGET_SHA2): New feature flag for sha2.
28111 (TARGET_AES): New feature flag for aes.
28112 * config/aarch64/aarch64-simd.md:
28113 (aarch64_crypto_aes<aes_op>v16qi): Make pattern
28114 conditional on TARGET_AES.
28115 (aarch64_crypto_aes<aesmc_op>v16qi): Ditto.
28116 (aarch64_crypto_sha1hsi): Make pattern conditional
28117 on TARGET_SHA2.
28118 (aarch64_crypto_sha1hv4si): Ditto.
28119 (aarch64_be_crypto_sha1hv4si): Ditto.
28120 (aarch64_crypto_sha1su1v4si): Ditto.
28121 (aarch64_crypto_sha1<sha1_op>v4si): Ditto.
28122 (aarch64_crypto_sha1su0v4si): Ditto.
28123 (aarch64_crypto_sha256h<sha256_op>v4si): Ditto.
28124 (aarch64_crypto_sha256su0v4si): Ditto.
28125 (aarch64_crypto_sha256su1v4si): Ditto.
28126 (doc/invoke.texi): Document new aes and sha2 options.
28127
28128 2018-01-10 Martin Sebor <msebor@redhat.com>
28129
28130 PR tree-optimization/83781
28131 * gimple-fold.c (get_range_strlen): Avoid treating arrays of pointers
28132 as string arrays.
28133
28134 2018-01-11 Martin Sebor <msebor@gmail.com>
28135 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
28136
28137 PR tree-optimization/83501
28138 PR tree-optimization/81703
28139
28140 * tree-ssa-strlen.c (get_string_cst): Rename...
28141 (get_string_len): ...to this. Handle global constants.
28142 (handle_char_store): Adjust.
28143
28144 2018-01-10 Kito Cheng <kito.cheng@gmail.com>
28145 Jim Wilson <jimw@sifive.com>
28146
28147 * config/riscv/riscv-protos.h (riscv_output_return): New.
28148 * config/riscv/riscv.c (struct machine_function): New naked_p field.
28149 (riscv_attribute_table, riscv_output_return),
28150 (riscv_handle_fndecl_attribute, riscv_naked_function_p),
28151 (riscv_allocate_stack_slots_for_args, riscv_warn_func_return): New.
28152 (riscv_compute_frame_info): Only compute frame->mask if not a naked
28153 function.
28154 (riscv_expand_prologue): Add early return for naked function.
28155 (riscv_expand_epilogue): Likewise.
28156 (riscv_function_ok_for_sibcall): Return false for naked function.
28157 (riscv_set_current_function): New.
28158 (TARGET_SET_CURRENT_FUNCTION, TARGET_ALLOCATE_STACK_SLOTS_FOR_ARGS),
28159 (TARGET_ATTRIBUTE_TABLE, TARGET_WARN_FUNC_RETURN): New.
28160 * config/riscv/riscv.md (simple_return): Call riscv_output_return.
28161 * doc/extend.texi (RISC-V Function Attributes): New.
28162
28163 2018-01-10 Michael Meissner <meissner@linux.vnet.ibm.com>
28164
28165 * config/rs6000/rs6000.c (is_complex_IBM_long_double): Explicitly
28166 check for 128-bit long double before checking TCmode.
28167 * config/rs6000/rs6000.h (FLOAT128_IEEE_P): Explicitly check for
28168 128-bit long doubles before checking TFmode or TCmode.
28169 (FLOAT128_IBM_P): Likewise.
28170
28171 2018-01-10 Martin Sebor <msebor@redhat.com>
28172
28173 PR tree-optimization/83671
28174 * builtins.c (c_strlen): Unconditionally return zero for the empty
28175 string.
28176 Use -Warray-bounds for warnings.
28177 * gimple-fold.c (get_range_strlen): Handle non-constant lengths
28178 for non-constant array indices with COMPONENT_REF, arrays of
28179 arrays, and pointers to arrays.
28180 (gimple_fold_builtin_strlen): Determine and set length range for
28181 non-constant character arrays.
28182
28183 2018-01-10 Aldy Hernandez <aldyh@redhat.com>
28184
28185 PR middle-end/81897
28186 * tree-ssa-uninit.c (convert_control_dep_chain_into_preds): Skip
28187 empty blocks.
28188
28189 2018-01-10 Eric Botcazou <ebotcazou@adacore.com>
28190
28191 * dwarf2out.c (dwarf2out_var_location): Do not pass NULL to fprintf.
28192
28193 2018-01-10 Peter Bergner <bergner@vnet.ibm.com>
28194
28195 PR target/83399
28196 * config/rs6000/rs6000.c (print_operand) <'y'>: Use
28197 VECTOR_MEM_ALTIVEC_OR_VSX_P.
28198 * config/rs6000/vsx.md (*vsx_le_perm_load_<mode> for VSX_D): Use
28199 indexed_or_indirect_operand predicate.
28200 (*vsx_le_perm_load_<mode> for VSX_W): Likewise.
28201 (*vsx_le_perm_load_v8hi): Likewise.
28202 (*vsx_le_perm_load_v16qi): Likewise.
28203 (*vsx_le_perm_store_<mode> for VSX_D): Likewise.
28204 (*vsx_le_perm_store_<mode> for VSX_W): Likewise.
28205 (*vsx_le_perm_store_v8hi): Likewise.
28206 (*vsx_le_perm_store_v16qi): Likewise.
28207 (eight unnamed splitters): Likewise.
28208
28209 2018-01-10 Peter Bergner <bergner@vnet.ibm.com>
28210
28211 * config/rs6000/x86intrin.h: Change #warning to #error. Update message.
28212 * config/rs6000/emmintrin.h: Likewise.
28213 * config/rs6000/mmintrin.h: Likewise.
28214 * config/rs6000/xmmintrin.h: Likewise.
28215
28216 2018-01-10 David Malcolm <dmalcolm@redhat.com>
28217
28218 PR c++/43486
28219 * tree-core.h: Document EXPR_LOCATION_WRAPPER_P's usage of
28220 "public_flag".
28221 * tree.c (tree_nop_conversion): Return true for location wrapper
28222 nodes.
28223 (maybe_wrap_with_location): New function.
28224 (selftest::check_strip_nops): New function.
28225 (selftest::test_location_wrappers): New function.
28226 (selftest::tree_c_tests): Call it.
28227 * tree.h (STRIP_ANY_LOCATION_WRAPPER): New macro.
28228 (maybe_wrap_with_location): New decl.
28229 (EXPR_LOCATION_WRAPPER_P): New macro.
28230 (location_wrapper_p): New inline function.
28231 (tree_strip_any_location_wrapper): New inline function.
28232
28233 2018-01-10 H.J. Lu <hongjiu.lu@intel.com>
28234
28235 PR target/83735
28236 * config/i386/i386.c (ix86_compute_frame_layout): Always adjust
28237 stack_realign_offset for the largest alignment of stack slot
28238 actually used.
28239 (ix86_find_max_used_stack_alignment): New function.
28240 (ix86_finalize_stack_frame_flags): Use it. Set
28241 max_used_stack_alignment if we don't realign stack.
28242 * config/i386/i386.h (machine_function): Add
28243 max_used_stack_alignment.
28244
28245 2018-01-10 Christophe Lyon <christophe.lyon@linaro.org>
28246
28247 * config/arm/arm.opt (-mbranch-cost): New option.
28248 * config/arm/arm.h (BRANCH_COST): Take arm_branch_cost into
28249 account.
28250
28251 2018-01-10 Segher Boessenkool <segher@kernel.crashing.org>
28252
28253 PR target/83629
28254 * config/rs6000/rs6000.md (load_toc_v4_PIC_2, load_toc_v4_PIC_3b,
28255 load_toc_v4_PIC_3c): Wrap const term in CONST RTL.
28256
28257 2018-01-10 Richard Biener <rguenther@suse.de>
28258
28259 PR debug/83765
28260 * dwarf2out.c (gen_subprogram_die): Hoist old_die && declaration
28261 early out so it also covers the case where we have a non-NULL
28262 origin.
28263
28264 2018-01-10 Richard Sandiford <richard.sandiford@linaro.org>
28265
28266 PR tree-optimization/83753
28267 * tree-vect-stmts.c (get_group_load_store_type): Use VMAT_CONTIGUOUS
28268 for non-strided grouped accesses if the number of elements is 1.
28269
28270 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
28271
28272 PR target/81616
28273 * i386.c (ix86_vectorize_builtin_gather): Check TARGET_USE_GATHER.
28274 * i386.h (TARGET_USE_GATHER): Define.
28275 * x86-tune.def (X86_TUNE_USE_GATHER): New.
28276
28277 2018-01-10 Martin Liska <mliska@suse.cz>
28278
28279 PR bootstrap/82831
28280 * basic-block.h (CLEANUP_NO_PARTITIONING): New define.
28281 * bb-reorder.c (pass_reorder_blocks::execute): Do not clean up
28282 partitioning.
28283 * cfgcleanup.c (try_optimize_cfg): Fix up partitioning if
28284 CLEANUP_NO_PARTITIONING is not set.
28285
28286 2018-01-10 Richard Sandiford <richard.sandiford@linaro.org>
28287
28288 * doc/rtl.texi: Remove documentation of (const ...) wrappers
28289 for vectors, as a partial revert of r254296.
28290 * rtl.h (const_vec_p): Delete.
28291 (const_vec_duplicate_p): Don't test for vector CONSTs.
28292 (unwrap_const_vec_duplicate, const_vec_series_p): Likewise.
28293 * expmed.c (make_tree): Likewise.
28294
28295 Revert:
28296 * common.md (E, F): Use CONSTANT_P instead of checking for
28297 CONST_VECTOR.
28298 * emit-rtl.c (gen_lowpart_common): Use const_vec_p instead of
28299 checking for CONST_VECTOR.
28300
28301 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
28302
28303 PR middle-end/83575
28304 * predict.c (force_edge_cold): Handle in more sane way edges
28305 with no prediction.
28306
28307 2018-01-09 Carl Love <cel@us.ibm.com>
28308
28309 * config/rs6002/altivec.md (p8_vmrgow): Add support for V2DI, V2DF,
28310 V4SI, V4SF types.
28311 (p8_vmrgew): Add support for V2DI, V2DF, V4SF types.
28312 * config/rs6000/rs6000-builtin.def: Add definitions for FLOAT2_V2DF,
28313 VMRGEW_V2DI, VMRGEW_V2DF, VMRGEW_V4SF, VMRGOW_V4SI, VMRGOW_V4SF,
28314 VMRGOW_V2DI, VMRGOW_V2DF. Remove definition for VMRGOW.
28315 * config/rs6000/rs6000-c.c (VSX_BUILTIN_VEC_FLOAT2,
28316 P8V_BUILTIN_VEC_VMRGEW, P8V_BUILTIN_VEC_VMRGOW): Add definitions.
28317 * config/rs6000/rs6000-protos.h: Add extern defition for
28318 rs6000_generate_float2_double_code.
28319 * config/rs6000/rs6000.c (rs6000_generate_float2_double_code): Add
28320 function.
28321 * config/rs6000/vsx.md (vsx_xvcdpsp): Add define_insn.
28322 (float2_v2df): Add define_expand.
28323
28324 2018-01-09 Uros Bizjak <ubizjak@gmail.com>
28325
28326 PR target/83628
28327 * combine.c (force_int_to_mode) <case ASHIFT>: Use mode instead of
28328 op_mode in the force_to_mode call.
28329
28330 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
28331
28332 * config/aarch64/aarch64.c (aarch64_evpc_trn): Use d.perm.series_p
28333 instead of checking each element individually.
28334 (aarch64_evpc_uzp): Likewise.
28335 (aarch64_evpc_zip): Likewise.
28336 (aarch64_evpc_ext): Likewise.
28337 (aarch64_evpc_rev): Likewise.
28338 (aarch64_evpc_dup): Test the encoding for a single duplicated element,
28339 instead of checking each element individually. Return true without
28340 generating rtl if
28341 (aarch64_vectorize_vec_perm_const): Use all_from_input_p to test
28342 whether all selected elements come from the same input, instead of
28343 checking each element individually. Remove calls to gen_rtx_REG,
28344 start_sequence and end_sequence and instead assert that no rtl is
28345 generated.
28346
28347 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
28348
28349 * config/aarch64/aarch64.c (aarch64_legitimate_constant_p): Fix
28350 order of HIGH and CONST checks.
28351
28352 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
28353
28354 * tree-vect-stmts.c (permute_vec_elements): Create a fresh variable
28355 if the destination isn't an SSA_NAME.
28356
28357 2018-01-09 Richard Biener <rguenther@suse.de>
28358
28359 PR tree-optimization/83668
28360 * graphite.c (canonicalize_loop_closed_ssa): Add edge argument,
28361 move prologue...
28362 (canonicalize_loop_form): ... here, renamed from ...
28363 (canonicalize_loop_closed_ssa_form): ... this and amended to
28364 swap successor edges for loop exit blocks to make us use
28365 the RPO order we need for initial schedule generation.
28366
28367 2018-01-09 Joseph Myers <joseph@codesourcery.com>
28368
28369 PR tree-optimization/64811
28370 * match.pd: When optimizing comparisons with Inf, avoid
28371 introducing or losing exceptions from comparisons with NaN.
28372
28373 2018-01-09 Martin Liska <mliska@suse.cz>
28374
28375 PR sanitizer/82517
28376 * asan.c (shadow_mem_size): Add gcc_assert.
28377
28378 2018-01-09 Georg-Johann Lay <avr@gjlay.de>
28379
28380 Don't save registers in main().
28381
28382 PR target/83738
28383 * doc/invoke.texi (AVR Options) [-mmain-is-OS_task]: Document it.
28384 * config/avr/avr.opt (-mmain-is-OS_task): New target option.
28385 * config/avr/avr.c (avr_set_current_function): Don't error if
28386 naked, OS_task or OS_main are specified at the same time.
28387 (avr_function_ok_for_sibcall): Don't disable sibcalls for OS_task,
28388 OS_main.
28389 (avr_insert_attributes) [-mmain-is-OS_task] <main>: Add OS_task
28390 attribute.
28391 * common/config/avr/avr-common.c (avr_option_optimization_table):
28392 Switch on -mmain-is-OS_task for optimizing compilations.
28393
28394 2018-01-09 Richard Biener <rguenther@suse.de>
28395
28396 PR tree-optimization/83572
28397 * graphite.c: Include cfganal.h.
28398 (graphite_transform_loops): Connect infinite loops to exit
28399 and remove fake edges at the end.
28400
28401 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
28402
28403 * ipa-inline.c (edge_badness): Revert accidental checkin.
28404
28405 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
28406
28407 PR ipa/80763
28408 * ipa-comdats.c (set_comdat_group): Only set comdat group of real
28409 symbols; not inline clones.
28410
28411 2018-01-09 Jakub Jelinek <jakub@redhat.com>
28412
28413 PR target/83507
28414 * modulo-sched.c (schedule_reg_moves): Punt if we'd need to move
28415 hard registers. Formatting fixes.
28416
28417 PR preprocessor/83722
28418 * gcc.c (try_generate_repro): Pass
28419 &temp_stderr_files[RETRY_ICE_ATTEMPTS - 1] rather than
28420 &temp_stdout_files[RETRY_ICE_ATTEMPTS - 1] as last argument to
28421 do_report_bug.
28422
28423 2018-01-08 Monk Chiang <sh.chiang04@gmail.com>
28424 Kito Cheng <kito.cheng@gmail.com>
28425
28426 * config/riscv/riscv.c (machine_function::is_leaf): Remove field.
28427 (riscv_leaf_function_p): Delete.
28428 (riscv_function_ok_for_sibcall): Return false when TARGET_SAVE_RESTORE.
28429
28430 2018-01-08 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
28431
28432 * config/rs6000/rs6000-string.c (do_load_for_compare_from_addr): New
28433 function.
28434 (do_ifelse): New function.
28435 (do_isel): New function.
28436 (do_sub3): New function.
28437 (do_add3): New function.
28438 (do_load_mask_compare): New function.
28439 (do_overlap_load_compare): New function.
28440 (expand_compare_loop): New function.
28441 (expand_block_compare): Call expand_compare_loop() when appropriate.
28442 * config/rs6000/rs6000.opt (-mblock-compare-inline-limit): Change
28443 option description.
28444 (-mblock-compare-inline-loop-limit): New option.
28445
28446 2018-01-08 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
28447
28448 PR target/83677
28449 * config/rs6000/altivec.md (*altivec_vpermr_<mode>_internal):
28450 Reverse order of second and third operands in first alternative.
28451 * config/rs6000/rs6000.c (rs6000_expand_vector_set): Reverse order
28452 of first and second elements in UNSPEC_VPERMR vector.
28453 (altivec_expand_vec_perm_le): Likewise.
28454
28455 2018-01-08 Jeff Law <law@redhat.com>
28456
28457 PR rtl-optimizatin/81308
28458 * tree-switch-conversion.c (cfg_altered): New file scoped static.
28459 (process_switch): If group_case_labels makes a change, then set
28460 cfg_altered.
28461 (pass_convert_switch::execute): If a switch is converted, then
28462 set cfg_altered. Return TODO_cfg_cleanup if cfg_altered is true.
28463
28464 PR rtl-optimization/81308
28465 * recog.c (split_all_insns): Conditionally cleanup the CFG after
28466 splitting insns.
28467
28468 2018-01-08 Vidya Praveen <vidyapraveen@arm.com>
28469
28470 PR target/83663 - Revert r255946
28471 * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify code
28472 generation for cases where splatting a value is not useful.
28473 * simplify-rtx.c (simplify_ternary_operation): Simplify vec_merge
28474 across a vec_duplicate and a paradoxical subreg forming a vector
28475 mode to a vec_concat.
28476
28477 2018-01-08 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
28478
28479 * config/arm/t-aprofile (MULTILIB_MATCHES): Add mapping rules for
28480 -march=armv8.3-a variants.
28481 * config/arm/t-multilib: Likewise.
28482 * config/arm/t-arm-elf: Likewise. Handle dotprod extension.
28483
28484 2018-01-08 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
28485
28486 * config/rs6000/rs6000.md (cceq_ior_compare): Remove * so I can use it
28487 to generate rtl.
28488 (cceq_ior_compare_complement): Give it a name so I can use it, and
28489 change boolean_or_operator predicate to boolean_operator so it can
28490 be used to generate a crand.
28491 (eqne): New code iterator.
28492 (bd/bd_neg): New code_attrs.
28493 (<bd>_<mode>): New name for ctr<mode>_internal[12] now combined into
28494 a single define_insn.
28495 (<bd>tf_<mode>): A new insn pattern for the conditional form branch
28496 decrement (bdnzt/bdnzf/bdzt/bdzf).
28497 * config/rs6000/rs6000.c (rs6000_legitimate_combined_insn): Updated
28498 with the new names of the branch decrement patterns, and added the
28499 names of the branch decrement conditional patterns.
28500
28501 2018-01-08 Richard Biener <rguenther@suse.de>
28502
28503 PR tree-optimization/83563
28504 * graphite.c (canonicalize_loop_closed_ssa_form): Reset the SCEV
28505 cache.
28506
28507 2018-01-08 Richard Biener <rguenther@suse.de>
28508
28509 PR middle-end/83713
28510 * convert.c (do_narrow): Properly guard TYPE_OVERFLOW_WRAPS checks.
28511
28512 2018-01-08 Richard Biener <rguenther@suse.de>
28513
28514 PR tree-optimization/83685
28515 * tree-ssa-pre.c (create_expression_by_pieces): Do not insert
28516 references to abnormals.
28517
28518 2018-01-08 Richard Biener <rguenther@suse.de>
28519
28520 PR lto/83719
28521 * dwarf2out.c (output_indirect_strings): Handle empty
28522 skeleton_debug_str_hash.
28523 (dwarf2out_early_finish): Index strings for -gsplit-dwarf.
28524
28525 2018-01-08 Claudiu Zissulescu <claziss@synopsys.com>
28526
28527 * config/arc/arc.c (TARGET_TRAMPOLINE_ADJUST_ADDRESS): Delete.
28528 (emit_store_direct): Likewise.
28529 (arc_trampoline_adjust_address): Likewise.
28530 (arc_asm_trampoline_template): New function.
28531 (arc_initialize_trampoline): Use asm_trampoline_template.
28532 (TARGET_ASM_TRAMPOLINE_TEMPLATE): Define.
28533 * config/arc/arc.h (TRAMPOLINE_SIZE): Adjust to 16.
28534 * config/arc/arc.md (flush_icache): Delete pattern.
28535
28536 2018-01-08 Claudiu Zissulescu <claziss@synopsys.com>
28537
28538 * config/arc/arc-c.def (__ARC_UNALIGNED__): New define.
28539 * config/arc/arc.h (STRICT_ALIGNMENT): Control this macro using
28540 munaligned-access.
28541
28542 2018-01-08 Sebastian Huber <sebastian.huber@embedded-brains.de>
28543
28544 PR target/83681
28545 * config/epiphany/epiphany.h (make_pass_mode_switch_use): Guard
28546 by not USED_FOR_TARGET.
28547 (make_pass_resolve_sw_modes): Likewise.
28548
28549 2018-01-08 Sebastian Huber <sebastian.huber@embedded-brains.de>
28550
28551 * config/nios2/nios2.h (nios2_section_threshold): Guard by not
28552 USED_FOR_TARGET.
28553
28554 2018-01-08 Richard Biener <rguenther@suse.de>
28555
28556 PR middle-end/83580
28557 * tree-data-ref.c (split_constant_offset): Remove STRIP_NOPS.
28558
28559 2018-01-08 Richard Biener <rguenther@suse.de>
28560
28561 PR middle-end/83517
28562 * match.pd ((t * 2) / 2) -> t): Add missing :c.
28563
28564 2018-01-06 Aldy Hernandez <aldyh@redhat.com>
28565
28566 PR middle-end/81897
28567 * tree-ssa-uninit.c (compute_control_dep_chain): Do not bail on
28568 basic blocks with a small number of successors.
28569 (convert_control_dep_chain_into_preds): Improve handling of
28570 forwarder blocks.
28571 (dump_predicates): Split apart into...
28572 (dump_pred_chain): ...here...
28573 (dump_pred_info): ...and here.
28574 (can_one_predicate_be_invalidated_p): Add debugging printfs.
28575 (can_chain_union_be_invalidated_p): Improve check for invalidation
28576 of paths.
28577 (uninit_uses_cannot_happen): Avoid unnecessary if
28578 convert_control_dep_chain_into_preds yielded nothing.
28579
28580 2018-01-06 Martin Sebor <msebor@redhat.com>
28581
28582 PR tree-optimization/83640
28583 * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Avoid
28584 subtracting negative offset from size.
28585 (builtin_access::overlap): Adjust offset bounds of the access to fall
28586 within the size of the object if possible.
28587
28588 2018-01-06 Richard Sandiford <richard.sandiford@linaro.org>
28589
28590 PR rtl-optimization/83699
28591 * expmed.c (extract_bit_field_1): Restrict the vector usage of
28592 extract_bit_field_as_subreg to cases in which the extracted
28593 value is also a vector.
28594
28595 * lra-constraints.c (process_alt_operands): Test for the equivalence
28596 substitutions when detecting a possible reload cycle.
28597
28598 2018-01-06 Jakub Jelinek <jakub@redhat.com>
28599
28600 PR debug/83480
28601 * toplev.c (process_options): Don't enable debug_nonbind_markers_p
28602 by default if flag_selective_schedling{,2}. Formatting fixes.
28603
28604 PR rtl-optimization/83682
28605 * rtl.h (const_vec_duplicate_p): Only return true for VEC_DUPLICATE
28606 if it has non-VECTOR_MODE element mode.
28607 (vec_duplicate_p): Likewise.
28608
28609 PR middle-end/83694
28610 * cfgexpand.c (expand_debug_expr): Punt if mode1 is VOIDmode
28611 and bitsize might be greater than MAX_BITSIZE_MODE_ANY_INT.
28612
28613 2018-01-05 Jakub Jelinek <jakub@redhat.com>
28614
28615 PR target/83604
28616 * config/i386/i386-builtin.def
28617 (__builtin_ia32_vgf2p8affineinvqb_v64qi,
28618 __builtin_ia32_vgf2p8affineqb_v64qi, __builtin_ia32_vgf2p8mulb_v64qi):
28619 Require also OPTION_MASK_ISA_AVX512F in addition to
28620 OPTION_MASK_ISA_GFNI.
28621 (__builtin_ia32_vgf2p8affineinvqb_v16qi_mask,
28622 __builtin_ia32_vgf2p8affineqb_v16qi_mask): Require
28623 OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_SSE in addition
28624 to OPTION_MASK_ISA_GFNI.
28625 (__builtin_ia32_vgf2p8mulb_v32qi_mask): Require
28626 OPTION_MASK_ISA_AVX512VL in addition to OPTION_MASK_ISA_GFNI and
28627 OPTION_MASK_ISA_AVX512BW.
28628 (__builtin_ia32_vgf2p8mulb_v16qi_mask): Require
28629 OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_AVX512BW in
28630 addition to OPTION_MASK_ISA_GFNI.
28631 (__builtin_ia32_vgf2p8affineinvqb_v16qi,
28632 __builtin_ia32_vgf2p8affineqb_v16qi, __builtin_ia32_vgf2p8mulb_v16qi):
28633 Require OPTION_MASK_ISA_SSE2 instead of OPTION_MASK_ISA_SSE in addition
28634 to OPTION_MASK_ISA_GFNI.
28635 * config/i386/i386.c (def_builtin): Change to builtin isa/isa2 being
28636 a requirement for all ISAs rather than any of them with a few
28637 exceptions.
28638 (ix86_add_new_builtins): Clear OPTION_MASK_ISA_64BIT from isa before
28639 processing.
28640 (ix86_expand_builtin): Require all ISAs from builtin's isa and isa2
28641 bitmasks to be enabled with 3 exceptions, instead of requiring any
28642 enabled ISA with lots of exceptions.
28643 * config/i386/sse.md (vgf2p8affineinvqb_<mode><mask_name>,
28644 vgf2p8affineqb_<mode><mask_name>, vgf2p8mulb_<mode><mask_name>):
28645 Change avx512bw in isa attribute to avx512f.
28646 * config/i386/sgxintrin.h: Add license boilerplate.
28647 * config/i386/vaesintrin.h: Likewise. Fix macro spelling __AVX512F
28648 to __AVX512F__ and __AVX512VL to __AVX512VL__.
28649 (_mm256_aesdec_epi128, _mm256_aesdeclast_epi128, _mm256_aesenc_epi128,
28650 _mm256_aesenclast_epi128): Enable temporarily avx if __AVX__ is not
28651 defined.
28652 * config/i386/gfniintrin.h (_mm_gf2p8mul_epi8,
28653 _mm_gf2p8affineinv_epi64_epi8, _mm_gf2p8affine_epi64_epi8): Enable
28654 temporarily sse2 rather than sse if not enabled already.
28655
28656 PR target/83604
28657 * config/i386/sse.md (VI248_VLBW): Rename to ...
28658 (VI248_AVX512VL): ... this. Don't guard V32HI with TARGET_AVX512BW.
28659 (vpshrd_<mode><mask_name>, vpshld_<mode><mask_name>,
28660 vpshrdv_<mode>, vpshrdv_<mode>_mask, vpshrdv_<mode>_maskz,
28661 vpshrdv_<mode>_maskz_1, vpshldv_<mode>, vpshldv_<mode>_mask,
28662 vpshldv_<mode>_maskz, vpshldv_<mode>_maskz_1): Use VI248_AVX512VL
28663 mode iterator instead of VI248_VLBW.
28664
28665 2018-01-05 Jan Hubicka <hubicka@ucw.cz>
28666
28667 * ipa-fnsummary.c (record_modified_bb_info): Add OP.
28668 (record_modified): Skip clobbers; add debug output.
28669 (param_change_prob): Use sreal frequencies.
28670
28671 2018-01-05 Richard Sandiford <richard.sandiford@linaro.org>
28672
28673 * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Don't
28674 punt for user-aligned variables.
28675
28676 2018-01-05 Richard Sandiford <richard.sandiford@linaro.org>
28677
28678 * tree-chrec.c (chrec_contains_symbols): Return true for
28679 POLY_INT_CST.
28680
28681 2018-01-05 Sudakshina Das <sudi.das@arm.com>
28682
28683 PR target/82439
28684 * simplify-rtx.c (simplify_relational_operation_1): Add simplifications
28685 of (x|y) == x for BICS pattern.
28686
28687 2018-01-05 Jakub Jelinek <jakub@redhat.com>
28688
28689 PR tree-optimization/83605
28690 * gimple-ssa-strength-reduction.c: Include tree-eh.h.
28691 (find_candidates_dom_walker::before_dom_children): Ignore stmts that
28692 can throw.
28693
28694 2018-01-05 Sebastian Huber <sebastian.huber@embedded-brains.de>
28695
28696 * config.gcc (epiphany-*-elf*): Add (epiphany-*-rtems*) configuration.
28697 * config/epiphany/rtems.h: New file.
28698
28699 2018-01-04 Jakub Jelinek <jakub@redhat.com>
28700 Uros Bizjak <ubizjak@gmail.com>
28701
28702 PR target/83554
28703 * config/i386/i386.md (*<rotate_insn>hi3_1 splitter): Use
28704 QIreg_operand instead of register_operand predicate.
28705 * config/i386/i386.c (ix86_rop_should_change_byte_p,
28706 set_rop_modrm_reg_bits, ix86_mitigate_rop): Use -mmitigate-rop in
28707 comments instead of -fmitigate[-_]rop.
28708
28709 2018-01-04 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
28710
28711 PR bootstrap/81926
28712 * cgraphunit.c (symbol_table::compile): Switch to text_section
28713 before calling assembly_start debug hook.
28714 * run-rtl-passes.c (run_rtl_passes): Likewise.
28715 Include output.h.
28716
28717 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
28718
28719 * tree-vrp.c (extract_range_from_binary_expr_1): Check
28720 range_int_cst_p rather than !symbolic_range_p before calling
28721 extract_range_from_multiplicative_op_1.
28722
28723 2018-01-04 Jeff Law <law@redhat.com>
28724
28725 * tree-ssa-math-opts.c (execute_cse_reciprocals_1): Remove
28726 redundant test in assertion.
28727
28728 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
28729
28730 * doc/rtl.texi: Document machine_mode wrapper classes.
28731
28732 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
28733
28734 * fold-const.c (fold_ternary_loc): Check tree_fits_uhwi_p before
28735 using tree_to_uhwi.
28736
28737 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
28738
28739 * tree-ssa-forwprop.c (is_combined_permutation_identity): Allow
28740 the VEC_PERM_EXPR fold to fail.
28741
28742 2018-01-04 Jakub Jelinek <jakub@redhat.com>
28743
28744 PR debug/83585
28745 * bb-reorder.c (insert_section_boundary_note): Set has_bb_partition
28746 to switched_sections.
28747
28748 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
28749
28750 PR target/83680
28751 * config/arm/arm.c (arm_vectorize_vec_perm_const): Fix inverted
28752 test for d.testing.
28753
28754 2018-01-04 Peter Bergner <bergner@vnet.ibm.com>
28755
28756 PR target/83387
28757 * config/rs6000/rs6000.c (rs6000_discover_homogeneous_aggregate): Do not
28758 allow arguments in FP registers if TARGET_HARD_FLOAT is false.
28759
28760 2018-01-04 Jakub Jelinek <jakub@redhat.com>
28761
28762 PR debug/83666
28763 * cfgexpand.c (expand_debug_expr) <case BIT_FIELD_REF>: Punt if mode
28764 is BLKmode and bitpos not zero or mode change is needed.
28765
28766 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
28767
28768 PR target/83675
28769 * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): Require
28770 TARGET_VIS2.
28771
28772 2018-01-04 Uros Bizjak <ubizjak@gmail.com>
28773
28774 PR target/83628
28775 * config/alpha/alpha.md (*sadd<modesuffix>): Use ASHIFT
28776 instead of MULT rtx. Update all corresponding splitters.
28777 (*saddl_se): Ditto.
28778 (*ssub<modesuffix>): Ditto.
28779 (*ssubl_se): Ditto.
28780 (*cmp_sadd_di): Update split patterns.
28781 (*cmp_sadd_si): Ditto.
28782 (*cmp_sadd_sidi): Ditto.
28783 (*cmp_ssub_di): Ditto.
28784 (*cmp_ssub_si): Ditto.
28785 (*cmp_ssub_sidi): Ditto.
28786 * config/alpha/predicates.md (const23_operand): New predicate.
28787 * config/alpha/alpha.c (alpha_rtx_costs) [PLUS, MINUS]:
28788 Look for ASHIFT, not MULT inner operand.
28789 (alpha_split_conditional_move): Update for *sadd<modesuffix> change.
28790
28791 2018-01-04 Martin Liska <mliska@suse.cz>
28792
28793 PR gcov-profile/83669
28794 * gcov.c (output_intermediate_file): Add version to intermediate
28795 gcov file.
28796 * doc/gcov.texi: Document new field 'version' in intermediate
28797 file format. Fix location of '-k' option of gcov command.
28798
28799 2018-01-04 Martin Liska <mliska@suse.cz>
28800
28801 PR ipa/82352
28802 * ipa-icf.c (sem_function::merge): Do not cross comdat boundary.
28803
28804 2018-01-04 Jakub Jelinek <jakub@redhat.com>
28805
28806 * gimple-ssa-sprintf.c (parse_directive): Cast second dir.len to uhwi.
28807
28808 2018-01-03 Martin Sebor <msebor@redhat.com>
28809
28810 PR tree-optimization/83655
28811 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call): Avoid
28812 checking calls with invalid arguments.
28813
28814 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28815
28816 * tree-vect-stmts.c (vect_get_store_rhs): New function.
28817 (vectorizable_mask_load_store): Delete.
28818 (vectorizable_call): Return false for masked loads and stores.
28819 (vectorizable_store): Handle IFN_MASK_STORE. Use vect_get_store_rhs
28820 instead of gimple_assign_rhs1.
28821 (vectorizable_load): Handle IFN_MASK_LOAD.
28822 (vect_transform_stmt): Don't set is_store for call_vec_info_type.
28823
28824 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28825
28826 * tree-vect-stmts.c (vect_build_gather_load_calls): New function,
28827 split out from..,
28828 (vectorizable_mask_load_store): ...here.
28829 (vectorizable_load): ...and here.
28830
28831 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28832
28833 * tree-vect-stmts.c (vect_build_all_ones_mask)
28834 (vect_build_zero_merge_argument): New functions, split out from...
28835 (vectorizable_load): ...here.
28836
28837 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28838
28839 * tree-vect-stmts.c (vect_check_store_rhs): New function,
28840 split out from...
28841 (vectorizable_mask_load_store): ...here.
28842 (vectorizable_store): ...and here.
28843
28844 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28845
28846 * tree-vect-stmts.c (vect_check_load_store_mask): New function,
28847 split out from...
28848 (vectorizable_mask_load_store): ...here.
28849
28850 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28851
28852 * tree-vectorizer.h (vec_load_store_type): Moved from tree-vec-stmts.c
28853 (vect_model_store_cost): Take a vec_load_store_type instead of a
28854 vect_def_type.
28855 * tree-vect-stmts.c (vec_load_store_type): Move to tree-vectorizer.h.
28856 (vect_model_store_cost): Take a vec_load_store_type instead of a
28857 vect_def_type.
28858 (vectorizable_mask_load_store): Update accordingly.
28859 (vectorizable_store): Likewise.
28860 * tree-vect-slp.c (vect_analyze_slp_cost_1): Update accordingly.
28861
28862 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28863
28864 * tree-vect-loop.c (vect_transform_loop): Stub out scalar
28865 IFN_MASK_LOAD calls here rather than...
28866 * tree-vect-stmts.c (vectorizable_mask_load_store): ...here.
28867
28868 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28869 Alan Hayward <alan.hayward@arm.com>
28870 David Sherwood <david.sherwood@arm.com>
28871
28872 * expmed.c (extract_bit_field_1): For vector extracts,
28873 fall back to extract_bit_field_as_subreg if vec_extract
28874 isn't available.
28875
28876 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28877 Alan Hayward <alan.hayward@arm.com>
28878 David Sherwood <david.sherwood@arm.com>
28879
28880 * lra-spills.c (pseudo_reg_slot_compare): Sort slots by whether
28881 they are variable or constant sized.
28882 (assign_stack_slot_num_and_sort_pseudos): Don't reuse variable-sized
28883 slots for constant-sized data.
28884
28885 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28886 Alan Hayward <alan.hayward@arm.com>
28887 David Sherwood <david.sherwood@arm.com>
28888
28889 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): When
28890 handling COND_EXPRs with boolean comparisons, try to find a better
28891 basis for the mask type than the boolean itself.
28892
28893 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28894
28895 * doc/rtl.texi (MAX_BITSIZE_MODE_ANY_MODE): Describe how the default
28896 is calculated and how it can be overridden.
28897 * genmodes.c (max_bitsize_mode_any_mode): New variable.
28898 (create_modes): Initialize it from MAX_BITSIZE_MODE_ANY_MODE,
28899 if defined.
28900 (emit_max_int): Use it to set the output MAX_BITSIZE_MODE_ANY_MODE,
28901 if nonzero.
28902
28903 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28904 Alan Hayward <alan.hayward@arm.com>
28905 David Sherwood <david.sherwood@arm.com>
28906
28907 * config/aarch64/aarch64-protos.h (aarch64_output_simd_mov_immediate):
28908 Remove the mode argument.
28909 (aarch64_simd_valid_immediate): Remove the mode and inverse
28910 arguments.
28911 * config/aarch64/iterators.md (bitsize): New iterator.
28912 * config/aarch64/aarch64-simd.md (*aarch64_simd_mov<mode>, and<mode>3)
28913 (ior<mode>3): Update calls to aarch64_output_simd_mov_immediate.
28914 * config/aarch64/constraints.md (Do, Db, Dn): Update calls to
28915 aarch64_simd_valid_immediate.
28916 * config/aarch64/predicates.md (aarch64_reg_or_orr_imm): Likewise.
28917 (aarch64_reg_or_bic_imm): Likewise.
28918 * config/aarch64/aarch64.c (simd_immediate_info): Replace mvn
28919 with an insn_type enum and msl with a modifier_type enum.
28920 Replace element_width with a scalar_mode. Change the shift
28921 to unsigned int. Add constructors for scalar_float_mode and
28922 scalar_int_mode elements.
28923 (aarch64_vect_float_const_representable_p): Delete.
28924 (aarch64_can_const_movi_rtx_p)
28925 (aarch64_simd_scalar_immediate_valid_for_move)
28926 (aarch64_simd_make_constant): Update call to
28927 aarch64_simd_valid_immediate.
28928 (aarch64_advsimd_valid_immediate_hs): New function.
28929 (aarch64_advsimd_valid_immediate): Likewise.
28930 (aarch64_simd_valid_immediate): Remove mode and inverse
28931 arguments. Rewrite to use the above. Use const_vec_duplicate_p
28932 to detect duplicated constants and use aarch64_float_const_zero_rtx_p
28933 and aarch64_float_const_representable_p on the result.
28934 (aarch64_output_simd_mov_immediate): Remove mode argument.
28935 Update call to aarch64_simd_valid_immediate and use of
28936 simd_immediate_info.
28937 (aarch64_output_scalar_simd_mov_immediate): Update call
28938 accordingly.
28939
28940 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28941 Alan Hayward <alan.hayward@arm.com>
28942 David Sherwood <david.sherwood@arm.com>
28943
28944 * machmode.h (mode_precision): Prefix with CONST_MODE_PRECISION.
28945 (mode_nunits): Likewise CONST_MODE_NUNITS.
28946 * machmode.def (ADJUST_NUNITS): Document.
28947 * genmodes.c (mode_data::need_nunits_adj): New field.
28948 (blank_mode): Update accordingly.
28949 (adj_nunits): New variable.
28950 (print_maybe_const_decl): Replace CATEGORY with a NEEDS_ADJ
28951 parameter.
28952 (emit_mode_size_inline): Set need_bytesize_adj for all modes
28953 listed in adj_nunits.
28954 (emit_mode_nunits_inline): Set need_nunits_adj for all modes
28955 listed in adj_nunits. Don't emit case statements for such modes.
28956 (emit_insn_modes_h): Emit definitions of CONST_MODE_NUNITS
28957 and CONST_MODE_PRECISION. Make CONST_MODE_SIZE expand to
28958 nothing if adj_nunits is nonnull.
28959 (emit_mode_precision, emit_mode_nunits): Use print_maybe_const_decl.
28960 (emit_mode_unit_size, emit_mode_base_align, emit_mode_ibit)
28961 (emit_mode_fbit): Update use of print_maybe_const_decl.
28962 (emit_move_size): Likewise. Treat the array as non-const
28963 if adj_nunits.
28964 (emit_mode_adjustments): Handle adj_nunits.
28965
28966 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28967
28968 * machmode.def (VECTOR_MODES_WITH_PREFIX): Document.
28969 * genmodes.c (VECTOR_MODES_WITH_PREFIX): New macro.
28970 (VECTOR_MODES): Use it.
28971 (make_vector_modes): Take the prefix as an argument.
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 * mode-classes.def (MODE_VECTOR_BOOL): New mode class.
28978 * machmode.h (INTEGRAL_MODE_P, VECTOR_MODE_P): Return true
28979 for MODE_VECTOR_BOOL.
28980 * machmode.def (VECTOR_BOOL_MODE): Document.
28981 * genmodes.c (VECTOR_BOOL_MODE): New macro.
28982 (make_vector_bool_mode): New function.
28983 (complete_mode, emit_mode_wider, emit_mode_adjustments): Handle
28984 MODE_VECTOR_BOOL.
28985 * lto-streamer-in.c (lto_input_mode_table): Likewise.
28986 * rtx-vector-builder.c (rtx_vector_builder::find_cached_value):
28987 Likewise.
28988 * stor-layout.c (int_mode_for_mode): Likewise.
28989 * tree.c (build_vector_type_for_mode): Likewise.
28990 * varasm.c (output_constant_pool_2): Likewise.
28991 * emit-rtl.c (init_emit_once): Make sure that CONST1_RTX (BImode) and
28992 CONSTM1_RTX (BImode) are the same thing. Initialize const_tiny_rtx
28993 for MODE_VECTOR_BOOL.
28994 * expr.c (expand_expr_real_1): Use VECTOR_MODE_P instead of a list
28995 of mode class checks.
28996 * tree-vect-generic.c (expand_vector_operation): Use VECTOR_MODE_P
28997 instead of a list of mode class checks.
28998 (expand_vector_scalar_condition): Likewise.
28999 (type_for_widest_vector_mode): Handle BImode as an inner mode.
29000
29001 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29002 Alan Hayward <alan.hayward@arm.com>
29003 David Sherwood <david.sherwood@arm.com>
29004
29005 * machmode.h (mode_size): Change from unsigned short to
29006 poly_uint16_pod.
29007 (mode_to_bytes): Return a poly_uint16 rather than an unsigned short.
29008 (GET_MODE_SIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
29009 or if measurement_type is not polynomial.
29010 (fixed_size_mode::includes_p): Check for constant-sized modes.
29011 * genmodes.c (emit_mode_size_inline): Make mode_size_inline
29012 return a poly_uint16 rather than an unsigned short.
29013 (emit_mode_size): Change the type of mode_size from unsigned short
29014 to poly_uint16_pod. Use ZERO_COEFFS for the initializer.
29015 (emit_mode_adjustments): Cope with polynomial vector sizes.
29016 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
29017 for GET_MODE_SIZE.
29018 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
29019 for GET_MODE_SIZE.
29020 * auto-inc-dec.c (try_merge): Treat GET_MODE_SIZE as polynomial.
29021 * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Likewise.
29022 * caller-save.c (setup_save_areas): Likewise.
29023 (replace_reg_with_saved_mem): Likewise.
29024 * calls.c (emit_library_call_value_1): Likewise.
29025 * combine-stack-adj.c (combine_stack_adjustments_for_block): Likewise.
29026 * combine.c (simplify_set, make_extraction, simplify_shift_const_1)
29027 (gen_lowpart_for_combine): Likewise.
29028 * convert.c (convert_to_integer_1): Likewise.
29029 * cse.c (equiv_constant, cse_insn): Likewise.
29030 * cselib.c (autoinc_split, cselib_hash_rtx): Likewise.
29031 (cselib_subst_to_values): Likewise.
29032 * dce.c (word_dce_process_block): Likewise.
29033 * df-problems.c (df_word_lr_mark_ref): Likewise.
29034 * dwarf2cfi.c (init_one_dwarf_reg_size): Likewise.
29035 * dwarf2out.c (multiple_reg_loc_descriptor, mem_loc_descriptor)
29036 (concat_loc_descriptor, concatn_loc_descriptor, loc_descriptor)
29037 (rtl_for_decl_location): Likewise.
29038 * emit-rtl.c (gen_highpart, widen_memory_access): Likewise.
29039 * expmed.c (extract_bit_field_1, extract_integral_bit_field): Likewise.
29040 * expr.c (emit_group_load_1, clear_storage_hints): Likewise.
29041 (emit_move_complex, emit_move_multi_word, emit_push_insn): Likewise.
29042 (expand_expr_real_1): Likewise.
29043 * function.c (assign_parm_setup_block_p, assign_parm_setup_block)
29044 (pad_below): Likewise.
29045 * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
29046 * gimple-ssa-store-merging.c (rhs_valid_for_store_merging_p): Likewise.
29047 * ira.c (get_subreg_tracking_sizes): Likewise.
29048 * ira-build.c (ira_create_allocno_objects): Likewise.
29049 * ira-color.c (coalesced_pseudo_reg_slot_compare): Likewise.
29050 (ira_sort_regnos_for_alter_reg): Likewise.
29051 * ira-costs.c (record_operand_costs): Likewise.
29052 * lower-subreg.c (interesting_mode_p, simplify_gen_subreg_concatn)
29053 (resolve_simple_move): Likewise.
29054 * lra-constraints.c (get_reload_reg, operands_match_p): Likewise.
29055 (process_addr_reg, simplify_operand_subreg, curr_insn_transform)
29056 (lra_constraints): Likewise.
29057 (CONST_POOL_OK_P): Reject variable-sized modes.
29058 * lra-spills.c (slot, assign_mem_slot, pseudo_reg_slot_compare)
29059 (add_pseudo_to_slot, lra_spill): Likewise.
29060 * omp-low.c (omp_clause_aligned_alignment): Likewise.
29061 * optabs-query.c (get_best_extraction_insn): Likewise.
29062 * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
29063 * optabs.c (expand_vec_perm_var, expand_vec_cond_expr): Likewise.
29064 (expand_mult_highpart, valid_multiword_target_p): Likewise.
29065 * recog.c (offsettable_address_addr_space_p): Likewise.
29066 * regcprop.c (maybe_mode_change): Likewise.
29067 * reginfo.c (choose_hard_reg_mode, record_subregs_of_mode): Likewise.
29068 * regrename.c (build_def_use): Likewise.
29069 * regstat.c (dump_reg_info): Likewise.
29070 * reload.c (complex_word_subreg_p, push_reload, find_dummy_reload)
29071 (find_reloads, find_reloads_subreg_address): Likewise.
29072 * reload1.c (eliminate_regs_1): Likewise.
29073 * rtlanal.c (for_each_inc_dec_find_inc_dec, rtx_cost): Likewise.
29074 * simplify-rtx.c (avoid_constant_pool_reference): Likewise.
29075 (simplify_binary_operation_1, simplify_subreg): Likewise.
29076 * targhooks.c (default_function_arg_padding): Likewise.
29077 (default_hard_regno_nregs, default_class_max_nregs): Likewise.
29078 * tree-cfg.c (verify_gimple_assign_binary): Likewise.
29079 (verify_gimple_assign_ternary): Likewise.
29080 * tree-inline.c (estimate_move_cost): Likewise.
29081 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
29082 * tree-ssa-loop-ivopts.c (add_autoinc_candidates): Likewise.
29083 (get_address_cost_ainc): Likewise.
29084 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Likewise.
29085 (vect_supportable_dr_alignment): Likewise.
29086 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
29087 (vectorizable_reduction): Likewise.
29088 * tree-vect-stmts.c (vectorizable_assignment, vectorizable_shift)
29089 (vectorizable_operation, vectorizable_load): Likewise.
29090 * tree.c (build_same_sized_truth_vector_type): Likewise.
29091 * valtrack.c (cleanup_auto_inc_dec): Likewise.
29092 * var-tracking.c (emit_note_insn_var_location): Likewise.
29093 * config/arc/arc.h (ASM_OUTPUT_CASE_END): Use as_a <scalar_int_mode>.
29094 (ADDR_VEC_ALIGN): Likewise.
29095
29096 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29097 Alan Hayward <alan.hayward@arm.com>
29098 David Sherwood <david.sherwood@arm.com>
29099
29100 * machmode.h (mode_to_bits): Return a poly_uint16 rather than an
29101 unsigned short.
29102 (GET_MODE_BITSIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
29103 or if measurement_type is polynomial.
29104 * calls.c (shift_return_value): Treat GET_MODE_BITSIZE as polynomial.
29105 * combine.c (make_extraction): Likewise.
29106 * dse.c (find_shift_sequence): Likewise.
29107 * dwarf2out.c (mem_loc_descriptor): Likewise.
29108 * expmed.c (store_integral_bit_field, extract_bit_field_1): Likewise.
29109 (extract_bit_field, extract_low_bits): Likewise.
29110 * expr.c (convert_move, convert_modes, emit_move_insn_1): Likewise.
29111 (optimize_bitfield_assignment_op, expand_assignment): Likewise.
29112 (store_expr_with_bounds, store_field, expand_expr_real_1): Likewise.
29113 * fold-const.c (optimize_bit_field_compare, merge_ranges): Likewise.
29114 * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
29115 * reload.c (find_reloads): Likewise.
29116 * reload1.c (alter_reg): Likewise.
29117 * stor-layout.c (bitwise_mode_for_mode, compute_record_mode): Likewise.
29118 * targhooks.c (default_secondary_memory_needed_mode): Likewise.
29119 * tree-if-conv.c (predicate_mem_writes): Likewise.
29120 * tree-ssa-strlen.c (handle_builtin_memcmp): Likewise.
29121 * tree-vect-patterns.c (adjust_bool_pattern): Likewise.
29122 * tree-vect-stmts.c (vectorizable_simd_clone_call): Likewise.
29123 * valtrack.c (dead_debug_insert_temp): Likewise.
29124 * varasm.c (mergeable_constant_section): Likewise.
29125 * config/sh/sh.h (LOCAL_ALIGNMENT): Use as_a <fixed_size_mode>.
29126
29127 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29128 Alan Hayward <alan.hayward@arm.com>
29129 David Sherwood <david.sherwood@arm.com>
29130
29131 * expr.c (expand_assignment): Cope with polynomial mode sizes
29132 when assigning to a CONCAT.
29133
29134 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29135 Alan Hayward <alan.hayward@arm.com>
29136 David Sherwood <david.sherwood@arm.com>
29137
29138 * machmode.h (mode_precision): Change from unsigned short to
29139 poly_uint16_pod.
29140 (mode_to_precision): Return a poly_uint16 rather than an unsigned
29141 short.
29142 (GET_MODE_PRECISION): Return a constant if ONLY_FIXED_SIZE_MODES,
29143 or if measurement_type is not polynomial.
29144 (HWI_COMPUTABLE_MODE_P): Turn into a function. Optimize the case
29145 in which the mode is already known to be a scalar_int_mode.
29146 * genmodes.c (emit_mode_precision): Change the type of mode_precision
29147 from unsigned short to poly_uint16_pod. Use ZERO_COEFFS for the
29148 initializer.
29149 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
29150 for GET_MODE_PRECISION.
29151 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
29152 for GET_MODE_PRECISION.
29153 * combine.c (update_rsp_from_reg_equal): Treat GET_MODE_PRECISION
29154 as polynomial.
29155 (try_combine, find_split_point, combine_simplify_rtx): Likewise.
29156 (expand_field_assignment, make_extraction): Likewise.
29157 (make_compound_operation_int, record_dead_and_set_regs_1): Likewise.
29158 (get_last_value): Likewise.
29159 * convert.c (convert_to_integer_1): Likewise.
29160 * cse.c (cse_insn): Likewise.
29161 * expr.c (expand_expr_real_1): Likewise.
29162 * lra-constraints.c (simplify_operand_subreg): Likewise.
29163 * optabs-query.c (can_atomic_load_p): Likewise.
29164 * optabs.c (expand_atomic_load): Likewise.
29165 (expand_atomic_store): Likewise.
29166 * ree.c (combine_reaching_defs): Likewise.
29167 * rtl.h (partial_subreg_p, paradoxical_subreg_p): Likewise.
29168 * rtlanal.c (nonzero_bits1, lsb_bitfield_op_p): Likewise.
29169 * tree.h (type_has_mode_precision_p): Likewise.
29170 * ubsan.c (instrument_si_overflow): Likewise.
29171
29172 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29173 Alan Hayward <alan.hayward@arm.com>
29174 David Sherwood <david.sherwood@arm.com>
29175
29176 * tree.h (TYPE_VECTOR_SUBPARTS): Turn into a function and handle
29177 polynomial numbers of units.
29178 (SET_TYPE_VECTOR_SUBPARTS): Likewise.
29179 (valid_vector_subparts_p): New function.
29180 (build_vector_type): Remove temporary shim and take the number
29181 of units as a poly_uint64 rather than an int.
29182 (build_opaque_vector_type): Take the number of units as a
29183 poly_uint64 rather than an int.
29184 * tree.c (build_vector_from_ctor): Handle polynomial
29185 TYPE_VECTOR_SUBPARTS.
29186 (type_hash_canon_hash, type_cache_hasher::equal): Likewise.
29187 (uniform_vector_p, vector_type_mode, build_vector): Likewise.
29188 (build_vector_from_val): If the number of units is variable,
29189 use build_vec_duplicate_cst for constant operands and
29190 VEC_DUPLICATE_EXPR otherwise.
29191 (make_vector_type): Remove temporary is_constant ().
29192 (build_vector_type, build_opaque_vector_type): Take the number of
29193 units as a poly_uint64 rather than an int.
29194 (check_vector_cst): Handle polynomial TYPE_VECTOR_SUBPARTS and
29195 VECTOR_CST_NELTS.
29196 * cfgexpand.c (expand_debug_expr): Likewise.
29197 * expr.c (count_type_elements, categorize_ctor_elements_1): Likewise.
29198 (store_constructor, expand_expr_real_1): Likewise.
29199 (const_scalar_mask_from_tree): Likewise.
29200 * fold-const-call.c (fold_const_reduction): Likewise.
29201 * fold-const.c (const_binop, const_unop, fold_convert_const): Likewise.
29202 (operand_equal_p, fold_vec_perm, fold_ternary_loc): Likewise.
29203 (native_encode_vector, vec_cst_ctor_to_array): Likewise.
29204 (fold_relational_const): Likewise.
29205 (native_interpret_vector): Likewise. Change the size from an
29206 int to an unsigned int.
29207 * gimple-fold.c (gimple_fold_stmt_to_constant_1): Handle polynomial
29208 TYPE_VECTOR_SUBPARTS.
29209 (gimple_fold_indirect_ref, gimple_build_vector): Likewise.
29210 (gimple_build_vector_from_val): Use VEC_DUPLICATE_EXPR when
29211 duplicating a non-constant operand into a variable-length vector.
29212 * hsa-brig.c (hsa_op_immed::emit_to_buffer): Handle polynomial
29213 TYPE_VECTOR_SUBPARTS and VECTOR_CST_NELTS.
29214 * ipa-icf.c (sem_variable::equals): Likewise.
29215 * match.pd: Likewise.
29216 * omp-simd-clone.c (simd_clone_subparts): Likewise.
29217 * print-tree.c (print_node): Likewise.
29218 * stor-layout.c (layout_type): Likewise.
29219 * targhooks.c (default_builtin_vectorization_cost): Likewise.
29220 * tree-cfg.c (verify_gimple_comparison): Likewise.
29221 (verify_gimple_assign_binary): Likewise.
29222 (verify_gimple_assign_ternary): Likewise.
29223 (verify_gimple_assign_single): Likewise.
29224 * tree-pretty-print.c (dump_generic_node): Likewise.
29225 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
29226 (simplify_bitfield_ref, is_combined_permutation_identity): Likewise.
29227 * tree-vect-data-refs.c (vect_permute_store_chain): Likewise.
29228 (vect_grouped_load_supported, vect_permute_load_chain): Likewise.
29229 (vect_shift_permute_load_chain): Likewise.
29230 * tree-vect-generic.c (nunits_for_known_piecewise_op): Likewise.
29231 (expand_vector_condition, optimize_vector_constructor): Likewise.
29232 (lower_vec_perm, get_compute_type): Likewise.
29233 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
29234 (get_initial_defs_for_reduction, vect_transform_loop): Likewise.
29235 * tree-vect-patterns.c (vect_recog_bool_pattern): Likewise.
29236 (vect_recog_mask_conversion_pattern): Likewise.
29237 * tree-vect-slp.c (vect_supported_load_permutation_p): Likewise.
29238 (vect_get_constant_vectors, vect_transform_slp_perm_load): Likewise.
29239 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
29240 (get_group_load_store_type, vectorizable_mask_load_store): Likewise.
29241 (vectorizable_bswap, simd_clone_subparts, vectorizable_assignment)
29242 (vectorizable_shift, vectorizable_operation, vectorizable_store)
29243 (vectorizable_load, vect_is_simple_cond, vectorizable_comparison)
29244 (supportable_widening_operation): Likewise.
29245 (supportable_narrowing_operation): Likewise.
29246 * tree-vector-builder.c (tree_vector_builder::binary_encoded_nelts):
29247 Likewise.
29248 * varasm.c (output_constant): Likewise.
29249
29250 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29251 Alan Hayward <alan.hayward@arm.com>
29252 David Sherwood <david.sherwood@arm.com>
29253
29254 * tree-vect-data-refs.c (vect_permute_store_chain): Reorganize
29255 so that both the length == 3 and length != 3 cases set up their
29256 own permute vectors. Add comments explaining why we know the
29257 number of elements is constant.
29258 (vect_permute_load_chain): Likewise.
29259
29260 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29261 Alan Hayward <alan.hayward@arm.com>
29262 David Sherwood <david.sherwood@arm.com>
29263
29264 * machmode.h (mode_nunits): Change from unsigned char to
29265 poly_uint16_pod.
29266 (ONLY_FIXED_SIZE_MODES): New macro.
29267 (pod_mode::measurement_type, scalar_int_mode::measurement_type)
29268 (scalar_float_mode::measurement_type, scalar_mode::measurement_type)
29269 (complex_mode::measurement_type, fixed_size_mode::measurement_type):
29270 New typedefs.
29271 (mode_to_nunits): Return a poly_uint16 rather than an unsigned short.
29272 (GET_MODE_NUNITS): Return a constant if ONLY_FIXED_SIZE_MODES,
29273 or if measurement_type is not polynomial.
29274 * genmodes.c (ZERO_COEFFS): New macro.
29275 (emit_mode_nunits_inline): Make mode_nunits_inline return a
29276 poly_uint16.
29277 (emit_mode_nunits): Change the type of mode_nunits to poly_uint16_pod.
29278 Use ZERO_COEFFS when emitting initializers.
29279 * data-streamer.h (bp_pack_poly_value): New function.
29280 (bp_unpack_poly_value): Likewise.
29281 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
29282 for GET_MODE_NUNITS.
29283 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
29284 for GET_MODE_NUNITS.
29285 * tree.c (make_vector_type): Remove temporary shim and make
29286 the real function take the number of units as a poly_uint64
29287 rather than an int.
29288 (build_vector_type_for_mode): Handle polynomial nunits.
29289 * dwarf2out.c (loc_descriptor, add_const_value_attribute): Likewise.
29290 * emit-rtl.c (const_vec_series_p_1): Likewise.
29291 (gen_rtx_CONST_VECTOR): Likewise.
29292 * fold-const.c (test_vec_duplicate_folding): Likewise.
29293 * genrecog.c (validate_pattern): Likewise.
29294 * optabs-query.c (can_vec_perm_var_p, can_mult_highpart_p): Likewise.
29295 * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
29296 * optabs.c (expand_vector_broadcast, expand_binop_directly): Likewise.
29297 (shift_amt_for_vec_perm_mask, expand_vec_perm_var): Likewise.
29298 (expand_vec_cond_expr, expand_mult_highpart): Likewise.
29299 * rtlanal.c (subreg_get_info): Likewise.
29300 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
29301 (vect_grouped_load_supported): Likewise.
29302 * tree-vect-generic.c (type_for_widest_vector_mode): Likewise.
29303 * tree-vect-loop.c (have_whole_vector_shift): Likewise.
29304 * simplify-rtx.c (simplify_unary_operation_1): Likewise.
29305 (simplify_const_unary_operation, simplify_binary_operation_1)
29306 (simplify_const_binary_operation, simplify_ternary_operation)
29307 (test_vector_ops_duplicate, test_vector_ops): Likewise.
29308 (simplify_immed_subreg): Use GET_MODE_NUNITS on a fixed_size_mode
29309 instead of CONST_VECTOR_NUNITS.
29310 * varasm.c (output_constant_pool_2): Likewise.
29311 * rtx-vector-builder.c (rtx_vector_builder::build): Only include the
29312 explicit-encoded elements in the XVEC for variable-length vectors.
29313
29314 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29315
29316 * lra-constraints.c (curr_insn_transform): Use partial_subreg_p.
29317
29318 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29319 Alan Hayward <alan.hayward@arm.com>
29320 David Sherwood <david.sherwood@arm.com>
29321
29322 * coretypes.h (fixed_size_mode): Declare.
29323 (fixed_size_mode_pod): New typedef.
29324 * builtins.h (target_builtins::x_apply_args_mode)
29325 (target_builtins::x_apply_result_mode): Change type to
29326 fixed_size_mode_pod.
29327 * builtins.c (apply_args_size, apply_result_size, result_vector)
29328 (expand_builtin_apply_args_1, expand_builtin_apply)
29329 (expand_builtin_return): Update accordingly.
29330
29331 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29332
29333 * cse.c (hash_rtx_cb): Hash only the encoded elements.
29334 * cselib.c (cselib_hash_rtx): Likewise.
29335 * expmed.c (make_tree): Build VECTOR_CSTs directly from the
29336 CONST_VECTOR encoding.
29337
29338 2018-01-03 Jakub Jelinek <jakub@redhat.com>
29339 Jeff Law <law@redhat.com>
29340
29341 PR target/83641
29342 * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): For
29343 noreturn probe, use gen_pop instead of ix86_emit_restore_reg_using_pop,
29344 only set RTX_FRAME_RELATED_P on both the push and pop if cfa_reg is sp
29345 and add REG_CFA_ADJUST_CFA notes in that case to both insns.
29346
29347 PR target/83641
29348 * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): Do not
29349 explicitly probe *sp in a noreturn function if there were any callee
29350 register saves or frame pointer is needed.
29351
29352 2018-01-03 Jakub Jelinek <jakub@redhat.com>
29353
29354 PR debug/83621
29355 * cfgexpand.c (expand_debug_expr): Return NULL if mode is
29356 BLKmode for ternary, binary or unary expressions.
29357
29358 PR debug/83645
29359 * var-tracking.c (delete_vta_debug_insn): New inline function.
29360 (delete_vta_debug_insns): Add USE_CFG argument, if true, walk just
29361 insns from get_insns () to NULL instead of each bb separately.
29362 Use delete_vta_debug_insn. No longer static.
29363 (vt_debug_insns_local, variable_tracking_main_1): Adjust
29364 delete_vta_debug_insns callers.
29365 * rtl.h (delete_vta_debug_insns): Declare.
29366 * final.c (rest_of_handle_final): Call delete_vta_debug_insns
29367 instead of variable_tracking_main.
29368
29369 2018-01-03 Martin Sebor <msebor@redhat.com>
29370
29371 PR tree-optimization/83603
29372 * calls.c (maybe_warn_nonstring_arg): Avoid accessing function
29373 arguments past the endof the argument list in functions declared
29374 without a prototype.
29375 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call):
29376 Avoid checking when arguments are null.
29377
29378 2018-01-03 Martin Sebor <msebor@redhat.com>
29379
29380 PR c/83559
29381 * doc/extend.texi (attribute const): Fix a typo.
29382 * ipa-pure-const.c ((warn_function_const, warn_function_pure): Avoid
29383 issuing -Wsuggest-attribute for void functions.
29384
29385 2018-01-03 Martin Sebor <msebor@redhat.com>
29386
29387 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Use
29388 offset_int::from instead of wide_int::to_shwi.
29389 (maybe_diag_overlap): Remove assertion.
29390 Use HOST_WIDE_INT_PRINT_DEC instead of %lli.
29391 * gimple-ssa-sprintf.c (format_directive): Same.
29392 (parse_directive): Same.
29393 (sprintf_dom_walker::compute_format_length): Same.
29394 (try_substitute_return_value): Same.
29395
29396 2018-01-03 Jeff Law <law@redhat.com>
29397
29398 PR middle-end/83654
29399 * explow.c (anti_adjust_stack_and_probe_stack_clash): Test a
29400 non-constant residual for zero at runtime and avoid probing in
29401 that case. Reorganize code for trailing problem to mirror handling
29402 of the residual.
29403
29404 2018-01-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
29405
29406 PR tree-optimization/83501
29407 * tree-ssa-strlen.c (get_string_cst): New.
29408 (handle_char_store): Call get_string_cst.
29409
29410 2018-01-03 Martin Liska <mliska@suse.cz>
29411
29412 PR tree-optimization/83593
29413 * tree-ssa-strlen.c: Include tree-cfg.h.
29414 (strlen_check_and_optimize_stmt): Add new argument cleanup_eh.
29415 (strlen_dom_walker): Add new member variable m_cleanup_cfg.
29416 (strlen_dom_walker::strlen_dom_walker): Initialize m_cleanup_cfg
29417 to false.
29418 (strlen_dom_walker::before_dom_children): Call
29419 gimple_purge_dead_eh_edges. Dump tranformation with details
29420 dump flags.
29421 (strlen_dom_walker::before_dom_children): Update call by adding
29422 new argument cleanup_eh.
29423 (pass_strlen::execute): Return TODO_cleanup_cfg if needed.
29424
29425 2018-01-03 Martin Liska <mliska@suse.cz>
29426
29427 PR ipa/83549
29428 * cif-code.def (VARIADIC_THUNK): New enum value.
29429 * ipa-fnsummary.c (compute_fn_summary): Do not inline variadic
29430 thunks.
29431
29432 2018-01-03 Jan Beulich <jbeulich@suse.com>
29433
29434 * sse.md (mov<mode>_internal): Tighten condition for when to use
29435 vmovdqu<ssescalarsize> for TI and OI modes.
29436
29437 2018-01-03 Jakub Jelinek <jakub@redhat.com>
29438
29439 Update copyright years.
29440
29441 2018-01-03 Martin Liska <mliska@suse.cz>
29442
29443 PR ipa/83594
29444 * ipa-visibility.c (function_and_variable_visibility): Skip
29445 functions with noipa attribure.
29446
29447 2018-01-03 Jakub Jelinek <jakub@redhat.com>
29448
29449 * gcc.c (process_command): Update copyright notice dates.
29450 * gcov-dump.c (print_version): Ditto.
29451 * gcov.c (print_version): Ditto.
29452 * gcov-tool.c (print_version): Ditto.
29453 * gengtype.c (create_file): Ditto.
29454 * doc/cpp.texi: Bump @copying's copyright year.
29455 * doc/cppinternals.texi: Ditto.
29456 * doc/gcc.texi: Ditto.
29457 * doc/gccint.texi: Ditto.
29458 * doc/gcov.texi: Ditto.
29459 * doc/install.texi: Ditto.
29460 * doc/invoke.texi: Ditto.
29461
29462 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29463
29464 * vector-builder.h (vector_builder::m_full_nelts): Change from
29465 unsigned int to poly_uint64.
29466 (vector_builder::full_nelts): Update prototype accordingly.
29467 (vector_builder::new_vector): Likewise.
29468 (vector_builder::encoded_full_vector_p): Handle polynomial full_nelts.
29469 (vector_builder::operator ==): Likewise.
29470 (vector_builder::finalize): Likewise.
29471 * int-vector-builder.h (int_vector_builder::int_vector_builder):
29472 Take the number of elements as a poly_uint64 rather than an
29473 unsigned int.
29474 * vec-perm-indices.h (vec_perm_indices::m_nelts_per_input): Change
29475 from unsigned int to poly_uint64.
29476 (vec_perm_indices::vec_perm_indices): Update prototype accordingly.
29477 (vec_perm_indices::new_vector): Likewise.
29478 (vec_perm_indices::length): Likewise.
29479 (vec_perm_indices::nelts_per_input): Likewise.
29480 (vec_perm_indices::input_nelts): Likewise.
29481 * vec-perm-indices.c (vec_perm_indices::new_vector): Take the
29482 number of elements per input as a poly_uint64 rather than an
29483 unsigned int. Use the original encoding for variable-length
29484 vectors, rather than clamping each individual element.
29485 For the second and subsequent elements in each pattern,
29486 clamp the step and base before clamping their sum.
29487 (vec_perm_indices::series_p): Handle polynomial element counts.
29488 (vec_perm_indices::all_in_range_p): Likewise.
29489 (vec_perm_indices_to_tree): Likewise.
29490 (vec_perm_indices_to_rtx): Likewise.
29491 * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise.
29492 * tree-vector-builder.c (tree_vector_builder::new_unary_operation)
29493 (tree_vector_builder::new_binary_operation): Handle polynomial
29494 element counts. Return false if we need to know the number
29495 of elements at compile time.
29496 * fold-const.c (fold_vec_perm): Punt if the number of elements
29497 isn't known at compile time.
29498
29499 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29500
29501 * vec-perm-indices.h (vec_perm_builder): Change element type
29502 from HOST_WIDE_INT to poly_int64.
29503 (vec_perm_indices::element_type): Update accordingly.
29504 (vec_perm_indices::clamp): Handle polynomial element_types.
29505 * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
29506 (vec_perm_indices::all_in_range_p): Likewise.
29507 (tree_to_vec_perm_builder): Check for poly_int64 trees rather
29508 than shwi trees.
29509 * vector-builder.h (vector_builder::stepped_sequence_p): Handle
29510 polynomial vec_perm_indices element types.
29511 * int-vector-builder.h (int_vector_builder::equal_p): Likewise.
29512 * fold-const.c (fold_vec_perm): Likewise.
29513 * optabs.c (shift_amt_for_vec_perm_mask): Likewise.
29514 * tree-vect-generic.c (lower_vec_perm): Likewise.
29515 * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
29516 * config/aarch64/aarch64.c (aarch64_evpc_tbl): Cast d->perm
29517 element type to HOST_WIDE_INT.
29518
29519 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29520 Alan Hayward <alan.hayward@arm.com>
29521 David Sherwood <david.sherwood@arm.com>
29522
29523 * alias.c (addr_side_effect_eval): Take the size as a poly_int64
29524 rather than an int. Use plus_constant.
29525 (memrefs_conflict_p): Take the sizes as poly_int64s rather than ints.
29526 Take the offset "c" as a poly_int64 rather than a HOST_WIDE_INT.
29527
29528 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29529 Alan Hayward <alan.hayward@arm.com>
29530 David Sherwood <david.sherwood@arm.com>
29531
29532 * calls.c (emit_call_1, expand_call): Change struct_value_size from
29533 a HOST_WIDE_INT to a poly_int64.
29534
29535 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29536 Alan Hayward <alan.hayward@arm.com>
29537 David Sherwood <david.sherwood@arm.com>
29538
29539 * calls.c (load_register_parameters): Cope with polynomial
29540 mode sizes. Require a constant size for BLKmode parameters
29541 that aren't described by a PARALLEL. If BLOCK_REG_PADDING
29542 forces a parameter to be padded at the lsb end in order to
29543 fill a complete number of words, require the parameter size
29544 to be ordered wrt UNITS_PER_WORD.
29545
29546 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29547 Alan Hayward <alan.hayward@arm.com>
29548 David Sherwood <david.sherwood@arm.com>
29549
29550 * reload1.c (spill_stack_slot_width): Change element type
29551 from unsigned int to poly_uint64_pod.
29552 (alter_reg): Treat mode sizes as polynomial.
29553
29554 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29555 Alan Hayward <alan.hayward@arm.com>
29556 David Sherwood <david.sherwood@arm.com>
29557
29558 * reload.c (complex_word_subreg_p): New function.
29559 (reload_inner_reg_of_subreg, push_reload): Use it.
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 * lra-constraints.c (process_alt_operands): Reject matched
29566 operands whose sizes aren't ordered.
29567 (match_reload): Refer to this check here.
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 * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Assert
29574 that the mode size is in the set {1, 2, 4, 8, 16}.
29575
29576 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29577 Alan Hayward <alan.hayward@arm.com>
29578 David Sherwood <david.sherwood@arm.com>
29579
29580 * var-tracking.c (adjust_mems): Treat mode sizes as polynomial.
29581 Use plus_constant instead of gen_rtx_PLUS.
29582
29583 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29584 Alan Hayward <alan.hayward@arm.com>
29585 David Sherwood <david.sherwood@arm.com>
29586
29587 * config/cr16/cr16-protos.h (cr16_push_rounding): Declare.
29588 * config/cr16/cr16.h (PUSH_ROUNDING): Move implementation to...
29589 * config/cr16/cr16.c (cr16_push_rounding): ...this new function.
29590 * config/h8300/h8300-protos.h (h8300_push_rounding): Declare.
29591 * config/h8300/h8300.h (PUSH_ROUNDING): Move implementation to...
29592 * config/h8300/h8300.c (h8300_push_rounding): ...this new function.
29593 * config/i386/i386-protos.h (ix86_push_rounding): Declare.
29594 * config/i386/i386.h (PUSH_ROUNDING): Move implementation to...
29595 * config/i386/i386.c (ix86_push_rounding): ...this new function.
29596 * config/m32c/m32c-protos.h (m32c_push_rounding): Take and return
29597 a poly_int64.
29598 * config/m32c/m32c.c (m32c_push_rounding): Likewise.
29599 * config/m68k/m68k-protos.h (m68k_push_rounding): Declare.
29600 * config/m68k/m68k.h (PUSH_ROUNDING): Move implementation to...
29601 * config/m68k/m68k.c (m68k_push_rounding): ...this new function.
29602 * config/pdp11/pdp11-protos.h (pdp11_push_rounding): Declare.
29603 * config/pdp11/pdp11.h (PUSH_ROUNDING): Move implementation to...
29604 * config/pdp11/pdp11.c (pdp11_push_rounding): ...this new function.
29605 * config/stormy16/stormy16-protos.h (xstormy16_push_rounding): Declare.
29606 * config/stormy16/stormy16.h (PUSH_ROUNDING): Move implementation to...
29607 * config/stormy16/stormy16.c (xstormy16_push_rounding): ...this new
29608 function.
29609 * expr.c (emit_move_resolve_push): Treat the input and result
29610 of PUSH_ROUNDING as a poly_int64.
29611 (emit_move_complex_push, emit_single_push_insn_1): Likewise.
29612 (emit_push_insn): Likewise.
29613 * lra-eliminations.c (mark_not_eliminable): Likewise.
29614 * recog.c (push_operand): Likewise.
29615 * reload1.c (elimination_effects): Likewise.
29616 * rtlanal.c (nonzero_bits1): Likewise.
29617 * calls.c (store_one_arg): Likewise. Require the padding to be
29618 known at compile time.
29619
29620 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29621 Alan Hayward <alan.hayward@arm.com>
29622 David Sherwood <david.sherwood@arm.com>
29623
29624 * expr.c (emit_single_push_insn_1): Treat mode sizes as polynomial.
29625 Use plus_constant instead of gen_rtx_PLUS.
29626
29627 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29628 Alan Hayward <alan.hayward@arm.com>
29629 David Sherwood <david.sherwood@arm.com>
29630
29631 * auto-inc-dec.c (set_inc_state): Take the mode size as a poly_int64
29632 rather than an int.
29633
29634 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29635 Alan Hayward <alan.hayward@arm.com>
29636 David Sherwood <david.sherwood@arm.com>
29637
29638 * expr.c (expand_expr_real_1): Use tree_to_poly_uint64
29639 instead of int_size_in_bytes when handling VIEW_CONVERT_EXPRs
29640 via stack temporaries. Treat the mode size as polynomial too.
29641
29642 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29643 Alan Hayward <alan.hayward@arm.com>
29644 David Sherwood <david.sherwood@arm.com>
29645
29646 * expr.c (expand_expr_real_2): When handling conversions involving
29647 unions, apply tree_to_poly_uint64 to the TYPE_SIZE rather than
29648 multiplying int_size_in_bytes by BITS_PER_UNIT. Treat GET_MODE_BISIZE
29649 as a poly_uint64 too.
29650
29651 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29652 Alan Hayward <alan.hayward@arm.com>
29653 David Sherwood <david.sherwood@arm.com>
29654
29655 * rtlanal.c (subreg_get_info): Handle polynomial mode sizes.
29656
29657 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29658 Alan Hayward <alan.hayward@arm.com>
29659 David Sherwood <david.sherwood@arm.com>
29660
29661 * combine.c (can_change_dest_mode): Handle polynomial
29662 REGMODE_NATURAL_SIZE.
29663 * expmed.c (store_bit_field_1): Likewise.
29664 * expr.c (store_constructor): Likewise.
29665 * emit-rtl.c (validate_subreg): Operate on polynomial mode sizes
29666 and polynomial REGMODE_NATURAL_SIZE.
29667 (gen_lowpart_common): Likewise.
29668 * reginfo.c (record_subregs_of_mode): Likewise.
29669 * rtlanal.c (read_modify_subreg_p): Likewise.
29670
29671 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29672 Alan Hayward <alan.hayward@arm.com>
29673 David Sherwood <david.sherwood@arm.com>
29674
29675 * internal-fn.c (expand_vector_ubsan_overflow): Handle polynomial
29676 numbers of elements.
29677
29678 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29679 Alan Hayward <alan.hayward@arm.com>
29680 David Sherwood <david.sherwood@arm.com>
29681
29682 * match.pd: Cope with polynomial numbers of vector elements.
29683
29684 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29685 Alan Hayward <alan.hayward@arm.com>
29686 David Sherwood <david.sherwood@arm.com>
29687
29688 * fold-const.c (fold_indirect_ref_1): Handle polynomial offsets
29689 in a POINTER_PLUS_EXPR.
29690
29691 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29692 Alan Hayward <alan.hayward@arm.com>
29693 David Sherwood <david.sherwood@arm.com>
29694
29695 * omp-simd-clone.c (simd_clone_subparts): New function.
29696 (simd_clone_init_simd_arrays): Use it instead of TYPE_VECTOR_SUBPARTS.
29697 (ipa_simd_modify_function_body): Likewise.
29698
29699 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29700 Alan Hayward <alan.hayward@arm.com>
29701 David Sherwood <david.sherwood@arm.com>
29702
29703 * tree-vect-generic.c (nunits_for_known_piecewise_op): New function.
29704 (expand_vector_piecewise): Use it instead of TYPE_VECTOR_SUBPARTS.
29705 (expand_vector_addition, add_rshift, expand_vector_divmod): Likewise.
29706 (expand_vector_condition, vector_element): Likewise.
29707 (subparts_gt): New function.
29708 (get_compute_type): Use subparts_gt.
29709 (count_type_subparts): Delete.
29710 (expand_vector_operations_1): Use subparts_gt instead of
29711 count_type_subparts.
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-vect-data-refs.c (vect_no_alias_p): Replace with...
29718 (vect_compile_time_alias): ...this new function. Do the calculation
29719 on poly_ints rather than trees.
29720 (vect_prune_runtime_alias_test_list): Update call accordingly.
29721
29722 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29723 Alan Hayward <alan.hayward@arm.com>
29724 David Sherwood <david.sherwood@arm.com>
29725
29726 * tree-vect-slp.c (vect_build_slp_tree_1): Handle polynomial
29727 numbers of units.
29728 (vect_schedule_slp_instance): Likewise.
29729
29730 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29731 Alan Hayward <alan.hayward@arm.com>
29732 David Sherwood <david.sherwood@arm.com>
29733
29734 * tree-vect-slp.c (vect_get_and_check_slp_defs): Reject
29735 constant and extern definitions for variable-length vectors.
29736 (vect_get_constant_vectors): Note that the number of units
29737 is known to be constant.
29738
29739 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29740 Alan Hayward <alan.hayward@arm.com>
29741 David Sherwood <david.sherwood@arm.com>
29742
29743 * tree-vect-stmts.c (vectorizable_conversion): Treat the number
29744 of units as polynomial. Choose between WIDE and NARROW based
29745 on multiple_p.
29746
29747 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29748 Alan Hayward <alan.hayward@arm.com>
29749 David Sherwood <david.sherwood@arm.com>
29750
29751 * tree-vect-stmts.c (simd_clone_subparts): New function.
29752 (vectorizable_simd_clone_call): Use it instead of TYPE_VECTOR_SUBPARTS.
29753
29754 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29755 Alan Hayward <alan.hayward@arm.com>
29756 David Sherwood <david.sherwood@arm.com>
29757
29758 * tree-vect-stmts.c (vectorizable_call): Treat the number of
29759 vectors as polynomial. Use build_index_vector for
29760 IFN_GOMP_SIMD_LANE.
29761
29762 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29763 Alan Hayward <alan.hayward@arm.com>
29764 David Sherwood <david.sherwood@arm.com>
29765
29766 * tree-vect-stmts.c (get_load_store_type): Treat the number of
29767 units as polynomial. Reject VMAT_ELEMENTWISE and VMAT_STRIDED_SLP
29768 for variable-length vectors.
29769 (vectorizable_mask_load_store): Treat the number of units as
29770 polynomial, asserting that it is constant if the condition has
29771 already been enforced.
29772 (vectorizable_store, vectorizable_load): Likewise.
29773
29774 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29775 Alan Hayward <alan.hayward@arm.com>
29776 David Sherwood <david.sherwood@arm.com>
29777
29778 * tree-vect-loop.c (vectorizable_live_operation): Treat the number
29779 of units as polynomial. Punt if we can't tell at compile time
29780 which vector contains the final result.
29781
29782 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29783 Alan Hayward <alan.hayward@arm.com>
29784 David Sherwood <david.sherwood@arm.com>
29785
29786 * tree-vect-loop.c (vectorizable_induction): Treat the number
29787 of units as polynomial. Punt on SLP inductions. Use an integer
29788 VEC_SERIES_EXPR for variable-length integer reductions. Use a
29789 cast of such a series for variable-length floating-point
29790 reductions.
29791
29792 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29793 Alan Hayward <alan.hayward@arm.com>
29794 David Sherwood <david.sherwood@arm.com>
29795
29796 * tree.h (build_index_vector): Declare.
29797 * tree.c (build_index_vector): New function.
29798 * tree-vect-loop.c (get_initial_defs_for_reduction): Treat the number
29799 of units as polynomial, forcibly converting it to a constant if
29800 vectorizable_reduction has already enforced the condition.
29801 (vect_create_epilog_for_reduction): Likewise. Use build_index_vector
29802 to create a {1,2,3,...} vector.
29803 (vectorizable_reduction): Treat the number of units as polynomial.
29804 Choose vectype_in based on the largest scalar element size rather
29805 than the smallest number of units. Enforce the restrictions
29806 relied on above.
29807
29808 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29809 Alan Hayward <alan.hayward@arm.com>
29810 David Sherwood <david.sherwood@arm.com>
29811
29812 * tree-vect-data-refs.c (vector_alignment_reachable_p): Treat the
29813 number of units as polynomial.
29814
29815 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29816 Alan Hayward <alan.hayward@arm.com>
29817 David Sherwood <david.sherwood@arm.com>
29818
29819 * target.h (vector_sizes, auto_vector_sizes): New typedefs.
29820 * target.def (autovectorize_vector_sizes): Return the vector sizes
29821 by pointer, using vector_sizes rather than a bitmask.
29822 * targhooks.h (default_autovectorize_vector_sizes): Update accordingly.
29823 * targhooks.c (default_autovectorize_vector_sizes): Likewise.
29824 * config/aarch64/aarch64.c (aarch64_autovectorize_vector_sizes):
29825 Likewise.
29826 * config/arc/arc.c (arc_autovectorize_vector_sizes): Likewise.
29827 * config/arm/arm.c (arm_autovectorize_vector_sizes): Likewise.
29828 * config/i386/i386.c (ix86_autovectorize_vector_sizes): Likewise.
29829 * config/mips/mips.c (mips_autovectorize_vector_sizes): Likewise.
29830 * omp-general.c (omp_max_vf): Likewise.
29831 * omp-low.c (omp_clause_aligned_alignment): Likewise.
29832 * optabs-query.c (can_vec_mask_load_store_p): Likewise.
29833 * tree-vect-loop.c (vect_analyze_loop): Likewise.
29834 * tree-vect-slp.c (vect_slp_bb): Likewise.
29835 * doc/tm.texi: Regenerate.
29836 * tree-vectorizer.h (current_vector_size): Change from an unsigned int
29837 to a poly_uint64.
29838 * tree-vect-stmts.c (get_vectype_for_scalar_type_and_size): Take
29839 the vector size as a poly_uint64 rather than an unsigned int.
29840 (current_vector_size): Change from an unsigned int to a poly_uint64.
29841 (get_vectype_for_scalar_type): Update accordingly.
29842 * tree.h (build_truth_vector_type): Take the size and number of
29843 units as a poly_uint64 rather than an unsigned int.
29844 (build_vector_type): Add a temporary overload that takes
29845 the number of units as a poly_uint64 rather than an unsigned int.
29846 * tree.c (make_vector_type): Likewise.
29847 (build_truth_vector_type): Take the number of units as a poly_uint64
29848 rather than an unsigned int.
29849
29850 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29851 Alan Hayward <alan.hayward@arm.com>
29852 David Sherwood <david.sherwood@arm.com>
29853
29854 * target.def (get_mask_mode): Take the number of units and length
29855 as poly_uint64s rather than unsigned ints.
29856 * targhooks.h (default_get_mask_mode): Update accordingly.
29857 * targhooks.c (default_get_mask_mode): Likewise.
29858 * config/i386/i386.c (ix86_get_mask_mode): Likewise.
29859 * doc/tm.texi: Regenerate.
29860
29861 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29862 Alan Hayward <alan.hayward@arm.com>
29863 David Sherwood <david.sherwood@arm.com>
29864
29865 * omp-general.h (omp_max_vf): Return a poly_uint64 instead of an int.
29866 * omp-general.c (omp_max_vf): Likewise.
29867 * omp-expand.c (omp_adjust_chunk_size): Update call to omp_max_vf.
29868 (expand_omp_simd): Handle polynomial safelen.
29869 * omp-low.c (omplow_simd_context): Add a default constructor.
29870 (omplow_simd_context::max_vf): Change from int to poly_uint64.
29871 (lower_rec_simd_input_clauses): Update accordingly.
29872 (lower_rec_input_clauses): Likewise.
29873
29874 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29875 Alan Hayward <alan.hayward@arm.com>
29876 David Sherwood <david.sherwood@arm.com>
29877
29878 * tree-vectorizer.h (vect_nunits_for_cost): New function.
29879 * tree-vect-loop.c (vect_model_reduction_cost): Use it.
29880 * tree-vect-slp.c (vect_analyze_slp_cost_1): Likewise.
29881 (vect_analyze_slp_cost): Likewise.
29882 * tree-vect-stmts.c (vect_model_store_cost): Likewise.
29883 (vect_model_load_cost): Likewise.
29884
29885 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29886 Alan Hayward <alan.hayward@arm.com>
29887 David Sherwood <david.sherwood@arm.com>
29888
29889 * tree-vect-slp.c (vect_record_max_nunits, vect_build_slp_tree_1)
29890 (vect_build_slp_tree_2, vect_build_slp_tree): Change max_nunits
29891 from an unsigned int * to a poly_uint64_pod *.
29892 (calculate_unrolling_factor): New function.
29893 (vect_analyze_slp_instance): Use it. Track polynomial max_nunits.
29894
29895 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29896 Alan Hayward <alan.hayward@arm.com>
29897 David Sherwood <david.sherwood@arm.com>
29898
29899 * tree-vectorizer.h (_slp_instance::unrolling_factor): Change
29900 from an unsigned int to a poly_uint64.
29901 (_loop_vec_info::slp_unrolling_factor): Likewise.
29902 (_loop_vec_info::vectorization_factor): Change from an int
29903 to a poly_uint64.
29904 (MAX_VECTORIZATION_FACTOR): Bump from 64 to INT_MAX.
29905 (vect_get_num_vectors): New function.
29906 (vect_update_max_nunits, vect_vf_for_cost): Likewise.
29907 (vect_get_num_copies): Use vect_get_num_vectors.
29908 (vect_analyze_data_ref_dependences): Change max_vf from an int *
29909 to an unsigned int *.
29910 (vect_analyze_data_refs): Change min_vf from an int * to a
29911 poly_uint64 *.
29912 (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
29913 than an unsigned HOST_WIDE_INT.
29914 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
29915 (vect_analyze_data_ref_dependence): Change max_vf from an int *
29916 to an unsigned int *.
29917 (vect_analyze_data_ref_dependences): Likewise.
29918 (vect_compute_data_ref_alignment): Handle polynomial vf.
29919 (vect_enhance_data_refs_alignment): Likewise.
29920 (vect_prune_runtime_alias_test_list): Likewise.
29921 (vect_shift_permute_load_chain): Likewise.
29922 (vect_supportable_dr_alignment): Likewise.
29923 (dependence_distance_ge_vf): Take the vectorization factor as a
29924 poly_uint64 rather than an unsigned HOST_WIDE_INT.
29925 (vect_analyze_data_refs): Change min_vf from an int * to a
29926 poly_uint64 *.
29927 * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Take
29928 vfm1 as a poly_uint64 rather than an int. Make the same change
29929 for the returned bound_scalar.
29930 (vect_gen_vector_loop_niters): Handle polynomial vf.
29931 (vect_do_peeling): Likewise. Update call to
29932 vect_gen_scalar_loop_niters and handle polynomial bound_scalars.
29933 (vect_gen_vector_loop_niters_mult_vf): Assert that the vf must
29934 be constant.
29935 * tree-vect-loop.c (vect_determine_vectorization_factor)
29936 (vect_update_vf_for_slp, vect_analyze_loop_2): Handle polynomial vf.
29937 (vect_get_known_peeling_cost): Likewise.
29938 (vect_estimate_min_profitable_iters, vectorizable_reduction): Likewise.
29939 (vect_worthwhile_without_simd_p, vectorizable_induction): Likewise.
29940 (vect_transform_loop): Likewise. Use the lowest possible VF when
29941 updating the upper bounds of the loop.
29942 (vect_min_worthwhile_factor): Make static. Return an unsigned int
29943 rather than an int.
29944 * tree-vect-slp.c (vect_attempt_slp_rearrange_stmts): Cope with
29945 polynomial unroll factors.
29946 (vect_analyze_slp_cost_1, vect_analyze_slp_instance): Likewise.
29947 (vect_make_slp_decision): Likewise.
29948 (vect_supported_load_permutation_p): Likewise, and polynomial
29949 vf too.
29950 (vect_analyze_slp_cost): Handle polynomial vf.
29951 (vect_slp_analyze_node_operations): Likewise.
29952 (vect_slp_analyze_bb_1): Likewise.
29953 (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
29954 than an unsigned HOST_WIDE_INT.
29955 * tree-vect-stmts.c (vectorizable_simd_clone_call, vectorizable_store)
29956 (vectorizable_load): Handle polynomial vf.
29957 * tree-vectorizer.c (simduid_to_vf::vf): Change from an int to
29958 a poly_uint64.
29959 (adjust_simduid_builtins, shrink_simd_arrays): Update accordingly.
29960
29961 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29962 Alan Hayward <alan.hayward@arm.com>
29963 David Sherwood <david.sherwood@arm.com>
29964
29965 * match.pd: Handle bit operations involving three constants
29966 and try to fold one pair.
29967
29968 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29969
29970 * tree-vect-loop-manip.c: Include gimple-fold.h.
29971 (slpeel_make_loop_iterate_ntimes): Add step, final_iv and
29972 niters_maybe_zero parameters. Handle other cases besides a step of 1.
29973 (vect_gen_vector_loop_niters): Add a step_vector_ptr parameter.
29974 Add a path that uses a step of VF instead of 1, but disable it
29975 for now.
29976 (vect_do_peeling): Add step_vector, niters_vector_mult_vf_var
29977 and niters_no_overflow parameters. Update calls to
29978 slpeel_make_loop_iterate_ntimes and vect_gen_vector_loop_niters.
29979 Create a new SSA name if the latter choses to use a ste other
29980 than zero, and return it via niters_vector_mult_vf_var.
29981 * tree-vect-loop.c (vect_transform_loop): Update calls to
29982 vect_do_peeling, vect_gen_vector_loop_niters and
29983 slpeel_make_loop_iterate_ntimes.
29984 * tree-vectorizer.h (slpeel_make_loop_iterate_ntimes, vect_do_peeling)
29985 (vect_gen_vector_loop_niters): Update declarations after above changes.
29986
29987 2018-01-02 Michael Meissner <meissner@linux.vnet.ibm.com>
29988
29989 * config/rs6000/rs6000.md (floor<mode>2): Add support for IEEE
29990 128-bit round to integer instructions.
29991 (ceil<mode>2): Likewise.
29992 (btrunc<mode>2): Likewise.
29993 (round<mode>2): Likewise.
29994
29995 2018-01-02 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
29996
29997 * config/rs6000/rs6000-string.c (expand_block_move): Allow the use of
29998 unaligned VSX load/store on P8/P9.
29999 (expand_block_clear): Allow the use of unaligned VSX
30000 load/store on P8/P9.
30001
30002 2018-01-02 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
30003
30004 * config/rs6000/rs6000-p8swap.c (swap_feeds_both_load_and_store):
30005 New function.
30006 (rs6000_analyze_swaps): Mark a web unoptimizable if it contains a
30007 swap associated with both a load and a store.
30008
30009 2018-01-02 Andrew Waterman <andrew@sifive.com>
30010
30011 * config/riscv/linux.h (ICACHE_FLUSH_FUNC): New.
30012 * config/riscv/riscv.md (clear_cache): Use it.
30013
30014 2018-01-02 Artyom Skrobov <tyomitch@gmail.com>
30015
30016 * web.c: Remove out-of-date comment.
30017
30018 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
30019
30020 * expr.c (fixup_args_size_notes): Check that any existing
30021 REG_ARGS_SIZE notes are correct, and don't try to re-add them.
30022 (emit_single_push_insn_1): Move stack_pointer_delta adjustment to...
30023 (emit_single_push_insn): ...here.
30024
30025 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
30026
30027 * rtl.h (CONST_VECTOR_ELT): Redefine to const_vector_elt.
30028 (const_vector_encoded_nelts): New function.
30029 (CONST_VECTOR_NUNITS): Redefine to use GET_MODE_NUNITS.
30030 (const_vector_int_elt, const_vector_elt): Declare.
30031 * emit-rtl.c (const_vector_int_elt_1): New function.
30032 (const_vector_elt): Likewise.
30033 * simplify-rtx.c (simplify_immed_subreg): Avoid taking the address
30034 of CONST_VECTOR_ELT.
30035
30036 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
30037
30038 * expr.c: Include rtx-vector-builder.h.
30039 (const_vector_mask_from_tree): Use rtx_vector_builder and operate
30040 directly on the tree encoding.
30041 (const_vector_from_tree): Likewise.
30042 * optabs.c: Include rtx-vector-builder.h.
30043 (expand_vec_perm_var): Use rtx_vector_builder and create a repeating
30044 sequence of "u" values.
30045 * vec-perm-indices.c: Include rtx-vector-builder.h.
30046 (vec_perm_indices_to_rtx): Use rtx_vector_builder and operate
30047 directly on the vec_perm_indices encoding.
30048
30049 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
30050
30051 * doc/rtl.texi (const_vector): Describe new encoding scheme.
30052 * Makefile.in (OBJS): Add rtx-vector-builder.o.
30053 * rtx-vector-builder.h: New file.
30054 * rtx-vector-builder.c: Likewise.
30055 * rtl.h (rtx_def::u2): Add a const_vector field.
30056 (CONST_VECTOR_NPATTERNS): New macro.
30057 (CONST_VECTOR_NELTS_PER_PATTERN): Likewise.
30058 (CONST_VECTOR_DUPLICATE_P): Likewise.
30059 (CONST_VECTOR_STEPPED_P): Likewise.
30060 (CONST_VECTOR_ENCODED_ELT): Likewise.
30061 (const_vec_duplicate_p): Check for a duplicated vector encoding.
30062 (unwrap_const_vec_duplicate): Likewise.
30063 (const_vec_series_p): Check for a non-duplicated vector encoding.
30064 Say that the function only returns true for integer vectors.
30065 * emit-rtl.c: Include rtx-vector-builder.h.
30066 (gen_const_vec_duplicate_1): Delete.
30067 (gen_const_vector): Call gen_const_vec_duplicate instead of
30068 gen_const_vec_duplicate_1.
30069 (const_vec_series_p_1): Operate directly on the CONST_VECTOR encoding.
30070 (gen_const_vec_duplicate): Use rtx_vector_builder.
30071 (gen_const_vec_series): Likewise.
30072 (gen_rtx_CONST_VECTOR): Likewise.
30073 * config/powerpcspe/powerpcspe.c: Include rtx-vector-builder.h.
30074 (swap_const_vector_halves): Take an rtx pointer rather than rtx.
30075 Build a new vector rather than modifying a CONST_VECTOR in-place.
30076 (handle_special_swappables): Update call accordingly.
30077 * config/rs6000/rs6000-p8swap.c: Include rtx-vector-builder.h.
30078 (swap_const_vector_halves): Take an rtx pointer rather than rtx.
30079 Build a new vector rather than modifying a CONST_VECTOR in-place.
30080 (handle_special_swappables): Update call accordingly.
30081
30082 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
30083
30084 * simplify-rtx.c (simplify_const_binary_operation): Use
30085 CONST_VECTOR_ELT instead of XVECEXP.
30086
30087 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
30088
30089 * tree-cfg.c (verify_gimple_assign_ternary): Allow the size of
30090 the selector elements to be different from the data elements
30091 if the selector is a VECTOR_CST.
30092 * tree-vect-stmts.c (vect_gen_perm_mask_any): Use a vector of
30093 ssizetype for the selector.
30094
30095 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
30096
30097 * optabs.c (shift_amt_for_vec_perm_mask): Try using series_p
30098 before testing each element individually.
30099 * tree-vect-generic.c (lower_vec_perm): Likewise.
30100
30101 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
30102
30103 * selftest.h (selftest::vec_perm_indices_c_tests): Declare.
30104 * selftest-run-tests.c (selftest::run_tests): Call it.
30105 * vector-builder.h (vector_builder::operator ==): New function.
30106 (vector_builder::operator !=): Likewise.
30107 * vec-perm-indices.h (vec_perm_indices::series_p): Declare.
30108 (vec_perm_indices::all_from_input_p): New function.
30109 * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
30110 (test_vec_perm_12, selftest::vec_perm_indices_c_tests): Likewise.
30111 * fold-const.c (fold_ternary_loc): Use tree_to_vec_perm_builder
30112 instead of reading the VECTOR_CST directly. Detect whether both
30113 vector inputs are the same before constructing the vec_perm_indices,
30114 and update the number of inputs argument accordingly. Use the
30115 utility functions added above. Only construct sel2 if we need to.
30116
30117 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
30118
30119 * optabs.c (expand_vec_perm_var): Use an explicit encoding for
30120 the broadcast of the low byte.
30121 (expand_mult_highpart): Use an explicit encoding for the permutes.
30122 * optabs-query.c (can_mult_highpart_p): Likewise.
30123 * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Likewise.
30124 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
30125 (vectorizable_bswap): Likewise.
30126 * tree-vect-data-refs.c (vect_grouped_store_supported): Use an
30127 explicit encoding for the power-of-2 permutes.
30128 (vect_permute_store_chain): Likewise.
30129 (vect_grouped_load_supported): Likewise.
30130 (vect_permute_load_chain): Likewise.
30131
30132 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
30133
30134 * vec-perm-indices.h (vec_perm_indices_to_tree): Declare.
30135 * vec-perm-indices.c (vec_perm_indices_to_tree): New function.
30136 * tree-ssa-forwprop.c (simplify_vector_constructor): Use it.
30137 * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
30138 * tree-vect-stmts.c (vectorizable_bswap): Likewise.
30139 (vect_gen_perm_mask_any): Likewise.
30140
30141 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
30142
30143 * int-vector-builder.h: New file.
30144 * vec-perm-indices.h: Include int-vector-builder.h.
30145 (vec_perm_indices): Redefine as an int_vector_builder.
30146 (auto_vec_perm_indices): Delete.
30147 (vec_perm_builder): Redefine as a stand-alone class.
30148 (vec_perm_indices::vec_perm_indices): New function.
30149 (vec_perm_indices::clamp): Likewise.
30150 * vec-perm-indices.c: Include fold-const.h and tree-vector-builder.h.
30151 (vec_perm_indices::new_vector): New function.
30152 (vec_perm_indices::new_expanded_vector): Update for new
30153 vec_perm_indices class.
30154 (vec_perm_indices::rotate_inputs): New function.
30155 (vec_perm_indices::all_in_range_p): Operate directly on the
30156 encoded form, without computing elided elements.
30157 (tree_to_vec_perm_builder): Operate directly on the VECTOR_CST
30158 encoding. Update for new vec_perm_indices class.
30159 * optabs.c (expand_vec_perm_const): Create a vec_perm_indices for
30160 the given vec_perm_builder.
30161 (expand_vec_perm_var): Update vec_perm_builder constructor.
30162 (expand_mult_highpart): Use vec_perm_builder instead of
30163 auto_vec_perm_indices.
30164 * optabs-query.c (can_mult_highpart_p): Use vec_perm_builder and
30165 vec_perm_indices instead of auto_vec_perm_indices. Use a single
30166 or double series encoding as appropriate.
30167 * fold-const.c (fold_ternary_loc): Use vec_perm_builder and
30168 vec_perm_indices instead of auto_vec_perm_indices.
30169 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
30170 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
30171 (vect_permute_store_chain): Likewise.
30172 (vect_grouped_load_supported): Likewise.
30173 (vect_permute_load_chain): Likewise.
30174 (vect_shift_permute_load_chain): Likewise.
30175 * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
30176 (vect_transform_slp_perm_load): Likewise.
30177 (vect_schedule_slp_instance): Likewise.
30178 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
30179 (vectorizable_mask_load_store): Likewise.
30180 (vectorizable_bswap): Likewise.
30181 (vectorizable_store): Likewise.
30182 (vectorizable_load): Likewise.
30183 * tree-vect-generic.c (lower_vec_perm): Use vec_perm_builder and
30184 vec_perm_indices instead of auto_vec_perm_indices. Use
30185 tree_to_vec_perm_builder to read the vector from a tree.
30186 * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Take a
30187 vec_perm_builder instead of a vec_perm_indices.
30188 (have_whole_vector_shift): Use vec_perm_builder and
30189 vec_perm_indices instead of auto_vec_perm_indices. Leave the
30190 truncation to calc_vec_perm_mask_for_shift.
30191 (vect_create_epilog_for_reduction): Likewise.
30192 * config/aarch64/aarch64.c (expand_vec_perm_d::perm): Change
30193 from auto_vec_perm_indices to vec_perm_indices.
30194 (aarch64_expand_vec_perm_const_1): Use rotate_inputs on d.perm
30195 instead of changing individual elements.
30196 (aarch64_vectorize_vec_perm_const): Use new_vector to install
30197 the vector in d.perm.
30198 * config/arm/arm.c (expand_vec_perm_d::perm): Change
30199 from auto_vec_perm_indices to vec_perm_indices.
30200 (arm_expand_vec_perm_const_1): Use rotate_inputs on d.perm
30201 instead of changing individual elements.
30202 (arm_vectorize_vec_perm_const): Use new_vector to install
30203 the vector in d.perm.
30204 * config/powerpcspe/powerpcspe.c (rs6000_expand_extract_even):
30205 Update vec_perm_builder constructor.
30206 (rs6000_expand_interleave): Likewise.
30207 * config/rs6000/rs6000.c (rs6000_expand_extract_even): Likewise.
30208 (rs6000_expand_interleave): Likewise.
30209
30210 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
30211
30212 * optabs-query.c (can_vec_perm_var_p): Check whether lowering
30213 to qimode could truncate the indices.
30214 * optabs.c (expand_vec_perm_var): Likewise.
30215
30216 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
30217
30218 * Makefile.in (OBJS): Add vec-perm-indices.o.
30219 * vec-perm-indices.h: New file.
30220 * vec-perm-indices.c: Likewise.
30221 * target.h (vec_perm_indices): Replace with a forward class
30222 declaration.
30223 (auto_vec_perm_indices): Move to vec-perm-indices.h.
30224 * optabs.h: Include vec-perm-indices.h.
30225 (expand_vec_perm): Delete.
30226 (selector_fits_mode_p, expand_vec_perm_var): Declare.
30227 (expand_vec_perm_const): Declare.
30228 * target.def (vec_perm_const_ok): Replace with...
30229 (vec_perm_const): ...this new hook.
30230 * doc/tm.texi.in (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Replace with...
30231 (TARGET_VECTORIZE_VEC_PERM_CONST): ...this new hook.
30232 * doc/tm.texi: Regenerate.
30233 * optabs.def (vec_perm_const): Delete.
30234 * doc/md.texi (vec_perm_const): Likewise.
30235 (vec_perm): Refer to TARGET_VECTORIZE_VEC_PERM_CONST.
30236 * expr.c (expand_expr_real_2): Use expand_vec_perm_const rather than
30237 expand_vec_perm for constant permutation vectors. Assert that
30238 the mode of variable permutation vectors is the integer equivalent
30239 of the mode that is being permuted.
30240 * optabs-query.h (selector_fits_mode_p): Declare.
30241 * optabs-query.c: Include vec-perm-indices.h.
30242 (selector_fits_mode_p): New function.
30243 (can_vec_perm_const_p): Check whether targetm.vectorize.vec_perm_const
30244 is defined, instead of checking whether the vec_perm_const_optab
30245 exists. Use targetm.vectorize.vec_perm_const instead of
30246 targetm.vectorize.vec_perm_const_ok. Check whether the indices
30247 fit in the vector mode before using a variable permute.
30248 * optabs.c (shift_amt_for_vec_perm_mask): Take a mode and a
30249 vec_perm_indices instead of an rtx.
30250 (expand_vec_perm): Replace with...
30251 (expand_vec_perm_const): ...this new function. Take the selector
30252 as a vec_perm_indices rather than an rtx. Also take the mode of
30253 the selector. Update call to shift_amt_for_vec_perm_mask.
30254 Use targetm.vectorize.vec_perm_const instead of vec_perm_const_optab.
30255 Use vec_perm_indices::new_expanded_vector to expand the original
30256 selector into bytes. Check whether the indices fit in the vector
30257 mode before using a variable permute.
30258 (expand_vec_perm_var): Make global.
30259 (expand_mult_highpart): Use expand_vec_perm_const.
30260 * fold-const.c: Includes vec-perm-indices.h.
30261 * tree-ssa-forwprop.c: Likewise.
30262 * tree-vect-data-refs.c: Likewise.
30263 * tree-vect-generic.c: Likewise.
30264 * tree-vect-loop.c: Likewise.
30265 * tree-vect-slp.c: Likewise.
30266 * tree-vect-stmts.c: Likewise.
30267 * config/aarch64/aarch64-protos.h (aarch64_expand_vec_perm_const):
30268 Delete.
30269 * config/aarch64/aarch64-simd.md (vec_perm_const<mode>): Delete.
30270 * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const)
30271 (aarch64_vectorize_vec_perm_const_ok): Fuse into...
30272 (aarch64_vectorize_vec_perm_const): ...this new function.
30273 (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
30274 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
30275 * config/arm/arm-protos.h (arm_expand_vec_perm_const): Delete.
30276 * config/arm/vec-common.md (vec_perm_const<mode>): Delete.
30277 * config/arm/arm.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
30278 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
30279 (arm_expand_vec_perm_const, arm_vectorize_vec_perm_const_ok): Merge
30280 into...
30281 (arm_vectorize_vec_perm_const): ...this new function. Explicitly
30282 check for NEON modes.
30283 * config/i386/i386-protos.h (ix86_expand_vec_perm_const): Delete.
30284 * config/i386/sse.md (VEC_PERM_CONST, vec_perm_const<mode>): Delete.
30285 * config/i386/i386.c (ix86_expand_vec_perm_const_1): Update comment.
30286 (ix86_expand_vec_perm_const, ix86_vectorize_vec_perm_const_ok): Merge
30287 into...
30288 (ix86_vectorize_vec_perm_const): ...this new function. Incorporate
30289 the old VEC_PERM_CONST conditions.
30290 * config/ia64/ia64-protos.h (ia64_expand_vec_perm_const): Delete.
30291 * config/ia64/vect.md (vec_perm_const<mode>): Delete.
30292 * config/ia64/ia64.c (ia64_expand_vec_perm_const)
30293 (ia64_vectorize_vec_perm_const_ok): Merge into...
30294 (ia64_vectorize_vec_perm_const): ...this new function.
30295 * config/mips/loongson.md (vec_perm_const<mode>): Delete.
30296 * config/mips/mips-msa.md (vec_perm_const<mode>): Delete.
30297 * config/mips/mips-ps-3d.md (vec_perm_constv2sf): Delete.
30298 * config/mips/mips-protos.h (mips_expand_vec_perm_const): Delete.
30299 * config/mips/mips.c (mips_expand_vec_perm_const)
30300 (mips_vectorize_vec_perm_const_ok): Merge into...
30301 (mips_vectorize_vec_perm_const): ...this new function.
30302 * config/powerpcspe/altivec.md (vec_perm_constv16qi): Delete.
30303 * config/powerpcspe/paired.md (vec_perm_constv2sf): Delete.
30304 * config/powerpcspe/spe.md (vec_perm_constv2si): Delete.
30305 * config/powerpcspe/vsx.md (vec_perm_const<mode>): Delete.
30306 * config/powerpcspe/powerpcspe-protos.h (altivec_expand_vec_perm_const)
30307 (rs6000_expand_vec_perm_const): Delete.
30308 * config/powerpcspe/powerpcspe.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK):
30309 Delete.
30310 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
30311 (altivec_expand_vec_perm_const_le): Take each operand individually.
30312 Operate on constant selectors rather than rtxes.
30313 (altivec_expand_vec_perm_const): Likewise. Update call to
30314 altivec_expand_vec_perm_const_le.
30315 (rs6000_expand_vec_perm_const): Delete.
30316 (rs6000_vectorize_vec_perm_const_ok): Delete.
30317 (rs6000_vectorize_vec_perm_const): New function.
30318 (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
30319 an element count and rtx array.
30320 (rs6000_expand_extract_even): Update call accordingly.
30321 (rs6000_expand_interleave): Likewise.
30322 * config/rs6000/altivec.md (vec_perm_constv16qi): Delete.
30323 * config/rs6000/paired.md (vec_perm_constv2sf): Delete.
30324 * config/rs6000/vsx.md (vec_perm_const<mode>): Delete.
30325 * config/rs6000/rs6000-protos.h (altivec_expand_vec_perm_const)
30326 (rs6000_expand_vec_perm_const): Delete.
30327 * config/rs6000/rs6000.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
30328 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
30329 (altivec_expand_vec_perm_const_le): Take each operand individually.
30330 Operate on constant selectors rather than rtxes.
30331 (altivec_expand_vec_perm_const): Likewise. Update call to
30332 altivec_expand_vec_perm_const_le.
30333 (rs6000_expand_vec_perm_const): Delete.
30334 (rs6000_vectorize_vec_perm_const_ok): Delete.
30335 (rs6000_vectorize_vec_perm_const): New function. Remove stray
30336 reference to the SPE evmerge intructions.
30337 (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
30338 an element count and rtx array.
30339 (rs6000_expand_extract_even): Update call accordingly.
30340 (rs6000_expand_interleave): Likewise.
30341 * config/sparc/sparc.md (vec_perm_constv8qi): Delete in favor of...
30342 * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): ...this
30343 new function.
30344 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
30345
30346 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
30347
30348 * optabs.c (expand_vec_perm_1): Assert that SEL has an integer
30349 vector mode and that that mode matches the mode of the data
30350 being permuted.
30351 (expand_vec_perm): Split handling of non-CONST_VECTOR selectors
30352 out into expand_vec_perm_var. Do all CONST_VECTOR handling here,
30353 directly using expand_vec_perm_1 when forcing selectors into
30354 registers.
30355 (expand_vec_perm_var): New function, split out from expand_vec_perm.
30356
30357 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
30358
30359 * optabs-query.h (can_vec_perm_p): Delete.
30360 (can_vec_perm_var_p, can_vec_perm_const_p): Declare.
30361 * optabs-query.c (can_vec_perm_p): Split into...
30362 (can_vec_perm_var_p, can_vec_perm_const_p): ...these two functions.
30363 (can_mult_highpart_p): Use can_vec_perm_const_p to test whether a
30364 particular selector is valid.
30365 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
30366 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
30367 (vect_grouped_load_supported): Likewise.
30368 (vect_shift_permute_load_chain): Likewise.
30369 * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
30370 (vect_transform_slp_perm_load): Likewise.
30371 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
30372 (vectorizable_bswap): Likewise.
30373 (vect_gen_perm_mask_checked): Likewise.
30374 * fold-const.c (fold_ternary_loc): Likewise. Don't take
30375 implementations of variable permutation vectors into account
30376 when deciding which selector to use.
30377 * tree-vect-loop.c (have_whole_vector_shift): Don't check whether
30378 vec_perm_const_optab is supported; instead use can_vec_perm_const_p
30379 with a false third argument.
30380 * tree-vect-generic.c (lower_vec_perm): Use can_vec_perm_const_p
30381 to test whether the constant selector is valid and can_vec_perm_var_p
30382 to test whether a variable selector is valid.
30383
30384 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
30385
30386 * optabs-query.h (can_vec_perm_p): Take a const vec_perm_indices *.
30387 * optabs-query.c (can_vec_perm_p): Likewise.
30388 * fold-const.c (fold_vec_perm): Take a const vec_perm_indices &
30389 instead of vec_perm_indices.
30390 * tree-vectorizer.h (vect_gen_perm_mask_any): Likewise,
30391 (vect_gen_perm_mask_checked): Likewise,
30392 * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise,
30393 (vect_gen_perm_mask_checked): Likewise,
30394
30395 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
30396
30397 * optabs-query.h (qimode_for_vec_perm): Declare.
30398 * optabs-query.c (can_vec_perm_p): Split out qimode search to...
30399 (qimode_for_vec_perm): ...this new function.
30400 * optabs.c (expand_vec_perm): Use qimode_for_vec_perm.
30401
30402 2018-01-02 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
30403
30404 * rtlanal.c (canonicalize_condition): Return 0 if final rtx
30405 does not have a conditional at the top.
30406
30407 2018-01-02 Richard Biener <rguenther@suse.de>
30408
30409 * ipa-inline.c (big_speedup_p): Fix expression.
30410
30411 2018-01-02 Jan Hubicka <hubicka@ucw.cz>
30412
30413 PR target/81616
30414 * config/i386/x86-tune-costs.h: Increase cost of integer load costs
30415 for generic 4->6.
30416
30417 2018-01-02 Jan Hubicka <hubicka@ucw.cz>
30418
30419 PR target/81616
30420 Generic tuning.
30421 * x86-tune-costs.h (generic_cost): Reduce cost of FDIV 20->17,
30422 cost of sqrt 20->14, DIVSS 18->13, DIVSD 32->17, SQRtSS 30->14
30423 and SQRTsD 58->18, cond_not_taken_branch_cost. 2->1. Increase
30424 cond_taken_branch_cost 3->4.
30425
30426 2018-01-01 Jakub Jelinek <jakub@redhat.com>
30427
30428 PR tree-optimization/83581
30429 * tree-loop-distribution.c (pass_loop_distribution::execute): Return
30430 TODO_cleanup_cfg if any changes have been made.
30431
30432 PR middle-end/83608
30433 * expr.c (store_expr_with_bounds): Use simplify_gen_subreg instead of
30434 convert_modes if target mode has the right side, but different mode
30435 class.
30436
30437 PR middle-end/83609
30438 * expr.c (expand_assignment): Fix up a typo in simplify_gen_subreg
30439 last argument when extracting from CONCAT. If either from_real or
30440 from_imag is NULL, use expansion through memory. If result is not
30441 a CONCAT and simplify_gen_subreg fails, try to simplify_gen_subreg
30442 the parts directly to inner mode, if even that fails, use expansion
30443 through memory.
30444
30445 PR middle-end/83623
30446 * expmed.c (expand_shift_1): For 2-byte rotates by BITS_PER_UNIT,
30447 check for bswap in mode rather than HImode and use that in expand_unop
30448 too.
30449 \f
30450 Copyright (C) 2018 Free Software Foundation, Inc.
30451
30452 Copying and distribution of this file, with or without modification,
30453 are permitted in any medium without royalty provided the copyright
30454 notice and this notice are preserved.