1 2018-11-07 Alexandre Oliva <aoliva@redhat.com>
3 PR rtl-optimization/87874
4 * lra.c (lra_substitute_pseudo): Do not create a subreg for
7 2018-11-06 Aaron Sawdey <acsawdey@linux.ibm.com>
9 * config/rs6000/rs6000.md (bswap<mode>2): Force address into register
10 if not in indexed or indirect form.
11 (bswap<mode>2_load): Change predicate to indexed_or_indirect_operand.
12 (bswap<mode>2_store): Ditto.
14 2018-11-06 Richard Earnshaw <rearnsha@arm.com>
16 * config/aarch64/aarch64.md (speculation_tracker): Set the mode for
19 2018-11-06 Richard Biener <rguenther@suse.de>
21 PR tree-optimization/86850
22 * vec.h (vec<T, va_heap, vl_ptr>::splice): Check src.length ()
25 2018-11-06 Jan Hubicka <jh@suse.cz>
27 * tree.c (fld_simplified_type_name): Break out form ...
28 (free_lang_data_in_type): ... here.
29 (fld_type_variant_equal_p): Use it.
31 2018-11-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
33 * config/default-d.c: Include memmodel.h.
35 * config/sol2-d.c: New file.
36 * config/t-sol2 (sol2-d.o): New rule.
37 * config.gcc <*-*-solaris2*>: Set d_target_objs,
40 2018-11-06 Jan Hubicka <jh@suse.cz>
42 * tree.c (fld_type_variant): Also copy alignment; be sure that
45 2018-11-06 Ilya Leoshkevich <iii@linux.ibm.com>
48 * config/s390/s390.md: Add relative_long attribute.
50 2018-11-06 Jan Hubicka <jh@suse.cz>
52 * ipa-pure-const.c (check_decl): Do not test TYPE_NEEDS_CONSTRUCTING.
53 * lto-streamer-out.c (hash_tree): Do not hash TYPE_NEEDS_CONSTRUCTING.
54 * tree-streamer-in.c (unpack_ts_type_common_value_fields): Do not
55 stream TYPE_NEEDS_CONSTRUCTING.
56 * tree-streamer-out.c (pack_ts_type_common_value_fields): Likewise.
57 * tree.c (free_lang_data_in_type): Clear TYPE_NEEDS_CONSTRUCTING.
59 2018-11-06 Richard Biener <rguenther@suse.de>
61 * tree-vect-slp.c (vect_slp_bb): Move opening of vect_slp_analyze_bb
63 (vect_slp_analyze_bb_1): ... here to avoid hiding optimized locations.
65 2018-11-06 Jozef Lawrynowicz <jozef.l@mittosystems.com>
67 * gcc/config/msp430/msp430.h (REG_CLASS_CONTENTS): Add R0 to
68 REG_CLASS_CONTENTS[GEN_REGS].
69 (REGNO_REG_CLASS): Return NO_REGS for R2 and R3.
71 2018-11-06 Jan Hubicka <jh@suse.cz>
73 * tree.c (fld_simplified_type_of): Clear TYPELESS_STORAGE flag.
75 2018-11-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
78 * config/sol2.h (ASAN_CC1_SPEC): Define.
79 (LD_WHOLE_ARCHIVE_OPTION): Define.
80 (LD_NO_WHOLE_ARCHIVE_OPTION): Define.
81 (ASAN_REJECT_SPEC): Provide default.
82 (LIBASAN_EARLY_SPEC): Define.
83 (LIBTSAN_EARLY_SPEC): Define.
84 (LIBLSAN_EARLY_SPEC): Define.
85 * config/i386/sol2.h (CC1_SPEC): Redefine.
86 (ASAN_REJECT_SPEC): Define.
88 * config/sparc/sparc.c (sparc_asan_shadow_offset): Declare.
89 (TARGET_ASAN_SHADOW_OFFSET): Define.
90 (sparc_asan_shadow_offset): New function.
91 * config/sparc/sol2.h (CC1_SPEC): Append ASAN_CC1_SPEC.
92 (ASAN_REJECT_SPEC): Define.
94 2018-11-06 Jan Hubicka <jh@suse.cz>
96 * tree.c (fld_type_variant): Copy canonical type.
97 (fld_incomplete_type_of): Check that canonical types looks sane;
99 (verify_type): Accept when incomplete type has complete canonical type.
101 2018-11-06 Jan Hubicka <jh@suse.cz>
103 * tree.c (free_lang_data): Reset overwite_assembler_name,
104 print_xnode, print_decl, print_type and print_identifier of
107 2018-11-06 Richard Biener <rguenther@suse.de>
109 PR tree-optimization/87889
110 * tree-vect-loop-manip.c (slpeel_duplicate_current_defs_from_edges):
111 Do nothing if old and new arg are the same
113 2018-11-06 Andreas Krebbel <krebbel@linux.ibm.com>
116 * config/s390/s390.md ("*r<noxa>sbg_di_rotl"): Remove mode
117 attributes for operands 3 and 4.
119 2018-11-06 Richard Biener <rguenther@suse.de>
122 * simplify-rtx.c (simplify_binary_operation_1): Add pattern
123 matching bitfield insertion.
125 2018-11-06 Alexandre Oliva <aoliva@redhat.com>
127 * auto-inc-dec.c: Include valtrack.h. Improve comments.
128 (reg_next_debug_use): New.
129 (attempt_change): Propagate adjusted expression into affected
131 (merge_in_block): Track uses in debug insns.
132 (pass_inc_dec::execute): Allocate and release
135 2018-11-06 Wei Xiao <wei3.xiao@intel.com>
137 * config/i386/avx512fintrin.h: Update VFIXUPIMM* intrinsics.
138 (_mm512_fixupimm_round_pd): Update parameters and builtin.
139 (_mm512_maskz_fixupimm_round_pd): Ditto.
140 (_mm512_fixupimm_round_ps): Ditto.
141 (_mm512_maskz_fixupimm_round_ps): Ditto.
142 (_mm_fixupimm_round_sd): Ditto.
143 (_mm_maskz_fixupimm_round_sd): Ditto.
144 (_mm_fixupimm_round_ss): Ditto.
145 (_mm_maskz_fixupimm_round_ss): Ditto.
146 (_mm512_fixupimm_pd): Ditto.
147 (_mm512_maskz_fixupimm_pd): Ditto.
148 (_mm512_fixupimm_ps): Ditto.
149 (_mm512_maskz_fixupimm_ps): Ditto.
150 (_mm_fixupimm_sd): Ditto.
151 (_mm_maskz_fixupimm_sd): Ditto.
152 (_mm_fixupimm_ss): Ditto.
153 (_mm_maskz_fixupimm_ss): Ditto.
154 (_mm512_mask_fixupimm_round_pd): Update builtin.
155 (_mm512_mask_fixupimm_round_ps): Ditto.
156 (_mm_mask_fixupimm_round_sd): Ditto.
157 (_mm_mask_fixupimm_round_ss): Ditto.
158 (_mm512_mask_fixupimm_pd): Ditto.
159 (_mm512_mask_fixupimm_ps): Ditto.
160 (_mm_mask_fixupimm_sd): Ditto.
161 (_mm_mask_fixupimm_ss): Ditto.
162 * config/i386/avx512vlintrin.h:
163 (_mm256_fixupimm_pd): Update parameters and builtin.
164 (_mm256_maskz_fixupimm_pd): Ditto.
165 (_mm256_fixupimm_ps): Ditto.
166 (_mm256_maskz_fixupimm_ps): Ditto.
167 (_mm_fixupimm_pd): Ditto.
168 (_mm_maskz_fixupimm_pd): Ditto.
169 (_mm_fixupimm_ps): Ditto.
170 (_mm_maskz_fixupimm_ps): Ditto.
171 (_mm256_mask_fixupimm_pd): Update builtin.
172 (_mm256_mask_fixupimm_ps): Ditto.
173 (_mm_mask_fixupimm_pd): Ditto.
174 (_mm_mask_fixupimm_ps): Ditto.
175 * config/i386/i386-builtin-types.def: Add new types and remove useless ones.
176 * config/i386/i386-builtin.def: Update builtin definitions.
177 * config/i386/i386.c: Handle new builtin types and remove useless ones.
178 * config/i386/sse.md: Update VFIXUPIMM* patterns.
179 (<avx512>_fixupimm<mode>_maskz<round_saeonly_expand_name>): Update.
180 (<avx512>_fixupimm<mode><sd_maskz_name><round_saeonly_name>): Update.
181 (<avx512>_fixupimm<mode>_mask<round_saeonly_name>): Update.
182 (avx512f_sfixupimm<mode>_maskz<round_saeonly_expand_name>): Update.
183 (avx512f_sfixupimm<mode><sd_maskz_name><round_saeonly_name>): Update.
184 (avx512f_sfixupimm<mode>_mask<round_saeonly_name>): Update.
185 * config/i386/subst.md:
186 (round_saeonly_sd_mask_operand4): Add new subst_attr.
187 (round_saeonly_sd_mask_op4): Ditto.
188 (round_saeonly_expand_operand5): Ditto.
189 (round_saeonly_expand): Update.
191 2018-11-05 Max Filippov <jcmvbkbc@gmail.com>
193 * config/xtensa/uclinux.h (XTENSA_ALWAYS_PIC): Change to 0.
195 2018-11-05 Segher Boessenkool <segher@kernel.crashing.org>
197 PR rtl-optimization/87871
198 * combine.c (make_more_copies): Skip if dest is frame_pointer_rtx.
200 2018-11-05 Paul Koning <ni1d@arrl.net>
202 * doc/sourcebuild.texi (target attributes): Document new "inf"
203 effective target keyword.
205 2018-11-05 Robin Dapp <rdapp@linux.ibm.com>
207 * config/s390/s390.c (s390_register_move_cost): Increase costs for
208 moves involving the CC reg.
210 2018-11-05 Richard Biener <rguenther@suse.de>
212 PR tree-optimization/87873
213 * tree-ssa-loop-manip.h (split_loop_exit_edge): Add copy_constants_p
215 * tree-ssa-loop-manip.c (split_loop_exit_edge): Likewise.
216 * tree-vect-loop.c (vect_transform_loop): When splitting the
217 loop exit also create forwarder PHIs for constants.
218 * tree-vect-loop-manip.c (slpeel_duplicate_current_defs_from_edges):
219 Handle constant to_arg, add extra checking we match up the correct
222 2018-11-05 Robin Dapp <rdapp@linux.ibm.com>
224 * config/s390/s390.md: QImode and HImode for load on condition.
226 2018-11-05 Robin Dapp <rdapp@linux.ibm.com>
228 * config/s390/predicates.md: Fix typo.
229 * config/s390/s390.md: Allow immediates for load on condition.
231 2018-11-05 Martin Liska <mliska@suse.cz>
233 * alloc-pool.h (struct pool_usage): Use SIZE_AMOUNT.
234 * bitmap.h (struct bitmap_usage): Likewise.
235 * ggc-common.c (SCALE): Remove.
237 (struct ggc_usage): Use SIZE_AMOUNT. And update
239 * ggc-page.c (SCALE): Remove.
240 (STAT_LABEL): Remove.
241 (ggc_print_statistics): Use SIZE_AMOUNT.
242 * gimple.h (SCALE): Remove.
244 * input.c (ONE_K): Remove.
247 (STAT_LABEL): Likewise.
248 (FORMAT_AMOUNT): Likewise.
249 (dump_line_table_statistics): Use SIZE_AMOUNT.
250 * mem-stats.h (struct mem_usage): Likewise.
251 * rtl.c (dump_rtx_statistics): Likewise.
252 (rtx_alloc_counts): Change type to size_t.
253 (rtx_alloc_sizes): Likewise.
254 (rtx_count_cmp): New.
255 (dump_rtx_statistics): Sort first based on counts.
256 * tree.c (tree_nodes_cmp): New.
257 (tree_codes_cmp): New.
258 (dump_tree_statistics): Sort first based on counts.
259 * system.h (ONE_K): New.
261 (SIZE_SCALE): Likewise.
262 (SIZE_LABEL): Likewise.
263 (SIZE_AMOUNT): Likewise.
264 * tree-cfg.c (dump_cfg_stats): Use SIZE_AMOUNT.
265 * tree-dfa.c (dump_dfa_stats): Likewise.
266 * tree-phinodes.c (phinodes_print_statistics): Likewise.
267 * tree-ssanames.c (ssanames_print_statistics): Likewise.
268 * tree.c (dump_tree_statistics): Likewise.
269 * vec.c (struct vec_usage): Likewise.
270 * trans-mem.c (tm_mangle): Enlarge buffer in order to not
271 trigger a -Werror=format-overflow with
272 --enable-gather-detailed-stats.
274 2018-11-05 Martin Liska <mliska@suse.cz>
276 * mem-stats.h (mem_alloc_description::release_instance_overhead):
278 * vec.c (struct vec_usage): Register m_element_size.
279 (vec_prefix::register_overhead): New arguments: elements and
281 (vec_prefix::release_overhead): Subtract elements.
282 * vec.h (struct vec_prefix): Change signature.
283 (va_heap::reserve): Pass proper arguments.
284 (va_heap::release): Likewise.
286 2018-11-05 Martin Liska <mliska@suse.cz>
288 * mem-stats.h (mem_alloc_description::get_list): Fix GNU coding
292 2018-11-05 Richard Biener <rguenther@suse.de>
294 * tree-scalar-evolution.h (final_value_replacement_loop): Update
296 * tree-scalar-evolution.c (final_value_replacement_loop): Return
297 whether anything was done.
298 (scev_const_prop): Remove constant propagation part, fold
300 * tree-ssa-loop.c (pass_scev_cprop::execute): ... here.
301 (pass_data_scev_cprop): TODO_cleanup_cfg is now done
304 2018-11-05 Jakub Jelinek <jakub@redhat.com>
306 PR tree-optimization/87859
307 * gimple-ssa-store-merging.c (struct merged_store_group): Add
308 only_constants and first_nonmergeable_order members.
309 (merged_store_group::merged_store_group): Initialize them.
310 (merged_store_group::do_merge): Clear only_constants member if
311 adding something other than INTEGER_CST store.
312 (imm_store_chain_info::coalesce_immediate_stores): Don't merge
313 stores with order >= first_nonmergeable_order. Use
314 merged_store->only_constants instead of always recomputing it.
315 Set merged_store->first_nonmergeable_order if we've skipped any
316 stores. Attempt to merge overlapping INTEGER_CST stores that
317 we would otherwise skip.
320 * match.pd (X + Y < X): Don't optimize if TYPE_OVERFLOW_SANITIZED.
322 2018-11-05 Xuepeng Guo <xuepeng.guo@intel.com>
325 * config/i386/emmintrin.h (__v16qs): New to cope with option
327 (_mm_cmpeq_epi8): Replace __v16qi with __v16qs.
328 (_mm_cmplt_epi8): Likewise.
329 (_mm_cmpgt_epi8): Likewise.
331 2018-11-05 Richard Biener <rguenther@suse.de>
333 PR rtl-optimization/87852
334 * fwprop.c (use_killed_between): Only consider single-defs of the
335 use whose definition statement dominates the use.
337 2018-11-05 Martin Liska <mliska@suse.cz>
340 * doc/invoke.texi: Remove options that are
341 not disabled with -Os.
343 2018-11-05 Martin Liska <mliska@suse.cz>
346 * doc/extend.texi: Update constrain about the last argument
347 of __builtin_expect_with_probability.
349 2018-11-05 Martin Liska <mliska@suse.cz>
352 * predict.c (expr_expected_value_1): Verify
353 that last argument is a real constants and emit
356 2018-11-05 Martin Liska <mliska@suse.cz>
358 PR gcov-profile/77698
359 * ipa-profile.c (ipa_profile): Adjust hotness threshold
362 2018-11-04 Bernd Edlinger <bernd.edlinger@hotmail.de>
364 PR tree-optimization/86572
365 * builtins.c (c_strlen): Handle negative offsets in a safe way.
367 2018-11-04 Bernd Edlinger <bernd.edlinger@hotmail.de>
369 PR tree-optimization/87672
370 * gimple-fold.c (gimple_fold_builtin_stxcpy_chk): Gimplify.
371 * tree-ssa-strlen.c (handle_builtin_strcat): Adjust object size.
373 2018-11-04 Uros Bizjak <ubizjak@gmail.com>
376 * cfgexpand.c (pass_expand::execute): Move the call to
377 finish_eh_generation in front of the call to expand_stack_alignment.
379 2018-11-04 Venkataramanan Kumar <venkataramanan.kumar@amd.com>
381 * common/config/i386/i386-common.c (processor_alias_table): Add
383 * config.gcc (i[34567]86-*-linux* | ...): Add znver2.
384 (case ${target}): Add znver2.
385 * config/i386/driver-i386.c: (host_detect_local_cpu): Let
386 -march=native recognize znver2 processors.
387 * config/i386/i386-c.c (ix86_target_macros_internal): Add znver2.
388 * config/i386/i386.c (m_znver2): New definition.
389 (m_ZNVER): New definition.
390 (m_AMD_MULTIPLE): Includes m_znver2.
391 (processor_cost_table): Add znver2 entry.
392 (processor_target_table): Add znver2 entry.
393 (get_builtin_code_for_version): Set priority for
395 (processor_model): Add M_AMDFAM17H_ZNVER2.
396 (arch_names_table): Ditto.
397 (ix86_reassociation_width): Include znver2.
398 * config/i386/i386.h (TARGET_znver2): New definition.
399 (struct ix86_size_cost): Add TARGET_ZNVER2.
400 (enum processor_type): Add PROCESSOR_ZNVER2.
401 * config/i386/i386.md (define_attr "cpu"): Add znver2.
402 * config/i386/x86-tune-costs.h: (processor_costs) Add znver2 costs.
403 * config/i386/x86-tune-sched.c: (ix86_issue_rate): Add znver2.
404 (ix86_adjust_cost): Add znver2.
405 * config/i386/x86-tune.def: Replace m_ZNVER1 by m_ZNVER.
406 * gcc/doc/extend.texi: Add details about znver2.
407 * gcc/doc/invoke.texi: Add details about znver2.
409 2018-11-03 Sandra Loosemore <sandra@codesourcery.com>
413 * config/nios2/nios2.c (nios2_rtx_costs): Recognize <mul>sidi3
416 2018-11-02 Aaron Sawdey <acsawdey@linux.ibm.com>
418 * config/rs6000/rs6000-string.c (expand_strncmp_gpr_sequence): Pay
419 attention to TARGET_AVOID_XFORM and BYTES_BIG_ENDIAN.
421 2018-11-02 Richard Earnshaw <rearnsha@arm.com>
423 * config/aarch64/aarch64.c ((aarch64_override_options): Disable
424 shrink-wrapping when -mtrack-speculation.
426 2018-11-02 Richard Biener <rguenther@suse.de>
428 * tree-ssa-coalesce.c (struct coalesce_list): Add obstack member.
429 (pop_cost_one_pair): Do not free pair.
430 (pop_best_coalesce): Likewise.
431 (create_coalesce_list): Initialize obstack.
432 (delete_coalesce_list): Free obstack.
433 (find_coalesce_pair): Obstack-allocate coalesce pairs.
434 (add_cost_one_coalesce): Likewise.
435 (struct live_track): Remove bitmap pointer indirections.
436 (new_live_track): Adjust.
437 (delete_live_track): Likewise.
438 (live_track_remove_partition): Likewise.
439 (live_track_add_partition): Likewise.
440 (live_track_live_p): Likewise.
441 (live_track_process_def): Likewise.
442 (live_track_clear_base_vars): Likewise.
444 2018-11-02 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
446 * configure.ac (gcc_cv_as_sparc_register_op): Remove.
447 * configure: Regenerate.
448 * config.in: Regenerate.
449 * config/sparc/sparc.c (sparc_output_scratch_registers): Remove
450 HAVE_AS_REGISTER_PSEUDO_OP guard.
451 * config/sparc/sparc.h (ASM_ARCH64_SPEC): Remove
452 !HAVE_AS_REGISTER_PSEUDO_OP support.
453 (ASM_DECLARE_REGISTER_GLOBAL): Remove HAVE_AS_REGISTER_PSEUDO_OP
456 2018-11-02 Richard Biener <rguenther@suse.de>
458 * dwarf2out.c (build_abbrev_table): Guard lookup_external_ref call
461 2018-11-02 Richard Biener <rguenther@suse.de>
463 PR tree-optimization/87776
464 * tree-ssa-sccvn.c (do_rpo_vn): Do not mark backedges
465 executable when iterating but running into rpo-vn-max-loop-depth
466 and not eliding the iteration.
468 2018-11-30 Jan Hubicka <jh@suse.cz>
470 * tree.c (free_lang_data_in_decl): Free TREE_TYPE and alignment of
473 2018-11-01 Aaron Sawdey <acsawdey@linux.ibm.com>
475 * config/rs6000/rs6000-protos.h (rs6000_address_for_fpconvert): Remove
477 * config/rs6000/rs6000.c (rs6000_force_indexed_or_indirect_mem):
478 Combine with rs6000_address_for_fpconvert.
479 (rs6000_address_for_fpconvert): Combine with
480 rs6000_force_indexed_or_indirect_mem.
481 (rs6000_expand_vector_init): Change function call from
482 rs6000_address_for_fpconvert to rs6000_force_indexed_or_indirect_mem.
483 * config/rs6000/rs6000.md (floatsi<mode>2_lfiwax): Change call from
484 rs6000_address_for_fpconvert to rs6000_force_indexed_or_indirect_mem.
485 (floatsi<mode>2_lfiwax_mem): Ditto.
486 (floatunssi<mode>2_lfiwzx): Ditto.
487 (floatunssi<mode>2_lfiwzx_mem): Ditto.
488 (float<QHI:mode><FP_ISA3:mode>2): Ditto.
489 (floatuns<QHI:mode><FP_ISA3:mode>2): Ditto.
490 (fix_trunc<mode>si2_stfiwx): Ditto.
491 (fixuns_trunc<mode>si2_stfiwx): Ditto.
492 (float_<mode>si2_hw): Ditto.
493 (floatuns_<mode>si2_hw): Ditto.
494 * config/rs6000/vsx.md (*vsx_extract_si): Ditto.
495 (vsx_splat_<mode>): Ditto.
497 2018-11-01 Joseph Myers <joseph@codesourcery.com>
499 * configure.ac (gcc_cv_as_ia64_ltoffx_ldxmov_relocs): Add newline
500 at end of assembler input text.
501 * configure: Regenerate.
503 2018-11-01 Jakub Jelinek <jakub@redhat.com>
505 PR tree-optimization/87826
506 * gimple-ssa-store-merging.c (do_shift_rotate): Punt if count is
507 negative or larger or equal to type's precision.
509 2018-10-31 Alexandre Oliva <aoliva@redhat.com>
511 * opts.c (default_options_table): Do not enable
512 OPT_fdelayed_branch at -Og.
513 * doc/invoke.texi (-fdelayed-branch): Document it.
515 2018-10-31 Richard Henderson <richard.henderson@linaro.org>
517 * optabs-libfuncs.c (build_libfunc_function_visibility):
518 New, split out from...
519 (build_libfunc_function): ... here.
520 (init_one_libfunc_visibility): New, split out from ...
521 (init_one_libfunc): ... here.
523 * config/aarch64/atomics.md (aarch64_atomic_<ATOMIC_LDOP><ALLI>_lse):
524 scratch register need not be early-clobber. Document the reason
525 why we cannot use ST<OP>.
527 2018-10-31 Joseph Myers <joseph@codesourcery.com>
530 * configure.ac: Remove AC_PREREQ. Use AC_LANG_SOURCE. Use single
531 line for second argument of AC_DEFINE_UNQUOTED.
532 * doc/install.texi (Tools/packages necessary for modifying GCC):
533 Update to autoconf 2.69 and automake 1.15.1.
534 * aclocal.m4, config.in, configure: Regenerate.
536 2018-10-31 Pat Haugen <pthaugen@us.ibm.com>
538 * tree-ssa-loop-ivcanon.c (try_peel_loop): Fix typo and remove dead
541 2018-10-31 Martin Liska <mliska@suse.cz>
544 * common/config/aarch64/aarch64-common.c (aarch64_parse_extension):
545 Add new argument invalid_extension.
546 (aarch64_get_all_extension_candidates): New function.
547 (aarch64_rewrite_selected_cpu): Add NULL to function call.
548 * config/aarch64/aarch64-protos.h (aarch64_parse_extension): Add
550 (aarch64_get_all_extension_candidates): New function.
551 * config/aarch64/aarch64.c (aarch64_parse_arch): Add new
552 argument invalid_extension.
553 (aarch64_parse_cpu): Likewise.
554 (aarch64_print_hint_for_extensions): New function.
555 (aarch64_validate_mcpu): Provide hint about invalid extension.
556 (aarch64_validate_march): Likewise.
557 (aarch64_handle_attr_arch): Pass new argument.
558 (aarch64_handle_attr_cpu): Provide hint about invalid extension.
559 (aarch64_handle_attr_isa_flags): Likewise.
561 2018-10-31 Richard Biener <rguenther@suse.de>
565 * tree-outof-ssa.c (insert_backedge_copies): Restrict
566 copy generation to useful cases. Place the copy before
567 the definition of the backedge value when possible.
569 2018-10-31 Claudiu Zissulescu <claziss@synopsys.com>
571 * config/arc/arc-arch.h (ARC_TUNE_ARC7XX): New tune value.
572 * config/arc/arc.c (arc_active_insn): New function.
573 (check_store_cacheline_hazard): Likewise.
574 (workaround_arc_anomaly): Use check_store_cacheline_hazard.
575 (arc_override_options): Disable delay slot scheduler for older
577 (arc_store_addr_hazard_p): New implementation, old one renamed to
579 (arc_store_addr_hazard_internal_p): Renamed.
580 (arc_reorg): Don't combine into brcc instructions which are part
581 of hardware hazard solution.
582 * config/arc/arc.md (attr tune): Consider new arc7xx tune value.
583 (tune_arc700): Likewise.
584 * config/arc/arc.opt (arc7xx): New tune value.
585 * config/arc/arc700.md: Improve A7 scheduler.
587 2018-10-31 Claudiu Zissulescu <claziss@synopsys.com>
589 * config/arc/arc.c (arc_override_options): Remove
590 TARGET_COMPACT_CASESI.
591 * config/arc/arc.h (ASM_OUTPUT_ADDR_DIFF_ELT): Update.
592 (CASE_VECTOR_MODE): Likewise.
593 (CASE_VECTOR_PC_RELATIVE): Likewise.
594 (CASE_VECTOR_SHORTEN_MODE): Likewise.
595 (CASE_VECTOR_SHORTEN_MODE1): Delete.
596 (ADDR_VEC_ALIGN): Update.
597 (ASM_OUTPUT_CASE_LABEL): Undefine.
598 (ASM_OUTPUT_BEFORE_CASE_LABEL): Undefine.
599 (TARGET_BI_BIH): Define.
600 (DEFAULT_BRANCH_INDEX): Likewise.
601 * config/arc/arc.md (casesi): Rework to accept BI/BIH
602 instructions, remove compact_casesi use case.
603 (casesi_compact_jump): Remove.
604 (casesi_dispatch): New pattern.
605 * config/arc/arc.opt: Add mbranch-index option. Deprecate
606 compact_casesi option.
607 * doc/invoke.texi: Document mbranch-index option.
609 2018-10-31 Claudiu Zissulescu <claziss@synopsys.com>
611 * config/arc/arc.c (arc_get_tp): Remove function.
612 (arc_emit_call_tls_get_addr): Likewise.
613 (arc_call_tls_get_addr): New function.
614 (arc_legitimize_tls_address): Make use of arc_call_tls_get_addr.
615 * config/arc/arc.md (tls_load_tp_soft): Remove.
616 (tls_gd_get_addr): Likewise.
618 2018-10-31 Claudiu Zissulescu <claziss@synopsys.com>
620 * config/arc/arc.md (mulsi3): Remove call to mulsi_600_lib.
621 (mulsi3_600_lib): Remove pattern.
622 (umulsi3_highpart_600_lib_le): Likewise.
623 (umulsi3_highpart): Remove call to umulsi3_highpart_600_lib_le.
624 (umulsidi3): Remove call to umulsidi3_600_lib.
625 (umulsidi3_600_lib): Remove pattern.
626 (peephole2): Remove peephole using the above deprecated patterns.
628 2018-10-31 Thomas Preud'homme <thomas.preudhomme@linaro.org>
631 * config/arm/arm.c (arm_option_check_internal): Disable the combined
632 use of -mslow-flash-data and -mword-relocations.
633 (arm_option_override): Enable -mword-relocations if -fpic or -fPIC.
634 * config/arm/arm.md (SYMBOL_REF MOVT splitter): Stop checking for
636 * doc/invoke.texi (-mword-relocations): Mention conflict with
638 (-mslow-flash-data): Reciprocally.
640 2018-10-31 Richard Henderson <richard.henderson@linaro.org>
642 * config/aarch64/aarch64.c (aarch64_hard_regno_mode_ok): Force
643 16-byte modes held in GP registers to use an even regno.
645 * config/aarch64/aarch64.c (aarch64_emit_bic): Remove.
646 (aarch64_atomic_ldop_supported_p): Remove.
647 (aarch64_gen_atomic_ldop): Remove.
648 * config/aarch64/atomic.md (atomic_<atomic_optab><ALLI>):
649 Fully expand LSE operations here.
650 (atomic_fetch_<atomic_optab><ALLI>): Likewise.
651 (atomic_<atomic_optab>_fetch<ALLI>): Likewise.
652 (aarch64_atomic_<ATOMIC_LDOP><ALLI>_lse): Drop atomic_op iterator
653 and use ATOMIC_LDOP instead; use register_operand for the input;
654 drop the split and emit insns directly.
655 (aarch64_atomic_fetch_<ATOMIC_LDOP><ALLI>_lse): Likewise.
656 (aarch64_atomic_<atomic_op>_fetch<ALLI>_lse): Remove.
657 (@aarch64_atomic_load<ATOMIC_LDOP><ALLI>): Remove.
659 * config/aarch64/aarch64.c (aarch64_emit_atomic_swap): Remove.
660 (aarch64_gen_atomic_ldop): Don't call it.
661 * config/aarch64/atomics.md (atomic_exchange<ALLI>):
662 Use aarch64_reg_or_zero.
663 (aarch64_atomic_exchange<ALLI>): Likewise.
664 (aarch64_atomic_exchange<ALLI>_lse): Remove split; remove & from
665 operand 0; use aarch64_reg_or_zero for input; merge ...
666 (@aarch64_atomic_swp<ALLI>): ... this and remove.
668 * config/aarch64/aarch64.c (aarch64_gen_compare_reg_maybe_ze): New.
669 (aarch64_split_compare_and_swap): Use it.
670 (aarch64_expand_compare_and_swap): Likewise. Remove convert_modes;
671 test oldval against the proper predicate.
672 * config/aarch64/atomics.md (@atomic_compare_and_swap<ALLI>):
673 Use nonmemory_operand for expected.
674 (cas_short_expected_pred): New.
675 (@aarch64_compare_and_swap<SHORT>): Use it; use "rn" not "rI" to match.
676 (@aarch64_compare_and_swap<GPI>): Use "rn" not "rI" for expected.
677 * config/aarch64/predicates.md (aarch64_plushi_immediate): New.
678 (aarch64_plushi_operand): New.
680 * config/aarch64/aarch64.c (aarch64_expand_compare_and_swap):
681 Force oldval into the rval register for TARGET_LSE; emit the compare
682 during initial expansion so that it may be deleted if unused.
683 (aarch64_gen_atomic_cas): Remove.
684 * config/aarch64/atomics.md (@aarch64_compare_and_swap<SHORT>_lse):
685 Change =&r to +r for operand 0; use match_dup for operand 2;
686 remove is_weak and mod_f operands as unused. Drop the split
688 (@aarch64_atomic_cas<SHORT>): ... this pattern's output; remove.
689 (@aarch64_compare_and_swap<GPI>_lse): Similarly.
690 (@aarch64_atomic_cas<GPI>): Similarly.
692 2018-10-31 Richard Biener <rguenther@suse.de>
694 * tree-eh.c (replace_trapping_overflow): Simplify ABS_EXPR case
697 2018-10-31 Sameera Deshpande <sameera.deshpande@linaro.org>
699 * config/aarch64/aarch64-cores.def (saphira): Use saphira pipeline.
700 * config/aarch64/aarch64.md: Include saphira.md
701 * config/aarch64/saphira.md: New file for pipeline description.
703 2018-10-30 Martin Sebor <msebor@redhat.com>
706 * gimple-ssa-sprintf.c (format_directive): Use %G to include
708 (sprintf_dom_walker::compute_format_length):
709 Avoid setting POSUNDER4K here.
710 (get_destination_size): Handle null argument values.
711 (get_user_idx_format): New function.
712 (sprintf_dom_walker::handle_gimple_call): Handle all printf-like
713 functions, including user-defined with attribute format printf.
714 Use %G to include inlining context.
717 2018-10-30 Jan Hubicka <jh@suse.cz>
719 * params.def (lto-partitions): Bump from 32 to 128.
721 2018-10-30 Jan Hubicka <jh@suse.cz>
724 (free_lang_data_d, add_tree_to_fld_list, fld_worklist_push): Move
726 (free_lang_data_in_type): Forward declare.
727 (fld_type_variant_equal_p): New function.
728 (fld_type_variant): New function
729 (fld_incomplete_types): New hash.
730 (fld_incomplete_type_of): New function
731 (fld_simplfied-type): New function.
732 (free_lang_data_in_decl): Add fld parameter; simplify type of FIELD_DECL
733 (free_lang_data): Allocate and free fld_incomplete_type; update call
734 of free_lang_data_in_decl.
736 2018-10-30 Eric Botcazou <ebotcazou@adacore.com>
738 * gcov.c (output_lines): Remove duplicate line.
740 2018-10-30 Aaron Sawdey <acsawdey@linux.ibm.com>
742 * config/rs6000/rs6000.md (bswapdi2): Force address into register
743 if not in indexed or indirect form.
744 (bswapdi2_load): Change predicate to indexed_or_indirect_operand.
745 (bswapdi2_store): Ditto.
746 * config/rs6000/rs6000.c (rs6000_force_indexed_or_indirect_mem): New
748 * config/rs6000/rs6000-protos.h (rs6000_force_indexed_or_indirect_mem):
749 Prototype for helper function.
751 2018-10-30 Martin Sebor <msebor@redhat.com>
753 * doc/extend.texi (optimize): Clarify/expand attribute documentation.
754 (target, pragma GCC optimize, pragma GCC target): Ditto.
756 2018-10-30 Jonathan Wakely <jwakely@redhat.com>
758 * doc/extend.texi: Fix prototype and description of
759 __builtin_expect_with_probability.
761 2018-10-30 Michael Ploujnikov <michael.ploujnikov@oracle.com>
763 * cgraph.h (clone_function_name_1): Replaced by new
764 clone_function_name_numbered that takes name as string; for
765 privatize_symbol_name_1 use only.
766 (clone_function_name): Renamed to
767 clone_function_name_numbered to be explicit about numbering.
768 (clone_function_name): New two-argument function that does
769 not number its output.
770 (clone_function_name): New three-argument function that
771 takes a number to append to its output.
772 * cgraphclones.c (duplicate_thunk_for_node):
773 (clone_function_name_1): Renamed.
774 (clone_function_name_numbered): Two new functions.
775 (clone_function_name): Improved documentation.
776 (cgraph_node::create_virtual_clone): Use clone_function_name_numbered.
777 * config/rs6000/rs6000.c (make_resolver_func): Ditto.
778 * final.c (final_scan_insn_1): Use the new clone_function_name
780 * multiple_target.c (create_dispatcher_calls): Ditto.
781 (create_target_clone): Ditto.
782 * omp-expand.c (grid_expand_target_grid_body): Ditto.
783 * omp-low.c (create_omp_child_function_name): Ditto.
784 * omp-simd-clone.c (simd_clone_create): Ditto.
785 * symtab.c (simd_symtab_node::noninterposable_alias): Use the
786 new clone_function_name without numbering.
788 2018-10-30 Richard Earnshaw <rearnsha@arm.com>
790 * alloc-pool.h (base_pool_allocator <TBlockAllocator>::initialize):
791 Assert that the allocation size is not zero.
793 2018-10-30 Richard Biener <rguenther@suse.de>
795 PR tree-optimization/87800
796 * tree-vect-slp.c (vect_build_slp_tree_2): Reject any
797 non-induction or reduction PHIs.
799 2018-10-30 Sameera Deshpande <sameera.deshpande@linaro.org
801 * config/aarch64/falkor-tag-collision-avoidance.c
802 (execute_tag_collision_avoidance): Call df_note_add_problem.
804 2018-10-30 Martin Liska <mliska@suse.cz>
806 * doc/extend.texi: Fix typo in documentation
807 of __builtin_expect_with_probability.
809 2018-10-29 David Malcolm <dmalcolm@redhat.com>
812 * input.c (get_substring_ranges_for_loc): Detect if
813 linemap_resolve_location gives us a NULL map, and reject
816 2018-10-29 Iain Buclaw <ibuclaw@gdcproject.org>
818 * config.gcc (xstormy16-*-elf): Set tm_d_file.
820 2018-10-29 David Malcolm <dmalcolm@redhat.com>
821 Martin Sebor <msebor@redhat.com>
822 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
824 * doc/ux.texi (Quoting): New subsection, adapted from material at
825 https://gcc.gnu.org/wiki/DiagnosticsGuidelines written by
826 MartinSebor and ManuelLopezIbanez.
827 (Fix-it hints): Note that fix-it hints shouldn't be marked for
830 2018-10-29 Kugan Vivekanandarajah <kuganv@linaro.org>
833 * tree-ssa-loop-niter.c (number_of_iterations_popcount): Fix niter
836 2018-10-29 Paul A. Clarke <pc@us.ibm.com>
838 * gcc.target/powerpc/ssse3-check.h: Remove inaccurate comment.
840 2018-10-29 Paul Koning <ni1d@arrl.net>
842 * doc/rtl.texi (CONST_WIDE_INT_ELT): Give correct macro name.
844 2018-10-29 Paul A. Clarke <pc@us.ibm.com>
846 * gcc/config/rs6000/mmintrin.h (_mm_packs_pi16, _mm_packs_pi32,
847 _mm_packs_pu16, _mm_unpackhi_pi8, _mm_unpacklo_pi8, _mm_add_pi8,
848 _mm_add_pi16, _mm_add_pi32, _mm_sub_pi8, _mm_sub_pi16, _mm_sub_pi32,
849 _mm_cmpgt_pi8, _mm_cmpeq_pi16, _mm_cmpgt_pi16, _mm_cmpeq_pi32,
850 _mm_cmpgt_pi32, _mm_adds_pi8, _mm_adds_pi16, _mm_adds_pu8,
851 _mm_adds_pu16, _mm_subs_pi8, _mm_subs_pi16, _mm_subs_pu8,
852 _mm_subs_pu16, _mm_madd_pi16, _mm_mulhi_pi16, _mm_mullo_pi16,
853 _mm_sll_pi16, _mm_sra_pi16, _mm_srl_pi16, _mm_set1_pi16, _mm_set1_pi8):
854 Change 'vector' to '__vector'.
855 * gcc/config/rs6000/xmmintrin.h (_mm_cvtps_pi32, _mm_cvttps_pi32,
856 _mm_cvtps_pi16, _mm_cvtps_pi8, _mm_max_pi16, _mm_max_pu8, _mm_min_pi16,
857 _mm_min_pu8, _mm_mulhi_pu16, _mm_shuffle_pi16, _mm_avg_pu8,
858 _mm_avg_pu16): Likewise. And, whitespace corrections.
860 2018-10-29 Richard Biener <rguenther@suse.de>
862 PR tree-optimization/87785
863 * tree-vect-slp.c (vect_gather_slp_loads): Only gather
866 2018-10-29 Olivier Hainque <hainque@adacore.com>
868 * VXWORKS_NET_LIBS_RTP: New macro, network part of VXWORKS_LIBS_RTP.
870 2018-10-29 Olivier Hainque <hainque@adacore.com>
872 * config/vxworks.h (VXWORKS_PERSONALITY): New VxWorks
873 ports configuration macro, defaults to "gnu".
874 (VXWORKS_OS_CPP_BUILTINS): Use it. Feed TOOL and
875 TOOL_FAMILY instead of _VX_TOOL/_VXTOOL_FAMILY.
877 2018-10-29 Olivier Hainque <hainque@adacore.com>
879 * config/vxworks.h (CLEAR_INSN_CACHE): #undef before #define.
881 2018-10-29 Richard Biener <rguenther@suse.de>
883 PR tree-optimization/87790
884 * tree-vect-slp.c (vect_mark_slp_stmts): Simplify.
885 (vect_make_slp_decision): Adjust.
886 (vect_slp_analyze_bb_1): Likewise.
887 (vect_detect_hybrid_slp_stmts): Properly union SLP type over
890 2018-10-29 Richard Biener <rguenther@suse.de>
892 PR tree-optimization/87785
893 * tree-vect-slp.c (vect_build_slp_tree_2): Remove loads argument
895 (vect_build_slp_tree): Likewise.
896 (vect_gather_slp_loads): New function.
897 (vect_analyze_slp_instance): Gather loads separately from the
900 2018-10-29 Martin Liska <mliska@suse.cz>
902 * Makefile.in: Make dependency to json.o.
903 * doc/gcov.texi: Document new JSON format, remove
904 old intermediate format documentation.
905 * gcov.c (struct function_info): Come up with m_name and
907 (function_info::function_info): Initialize it.
908 (function_info::~function_info): Release it.
909 (main): Rename flag_intermediate_format to flag_json_format.
910 (print_usage): Describe --json-format.
911 (process_args): Set flag_json_format.
912 (output_intermediate_line): Remove.
913 (output_intermediate_json_line): Likewise.
914 (get_gcov_intermediate_filename): Return new extension
916 (output_intermediate_file): Implement JSON emission.
917 (output_json_intermediate_file): Implement JSON emission.
918 (generate_results): Use ::get_name for function name.
919 Handle JSON output file.
920 (read_graph_file): Use ::get_name instead of cplus_demangle.
921 (read_count_file): Likewise.
922 (solve_flow_graph): Likewise.
923 (add_line_counts): Likewise.
924 (accumulate_line_counts): Use new flag_json_format.
925 (output_function_details): Use ::get_name instead of cplus_demangle.
926 (output_lines): Likewise.
927 * json.cc (test_writing_literals): Add new tests.
928 * json.h (class literal): Add new boolean constructor.
930 2018-10-29 Segher Boessenkool <segher@kernel.crashing.org>
932 PR rtl-optimization/87701
933 PR rtl-optimization/87780
934 * combine.c (make_more_copies): Rewrite.
936 2018-10-28 Kugan Vivekanandarajah <kuganv@linaro.org>
938 * doc/generic.texi (ABSU_EXPR): Document.
939 * match.pd (absu(x)*absu(x) -> x*x): Handle.
940 (absu(absu(X)) -> absu(X)): Likewise.
941 (absu(-X) -> absu(X)): Likewise.
942 (absu(X) where X is nonnegative -> X): Likewise.
944 2018-10-28 Iain Buclaw <ibuclaw@gdcproject.org>
946 * Makefile.in (tm_d_file_list, tm_d_include_list): New variables.
947 (TM_D_H, D_TARGET_DEF, D_TARGET_H, D_TARGET_OBJS): New variables.
948 (tm_d.h, cs-tm_d.h, default-d.o): New rules.
949 (d/d-target-hooks-def.h, s-d-target-hooks-def-h): New rules.
950 (s-tm-texi): Also check timestamp on d-target.def.
951 (generated_files): Add TM_D_H and d-target-hooks-def.h.
952 (build/genhooks.o): Also depend on D_TARGET_DEF.
953 * config.gcc (tm_d_file, d_target_objs, target_has_targetdm): New
955 * config/aarch64/aarch64-d.c: New file.
956 * config/aarch64/aarch64-linux.h (GNU_USER_TARGET_D_CRITSEC_SIZE):
958 * config/aarch64/aarch64-protos.h (aarch64_d_target_versions): New
960 * config/aarch64/aarch64.h (TARGET_D_CPU_VERSIONS): Define.
961 * config/aarch64/t-aarch64 (aarch64-d.o): New rule.
962 * config/arm/arm-d.c: New file.
963 * config/arm/arm-protos.h (arm_d_target_versions): New prototype.
964 * config/arm/arm.h (TARGET_D_CPU_VERSIONS): Define.
965 * config/arm/linux-eabi.h (EXTRA_TARGET_D_OS_VERSIONS): Define.
966 * config/arm/t-arm (arm-d.o): New rule.
967 * config/default-d.c: New file.
968 * config/glibc-d.c: New file.
969 * config/gnu.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
970 * config/i386/i386-d.c: New file.
971 * config/i386/i386-protos.h (ix86_d_target_versions): New prototype.
972 * config/i386/i386.h (TARGET_D_CPU_VERSIONS): Define.
973 * config/i386/linux-common.h (EXTRA_TARGET_D_OS_VERSIONS): Define.
974 (GNU_USER_TARGET_D_CRITSEC_SIZE): Define.
975 * config/i386/t-i386 (i386-d.o): New rule.
976 * config/kfreebsd-gnu.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
977 * config/kopensolaris-gnu.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
978 * config/linux-android.h (ANDROID_TARGET_D_OS_VERSIONS): Define.
979 * config/linux.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
980 * config/mips/linux-common.h (EXTRA_TARGET_D_OS_VERSIONS): Define.
981 * config/mips/mips-d.c: New file.
982 * config/mips/mips-protos.h (mips_d_target_versions): New prototype.
983 * config/mips/mips.h (TARGET_D_CPU_VERSIONS): Define.
984 * config/mips/t-mips (mips-d.o): New rule.
985 * config/powerpcspe/linux.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
986 * config/powerpcspe/linux64.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
987 * config/powerpcspe/powerpcspe-d.c: New file.
988 * config/powerpcspe/powerpcspe-protos.h (rs6000_d_target_versions):
990 * config/powerpcspe/powerpcspe.c (rs6000_output_function_epilogue):
991 Support GNU D by using 0 as the language type.
992 * config/powerpcspe/powerpcspe.h (TARGET_D_CPU_VERSIONS): Define.
993 * config/powerpcspe/t-powerpcspe (powerpcspe-d.o): New rule.
994 * config/riscv/riscv-d.c: New file.
995 * config/riscv/riscv-protos.h (riscv_d_target_versions): New
997 * config/riscv/riscv.h (TARGET_D_CPU_VERSIONS): Define.
998 * config/riscv/t-riscv (riscv-d.o): New rule.
999 * config/rs6000/linux.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
1000 * config/rs6000/linux64.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
1001 * config/rs6000/rs6000-d.c: New file.
1002 * config/rs6000/rs6000-protos.h (rs6000_d_target_versions): New
1004 * config/rs6000/rs6000.c (rs6000_output_function_epilogue):
1005 Support GNU D by using 0 as the language type.
1006 * config/rs6000/rs6000.h (TARGET_D_CPU_VERSIONS): Define.
1007 * config/rs6000/t-rs6000 (rs6000-d.o): New rule.
1008 * config/s390/s390-d.c: New file.
1009 * config/s390/s390-protos.h (s390_d_target_versions): New prototype.
1010 * config/s390/s390.h (TARGET_D_CPU_VERSIONS): Define.
1011 * config/s390/t-s390 (s390-d.o): New rule.
1012 * config/sparc/sparc-d.c: New file.
1013 * config/sparc/sparc-protos.h (sparc_d_target_versions): New
1015 * config/sparc/sparc.h (TARGET_D_CPU_VERSIONS): Define.
1016 * config/sparc/t-sparc (sparc-d.o): New rule.
1017 * config/t-glibc (glibc-d.o): New rule.
1018 * configure: Regenerated.
1019 * configure.ac (tm_d_file): New variable.
1020 (tm_d_file_list, tm_d_include_list, d_target_objs): Add substitutes.
1021 * doc/contrib.texi (Contributors): Add self for the D frontend.
1022 * doc/frontends.texi (G++ and GCC): Mention D as a supported language.
1023 * doc/install.texi (Configuration): Mention libphobos as an option for
1024 --enable-shared. Mention d as an option for --enable-languages.
1025 (Testing): Mention check-d as a target.
1026 * doc/invoke.texi (Overall Options): Mention .d, .dd, and .di as file
1027 name suffixes. Mention d as a -x option.
1028 * doc/sourcebuild.texi (Top Level): Mention libphobos.
1029 * doc/standards.texi (Standards): Add section on D language.
1030 * doc/tm.texi: Regenerated.
1031 * doc/tm.texi.in: Add @node for D language and ABI, and @hook for
1032 TARGET_CPU_VERSIONS, TARGET_D_OS_VERSIONS, and TARGET_D_CRITSEC_SIZE.
1033 * dwarf2out.c (is_dlang): New function.
1034 (gen_compile_unit_die): Use DW_LANG_D for D.
1035 (declare_in_namespace): Return module die for D, instead of adding
1036 extra declarations into the namespace.
1037 (gen_namespace_die): Generate DW_TAG_module for D.
1038 (gen_decl_die): Handle CONST_DECLSs for D.
1039 (dwarf2out_decl): Likewise.
1040 (prune_unused_types_walk_local_classes): Handle DW_tag_interface_type.
1041 (prune_unused_types_walk): Handle DW_tag_interface_type same as other
1042 kinds of aggregates.
1043 * gcc.c (default_compilers): Add entries for .d, .dd and .di.
1044 * genhooks.c: Include d/d-target.def.
1046 2018-10-28 Iain Sandoe <iain@sandoe.co.uk>
1049 * config/rs6000/darwin.h (STACK_BOUNDARY): New.
1050 (RS6000_STARTING_FRAME_OFFSET): Adjust to preserve 16byte alignment.
1051 (STACK_DYNAMIC_OFFSET): Likewise.
1053 2018-10-27 Sandra Loosemore <sandra@codesourcery.com>
1056 * config/nios2/nios2.c (nios2_valid_target_attribute_rec): Fix
1059 2018-10-26 Tulio Magno Quites Machado Filho <tuliom@linux.ibm.com>
1061 * doc/extend.texi (PowerPC builtins): Fix __builtin_unpack_ibm128
1062 return type and other typos.
1064 2018-10-26 Aaron Sawdey <acsawdey@linux.ibm.com>
1066 * config/rs6000/rs6000-string.c (expand_strncmp_gpr_sequence): Change to
1067 a shorter sequence with fewer branches.
1068 (emit_final_str_compare_gpr): Ditto.
1070 2018-10-26 Paul A. Clarke <pc@us.ibm.com>
1072 * config/rs6000/tmmintrin.h: New file.
1073 * config.gcc (powerpc*-*-*): Add tmmintrin.h to extra_headers.
1075 2018-10-26 Paul A. Clarke <pc@us.ibm.com>
1077 * config/rs6000/mmintrin.h: Enable 32bit compilation.
1078 * config/rs6000/xmmintrin.h: Likewise.
1080 2018-10-26 Paul A. Clarke <pc@us.ibm.com>
1082 * config/rs6000/xmmintrin.h (_mm_extract_pi16): Fix for big-endian.
1084 2018-10-26 Richard Biener <rguenther@suse.de>
1086 * tree-vect-slp.c (vect_mark_slp_stmts): Add visited hash_set
1088 (vect_mark_slp_stmts_relevant): Likewise.
1089 (vect_detect_hybrid_slp_stmts): Likewise.
1090 (vect_bb_slp_scalar_cost): Likewise.
1091 (vect_remove_slp_scalar_calls): Likewise.
1093 2018-10-26 Jan Hubicka <jh@suse.cz>
1095 * ipa-devirt.c (odr_subtypes_equivalent_p): Fix recursion.
1096 (warn_types_mismatch): Fix walk of DECL_NAME.
1097 (odr_types_equivalent_p): Fix overactive assert.
1099 2018-10-26 Richard Biener <rguenther@suse.de>
1101 PR tree-optimization/87105
1102 * tree-vectorizer.h (_slp_tree::refcnt): New member.
1103 * tree-vect-slp.c (vect_free_slp_tree): Decrement and honor
1105 (vect_create_new_slp_node): Initialize refcnt to one.
1107 (scalar_stmts_set_t, bst_fail): Remove.
1108 (vect_build_slp_tree_2): Add bst_map argument and adjust calls.
1109 (vect_build_slp_tree): Add bst_map argument and lookup
1110 already created SLP nodes.
1111 (vect_print_slp_tree): Handle a SLP graph, print SLP node
1113 (vect_slp_rearrange_stmts): Handle a SLP graph.
1114 (vect_analyze_slp_instance): Adjust and free SLP nodes from
1115 the CSE map. Fix indenting.
1116 (vect_schedule_slp_instance): Add short-cut.
1118 2018-10-26 Martin Liska <mliska@suse.cz>
1121 * ipa-prop.c (struct ipa_vr_ggc_hash_traits): Hash with
1122 addr_expr and not with pointers.
1124 2018-10-26 Jan Hubicka <jh@suse.cz>
1126 * tree.c (free_lang_data_in_type): Only check main variants.
1127 * ipa-devirt.c (warn_odr): Make static.
1128 (types_same_for_odr): Drop strict variant.
1129 (types_odr_comparable): Likewise.
1130 (odr_or_derived_type_p): Look for main variants.
1131 (odr_name_hasher::equal): Cleanup comment.
1132 (odr_subtypes_equivalent): Add warn and warned arguments; check main
1134 (type_variants_equivalent_p): break out from ...
1135 (odr_types_equivalent): ... here; go for main variants where needed.
1136 (warn_odr): ... here; turn static.
1137 (warn_types_mismatch): Compare mangled names of main variants.
1138 * ipa-utils.h (types_odr_comparable): Drop strict parameter.
1139 (type_with_linkage_p): Sanity check that we look at main variant.
1140 * lto.c (lto_read_decls): Only consider main variant to be ODR type.
1141 * tree.h (types_same_for_odr): Drop strict argument.
1143 2018-10-26 Richard Biener <rguenther@suse.de>
1145 PR tree-optimization/87746
1146 * tree-vect-data-refs.c (vect_update_misalignment_for_peel):
1147 Simplify and fix WRT strided store groups with size not
1148 equal to step in element count.
1149 (vect_analyze_group_access_1): Dump the whole group.
1151 2018-10-25 Carl Love <cel@us.ibm.com>
1153 * config/rs6000/rs6000-c.c (P9V_BUILTIN_VEC_VSCEDPGT,
1154 P9V_BUILTIN_VEC_VSCEDPLT, P9V_BUILTIN_VEC_VSCEDPEQ,
1155 P9V_BUILTIN_VEC_VSCEDPUO): Rename base overloaded name. Add quad
1156 precicion entry for each overloaded builtin.
1157 * config/rs6000/rs6000-builtin.def (VSCEDPGT, VSCEDPLT, VSCEDPEQ,
1158 VSCEDPUO): Rename overloaded name.
1159 (VSCEDPGT, VSCEQPGT, VSCEDPLT, VSCEQPLT, VSCEDPEQ, VSCEQPEQ,
1160 VSCEDPUO, VSCEQPUO): Add defitions for overloaded builtins.
1161 * config/rs6000/vsx.md (xscmpexpqp_<code>_<mode>): Add
1162 define_expand for xscmpexqp instruction.
1163 (*xscmpexpqp): Add define_insn for the xscmpexqp instruction.
1165 2018-10-25 Bill Schmidt <wschmidt@linux.ibm.com>
1166 Jinsong Ji <jji@us.ibm.com>
1168 * config/rs6000/emmintrin.h (_mm_slli_epi16): Replace deprecated
1169 function with vec_sl.
1170 (_mm_slli_epi32): Likewise.
1171 (_mm_slli_epi64): Likewise.
1172 (_mm_srai_epi16): Replace deprecated function with vec_sra.
1173 (_mm_srai_epi32): Likewise.
1174 (_mm_srli_epi16): Replace deprecated function with vec_sr.
1175 (_mm_srli_epi32): Likewise.
1176 (_mm_srli_epi64): Likewise.
1177 (_mm_sll_epi16): Replace deprecated function with vec_sl.
1178 (_mm_sll_epi32): Likewise.
1179 (_mm_sll_epi64): Likewise.
1180 (_mm_sra_epi16): Replace deprecated function with vec_sra.
1181 (_mm_sra_epi32): Likewise.
1182 (_mm_srl_epi16): Replace deprecated function with vec_sr.
1183 (_mm_srl_epi32): Likewise.
1184 (_mm_srl_epi64): Likewise.
1186 2018-10-25 Bill Schmidt <wschmidt@linux.ibm.com>
1187 Jinsong Ji <jji@us.ibm.com>
1189 * gcc/config/rs6000/emmintrin.h (_mm_sll_epi16): Replace
1190 comparison operators with vec_cmp* for compatibility due to
1191 unfortunate history; clean up formatting and use types more
1193 (_mm_sll_epi32): Likewise.
1194 (_mm_sll_epi64): Likewise.
1195 (_mm_srl_epi16): Likewise.
1196 (_mm_srl_epi32): Likewise.
1197 (_mm_srl_epi64): Likewise.
1199 2018-10-25 Bill Schmidt <wschmidt@linux.ibm.com>
1200 Jinsong Ji <jji@us.ibm.com>
1202 * config/rs6000/emmintrin.h (_mm_sll_epi64): Remove wrong cast.
1203 * config/rs6000/xmmintrin.h (_mm_min_ps): Change m's type to
1204 __vector __bool int. Use vec_cmpgt in preference to deprecated
1205 function vec_vcmpgtfp.
1206 (_mm_max_ps): Likewise.
1208 2018-10-25 Jeff Law <law@redhat.com>
1210 * config/rl78/rl78.c (insn_ok_now): Always re-recognize the insn
1213 2018-10-25 Martin Sebor <msebor@redhat.com>
1215 * doc/extend.texi (aligned): Expand attribute description.
1216 (Alignment): Rename section. Discuss function arguments.
1218 2018-10-25 Jan Hubicka <jh@suse.cz>
1220 * ipa-devirt.c (main_odr_variant): Remove.
1221 (hash_odr_name, types_same_for_odr, types_odr_comparable,
1222 odr_name_hasher::equal, odr_subtypes_equivalent_p):
1223 Drop use of main_odr_variant.
1224 (add_type_duplicate): Silence confused warnings on integer types.
1225 (get_odr_type): Always look for main variant.
1226 (register_odr_type): Simplify.
1228 2018-10-25 Richard Biener <rguenther@suse.de>
1230 * tree-vect-data-refs.c (vect_analyze_data_ref_accesses):
1231 Initialize ng to silence error with release checking bootstrap.
1233 2018-10-25 Richard Biener <rguenther@suse.de>
1235 * tree-if-conv.c: Include tree-ssa-sccvn.h.
1236 (tree_if_conversion): Run CSE on the if-converted loop body.
1238 2018-10-25 Ilya Leoshkevich <iii@linux.ibm.com>
1240 * config/s390/constraints.md (ZL): New constraint.
1241 * config/s390/s390.c (legitimate_pic_operand_p): Accept LARL
1243 * config/s390/s390.md (movdi_larl): Remove.
1244 (movdi_64): Add the LARL alternative.
1246 2018-10-25 Ilya Leoshkevich <iii@linux.ibm.com>
1249 * rtl.c (RTX_CODE_HWINT_P_1): New helper macro.
1250 (RTX_CODE_HWINT_P): New macro.
1251 (rtx_code_size): Use RTX_CODE_HWINT_P ().
1253 2018-10-25 Jan Hubicka <jh@suse.cz>
1255 * ipa-devirt.c (odr_types_equivalent_p): Do not ICE if one of types
1258 2018-10-25 Richard Biener <rguenther@suse.de>
1260 PR tree-optimization/87665
1261 PR tree-optimization/87745
1262 * tree-vectorizer.h (get_earlier_stmt): Remove.
1263 (get_later_stmt): Pick up UID from the original non-pattern stmt.
1265 2018-10-25 Sam Tebbs <sam.tebbs@arm.com>
1267 * options.texi (Deprecated): Move list to Var section.
1269 2018-10-24 Bill Schmidt <wschmidt@linux.ibm.com>
1270 Jinsong Ji <jji@us.ibm.com>
1272 * config/rs6000/emmintrin.h (_mm_cvtpd_epi32): Change deprecated
1273 __vector long to __vector long long.
1274 (_mm_cvtpd_ps): Likewise.
1275 (_mm_cvttpd_epi32): Likewise.
1276 (_mm_cvtpi32_pd): Likewise.
1277 (_mm_unpackhi_epi64): Likewise.
1278 (_mm_unpacklo_epi64): Likewise.
1280 2018-10-24 Segher Boessenkool <segher@kernel.crashing.org>
1282 PR rtl-optimization/87720
1283 * combine.c (make_more_copies): Skip if the dest is pc_rtx.
1285 2018-10-24 Alexandre Oliva <aoliva@redhat.com>
1287 * gimple-ssa-isolate-paths.c
1288 (find_implicit_erroneous_behavior): Do not change code if the
1289 pass is running for warnings only.
1290 (find_explicit_erroneous_behavior): Likewise.
1292 2018-10-24 Michael Meissner <meissner@linux.ibm.com>
1294 * config/rs6000/rs6000.c (TARGET_MANGLE_DECL_ASSEMBLER_NAME):
1295 Define as rs6000_mangle_decl_assembler_name.
1296 (rs6000_mangle_decl_assembler_name): If the user switched from IBM
1297 long double to IEEE long double, switch the names of the long
1298 double built-in functions to be <func>f128 instead of <func>l.
1300 2018-10-24 Martin Sebor <msebor@redhat.com>
1302 * doc/extend.texi (nonnull): List no-argument form. Reference
1303 -fno-delete-null-pointer-checks and -fisolate-erroneous-paths-attribute.
1305 2018-10-24 Richard Biener <rguenther@suse.de>
1307 * tree-ssa-sccvn.c (do_rpo_vn): Free rpo_state.
1309 2018-10-24 Martin Liska <mliska@suse.cz>
1311 PR tree-optimization/84436
1312 * tree-switch-conversion.c (switch_conversion::contains_same_values_p):
1314 (switch_conversion::contains_linear_function_p): New.
1315 (switch_conversion::build_one_array): Support linear
1316 transformation on input.
1317 * tree-switch-conversion.h (struct switch_conversion): Add
1318 contains_linear_function_p declaration.
1320 2018-10-24 Richard Biener <rguenther@suse.de>
1322 * varasm.c (const_hash_1): Return hash of ADDR_EXPR
1323 if its argument is CONSTANT_CLASS_P.
1325 2018-10-11 Jan Hubicka <hubicka@ucw.cz>
1327 * ipa-utils.h (type_with_linkage_p): No longer check for TYPE_STUB_DECL;
1328 it is wrong for forward declarations.
1330 2018-10-24 Ilya Leoshkevich <iii@linux.ibm.com>
1332 * config/s390/s390.c (s390_check_qrst_address): Add the missing
1333 SYMBOL_REF_P () check.
1335 2018-10-24 Richard Biener <rguenther@suse.de>
1337 PR tree-optimization/87105
1338 * tree-vect-data-refs.c (vect_analyze_group_access_1): Adjust
1339 dump classification.
1340 (vect_analyze_data_ref_accesses): Handle duplicate loads and
1341 stores by splitting the affected group after the fact.
1342 * tree-vect-slp.c (vect_build_slp_tree_2): Dump when we
1343 fail the SLP build because of size constraints.
1345 2018-10-24 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1347 * configure.ac (gcc_cv_ld_aligned_shf_merge): New test.
1348 * configure: Regenerate.
1349 * config.in: Regenerate.
1350 * varasm.c (mergeable_string_section): Use readonly_data_section
1351 if linker doesn't support SHF_MERGE with alignment > 8.
1352 (mergeable_constant_section): Likewise.
1354 2018-10-24 Richard Biener <rguenther@suse.de>
1356 PR tree-optimization/84013
1357 * tree-ssa-structalias.c (struct msdi_data): New struct for
1358 marshalling data to walk_stmt_load_store_ops.
1359 (maybe_set_dependence_info): Refactor as callback for
1360 walk_stmt_load_store_ops.
1361 (compute_dependence_clique): Set restrict info on all stmt kinds.
1363 2018-10-24 Martin Liska <mliska@suse.cz>
1365 * cgraph.c (cgraph_node::dump):
1366 Remove reduntant dumps and make tp_first_run dump more compact.
1368 2018-10-24 Richard Biener <rguenther@suse.de>
1370 PR tree-optimization/87665
1371 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Adjust
1374 2018-10-12 Jeff Law <law@redhat.com>
1376 * config/h8300/h8300.c (h8300_expand_prologue): Fix stm generation
1379 2018-10-23 Richard Biener <rguenther@suse.de>
1381 * tree-vrp.c (add_assert_info): Guard dump_printf with
1383 * gimple-ssa-evrp-analyze.c
1384 (evrp_range_analyzer::record_ranges_from_incoming_edge):
1385 Use value_range::ignore_equivs_equal_p.
1387 2018-10-23 Richard Biener <rguenther@suse.de>
1389 PR tree-optimization/87105
1390 PR tree-optimization/87608
1391 * passes.def (pass_all_early_optimizations): Add early phi-opt
1393 * tree-ssa-phiopt.c (value_replacement): Ignore NOPs and predicts in
1394 addition to debug stmts.
1395 (tree_ssa_phiopt_worker): Add early_p argument, do only min/max
1396 and abs replacement early.
1397 * tree-cfg.c (gimple_empty_block_p): Likewise.
1399 2018-10-23 Richard Earnshaw <rearnsha@arm.com>
1402 * config.gcc (arm*-*-netbsdelf*): Default to StrongARM if no CPU
1403 specified to configure.
1404 (arm*-*-*): Use ARM7TDMI as the target CPU if no default provided.
1406 2018-10-23 Richard Biener <rguenther@suse.de>
1408 PR tree-optimization/87700
1409 * tree-ssa-copy.c (set_copy_of_val): Fix change detection logic.
1411 2018-10-23 Jakub Jelinek <jakub@redhat.com>
1414 * config/i386/avx512vlintrin.h (_mm_mask_mullo_epi32): Change type of
1415 second argument from __mmask16 to __mmask8.
1416 * config/i386/avx512vlbwintrin.h (_mm_mask_packus_epi32,
1417 _mm_mask_packs_epi32): Likewise.
1418 * config/i386/avx512pfintrin.h (_mm512_mask_prefetch_i64scatter_ps):
1420 (_mm512_mask_prefetch_i64scatter_pd): Likewise. Formatting fix.
1422 2018-10-23 Richard Biener <rguenther@suse.de>
1424 * tree-vect-stmts.c (vect_analyze_stmt): Fix typo in comment.
1426 2018-10-23 Richard Biener <rguenther@suse.de>
1428 PR tree-optimization/86144
1429 * tree-vect-stmts.c (vect_analyze_stmt): Prefer -mveclibabi
1430 over simd attribute.
1432 2018-10-23 Richard Biener <rguenther@suse.de>
1434 PR tree-optimization/87693
1435 * tree-ssa-threadedge.c (thread_around_empty_blocks): Handle
1436 the case we do not find the taken edge.
1438 2018-10-22 Bill Schmidt <wschmidt@linux.ibm.com>
1439 Jinsong Ji <jji@us.ibm.com>
1441 * config/rs6000/emmintrin.h (_MM_SHUFFLE2): Comment cleanup.
1442 (_mm_store_pd): Use unaligned vector type for pointer cast.
1443 (_mm_maskmoveu_si128): Likewise.
1444 * config/rs6000/xmmintrin.h (__m128_u): New typedef.
1445 (_mm_store_ps): Use unaligned vector type for pointer cast.
1447 2018-10-22 Paul Koning <ni1d@arrl.net>
1449 * symtab.c (symtab_node::increase_alignment): Correct max
1452 2018-10-22 Yury Gribov <tetra2005@gmail.com>
1454 PR tree-optimization/87633
1455 * match.pd: Do not generate unordered integer comparisons.
1457 2018-10-22 Segher Boessenkool <segher@kernel.crashing.org>
1459 PR rtl-optimization/87600
1460 * combine.c: Add include of expr.h.
1461 (cant_combine_insn_p): Do not combine moves from any hard non-fixed
1462 register to a pseudo.
1463 (make_more_copies): New function, add a copy to a new pseudo after
1464 the moves from hard registers into pseudos.
1465 (rest_of_handle_combine): Declare rebuild_jump_labels_after_combine
1466 later. Call make_more_copies.
1468 2018-10-22 Andrew Stubbs <ams@codesourcery.com>
1470 * lra-constraints.c (process_alt_operands): New local array,
1471 matching_early_clobber. Check matching_early_clobber before
1472 decrementing reject, and set matching_early_clobber after.
1474 2018-10-22 Segher Boessenkool <segher@kernel.crashing.org>
1477 * config/rs6000/rs6000.c (print_operand_address): For unexpected RTL
1478 call output_addr_const and hope for the best.
1480 2018-10-22 Richard Biener <rguenther@suse.de>
1482 * gimple-ssa-evrp-analyze.c
1483 (evrp_range_analyzer::record_ranges_from_incoming_edge): Be
1484 smarter about what ranges to use.
1485 * tree-vrp.c (add_assert_info): Dump here.
1486 (register_edge_assert_for_2): Instead of here at multiple but
1489 * gcc.dg/tree-ssa/evrp12.c: New testcase.
1490 * gcc.dg/predict-6.c: Adjust.
1491 * gcc.dg/tree-ssa/vrp33.c: Disable EVRP.
1492 * gcc.dg/tree-ssa/vrp02.c: Likewise.
1493 * gcc.dg/tree-ssa/cunroll-9.c: Likewise.
1495 2018-10-22 Steven Bosscher <steven@gcc.gnu.org>
1496 Richard Biener <rguenther@suse.de>
1498 * bitmap.h: Update data structure documentation, including a
1499 description of bitmap views as either linked-lists or splay trees.
1500 (struct bitmap_element_def): Update comments for splay tree bitmaps.
1501 (struct bitmap_head_def): Likewise.
1502 (bitmap_list_view, bitmap_tree_view): New prototypes.
1503 (bitmap_initialize_stat): Initialize a bitmap_head's indx and
1505 (bmp_iter_set_init): Assert the iterated bitmaps are in list form.
1506 (bmp_iter_and_init, bmp_iter_and_compl_init): Likewise.
1507 * bitmap.c (bitmap_elem_to_freelist): Unregister overhead of a
1508 released bitmap element here.
1509 (bitmap_element_free): Remove.
1510 (bitmap_elt_clear_from): Work on splay tree bitmaps.
1511 (bitmap_list_link_element): Renamed from bitmap_element_link. Move
1512 this function similar ones such that linked-list bitmap implementation
1513 functions are grouped.
1514 (bitmap_list_unlink_element): Renamed from bitmap_element_unlink,
1515 and moved for grouping.
1516 (bitmap_list_insert_element_after): Renamed from
1517 bitmap_elt_insert_after, and moved for grouping.
1518 (bitmap_list_find_element): New function spliced from bitmap_find_bit.
1519 (bitmap_tree_link_left, bitmap_tree_link_right,
1520 bitmap_tree_rotate_left, bitmap_tree_rotate_right, bitmap_tree_splay,
1521 bitmap_tree_link_element, bitmap_tree_unlink_element,
1522 bitmap_tree_find_element): New functions for splay-tree bitmap
1524 (bitmap_element_link, bitmap_element_unlink, bitmap_elt_insert_after):
1525 Renamed and moved, see above entries.
1526 (bitmap_tree_listify_from): New function to convert part of a splay
1527 tree bitmap to a linked-list bitmap.
1528 (bitmap_list_view): Convert a splay tree bitmap to linked-list form.
1529 (bitmap_tree_view): Convert a linked-list bitmap to splay tree form.
1530 (bitmap_find_bit): Remove.
1531 (bitmap_clear, bitmap_clear_bit, bitmap_set_bit,
1532 bitmap_single_bit_set_p, bitmap_first_set_bit, bitmap_last_set_bit):
1533 Handle splay tree bitmaps.
1534 (bitmap_copy, bitmap_count_bits, bitmap_and, bitmap_and_into,
1535 bitmap_elt_copy, bitmap_and_compl, bitmap_and_compl_into,
1536 bitmap_compl_and_into, bitmap_elt_ior, bitmap_ior, bitmap_ior_into,
1537 bitmap_xor, bitmap_xor_into, bitmap_equal_p, bitmap_intersect_p,
1538 bitmap_intersect_compl_p, bitmap_ior_and_compl,
1539 bitmap_ior_and_compl_into, bitmap_set_range, bitmap_clear_range,
1540 bitmap_hash): Reject trying to act on splay tree bitmaps. Make
1541 corresponding changes to use linked-list specific bitmap_element
1542 manipulation functions as applicable for efficiency.
1543 (bitmap_tree_to_vec): New function.
1544 (debug_bitmap_elt_file): New function split out from ...
1545 (debug_bitmap_file): ... here. Handle splay tree bitmaps.
1546 (bitmap_print): Likewise.
1548 PR tree-optimization/63155
1549 * tree-ssa-propagate.c (ssa_prop_init): Use tree-view for the
1551 * tree-ssa-coalesce.c (coalesce_ssa_name): Populate used_in_copies
1554 2018-10-22 Martin Liska <mliska@suse.cz>
1556 PR tree-optimization/87686
1558 2018-08-29 Martin Liska <mliska@suse.cz>
1560 * tree-switch-conversion.c (switch_conversion::expand):
1561 Strenghten assumption about gswitch statements.
1563 2018-10-22 Martin Liska <mliska@suse.cz>
1565 * ipa-icf.c (sem_item::compare_attributes): Remove.
1566 (sem_item::compare_referenced_symbol_properties): Use
1567 attribute_list_equal instead.
1568 (sem_function::equals_wpa): Likewise.
1569 * ipa-icf.h: Remove compare_attributes.
1571 2018-10-22 Richard Biener <rguenther@suse.de>
1574 * mem-stats.h (mem_usage::operator==): Fix pasto.
1576 2018-10-22 Richard Biener <rguenther@suse.de>
1578 PR tree-optimization/87640
1579 * tree-vrp.c (set_value_range_with_overflow): Decompose
1581 (extract_range_from_binary_expr_1): Adjust.
1583 2018-10-22 Martin Jambor <mjambor@suse.cz>
1585 * tree-eh.h (stmt_could_throw_p): Add function parameter.
1586 (stmt_can_throw_external): Likewise.
1587 (stmt_can_throw_internal): Likewise.
1588 * tree-eh.c (lower_eh_constructs_2): Pass cfun to stmt_could_throw_p.
1589 (lower_eh_constructs_2): Likewise.
1590 (stmt_could_throw_p): Add fun parameter, use it instead of cfun.
1591 (stmt_can_throw_external): Likewise.
1592 (stmt_can_throw_internal): Likewise.
1593 (maybe_clean_eh_stmt_fn): Pass cfun to stmt_could_throw_p.
1594 (maybe_clean_or_replace_eh_stmt): Pass cfun to stmt_could_throw_p.
1595 (maybe_duplicate_eh_stmt_fn): Pass new_fun to stmt_could_throw_p.
1596 (maybe_duplicate_eh_stmt): Pass cfun to stmt_could_throw_p.
1597 (pass_lower_eh_dispatch::execute): Pass cfun to
1598 stmt_can_throw_external.
1599 (cleanup_empty_eh): Likewise.
1600 (verify_eh_edges): Pass cfun to stmt_could_throw_p.
1601 * cgraph.c (cgraph_edge::set_call_stmt): Pass a function to
1602 stmt_can_throw_external instead of pushing it to cfun.
1603 (symbol_table::create_edge): Likewise.
1604 * gimple-fold.c (fold_builtin_atomic_compare_exchange): Pass cfun to
1605 stmt_can_throw_internal.
1606 * gimple-ssa-evrp.c (evrp_dom_walker::before_dom_children): Pass cfun
1607 to stmt_could_throw_p.
1608 * gimple-ssa-store-merging.c (handled_load): Pass cfun to
1609 stmt_can_throw_internal.
1610 (pass_store_merging::execute): Likewise.
1611 * gimple-ssa-strength-reduction.c
1612 (find_candidates_dom_walker::before_dom_children): Pass cfun to
1614 * gimplify-me.c (gimple_regimplify_operands): Pass cfun to
1615 stmt_can_throw_internal.
1616 * ipa-pure-const.c (check_call): Pass cfun to stmt_could_throw_p and
1617 to stmt_can_throw_external.
1618 (check_stmt): Pass cfun to stmt_could_throw_p.
1619 (check_stmt): Pass cfun to stmt_can_throw_external.
1620 (pass_nothrow::execute): Likewise.
1621 * trans-mem.c (expand_call_tm): Pass cfun to stmt_can_throw_internal.
1622 * tree-cfg.c (is_ctrl_altering_stmt): Pass cfun to
1623 stmt_can_throw_internal.
1624 (verify_gimple_in_cfg): Pass cfun to stmt_could_throw_p.
1625 (stmt_can_terminate_bb_p): Pass cfun to stmt_can_throw_external.
1626 (gimple_purge_dead_eh_edges): Pass cfun to stmt_can_throw_internal.
1627 * tree-complex.c (expand_complex_libcall): Pass cfun to
1628 stmt_could_throw_p and to stmt_can_throw_internal.
1629 (expand_complex_multiplication): Pass cfun to stmt_can_throw_internal.
1630 * tree-inline.c (copy_edges_for_bb): Likewise.
1631 (maybe_move_debug_stmts_to_successors): Likewise.
1632 * tree-outof-ssa.c (ssa_is_replaceable_p): Pass cfun to
1634 * tree-parloops.c (oacc_entry_exit_ok_1): Likewise.
1635 * tree-sra.c (scan_function): Pass cfun to stmt_can_throw_external.
1636 * tree-ssa-alias.c (stmt_kills_ref_p): Pass cfun to
1637 stmt_can_throw_internal.
1638 * tree-ssa-ccp.c (optimize_atomic_bit_test_and): Likewise.
1639 * tree-ssa-dce.c (mark_stmt_if_obviously_necessary): Pass cfun to
1641 (mark_aliased_reaching_defs_necessary_1): Pass cfun to
1642 stmt_can_throw_internal.
1643 * tree-ssa-forwprop.c (pass_forwprop::execute): Likewise.
1644 * tree-ssa-loop-im.c (movement_possibility): Pass cfun to
1646 * tree-ssa-loop-ivopts.c (find_givs_in_stmt_scev): Likewise.
1647 (add_autoinc_candidates): Pass cfun to stmt_can_throw_internal.
1648 * tree-ssa-math-opts.c (pass_cse_reciprocals::execute): Likewise.
1649 (convert_mult_to_fma_1): Likewise.
1650 (convert_to_divmod): Likewise.
1651 * tree-ssa-phiprop.c (propagate_with_phi): Likewise.
1652 * tree-ssa-pre.c (compute_avail): Pass cfun to stmt_could_throw_p.
1653 * tree-ssa-propagate.c
1654 (substitute_and_fold_dom_walker::before_dom_children): Likewise.
1655 * tree-ssa-reassoc.c (suitable_cond_bb): Likewise.
1656 (maybe_optimize_range_tests): Likewise.
1657 (linearize_expr_tree): Likewise.
1658 (reassociate_bb): Likewise.
1659 * tree-ssa-sccvn.c (copy_reference_ops_from_call): Likewise.
1660 * tree-ssa-scopedtables.c (hashable_expr_equal_p): Likewise.
1661 * tree-ssa-strlen.c (adjust_last_stmt): Likewise.
1662 (handle_char_store): Likewise.
1663 * tree-vect-data-refs.c (vect_find_stmt_data_reference): Pass cfun to
1664 stmt_can_throw_internal.
1665 * tree-vect-patterns.c (check_bool_pattern): Pass cfun to
1667 * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
1668 (vectorizable_call): Pass cfun to stmt_can_throw_internal.
1669 (vectorizable_simd_clone_call): Likewise.
1670 * value-prof.c (gimple_ic): Pass cfun to stmt_could_throw_p.
1671 (gimple_stringop_fixed_value): Likewise.
1673 2018-10-22 Ilya Leoshkevich <iii@linux.ibm.com>
1675 * config/s390/s390.c (s390_loadrelative_operand_p): Accept
1676 literal pool references.
1677 (s390_check_qrst_address): Adapt to the new behavior of
1678 s390_loadrelative_operand_p ().
1680 2018-10-22 H.J. Lu <hongjiu.lu@intel.com>
1683 * config/i386/sse.md (*andnot<mode>3_bcst): New.
1685 2018-10-22 H.J. Lu <hongjiu.lu@intel.com>
1688 * config/i386/sse.md (*<code><mode>3_bcst): New.
1690 2018-10-22 H.J. Lu <hongjiu.lu@intel.com>
1693 * config/i386/sse.md (avx512bcst): Updated for V4SI, V2DI, V8SI,
1694 V4DI, V16SI and V8DI.
1695 (*sub<mode>3<mask_name>_bcst): New.
1696 (*add<mode>3<mask_name>_bcst): Likewise.
1698 2018-10-21 Bill Schmidt <wschmidt@linux.ibm.com>
1699 Jinsong Ji <jji@us.ibm.com>
1701 * config/rs6000/emmintrin.h (_mm_movemask_pd): Replace __vector
1702 __m64 with __vector unsigned long long for compatibility.
1703 (_mm_movemask_epi8): Likewise.
1704 * config/rs6000/xmmintrin.h (_mm_cvtps_pi32): Likewise.
1705 (_mm_cvttps_pi32): Likewise.
1706 (_mm_cvtpi32_ps): Likewise.
1707 (_mm_cvtps_pi16): Likewise.
1708 (_mm_loadh_pi): Likewise.
1709 (_mm_storeh_pi): Likewise.
1710 (_mm_movehl_ps): Likewise.
1711 (_mm_movelh_ps): Likewise.
1712 (_mm_loadl_pi): Likewise.
1713 (_mm_storel_pi): Likewise.
1714 (_mm_movemask_ps): Likewise.
1715 (_mm_shuffle_pi16): Likewise.
1717 2018-10-21 H.J. Lu <hongjiu.lu@intel.com>
1720 * config/i386/avx512fintrin.h (_mm512_fnmsub_round_pd): Use
1721 __builtin_ia32_vfnmsubpd512_mask.
1722 (_mm512_mask_fnmsub_round_pd): Likewise.
1723 (_mm512_fnmsub_pd): Likewise.
1724 (_mm512_mask_fnmsub_pd): Likewise.
1725 (_mm512_maskz_fnmsub_round_pd): Use
1726 __builtin_ia32_vfnmsubpd512_maskz.
1727 (_mm512_maskz_fnmsub_pd): Likewise.
1728 (_mm512_fnmsub_round_ps): Use __builtin_ia32_vfnmsubps512_mask.
1729 (_mm512_mask_fnmsub_round_ps): Likewise.
1730 (_mm512_fnmsub_ps): Likewise.
1731 (_mm512_mask_fnmsub_ps): Likewise.
1732 (_mm512_maskz_fnmsub_round_ps): Use
1733 __builtin_ia32_vfnmsubps512_maskz.
1734 (_mm512_maskz_fnmsub_ps): Likewise.
1735 * config/i386/avx512vlintrin.h (_mm256_mask_fnmsub_pd): Use
1736 __builtin_ia32_vfnmsubpd256_mask.
1737 (_mm256_maskz_fnmsub_pd): Use __builtin_ia32_vfnmsubpd256_maskz.
1738 (_mm_mask_fnmsub_pd): Use __builtin_ia32_vfmaddpd128_mask
1739 (_mm_maskz_fnmsub_pd): Use __builtin_ia32_vfnmsubpd128_maskz.
1740 (_mm256_mask_fnmsub_ps): Use __builtin_ia32_vfnmsubps256_mask.
1741 (_mm256_mask_fnmsub_ps): Use __builtin_ia32_vfnmsubps256_mask.
1742 (_mm256_maskz_fnmsub_ps): Use __builtin_ia32_vfnmsubps256_maskz.
1743 (_mm_mask_fnmsub_ps): Use __builtin_ia32_vfnmsubps128_mask.
1744 (_mm_maskz_fnmsub_ps): Use __builtin_ia32_vfnmsubps128_maskz.
1745 * config/i386/fmaintrin.h (_mm_fnmsub_pd): Use
1746 __builtin_ia32_vfnmsubpd.
1747 (_mm256_fnmsub_pd): Use __builtin_ia32_vfnmsubpd256.
1748 (_mm_fnmsub_ps): Use __builtin_ia32_vfnmsubps.
1749 (_mm256_fnmsub_ps): Use __builtin_ia32_vfnmsubps256.
1750 (_mm_fnmsub_sd): Use __builtin_ia32_vfnmsubsd3.
1751 (_mm_fnmsub_ss): Use __builtin_ia32_vfnmsubss3.
1752 * config/i386/i386-builtin.def: Add
1753 __builtin_ia32_vfnmsubpd256_mask,
1754 __builtin_ia32_vfnmsubpd256_maskz,
1755 __builtin_ia32_vfnmsubpd128_mask,
1756 __builtin_ia32_vfnmsubpd128_maskz,
1757 __builtin_ia32_vfnmsubps256_mask,
1758 __builtin_ia32_vfnmsubps256_maskz,
1759 __builtin_ia32_vfnmsubps128_mask,
1760 __builtin_ia32_vfnmsubps128_maskz,
1761 __builtin_ia32_vfnmsubpd512_mask,
1762 __builtin_ia32_vfnmsubpd512_maskz,
1763 __builtin_ia32_vfnmsubps512_mask,
1764 __builtin_ia32_vfnmsubps512_maskz, __builtin_ia32_vfnmsubss3,
1765 __builtin_ia32_vfnmsubsd3, __builtin_ia32_vfnmsubps,
1766 __builtin_ia32_vfnmsubpd, __builtin_ia32_vfnmsubps256 and.
1767 __builtin_ia32_vfnmsubpd256.
1768 * config/i386/sse.md (fma4i_fnmsub_<mode>): New.
1769 (<avx512>_fnmsub_<mode>_maskz<round_expand_name>): Likewise.
1770 (*<sd_mask_codefor>fma_fnmsub_<mode><sd_maskz_name>_bcst_1):
1772 (*<sd_mask_codefor>fma_fnmsub_<mode><sd_maskz_name>_bcst_2):
1774 (*<sd_mask_codefor>fma_fnmsub_<mode><sd_maskz_name>_bcst_3):
1776 (fmai_vmfnmsub_<mode><round_name>): Likewise.
1778 2018-10-21 H.J. Lu <hongjiu.lu@intel.com>
1781 * config/i386/avx512fintrin.h (_mm512_fnmadd_round_pd): Use
1782 __builtin_ia32_vfnmaddpd512_mask.
1783 (_mm512_mask_fnmadd_round_pd): Likewise.
1784 (_mm512_fnmadd_pd): Likewise.
1785 (_mm512_mask_fnmadd_pd): Likewise.
1786 (_mm512_maskz_fnmadd_round_pd): Use
1787 __builtin_ia32_vfnmaddpd512_maskz.
1788 (_mm512_maskz_fnmadd_pd): Likewise.
1789 (_mm512_fnmadd_round_ps): Use __builtin_ia32_vfnmaddps512_mask.
1790 (_mm512_mask_fnmadd_round_ps): Likewise.
1791 (_mm512_fnmadd_ps): Likewise.
1792 (_mm512_mask_fnmadd_ps): Likewise.
1793 (_mm512_maskz_fnmadd_round_ps): Use
1794 __builtin_ia32_vfnmaddps512_maskz.
1795 (_mm512_maskz_fnmadd_ps): Likewise.
1796 * config/i386/avx512vlintrin.h (_mm256_mask_fnmadd_pd): Use
1797 __builtin_ia32_vfnmaddpd256_mask.
1798 (_mm256_maskz_fnmadd_pd): Use __builtin_ia32_vfnmaddpd256_maskz.
1799 (_mm_mask_fnmadd_pd): Use __builtin_ia32_vfmaddpd128_mask
1800 (_mm_maskz_fnmadd_pd): Use __builtin_ia32_vfnmaddpd128_maskz.
1801 (_mm256_mask_fnmadd_ps): Use __builtin_ia32_vfnmaddps256_mask.
1802 (_mm256_mask_fnmadd_ps): Use __builtin_ia32_vfnmaddps256_mask.
1803 (_mm256_maskz_fnmadd_ps): Use __builtin_ia32_vfnmaddps256_maskz.
1804 (_mm_mask_fnmadd_ps): Use __builtin_ia32_vfnmaddps128_mask.
1805 (_mm_maskz_fnmadd_ps): Use __builtin_ia32_vfnmaddps128_maskz.
1806 * config/i386/fmaintrin.h (_mm_fnmadd_pd): Use
1807 __builtin_ia32_vfnmaddpd.
1808 (_mm256_fnmadd_pd): Use __builtin_ia32_vfnmaddpd256.
1809 (_mm_fnmadd_ps): Use __builtin_ia32_vfnmaddps.
1810 (_mm256_fnmadd_ps): Use __builtin_ia32_vfnmaddps256.
1811 (_mm_fnmadd_sd): Use __builtin_ia32_vfnmaddsd3.
1812 (_mm_fnmadd_ss): Use __builtin_ia32_vfnmaddss3.
1813 * config/i386/i386-builtin.def: Add
1814 __builtin_ia32_vfnmaddpd256_mask,
1815 __builtin_ia32_vfnmaddpd256_maskz,
1816 __builtin_ia32_vfnmaddpd128_mask,
1817 __builtin_ia32_vfnmaddpd128_maskz,
1818 __builtin_ia32_vfnmaddps256_mask,
1819 __builtin_ia32_vfnmaddps256_maskz,
1820 __builtin_ia32_vfnmaddps128_mask,
1821 __builtin_ia32_vfnmaddps128_maskz,
1822 __builtin_ia32_vfnmaddpd512_mask,
1823 __builtin_ia32_vfnmaddpd512_maskz,
1824 __builtin_ia32_vfnmaddps512_mask,
1825 __builtin_ia32_vfnmaddps512_maskz, __builtin_ia32_vfnmaddss3,
1826 __builtin_ia32_vfnmaddsd3, __builtin_ia32_vfnmaddps,
1827 __builtin_ia32_vfnmaddpd, __builtin_ia32_vfnmaddps256 and.
1828 __builtin_ia32_vfnmaddpd256.
1829 * config/i386/sse.md (fma4i_fnmadd_<mode>): New.
1830 (<avx512>_fnmadd_<mode>_maskz<round_expand_name>): Likewise.
1831 (*<sd_mask_codefor>fma_fnmadd_<mode><sd_maskz_name>_bcst_1):
1833 (*<sd_mask_codefor>fma_fnmadd_<mode><sd_maskz_name>_bcst_2):
1835 (*<sd_mask_codefor>fma_fnmadd_<mode><sd_maskz_name>_bcst_3):
1837 (fmai_vmfnmadd_<mode><round_name>): Likewise.
1839 2018-10-21 H.J. Lu <hongjiu.lu@intel.com>
1842 * config/i386/avx512fintrin.h (_mm512_fmsub_round_pd): Use
1843 __builtin_ia32_vfmsubpd512_mask.
1844 (_mm512_mask_fmsub_round_pd): Likewise.
1845 (_mm512_fmsub_pd): Likewise.
1846 (_mm512_mask_fmsub_pd): Likewise.
1847 (_mm512_maskz_fmsub_round_pd): Use
1848 __builtin_ia32_vfmsubpd512_maskz.
1849 (_mm512_maskz_fmsub_pd): Likewise.
1850 (_mm512_fmsub_round_ps): Use __builtin_ia32_vfmsubps512_mask.
1851 (_mm512_mask_fmsub_round_ps): Likewise.
1852 (_mm512_fmsub_ps): Likewise.
1853 (_mm512_mask_fmsub_ps): Likewise.
1854 (_mm512_maskz_fmsub_round_ps): Use
1855 __builtin_ia32_vfmsubps512_maskz.
1856 (_mm512_maskz_fmsub_ps): Likewise.
1857 * config/i386/avx512vlintrin.h (_mm256_mask_fmsub_pd): Use
1858 __builtin_ia32_vfmsubpd256_mask.
1859 (_mm256_maskz_fmsub_pd): Use __builtin_ia32_vfmsubpd256_maskz.
1860 (_mm_mask_fmsub_pd): Use __builtin_ia32_vfmaddpd128_mask
1861 (_mm_maskz_fmsub_pd): Use __builtin_ia32_vfmsubpd128_maskz.
1862 (_mm256_mask_fmsub_ps): Use __builtin_ia32_vfmsubps256_mask.
1863 (_mm256_mask_fmsub_ps): Use __builtin_ia32_vfmsubps256_mask.
1864 (_mm256_maskz_fmsub_ps): Use __builtin_ia32_vfmsubps256_maskz.
1865 (_mm_mask_fmsub_ps): Use __builtin_ia32_vfmsubps128_mask.
1866 (_mm_maskz_fmsub_ps): Use __builtin_ia32_vfmsubps128_maskz.
1867 * config/i386/fmaintrin.h (_mm_fmsub_pd): Use
1868 __builtin_ia32_vfmsubpd.
1869 (_mm256_fmsub_pd): Use __builtin_ia32_vfmsubpd256.
1870 (_mm_fmsub_ps): Use __builtin_ia32_vfmsubps.
1871 (_mm256_fmsub_ps): Use __builtin_ia32_vfmsubps256.
1872 (_mm_fmsub_sd): Use __builtin_ia32_vfmsubsd3.
1873 (_mm_fmsub_ss): Use __builtin_ia32_vfmsubss3.
1874 * config/i386/i386-builtin.def: Add
1875 __builtin_ia32_vfmsubpd256_mask,
1876 __builtin_ia32_vfmsubpd256_maskz,
1877 __builtin_ia32_vfmsubpd128_mask,
1878 __builtin_ia32_vfmsubpd128_maskz,
1879 __builtin_ia32_vfmsubps256_mask,
1880 __builtin_ia32_vfmsubps256_maskz,
1881 __builtin_ia32_vfmsubps128_mask,
1882 __builtin_ia32_vfmsubps128_maskz,
1883 __builtin_ia32_vfmsubpd512_mask,
1884 __builtin_ia32_vfmsubpd512_maskz,
1885 __builtin_ia32_vfmsubps512_mask,
1886 __builtin_ia32_vfmsubps512_maskz, __builtin_ia32_vfmsubss3,
1887 __builtin_ia32_vfmsubsd3, __builtin_ia32_vfmsubps,
1888 __builtin_ia32_vfmsubpd, __builtin_ia32_vfmsubps256 and.
1889 __builtin_ia32_vfmsubpd256.
1890 * config/i386/sse.md (fma4i_fmsub_<mode>): New.
1891 (<avx512>_fmsub_<mode>_maskz<round_expand_name>): Likewise.
1892 (*<sd_mask_codefor>fma_fmsub_<mode><sd_maskz_name>_bcst_1):
1894 (*<sd_mask_codefor>fma_fmsub_<mode><sd_maskz_name>_bcst_2):
1896 (*<sd_mask_codefor>fma_fmsub_<mode><sd_maskz_name>_bcst_3):
1898 (fmai_vmfmsub_<mode><round_name>): Likewise.
1900 2018-10-21 H.J. Lu <hongjiu.lu@intel.com>
1902 * config/i386/sse.md (*<plusminus_insn><mode>3<mask_name>_bcst_1):
1903 Remove plus. Renamed to ...
1904 (*sub<mode>3<mask_name>_bcst): This.
1905 (*add<mode>3<mask_name>_bcst_2): Renamede to ...
1906 (*add<mode>3<mask_name>_bcst): This.
1908 2018-10-21 H.J. Lu <hongjiu.lu@intel.com>
1911 * config/i386/sse.md (*mul<mode>3<mask_name>_bcst): New.
1913 2018-10-21 H.J. Lu <hongjiu.lu@intel.com>
1916 * i386/avx512vlintrin.h (_mm256_or_epi32): New.
1917 (_mm_or_epi32): Likewise.
1918 (_mm256_xor_epi32): Likewise.
1919 (_mm_xor_epi32): Likewise.
1920 (_mm256_or_epi64): Likewise.
1921 (_mm_or_epi64): Likewise.
1922 (_mm256_xor_epi64): Likewise.
1923 (_mm_xor_epi64): Likewise.
1925 2018-10-20 H.J. Lu <hongjiu.lu@intel.com>
1928 * config/i386/sse.md (*<avx512>_div<mode>3<mask_name>_bcst): New.
1930 2018-10-20 Jakub Jelinek <jakub@redhat.com>
1933 * varasm.c (decode_addr_const): Handle COMPOUND_LITERAL_EXPR.
1935 2018-10-20 Andreas Schwab <schwab@linux-m68k.org>
1937 * doc/ux.texi: Move @section directly after @node.
1939 2018-10-19 Jakub Jelinek <jakub@redhat.com>
1943 * omp-low.c (check_omp_nesting_restrictions): Diagnose ordered without
1944 depend closely nested inside of loop with ordered clause with
1947 2018-10-19 David Malcolm <dmalcolm@redhat.com>
1949 * Makefile.in (TEXI_GCCINT_FILES): Add ux.texi.
1950 * doc/gccint.texi: Include ux.texi and use it in top-level menu.
1951 * doc/ux.texi: New file.
1953 2018-10-19 Segher Boessenkool <segher@kernel.crashing.org>
1955 * config/rs6000/rs6000.h (REG_ALLOC_ORDER): Move 68 (that is, CR0) to
1956 be the first CR field allocated.
1958 2018-10-19 Richard Biener <rguenther@suse.de>
1961 * config/i386/i386.c (ix86_builtin_vectorization_cost): Use
1962 TYPE_VECTOR_SUBPARTS and avoid relying on vector mode.
1964 2018-10-19 H.J. Lu <hongjiu.lu@intel.com>
1967 * config/i386/sse.md
1968 (*<plusminus_insn><mode>3<mask_name>_bcst_1): New.
1969 (*add<mode>3<mask_name>_bcst_2): Likewise.
1971 2018-10-19 H.J. Lu <hongjiu.lu@intel.com>
1973 * config/i386/sse.md
1974 (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_1):
1975 Replace nonimmediate_operand with register_operand.
1976 (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_2):
1978 (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_3):
1981 2018-10-19 Ilya Leoshkevich <iii@linux.ibm.com>
1983 PR rtl-optimization/87596
1984 * lra-constraints.c (spill_hard_reg_in_range): Use INSN_P () +
1985 lra_get_insn_recog_data () instead of lra_insn_recog_data[]
1986 for instructions in FROM..TO range.
1988 2018-10-19 Eric Botcazou <ebotcazou@adacore.com>
1990 * cfgexpand.c (expand_one_var): Use specific wording in error message
1991 for non-local frame variables.
1992 * stor-layout.c (layout_decl): Do not issue a warning for them.
1994 2018-10-19 Robin Dapp <rdapp@linux.ibm.com>
1996 * haifa-sched.c (priority): Add force_recompute parameter.
1997 (apply_replacement): Call priority () with force_recompute = true.
1998 (restore_pattern): Likewise.
2000 2018-10-18 H.J. Lu <hongjiu.lu@intel.com>
2002 * simplify-rtx.c (simplify_subreg): Limit mask of vec_merge to
2003 HOST_BITS_PER_WIDE_INT.
2004 (test_vector_ops_duplicate): Likewise.
2006 2018-10-18 H.J. Lu <hongjiu.lu@intel.com>
2009 * config/i386/sse.md (VF_AVX512): New.
2010 (avx512bcst): Likewise.
2011 (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_1):
2013 (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_2):
2015 (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_3):
2018 2018-10-18 Jonathan Wakely <jwakely@redhat.com>
2020 * doc/invoke.texi (-dumpversion): Improve grammar.
2021 (-dumpfullversion): Make more consistent with -dumpversion.
2023 2018-10-18 Uros Bizjak <ubizjak@gmail.com>
2025 * config/i386/i386.c (ix86_emit_fp_unordered_jump):
2026 Set JUMP_LABEL to the jump insn.
2027 (ix86_emit_i387_log1p): Use ix86_expand_branch to expand branch.
2028 Predict emitted jump and add label to jump insn.
2030 2018-10-18 David Malcolm <dmalcolm@redhat.com>
2032 PR tree-optimization/87562
2033 * input.c (get_substring_ranges_for_loc): Use
2034 LRK_SPELLING_LOCATION rather than LRK_MACRO_EXPANSION_POINT when
2035 getting the linemap for the endpoint. Verify that it's either
2036 in the same linemap as the start point's spelling location, or
2037 at least in the same file.
2039 2018-10-18 Richard Biener <rguenther@suse.de>
2041 * config/i386/i386.c (ix86_builtin_vectorization_cost): Do not
2042 feed width-specific load/store costs through ix86_vec_cost.
2043 * config/i386/x86-tune-costs.h (athlon_cost): Adjust.
2044 (k8_cost): Likewise.
2045 (bdver_cost): Likewise.
2046 (znver1_cost): Likewise.
2047 (btver1_cost): Likewise.
2048 (btver2_cost): Likewise.
2050 2018-10-18 H.J. Lu <hongjiu.lu@intel.com>
2052 * simplify-rtx.c (simplify_subreg): Call simplify_gen_subreg
2053 to simplify subreg of vec_merge.
2055 2018-10-18 Richard Biener <rguenther@suse.de>
2057 * config/i386/i386.c: Fix costing of vector FMA.
2059 2018-10-18 Richard Biener <rguenther@suse.de>
2061 * config/i386/i386.c (ix86_vec_cost): Remove !parallel path
2063 (ix86_builtin_vectorization_cost): For vec_construct properly
2064 cost insertion into SSE regs.
2065 (...): Adjust calls to ix86_vec_cost.
2067 2018-10-18 Richard Biener <rguenther@suse.de>
2071 2018-02-07 Richard Biener <rguenther@suse.de>
2073 PR tree-optimization/84204
2074 * tree-chrec.c (chrec_fold_plus_1): Remove size limiting in
2077 2018-10-18 H.J. Lu <hongjiu.lu@intel.com>
2080 * simplify-rtx.c (simplify_subreg): Simplify subreg of vec_merge
2082 (test_vector_ops_duplicate): Add test for a scalar subreg of a
2083 VEC_MERGE of a VEC_DUPLICATE.
2085 2018-10-17 Joseph Myers <joseph@codesourcery.com>
2087 * doc/cpp.texi (__STDC_VERSION__): Document C2X handling.
2088 * doc/invoke.texi (-std=c2x, -std=gnu2x): Document new options.
2089 * doc/standards.texi (C Language): Document C2X.
2090 * dwarf2out.c (highest_c_language), config/rl78/rl78.c
2091 (rl78_option_override): Handle "GNU C2X" language name.
2093 2018-10-17 Joseph Myers <joseph@codesourcery.com>
2095 * doc/invoke.texi (-std=c17), doc/standards.texi (C Language):
2096 Document C17 as published in 2018.
2098 2018-10-17 Eric Botcazou <ebotcazou@adacore.com>
2101 * fold-const.c (fold_truth_andor_1): If the right side is not constant,
2102 bail out if both sides do not have the same storage order.
2104 2018-10-17 Aldy Hernandez <aldyh@redhat.com>
2106 * bitmap.c (bitmap_head::dump): New.
2107 * bitmap.h (bitmap_head): Add dump().
2108 * gimple-ssa-evrp-analyze.c
2109 (evrp_range_analyzer::try_find_new_range): Adjust for value_range API.
2110 (evrp_range_analyzer::set_ssa_range_info): Same.
2111 (evrp_range_analyzer::record_ranges_from_phis): Same.
2112 (evrp_range_analyzer::record_ranges_from_stmt): Same.
2113 * gimple-ssa-evrp.c (evrp_dom_walker::before_dom_children): Same.
2114 * gimple-ssa-sprintf.c (get_int_range): Same.
2115 (format_integer): Same.
2116 (sprintf_dom_walker::handle_gimple_call): Same.
2117 * ipa-cp.c (ipcp_vr_lattice::meet_with_1): Same.
2118 (ipcp_vr_lattice::top_p): Same.
2119 (ipcp_vr_lattice::bottom_p): Same.
2120 (ipcp_vr_lattice::set_to_bottom): Same.
2121 (ipa_vr_operation_and_type_effects): Same.
2122 (propagate_vr_across_jump_function): Same.
2123 (ipcp_store_vr_results): Same.
2124 * ipa-prop.c (struct ipa_vr_ggc_hash_traits): Same.
2125 (ipa_print_node_jump_functions_for_edge): Same.
2126 (ipa_get_value_range): Same.
2127 (ipa_compute_jump_functions_for_edge): Same.
2128 (ipa_write_jump_function): Same.
2129 * tree-ssa-dom.c (simplify_stmt_for_jump_threading): Same.
2130 * tree-ssa-threadedge.c (record_temporary_equivalences_from_phis):
2132 * vr-values.c (set_value_range_to_nonnegative): Same.
2133 (set_value_range_to_truthvalue): Same.
2134 (vr_values::get_value_range): Same.
2135 (vr_values::set_defs_to_varying): Same.
2136 (vr_values::update_value_range): Same.
2137 (symbolic_range_based_on_p): Same.
2138 (vr_values::op_with_boolean_value_range_p): Same.
2139 (vr_values::extract_range_for_var_from_comparison_expr): Same.
2140 (vr_values::extract_range_from_ssa_name): Same.
2141 (vr_values::extract_range_from_binary_expr): Same.
2142 (vr_values::extract_range_from_unary_expr): Same.
2143 (vr_values::extract_range_from_cond_expr): Same.
2144 (vr_values::extract_range_from_comparison): Same.
2145 (vr_values::check_for_binary_op_overflow): Same.
2146 (vr_values::extract_range_basic): Same.
2147 (vr_values::extract_range_from_assignment): Same.
2148 (compare_ranges): Same.
2149 (compare_range_with_value): Same.
2150 (vr_values::adjust_range_with_scev): Same.
2151 (vrp_valueize): Same.
2152 (vrp_valueize_1): Same.
2153 (vr_values::get_vr_for_comparison): Same.
2154 (vr_values::compare_name_with_value): Same.
2155 (vr_values::compare_names): Same.
2156 (vr_values::vrp_evaluate_conditional): Same.
2157 (find_case_label_ranges): Same.
2158 (vr_values::vrp_visit_switch_stmt): Same.
2159 (vr_values::extract_range_from_phi_node): Same.
2160 (vr_values::simplify_div_or_mod_using_ranges): Same.
2161 (vr_values::simplify_bit_ops_using_ranges): Same.
2162 (test_for_singularity): Same.
2163 (range_fits_type_p): Same.
2164 (vr_values::simplify_cond_using_ranges_1): Same.
2165 (vr_values::simplify_switch_using_ranges): Same.
2166 (vr_values::simplify_float_conversion_using_ranges): Same.
2167 (vr_values::two_valued_val_range_p): Same.
2168 (vr_values::add_equivalence): Move to value_range::equiv_add.
2169 * vr-values.h (vr_values::add_equivalence): Remove.
2170 (VR_INITIALIZER): Remove.
2171 * tree-vrp.c (value_range::set): New.
2172 (value_range::equiv_add): New.
2173 (value_range::value_range): New.
2174 (value_range::deep_copy): New.
2175 (value_range::check): New.
2176 (value_range::equal_p): New.
2177 (value_range::ignore_equivs_equal_p): New.
2178 (value_range::operator==): New.
2179 (value_range::operator!=): New.
2180 (value_range::symbolic_p): New.
2181 (value_range::numeric_p): New.
2182 (value_range::set_undefined): New.
2183 (value_range::set_varying): New.
2184 (value_range::may_contain_p): New.
2185 (value_range::equiv_clear): New.
2186 (value_range::singleton_p): New.
2187 (value_range::intersect): New.
2188 (value_range::dump): New.
2189 (value_range::set_and_canonicalize): New.
2190 (set_value_range): Adjust for value_range API.
2191 (set_value_range_to_undefined): Same.
2192 (set_value_range_to_varying): Same.
2193 (set_and_canonicalize_value_range): Same.
2194 (set_value_range_to_nonnull): Same.
2195 (set_value_range_to_null): Same.
2196 (range_is_null): Same.
2197 (range_is_nonnull): Same.
2198 (range_int_cst_p): Same.
2199 (range_int_cst_singleton_p): Same.
2200 (symbolic_range_p): Same.
2201 (range_includes_zero_p): Same.
2202 (value_range_constant_singleton): Same.
2203 (vrp_set_zero_nonzero_bits): Same.
2204 (ranges_from_anti_range): Same.
2205 (extract_range_into_wide_ints): Same.
2206 (extract_range_from_multiplicative_op): Same.
2207 (set_value_range_with_overflow): Same.
2208 (extract_range_from_binary_expr_1): Same.
2209 (extract_range_from_unary_expr): Same.
2210 (dump_value_range): Same.
2211 (debug_value_range): Same.
2212 (vrp_prop::check_array_ref): Same.
2213 (vrp_prop::check_mem_ref): Same.
2214 (vrp_prop::vrp_initialize): Same.
2215 (vrp_prop::visit_stmt): Same.
2216 (intersect_ranges): Same.
2217 (vrp_prop::visit_phi): Same.
2218 (vrp_prop::vrp_finalize): Same.
2219 (determine_value_range_1): Same.
2220 (determine_value_range): Same.
2221 (vrp_intersect_ranges_1): Rename to...
2222 (vrp_intersect_1): this.
2223 (vrp_intersect_ranges): Rename to...
2224 (value_range::intersect_helper): ...this.
2225 (vrp_meet_1): Rename to...
2226 (value_range::union_helper): ...this.
2227 (vrp_meet): Rename to...
2228 (value_range::union_): ...this.
2229 (copy_value_range): Remove.
2230 * tree-vrp.h (struct value_range): Rewrite into a proper class.
2231 (value_range::vrtype): New.
2232 (value_range::type): New.
2233 (value_range::equiv): New.
2234 (value_range::min): New.
2235 (value_range::max): New.
2236 (value_range::varying_p): New.
2237 (value_range::undefined_p): New.
2238 (value_range::null_p): New.
2239 (value_range::equiv_add): New.
2240 (copy_value_range): Remove.
2242 2018-10-17 David Malcolm <dmalcolm@redhat.com>
2244 * Makefile.in (SELFTEST_TARGETS): New.
2245 (selftest) Change from s-selftest-c to $(SELFTEST_TARGETS).
2246 (C_SELFTEST_FLAGS, C_SELFTEST_DEPS, s-selftest-c, selftest-c-gdb)
2247 (selftest-gdb, selftest-c-valgrind, selftest-valgrind): Move to
2249 (CPP_SELFTEST_FLAGS, CPP_SELFTEST_DEPS, s-selftest-c++)
2250 (selftest-c++-gdb, selftest-c++-valgrind): Move to
2252 * configure: Regenerate.
2253 * configure.ac (selftest_languages): New.
2255 2018-10-17 Aldy Hernandez <aldyh@redhat.com>
2257 * tree-vrp.c (extract_range_from_multiplicative_op): Remove
2258 overflow wraps argument.
2259 (extract_range_from_binary_expr_1): Do not pass overflow wraps to
2260 wide_int_range_multiplicative_op.
2261 * wide-int-range.cc (wide_int_range_mult_wrapping): Remove
2262 overflow wraps argument.
2263 (wide_int_range_multiplicative_op): Same.
2264 (wide_int_range_lshift): Same.
2265 (wide_int_range_div): Same.
2266 * wide-int-range.h (wide_int_range_multiplicative_op): Same.
2267 (wide_int_range_lshift): Same.
2268 (wide_int_range_div): Same.
2270 2018-10-17 Aldy Hernandez <aldyh@redhat.com>
2272 * wide-int-range.h (wide_int_range_shift_undefined_p): Adjust to
2273 use sign as argument.
2274 * tree-vrp.c (extract_range_from_binary_expr_1): Pass sign to
2275 wide_int_range_shift_undefined_p.
2277 2018-10-16 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
2279 * config/aarch64/aarch64.md (despeculate_copy<ALLI_TI:mode>):
2281 (@despeculate_copy<ALLI_TI:mode>): ... This.
2282 * config/aarch64/aarch64.c (aarch64_speculation_safe_value): Remove
2285 2018-10-16 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2287 * config.gcc: Obsolete *-*-solaris2.10*.
2288 * doc/install.texi (Specific, *-*-solaris2*): Document it.
2290 2018-10-12 Jeff Law <law@redhat.com>
2292 * config/ft32/ft32.md (ft32_general_movsrc_operand): Disable
2293 reg + sym +- const_int addressing modes.
2295 2018-10-15 David Malcolm <dmalcolm@redhat.com>
2297 * common.opt (fdiagnostics-minimum-margin-width=): New option.
2298 * diagnostic-show-locus.c (layout::layout): Apply the minimum
2300 (layout::start_annotation_line): Only print up to 3 of the
2301 margin character, to avoid touching the left-hand side.
2302 (selftest::test_diagnostic_show_locus_fixit_lines): Update for
2303 minimum margin width, as set by test_diagnostic_context's ctor.
2304 (selftest::test_fixit_insert_containing_newline): Likewise.
2305 (selftest::test_fixit_insert_containing_newline_2): Likewise.
2306 (selftest::test_line_numbers_multiline_range): Clear
2307 dc.min_margin_width.
2308 * diagnostic.c (diagnostic_initialize): Initialize
2310 * diagnostic.h (struct diagnostic_context): Add field
2312 * doc/invoke.texi: Add -fdiagnostics-minimum-margin-width=.
2313 * opts.c (common_handle_option): Handle
2314 OPT_fdiagnostics_minimum_margin_width_.
2315 * selftest-diagnostic.c
2316 (selftest::test_diagnostic_context::test_diagnostic_context):
2317 Initialize min_margin_width to 6.
2318 * toplev.c (general_init): Initialize global_dc->min_margin_width.
2320 2018-10-15 David Malcolm <dmalcolm@redhat.com>
2322 * gcc-rich-location.h (gcc_rich_location::add_location_if_nearby):
2323 Fix usage of "error_at_rich_loc" in the comment.
2325 2018-10-15 Renlin Li <renlin.li@arm.com>
2328 * tree-vectorizer.c (try_vectorize_loop_1): Don't use
2329 if-conversioned loop when it contains ifn with types not
2330 supported by backend.
2331 * internal-fn.c (expand_direct_optab_fn): Add an assert.
2332 (direct_internal_fn_supported_p): New helper function.
2333 * internal-fn.h (direct_internal_fn_supported_p): Declare.
2335 2018-10-15 Jakub Jelinek <jakub@redhat.com>
2338 * common/config/i386/i386-common.c (OPTION_MASK_ISA_AVX512F_UNSET):
2339 Remove OPTION_MASK_ISA_AVX5124FMAPS_UNSET and
2340 OPTION_MASK_ISA_AVX5124VNNIW_UNSET.
2342 2018-10-15 Bin Cheng <bin.cheng@linux.alibaba.com>
2344 PR tree-optimization/87022
2345 * tree-loop-distribution.c (pg_add_dependence_edges): Check all
2346 bits in dist vector rather than the first one.
2348 2018-10-15 Richard Biener <rguenther@suse.de>
2351 * tree-ssa-structalias.c (struct vls_data): Add escaped_p member.
2352 (visit_loadstore): When a used restrict tag escaped verify that
2353 the points-to solution of "other" pointers do not include
2355 (compute_dependence_clique): If a used restrict tag escaped
2356 communicated that down to visit_loadstore.
2358 2018-10-15 Andreas Krebbel <krebbel@linux.ibm.com>
2360 * config/s390/s390.c (s390_expand_vec_init): Force vector element
2361 into reg if it isn't a general operand.
2363 2018-10-14 H.J. Lu <hongjiu.lu@intel.com>
2366 * config/i386/sse.md (*vec_dupv2di): Add register source to
2369 2018-10-14 H.J. Lu <hongjiu.lu@intel.com>
2372 * common/config/i386/i386-common.c (OPTION_MASK_ISA_AVX512F_UNSET):
2373 Add OPTION_MASK_ISA_AVX512IFMA_UNSET,
2374 OPTION_MASK_ISA_AVX5124FMAPS_UNSET and
2375 OPTION_MASK_ISA_AVX5124VNNIW_UNSET.
2377 2018-10-13 Eric Botcazou <ebotcazou@adacore.com>
2379 * dwarf2cfi.c (struct dw_trace_info): Add args_size_defined_for_eh.
2380 (notice_args_size): Set it in the current trace if no insn that can
2381 throw internally has been seen yet.
2382 (connect_traces): When connecting args_size between traces, allow the
2383 incoming values not to match if there is an insn setting it before the
2384 first insn that can throw internally; in that case, force the creation
2385 of a CFI note on this latter insn.
2387 2018-10-13 Jonathan Wakely <jwakely@redhat.com>
2389 * opt-problem.h (opt_wrapper): Use template-argument-list when naming
2390 the base class, because using the injected-class-name was not clearly
2391 specified until DR 176.
2393 2018-10-12 Paul Koning <ni1d@arrl.net>
2395 * config/pdp11/pdp11.md (doloop_end): New expander.
2396 (doloop_end_insn): renamed from "doloop_end".
2397 (addqi3): New pattern.
2398 (subqi3): New pattern.
2399 * config/pdp11/predicates.md (incdec_operand): New predicate.
2401 2018-10-12 Yury Gribov <tetra2005@gmail.com>
2404 * real.c (format_helper::can_represent_integral_type_p): New function
2405 * real.h (format_helper::can_represent_integral_type_p): Ditto.
2406 * match.pd: New pattern.
2408 2018-10-12 Alexandre Oliva <oliva@adacore.com>
2410 * configure.ac: Introduce --enable-large-address-aware
2411 to define MINGW_DEFAULT_LARGE_ADDR_AWARE.
2412 * doc/install.texi: Document it.
2413 * configure, config.in: Rebuilt.
2414 * config/i386/mingw32.h (LINK_SPEC_LARGE_ADDR_AWARE): Define,
2415 based on MINGW_DEFAULT_LARGE_ADDR_AWARE.
2416 (LINK_SPEC): Insert it.
2417 * config/i386/mingw-w64.h: Likewise.
2419 * cygming.h (HAVE_GAS_ALIGNED_COMM): Fallback-define.
2421 2018-10-12 Peter Bergner <bergner@linux.ibm.com>
2423 PR rtl-optimization/87600
2424 * ira-lives (non_conflicting_reg_copy_p): Disable for non LRA targets.
2426 2018-10-12 Paul Koning <ni1d@arrl.net>
2428 * doc/md.texi (doloop_end): Document that the pattern code may
2429 need to check operand mode.
2431 2018-10-12 Wilco Dijkstra <wdijkstr@arm.com>
2433 * config/aarch64/aarch64.md (zero_extendsidi2_aarch64): Add alternatives
2434 to zero-extend between int and floating-point registers.
2435 (load_pair_zero_extendsidi2_aarch64): Add alternative for zero-extended
2436 ldp into floating-point registers. Add type and arch attributes.
2437 (zero_extend<SHORT:mode><GPI:mode>2_aarch64): Add arch attribute.
2438 Use f_loads for type attribute.
2440 2018-10-11 Martin Sebor <msebor@redhat.com>
2442 * doc/extend.texi (attribute packed): Correct typos.
2444 2018-10-11 Martin Sebor <msebor@redhat.com>
2446 * doc/extend.texi (attribute flatten): Mention interaction with
2449 2018-10-11 Jan Hubicka <hubicka@ucw.cz>
2452 * cgraphclones.c (cgraph_node::create_version_clone_with_body):
2453 Set new_decl virtual flag to zero.
2455 2018-10-11 Martin Sebor <msebor@redhat.com>
2458 * doc/extend.texi (attribute format_arg): Discuss using multiple
2459 attributes on a single function.
2461 2018-10-11 Giuliano Belinassi <giuliano.belinassi@usp.br>
2463 PR tree-optimization/86829
2464 * match.pd (sin (atan (x))): New simplification rules.
2465 (cos (atan (x))): Likewise.
2466 * real.c (build_sinatan_real): New function.
2467 * real.h (build_sinatan_real): Prototype.
2469 2018-10-11 Will Schmidt <will_schmidt@vnet.ibm.com>
2471 * config/rs6000/rs6000.c (map_to_integral_tree_type): New helper
2473 (fold_mergeeo_helper): New helper function.
2474 (rs6000_gimple_fold_builtin): Add hooks for vec_mergee and vec_mergeo
2475 intrinsics. Correct some whitespace indentation issues.
2477 2018-10-11 Wilco Dijkstra <wdijkstr@arm.com>
2480 * config/aarch64/aarch64.c (aarch64_mask_and_shift_for_ubfiz_p):
2481 Use HOST_WIDE_INT_1U for shift.
2483 2018-10-11 Doug Rupp <rupp@adacore.com>
2484 Olivier Hainque <hainque@adacore.com>
2486 * config/rs6000/vxworks.h (VXWORKS_RELAX_LINK_SPEC): New macro.
2487 Pass --relax to the linker for RTPs.
2488 (LINK_SPEC): Append VXWORKS_RELAX_LINK_SPEC.
2490 2018-10-11 Andrew Stubbs <ams@codesourcery.com>
2491 Jan Hubicka <jh@suse.cz>
2492 Martin Jambor <mjambor@suse.cz>
2494 * print-rtl.c (print_rtx_operand_codes_E_and_V): Print how many times
2495 the same elements are repeated rather than printing all of them.
2496 * read-rtl.c (rtx_reader::read_rtx_operand): Recognize and expand
2497 "repeated" elements.
2498 * read-rtl-function.c (test_loading_repeat): New function.
2499 (read_rtl_function_c_tests): Call test_loading_repeat.
2500 * rtl-tests.c (test_dumping_repeat): New function.
2501 (rtl_tests_c_tests): Call test_dumping_repeat.
2503 2018-10-11 Richard Biener <rguenther@suse.de>
2505 * config/i386/x86-tune-costs.h (bdver?_memcpy, bdver?_memset,
2506 bdver?_cost): Unify to ...
2507 (bdver_memcpy, bdver_memset, bdver_cost): ... this.
2508 * config/i386/i386.c (processor_cost_table): Adjust.
2510 2018-10-10 Eric Botcazou <ebotcazou@adacore.com>
2513 * cgraphunit.c (cgraph_node::expand_thunk): Force DECL_IGNORED_P on
2514 the thunk when expanding to GIMPLE.
2516 2018-10-10 Bernd Edlinger <bernd.edlinger@hotmail.de>
2518 * varasm.c (mergeable_string_section): Don't try to move zero-length
2519 strings to the merge section.
2521 2018-10-10 Uros Bizjak <ubizjak@gmail.com>
2524 * config/i386/mmx.md (const_vector 0 -> mem splitter): New splitter.
2526 2018-10-10 Jakub Jelinek <jakub@redhat.com>
2529 * config/i386/i386-builtin.def (IX86_BUILTIN_RDPMC): Move from args set
2530 to special_args set.
2532 2018-10-10 Richard Biener <rguenther@suse.de>
2534 * config/i386/sse.md (reduc_plus_scal_v8df, reduc_plus_scal_v4df,
2535 reduc_plus_scal_v2df, reduc_plus_scal_v16sf, reduc_plus_scal_v8sf,
2536 reduc_plus_scal_v4sf): Merge into pattern reducing to half width
2537 and recursing and pattern terminating the recursion on SSE
2538 vector width using ix86_expand_reduc.
2539 (reduc_sminmax_scal_<mode>): Split into part reducing to half
2540 width and recursing and SSE2 vector variant doing the final
2541 reduction with ix86_expand_reduc.
2542 (reduc_uminmax_scal_<mode>): Likewise for the AVX512 variants
2543 with terminating the recursion at AVX level, splitting that
2546 2018-10-09 David Malcolm <dmalcolm@redhat.com>
2548 * genmatch.c (error_cb): Rename to...
2549 (diagnostic_cb): ...this, converting int params to enums.
2550 (fatal_at): Update for renaming.
2551 (warning_at): Likewise.
2553 * input.c (selftest::ebcdic_execution_charset::apply):
2554 Update for renaming of...
2555 (selftest::ebcdic_execution_charset::on_error): ...this, renaming
2557 (selftest::ebcdic_execution_charset::on_diagnostic): ...this,
2558 converting level and reason to enums.
2559 (class selftest::lexer_error_sink): Rename to...
2560 (class selftest::lexer_test_options): ...this, renaming field
2561 "m_errors" to "m_diagnostics".
2562 (selftest::lexer_test_options::apply): Update for renaming of...
2563 (selftest::lexer_test_options::on_error): ...this, renaming to...
2564 (selftest::lexer_test_options::on_diagnostic): ...this
2565 converting level and reason to enums.
2566 (selftest::test_lexer_string_locations_raw_string_unterminated):
2567 Update for renamings.
2568 * opth-gen.awk (struct cpp_reason_option_codes_t): Use enum for
2571 2018-10-09 Paul A. Clarke <pc@us.ibm.com>
2573 * config.gcc (powerpc*-*-*): Add pmmintrin.h to extra_headers.
2574 * config/rs6000/pmmintrin.h: New file.
2576 2018-10-09 Eric Botcazou <ebotcazou@adacore.com>
2578 PR tree-optimization/86659
2579 * gimple-match.h (gimple_match_op constructors): Initialize reverse.
2581 2018-10-09 Richard Biener <rguenther@suse.de>
2583 PR tree-optimization/63155
2584 * tree-ssa-structalias.c: Include tree-ssa.h.
2585 (get_constraint_for_ssa_var): For undefs return nothing_id.
2586 (find_func_aliases): Cleanup PHI handling.
2588 2018-10-09 Richard Biener <rguenther@suse.de>
2590 * tree-vectorizer.c (dump_stmt_cost): Fix cut&paste missing
2593 2018-10-09 Martin Liska <mliska@suse.cz>
2595 * asan.c (asan_emit_stack_protection): If a stack variable
2596 is located in a same file as current function, then emit
2597 line info into variable definition string.
2599 2018-10-08 Eric Botcazou <ebotcazou@adacore.com>
2601 * print-rtl.c (rtx_writer::print_rtx_operand_code_i): Print column
2604 2018-10-08 Eric Botcazou <ebotcazou@adacore.com>
2606 * cgraphunit.c (cgraph_node::expand_thunk): Do not force DECL_IGNORED_P
2609 2018-10-08 Eric Botcazou <ebotcazou@adacore.com>
2611 PR tree-optimization/86659
2612 * gimple-match.h (struct gimple_match_op): Add reverse field.
2613 (gimple_match_op::set_op): New overloaded method.
2614 * gimple-match-head.c (maybe_build_generic_op) <BIT_FIELD_REF>: Set
2615 the REF_REVERSE_STORAGE_ORDER flag on the value.
2616 (gimple_simplify) <GIMPLE_ASSIGN>: For BIT_FIELD_REF, propagate the
2617 REF_REVERSE_STORAGE_ORDER flag and avoid simplifying if it is set.
2619 2018-10-08 Richard Sandiford <richard.sandiford@arm.com>
2622 * gimple-ssa-backprop.c (backprop::intersect_uses): Use
2623 FOR_EACH_IMM_USE_FAST instead of FOR_EACH_IMM_USE_STMT.
2625 2018-10-08 H.J. Lu <hongjiu.lu@intel.com>
2628 * config/i386/avx512fintrin.h (_mm512_mask_fmaddsub_round_pd):
2629 Defined with __builtin_ia32_vfmaddsubpd512_mask.
2631 2018-10-08 Richard Biener <rguenther@suse.de>
2633 * config/i386/x86-tune-costs.h (znver1_cost): Make AVX256 vector loads
2634 cost the same as AVX128 ones.
2636 2018-10-08 Paul Koning <ni1d@arrl.net>
2638 * config/pdp11/pdp11-protos.h (output_block_move): Remove.
2639 (expand_block_move): New function.
2640 * config/pdp11/pdp11.c (output_block_move): Remove.
2641 (expand_block_move): New function.
2642 * config/pdp11/pdp11.h (MOVE_RATIO): New definition.
2643 * config/pdp11/pdp11.md (movmemhi): Use expand_block_move.
2644 (*movmemhi1): Remove.
2646 2018-10-08 Robin Dapp <rdapp@linux.ibm.com>
2648 * config/s390/2827.md: Increase latencies for some FP instructions.
2650 2018-10-08 Richard Biener <rguenther@suse.de>
2652 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost):
2654 * tree-vectorizer.c (dump_stmt_cost): Add cost param and dump it.
2655 * tree-vectorizer.h (dump_stmt_cost): Adjust.
2656 (add_stmt_cost): Dump return value of the hook.
2658 2018-10-08 Richard Biener <rguenther@suse.de>
2660 PR tree-optimization/63155
2661 * tree-ssa-propagate.c (add_ssa_edge): Do cheap check first.
2662 (ssa_propagation_engine::ssa_propagate): Remove redundant
2663 bitmap bit clearing.
2665 2018-10-05 Peter Bergner <bergner@linux.ibm.com>
2667 PR rtl-optimization/86939
2668 PR rtl-optimization/87479
2669 * ira.h (non_conflicting_reg_copy_p): New prototype.
2670 * ira-lives.c (ignore_reg_for_conflicts): New static variable.
2671 (make_hard_regno_dead): Don't add conflicts for register
2672 ignore_reg_for_conflicts.
2673 (make_object_dead): Likewise.
2674 (non_conflicting_reg_copy_p): New function.
2675 (process_bb_node_lives): Set ignore_reg_for_conflicts for copies.
2676 Remove special conflict handling of REAL_PIC_OFFSET_TABLE_REGNUM.
2677 * lra-lives.c (ignore_reg_for_conflicts): New static variable.
2678 (make_hard_regno_dead): Don't add conflicts for register
2679 ignore_reg_for_conflicts. Remove special conflict handling of
2680 REAL_PIC_OFFSET_TABLE_REGNUM. Remove now unused argument
2681 check_pic_pseudo_p and update callers.
2682 (mark_pseudo_dead): Don't add conflicts for register
2683 ignore_reg_for_conflicts.
2684 (process_bb_lives): Set ignore_reg_for_conflicts for copies.
2686 2018-10-05 Andrew Waterman <andrew@sifive.com>
2687 Jim Wilson <jimw@sifive.com>
2689 * config/riscv/riscv.md (f<quiet_pattern>_quiet<ANYF:mode><X:mode>4):
2690 Add define_expand. Add ! HONOR_SNANS check to current pattern. Add
2691 new pattern using HONOR_SNANS that emits one extra instruction.
2693 2018-10-05 Segher Boessenkool <segher@kernel.crashing.org>
2695 * config/rs6000/rs6000.md (unnamed mfcr scc_comparison_operator
2696 patterns): Merge SI and DI patterns to a GPR pattern.
2697 (unnamed define_insn and define_split for record form of that): Merge
2698 to a single define_insn_and_split pattern.
2700 2018-10-05 David Malcolm <dmalcolm@redhat.com>
2703 * input.c (expand_location_to_spelling_point): Add param "aspect"
2704 and use rather than hardcoding LOCATION_ASPECT_CARET.
2705 (get_substring_ranges_for_loc): Handle the case of a single token
2706 within a macro expansion.
2707 * input.h (expand_location_to_spelling_point): Add "aspect" param,
2708 defaulting to LOCATION_ASPECT_CARET.
2710 2018-10-05 Paul Koning <ni1d@arrl.net>
2712 * config/pdp11/pdp11.c (TARGET_CXX_GUARD_TYPE): Define.
2713 (TARGET_CXX_CLASS_DATA_ALWAYS_COMDAT): Define.
2714 (TARGET_CXX_LIBRARY_RTTI_COMDAT): Define.
2715 (pdp11_guard_type): New function.
2717 2018-10-05 Paul Koning <ni1d@arrl.net>
2719 * config/pdp11/pdp11.h (FLOAT_TYPE_SIZE): Always 32.
2720 * config/pdp11/pdp11.opt (mfloat32): Remove.
2722 * doc/invoke.texi (pdp11 -mfloat32): Remove:
2723 (pdp11 -mfloat64): Remove.
2725 2018-10-05 Uros Bizjak <ubizjak@gmail.com>
2727 * config/i386/i386.md (*cmpxf_cc_i387): Remove pattern.
2728 (*cmp<mode>_cc_i387): Ditto.
2729 (*cmpu<mode>_cc_i387): Ditto.
2730 (*cmp<X87MODEF:mode>_<SWI24:mode>_cc_i387): Ditto.
2731 * config/i386/i386.c (ix86_expand_fp_compare): Remove
2733 <case IX86_FPCMP_SAHF>: Do not generate pattern with HImode clobber.
2734 Emit x86_sahf_1 pattern.
2735 (ix86_expand_compare): Update call to ix86_expand_fp_compare.
2736 (ix86_expand_carry_flag_compare): Ditto.
2738 2018-10-05 Uros Bizjak <ubizjak@gmail.com>
2740 * config/i386/i386.md (*cmpxf_i387): Change operand 2 predicate
2741 to reg_or_0_operand. Add "C" constraint.
2742 (*cmpxf_cc_i387): Ditto.
2743 (*cmp<mode>_i387): Change operand 2 predicate
2744 to nonimm_or_0_operand. Add "C" constraint.
2745 (*cmp<mode>_cc_i387): Ditto.
2746 (*cmp<mode>_0_i387): Remove insn pattern.
2747 (*cmp<mode>_0_cc_i387): Ditto.
2749 2018-10-05 Uros Bizjak <ubizjak@gmail.com>
2751 * config/i386/constraints.md ("C"): Do not depend on TARGET_SSE.
2752 * config/i386/predicates.md (nonimm_or_0_operand): Rename
2753 from vector_move_operand. Update all uses.
2755 2018-10-05 Martin Sebor <msebor@redhat.com>
2757 PR tree-optimization/87490
2758 * builtins.c (expand_builtin_strnlen): Handle a null data.decl
2761 2018-10-05 Richard Biener <rguenther@suse.de>
2763 PR tree-optimization/63155
2764 * tree-ssa-ccp.c (ccp_propagate::visit_phi): Avoid excess
2765 vertical space in dumpfiles.
2766 * tree-ssa-propagate.h
2767 (ssa_propagation_engine::process_ssa_edge_worklist): Remove.
2768 * tree-ssa-propagate.c (cfg_blocks_back): New global.
2769 (ssa_edge_worklist_back): Likewise.
2770 (curr_order): Likewise.
2771 (cfg_blocks_get): Remove abstraction.
2772 (cfg_blocks_add): Likewise.
2773 (cfg_blocks_empty_p): Likewise.
2774 (add_ssa_edge): Add to current or next worklist based on
2776 (add_control_edge): Likewise.
2777 (ssa_propagation_engine::process_ssa_edge_worklist): Fold
2779 (ssa_propagation_engine::ssa_propagate): ... here. Unify
2780 iteration from CFG and SSA edge worklist so we process
2781 everything in RPO order, prioritizing forward progress
2783 (ssa_prop_init): Allocate new worklists, do not dump
2785 (ssa_prop_fini): Free new worklists.
2787 2018-10-05 Richard Biener <rguenther@suse.de>
2789 * tree-core.h (tree_block::abstract_flag): Remove.
2790 (tree_block::block_num): Make full 32bits.
2791 * tree.def (BLOCK): Remove docs about BLOCK_ABSTRACT.
2792 * tree.h (BLOCK_ABSTRACT): Remove.
2793 * dwarf2out.c (gen_lexical_block_die): Remove dead code
2794 resulting from BLOCK_ABSTRACT being always false.
2795 (gen_inlined_subroutine_die): Likewise.
2796 (gen_block_die): Likewise.
2797 * tree.c (block_ultimate_origin): Likewise.
2798 * tree-pretty-print.c (dump_block_node): Remove code dealing
2799 with BLOCK_ABSTRACT.
2800 * tree-ssa-live.c (dump_scope_block): Likewise.
2801 * tree-streamer-in.c (unpack_ts_block_value_fields): Likewise.
2802 * tree-streamer-out.c (pack_ts_block_value_fields): Likewise.
2804 2018-10-05 Richard Biener <rguenther@suse.de>
2806 * config/i386/i386.c (ix86_add_stmt_cost): When scalar cost
2807 is asked for initialize mode to the component mode of the
2810 2018-10-05 H.J. Lu <hongjiu.lu@intel.com>
2813 * config/i386/gnu-user.h (ASM_SPEC): Don't pass -msse2avx to
2814 assembler for -mavx.
2815 * config/i386/gnu-user64.h (ASM_SPEC): Likewise.
2817 2018-10-05 Segher Boessenkool <segher@kernel.crashing.org>
2820 * config/rs6000/rs6000-builtin.def (RS6000_BUILTIN_SET_FPSCR_DRN): Use
2822 * config/rs6000/rs6000.md (rs6000_set_fpscr_rn): Require the operand
2823 to be DImode. When using mffscrn, force the operand to a register.
2825 2018-10-04 Uros Bizjak <ubizjak@gmail.com>
2827 * config/i386/i386.md (*fop_<X87MODEF:mode>_2_i387): Macroize insn
2828 from *fop_<MODEF:mode>_2_i387 and *fop_xf_2_i387 using
2829 X87MODEF mode iterator.
2830 (*fop_<X87MODEF:mode>_3_i387): Macroize insn from
2831 *fop_<MODEF:mode>_3_i387 and *fop_xf_3_i387 using
2832 X87MODEF mode iterator.
2834 2018-10-04 Vinay Kumar <vinay.kumar@blackfigtech.com>
2836 * doc/invoke.texi (-Wno-prio-ctor-dtor): Document new warning
2837 -Wno-prio-ctor-dtor.
2839 2018-10-04 David Malcolm <dmalcolm@redhat.com>
2841 * Makefile.in (OBJS): Add opt-problem.o.
2842 * dump-context.h: Include "selftest.h.
2843 (selftest::temp_dump_context): New forward decl.
2844 (class dump_context): Make friend of class
2845 selftest::temp_dump_context.
2846 (dump_context::dump_loc_immediate): New decl.
2847 (class dump_pretty_printer): Move here from dumpfile.c.
2848 (class temp_dump_context): Move to namespace selftest.
2849 (temp_dump_context::temp_dump_context): Add param
2850 "forcibly_enable_dumping".
2851 (selftest::verify_dumped_text):
2852 (ASSERT_DUMPED_TEXT_EQ): Move here from dumpfile.c.
2853 (selftest::verify_item):
2854 (ASSERT_IS_TEXT): Move here from dumpfile.c.
2855 (ASSERT_IS_TREE): Likewise.
2856 (ASSERT_IS_GIMPLE): Likewise.
2857 * dumpfile.c (dump_context::dump_loc): Move immediate dumping
2859 (dump_context::dump_loc_immediate): ...this new function.
2860 (class dump_pretty_printer): Move to dump-context.h.
2861 (dump_switch_p_1): Don't enable MSG_PRIORITY_REEMITTED.
2862 (opt_info_switch_p_1): Enable MSG_PRIORITY_REEMITTED.
2863 (temp_dump_context::temp_dump_context): Move to "selftest"
2864 namespace. Add param "forcibly_enable_dumping", and use it to
2865 conditionalize the use of m_pp;
2866 (selftest::verify_dumped_text): Make non-static.
2867 (ASSERT_DUMPED_TEXT_EQ): Move to dump-context.h.
2868 (selftest::verify_item): Make non-static.
2869 (ASSERT_IS_TEXT): Move to dump-context.h.
2870 (ASSERT_IS_TREE): Likewise.
2871 (ASSERT_IS_GIMPLE): Likewise.
2872 (selftest::test_capture_of_dump_calls): Pass "true" for new
2873 param of temp_dump_context.
2874 * dumpfile.h (enum dump_flag): Add MSG_PRIORITY_REEMITTED, adding
2875 it to MSG_ALL_PRIORITIES. Update values of TDF_COMPARE_DEBUG and
2877 * opt-problem.cc: New file.
2878 * opt-problem.h: New file.
2879 * optinfo-emit-json.cc
2880 (selftest::test_building_json_from_dump_calls): Pass "true" for
2881 new param of temp_dump_context.
2882 * optinfo.cc (optinfo_kind_to_dump_flag): New function.
2883 (optinfo::emit_for_opt_problem): New function.
2884 (optinfo::emit): Clarity which emit_item is used.
2885 * optinfo.h (optinfo::get_dump_location): New accessor.
2886 (optinfo::emit_for_opt_problem): New decl.
2887 (optinfo::emit): Make const.
2888 * selftest-run-tests.c (selftest::run_tests): Call
2889 selftest::opt_problem_cc_tests.
2890 * selftest.h (selftest::opt_problem_cc_tests): New decl.
2891 * tree-data-ref.c (dr_analyze_innermost): Convert return type from
2892 bool to opt_result, converting fprintf messages to
2893 opt_result::failure_at calls. Add "stmt" param for use by the
2895 (create_data_ref): Pass "stmt" to the dr_analyze_innermost call.
2896 (runtime_alias_check_p): Convert return type from bool to
2897 opt_result, converting dump_printf calls to
2898 opt_result::failure_at, using the statement DDR_A for their
2900 (find_data_references_in_stmt): Convert return type from bool to
2901 opt_result, converting "return false" to opt_result::failure_at
2903 * tree-data-ref.h: Include "opt-problem.h".
2904 (dr_analyze_innermost): Convert return type from bool to opt_result,
2905 and add a const gimple * param.
2906 (find_data_references_in_stmt): Convert return type from bool to
2908 (runtime_alias_check_p): Likewise.
2909 * tree-predcom.c (find_looparound_phi): Pass "init_stmt" to
2910 dr_analyze_innermost.
2911 * tree-vect-data-refs.c (vect_mark_for_runtime_alias_test):
2912 Convert return type from bool to opt_result, adding a message for
2913 the PARAM_VECT_MAX_VERSION_FOR_ALIAS_CHECKS zero case.
2914 (vect_analyze_data_ref_dependence): Convert return type from bool
2915 to opt_result. Change sense of return type from "false"
2916 effectively meaning "no problems" to "false" meaning a problem,
2917 so that "return false" becomes "return opt_result::success".
2918 Convert "return true" calls to opt_result::failure_at, using
2919 the location of statement A rather than vect_location.
2920 (vect_analyze_data_ref_dependences): Convert return type from bool
2922 (verify_data_ref_alignment): Likewise, converting dump_printf_loc
2923 calls to opt_result::failure_at, using the stmt location rather
2925 (vect_verify_datarefs_alignment): Convert return type from bool
2927 (vect_enhance_data_refs_alignment): Likewise. Split local "stat"
2928 into multiple more-tightly-scoped copies.
2929 (vect_analyze_data_refs_alignment): Convert return type from bool
2931 (vect_analyze_data_ref_accesses): Likewise, converting a
2932 "return false" to a "return opt_result::failure_at", adding a
2934 (vect_prune_runtime_alias_test_list): Convert return type from
2935 bool to opt_result, converting dump_printf_loc to
2936 opt_result::failure_at. Add a %G to show the pertinent statement,
2937 and use the stmt's location rather than vect_location.
2938 (vect_find_stmt_data_reference): Convert return type from
2939 bool to opt_result, converting dump_printf_loc to
2940 opt_result::failure_at, using stmt's location.
2941 (vect_analyze_data_refs): Convert return type from bool to
2942 opt_result. Convert "return false" to "return
2943 opt_result::failure_at", adding messages as needed.
2944 * tree-vect-loop.c (vect_determine_vf_for_stmt_1): Convert return
2945 type from bool to opt_result.
2946 (vect_determine_vf_for_stmt): Likewise.
2947 (vect_determine_vectorization_factor): Likewise, converting
2948 dump_printf_loc to opt_result::failure_at, using location of phi
2949 rather than vect_location.
2950 (vect_analyze_loop_form_1): Convert return type from bool to
2951 opt_result, converting dump_printf_loc calls, retaining the use of
2953 (vect_analyze_loop_form): Convert return type from loop_vec_info
2954 to opt_loop_vec_info.
2955 (vect_analyze_loop_operations): Convert return type from bool to
2956 opt_result, converting dump_printf_loc calls, using the location
2957 of phi/stmt rather than vect_location where available. Convert
2958 various "return false" to "return opt_result::failure_at" with
2959 "unsupported phi" messages.
2960 (vect_get_datarefs_in_loop): Convert return type from bool to
2961 opt_result. Add a message for the
2962 PARAM_LOOP_MAX_DATAREFS_FOR_DATADEPS failure.
2963 (vect_analyze_loop_2): Convert return type from bool to
2964 opt_result. Ensure "ok" is set to a opt_result::failure_at before
2965 each "goto again;", adding new messages where needed.
2966 Add "unsupported grouped {store|load}" messages.
2967 (vect_analyze_loop): Convert return type from loop_vec_info to
2969 * tree-vect-slp.c (vect_analyze_slp): Convert return type from
2971 * tree-vect-stmts.c (process_use): Likewise, converting
2972 dump_printf_loc call and using stmt location, rather than
2974 (vect_mark_stmts_to_be_vectorized): Likeise.
2975 (vect_analyze_stmt): Likewise, adding a %G.
2976 (vect_get_vector_types_for_stmt): Convert return type from bool to
2977 opt_result, converting dump_printf_loc calls and using stmt
2978 location, rather than vect_location.
2979 (vect_get_mask_type_for_stmt): Convert return type from tree to
2980 opt_tree, converting dump_printf_loc calls and using stmt location.
2981 * tree-vectorizer.c: Include "opt-problem.h.
2982 (try_vectorize_loop_1): Flag "Analyzing loop at" dump message as
2983 MSG_PRIORITY_INTERNALS. Convert local "loop_vinfo" from
2984 loop_vec_info to opt_loop_vec_info. If if fails, and dumping is
2985 enabled, use it to report at the top level "couldn't vectorize
2986 loop" followed by the problem.
2987 * tree-vectorizer.h (opt_loop_vec_info): New typedef.
2988 (vect_mark_stmts_to_be_vectorized): Convert return type from bool
2990 (vect_analyze_stmt): Likewise.
2991 (vect_get_vector_types_for_stmt): Likewise.
2992 (tree vect_get_mask_type_for_stmt): Likewise.
2993 (vect_analyze_data_ref_dependences): Likewise.
2994 (vect_enhance_data_refs_alignment): Likewise.
2995 (vect_analyze_data_refs_alignment): Likewise.
2996 (vect_verify_datarefs_alignment): Likewise.
2997 (vect_analyze_data_ref_accesses): Likewise.
2998 (vect_prune_runtime_alias_test_list): Likewise.
2999 (vect_find_stmt_data_reference): Likewise.
3000 (vect_analyze_data_refs): Likewise.
3001 (vect_analyze_loop): Convert return type from loop_vec_info to
3003 (vect_analyze_loop_form): Likewise.
3004 (vect_analyze_slp): Convert return type from bool to opt_result.
3006 2018-10-04 David Malcolm <dmalcolm@redhat.com>
3008 * doc/invoke.texi (-fopt-info): Document new "internals"
3010 * dump-context.h (dump_context::apply_dump_filter_p): New decl.
3011 * dumpfile.c (dump_options): Update for renaming of MSG_ALL to
3013 (optinfo_verbosity_options): Add "internals".
3014 (kind_as_string): Update for renaming of MSG_ALL to MSG_ALL_KINDS.
3015 (dump_context::apply_dump_filter_p): New member function.
3016 (dump_context::dump_loc): Use apply_dump_filter_p rather than
3017 explicitly masking the dump_kind.
3018 (dump_context::begin_scope): Increment the scope depth first. Use
3019 apply_dump_filter_p rather than explicitly masking the dump_kind.
3020 (dump_context::emit_item): Use apply_dump_filter_p rather than
3021 explicitly masking the dump_kind.
3022 (dump_dec): Likewise.
3023 (dump_hex): Likewise.
3024 (dump_switch_p_1): Default to MSG_ALL_PRIORITIES.
3025 (opt_info_switch_p_1): Default to MSG_PRIORITY_USER_FACING.
3026 (opt_info_switch_p): Update handling of default
3027 MSG_OPTIMIZED_LOCATIONS to cope with default of
3028 MSG_PRIORITY_USER_FACING.
3029 (dump_basic_block): Use apply_dump_filter_p rather than explicitly
3030 masking the dump_kind.
3031 (selftest::test_capture_of_dump_calls): Update test_dump_context
3032 instances to use MSG_ALL_KINDS | MSG_PRIORITY_USER_FACING rather
3033 than MSG_ALL. Generalize scope test to be run at all four
3034 combinations of with/without MSG_PRIORITY_USER_FACING and
3035 MSG_PRIORITY_INTERNALS, adding examples of explicit priority
3036 for each of the two values.
3037 * dumpfile.h (enum dump_flag): Add comment about the MSG_* flags.
3038 Rename MSG_ALL to MSG_ALL_KINDS. Add MSG_PRIORITY_USER_FACING,
3039 MSG_PRIORITY_INTERNALS, and MSG_ALL_PRIORITIES, updating the
3040 values for TDF_COMPARE_DEBUG and TDF_ALL_VALUES.
3041 (AUTO_DUMP_SCOPE): Add a note to the comment about the interaction
3042 with MSG_PRIORITY_*.
3043 * tree-vect-loop-manip.c (vect_loop_versioning): Mark versioning
3044 dump messages as MSG_PRIORITY_USER_FACING.
3045 * tree-vectorizer.h (DUMP_VECT_SCOPE): Add a note to the comment
3046 about the interaction with MSG_PRIORITY_*.
3048 2018-10-04 Bernd Edlinger <bernd.edlinger@hotmail.de>
3050 * varasm.c (output_constant): Add new parameter merge_strings.
3051 Make strings properly zero terminated in merge string sections.
3052 (mergeable_string_section): Don't fail if the last char is non-zero.
3053 (assemble_variable_contents): Handle merge string sections.
3054 (assemble_variable): Likewise.
3055 (assemble_constant_contents): Likewise.
3056 (output_constant_def_contents): Likewise.
3057 (output_constructor_array_range,
3058 output_constructor_regular_field): Adjust call to output_constant.
3059 (output_object_block): Adjust call to assemble_constant_contents
3060 and assemble_variable_contents.
3062 2018-10-04 Martin Liska <mliska@suse.cz>
3065 * cgraphunit.c (process_function_and_variable_attributes):
3066 Warn about a function with alias attribute and a body.
3068 2018-10-04 Martin Liska <mliska@suse.cz>
3071 * multiple_target.c (redirect_to_specific_clone): New function.
3072 (ipa_target_clone): Use it.
3073 * tree-inline.c: Fix comment.
3075 2018-10-04 David Malcolm <dmalcolm@redhat.com>
3077 * dumpfile.c (gcc::dump_manager::dump_manager): Initialize new
3079 (gcc::dump_manager::~dump_manager): Free m_optinfo_filename.
3080 (gcc::dump_manager::register_pass): New member function, adapted
3081 from loop body in gcc::pass_manager::register_pass, adding a
3082 call to update_dfi_for_opt_info.
3083 (gcc::dump_manager::opt_info_enable_passes): Store the
3084 -fopt-info options into the new fields. Move the loop
3086 (gcc::dump_manager::update_dfi_for_opt_info): ...this new member
3088 * dumpfile.h (struct opt_pass): New forward decl.
3089 (gcc::dump_manager::register_pass): New decl.
3090 (gcc::dump_manager::update_dfi_for_opt_info): New decl.
3091 (class gcc::dump_manager): Add fields "m_optgroup_flags",
3092 "m_optinfo_flags", and "m_optinfo_filename".
3093 * passes.c (gcc::pass_manager::register_pass): Move all of the
3094 dump-handling code to gcc::dump_manager::register_pass.
3096 2018-10-04 Peter Bergner <bergner@linux.ibm.com>
3098 PR rtl-optimization/87466
3099 * target.def (setjmp_preserves_nonvolatile_regs_p): New target hook.
3100 * doc/tm.texi.in (TARGET_SETJMP_PRESERVES_NONVOLATILE_REGS_P): New hook.
3101 * doc/tm.texi: Regenerate.
3102 * ira-lives.c (process_bb_node_lives): Use the new target hook.
3103 * lra-lives.c (process_bb_lives): Likewise.
3104 * config/rs6000/rs6000.c (TARGET_SETJMP_PRESERVES_NONVOLATILE_REGS_P):
3107 2018-10-04 Tamar Christina <tamar.christina@arm.com>
3109 * params.c (add_params): Fix initialization.
3111 2018-10-04 Martin Liska <mliska@suse.cz>
3113 PR gcov-profile/84107
3114 * tree-profile.c (init_ic_make_global_vars):
3115 Remove ic_void_ptr_var and ic_gcov_type_ptr_var.
3116 Come up with new ic_tuple* variables. Emit
3117 __gcov_indirect_call{,_topn} variables.
3118 (gimple_gen_ic_profiler): Access the variable
3120 (gimple_gen_ic_func_profiler): Access
3121 __gcov_indirect_call.callee field.
3122 (gimple_init_gcov_profiler): Use ptr_type_node.
3123 * value-prof.c (gimple_ic): Use ptr_type_node.
3125 2018-10-04 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3127 PR tree-optimization/85787
3128 * ipa-pure-const.c (malloc_candidate_p_1): Move most of malloc_candidate_p
3129 into this function and add support for detecting multiple phis.
3130 (DUMP_AND_RETURN): Move from malloc_candidate_p into top-level macro.
3132 2018-10-04 Martin Liska <mliska@suse.cz>
3135 * ipa-inline.c (inline_to_all_callers_1):
3136 Call ultimate_alias_target for node being inlined.
3138 2018-10-03 Jeff Law <law@redhat.com>
3140 * gimple-ssa-sprintf.c (format_string): Do not hardcode size of
3142 * tree.c (get_typenode_from_name): Moved from fortran/trans-types.c.
3143 * tree.h (get_typenode_from_name): Prototype.
3145 2018-10-03 Uros Bizjak <ubizjak@gmail.com>
3147 * config/i386/i386.md (*cmp<X87MODEF:mode>_<SWI24:mode>_i387):
3148 Change operand 2 predicate to nonimmediate_operand.
3149 (*cmp<X87MODEF:mode>_<SWI24:mode>_cc_i387): Ditto.
3151 2018-10-03 Martin Sebor <msebor@redhat.com>
3152 Jeff Law <law@redhat.com>
3154 * gimple-ssa-sprintf.c (struct fmtresult): Add new member and
3156 (get_string_length): Detect unterminated arrays.
3157 (format_string): Same.
3158 (format_directive): Warn about unterminated arrays.
3159 (handle_gimple_call): Mark statements with no_warning as needed.
3161 2018-10-03 Jim Wilson <jimw@sifive.com>
3163 * config/riscv/riscv-c.c (riscv_cpu_cpp_builtins): For ABI_ILP32E,
3164 also define __riscv_abi_rve. Delete trailing white space.
3166 2018-10-03 Paul Koning <ni1d@arrl.net>
3168 Enable LRA register allocator for PDP11.
3169 * config/pdp11/constraints.md (Q): Use define_memory_constraint.
3172 * config/pdp11/pdp11.c (pdp11_lra_p): New function.
3173 * config/pdp11/pdp11.opt (-mlra): New option.
3174 * doc/invoke.texi (PDP-11 Options): Document -mlra.
3176 2018-10-03 Uros Bizjak <ubizjak@gmail.com>
3178 * config/i386/i386.md (*<absneg:code>extendsfdf2): Remove.
3179 (*<absneg:code>extend<mode>xf2): Ditto.
3181 2018-10-03 Aldy Hernandez <aldyh@redhat.com>
3183 PR tree-optimization/87415
3184 * tree-vrp.c (set_value_range_with_overflow): Special case one bit
3187 2018-10-02 Jeff Law <law@redhat.com>
3189 * gimple-fold.c (get_range_strlen): Only set *nonstr when
3190 an unterminated string is discovered. Bubble up range
3191 even for unterminated strings.
3192 (gimple_fold_builtin_strlen): Do not fold if get_range_strlen
3193 indicates the string was not terminated via NONSTR.
3195 2018-10-03 Aldy Hernandez <aldyh@redhat.com>
3197 * tree-vrp.c (extract_range_from_unary_expr): Special case all
3198 pointer conversions.
3199 Do not do anything special for anti-ranges.
3201 2018-10-03 Jérôme Lambourg <lambourg@adacore.com>
3203 * config/arm/vxworks.h (ARM_TARGET2_DWARF_FORMAT): Adjust to
3204 DW_EH_PE_pcrel | DW_EH_PE_indirect for RTPs.
3206 2018-10-03 Martin Liska <mliska@suse.cz>
3208 PR gcov-profile/86109
3209 * coverage.c (coverage_begin_function): Do not
3210 mark lambdas as artificial.
3211 * tree-core.h (struct GTY): Remove tm_clone_flag
3212 and introduce new lambda_function.
3213 * tree.h (DECL_LAMBDA_FUNCTION): New macro.
3215 2018-10-02 Aaron Sawdey <acsawdey@linux.ibm.com>
3218 * config/rs6000/rs6000-string.c (expand_strn_compare): Check that both
3219 P8_VECTOR and VSX are enabled.
3221 2018-10-02 Andreas Krebbel <krebbel@linux.ibm.com>
3223 * config/s390/driver-native.c (s390_host_detect_local_cpu): Add
3224 0x3907 as CPU model number.
3226 2018-10-02 Andreas Krebbel <krebbel@linux.ibm.com>
3228 * common/config/s390/s390-common.c: Rename PF_ARCH12 to PF_Z14.
3229 * config/s390/s390.h (enum processor_flags): Rename PF_ARCH12 to
3230 PF_Z14. Rename TARGET_CPU_ARCH12 to TARGET_CPU_Z14,
3231 TARGET_CPU_ARCH12_P to TARGET_CPU_Z14_P, TARGET_ARCH12 to
3232 TARGET_Z14, and TARGET_ARCH12_P to TARGET_Z14_P.
3233 * config/s390/s390.md: Likewise. Rename also the cpu attribute
3234 value from arch12 to z14.
3236 2018-10-02 Uros Bizjak <ubizjak@gmail.com>
3238 * config/i386/i386.md (fxam<mode>2_i387_with_temp): Remove.
3240 (isinf<mode>2): Ditto.
3242 2018-10-02 Uros Bizjak <ubizjak@gmail.com>
3244 * config/i386/i386.c (ix86_emit_i387_round): Extend op1 to XFmode
3245 before emitting fxam. Perform calculations in XFmode.
3247 2018-10-02 Marc Glisse <marc.glisse@inria.fr>
3249 * match.pd (((X /[ex] A) +- B) * A): New transformation.
3251 2018-10-02 Marc Glisse <marc.glisse@inria.fr>
3254 * fold-const.c (fold_plusminus_mult_expr): Handle complex and vectors.
3255 * tree.c (signed_or_unsigned_type_for): Handle complex.
3257 2018-10-02 Jeff Law <law@redhat.com>
3259 * gimple-fold.c (get_range_strlen): Remove dead code.
3261 2018-10-02 Martin Sebor <msebor@redhat.com>
3262 Jeff Law <law@redhat.com>
3264 * builtins.c (unterminated_array): Add new arguments.
3265 If argument is not terminated, bubble up size and exact
3267 (expand_builtin_strnlen): Detect, avoid expanding
3268 and diagnose unterminated arrays.
3269 (c_strlen): Fill in offset of start of unterminated strings.
3270 * builtins.h (unterminated_array): Update prototype.
3272 2018-10-02 Richard Biener <rguenther@suse.de>
3274 * config/i386/sse.md (reduc_plus_scal_v4df): Avoid the use
3275 of haddv4df, first reduce to SSE width and exploit the fact
3276 that we only need element zero with the reduction result.
3277 (reduc_plus_scal_v2df): Likewise.
3279 2018-10-02 Eric Botcazou <ebotcazou@adacore.com>
3281 * dojump.h (do_jump): Delete.
3282 (do_jump_1): Likewise.
3283 (split_comparison): Move around.
3284 * dojump.c (do_jump): Make static.
3285 (do_jump_1): Likewise.
3286 (jumpifnot): Move around.
3287 (jumpifnot_1): Likewise.
3289 (jumpif_1): Likewise.
3290 * expr.c (expand_expr_real_1): Call jumpif[not] instead of do_jump.
3292 2018-10-02 Eric Botcazou <ebotcazou@adacore.com>
3294 * reorg.c (make_return_insns): Use emit_copy_of_insn_after for the
3295 insns in the delay slot and add_insn_after for the jump insn.
3297 2018-10-02 Richard Biener <rguenther@suse.de>
3299 * tree-inline.c (expand_call_inline): Use the location of
3300 the callee declaration for the inline-entry marker.
3301 * final.c (notice_source_line): Remove special-casing of
3302 NOTE_INSN_INLINE_ENTRY.
3304 2018-10-01 Carl Love <cel@us.ibm.com>
3307 * config/rs6000/rs6000-builtin.def (__builtin_mffsl): New.
3308 (__builtin_mtfsb0): New.
3309 (__builtin_mtfsb1): New.
3310 ( __builtin_set_fpscr_rn): New.
3311 (__builtin_set_fpscr_drn): New.
3312 * config/rs6000/rs6000.c (rs6000_expand_mtfsb_builtin): Add.
3313 (rs6000_expand_set_fpscr_rn_builtin): Add.
3314 (rs6000_expand_set_fpscr_drn_builtin): Add.
3315 (rs6000_expand_builtin): Add case statement entries for
3316 RS6000_BUILTIN_MTFSB0, RS6000_BUILTIN_MTFSB1,
3317 RS6000_BUILTIN_SET_FPSCR_RN, RS6000_BUILTIN_SET_FPSCR_DRN,
3318 RS6000_BUILTIN_MFFSL.
3319 (rs6000_init_builtins): Add ftype initialization and def_builtin
3320 calls for __builtin_mffsl, __builtin_mtfsb0, __builtin_mtfsb1,
3321 __builtin_set_fpscr_rn, __builtin_set_fpscr_drn.
3322 * config/rs6000.md (rs6000_mtfsb0, rs6000_mtfsb1, rs6000_mffscrn,
3323 rs6000_mffscdrn): Add define_insn.
3324 (rs6000_set_fpscr_rn, rs6000_set_fpscr_drn): Add define_expand.
3325 * doc/extend.texi: Add documentation for the builtins.
3327 2018-10-01 Richard Biener <rguenther@suse.de>
3329 PR tree-optimization/87465
3330 * tree-ssa-loop-ivcanon.c (tree_estimate_loop_size): Fix typo
3331 causing branch miscounts.
3333 2018-10-01 Tamar Christina <tamar.christina@arm.com>
3335 * common/config/aarch64/aarch64-common.c (TARGET_OPTION_DEFAULT_PARAM,
3336 aarch64_option_default_param): New.
3337 (params.h): Include.
3338 (TARGET_OPTION_VALIDATE_PARAM, aarch64_option_validate_param): New.
3339 * config/aarch64/aarch64.c (aarch64_override_options_internal): Simplify
3340 stack-clash protection validation code.
3342 2018-10-01 Tamar Christina <tamar.christina@arm.com>
3344 * params.c (validate_param): New.
3345 (add_params): Use it.
3346 (set_param_value): Refactor param validation into validate_param.
3347 (diagnostic.h): Include.
3348 * diagnostic.h (diagnostic_ready_p): New.
3350 2018-10-01 Tamar Christina <tamar.christina@arm.com>
3352 * params.c (set_param_value):
3353 Add index of parameter being validated.
3354 * common/common-target.def (option_validate_param): New.
3355 * common/common-targhooks.h (default_option_validate_param): New.
3356 * common/common-targhooks.c (default_option_validate_param): New.
3357 * doc/tm.texi.in (TARGET_OPTION_VALIDATE_PARAM): New.
3358 * doc/tm.texi: Regenerate.
3360 2018-10-01 Tamar Christina <tamar.christina@arm.com>
3363 * config/aarch64/aarch64.c (aarch64_override_options_internal):
3364 Add validation for stack-clash parameters and set defaults.
3366 2018-10-01 Tamar Christina <tamar.christina@arm.com>
3369 * configure.ac: Add stack-clash-protection-guard-size.
3370 * doc/install.texi: Document it.
3371 * config.in (DEFAULT_STK_CLASH_GUARD_SIZE): New.
3372 * params.def: Update comment for guard-size.
3373 (PARAM_STACK_CLASH_PROTECTION_GUARD_SIZE,
3374 PARAM_STACK_CLASH_PROTECTION_PROBE_INTERVAL): Update description.
3375 * configure: Regenerate.
3377 2018-10-01 Tamar Christina <tamar.christina@arm.com>
3380 * config/aarch64/aarch64.h (STACK_CLASH_MIN_BYTES_OUTGOING_ARGS,
3381 STACK_DYNAMIC_OFFSET): New.
3382 * config/aarch64/aarch64.c (aarch64_layout_frame):
3383 Update outgoing args size.
3384 (aarch64_stack_clash_protection_alloca_probe_range,
3385 TARGET_STACK_CLASH_PROTECTION_ALLOCA_PROBE_RANGE): New.
3387 2018-10-01 Tamar Christina <tamar.christina@arm.com>
3390 * explow.c (anti_adjust_stack_and_probe_stack_clash): Support custom
3392 * target.def (stack_clash_protection_alloca_probe_range): New.
3393 (stack_clash_protection_final_dynamic_probe): Remove.
3394 * targhooks.h (default_stack_clash_protection_alloca_probe_range) New.
3395 (default_stack_clash_protection_final_dynamic_probe): Remove.
3396 * targhooks.c: Likewise.
3397 * doc/tm.texi.in (TARGET_STACK_CLASH_PROTECTION_ALLOCA_PROBE_RANGE): New.
3398 (TARGET_STACK_CLASH_PROTECTION_FINAL_DYNAMIC_PROBE): Remove.
3399 * doc/tm.texi: Regenerate.
3401 2018-10-01 Tamar Christina <tamar.christina@arm.com>
3404 * config/aarch64/aarch64-protos.h (aarch64_output_probe_sve_stack_clash): New.
3405 * config/aarch64/aarch64.c (aarch64_output_probe_sve_stack_clash,
3406 aarch64_clamp_to_uimm12_shift): New.
3407 (aarch64_allocate_and_probe_stack_space): Add SVE specific section.
3408 * config/aarch64/aarch64.md (probe_sve_stack_clash): New.
3410 2018-10-01 Tamar Christina <tamar.christina@arm.com>
3413 * config/aarch64/aarch64.c (aarch64_layout_frame): Add assert.
3415 2018-10-01 Jeff Law <law@redhat.com>
3416 Richard Sandiford <richard.sandiford@linaro.org>
3417 Tamar Christina <tamar.christina@arm.com>
3420 * config/aarch64/aarch64.md
3421 (probe_stack_range): Add k (SP) constraint.
3422 * config/aarch64/aarch64.h (STACK_CLASH_CALLER_GUARD,
3423 STACK_CLASH_MAX_UNROLL_PAGES): New.
3424 * config/aarch64/aarch64.c (aarch64_output_probe_stack_range): Emit
3425 stack probes for stack clash.
3426 (aarch64_allocate_and_probe_stack_space): New.
3427 (aarch64_expand_prologue): Use it.
3428 (aarch64_expand_epilogue): Likewise and update IP regs re-use criteria.
3429 (aarch64_sub_sp): Add emit_move_imm optional param.
3431 2018-10-01 MCC CS <deswurstes@users.noreply.github.com>
3433 PR tree-optimization/87261
3434 * match.pd: Remove trailing whitespace.
3435 Add (x & y) | ~(x | y) -> ~(x ^ y),
3436 (~x | y) ^ (x ^ y) -> x | ~y and (x ^ y) | ~(x | y) -> ~(x & y)
3438 2018-10-01 Claudiu Zissulescu <claziss@synopsys.com>
3440 * config/arc/arc.md (*add_n): Clean up pattern, update instruction
3442 (ashlsi3_insn): Update instruction constraints.
3443 (ashrsi3_insn): Likewise.
3444 (rotrsi3): Likewise.
3445 (add_shift): Likewise.
3446 * config/arc/constraints.md (Csz): New 32 bit constraint. It
3447 avoids placing in the limm field small constants which, otherwise,
3448 could end into a small instruction.
3450 2018-10-01 Claudiu Zissulescu <claziss@synopsys.com>
3452 * config/arc/arc.md (maddsidi4_split): Don't use dmac if the
3453 destination register is not odd-even.
3454 (umaddsidi4_split): Likewise.
3456 2018-10-01 Richard Biener <rguenther@suse.de>
3458 * tree-inline.c (expand_call_inline): Store origin of fn
3459 in BLOCK_ABSTRACT_ORIGIN for the inline BLOCK.
3460 * tree.c (block_ultimate_origin): Simplify and do some
3463 2018-09-30 Uros Bizjak <ubizjak@gmail.com>
3465 * config/i386/mmx.md (EMMS): New int iterator.
3466 (emms): New int attribute.
3467 (mmx_<emms>): Macroize insn from *mmx_emms and *mmx_femms using
3468 EMMS int iterator. Explicitly declare clobbers.
3469 (mmx_emms): Remove expander.
3471 * config/i386/predicates.md (emms_operation): Remove predicate.
3472 (vzeroall_pattern): New predicate.
3473 (vzeroupper_pattern): Rename from vzeroupper_operation.
3474 * config/i386/i386.c (ix86_avx_u128_mode_after): Use
3475 vzeroupper_pattern and vzeroall_pattern predicates.
3477 2018-09-30 Peter Bergner <bergner@linux.ibm.com>
3479 PR rtl-optimization/86939
3480 * ira-lives.c (make_hard_regno_born): Rename from this...
3481 (make_hard_regno_live): ... to this. Remove update to conflict
3482 information. Update function comment.
3483 (make_hard_regno_dead): Add conflict information update. Update
3485 (make_object_born): Rename from this...
3486 (make_object_live): ... to this. Remove update to conflict information.
3487 Update function comment.
3488 (make_object_dead): Add conflict information update. Update function
3490 (mark_pseudo_regno_live): Call make_object_live.
3491 (mark_pseudo_regno_subword_live): Likewise.
3492 (mark_hard_reg_dead): Update function comment.
3493 (mark_hard_reg_live): Call make_hard_regno_live.
3494 (process_bb_node_lives): Likewise.
3495 * lra-lives.c (make_hard_regno_born): Rename from this...
3496 (make_hard_regno_live): ... to this. Remove update to conflict
3497 information. Remove now uneeded check_pic_pseudo_p argument.
3498 Update function comment.
3499 (make_hard_regno_dead): Add check_pic_pseudo_p argument and add update
3500 to conflict information. Update function comment.
3501 (mark_pseudo_live): Remove update to conflict information. Update
3503 (mark_pseudo_dead): Add conflict information update.
3504 (mark_regno_live): Call make_hard_regno_live.
3505 (mark_regno_dead): Call make_hard_regno_dead with new arguement.
3506 (process_bb_lives): Call make_hard_regno_live and make_hard_regno_dead.
3508 2018-09-29 H.J. Lu <hongjiu.lu@intel.com>
3511 * config/i386/i386.c (construct_container): Use TImode for
3512 BLKmode values in 2 integer registers.
3514 2018-09-29 Jeff Law <law@redhat.com>
3516 * builtins.c (unterminated_array): Pass in c_strlen_data * to
3517 c_strlen rather than just a tree *.
3518 (c_strlen): Change NONSTR argument to a c_strlen_data pointer.
3519 Update recursive calls appropriately. If caller did not provide a
3520 suitable data pointer, create a local one. When a non-terminated
3521 string is discovered, bubble up information about the string via the
3522 c_strlen_data object.
3523 * builtins.h (c_strlen): Update prototype.
3524 (c_strlen_data): New structure.
3525 * gimple-fold.c (get_range_strlen): Update calls to c_strlen.
3526 For a type 2 call, if c_strlen indicates a non-terminated string
3527 use the length of the non-terminated string.
3528 (gimple_fold_builtin_stpcpy): Update calls to c_strlen.
3530 2018-09-29 Jakub Jelinek <jakub@redhat.com>
3533 * config/i386/avx512fintrin.h (_mm512_abs_pd, _mm512_mask_abs_pd): Use
3534 __m512d type for __A argument rather than __m512.
3536 2018-09-28 John David Anglin <danglin@gcc.gnu.org>
3538 * match.pd (simple_comparison): Don't optimize if either operand is
3539 a function pointer when target needs function pointer canonicalization.
3541 2018-09-28 Segher Boessenkool <segher@kernel.crashing.org>
3543 * config/rs6000/driver-rs6000.c (asm_names): Adjust the entries for
3544 power5 .. power9 to remove indirection.
3545 * config/rs6000/rs6000.h (ASM_CPU_POWER5_SPEC, ASM_CPU_POWER6_SPEC,
3546 ASM_CPU_POWER7_SPEC, ASM_CPU_POWER8_SPEC, ASM_CPU_POWER9_SPEC,
3547 ASM_CPU_476_SPEC): Delete.
3548 (ASM_CPU_SPEC): Adjust.
3549 (EXTRA_SPECS): Delete asm_cpu_power5, asm_cpu_power6, asm_cpu_power7,
3550 asm_cpu_power8, asm_cpu_power9, asm_cpu_476.
3552 2018-09-28 Segher Boessenkool <segher@kernel.crashing.org>
3554 * config.in: Delete HAVE_AS_DCI.
3555 * config/powerpcspe/powerpcspe.h: Treat HAVE_AS_DCI as always true.
3556 * config/rs6000/rs6000.h: Ditto.
3557 * configure.ac: Delete HAVE_AS_DCI.
3558 * configure: Regenerate.
3560 2018-09-28 Segher Boessenkool <segher@kernel.crashing.org>
3562 * config.in (HAVE_AS_LWSYNC): Delete.
3563 * config/powerpcspe/powerpcspe.h (TARGET_LWSYNC_INSTRUCTION): Delete.
3564 * config/powerpcspe/sync.md (*lwsync): Always generate lwsync, never
3566 * config/rs6000/rs6000.h (TARGET_LWSYNC_INSTRUCTION): Delete.
3567 * config/rs6000/sync.md (*lwsync): Always generate lwsync, never do it
3569 * configure.ac: Delete HAVE_AS_LWSYNC.
3570 * configure: Regenerate.
3572 2018-09-28 Eric Botcazou <ebotcazou@adacore.com>
3573 Pierre-Marie de Rodat <derodat@adacore.com>
3575 * calls.c (expand_call): Try to do a tail call for thunks at -O0 too.
3576 * cgraph.h (struct cgraph_thunk_info): Add indirect_offset.
3577 (cgraph_node::create_thunk): Add indirect_offset parameter.
3578 (thunk_adjust): Likewise.
3579 * cgraph.c (cgraph_node::create_thunk): Add indirect_offset parameter
3580 and initialize the corresponding field with it.
3581 (cgraph_node::dump): Dump indirect_offset field.
3582 * cgraphclones.c (duplicate_thunk_for_node): Deal with indirect_offset.
3583 * cgraphunit.c (cgraph_node::analyze): Be prepared for external thunks.
3584 (thunk_adjust): Add indirect_offset parameter and deal with it.
3585 (cgraph_node::expand_thunk): Deal with the indirect_offset field and
3586 pass it to thunk_adjust. Do not call the target hook if it's non-zero
3587 or if the thunk is external or local. Fix formatting. Do not chain
3588 the RESULT_DECL to BLOCK_VARS. Pass the static chain to the target,
3589 if any, in the GIMPLE representation.
3590 * ipa-icf.c (sem_function::equals_wpa): Deal with indirect_offset.
3591 * lto-cgraph.c (lto_output_node): Write indirect_offset field.
3592 (input_node): Read indirect_offset field.
3593 * tree-inline.c (expand_call_inline): Pass indirect_offset field in the
3594 call to thunk_adjust.
3595 * tree-nested.c (struct nesting_info): Add thunk_p field.
3596 (create_nesting_tree): Set it.
3597 (convert_all_function_calls): Copy static chain from targets to thunks.
3598 (finalize_nesting_tree_1): Return early for thunks.
3599 (unnest_nesting_tree_1): Do not finalize thunks.
3600 (gimplify_all_functions): Do not gimplify thunks.
3602 2018-09-28 David Malcolm <dmalcolm@redhat.com>
3604 * opt-suggestions.c (option_proposer::build_option_suggestions):
3605 Release "option_values".
3607 2018-09-28 David Malcolm <dmalcolm@redhat.com>
3609 * coverage.c (get_coverage_counts): Convert problem-reporting dump
3610 messages from MSG_OPTIMIZED_LOCATIONS to MSG_MISSED_OPTIMIZATION.
3611 * dumpfile.c (kind_as_string): New function.
3612 (dump_loc): Rather than a hardcoded prefix of "note: ", use
3613 kind_as_string to vary the prefix based on dump_kind.
3614 (selftest::test_capture_of_dump_calls): Update for above.
3616 2018-09-28 Uros Bizjak <ubizjak@gmail.com>
3618 * config/i386/i386.h (SSE_REGNO): Fix check for FIRST_REX_SSE_REG.
3619 (GET_SSE_REGNO): Rename from SSE_REGNO. Update all uses for rename.
3621 2018-09-28 Uros Bizjak <ubizjak@gmail.com>
3623 * config/i386/i386.h (CC_REGNO): Remove FPSR_REG.
3624 * config/i386/i386.c (ix86_fixed_condition_code_regs): Use
3625 INVALID_REGNUM instead of FPSR_REG.
3626 (ix86_md_asm_adjust): Do not clobber FPSR_REG.
3627 * config/i386/i386.md: Update comment of FP compares.
3628 (fldenv): Do not clobber FPSR_REG.
3630 2018-09-28 Richard Biener <rguenther@suse.de>
3632 * tree.h (BLOCK_ORIGIN): New.
3633 * omp-expand.c (grid_expand_target_grid_body): Assign
3634 BLOCK_ORIGIN to BLOCK_ABSTRACT_ORIGIN.
3635 * tree-inline.c (remap_block): Likewise.
3636 * auto-profile.c (get_function_decl_from_block): Simplify
3637 by eliding the BLOCK_ABSTRACT_ORIGIN chasing.
3638 * langhooks.c (lhd_print_error_function): Likewise.
3639 * optinfo-emit-json.cc (optrecord_json_writer::inlining_chain_to):
3641 * tree-ssa-live.c (remove_unused_scope_block_p): Likewise.
3642 * tree.c (block_nonartificial_location): Likewise.
3643 (block_ultimate_origin): Likewise.
3644 * tree-pretty-print.c (percent_K_format): Likewise. Remove
3645 no longer needed LTO case.
3647 2018-09-28 Andrew Stubbs <ams@codesourcery.com>
3648 Jan Hubicka <jh@suse.cz>
3649 Martin Jambor <mjambor@suse.cz>
3651 * simplify-rtx.c (simplify_merge_mask): New function.
3652 (simplify_ternary_operation): Use it, also see if VEC_MERGEs with the
3653 same masks are used in op1 or op2.
3654 (test_vec_merge): New function.
3655 (test_vector_ops): Call test_vec_merge.
3657 2018-09-28 Eric Botcazou <ebotcazou@adacore.com>
3659 * config/sparc/sparc-protos.h (sparc_branch_cost): Declare.
3660 * config/sparc/sparc.h (BRANCH_COST): Call sparc_branch_cost.
3661 * config/sparc/sparc.c (struct processor_costs): Add branch_cost field.
3662 (cypress_costs): Set it.
3663 (supersparc_costs): Likewise.
3664 (hypersparc_costs): Likewise.
3665 (leon_cost): Likewise.
3666 (leon3_costs): Likewise.
3667 (sparclet_costs): Likewise.
3668 (ultrasparc_costs): Likewise.
3669 (ultrasparc_costs): Likewise.
3670 (niagara_costs): Likewise.
3671 (niagara2_costs): Likewise.
3672 (niagara3_costs): Likewise.
3673 (niagara4_costs): Likewise.
3674 (niagara7_costs): Likewise.
3675 (m8_costs): Likewise.
3676 (TARGET_CAN_FOLLOW_JUMP): Define.
3677 (pass_work_around_errata::gate): Minor tweak.
3678 (sparc_option_override): Remove MASK_FSMULD mask for V7 processors.
3679 Do not set both MASK_VIS4 and MASK_VIS4B for M8 processor.
3680 Automaitcally clear MASK_FSMULD mask for V7 processors.
3681 (sparc_can_follow_jump): New static function.
3682 (output_ubranch): Deal with CROSSING_JUMP_P.
3683 (sparc_use_sched_lookahead): Rewrite using switch statement.
3684 (sparc_issue_rate): Reorder.
3685 (sparc_branch_cost): New function.
3687 2018-09-27 Martin Sebor <msebor@redhat.com>
3689 * tree.h (tree_to_shwi): Add attribute nonnull and pure.
3690 (tree_to_poly_int64, tree_to_uhwi, tree_to_poly_uint64): Same.
3691 (int_fits_type_p): Same.
3693 2018-09-27 Uros Bizjak <ubizjak@gmail.com>
3695 * config/i386/i386.md (FPCR_REG): Remove.
3696 (UNSPEC_FLDCW): Remove.
3697 (x86_fnstcw_1): Use (const_int 0) instead of FPCR_REG.
3698 (x86_fldcw_1): Remove insn pattern.
3699 (fnstenv): Do not clobber FPCR_REG.
3701 * config/i386/i386.h (FIXED_REGISTERS) Remove fpsr register.
3702 (CALL_USED_REGISTERS): Ditto.
3703 (REG_ALLOC_ORDER): Ditto.
3704 (REG_CLASS_CONTENTS): Ditto.
3705 (HI_REGISTER_NAMES): Ditto.
3706 (ADDITIONAL_REGISTER_NAMES): Use defines instead
3707 of numerical constants.
3708 * config/i386/i386.c (regclass_map): Remove fpsr register.
3709 (dbx_register_map): Ditto.
3710 (dbx64_register_map): Ditto.
3711 (svr4_dbx_register_map): Ditto.
3712 (print_reg): Do not handle FPCR_REG.
3714 2018-09-27 Segher Boessenkool <segher@kernel.crashing.org>
3717 * config.in (HAVE_AS_CMPB, HAVE_AS_DFP, HAVE_AS_FPRND, HAVE_AS_MFPGPR,
3718 HAVE_AS_POPCNTB, HAVE_AS_POPCNTD, HAVE_AS_POWER8, HAVE_AS_POWER9):
3719 Delete, always treat as true.
3720 * config/powerpcspe/powerpcspe.c (rs6000_option_override_internal):
3721 Ditto. Simplify remaining code.
3722 * config/powerpcspe/powerpcspe.h: Ditto.
3723 * config/rs6000/rs6000.c (rs6000_option_override_internal): Ditto.
3724 Simplify remaining code.
3725 (rs6000_expand_builtin): Ditto.
3726 * config/rs6000/rs6000.h: Ditto.
3727 * configure.ac: Ditto.
3728 * configure: Regenerate.
3730 2018-09-27 Martin Liska <mliska@suse.cz>
3732 * coverage.c (get_coverage_counts): Revert the formatting
3733 of missing profile opt info.
3735 2018-09-27 Richard Biener <rguenther@suse.de>
3739 * dwarf2out.c (set_block_origin_self): Do not mark outermost
3740 block as we do not output that.
3741 (gen_inlined_subroutine_die): Elide the originally outermost
3742 block, matching what we do for concrete instances.
3743 (decls_for_scope): Add parameter specifying whether to recurse
3746 2018-09-27 Andrew Stubbs <ams@codesourcery.com>
3747 Tom de Vries <tom@codesourcery.com>
3751 * expmed.c (emit_cstore): Fix handling of result_mode == BImode and
3752 STORE_FLAG_VALUE == 1.
3754 2018-09-27 Andreas Krebbel <krebbel@linux.ibm.com>
3756 * config/s390/s390.md (PPA_TX_ABORT, PPA_OOO_BARRIER): New
3757 constant definitions.
3758 ("tx_assist"): Replace magic number with PPA_TX_ABORT.
3759 ("*ppa"): Enable pattern also for -march=zEC12 -mno-htm.
3760 ("speculation_barrier"): New expander definition.
3762 2018-09-26 Indu Bhagat <indu.bhagat@oracle.com>
3764 PR gcov-profile/86957
3765 * common.opt: New warning option -Wmissing-profile.
3766 * coverage.c (get_coverage_counts): Add warning for missing .gcda file.
3767 * doc/invoke.texi: Document -Wmissing-profile.
3769 2018-09-26 Jim Wilson <jimw@sifive.com>
3771 * config/riscv/riscv.md (subsi3_extended2): Add J constraint.
3772 (negdi2, negsi2, negsi2_extended, negsi2_extended2): New.
3774 2018-09-26 Martin Sebor <msebor@redhat.com>
3776 * tree.c (zerop): Change return type to bool.
3777 (integer_zerop, integer_onep, integer_each_onep): Same.
3778 (integer_all_onesp, integer_minus_onep, integer_pow2p): Same.
3779 (integer_nonzerop, integer_truep, tree_ctz, real_zerop): Same.
3780 (real_onep, real_minus_onep, chain_index): Same.
3781 (print_type_hash_statistics, type_list_equal): Same.
3782 * tree.h (zerop): Same.
3783 (zerop, integer_zerop, integer_onep, integer_each_onep): Same.
3784 (integer_all_onesp, integer_minus_onep, integer_pow2p): Same.
3785 (integer_nonzerop, integer_truep, tree_ctz, real_zerop): Same.
3786 (real_onep, real_minus_onep, chain_index): Same.
3787 (print_type_hash_statistics, type_list_equal): Same.
3789 2018-09-26 Jim Wilson <jimw@sifive.com>
3791 * config/riscv/riscv.h (FUNCTION_ARG_REGNO_P): Fix comment.
3793 2018-09-26 Jakub Jelinek <jakub@redhat.com>
3796 * config/i386/i386.c: Include debug.h and dwarf2out.h.
3797 (output_indirect_thunk): Emit DW_CFA_def_cfa_offset after the
3800 2018-09-25 Andrew Stubbs <ams@codesourcery.com>
3802 * builtins.c (get_builtin_sync_mem): Force address mode conversion.
3804 2018-09-26 Uros Bizjak <ubizjak@gmail.com>
3806 * config/i386/i386.h (enum reg_class): Remove FP_TOP_SSE_REGS
3807 and FP_SECOND_SSE_REGS.
3808 (REG_CLASS_NAMES): Ditto.
3809 (REG_CLASS_CONTENTS): Ditto.
3810 * config/i386/i386.c (ix86_preferred_reload_class) Do not handle
3811 FP_TOP_SSE_REGS and FP_SECOND_SSE_REGS classes.
3812 (ix86_preferred_output_reload_class): Ditto.
3813 * config/i386/i386.md (fix_trunc<mode>_i387_fisttp): Change "=&1f"
3814 clobber constraint to "=&f".
3815 (fix_truncdi_i387): Ditto.
3816 (lrintxfdi2): Ditto.
3817 (fistdi2_<rounding>): Ditto.
3818 (fpremxf4_i387): Change "=u" constraint to "=f".
3819 (fprem1xf4_i387): Ditto.
3821 (fptanxf4_i387): Ditto.
3822 (fxtractxf3_i387): Ditto.
3823 (fscalexf4_i387): Ditto.
3824 (atan2xf3): Change "u" constraint to "f".
3825 (fyl2xxf3_i387): Ditto.
3826 (fyl2xp1xf3_i387): Ditto.
3828 2018-09-26 Uros Bizjak <ubizjak@gmail.com>
3831 * config/i386/i386.h (NUM_MODES_FOR_MODE_SWITCHING): Update
3832 for removed I387_MASK_PM entity.
3835 2018-09-26 Jeff Law <law@redhat.com>
3837 2018-09-26 Alexey Neyman <stilor@att.net>
3839 * graphite.h: Include <isl/id.h> and <isl/space.h>; these
3840 headers are no longer pulled in by <isl/val.h>.
3842 2018-09-26 Richard Biener <rguenther@suse.de>
3845 * dwarf2out.c (gen_lexical_block_die): Do not equate inline
3846 or concrete instance DIE to the tree. Create abstract origin
3847 attributes also for concrete instances.
3849 2018-09-26 Alexey Neyman <stilor@att.net>
3851 * graphite.h: Include <isl/id.h> and <isl/space.h>; these
3852 headers are no longer pulled in by <isl/val.h>.
3854 2018-09-26 Matthew Malcomson <matthew.malcomson@arm.com>
3856 * config/arm/arm.c (arm_split_compare_and_swap, arm_split_atomic_op):
3857 Use new helper functions.
3858 * config/arm/sync.md (atomic_load<mode>, atomic_store<mode>):
3859 Use new helper functions.
3860 * config/arm/aarch-common-protos.h (aarch_mm_needs_acquire,
3861 aarch_mm_needs_release): New declarations.
3862 * config/arm/aarch-common.c (aarch_mm_needs_acquire,
3863 aarch_mm_needs_release): New.
3865 2018-09-26 Eric Botcazou <ebotcazou@adacore.com>
3867 * config/arm/arm.c (arm_reorg): Skip Thumb reorg pass for thunks.
3868 (arm32_output_mi_thunk): Deal with long calls.
3870 2018-09-26 Richard Biener <rguenther@suse.de>
3874 * tree-inline.c (expand_call_inline): When the location
3875 of the call is UNKNOWN_LOCATION use DECL_SOURCE_LOCATION
3876 or BUILTINS_LOCATION for the BLOCK_SOURCE_LOCATION of
3877 the inserted BLOCK to make inlined_function_outer_scope_p
3879 * dwarf2out.c (add_call_src_coords_attributes): Do not add
3880 coords for reserved locations.
3882 2018-09-25 Segher Boessenkool <segher@kernel.crashing.org>
3884 * config/rs6000/rs6000.md (*movcc_internal1): Use set_attr_alternative.
3885 (*call_indirect_nonlocal_sysv<mode>): Ditto.
3886 (*call_value_indirect_nonlocal_sysv<mode>): Ditto.
3887 (*sibcall_nonlocal_sysv<mode>): Ditto.
3888 (*sibcall_value_nonlocal_sysv<mode>): Ditto.
3889 (<bd>_<mode>): Ditto.
3890 (<bd>tf_<mode>): Ditto.
3892 2018-09-25 Segher Boessenkool <segher@kernel.crashing.org>
3894 * config/rs6000/altivec.md (*altivec_mov<mode>): Write the output
3895 control string as a list of templates instead of as C code.
3896 (*altivec_movti): Ditto.
3897 * config/rs6000/darwin.md (movdf_low_di): Ditto.
3899 2018-09-25 Jim Wilson <jimw@sifive.com>
3901 * config/riscv/riscv.c (riscv_split_symbol): Mark auipc label as weak
3902 when target symbol is weak.
3904 2018-09-25 Bernd Edlinger <bernd.edlinger@hotmail.de>
3907 * builtins.c (unterminated_array): Simplify.
3908 * expr.c (string_constant): Handle SSA_NAME. Add more exceptions
3909 where pointer arithmetic is safe.
3911 2018-09-25 Segher Boessenkool <segher@kernel.crashing.org>
3914 * config/rs6000/altivec.md (altivec_vspltb): Use
3915 const_0_to_15_operand instead of u5bit_cint_operand.
3916 (*altivec_vspltb_internal): Ditto.
3917 (altivec_vspltb_direct): Ditto.
3918 (altivec_vsplth): Use const_0_to_7_operand instead of
3920 (*altivec_vsplth_internal): Ditto.
3921 (altivec_vsplth_direct): Ditto.
3922 (altivec_vspltw): Use const_0_to_3_operand instead of
3924 (*altivec_vspltw_internal): Ditto.
3925 (altivec_vspltw_direct): Ditto.
3926 (altivec_vspltsf): Ditto.
3927 (*altivec_vspltsf_internal): Ditto.
3928 * config/rs6000/rs6000.c (rs6000_expand_binop_builtin): Handle the
3929 various splats with the proper size immediate. Reorder the various
3930 cases by ascending size of immediate, and put all such together.
3932 2018-09-25 Richard Biener <rguenther@suse.de>
3935 * dwarf2out.c (add_AT_external_die_ref): Remove now redundant
3937 (maybe_create_die_with_external_ref): Do not create
3938 DW_TAG_imported_unit here.
3939 (add_abstract_origin_attribute): Handle external BLOCK refs.
3940 (dwarf2out_abstract_function): Simplify LTO case.
3941 (dwarf2out_early_finish): Create DW_TAG_imported_unit explicitely
3942 rather than using maybe_create_die_with_external_ref.
3944 2018-09-25 Uros Bizjak <ubizjak@gmail.com>
3947 * config/i386/i386.md (frndintxf2_mask_pm): Remove.
3948 (frndintxf2_mask_pm_i387): Ditto.
3949 (nearbyintxf2): Rewrite expander pattern to match rintxf2.
3950 Enable for !flag_trapping_math.
3951 (nearbyint<mode>2): Enable x87 modes for !flag_trapping_math.
3952 Enable SSE modes for TARGET_SSE4_1 and expand them with round insn.
3953 Change operand 1 predicate to nonimmediate_operand.
3954 (attr "i387_cw"): Remove mask_pm.
3955 * config/i386/i386.h (enum ix86_stack_slot): Remove SLOT_CW_MASK_PM.
3956 (enum ix86_entity): Remove I387_MASK_PM.
3957 * config/i386/i386.c (ix86_i387_mode_needed): Do not
3958 handle I387_MASK_PM.
3959 (ix86_mode_needed): Ditto.
3960 (ix86_mode_after): Ditto.
3961 (ix86_mode_entry): Ditto.
3962 (ix86_mode_exit): Ditto.
3963 (emit_i387_cw_initialization): Do not handle I387_CW_MASK_PM.
3965 2018-09-25 Jakub Jelinek <jakub@redhat.com>
3967 * vr-values.c (vr_values::vr_values): Initialize to_remove_edges and
3968 to_update_switch_stmts to vNULL instead of calling create on them
3971 2018-09-25 Richard Biener <rguenther@suse.de>
3973 PR tree-optimization/87402
3974 * tree-ssa-sccvn.c (SSA_VISITED): Remove unused function.
3975 (visit_phi): Re-instantiate handling of supposed to be VARYING
3976 but non-VARYING backedge value.
3978 2018-09-25 Richard Biener <rguenther@suse.de>
3981 * dwarf2out.c (struct sym_off_pair): New.
3982 (external_die_map): New global.
3983 (lookup_decl_die): When in LTO create DIEs lazily from the
3985 (lookup_block_die): New function, create DIEs lazily in LTO.
3986 (equate_block_to_die): New function.
3987 (dwarf2out_die_ref_for_decl): During WPA get the association
3988 from the external DIE map.
3989 (dwarf2out_register_external_die): Record mapping into the
3991 (maybe_create_die_with_external_ref): New function split out from
3992 DIE generation part of old dwarf2out_register_external_die.
3993 (add_abstract_origin_attribute): Do not return the DIE. When
3994 in LTO reference externals directly.
3995 (dwarf2out_abstract_function): When in LTO ignore calls for
3996 decls with external DIEs (already present abstract instances).
3997 (gen_call_site_die): Adjust.
3998 (add_high_low_attributes): Likewise.
3999 (gen_lexical_block_die): Likewise.
4000 (gen_inlined_subroutine_die): Likewie.
4001 (gen_block_die): Likewise.
4002 (dwarf2out_inline_entry): Likewise.
4003 (dwarf2out_early_finish): In LTRANS phase create DW_TAG_imported_unit
4006 2018-09-25 Martin Liska <mliska@suse.cz>
4008 * ipa-fnsummary.c (estimate_node_size_and_time): Scale by two
4009 integers and not by a float value.
4011 2018-09-25 Martin Liska <mliska@suse.cz>
4014 * dbgcnt.c (dbg_cnt_process_single_pair): Return false
4016 * dumpfile.c (dump_enable_all): Remove extra parenthesis.
4017 * gcov-tool.c: Declare the function with ATTRIBUTE_NORETURN.
4018 * godump.c (go_format_type): Remove extra parenthesis.
4020 2018-09-25 Martin Liska <mliska@suse.cz>
4022 * alias.c (set_dest_equal_p): Remove unused function.
4023 * config/i386/i386.c (def_builtin_pure2): Likewise.
4024 * diagnostic-show-locus.c (class layout): Remove
4026 (layout::layout): Likewise here.
4027 * dump-context.h (class temp_dump_context): Likewise.
4028 * dwarf2out.c (add_AT_fde_ref): Remove unused function.
4029 (add_AT_loclistsptr): Likewise.
4030 (add_AT_offset): Likewise.
4031 (get_AT_hi_pc): Likewise.
4032 (is_comdat_die): Likewise.
4033 (type_is_enum): Likewise.
4034 (ceiling): Likewise.
4035 (add_AT_vms_delta): Likewise.
4036 (is_class_die): Likewise.
4037 * edit-context.c (class line_event): Remove unused field.
4038 * graphite-sese-to-poly.c (tree_int_to_gmp): Remove
4040 * ipa-cp.c (ipa_get_vr_lat): Likewise.
4041 * lra-constraints.c (ok_for_index_p_nonstrict): Likewise.
4042 (ok_for_base_p_nonstrict): Likewise.
4043 * tree-chrec.c (is_not_constant_evolution): Likewise.
4044 (chrec_fold_poly_cst): Likewise.
4045 * tree-if-conv.c (has_pred_critical_p): Likewise.
4046 * tree-ssa-coalesce.c (print_exprs): Likewise.
4047 * tree-ssa-pre.c (bitmap_set_contains_expr): Likewise.
4048 * tree-ssa-uninit.c (is_and_or_or_p): Likewise.
4049 * tree-vrp.c (value_ranges_intersect_p): Likewise.
4050 (value_range_nonnegative_p): Likewise.
4052 2018-09-25 Martin Liska <mliska@suse.cz>
4054 * config/powerpcspe/powerpcspe.c (rs6000_output_function_epilogue):
4055 Do not handle "GNU Pascal".
4056 * config/rs6000/rs6000.c (rs6000_output_function_epilogue):
4058 * config/sparc/sparc.c (sparc_pass_by_reference): Remove Pascal
4059 from documentation. Likewise.
4060 * dbxout.c (dbxout_range_type): Likewise.
4061 * doc/cpp.texi: Likewise.
4062 * doc/extend.texi: Likewise.
4063 * doc/frontends.texi: Likewise.
4064 * doc/invoke.texi: Remove Pascal entry.
4065 * tree.def (CLEANUP_POINT_EXPR): Likewise.
4066 * doc/rtl.texi (MODE_FUNCTION): Remove not used entry.
4068 2018-09-25 Martin Liska <mliska@suse.cz>
4071 * doc/invoke.texi: Document all parameters and remove default
4074 2018-09-25 Ilya Leoshkevich <iii@linux.ibm.com>
4077 * rtl.c (rtx_code_size): Take into account that EQ_ATTR_ALT
4078 contains HOST_WIDE_INTs when computing its size.
4080 2018-09-24 Jim Wilson <jimw@sifive.com>
4083 * config/riscv/riscv.h (STACK_BOUNDARY): Test riscv_abi == ABI_ILP32E
4085 (ABI_STACK_BOUNDARY, MAX_ARGS_IN_REGISTERS): Likewise.
4087 2018-09-24 Andrew Pinski <apinski@marvell.com>
4089 * config/aarch64/aarch64.c (aarch_macro_fusion_pair_p): Don't
4090 access prev before checking it for NULLness in the
4091 AARCH64_FUSE_CMP_BRANCH case.
4093 2018-09-24 H.J. Lu <hongjiu.lu@intel.com>
4096 * config/i386/i386.c (rest_of_insert_endbranch): Set
4097 endbr_queued_at_entrance to true and don't insert ENDBR if
4098 x86_function_profiler will be called.
4099 (x86_function_profiler): Insert ENDBR if endbr_queued_at_entrance
4101 * config/i386/i386.h (machine_function): Add
4102 endbr_queued_at_entrance.
4104 2018-09-24 Ilya Leoshkevich <iii@linux.ibm.com>
4106 * genattrtab.c (mk_attr_alt): Use alternative_mask.
4107 (attr_rtx_1): Adjust caching to match the new EQ_ATTR_ALT field
4109 (check_attr_test): Use alternative_mask.
4110 (get_attr_value): Likewise.
4111 (compute_alternative_mask): Use alternative_mask and XWINT.
4112 (make_alternative_compare): Use alternative_mask.
4113 (attr_alt_subset_p): Use XWINT.
4114 (attr_alt_subset_of_compl_p): Likewise.
4115 (attr_alt_intersection): Use alternative_mask and XWINT.
4116 (attr_alt_union): Likewise.
4117 (attr_alt_complement): Use HOST_WIDE_INT and XWINT.
4118 (mk_attr_alt): Use alternative_mask and HOST_WIDE_INT.
4119 (simplify_test_exp): Use alternative_mask and XWINT.
4120 (write_test_expr): Use alternative_mask and XWINT, adjust bit
4121 number calculation to support 64 bits. Generate code that
4122 checks 64-bit masks.
4123 (main): Use alternative_mask.
4124 * rtl.def (EQ_ATTR_ALT): Change field types from ii to ww.
4126 2018-09-24 Ilya Leoshkevich <iii@linux.ibm.com>
4129 * config/s390/s390.c (s390_emit_epilogue): Do not use PARALLEL
4130 RETURN+USE when returning via %r14.
4132 2018-09-24 Martin Liska <mliska@suse.cz>
4134 * gcov.c (output_lines): Print colorization legend
4135 for both flag_use_colors and flag_use_hotness_colors.
4138 2018-09-24 Martin Liska <mliska@suse.cz>
4140 * coverage.c (get_coverage_counts): Use warning_at
4141 with current_function_decl location. Use %qD in warning
4144 2018-09-24 Martin Liska <mliska@suse.cz>
4146 * memory-block.h (memory_block_pool::release): Annotate with
4147 valgrind that the memory is not accessible.
4149 2018-09-24 Martin Liska <mliska@suse.cz>
4152 * asan.c: Make asan_handled_variables extern.
4154 * cfgexpand.c (expand_stack_vars): Make sure
4155 a representative is unpoison if another
4156 variable in the partition is handled by
4157 use-after-scope sanitization.
4159 2018-09-24 Richard Biener <rguenther@suse.de>
4161 PR tree-optimization/63155
4162 * tree-ssa-propagate.c (add_ssa_edge): Avoid adding PHIs to
4163 the worklist when the edge of the respective argument isn't
4166 2018-09-23 Uros Bizjak <ubizjak@gmail.com>
4168 * config/i386/i386.h (enum reg_class): Rename MASK_REGS to
4169 ALL_MASK_REGS and MASK_EVEX_REGS to MASK_REGS.
4170 (MASK_CLASS_P): Update for rename.
4171 (MAYBE_MASK_CLASS_P): Ditto.
4172 (REG_CLASS_NAMES): Update.
4173 (REG_CLASS_CONTENT): Update.
4174 * config/i386/i386.c (regclass_map): Update for MASK_REG
4175 and ALL_MASK_REGS rename.
4176 * config/i386/constraints.md (Yk): Update for rename.
4179 2018-09-23 Uros Bizjak <ubizjak@gmail.com>
4181 * config/i386/i386.h (enum reg_class): Remove
4182 EVEX_SSE_REGS and MOD4_SSE_REGS.
4183 (REG_CLASS_NAMES): Update.
4184 (REG_CLASS_CONTENT): Update.
4185 * config/i386/i386.c (regclass_map): Declare AVX-512 SSE
4186 registers as ALL_SSE_REGS.
4187 (ix86_additional_allocno_class_p): Remove.
4188 (TARGET_ADDITIONAL_ALLOCNO_CLASS_P): Remove.
4189 (ix86_register_priority): Lower priority of EVEX SSE registers.
4190 Use IN_RANGE macro where appropriate.
4191 (ix86_hard_regno_mode_ok): Merge AVX-5124FMAPS and
4192 AVX-5124VNNIW checks.
4193 (ix86_modes_tieable_p): Tie 512-bit SSE modes.
4194 * config/i386/sse.md (avx5124fmaddps_4fmaddps)
4195 (avx5124fmaddps_4fmaddps_mask, avx5124fmaddps_4fmaddps_maskz)
4196 (avx5124fmaddps_4fmaddss, avx5124fmaddps_4fmaddss_mask)
4197 (avx5124fmaddps_4fmaddss_maskz, avx5124fmaddps_4fnmaddps)
4198 (avx5124fmaddps_4fnmaddps_mask, avx5124fmaddps_4fnmaddps_maskz)
4199 (avx5124fmaddps_4fnmaddss, avx5124fmaddps_4fnmaddss_mask)
4200 (avx5124fmaddps_4fnmaddss_maskz, avx5124vnniw_vp4dpwssd)
4201 (avx5124vnniw_vp4dpwssd_mask, avx5124vnniw_vp4dpwssd_maskz)
4202 (avx5124vnniw_vp4dpwssds, avx5124vnniw_vp4dpwssds_mask)
4203 (avx5124vnniw_vp4dpwssds_maskz): Use "v" instead of "Yh" constraint.
4204 * config/i386/constraints.md (Yh): Remove.
4206 2018-09-23 Uros Bizjak <ubizjak@gmail.com>
4208 * config/i386/i386.c (regclass_map): Declare integer REX registers
4211 2018-09-23 Gerald Pfeifer <gerald@pfeifer.com>
4213 * doc/service.texi (Service): Switch the fsf.org link to https.
4215 2018-09-22 Chung-Ju Wu <jasonwucj@gmail.com>
4218 * config/nds32/nds32.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
4219 Define to speculation_safe_value_not_needed.
4221 2018-09-21 Florian Weimer <fweimer@redhat.com>
4224 * doc/extend.texi (Common Function Attributes): Mention that
4225 noreturn suppresses tail call optimization.
4227 2018-09-21 Jeff Law <law@redhat.com>
4229 * gimple-ssa-evrp.c (evrp_dom_walker::cleanup): Call
4230 vr_values::cleanup_edges_and_switches.
4231 * tree-vrp.c (to_remove_edges, to_update_switch_stmts): Moved into
4233 (identify_jump_threads): Remove EDGE_IGNORE handling.
4234 (execute_vrp): Move handling of to_remove_edges and
4235 to_update_switch_stmts into vr_values class member functions.
4236 * tree-vrp.h (switch_update, to_remove_edges): Remove declarations.
4237 (to_update_switch_stmts): Likewise.
4238 * vr-values.c: Include cfghooks.h.
4239 (vr_values::vr_values): Initialize to_remove_edges and
4240 to_update_switch_stmts.
4241 (vr_values::~vr_values): Verify to_remove_edges and
4242 to_update_switch_stmts are empty.
4243 (vr_values::simplify_switch_using_ranges): Set EDGE_IGNORE as needed.
4244 (vr_values::cleanup_edges_and_switches): New member function.
4245 * vr-values.h (vr_values): Add cleanup_edges_and_switches member
4246 function. Add new data members.
4248 2018-09-21 David Malcolm <dmalcolm@redhat.com>
4250 PR tree-optimization/87309
4251 * dumpfile.c (dump_context::begin_scope): Filter the dump_loc
4252 calls with pflags and alt_flags.
4253 (selftest::test_capture_of_dump_calls): Add test of interaction of
4254 MSG_OPTIMIZED_LOCATIONS with AUTO_DUMP_SCOPE.
4256 2018-09-21 Olivier Hainque <hainque@adacore.com>
4258 * config.gcc: Factorize and comment inclusion of vxworks-dummy.h.
4260 2018-09-21 Olivier Hainque <hainque@adacore.com>
4262 * config/vxworks.h (CLEAR_INSN_CACHE): #define to 1.
4264 2018-09-21 Olivier Hainque <hainque@adacore.com>
4266 * config/vxworks.h (VXWORKS_LIBGCC_SPEC): Remove -lc_internal.
4267 Merge block comment with the one ahead of VXWORKS_LIBS_RTP. Then:
4268 (VXWORKS_LIBS_RTP): Minor reordering.
4270 2018-09-21 Olivier Hainque <hainque@adacore.com>
4272 * config/vxworks.h (STARTFILE_PREFIX_SPEC): Define.
4273 (VXWORKS_LIBS_DIR_RTP): Remove definition and use.
4275 2018-09-21 Olivier Hainque <hainque@adacore.com>
4277 * config/vxworks.h (SIZE_TYPE): Account for TARGET_VXWORKS64.
4278 (PTRDIFF_TYPE): Likewise.
4280 2018-09-21 Olivier Hainque <hainque@adacore.com>
4282 * config.gcc: Enforce def of TARGET_VXWORKS64 to 1 from
4283 triplet, similar to support for VxWorks7.
4284 * config/vxworks-dummy.h: Provide a default definition
4285 of TARGET_VXWORKS64 to 0.
4287 2018-09-21 Olivier Hainque <hainque@adacore.com>
4289 * config/vxworks.h (TARGET_VXWORKS7): Move default definition ...
4290 * config/vxworks-dummy.h: here.
4292 2018-09-21 Olivier Hainque <hainque@adacore.com>
4294 * config.gcc: Prepend vxworks-dummy.h to tm_file for powerpc*
4296 2018-09-21 Shaokun Zhang <zhangshaokun@hisilicon.com>
4297 Bo Zhou <zbo.zhou@hisilicon.com>
4299 * config/aarch64/aarch64-cores.def (tsv110): New CPU.
4300 * config/aarch64/aarch64-tune.md: Regenerated.
4301 * doc/invoke.texi (AArch64 Options/-mtune): Add "tsv110".
4302 * config/aarch64/aarch64.c (tsv110_tunings): New tuning table.
4303 * config/aarch64/aarch64-cost-tables.h: Add "tsv110" extra costs.
4305 2018-09-21 Andrew Stubbs <ams@codesourcery.com>
4306 Julian Brown <julian@codesourcery.com>
4308 * builtins.c (get_builtin_sync_mem): Handle address spaces.
4310 2018-09-21 Eric Botcazou <ebotcazou@adacore.com>
4312 * config/rs6000/rs6000.c (rs6000_function_ok_for_sibcall): Return false
4313 if the call takes a static chain.
4315 2018-09-21 Martin Liska <mliska@suse.cz>
4317 * auto-profile.c (autofdo_source_profile::read): Do not
4319 (read_profile): Do not add working sets.
4320 (read_autofdo_file): Remove sum_all.
4321 (afdo_callsite_hot_enough_for_early_inline): Remove const
4323 * coverage.c (struct counts_entry): Remove gcov_summary.
4324 (read_counts_file): Read new GCOV_TAG_OBJECT_SUMMARY,
4325 do not support GCOV_TAG_PROGRAM_SUMMARY.
4326 (get_coverage_counts): Remove summary and expected
4328 * coverage.h (get_coverage_counts): Likewise.
4329 * doc/gcov-dump.texi: Remove -w option.
4330 * gcov-dump.c (dump_working_sets): Remove.
4331 (main): Do not support '-w' option.
4332 (print_usage): Likewise.
4333 (tag_summary): Likewise.
4334 * gcov-io.c (gcov_write_summary): Do not dump
4336 (gcov_read_summary): Likewise.
4337 (gcov_histo_index): Remove.
4338 (gcov_histogram_merge): Likewise.
4339 (compute_working_sets): Likewise.
4340 * gcov-io.h (GCOV_TAG_OBJECT_SUMMARY): Mark
4342 (GCOV_TAG_PROGRAM_SUMMARY): Mark it obsolete.
4343 (GCOV_TAG_SUMMARY_LENGTH): Adjust.
4344 (GCOV_HISTOGRAM_SIZE): Remove.
4345 (GCOV_HISTOGRAM_BITVECTOR_SIZE): Likewise.
4346 (struct gcov_summary): Simplify rapidly just
4347 to runs and sum_max fields.
4348 (gcov_histo_index): Remove.
4349 (NUM_GCOV_WORKING_SETS): Likewise.
4350 (compute_working_sets): Likewise.
4351 * gcov-tool.c (print_overlap_usage_message): Remove
4352 trailing empty line.
4353 * gcov.c (read_count_file): Read GCOV_TAG_OBJECT_SUMMARY.
4354 (output_lines): Remove program related line.
4355 * ipa-profile.c (ipa_profile): Do not consider GCOV histogram.
4356 * lto-cgraph.c (output_profile_summary): Do not stream GCOV
4358 (input_profile_summary): Do not read it.
4359 (merge_profile_summaries): And do not merge it.
4360 (input_symtab): Do not call removed function.
4361 * modulo-sched.c (sms_schedule): Do not print sum_max.
4362 * params.def (HOT_BB_COUNT_FRACTION): Reincarnate param that was
4363 removed when histogram method was invented.
4364 (HOT_BB_COUNT_WS_PERMILLE): Mention that it's used only in LTO
4366 * postreload-gcse.c (eliminate_partially_redundant_load): Fix
4368 * predict.c (get_hot_bb_threshold): Use HOT_BB_COUNT_FRACTION
4369 and dump selected value.
4370 * profile.c (add_working_set): Remove.
4371 (get_working_sets): Likewise.
4372 (find_working_set): Likewise.
4373 (get_exec_counts): Do not work with working sets.
4374 (read_profile_edge_counts): Do not inform as sum_max is removed.
4375 (compute_branch_probabilities): Likewise.
4376 (compute_value_histograms): Remove argument for call of
4377 get_coverage_counts.
4378 * profile.h: Do not make gcov_summary const.
4380 2018-09-21 Monk Chiang <sh.chiang04@gmail.com>
4382 * config.gcc (nds32*-*-*): Set TARGET_DEFAULT_TLSDESC_TRAMPOLINE=0.
4384 2018-09-21 Eric Botcazou <ebotcazou@adacore.com>
4386 PR tree-optimization/86990
4387 * gimple-ssa-store-merging.c (imm_store_chain_info:coalesce_immediate):
4388 Check that the entire merged store group is made of constants only for
4391 2018-09-20 Allan Sandfeld Jensen <allan.jensen@qt.io>
4393 * gcc.c (LINK_COMMAND_SPEC): Handle -r like -nostdlib.
4394 (VTABLE_VERIFICATION_SPEC): Likewise.
4395 (SANITIZER_EARLY_SPEC): Likewise.
4396 (SANITIZER_SPEC): Likewise.
4397 * config/darwin.h (LINK_COMMAND_SPEC): Likewise.
4398 * doc/invoke.texi (Link Options): Document -r.
4400 2018-09-20 Richard Biener <rguenther@suse.de>
4403 * gimplify.c (gimplify_expr): Retain alignment of
4404 addressable lvalue in dereference.
4406 2018-09-20 Alexandre Oliva <aoliva@redhat.com>
4409 * configure.ac: Check for .loc is_stmt support.
4410 * configure, config.in: Rebuilt.
4411 * dwarf2out.c (dwarf2out_source_line): Skip is_stmt
4414 2018-09-20 Segher Boessenkool <segher@kernel.crashing.org>
4416 * config/rs6000/rs6000.opt (misel=no, misel=yes): Delete.
4417 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -misel=yes and
4420 2018-09-20 Segher Boessenkool <segher@kernel.crashing.org>
4422 * config/rs6000/rs6000-opts.h (enum rs6000_vector): Delete
4424 * config/rs6000/rs6000.c (rs6000_debug_vector_unit): Delete
4427 2018-09-20 Marek Polacek <polacek@redhat.com>
4429 * doc/invoke.texi: Add -Wno-init-list-lifetime to C++ Language Options.
4431 2018-09-20 Richard Sandiford <richard.sandiford@arm.com>
4433 PR tree-optimization/87288
4434 * tree-vect-loop.c (vect_analyze_loop_2): Take PEELING_FOR_GAPS
4435 into account when determining PEELING_FOR_NITERS.
4437 2018-09-20 Richard Sandiford <richard.sandiford@arm.com>
4439 PR tree-optimization/86877
4440 * tree-vect-loop.c (vect_analyze_loop_2): Call
4441 vect_verify_datarefs_alignment.
4443 2018-09-19 Marek Polacek <polacek@redhat.com>
4445 * doc/invoke.texi: Document -Wclass-conversion.
4447 2018-09-19 John David Anglin <danglin@gcc.gnu.org>
4449 * config/pa/pa.c (pa_adjust_priority): Delete.
4450 (TARGET_SCHED_ADJUST_PRIORITY): Delete define.
4452 * config/pa/pa.md (atomic_storeqi): Restore deleted expander.
4453 (atomic_storehi): Likewise.
4454 (atomic_storesi): Likewise.
4455 (atomic_loaddi): Restore compare and swap exchange loop code.
4457 2018-09-19 Segher Boessenkool <segher@kernel.crashing.org>
4459 PR rtl-optimization/86902
4460 * combine.c (try_combine): When changing the CC mode used, don't change
4461 an unrelated mode in other_insn to that new CC mode.
4463 2018-09-19 David Malcolm <dmalcolm@redhat.com>
4465 * tree-data-ref.c (runtime_alias_check_p): Use formatted printing
4466 with %T in place of calls to dump_generic_expr.
4467 (prune_runtime_alias_test_list): Likewise.
4468 (create_runtime_alias_checks): Likewise.
4469 * tree-vect-data-refs.c (vect_check_nonzero_value): Likewise.
4470 (vect_analyze_data_ref_dependence): Likewise.
4471 (vect_slp_analyze_data_ref_dependence): Likewise.
4472 (vect_record_base_alignment): Likewise. Use %G in place of call
4473 to dump_gimple_stmt.
4474 (vect_compute_data_ref_alignment): Likewise.
4475 (verify_data_ref_alignment): Likewise.
4476 (vect_find_same_alignment_drs): Likewise.
4477 (vect_analyze_group_access_1): Likewise.
4478 (vect_analyze_data_ref_accesses): Likewise.
4479 (dependence_distance_ge_vf): Likewise.
4480 (dump_lower_bound): Likewise.
4481 (vect_prune_runtime_alias_test_list): Likewise.
4482 (vect_find_stmt_data_reference): Likewise.
4483 (vect_analyze_data_refs): Likewise.
4484 (vect_create_addr_base_for_vector_ref): Likewise.
4485 (vect_create_data_ref_ptr): Likewise.
4486 * tree-vect-loop-manip.c (vect_set_loop_condition): Likewise.
4487 (vect_can_advance_ivs_p): Likewise.
4488 (vect_update_ivs_after_vectorizer): Likewise.
4489 (vect_gen_prolog_loop_niters): Likewise.
4490 (vect_prepare_for_masked_peels): Likewise.
4491 * tree-vect-loop.c (vect_determine_vf_for_stmt): Likewise.
4492 (vect_determine_vectorization_factor): Likewise.
4493 (vect_is_simple_iv_evolution): Likewise.
4494 (vect_analyze_scalar_cycles_1): Likewise.
4495 (vect_analyze_loop_operations): Likewise.
4496 (report_vect_op): Likewise.
4497 (vect_is_slp_reduction): Likewise.
4498 (check_reduction_path): Likewise.
4499 (vect_is_simple_reduction): Likewise.
4500 (vect_create_epilog_for_reduction): Likewise.
4501 (vect_finalize_reduction:): Likewise.
4502 (vectorizable_induction): Likewise.
4503 (vect_transform_loop_stmt): Likewise.
4504 (vect_transform_loop): Likewise.
4505 (optimize_mask_stores): Likewise.
4506 * tree-vect-patterns.c (vect_pattern_detected): Likewise.
4507 (vect_split_statement): Likewise.
4508 (vect_recog_over_widening_pattern): Likewise.
4509 (vect_recog_average_pattern): Likewise.
4510 (vect_determine_min_output_precision_1): Likewise.
4511 (vect_determine_precisions_from_range): Likewise.
4512 (vect_determine_precisions_from_users): Likewise.
4513 (vect_mark_pattern_stmts): Likewise.
4514 (vect_pattern_recog_1): Likewise.
4515 * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
4516 (vect_record_max_nunits): Likewise.
4517 (vect_build_slp_tree_1): Likewise.
4518 (vect_build_slp_tree_2): Likewise.
4519 (vect_print_slp_tree): Likewise.
4520 (vect_analyze_slp_instance): Likewise.
4521 (vect_detect_hybrid_slp_stmts): Likewise.
4522 (vect_detect_hybrid_slp_1): Likewise.
4523 (vect_slp_analyze_operations): Likewise.
4524 (vect_slp_analyze_bb_1): Likewise.
4525 (vect_transform_slp_perm_load): Likewise.
4526 (vect_schedule_slp_instance): Likewise.
4527 * tree-vect-stmts.c (vect_mark_relevant): Likewise.
4528 (vect_mark_stmts_to_be_vectorized): Likewise.
4529 (vect_init_vector_1): Likewise.
4530 (vect_get_vec_def_for_operand): Likewise.
4531 (vect_finish_stmt_generation_1): Likewise.
4532 (vect_check_load_store_mask): Likewise.
4533 (vectorizable_call): Likewise.
4534 (vectorizable_conversion): Likewise.
4535 (vectorizable_operation): Likewise.
4536 (vectorizable_load): Likewise.
4537 (vect_analyze_stmt): Likewise.
4538 (vect_is_simple_use): Likewise.
4539 (vect_get_vector_types_for_stmt): Likewise.
4540 (vect_get_mask_type_for_stmt): Likewise.
4541 * tree-vectorizer.c (increase_alignment): Likewise.
4543 2018-09-19 Andrew Stubbs <ams@codesourcery.com>
4545 * doc/rtl.texi: Adjust vec_select description.
4546 * simplify-rtx.c (simplify_binary_operation_1): Allow VEC_SELECT to use
4547 non-constant selectors.
4549 2018-09-19 Matthew Malcomson <matthew.malcomson@arm.com>
4551 * config/aarch64/aarch64-protos.h
4552 (aarch64_offset_9bit_signed_unscaled_p): New declaration.
4553 * config/aarch64/aarch64.md (arches): New "rcpc8_4" attribute value.
4554 (arch_enabled): Add check for "rcpc8_4" attribute value of "arch".
4555 * config/aarch64/aarch64.h (AARCH64_FL_RCPC8_4): New bitfield.
4556 (AARCH64_FL_FOR_ARCH8_4): Include AARCH64_FL_RCPC8_4.
4557 (AARCH64_FL_PROFILE): Move index so flags are ordered.
4558 (AARCH64_ISA_RCPC8_4): New flag.
4559 * config/aarch64/aarch64.c (offset_9bit_signed_unscaled_p): Renamed
4560 to aarch64_offset_9bit_signed_unscaled_p.
4561 * config/aarch64/atomics.md (atomic_store<mode>): Allow offset
4563 * config/aarch64/constraints.md (Ust): New constraint.
4564 * config/aarch64/predicates.md.
4565 (aarch64_9bit_offset_memory_operand): New predicate.
4566 (aarch64_rcpc_memory_operand): New predicate.
4568 2018-09-19 Eric Botcazou <ebotcazou@adacore.com>
4570 PR rtl-optimization/87361
4571 * rtlanal.c (nonzero_bits1): Revert accidental change.
4573 2018-09-19 Richard Biener <rguenther@suse.de>
4575 PR tree-optimization/87349
4576 PR tree-optimization/87342
4577 * tree-ssa-sccvn.c (do_rpo_vn): Iterate max_rpo computation.
4579 2018-09-18 Marek Polacek <polacek@redhat.com>
4581 P1064R0 - Allowing Virtual Function Calls in Constant Expressions
4582 * gimple-fold.c (gimple_get_virt_method_for_vtable): Adjust assert.
4584 2018-09-18 Segher Boessenkool <segher@kernel.crashing.org>
4586 * config/rs6000/rs6000.md: Remove old "Cygnus sibcall" comment.
4588 2018-09-18 Segher Boessenkool <segher@kernel.crashing.org>
4590 PR rtl-optimization/86882
4591 * rtlanal.c (reg_overlap_mentioned_p): Handle CLOBBER.
4593 2018-09-18 Uros Bizjak <ubizjak@gmail.com>
4595 * config/i386/i386.md (*<code>extend<mode>xf2): Macroize insn from
4596 *<code>extendsfxf2 and *<code>extenddfxf2 using MODEF mode iterator.
4598 2018-09-18 Jonathan Wakely <jwakely@redhat.com>
4601 * doc/invoke.texi (Link Options): Fix formatting and grammar.
4603 2018-09-18 Richard Biener <rguenther@suse.de>
4606 * tree-ssa-coalesce.c (tree_int_map_hasher): Remove.
4607 (compute_samebase_partition_bases): Likewise.
4608 (coalesce_ssa_name): Always use compute_optimized_partition_bases.
4609 (gimple_can_coalesce_p): Simplify.
4611 2018-09-18 Hans-Peter Nilsson <hp@bitrange.com>
4613 Handle a library implementation of ffs calling __builtin_ffs.
4614 * config/mmix/mmix.c (TARGET_INIT_LIBFUNCS): Override with...
4615 (mmix_init_libfuncs): New function: make __builtin_ffs expand
4618 2018-09-17 David Malcolm <dmalcolm@redhat.com>
4620 * diagnostic-show-locus.c (class layout_range): Add field
4622 (layout_range::layout_range): Add "original_idx" param and use it
4623 to initialize new field.
4624 (make_range): Use 0 for original_idx.
4625 (layout::layout): Pass in index to calls to
4626 maybe_add_location_range.
4627 (layout::maybe_add_location_range): Add param "original_idx" and
4628 pass it on to layout_range.
4629 (layout::print_any_labels): Pass on range->m_original_idx to
4631 (gcc_rich_location::add_location_if_nearby): Use 0 for
4633 * gcc-rich-location.h (text_range_label::get_text): Update for new
4635 (range_label_for_type_mismatch::get_text): Likewise.
4637 2018-09-17 Uros Bizjak <ubizjak@gmail.com>
4639 * config/i386/i386.c (ix86_emit_i387_log1p): Emit fldln2 earlier.
4641 2018-09-17 David Malcolm <dmalcolm@redhat.com>
4643 * gimple-ssa-sprintf.c (fmtwarn): Update for introduction of
4644 format_string_diagnostic_t.
4645 (fmtwarn_n): Likewise.
4646 * substring-locations.c
4647 (format_string_diagnostic_t::format_string_diagnostic_t) New ctor.
4648 (format_warning_n_va): Convert to...
4649 (format_string_diagnostic_t::emit_warning_n_va): ...this.
4650 (format_warning_va): Convert to...
4651 (format_string_diagnostic_t::emit_warning_va): ...this.
4652 (format_warning_at_substring): Convert to...
4653 (format_string_diagnostic_t::emit_warning): ...this.
4654 (format_warning_at_substring_n): Convert to...
4655 (format_string_diagnostic_t::emit_warning_n): ...this.
4656 * substring-locations.h (class format_string_diagnostic_t): New
4658 (format_warning_va): Convert to
4659 format_string_diagnostic_t::emit_warning_va.
4660 (format_warning_n_va): Convert to
4661 format_string_diagnostic_t::emit_warning_n_va.
4662 (format_warning_at_substring): Convert to
4663 format_string_diagnostic_t::emit_warning.
4664 (format_warning_at_substring_n): Convert to
4665 format_string_diagnostic_t::emit_warning_n.
4667 2018-09-17 Cesar Philippidis <cesar@codesourcery.com>
4668 Bernd Schmidt <bernds_cb1@t-online.de>
4670 * config/nvptx/nvptx.md (atomic_fetch_<logic><mode>): Enable with
4673 2018-09-17 Uros Bizjak <ubizjak@gmail.com>
4675 * config/i386/i386.md (truncxf<mode>2_i387_noop_unspec): Change
4676 operand 0 predicate to nonimmediate operand.
4677 (rint<mode>2_frndint): Remove insn pattern.
4678 (rint<mode>2): Change operand 1 predicate to general_operand.
4679 Extend operand 1 to XFmode and generate rintxf2 insn.
4680 (frndintxf2_<rounding>): Rename from frndint<mode>2_<rounding>.
4681 Do not use X87MODEF mode macro.
4682 (frndintxf2_<rounding>_i387): Rename from
4683 frndint<mode>2_<rounding>_i387. Do not use X87MODEF mode macro.
4684 (<rounding_insn><mode>2): For non-SSE modes, extend operand 1
4685 to XFmode and generate significandxf3 insn.
4687 2018-09-17 Richard Biener <rguenther@suse.de>
4689 PR tree-optimization/87328
4690 * tree-ssa-sccvn.c (process_bb): Remove assertion about not
4691 visiting unexecutable backedges when not iterating.
4692 (do_rpo_vn): Mark all edges not executable even when not
4695 2018-09-17 Martin Jambor <mjambor@suse.cz>
4698 * doc/invoke.texi (Warning Options): Likewise.
4700 2018-09-17 Richard Biener <rguenther@suse.de>
4702 PR tree-optimization/87301
4703 * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_cleanup): Properly
4704 clean EH info from leftover copy assignments.
4706 2018-09-17 Martin Liska <mliska@suse.cz>
4708 PR gcov-profile/85871
4709 * gcov.c (output_intermediate_file): Fix out of bounds
4712 2018-09-17 Vineet Gupta <vgupta@synopsys.com>
4714 * config/arc/arc.c: Object attributes for core4 not reflected
4716 * config/arc/arc.h: Don't restrict DBNZ to core3 (core4 includes
4719 2018-09-17 Alexey Brodkin <abrodkin@synopsys.com>
4721 * config/arc/linux.h (LINK_EH_SPEC): Add missing space.
4723 2018-09-17 Martin Liska <mliska@suse.cz>
4725 * doc/gcov.texi: Document new option --use-hotness-colors.
4726 * gcov.c (struct source_info): Declare new field.
4727 (source_info::source_info): Set default for maximum_count.
4728 (print_usage): Add new -q option.
4729 (process_args): Process it.
4730 (accumulate_line_info): Save src->maximum_count.
4731 (output_line_beginning): Make color line number if
4732 flag_use_hotness_colors is set.
4733 (output_line_details): Pass default argument value.
4734 (output_lines): Pass src->maximum_count.
4736 2018-09-17 Martin Liska <mliska@suse.cz>
4738 * common/config/i386/i386-common.c (ix86_get_valid_option_values):
4739 Use processor_names table.
4740 * config/i386/i386.c (ix86_default_align): Use
4741 processor_cost_table for alignment values.
4742 (ix86_option_override_internal): Use processor_names.
4743 (ix86_function_specific_print): Likewise.
4744 * config/i386/i386.h (struct processor_costs):
4745 Add alignment values.
4746 (struct ptt): Remove and replace with const char *.
4747 * config/i386/x86-tune-costs.h (struct processor_costs):
4748 Declare default alignments for all costs.
4750 2018-09-17 Aldy Hernandez <aldyh@redhat.com>
4752 * tree-vrp.c (extract_range_from_unary_expr): Do not special case
4753 symbolics or VR_VARYING ranges for ABS_EXPR.
4754 * wide-int-range.cc (wide_int_range_abs): Return positive numbers
4755 when range will wrap.
4757 2018-09-15 Eric Botcazou <ebotcazou@adacore.com>
4760 * cfgexpand.c (expand_gimple_basic_block): Be prepared for a BARRIER
4761 before and after a JUMP_TABLE_DATA.
4763 2018-09-14 John David Anglin <danglin@gcc.gnu.org>
4766 * dojump.c (do_compare_and_jump): Canonicalize function pointers
4767 when one operand is a function pointer. Use POINTER_TYPE_P and
4768 FUNC_OR_METHOD_TYPE_P.
4769 * expr.c (do_store_flag): Use POINTER_TYPE_P and FUNC_OR_METHOD_TYPE_P.
4770 * fold-const.c (build_range_check): Likewise.
4771 * match.pd (simple_comparison): Likewise.
4773 2018-09-14 David Malcolm <dmalcolm@redhat.com>
4776 * spellcheck.c (get_edit_distance_cutoff): New function.
4777 (selftest::test_edit_distance_unit_test_oneway): Rename to...
4778 (selftest::test_get_edit_distance_one_way): ...this.
4779 (selftest::test_get_edit_distance_unit): Rename to...
4780 (selftest::test_get_edit_distance_both_ways): ...this.
4781 (selftest::test_edit_distances): Move tests to this new function,
4782 and test some more pairs of strings. Update for above renaming.
4783 (selftest::get_old_cutoff): New function.
4784 (selftest::test_get_edit_distance_cutoff): New function.
4785 (selftest::assert_suggested_for): New function.
4786 (ASSERT_SUGGESTED_FOR): New macro.
4787 (selftest::assert_not_suggested_for): New function.
4788 (ASSERT_NOT_SUGGESTED_FOR): New macro.
4789 (selftest::test_suggestions): New function.
4790 (selftest::spellcheck_c_tests): Move test_get_edit_distance_unit
4791 tests to selftest::test_edit_distances and call it. Add calls to
4792 selftest::test_get_edit_distance_cutoff and
4793 selftest::test_suggestions.
4794 * spellcheck.h (get_edit_distance_cutoff): New function declaration.
4795 (best_match::consider): Replace hard-coded cutoff calculation with
4797 (best_match::get_cutoff): New declaration.
4798 (best_match::get_best_meaningful_candidate): Likewise.
4800 2018-09-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
4802 * builtins.c (fold_builtin_strlen): Remove TODO comment.
4804 2018-09-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
4807 2018-07-30 Bernd Edlinger <bernd.edlinger@hotmail.de>
4809 * tree-ssa-forwprop.c (simplify_builtin_call): Don't create a not NUL
4810 terminated string literal.
4812 2018-09-14 Martin Sebor <msebor@redhat.com>
4814 * builtins.c (unterminated_array): Handle ARRAY_REF.
4815 (expand_builtin_stpcpy_1): Detect unterminated char arrays.
4816 * builtins.h (unterminated_array): Declare extern.
4817 * gimple-fold.c (gimple_fold_builtin_stpcpy): Detect unterminated
4819 (gimple_fold_builtin_sprintf): Propagate NO_WARNING to transformed
4822 2018-09-14 Martin Sebor <msebor@redhat.com>
4823 Jeff Law <law@redhat.com>
4825 * builtins.c (unterminated_array): New.
4826 (expand_builtin_strcpy): Adjust.
4827 (expand_builtin_strcpy_args): Detect unterminated arrays.
4828 * gimple-fold.c (get_maxval_strlen): Add argument. Detect
4829 unterminated arrays.
4830 * gimple-fold.h (get_maxval_strlen): Add argument.
4831 (gimple_fold_builtin_strcpy): Detec unterminated arrays.
4833 * gimple-fold.c (get_range_strlen): Add argument.
4834 (get_maxval_strlen): Adjust.
4835 * gimple-fold.h (get_range_strlen): Add argument.
4837 2018-09-14 Wei Xiao <wei3.xiao@intel.com>
4839 * config/i386/movdirintrin.h: Fix copyright year.
4841 2018-09-14 Uros Bizjak <ubizjak@gmail.com>
4843 * reg-stack.c: Include regs.h.
4844 (replace_reg): Assert that mode is MODE_FLOAT or MODE_COMPLEX_FLOAT.
4845 (emit_pop_insn): Default pop insn mode to the reg_raw_mode of
4846 FIRST_STACK_REG, not DFmode.
4847 (emit_swap_insn): Default swap insn mode to the reg_raw_mode of
4848 FIRST_STACK_REG, not XFmode. Explicitly construct swap RTX.
4849 (change stack): Default register mode to the reg_raw_mode of
4850 FIRST_STACK_REG, not DFmode.
4851 * config/i386/i386.md (*swap<mode>): Remove insn pattern.
4852 (*swapxf): Rename from swapxf.
4854 2018-09-14 Carl Love <cel@us.ibm.com>
4856 * config/rs6000/emmintrin.h: Add _MM_SHUFFLE2.
4857 * config/rs6000/xmmintrin.h: Add _MM_SHUFFLE.
4859 2018-09-14 Segher Boessenkool <segher@kernel.crashing.org>
4862 * config/rs6000/rs6000.md (*mov<mode>_hardfloat64): Add Z to the Y
4865 2018-09-14 Sam Tebbs <sam.tebbs@arm.com>
4868 * config/aarch64/aarch64.md (*aarch64_bfxilsi_uxtw): Define.
4870 2018-09-14 Jason Merrill <jason@redhat.com>
4872 Fix --enable-gather-detailed-mem-stats.
4873 * hash-table.c (hash_table_usage): Change from variable to function.
4874 * hash-table.h: Adjust.
4875 * Makefile.in: Add missing dependencies on hash-table.h.
4877 2018-09-14 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
4879 PR tree-optimization/87259
4881 (pass_cse_reciprocals::execute): Run optimize_recip_sqrt after
4882 execute_cse_reciprocals_1 has tried transforming.
4884 2018-09-14 Aldy Hernandez <aldyh@redhat.com>
4886 * tree-vrp.c (extract_range_from_binary_expr_1): Normalize
4887 VR_VARYING for PLUS/MINUS_EXPR.
4889 2018-09-14 Ilya Leoshkevich <iii@linux.ibm.com>
4891 * config/s390/s390-passes.def (INSERT_PASS_BEFORE): Improve
4894 2018-09-14 Richard Biener <rguenther@suse.de>
4897 * tree-ssa-coalesce.c (ssa_conflicts_merge): Remove conflict
4898 bits for the merged partition.
4900 2018-09-13 Martin Sebor <msebor@redhat.com>
4901 Bernd Edlinger <bernd.edlinger@hotmail.de>
4903 * builtins.h (c_srlen): Add argument.
4904 * builtins.c (warn_string_no_nul): New function.
4905 (c_strlen): Add argument and use it. Update recursive calls.
4906 Pass DECL argument to string_constant to get info on non
4907 terminated strings. Update *NONSTR as needed.
4908 (fold_builtin_strlen): Add argument to calls to c_strlen.
4909 Warn for unterminated arrays.
4910 (warn_string_no_null): Add prototype.
4911 * expr.c (string_constant): Update arguments. Update recursive
4912 calls appropriately. Detect missing NUL terminator and outermost
4913 declaration its missing in.
4914 Improve checks for arrays with nonzero lower bound or elements
4915 that are not a single byte. Simplify offset computation.
4916 Simplify checks for non-NUL terminated strings.
4917 * gimple-fold.c (get_range_strlen): Add argument to c_strlen call.
4918 * gimple-ssa-sprintf.c (get_string_length): Remove unnecessary code.
4920 2018-09-13 Bernd Edlinger <bernd.edlinger@hotmail.de>
4922 * builtins.c (c_strlen): Handle not zero terminated STRING_CSTs
4924 * fold-const.c (c_getstr): Fix function comment. Remove unused third
4925 argument. Fix range checks.
4926 * fold-const.h (c_getstr): Adjust protoype.
4927 * gimple-fold.c (gimple_fold_builtin_memory_op): Avoid folding when
4928 string is constant but contains no NUL byte.
4930 * expr.c (string_constant): Adjust function comment.
4931 Remove bogus check for zero termination.
4933 * fold-const.c (c_getstr): Clamp STRING_LENGTH to STRING_SIZE.
4935 * varasm.c (compare_constant): Compare type size of STRING_CSTs.
4936 (get_constant_size): Don't make STRING_CSTs larger than they are.
4937 (check_string_literal): New check function for STRING_CSTs.
4938 (output_constant): Use it.
4940 2018-09-13 Eric Botcazou <ebotcazou@adacore.com>
4943 * config/visium/visium.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define.
4945 2018-09-13 Richard Biener <rguenther@suse.de>
4947 PR tree-optimization/87263
4948 * tree-ssa-sccvn.c (visit_phi): Revert some earlier changes.
4949 (struct unwind_state): Add max_rpo field.
4950 (do_rpo_vn): Allow up-to-date loop state to be used when not iterating.
4951 Compute max_rpo, the max RPO number a block can be backwards reached
4952 from. Re-write non-iterating mode to a RPO ordered worklist approach,
4953 separating it from the iterating mode.
4955 2018-09-13 Vlad Lazar <vlad.lazar@arm.com>
4957 * haifa-sched.c (rank_for_schedule): Schedule by INSN_COST.
4958 (rfs_decision): New scheduling decision.
4960 2018-09-13 Richard Biener <rguenther@suse.de>
4963 * tree-ssa-sccvn.c (vn_nary_op_insert_into): Fix assert.
4964 (vn_nary_op_insert_pieces_predicated): Do not write useless
4965 valid_dominated_by_p entry outside of the allocated storage.
4967 2018-09-13 Omar Sandoval <osandov@osandov.com>
4968 Tom de Vries <tdevries@suse.de>
4971 * dwarf2out.c (is_c): New function.
4972 (add_subscript_info): Add DW_AT_count of 0 for C zero-length arrays.
4974 2018-09-13 Sam Tebbs <sam.tebbs@arm.com>
4977 * config/aarch64/aarch64.md (*aarch64_bfxil):
4979 * config/aarch64/constraints.md (Ulc): Define.
4980 * config/aarch64/aarch64-protos.h (aarch64_high_bits_all_ones_p):
4982 * config/aarch64/aarch64.c (aarch64_high_bits_all_ones_p):
4985 2018-09-13 Vlad Lazar <vlad.lazar@arm.com>
4987 * config/aarch64/aarch64.h (TARGET_COMPUTE_FRAME_LAYOUT): Define.
4988 * config/aarch64/aarch64.c (aarch64_expand_prologue): Remove
4989 aarch64_layout_frame call.
4990 (aarch64_expand_epilogue): Likewise.
4991 (aarch64_initial_elimination_offset): Likewise.
4992 (aarch64_get_separate_components): Likewise.
4993 (aarch64_use_return_insn_p): Likewise.
4994 (aarch64_layout_frame): Remove unneeded check.
4996 2018-09-13 Jakub Jelinek <jakub@redhat.com>
4998 * configure.ac: Only append
4999 " : (reconfigured) $TOPLEVEL_CONFIGURE_ARGUMENTS" to
5000 gcc_config_arguments if it was never reconfigured or last reconfigure
5001 was with different arguments.
5002 * configure: Regenerated.
5004 2018-09-13 Jakub Jelinek <jakub@redhat.com>
5005 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
5008 * expr.c (maybe_optimize_pow2p_mod_cmp): New function.
5009 (maybe_optimize_mod_cmp): Use it if integer_pow2p treeop1.
5011 2018-09-13 Jakub Jelinek <jakub@redhat.com>
5013 PR tree-optimization/87287
5014 * fold-const.c (fold_binary_loc) <case EQ_EXPR>: Move signed modulo
5015 X % C == 0 to X % (unsigned) C == 0 optimization to ...
5016 * match.pd (X % C == 0): ... here. New optimization.
5018 2018-09-12 Jakub Jelinek <jakub@redhat.com>
5021 * expr.h (maybe_optimize_mod_cmp): Declare.
5022 * expr.c (mod_inv): New function.
5023 (maybe_optimize_mod_cmp): New function.
5024 (do_store_flag): Use it.
5025 * cfgexpand.c (expand_gimple_cond): Likewise.
5027 2018-09-09 Cesar Philippidis <cesar@codesourcery.com>
5028 Julian Brown <julian@codesourcery.com>
5031 * gimplify.c (gimplify_scan_omp_clauses): Set
5032 target_firstprivatize_array_bases in OpenACC parallel and kernels
5033 region contexts. Remove GOMP_MAP_FIRSTPRIVATE_REFERENCE clauses from
5034 OpenACC data regions.
5036 2018-09-12 Uros Bizjak <ubizjak@gmail.com>
5038 * config/i386/i386.md (sqrt_extend<mode>xf3_i387): Remove.
5039 (sqrt<mode>2): Extend operand 1 to XFmode and generate sqrtxf3 insn.
5041 2018-09-12 Richard Biener <rguenther@suse.de>
5043 PR tree-optimization/87280
5044 * tree-ssa-sccvn.c (process_bb): Handle the case of executable
5045 edge but unreachable target.
5046 (do_rpo_vn): For conservatively handling a PHI only mark
5047 the backedge executable but not the block reachable.
5049 2018-09-12 Richard Biener <rguenther@suse.de>
5051 PR tree-optimization/87266
5052 * tree-ssa-sccvn.c (do_rpo_vn): Always iterate to not yet
5055 2018-09-12 Andreas Krebbel <krebbel@linux.ibm.com>
5057 * config/s390/s390.md (PFPO_RND_MODE_DFP, PFPO_RND_MODE_BFP): New
5059 ("trunc<BFP:mode><DFP_ALL:mode>2")
5060 ("trunc<DFP_ALL:mode><BFP:mode>2")
5061 ("extend<BFP:mode><DFP_ALL:mode>2")
5062 ("extend<DFP_ALL:mode><BFP:mode>2"): Set proper rounding mode
5063 according to the target operand type.
5065 2018-09-12 Jakub Jelinek <jakub@redhat.com>
5066 Andreas Krebbel <krebbel@linux.ibm.com>
5068 PR tree-optimization/86844
5069 * gimple-ssa-store-merging.c
5070 (imm_store_chain_info::coalesce_immediate): For overlapping stores, if
5071 there are any overlapping stores in between them, make sure they are
5072 also coalesced or we give up completely.
5074 2018-09-12 Jakub Jelinek <jakub@redhat.com>
5077 * fold-const.c (fold_ternary_loc) <case COND_EXPR>: Verify also that
5078 BIT_AND_EXPR's second operand is a power of two. Formatting fix.
5080 2018-09-12 Tom de Vries <tdevries@suse.de>
5082 * common.opt (gdescribe-dies): Add option.
5083 * dwarf2out.c (add_name_and_src_coords_attributes): Add description
5084 attribute for artifical and nameless decls.
5085 (dwarf2out_register_external_die): Add description attribute to
5086 external reference die.
5087 (add_desc_attribute): New functions.
5088 (gen_subprogram_die): Add description attribute to
5089 DW_TAG_call_site_parameter.
5090 * tree-pretty-print.c (print_generic_expr_to_str): New function.
5091 * tree-pretty-print.h (print_generic_expr_to_str): Declare.
5092 * doc/invoke.texi (@item Debugging Options): Add -gdescribe-dies and
5094 (@item -gdescribe-dies): Add.
5096 2018-09-12 Aldy Hernandez <aldyh@redhat.com>
5098 * tree-vrp.c (vrp_shift_undefined_p): Remove.
5099 (extract_range_from_binary_expr_1: Call
5100 wide_int_range_shift_undefined_p instead of vrp_shift_undefined_p.
5101 * wide-int-range.h (wide_int_range_shift_undefined_p): Do not
5104 2018-09-12 Aldy Hernandez <aldyh@redhat.com>
5106 * gimple-ssa-warn-alloca.c
5107 (alloca_type_and_limit::alloca_type_and_limit): Initialize limit
5108 field for ALLOCA_BOUND_*_LARGE.
5110 2018-09-11 Nathan Sidwell <nathan@acm.org>
5112 * gcc.c (load_specs, execute, run_attempt): Use %qs not '%s'.
5114 2018-09-11 Uros Bizjak <ubizjak@gmail.com>
5116 * reg-stack.c (subst_asm_stack_regs): Call replace_reg also
5117 for clobbers. Remove obsolete comment.
5119 2018-09-11 Uros Bizjak <ubizjak@gmail.com>
5121 * config/i386/i386.md (define_attr "type"): Remove mpxmov, mpxmk,
5122 mpxchk, mpxld and mpxst types.
5123 (define_attr length_immediate): Remove all processing of mpx types.
5124 (define_attr prefix_0f): Ditto.
5125 (define_attr memory): Ditto.
5127 2018-09-11 Uros Bizjak <ubizjak@gmail.com>
5129 * config/i386/i386.md (fyl2x_extend<mode>xf3_i387): Remove.
5130 (log<mode>2): Change operand 1 predicate to general_operand.
5131 Extend operand 1 to XFmode and generate logxf3 insn.
5132 (log10<mode>2): Change operand 1 predicate to general_operand.
5133 Extend operand 1 to XFmode and generate log10xf3 insn.
5134 (log2<mode>2): Change operand 1 predicate to general_operand.
5135 Extend operand 1 to XFmode and generate log2xf3 insn.
5136 (fyl2xp1_extend<mode>xf3_i387): Remove.
5137 (log1p<mode>2): Change operand 1 predicate to general_operand.
5138 Extend operand 1 to XFmode and generate log1pxf3 insn.
5139 (fxtract_extend<mode>xf3_i387): Remove.
5140 (logb<mode>2): Change operand 1 predicate to general_operand.
5141 Extend operand 1 to XFmode and generate logbxf3 insn.
5142 (ilogb<mode>2): Change operand 1 predicate to general_operand.
5143 Extend operand 1 to XFmode and generate fxtractxf3_i387 insn.
5144 (significand<mode>2): Change operand 1 predicate to general_operand.
5145 Extend operand 1 to XFmode and generate significandxf3 insn.
5147 2018-09-11 Nathan Sidwell <nathan@acm.org>
5149 * gcc.c (perror_with_name, pfatal_with_name): Delete.
5150 (load_specs): Use fatal_error.
5151 (DELETE_IF_ORDINARY, process_command): Use error.
5152 (execute, run_attempt): Use fatal_error.
5154 2018-09-11 Andrew Stubbs <ams@codesourcery.com>
5156 * diagnostic-core.h (sorry_at): New prototype.
5157 * diagnostic.c (sorry_at): New function.
5159 2018-09-11 Aldy Hernandez <aldyh@redhat.com>
5161 * tree-vrp.c (extract_range_from_binary_expr_1): Treat all divisions
5162 by zero as VR_UNDEFINED.
5164 2018-09-10 Uros Bizjak <ubizjak@gmail.com>
5166 * config/i386/i386.md (<sincos>xf2): Rename from *<sincos>xf2_i387.
5167 (*<sincos>_extend<mode>xf2_i387): Remove insn pattern.
5168 (<sincos>mode2): New expander.
5169 (sincos_extend<mode>xf3_i387): Remove insn pattern.
5170 (sincos -> sin, cos splitters): Remove splitter patterns.
5171 (sincos<mode>3): Change operand 2 predicate to general_operand.
5172 Extend operand 2 to XFmode and generate sincosxf3 insn.
5173 (fptanxf4_i387): Change mode of operands 0 and 3 to SFmode.
5174 Change operand 3 predicate to const1_operand.
5175 (fptan_extend<mode>xf4_i387): Remove insn pattern.
5176 (tanxf2): Update operands in the call to fptanxf4_i387.
5177 (tan<mode>2): Change operand 1 predicate to general_operand.
5178 Extend operand 1 to XFmode and generate tanxf3 insn.
5179 (atan2xf3): Rename from *fpatanxf3_i387.
5180 (fpatan_extend<mode>xf3_i387): Remove insn pattern.
5181 (atan2xf3): Remove expander.
5182 (atan2<mode<3): Change operand 1 and 2 predicates to general_operand.
5183 Extend operands 1 and 2 to XFmode and generate atan2xf3 insn.
5184 (atan<mode>2): Change operand 1 predicate to general_operand.
5185 Extend operand 1 to XFmode and generate atanxf3 insn.
5187 2018-09-10 Uros Bizjak <ubizjak@gmail.com>
5189 * config/i386/i386.md (x87/SSE constant load splitter): Use
5190 memory_operand instead of nonimmediate_operand for input operand
5193 2018-09-09 Uros Bizjak <ubizjak@gmail.com>
5195 * config/i386/i386.md (float partial SSE register stall splitter): Move
5196 splitter near its instruction pattern.
5197 (float_extend partial SSE register stall splitter): Ditto.
5198 (float_truncate partial SSE register stall splitter): Ditto.
5200 2018-09-09 Hans-Peter Nilsson <hp@bitrange.com>
5203 * config/mmix/mmix.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
5204 to speculation_safe_value_not_needed.
5207 * config/mmix/mmix.c (mmix_assemble_integer): Handle byte-size
5208 non-CONST_INT rtx:es using assemble_integer_with_op ".byte".
5209 (MMIX_CFUN_NEEDS_SAVED_EH_RETURN_ADDRESS): Don't call
5210 leaf_function_p, instead use has_hard_reg_initial_val.
5212 2018-09-09 Nathan Sidwell <nathan@acm.org>
5214 * gcc.h (pfatal_with_name): Don't declare here.
5215 * gcc.c (pfatal_with_name): Make static.
5217 2018-09-09 Xianmiao Qu <xianmiao_qu@c-sky.com>
5219 * config/csky/csky.md (*cskyv2_adddi3, *cskyv2_subdi3): Add
5222 2018-09-08 John David Anglin <danglin@gcc.gnu.org>
5224 PR rtl-optimization/85458
5225 * sel-sched.c (sel_target_adjust_priority): Allow backend adjust
5226 priority hook to reduce the priority of EXPR.
5228 2018-09-07 Uros Bizjak <ubizjak@gmail.com>
5230 * config/i386/i386.md (float<SWI48x:mode><MODEF:mode>2) Enable
5231 DImode for x87 on 32bit targets. Conditionally disable x87 modes
5232 with X87_ENABLE_FLOAT. Remove preparation code.
5233 (*float<SWI48:mode><MODEF:mode>2): Rename from
5234 *float<SWI48:mode><MODEF:mode>2_mixed. Handle x87, SSE and mixed
5235 math using "enabled" attribute.
5236 (*floatdi<MODEF:mode>2_i387): Rename from
5237 *float<SWI48x:mode><MODEF:mode>2_i387. Handle only DImode and
5238 enable for 32bit targets only.
5239 (floatdi<X87MODEF:mode>2_i387_with_xmm pre-reload splitter): New
5241 (floatdi<X87MODEF:mode>2_i387_with_xmm): Use register_operand
5242 as operand 1 predicate. Rewrite as define_insn_and_split.
5243 (floatdi<X87MODEF:mode>2_i387_with_xmm memory input splitter): Remove.
5245 2018-09-06 Uros Bizjak <ubizjak@gmail.com>
5247 * reg-stack.c (get_true_reg) <case FLOAT_TRUNCATE>: Reorder
5248 to fallthru to FLOAT case.
5250 2018-09-06 Will Schmidt <will_schmidt@vnet.ibm.com>
5253 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Update logic
5254 around folding of vec_sl to handle out of range shift values.
5256 2018-09-06 Uros Bizjak <ubizjak@gmail.com>
5258 * config/i386/i386.md (fix_trunc<mode>_fisttp_i387_1): Remove.
5259 Update callers to gen_fix_trunc<mode>_i387_fisttp
5260 (fix_trunc<mode>_i387_fisttp): Change operand 0 predicate to
5261 nonimmediate_operand.
5262 (fix_trunc<mode>_i387_fisttp_with_temp): Remove insn pattern
5263 and corresponding splitters.
5264 (*fix_trunc<mode>_i387_1): Always expand with fix_trunc<mode>_i387.
5265 (fix_truncdi_i387): Change operand 0 predicate to nonimmediate_operand.
5266 (fix_truncdi_i387_with_temp): Remove insn pattern
5267 and corresponding splitters.
5268 (fix_trunc<mode>_i387): Change operand 0 predicate to
5269 nonimmediate_operand.
5270 (fix_trunc<mode>_i387_with_temp): Remove insn pattern
5271 and corresponding splitters.
5272 (*fistdi2_1): Remove.
5274 (fistdi2_with_temp): Remove insn pattern and corresponding splitters.
5275 (lrintxfdi2): Remove expander. Reimplement as define_insn.
5276 (*fist<mode>2_1): Remove.
5277 (fist<mode>2): Ditto.
5278 (fist<mode>2_with_temp): Remove insn pattern and corresponding
5280 (lrintxf<mode>2): Remove expander. Reimplement as define_insn.
5281 (*fist<mode>2_<rounding>_1): Always expand with fist<mode>2_<rounding>.
5282 (fistdi2_<rounding>): Change operand 0 predicate to
5283 nonimmediate_operand.
5284 (fistdi2_<rounding>_with_temp): Remove insn pattern
5285 and corresponding splitters.
5286 (fist<mode>2_<rounding>): Change operand 0 predicate to
5287 nonimmediate_operand.
5288 (fist<mode>2_<rounding>_with_temp): Remove insn pattern
5289 and corresponding splitters.
5291 (*fixuns_trunc<mode>si2_avx512f_zext): Depend on TARGET_SSE_MATH.
5293 2018-09-06 Bernd Edlinger <bernd.edlinger@hotmail.de>
5295 * varasm.c (output_constructor_regular_field): Check TYPE_SIZE_UNIT of
5298 2018-09-06 Will Schmidt <will_schmidt@vnet.ibm.com>
5300 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add support for
5301 early gimple folding of vec_splat().
5302 * tree-vect-generic.c: Remove static from tree_vec_extract() definition.
5303 * gimple-fold.h: Add an extern define for tree_vec_extract().
5305 2018-09-06 Will Schmidt <will_schmidt@vnet.ibm.com>
5307 * config/rs6000/rs6000.c (fold_mergehl_helper): Add types_compatible_p
5308 wrappers around TREE_TYPE comparisons.
5310 2018-09-06 Ilya Leoshkevich <iii@linux.ibm.com>
5313 * config/s390/predicates.md: Add nonsym_memory_operand.
5314 * config/s390/s390.c (s390_legitimize_cs_operand): If operand
5315 contains a SYMBOL_REF, load it into an intermediate pseudo.
5316 (s390_emit_compare_and_swap): Legitimize operand.
5317 * config/s390/s390.md: Use the new nonsym_memory_operand
5318 with UNSPECV_CAS patterns.
5320 2018-09-06 Ilya Leoshkevich <iii@linux.ibm.com>
5323 * config/s390/s390-passes.def: New file.
5324 * config/s390/s390-protos.h (class rtl_opt_pass): Add forward
5326 (make_pass_s390_early_mach): Add declaration.
5327 * config/s390/s390.c (make_pass_s390_early_mach):
5328 (s390_option_override): Remove dynamic registration.
5329 * config/s390/t-s390: Add s390-passes.def.
5331 2018-09-06 Ilya Leoshkevich <iii@linux.ibm.com>
5333 * config/s390/s390.c (s390_decompose_constant_pool_ref):
5334 Remove UNSPEC_LTREL_BASE check.
5335 (annotate_constant_pool_refs): Likewise.
5336 (find_constant_pool_ref): Likewise.
5337 (find_ltrel_base): Removed.
5338 (replace_ltrel_base): Removed.
5339 (s390_mainpool_finish): Remove replace_ltrel_base call.
5340 (s390_chunkify_start): Remove pending LTREL_BASE logic.
5341 (s390_chunkify_finish): Remove replace_ltrel_base call.
5342 * config/s390/s390.md: Remove UNSPEC_LTREL_BASE.
5344 2018-09-06 Hans-Peter Nilsson <hp@axis.com>
5347 * config/cris/cris.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
5348 to speculation_safe_value_not_needed.
5350 2018-09-05 Cesar Philippidis <cesar@codesourcery.com>
5351 Bernd Schmidt <bernds_cb1@t-online.de>
5353 * config/nvptx/nvptx-opts.h: New file.
5354 * config/nvptx/nvptx.c (nvptx_file_start): Print the correct .target.
5355 * config/nvptx/nvptx.h: Include "nvptx-opts.h".
5357 (TARGET_SM35): New macro.
5358 * config/nvptx/nvptx.md (atomic_fetch_<logic><mode>): Enable with the
5360 * config/nvptx/nvptx.opt (ptx_isa, sm_30, sm_35): New enum and its
5362 (misa=): New option.
5363 * doc/invoke.texi (Nvidia PTX Options): Document -misa.
5365 2018-09-05 Uros Bizjak <ubizjak@gmail.com>
5367 * config/i386/i386.md (truncdfsf2): Remove expander.
5368 (truncdfsf2_with_temp): Ditto.
5369 (truncxf<mode>2): Ditto.
5370 (*truncdfsf_fast_mixed): Remove insn pattern.
5371 (*truncdfsf_fast_i387): Ditto.
5372 (*truncdfsf_mixed): Ditto.
5373 (*truncdfsf_i387): Ditto.
5374 (*truncdfsf2_i387_1): Ditto.
5375 (*truncxfsf2_mixed): Ditto.
5376 (*truncxfdf2_mixed): Ditto.
5377 (*truncxf<mode>2_i387_noop): Ditto. Update callers
5378 to call gen_truncxf<mode>2 instead.
5379 (*truncxf<mode>2_i387): Remove.
5380 (reg->reg splitters): Remove splitter pattern.
5381 (reg->mem splitters): Ditto.
5383 (truncdfsf2): New insn pattern.
5384 (truncxf<mode>2): Ditto.
5386 2018-09-05 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
5388 * tree-ssa-math-opts.c (is_mult_by): New function.
5389 (is_square_of): Use the above.
5390 (optimize_recip_sqrt): New function.
5391 (pass_cse_reciprocals::execute): Use the above.
5393 2018-09-05 Richard Biener <rguenther@suse.de>
5396 * tree-ssa-sccvn.c (rpo_elim::eliminate_push_avail): Make sure
5397 to zero-init the emplaced vec.
5399 2018-09-05 Martin Liska <mliska@suse.cz>
5401 PR tree-optimization/87205
5402 * tree-switch-conversion.c (pass_lower_switch::execute):
5403 Group cases for switch statements.
5405 2018-09-05 Richard Biener <rguenther@suse.de>
5407 PR tree-optimization/87217
5408 * tree-ssa-sccvn.c (vuse_valueize): New.
5409 (vn_reference_lookup_pieces): Use it.
5410 (vn_reference_lookup): Likewise.
5412 2018-09-05 Nathan Sidwell <nathan@acm.org>
5415 * stor-layout.c (place_field): Scan forwards to check last
5416 bitfield when ms_bitfield_placement is in effect.
5418 2018-09-05 Richard Biener <rguenther@suse.de>
5421 * tree-vect-stmts.c (vectorizable_simd_clone_call): Fix bogus
5424 2018-09-05 Siddhesh Poyarekar <siddhesh@sourceware.org>
5425 Kugan Vivekanandarajah <kugan.vivekanandarajah@linaro.org>
5427 * config/aarch64/falkor-tag-collision-avoidance.c: New file.
5428 * config.gcc (extra_objs): Build it.
5429 * config/aarch64/t-aarch64 (falkor-tag-collision-avoidance.o):
5431 * config/aarch64/aarch64-passes.def
5432 (pass_tag_collision_avoidance): New pass.
5433 * config/aarch64/aarch64.c (qdf24xx_tunings): Add
5434 AARCH64_EXTRA_TUNE_RENAME_LOAD_REGS to tuning_flags.
5435 (aarch64_classify_address): Remove static qualifier.
5436 (aarch64_address_info, aarch64_address_type): Move to...
5437 * config/aarch64/aarch64-protos.h: ... here.
5438 (make_pass_tag_collision_avoidance): New function.
5439 * config/aarch64/aarch64-tuning-flags.def (rename_load_regs):
5442 2018-09-05 Martin Liska <mliska@suse.cz>
5444 * doc/gcov.texi: Update documentation of humar
5446 * gcov.c (format_count): Print one decimal place, it provides
5447 more fine number of situations like '1G' vs. '1.4G'.
5449 2018-09-05 Martin Liska <mliska@suse.cz>
5452 * config/rs6000/rs6000.opt: Mark the option as Deprecated.
5453 * optc-gen.awk: Allow 'Var' for Deprecated options in order
5454 to generate a MASK value.
5456 2018-09-04 H.J. Lu <hongjiu.lu@intel.com>
5459 * dwarf2out.c (based_loc_descr): Allow hard frame pointer even
5460 if frame pointer isn't used.
5461 (compute_frame_pointer_to_fb_displacement): Likewise.
5463 2018-09-04 Jakub Jelinek <jakub@redhat.com>
5466 * common/config/i386/i386-common.c (OPTION_MASK_ISA_XSAVEOPT_SET,
5467 OPTION_MASK_ISA_XSAVES_SET, OPTION_MASK_ISA_XSAVEC_SET): Use
5468 OPTION_MASK_ISA_XSAVE_SET instead of OPTION_MASK_ISA_XSAVE.
5469 (OPTION_MASK_ISA_XSAVE_UNSET): Add OPTION_MASK_ISA_XSAVES_UNSET
5470 and OPTION_MASK_ISA_XSAVEC_UNSET.
5472 2018-09-04 Max Filippov <jcmvbkbc@gmail.com>
5474 * config/xtensa/xtensa.c (xtensa_expand_atomic): Reorder AND and
5475 XOR operations in NAND case.
5477 2018-09-04 Aldy Hernandez <aldyh@redhat.com>
5479 * wide-int-range.cc (wide_int_range_convert): New.
5480 * wide-int-range.h (wide_int_range_convert): New.
5481 * tree-vrp.c (extract_range_from_unary_expr): Abstract wide int
5482 code into wide_int_range_convert.
5483 (extract_range_into_wide_ints): Do not munge anti range constants
5484 into the entire domain. Just return the range back.
5486 2018-09-04 Martin Liska <mliska@suse.cz>
5488 * genmatch.c (output_line_directive): Add new argument
5490 (dt_simplify::gen_1): Encapsulate dump within __builtin_expect.
5492 2018-09-04 Jonathan Wakely <jwakely@redhat.com>
5494 * doc/invoke.texi (Option Summary): Add whitespace.
5496 * doc/invoke.texi (Option Summary): Add -Waligned-new.
5498 2018-09-04 Richard Biener <rguenther@suse.de>
5500 PR tree-optimization/87211
5501 * tree-ssa-sccvn.c (visit_phi): When value-numbering to a
5502 backedge value we're supposed to treat as VARYING also number
5503 the PHI to VARYING in case it got a different value-number already.
5505 2018-09-04 Aldy Hernandez <aldyh@redhat.com>
5507 * tree-vrp.c (vrp_can_optimize_bit_op): Remove.
5508 (extract_range_from_binary_expr_1): Do not call
5509 vrp_can_optimize_bit_op.
5510 * wide-int-range.cc (wide_int_range_can_optimize_bit_op): Make
5512 (wide_int_range_get_mask_and_bounds): New.
5513 (wide_int_range_optimize_bit_op): New.
5514 (wide_int_range_bit_ior): Call wide_int_range_optimize_bit_op.
5515 (wide_int_range_bit_and): Same.
5516 * wide-int-range.h (wide_int_range_can_optimize_bit_op): Remove.
5517 (wide_int_range_optimize_bit_op): New.
5518 (wide_int_range_get_mask_and_bounds): New.
5520 2018-09-04 Richard Biener <rguenther@suse.de>
5522 PR tree-optimization/87176
5523 * tree-ssa-sccvn.c (visit_phi): Remove redundant allsame
5524 variable. When value-numbering a virtual PHI node make sure
5525 to not value-number to the backedge value.
5527 2018-09-04 Jonathan Wakely <jwakely@redhat.com>
5529 * doc/extend.texi (Long Long, Hex Floats): Document support for
5530 long long and hex floats in more recent versions of ISO C++.
5532 2018-09-03 Richard Biener <rguenther@suse.de>
5534 PR tree-optimization/87177
5535 * tree-ssa-sccvn.c (vuse_ssa_val): Revert previous change, keep
5538 2018-09-03 Alexander Monakov <amonakov@ispras.ru>
5540 * bb-reorder.c (edge_order): Convert to C-qsort-style
5541 tri-state comparator.
5542 (reorder_basic_blocks_simple): Change std::stable_sort to
5545 2018-09-03 Alexander Monakov <amonakov@ispras.ru>
5547 * tree-loop-distribution.c (offset_cmp): Convert to C-qsort-style
5548 tri-state comparator.
5549 (fuse_memset_builtins): Change std::stable_sort to gcc_stablesort.
5551 2018-09-03 Alexander Monakov <amonakov@ispras.ru>
5553 * sort.cc (struct sort_ctx): New field 'nlim'. Use it...
5554 (mergesort): ... here as maximum count for using netsort.
5555 (gcc_qsort): Set nlim to 3 if stable sort is requested.
5556 (gcc_stablesort): New.
5557 * system.h (gcc_stablesort): Declare.
5559 2018-09-03 Alexander Monakov <amonakov@ispras.ru>
5561 * sort.cc (gcc_qsort) [CHECKING_P]: Call qsort_chk.
5562 * system.h (qsort): Always redirect to gcc_qsort. Update comment.
5563 * vec.c (qsort_chk): Do not call gcc_qsort. Update comment.
5565 2018-09-03 Segher Boessenkool <segher@kernel.crashing.org>
5567 * config/rs6000/rs6000.md (*mov<mode>_hardfloat32): Remove %U from the
5568 lxsdx and stxsdx alternatives.
5569 (*mov<mode>_hardfloat64): Ditto.
5570 * config/rs6000/vsx.md (*vsx_extract_<mode>_store): Ditto.
5572 2018-09-03 Richard Biener <rguenther@suse.de>
5574 PR tree-optimization/87200
5575 * tree-ssa-sccvn.c (vn_nary_build_or_lookup_1): Valueize a
5578 2018-09-03 Martin Liska <mliska@suse.cz>
5580 PR tree-optimization/87201
5581 * tree-switch-conversion.c (switch_decision_tree::balance_case_nodes):
5582 Fix parenthesis in an expression.
5584 2018-09-03 Richard Biener <rguenther@suse.de>
5586 PR tree-optimization/87197
5587 * tree-ssa-sccvn.c (vn_nary_build_or_lookup_1): Mark the new def
5588 visited. CSE the VN_INFO hashtable lookup.
5590 PR tree-optimization/87169
5591 * tree-ssa-sccvn.c (do_rpo_vn): When marking loops for not
5592 iterating make sure there's no extra backedges from irreducible
5593 regions feeding the header. Mark the destination block
5596 2018-09-03 Martin Liska <mliska@suse.cz>
5599 * common/common-target.def: Add TARGET_GET_VALID_OPTION_VALUES.
5600 * common/common-targhooks.c (default_get_valid_option_values):
5602 * common/common-targhooks.h (default_get_valid_option_values):
5604 * common/config/i386/i386-common.c: Move processor_target_table
5606 (ix86_get_valid_option_values): New function.
5607 (TARGET_GET_VALID_OPTION_VALUES): New macro.
5608 * config/i386/i386.c (struct ptt): Move to i386-common.c.
5609 (PTA_*): Move all defined masks into i386-common.c.
5610 (ix86_function_specific_restore): Use new processor_cost_table.
5611 * config/i386/i386.h (struct ptt): Moved from i386.c.
5612 (struct pta): Likewise.
5613 * doc/tm.texi: Document new TARGET_GET_VALID_OPTION_VALUES.
5614 * doc/tm.texi.in: Likewise.
5615 * opt-suggestions.c (option_proposer::suggest_option):
5616 Pass prefix to build_option_suggestions.
5617 (option_proposer::get_completions): Likewise.
5618 (option_proposer::build_option_suggestions): Use the new target
5620 * opts.c (struct option_help_tuple): New struct.
5621 (print_filtered_help): Use the new target hook.
5623 2018-09-03 Martin Liska <mliska@suse.cz>
5626 * predict.c (set_even_probabilities): Add likely_edges
5627 argument and handle cases where we have precisely one
5629 (combine_predictions_for_bb): Catch also likely_edges.
5630 (tree_predict_by_opcode): Handle gswitch statements.
5631 * tree-cfg.h (find_case_label_for_value): New declaration.
5632 (find_taken_edge_switch_expr): Likewise.
5633 * tree-switch-conversion.c (switch_decision_tree::balance_case_nodes):
5634 Find pivot in decision tree based on probabily, not by number of
5637 2018-09-02 Gerald Pfeifer <gerald@pfeifer.com>
5639 * doc/standards.texi (Standards): Update Objective-C reference.
5641 2018-09-01 Gerald Pfeifer <gerald@pfeifer.com>
5643 * doc/install.texi (Prerequisites): Update link for MPC.
5645 2018-09-01 Michael Matz <matz@suse.de>
5647 PR tree-optimization/87074
5648 * gimple-loop-jam.c (unroll_jam_possible_p): Check loop exit
5649 PHIs for outer-loop uses.
5651 2018-09-01 Gerald Pfeifer <gerald@pfeifer.com>
5653 * doc/generic.texi (OpenMP): Adjust link to openmp.org.
5654 * doc/invoke.texi (C Dialect Options): Ditto.
5656 2018-09-01 Gerald Pfeifer <gerald@pfeifer.com>
5658 * doc/install.texi (Prerequisites): Adjust link mpfr.org.
5660 2018-08-31 Richard Biener <rguenther@suse.de>
5662 PR tree-optimization/87168
5663 * tree-ssa-sccvn.c (SSA_VAL): Add visited output parameter.
5664 (rpo_elim::eliminate_avail): When OP was not visited it must
5667 2018-08-31 David Malcolm <dmalcolm@redhat.com>
5669 * tree-vrp.c (copy_value_range): Convert param "from" from
5670 "value_range *" to "const value_range *".
5671 (range_is_null): Likewise for param "vr".
5672 (range_int_cst_p): Likewise.
5673 (range_int_cst_singleton_p): Likewise.
5674 (symbolic_range_p): Likewise.
5675 (value_ranges_intersect_p): Likewise for both params.
5676 (value_range_nonnegative_p): Likewise for param "vr".
5677 (value_range_constant_singleton): Likewise.
5678 (vrp_set_zero_nonzero_bits): Likewise for param "ar".
5679 (extract_range_into_wide_ints): Likewise for param "vr".
5680 (extract_range_from_multiplicative_op): Likewise for params "vr0"
5682 (vrp_can_optimize_bit_op): Likewise.
5683 (extract_range_from_binary_expr_1): Likewise for params "vr0_" and
5685 (extract_range_from_unary_expr): Likewise.
5686 (debug_value_range): Likewise for param "vr".
5687 (value_range::dump): Add "const" qualifier.
5688 (vrp_prop::check_array_ref): Convert local "vr" from
5689 "value_range *" to "const value_range *".
5690 (vrp_prop::check_mem_ref): Likewise.
5691 (vrp_prop::visit_stmt): Likewise for local "old_vr".
5692 (vrp_intersect_ranges_1): Likewise for param "vr_1".
5693 (vrp_intersect_ranges): Likewise.
5694 (simplify_stmt_for_jump_threading): Likewise for local "vr".
5695 (vrp_prop::vrp_finalize): Likewise.
5696 * tree-vrp.h (value_range::dump): Add "const" qualifier.
5697 (vrp_intersect_ranges): Add "const" qualifier to params as above.
5698 (extract_range_from_unary_expr): Likewise.
5699 (value_range_constant_singleton): Likewise.
5700 (symbolic_range_p): Likewise.
5701 (copy_value_range): Likewise.
5702 (extract_range_from_binary_expr_1): Likewise.
5703 (range_int_cst_p): Likewise.
5704 (vrp_set_zero_nonzero_bits): Likewise.
5705 (range_int_cst_singleton_p): Likewise.
5707 2018-08-31 Vlad Lazar <vlad.lazar@arm.com>
5709 * config/aarch64/arm_neon.h (vabsd_s64): New.
5710 (vnegd_s64): Likewise.
5712 2018-08-31 Martin Jambor <mjambor@suse.cz>
5714 * ipa-cp.c (estimate_local_effects): Replace wrong MAX with MIN.
5716 2018-08-31 Martin Liska <mliska@suse.cz>
5718 * ipa-icf.c (sem_item::add_type): Use
5719 sem_item::m_type_hash_cache.
5720 * ipa-icf.h: Move the cache from sem_item_optimizer
5723 2018-08-31 Nathan Sidwell <nathan@acm.org>
5725 * doc/extend.texi (Backwards Compatibility): Remove implicit
5726 extern C leeway of () being (...).
5728 2018-08-31 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
5730 * ipa-inline.c (can_inline_edge_by_limits_p): Fix typos in comment.
5732 2018-08-31 Segher Boessenkool <segher@kernel.crashing.org>
5736 * config/rs6000/rs6000.md (lround<mode>di2): Gate on TARGET_FPRND.
5738 2018-08-31 Jakub Jelinek <jakub@redhat.com>
5741 * expmed.c (expand_mult_const): Use immed_wide_int_const instead of
5742 gen_int_mode. Formatting fixes.
5744 2018-08-30 Sandra Loosemore <sandra@codesourcery.com>
5746 * target.def (custom_function_descriptors): Improve documentation.
5747 * doc/tm.texi.in (Trampolines): Expand discussion of function
5748 descriptors and move TARGET_CUSTOM_FUNCTION_DESCRIPTORS to the
5749 beginning of the section.
5750 * doc/tm.texi: Regenerated.
5752 2018-08-30 Jose E. Marchesi <jose.marchesi@oracle.com>
5754 * cfg.h (class auto_edge_flag): Spell out the template-id of the
5755 base class in the initializer list. This is a workaround for
5756 building with older GCC.
5757 (class auto_bb_flag): Likewise.
5759 2018-08-30 Aaron Sawdey <acsawdey@linux.ibm.com>
5761 * config/rs6000/altivec.md (altivec_eq<mode>): Remove star.
5762 (altivec_vcmpequ<VI_char>_p): Remove star.
5763 * config/rs6000/rs6000-string.c (do_load_for_compare): Support
5765 (expand_strncmp_vec_sequence): New function.
5766 (emit_final_str_compare_vec): New function.
5767 (expand_strn_compare): Add support for vector strncmp.
5768 * config/rs6000/rs6000.opt (-mstring-compare-inline-limit): Change
5769 length specification to bytes.
5770 * config/rs6000/vsx.md (vsx_ld_elemrev_v16qi_internal): Remove star.
5771 (vcmpnezb_p): New pattern.
5772 * doc/invoke.texi (RS/6000 and PowerPC Options): Update documentation
5773 for option -mstring-compare-inline-limit.
5775 2018-08-30 Thiago Macieira <thiago.macieira@intel.com>
5777 * config/i386/i386.c (PTA_WESTMERE): Remove PTA_AES.
5778 (PTA_SKYLAKE): Add PTA_AES.
5779 (PTA_GOLDMONT): Likewise.
5781 2018-08-29 Jan Hubicka <jh@suse.cz>
5784 * lto-opts.c (lto_write_options): Always stream PIC/PIE mode.
5785 * lto-wrapper.c (merge_and_complain): Fix merging of PIC/PIE.
5787 2018-08-29 Jan Hubicka <jh@suse.cz>
5789 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not follow
5791 (hash_tree): Do not visit TYPE_STUB_DECL.
5792 * tree-streamer-out.c (write_ts_type_common_tree_pointers): Do not
5793 stream TYPE_STUB_DECL.
5794 * tree-streamer-in.c (lto_input_ts_type_common_tree_pointers): Likewise.
5795 * ipa-utils.h (type_with_linkage_p): Do not rely on TYPE_STUB_DECL
5796 after free_lang_data.
5797 (type_in_anonymous_namespace_p): Likewise.
5799 2018-08-29 Jan Hubicka <jh@suse.cz>
5801 * sreal.h (SREAL_PART_BITS): Change to 31; remove seemingly unnecessary
5802 comment that it has to be even number.
5803 (class sreal): Change m_sig type to int32_t.
5804 * sreal.c (sreal::dump, sreal::to_int, opreator+, operator-): Use
5805 int64_t for temporary calculations.
5806 (sreal_verify_basics): Drop one bit from minimum and maximum.
5808 2018-08-30 Richard Biener <rguenther@suse.de>
5810 PR tree-optimization/87147
5811 * tree-ssa-sccvn.c (SSA_VISITED): New function.
5812 (visit_phi): When the degenerate result is from the backedge and
5813 we didn't visit its definition yet drop to VARYING.
5814 (do_rpo_vn): Properly mark blocks with incoming backedges as executable.
5816 2018-08-29 Jan Hubicka <jh@suse.cz>
5818 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not walk
5820 (hash_tree): Likewise.
5822 2018-08-29 Jan Hubicka <jh@suse.cz>
5824 * tree.c (find_decls_types_r): Walk also TYPE_NEXT_PTR_TO
5825 and TYPE_NEXT_REF_TO.
5827 2018-08-29 Jan Hubicka <jh@suse.cz>
5829 * sreal.h (SREAL_PART_BITS): Change to 31; remove seemingly unnecessary
5830 comment that it has to be even number.
5831 (class sreal): Change m_sig type to int32_t.
5832 * sreal.c (sreal::dump, sreal::to_int, opreator+, operator-): Use
5833 int64_t for temporary calculations.
5834 (sreal_verify_basics): Drop one bit from minimum and maximum.
5836 2018-08-30 Tamar Christina <tamar.christina@arm.com>
5838 * config/aarch64/aarch64.c (aarch64_expand_movmem): Set TImode max.
5840 2018-08-30 Vlad Lazar <vlad.lazar@arm.com>
5843 * expmed.c (canonicalize_comparison): Use wi::sub instead of wi::add
5844 if to_add is negative.
5846 2018-08-29 Bernd Edlinger <bernd.edlinger@hotmail.de>
5849 * builtins.c (c_strlen): Improve range checks.
5851 2018-08-29 Martin Sebor <msebor@redhat.com>
5852 Jeff Law <law@redhat.com>
5854 PR tree-optimization/86714
5855 PR tree-optimization/86711
5856 * builtins.c (c_strlen): Add arguments to call to string_constant.
5857 * expr.c (string_constant): Add argument. Detect missing nul
5858 terminator and outermost declaration it's missing in.
5859 * expr.h (string_constant): Add argument.
5860 * fold-const.c (read_from_constant_string): Add arguments to call to
5862 (c_getstr): Likewise.
5863 * tree-ssa-forwprop.c (simplify_builtin_call): Likewise.
5865 * tree-ssa-strlen.c (get_stridx): Likewise.
5867 2018-08-29 Jan Hubicka <jh@suse.cz>
5869 * tree-streamer-in.c (lto_input_ts_function_decl_tree_pointers):
5870 Do not stream DECL_VINDEX.
5871 * tree-streamer-out.c (write_ts_function_decl_tree_pointers): Likewise.
5872 * tree.c (free_lang_data_in_decl): Clear DECL_VINDEX.
5873 (decl_function_context): Use DECL_VIRTUAL_P rather than DECL_VINDEX.
5875 2018-08-29 Richard Biener <rguenther@suse.de>
5877 * tree-ssa-sccvn.c (vuse_ssa_val): Return NULL for unvisited
5878 virtual operands that are not default defs to honor region
5880 (rpo_vn_valueize): Remove ineffective code here.
5882 2018-08-29 Richard Biener <rguenther@suse.de>
5884 PR tree-optimization/87132
5885 * tree-ssa-alias.c (get_continuation_for_phi): Do not translate
5886 when skipping defs reachable over backedges.
5888 2018-08-29 Richard Biener <rguenther@suse.de>
5890 * tree-core.h: Document use of deprecated_flag in SSA_NAME.
5891 * tree.h (SSA_NAME_POINTS_TO_READONLY_MEMORY): Define.
5892 * tree-into-ssa.c (pass_build_ssa::execute): Initialize
5893 function parameters SSA_NAME_POINTS_TO_READONLY_MEMORY from fnspec.
5894 * tree-ssa-sccvn.c (const_parms, init_const_parms): Remove.
5895 (vn_reference_lookup_3): Remove use of const_parms.
5896 (free_rpo_vn): Do not free const_parms.
5897 (do_rpo_vn): Do not call init_const_parms.
5898 * tree-ssa-alias.c (refs_may_alias_p_1): Honor
5899 SSA_NAME_POINTS_TO_READONLY_MEMORY.
5900 (call_may_clobber_ref_p_1): Likewise.
5902 2018-08-29 Alexander Monakov <amonakov@ispras.ru>
5905 * invoke.texi (Optimization Options): List -ftree-scev-cprop.
5907 (-ftree-scev-cprop): Document.
5909 2018-08-29 Jan Hubicka <jh@suse.cz>
5911 * sreal.h (normalize, normalize_up, normalize_down): Add new_sig/new_exp
5913 (sreal constructor): Update.
5914 * sreal.c (sreal:operator+, sreal:operator-, sreal:operator*,
5915 sreal:operator/): Update.
5917 2018-08-29 Martin Liska <mliska@suse.cz>
5919 * tree-switch-conversion.c (switch_conversion::expand):
5920 Strenghten assumption about gswitch statements.
5922 2018-08-29 Richard Biener <rguenther@suse.de>
5924 PR tree-optimization/87117
5925 * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_stmt): Only
5926 re-value-number released SSA VDEFs.
5928 2018-08-29 Richard Biener <rguenther@suse.de>
5930 PR tree-optimization/87126
5931 * tree-ssa-sccvn.c (vn_reference_insert): Remove assert.
5933 2018-08-28 Jim Wilson <jimw@sifive.com>
5935 * config/riscv/pic.md: Rewrite.
5936 * config/riscv/riscv.c (riscv_address_insns): Return cost of 3 for
5938 * config/riscv/riscv.md (ZERO_EXTEND_LOAD): Delete.
5939 (SOFTF, default_load, softload, softstore): New.
5941 2018-08-28 Jeff Law <law@redhat.com>
5943 * fold-const.c (fold_binary_loc): Remove recently added assert.
5945 2018-08-28 Joern Rennecke <joern.rennecke@riscy-ip.com>
5947 * genpreds.c (write_predicate_subfunction): Also add ATTRIBUTE_UNUSED
5948 to OP parmeter of generated function.
5950 2018-08-28 MCC CS <deswurstes@users.noreply.github.com>
5952 PR tree-optimization/87009
5953 * match.pd: Add boolean optimizations.
5955 2018-08-28 Martin Sebor <msebor@redhat.com>
5958 * calls.c (alloc_max_size): Treat HOST_WIDE_INT special.
5959 * gimple-ssa-warn-alloca.c (adjusted_warn_limit): New function.
5960 (pass_walloca::gate): Use it.
5961 (alloca_call_type): Same.
5962 (pass_walloca::execute): Same.
5963 * stor-layout.c (layout_decl): Treat HOST_WIDE_INT special.
5965 2018-08-28 David Malcolm <dmalcolm@redhat.com>
5967 * dumpfile.h (ATTRIBUTE_GCC_DUMP_PRINTF): Change version check on
5968 GCC_VERSION for usage of "__gcc_dump_printf__" format from
5971 2018-08-28 Richard Biener <rguenther@suse.de>
5973 PR tree-optimization/87124
5974 * tree-ssa-sccvn.c (vn_lookup_simplify_result): Guard against
5975 constants before looking up avail.
5977 2018-08-28 Jakub Jelinek <jakub@redhat.com>
5980 * calls.c (maybe_warn_nonstring_arg): Punt early if
5981 warn_stringop_overflow is zero. Don't call get_range_strlen
5982 on 3rd argument, keep iterating until lenrng[1] is INTEGER_CST.
5983 Swap comparison operands to have constants on rhs. Only use
5984 lenrng[1] if non-NULL and INTEGER_CST. Don't uselessly
5985 increment lenrng[0].
5987 2018-08-28 Richard Sandiford <richard.sandiford@arm.com>
5989 * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Fix unguarded
5990 use of tree_to_shwi. Remove duplicated test for the size being
5991 a whole number of bytes.
5993 2018-08-28 Richard Biener <rguenther@suse.de>
5995 PR tree-optimization/87117
5996 * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_cleanup):
5997 Handle removed stmt without LHS (GIMPLE_NOP).
5999 2018-08-28 Richard Biener <rguenther@suse.de>
6001 PR tree-optimization/87117
6002 * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Exclude
6003 void which is is_gimple_reg_type by checking for COMPLETE_TYPE_P.
6005 2018-08-28 Richard Biener <rguenther@suse.de>
6007 PR tree-optimization/87117
6008 * tree-ssa-pre.c (compute_avail): Do not make expressions
6009 with predicated values available.
6010 (get_expr_value_id): Assert we do not run into predicated value
6013 2018-08-28 Richard Biener <rguenther@suse.de>
6015 PR tree-optimization/87117
6016 * tree-ssa-operands.c (add_stmt_operand): STRING_CST may
6017 get virtual operands.
6018 (get_expr_operands): Handle STRING_CST like other decls.
6020 2018-08-28 Martin Liska <mliska@suse.cz>
6022 * tree.h: Update documentation of fndecl_built_in_p
6026 2018-08-27 Jeff Law <law@redhat.com>
6027 PR tree-optimization/87110
6028 * tree-ssa-dse.c (compute_trims): Handle non-constant
6031 2018-08-27 Martin Sebor <msebor@redhat.com>
6033 PR tree-optimization/86914
6034 * tree-ssa-strlen.c (maybe_set_strlen_range): Avoid MEM_REF.
6036 2018-08-27 Martin Sebor <msebor@redhat.com>
6038 PR tree-optimization/87112
6039 * builtins.c (expand_builtin_strnlen): Convert c_strlen result to
6040 the type of the bound argument.
6042 2018-08-27 Jeff Law <law@redhat.com>
6044 * tree-ssa-dse.c (compute_trims): Handle case where the reference's
6045 type does not have a TYPE_SIZE_UNIT.
6047 2018-08-27 Steve Ellcey <sellcey@cavium.com>
6049 * config/aarch64/aarch64-speculation.cc: Replace include of cfg.h
6050 with include of backend.h.
6052 2018-08-27 Richard Biener <rguenther@suse.de>
6054 PR tree-optimization/86927
6055 * tree-vect-loop.c (vect_create_epilog_for_reduction): Properly
6056 use const cond reduction code.
6058 2018-08-27 Alexander Monakov <amonakov@ispras.ru>
6060 PR tree-optimization/85758
6061 * match.pd ((X & Y) ^ Y): Add :s qualifier to inner expression.
6063 2018-08-27 David Malcolm <dmalcolm@redhat.com>
6066 * diagnostic-show-locus.c (class layout_range): Update for
6067 conversion of show_caret_p to a tri-state.
6068 (layout_range::layout_range): Likewise.
6069 (make_range): Likewise.
6070 (layout::maybe_add_location_range): Likewise.
6071 (layout::should_print_annotation_line_p): Don't show annotation
6072 lines for ranges that are SHOW_LINES_WITHOUT_RANGE.
6073 (layout::get_state_at_point): Update for conversion of
6074 show_caret_p to a tri-state. Bail out early for
6075 SHOW_LINES_WITHOUT_RANGE, so that such ranges don't affect
6076 underlining or source colorization.
6077 (gcc_rich_location::add_location_if_nearby): Update for conversion
6078 of show_caret_p to a tri-state.
6079 (selftest::test_one_liner_multiple_carets_and_ranges): Likewise.
6080 (selftest::test_one_liner_fixit_replace_equal_secondary_range):
6082 (selftest::test_one_liner_labels): Likewise.
6083 * gcc-rich-location.c (gcc_rich_location::add_expr): Update for
6084 conversion of show_caret_p to a tri-state.
6085 * pretty-print.c (text_info::set_location): Likewise.
6086 * pretty-print.h (text_info::set_location): Likewise.
6087 * substring-locations.c (format_warning_n_va): Likewise.
6088 * tree-diagnostic.c (default_tree_printer): Likewise.
6089 * tree-pretty-print.c (newline_and_indent): Likewise.
6091 2018-08-27 David Malcolm <dmalcolm@redhat.com>
6094 * diagnostic-show-locus.c (get_line_span_for_fixit_hint): Show the
6095 line above for line-insertion fix-it hints.
6096 (selftest::test_fixit_insert_containing_newline): Update the
6097 expected results, and add a test with line-numbering enabled.
6099 2018-08-27 Martin Liska <mliska@suse.cz>
6102 * sanopt.c (sanitize_rewrite_addressable_params): Ignore
6103 params with DECL_HAS_VALUE_EXPR_P.
6105 2018-08-27 Martin Liska <mliska@suse.cz>
6107 * config/i386/i386.c (ix86_expand_set_or_movmem): Dump
6108 selected expansion strategy.
6110 2018-08-27 Martin Liska <mliska@suse.cz>
6112 * builtins.h (is_builtin_fn): Remove and fndecl_built_in_p.
6113 * builtins.c (is_builtin_fn): Likewise.
6114 * attribs.c (diag_attr_exclusions): Use new function
6115 fndecl_built_in_p and remove check for FUNCTION_DECL if
6117 (builtin_mathfn_code): Likewise.
6118 (fold_builtin_expect): Likewise.
6119 (fold_call_expr): Likewise.
6120 (fold_builtin_call_array): Likewise.
6121 (fold_call_stmt): Likewise.
6122 (set_builtin_user_assembler_name): Likewise.
6123 (is_simple_builtin): Likewise.
6124 * calls.c (gimple_alloca_call_p): Likewise.
6125 (maybe_warn_nonstring_arg): Likewise.
6126 * cfgexpand.c (expand_call_stmt): Likewise.
6127 * cgraph.c (cgraph_update_edges_for_call_stmt_node): Likewise.
6128 (cgraph_edge::verify_corresponds_to_fndecl): Likewise.
6129 (cgraph_node::verify_node): Likewise.
6130 * cgraphclones.c (build_function_decl_skip_args): Likewise.
6131 (cgraph_node::create_clone): Likewise.
6132 * config/arm/arm.c (arm_insert_attributes): Likewise.
6133 * config/i386/i386.c (ix86_gimple_fold_builtin): Likewise.
6134 * dse.c (scan_insn): Likewise.
6135 * expr.c (expand_expr_real_1): Likewise.
6136 * fold-const.c (operand_equal_p): Likewise.
6137 (fold_binary_loc): Likewise.
6138 * gimple-fold.c (gimple_fold_stmt_to_constant_1): Likewise.
6139 * gimple-low.c (lower_stmt): Likewise.
6140 * gimple-pretty-print.c (dump_gimple_call): Likewise.
6141 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call):
6143 * gimple.c (gimple_build_call_from_tree): Likewise.
6144 (gimple_call_builtin_p): Likewise.
6145 (gimple_call_combined_fn): Likewise.
6146 * gimplify.c (gimplify_call_expr): Likewise.
6147 (gimple_boolify): Likewise.
6148 (gimplify_modify_expr): Likewise.
6149 (gimplify_addr_expr): Likewise.
6150 * hsa-gen.c (gen_hsa_insns_for_call): Likewise.
6151 * ipa-cp.c (determine_versionability): Likewise.
6152 * ipa-fnsummary.c (compute_fn_summary): Likewise.
6153 * ipa-param-manipulation.c (ipa_modify_formal_parameters): Likewise.
6154 * ipa-split.c (visit_bb): Likewise.
6155 (split_function): Likewise.
6156 * ipa-visibility.c (cgraph_externally_visible_p): Likewise.
6157 * lto-cgraph.c (input_node): Likewise.
6158 * lto-streamer-out.c (write_symbol): Likewise.
6159 * omp-low.c (setjmp_or_longjmp_p): Likewise.
6160 (lower_omp_1): Likewise.
6161 * predict.c (strip_predict_hints): Likewise.
6162 * print-tree.c (print_node): Likewise.
6163 * symtab.c (symtab_node::output_to_lto_symbol_table_p): Likewise.
6164 * trans-mem.c (is_tm_irrevocable): Likewise.
6165 (is_tm_load): Likewise.
6166 (is_tm_simple_load): Likewise.
6167 (is_tm_store): Likewise.
6168 (is_tm_simple_store): Likewise.
6169 (is_tm_abort): Likewise.
6170 (tm_region_init_1): Likewise.
6171 * tree-call-cdce.c (gen_shrink_wrap_conditions): Likewise.
6172 * tree-cfg.c (verify_gimple_call): Likewise.
6173 (move_stmt_r): Likewise.
6174 (stmt_can_terminate_bb_p): Likewise.
6175 * tree-eh.c (lower_eh_constructs_2): Likewise.
6176 * tree-if-conv.c (if_convertible_stmt_p): Likewise.
6177 * tree-inline.c (remap_gimple_stmt): Likewise.
6178 (copy_bb): Likewise.
6179 (estimate_num_insns): Likewise.
6180 (fold_marked_statements): Likewise.
6181 * tree-sra.c (scan_function): Likewise.
6182 * tree-ssa-ccp.c (surely_varying_stmt_p): Likewise.
6183 (optimize_stack_restore): Likewise.
6184 (pass_fold_builtins::execute): Likewise.
6185 * tree-ssa-dce.c (mark_stmt_if_obviously_necessary): Likewise.
6186 (mark_all_reaching_defs_necessary_1): Likewise.
6187 * tree-ssa-dom.c (dom_opt_dom_walker::optimize_stmt): Likewise.
6188 * tree-ssa-forwprop.c (simplify_builtin_call): Likewise.
6189 (pass_forwprop::execute): Likewise.
6190 * tree-ssa-loop-im.c (stmt_cost): Likewise.
6191 * tree-ssa-math-opts.c (pass_cse_reciprocals::execute): Likewise.
6192 * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Likewise.
6193 * tree-ssa-strlen.c (get_string_length): Likewise.
6194 * tree-ssa-structalias.c (handle_lhs_call): Likewise.
6195 (find_func_aliases_for_call): Likewise.
6196 * tree-ssa-ter.c (find_replaceable_in_bb): Likewise.
6197 * tree-stdarg.c (optimize_va_list_gpr_fpr_size): Likewise.
6198 * tree-tailcall.c (find_tail_calls): Likewise.
6199 * tree.c (need_assembler_name_p): Likewise.
6200 (free_lang_data_in_decl): Likewise.
6201 (get_call_combined_fn): Likewise.
6202 * ubsan.c (is_ubsan_builtin_p): Likewise.
6203 * varasm.c (incorporeal_function_p): Likewise.
6204 * tree.h (DECL_BUILT_IN): Remove and replace with
6206 (DECL_BUILT_IN_P): Transfort to fndecl_built_in_p.
6207 (fndecl_built_in_p): New.
6209 2018-08-27 Martin Liska <mliska@suse.cz>
6211 PR tree-optimization/86847
6212 * tree-switch-conversion.c (switch_decision_tree::dump_case_nodes):
6213 Dump also subtree probability.
6214 (switch_decision_tree::do_jump_if_equal): New function.
6215 (switch_decision_tree::emit_case_nodes): Handle special
6216 situations in balanced tree that can be emitted much simpler.
6217 Fix calculation of probabilities that happen in tree expansion.
6218 * tree-switch-conversion.h (struct cluster): Add
6220 (struct simple_cluster): Likewise.
6221 (struct case_tree_node): Add new function has_child.
6222 (do_jump_if_equal): New.
6224 2018-08-27 Martin Liska <mliska@suse.cz>
6226 * tree-switch-conversion.c (bit_test_cluster::find_bit_tests):
6227 Add new argument to bit_test_cluster constructor.
6228 (bit_test_cluster::emit): Set bits really number of values
6230 (bit_test_cluster::hoist_edge_and_branch_if_true): Add
6231 probability argument.
6232 * tree-switch-conversion.h (struct bit_test_cluster):
6233 Add m_handles_entire_switch.
6235 2018-08-27 Martin Liska <mliska@suse.cz>
6237 PR tree-optimization/86702
6238 * tree-switch-conversion.c (jump_table_cluster::emit):
6239 Make probabilities even for values in jump table
6240 according to number of cases handled.
6241 (switch_decision_tree::compute_cases_per_edge): Pass
6242 argument to reset_out_edges_aux function.
6243 (switch_decision_tree::analyze_switch_statement): Likewise.
6244 * tree-switch-conversion.h (switch_decision_tree::reset_out_edges_aux):
6247 2018-08-27 Martin Liska <mliska@suse.cz>
6249 * cfgexpand.c (expand_asm_stmt): Use label_to_block and pass
6250 cfun argument explicitly.
6251 * gimple-pretty-print.c (dump_gimple_switch): Likewise.
6252 * hsa-gen.c (gen_hsa_insns_for_switch_stmt): Use new
6253 function gimple_switch_default_bb.
6254 (convert_switch_statements):
6256 * ipa-fnsummary.c (set_switch_stmt_execution_predicate):
6257 * stmt.c (label_to_block_fn): Use label_to_block and pass
6258 cfun argument explicitly and use gimple_switch_label_bb.
6259 (expand_case): Likewise.
6260 * tree-cfg.c (lower_phi_internal_fn): Use label_to_block and pass
6261 cfun argument explicitly. Likewise.
6262 (make_edges_bb): Likewise.
6263 (make_cond_expr_edges): Likewise.
6264 (get_cases_for_edge): Likewise.
6265 (make_gimple_switch_edges): Likewise.
6266 (label_to_block_fn): Likewise.
6267 (label_to_block): Likewise.
6268 (make_goto_expr_edges): Likewise.
6269 (make_gimple_asm_edges): Likewise.
6270 (main_block_label): Likewise.
6271 (group_case_labels_stmt): Likewise.
6272 (find_taken_edge_computed_goto): Likewise.
6273 (find_taken_edge_switch_expr): Likewise.
6274 (gimple_verify_flow_info): Likewise.
6275 (gimple_redirect_edge_and_branch): Likewise.
6276 (gimple_switch_label_bb): New function.
6277 (gimple_switch_default_bb): Likewise.
6278 (gimple_switch_edge): Likewise.
6279 (gimple_switch_default_edge): Likewise.
6280 * tree-cfg.h (label_to_block_fn): Remove and replace ...
6281 (label_to_block): ... with this.
6282 (gimple_switch_label_bb): New.
6283 (gimple_switch_default_bb): Likewise.
6284 (gimple_switch_edge): Likewise.
6285 (gimple_switch_default_edge): Likewise.
6286 * tree-cfgcleanup.c (convert_single_case_switch): Use
6287 new gimple functions and pass new argument to label_to_block.
6288 (cleanup_control_flow_bb):
6289 * tree-eh.c (make_eh_dispatch_edges): Use label_to_block and pass
6290 cfun argument explicitly.
6291 (make_eh_edges): Likewise.
6292 (redirect_eh_dispatch_edge): Likewise.
6293 (lower_resx): Likewise.
6294 (lower_eh_dispatch): Likewise.
6295 (maybe_remove_unreachable_handlers): Likewise.
6296 (unsplit_eh): Likewise.
6297 (cleanup_empty_eh): Likewise.
6298 (verify_eh_edges): Likewise.
6299 (verify_eh_dispatch_edge): Likewise.
6300 * tree-ssa-dom.c (record_edge_info): Likewise.
6301 * tree-ssa-forwprop.c (simplify_gimple_switch_label_vec): Likewise.
6302 * tree-ssa-threadedge.c (thread_around_empty_blocks): Likewise.
6303 (thread_through_normal_block): Likewise.
6304 * tree-ssa-uncprop.c (associate_equivalences_with_edges): Likewise.
6305 * tree-ssa-uninit.c (convert_control_dep_chain_into_preds):
6306 * tree-switch-conversion.c (switch_conversion::collect): Use new
6308 (switch_conversion::check_final_bb): Likewise.
6309 (switch_conversion::gather_default_values): Pass new argument
6311 (switch_conversion::build_constructors): Likewise.
6312 (switch_decision_tree::compute_cases_per_edge): Use new
6313 gimple_switch_edge function.
6314 (switch_decision_tree::analyze_switch_statement): Pass new argument
6316 (switch_decision_tree::try_switch_expansion): Use
6317 gimple_switch_default_edge.
6318 * tree-vrp.c (find_switch_asserts): Pass new argument
6320 * vr-values.c (vr_values::vrp_visit_switch_stmt): Likewise.
6321 (vr_values::simplify_switch_using_ranges): Likewise.
6323 2018-08-27 Richard Biener <rguenther@suse.de>
6325 * cfganal.h (rev_post_order_and_mark_dfs_back_seme): Declare.
6326 * cfganal.c (rev_post_order_and_mark_dfs_back_seme): New function.
6328 * tree-ssa-sccvn.h (struct vn_pval): New structure.
6329 (struct vn_nary_op_s): Add unwind_to member. Add
6330 predicated_values flag and put result into a union together
6331 with a linked list of vn_pval.
6332 (struct vn_ssa_aux): Add name member to make maintaining
6333 a map of SSA name to vn_ssa_aux possible. Remove no longer
6334 needed info, dfsnum, low, visited, on_sccstack, use_processed
6335 and range_info_anti_range_p members.
6336 (run_scc_vn, vn_eliminate, free_scc_vn, vn_valueize): Remove.
6337 (do_rpo_vn, run_rpo_vn, eliminate_with_rpo_vn, free_rpo_vn):
6339 (vn_valueize): New global.
6340 (vn_context_bb): Likewise.
6341 (VN_INFO_RANGE_INFO, VN_INFO_ANTI_RANGE_P, VN_INFO_RANGE_TYPE,
6342 VN_INFO_PTR_INFO): Remove.
6343 * tree-ssa-sccvn.c: ... (rewrite)
6344 (pass_fre::execute): For -O2+ initialize loops and run
6345 RPO VN in optimistic mode (iterating). For -O1 and -Og
6346 run RPO VN in non-optimistic mode.
6347 * params.def (PARAM_SCCVN_MAX_SCC_SIZE): Remove.
6348 (PARAM_RPO_VN_MAX_LOOP_DEPTH): Add.
6349 * doc/invoke.texi (sccvn-max-scc-size): Remove.
6350 (rpo-vn-max-loop-depth): Document.
6351 * tree-ssa-alias.c (walk_non_aliased_vuses): Stop walking
6352 when valuezing the VUSE signals we walked out of the region.
6353 * tree-ssa-pre.c (phi_translate_1): Ignore predicated values.
6354 (phi_translate): Set VN context block to use for availability
6356 (compute_avail): Likewise.
6357 (pre_valueize): New function.
6358 (pass_pre::execute): Adjust to the RPO VN API.
6360 * tree-ssa-loop-ivcanon.c: Include tree-ssa-sccvn.h.
6361 (propagate_constants_for_unrolling): Remove.
6362 (tree_unroll_loops_completely): Perform value-numbering
6363 on the unrolled bodies loop parent.
6365 2018-08-27 Richard Biener <rguenther@suse.de>
6367 * tree-ssa-pre.c (compute_antic): Re-use inverted postorder
6368 for partial antic compute.
6370 2018-08-27 Jakub Jelinek <jakub@redhat.com>
6372 PR rtl-optimization/87065
6373 * combine.c (simplify_if_then_else): Formatting fix.
6374 (if_then_else_cond): Guard MULT optimization with SCALAR_INT_MODE_P
6376 (known_cond): Don't return const_true_rtx for vector modes. Use
6377 CONST0_RTX instead of const0_rtx. Formatting fixes.
6379 2018-08-27 Martin Liska <mliska@suse.cz>
6381 PR gcov-profile/87069
6382 * gcov.c (process_file): Record files already processed
6383 and warn about a file being processed multiple times.
6385 2018-08-27 Martin Liska <mliska@suse.cz>
6388 * config/aarch64/aarch64.c (aarch64_override_options_internal):
6389 Set default values for x_aarch64_*_string strings.
6390 * config/aarch64/aarch64.opt: Remove --{march,mcpu,mtune}==
6391 prefix. For -mabi do not print '=ABI' in help and use
6392 <option_value> format for -msve-vector-bits and -moverride
6395 2018-08-26 Jeff Law <law@redhat.com>
6397 * config/mips/frame-header-opt.c: Include "backend.h" rather than
6400 2018-08-26 Marek Polacek <polacek@redhat.com>
6402 PR c++/87029, Implement -Wredundant-move.
6403 * doc/invoke.texi: Document -Wredundant-move.
6405 2018-08-25 Martin Sebor <msebor@redhat.com>
6407 PR tree-optimization/87059
6408 * builtins.c (expand_builtin_strncmp): Convert MIN_EXPR operand
6409 to the same type as the other.
6410 * fold-const.c (fold_binary_loc): Assert expectation.
6412 2018-08-25 Iain Sandoe <iain@sandoe.co.uk>
6414 * config/darwin.c (machopic_legitimize_pic_address): Clean up
6415 extraneous parentheses, dead code section and formatting.
6417 2018-08-24 David Malcolm <dmalcolm@redhat.com>
6420 * diagnostic-show-locus.c (layout::layout): Ensure the margin is
6421 wide enough for jumps in the line-numbering to be visible.
6422 (layout::print_gap_in_line_numbering): New member function.
6423 (layout::calculate_line_spans): When using line numbering, merge
6424 line spans that are only 1 line apart.
6425 (diagnostic_show_locus): When printing line numbers, show gaps in
6426 line numbering directly, rather than printing headers.
6427 (selftest::test_diagnostic_show_locus_fixit_lines): Add test of
6428 line-numbering with multiple line spans.
6429 (selftest::test_fixit_insert_containing_newline_2): Add test of
6430 line-numbering, in which the spans are close enough to be merged.
6432 2018-08-24 Aldy Hernandez <aldyh@redhat.com>
6434 * gimple-ssa-evrp-analyze.c (set_ssa_range_info): Pass value_range
6435 to range_includes_zero_p. Do not special case VR_ANTI_RANGE.
6436 * tree-vrp.c (range_is_nonnull): Remove.
6437 (range_includes_zero_p): Accept value_range instead of min/max.
6438 (extract_range_from_binary_expr_1): Do not early bail on
6440 Use range_includes_zero_p instead of range_is_nonnull.
6441 (extract_range_from_unary_expr): Use range_includes_zero_p instead
6442 of range_is_nonnull.
6443 (vrp_meet_1): Pass value_range to range_includes_zero_p. Do not
6444 special case VR_ANTI_RANGE.
6445 (vrp_finalize): Same.
6446 * tree-vrp.h (range_includes_zero_p): Pass value_range as argument
6448 (range_is_nonnull): Remove.
6449 * vr-values.c (vrp_stmt_computes_nonzero): Use
6450 range_includes_zero_p instead of range_is_nonnull.
6451 (extract_range_basic): Pass value_range to range_includes_zero_p
6452 instead of range_is_nonnull.
6454 2018-08-24 Uros Bizjak <ubizjak@gmail.com>
6456 * emit-rtl.c (init_emit_once): Do not emit MODE_POINTER_BOUNDS RTXes.
6457 * emit-rtl.h (rtl_data): Remove return_bnd.
6458 * explow.c (trunc_int_for_mode): Do not handle POINTER_BOUNDS_MODE_P.
6459 * function.c (diddle_return_value): Do not handle crtl->return_bnd.
6460 * genmodes.c (complete_mode): Do not handle MODE_POINTER_BOUNDS.
6461 (POINTER_BOUNDS_MODE): Remove definition.
6462 (make_pointer_bounds_mode): Remove.
6463 (get_mode_class): Do not handle MODE_POINTER_BOUNDS.
6464 * machmode.h (POINTER_BOUNDS_MODE_P): Remove definition.
6465 (scalare_mode::includes_p): Do not handle MODE_POINTER_BOUNDS.
6466 * mode-classes.def: Do not define MODE_POINTER_BOUNDS.
6467 * stor-layout.c (int_mode_for_mode): Do not handle MODE_POINTER_BOUNDS.
6468 * tree-core.h (enum tree_index): Remove TI_POINTER_BOUNDS_TYPE.
6469 * varasm.c (output_constant_pool_2): Do not handle MODE_POINTER_BOUNDS.
6471 * config/i386/i386-modes.def (BND32, BND64): Remove.
6472 * config/i386/i386.c (dbx_register_map): Remove bound registers.
6473 (dbx64_register_map): Ditto.
6474 (svr4_dbx_register_map): Ditto.
6475 (indirect_thunk_bnd_needed): Remove.
6476 (indirect_thunks_bnd_used): Ditto.
6477 (indirect_return_bnd_needed): Ditto.
6478 (indirect_return_via_cx_bnd): Ditto.
6479 (enum indirect_thunk_prefix): Remove indirect_thunk_prefix_bnd.
6480 (indirect_thunk_name): Remove handling of indirect_thunk_prefix_bnd.
6481 (output_indirect_thunk): Ditto. Remove need_prefix argument.
6482 (output_indirect_thunk_function): Remove handling of
6483 indirect_return_bnd_needed, indirect_return_via_cx_bnd,
6484 indirect_thunk_bnd_needed and indirect_thunks_bnd_used variables.
6485 (ix86_save_reg): Remove handling of crtl->return_bnd.
6486 (ix86_legitimate_constant_p): Remove handling of POINTER_BOUNDS_MODE_P.
6487 (ix86_print_operand_address_as): Remove handling of UNSPEC_BNDMK_ADDR
6488 and UNSPEC_BNDLX_ADDR.
6489 (ix86_output_indirect_branch_via_reg): Remove handling of
6490 indirect_thunk_prefix_bnd.
6491 (ix86_output_indirect_branch_via_push): Ditto.
6492 (ix86_output_function_return): Ditto.
6493 (ix86_output_indirect_function_return): Ditto.
6494 (avoid_func_arg_motion): Do not handle UNSPEC_BNDSTX.
6495 * config/i386/i386.h (FIXED_REGISTERS): Remove bound registers.
6496 (CALL_USED_REGISTERS): Ditto.
6497 (REG_ALLOC_ORDER): Update for removal of bound registers.
6498 (HI_REGISTER_NAMES): Ditto.
6499 * config/i386/i386.md (UNSPEC_BNDMK, UNSPEC_BNDMK_ADDR, UNSPEC_BNDSTX)
6500 (UNSPEC_BNDLDX, UNSPEC_BNDLDX_ADDR, UNSPEC_BNDCL, UNSPEC_BNDCU)
6501 (UNSPEC_BNDCN, UNSPEC_MPX_FENCE): Remove.
6502 (BND0_REG, BND1_REG, BND2_REG, BND3_REG): Remove
6503 (FIRST_PSEUDO_REG): Update.
6504 (BND): Remove mode iterator.
6505 * config/i386/predicates.md (bnd_mem_operator): Remove.
6507 2018-08-24 Richard Sandiford <richard.sandiford@arm.com>
6509 * tree-vect-stmts.c (vectorizable_bswap): Handle variable-length
6512 2018-08-24 Richard Sandiford <richard.sandiford@arm.com>
6514 * tree-vect-slp.c (vect_transform_slp_perm_load): Separate out
6515 the case in which the permute needs only a single element and
6516 repeats for every vector of the result. Extend that case to
6517 handle variable-length vectors.
6518 * tree-vect-stmts.c (vectorizable_load): Update accordingly.
6520 2018-08-24 H.J. Lu <hongjiu.lu@intel.com>
6523 * dwarf2out.c (save_macinfo_strings): Call set_indirect_string
6524 on DW_MACINFO_start_file for -gsplit-dwarf -g3.
6526 2018-08-24 Richard Biener <rguenther@suse.de>
6528 * cfg.h (struct control_flow_graph): Add edge_flags_allocated and
6529 bb_flags_allocated members.
6530 (auto_flag): New RAII class for allocating flags.
6531 (auto_edge_flag): New RAII class for allocating edge flags.
6532 (auto_bb_flag): New RAII class for allocating bb flags.
6533 * cfgloop.c (verify_loop_structure): Allocate temporary edge
6535 * cfganal.c (dfs_enumerate_from): Remove use of visited sbitmap
6536 in favor of temporarily allocated BB flag.
6537 * hsa-brig.c: Re-order includes.
6538 * hsa-dump.c: Likewise.
6539 * hsa-regalloc.c: Likewise.
6540 * print-rtl.c: Likewise.
6541 * profile-count.c: Likewise.
6543 2018-08-24 Segher Boessenkool <segher@kernel.crashing.org>
6546 * config/rs6000/rs6000.c (toc_relative_expr_p): Check that the base is
6549 2018-08-24 Aldy Hernandez <aldyh@redhat.com>
6552 * wide-int-range.cc (wide_int_range_div): Do not ignore result
6553 from wide_int_range_multiplicative_op.
6555 2018-08-23 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
6557 * tree-vect-data-refs.c (vect_grouped_store_supported): Fix typo
6560 2018-08-23 Giuliano Belinassi <giuliano.belinassi@usp.br>
6562 * genmatch.c (parser::parse_operation): Fix typo 'exapnded'
6565 2018-08-23 Alexander Monakov <amonakov@ispras.ru>
6567 * tree-scalar-evolution.c (final_value_replacement_loop): Dump
6568 full GENERIC expression used for replacement.
6570 2018-08-23 Aldy Hernandez <aldyh@redhat.com>
6572 * tree-vrp.c (abs_extent_range): Remove.
6573 (extract_range_into_wide_ints): Pass wide ints by reference.
6574 (extract_range_from_binary_expr_1): Rewrite the *DIV_EXPR code.
6575 Pass wide ints by reference in all calls to
6576 extract_range_into_wide_ints.
6577 * wide-int-range.cc (wide_int_range_div): New.
6578 * wide-int-range.h (wide_int_range_div): New.
6579 (wide_int_range_includes_zero_p): New.
6580 (wide_int_range_zero_p): New.
6582 2018-08-23 Matthew Malcomson <matthew.malcomson@arm.com>
6584 * config/aarch64/aarch64.md (arches): New enum.
6585 (arch): New enum attr.
6586 (arch_enabled): New attr.
6587 (enabled): Now uses arch_enabled only.
6588 (simd, sve, fp16): Removed attribute.
6589 (fp): Attr now defined in terms of 'arch'.
6590 (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64, *movti_aarch64,
6591 *movhf_aarch64, <optab><fcvt_target><GPF:mode>2,
6592 <FCVT_F2FIXED:fcvt_fixed_insn><GPF:mode>3,
6593 <FCVT_FIXED2F:fcvt_fixed_insn><GPI:mode>3): Merge 'fp' and 'simd'
6594 attributes into 'arch'.
6595 (*movsf_aarch64, *movdf_aarch64, *movtf_aarch64, *add<mode>3_aarch64,
6596 subdi3, neg<mode>2, <optab><mode>3, one_cmpl<mode>2,
6597 *<NLOGICAL:optab>_one_cmpl<mode>3, *xor_one_cmpl<mode>3,
6598 *aarch64_ashl_sisd_or_int_<mode>3, *aarch64_lshr_sisd_or_int_<mode>3,
6599 *aarch64_ashr_sisd_or_int_<mode>3, *aarch64_sisd_ushl): Convert use of
6600 'simd' attribute into 'arch'.
6601 (load_pair_sw_<SX:mode><SX2:mode>, load_pair_dw_<DX:mode><DX2:mode>,
6602 store_pair_sw_<SX:mode><SX2:mode>, store_pair_dw_<DX:mode><DX2:mode>):
6603 Convert use of 'fp' attribute to 'arch'.
6604 * config/aarch64/aarch64-simd.md (move_lo_quad_internal_<mode>,
6605 move_lo_quad_internal_<mode>): (different modes) Merge 'fp' and 'simd'
6607 (move_lo_quad_internal_be_<mode>, move_lo_quad_internal_be_<mode>):
6608 (different modes) Merge 'fp' and 'simd' into 'arch'.
6609 (*aarch64_combinez<mode>, *aarch64_combinez_be<mode>): Merge 'fp' and
6612 2018-08-23 Segher Boessenkool <segher@kernel.crashing.org>
6614 PR rtl-optimization/87026
6615 * expmed.c (canonicalize_comparison): If we can no longer create
6616 pseudoregisters, don't.
6618 2018-08-23 Richard Earnshaw <rearnsha@arm.com>
6621 * config/arm/arm-protos.h (arm_emit_speculation_barrier): New
6623 * config/arm/arm.c (speculation_barrier_libfunc): New static
6625 (arm_init_libfuncs): Initialize it.
6626 (arm_emit_speculation_barrier): New function.
6627 * config/arm/arm.md (speculation_barrier): Call
6628 arm_emit_speculation_barrier for architectures that do not have
6630 (speculation_barrier_insn): Only match on Armv7 or later.
6632 2018-08-23 Richard Biener <rguenther@suse.de>
6635 * tree-inline.c (copy_bb): Drop unused __builtin_va_arg_pack_len
6638 2018-08-23 Richard Sandiford <richard.sandiford@arm.com>
6640 * config/aarch64/aarch64.c (aarch64_evpc_sve_tbl): Fix handling
6641 of single-vector TBLs.
6642 (aarch64_vectorize_vec_perm_const): Set one_vector_p when only
6645 2018-08-23 Richard Sandiford <richard.sandiford@arm.com>
6648 * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const_1): Fix
6649 aarch64_evpc_tbl guard.
6651 2018-08-22 Bernd Edlinger <bernd.edlinger@hotmail.de>
6653 * tree-ssa-dse.c (compute_trims): Avoid folding away undefined
6656 2018-08-22 Martin Sebor <msebor@redhat.com>
6659 * tree-pretty-print.c (pretty_print_string): Add argument.
6660 (dump_generic_node): Call to pretty_print_string with string size.
6662 2018-08-22 Segher Boessenkool <segher@kernel.crashing.org>
6664 PR rtl-optimization/86771
6665 * combine.c (try_combine): Do not allow splitting a resulting PARALLEL
6666 of two SETs into those two SETs, one to be placed at i2, if that SETs
6667 destination is modified between i2 and i3.
6669 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
6671 PR tree-optimization/86725
6672 * tree-vect-loop.c (vect_inner_phi_in_double_reduction_p): New
6674 (vect_analyze_scalar_cycles_1): Check it.
6676 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
6678 PR tree-optimization/86725
6679 * tree-vect-loop.c (vect_is_simple_reduction): When treating
6680 an outer loop phi as a double reduction, make sure that the
6681 single user of the phi result is an inner loop phi.
6683 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
6685 * tree-vect-data-refs.c (vect_analyze_group_access_1): Convert
6686 grouped stores with gaps to a strided group.
6688 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
6690 * tree-vect-stmts.c (get_group_load_store_type)
6691 (get_load_store_type): Only test STMT_VINFO_STRIDED_P for the
6692 first statement in a group.
6694 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
6696 * config/darwin.h (LINK_COMMAND_SPEC_A): Sync LTO options with
6697 the sequence used in gcc/gcc.c.
6699 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
6702 * gcc-ar.c (main): Don’t try to invoke the plug-in if we’re not
6705 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
6707 * config/darwin10.h (LINK_GCC_C_SEQUENCE_SPEC): Adjust to use the
6708 Darwin10-specific unwinder-shim.
6709 * config/darwin12.h (LINK_GCC_C_SEQUENCE_SPEC): Remove.
6710 * config/rs6000/darwin.h (DARWIN_CRT1_SPEC, DARWIN_DYLIB1_SPEC):
6711 New to cater for Darwin10 Rosetta.
6713 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
6715 * config/i386/i386.c (ix86_output_addr_diff_elt): Move the MACH-O
6716 specific test before the one for HAVE_AS_GOTOFF_IN_DATA.
6718 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
6723 * gcc/dwarf2out.c (FUNC_SECOND_SECT_LABEL): New.
6724 (dwarf2out_switch_text_section): Generate a local label for the
6725 second function sub-section and apply it as the second FDE start
6727 * gcc/final.c (final_scan_insn_1): Emit second FDE label after the
6728 second sub-section start.
6730 2018-08-22 Richard Biener <rguenther@suse.de>
6732 PR tree-optimization/86988
6733 * tree-vrp.c (vrp_prop::check_mem_ref): Bail out on VLAs.
6735 2018-08-22 Richard Biener <rguenther@suse.de>
6737 PR tree-optimization/86945
6738 * tree-cfg.c (generate_range_test): Use unsigned arithmetic.
6740 2018-08-22 Alexandre Oliva <oliva@adacore.com>
6742 * config/rs6000/rs6000.c (SMALL_DATA_RELOC, SMALL_DATA_REG): Add
6743 a comment about how uses of r2 for .sdata2 come about.
6745 2018-08-22 Alexandre Oliva <aoliva@redhat.com>
6747 * tree-ssa-reassoc.c (is_reassociable_op): Fix cut&pasto.
6749 2018-08-21 Marek Polacek <polacek@redhat.com>
6751 PR c++/86981, Implement -Wpessimizing-move.
6752 * doc/invoke.texi: Document -Wpessimizing-move.
6754 2018-08-21 Jan Hubicka <jh@suse.cz>
6756 * tree.c (find_decls_types_r): Do not check for redundant typedefs.
6757 * tree.h (is_redundant_typedef): Remove.
6758 * dwarf2out.c (is_redundant_typedef): Turn into static function.
6760 2018-08-21 Jan Hubicka <jh@suse.cz>
6762 * tree.c (free_lang_data_in_decl): Remove types from DECL_CONTEXT
6765 2018-08-21 Tamar Christina <tamar.christina@arm.com>
6767 * expmed.c (extract_low_bits): Reject invalid subregs early.
6769 2018-08-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
6772 * tree-ssa-strlen.c (adjust_last_stmt): Avoid folding away undefined
6775 2018-08-21 Rasmus Villemoes <rv@rasmusvillemoes.dk>
6777 * config/vxworks.h: Guard vxworks_asm_out_constructor and
6778 vxworks_asm_out_destructor by !HAVE_INITFINI_ARRAY_SUPPORT
6779 * config/vxworks.c: Likewise.
6781 2018-08-21 Rasmus Villemoes <rv@rasmusvillemoes.dk>
6783 * config/vxworks.c: Set targetm.have_ctors_dtors
6784 if HAVE_INITFINI_ARRAY_SUPPORT.
6785 * config/vxworks.h: Set SUPPORTS_INIT_PRIORITY
6786 if HAVE_INITFINI_ARRAY_SUPPORT.
6788 2018-08-21 Rasmus Villemoes <rv@rasmusvillemoes.dk>
6790 * config/vxworks.h: Add $(WIND_BASE)/target/h/wrn/coreip to
6791 default search path for VxWorks < 7.
6793 2018-08-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
6795 * gimple-ssa-sprintf.c (decl_constant_value): Remove.
6796 (get_format_string): Refer to c_getstr.
6798 2018-08-21 Tom de Vries <tdevries@suse.de>
6800 * cgraph.h (debuginfo_early_init, debuginfo_init, debuginfo_fini)
6801 (debuginfo_start, debuginfo_stop, debuginfo_early_start)
6802 (debuginfo_early_stop): Declare.
6803 * cgraphunit.c (debuginfo_early_init, debuginfo_init, debuginfo_fini)
6804 (debuginfo_start, debuginfo_stop, debuginfo_early_start)
6805 (debuginfo_early_stop): New function.
6806 (symbol_table::finalize_compilation_unit): Call debuginfo_early_start
6807 and debuginfo_early_stop.
6808 * dwarf2out.c (dwarf2out_finish, dwarf2out_early_finish): Dump dwarf.
6809 * toplev.c (compile_file): Call debuginfo_start and debuginfo_stop.
6810 (general_init): Call debuginfo_early_init.
6811 (finalize): Call debuginfo_fini.
6812 (do_compile): Call debuginfo_init.
6813 * doc/invoke.texi (@gccoptlist): Add -fdump-debug and
6815 (@item -fdump-debug, @item -fdump-earlydebug): Add.
6817 2018-08-21 Tom de Vries <tdevries@suse.de>
6819 * dwarf2out.c (print_dw_val, print_loc_descr, print_die): Handle
6820 flag_dump_noaddr and flag_dump_unnumbered.
6822 2018-08-21 Aldy Hernandez <aldyh@redhat.com>
6824 * wide-int-range.cc (wide_int_range_abs): New.
6825 (wide_int_range_order_set): Rename from wide_int_range_min_max.
6826 * wide-int-range.h (wide_int_range_abs): New.
6827 (wide_int_range_min_max): New.
6828 * tree-vrp.c (extract_range_from_unary_expr): Rewrite ABS_EXPR
6829 case to call wide_int_range_abs.
6830 Rewrite MIN/MAX_EXPR to call wide_int_range_min_max.
6831 (extract_range_from_abs_expr): Delete.
6833 2018-08-20 Michael Meissner <meissner@linux.ibm.com>
6836 * config/rs6000/rs6000.md (extendsi<mode>2): Change constraints
6837 from 'Y' to 'YZ' to enable the LWAX instruction to be generated
6840 2018-08-20 Nathan Sidwell <nathan@acm.org>
6841 Jeff Law <law@redhat.com>
6843 * config/s390/s390-c (s390_macro_to_expand): Use cpp_macro_p.
6844 * config/spu/spu-c.c (spu_macro_to_expand): Likewise.
6846 2018-08-20 David Malcolm <dmalcolm@redhat.com>
6849 * attribs.c (diag_attr_exclusions): Add auto_diagnostic_group instance.
6850 (decl_attributes): Likewise.
6851 * calls.c (maybe_warn_nonstring_arg): Add auto_diagnostic_group
6853 * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
6854 * diagnostic-core.h (class auto_diagnostic_group): New class.
6855 * diagnostic.c (diagnostic_initialize): Initialize the new fields.
6856 (diagnostic_report_diagnostic): Handle the first diagnostics within
6858 (emit_diagnostic): Add auto_diagnostic_group instance.
6860 (inform_n): Likewise.
6861 (warning): Likewise.
6862 (warning_at): Likewise.
6863 (warning_n): Likewise.
6864 (pedwarn): Likewise.
6865 (permerror): Likewise.
6867 (error_n): Likewise.
6868 (error_at): Likewise.
6870 (fatal_error): Likewise.
6871 (internal_error): Likewise.
6872 (internal_error_no_backtrace): Likewise.
6873 (auto_diagnostic_group::auto_diagnostic_group): New ctor.
6874 (auto_diagnostic_group::~auto_diagnostic_group): New dtor.
6875 * diagnostic.h (struct diagnostic_context): Add fields
6876 "diagnostic_group_nesting_depth",
6877 "diagnostic_group_emission_count", "begin_group_cb",
6879 * gimple-ssa-isolate-paths.c (find_implicit_erroneous_behavior):
6880 Add auto_diagnostic_group instance(s).
6881 (find_explicit_erroneous_behavior): Likewise.
6882 * gimple-ssa-warn-alloca.c (pass_walloca::execute): Likewise.
6883 * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Likewise.
6884 * gimplify.c (warn_implicit_fallthrough_r): Likewise.
6885 (gimplify_va_arg_expr): Likewise.
6886 * hsa-gen.c (HSA_SORRY_ATV): Likewise.
6887 (HSA_SORRY_AT): Likewise.
6888 * ipa-devirt.c (compare_virtual_tables): Likewise.
6889 (warn_odr): Likewise.
6890 * multiple_target.c (expand_target_clones): Likewise.
6891 * opts-common.c (cmdline_handle_error): Likewise.
6892 * reginfo.c (globalize_reg): Likewise.
6893 * substring-locations.c (format_warning_n_va): Likewise.
6894 * tree-inline.c (expand_call_inline): Likewise.
6895 * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Likewise.
6896 * tree-ssa-loop-niter.c
6897 (do_warn_aggressive_loop_optimizations): Likewise.
6898 * tree-ssa-uninit.c (warn_uninit): Likewise.
6899 * tree.c (warn_deprecated_use): Likewise.
6901 2018-08-20 H.J. Lu <hongjiu.lu@intel.com>
6904 * config/i386/i386.md (eh_return): Always update EH return
6905 address in word_mode.
6907 2018-08-20 Chung-Lin Tang <cltang@codesourcery.com>
6909 * targhooks.c (std_gimplify_va_arg_expr): Properly handle case of when
6910 TARGET_SPLIT_COMPLEX_ARG is defined.
6912 2018-08-20 Bernd Edlinger <bernd.edlinger@hotmail.de>
6914 * expr.c (store_field): Change gcc_assert to gcc_checking_assert.
6916 2018-08-20 Bernd Edlinger <bernd.edlinger@hotmail.de>
6919 * expr.c (expand_assignment): Assert that bitpos is positive.
6920 (store_field): Likewise
6921 (expand_expr_real_1): Make sure that bitpos is positive.
6922 * config/alpha/alpha.h (CONSTANT_ADDRESS_P): Avoid signed
6925 2018-08-20 Nathan Sidwell <nathan@acm.org>
6927 * Makefile.in (CPP_ID_DATA_H): Delete.
6928 (CPP_INTERNAL_H): Don't add it.
6929 (GTFILES): Replace CPP_ID_DATA_H with CPPLIB_H.
6930 * gengtype.c (open_base_files): Replace cpp-id-data.h with cpplib.h
6932 2018-08-20 Richard Biener <rguenther@suse.de>
6934 PR tree-optimization/78655
6935 * tree-vrp.c (extract_range_from_binary_expr_1): Make
6936 pointer + offset nonnull if either operand is nonnull work.
6938 2018-08-20 Tom de Vries <tdevries@suse.de>
6940 * dwarf2out.c (add_scalar_info): Don't add reference to existing die
6941 unless the referenced die describes the added property using
6942 DW_AT_location or DW_AT_const_value. Fall back to exprloc case.
6943 Otherwise, add a DW_AT_location to the referenced die.
6945 2018-08-19 Uros Bizjak <ubizjak@gmail.com>
6948 * config/i386/i386.c (ix86_rtx_costs) [case SET]: Check source for
6949 register_operand when calling ix86_set_reg_reg_cost.
6950 [case CONST_INT, case CONST, case LABEL_REF, case SYMBOL_REF]:
6951 Set *total to 0 for operands that satisfy x86_64_immediate_operand
6952 predicate and to 1 otherwise.
6954 2018-08-18 Iain Sandoe <iain@sandoe.co.uk>
6956 * config/darwin.c (darwin_override_options): If -gsplit-dwarf is set,
6957 emit a diagnostic that it is not supported and reset the option.
6958 * config/darwin.h (DRIVER_SELF_SPECS): Note that gsplit-dwarf is not
6959 supported and consume the option. (ASM_FINAL_SPEC): New.
6961 2018-08-17 Segher Boessenkool <segher@kernel.crashing.org>
6963 * doc/md.texi (Patterns): Use @ref instead of @xref in the middle of
6966 2018-08-17 Sandra Loosemore <sandra@codesourcery.com>
6968 C-SKY port: Documentation
6970 * doc/extend.texi (C-SKY Function Attributes): New section.
6971 * doc/invoke.texi (Option Summary): Add C-SKY options.
6972 (C-SKY Options): New section.
6973 * doc/md.texi (Machine Constraints): Document C-SKY constraints.
6975 2018-08-17 Jojo <jijie_rong@c-sky.com>
6976 Huibin Wang <huibin_wang@c-sky.com>
6977 Sandra Loosemore <sandra@codesourcery.com>
6978 Chung-Lin Tang <cltang@codesourcery.com>
6980 C-SKY port: Backend implementation
6982 * config/csky/*: New.
6983 * common/config/csky/*: New.
6985 2018-08-17 Jojo <jijie_rong@c-sky.com>
6986 Huibin Wang <huibin_wang@c-sky.com>
6987 Sandra Loosemore <sandra@codesourcery.com>
6988 Chung-Lin Tang <cltang@codesourcery.com>
6989 Andrew Jenner <andrew@codesourcery.com>
6991 C-SKY port: Configury
6993 * config.gcc (csky-*-*): New.
6994 * configure.ac: Add csky to targets for dwarf2 debug_line support.
6995 * configure: Regenerated.
6997 2018-08-17 David Malcolm <dmalcolm@redhat.com>
6999 * dump-context.h: Include "dumpfile.h".
7000 (dump_context::dump_printf_va): Convert final param from va_list
7001 to va_list *. Convert from ATTRIBUTE_PRINTF to
7002 ATTRIBUTE_GCC_DUMP_PRINTF.
7003 (dump_context::dump_printf_loc_va): Likewise.
7004 * dumpfile.c: Include "stringpool.h".
7005 (make_item_for_dump_printf_va): Delete.
7006 (make_item_for_dump_printf): Delete.
7007 (class dump_pretty_printer): New class.
7008 (dump_pretty_printer::dump_pretty_printer): New ctor.
7009 (dump_pretty_printer::emit_items): New member function.
7010 (dump_pretty_printer::emit_any_pending_textual_chunks): New member
7012 (dump_pretty_printer::emit_item): New member function.
7013 (dump_pretty_printer::stash_item): New member function.
7014 (dump_pretty_printer::format_decoder_cb): New member function.
7015 (dump_pretty_printer::decode_format): New member function.
7016 (dump_context::dump_printf_va): Reimplement in terms of
7017 dump_pretty_printer.
7018 (dump_context::dump_printf_loc_va): Convert final param from va_list
7020 (dump_context::begin_scope): Reimplement call to
7021 make_item_for_dump_printf.
7022 (dump_printf): Update for change to dump_printf_va.
7023 (dump_printf_loc): Likewise.
7024 (selftest::test_capture_of_dump_calls): Convert "stmt" from
7025 greturn * to gimple *. Add a test_decl. Add tests of dump_printf
7026 with %T, %E, and %G.
7027 * dumpfile.h (ATTRIBUTE_GCC_DUMP_PRINTF): New macro.
7028 (dump_printf): Replace ATTRIBUTE_PRINTF_2 with
7029 ATTRIBUTE_GCC_DUMP_PRINTF (2, 3).
7030 (dump_printf_loc): Replace ATTRIBUTE_PRINTF_3 with
7031 ATTRIBUTE_GCC_DUMP_PRINTF (3, 0).
7032 * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Convert
7033 use of HOST_WIDE_INT_PRINT_DEC on unsigned HOST_WIDE_INT "count"
7034 within a dump_printf_loc call to "%wu".
7035 (vector_alignment_reachable_p): Merge two dump_printf[_loc] calls,
7036 converting a use of HOST_WIDE_INT_PRINT_DEC to "%wd". Add a
7037 missing space after "=".
7038 * tree-vect-loop.c (vect_analyze_loop_2) Within a dump_printf
7039 call, convert use of HOST_WIDE_INT_PRINT_DEC to "%wd".
7040 * tree-vect-slp.c (vect_slp_bb): Within a dump_printf_loc call,
7041 convert use of HOST_WIDE_INT_PRINT_UNSIGNED to "%wu".
7042 * tree-vectorizer.c (try_vectorize_loop_1): Likewise. Remove
7043 duplicate "vectorized" from message.
7045 2018-08-17 Szabolcs Nagy <szabolcs.nagy@arm.com>
7047 * config/arm/arm-builtins.c (arm_init_simd_builtin_types): Clear
7048 polyNxK_t element's TYPE_STRING_FLAG.
7050 2018-08-17 Segher Boessenkool <segher@kernel.crashing.org>
7052 * config/rs6000/rs6000.md (*cbranch, *creturn): Name these patterns
7053 (they were unnamed before). Fix comments.
7055 2018-08-17 Nathan Sidwell <nathan@acm.org>
7057 * cppbuiltin.c: Include "cpplib.h", not "cpp-id-data.h".
7059 2018-08-17 Richard Biener <rguenther@suse.de>
7061 PR tree-optimization/86841
7062 * wide-int-range.cc (wide_int_range_lshift): Use to_uhwi.
7064 2018-08-17 Martin Liska <mliska@suse.cz>
7066 * common.opt: Remove Warn, Init and Report for options with
7067 Ignore/Deprecated flag. Warning is done automatically for
7069 * config/i386/i386.opt: Likewise.
7070 * config/ia64/ia64.opt: Likewise.
7071 * config/rs6000/rs6000.opt: Likewise.
7072 * cppbuiltin.c (define_builtin_macros_for_compilation_flags):
7073 Remove usage of flag_check_pointer_bounds.
7074 * lto-wrapper.c (merge_and_complain): Do not handle
7075 OPT_fcheck_pointer_bounds.
7076 (append_compiler_options): Likewise.
7077 * opt-functions.awk: Do not handle Deprecated.
7078 * optc-gen.awk: Check that Var, Report and Init are not
7079 used for an option with Ignore/Deprecated flag.
7080 * opts-common.c (decode_cmdline_option): Do not report
7082 (read_cmdline_option): Report warning for OPT_SPECIAL_deprecated
7084 * opts.h (struct cl_option): Remove cl_deprecated flag.
7085 (CL_ERR_DEPRECATED): Remove error enum value.
7087 2018-08-17 Richard Biener <rguenther@suse.de>
7090 * tree-inline.c (copy_bb): When inlining __builtin_va_arg_pack_len ()
7091 across a va-arg-pack using call adjust its return value accordingly.
7093 2018-08-16 Martin Sebor <msebor@redhat.com>
7095 PR tree-optimization/86853
7096 * gimple-ssa-sprintf.c (struct format_result): Rename member.
7097 (struct fmtresult): Add member and initialize it in ctors.
7098 (format_character): Handle %C. Extend range to NUL. Set MAYFAIL.
7099 (format_string): Handle %S the same as %ls. Set MAYFAIL.
7100 (format_directive): Set POSUNDER4K when MAYFAIL is set.
7101 (parse_directive): Handle %C same as %c.
7102 (sprintf_dom_walker::compute_format_length): Adjust.
7103 (is_call_safe): Adjust.
7105 2018-08-16 Bernd Edlinger <bernd.edlinger@hotmail.de>
7107 * builtins.c (c_strlen): Add new parameter eltsize. Use it
7108 for determining how to count the elements.
7109 * builtins.h (c_strlen): Adjust prototype.
7110 * expr.c (string_constant): Add new parameter mem_size.
7111 Set *mem_size appropriately.
7112 * expr.h (string_constant): Adjust protoype.
7113 * gimple-fold.c (get_range_strlen): Add new parameter eltsize.
7114 * gimple-fold.h (get_range_strlen): Adjust prototype.
7115 * gimple-ssa-sprintf.c (get_string_length): Add new parameter eltsize.
7116 (format_string): Call get_string_length with eltsize.
7118 2018-08-16 David Malcolm <dmalcolm@redhat.com>
7120 * diagnostic.c (default_diagnostic_start_span_fn): Call pp_string
7121 to emit the span, rather than setting it as the prefix.
7123 2018-08-16 David Malcolm <dmalcolm@redhat.com>
7125 * diagnostic-show-locus.c (layout::start_annotation_line): Add
7126 "margin_char" parameter, defaulting to space. Use it in place
7127 of pp_space for the initial part of the margin.
7128 (layout::print_leading_fixits): Use '+' when filling the margin
7129 of line-insertion fix-it hints.
7131 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
7133 * config/rs6000/rs6000.md (two unnamed define_insn and define_split):
7136 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
7138 * config/rs6000/altivec.md: Don't set length attribute to the default
7140 * config/rs6000/darwin.md: Ditto.
7141 * config/rs6000/dfp.md: Ditto.
7142 * config/rs6000/htm.md: Ditto.
7143 * config/rs6000/rs6000.md: Ditto.
7144 * config/rs6000/sync.md: Ditto.
7145 * config/rs6000/vsx.md: Ditto.
7147 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
7149 * config/rs6000/altivec.md: Don't set length attribute to the default
7150 value, for branch instructions.
7151 * config/rs6000/darwin.md: Ditto.
7152 * config/rs6000/rs6000.md: Ditto.
7154 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
7156 * config/rs6000/rs6000.md (length): Always define as const_int 4.
7157 (unnamed conditional branch define_insn): Set length to 4 or 8
7158 depending on offset.
7159 (<bd>_<mode>): Similar, for alternative 0.
7160 (<bd>tf_<mode>): Ditto.
7162 2018-08-16 Tamar Christina <tamar.christina@arm.com>
7164 * expr.c (copy_blkmode_to_reg): Perform larger copies when safe.
7166 2018-08-16 Matthew Malcomson <matthew.malcomson@arm.com>
7168 * doc/rtl.texi: Replace old RTX class names with new names.
7171 2018-08-16 Vlad Lazar <vlad.lazar@arm.com>
7173 * expmed.h (canonicalize_comparison): New declaration.
7174 * expmed.c (canonicalize_comparison, equivalent_cmp_code): New function.
7175 * expmed.c (emit_store_flag_1): Add call to canonicalize_comparison.
7176 * optabs.c (prepare_cmp_insn): Likewise.
7177 * rtl.h (unsigned_condition_p): New function which checks if a
7178 comparison operator is unsigned.
7180 2018-08-16 Nathan Sidwell <nathan@acm.org>
7182 * config/rs6000/rs6000-c.c (rs6000_macro_to_expend): Use cpp_macro_p.
7183 * config/powerpcspc/powerpcspe-c.c (rs6000_macro_to_expend): Likewise.
7185 2018-08-16 Tamar Christina <tamar.christina@arm.com>
7188 * config/arm/arm.c (arm_can_change_mode_class): Disallow subreg.
7189 * config/arm/neon.md (movv4hf, movv8hf): Refactored to..
7190 (mov<mov>): ..this and enable unconditionally.
7192 2018-08-16 Tamar Christina <tamar.christina@arm.com>
7194 * config/arm/neon.md (*neon_mov<mode>): Remove reg-to-reg alternative.
7196 2018-08-16 Sam Tebbs <sam.tebbs@arm.com>
7198 * config/aarch64/aarch64.opt (mlow-precision-recip-sqrt)
7199 (mlow-precision-sqrt, mlow-precision-div, mverbose-cost-dump): Replace
7200 "Common" with "Target".
7202 2018-08-15 Uros Bizjak <ubizjak@gmail.com>
7204 * config/i386/i386.opt (mmitigate-rop): Mark as deprecated.
7205 * doc/invoke.texi (mmitigate-rop): Remove.
7206 * config/i386/i386.c: Do not include "regrename.h".
7207 (ix86_rop_should_change_byte_p, reg_encoded_number)
7208 (ix86_get_modrm_for_rop, set_rop_modrm_reg_bits, ix86_mitigate_rop):
7210 (ix86_reorg): Remove call to ix86_mitigate_rop.
7211 * config/i386/i386.md (attr "modrm_class"): Remove.
7212 (cmp<mode>_ccno_1, mov<mode>_xor, movstrict<mode>_xor)
7213 (x86_mov<mode>cc_0_m1. x86_mov<mode>cc_0_m1_se)
7214 (x86_mov<mode>cc_0_m1_neg): Remove modrm_class attribute override.
7216 2018-08-15 Will Schmidt <will_schmidt@vnet.ibm.com>
7218 * config/rs6000/rs600.c (rs6000_gimple_fold_builtin): Add entries to
7219 allow folding of mergeh() and mergel() for the float and double types.
7220 (fold_mergehl_helper): Rework to handle building a permute tree
7223 2018-08-15 Uros Bizjak <ubizjak@gmail.com>
7225 * config/i386/i386.c (expand_vec_perm_movs): Enable V4SFmode
7228 2018-08-15 David Malcolm <dmalcolm@redhat.com>
7230 * common.opt (fdiagnostics-show-labels): New option.
7231 * diagnostic-show-locus.c (class layout_range): Add field
7233 (class layout): Add field "m_show_labels_p".
7234 (layout_range::layout_range): Add param "label" and use it to
7236 (make_range): Pass in NULL for new "label" param of layout_range's
7238 (layout::layout): Initialize m_show_labels_p.
7239 (layout::maybe_add_location_range): Pass in loc_range->m_label
7240 when constructing layout_range instances.
7241 (struct line_label): New struct.
7242 (layout::print_any_labels): New member function.
7243 (layout::print_line): Call it if label-printing is enabled.
7244 (selftest::test_one_liner_labels): New test.
7245 (selftest::test_diagnostic_show_locus_one_liner): Call it.
7246 * diagnostic.c (diagnostic_initialize): Initialize
7247 context->show_labels_p.
7248 * diagnostic.h (struct diagnostic_context): Add field
7250 * doc/invoke.texi (Diagnostic Message Formatting Options): Add
7251 -fno-diagnostics-show-labels.
7252 * dwarf2out.c (gen_producer_string): Add
7253 OPT_fdiagnostics_show_labels to the ignored options.
7254 * gcc-rich-location.c (gcc_rich_location::add_expr): Add "label"
7256 (gcc_rich_location::maybe_add_expr): Likewise.
7257 * gcc-rich-location.h (gcc_rich_location::gcc_rich_location): Add
7258 label" param, defaulting to NULL.
7259 (gcc_rich_location::add_expr): Add "label" param.
7260 (gcc_rich_location::maybe_add_expr): Likewise.
7261 (class text_range_label): New class.
7262 (class range_label_for_type_mismatch): New class.
7263 * gimple-ssa-sprintf.c (fmtwarn): Pass NULL for new label params
7264 of format_warning_va.
7265 (fmtwarn_n): Likewise for new params of format_warning_n_va.
7266 * lto-wrapper.c (merge_and_complain): Add
7267 OPT_fdiagnostics_show_labels to the "pick one setting" options.
7268 (append_compiler_options): Likewise to the dropped options.
7269 (append_diag_options): Likewise to the passed-on options.
7270 * opts.c (common_handle_option): Handle the new option.
7271 * selftest-diagnostic.c
7272 (test_diagnostic_context::test_diagnostic_context): Enable
7274 * substring-locations.c: Include "gcc-rich-location.h".
7275 (format_warning_n_va): Add "fmt_label" and "param_label" params
7276 and use them as appropriate.
7277 (format_warning_va): Add "fmt_label" and "param_label" params,
7278 passing them on to format_warning_n_va.
7279 (format_warning_at_substring): Likewise.
7280 (format_warning_at_substring_n): Likewise.
7281 * substring-locations.h (format_warning_va): Add "fmt_label" and
7282 "param_label" params.
7283 (format_warning_n_va): Likewise.
7284 (format_warning_at_substring): Likewise.
7285 (format_warning_at_substring_n): Likewise.
7286 * toplev.c (general_init): Initialize global_dc->show_labels_p.
7288 2018-08-15 Qing Zhao <qing.zhao@oracle.com>
7291 * builtins.c (expand_builtin_memcmp): Do not expand the call
7292 when overflow is detected.
7294 2018-08-15 Martin Sebor <msebor@redhat.com>
7296 PR tree-optimization/71625
7297 * config/aarch64/aarch64-builtins.c
7298 (aarch64_init_simd_builtin_types): Clear Poly8_t's TYPE_STRING_FLAG.
7300 2018-08-15 Ilya Leoshkevich <iii@linux.ibm.com>
7302 * config/s390/s390.c (s390_reorg): Remove loop.
7304 2018-08-15 Iain Sandoe <iain@sandoe.co.uk>
7307 (darwin_function_switched_text_sections): Delete.
7308 * gcc/config/darwin.h
7309 (TARGET_ASM_FUNCTION_SWITCHED_TEXT_SECTIONS): Likewise.
7311 2018-08-15 Iain Sandoe <iain@sandoe.co.uk>
7314 * config/darwin.h: (DEBUG_STR_OFFSETS_SECTION, DEBUG_LOCLISTS_SECTION,
7315 DEBUG_RNGLISTS_SECTION) new macros. (DEBUG_PUBNAMES_SECTION,
7316 DEBUG_PUBTYPES_SECTION) update to include GNU variant.
7318 2018-08-15 Martin Liska <mliska@suse.cz>
7320 PR tree-optimization/86925
7321 * predict.c (expr_expected_value_1): When taking
7322 later predictor, assign also probability.
7323 Use fold_build2_initializer_loc in order to fold
7324 the expression in -frounding-math.
7326 2018-08-14 Allan Sandfeld Jensen <allan.jensen@qt.io>
7328 * config/i386/i386.c (expand_vec_perm_movs): New method matching movs
7330 (expand_vec_perm_1): Try the new method.
7332 2018-08-14 Ilya Leoshkevich <iii@linux.ibm.com>
7335 * lra-lives.c (remove_some_program_points_and_update_live_ranges):
7336 Check whether lra_live_max_point is 0 before dividing.
7338 2018-08-14 Martin Sebor <msebor@redhat.com>
7340 PR tree-optimization/86650
7341 * tree-vrp.c (vrp_prop::check_array_ref): Print an inform message.
7342 (vrp_prop::check_mem_ref): Same.
7344 2018-08-13 Liu Hao <lh_mouse@126.com>
7346 * pretty-print.c (eat_esc_sequence): Swap the foreground and
7347 background colors if the COMMON_LVB_REVERSE_VIDEO flag is set,
7348 and clear it thereafter, as it only works for DBCS.
7350 2018-08-13 Liu Hao <lh_mouse@126.com>
7352 * pretty-print.c (mingw_ansi_fputs): Do not call _close() on the
7353 handle returned by _get_osf_handle().
7355 2018-08-13 Will Schmidt <will_schmidt@vnet.ibm.com>
7357 * gcc/config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add support
7358 for folding vec_perm.
7360 2018-08-13 Will Schmidt <will_schmidt@vnet.ibm.com>
7362 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin):
7363 Add support for gimple-folding of vec_pack() and vec_unpack()
7366 2018-08-13 Will Schmidt <will_schmidt@vnet.ibm.com>
7368 * config/rs6000/rs6000.c (rs6000_builtin_valid_without_lhs): Add
7369 vec_xst variants to the list.
7370 (rs6000_gimple_fold_builtin): Add support for folding unaligned
7371 vector loads and stores.
7373 2018-08-13 David Edelsohn <dje.gcc@gmail.com>
7375 * config.gcc (rs6000-ibm-aix4.x): Delete.
7376 (rs6000-ibm-aix5.1): Delete.
7377 (rs6000-ibm-aix5.2): Delete.
7378 (rs6000-ibm-aix5.3): Delete.
7379 * config/rs6000/aix43.h: Delete.
7380 * config/rs6000/aix51.h: Delete.
7381 * config/rs6000/aix52.h: Delete.
7382 * config/rs6000/t-aix43: Delete.
7384 2018-08-13 Ilya Leoshkevich <iii@linux.ibm.com>
7386 * config/s390/s390.c (s390_decompose_constant_pool_ref):
7388 (s390_decompose_address): Factor out constant pool ref
7391 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
7393 * config/nds32/nds32-predicates.c
7394 (nds32_can_use_bclr_p): Change return type as bool.
7395 (nds32_can_use_bset_p): Ditto.
7396 (nds32_can_use_btgl_p): Ditto.
7397 (nds32_can_use_bitci_p): Ditto.
7398 * config/nds32/nds32-protos.h
7399 (nds32_can_use_bclr_p): Change declaration.
7400 (nds32_can_use_bset_p): Ditto.
7401 (nds32_can_use_btgl_p): Ditto.
7402 (nds32_can_use_bitci_p): Ditto.
7404 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
7406 * config/nds32/nds32.c (nds32_expand_prologue, nds32_expand_epilogue):
7407 Support -msched-prolog-epilog option.
7408 * config/nds32/nds32.opt (msched-prolog-epilog): New option.
7410 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
7412 * common/config/nds32/nds32-common.c
7413 (nds32_option_optimization_table): Enalbe -malways-align.
7415 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
7417 * config.gcc (nds32*): Add nds32_isr.h and nds32_init.inc in
7419 * common/config/nds32/nds32-common.c (nds32_handle_option): Handle
7420 OPT_misr_secure_ case.
7421 * config/nds32/nds32-isr.c: Implementation of backward compatibility.
7422 * config/nds32/nds32-protos.h (nds32_isr_function_critical_p): New.
7423 * config/nds32/nds32.c (nds32_attribute_table): Add critical and
7425 * config/nds32/nds32.h (nds32_isr_nested_type): Add NDS32_CRITICAL.
7426 (nds32_isr_info): New field security_level.
7427 (TARGET_ISR_VECTOR_SIZE_4_BYTE): New macro.
7428 * config/nds32/nds32.md (return_internal): Consider critical attribute.
7429 * config/nds32/nds32.opt (misr-secure): New option.
7430 * config/nds32/nds32_init.inc: New file.
7431 * config/nds32/nds32_isr.h: New file.
7433 2018-08-11 John David Anglin <danglin@gcc.gnu.org>
7435 * config/pa/pa.md (UNSPEC_MEMORY_BARRIER): New unspec enum.
7436 Update comment for atomic instructions.
7437 (atomic_storeqi, atomic_storehi, atomic_storesi, atomic_storesf,
7438 atomic_loaddf, atomic_loaddf_1, atomic_storedf, atomic_storedf_1):
7440 (atomic_loaddi): Revise fence expansion to only emit fence prior to
7441 load for __ATOMIC_SEQ_CST model.
7442 (atomic_loaddi_1): Remove float register target.
7443 (atomic_storedi): Handle CONST_INT values.
7444 (atomic_storedi_1): Remove float register source. Add special case
7446 (memory_barrier): New expander and insn.
7448 2018-08-11 Jakub Jelinek <jakub@redhat.com>
7450 PR tree-optimization/86835
7451 * tree-ssa-math-opts.c (insert_reciprocals): Even when inserting
7452 new_stmt after def_gsi, make sure to insert new_square_stmt after
7453 that stmt, not 2 stmts before it.
7455 2018-08-10 Alexander Monakov <amonakov@ispras.ru>
7458 * config/i386/i386.md (<s>mul<mode>3_highpart): Use DWIH mode iterator
7461 2018-08-10 Martin Liska <mliska@suse.cz>
7464 * builtin-types.def (BT_FN_LONG_LONG_LONG_DOUBLE): Add new
7466 * builtins.c (expand_builtin_expect_with_probability):
7468 (expand_builtin_expect_with_probability): New function.
7469 (build_builtin_expect_predicate): Add new argumnet probability
7470 for BUILT_IN_EXPECT_WITH_PROBABILITY.
7471 (fold_builtin_expect):
7474 * builtins.def (BUILT_IN_EXPECT_WITH_PROBABILITY):
7475 * builtins.h (fold_builtin_expect): Set new argument.
7476 * doc/extend.texi: Document __builtin_expect_with_probability.
7477 * doc/invoke.texi: Likewise.
7478 * gimple-fold.c (gimple_fold_call): Pass new argument.
7479 * ipa-fnsummary.c (find_foldable_builtin_expect): Handle
7480 also BUILT_IN_EXPECT_WITH_PROBABILITY.
7481 * predict.c (get_predictor_value): New function.
7482 (expr_expected_value): Add new argument probability. Assume
7483 that predictor and probability are always non-null.
7484 (expr_expected_value_1): Likewise. For __builtin_expect and
7485 __builtin_expect_with_probability set probability. Handle
7486 combination in binary expressions.
7487 (tree_predict_by_opcode): Simplify code by simply calling
7488 get_predictor_value.
7489 (pass_strip_predict_hints::execute): Add handling of
7490 BUILT_IN_EXPECT_WITH_PROBABILITY.
7491 * predict.def (PRED_BUILTIN_EXPECT_WITH_PROBABILITY): Add
7493 * tree.h (DECL_BUILT_IN_P): New function.
7495 2018-08-10 Martin Liska <mliska@suse.cz>
7497 PR tree-optimization/85799
7498 * passes.def: Add argument for pass_strip_predict_hints.
7499 * predict.c (class pass_strip_predict_hints): Add new argument
7501 (strip_predictor_early): New function.
7502 (pass_strip_predict_hints::execute): Call the function to
7504 (strip_predict_hints): New function.
7505 * predict.def: Fix comment.
7507 2018-08-10 Thomas Preud'homme <thomas.preudhomme@linaro.org>
7509 * Makefile.in: Clarify which tm.texi to copy over to assert the
7510 right to grant a GFDL license for all.
7512 2018-08-09 Jeff Law <law@redhat.com>
7514 * config/m68k/m68k.c (m68k_adjust_decorated_operand): Remove
7517 2018-08-09 Andreas Schwab <schwab@linux-m68k.org>
7519 * config/m68k/m68k-protos.h (m68k_final_prescan_insn): Remove
7522 2018-08-09 Richard Sandiford <richard.sandiford@arm.com>
7524 * tree-vect-loop.c (vectorizable_reduction): Allow inner-loop
7525 reductions for variable-length vectors.
7527 2018-08-09 David Malcolm <dmalcolm@redhat.com>
7530 * common.opt (fdiagnostics-show-line-numbers): New option.
7531 * diagnostic-show-locus.c (class layout): Add fields
7532 "m_show_line_numbers_p" and "m_linenum_width";
7533 (num_digits): New function.
7534 (test_num_digits): New function.
7535 (layout::layout): Initialize new fields. Update m_x_offset
7536 logic to handle any left margin.
7537 (layout::print_source_line): Print line number when requested.
7538 (layout::start_annotation_line): New member function.
7539 (layout::print_annotation_line): Call it.
7540 (layout::print_leading_fixits): Likewise.
7541 (layout::print_trailing_fixits): Likewise. Update calls to
7542 move_to_column for new parameter.
7543 (layout::get_x_bound_for_row): Add "add_left_margin" param and use
7544 it to potentially call start_annotation_line.
7545 (layout::show_ruler): Call start_annotation_line.
7546 (selftest::test_line_numbers_multiline_range): New selftest.
7547 (selftest::diagnostic_show_locus_c_tests): Call test_num_digits
7548 and selftest::test_line_numbers_multiline_range.
7549 * diagnostic.c (diagnostic_initialize): Initialize
7550 show_line_numbers_p.
7551 * diagnostic.h (struct diagnostic_context): Add field
7552 "show_line_numbers_p".
7553 * doc/invoke.texi (Diagnostic Message Formatting Options): Add
7554 -fno-diagnostics-show-line-numbers.
7555 * dwarf2out.c (gen_producer_string): Add
7556 OPT_fdiagnostics_show_line_numbers to the ignored options.
7557 * lto-wrapper.c (merge_and_complain): Likewise to the "pick
7558 one setting" options.
7559 (append_compiler_options): Likewise to the dropped options.
7560 (append_diag_options): Likewise to the passed-on options.
7561 * opts.c (common_handle_option): Handle the new option.
7562 * toplev.c (general_init): Set up global_dc->show_line_numbers_p.
7564 2018-08-09 Kelvin Nilsen <kelvin@gcc.gnu.org>
7566 * doc/extend.texi (PowerPC AltiVec Built-in Functions Available on
7567 ISA 2.07): Correct spelling of bcdsub to be __builtin_bcdsub. Add
7568 third argument of type "const signed char" to descriptions of
7569 __builtin_bcdadd, __builtin_bcdadd_lt, __builtin_bcdadd_eq,
7570 __builtin_bcdadd_gt, __builtin_bcdadd_ov, __builtin_bcdsub,
7571 __builtin_bcdsub_lt, __builtin_bcdsub_eq, __builtin_bcdsub_gt,
7572 __builtin_bcdsub_ov functions.
7574 2018-08-09 Richard Sandiford <richard.sandiford@arm.com>
7576 PR tree-optimization/86858
7577 * tree-vect-loop.c (vect_is_simple_reduction): Restore
7578 flow_bb_inside_loop_p calls.
7580 2018-08-09 Richard Sandiford <richard.sandiford@arm.com>
7582 PR tree-optimization/86871
7583 * tree-vect-stmts.c (vect_transform_stmt): Use gimple_get_lhs
7584 instead of gimple_assign_lhs.
7586 2018-08-09 Richard Earnshaw <rearnsha@arm.com>
7589 * config/aarch64/aarch64.md (add<mode>3_carryinC_zero): Add missing
7590 register constraint to operand 0.
7591 (add<mode>3_carryinC): Likewise.
7592 (add<mode>3_carryinV_zero, add<mode>3_carryinV): Likewise.
7594 2018-08-09 Martin Liska <mliska@suse.cz>
7597 * common.opt: Remove extra line.
7599 2018-08-09 Martin Liska <mliska@suse.cz>
7601 * params.def (PARAM_ALIGN_LOOP_ITERATIONS): Remove double dots
7602 at the end of a line, make first letter capital and end up
7603 a sentence with a dot.
7604 (PARAM_LOOP_INTERCHANGE_STRIDE_RATIO): Likewise.
7605 (PARAM_LOOP_BLOCK_TILE_SIZE): Likewise.
7606 (PARAM_GRAPHITE_MAX_NB_SCOP_PARAMS): Likewise.
7607 (PARAM_GRAPHITE_MAX_ARRAYS_PER_SCOP): Likewise.
7608 (PARAM_MAX_ISL_OPERATIONS): Likewise.
7609 (PARAM_GRAPHITE_ALLOW_CODEGEN_ERRORS): Likewise.
7610 (PARAM_PROFILE_FUNC_INTERNAL_ID): Likewise.
7611 (PARAM_INDIR_CALL_TOPN_PROFILE): Likewise.
7612 (PARAM_SLP_MAX_INSNS_IN_BB): Likewise.
7613 (PARAM_IPA_CP_EVAL_THRESHOLD): Likewise.
7614 (PARAM_IPA_CP_RECURSION_PENALTY): Likewise.
7615 (PARAM_IPA_CP_SINGLE_CALL_PENALTY): Likewise.
7616 (PARAM_IPA_CP_LOOP_HINT_BONUS): Likewise.
7617 (PARAM_IPA_CP_ARRAY_INDEX_HINT_BONUS): Likewise.
7618 (PARAM_TREE_REASSOC_WIDTH): Likewise.
7619 (PARAM_HSA_GEN_DEBUG_STORES): Likewise.
7620 (PARAM_MAX_SPECULATIVE_DEVIRT_MAYDEFS): Likewise.
7621 (PARAM_MAX_VRP_SWITCH_ASSERTIONS): Likewise.
7623 2018-08-09 Andreas Krebbel <krebbel@linux.ibm.com>
7626 * config/s390/s390.c (s390_option_override_internal): Reduce the
7627 stack-clash-protection-probe-interval param if it would be too big
7630 2018-08-08 Andreas Schwab <schwab@linux-m68k.org>
7633 * config/m68k/m68k.h (FINAL_PRESCAN_INSN): Don't define.
7634 * config/m68k/m68k.c (handle_move_double): Don't call
7635 m68k_final_prescan_insn.
7636 (m68k_adjust_decorated_operand): Renamed from
7637 m68k_final_prescan_insn, remove first and third operand and
7639 (print_operand): Call it.
7640 (print_operand_address): Call it.
7642 2018-08-08 Nathan Sidwell <nathan@acm.org>
7644 * diagnostic.c (diagnostic_report_current_module): Use
7645 linemap_included_from & linemap_included_from_linemap.
7647 2018-08-08 Hongbo Zhang <hongbo.zhang@linaro.org>
7649 * config/aarch64/aarch64-cores.def: Add phecda core.
7650 * config/aarch64/aarch64-tune.md: Regenerate.
7651 * doc/invoke.texi: Add phecda core.
7653 2018-08-08 Andreas Krebbel <krebbel@linux.ibm.com>
7656 * config/s390/constraints.md ("NxHD0", "NxSD0"): New constraint
7658 * config/s390/s390.md ("movti"): Add more alternatives for
7659 constant to GPR copies.
7661 2018-08-08 Andreas Krebbel <krebbel@linux.ibm.com>
7663 * config/s390/s390.c: Fix whitespace damage throughout the file.
7664 * config/s390/s390.h: Likewise.
7665 * config/s390/tpf.h: Likewise.
7667 2018-08-08 Ilya Leoshkevich <iii@linux.ibm.com>
7669 * config/s390/s390.c (s390_loadrelative_operand_p):
7670 Remove TARGET_CPU_ZARCH usages.
7671 (s390_rtx_costs): Likewise.
7672 (s390_legitimate_constant_p): Likewise.
7673 (s390_cannot_force_const_mem): Likewise.
7674 (legitimate_reload_constant_p): Likewise.
7675 (s390_preferred_reload_class): Likewise.
7676 (legitimize_pic_address): Likewise.
7677 (legitimize_tls_address): Likewise.
7678 (s390_split_branches): Removed.
7679 (s390_add_execute): Removed.
7680 (s390_dump_pool): Remove TARGET_CPU_ZARCH usages.
7681 (s390_mainpool_start): Likewise.
7682 (s390_mainpool_finish): Likewise.
7683 (s390_mainpool_cancel): Removed.
7684 (s390_chunkify_start): Remove TARGET_CPU_ZARCH usages.
7685 (s390_chunkify_cancel): Likewise.
7686 (s390_return_addr_rtx): Likewise.
7687 (s390_register_info): Remove split_branches_pending_p uages.
7688 (s390_optimize_register_info): Likewise.
7689 (s390_init_frame_layout): Remove TARGET_CPU_ZARCH and
7690 split_branches_pending_p usages.
7691 (s390_can_eliminate): Remove TARGET_CPU_ZARCH usages.
7692 (s390_load_got): Likewise.
7693 (s390_expand_split_stack_prologue): Likewise.
7694 (output_asm_nops): Likewise.
7695 (s390_function_profiler): Likewise.
7696 (s390_emit_call): Likewise.
7697 (s390_conditional_register_usage): Likewise.
7698 (s390_optimize_prologue): Likewise.
7699 (s390_reorg): Remove TARGET_CPU_ZARCH and
7700 split_branches_pending_p usages.
7701 (s390_option_override_internal): Remove TARGET_CPU_ZARCH
7703 (s390_output_indirect_thunk_function): Likewise.
7704 * config/s390/s390.h (TARGET_CPU_ZARCH): Removed.
7705 (TARGET_CPU_ZARCH_P): Removed.
7706 (struct machine_function): Remove split_branches_pending_p.
7707 * config/s390/s390.md: Remove TARGET_CPU_ZARCH usages.
7709 2018-08-08 Ilya Leoshkevich <iii@linux.ibm.com>
7711 * common/config/s390/s390-common.c (processor_flags_table):
7713 * config.gcc: Remove with_arch/with_tune support.
7714 * config/s390/2064.md: Remove cpu attribute comparisons.
7715 * config/s390/driver-native.c (s390_host_detect_local_cpu):
7717 * config/s390/linux.h (ASM_SPEC):
7718 Remove -march support.
7719 * config/s390/s390-c.c (s390_cpu_cpp_builtins_internal):
7720 Use a table to get an arch level.
7721 * config/s390/s390-opts.h (enum processor_type):
7723 * config/s390/s390.c
7724 (processor_table): Remove entries, add arch_level values.
7725 (s390_issue_rate): Remove cases.
7726 (s390_option_override): Adjust
7727 s390_option_override_internal() call.
7728 (s390_option_override_internal): Remove deprecation warning.
7729 (s390_valid_target_attribute_tree): Adjust
7730 s390_option_override_internal() call.
7731 * config/s390/s390.h (struct s390_processor):
7732 Share with s390-c.c, add arch_level field.
7733 * config/s390/s390.md:
7734 Remove occurrences in cpu attribute.
7735 * config/s390/s390.opt: Remove -march/-mtune support.
7736 * config/s390/tpf.h (ASM_SPEC): Remove -march support.
7737 * doc/invoke.texi: Remove deprecation warning.
7739 2018-08-08 Luis Machado <luis.machado@linaro.org>
7741 * config/aarch64/aarch64.c (qdf24xx_vector_cost): New static
7743 (qdf24xx_tunings): Set vector cost structure to
7744 qdf24xx_vector_cost.
7746 * config/aarch64/aarch64.c (qdf24xx_addrcost_table)
7747 <register_sextend>: Set to 3.
7749 2018-08-07 Richard Sandiford <richard.sandiford@arm.com>
7752 * config/aarch64/iterators.md (FRECP, frecp_suffix): Delete.
7753 * config/aarch64/aarch64-simd.md
7754 (aarch64_frecp<FRECP:frecp_suffix><mode>): Fold FRECPE into...
7755 (@aarch64_frecpe<mode>): ...here and the move FRECPX to...
7756 (aarch64_frecpx<mode>): ...this new pattern.
7757 * config/aarch64/aarch64-simd-builtins.def: Remove comment
7758 about aarch64_frecp<FRECP:frecp_suffix><mode>.
7760 2018-08-07 Martin Liska <mliska@suse.cz>
7763 * predict.c (expr_expected_value_1): Handle DECL_IS_MALLOC,
7764 BUILT_IN_REALLOC and DECL_IS_OPERATOR_NEW.
7765 * predict.def (PRED_MALLOC_NONNULL): New predictor.
7766 * doc/extend.texi: Document that malloc attribute adds
7769 2018-08-06 John David Anglin <danglin@gcc.gnu.org>
7772 * config/pa/pa.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
7773 Define to speculation_safe_value_not_needed.
7775 2018-08-06 Jeff Law <law@redhat.com>
7777 * tree-ssa-dom.c (dom_opt_dom_walker::optimize_stmt): Pass down
7778 the vr_values instance to cprop_into_stmt.
7779 (cprop_into_stmt): Pass vr_values instance down to cprop_operand.
7780 (cprop_operand): Also query EVRP to determine if OP is a constant.
7782 2018-08-06 Nathan Sidwell <nathan@acm.org>
7784 * diagnostic.c (diagnostic_report_current_module): Reroll
7785 included-at loop. Translate text.
7787 2018-08-06 David Malcolm <dmalcolm@redhat.com>
7789 * function-tests.c (selftest::test_expansion_to_rtl): Call
7790 free_after_compilation.
7792 2018-08-06 Alan Hayward <alan.hayward@arm.com>
7794 * config/aarch64/aarch64.md: Add clobber highs to tls_desc.
7796 2018-08-06 Andreas Krebbel <krebbel@linux.ibm.com>
7798 * config/s390/s390.c (s390_loop_unroll_adjust): Prevent small
7799 loops with memory block operations from getting unrolled.
7801 2018-08-06 Ulrich Weigand <uweigand@de.ibm.com>
7804 * config/spu/spu.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
7805 Define to speculation_safe_value_not_needed.
7807 2018-08-06 Jeff Law <law@redhat.com>
7809 * reload1.c (forget_old_reloads_1): Adjust CLOBBER_HIGH
7812 2018-08-06 Jozef Lawrynowicz <jozef.l@mittosystems.com>
7815 * gcc/tree.c (build_common_tree_nodes): Initialize integer_types array
7816 with all enabled __intN types.
7818 * gcc/testsuite/gcc.target/msp430/pr86662.c: New test.
7820 2018-08-06 Alan Hayward <alan.hayward@arm.com>
7822 * alias.c (record_set): Check for clobber high.
7823 * cfgexpand.c (expand_gimple_stmt): Likewise.
7824 * combine-stack-adj.c (single_set_for_csa): Likewise.
7825 * combine.c (find_single_use_1): Likewise.
7826 (set_nonzero_bits_and_sign_copies): Likewise.
7827 (get_combine_src_dest): Likewise.
7828 (is_parallel_of_n_reg_sets): Likewise.
7829 (try_combine): Likewise.
7830 (record_dead_and_set_regs_1): Likewise.
7831 (reg_dead_at_p_1): Likewise.
7832 (reg_dead_at_p): Likewise.
7833 * dce.c (deletable_insn_p): Likewise.
7834 (mark_nonreg_stores_1): Likewise.
7835 (mark_nonreg_stores_2): Likewise.
7836 * df-scan.c (df_find_hard_reg_defs): Likewise.
7837 (df_uses_record): Likewise.
7838 (df_get_call_refs): Likewise.
7839 * dwarf2out.c (mem_loc_descriptor): Likewise.
7840 * haifa-sched.c (haifa_classify_rtx): Likewise.
7841 * ira-build.c (create_insn_allocnos): Likewise.
7842 * ira-costs.c (scan_one_insn): Likewise.
7843 * ira.c (equiv_init_movable_p): Likewise.
7844 (rtx_moveable_p): Likewise.
7845 (interesting_dest_for_shprep): Likewise.
7846 * jump.c (mark_jump_label_1): Likewise.
7847 * postreload-gcse.c (record_opr_changes): Likewise.
7848 * postreload.c (reload_cse_simplify): Likewise.
7849 (struct reg_use): Add source expr.
7850 (reload_combine): Check for clobber high.
7851 (reload_combine_note_use): Likewise.
7852 (reload_cse_move2add): Likewise.
7853 (move2add_note_store): Likewise.
7854 * print-rtl.c (print_pattern): Likewise.
7855 * recog.c (decode_asm_operands): Likewise.
7856 (store_data_bypass_p): Likewise.
7857 (if_test_bypass_p): Likewise.
7858 * regcprop.c (kill_clobbered_value): Likewise.
7859 (kill_set_value): Likewise.
7860 * reginfo.c (reg_scan_mark_refs): Likewise.
7861 * reload1.c (maybe_fix_stack_asms): Likewise.
7862 (eliminate_regs_1): Likewise.
7863 (elimination_effects): Likewise.
7864 (mark_not_eliminable): Likewise.
7865 (scan_paradoxical_subregs): Likewise.
7866 (forget_old_reloads_1): Likewise.
7867 * reorg.c (find_end_label): Likewise.
7868 (try_merge_delay_insns): Likewise.
7869 (redundant_insn): Likewise.
7870 (own_thread_p): Likewise.
7871 (fill_simple_delay_slots): Likewise.
7872 (fill_slots_from_thread): Likewise.
7873 (dbr_schedule): Likewise.
7874 * resource.c (update_live_status): Likewise.
7875 (mark_referenced_resources): Likewise.
7876 (mark_set_resources): Likewise.
7877 * rtl.c (copy_rtx): Likewise.
7878 * rtlanal.c (reg_referenced_p): Likewise.
7879 (single_set_2): Likewise.
7880 (noop_move_p): Likewise.
7881 (note_stores): Likewise.
7882 * sched-deps.c (sched_analyze_reg): Likewise.
7883 (sched_analyze_insn): Likewise.
7885 2018-08-06 Alan Hayward <alan.hayward@arm.com>
7887 * cse.c (invalidate_reg): New function extracted from...
7888 (invalidate): ...here.
7889 (canonicalize_insn): Check for clobber high.
7890 (invalidate_from_clobbers): invalidate clobber highs.
7891 (invalidate_from_sets_and_clobbers): Likewise.
7892 (count_reg_usage): Check for clobber high.
7893 (insn_live_p): Likewise.
7894 * cselib.c (cselib_expand_value_rtx_1):Likewise.
7895 (cselib_invalidate_regno): Check for clobber in setter.
7896 (cselib_invalidate_rtx): Pass through setter.
7897 (cselib_invalidate_rtx_note_stores):
7898 (cselib_process_insn): Check for clobber high.
7899 * cselib.h (cselib_invalidate_rtx): Add operand.
7901 2018-08-06 Alan Hayward <alan.hayward@arm.com>
7903 * lra-eliminations.c (lra_eliminate_regs_1): Check for clobber high.
7904 (mark_not_eliminable): Likewise.
7905 * lra-int.h (struct lra_insn_reg): Add clobber high marker.
7906 * lra-lives.c (process_bb_lives): Check for clobber high.
7907 * lra.c (new_insn_reg): Remember clobber highs.
7908 (collect_non_operand_hard_regs): Check for clobber high.
7909 (lra_set_insn_recog_data): Likewise.
7910 (add_regs_to_insn_regno_info): Likewise.
7911 (lra_update_insn_regno_info): Likewise.
7913 2018-08-06 Alan Hayward <alan.hayward@arm.com>
7915 * rtl.h (reg_is_clobbered_by_clobber_high): Add declarations.
7916 * rtlanal.c (reg_is_clobbered_by_clobber_high): Add function.
7918 2018-08-06 Alan Hayward <alan.hayward@arm.com>
7920 * emit-rtl.c (verify_rtx_sharing): Check for CLOBBER_HIGH.
7921 (copy_insn_1): Likewise.
7922 (gen_hard_reg_clobber_high): New gen function.
7923 * genconfig.c (walk_insn_part): Check for CLOBBER_HIGH.
7924 * genemit.c (gen_exp): Likewise.
7925 (gen_emit_seq): Pass through info.
7926 (gen_insn): Check for CLOBBER_HIGH.
7927 (gen_expand): Pass through info.
7928 (gen_split): Likewise.
7929 (output_add_clobbers): Likewise.
7930 * genrecog.c (validate_pattern): Check for CLOBBER_HIGH.
7931 (remove_clobbers): Likewise.
7932 * rtl.h (gen_hard_reg_clobber_high): New declaration.
7934 2018-08-06 Alan Hayward <alan.hayward@arm.com>
7936 * doc/rtl.texi (clobber_high): Add.
7937 (parallel): Add in clobber high
7938 * rtl.c (rtl_check_failed_code3): Add function.
7939 * rtl.def (CLOBBER_HIGH): Add expression.
7940 * rtl.h (RTL_CHECKC3): Add macro.
7941 (rtl_check_failed_code3): Add declaration.
7942 (XC3EXP): Add macro.
7944 2018-08-05 H.J. Lu <hongjiu.lu@intel.com>
7947 * config/i386/i386.c (ix86_finalize_stack_frame_flags): Set
7948 cfun->machine->max_used_stack_alignment if needed.
7950 2018-08-04 Martin Sebor <msebor@redhat.com>
7952 PR tree-optimization/86571
7953 * gimple-ssa-sprintf.c (format_floating): Extend upper bound of
7956 2018-08-03 Sandra Loosemore <sandra@codesourcery.com>
7959 * config/nios2/nios2.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
7962 2018-08-03 Jeff Law <law@redhat.com>
7965 * config/mn10300/mn10300.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
7966 Define to speculation_safe_value_not_needed.
7968 2018-08-03 David Malcolm <dmalcolm@redhat.com>
7970 * doc/gcov.texi (-x): Remove duplicate "to".
7971 * doc/invoke.texi (-Wnoexcept-type): Remove duplicate "calls".
7972 (-Wif-not-aligned): Remove duplicate "is".
7973 (-flto): Remove duplicate "the".
7974 (MicroBlaze Options): In examples of "-mcpu=cpu-type", remove
7975 duplicate "v5.00.b".
7976 (MSP430 Options): Remove duplicate "and" from the description
7977 of "-mgprel-sec=regexp".
7978 (x86 Options): Remove duplicate copies of "vmldLog102" and
7979 vmlsLog104 from description of "-mveclibabi=type".
7981 2018-08-03 Richard Sandiford <richard.sandiford@arm.com>
7983 * internal-fn.h (first_commutative_argument): Declare.
7984 * internal-fn.c (first_commutative_argument): New function.
7985 * tree-vect-slp.c (vect_get_and_check_slp_defs): Remove extra
7986 restrictions for pattern statements. Use first_commutative_argument
7987 to look for commutative operands in calls to internal functions.
7989 2018-08-03 Aldy Hernandez <aldyh@redhat.com>
7991 * Makefile.in (wide-int-range.o): New.
7992 * tree-vrp.c: Move all the wide_int_* functions to...
7993 * wide-int-range.cc: ...here.
7994 * tree-vrp.h: Move all the wide_int_* prototypes to...
7995 * wide-int-range.h: ...here.
7997 2018-08-03 Tom de Vries <tdevries@suse.de>
7999 * common/config/nvptx/nvptx-common.c (nvptx_except_unwind_info): Return
8001 * config/nvptx/nvptx.c (TARGET_ASM_BYTE_OP): Remove define.
8002 * except.c (output_function_exception_table): Do early exit if
8003 targetm_common.except_unwind_info (&global_options) == UI_NONE.
8005 2018-08-03 Martin Liska <mliska@suse.cz>
8007 * predict.c (dump_prediction): Change to 2 digits
8010 2018-08-03 Siddhesh Poyarekar <siddhesh@sourceware.org>
8012 * config/aarch64/falkor.md (falkor_am_1_vxvy_vxvy): Move
8014 (falkor_am_1_gtov_gtov): ... a new insn reservation.
8016 2018-07-19 Ilya Leoshkevich <iii@linux.ibm.com>
8018 * config/nds32/nds32.c (nds32_hard_regno_mode_ok): Replace > with >=.
8019 * df-problems.c (df_remove_dead_eq_notes): Replace > with >=.
8020 * dwarf2out.c (mem_loc_descriptor): Replace > with >=.
8021 * lra-constraints.c (spill_hard_reg_in_range): Replace <= with <.
8022 * lra-remat.c (call_used_input_regno_present_p): Replace <= with <.
8024 2018-08-02 David Malcolm <dmalcolm@redhat.com>
8026 * diagnostic-show-locus.c (diagnostic_show_locus): Use
8027 pp_take_prefix when saving the existing prefix.
8028 * diagnostic.c (diagnostic_append_note): Likewise.
8029 * langhooks.c (lhd_print_error_function): Likewise.
8030 * pretty-print.c (pp_set_prefix): Drop the "const" from "prefix"
8031 param's type. Free the existing prefix.
8032 (pp_take_prefix): New function.
8033 (pretty_printer::pretty_printer): Drop the prefix parameter.
8034 Rename the length parameter to match the comment.
8035 (pretty_printer::~pretty_printer): Free the prefix.
8036 * pretty-print.h (pretty_printer::pretty_printer): Drop the prefix
8038 (struct pretty_printer): Drop the "const" from "prefix" field's
8039 type and clarify memory management.
8040 (pp_set_prefix): Drop the "const" from the 2nd param.
8041 (pp_take_prefix): New decl.
8043 2018-08-02 Aaron Sawdey <acsawdey@linux.ibm.com>
8045 * config/rs6000/rs6000-string.c (select_block_compare_mode): Move test
8046 for word_mode_ok here instead of passing as argument.
8047 (expand_block_compare): Change select_block_compare_mode() call.
8048 (expand_strncmp_gpr_sequence): New function.
8049 (expand_strn_compare): Make use of expand_strncmp_gpr_sequence.
8051 2018-08-02 Jeff Law <law@redhat.com>
8054 * config/m68k/m68k.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
8055 Define to speculation_safe_value_not_needed.
8058 * config/h8300/h8300.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
8059 Define to speculation_safe_value_not_needed.
8061 2018-08-02 Tom de Vries <tdevries@suse.de>
8064 * common/config/nvptx/nvptx-common.c (nvptx_except_unwind_info): New
8065 function. Return UI_TARGET unconditionally.
8066 (TARGET_EXCEPT_UNWIND_INFO): Redefine to nvptx_except_unwind_info.
8067 * config/nvptx/nvptx.c (TARGET_ASM_BYTE_OP): Emit commented out '.byte'.
8069 2018-08-02 Richard Sandiford <richard.sandiford@arm.com>
8071 * genemit.c (print_overload_test): Fix typo.
8073 2018-08-02 Richard Biener <rguenther@suse.de>
8075 PR tree-optimization/86816
8076 * tree-ssa-tail-merge.c (tail_merge_valueize): New function
8077 which checks for value availability before querying it.
8078 (gvn_uses_equal): Use it.
8079 (same_succ_hash): Likewise.
8080 (gimple_equal_p): Likewise.
8082 2018-08-02 Nick Clifton <nickc@redhat.com>
8085 * config/stormy16/stormy16.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
8086 Define to speculation_safe_value_not_needed.
8089 * config/v850/v850.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
8090 Define to speculation_safe_value_not_needed.
8093 * config/v850/v850.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
8094 Define to speculation_safe_value_not_needed.
8097 * config/rx/rx.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
8098 Define to speculation_safe_value_not_needed.
8101 * config/msp430/msp430.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
8102 Define to speculation_safe_value_not_needed.
8105 * config/mcore/mcore.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
8106 Define to speculation_safe_value_not_needed.
8109 * config/m32r/m32r.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
8110 Define to speculation_safe_value_not_needed.
8113 * config/iq2000/iq2000.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
8114 Define to speculation_safe_value_not_needed.
8117 * config/frv/frv.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define to
8118 speculation_safe_value_not_needed.
8121 * config/fr30/fr30.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define
8122 to speculation_safe_value_not_needed.
8124 2018-08-02 Richard Sandiford <richard.sandiford@arm.com>
8126 * doc/md.texi: Expand the documentation of instruction names
8127 to mention port-local uses. Document '@' in pattern names.
8128 * read-md.h (overloaded_instance, overloaded_name): New structs.
8130 (md_reader::handle_overloaded_name): New member function.
8131 (md_reader::get_overloads): Likewise.
8132 (md_reader::m_first_overload): New member variable.
8133 (md_reader::m_next_overload_ptr): Likewise.
8134 (md_reader::m_overloads_htab): Likewise.
8135 * read-md.c (md_reader::md_reader): Initialize m_first_overload,
8136 m_next_overload_ptr and m_overloads_htab.
8137 * read-rtl.c (iterator_group): Add "type" and "get_c_token" fields.
8138 (get_mode_token, get_code_token, get_int_token): New functions.
8139 (map_attr_string): Add an optional argument that passes back
8140 the associated iterator.
8141 (overloaded_name_hash, overloaded_name_eq_p, named_rtx_p):
8142 (md_reader::handle_overloaded_name, add_overload_instance): New
8144 (apply_iterators): Handle '@' names. Report an error if '@'
8145 is used without iterators.
8146 (initialize_iterators): Initialize the new iterator_group fields.
8147 * genopinit.c (handle_overloaded_code_for)
8148 (handle_overloaded_gen): New functions.
8149 (main): Use them to print declarations of maybe_code_for_* and
8150 maybe_gen_* functions, and inline definitions of code_for_* and gen_*.
8151 * genemit.c (print_overload_arguments, print_overload_test)
8152 (handle_overloaded_code_for, handle_overloaded_gen): New functions.
8153 (main): Use it to print definitions of maybe_code_for_* and
8154 maybe_gen_* functions.
8155 * config/aarch64/aarch64.c (aarch64_split_128bit_move): Use
8156 gen_aarch64_mov{low,high}_di and gen_aarch64_movdi_{low,high}
8157 instead of explicit mode checks.
8158 (aarch64_split_simd_combine): Likewise gen_aarch64_simd_combine.
8159 (aarch64_split_simd_move): Likewise gen_aarch64_split_simd_mov.
8160 (aarch64_emit_load_exclusive): Likewise gen_aarch64_load_exclusive.
8161 (aarch64_emit_store_exclusive): Likewise gen_aarch64_store_exclusive.
8162 (aarch64_expand_compare_and_swap): Likewise
8163 gen_aarch64_compare_and_swap and gen_aarch64_compare_and_swap_lse
8164 (aarch64_gen_atomic_cas): Likewise gen_aarch64_atomic_cas.
8165 (aarch64_emit_atomic_swap): Likewise gen_aarch64_atomic_swp.
8166 (aarch64_constant_pool_reload_icode): Delete.
8167 (aarch64_secondary_reload): Use code_for_aarch64_reload_movcp
8168 instead of aarch64_constant_pool_reload_icode. Use
8169 code_for_aarch64_reload_mov instead of explicit mode checks.
8170 (rsqrte_type, get_rsqrte_type, rsqrts_type, get_rsqrts_type): Delete.
8171 (aarch64_emit_approx_sqrt): Use gen_aarch64_rsqrte instead of
8172 get_rsqrte_type and gen_aarch64_rsqrts instead of gen_rqrts_type.
8173 (recpe_type, get_recpe_type, recps_type, get_recps_type): Delete.
8174 (aarch64_emit_approx_div): Use gen_aarch64_frecpe instead of
8175 get_recpe_type and gen_aarch64_frecps instead of get_recps_type.
8176 (aarch64_atomic_load_op_code): Delete.
8177 (aarch64_emit_atomic_load_op): Likewise.
8178 (aarch64_gen_atomic_ldop): Use UNSPECV_ATOMIC_* instead of
8179 aarch64_atomic_load_op_code. Use gen_aarch64_atomic_load
8180 instead of aarch64_emit_atomic_load_op.
8181 * config/aarch64/aarch64.md (aarch64_reload_movcp<GPF_TF:mode><P:mode>)
8182 (aarch64_reload_movcp<VALL:mode><P:mode>, aarch64_reload_mov<mode>)
8183 (aarch64_movdi_<mode>low, aarch64_movdi_<mode>high)
8184 (aarch64_mov<mode>high_di, aarch64_mov<mode>low_di): Add a '@'
8185 character before the pattern name.
8186 * config/aarch64/aarch64-simd.md (aarch64_split_simd_mov<mode>)
8187 (aarch64_rsqrte<mode>, aarch64_rsqrts<mode>)
8188 (aarch64_simd_combine<mode>, aarch64_frecpe<mode>)
8189 (aarch64_frecps<mode>): Likewise.
8190 * config/aarch64/atomics.md (atomic_compare_and_swap<mode>)
8191 (aarch64_compare_and_swap<mode>, aarch64_compare_and_swap<mode>_lse)
8192 (aarch64_load_exclusive<mode>, aarch64_store_exclusive<mode>)
8193 (aarch64_atomic_swp<mode>, aarch64_atomic_cas<mode>)
8194 (aarch64_atomic_load<atomic_ldop><mode>): Likewise.
8196 2018-08-02 Richard Sandiford <richard.sandiford@arm.com>
8198 * config/aarch64/aarch64.c (aarch64_float_const_representable_p):
8199 Allow HFmode constants if TARGET_FP_F16INST.
8201 2018-08-02 Jackson Woodruff <jackson.woodruff@arm.com>
8204 * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp):
8205 No longer check last store for clobber of address register.
8207 2018-08-02 Martin Liska <mliska@suse.cz>
8209 PR gcov-profile/86817
8210 * gcov.c (process_all_functions): New function.
8212 (process_file): Move functions processing to
8213 process_all_functions.
8215 2018-08-02 David Malcolm <dmalcolm@redhat.com>
8217 * dumpfile.c (dump_user_location_t::dump_user_location_t): Add
8218 "const" to the "gimple *" and "rtx_insn *" parameters.
8219 * dumpfile.h (dump_user_location_t::dump_user_location_t):
8221 (dump_location_t::dump_location_t): Likewise.
8223 2018-08-01 Martin Sebor <msebor@redhat.com>
8225 PR tree-optimization/86650
8226 * gimple-pretty-print.c (percent_G_format): Accept a "gimple *"
8227 rather than a "gcall *". Directly pass the data of interest
8228 to percent_K_format, rather than building a temporary CALL_EXPR
8230 * gimple-fold.c (gimple_fold_builtin_strncpy): Adjust.
8231 (gimple_fold_builtin_strncat): Adjust.
8232 * gimple-ssa-warn-restrict.h (check_bounds_or_overlap): Replace
8233 gcall* argument with gimple*.
8234 * gimple-ssa-warn-restrict.c (check_call): Same.
8235 (wrestrict_dom_walker::before_dom_children): Same.
8236 (builtin_access::builtin_access): Same.
8237 (check_bounds_or_overlap): Same
8238 (maybe_diag_overlap): Same.
8239 (maybe_diag_offset_bounds): Same.
8240 * tree-diagnostic.c (default_tree_printer): Move usage of
8241 EXPR_LOCATION (t) and TREE_BLOCK (t) from within percent_K_format
8243 * tree-pretty-print.c (percent_K_format): Add argument.
8244 * tree-pretty-print.h: Add argument.
8245 * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Adjust.
8246 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Adjust.
8247 (maybe_diag_stxncpy_trunc): Same.
8248 (handle_builtin_stxncpy): Same.
8249 (handle_builtin_strcat): Same.
8251 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
8253 * match.pd: Optimise pointer range checks.
8255 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
8257 PR tree-optimization/86758
8258 * tree-vect-stmts.c (vectorizable_simd_clone_call): Don't try
8259 to remove pattern statements.
8261 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
8263 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Use the
8264 result of dfs_enumerate_from when constructing stmt_vec_infos,
8265 instead of additionally calling get_loop_body.
8267 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
8269 * tree-vectorizer.h (vect_create_data_ref_ptr): Remove inv_p
8271 * tree-vect-data-refs.c (vect_create_data_ref_ptr): Likewise.
8272 When creating an iv, assert that the step is not known to be zero.
8273 (vect_setup_realignment): Update call accordingly.
8274 * tree-vect-stmts.c (vectorizable_store): Likewise.
8275 (vectorizable_load): Likewise. Handle VMAT_INVARIANT separately.
8277 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
8279 * tree-vectorizer.h (vect_stmt_to_vectorize): New function.
8280 * tree-vect-loop.c (vect_update_vf_for_slp): Use it.
8281 (vectorizable_reduction): Likewise.
8282 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
8283 (vect_detect_hybrid_slp_stmts): Likewise.
8284 * tree-vect-stmts.c (vect_is_simple_use): Likewise.
8286 2018-08-01 Aldy Hernandez <aldyh@redhat.com>
8288 * tree-vrp (zero_nonzero_bits_from_bounds): Rename to...
8289 (wide_int_set_zero_nonzero_bits): ...this.
8290 (zero_nonzero_bits_from_vr): Rename to...
8291 (vrp_set_zero_nonzero_bits): ...this.
8292 (extract_range_from_multiplicative_op_1): Abstract wide int
8294 (wide_int_range_multiplicative_op): ...here.
8295 (extract_range_from_binary_expr_1): Extract wide int binary
8296 operations into their own functions.
8297 (wide_int_range_lshift): New.
8298 (wide_int_range_can_optimize_bit_op): New.
8299 (wide_int_range_shift_undefined_p): New.
8300 (wide_int_range_bit_xor): New.
8301 (wide_int_range_bit_ior): New.
8302 (wide_int_range_bit_and): New.
8303 (wide_int_range_trunc_mod): New.
8304 (extract_range_into_wide_ints): New.
8305 (vrp_shift_undefined_p): New.
8306 (extract_range_from_multiplicative_op): New.
8307 (vrp_can_optimize_bit_op): New.
8308 * tree-vrp.h (value_range::dump): New.
8309 (wide_int_range_multiplicative_op): New.
8310 (wide_int_range_lshift):New.
8311 (wide_int_range_shift_undefined_p): New.
8312 (wide_int_range_bit_xor): New.
8313 (wide_int_range_bit_ior): New.
8314 (wide_int_range_bit_and): New.
8315 (wide_int_range_trunc_mod): New.
8316 (zero_nonzero_bits_from_bounds): Rename to...
8317 (wide_int_set_zero_nonzero_bits): ...this.
8318 (zero_nonzero_bits_from_vr): Rename to...
8319 (vrp_set_zero_nonzero_bits): ...this.
8320 (range_easy_mask_min_max): Rename to...
8321 (wide_int_range_can_optimize_bit_op): this.
8322 * vr-values.c (simplify_bit_ops_using_ranges): Rename
8323 zero_nonzero_bits_from_vr into vrp_set_zero_nonzero_bits.
8325 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
8327 * tree-vectorizer.h (vect_orig_stmt): New function.
8328 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Use it.
8329 * tree-vect-loop.c (vect_model_reduction_cost): Likewise.
8330 (vect_create_epilog_for_reduction): Likewise.
8331 (vectorizable_live_operation): Likewise.
8332 * tree-vect-slp.c (vect_find_last_scalar_stmt_in_slp): Likewise.
8333 (vect_detect_hybrid_slp_stmts, vect_schedule_slp): Likewise.
8334 * tree-vect-stmts.c (vectorizable_call): Likewise.
8335 (vectorizable_simd_clone_call, vect_remove_stores): Likewise.
8337 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
8339 * tree-vectorizer.h (vect_transform_stmt): Remove grouped_store
8341 * tree-vect-stmts.c (vect_transform_stmt): Likewise.
8342 * tree-vect-loop.c (vect_transform_loop_stmt): Update call accordingly.
8343 (vect_transform_loop): Likewise.
8344 * tree-vect-slp.c (vect_schedule_slp_instance): Likewise.
8346 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
8348 * tree-vectorizer.h (vect_schedule_slp): Return void.
8349 * tree-vect-slp.c (vect_schedule_slp_instance): Likewise.
8350 (vect_schedule_slp): Likewise.
8352 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
8354 * tree-vect-loop.c (vect_transform_loop_stmt): Remove slp_scheduled
8356 (vect_transform_loop): Update calls accordingly. Schedule SLP
8357 instances before the main loop, if any exist.
8359 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
8361 PR tree-optimization/86749
8362 * tree-vect-patterns.c (vect_determine_min_output_precision_1):
8363 If the lhs is used in a COND_EXPR, check that it is being used
8364 as the "then" or "else" value.
8366 2018-08-01 Tom de Vries <tdevries@suse.de>
8369 * config/nvptx/nvptx.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define to
8370 speculation_safe_value_not_needed.
8372 2018-08-01 Richard Biener <rguenther@suse.de>
8374 * tree-ssa-sccvn.c (visit_phi): Compare invariant addresses
8377 2018-08-01 Martin Liska <mliska@suse.cz>
8379 * value-prof.c (gimple_divmod_fixed_value_transform): Unify
8380 format how successful transformation is dumped.
8381 (gimple_mod_pow2_value_transform): Likewise.
8382 (gimple_mod_subtract_transform): Likewise.
8383 (gimple_stringops_transform): Likewise.
8385 2018-08-01 Martin Liska <mliska@suse.cz>
8388 * value-prof.c (interesting_stringop_to_profile_p):
8389 Simplify the code and add BUILT_IN_MEMMOVE.
8390 (gimple_stringops_transform): Likewise.
8392 2018-08-01 Sam Tebbs <sam.tebbs@arm.com>
8394 * config/aarch64/aarch64-simd.md
8395 (*aarch64_get_lane_zero_extendsi<mode>): Rename to...
8396 (*aarch64_get_lane_zero_extend<GPI:mode><VDQQH:mode>): ... This and
8397 use GPI iterator instead of SI mode.
8399 2018-08-01 Richard Earnshaw <rearnsha@arm.com>
8401 * config/rs6000/rs6000.md (speculation_barrier): Renamed from
8402 rs6000_speculation_barrier.
8403 * config/rs6000/rs6000.c (rs6000_expand_builtin): Adjust for
8404 new barrier pattern name.
8406 2018-08-01 Richard Earnshaw <rearnsha@arm.com>
8408 * config/i386/i386.md (unspecv): Add UNSPECV_SPECULATION_BARRIER.
8409 (speculation_barrier): New insn.
8411 2018-08-01 Richard Biener <rguenther@suse.de>
8414 * graphite.h: Include isl/id.h and isl/space.h to allow build
8417 2018-08-01 Jan Willem Jagersma <jwjagersma@gmail.com>
8420 * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
8421 mode for COFF targets.
8422 * defaults.h (TARGET_COFF): Define.
8423 * config/i386/djgpp.h (TARGET_ASM_LTO_START, TARGET_ASM_LTO_END,
8424 TARGET_COFF): Define.
8425 (i386_djgpp_asm_lto_start, i386_djgpp_asm_lto_end): Declare.
8426 * config/i386/djgpp.c (saved_debug_info_level): New static variable.
8427 (i386_djgpp_asm_lto_start, i386_djgpp_asm_lto_end): New functions.
8429 2018-07-31 Alexandre Oliva <oliva@adacore.com>
8431 * gimple-streamer-in.c (input_bb): Restore BB discriminator.
8432 * gimple-streamer-out.c (output_bb): Save it.
8433 * lto-streamer-in.c (input_struct_function_base): Restore
8434 instance discriminator if available. Create map on demand.
8435 * lto-streamer-out.c (output_struct_function_base): Save it if
8437 * final.c (decl_to_instance_map): Document LTO strategy.
8439 2018-07-31 Alexandre Oliva <oliva@adacore.com>
8440 Olivier Hainque <hainque@adacore.com>
8442 * debug.h (decl_to_instance_map_t): New type.
8443 (decl_to_instance_map): Declare.
8444 (maybe_create_decl_to_instance_map): New inline function.
8445 * final.c (bb_discriminator, last_bb_discriminator): New statics,
8446 to track basic block discriminators.
8447 (final_start_function_1): Initialize them.
8448 (final_scan_insn_1): On NOTE_INSN_BASIC_BLOCK, track
8450 (decl_to_instance_map): New variable.
8451 (map_decl_to_instance, maybe_set_discriminator): New functions.
8452 (notice_source_line): Set discriminator.
8454 2018-07-31 Ian Lance Taylor <iant@golang.org>
8456 * targhooks.c (default_have_speculation_safe_value): Add
8459 2018-07-31 David Malcolm <dmalcolm@redhat.com>
8461 * dump-context.h: Include "pretty-print.h".
8462 (dump_context::refresh_dumps_are_enabled): New decl.
8463 (dump_context::emit_item): New decl.
8464 (class dump_context): Add fields "m_test_pp" and
8466 (temp_dump_context::temp_dump_context): Add param "test_pp_flags".
8467 (temp_dump_context::get_dumped_text): New decl.
8468 (class temp_dump_context): Add field "m_pp".
8469 * dumpfile.c (refresh_dumps_are_enabled): Convert to...
8470 (dump_context::refresh_dumps_are_enabled): ...and add a test for
8472 (set_dump_file): Update for above change.
8473 (set_alt_dump_file): Likewise.
8474 (dump_loc): New overload, taking a pretty_printer *.
8475 (dump_context::dump_loc): Call end_any_optinfo. Dump the location
8476 to any test pretty-printer.
8477 (make_item_for_dump_gimple_stmt): New function, adapted from
8478 optinfo::add_gimple_stmt.
8479 (dump_context::dump_gimple_stmt): Call it, and use the result,
8480 eliminating the direct usage of dump_file and alt_dump_file in
8481 favor of indirectly using them via emit_item.
8482 (make_item_for_dump_gimple_expr): New function, adapted from
8483 optinfo::add_gimple_expr.
8484 (dump_context::dump_gimple_expr): Call it, and use the result,
8485 eliminating the direct usage of dump_file and alt_dump_file in
8486 favor of indirectly using them via emit_item.
8487 (make_item_for_dump_generic_expr): New function, adapted from
8489 (dump_context::dump_generic_expr): Call it, and use the result,
8490 eliminating the direct usage of dump_file and alt_dump_file in
8491 favor of indirectly using them via emit_item.
8492 (make_item_for_dump_printf_va): New function, adapted from
8493 optinfo::add_printf_va.
8494 (make_item_for_dump_printf): New function.
8495 (dump_context::dump_printf_va): Call make_item_for_dump_printf_va,
8496 and use the result, eliminating the direct usage of dump_file and
8497 alt_dump_file in favor of indirectly using them via emit_item.
8498 (make_item_for_dump_dec): New function.
8499 (dump_context::dump_dec): Call it, and use the result,
8500 eliminating the direct usage of dump_file and alt_dump_file in
8501 favor of indirectly using them via emit_item.
8502 (make_item_for_dump_symtab_node): New function, adapted from
8503 optinfo::add_symtab_node.
8504 (dump_context::dump_symtab_node): Call it, and use the result,
8505 eliminating the direct usage of dump_file and alt_dump_file in
8506 favor of indirectly using them via emit_item.
8507 (dump_context::begin_scope): Reimplement, avoiding direct usage
8508 of dump_file and alt_dump_file in favor of indirectly using them
8510 (dump_context::emit_item): New member function.
8511 (temp_dump_context::temp_dump_context): Add param "test_pp_flags".
8512 Set up test pretty-printer on the underlying context. Call
8513 refresh_dumps_are_enabled.
8514 (temp_dump_context::~temp_dump_context): Call
8515 refresh_dumps_are_enabled.
8516 (temp_dump_context::get_dumped_text): New member function.
8517 (selftest::verify_dumped_text): New function.
8518 (ASSERT_DUMPED_TEXT_EQ): New macro.
8519 (selftest::test_capture_of_dump_calls): Run all tests twice, with
8520 and then without optinfo enabled. Add uses of
8521 ASSERT_DUMPED_TEXT_EQ to all tests. Add test of nested scopes.
8522 * dumpfile.h: Update comment for the dump_* API.
8523 * optinfo-emit-json.cc
8524 (selftest::test_building_json_from_dump_calls): Update for new
8525 param for temp_dump_context ctor.
8526 * optinfo.cc (optinfo_item::optinfo_item): Remove "owned" param
8527 and "m_owned" field.
8528 (optinfo_item::~optinfo_item): Likewise.
8529 (optinfo::add_item): New member function.
8530 (optinfo::emit): Update comment.
8531 (optinfo::add_string): Delete.
8532 (optinfo::add_printf): Delete.
8533 (optinfo::add_printf_va): Delete.
8534 (optinfo::add_gimple_stmt): Delete.
8535 (optinfo::add_gimple_expr): Delete.
8536 (optinfo::add_tree): Delete.
8537 (optinfo::add_symtab_node): Delete.
8538 (optinfo::add_dec): Delete.
8539 * optinfo.h (class dump_context): New forward decl.
8540 (optinfo::add_item): New decl.
8541 (optinfo::add_string): Delete.
8542 (optinfo::add_printf): Delete.
8543 (optinfo::add_printf_va): Delete.
8544 (optinfo::add_gimple_stmt): Delete.
8545 (optinfo::add_gimple_expr): Delete.
8546 (optinfo::add_tree): Delete.
8547 (optinfo::add_symtab_node): Delete.
8548 (optinfo::add_dec): Delete.
8549 (optinfo::add_poly_int): Delete.
8550 (optinfo_item::optinfo_item): Remove "owned" param.
8551 (class optinfo_item): Remove field "m_owned".
8553 2018-07-31 Jozef Lawrynowicz <jozef.l@mittosystems.com>
8556 * gcc/cfgexpand.c (set_parm_rtl): Use the alignment of Pmode when
8557 MAX_SUPPORTED_STACK_ALIGNMENT would otherwise be exceeded by the
8558 requested variable alignment.
8559 (expand_one_ssa_partition): Likewise.
8560 (expand_one_var): Likewise.
8562 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
8564 * config/pdp11/pdp11.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
8565 to speculation_safe_value_not_needed.
8567 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
8569 * targhooks.h (speculation_safe_value_not_needed): New prototype.
8570 * targhooks.c (speculation_safe_value_not_needed): New function.
8571 * target.def (have_speculation_safe_value): Update documentation.
8572 * doc/tm.texi: Regenerated.
8574 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
8576 * config/aarch64/iterators.md (ALLI_TI): New iterator.
8577 * config/aarch64/aarch64.md (despeculate_copy<ALLI_TI:mode>): New
8579 (despeculate_copy<ALLI:mode>_insn): New insn.
8580 (despeculate_copyti_insn): New insn.
8581 (despeculate_simple<ALLI:mode>): New insn
8582 (despeculate_simpleti): New insn.
8583 * config/aarch64/aarch64.c (aarch64_speculation_safe_value): New
8585 (TARGET_SPECULATION_SAFE_VALUE): Redefine to
8586 aarch64_speculation_safe_value.
8587 (aarch64_print_operand): Handle const0_rtx in modifier 'H'.
8589 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
8591 * config/aarch64/aarch64-speculation.cc: New file.
8592 * config/aarch64/aarch64-passes.def (pass_track_speculation): Add
8593 before pass_reorder_blocks.
8594 * config/aarch64/aarch64-protos.h (make_pass_track_speculation): Add
8596 * config/aarch64/aarch64.c (aarch64_conditional_register_usage): Fix
8597 X14 and X15 when tracking speculation.
8598 * config/aarch64/aarch64.md (register name constants): Add
8599 SPECULATION_TRACKER_REGNUM and SPECULATION_SCRATCH_REGNUM.
8600 (unspec): Add UNSPEC_SPECULATION_TRACKER.
8601 (speculation_barrier): New insn attribute.
8602 (cmp<mode>): Allow SP in comparisons.
8603 (speculation_tracker): New insn.
8604 (speculation_barrier): Add speculation_barrier attribute.
8605 * config/aarch64/t-aarch64: Add make rule for aarch64-speculation.o.
8606 * config.gcc (aarch64*-*-*): Add aarch64-speculation.o to extra_objs.
8607 * doc/invoke.texi (AArch64 Options): Document -mtrack-speculation.
8609 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
8611 * config/aarch64/aarch64.md (cb<optab><mode>1): Disable when
8612 aarch64_track_speculation is true.
8613 (tb<optab><mode>1): Likewise.
8614 * config/aarch64/aarch64.c (aarch64_split_compare_regs): Do not
8615 generate CB[N]Z when tracking speculation.
8616 (aarch64_split_compare_and_swap): Likewise.
8617 (aarch64_split_atomic_op): Likewise.
8619 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
8621 * config/aarch64/aarch64.opt (mtrack-speculation): New target option.
8623 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
8625 * config/aarch64.md (unspecv): Add UNSPECV_SPECULAION_BARRIER.
8626 (speculation_barrier): New insn.
8628 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
8630 * config/arm/unspecs.md (unspecv): Add VUNSPEC_SPECULATION_BARRIER.
8631 * config/arm/arm.md (speculation_barrier): New expand.
8632 (speculation_barrier_insn): New pattern.
8634 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
8636 * builtin-types.def (BT_FN_PTR_PTR_VAR): New function type.
8637 (BT_FN_I1_I1_VAR, BT_FN_I2_I2_VAR, BT_FN_I4_I4_VAR): Likewise.
8638 (BT_FN_I8_I8_VAR, BT_FN_I16_I16_VAR): Likewise.
8639 * builtin-attrs.def (ATTR_NOVOPS_NOTHROW_LEAF_LIST): New attribute
8641 * builtins.def (BUILT_IN_SPECULATION_SAFE_VALUE_N): New builtin.
8642 (BUILT_IN_SPECULATION_SAFE_VALUE_PTR): New internal builtin.
8643 (BUILT_IN_SPECULATION_SAFE_VALUE_1): Likewise.
8644 (BUILT_IN_SPECULATION_SAFE_VALUE_2): Likewise.
8645 (BUILT_IN_SPECULATION_SAFE_VALUE_4): Likewise.
8646 (BUILT_IN_SPECULATION_SAFE_VALUE_8): Likewise.
8647 (BUILT_IN_SPECULATION_SAFE_VALUE_16): Likewise.
8648 * builtins.c (expand_speculation_safe_value): New function.
8649 (expand_builtin): Call it.
8650 * doc/cpp.texi: Document predefine __HAVE_SPECULATION_SAFE_VALUE.
8651 * doc/extend.texi: Document __builtin_speculation_safe_value.
8652 * doc/md.texi: Document "speculation_barrier" pattern.
8653 * doc/tm.texi.in: Pull in TARGET_SPECULATION_SAFE_VALUE and
8654 TARGET_HAVE_SPECULATION_SAFE_VALUE.
8655 * doc/tm.texi: Regenerated.
8656 * target.def (have_speculation_safe_value, speculation_safe_value): New
8658 * targhooks.c (default_have_speculation_safe_value): New function.
8659 (default_speculation_safe_value): New function.
8660 * targhooks.h (default_have_speculation_safe_value): Add prototype.
8661 (default_speculation_safe_value): Add prototype.
8663 2018-07-31 David Malcolm <dmalcolm@redhat.com>
8665 * dump-context.h (dump_context::dump_loc): New decl.
8666 * dumpfile.c (dump_context::dump_loc): New member function.
8667 (dump_context::dump_gimple_stmt_loc): Reimplement using dump_loc
8668 and dump_gimple_stmt.
8669 (dump_context::dump_gimple_expr_loc): Likewise, using
8671 (dump_context::dump_generic_expr_loc): Likewise, using
8673 (dump_context::dump_printf_loc_va): Likewise, using
8675 (dump_context::begin_scope): Explicitly using the global function
8676 "dump_loc", rather than the member function.
8678 2018-07-31 Martin Sebor <msebor@redhat.com>
8680 PR tree-optimization/86741
8681 * tree-vrp.c (vrp_prop::check_mem_ref): Avoid incomplete types.
8683 2018-07-31 Andreas Krebbel <krebbel@linux.ibm.com>
8685 * config/s390/s390.c (s390_expand_setmem): Make the unrolling to
8686 depend on whether prefetch instructions will be emitted or not.
8687 Use TARGET_SETMEM_PFD for checking whether prefetch instructions
8688 will be emitted or not.
8689 * config/s390/s390.h (TARGET_SETMEM_PREFETCH_DISTANCE)
8690 (TARGET_SETMEM_PFD): New macros.
8692 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8694 * tree-vectorizer.h (stmt_vec_info): Turn back into a typedef.
8695 (NULL_STMT_VEC_INFO): Delete.
8696 (stmt_vec_info::operator*): Likewise.
8697 (stmt_vec_info::operator gimple *): Likewise.
8698 * tree-vect-loop.c (vectorizable_reduction): Use NULL instead
8699 of NULL_STMT_VEC_INFO.
8700 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
8701 (vect_reassociating_reduction_p): Likewise.
8702 * tree-vect-stmts.c (vect_build_gather_load_calls): Likewise.
8703 (vectorizable_store): Likewise.
8704 * tree-vectorizer.c (vec_info::set_vinfo_for_stmt): Likewise.
8705 (vec_info::free_stmt_vec_infos): Likewise.
8707 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8709 * tree-vectorizer.h (vect_stmt_in_region_p): Delete.
8710 * tree-vectorizer.c (vect_stmt_in_region_p): Likewise.
8712 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8714 * tree-vectorizer.h (vec_info::new_vinfo_for_stmt)
8715 (vec_info::set_vinfo_for_stmt, vec_info::free_stmt_vec_infos)
8716 (vec_info::free_stmt_vec_info): New private member functions.
8717 (set_stmt_vec_info_vec, free_stmt_vec_infos, vinfo_for_stmt)
8718 (set_vinfo_for_stmt, new_stmt_vec_info, free_stmt_vec_info): Delete.
8719 * tree-parloops.c (gather_scalar_reductions): Remove calls to
8720 set_stmt_vec_info_vec and free_stmt_vec_infos.
8721 * tree-vect-loop.c (_loop_vec_info): Remove call to
8722 set_stmt_vec_info_vec.
8723 * tree-vect-stmts.c (new_stmt_vec_info, set_stmt_vec_info_vec)
8724 (free_stmt_vec_infos, free_stmt_vec_info): Delete in favor of...
8725 * tree-vectorizer.c (vec_info::new_stmt_vec_info)
8726 (vec_info::set_vinfo_for_stmt, vec_info::free_stmt_vec_infos)
8727 (vec_info::free_stmt_vec_info): ...these new functions. Remove
8728 assignments in {vec_info::,}new_stmt_vec_info that are redundant
8729 with the clearing in the xcalloc.
8730 (stmt_vec_info_vec): Delete.
8731 (vec_info::vec_info): Don't call set_stmt_vec_info_vec.
8732 (vectorize_loops): Likewise.
8733 (vec_info::~vec_info): Remove argument from call to
8734 free_stmt_vec_infos.
8735 (vec_info::add_stmt): Remove vinfo argument from call to
8738 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8740 * tree-vectorizer.h (free_stmt_vec_info): Take a stmt_vec_info
8741 rather than a gimple stmt.
8742 * tree-vect-stmts.c (free_stmt_vec_info): Likewise. Don't free
8743 information for pattern statements when passed the original
8744 statement; instead wait to be passed the pattern statement itself.
8745 Don't call set_vinfo_for_stmt here.
8746 (free_stmt_vec_infos): Update call to free_stmt_vec_info.
8747 * tree-vect-loop.c (_loop_vec_info::~loop_vec_info): Don't free
8748 stmt_vec_infos here.
8749 * tree-vect-slp.c (_bb_vec_info::~bb_vec_info): Likewise.
8750 * tree-vectorizer.c (vec_info::remove_stmt): Nullify the statement's
8751 stmt_vec_infos entry.
8753 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8755 * tree-vectorizer.h (vec_info::replace_stmt): Declare.
8756 * tree-vectorizer.c (vec_info::replace_stmt): New function.
8757 * tree-vect-slp.c (vect_remove_slp_scalar_calls): Use it.
8758 * tree-vect-stmts.c (vectorizable_call): Likewise.
8759 (vectorizable_simd_clone_call): Likewise.
8761 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8763 * tree-vectorizer.h (vec_info::remove_stmt): Declare.
8764 * tree-vectorizer.c (vec_info::remove_stmt): New function.
8765 * tree-vect-loop-manip.c (vect_set_loop_condition): Use it.
8766 * tree-vect-loop.c (vect_transform_loop): Likewise.
8767 * tree-vect-slp.c (vect_schedule_slp): Likewise.
8768 * tree-vect-stmts.c (vect_remove_stores): Likewise.
8770 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8772 * tree-vectorizer.h (vec_info::lookup_dr): New member function.
8773 (vect_dr_stmt): Delete.
8774 * tree-vectorizer.c (vec_info::lookup_dr): New function.
8775 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Use it instead
8777 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
8778 (vect_analyze_data_ref_dependence, vect_record_base_alignments)
8779 (vect_verify_datarefs_alignment, vect_peeling_supportable)
8780 (vect_analyze_data_ref_accesses, vect_prune_runtime_alias_test_list)
8781 (vect_analyze_data_refs): Likewise.
8782 (vect_slp_analyze_data_ref_dependence): Likewise. Take a vec_info
8784 (vect_find_same_alignment_drs): Likewise.
8785 (vect_slp_analyze_node_dependences): Update calls accordingly.
8786 (vect_analyze_data_refs_alignment): Likewise. Use vec_info::lookup_dr
8787 instead of DR_VECT_AUX.
8788 (vect_get_peeling_costs_all_drs): Take a loop_vec_info instead
8789 of a vector data references. Use vec_info::lookup_dr instead of
8791 (vect_peeling_hash_get_lowest_cost): Update calls accordingly.
8792 (vect_enhance_data_refs_alignment): Likewise. Use vec_info::lookup_dr
8793 instead of DR_VECT_AUX.
8795 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8797 * tree-vectorizer.h (_loop_vec_info::unaligned_dr): Change to
8799 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Update
8801 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
8802 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
8803 (vect_gen_prolog_loop_niters): Likewise.
8805 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8807 * tree-vectorizer.h (set_dr_misalignment, dr_misalignment)
8808 (DR_TARGET_ALIGNMENT, aligned_access_p, known_alignment_for_access_p)
8809 (vect_known_alignment_in_bytes, vect_dr_behavior)
8810 (vect_get_scalar_dr_size): Take references as dr_vec_infos
8811 instead of data_references. Update calls to other routines for
8812 which the same change has been made.
8813 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Take
8814 dr_vec_infos instead of stmt_vec_infos.
8815 (vect_analyze_data_ref_dependence): Update call accordingly.
8816 (vect_slp_analyze_data_ref_dependence)
8817 (vect_record_base_alignments): Use DR_VECT_AUX.
8818 (vect_calculate_target_alignment, vect_compute_data_ref_alignment)
8819 (vect_update_misalignment_for_peel, verify_data_ref_alignment)
8820 (vector_alignment_reachable_p, vect_get_data_access_cost)
8821 (vect_peeling_supportable, vect_analyze_group_access_1)
8822 (vect_analyze_group_access, vect_analyze_data_ref_access)
8823 (vect_vfa_segment_size, vect_vfa_access_size, vect_vfa_align)
8824 (vect_compile_time_alias, vect_small_gap_p)
8825 (vectorizable_with_step_bound_p, vect_duplicate_ssa_name_ptr_info):
8826 (vect_supportable_dr_alignment): Take references as dr_vec_infos
8827 instead of data_references. Update calls to other routines for
8828 which the same change has been made.
8829 (vect_verify_datarefs_alignment, vect_get_peeling_costs_all_drs)
8830 (vect_find_same_alignment_drs, vect_analyze_data_refs_alignment)
8831 (vect_slp_analyze_and_verify_node_alignment)
8832 (vect_analyze_data_ref_accesses, vect_prune_runtime_alias_test_list)
8833 (vect_create_addr_base_for_vector_ref, vect_create_data_ref_ptr)
8834 (vect_setup_realignment): Use dr_vec_infos. Update calls after
8836 (_vect_peel_info::dr): Replace with...
8837 (_vect_peel_info::dr_info): ...this new field.
8838 (vect_peeling_hash_get_most_frequent)
8839 (vect_peeling_hash_choose_best_peeling): Update accordingly.
8840 (vect_peeling_hash_get_lowest_cost):
8841 (vect_enhance_data_refs_alignment): Likewise. Update calls to other
8842 routines for which the same change has been made.
8843 (vect_peeling_hash_insert): Likewise. Take a dr_vec_info instead of a
8845 * tree-vect-loop-manip.c (get_misalign_in_elems)
8846 (vect_gen_prolog_loop_niters): Use dr_vec_infos. Update calls after
8848 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
8849 * tree-vect-stmts.c (vect_get_store_cost, vect_get_load_cost)
8850 (vect_truncate_gather_scatter_offset, compare_step_with_zero)
8851 (get_group_load_store_type, get_negative_load_store_type)
8852 (vect_get_data_ptr_increment, vectorizable_store)
8853 (vectorizable_load): Likewise.
8854 (ensure_base_align): Take a dr_vec_info instead of a data_reference.
8855 Update calls to other routines for which the same change has been made.
8857 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8859 * tree-vectorizer.h (vec_info::move_dr): New member function.
8860 (dataref_aux): Rename to...
8861 (dr_vec_info): ...this and add "dr" and "stmt" fields.
8862 (_stmt_vec_info::dr_aux): Update accordingly.
8863 (_stmt_vec_info::data_ref_info): Delete.
8864 (STMT_VINFO_GROUPED_ACCESS, DR_GROUP_FIRST_ELEMENT)
8865 (DR_GROUP_NEXT_ELEMENT, DR_GROUP_SIZE, DR_GROUP_STORE_COUNT)
8866 (DR_GROUP_GAP, DR_GROUP_SAME_DR_STMT, REDUC_GROUP_FIRST_ELEMENT):
8867 (REDUC_GROUP_NEXT_ELEMENT, REDUC_GROUP_SIZE): Use dr_aux.dr instead
8869 (STMT_VINFO_DATA_REF): Likewise. Turn into an lvalue.
8870 (STMT_VINFO_DR_INFO): New macro.
8871 (DR_VECT_AUX): Use STMT_VINFO_DR_INKFO and vect_dr_stmt.
8872 (set_dr_misalignment): Update after rename of dataref_aux.
8873 (vect_dr_stmt): Move earlier in file. Return dr_aux.stmt.
8874 * tree-vect-stmts.c (new_stmt_vec_info): Remove redundant
8875 initialization of STMT_VINFO_DATA_REF.
8876 * tree-vectorizer.c (vec_info::move_dr): New function.
8877 * tree-vect-patterns.c (vect_recog_bool_pattern)
8878 (vect_recog_mask_conversion_pattern)
8879 (vect_recog_gather_scatter_pattern): Use it.
8880 * tree-vect-data-refs.c (vect_analyze_data_refs): Initialize
8881 the "dr" and "stmt" fields of dr_vec_info instead of
8882 STMT_VINFO_DATA_REF.
8884 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8886 * tree-vectorizer.h (_stmt_vec_info::pattern_stmt_p): New field.
8887 (is_pattern_stmt_p): Use it.
8888 * tree-vect-patterns.c (vect_init_pattern_stmt): Set pattern_stmt_p
8889 on pattern statements.
8891 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8893 * tree-vect-patterns.c (vect_mark_pattern_stmts): Take the
8894 original stmt as a stmt_vec_info rather than a gimple stmt.
8895 (vect_pattern_recog_1): Take the statement directly as a
8896 stmt_vec_info, rather than via a gimple_stmt_iterator.
8897 Update call to vect_mark_pattern_stmts.
8898 (vect_pattern_recog): Update calls accordingly.
8900 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8902 * tree-vectorizer.h (vect_get_vec_defs_for_stmt_copy)
8903 (vect_get_vec_def_for_stmt_copy): Take a vec_info rather than
8904 a vect_def_type for the first argument.
8905 * tree-vect-stmts.c (vect_get_vec_defs_for_stmt_copy): Likewise.
8906 (vect_get_vec_def_for_stmt_copy): Likewise. Return the original
8907 operand if it isn't defined by a vectorized statement.
8908 (vect_build_gather_load_calls): Remove the mask_dt argument and
8909 update calls to vect_get_vec_def_for_stmt_copy.
8910 (vectorizable_bswap): Likewise the dt argument.
8911 (vectorizable_call): Update calls to vectorizable_bswap and
8912 vect_get_vec_def_for_stmt_copy.
8913 (vectorizable_simd_clone_call, vectorizable_assignment)
8914 (vectorizable_shift, vectorizable_operation, vectorizable_condition)
8915 (vectorizable_comparison): Update calls to
8916 vect_get_vec_def_for_stmt_copy.
8917 (vectorizable_store): Likewise. Remove now-unnecessary calls to
8919 (vect_get_loop_based_defs): Remove dt argument and update call
8920 to vect_get_vec_def_for_stmt_copy.
8921 (vectorizable_conversion): Update calls to vect_get_loop_based_defs
8922 and vect_get_vec_def_for_stmt_copy.
8923 (vectorizable_load): Update calls to vect_build_gather_load_calls
8924 and vect_get_vec_def_for_stmt_copy.
8925 * tree-vect-loop.c (vect_create_epilog_for_reduction)
8926 (vectorizable_reduction, vectorizable_live_operation): Update calls
8927 to vect_get_vec_def_for_stmt_copy.
8929 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8931 * tree-vect-data-refs.c (vect_record_base_alignment): Replace vec_info
8932 and gimple stmt arguments with a stmt_vec_info.
8933 (vect_record_base_alignments): Update calls accordingly.
8934 * tree-vect-slp.c (vect_record_max_nunits): Replace vec_info
8935 and gimple stmt arguments with a stmt_vec_info.
8936 (vect_build_slp_tree_1): Remove vinfo argument and update call
8937 to vect_record_max_nunits.
8938 (vect_build_slp_tree_2): Update calls to vect_build_slp_tree_1
8939 and vect_record_max_nunits.
8941 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8943 * tree-vectorizer.h (nested_in_vect_loop_p): Move further down
8944 file and take a stmt_vec_info instead of a gimple stmt.
8945 (supportable_widening_operation, vect_finish_replace_stmt)
8946 (vect_finish_stmt_generation, vect_get_store_rhs)
8947 (vect_get_vec_def_for_operand_1, vect_get_vec_def_for_operand)
8948 (vect_get_vec_defs, vect_init_vector, vect_transform_stmt)
8949 (vect_remove_stores, vect_analyze_stmt, vectorizable_condition)
8950 (vect_get_smallest_scalar_type, vect_check_gather_scatter)
8951 (vect_create_data_ref_ptr, bump_vector_ptr)
8952 (vect_permute_store_chain, vect_setup_realignment)
8953 (vect_transform_grouped_load, vect_record_grouped_load_vectors)
8954 (vect_create_addr_base_for_vector_ref, vectorizable_live_operation)
8955 (vectorizable_reduction, vectorizable_induction)
8956 (get_initial_def_for_reduction, is_simple_and_all_uses_invariant)
8957 (vect_get_place_in_interleaving_chain): Take stmt_vec_infos rather
8958 than gimple stmts as arguments.
8959 * tree-vect-data-refs.c (vect_get_smallest_scalar_type)
8960 (vect_preserves_scalar_order_p, vect_slp_analyze_node_dependences)
8961 (can_group_stmts_p, vect_check_gather_scatter)
8962 (vect_create_addr_base_for_vector_ref, vect_create_data_ref_ptr)
8963 (bump_vector_ptr, vect_permute_store_chain, vect_setup_realignment)
8964 (vect_permute_load_chain, vect_shift_permute_load_chain)
8965 (vect_transform_grouped_load)
8966 (vect_record_grouped_load_vectors): Likewise.
8967 * tree-vect-loop.c (vect_fixup_reduc_chain)
8968 (get_initial_def_for_reduction, vect_create_epilog_for_reduction)
8969 (vectorize_fold_left_reduction, is_nonwrapping_integer_induction)
8970 (vectorizable_reduction, vectorizable_induction)
8971 (vectorizable_live_operation, vect_loop_kill_debug_uses): Likewise.
8972 * tree-vect-patterns.c (type_conversion_p, adjust_bool_stmts)
8973 (vect_get_load_store_mask): Likewise.
8974 * tree-vect-slp.c (vect_get_place_in_interleaving_chain)
8975 (vect_analyze_slp_instance, vect_mask_constant_operand_p): Likewise.
8976 * tree-vect-stmts.c (vect_mark_relevant)
8977 (is_simple_and_all_uses_invariant)
8978 (exist_non_indexing_operands_for_use_p, process_use)
8979 (vect_init_vector_1, vect_init_vector, vect_get_vec_def_for_operand_1)
8980 (vect_get_vec_def_for_operand, vect_get_vec_defs)
8981 (vect_finish_stmt_generation_1, vect_finish_replace_stmt)
8982 (vect_finish_stmt_generation, vect_truncate_gather_scatter_offset)
8983 (compare_step_with_zero, vect_get_store_rhs, get_group_load_store_type)
8984 (get_negative_load_store_type, get_load_store_type)
8985 (vect_check_load_store_mask, vect_check_store_rhs)
8986 (vect_build_gather_load_calls, vect_get_strided_load_store_ops)
8987 (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
8988 (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
8989 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
8990 (get_group_alias_ptr_type, vectorizable_store, hoist_defs_of_uses)
8991 (vectorizable_load, vectorizable_condition, vectorizable_comparison)
8992 (vect_analyze_stmt, vect_transform_stmt, vect_remove_stores)
8993 (supportable_widening_operation): Likewise.
8995 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8997 * tree-vect-data-refs.c (vect_describe_gather_scatter_call): Take
8998 a stmt_vec_info instead of a gcall.
8999 (vect_check_gather_scatter): Update call accordingly.
9000 * tree-vect-loop-manip.c (iv_phi_p): Take a stmt_vec_info instead
9002 (vect_can_advance_ivs_p, vect_update_ivs_after_vectorizer)
9003 (slpeel_update_phi_nodes_for_loops):): Update calls accordingly.
9004 * tree-vect-loop.c (vect_transform_loop_stmt): Take a stmt_vec_info
9005 instead of a gimple stmt.
9006 (vect_transform_loop): Update calls accordingly.
9007 * tree-vect-slp.c (vect_split_slp_store_group): Take and return
9008 stmt_vec_infos instead of gimple stmts.
9009 (vect_analyze_slp_instance): Update use accordingly.
9010 * tree-vect-stmts.c (read_vector_array, write_vector_array)
9011 (vect_clobber_variable, vect_stmt_relevant_p, permute_vec_elements)
9012 (vect_use_strided_gather_scatters_p, vect_build_all_ones_mask)
9013 (vect_build_zero_merge_argument, vect_get_gather_scatter_ops)
9014 (vect_gen_widened_results_half, vect_get_loop_based_defs)
9015 (vect_create_vectorized_promotion_stmts, can_vectorize_live_stmts):
9016 Take a stmt_vec_info instead of a gimple stmt and pass stmt_vec_infos
9017 down to subroutines.
9019 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
9021 * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Change the type
9022 of the worklist from a vector of gimple stmts to a vector of
9024 * tree-vect-stmts.c (vect_mark_relevant, process_use)
9025 (vect_mark_stmts_to_be_vectorized): Likewise
9027 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
9029 * tree-vect-loop.c (vect_analyze_loop_operations): Look up the
9030 statement before passing it to vect_analyze_stmt.
9031 (vect_create_epilog_for_reduction): Use a stmt_vec_info to walk
9032 the chain of phi vector definitions. Track the exit phi via its
9034 (vectorizable_reduction): Set cond_stmt_vinfo directly from the
9035 STMT_VINFO_REDUC_DEF.
9036 * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Use
9037 stmt_vec_infos to handle the statement chains.
9038 (vect_get_slp_defs): Record the first statement in the node
9039 using a stmt_vec_info.
9040 * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Look up
9041 statements here and pass their stmt_vec_info down to subroutines.
9042 (vect_init_vector_1): Hoist call to vinfo_for_stmt and pass it
9043 down to vect_finish_stmt_generation.
9044 (vect_init_vector, vect_get_vec_defs, vect_finish_replace_stmt)
9045 (vect_finish_stmt_generation): Call vinfo_for_stmt and pass
9046 stmt_vec_infos to subroutines.
9047 (vect_remove_stores): Use stmt_vec_infos to handle the statement
9050 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
9052 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences):
9053 (vect_check_gather_scatter, vect_create_data_ref_ptr, bump_vector_ptr)
9054 (vect_permute_store_chain, vect_setup_realignment)
9055 (vect_permute_load_chain, vect_shift_permute_load_chain)
9056 (vect_transform_grouped_load): Use stmt_vec_info rather than gimple
9057 stmts internally, and when passing values to other vectorizer routines.
9058 * tree-vect-loop-manip.c (vect_can_advance_ivs_p): Likewise.
9059 * tree-vect-loop.c (vect_analyze_scalar_cycles_1)
9060 (vect_analyze_loop_operations, get_initial_def_for_reduction)
9061 (vect_create_epilog_for_reduction, vectorize_fold_left_reduction)
9062 (vectorizable_reduction, vectorizable_induction)
9063 (vectorizable_live_operation, vect_transform_loop_stmt)
9064 (vect_transform_loop): Likewise.
9065 * tree-vect-patterns.c (vect_reassociating_reduction_p)
9066 (vect_recog_widen_op_pattern, vect_recog_mixed_size_cond_pattern)
9067 (vect_recog_bool_pattern, vect_recog_gather_scatter_pattern): Likewise.
9068 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
9069 (vect_slp_analyze_node_operations_1): Likewise.
9070 * tree-vect-stmts.c (vect_mark_relevant, process_use)
9071 (exist_non_indexing_operands_for_use_p, vect_init_vector_1)
9072 (vect_mark_stmts_to_be_vectorized, vect_get_vec_def_for_operand)
9073 (vect_finish_stmt_generation_1, get_group_load_store_type)
9074 (get_load_store_type, vect_build_gather_load_calls)
9075 (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
9076 (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
9077 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
9078 (vectorizable_store, vectorizable_load, vectorizable_condition)
9079 (vectorizable_comparison, vect_analyze_stmt, vect_transform_stmt)
9080 (supportable_widening_operation): Likewise.
9081 (vect_get_vector_types_for_stmt): Likewise.
9082 * tree-vectorizer.h (vect_dr_behavior): Likewise.
9084 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
9086 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
9087 (vect_slp_analyze_node_dependences, vect_analyze_data_ref_accesses)
9088 (vect_permute_store_chain, vect_permute_load_chain)
9089 (vect_shift_permute_load_chain, vect_transform_grouped_load): Avoid
9090 repeated stmt_vec_info lookups.
9091 * tree-vect-loop-manip.c (vect_can_advance_ivs_p): Likewise.
9092 (vect_update_ivs_after_vectorizer): Likewise.
9093 * tree-vect-loop.c (vect_is_simple_reduction): Likewise.
9094 (vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
9095 * tree-vect-patterns.c (adjust_bool_stmts): Likewise.
9096 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
9097 (vect_bb_slp_scalar_cost): Likewise.
9098 * tree-vect-stmts.c (get_group_alias_ptr_type): Likewise.
9100 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
9102 * tree-vect-data-refs.c (vect_check_gather_scatter): Pass the
9103 gcall rather than the generic gimple stmt to gimple_call_internal_fn.
9104 (vect_get_smallest_scalar_type, can_group_stmts_p): Use dyn_cast
9105 to get gassigns and gcalls, rather than operating on generc gimple
9107 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p)
9108 (vect_mark_stmts_to_be_vectorized, vectorizable_store)
9109 (vectorizable_load, vect_analyze_stmt): Likewise.
9110 * tree-vect-loop.c (vectorizable_reduction): Likewise gphi.
9112 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
9114 * tree-vectorizer.h (get_earlier_stmt, get_later_stmt): Take and
9115 return stmt_vec_infos rather than gimple stmts. Do not accept
9117 (vect_find_last_scalar_stmt_in_slp): Return a stmt_vec_info instead
9119 * tree-vect-slp.c (vect_find_last_scalar_stmt_in_slp): Likewise.
9120 Update use of get_later_stmt.
9121 (vect_get_constant_vectors): Update call accordingly.
9122 (vect_schedule_slp_instance): Likewise
9123 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Likewise.
9124 (vect_slp_analyze_instance_dependence): Likewise.
9125 (vect_preserves_scalar_order_p): Update use of get_earlier_stmt.
9127 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
9129 * tree-vectorizer.h (stmt_info_for_cost::stmt): Replace with...
9130 (stmt_info_for_cost::stmt_info): ...this new field.
9131 (add_stmt_costs): Update accordingly.
9132 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
9133 (vect_get_known_peeling_cost): Likewise.
9134 (vect_estimate_min_profitable_iters): Likewise.
9135 * tree-vect-stmts.c (record_stmt_cost): Likewise.
9137 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
9139 * tree-vectorizer.h (_loop_vec_info::may_misalign_stmts): Change
9140 from an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
9141 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Update
9143 * tree-vect-loop-manip.c (vect_create_cond_for_align_checks): Likewise.
9145 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
9147 * tree-vectorizer.h (_stmt_vec_info::same_dr_stmt): Change from
9148 a gimple stmt to a stmt_vec_info.
9149 * tree-vect-stmts.c (vectorizable_load): Update accordingly.
9151 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
9153 * tree-vectorizer.h (vec_info::grouped_stores): Change from
9154 an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
9155 (_loop_vec_info::reduction_chains): Likewise.
9156 * tree-vect-loop.c (vect_fixup_scalar_cycles_with_patterns): Update
9158 * tree-vect-slp.c (vect_analyze_slp): Likewise.
9160 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
9162 * tree-vectorizer.h (_stmt_vec_info::first_element): Change from
9163 a gimple stmt to a stmt_vec_info.
9164 (_stmt_vec_info::next_element): Likewise.
9165 * tree-vect-data-refs.c (vect_update_misalignment_for_peel)
9166 (vect_slp_analyze_and_verify_node_alignment)
9167 (vect_analyze_group_access_1, vect_analyze_group_access)
9168 (vect_small_gap_p, vect_prune_runtime_alias_test_list)
9169 (vect_create_data_ref_ptr, vect_record_grouped_load_vectors)
9170 (vect_supportable_dr_alignment): Update accordingly.
9171 * tree-vect-loop.c (vect_fixup_reduc_chain): Likewise.
9172 (vect_fixup_scalar_cycles_with_patterns, vect_is_slp_reduction)
9173 (vect_is_simple_reduction, vectorizable_reduction): Likewise.
9174 * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
9175 * tree-vect-slp.c (vect_build_slp_tree_1)
9176 (vect_attempt_slp_rearrange_stmts, vect_supported_load_permutation_p)
9177 (vect_split_slp_store_group, vect_analyze_slp_instance)
9178 (vect_analyze_slp, vect_transform_slp_perm_load): Likewise.
9179 * tree-vect-stmts.c (vect_model_store_cost, vect_model_load_cost)
9180 (get_group_load_store_type, get_load_store_type)
9181 (get_group_alias_ptr_type, vectorizable_store, vectorizable_load)
9182 (vect_transform_stmt, vect_remove_stores): Likewise.
9184 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
9186 * tree-vectorizer.h (vect_dr_stmt): Return a stmt_vec_info rather
9188 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
9189 (vect_slp_analyze_data_ref_dependence, vect_record_base_alignments)
9190 (vect_calculate_target_alignmentm, vect_compute_data_ref_alignment)
9191 (vect_update_misalignment_for_peel, vect_verify_datarefs_alignment)
9192 (vector_alignment_reachable_p, vect_get_data_access_cost)
9193 (vect_get_peeling_costs_all_drs, vect_peeling_hash_get_lowest_cost)
9194 (vect_peeling_supportable, vect_enhance_data_refs_alignment)
9195 (vect_find_same_alignment_drs, vect_analyze_data_refs_alignment)
9196 (vect_analyze_group_access_1, vect_analyze_group_access)
9197 (vect_analyze_data_ref_access, vect_analyze_data_ref_accesses)
9198 (vect_vfa_access_size, vect_small_gap_p, vect_analyze_data_refs)
9199 (vect_supportable_dr_alignment): Remove vinfo_for_stmt from the
9200 result of vect_dr_stmt and use the stmt_vec_info instead of
9201 the associated gimple stmt.
9202 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
9203 (vect_gen_prolog_loop_niters): Likewise.
9204 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
9206 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
9208 * tree-vectorizer.h (_slp_tree::stmts): Change from a vec<gimple *>
9209 to a vec<stmt_vec_info>.
9210 * tree-vect-slp.c (vect_free_slp_tree): Update accordingly.
9211 (vect_create_new_slp_node): Take a vec<gimple *> instead of a
9213 (_slp_oprnd_info::def_stmts): Change from a vec<gimple *>
9214 to a vec<stmt_vec_info>.
9215 (bst_traits::value_type, bst_traits::value_type): Likewise.
9216 (bst_traits::hash): Update accordingly.
9217 (vect_get_and_check_slp_defs): Change the stmts parameter from
9218 a vec<gimple *> to a vec<stmt_vec_info>.
9219 (vect_two_operations_perm_ok_p, vect_build_slp_tree_1): Likewise.
9220 (vect_build_slp_tree): Likewise.
9221 (vect_build_slp_tree_2): Likewise. Update uses of
9222 SLP_TREE_SCALAR_STMTS.
9223 (vect_print_slp_tree): Update uses of SLP_TREE_SCALAR_STMTS.
9224 (vect_mark_slp_stmts, vect_mark_slp_stmts_relevant)
9225 (vect_slp_rearrange_stmts, vect_attempt_slp_rearrange_stmts)
9226 (vect_supported_load_permutation_p, vect_find_last_scalar_stmt_in_slp)
9227 (vect_detect_hybrid_slp_stmts, vect_slp_analyze_node_operations_1)
9228 (vect_slp_analyze_node_operations, vect_slp_analyze_operations)
9229 (vect_bb_slp_scalar_cost, vect_slp_analyze_bb_1)
9230 (vect_get_constant_vectors, vect_get_slp_defs)
9231 (vect_transform_slp_perm_load, vect_schedule_slp_instance)
9232 (vect_remove_slp_scalar_calls, vect_schedule_slp): Likewise.
9233 (vect_analyze_slp_instance): Build up a vec of stmt_vec_infos
9234 instead of gimple stmts.
9235 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Change
9236 the stores parameter for a vec<gimple *> to a vec<stmt_vec_info>.
9237 (vect_slp_analyze_instance_dependence): Update uses of
9238 SLP_TREE_SCALAR_STMTS.
9239 (vect_slp_analyze_and_verify_node_alignment): Likewise.
9240 (vect_slp_analyze_and_verify_instance_alignment): Likewise.
9241 * tree-vect-loop.c (neutral_op_for_slp_reduction): Likewise.
9242 (get_initial_defs_for_reduction): Likewise.
9243 (vect_create_epilog_for_reduction): Likewise.
9244 (vectorize_fold_left_reduction): Likewise.
9245 * tree-vect-stmts.c (vect_prologue_cost_for_slp_op): Likewise.
9246 (vect_model_simple_cost, vectorizable_shift, vectorizable_load)
9247 (can_vectorize_live_stmts): Likewise.
9249 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
9251 * tree-vectorizer.h (_loop_vec_info::reductions): Change from an
9252 auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
9253 (vect_force_simple_reduction): Take and return stmt_vec_infos rather
9255 * tree-parloops.c (valid_reduction_p): Take a stmt_vec_info instead
9257 (gather_scalar_reductions): Update after above interface changes.
9258 * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Likewise.
9259 (vect_is_simple_reduction): Take and return stmt_vec_infos rather
9261 (vect_force_simple_reduction): Likewise.
9262 * tree-vect-patterns.c (vect_pattern_recog_1): Update use of
9263 LOOP_VINFO_REDUCTIONS.
9264 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
9266 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
9268 * tree-vectorizer.h (_stmt_vec_info::reduc_def): Change from
9269 a gimple stmt to a stmt_vec_info.
9270 * tree-vect-loop.c (vect_active_double_reduction_p)
9271 (vect_force_simple_reduction, vectorizable_reduction): Update
9274 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
9276 * tree-vectorizer.h (_slp_tree::vec_stmts): Change from a
9277 vec<gimple *> to a vec<stmt_vec_info>.
9278 * tree-vect-loop.c (vect_create_epilog_for_reduction): Change
9279 the reduction_phis argument from a vec<gimple *> to a
9281 (vectorizable_reduction): Likewise the phis local variable that
9282 is passed to vect_create_epilog_for_reduction. Update for new type
9283 of SLP_TREE_VEC_STMTS.
9284 (vectorizable_induction): Update for new type of SLP_TREE_VEC_STMTS.
9285 (vectorizable_live_operation): Likewise.
9286 * tree-vect-slp.c (vect_get_slp_vect_defs): Likewise.
9287 (vect_transform_slp_perm_load, vect_schedule_slp_instance): Likewise.
9289 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
9291 * tree-vectorizer.h (_stmt_vec_info::vectorized_stmt): Change from
9292 a gimple stmt to a stmt_vec_info.
9293 (vectorizable_condition, vectorizable_live_operation)
9294 (vectorizable_reduction, vectorizable_induction): Pass back the
9295 vectorized statement as a stmt_vec_info.
9296 * tree-vect-data-refs.c (vect_record_grouped_load_vectors): Update
9297 use of STMT_VINFO_VEC_STMT.
9298 * tree-vect-loop.c (vect_create_epilog_for_reduction): Likewise,
9299 accumulating the inner phis that feed the STMT_VINFO_VEC_STMT
9300 as stmt_vec_infos rather than gimple stmts.
9301 (vectorize_fold_left_reduction): Change vec_stmt from a gimple stmt
9303 (vectorizable_live_operation): Likewise.
9304 (vectorizable_reduction, vectorizable_induction): Likewise,
9305 updating use of STMT_VINFO_VEC_STMT.
9306 * tree-vect-stmts.c (vect_get_vec_def_for_operand_1): Update use
9307 of STMT_VINFO_VEC_STMT.
9308 (vect_build_gather_load_calls, vectorizable_bswap, vectorizable_call)
9309 (vectorizable_simd_clone_call, vectorizable_conversion)
9310 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
9311 (vectorizable_store, vectorizable_load, vectorizable_condition)
9312 (vectorizable_comparison, can_vectorize_live_stmts): Change vec_stmt
9313 from a gimple stmt to a stmt_vec_info.
9314 (vect_transform_stmt): Update use of STMT_VINFO_VEC_STMT. Pass a
9315 pointer to a stmt_vec_info to the vectorizable_* routines.
9317 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
9319 * tree-vectorizer.h (_stmt_vec_info::related_stmt): Change from
9320 a gimple stmt to a stmt_vec_info.
9321 (is_pattern_stmt_p): Update accordingly.
9322 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Likewise.
9323 (vect_record_grouped_load_vectors): Likewise.
9324 * tree-vect-loop.c (vect_determine_vf_for_stmt): Likewise.
9325 (vect_fixup_reduc_chain, vect_update_vf_for_slp): Likewise.
9326 (vect_model_reduction_cost): Likewise.
9327 (vect_create_epilog_for_reduction): Likewise.
9328 (vectorizable_reduction, vectorizable_induction): Likewise.
9329 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
9330 Return the stmt_vec_info for the pattern statement.
9331 (vect_set_pattern_stmt): Update use of STMT_VINFO_RELATED_STMT.
9332 (vect_split_statement, vect_mark_pattern_stmts): Likewise.
9333 * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
9334 (vect_detect_hybrid_slp, vect_get_slp_defs): Likewise.
9335 * tree-vect-stmts.c (vect_mark_relevant): Likewise.
9336 (vect_get_vec_def_for_operand_1, vectorizable_call): Likewise.
9337 (vectorizable_simd_clone_call, vect_analyze_stmt, new_stmt_vec_info)
9338 (free_stmt_vec_info, vect_is_simple_use): Likewise.
9340 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
9342 * tree-vectorizer.h (vect_finish_replace_stmt): Return a stmt_vec_info
9343 (vect_finish_stmt_generation): Likewise.
9344 * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
9345 (vect_finish_replace_stmt, vect_finish_stmt_generation): Likewise.
9346 (vect_build_gather_load_calls): Use the return value of the above
9347 functions instead of a separate call to vinfo_for_stmt. Use narrow
9348 scopes for the input gimple stmt and wider scopes for the associated
9349 stmt_vec_info. Use vec_info::lookup_def when setting these
9350 stmt_vec_infos from an SSA_NAME definition.
9351 (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
9352 (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
9353 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
9354 (vectorizable_store, vectorizable_load, vectorizable_condition)
9355 (vectorizable_comparison): Likewise.
9356 * tree-vect-loop.c (vectorize_fold_left_reduction): Likewise.
9357 (vectorizable_reduction): Likewise.
9359 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
9361 * tree-vectorizer.h (vect_is_simple_use): Add an optional
9362 stmt_vec_info * parameter before the optional gimple **.
9363 * tree-vect-stmts.c (vect_is_simple_use): Likewise.
9364 (process_use, vect_get_vec_def_for_operand_1): Update callers.
9365 (vect_get_vec_def_for_operand, vectorizable_shift): Likewise.
9366 * tree-vect-loop.c (vectorizable_reduction): Likewise.
9367 (vectorizable_live_operation): Likewise.
9368 * tree-vect-patterns.c (type_conversion_p): Likewise.
9369 (vect_look_through_possible_promotion): Likewise.
9370 (vect_recog_rotate_pattern): Likewise.
9371 * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
9373 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
9375 * tree-vectorizer.h (stmt_vec_info): Temporarily change from
9376 a typedef to a wrapper class.
9377 (NULL_STMT_VEC_INFO): New macro.
9378 (vec_info::stmt_infos): Change to vec<stmt_vec_info>.
9379 (stmt_vec_info::operator*): New function.
9380 (stmt_vec_info::operator gimple *): Likewise.
9381 (set_vinfo_for_stmt): Use NULL_STMT_VEC_INFO.
9382 (add_stmt_costs): Likewise.
9383 * tree-vect-loop-manip.c (iv_phi_p): Likewise.
9384 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
9385 (vect_get_known_peeling_cost): Likewise.
9386 (vect_estimate_min_profitable_iters): Likewise.
9387 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
9388 * tree-vect-slp.c (vect_remove_slp_scalar_calls): Likewise.
9389 * tree-vect-stmts.c (vect_build_gather_load_calls): Likewise.
9390 (vectorizable_store, free_stmt_vec_infos): Likewise.
9391 (new_stmt_vec_info): Change return type of xcalloc to
9394 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
9396 * tree-vectorizer.h (vec_info::lookup_single_use): Declare.
9397 * tree-vectorizer.c (vec_info::lookup_single_use): New function.
9398 * tree-vect-loop.c (vectorizable_reduction): Use it instead of
9399 a single_imm_use-based sequence.
9400 * tree-vect-stmts.c (supportable_widening_operation): Likewise.
9402 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
9404 * tree-vectorizer.h (vec_info::lookup_def): Declare.
9405 * tree-vectorizer.c (vec_info::lookup_def): New function.
9406 * tree-vect-patterns.c (vect_get_internal_def): Use it.
9407 (vect_widened_op_tree): Likewise.
9408 * tree-vect-stmts.c (vect_is_simple_use): Likewise.
9409 * tree-vect-loop.c (vect_analyze_loop_operations): Likewise.
9410 (vectorizable_reduction): Likewise.
9411 (vect_valid_reduction_input_p): Take a stmt_vec_info instead
9413 (vect_is_slp_reduction): Update calls accordingly. Use
9414 vec_info::lookup_def.
9415 (vect_is_simple_reduction): Likewise
9416 * tree-vect-slp.c (vect_detect_hybrid_slp_1): Use vec_info::lookup_def.
9418 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
9420 * tree-vectorizer.h (vec_info::lookup_stmt): Declare.
9421 * tree-vectorizer.c (vec_info::lookup_stmt): New function.
9422 * tree-vect-loop.c (vect_determine_vf_for_stmt): Use it instead
9424 (vect_determine_vectorization_factor, vect_analyze_scalar_cycles_1)
9425 (vect_compute_single_scalar_iteration_cost, vect_analyze_loop_form)
9426 (vect_update_vf_for_slp, vect_analyze_loop_operations)
9427 (vect_is_slp_reduction, vectorizable_induction)
9428 (vect_transform_loop_stmt, vect_transform_loop): Likewise.
9429 * tree-vect-patterns.c (vect_init_pattern_stmt):
9430 (vect_determine_min_output_precision_1, vect_determine_precisions)
9431 (vect_pattern_recog): Likewise.
9432 * tree-vect-stmts.c (vect_analyze_stmt, vect_transform_stmt): Likewise.
9433 * config/powerpcspe/powerpcspe.c (rs6000_density_test): Likewise.
9434 * config/rs6000/rs6000.c (rs6000_density_test): Likewise.
9435 * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
9436 (vect_detect_hybrid_slp_1, vect_detect_hybrid_slp_2)
9437 (vect_detect_hybrid_slp): Likewise. Change the walk_stmt_info
9438 info field from a loop to a loop_vec_info.
9440 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
9442 * tree-vectorizer.h (stmt_vec_info): Move typedef earlier in file.
9443 (vec_info::add_stmt): Declare.
9444 * tree-vectorizer.c (vec_info::add_stmt): New function.
9445 * tree-vect-data-refs.c (vect_create_data_ref_ptr): Use it.
9446 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Likewise.
9447 (vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
9448 (vectorizable_induction): Likewise.
9449 * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Likewise.
9450 * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
9451 (vectorizable_simd_clone_call, vectorizable_store): Likewise.
9452 (vectorizable_load): Likewise.
9453 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
9454 (vect_recog_bool_pattern, vect_recog_mask_conversion_pattern)
9455 (vect_recog_gather_scatter_pattern): Likewise.
9456 (append_pattern_def_seq): Likewise. Remove a check that is
9457 performed by add_stmt itself.
9459 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
9461 * tree-vect-loop.c (vectorizable_reduction): Fix an instance in
9462 which make_ssa_name was called with new_stmt before new_stmt
9465 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
9467 * tree-vect-loop.c (vect_valid_reduction_input_p): New function,
9469 (vect_is_slp_reduction): ...here...
9470 (vect_is_simple_reduction): ...and here. Remove repetition of tests
9471 that are already known to be false.
9473 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
9475 * tree-vectorizer.h (vect_free_slp_instance): Add a final_p parameter.
9476 * tree-vect-slp.c (vect_free_slp_tree): Likewise. Don't update
9477 STMT_VINFO_NUM_SLP_USES when it's true.
9478 (vect_free_slp_instance): Add a final_p parameter and pass it to
9480 (vect_build_slp_tree_2): Update call to vect_free_slp_instance.
9481 (vect_analyze_slp_instance): Likewise.
9482 (vect_slp_analyze_operations): Likewise.
9483 (vect_slp_analyze_bb_1): Likewise.
9484 * tree-vectorizer.c (vec_info): Likewise.
9485 * tree-vect-loop.c (vect_transform_loop): Likewise.
9487 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
9489 * tree-vect-loop.c (vectorizable_reduction): Assert that the
9490 function is not called for second and subsequent members of
9493 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
9495 * tree-vect-loop.c (get_initial_def_for_reduction): Move special
9496 cases for nested loops from here to ...
9497 (vect_create_epilog_for_reduction): ...here. Only call
9498 vect_is_simple_use for inner-loop reductions.
9500 2018-07-31 Martin Liska <mliska@suse.cz>
9502 PR gcov-profile/85338
9503 PR gcov-profile/85350
9504 PR gcov-profile/85372
9505 * profile.c (struct location_triplet): New.
9506 (struct location_triplet_hash): Likewise.
9507 (output_location): Do not output a BB that
9508 is already recorded for a line.
9509 (branch_prob): Use streamed_locations.
9511 2018-07-31 Martin Liska <mliska@suse.cz>
9513 PR gcov-profile/85370
9514 * coverage.c (coverage_begin_function): Do not mark target
9515 clones as artificial functions.
9517 2018-07-31 Martin Liska <mliska@suse.cz>
9519 PR gcov-profile/83813
9520 PR gcov-profile/84758
9521 PR gcov-profile/85217
9522 PR gcov-profile/85332
9523 * profile.c (branch_prob): Do not record GOTO expressions
9524 for GIMPLE statements which locations are already streamed.
9526 2018-07-31 Olivier Hainque <hainque@adacore.com>
9528 * gcc.c (handle_spec_function): Accept a soft_matched_part
9529 argument, as do_spec_1. Pass it down to ...
9530 (eval_spec_function): Accept a soft_matched_part argument,
9531 and pass it down to ...
9532 (do_spec_2): Accept a soft_matched_part argument, and pass
9533 it down to do_spec_1.
9534 (do_spec_1): Pass soft_matched_part to handle_spec_function.
9535 (handle_braces): Update call to handle_spec_function.
9536 (driver::set_up_specs): Update calls to do_spec_2.
9537 (compare_debug_dump_opt_spec_function): Likewise.
9538 (compare_debug_self_opt_spec_function): Likewise.
9540 2018-07-31 Olivier Hainque <hainque@adacore.com>
9542 * common.opt (nolibc): New option.
9543 * doc/invoke.texi (Link Options): Document it.
9544 * gcc.c (LINK_GCC_C_SEQUENCE_SPEC): Honor nolibc.
9545 * config/alpha/linux.h: Likewise.
9546 * config/arc/elf.h: Likewise.
9547 * config/arm/uclinux-elf.h: Likewise.
9548 * config/arm/unknown-elf.h: Likewise.
9549 * config/avr/avrlibc.h: Likewise.
9550 * config/bfin/bfin.h: Likewise.
9551 * config/bfin/linux.h: Likewise.
9552 * config/bfin/uclinux.h: Likewise.
9553 * config/darwin.h: Likewise.
9554 * config/darwin10.h: Likewise.
9555 * config/darwin12.h: Likewise.
9556 * config/gnu-user.h: Likewise.
9557 * config/lm32/uclinux-elf.h: Likewise.
9558 * config/pa/pa-hpux11.h: Likewise.
9559 * config/pa/pa64-hpux.h: Likewise.
9560 * config/sparc/sparc.h: Likewise.
9562 2018-07-31 Olivier Hainque <hainque@adacore.com>
9564 * gcc.c (getenv_spec_function): Prepend '/' to value for allowed
9565 undefined variables.
9567 2018-07-30 Segher Boessenkool <segher@kernel.crashing.org>
9570 * config/arm/arm.c (arm_block_set_aligned_vect): Use gen_int_mode
9573 2018-07-30 Bernd Edlinger <bernd.edlinger@hotmail.de>
9575 * tree-ssa-forwprop.c (simplify_builtin_call): Don't create a not NUL
9576 terminated string literal.
9578 2018-07-30 Segher Boessenkool <segher@kernel.crashing.org>
9580 PR rtl-optimization/85160
9581 * combine.c (is_just_move): New function.
9582 (try_combine): Allow combining two instructions into two if neither of
9583 the original instructions was a move.
9585 2018-07-30 Alexander Monakov <amonakov@ispras.ru>
9588 * doc/extend.texi (Global Register Variables): Discourage use of type
9590 (Local Register Variables): Likewise.
9592 2018-07-30 Richard Sandiford <richard.sandiford@arm.com>
9594 PR tree-optimization/86506
9595 * hwint.h (ceil_log2): Resync with hwint.c implementation.
9597 2018-07-30 Ilya Leoshkevich <iii@linux.ibm.com>
9600 * lra-constraints.c (spill_hard_reg_in_range): When selecting the
9601 hard_regno, make sure no insn between `from` and `to` clobbers it.
9603 2018-07-30 Cesar Philippidis <cesar@codesourcery.com>
9604 Tom de Vries <tdevries@suse.de>
9606 * config/nvptx/nvptx.c (PTX_GANG_DEFAULT): Rename to ...
9607 (PTX_DEFAULT_RUNTIME_DIM): ... this.
9608 (nvptx_goacc_validate_dims): Set default worker and gang dims to
9609 PTX_DEFAULT_RUNTIME_DIM.
9610 (nvptx_dim_limit): Ignore GOMP_DIM_WORKER.
9612 2018-07-29 John David Anglin <danglin@gcc.gnu.org>
9614 * config/pa/pa.c (pa_output_addr_vec): Align address table.
9615 * config/pa/pa.h (JUMP_TABLES_IN_TEXT_SECTION): Revise comment.
9616 * config/pa/pa32-linux.h (JUMP_TABLES_IN_TEXT_SECTION): Define.
9618 2018-07-27 Michael Meissner <meissner@linux.ibm.com>
9620 * config/rs6000/constraints.md (wG constraint): Delete, no longer
9622 * config/rs6000/predicates.md (p9_fusion_reg_operand): Rename
9623 predicate to reflect toc fusion has been deleted.
9624 (toc_fusion_mem_raw): Delete, no longer used.
9625 (toc_fusion_mem_wrapped): Likewise.
9626 * config/rs6000/rs6000-cpus.def (POWERPC_MASKS): Delete toc
9628 * config/rs6000/rs6000-protos.h (fusion_wrap_memory_address):
9629 Delete, no longer used.
9630 * config/rs6000/rs6000.c (struct rs6000_reg_addr): Delete fields
9631 meant to be used for toc fusion.
9632 (rs6000_debug_print_mode): Delete toc fusion debugging.
9633 (rs6000_debug_reg_global): Likewise.
9634 (rs6000_init_hard_regno_mode_ok): Delete setting up fields for toc
9635 fusion and secondary reload support that were never used.
9636 (rs6000_option_override_internal): Delete TOC fusion, that was only
9637 partially defined, and it did not work unless you also used the
9639 (rs6000_legitimate_address_p): Delete TOC fusion support.
9640 (rs6000_opt_masks): Likewise.
9641 (fusion_wrap_memory_address): Delete function, no longer used.
9642 (fusion_split_address); Delete TOC fusion support.
9643 * config/rs6000/rs6000.h (TARGET_TOC_FUSION_INT): Delete, no
9644 longer used with toc fusion being deleted.
9645 (TARGET_TOC_FUSION_FP): Likewise.
9646 * config/rs6000/rs6000.md (UNSPEC_FUSION_ADDIS): Delete TOC fusion
9648 (toc fusion spliter): Delete TOC fusion support.
9649 (toc_fusionload_<mode>): Likewise.
9650 (toc_fusionload_di): Likewise.
9651 (fusion_gpr_load_<mode>): Delete generator function, this insn no
9652 longer needs to be named. Rename predicate to delete TOC fusion.
9653 (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
9654 (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
9655 (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
9656 (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
9657 (p9 fusion peephole2s): Rename predicate to delete TOC fusion.
9659 2018-07-27 Kelvin Nilsen <kelvin@gcc.gnu.org>
9661 * doc/extend.texi (Basic PowerPC Built-in Functions Available on
9662 ISA 2.05): Replace __uint128_t with __uint128 and __int128_t with
9663 __int128 in built-in function prototypes.
9664 (PowerPC AltiVec Built-in Functions on ISA 2.07): Likewise.
9665 (PowerPC AltiVec Built-in Functions on ISA 3.0): Likewise.
9667 2018-07-27 Martin Sebor <msebor@redhat.com>
9669 PR tree-optimization/86696
9670 * tree-ssa-strlen.c (get_min_string_length): Handle all integer
9671 types, including enums.
9672 (handle_char_store): Be prepared for the above function to fail.
9674 2018-07-26 Qing Zhao <qing.zhao@oracle.com>
9676 * builtins.c (inline_expand_builtin_string_cmp): Disable inlining
9677 when optimization level is lower than 2 or optimize for size.
9679 2018-07-26 Martin Sebor <msebor@redhat.com>
9681 PR tree-optimization/86043
9682 PR tree-optimization/86042
9683 * tree-ssa-strlen.c (handle_builtin_memcpy): Handle strict overlaps.
9684 (get_string_cst_length): Rename...
9685 (get_min_string_length): ...to this. Add argument.
9686 (handle_char_store): Extend to handle multi-character stores by
9688 * tree.c (initializer_zerop): Use new argument. Handle MEM_REF.
9689 * tree.h (initializer_zerop): Add argument.
9691 2018-07-26 Jakub Jelinek <jakub@redhat.com>
9694 * omp-low.c (scan_sharing_clauses): Don't ignore map clauses for
9695 declare target to variables if they have always,{to,from,tofrom} map
9698 2018-07-26 Martin Liska <mliska@suse.cz>
9701 * lto-wrapper.c: Add linker_output as prefix
9702 for ltrans_output_file.
9704 2018-07-26 Segher Boessenkool <segher@kernel.crashing.org>
9706 PR rtl-optimization/85805
9707 * combine.c (reg_nonzero_bits_for_combine): Only use the last set
9708 value for hard registers if that was written in the same mode.
9710 2018-07-26 Martin Liska <mliska@suse.cz>
9712 PR gcov-profile/86536
9713 * gcov.c (format_gcov): Use printf format %.*f directly
9714 and do not handle special values.
9716 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
9718 * common/config/arc/arc-common.c (arc_option_optimization_table):
9719 Update default optimizations for size.
9721 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
9723 * config/arc/arc.md (movsf_insn): Add short instruction selection.
9724 * config/arc/constraints.md (CfZ): New constraint.
9725 * config/arc/fpu.md (addssf3_fpu): Use CfZ constraint.
9726 (subsf3_fpu): Likewise.
9727 (cmpsf_fpu): Likewise.
9728 (cmpsf_fpu_uneq): Likewise.
9730 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
9732 * config/arc/arc.c (compact_memory_operand_p): Check for uncached
9734 (arc_is_uncached_mem_p): uncached applies to both the variable and
9737 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
9739 * config/arc/arc.h (ADDITIONAL_REGISTER_NAMES): Add additional
9742 2018-07-25 David Malcolm <dmalcolm@redhat.com>
9744 * optinfo-emit-json.cc (class optrecord_json_writer): Convert
9745 field "m_scopes" from vec to auto_vec.
9747 2018-07-25 Martin Liska <mliska@suse.cz>
9749 * config/powerpcspe/powerpcspe-protos.h (rs6000_loop_align): Fix
9752 2018-07-25 Richard Biener <rguenther@suse.de>
9755 * dwarf2out.c (dwarf2out_decl): Do not handle nested functions
9756 special wrt context_die late.
9757 (gen_subprogram_die): Re-use DIEs in local scope.
9759 2018-07-25 Richard Sandiford <richard.sandiford@arm.com>
9761 PR tree-optimization/86644
9762 * hwint.c (ceil_log2): Fix comment. Return 0 for 0.
9764 2018-07-25 Martin Liska <mliska@suse.cz>
9767 * dumpfile.c: And excluded values with TDF_ALL_VALUES.
9768 * dumpfile.h (enum dump_flag): Defince TDF_ALL_VALUES.
9770 2018-07-25 Martin Liska <mliska@suse.cz>
9773 * params.def: Explain ASan abbreviation and provide
9774 a documentation link.
9776 2018-07-24 Martin Sebor <msebor@redhat.com>
9778 PR tree-optimization/86622
9779 PR tree-optimization/86532
9780 * builtins.h (string_length): Declare.
9781 * builtins.c (c_strlen): Correct handling of non-constant offsets.
9782 (check_access): Be prepared for non-constant length ranges.
9783 (string_length): Make extern.
9784 * expr.c (string_constant): Only handle the minor non-constant
9785 array index. Use string_constant to compute the length of
9786 a generic string constant.
9788 2018-07-24 Richard Sandiford <richard.sandiford@arm.com>
9790 PR tree-optimization/86618
9791 * tree-vect-stmts.c (vectorizable_call): Don't take the address
9792 of LOOP_VINFO_MASKS (loop_vinfo) when loop_vinfo is null.
9794 2018-07-24 David Malcolm <dmalcolm@redhat.com>
9796 PR tree-optimization/86636
9797 * json.cc (json::object::set): Fix comment. Add assertions.
9798 (json::array::append): Move here from json.h. Add comment and an
9800 (json::string::string): Likewise.
9801 * json.h (json::array::append): Move to json.cc.
9802 (json::string::string): Likewise.
9803 * optinfo-emit-json.cc
9804 (optrecord_json_writer::impl_location_to_json): Assert that we
9805 aren't attempting to write out UNKNOWN_LOCATION, or an ad-hoc
9806 wrapper around it. Expand the location once, rather than three
9808 (optrecord_json_writer::inlining_chain_to_json): Fix the check for
9809 UNKNOWN_LOCATION, to use LOCATION_LOCUS to look through ad-hoc
9811 (optrecord_json_writer::optinfo_to_json): Likewise, in four
9812 places. Fix some overlong lines.
9814 2018-07-24 Matthew Malcomson <matthew.malcomson@arm.com>
9816 * config/aarch64/aarch64-simd.md
9817 (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>): Split into...
9818 (aarch64_<ANY_EXTEND:su>subw<mode>): ... This...
9819 (aarch64_<ANY_EXTEND:su>addw<mode>): ... And this.
9820 (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>_internal): Split into...
9821 (aarch64_<ANY_EXTEND:su>subw<mode>_internal): ... This...
9822 (aarch64_<ANY_EXTEND:su>addw<mode>_internal): ... And this.
9823 (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w2<mode>_internal): Split into...
9824 (aarch64_<ANY_EXTEND:su>subw2<mode>_internal): ... This...
9825 (aarch64_<ANY_EXTEND:su>addw2<mode>_internal): ... And this.
9827 2018-07-24 Jakub Jelinek <jakub@redhat.com>
9830 * expmed.c (expand_divmod): Punt if d == HOST_WIDE_INT_MIN
9831 and size > HOST_BITS_PER_WIDE_INT. For size > HOST_BITS_PER_WIDE_INT
9832 and abs_d == d, do the power of two handling if profitable.
9834 2018-07-24 Richard Biener <rguenther@suse.de>
9836 * match.pd: Add BIT_FIELD_REF canonicalizations.
9838 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
9841 * genmatch.c (dt_operand::gen_match_op): Avoid folding volatile values.
9843 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
9845 * gimple-fold.c (gimple_fold_builtin_printf): Don't create a not NUL
9846 terminated STRING_CST object.
9848 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
9850 hsa-dump.c (dump_hsa_symbol): Avoid out of scope access to buf.
9852 2018-07-23 Segher Boessenkool <segher@kernel.crashing.org>
9854 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Adjust.
9855 * config/rs6000/rs6000-protos.h (rs6000_split_v4si_init): Delete.
9856 * config/rs6000/rs6000.c (rs6000_expand_vector_init): Always force
9857 the elements into a register.
9858 (rs6000_split_v4si_init_di_reg): Delete.
9859 (rs6000_split_v4si_init): Delete.
9860 * config/rs6000/vsx.md (unspec): Delete UNSPEC_VSX_VEC_INIT.
9861 (vsx_init_v4si): Rewrite as a define_expand.
9863 2018-07-23 Segher Boessenkool <segher@kernel.crashing.org>
9865 * config/rs6000/rs6000.md (splitters for rldimi and rlwimi with the
9866 zero_extend argument from memory): New.
9868 2018-07-22 Martin Sebor <msebor@redhat.com>
9871 * gimple-ssa-warn-alloca.c (alloca_call_type_by_arg): Avoid
9872 diagnosing calls with unknown arguments unless -Walloca-larger-than
9873 is restricted to less than PTRDIFF_MAX bytes.
9875 2018-07-22 Gerald Pfeifer <gerald@pfeifer.com>
9877 * doc/gcov.texi (Invoking Gcov): Editorial changes.
9879 2018-07-20 David Malcolm <dmalcolm@redhat.com>
9881 * pretty-print.c (text_info::set_location): Remove redundant
9882 "line_table" parameter from call to rich_location::set_range.
9884 2018-07-20 Martin Sebor <msebor@redhat.com>
9887 * builtins.c (expand_builtin_alloca): Adjust.
9888 * calls.c (alloc_max_size): Simplify.
9889 * cgraphunit.c (cgraph_node::expand): Adjust.
9890 * common.opt (larger_than_size, warn_frame_larger_than): Remove
9892 (frame_larger_than_size): Same.
9893 (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Change options
9894 to take a HOST_WIDE_INT argument and accept a byte-size suffix.
9896 * doc/invoke.texi (GCC Command Options): Document option arguments.
9897 Explain byte-size arguments and suffixes.
9898 (-Wvla-larger-than, -Wno-alloc-size-larger-than): Update.
9899 (-Wno-alloca-larger-than, -Wno-vla-larger-than): Same.
9900 (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Same.
9901 * doc/options.texi (UInteger): Expand.
9902 (Host_Wide_Int, ByteSize): Document new properties.
9903 * final.c (final_start_function_1): Include sizes in an error message.
9904 * function.c (frame_offset_overflow): Same.
9905 * gimple-ssa-warn-alloca.c (pass_walloca::gate): Adjust.
9906 (alloca_call_type_by_arg): Change function argument to HOST_WIDE_INT.
9907 Diagnose unbounded alloca calls only for limits of less than
9909 (alloca_call_type): Adjust. Diagnose possibly out-of-bounds alloca
9910 calls and VLA size only for limits of less than PTRDIFF_MAX. Same
9912 (pass_walloca::execute): Adjust. Diagnose alloca calls in loops
9913 only for limits of less than PTRDIFF_MAX.
9914 * langhooks-def.h (lhd_handle_option): Change function argument
9916 * langhooks.c (lhd_handle_option): Same.
9917 * langhooks.h (handle_option): Same.
9918 * opt-functions.awk (switch_bit_fields): Handle Host_Wide_Int and
9920 (var_type, var_type_struct): Same.
9921 (var_set): Handle ByteSize flag.
9922 * optc-gen.awk: Add comments to output to ease debugging. Make
9923 use of HOST_WIDE_INT where appropriate.
9924 * opts-gen-save.awk: Use %lx to format unsigned long.
9925 * opth-gen.awk: Change function argument to HOST_WIDE_INT.
9926 * opts-common.c (integral_argument): Return HOST_WIDE_INT and add
9927 arguments. Parse bytes-size suffixes.
9928 (enum_arg_to_value): Change function argument to HOST_WIDE_INT.
9929 (enum_value_to_arg): Same.
9930 (decode_cmdline_option): Handle cl_host_wide_int. Adjust.
9931 (handle_option): Adjust.
9932 (generate_option): Change function argument to HOST_WIDE_INT.
9933 (cmdline_handle_error): Adjust.
9934 (read_cmdline_option): Change function argument to HOST_WIDE_INT.
9935 (set_option): Change function argument to HOST_WIDE_INT.
9936 (option_enabled): Handle cl_host_wide_int.
9937 (get_option_state): Handle CLVC_SIZE.
9938 (control_warning_option): Same.
9939 * opts.c (common_handle_option): Change function argument to
9940 HOST_WIDE_INT. Remove handling of OPT_Walloca_larger_than_ and
9941 OPT_Wvla_larger_than_.
9942 * opts.h (enum cl_var_type): Add an enumerator.
9943 * stor-layout.c (layout_decl): Print a more meaningful warning.
9944 * toplev.c (output_stack_usage): Adjust.
9946 2018-07-20 Qing Zhao <qing.zhao@oracle.com>
9948 * builtins.c (expand_builtin_memcmp): Delete the last parameter for
9949 call to inline_expand_builtin_string_cmp.
9950 (expand_builtin_strcmp): Likewise.
9951 (expand_builtin_strncmp): Likewise.
9952 (inline_string_cmp): Delete the last parameter, change char_type_node
9953 to unsigned_char_type_node for strcmp/strncmp, add conversions to the
9955 (inline_expand_builtin_string_cmp): Delete the last parameter, give up
9956 the inlining expansion on target where the type of the call has same or
9957 narrower precision than unsigned char.
9959 2018-07-20 David Malcolm <dmalcolm@redhat.com>
9961 * Makefile.in (OBJS): Add json.o and optinfo-emit-json.o.
9962 (CFLAGS-optinfo-emit-json.o): Define TARGET_NAME.
9963 * common.opt (fsave-optimization-record): New option.
9964 * coretypes.h (struct kv_pair): Move here from dumpfile.c.
9965 * doc/invoke.texi (-fsave-optimization-record): New option.
9966 * dumpfile.c: Include "optinfo-emit-json.h".
9967 (struct kv_pair): Move to coretypes.h.
9968 (optgroup_options): Make non-static.
9969 (dump_context::end_scope): Call
9970 optimization_records_maybe_pop_dump_scope.
9971 * dumpfile.h (optgroup_options): New decl.
9972 * json.cc: New file.
9974 * optinfo-emit-json.cc: New file.
9975 * optinfo-emit-json.h: New file.
9976 * optinfo.cc: Include "optinfo-emit-json.h".
9977 (optinfo::emit): Call optimization_records_maybe_record_optinfo.
9978 (optinfo_enabled_p): Check optimization_records_enabled_p.
9979 (optinfo_wants_inlining_info_p): Likewise.
9980 * optinfo.h: Update comment.
9981 * profile-count.c (profile_quality_as_string): New function.
9982 * profile-count.h (profile_quality_as_string): New decl.
9983 (profile_count::quality): New accessor.
9984 * selftest-run-tests.c (selftest::run_tests): Call json_cc_tests
9985 and optinfo_emit_json_cc_tests.
9986 * selftest.h (selftest::json_cc_tests): New decl.
9987 (selftest::optinfo_emit_json_cc_tests): New decl.
9988 * toplev.c: Include "optinfo-emit-json.h".
9989 (compile_file): Call optimization_records_finish.
9990 (do_compile): Call optimization_records_start.
9991 * tree-ssa-live.c: Include optinfo.h.
9992 (remove_unused_scope_block_p): Retain inlining information if
9993 optinfo_wants_inlining_info_p returns true.
9995 2018-07-20 Richard Biener <rguenther@suse.de>
9998 * dwarf2out.c (dwarf2out_die_ref_for_decl): Test in_lto_p
9999 to cover -flto-partition=none.
10001 2018-07-20 Martin Liska <mliska@suse.cz>
10003 * tree.h (DECL_LOCATION_RANGE): Remove unused macro.
10004 (get_decl_source_range): Remove unused function.
10006 2018-07-20 Richard Biener <rguenther@suse.de>
10008 * tree-ssa-sccvn.h (struct vn_nary_op_s): Add next member.
10009 (struct vn_phi_s): Likewise.
10010 (struct vn_reference_s): Likewise.
10011 * tree-ssa-sccvn.c (vn_nary_op_hasher::equal): Add shortcut
10012 for searching the slot of an entry known to be in the hash itself.
10013 (vn_phi_hasher::equal): Likewise.
10014 (vn_reference_hasher::equal): Likewise.
10015 (last_inserted_ref, last_inserted_phi, last_inserted_nary): New
10017 (optimistic_info, current_info): Remove, keeping only valid_info.
10018 (vn_reference_lookup_1): Remove fallback lookup.
10019 (vn_reference_lookup_2): Likewise.
10020 (vn_nary_op_lookup_1): Likewise.
10021 (vn_phi_lookup): Likewise.
10022 (vn_nary_build_or_lookup_1): Make sure to not chain the built
10024 (vn_reference_insert): Adjust, chain the inserted hash element
10025 at last_inserted_ref.
10026 (vn_reference_insert_pieces): Likewise.
10027 (visit_reference_op_call): Likewise.
10028 (vn_nary_op_insert_into): Chain the inserted hash element at
10029 last_inserted_nary.
10030 (vn_nary_op_insert_pieces): Adjust.
10031 (vn_nary_op_insert): Likewise.
10032 (vn_nary_op_insert_stmt): Likewise.
10033 (vn_phi_insert): Adjust, chain the inserted hash element at
10035 (process_scc): Remove clearing and copying the optimistic
10036 table. Instead remove elements inserted during an optimistic
10037 iteration from the single table we maintain.
10038 (init_scc_vn): Adjust.
10039 (free_scc_vn): Likewise.
10040 (sccvn_dom_walker::record_cond): Likewise.
10041 (sccvn_dom_walker::after_dom_children): Likewise.
10043 2018-07-19 Martin Sebor <msebor@redhat.com>
10045 PR tree-optimization/84047
10046 PR tree-optimization/83776
10047 * tree-vrp.c (vrp_prop::check_mem_ref): New function.
10048 (check_array_bounds): Call it.
10050 2018-07-19 Martin Sebor <msebor@redhat.com>
10052 * align.h (align_flags): Use member initialization.
10054 2018-07-19 David Malcolm <dmalcolm@redhat.com>
10056 * Makefile.in (OBJS): Add optinfo.o.
10057 * coretypes.h (class symtab_node): New forward decl.
10058 (struct cgraph_node): New forward decl.
10059 (class varpool_node): New forward decl.
10060 * dump-context.h: New file.
10061 * dumpfile.c: Include "optinfo.h", "dump-context.h", "cgraph.h",
10063 (refresh_dumps_are_enabled): Use optinfo_enabled_p.
10064 (set_dump_file): Call dumpfile_ensure_any_optinfo_are_flushed.
10065 (set_alt_dump_file): Likewise.
10066 (dump_context::~dump_context): New dtor.
10067 (dump_gimple_stmt): Move implementation to...
10068 (dump_context::dump_gimple_stmt): ...this new member function.
10069 Add the stmt to any pending optinfo, creating one if need be.
10070 (dump_gimple_stmt_loc): Move implementation to...
10071 (dump_context::dump_gimple_stmt_loc): ...this new member function.
10072 Start a new optinfo and add the stmt to it.
10073 (dump_gimple_expr): Move implementation to...
10074 (dump_context::dump_gimple_expr): ...this new member function.
10075 Add the stmt to any pending optinfo, creating one if need be.
10076 (dump_gimple_expr_loc): Move implementation to...
10077 (dump_context::dump_gimple_expr_loc): ...this new member function.
10078 Start a new optinfo and add the stmt to it.
10079 (dump_generic_expr): Move implementation to...
10080 (dump_context::dump_generic_expr): ...this new member function.
10081 Add the tree to any pending optinfo, creating one if need be.
10082 (dump_generic_expr_loc): Move implementation to...
10083 (dump_context::dump_generic_expr_loc): ...this new member
10084 function. Add the tree to any pending optinfo, creating one if
10086 (dump_printf): Move implementation to...
10087 (dump_context::dump_printf_va): ...this new member function. Add
10088 the text to any pending optinfo, creating one if need be.
10089 (dump_printf_loc): Move implementation to...
10090 (dump_context::dump_printf_loc_va): ...this new member function.
10091 Start a new optinfo and add the stmt to it.
10092 (dump_dec): Move implementation to...
10093 (dump_context::dump_dec): ...this new member function. Add the
10094 value to any pending optinfo, creating one if need be.
10095 (dump_context::dump_symtab_node): New member function.
10096 (dump_context::get_scope_depth): New member function.
10097 (dump_context::begin_scope): New member function.
10098 (dump_context::end_scope): New member function.
10099 (dump_context::ensure_pending_optinfo): New member function.
10100 (dump_context::begin_next_optinfo): New member function.
10101 (dump_context::end_any_optinfo): New member function.
10102 (dump_context::s_current): New global.
10103 (dump_context::s_default): New global.
10104 (dump_scope_depth): Delete global.
10105 (dumpfile_ensure_any_optinfo_are_flushed): New function.
10106 (dump_symtab_node): New function.
10107 (get_dump_scope_depth): Reimplement in terms of dump_context.
10108 (dump_begin_scope): Likewise.
10109 (dump_end_scope): Likewise.
10110 (selftest::temp_dump_context::temp_dump_context): New ctor.
10111 (selftest::temp_dump_context::~temp_dump_context): New dtor.
10112 (selftest::verify_item): New function.
10113 (ASSERT_IS_TEXT): New macro.
10114 (ASSERT_IS_TREE): New macro.
10115 (ASSERT_IS_GIMPLE): New macro.
10116 (selftest::test_capture_of_dump_calls): New test.
10117 (selftest::dumpfile_c_tests): Call it.
10118 * dumpfile.h (dump_printf, dump_printf_loc, dump_basic_block)
10119 (dump_generic_expr_loc, dump_generic_expr, dump_gimple_stmt_loc)
10120 (dump_gimple_stmt, dump_dec): Gather these related decls and add a
10121 descriptive comment.
10122 (dump_function, print_combine_total_stats, enable_rtl_dump_file)
10123 (dump_node, dump_bb): Move these unrelated decls.
10124 (class dump_manager): Add leading comment.
10125 * optinfo.cc: New file.
10126 * optinfo.h: New file.
10128 2018-07-19 Michael Collison <michael.collison@arm.com>
10129 Richard Henderson <rth@redhat.com>
10131 * config/aarch64/aarch64.md (subv<GPI>4, usubv<GPI>4): New patterns.
10132 (subti): Handle op1 zero.
10133 (subvti4, usub4ti4): New.
10134 (*sub<GPI>3_compare1_imm): New.
10135 (sub<GPI>3_carryinCV): New.
10136 (*sub<GPI>3_carryinCV_z1_z2, *sub<GPI>3_carryinCV_z1): New.
10137 (*sub<GPI>3_carryinCV_z2, *sub<GPI>3_carryinCV): New.
10139 2018-07-19 Michael Collison <michael.collison@arm.com>
10140 Richard Henderson <rth@redhat.com>
10142 * config/aarch64/aarch64.md: (addv<GPI>4, uaddv<GPI>4): New.
10143 (addti3): Create simpler code if low part is already known to be 0.
10144 (addvti4, uaddvti4): New.
10145 (*add<GPI>3_compareC_cconly_imm): New.
10146 (*add<GPI>3_compareC_cconly): New.
10147 (*add<GPI>3_compareC_imm): New.
10148 (*add<GPI>3_compareC): Rename from add<GPI>3_compare1; do not
10149 handle constants within this pattern..
10150 (*add<GPI>3_compareV_cconly_imm): New.
10151 (*add<GPI>3_compareV_cconly): New.
10152 (*add<GPI>3_compareV_imm): New.
10153 (add<GPI>3_compareV): New.
10154 (add<GPI>3_carryinC, add<GPI>3_carryinV): New.
10155 (*add<GPI>3_carryinC_zero, *add<GPI>3_carryinV_zero): New.
10156 (*add<GPI>3_carryinC, *add<GPI>3_carryinV): New.
10157 ((*add<GPI>3_compareC_cconly_imm): Replace 'ne' operator
10158 with 'comparison' operator.
10159 (*add<GPI>3_compareV_cconly_imm): Ditto.
10160 (*add<GPI>3_compareV_cconly): Ditto.
10161 (*add<GPI>3_compareV_imm): Ditto.
10162 (add<GPI>3_compareV): Ditto.
10163 (add<mode>3_carryinC): Ditto.
10164 (*add<mode>3_carryinC_zero): Ditto.
10165 (*add<mode>3_carryinC): Ditto.
10166 (add<mode>3_carryinV): Ditto.
10167 (*add<mode>3_carryinV_zero): Ditto.
10168 (*add<mode>3_carryinV): Ditto.
10170 2018-07-19 Michael Collison <michael.collison@arm.com>
10171 Richard Henderson <rth@redhat.com>
10173 * config/aarch64/aarch64-modes.def (CC_V): New.
10174 * config/aarch64/aarch64-protos.h
10175 (aarch64_addti_scratch_regs): Declare
10176 (aarch64_subvti_scratch_regs): Declare.
10177 (aarch64_expand_subvti): Declare.
10178 (aarch64_gen_unlikely_cbranch): Declare
10179 * config/aarch64/aarch64.c (aarch64_select_cc_mode): Test
10180 for signed overflow using CC_Vmode.
10181 (aarch64_get_condition_code_1): Handle CC_Vmode.
10182 (aarch64_gen_unlikely_cbranch): New function.
10183 (aarch64_addti_scratch_regs): New function.
10184 (aarch64_subvti_scratch_regs): New function.
10185 (aarch64_expand_subvti): New function.
10187 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
10189 * config/aarch64/aarch64-option-extensions.def: New entry for profile
10191 * config/aarch64/aarch64.h (AARCH64_FL_PROFILE): New.
10192 * doc/invoke.texi (aarch64-feature-modifiers): New entry for profile
10195 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
10198 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
10199 address check not strict.
10201 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
10203 * config/aarch64/aarch64-simd.md (aarch64_simd_mov<VQ:mode>): Replace
10205 (store_pair_lanes<mode>): Likewise.
10206 * config/aarch64/aarch64-protos.h (aarch64_addr_query_type): Add new
10207 enum value 'ADDR_QUERY_LDP_STP_N'.
10208 * config/aarch64/aarch64.c (aarch64_addr_query_type): Likewise.
10209 (aarch64_print_address_internal): Add declaration.
10210 (aarch64_print_ldpstp_address): Remove.
10211 (aarch64_classify_address): Adapt mode for 'ADDR_QUERY_LDP_STP_N'.
10212 (aarch64_print_operand): Change printing of 'y'.
10213 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Use
10214 new enum value 'ADDR_QUERY_LDP_STP_N', don't hardcode mode and use
10215 'true' rather than '1'.
10216 * config/aarch64/constraints.md (Uml): Likewise.
10217 (Uml): Rename to Umn.
10220 2018-07-19 Richard Biener <rguenther@suse.de>
10222 * tree-ssa-sccvn.h (struct vn_phi_s): Make phiargs member
10224 * tree-ssa-sccvn.c: Remove alloc-pool.h use.
10225 (vn_phi_hasher): Derive from nofree_ptr_hash and remove remove method.
10226 (vn_reference_hasher): Likewise.
10227 (struct vn_tables_s): Remove obstack and alloc-pool members.
10228 (vn_tables_obstack, vn_tables_insert_obstack): New global obstacks.
10229 (vn_nary_build_or_lookup_1): Manually build in vn_tables_insert_obstack.
10230 (vn_reference_insert): Allocate from obstack instead of from alloc-pool.
10231 (vn_reference_insert_pieces): Likewise.
10232 (alloc_vn_nary_op_noinit): Adjust.
10233 (vn_nary_op_insert_stmt): Allocate phiargs in-place.
10234 (vn_phi_eq): Adjust.
10235 (shared_lookup_phiargs): Remove.
10236 (vn_phi_lookup): Allocate temporary vn_phi_s on the stack.
10237 (vn_phi_insert): Allocate from obstack instead of from alloc-pool.
10238 (visit_reference_op_call): Likewise.
10239 (copy_nary, copy_phi, copy_reference): Remove.
10240 (process_scc): Rewind the obstack when iterating. Do not
10241 copy the elements to valid_info but just move them from one
10242 hashtable to the other.
10243 (allocate_vn_table): Adjust.
10244 (free_vn_table): Likewise.
10245 (init_scc_vn): Likewise.
10246 (free_scc_vn): Likewise.
10248 2018-07-19 H.J. Lu <hongjiu.lu@intel.com>
10251 * config/i386/i386.c (rest_of_insert_endbranch): Lookup
10252 indirect_return as function type attribute.
10253 (ix86_attribute_table): Change indirect_return to function
10255 * doc/extend.texi: Update indirect_return attribute.
10257 2018-07-19 Aldy Hernandez <aldyh@redhat.com>
10259 * wide-int.h (widest2_int): New.
10260 * gimple-fold.c (arith_overflowed_p): Use it.
10261 * tree.h (widest2_int_cst): New.
10262 * tree-vrp.c (wide_int_binop_overflow): Rename from
10263 vrp_int_const_binop.
10264 Rewrite to work on trees.
10265 (extract_range_from_multiplicative_op_1): Abstract code to...
10266 (wide_int_range_min_max): ...here.
10267 (wide_int_range_cross_product): ...and here.
10268 (extract_range_from_binary_expr_1): Abstract overflow code to...
10269 (wide_int_range_mult_wrapping): ...here.
10270 * tree-vrp.h (wide_int_range_cross_product): New.
10271 (wide_int_range_mult_wrapping): New.
10273 2018-07-19 Andrew Senkevich <andrew.senkevich@intel.com>
10274 Julia Koval <julia.koval@intel.com>
10276 * config/i386/x86-tune-costs.h (skylake_memcpy,
10277 skylake_memset): Replace rep_prefix with unrolling for size 512.
10279 2018-07-18 Kugan Vivekanandarajah <kuganv@linaro.org>
10281 PR middle-end/86544
10282 * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): Handle
10283 comparision with EQ_EXPR in last stmt.
10285 2018-07-18 Kelvin Nilsen <kelvin@gcc.gnu.org>
10287 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Rename
10288 this subsection to "PowerPC AltiVec/VSX Built-in Functions".
10289 (PowerPC AltiVec/VSX Built-in Functions): New name for subsection
10290 previously known as "PowerPC AltiVec Built-in Functions". Move
10291 some material to new subsubsections "PowerPC AltiVec Built-in
10292 Functions on ISA 2.06" and "PowerPC AltiVec Built-in Functions on
10294 (PowerPC Altivec Built-in Functions on ISA 2.05): New subsubsection.
10295 (PowerPC Altivec Built-in Functions on ISA 2.06): Likewise.
10296 (PowerPC Altivec Built-in Functions on ISA 2.07): Likewise.
10297 (PowerPC Altivec Built-in Functions on ISA 3.0): Likewise.
10299 2018-07-18 Richard Biener <rguenther@suse.de>
10301 PR tree-optimization/86557
10302 * tree-vect-patterns.c (vect_recog_divmod_pattern): Also handle
10305 2018-07-18 Ilya Leoshkevich <iii@linux.ibm.com>
10307 * config/s390/s390.c (s390_function_profiler): Generate CFI.
10309 2018-07-17 Jeff Law <law@redhat.com>
10311 * config/arm/arm.c (get_label_padding): Update for recent
10312 changes to label_to_alignment.
10314 PR tree-optimization/86010
10315 * tree-ssa-dse.c (compute_trims): Fix typo/thinko.
10317 * config/mips/mips.c (vr4130_align_insns): Update for recent
10318 changes to label_to_alignment.
10320 * config/frv/frv.c (frv_label_align): Update for recent changes
10321 to label_to_alignment.
10323 * config/nios2/nios2.c (nios2_label_align): Update for recent
10324 changes which dropped ALIGN_LABELS_LOG.
10326 2018-07-17 Andreas Schwab <schwab@linux-m68k.org>
10328 * config/m68k/m68k.md (umulsi3_highpart+1, const_umulsi3_highpart)
10329 (smulsi3_highpart+1, const_smulsi3_highpart): Add CC_STATUS_INIT.
10331 2018-07-17 Claudiu Zissulescu <claziss@synopsys.com>
10333 * config/arc/arc.c (arc_label_align): Use align_labels instead of
10334 deprecated align_labels_log.
10336 2018-07-17 Richard Biener <rguenther@suse.de>
10339 * dwarf2out.c (init_sections_and_labels): Always generate
10340 a debug_line_str_section for early LTO debug.
10341 (dwarf2out_finish): Reset debug_line_str_hash output early.
10342 Bump counter for extra dwarf5 .debug_loc labels to not conflict
10344 (dwarf2out_early_finish): Output debug_line_str.
10346 2018-07-17 Robin Dapp <rdapp@linux.ibm.com>
10348 * config/s390/s390.c (preferred_la_operand_p): Do not use LA with
10349 index register on z196 or later.
10351 2018-07-17 Robin Dapp <rdapp@linux.ibm.com>
10353 * config/s390/s390.c (s390_default_align): Set default function
10355 (s390_override_options_after_change): Call s390_default align.
10356 (s390_option_override_internal): Call s390_default_align.
10357 (TARGET_OVERRIDE_OPTIONS_AFTER_CHANGE): Define.
10359 2018-07-17 Jakub Jelinek <jakub@redhat.com>
10361 PR middle-end/86542
10362 * omp-low.c (create_task_copyfn): Copy over also fields corresponding
10363 to _looptemp_ clauses, other than the first two.
10365 2018-07-17 Martin Liska <mliska@suse.cz>
10367 * opts.c: Do not enable OPT_falign_* for -Os.
10369 2018-07-17 Martin Liska <mliska@suse.cz>
10371 * align.h (MAX_CODE_ALIGN): New.
10372 (MAX_CODE_ALIGN_VALUE): New.
10373 * common/config/i386/i386-common.c (ix86_handle_option):
10374 (MAX_CODE_ALIGN): Moved to align.h.
10375 * final.c (MAX_CODE_ALIGN): Likewise.
10376 * opts.c (parse_and_check_align_values):
10377 (MAX_CODE_ALIGN): Likewise.
10378 (MAX_CODE_ALIGN_VALUE): Likewise.
10380 2018-07-17 Martin Liska <mliska@suse.cz>
10382 * config/i386/att.h (ASM_OUTPUT_ALIGN): Fix spacing
10383 in order to fulfil coding style.
10384 * config/i386/cygming.h (ASM_OUTPUT_ALIGN): Likewise.
10385 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
10386 * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
10387 * config/iq2000/iq2000.h (ASM_OUTPUT_ALIGN): Likewise.
10388 * config/pa/pa.h (ASM_OUTPUT_ALIGN): Likewise.
10389 * config/sparc/sol2.h (ASM_OUTPUT_ALIGN_WITH_NOP): Likewise.
10390 * config/sparc/sparc.h (ASM_OUTPUT_ALIGN): Likewise.
10391 * config/visium/visium.h (ASM_OUTPUT_ALIGN): Likewise.
10392 (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
10394 2018-07-17 Martin Liska <mliska@suse.cz>
10396 * align.h: New file.
10397 * config/alpha/alpha.c (alpha_align_insns_1): Use align_functions
10399 * config/i386/i386.c (ix86_avoid_jump_mispredicts): Use new return type
10400 align_flags of label_to_alignment.
10401 * config/m32r/m32r.h (LOOP_ALIGN): Wrap returned values into
10403 * config/m68k/m68k.c: Do not use removed align_labels_value and
10405 * config/nds32/nds32.h (JUMP_ALIGN): Wrap result into align_flags class.
10406 (LOOP_ALIGN): Likewise.
10407 (LABEL_ALIGN): Likewise.
10408 * config/powerpcspe/powerpcspe.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
10409 Remove not used macro.
10410 (rs6000_loop_align): Change return type to align_flags.
10411 (rs6000_loop_align_max_skip): Remove.
10412 * config/rs6000/rs6000-protos.h (rs6000_loop_align):
10413 Change return type to align_flags.
10414 * config/rs6000/rs6000.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
10415 Remove not used macro.
10416 (rs6000_loop_align): Change return type to align_flags.
10417 (rs6000_loop_align_max_skip): Remove.
10418 * config/rx/rx.h (JUMP_ALIGN): Wrap integer values
10419 * config/rx/rx-protos.h (rx_align_for_label): Make it
10421 * config/rx/rx.c (rx_align_for_label): Change return type
10423 (rx_max_skip_for_label): Remove TARGET_ASM_*_ALIGN_MAX_SKIP
10425 into align_flags class.
10426 (LABEL_ALIGN): Likewise.
10427 (LOOP_ALIGN): Likewise.
10428 * config/s390/s390.c (s390_label_align): Use align_flags
10430 (s390_asm_output_function_label): Likewise.
10431 * config/sh/sh.c (sh_override_options_after_change):
10432 Use align_flags class directly without macros.
10433 (find_barrier): Likewise.
10434 (barrier_align): Likewise.
10435 (sh_loop_align): Likewise.
10436 * config/spu/spu.c (spu_option_override):
10437 Use align_flags_tuple::get_value instead of removed macros.
10438 (spu_sched_init): Likewise.
10439 * config/spu/spu.h (GTY): Likewise.
10440 * config/visium/visium.c (visium_option_override):
10441 Set "8" as default secondary alignment.
10442 * config/visium/visium.h (SUBALIGN_LOG): Define to 3
10443 in order to guarantee secondary alignment of 8.
10444 * coretypes.h: Include align.h header file.
10445 * doc/tm.texi: Remove TARGET_ASM_JUMP_ALIGN_MAX_SKIP,
10446 TARGET_ASM_LOOP_ALIGN_MAX_SKIP, TARGET_ASM_LABEL_ALIGN_MAX_SKIP
10447 and TARGET_ASM_LABEL_ALIGN_AFTER_BARRIER_MAX_SKIP macros.
10448 * doc/tm.texi.in: Likewise.
10449 * final.c (struct label_alignment): Remove not used structure.
10450 (LABEL_ALIGN): Change type to align_flags.
10451 (LOOP_ALIGN): Likewise.
10452 (JUMP_ALIGN): Likewise.
10453 (default_loop_align_max_skip): Remove.
10454 (default_label_align_max_skip): Likewise.
10455 (default_jump_align_max_skip): Likewise.
10456 (default_label_align_after_barrier_max_skip):
10457 (LABEL_TO_ALIGNMENT): Change to access label_align vector.
10458 (LABEL_TO_MAX_SKIP): Remove.
10459 (label_to_alignment): Return align_flags type instead of integer.
10460 (label_to_max_skip): Remove.
10461 (align_fuzz): Use align_flags type.
10462 (compute_alignments): Use align_flags type and use align_flags::max
10463 to combine multiple alignments.
10464 (grow_label_align): Grow vec instead of C array.
10465 (update_alignments): Assign just LABEL_TO_ALIGNMENT.
10466 (shorten_branches): Use align_flags type and use align_flags::max
10467 to combine multiple alignments.
10468 (final_scan_insn_1): Remove usage of secondary alignment that comes
10469 from label alignment, but instead use proper secondary alignment
10470 which is computed in grow_label_align.
10471 * flags.h (struct align_flags_tuple): Move to align.h.
10472 (struct align_flags): Likewise.
10473 (state_align_loops): Rename to align_loops.
10474 (state_align_jumps): Rename to align_jumps.
10475 (state_align_labels): Rename to align_labels.
10476 (state_align_functions): Rename to align_functions.
10477 (align_loops_log): Remove.
10478 (align_jumps_log): Remove.
10479 (align_labels_log): Remove.
10480 (align_functions_log): Remove.
10481 (align_loops_max_skip): Remove.
10482 (align_jumps_max_skip): Remove.
10483 (align_labels_max_skip): Remove.
10484 (align_functions_max_skip): Remove.
10485 (align_loops_value): Remove.
10486 (align_jumps_value): Remove.
10487 (align_labels_value): Remove.
10488 (align_functions_value): Remove.
10489 * output.h (label_to_alignment): Change return type to align_flags.
10490 (label_to_max_skip): Remove.
10491 * target.def: Remove loop_align_max_skip, label_align_max_skip,
10492 jump_align_max_skip macros.
10493 * targhooks.h (default_loop_align_max_skip): Remove.
10494 (default_label_align_max_skip): Likewise.
10495 (default_jump_align_max_skip): Likewise.
10496 (default_label_align_after_barrier_max_skip): Remove.
10497 * toplev.c (read_log_maxskip): Use ::normalize function.
10498 (parse_N_M): Remove not used argument and also call ::normalize.
10499 (parse_alignment_opts): Do not pass unused arguments.
10500 * varasm.c (assemble_start_function): Use directly align_functions
10501 instead of removed macros.
10502 * system.h: Do not poison removed macros.
10504 2018-07-17 Jakub Jelinek <jakub@redhat.com>
10506 PR middle-end/86539
10507 * gimplify.c (gimplify_omp_for): Ensure taskloop firstprivatized init
10508 and cond temporaries don't have reference type if iterator has
10509 pointer type. For init use &for_pre_body instead of pre_p if
10510 for_pre_body is non-empty.
10512 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
10514 * config/rs6000/rs6000.md (trunc<mode>sf2): Expand truncates of
10515 double-double modes to SFmode directly directly.
10516 (trunc<mode>sf2_fprs): Delete.
10518 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
10520 * config/rs6000/rs6000.c (init_float128_ibm): Use the correct names
10521 for conversions between IFmode and the decimal floating point modes.
10522 (init_float128_ieee): Use the correct names for conversions between
10523 KFmode and the decimal floating point modes.
10525 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
10527 * config/rs6000/rs6000.c (init_float128_ibm): Use more correct names
10528 for the conversions between TDmode and IFmode.
10529 (init_float128_ieee): Use more correct names for the conversions
10530 between TDmode and KFmode.
10532 2018-07-16 Jakub Jelinek <jakub@redhat.com>
10534 PR tree-optimization/86526
10535 * builtins.c (expand_builtin_memcmp): Formatting fixes.
10536 (inline_expand_builtin_string_cmp): Likewise.
10537 (inline_string_cmp): Likewise. Use c_readstr instead of
10538 builtin_memcpy_read_str. Add unit_mode temporary.
10540 2018-07-16 Bernd Edlinger <bernd.edlinger@hotmail.de>
10542 PR middle-end/86528
10543 * builtins.c (check_access): Bail out if range[0] is no INTEGER_CST.
10544 * expr.c (string_constant): Fix the element size of ARRAY_TYPE.
10546 2018-07-16 Kelvin Nilsen <kelvin@gcc.gnu.org>
10548 * doc/extend.texi (PowerPC AltiVec Built-in Functions):
10549 Alphabetize prototypes of built-in functions, separating out
10550 built-in functions that are listed in this section but should be
10551 described elsewhere.
10553 2018-07-16 Uros Bizjak <ubizjak@gmail.com>
10556 * expmed.c (emit_store_flag): Do not emit setcc followed by a
10557 conditional move when trapping comparison was split to a
10558 non-trapping one (and vice versa).
10560 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
10562 * config/s390/s390.c (s390_function_profiler): Generate nops
10563 instead of profiler call sequences.
10564 * config/s390/s390.opt: Add the new option.
10566 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
10568 * config/s390/s390.c (s390_function_profiler): Generate
10569 __mcount_loc section.
10570 * config/s390/s390.opt: Add the new option.
10572 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
10574 * common.opt: Add the new warning.
10575 * config/s390/s390.c (s390_function_profiler): Emit "brasl
10576 %r0,__fentry__" when -mfentry is specified.
10577 (s390_option_override_internal): Disallow -mfentry for 31-bit
10579 * config/s390/s390.opt: Add the new option.
10581 2018-07-16 Richard Biener <rguenther@suse.de>
10584 * dwarf2out.c (dwarf2out_register_external_die): Assign DIE parents
10585 for function-local FUNCTION_DECL and RESULT_DECL immediately.
10587 2018-07-16 Martin Liska <mliska@suse.cz>
10590 * ipa-pure-const.c (malloc_candidate_p): Revert ::get
10593 2017-07-16 Claudiu Zissulescu <claziss@synopsys.com>
10595 * config/arc/arcHS.md: Update ARCHS scheduling rules.
10597 2017-07-16 Claudiu Zissulescu <claziss@synopsys.com>
10599 * config/arc/arc-arch.h (arc_tune_attr): Add new tune parameters
10601 * config/arc/arc-cpus.def (hs4x): New cpu.
10603 * config/arc/arc-tables.opt: Regenerate.
10604 * config/arc/arc.c (arc_sched_issue_rate): New function.
10605 (TARGET_SCHED_ISSUE_RATE): Define.
10606 (TARGET_SCHED_EXPOSED_PIPELINE): Likewise.
10607 * config/arc/arc.md (attr type): Add fpu_fuse, fpu_sdiv, fpu_ddiv,
10609 (attr tune): Add ARCHS4x tune values.
10610 (attr tune_dspmpy): Define.
10611 (*tst): Correct instruction type.
10612 * config/arc/arcHS.md: Don't use this automaton for ARCHS4x cpus.
10613 * config/arc/arcHS4x.md: New file.
10614 * config/arc/fpu.md: Update instruction type attributes.
10615 * config/arc/t-multilib: Regenerate.
10617 2018-07-16 Tom de Vries <tdevries@suse.de>
10620 * var-tracking.c (vt_initialize): Fix pre_dec handling.
10622 2018-07-16 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
10624 * config/aarch64/atomics.md (aarch64_store_execlusive<mode>): Add
10627 2018-07-16 Eric Botcazou <ebotcazou@adacore.com>
10629 PR tree-optimization/86514
10630 * tree-ssa-reassoc.c (init_range_entry) <CASE_CONVERT>: Return for a
10631 conversion to a boolean type from a type with greater precision.
10633 2018-07-16 Tom de Vries <tdevries@suse.de>
10635 * var-tracking.c (vt_initialize): Print adjusted insn slim if
10636 dump_flags request TDF_SLIM.
10638 2018-07-16 Aldy Hernandez <aldyh@redhat.com>
10640 * fold-const.c (int_const_binop_1): Abstract...
10641 (wide_int_binop): ...wide int code here.
10642 (poly_int_binop): ...poly int code here.
10643 Abstract the rest of int_const_binop_1 into int_const_binop.
10644 * fold-const.h (wide_int_binop): New.
10645 * tree-vrp.c (vrp_int_const_binop): Call wide_int_binop.
10646 Remove useless PLUS/MINUS_EXPR case.
10647 (zero_nonzero_bits_from_vr): Move wide int code...
10648 (zero_nonzero_bits_from_bounds): ...here.
10649 (extract_range_from_binary_expr_1): Move mask optimization code...
10650 (range_easy_mask_min_max): ...here.
10651 * tree-vrp.h (zero_nonzero_bits_from_bounds): New.
10652 (range_easy_mask_min_max): New.
10654 2018-07-15 Jeff Law <law@redhat.com>
10657 * config/sh/sh.c (output_mi_thunk): Remove dead conditional
10660 2018-07-14 Jim Wilson <jimw@sifive.com>
10662 * config/riscv/linux.h (TARGET_ASM_FILE_END): New.
10664 2018-07-14 Paul Koning <ni1d@arrl.net>
10666 * config/pdp11/pdp11.c (pdp11_rtx_costs): Bugfixes.
10668 2018-07-13 Jan Hubicka <hubicka@ucw.cz>
10670 * lto-streamer-out.c (copy_function_or_variable): Dump info about
10673 2018-07-13 Bill Schmidt <wschmidt@linux.ibm.com>
10674 Steve Munroe <munroesj52@gmail.com>
10676 * config/rs6000/emmintrin.h (_mm_and_si128): New function.
10677 (_mm_andnot_si128): Likewise.
10678 (_mm_or_si128): Likewise.
10679 (_mm_xor_si128): Likewise.
10681 2018-07-13 Qing Zhao <qing.zhao@oracle.com>
10683 PR middle-end/78809
10684 * builtins.c (expand_builtin_memcmp): Inline the calls first
10685 when result_eq is false.
10686 (expand_builtin_strcmp): Inline the calls first.
10687 (expand_builtin_strncmp): Likewise.
10688 (inline_string_cmp): New routine. Expand a string compare
10689 call by using a sequence of char comparison.
10690 (inline_expand_builtin_string_cmp): New routine. Inline expansion
10691 a call to str(n)cmp/memcmp.
10692 * doc/invoke.texi (--param builtin-string-cmp-inline-length):
10694 * params.def (BUILTIN_STRING_CMP_INLINE_LENGTH): New.
10696 2018-07-13 Richard Earnshaw <rearnsha@arm.com>
10698 * config/arm/driver-arm.c: Include arm-native.h.
10699 (host_detect_local_cpu): Use auto-generated data tables.
10700 (vendors, arm_cpu_table): Delete. Move part information to ...
10701 * config/arm/arm-cpus.in: ... here.
10702 * config/arm/parsecpu.awk (gen_native): New function.
10703 (vendor, part): New CPU fields.
10704 (END): Add support for building the native CPU detection tables.
10705 * config/arm/t-arm (arm-native.h): Add build rule.
10706 (driver-arm.o): Add dependency on arm-native.h.
10708 2018-07-13 Richard Biener <rguenther@suse.de>
10710 PR middle-end/85974
10711 * match.pd (addr1 - addr2): Allow either of the operand to
10714 2018-07-13 Tom de Vries <tdevries@suse.de>
10716 * tree-inline.c (remap_ssa_name): Save and reuse debug exprs generated
10719 2018-07-13 Jackson Woodruff <jackson.woodruff@arm.com>
10721 * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp): Use
10722 arrays instead of numbered variables.
10724 2018-07-13 Eric Botcazou <ebotcazou@adacore.com>
10726 * config/sparc/sparc-protos.h (sparc_compute_frame_size): Delete.
10727 * config/sparc/sparc.c (sparc_compute_frame_size): Make static.
10729 2018-07-13 Richard Biener <rguenther@suse.de>
10732 * dwarf2out.c (gen_type_die_with_usage): Use scope_die_for
10733 instead of get_context_die.
10735 2018-07-13 Kugan Vivekanandarajah <kuganv@linaro.org>
10736 Richard Biener <rguenther@suse.de>
10738 PR middle-end/86489
10739 * tree-ssa-loop-niter.c (number_of_iterations_popcount): Check
10740 that the loop latch destination where phi is defined.
10742 2018-07-12 Kito Cheng <kito.cheng@gmail.com>
10744 * config/riscv/riscv.c (enum riscv_privilege_levels): Add UNKNOWN_MODE.
10745 (riscv_expand_epilogue): Add assertion to check interrupt mode.
10746 (riscv_set_current_function): Extract getting interrupt type to new
10748 (riscv_get_interrupt_type): New function.
10749 (riscv_merge_decl_attributes): New function, checking interrupt type is
10751 (TARGET_MERGE_DECL_ATTRIBUTES): Define.
10753 2018-07-12 Paul Koning <ni1d@arrl.net>
10755 * config/pdp11/pdp11.c (pdp11_output_def): Fix typo in .set
10758 2018-07-12 Paul Koning <ni1d@arrl.net>
10760 * doc/rtl.texi (REG_NONNEG): Remove decrement and branch until
10761 zero reference, add doloop_end instead.
10762 * doc/md.texi (decrement_and_branch_until_zero): Remove.
10763 (Looping patterns): Remove decrement_and_branch_until_zero. Add
10764 detail for doloop_end.
10766 2018-07-12 Martin Sebor <msebor@redhat.com>
10769 * attribs.c (decl_attributes): Reject conflicting attributes before
10770 calling attribute handlers.
10772 2018-07-12 Jan Hubicka <hubicka@ucw.cz>
10774 * dumpfile.c (gcc::dump_manager::get_dump_file_name): Add PART
10776 (gcc::dump_manager::get_dump_file_name): likewise.
10777 (dump_begin): Likewise.
10778 * dumpfile.h (dump_begin): Update prototype.
10779 (gcc::dump_manager::get_dump_file_name,
10780 gcc::dump_manager::get_dump_file_name): Update prototype.
10782 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
10784 * internal-fn.h (vectorizable_internal_fn_p): New function.
10785 * tree-vect-slp.c (compatible_calls_p): Likewise.
10786 (vect_build_slp_tree_1): Remove nops argument. Handle calls
10787 to internal functions.
10788 (vect_build_slp_tree_2): Update call to vect_build_slp_tree_1.
10790 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
10792 * fold-const.h (inverse_conditions_p): Declare.
10793 * fold-const.c (inverse_conditions_p): New function.
10794 * match.pd: Use inverse_conditions_p. Add folds of view_converts
10795 that test the inverse condition of a conditional internal function.
10796 * internal-fn.h (vectorized_internal_fn_supported_p): Declare.
10797 * internal-fn.c (internal_fn_mask_index): Handle conditional
10798 internal functions.
10799 (vectorized_internal_fn_supported_p): New function.
10800 * tree-if-conv.c: Include internal-fn.h and fold-const.h.
10801 (any_pred_load_store): Replace with...
10802 (need_to_predicate): ...this new variable.
10803 (redundant_ssa_names): New variable.
10804 (ifcvt_can_use_mask_load_store): Move initial checks to...
10805 (ifcvt_can_predicate): ...this new function. Handle tree codes
10806 for which a conditional internal function exists.
10807 (if_convertible_gimple_assign_stmt_p): Use ifcvt_can_predicate
10808 instead of ifcvt_can_use_mask_load_store. Update after variable
10810 (predicate_load_or_store): New function, split out from
10811 predicate_mem_writes.
10812 (check_redundant_cond_expr): New function.
10813 (value_available_p): Likewise.
10814 (predicate_rhs_code): Likewise.
10815 (predicate_mem_writes): Rename to...
10816 (predicate_statements): ...this. Use predicate_load_or_store
10817 and predicate_rhs_code.
10818 (combine_blocks, tree_if_conversion): Update after above name changes.
10819 (ifcvt_local_dce): Handle redundant_ssa_names.
10820 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): Handle
10821 general conditional functions.
10822 * tree-vect-stmts.c (vectorizable_call): Likewise.
10824 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
10825 Alan Hayward <alan.hayward@arm.com>
10826 David Sherwood <david.sherwood@arm.com>
10828 * internal-fn.h (can_interpret_as_conditional_op_p): Declare.
10829 * internal-fn.c (can_interpret_as_conditional_op_p): New function.
10830 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Handle conditional
10831 plus and minus and convert them into IFN_COND_FMA-based sequences.
10832 (convert_mult_to_fma): Handle conditional plus and minus.
10834 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
10836 * doc/md.texi (cond_fma, cond_fms, cond_fnma, cond_fnms): Document.
10837 * optabs.def (cond_fma_optab, cond_fms_optab, cond_fnma_optab)
10838 (cond_fnms_optab): New optabs.
10839 * internal-fn.def (COND_FMA, COND_FMS, COND_FNMA, COND_FNMS): New
10840 internal functions.
10841 (FMA): Use DEF_INTERNAL_FLT_FN rather than DEF_INTERNAL_FLT_FLOATN_FN.
10842 * internal-fn.h (get_conditional_internal_fn): Declare.
10843 (get_unconditional_internal_fn): Likewise.
10844 * internal-fn.c (cond_ternary_direct): New macro.
10845 (expand_cond_ternary_optab_fn): Likewise.
10846 (direct_cond_ternary_optab_supported_p): Likewise.
10847 (FOR_EACH_COND_FN_PAIR): Likewise.
10848 (get_conditional_internal_fn): New function.
10849 (get_unconditional_internal_fn): Likewise.
10850 * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 5.
10851 (gimple_match_op::gimple_match_op): Add a new overload for 5
10853 (gimple_match_op::set_op): Likewise.
10854 (gimple_resimplify5): Declare.
10855 * genmatch.c (decision_tree::gen): Generate simplifications for
10857 * gimple-match-head.c (gimple_simplify): Define an overload for
10858 5 operands. Handle calls with 5 arguments in the top-level overload.
10859 (convert_conditional_op): Handle conversions from unconditional
10860 internal functions to conditional ones.
10861 (gimple_resimplify5): New function.
10862 (build_call_internal): Pass a fifth operand.
10863 (maybe_push_res_to_seq): Likewise.
10864 (try_conditional_simplification): Try converting conditional
10865 internal functions to unconditional internal functions.
10866 Handle 3-operand unconditional forms.
10867 * match.pd (UNCOND_TERNARY, COND_TERNARY): Operator lists.
10868 Define ternary equivalents of the current rules for binary conditional
10869 internal functions.
10870 * config/aarch64/aarch64.c (aarch64_preferred_else_value): Handle
10871 ternary operations.
10872 * config/aarch64/iterators.md (UNSPEC_COND_FMLA, UNSPEC_COND_FMLS)
10873 (UNSPEC_COND_FNMLA, UNSPEC_COND_FNMLS): New unspecs.
10874 (optab): Handle them.
10875 (SVE_COND_FP_TERNARY): New int iterator.
10876 (sve_fmla_op, sve_fmad_op): New int attributes.
10877 * config/aarch64/aarch64-sve.md (cond_<optab><mode>)
10878 (*cond_<optab><mode>_2, *cond_<optab><mode_4)
10879 (*cond_<optab><mode>_any): New SVE_COND_FP_TERNARY patterns.
10881 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
10883 * target.def (preferred_else_value): New target hook.
10884 * doc/tm.texi.in (TARGET_PREFERRED_ELSE_VALUE): New hook.
10885 * doc/tm.texi: Regenerate.
10886 * targhooks.h (default_preferred_else_value): Declare.
10887 * targhooks.c (default_preferred_else_value): New function.
10888 * internal-fn.h (conditional_internal_fn_code): Declare.
10889 * internal-fn.c (FOR_EACH_CODE_MAPPING): New macro.
10890 (get_conditional_internal_fn): Use it.
10891 (conditional_internal_fn_code): New function.
10892 * gimple-match.h (gimple_match_cond): New struct.
10893 (gimple_match_op): Add a cond member function.
10894 (gimple_match_op::gimple_match_op): Update all forms to take a
10896 * genmatch.c (expr::gen_transform): Use the same condition as res_op
10897 for the suboperation, but don't specify a particular else_value.
10898 * tree-ssa-sccvn.c (vn_nary_simplify, vn_reference_lookup_3)
10899 (visit_nary_op, visit_reference_op_load): Pass
10900 gimple_match_cond::UNCOND to the gimple_match_op constructor.
10901 * gimple-match-head.c: Include tree-eh.h
10902 (convert_conditional_op): New function.
10903 (maybe_resimplify_conditional_op): Likewise.
10904 (gimple_resimplify1): Call maybe_resimplify_conditional_op.
10905 (gimple_resimplify2): Likewise.
10906 (gimple_resimplify3): Likewise.
10907 (gimple_resimplify4): Likewise.
10908 (maybe_push_res_to_seq): Return null for conditional operations.
10909 (try_conditional_simplification): New function.
10910 (gimple_simplify): Call it. Pass conditions to the gimple_match_op
10912 * match.pd: Fold VEC_COND_EXPRs of an IFN_COND_* call to a new
10914 * config/aarch64/aarch64.c (aarch64_preferred_else_value): New
10916 (TARGET_PREFERRED_ELSE_VALUE): Redefine.
10918 2018-07-12 Jan Hubicka <hubicka@ucw.cz>
10920 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
10922 (hash_tree): Do not hash DECL_FCONTEXT
10923 * tree-streamer-in.c (lto_input_ts_field_decl_tree_pointers):
10924 Do not stream DECL_FCONTEXT.
10925 * tree-streamer-out.c (write_ts_field_decl_tree_pointers): Likewise.
10926 * tree.c (free_lang_data_in_decl): Free DECL_FCONTEXT.
10928 2018-07-12 Richard Biener <rguenther@suse.de>
10931 * dwarf2out.c (gen_block_die): Only output blocks when they have
10932 at least one !DECL_IGNORED_P variable.
10934 2018-07-12 Richard Biener <rguenther@suse.de>
10937 * config/gnu-user.h (GNU_USER_TARGET_NO_PTHREADS_LIB_SPEC):
10938 Remove -mieee-fp handling.
10940 2018-07-12 Richard Biener <rguenther@suse.de>
10942 * tree-ssa-sccvn.c (vn_lookup_simplify_result): Remove bogus
10943 left-over from last patch.
10945 2018-07-12 Jakub Jelinek <jakub@redhat.com>
10947 PR tree-optimization/86492
10948 * gimple-ssa-store-merging.c
10949 (imm_store_chain_info::coalesce_immediate_stores): Call
10950 check_no_overlap even for the merge_overlapping case. Formatting fix.
10952 2018-07-12 Richard Biener <rguenther@suse.de>
10954 PR middle-end/86479
10955 * fold-const.c (fold_binary_op_with_conditional_arg): Do not
10956 move possibly trapping operations into the conditional.
10958 2018-07-12 Richard Biener <rguenther@suse.de>
10960 * tree-ssa-sccvn.c (mprts_hook_cnt): Remove.
10961 (vn_lookup_simplify_result): Remove recursion limit applied
10963 (vn_nary_build_or_lookup_1): Adjust.
10964 (try_to_simplify): Likewise.
10965 * gimple-match-head.c (gimple_resimplify1): Instead apply one
10967 (gimple_resimplify2): Likewise.
10968 (gimple_resimplify3): Likewise.
10969 (gimple_resimplify4): Likewise.
10971 2018-07-11 Jakub Jelinek <jakub@redhat.com>
10973 * config/i386/avx512bitalgintrin.h (_mm512_mask_bitshuffle_epi64_mask):
10974 Use __mmask64 type instead of __mmask8 for __M argument.
10975 * config/i386/avx512fintrin.h (_mm512_mask_xor_epi64,
10976 _mm512_maskz_xor_epi64): Use __mmask8 type instead of __mmask16 for
10978 (_mm512_mask_cmpneq_epi64_mask): Use __mmask8 type instead of
10979 __mmask16 for __M argument.
10980 (_mm512_maskz_insertf32x4, _mm512_maskz_inserti32x4,
10981 _mm512_mask_insertf32x4, _mm512_mask_inserti32x4): Cast last argument
10982 to __mmask16 instead of __mmask8.
10983 * config/i386/avx512vlintrin.h (_mm_mask_add_ps, _mm_maskz_add_ps,
10984 _mm256_mask_add_ps, _mm256_maskz_add_ps, _mm_mask_sub_ps,
10985 _mm_maskz_sub_ps, _mm256_mask_sub_ps, _mm256_maskz_sub_ps,
10986 _mm256_maskz_cvtepi32_ps, _mm_maskz_cvtepi32_ps): Use __mmask8 type
10987 instead of __mmask16 for __U argument.
10988 * config/i386/avx512vlbwintrin.h (_mm_mask_cmp_epi8_mask): Use
10989 __mmask16 instead of __mmask8 for __U argument.
10990 (_mm256_mask_cmp_epi8_mask): Use __mmask32 instead of __mmask16 for
10992 (_mm256_cmp_epi8_mask): Use __mmask32 return type instead of
10994 (_mm_mask_cmp_epu8_mask): Use __mmask16 instead of __mmask8 for __U
10996 (_mm256_mask_cmp_epu8_mask): Use __mmask32 instead of __mmask16 for
10998 (_mm256_cmp_epu8_mask): Use __mmask32 return type instead of
11000 (_mm_mask_cmp_epi16_mask): Cast last argument to __mmask8 instead
11002 (_mm256_mask_cvtepi8_epi16): Use __mmask16 instead of __mmask32 for
11004 (_mm_mask_cvtepi8_epi16): Use __mmask8 instead of __mmask32 for
11006 (_mm256_mask_cvtepu8_epi16): Use __mmask16 instead of __mmask32 for
11008 (_mm_mask_cvtepu8_epi16): Use __mmask8 instead of __mmask32 for
11010 (_mm256_mask_cmpneq_epu8_mask, _mm256_mask_cmplt_epu8_mask,
11011 _mm256_mask_cmpge_epu8_mask, _mm256_mask_cmple_epu8_mask): Change
11012 return type as well as __M argument type and all casts from __mmask8
11014 (_mm256_mask_cmpneq_epu16_mask, _mm256_mask_cmplt_epu16_mask,
11015 _mm256_mask_cmpge_epu16_mask, _mm256_mask_cmple_epu16_mask): Change
11016 return type as well as __M argument type and all casts from __mmask8
11018 (_mm256_mask_cmpneq_epi8_mask, _mm256_mask_cmplt_epi8_mask,
11019 _mm256_mask_cmpge_epi8_mask, _mm256_mask_cmple_epi8_mask): Change
11020 return type as well as __M argument type and all casts from __mmask8
11022 (_mm256_mask_cmpneq_epi16_mask, _mm256_mask_cmplt_epi16_mask,
11023 _mm256_mask_cmpge_epi16_mask, _mm256_mask_cmple_epi16_mask): Change
11024 return type as well as __M argument type and all casts from __mmask8
11026 * config/i386/avx512vbmi2vlintrin.h (_mm_mask_shrdi_epi32,
11027 _mm_mask_shldi_epi32): Cast last argument to __mmask8 instead of
11030 2018-07-11 Grazvydas Ignotas <notasas@gmail.com>
11032 * config/i386/avx512bwintrin.h: (_mm512_mask_cmp_epi8_mask,
11033 _mm512_mask_cmp_epu8_mask): Use __mmask64 type instead of __mmask32
11036 2018-07-11 Paul Koning <ni1d@arrl.net>
11038 * doc/md.texi (define_subst): Document how multiple occurrences of
11039 the same argument in the replacement pattern are handled.
11041 2018-07-11 Paul Koning <ni1d@arrl.net>
11043 * doc/extend.texi (Common Variable Attributes): Move "mode" into
11044 alphabetical order.
11045 (Common Type Attributes): Add "mode" attribute.
11047 2018-07-11 Jan Hubicka <hubicka@ucw.cz>
11049 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not
11050 stream DECL_ORIGINAL_TYPE.
11051 (DFS::DFS_write_tree_body): Drop hack handling local external decls.
11052 (hash_tree): Do not walk DECL_ORIGINAL_TYPE.
11053 * tree-streamer-in.c (lto_input_ts_decl_non_common_tree_pointers):
11054 Do not walk original type.
11055 * tree-streamer-out.c (streamer_write_chain): Drop hack handling
11057 (write_ts_decl_non_common_tree_pointers): Do not stream
11059 * tree.c (free_lang_data_in_decl): Clear DECL_ORIGINAL_TYPE.
11060 (find_decls_types_r): Do not walk DEC_ORIGINAL_TYPE.
11062 2018-07-11 Aldy Hernandez <aldyh@redhat.com>
11064 * tree-ssa-threadupdate.c (thread_through_all_blocks): Do not jump
11065 thread twice from the same starting edge.
11067 2018-07-11 Aldy Hernandez <aldyh@redhat.com>
11069 * vr-values.c (gimple_stmt_nonzero_p): Abstract common code to...
11070 * gimple.c (gimple_call_nonnull_result_p): ...here...
11071 (gimple_call_nonnull_arg): ...and here.
11072 * gimple.h (gimple_call_nonnull_result_p): New.
11073 (gimple_call_nonnull_arg): New.
11075 2018-07-11 Richard Earnshaw <rearnsha@arm.com>
11077 * config/arm/arm-cpus.in: Move information from fpu field of each
11078 cpu definition to the isa field.
11079 * config/arm/parsecpu.awk (fpu): Delete match rule.
11080 (gen_comm_data): Don't add bits from the CPU's FPU entry.
11082 2018-07-11 Richard Biener <rguenther@suse.de>
11085 * dwarf2out.c (init_sections_and_labels): Use
11086 output_asm_line_debug_info consistently.
11087 (dwarf2out_early_finish): Likewise.
11088 (dwarf2out_finish): Remove DW_AT_stmt_list from early generated
11091 2018-07-11 Richard Biener <rguenther@suse.de>
11093 * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1):
11094 Rework father_bb setting in a way to avoid propagating constants
11095 multiple times on a loop body.
11097 2018-07-10 Mark Wielaard <mark@klomp.org>
11100 * dwarf2out.c (output_macinfo_op): Fix dwarf_FORM typo in gcc_assert.
11102 2018-07-10 Richard Biener <rguenther@suse.de>
11104 * hash-map.h (hash_map::iterator::operator*): Return
11105 references to key and value.
11107 2018-07-10 Jakub Jelinek <jakub@redhat.com>
11110 * gimplify.c (find_combined_omp_for): Add DATA argument, in addition
11111 to finding the inner OMP_FOR/OMP_SIMD stmt find non-trivial wrappers,
11112 BLOCKs with BLOCK_VARs, OMP_PARALLEL in between, OMP_FOR in between.
11113 (gimplify_omp_for): For composite loops, move outer
11114 OMP_{DISTRIBUTE,TASKLOOP,FOR,PARALLEL} right around innermost
11115 OMP_FOR/OMP_SIMD if there are any non-trivial wrappers. For class
11116 iterators add any needed clauses. Allow OMP_FOR_ORIG_DECLS to contain
11117 TREE_LIST for both the original class iterator and the "last" helper
11118 var. Gimplify OMP_FOR_PRE_BODY before the outermost composite
11119 loop, remember has_decl_expr from outer composite loops for the
11120 innermost OMP_SIMD in TREE_PRIVATE bit on OMP_FOR_INIT.
11122 2018-07-09 Martin Sebor <msebor@redhat.com>
11124 PR middle-end/77357
11125 PR middle-end/86428
11126 * builtins.c (c_strlen): Avoid out-of-bounds warnings when
11127 accessing implicitly initialized array elements.
11128 * expr.c (string_constant): Handle string initializers of
11129 character arrays within aggregates.
11130 * gimple-fold.c (fold_array_ctor_reference): Add argument.
11131 Store element offset. As a special case, handle zero size.
11132 (fold_nonarray_ctor_reference): Same.
11133 (fold_ctor_reference): Add argument. Store subobject offset.
11134 * gimple-fold.h (fold_ctor_reference): Add argument.
11136 2018-07-09 Paul Koning <ni1d@arrl.net>
11138 * config/pdp11/pdp11.c (pdp11_addr_cost): New function.
11139 (pdp11_insn_cost): New function.
11140 (pdp11_md_asm_adjust): New function.
11141 (TARGET_INVALID_WITHIN_DOLOOP): Define.
11142 (pdp11_rtx_costs): Update to match machine better.
11143 (output_addr_const_pdp11): Correct format mismatch warnings.
11144 * config/pdp11/pdp11.h (SLOW_BYTE_ACCESS): Correct definition.
11145 * config/pdp11/pdp11.md: General change to add base_cost and/or
11146 length attributes for use by new pdp11_insn_cost function.
11147 (MIN_BRANCH): Correct definition.
11149 (doloop_end): Use standard pattern name for looping pattern.
11150 (doloop_end_nocc): New.
11151 (movsf): Add another constraint alternative.
11152 (zero_extendqihi2): Add constraint alternatives for not in place
11154 (zero_extendhisi2): Remove.
11155 (shift patterns): Add CC handling variants.
11159 (define_peephole2): New peephole to recognize mov that sets CC for
11162 2018-07-09 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
11164 * config/sparc/sparc.c (sparc_fold_builtin) <SPARC_BUILTIN_PDIST,
11165 SPARC_BUILTIN_PDISTN>: Adapt for signature change of wi::neg,
11168 2018-07-09 Jakub Jelinek <jakub@redhat.com>
11171 * real.c (real_nextafter): Return true if result is denormal.
11173 2018-07-09 Martin Liska <mliska@suse.cz>
11175 * common.opt: Add back wrongly removed attribute.
11177 2018-07-09 Richard Biener <rguenther@suse.de>
11180 * dwarf2out.c (gen_block_die): For an early generated DIE
11181 always output high/low PC attributes.
11183 2018-07-09 Tom de Vries <tdevries@suse.de>
11185 * cfgexpand.c (expand_debug_source_expr): Handle VAR_DECL.
11186 * tree-inline.c (remap_ssa_name): Handle default def ssa_name mapping
11187 onto VAR_DECL with abstract origin.
11189 2018-07-07 Jim Wilson <jimw@sifive.com>
11191 * config/riscv/riscv.c (TARGET_CUSTOM_FUNCTION_DESCRIPTORS): New.
11193 2018-07-07 Tom de Vries <tdevries@suse.de>
11195 * tree-dfa.c (dump_enumerated_decls): Handle cfun->cfg == NULL.
11197 2018-07-07 Aldy Hernandez <aldyh@redhat.com>
11199 * tree-vrp.c (vrp_int_const_binop): Change overflow type to
11201 (combine_bound): Use wide-int overflow calculation instead of
11203 * calls.c (maybe_warn_alloc_args_overflow): Change overflow type to
11205 * fold-const.c (int_const_binop_2): Same.
11206 (extract_muldiv_1): Same.
11207 (fold_div_compare): Same.
11208 (fold_abs_const): Same.
11210 * poly-int.h (add): Same.
11214 * predict.c (predict_iv_comparison): Same.
11215 * profile-count.c (slow_safe_scale_64bit): Same.
11216 * simplify-rtx.c (simplify_const_binary_operation): Same.
11217 * tree-chrec.c (tree_fold_binomial): Same.
11218 * tree-data-ref.c (split_constant_offset_1): Same.
11219 * tree-if-conv.c (idx_within_array_bound): Same.
11220 * tree-scalar-evolution.c (iv_can_overflow_p): Same.
11221 * tree-ssa-phiopt.c (minmax_replacement): Same.
11222 * tree-vect-loop.c (is_nonwrapping_integer_induction): Same.
11223 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Same.
11224 * vr-values.c (vr_values::adjust_range_with_scev): Same.
11225 * wide-int.cc (wi::add_large): Same.
11226 (wi::mul_internal): Same.
11227 (wi::sub_large): Same.
11228 (wi::divmod_internal): Same.
11229 * wide-int.h: Change overflow type to overflow_type for neg, add,
11230 mul, smul, umul, div_trunc, div_floor, div_ceil, div_round,
11231 mod_trunc, mod_ceil, mod_round, add_large, sub_large,
11232 mul_internal, divmod_internal.
11233 (overflow_type): New enum.
11234 (accumulate_overflow): New.
11236 2018-07-06 Kugan Vivekanandarajah <kugan.vivekanandarajah@linaro.org>
11238 * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): New.
11239 (tree_ssa_phiopt_worker): Call cond_removal_in_popcount_pattern.
11241 2018-07-06 Kugan Vivekanandarajah <kuganv@linaro.org>
11243 * tree-ssa-loop-niter.c (number_of_iterations_popcount): If popcount
11244 argument is checked for zero before entering loop, avoid checking again.
11246 2018-07-06 Kugan Vivekanandarajah <kuganv@linaro.org>
11248 * gimplify.h (generic_expr_could_trap_p): Set as global function.
11249 * gimplify.h (generic_expr_could_trap_p): Likwise.
11250 * tree-scalar-evolution.c (expression_expensive_p): Handle COND_EXPR.
11252 2018-07-06 Jakub Jelinek <jakub@redhat.com>
11254 PR tree-optimization/86401
11255 * fold-const.c (fold_binary_loc) <case BIT_AND_EXPR>: Move the
11256 ((A & N) + B) & M -> (A + B) & M etc. optimization into ...
11257 (fold_bit_and_mask): ... here. New helper function for match.pd.
11258 * fold-const.h (fold_bit_and_mask): Declare.
11259 * match.pd (((A & N) + B) & M -> (A + B) & M): New optimization.
11261 2018-07-06 Peter Bergner <bergner@linux.ibm.com>
11264 * target.def (translate_mode_attribute): New hook.
11265 * targhooks.h (default_translate_mode_attribute): Declare.
11266 * targhooks.c (default_translate_mode_attribute): New function.
11267 * doc/tm.texi.in (TARGET_TRANSLATE_MODE_ATTRIBUTE): New hook.
11268 * doc/tm.texi: Regenerate.
11269 * config/rs6000/rs6000.c (TARGET_TRANSLATE_MODE_ATTRIBUTE): Define.
11270 (rs6000_translate_mode_attribute): New function.
11272 2018-07-06 Paul Koning <ni1d@arrl.net>
11274 * doc/md.texi (define_split): Document DONE and FAIL.
11275 (define_peephole2): Ditto.
11277 2018-07-05 Jeff Law <law@redhat.com>
11279 PR tree-optimization/86010
11280 * tree-ssa-dse.c (compute_trims): More aggressively trim at
11281 both the head and tail of mem* and str* calls.
11283 2018-07-05 Jim Wilson <jimw@sifive.com>
11285 * config.gcc (riscv*-*-*): When setting xlen, handle riscv-*.
11287 2018-07-05 Indu Bhagat <indu.bhagat@oracle.com>
11289 * config/aarch64/aarch64-simd.md: correct flags text for
11290 MIN_EXPR replacement.
11292 2018-07-05 James Clarke <jrtc27@jrtc27.com>
11294 * configure: Regenerated.
11296 2018-07-05 Carl Love <cel@us.ibm.com>
11298 * config/rs6000/rs6000-c.c: Map ALTIVEC_BUILTIN_VEC_UNPACKH for
11299 float argument to VSX_BUILTIN_DOUBLEH_V4SF.
11300 Map ALTIVEC_BUILTIN_VEC_UNPACKL for float argument to
11301 VSX_BUILTIN_DOUBLEL_V4SF.
11303 2018-07-05 Martin Sebor <msebor@redhat.com>
11306 * tree-ssa-strlen.c (maybe_set_strlen_range): Use type size rather
11307 than its domain to compute its the upper bound of a char array.
11309 2018-07-05 Nathan Sidwell <nathan@acm.org>
11311 Replace NO_IMPLICIT_EXTERN_C with SYSTEM_IMPLICIT_EXTERN_C.
11312 * doc/cpp.texi: Update comment.
11313 * doc/tm.texi: Rebuilt.
11314 * doc/tm.texi.in (NO_IMPLICIT_EXTERN_C): Replace with ...
11315 (SYSTEM_IMPLICIT_EXTERN_C): ... this, opposite sense.
11316 * doc/extend.texi (Backwards Compatibility): Clarify it is system
11317 headers affected by extern "C".
11318 * system.h: Poison NO_IMPLICIT_EXTERN_C.
11319 * config/alpha/alpha.h, config/arm/uclinux-elf.h,
11320 config/bfin/elf.h, config/cris/cris.h, config/darwin.h,
11321 config/dragonfly.h, config/freebsd.h, config/gnu-user.h,
11322 config/i386/cygming.h, config/i386/djgpp.h, config/i386/nto.h,
11323 config/ia64/hpux.h, config/lm32/lm32.h, config/lm32/uclinux-elf.h,
11324 config/lynx.h, config/mips/elf.h, config/mmix/mmix.h,
11325 config/netbsd.h, config/pa/pa-hpux.h, config/powerpcspe/sysv4.h,
11326 config/riscv/elf.h, config/rs6000/sysv4.h, config/rtems.h,
11327 config/s390/tpf.h, config/sh/newlib.h, config/sol2.h,
11328 config/sparc/openbsd64.h, config/sparc/sp-elf.h,
11329 config/sparc/sp64-elf.h, config/spu/spu.h,
11330 config/stormy16/stormy16.h, config/v850/v850.h,
11331 config/visium/visium.h, config/vx-common.h, config/xtensa/elf.h: Don't
11332 define NO_IMPLICIT_EXTERN_C.
11333 * config/rs6000/aix.h: Set SYSTEM_IMPLICIT_EXTERN_C.
11335 2018-07-05 Tamar Christina <tamar.christina@arm.com>
11338 * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
11339 instead of GET_MODE_SIZE when comparing Units.
11341 2018-07-05 Tamar Christina <tamar.christina@arm.com>
11344 * rtlanal.c (set_noop_p): Constrain on mode change,
11345 include hard-reg-set.h
11347 2018-07-05 Tamar Christina <tamar.christina@arm.com>
11349 * config/aarch64/aarch64.c (aarch64_expand_movmem): Fix mode size.
11351 2018-07-05 Jakub Jelinek <jakub@redhat.com>
11354 2018-07-04 Maxim Ostapenko <m.ostapenko@samsung.com>
11357 * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
11359 * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
11361 2018-07-04 Maxim Ostapenko <m.ostapenko@samsung.com>
11364 * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
11366 * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
11368 2018-07-04 Eric Botcazou <ebotcazou@adacore.com>
11370 PR middle-end/86380
11371 * expmed.c (choose_multiplier): Fix incorrect comparison with mask.
11373 2018-07-04 Aldy Hernandez <aldyh@redhat.com>
11375 * tree-vrp.c (extract_range_from_binary_expr_1): Initialize
11376 neg_*_op* variables.
11378 2018-07-04 Martin Liska <mliska@suse.cz>
11380 * tree-switch-conversion.c: Define
11381 max_ratio_for_speed and max_ratio_for_size constants.
11383 2018-07-04 Denys Vlasenko <dvlasenk@redhat.com>
11384 Martin Liska <mliska@suse.cz>
11386 PR middle-end/66240
11389 * common.opt: Rename align options with 'str_' prefix.
11390 * common/config/i386/i386-common.c (set_malign_value): New
11392 (ix86_handle_option): Use it to set -falign-* options/
11393 * config/aarch64/aarch64-protos.h (struct tune_params): Change
11394 type from int to string.
11395 * config/aarch64/aarch64.c: Update default values from int
11397 * config/alpha/alpha.c (alpha_override_options_after_change):
11399 * config/arm/arm.c (arm_override_options_after_change_1): Likewise.
11400 * config/i386/dragonfly.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
11401 max skip conditionally.
11402 * config/i386/freebsd.h (SUBALIGN_LOG): New.
11403 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
11404 max skip conditionally.
11405 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
11406 max skip conditionally.
11407 * config/i386/gnu-user.h (SUBALIGN_LOG): New.
11408 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
11409 max skip conditionally.
11410 * config/i386/i386.c (struct ptt): Change type from int to
11412 (ix86_default_align): Set default values.
11413 * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Print
11414 max skip conditionally.
11415 * config/i386/iamcu.h (SUBALIGN_LOG): New.
11416 (ASM_OUTPUT_MAX_SKIP_ALIGN):
11417 * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN):
11418 * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
11419 max skip conditionally.
11420 * config/i386/openbsdelf.h (SUBALIGN_LOG): New.
11421 (ASM_OUTPUT_MAX_SKIP_ALIGN) Print max skip conditionally.:
11422 * config/i386/x86-64.h (SUBALIGN_LOG): New.
11423 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
11424 max skip conditionally.
11425 (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
11426 * config/ia64/ia64.c (ia64_option_override): Set default values
11427 for alignment options.
11428 * config/m68k/m68k.c: Handle new str_align_* options.
11429 * config/mips/mips.c (mips_set_compression_mode): Change
11431 (mips_option_override): Set default values for options.
11432 * config/powerpcspe/powerpcspe.c (rs6000_option_override_internal):
11434 * config/rs6000/rs6000.c (rs6000_option_override_internal):
11436 * config/rx/rx.c (rx_option_override): Likewise.
11437 * config/rx/rx.h (JUMP_ALIGN): Use align_jumps_log.
11438 (LABEL_ALIGN): Use align_labels_log.
11439 (LOOP_ALIGN): Use align_loops_align.
11440 * config/s390/s390.c (s390_asm_output_function_label): Use new
11442 * config/sh/sh.c (sh_override_options_after_change):
11443 Change type of constants.
11444 * config/spu/spu.c (spu_sched_init): Likewise.
11445 * config/sparc/sparc.c (sparc_option_override): Set default
11446 values for options.
11447 * config/visium/visium.c (visium_option_override): Likewise.
11448 * config/visium/visium.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Do not
11449 emit p2align format with last argument if it's not needed.
11450 * doc/invoke.texi: Document extended format of -falign-*.
11451 * final.c: Use align_labels alignment.
11452 * flags.h (struct target_flag_state): Change type to use
11454 (struct align_flags_tuple): New.
11455 (struct align_flags): Likewise.
11456 (align_loops_log): Redefine macro to use new types.
11457 (align_loops_max_skip): Redefine macro to use new types.
11458 (align_jumps_log): Redefine macro to use new types.
11459 (align_jumps_max_skip): Redefine macro to use new types.
11460 (align_labels_log): Redefine macro to use new types.
11461 (align_labels_max_skip): Redefine macro to use new types.
11462 (align_functions_log): Redefine macro to use new types.
11463 (align_loops): Redefine macro to use new types.
11464 (align_jumps): Redefine macro to use new types.
11465 (align_labels): Redefine macro to use new types.
11466 (align_functions): Redefine macro to use new types.
11467 (align_functions_max_skip): Redefine macro to use new types.
11468 (align_loops_value): New macro.
11469 (align_jumps_value): New macro.
11470 (align_labels_value): New macro.
11471 (align_functions_value): New macro.
11472 * function.c (invoke_set_current_function_hook): Propagate
11473 alignment values from flags to global variables default in
11475 * ipa-icf.c (sem_function::equals_wpa): Use
11476 cl_optimization_option_eq instead of memcmp.
11477 * lto-streamer.h (cl_optimization_stream_out): Support streaming
11479 (cl_optimization_stream_in): Likewise.
11480 * optc-save-gen.awk: Support strings in cl_optimization.
11481 * opth-gen.awk: Likewise.
11482 * opts.c (finish_options): Remove error checking of invalid
11484 (MAX_CODE_ALIGN): Remove.
11485 (MAX_CODE_ALIGN_VALUE): Likewise.
11486 (parse_and_check_align_values): New function.
11487 (check_alignment_argument): Likewise.
11488 (common_handle_option): Use check_alignment_argument.
11489 * opts.h (parse_and_check_align_values): Declare.
11490 * toplev.c (init_alignments): Remove.
11491 (read_log_maxskip): New.
11492 (parse_N_M): Likewise.
11493 (parse_alignment_opts): Likewise.
11494 (backend_init_target): Remove usage of init_alignments.
11495 * toplev.h (parse_alignment_opts): Declare.
11496 * tree-streamer-in.c (streamer_read_tree_bitfields): Add new
11498 * tree-streamer-out.c (streamer_write_tree_bitfields): Likewise.
11499 * tree.c (cl_option_hasher::equal): New.
11500 * varasm.c: Use new global macros.
11502 2018-07-04 Denys Vlasenko <dvlasenk@redhat.com>
11504 * config/i386/dragonfly.h: (ASM_OUTPUT_MAX_SKIP_ALIGN):
11505 Use a simpler align directive also if MAXSKIP = ALIGN-1.
11506 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
11507 * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
11508 * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
11509 * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
11510 * config/i386/freebsd.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Remove "If N
11511 is large, do at least 8 byte alignment" code. Add SUBALIGN_LOG
11512 define. Use a simpler align directive also if MAXSKIP = ALIGN-1.
11513 * config/i386/gnu-user.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
11514 * config/i386/iamcu.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
11515 * config/i386/openbsdelf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
11516 * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
11518 2018-07-04 Martin Liska <mliska@suse.cz>
11519 Jonathan Wakely <jwakely@redhat.com>
11521 * coverage.c: Use correct type.
11522 * doc/invoke.texi: Language correction.
11524 2018-07-03 H.J. Lu <hongjiu.lu@intel.com>
11527 * config/i386/i386.c (rest_of_insert_endbranch): Also generate
11528 ENDBRANCH for non-tail call which may return via indirect branch.
11529 * doc/extend.texi: Document indirect_return attribute.
11531 2018-07-03 Martin Sebor <msebor@redhat.com>
11533 PR tree-optimization/86274
11534 * gimple-ssa-sprintf.c (fmtresult::type_max_digits): Verify
11536 (format_floating): Correct handling of infinities and NaNs.
11538 2018-07-03 Martin Sebor <msebor@redhat.com>
11540 * print-tree.c (print_real_cst): New function.
11541 (print_node_brief): Call it.
11542 (print_node): Ditto.
11544 2018-07-03 Jeff Law <law@redhat.com>
11546 * config/h8300/h8300.md (logical<mode>3_sn, logical<mode>3): Merge
11547 into a single pattern.
11549 * config/h8300/h8300.md (ors code_iterator): New.
11550 (bsetqi_msx, bnotqi_msx patterns and splitters): Consolidate into
11551 a single pattern and single splitter.
11552 (bsethi_msx, bnothi_msx patterns): Consolidate into a single pattern.
11553 (iorqi3_1, xorqi3_1): Likewise.
11554 (iorqi3, xorqi3 expanders): Similarly.
11556 * config/h8300/h8300.md (movmd_internal_normal): Consolidated with
11557 (movmd_internal) into a single pattern using the P mode iterator.
11558 (movmd splitters): Similarly.
11559 (stpcpy_internal_normal, stpcpy_internal): Similarly for thes patterns.
11560 (movsd splitters): Similarly.
11562 * config/h8300/h8300.c (h8300_insn_length_from_table): Consolidate
11563 ADDB, ADDW and ADDL into a single ADD attribute which selects the
11564 right table based on the size of the operand.
11565 * config/h8300/h8300.md (length_table): Corresponding changes. All
11566 references to "addb", "addw" and "addl" changed to "add".
11567 (btst patterns): Merge two variants into a single pattern.
11568 (tstqi, tsthi): Likewise.
11569 (addhi3_incdec, addsi3_incdec): Likewise.
11570 (subhi3_h8300hs, subsi3_h8300hs): Likewise.
11571 (mulhi3, mulsi3): Likewise.
11572 (udivhi3, udivsi3): Likewise.
11573 (divhi3, divsi3): Likewise.
11574 (andorqi3, andorhi3, andorsi3): Likewise.
11576 2018-07-03 Uros Bizjak <ubizjak@gmail.com>
11579 * config/i386/sse.md (uavg<mode>3_ceil): New expander.
11580 (<sse2_avx2>_uavg<mode>3<mask_name>): Simplify expander.
11582 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
11584 PR tree-optimization/85694
11585 * config/aarch64/iterators.md (HADD, RHADD): New int iterators.
11586 (u): Handle UNSPEC_SHADD, UNSPEC_UHADD, UNSPEC_SRHADD and
11588 * config/aarch64/aarch64-simd.md (<u>avg<mode>3_floor)
11589 (<u>avg<mode>3_ceil): New patterns.
11591 2018-07-03 David Malcolm <dmalcolm@redhat.com>
11593 * gcc.dg/vect/slp-perm-1.c: Remove "note: " prefix from
11594 scan-tree-dump directive.
11595 * gcc.dg/vect/slp-perm-2.c: Likewise.
11596 * gcc.dg/vect/slp-perm-3.c: Likewise.
11597 * gcc.dg/vect/slp-perm-5.c: Likewise.
11598 * gcc.dg/vect/slp-perm-6.c: Likewise.
11599 * gcc.dg/vect/slp-perm-7.c: Likewise.
11600 * gcc.dg/vect/slp-perm-8.c: Likewise.
11602 2018-07-03 Marek Polacek <polacek@redhat.com>
11604 PR middle-end/86202
11605 * gimple-fold.c (size_must_be_zero_p): Check the type of the size.
11607 2018-07-03 Richard Biener <rguenther@suse.de>
11610 * tree-ssa-structalias.c (find_func_clobbers): Properly
11611 handle indirect calls.
11613 2018-07-03 Jeff Law <law@redhat.com>
11615 * config/h8300/h8300.md (HSI, QHSI, QHSIF): New mode iterators.
11616 (shifts): New code iterator.
11617 (movqi, movhi, movsi, movsf expanders): Consolidate into a single
11618 expander. Fix HImode handling on H8/SX.
11619 (addqi3, addhi3, addsi3 expanders): Consolidate into a single expander.
11620 (subqi3, subhi3, subsi3 expanders): Likewise.
11621 (andqi3, andhi3, andsi3 expanders): Likewise.
11622 (iorqi3, iorhi3, iorsi3 expanders): Likewise.
11623 (xorqi3, xorhi3, xorsi3 expanders): Likewise.
11624 (negqi2, neghi2, negsi2, negsf2 expanders): Likewise.
11625 (one_cmplqi2, one_cmplhi2, one_cmplsi2): Likewise.
11626 (zero_extendqihi2, zero_extendqisi2): Likewise.
11627 (extendqihi2, extendqisi2): Likewise.
11628 (rotlqi3, rotlhi3, rotlsi3): Likewise.
11629 (neghi2_h8300, negsi2_h8300): Likewise for these patterns.
11630 (rotlqi3_1, rotlhi3_1): Likewise.
11631 (logicalhi3_sn, logicalsi3_sn): Likewise.
11632 (logicalhi3, logicalsi3): Likewise.
11634 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
11636 * tree-vect-patterns.c (vect_recog_rotate_pattern)
11637 (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
11638 (vect_recog_mixed_size_cond_pattern, adjust_bool_pattern_cast)
11639 (adjust_bool_pattern, vect_recog_bool_pattern): Pass the vector
11640 type to append_pattern_def_seq instead of creating a stmt_vec_info
11642 (build_mask_conversion): Likewise. Remove vinfo argument.
11643 (vect_add_conversion_to_patterm): Likewise, renaming to...
11644 (vect_add_conversion_to_pattern): ...this.
11645 (vect_recog_mask_conversion_pattern): Update call to
11646 build_mask_conversion. Pass the vector type to
11647 append_pattern_def_seq here too.
11648 (vect_recog_gather_scatter_pattern): Update call to
11649 vect_add_conversion_to_pattern.
11651 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
11653 * tree-vect-patterns.c (new_pattern_def_seq): Delete.
11654 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
11655 (vect_recog_widen_op_pattern, vect_recog_over_widening_pattern)
11656 (vect_recog_rotate_pattern, vect_synth_mult_by_constant): Don't set
11657 STMT_VINFO_PATTERN_DEF_SEQ to null here.
11658 (vect_recog_pow_pattern, vect_recog_vector_vector_shift_pattern)
11659 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern): Use
11660 append_pattern_def_seq instead of new_pattern_def_seq.
11661 (vect_recog_divmod_pattern): Do both of the above.
11662 (vect_pattern_recog_1): Assert that STMT_VINO_PATTERN_DEF_SEQ
11665 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
11667 * tree-vect-patterns.c (vect_recog_dot_prod_pattern):
11668 (vect_recog_sad_pattern, vect_recog_widen_op_pattern)
11669 (vect_recog_widen_mult_pattern, vect_recog_pow_pattern):
11670 (vect_recog_widen_sum_pattern, vect_recog_over_widening_pattern)
11671 (vect_recog_average_pattern, vect_recog_cast_forwprop_pattern)
11672 (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
11673 (vect_recog_vector_vector_shift_pattern, vect_synth_mult_by_constant)
11674 (vect_recog_mult_pattern, vect_recog_divmod_pattern)
11675 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
11676 (vect_recog_mask_conversion_pattern): Replace vec<gimple *>
11677 parameter with a single stmt_vec_info.
11678 (vect_recog_func_ptr): Likewise.
11679 (vect_recog_gather_scatter_pattern): Likewise, folding in...
11680 (vect_try_gather_scatter_pattern): ...this.
11681 (vect_pattern_recog_1): Remove stmts_to_replace and just pass
11682 the stmt_vec_info of the statement to be matched. Don't clear
11683 STMT_VINFO_RELATED_STMT.
11684 (vect_pattern_recog): Update call accordingly.
11686 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
11688 PR tree-optimization/85694
11689 * doc/md.texi (avgM3_floor, uavgM3_floor, avgM3_ceil)
11690 (uavgM3_ceil): Document new optabs.
11691 * doc/sourcebuild.texi (vect_avg_qi): Document new target selector.
11692 * internal-fn.def (IFN_AVG_FLOOR, IFN_AVG_CEIL): New internal
11694 * optabs.def (savg_floor_optab, uavg_floor_optab, savg_ceil_optab)
11695 (savg_ceil_optab): New optabs.
11696 * tree-vect-patterns.c (vect_recog_average_pattern): New function.
11697 (vect_vect_recog_func_ptrs): Add it.
11698 * tree-vect-stmts.c (vectorizable_call): Get the type of the zero
11699 constant directly from the associated lhs.
11701 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
11703 * tree-vect-patterns.c (vect_split_statement): New function.
11704 (vect_convert_input): Use it to try to split an existing cast.
11706 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
11708 * poly-int.h (print_hex): New function.
11709 * dumpfile.h (dump_dec, dump_hex): Declare.
11710 * dumpfile.c (dump_dec, dump_hex): New poly_wide_int functions.
11711 * tree-vectorizer.h (_stmt_vec_info): Add min_output_precision,
11712 min_input_precision, operation_precision and operation_sign.
11713 * tree-vect-patterns.c (vect_get_range_info): New function.
11714 (vect_same_loop_or_bb_p, vect_single_imm_use)
11715 (vect_operation_fits_smaller_type): Delete.
11716 (vect_look_through_possible_promotion): Add an optional
11717 single_use_p parameter.
11718 (vect_recog_over_widening_pattern): Rewrite to use new
11719 stmt_vec_info infomration. Handle one operation at a time.
11720 (vect_recog_cast_forwprop_pattern, vect_narrowable_type_p)
11721 (vect_truncatable_operation_p, vect_set_operation_type)
11722 (vect_set_min_input_precision): New functions.
11723 (vect_determine_min_output_precision_1): Likewise.
11724 (vect_determine_min_output_precision): Likewise.
11725 (vect_determine_precisions_from_range): Likewise.
11726 (vect_determine_precisions_from_users): Likewise.
11727 (vect_determine_stmt_precisions, vect_determine_precisions): Likewise.
11728 (vect_vect_recog_func_ptrs): Put over_widening first.
11730 (vect_pattern_recog): Call vect_determine_precisions.
11732 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
11734 * tree-vect-patterns.c (vect_mark_pattern_stmts): Remove pattern
11735 statements that have been replaced by further pattern statements.
11736 (vect_pattern_recog_1): Clear STMT_VINFO_PATTERN_DEF_SEQ on failure.
11738 2018-07-03 Richard Biener <rguenther@suse.de>
11740 * tree-vect-stmts.c (vect_is_simple_use): Consolidate dumping,
11741 always set *dt. Dump vectype in vectype overload.
11742 * dumpfile.h (dump_gimple_expr): New function.
11743 (dump_gimple_expr_loc): Likewise.
11744 * dumpfile.c (dump_gimple_expr): New function.
11745 (dump_gimple_expr_loc): Likewise.
11747 2018-07-02 Jeff Law <law@redhat.com>
11749 * config/h8300/h8300.md (movqi_h8300, movqi_h8300hs): Consolidate
11750 the H8/300, H8/300H and H8/S variants into a single pattern.
11751 (movhi_h8300, movqi_h8300hs): Similarly.
11752 (pushqi_h8300hs, pushhi_h8300hs): Consolidate into a single pattern.
11753 (QHI mode iterator): New.
11755 * config/h8300/h8300.md: Remove trailing whitespace.
11757 2018-07-02 Jim Wilson <jimw@sifive.com>
11759 * config/riscv/riscv.c (riscv_expand_epilogue): Use emit_jump_insn
11760 instead of emit_insn for interrupt returns.
11761 * config/riscv/riscv.md (riscv_met): Add (return) to rtl.
11762 (riscv_sret, riscv_uret): Likewise.
11764 2018-07-02 David Malcolm <dmalcolm@redhat.com>
11766 * pretty-print.c (selftest::test_pp_format): Move save and restore
11767 of quotes to class auto_fix_quotes, and add an instance.
11768 * selftest.c: Include "intl.h".
11769 (selftest::auto_fix_quotes::auto_fix_quotes): New ctor.
11770 (selftest::auto_fix_quotes::~auto_fix_quotes): New dtor.
11771 * selftest.h (selftest::auto_fix_quotes): New class.
11773 2018-07-02 Richard Henderson <richard.henderson@linaro.org>
11775 * config/aarch64/aarch64-protos.h, config/aarch64/aarch64.c
11776 (aarch64_sve_prepare_conditional_op): Remove.
11777 * config/aarch64/aarch64-sve.md (cond_<SVE_INT_BINARY><SVE_I>):
11778 Allow aarch64_simd_reg_or_zero as select operand; remove
11779 the aarch64_sve_prepare_conditional_op call.
11780 (cond_<SVE_INT_BINARY_SD><SVE_SDI>): Likewise.
11781 (cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
11782 (*cond_<SVE_INT_BINARY><SVE_I>_z): New pattern.
11783 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_z): New pattern.
11784 (*cond_<SVE_COND_FP_BINARY><SVE_F>_z): New pattern.
11785 (*cond_<SVE_INT_BINARY><SVE_I>_any): New pattern.
11786 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_any): New pattern.
11787 (*cond_<SVE_COND_FP_BINARY><SVE_F>_any): New pattern
11788 and a splitters to match all of the *_any patterns.
11789 * config/aarch64/predicates.md (aarch64_sve_any_binary_operator): New.
11791 * config/aarch64/iterators.md (SVE_INT_BINARY_REV): Remove.
11792 (SVE_COND_FP_BINARY_REV): Remove.
11793 (sve_int_op_rev, sve_fp_op_rev): New.
11794 * config/aarch64/aarch64-sve.md (*cond_<SVE_INT_BINARY><SVE_I>_0): New.
11795 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_0): New.
11796 (*cond_<SVE_COND_FP_BINARY><SVE_F>_0): New.
11797 (*cond_<SVE_INT_BINARY><SVE_I>_2): Rename, add movprfx alternative.
11798 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_2): Similarly.
11799 (*cond_<SVE_COND_FP_BINARY><SVE_F>_2): Similarly.
11800 (*cond_<SVE_INT_BINARY><SVE_I>_3): Similarly; use sve_int_op_rev.
11801 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_3): Similarly.
11802 (*cond_<SVE_COND_FP_BINARY><SVE_F>_3): Similarly; use sve_fp_op_rev.
11804 * config/aarch64/aarch64-sve.md (cond_<SVE_COND_FP_BINARY><SVE_F>):
11805 Remove match_dup 1 from the inner unspec.
11806 (*cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
11808 * config/aarch64/aarch64.md (movprfx): New attr.
11809 (length): Default movprfx to 8.
11810 * config/aarch64/aarch64-sve.md (*mul<SVE_I>3): Add movprfx alt.
11811 (*madd<SVE_I>, *msub<SVE_I): Likewise.
11812 (*<su>mul<SVE_I>3_highpart): Likewise.
11813 (*<SVE_INT_BINARY_SD><SVE_SDI>3): Likewise.
11814 (*v<ASHIFT><SVE_I>3): Likewise.
11815 (*<su><MAXMIN><SVE_I>3): Likewise.
11816 (*<su><MAXMIN><SVE_F>3): Likewise.
11817 (*fma<SVE_F>4, *fnma<SVE_F>4): Likewise.
11818 (*fms<SVE_F>4, *fnms<SVE_F>4): Likewise.
11819 (*div<SVE_F>4): Likewise.
11821 2018-07-02 Richard Sandiford <richard.sandiford@arm.com>
11823 * tree-vect-patterns.c (vect_recog_widen_shift_pattern): Fix typo
11826 2018-07-02 Richard Biener <rguenther@suse.de>
11828 PR tree-optimization/86363
11829 * tree-ssa-sccvn.c (vn_reference_lookup_3): Check the
11830 memset argument refers to a non-variable address.
11832 2018-07-02 Aldy Hernandez <aldyh@redhat.com>
11834 * tree-vrp.c (extract_range_from_binary_expr_1): Abstract a lot of the
11835 {PLUS,MINUS}_EXPR code to...
11836 (adjust_symbolic_bound): ...here,
11837 (combine_bound): ...here,
11838 (set_value_range_with_overflow): ...and here.
11840 2018-07-02 Aldy Hernandez <aldyh@redhat.com>
11842 * tree-vrp.c (extract_range_from_unary_expr): Abstract ABS_EXPR
11844 (extract_range_from_abs_expr): ...here.
11846 2018-07-02 Eric Botcazou <ebotcazou@adacore.com>
11848 * config/i386/i386.c (ix86_finalize_stack_frame_flags): Do not overrule
11849 -fno-omit-frame-pointer when not optimizing.
11851 2018-07-02 Martin Liska <mliska@suse.cz>
11854 * ipa-pure-const.c (malloc_candidate_p): Revert usage of ::get.
11855 (propagate_nothrow): Likewise.
11857 2018-07-02 Martin Liska <mliska@suse.cz>
11860 * ipa-inline.c (early_inliner): Revert wrongly added ::get call.
11862 2018-07-02 David Malcolm <dmalcolm@redhat.com>
11864 * dumpfile.c (dump_generic_expr_loc): Undo removal of this
11865 function in r262149, changing "loc" param from source_location to
11866 const dump_location_t &.
11867 * dumpfile.h (dump_generic_expr_loc): Undo removal of this
11868 declaration, as above.
11870 2018-07-01 Paul Koning <ni1d@arrl.net>
11872 * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
11873 -munit-asm, -mgnu-asm, -mdec-asm.
11874 * config/pdp11/pdp11-protos.h (pdp11_gen_int_label): New.
11875 (pdp11_output_labelref): New.
11876 (pdp11_output_def): New.
11877 (pdp11_output_addr_vec_elt): New.
11878 * config/pdp11/pdp11.c: Use tab between opcode and operands. Use
11879 %# and %@ format codes.
11880 (pdp11_option_override): New.
11881 (TARGET_ASM_FILE_START_FILE_DIRECTIVE): Define.
11882 (pdp11_output_ident): New.
11883 (pdp11_asm_named_section): New.
11884 (pdp11_asm_init_sections): New.
11885 (pdp11_file_start): New.
11886 (pdp11_file_end): New.
11887 (output_ascii): Use .ascii/.asciz for -mdec-asm.
11888 (pdp11_asm_print_operand): Update %# and %$ for -mdec-asm. Add
11889 %o, like %c but octal.
11890 (pdp11_option_override): New.
11891 * config/pdp11/pdp11.h (TEXT_SECTION_ASM_OP): Update for
11893 (DATA_SECTION_ASM_OP): Ditto.
11894 (READONLY_DATA_SECTION_ASM_OP): New.
11895 (IS_ASM_LOGICAL_LINE_SEPARATOR): New.
11896 (ASM_GENERATE_INTERNAL_LABEL): Use new function.
11897 (ASM_OUTPUT_LABELREF): Ditto.
11898 (ASM_OUTPUT_DEF): Ditto.
11899 (ASM_OUTPUT_EXTERNAL): New.
11900 (ASM_OUTPUT_SOURCE_FILENAME): New.
11901 (ASM_OUTPUT_ADDR_VEC_ELT): Use new function.
11902 (ASM_OUTPUT_SKIP): Update for -mdec-asm.
11903 * config/pdp11/pdp11.md: Use tab between opcode and operands. Use
11904 %# and %@ format codes.
11905 * config/pdp11/pdp11.opt (mgnu-asm): New.
11906 (mdec-asm): Conflicts with -mgnu-asm and -munix-asm.
11907 (munix-asm): Conflicts with -mdec-asm and -mgnu-asm.
11908 * doc/invoke.txt (PDP-11 Options): Add -mgnu-asm.
11910 2018-07-01 Aldy Hernandez <aldyh@redhat.com>
11912 * tree-ssa-threadupdate.c (mark_threaded_blocks): Avoid
11913 dereferencing path[] beyond its length.
11915 (debug_all_paths): New.
11916 (rewire_first_differing_edge): New.
11917 (adjust_paths_after_duplication): New.
11918 (duplicate_thread_path): Call adjust_paths_after_duplication.
11920 (thread_through_all_blocks): Add new argument to
11921 duplicate_thread_path.
11923 2018-06-30 Jim Wilson <jimw@sifive.com>
11925 * config/riscv/predicates.md (p2m1_shift_operand): New.
11926 (high_mask_shift_operand): New.
11927 * config/riscv/riscv.md (lshrsi3_zero_extend_3+1): New combiner
11928 pattern using p2m1_shift_operand.
11929 (lshsi3_zero_extend_3+2): New combiner pattern using
11930 high_mask_shift_operand.
11932 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
11934 * tree-vect-patterns.c (vect_get_external_def_edge): New function,
11936 (vect_recog_rotate_pattern): ...here.
11937 (vect_convert_input): Try to insert casts of invariants in the
11939 * tree-vect-loop-manip.c (vect_loop_versioning): Don't require the
11940 preheader to be empty.
11942 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
11944 * tree-vect-patterns.c (append_pattern_def_seq): Take an optional
11945 vector type. If given, install it in the new statement's
11946 STMT_VINFO_VECTYPE.
11947 (vect_element_precision): New function.
11948 (vect_unpromoted_value): New struct.
11949 (vect_unpromoted_value::vect_unpromoted_value): New function.
11950 (vect_unpromoted_value::set_op): Likewise.
11951 (vect_look_through_possible_promotion): Likewise.
11952 (vect_joust_widened_integer, vect_joust_widened_type): Likewise.
11953 (vect_widened_op_tree, vect_convert_input): Likewise.
11954 (vect_convert_inputs, vect_convert_output): Likewise.
11955 (vect_recog_dot_prod_pattern): Use vect_look_through_possible_promotion
11956 to handle the optional cast of the multiplication result and
11957 vect_widened_op_tree to detect the widened multiplication itself.
11958 Do not require the input and output of promotion casts to have
11959 the same sign, but base the signedness of the operation on the
11960 input rather than the result. If the pattern includes two
11961 promotions, check that those promotions have the same sign.
11962 Do not restrict the MULT_EXPR handling to a double-width result;
11963 handle quadruple-width results and wider. Use vect_convert_inputs
11964 to convert the inputs to the common type.
11965 (vect_recog_sad_pattern): Use vect_look_through_possible_promotion
11966 to handle the optional cast of the ABS result. Also allow a sign
11967 change or a sign extension between the ABS and MINUS.
11968 Use vect_widened_op_tree to detect the widened subtraction and use
11969 vect_convert_inputs to convert the inputs to the common type.
11970 (vect_handle_widen_op_by_const): Delete.
11971 (vect_recog_widen_op_pattern): New function.
11972 (vect_recog_widen_mult_pattern): Use it.
11973 (vect_recog_widen_shift_pattern): Likewise.
11974 (vect_recog_widen_sum_pattern): Use
11975 vect_look_through_possible_promotion to handle the promoted
11978 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
11980 * gimple-iterator.c (gsi_for_stmt): Add a new overload that takes
11981 the containing gimple_seq *.
11982 * gimple-iterator.h (gsi_for_stmt): Declare it.
11983 * tree-vect-patterns.c (vect_recog_dot_prod_pattern)
11984 (vect_recog_sad_pattern, vect_recog_widen_sum_pattern)
11985 (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
11986 (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
11987 (vect_recog_mask_conversion_pattern): Remove STMT_VINFO_IN_PATTERN_P
11989 (vect_init_pattern_stmt, vect_set_pattern_stmt): New functions,
11991 (vect_mark_pattern_stmts): ...here. Handle cases in which the
11992 statement being replaced is part of an existing pattern
11993 definition sequence, inserting the new pattern statements before
11995 (vect_pattern_recog_1): Don't return a bool. If the statement
11996 is already part of a pattern, instead apply pattern matching
11997 to the pattern definition statements. Don't clear the
11998 STMT_VINFO_RELATED_STMT if is_pattern_stmt_p.
11999 (vect_pattern_recog): Don't break after the first match;
12000 continue processing the pattern definition statements instead.
12001 Don't bail out for STMT_VINFO_IN_PATTERN_P here.
12003 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
12005 * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
12006 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
12007 (vect_recog_widen_sum_pattern): Use it.
12009 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
12011 * tree-vect-loop.c (vectorizable_reduction): Assert that the
12012 phi is not a pattern statement and has not been replaced by
12013 a pattern statement.
12014 * tree-vect-patterns.c (type_conversion_p): Don't check
12015 STMT_VINFO_IN_PATTERN_P.
12016 (vect_recog_vector_vector_shift_pattern): Likewise.
12017 (vect_recog_dot_prod_pattern): Expect vect_is_simple_use to return
12018 the pattern statement rather than the original statement; check
12019 directly for a WIDEN_MULT_EXPR here.
12020 * tree-vect-slp.c (vect_get_and_check_slp_defs): Expect
12021 vect_is_simple_use to return the pattern statement rather
12022 than the original statement; use is_pattern_stmt_p to check
12023 for such a pattern statement.
12024 * tree-vect-stmts.c (process_use): Expect vect_is_simple_use
12025 to return the pattern statement rather than the original statement;
12026 don't do the same transformation here.
12027 (vect_is_simple_use): If the defining statement has been replaced
12028 by a pattern statement, return the pattern statement instead.
12029 Remove the corresponding (local) transformation from the vectype
12032 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
12034 * tree-vectorizer.h (vect_is_simple_use): Move the gimple ** to the
12035 end and default to null.
12036 * tree-vect-loop.c (vect_create_epilog_for_reduction)
12037 (vectorizable_reduction): Update calls accordingly, dropping the
12038 gimple ** argument if the passed-back statement isn't needed.
12039 * tree-vect-patterns.c (vect_get_internal_def, type_conversion_p)
12040 (vect_recog_rotate_pattern): Likewise.
12041 (vect_recog_mask_conversion_pattern): Likewise.
12042 * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
12043 (vect_mask_constant_operand_p): Likewise.
12044 * tree-vect-stmts.c (is_simple_and_all_uses_invariant, process_use):
12045 (vect_model_simple_cost, vect_get_vec_def_for_operand): Likewise.
12046 (get_group_load_store_type, get_load_store_type): Likewise.
12047 (vect_check_load_store_mask, vect_check_store_rhs): Likewise.
12048 (vectorizable_call, vectorizable_simd_clone_call): Likewise.
12049 (vectorizable_conversion, vectorizable_assignment): Likewise.
12050 (vectorizable_shift, vectorizable_operation): Likewise.
12051 (vectorizable_store, vect_is_simple_cond): Likewise.
12052 (vectorizable_condition, vectorizable_comparison): Likewise.
12053 (get_same_sized_vectype, vect_get_mask_type_for_stmt): Likewise.
12054 (vect_is_simple_use): Rename the def_stmt argument to def_stmt_out
12055 and move it to the end. Cope with null def_stmt_outs.
12057 2018-06-30 Bernd Edlinger <bernd.edlinger@hotmail.de>
12059 * Makefile.in (FLAGS_TO_PASS): Add RANLIB_FOR_TARGET.
12061 2018-06-29 Jeff Law <law@redhat.com>
12063 * config/v850/v850.c (v850_legitimate_address_p): Handle large
12064 displacements for TARGET_V850E2V3 and newer.
12065 (TARGET_LRA_P): Remove. Defaults to LRA now.
12066 * config/v850/v850.md (sign23byte_load): Remove.
12067 (unsign23byte_load, sign23hword_load, unsign23hword_load): Likewise.
12068 (23word_load, 23byte_store, 23hword_store, 23word_store): Likewise.
12070 2018-06-29 Martin Liska <mliska@suse.cz>
12073 * coverage.c (coverage_init): Mangle full path name.
12074 * doc/invoke.texi: Document the change.
12075 * gcov-io.c (mangle_path): New.
12076 * gcov-io.h (mangle_path): Likewise.
12077 * gcov.c (mangle_name): Use mangle_path for path mangling.
12079 2018-06-29 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
12081 * config/arm/arm.c (output_move_double): Don't allow STRD instructions
12082 if starting source register is not even.
12084 2018-06-29 Martin Liska <mliska@suse.cz>
12086 PR tree-optimization/86263
12087 * tree-switch-conversion.c (switch_decision_tree::try_switch_expansion):
12088 Make edge redirection.
12090 2018-06-29 David Malcolm <dmalcolm@redhat.com>
12092 * dumpfile.c (dump_loc): Add indentation based on scope depth.
12093 (dump_scope_depth): New variable.
12094 (get_dump_scope_depth): New function.
12095 (dump_begin_scope): New function.
12096 (dump_end_scope): New function.
12097 * dumpfile.h (get_dump_scope_depth): New declaration.
12098 (dump_begin_scope): New declaration.
12099 (dump_end_scope): New declaration.
12100 (class auto_dump_scope): New class.
12101 (AUTO_DUMP_SCOPE): New macro.
12102 * tree-vectorizer.h (DUMP_VECT_SCOPE): Reimplement in terms of
12105 2018-06-29 Richard Biener <rguenther@suse.de>
12107 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences): Assert
12108 compute_all_dependences succeeds.
12109 * tree-vect-loop.c (vect_get_datarefs_in_loop): Fail early if we
12110 exceed --param loop-max-datarefs-for-datadeps.
12112 2018-06-29 Jakub Jelinek <jakub@redhat.com>
12114 * config/rs6000/t-rs6000: Append rs6000-modes.h to TM_H.
12116 2018-06-28 Uros Bizjak <ubizjak@gmail.com>
12119 * config/i386/sse.md (*vec_extractv4si_0_zext_sse4): Use
12120 alternative 0 in preferred_for_speed attribute.
12122 2018-06-28 Paul Koning <ni1d@arrl.net>
12124 * config/pdp11/pdp11-protos.h (pdp11_shift_length): New function.
12125 * config/pdp11/pdp11.c (pdp11_shift_length): New function.
12126 * config/pdp11/pdp11.h (ADJUST_INSN_LENGTH): Remove.
12127 * config/pdp11/pdp11.md: Correct "length" attribute calculation
12128 for shift insn patterns.
12130 2018-06-28 David Malcolm <dmalcolm@redhat.com>
12132 * cgraph.c (cgraph_node::get_body): Replace assignments to
12133 "dump_file" with calls to set_dump_file.
12134 * dumpfile.c (alt_dump_file): Make static, and group with...
12135 (alt_flags): ...this definition.
12136 (dumps_are_enabled): New variable.
12137 (refresh_dumps_are_enabled): New function.
12138 (set_dump_file): New function.
12139 (set_alt_dump_file): New function.
12140 (gcc::dump_manager::dump_start): Replace assignments to
12141 "dump_file" and "alt_dump_file" with calls to set_dump_file and
12143 (gcc::dump_manager::dump_finish): Likewise.
12144 * dumpfile.h (alt_dump_file): Delete decl.
12145 (dumps_are_enabled): New variable decl.
12146 (set_dump_file): New function decl.
12147 (dump_enabled_p): Rewrite in terms of new "dumps_are_enabled"
12149 * tree-nested.c (lower_nested_functions): Replace assignments to
12150 "dump_file" with calls to set_dump_file.
12152 2018-06-28 Eric Botcazou <ebotcazou@adacore.com>
12154 * tree-cfg.c (verify_gimple_in_cfg): Call verify_location on the
12155 goto_locus of each outgoing edge of each basic block.
12157 2018-06-28 Richard Biener <rguenther@suse.de>
12159 * dwarf2out.c (decl_scope_table): Remove.
12160 (push_decl_scope): Likewise.
12161 (pop_decl_scope): Likewise.
12162 (gen_type_die_for_member): Do not call push/pop_decl_scope.
12163 (gen_struct_or_union_type_die): Likewise.
12164 (gen_tagged_type_die): Likewise.
12165 (dwarf2out_init): Do not initialize decl_scope_table.
12166 (dwarf2out_c_finalize): Do not free it.
12168 2018-06-28 Richard Biener <rguenther@suse.de>
12170 * dwarf2out.c (gen_subprogram_die): Use is_unit_die when
12171 deciding whether to not re-use a DIE.
12173 2018-06-28 Richard Biener <rguenther@suse.de>
12175 * dwarf2out.c (gen_subprogram_die): Always re-use DIEs with an
12176 DW_AT_abstract_origin attribute.
12178 2018-06-28 Martin Liska <mliska@suse.cz>
12180 * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
12181 Use newly introduced constants.
12182 * tree-switch-conversion.h (struct jump_table_cluster):
12183 Define max_ratio_for_size and max_ratio_for_speed.
12185 2018-06-28 Martin Liska <mliska@suse.cz>
12187 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
12188 Add new checking assert to catch invalid state.
12189 (jump_table_cluster::can_be_handled): Handle single case
12191 (jump_table_cluster::is_beneficial): Bail out for such case.
12192 (bit_test_cluster::find_bit_tests):
12193 Add new checking assert to catch invalid state.
12194 (bit_test_cluster::can_be_handled): Handle single case
12196 (bit_test_cluster::is_beneficial): Bail out for such case.
12197 (switch_decision_tree::analyze_switch_statement):
12200 2018-06-28 Martin Liska <mliska@suse.cz>
12202 * common.opt: Introduce -completion option.
12203 * gcc.c (driver_handle_option): Handle it.
12204 (driver::main): Print completions if completion
12206 * opt-suggestions.c (option_proposer::get_completions):
12208 (option_proposer::suggest_completion): Likewise.
12209 (option_proposer::find_param_completions): Likewise.
12210 (verify_autocompletions): Likewise.
12211 (test_completion_valid_options): Likewise.
12212 (test_completion_valid_params): Likewise.
12213 (in_completion_p): Likewise.
12214 (empty_completion_p): Likewise.
12215 (test_completion_partial_match): Likewise.
12216 (test_completion_garbage): Likewise.
12217 (opt_proposer_c_tests): Likewise.
12218 * opt-suggestions.h: Declare new functions.
12219 * opts.c (common_handle_option): Handle OPT__completion_.
12220 * selftest-run-tests.c (selftest::run_tests): Add
12221 opt_proposer_c_tests.
12222 * selftest.c (assert_str_startswith): New.
12223 * selftest.h (assert_str_startswith): Likewise.
12224 (opt_proposer_c_tests): New.
12225 (ASSERT_STR_STARTSWITH): Likewise.
12227 2018-06-28 Martin Liska <mliska@suse.cz>
12229 * Makefile.in: Add opt-suggestions.o.
12230 * gcc-main.c: Include opt-suggestions.h.
12231 * gcc.c (driver::driver): Likewise.
12232 (driver::~driver): Remove m_option_suggestions.
12233 (driver::build_option_suggestions): Moved to option_proposer.
12234 (driver::suggest_option): Likewise.
12235 (driver::handle_unrecognized_options): Use option_proposer.
12236 * gcc.h (class driver): Add new memver m_option_proposer.
12237 * opt-suggestions.c: New file.
12238 * opt-suggestions.h: New file.
12240 2018-06-28 Martin Liska <mliska@suse.cz>
12242 * vec.h (class auto_string_vec): New (moved from auto_argvec).
12243 (auto_string_vec::~auto_string_vec): Likewise.
12245 2018-06-28 Eric Botcazou <ebotcazou@adacore.com>
12247 * tree-inline.h (struct copy_body_data): Move remapping_type_depth and
12248 prevent_decl_creation_for_types fields up and add reset_location field.
12249 * tree-inline.c (remap_gimple_stmt): Force input_location on the new
12250 statement if id->reset_location is true.
12251 (copy_edges_for_bb): Do not set goto_locus on the new edges if
12252 id->reset_location is true.
12253 (copy_phis_for_bb): Force input_location on the arguments if
12254 id->reset_location is true.
12255 (expand_call_inline): Set id->reset_location if DECL_IGNORED_P
12256 is set on the function to be inlined.
12258 2018-06-27 Stephan Bergmann <sbergman@redhat.com>
12260 * doc/invoke.texi (Debugging Options): Add -gsplit-dwarf.
12262 2018-06-27 Dimitar Dimitrov <dimitar@dinux.eu>
12264 * lra-eliminations.c (update_reg_eliminate): Mark all spanning hard
12265 registers for Pmode.
12266 * lra-lives.c (check_pseudos_live_through_calls): Mark all spanning
12267 hard registers for the clobbered pseudo.
12269 2018-06-27 Paul Koning <ni1d@arrl.net>
12271 * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
12272 mutually exclusive options.
12273 * config/pdp11/constraints.md (h): New constraint.
12274 (O): Update definition to match shift code generation.
12275 (D): New constraint.
12276 * config/pdp11/pdp11-modes.def (CCNZ): Define mode.
12278 * config/pdp11/pdp11-protos.h (int_no_side_effect_operand): New
12280 (output_jump): Change arguments.
12281 (pdp11_fixed_cc_regs): New function.
12282 (pdp11_cc_mode): Ditto.
12283 (pdp11_expand_shift): Ditto.
12284 (pdp11_assemble_shift): Ditto.
12285 (pdp11_small_shift): Ditto.
12286 (pdp11_branch_cost): Remove.
12287 * config/pdp11/pdp11.c (pdp11_assemble_integer): Remove comments
12289 (pdp11_register_move_cost): Update for CC registers.
12290 (pdp11_rtx_costs): Add case for LSHIFTRT.
12291 (pdp11_output_jump): Add CCNZ mode conditional branches.
12292 (notice_update_cc_on_set): Remove.
12293 (pdp11_cc_mode): New function.
12294 (simple_memory_operand): Correct pre/post decrement case.
12295 (no_side_effect_operand): New function.
12296 (pdp11_regno_reg_class): Add CC_REGS class.
12297 (pdp11_fixed_cc_regs): New function.
12298 (pdp11_small_shift): New function.
12299 (pdp11_expand_shift): New function to expand shift insns.
12300 (pdp11_assemble_shift): New function to output shifts.
12301 (pdp11_branch_cost): Remove.
12302 (pdp11_modes_tieable_p): Make QI/HI modes tieable.
12303 * config/pdp11/pdp11.h (SIZE_TYPE): Ensure 16-bit type.
12304 (WCHAR_TYPE): Ditto.
12305 (PTRDIFF_TYPE): Ditto.
12306 (ADJUST_INSN_LENGTH): New macro.
12307 (FIXED_REGISTERS): Add CC registers.
12308 (CALL_USED_REGISTERS): Ditto.
12309 (reg_class): Ditto.
12310 (REG_CLASS_NAMES): Ditto.
12311 (REG_CLASS_CONTENTS): Ditto.
12312 (SELECT_CC_MODE): Use new function.
12313 (TARGET_FLAGS_REGNUM): New macro.
12314 (TARGET_FIXED_CONDITION_CODE_REGS): Ditto.
12315 (cc0_reg_rtx): Remove.
12316 (CC_STATUS_MDEP): Remove.
12317 (CC_STATUS_MDEFP_INIT): Remove.
12318 (CC_IN_FPU): Remove.
12319 (NOTICE_UPDATE_CC): Remove.
12320 (REGISTER_NAMES): Add CC registers.
12321 (BRANCH_COST): Change to constant 1.
12322 * config/pdp11/pdp11.md: Rewrite for CCmode condition code
12324 * config/pdp11/pdp11.opt (mbcopy): Remove.
12325 (mbcopy-builtin): Remove.
12326 (mbranch-cheap): Remove.
12327 (mbranch-expensive): Remove.
12328 * config/pdp11/predicates.md (expand_shift_operand): Update to
12329 match shift code generation.
12330 (ccnz_operator): New predicate.
12331 * doc/invoke.texi (PDP-11 Options): Remove deleted options
12332 -mbcopy, -mbcopy-builtin, -mbranch-cheap, -mbranch-expensive.
12333 Remove non-existent option -mabshi, -mno-abshi. Document mutually
12335 * doc/md.texi (PDP-11): Document new D and h constraints. Update
12336 description of O constraint.
12338 2018-06-27 Jeff Law <law@redhat.com>
12339 Austin Law <austinklaw@gmail.com>
12341 * config/v850/v850.md (addsi3_set_flags): New pattern.
12342 (subsi3_set_flags, negsi2_set_flags, andsi3_set_flags): Likewise.
12343 (iorsi3_set_flags, xorsi3_set_flags, one_cmplsi2_set_flags): Likewise.
12344 (zero_extendhisi2_v850_set_flags): Likewise.
12345 (zero_extendqisi2_v850_set_flags): Likewise.
12346 (ashlsi3_set_flags, ashlsi3_v850e2_set_flags): Likewise.
12347 (lshrsi3_set_flags, lshrsi3_v850e2_set_flags): Likewise.
12348 (ashrsi3_set_flags, ashrsi3_v850e2_set_flags): Likewise.
12350 * config/v850/v850-protos.h (notice_update_cc): Remove.
12351 * config/v850/v850.c (v850_compare_op0, v850_compare_op1): Remove.
12352 (v850_print_operand): Handle 'D' and "d".
12353 (v850_select_cc_mode): Remove ATTRIBUTE_UNUSED for last argument.
12354 Add handling of arithmetic/logical operations compared against zero.
12355 (v850_gen_float_compare): Remove ATTRIBUTE_UNUSED for last argument.
12356 Do not look at v850_compare_op, instead get mode from last argument.
12357 (v850_gen_compare): Remove
12358 (increment_stack): Use addsi3_clobber_flags to avoid splitting failure
12359 after reload for prologue insns.
12360 (expand_prologue): Account for CLOBBER of CC_REGNUM in various
12362 (construct_save_jarl): Likewise.
12363 (TARGET_FLAGS_REGNUM): Define.
12364 * config/v850/v850.h (v850_compare_op0, v850_compare_op1): Remove.
12365 (NOTICE_UPDATE_CC): Remove.
12366 * config/v850/v850.md (v850_tst1): Use (reg:CCZ CC_REGNUM) rather
12367 than cc0. Conditionalize on reload_completed.
12368 (cmpsi_insn, setfcc_insn): Likewise.
12369 (tst1 splitter): Turn into define_and_split which sets the flags
12371 (cstoresi4, cbranchsf4, cbranchdf4, cbranchsi4_insn): Likewise.
12372 (cbranchsi4, branch_normal, branch_invert): Do not expose cc0 here.
12373 (cstoresf4, cstoredf4): Clobber the flags.
12374 (cmpsi, cmpsf, cmpdf): Remove expanders.
12375 (setf_insn): Remove pattern.
12376 (addsi3): Turn into define_and_split which clobbers the flags after
12377 reload and a suitable pattern (addsi3_clobber_flags) for use after
12379 (subsi3, negsi2, andsi3, iorsi3, xorsi3, one_cmplsi2) Likewise.
12380 (ashlsi3, ashlsi3_v850e2, lshrsi3, lsh4si3_v850e2): Likewise.
12381 (ashrsi3, ashrsi3_v850e2): Likewise.
12382 (bins): Clobber the flags.
12383 (movsicc_normal_cc, movsicc_normal, movsicc_tst1): Likewise.
12384 (movsicc_tst1_revesed, sasf, swap and rotate patterns): Likewise.
12385 (fix_loop_counter, call_internal_short, call_internal_long): Likewise.
12386 (call_value_internal_short, call_value_internal_long): Likewise.
12387 (callt_save_interrupt, callt_return_interrupt): Likewise.
12388 (save_interrupt, return_interrupt): Likewise.
12389 (callt_save_all_interrupt, save_all_interrupt): Likewise.
12390 (_save_all_interrupt, callt_restore_all_interrupt): Likewise.
12391 (restore_all_interrupt, _restore_all_interrupt): Likewise.
12392 (All FP comparisons): Only allow after reload has completed.
12394 (divh, divhu): Tweak output template.
12395 (branch_z_normal, branch_z_invert): Remove
12396 (branch_nz_normal, branch_nz_invert): Likewise.
12397 (extendhisi_insn, extendqisi_insn): Do not clobber flags.
12399 * config/v850/v850-modes.def (CCZ, CCNZ): Add new modes.
12400 * config/v850/v850.c (notice_update_cc): Remove.
12401 * config/v850/v850.h (CC_OVERFLOW_UNUSABLE): Remove
12402 (CC_NO_CARRY): Likewise.
12403 (NOTICE_UPDATE_CC): Define to nothing.
12404 * config/v850/v850.md: Remove block comment on cc0 handling
12405 Remove "cc" attribute from all patterns. Remove cc_status handling
12406 from all patterns. Minor formatting fixes.
12408 2018-06-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
12410 * config/aarch64/aarch64-cores.def (cortex-a76): New entry.
12411 (cortex-a76.cortex-a55): Likewise.
12412 * config/aarch64/aarch64-tune.md: Regenerate.
12413 * doc/invoke.texi (AArch64 Options): Document cortex-a76 and
12414 cortex-a76.cortex-a55.
12416 2018-06-27 Jeff Law <law@redhat.com>
12418 * config/v850/t-v850 (MULTILIB_OPTIONS): Remove 8byte-align.
12419 (MULTILIB_DIRNAMES): Similarly.
12421 2018-06-27 Eric Botcazou <ebotcazou@adacore.com>
12423 * gimple.h (gimple_return_retbnd): Delete.
12424 (gimple_return_set_retbnd): Likewise.
12425 * cgraphunit.c (cgraph_node::expand_thunk): Remove call to
12426 gimple_return_set_retbnd.
12427 * gimple-pretty-print.c (dump_gimple_return): Remove call to
12428 gimple_return_retbnd and adjust.
12429 * tree-inline.h (struct copy_body_data): Remove retbnd field.
12430 * tree-inline.c (remap_gimple_stmt): Remove handling of retbnd.
12431 Explicitly return NULL in a couple more cases. Move assertion
12432 on debug statements and remove unreachable code.
12433 (reset_debug_binding): Do not test id->retbnd.
12434 (expand_call_inline): Do not set it.
12436 2018-06-27 Rasmus Villemoes <rv@rasmusvillemoes.dk>
12438 * configure.ac: Add --disable-gcov option.
12439 * configure: Regenerate.
12440 * Makefile.in: Honour @enable_gcov@.
12441 * doc/install.texi: Document --disable-gcov.
12443 2018-06-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
12445 * config/arm/arm-cpus.in (cortex-a76): New entry.
12446 (cortex-a76.cortex-a55): Likewise.
12447 * config/arm/arm-tables.opt: Regenerate.
12448 * config/arm/arm-tune.md: Likewise.
12449 * config/arm/driver-arm.c (arm_cpu_table): Add Cortex-A76 entry.
12450 * doc/invoke.texi (ARM Options): Document cortex-a76 and
12451 cortex-a76.cortex-a55.
12453 2018-06-27 Tamar Christina <tamar.christina@arm.com>
12456 * config/aarch64/aarch64.md (*movhf_aarch64): Add dup v0.4h pattern.
12458 2018-06-27 Siddhesh Poyarekar <siddhesh@sourceware.org>
12460 * config/aarch64/aarch64.h (CALL_USE_REGISTERS): Fix obsolete
12462 (EPILOGUE_USES): Likewise.
12464 2018-06-26 Eric Botcazou <ebotcazou@adacore.com>
12466 * tree-inline.c (remap_location): New function extracted from...
12467 (copy_edges_for_bb): Add ID parameter. Remap goto_locus.
12468 (copy_phis_for_bb): ...here. Call remap_location.
12469 (copy_cfg_body): Adjust call to copy_edges_for_bb.
12471 2018-06-26 Aaron Sawdey <acsawdey@linux.ibm.com>
12473 * config/rs6000/rs6000-string.c (expand_block_clear): Don't use
12474 unaligned vsx for 16B memset.
12476 2018-06-26 Segher Boessenkool <segher@kernel.crashing.org>
12479 * config/rs6000/rs6000.c (rs6000_init_builtins): Do not set
12480 ieee128_float_type_node to long_double_type_node unless
12481 TARGET_LONG_DOUBLE_128 is set.
12483 2018-06-26 David Malcolm <dmalcolm@redhat.com>
12485 * cfgloop.c (get_loop_location): Convert return type from
12486 location_t to dump_user_location_t, replacing INSN_LOCATION lookups
12487 by implicit construction from rtx_insn *, and using
12488 dump_user_location_t::from_function_decl for the fallback case.
12489 * cfgloop.h (get_loop_location): Convert return type from
12490 location_t to dump_user_location_t.
12491 * cgraphunit.c (walk_polymorphic_call_targets): Update call to
12492 dump_printf_loc to pass in a dump_location_t rather than a
12493 location_t, via the gimple stmt.
12494 * coverage.c (get_coverage_counts): Update calls to
12495 dump_printf_loc to pass in dump_location_t rather than a
12497 * doc/optinfo.texi (Dump types): Convert example of
12498 dump_printf_loc from taking "locus" to taking "insn". Update
12499 description of the "_loc" calls to cover dump_location_t.
12500 * dumpfile.c: Include "backend.h", "gimple.h", "rtl.h", and
12502 (dump_user_location_t::dump_user_location_t): New constructors,
12503 from gimple *stmt and rtx_insn *.
12504 (dump_user_location_t::from_function_decl): New function.
12505 (dump_loc): Make static.
12506 (dump_gimple_stmt_loc): Convert param "loc" from location_t to
12507 const dump_location_t &.
12508 (dump_generic_expr_loc): Delete.
12509 (dump_printf_loc): Convert param "loc" from location_t to
12510 const dump_location_t &.
12511 (selftest::test_impl_location): New function.
12512 (selftest::dumpfile_c_tests): New function.
12513 * dumpfile.h: Include "profile-count.h".
12514 (class dump_user_location_t): New class.
12515 (struct dump_impl_location_t): New struct.
12516 (class dump_location_t): New class.
12517 (dump_printf_loc): Convert 2nd param from source_location to
12518 const dump_location_t &.
12519 (dump_generic_expr_loc): Delete.
12520 (dump_gimple_stmt_loc): Convert 2nd param from source_location to
12521 const dump_location_t &.
12522 * gimple-fold.c (fold_gimple_assign): Update call to
12523 dump_printf_loc to pass in a dump_location_t rather than a
12524 location_t, via the gimple stmt.
12525 (gimple_fold_call): Likewise.
12526 * gimple-loop-interchange.cc
12527 (loop_cand::analyze_iloop_reduction_var): Update for change to
12528 check_reduction_path.
12529 (tree_loop_interchange::interchange): Update for change to
12530 find_loop_location.
12531 * graphite-isl-ast-to-gimple.c (scop_to_isl_ast): Update for
12532 change in return-type of find_loop_location.
12533 (graphite_regenerate_ast_isl): Likewise.
12534 * graphite-optimize-isl.c (optimize_isl): Likewise.
12535 * graphite.c (graphite_transform_loops): Likewise.
12536 * ipa-devirt.c (ipa_devirt): Update call to dump_printf_loc to
12537 pass in a dump_location_t rather than a location_t, via the
12539 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
12540 * ipa.c (walk_polymorphic_call_targets): Likewise.
12541 * loop-unroll.c (report_unroll): Convert "locus" param from
12542 location_t to dump_location_t.
12543 (decide_unrolling): Update for change to get_loop_location's
12545 * omp-grid.c (struct grid_prop): Convert field "target_loc" from
12546 location_t to dump_user_location_t.
12547 (grid_find_single_omp_among_assignments_1): Updates calls to
12548 dump_printf_loc to pass in a dump_location_t rather than a
12549 location_t, via the gimple stmt.
12550 (grid_parallel_clauses_gridifiable): Convert "tloc" from
12551 location_t to dump_location_t. Updates calls to dump_printf_loc
12552 to pass in a dump_location_t rather than a location_t, via the
12554 (grid_inner_loop_gridifiable_p): Likewise.
12555 (grid_dist_follows_simple_pattern): Likewise.
12556 (grid_gfor_follows_tiling_pattern): Likewise.
12557 (grid_target_follows_gridifiable_pattern): Likewise.
12558 (grid_attempt_target_gridification): Convert initialization
12559 of local "grid" from memset to zero-initialization; FIXME: does
12560 this require C++11? Update call to dump_printf_loc to pass in a
12561 optinfo_location rather than a location_t, via the gimple stmt.
12562 * profile.c (read_profile_edge_counts): Updates call to
12563 dump_printf_loc to pass in a dump_location_t rather than a
12565 (compute_branch_probabilities): Likewise.
12566 * selftest-run-tests.c (selftest::run_tests): Call
12568 * selftest.h (dumpfile_c_tests): New decl.
12569 * tree-loop-distribution.c (pass_loop_distribution::execute):
12570 Update for change in return type of find_loop_location.
12571 * tree-parloops.c (parallelize_loops): Likewise.
12572 * tree-ssa-loop-ivcanon.c (try_unroll_loop_completely): Convert
12573 "locus" from location_t to dump_user_location_t.
12574 (canonicalize_loop_induction_variables): Likewise.
12575 * tree-ssa-loop-ivopts.c (tree_ssa_iv_optimize_loop): Update
12576 for change in return type of find_loop_location.
12577 * tree-ssa-loop-niter.c (number_of_iterations_exit): Update call
12578 to dump_printf_loc to pass in a dump_location_t rather than a
12579 location_t, via the stmt.
12580 * tree-ssa-sccvn.c (eliminate_dom_walker::before_dom_children):
12582 * tree-vect-loop-manip.c (find_loop_location): Convert return
12583 type from source_location to dump_user_location_t.
12584 (vect_do_peeling): Update for above change.
12585 (vect_loop_versioning): Update for change in type of
12587 * tree-vect-loop.c (check_reduction_path): Convert "loc" param
12588 from location_t to dump_user_location_t.
12589 (vect_estimate_min_profitable_iters): Update for change in type
12591 * tree-vect-slp.c (vect_print_slp_tree): Convert param "loc" from
12592 location_t to dump_location_t.
12593 (vect_slp_bb): Update for change in type of vect_location.
12594 * tree-vectorizer.c (vect_location): Convert from source_location
12595 to dump_user_location_t.
12596 (try_vectorize_loop_1): Update for change in vect_location's type.
12597 (vectorize_loops): Likewise.
12598 (increase_alignment): Likewise.
12599 * tree-vectorizer.h (vect_location): Convert from source_location
12600 to dump_user_location_t.
12601 (find_loop_location): Convert return type from source_location to
12602 dump_user_location_t.
12603 (check_reduction_path): Convert 1st param from location_t to
12604 dump_user_location_t.
12605 * value-prof.c (check_counter): Update call to dump_printf_loc to
12606 pass in a dump_user_location_t rather than a location_t; update
12607 call to error_at for change in type of "locus".
12608 (check_ic_target): Update call to dump_printf_loc to
12609 pass in a dump_user_location_t rather than a location_t, via the
12612 2018-06-26 Robin Dapp <rdapp@linux.vnet.ibm.com>
12614 * config/s390/s390.h (enum processor_flags): Do not use
12615 default tune parameter when -march was specified.
12617 2018-06-26 Jakub Jelinek <jakub@redhat.com>
12620 * config/i386/i386.md (setcc + movzbl to xor + setcc peephole2s):
12621 Check reg_overlap_mentioned_p in addition to reg_set_p with the same
12624 2018-06-26 Richard Biener <rguenther@suse.de>
12626 PR tree-optimization/86287
12628 * tree-vect-loop.c (vect_transform_loop_stmt): Fix read-after-free.
12629 (vect_analyze_loop): Initialize n_stmts.
12631 2018-06-26 Richard Biener <rguenther@suse.de>
12633 PR middle-end/86271
12634 * fold-const.c (fold_convertible_p): Pointer extension
12637 2018-06-26 Alexandre Oliva <aoliva@redhat.com>
12640 * dwarf2out.c (loc_list_has_views): Adjust comments.
12641 (dw_loc_list): Split single cross-partition range with
12644 2018-06-25 Jeff Law <law@redhat.com>
12646 * common/config/v850/v850-common.c (TARGET_DEFAULT_TARGET_FLAGS): Turn
12647 on -mbig-switch by default.
12649 * config/v850/predicates.md (const_float_1_operand): Fix match_code
12651 (const_float_0_operand): Remove unused predicate.
12652 * config/v850/v850.md (define_constants): Remove UNSPEC_LOOP.
12653 (define_c_enum unspec): Add LOOP, RCP and RSQRT constants.
12654 (recipsf2): New expander. Original pattern now called
12656 (recipdf2, recipdf2_insn): Similarly.
12657 (rsqrtsf2, rsqrtsf2_insn): Similarly
12658 (rsqrtdf2, rsqrtdf2_insn): Similarly
12660 2018-06-26 Gerald Pfeifer <gerald@pfeifer.com>
12662 * ginclude/stddef.h: Remove an obsolete comment on FreeBSD 5.
12663 Simplify logic for FreeBSD (twice).
12665 2018-06-25 Martin Sebor <msebor@redhat.com>
12667 PR tree-optimization/86204
12668 * tree-ssa-strlen.c (handle_builtin_strlen): Avoid storing
12669 a strnlen result if it's less than the length of the string.
12671 2018-06-25 Martin Sebor <msebor@redhat.com>
12673 PR tree-optimization/85700
12674 * gimple-fold.c (gimple_fold_builtin_strncat): Adjust comment.
12675 * tree-ssa-strlen.c (is_strlen_related_p): Handle integer subtraction.
12676 (maybe_diag_stxncpy_trunc): Distinguish strncat from strncpy.
12678 2018-06-25 Martin Sebor <msebor@redhat.com>
12680 * doc/extend.texi (Zero-length arrays): Update and clarify.
12682 2018-06-25 Michael Meissner <meissner@linux.ibm.com>
12684 * config.gcc (powerpc64le*): Revert January 16th, 2018 patch that
12685 added IEEE/IBM long double multilib support on PowerPC little
12686 endian Linux systems.
12687 * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Likewise.
12688 (MULTILIB_DEFAULTS): Likewise.
12689 * config/rs6000/rs6000.c (rs6000_option_override_internal):
12691 * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Likewise.
12692 * config/rs6000/t-ldouble-linux64le-ibm: Delete, no longer used.
12693 * config/rs6000/t-ldouble-linux64le-ieee: Delete, no longer used.
12695 2018-06-25 Alexander Monakov <amonakov@ispras.ru>
12697 PR middle-end/86311
12698 * sort.cc (REORDER_23): Avoid memcpy with same destination and source.
12699 (REORDER_45): Likewise.
12701 2018-06-25 Jeff Law <law@redhat.com>
12703 * config/v850/v850.md (divmodhi4): Make sure to sign extend the
12704 dividend to 32 bits. Adjust length.
12705 (udivmodhi4): Cleanup output template. Fix length.
12707 2018-06-25 Carl Love <cel@us.ibm.com>
12709 * config/rs6000/vsx.md: Change word selector to prefered location.
12711 2018-06-25 Richard Biener <rguenther@suse.de>
12713 PR tree-optimization/86304
12714 * tree-vectorizer.c (vectorize_loops): Walk over new possibly
12715 epilogue-if-converted loops as well.
12717 2018-06-25 Jan Hubicka <hubicka@ucw.cz>
12719 * lto-section-out.c (lto_begin_section): Do not print section
12720 name for noaddr and unnumbered dumps.
12722 2018-06-25 Richard Biener <rguenther@suse.de>
12724 * tree-vectorizer.h (struct vec_info_shared): New structure
12725 with parts split out from struct vec_info and loop_nest from
12726 struct _loop_vec_info.
12727 (struct vec_info): Adjust accordingly.
12728 (struct _loop_vec_info): Likewise.
12729 (LOOP_VINFO_LOOP_NEST): Adjust.
12730 (LOOP_VINFO_DATAREFS): Likewise.
12731 (LOOP_VINFO_DDRS): Likewise.
12732 (struct _bb_vec_info): Likewise.
12733 (BB_VINFO_DATAREFS): Likewise.
12734 (BB_VINFO_DDRS): Likewise.
12735 (struct _stmt_vec_info): Add dr_aux member.
12736 (DR_VECT_AUX): Adjust to refer to member of DR_STMTs vinfo.
12737 (DR_MISALIGNMENT_UNINITIALIZED): New.
12738 (set_dr_misalignment): Adjust.
12739 (dr_misalignment): Assert misalign isn't DR_MISALIGNMENT_UNINITIALIZED.
12740 (vect_analyze_loop): Adjust prototype.
12741 (vect_analyze_loop_form): Likewise.
12742 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
12743 Compute dependences lazily.
12744 (vect_record_base_alignments): Use shared datarefs/ddrs.
12745 (vect_verify_datarefs_alignment): Likewise.
12746 (vect_analyze_data_refs_alignment): Likewise.
12747 (vect_analyze_data_ref_accesses): Likewise.
12748 (vect_analyze_data_refs): Likewise.
12749 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Add
12750 constructor parameter for shared part.
12751 (vect_analyze_loop_form): Pass in shared part and adjust.
12752 (vect_analyze_loop_2): Pass in storage for the number of
12753 stmts. Move loop nest finding to the caller. Compute
12755 (vect_analyze_loop): Pass in shared part.
12756 (vect_transform_loop): Verify shared datarefs are unchanged.
12757 * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Add
12758 constructor parameter for shared part.
12759 (vect_slp_analyze_bb_1): Pass in shared part and adjust.
12760 (vect_slp_bb): Verify shared datarefs are unchanged before
12762 * tree-vect-stmts.c (ensure_base_align): Adjust for DR_AUX
12764 (new_stmt_vec_info): Initialize DR_AUX misalignment to
12765 DR_MISALIGNMENT_UNINITIALIZED.
12766 * tree-vectorizer.c (vec_info::vec_info): Add constructor
12767 parameter for shared part.
12768 (vec_info::~vec_info): Adjust.
12769 (vec_info_shared::vec_info_shared): New.
12770 (vec_info_shared::~vec_info_shared): Likewise.
12771 (vec_info_shared::save_datarefs): Likewise.
12772 (vec_info_shared::check_datarefs): Likewise.
12773 (try_vectorize_loop_1): Construct shared part live for analyses
12774 of a single loop for multiple vector sizes.
12775 * tree-parloops.c (gather_scalar_reductions): Adjust.
12777 2018-06-25 Richard Biener <rguenther@suse.de>
12779 * tree-vect-data-refs.c (vect_find_stmt_data_reference): Modify
12780 DR for SIMD lane accesses here and mark DR with (void *)-1 aux.
12781 (vect_analyze_data_refs): Remove similar code from here and
12782 simplify accordingly.
12784 2018-06-25 Richard Biener <rguenther@suse.de>
12786 * tree-vect-data-refs.c (vect_check_gather_scatter): Fail
12787 for reverse storage order accesses rather than asserting
12788 they cannot happen here.
12790 2018-06-25 Tom de Vries <tdevries@suse.de>
12793 * config/i386/i386.md (define_insn "*tls_global_dynamic_64_<mode>"):
12794 Use data16 instead of .byte for insn prefix.
12796 2018-06-25 Andreas Krebbel <krebbel@linux.ibm.com>
12799 * parser.c (make_char_string_pack): Pass this literal chars
12800 through cpp_interpret_string.
12801 (cp_parser_userdef_numeric_literal): Check the result of
12802 make_char_string_pack.
12804 2018-06-24 Maya Rashish <coypu@sdf.org>
12806 * ginclude/stddef.h: Simplify conditions around avoiding
12807 re-definition of __size_t.
12809 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
12811 * lto-streamer-out.c (tree_is_indexable): Make LABEL_DECL nonindexable
12812 unless it is forced or nonlocal; assert that we stream no IMPORTED_DECL.
12814 2018-06-22 Maya Rashish <coypu@sdf.org>
12816 * doc/invoke.texi (mno-fancy-math-387): Update for changes
12817 made to OpenBSD and NetBSD through the years.
12819 2018-06-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
12821 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
12822 behavior of vec_pack (vector double, vector double) to match
12823 behavior of vec_float2 (vector double, vector double).
12825 2018-06-22 Olivier Hainque <hainque@adacore.com>
12827 * gimplify.c (gimplify_function_tree): Prevent creation
12828 of a trampoline for the address of the current function
12829 passed to entry/exit instrumentation hooks.
12831 2018-06-22 Aaron Sawdey <acsawdey@linux.ibm.com>
12834 * config/rs6000/rs6000-string.c (expand_strn_compare): Handle -m32
12837 2018-06-22 Martin Liska <mliska@suse.cz>
12839 PR tree-optimization/86263
12840 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
12841 Bail out if is_enabled is false.
12842 * tree-switch-conversion.h (jump_table_cluster::is_enabled):
12844 (jump_table_cluster::is_enabled): New function.
12846 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
12848 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
12849 BINFO_BASE_ACCESSES and BINFO_VPTR_FIELD.
12850 * tree-streamer-in.c (streamer_read_tree_bitfields): Likewise.
12851 (lto_input_ts_binfo_tree_pointers): Likewise.
12852 * tree-streamer-out.c (streamer_write_tree_bitfields,
12853 write_ts_binfo_tree_pointers): Likewise.
12854 * tree.c (free_lang_data_in_binfo): Clear BINFO_VPTR_FIELD.
12856 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
12858 * tree.c (free_lang_data_in_type): Free all TYPE_VFIELDs.
12860 2018-06-22 Martin Liska <mliska@suse.cz>
12862 * symbol-summary.h (get): Make it pure and inline move
12863 functionality from ::get function.
12864 (get): Remove and inline into ::get and ::get_create.
12865 (get_create): Move code from ::get function.
12867 2018-06-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
12870 * config/i386/sol2.h (CPP_SPEC): Don't pass -P for
12871 -x assembler-with-cpp.
12873 2018-06-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
12875 * config/sol2.h (TARGET_OS_CPP_BUILTINS): Define
12876 _FILE_OFFSET_BITS=64 for C++.
12878 2018-06-21 Michael Meissner <meissner@linux.ibm.com>
12880 * config/rs6000/rs6000.md (extendtfif2): Add missing 128-bit
12881 conversion insn that shows up when pr85657-3.c is compiled using
12882 IEEE 128-bit long double.
12883 (neg<mode>2_internal): Use the correct mode to check whether the
12884 mode is IBM extended.
12885 * config/rs6000/rs6000.c (init_float128_ieee): Prevent complex
12886 multiply and divide external functions from being created more
12889 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
12891 * cfgrtl.c (fixup_reorder_chain): Do not emit NOPs in DECL_IGNORED_P
12893 (rtl_merge_blocks): Likewise. Do not emit a NOP if the location of
12894 the edge can be forwarded.
12895 (cfg_layout_merge_blocks): Likewise.
12897 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
12899 * except.c (finish_eh_generation): Commit edge insertions only after
12900 the EH edges have been redirected from post-landing to landing pads.
12902 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
12904 * tree-nested.c (get_frame_type): Use create_tmp_var_raw instead of
12905 create_tmp_var_for to create the FRAME decl.
12906 (finalize_nesting_tree_1): Do not unchain the FRAME decl.
12908 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
12910 * tree-inline.c (copy_edges_for_bb): Minor tweak.
12911 (maybe_move_debug_stmts_to_successors): Also reset the locus of the
12912 debug statement when resetting its value.
12913 (expand_call_inline): Copy the locus of the call onto the assignment
12914 of the return value, if any. Use local variable in more cases.
12916 2018-06-21 Martin Liska <mliska@suse.cz>
12918 * ipa-pure-const.c (propagate_nothrow): Use
12919 funct_state_summaries->get.
12920 (dump_malloc_lattice): Likewise.
12921 (propagate_malloc): Likewise.
12923 2018-06-21 Richard Biener <rguenther@suse.de>
12925 * lto-streamer-out.c (DFS::DFS_write_tree_body): Update outdated
12926 comment. Follow BLOCK_ABSTRACT_ORIGIN unconditionally.
12927 * tree-streamer-in.c (lto_input_ts_block_tree_pointers): Update
12929 * tree-streamer-out.c (write_ts_block_tree_pointers): Stream
12930 BLOCK_ABSTRACT_ORIGIN unconditionally.
12932 2018-06-21 David Malcolm <dmalcolm@redhat.com>
12934 * ipa-cp.c (ipcp_driver): Set edge_clone_summaries to NULL after
12936 * ipa-reference.c (ipa_reference_c_finalize): Delete
12937 ipa_ref_opt_sum_summaries and set it to NULL.
12939 2018-06-21 Tom de Vries <tdevries@suse.de>
12941 PR tree-optimization/85859
12942 * tree-ssa-tail-merge.c (stmt_local_def): Copy gimple_is_call
12943 test with comment from bb_no_side_effects_p.
12945 2018-06-21 Richard Biener <rguenther@suse.de>
12947 PR tree-optimization/86232
12948 * tree-ssa-loop-niter.c (number_of_iterations_popcount): Adjust
12949 max for constant niter.
12951 2018-06-21 Andre Vieira <andre.simoesdiasvieira@arm.com>
12953 * config/aarch64/aarch64-simd.md
12954 (*aarch64_crypto_aes<aes_op>v16qi_xor_combine): New.
12956 2018-06-21 Andre Vieira <andre.simoesdiasvieira@arm.com>
12958 * config/aarch64/aarch64-simd.md (aarch64_crypto_aes<aes_op>v16qi):
12959 Make opernads of the unspec commutative.
12961 2018-06-21 Richard Biener <rguenther@suse.de>
12963 * tree-data-ref.c (dr_step_indicator): Handle NULL DR_STEP.
12964 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr):
12965 Avoid calling vect_mark_for_runtime_alias_test with gathers or scatters.
12966 (vect_analyze_data_ref_dependence): Re-order checks to deal with
12968 (vect_record_base_alignments): Do not record base alignment
12969 for gathers or scatters.
12970 (vect_compute_data_ref_alignment): Drop return value that is always
12971 true. Bail out early for gathers or scatters.
12972 (vect_enhance_data_refs_alignment): Bail out early for gathers
12974 (vect_find_same_alignment_drs): Likewise.
12975 (vect_analyze_data_refs_alignment): Remove dead code.
12976 (vect_slp_analyze_and_verify_node_alignment): Likewise.
12977 (vect_analyze_data_refs): For possible gathers or scatters do
12978 not create an alternate DR, just check their possible validity
12979 and mark them. Adjust DECL_NONALIASED handling to not rely
12980 on DR_BASE_ADDRESS.
12981 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Do not
12982 update inits of gathers or scatters.
12983 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern):
12984 Also copy gather/scatter flag to pattern vinfo.
12986 2018-06-20 Kelvin Nilsen <kelvin@gcc.gnu.org>
12988 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
12989 behavior of vec_packsu (vector unsigned long long, vector unsigned
12990 long long) to match behavior of vec_packs with same signature.
12992 2018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
12993 Thomas Schwinge <thomas@codesourcery.com>
12994 Cesar Philippidis <cesar@codesourcery.com>
12996 * gimplify.c (gimplify_scan_omp_clauses): Add support for
12997 OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
12998 (gimplify_adjust_omp_clauses): Likewise.
12999 (gimplify_oacc_declare_1): Add support for GOMP_MAP_RELEASE, remove
13000 support for GOMP_MAP_FORCE_{ALLOC,TO,FROM,TOFROM}.
13001 (gimplify_omp_target_update): Update handling of acc update and
13003 * omp-low.c (install_var_field): Remove unused parameter
13004 base_pointers_restrict.
13005 (scan_sharing_clauses): Remove base_pointers_restrict parameter.
13006 Update call to install_var_field. Handle OMP_CLAUSE_{IF_PRESENT,
13008 (omp_target_base_pointers_restrict_p): Delete.
13009 (scan_omp_target): Update call to scan_sharing_clauses.
13010 * tree-core.h (enum omp_clause_code): Add OMP_CLAUSE_{IF_PRESENT,
13012 * tree-nested.c (convert_nonlocal_omp_clauses): Handle
13013 OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
13014 (convert_local_omp_clauses): Likewise.
13015 * tree-pretty-print.c (dump_omp_clause): Likewise.
13016 * tree.c (omp_clause_num_ops): Add entries for OMP_CLAUSE_{IF_PRESENT,
13018 (omp_clause_code_name): Likewise.
13020 2018-06-20 Jakub Jelinek <jakub@redhat.com>
13023 * var-tracking.c (use_narrower_mode_test): Check if shift amount can
13026 PR tree-optimization/86231
13027 * tree-vrp.c (union_ranges): For ( [ ) ] or ( )[ ] range and
13028 anti-range don't overwrite *vr0min before using it to compute *vr0max.
13030 2018-06-20 Tom de Vries <tdevries@suse.de>
13032 PR tree-optimization/86097
13033 * tree-ssa-loop-manip.c (canonicalize_loop_ivs): Also convert *nit to
13034 iv type if signedness of iv type is not the same as that of *nit.
13036 2018-06-20 Jakub Jelinek <jakub@redhat.com>
13038 * cfgrtl.c (rtl_verify_edges): Formatting fix. If bb->preds has any
13039 EDGE_EH edges, verify they are all EDGE_EH.
13041 2018-06-20 Maya Rashish <coypu@sdf.org>
13043 * ginclude/stddef.h: Limit #include <machine/ansi.h> to NetBSD.
13045 2018-06-20 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
13047 * config/aarch64/aarch64-tuning-flags.def (no_ldp_stp_qregs): New.
13048 * config/aarch64/aarch64.c (xgene1_tunings): Add
13049 AARCH64_EXTRA_TUNE_NO_LDP_STP_QREGS to tune_flags.
13050 (aarch64_mode_valid_for_sched_fusion_p):
13051 Allow 16-byte modes.
13052 (aarch64_classify_address): Allow 16-byte modes for load_store_pair_p.
13053 * config/aarch64/aarch64-ldpstp.md: Add peepholes for LDP STP of
13055 * config/aarch64/aarch64-simd.md (load_pair<VQ:mode><VQ2:mode>):
13057 (vec_store_pair<VQ:mode><VQ2:mode>): Likewise.
13058 * config/aarch64/iterators.md (VQ2): New mode iterator.
13060 2018-06-20 Martin Liska <mliska@suse.cz>
13062 * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
13063 Change default ratio from 10 to 8.
13065 2018-06-20 Martin Liska <mliska@suse.cz>
13067 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
13069 (bit_test_cluster::find_bit_tests): Likewise.
13070 (switch_decision_tree::analyze_switch_statement): Find clusters.
13071 * tree-switch-conversion.h (struct jump_table_cluster): Document
13074 2018-06-20 Martin Liska <mliska@suse.cz>
13076 * tree-switch-conversion.c (switch_conversion::collect):
13077 Record m_uniq property.
13078 (switch_conversion::expand): Bail out for special conditions.
13079 (group_cluster::~group_cluster): New.
13080 (group_cluster::group_cluster): Likewise.
13081 (group_cluster::dump): Likewise.
13082 (jump_table_cluster::emit): New.
13083 (switch_decision_tree::fix_phi_operands_for_edges): New.
13084 (struct case_node): Remove struct.
13085 (jump_table_cluster::can_be_handled): New.
13086 (case_values_threshold): Moved to header.
13087 (reset_out_edges_aux): Likewise.
13088 (jump_table_cluster::is_beneficial): New.
13089 (bit_test_cluster::can_be_handled): Likewise.
13090 (add_case_node): Remove.
13091 (bit_test_cluster::is_beneficial): New.
13092 (case_bit_test::cmp): New.
13093 (bit_test_cluster::emit): New.
13094 (expand_switch_as_decision_tree_p): Remove.
13095 (bit_test_cluster::hoist_edge_and_branch_if_true): New.
13096 (fix_phi_operands_for_edge): Likewise.
13097 (switch_decision_tree::analyze_switch_statement): New.
13098 (compute_cases_per_edge): Move ...
13099 (switch_decision_tree::compute_cases_per_edge): ... here.
13100 (try_switch_expansion): Likewise.
13101 (switch_decision_tree::try_switch_expansion): Likewise.
13102 (record_phi_operand_mapping): Likewise.
13103 (switch_decision_tree::record_phi_operand_mapping): Likewise.
13104 (emit_case_decision_tree): Likewise.
13105 (switch_decision_tree::emit): Likewise.
13106 (balance_case_nodes): Likewise.
13107 (switch_decision_tree::balance_case_nodes): Likewise.
13108 (dump_case_nodes): Likewise.
13109 (switch_decision_tree::dump_case_nodes): Likewise.
13110 (emit_jump): Likewise.
13111 (switch_decision_tree::emit_jump): Likewise.
13112 (emit_cmp_and_jump_insns): Likewise.
13113 (switch_decision_tree::emit_cmp_and_jump_insns): Likewise.
13114 (emit_case_nodes): Likewise.
13115 (switch_decision_tree::emit_case_nodes): Likewise.
13116 (conditional_probability): Remove.
13117 * tree-switch-conversion.h (enum cluster_type): New.
13119 (struct cluster): Likewise.
13120 (cluster::cluster): Likewise.
13121 (struct simple_cluster): Likewise.
13122 (simple_cluster::simple_cluster): Likewise.
13123 (struct group_cluster): Likewise.
13124 (struct jump_table_cluster): Likewise.
13125 (struct bit_test_cluster): Likewise.
13126 (struct min_cluster_item): Likewise.
13127 (struct case_tree_node): Likewise.
13128 (case_tree_node::case_tree_node): Likewise.
13129 (jump_table_cluster::case_values_threshold): Likewise.
13130 (struct case_bit_test): Likewise.
13131 (struct switch_decision_tree): Likewise.
13132 (struct switch_conversion): Likewise.
13133 (switch_decision_tree::reset_out_edges_aux): Likewise.
13135 2018-06-20 Martin Liska <mliska@suse.cz>
13137 * tree-switch-conversion.c (MAX_CASE_BIT_TESTS): Remove.
13138 (hoist_edge_and_branch_if_true): Likewise.
13139 (expand_switch_using_bit_tests_p): Likewise.
13140 (struct case_bit_test): Likewise.
13141 (case_bit_test_cmp): Likewise.
13142 (emit_case_bit_tests): Likewise.
13143 (switch_conversion::switch_conversion): New class.
13144 (struct switch_conv_info): Remove old struct.
13145 (collect_switch_conv_info): More to ...
13146 (switch_conversion::collect): ... this.
13147 (check_range): Likewise.
13148 (switch_conversion::check_range): Likewise.
13149 (check_all_empty_except_final): Likewise.
13150 (switch_conversion::check_all_empty_except_final): Likewise.
13151 (check_final_bb): Likewise.
13152 (switch_conversion::check_final_bb): Likewise.
13153 (create_temp_arrays): Likewise.
13154 (switch_conversion::create_temp_arrays): Likewise.
13155 (free_temp_arrays): Likewise.
13156 (gather_default_values): Likewise.
13157 (switch_conversion::gather_default_values): Likewise.
13158 (build_constructors): Likewise.
13159 (switch_conversion::build_constructors): Likewise.
13160 (constructor_contains_same_values_p): Likewise.
13161 (switch_conversion::contains_same_values_p): Likewise.
13162 (array_value_type): Likewise.
13163 (switch_conversion::array_value_type): Likewise.
13164 (build_one_array): Likewise.
13165 (switch_conversion::build_one_array): Likewise.
13166 (build_arrays): Likewise.
13167 (switch_conversion::build_arrays): Likewise.
13168 (gen_def_assigns): Likewise.
13169 (switch_conversion::gen_def_assigns): Likewise.
13170 (prune_bbs): Likewise.
13171 (switch_conversion::prune_bbs): Likewise.
13172 (fix_phi_nodes): Likewise.
13173 (switch_conversion::fix_phi_nodes): Likewise.
13174 (gen_inbound_check): Likewise.
13175 (switch_conversion::gen_inbound_check): Likewise.
13176 (process_switch): Use the newly created class.
13177 (switch_conversion::expand): New.
13178 (switch_conversion::~switch_conversion): New.
13179 * tree-switch-conversion.h: New file.
13181 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
13183 * tree-vectorizer.h (NUM_PATTERNS, vect_recog_func_ptr): Move to
13184 tree-vect-patterns.c.
13185 * tree-vect-patterns.c (vect_supportable_direct_optab_p): New function.
13186 (vect_recog_dot_prod_pattern): Use it. Remove the type_in argument.
13187 (vect_recog_sad_pattern): Likewise.
13188 (vect_recog_widen_sum_pattern): Likewise.
13189 (vect_recog_pow_pattern): Likewise. Check for a null vectype.
13190 (vect_recog_widen_shift_pattern): Remove the type_in argument.
13191 (vect_recog_rotate_pattern): Likewise.
13192 (vect_recog_mult_pattern): Likewise.
13193 (vect_recog_vector_vector_shift_pattern): Likewise.
13194 (vect_recog_divmod_pattern): Likewise.
13195 (vect_recog_mixed_size_cond_pattern): Likewise.
13196 (vect_recog_bool_pattern): Likewise.
13197 (vect_recog_mask_conversion_pattern): Likewise.
13198 (vect_try_gather_scatter_pattern): Likewise.
13199 (vect_recog_widen_mult_pattern): Likewise. Check for a null vectype.
13200 (vect_recog_over_widening_pattern): Likewise.
13201 (vect_recog_gather_scatter_pattern): Likewise.
13202 (vect_recog_func_ptr): Move from tree-vectorizer.h
13203 (vect_vect_recog_func_ptrs): Move further down the file.
13204 (vect_recog_func): Likewise. Remove the third argument.
13205 (NUM_PATTERNS): Define based on vect_vect_recog_func_ptrs.
13206 (vect_pattern_recog_1): Expect the pattern function to do any
13207 necessary target tests. Also expect it to provide a vector type.
13208 Remove the type_in handling.
13210 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
13212 * tree-vect-patterns.c (vect_pattern_detected): New function.
13213 (vect_recog_dot_prod_patternm, vect_recog_sad_pattern)
13214 (vect_recog_widen_mult_pattern, vect_recog_widen_sum_pattern)
13215 (vect_recog_over_widening_pattern, vect_recog_widen_shift_pattern
13216 (vect_recog_rotate_pattern, vect_recog_vector_vector_shift_pattern)
13217 (vect_recog_mult_pattern, vect_recog_divmod_pattern)
13218 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
13219 (vect_recog_mask_conversion_pattern)
13220 (vect_try_gather_scatter_pattern): Likewise.
13222 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
13224 * tree-vect-patterns.c (vect_get_internal_def): New function.
13225 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
13226 (vect_recog_vector_vector_shift_pattern, check_bool_pattern)
13227 (search_type_for_mask_1): Use it.
13229 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
13231 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
13232 redundant WIDEN_SUM_EXPR handling.
13233 (vect_recog_sad_pattern): Likewise.
13235 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
13237 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
13238 redundant check that the types of a PLUS_EXPR or MULT_EXPR agree.
13239 (vect_recog_sad_pattern): Likewise PLUS_EXPR, ABS_EXPR and MINUS_EXPR.
13240 (vect_recog_widen_mult_pattern): Likewise MULT_EXPR.
13241 (vect_recog_widen_sum_pattern): Likewise PLUS_EXPR.
13243 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
13245 * tree-vect-stmts.c (vectorizable_call): Make sure that we
13246 use the stmt_vec_info of the original bb statement for the
13247 new zero assignment, even if the call is part of a pattern.
13249 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
13251 * tree-vectorizer.h (_stmt_vec_info): Note above pattern_def_seq
13252 that the sequence is attached to the original statement rather
13253 than the pattern statement.
13254 * tree-vect-loop.c (vect_determine_vf_for_stmt): Take the
13255 PATTERN_DEF_SEQ from the original statement rather than
13256 the main pattern statement.
13257 * tree-vect-stmts.c (free_stmt_vec_info): Likewise.
13258 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Likewise.
13259 (vect_mark_pattern_stmts): Don't copy the PATTERN_DEF_SEQ.
13261 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
13263 * tree-vect-stmts.c (vect_analyze_stmt): Move the handling of pattern
13264 definition statements before the early exit for statements that aren't
13266 * tree-vect-loop.c (vect_transform_loop_stmt): New function,
13268 (vect_transform_loop): ...here. Process pattern definition
13269 statements without first checking whether the main pattern
13270 statement is live or relevant.
13272 2018-06-19 Eric Botcazou <ebotcazou@adacore.com>
13274 * tree-cfgcleanup.c (tree_forwarder_block_p): Do not return false at
13275 -O0 if the locus represent UNKNOWN_LOCATION but have different values.
13277 2018-06-19 Aaron Sawdey <acsawdey@linux.ibm.com>
13279 * config/rs6000/rs6000-string.c (select_block_compare_mode): Check
13280 TARGET_EFFICIENT_OVERLAPPING_UNALIGNED here instead of in caller.
13281 (do_and3, do_and3_mask, do_compb3, do_rotl3): New functions.
13282 (expand_block_compare): Change select_block_compare_mode call.
13283 (expand_strncmp_align_check): Use new functions, fix comment.
13284 (emit_final_str_compare_gpr): New function.
13285 (expand_strn_compare): Refactor and clean up code.
13286 * config/rs6000/vsx.md (vsx_mov<mode>_64bit): Remove *.
13288 2018-06-19 Tony Reix <tony.reix@atos.com>
13289 Damien Bergamini <damien.bergamini@atos.com>
13290 David Edelsohn <dje.gcc@gmail.com>
13292 * collect2.c (static_obj): New variable.
13293 (static_libs): New variable.
13294 (is_in_list): Uncomment declaration.
13295 (main): Track AIX libraries linked statically.
13296 (is_in_list): Uncomment definition.
13297 (scan_prog_file): Don't add AIX shared libraries initializer
13298 to constructor list if linking statically.
13300 2018-06-19 Max Filippov <jcmvbkbc@gmail.com>
13302 * config/xtensa/xtensa.md (UNSPEC_FRAME_BLOCKAGE): New unspec
13304 (allocate_stack, frame_blockage, *frame_blockage): New patterns.
13306 2018-06-19 Jan Hubicka <hubicka@ucw.cz>
13308 * tree.c (find_decls_types_r): Remove all non-VAR_DECLs from
13311 2018-06-19 Martin Liska <mliska@suse.cz>
13313 * config/i386/i386.c (ix86_can_inline_p): Do not use
13314 ipa_fn_summaries::get_create.
13315 * ipa-cp.c (ipcp_cloning_candidate_p): Replace get_create with
13317 (devirtualization_time_bonus): Likewise.
13318 (ipcp_propagate_stage): Likewise.
13319 * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
13320 (edge_set_predicate): Likewise.
13321 (evaluate_conditions_for_known_args): Likewise.
13322 (evaluate_properties_for_edge): Likewise.
13323 (ipa_call_summary::reset): Tranform to ...
13324 (ipa_call_summary::~ipa_call_summary): ... this.
13325 (ipa_fn_summary::reset): Transform to ...
13326 (ipa_fn_summary::~ipa_fn_summary): ... this.
13327 (ipa_fn_summary_t::remove): Rename to ...
13328 (ipa_fn_summary_t::remove_callees): ... this.
13329 (ipa_fn_summary_t::duplicate): Use placement new
13330 instead of memory copy.
13331 (ipa_call_summary_t::duplicate): Likewise.
13332 (ipa_call_summary_t::remove): Remove.
13333 (dump_ipa_call_summary): Change get_create to get.
13334 (ipa_dump_fn_summary): Dump only when summary exists.
13335 (analyze_function_body): Use symbol_summary::get instead
13337 (compute_fn_summary): Likewise.
13338 (estimate_edge_devirt_benefit): Likewise.
13339 (estimate_edge_size_and_time): Likewise.
13340 (inline_update_callee_summaries): Likewise.
13341 (remap_edge_change_prob): Likewise.
13342 (remap_edge_summaries): Likewise.
13343 (ipa_merge_fn_summary_after_inlining): Likewise.
13344 (write_ipa_call_summary): Likewise.
13345 (ipa_fn_summary_write): Likewise.
13346 (ipa_free_fn_summary): Likewise.
13347 * ipa-fnsummary.h (struct GTY): Add new ctor and copy ctor.
13348 (struct ipa_call_summary): Likewise.
13349 * ipa-icf.c (sem_function::merge): Use symbol_summary::get instead
13351 * ipa-inline-analysis.c (do_estimate_edge_time): Likewise.
13352 (estimate_size_after_inlining): Likewise.
13353 (estimate_growth): Likewise.
13354 (growth_likely_positive): Likewise.
13355 * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
13356 (inline_call): Likewise.
13357 * ipa-inline.c (caller_growth_limits): Likewise.
13358 (can_inline_edge_p): Likewise.
13359 (can_inline_edge_by_limits_p): Likewise.
13360 (compute_uninlined_call_time): Likewise.
13361 (compute_inlined_call_time): Likewise.
13362 (want_inline_small_function_p): Likewise.
13363 (edge_badness): Likewise.
13364 (update_caller_keys): Likewise.
13365 (update_callee_keys): Likewise.
13366 (inline_small_functions): Likewise.
13367 (inline_to_all_callers_1): Likewise.
13368 (dump_overall_stats): Likewise.
13369 (early_inline_small_functions): Likewise.
13370 (early_inliner): Likewise.
13371 * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
13372 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
13373 * ipa-pure-const.c (malloc_candidate_p): Likewise.
13374 * ipa-split.c (execute_split_functions): Likewise.
13375 * symbol-summary.h: Likewise.
13376 * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
13378 2018-06-19 Richard Biener <rguenther@suse.de>
13380 * tree-vectorizer.c (try_vectorize_loop_1): Split out of ...
13381 (vectorize_loops): ... here. Fix dbgcnt handling.
13382 (try_vectorize_loop): Wrap try_vectorize_loop_1.
13384 2018-06-19 Segher Boessenkool <segher@kernel.crashing.org>
13387 * config/rs6000/rs6000.md (rs6000_discover_homogeneous_aggregate): An
13388 ieee128 argument takes up only one (vector) register, not two (floating
13391 2018-06-19 Eric Botcazou <ebotcazou@adacore.com>
13393 * gimplify.c (gimplify_init_constructor): Really never clear for an
13394 incomplete constructor if CONSTRUCTOR_NO_CLEARING is set.
13396 2018-06-19 Richard Biener <rguenther@suse.de>
13398 PR tree-optimization/86179
13399 * tree-vect-patterns.c (vect_pattern_recog_1): Clean up
13400 after failed recognition.
13402 2018-06-18 Martin Sebor <msebor@redhat.com>
13404 PR middle-end/85602
13405 * calls.c (maybe_warn_nonstring_arg): Handle strncat.
13406 * tree-ssa-strlen.c (is_strlen_related_p): Make extern.
13407 Handle integer subtraction.
13408 (maybe_diag_stxncpy_trunc): Handle nonstring source arguments.
13409 * tree-ssa-strlen.h (is_strlen_related_p): Declare.
13411 2018-06-18 David Malcolm <dmalcolm@redhat.com>
13413 * config/frv/frv-protos.h (frv_ifcvt_modify_insn): Strengthen 3rd
13414 param from rtx to rtx_insn *.
13415 * config/frv/frv.c (frv_ifcvt_add_insn): Likewise for "insn"
13417 (frv_ifcvt_modify_insn): Likwise.
13418 (frv_ifcvt_modify_final): Likwise for local "existing_insn",
13419 adding an as_a <rtx_insn *> cast. Likewise for local "insn".
13420 * config/mips/mips.c (r10k_insert_cache_barriers): Add an
13421 as_a <rtx_insn *> cast to local "unprotected_region" once
13422 it's been established that it's not NULL or pc_rtx.
13423 * config/nds32/nds32-relax-opt.c (nds32_group_insns): Strengthen
13424 param "sethi" from rtx to rtx_insn *.
13425 (nds32_group_float_insns): Likewise for param "insn".
13426 * config/vax/vax-protos.h (vax_output_int_add): Likewise for 1st
13428 (vax_output_int_subtract): Likewise.
13429 * config/vax/vax.c (vax_output_int_add): Likewise for param
13431 (vax_output_int_subtract): Likewise.
13432 * emit-rtl.c (set_insn_deleted): Likewise, removing cast.
13433 (emit_pattern_after): Likewise for param "after".
13434 (emit_insn_after): Likewise.
13435 (emit_jump_insn_after): Likewise.
13436 (emit_call_insn_after): Likewise.
13437 (emit_debug_insn_after): Likewise.
13438 (emit_pattern_before): Likewise for param "before".
13439 (emit_insn_before): Likewise.
13440 (emit_jump_insn_before): Likewise.
13441 * final.c (get_insn_template): Likewise for param "insn", removing
13443 * output.h (get_insn_template): Likewise for 2nd param.
13444 * rtl.h (emit_insn_before): Likewise.
13445 (emit_jump_insn_before): Likewise.
13446 (emit_debug_insn_before_noloc): Likewise.
13447 (emit_insn_after): Likewise.
13448 (emit_jump_insn_after): Likewise.
13449 (emit_call_insn_after): Likewise.
13450 (emit_debug_insn_after): Likewise.
13451 (set_insn_deleted): Likewise for param.
13453 2018-06-18 Michael Meissner <meissner@linux.ibm.com>
13456 * config/rs6000/rs6000-modes.def (toplevel): Rework the 128-bit
13457 floating point modes, so that IFmode is numerically greater than
13458 TFmode, which is greater than KFmode using FRACTIONAL_FLOAT_MODE
13459 to declare the ordering. This prevents IFmode from being
13460 converted to TFmode when long double is IEEE 128-bit on an ISA 3.0
13461 machine. Include rs6000-modes.h to share the fractional values
13462 between genmodes* and the rest of the compiler.
13463 (IFmode): Likewise.
13464 (KFmode): Likewise.
13465 (TFmode): Likewise.
13466 * config/rs6000/rs6000-modes.h: New file.
13467 * config/rs6000/rs6000.c (rs6000_debug_reg_global): Change the
13468 meaning of rs6000_long_double_size so that 126..128 selects an
13469 appropriate 128-bit floating point type.
13470 (rs6000_option_override_internal): Likewise.
13471 * config/rs6000/rs6000.h (toplevel): Include rs6000-modes.h.
13472 (TARGET_LONG_DOUBLE_128): Change the meaning of
13473 rs6000_long_double_size so that 126..128 selects an appropriate
13474 128-bit floating point type.
13475 (LONG_DOUBLE_TYPE_SIZE): Update comment.
13476 * config/rs6000/rs6000.md (trunciftf2): Correct the modes of the
13477 source and destination to match the standard usage.
13478 (truncifkf2): Likewise.
13479 (copysign<mode>3, IEEE iterator): Rework copysign of float128 on
13480 ISA 2.07 to use an explicit clobber, instead of passing in a
13482 (copysign<mode>3_soft): Likewise.
13484 2018-06-18 David Malcolm <dmalcolm@redhat.com>
13486 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
13487 Replace dump_printf_loc call with DUMP_VECT_SCOPE.
13488 (vect_slp_analyze_instance_dependence): Likewise.
13489 (vect_enhance_data_refs_alignment): Likewise.
13490 (vect_analyze_data_refs_alignment): Likewise.
13491 (vect_slp_analyze_and_verify_instance_alignment
13492 (vect_analyze_data_ref_accesses): Likewise.
13493 (vect_prune_runtime_alias_test_list): Likewise.
13494 (vect_analyze_data_refs): Likewise.
13495 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Likewise.
13496 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
13497 (vect_analyze_scalar_cycles_1): Likewise.
13498 (vect_get_loop_niters): Likewise.
13499 (vect_analyze_loop_form_1): Likewise.
13500 (vect_update_vf_for_slp): Likewise.
13501 (vect_analyze_loop_operations): Likewise.
13502 (vect_analyze_loop): Likewise.
13503 (vectorizable_induction): Likewise.
13504 (vect_transform_loop): Likewise.
13505 * tree-vect-patterns.c (vect_pattern_recog): Likewise.
13506 * tree-vect-slp.c (vect_analyze_slp): Likewise.
13507 (vect_make_slp_decision): Likewise.
13508 (vect_detect_hybrid_slp): Likewise.
13509 (vect_slp_analyze_operations): Likewise.
13510 (vect_slp_bb): Likewise.
13511 * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Likewise.
13512 (vectorizable_bswap): Likewise.
13513 (vectorizable_call): Likewise.
13514 (vectorizable_simd_clone_call): Likewise.
13515 (vectorizable_conversion): Likewise.
13516 (vectorizable_assignment): Likewise.
13517 (vectorizable_shift): Likewise.
13518 (vectorizable_operation): Likewise.
13519 * tree-vectorizer.h (DUMP_VECT_SCOPE): New macro.
13521 2018-06-18 Martin Sebor <msebor@redhat.com>
13523 PR tree-optimization/81384
13524 * builtin-types.def (BT_FN_SIZE_CONST_STRING_SIZE): New.
13525 * builtins.c (expand_builtin_strnlen): New function.
13526 (expand_builtin): Call it.
13527 (fold_builtin_n): Avoid setting TREE_NO_WARNING.
13528 * builtins.def (BUILT_IN_STRNLEN): New.
13529 * calls.c (maybe_warn_nonstring_arg): Handle BUILT_IN_STRNLEN.
13530 Warn for bounds in excess of maximum object size.
13531 * tree-ssa-strlen.c (maybe_set_strlen_range): Return tree representing
13532 single-value ranges. Handle strnlen.
13533 (handle_builtin_strlen): Handle strnlen.
13534 (strlen_check_and_optimize_stmt): Same.
13535 * doc/extend.texi (Other Builtins): Document strnlen.
13537 2018-06-18 Maya Rashish <coypu@sdf.org>
13539 * config/alpha/openbsd.h (TARGET_DEFAULT): Define.
13540 (LINK_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): Likewise.
13541 (INTMAX_TYPE, UINTMAX_TYPE, WINT_TYPE): Likewise.
13543 * config/alpha/elf.h (STARTFILE_SPEC, ENDFILE_SPEC): Move from
13545 * config/alpha/linux.h (STARTFILE_SPEC, ENDFILE_SPEC): Here.
13547 2018-06-18 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
13549 * tree.c (escaped_string::escape): Replace cast to char * by
13550 const_cast<char *> (unescaped).
13552 2018-06-18 Nick Clifton <nickc@redhat.com>
13555 * tree.c (escaped_string): New class. Converts an unescaped
13556 string into its escaped equivalent.
13557 (warn_deprecated_use): Use the new class to convert the
13558 deprecation message, if present.
13559 (test_escaped_strings): New self test.
13560 (test_c_tests): Add test_escaped_strings.
13561 * doc/extend.texi (deprecated): Add a note that the
13562 deprecation message is affected by the -fmessage-length
13563 option, and that control characters will be escaped.
13564 (#pragma GCC error): Document this pragma.
13565 (#pragma GCC warning): Likewise.
13566 * doc/invoke.texi (-fmessage-length): Document this option's
13567 effect on the #warning and #error preprocessor directives and
13568 the deprecated attribute.
13570 2018-06-18 Eric Botcazou <ebotcazou@adacore.com>
13572 * tree.c (decl_value_expr_lookup): Revert latest change.
13573 (decl_value_expr_insert): Likewise.
13575 2018-06-17 Eric Botcazou <ebotcazou@adacore.com>
13577 * gimplify.c (nonlocal_vlas): Delete.
13578 (nonlocal_vla_vars): Likewise.
13579 (gimplify_var_or_parm_decl): Do not add debug VAR_DECLs for non-local
13581 (gimplify_body): Do not create and destroy nonlocal_vlas.
13582 * tree-nested.c: Include diagnostic.h.
13583 (use_pointer_in_frame): Tweak.
13584 (lookup_field_for_decl): Add assertion and declare the transformation.
13585 (convert_nonlocal_reference_op) <PARM_DECL>: Rework and issue an
13586 internal error when the reference is in a wrong context. Do not
13587 create a debug decl by default.
13588 (note_nonlocal_block_vlas): Delete.
13589 (convert_nonlocal_reference_stmt) <GIMPLE_BIND>: Do not call it.
13590 (convert_local_reference_op) <PARM_DECL>: Skip the frame decl. Do not
13591 create a debug decl by default.
13592 (convert_gimple_call) <GIMPLE_CALL>: Issue an internal error when the
13593 call is in a wrong context.
13594 (fixup_vla_decls): New function.
13595 (finalize_nesting_tree_1): Adjust comment. Call fixup_vla_decls if no
13596 debug variables were created.
13597 * tree.c (decl_value_expr_lookup): Add checking assertion.
13598 (decl_value_expr_insert): Likewise.
13600 2018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
13602 PR middle-end/82479
13603 * ipa-fnsummary.c (will_be_nonconstant_expr_predicate): Handle CALL_EXPR.
13604 * tree-scalar-evolution.c (interpret_expr): Likewise.
13605 (expression_expensive_p): Likewise.
13606 * tree-ssa-loop-ivopts.c (contains_abnormal_ssa_name_p): Likewise.
13607 * tree-ssa-loop-niter.c (number_of_iterations_popcount): New.
13608 (number_of_iterations_exit_assumptions): Use number_of_iterations_popcount.
13609 (ssa_defined_by_minus_one_stmt_p): New.
13611 2018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
13613 PR middle-end/64946
13614 * cfgexpand.c (expand_debug_expr): Hande ABSU_EXPR.
13615 * config/i386/i386.c (ix86_add_stmt_cost): Likewise.
13616 * dojump.c (do_jump): Likewise.
13617 * expr.c (expand_expr_real_2): Check operand type's sign.
13618 * fold-const.c (const_unop): Handle ABSU_EXPR.
13619 (fold_abs_const): Likewise.
13620 * gimple-pretty-print.c (dump_unary_rhs): Likewise.
13621 * gimple-ssa-backprop.c (backprop::process_assign_use): Likesie.
13622 (strip_sign_op_1): Likesise.
13623 * match.pd: Add new pattern to generate ABSU_EXPR.
13624 * optabs-tree.c (optab_for_tree_code): Handle ABSU_EXPR.
13625 * tree-cfg.c (verify_gimple_assign_unary): Likewise.
13626 * tree-eh.c (operation_could_trap_helper_p): Likewise.
13627 * tree-inline.c (estimate_operator_cost): Likewise.
13628 * tree-pretty-print.c (dump_generic_node): Likewise.
13629 * tree-vect-patterns.c (vect_recog_sad_pattern): Likewise.
13630 * tree.def (ABSU_EXPR): New.
13632 2018-06-16 Jakub Jelinek <jakub@redhat.com>
13634 PR middle-end/86095
13635 * common.opt (Wunsafe-loop-optimizations): Add Ignore, remove Var,
13636 documented as preserved for backward compatibility only.
13637 * doc/invoke.texi: Remove -Wunsafe-loop-optimizations documentation.
13639 PR rtl-optimization/86108
13640 * bb-reorder.c (create_forwarder_block): Renamed to ...
13641 (create_eh_forwarder_block): ... this. Split OLD_BB after labels and
13642 jump from new landing pad to the second part.
13643 (sjlj_fix_up_crossing_landing_pad, dw2_fix_up_crossing_landing_pad):
13646 2018-06-15 Jakub Jelinek <jakub@redhat.com>
13648 PR middle-end/85878
13649 * expr.c (expand_assignment): Remove now redundant COMPLEX_MODE_P
13650 check from first store_expr, use to_mode instead of GET_MODE (to_rtx).
13651 Only call store_expr for halves if the mode is the same.
13653 PR middle-end/86123
13654 * match.pd ((X / Y) == 0 -> X < Y): Don't transform complex divisions.
13655 Fix up comment formatting.
13657 2018-06-15 Bernd Edlinger <bernd.edlinger@hotmail.de>
13659 * typed-splay-tree.h (typed_splay_tree::remove): New function.
13660 (typed_splay_tree::closure,
13661 typed_splay_tree::inner_foreach_fn, typed_splay_tree::m_inner): Deleted.
13662 (typed_splay_tree::typed_splay_tree,
13663 typed_splay_tree::operator =): Declared private.
13664 (typed_splay_tree::splay_tree_key, typed_splay_tree::splay_tree_value,
13665 typed_splay_tree::splay_tree_node_s, typed_splay_tree::KDEL,
13666 typed_splay_tree::VDEL, typed_splay_tree::splay_tree_delete_helper,
13667 typed_splay_tree::rotate_left, typed_splay_tree::rotate_right,
13668 typed_splay_tree::splay_tree_splay,
13669 typed_splay_tree::splay_tree_foreach_helper,
13670 typed_splay_tree::splay_tree_insert,
13671 typed_splay_tree::splay_tree_remove,
13672 typed_splay_tree::splay_tree_lookup,
13673 typed_splay_tree::splay_tree_predecessor,
13674 typed_splay_tree::splay_tree_successor,
13675 typed_splay_tree::splay_tree_min,
13676 typed_splay_tree::splay_tree_max): Took over from splay-tree.c/.h.
13677 (typed_splay_tree::root, typed_splay_tree::comp,
13678 typed_splay_tree::delete_key,
13679 typed_splay_tree::delete_value): New data members.
13680 * typed-splay-tree.c (selftest::test_str_to_int): Add a test for
13681 typed_splay_tree::remove.
13683 2018-06-15 Matthew Fortune <matthew.fortune@mips.com>
13685 * config/mips/mips.h (ASM_SPEC): Pass through -mcrc, -mno-crc,
13686 -mginv and -mno-ginv to the assembler.
13687 * config/mips/mips.opt (-mcrc): New option.
13688 (-mginv): Likewise.
13689 * doc/invoke.text (-mcrc): Document.
13690 (-mginv): Likewise.
13692 2018-06-15 Nick Clifton <nickc@redhat.com>
13695 * tree.c (escaped_string): New class. Converts an unescaped
13696 string into its escaped equivalent.
13697 (warn_deprecated_use): Use the new class to convert the
13698 deprecation message, if present.
13699 (test_escaped_strings): New self test.
13700 (test_c_tests): Add test_escaped_strings.
13701 * doc/extend.texi (deprecated): Add a note that the
13702 deprecation message is affected by the -fmessage-length
13703 option, and that control characters will be escaped.
13704 (#pragma GCC error): Document this pragma.
13705 (#pragma GCC warning): Likewise.
13706 * doc/invoke.texi (-fmessage-length): Document this option's
13707 effect on the #warning and #error preprocessor directives and
13708 the deprecated attribute.
13710 2018-06-15 Richard Biener <rguenther@suse.de>
13712 * tree-vect-slp.c (vect_slp_bb): Dump MSG_OPTIMIZED_LOCATIONS
13713 here, also noting vector size used.
13714 * tree-vectorizer.c (vectorize_loops): Adjust. Note vector
13715 size used in MSG_OPTIMIZED_LOCATIONS dump.
13716 (pass_slp_vectorize::execute): Adjust.
13718 2018-06-15 Claudiu Zissulescu <claziss@synopsys.com>
13721 * config/arc/arc.c (arc_return_address_register): Fix
13724 2018-06-15 Richard Biener <rguenther@suse.de>
13726 PR middle-end/86159
13727 * tree-cfg.c (gimplify_build3): Do not strip sign conversions,
13728 leave useless conversion stripping to force_gimple_operand_gsi.
13729 (gimplify_build2): Likewise.
13730 (gimplify_build1): Likewise.
13732 2018-06-15 Richard Biener <rguenther@suse.de>
13734 PR middle-end/86076
13735 * tree-cfg.c (move_stmt_op): unshare invariant addresses
13736 before adjusting their block.
13738 2018-06-15 Sebastian Huber <sebastian.huber@embedded-brains.de>
13740 * config.gcc (riscv*-*-elf* | riscv*-*-rtems*): Use custom
13741 multilibs for *-*-rtems*.
13742 * config/riscv/t-rtems: New file.
13744 2018-06-14 Jakub Jelinek <jakub@redhat.com>
13746 PR middle-end/86122
13747 * match.pd ((A +- CST1) +- CST2): Punt if last resort
13748 unsigned_type_for returns NULL.
13751 * lower-subreg.c (find_decomposable_subregs): Don't decompose float
13752 subregs of multi-word pseudos unless the float mode has word size.
13754 2018-06-14 Richard Biener <rguenther@suse.de>
13756 PR middle-end/86139
13757 * tree-vect-generic.c (build_word_mode_vector_type): Remove
13758 duplicate and harmful type_hash_canon.
13759 * tree.c (type_hash_canon): Assert we didn't find ourselves.
13761 2018-06-14 Richard Biener <rguenther@suse.de>
13764 * tree-ssa-struct-alias.c (create_variable_info_for): Handle
13767 2018-06-14 Sebastian Huber <sebastian.huber@embedded-brains.de>
13769 * config/rtems.h (STDINT_LONG32): Define.
13771 2018-06-13 Matthew Fortune <matthew.fortune@mips.com>
13772 Prachi Godbole <prachi.godbole@imgtec.com>
13774 * config/mips/mips-cpus.def: Define P6600.
13775 * config/mips/mips-tables.opt: Regenerate.
13776 * config/mips/mips.c (mips_ucbranch_type): New enum.
13777 (mips_rtx_cost_data): Add support for P6600.
13778 (mips_issue_rate): Likewise.
13779 (mips_multipass_dfa_lookahead): Likewise.
13780 (mips_avoid_hazard): Likewise.
13781 (mips_reorg_process_insns): Likewise.
13782 (mips_classify_branch_p6600): New function.
13783 * config/mips/mips.h (TUNE_P6600): New define.
13784 (MIPS_ISA_LEVEL_SPEC): Infer mips64r6 from p6600.
13785 (ENABLE_LD_ST_PAIRS): Enable load/store bonding for p6600.
13786 * config/mips/mips.md: Include p6600.md.
13787 (processor): Add p6600.
13788 * config/mips/p6600.md: New file.
13789 * doc/invoke.texi: Add p6600 to supported architectures.
13791 2018-06-13 Martin Sebor <msebor@redhat.com>
13793 PR tree-optimization/86114
13794 * gimple-fold.c (gimple_fold_builtin_strlen): Only handle LHS
13796 * tree-ssa-strlen.c (maybe_set_strlen_range): Same.
13798 2018-06-13 Richard Biener <rguenther@suse.de>
13800 * tree-vect-patterns.c (vect_recog_vector_vector_shift_pattern):
13801 Properly set vector type of the intermediate stmt.
13802 * tree-vect-stmts.c (vectorizable_operation): The destination
13803 var always has vectype_out type.
13805 2018-06-13 Jeff Law <law@redhat.com>
13807 * config/rl78/rl78.c (move_elim_pass): Use TDF_NONE rather than
13808 integer 0 for argument to print_rtl_with_bb.
13809 (rl78_reorg): Likewise.
13811 2018-06-13 David Malcolm <dmalcolm@redhat.com>
13813 * config/arc/arc.c (hwloop_optimize): Strengthen local "end_label"
13814 from rtx to rtx_insn *.
13815 * config/bfin/bfin.c (hwloop_optimize): Likewise for local
13817 (add_sched_insns_for_speculation): Likewise for local "target",
13818 converting usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
13819 * config/c6x/c6x.c (reorg_split_calls): Strengthen param "call_labels"
13820 from rtx_insn ** to rtx_code_label **.
13821 (reorg_emit_nops): Likewise.
13822 (c6x_reorg): Likewise for local "call_labels".
13823 * config/sh/sh-protos.h (get_dest_uid): Strengthen 1st param from
13825 * config/sh/sh.c (dump_table): Strengthen local "lab" from rtx to
13826 rtx_code_label *, adding safe_as_a <rtx_code_label *> casts to
13827 the loops over LABEL_REFS.
13828 (fixup_addr_diff_vecs): Add as_a <rtx_insn *> to usage of
13830 (barrier_align): Convert usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
13831 (get_dest_uid): Strengthen param "label" from rtx to rtx_insn *.
13832 (split_branches): Strengthen local "olabel" from rtx to
13833 rtx_insn *, adding a safe_as_a cast.
13834 * emit-rtl.c (next_real_insn): Strengthen param from "rtx"
13836 (add_insn_after): Likewise for first two params.
13837 (add_insn_before): Likewise.
13838 (remove_insn): Likewise for param.
13839 (emit_pattern_before_noloc): Likewise for second and third params.
13840 (emit_jump_insn_before_noloc): Convert NULL_RTX to NULL.
13841 (emit_call_insn_before_noloc): Likewise.
13842 (emit_debug_insn_before_noloc): Strengthen "before" param from "rtx"
13844 (emit_barrier_before): Likewise.
13845 (emit_label_before): Strengthen "label" param from "rtx" to
13846 "rtx_code_label *". Strengthen "before" param from "rtx" to
13848 (emit_insn_after_1): Strengthen "after" param from "rtx" to
13850 (emit_pattern_after_noloc): Likewise.
13851 (emit_insn_after_noloc): Likewise.
13852 (emit_jump_insn_after_noloc): Likewise.
13853 (emit_call_insn_after_noloc): Likewise.
13854 (emit_debug_insn_after_noloc): Likewise.
13855 (emit_barrier_after): Likewise.
13856 (emit_label_after): Likewise for both params.
13857 (emit_pattern_after_setloc): Likewise for "after" param. Convert
13858 "loc" param from "int" to "location_t".
13859 (emit_insn_after_setloc): Likewise.
13860 (emit_jump_insn_after_setloc): Likewise.
13861 (emit_call_insn_after_setloc): Likewise.
13862 (emit_debug_insn_after_setloc): Likewise.
13863 (emit_pattern_before_setloc): Likewise for "before" param. Convert
13864 "loc" param from "int" to "location_t".
13865 (emit_pattern_before): Convert NULL_RTX to NULL.
13866 (emit_insn_before_setloc): Convert "loc" param from "int" to
13868 (emit_jump_insn_before_setloc): Likewise.
13869 (emit_call_insn_before_setloc): Likewise.
13870 (emit_debug_insn_before_setloc): Strengthen "before" param from rtx to
13871 rtx_insn *. Convert "loc" param from "int" to "location_t".
13872 * rtl.h (emit_insn_before_setloc, emit_jump_insn_before_setloc,
13873 emit_call_insn_before_setloc, emit_debug_insn_before_setloc):
13874 Convert 3rd param from "int" to "location_t".
13875 (emit_barrier_before, emit_barrier_after, next_real_insn):
13876 Strengthen param from rtx to rtx_insn *.
13877 (emit_label_before): Strengthen 1st param from "rtx" to
13878 "rtx_code_label *". Strengthen 2nd param from "rtx" to
13880 (emit_insn_after_noloc, emit_jump_insn_after_noloc,
13881 emit_call_insn_after_noloc, emit_debug_insn_after_noloc):
13882 Strengthen 2nd param from "rtx" to "rtx_insn *".
13883 (emit_insn_after_setloc, emit_jump_insn_after_setloc)
13884 emit_call_insn_after_setloc, emit_debug_insn_after_setloc):
13885 Likewise. Convert 3rd param from "int" to "location_t".
13886 (emit_label_after): Strengthen 1st param from "rtx" to
13887 "rtx_code_label *".
13888 (next_real_insn, remove_insn): Strengthen param from "rtx" to
13890 (add_insn_before, add_insn_after): Strengthen 1st and 2nd params
13891 from "rtx" to "rtx_insn *".
13893 2018-06-13 Jan Hubicka <hubicka@gcc.gnu.org>
13895 * cgraph.c (cgraph_node::get_untransformed_body): Dump function
13896 bodies streamed in with -Q.
13897 * dumpfile.c (dump_files): Add lto-stream-out dump file.
13898 * dumpfile.h (tree_dump_index): Add lto_stream_out.
13899 * gimple-streamer-out.c: Include gimple-pretty-print.h
13900 (output_bb): Dump stmts streamed.
13901 * lto-section-out.c: Include print-tree.h
13902 (lto_begin_section): Dump sections created.
13903 (lto_output_decl_index): Dump decl encoded.
13904 * lto-streamer-out.c: Include print-tree.h
13905 (create_output_block): Dump output block created.
13906 (DFS::DFS_write_tree_body): Dump DFS SCCs streamed.
13907 (output_function): Dump function output.
13908 (output_constructor): Dump constructor streamed.
13909 (write_global_stream): Output indexes encoded.
13910 (produce_asm_for_decls): Dump streams encoded.
13911 * lto-streamer.c (streamer_dump_file): New global var.
13912 * lto-streamer.h (streamer_dump_file): Declare.
13913 * passes.c (ipa_write_summaries): Initialize streamer dump.
13914 * varpool.c (varpool_node::get_constructor): Dump constructors streamed
13917 2018-06-13 Eric Botcazou <ebotcazou@adacore.com>
13920 * config/i386/winnt.c (i386_pe_seh_cold_init): Do not emit negative
13921 offsets for register save directives. Emit a second batch of save
13922 directives, if need be, when the function accesses prior frames.
13924 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
13926 * config/arc/fpu.md (fmasf4): Force operand to register.
13927 (fnmasf4): Likewise.
13929 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
13931 * config/arc/arc-protos.h (arc_pad_return): Remove.
13932 * config/arc/arc.c (machine_function): Remove force_short_suffix
13934 (arc_print_operand): Adjust printing of '&'.
13935 (arc_verify_short): Remove conditional printing of short suffix.
13936 (arc_final_prescan_insn): Remove reference to size_reason.
13937 (pad_return): New function.
13938 (arc_reorg): Call pad_return.
13939 (arc_pad_return): Remove.
13940 (arc_init_machine_status): Remove reference to force_short_suffix.
13941 * config/arc/arc.md (vunspec): Add VUNSPEC_ARC_BLOCKAGE.
13942 (attr length): When attribute iscompact is true force to 2
13943 regardless; in the case of maybe check if we want to force the
13944 instruction to have 4 bytes length.
13945 (nopv): Change it to generate 4 byte long nop as well.
13946 (blockage): New pattern.
13947 (simple_return): Remove call to arc_pad_return.
13948 (p_return_i): Likewise.
13950 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
13952 * config/arc/elf.h (LINK_GCC_C_SEQUENCE_SPEC): Define.
13954 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
13956 * config/arc/builtins.def (SYNC): SYNC instruction is valid on all
13959 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
13961 * config/arc/arc.c (atomic_exchangesi): EX instruction is default
13962 for ARC700 and ARCv2.
13964 2018-06-13 Chenghua Xu <paul.hua.gm@gmail.com>
13967 * config/mips/loongson.md (vec_setv4hi): Gen_lowpart for
13968 operands[2] instead of operands[1].
13971 2018-06-12 Richard Sandiford <richard.sandiford@linaro.org>
13973 * lra-constraints.c (simplify_operand_subreg): In the paradoxical
13974 case, check whether the outer register overlaps an unallocatable
13975 register, not just whether it fits the required class.
13977 2018-06-12 Richard Sandiford <richard.sandiford@linaro.org>
13979 * poly-int.h (can_div_trunc_p): Add new overload in which all values
13981 * alias.c (get_addr): Extend CONST_INT handling to poly_int_rtx_p.
13982 (memrefs_conflict_p): Likewise.
13983 (init_alias_analysis): Likewise.
13984 * cfgexpand.c (expand_debug_expr): Likewise.
13985 * combine.c (combine_simplify_rtx, force_int_to_mode): Likewise.
13986 * cse.c (fold_rtx): Likewise.
13987 * explow.c (adjust_stack, anti_adjust_stack): Likewise.
13988 * expr.c (emit_block_move_hints): Likewise.
13989 (clear_storage_hints, push_block, emit_push_insn): Likewise.
13990 (store_expr_with_bounds, reduce_to_bit_field_precision): Likewise.
13991 (emit_group_load_1): Use rtx_to_poly_int64 for group offsets.
13992 (emit_group_store): Likewise.
13993 (find_args_size_adjust): Use strip_offset. Use rtx_to_poly_int64
13994 to read the PRE/POST_MODIFY increment.
13995 * calls.c (store_one_arg): Use strip_offset.
13996 * rtlanal.c (rtx_addr_can_trap_p_1): Extend CONST_INT handling to
13998 (set_noop_p): Use rtx_to_poly_int64 for the elements selected
14000 * simplify-rtx.c (avoid_constant_pool_reference): Use strip_offset.
14001 (simplify_binary_operation_1): Extend CONST_INT handling to
14003 * var-tracking.c (compute_cfa_pointer): Take a poly_int64 rather
14004 than a HOST_WIDE_INT.
14005 (hard_frame_pointer_adjustment): Change from HOST_WIDE_INT to
14007 (adjust_mems, add_stores): Update accodingly.
14008 (vt_canonicalize_addr): Track polynomial offsets.
14009 (emit_note_insn_var_location): Likewise.
14010 (vt_add_function_parameter): Likewise.
14011 (vt_initialize): Likewise.
14013 2018-06-12 Jeff Law <law@redhat.com>
14015 * config.gcc (alpha*-*-freebsd*): Remove.
14016 * config/alpha/freebsd.h: Remove.
14018 2018-06-12 David Malcolm <dmalcolm@redhat.com>
14021 * spellcheck-tree.c (levenshtein_distance): Rename to...
14022 (get_edit_distance): ...this, and update for underlying renaming.
14023 * spellcheck-tree.h (levenshtein_distance): Rename to...
14024 (get_edit_distance): ...this.
14025 * spellcheck.c (levenshtein_distance): Rename to...
14026 (get_edit_distance): ...this. Convert from Levenshtein distance
14027 to Damerau-Levenshtein distance by supporting transpositions of
14028 adjacent characters. Rename "v1" to "v_next" and "v0" to
14030 (selftest::levenshtein_distance_unit_test_oneway): Rename to...
14031 (selftest::test_edit_distance_unit_test_oneway): ...this, and
14032 update for underlying renaming.
14033 (selftest::levenshtein_distance_unit_test): Rename to...
14034 (selftest::test_get_edit_distance_unit): ...this, and update for
14035 underlying renaming.
14036 (selftest::test_find_closest_string): Add example from PR 69968
14037 where transposition helps
14038 (selftest::test_metric_conditions): Update for renaming.
14039 (selftest::test_metric_conditions): Likewise.
14040 (selftest::spellcheck_c_tests): Likewise.
14041 * spellcheck.h (levenshtein_distance): Rename both overloads to...
14042 (get_edit_distance): ...this.
14043 (best_match::consider): Update for renaming.
14045 2018-06-12 Martin Sebor <msebor@redhat.com>
14047 PR tree-optimization/85259
14048 * builtins.c (compute_objsize): Handle constant offsets.
14049 * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Return
14050 true iff a warning has been issued.
14051 * gimple.h (gimple_nonartificial_location): New function.
14052 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Call
14053 gimple_nonartificial_location and handle -Wno-system-headers.
14054 (handle_builtin_stxncpy): Same.
14056 2018-06-12 Martin Sebor <msebor@redhat.com>
14059 * fold-const.c (operand_equal_p): Handle SAVE_EXPR.
14061 2018-06-12 Will Schmidt <will_schmidt@vnet.ibm.com>
14063 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add
14064 BUILTIN_VEC_XST entries for pointer to double and long long.
14066 2018-06-12 H.J. Lu <hongjiu.lu@intel.com>
14069 * config/i386/gnu-user.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
14071 * config/i386/gnu-user64.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
14074 2018-06-12 Martin Liska <mliska@suse.cz>
14076 * doc/options.texi: Document IntegerRange.
14078 2018-06-12 Martin Liska <mliska@suse.cz>
14080 * config/i386/i386.opt: Make MPX-related options as Deprecated.
14081 * opt-functions.awk: Handle Deprecated flag.
14082 * opts-common.c (decode_cmdline_option): Handle cl_deprecated
14084 (read_cmdline_option): Report warning for a deprecated option.
14085 * opts.h (struct cl_option): Add new field cl_deprecated.
14086 (CL_ERR_DEPRECATED): New.
14088 2018-06-12 Martin Liska <mliska@suse.cz>
14090 * doc/options.texi: Document Deprecated option flag.
14092 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
14094 * config/arc/arc-arch.h (arc_extras): New enum.
14095 (arc_cpu_t):Add field extra.
14096 (arc_cpu_types): Consider the extras.
14097 * config/arc/arc-cpus.def: Add extras info.
14098 * config/arc/arc-opts.h (processor_type): Consider extra field.
14099 * config/arc/arc.c (arc_override_options): Handle extra field.
14101 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
14103 * config/arc/arc-arch.h: Update ARC_OPTX macro.
14104 * config/arc/arc-options.def (ARC_OPTX): Introduce a new doc
14106 * config/arc/arc.c (arc_init): Update pic warning.
14107 (irq_range): Update irq range parsing warnings.
14108 (arc_override_options): Update various warning messages.
14109 (arc_handle_aux_attribute): Likewise.
14111 2018-06-12 Robert Suchanek <robert.suchanek@mips.com>
14113 * config/mips/i6400.md (i6400_fpu_fadd): Remove frint.
14115 2018-06-12 Jozef Lawrynowicz <jozef.l@mittosystems.com>
14117 * doc/sourcebuild.texi: Document usage of line number 0 in verify
14118 compiler messages directives.
14120 2018-06-12 Matthew Fortune <mfortune@gmail.com>
14122 * config/mips/mips-cpus.def: New MIPS_CPU for i6500.
14123 * config/mips/mips-tables.opt: Regenerate.
14124 * config/mips/mips.h (MIPS_ISA_LEVEL_SPEC): Mark i6500 as
14126 * doc/invoke.texi: Document -march=i6500.
14128 2018-06-12 Prachi Godbole <prachi.godbole@imgtec.com>
14130 * config/mips/i6400.md (i6400_gpmuldiv): Remove cpu_unit.
14131 (i6400_gpmul): Add cpu_unit.
14132 (i6400_gpdiv): Likewise.
14133 (i6400_msa_add_d): Update reservations.
14134 (i6400_msa_int_add) Likewise.
14135 (i6400_msa_short_logic3) Likewise.
14136 (i6400_msa_short_logic2) Likewise.
14137 (i6400_msa_short_logic) Likewise.
14138 (i6400_msa_move) Likewise.
14139 (i6400_msa_cmp) Likewise.
14140 (i6400_msa_short_float2) Likewise.
14141 (i6400_msa_div_d) Likewise.
14142 (i6400_msa_long_logic1) Likewise.
14143 (i6400_msa_long_logic2) Likewise.
14144 (i6400_msa_mult) Likewise.
14145 (i6400_msa_long_float2) Likewise.
14146 (i6400_msa_long_float4) Likewise.
14147 (i6400_msa_long_float5) Likewise.
14148 (i6400_msa_long_float8) Likewise.
14149 (i6400_fpu_fadd): Include frint type.
14150 (i6400_fpu_store): New define_insn_reservation.
14151 (i6400_fpu_load): Likewise.
14152 (i6400_fpu_move): Likewise.
14153 (i6400_fpu_fcmp): Likewise.
14154 (i6400_fpu_fmadd): Likewise.
14155 (i6400_int_mult): Include imul3nc type and update reservation.
14156 (i6400_int_div): Include idiv3 type and update reservation.
14157 (i6400_int_load): Update to check type not move_type.
14158 (i6400_int_store): Likewise.
14159 (i6400_int_prefetch): Set zero latency.
14161 2018-06-12 Eric Botcazou <ebotcazou@adacore.com>
14163 * gcc.c: Document new %@{...} sequence.
14164 (LINK_COMMAND_SPEC): Use it for the -L switches.
14165 (cpp_unique_options): Use it for the -I switches.
14166 (at_file_argbuf): New global variable.
14167 (in_at_file): Likewise.
14168 (alloc_args): Create at_file_argbuf.
14169 (clear_args): Truncate at_file_argbuf.
14170 (store_arg): If in_at_file, push the argument onto at_file_argbuf.
14171 (open_at_file): New function.
14172 (close_at_file): Likewise.
14173 (create_at_file): Delete.
14174 (do_spec_1) <'i'>: Use open_at_file/close_at_file.
14177 (validate_switches_from_spec): Deal with %@{...} sequence.
14178 (validate_switches): Likewise.
14179 (driver::finalize): Call clear_args.
14181 2018-06-11 Rasmus Villemoes <rasmus.villemoes@prevas.dk>
14183 * config/vx-common.h (USE_TM_CLONE_REGISTRY): #define to 0.
14185 2018-06-11 Martin Sebor <msebor@redhat.com>
14187 * doc/invoke.texi (-Wall): List -Wc++17-compat.
14188 (Wno-class-memaccess): Add @opindex.
14189 (Wno-templates, Wno-multiple-inheritance): Same.
14190 (Wno-virtual-inheritance, Wno-namespaces): Same.
14191 (Wno-pedantic, Wno-chkp, Wcoverage-mismatch): Same.
14192 (Wno-format-overflow, Wno-format-truncation): Same.
14193 (Wno-unused-local-typedefs, Walloc-size-larger-than): Same.
14194 (Wno-alloc-size-larger-than, Wframe-larger-than): Same
14195 (Wno-stack-usage, Wno-c++-compat, Wno-c++11-compat): Same.
14196 (Wno-c++14-compat, Wno-c++17-compat, Wno-openmp-simd): Same.
14197 (Wno-unsuffixed-float-constants, Wno-addr-space-convert): Same.
14198 (Wno-misspelled-isr): Same.
14200 2018-06-11 Martin Sebor <msebor@redhat.com>
14202 * PR tree-optimization/86083
14203 * tree-ssa-strlen.c (handle_char_store): Use tree_expr_nonzero_p.
14205 2018-06-11 Zhouyi Zhou <zhouzhouyi@gmail.com>
14207 * tree-eh.c (lower_eh_constructs_2): Add a comma to comment.
14209 2018-06-11 Segher Boessenkool <segher@kernel.crashing.org>
14212 * config/rs6000/rs6000.md (*movdi_internal32): Put constraint modifiers
14213 on the correct operand.
14214 (*movdi_internal64): Ditto.
14216 2018-06-11 Martin Liska <mliska@suse.cz>
14218 PR tree-optimization/86089
14219 * tree-ssa-strlen.c (get_string_length): Move back removed hunk.
14221 2018-06-11 Julia Koval <julia.koval@intel.com>
14223 * config/i386/vaesintrin.h (_mm_aesdec_epi128, _mm_aesdeclast_epi128)
14224 _mm_aesenc_epi128, _mm_aesenclast_epi128: Remove.
14225 * config/i386/vpclmulqdqintrin.h (_mm_clmulepi64_epi128): Remove.
14227 2018-06-11 Olivier Hainque <hainque@adacore.com>
14229 * dwarf2out.c (gen_compile_unit_die): Fallout to DW_LANG_Ada83
14230 for Ada with strict dwarf2.
14232 2018-06-08 Peter Bergner <bergner@vnet.ibm.com>
14235 * config/rs6000/rs6000.c (mem_operand_gpr): Enable PRE_INC and PRE_DEC
14238 2018-06-08 Jan Hubicka <hubicka@ucw.cz>
14240 * dumpfile.c (FIRST_ME_AUTO_NUMBERED_DUMP): Bump to 4.
14242 2018-06-08 David Edelsohn <dje.gcc@gmail.com>
14244 * config/rs6000/rs6000.c (rs6000_passes_ieee128): Protect with #if
14247 2018-06-08 Martin Liska <mliska@suse.cz>
14249 * tree-cfg.h (debug_function): Fix argument type to match
14252 2018-06-08 Martin Liska <mliska@suse.cz>
14254 * config/powerpcspe/powerpcspe.c (rs6000_xcoff_visibility):
14255 Remove usage of MPX-related (and removed) fields.
14256 * config/rs6000/rs6000.c (rs6000_xcoff_visibility): Likewise.
14258 2018-06-08 David Malcolm <dmalcolm@redhat.com>
14260 * cfg.c (debug): Use TDF_NONE rather than 0.
14261 * cfghooks.c (debug): Likewise.
14262 * dumpfile.c (DUMP_FILE_INFO): Likewise; also for OPTGROUP.
14263 (struct dump_option_value_info): Convert to...
14264 (struct kv_pair): ...this template type.
14265 (dump_options): Convert to kv_pair<dump_flags_t>; use TDF_NONE
14267 (optinfo_verbosity_options): Likewise.
14268 (optgroup_options): Convert to kv_pair<optgroup_flags_t>; use
14270 (gcc::dump_manager::dump_register): Use optgroup_flags_t rather
14271 than int for "optgroup_flags" param.
14272 (dump_generic_expr_loc): Use dump_flags_t rather than int for
14274 (dump_dec): Likewise.
14275 (dump_finish): Use TDF_NONE rather than 0.
14276 (gcc::dump_manager::opt_info_enable_passes): Use optgroup_flags_t
14277 rather than int for "optgroup_flags" param. Use TDF_NONE rather
14278 than 0. Update for change to option_ptr.
14279 (opt_info_switch_p_1): Convert "optgroup_flags" param from int *
14280 to optgroup_flags_t *. Use TDF_NONE and OPTGROUP_NONE rather than
14281 0. Update for changes to optinfo_verbosity_options and
14283 (opt_info_switch_p): Convert optgroup_flags from int to
14285 (dump_basic_block): Use dump_flags_t rather than int
14286 for "dump_kind" param.
14287 * dumpfile.h (TDF_ADDRESS, TDF_SLIM, TDF_RAW, TDF_DETAILS,
14288 TDF_STATS, TDF_BLOCKS, TDF_VOPS, TDF_LINENO, TDF_UID)
14289 TDF_STMTADDR, TDF_GRAPH, TDF_MEMSYMS, TDF_RHS_ONLY, TDF_ASMNAME,
14290 TDF_EH, TDF_NOUID, TDF_ALIAS, TDF_ENUMERATE_LOCALS, TDF_CSELIB,
14291 TDF_SCEV, TDF_GIMPLE, TDF_FOLDING, MSG_OPTIMIZED_LOCATIONS,
14292 MSG_MISSED_OPTIMIZATION, MSG_NOTE, MSG_ALL, TDF_COMPARE_DEBUG,
14293 TDF_NONE): Convert from macros to...
14294 (enum dump_flag): ...this new enum.
14295 (dump_flags_t): Update to use enum.
14296 (operator|, operator&, operator~, operator|=, operator&=):
14297 Implement for dump_flags_t.
14298 (OPTGROUP_NONE, OPTGROUP_IPA, OPTGROUP_LOOP, OPTGROUP_INLINE,
14299 OPTGROUP_OMP, OPTGROUP_VEC, OPTGROUP_OTHER, OPTGROUP_ALL):
14300 Convert from macros to...
14301 (enum optgroup_flag): ...this new enum.
14302 (optgroup_flags_t): New typedef.
14303 (operator|, operator|=): Implement for optgroup_flags_t.
14304 (struct dump_file_info): Convert field "alt_flags" to
14305 dump_flags_t. Convert field "optgroup_flags" to
14307 (dump_basic_block): Use dump_flags_t rather than int for param.
14308 (dump_generic_expr_loc): Likewise.
14309 (dump_dec): Likewise.
14310 (dump_register): Convert param "optgroup_flags" to
14312 (opt_info_enable_passes): Likewise.
14313 * early-remat.c (early_remat::dump_edge_list): Use TDF_NONE rather
14315 * gimple-pretty-print.c (debug): Likewise.
14316 * gimple-ssa-store-merging.c (bswap_replace): Likewise.
14317 (merged_store_group::apply_stores): Likewise.
14318 * gimple-ssa-strength-reduction.c (insert_initializers): Likewise.
14319 * gimple.c (verify_gimple_pp): Likewise.
14320 * graphite-poly.c (print_pbb_body): Likewise.
14321 * passes.c (pass_manager::register_one_dump_file): Convert
14322 local "optgroup_flags" to optgroup_flags_t.
14323 * print-tree.c (print_node): Use TDF_NONE rather than 0.
14325 (debug_body): Likewise.
14326 * tree-pass.h (struct pass_data): Convert field "optgroup_flags"
14327 to optgroup_flags_t.
14328 * tree-pretty-print.c (print_struct_decl): Use TDF_NONE rather
14330 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Likewise.
14331 (convert_mult_to_fma): Likewise.
14332 * tree-ssa-reassoc.c (undistribute_ops_list): Likewise.
14333 * tree-ssa-sccvn.c (vn_eliminate): Likewise.
14334 * tree-vect-data-refs.c (dump_lower_bound): Convert param
14335 "dump_kind" to dump_flags_t.
14337 2018-06-08 Segher Boessenkool <segher@kernel.crashing.org>
14339 * config/rs6000/rs6000.c (min, max): Delete.
14341 2018-06-08 Segher Boessenkool <segher@kernel.crashing.org>
14343 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete mention of
14344 -mabi=spe and -mabi=no-spe.
14346 2018-06-08 Martin Liska <mliska@suse.cz>
14348 * ipa-pure-const.c (propagate_pure_const): Use ::get at places
14349 where we expect an existing summary.
14351 2018-06-08 Martin Liska <mliska@suse.cz>
14353 * ipa-inline-analysis.c (simple_edge_hints): Use ::get method.
14354 * ipa-inline.h (estimate_edge_growth): Likewise.
14356 2018-06-08 Martin Liska <mliska@suse.cz>
14358 * cgraph.c (function_version_hasher::hash): Use
14359 cgraph_node::get_uid ().
14360 (function_version_hasher::equal):
14361 * cgraph.h (cgraph_node::get_uid): New method.
14362 * ipa-inline.c (update_caller_keys): Use
14363 cgraph_node::get_uid ().
14364 (update_callee_keys): Likewise.
14365 * ipa-utils.c (searchc): Likewise.
14366 (ipa_reduced_postorder): Likewise.
14367 * lto-cgraph.c (input_node): Likewise.
14368 * passes.c (is_pass_explicitly_enabled_or_disabled): Likewise.
14369 * symbol-summary.h (symtab_insertion): Likewise.
14370 (symtab_removal): Likewise.
14371 (symtab_duplication): Likewise.
14372 * tree-pretty-print.c (dump_function_header): Likewise.
14373 * tree-sra.c (convert_callers_for_node): Likewise.
14375 2018-06-08 Martin Liska <mliska@suse.cz>
14377 * cgraph.c (symbol_table::create_edge): Always assign a new
14379 (symbol_table::free_edge): Do not recycle numbers.
14380 * cgraph.h (cgraph_edge::get): New method.
14381 * symbol-summary.h (symtab_removal): Use it.
14382 (symtab_duplication): Likewise.
14383 (call_summary::hashable_uid): Remove.
14385 2018-06-08 Martin Liska <mliska@suse.cz>
14387 * ipa-inline-analysis.c (inline_edge_removal_hook): Remove.
14388 (initialize_growth_caches): Remove.
14389 (free_growth_caches): Likewise.
14390 (do_estimate_edge_time): Use edge_growth_cache.
14391 (do_estimate_edge_size): Likewise.
14392 (do_estimate_edge_hints): Likewise.
14393 * ipa-inline.c (reset_edge_caches): Likewise.
14394 (recursive_inlining): Likewise.
14395 (inline_small_functions): Likewise.
14396 * ipa-inline.h (initialize_growth_caches): Remove.
14397 (estimate_edge_size): Likewise.
14398 (estimate_edge_time): Likewise.
14399 (estimate_edge_hints): Likewise.
14400 (reset_edge_growth_cache): Likewise.
14401 * symbol-summary.h (call_summary::remove): New method.
14403 2018-06-08 Martin Liska <mliska@suse.cz>
14405 * ipa-cp.c (class edge_clone_summary): New summary.
14406 (grow_edge_clone_vectors): Remove.
14407 (ipcp_edge_duplication_hook): Remove.
14408 (class edge_clone_summary_t): New call_summary class.
14409 (ipcp_edge_removal_hook): Remove.
14410 (edge_clone_summary_t::duplicate): New function.
14411 (get_next_cgraph_edge_clone): Use edge_clone_summaries.
14412 (create_specialized_node): Likewise.
14413 (ipcp_driver): Initialize edge_clone_summaries and do not
14416 2018-06-08 Martin Liska <mliska@suse.cz>
14418 * symbol-summary.h (get): New function.
14419 (call_summary::m_initialize_when_cloning): New class member.
14421 2018-06-08 Martin Liska <mliska@suse.cz>
14423 * cgraph.c (cgraph_node::remove): Do not recycle uid.
14424 * cgraph.h (symbol_table::release_symbol): Do not pass uid.
14425 (symbol_table::allocate_cgraph_symbol): Do not set uid.
14426 * passes.c (uid_hash_t): Record removed_nodes by their uids.
14427 (remove_cgraph_node_from_order): Use the removed_nodes set.
14428 (do_per_function_toporder): Likwise.
14429 * symbol-summary.h (symtab_insertion): Use cgraph_node::uid
14430 instead of summary_uid.
14431 (symtab_removal): Likewise.
14432 (symtab_duplication): Likewise.
14434 2018-06-08 Martin Liska <mliska@suse.cz>
14436 * ipa-cp.c (ipcp_store_bits_results): Use
14437 ipcp_transformation_sum.
14438 (ipcp_store_vr_results): Likewise.
14439 * ipa-prop.c (ipcp_grow_transformations_if_necessary): Renamed
14441 (ipcp_transformation_initialize): ... this.
14442 (ipa_set_node_agg_value_chain):
14443 (ipa_node_params_t::duplicate): Use ipcp_transformation_sum.
14444 (write_ipcp_transformation_info): Likewise.
14445 (read_ipcp_transformation_info): Likewise.
14446 (ipcp_update_bits): Likewise.
14447 (ipcp_update_vr): Likewise.
14448 (ipcp_transform_function): Likewise.
14449 * ipa-prop.h: Rename ipcp_transformation_summary to
14450 ipcp_transformation.
14451 (class ipcp_transformation_t): New function summary.
14452 (ipcp_get_transformation_summary): Use ipcp_transformation_sum.
14453 (ipa_get_agg_replacements_for_node): Likewise.
14455 2018-06-08 Martin Liska <mliska@suse.cz>
14457 * ipa-pure-const.c (struct funct_state_d): Do it class instead
14459 (class funct_state_summary_t): New function_summary class.
14460 (has_function_state): Remove.
14461 (get_function_state): Likewise.
14462 (set_function_state): Likewise.
14463 (add_new_function): Likewise.
14464 (funct_state_summary_t::insert): New function.
14465 (duplicate_node_data): Remove.
14466 (remove_node_data): Remove.
14467 (funct_state_summary_t::duplicate): New function.
14468 (register_hooks): Create new funct_state_summaries.
14469 (pure_const_generate_summary): Use it.
14470 (pure_const_write_summary): Likewise.
14471 (pure_const_read_summary): Likewise.
14472 (propagate_pure_const): Likewise.
14473 (propagate_nothrow): Likewise.
14474 (dump_malloc_lattice): Likewise.
14475 (propagate_malloc): Likewise.
14476 (execute): Do not register hooks, just remove summary
14478 (pass_ipa_pure_const::pass_ipa_pure_const): Simplify
14481 2018-06-08 Martin Liska <mliska@suse.cz>
14483 * ipa-reference.c (remove_node_data): Remove.
14484 (duplicate_node_data): Likewise.
14485 (class ipa_ref_var_info_summary_t): New class.
14486 (class ipa_ref_opt_summary_t): Likewise.
14487 (get_reference_vars_info): Use ipa_ref_var_info_summaries.
14488 (get_reference_optimization_summary): Use
14489 ipa_ref_opt_sum_summaries.
14490 (set_reference_vars_info): Remove.
14491 (set_reference_optimization_summary): Likewise.
14492 (ipa_init): Create summaries.
14493 (init_function_info): Use function summary.
14494 (ipa_ref_opt_summary_t::duplicate): New function.
14495 (ipa_ref_opt_summary_t::remove): New function.
14496 (get_read_write_all_from_node): Fix GNU coding style.
14497 (propagate): Use function summary.
14498 (write_node_summary_p): Fix GNU coding style.
14499 (stream_out_bitmap): Likewise.
14500 (ipa_reference_read_optimization_summary): Use function summary.
14501 (ipa_reference_c_finalize): Do not release hooks.
14503 2018-06-08 Martin Liska <mliska@suse.cz>
14505 * ipa-fnsummary.c (dump_ipa_call_summary): Use ::get method.
14506 (analyze_function_body): Extract multiple calls of get_create.
14507 * ipa-inline-analysis.c (simple_edge_hints): Likewise.
14508 * ipa-inline.c (recursive_inlining): Use ::get method.
14509 * ipa-inline.h (estimate_edge_growth): Likewise.
14511 2018-06-08 Martin Liska <mliska@suse.cz>
14513 * hsa-common.h (enum hsa_function_kind): Rename HSA_NONE to
14515 (hsa_function_summary::hsa_function_summary): Use the new enum
14517 (hsa_gpu_implementation_p): Use hsa_summaries::get.
14518 * hsa-gen.c (hsa_get_host_function): Likewise.
14519 (get_brig_function_name): Likewise.
14520 * ipa-hsa.c (process_hsa_functions): Likewise.
14521 (ipa_hsa_write_summary): Likewise.
14522 * symbol-summary.h (symtab_duplication): Use ::get function/
14523 (get): New function.
14525 2018-06-08 Martin Liska <mliska@suse.cz>
14527 * config/i386/i386.c (ix86_can_inline_p): Use get_create instead
14529 * hsa-common.c (hsa_summary_t::link_functions): Likewise.
14530 (hsa_register_kernel): Likewise.
14531 * hsa-common.h (hsa_gpu_implementation_p): Likewise.
14532 * hsa-gen.c (hsa_get_host_function): Likewise.
14533 (get_brig_function_name): Likewise.
14534 (generate_hsa): Likewise.
14535 (pass_gen_hsail::execute): Likewise.
14536 * ipa-cp.c (ipcp_cloning_candidate_p): Likewise.
14537 (devirtualization_time_bonus): Likewise.
14538 (ipcp_propagate_stage): Likewise.
14539 * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
14540 (edge_set_predicate): Likewise.
14541 (evaluate_conditions_for_known_args): Likewise.
14542 (evaluate_properties_for_edge): Likewise.
14543 (ipa_fn_summary::reset): Likewise.
14544 (ipa_fn_summary_t::duplicate): Likewise.
14545 (dump_ipa_call_summary): Likewise.
14546 (ipa_dump_fn_summary): Likewise.
14547 (analyze_function_body): Likewise.
14548 (compute_fn_summary): Likewise.
14549 (estimate_edge_devirt_benefit): Likewise.
14550 (estimate_edge_size_and_time): Likewise.
14551 (estimate_calls_size_and_time): Likewise.
14552 (estimate_node_size_and_time): Likewise.
14553 (inline_update_callee_summaries): Likewise.
14554 (remap_edge_change_prob): Likewise.
14555 (remap_edge_summaries): Likewise.
14556 (ipa_merge_fn_summary_after_inlining): Likewise.
14557 (ipa_update_overall_fn_summary): Likewise.
14558 (read_ipa_call_summary): Likewise.
14559 (inline_read_section): Likewise.
14560 (write_ipa_call_summary): Likewise.
14561 (ipa_fn_summary_write): Likewise.
14562 (ipa_free_fn_summary): Likewise.
14563 * ipa-hsa.c (process_hsa_functions): Likewise.
14564 (ipa_hsa_write_summary): Likewise.
14565 (ipa_hsa_read_section): Likewise.
14566 * ipa-icf.c (sem_function::merge): Likewise.
14567 * ipa-inline-analysis.c (simple_edge_hints): Likewise.
14568 (do_estimate_edge_time): Likewise.
14569 (estimate_size_after_inlining): Likewise.
14570 (estimate_growth): Likewise.
14571 (growth_likely_positive): Likewise.
14572 * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
14573 (inline_call): Likewise.
14574 * ipa-inline.c (caller_growth_limits): Likewise.
14575 (can_inline_edge_p): Likewise.
14576 (can_inline_edge_by_limits_p): Likewise.
14577 (compute_uninlined_call_time): Likewise.
14578 (compute_inlined_call_time): Likewise.
14579 (want_inline_small_function_p): Likewise.
14580 (edge_badness): Likewise.
14581 (update_caller_keys): Likewise.
14582 (update_callee_keys): Likewise.
14583 (recursive_inlining): Likewise.
14584 (inline_small_functions): Likewise.
14585 (inline_to_all_callers_1): Likewise.
14586 (dump_overall_stats): Likewise.
14587 (early_inline_small_functions): Likewise.
14588 (early_inliner): Likewise.
14589 * ipa-inline.h (estimate_edge_growth): Likewise.
14590 * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
14591 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
14592 * ipa-prop.h (IPA_NODE_REF): Likewise.
14593 (IPA_EDGE_REF): Likewise.
14594 * ipa-pure-const.c (malloc_candidate_p): Likewise.
14595 (propagate_malloc): Likewise.
14596 * ipa-split.c (execute_split_functions): Likewise.
14597 * symbol-summary.h: Rename get to get_create.
14599 (get_create): Likewise.
14600 * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
14602 2018-06-08 Martin Liska <mliska@suse.cz>
14604 * symbol-summary.h (release): Move definition out of class
14606 (symtab_removal): Likewise.
14607 (symtab_duplication): Likewise.
14609 2018-06-08 Martin Liska <mliska@suse.cz>
14611 * symbol-summary.h (function_summary): Move constructor
14612 implementation out of class declaration.
14613 (release): Likewise.
14614 (symtab_insertion): Likewise.
14615 (symtab_removal): Likewise.
14616 (symtab_duplication): Likewise.
14619 2018-06-08 Martin Liska <mliska@suse.cz>
14621 * Makefile.in: Remove support for MPX (macros, related functions,
14622 fields in cgraph_node, ...).
14623 * builtin-types.def (BT_BND): Likewise.
14624 (BT_FN_BND_CONST_PTR): Likewise.
14625 (BT_FN_CONST_PTR_BND): Likewise.
14626 (BT_FN_VOID_PTR_BND): Likewise.
14627 (BT_FN_BND_CONST_PTR_SIZE): Likewise.
14628 (BT_FN_VOID_CONST_PTR_BND_CONST_PTR): Likewise.
14629 * builtins.c (expand_builtin_memcpy_with_bounds): Likewise.
14630 (expand_builtin_mempcpy_with_bounds): Likewise.
14631 (expand_builtin_memset_with_bounds): Likewise.
14632 (expand_builtin_memset_args): Likewise.
14633 (std_expand_builtin_va_start): Likewise.
14634 (expand_builtin): Likewise.
14635 (expand_builtin_with_bounds): Likewise.
14636 * builtins.def (DEF_BUILTIN_CHKP): Likewise.
14637 (DEF_LIB_BUILTIN_CHKP): Likewise.
14638 (DEF_EXT_LIB_BUILTIN_CHKP): Likewise.
14639 (DEF_CHKP_BUILTIN): Likewise.
14640 (BUILT_IN_MEMCPY): Likewise.
14641 (BUILT_IN_MEMMOVE): Likewise.
14642 (BUILT_IN_MEMPCPY): Likewise.
14643 (BUILT_IN_MEMSET): Likewise.
14644 (BUILT_IN_STPCPY): Likewise.
14645 (BUILT_IN_STRCAT): Likewise.
14646 (BUILT_IN_STRCHR): Likewise.
14647 (BUILT_IN_STRCPY): Likewise.
14648 (BUILT_IN_STRLEN): Likewise.
14649 (BUILT_IN_MEMCPY_CHK): Likewise.
14650 (BUILT_IN_MEMMOVE_CHK): Likewise.
14651 (BUILT_IN_MEMPCPY_CHK): Likewise.
14652 (BUILT_IN_MEMSET_CHK): Likewise.
14653 (BUILT_IN_STPCPY_CHK): Likewise.
14654 (BUILT_IN_STRCAT_CHK): Likewise.
14655 (BUILT_IN_STRCPY_CHK): Likewise.
14656 * calls.c (store_bounds): Likewise.
14657 (emit_call_1): Likewise.
14658 (special_function_p): Likewise.
14659 (maybe_warn_nonstring_arg): Likewise.
14660 (initialize_argument_information): Likewise.
14661 (finalize_must_preallocate): Likewise.
14662 (compute_argument_addresses): Likewise.
14663 (expand_call): Likewise.
14664 * cfgexpand.c (expand_call_stmt): Likewise.
14665 (expand_return): Likewise.
14666 (expand_gimple_stmt_1): Likewise.
14667 (pass_expand::execute): Likewise.
14668 * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Likewise.
14669 (cgraph_node::remove): Likewise.
14670 (cgraph_node::dump): Likewise.
14671 (cgraph_node::verify_node): Likewise.
14672 * cgraph.h (chkp_function_instrumented_p): Likewise.
14673 (symtab_node::get_alias_target): Likewise.
14674 (cgraph_node::can_remove_if_no_direct_calls_and_refs_p): Likewise.
14675 (cgraph_local_p): Likewise.
14676 * cgraphbuild.c (cgraph_edge::rebuild_edges): Likewise.
14677 (cgraph_edge::rebuild_references): Likewise.
14678 * cgraphunit.c (varpool_node::finalize_decl): Likewise.
14679 (walk_polymorphic_call_targets): Likewise.
14680 (cgraph_node::expand_thunk): Likewise.
14681 (symbol_table::output_weakrefs): Likewise.
14682 * common/config/i386/i386-common.c (OPTION_MASK_ISA2_GENERAL_REGS_ONLY_UNSET): Likewise.
14683 (ix86_handle_option): Likewise.
14684 * config/i386/constraints.md: Likewise.
14685 * config/i386/i386-builtin-types.def (BND): Likewise.
14689 * config/i386/i386-builtin.def (BDESC_END): Likewise.
14690 (BDESC_FIRST): Likewise.
14692 * config/i386/i386-c.c (ix86_target_macros_internal): Likewise.
14693 * config/i386/i386-protos.h (ix86_bnd_prefixed_insn_p): Likewise.
14694 * config/i386/i386.c (enum reg_class): Likewise.
14695 (ix86_target_string): Likewise.
14696 (ix86_option_override_internal): Likewise.
14697 (ix86_conditional_register_usage): Likewise.
14698 (ix86_valid_target_attribute_inner_p): Likewise.
14699 (ix86_set_indirect_branch_type): Likewise.
14700 (ix86_set_current_function): Likewise.
14701 (ix86_function_arg_regno_p): Likewise.
14702 (init_cumulative_args): Likewise.
14703 (ix86_function_arg_advance): Likewise.
14704 (ix86_function_arg): Likewise.
14705 (ix86_pass_by_reference): Likewise.
14706 (ix86_function_value_regno_p): Likewise.
14707 (ix86_function_value_1): Likewise.
14708 (ix86_function_value_bounds): Likewise.
14709 (ix86_return_in_memory): Likewise.
14710 (ix86_setup_incoming_vararg_bounds): Likewise.
14711 (ix86_va_start): Likewise.
14712 (indirect_thunk_need_prefix): Likewise.
14713 (print_reg): Likewise.
14714 (ix86_print_operand): Likewise.
14715 (ix86_expand_call): Likewise.
14716 (ix86_output_function_return): Likewise.
14717 (reg_encoded_number): Likewise.
14718 (BDESC_VERIFYS): Likewise.
14719 (ix86_init_mpx_builtins): Likewise.
14720 (ix86_init_builtins): Likewise.
14721 (ix86_emit_cmove): Likewise.
14722 (ix86_emit_move_max): Likewise.
14723 (ix86_expand_builtin): Likewise.
14724 (ix86_builtin_mpx_function): Likewise.
14725 (ix86_get_arg_address_for_bt): Likewise.
14726 (ix86_load_bounds): Likewise.
14727 (ix86_store_bounds): Likewise.
14728 (ix86_load_returned_bounds): Likewise.
14729 (ix86_store_returned_bounds): Likewise.
14730 (ix86_class_likely_spilled_p): Likewise.
14731 (ix86_hard_regno_mode_ok): Likewise.
14732 (x86_order_regs_for_local_alloc): Likewise.
14733 (ix86_mitigate_rop): Likewise.
14734 (ix86_bnd_prefixed_insn_p): Likewise.
14735 (ix86_mpx_bound_mode): Likewise.
14736 (ix86_make_bounds_constant): Likewise.
14737 (ix86_initialize_bounds): Likewise.
14738 (TARGET_LOAD_BOUNDS_FOR_ARG): Likewise.
14739 (TARGET_STORE_BOUNDS_FOR_ARG): Likewise.
14740 (TARGET_LOAD_RETURNED_BOUNDS): Likewise.
14741 (TARGET_STORE_RETURNED_BOUNDS): Likewise.
14742 (TARGET_CHKP_BOUND_MODE): Likewise.
14743 (TARGET_BUILTIN_CHKP_FUNCTION): Likewise.
14744 (TARGET_CHKP_FUNCTION_VALUE_BOUNDS): Likewise.
14745 (TARGET_CHKP_MAKE_BOUNDS_CONSTANT): Likewise.
14746 (TARGET_CHKP_INITIALIZE_BOUNDS): Likewise.
14747 * config/i386/i386.h (TARGET_MPX): Likewise.
14748 (TARGET_MPX_P): Likewise.
14749 (VALID_BND_REG_MODE): Likewise.
14750 (FIRST_BND_REG): Likewise.
14751 (LAST_BND_REG): Likewise.
14752 (enum reg_class): Likewise.
14753 (BND_REG_P): Likewise.
14754 (BND_REGNO_P): Likewise.
14755 (BNDmode): Likewise.
14756 (ADJUST_INSN_LENGTH): Likewise.
14757 * config/i386/i386.md: Likewise.
14758 * config/i386/i386.opt: Likewise.
14759 * config/i386/linux-common.h (LIBMPX_LIBS): Likewise.
14760 (defined): Likewise.
14761 (LINK_MPX): Likewise.
14762 (MPX_SPEC): Likewise.
14763 (LIBMPX_SPEC): Likewise.
14764 (LIBMPXWRAPPERS_SPEC): Likewise.
14765 (CHKP_SPEC): Likewise.
14766 * config/i386/predicates.md: Likewise.
14767 * dbxout.c (dbxout_type): Likewise.
14768 * doc/extend.texi: Likewise.
14769 * doc/invoke.texi: Likewise.
14770 * doc/md.texi: Likewise.
14771 * doc/tm.texi: Likewise.
14772 * doc/tm.texi.in: Likewise.
14773 * dwarf2out.c (is_base_type): Likewise.
14774 (gen_formal_types_die): Likewise.
14775 (gen_subprogram_die): Likewise.
14776 (gen_type_die_with_usage): Likewise.
14777 (gen_decl_die): Likewise.
14778 (dwarf2out_late_global_decl): Likewise.
14779 * expr.c (expand_assignment): Likewise.
14780 (emit_storent_insn): Likewise.
14781 (store_expr_with_bounds): Likewise.
14782 (store_expr): Likewise.
14783 (expand_expr_real_1): Likewise.
14784 * expr.h (store_expr_with_bounds): Likewise.
14785 * function.c (use_register_for_decl): Likewise.
14786 (struct bounds_parm_data): Likewise.
14787 (assign_parms_augmented_arg_list): Likewise.
14788 (assign_parm_find_entry_rtl): Likewise.
14789 (assign_parm_is_stack_parm): Likewise.
14790 (assign_parm_load_bounds): Likewise.
14791 (assign_bounds): Likewise.
14792 (assign_parms): Likewise.
14793 (expand_function_start): Likewise.
14794 * gcc.c (CHKP_SPEC): Likewise.
14795 * gimple-fold.c (gimple_fold_builtin_memory_op): Likewise.
14796 * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Likewise.
14797 (wrestrict_dom_walker::check_call): Likewise.
14798 * gimple.c (gimple_build_call_from_tree): Likewise.
14799 * gimple.h (enum gf_mask): Likewise.
14800 (gimple_call_with_bounds_p): Likewise.
14801 (gimple_call_set_with_bounds): Likewise.
14802 * gimplify.c (gimplify_init_constructor): Likewise.
14803 * ipa-cp.c (initialize_node_lattices): Likewise.
14804 (propagate_constants_across_call): Likewise.
14805 (find_more_scalar_values_for_callers_subset): Likewise.
14806 * ipa-hsa.c (process_hsa_functions): Likewise.
14807 * ipa-icf-gimple.c (func_checker::compare_gimple_call): Likewise.
14808 * ipa-icf.c (sem_function::merge): Likewise.
14809 * ipa-inline.c (early_inliner): Likewise.
14810 * ipa-pure-const.c (warn_function_noreturn): Likewise.
14811 (warn_function_cold): Likewise.
14812 (propagate_pure_const): Likewise.
14813 * ipa-ref.h (enum GTY): Likewise.
14814 * ipa-split.c (find_retbnd): Likewise.
14815 (consider_split): Likewise.
14816 (split_function): Likewise.
14817 * ipa-visibility.c (cgraph_externally_visible_p): Likewise.
14818 * ipa.c (walk_polymorphic_call_targets): Likewise.
14819 (symbol_table::remove_unreachable_nodes): Likewise.
14820 (process_references): Likewise.
14821 (cgraph_build_static_cdtor_1): Likewise.
14822 * lto-cgraph.c (lto_output_node): Likewise.
14823 (output_refs): Likewise.
14824 (compute_ltrans_boundary): Likewise.
14825 (input_overwrite_node): Likewise.
14826 (input_node): Likewise.
14827 (input_cgraph_1): Likewise.
14828 * params.def (PARAM_CHKP_MAX_CTOR_SIZE): Likewise.
14829 * passes.c (pass_manager::execute_early_local_passes): Likewise.
14830 (class pass_chkp_instrumentation_passes): Likewise.
14831 (make_pass_chkp_instrumentation_passes): Likewise.
14832 * passes.def: Likewise.
14833 * rtl.h (struct GTY): Likewise.
14834 (CALL_EXPR_WITH_BOUNDS_P): Likewise.
14835 * stor-layout.c (layout_type): Likewise.
14836 * symtab.c: Likewise.
14837 * target.def: Likewise.
14838 * targhooks.c (default_chkp_bound_type): Likewise.
14839 (default_chkp_bound_mode): Likewise.
14840 (default_builtin_chkp_function): Likewise.
14841 (default_chkp_function_value_bounds): Likewise.
14842 (default_chkp_make_bounds_constant): Likewise.
14843 (default_chkp_initialize_bounds): Likewise.
14844 * targhooks.h (default_chkp_bound_type): Likewise.
14845 (default_chkp_bound_mode): Likewise.
14846 (default_builtin_chkp_function): Likewise.
14847 (default_chkp_function_value_bounds): Likewise.
14848 (default_chkp_make_bounds_constant): Likewise.
14849 (default_chkp_initialize_bounds): Likewise.
14850 * toplev.c (compile_file): Likewise.
14851 (process_options): Likewise.
14852 * tree-core.h (DEF_BUILTIN): Likewise.
14853 (DEF_BUILTIN_CHKP): Likewise.
14854 * tree-inline.c (declare_return_variable): Likewise.
14855 (remap_gimple_stmt): Likewise.
14856 (copy_bb): Likewise.
14857 (initialize_inlined_parameters): Likewise.
14858 (expand_call_inline): Likewise.
14859 * tree-pass.h (make_pass_ipa_chkp_versioning): Likewise.
14860 (make_pass_ipa_chkp_early_produce_thunks): Likewise.
14861 (make_pass_ipa_chkp_produce_thunks): Likewise.
14862 (make_pass_chkp): Likewise.
14863 (make_pass_chkp_opt): Likewise.
14864 (make_pass_chkp_instrumentation_passes): Likewise.
14865 * tree-pretty-print.c (dump_generic_node): Likewise.
14866 * tree-ssa-ccp.c (insert_clobber_before_stack_restore): Likewise.
14867 * tree-ssa-dce.c (propagate_necessity): Likewise.
14868 (eliminate_unnecessary_stmts): Likewise.
14869 * tree-ssa-pre.c (create_expression_by_pieces): Likewise.
14870 * tree-ssa-sccvn.c (copy_reference_ops_from_call): Likewise.
14871 * tree-ssa-sccvn.h: Likewise.
14872 * tree-ssa-strlen.c (get_string_length): Likewise.
14873 (valid_builtin_call): Likewise.
14874 (adjust_last_stmt): Likewise.
14875 (handle_builtin_strchr): Likewise.
14876 (handle_builtin_strcpy): Likewise.
14877 (handle_builtin_stxncpy): Likewise.
14878 (handle_builtin_memcpy): Likewise.
14879 (handle_builtin_strcat): Likewise.
14880 (strlen_check_and_optimize_stmt): Likewise.
14881 * tree-stdarg.c (expand_ifn_va_arg_1): Likewise.
14882 * tree-streamer-in.c: Likewise.
14883 * tree-streamer.c (record_common_node): Likewise.
14884 * tree.c (tree_code_size): Likewise.
14885 (wide_int_to_tree_1): Likewise.
14886 (type_contains_placeholder_1): Likewise.
14887 (build_common_tree_nodes): Likewise.
14888 * tree.def (POINTER_BOUNDS_TYPE): Likewise.
14889 * tree.h (POINTER_BOUNDS_TYPE_P): Likewise.
14890 (POINTER_BOUNDS_P): Likewise.
14891 (BOUNDED_TYPE_P): Likewise.
14892 (BOUNDED_P): Likewise.
14893 (CALL_WITH_BOUNDS_P): Likewise.
14894 (pointer_bounds_type_node): Likewise.
14895 * value-prof.c (gimple_ic): Likewise.
14896 * var-tracking.c (vt_add_function_parameters): Likewise.
14897 * varasm.c (make_decl_rtl): Likewise.
14898 (assemble_start_function): Likewise.
14899 (output_constant): Likewise.
14900 (maybe_assemble_visibility): Likewise.
14901 * varpool.c (ctor_for_folding): Likewise.
14902 * chkp-builtins.def: Remove.
14903 * ipa-chkp.c: Remove.
14904 * ipa-chkp.h: Remove.
14905 * rtl-chkp.c: Remove.
14906 * rtl-chkp.h: Remove.
14907 * tree-chkp-opt.c: Remove.
14908 * tree-chkp.c: Remove.
14909 * tree-chkp.h: Remove.
14911 2018-06-07 Carl Love <cel@us.ibm.com>
14913 * config/rs6000/vsx.md (vextract_fp_from_shorth,
14914 vextract_fp_from_shortl): Add BE support.
14916 2018-06-07 Paul Koning <ni1d@arrl.net>
14918 * compare-elim.c (try_merge_compare): Don't merge compare if
14919 address contains a side effect.
14920 (try_eliminate_compare): Likewise.
14922 2018-06-07 Olga Makhotina <olga.makhotina@intel.com>
14924 * config.gcc: Support "tremont".
14925 * config/i386/driver-i386.c (host_detect_local_cpu): Detect "tremont".
14926 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
14928 * config/i386/i386.c (m_TREMONT): Define.
14929 (processor_target_table): Add "tremont".
14930 (PTA_TREMONT): Define.
14931 (ix86_lea_outperforms): Add TARGET_TREMONT.
14932 (get_builtin_code_for_version): Handle PROCESSOR_TREMONT.
14933 (fold_builtin_cpu): Add M_INTEL_TREMONT, replace M_INTEL_GOLDMONT
14934 and M_INTEL_GOLDMONT_PLUS.
14935 (fold_builtin_cpu): Add "tremont".
14936 (ix86_add_stmt_cost): Add TARGET_TREMONT.
14937 (ix86_option_override_internal): Add "tremont".
14938 * config/i386/i386.h (processor_costs): Define TARGET_TREMONT.
14939 (processor_type): Add PROCESSOR_TREMONT.
14940 * config/i386/x86-tune.def: Add m_TREMONT.
14941 * doc/invoke.texi: Add tremont as x86 -march=/-mtune= CPU type.
14943 2018-06-07 Jozef Lawrynowicz <jozef.l@mittosystems.com>
14945 * config/msp430/msp430.c (msp430_mcu_name): Set the "i" in the
14946 symbol defined for msp430i* devices to be lower case.
14948 2018-06-07 Richard Biener <rguenther@suse.de>
14950 * graphite-sese-to-poly.c (extract_affine): Avoid unneded
14951 wrapping. Properly wrap the result of a BIT_NOT_EXPR.
14952 Properly wrap signed arithmetic if overflow wraps.
14954 2018-06-07 Jakub Jelinek <jakub@redhat.com>
14956 PR tree-optimization/69615
14957 * tree-ssa-reassoc.c (optimize_range_tests_var_bound): If rhs2 is lhs
14958 of a cast from a same precision integral SSA_NAME in a bb dominated
14959 by first_bb, retry with rhs2 set to the rhs1 of the cast. Don't emit
14960 cast to utype if rhs2 has already a compatible type.
14962 2018-06-07 Richard Biener <rguenther@suse.de>
14964 PR tree-optimization/85935
14965 * graphite-scop-detection.c (find_params_in_bb): Analyze
14966 condition operands with respect to the correct loop. Assert
14967 the analysis doesn't fail.
14969 2018-06-04 Carl Love <cel@us.ibm.com>
14971 * config/rs6000/vsx.md (first_match_index_<mode>): Calculate index
14972 using natural element order. Use gen_lshrsi3 instead of gen_ashrsi3
14973 as it is slightly cheaper.
14974 (first_match_or_eos_index_<mode>):
14975 Calculate index using natural element order.
14976 (first_match_index_<mode>):
14977 Calculate index using natural element order.
14978 (first_match_or_eos_index_<mode>):
14979 Calculate index using natural order.
14980 (define_insn vclzlsbb): Change to define_insn vclzlsbb_<mode>.
14981 for BE and LE modes.
14982 * config/rs6000/rs6000-c.c: Rename P9V_BUILTIN_VCLZLSBB,
14983 P9V_BUILTIN_VCLZLSBB_V16QI.
14984 * config/rs6000/rs6000-builtin.def: Make VCLZLSBB mode
14987 2018-06-06 Kelvin Nilsen <kelvin@gcc.gnu.org>
14989 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Adjust
14990 indentation and line wrap for many prototypes. Add missing
14991 @smallexample directives around block of prototypes for vec_xl and
14994 2018-06-05 Michael Meissner <meissner@linux.ibm.com>
14996 * config/rs6000/rs6000.c (rs6000_passes_ieee128): New boolean to
14997 track if we pass or return IEEE 128-bit floating point.
14998 (ieee128_mangling_gcc_8_1): New boolean to say whether to generate
14999 C++ mangling that is compatible with GCC 8.1.
15000 (TARGET_ASM_GLOBALIZE_DECL_NAME): Override target hook.
15001 (init_cumulative_args): Note if we pass or return IEEE 128-bit
15002 floating point types.
15003 (rs6000_function_arg_advance_1): Likewise.
15004 (rs6000_mangle_type): Optionally generate mangled names that match
15005 what GCC 8.1 generated for IEEE 128-bit floating point types.
15006 (rs6000_globalize_decl_name): If we have an external function that
15007 passes or returns IEEE 128-bit types, generate a weak reference
15008 from the mangled name used in GCC 8.1 to the current mangled
15010 (rs6000_init_builtins): Make __ibm128 use the long double type if
15011 long double is IBM extended double. Make __float128 use the long
15012 double type if long double is IEEE 128-bit.
15015 * config/rs6000/rs6000-builtin.def (BU_IBM128_2): New helper
15016 macro for __ibm128 built-in functions.
15017 (PACK_IF): Add __ibm128 pack/unpack functions.
15018 (UNPACK_IF): Likewise.
15019 * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Do not
15020 enable long double built-in functions if long double is IEEE
15021 128-bit floating point.
15022 (rs6000_invalid_builtin): Update long double built-in function
15024 (rs6000_expand_builtin): For PACK_IF and UNPACK_IF built-in
15025 functions, adjust the built-in function to use the long double
15026 built-in function if __ibm128 and long double are the same type.
15027 * doc/extend.texi (PowerPC builtins): Update documention for
15028 __builtin_{,un}pack_longdouble. Add documentation for
15029 __builtin_{,un}pack_ibm128.
15031 2018-06-06 Jim Wilson <jimw@sifive.com>
15033 * config/riscv/riscv.c (enum riscv_privilege_levels): New.
15034 (struct machine_function): New field interrupt_mode.
15035 (riscv_handle_type_attribute): New function. Add forward declaration.
15036 (riscv_attribute_table) <interrupt>: Use riscv_handle_type_attribute.
15037 (riscv_expand_epilogue): Check interrupt_mode field.
15038 (riscv_set_current_function): Check interrupt attribute args and
15039 set interrupt_mode field.
15040 * config/riscv/riscv.md (UNSPECV_SRET, UNSPECV_URET): New.
15041 (riscv_sret, riscv_uret): New.
15042 * doc/extend.texi (RISC-V Function Attributes) <interrupt>: Document
15043 new arguments to interrupt attribute.
15045 2018-06-06 Peter Bergner <bergner@vnet.ibm.com>
15048 * /config/rs6000/rs6000.h (ASM_CPU_SPEC): Add support for -mpower9.
15049 Don't handle -mcpu=power8 if -mpower9-vector is also used.
15051 2018-06-06 Kelvin Nilsen <kelvin@gcc.gnu.org>
15053 * config/rs6000/rs6000-builtin.def (VSX_BUILTIN_VEC_LD,
15054 VSX_BUILTIN_VEC_ST): Add comment to explain non-traditional uses.
15055 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
15056 several redundant entries.
15058 2018-06-06 David Malcolm <dmalcolm@redhat.com>
15060 * config/i386/i386-protos.h (ix86_expand_call): Strengthen return
15061 type from "rtx" to "rtx_insn *".
15062 * config/i386/i386.c (ix86_expand_split_stack_prologue): Likewise
15063 for local "call_insn", removing cast.
15064 (ix86_expand_call): Likewise, introducing a "call_insn" local.
15066 2018-06-06 Eric Botcazou <ebotcazou@adacore.com>
15068 PR tree-optimization/86066
15069 * gimple-ssa-store-merging.c (process_store): Do not bypass BIT_NOT_EXPR
15070 for BIT_INSERT_EXPR stores.
15072 2018-06-06 Richard Biener <rguenther@suse.de>
15074 PR tree-optimization/86062
15075 * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
15076 component refs ontop
15077 of to be offsetted base.
15079 2018-06-06 Jozef Lawrynowicz <jozef.l@mittosystems.com>
15081 * config/msp430/msp430.c (msp430_attr): Allow interrupt handlers
15082 to be static and remove check on interrupt attribute name.
15084 2018-06-05 Kelvin Nilsen <kelvin@gcc.gnu.org>
15086 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
15087 volatile qualifier from vec_lvsl and vec_lvsr argument prototypes.
15089 2018-06-05 Steve Ellcey <sellcey@cavium.com>
15092 * config/aarch64/aarch64-protos.h (aarch64_err_no_fpadvsimd): Remove
15094 * config/aarch64/aarch64-protos..c (aarch64_err_no_fpadvsimd):
15095 Remove second argument, change how error is called.
15096 (aarch64_layout_arg): Remove second argument from
15097 aarch64_err_no_fpadvsimd call.
15098 (aarch64_init_cumulative_args): Ditto.
15099 (aarch64_gimplify_va_arg_expr): Ditto.
15100 * config/aarch64/aarch64.md (mov<mode>): Ditto.
15102 2018-06-05 Uros Bizjak <ubizjak@gmail.com>
15104 * config/i386/i386.md (simple_return_indirect_internal): New expander.
15105 (*simple_return_indirect_internal<mode>): Rename from
15106 simple_return_indirect_internal. Use W mode iterator.
15107 (rstorssp): New expander.
15108 (*rstorssp<mode>): Rename from rstorssp. Use P mode iterator.
15109 (clrssbsy): New expander.
15110 (*clrssbsy<mode>): Rename from clrssbsy. Use P mode iterator.
15112 2018-06-05 Andre Vieira <andre.simoesdiasvieira@arm.com>
15114 * config/arm/arm_cmse.h (cmse_nsfptr_create): Change typeof to
15116 (cmse_check_pointed_object): Likewise.
15118 2018-06-05 Martin Liska <mliska@suse.cz>
15120 PR gcov-profile/47618
15121 * doc/invoke.texi: Document how -fprofile-dir format
15124 2018-06-05 Richard Biener <rguenther@suse.de>
15126 * tree-cfgcleanup.c (cleanup_control_flow_pre): For edge
15127 removal pretend DOM info isn't available so we do not update
15128 it and only remove edges, not dominated blocks. Actually free
15129 DOM info in case we removed something. Remove unreachable blocks.
15130 (mfb_keep_latches): Work with either DOM info or marked backedges.
15131 (cleanup_tree_cfg_noloop): Do not remove unreachable blocks
15132 first. Mark backedges if DOM info isn't available.
15133 (Re-)compute DOM info after cleanup_control_flow_pre.
15135 2018-06-05 Richard Biener <rguenther@suse.de>
15137 * tree-cfg.c (struct locus_discrim_map): Store line, not location.
15138 (locus_discrim_hasher::hash): Adjust.
15139 (locus_discrim_hasher::equal): Likewise.
15140 (next_discriminator_for_locus): Work on line directly.
15141 (same_line_p): Pass in expanded locus1 as well.
15142 (assign_discriminators): Avoid redundant location expansions.
15144 2018-06-05 Richard Biener <rguenther@suse.de>
15146 PR tree-optimization/86046
15147 * tree-ssa.c (maybe_optimize_var): Clear DECL_GIMPLE_REG_P
15148 if required after clearing TREE_ADDRESSABLE.
15150 2018-06-05 Richard Biener <rguenther@suse.de>
15152 PR tree-optimization/86047
15153 * tree-ssa-loop.c (for_each_index): Glob handling of all
15154 decls and constants and really handle all of them.
15156 2018-06-05 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
15159 * config/arm/arm-builtins.c (arm_type_qualifiers): Add
15160 qualifier_void_pointer and qualifier_const_void_pointer.
15161 (arm_ldc_qualifiers, arm_stc_qualifiers): Use the above.
15162 (arm_init_builtins): Handle the above.
15163 * config/arm/arm_acle.h (__arm_cdp, __arm_ldc, __arm_ldcl, __arm_stc,
15164 __arm_stcl, __arm_mcr, __arm_cdp2, __arm_ldc2, __arm_ldcl2, __arm_stc2,
15165 __arm_stcl2,__arm_mcr2, __arm_mcrr, __arm_mcrr2): Remove return for
15168 2018-06-05 Martin Liska <mliska@suse.cz>
15170 * auto-profile.c (read_autofdo_file): Do not use
15171 gcov_ctr_summary struct.
15172 (afdo_callsite_hot_enough_for_early_inline): Likewise.
15173 * coverage.c (struct counts_entry): Likewise.
15174 (read_counts_file): Read just single summary entry.
15175 (get_coverage_counts): Use gcov_summary struct.
15176 * coverage.h (get_coverage_counts): Likewise.
15177 * gcov-dump.c (dump_working_sets): Likewise.
15178 (tag_summary): Dump just single summary.
15179 * gcov-io.c (gcov_write_summary): Write just histogram
15181 (gcov_read_summary): Read just single summary.
15182 (compute_working_sets): Use gcov_summary struct.
15183 * gcov-io.h (GCOV_TAG_SUMMARY_LENGTH): Remove usage
15184 of GCOV_COUNTERS_SUMMABLE.
15185 (GCOV_COUNTERS_SUMMABLE): Remove.
15186 (GCOV_FIRST_VALUE_COUNTER): Replace with
15187 GCOV_COUNTER_V_INTERVAL.
15188 (struct gcov_ctr_summary): Remove.
15189 (struct gcov_summary): Directly use fields of former
15191 (compute_working_sets): Use gcov_summary struct.
15192 * gcov.c (read_count_file): Do not use ctrs fields.
15193 * lto-cgraph.c (merge_profile_summaries): Use gcov_summary
15195 * lto-streamer.h (struct GTY): Make profile_info gcov_summary
15197 * profile.c: Likewise.
15198 * profile.h: Likewise.
15200 2018-06-05 Martin Liska <mliska@suse.cz>
15202 PR gcov-profile/84846
15203 * gcov.c (output_lines): Print working directory only
15204 in intermediate format.
15206 2018-06-05 Andreas Krebbel <krebbel@linux.ibm.com>
15208 * config/s390/s390-builtin-types.def: Add void function type.
15209 * config/s390/s390-builtins.def: Use the function type for the
15212 2018-06-04 Jim Wilson <jimw@sifive.com>
15214 * config/riscv/riscv-protos.h (riscv_expand_epilogue): Change bool arg
15216 * config/riscv/riscv.c (riscv_for_each_saved_reg): New args epilogue
15217 and maybe_eh_return. Change regno to unsigned int. Use new args to
15218 handle EH_RETURN_DATA_REGNO registers properly.
15219 (riscv_expand_prologue): Pass new args to riscv_for_each_saved_reg.
15220 (riscv_expand_epilogue): Update comment. Change argument name and
15221 type. Update code to use new name and type. Pass new args to
15222 riscv_for_each_saved_reg. Only use EH_RETURN_STACKADJ_RTX when
15224 * config/riscv/riscv.md (NORMAL_RETURN): New.
15225 (SIBCALL_RETURN, EXCEPTION_RETURN): New.
15226 (epilogue, sibcall_epilogue): Update riscv_expand_epilogue arg.
15227 (eh_return): Call gen_eh_return_internal and emit barrier.
15228 (eh_return_internal): Call riscv_expand_epilogue.
15230 2018-06-04 Eric Botcazou <ebotcazou@adacore.com>
15232 * gimple-ssa-store-merging.c (struct merged_store_group): Move up
15233 bit_insertion field and declare can_be_merged_into method.
15234 (merged_store_group::can_be_merged_into): New method.
15235 (imm_store_chain_info::coalesce_immediate): Call it to decide whether
15236 consecutive non-overlapping stores can be merged. Turn MEM_REF stores
15237 into BIT_INSERT_EXPR stores if the group contains a non-MEM_REF store.
15239 2018-06-04 Richard Biener <rguenther@suse.de>
15241 PR tree-optimization/85955
15242 * builtins.c (fold_builtin_sincos): Convert pointers to
15243 destination to appropriate type before dereferencing.
15245 2018-06-04 Segher Boessenkool <segher@kernel.crashing.org>
15247 * config/rs6000/rs6000.md (abs<mode>2 for FLOAT128): Handle IFmode.
15249 2018-06-04 Richard Sandiford <richard.sandiford@linaro.org>
15251 * expr.c (expand_expr_real_1): Force the operand into memory if
15252 its TYPE_MODE is BLKmode and if there is no integer mode for
15253 the number of bits being extracted.
15255 2018-06-04 Jakub Jelinek <jakub@redhat.com>
15259 * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
15260 Use vptestnm rather than vptestm in (=Yc,v,C) variant.
15262 2018-06-04 Richard Biener <rguenther@suse.de>
15264 * tree-cfgcleanup.c (cleanup_tree_cfg_1): Fold into...
15265 (cleanup_tree_cfg_noloop): ... single caller. Do
15266 start_recording_case_labels later.
15268 2018-06-04 Sebastian Peryt <sebastian.peryt@intel.com>
15270 * config/i386/cldemoteintrin.h: Change define from _X86INTRIN_H_INCLUDED
15271 to _IMMINTRIN_H_INCLUDED.
15272 * config/i386/pconfigintrin.h: Ditto.
15273 * config/i386/waitpkgintrin.h: Ditto.
15274 * config/i386/immintrin.h: Add includes for sgxintrin.h,
15275 pconfigintrin.h, waitpkgintrin.h and cldemoteintrin.h.
15276 * config/i386/x86intrin.h: Remove includes for mintrin.h, xmmintrin.h,
15277 emmintrin.h, pmmintrin.h, tmmintrin.h, smmintrin.h, wmmintrin.h,
15278 bmiintrin.h, bmi2intrin.h, lzcntintrin.h, sgxintrin.h, pconfigintrin.h,
15279 waitpkgintrin.h and cldemoteintrin.h.
15281 2018-06-04 Richard Biener <rguenther@suse.de>
15283 PR tree-optimization/86038
15284 * tracer.c (find_best_successor): Check probability for
15285 being initialized, bail out if not.
15287 2018-06-04 Richard Earnshaw <rearnsha@arm.com>
15290 * config/arm/arm-cpus.in (ALL_QUIRKS): Add xscale feature to the list
15291 of bits to ignore when comparing architectures.
15293 2018-06-04 Jakub Jelinek <jakub@redhat.com>
15295 PR tree-optimization/69615
15296 * fold-const.c (merge_ranges): If range1 is - [x, x] and x is the
15297 maximum or minimum of the type, try to merge it also as if
15298 range1 is + [-, x - 1] or + [x + 1, -].
15301 * tree.c (inchash::add_expr): Handle IDENTIFIER_NODE.
15303 2018-06-03 Eric Botcazou <ebotcazou@adacore.com>
15305 PR tree-optimization/86034
15306 * gimple-ssa-store-merging.c (output_merged_store): Convert the RHS to
15307 the unsigned bitfield type in a bit insertion sequence if it does not
15308 have a larger precision than the bitfield size.
15309 (process_store): Also bypass widening conversions for BIT_INSERT_EXPR.
15311 2018-06-03 Kito Cheng <kito.cheng@gmail.com>
15313 * config/nds32/nds32-peephole2.md: Add new patterns for code size.
15315 2018-06-03 Chung-Ju Wu <jasonwucj@gmail.com>
15317 * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3J.
15318 * config/nds32/nds32.c (nds32_option_override): Consider ARCH_V3J.
15319 * config/nds32/nds32.h (TARGET_ISA_V3): Add ARCH_V3J checking.
15320 * config/nds32/nds32.opt (march): Add enum value Value(ARCH_V3J).
15322 2018-06-03 Chung-Ju Wu <jasonwucj@gmail.com>
15324 * common/config/nds32/nds32-common.c (nds32_option_optimization_table):
15325 Disable -fdelete-null-pointer-checks for ELF toolchain.
15327 2018-06-02 Chung-Ju Wu <jasonwucj@gmail.com>
15328 Kito Cheng <kito.cheng@gmail.com>
15330 * config.gcc (nds32*): Use nds32-linux.opt and nds32-elf.opt.
15331 (nds32le-*-*, nds32be-*-*): Integrate checking process.
15332 (nds32*-*-*): Add glibc and uclibc conditions.
15333 * common/config/nds32/nds32-common.c (nds32_except_unwind_info): New.
15334 (TARGET_EXCEPT_UNWIND_INFO): Define.
15335 * config/nds32/elf.h: New file.
15336 * config/nds32/linux.h: New file.
15337 * config/nds32/nds32-elf.opt: New file.
15338 * config/nds32/nds32-linux.opt: New file.
15339 * config/nds32/nds32-fp-as-gp.c
15340 (pass_nds32_fp_as_gp::gate): Consider TARGET_LINUX_ABI.
15341 * config/nds32/nds32.c (nds32_conditional_register_usage): Consider
15343 (nds32_asm_file_end): Ditto.
15344 (nds32_print_operand): Ditto.
15345 (nds32_insert_attributes): Ditto.
15346 (nds32_init_libfuncs): New function.
15347 (TARGET_HAVE_TLS): Define.
15348 (TARGET_INIT_LIBFUNCS): Define.
15349 * config/nds32/nds32.h (TARGET_DEFAULT_RELAX): Apply different relax
15351 (TARGET_ELF): Apply different mcmodel setting.
15352 (LINK_SPEC, LIB_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): The content has
15353 been migrated into elf.h and linux.h files.
15354 * config/nds32/nds32.md (add_pc): Consider TARGET_LINUX_ABI.
15355 * config/nds32/nds32.opt (mvh): Consider TARGET_LINUX_ABI.
15356 (mcmodel): The content has been migrated into nds32-elf.opt and
15357 nds32-linux.opt files.
15358 * config/nds32/t-elf: New file.
15359 * config/nds32/t-linux: New file.
15361 2018-06-02 Chung-Ju Wu <jasonwucj@gmail.com>
15362 Shiva Chen <shiva0217@gmail.com>
15364 * config/nds32/constants.md (unspec_volatile_element): Add
15365 UNSPEC_VOLATILE_OMIT_FP_BEGIN and UNSPEC_VOLATILE_OMIT_FP_END.
15366 * config/nds32/nds32-fp-as-gp.c: New implementation of fp_as_gp
15368 * config/nds32/nds32-protos.h (nds32_naked_function_p): Declare.
15369 (make_pass_nds32_fp_as_gp): Declare.
15370 * config/nds32/nds32.c (nds32_register_passes): Add fp_as_gp as one
15372 (nds32_asm_function_end_prologue): Remove unused asm output.
15373 (nds32_asm_function_begin_epilogue): Remove unused asm output.
15374 (nds32_asm_file_start): Output necessary fp_as_gp information.
15375 (nds32_option_override): Adjust register usage.
15376 (nds32_expand_prologue): Consider fp_as_gp situation.
15377 (nds32_expand_prologue_v3push): Consider fp_as_gp situation.
15378 * config/nds32/nds32.md (prologue): Check fp_as_gp_p and naked_p.
15381 (simple_return): Ditto.
15382 (omit_fp_begin): Output special directive for fp_as_gp.
15383 (omit_fp_end): Output special directive for fp_as_gp.
15384 * config/nds32/nds32.opt (mfp-as-gp, mno-fp-as-gp, mforce-fp-as-gp,
15385 mforbid-fp-as-gp): New options.
15387 2018-06-01 Mark Wielaard <mark@klomp.org>
15389 * dwarf2out.c (dwarf2out_finish): Remove generation of
15390 DW_AT_loclists_base.
15392 2018-06-01 Eric Botcazou <ebotcazou@adacore.com>
15394 * gimple-ssa-store-merging.c: Include gimple-fold.h.
15395 (struct store_immediate_info): Document BIT_INSERT_EXPR stores.
15396 (struct merged_store_group): Add bit_insertion field.
15397 (dump_char_array): Use standard hexadecimal format.
15398 (merged_store_group::merged_store_group): Set bit_insertion to false.
15399 (merged_store_group::apply_stores): Use optimal buffer size. Deal
15400 with BIT_INSERT_EXPR stores. Move up code updating the mask and
15401 also print the mask in the dump file.
15402 (pass_store_merging::gate): Minor tweak.
15403 (imm_store_chain_info::coalesce_immediate): Fix wrong association
15404 of stores with groups in dump. Allow coalescing of BIT_INSERT_EXPR
15405 stores with INTEGER_CST stores.
15406 (count_multiple_uses) <BIT_INSERT_EXPR>: New case.
15407 (imm_store_chain_info::output_merged_store): Add try_bitpos variable
15408 and use it throughout. Generate bit insertion sequences if need be.
15409 (pass_store_merging::process_store): Remove redundant condition.
15410 Record stores from a SSA name to a bit-field with BIT_INSERT_EXPR.
15412 2018-06-01 Segher Boessenkool <segher@kernel.crashing.org>
15414 * config/rs6000/rs6000.c (rs6000_mangle_type): Change the mangling of
15415 the 128-bit floating point types. Fix function comment.
15417 2018-06-01 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
15419 * config/aarch64/aarch64-simd.md
15420 (aarch64_simd_vec_unpack<su>_lo_<mode>): Use UXTL and SXTL assembler
15422 (aarch64_simd_vec_unpack<su>_hi_<mode>): Use UXTL2 and SXTL2 assembler
15425 2018-06-01 Richard Sandiford <richard.sandiford@linaro.org>
15427 PR tree-optimization/85989
15428 * gimple-ssa-backprop.c (backprop::m_visited_phis): New member
15430 (backprop::intersect_uses): Check it when deciding whether this
15431 is a backedge reference.
15432 (backprop::process_block): Add each phi to m_visited_phis
15433 after visiting it, then clear it at the end.
15435 2018-06-01 Richard Biener <rguenther@suse.de>
15437 * tree-vectorizer.h (vect_dr_stmt): New function.
15438 (vect_get_load_cost): Adjust.
15439 (vect_get_store_cost): Likewise.
15440 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence):
15441 Use vect_dr_stmt instead of DR_SMTT.
15442 (vect_record_base_alignments): Likewise.
15443 (vect_calculate_target_alignment): Likewise.
15444 (vect_compute_data_ref_alignment): Likewise and make static.
15445 (vect_update_misalignment_for_peel): Likewise.
15446 (vect_verify_datarefs_alignment): Likewise.
15447 (vector_alignment_reachable_p): Likewise.
15448 (vect_get_data_access_cost): Likewise. Pass down
15449 vinfo to vect_get_load_cost/vect_get_store_cost instead of DR.
15450 (vect_get_peeling_costs_all_drs): Likewise.
15451 (vect_peeling_hash_get_lowest_cost): Likewise.
15452 (vect_enhance_data_refs_alignment): Likewise.
15453 (vect_find_same_alignment_drs): Likewise.
15454 (vect_analyze_data_refs_alignment): Likewise.
15455 (vect_analyze_group_access_1): Likewise.
15456 (vect_analyze_group_access): Likewise.
15457 (vect_analyze_data_ref_access): Likewise.
15458 (vect_analyze_data_ref_accesses): Likewise.
15459 (vect_vfa_segment_size): Likewise.
15460 (vect_small_gap_p): Likewise.
15461 (vectorizable_with_step_bound_p): Likewise.
15462 (vect_prune_runtime_alias_test_list): Likewise.
15463 (vect_analyze_data_refs): Likewise.
15464 (vect_supportable_dr_alignment): Likewise.
15465 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
15466 (vect_gen_prolog_loop_niters): Likewise.
15467 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
15468 * tree-vect-patterns.c (vect_recog_bool_pattern): Do not
15470 (vect_recog_mask_conversion_pattern): Likewise.
15471 (vect_try_gather_scatter_pattern): Likewise.
15472 * tree-vect-stmts.c (vect_model_store_cost): Pass stmt_info
15473 to vect_get_store_cost.
15474 (vect_get_store_cost): Get stmt_info instead of DR.
15475 (vect_model_load_cost): Pass stmt_info to vect_get_load_cost.
15476 (vect_get_load_cost): Get stmt_info instead of DR.
15478 2018-06-01 Richard Biener <rguenther@suse.de>
15480 PR middle-end/86017
15481 * gimple-fold.c (var_decl_component_p): Also allow offsetted
15482 vars wrapped in MEM_REFs.
15484 2018-06-01 Richard Sandiford <richard.sandiford@linaro.org>
15486 * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
15487 Fix subreg tests so that we only return a choice between
15488 GENERAL_REGS and FP_REGS if the original classes included both.
15490 2018-06-01 Richard Biener <rguenther@suse.de>
15493 * tree-ssa-structalias.c (get_function_part_constraint):
15494 Handle NULL fi->decl.
15495 (find_func_aliases_for_call): Properly handle indirect
15496 fi from direct call.
15497 (find_func_clobbers): Likewise.
15498 (ipa_pta_execute): Likewise.
15499 (create_variable_info_for): For functions that are ifunc_resolver
15500 resolve to a varinfo that contains the result of the resolver call.
15501 (associate_varinfo_to_alias): Do not treat ifunc resolvers as
15504 2018-05-31 Michael Collison <michael.collison@arm.com>
15506 * config/aarch64/aarch64.md:
15507 (*fix_to_zero_extenddfdi2): New pattern.
15508 * gcc.target/aarch64/fix_extend1.c: New testcase.
15510 2018-05-31 Qing Zhao <qing.zhao@oracle.com>
15512 PR middle-end/78809
15513 PR middle-end/83026
15514 * builtins.c (expand_builtin): Add the handling of BUILT_IN_STRCMP_EQ
15515 and BUILT_IN_STRNCMP_EQ.
15516 * builtins.def: Add new builtins BUILT_IN_STRCMP_EQ and
15517 BUILT_IN_STRNCMP_EQ.
15518 * gimple-fold.c (gimple_fold_builtin_string_compare): Add the
15519 handling of BUILTIN_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
15520 (gimple_fold_builtin): Likewise.
15521 * tree-ssa-strlen.c (compute_string_length): New function.
15522 (determine_min_obsize): New function.
15523 (handle_builtin_string_cmp): New function to handle calls to
15524 string compare functions.
15525 (strlen_optimize_stmt): Add handling to builtin string compare
15527 * tree-ssa-structalias.c (find_func_aliases_for_builtin_call):
15528 Add the handling of BUILT_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
15529 * tree.c (build_common_builtin_nodes): Add new defines of
15530 BUILT_IN_STRNCMP_EQ and BUILT_IN_STRCMP_EQ.
15532 2018-05-31 Jakub Jelinek <jakub@redhat.com>
15535 * bb-reorder.c (pass_partition_blocks::gate): Return false for
15536 functions with naked attribute.
15538 2018-05-31 Uros Bizjak <ubizjak@gmail.com>
15540 * config/i386/sse.md (avx_vec_concat<mode>):
15541 Substitute concat_tg_mode mode attribute with xtg_mode.
15542 (<mask_codefor>avx512dq_broadcast<mode><mask_name>_1): Ditto.
15543 (concat_tg_mode): Remove mode attribute.
15545 2018-05-31 Martin Sebor <msebor@redhat.com>
15548 * calls.c (alloc_max_size): Correct a logic error/typo.
15549 Treat excessive arguments as infinite. Warn for invalid arguments.
15550 * doc/invoke.texi (-Walloc-size-larger-than): Update.
15552 2018-05-31 H.J. Lu <hongjiu.lu@intel.com>
15555 * config/i386/x86-tune.def: Re-enable partial_reg_dependency
15556 and movx for Haswell.
15558 2018-05-31 Chung-Lin Tang <cltang@codesourcery.com>
15559 Cesar Philippidis <cesar@codesourcery.com>
15561 PR middle-end/85879
15562 * gimplify.c (gimplify_adjust_omp_clauses): Add 'remove = true'
15563 when emitting error on private/firstprivate reductions.
15564 * omp-low.c (lower_omp_target): Avoid reference-type processing
15565 on pointers for firstprivate clause.
15567 2018-05-31 Sameera Deshpande <sameera.deshpande@linaro.org>
15569 * config/aarch64/aarch64-simd-builtins.def (ld1x3): New.
15572 * config/aarch64/aarch64-simd.md
15573 (aarch64_ld1x3<VALLDIF:mode>): New pattern.
15574 (aarch64_ld1_x3_<mode>): Likewise
15575 (aarch64_st1x2<VALLDIF:mode>): Likewise
15576 (aarch64_st1_x2_<mode>): Likewise
15577 (aarch64_st1x3<VALLDIF:mode>): Likewise
15578 (aarch64_st1_x3_<mode>): Likewise
15579 * config/aarch64/arm_neon.h (vld1_u8_x3): New function.
15580 (vld1_s8_x3): Likewise.
15581 (vld1_u16_x3): Likewise.
15582 (vld1_s16_x3): Likewise.
15583 (vld1_u32_x3): Likewise.
15584 (vld1_s32_x3): Likewise.
15585 (vld1_u64_x3): Likewise.
15586 (vld1_s64_x3): Likewise.
15587 (vld1_f16_x3): Likewise.
15588 (vld1_f32_x3): Likewise.
15589 (vld1_f64_x3): Likewise.
15590 (vld1_p8_x3): Likewise.
15591 (vld1_p16_x3): Likewise.
15592 (vld1_p64_x3): Likewise.
15593 (vld1q_u8_x3): Likewise.
15594 (vld1q_s8_x3): Likewise.
15595 (vld1q_u16_x3): Likewise.
15596 (vld1q_s16_x3): Likewise.
15597 (vld1q_u32_x3): Likewise.
15598 (vld1q_s32_x3): Likewise.
15599 (vld1q_u64_x3): Likewise.
15600 (vld1q_s64_x3): Likewise.
15601 (vld1q_f16_x3): Likewise.
15602 (vld1q_f32_x3): Likewise.
15603 (vld1q_f64_x3): Likewise.
15604 (vld1q_p8_x3): Likewise.
15605 (vld1q_p16_x3): Likewise.
15606 (vld1q_p64_x3): Likewise.
15607 (vst1_s64_x2): Likewise.
15608 (vst1_u64_x2): Likewise.
15609 (vst1_f64_x2): Likewise.
15610 (vst1_s8_x2): Likewise.
15611 (vst1_p8_x2): Likewise.
15612 (vst1_s16_x2): Likewise.
15613 (vst1_p16_x2): Likewise.
15614 (vst1_s32_x2): Likewise.
15615 (vst1_u8_x2): Likewise.
15616 (vst1_u16_x2): Likewise.
15617 (vst1_u32_x2): Likewise.
15618 (vst1_f16_x2): Likewise.
15619 (vst1_f32_x2): Likewise.
15620 (vst1_p64_x2): Likewise.
15621 (vst1q_s8_x2): Likewise.
15622 (vst1q_p8_x2): Likewise.
15623 (vst1q_s16_x2): Likewise.
15624 (vst1q_p16_x2): Likewise.
15625 (vst1q_s32_x2): Likewise.
15626 (vst1q_s64_x2): Likewise.
15627 (vst1q_u8_x2): Likewise.
15628 (vst1q_u16_x2): Likewise.
15629 (vst1q_u32_x2): Likewise.
15630 (vst1q_u64_x2): Likewise.
15631 (vst1q_f16_x2): Likewise.
15632 (vst1q_f32_x2): Likewise.
15633 (vst1q_f64_x2): Likewise.
15634 (vst1q_p64_x2): Likewise.
15635 (vst1_s64_x3): Likewise.
15636 (vst1_u64_x3): Likewise.
15637 (vst1_f64_x3): Likewise.
15638 (vst1_s8_x3): Likewise.
15639 (vst1_p8_x3): Likewise.
15640 (vst1_s16_x3): Likewise.
15641 (vst1_p16_x3): Likewise.
15642 (vst1_s32_x3): Likewise.
15643 (vst1_u8_x3): Likewise.
15644 (vst1_u16_x3): Likewise.
15645 (vst1_u32_x3): Likewise.
15646 (vst1_f16_x3): Likewise.
15647 (vst1_f32_x3): Likewise.
15648 (vst1_p64_x3): Likewise.
15649 (vst1q_s8_x3): Likewise.
15650 (vst1q_p8_x3): Likewise.
15651 (vst1q_s16_x3): Likewise.
15652 (vst1q_p16_x3): Likewise.
15653 (vst1q_s32_x3): Likewise.
15654 (vst1q_s64_x3): Likewise.
15655 (vst1q_u8_x3): Likewise.
15656 (vst1q_u16_x3): Likewise.
15657 (vst1q_u32_x3): Likewise.
15658 (vst1q_u64_x3): Likewise.
15659 (vst1q_f16_x3): Likewise.
15660 (vst1q_f32_x3): Likewise.
15661 (vst1q_f64_x3): Likewise.
15662 (vst1q_p64_x3): Likewise.
15664 2018-05-30 Jozef Lawrynowicz <jozef.l@mittosystems.com>
15666 * config/msp430/msp430.c (msp430_output_labelref): Prepend
15667 user_label_prefix to name.
15669 * tree-core.h: Update comment about the format of NAME string
15670 passed to handler in attribute_spec.
15672 * config/msp430/msp430.md: Remove erroneous subreg expression from
15673 zero_extendqisi2 insn pattern. Remove msp430x ISA restriction on
15674 zero_extend{q,h}isi2.
15676 2018-05-30 Borislav Petkov <bp@suse.de>
15678 * doc/extend.texi: Document some architecture specific
15679 constraints and sort entries.
15681 2018-05-30 Martin Sebor <msebor@redhat.com>
15683 PR middle-end/85369
15684 * builtins.c (expand_builtin_stpcpy_1): New function.
15685 (expand_builtin_stpcpy): Call it, and call maybe_warn_nonstring_arg
15686 only if the former succeeds.
15688 2018-05-31 Sameera Deshpande <sameera.deshpande@linaro.org>
15690 * config/aarch64/aarch64-cores.def (saphira) : Add support for ARMv8.4
15693 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
15695 * doc/invoke.texi (-flinker-output): Document
15697 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
15699 * passes.c (ipa_write_summaries): Only modify statements if body
15701 * cgraphunit.c (ipa_passes): Also produce intermeidate code when
15702 incrementally linking.
15703 (ipa_passes): Likewise.
15704 * lto-cgraph.c (lto_output_node): When incrementally linking do not
15705 pass down resolution info.
15706 * common.opt (flag_incremental_link): Update info.
15707 * gcc.c (plugin specs): Turn flinker-output=* to
15708 -plugin-opt=-linker-output-known
15709 * toplev.c (compile_file): Also cut compilation when doing incremental
15711 * flag-types. (enum lto_partition_model): Add
15712 LTO_LINKER_OUTPUT_NOLTOREL.
15713 (invoke.texi): Add -flinker-output docs.
15714 * ipa.c (symbol_table::remove_unreachable_nodes): Handle LTO incremental
15715 link same way as WPA; do not stream in dead initializers.
15717 * dwarf2out.c (dwarf2out_die_ref_for_decl,
15718 darf2out_register_external_decl): Support incremental link.
15720 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
15722 * lto-opts.c (lto_write_options): Skip OPT_dumpdir, OPT_fresolution_.
15724 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
15726 * lto-wrapper.c (debug_objcopy): Add rename parameter; pass
15727 it down to simple_object_copy_lto_debug_sections.
15728 (run_gcc): Determine incremental LTO link time and configure
15729 lto1 into non-wpa mode, disable renaming of debug sections.
15731 2018-05-30 Kelvin Nilsen <kelvin@gcc.gnu.org>
15733 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
15734 descriptions of various incorrectly documented functions.
15736 2018-05-30 Andre Vieira <andre.simoesdiasvieira@arm.com>
15739 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
15740 address check not strict.
15742 2018-05-30 Richard Biener <rguenther@suse.de>
15744 PR tree-optimization/85964
15745 * tracer.c (better_p): Drop initialized count check, we only
15746 call the function with initialized counts now.
15747 (find_best_successor): Do find a best edge if one
15748 has uninitialized count.
15749 (find_best_predecessor): Likewise. Do BB frequency check only
15750 if count is initialized.
15752 2017-05-30 Jackson Woodruff <jackson.woodruff@arm.com>
15754 * config/aarch64/aarch64.c (aarch64_host_wide_int_compare): New.
15755 (aarch64_ldrstr_offset_compare): New.
15756 (aarch64_operands_adjust_ok_for_ldpstp): Update to consider all
15757 load/store orderings.
15758 (aarch64_gen_adjusted_ldpstp): Likewise.
15760 2018-05-30 Wilco Dijkstra <wdijkstr@arm.com>
15762 * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
15763 Check for subset of GENERAL_REGS and FP_REGS.
15764 * config/aarch64/aarch64-simd.md (aarch64_get_lane): Increase cost of
15767 2018-05-30 Richard Sandiford <richard.sandiford@linaro.org>
15769 * alias.c (adjust_offset_for_component_ref): Use poly_int_tree_p
15770 and wi::to_poly_offset. Add the current offset and then check
15771 whether the sum fits, rather than using an unchecked addition of
15772 a checked term. Check for a shwi rather than a uhwi.
15773 * expr.c (get_bit_range): Use tree_to_poly_uint64.
15774 (store_constructor): Use poly_int_tree_p.
15775 (expand_expr_real_1): Likewise.
15776 * function.c (assign_temp): Likewise.
15777 * fold-const.c (const_binop): Use poly_int_tree_p and
15778 wi::to_poly_offset.
15779 (fold_indirect_ref_1): Likewise. Use multiple_p to attempt an exact
15781 * ipa-icf-gimple.c (func_checker::compare_operand): Use
15782 to_poly_offset for MEM offsets.
15783 * ipa-icf.c (sem_variable::equals): Likewise.
15784 * stor-layout.c (compute_record_mode): Use poly_int_tree_p.
15785 * tree-ssa-sccvn.c (ao_ref_init_from_vn_reference): Use
15786 wi::to_poly_offset for BIT_FIELD_REF offsets.
15787 (vn_reference_maybe_forwprop_address): Use poly_int_tree_p and
15788 wi::to_poly_offset.
15789 * var-tracking.c (emit_note_insn_var_location): Use
15790 tree_to_poly_uint64.
15792 2018-05-29 Jim Wilson <jimw@sifive.com>
15794 * config/riscv/riscv.c (riscv_interrupt_type): Fix comment typo.
15796 2018-05-29 Uros Bizjak <ubizjak@gmail.com>
15799 * config/i386/i386.md (l<rounding_insn><MODEF:mode><SWI48:mode>2):
15800 Enable for TARGET_SSE4_1 and generate rounds{s,d} and cvtts{s,d}2si{,q}
15802 (sse4_1_round<mode>2): Use nonimmediate_operand
15803 for operand 1 predicate.
15805 2018-05-29 Martin Sebor <msebor@redhat.com>
15806 Richard Biener <rguenther@suse.de>
15809 * calls.c (get_size_range): Call determine_value_range instead
15810 of get_value_range..
15811 * tree-vrp.h (determine_value_range): Declared new function.
15812 * tree-vrp.c (determine_value_range_1, determine_value_range): New.
15814 2018-05-29 Richard Biener <rguenther@suse.de>
15816 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Make
15817 sure to use non-pattern stmts for get_earlier_stmt arguments.
15818 * tree-vectorizer.h (get_earlier_stmt): Assert we do not get
15819 called on pattern stmts.
15820 (get_later_stmt): Likewise.
15822 2018-05-29 Martin Liska <mliska@suse.cz>
15824 PR gcov-profile/85759
15825 * doc/gcov.texi: Document GCOV_ERROR_FILE and GCOV_EXIT_AT_ERROR
15828 2018-05-29 Jakub Jelinek <jakub@redhat.com>
15830 * tree-cfg.c (verify_gimple_assign_unary): Add checking for
15832 (verify_gimple_assign_binary): Check TYPE_VECTOR_SUBPARTS for
15836 * tree.def (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
15837 VEC_PACK_FLOAT_EXPR): New tree codes.
15838 * tree-pretty-print.c (op_code_prio): Handle
15839 VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR.
15840 (dump_generic_node): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
15841 VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
15842 * tree-inline.c (estimate_operator_cost): Likewise.
15843 * gimple-pretty-print.c (dump_binary_rhs): Handle VEC_PACK_FLOAT_EXPR.
15844 * fold-const.c (const_binop): Likewise.
15845 (const_unop): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR and
15846 VEC_UNPACK_FIX_TRUNC_LO_EXPR.
15847 * tree-cfg.c (verify_gimple_assign_unary): Likewise.
15848 (verify_gimple_assign_binary): Handle VEC_PACK_FLOAT_EXPR.
15849 * cfgexpand.c (expand_debug_expr): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
15850 VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
15851 * expr.c (expand_expr_real_2): Likewise.
15852 * optabs.def (vec_packs_float_optab, vec_packu_float_optab,
15853 vec_unpack_sfix_trunc_hi_optab, vec_unpack_sfix_trunc_lo_optab,
15854 vec_unpack_ufix_trunc_hi_optab, vec_unpack_ufix_trunc_lo_optab): New
15856 * optabs.c (expand_widen_pattern_expr): For
15857 VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR use
15858 sign from result type rather than operand's type.
15859 (expand_binop_directly): For vec_packu_float_optab and
15860 vec_packs_float_optab allow result type to be different from operand's
15862 * optabs-tree.c (optab_for_tree_code): Handle
15863 VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
15864 VEC_PACK_FLOAT_EXPR. Formatting fixes.
15865 * tree-vect-generic.c (expand_vector_operations_1): Handle
15866 VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
15867 VEC_PACK_FLOAT_EXPR.
15868 * tree-vect-stmts.c (supportable_widening_operation): Handle
15870 (supportable_narrowing_operation): Handle FLOAT_EXPR.
15871 * config/i386/i386.md (fixprefix, floatprefix): New code attributes.
15872 * config/i386/sse.md (*float<floatunssuffix>v2div2sf2): Rename to ...
15873 (float<floatunssuffix>v2div2sf2): ... this. Formatting fix.
15874 (vpckfloat_concat_mode, vpckfloat_temp_mode, vpckfloat_op_mode): New
15876 (vec_pack<floatprefix>_float_<mode>): New expander.
15877 (vunpckfixt_mode, vunpckfixt_model, vunpckfixt_extract_mode): New mode
15879 (vec_unpack_<fixprefix>fix_trunc_lo_<mode>,
15880 vec_unpack_<fixprefix>fix_trunc_hi_<mode>): New expanders.
15881 * doc/md.texi (vec_packs_float_@var{m}, vec_packu_float_@var{m},
15882 vec_unpack_sfix_trunc_hi_@var{m}, vec_unpack_sfix_trunc_lo_@var{m},
15883 vec_unpack_ufix_trunc_hi_@var{m}, vec_unpack_ufix_trunc_lo_@var{m}):
15885 * doc/generic.texi (VEC_UNPACK_FLOAT_HI_EXPR,
15886 VEC_UNPACK_FLOAT_LO_EXPR): Fix pasto in description.
15887 (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
15888 VEC_PACK_FLOAT_EXPR): Document.
15890 2018-05-29 Richard Biener <rguenther@suse.de>
15892 * tree-vectorizer.h (struct vec_info): Add stmt_vec_infos
15894 (stmt_vec_info_vec): Make pointer.
15895 (init_stmt_vec_info_vec): Remove.
15896 (free_stmt_vec_info_vec): Likewise.
15897 (set_stmt_vec_info_vec): New function.
15898 (free_stmt_vec_infos): Likewise.
15899 (vinfo_for_stmt): Adjust for stmt_vec_info_vec indirection.
15900 (set_vinfo_for_stmt): Likewise.
15901 (get_earlier_stmt): Likewise.
15902 (get_later_stmt): Likewise.
15903 * tree-vectorizer.c (stmt_vec_info_vec): Make pointer.
15904 (vec_info::vec_info): Allocate stmt_vec_infos and set the global.
15905 (vec_info::~vec_info): Free stmt_vec_infos.
15906 (vectorize_loops): Set the global stmt_vec_info_vec to NULL.
15907 Remove old init_stmt_vec_info_vec/free_stmt_vec_info_vec calls.
15908 (pass_slp_vectorize::execute): Likewise.
15909 * tree-vect-stmts.c (init_stmt_vec_info_vec): Remove.
15910 (free_stmt_vec_info_vec): Likewise.
15911 (set_stmt_vec_info_vec): New function.
15912 (free_stmt_vec_infos): Likewise.
15913 * tree-vect-loop.c (_loop_vec_info::~_loop_vec_info): Set
15914 the global stmt_vec_info_vec.
15915 * tree-parloops.c (gather_scalar_reductions): Use
15916 set_stmt_vec_info_vec/free_stmt_vec_infos and maintain a local
15919 2018-05-29 Richard Biener <rguenther@suse.de>
15921 * dominance.c (iterate_fix_dominators): Push/pop TV_DOMINANCE.
15923 2018-05-29 Martin Liska <mliska@suse.cz>
15924 David Malcolm <dmalcolm@redhat.com>
15926 * vec.c (test_reverse): New.
15927 (vec_c_tests): Add new test.
15928 * vec.h (vl_ptr>::reverse): New function.
15930 2018-05-29 Gerald Pfeifer <gerald@pfeifer.com>
15932 * config.gcc: Identify FreeBSD 3.x and 4.x as unsupported.
15934 * config/freebsd-spec.h (FBSD_LIB_SPEC): Only consider FreeBSD 5
15937 2018-05-28 Bernd Edlinger <bernd.edlinger@hotmail.de>
15939 * tree-dump.c (dump_node): Use splay_tree_delete_pointers.
15941 2018-05-28 Richard Biener <rguenther@suse.de>
15943 PR tree-optimization/85933
15944 * tree-vect-data-refs.c (vect_record_base_alignments): Only
15945 look at stmts marked as vectorizable.
15947 2018-05-28 Richard Biener <rguenther@suse.de>
15949 PR tree-optimization/85934
15950 * tree-vect-generic.c (expand_vector_operations_1): Hoist
15951 vector boolean check before scalar optimization.
15953 2018-05-28 Jakub Jelinek <jakub@redhat.com>
15955 * doc/invoke.texi (ARM Options): Use @item instead of @itemx
15958 2018-05-28 Mark Wielaard <mark@klomp.org>
15960 * dwarf2asm.c (dw2_asm_output_delta_uleb128): Add brackets around lab2
15961 if it is an expression containing a minus sign.
15963 2018-05-27 John David Anglin <danglin@gcc.gnu.org>
15965 * config/pa/pa-linux.h (NEED_INDICATE_EXEC_STACK): Define to 0.
15967 2018-05-27 Paul Koning <ni1d@arrl.net>
15969 * config/pdp11/pdp11.md (truncsihi2): Remove.
15971 2018-05-27 Monk Chiang <sh.chiang04@gmail.com>
15972 Chung-Ju Wu <jasonwucj@gmail.com>
15974 * config/nds32/nds32-intrinsic.md (unaligned_storedi): Modify patterns
15976 (unaligned_store_dw): Ditto.
15977 * config/nds32/nds32-memory-manipulation.c
15978 (nds32_expand_movmemsi_loop_known_size): Refactoring implementation.
15979 (nds32_gen_dup_4_byte_to_word_value): Rename to ...
15980 (nds32_gen_dup_4_byte_to_word_value_aux): ... this.
15981 (emit_setmem_word_loop): Rename to ...
15982 (emit_setmem_doubleword_loop): ... this.
15983 (nds32_gen_dup_4_byte_to_word_value): New function.
15984 (nds32_gen_dup_8_byte_to_double_word_value): New function.
15985 (nds32_expand_setmem_loop): Refine implementation.
15986 (nds32_expand_setmem_loop_v3m): Ditto.
15987 * config/nds32/nds32-multiple.md (unaligned_store_update_base_dw): New
15990 2018-05-27 Chung-Ju Wu <jasonwucj@gmail.com>
15992 * config/nds32/nds32.md (bswapsi2, bswaphi2): New patterns.
15994 2018-05-27 Chung-Ju Wu <jasonwucj@gmail.com>
15996 * config/nds32/nds32.c (nds32_attribute_table): Add "no_prologue".
15997 (nds32_init_machine_status): Initialize machine->attr_naked_p and
15998 machine->attr_no_prologue_p.
15999 (nds32_compute_stack_frame): Check "naked" and "no_prologue" attributes.
16000 (nds32_naked_function_p): Handle "naked" and "no_prologue" attributes.
16001 (nds32_expand_epilogue): Consider attr_naked_p.
16002 (nds32_expand_epilogue_v3pop): Likewise.
16003 (nds32_can_use_return_insn): Likewise.
16004 * config/nds32/nds32.h (machine_function): Add attr_naked_p and
16005 attr_no_prologue_p fields.
16006 * config/nds32/nds32.opt (mret-in-naked-func): New option.
16008 2018-05-27 Jakub Jelinek <jakub@redhat.com>
16011 * config/i386/i386.md (fixunssuffix, floatunssuffix): New code
16013 * config/i386/sse.md
16014 (<floatsuffix>float<sseintvecmodelower><mode>2<mask_name><round_name>):
16016 (float<floatunssuffix><sseintvecmodelower><mode>2<mask_name><round_name>):
16018 (<floatsuffix>float<sselongvecmodelower><mode>2<mask_name><round_name>):
16020 (float<floatunssuffix><sselongvecmodelower><mode>2<mask_name><round_name>):
16022 (*<floatsuffix>floatv2div2sf2): Rename to ...
16023 (*float<floatunssuffix>v2div2sf2): ... this.
16024 (<floatsuffix>floatv2div2sf2_mask): Rename to ...
16025 (float<floatunssuffix>v2div2sf2_mask): ... this.
16026 (*<floatsuffix>floatv2div2sf2_mask_1): Rename to ...
16027 (*float<floatunssuffix>v2div2sf2_mask_1): ... this.
16028 (<fixsuffix>fix_truncv8dfv8si2<mask_name><round_saeonly_name>): Rename
16030 (fix<fixunssuffix>_truncv8dfv8si2<mask_name><round_saeonly_name>):
16032 (<fixsuffix>fix_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
16034 (fix<fixunssuffix>_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
16036 (<fixsuffix>fix_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
16038 (fix<fixunssuffix>_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
16040 (<fixsuffix>fix_truncv2sfv2di2<mask_name>): Rename to ...
16041 (fix<fixunssuffix>_truncv2sfv2di2<mask_name>): ... this.
16042 (vec_pack_ufix_trunc_<mode>): Use gen_fixuns_truncv8dfv8si2 instead of
16043 gen_ufix_truncv8dfv8si2.
16044 * config/i386/i386-builtin.def (__builtin_ia32_cvttpd2uqq256_mask,
16045 __builtin_ia32_cvttpd2uqq128_mask, __builtin_ia32_cvttps2uqq256_mask,
16046 __builtin_ia32_cvttps2uqq128_mask, __builtin_ia32_cvtuqq2ps256_mask,
16047 __builtin_ia32_cvtuqq2ps128_mask, __builtin_ia32_cvtuqq2pd256_mask,
16048 __builtin_ia32_cvtuqq2pd128_mask, __builtin_ia32_cvttpd2udq512_mask,
16049 __builtin_ia32_cvtuqq2ps512_mask, __builtin_ia32_cvtuqq2pd512_mask,
16050 __builtin_ia32_cvttps2uqq512_mask, __builtin_ia32_cvttpd2uqq512_mask):
16051 Use fixuns instead ufix or floatuns instead ufloat in CODE_FOR_ names.
16053 2018-05-24 H.J. Lu <hongjiu.lu@intel.com>
16057 * varasm.c (assemble_alias): Lookup ifunc attribute on error.
16059 2018-05-25 Jim Wilson <jimw@sifive.com>
16061 * config/riscv/riscv-protos.h (riscv_epilogue_uses): New.
16062 * config/riscv/riscv.c (struct machine_function): Add
16063 interrupt_handler_p and attribute_checked_p fields.
16064 (riscv_attribute_table): Add interrupt.
16065 (riscv_interrupt_type_p): New.
16066 (riscv_save_reg_p): Save extra regs for interrupt handler.
16067 (riscv_use_save_libcall): Return false for interrupt handler.
16068 (riscv_first_stack_step): Add forward declaration.
16069 (riscv_compute_frame_info): New local interrupt_save_t1. Set it
16070 for interrupt handler with large frame. Use it for saved reg list.
16071 (riscv_expand_prologue): Move flag_stack_usage_info support to
16072 eliminate duplication.
16073 (riscv_expand_epilogue): Generate mret for interrupt handler.
16074 (riscv_epilogue_uses): New.
16075 (riscv_can_use_return_insn): Return false for interrupt handler.
16076 (riscv_function_ok_for_sibcall): Likewise.
16077 (riscv_set_current_function): Add interrupt handler support.
16078 * config/riscv/riscv.h (EPILOGUE_USES): Call riscv_epilogue_uses.
16079 * config/riscv/riscv.md (UNSPECV_MRET): New.
16081 (riscv_frflags, riscv_fsflags): Use tab after opcode.
16083 * doc/extend.texi (RISC-V Function Attributes) <interrupt>: New.
16085 2018-05-25 Bill Schmidt <wschmidt@linux.ibm.com>
16087 PR tree-optimization/85712
16088 * gimple-ssa-strength-reduction.c (replace_one_candidate): Skip if
16089 this candidate has already been replaced in-situ by a copy.
16091 2018-05-25 Jason Merrill <jason@redhat.com>
16093 PR c++/80485 - inline function non-zero address.
16094 * symtab.c (nonzero_address): Check DECL_COMDAT.
16096 2018-05-25 Uros Bizjak <ubizjak@gmail.com>
16099 * config/alpha/alpha.md (ashlsi3): New insn pattern.
16100 (*ashlsi_se): Rename from *ashldi_se. Define as sign
16101 extension of SImode operation. Use const123_operand predicate.
16102 (*saddsi_1): Remove.
16103 (*saddl_se_1): Ditto.
16104 (*ssubsi_1): Ditto.
16105 (*ssubl_se_1): Ditto.
16106 * config/alpha/predicates.md (const123_operand): New predicate.
16107 * config/alpha/constraints.md (P): Use IN_RANGE.
16109 2018-05-25 Richard Biener <rguenther@suse.de>
16111 * tree-ssa-alias.h (refs_may_alias_p): Add tbaa_p bool parameter,
16113 (ref_maybe_used_by_stmt_p): Likewise.
16114 (stmt_may_clobber_ref_p): Likewise.
16115 (stmt_may_clobber_ref_p_1): Likewise.
16116 * tree-ssa-alias.c (refs_may_alias_p): Add tbaa_p bool parameter
16118 (ref_maybe_used_by_stmt_p): Likewise.
16119 (stmt_may_clobber_ref_p): Likewise.
16120 (stmt_may_clobber_ref_p_1): Likewise.
16121 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Use
16122 the alias oracle to disambiguate DRs with stmts DR analysis
16124 (vect_analyze_data_refs): Do not give up on not analyzable
16125 DRs for BB vectorization. Remove code truncating the dataref
16128 2018-05-25 Jakub Jelinek <jakub@redhat.com>
16131 * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
16132 Add (=Yk,v,C) variant using vptestm insn. Use TARGET_AVX512BW
16133 in test instead of TARGET_AVX512F for VI12_AVX512VL iterator.
16135 2018-05-25 Richard Biener <rguenther@suse.de>
16137 * tree-vect-data-refs.c (vect_find_stmt_data_reference): New
16138 function, combining stmt data ref gathering and fatal analysis
16140 (vect_analyze_data_refs): Remove now redudnant code and simplify.
16141 * tree-vect-loop.c (vect_get_datarefs_in_loop): Factor out from
16142 vect_analyze_loop_2 and use vect_find_stmt_data_reference.
16143 * tree-vect-slp.c (vect_slp_bb): Use vect_find_stmt_data_reference.
16144 * tree-vectorizer.h (vect_find_stmt_data_reference): Declare.
16146 2018-05-25 Bin Cheng <bin.cheng@arm.com>
16148 PR tree-optimization/85720
16149 * tree-loop-distribution.c (break_alias_scc_partitions): Don't merge
16150 SCC if all partitions are builtins.
16151 (version_loop_by_alias_check): New parameter. Generate cancelable
16152 runtime alias check if all partitions are builtins.
16153 (distribute_loop): Update call to above function.
16155 2018-05-25 Bin Cheng <bin.cheng@arm.com>
16157 * tree-outof-ssa.c (tree-ssa.h, tree-dfa.h): Include header files.
16158 (create_default_def, for_all_parms): Moved from tree-ssa-coalesce.c.
16159 (parm_default_def_partition_arg): Ditto.
16160 (set_parm_default_def_partition): Ditto.
16161 (get_parm_default_def_partitions): Ditto and make it static.
16162 (get_undefined_value_partitions): Ditto and make it static.
16163 (remove_ssa_form): Refactor call to init_var_map here.
16164 * tree-ssa-coalesce.c (build_ssa_conflict_graph): Support live range
16165 computation for loop region.
16166 (coalesce_partitions, compute_optimized_partition_bases): Ditto.
16167 (register_default_def): Delete.
16168 (for_all_parms, create_default_def): Move to tree-outof-ssa.c.
16169 (parm_default_def_partition_arg): Ditto.
16170 (set_parm_default_def_partition): Ditto.
16171 (get_parm_default_def_partitions): Ditto and make it static.
16172 (get_undefined_value_partitions): Ditto and make it static.
16173 (coalesce_with_default, coalesce_with_default): Update comment.
16174 (create_coalesce_list_for_region): New func factored out from
16175 create_outofssa_var_map.
16176 (populate_coalesce_list_for_outofssa): New func factored out from
16177 create_outofssa_var_map and coalesce_ssa_name.
16178 (create_outofssa_var_map): Delete.
16179 (coalesce_ssa_name): Refactor to support live range computation.
16180 * tree-ssa-coalesce.h (coalesce_ssa_name): Change decl.
16181 (get_parm_default_def_partitions): Delete.
16182 (get_undefined_value_partitions): Ditto.
16183 * tree-ssa-live.c (init_var_map, delete_var_map): Support live range
16184 computation for loop region.
16185 (new_tree_live_info, loe_visit_block): Ditto.
16186 (live_worklist, set_var_live_on_entry): Ditto.
16187 (calculate_live_on_exit, verify_live_on_entry): Ditto.
16188 * tree-ssa-live.h (struct _var_map): New fields.
16189 (init_var_map): Change decl.
16190 (region_contains_p): New.
16192 2018-05-25 Bin Cheng <bin.cheng@arm.com>
16194 * tree-ssa-live.h (live_merge_and_clear): Delete.
16196 2018-05-25 Richard Biener <rguenther@suse.de>
16199 * tree-dump.c (dequeue_and_dump): Remove access to removed
16200 operand 2 of a SWITCH_EXPR.
16202 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
16204 * doc/sourcebuild.texi (vect_double_cond_arith): Include
16205 multiplication and division.
16206 * doc/md.texi (cond_mul@var{m}, cond_div@var{m}, cond_mod@var{m})
16207 (cond_udiv@var{m}, cond_umod@var{m}): Document.
16208 * optabs.def (cond_smul_optab, cond_sdiv_optab, cond_smod_optab)
16209 (cond_udiv_optab, cond_umod_optab): New optabs.
16210 * internal-fn.def (IFN_COND_MUL, IFN_COND_DIV, IFN_COND_MOD)
16211 (IFN_COND_RDIV): New internal functions.
16212 * internal-fn.c (get_conditional_internal_fn): Handle TRUNC_DIV_EXPR,
16213 TRUNC_MOD_EXPR and RDIV_EXPR.
16214 * match.pd (UNCOND_BINARY, COND_BINARY): Handle them.
16215 * config/aarch64/iterators.md (UNSPEC_COND_MUL, UNSPEC_COND_DIV):
16217 (SVE_INT_BINARY): Include mult.
16218 (SVE_COND_FP_BINARY): Include UNSPEC_MUL and UNSPEC_DIV.
16219 (optab, sve_int_op): Handle mult.
16220 (optab, sve_fp_op, commutative): Handle UNSPEC_COND_MUL and
16222 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New pattern
16223 for SVE_INT_BINARY_SD.
16225 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
16227 * config/aarch64/iterators.md (SVE_INT_BINARY_SD): New code iterator.
16228 (optab, sve_int_op): Handle div and udiv.
16229 * config/aarch64/aarch64-sve.md (<optab><mode>3): New expander
16230 for SVE_INT_BINARY_SD.
16231 (*<optab><mode>3): New insn for the same.
16233 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
16235 * tree-vect-patterns.c: Include predict.h.
16236 (vect_recog_divmod_pattern): Restrict check for division support
16237 to when optimizing for size.
16239 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
16241 * doc/sourcebuild.texi (vect_double_cond_arith: Document.
16242 * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 4.
16243 (gimple_match_op::gimple_match_op): Add an overload for 4 operands.
16244 (gimple_match_op::set_op): Likewise.
16245 (gimple_resimplify4): Declare.
16246 * genmatch.c (get_operand_type): Handle CFN_COND_* functions.
16247 (expr::gen_transform): Likewise.
16248 (decision_tree::gen): Generate a simplification routine for 4 operands.
16249 * gimple-match-head.c (gimple_simplify): Add an overload for
16250 4 operands. In the top-level function, handle up to 4 call
16251 arguments and call gimple_resimplify4.
16252 (gimple_resimplify4): New function.
16253 (build_call_internal): Pass a fourth operand.
16254 (maybe_push_to_seq): Likewise.
16255 * match.pd (UNCOND_BINARY, COND_BINARY): New operator lists.
16256 Fold VEC_COND_EXPRs of an operation and a default value into
16257 an IFN_COND_* function if possible.
16258 * config/aarch64/iterators.md (UNSPEC_COND_MAX, UNSPEC_COND_MIN):
16260 (SVE_COND_FP_BINARY): Include them.
16261 (optab, sve_fp_op): Handle them.
16262 (SVE_INT_BINARY_REV): New code iterator.
16263 (SVE_COND_FP_BINARY_REV): New int iterator.
16264 (commutative): New int attribute.
16265 * config/aarch64/aarch64-protos.h (aarch64_sve_prepare_conditional_op):
16267 * config/aarch64/aarch64.c (aarch64_sve_prepare_conditional_op): New
16269 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Use it.
16270 (*cond_<optab><mode>): New patterns for reversed operands.
16272 2018-05-25 Richard Biener <rguenther@suse.de>
16274 * tree-vectorizer.h (STMT_VINFO_GROUP_*, GROUP_*): Remove.
16275 (DR_GROUP_*): New, assert we have non-NULL ->data_ref_info.
16276 (REDUC_GROUP_*): New, assert we have NULL ->data_ref_info.
16277 (STMT_VINFO_GROUPED_ACCESS): Adjust.
16278 * tree-vect-data-refs.c (everywhere): Adjust users.
16279 * tree-vect-loop.c (everywhere): Likewise.
16280 * tree-vect-slp.c (everywhere): Likewise.
16281 * tree-vect-stmts.c (everywhere): Likewise.
16282 * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
16284 2018-05-25 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
16286 * configure.ac (gcc_cv_as_section_has_e): Move to common section.
16288 (gcc_cv_as_section_exclude): ... this.
16289 Try Solaris as #exclude syntax.
16290 * configure: Regenerate.
16291 * config.in: Regenerate.
16292 * config/i386/i386.c (i386_solaris_elf_named_section): Handle
16294 * config/sparc/sparc.c (sparc_solaris_elf_asm_named_section)
16295 [HAVE_GAS_SECTION_EXCLUDE]: Handle SECTION_EXCLUDE.
16297 * varasm.c (default_elf_asm_named_section): Don't check if
16298 HAVE_GAS_SECTION_EXCLUDE is defined.
16300 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
16302 * doc/md.texi: Update the documentation of the cond_* optabs
16303 to mention the new final operand. Fix GET_MODE_NUNITS call.
16304 Describe the scalar case too.
16305 * internal-fn.def (IFN_EXTRACT_LAST): Change type to fold_left.
16306 * internal-fn.c (expand_cond_unary_optab_fn): Expect 3 operands
16308 (expand_cond_binary_optab_fn): Expect 4 operands instead of 3.
16309 (get_conditional_internal_fn): Update comment.
16310 * tree-vect-loop.c (vectorizable_reduction): Pass the original
16311 accumulator value as a final argument to conditional functions.
16312 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Turn into
16313 a define_expand and add an "else" operand. Assert for now that
16314 the else operand is equal to operand 2. Use SVE_INT_BINARY and
16315 SVE_COND_FP_BINARY instead of SVE_COND_INT_OP and SVE_COND_FP_OP.
16316 (*cond_<optab><mode>): New patterns.
16317 * config/aarch64/iterators.md (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX)
16318 (UNSPEC_COND_SMIN, UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
16319 (UNSPEC_COND_EOR): Delete.
16320 (optab): Remove associated mappings.
16321 (SVE_INT_BINARY): New code iterator.
16322 (sve_int_op): Remove int attribute and add "minus" to the code
16324 (SVE_COND_INT_OP): Delete.
16325 (SVE_COND_FP_OP): Rename to...
16326 (SVE_COND_FP_BINARY): ...this.
16328 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
16330 * optabs.c (can_reuse_operands_p): New function.
16331 (maybe_legitimize_operands): Try to reuse the results for
16334 2018-05-24 Uros Bizjak <ubizjak@gmail.com>
16336 * config/i386/sse.md (cvtusi2<ssescalarmodesuffix>64<round_name>):
16337 Add {q} suffix to insn mnemonic.
16339 2018-05-23 Jozef Lawrynowicz <jozef.l@mittosystems.com>
16341 * config/msp430/msp430.c (TARGET_WARN_FUNC_RETURN): Define.
16342 (msp430_warn_func_return): New.
16344 2018-05-24 Roger Sayle <roger@nextmovesoftware.com>
16346 * fold-const.c (tree_nonzero_bits): New function.
16347 * fold-const.h (tree_nonzero_bits): Likewise.
16348 * match.pd (POPCOUNT): New patterns to fold BUILTIN_POPCOUNT and
16349 friends. POPCOUNT(x&1) => x&1, POPCOUNT(x)==0 => x==0, etc.
16351 2018-05-24 H.J. Lu <hongjiu.lu@intel.com>
16355 * varasm.c (assemble_alias): Check ifunc_resolver only on
16358 2018-05-24 Uros Bizjak <ubizjak@gmail.com>
16361 * config/i386/sse.md (movdi_to_sse): Do not generate pseudo
16362 when memory input operand is handled.
16364 2018-05-24 Luis Machado <luis.machado@linaro.org>
16366 * config/aarch64/aarch64.c (qdf24xx_addrcost_table): New static
16368 (qdf24xx_tunings) <addr_costs>: Set to qdf24xx_addrcost_table.
16370 2018-05-24 Richard Sandiford <richard.sandiford@linaro.org>
16372 * match.pd: Delay FMA folds until after vectorization.
16374 2018-05-24 Andre Vieira <andre.simoesdiasvieira@arm.com>
16377 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
16378 address check not strict.
16380 2018-05-24 Richard Sandiford <richard.sandiford@linaro.org>
16382 * gimple-match.h (gimple_match_op): New class.
16383 (mprts_hook): Replace parameters with a gimple_match_op *.
16384 (maybe_build_generic_op): Likewise.
16385 (gimple_simplified_result_is_gimple_val): Replace parameters with
16386 a const gimple_match_op *.
16387 (gimple_simplify): Replace code_helper * and tree * parameters with
16388 a gimple_match_op * parameter.
16389 (gimple_resimplify1): Replace code_helper *, tree and tree *
16390 parameters with a gimple_match_op * parameter.
16391 (gimple_resimplify2): Likewise.
16392 (gimple_resimplify3): Likewise.
16393 (maybe_push_res_to_seq): Replace code_helper, tree and tree *
16394 parameters with a gimple_match_op * parameter.
16395 * gimple-match-head.c (gimple_simplify): Change prototypes of
16396 auto-generated functions to take a gimple_match_op * instead of
16397 separate code_helper * and tree * parameters. Make the same
16398 change in the top-level overload and update calls to the
16399 gimple_resimplify routines. Update calls to the auto-generated
16400 functions and to maybe_push_res_to_seq in the publicly-facing
16401 operation-specific gimple_simplify overloads.
16402 (gimple_match_op::MAX_NUM_OPS): Define.
16403 (gimple_resimplify1): Replace rcode and ops with a single res_op
16404 parameter. Update call to gimple_simplify.
16405 (gimple_resimplify2): Likewise.
16406 (gimple_resimplify3): Likewise.
16407 (mprts_hook): Replace parameters with a gimple_match_op *.
16408 (maybe_build_generic_op): Likewise.
16409 (build_call_internal): Replace type, nargs and ops with
16410 a gimple_match_op *.
16411 (maybe_push_res_to_seq): Replace res_code, type and ops parameters
16412 with a single gimple_match_op *. Update calls to mprts_hook,
16413 build_call_internal and gimple_simplified_result_is_gimple_val.
16414 Factor out code that is common to the tree_code and combined_fn cases.
16415 * genmatch.c (expr::gen_transform): Replace tem_code and
16416 tem_ops with a gimple_match_op called tem_op. Update calls
16417 to the gimple_resimplify functions and maybe_push_res_to_seq.
16418 (dt_simplify::gen_1): Manipulate res_op instead of res_code and
16419 res_ops. Update call to the gimple_resimplify functions.
16420 (dt_simplify::gen): Pass res_op instead of res_code and res_ops.
16421 (decision_tree::gen): Make the functions take a gimple_match_op *
16422 called res_op instead of separate res_code and res_ops parameters.
16423 Update call accordingly.
16424 * gimple-fold.c (replace_stmt_with_simplification): Replace rcode
16425 and ops with a single res_op parameter. Update calls to
16426 maybe_build_generic_op and maybe_push_res_to_seq.
16427 (fold_stmt_1): Update calls to gimple_simplify and
16428 replace_stmt_with_simplification.
16429 (gimple_fold_stmt_to_constant_1): Update calls to gimple_simplify
16430 and gimple_simplified_result_is_gimple_val.
16431 * tree-cfgcleanup.c (cleanup_control_expr_graph): Update call to
16433 * tree-ssa-sccvn.c (vn_lookup_simplify_result): Replace parameters
16434 with a gimple_match_op *.
16435 (vn_nary_build_or_lookup): Likewise. Update call to
16436 vn_nary_build_or_lookup_1.
16437 (vn_nary_build_or_lookup_1): Replace rcode, type and ops with a
16438 gimple_match_op *. Update calls to the gimple_resimplify routines
16439 and to gimple_simplified_result_is_gimple_val.
16440 (vn_nary_simplify): Update call to vn_nary_build_or_lookup_1.
16441 Use gimple_match_op::MAX_NUM_OPS instead of a hard-coded 3.
16442 (vn_reference_lookup_3): Update call to vn_nary_build_or_lookup.
16443 (visit_nary_op): Likewise.
16444 (visit_reference_op_load): Likewise.
16446 2018-05-23 Luis Machado <luis.machado@linaro.org>
16448 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Use correct type
16449 modifier for printing the step amount.
16451 2018-05-23 Jozef Lawrynowicz <jozef.l@somniumtech.com>
16454 * tree.c (build_common_tree_nodes): Dont set TYPE_SIZE for __intN
16457 2018-05-23 Segher Boessenkool <segher@kernel.crashing.org>
16459 * doc/sourcebuild.texi (Endianness): New subsubsection.
16461 2018-05-23 Luis Machado <luis.machado@linaro.org>
16463 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
16464 <prefetch_dynamic_strides>: New const bool field.
16465 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
16466 prefetch_dynamic_strides.
16467 (exynosm1_prefetch_tune): Likewise.
16468 (thunderxt88_prefetch_tune): Likewise.
16469 (thunderx_prefetch_tune): Likewise.
16470 (thunderx2t99_prefetch_tune): Likewise.
16471 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides to
16473 (aarch64_override_options_internal): Update to set
16474 PARAM_PREFETCH_DYNAMIC_STRIDES.
16475 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
16476 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
16477 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
16478 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
16479 prefetch-dynamic-strides setting.
16481 2018-05-23 Luis Machado <luis.machado@linaro.org>
16483 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
16484 <minimum_stride>: New const int field.
16485 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
16486 minimum_stride field defaulting to -1.
16487 (exynosm1_prefetch_tune): Likewise.
16488 (thunderxt88_prefetch_tune): Likewise.
16489 (thunderx_prefetch_tune): Likewise.
16490 (thunderx2t99_prefetch_tune): Likewise.
16491 (qdf24xx_prefetch_tune) <minimum_stride>: Set to 2048.
16492 <default_opt_level>: Set to 3.
16493 (aarch64_override_options_internal): Update to set
16494 PARAM_PREFETCH_MINIMUM_STRIDE.
16495 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
16496 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
16497 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
16498 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
16499 stride is constant and is below the minimum stride threshold.
16501 2018-05-23 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
16503 * config/arm/arm-cpus.in (mode26): Delete.
16504 (armv4): Delete mode26 reference.
16505 * config/arm/arm.c (arm_configure_build_target): Delete use of
16508 2018-05-23 Uros Bizjak <ubizjak@gmail.com>
16510 * config/i386/i386.md (*floatuns<SWI48:mode><MODEF:mode>2_avx512):
16512 (floatunssi<mode>2): Also enable for AVX512F and TARGET_SSE_MATH.
16513 Rewrite expander pattern. Emit gen_floatunssi<mode>2_i387_with_xmm
16515 (floatunsdisf2): Rewrite expander pattern. Hanlde TARGET_AVX512F.
16516 (floatunsdidf2): Ditto.
16518 2018-05-23 Uros Bizjak <ubizjak@gmail.com>
16520 * config/i386/i386.md (fixuns_trunc<mode>di2): New insn pattern.
16521 (fixuns_trunc<mode>si2_avx512f): Ditto.
16522 (*fixuns_trunc<mode>si2_avx512f_zext): Ditto.
16523 (fixuns_trunc<mode>si2): Also enable for AVX512F and TARGET_SSE_MATH.
16524 Emit fixuns_trunc<mode>si2_avx512f for AVX512F targets.
16526 2018-05-23 Alexander Monakov <amonakov@ispras.ru>
16528 PR rtl-optimization/79985
16529 * df-scan.c (df_insn_refs_collect): Remove special case for
16530 global registers and asm statements.
16532 2018-05-23 Alexander Monakov <amonakov@ispras.ru>
16534 * extend.texi (Global Register Variables): Rewrite the bullet list.
16535 Note that the register is available for allocation. Note that access
16536 via inline asm must use constraints. Add note about async-signal
16537 handlers. Remove paragraph about automagic register selection.
16539 2018-05-23 Richard Biener <rguenther@suse.de>
16541 * tree-ssa-sccvn.c (vn_reference_lookup_3): Remove restriction
16542 of fixed offset from memset VN.
16544 2018-05-23 Bill Schmidt <wschmidt@linux.ibm.com>
16546 * gimple-ssa-strength-reduction.c (struct slsr_cand_d): Add
16547 first_interp field.
16548 (alloc_cand_and_find_basis): Initialize first_interp field.
16549 (slsr_process_mul): Modify first_interp field.
16550 (slsr_process_add): Likewise.
16551 (slsr_process_cast): Modify first_interp field for each new
16553 (slsr_process_copy): Likewise.
16554 (dump_candidate): Dump first_interp field.
16555 (replace_mult_candidate): Process all interpretations, not just
16557 (replace_rhs_if_not_dup): Likewise.
16558 (replace_one_candidate): Likewise.
16560 2018-05-23 Wilco Dijkstra <wdijkstr@arm.com>
16562 * config/aarch64/aarch64.c (aarch64_use_frame_pointer):
16564 (aarch64_needs_frame_chain): New function.
16565 (aarch64_parse_override_string): Set aarch64_use_frame_pointer.
16567 2018-05-23 Sudakshina Das <sudi.das@arm.com>
16570 * common/config/aarch64/aarch64-common.c (aarch64_handle_option):
16571 Check val before adding MASK_STRICT_ALIGN to opts->x_target_flags.
16572 * config/aarch64/aarch64.opt (mstrict-align): Remove RejectNegative.
16573 * config/aarch64/aarch64.c (aarch64_attributes): Mark allow_neg
16574 as true for strict-align.
16575 (aarch64_can_inline_p): Perform checks even when callee has no
16576 attributes to check for strict alignment.
16577 * doc/extend.texi (AArch64 Function Attributes): Document
16579 * doc/invoke.texi: (AArch64 Options): Likewise.
16581 2018-05-23 Richard Sandiford <richard.sandiford@linaro.org>
16583 PR tree-optimization/85853
16584 * tree-vect-slp.c (vect_slp_analyze_node_operations): Split out
16585 the handling of the root of the node to...
16586 (vect_slp_analyze_node_operations_1): ...this new function,
16587 and run the whole thing with the child nodes' def types
16588 set according to their SLP node's def type.
16590 2018-05-23 Richard Biener <rguenther@suse.de>
16592 PR middle-end/85874
16593 * tree-data-ref.c (create_runtime_alias_checks): Defer
16594 and ignore overflow warnings.
16596 2018-05-23 Yury Gribov <tetra2005@gmail.com>
16598 PR tree-optimization/85822
16599 * tree-vrp.c (is_masked_range_test): Fix handling of negative
16602 2018-05-23 Richard Biener <rguenther@suse.de>
16604 * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
16605 memset constants via native_interpret_expr.
16607 2018-05-22 H.J. Lu <hongjiu.lu@intel.com>
16610 * cgraph.h (cgraph_node::create): Set ifunc_resolver for ifunc
16612 (cgraph_node::create_alias): Likewise.
16613 (cgraph_node::get_availability): Check ifunc_resolver instead
16614 of looking up ifunc attribute.
16615 * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
16616 * varasm.c (do_assemble_alias): Likewise.
16617 (assemble_alias): Likewise.
16618 (default_binds_local_p_3): Likewise.
16619 * cgraph.h (cgraph_node): Add ifunc_resolver.
16620 (cgraph_node::only_called_directly_or_aliased_p): Return false
16621 for IFUNC resolver.
16622 * lto-cgraph.c (input_node): Set ifunc_resolver for ifunc
16624 * symtab.c (symtab_node::verify_base): Verify that ifunc_resolver
16625 is equivalent to lookup_attribute ("ifunc", DECL_ATTRIBUTES (decl)).
16626 (symtab_node::binds_to_current_def_p): Check ifunc_resolver
16627 instead of looking up ifunc attribute.
16629 2018-05-22 Luis Machado <luis.machado@linaro.org>
16631 * config/aarch64/aarch64.md (*ashift<mode>_extv_bfiz): New pattern.
16633 2018-05-22 Martin Sebor <msebor@redhat.com>
16635 PR middle-end/85359
16636 * builtins.c (expand_builtin_strcpy): Call maybe_warn_nonstring_arg
16637 only when expasion succeeds.
16638 (expand_builtin_strcmp): Same.
16639 (expand_builtin_strncmp): Same.
16641 2018-05-22 Martin Sebor <msebor@redhat.com>
16643 * calls.c (maybe_warn_nonstring_arg): Fix a typo in a comment.
16645 2018-05-22 Jackson Woodruff <jackson.woodruff@arm.com>
16646 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
16648 * config/aarch64/aarch64-ldpstp.md: Replace uses of
16649 aarch64_mem_pair_operand with memory_operand and delete operand swapping
16651 * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
16652 Add check for legitimate_address.
16653 (aarch64_gen_adjusted_ldpstp): Swap operands where appropriate.
16654 (aarch64_swap_ldrstr_operands): New.
16655 * config/aarch64/aarch64-protos.h (aarch64_swap_ldrstr_operands):
16658 2018-05-22 Jackson Woodruff <jackson.woodruff@arm.com>
16659 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
16661 * config/aarch64/aarch64.md: New patterns to generate stp
16663 (store_pair_sw, store_pair_dw): New patterns to generate stp for
16664 single words and double words.
16665 (load_pair_sw, load_pair_dw): Likewise.
16666 (store_pair_sf, store_pair_df, store_pair_si, store_pair_di):
16668 (load_pair_sf, load_pair_df, load_pair_si, load_pair_di):
16670 * config/aarch64/aarch64-ldpstp.md: Modify peephole
16671 for different mode ldpstp and add peephole for merged zero stores.
16672 Likewise for loads.
16673 * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
16675 (aarch64_gen_store_pair): Rename calls to match new patterns.
16676 (aarch64_gen_load_pair): Rename calls to match new patterns.
16677 * config/aarch64/aarch64-simd.md (load_pair<mode>): Rename to...
16678 (load_pair<DREG:mode><DREG2:mode>): ... This.
16679 (store_pair<mode>): Rename to...
16680 (vec_store_pair<DREG:mode><DREG2:mode>): ... This.
16681 * config/aarch64/iterators.md (DREG, DREG2, DX2, SX, SX2, DSX):
16682 New mode iterators.
16683 (V_INT_EQUIV): Handle SImode.
16684 * config/aarch64/predicates.md (aarch64_reg_zero_or_fp_zero):
16687 2018-05-22 Martin Sebor <msebor@redhat.com>
16690 * calls.c (maybe_warn_nonstring_arg): Use string length to set
16691 or ajust the presumed bound on an operation to avoid unnecessary
16694 2018-05-22 Martin Sebor <msebor@redhat.com>
16696 PR tree-optimization/85826
16697 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Avoid
16698 assuming that a DECL necesarily has a constant size.
16700 2018-05-22 Richard Sandiford <richard.sandiford@linaro.org>
16702 PR middle-end/85862
16703 * internal-fn.c (expand_direct_optab_fn): Cope with a null lhs.
16705 2018-05-22 Richard Biener <rguenther@suse.de>
16707 PR tree-optimization/85834
16708 * tree-ssa-sccvn.c (vn_reference_lookup_3): Properly handle
16709 non-constant and non-zero memset arguments.
16711 2018-05-22 Martin Liska <mliska@suse.cz>
16714 * ipa-icf.c (sem_item::add_type): Do not ICE for incomplete types.
16716 2018-05-22 Richard Biener <rguenther@suse.de>
16718 PR tree-optimization/85863
16719 * tree-vect-stmts.c (vect_is_simple_cond): Only widen invariant
16720 comparisons when vectype is specified.
16721 (vectorizable_condition): Do not specify vectype for
16722 vect_is_simple_cond when SLP vectorizing.
16724 2018-05-21 Michael Meissner <meissner@linux.ibm.com>
16727 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Do not
16728 define __ibm128 as long double.
16729 * config/rs6000/rs6000.c (rs6000_init_builtins): Create __ibm128
16730 as a distinct type when IEEE 128-bit support is enabled.
16731 (init_float128_ieee): Fix up conversions between IFmode and IEEE
16732 128-bit types to use the correct functions.
16733 (rs6000_expand_float128_convert): Use explicit FLOAT_EXTEND to
16734 convert between 128-bit floating point types that have different
16735 modes but the same representation, instead of using gen_lowpart to
16737 * config/rs6000/rs6000.md (IFKF): New iterator for IFmode and
16739 (IFKF_reg): New attributes to give the register constraints for
16741 (extend<mode>tf2_internal): New insns to mark an explicit
16742 conversion between 128-bit floating point types that have a
16743 different mode but share the same representation.
16745 2018-05-21 Richard Sandiford <richard.sandiford@linaro.org>
16747 PR tree-optimization/85814
16748 * tree-ssa-strlen.c (get_stridx_plus_constant): Cope with
16749 a null return from get_strinfo when unsharing the next
16750 strinfo in the chain.
16752 2018-05-21 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
16755 * varasm.c (weak_finish): Clean up weak_decls.
16757 2018-05-21 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
16759 * config/aarch64/aarch64.md ("unspec"): Define UNSPEC_SABAL,
16760 UNSPEC_SABDL2, UNSPEC_SADALP, UNSPEC_UABAL, UNSPEC_UABDL2,
16761 UNSPEC_UADALP values.
16762 * config/aarch64/iterators.md (ABAL): New int iterator.
16765 (sur): Add mappings for the above.
16766 * config/aarch64/aarch64-simd.md (aarch64_<sur>abdl2<mode>_3):
16768 (aarch64_<sur>abal<mode>_4): Likewise.
16769 (aarch64_<sur>adalp<mode>_3): Likewise.
16770 (<sur>sadv16qi): New define_expand.
16772 2018-05-21 Alexander Nesterovskiy <alexander.nesterovskiy@intel.com>
16774 * config/i386/i386.md (*movsf_internal): AVX falsedep fix.
16775 (*movdf_internal): Ditto.
16776 (*rcpsf2_sse): Ditto.
16777 (*rsqrtsf2_sse): Ditto.
16778 (*sqrt<mode>2_sse): Ditto.
16780 2018-05-21 Tamar Christina <tamar.christina@arm.com>
16782 * config/aarch64/aarch64-simd.md (aarch64_eor3qv8hi): Change to
16784 (aarch64_bcaxqv8hi): Change to bcaxq<mode>4.
16785 * config/aarch64/aarch64-simd-builtins.def (veor3q_u8, veor3q_u32,
16786 veor3q_u64, veor3q_s8, veor3q_s16, veor3q_s32, veor3q_s64, vbcaxq_u8,
16787 vbcaxq_u32, vbcaxq_u64, vbcaxq_s8, vbcaxq_s16, vbcaxq_s32,
16789 * config/aarch64/arm_neon.h: Likewise.
16790 * config/aarch64/iterators.md (VQ_I): New.
16792 2018-05-21 Alexey Brodkin <abrodkin@synopsys.com>
16794 * config.gcc: Add arc/t-multilib-linux to tmake_file for
16796 * config/arc/t-multilib-linux: Specify MULTILIB_OPTIONS and
16799 2018-05-20 Chung-Ju Wu <jasonwucj@gmail.com>
16801 * config/nds32/constraints.md (S): New constraint.
16802 * config/nds32/nds32.md (call_internal): Use constraint S.
16803 (call_value_internal): Likewise.
16804 (sibcall_internal): Likewise.
16805 (sibcall_value_internal): Likewise.
16807 2018-05-20 Kito Cheng <kito.cheng@gmail.com>
16808 Chung-Ju Wu <jasonwucj@gmail.com>
16810 * config/nds32/nds32.c (nds32_register_move_cost): Take garywolf cpu
16811 into consideration.
16813 2018-05-20 Kito Cheng <kito.cheng@gmail.com>
16814 Chung-Ju Wu <jasonwucj@gmail.com>
16816 * config/nds32/nds32-cost.c (rtx_cost_model_t): New structure.
16817 (insn_size_16bit, insn_size_32bit): New variables for cost evaluation.
16818 (nds32_rtx_costs_impl): Simplify.
16819 (nds32_address_cost_impl): Simplify.
16820 (nds32_init_rtx_costs): New function.
16821 (nds32_rtx_costs_speed_prefer): Likewise.
16822 (nds32_rtx_costs_size_prefer): Likewise.
16823 (nds32_address_cost_speed_prefer): Likewise.
16824 (nds32_address_cost_speed_fwprop): Likewise.
16825 (nds32_address_cost_size_prefer): Likewise.
16826 * config/nds32/nds32-protos.h (nds32_init_rtx_costs): Declare.
16827 * config/nds32/nds32.c (nds32_option_override): Use
16828 nds32_init_rtx_costs function.
16830 2018-05-20 Chung-Ju Wu <jasonwucj@gmail.com>
16832 * config/nds32/nds32.c (nds32_asm_file_start): Output pipeline model.
16833 * config/nds32/nds32.h (TARGET_PIPELINE_N7): Define.
16834 (TARGET_PIPELINE_N8): Likewise.
16835 (TARGET_PIPELINE_N10): Likewise.
16836 (TARGET_PIPELINE_N13): Likewise.
16837 (TARGET_PIPELINE_GRAYWOLF): Likewise.
16839 2018-05-19 Monk Chiang <sh.chiang04@gmail.com>
16841 * config/nds32/nds32-fpu.md: Update copyright year.
16843 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
16845 * config/nds32/nds32.h (ASM_SPEC): Adjust spec rule.
16847 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
16849 * config/nds32/nds32.c
16850 (nds32_md_asm_adjust): Consider flag_inline_asm_r15 variable.
16851 * config/nds32/nds32.opt (minline-asm-r15): New option.
16853 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
16855 * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS): Add
16857 * config/nds32/nds32.md (abssi2): New pattern.
16859 2018-05-19 Uros Bizjak <ubizjak@gmail.com>
16861 * config/i386/i386.md (rex64namesuffix): New mode attribute.
16862 * config/i386/sse.md (sse_cvtsi2ss<rex64namesuffix><round_name>):
16863 Merge insn pattern from sse_cvtsi2ss<round_name> and
16864 sse_cvtsi2ssq<round_name> using SWI48 mode iterator.
16865 (sse_cvtss2si<rex64namesuffix><round_name>): Merge insn pattern
16866 from sse_cvtss2si<round_name> and sse_cvtss2siq<round_name>
16867 using SWI48 mode iterator.
16868 (sse_cvtss2si<rex64namesuffix>_2): Merge insn pattern from
16869 sse_cvtss2si_2 and sse_cvtss2siq_2 using SWI48 mode iterator.
16870 (sse_cvttss2si<rex64namesuffix><round_saeonly_name>): Merge insn
16871 pattern from sse_cvttss2si<round_saeonly_name>
16872 and sse_cvttss2siq<round_saeonly_name> using SWI48 mode iterator.
16873 (avx512f_vcvtss2usi<rex64namesuffix><round_name>): Merge insn pattern
16874 from avx512f_vcvtss2usi<round_name> and avx512f_vcvtss2usiq<round_name>
16875 using SWI48 mode iterator.
16876 (avx512f_vcvttss2usi<rex64namesuffix><round_saeonly_name>): Merge
16877 insn pattern from avx512f_vcvttss2usi<round_saeonly_name> and
16878 avx512f_vcvttss2usiq<round_saeonly_name> using SWI48 mode iterator.
16879 (avx512f_vcvtsd2usi<rex64namesuffix><round_name>): Merge insn pattern
16880 from avx512f_vcvtsd2usi<round_name> and avx512f_vcvtsd2usiq<round_name>
16881 using SWI48 mode iterator.
16882 (avx512f_vcvttsd2usi<rex64namesuffix><round_saeonly_name>): Merge
16883 insn pattern from avx512f_vcvttsd2usi<round_saeonly_name> and
16884 avx512f_vcvttsd2usiq<round_saeonly_name> using SWI48 mode iterator.
16885 (sse2_cvtsd2si<rex64namesuffix><round_name>): Merge insn pattern from
16886 sse2_cvtsd2si<round_name> and sse2_cvtsd2siq<round_name> using
16887 SWI48 mode iterator.
16888 (sse2_cvtsd2si<rex64namesuffix>_2): Merge insn pattern from
16889 sse2_cvtsd2si_2 and sse2_cvtsd2siq_2 using SWI48 mode iterator.
16890 (sse_cvttsd2si<rex64namesuffix><round_saeonly_name>): Merge insn
16891 pattern from sse_cvttsd2si<round_saeonly_name>
16892 and sse_cvttsd2siq<round_saeonly_name> using SWI48 mode iterator.
16894 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
16896 * config/nds32/nds32-md-auxiliary.c
16897 (nds32_valid_smw_lwm_base_p): Refine.
16898 (nds32_output_smw_single_word): Refine.
16899 (nds32_output_smw_double_word): New.
16900 * config/nds32/nds32-protos.h (nds32_output_smw_double_word): New.
16902 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
16904 * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push): Refine.
16905 (nds32_output_stack_pop): Refine.
16906 (nds32_expand_unaligned_load): Refine.
16907 (nds32_expand_unaligned_store): Refine.
16909 2018-05-19 Kuan-Lin Chen <kuanlinchentw@gmail.com>
16910 Chung-Ju Wu <jasonwucj@gmail.com>
16912 * config/nds32/constants.md: Add TP_REGNUM constant.
16913 (unspec_element): Add UNSPEC_GOTINIT, UNSPEC_GOT, UNSPEC_GOTOFF,
16914 UNSPEC_PLT, UNSPEC_TLSGD, UNSPEC_TLSLD, UNSPEC_TLSIE, UNSPEC_TLSLE and
16916 * config/nds32/nds32-doubleword.md: Consider flag_pic.
16917 * config/nds32/nds32-dspext.md (mov<mode>): Expand TLS and PIC cases.
16918 * config/nds32/nds32-predicates.c (nds32_const_unspec_p): New.
16919 * config/nds32/nds32-md-auxiliary.c: Implementation that support TLS
16920 and PIC code generation.
16921 * config/nds32/nds32-protos.h: Declarations that support TLS and PIC
16923 * config/nds32/nds32-relax-opt.c: Consider TLS and PIC for relax
16925 * config/nds32/nds32.md: Support TLS and PIC.
16926 * config/nds32/nds32.c: Support TLS and PIC.
16927 * config/nds32/nds32.h (nds32_relax_insn_type): New enum type.
16928 * config/nds32/predicates.md (nds32_nonunspec_symbolic_operand): New
16931 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
16933 * config/nds32/nds32-predicates.c (const_vector_to_hwint): Use machine
16934 mode with E_ prefix.
16936 2018-05-19 Kuan-Lin Chen <kuanlinchentw@gmail.com>
16937 Chung-Ju Wu <jasonwucj@gmail.com>
16939 * config/nds32/constants.md (unspec_element): Add UNSPEC_ICT.
16940 * config/nds32/nds32-md-auxiliary.c
16941 (symbolic_reference_mentioned_p): New.
16942 (nds32_legitimize_ict_address): New.
16943 (nds32_expand_ict_move): New.
16944 (nds32_indirect_call_referenced_p): New.
16945 (nds32_symbol_binds_local_p): Delete.
16946 (nds32_long_call_p): Modify.
16947 * config/nds32/nds32-opts.h (nds32_ict_model_type): New enum type.
16948 * config/nds32/nds32-protos.h
16949 (symbolic_reference_mentioned_p): Declare.
16950 (nds32_legitimize_ict_address): Declare.
16951 (nds32_expand_ict_move): Declare.
16952 (nds32_indirect_call_referenced_p): Declare.
16953 * config/nds32/nds32-relax-opt.c (nds32_ict_const_p): New.
16954 (nds32_relax_group): Use nds32_ict_const_p as condition.
16955 * config/nds32/nds32.c (nds32_attribute_table): Add "indirect_call".
16956 (nds32_asm_file_start): Output ict_model directive in asm code.
16957 (nds32_legitimate_address_p): Consider indirect call.
16958 (nds32_print_operand): Consider indirect call.
16959 (nds32_print_operand_address): Consider indirect call.
16960 (nds32_insert_attributes): Handle "indirect_call" attribute.
16961 (TARGET_LEGITIMATE_ADDRESS_P): Define.
16962 (TARGET_LEGITIMATE_CONSTANT_P): Define.
16963 (TARGET_CANNOT_FORCE_CONST_MEM): Define.
16964 (TARGET_DELEGITIMIZE_ADDRESS): Define.
16965 (TARGET_ASM_OUTPUT_ADDR_CONST_EXTRA): Define.
16966 * config/nds32/nds32.h (SYMBOLIC_CONST_P): Define.
16967 (TARGET_ICT_MODEL_SMALL): Define.
16968 (TARGET_ICT_MODEL_LARGE): Define.
16969 * config/nds32/nds32.md (movsi): Consider ict model.
16970 (call, call_value): Consider ict model.
16971 (sibcall, sibcall_value): Consider ict model.
16972 * config/nds32/nds32.opt (mict-model): New option.
16973 * config/nds32/predicates.md (nds32_symbolic_operand): Consider ict
16976 2018-05-18 Kito Cheng <kito.cheng@gmail.com>
16977 Monk Chiang <sh.chiang04@gmail.com>
16978 Jim Wilson <jimw@sifive.com>
16980 * common/config/riscv/riscv-common.c (riscv_parse_arch_string):
16981 Add support to parse rv32e*. Clear MASK_RVE for rv32i and rv64i.
16982 * config.gcc (riscv*-*-*): Add support for rv32e* and ilp32e.
16983 * config/riscv/riscv-c.c (riscv_cpu_cpp_builtins): Define
16984 __riscv_32e when TARGET_RVE. Handle ABI_ILP32E as soft-float ABI.
16985 * config/riscv/riscv-opts.h (riscv_abi_type): Add ABI_ILP32E.
16986 * config/riscv/riscv.c (riscv_compute_frame_info): When TARGET_RVE,
16987 compute save_libcall_adjustment properly.
16988 (riscv_option_override): Call error if TARGET_RVE and not ABI_ILP32E.
16989 (riscv_conditional_register_usage): Handle TARGET_RVE and ABI_ILP32E.
16990 * config/riscv/riscv.h (UNITS_PER_FP_ARG): Handle ABI_ILP32E.
16991 (STACK_BOUNDARY, ABI_STACK_BOUNDARY): Handle TARGET_RVE.
16992 (GP_REG_LAST, MAX_ARGS_IN_REGISTERS): Likewise.
16993 (ABI_SPEC): Handle mabi=ilp32e.
16994 * config/riscv/riscv.opt (abi_type): Add ABI_ILP32E.
16995 (RVE): Add RVE mask.
16996 * doc/invoke.texi (RISC-V options) <-mabi>: Add ilp32e info.
16997 <-march>: Add rv32e as an example.
16999 2018-05-18 Marc Glisse <marc.glisse@inria.fr>
17002 * tree-ssa-structalias.c (create_variable_info_for_1): Extra argument.
17003 (intra_create_variable_infos): Handle C++ constructors.
17005 2018-05-18 Martin Liska <mliska@suse.cz>
17007 * passes.def: Remove a redundant pass.
17009 2018-05-18 Eric Botcazou <ebotcazou@adacore.com>
17012 * config/sparc/sparc.c (sparc_expand_builtin): Always initialize op[0].
17014 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
17016 * config/arm/arm-cpus.in (armv3m, mode32): Delete features.
17018 (ARMv2, ARMv3, ARMv3m): Delete fgroups.
17020 (armv2, armv2a, armv3, armv3m): Delete architectures.
17021 (arm2, arm250, arm3, arm6, arm60, arm600, arm610, arm620,
17022 arm7, arm7d, arm7di, arm70, arm700, arm700i, arm710, arm720,
17023 arm710c, arm7100, arm7500, arm7500fe, arm7m, arm7dm, arm7dmi):
17025 * config/arm/arm.md (maddsidi4): Remove check for arm_arch3m.
17026 (*mulsidi3adddi): Likewise.
17027 (mulsidi3): Likewise.
17028 (*mulsidi3_nov6): Likewise.
17029 (umulsidi3): Likewise.
17030 (umulsidi3_nov6): Likewise.
17031 (umaddsidi4): Likewise.
17032 (*umulsidi3adddi): Likewise.
17033 (smulsi3_highpart): Likewise.
17034 (*smulsi3_highpart_nov6): Likewise.
17035 (umulsi3_highpart): Likewise.
17036 (*umulsi3_highpart_nov6): Likewise.
17037 * config/arm/arm.h (arm_arch3m): Delete.
17038 * config/arm/arm.c (arm_arch3m): Delete.
17039 (arm_option_override_internal): Update armv3-related comment.
17040 (arm_configure_build_target): Delete use of isa_bit_mode32.
17041 (arm_option_reconfigure_globals): Delete set of arm_ach3m.
17042 (arm_rtx_costs_internal): Delete check of arm_arch3m.
17043 * config/arm/arm-fixed.md (mulsq3): Delete check for arm_arch3m.
17044 (mulsa3): Likewise.
17045 (mulusa3): Likewise.
17046 * config/arm/arm-protos.h (arm_arch3m): Delete.
17047 * config/arm/arm-tables.opt: Regenerate.
17048 * config/arm/arm-tune.md: Likewise.
17049 * config/arm/t-arm-elf (all_early_nofp): Delete mentions of
17050 deleted architectures.
17052 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
17054 * config/arm/arm-cpus.in (armv5, armv5e): Delete features.
17055 (armv5t, armv5te): New features.
17056 (ARMv5, ARMv5e): Delete fgroups.
17057 (ARMv5t, ARMv5te): Adjust for above changes.
17058 (ARMv6m): Likewise.
17059 (armv5, armv5e): Delete arches.
17060 * config/arm/arm.md (*call_reg_armv5): Use arm_arch5t instead of
17062 (*call_reg_arm): Likewise.
17063 (*call_value_reg_armv5): Likewise.
17064 (*call_value_reg_arm): Likewise.
17065 (*call_symbol): Likewise.
17066 (*call_value_symbol): Likewise.
17067 (*sibcall_insn): Likewise.
17068 (*sibcall_value_insn): Likewise.
17069 (clzsi2): Likewise.
17070 (prefetch): Likewise.
17071 (define_split and define_peephole2 dependent on arm_arch5):
17073 * config/arm/arm.h (TARGET_LDRD): Use arm_arch5te instead of
17075 (TARGET_ARM_QBIT): Likewise.
17076 (TARGET_DSP_MULTIPLY): Likewise.
17077 (enum base_architecture): Delete BASE_ARCH_5, BASE_ARCH_5E.
17078 (arm_arch5, arm_arch5e): Delete.
17079 (arm_arch5t, arm_arch5te): Declare.
17080 * config/arm/arm.c (arm_arch5, arm_arch5e): Delete.
17081 (arm_arch5t): Declare.
17082 (arm_option_reconfigure_globals): Update for the above.
17083 (arm_options_perform_arch_sanity_checks): Update comment, replace
17084 use of arm_arch5 with arm_arch5t.
17085 (use_return_insn): Likewise.
17086 (arm_emit_call_insn): Likewise.
17087 (output_return_instruction): Likewise.
17088 (arm_final_prescan_insn): Likewise.
17089 (arm_coproc_builtin_available): Likewise.
17090 * config/arm/arm-c.c (arm_cpu_builtins): Replace arm_arch5 and
17091 arm_arch5e with arm_arch5t and arm_arch5te.
17092 * config/arm/arm-protos.h (arm_arch5, arm_arch5e): Delete.
17093 (arm_arch5t, arm_arch5te): Declare.
17094 * config/arm/arm-tables.opt: Regenerate.
17095 * config/arm/t-arm-elf: Remove references to armv5, armv5e.
17096 * config/arm/t-multilib: Likewise.
17097 * config/arm/thumb1.md (*call_reg_thumb1_v5): Check arm_arch5t
17098 instead of arm_arch5.
17099 (*call_reg_thumb1): Likewise.
17100 (*call_value_reg_thumb1_v5): Likewise.
17101 (*call_value_reg_thumb1): Likewise.
17102 * config/arm/vxworks.h (TARGET_OS_CPP_BUILTINS): Remove now
17104 * doc/invoke.texi (ARM Options): Remove references to armv5, armv5e.
17106 2018-05-18 Martin Liska <mliska@suse.cz>
17108 PR gcov-profile/84846
17109 * doc/gcov.texi: Document -t option of gcov tool.
17111 2018-05-18 Martin Liska <mliska@suse.cz>
17113 PR gcov-profile/84846
17114 * gcov.c (print_usage): Add new -t option.
17115 (process_args): Handle the option.
17116 (generate_results): Use stdout as output when requested by
17119 2018-05-18 Martin Liska <mliska@suse.cz>
17121 PR gcov-profile/84846
17122 * coverage.c (coverage_init): Write PWD to .gcno file.
17123 * doc/gcov.texi: Document how working directory is printed.
17124 * gcov-dump.c (dump_gcov_file): Print PWD.
17125 * gcov.c (output_intermediate_file): Likewise.
17126 (read_graph_file): Read PWD string.
17127 (output_lines): Print PWD.
17129 2018-05-18 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
17131 PR middle-end/85817
17132 * ipa-pure-const.c (malloc_candidate_p): Remove the check integer_zerop
17133 for retval and return false if all args to phi are zero.
17135 2018-05-18 Richard Biener <rguenther@suse.de>
17137 * gimple-ssa-evrp.c (class evrp_folder): Add simplify_stmt_using_ranges
17139 (evrp_dom_walker::before_dom_children): Call it.
17141 2018-05-18 Richard Biener <rguenther@suse.de>
17143 * tree-dfa.c (get_ref_base_and_extent): Use range-info to refine
17144 results when processing array refs with variable index.
17146 2018-05-18 Toon Moene <toon@moene.org>
17148 * doc/invoke.texi: Move -floop-unroll-and-jam documentation
17149 directly after that of -floop-interchange. Indicate that both
17150 options are enabled by default when specifying -O3.
17152 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
17154 * config/aarch64/aarch64-simd.md (vec_set<mode>): Use VALL_F16 mode
17155 iterator. Delete separate integer-mode vec_set<mode> expander.
17156 (aarch64_simd_vec_setv2di): Delete.
17157 (vec_setv2di): Delete.
17158 (aarch64_simd_vec_set<mode>): Delete all other patterns with that name.
17159 Use VALL_F16 mode iterator. Add LD1 alternative and use vwcore for
17160 the "w, r" alternative.
17162 2018-05-18 Martin Liska <mliska@suse.cz>
17164 * passes.def: Add pass_lower_switch and pass_lower_switch_O0.
17165 * tree-pass.h (make_pass_lower_switch_O0): New function.
17166 * tree-switch-conversion.c (node_has_low_bound): Remove.
17167 (node_has_high_bound): Likewise.
17168 (node_is_bounded): Likewise.
17169 (class pass_lower_switch): Make it a template type and create
17171 (pass_lower_switch::execute): Add template argument.
17172 (make_pass_lower_switch): New function.
17173 (make_pass_lower_switch_O0): New function.
17174 (do_jump_if_equal): Remove.
17175 (emit_case_nodes): Simplify to just handle all 3 cases and leave
17176 all the hard work to tree optimization passes.
17178 2018-05-18 Martin Liska <mliska@suse.cz>
17180 * dbgcnt.c (limit_low): Renamed from limit.
17181 (limit_high): New variable.
17182 (dbg_cnt_is_enabled): Check for upper limit.
17183 (dbg_cnt): Adjust dumping.
17184 (dbg_cnt_set_limit_by_index): Add new argument for high
17186 (dbg_cnt_set_limit_by_name): Likewise.
17187 (dbg_cnt_process_single_pair): Parse new format.
17188 (dbg_cnt_process_opt): Use strtok.
17189 (dbg_cnt_list_all_counters): Remove 'value' and add
17191 * doc/invoke.texi: Document changes.
17193 2018-05-18 Richard Sandiford <richard.sandiford@linaro.org>
17195 * doc/sourcebuild.texi (scalar_all_fma): Document.
17196 * tree.def (FMA_EXPR): Delete.
17197 * internal-fn.def (FMA, FMS, FNMA, FNMS): New internal functions.
17198 * internal-fn.c (ternary_direct): New macro.
17199 (expand_ternary_optab_fn): Likewise.
17200 (direct_ternary_optab_supported_p): Likewise.
17201 * Makefile.in (build/genmatch.o): Depend on case-fn-macros.h.
17202 * builtins.c (fold_builtin_fma): Delete.
17203 (fold_builtin_3): Don't call it.
17204 * cfgexpand.c (expand_debug_expr): Remove FMA_EXPR handling.
17205 * expr.c (expand_expr_real_2): Likewise.
17206 * fold-const.c (operand_equal_p): Likewise.
17207 (fold_ternary_loc): Likewise.
17208 * gimple-pretty-print.c (dump_ternary_rhs): Likewise.
17209 * gimple.c (DEFTREECODE): Likewise.
17210 * gimplify.c (gimplify_expr): Likewise.
17211 * optabs-tree.c (optab_for_tree_code): Likewise.
17212 * tree-cfg.c (verify_gimple_assign_ternary): Likewise.
17213 * tree-eh.c (operation_could_trap_p): Likewise.
17214 (stmt_could_throw_1_p): Likewise.
17215 * tree-inline.c (estimate_operator_cost): Likewise.
17216 * tree-pretty-print.c (dump_generic_node): Likewise.
17217 (op_code_prio): Likewise.
17218 * tree-ssa-loop-im.c (stmt_cost): Likewise.
17219 * tree-ssa-operands.c (get_expr_operands): Likewise.
17220 * tree.c (commutative_ternary_tree_code, add_expr): Likewise.
17221 * fold-const-call.h (fold_fma): Delete.
17222 * fold-const-call.c (fold_const_call_ssss): Handle CFN_FMS,
17223 CFN_FNMA and CFN_FNMS.
17224 (fold_fma): Delete.
17225 * genmatch.c (combined_fn): New enum.
17226 (commutative_ternary_tree_code): Remove FMA_EXPR handling.
17227 (commutative_op): New function.
17228 (commutate): Use it. Handle more than 2 operands.
17229 (dt_operand::gen_gimple_expr): Use commutative_op.
17230 (parser::parse_expr): Allow :c to be used with non-binary
17231 operators if the commutative operand is known.
17232 * gimple-ssa-backprop.c (backprop::process_builtin_call_use): Handle
17233 CFN_FMS, CFN_FNMA and CFN_FNMS.
17234 (backprop::process_assign_use): Remove FMA_EXPR handling.
17235 * hsa-gen.c (gen_hsa_insns_for_operation_assignment): Likewise.
17236 (gen_hsa_fma): New function.
17237 (gen_hsa_insn_for_internal_fn_call): Use it for IFN_FMA, IFN_FMS,
17238 IFN_FNMA and IFN_FNMS.
17239 * match.pd: Add folds for IFN_FMS, IFN_FNMA and IFN_FNMS.
17240 * gimple-fold.h (follow_all_ssa_edges): Declare.
17241 * gimple-fold.c (follow_all_ssa_edges): New function.
17242 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Use the
17243 gimple_build interface and use follow_all_ssa_edges to fold the result.
17244 (convert_mult_to_fma): Use direct_internal_fn_suppoerted_p
17245 instead of checking for optabs directly.
17246 * config/i386/i386.c (ix86_add_stmt_cost): Recognize FMAs as calls
17247 rather than FMA_EXPRs.
17248 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Create a
17249 call to IFN_FMA instead of an FMA_EXPR.
17251 2018-05-17 Jim Wilson <jimw@sifive.com>
17253 * expr.c (do_tablejump): When converting index to Pmode, if we have a
17254 sign extended promoted subreg, and the range does not have the sign bit
17255 set, then do a sign extend.
17257 * config/riscv/riscv.c (riscv_extend_comparands): In unsigned QImode
17258 test, check for sign extended subreg and/or constant operands, and
17259 do a sign extend in that case.
17261 2018-05-17 Steve Ellcey <sellcey@cavium.com>
17263 * config/aarch64/thunderx2t99.md (thunderx2t99_ls_both): Delete.
17264 (thunderx2t99_multiple): Delete psuedo-units from used cpus.
17266 (thunderx2t99_alu_shift): Remove alu_shift_reg, alus_shift_reg.
17267 Change logics_shift_reg to logics_shift_imm.
17268 (thunderx2t99_fp_loadpair_basic): Delete.
17269 (thunderx2t99_fp_storepair_basic): Delete.
17270 (thunderx2t99_asimd_int): Add neon_sub and neon_sub_q types.
17271 (thunderx2t99_asimd_polynomial): Delete.
17272 (thunderx2t99_asimd_fp_simple): Add neon_fp_mul_s_scalar_q
17273 and neon_fp_mul_d_scalar_q.
17274 (thunderx2t99_asimd_fp_conv): Add *int_to_fp* types.
17275 (thunderx2t99_asimd_misc): Delete neon_dup and neon_dup_q.
17276 (thunderx2t99_asimd_recip_step): Add missing *sqrt* types.
17277 (thunderx2t99_asimd_lut): Add missing tbl types.
17278 (thunderx2t99_asimd_ext): Delete.
17279 (thunderx2t99_asimd_load1_1_mult): Delete.
17280 (thunderx2t99_asimd_load1_2_mult): Delete.
17281 (thunderx2t99_asimd_load1_ldp): New.
17282 (thunderx2t99_asimd_load1): New.
17283 (thunderx2t99_asimd_load2): Add missing *load2* types.
17284 (thunderx2t99_asimd_load3): New.
17285 (thunderx2t99_asimd_load4): New.
17286 (thunderx2t99_asimd_store1_1_mult): Delete.
17287 (thunderx2t99_asimd_store1_2_mult): Delete.
17288 (thunderx2t99_asimd_store2_mult): Delete.
17289 (thunderx2t99_asimd_store2_onelane): Delete.
17290 (thunderx2t99_asimd_store_stp): New.
17291 (thunderx2t99_asimd_store1): New.
17292 (thunderx2t99_asimd_store2): New.
17293 (thunderx2t99_asimd_store3): New.
17294 (thunderx2t99_asimd_store4): New.
17296 2018-05-17 Jerome Lambourg <lambourg@adacore.com>
17298 * config/arm/arm_cmse.h (cmse_nsfptr_create, cmse_is_nsfptr): Remove
17299 #include <stdint.h>. Replace intptr_t with __INTPTR_TYPE__.
17301 2018-05-17 Pat Haugen <pthaugen@us.ibm.com>
17302 Segher Boessenkool <segher@kernel.crashing.org>
17305 * config/rs6000/rs6000.c (rs6000_output_move_128bit): Check dest
17308 2018-05-17 Richard Biener <rguenther@suse.de>
17310 * tree-ssa-dse.c (dse_classify_store): Fix iterator increment
17311 for pruning loop and prune defs feeding only already visited PHIs.
17313 2018-05-17 Richard Biener <rguenther@suse.de>
17315 * tree-ssa-sccvn.c (vn_reference_lookup_3): Improve memset handling.
17317 2018-05-17 Bin Cheng <bin.cheng@arm.com>
17318 Richard Biener <rguenther@suse.de>
17320 PR tree-optimization/85793
17321 * tree-vect-stmts.c (vectorizable_load): Handle 1 element-wise load
17322 for VMAT_ELEMENTWISE.
17324 2018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
17326 * internal-fn.h (lookup_internal_fn): Declare
17327 * internal-fn.c (lookup_internal_fn): New function.
17328 * gimple.c (gimple_build_call_from_tree): Handle calls to
17329 internal functions.
17330 * gimple-pretty-print.c (dump_gimple_call): Print "." before
17331 internal function names.
17332 * tree-pretty-print.c (dump_generic_node): Likewise.
17333 * tree-ssa-scopedtables.c (expr_hash_elt::print): Likewise.
17335 2018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
17337 * gimple-fold.h (gimple_build): Make the function forms take
17338 combined_fn rather than built_in_function.
17339 (gimple_simplify): Likewise.
17340 * gimple-match-head.c (gimple_simplify): Likewise.
17341 * gimple-fold.c (gimple_build): Likewise.
17342 * tree-vect-loop.c (get_initial_def_for_reduction): Use gimple_build
17343 rather than gimple_build_call_internal.
17344 (get_initial_defs_for_reduction): Likewise.
17345 (vect_create_epilog_for_reduction): Likewise.
17346 (vectorizable_live_operation): Likewise.
17348 2018-05-17 Martin Liska <mliska@suse.cz>
17350 * gimple-ssa-sprintf.c (format_directive): Do not use
17351 space in between 'G_' and '('.
17353 2018-05-17 Jakub Jelinek <jakub@redhat.com>
17356 * config/i386/i386.c (ix86_fold_builtin): Handle masked shifts
17357 even if the mask is not all ones.
17360 * config/i386/i386.c (ix86_fold_builtin): Fold shift builtins by
17362 (ix86_gimple_fold_builtin): Likewise.
17365 * config/i386/i386.c: Include tree-vector-builder.h.
17366 (ix86_vector_shift_count): New function.
17367 (ix86_fold_builtin): Fold shift builtins by scalar count.
17368 (ix86_gimple_fold_builtin): Likewise.
17370 * config/i386/avx512fintrin.h (_mm512_set_epi16, _mm512_set_epi8,
17371 _mm512_setzero): New intrinsics.
17373 2018-05-17 James Greenhalgh <james.greenhalgh@arm.com>
17374 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
17376 * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify
17377 code generation for cases where splatting a value is not useful.
17378 * simplify-rtx.c (simplify_ternary_operation): Simplify
17379 vec_merge across a vec_duplicate and a paradoxical subreg forming
17380 a vector mode to a vec_concat.
17382 2018-05-17 Olga Makhotina <olga.makhotina@intel.com>
17384 * config.gcc: Support "goldmont-plus".
17385 * config/i386/driver-i386.c (host_detect_local_cpu): Detect
17387 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
17388 PROCESSOR_GOLDMONT_PLUS.
17389 * config/i386/i386.c (m_GOLDMONT_PLUS): Define.
17390 (processor_target_table): Add "goldmont-plus".
17391 (PTA_GOLDMONT_PLUS): Define.
17392 (ix86_lea_outperforms): Add TARGET_GOLDMONT_PLUS.
17393 (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT_PLUS.
17394 (fold_builtin_cpu): Add M_INTEL_GOLDMONT_PLUS.
17395 (fold_builtin_cpu): Add "goldmont-plus".
17396 (ix86_add_stmt_cost): Add TARGET_GOLDMONT_PLUS.
17397 (ix86_option_override_internal): Add "goldmont-plus".
17398 * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT_PLUS.
17399 (processor_type): Add PROCESSOR_GOLDMONT_PLUS.
17400 * config/i386/x86-tune.def: Add m_GOLDMONT_PLUS.
17401 * doc/invoke.texi: Add goldmont-plus as x86 -march=/-mtune= CPU type.
17403 2018-05-17 Richard Biener <rguenther@suse.de>
17405 PR tree-optimization/85757
17406 * tree-ssa-dse.c (dse_classify_store): Record a PHI def and
17407 remove defs that only feed that PHI from further processing.
17409 2018-05-16 Jim Wilson <jimw@sifive.com>
17411 * config/riscv/riscv.md (<optab>si3_mask, <optab>si3_mask_1): Prepend
17413 (<optab>di3_mask, <optab>di3_mask_1): Likewise.
17415 2018-05-16 Mark Wielaard <mark@klomp.org>
17417 * dwarf2out.c (count_index_strings): New function.
17418 (output_indirect_strings): Call count_index_strings and generate
17419 header for dwarf_version >= 5.
17421 2018-05-16 Mark Wielaard <mark@klomp.org>
17423 * dwarf2out.c (dwarf_FORM): New function.
17424 (set_indirect_string): Use dwarf_FORM.
17425 (reset_indirect_string): Likewise.
17426 (size_of_die): Likewise.
17427 (value_format): Likewise.
17428 (output_die): Likewise.
17429 (add_skeleton_AT_string): Likewise.
17430 (output_macinfo_op): Likewise.
17431 (index_string): Likewise.
17432 (output_index_string_offset): Likewise.
17433 (output_index_string): Likewise.
17434 (count_index_strings): Likewise.
17436 2018-05-16 Carl Love <cel@us.ibm.com>
17438 * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
17439 dcbt and dcbtstt with TH=16 if operands[2] is 0 and Power 8 or newer.
17441 2018-05-16 Martin Jambor <mjambor@suse.cz>
17443 * ipa-prop.c (ipa_free_all_edge_args): Remove.
17444 * ipa-prop.h (ipa_free_all_edge_args): Likewise.
17446 2018-05-16 Wilco Dijkstra <wdijkstr@arm.com>
17448 * config/aarch64/aarch64.md (fma<mode>4): Change into expand pattern.
17449 (fnma<mode>4): Likewise.
17450 (fms<mode>4): Likewise.
17451 (fnms<mode>4): Likewise.
17452 (aarch64_fma<mode>4): Rename insn, reorder accumulator operand.
17453 (aarch64_fnma<mode>4): Likewise.
17454 (aarch64_fms<mode>4): Likewise.
17455 (aarch64_fnms<mode>4): Likewise.
17456 (aarch64_fnmadd<mode>4): Likewise.
17458 2018-05-16 Jason Merrill <jason@redhat.com>
17460 * tree.c (warn_deprecated_use): Return bool. Simplify logic.
17462 2018-05-16 Richard Biener <rguenther@suse.de>
17464 * tree-vectorizer.h (struct stmt_info_for_cost): Add where member.
17465 (dump_stmt_cost): Declare.
17466 (add_stmt_cost): Dump cost we add.
17467 (add_stmt_costs): New function.
17468 (vect_model_simple_cost, vect_model_store_cost, vect_model_load_cost):
17469 No longer exported.
17470 (vect_analyze_stmt): Adjust prototype.
17471 (vectorizable_condition): Likewise.
17472 (vectorizable_live_operation): Likewise.
17473 (vectorizable_reduction): Likewise.
17474 (vectorizable_induction): Likewise.
17475 * tree-vect-loop.c (vect_analyze_loop_operations): Create local
17476 cost vector to pass to vectorizable_ and record afterwards.
17477 (vect_model_reduction_cost): Take cost vector argument and adjust.
17478 (vect_model_induction_cost): Likewise.
17479 (vectorizable_reduction): Likewise.
17480 (vectorizable_induction): Likewise.
17481 (vectorizable_live_operation): Likewise.
17482 * tree-vect-slp.c (vect_create_new_slp_node): Initialize
17483 SLP_TREE_NUMBER_OF_VEC_STMTS.
17484 (vect_analyze_slp_cost_1): Remove.
17485 (vect_analyze_slp_cost): Likewise.
17486 (vect_slp_analyze_node_operations): Take visited args and
17487 a target cost vector. Avoid processing already visited stmt sets.
17488 (vect_slp_analyze_operations): Use a local cost vector to gather
17489 costs and register those of non-discarded instances.
17490 (vect_bb_vectorization_profitable_p): Use add_stmt_costs.
17491 (vect_schedule_slp_instance): Remove copying of
17492 SLP_TREE_NUMBER_OF_VEC_STMTS. Instead assert that it is not
17494 * tree-vect-stmts.c (record_stmt_cost): Remove path directly
17495 adding cost. Record cost entry location.
17496 (vect_prologue_cost_for_slp_op): Function to compute cost of
17497 a constant or invariant generated for SLP vect in the prologue,
17498 split out from vect_analyze_slp_cost_1.
17499 (vect_model_simple_cost): Make static. Adjust for SLP costing.
17500 (vect_model_promotion_demotion_cost): Likewise.
17501 (vect_model_store_cost): Likewise, make static.
17502 (vect_model_load_cost): Likewise.
17503 (vectorizable_bswap): Add cost vector arg and adjust.
17504 (vectorizable_call): Likewise.
17505 (vectorizable_simd_clone_call): Likewise.
17506 (vectorizable_conversion): Likewise.
17507 (vectorizable_assignment): Likewise.
17508 (vectorizable_shift): Likewise.
17509 (vectorizable_operation): Likewise.
17510 (vectorizable_store): Likewise.
17511 (vectorizable_load): Likewise.
17512 (vectorizable_condition): Likewise.
17513 (vectorizable_comparison): Likewise.
17514 (can_vectorize_live_stmts): Likewise.
17515 (vect_analyze_stmt): Likewise.
17516 (vect_transform_stmt): Adjust calls to vectorizable_*.
17517 * tree-vectorizer.c: Include gimple-pretty-print.h.
17518 (dump_stmt_cost): New function.
17520 2018-05-16 Richard Biener <rguenther@suse.de>
17522 * params.def (PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE): New param.
17523 * doc/invoke.texi (dse-max-alias-queries-per-store): Document.
17524 * tree-ssa-dse.c: Include tree-ssa-loop.h.
17525 (check_name): New callback.
17526 (dse_classify_store): Track cycles via a visited bitmap of PHI
17527 defs and simplify handling of in-loop and across loop dead stores
17528 and properly fail for loop-variant refs. Handle byte-tracking with
17529 multiple defs. Use PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE for
17532 2018-05-16 Richard Sandiford <richard.sandiford@linaro.org>
17534 * tree-vectorizer.h (vect_get_vector_types_for_stmt): Declare.
17535 (vect_get_mask_type_for_stmt): Likewise.
17536 * tree-vect-slp.c (vect_two_operations_perm_ok_p): New function,
17538 (vect_build_slp_tree_1): ...here. Use vect_get_vector_types_for_stmt
17539 to determine the statement's vector type and the vector type that
17540 should be used for calculating nunits. Deal with cases in which
17541 the type has to be deferred.
17542 (vect_slp_analyze_node_operations): Use vect_get_vector_types_for_stmt
17543 and vect_get_mask_type_for_stmt to calculate STMT_VINFO_VECTYPE.
17544 * tree-vect-loop.c (vect_determine_vf_for_stmt_1)
17545 (vect_determine_vf_for_stmt): New functions, split out from...
17546 (vect_determine_vectorization_factor): ...here.
17547 * tree-vect-stmts.c (vect_get_vector_types_for_stmt)
17548 (vect_get_mask_type_for_stmt): New functions, split out from
17549 vect_determine_vectorization_factor.
17551 2018-05-16 Richard Biener <rguenther@suse.de>
17553 * tree-cfg.c (verify_gimple_assign_ternary): Properly
17554 verify the [VEC_]COND_EXPR embedded comparison.
17556 2018-05-15 Martin Sebor <msebor@redhat.com>
17558 PR tree-optimization/85753
17559 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Handle
17560 RECORD_TYPE in addition to ARRAY_TYPE.
17562 2018-05-15 Martin Sebor <msebor@redhat.com>
17564 PR middle-end/85643
17565 * calls.c (get_attr_nonstring_decl): Handle MEM_REF.
17567 2018-05-15 Richard Biener <rguenther@suse.de>
17569 * tree-ssa-dse.c (dse_classify_store): Remove use_stmt parameter,
17570 add by_clobber_p one. Change algorithm to collect all defs
17571 representing uses we need to walk and try reducing them to
17572 a single one before failing.
17573 (dse_dom_walker::dse_optimize_stmt): Adjust.
17575 2018-05-13 Mark Wielaard <mark@klomp.org>
17577 * dwarf2out.c (dwarf_OP): Handle DW_OP_addrx and DW_OP_constx.
17578 (size_of_loc_descr): Likewise.
17579 (output_loc_operands): Likewise.
17580 (output_loc_operands_raw): Likewise.
17581 (dw_addr_op): Use dwarf_OP () for DW_OP_constx and DW_OP_addrx.
17582 (resolve_addr_in_expr): Handle DW_OP_addrx and DW_OP_constx.
17583 (hash_loc_operands): Likewise.
17584 (compare_loc_operands): Likewise.
17586 2018-05-14 Mark Wielaard <mark@klomp.org>
17588 * dwarf2out.c (count_index_addrs): New function.
17589 (dwarf2out_finish): Use count_index_addrs to calculate addrs_length.
17591 2018-05-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
17593 PR tree-optimization/83648
17594 * ipa-pure-const.c (malloc_candidate_p): Allow function with NULL
17595 return value as malloc candidate.
17597 2018-05-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
17600 * ipa-pure-const.c (warn_function_malloc): Pass value of known_finite
17601 param as true in call to suggest_attribute.
17603 2018-05-14 Segher Boessenkool <segher@kernel.crashing.org>
17605 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete @itemx for
17606 -mreadonly-in-sdata.
17608 2018-05-14 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
17610 * config/aarch64/aarch64-simd.md (*aarch64_crypto_aese_fused):
17612 (aarch64_crypto_aesd_fused): Likewise.
17614 2018-05-14 Wilco Dijkstra <wdijkstr@arm.com>
17616 * config/aarch64/aarch64.md (mov<mode>): Remove '*' in alternatives.
17617 (movsi_aarch64): Likewise.
17618 (load_pairsi): Likewise.
17619 (load_pairdi): Likewise.
17620 (store_pairsi): Likewise.
17621 (store_pairdi): Likewise.
17622 (load_pairsf): Likewise.
17623 (load_pairdf): Likewise.
17624 (store_pairsf): Likewise.
17625 (store_pairdf): Likewise.
17626 (zero_extend): Likewise.
17627 (trunc): Swap alternatives.
17628 (fcvt_target): Add '?' to prefer w over r.
17630 2018-05-14 Jakub Jelinek <jakub@redhat.com>
17633 * config/i386/i386.md: Disallow non-commutative arithmetics in
17634 last twpeephole for mem {+,-,&,|,^}= x; mem != 0 after cmpelim
17635 optimization. Use COMMUTATIVE_ARITH_P test rather than != MINUS
17636 in the peephole2 before it.
17638 2018-05-14 Sebastian Peryt <sebastian.peryt@intel.com>
17640 * common/config/i386/i386-common.c (OPTION_MASK_ISA_CLDEMOTE_SET,
17641 OPTION_MASK_ISA_CLDEMOTE_UNSET): New defines.
17642 (ix86_handle_option): Handle -mcldemote.
17643 * config.gcc: New header.
17644 * config/i386/cldemoteintrin.h: New file.
17645 * config/i386/cpuid.h (bit_CLDEMOTE): New bit.
17646 * config/i386/driver-i386.c (host_detect_local_cpu): Detect
17648 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
17649 OPTION_MASK_ISA_CLDEMOTE.
17650 * config/i386/i386.c (ix86_target_string): Add -mcldemote.
17651 (ix86_valid_target_attribute_inner_p): Ditto.
17652 (enum ix86_builtins): Add IX86_BUILTIN_CLDEMOTE.
17653 (ix86_init_mmx_sse_builtins): Define __builtin_ia32_cldemote.
17654 (ix86_expand_builtin): Expand IX86_BUILTIN_CLDEMOTE.
17655 * config/i386/i386.h (TARGET_CLDEMOTE, TARGET_CLDEMOTE_P): New.
17656 * config/i386/i386.md (UNSPECV_CLDEMOTE): New.
17658 * config/i386/i386.opt: Add -mcldemote.
17659 * config/i386/x86intrin.h: New header.
17660 * doc/invoke.texi: Add -mcldemote.
17662 2018-05-14 Richard Biener <rguenther@suse.de>
17664 * doc/match-and-simplify.texi: Adjust :s documentation.
17666 2018-05-14 Alexander Monakov <amonakov@ispras.ru>
17668 * sort.cc (REORDER_23): Pass the type for the temporaries instead of
17669 intended memcpy size.
17670 (REORDER_45): Likewise.
17672 2018-05-13 Alexander Monakov <amonakov@ispras.ru>
17674 * sort.cc: New file.
17675 * system.h [!CHECKING_P] (qsort): Redirect to gcc_qsort.
17676 * vec.c (qsort_chk): Use gcc_qsort.
17677 * Makefile.in (OBJS-libcommon): Add sort.o.
17678 (build/sort.o): New target. Use it...
17679 (BUILD_RTL): ... here, and...
17680 (build/gencfn-macros): ... here, and...
17681 (build/genmatch): ... here.
17683 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
17684 Chung-Ju Wu <jasonwucj@gmail.com>
17686 * config.gcc (nds32*-*-*): Check that n15 is valid to --with-cpu.
17687 * config/nds32/nds32-graywolf.md: New file.
17688 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_GRAYWOLF.
17689 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n15
17691 * config/nds32/nds32-protos.h: More declarations for n15 pipeline.
17692 * config/nds32/nds32-utils.c: More implementations for n15 pipeline.
17693 * config/nds32/nds32.md (pipeline_model): Add graywolf.
17694 * config/nds32/nds32.opt (mcpu): Support n15 pipeline cpus.
17695 * config/nds32/pipelines.md: Include n15 settings.
17697 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
17698 Chung-Ju Wu <jasonwucj@gmail.com>
17700 * config.gcc (nds32*-*-*): Check that n12/n13 are valid to --with-cpu.
17701 * config/nds32/nds32-n13.md: New file.
17702 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N12 and CPU_N13.
17703 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n12/n13
17705 * config/nds32/nds32-protos.h: More declarations for n12/n13 pipeline.
17706 * config/nds32/nds32.md (pipeline_model): Add n13.
17707 * config/nds32/nds32.opt (mcpu): Support n12/n13 pipeline cpus.
17708 * config/nds32/pipelines.md: Include n13 settings.
17710 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
17711 Chung-Ju Wu <jasonwucj@gmail.com>
17713 * config.gcc (nds32*-*-*): Check that n10/d10 are valid to --with-cpu.
17714 * config/nds32/nds32-n10.md: New file.
17715 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N10.
17716 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n10
17718 * config/nds32/nds32-protos.h: More declarations for n10 pipeline.
17719 * config/nds32/nds32-utils.c: More implementations for n10 pipeline.
17720 * config/nds32/nds32.md (pipeline_model): Add n10.
17721 * config/nds32/nds32.opt (mcpu): Support n10 pipeline cpus.
17722 * config/nds32/pipelines.md: Include n10 settings.
17724 2018-05-13 Monk Chiang <sh.chiang04@gmail.com>
17725 Kito Cheng <kito.cheng@gmail.com>
17726 Chung-Ju Wu <jasonwucj@gmail.com>
17728 * config.gcc (nds32be-*-*): Handle --with-ext-dsp.
17729 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
17730 Add enum values for DSP extension instructions.
17731 * config/nds32/constraints.md (Iu06, IU06, CVp5, CVs5, CVs2, CVhi):
17733 * config/nds32/iterators.md (shifts, shiftrt, sat_plus, all_plus,
17734 sat_minus, all_minus, plus_minus, extend, sumax, sumin, sumin_max):
17735 New code iterators.
17736 (su, zs, uk, opcode, add_rsub, add_sub): New code attributes.
17737 * config/nds32/nds32-dspext.md: New file for DSP implementation.
17738 * config/nds32/nds32-intrinsic.c: Implementation of DSP extension.
17739 * config/nds32/nds32-intrinsic.md: Likewise.
17740 * config/nds32/nds32_intrinsic.h: Likewise.
17741 * config/nds32/nds32-md-auxiliary.c: Likewise.
17742 * config/nds32/nds32-memory-manipulation.c: Consider DSP extension.
17743 * config/nds32/nds32-predicates.c (const_vector_to_hwint): New.
17744 (nds32_valid_CVp5_p, nds32_valid_CVs5_p): New.
17745 (nds32_valid_CVs2_p, nds32_valid_CVhi_p): New.
17746 * config/nds32/nds32-protos.h: New declarations for DSP extension.
17747 * config/nds32/nds32-utils.c (extract_mac_non_acc_rtx): New case
17748 TYPE_DMAC in switch statement.
17749 * config/nds32/nds32.c: New checking and implementation for DSP
17750 extension instructions.
17751 * config/nds32/nds32.h: Likewise.
17752 * config/nds32/nds32.md: Likewise.
17753 * config/nds32/nds32.opt (mhw-abs, mext-dsp): New options.
17754 * config/nds32/predicates.md: Implement new predicates for DSP
17757 2018-05-11 Michael Meissner <meissner@linux.vnet.ibm.com>
17759 * config/rs6000/rs6000.md (mov<mode>_softfloat, FMOVE32):
17760 Reformat alternatives and attributes so it is easier to identify
17761 which constraints/attributes go with which instruction.
17762 (mov<mode>_hardfloat32, FMOVE64): Likewise.
17763 (mov<mode>_softfloat32, FMOVE64): Likewise.
17764 (mov<mode>_hardfloat64, FMOVE64): Likewise.
17765 (mov<mode>_softfloat64, FMOVE64): Likewise.
17767 2018-05-11 Kelvin Nilsen <kelvin@gcc.gnu.org>
17769 * doc/extend.texi (PowerPC Built-in Functions): Rename this
17771 (Basic PowerPC Built-in Functions): The new name of the
17772 subsection previously known as "PowerPC Built-in Functions".
17773 (Basic PowerPC Built-in Functions Available on all Configurations):
17775 (Basic PowerPC Built-in Functions Available on ISA 2.05): Likewise.
17776 (Basic PowerPC Built-in Functions Available on ISA 2.06): Likewise.
17777 (Basic PowerPC Built-in Functions Available on ISA 2.07): Likewise.
17778 (Basic PowerPC Built-in Functions Available on ISA 3.0): Likewise.
17780 2018-05-11 Martin Jambor <mjambor@suse.cz>
17783 * ipa-cp.c (intersect_with_plats): Check that the lattice contains
17786 2018-05-11 Richard Earnshaw <rearnsha@arm.com>
17789 * config/arm/arm-cpus.in (fgroup ARMv6m): Add be8 feature.
17791 2018-05-11 Sebastian Peryt <sebastian.peryt@intel.com>
17793 * common/config/i386/i386-common.c (OPTION_MASK_ISA_WAITPKG_SET,
17794 OPTION_MASK_ISA_WAITPKG_UNSET): New defines.
17795 (ix86_handle_option): Handle -mwaitpkg.
17796 * config.gcc: New header.
17797 * config/i386/cpuid.h (bit_WAITPKG): New bit.
17798 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mwaitpkg.
17799 * config/i386/i386-builtin-types.def ((UINT8, UNSIGNED, UINT64)): New
17801 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
17802 OPTION_MASK_ISA_WAITPKG.
17803 * config/i386/i386.c (ix86_target_string): Add -mwaitpkg.
17804 (ix86_option_override_internal): Add PTA_WAITPKG.
17805 (ix86_valid_target_attribute_inner_p): Add -mwaitpkg.
17806 (enum ix86_builtins): Add IX86_BUILTIN_UMONITOR, IX86_BUILTIN_UMWAIT,
17807 IX86_BUILTIN_TPAUSE.
17808 (ix86_init_mmx_sse_builtins): Define __builtin_ia32_umonitor,
17809 __builtin_ia32_umwait and __builtin_ia32_tpause.
17810 (ix86_expand_builtin): Expand IX86_BUILTIN_UMONITOR,
17811 IX86_BUILTIN_UMWAIT, IX86_BUILTIN_TPAUSE.
17812 * config/i386/i386.h (TARGET_WAITPKG, TARGET_WAITPKG_P): New.
17813 * config/i386/i386.md (UNSPECV_UMWAIT, UNSPECV_UMONITOR,
17814 UNSPECV_TPAUSE): New.
17815 (umwait, umwait_rex64, umonitor_<mode>, tpause, tpause_rex64): New.
17816 * config/i386/i386.opt: Add -mwaitpkg.
17817 * config/i386/waitpkgintrin.h: New file.
17818 * config/i386/x86intrin.h: New header.
17819 * doc/invoke.texi: Add -mwaitpkg.
17821 2018-05-11 Richard Earnshaw <rearnsha@arm.com>
17824 * config/arm/arm-cpus.in: Add comment that ARMv6-m and ARMv6S-m are now
17826 (cortex-m0): Use armv6s-m isa.
17827 (cortex-m0plus): Likewise.
17828 (cortex-m1): Likewise.
17829 (cortex-m0.small-multiply): Likewise.
17830 (cortex-m0plus.small-multiply): Likewise.
17831 (cortex-m1.small-multiply): Likewise.
17833 2018-05-11 Allan Sandfeld Jensen <allan.jensen@qt.io>
17834 Jakub Jelinek <jakub@redhat.com>
17836 PR tree-optimization/85692
17837 * tree-ssa-forwprop.c (simplify_vector_constructor): Try two
17838 source permute as well.
17840 2018-05-11 Martin Liska <mliska@suse.cz>
17843 * doc/extend.texi: Document LLVM style format for no_sanitize
17846 2018-05-10 Michael Meissner <meissner@linux.vnet.ibm.com>
17848 * config/rs6000/rs6000.c (mode_supports_dq_form): Rename
17849 mode_supports_vsx_dform_quad to mode_supports_dq_form.
17850 (mode_supports_vsx_dform_quad): Likewise.
17851 (mode_supports_vmx_dform): Move these functions to be next to the
17852 other mode_supports functions.
17853 (mode_supports_dq_form): Likewise.
17854 (quad_address_p): Change calls of mode_supports_vsx_dform_quad to
17855 mode_supports_dq_form.
17856 (reg_offset_addressing_ok_p): Likewise.
17857 (offsettable_ok_by_alignment): Likewise.
17858 (rs6000_legitimate_offset_address_p): Likewise.
17859 (legitimate_lo_sum_address_p): Likewise.
17860 (rs6000_legitimize_address): Likewise.
17861 (rs6000_legitimize_reload_address): Likewise.
17862 (rs6000_secondary_reload_inner): Likewise.
17863 (rs6000_preferred_reload_class): Likewise.
17864 (rs6000_output_move_128bit): Likewise.
17866 2018-05-10 Uros Bizjak <ubizjak@gmail.com>
17868 * config/i386/i386.c (ix86_expand_builtin) <case IX86_BUILTIN_RDPID>:
17869 Generate SImode target register for null target.
17870 <case IX86_BUILTIN_XGETBV>: Ditto.
17871 <case IX86_BUILTIN_XSETBV>: Optimize LSHIFTRT generation.
17872 * config/i386/xsaveintrin.h (_xgetbv): Add missing return.
17874 2018-05-10 Carl Love <cel@us.ibm.com>
17876 * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
17877 dcbtt and dcbtstt if operands[2] is 0.
17879 2018-05-10 Uros Bizjak <ubizjak@gmail.com>
17882 * config/i386/sse.md (usadv64qi): New expander.
17884 2018-05-10 Segher Boessenkool <segher@kernel.crashing.org>
17886 * config/rs6000/altivec.md (altivec_vmrghb, altivec_vmrghh,
17887 altivec_vmrghw, altivec_vmrglb, altivec_vmrglh, altivec_vmrglw): Remove
17888 -maltivec=be support.
17889 (vec_widen_umult_even_v16qi, vec_widen_smult_even_v16qi,
17890 vec_widen_umult_even_v8hi, vec_widen_smult_even_v8hi,
17891 vec_widen_umult_even_v4si, vec_widen_smult_even_v4si,
17892 vec_widen_umult_odd_v16qi, vec_widen_smult_odd_v16qi,
17893 vec_widen_umult_odd_v8hi, vec_widen_smult_odd_v8hi,
17894 vec_widen_umult_odd_v4si, vec_widen_smult_odd_v4si, altivec_vpkpx,
17895 altivec_vpks<VI_char>ss, altivec_vpks<VI_char>us,
17896 altivec_vpku<VI_char>us, altivec_vpku<VI_char>um, altivec_vsum2sws,
17897 altivec_vsumsws): Adjust.
17898 (altivec_vspltb *altivec_vspltb_internal, altivec_vsplth,
17899 *altivec_vsplth_internal, altivec_vspltw, *altivec_vspltw_internal,
17900 altivec_vspltsf, *altivec_vspltsf_internal): Remove -maltivec=be
17902 (altivec_vperm_<mode>, altivec_vperm_<mode>_uns,
17903 altivec_vupkhs<VU_char>, altivec_vupkls<VU_char>, altivec_vupkhpx,
17904 altivec_vupklpx, altivec_lvsl, altivec_lvsr): Adjust.
17905 (altivec_lve<VI_char>x): Delete expand.
17906 (*altivec_lve<VI_char>x_internal): Rename to...
17907 (altivec_lve<VI_char>x): ... this.
17908 (altivec_lvxl_<mode>): Delete expand.
17909 (*altivec_lvxl_<mode>_internal): Rename to ...
17910 (altivec_lvxl_<mode>): ... this.
17911 (altivec_stvxl_<mode>): Delete expand.
17912 (*altivec_stvxl_<mode>_internal): Rename to ...
17913 (altivec_stvxl_<mode>): ... this.
17914 (altivec_stve<VI_char>x): Delete expand.
17915 (*altivec_stve<VI_char>x_internal): Rename to ...
17916 (altivec_stve<VI_char>x): ... this.
17917 (doublee<mode>2, unsdoubleev4si2, doubleo<mode>2, unsdoubleov4si2,
17918 doubleh<mode>2, unsdoublehv4si2, doublel<mode>2, unsdoublelv4si2,
17919 reduc_plus_scal_<mode>): Adjust.
17920 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Adjust
17922 (rs6000_cpu_cpp_builtins): Adjust.
17923 (altivec_resolve_overloaded_builtin): Remove -maltivec=be support.
17924 * config/rs6000/rs6000-protos.h (altivec_expand_lvx_be,
17925 altivec_expand_stvx_be, altivec_expand_stvex_be): Delete.
17926 * config/rs6000/rs6000.c (rs6000_option_override_internal): Remove
17927 -maltivec=be support.
17928 (rs6000_split_vec_extract_var): Adjust.
17929 (rs6000_split_v4si_init): Adjust.
17930 (swap_selector_for_mode): Delete.
17931 (altivec_expand_lvx_be, altivec_expand_stvx_be,
17932 altivec_expand_stvex_be): Delete.
17933 (altivec_expand_lv_builtin, altivec_expand_stv_builtin): Remove
17934 -maltivec=be support.
17935 (rs6000_gimple_fold_builtin): Ditto.
17936 (rs6000_generate_float2_double_code, rs6000_generate_float2_code):
17938 * config/rs6000/rs6000.h (VECTOR_ELT_ORDER_BIG): Delete.
17939 (TARGET_DIRECT_MOVE_64BIT): Adjust.
17940 * config/rs6000/rs6000.md (split for extendsidi2 for vectors): Adjust.
17941 * config/rs6000/rs6000.opt (maltivec=le, maltivec=be): Delete.
17942 * config/rs6000/vsx.md (floate<mode>, unsfloatev2di, floato<mode>,
17943 unsfloatov2di, vsignedo_v2df, vsignede_v2df, vunsignedo_v2df,
17944 vunsignede_v2df, vsx_extract_<mode>_p9, *vsx_extract_si,
17945 *vsx_extract_<mode>_p8, *vsx_extract_si_<uns>float_df,
17946 *vsx_extract_si_<uns>float_<mode>, vsx_set_<mode>_p9, vsx_set_v4sf_p9,
17947 *vsx_insert_extract_v4sf_p9, *vsx_insert_extract_v4sf_p9_2, and an
17948 anonymous split): Adjust.
17949 (vsx_mergel_<mode>, vsx_mergeh_<mode>): Remove -maltivec=be support.
17950 (vsx_xxspltd_<mode>, extract4b, insert4b): Adjust.
17952 2018-05-10 Eric Botcazou <ebotcazou@adacore.com>
17954 * configure.ac (gcc_gxx_include_dir_add_sysroot): Set it to 1 only
17955 when --with-gxx-include-dir is also specified.
17956 * configure: Regenerate.
17958 2018-05-09 Jim Wilson <jimw@sifive.com>
17961 * config.gcc (riscv*-*-*): Handle --with-multilib-list.
17962 * config/riscv/t-withmultilib: New.
17963 * config/riscv/withmultilib.h: New.
17964 * doc/install.texi: Document RISC-V --with-multilib-list support.
17966 2018-05-09 Richard Biener <rguenther@suse.de>
17968 * tree-vect-slp.c (vect_bb_slp_scalar_cost): Fill a cost
17970 (vect_bb_vectorization_profitable_p): Adjust. Compute
17971 actual scalar cost using the cost vector and the add_stmt_cost
17974 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
17976 PR rtl-optimization/85645
17977 * config/rs6000/rs6000.c (rs6000_emit_prologue_components): Put a SET
17978 in the REG_CFA_REGISTER note for LR, don't leave it empty.
17980 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
17982 PR rtl-optimization/85645
17983 * shrink-wrap.c (spread_components): Return a boolean saying if
17984 anything was changed.
17985 (try_shrink_wrapping_separate): Iterate spread_components until
17986 nothing changes anymore.
17988 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
17990 PR rtl-optimization/85645
17991 * regrename.c (build_def_use): Also kill the chains that include the
17992 destination of a REG_CFA_REGISTER note.
17994 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
17996 PR rtl-optimization/85645
17997 * regcprop.c (copyprop_hardreg_forward_1): Don't propagate into an
17998 insn that has a REG_CFA_REGISTER note.
18000 2018-05-09 Richard Sandiford <richard.sandiford@linaro.org>
18002 * cfgexpand.c (expand_clobber): New function.
18003 (expand_gimple_stmt_1): Use it.
18004 * tree-vect-stmts.c (vect_clobber_variable): New function,
18006 (vectorizable_simd_clone_call): ...here.
18007 (vectorizable_store): Emit a clobber either side of an
18008 IFN_STORE_LANES sequence.
18009 (vectorizable_load): Emit a clobber after an IFN_LOAD_LANES sequence.
18011 2018-05-09 Tom de Vries <tom@codesourcery.com>
18014 * config/nvptx/nvptx.md (define_insn "trap", define_insn "trap_if_true")
18015 (define_insn "trap_if_false"): Add exit after trap.
18017 2018-05-09 Eric Botcazou <ebotcazou@adacore.com>
18019 PR rtl-optimization/85638
18020 * bb-reorder.c: Include common/common-target.h.
18021 (create_forwarder_block): New function extracted from...
18022 (fix_up_crossing_landing_pad): ...here. Rename into...
18023 (dw2_fix_up_crossing_landing_pad): ...this.
18024 (sjlj_fix_up_crossing_landing_pad): New function.
18025 (find_rarely_executed_basic_blocks_and_crossing_edges): In SJLJ mode,
18026 call sjlj_fix_up_crossing_landing_pad if there are incoming EH edges
18027 from both partitions and exit the loop after one iteration.
18029 2018-05-08 Kelvin Nilsen <kelvin@gcc.gnu.org>
18032 * doc/extend.texi (PowerPC Built-in Functions): Rename this
18034 (Basic PowerPC Built-in Functions): The new name of the
18035 subsection previously known as "PowerPC Built-in Functions".
18036 (Basic PowerPC Built-in Functions Available on all Configurations):
18038 (Basic PowerPC Built-in Functions Available on ISA 2.05): New
18040 (Basic PowerPC Built-in Functions Available on ISA 2.06): New
18042 (Basic PowerPC Built-in Functions Available on ISA 2.07): New
18044 (Basic PowerPC Built-in Functions Available on ISA 3.0): New
18047 2018-05-08 Jim Wilson <jimw@sifive.com>
18049 * config/riscv/linux.h (MUSL_ABI_SUFFIX): Delete unnecessary backslash.
18050 (LD_EMUL_SUFFIX): New.
18051 (LINK_SPEC): Use it.
18053 2018-05-08 Kelvin Nilsen <kelvin@gcc.gnu.org>
18055 * doc/extend.texi (PowerPC Built-in Functions): Rename this
18057 (Basic PowerPC Built-in Functions): The new name of the
18058 subsection previously known as "PowerPC Built-in Functions".
18059 (Basic PowerPC Built-in Functions Available on all Configurations):
18061 (Basic PowerPC Built-in Functions Available on ISA 2.05): New
18063 (Basic PowerPC Built-in Functions Available on ISA 2.06): New
18065 (Basic PowerPC Built-in Functions Available on ISA 2.07): New
18067 (Basic PowerPC Built-in Functions Available on ISA 3.0): New
18070 2018-05-08 Jakub Jelinek <jakub@redhat.com>
18073 * config/i386/i386.md: Add peepholes for mem {+,-,&,|,^}= x; mem != 0
18074 after cmpelim optimization.
18076 2018-05-08 Olga Makhotina <olga.makhotina@intel.com>
18078 * config.gcc: Support "goldmont".
18079 * config/i386/driver-i386.c (host_detect_local_cpu): Detect "goldmont".
18080 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
18081 PROCESSOR_GOLDMONT.
18082 * config/i386/i386.c (m_GOLDMONT): Define.
18083 (processor_target_table): Add "goldmont".
18084 (PTA_GOLDMONT): Define.
18085 (ix86_lea_outperforms): Add TARGET_GOLDMONT.
18086 (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT.
18087 (fold_builtin_cpu): Add M_INTEL_GOLDMONT.
18088 (fold_builtin_cpu): Add "goldmont".
18089 (ix86_add_stmt_cost): Add TARGET_GOLDMONT.
18090 (ix86_option_override_internal): Add "goldmont".
18091 * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT.
18092 (processor_type): Add PROCESSOR_GOLDMONT.
18093 * config/i386/i386.md: Add CPU "glm".
18094 * config/i386/glm.md: New file.
18095 * config/i386/x86-tune.def: Add m_GOLDMONT.
18096 * doc/invoke.texi: Add goldmont as x86 -march=/-mtune= CPU type.
18098 2018-05-08 Jakub Jelinek <jakub@redhat.com>
18101 * config/i386/i386.c (ix86_expand_sse2_abs): Handle E_V2DImode and
18103 * config/i386/sse.md (abs<mode>2): Use VI_AVX2 iterator instead of
18104 VI1248_AVX512VL_AVX512BW. Handle V2DImode and V4DImode if not
18105 TARGET_AVX512VL using ix86_expand_sse2_abs. Formatting fixes.
18108 * config/i386/i386.c (ix86_fold_builtin): Handle
18109 IX86_BUILTIN_{,P}MOVMSK{PS,PD,B}{,128,256}.
18112 * config/i386/sse.md (ssequaterinsnmode): New mode attribute.
18113 (*<extract_type>_vinsert<shuffletype><extract_suf>_0): New pattern.
18115 2018-05-08 Richard Earnshaw <rearnsha@arm.com>
18118 * config/arm/parsecpu.awk (check_cpu): Fix operator precedence.
18119 (check_arch): Likewise.
18120 (check_fpu): Return the result rather than printing it.
18121 (end arch): Fix operator precedence.
18122 (end cpu): Likewise.
18123 (END): Print the result from check_fpu.
18125 2018-05-08 Richard Sandiford <richard.sandiford@linaro.org>
18126 Alan Hayward <alan.hayward@arm.com>
18127 David Sherwood <david.sherwood@arm.com>
18129 * config/aarch64/aarch64-sve.md (*pred_cmp<cmp_op><mode>_combine)
18130 (*pred_cmp<cmp_op><mode>, *fcm<cmp_op><mode>_and_combine)
18131 (*fcmuo<mode>_and_combine, *fcm<cmp_op><mode>_and)
18132 (*fcmuo<mode>_and): New patterns.
18134 2018-05-08 Richard Sandiford <richard.sandiford@linaro.org>
18136 * config/aarch64/iterators.md (UNSPEC_COND_LO, UNSPEC_COND_LS)
18137 (UNSPEC_COND_HI, UNSPEC_COND_HS, UNSPEC_COND_UO): Delete.
18138 (SVE_INT_CMP, SVE_FP_CMP): New code iterators.
18139 (cmp_op, sve_imm_con): New code attributes.
18140 (SVE_COND_INT_CMP, imm_con): Delete.
18141 (cmp_op): Remove above unspecs from int attribute.
18142 * config/aarch64/aarch64-sve.md (*vec_cmp<cmp_op>_<mode>): Rename
18144 (*cmp<cmp_op><mode>): ...this. Use UNSPEC_MERGE_PTRUE instead of
18145 comparison-specific unspecs.
18146 (*vec_cmp<cmp_op>_<mode>_ptest): Rename to...
18147 (*cmp<cmp_op><mode>_ptest): ...this and adjust likewise.
18148 (*vec_cmp<cmp_op>_<mode>_cc): Rename to...
18149 (*cmp<cmp_op><mode>_cc): ...this and adjust likewise.
18150 (*vec_fcm<cmp_op><mode>): Rename to...
18151 (*fcm<cmp_op><mode>): ...this and adjust likewise.
18152 (*vec_fcmuo<mode>): Rename to...
18153 (*fcmuo<mode>): ...this and adjust likewise.
18154 (*pred_fcm<cmp_op><mode>): New pattern.
18155 * config/aarch64/aarch64.c (aarch64_emit_unop, aarch64_emit_binop)
18156 (aarch64_emit_sve_ptrue_op, aarch64_emit_sve_ptrue_op_cc): New
18158 (aarch64_unspec_cond_code): Remove handling of LTU, GTU, LEU, GEU
18160 (aarch64_gen_unspec_cond, aarch64_emit_unspec_cond): Delete.
18161 (aarch64_emit_sve_predicated_cond): New function.
18162 (aarch64_expand_sve_vec_cmp_int): Use aarch64_emit_sve_ptrue_op_cc.
18163 (aarch64_emit_unspec_cond_or): Replace with...
18164 (aarch64_emit_sve_or_conds): ...this new function. Use
18165 aarch64_emit_sve_ptrue_op for the individual comparisons and
18166 aarch64_emit_binop to OR them together.
18167 (aarch64_emit_inverted_unspec_cond): Replace with...
18168 (aarch64_emit_sve_inverted_cond): ...this new function. Use
18169 aarch64_emit_sve_ptrue_op for the comparison and
18170 aarch64_emit_unop to invert the result.
18171 (aarch64_expand_sve_vec_cmp_float): Update after the above
18172 changes. Use aarch64_emit_sve_ptrue_op for native comparisons.
18174 2018-05-07 Nathan Sidwell <nathan@acm.org>
18176 * doc/invoke.texi (C++ Dialect Options): Remove -ffor-scope.
18177 * doc/extend.texi (Deprecated Features): Remove -fno-for-scope
18178 (Backwards Compatibility): Likewise.
18180 2018-05-07 Luis Machado <luis.machado@linaro.org>
18184 2018-05-07 Luis Machado <luis.machado@linaro.org>
18186 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
18187 <prefetch_dynamic_strides>: New const bool field.
18188 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
18189 prefetch_dynamic_strides.
18190 (exynosm1_prefetch_tune): Likewise.
18191 (thunderxt88_prefetch_tune): Likewise.
18192 (thunderx_prefetch_tune): Likewise.
18193 (thunderx2t99_prefetch_tune): Likewise.
18194 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
18196 (aarch64_override_options_internal): Update to set
18197 PARAM_PREFETCH_DYNAMIC_STRIDES.
18198 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
18199 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
18200 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
18201 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
18202 prefetch-dynamic-strides setting.
18204 2018-05-07 Luis Machado <luis.machado@linaro.org>
18206 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
18207 <minimum_stride>: New const int field.
18208 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
18209 minimum_stride field.
18210 (exynosm1_prefetch_tune): Likewise.
18211 (thunderxt88_prefetch_tune): Likewise.
18212 (thunderx_prefetch_tune): Likewise.
18213 (thunderx2t99_prefetch_tune): Likewise.
18214 (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
18215 (aarch64_override_options_internal): Update to set
18216 PARAM_PREFETCH_MINIMUM_STRIDE.
18217 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
18218 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
18219 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
18220 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
18221 stride is constant and is below the minimum stride threshold.
18223 2018-05-07 Luis Machado <luis.machado@linaro.org>
18225 * config/aarch64/aarch64.c (qdf24xx_prefetch_tune) <l2_cache_size>: Set
18228 2018-05-07 Luis Machado <luis.machado@linaro.org>
18230 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
18231 <prefetch_dynamic_strides>: New const bool field.
18232 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
18233 prefetch_dynamic_strides.
18234 (exynosm1_prefetch_tune): Likewise.
18235 (thunderxt88_prefetch_tune): Likewise.
18236 (thunderx_prefetch_tune): Likewise.
18237 (thunderx2t99_prefetch_tune): Likewise.
18238 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
18240 (aarch64_override_options_internal): Update to set
18241 PARAM_PREFETCH_DYNAMIC_STRIDES.
18242 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
18243 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
18244 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
18245 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
18246 prefetch-dynamic-strides setting.
18248 2018-05-07 Luis Machado <luis.machado@linaro.org>
18250 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
18251 <minimum_stride>: New const int field.
18252 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
18253 minimum_stride field.
18254 (exynosm1_prefetch_tune): Likewise.
18255 (thunderxt88_prefetch_tune): Likewise.
18256 (thunderx_prefetch_tune): Likewise.
18257 (thunderx2t99_prefetch_tune): Likewise.
18258 (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
18259 (aarch64_override_options_internal): Update to set
18260 PARAM_PREFETCH_MINIMUM_STRIDE.
18261 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
18262 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
18263 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
18264 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
18265 stride is constant and is below the minimum stride threshold.
18267 2018-05-06 Jakub Jelinek <jakub@redhat.com>
18270 * cfgexpand.c (expand_asm_stmt): Don't create a temporary if
18271 the type is addressable. Don't force op into register if it has
18274 2018-05-05 Roland McGrath <mcgrathr@google.com>
18277 * varasm.c (default_section_type_flags): Set SECTION_NOTYPE for
18278 any section for which we don't know a specific type it should have,
18279 regardless of name. Previously this was done only for the exact
18280 names ".init_array", ".fini_array", and ".preinit_array".
18281 (default_elf_asm_named_section): Add comment about
18282 relationship with default_section_type_flags and SECTION_NOTYPE.
18283 (get_section): Don't consider it a type conflict if one side has
18284 SECTION_NOTYPE and the other doesn't, as long as neither has the
18285 SECTION_BSS et al used in the default_section_type_flags logic.
18287 2018-05-05 Tom de Vries <tom@codesourcery.com>
18290 * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_3): Define.
18291 (workaround_barsyncs): New function.
18292 (nvptx_reorg): Use workaround_barsyncs.
18293 * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
18294 (define_expand "nvptx_membar_cta"): New define_expand.
18295 (define_insn "*nvptx_membar_cta"): New insn.
18297 2018-05-04 Pekka Jääskeläinen <pekka.jaaskelainen@parmance.com>
18299 * brig-builtins.def: Add consts to ptrs etc. in BRIG builtin defs.
18300 To improve optimization opportunities.
18301 * builtin-types.def: The new needed builtin types for the above.
18303 2018-05-04 Richard Biener <rguenther@suse.de>
18305 * bb-reorder.c (sanitize_hot_paths): Release hot_bbs_to_check.
18306 * gimple-ssa-store-merging.c
18307 (imm_store_chain_info::output_merged_store): Remove redundant create,
18308 release split_store vector contents on failure.
18309 * tree-vect-slp.c (vect_schedule_slp_instance): Avoid leaking
18310 scalar stmt vector on cache hit.
18312 2018-05-04 Segher Boessenkool <segher@kernel.crashing.org>
18314 * common/config/rs6000/rs6000-common.c (rs6000_handle_option): Remove
18316 * config.gcc (powerpc-xilinx-eabi*): Remove.
18317 * config/rs6000/predicates.md (easy_fp_constant): Remove Xilinx FP
18319 (fusion_addis_mem_combo_load): Ditto.
18320 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Remove Xilinx
18322 (rs6000_cpu_cpp_builtins): Ditto.
18323 * config/rs6000/rs6000-linux.c
18324 (rs6000_linux_float_exceptions_rounding_supported_p): Ditto.
18325 * config/rs6000/rs6000-opts.h (enum fpu_type_t): Delete.
18326 * config/rs6000/rs6000.c (rs6000_debug_reg_global): Remove Xilinx FP
18328 (rs6000_setup_reg_addr_masks): Ditto.
18329 (rs6000_init_hard_regno_mode_ok): Ditto.
18330 (rs6000_option_override_internal): Ditto.
18331 (legitimate_lo_sum_address_p): Ditto.
18332 (rs6000_legitimize_address): Ditto.
18333 (rs6000_legitimize_reload_address): Ditto.
18334 (rs6000_legitimate_address_p): Ditto.
18335 (abi_v4_pass_in_fpr): Ditto.
18336 (setup_incoming_varargs): Ditto.
18337 (rs6000_gimplify_va_arg): Ditto.
18338 (rs6000_split_multireg_move): Ditto.
18339 (rs6000_savres_strategy): Ditto.
18340 (rs6000_emit_prologue_components): Ditto.
18341 (rs6000_emit_epilogue_components): Ditto.
18342 (rs6000_emit_prologue): Ditto.
18343 (rs6000_emit_epilogue): Ditto.
18344 (rs6000_elf_file_end): Ditto.
18345 (rs6000_function_value): Ditto.
18346 (rs6000_libcall_value): Ditto.
18347 * config/rs6000/rs6000.h: Ditto.
18348 (TARGET_MINMAX_SF, TARGET_MINMAX_DF): Delete, merge to ...
18349 (TARGET_MINMAX): ... this. New.
18350 (TARGET_SF_FPR, TARGET_DF_FPR, TARGET_SF_INSN, TARGET_DF_INSN): Delete.
18351 * config/rs6000/rs6000.md: Remove Xilinx FP support.
18352 (*movsi_internal1_single): Delete.
18353 * config/rs6000/rs6000.opt (msingle-float, mdouble-float, msimple-fpu,
18354 mfpu=, mxilinx-fpu): Delete.
18355 * config/rs6000/singlefp.h: Delete.
18356 * config/rs6000/sysv4.h: Remove Xilinx FP support.
18357 * config/rs6000/t-rs6000: Ditto.
18358 * config/rs6000/t-xilinx: Delete.
18359 * config/rs6000/titan.md: Adjust for fp_type removal.
18360 * config/rs6000/vsx.md: Remove Xilinx FP support.
18361 (VStype_simple): Delete.
18362 (VSfptype_simple, VSfptype_mul, VSfptype_div, VSfptype_sqrt): Delete.
18363 * config/rs6000/xfpu.h: Delete.
18364 * config/rs6000/xfpu.md: Delete.
18365 * config/rs6000/xilinx.h: Delete.
18366 * config/rs6000/xilinx.opt: Delete.
18367 * doc/invoke.texi (RS/6000 and PowerPC Options): Remove
18368 -msingle-float, -mdouble-float, -msimple-fpu, -mfpu=, and -mxilinx-fpu.
18370 2018-05-04 Tom de Vries <tom@codesourcery.com>
18373 * builtins.c (expand_builtin_goacc_parlevel_id_size): Handle null target
18376 2018-05-04 Richard Biener <rguenther@suse.de>
18378 PR middle-end/85627
18379 * tree-complex.c (update_complex_assignment): We are always in SSA form.
18380 (expand_complex_div_wide): Likewise.
18381 (expand_complex_operations_1): Likewise.
18382 (expand_complex_libcall): Preserve EH info of the original stmt.
18383 (tree_lower_complex): Handle removed blocks.
18384 * tree.c (build_common_builtin_nodes): Do not set ECF_NOTRHOW
18385 on complex multiplication and division libcall builtins.
18387 2018-05-04 Richard Biener <rguenther@suse.de>
18389 PR middle-end/85574
18390 * fold-const.c (negate_expr_p): Restrict negation of operand
18391 zero of a division to when we know that can happen without
18393 (fold_negate_expr_1): Likewise.
18395 2018-05-04 Jakub Jelinek <jakub@redhat.com>
18398 * real.h (real_nextafter): Declare.
18399 * real.c (real_nextafter): New function.
18400 * fold-const-call.c (fold_const_nextafter): New function.
18401 (fold_const_call_sss): Call it for CASE_CFN_NEXTAFTER and
18402 CASE_CFN_NEXTTOWARD.
18403 (fold_const_call_1): For CASE_CFN_NEXTTOWARD call fold_const_call_sss
18404 even when arg1_mode is different from arg0_mode.
18406 2018-05-03 Nathan Sidwell <nathan@acm.org>
18408 * doc/extend.texi (Deprecated Features): Remove
18409 -ffriend-injection.
18410 (Backwards Compatibility): Likewise.
18411 * doc/invoke.texi (C++ Language Options): Likewise.
18412 (C++ Dialect Options): Likewise.
18414 2018-05-03 Jakub Jelinek <jakub@redhat.com>
18417 * config/i386/avx512fintrin.h (_mm512_mullox_epi64,
18418 _mm512_mask_mullox_epi64): New intrinsics.
18420 2018-05-03 Tom de Vries <tom@codesourcery.com>
18423 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
18424 dump files): Add offload-tree.
18426 2018-05-03 Richard Biener <rguenther@suse.de>
18428 PR tree-optimization/85615
18429 * tree-ssa-threadupdate.c (thread_block_1): Only allow exits
18430 to loops not nested in BBs loop father to avoid creating multi-entry
18433 2018-05-03 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
18435 PR tree-optimization/70291
18436 * tree-complex.c (expand_complex_libcall): Add type, inplace_p
18437 arguments. Change return type to tree. Emit libcall as a new
18438 statement rather than replacing existing one when inplace_p is true.
18439 (expand_complex_multiplication_components): New function.
18440 (expand_complex_multiplication): Expand floating-point complex
18441 multiplication using the above.
18442 (expand_complex_division): Rename inner_type parameter to type.
18443 Update expand_complex_libcall call-site.
18444 (expand_complex_operations_1): Update expand_complex_multiplication
18445 and expand_complex_division call-sites.
18447 2018-05-02 Jakub Jelinek <jakub@redhat.com>
18450 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
18451 *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
18452 *<shift_insn><dwi>3_doubleword_mask_1): In condition require that
18453 the highest significant bit of the shift count mask is clear. In
18454 check whether and[sq]i3 is needed verify that all significant bits
18455 of the shift count other than the highest are set.
18457 2018-05-02 Tom de Vries <tom@codesourcery.com>
18460 * builtins.def (DEF_GOACC_BUILTIN_ONLY): Define.
18461 * omp-builtins.def (BUILT_IN_GOACC_PARLEVEL_ID)
18462 (BUILT_IN_GOACC_PARLEVEL_SIZE): New builtin.
18463 * builtins.c (expand_builtin_goacc_parlevel_id_size): New function.
18464 (expand_builtin): Call expand_builtin_goacc_parlevel_id_size.
18465 * doc/extend.texi (Other Builtins): Add __builtin_goacc_parlevel_id and
18466 __builtin_goacc_parlevel_size.
18468 2018-05-02 Richard Biener <rguenther@suse.de>
18470 PR tree-optimization/85597
18471 * tree-vect-stmts.c (vectorizable_operation): For ternary SLP
18472 do not use split vect_get_vec_defs call but call vect_get_slp_defs
18475 2018-05-02 Tom de Vries <tom@codesourcery.com>
18478 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
18479 dump files): Add ltrans-tree.
18481 2018-05-02 Tom de Vries <tom@codesourcery.com>
18484 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
18485 dump files): Add wpa-ipa.
18487 2018-05-02 Segher Boessenkool <segher@kernel.crashing.org>
18489 * config.gcc (powerpc*-*-*): Remove paired.h. Unsupport the
18490 powerpc*-*-linux*paired* target.
18491 * config/rs6000/750cl.h: Delete.
18492 * config/rs6000/paired.h: Delete.
18493 * config/rs6000/paired.md: Delete.
18494 * config/rs6000/predicates.md (easy_vector_constant): Remove paired
18496 * config/rs6000/rs6000-builtin.def: Remove paired float support.
18497 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Update
18498 comment. Remove paired float support.
18499 * config/rs6000/rs6000-modes.def: Remove V2SF and V2SI.
18500 * config/rs6000/rs6000-opts.h (enum rs6000_vector): Delete
18502 * config/rs6000/rs6000-protos.h (paired_expand_vector_init,
18503 paired_emit_vector_cond_expr, paired_expand_vector_move): Delete
18505 * config/rs6000/rs6000.c: Remove paired float support.
18506 (paired_expand_vector_init, paired_expand_vector_move,
18507 paired_emit_vector_compare, paired_emit_vector_cond_expr,
18508 (paired_expand_lv_builtin, paired_expand_stv_builtin,
18509 paired_expand_builtin, paired_expand_predicate_builtin,
18510 paired_init_builtins): Delete.
18511 * config/rs6000/rs6000.h: Remove paired float support.
18512 * config/rs6000/rs6000.md: Remove paired float support.
18513 (move_from_CR_ov_bit): Delete.
18514 * config/rs6000/rs6000.opt (mpaired): Delete.
18515 * config/rs6000/t-rs6000: Remove paired.md from MD_INCLUDES.
18516 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mpaired.
18518 2018-05-02 Richard Biener <rguenther@suse.de>
18520 PR middle-end/85567
18521 * gimplify.c (gimplify_save_expr): When in SSA form allow
18522 SAVE_EXPRs to compute to SSA vars.
18524 2018-05-02 Jakub Jelinek <jakub@redhat.com>
18527 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
18528 *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
18529 *<shift_insn><dwi>3_doubleword_mask_1): If and[sq]i3 is needed, don't
18530 clobber operands[2], instead use a new pseudo. Formatting fixes.
18532 2018-05-02 Richard Sandiford <richard.sandiford@linaro.org>
18534 PR tree-optimization/85586
18535 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence): Only
18536 exit early for statements in the same group if the accesses are
18539 2018-05-02 Tom de Vries <tom@codesourcery.com>
18542 * lto-wrapper.c (compile_offload_image): Add "could not find mkoffload"
18545 2018-05-01 Marc Glisse <marc.glisse@inria.fr>
18547 PR tree-optimization/85143
18548 * match.pd (A<B&A<C): Extend to BIT_IOR_EXPR.
18550 2018-05-01 Tom de Vries <tom@codesourcery.com>
18553 * config/nvptx/mkoffload.c (main): Suggest using -B in "offload compiler
18554 not found" error message.
18556 2018-05-01 Tom de Vries <tom@codesourcery.com>
18559 * vec.h (VEC_ORDERED_REMOVE_IF, VEC_ORDERED_REMOVE_IF_FROM_TO): Define.
18560 * vec.c (test_ordered_remove_if): New function.
18561 (vec_c_tests): Call test_ordered_remove_if.
18562 * dwarf2cfi.c (connect_traces): Use VEC_ORDERED_REMOVE_IF_FROM_TO.
18563 * lto-streamer-out.c (prune_offload_funcs): Use VEC_ORDERED_REMOVE_IF.
18564 * tree-vect-patterns.c (vect_pattern_recog_1): Use
18565 VEC_ORDERED_REMOVE_IF.
18567 2018-05-01 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
18569 PR tree-optimization/82665
18570 * vr-values.c (vr_values::extract_range_from_binary_expr): Handle
18571 pointer subtraction where arguments come from a memchr call.
18573 2018-05-01 Jakub Jelinek <jakub@redhat.com>
18575 * configure.ac (LD_AS_NEEDED_OPTION, LD_NO_AS_NEEDED_OPTION): Use
18576 --push-state --as-needed and --pop-state instead of --as-needed and
18577 --no-as-needed if ld supports it.
18578 * configure: Regenerated.
18581 * doc/install.texi2html: Replace _002d with - and _002a with * in
18582 generated html files using sed.
18584 2018-04-30 David Malcolm <dmalcolm@redhat.com>
18587 * gcc-rich-location.c (blank_line_before_p): New function.
18588 (use_new_line): New function.
18589 (gcc_rich_location::add_fixit_insert_formatted): New function.
18590 * gcc-rich-location.h
18591 (gcc_rich_location::add_fixit_insert_formatted): New function.
18593 2018-04-30 David Malcolm <dmalcolm@redhat.com>
18595 * selftest.c (assert_streq): Rename "expected" and "actual" to
18596 "val1" and "val2". Extend NULL-handling to cover both inputs
18597 symmetrically, while still requiring both to be non-NULL for a pass.
18598 * selftest.h (assert_streq): Rename "expected" and "actual" to
18600 (ASSERT_EQ): Likewise.
18601 (ASSERT_EQ_AT): Likewise.
18602 (ASSERT_KNOWN_EQ): Likewise.
18603 (ASSERT_KNOWN_EQ_AT): Likewise.
18604 (ASSERT_NE): Likewise.
18605 (ASSERT_MAYBE_NE): Likewise.
18606 (ASSERT_MAYBE_NE_AT): Likewise.
18607 (ASSERT_STREQ): Likewise. Clarify that both must be non-NULL for
18608 the assertion to pass.
18609 (ASSERT_STREQ_AT): Likewise.
18611 2018-04-30 Jonathan Wakely <jwakely@redhat.com>
18613 * doc/invoke.texi (-fpie, -fPIE): Fix grammar and clarify
18614 interaction with -pie.
18616 2018-04-30 David Malcolm <dmalcolm@redhat.com>
18618 * selftest.h: Fix alphabetization of per-source-file selftest
18621 2018-04-30 Jason Merrill <jason@redhat.com>
18623 PR c++/61982 - dead stores to destroyed objects.
18624 * gimplify.c (gimplify_modify_expr): Simplify complex lvalue on LHS
18627 2018-04-30 Jason Merrill <jason@redhat.com>
18629 * tree.c (build_clobber): New.
18630 * tree.h: Declare it.
18631 * gimplify.c (gimplify_bind_expr, gimplify_target_expr): Use it.
18633 2018-04-30 David Malcolm <dmalcolm@redhat.com>
18635 * diagnostic-show-locus.c (layout::layout): Update for
18636 location_get_source_line returning a char_span.
18637 (struct char_span): Move to input.h.
18638 (struct correction): Update for fields in char_span becoming
18640 (struct source_line): Update for location_get_source_line
18641 returning a char_span.
18642 (layout::print_line): Likewise.
18643 * edit-context.c (edited_file::print_content): Likewise.
18644 (edited_file::print_diff_hunk): Likewise.
18645 (edited_file::print_run_of_changed_lines): Likewise.
18646 (edited_file::get_num_lines): Likewise.
18647 (edited_line::edited_line): Likewise.
18648 * final.c (asm_show_source): Likewise.
18649 * input.c (location_get_source_line): Convert return type
18650 from const char * to char_span, losing the final "line_len"
18652 (dump_location_info): Update for the above.
18653 (get_substring_ranges_for_loc): Likewise. Use a char_span
18654 when handling the literal within the line.
18655 (test_reading_source_line): Update for location_get_source_line
18656 returning a char_span.
18657 * input.h (class char_span): Move here from
18658 diagnostic-show-locus.c, converting from a struct to a class.
18659 Make data members private.
18660 (char_span::operator bool): New.
18661 (char_span::length): New.
18662 (char_span::get_buffer): New.
18663 (char_span::operator[]): New.
18664 (char_span::subspan): Make const.
18665 (char_span::xstrdup): New.
18666 (location_get_source_line): Convert return type from const char *
18667 to char_span, losing the final "line_size" param.
18669 2018-04-30 Jan Hubicka <jh@suse.cz>
18671 * lto-wrapper.c (ltrans_priorities): New static var.
18672 (cmp_priority): New.
18673 (run_gcc): Read priorities and if doing parallel build order
18674 the Makefile by them.
18676 2018-04-30 David Malcolm <dmalcolm@redhat.com>
18678 * input.h (builtins_location_check): Convert to a STATIC_ASSERT.
18680 2018-04-30 Richard Biener <rguenther@suse.de>
18682 * tree-cfg.c (verify_address): Remove base argument, add
18683 flag whether to check TREE_ADDRESSABLE and do that.
18684 (verify_expr): Remove.
18685 (verify_types_in_gimple_reference): Add pieces from verify_expr.
18686 (verify_gimple_assign_single): Likewise.
18687 (verify_gimple_switch): Likewise.
18688 (verify_expr_location_1): Dereference tp once. Add (disabled)
18689 piece from verify_expr.
18690 (verify_gimple_in_cfg): Do not call verify_expr on all ops.
18692 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
18694 * config/arc/linux.h (CLEAR_INSN_CACHE): Define.
18696 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
18698 * config/arc/arc-protos.h (prepare_extend_operands): Remove.
18699 (small_data_pattern): Likewise.
18700 (arc_rewrite_small_data): Likewise.
18701 * config/arc/arc.c (LEGITIMATE_SMALL_DATA_OFFSET_P): Remove.
18702 (LEGITIMATE_SMALL_DATA_ADDRESS_P): Likewise.
18703 (get_symbol_alignment): New function.
18704 (legitimate_small_data_address_p): Likewise.
18705 (legitimate_scaled_address): Update, call
18706 legitimate_small_data_address_p.
18707 (output_sdata): New static variable.
18708 (arc_print_operand): Update how we handle small data operands.
18709 (arc_print_operand_address): Likewise.
18710 (arc_legitimate_address_p): Update, use
18711 legitimate_small_data_address_p.
18712 (arc_rewrite_small_data_p): Remove.
18713 (arc_rewrite_small_data_1): Likewise.
18714 (arc_rewrite_small_data): Likewise.
18715 (small_data_pattern): Likewise.
18716 (compact_sda_memory_operand): Update to use
18717 legitimate_small_data_address_p and get_symbol_alignment.
18718 (prepare_move_operands): Don't rewite sdata pattern.
18719 (prepare_extend_operands): Remove.
18720 * config/arc/arc.md (zero_extendqihi2): Don't rewrite sdata
18722 (zero_extendqisi2): Likewise.
18723 (zero_extendhisi2): Likewise.
18724 (extendqihi2): Likewise.
18725 (extendqisi2): Likewise.
18726 (extendhisi2): Likewise.
18727 (addsi3): Likewise.
18728 (subsi3): Likewise.
18729 (andsi3): Likewise.
18730 * config/arc/constraints.md (Usd): Change it to memory constraint.
18732 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
18734 * config/arc/arc.c (arc_split_move): Allow signed 6-bit constants
18735 as source of std instructions.
18736 * config/arc/arc.md (movsi_insn): Update pattern predicate to
18737 allow 6-bit constants as source for store instructions.
18738 (movdi_insn): Update instruction pattern to allow 6-bit constants
18739 as source for store instructions.
18741 2018-04-30 Jonathan Wakely <jwakely@redhat.com>
18743 * doc/invoke.texi (-fdebug-types-section): Fix grammar.
18745 2018-04-30 Nathan Sidwell <nathan@acm.org>
18746 Sandra Loosemore <sandra@codesourcery.com>
18748 * dumpfile.c (dump_open): Allow '-' for stdout.
18749 * doc/invoke.texi (Developer Options): Document dump filename
18750 determination early. Document stdin/stdout selection.
18752 2018-04-30 Andrew Sadek <andrew.sadek.se@gmail.com>
18754 Microblaze Target: PIC data text relative
18756 * config/microblaze/microblaze.opt: add new option -mpic-data-text-rel.
18757 * config/microblaze/microblaze-protos.h (microblaze_constant_address_p):
18759 * config/microblaze/microblaze.h (microblaze_constant_address_p):
18760 CONSTANT_ADDRESS_P definition to microblaze_constant_address_p.
18761 * config/microblaze/microblaze.c (TARGET_PIC_DATA_TEXT_REL):
18762 New addressing mode for data-text relative position indepenedent code.
18763 (microblaze_classify_unspec): add 'UNSPEC_TEXT' case ->
18764 'ADDRESS_SYMBOLIC_TXT_REL'.
18765 (microblaze_classify_address): Add handling for UNSPEC + CONST_INT.
18766 (microblaze_legitimate_pic_operand): Exclude function calls from
18767 pic operands in case of TARGET_PIC_DATA_TEXT_REL option.
18768 (microblaze_legitimize_address): Generate 'UNSPEC_TEXT' for all possible
18770 (microblaze_address_insns): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
18771 (print_operand): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
18772 (print_operand_address): Add 'ADDRESS_SYMBOLIC_TXT_REL' case + handling
18773 for 'address + offset'.
18774 (microblaze_expand_prologue): Add new function prologue call for
18776 (microblaze_asm_generate_pic_addr_dif_vec): Override new target hook
18777 'TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC' to disable address diff vector
18778 table in case of TARGET_PIC_DATA_TEXT_REL.
18779 (expand_pic_symbol_ref): Add handling for 'UNSPEC_TEXT'.
18780 * config/microblaze/microblaze.md (TARGET_PIC_DATA_TEXT_REL):
18781 Add new macros 'UNSPEC_TEXT',
18782 'UNSPEC_SET_TEXT' + add rule for setting r20 in function prologue
18783 + exclude function calls from 'UNSPEC_PLT' in case of data text
18785 * doc/tm.texi.in (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
18786 new target hook for generating address diff vector tables in case of
18788 * doc/tm.texi : Regenerate.
18789 * stmt.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Append new condition
18790 'targetm.asm_out.generate_pic_addr_diff_vec' to flag_pic in case
18791 of addr diff vector generation.
18792 * target.def (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
18793 target hook definition.
18794 * targhooks.h, targhooks.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC):
18795 Add default function for generate_pic_addr_diff_vec -> flag_pic.
18796 * doc/invoke.texi (Add new pic option): Add new microblaze pic
18797 option for data text relative.
18799 2018-04-30 Richard Biener <rguenther@suse.de>
18801 * tree-chrec.h (evolution_function_is_constant_p): Remove
18803 * tree-cfg.c (tree_node_can_be_shared): Re-order checks.
18805 2018-04-30 Richard Biener <rguenther@suse.de>
18808 * dwarf2out.c (gen_producer_string): Ignore -fchecking[=].
18810 2018-04-30 Richard Biener <rguenther@suse.de>
18812 PR tree-optimization/28364
18813 PR tree-optimization/85275
18814 * tree-ssa-loop-ch.c (ch_base::copy_headers): Stop after
18815 copying first exit test.
18817 2018-04-28 Mark Wielaard <mark@klomp.org>
18819 * dwarf2out.c (dwarf2out_finish): Add .debug_addr table header for
18820 dwarf_version >= 5.
18821 (dwarf_AT): Handle DW_AT_addr_base.
18822 (add_top_level_skeleton_die_attrs): Use dwarf_AT for DW_AT_addr_base.
18824 2018-04-28 Uros Bizjak <ubizjak@gmail.com>
18827 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask): New pattern.
18828 (*ashl<dwi>3_doubleword_mask_1): Ditto.
18829 (*<shift_insn><dwi>3_doubleword_mask): Ditto.
18830 (*<shift_insn><dwi>3_doubleword_mask_1): Ditto.
18832 2018-04-28 Richard Biener <rguenther@suse.de>
18834 * tree-cfg.c (verify_gimple_phi): Take a gphi * argument.
18835 (verify_gimple_in_cfg): Rename visited_stmts to visited_throwing_stmts
18836 to reflect use. Only add interesting stmts.
18838 2018-04-27 Martin Jambor <mjambor@suse.cz>
18841 * ipa-cp.c (find_aggregate_values_for_callers_subset): Make sure
18842 the jump function allows for passing through aggregate values.
18844 2018-04-27 David Malcolm <dmalcolm@redhat.com>
18846 * input.h (in_system_header_at): Convert from macro to inline
18848 (from_macro_expansion_at): Likewise.
18849 (from_macro_definition_at): Likewise.
18851 2018-04-27 Jeff Law <law@redhat.com>
18853 * config.gcc: Mark tile* targets as deprecated/obsolete.
18855 2018-04-27 Richard Biener <rguenther@suse.de>
18857 * config/aarch64/aarch64.c: Simplify ap.__stack advance and
18860 2018-04-27 Richard Biener <rguenther@suse.de>
18862 * tree-cfg.c (verify_expr): Make dead code hit gcc_unreachable.
18864 2018-04-27 Uros Bizjak <ubizjak@gmail.com>
18866 * config/i386/i386.md (*movti_internal): Substitute Ye constraint
18867 with Yd constraint. Set "preferred_for_speed" attribute from
18868 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for alternatives
18869 with Yd constraint.
18870 (*movdi_internal): Ditto.
18871 (movti_interunit splitters): Remove
18872 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC from insn condition.
18873 (movdi_interunit splitters): Ditto.
18874 * config/i386/constraints.md (Ye): Remove.
18875 (Yd): Do not depend on TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC.
18877 2018-04-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
18880 * config/aarch64/constraints.md (Usg): Limit to 31.
18881 (Usj): Limit to 63.
18883 2018-04-27 Jakub Jelinek <jakub@redhat.com>
18885 PR tree-optimization/85529
18886 * tree-ssa-reassoc.c (optimize_range_tests_var_bound): Add FIRST_BB
18887 argument. Don't call get_nonzero_bits if opcode is ERROR_MARK_NODE,
18888 rhs2 def stmt's bb is dominated by first_bb and it isn't an obvious
18889 zero extension or masking of the MSB bit.
18890 (optimize_range_tests): Add FIRST_BB argument, pass it through
18891 to optimize_range_tests_var_bound.
18892 (maybe_optimize_range_tests, reassociate_bb): Adjust
18893 optimize_range_tests callers.
18895 2018-04-26 Richard Biener <rguenther@suse.de>
18896 Jakub Jelinek <jakub@redhat.com>
18898 * cgraph.h (symbol_table): Just declare debug method here.
18899 * symtab.c (symbol_table::debug): Define.
18901 2018-04-26 Eric Botcazou <ebotcazou@adacore.com>
18903 * loop-invariant.c (may_assign_reg_p): Return false for frame pointer.
18905 2018-04-26 Uros Bizjak <ubizjak@gmail.com>
18907 * config/i386/i386.md ("isa" attribute): Add x64_sse2.
18908 ("enabled" attribute): Handle x64_sse2 "isa" attribute.
18909 (*movdi_internal): Substitute Yi and Yj constraint with x
18910 and Ym and Yn constraint with y constraint. Update "isa"
18911 attribute and set "preferred_for_speed" attribute from
18912 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for updated alternatives.
18913 (*movsi_internal): Ditto.
18914 (*movdf_internal): Ditto.
18915 (*movsf_internal): Ditto.
18916 (*zero_extendsidi2): Ditto.
18917 * config/i386/sse.md (vec_set<mode>_0): Ditto.
18918 (sse2_loadld): Ditto.
18919 (*vec_extract<ssevecmodelower>_0): Ditto.
18920 (*vec_extractv4si_0_zext_sse4): Ditto.
18921 (vec_concatv2di): Ditto.
18922 (*vec_dup<mode>): Ditto.
18923 * config/i386/mmx.md (*mov<mode>_internal): Ditto.
18924 * config/i386/constraints.md (Yi): Remove.
18929 2018-04-26 Nathan Sidwell <nathan@acm.org>
18931 * dumpfile.c (dump_open): New.
18932 (dump_open_alternate_stream, dump_start, dump_begin): Call it.
18933 (dump_finish): Detect stdio/stderr by value not name.
18935 2018-04-26 Jonathan Wakely <jwakely@redhat.com>
18937 * doc/invoke.texi (-Wreturn-type): Document default status for C++.
18939 2018-04-26 Tom de Vries <tom@codesourcery.com>
18942 * config/nvptx/nvptx.c (verify_neutering_jumps)
18943 (verify_neutering_labels): New function
18944 (nvptx_single): Use verify_neutering_jumps and verify_neutering_labels.
18946 2018-04-26 Tom de Vries <tom@codesourcery.com>
18949 * config/nvptx/nvptx.c (needs_neutering_p): New function.
18950 (nvptx_single): Use needs_neutering_p to skip over insns that do not
18953 2018-04-26 Richard Biener <rguenther@suse.de>
18954 Tom de Vries <tom@codesourcery.com>
18957 * lto-streamer-out.c (output_function): Fixup loops if required to match
18958 discovery done in the reader.
18960 2018-04-26 Richard Biener <rguenther@suse.de>
18962 PR tree-optimization/85116
18963 * tree-ssa-loop-ch.c (do_while_loop_p): A do-while loop should
18964 have a loop exit from the single latch predecessor. Remove
18965 case of header with just condition.
18966 (ch_base::copy_headers): Exclude infinite loops from any
18968 (pass_ch::execute): Record exits.
18970 2018-04-26 Richard Biener <rguenther@suse.de>
18972 * tree-vect-data-refs.c (vect_get_data_access_cost): Get
18973 prologue cost vector and pass it to vect_get_load_cost.
18974 (vect_get_peeling_costs_all_drs): Likewise.
18975 (vect_peeling_hash_get_lowest_cost): Likewise.
18976 (vect_enhance_data_refs_alignment): Likewise.
18978 2018-04-26 Richard Biener <rguenther@suse.de>
18980 PR middle-end/85450
18981 * tree-cfg.c (verify_gimple_assign_unary): Restore proper
18982 checking of integer<->pointer conversions.
18983 * omp-expand.c (expand_omp_for_static_nochunk): Avoid
18984 sign-/zero-extending pointer types.
18985 (expand_omp_for_static_chunk): Likewise.
18987 2018-03-22 Hans-Peter Nilsson <hp@axis.com>
18988 Jean Lee <xiaoyur347@gmail.com>
18990 * config/mips/mips.c (mips_asan_shadow_offset): New function.
18991 (TARGET_ASAN_SHADOW_OFFSET): Define.
18992 * config/mips/mips.h (FRAME_GROWS_DOWNWARD): Augment to also be
18993 true for -fsanitize=address.
18995 2018-04-25 Mark Wielaard <mark@klomp.org>
18997 * dwarf2out.c (file_info_cmp): Sort longer dir prefixes before
19000 2018-04-25 Jakub Jelinek <jakub@redhat.com>
19002 * config/i386/i386.md (*x86_mov<mode>cc_0_m1): Use type "alu1" rather
19003 than "alu", remove explicit "memory" and "imm_disp" attributes.
19004 (*x86_mov<mode>cc_0_m1_se, *x86_mov<mode>cc_0_m1_neg): Likewise.
19006 PR middle-end/85414
19007 * simplify-rtx.c (simplify_unary_operation_1) <case SIGN_EXTEND,
19008 case ZERO_EXTEND>: Pass SUBREG_REG (op) rather than op to
19009 gen_lowpart_no_emit.
19011 2018-04-25 Sebastian Peryt <sebastian.peryt@intel.com>
19014 * config/i386/i386.c (ix86_expand_builtin): Change memory
19015 operand to XI, extend p0 to Pmode.
19016 * config/i386/i386.md: Change unspec volatile and operand
19017 1 mode to XI, change operand 0 mode to P.
19019 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
19021 * config/nds32/nds32-predicates.c (nds32_can_use_bclr_p): Mask with
19022 GET_MODE_MASK before any checking.
19023 (nds32_can_use_bset_p): Likewise.
19024 (nds32_can_use_btgl_p): Likewise.
19026 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
19028 * config/nds32/nds32-doubleword.md: New define_split pattern for
19029 illegal register number.
19031 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
19033 * config/nds32/nds32.c (nds32_print_operand): Set op_value ealier.
19035 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
19037 * config/nds32/nds32.h (ASM_APP_ON): Add missing newline character.
19039 2018-04-25 Richard Biener <rguenther@suse.de>
19041 * lto-streamer.h (LTO_major_version): Bump to 8.
19043 2018-04-25 Jakub Jelinek <jakub@redhat.com>
19045 * BASE-VER: Set to 9.0.0.
19047 2018-04-24 Segher Boessenkool <segher@kernel.crashing.org>
19049 * config/rs6000/rs6000.c (init_float128_ieee): Fix spelling mistakes
19050 in __abskf2 and __powikf2.
19052 2018-04-24 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
19055 * config/aarch64/constraints.md (Usg, Usj): New constraints.
19056 * config/aarch64/iterators.md (cmode_simd): New mode attribute.
19057 * config/aarch64/aarch64.md (*aarch64_ashr_sisd_or_int_<mode>3):
19058 Use the above on operand 2. Reindent.
19059 (*aarch64_lshr_sisd_or_int_<mode>3): Likewise.
19061 2018-04-24 H.J. Lu <hongjiu.lu@intel.com>
19064 * common/config/i386/i386-common.c (ix86_handle_option): Don't
19066 * config/i386/i386.opt (mcet): Removed.
19067 * doc/install.texi: Remove -mcet documentation.
19068 * doc/invoke.texi: Likewise.
19070 2018-04-24 H.J. Lu <hongjiu.lu@intel.com>
19073 * doc/install.texi: Remove -mcet from bootstrap-cet.
19075 2018-04-24 Jakub Jelinek <jakub@redhat.com>
19078 * config/i386/i386.c (ix86_init_mmx_sse_builtins): Don't define
19079 __builtin_ia32_readeflags_u32 and __builtin_ia32_writeeflags_u32
19083 * config/rs6000/rs6000-p8swap.c (const_load_sequence_p): Punt if
19084 const_vector is not CONST_VECTOR or SYMBOL_REF for a constant pool
19085 containing a CONST_VECTOR.
19087 2018-04-24 Cesar Philippidis <cesar@codesourcery.com>
19089 * doc/install.texi: Update newlib dependency for nvptx.
19091 2018-04-24 Jakub Jelinek <jakub@redhat.com>
19094 * config/i386/i386.c (ix86_expand_vector_init_one_var): Use UINTVAL
19095 instead of INTVAL when shifting x left.
19097 2018-04-24 Andreas Krebbel <krebbel@linux.ibm.com>
19099 PR tree-optimization/85478
19100 * tree-vect-loop.c (vect_analyze_loop_2): Do not call
19101 vect_grouped_store_supported for single element vectors.
19103 2018-04-24 Richard Biener <rguenther@suse.de>
19106 * config/i386/i386.c (ix86_add_stmt_cost): Restrict strided
19107 load cost increase to the case of non-constant step.
19109 2018-04-24 Jakub Jelinek <jakub@redhat.com>
19112 * reg-stack.c (move_for_stack_reg): Don't fail assertion about dead
19113 destination if any_malformed_asm.
19115 2018-04-23 Eric Botcazou <ebotcazou@adacore.com>
19117 PR middle-end/85496
19118 * expr.c (store_field): In the bitfield case, if the value comes from
19119 a function call and is returned in registers by means of a PARALLEL,
19120 do not change the mode of the temporary unless BLKmode and VOIDmode.
19122 2018-04-23 Andrey Belevantsev <abel@ispras.ru>
19124 PR rtl-optimization/85423
19125 * sel-sched-ir.c (has_dependence_note_mem_dep): Only discard
19126 dependencies to debug insns when the previous insn is non-debug.
19128 2018-04-23 Claudiu Zissulescu <claziss@synopsys.com>
19130 * config/arc/arc.md ("vunspec"): Delete it, unify all the unspec
19131 enums into a single definition.
19132 (fls): Fix predicates and printing.
19135 2018-04-23 Claudiu Zissulescu <claziss@synopsys.com>
19137 * config/arc/arc-protos.h (check_if_valid_sleep_operand): Remove.
19138 * config/arc/arc.c (arc_expand_builtin): Sleep accepts registers
19139 and short u6 immediate.
19140 (check_if_valid_sleep_operand): Remove.
19141 * config/arc/arc.md (Sleep): Accepts registers and u6 immediates.
19143 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
19145 * config/nds32/nds32.c (nds32_compute_stack_frame): Consider
19146 flag_always_save_lp condition.
19147 * config/nds32/nds32.opt (malways-save-lp): New option.
19149 2018-04-22 Shiva Chen <shiva0217@gmail.com>
19151 * config/nds32/nds32-protos.h (nds32_use_load_post_increment): Declare.
19152 * config/nds32/nds32.c (nds32_use_load_post_increment): New.
19153 * config/nds32/nds32.h
19154 (USE_LOAD_POST_INCREMENT, USE_LOAD_POST_DECREMENT): Define.
19155 (USE_STORE_POST_INCREMENT, USE_STORE_POST_DECREMENT): Define.
19157 2018-04-22 Shiva Chen <shiva0217@gmail.com>
19159 * config/nds32/nds32-protos.h (nds32_ls_333_p): Remove.
19160 * config/nds32/nds32.c (nds32_ls_333_p): Remove.
19162 2018-04-22 Shiva Chen <shiva0217@gmail.com>
19163 Chung-Ju Wu <jasonwucj@gmail.com>
19165 * config/nds32/nds32-protos.h (nds32_case_vector_shorten_mode):
19167 * config/nds32/nds32.c (nds32_case_vector_shorten_mode): New function.
19168 * config/nds32/nds32.h (CASE_VECTOR_SHORTEN_MODE): Modify.
19170 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
19172 * config/nds32/nds32.c (nds32_compute_stack_frame): Fix wrong value.
19174 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
19176 * config/nds32/nds32-protos.h (nds32_data_alignment,
19177 nds32_local_alignment): Declare.
19178 * config/nds32/nds32.c (nds32_data_alignment, nds32_constant_alignment,
19179 nds32_local_alignment): New functions.
19180 (TARGET_CONSTANT_ALIGNMENT): Define.
19181 * config/nds32/nds32.h (DATA_ALIGNMENT, LOCAL_ALIGNMENT): Define.
19183 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
19185 * config/nds32/nds32.c
19186 (TARGET_HARD_REGNO_MODE_OK): Move to the bottom of file.
19187 (TARGET_MODES_TIEABLE_P): Likewise.
19189 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
19191 * config/nds32/nds32.c (nds32_asm_file_start): Display optimization
19192 level Ofast and Og.
19194 2018-04-22 Monk Chiang <sh.chiang04@gmail.com>
19195 Chung-Ju Wu <jasonwucj@gmail.com>
19197 * config/nds32/constants.md (unspec_volatile_element): Add enum values
19198 for unaligned access.
19199 * config/nds32/nds32-intrinsic.c: Implementation of expanding
19201 * config/nds32/nds32-intrinsic.md: Likewise.
19202 * config/nds32/nds32_intrinsic.h: Likewise.
19203 * config/nds32/nds32.h (nds32_builtins): Likewise.
19204 * config/nds32/nds32.opt (munaligned-access): New option.
19205 * config/nds32/nds32.c (nds32_asm_file_start): Display
19206 flag_unaligned_access status.
19208 2018-04-20 Kito Cheng <kito.cheng@gmail.com>
19210 * config/riscv/elf.h (LINK_SPEC): Pass --no-relax if
19211 -mno-relax is present.
19212 * config/riscv/linux.h (LINK_SPEC): Ditto.
19214 2018-04-20 Martin Sebor <msebor@redhat.com>
19217 * gimple-fold.c (gimple_fold_builtin_strcpy): Suppress -Wrestrict
19219 (gimple_fold_builtin_stxcpy_chk): Same.
19220 * gimple-ssa-warn-restrict.c (check_bounds_or_overlap): Same.
19222 2018-04-20 Michael Meissner <meissner@linux.ibm.com>
19225 * config/rs6000/rs6000.c (init_float128_ieee): Add support to call
19226 __powikf2 when long double is IEEE 128-bit.
19228 2018-04-20 Kito Cheng <kito.cheng@gmail.com>
19230 * config/riscv/riscv.c (riscv_first_stack_step): Round up min
19231 step to make sure stack always aligned.
19233 2018-04-20 Carl Love <cel@us.ibm.com>
19236 * config/rs6000/rs6000-c.c (rs6000_gimple_fold_builtin): Add
19237 size check for arg0.
19239 2018-04-20 Nathan Sidwell <nathan@codesourcery.com>
19240 Tom de Vries <tom@codesourcery.com>
19243 * config/nvptx/nvptx.c (nvptx_emit_forking, nvptx_emit_joining):
19244 Emit insns for calls too.
19245 (nvptx_find_par): Always look for worker-level predecessor insn.
19246 (nvptx_propagate): Add is_call parm, return bool. Copy frame for
19248 (nvptx_vpropagate, nvptx_wpropagate): Adjust.
19249 (nvptx_process_pars): Propagate frames for calls.
19251 2018-04-20 H.J. Lu <hongjiu.lu@intel.com>
19254 * common/config/i386/i386-common.c (OPTION_MASK_ISA_IBT_SET):
19256 (OPTION_MASK_ISA_IBT_UNSET): Likewise.
19257 (ix86_handle_option): Don't handle OPT_mibt.
19258 * config/i386/cet.h: Check __CET__ instead of __IBT__ and
19260 * config/i386/driver-i386.c (host_detect_local_cpu): Remove
19262 * config/i386/i386-c.c (ix86_target_macros_internal): Don't
19263 check OPTION_MASK_ISA_IBT nor flag_cf_protection.
19264 (ix86_target_macros): Define __CET__ with flag_cf_protection
19265 for -fcf-protection.
19266 * config/i386/i386.c (isa2_opts): Remove -mibt.
19267 * config/i386/i386.h (TARGET_IBT): Removed.
19268 (TARGET_IBT_P): Likewise.
19269 (ix86_valid_target_attribute_inner_p): Don't check OPT_mibt.
19270 * config/i386/i386.md (nop_endbr): Don't check TARGET_IBT.
19271 * config/i386/i386.opt (mcet): Update help message.
19272 (mshstk): Likewise.
19274 * doc/invoke.texi: Remove -mibt. Document __CET__. Document
19275 -mcet as an alias for -mshstk.
19277 2018-04-20 Richard Biener <rguenther@suse.de>
19279 PR middle-end/85475
19280 * match.pd ((X * CST) * Y -> (X * Y) * CST): Avoid exponential
19281 complexity by forcing a single use of the multiply operand.
19283 2018-04-20 Martin Jambor <mjambor@suse.cz>
19286 * ipa-cp.c (cgraph_edge_brings_value_p): Move check for self-feeding
19287 recursion dependency to only apply to non-clones.
19289 2018-04-20 Martin Jambor <mjambor@suse.cz>
19292 * ipa-cp.c (create_specialized_node): Check that clones of
19293 self-recursive edges exist during IPA-CP.
19295 2018-04-19 Toon Moene <toon@moene.org>
19297 * doc/invoke.texi: Add -floop-unroll-and-jam to options enabled
19300 2018-04-19 Jakub Jelinek <jakub@redhat.com>
19302 PR tree-optimization/85467
19303 * fold-const.c (fold_ternary_loc) <case BIT_FIELD_REF>: Use
19304 VECTOR_TYPE_P macro. If type is vector type, VIEW_CONVERT_EXPR the
19305 VECTOR_CST element to type.
19307 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
19310 * config/i386/i386.h (STACK_SAVEAREA_MODE): New.
19311 * config/i386/i386.md (builtin_setjmp_setup): Removed.
19312 (builtin_longjmp): Likewise.
19313 (save_stack_nonlocal): New pattern.
19314 (restore_stack_nonlocal): Likewise.
19316 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
19319 * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
19320 Replace ASM_OUTPUT_LABEL with fprintf.
19322 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
19325 * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
19326 Check flag_cf_protection instead of TARGET_IBT and TARGET_SHSTK.
19327 * config/i386/i386-c.c (ix86_target_macros_internal): Also
19328 define __IBT__ and __SHSTK__ for -fcf-protection.
19329 * config/i386/i386.c (pass_insert_endbranch::gate): Don't check
19331 (ix86_trampoline_init): Likewise.
19332 (x86_output_mi_thunk): Likewise.
19333 (ix86_notrack_prefixed_insn_p): Likewise.
19334 (ix86_option_override_internal): Don't disallow -fcf-protection.
19335 * config/i386/i386.md (rdssp<mode>): Also enable for
19337 (incssp<mode>): Likewise.
19338 (nop_endbr): Likewise.
19339 * config/i386/i386.opt (mcet): Change help message to built-in
19342 (mshstk): Likewise.
19343 * doc/invoke.texi: Remove -mcet, -mibt and -mshstk condition
19344 on -fcf-protection. Change -mcet, -mibt and -mshstk to only
19345 enable CET built-in functions.
19347 2018-04-19 Sebastian Peryt <sebastian.peryt@intel.com>
19349 * common/config/i386/i386-common.c
19350 (OPTION_MASK_ISA_MOVDIRI_SET, OPTION_MASK_ISA_MOVDIR64B_SET,
19351 OPTION_MASK_ISA_MOVDIRI_UNSET,
19352 OPTION_MASK_ISA_MOVDIR64B_UNSET): New defines.
19353 (ix86_handle_option): Handle -mmovdiri and -mmovdir64b.
19354 * config.gcc (movdirintrin.h): New header.
19355 * config/i386/cpuid.h (bit_MOVDIRI,
19356 bit_MOVDIR64B): New bits.
19357 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mmovdiri
19359 * config/i386/i386-builtin-types.def ((VOID, PUNSIGNED, UNSIGNED),
19360 (VOID, PVOID, PCVOID)): New function types.
19361 * config/i386/i386-builtin.def (__builtin_ia32_directstoreu_u32,
19362 __builtin_ia32_directstoreu_u64,
19363 __builtin_ia32_movdir64b): New builtins.
19364 * config/i386/i386-c.c (__MOVDIRI__, __MOVDIR64B__): New.
19365 * config/i386/i386.c (ix86_target_string): Added -mmovdir64b
19367 (ix86_valid_target_attribute_inner_p): Ditto.
19368 (ix86_expand_special_args_builtin): Added VOID_FTYPE_PUNSIGNED_UNSIGNED
19369 and VOID_FTYPE_PUNSIGNED_UNSIGNED.
19370 (ix86_expand_builtin): Expand IX86_BUILTIN_MOVDIR64B.
19371 * config/i386/i386.h (TARGET_MOVDIRI, TARGET_MOVDIRI_P,
19372 TARGET_MOVDIR64B, TARGET_MOVDIR64B_P): New.
19373 * config/i386/i386.md (UNSPECV_MOVDIRI, UNSPECV_MOVDIR64B): New.
19374 (movdiri<mode>, movdir64b_<mode>): New.
19375 * config/i386/i386.opt: Add -mmovdiri and -mmovdir64b.
19376 * config/i386/immintrin.h: Include movdirintrin.h.
19377 * config/i386/movdirintrin.h: New file.
19378 * doc/invoke.texi: Added -mmovdiri and -mmovdir64b.
19380 2018-04-19 Richard Biener <rguenther@suse.de>
19382 PR middle-end/85455
19383 * cfg.c (clear_bb_flags): When loop state says we have
19384 marked irreducible regions also preserve BB_IRREDUCIBLE_LOOP.
19386 2018-04-19 Richard Biener <rguenther@suse.de>
19388 PR tree-optimization/84737
19389 * tree-vect-data-refs.c (vect_copy_ref_info): New function
19390 copying restrict info.
19391 (vect_setup_realignment): Use it.
19392 * tree-vectorizer.h (vect_copy_ref_info): Declare.
19393 * tree-vect-stmts.c (vectorizable_store): Copy ref info from
19394 the first DR to all generated stores.
19395 (vectorizable_load): Likewise for loads.
19397 2018-04-19 Jakub Jelinek <jakub@redhat.com>
19399 PR tree-optimization/85446
19400 * match.pd ((intptr_t) x eq/ne CST to x eq/ne (typeof x) cst): Require
19401 the integral and pointer types to have the same precision.
19403 * doc/install.texi: Document --disable-cet being the default and
19406 2018-04-18 Martin Liska <mliska@suse.cz>
19408 * ipa-devirt.c (odr_subtypes_equivalent_p): Fix GNU coding
19411 2018-04-18 Martin Liska <mliska@suse.cz>
19414 2018-03-02 Eric Botcazou <ebotcazou@adacore.com>
19417 * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
19418 arguments if they are comparable.
19420 2018-04-18 Martin Liska <mliska@suse.cz>
19423 2018-03-13 Eric Botcazou <ebotcazou@adacore.com>
19426 * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
19429 2018-04-18 H.J. Lu <hongjiu.lu@intel.com>
19432 * config/i386/i386.c (ix86_expand_split_stack_prologue): Insert
19433 ENDBR after calling __morestack.
19435 2018-04-18 David Malcolm <dmalcolm@redhat.com>
19438 * configure.ac (gcc-driver-name.h): Honor --with-gcc-major-version
19439 by using gcc_base_ver to generate a gcc_driver_version, and use
19440 it when generating GCC_DRIVER_NAME.
19441 * configure: Regenerate.
19443 2018-04-18 Jakub Jelinek <jakub@redhat.com>
19446 * config.gcc: Obsolete powerpc*-*-*spe*.
19448 2018-04-17 Jakub Jelinek <jakub@redhat.com>
19451 * dbxout.c (dbxout_int): Perform negation in unsigned int type.
19452 (stabstr_D): Change type of unum from unsigned int to
19453 unsigned HOST_WIDE_INT. Perform negation in unsigned HOST_WIDE_INT
19456 2018-04-17 Jim Wilson <jimw@sifive.com>
19459 * config/riscv/riscv.c (riscv_compute_frame_info): Add calls to
19460 RISCV_STACK_ALIGN when using outgoing_args_size and pretend_args_size.
19461 Set arg_pointer_offset after using pretend_args_size.
19463 2018-04-17 Jakub Jelinek <jakub@redhat.com>
19465 PR rtl-optimization/85431
19466 * dse.c (record_store): Ignore zero width stores.
19469 * asan.c (handle_builtin_stack_restore): Adjust comment. Emit
19470 __asan_allocas_unpoison call and last_alloca_addr = new_sp before
19471 __builtin_stack_restore rather than after it.
19472 * builtins.c (expand_asan_emit_allocas_unpoison): Pass
19473 arg1 + (virtual_dynamic_stack_rtx - stack_pointer_rtx) as second
19474 argument instead of virtual_dynamic_stack_rtx.
19476 2018-04-17 Kelvin Nilsen <kelvin@gcc.gnu.org>
19478 * config/rs6000/rs6000-protos.h (rs6000_builtin_is_supported_p):
19480 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
19481 Add note to error message to explain internal mapping of overloaded
19482 built-in function name to non-overloaded built-in function name.
19483 * config/rs6000/rs6000.c (rs6000_builtin_is_supported_p): New
19486 2018-04-17 Michael Meissner <meissner@linux.vnet.ibm.com>
19489 * config/rs6000/rs6000.md (pack<mode>): Do not try handle a pack
19490 where the inputs overlap with the output.
19492 2018-04-17 Jakub Jelinek <jakub@redhat.com>
19494 * config/i386/sse.md (vec_extract_lo_<mode><mask_name>): Add
19495 (=v, v) alternative and explicit "memory" attribute.
19496 (vec_extract_lo_<mode><mask_name>): Likewise. Also add
19497 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
19499 (vec_extract_lo_<mode><mask_name>): Add (=v, v) alternative and use
19500 "sselog1" type instead of "sselog".
19501 (vec_extract_hi_<mode><mask_name>): Use "sselog1" type instead of
19502 "sselog". Remove explicit "memory" attribute.
19503 (vec_extract_lo_v32hi): Add (=v, v) alternative and explicit "memory",
19504 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
19506 (vec_extract_hi_v32hi): Merge all alternatives into one, use
19507 "sselog1" type instead of "sselog". Remove explicit "memory"
19509 (vec_extract_hi_v16hi): Merge each pair of alternatives into one,
19510 use "sselog1" type instead of "sselog". Remove explicit "memory"
19512 (vec_extract_lo_v64qi): Add (=v, v) alternative and explicit "memory",
19513 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
19515 (vec_extract_hi_v64qi): Merge all alternatives into one, use
19516 "sselog1" type instead of "sselog". Remove explicit "memory"
19518 (vec_extract_hi_v32qi): Merge each pair of alternatives into one,
19519 use "sselog1" type instead of "sselog". Remove explicit "memory"
19523 * config/i386/i386.md (*ashlqi3_1_slp): Use alu1 type instead of alu.
19525 PR middle-end/85414
19526 * rtlhooks.c (gen_lowpart_if_possible): Don't call gen_lowpart_SUBREG
19529 2018-04-17 Martin Jambor <mjambor@suse.cz>
19532 * ipa-cp.c (create_specialized_node): Call
19533 expand_all_artificial_thunks if necessary.
19535 2018-04-17 Martin Liska <mliska@suse.cz>
19538 * ipa-devirt.c (odr_types_equivalent_p): Remove trailing
19539 in message, remote space in between '_G' and '('.
19541 2018-04-17 Jakub Jelinek <jakub@redhat.com>
19544 * config/i386/sse.md (reduces<mode><mask_scalar_name>,
19545 avx512f_vmcmp<mode>3<round_saeonly_name>,
19546 avx512f_vmcmp<mode>3_mask<round_saeonly_name>,
19547 avx512f_sgetexp<mode><mask_scalar_name><round_saeonly_scalar_name>,
19548 avx512f_rndscale<mode><round_saeonly_name>,
19549 avx512dq_ranges<mode><mask_scalar_name><round_saeonly_scalar_name>,
19550 avx512f_vgetmant<mode><mask_scalar_name><round_saeonly_scalar_name>):
19551 Use %<iptr>2 instead of %2 for -masm=intel.
19552 (avx512f_vcvtss2usi<round_name>, avx512f_vcvtss2usiq<round_name>,
19553 avx512f_vcvttss2usi<round_saeonly_name>,
19554 avx512f_vcvttss2usiq<round_saeonly_name>): Use %k1 instead of %1 for
19556 (avx512f_vcvtsd2usi<round_name>, avx512f_vcvtsd2usiq<round_name>,
19557 avx512f_vcvttsd2usi<round_saeonly_name>,
19558 avx512f_vcvttsd2usiq<round_saeonly_name>, ufloatv2siv2df2<mask_name>):
19559 Use %q1 instead of %1 for -masm=intel.
19560 (avx512f_sfixupimm<mode><sd_maskz_name><round_saeonly_name>,
19561 avx512f_sfixupimm<mode>_mask<round_saeonly_name>): Use %<iptr>3 instead
19562 of %3 for -masm=intel.
19563 (sse2_shufpd_v2df_mask): Fix a typo, change %{6%} to %{%6%} for
19565 (*avx512vl_<code>v2div2qi2_store): Use %w0 instead of %0 for
19567 (*avx512vl_<code><mode>v4qi2_store): Use %k0 instead of %0 for
19569 (avx512vl_<code><mode>v4qi2_mask_store): Use a single pattern with
19570 %k0 and %1 for -masm=intel rather than two patterns, one with %0 and
19572 (*avx512vl_<code><mode>v8qi2_store): Use %q0 instead of %0 for
19574 (avx512vl_<code><mode>v8qi2_mask_store): Use a single pattern with
19575 %q0 and %1 for -masm=intel rather than two patterns, one with %0 and
19576 %g1 and one with %0 and %1.
19577 (avx512er_vmrcp28<mode><round_saeonly_name>,
19578 avx512er_vmrsqrt28<mode><round_saeonly_name>): Use %<iptr>1 instead of
19579 %1 for -masm=intel.
19580 (avx5124fmaddps_4fmaddps_mask, avx5124fmaddps_4fmaddss_mask,
19581 avx5124fmaddps_4fnmaddps_mask, avx5124fmaddps_4fnmaddss_mask,
19582 avx5124vnniw_vp4dpwssd_mask, avx5124vnniw_vp4dpwssds_mask): Swap order
19583 of %0 and %{%4%} for -masm=intel.
19584 (avx5124fmaddps_4fmaddps_maskz, avx5124fmaddps_4fmaddss_maskz,
19585 avx5124fmaddps_4fnmaddps_maskz, avx5124fmaddps_4fnmaddss_maskz,
19586 avx5124vnniw_vp4dpwssd_maskz, avx5124vnniw_vp4dpwssds_maskz): Swap
19587 order of %0 and %{%5%}%{z%} for -masm=intel.
19589 2018-04-17 Jan Hubicka <jh@suse.cz>
19592 * ipa-devirt.c (odr_types_equivalent_p): Handle bit fields.
19594 2018-04-17 Martin Liska <mliska@suse.cz>
19597 * multiple_target.c (create_dispatcher_calls): Set apostrophes
19598 for target_clone error message. Make default implementation
19599 clone to be a local declaration.
19600 (separate_attrs): Add new argument and check for an empty
19602 (expand_target_clones): Handle it.
19603 (ipa_target_clone): Make redirection just for target_clones
19606 2018-04-16 Cesar Philippidis <cesar@codesourcery.com>
19607 Tom de Vries <tom@codesourcery.com>
19609 PR middle-end/84955
19610 * omp-expand.c (expand_oacc_for): Add dummy false branch for
19611 tiled basic blocks without omp continue statements.
19613 2018-04-16 Aaron Sawdey <acsawdey@linux.ibm.com>
19616 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Mark
19617 vec_extract expression as having side effects to make sure it gets
19620 2018-04-16 H.J. Lu <hongjiu.lu@intel.com>
19623 * config/i386/i386.c (get_builtin_code_for_version): Check
19626 2018-04-16 Olga Makhotina <olga.makhotina@intel.com>
19629 * config.gcc: Support "skylake".
19630 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
19632 * config/i386/i386.c (m_SKYLAKE): Define.
19633 (processor_target_table): Add "skylake".
19634 (ix86_option_override_internal): Add "skylake".
19635 (get_builtin_code_for_version): Handle PROCESSOR_SKYLAKE,
19636 PROCESSOR_CANNONLAKE.
19637 (get_builtin_code_for_version): Fix priority for
19638 PROCESSOR_ICELAKE_CLIENT, PROCESSOR_ICELAKE_SERVER,
19639 PROCESSOR_SKYLAKE-AVX512.
19640 * config/i386/i386.h (processor_costs): Define TARGET_SKYLAKE.
19641 (processor_type): Add PROCESSOR_SKYLAKE.
19643 2018-04-16 Paolo Carlini <paolo.carlini@oracle.com>
19644 Jason Merrill <jason@redhat.com>
19647 * convert.c (convert_to_integer_1): Use direct recursion for
19648 enumeral types and types with a precision less than the number
19649 of bits in their mode.
19651 2018-04-16 Julia Koval <julia.koval@intel.com>
19654 * config/i386/x86-tune.def (X86_TUNE_SSE_UNALIGNED_LOAD_OPTIMAL,
19655 X86_TUNE_SSE_UNALIGNED_STORE_OPTIMAL): Add m_SKYLAKE_AVX512
19657 2018-04-14 Segher Boessenkool <segher@kernel.crashing.org>
19660 * config/rs6000/rs6000.opt (mdirect-move): Make deprecated.
19661 * doc/invoke.texi (RS/6000 and PowerPC Options): Remove -mdirect-move
19662 and -mno-direct-move.
19664 2018-04-13 Paul A. Clarke <pc@us.ibm.com>
19667 * config/rs6000/emmintrin.h (_mm_slli_epi{16,32,64}):
19668 Ensure that vec_splat_s32 is only called with 0 <= shift < 16.
19669 Ensure negative shifts result in {0}.
19671 2018-04-13 Vladimir Makarov <vmakarov@redhat.com>
19673 PR rtl-optimization/79916
19674 * config/rs6000/rs6000.c (rs6000_emit_move): Use assigned hard
19675 regs (if any) to define how to gnerate SD moves when LRA is in
19678 2018-04-13 Jakub Jelinek <jakub@redhat.com>
19680 PR rtl-optimization/85393
19681 * except.h (expand_dw2_landing_pad_for_region): Remove declaration.
19682 * except.c (expand_dw2_landing_pad_for_region): Make static.
19683 * bb-reorder.c (fix_up_crossing_landing_pad): In new_bb emit just
19684 a label and unconditional jump to old_bb, rather than
19685 expand_dw2_landing_pad_for_region insn(s) and jump to single_succ
19688 PR rtl-optimization/85376
19689 * simplify-rtx.c (simplify_const_unary_operation): For CLZ and CTZ and
19690 zero op0, if C?Z_DEFINED_VALUE_AT_ZERO is false, return NULL_RTX
19691 instead of a specific value.
19693 2018-04-13 Jan Hubicka <hubicka@ucw.cz>
19694 Bin Cheng <bin.cheng@arm.com>
19696 PR tree-optimization/82965
19697 PR tree-optimization/83991
19698 * cfgloopanal.c (expected_loop_iterations_unbounded): Add
19699 by_profile_only parameter.
19700 * cfgloopmanip.c (scale_loop_profile): Further scale loop's profile
19701 information if the loop was predicted to iterate too many times.
19702 * cfgloop.h (expected_loop_iterations_unbounded): Update prototype
19704 2018-04-13 Jan Hubicka <hubicka@ucw.cz>
19707 * config/i386/i386.c (ix86_can_inline_p): Allow safe transitions for
19710 2018-04-13 Martin Liska <mliska@suse.cz>
19711 Jakub Jelinek <jakub@redhat.com>
19713 PR middle-end/81657
19714 * expr.h (enum block_op_methods): Add BLOCK_OP_NO_LIBCALL_RET.
19715 * expr.c (emit_block_move_hints): Handle BLOCK_OP_NO_LIBCALL_RET.
19716 * builtins.c (expand_builtin_memory_copy_args): Use
19717 BLOCK_OP_NO_LIBCALL_RET method for mempcpy with non-ignored target,
19718 handle dest_addr == pc_rtx.
19720 2018-04-12 Segher Boessenkool <segher@kernel.crashing.org>
19723 * config/rs6000/rs6000.md (fix_trunc<mode>si2): Use legacy code if
19724 asked to not generate direct moves.
19725 (fix_trunc<mode>si2_stfiwx): Similar.
19726 (fix_trunc<mode>si2_internal): Similar.
19728 2018-04-12 Jakub Jelinek <jakub@redhat.com>
19731 * var-tracking.c (add_stores): Handle STRICT_LOW_PART SET_DEST.
19732 * cselib.c (cselib_record_sets): For STRICT_LOW_PART dest,
19733 lookup if dest in some wider mode is known to be const0_rtx and
19734 if so, record permanent equivalence for it to be ZERO_EXTEND of
19735 the narrower mode destination.
19737 2018-04-12 Cesar Philippidis <cesar@codesourcery.com>
19739 * lto-streamer-out.c (output_function): Revert 259346.
19740 * omp-expand.c (expand_oacc_for): Likewise.
19742 2018-04-12 Alexander Monakov <amonakov@ispras.ru>
19744 PR rtl-optimization/85354
19745 * sel-sched-ir.c (sel_init_pipelining): Move cfg_cleanup call...
19746 * sel-sched.c (sel_global_init): ... here.
19748 2018-04-12 Eric Botcazou <ebotcazou@adacore.com>
19751 * lto-wrapper.c (debug_objcopy): Open the files in binary mode.
19752 * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
19753 mode for PE-COFF targets.
19754 * config/i386/i386-protos.h (i386_pe_asm_lto_start): Declare.
19755 (i386_pe_asm_lto_end): Likewise.
19756 * config/i386/cygming.h (TARGET_ASM_LTO_START): Define.
19757 (TARGET_ASM_LTO_END): Likewise.
19758 * config/i386/winnt.c (saved_debug_info_level): New static variable.
19759 (i386_pe_asm_lto_start): New function.
19760 (i386_pe_asm_lto_end): Likewise.
19762 2018-04-12 Cesar Philippidis <cesar@codesourcery.com>
19763 Richard Biener <rguenther@suse.de>
19765 PR middle-end/84955
19766 * lto-streamer-out.c (output_function): Fix CFG loop state before
19768 * omp-expand.c (expand_oacc_for): Handle calls to internal
19769 functions like regular functions.
19771 2018-04-12 Richard Biener <rguenther@suse.de>
19774 * dwarf2out.c (init_sections_and_labels): Use debug_line_section[_label]
19775 for the early LTO debug to properly generate references to it
19776 during DIE emission. Do not re-use that for the skeleton for
19778 (dwarf2out_early_finish): Likewise.
19780 2018-04-12 Jakub Jelinek <jakub@redhat.com>
19783 * config/i386/sse.md
19784 (<mask_codefor>avx512dq_vextract<shuffletype>64x2_1<mask_name> split,
19785 <mask_codefor>avx512f_vextract<shuffletype>32x4_1<mask_name> split,
19786 vec_extract_lo_<mode><mask_name> split, vec_extract_lo_v32hi,
19787 vec_extract_lo_v64qi): For non-AVX512VL if input is xmm16+ reg
19788 and output is a reg, avoid creating invalid lowpart subreg, but
19789 instead split into a 512-bit move. Don't split if not AVX512VL,
19790 input is xmm16+ reg and output is a mem.
19791 (vec_extract_lo_<mode><mask_name>, vec_extract_lo_v32hi,
19792 vec_extract_lo_v64qi): Don't require split if not AVX512VL, input is
19793 xmm16+ reg and output is a mem.
19795 2018-04-12 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
19797 * config/s390/s390.c (s390_output_indirect_thunk_function): Check
19798 also for flag_dwarf2_cfi_asm.
19800 2018-04-12 Jakub Jelinek <jakub@redhat.com>
19802 PR rtl-optimization/85342
19803 * regcprop.c (copyprop_hardreg_forward_1): Remove replaced array, use
19804 a bool scalar var inside of the loop instead. Don't try to update
19805 recog_data.operand after failed apply_change_group.
19807 2018-04-12 Tom de Vries <tom@codesourcery.com>
19810 * config/nvptx/nvptx.c (flexible_array_member_type_p): New function.
19811 (nvptx_assemble_decl_begin): Add undefined param. Declare undefined
19812 array with flexible array member as array without given dimension.
19813 (nvptx_assemble_undefined_decl): Set nvptx_assemble_decl_begin call
19814 argument for undefined param to true.
19816 2018-04-11 Aaron Sawdey <acsawdey@linux.ibm.com>
19819 * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
19820 -mcall- and -mtraceback=. Remove options -mabi=spe and -mabi=no-spe
19821 from PowerPC section.
19822 * config/rs6000/sysv4.opt (mcall-): Improve help text.
19823 * config/rs6000/rs6000.opt (mblock-compare-inline-limit=): Trim
19824 help text that is too long.
19825 * config/rs6000/rs6000.opt (mblock-compare-inline-loop-limit=): Trim
19826 help text that is too long.
19827 * config/rs6000/rs6000.opt (mstring-compare-inline-limit=): Trim
19828 help text that is too long.
19830 2018-04-11 Uros Bizjak <ubizjak@gmail.com>
19832 * config/alpha/alpha.md (stack_probe_internal): Rename
19833 from "probe_stack". Update all callers.
19835 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
19837 PR rtl-optimization/84566
19838 * sched-deps.c (sched_analyze_insn): Check deps->readonly when invoking
19839 sched_macro_fuse_insns.
19841 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
19844 * sched-rgn.c (add_branch_dependences): Move sel_sched_p check here...
19845 (compute_block_dependences): ... from here.
19847 2018-04-11 Jakub Jelinek <jakub@redhat.com>
19849 PR tree-optimization/85331
19850 * vec-perm-indices.h (vec_perm_indices::clamp): Change input type
19851 from int to HOST_WIDE_INT.
19853 2018-04-11 Martin Jambor <mjambor@suse.cz>
19856 * ipa-cp.c (propagate_vals_across_pass_through): Expand comment.
19857 (cgraph_edge_brings_value_p): New parameter dest_val, check if it is
19858 not the same as the source val.
19859 (cgraph_edge_brings_value_p): New parameter.
19860 (gather_edges_for_value): Pass destination value to
19861 cgraph_edge_brings_value_p.
19862 (perhaps_add_new_callers): Likewise.
19863 (get_info_about_necessary_edges): Likewise and exclude values brought
19864 only by self-recursive edges.
19865 (create_specialized_node): Redirect only clones of self-calling edges.
19866 (+self_recursive_pass_through_p): New function.
19867 (find_more_scalar_values_for_callers_subset): Use it.
19868 (find_aggregate_values_for_callers_subset): Likewise.
19869 (known_aggs_to_agg_replacement_list): Removed.
19870 (decide_whether_version_node): Re-calculate known constants for all
19871 remaining context clones.
19873 2018-04-11 Richard Biener <rguenther@suse.de>
19876 * dwarf2out.c (dwarf2out_finish): Remove DW_AT_stmt_list attribute
19877 from early DWARF output.
19878 (dwarf2out_early_finish): Output line info unconditionally into
19879 early DWARF and add reference to it.
19881 2018-04-11 Jakub Jelinek <jakub@redhat.com>
19884 * config/i386/sse.md (iptr): Add V16SFmode and V8DFmode cases.
19885 (<avx512>_vec_dup<mode><mask_name>): Use a single pattern for modes
19886 other than V2DFmode using iptr mode attribute.
19887 (<avx512>_vec_dup<mode><mask_name>): Use iptr mode attribute.
19889 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
19891 PR rtl-optimization/84659
19892 * sel-sched-ir.c (sel_init_pipelining): Invoke cleanup_cfg.
19894 2018-04-11 Jakub Jelinek <jakub@redhat.com>
19897 * dwarf2out.c (skip_loc_list_entry): Don't call size_of_locs if
19899 (output_loc_list): Pass address of a dummy size variable even in the
19900 locview handling loop.
19901 (index_location_lists): Add comment on why skip_loc_list_entry can't
19904 2018-04-11 Thomas Preud'homme <thomas.preudhomme@arm.com>
19907 * config/arm/arm-builtins.c (arm_expand_builtin): Force input operand
19910 2018-04-10 Aaron Sawdey <acsawdey@linux.ibm.com>
19913 * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
19914 -mblock-compare-inline-limit, -mblock-compare-inline-loop-limit,
19915 and -mstring-compare-inline-limit.
19917 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
19920 * config/rs6000/rs6000.md (allocate_stack): Put the residual size
19921 for stack clash protection in a register whenever we need it to be in
19924 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
19926 * common/config/rs6000/rs6000-common.c (rs6000_option_init_struct):
19927 Enable -fasynchronous-unwind-tables by default if OBJECT_FORMAT_ELF.
19929 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
19932 * config/rs6000/rs6000.opt (mtraceback=): Show the allowed values in
19934 (mlong-double-): Ditto.
19935 * config/rs6000/sysv4.opt (msdata=): Ditto.
19936 (mtls-size=): Ditto.
19938 2018-04-10 Kelvin Nilsen <kelvin@gcc.gnu.org>
19940 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
19941 erroneous entries for
19942 "vector int vec_ldl (int, long int *)", and
19943 "vector unsigned int vec_ldl (int, unsigned long int *)".
19944 Add comments and entries for
19945 "vector bool char vec_ldl (int, bool char *)",
19946 "vector bool short vec_ldl (int, bool short *)",
19947 "vector bool int vec_ldl (int, bool int *)",
19948 "vector bool long long vec_ldl (int, bool long long *)",
19949 "vector pixel vec_ldl (int, pixel *)",
19950 "vector long long vec_ldl (int, long long *)",
19951 "vector unsigned long long vec_ldl (int, unsigned long long *)".
19952 * config/rs6000/rs6000.c (rs6000_init_builtins): Initialize new
19953 type tree bool_long_long_type_node and correct definition of
19954 bool_V2DI_type_node to make reference to this new type tree.
19955 (rs6000_mangle_type): Replace erroneous reference to
19956 bool_long_type_node with bool_long_long_type_node.
19957 * config/rs6000/rs6000.h (enum rs6000_builtin_type_index): Add
19958 comments to emphasize sign distinctions for char and int types and
19959 replace RS6000_BTI_bool_long constant with
19960 RS6000_BTI_bool_long_long constant. Also add comment to restrict
19961 use of RS6000_BTI_pixel.
19962 (bool_long_type_node): Remove this macro definition.
19963 (bool_long_long_type_node): New macro definition
19965 2018-04-10 Jakub Jelinek <jakub@redhat.com>
19967 PR rtl-optimization/85300
19968 * combine.c (subst): Handle subst of CONST_SCALAR_INT_P new_rtx also
19969 into FLOAT and UNSIGNED_FLOAT like ZERO_EXTEND, return a CLOBBER if
19970 simplify_unary_operation fails.
19972 2018-04-10 Martin Liska <mliska@suse.cz>
19974 * gdbhooks.py: Add pretty-printers for varpool_node, symtab_node,
19975 cgraph_edge and ipa_ref.
19977 2018-04-10 Jakub Jelinek <jakub@redhat.com>
19981 * config/i386/sse.md
19982 (<extract_type>_vinsert<shuffletype><extract_suf>_mask): Fix
19983 computation of the VEC_MERGE selector from mask.
19984 (<extract_type>_vinsert<shuffletype><extract_suf>_1<mask_name>):
19985 Fix decoding of the VEC_MERGE selector into mask.
19987 2018-04-10 Richard Sandiford <richard.sandiford@linaro.org>
19989 PR tree-optimization/85286
19990 * tree-vect-data-refs.c (vect_get_smallest_scalar_type):
19992 2018-04-10 Richard Sandiford <richard.sandiford@linaro.org>
19994 * final.c (final_1): Set insn_last_address as well as
19995 insn_current_address.
19997 2018-04-10 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
20000 * explow.c (emit_stack_probe): Call validize_mem on memory location
20001 before passing it to gen_probe_stack. Create address operand and
20002 legitimize it for the probe_stack_address case.
20004 2018-04-09 Jan Hubicka <jh@suse.cz>
20007 * ipa-devirt.c (rebuild_type_inheritance-hash): New.
20008 * ipa-utils.h (rebuild_type_inheritance-hash): Declare.
20009 * tree.c (free_lang_data_in_type): Fix handling of binfos;
20011 (free_lang_data): Rebuild type inheritance graph.
20013 2018-04-09 Martin Sebor <msebor@redhat.com>
20015 * invoke.texi (-finline-small-functions): Mention other optimization
20017 (-findirect-inlining, -fpartial-inlining): Same.
20018 (-finline-functions-called-once): Same.
20019 (-freorder-blocks-and-partition): Same.
20021 2018-04-09 Jan Hubicka <jh@suse.cz>
20024 * cfgcleanup.c (try_forward_edges): Do not give up on crossing
20025 jumps; choose last target that matches the criteria (i.e.
20026 no partition changes for non-crossing jumps).
20027 * cfgrtl.c (cfg_layout_redirect_edge_and_branch): Add basic
20028 support for redirecting crossing jumps to non-crossing.
20030 2018-04-09 Alexey Brodkin <abrodkin@synopsys.com>
20032 * config/arc/arc.c (arc_expand_prologue): Set stack usage info
20033 also for naked functions.
20035 2018-04-09 Claudiu Zissulescu <claziss@synopsys.com>
20037 * config/arc/arc.md (add_shift): New pattern.
20038 (add_shift2): Likewise.
20039 (sub_shift): Likewise.
20040 (sub_shift_cmp0_noout): Likewise.
20041 (compare_si_ashiftsi): Likewise.
20042 (xbfu_cmp0_noout): New combine pattern.
20043 (xbfu_cmp0"): Likewise.
20044 (movsi_set_cc_insn): Place the predicable variant first.
20045 (commutative_binary_cmp0_noout): Remove clobber.
20046 (commutative_binary_cmp0): New pattern.
20047 (noncommutative_binary_cmp0): Likewise.
20048 (noncommutative_binary_cmp0_noout): Likewise.
20049 (noncommutative_binary_comparison_result_used): Removed.
20050 (rsub_cmp0): New pattern.
20051 (rsub_cmp0_noout): Likewise.
20052 (extzvsi): Changed, keep only meaningful variants.
20053 (SQH, SEZ): New iterators.
20054 (SQH_postfix): New mode attribute.
20055 (SEZ_prefix): New code attribute.
20056 (<SEZ_prefix>xt<SQH_postfix>_cmp0_noout): New instruction pattern.
20057 (<SEZ_prefix>xt<SQH_postfix>_cmp0): Likewise.
20058 * config/arc/predicates.md (cc_set_register): Use CC_REG instead
20059 of numerical value.
20060 (noncommutative_operator): Check the availability of barrel
20063 2018-04-09 Richard Biener <rguenther@suse.de>
20065 PR tree-optimization/85284
20066 * tree-ssa-loop-niter.c (number_of_iterations_exit_assumptions):
20067 Only use the niter constraining form of simple_iv when the exit
20068 is always executed.
20070 2018-04-09 Tom de Vries <tom@codesourcery.com>
20073 * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
20074 (define_expand "*memory_barrier"): New define_expand.
20075 (define_insn "memory_barrier"): New insn.
20077 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
20079 PR rtl-optimization/80463
20080 PR rtl-optimization/83972
20081 PR rtl-optimization/83480
20083 * sel-sched-ir.c (has_dependence_note_mem_dep): Take into account the
20084 correct producer for the insn.
20085 (tidy_control_flow): Fixup seqnos in case of debug insns.
20087 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
20089 PR rtl-optimization/83913
20091 * sel-sched-ir.c (merge_expr_data): Choose the middle between two
20092 different sched-times when merging exprs.
20094 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
20096 PR rtl-optimization/83962
20098 * sel-sched-ir.c (tidy_control_flow): Correct the order in which we call
20099 tidy_fallthru_edge and tidy_control_flow.
20101 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
20103 PR rtl-optimization/83530
20105 * sel-sched.c (force_next_insn): New global variable.
20106 (remove_insn_for_debug): When force_next_insn is true, also leave only
20107 next insn in the ready list.
20108 (sel_sched_region): When the region wasn't scheduled, make another pass
20109 over it with force_next_insn set to 1.
20111 2018-04-08 Monk Chiang <sh.chiang04@gmail.com>
20113 * config.gcc (nds32le-*-*, nds32be-*-*): Add nds32/nds32_intrinsic.h
20115 * config/nds32/constants.md (unspec_volatile_element): Add enum values
20116 for interrupt control.
20117 * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
20118 functions for interrupt control.
20119 * config/nds32/nds32-intrinsic.md: Likewise.
20120 * config/nds32/nds32_intrinsic.h: Likewise.
20121 * config/nds32/nds32.h (nds32_builtins): Likewise.
20123 2018-04-08 Chung-Ju Wu <jasonwucj@gmail.com>
20125 * config/nds32/nds32.c (nds32_init_machine_status,
20126 nds32_legitimate_index_p, nds32_legitimate_address_p): Consider
20127 strict_aligned_p field.
20128 (nds32_expand_to_rtl_hook): New function.
20129 (TARGET_EXPAND_TO_RTL_HOOK): Define.
20130 * config/nds32/nds32.h (machine_function): Add strict_aligned_p field.
20132 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
20133 Chung-Ju Wu <jasonwucj@gmail.com>
20135 * config.gcc (nds32*-*-*): Check that n7 is valid to --with-cpu.
20136 * config/nds32/nds32-n7.md: New file.
20137 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N7.
20138 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n7
20140 * config/nds32/nds32-protos.h: More declarations for n7 pipeline.
20141 * config/nds32/nds32.md (pipeline_model): Add n7.
20142 * config/nds32/nds32.opt (mcpu): Support n7 pipeline cpus.
20143 * config/nds32/pipelines.md: Include n7 settings.
20145 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
20146 Chung-Ju Wu <jasonwucj@gmail.com>
20148 * config.gcc (nds32*-*-*): Check that e8 is valid to --with-cpu.
20149 * config/nds32/nds32-e8.md: New file.
20150 * config/nds32/nds32-opts.h (nds32-cpu_type): Add CPU_E8.
20151 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for e8
20153 * config/nds32/nds32-protos.h: More declarations for e8 pipeline.
20154 * config/nds32/nds32.md (pipeline_model): Add e8.
20155 * config/nds32/nds32.opt (mcpu): Support e8 pipeline cpus.
20156 * config/nds32/pipelines.md: Include e8 settings.
20158 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
20159 Chung-Ju Wu <jasonwucj@gmail.com>
20161 * config.gcc (nds32*-*-*): Check that n6/n8/s8 are valid to --with-cpu.
20162 * config/nds32/nds32-n8.md: New file.
20163 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N6 and CPU_N8.
20164 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n8
20166 * config/nds32/nds32-protos.h: More declarations for n8 pipeline.
20167 * config/nds32/nds32-utils.c: More implementations for n8 pipeline.
20168 * config/nds32/nds32.md (pipeline_model): Add n8.
20169 * config/nds32/nds32.opt (mcpu): Support n8 pipeline cpus.
20170 * config/nds32/pipelines.md: Include n8 settings.
20172 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
20173 Chung-Ju Wu <jasonwucj@gmail.com>
20175 * config.gcc (nds32*): Add nds32-utils.o into extra_objs.
20176 * config/nds32/nds32-n9-2r1w.md: New file.
20177 * config/nds32/nds32-n9-3r2w.md: New file.
20178 * config/nds32/nds32-opts.h (nds32_cpu_type, nds32_mul_type,
20179 nds32_register_ports): New or modify for cpu n9.
20180 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n9
20182 * config/nds32/nds32-protos.h: More declarations for n9 pipeline.
20183 * config/nds32/nds32-utils.c: New file.
20184 * config/nds32/nds32.h (TARGET_PIPELINE_N9, TARGET_PIPELINE_SIMPLE,
20185 TARGET_MUL_SLOW): Define.
20186 * config/nds32/nds32.md (pipeline_model): New attribute.
20187 * config/nds32/nds32.opt (mcpu, mconfig-mul, mconfig-register-ports):
20188 New options that support cpu n9.
20189 * config/nds32/pipelines.md: Include n9 settings.
20190 * config/nds32/t-nds32 (nds32-utils.o): Add dependency.
20192 2018-04-08 Chung-Ju Wu <jasonwucj@gmail.com>
20194 * config/nds32/nds32-md-auxiliary.c (output_cond_branch): Output align
20195 information if necessary.
20196 (output_cond_branch_compare_zero): Likewise.
20197 * config/nds32/nds32.c (nds32_adjust_insn_length): Consider align case.
20198 (nds32_target_alignment): Refine for alignment.
20199 * config/nds32/nds32.h (NDS32_ALIGN_P): Define.
20200 (FUNCTION_BOUNDARY): Modify.
20201 * config/nds32/nds32.md (call_internal, call_value_internal): Consider
20203 * config/nds32/nds32.opt (malways-align, malign-functions): New.
20205 2018-04-08 Monk Chiang <sh.chiang04@gmail.com>
20207 * config/nds32/constants.md (unspec_volatile_element): Add values for
20208 TLB operation and data prefetch.
20209 * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
20210 functions for TLB operation and data prefetch.
20211 * config/nds32/nds32-intrinsic.md: Likewise.
20212 * config/nds32/nds32_intrinsic.h: Likewise.
20213 * config/nds32/nds32.c (nds32_dpref_names): Likewise.
20214 (nds32_print_operand): Likewise.
20215 * config/nds32/nds32.h (nds32_builtins): Likewise.
20217 2018-04-07 Thomas Koenig <tkoenig@gcc.gnu.org>
20218 Andrew Pinski <pinsika@gcc.gnu.org>
20220 PR middle-end/82976
20221 * match.pd: Use constant_boolean_node of correct type instead of
20222 boolean_true_node or boolean_false_node for simplifying
20223 pointer comparisons to zero.
20225 2018-04-07 Jakub Jelinek <jakub@redhat.com>
20227 PR tree-optimization/80021
20228 * tree.c (verify_type_variant): Make error call in verify_variant_match
20229 translatable and remove final full stop.
20231 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
20233 * config/nds32/constants.md (unspec_volatile_element): Add
20234 UNSPEC_VOLATILE_EH_RETURN.
20235 * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push,
20236 nds32_output_stack_pop): Support dwarf exception handling process.
20237 * config/nds32/nds32-protos.h (nds32_dynamic_chain_address): Declare.
20238 * config/nds32/nds32.c (nds32_init_machine_status): Support dwarf
20239 exception handling process.
20240 (nds32_compute_stack_frame): Likewise.
20241 (nds32_return_addr_rtx): Likewise.
20242 (nds32_initial_elimination_offset): Likewise.
20243 (nds32_expand_prologue): Likewise.
20244 (nds32_expand_epilogue): Likewise.
20245 (nds32_dynamic_chain_address): New function.
20246 * config/nds32/nds32.h (machine_function): Add fields for dwarf
20247 exception handling.
20248 (DYNAMIC_CHAIN_ADDRESS): Define.
20249 (EH_RETURN_DATA_REGNO): Define.
20250 (EH_RETURN_STACKADJ_RTX): Define.
20251 * config/nds32/nds32.md (eh_return, nds32_eh_return): Implement
20252 patterns for dwarf exception handling.
20254 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
20256 * config/nds32/nds32.h: Clean up obsolete macros.
20258 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
20260 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
20261 Add enum values for particular instructions.
20262 * config/nds32/nds32-intrinsic.c: Implementation of expanding
20263 particular intrinsic functions.
20264 * config/nds32/nds32-intrinsic.md: Likewise.
20265 * config/nds32/nds32_intrinsic.h: Likewise.
20266 * config/nds32/nds32.h (nds32_builtins): Likewise.
20267 * config/nds32/nds32.md (type): Add pbsad and pbsada.
20268 (btst, ave): New patterns for particular instructions.
20270 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
20272 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
20273 Add enum values for atomic load/store and memory sync.
20274 * config/nds32/nds32-intrinsic.c: Implementation for atomic load/store
20276 * config/nds32/nds32-intrinsic.md: Likewise.
20277 * config/nds32/nds32_intrinsic.h: Likewise.
20278 * config/nds32/nds32.h (nds32_builtins): Likewise.
20280 2018-04-07 Jakub Jelinek <jakub@redhat.com>
20282 PR tree-optimization/85257
20283 * fold-const.c (native_encode_vector): If not all elts could fit
20284 and off is -1, return 0 rather than offset.
20285 * tree-ssa-sccvn.c (vn_reference_lookup_3): Pass
20286 (offseti - offset2) / BITS_PER_UNIT as 4th argument to
20287 native_encode_expr. Verify len * BITS_PER_UNIT >= maxsizei. Don't
20288 adjust buffer in native_interpret_expr call.
20290 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
20292 * config/nds32/constants.md (unspec_volatile_element): Add cache
20293 control enum values.
20294 * config/nds32/nds32-intrinsic.c: Add cache control expand functions.
20295 * config/nds32/nds32-intrinsic.md: Add cache control patterns.
20296 * config/nds32/nds32.c (nds32_cctl_names): New.
20297 (nds32_print_operand): Handle cache control register names.
20298 * config/nds32/nds32.h (nds32_builtins): New enum values.
20299 * config/nds32/nds32_intrinsic.h: Add cache control enum types and
20301 * config/nds32/nds32.md (type): Add mmu.
20302 * config/nds32/pipelines.md (simple_insn): Add mmu.
20304 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
20306 * config/nds32/nds32.md (type): Remove call.
20307 * config/nds32/pipelines.md (simple_insn): Likewise.
20309 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
20311 * config/nds32/constants.md (unspec_volatile_element): Add
20312 UNSPEC_VOLATILE_FMFCSR, UNSPEC_VOLATILE_FMTCSR and
20313 UNSPEC_VOLATILE_FMFCFG.
20314 * config/nds32/nds32-intrinsic.c (bdesc_noarg): New builtin
20315 description for fmfcfg and fmfcsr.
20316 (bdesc_1arg): Add fmtcsr.
20317 (bdesc_2arg): Add fcpynss, fcpyss, fcpynsd and fcpysd.
20318 (nds32_expand_builtin_impl): Deal with FPU intrinsic functions.
20319 * config/nds32/nds32-intrinsic.md (unspec_fcpynsd, unspec_fcpysd,
20320 unspec_fcpynss, unspec_fcpysd, unspec_fcpyss, unspec_fmfcsr,
20321 unspec_fmfcfg): New patterns.
20322 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FMFCFG,
20323 NDS32_BUILTIN_FMFCSR, NDS32_BUILTIN_FMTCSR, NDS32_BUILTIN_FCPYNSS,
20324 NDS32_BUILTIN_FCPYSS,NDS32_BUILTIN_FCPYNSD and NDS32_BUILTIN_FCPYSD.
20325 * config/nds32/nds32_intrinsic.h (__nds32__fcpynsd, __nds32__fcpynss,
20326 __nds32__fcpysd, __nds32__fcpyss, __nds32__fmfcsr, __nds32__fmtcsr,
20327 __nds32__fmfcfg): Define.
20329 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
20331 * config/nds32/nds32.c (nds32_intrinsic_register_names): Add more
20332 intrinsic register names.
20333 * config/nds32/nds32_intrinsic.h (nds32_intrinsic_registers): Add more
20334 intrinsic register enum values and macros.
20336 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
20338 * config/nds32/nds32.c (nds32_legitimate_index_p): Modify condition
20339 for load/store addressing form.
20340 (nds32_print_operand_address): Likewise.
20342 2018-04-06 Eric Botcazou <ebotcazou@adacore.com>
20345 * config/sparc/sparc.c (sparc_expand_move): Deal with symbolic operands
20346 based on LABEL_REF. Remove useless assertion.
20347 (pic_address_needs_scratch): Fix formatting.
20348 (sparc_legitimize_pic_address): Minor tweaks.
20349 (sparc_delegitimize_address): Adjust assertion accordingly.
20350 * config/sparc/sparc.md (movsi_pic_label_ref): Change label_ref_operand
20351 into symbolic_operand.
20352 (movsi_high_pic_label_ref): Likewise.
20353 (movsi_lo_sum_pic_label_ref): Likewise.
20354 (movdi_pic_label_ref): Likewise.
20355 (movdi_high_pic_label_ref): Likewise.
20356 (movdi_lo_sum_pic_label_ref): Likewise.
20358 2018-04-06 Amaan Cheval <amaan.cheval@gmail.com>
20360 * config.gcc (x86_64-*-rtems*): Add rtems.h to tm_file for
20361 custom LIB_SPEC setup.
20363 2018-04-06 Ruslan Bukin <br@bsdpad.com>
20364 Kito Cheng <kito.cheng@gmail.com>
20366 * config.gcc (riscv*-*-freebsd*): Add RISC-V FreeBSD support.
20367 * config/riscv/freebsd.h: New.
20369 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
20371 * config/nds32/nds32.c (nds32_adjust_insn_length): Refine.
20372 * config/nds32/nds32.h (ADJUST_INSN_LENGTH): Change the location in
20375 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
20376 Kito Cheng <kito.cheng@gmail.com>
20378 * config/nds32/nds32-md-auxiliary.c (nds32_output_return,
20379 nds32_output_call, nds32_symbol_binds_local_p): New functions.
20380 * config/nds32/nds32-protos.h (nds32_output_call,
20381 nds32_output_return): Declare.
20382 * config/nds32/nds32.md: Refine all the call and return patterns.
20384 2018-04-06 Jakub Jelinek <jakub@redhat.com>
20387 * dwarf2out.c (rtl_for_decl_init): For STRING_CST initializer only
20388 build CONST_STRING if TYPE_MAX_VALUE is non-NULL and is INTEGER_CST.
20390 PR rtl-optimization/84872
20391 * cfgloopmanip.c (create_preheader): Use make_forwarder_block even if
20392 nentry == 1 when CP_FALLTHRU_PREHEADERS and single_entry is
20393 EDGE_CROSSING edge.
20395 2018-04-06 Tamar Christina <tamar.christina@arm.com>
20397 * expr.c (copy_blkmode_to_reg): Revert 254862.
20398 * doc/sourcebuild.texi (word_mode_no_slow_unalign): Likewise.
20400 2018-04-06 Richard Biener <rguenther@suse.de>
20402 PR middle-end/85244
20403 * tree-dfa.c (get_ref_base_and_extent): Reset seen_variable_array_ref
20404 after seeing a component reference with an adjacent field. Treat
20405 refs to arrays at struct end of external decls similar to
20406 refs to unconstrained commons.
20408 2018-04-06 Jakub Jelinek <jakub@redhat.com>
20411 * fold-const.c (twoval_comparison_p): Remove SAVE_P argument and don't
20412 look through SAVE_EXPRs with non-side-effects argument. Adjust
20414 (fold_comparison): Adjust twoval_comparison_p caller, don't handle
20417 2018-04-06 Richard Biener <rguenther@suse.de>
20419 PR middle-end/85180
20420 * alias.c (find_base_term): New wrapper around find_base_term
20421 unwinding CSELIB_VAL_PTR changes.
20422 (find_base_term): Do not restore CSELIB_VAL_PTR during the
20425 2018-04-06 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
20427 * config/s390/s390.c (s390_z10_optimize_cmp): Expand dedicated NOP
20429 * config/s390/s390.md (UNSPECV_NOP_LR_0, UNSPECV_NOP_LR_1): New
20430 constant definitions.
20431 ("nop"): lr 0,0 -> nopr r0
20432 ("nop_lr0", "nop_lr1"): New insn definitions.
20434 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
20436 * config/nds32/nds32.md (*stack_push, *stack_pop): Use
20437 NDS32_V3PUSH_AVAILABLE_P macro.
20439 2018-04-06 Monk Chiang <sh.chiang04@gmail.com>
20440 Chung-Ju Wu <jasonwucj@gmail.com>
20442 * config.gcc (nds32*-*-*): Add v2j v3f v3s checking.
20443 (nds32*-*-*): Add float and fpu_config into supported_defaults.
20444 * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS):
20445 Include TARGET_DEFAULT_FPU_ISA and TARGET_DEFAULT_FPU_FMA.
20446 * config/nds32/constants.md (unspec_element): Add UNSPEC_COPYSIGN,
20447 UNSPEC_FCPYNSD, UNSPEC_FCPYNSS, UNSPEC_FCPYSD and UNSPEC_FCPYSS.
20448 * config/nds32/constraints.md: New constraints and checking for hard
20449 float configuration.
20450 * config/nds32/iterators.md: New mode iterator and attribute for hard
20451 float configuration.
20452 * config/nds32/nds32-doubleword.md: Use hard float alternatives and
20454 * config/nds32/nds32-fpu.md: New file.
20455 * config/nds32/nds32-md-auxiliary.c: New functions and checkings to
20456 deal with hard float code generation.
20457 * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3F and
20459 (abi_type, float_reg_number): New enum type.
20460 * config/nds32/nds32-predicates.c: New predicates for hard float.
20461 * config/nds32/nds32-protos.h: Declare functions for hard float.
20462 * config/nds32/nds32.c: Implementation for hard float configuration.
20463 * config/nds32/nds32.h: Definitions for hard float configuration.
20464 * config/nds32/nds32.md: Include hard float machine description and
20465 modify patterns for hard float configuration.
20466 * config/nds32/nds32.opt: New options for hard float configuration.
20467 * config/nds32/predicates.md: New predicates for hard float
20470 2018-04-06 Kuan-Lin Chen <kuanlinchentw@gmail.com>
20472 * common/config/nds32/nds32-common.c
20473 (nds32_option_optimization_table): Enable -mreleax-hint by default.
20475 2018-04-05 Jakub Jelinek <jakub@redhat.com>
20477 PR middle-end/85195
20478 * match.pd (BIT_FIELD_REF CONSTRUCTOR@0 @1 @2): Use view_convert around
20479 CONSTRUCTOR_ELT (ctor, ...)->value.
20481 2018-04-05 Uros Bizjak <ubizjak@gmail.com>
20484 * config/i386/i386.md (define_attr "memory"): Handle rotate1 type.
20486 2018-04-05 Tom de Vries <tom@codesourcery.com>
20489 * config/nvptx/nvptx.c (nvptx_single): Fix neutering of bb with only
20492 2018-04-05 Shiva Chen <shiva0217@gmail.com>
20493 Kito Cheng <kito.cheng@gmail.com>
20495 * config/nds32/constraints.md (U33): Fine-tune checking condition.
20496 * config/nds32/nds32-md-auxiliary.c (nds32_mem_format): Ditto.
20497 * config/nds32/nds32.h (nds32_16bit_address_type): Add
20498 ADDRESS_POST_MODIFY_LO_REG_IMM3U.
20500 2018-04-05 Shiva Chen <shiva0217@gmail.com>
20501 Kito Cheng <kito.cheng@gmail.com>
20503 * config/nds32/constraints.md (Ufe): New memory constraint.
20504 * config/nds32/nds32-md-auxiliary.c (nds32_mem_format,
20505 nds32_output_16bit_load): Consider r8 register for lwi45.fe format.
20506 * config/nds32/nds32.c (nds32_print_operand): Output lwi45.fe
20508 * config/nds32/nds32.h (nds32_16bit_address_type): Add ADDRESS_R8_IMM7U.
20509 * config/nds32/nds32.md (*mov<mode>): Adjust pattern.
20511 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
20513 * config/nds32/nds32.md: Use optimize_size in the condition for
20514 alu-shift instructions.
20516 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
20518 * config/nds32/nds32.md (divsi4, udivsi4): New patterns.
20520 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
20522 * config/nds32/nds32.md (negsi2): Refine pattern.
20524 2018-04-05 Kito Cheng <kito.cheng@gmail.com>
20525 Chung-Ju Wu <jasonwucj@gmail.com>
20527 * config/nds32/iterators.md (shift_rotate): New code iterator.
20528 (shift): New code attribute.
20529 * config/nds32/nds32-md-auxiliary.c (nds32_expand_constant): New.
20530 * config/nds32/nds32-protos.h (nds32_expand_constant): Declare.
20531 * config/nds32/nds32.c (nds32_print_operand): Deal with more cases.
20532 * config/nds32/nds32.md (addsi3, *add_srli): Refine implementation for
20533 bit-wise operations.
20534 (andsi3, *andsi3): Ditto.
20535 (iorsi3, *iorsi3, *or_slli, *or_srli): Ditto.
20536 (xorsi3, *xorsi3, *xor_slli, *xor_srli): Ditto.
20537 (<shift>si3, *ashlsi3, *ashrsi3, *lshrsi3, *rotrsi3): Ditto.
20538 * config/nds32/predicates.md (nds32_rimm5u_operand, nds32_and_operand,
20539 nds32_ior_operand, nds32_xor_operand): New predicates.
20541 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
20543 * config/nds32/nds32.md (add<mode>3, sub<mode>3): Rename to ...
20544 (addsi3, subsi3): ... this.
20546 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
20548 * config/nds32/nds32.md (*sub_srli, *and_slli): Fine-tune predicator.
20550 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
20552 * config/nds32/nds32.md: Adjust indention.
20554 2018-04-05 Kito Cheng <kito.cheng@gmail.com>
20556 * config/nds32/nds32.md (feature): New attribute.
20558 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
20560 * config/nds32/nds32.md (subtype): New attribute.
20562 2018-04-04 Thomas Preud'homme <thomas.preudhomme@arm.com>
20565 * config/arm/arm-builtins.c (arm_expand_builtin): Change
20566 expansion to perform a bitwise AND of the argument followed by a
20567 boolean negation of the result.
20569 2018-04-04 Peter Bergner <bergner@vnet.ibm.com>
20571 PR rtl-optimization/84878
20572 * ddg.c (add_cross_iteration_register_deps): Use DF_REF_BB to determine
20573 the basic block. Assert the use reference is not artificial and that
20574 it has an associated insn.
20576 2018-04-04 Michael Matz <matz@suse.de>
20578 * builtins.c (compute_objsize): Pass correct operand
20579 to array_at_struct_end_p.
20581 2018-04-04 Richard Biener <rguenther@suse.de>
20584 * dwarf2out.c (dwarf2out_register_external_die): Peel namespaces
20585 from contexts for DINFO_LEVEL_TERSE and below.
20587 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
20589 * config/nds32/nds32-doubleword.md (move_<mode>): Require
20590 resiter_operand condition.
20591 * config/nds32/nds32.md (*move<mode>): Ditto.
20593 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
20594 Monk Chiang <sh.chiang04@gmail.com>
20596 * config/nds32/nds32.md (movmisalign<mode>): New pattern.
20598 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
20600 * config/nds32/nds32.md (movqi, movhi): Merge into mov<mode>.
20602 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
20603 Kito Cheng <kito.cheng@gmail.com>
20605 * config/nds32/nds32-md-auxiliary.c (nds32_inverse_cond_code,
20606 nds32_cond_code_str, output_cond_branch,
20607 output_cond_branch_compare_zero, nds32_expand_cbranch,
20608 nds32_expand_cstore, nds32_expand_movcc,
20609 nds32_output_cbranchsi4_equality_zero,
20610 nds32_output_cbranchsi4_equality_reg,
20611 nds32_output_cbranchsi4_equality_reg_or_const_int,
20612 nds32_output_cbranchsi4_greater_less_zero: New functions.
20613 * config/nds32/nds32-protos.h (nds32_expand_cbranch,
20614 nds32_expand_cstore, nds32_expand_movcc,
20615 nds32_output_cbranchsi4_equality_zero,
20616 nds32_output_cbranchsi4_equality_reg,
20617 nds32_output_cbranchsi4_equality_reg_or_const_int,
20618 nds32_output_cbranchsi4_greater_less_zero): Declare.
20619 * config/nds32/predicates.md (nds32_movecc_comparison_operator,
20620 nds32_rimm11s_operand): New predicates.
20621 * config/nds32/nds32.h (nds32_expand_result_type): New enum type.
20622 * config/nds32/nds32.md: Rewrite all the branch and conditional move
20625 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
20627 * config/nds32/nds32-doubleword.md: Refine all the instruction type.
20628 * config/nds32/nds32.md: Ditto.
20629 * config/nds32/pipelines.md: Ditto.
20631 2018-04-04 Richard Biener <rguenther@suse.de>
20633 PR tree-optimization/85168
20634 * tree-ssa-sccvn.c (vn_reference_maybe_forwprop_address): Avoid
20635 propagating abnormals.
20637 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
20639 * config/nds32/nds32.md (enabled): Use yes/no for this attribute.
20641 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
20642 Kito Cheng <kito.cheng@gmail.com>
20644 * config/nds32/nds32-md-auxiliary.c (nds32_long_call_p): New function.
20645 * config/nds32/nds32-protos.h (nds32_long_call_p): Declare.
20646 * config/nds32/nds32.c (nds32_function_ok_for_sibcall): New function.
20647 (TARGET_FUNCTION_OK_FOR_SIBCALL): Define.
20648 * config/nds32/nds32.md (sibcall_internal): New.
20649 (sibcall_register): Remove.
20650 (sibcall_immediate): Remove.
20651 (sibcall_value_internal): New.
20652 (sibcall_value_register): Remove.
20653 (sibcall_value_immediate): Remove.
20654 * config/nds32/predicates.md (nds32_general_register_operand): New.
20655 (nds32_call_address_operand): New.
20657 2018-04-03 Jakub Jelinek <jakub@redhat.com>
20659 PR rtl-optimization/85167
20660 * shrink-wrap.c (move_insn_for_shrink_wrap): Don't set bb_uses and
20661 bb_defs if *split_p, instead preinitialize it to NULL.
20663 PR tree-optimization/85156
20664 * builtins.c (fold_builtin_expect): Use save_expr on arg1 to avoid
20665 evaluating the argument multiple times.
20667 2018-04-03 Bill Schmidt <wschmidt@linux.ibm.com>
20669 * config/rs6000/emmintrin.h (_mm_cvtpd_epi32): Use __vector rather
20671 (_mm_cvtpd_ps): Likewise.
20672 (_mm_cvttpd_epi32): Likewise.
20673 * config/rs6000/mmintrin.h (_mm_unpacklo_pi8): Likewise.
20674 * config/rs6000/xmmintrin.h: For strict-ANSI C++ or C11, undefine
20675 vector, pixel, and bool following altivec.h include.
20677 2018-04-03 Martin Sebor <msebor@redhat.com>
20679 * doc/extend.texi (Common Function Attributes): Clarify.
20680 (const attribute): Likewise.
20681 (pure attribute): Likewise.
20683 2018-04-03 Jakub Jelinek <jakub@redhat.com>
20686 * config/i386/i386.c (ix86_expand_vector_set): Use
20687 HOST_WIDE_INT_1U << elt instead of 1 << elt. Formatting fix.
20689 2018-04-03 Uros Bizjak <ubizjak@gmail.com>
20691 * config/i386/i386.c (emit_i387_cw_initialization): Always use logic
20692 instructions when changing rounding bits to preserve precision bits
20693 in the x87 control word.
20695 2018-04-03 Martin Liska <mliska@suse.cz>
20697 PR tree-optimization/82491
20698 * rtl.h (strip_offset_and_add): Replace += suboffset with
20699 poly_uint64 () + suboffset.
20701 2018-03-29 Martin Liska <mliska@suse.cz>
20702 Martin Jambor <mjambor@suse.cz>
20705 * ipa-cp.c (propagate_bits_across_jump_function): Bail out if
20706 param_type is not an integral or pointer type.
20708 2018-04-03 Richard Biener <rguenther@suse.de>
20710 * sese.h (recompute_all_dominators): Remove.
20712 2018-04-02 Martin Sebor <msebor@redhat.com>
20714 * doc/invoke.texi (-Wrestrict): Fix typos.
20716 2018-04-02 Jim Wilson <jimw@sifive.com>
20718 * config/riscv/riscv.h (SHIFT_COUNT_TRUNCATED): Set to zero.
20719 * config/riscv/riscv.md (<optab>si3): Use QImode shift count.
20720 (<optab>di3, <optab>si3_extend): Likewise.
20721 (<optab>si3_mask, <optab>si3_mask_1): New.
20722 (<optab>di3_mask, <optab>di3_mask_1): New.
20723 (<optab>si3_extend_mask, <optab>si3_extend_mask_1): New.
20724 (lshrsi3_zero_extend_1): Use VOIDmode shift count.
20725 * config/riscv/sync.md (atomic_test_and_set): Emit QImode shift count.
20727 2018-04-02 Gerald Pfeifer <gerald@pfeifer.com>
20729 * doc/cpp.texi (Variadic Macros): Fix line continuation in an
20732 2018-04-02 Chung-Ju Wu <jasonwucj@gmail.com>
20734 * config/nds32/nds32.c (TARGET_CANONICALIZE_COMPARISON): Define.
20735 (nds32_canonicalize_comparison): New function.
20737 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
20738 Kito Cheng <kito.cheng@gmail.com>
20739 Kuan-Lin Chen <kuanlinchentw@gmail.com>
20741 * config.gcc (nds32): Add nds32-relax-opt.o into extra_objs.
20742 * config/nds32/constants.md (unspec_volatile_element): Add
20743 UNSPEC_VOLATILE_RELAX_GROUP.
20744 * config/nds32/nds32-relax-opt.c: New file.
20745 * config/nds32/nds32-predicates.c
20746 (nds32_symbol_load_store_p): New function.
20747 * config/nds32/nds32-protos.h
20748 (nds32_symbol_load_store_p): Declare function.
20749 (make_pass_nds32_relax_opt): Declare new rtl pass function.
20750 * config/nds32/nds32.c
20751 (nds32_register_pass): New function to register pass.
20752 (nds32_register_passes): New function to register passes.
20753 * config/nds32/nds32.md (relax_group): New pattern.
20754 * config/nds32/nds32.opt (mrelax-hint): New option.
20755 * config/nds32/t-nds32 (nds32-relax-opt.o): New dependency.
20757 2018-04-01 Kito Cheng <kito.cheng@gmail.com>
20759 * config/nds32/t-nds32: Modify files dependency.
20761 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
20763 * config/nds32/nds32.h (FUNCTION_PROFILER): Output newline character.
20764 (PROFILE_HOOK): Define its implementation.
20766 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
20768 * config/nds32/nds32.h (WCHAR_TYPE, WCHAR_TYPE_SIZE): Use unsigned int
20769 type and 32-bit size.
20771 2018-04-01 Jakub Jelinek <jakub@redhat.com>
20773 PR middle-end/85090
20774 * config/i386/sse.md (V): Add V64QI and V32HI for TARGET_AVX512F.
20775 (V_128_256): New mode iterator.
20776 (*avx512dq_vextract<shuffletype>64x2_1 splitter): New define_split.
20777 (*avx512f_vextract<shuffletype>32x4_1 splitter): Likewise.
20778 (xop_pcmov_<mode><avxsizesuffix>): Use V_128_256 mode iterator instead
20780 * config/i386/i386.c (ix86_expand_vector_set): Improve V32HImode and
20781 V64QImode expansion for !TARGET_AVX512BW && TARGET_AVX512F.
20783 2018-03-31 Segher Boessenkool <segher@kernel.crashing.org>
20786 * config/rs6000/xmmintrin.h (_mm_set_ps, _mm_max_ps): Handle (quiet)
20787 NaN inputs correctly.
20789 2018-03-30 Peter Bergner <bergner@vnet.ibm.com>
20792 * config/rs6000/vsx.md (??r): New mode attribute.
20793 (*vsx_mov<mode>_64bit): Use it.
20794 (*vsx_mov<mode>_32bit): Likewise.
20796 2018-03-30 Martin Sebor <msebor@redhat.com>
20798 PR tree-optimization/84818
20799 * builtins.c (check_access): Use warning_n.
20801 2018-03-30 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
20804 * config/rs6000/rs6000-string.c (expand_compare_loop): Fix redundant
20806 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Fix redundant
20809 2018-03-30 Julia Koval <julia.koval@intel.com>
20812 * x86-tune.def (movx, partial_reg_dependency): Enable for
20815 2018-03-29 Vladimir Makarov <vmakarov@redhat.com>
20817 PR inline-asm/84985
20818 * lra-constraints.c (process_alt_operands): Move setting
20819 this_alternative_matches below.
20821 2018-03-29 Martin Liska <mliska@suse.cz>
20824 * doc/invoke.texi: Document how LTO works with debug info.
20825 Describe auto-load support of binutils. Mention 'x86-64'
20826 as valid option value of -march option.
20828 2018-03-29 Jakub Jelinek <jakub@redhat.com>
20830 * config/i386/sse.md (<avx512>_blendm<mode>): Use <sseintprefix>.
20833 * fold-const.c (operand_equal_p): Handle DEBUG_BEGIN_STMT.
20834 For STATEMENT_LIST, pass down OEP_LEXICOGRAPHIC and maybe
20835 OEP_NO_HASH_CHECK for recursive call, to avoid exponential
20838 2018-03-28 Peter Bergner <bergner@vnet.ibm.com>
20841 * config/rs6000/rs6000.h (RS6000_BTM_POWERPC64): New define.
20842 (RS6000_BTM_COMMON): Add RS6000_BTM_POWERPC64.
20843 * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Add support
20844 for RS6000_BTM_POWERPC64.
20845 (rs6000_invalid_builtin): Add handling for RS6000_BTM_POWERPC64
20846 (rs6000_builtin_mask_names): Add RS6000_BTM_POWERPC64.
20847 * config/rs6000/rs6000-builtin.def (BU_P7_POWERPC64_MISC_2): New macro
20850 (DIVDEU): Likewise.
20852 2018-03-28 Carl Love <cel@us.ibm.com>
20855 2017-09-27 Carl Love <cel@us.ibm.com>
20857 * config/rs6000/rs6000-builtin.def (BU_FP_1MISC_1): Add define macro.
20858 (FCTID, FCTIW): Add BU_FP_MISC_1 macro expansion for builtins.
20859 * config/rs6000/rs6000.md (lrintsfsi2): Add define_insn for the
20862 2018-03-28 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
20864 * config/rs6000/xmmintrin.h (_mm_max_pi16): Use __vector __bool
20865 instead of __vector bool.
20866 (_mm_max_pu8): Likewise.
20867 (_mm_min_pi16): Likewise.
20869 2018-03-28 Peter Bergner <bergner@vnet.ibm.com>
20872 * config/rs6000/rs6000-builtin.def (DIVWEO): Delete macro expansion.
20873 (DIVWEUO): Likewise.
20874 (DIVDEO): Likewise.
20875 (DIVDEUO): Likewise.
20876 * config/rs6000/rs6000.c (builtin_function_type): Remove support for
20877 DIVWEUO and DIVDEUO.
20878 * config/rs6000/rs6000.md (UNSPEC_DIVEO, UNSPEC_DIVEUO): Delete unspecs.
20879 (UNSPEC_DIV_EXTEND): Remove deleted unspecs.
20880 (div_extend): Likewise.
20881 * doc/extend.texi (__builtin_divweo): Remove documentation for deleted
20883 (__builtin_divweuo): Likewise.
20884 (__builtin_divdeo): Likewise.
20885 (__builtin_divdeuo): Likewise.
20887 2018-03-28 Jakub Jelinek <jakub@redhat.com>
20890 * config/i386/i386.md (*add<mode>3_carry_0, *addsi3_carry_zext_0,
20891 *sub<mode>3_carry_0, *subsi3_carry_zext_0): New patterns.
20893 PR tree-optimization/82004
20894 * gimple-match-head.c (optimize_pow_to_exp): New function.
20895 * match.pd (pow(C,x) -> exp(log(C)*x)): Wrap with #if GIMPLE.
20896 Don't fold to exp if optimize_pow_to_exp is false.
20898 2018-03-28 Martin Liska <mliska@suse.cz>
20901 * calls.c (initialize_argument_information): Fix trailing space.
20902 * common.opt: Fix typo and provide better explanation for
20903 -fsanitize-coverage option.
20904 * config/i386/i386.opt: Fix typo.
20906 2018-03-28 Jakub Jelinek <jakub@redhat.com>
20907 Martin Liska <mliska@suse.cz>
20910 * gimplify.c (asan_poison_variable): Don't do the check for
20911 gimplify_omp_ctxp here.
20912 (gimplify_decl_expr): Do it here.
20913 (gimplify_target_expr): Likewise.
20915 2018-03-28 Martin Liska <mliska@suse.cz>
20918 * config/i386/i386.c (ix86_function_arg_advance): Do not call
20919 chkp_type_bounds_count if MPX is not enabled.
20921 2018-03-27 Chung-Ju Wu <jasonwucj@gmail.com>
20923 * config/nds32/nds32.h (BRANCH_COST): Adjust cost.
20925 2018-03-27 Michael Meissner <meissner@linux.vnet.ibm.com>
20928 * config/rs6000/rs6000.c (create_complex_muldiv): New helper
20929 function to create the function decl for complex long double
20930 multiply and divide for -mabi=ieeelongdouble.
20931 (init_float128_ieee): Call it.
20933 2018-03-27 H.J. Lu <hongjiu.lu@intel.com>
20936 * config/i386/i386.c (ix86_trampoline_init): Insert ENDBR for
20937 -fcf-protection=branch -mibt.
20938 * config/i386/i386.h (TRAMPOLINE_SIZE): Increased by 4 bytes.
20940 2018-03-27 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
20943 * config/arm/arm.c (arm_valid_symbolic_address): Handle
20944 arm_word_relocations.
20946 2018-03-27 Cesar Philippidis <cesar@codesourcery.com>
20949 * config/nvptx/nvptx.c (nvptx_assemble_decl_begin): Add '[]' to
20950 extern array declarations.
20952 2018-03-27 Richard Biener <rguenther@suse.de>
20954 PR middle-end/84067
20955 * match.pd ((A * C) +- (B * C) -> (A+-B) * C): Guard with
20956 explicit single_use checks.
20958 2018-03-27 Richard Biener <rguenther@suse.de>
20960 PR tree-optimization/85082
20961 * tree-ssa-sccvn.c (vn_reference_lookup_or_insert_for_pieces):
20964 2018-03-27 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
20966 * config.gcc (aarch64*-*-linux*): New TARGET_DEFAULT_ASYNC_UNWIND_TABLES
20967 * common/config/aarch64/aarch64-common.c (aarch64_optimization_table[]):
20968 Turn on fasynchronous-unwind-tables and funwind-tables.
20970 2018-03-26 Uros Bizjak <ubizjak@gmail.com>
20973 * config/i386/i386.md (*bmi_blsr_<mode>_cmp): New insn pattern.
20974 (*bmi_blsr_<mode>_ccz): Ditto.
20976 2018-03-26 Tom de Vries <tom@codesourcery.com>
20978 PR tree-optimization/85063
20979 * omp-general.c (offloading_function_p): New function. Factor out
20981 * omp-offload.c (pass_omp_target_link::gate): ... here.
20982 * omp-general.h (offloading_function_p): Declare.
20983 * tree-switch-conversion.c (build_one_array): Mark CSWTCH.x variable
20984 with attribute omp declare target for offloading functions.
20986 2018-03-24 Richard Sandiford <richard.sandiford@linaro.org>
20988 PR tree-optimization/84005
20989 * tree-data-ref.h (get_base_for_alignment): Declare.
20990 * tree-data-ref.c (get_base_for_alignment_1): New function.
20991 (get_base_for_alignment): Likewise.
20992 * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Use
20993 get_base_for_alignment to find a suitable base object, instead
20994 of always using drb->base_address.
20996 2018-03-23 Jakub Jelinek <jakub@redhat.com>
20998 PR inline-asm/85022
20999 * emit-rtl.c (init_emit_regs): Indicate that VOIDmode MEMs don't have
21000 known size by default.
21002 2018-03-23 Vladimir Makarov <vmakarov@redhat.com>
21004 PR inline-asm/85030
21005 * lra-constraints.c (process_alt_operands): Don't match BLKmode
21006 and non BLKmode operands.
21008 2018-03-23 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
21011 * config/arm/arm.md (unaligned_loadhis): Remove first alternative.
21012 Clean up attributes.
21014 2018-03-23 Richard Biener <rguenther@suse.de>
21017 * dwarf2out.c (rtl_for_decl_location): Do not generate RTL early when
21018 we are going to emit early debug for LTO.
21020 2018-03-23 Jakub Jelinek <jakub@redhat.com>
21022 PR inline-asm/85034
21023 * function.c (match_asm_constraints_1): Don't optimize if input
21024 doesn't satisfy general_operand predicate for output's mode.
21026 PR inline-asm/85022
21027 * alias.c (write_dependence_p): Don't require for x_canonicalized
21028 non-VOIDmode if x has VOIDmode.
21031 * sanopt.c (maybe_optimize_ubsan_ptr_ifn): If DECL_REGISTER (base),
21032 just don't try to optimize it rather than assert it never happens.
21034 2018-03-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
21036 * config/rs6000/rs6000-builtin.def: Remove various BU_ALTIVEC_X
21037 macro expansions for definition of ST_INTERNAL_<mode> and
21038 LD_INTERNAL_<mode> builtins.
21039 * config/rs6000/rs6000-protos.h (rs6000_address_for_altivec):
21041 * config/rs6000/rs6000.c (altivec_expand_ld_builtin): Delete this
21043 (altivec_expand_st_builtin): Likewise.
21044 (altivec_expand_builtin): Remove calls to deleted functions.
21045 (rs6000_address_for_altivec): Delete this function.
21046 * config/rs6000/vector.md: Remove expands for
21047 vector_altivec_load_<mode> and vector_altivec_store_<mode>.
21049 2018-03-22 Sudakshina Das <sudi.das@arm.com>
21052 * config/arm/arm.h (machine_function): Add static_chain_stack_bytes.
21053 * config/arm/arm.c (arm_compute_static_chain_stack_bytes): Avoid
21054 re-computing once computed.
21055 (arm_expand_prologue): Compute machine->static_chain_stack_bytes.
21056 (arm_init_machine_status): Initialize
21057 machine->static_chain_stack_bytes.
21059 2018-03-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
21062 * doc/extend.texi: Add four new prototypes for vec_ld.
21063 * config/rs6000/rs6000-builtin.def (LVX_V1TI): Reorder symbol
21064 definitions for more logical presentation.
21065 * config/rs6000/rs6000-c.c: (altivec_overloaded_builtins): Add
21066 entries for V1TI variants of __builtin_altivec_ld builtin.
21067 * config/rs6000/rs6000.c: (altivec_expand_lv_builtin): Add test and
21068 handling of V1TI variant of LVX icode pattern.
21069 (altivec_expand_builtin): Add case for ALTIVEC_BUILTIN_LVX_V1TI.
21070 (rs6000_gimple_fold_builtin): Likewise.
21071 (altivec_init_builtins): Add code to define
21072 __builtin_altivec_lvx_v1ti function.
21074 2018-03-22 Jakub Jelinek <jakub@redhat.com>
21076 PR inline-asm/84941
21077 * function.c (match_asm_constraints_1): Don't do the optimization
21078 if input isn't a REG, SUBREG, MEM or constant.
21080 2018-03-22 Tom de Vries <tom@codesourcery.com>
21082 PR tree-optimization/84956
21083 * tree-ssa-tail-merge.c (find_clusters_1): Skip bbs with
21084 bb_has_abnormal_pred.
21086 2018-03-22 Jakub Jelinek <jakub@redhat.com>
21089 * dwarf2asm.c (dw2_output_indirect_constant_1): Set
21090 DECL_INITIAL (decl) to decl at the end.
21091 * varasm.c (use_blocks_for_decl_p): Revert the 2018-03-20 change,
21092 adjust the comment.
21094 2018-03-21 Joseph Myers <joseph@codesourcery.com>
21096 * doc/extend.texi (__builtin_tgmath): Document when complex
21097 integer types are treated as _Complex _Float64.
21099 2018-03-21 Tom de Vries <tom@codesourcery.com>
21101 * doc/extend.texi (__builtin_extend_pointer): Remove pasto.
21103 2018-03-21 Jakub Jelinek <jakub@redhat.com>
21105 PR tree-optimization/84960
21106 * tree-cfg.c (remove_bb): Don't move forced labels into bb->prev_bb
21107 if it is ENTRY block, move them into single succ of ENTRY in that case.
21109 2018-03-21 Richard Sandiford <richard.sandiford@linaro.org>
21111 PR tree-optimization/84811
21112 * poly-int.h (poly_span_traits): Remove the T3 parameter and
21113 promote HOST_WIDE_INT T2 - T1 results to unsigned HOST_WIDE_INT.
21114 (maybe_in_range_p, known_in_range_p, ranges_known_overlap_p):
21115 (known_subrange_p): Update accordingly. Cast each value involved
21116 in the size comparison, rather than casting the result of the
21119 2018-03-21 Jakub Jelinek <jakub@redhat.com>
21121 PR tree-optimization/84982
21122 * gimple-ssa-store-merging.c (invert_op): Handle boolean inversion
21123 by flipping the least significant bit rather than all bits from
21124 bitpos to bitpos + bitsize - 1.
21126 2018-03-21 Nathan Sidwell <nathan@acm.org>
21128 * doc/extend.texi (Deprecated Features): Remove mention of
21129 long-deleted deprecations.
21131 2018-03-21 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
21134 * configure.ac (gcc_cv_ld_soname) <*-*-solaris2*>: Set.
21135 * configure: Regenerate.
21137 2018-03-21 Tom de Vries <tom@codesourcery.com>
21139 PR tree-optimization/83126
21140 * tree-parloops.c (num_phis): New function.
21141 (gen_parallel_loop): Detect and handle canonicalize_loop_ivs failure.
21143 2018-03-21 Nathan Sidwell <nathan@acm.org>
21145 * doc/extend.texi (Deprecated Features): Update deprecated flags,
21146 mention anon-struct/union members and trailing attributes.
21148 2018-03-21 Bin Cheng <bin.cheng@arm.com>
21150 PR tree-optimization/84969
21151 * tree-loop-distribution.c (fuse_memset_builtins): Don't reorder
21152 builtin memset partitions if they set different rhs values.
21154 2018-03-21 Jakub Jelinek <jakub@redhat.com>
21156 PR rtl-optimization/84989
21157 * simplify-rtx.c (simplify_unary_operation_1): Don't try to simplify
21158 VEC_DUPLICATE with scalar result mode.
21160 2018-03-21 Martin Liska <mliska@suse.cz>
21163 * ipa-icf.c (sem_item_optimizer::fixup_points_to_sets): Remove
21164 not intended return statement.
21166 2018-03-21 Martin Liska <mliska@suse.cz>
21169 * tree-chkp.c (CHKP_ARRAY_MAX_CHECK_STEPS): Define a new macro.
21170 (chkp_find_bound_slots_1): Limit number of iterations.
21172 2018-03-20 David H. Gutteridge <dhgutteridge@sympatico.ca>
21175 * Minor grammar fixes for x86 options.
21177 2018-03-20 Jakub Jelinek <jakub@redhat.com>
21180 * dce.c (delete_unmarked_insns): Don't remove frame related noop moves
21181 holding REG_CFA_RESTORE notes, instead turn them into a USE.
21183 2018-03-20 Peter Bergner <bergner@vnet.ibm.com>
21186 * config/rs6000/altivec.md (altivec_lvx_<mode>_2op): Delete define_insn.
21187 (altivec_lvx_<mode>_1op): Likewise.
21188 (altivec_stvx_<mode>_2op): Likewise.
21189 (altivec_stvx_<mode>_1op): Likewise.
21190 (altivec_lvx_<VM2:mode>): New define_expand.
21191 (altivec_stvx_<VM2:mode>): Likewise.
21192 (altivec_lvx_<VM2:mode>_2op_<P:mptrsize>): New define_insn.
21193 (altivec_lvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
21194 (altivec_stvx_<VM2:mode>_2op_<P:mptrsize>): Likewise.
21195 (altivec_stvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
21196 * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Use new expanders.
21197 (rs6000_gen_lvx): Likewise.
21198 * config/rs6000/rs6000.c (altivec_expand_lv_builtin): Likewise.
21199 (altivec_expand_stv_builtin): Likewise.
21200 (altivec_expand_builtin): Likewise.
21201 * config/rs6000/vector.md: Likewise.
21203 2018-03-20 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
21206 * config/arm/arm.c (arm_array_mode_supported_p): Return false for
21209 2018-03-20 Richard Biener <rguenther@suse.de>
21212 * config/i386/i386.c (ix86_add_stmt_cost): Only cost
21213 sign-conversions as zero, fall back to standard scalar_stmt
21216 2018-03-20 Martin Liska <mliska@suse.cz>
21219 * predict.c (rebuild_frequencies): Handle case when we have
21220 PROFILE_ABSENT, but flag_guess_branch_prob is false.
21222 2018-03-20 Jakub Jelinek <jakub@redhat.com>
21225 * dwarf2asm.c (dw2_output_indirect_constant_1): Temporarily turn off
21226 flag_section_anchors.
21227 * varasm.c (use_blocks_for_decl_p): Remove hack for
21228 dw2_force_const_mem.
21231 * config/aarch64/aarch64.md (*aarch64_reg_<mode>3_neg_mask2): Rename
21233 (*aarch64_<optab>_reg_<mode>3_neg_mask2): ... this. If pseudos can't
21234 be created, use lowpart_subreg of operands[0] rather than operands[0]
21236 (*aarch64_reg_<mode>3_minus_mask): Rename to ...
21237 (*aarch64_ashl_reg_<mode>3_minus_mask): ... this.
21238 (*aarch64_<optab>_reg_di3_mask2): Use const_int_operand predicate
21239 and n constraint instead of aarch64_shift_imm_di and Usd.
21240 (*aarch64_reg_<optab>_minus<mode>3): Rename to ...
21241 (*aarch64_<optab>_reg_minus<mode>3): ... this.
21243 2018-03-20 Sudakshina Das <sudi.das@arm.com>
21246 * config/arm/neon.md (ashldi3_neon): Update ?s for constraints
21247 to favor GPR over NEON registers.
21248 (<shift>di3_neon): Likewise.
21250 2018-03-20 Tom de Vries <tom@codesourcery.com>
21253 * config/nvptx/nvptx.c (nvptx_single): Don't neuter bar.sync.
21254 (nvptx_process_pars): Emit bar.sync asap and alap.
21256 2018-03-20 Tom de Vries <tom@codesourcery.com>
21259 * config/nvptx/nvptx.c (prevent_branch_around_nothing): Also update
21260 seen_label if seen_label is already set.
21262 2018-03-20 Jakub Jelinek <jakub@redhat.com>
21265 * config/i386/i386.c (fold_builtin_cpu): For features above 31
21266 use __cpu_features2 variable instead of __cpu_model.__cpu_features[0].
21267 Use 1U instead of 1. Formatting fixes.
21270 * builtins.c (fold_builtin_strpbrk): For strpbrk(x, "") use type
21271 instead of TREE_TYPE (s1) for the return value.
21273 2018-03-19 Jakub Jelinek <jakub@redhat.com>
21275 PR tree-optimization/84946
21276 * gimple-ssa-store-merging.c (mem_valid_for_store_merging): Compute
21277 bitsize + bitsize in poly_uint64 rather than poly_int64.
21280 * dwarf2asm.c: Include fold-const.c.
21281 (dw2_output_indirect_constant_1): Set DECL_INITIAL (decl) to ADDR_EXPR
21282 of decl rather than decl itself.
21284 PR rtl-optimization/84643
21285 * memmodel.h (enum memmodel): Add MEMMODEL_MAX enumerator.
21287 2018-03-19 Maxim Ostapenko <m.ostapenko@samsung.com>
21290 * dwarf2asm.c (dw2_output_indirect_constant_1): Disable ASan before
21291 calling assemble_variable.
21293 2018-03-19 Sudakshina Das <sudi.das@arm.com>
21296 * config/aarch64/aarch64-simd.md (vec_cmp<mode><v_int_equiv>): Modify
21297 instructions for UNLT, UNLE, UNGT, UNGE, UNEQ, UNORDERED and ORDERED.
21299 2018-03-19 Jim Wilson <jimw@sifive.com>
21302 * config/riscv/riscv.c (riscv_function_arg_boundary): Use
21303 PREFERRED_STACK_BOUNDARY instead of STACK_BOUNDARY.
21304 (riscv_first_stack_step): Likewise.
21305 (riscv_option_override): Use STACK_BOUNDARY instead of
21306 MIN_STACK_BOUNDARY.
21307 * config/riscv/riscv.h (STACK_BOUNDARY): Renamed from
21308 MIN_STACK_BOUNDARY.
21309 (BIGGEST_ALIGNMENT): Set to 128.
21310 (PREFERRED_STACK_BOUNDARY): Renamed from STACK_BOUNDARY.
21311 (RISCV_STACK_ALIGN): Use PREFERRED_STACK_BOUNDARY instead of
21314 2018-03-19 Richard Biener <rguenther@suse.de>
21316 PR tree-optimization/84933
21317 * tree-vrp.c (set_and_canonicalize_value_range): Treat out-of-bound
21318 values as -INF/INF when canonicalizing an ANTI_RANGE to a RANGE.
21320 2018-03-19 Richard Biener <rguenther@suse.de>
21322 PR tree-optimization/84859
21323 * tree-ssa-phiopt.c (single_trailing_store_in_bb): New function.
21324 (cond_if_else_store_replacement): Perform sinking operation on
21325 single-store BBs regardless of MAX_STORES_TO_SINK setting.
21326 Generalize what a BB with a single eligible store is.
21328 2018-03-19 Richard Biener <rguenther@suse.de>
21330 PR tree-optimization/84929
21331 * tree-data-ref.c (analyze_siv_subscript_cst_affine): Guard
21332 chrec_is_positive against non-chrec arg.
21334 2018-03-19 Tamar Christina <tamar.christina@arm.com>
21337 * config/arm/arm.c (arm_can_change_mode_class): revert r258554.
21339 2018-03-18 Martin Liska <mliska@suse.cz>
21341 PR rtl-optimization/84635
21342 * regrename.c (build_def_use): Use matches_mode only when
21345 2018-03-18 Richard Sandiford <richard.sandiford@linaro.org>
21347 PR tree-optimization/84913
21348 * tree-vect-loop.c (vectorizable_reduction): Don't try to
21349 vectorize chains of COND_EXPRs.
21351 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
21353 * config/nds32/nds32.h (MAX_REGS_PER_ADDRESS): Fix the value.
21355 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
21357 * config/nds32/nds32.h (LOGICAL_OP_NON_SHORT_CIRCUIT): Define.
21359 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
21361 * config/nds32/nds32.h (CLZ_DEFINED_VALUE_AT_ZERO): Define.
21363 2018-03-17 Chung-Ju Wu <jasonwucj@gmail.com>
21364 Kito Cheng <kito.cheng@gmail.com>
21366 * config/nds32/nds32-protos.h (nds32_adjust_reg_alloc_order): Declare.
21367 * config/nds32/nds32.c (nds32_reg_alloc_order_for_speed): New array.
21368 (nds32_adjust_reg_alloc_order): New function.
21369 * config/nds32/nds32.h (ADJUST_REG_ALLOC_ORDER): Define.
21371 2018-03-17 Kito Cheng <kito.cheng@gmail.com>
21373 * config/nds32/nds32.c (nds32_asm_output_mi_thunk,
21374 nds32_print_operand, nds32_print_operand_address): Use
21375 HOST_WIDE_INT_PRINT_DEC instead.
21377 2018-03-17 Chung-Ju Wu <jasonwucj@gmail.com>
21379 * config/nds32/nds32.c (nds32_register_priority): Modify cost.
21381 2018-03-17 Jakub Jelinek <jakub@redhat.com>
21384 * config/i386/i386.c (initial_ix86_tune_features,
21385 initial_ix86_arch_features): Use unsigned HOST_WIDE_INT rather than
21386 unsigned long long.
21387 (set_ix86_tune_features): Change ix86_tune_mask from unsigned int
21388 to unsigned HOST_WIDE_INT, initialize to HOST_WIDE_INT_1U << ix86_tune
21389 rather than 1u << ix86_tune. Formatting fix.
21390 (ix86_option_override_internal): Change ix86_arch_mask from
21391 unsigned int to unsigned HOST_WIDE_INT, initialize to
21392 HOST_WIDE_INT_1U << ix86_arch rather than 1u << ix86_arch.
21393 (ix86_function_specific_restore): Likewise.
21395 2018-03-16 Jakub Jelinek <jakub@redhat.com>
21398 * postreload.c (reload_combine_recognize_pattern): Perform
21399 INTVAL addition in unsigned HOST_WIDE_INT type to avoid UB and
21400 truncate_int_for_mode the result for the destination's mode.
21403 * hsa-gen.c (mem_type_for_type): Fix comment typo.
21404 * tree-vect-loop-manip.c (vect_create_cond_for_niters_checks):
21406 * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
21409 2018-03-16 Vladimir Makarov <vmakarov@redhat.com>
21412 * lra-assigns.c (lra_split_hard_reg_for): Don't use
21413 regno_allocno_class_array and sorted_pseudos.
21414 * lra-constraints.c (spill_hard_reg_in_range): Ignore hard regs in
21415 insns where regno is used.
21417 2018-03-16 Martin Liska <mliska@suse.cz>
21420 * multiple_target.c (create_dispatcher_calls): Redirect
21421 reference in the symbol table.
21423 2018-03-16 Martin Liska <mliska@suse.cz>
21426 * multiple_target.c (create_dispatcher_calls): Redirect also
21429 2018-03-16 Jakub Jelinek <jakub@redhat.com>
21433 * tree.h (TARGET_EXPR_NO_ELIDE): Define.
21434 * gimplify.c (gimplify_modify_expr_rhs): Don't elide TARGET_EXPRs with
21435 TARGET_EXPR_NO_ELIDE flag set unless *expr_p is INIT_EXPR.
21437 2018-03-16 Julia Koval <julia.koval@intel.com>
21439 * doc/invoke.texi (Skylake Server): Add CLWB.
21440 Cannonlake): Remove CLWB.
21442 2018-03-16 Jakub Jelinek <jakub@redhat.com>
21444 PR tree-optimization/84841
21445 * tree-ssa-reassoc.c (INTEGER_CONST_TYPE): Change to 1 << 4 from
21447 (FLOAT_ONE_CONST_TYPE): Define.
21448 (constant_type): Return FLOAT_ONE_CONST_TYPE for -1.0 and 1.0.
21449 (sort_by_operand_rank): Put entries with higher constant_type last
21450 rather than first to match comments.
21452 2018-03-15 Sandra Loosemore <sandra@codesourcery.com>
21454 * config/nios2/nios2.md (movsi_internal): Fix thinko in
21457 2018-03-15 Jakub Jelinek <jakub@redhat.com>
21460 * calls.c (expand_call): For TREE_ADDRESSABLE rettype ignore alignment
21461 check and use address of target always.
21463 2018-03-15 H.J. Lu <hongjiu.lu@intel.com>
21466 * config/i386/i386.c (indirect_thunk_needed): Update comments.
21467 (indirect_thunk_bnd_needed): Likewise.
21468 (indirect_thunks_used): Likewise.
21469 (indirect_thunks_bnd_used): Likewise.
21470 (indirect_return_needed): New.
21471 (indirect_return_bnd_needed): Likewise.
21472 (output_indirect_thunk_function): Add a bool argument for
21474 (output_indirect_thunk_function): Don't generate alias for
21475 function return thunk.
21476 (ix86_code_end): Call output_indirect_thunk_function to generate
21477 function return thunks.
21478 (ix86_output_function_return): Set indirect_return_bnd_needed
21479 and indirect_return_needed instead of indirect_thunk_bnd_needed
21480 and indirect_thunk_needed.
21482 2018-03-15 Olga Makhotina <olga.makhotina@intel.com>
21484 * config/i386/sgxintrin.h (_enclv_u32): New intrinsic.
21485 (__enclv_bc, __enclv_cd, __enclv_generic): New definitions.
21486 (ERDINFO, ETRACKC, ELDBC, ELDUC): New leaves.
21488 2018-03-15 David Malcolm <dmalcolm@redhat.com>
21489 Paul Hua <paul.hua.gm@gmail.com>
21492 * gcc.dg/fixits-pr84852-1.c: Fix filename in dg-regexp.
21494 2018-03-15 Segher Boessenkool <segher@kernel.crashing.org>
21496 * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add back the
21497 TARGET_DOUBLE_FLOAT and TARGET_SINGLE_FLOAT conditions on the DFmode
21498 resp. SFmode cases.
21500 2018-03-15 Tamar Christina <tamar.christina@arm.com>
21503 * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
21504 instead of GET_MODE_SIZE when comparing Units.
21506 2018-03-15 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
21509 * varasm.c (hash_section): Return an unchangeble hash value
21510 * config/aarch64/aarch64.c (aarch64_use_blocks_for_constant_p):
21511 Return !aarch64_can_use_per_function_literal_pools_p ().
21513 2018-03-15 Jakub Jelinek <jakub@redhat.com>
21516 * optabs.c (emit_conditional_move): Pass address of cmode's copy
21517 rather than address of cmode as last argument to prepare_cmp_insn.
21519 2018-03-15 Julia Koval <julia.koval@intel.com>
21521 * config/i386/i386.c (F_AVX512VBMI2, F_GFNI, F_VPCLMULQDQ,
21522 F_AVX512VNNI, F_AVX512BITALG): New.
21524 2018-03-14 John David Anglin <danglin@gcc.gnu.org>
21527 * config/pa/pa.c (pa_emit_move_sequence): Always emit secondary reload
21528 insn for floating-point loads and stores.
21530 2018-03-14 Carl Love <cel@us.ibm.com>
21532 * config/rs6000/rs6000-c.c: Add macro definitions for
21533 ALTIVEC_BUILTIN_VEC_PERMXOR.
21534 * config/rs6000/rs6000.h: Add #define for vec_permxor builtin.
21535 * config/rs6000/rs6000-builtin.def: Add macro expansions for VPERMXOR.
21536 * config/rs6000/altivec.md (altivec_vpermxor): New define expand.
21537 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Add case
21539 * config/doc/extend.texi: Add prototypes for vec_permxor.
21541 2018-03-14 David Malcolm <dmalcolm@redhat.com>
21544 * diagnostic-show-locus.c (class layout_point): Convert m_line
21545 from int to linenum_type.
21546 (line_span::comparator): Use linenum "compare" function when
21547 comparing line numbers.
21548 (test_line_span): New function.
21549 (layout_range::contains_point): Convert param "row" from int to
21551 (layout_range::intersects_line_p): Likewise.
21552 (layout::will_show_line_p): Likewise.
21553 (layout::print_source_line): Likewise.
21554 (layout::should_print_annotation_line_p): Likewise.
21555 (layout::print_annotation_line): Likewise.
21556 (layout::print_leading_fixits): Likewise.
21557 (layout::annotation_line_showed_range_p): Likewise.
21558 (struct line_corrections): Likewise for field m_row.
21559 (line_corrections::line_corrections): Likewise for param "row".
21560 (layout::print_trailing_fixits): Likewise.
21561 (layout::get_state_at_point): Likewise.
21562 (layout::get_x_bound_for_row): Likewise.
21563 (layout::print_line): Likewise.
21564 (diagnostic_show_locus): Likewise for locals "last_line" and "row".
21565 (selftest::diagnostic_show_locus_c_tests): Call test_line_span.
21566 * input.c (selftest::test_linenum_comparisons): New function.
21567 (selftest::input_c_tests): Call it.
21568 * selftest.c (selftest::test_assertions): Test ASSERT_GT,
21569 ASSERT_GT_AT, ASSERT_LT, and ASSERT_LT_AT.
21570 * selftest.h (ASSERT_GT): New macro.
21571 (ASSERT_GT_AT): New macro.
21572 (ASSERT_LT): New macro.
21573 (ASSERT_LT_AT): New macro.
21575 2018-03-14 Segher Boessenkool <segher@kernel.crashing.org>
21577 PR rtl-optimization/84780
21578 * combine.c (distribute_links): Don't make a link based on pc_rtx.
21580 2018-03-14 Martin Liska <mliska@suse.cz>
21582 * tree.c (record_node_allocation_statistics): Use
21583 get_stats_node_kind.
21584 (get_stats_node_kind): New function extracted from
21585 record_node_allocation_statistics.
21586 (free_node): Use get_stats_node_kind.
21588 2018-03-14 Richard Biener <rguenther@suse.de>
21590 * tree-ssa-pre.c (compute_antic_aux): Remove code that asserts
21591 that the value-set of ANTIC_IN doesn't grow.
21594 * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
21596 (BB_VISITED_WITH_VISITED_SUCCS): New define.
21597 (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
21599 2018-03-14 Julia Koval <julia.koval@intel.com>
21601 * config.gcc (icelake-client, icelake-server): New.
21603 * config/i386/i386.c (initial_ix86_tune_features): Extend to 64 bit.
21604 (initial_ix86_arch_features): Ditto.
21605 (PTA_SKYLAKE): Add SGX.
21606 (PTA_ICELAKE): Remove.
21607 (PTA_ICELAKE_CLIENT): New.
21608 (PTA_ICELAKE_SERVER): New.
21609 (ix86_option_override_internal): Split up icelake on icelake client and
21611 (get_builtin_code_for_version): Ditto.
21612 (fold_builtin_cpu): Ditto.
21613 * config/i386/driver-i386.c (config/i386/driver-i386.c): Ditto.
21614 * config/i386/i386-c.c (ix86_target_macros_internal): Ditto
21615 * config/i386/i386.h (processor_type): Ditto.
21616 * doc/invoke.texi: Ditto.
21618 2018-03-14 Jakub Jelinek <jakub@redhat.com>
21621 * sanopt.c (maybe_optimize_ubsan_ptr_ifn): Handle also
21622 INTEGER_CST offset, add it together with bitpos / 8 and
21623 sign extend based on POINTER_SIZE.
21627 2017-04-20 Uros Bizjak <ubizjak@gmail.com>
21630 * config/i386/constraints.md (Yc): New register constraint.
21631 * config/i386/i386.md (*float<SWI48:mode><MODEF:mode>2_mixed):
21632 Use Yc constraint for alternative 2 of operand 0. Remove
21633 preferred_for_speed attribute.
21635 2018-03-14 Richard Biener <rguenther@suse.de>
21637 PR tree-optimization/84830
21638 * tree-ssa-pre.c (compute_antic_aux): Intersect the new ANTIC_IN
21639 with the old one to avoid oscillations.
21641 2018-03-13 Vladimir Makarov <vmakarov@redhat.com>
21644 * lra-assigns.c (find_all_spills_for): Ignore uninteresting
21646 (assign_by_spills): Return a flag of reload assignment failure.
21647 Do not process the reload assignment failures. Do not spill other
21648 reload pseudos if they has the same reg class. Update n if
21650 (lra_assign): Add a return arg. Set up from the result of
21651 assign_by_spills call.
21652 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
21653 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
21654 usage_insns if it is not NULL.
21655 (spill_hard_reg_in_range): New function.
21656 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
21657 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
21658 function prototypes.
21659 (lra_assign): Change prototype.
21660 * lra.c (lra): Add code to deal with fails by splitting hard reg
21663 2018-03-01 Palmer Dabbelt <palmer@sifive.com>
21665 * config/riscv/riscv.opt (mrelax): New option.
21666 * config/riscv/riscv.c (riscv_file_start): Emit ".option
21667 "norelax" when riscv_mrelax is disabled.
21668 * doc/invoke.texi (RISC-V): Document "-mrelax" and "-mno-relax".
21670 2018-03-13 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
21673 * config/rs6000/rs6000.c (rs6000_reassociation_width): Disable parallel
21674 reassociation for int modes.
21676 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
21678 * tree-vect-loop-manip.c (vect_maybe_permute_loop_masks):
21679 Reverse the choice between VEC_UNPACK_LO_EXPR and VEC_UNPACK_HI_EXPR
21681 * config/aarch64/iterators.md (hi_lanes_optab): New int attribute.
21682 * config/aarch64/aarch64-sve.md
21683 (*aarch64_sve_<perm_insn><perm_hilo><mode>): Rename to...
21684 (aarch64_sve_<perm_insn><perm_hilo><mode>): ...this.
21685 (*extend<mode><Vwide>2): Rename to...
21686 (aarch64_sve_extend<mode><Vwide>2): ...this.
21687 (vec_unpack<su>_<perm_hilo>_<mode>): Turn into a define_expand,
21688 renaming the old pattern to...
21689 (aarch64_sve_punpk<perm_hilo>_<mode>): ...this. Only define
21691 (vec_unpack<su>_<perm_hilo>_<SVE_BHSI:mode>): Turn into a
21692 define_expand, renaming the old pattern to...
21693 (aarch64_sve_<su>unpk<perm_hilo>_<SVE_BHSI:mode>): ...this.
21694 (*vec_unpacku_<perm_hilo>_<mode>_no_convert): Delete.
21695 (vec_unpacks_<perm_hilo>_<mode>): Take BYTES_BIG_ENDIAN into
21696 account when deciding which SVE instruction the optab should use.
21697 (vec_unpack<su_optab>_float_<perm_hilo>_vnx4si): Likewise.
21699 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
21701 * config/aarch64/aarch64.md (V4_REGNUM, V8_REGNUM, V12_REGNUM)
21702 (V20_REGNUM, V24_REGNUM, V28_REGNUM, P1_REGNUM, P2_REGNUM, P3_REGNUM)
21703 (P4_REGNUM, P5_REGNUM, P6_REGNUM, P8_REGNUM, P9_REGNUM, P10_REGNUM)
21704 (P11_REGNUM, P12_REGNUM, P13_REGNUM, P14_REGNUM): New define_constants.
21705 (tlsdesc_small_<mode>): Turn a define_expand and use
21706 tlsdesc_small_sve_<mode> for SVE. Rename original define_insn to...
21707 (tlsdesc_small_advsimd_<mode>): ...this.
21708 (tlsdesc_small_sve_<mode>): New pattern.
21710 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
21712 * config/aarch64/iterators.md (UNSPEC_SMUL_HIGHPART)
21713 (UNSPEC_UMUL_HIGHPART): New constants.
21714 (MUL_HIGHPART): New int iteraor.
21715 (su): Handle UNSPEC_SMUL_HIGHPART and UNSPEC_UMUL_HIGHPART.
21716 * config/aarch64/aarch64-sve.md (<su>mul<mode>3_highpart): New
21718 (*<su>mul<mode>3_highpart): New define_insn.
21720 2018-03-13 Eric Botcazou <ebotcazou@adacore.com>
21723 * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
21726 2018-03-13 Martin Liska <mliska@suse.cz>
21729 * (sem_item_optimizer::sem_item_optimizer): Initialize new
21731 (sem_item_optimizer::~sem_item_optimizer): Release it.
21732 (sem_item_optimizer::merge_classes): Register variable aliases.
21733 (sem_item_optimizer::fixup_pt_set): New function.
21734 (sem_item_optimizer::fixup_points_to_sets): Likewise.
21735 * ipa-icf.h: Declare new variables and functions.
21737 2018-03-13 Jakub Jelinek <jakub@redhat.com>
21739 PR middle-end/84834
21740 * match.pd ((A & C) != 0 ? D : 0): Use INTEGER_CST@2 instead of
21741 integer_pow2p@2 and test integer_pow2p in condition.
21742 (A < 0 ? C : 0): Similarly for @1.
21744 PR middle-end/84831
21745 * stmt.c (parse_output_constraint): If the CONSTRAINT_LEN (*p, p)
21746 characters starting at p contain '\0' character, don't look beyond
21750 * config/i386/i386.md (round<mode>2): For 387 fancy math, disable
21751 pattern if -ftrapping-math -fno-fp-int-builtin-inexact.
21754 * reg-stack.c (change_stack): Change update_end var from int to
21755 rtx_insn *, if non-NULL don't update just BB_END (current_block), but
21756 also call set_block_for_insn on the newly added insns and rescan.
21759 * config/i386/sse.md (sse2_loadhpd): Use Yv constraint rather than v
21760 on the last operand.
21763 * tree.c (stabilize_reference_1): Return save_expr (e) for
21764 STATEMENT_LIST even if it doesn't have side-effects.
21766 2018-03-12 Jonathan Wakely <jwakely@redhat.com>
21768 * doc/invoke.texi (-mclflushopt): Fix spelling of option.
21770 2018-03-12 Renlin Li <renlin.li@arm.com>
21772 * config/aarch64/aarch64.md (movhf_aarch64): Fix mode argument to
21773 aarch64_output_scalar_simd_mov_immediate.
21775 2018-03-12 Martin Sebor <msebor@redhat.com>
21777 PR tree-optimization/83456
21778 * gimple-fold.c (gimple_fold_builtin_memory_op): Avoid warning
21779 for perfectly overlapping calls to memcpy.
21780 (gimple_fold_builtin_memory_chk): Same.
21781 (gimple_fold_builtin_strcpy): Handle no-warning.
21782 (gimple_fold_builtin_stxcpy_chk): Same.
21783 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Handle no-warning.
21785 2018-03-12 Segher Boessenkool <segher@kernel.crashing.org>
21787 * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add bool "named"
21788 parameter. Use it for SFmode.
21789 (rs6000_function_arg_advance_1): Adjust.
21790 (rs6000_function_arg): Adjust.
21791 (rs6000_gimplify_va_arg): Pass false for that new parameter.
21793 2018-03-12 Segher Boessenkool <segher@kernel.crashing.org>
21795 PR rtl-optimization/84169
21796 PR rtl-optimization/84780
21797 * combine.c (can_combine_p): Check for a 2-insn combination whether
21798 the destination register is used between the two insns, too.
21800 2018-03-12 Richard Biener <rguenther@suse.de>
21802 PR tree-optimization/84803
21803 * tree-if-conv.c (ifcvt_memrefs_wont_trap): Don't do anything
21804 for refs DR analysis didn't process.
21806 2018-03-12 Richard Biener <rguenther@suse.de>
21808 PR tree-optimization/84777
21809 * tree-ssa-loop-ch.c (should_duplicate_loop_header_p): For
21810 force-vectorize loops ignore whether we are optimizing for size.
21812 2018-03-12 Chung-Ju Wu <jasonwucj@gmail.com>
21814 * config/nds32/nds32.c (nds32_md_asm_adjust): New function.
21815 (TARGET_MD_ASM_ADJUST): Define.
21817 2018-03-12 Monk Chiang <sh.chiang04@gmail.com>
21818 Kito Cheng <kito.cheng@gmail.com>
21819 Chung-Ju Wu <jasonwucj@gmail.com>
21821 * config/nds32/nds32.c (nds32_compute_stack_frame,
21822 nds32_emit_stack_push_multiple, nds32_emit_stack_pop_multiple,
21823 nds32_emit_stack_v3push, nds32_emit_stack_v3pop,
21824 nds32_emit_adjust_frame, nds32_expand_prologue, nds32_expand_epilogue,
21825 nds32_expand_prologue_v3push, nds32_expand_epilogue_v3pop): Refine.
21826 * config/nds32/nds32.h (NDS32_FIRST_CALLEE_SAVE_GPR_REGNUM,
21827 NDS32_LAST_CALLEE_SAVE_GPR_REGNUM, NDS32_V3PUSH_AVAILABLE_P): New.
21828 * config/nds32/nds32.md (prologue, epilogue): Use macro
21829 NDS32_V3PUSH_AVAILABLE_P to do checking.
21831 2018-03-11 Jakub Jelinek <jakub@redhat.com>
21834 * dwarf2out.c (gen_enumeration_type_die): Don't guard adding
21835 DW_AT_declaration for ENUM_IS_OPAQUE on -gdwarf-4 or -gno-strict-dwarf,
21836 but on TYPE_SIZE. Don't do anything for ENUM_IS_OPAQUE if not creating
21837 a new die. Don't set TREE_ASM_WRITTEN if ENUM_IS_OPAQUE. Guard
21838 addition of most attributes on !orig_type_die or the attribute not
21839 being present already. Assert TYPE_VALUES is NULL for ENUM_IS_OPAQUE.
21841 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
21842 Chung-Ju Wu <jasonwucj@gmail.com>
21844 * config/nds32/nds32.c (nds32_cpu_cpp_builtins): Modify to define
21845 __NDS32_VH__ macro.
21846 * config/nds32/nds32.opt (mvh): New option.
21848 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
21849 Chung-Ju Wu <jasonwucj@gmail.com>
21851 * config/nds32/nds32-protos.h (nds32_cpu_cpp_builtins): Declare
21853 * config/nds32/nds32.c (nds32_cpu_cpp_builtins): New function.
21854 * config/nds32/nds32.h (TARGET_CPU_CPP_BUILTINS): Modify its
21857 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
21858 Chung-Ju Wu <jasonwucj@gmail.com>
21860 * config/nds32/nds32-memory-manipulation.c (nds32_expand_strlen): New
21862 * config/nds32/nds32-multiple.md (strlensi): New pattern.
21863 * config/nds32/nds32-protos.h (nds32_expand_strlen): Declare function.
21865 2018-03-11 Monk Chiang <sh.chiang04@gmail.com>
21866 Kito Cheng <kito.cheng@gmail.com>
21867 Chung-Ju Wu <jasonwucj@gmail.com>
21869 * config/nds32/constants.md (unspec_element): Add UNSPEC_FFB,
21870 UNSPEC_FFMISM and UNSPEC_FLMISM.
21871 * config/nds32/nds32-intrinsic.c (bdesc_2arg): Add builtin description
21872 for ffb, ffmism and flmism.
21873 * config/nds32/nds32-intrinsic.md (unspec_ffb): Define new pattern.
21874 (unspec_ffmism): Ditto.
21875 (unspec_flmism): Ditto.
21876 (nds32_expand_builtin_impl): Check if string extension is available.
21877 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FFB,
21878 NDS32_BUILTIN_FFMISM and NDS32_BUILTIN_FLMISM.
21880 2018-03-10 Vladimir Makarov <vmakarov@redhat.com>
21883 2018-03-09 Vladimir Makarov <vmakarov@redhat.com>
21886 * lra-assigns.c (assign_by_spills): Return a flag of reload
21887 assignment failure. Do not process the reload assignment
21888 failures. Do not spill other reload pseudos if they has the same
21890 (lra_assign): Add a return arg. Set up from the result of
21891 assign_by_spills call.
21892 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
21893 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
21894 usage_insns if it is not NULL.
21895 (spill_hard_reg_in_range): New function.
21896 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
21897 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
21898 function prototypes.
21899 (lra_assign): Change prototype.
21900 * lra.c (lra): Add code to deal with fails by splitting hard reg
21903 2018-03-10 H.J. Lu <hongjiu.lu@intel.com>
21906 * config/i386/i386.opt: Replace Enforcment with Enforcement.
21908 2018-03-10 Alexandre Oliva <aoliva@redhat.com>
21911 * dwarf2out.h (dw_val_class): Add dw_val_class_symview.
21912 (dw_val_node): Add val_symbolic_view.
21913 * dwarf2out.c (dw_line_info_table): Add symviews_since_reset.
21914 (symview_upper_bound): New.
21915 (new_line_info_table): Initialize symviews_since_reset.
21916 (dwarf2out_source_line): Count symviews_since_reset and set
21917 symview_upper_bound.
21918 (dw_val_equal_p): Handle symview.
21919 (add_AT_symview): New.
21920 (print_dw_val): Handle symview.
21921 (attr_checksum, attr_checksum_ordered): Likewise.
21922 (same_dw_val_p, size_of_die): Likewise.
21923 (value_format, output_die): Likewise.
21924 (add_high_low_attributes): Use add_AT_symview for entry_view.
21925 (dwarf2out_finish): Reset symview_upper_bound, clear
21928 2018-03-09 Peter Bergner <bergner@vnet.ibm.com>
21931 * config/rs6000/rs6000.c (rs6000_offsettable_memref_p): New prototype.
21932 Add strict argument and use it.
21933 (rs6000_split_multireg_move): Update for new strict argument.
21934 (mem_operand_gpr): Disallow all non-offsettable addresses.
21935 * config/rs6000/rs6000.md (*movdi_internal64): Use YZ constraint.
21937 2018-03-09 Jakub Jelinek <jakub@redhat.com>
21940 * config/rs6000/rs6000.c (rs6000_gimplify_va_arg): Mark va_arg_tmp
21941 temporary TREE_ADDRESSABLE before gimplification of BUILT_IN_MEMCPY.
21942 * config/powerpcspe/powerpcspe.c (rs6000_gimplify_va_arg): Likewise.
21945 * tree-inline.c (copy_tree_body_r): For INDIRECT_REF of a remapped
21946 decl, use remap_type if we want to use the type.
21948 2018-03-09 Martin Sebor <msebor@redhat.com>
21950 PR tree-optimization/84526
21951 * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
21953 (builtin_access::generic_overlap): Be prepared to handle non-array
21956 2018-03-09 Alexandre Oliva <aoliva@redhat.com>
21958 PR rtl-optimization/84682
21959 * lra-constraints.c (process_address_1): Check is_address flag
21960 for address constraints.
21961 (process_alt_operands): Likewise.
21962 * lra.c (lra_set_insn_recog_data): Pass asm operand locs to
21963 preprocess_constraints.
21964 * recog.h (preprocess_constraints): Add oploc parameter.
21966 * recog.c (preprocess_constraints): Test address_operand for
21967 CT_ADDRESS constraints.
21969 2018-03-09 Vladimir Makarov <vmakarov@redhat.com>
21972 * lra-assigns.c (assign_by_spills): Return a flag of reload
21973 assignment failure. Do not process the reload assignment
21974 failures. Do not spill other reload pseudos if they has the same
21976 (lra_assign): Add a return arg. Set up from the result of
21977 assign_by_spills call.
21978 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
21979 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
21980 usage_insns if it is not NULL.
21981 (spill_hard_reg_in_range): New function.
21982 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
21983 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
21984 function prototypes.
21985 (lra_assign): Change prototype.
21986 * lra.c (lra): Add code to deal with fails by splitting hard reg
21989 2018-03-09 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
21992 * common/config/arm/arm-common.c (arm_parse_arch_option_name):
21993 Accept complain bool parameter. Only emit errors if it is true.
21994 (arm_parse_cpu_option_name): Likewise.
21995 (arm_target_thumb_only): Adjust callers of the above.
21996 * config/arm/arm-protos.h (arm_parse_cpu_option_name): Adjust
21997 prototype to take a default true bool parameter.
21998 (arm_parse_arch_option_name): Likewise.
22000 2018-03-09 David Malcolm <dmalcolm@redhat.com>
22001 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
22005 * Makefile.in (LD_VERSION_SCRIPT_OPTION, LD_SONAME_OPTION): New.
22006 * configure: Regenerate.
22007 * configure.ac ("linker --version-script option"): New.
22008 ("linker soname option"): New.
22010 2018-03-09 Richard Biener <rguenther@suse.de>
22012 PR tree-optimization/84775
22013 * tree-if-conv.c (add_bb_predicate_gimplified_stmts): Delink
22014 immediate uses of predicate stmts and mark them modified.
22017 PR tree-optimization/84178
22018 * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
22020 (version_loop_for_if_conversion): Delay update_ssa call.
22021 (tree_if_conversion): Delay update_ssa until after predicate
22024 2018-03-09 Eric Botcazou <ebotcazou@adacore.com>
22027 * config/i386/winnt.c (i386_pe_seh_cold_init): Use small pre-allocation
22028 when the function accesses prior frames.
22030 2018-03-08 Jakub Jelinek <jakub@redhat.com>
22033 * dwarf2out.c (dw_loc_list): If list && loc_list->first->next, call
22034 gen_llsym, otherwise call maybe_gen_llsym.
22036 PR inline-asm/84742
22037 * recog.c (asm_operand_ok): Return 0 if multi-character constraint
22038 has ',' character inside of it.
22040 2018-03-08 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
22043 * config/aarch64/aarch64.md (*compare_cstore<mode>_insn): Mark pattern
22044 as clobbering CC_REGNUM.
22046 2018-03-08 Richard Biener <rguenther@suse.de>
22048 PR middle-end/84552
22049 * tree-scalar-evolution.c: Include tree-into-ssa.h.
22050 (follow_copies_to_constant): Do not follow SSA names registered
22053 2018-03-08 Richard Biener <rguenther@suse.de>
22055 PR tree-optimization/84178
22056 * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
22058 (version_loop_for_if_conversion): Delay update_ssa call.
22059 (tree_if_conversion): Delay update_ssa until after predicate
22062 2018-03-08 David Malcolm <dmalcolm@redhat.com>
22064 PR tree-optimization/84178
22065 * tree-if-conv.c (release_bb_predicate): Remove the
22066 the assertion that the stmts have NULL use_ops.
22067 Discard the statements, asserting that they haven't
22068 yet been added to a BB.
22070 2018-03-08 Richard Biener <rguenther@suse.de>
22072 PR tree-optimization/84746
22073 * tree-ssa-pre.c (find_leader_in_sets): Deal with SET1 being NULL.
22074 (phi_translate): Pass in destination ANTIC_OUT set.
22075 (phi_translate_1): Likewise. For a simplified result lookup
22076 a leader in ANTIC_OUT and AVAIL_OUT, not the ANTIC_IN sets.
22077 (phi_translate_set): Adjust.
22078 (do_pre_regular_insertion): Likewise.
22079 (do_pre_partial_partial_insertion): Likewise.
22081 2018-03-08 Martin Liska <mliska@suse.cz>
22083 PR gcov-profile/84735
22084 * doc/gcov.texi: Document usage of profile files.
22085 * gcov-io.h: Document changes in the format.
22087 2018-03-08 Alexandre Oliva <aoliva@redhat.com>
22091 * dwarf2out.c (struct dw_line_info_table): Update comments for
22093 (FORCE_RESET_NEXT_VIEW): New.
22094 (FORCE_RESETTING_VIEW_P): New.
22095 (RESETTING_VIEW_P): Check for -1 too.
22096 (ZERO_VIEW_P): Likewise.
22097 (new_line_info_table): Force-reset next view.
22098 (dwarf2out_begin_function): Likewise.
22099 (dwarf2out_source_line): Simplify zero_view_p initialization.
22100 Test FORCE_RESETTING_VIEW_P and RESETTING_VIEW_P instead of
22101 view directly. Omit view when omitting .loc at line 0.
22103 2018-03-08 Jakub Jelinek <jakub@redhat.com>
22105 PR tree-optimization/84740
22106 * tree-switch-conversion.c (process_switch): Call build_constructors
22107 only if info.phi_count is non-zero.
22109 PR tree-optimization/84739
22110 * tree-tailcall.c (find_tail_calls): Check call arguments against
22111 DECL_ARGUMENTS (current_function_decl) rather than
22112 DECL_ARGUMENTS (func) when checking for tail recursion.
22114 2018-03-07 Jakub Jelinek <jakub@redhat.com>
22116 * doc/contrib.texi: Add entries for Martin Liska, David Malcolm,
22117 Marek Polacek, extend Vladimir Makarov's, Jonathan Wakely's and
22118 Volker Reichelt's entry and add entries for people that perform
22119 GCC fuzzy testing and report numerous bugs.
22121 2018-03-07 Segher Boessenkool <segher@kernel.crashing.org>
22124 * config/rs6000/rs6000.c (rs6000_elf_in_small_data_p): Don't put
22125 readonly data in sdata, if that is disabled.
22126 * config/rs6000/sysv4.opt (mreadonly-in-sdata): New option.
22127 * doc/invoke.texi (RS/6000 and PowerPC Options): Document
22128 -mreadonly-in-sdata option.
22130 2018-03-07 Martin Sebor <msebor@redhat.com>
22132 PR tree-optimization/84468
22133 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Consider successor
22134 basic block when looking for nul assignment.
22136 2018-03-07 Eric Botcazou <ebotcazou@adacore.com>
22139 * except.h (output_function_exception_table): Adjust prototype.
22140 * except.c (output_function_exception_table): Remove FNNAME parameter
22141 and add SECTION parameter. Ouput one part of the table at a time.
22142 * final.c (final_scan_insn_1) <NOTE_INSN_SWITCH_TEXT_SECTIONS>: Output
22143 the first part of the exception table and emit unwind directives.
22144 * config/i386/i386-protos.h (i386_pe_end_cold_function): Declare.
22145 (i386_pe_seh_cold_init): Likewise.
22146 * config/i386/cygming.h (ASM_DECLARE_COLD_FUNCTION_NAME): New macro.
22147 (ASM_DECLARE_COLD_FUNCTION_SIZE): Likewise.
22148 * config/i386/i386.c (x86_expand_epilogue): Fix wording in comment.
22149 (ix86_output_call_insn): Emit a nop in one more case for SEH.
22150 * config/i386/winnt.c: Include except.h.
22151 (struct seh_frame_state): Add reg_offset, after_prologue and
22152 in_cold_section fields.
22153 (i386_pe_seh_end_prologue): Set seh->after_prologue.
22154 (i386_pe_seh_cold_init): New function.
22155 (i386_pe_seh_fini): Add COLD parameter and bail out if it is not equal
22156 to seh->in_cold_section.
22157 (seh_emit_push): Record the offset of the push.
22158 (seh_emit_save): Record the offet of the save.
22159 (i386_pe_seh_unwind_emit): Deal with NOTE_INSN_SWITCH_TEXT_SECTIONS.
22160 Test seh->after_prologue to disregard the epilogue.
22161 (i386_pe_end_function): Pass FALSE to i386_pe_seh_fini.
22162 (i386_pe_end_cold_function): New function.
22164 2018-03-07 Jakub Jelinek <jakub@redhat.com>
22167 * config/aarch64/predicates.md (aarch64_simd_reg_or_zero): Use
22168 aarch64_simd_or_scalar_imm_zero rather than aarch64_simd_imm_zero.
22171 * gimple-expr.c (create_tmp_var_raw): Set DECL_NAMELESS flag
22173 * tree-pretty-print.c (dump_decl_name): For TDF_COMPARE_DEBUG,
22174 don't print names of DECL_NAMELESS DECL_IGNORED_P decls.
22176 PR middle-end/84723
22177 * multiple_target.c: Include tree-inline.h and intl.h.
22178 (expand_target_clones): Diagnose and fail if node->definition and
22179 !tree_versionable_function_p (node->decl).
22181 2018-03-06 John David Anglin <danglin@gcc.gnu.org>
22183 * config/pa/pa.h (ASM_GENERATE_INTERNAL_LABEL): Revise to use
22185 (ASM_OUTPUT_ADDR_VEC_ELT): Revise for above change.
22186 (ASM_OUTPUT_ADDR_DIFF_ELT): Likewise.
22187 * config/pa/pa64-hpux.h (ASM_GENERATE_INTERNAL_LABEL): Revise as above.
22189 2018-03-06 Jakub Jelinek <jakub@redhat.com>
22192 * combine.c (try_combine): Use reg_or_subregno instead of handling
22193 just paradoxical SUBREGs and REGs.
22195 2018-03-06 Claudiu Zissulescu <claziss@synopsys.com>
22197 * config/arc/arc.c (arc_finalize_pic): Remove function.
22198 (arc_must_save_register): We use single base PIC register, remove
22199 checks to save/restore the PIC register.
22200 (arc_expand_prologue): Likewise.
22201 * config/arc/arc-protos.h (arc_set_default_type_attributes):
22203 (arc_verify_short): Likewise.
22204 (arc_attr_type): Likewise.
22205 * config/arc/arc.c (arc_set_default_type_attributes): Remove.
22206 (walk_stores): Likewise.
22207 (arc_address_cost): Make it static.
22208 (arc_verify_short): Likewise.
22209 (branch_dest): Likewise.
22210 (arc_attr_type): Likewise.
22211 * config/arc/arc.c (TARGET_ADJUST_INSN_LENGTH): Remove.
22212 (TARGET_INSN_LENGTH_PARAMETERS): Likewise.
22213 (arc_final_prescan_insn): Remove inserting the nops due to
22214 hardware hazards. It is done in reorg step.
22215 (insn_length_variant_t): Remove.
22216 (insn_length_parameters_t): Likewise.
22217 (arc_insn_length_parameters): Likewise.
22218 (arc_get_insn_variants): Likewise.
22219 * config/arc/arc.h (TARGET_UPSIZE_DBR): Remove.
22221 2018-03-06 Jakub Jelinek <jakub@redhat.com>
22223 PR inline-asm/84683
22224 * reg-stack.c (move_for_stack_reg): If any_malformed_asm, avoid
22227 PR tree-optimization/84687
22228 * omp-simd-clone.c (simd_clone_create): Clear DECL_BUILT_IN_CLASS
22230 * match.pd (pow(C,x)*expN(y) -> expN(logN(C)*x+y)): New optimization.
22232 2018-03-05 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
22234 * config/rs6000/rs6000-builtin.def (rs6000_speculation_barrier):
22235 Rename to ppc_speculation_barrier.
22236 * config/rs6000/rs6000.c (rs6000_init_builtins): Rename builtin to
22237 __builtin_ppc_speculation_barrier.
22239 2018-03-05 Jakub Jelinek <jakub@redhat.com>
22242 * combine.c (combine_simplify_rtx): Don't try to simplify if
22243 if_then_else_cond returned non-NULL, but either true_rtx or false_rtx
22246 2018-03-05 Segher Boessenkool <segher@kernel.crashing.org>
22248 * config/rs6000/rs6000.c (rs6000_loop_align): Don't align tiny loops
22249 to 32 bytes when compiling for POWER9.
22251 2018-03-05 Jakub Jelinek <jakub@redhat.com>
22254 * config/i386/i386.c (ix86_function_ok_for_sibcall): Check for
22255 regparm >= 3 with no arg reg available also for calls with
22256 flag_force_indirect_call. Pass decl to ix86_function_regparm.
22259 * config/i386/sse.md (*<code><mode>3): Replace <mask_prefix3> with
22261 (*<plusminus_insn><mode>3): Likewise. Remove <mask_operand3> uses.
22263 2018-03-05 Peter Bergner <bergner@vnet.ibm.com>
22266 * config/rs6000/vector.md (mov<mode>): Disallow altivec memory operands.
22268 2018-03-05 Richard Biener <rguenther@suse.de>
22270 PR tree-optimization/84486
22271 * tree-ssa-pre.c (create_expression_by_pieces): Remove dead code.
22272 When inserting a __builtin_assume_aligned call set the LHS
22273 SSA name alignment info accordingly.
22275 2018-03-05 Wilco Dijkstra <wdijkstr@arm.com>
22277 PR tree-optimization/84114
22278 * config/aarch64/aarch64.c (aarch64_reassociation_width)
22279 Avoid reassociation of FLOAT_MODE addition.
22281 2018-03-05 Olga Makhotina <olga.makhotina@intel.com>
22283 * common/config/i386/i386-common.c (OPTION_MASK_ISA_PCONFIG_SET,
22284 OPTION_MASK_ISA_PCONFIG_UNSET, OPTION_MASK_ISA_WBNOINVD_SET,
22285 OPTION_MASK_ISA_WBNOINVD_UNSET): New definitions.
22286 (ix86_handle_option): Handle -mpconfig and -mwbnoinvd.
22287 * config.gcc (pconfigintrin.h, wbnoinvdintrin.h) : Add headers.
22288 * config/i386/cpuid.h (bit_PCONFIG, bit_WBNOINVD): New.
22289 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mpconfig
22291 * config/i386/i386-builtin.def (__builtin_ia32_wbnoinvd,
22292 __builtin_ia32_wbinvd): New builtins.
22293 (SPECIAL_ARGS2): New.
22294 * config/i386/i386-c.c (__WBNOINVD__, __PCONFIG__): New.
22295 (SPECIAL_ARGS2): New.
22296 * config/i386/i386.c (ix86_target_string): Add -mpconfig and -mwbnoinvd.
22297 (ix86_valid_target_attribute_inner_p): Ditto.
22298 (ix86_init_mmx_sse_builtins): Add special_args2.
22299 * config/i386/i386.h (TARGET_PCONFIG, TARGET_PCONFIG_P, TARGET_WBNOINVD,
22300 TARGET_WBNOINVD_P): New.
22301 * config/i386/i386.md (UNSPECV_WBINVD, UNSPECV_WBNOINVD): New.
22302 (define_insn "wbinvd", define_insn "wbnoinvd"): New.
22303 * config/i386/i386.opt: Add -mpconfig and -mwbnoinvd.
22304 * config/i386/immintrin.h (_wbinvd): New intrinsic.
22305 * config/i386/pconfigintrin.h: New file.
22306 * config/i386/wbnoinvdintrin.h: Ditto.
22307 * config/i386/x86intrin.h: Add headers pconfigintrin.h and
22309 * doc/invoke.texi (-mpconfig, -mwbnoinvd): New.
22311 2018-03-05 Richard Biener <rguenther@suse.de>
22313 PR tree-optimization/84670
22314 * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
22316 (BB_VISITED_WITH_VISITED_SUCCS): New define.
22317 (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
22318 (compute_antic_aux): Only assert the number of values in ANTIC_IN
22319 doesn't grow if all successors (recursively) were visited at least
22322 2018-03-05 Richard Biener <rguenther@suse.de>
22324 PR tree-optimization/84650
22325 * tree-ssa-loop-im.c (pass_lim::execute): Reset the SCEV cache
22326 if executed in the loop pipeline.
22328 2018-03-05 Sandra Loosemore <sandra@codesourcery.com>
22330 * doc/configfiles.texi (Configuration Files): Move info about
22331 conditionalizing $target-protos.h to...
22332 * doc/sourcebuild.texi (Back End): Here. Explain how $target.h
22333 differs from $target-protos.h.
22335 2018-03-05 Kito Cheng <kito.cheng@gmail.com>
22336 Chung-Ju Wu <jasonwucj@gmail.com>
22338 * config/nds32/nds32-protos.h (nds32_expand_setmem): Declare.
22339 * config/nds32/nds32-multiple.md (setmemsi): Define.
22340 * config/nds32/nds32-memory-manipulation.c
22341 (nds32_gen_dup_4_byte_to_word_value): New.
22342 (emit_setmem_word_loop): New.
22343 (emit_setmem_byte_loop): New.
22344 (nds32_expand_setmem_loop): New.
22345 (nds32_expand_setmem_loop_v3m): New.
22346 (nds32_expand_setmem_unroll): New.
22347 (nds32_expand_setmem): New.
22349 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
22350 Chung-Ju Wu <jasonwucj@gmail.com>
22352 * config/nds32/nds32-memory-manipulation.c
22353 (nds32_emit_load_store): New.
22354 (nds32_emit_post_inc_load_store): New.
22355 (nds32_emit_mem_move): New.
22356 (nds32_emit_mem_move_block): New.
22357 (nds32_expand_movmemsi_loop_unknown_size): New.
22358 (nds32_expand_movmemsi_loop_known_size): New.
22359 (nds32_expand_movmemsi_loop): New.
22360 (nds32_expand_movmemsi_unroll): New.
22361 (nds32_expand_movmemqi): Rename ...
22362 (nds32_expand_movmemsi): ... to this.
22363 * config/nds32/nds32-multiple.md (movmemqi): Rename ...
22364 (movmemsi): ... to this.
22365 * config/nds32/nds32-protos.h (nds32_expand_movmemqi): Rename ...
22366 (nds32_expand_movmemsi): ... to this.
22368 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
22369 Monk Chiang <sh.chiang04@gmail.com>
22370 Chung-Ju Wu <jasonwucj@gmail.com>
22372 * config/nds32/nds32-protos.h
22373 (nds32_expand_load_multiple): New arguments.
22374 (nds32_expand_store_multiple): Ditto.
22375 (nds32_valid_multiple_load_store): Rename ...
22376 (nds32_valid_multiple_load_store_p): ... to this.
22377 * config/nds32/nds32-memory-manipulation.c
22378 (nds32_expand_load_multiple): Refine implementation.
22379 (nds32_expand_store_multiple): Ditto.
22380 * config/nds32/nds32-multiple.md
22381 (load_multiple): Update nds32_expand_load_multiple interface.
22382 (store_multiple): Update nds32_expand_store_multiple interface.
22383 * config/nds32/nds32-predicates.c
22384 (nds32_valid_multiple_load_store): Rename ...
22385 (nds32_valid_multiple_load_store_p): ... to this and refine
22387 * config/nds32/predicates.md
22388 (nds32_load_multiple_and_update_address_operation): New predicate.
22389 (nds32_store_multiple_and_update_address_operation): New predicate.
22391 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
22392 Chung-Ju Wu <jasonwucj@gmail.com>
22394 * config/nds32/nds32.md (type): Add load_multiple and store_multiple.
22395 (combo): New attribute.
22396 * config/nds32/nds32-multiple.md: Refine patterns with new attributes.
22398 2018-03-03 Chung-Ju Wu <jasonwucj@gmail.com>
22400 * config/nds32/nds32.opt: Change -mcmodel= default value.
22402 2018-03-03 Kito Cheng <kito.cheng@gmail.com>
22403 Monk Chiang <sh.chiang04@gmail.com>
22404 Chung-Ju Wu <jasonwucj@gmail.com>
22406 * config/nds32/constants.md (unspec_element): New enum.
22407 * config/nds32/constraints.md (Umw): New constraint.
22408 * config/nds32/nds32-intrinsic.c: Add more builtin functions.
22409 * config/nds32/nds32-intrinsic.md: Likewise.
22410 * config/nds32/nds32-md-auxiliary.c (nds32_regno_to_enable4): New.
22411 (nds32_valid_smw_lwm_base_p): New.
22412 (nds32_output_smw_single_word): New.
22413 (nds32_output_lmw_single_word): New.
22414 (nds32_expand_unaligned_load): New.
22415 (nds32_expand_unaligned_store): New.
22416 * config/nds32/nds32-protos.h (nds32_valid_smw_lwm_base_p): Declare.
22417 (nds32_output_smw_single_word): Declare.
22418 (nds32_output_lmw_single_word): Declare.
22419 (nds32_expand_unaligned_load): Declare.
22420 (nds32_expand_unaligned_store): Declare.
22421 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_UALOAD_HW,
22422 NDS32_BUILTIN_UALOAD_W, NDS32_BUILTIN_UALOAD_DW,
22423 NDS32_BUILTIN_UASTORE_HW, NDS32_BUILTIN_UASTORE_W,
22424 NDS32_BUILTIN_UASTORE_DW.
22425 * config/nds32/predicates.md (nds32_lmw_smw_base_operand): New
22428 2018-03-03 Monk Chiang <sh.chiang04@gmail.com>
22429 Kito Cheng <kito.cheng@gmail.com>
22430 Chung-Ju Wu <jasonwucj@gmail.com>
22432 * config/nds32/nds32-intrinsic.c
22433 (nds32_expand_builtin_null_ftype_reg): Delete.
22434 (nds32_expand_builtin_reg_ftype_imm): Ditto.
22435 (nds32_expand_builtin_null_ftype_reg_imm): Ditto.
22436 (nds32_read_argument): New.
22437 (nds32_legitimize_target): Ditto.
22438 (nds32_legitimize_argument): Ditto.
22439 (nds32_check_constant_argument): Ditto.
22440 (nds32_expand_unop_builtin): Ditto.
22441 (nds32_expand_unopimm_builtin): Ditto.
22442 (nds32_expand_binop_builtin): Ditto.
22443 (nds32_builtin_decl_impl): Ditto.
22444 (builtin_description): Ditto.
22445 (nds32_expand_builtin_impl): Rewrite with new infrastructure.
22446 (nds32_init_builtins_impl): Ditto.
22447 * config/nds32/nds32.c (TARGET_BUILTIN_DECL): Define.
22448 (nds32_builtin_decl): New.
22449 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_COUNT.
22450 * config/nds32/nds32-protos.h (nds32_builtin_decl_impl): Declare.
22452 2018-03-02 Jeff Law <law@redhat.com>
22454 * reorg.c (stop_search_p): Handle DEBUG_INSN.
22455 (redundant_insn, fill_simple_delay_slots): Likewise.
22456 (fill_slots_from_thread): Likewise.
22457 * resource.c (mark_referenced_resources): Likewise.
22458 (mark_set_resources, find_dead_or_set_registers): Likewise.
22460 2018-03-02 Jakub Jelinek <jakub@redhat.com>
22462 * substring-locations.h (format_warning_va): Formatting fix for
22463 ATTRIBUTE_GCC_DIAG.
22464 (format_warning_at_substring): Fix up ATTRIBUTE_GCC_DIAG second
22466 (format_warning_n_va, format_warning_at_substring_n): New prototypes.
22467 * substring-locations.c: Include intl.h.
22468 (format_warning_va): Turned into small wrapper around
22469 format_warning_n_va, renamed to ...
22470 (format_warning_n_va): ... this, add N and PLURAL_GMSGID arguments,
22471 rename GMSGID to SINGULAR_GMSGID, if SINGULAR_GMSGID != PLURAL_GMSGID,
22473 (format_warning_at_substring_n): New function.
22474 * gimple-ssa-sprintf.c: Remove GCC diagnostic ignored pragma.
22475 (fmtwarn): Add ATTRIBUTE_GCC_DIAG. Turn into a copy of
22476 format_warning_at_substring with just a shorter name instead of
22477 const function pointer.
22478 (fmtwarn_n): New function.
22479 (maybe_warn, format_directive, parse_directive): Use fmtwarn_n where
22480 appropriate, get rid of all the fmtstr temporaries, move conditionals
22481 with G_() wrapped string literals directly into fmtwarn arguments,
22482 cast dir.len to (int), formatting fixes.
22484 2018-03-02 Thomas Schwinge <thomas@codesourcery.com>
22486 * doc/invoke.texi: Remove "Cilk Plus" references.
22488 2018-03-02 Jakub Jelinek <jakub@redhat.com>
22489 Richard Biener <rguenther@suse.de>
22492 * expr.c (expand_expr_real_1) <case CALL_EXPR>: Don't emit diagnostics
22493 for error or warning attributes if CALL_FROM_THUNK_P is set.
22496 2018-03-02 Jakub Jelinek <jakub@redhat.com>
22499 * config/pa/pa.h (TARGET_CPU_CPP_BUILTINS): Predefine
22500 __SIZEOF_128__ macro if HPUX_LONG_DOUBLE_LIBRARY.
22503 * config/ia64/ia64.h (TARGET_CPU_CPP_BUILTINS): Predefine
22504 __SIZEOF_{FPREG,FLOAT{80,128}}__ macros.
22506 * predict.c (test_prediction_value_range): Use PROB_UNINITIALIZED
22507 instead of -1U in last predictors element's probability member.
22509 2018-03-02 Eric Botcazou <ebotcazou@adacore.com>
22512 * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
22513 arguments if they are comparable.
22515 2018-03-02 Richard Sandiford <richard.sandiford@linaro.org>
22517 PR tree-optimization/84634
22518 * tree-vect-stmts.c (vectorizable_store, vectorizable_load): Replace
22519 masks and masked_loop_p with a single loop_masks, making sure it's
22520 null for bb vectorization.
22522 2018-03-02 Richard Sandiford <richard.sandiford@linaro.org>
22524 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
22525 (vect_analyze_data_ref_access): Use loop->safe_len rather than
22526 loop->force_vectorize to check whether there is no alias.
22528 2018-03-02 Jakub Jelinek <jakub@redhat.com>
22531 * rtl.h (prev_real_nondebug_insn, next_real_nondebug_insn): New
22533 * emit-rtl.c (next_real_insn, prev_real_insn): Fix up function
22535 (next_real_nondebug_insn, prev_real_nondebug_insn): New functions.
22536 * cfgcleanup.c (try_head_merge_bb): Use prev_real_nondebug_insn
22537 instead of a loop around prev_real_insn.
22538 * combine.c (move_deaths): Use prev_real_nondebug_insn instead of
22541 PR inline-asm/84625
22542 * config/i386/i386.c (ix86_print_operand): Use conditional
22543 output_operand_lossage instead of gcc_assert if CONST_VECTOR is not
22546 2018-03-02 Richard Biener <rguenther@suse.de>
22548 PR tree-optimization/84427
22549 * tree-ssa-pre.c (bitmap_remove_expr_from_set): Remove.
22550 (bitmap_set_subtract_values): Rewrite to handle multiple
22553 (prune_clobbered_mems): Likewise.
22554 (phi_translate): Take edge instead of pred/phiblock.
22555 (phi_translate_1): Likewise.
22556 (phi_translate_set): Likewise. Insert all translated
22557 exprs for a value into the set, keeping possibly multiple
22558 expressions per value.
22559 (compute_antic_aux): Adjust for phi_translate changes.
22560 When intersecting union the expressions and prune those
22561 not in the final value set, keeping possibly multiple
22562 expressions per value. Do not use value-insertion
22563 for unioning ANTIC_OUT U EXP_GEN - TMP_GEN but merge
22564 all expressions. Add verification that the value-sets
22565 only shrink during iteration.
22566 (compute_partial_antic_aux): Adjust for the phi_translate changes.
22567 (do_pre_regular_insertion): Likewise.
22568 (do_pre_partial_partial_insertion): Likewise.
22570 2018-03-02 Richard Biener <rguenther@suse.de>
22573 * config/darwin.c (saved_debug_info_level): New static global.
22574 (darwin_asm_lto_start): Disable debug info generation for LTO out.
22575 (darwin_asm_lto_end): Restore debug info generation settings.
22577 2018-03-01 Martin Liska <mliska@suse.cz>
22580 * sanopt.c (sanitize_rewrite_addressable_params): Do not handle
22581 volatile arguments.
22583 2018-03-01 Richard Biener <rguenther@suse.de>
22586 * dwarf2out.c (gen_variable_die): Properly handle late VLA
22587 type annotation with LTO when debug was disabled at compile-time.
22589 2018-03-01 Matthew Fortune <mfortune@gmail.com>
22591 * config/mips/mips.c (mips_final_prescan_insn): Fix incorrect
22593 (mips_final_postscan_insn): Likewise.
22595 2018-03-01 Richard Sandiford <richard.sandiford@linaro.org>
22597 PR rtl-optimization/84528
22598 * alias.c (init_alias_target): Add commentary.
22599 (init_alias_analysis): Only give HARD_FRAME_POINTER_REGNUM
22600 a unique base value if the frame pointer is not eliminated
22601 to the stack pointer.
22603 2018-03-01 Tom de Vries <tom@codesourcery.com>
22605 PR rtl-optimization/83327
22606 * lra-int.h (hard_regs_spilled_into): Declare.
22607 * lra.c (hard_regs_spilled_into): Define.
22608 (init_reg_info): Init hard_regs_spilled_into.
22609 * lra-spills.c (assign_spill_hard_regs): Update hard_regs_spilled_into.
22610 * lra-lives.c (make_hard_regno_born, make_hard_regno_dead)
22611 (process_bb_lives): Handle hard_regs_spilled_into.
22612 (lra_create_live_ranges_1): Before doing liveness propagation, clear
22613 regs in all_hard_regs_bitmap if set in hard_regs_spilled_into.
22615 2018-02-28 David Edelsohn <dje.gcc@gmail.com>
22617 * config.gcc (powerpc-ibm-aix7.1.*): New stanza.
22618 (powerpc-ibm-aix[789]*): Default to AIX 7.2.
22619 * config/rs6000/aix71.h (TARGET_DEFAULT): Revert to Power4 ISA.
22620 * config/rs6000/aix72.h: New file.
22622 2018-02-28 Jakub Jelinek <jakub@redhat.com>
22624 * gimple-ssa-warn-restrict.c (maybe_diag_overlap): Use warning_n
22625 instead of warning_at with conditional singular and plural messages
22629 * stor-layout.c (update_alignment_for_field): For
22630 targetm.ms_bitfield_layout_p (rli->t), if !is_bitfield
22631 && !DECL_PACKED (field), do the alignment update, just use
22632 only desired_align instead of MAX (type_align, desired_align)
22634 (place_field): Don't do known_align < desired_align handling
22635 early if targetm.ms_bitfield_layout_p (rli->t) and rli->prev_field
22636 is non-NULL, instead do it after rli->prev_field handling and
22637 only if not within a bitfield word. For DECL_PACKED (field)
22638 use type_align of BITS_PER_UNIT.
22640 2018-02-28 Eric Botcazou <ebotcazou@adacore.com>
22642 * config/aarch64/aarch64.c (aarch64_emit_probe_stack_range): Remove
22643 superfluous parentheses and trailing spaces.
22645 2018-02-28 Richard Biener <rguenther@suse.de>
22647 PR tree-optimization/84584
22648 * graphite-scop-detection.c (scop_detection::add_scop): Discard
22649 SCoPs with fake exit edge.
22651 2018-02-28 Martin Liska <mliska@suse.cz>
22654 * timevar.c (timer::print): Fix format to properly print 100%
22657 2018-02-28 Richard Biener <rguenther@suse.de>
22659 PR middle-end/84607
22660 * genmatch.c (capture_info::walk_match): Do not mark
22661 captured expressions without operands as expr_p given
22662 they act more like predicates and should be subject to
22663 "lost tail" side-effect preserving.
22665 2018-02-28 Alexandre Oliva <aoliva@redhat.com>
22667 PR rtl-optimization/81611
22668 * auto-inc-dec.c (attempt_change): Move dead note from
22669 mem_insn if it's the next use of regno
22670 (find_address): Take address use of reg holding
22671 non-incremented value. Add parm to limit search to the named
22673 (merge_in_block): Attempt to use a mem insn that is the next
22674 use of the original regno.
22676 2018-02-27 Martin Sebor <msebor@redhat.com>
22679 * doc/invoke.texi (-Wmissing-attributes): New option.
22680 * print-tree.c (print_node): Handle DECL_UNINLINABLE.
22682 2018-02-27 Martin Sebor <msebor@redhat.com>
22684 PR translation/84207
22685 * diagnostic-core.h (warning_n, error_n, inform_n): Change
22686 n argument to unsigned HOST_WIDE_INT.
22687 * diagnostic.c (warning_n, error_n, inform_n): Ditto.
22688 (diagnostic_n_impl): Ditto. Handle arguments in excess of LONG_MAX.
22689 * gimple-ssa-sprintf.c (format_directive): Simplify inform_n call.
22690 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Use warning_n.
22692 2018-02-27 Richard Biener <rguenther@suse.de>
22694 PR tree-optimization/84512
22695 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost):
22696 Do not use the estimate returned from record_stmt_cost for
22697 the scalar iteration cost but sum properly using add_stmt_cost.
22699 2018-02-27 Richard Biener <rguenther@suse.de>
22701 PR tree-optimization/84466
22702 * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
22703 Adjust last change to less strictly validate use operands.
22705 2018-02-27 Martin Liska <mliska@suse.cz>
22707 PR gcov-profile/84548
22708 * gcov.c (process_file): Allow partial overlap and consider it
22709 also as group functions.
22710 (output_lines): Properly calculate range of lines for a group.
22712 2018-02-27 Martin Liska <mliska@suse.cz>
22714 * timevar.c (timer::print_row): Remove 'usr', 'sys', 'wall' and
22715 'ggc' suffixes. Change first column width.
22716 (timer::print): Fix formatting of the column.
22718 2018-02-27 Alexandre Oliva <aoliva@redhat.com>
22720 * tree-ssa-live.c (remove_unused_scope_block_p): Do not
22721 preserve inline entry blocks for the sake of debug inline
22722 entry point markers alone.
22723 (remove_unused_locals): Suggest in comments a better place to
22724 force the preservation of inline entry blocks that are
22725 otherwise unused, but do not preserve them.
22727 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
22729 * config/i386/i386.c (ix86_output_indirect_jmp): Update comments.
22731 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
22734 * config/i386/constraints.md (Bs): Replace
22735 ix86_indirect_branch_register with
22736 TARGET_INDIRECT_BRANCH_REGISTER.
22738 * config/i386/i386.md (indirect_jump): Likewise.
22739 (tablejump): Likewise.
22740 (*sibcall_memory): Likewise.
22741 (*sibcall_value_memory): Likewise.
22742 Peepholes of indirect call and jump via memory: Likewise.
22743 (*sibcall_GOT_32): Disallowed for TARGET_INDIRECT_BRANCH_REGISTER.
22744 (*sibcall_value_GOT_32): Likewise.
22745 * config/i386/predicates.md (indirect_branch_operand): Likewise.
22746 (GOT_memory_operand): Likewise.
22747 (call_insn_operand): Likewise.
22748 (sibcall_insn_operand): Likewise.
22749 (GOT32_symbol_operand): Likewise.
22750 * config/i386/i386.h (TARGET_INDIRECT_BRANCH_REGISTER): New.
22752 2018-02-26 Eric Botcazou <ebotcazou@adacore.com>
22754 PR rtl-optimization/83496
22755 * reorg.c (steal_delay_list_from_target): Change REDUNDANT array from
22756 booleans to RTXes. Call fix_reg_dead_note on every non-null element.
22757 (steal_delay_list_from_fallthrough): Call fix_reg_dead_note on a
22758 redundant insn, if any.
22759 (relax_delay_slots): Likewise.
22760 (update_reg_unused_notes): Rename REDUNDANT_INSN to OTHER_INSN.
22762 2018-02-26 Richard Sandiford <richard.sandiford@linaro.org>
22764 PR tree-optimization/83965
22765 * tree-vect-patterns.c (vect_reassociating_reduction_p): Assume
22766 that grouped statements are part of a reduction chain. Return
22767 true if the statement is not marked as a reduction itself but
22768 is part of a group.
22769 (vect_recog_dot_prod_pattern): Don't check whether the statement
22770 is part of a group here.
22771 (vect_recog_sad_pattern): Likewise.
22772 (vect_recog_widen_sum_pattern): Likewise.
22774 2018-02-26 Eric Botcazou <ebotcazou@adacore.com>
22777 * final.c (rest_of_clean_state): Also look for calls inside sequences.
22779 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
22782 * config/i386/i386-protos.h (ix86_output_indirect_jmp): Remove
22784 (ix86_output_indirect_function_return): New prototype.
22785 (ix86_split_simple_return_pop_internal): Likewise.
22786 * config/i386/i386.c (indirect_return_via_cx): New.
22787 (indirect_return_via_cx_bnd): Likewise.
22788 (indirect_thunk_name): Handle return va CX_REG.
22789 (output_indirect_thunk_function): Create alias for
22790 __x86_return_thunk_[re]cx and __x86_return_thunk_[re]cx_bnd.
22791 (ix86_output_indirect_jmp): Remove the bool argument.
22792 (ix86_output_indirect_function_return): New function.
22793 (ix86_split_simple_return_pop_internal): Likewise.
22794 * config/i386/i386.md (*indirect_jump): Don't pass false
22795 to ix86_output_indirect_jmp.
22796 (*tablejump_1): Likewise.
22797 (simple_return_pop_internal): Change it to define_insn_and_split.
22798 Call ix86_split_simple_return_pop_internal to split it for
22799 -mfunction-return=.
22800 (simple_return_indirect_internal): Call
22801 ix86_output_indirect_function_return instead of
22802 ix86_output_indirect_jmp.
22804 2018-02-26 Jakub Jelinek <jakub@redhat.com>
22807 * vec.h (vec_default_construct): For BROKEN_VALUE_INITIALIZATION use
22808 memset and value initialization afterwards.
22810 2018-02-26 Christophe Lyon <christophe.lyon@linaro.org>
22812 * Makefile.in (lto-wrapper): Use ALL_LINKERFLAGS.
22814 2018-02-26 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
22817 * common/config/aarch64/aarch64-common.c
22818 (aarch_option_optimization_table[]): Switch
22819 off fomit-frame-pointer
22821 2018-02-26 Kito Cheng <kito.cheng@gmail.com>
22822 Chung-Ju Wu <jasonwucj@gmail.com>
22824 * config/nds32/nds32-multiple.md (load_multiple): Disallow
22826 (store_multiple): Ditto.
22828 2018-02-26 Kito Cheng <kito.cheng@gmail.com>
22830 * config.gcc: Add --with-cpu support for nds32 target.
22831 * config/nds32/nds32-opts.h (nds32_cpu_type): New.
22832 * config/nds32/nds32.opt: Add -mcpu= option.
22834 2018-02-25 Segher Boessenkool <segher@kernel.crashing.org>
22836 * config/rs6000/rs6000.opt (mvrsave=no, mvrsave=yes, isel=no,
22837 isel=yes): Warn for these deprecated options.
22839 2018-02-23 David Edelsohn <dje.gcc@gmail.com>
22841 * config/rs6000/aix71.h (TARGET_DEFAULT): Change to
22842 ISA_2_5_MASKS_EMBEDDED.
22844 2018-02-23 Jakub Jelinek <jakub@redhat.com>
22846 * ipa-prop.c (ipa_vr_ggc_hash_traits::hash): Hash p->min and
22847 p->max as pointers rather than using iterative_hash_expr.
22849 2018-02-23 Carl Love <cel@us.ibm.com>
22851 * config/rs6000/rs6000-builtin.def: Change VSIGNED2 and VUNSIGNED2
22852 macro expansions from BU_VSX_2 to BU_P8V_VSX_2 and BU_VSX_OVERLOAD_2 to
22854 * config/rs6000/rs6000-c.c: Change VSX_BUILTIN_VEC_VSIGNED2 to
22855 P8V_BUILTIN_VEC_VSIGNED2. Change VSX_BUILTIN_VEC_VUNSIGNED2 to
22856 P8V_BUILTIN_VEC_VUNSIGNED2.
22858 2018-02-22 Vladimir Makarov <vmakarov@redhat.com>
22861 * lra-int.h (LRA_UNKNOWN_ALT, LRA_NON_CLOBBERED_ALT): New macros.
22862 * lra.c (lra_set_insn_recog_data, lra_update_insn_recog_data): Use
22864 * lra-constraints.c (curr_insn_transform): Set up
22865 LRA_NON_CLOBBERED_ALT for moves processed on the fast path. Use
22867 (remove_inheritance_pseudos): Use LRA_UNKNOWN_ALT.
22868 * lra-eliminations.c (spill_pseudos): Ditto.
22869 (process_insn_for_elimination): Ditto.
22870 * lra-lives.c (reg_early_clobber_p): Use the new macros.
22871 * lra-spills.c (spill_pseudos): Use LRA_UNKNOWN_ALT and
22872 LRA_NON_CLOBBERED_ALT.
22874 2018-02-22 Martin Sebor <msebor@redhat.com>
22876 PR tree-optimization/84480
22877 * gimple-fold.c (gimple_fold_builtin_strcpy): Move warnings
22878 to maybe_diag_stxncpy_trunc. Call it.
22879 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Integrate warnings
22880 from gimple_fold_builtin_strcpy. Print inlining stack.
22881 (handle_builtin_stxncpy): Print inlining stack.
22882 * tree-ssa-strlen.h (maybe_diag_stxncpy_trunc): Declare.
22884 2018-02-22 H.J. Lu <hongjiu.lu@intel.com>
22887 * config/i386/i386.c (ix86_set_indirect_branch_type): Issue an
22888 error when -mindirect-branch=thunk-extern, -fcf-protection=branch
22889 and -fcheck-pointer-bounds are used together.
22890 (indirect_thunk_prefix): New enum.
22891 (indirect_thunk_need_prefix): New function.
22892 (indirect_thunk_name): Replace need_bnd_p with need_prefix. Use
22893 "_nt" instead of "_bnd" for NOTRACK prefix.
22894 (output_indirect_thunk): Replace need_bnd_p with need_prefix.
22895 (output_indirect_thunk_function): Likewise.
22897 (ix86_code_end): Update output_indirect_thunk_function calls.
22898 (ix86_output_indirect_branch_via_reg): Replace
22899 ix86_bnd_prefixed_insn_p with indirect_thunk_need_prefix.
22900 (ix86_output_indirect_branch_via_push): Likewise.
22901 (ix86_output_function_return): Likewise.
22902 * doc/invoke.texi: Document -mindirect-branch=thunk-extern is
22903 incompatible with -fcf-protection=branch and
22904 -fcheck-pointer-bounds.
22906 2018-02-22 Steve Ellcey <sellcey@cavium.com>
22909 * config/aarch64/aarch64.c (aarch64_print_address_internal):
22910 Change gcc_assert call to output_operand_lossage.
22912 2018-02-22 Steve Ellcey <sellcey@cavium.com>
22914 * doc/extend.texi (__builtin_extend_pointer): Document builtin.
22916 2018-02-22 DJ Delorie <dj@redhat.com>
22917 Sebastian Perta <sebastian.perta@renesas.com>
22918 Oleg Endo <olegendo@gcc.gnu.org>
22920 * config/rx/rx.c (rx_rtx_costs): New function.
22921 (TARGET_RTX_COSTS): Override to use rx_rtx_costs.
22923 2018-02-22 Thomas Preud'homme <thomas.preudhomme@arm.com>
22925 * config/arm/t-multilib: Map Armv8-R to Armv7 multilibs.
22927 2018-02-22 Martin Liska <mliska@suse.cz>
22930 * common/config/arm/arm-common.c (arm_print_hint_for_cpu_option):
22931 Add "native" as a possible value.
22933 2018-02-22 Martin Liska <mliska@suse.cz>
22936 * config/i386/i386.c (ix86_option_override_internal):
22937 Add "native" as a possible value for -march and -mtune.
22939 2018-02-22 Jakub Jelinek <jakub@redhat.com>
22942 * stor-layout.c (finalize_type_size): Propagate TYPE_EMPTY_P flag
22943 to all type variants.
22945 PR tree-optimization/84503
22946 * gimple-ssa-store-merging.c (merged_store_group::merge_into): Compute
22947 width as info->bitpos + info->bitsize - start.
22948 (merged_store_group::merge_overlapping): Simplify width computation.
22949 (check_no_overlap): New function.
22950 (imm_store_chain_info::try_coalesce_bswap): Compute expected
22951 start + width and last_order of the group, fail if check_no_overlap
22953 (imm_store_chain_info::coalesce_immediate_stores): Don't merge info
22954 to group if check_no_overlap fails.
22956 2018-02-21 Segher Boessenkool <segher@kernel.crashing.org>
22958 * config/rs6000/altivec.md: Delete contraint arguments to
22959 define_expand, define_split, and define_peephole2, and in
22960 define_insn_and_split if always unused.
22961 * config/rs6000/darwin.md: Ditto.
22962 * config/rs6000/dfp.md: Ditto.
22963 * config/rs6000/rs6000.md: Ditto.
22964 * config/rs6000/sync.md: Ditto.
22965 * config/rs6000/vector.md: Ditto.
22966 * config/rs6000/vsx.md: Ditto.
22968 2018-02-21 Segher Boessenkool <segher@kernel.crashing.org>
22970 * config/rs6000/altivec.md: Write output control strings as braced
22971 blocks instead of double-quoted strings.
22972 * config/rs6000/darwin.md: Ditto.
22973 * config/rs6000/rs6000.md: Ditto.
22974 * config/rs6000/vector.md: Ditto.
22975 * config/rs6000/vsx.md: Ditto.
22977 2018-02-21 Jason Merrill <jason@redhat.com>
22979 PR c++/84314 - ICE with templates and fastcall attribute.
22980 * attribs.c (build_type_attribute_qual_variant): Remove assert.
22982 2018-02-21 Jan Hubicka <hubicka@ucw.cz>
22984 * ipa-cp.c (determine_versionability): Fix comment typos.
22986 2018-02-21 Jan Hubicka <hubicka@ucw.cz>
22989 * ipa-cp.c (determine_versionability): Do not version functions caling
22992 2018-02-21 Martin Liska <mliska@suse.cz>
22995 * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch):
22996 Add "native" as a possible value.
22997 * config/aarch64/aarch64.h (HAVE_LOCAL_CPU_DETECT): Define
22998 the macro when native cpu detection is available.
23000 2018-02-21 Martin Liska <mliska@suse.cz>
23003 * common/config/arm/arm-common.c (arm_print_hint_for_arch_option):
23004 Add "native" as a possible value.
23005 * config/arm/arm.h (HAVE_LOCAL_CPU_DETECT): Define the macro
23006 when native cpu detection is available.
23008 2018-02-21 Jakub Jelinek <jakub@redhat.com>
23009 Martin Sebor <msebor@redhat.com>
23011 PR tree-optimization/84478
23012 * gimple-fold.h (get_range_strlen): Add a bool argument defaulted to
23014 * gimple-fold.c (get_range_strlen): Make minlen const and assume it
23015 can't be NULL. Change FUZZY from bool to int, for 1 add PHI/COND_EXPR
23016 support which is conservatively correct, for 2 only stay conservative
23017 for maxlen. Formatting and comment capitalization fixes. Add STRICT
23018 argument to the 2 argument get_range_strlen, adjust 6 arg
23019 get_range_strlen caller and clear minmaxlen[0] and [1] if it returned
23021 (get_maxval_strlen): Adjust 6 arg get_range_strlen caller.
23022 (gimple_fold_builtin_strlen): Pass true as last argument to
23025 2018-02-20 Martin Sebor <msebor@redhat.com>
23027 PR middle-end/84095
23028 * gimple-ssa-warn-restrict.c (builtin_memref::extend_offset_range): New.
23029 (builtin_memref::set_base_and_offset): Same. Handle inner references.
23030 (builtin_memref::builtin_memref): Factor out parts into
23031 set_base_and_offset and call it.
23033 2018-02-20 Richard Sandiford <richard.sandiford@linaro.org>
23035 PR middle-end/84406
23036 * optabs-query.c (find_widening_optab_handler_and_mode): If from_mode
23037 is a scalar_int_mode, assert that to_mode is a scalar_int_mode with
23038 greater precision. If to_mode is a MODE_PARTIAL_INT, stop the
23039 search at the associated MODE_INT.
23041 2018-02-20 Jeff Law <law@redhat.com>
23043 PR middle-end/82123
23044 PR tree-optimization/81592
23045 PR middle-end/79257
23046 * gimple-ssa-sprintf.c (format_integer): Query EVRP range analyzer
23047 for range data rather than using global data.
23048 * gimple-ssa-sprintf.c (get_int_range): Query EVRP range analyzer for
23049 range data rather than using global data.
23050 * gimple-ssa-sprintf.c (get_int_range): Accept vr_values parameter
23051 pass it to children as needed.
23052 (struct directive::fmtresult): Similarly.
23053 (struct directive::set_width): Similarly.
23054 (struct directive::set_precision): Similarly.
23055 (format_integer, format_directive, parse_directive): Similarly.
23056 (format_none): Accept unnamed vr_values parameter.
23057 (format_percent, format_floating, format_character): Similarly.
23058 (format_string, format_plain): Similarly.
23059 * gimple-ssa-sprintf.c (sprintf_dom_walker::handle_gimple_call): Query
23060 the EVRP range analyzer for range data rather than using global data.
23061 * gimple-ssa-sprintf.c: Include alloc-pool.h, vr-values.h and
23062 gimple-ssa-evrp-analyze.h
23063 (class sprintf_dom_walker): Add after_dom_children member function.
23064 Add evrp_range_analyzer member.
23065 (sprintf_dom_walker::before_dom_children): Call into the EVRP
23066 range analyzer as needed.
23067 (sprintf_dom_walker::after_dom_children): New member function.
23068 * gimple-ssa-evrp-analyze.c (evrp_range_analyzer::enter): Do nothing
23070 (evrp_range_analyzer::record_ranges_from_stmt): Likewise.
23071 (evrp_range_analyzer::pop_to_marker): Likewise.
23073 2018-02-20 Richard Sandiford <richard.sandiford@linaro.org>
23075 PR tree-optimization/84419
23076 * internal-fn.c (expand_call_mem_ref): Create a TARGET_MEM_REF
23077 with the required type if its current type is compatible but
23080 2018-02-20 Jakub Jelinek <jakub@redhat.com>
23082 PR middle-end/82004
23083 * match.pd (pow(C,x) -> exp(log(C)*x)): Delay all folding until
23084 after vectorization.
23086 2018-02-20 Martin Liska <mliska@suse.cz>
23089 * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch): Print
23090 possible values if we don't have a hint.
23092 2018-02-20 Martin Liska <mliska@suse.cz>
23096 * final.c (shorten_branches): Build align_tab array with one
23098 * opts.c (finish_options): Add alignment option limit check.
23099 (MAX_CODE_ALIGN): Likewise.
23100 (MAX_CODE_ALIGN_VALUE): Likewise.
23101 * doc/invoke.texi: Document maximum allowed option value for
23102 all -falign-* options.
23104 2018-02-19 Jakub Jelinek <jakub@redhat.com>
23107 * reg-notes.def (REG_CALL_ARG_LOCATION): New reg note.
23108 * insn-notes.def (NOTE_INSN_CALL_ARG_LOCATION): Remove.
23109 * var-tracking.c (emit_note_insn_var_location): Remove all references
23110 to NOTE_INSN_CALL_ARG_LOCATION.
23111 (emit_notes_in_bb): Emit arguments as REG_CALL_ARG_LOCATION note on
23112 the CALL_INSN rather than separate NOTE_INSN_CALL_ARG_LOCATION note.
23113 Use copy_rtx_if_shared.
23114 * dwarf2out.c (gen_subprogram_die): Use XEXP with 0 instead of
23115 NOTE_VAR_LOCATION on ca_loc->call_arg_loc_note.
23116 (dwarf2out_var_location): Remove handling of
23117 NOTE_INSN_CALL_ARG_LOCATION, instead handle REG_CALL_ARG_LOCATION note
23119 * final.c (final_scan_insn): Remove all references to
23120 NOTE_INSN_CALL_ARG_LOCATION.
23121 (rest_of_clean_state): Likewise. Remove REG_CALL_ARG_LOCATION notes
23122 before dumping final insns.
23123 * except.c (emit_note_eh_region_end): Remove all references to
23124 NOTE_INSN_CALL_ARG_LOCATION.
23125 * config/alpha/alpha.c (alpha_pad_function_end): Likewise.
23126 * config/c6x/c6x.c (c6x_gen_bundles): Likewise.
23127 * config/arc/arc.c (hwloop_optimize): Likewise.
23128 * config/arm/arm.c (create_fix_barrier): Likewise.
23129 * config/s390/s390.c (s390_chunkify_start): Likewise.
23130 * config/sh/sh.c (find_barrier): Likewise.
23131 * config/i386/i386.c (rest_of_insert_endbranch,
23132 ix86_seh_fixup_eh_fallthru): Likewise.
23133 * config/xtensa/xtensa.c (hwloop_optimize): Likewise.
23134 * config/iq2000/iq2000.c (final_prescan_insn): Likewise.
23135 * config/frv/frv.c (frv_function_prologue): Likewise.
23136 * emit-rtl.c (try_split): Likewise. Copy over REG_CALL_ARG_LOCATION
23138 (note_outside_basic_block_p): Remove all references to
23139 NOTE_INSN_CALL_ARG_LOCATION.
23140 * gengtype.c (adjust_field_rtx_def): Likewise.
23141 * print-rtl.c (rtx_writer::print_rtx_operand_code_0, print_insn):
23143 * jump.c (cleanup_barriers, delete_related_insns): Likewise.
23144 * cfgrtl.c (force_nonfallthru_and_redirect): Likewise.
23147 * builtins.c (builtin_mathfn_code): Don't check if CALL_EXPR_FN (t)
23150 PR tree-optimization/84452
23151 * tree-vect-patterns.c (vect_recog_pow_pattern): Don't call
23152 expand_simd_clones if targetm.simd_clone.compute_vecsize_and_simdlen
23155 2018-02-19 Martin Liska <mliska@suse.cz>
23158 * passes.def: Put pass_sancov_O0 before pass_lower_switch with -O0.
23160 2018-02-19 Martin Liska <mliska@suse.cz>
23161 Richard Sandiford <richard.sandiford@linaro.org>
23163 PR tree-optimization/82491
23164 * gimple-fold.c (get_base_constructor): Make earlier bail out
23167 2018-02-19 Carl Love <cel@us.ibm.com>
23169 * config/rs6000/rs6000-builtin.def: Change NEG macro expansions from
23170 BU_ALTIVEC_A to BU_P8V_AV_1 and BU_ALTIVEC_OVERLOAD_1 to
23172 * config/rs6000/rs6000-c.c: Change ALTIVEC_BUILTIN_VEC_NEG to
23173 P8V_BUILTIN_VEC_NEG.
23175 2018-02-19 Sebastian Perta <sebastian.perta@renesas.com>
23177 * config/rl78/rl78.md (movdf): New define expand.
23179 2018-02-19 Martin Liska <mliska@suse.cz>
23182 * doc/invoke.texi: Fix typo.
23183 * params.def (PARAM_MAX_LOOP_HEADER_INSNS): Likewise.
23185 2018-02-18 Segher Boessenkool <segher@kernel.crashing.org>
23187 * config/rs6000/rs6000.c (rs6000_option_override_internal): Don't
23188 handle rs6000_single_float and rs6000_double_float specially for
23191 2018-02-16 Jeff Law <law@redhat.com>
23193 * config/rx/rx.c (add_pop_cfi_notes): New function.;
23194 (pop_regs): Use it.
23196 2018-02-16 Jakub Jelinek <jakub@redhat.com>
23199 * ipa-inline.c (inline_small_functions): Fix a typo.
23201 2018-02-16 Nathan Sidwell <nathan@acm.org>
23203 * doc/extend.texi (Backwards Compatibility): Americanize 'behaviour'.
23205 2018-02-16 Carl Love <cel@us.ibm.com>
23207 * config/rs6000/rs6000-builtin.def: Add BU_P8V_VSX_2 macro definition.
23208 Change FLOAT2 expansions from BU_VSX_2 to BU_P8V_VSX_2 and
23209 from BU_VSX_OVERLOAD_2 to BU_P8V_OVERLOAD_2.
23210 * config/rs6000/rs6000-c.c: Changed macro VSX_BUILTIN_VEC_FLOAT2
23211 expansion to P8V_BUILTIN_VEC_FLOAT2.
23213 2018-02-16 Vladimir Makarov <vmakarov@redhat.com>
23215 PR rtl-optimization/70023
23216 * lra-constraints.c (inherit_in_ebb): Take hard reg mode of
23217 src_regno into account.
23219 2018-02-16 Carl Love <cel@us.ibm.com>
23221 * config/rs6000/altivec.h: Remove vec_vextract4b and vec_vinsert4b.
23222 * config/rs6000/rs6000-builtin.def: Remove macro expansion for
23223 VEXTRACT4B, VINSERT4B, VINSERT4B_DI and VEXTRACT4B.
23224 * config/rs6000/rs6000.c: Remove case statements for
23225 P9V_BUILTIN_VEXTRACT4B, P9V_BUILTIN_VEC_VEXTRACT4B,
23226 P9V_BUILTIN_VINSERT4B, P9V_BUILTIN_VINSERT4B_DI,
23227 and P9V_BUILTIN_VEC_VINSERT4B.
23228 * config/rs6000/rs6000-c.c (altivec_expand_builtin): Remove entries for
23229 P9V_BUILTIN_VEC_VEXTRACT4B and P9V_BUILTIN_VEC_VINSERT4B.
23230 * config/rs6000/vsx.md:
23231 * doc/extend.texi: Remove vec_vextract4b, non ABI definitions for
23234 2018-02-16 Carl Love <cel@us.ibm.com>
23236 * config/rs6000/altivec.h: Add builtin names vec_extract4b
23238 * config/rs6000/rs6000-builtin.def: Add INSERT4B and EXTRACT4B
23240 * config/rs6000/rs6000-c.c: Add the definitions for
23241 P9V_BUILTIN_VEC_EXTRACT4B and P9V_BUILTIN_VEC_INSERT4B.
23242 * config/rs6000/rs6000.c (altivec_expand_builtin): Add
23243 P9V_BUILTIN_EXTRACT4B and P9V_BUILTIN_INSERT4B case statements.
23244 * config/rs6000/vsx.md: Add define_insn extract4b. Add define_expand
23245 definition for insert4b and define insn *insert3b_internal.
23246 * doc/extend.texi: Add documentation for vec_extract4b.
23248 2018-02-16 Nathan Sidwell <nathan@acm.org>
23250 * doc/extend.texi (Backwards Compatibility): Mention friend
23251 injection. Note for-scope is deprecated.
23252 * doc/invoke.texi (-ffriend-injection): Deprecate.
23254 2018-02-16 Segher Boessenkool <segher@kernel.crashing.org>
23256 * combine.c (try_combine): When adjusting LOG_LINKS for the destination
23257 that moved to I2, also allow destinations that are a paradoxical
23258 subreg (instead of a normal reg).
23260 2018-02-16 Oleg Endo <olegendo@gcc.gnu.org>
23263 * config/rx/rx.c (rx_fuse_in_memory_bitop): Convert shift operand
23266 2018-02-16 Richard Biener <rguenther@suse.de>
23268 PR tree-optimization/84037
23269 PR tree-optimization/84016
23271 * config/i386/i386.c (ix86_builtin_vectorization_cost):
23272 Adjust vec_construct for the fact we need additional higher latency
23273 128bit inserts for AVX256 and AVX512 vector builds.
23274 (ix86_add_stmt_cost): Scale vector construction cost for
23277 2018-02-16 Richard Biener <rguenther@suse.de>
23279 PR tree-optimization/84417
23280 * tree-ssa.c (non_rewritable_mem_ref_base): Properly constrain
23281 the MEM_REF offset when conversion to BIT_FIELD_REF is desired.
23282 (non_rewritable_lvalue_p): Likewise, use poly-ints.
23284 2018-02-16 Martin Liska <mliska@suse.cz>
23287 * internal-fn.def (ASAN_CHECK): Set proper flags.
23288 (ASAN_MARK): Likewise.
23290 2018-02-16 Julia Koval <julia.koval@intel.com>
23292 * config/i386/i386.c (ix86_option_override_internal): Remove PTA_CLWB
23293 from PTA_CANNONLAKE.
23295 2018-02-16 Jakub Jelinek <jakub@redhat.com>
23298 * config/aarch64/cortex-a57-fma-steering.c (fma_forest::merge_forest):
23299 Use ++iter rather than iter++ for std::list iterators.
23300 (func_fma_steering::dfs): Likewise. Don't delete nodes right away,
23301 defer deleting them until all nodes in the forest are processed. Do
23302 free even leaf nodes. Change to_process into auto_vec.
23305 * system.h (BROKEN_VALUE_INITIALIZATION): Define for GCC < 4.3.
23306 * vec.h (vec_default_construct): Use memset instead of placement new
23307 if BROKEN_VALUE_INITIALIZATION is defined.
23308 * hash-table.h (hash_table<Descriptor, Allocator>::empty_slow): Use
23309 memset instead of value initialization if BROKEN_VALUE_INITIALIZATION
23312 PR rtl-optimization/83723
23313 * lra-int.h (lra_substitute_pseudo): Add DEBUG_P argument.
23314 * lra.c (lra_substitute_pseudo): Likewise. If true, use
23315 gen_rtx_raw_SUBREG instead of gen_rtx_SUBREG. Pass DEBUG_P to
23317 (lra_substitute_pseudo_within_insn): Adjust lra_substitute_pseudo
23319 * lra-constraints.c (inherit_reload_reg, split_reg): Likewise.
23321 2018-02-16 Eric Botcazou <ebotcazou@adacore.com>
23323 PR rtl-optimization/81443
23324 * rtlanal.c (num_sign_bit_copies1) <SUBREG>: Do not propagate results
23325 from inner REGs to paradoxical SUBREGs.
23327 2018-02-16 Richard Biener <rguenther@suse.de>
23329 PR tree-optimization/84399
23330 * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
23331 For operands we can analyze at their definition make sure we can
23332 analyze them at each use as well.
23334 2018-02-16 Richard Biener <rguenther@suse.de>
23336 PR tree-optimization/84190
23337 * tree-ssa.c (non_rewritable_mem_ref_base): Do not touch
23338 volatile accesses if the decl isn't volatile.
23340 2018-02-15 Jason Merrill <jason@redhat.com>
23342 PR c++/84314 - ICE with templates and fastcall attribute.
23343 * attribs.c (build_type_attribute_qual_variant): Don't clobber
23344 TYPE_CANONICAL on an existing type.
23346 2018-02-15 Jakub Jelinek <jakub@redhat.com>
23348 PR tree-optimization/84383
23349 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Don't look at
23350 dstoff nor call operand_equal_p if dstbase is NULL.
23352 PR tree-optimization/84334
23353 * match.pd ((A +- CST1) +- CST2 -> A + CST3): If A is
23354 also a CONSTANT_CLASS_P, punt.
23356 2018-02-14 Jim Wilson <jimw@sifive.com>
23358 * config/riscv/riscv.c (riscv_first_stack_step): Move locals after
23359 first SMALL_OPERAND check. New local min_second_step. Move assert
23360 to where locals are set. Add TARGET_RVC support.
23361 * config/riscv/riscv.h (C_SxSP_BITS, SWSP_REACH, SDSP_REACH): New.
23363 2018-02-14 Indu Bhagat <indu.bhagat@oracle.com>
23365 * doc/invoke.texi: Correct -Wformat-overflow code sample.
23367 2018-02-14 Martin Sebor <msebor@redhat.com>
23369 PR tree-optimization/83698
23370 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For
23371 arrays constrain the offset range to their bounds.
23372 (builtin_access::strcat_overlap): Adjust the bounds of overlap offset.
23373 (builtin_access::overlap): Avoid setting the size of overlap if it's
23375 (maybe_diag_overlap): Also consider arrays when deciding what values
23376 of offsets to include in diagnostics.
23378 2018-02-14 Martin Sebor <msebor@redhat.com>
23381 * attribs.c (diag_attr_exclusions): Consider the exclusion(s)
23382 that correspond to the kind of a declaration.
23384 2018-02-14 John David Anglin <danglin@gcc.gnu.org>
23387 * config/pa/pa.md: Load address of PIC label using the linkage table
23388 if the label is nonlocal.
23390 2018-02-14 Kelvin Nilsen <kelvin@gcc.gnu.org>
23392 * config/rs6000/rs6000.c (rs6000_option_override_internal): Issue
23393 warning message if user requests -maltivec=be.
23394 * doc/invoke.texi: Document deprecation of -maltivec=be.
23396 2018-02-14 Will Schmidt <will_schmidt@vnet.ibm.com>
23399 * config/rs6000/rs6000-c.c: Update definitions for
23400 ALTIVEC_BUILTIN_VEC_SLD, ALTIVEC_BUILTIN_VEC_SLDW,
23401 VEC_XXSLDWI and ALTIVEC_BUILTIN_VEC_XXPERMDI builtins.
23403 2018-02-14 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
23406 * config/i386/cetintrin.h: Remove _rdssp[d|q] and
23407 add _get_ssp intrinsics. Remove argument from
23408 __builtin_ia32_rdssp[d|q].
23409 * config/i386/i386-builtin-types.def: Add UINT_FTYPE_VOID.
23410 * config/i386/i386-builtin.def: Remove argument from
23411 __builtin_ia32_rdssp[d|q].
23412 * config/i386/i386.c: Use UINT_FTYPE_VOID. Use
23413 ix86_expand_special_args_builtin for _rdssp[d|q].
23414 * config/i386/i386.md: Remove argument from rdssp[si|di] insn.
23415 Clear register before usage.
23416 * doc/extend.texi: Remove argument from __builtin_ia32_rdssp[d|q].
23417 Add documentation for new _get_ssp and _inc_ssp intrinsics.
23419 2018-02-14 Richard Sandiford <richard.sandiford@linaro.org>
23421 PR tree-optimization/84357
23422 * tree-data-ref.c (object_address_invariant_in_loop_p): Check
23423 operand 1 of an ARRAY_REF too.
23425 2018-02-14 Oleg Endo <olegendo@gcc.gnu.org>
23428 * config/rx/rx-protos.h (rx_reg_dead_or_unused_after_insn,
23429 rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
23431 (set_of_reg): New struct.
23432 (rx_find_set_of_reg, rx_find_use_of_reg): New functions.
23433 * config/rx/rx.c (rx_reg_dead_or_unused_after_insn,
23434 rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
23436 * config/rx/rx.md (andsi3, iorsi3, xorsi3): Convert to insn_and_split.
23437 Split into bitclr, bitset, bitinvert patterns if appropriate.
23438 (*bitset, *bitinvert, *bitclr): Convert to named insn_and_split and
23439 use rx_fuse_in_memory_bitop.
23440 (*bitset_in_memory, *bitinvert_in_memory, *bitclr_in_memory): Convert
23441 to named insn, correct maximum insn length.
23443 2018-02-14 Jozef Lawrynowicz <jozefl.gcc@gmail.com>
23446 * machmode.def: Define a complex mode for PARTIAL_INT.
23447 * genmodes.c (complex_class): Return MODE_COMPLEX_INT for
23449 * doc/rtl.texi: Document CSPImode.
23450 * config/msp430/msp430.c (msp430_hard_regno_nregs): Add CPSImode
23452 (msp430_hard_regno_nregs_with_padding): Likewise.
23454 2018-02-13 Peter Bergner <bergner@vnet.ibm.com>
23457 * config/rs6000/rs6000.c (mem_operand_gpr): Disallow altivec addresses.
23459 2018-02-13 Segher Boessenkool <segher@kernel.crashing.org>
23461 PR rtl-optimization/84169
23462 * combine.c (try_combine): New variable split_i2i3. Set it to true if
23463 we generated a parallel as new i3 and we split that to new i2 and i3
23464 instructions. Handle split_i2i3 similar to swap_i2i3: scan the
23465 LOG_LINKs of i3 to see which of those need to link to i2 now. Link
23466 those to i2, not i1. Partially rewrite this scan code.
23468 2018-02-13 Jakub Jelinek <jakub@redhat.com>
23471 * stor-layout.c (place_field): For variable length fields, adjust
23472 offset_align afterwards not just based on the field's alignment,
23473 but also on the size.
23475 PR middle-end/84309
23476 * match.pd (pow(C,x) -> exp(log(C)*x)): Use exp2s and log2s instead
23477 of exps and logs in the use_exp2 case.
23479 2018-02-13 Jeff Law <law@redhat.com>
23481 * config/rl/rl78.c (rl78_attribute_table): Fix terminator and
23482 entry for "vector".
23484 * config/rl78/rl78.c (rl78_handle_func_attribute): Mark
23487 2018-02-13 Alexandre Oliva <aoliva@redhat.com>
23491 * common.opt (gas-loc-support, gas-locview-support): New.
23492 (ginline-points, ginternal-reset-location-views): New.
23493 * doc/invoke.texi: Document them. Use @itemx where intended.
23494 (gvariable-location-views): Adjust.
23495 * target.def (reset_location_view): New.
23496 * doc/tm.texi.in (DWARF2_ASM_VIEW_DEBUG_INFO): New.
23497 (TARGET_RESET_LOCATION_VIEW): New.
23498 * doc/tm.texi: Rebuilt.
23499 * dwarf2out.c (dwarf2out_default_as_loc_support): New.
23500 (dwarf2out_default_as_locview_support): New.
23501 (output_asm_line_debug_info): Use option variables.
23502 (dwarf2out_maybe_output_loclist_view_pair): Likewise.
23503 (output_loc_list): Likewise.
23504 (add_high_low_attributes): Check option variables.
23505 Don't output entry view attribute in strict mode.
23506 (gen_inlined_subroutine_die): Check option variables.
23507 (dwarf2out_inline_entry): Likewise.
23508 (init_sections_and_labels): Likewise.
23509 (dwarf2out_early_finish): Likewise.
23510 (maybe_reset_location_view): New, from...
23511 (dwarf2out_var_location): ... here. Call it.
23512 * debug.h (dwarf2out_default_as_loc_support): Declare.
23513 (dwarf2out_default_as_locview_support): Declare.
23514 * hooks.c (hook_int_rtx_insn_0): New.
23515 * hooks.h (hook_int_rtx_insn_0): Declare.
23516 * toplev.c (process_options): Take -gas-loc-support and
23517 -gas-locview-support from dwarf2out. Enable
23518 -gvariable-location-views by default only with locview
23519 assembler support. Enable -ginternal-reset-location-views by
23520 default only if the target defines the corresponding hook.
23521 Enable -ginline-points by default if location views are
23522 enabled; force it disabled if statement frontiers are
23524 * tree-inline.c (expand_call_inline): Check option variables.
23525 * tree-ssa-live.c (remove_unused_scope_block_p): Likewise.
23527 2018-02-13 Richard Sandiford <richard.sandiford@linaro.org>
23529 PR tree-optimization/84321
23530 * tree-vrp.c (intersect_range_with_nonzero_bits): Fix VR_ANTI_RANGE
23531 handling. Also check whether the anti-range contains any values
23532 that satisfy the mask; switch to a VR_RANGE if not.
23534 2018-02-13 Paolo Bonzini <bonzini@gnu.org>
23537 * internal-fn.def (ASAN_CHECK, ASAN_MARK): Revert changes to fnspec.
23539 2018-02-13 Martin Jambor <mjambor@suse.cz>
23542 * ipa-param-manipulation.c (ipa_modify_call_arguments): Use location
23543 of call statements, also set location of a load to a temporary.
23545 2018-02-13 Sebastian Perta <sebastian.perta@renesas.com>
23547 * config/rl78/rl78.c (add_vector_labels): New function.
23548 * config/rl78/rl78.c (rl78_handle_vector_attribute): New function.
23549 * config/rl78/rl78.c (rl78_start_function): Call add_vector_labels.
23550 * config/rl78/rl78.c (rl78_handle_func_attribute): Removed the assert
23551 which checks that no arguments are passed.
23552 * config/rl78/rl78.c (rl78_attribute_table): Add "vector" attribute.
23553 * doc/extend.texi: Documentation for the new attribute.
23555 2018-02-13 Andreas Schwab <schwab@suse.de>
23557 * config/riscv/linux.h (CPP_SPEC): Define.
23559 2018-02-13 Jakub Jelinek <jakub@redhat.com>
23562 * config/i386/i386.c (ix86_init_mmx_sse_builtins): Pass
23563 OPTION_MASK_ISA_AES | OPTION_MASK_ISA_SSE2 instead of
23564 OPTION_MASK_ISA_AES as first argument to def_builtin_const
23565 for AES builtins. Pass OPTION_MASK_ISA_PCLMUL | OPTION_MASK_ISA_SSE2
23566 instead of OPTION_MASK_ISA_PCLMUL as first argument to
23567 def_builtin_const for __builtin_ia32_pclmulqdq128 builtin.
23568 * config/i386/wmmintrin.h: If __SSE2__ is not defined, enable it
23569 temporarily for AES and PCLMUL builtins.
23571 PR tree-optimization/84339
23572 * gimple-fold.c (get_range_strlen): Set *FLEXP to true when handling
23573 ARRAY_REF where first operand is array_at_struct_end_p COMPONENT_REF.
23576 PR middle-end/84309
23577 * match.pd (pow(C,x) -> exp(log(C)*x)): Optimize instead into
23578 exp2(log2(C)*x) if C is a power of 2 and c99 runtime is available.
23579 * generic-match-head.c (canonicalize_math_after_vectorization_p): New
23581 * gimple-match-head.c (canonicalize_math_after_vectorization_p): New
23583 * omp-simd-clone.h: New file.
23584 * omp-simd-clone.c: Include omp-simd-clone.h.
23585 (expand_simd_clones): No longer static.
23586 * tree-vect-patterns.c: Include fold-const-call.h, attribs.h,
23587 cgraph.h and omp-simd-clone.h.
23588 (vect_recog_pow_pattern): Optimize pow(C,x) to exp(log(C)*x).
23589 (vect_recog_widen_shift_pattern): Formatting fix.
23590 (vect_pattern_recog_1): Don't check optab for calls.
23593 * config/i386/sse.md (<avx512>_vpermi2var<mode>3_mask): Force
23594 operands[2] into a REG before using gen_lowpart on it.
23596 2018-02-12 Jeff Law <law@redhat.com>
23599 * config/sh/sh.c (find_barrier): Consider a sibling call
23602 * cse.c (try_back_substitute_reg): Move any REG_ARGS_SIZE note when
23603 successfully back substituting a reg.
23605 2018-02-12 Richard Biener <rguenther@suse.de>
23607 PR tree-optimization/84037
23608 * tree-vect-slp.c (vect_analyze_slp_cost): Add visited
23609 parameter, move visited init to caller.
23610 (vect_slp_analyze_operations): Separate cost from validity
23611 check, initialize visited once for all instances.
23612 (vect_schedule_slp): Analyze map to CSE vectorized nodes once
23614 * tree-vect-stmts.c (vect_model_simple_cost): Make early
23616 (vect_model_promotion_demotion_cost): Likewise.
23617 (vectorizable_bswap): Guard cost modeling with !slp_node
23618 instead of !PURE_SLP_STMT to avoid double-counting on hybrid
23620 (vectorizable_call): Likewise.
23621 (vectorizable_conversion): Likewise.
23622 (vectorizable_assignment): Likewise.
23623 (vectorizable_shift): Likewise.
23624 (vectorizable_operation): Likewise.
23625 (vectorizable_store): Likewise.
23626 (vectorizable_load): Likewise.
23627 (vectorizable_condition): Likewise.
23628 (vectorizable_comparison): Likewise.
23630 2018-02-12 Paolo Bonzini <bonzini@gnu.org>
23633 * internal-fn.def (ASAN_CHECK): Fix fnspec to account for return value.
23634 (ASAN_MARK): Fix fnspec to account for return value, change pointer
23635 argument from 'R' to 'W' so that the pointed-to datum is clobbered.
23637 2018-02-08 Jan Hubicka <hubicka@ucw.cz>
23639 PR middle-end/83665
23640 * params.def (inline-min-speedup): Increase from 8 to 15.
23641 (max-inline-insns-auto): Decrease from 40 to 30.
23642 * ipa-split.c (consider_split): Add some buffer for function to
23643 be considered inlining candidate.
23644 * invoke.texi (max-inline-insns-auto, inline-min-speedup): UPdate
23647 2018-02-12 Richard Biener <rguenther@suse.de>
23649 PR tree-optimization/84037
23650 * tree-vect-slp.c (vect_build_slp_tree_2): Try swapping the
23651 matched stmts if we cannot swap the non-matched ones.
23653 2018-02-12 Olga Makhotina <olga.makhotina@intel.com>
23655 * config/i386/avx512fintrin.h (_mm_mask_scalef_round_sd,
23656 _mm_maskz_scalef_round_sd, _mm_mask_scalef_round_ss,
23657 _mm_maskz_scalef_round_ss): New intrinsics.
23658 (__builtin_ia32_scalefsd_round, __builtin_ia32_scalefss_round): Fix.
23659 * config/i386/i386-builtin.def (__builtin_ia32_scalefsd_round,
23660 __builtin_ia32_scalefss_round): Remove.
23661 (__builtin_ia32_scalefsd_mask_round,
23662 __builtin_ia32_scalefss_mask_round): New intrinsics.
23663 * config/i386/sse.md (vmscalef<mode><round_name>): Renamed to ...
23664 (vmscalef<mode><mask_scalar_name><round_scalar_name>): ... this.
23665 ((match_operand:VF_128 2 "<round_nimm_predicate>"
23666 "<round_constraint>")): Changed to ...
23667 ((match_operand:VF_128 2 "<round_scalar_nimm_predicate>"
23668 "<round_scalar_constraint>")): ... this.
23669 ("vscalef<ssescalarmodesuffix>\t{<round_op3>%2, %1, %0|
23670 %0, %1, %2<round_op3>}"): Changed to ...
23671 ("vscalef<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%2, %1,
23672 %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %1,
23673 %2<round_scalar_mask_op3>}"): ... this.
23674 * config/i386/subst.md (round_scalar_nimm_predicate): New.
23676 2018-02-12 Olga Makhotina <olga.makhotina@intel.com>
23678 * config/i386/avx512fintrin.h (_mm_mask_sqrt_round_sd)
23679 (_mm_maskz_sqrt_round_sd, _mm_mask_sqrt_round_ss)
23680 (_mm_maskz_sqrt_round_ss): New intrinsics.
23681 (__builtin_ia32_sqrtsd_round, __builtin_ia32_sqrtss_round): Remove.
23682 (__builtin_ia32_sqrtsd_mask_round)
23683 (__builtin_ia32_sqrtss_mask_round): New builtins.
23684 * config/i386/i386-builtin.def (__builtin_ia32_sqrtsd_round)
23685 (__builtin_ia32_sqrtss_round): Remove.
23686 (__builtin_ia32_sqrtsd_mask_round)
23687 (__builtin_ia32_sqrtss_mask_round): New builtins.
23688 * config/i386/sse.md (vmsqrt<mode>2<round_name>): Renamed to ...
23689 (vmsqrt<mode>2<mask_scalar_name><round_scalar_name>): ... this.
23690 ((match_operand:VF_128 1 "vector_operand"
23691 "xBm,<round_constraint>")): Changed to ...
23692 ((match_operand:VF_128 1 "vector_operand"
23693 "xBm,<round_scalar_constraint>")): ... this.
23694 (vsqrt<ssescalarmodesuffix>\t{<round_op3>%1, %2, %0|
23695 %0, %2, %<iptr>1<round_op3>}): Changed to ...
23696 (vsqrt<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%1, %2,
23697 %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %2,
23698 %<iptr>1<round_scalar_mask_op3>}): ... this.
23699 ((set_attr "prefix" "<round_prefix>")): Changed to ...
23700 ((set_attr "prefix" "<round_scalar_prefix>")): ... this.
23702 2018-02-11 Steven Munroe <munroesj@gcc.gnu.org>
23705 * config/rs6000/mmintrin.h (_mm_cmpeq_pi32 [_ARCH_PWR9]):
23706 Cast vec_cmpeq result to correct type.
23707 * config/rs6000/mmintrin.h (_mm_cmpgt_pi32 [_ARCH_PWR9]):
23708 Cast vec_cmpgt result to correct type.
23710 2018-02-11 Alexandre Oliva <aoliva@redhat.com>
23712 * final.c (final_scan_insn_1): Renamed from...
23713 (final_scan_insn): ... this. New wrapper, to recover
23714 seen from the outermost call in recursive ones.
23715 * config/sparc/sparc.c (output_return): Drop seen from call.
23716 (output_sibcall): Likewise.
23717 * config/visium/visium.c (output_branch): Likewise.
23719 2018-02-10 John David Anglin <danglin@gcc.gnu.org>
23721 * config/pa/pa.c (hppa_profile_hook): Mark SYMBOL_REF for _mcount as
23724 2018-02-10 Alan Modra <amodra@gmail.com>
23727 * config/rs6000/rs6000.md (split_stack_return): Remove (use ..).
23728 Specify LR as an input.
23730 2018-02-10 Jakub Jelinek <jakub@redhat.com>
23733 * omp-low.c (maybe_remove_omp_member_access_dummy_vars,
23734 remove_member_access_dummy_vars): New functions.
23735 (lower_omp_for, lower_omp_taskreg, lower_omp_target,
23736 lower_omp_1, execute_lower_omp): Use them.
23738 PR rtl-optimization/84308
23739 * shrink-wrap.c (spread_components): Release todo vector.
23741 2018-02-09 Vladimir Makarov <vmakarov@redhat.com>
23743 PR rtl-optimization/57193
23744 * ira-color.c (struct allocno_color_data): Add member
23745 conflict_allocno_hard_prefs.
23746 (update_conflict_allocno_hard_prefs): New.
23747 (bucket_allocno_compare_func): Add a preference based on
23748 conflict_allocno_hard_prefs.
23749 (push_allocno_to_stack): Update conflict_allocno_hard_prefs.
23750 (color_allocnos): Remove a dead code. Initiate
23751 conflict_allocno_hard_prefs. Call update_costs_from_prefs.
23753 2018-02-09 Jakub Jelinek <jakub@redhat.com>
23756 * config/rs6000/vsx.md (p9_xxbrq_v16qi): Change input operand
23757 constraint from =wa to wa. Avoid a subreg on the output operand,
23758 instead use a pseudo and subreg it in a move.
23759 (p9_xxbrd_<mode>): Changed to ...
23760 (p9_xxbrd_v2di): ... this insn, without VSX_D iterator.
23761 (p9_xxbrd_v2df): New expander.
23762 (p9_xxbrw_<mode>): Changed to ...
23763 (p9_xxbrw_v4si): ... this insn, without VSX_W iterator.
23764 (p9_xxbrw_v4sf): New expander.
23766 2018-02-09 Sebastian Perta <sebastian.perta@renesas.com>
23768 * config/rx/rx.md (movsicc): Update expander to be matched by GCC.
23770 2018-02-09 Peter Bergner <bergner@vnet.ibm.com>
23773 * config/rs6000/vsx.md (vsx_mul_v2di): Handle generating a 64-bit
23774 multiply in 32-bit mode.
23775 (vsx_div_v2di): Handle generating a 64-bit signed divide in 32-bit mode.
23776 (vsx_udiv_v2di): Handle generating a 64-bit unsigned divide in 32-bit
23779 2018-02-09 Sebastian Perta <sebastian.perta@renesas.com>
23781 * config/rx/constraints.md (CALL_OP_SYMBOL_REF): Added new constraint
23782 to allow or block "symbol_ref" depending on the value of TARGET_JSR.
23783 * config/rx/rx.md (call_internal): Use CALL_OP_SYMBOL_REF.
23784 * config/rx/rx.md (call_value_internal): Use CALL_OP_SYMBOL_REF.
23786 2018-02-09 Pierre-Marie de Rodat <derodat@adacore.com>
23789 * dwarf2out.c (is_trivial_indirect_ref): New function.
23790 (dwarf2out_late_global_decl): Do not generate a location
23791 attribute for variables that have a non-trivial DECL_VALUE_EXPR
23792 and that are not defined in the current unit.
23794 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
23796 * optabs.c (prepare_cmp_insn): Try harder to emit a direct comparison
23797 instead of a libcall for UNORDERED.
23799 2018-02-09 Tamar Christina <tamar.christina@arm.com>
23802 * config/arm/arm-c.c (arm_cpu_builtins): Un-define __ARM_FEATURE_LDREX,
23803 __ARM_ARCH_PROFILE, __ARM_ARCH_ISA_THUMB, __ARM_FP and __ARM_NEON_FP.
23805 2018-02-09 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
23808 * config/s390/s390.c (s390_set_current_function): Invoke
23809 s390_indirect_branch_settings also if fndecl didn't change.
23811 2018-02-09 Alexandre Oliva <aoliva@redhat.com>
23813 * config/rs6000/rs6000.md (blockage): Set length to zero.
23815 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
23817 * expr.c (optimize_bitfield_assignment_op): Remove obsolete assertion.
23819 2018-02-09 Jakub Jelinek <jakub@redhat.com>
23822 * gcc.c (STATIC_LIBASAN_LIBS, STATIC_LIBTSAN_LIBS,
23823 STATIC_LIBLSAN_LIBS, STATIC_LIBUBSAN_LIBS): Handle -static like
23827 * var-tracking.c (vt_add_function_parameter): Punt for non-onepart
23828 PARALLEL incoming that failed vt_get_decl_and_offset check.
23830 PR middle-end/84237
23831 * output.h (bss_initializer_p): Add NAMED argument, defaulted to false.
23832 * varasm.c (bss_initializer_p): Add NAMED argument, if true, ignore
23834 (get_variable_section): For decls in named .bss* sections pass true as
23835 second argument to bss_initializer_p.
23837 2018-02-09 Marek Polacek <polacek@redhat.com>
23838 Jakub Jelinek <jakub@redhat.com>
23841 * fold-const.c (fold_indirect_ref_1): Use VECTOR_TYPE_P macro.
23842 Formatting fixes. Verify first that tree_fits_poly_int64_p (op01).
23843 Sync some changes from cxx_fold_indirect_ref.
23845 2018-02-09 Alexandre Oliva <aoliva@redhat.com>
23847 * cfgexpand.c (expand_gimple_basic_block): Handle inline entry
23849 * dwarf2out.c (dwarf2_debug_hooks): Enable inline_entry hook.
23850 (BLOCK_INLINE_ENTRY_LABEL): New.
23851 (dwarf2out_var_location): Disregard inline entry markers.
23852 (inline_entry_data): New struct.
23853 (inline_entry_data_hasher): New hashtable type.
23854 (inline_entry_data_hasher::hash): New.
23855 (inline_entry_data_hasher::equal): New.
23856 (inline_entry_data_table): New variable.
23857 (add_high_low_attributes): Add DW_AT_entry_pc and
23858 DW_AT_GNU_entry_view attributes if a pending entry is found
23859 in inline_entry_data_table. Add old entry_pc attribute only
23860 if debug nonbinding markers are disabled.
23861 (gen_inlined_subroutine_die): Set BLOCK_DIE if nonbinding
23862 markers are enabled.
23863 (block_within_block_p, dwarf2out_inline_entry): New.
23864 (dwarf2out_finish): Check that no entries remained in
23865 inline_entry_data_table.
23866 * final.c (reemit_insn_block_notes): Handle inline entry notes.
23867 (final_scan_insn, notice_source_line): Likewise.
23868 (rest_of_clean_state): Skip inline entry markers.
23869 * gimple-pretty-print.c (dump_gimple_debug): Handle inline entry
23871 * gimple.c (gimple_build_debug_inline_entry): New.
23872 * gimple.h (enum gimple_debug_subcode): Add
23873 GIMPLE_DEBUG_INLINE_ENTRY.
23874 (gimple_build_debug_inline_entry): Declare.
23875 (gimple_debug_inline_entry_p): New.
23876 (gimple_debug_nonbind_marker_p): Adjust.
23877 * insn-notes.def (INLINE_ENTRY): New.
23878 * print-rtl.c (rtx_writer::print_rtx_operand_code_0): Handle
23879 inline entry marker notes.
23880 (print_insn): Likewise.
23881 * rtl.h (NOTE_MARKER_P): Add INLINE_ENTRY support.
23882 (INSN_DEBUG_MARKER_KIND): Likewise.
23883 (GEN_RTX_DEBUG_MARKER_INLINE_ENTRY_PAT): New.
23884 * tree-inline.c (expand_call_inline): Build and insert
23885 debug_inline_entry stmt.
23886 * tree-ssa-live.c (remove_unused_scope_block_p): Preserve
23887 inline entry blocks early, if nonbind markers are enabled.
23888 (dump_scope_block): Dump fragment info.
23889 * var-tracking.c (reemit_marker_as_note): Handle inline entry note.
23890 * doc/gimple.texi (gimple_debug_inline_entry_p): New.
23891 (gimple_build_debug_inline_entry): New.
23892 * doc/invoke.texi (gstatement-frontiers, gno-statement-frontiers):
23893 Enable/disable inline entry points too.
23894 * doc/rtl.texi (NOTE_INSN_INLINE_ENTRY): New.
23895 (DEBUG_INSN): Describe inline entry markers.
23897 * common.opt (gvariable-location-views): New.
23898 (gvariable-location-views=incompat5): New.
23899 * config.in: Rebuilt.
23900 * configure: Rebuilt.
23901 * configure.ac: Test assembler for view support.
23902 * dwarf2asm.c (dw2_asm_output_symname_uleb128): New.
23903 * dwarf2asm.h (dw2_asm_output_symname_uleb128): Declare.
23904 * dwarf2out.c (var_loc_view): New typedef.
23905 (struct dw_loc_list_struct): Add vl_symbol, vbegin, vend.
23906 (dwarf2out_locviews_in_attribute): New.
23907 (dwarf2out_locviews_in_loclist): New.
23908 (dw_val_equal_p): Compare val_view_list of dw_val_class_view_lists.
23909 (enum dw_line_info_opcode): Add LI_adv_address.
23910 (struct dw_line_info_table): Add view.
23911 (RESET_NEXT_VIEW, RESETTING_VIEW_P): New macros.
23912 (DWARF2_ASM_VIEW_DEBUG_INFO): Define default.
23913 (zero_view_p): New variable.
23914 (ZERO_VIEW_P): New macro.
23915 (output_asm_line_debug_info): New.
23916 (struct var_loc_node): Add view.
23917 (add_AT_view_list, AT_loc_list): New.
23918 (add_var_loc_to_decl): Add view param. Test it against last.
23919 (new_loc_list): Add view params. Record them.
23920 (AT_loc_list_ptr): Handle loc and view lists.
23921 (view_list_to_loc_list_val_node): New.
23922 (print_dw_val): Handle dw_val_class_view_list.
23923 (size_of_die): Likewise.
23924 (value_format): Likewise.
23925 (loc_list_has_views): New.
23926 (gen_llsym): Set vl_symbol too.
23927 (maybe_gen_llsym, skip_loc_list_entry): New.
23928 (dwarf2out_maybe_output_loclist_view_pair): New.
23929 (output_loc_list): Output view list or entries too.
23930 (output_view_list_offset): New.
23931 (output_die): Handle dw_val_class_view_list.
23932 (output_dwarf_version): New.
23933 (output_compilation_unit_header): Use it.
23934 (output_skeleton_debug_sections): Likewise.
23935 (output_rnglists, output_line_info): Likewise.
23936 (output_pubnames, output_aranges): Update version comments.
23937 (output_one_line_info_table): Output view numbers in asm comments.
23938 (dw_loc_list): Determine current endview, pass it to new_loc_list.
23939 Call maybe_gen_llsym.
23940 (loc_list_from_tree_1): Adjust.
23941 (add_AT_location_description): Create view list attribute if
23942 needed, check it's absent otherwise.
23943 (convert_cfa_to_fb_loc_list): Adjust.
23944 (maybe_emit_file): Call output_asm_line_debug_info for test.
23945 (dwarf2out_var_location): Reset views as needed. Precompute
23946 add_var_loc_to_decl args. Call get_attr_min_length only if we have the
23947 attribute. Set view.
23948 (new_line_info_table): Reset next view.
23949 (set_cur_line_info_table): Call output_asm_line_debug_info for test.
23950 (dwarf2out_source_line): Likewise. Output view resets and labels to
23951 the assembler, or select appropriate line info opcodes.
23952 (prune_unused_types_walk_attribs): Handle dw_val_class_view_list.
23953 (optimize_string_length): Catch it. Adjust.
23954 (resolve_addr): Copy vl_symbol along with ll_symbol. Handle
23955 dw_val_class_view_list, and remove it if no longer needed.
23956 (hash_loc_list): Hash view numbers.
23957 (loc_list_hasher::equal): Compare them.
23958 (optimize_location_lists): Check whether a view list symbol is
23959 needed, and whether the locview attribute is present, and
23960 whether they match. Remove the locview attribute if no longer
23962 (index_location_lists): Call skip_loc_list_entry for test.
23963 (dwarf2out_finish): Call output_asm_line_debug_info for test.
23964 Use output_dwarf_version.
23965 * dwarf2out.h (enum dw_val_class): Add dw_val_class_view_list.
23966 (struct dw_val_node): Add val_view_list.
23967 * final.c (SEEN_NEXT_VIEW): New.
23968 (set_next_view_needed): New.
23969 (clear_next_view_needed): New.
23970 (maybe_output_next_view): New.
23971 (final_start_function): Rename to...
23972 (final_start_function_1): ... this. Take pointer to FIRST,
23973 add SEEN parameter. Emit param bindings in the initial view.
23974 (final_start_function): Reintroduce SEEN-less interface.
23975 (final): Rename to...
23976 (final_1): ... this. Take SEEN parameter. Output final pending
23977 next view at the end.
23978 (final): Reintroduce seen-less interface.
23979 (final_scan_insn): Output pending next view before switching
23980 sections or ending a block. Mark the next view as needed when
23981 outputting variable locations. Notify debug backend of section
23982 changes, and of location view changes.
23983 (rest_of_handle_final): Adjust.
23984 * toplev.c (process_options): Autodetect value for debug variable
23985 location views option. Warn on incompat5 without -gdwarf-5.
23986 * doc/invoke.texi (gvariable-location-views): New.
23987 (gvariable-location-views=incompat5): New.
23988 (gno-variable-location-views): New.
23990 2018-02-08 David Malcolm <dmalcolm@redhat.com>
23992 PR tree-optimization/84136
23993 * tree-cfg.c (find_taken_edge_computed_goto): Remove assertion
23994 that the result of find_edge is non-NULL.
23996 2018-02-08 Sergey Shalnov <sergey.shalnov@intel.com>
23999 * config/i386/x86-tune-costs.h (skylake_cost): Fix cost of
24000 storing integer register in SImode. Fix cost of 256 and 512
24001 byte aligned SSE register store.
24003 2018-02-08 Sergey Shalnov <sergey.shalnov@intel.com>
24005 * config/i386/i386.c (ix86_multiplication_cost): Fix
24006 multiplication cost for TARGET_AVX512DQ.
24008 2018-02-08 Marek Polacek <polacek@redhat.com>
24010 PR tree-optimization/84238
24011 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Verify the result of
24014 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
24016 PR tree-optimization/84265
24017 * tree-vect-stmts.c (vectorizable_store): Don't treat
24018 VMAT_CONTIGUOUS accesses as grouped.
24019 (vectorizable_load): Likewise.
24021 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
24023 PR tree-optimization/81635
24024 * wide-int.h (wi::round_down_for_mask, wi::round_up_for_mask): Declare.
24025 * wide-int.cc (wi::round_down_for_mask, wi::round_up_for_mask)
24026 (test_round_for_mask): New functions.
24027 (wide_int_cc_tests): Call test_round_for_mask.
24028 * tree-vrp.h (intersect_range_with_nonzero_bits): Declare.
24029 * tree-vrp.c (intersect_range_with_nonzero_bits): New function.
24030 * tree-data-ref.c (split_constant_offset_1): Use it to refine the
24031 range returned by get_range_info.
24033 2018-02-08 Jan Hubicka <hubicka@ucw.cz>
24036 * cgraph.h (symtab_node::output_to_lto_symbol_table_p): Declare
24037 * symtab.c: Include builtins.h
24038 (symtab_node::output_to_lto_symbol_table_p): Move here
24039 from lto-streamer-out.c:output_symbol_p.
24040 * lto-streamer-out.c (write_symbol): Turn early exit to assert.
24041 (output_symbol_p): Move all logic to symtab.c
24042 (produce_symtab): Update.
24044 2018-02-08 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
24046 * config/s390/s390-opts.h (enum indirect_branch): Define.
24047 * config/s390/s390-protos.h (s390_return_addr_from_memory)
24048 (s390_indirect_branch_via_thunk)
24049 (s390_indirect_branch_via_inline_thunk): Add function prototypes.
24050 (enum s390_indirect_branch_type): Define.
24051 * config/s390/s390.c (struct s390_frame_layout, struct
24052 machine_function): Remove.
24053 (indirect_branch_prez10thunk_mask, indirect_branch_z10thunk_mask)
24054 (indirect_branch_table_label_no, indirect_branch_table_name):
24056 (INDIRECT_BRANCH_NUM_OPTIONS): Define macro.
24057 (enum s390_indirect_branch_option): Define.
24058 (s390_return_addr_from_memory): New function.
24059 (s390_handle_string_attribute): New function.
24060 (s390_attribute_table): Add new attribute handler.
24061 (s390_execute_label): Handle UNSPEC_EXECUTE_JUMP patterns.
24062 (s390_indirect_branch_via_thunk): New function.
24063 (s390_indirect_branch_via_inline_thunk): New function.
24064 (s390_function_ok_for_sibcall): When jumping via thunk disallow
24065 sibling call optimization for non z10 compiles.
24066 (s390_emit_call): Force indirect branch target to be a single
24067 register. Add r1 clobber for non-z10 compiles.
24068 (s390_emit_epilogue): Emit return jump via return_use expander.
24069 (s390_reorg): Handle JUMP_INSNs as execute targets.
24070 (s390_option_override_internal): Perform validity checks for the
24071 new command line options.
24072 (s390_indirect_branch_attrvalue): New function.
24073 (s390_indirect_branch_settings): New function.
24074 (s390_set_current_function): Invoke s390_indirect_branch_settings.
24075 (s390_output_indirect_thunk_function): New function.
24076 (s390_code_end): Implement target hook.
24077 (s390_case_values_threshold): Implement target hook.
24078 (TARGET_ASM_CODE_END, TARGET_CASE_VALUES_THRESHOLD): Define target
24080 * config/s390/s390.h (struct s390_frame_layout)
24081 (struct machine_function): Move here from s390.c.
24082 (TARGET_INDIRECT_BRANCH_NOBP_RET)
24083 (TARGET_INDIRECT_BRANCH_NOBP_JUMP)
24084 (TARGET_INDIRECT_BRANCH_NOBP_JUMP_THUNK)
24085 (TARGET_INDIRECT_BRANCH_NOBP_JUMP_INLINE_THUNK)
24086 (TARGET_INDIRECT_BRANCH_NOBP_CALL)
24087 (TARGET_DEFAULT_INDIRECT_BRANCH_TABLE)
24088 (TARGET_INDIRECT_BRANCH_THUNK_NAME_EXRL)
24089 (TARGET_INDIRECT_BRANCH_THUNK_NAME_EX)
24090 (TARGET_INDIRECT_BRANCH_TABLE): Define macros.
24091 * config/s390/s390.md (UNSPEC_EXECUTE_JUMP)
24092 (INDIRECT_BRANCH_THUNK_REGNUM): Define constants.
24093 (mnemonic attribute): Add values which aren't recognized
24095 ("*cjump_long", "*icjump_long", "*basr", "*basr_r"): Disable
24096 pattern for branch conversion. Fix mnemonic attribute.
24097 ("*c<code>", "*sibcall_br", "*sibcall_value_br", "*return"): Emit
24098 indirect branch via thunk if requested.
24099 ("indirect_jump", "<code>"): Expand patterns for branch conversion.
24100 ("*indirect_jump"): Disable for branch conversion using out of
24102 ("indirect_jump_via_thunk<mode>_z10")
24103 ("indirect_jump_via_thunk<mode>")
24104 ("indirect_jump_via_inlinethunk<mode>_z10")
24105 ("indirect_jump_via_inlinethunk<mode>", "*casesi_jump")
24106 ("casesi_jump_via_thunk<mode>_z10", "casesi_jump_via_thunk<mode>")
24107 ("casesi_jump_via_inlinethunk<mode>_z10")
24108 ("casesi_jump_via_inlinethunk<mode>", "*basr_via_thunk<mode>_z10")
24109 ("*basr_via_thunk<mode>", "*basr_r_via_thunk_z10")
24110 ("*basr_r_via_thunk", "return<mode>_prez10"): New pattern.
24111 ("*indirect2_jump"): Disable for branch conversion.
24112 ("casesi_jump"): Turn into expander and expand patterns for branch
24114 ("return_use"): New expander.
24115 ("*return"): Emit return via thunk and rename it to ...
24116 ("*return<mode>"): ... this one.
24117 * config/s390/s390.opt: Add new options and and enum for the
24120 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
24122 * lra-constraints.c (match_reload): Unconditionally use
24123 gen_lowpart_SUBREG, rather than selecting between that
24124 and equivalent gen_rtx_SUBREG code.
24126 2018-02-08 Richard Biener <rguenther@suse.de>
24128 PR tree-optimization/84233
24129 * tree-ssa-phiprop.c (propagate_with_phi): Use separate
24130 changed flag instead of boguously re-using phi_inserted.
24132 2018-02-08 Martin Jambor <mjambor@suse.cz>
24134 * hsa-gen.c (get_symbol_for_decl): Set program allocation for
24135 static local variables.
24137 2018-02-08 Richard Biener <rguenther@suse.de>
24139 PR tree-optimization/84278
24140 * tree-vect-stmts.c (vectorizable_store): When looking for
24141 smaller vector types to perform grouped strided loads/stores
24142 make sure the mode is supported by the target.
24143 (vectorizable_load): Likewise.
24145 2018-02-08 Wilco Dijkstra <wdijkstr@arm.com>
24147 * config/aarch64/aarch64.c (aarch64_components_for_bb):
24148 Increase LDP/STP opportunities by adding adjacent callee-saves.
24150 2018-02-08 Wilco Dijkstra <wdijkstr@arm.com>
24152 PR rtl-optimization/84068
24153 PR rtl-optimization/83459
24154 * haifa-sched.c (rank_for_schedule): Fix SCHED_PRESSURE_MODEL sorting.
24156 2018-02-08 Aldy Hernandez <aldyh@redhat.com>
24158 PR tree-optimization/84224
24159 * gimple-ssa-warn-alloca.c (pass_walloca::execute): Remove assert.
24160 * calls.c (gimple_alloca_call_p): Only return TRUE when we have
24161 non-zero arguments.
24163 2018-02-07 Iain Sandoe <iain@codesourcery.com>
24166 * config/rs6000/altivec.md (*restore_world): Remove LR use.
24167 * config/rs6000/predicates.md (restore_world_operation): Adjust op
24168 count, remove one USE.
24170 2018-02-07 Michael Meissner <meissner@linux.vnet.ibm.com>
24172 * doc/install.texi (Configuration): Document the
24173 --with-long-double-format={ibm,ieee} PowerPC configuration
24177 * config/rs6000/rs6000.md (fix_trunc<SFDF:mode><QHI:mode>2):
24178 Convert from define_expand to be define_insn_and_split. Rework
24179 float/double/_Float128 conversions to QI/HI/SImode to work with
24180 both ISA 2.07 (power8) or ISA 3.0 (power9). Fix regression where
24181 conversions to QI/HImode types did a store and then a load to
24182 truncate the value. For conversions to VSX registers, don't split
24183 the insn, instead emit the code directly. Use the code iterator
24184 any_fix to combine signed and unsigned conversions.
24185 (fix<uns>_trunc<SFDF:mode>si2_p8): Likewise.
24186 (fixuns_trunc<SFDF:mode><QHI:mode>2): Likewise.
24187 (fix_trunc<IEEE128:mode><QHI:mode>2): Likewise.
24188 (fix<uns>_trunc<SFDF:mode><QHI:mode>2): Likewise.
24189 (fix_<mode>di2_hw): Likewise.
24190 (fixuns_<mode>di2_hw): Likewise.
24191 (fix_<mode>si2_hw): Likewise.
24192 (fixuns_<mode>si2_hw): Likewise.
24193 (fix<uns>_<IEEE128:mode><SDI:mode>2_hw): Likewise.
24194 (fix<uns>_trunc<IEEE128:mode><QHI:mode>2): Likewise.
24195 (fctiw<u>z_<mode>_smallint): Rename fctiw<u>z_<mode>_smallint to
24196 fix<uns>_trunc<SFDF:mode>si2_p8.
24197 (fix_trunc<SFDF:mode><QHI:mode>2_internal): Delete, no longer used.
24198 (fixuns_trunc<SFDF:mode><QHI:mode>2_internal): Likewise.
24199 (fix<uns>_<mode>_mem): Likewise.
24200 (fctiw<u>z_<mode>_mem): Likewise.
24201 (fix<uns>_<mode>_mem): Likewise.
24202 (fix<uns>_trunc<SFDF:mode><QHSI:mode>2_mem): On ISA 3.0, prevent
24203 the register allocator from doing a direct move to the GPRs to do
24204 a store, and instead use the ISA 3.0 store byte/half-word from
24205 vector register instruction. For IEEE 128-bit floating point,
24206 also optimize stores of 32-bit ints.
24207 (fix<uns>_trunc<IEEE128:mode><QHSI:mode>2_mem): Likewise.
24209 2018-02-07 Alan Hayward <alan.hayward@arm.com>
24211 * genextract.c (push_pathstr_operand): New function to support
24213 (walk_rtx): Call push_pathstr_operand.
24214 (print_path): Support [a-zA-Z].
24216 2018-02-07 Richard Biener <rguenther@suse.de>
24218 PR tree-optimization/84037
24219 * tree-vectorizer.h (struct _loop_vec_info): Add ivexpr_map member.
24220 (cse_and_gimplify_to_preheader): Declare.
24221 (vect_get_place_in_interleaving_chain): Likewise.
24222 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
24224 (_loop_vec_info::~_loop_vec_info): Delete it.
24225 (cse_and_gimplify_to_preheader): New function.
24226 * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Export.
24227 * tree-vect-stmts.c (vectorizable_store): CSE base and steps.
24228 (vectorizable_load): Likewise. For grouped stores always base
24229 the IV on the first element.
24230 * tree-vect-loop-manip.c (vect_loop_versioning): Unshare versioning
24231 condition before gimplifying.
24233 2018-02-07 Jakub Jelinek <jakub@redhat.com>
24235 * tree-eh.c (operation_could_trap_helper_p): Ignore honor_trapv for
24236 *DIV_EXPR and *MOD_EXPR.
24238 2018-02-07 H.J. Lu <hongjiu.lu@intel.com>
24241 * config/i386/i386.c (ix86_option_override_internal): Mask out
24242 the CF_SET bit when checking -fcf-protection.
24244 2018-02-07 Tom de Vries <tom@codesourcery.com>
24247 * omp-expand.c (expand_oacc_collapse_init): Ensure diff_type is large
24250 2018-02-07 Richard Biener <rguenther@suse.de>
24252 PR tree-optimization/84204
24253 * tree-chrec.c (chrec_fold_plus_1): Remove size limiting in
24256 PR tree-optimization/84205
24257 * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Also
24258 special-case isl_ast_op_zdiv_r.
24260 PR tree-optimization/84223
24261 * graphite-scop-detection.c (gather_bbs::before_dom_children):
24262 Only add conditions from within the region.
24263 (gather_bbs::after_dom_children): Adjust.
24265 2018-02-07 Georg-Johann Lay <avr@gjlay.de>
24268 * config/avr/avr.h (GENERAL_REGNO_P, GENERAL_REG_P): New macros.
24269 * config/avr/avr.md: Only post-reload split REG-REG moves if
24270 either register is GENERAL_REG_P.
24272 2018-02-07 Jakub Jelinek <jakub@redhat.com>
24274 PR tree-optimization/84235
24275 * tree-ssa-scopedtables.c
24276 (avail_exprs_stack::simplify_binary_operation): Fir MINUS_EXPR, punt
24277 if the subtraction is performed in floating point type where NaNs are
24278 honored. For *DIV_EXPR, punt for ALL_FRACT_MODE_Ps where we can't
24279 build 1. Formatting fix.
24281 2018-02-06 Jakub Jelinek <jakub@redhat.com>
24284 * config/i386/i386.c (rest_of_insert_endbranch): Only skip
24285 NOTE_INSN_CALL_ARG_LOCATION after a call, not anything else,
24286 and skip it regardless of bb boundaries. Use CALL_P macro,
24287 don't test INSN_P (insn) together with CALL_P or JUMP_P check
24288 unnecessarily, formatting fix.
24290 2018-02-06 Michael Collison <michael.collison@arm.com>
24292 * config/arm/thumb2.md:
24293 (*thumb2_mov_negscc): Split only if TARGET_THUMB2 && !arm_restrict_it.
24294 (*thumb_mov_notscc): Ditto.
24296 2018-02-06 Michael Meissner <meissner@linux.vnet.ibm.com>
24299 * config/rs6000/rs6000.md (su code attribute): Use "u" for
24300 unsigned_fix, not "s".
24302 2018-02-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
24304 * configure.ac (gcc_fn_eh_frame_ro): New function.
24305 (gcc_cv_as_cfi_directive): Check both 32 and 64-bit assembler for
24306 correct .eh_frame permissions.
24307 * configure: Regenerate.
24309 2018-02-06 Andrew Jenner <andrew@codeourcery.com>
24311 * doc/invoke.texi: Add section for the PowerPC SPE backend. Remove
24312 irrelevant options.
24314 2018-02-06 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
24316 * config/rs6000/rs6000.c (rs6000_option_override_internal):
24317 Display warning message for -mno-speculate-indirect-jumps.
24319 2018-02-06 Andrew Jenner <andrew@codesourcery.com>
24321 * config/powerpcspe/powerpcspe.opt: (msimple-fpu, mfpu) Add
24323 * config/powerpcspe/sysv4.opt (mbit-align): Likewise.
24325 2018-02-06 Aldy Hernandez <aldyh@redhat.com>
24327 PR tree-optimization/84225
24328 * tree-eh.c (find_trapping_overflow): Only call
24329 operation_no_trapping_overflow when ANY_INTEGRAL_TYPE_P.
24331 2018-02-06 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
24334 * config/i386/i386.c: Reimplement the check of possible options
24335 -mibt/-mshstk conbination. Change error messages.
24336 * doc/invoke.texi: Fix a typo: remove extra '='.
24338 2018-02-06 Marek Polacek <polacek@redhat.com>
24340 PR tree-optimization/84228
24341 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Skip debug statements.
24343 2018-02-06 Tamar Christina <tamar.christina@arm.com>
24346 * config/arm/arm.c (arm_print_asm_arch_directives): Record already
24347 emitted arch directives.
24348 * config/arm/arm-c.c (arm_cpu_builtins): Undefine __ARM_ARCH and
24349 __ARM_FEATURE_COPROC before changing architectures.
24351 2018-02-06 Richard Biener <rguenther@suse.de>
24353 * config/i386/i386.c (print_reg): Fix typo.
24354 (ix86_loop_unroll_adjust): Do not unroll beyond the original nunroll.
24356 2018-02-06 Eric Botcazou <ebotcazou@adacore.com>
24358 * configure: Regenerate.
24360 2018-02-05 Martin Sebor <msebor@redhat.com>
24362 PR tree-optimization/83369
24363 * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Use %G to print
24366 2018-02-05 Martin Liska <mliska@suse.cz>
24368 * doc/invoke.texi: Cherry-pick upstream r323995.
24370 2018-02-05 Richard Sandiford <richard.sandiford@linaro.org>
24372 * ira.c (ira_init_register_move_cost): Adjust comment.
24374 2018-02-05 Martin Liska <mliska@suse.cz>
24376 PR gcov-profile/84137
24377 * doc/gcov.texi: Fix typo in documentation.
24379 2018-02-05 Martin Liska <mliska@suse.cz>
24381 PR gcov-profile/83879
24382 * doc/gcov.texi: Document necessity of --dynamic-list-data when
24383 using dlopen functionality.
24385 2018-02-05 Olga Makhotina <olga.makhotina@intel.com>
24387 * config/i386/avx512dqintrin.h (_mm_mask_range_sd, _mm_maskz_range_sd,
24388 _mm_mask_range_round_sd, _mm_maskz_range_round_sd, _mm_mask_range_ss,
24389 _mm_maskz_range_ss, _mm_mask_range_round_ss,
24390 _mm_maskz_range_round_ss): New intrinsics.
24391 (__builtin_ia32_rangesd128_round)
24392 (__builtin_ia32_rangess128_round): Remove.
24393 (__builtin_ia32_rangesd128_mask_round,
24394 __builtin_ia32_rangess128_mask_round): New builtins.
24395 * config/i386/i386-builtin.def (__builtin_ia32_rangesd128_round,
24396 __builtin_ia32_rangess128_round): Remove.
24397 (__builtin_ia32_rangesd128_mask_round,
24398 __builtin_ia32_rangess128_mask_round): New builtins.
24399 * config/i386/sse.md (ranges<mode><round_saeonly_name>): Renamed to ...
24400 (ranges<mode><mask_scalar_name><round_saeonly_scalar_name>): ... this.
24401 ((match_operand:VF_128 2 "<round_saeonly_nimm_predicate>"
24402 "<round_saeonly_constraint>")): Changed to ...
24403 ((match_operand:VF_128 2 "<round_saeonly_scalar_nimm_predicate>"
24404 "<round_saeonly_scalar_constraint>")): ... this.
24405 ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_op4>%2, %1, %0|
24406 %0, %1, %2<round_saeonly_op4>, %3}"): Changed to ...
24407 ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_scalar_mask_op4>%2,
24408 %1, %0<mask_scalar_operand4>|%0<mask_scalar_operand4>, %1,
24409 %2<round_saeonly_scalar_mask_op4>, %3}"): ... this.
24411 2018-02-02 Andrew Jenner <andrew@codesourcery.com>
24413 * config/powerpcspe/powerpcspe.opt: Add Undocumented to irrelevant
24415 * config/powerpcspe/powerpcspe-tables.opt (rs6000_cpu_opt_value):
24416 Remove all values except native, 8540 and 8548.
24418 2018-02-02 H.J. Lu <hongjiu.lu@intel.com>
24420 * config/i386/i386.c (ix86_output_function_return): Pass
24421 INVALID_REGNUM, instead of -1, as invalid register number to
24422 indirect_thunk_name and output_indirect_thunk.
24424 2018-02-02 Julia Koval <julia.koval@intel.com>
24426 * config.gcc: Add -march=icelake.
24427 * config/i386/driver-i386.c (host_detect_local_cpu): Detect icelake.
24428 * config/i386/i386-c.c (ix86_target_macros_internal): Handle icelake.
24429 * config/i386/i386.c (processor_costs): Add m_ICELAKE.
24430 (PTA_ICELAKE, PTA_AVX512VNNI, PTA_GFNI, PTA_VAES, PTA_AVX512VBMI2,
24431 PTA_VPCLMULQDQ, PTA_RDPID, PTA_AVX512BITALG): New.
24432 (processor_target_table): Add icelake.
24433 (ix86_option_override_internal): Handle new PTAs.
24434 (get_builtin_code_for_version): Handle icelake.
24435 (M_INTEL_COREI7_ICELAKE): New.
24436 (fold_builtin_cpu): Handle icelake.
24437 * config/i386/i386.h (TARGET_ICELAKE, PROCESSOR_ICELAKE): New.
24438 * doc/invoke.texi: Add -march=icelake.
24440 2018-02-02 Julia Koval <julia.koval@intel.com>
24442 * config/i386/i386.c (ix86_option_override_internal): Change flags type
24443 to wide_int_bitmask.
24444 * wide-int-bitmask.h: New.
24446 2018-02-02 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
24449 * config/i386/i386.md: Replace Pmode with word_mode in
24450 builtin_setjmp_setup and builtin_longjmp to support x32.
24452 2018-02-01 Peter Bergner <bergner@vnet.ibm.com>
24456 * config/rs6000/driver-rs6000.c: #include "diagnostic.h".
24458 (rs6000_supported_cpu_names): New static variable.
24459 (linux_cpu_translation_table): Likewise.
24460 (elf_platform) <cpu>: Define new static variable and use it.
24461 Translate kernel AT_PLATFORM name to canonical name if needed.
24462 Error if platform name is unknown.
24464 2018-02-01 Aldy Hernandez <aldyh@redhat.com>
24467 * config/pa/predicates.md (base14_operand): Handle E_VOIDmode.
24469 2018-02-01 Jeff Law <law@redhat.com>
24472 * config/i386/i386.c (release_scratch_register_on_entry): Add new
24473 OFFSET and RELEASE_VIA_POP arguments. Use SP+OFFSET to restore
24474 the scratch if RELEASE_VIA_POP is false.
24475 (ix86_adjust_stack_and_probe_stack_clash): Un-constify SIZE.
24476 If we have to save a temporary register, decrement SIZE appropriately.
24477 Pass new arguments to release_scratch_register_on_entry.
24478 (ix86_adjust_stack_and_probe): Likewise.
24479 (ix86_emit_probe_stack_range): Pass new arguments to
24480 release_scratch_register_on_entry.
24482 2018-02-01 Uros Bizjak <ubizjak@gmail.com>
24484 PR rtl-optimization/84157
24485 * combine.c (change_zero_ext): Use REG_P predicate in
24486 front of HARD_REGISTER_P predicate.
24488 2018-02-01 Georg-Johann Lay <avr@gjlay.de>
24490 * config/avr/avr.c (avr_option_override): Move disabling of
24491 -fdelete-null-pointer-checks to...
24492 * common/config/avr/avr-common.c (avr_option_optimization_table):
24495 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
24497 PR tree-optimization/81635
24498 * tree-data-ref.c (split_constant_offset_1): For types that
24499 wrap on overflow, try to use range info to prove that wrapping
24502 2018-02-01 Renlin Li <renlin.li@arm.com>
24505 * config/aarch64/aarch64.c (aarch64_class_max_nregs): Handle
24506 TAILCALL_ADDR_REGS.
24507 (aarch64_register_move_cost): Likewise.
24508 * config/aarch64/aarch64.h (reg_class): Rename CALLER_SAVE_REGS to
24509 TAILCALL_ADDR_REGS.
24510 (REG_CLASS_NAMES): Likewise.
24511 (REG_CLASS_CONTENTS): Rename CALLER_SAVE_REGS to
24512 TAILCALL_ADDR_REGS. Remove IP registers.
24513 * config/aarch64/aarch64.md (Ucs): Update register constraint.
24515 2018-02-01 Richard Biener <rguenther@suse.de>
24517 * domwalk.h (dom_walker::dom_walker): Add additional constructor
24518 for specifying RPO order and allow NULL for that.
24519 * domwalk.c (dom_walker::dom_walker): Likewise.
24520 (dom_walker::walk): Handle NULL RPO order.
24521 * tree-into-ssa.c (rewrite_dom_walker): Do not walk dom children
24523 (rewrite_update_dom_walker): Likewise.
24524 (mark_def_dom_walker): Likewise.
24526 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
24528 * config/aarch64/aarch64-protos.h (aarch64_split_sve_subreg_move)
24529 (aarch64_maybe_expand_sve_subreg_move): Declare.
24530 * config/aarch64/aarch64.md (UNSPEC_REV_SUBREG): New unspec.
24531 * config/aarch64/predicates.md (aarch64_any_register_operand): New
24533 * config/aarch64/aarch64-sve.md (mov<mode>): Optimize subreg moves
24534 that are semantically a reverse operation.
24535 (*aarch64_sve_mov<mode>_subreg_be): New pattern.
24536 * config/aarch64/aarch64.c (aarch64_maybe_expand_sve_subreg_move):
24537 (aarch64_replace_reg_mode, aarch64_split_sve_subreg_move): New
24539 (aarch64_can_change_mode_class): For big-endian, forbid changes
24540 between two SVE modes if they have different element sizes.
24542 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
24544 * config/aarch64/aarch64.c (aarch64_expand_sve_const_vector): Prefer
24545 the TImode handling for big-endian targets.
24547 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
24549 * config/aarch64/aarch64-sve.md (sve_ld1rq): Replace with...
24550 (*sve_ld1rq<Vesize>): ... this new pattern. Handle all element sizes,
24552 * config/aarch64/aarch64.c (aarch64_expand_sve_widened_duplicate):
24553 Remove BSWAP handing for big-endian targets and use the form of
24554 LD1RQ appropariate for the mode.
24556 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
24558 * config/aarch64/aarch64.c (aarch64_simd_valid_immediate): Handle
24559 all CONST_VECTOR_DUPLICATE_P vectors, not just those with a single
24560 duplicated element.
24562 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
24565 * config/aarch64/aarch64.c (aarch64_secondary_reload): Tighten
24566 check for operands that need to go through aarch64_sve_reload_be.
24568 2018-02-01 Jakub Jelinek <jakub@redhat.com>
24570 PR tree-optimization/81661
24571 PR tree-optimization/84117
24572 * tree-eh.h (rewrite_to_non_trapping_overflow): Declare.
24573 * tree-eh.c: Include gimplify.h.
24574 (find_trapping_overflow, replace_trapping_overflow,
24575 rewrite_to_non_trapping_overflow): New functions.
24576 * tree-vect-loop.c: Include tree-eh.h.
24577 (vect_get_loop_niters): Use rewrite_to_non_trapping_overflow.
24578 * tree-data-ref.c: Include tree-eh.h.
24579 (get_segment_min_max): Use rewrite_to_non_trapping_overflow.
24581 2018-01-31 Uros Bizjak <ubizjak@gmail.com>
24583 PR rtl-optimization/84123
24584 * combine.c (change_zero_ext): Check if hard register satisfies
24585 can_change_dest_mode before calling gen_lowpart_SUBREG.
24587 2018-01-31 Vladimir Makarov <vmakarov@redhat.com>
24590 * ira.c (ira_init_register_move_cost): Remove assert.
24592 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
24594 PR rtl-optimization/84071
24595 * doc/tm.texi.in (WORD_REGISTER_OPERATIONS): Add explicit case.
24596 * doc/tm.texi: Regenerate.
24598 2018-01-31 Richard Biener <rguenther@suse.de>
24600 PR tree-optimization/84132
24601 * tree-data-ref.c (analyze_miv_subscript): Properly
24602 check whether evolution_function_is_affine_multivariate_p
24603 before calling gcd_of_steps_may_divide_p.
24605 2018-01-31 Julia Koval <julia.koval@intel.com>
24608 * config/i386/i386.c (ix86_expand_builtin): Handle IX86_BUILTIN_RDPID.
24609 * config/i386/i386.md (rdpid_rex64) New.
24610 (rdpid): Make 32bit only.
24612 2018-01-29 Aldy Hernandez <aldyh@redhat.com>
24615 * tree-pretty-print.c (dump_generic_node): Handle a TYPE_NAME with
24616 an IDENTIFIER_NODE for FUNCTION_TYPE's.
24618 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
24621 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
24623 * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
24625 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
24627 PR rtl-optimization/84071
24628 * combine.c (record_dead_and_set_regs_1): Record the source unmodified
24629 for a paradoxical SUBREG on a WORD_REGISTER_OPERATIONS target.
24631 2018-01-31 Claudiu Zissulescu <claziss@synopsys.com>
24633 * config/arc/arc.c (arc_handle_aux_attribute): New function.
24634 (arc_attribute_table): Add 'aux' attribute.
24635 (arc_in_small_data_p): Consider aux like variables.
24636 (arc_is_aux_reg_p): New function.
24637 (arc_asm_output_aligned_decl_local): Ignore 'aux' like variables.
24638 (arc_get_aux_arg): New function.
24639 (prepare_move_operands): Handle aux-register access.
24640 (arc_handle_aux_attribute): New function.
24641 * doc/extend.texi (ARC Variable attributes): Add subsection.
24643 2018-01-31 Claudiu Zissulescu <claziss@synopsys.com>
24645 * config/arc/arc-protos.h (arc_is_uncached_mem_p): Function proto.
24646 * config/arc/arc.c (arc_handle_uncached_attribute): New function.
24647 (arc_attribute_table): Add 'uncached' attribute.
24648 (arc_print_operand): Print '.di' flag for uncached memory
24650 (arc_in_small_data_p): Do not consider for small data the uncached
24652 (arc_is_uncached_mem_p): New function.
24653 * config/arc/predicates.md (compact_store_memory_operand): Check
24654 for uncached memory accesses.
24655 (nonvol_nonimm_operand): Likewise.
24656 * doc/extend.texi (ARC Type Attribute): New subsection.
24658 2018-01-31 Jakub Jelinek <jakub@redhat.com>
24661 * common.opt (falign-functions=, falign-jumps=, falign-labels=,
24662 falign-loops=): Add Optimization flag.
24664 2018-01-30 Jeff Law <law@redhat.com>
24667 * i386.c (ix86_adjust_stack_and_probe_stack_clash): New argument
24668 INT_REGISTERS_SAVED. Check it prior to calling
24669 get_scratch_register_on_entry.
24670 (ix86_adjust_stack_and_probe): Similarly.
24671 (ix86_emit_probe_stack_range): Similarly.
24672 (ix86_expand_prologue): Corresponding changes.
24674 2018-01-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
24677 * config/sol2.h (STARTFILE_ARCH_SPEC): Use -std=c*,
24678 -std=iso9899:199409 instead of -pedantic to select values-Xc.o.
24680 2018-01-30 Vladimir Makarov <vmakarov@redhat.com>
24683 * lra-constraints.c (curr_insn_transform): Process AND in the
24686 2018-01-30 Jakub Jelinek <jakub@redhat.com>
24688 PR rtl-optimization/83986
24689 * sched-deps.c (sched_analyze_insn): For frame related insns, add anti
24690 dependence against last_pending_memory_flush in addition to
24691 pending_jump_insns.
24693 2018-01-30 Alexandre Oliva <aoliva@redhat.com>
24695 PR tree-optimization/81611
24696 * tree-ssa-dom.c (simple_iv_increment_p): Skip intervening
24699 2018-01-30 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
24702 * config/rs6000/rs6000.c (rs6000_internal_arg_pointer): Only return
24705 2018-01-30 Richard Biener <rguenther@suse.de>
24706 Jakub Jelinek <jakub@redhat.com>
24708 PR tree-optimization/84111
24709 * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1): Skip
24710 inner loops added during recursion, as they don't have up-to-date
24713 2018-01-30 Jan Hubicka <hubicka@ucw.cz>
24716 * ipa-inline.c (can_inline_edge_p): Break out late tests to...
24717 (can_inline_edge_by_limits_p): ... here.
24718 (can_early_inline_edge_p, check_callers,
24719 update_caller_keys, update_callee_keys, recursive_inlining,
24720 add_new_edges_to_heap, speculation_useful_p,
24721 inline_small_functions,
24722 inline_small_functions, flatten_function,
24723 inline_to_all_callers_1): Update.
24725 2018-01-30 Jan Hubicka <hubicka@ucw.cz>
24727 * profile-count.c (profile_count::combine_with_ipa_count): Handle
24730 2018-01-30 Richard Biener <rguenther@suse.de>
24732 PR tree-optimization/83008
24733 * tree-vect-slp.c (vect_analyze_slp_cost_1): Properly cost
24734 invariant and constant vector uses in stmts when they need
24735 more than one stmt.
24737 2018-01-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
24740 * configure.ac (gcc_cv_as_shf_merge): Disable on Solaris 10/x86.
24741 * configure: Regenerate.
24743 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
24745 * config/aarch64/aarch64-sve.md (*vec_extract<mode><Vel>_0): New
24747 (*vec_extract<mode><Vel>_v128): Require a nonzero lane number.
24748 Use gen_rtx_REG rather than gen_lowpart.
24750 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
24752 * lra-constraints.c (match_reload): Use subreg_lowpart_offset
24753 rather than 0 when creating partial subregs.
24755 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
24757 * vec-perm-indices.c (vec_perm_indices::series_p): Give examples
24760 2018-01-29 Michael Meissner <meissner@linux.vnet.ibm.com>
24763 * config/rs6000/rs6000.c (rs6000_setup_reg_addr_masks): If DFmode
24764 and SFmode can go in Altivec registers (-mcpu=power7 for DFmode,
24765 -mcpu=power8 for SFmode) don't set the PRE_INCDEC or PRE_MODIFY
24766 flags. This restores the settings used before the 2017-07-24.
24767 Turning off pre increment/decrement/modify allows IVOPTS to
24768 optimize DF/SF loops where the index is an int.
24770 2018-01-29 Richard Biener <rguenther@suse.de>
24771 Kelvin Nilsen <kelvin@gcc.gnu.org>
24774 * tree-vect-stmts.c (vectorizable_call): Don't call
24775 targetm.vectorize_builtin_md_vectorized_function if callee is
24778 2018-01-22 Carl Love <cel@us.ibm.com>
24780 * doc/extend.tex: Fix typo in second arg in
24781 __builtin_bcdadd_{lt|eq|gt|ov} and __builtin_bcdsub_{lt|eq|gt|ov}.
24783 2018-01-29 Richard Biener <rguenther@suse.de>
24785 PR tree-optimization/84086
24786 * tree-ssanames.c: Include cfgloop.h and tree-scalar-evolution.h.
24787 (flush_ssaname_freelist): When SSA names were released reset
24788 the SCEV hash table.
24790 2018-01-29 Richard Biener <rguenther@suse.de>
24792 PR tree-optimization/84057
24793 * tree-ssa-loop-ivcanon.c (unloop_loops): Deal with already
24794 removed paths when removing edges.
24796 2018-01-27 H.J. Lu <hongjiu.lu@intel.com>
24798 * doc/invoke.texi: Replace -mfunction-return==@var{choice} with
24799 -mfunction-return=@var{choice}.
24801 2018-01-27 Bernd Edlinger <bernd.edlinger@hotmail.de>
24803 PR diagnostic/84034
24804 * diagnostic-show-locus.c (get_line_width_without_trailing_whitespace):
24805 Handle CR like TAB.
24806 (layout::print_source_line): Likewise.
24807 (test_get_line_width_without_trailing_whitespace): Add test cases.
24809 2018-01-27 Jakub Jelinek <jakub@redhat.com>
24811 PR middle-end/84040
24812 * sched-deps.c (sched_macro_fuse_insns): Return immediately for
24815 2018-01-26 Jim Wilson <jimw@sifive.com>
24817 * config/riscv/riscv.h (MAX_FIXED_MODE_SIZE): New.
24819 * config/riscv/elf.h (LIB_SPEC): Don't include -lgloss when nosys.specs
24822 2018-01-26 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
24824 * config/aarch64/aarch64.md: Add peepholes for CMP + SUB -> SUBS
24825 and CMP + SUB-immediate -> SUBS.
24827 2018-01-26 Martin Sebor <msebor@redhat.com>
24829 PR tree-optimization/83896
24830 * tree-ssa-strlen.c (get_string_len): Rename...
24831 (get_string_cst_length): ...to this. Return HOST_WIDE_INT.
24832 Avoid assuming length is constant.
24833 (handle_char_store): Use HOST_WIDE_INT for string length.
24835 2018-01-26 Uros Bizjak <ubizjak@gmail.com>
24838 * config/i386/i386.md (*andndi3_doubleword): Add earlyclobber
24839 to (=&r,r,rm) alternative. Add (=r,0,rm) and (=r,r,0) alternatives.
24841 2018-01-26 Richard Biener <rguenther@suse.de>
24843 PR rtl-optimization/84003
24844 * dse.c (record_store): Only record redundant stores when
24845 the earlier store aliases at least all accesses the later one does.
24847 2018-01-26 Jakub Jelinek <jakub@redhat.com>
24849 PR rtl-optimization/83985
24850 * dce.c (deletable_insn_p): Return false for separate shrink wrapping
24851 REG_CFA_RESTORE insns.
24852 (delete_unmarked_insns): Don't ignore separate shrink wrapping
24853 REG_CFA_RESTORE insns here.
24856 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Don't
24857 use SSA_NAME_VAR as base for SSA_NAMEs with non-NULL SSA_NAME_VAR.
24859 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
24861 * config/arc/arc-arch.h (arc_tune_attr): Add ARC_TUNE_CORE_3.
24862 * config/arc/arc.c (arc_sched_issue_rate): Use ARC_TUNE_... .
24863 (arc_init): Likewise.
24864 (arc_override_options): Likewise.
24865 (arc_file_start): Choose Tag_ARC_CPU_variation based on arc_tune
24867 (hwloop_fail): Use TARGET_DBNZ when we want to check for dbnz insn
24869 * config/arc/arc.h (TARGET_DBNZ): Define.
24870 * config/arc/arc.md (attr tune): Add core_3, use ARC_TUNE_... to
24871 properly set the tune attribute.
24872 (dbnz): Use TARGET_DBNZ guard.
24873 * config/arc/arc.opt (mtune): Add core3 option.
24875 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
24877 * config/arc/arc.c (arc_delegitimize_address_0): Refactored to
24878 recognize new pic like addresses.
24879 (arc_delegitimize_address): Clean up.
24881 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
24883 * config/arc/arc-arches.def: Option mrf16 valid for all
24885 * config/arc/arc-c.def (__ARC_RF16__): New predefined macro.
24886 * config/arc/arc-cpus.def (em_mini): New cpu with rf16 on.
24887 * config/arc/arc-options.def (FL_RF16): Add mrf16 option.
24888 * config/arc/arc-tables.opt: Regenerate.
24889 * config/arc/arc.c (arc_conditional_register_usage): Handle
24890 reduced register file case.
24891 (arc_file_start): Set must have build attributes.
24892 * config/arc/arc.h (MAX_ARC_PARM_REGS): Conditional define using
24893 mrf16 option value.
24894 * config/arc/arc.opt (mrf16): Add new option.
24895 * config/arc/elf.h (ATTRIBUTE_PCS): Define.
24896 * config/arc/genmultilib.awk: Handle new mrf16 option.
24897 * config/arc/linux.h (ATTRIBUTE_PCS): Define.
24898 * config/arc/t-multilib: Regenerate.
24899 * doc/invoke.texi (ARC Options): Document mrf16 option.
24901 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
24903 * config/arc/arc-protos.h: Add arc_is_secure_call_p proto.
24904 * config/arc/arc.c (arc_handle_secure_attribute): New function.
24905 (arc_attribute_table): Add 'secure_call' attribute.
24906 (arc_print_operand): Print secure call operand.
24907 (arc_function_ok_for_sibcall): Don't optimize tail calls when
24909 (arc_is_secure_call_p): New function. * config/arc/arc.md
24910 (call_i): Add support for sjli instruction.
24911 (call_value_i): Likewise.
24912 * config/arc/constraints.md (Csc): New constraint.
24914 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
24915 John Eric Martin <John.Martin@emmicro-us.com>
24917 * config/arc/arc-protos.h: Add arc_is_jli_call_p proto.
24918 * config/arc/arc.c (_arc_jli_section): New struct.
24919 (arc_jli_section): New type.
24920 (rc_jli_sections): New static variable.
24921 (arc_handle_jli_attribute): New function.
24922 (arc_attribute_table): Add jli_always and jli_fixed attribute.
24923 (arc_file_end): New function.
24924 (TARGET_ASM_FILE_END): Define.
24925 (arc_print_operand): Reuse 'S' letter for JLI output instruction.
24926 (arc_add_jli_section): New function.
24927 (jli_call_scan): Likewise.
24928 (arc_reorg): Call jli_call_scan.
24929 (arc_output_addsi): Remove 'S' from printing asm operand.
24930 (arc_is_jli_call_p): New function.
24931 * config/arc/arc.md (movqi_insn): Remove 'S' from printing asm
24933 (movhi_insn): Likewise.
24934 (movsi_insn): Likewise.
24935 (movsi_set_cc_insn): Likewise.
24936 (loadqi_update): Likewise.
24937 (load_zeroextendqisi_update): Likewise.
24938 (load_signextendqisi_update): Likewise.
24939 (loadhi_update): Likewise.
24940 (load_zeroextendhisi_update): Likewise.
24941 (load_signextendhisi_update): Likewise.
24942 (loadsi_update): Likewise.
24943 (loadsf_update): Likewise.
24944 (movsicc_insn): Likewise.
24945 (bset_insn): Likewise.
24946 (bxor_insn): Likewise.
24947 (bclr_insn): Likewise.
24948 (bmsk_insn): Likewise.
24949 (bicsi3_insn): Likewise.
24950 (cmpsi_cc_c_insn): Likewise.
24951 (movsi_ne): Likewise.
24952 (movsi_cond_exec): Likewise.
24953 (clrsbsi2): Likewise.
24954 (norm_f): Likewise.
24964 (call_i): Remove 'S' asm letter, add jli instruction.
24965 (call_value_i): Likewise.
24966 * config/arc/arc.op (mjli-always): New option.
24967 * config/arc/constraints.md (Cji): New constraint.
24968 * config/arc/fpx.md (addsf3_fpx): Remove 'S' from printing asm
24970 (subsf3_fpx): Likewise.
24971 (mulsf3_fpx): Likewise.
24972 * config/arc/simdext.md (vendrec_insn): Remove 'S' from printing
24974 * doc/extend.texi (ARC): Document 'jli-always' and 'jli-fixed'
24975 function attrbutes.
24976 * doc/invoke.texi (ARC): Document mjli-always option.
24978 2018-01-26 Sebastian Perta <sebastian.perta@renesas.com>
24980 * config/rl78/rl78.c (rl78_addsi3_internal): If operand 2 is const
24981 avoid addition with 0 and use incw and decw where possible.
24983 2018-01-26 Richard Biener <rguenther@suse.de>
24985 PR tree-optimization/81082
24986 * fold-const.c (fold_plusminus_mult_expr): Do not perform the
24987 association if it requires casting to unsigned.
24988 * match.pd ((A * C) +- (B * C) -> (A+-B)): New patterns derived
24989 from fold_plusminus_mult_expr to catch important cases late when
24990 range info is available.
24992 2018-01-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
24994 * config/i386/sol2.h (USE_HIDDEN_LINKONCE): Remove.
24995 * configure.ac (hidden_linkonce): New test.
24996 * configure: Regenerate.
24997 * config.in: Regenerate.
24999 2018-01-26 Julia Koval <julia.koval@intel.com>
25001 * config/i386/avx512bitalgintrin.h (_mm512_bitshuffle_epi64_mask,
25002 _mm512_mask_bitshuffle_epi64_mask, _mm256_bitshuffle_epi64_mask,
25003 _mm256_mask_bitshuffle_epi64_mask, _mm_bitshuffle_epi64_mask,
25004 _mm_mask_bitshuffle_epi64_mask): Fix type.
25005 * config/i386/i386-builtin-types.def (UHI_FTYPE_V2DI_V2DI_UHI,
25006 USI_FTYPE_V4DI_V4DI_USI): Remove.
25007 * config/i386/i386-builtin.def (__builtin_ia32_vpshufbitqmb512_mask,
25008 __builtin_ia32_vpshufbitqmb256_mask,
25009 __builtin_ia32_vpshufbitqmb128_mask): Fix types.
25010 * config/i386/i386.c (ix86_expand_args_builtin): Remove old types.
25011 * config/i386/sse.md (VI1_AVX512VLBW): Change types.
25013 2018-01-26 Alan Modra <amodra@gmail.com>
25016 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Exclude
25017 UNSPEC_VBPERMQ. Sort other unspecs.
25019 2018-01-25 David Edelsohn <dje.gcc@gmail.com>
25021 * doc/invoke.texi (PowerPC Options): Document 'native' cpu type.
25023 2018-01-25 Jan Hubicka <hubicka@ucw.cz>
25025 PR middle-end/83055
25026 * predict.c (drop_profile): Do not push/pop cfun; update also
25028 (handle_missing_profiles): Fix logic looking for zero profiles.
25030 2018-01-25 Jakub Jelinek <jakub@redhat.com>
25032 PR middle-end/83977
25033 * ipa-fnsummary.c (compute_fn_summary): Clear can_change_signature
25034 on functions with #pragma omp declare simd or functions with simd
25036 * omp-simd-clone.c (expand_simd_clones): Revert 2018-01-24 change.
25037 * config/i386/i386.c (ix86_simd_clone_compute_vecsize_and_simdlen):
25038 Remove trailing \n from warning_at calls.
25040 2018-01-25 Tom de Vries <tom@codesourcery.com>
25043 * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
25044 for neutered workers.
25046 2018-01-24 Joseph Myers <joseph@codesourcery.com>
25049 * config/m68k/m68k.c (m68k_promote_function_mode): New function.
25050 (TARGET_PROMOTE_FUNCTION_MODE): New macro.
25052 2018-01-24 Jeff Law <law@redhat.com>
25055 * i386.c (get_probe_interval): Move to earlier point.
25056 (ix86_compute_frame_layout): If -fstack-clash-protection and
25057 the frame is larger than the probe interval, then use pushes
25058 to save registers rather than reg->mem moves.
25059 (ix86_expand_prologue): Remove conditional for int_registers_saved
25062 2018-01-24 Vladimir Makarov <vmakarov@redhat.com>
25065 * ira-build.c (setup_min_max_allocno_live_range_point): Set up
25066 min/max for never referenced object.
25068 2018-01-24 Jakub Jelinek <jakub@redhat.com>
25070 PR middle-end/83977
25071 * tree.c (free_lang_data_in_decl): Don't clear DECL_ABSTRACT_ORIGIN
25073 * omp-low.c (create_omp_child_function): Remove "omp declare simd"
25074 attributes from DECL_ATTRIBUTES (decl) without affecting
25075 DECL_ATTRIBUTES (current_function_decl).
25076 * omp-simd-clone.c (expand_simd_clones): Ignore DECL_ARTIFICIAL
25077 functions with non-NULL DECL_ABSTRACT_ORIGIN.
25079 2018-01-24 Richard Sandiford <richard.sandiford@linaro.org>
25081 PR tree-optimization/83979
25082 * fold-const.c (fold_comparison): Use constant_boolean_node
25083 instead of boolean_{true,false}_node.
25085 2018-01-24 Jan Hubicka <hubicka@ucw.cz>
25087 * ipa-profile.c (ipa_propagate_frequency_1): Fix logic skipping calls
25090 2018-01-24 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
25092 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
25093 Simplify the clause that sets the length attribute.
25094 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
25095 (*sibcall_nonlocal_sysv<mode>): Clean up code block; simplify the
25096 clause that sets the length attribute.
25097 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
25099 2018-01-24 Tom de Vries <tom@codesourcery.com>
25102 * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_2): Define to 1.
25103 (nvptx_pc_set, nvptx_condjump_label): New function. Copy from jump.c.
25104 Add strict parameter.
25105 (prevent_branch_around_nothing): Insert dummy insn between branch to
25106 label and label with no ptx insn inbetween.
25107 * config/nvptx/nvptx.md (define_insn "fake_nop"): New insn.
25109 2018-01-24 Tom de Vries <tom@codesourcery.com>
25112 * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
25113 for neutered threads in warp.
25114 * config/nvptx/nvptx.md (define_insn "exit"): New insn.
25116 2018-01-24 Richard Biener <rguenther@suse.de>
25118 PR tree-optimization/83176
25119 * tree-chrec.c (chrec_fold_plus_1): Handle (signed T){(T) .. }
25122 2018-01-24 Richard Biener <rguenther@suse.de>
25124 PR tree-optimization/82819
25125 * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Avoid
25126 code generating pluses that are no-ops in the target precision.
25128 2018-01-24 Richard Biener <rguenther@suse.de>
25130 PR middle-end/84000
25131 * tree-cfg.c (replace_loop_annotate): Handle annot_expr_parallel_kind.
25133 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
25135 * cfgcleanup.c (try_crossjump_to_edge): Use combine_with_count
25136 to merge probabilities.
25137 * predict.c (probably_never_executed): Also mark as cold functions
25138 with global 0 profile and guessed local profile.
25139 * profile-count.c (profile_probability::combine_with_count): New
25141 * profile-count.h (profile_probability::operator*,
25142 profile_probability::operator*=, profile_probability::operator/,
25143 profile_probability::operator/=): Reduce precision to adjusted
25144 and set value to guessed on contradictory divisions.
25145 (profile_probability::combine_with_freq): Remove.
25146 (profile_probability::combine_wiht_count): Declare.
25147 (profile_count::force_nonzero):: Set to adjusted.
25148 (profile_count::probability_in):: Set quality to adjusted.
25149 * tree-ssa-tail-merge.c (replace_block_by): Use
25150 combine_with_count.
25152 2018-01-23 Andrew Waterman <andrew@sifive.com>
25153 Jim Wilson <jimw@sifive.com>
25155 * config/riscv/riscv.c (riscv_stack_boundary): New.
25156 (riscv_option_override): Set riscv_stack_boundary. Handle
25157 riscv_preferred_stack_boundary_arg.
25158 * config/riscv/riscv.h (MIN_STACK_BOUNDARY, ABI_STACK_BOUNDARY): New.
25159 (BIGGEST_ALIGNMENT): Set to STACK_BOUNDARY.
25160 (STACK_BOUNDARY): Set to riscv_stack_boundary.
25161 (RISCV_STACK_ALIGN): Use STACK_BOUNDARY.
25162 * config/riscv/riscv.opt (mpreferred-stack-boundary): New.
25163 * doc/invoke.tex (RISC-V Options): Add -mpreferred-stack-boundary.
25165 2018-01-23 H.J. Lu <hongjiu.lu@intel.com>
25168 * config/i386/i386.c (ix86_expand_prologue): Use cost reference
25169 of struct ix86_frame.
25170 (ix86_expand_epilogue): Likewise. Add a local variable for
25171 the reg_save_offset field in struct ix86_frame.
25173 2018-01-23 Bin Cheng <bin.cheng@arm.com>
25175 PR tree-optimization/82604
25176 * tree-loop-distribution.c (enum partition_kind): New enum item
25177 PKIND_PARTIAL_MEMSET.
25178 (partition_builtin_p): Support above new enum item.
25179 (generate_code_for_partition): Ditto.
25180 (compute_access_range): Differentiate cases that equality can be
25181 proven at all loops, the innermost loops or no loops.
25182 (classify_builtin_st, classify_builtin_ldst): Adjust call to above
25183 function. Set PKIND_PARTIAL_MEMSET for partition appropriately.
25184 (finalize_partitions, distribute_loop): Don't fuse partition of
25185 PKIND_PARTIAL_MEMSET kind when distributing 3-level loop nest.
25186 (prepare_perfect_loop_nest): Distribute 3-level loop nest only if
25187 parloop is enabled.
25189 2018-01-23 Martin Liska <mliska@suse.cz>
25191 * predict.def (PRED_INDIR_CALL): Set probability to PROB_EVEN in
25192 order to ignore the predictor.
25193 (PRED_POLYMORPHIC_CALL): Likewise.
25194 (PRED_RECURSIVE_CALL): Likewise.
25196 2018-01-23 Martin Liska <mliska@suse.cz>
25198 * tree-profile.c (tree_profiling): Print function header to
25199 aware reader which function we are working on.
25200 * value-prof.c (gimple_find_values_to_profile): Do not print
25201 not interesting value histograms.
25203 2018-01-23 Martin Liska <mliska@suse.cz>
25205 * profile-count.h (enum profile_quality): Add
25206 profile_uninitialized as the first value. Do not number values
25207 as they are zero based.
25208 (profile_count::verify): Update sanity check.
25209 (profile_probability::verify): Likewise.
25211 2018-01-23 Nathan Sidwell <nathan@acm.org>
25213 * doc/invoke.texi (ffor-scope): Deprecate.
25215 2018-01-23 David Malcolm <dmalcolm@redhat.com>
25217 PR tree-optimization/83510
25218 * domwalk.c (set_all_edges_as_executable): New function.
25219 (dom_walker::dom_walker): Convert bool param
25220 "skip_unreachable_blocks" to enum reachability. Move setup of
25221 edge flags to set_all_edges_as_executable and only do it when
25222 reachability is REACHABLE_BLOCKS.
25223 * domwalk.h (enum dom_walker::reachability): New enum.
25224 (dom_walker::dom_walker): Convert bool param
25225 "skip_unreachable_blocks" to enum reachability.
25226 (set_all_edges_as_executable): New decl.
25227 * graphite-scop-detection.c (gather_bbs::gather_bbs): Convert
25228 from false for "skip_unreachable_blocks" to ALL_BLOCKS for
25230 * tree-ssa-dom.c (dom_opt_dom_walker::dom_opt_dom_walker): Likewise,
25231 but converting true to REACHABLE_BLOCKS.
25232 * tree-ssa-sccvn.c (sccvn_dom_walker::sccvn_dom_walker): Likewise.
25234 (check_array_bounds_dom_walker::check_array_bounds_dom_walker):
25235 Likewise, but converting it to REACHABLE_BLOCKS_PRESERVING_FLAGS.
25236 (vrp_dom_walker::vrp_dom_walker): Likewise, but converting it to
25238 (vrp_prop::vrp_finalize): Call set_all_edges_as_executable
25239 if check_all_array_refs will be called.
25241 2018-01-23 David Malcolm <dmalcolm@redhat.com>
25243 * tree.c (selftest::test_location_wrappers): Add more test
25246 2018-01-23 David Malcolm <dmalcolm@redhat.com>
25248 * sbitmap.c (selftest::test_set_range): Fix memory leaks.
25249 (selftest::test_bit_in_range): Likewise.
25251 2018-01-23 Richard Sandiford <richard.sandiford@linaro.org>
25254 * doc/sourcebuild.texi (vect_float): Say that the selector
25255 only describes the situation when -funsafe-math-optimizations is on.
25256 (vect_float_strict): Document.
25258 2018-01-23 Richard Sandiford <richard.sandiford@linaro.org>
25260 PR tree-optimization/83965
25261 * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
25262 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern): Use it
25263 instead of checking only for a reduction.
25264 (vect_recog_widen_sum_pattern): Likewise.
25266 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
25268 * predict.c (probably_never_executed): Only use precise profile info.
25269 (compute_function_frequency): Skip after inlining hack since we now
25270 have quality checking.
25272 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
25274 * profile-count.h (profile_probability::very_unlikely,
25275 profile_probability::unlikely, profile_probability::even): Set
25276 precision to guessed.
25278 2018-01-23 Richard Biener <rguenther@suse.de>
25280 PR tree-optimization/83963
25281 * graphite-scop-detection.c (scop_detection::harmful_loop_in_region):
25282 Properly terminate dominator walk when crossing the exit edge not
25283 when visiting its source block.
25285 2018-01-23 Jakub Jelinek <jakub@redhat.com>
25288 * tree.c (maybe_wrap_with_location): Use NON_LVALUE_EXPR rather than
25289 VIEW_CONVERT_EXPR to wrap CONST_DECLs.
25291 2018-01-22 Jakub Jelinek <jakub@redhat.com>
25293 PR tree-optimization/83957
25294 * omp-expand.c (expand_omp_for_generic): Ignore virtual PHIs. Remove
25295 semicolon after for body surrounded by braces.
25297 PR tree-optimization/83081
25298 * profile-count.h (profile_probability::split): New method.
25299 * dojump.c (do_jump_1) <case TRUTH_ANDIF_EXPR, case TRUTH_ORIF_EXPR>:
25300 Use profile_probability::split.
25301 (do_compare_rtx_and_jump): Fix adjustment of probabilities
25302 when splitting a single conditional jump into 2.
25304 2018-01-22 David Malcolm <dmalcolm@redhat.com>
25306 PR tree-optimization/69452
25307 * tree-ssa-loop-im.c (class move_computations_dom_walker): Remove
25310 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
25312 * config/rl78/rl78-expand.md (bswaphi2): New define_expand.
25313 * config/rl78/rl78-virt.md (*bswaphi2_virt): New define_insn.
25314 * config/rl78/rl78-real.md (*bswaphi2_real): New define_insn.
25316 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
25318 * config/rl78/rl78-protos.h (rl78_split_movdi): New function
25320 * config/rl78/rl78.md (movdi): New define_expand.
25321 * config/rl78/rl78.c (rl78_split_movdi): New function.
25323 2018-01-22 Michael Meissner <meissner@linux.vnet.ibm.com>
25326 * config/rs6000/rs6000-protos.h (rs6000_split_signbit): Delete,
25328 * config/rs6000/rs6000.c (rs6000_split_signbit): Likewise.
25329 * config/rs6000/rs6000.md (signbit<mode>2): Change code for IEEE
25330 128-bit to produce an UNSPEC move to get the double word with the
25331 signbit and then a shift directly to do signbit.
25332 (signbit<mode>2_dm): Replace old IEEE 128-bit signbit
25333 implementation with a new version that just does either a direct
25334 move or a regular move. Move memory interface to separate insns.
25335 Move insns so they are next to the expander.
25336 (signbit<mode>2_dm_mem_be): New combiner insns to combine load
25337 with signbit move. Split big and little endian case.
25338 (signbit<mode>2_dm_mem_le): Likewise.
25339 (signbit<mode>2_dm_<su>ext): Delete, no longer used.
25340 (signbit<mode>2_dm2): Likewise.
25342 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
25344 * config/rl78/rl78.md (anddi3): New define_expand.
25346 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
25348 * config/rl78/rl78.md (umindi3): New define_expand.
25350 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
25352 * config/rl78/rl78.md (smindi3): New define_expand.
25354 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
25356 * config/rl78/rl78.md (smaxdi3): New define_expand.
25358 2018-01-22 Carl Love <cel@us.ibm.com>
25360 * config/rs6000/rs6000-builtin.def (ST_ELEMREV_V1TI, LD_ELEMREV_V1TI,
25361 LVX_V1TI): Add macro expansion.
25362 * config/rs6000/rs6000-c.c (altivec_builtin_types): Add argument
25363 definitions for VSX_BUILTIN_VEC_XST_BE, VSX_BUILTIN_VEC_ST,
25364 VSX_BUILTIN_VEC_XL, LD_ELEMREV_V1TI builtins.
25365 * config/rs6000/rs6000-p8swap.c (insn_is_swappable_p);
25366 Change check to determine if the instruction is a byte reversing
25367 entry. Fix typo in comment.
25368 * config/rs6000/rs6000.c (altivec_expand_builtin): Add case entry
25369 for VSX_BUILTIN_ST_ELEMREV_V1TI and VSX_BUILTIN_LD_ELEMREV_V1TI.
25370 Add def_builtin calls for new builtins.
25371 * config/rs6000/vsx.md (vsx_st_elemrev_v1ti, vsx_ld_elemrev_v1ti):
25372 Add define_insn expansion.
25374 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
25376 * config/rl78/rl78.md (umaxdi3): New define_expand.
25378 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
25380 * config/rl78/rl78.c (rl78_note_reg_set): Fixed dead reg check
25381 for non-QImode registers.
25383 2018-01-22 Richard Biener <rguenther@suse.de>
25385 PR tree-optimization/83963
25386 * graphite-scop-detection.c (scop_detection::get_sese): Delay
25387 including the loop exit block.
25388 (scop_detection::merge_sese): Likewise.
25389 (scop_detection::add_scop): Do it here instead.
25391 2018-01-22 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
25393 * doc/sourcebuild.texi (arm_softfloat): Document.
25395 2018-01-21 John David Anglin <danglin@gcc.gnu.org>
25398 * config/pa/pa.c (pa_function_ok_for_sibcall): Use
25399 targetm.binds_local_p instead of TREE_PUBLIC to check local binding.
25400 Move TARGET_PORTABLE_RUNTIME check after TARGET_64BIT check.
25402 2018-01-21 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
25403 David Edelsohn <dje.gcc@gmail.com>
25406 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
25407 Change "crset eq" to "crset 2".
25408 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
25409 (*call_indirect_aix<mode>_nospec): Likewise.
25410 (*call_value_indirect_aix<mode>_nospec): Likewise.
25411 (*call_indirect_elfv2<mode>_nospec): Likewise.
25412 (*call_value_indirect_elfv2<mode>_nospec): Likewise.
25413 (*sibcall_nonlocal_sysv<mode>): Change "crset eq" to "crset 2";
25414 change assembly output from . to $.
25415 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
25416 (indirect_jump<mode>_nospec): Change assembly output from . to $.
25417 (*tablejump<mode>_internal1_nospec): Likewise.
25419 2018-01-21 Oleg Endo <olegendo@gcc.gnu.org>
25422 * config/sh/sh_optimize_sett_clrt.cc:
25423 Use INCLUDE_ALGORITHM and INCLUDE_VECTOR instead of direct includes.
25425 2018-01-20 Richard Sandiford <richard.sandiford@linaro.org>
25427 PR tree-optimization/83940
25428 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Set
25429 offset_dt to vect_constant_def rather than vect_unknown_def_type.
25430 (vect_check_load_store_mask): Add a mask_dt_out parameter and
25431 use it to pass back the definition type.
25432 (vect_check_store_rhs): Likewise rhs_dt_out.
25433 (vect_build_gather_load_calls): Add a mask_dt argument and use
25434 it instead of a call to vect_is_simple_use.
25435 (vectorizable_store): Update calls to vect_check_load_store_mask
25436 and vect_check_store_rhs. Use the dt returned by the latter instead
25437 of scatter_src_dt. Use the cached mask_dt and gs_info.offset_dt
25438 instead of calls to vect_is_simple_use. Pass the scalar rather
25439 than the vector operand to vect_is_simple_use when handling
25440 second and subsequent copies of an rhs value.
25441 (vectorizable_load): Update calls to vect_check_load_store_mask
25442 and vect_build_gather_load_calls. Use the cached mask_dt and
25443 gs_info.offset_dt instead of calls to vect_is_simple_use.
25445 2018-01-20 Jakub Jelinek <jakub@redhat.com>
25447 PR middle-end/83945
25448 * tree-emutls.c: Include gimplify.h.
25449 (lower_emutls_2): New function.
25450 (lower_emutls_1): If ADDR_EXPR is a gimple invariant and walk_tree
25451 with lower_emutls_2 callback finds some TLS decl in it, unshare_expr
25452 it before further processing.
25455 * simplify-rtx.c (simplify_binary_operation_1) <case UMOD>: Use
25456 UINTVAL (trueop1) instead of INTVAL (op1).
25458 2018-01-19 Jakub Jelinek <jakub@redhat.com>
25462 * dwarf2cfi.c (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define to
25463 INCOMING_FRAME_SP_OFFSET if not defined.
25464 (scan_trace): Add ENTRY argument. If true and
25465 DEFAULT_INCOMING_FRAME_SP_OFFSET != INCOMING_FRAME_SP_OFFSET,
25466 emit a note to adjust the CFA offset.
25467 (create_cfi_notes): Adjust scan_trace callers.
25468 (create_cie_data): Use DEFAULT_INCOMING_FRAME_SP_OFFSET rather than
25469 INCOMING_FRAME_SP_OFFSET in the CIE.
25470 * config/i386/i386.h (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define.
25471 * config/stormy16/stormy16.h (DEFAULT_INCOMING_FRAME_SP_OFFSET):
25473 * doc/tm.texi.in (DEFAULT_INCOMING_FRAME_SP_OFFSET): Document.
25474 * doc/tm.texi: Regenerated.
25476 2018-01-19 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
25478 PR rtl-optimization/83147
25479 * lra-constraints.c (remove_inheritance_pseudos): Use
25480 lra_substitute_pseudo_within_insn.
25482 2018-01-19 Tom de Vries <tom@codesourcery.com>
25483 Cesar Philippidis <cesar@codesourcery.com>
25486 * config/nvptx/nvptx.c (nvptx_single): Fix jit workaround.
25488 2018-01-19 Cesar Philippidis <cesar@codesourcery.com>
25491 * config/nvptx/nvptx.c (output_init_frag): Don't use generic address
25492 spaces for function labels.
25494 2018-01-19 Martin Liska <mliska@suse.cz>
25496 * predict.def (PRED_LOOP_EXIT): Change from 85 to 89.
25497 (PRED_LOOP_EXIT_WITH_RECURSION): Change from 72 to 78.
25498 (PRED_LOOP_EXTRA_EXIT): Change from 83 to 67.
25499 (PRED_OPCODE_POSITIVE): Change from 64 to 59.
25500 (PRED_TREE_OPCODE_POSITIVE): Change from 64 to 59.
25501 (PRED_CONST_RETURN): Change from 69 to 65.
25502 (PRED_NULL_RETURN): Change from 91 to 71.
25503 (PRED_LOOP_IV_COMPARE_GUESS): Change from 98 to 64.
25504 (PRED_LOOP_GUARD): Change from 66 to 73.
25506 2018-01-19 Martin Liska <mliska@suse.cz>
25508 * predict.c (predict_insn_def): Add new assert.
25509 (struct branch_predictor): Change type to signed integer.
25510 (test_prediction_value_range): Amend test to cover
25511 PROB_UNINITIALIZED.
25512 * predict.def (PRED_LOOP_ITERATIONS): Use the new constant.
25513 (PRED_LOOP_ITERATIONS_GUESSED): Likewise.
25514 (PRED_LOOP_ITERATIONS_MAX): Likewise.
25515 (PRED_LOOP_IV_COMPARE): Likewise.
25516 * predict.h (PROB_UNINITIALIZED): Define new constant.
25518 2018-01-19 Martin Liska <mliska@suse.cz>
25520 * predict.c (dump_prediction): Add new format for
25521 analyze_brprob.py script which is enabled with -details
25523 * profile-count.h (precise_p): New function.
25525 2018-01-19 Richard Sandiford <richard.sandiford@linaro.org>
25527 PR tree-optimization/83922
25528 * tree-vect-loop.c (vect_verify_full_masking): Return false if
25529 there are no statements that need masking.
25530 (vect_active_double_reduction_p): New function.
25531 (vect_analyze_loop_operations): Use it when handling phis that
25532 are not in the loop header.
25534 2018-01-19 Richard Sandiford <richard.sandiford@linaro.org>
25536 PR tree-optimization/83914
25537 * tree-vect-loop.c (vectorizable_induction): Don't convert
25538 init_expr or apply the peeling adjustment for inductions
25539 that are nested within the vectorized loop.
25541 2018-01-19 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
25543 * config/arm/thumb2.md (*thumb2_negsi2_short): Use RSB mnemonic
25546 2018-01-18 Jakub Jelinek <jakub@redhat.com>
25550 * function.h (gimplify_parameters): Add gimple_seq * argument.
25551 * function.c: Include gimple.h and options.h.
25552 (gimplify_parameters): Add cleanup argument, add CLOBBER stmts
25553 for the added local temporaries if needed.
25554 * gimplify.c (gimplify_body): Adjust gimplify_parameters caller,
25555 if there are any parameter cleanups, wrap whole body into a
25556 try/finally with the cleanups.
25558 2018-01-18 Wilco Dijkstra <wdijkstr@arm.com>
25561 * config/aarch64/aarch64.c (aarch64_legitimate_constant_p):
25562 Use GET_MODE_CLASS for scalar floating point.
25564 2018-01-18 Jan Hubicka <hubicka@ucw.cz>
25568 * cgraphclones.c (cgraph_node::create_version_clone_with_body):
25569 Fix call of call_cgraph_insertion_hooks.
25571 2018-01-18 Martin Sebor <msebor@redhat.com>
25573 * doc/invoke.texi (-Wclass-memaccess): Tweak text.
25575 2018-01-18 Jan Hubicka <hubicka@ucw.cz>
25578 * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Update edge
25581 2018-01-18 Boris Kolpackov <boris@codesynthesis.com>
25584 * common.opt: (-ffile-prefix-map): New option.
25585 * opts.c (common_handle_option): Defer it.
25586 * opts-global.c (handle_common_deferred_options): Handle it.
25587 * debug.h (remap_debug_filename, add_debug_prefix_map): Move to...
25588 * file-prefix-map.h: New file.
25589 (remap_debug_filename, add_debug_prefix_map): ...here.
25590 (add_macro_prefix_map, add_file_prefix_map, remap_macro_filename): New.
25591 * final.c (debug_prefix_map, add_debug_prefix_map
25592 remap_debug_filename): Move to...
25593 * file-prefix-map.c: New file.
25594 (file_prefix_map, add_prefix_map, remap_filename) ...here and rename,
25595 generalize, get rid of alloca(), use strrchr() instead of strchr().
25596 (add_macro_prefix_map, add_debug_prefix_map, add_file_prefix_map):
25597 Implement in terms of add_prefix_map().
25598 (remap_macro_filename, remap_debug_filename): Implement in term of
25600 * Makefile.in (OBJS, PLUGIN_HEADERS): Add new files.
25601 * builtins.c (fold_builtin_FILE): Call remap_macro_filename().
25602 * dbxout.c: Include file-prefix-map.h.
25603 * varasm.c: Likewise.
25604 * vmsdbgout.c: Likewise.
25605 * xcoffout.c: Likewise.
25606 * dwarf2out.c: Likewise plus omit new options from DW_AT_producer.
25607 * doc/cppopts.texi (-fmacro-prefix-map): Document.
25608 * doc/invoke.texi (-ffile-prefix-map): Document.
25609 (-fdebug-prefix-map): Update description.
25611 2018-01-18 Martin Liska <mliska@suse.cz>
25613 * config/i386/i386.c (indirect_thunk_name): Document that also
25615 (output_indirect_thunk): Document why both instructions
25616 (pause and lfence) are generated.
25618 2018-01-18 Richard Biener <rguenther@suse.de>
25620 PR tree-optimization/83887
25621 * graphite-scop-detection.c
25622 (scop_detection::get_nearest_dom_with_single_entry): Remove.
25623 (scop_detection::get_nearest_pdom_with_single_exit): Likewise.
25624 (scop_detection::merge_sese): Re-implement with a flood-fill
25625 algorithm that properly finds a SESE region if it exists.
25627 2018-01-18 Jakub Jelinek <jakub@redhat.com>
25630 * match.pd ((P + A) - P, P - (P + A), (P + A) - (P + B)): For
25631 pointer_diff optimizations use view_convert instead of convert.
25633 2018-01-17 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
25635 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
25636 Generate different code for -mno-speculate-indirect-jumps.
25637 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
25638 (*call_indirect_aix<mode>): Disable for
25639 -mno-speculate-indirect-jumps.
25640 (*call_indirect_aix<mode>_nospec): New define_insn.
25641 (*call_value_indirect_aix<mode>): Disable for
25642 -mno-speculate-indirect-jumps.
25643 (*call_value_indirect_aix<mode>_nospec): New define_insn.
25644 (*sibcall_nonlocal_sysv<mode>): Generate different code for
25645 -mno-speculate-indirect-jumps.
25646 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
25648 2018-01-17 Michael Meissner <meissner@linux.vnet.ibm.com>
25650 * config/rs6000/rs6000.c (rs6000_emit_move): If we load or store a
25651 long double type, set the flags for noting the default long double
25652 type, even if we don't pass or return a long double type.
25654 2018-01-17 Jan Hubicka <hubicka@ucw.cz>
25657 * ipa-inline.c (flatten_function): Do not overwrite final inlining
25660 2018-01-17 Will Schmidt <will_schmidt@vnet.ibm.com>
25662 * config/rs6000/rs6000.c (rs6000_gimple_builtin): Add gimple folding
25663 support for merge[hl].
25664 (fold_mergehl_helper): New helper function.
25665 (tree-vector-builder.h): New #include for tree_vector_builder usage.
25666 * config/rs6000/altivec.md (altivec_vmrghw_direct): Add xxmrghw insn.
25667 (altivec_vmrglw_direct): Add xxmrglw insn.
25669 2018-01-17 Andrew Waterman <andrew@sifive.com>
25671 * config/riscv/riscv.c (riscv_conditional_register_usage): If
25672 UNITS_PER_FP_ARG is 0, set call_used_regs to 1 for all FP regs.
25674 2018-01-17 David Malcolm <dmalcolm@redhat.com>
25677 * ipa-devirt.c (add_type_duplicate): When comparing memory layout,
25678 call the lto_location_cache before reading the
25679 DECL_SOURCE_LOCATION of the types.
25681 2018-01-17 Wilco Dijkstra <wdijkstr@arm.com>
25682 Richard Sandiford <richard.sandiford@linaro.org>
25684 * config/aarch64/aarch64.md (movti_aarch64): Use Uti constraint.
25685 * config/aarch64/aarch64.c (aarch64_mov128_immediate): New function.
25686 (aarch64_legitimate_constant_p): Just support CONST_DOUBLE
25687 SF/DF/TF mode to avoid creating illegal CONST_WIDE_INT immediates.
25688 * config/aarch64/aarch64-protos.h (aarch64_mov128_immediate):
25690 * config/aarch64/constraints.md (aarch64_movti_operand):
25692 * config/aarch64/predicates.md (Uti): Add new constraint.
25694 2018-01-17 Carl Love <cel@us.ibm.com>
25696 * config/rs6000/vsx.md (define_expand xl_len_r,
25697 define_expand stxvl, define_expand *stxvl): Add match_dup argument.
25698 (define_insn): Add, match_dup 1 argument to define_insn stxvll and
25700 (define_expand, define_insn): Move the shift left from the
25701 define_insn to the define_expand for lxvl and stxvl instructions.
25702 * config/rs6000/rs6000-builtin.def (BU_P9V_64BIT_VSX_2): Change LXVL
25703 and XL_LEN_R definitions to PURE.
25705 2018-01-17 Uros Bizjak <ubizjak@gmail.com>
25707 * config/i386/i386.c (indirect_thunk_name): Declare regno
25708 as unsigned int. Compare regno with INVALID_REGNUM.
25709 (output_indirect_thunk): Ditto.
25710 (output_indirect_thunk_function): Ditto.
25711 (ix86_code_end): Declare regno as unsigned int. Use INVALID_REGNUM
25712 in the call to output_indirect_thunk_function.
25714 2018-01-17 Richard Sandiford <richard.sandiford@linaro.org>
25716 PR middle-end/83884
25717 * expr.c (expand_expr_real_1): Use the size of GET_MODE (op0)
25718 rather than the size of inner_type to determine the stack slot size
25719 when handling VIEW_CONVERT_EXPRs on strict-alignment targets.
25721 2018-01-16 Sebastian Peryt <sebastian.peryt@intel.com>
25724 * config/i386/i386.c (ix86_option_override_internal): Add PTA_RDRND
25727 2018-01-16 Michael Meissner <meissner@linux.vnet.ibm.com>
25729 * config.gcc (powerpc*-linux*-*): Add support for 64-bit little
25730 endian Linux systems to optionally enable multilibs for selecting
25731 the long double type if the user configured an explicit type.
25732 * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Indicate we
25733 have no long double multilibs if not defined.
25734 * config/rs6000/rs6000.c (rs6000_option_override_internal): Do not
25735 warn if the user used -mabi={ieee,ibm}longdouble and we built
25736 multilibs for long double.
25737 * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Define as the
25738 appropriate multilib option.
25739 (MULTILIB_DEFAULTS): Add MULTILIB_DEFAULTS_IEEE to the default
25741 * config/rs6000/t-ldouble-linux64le-ibm: New configuration files
25742 for building long double multilibs.
25743 * config/rs6000/t-ldouble-linux64le-ieee: Likewise.
25745 2018-01-16 John David Anglin <danglin@gcc.gnu.org>
25747 * config.gcc (hppa*-*-linux*): Change callee copies ABI to caller
25750 * config/pa.h (MALLOC_ABI_ALIGNMENT): Set 32-bit alignment default to
25752 * config/pa/pa32-linux.h (MALLOC_ABI_ALIGNMENT): Set alignment to
25755 * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Cleanup type and mode
25758 * config/pa/pa.c (pa_function_arg_size): Apply CEIL to GET_MODE_SIZE
25761 2018-01-16 Eric Botcazou <ebotcazou@adacore.com>
25763 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For an
25764 ADDR_EXPR, do not count the offset of a COMPONENT_REF twice.
25766 2018-01-16 Kelvin Nilsen <kelvin@gcc.gnu.org>
25768 * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Generate
25769 different rtl trees depending on TARGET_64BIT.
25770 (rs6000_gen_lvx): Likewise.
25772 2018-01-16 Eric Botcazou <ebotcazou@adacore.com>
25774 * config/visium/visium.md (nop): Tweak comment.
25775 (hazard_nop): Likewise.
25777 2018-01-16 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
25779 * config/rs6000/rs6000.c (rs6000_opt_vars): Add entry for
25780 -mspeculate-indirect-jumps.
25781 * config/rs6000/rs6000.md (*call_indirect_elfv2<mode>): Disable
25782 for -mno-speculate-indirect-jumps.
25783 (*call_indirect_elfv2<mode>_nospec): New define_insn.
25784 (*call_value_indirect_elfv2<mode>): Disable for
25785 -mno-speculate-indirect-jumps.
25786 (*call_value_indirect_elfv2<mode>_nospec): New define_insn.
25787 (indirect_jump): Emit different RTL for
25788 -mno-speculate-indirect-jumps.
25789 (*indirect_jump<mode>): Disable for
25790 -mno-speculate-indirect-jumps.
25791 (*indirect_jump<mode>_nospec): New define_insn.
25792 (tablejump): Emit different RTL for
25793 -mno-speculate-indirect-jumps.
25794 (tablejumpsi): Disable for -mno-speculate-indirect-jumps.
25795 (tablejumpsi_nospec): New define_expand.
25796 (tablejumpdi): Disable for -mno-speculate-indirect-jumps.
25797 (tablejumpdi_nospec): New define_expand.
25798 (*tablejump<mode>_internal1): Disable for
25799 -mno-speculate-indirect-jumps.
25800 (*tablejump<mode>_internal1_nospec): New define_insn.
25801 * config/rs6000/rs6000.opt (mspeculate-indirect-jumps): New
25804 2018-01-16 Artyom Skrobov tyomitch@gmail.com
25806 * caller-save.c (insert_save): Drop unnecessary parameter. All
25809 2018-01-16 Jakub Jelinek <jakub@redhat.com>
25810 Richard Biener <rguenth@suse.de>
25813 * gimplify.c (gimplify_one_sizepos): For is_gimple_constant (expr)
25814 return early, inline manually is_gimple_sizepos. Make sure if we
25815 call gimplify_expr we don't end up with a gimple constant.
25816 * tree.c (variably_modified_type_p): Don't return true for
25817 is_gimple_constant (_t). Inline manually is_gimple_sizepos.
25818 * gimplify.h (is_gimple_sizepos): Remove.
25820 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
25822 PR tree-optimization/83857
25823 * tree-vect-loop.c (vect_analyze_loop_operations): Don't call
25824 vectorizable_live_operation for pure SLP statements.
25825 (vectorizable_live_operation): Handle PHIs.
25827 2018-01-16 Richard Biener <rguenther@suse.de>
25829 PR tree-optimization/83867
25830 * tree-vect-stmts.c (vect_transform_stmt): Precompute
25831 nested_in_vect_loop_p since the scalar stmt may get invalidated.
25833 2018-01-16 Jakub Jelinek <jakub@redhat.com>
25836 * stor-layout.c (handle_warn_if_not_align): Use byte_position and
25837 multiple_of_p instead of unchecked tree_to_uhwi and UHWI check.
25838 If off is not INTEGER_CST, issue a may not be aligned warning
25839 rather than isn't aligned. Use isn%'t rather than isn't.
25840 * fold-const.c (multiple_of_p) <case BIT_AND_EXPR>: Don't fall through
25842 <case MULT_EXPR>: Improve the case when bottom and one of the
25843 MULT_EXPR operands are INTEGER_CSTs and bottom is multiple of that
25844 operand, in that case check if the other operand is multiple of
25845 bottom divided by the INTEGER_CST operand.
25847 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
25850 * config/pa/pa.h (FUNCTION_ARG_SIZE): Delete.
25851 * config/pa/pa-protos.h (pa_function_arg_size): Declare.
25852 * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Use
25853 pa_function_arg_size instead of FUNCTION_ARG_SIZE.
25854 * config/pa/pa.c (pa_function_arg_advance): Likewise.
25855 (pa_function_arg, pa_arg_partial_bytes): Likewise.
25856 (pa_function_arg_size): New function.
25858 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
25860 * fold-const.c (fold_ternary_loc): Construct the vec_perm_indices
25861 in a separate statement.
25863 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
25865 PR tree-optimization/83847
25866 * tree-vect-data-refs.c (vect_analyze_data_ref_accesses): Don't
25867 group gathers and scatters.
25869 2018-01-16 Jakub Jelinek <jakub@redhat.com>
25871 PR rtl-optimization/86620
25872 * params.def (max-sched-ready-insns): Bump minimum value to 1.
25874 PR rtl-optimization/83213
25875 * recog.c (peep2_attempt): Copy over CROSSING_JUMP_P from peepinsn
25876 to last if both are JUMP_INSNs.
25878 PR tree-optimization/83843
25879 * gimple-ssa-store-merging.c
25880 (imm_store_chain_info::output_merged_store): Handle bit_not_p on
25881 store_immediate_info for bswap/nop orig_stores.
25883 2018-01-15 Andrew Waterman <andrew@sifive.com>
25885 * config/riscv/riscv.c (riscv_rtx_costs) <MULT>: Increase cost if
25887 <UDIV>: Increase cost if !TARGET_DIV.
25889 2018-01-15 Segher Boessenkool <segher@kernel.crashing.org>
25891 * config/rs6000/rs6000.md (define_attr "type"): Remove delayed_cr.
25892 (define_attr "cr_logical_3op"): New.
25893 (cceq_ior_compare): Adjust.
25894 (cceq_ior_compare_complement): Adjust.
25895 (*cceq_rev_compare): Adjust.
25896 * config/rs6000/rs6000.c (rs6000_adjust_cost): Adjust.
25897 (is_cracked_insn): Adjust.
25898 (insn_must_be_first_in_group): Adjust.
25899 * config/rs6000/40x.md: Adjust.
25900 * config/rs6000/440.md: Adjust.
25901 * config/rs6000/476.md: Adjust.
25902 * config/rs6000/601.md: Adjust.
25903 * config/rs6000/603.md: Adjust.
25904 * config/rs6000/6xx.md: Adjust.
25905 * config/rs6000/7450.md: Adjust.
25906 * config/rs6000/7xx.md: Adjust.
25907 * config/rs6000/8540.md: Adjust.
25908 * config/rs6000/cell.md: Adjust.
25909 * config/rs6000/e300c2c3.md: Adjust.
25910 * config/rs6000/e500mc.md: Adjust.
25911 * config/rs6000/e500mc64.md: Adjust.
25912 * config/rs6000/e5500.md: Adjust.
25913 * config/rs6000/e6500.md: Adjust.
25914 * config/rs6000/mpc.md: Adjust.
25915 * config/rs6000/power4.md: Adjust.
25916 * config/rs6000/power5.md: Adjust.
25917 * config/rs6000/power6.md: Adjust.
25918 * config/rs6000/power7.md: Adjust.
25919 * config/rs6000/power8.md: Adjust.
25920 * config/rs6000/power9.md: Adjust.
25921 * config/rs6000/rs64.md: Adjust.
25922 * config/rs6000/titan.md: Adjust.
25924 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
25926 * config/i386/predicates.md (indirect_branch_operand): Rewrite
25927 ix86_indirect_branch_register logic.
25929 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
25931 * config/i386/constraints.md (Bs): Update
25932 ix86_indirect_branch_register check. Don't check
25933 ix86_indirect_branch_register with GOT_memory_operand.
25935 * config/i386/predicates.md (GOT_memory_operand): Don't check
25936 ix86_indirect_branch_register here.
25937 (GOT32_symbol_operand): Likewise.
25939 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
25941 * config/i386/predicates.md (constant_call_address_operand):
25942 Rewrite ix86_indirect_branch_register logic.
25943 (sibcall_insn_operand): Likewise.
25945 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
25947 * config/i386/constraints.md (Bs): Replace
25948 ix86_indirect_branch_thunk_register with
25949 ix86_indirect_branch_register.
25951 * config/i386/i386.md (indirect_jump): Likewise.
25952 (tablejump): Likewise.
25953 (*sibcall_memory): Likewise.
25954 (*sibcall_value_memory): Likewise.
25955 Peepholes of indirect call and jump via memory: Likewise.
25956 * config/i386/i386.opt: Likewise.
25957 * config/i386/predicates.md (indirect_branch_operand): Likewise.
25958 (GOT_memory_operand): Likewise.
25959 (call_insn_operand): Likewise.
25960 (sibcall_insn_operand): Likewise.
25961 (GOT32_symbol_operand): Likewise.
25963 2018-01-15 Jakub Jelinek <jakub@redhat.com>
25965 PR middle-end/83837
25966 * omp-expand.c (expand_omp_atomic_pipeline): Use loaded_val
25967 type rather than type addr's type points to.
25968 (expand_omp_atomic_mutex): Likewise.
25969 (expand_omp_atomic): Likewise.
25971 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
25974 * config/i386/i386.c (output_indirect_thunk_function): Use
25975 ASM_OUTPUT_LABEL, instead of ASM_OUTPUT_DEF, for TARGET_MACHO
25976 for __x86_return_thunk.
25978 2018-01-15 Richard Biener <rguenther@suse.de>
25980 PR middle-end/83850
25981 * expmed.c (extract_bit_field_1): Fix typo.
25983 2018-01-15 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
25986 * config/arm/iterators.md (VF): New mode iterator.
25987 * config/arm/neon.md (neon_vabd<mode>_2): Use the above.
25988 Remove integer-related logic from pattern.
25989 (neon_vabd<mode>_3): Likewise.
25991 2018-01-15 Jakub Jelinek <jakub@redhat.com>
25993 PR middle-end/82694
25994 * common.opt (fstrict-overflow): No longer an alias.
25995 (fwrapv-pointer): New option.
25996 * tree.h (TYPE_OVERFLOW_WRAPS, TYPE_OVERFLOW_UNDEFINED): Define
25997 also for pointer types based on flag_wrapv_pointer.
25998 * opts.c (common_handle_option) <case OPT_fstrict_overflow>: Set
25999 opts->x_flag_wrap[pv] to !value, clear opts->x_flag_trapv if
26000 opts->x_flag_wrapv got set.
26001 * fold-const.c (fold_comparison, fold_binary_loc): Revert 2017-08-01
26002 changes, just use TYPE_OVERFLOW_UNDEFINED on pointer type instead of
26003 POINTER_TYPE_OVERFLOW_UNDEFINED.
26004 * match.pd: Likewise in address comparison pattern.
26005 * doc/invoke.texi: Document -fwrapv and -fstrict-overflow.
26007 2018-01-15 Richard Biener <rguenther@suse.de>
26010 * tree.c (free_lang_data_in_type): Always unlink TYPE_DECLs
26011 from TYPE_FIELDS. Free TYPE_BINFO if not used by devirtualization.
26012 Reset type names to their identifier if their TYPE_DECL doesn't
26013 have linkage (and thus is used for ODR and devirt).
26014 (save_debug_info_for_decl): Remove.
26015 (save_debug_info_for_type): Likewise.
26016 (add_tree_to_fld_list): Adjust.
26017 * tree-pretty-print.c (dump_generic_node): Make dumping of
26018 type names more robust.
26020 2018-01-15 Richard Biener <rguenther@suse.de>
26022 * BASE-VER: Bump to 8.0.1.
26024 2018-01-14 Martin Sebor <msebor@redhat.com>
26027 * builtins.c (check_access): Avoid warning when the no-warning bit
26030 2018-01-14 Cory Fields <cory-nospam-@coryfields.com>
26032 * tree-ssa-loop-im.c (sort_bbs_in_loop_postorder_cmp): Stabilize sort.
26033 * ira-color (allocno_hard_regs_compare): Likewise.
26035 2018-01-14 Nathan Rossi <nathan@nathanrossi.com>
26038 * config/microblaze/microblaze.c (microblaze_asm_output_ident):
26039 Use .pushsection/.popsection.
26041 2018-01-14 Martin Sebor <msebor@redhat.com>
26044 * doc/invoke.texi (-Wlass-memaccess): Document suppression by casting.
26046 2018-01-14 Jakub Jelinek <jakub@redhat.com>
26048 * config.gcc (i[34567]86-*-*): Remove one duplicate gfniintrin.h
26049 entry from extra_headers.
26050 (x86_64-*-*): Remove two duplicate gfniintrin.h entries from
26051 extra_headers, make the list bitwise identical to the i?86-*-* one.
26053 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
26055 * config/i386/i386.c (ix86_set_indirect_branch_type): Disallow
26056 -mcmodel=large with -mindirect-branch=thunk,
26057 -mindirect-branch=thunk-extern, -mfunction-return=thunk and
26058 -mfunction-return=thunk-extern.
26059 * doc/invoke.texi: Document -mcmodel=large is incompatible with
26060 -mindirect-branch=thunk, -mindirect-branch=thunk-extern,
26061 -mfunction-return=thunk and -mfunction-return=thunk-extern.
26063 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
26065 * config/i386/i386.c (print_reg): Print the name of the full
26066 integer register without '%'.
26067 (ix86_print_operand): Handle 'V'.
26068 * doc/extend.texi: Document 'V' modifier.
26070 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
26072 * config/i386/constraints.md (Bs): Disallow memory operand for
26073 -mindirect-branch-register.
26075 * config/i386/predicates.md (indirect_branch_operand): Likewise.
26076 (GOT_memory_operand): Likewise.
26077 (call_insn_operand): Likewise.
26078 (sibcall_insn_operand): Likewise.
26079 (GOT32_symbol_operand): Likewise.
26080 * config/i386/i386.md (indirect_jump): Call convert_memory_address
26081 for -mindirect-branch-register.
26082 (tablejump): Likewise.
26083 (*sibcall_memory): Likewise.
26084 (*sibcall_value_memory): Likewise.
26085 Disallow peepholes of indirect call and jump via memory for
26086 -mindirect-branch-register.
26087 (*call_pop): Replace m with Bw.
26088 (*call_value_pop): Likewise.
26089 (*sibcall_pop_memory): Replace m with Bs.
26090 * config/i386/i386.opt (mindirect-branch-register): New option.
26091 * doc/invoke.texi: Document -mindirect-branch-register option.
26093 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
26095 * config/i386/i386-protos.h (ix86_output_function_return): New.
26096 * config/i386/i386.c (ix86_set_indirect_branch_type): Also
26097 set function_return_type.
26098 (indirect_thunk_name): Add ret_p to indicate thunk for function
26100 (output_indirect_thunk_function): Pass false to
26101 indirect_thunk_name.
26102 (ix86_output_indirect_branch_via_reg): Likewise.
26103 (ix86_output_indirect_branch_via_push): Likewise.
26104 (output_indirect_thunk_function): Create alias for function
26105 return thunk if regno < 0.
26106 (ix86_output_function_return): New function.
26107 (ix86_handle_fndecl_attribute): Handle function_return.
26108 (ix86_attribute_table): Add function_return.
26109 * config/i386/i386.h (machine_function): Add
26110 function_return_type.
26111 * config/i386/i386.md (simple_return_internal): Use
26112 ix86_output_function_return.
26113 (simple_return_internal_long): Likewise.
26114 * config/i386/i386.opt (mfunction-return=): New option.
26115 (indirect_branch): Mention -mfunction-return=.
26116 * doc/extend.texi: Document function_return function attribute.
26117 * doc/invoke.texi: Document -mfunction-return= option.
26119 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
26121 * config/i386/i386-opts.h (indirect_branch): New.
26122 * config/i386/i386-protos.h (ix86_output_indirect_jmp): Likewise.
26123 * config/i386/i386.c (ix86_using_red_zone): Disallow red-zone
26124 with local indirect jump when converting indirect call and jump.
26125 (ix86_set_indirect_branch_type): New.
26126 (ix86_set_current_function): Call ix86_set_indirect_branch_type.
26127 (indirectlabelno): New.
26128 (indirect_thunk_needed): Likewise.
26129 (indirect_thunk_bnd_needed): Likewise.
26130 (indirect_thunks_used): Likewise.
26131 (indirect_thunks_bnd_used): Likewise.
26132 (INDIRECT_LABEL): Likewise.
26133 (indirect_thunk_name): Likewise.
26134 (output_indirect_thunk): Likewise.
26135 (output_indirect_thunk_function): Likewise.
26136 (ix86_output_indirect_branch_via_reg): Likewise.
26137 (ix86_output_indirect_branch_via_push): Likewise.
26138 (ix86_output_indirect_branch): Likewise.
26139 (ix86_output_indirect_jmp): Likewise.
26140 (ix86_code_end): Call output_indirect_thunk_function if needed.
26141 (ix86_output_call_insn): Call ix86_output_indirect_branch if
26143 (ix86_handle_fndecl_attribute): Handle indirect_branch.
26144 (ix86_attribute_table): Add indirect_branch.
26145 * config/i386/i386.h (machine_function): Add indirect_branch_type
26146 and has_local_indirect_jump.
26147 * config/i386/i386.md (indirect_jump): Set has_local_indirect_jump
26149 (tablejump): Likewise.
26150 (*indirect_jump): Use ix86_output_indirect_jmp.
26151 (*tablejump_1): Likewise.
26152 (simple_return_indirect_internal): Likewise.
26153 * config/i386/i386.opt (mindirect-branch=): New option.
26154 (indirect_branch): New.
26157 (thunk-inline): Likewise.
26158 (thunk-extern): Likewise.
26159 * doc/extend.texi: Document indirect_branch function attribute.
26160 * doc/invoke.texi: Document -mindirect-branch= option.
26162 2018-01-14 Jan Hubicka <hubicka@ucw.cz>
26165 * ipa-inline.c (edge_badness): Tolerate roundoff errors.
26167 2018-01-14 Richard Sandiford <richard.sandiford@linaro.org>
26169 * ipa-inline.c (want_inline_small_function_p): Return false if
26170 inlining has already failed with CIF_FINAL_ERROR.
26171 (update_caller_keys): Call want_inline_small_function_p before
26173 (update_callee_keys): Likewise.
26175 2018-01-10 Kelvin Nilsen <kelvin@gcc.gnu.org>
26177 * config/rs6000/rs6000-p8swap.c (rs6000_sum_of_two_registers_p):
26179 (rs6000_quadword_masked_address_p): Likewise.
26180 (quad_aligned_load_p): Likewise.
26181 (quad_aligned_store_p): Likewise.
26182 (const_load_sequence_p): Add comment to describe the outer-most loop.
26183 (mimic_memory_attributes_and_flags): New function.
26184 (rs6000_gen_stvx): Likewise.
26185 (replace_swapped_aligned_store): Likewise.
26186 (rs6000_gen_lvx): Likewise.
26187 (replace_swapped_aligned_load): Likewise.
26188 (replace_swapped_load_constant): Capitalize argument name in
26189 comment describing this function.
26190 (rs6000_analyze_swaps): Add a third pass to search for vector loads
26191 and stores that access quad-word aligned addresses and replace
26192 with stvx or lvx instructions when appropriate.
26193 * config/rs6000/rs6000-protos.h (rs6000_sum_of_two_registers_p):
26194 New function prototype.
26195 (rs6000_quadword_masked_address_p): Likewise.
26196 (rs6000_gen_lvx): Likewise.
26197 (rs6000_gen_stvx): Likewise.
26198 * config/rs6000/vsx.md (*vsx_le_perm_load_<mode>): For modes
26199 VSX_D (V2DF, V2DI), modify this split to select lvx instruction
26200 when memory address is aligned.
26201 (*vsx_le_perm_load_<mode>): For modes VSX_W (V4SF, V4SI), modify
26202 this split to select lvx instruction when memory address is aligned.
26203 (*vsx_le_perm_load_v8hi): Modify this split to select lvx
26204 instruction when memory address is aligned.
26205 (*vsx_le_perm_load_v16qi): Likewise.
26206 (four unnamed splitters): Modify to select the stvx instruction
26207 when memory is aligned.
26209 2018-01-13 Jan Hubicka <hubicka@ucw.cz>
26211 * predict.c (determine_unlikely_bbs): Handle correctly BBs
26212 which appears in the queue multiple times.
26214 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26215 Alan Hayward <alan.hayward@arm.com>
26216 David Sherwood <david.sherwood@arm.com>
26218 * tree-vectorizer.h (vec_lower_bound): New structure.
26219 (_loop_vec_info): Add check_nonzero and lower_bounds.
26220 (LOOP_VINFO_CHECK_NONZERO): New macro.
26221 (LOOP_VINFO_LOWER_BOUNDS): Likewise.
26222 (LOOP_REQUIRES_VERSIONING_FOR_ALIAS): Check lower_bounds too.
26223 * tree-data-ref.h (dr_with_seg_len): Add access_size and align
26224 fields. Make seg_len the distance travelled, not including the
26226 (dr_direction_indicator): Declare.
26227 (dr_zero_step_indicator): Likewise.
26228 (dr_known_forward_stride_p): Likewise.
26229 * tree-data-ref.c: Include stringpool.h, tree-vrp.h and
26231 (runtime_alias_check_p): Allow runtime alias checks with
26233 (operator ==): Compare access_size and align.
26234 (prune_runtime_alias_test_list): Rework for new distinction between
26235 the access_size and seg_len.
26236 (create_intersect_range_checks_index): Likewise. Cope with polynomial
26238 (get_segment_min_max): New function.
26239 (create_intersect_range_checks): Use it.
26240 (dr_step_indicator): New function.
26241 (dr_direction_indicator): Likewise.
26242 (dr_zero_step_indicator): Likewise.
26243 (dr_known_forward_stride_p): Likewise.
26244 * tree-loop-distribution.c (data_ref_segment_size): Return
26245 DR_STEP * (niters - 1).
26246 (compute_alias_check_pairs): Update call to the dr_with_seg_len
26248 * tree-vect-data-refs.c (vect_check_nonzero_value): New function.
26249 (vect_preserves_scalar_order_p): New function, split out from...
26250 (vect_analyze_data_ref_dependence): ...here. Check for zero steps.
26251 (vect_vfa_segment_size): Return DR_STEP * (length_factor - 1).
26252 (vect_vfa_access_size): New function.
26253 (vect_vfa_align): Likewise.
26254 (vect_compile_time_alias): Take access_size_a and access_b arguments.
26255 (dump_lower_bound): New function.
26256 (vect_check_lower_bound): Likewise.
26257 (vect_small_gap_p): Likewise.
26258 (vectorizable_with_step_bound_p): Likewise.
26259 (vect_prune_runtime_alias_test_list): Ignore cross-iteration
26260 depencies if the vectorization factor is 1. Convert the checks
26261 for nonzero steps into checks on the bounds of DR_STEP. Try using
26262 a bunds check for variable steps if the minimum required step is
26263 relatively small. Update calls to the dr_with_seg_len
26264 constructor and to vect_compile_time_alias.
26265 * tree-vect-loop-manip.c (vect_create_cond_for_lower_bounds): New
26267 (vect_loop_versioning): Call it.
26268 * tree-vect-loop.c (vect_analyze_loop_2): Clear LOOP_VINFO_LOWER_BOUNDS
26270 (vect_estimate_min_profitable_iters): Account for any bounds checks.
26272 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26273 Alan Hayward <alan.hayward@arm.com>
26274 David Sherwood <david.sherwood@arm.com>
26276 * doc/sourcebuild.texi (vect_scatter_store): Document.
26277 * optabs.def (scatter_store_optab, mask_scatter_store_optab): New
26279 * doc/md.texi (scatter_store@var{m}, mask_scatter_store@var{m}):
26281 * genopinit.c (main): Add supports_vec_scatter_store and
26282 supports_vec_scatter_store_cached to target_optabs.
26283 * gimple.h (gimple_expr_type): Handle IFN_SCATTER_STORE and
26284 IFN_MASK_SCATTER_STORE.
26285 * internal-fn.def (SCATTER_STORE, MASK_SCATTER_STORE): New internal
26287 * internal-fn.h (internal_store_fn_p): Declare.
26288 (internal_fn_stored_value_index): Likewise.
26289 * internal-fn.c (scatter_store_direct): New macro.
26290 (expand_scatter_store_optab_fn): New function.
26291 (direct_scatter_store_optab_supported_p): New macro.
26292 (internal_store_fn_p): New function.
26293 (internal_gather_scatter_fn_p): Handle IFN_SCATTER_STORE and
26294 IFN_MASK_SCATTER_STORE.
26295 (internal_fn_mask_index): Likewise.
26296 (internal_fn_stored_value_index): New function.
26297 (internal_gather_scatter_fn_supported_p): Adjust operand numbers
26298 for scatter stores.
26299 * optabs-query.h (supports_vec_scatter_store_p): Declare.
26300 * optabs-query.c (supports_vec_scatter_store_p): New function.
26301 * tree-vectorizer.h (vect_get_store_rhs): Declare.
26302 * tree-vect-data-refs.c (vect_analyze_data_ref_access): Return
26303 true for scatter stores.
26304 (vect_gather_scatter_fn_p): Handle scatter stores too.
26305 (vect_check_gather_scatter): Consider using scatter stores if
26306 supports_vec_scatter_store_p.
26307 * tree-vect-patterns.c (vect_try_gather_scatter_pattern): Handle
26308 scatter stores too.
26309 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
26310 internal_fn_stored_value_index.
26311 (check_load_store_masking): Handle scatter stores too.
26312 (vect_get_store_rhs): Make public.
26313 (vectorizable_call): Use internal_store_fn_p.
26314 (vectorizable_store): Handle scatter store internal functions.
26315 (vect_transform_stmt): Compare GROUP_STORE_COUNT with GROUP_SIZE
26316 when deciding whether the end of the group has been reached.
26317 * config/aarch64/aarch64.md (UNSPEC_ST1_SCATTER): New unspec.
26318 * config/aarch64/aarch64-sve.md (scatter_store<mode>): New expander.
26319 (mask_scatter_store<mode>): New insns.
26321 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26322 Alan Hayward <alan.hayward@arm.com>
26323 David Sherwood <david.sherwood@arm.com>
26325 * tree-vectorizer.h (vect_gather_scatter_fn_p): Declare.
26326 * tree-vect-data-refs.c (vect_gather_scatter_fn_p): Make public.
26327 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): New
26329 (vect_use_strided_gather_scatters_p): Take a masked_p argument.
26330 Use vect_truncate_gather_scatter_offset if we can't treat the
26331 operation as a normal gather load or scatter store.
26332 (get_group_load_store_type): Take the gather_scatter_info
26333 as argument. Try using a gather load or scatter store for
26334 single-element groups.
26335 (get_load_store_type): Update calls to get_group_load_store_type
26336 and vect_use_strided_gather_scatters_p.
26338 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26339 Alan Hayward <alan.hayward@arm.com>
26340 David Sherwood <david.sherwood@arm.com>
26342 * tree-vectorizer.h (vect_create_data_ref_ptr): Take an extra
26343 optional tree argument.
26344 * tree-vect-data-refs.c (vect_check_gather_scatter): Check for
26346 (vect_create_data_ref_ptr): Take the iv_step as an optional argument,
26347 but continue to use the current value as a fallback.
26348 (bump_vector_ptr): Use operand_equal_p rather than tree_int_cst_compare
26349 to compare the updates.
26350 * tree-vect-stmts.c (vect_use_strided_gather_scatters_p): New function.
26351 (get_load_store_type): Use it when handling a strided access.
26352 (vect_get_strided_load_store_ops): New function.
26353 (vect_get_data_ptr_increment): Likewise.
26354 (vectorizable_load): Handle strided gather loads. Always pass
26355 a step to vect_create_data_ref_ptr and bump_vector_ptr.
26357 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26358 Alan Hayward <alan.hayward@arm.com>
26359 David Sherwood <david.sherwood@arm.com>
26361 * doc/md.texi (gather_load@var{m}): Document.
26362 (mask_gather_load@var{m}): Likewise.
26363 * genopinit.c (main): Add supports_vec_gather_load and
26364 supports_vec_gather_load_cached to target_optabs.
26365 * optabs-tree.c (init_tree_optimization_optabs): Use
26366 ggc_cleared_alloc to allocate target_optabs.
26367 * optabs.def (gather_load_optab, mask_gather_laod_optab): New optabs.
26368 * internal-fn.def (GATHER_LOAD, MASK_GATHER_LOAD): New internal
26370 * internal-fn.h (internal_load_fn_p): Declare.
26371 (internal_gather_scatter_fn_p): Likewise.
26372 (internal_fn_mask_index): Likewise.
26373 (internal_gather_scatter_fn_supported_p): Likewise.
26374 * internal-fn.c (gather_load_direct): New macro.
26375 (expand_gather_load_optab_fn): New function.
26376 (direct_gather_load_optab_supported_p): New macro.
26377 (direct_internal_fn_optab): New function.
26378 (internal_load_fn_p): Likewise.
26379 (internal_gather_scatter_fn_p): Likewise.
26380 (internal_fn_mask_index): Likewise.
26381 (internal_gather_scatter_fn_supported_p): Likewise.
26382 * optabs-query.c (supports_at_least_one_mode_p): New function.
26383 (supports_vec_gather_load_p): Likewise.
26384 * optabs-query.h (supports_vec_gather_load_p): Declare.
26385 * tree-vectorizer.h (gather_scatter_info): Add ifn, element_type
26386 and memory_type field.
26387 (NUM_PATTERNS): Bump to 15.
26388 * tree-vect-data-refs.c: Include internal-fn.h.
26389 (vect_gather_scatter_fn_p): New function.
26390 (vect_describe_gather_scatter_call): Likewise.
26391 (vect_check_gather_scatter): Try using internal functions for
26392 gather loads. Recognize existing calls to a gather load function.
26393 (vect_analyze_data_refs): Consider using gather loads if
26394 supports_vec_gather_load_p.
26395 * tree-vect-patterns.c (vect_get_load_store_mask): New function.
26396 (vect_get_gather_scatter_offset_type): Likewise.
26397 (vect_convert_mask_for_vectype): Likewise.
26398 (vect_add_conversion_to_patterm): Likewise.
26399 (vect_try_gather_scatter_pattern): Likewise.
26400 (vect_recog_gather_scatter_pattern): New pattern recognizer.
26401 (vect_vect_recog_func_ptrs): Add it.
26402 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
26403 internal_fn_mask_index and internal_gather_scatter_fn_p.
26404 (check_load_store_masking): Take the gather_scatter_info as an
26405 argument and handle gather loads.
26406 (vect_get_gather_scatter_ops): New function.
26407 (vectorizable_call): Check internal_load_fn_p.
26408 (vectorizable_load): Likewise. Handle gather load internal
26410 (vectorizable_store): Update call to check_load_store_masking.
26411 * config/aarch64/aarch64.md (UNSPEC_LD1_GATHER): New unspec.
26412 * config/aarch64/iterators.md (SVE_S, SVE_D): New mode iterators.
26413 * config/aarch64/predicates.md (aarch64_gather_scale_operand_w)
26414 (aarch64_gather_scale_operand_d): New predicates.
26415 * config/aarch64/aarch64-sve.md (gather_load<mode>): New expander.
26416 (mask_gather_load<mode>): New insns.
26418 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26419 Alan Hayward <alan.hayward@arm.com>
26420 David Sherwood <david.sherwood@arm.com>
26422 * optabs.def (fold_left_plus_optab): New optab.
26423 * doc/md.texi (fold_left_plus_@var{m}): Document.
26424 * internal-fn.def (IFN_FOLD_LEFT_PLUS): New internal function.
26425 * internal-fn.c (fold_left_direct): Define.
26426 (expand_fold_left_optab_fn): Likewise.
26427 (direct_fold_left_optab_supported_p): Likewise.
26428 * fold-const-call.c (fold_const_fold_left): New function.
26429 (fold_const_call): Use it to fold CFN_FOLD_LEFT_PLUS.
26430 * tree-parloops.c (valid_reduction_p): New function.
26431 (gather_scalar_reductions): Use it.
26432 * tree-vectorizer.h (FOLD_LEFT_REDUCTION): New vect_reduction_type.
26433 (vect_finish_replace_stmt): Declare.
26434 * tree-vect-loop.c (fold_left_reduction_fn): New function.
26435 (needs_fold_left_reduction_p): New function, split out from...
26436 (vect_is_simple_reduction): ...here. Accept reductions that
26437 forbid reassociation, but give them type FOLD_LEFT_REDUCTION.
26438 (vect_force_simple_reduction): Also store the reduction type in
26439 the assignment's STMT_VINFO_REDUC_TYPE.
26440 (vect_model_reduction_cost): Handle FOLD_LEFT_REDUCTION.
26441 (merge_with_identity): New function.
26442 (vect_expand_fold_left): Likewise.
26443 (vectorize_fold_left_reduction): Likewise.
26444 (vectorizable_reduction): Handle FOLD_LEFT_REDUCTION. Leave the
26445 scalar phi in place for it. Check for target support and reject
26446 cases that would reassociate the operation. Defer the transform
26447 phase to vectorize_fold_left_reduction.
26448 * config/aarch64/aarch64.md (UNSPEC_FADDA): New unspec.
26449 * config/aarch64/aarch64-sve.md (fold_left_plus_<mode>): New expander.
26450 (*fold_left_plus_<mode>, *pred_fold_left_plus_<mode>): New insns.
26452 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26454 * tree-if-conv.c (predicate_mem_writes): Remove redundant
26455 call to ifc_temp_var.
26457 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26458 Alan Hayward <alan.hayward@arm.com>
26459 David Sherwood <david.sherwood@arm.com>
26461 * target.def (legitimize_address_displacement): Take the original
26462 offset as a poly_int.
26463 * targhooks.h (default_legitimize_address_displacement): Update
26465 * targhooks.c (default_legitimize_address_displacement): Likewise.
26466 * doc/tm.texi: Regenerate.
26467 * lra-constraints.c (base_plus_disp_to_reg): Take the displacement
26468 as an argument, moving assert of ad->disp == ad->disp_term to...
26469 (process_address_1): ...here. Update calls to base_plus_disp_to_reg.
26470 Try calling targetm.legitimize_address_displacement before expanding
26471 the address rather than afterwards, and adjust for the new interface.
26472 * config/aarch64/aarch64.c (aarch64_legitimize_address_displacement):
26473 Match the new hook interface. Handle SVE addresses.
26474 * config/sh/sh.c (sh_legitimize_address_displacement): Make the
26475 new hook interface.
26477 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26479 * Makefile.in (OBJS): Add early-remat.o.
26480 * target.def (select_early_remat_modes): New hook.
26481 * doc/tm.texi.in (TARGET_SELECT_EARLY_REMAT_MODES): New hook.
26482 * doc/tm.texi: Regenerate.
26483 * targhooks.h (default_select_early_remat_modes): Declare.
26484 * targhooks.c (default_select_early_remat_modes): New function.
26485 * timevar.def (TV_EARLY_REMAT): New timevar.
26486 * passes.def (pass_early_remat): New pass.
26487 * tree-pass.h (make_pass_early_remat): Declare.
26488 * early-remat.c: New file.
26489 * config/aarch64/aarch64.c (aarch64_select_early_remat_modes): New
26491 (TARGET_SELECT_EARLY_REMAT_MODES): Define.
26493 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26494 Alan Hayward <alan.hayward@arm.com>
26495 David Sherwood <david.sherwood@arm.com>
26497 * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Replace
26498 vfm1 with a bound_epilog parameter.
26499 (vect_do_peeling): Update calls accordingly, and move the prologue
26500 call earlier in the function. Treat the base bound_epilog as 0 for
26501 fully-masked loops and retain vf - 1 for other loops. Add 1 to
26502 this base when peeling for gaps.
26503 * tree-vect-loop.c (vect_analyze_loop_2): Allow peeling for gaps
26504 with fully-masked loops.
26505 (vect_estimate_min_profitable_iters): Handle the single peeled
26506 iteration in that case.
26508 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26509 Alan Hayward <alan.hayward@arm.com>
26510 David Sherwood <david.sherwood@arm.com>
26512 * tree-vect-data-refs.c (vect_analyze_group_access_1): Allow
26513 single-element interleaving even if the size is not a power of 2.
26514 * tree-vect-stmts.c (get_load_store_type): Disallow elementwise
26515 accesses for single-element interleaving if the group size is
26518 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26519 Alan Hayward <alan.hayward@arm.com>
26520 David Sherwood <david.sherwood@arm.com>
26522 * doc/md.texi (fold_extract_last_@var{m}): Document.
26523 * doc/sourcebuild.texi (vect_fold_extract_last): Likewise.
26524 * optabs.def (fold_extract_last_optab): New optab.
26525 * internal-fn.def (FOLD_EXTRACT_LAST): New internal function.
26526 * internal-fn.c (fold_extract_direct): New macro.
26527 (expand_fold_extract_optab_fn): Likewise.
26528 (direct_fold_extract_optab_supported_p): Likewise.
26529 * tree-vectorizer.h (EXTRACT_LAST_REDUCTION): New vect_reduction_type.
26530 * tree-vect-loop.c (vect_model_reduction_cost): Handle
26531 EXTRACT_LAST_REDUCTION.
26532 (get_initial_def_for_reduction): Do not create an initial vector
26533 for EXTRACT_LAST_REDUCTION reductions.
26534 (vectorizable_reduction): Leave the scalar phi in place for
26535 EXTRACT_LAST_REDUCTIONs. Try using EXTRACT_LAST_REDUCTION
26536 ahead of INTEGER_INDUC_COND_REDUCTION. Do not check for an
26537 epilogue code for EXTRACT_LAST_REDUCTION and defer the
26538 transform phase to vectorizable_condition.
26539 * tree-vect-stmts.c (vect_finish_stmt_generation_1): New function,
26541 (vect_finish_stmt_generation): ...here.
26542 (vect_finish_replace_stmt): New function.
26543 (vectorizable_condition): Handle EXTRACT_LAST_REDUCTION.
26544 * config/aarch64/aarch64-sve.md (fold_extract_last_<mode>): New
26546 * config/aarch64/aarch64.md (UNSPEC_CLASTB): New unspec.
26548 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26549 Alan Hayward <alan.hayward@arm.com>
26550 David Sherwood <david.sherwood@arm.com>
26552 * doc/md.texi (extract_last_@var{m}): Document.
26553 * optabs.def (extract_last_optab): New optab.
26554 * internal-fn.def (EXTRACT_LAST): New internal function.
26555 * internal-fn.c (cond_unary_direct): New macro.
26556 (expand_cond_unary_optab_fn): Likewise.
26557 (direct_cond_unary_optab_supported_p): Likewise.
26558 * tree-vect-loop.c (vectorizable_live_operation): Allow fully-masked
26559 loops using EXTRACT_LAST.
26560 * config/aarch64/aarch64-sve.md (aarch64_sve_lastb<mode>): Rename to...
26561 (extract_last_<mode>): ...this optab.
26562 (vec_extract<mode><Vel>): Update accordingly.
26564 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26565 Alan Hayward <alan.hayward@arm.com>
26566 David Sherwood <david.sherwood@arm.com>
26568 * target.def (empty_mask_is_expensive): New hook.
26569 * doc/tm.texi.in (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): New hook.
26570 * doc/tm.texi: Regenerate.
26571 * targhooks.h (default_empty_mask_is_expensive): Declare.
26572 * targhooks.c (default_empty_mask_is_expensive): New function.
26573 * tree-vectorizer.c (vectorize_loops): Only call optimize_mask_stores
26574 if the target says that empty masks are expensive.
26575 * config/aarch64/aarch64.c (aarch64_empty_mask_is_expensive):
26577 (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): Redefine.
26579 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26580 Alan Hayward <alan.hayward@arm.com>
26581 David Sherwood <david.sherwood@arm.com>
26583 * tree-vectorizer.h (_loop_vec_info::mask_skip_niters): New field.
26584 (LOOP_VINFO_MASK_SKIP_NITERS): New macro.
26585 (vect_use_loop_mask_for_alignment_p): New function.
26586 (vect_prepare_for_masked_peels, vect_gen_while_not): Declare.
26587 * tree-vect-loop-manip.c (vect_set_loop_masks_directly): Add an
26588 niters_skip argument. Make sure that the first niters_skip elements
26589 of the first iteration are inactive.
26590 (vect_set_loop_condition_masked): Handle LOOP_VINFO_MASK_SKIP_NITERS.
26591 Update call to vect_set_loop_masks_directly.
26592 (get_misalign_in_elems): New function, split out from...
26593 (vect_gen_prolog_loop_niters): ...here.
26594 (vect_update_init_of_dr): Take a code argument that specifies whether
26595 the adjustment should be added or subtracted.
26596 (vect_update_init_of_drs): Likewise.
26597 (vect_prepare_for_masked_peels): New function.
26598 (vect_do_peeling): Skip prologue peeling if we're using a mask
26599 instead. Update call to vect_update_inits_of_drs.
26600 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
26602 (vect_analyze_loop_2): Allow fully-masked loops with peeling for
26603 alignment. Do not include the number of peeled iterations in
26604 the minimum threshold in that case.
26605 (vectorizable_induction): Adjust the start value down by
26606 LOOP_VINFO_MASK_SKIP_NITERS iterations.
26607 (vect_transform_loop): Call vect_prepare_for_masked_peels.
26608 Take the number of skipped iterations into account when calculating
26610 * tree-vect-stmts.c (vect_gen_while_not): New function.
26612 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26613 Alan Hayward <alan.hayward@arm.com>
26614 David Sherwood <david.sherwood@arm.com>
26616 * doc/sourcebuild.texi (vect_fully_masked): Document.
26617 * params.def (PARAM_MIN_VECT_LOOP_BOUND): Change minimum and
26618 default value to 0.
26619 * tree-vect-loop.c (vect_analyze_loop_costing): New function,
26621 (vect_analyze_loop_2): ...here. Don't check the vectorization
26622 factor against the number of loop iterations if the loop is
26625 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26626 Alan Hayward <alan.hayward@arm.com>
26627 David Sherwood <david.sherwood@arm.com>
26629 * tree-ssa-loop-ivopts.c (USE_ADDRESS): Split into...
26630 (USE_REF_ADDRESS, USE_PTR_ADDRESS): ...these new use types.
26631 (dump_groups): Update accordingly.
26632 (iv_use::mem_type): New member variable.
26633 (address_p): New function.
26634 (record_use): Add a mem_type argument and initialize the new
26636 (record_group_use): Add a mem_type argument. Use address_p.
26637 Remove obsolete null checks of base_object. Update call to record_use.
26638 (find_interesting_uses_op): Update call to record_group_use.
26639 (find_interesting_uses_cond): Likewise.
26640 (find_interesting_uses_address): Likewise.
26641 (get_mem_type_for_internal_fn): New function.
26642 (find_address_like_use): Likewise.
26643 (find_interesting_uses_stmt): Try find_address_like_use before
26644 calling find_interesting_uses_op.
26645 (addr_offset_valid_p): Use the iv mem_type field as the type
26646 of the addressed memory.
26647 (add_autoinc_candidates): Likewise.
26648 (get_address_cost): Likewise.
26649 (split_small_address_groups_p): Use address_p.
26650 (split_address_groups): Likewise.
26651 (add_iv_candidate_for_use): Likewise.
26652 (autoinc_possible_for_pair): Likewise.
26653 (rewrite_groups): Likewise.
26654 (get_use_type): Check for USE_REF_ADDRESS instead of USE_ADDRESS.
26655 (determine_group_iv_cost): Update after split of USE_ADDRESS.
26656 (get_alias_ptr_type_for_ptr_address): New function.
26657 (rewrite_use_address): Rewrite address uses in calls that were
26658 identified by find_address_like_use.
26660 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26661 Alan Hayward <alan.hayward@arm.com>
26662 David Sherwood <david.sherwood@arm.com>
26664 * expr.c (expand_expr_addr_expr_1): Handle ADDR_EXPRs of
26666 * gimple-expr.h (is_gimple_addressable: Likewise.
26667 * gimple-expr.c (is_gimple_address): Likewise.
26668 * internal-fn.c (expand_call_mem_ref): New function.
26669 (expand_mask_load_optab_fn): Use it.
26670 (expand_mask_store_optab_fn): Likewise.
26672 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26673 Alan Hayward <alan.hayward@arm.com>
26674 David Sherwood <david.sherwood@arm.com>
26676 * doc/md.texi (cond_add@var{mode}, cond_sub@var{mode})
26677 (cond_and@var{mode}, cond_ior@var{mode}, cond_xor@var{mode})
26678 (cond_smin@var{mode}, cond_smax@var{mode}, cond_umin@var{mode})
26679 (cond_umax@var{mode}): Document.
26680 * optabs.def (cond_add_optab, cond_sub_optab, cond_and_optab)
26681 (cond_ior_optab, cond_xor_optab, cond_smin_optab, cond_smax_optab)
26682 (cond_umin_optab, cond_umax_optab): New optabs.
26683 * internal-fn.def (COND_ADD, COND_SUB, COND_MIN, COND_MAX, COND_AND)
26684 (COND_IOR, COND_XOR): New internal functions.
26685 * internal-fn.h (get_conditional_internal_fn): Declare.
26686 * internal-fn.c (cond_binary_direct): New macro.
26687 (expand_cond_binary_optab_fn): Likewise.
26688 (direct_cond_binary_optab_supported_p): Likewise.
26689 (get_conditional_internal_fn): New function.
26690 * tree-vect-loop.c (vectorizable_reduction): Handle fully-masked loops.
26691 Cope with reduction statements that are vectorized as calls rather
26693 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New insns.
26694 * config/aarch64/iterators.md (UNSPEC_COND_ADD, UNSPEC_COND_SUB)
26695 (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX, UNSPEC_COND_SMIN)
26696 (UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
26697 (UNSPEC_COND_EOR): New unspecs.
26698 (optab): Add mappings for them.
26699 (SVE_COND_INT_OP, SVE_COND_FP_OP): New int iterators.
26700 (sve_int_op, sve_fp_op): New int attributes.
26702 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26703 Alan Hayward <alan.hayward@arm.com>
26704 David Sherwood <david.sherwood@arm.com>
26706 * optabs.def (while_ult_optab): New optab.
26707 * doc/md.texi (while_ult@var{m}@var{n}): Document.
26708 * internal-fn.def (WHILE_ULT): New internal function.
26709 * internal-fn.h (direct_internal_fn_supported_p): New override
26710 that takes two types as argument.
26711 * internal-fn.c (while_direct): New macro.
26712 (expand_while_optab_fn): New function.
26713 (convert_optab_supported_p): Likewise.
26714 (direct_while_optab_supported_p): New macro.
26715 * wide-int.h (wi::udiv_ceil): New function.
26716 * tree-vectorizer.h (rgroup_masks): New structure.
26717 (vec_loop_masks): New typedef.
26718 (_loop_vec_info): Add masks, mask_compare_type, can_fully_mask_p
26719 and fully_masked_p.
26720 (LOOP_VINFO_CAN_FULLY_MASK_P, LOOP_VINFO_FULLY_MASKED_P)
26721 (LOOP_VINFO_MASKS, LOOP_VINFO_MASK_COMPARE_TYPE): New macros.
26722 (vect_max_vf): New function.
26723 (slpeel_make_loop_iterate_ntimes): Delete.
26724 (vect_set_loop_condition, vect_get_loop_mask_type, vect_gen_while)
26725 (vect_halve_mask_nunits, vect_double_mask_nunits): Declare.
26726 (vect_record_loop_mask, vect_get_loop_mask): Likewise.
26727 * tree-vect-loop-manip.c: Include tree-ssa-loop-niter.h,
26728 internal-fn.h, stor-layout.h and optabs-query.h.
26729 (vect_set_loop_mask): New function.
26730 (add_preheader_seq): Likewise.
26731 (add_header_seq): Likewise.
26732 (interleave_supported_p): Likewise.
26733 (vect_maybe_permute_loop_masks): Likewise.
26734 (vect_set_loop_masks_directly): Likewise.
26735 (vect_set_loop_condition_masked): Likewise.
26736 (vect_set_loop_condition_unmasked): New function, split out from
26737 slpeel_make_loop_iterate_ntimes.
26738 (slpeel_make_loop_iterate_ntimes): Rename to..
26739 (vect_set_loop_condition): ...this. Use vect_set_loop_condition_masked
26740 for fully-masked loops and vect_set_loop_condition_unmasked otherwise.
26741 (vect_do_peeling): Update call accordingly.
26742 (vect_gen_vector_loop_niters): Use VF as the step for fully-masked
26744 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
26745 mask_compare_type, can_fully_mask_p and fully_masked_p.
26746 (release_vec_loop_masks): New function.
26747 (_loop_vec_info): Use it to free the loop masks.
26748 (can_produce_all_loop_masks_p): New function.
26749 (vect_get_max_nscalars_per_iter): Likewise.
26750 (vect_verify_full_masking): Likewise.
26751 (vect_analyze_loop_2): Save LOOP_VINFO_CAN_FULLY_MASK_P around
26752 retries, and free the mask rgroups before retrying. Check loop-wide
26753 reasons for disallowing fully-masked loops. Make the final decision
26754 about whether use a fully-masked loop or not.
26755 (vect_estimate_min_profitable_iters): Do not assume that peeling
26756 for the number of iterations will be needed for fully-masked loops.
26757 (vectorizable_reduction): Disable fully-masked loops.
26758 (vectorizable_live_operation): Likewise.
26759 (vect_halve_mask_nunits): New function.
26760 (vect_double_mask_nunits): Likewise.
26761 (vect_record_loop_mask): Likewise.
26762 (vect_get_loop_mask): Likewise.
26763 (vect_transform_loop): Handle the case in which the final loop
26764 iteration might handle a partial vector. Call vect_set_loop_condition
26765 instead of slpeel_make_loop_iterate_ntimes.
26766 * tree-vect-stmts.c: Include tree-ssa-loop-niter.h and gimple-fold.h.
26767 (check_load_store_masking): New function.
26768 (prepare_load_store_mask): Likewise.
26769 (vectorizable_store): Handle fully-masked loops.
26770 (vectorizable_load): Likewise.
26771 (supportable_widening_operation): Use vect_halve_mask_nunits for
26773 (supportable_narrowing_operation): Likewise vect_double_mask_nunits.
26774 (vect_gen_while): New function.
26775 * config/aarch64/aarch64.md (umax<mode>3): New expander.
26776 (aarch64_uqdec<mode>): New insn.
26778 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26779 Alan Hayward <alan.hayward@arm.com>
26780 David Sherwood <david.sherwood@arm.com>
26782 * optabs.def (reduc_and_scal_optab, reduc_ior_scal_optab)
26783 (reduc_xor_scal_optab): New optabs.
26784 * doc/md.texi (reduc_and_scal_@var{m}, reduc_ior_scal_@var{m})
26785 (reduc_xor_scal_@var{m}): Document.
26786 * doc/sourcebuild.texi (vect_logical_reduc): Likewise.
26787 * internal-fn.def (IFN_REDUC_AND, IFN_REDUC_IOR, IFN_REDUC_XOR): New
26788 internal functions.
26789 * fold-const-call.c (fold_const_call): Handle them.
26790 * tree-vect-loop.c (reduction_fn_for_scalar_code): Return the new
26791 internal functions for BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR.
26792 * config/aarch64/aarch64-sve.md (reduc_<bit_reduc>_scal_<mode>):
26793 (*reduc_<bit_reduc>_scal_<mode>): New patterns.
26794 * config/aarch64/iterators.md (UNSPEC_ANDV, UNSPEC_ORV)
26795 (UNSPEC_XORV): New unspecs.
26796 (optab): Add entries for them.
26797 (BITWISEV): New int iterator.
26798 (bit_reduc_op): New int attributes.
26800 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26801 Alan Hayward <alan.hayward@arm.com>
26802 David Sherwood <david.sherwood@arm.com>
26804 * doc/md.texi (vec_shl_insert_@var{m}): New optab.
26805 * internal-fn.def (VEC_SHL_INSERT): New internal function.
26806 * optabs.def (vec_shl_insert_optab): New optab.
26807 * tree-vectorizer.h (can_duplicate_and_interleave_p): Declare.
26808 (duplicate_and_interleave): Likewise.
26809 * tree-vect-loop.c: Include internal-fn.h.
26810 (neutral_op_for_slp_reduction): New function, split out from
26811 get_initial_defs_for_reduction.
26812 (get_initial_def_for_reduction): Handle option 2 for variable-length
26813 vectors by loading the neutral value into a vector and then shifting
26814 the initial value into element 0.
26815 (get_initial_defs_for_reduction): Replace the code argument with
26816 the neutral value calculated by neutral_op_for_slp_reduction.
26817 Use gimple_build_vector for constant-length vectors.
26818 Use IFN_VEC_SHL_INSERT for variable-length vectors if all
26819 but the first group_size elements have a neutral value.
26820 Use duplicate_and_interleave otherwise.
26821 (vect_create_epilog_for_reduction): Take a neutral_op parameter.
26822 Update call to get_initial_defs_for_reduction. Handle SLP
26823 reductions for variable-length vectors by creating one vector
26824 result for each scalar result, with the elements associated
26825 with other scalar results stubbed out with the neutral value.
26826 (vectorizable_reduction): Call neutral_op_for_slp_reduction.
26827 Require IFN_VEC_SHL_INSERT for double reductions on
26828 variable-length vectors, or SLP reductions that have
26829 a neutral value. Require can_duplicate_and_interleave_p
26830 support for variable-length unchained SLP reductions if there
26831 is no neutral value, such as for MIN/MAX reductions. Also require
26832 the number of vector elements to be a multiple of the number of
26833 SLP statements when doing variable-length unchained SLP reductions.
26834 Update call to vect_create_epilog_for_reduction.
26835 * tree-vect-slp.c (can_duplicate_and_interleave_p): Make public
26836 and remove initial values.
26837 (duplicate_and_interleave): Make public.
26838 * config/aarch64/aarch64.md (UNSPEC_INSR): New unspec.
26839 * config/aarch64/aarch64-sve.md (vec_shl_insert_<mode>): New insn.
26841 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26842 Alan Hayward <alan.hayward@arm.com>
26843 David Sherwood <david.sherwood@arm.com>
26845 * tree-vect-slp.c: Include gimple-fold.h and internal-fn.h
26846 (can_duplicate_and_interleave_p): New function.
26847 (vect_get_and_check_slp_defs): Take the vector of statements
26848 rather than just the current one. Remove excess parentheses.
26849 Restriction rejectinon of vect_constant_def and vect_external_def
26850 for variable-length vectors to boolean types, or types for which
26851 can_duplicate_and_interleave_p is false.
26852 (vect_build_slp_tree_2): Update call to vect_get_and_check_slp_defs.
26853 (duplicate_and_interleave): New function.
26854 (vect_get_constant_vectors): Use gimple_build_vector for
26855 constant-length vectors and suitable variable-length constant
26856 vectors. Use duplicate_and_interleave for other variable-length
26857 vectors. Don't defer the update when inserting new statements.
26859 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26860 Alan Hayward <alan.hayward@arm.com>
26861 David Sherwood <david.sherwood@arm.com>
26863 * tree-vect-loop.c (vect_estimate_min_profitable_iters): Make sure
26864 min_profitable_iters doesn't go negative.
26866 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26867 Alan Hayward <alan.hayward@arm.com>
26868 David Sherwood <david.sherwood@arm.com>
26870 * doc/md.texi (vec_mask_load_lanes@var{m}@var{n}): Document.
26871 (vec_mask_store_lanes@var{m}@var{n}): Likewise.
26872 * optabs.def (vec_mask_load_lanes_optab): New optab.
26873 (vec_mask_store_lanes_optab): Likewise.
26874 * internal-fn.def (MASK_LOAD_LANES): New internal function.
26875 (MASK_STORE_LANES): Likewise.
26876 * internal-fn.c (mask_load_lanes_direct): New macro.
26877 (mask_store_lanes_direct): Likewise.
26878 (expand_mask_load_optab_fn): Handle masked operations.
26879 (expand_mask_load_lanes_optab_fn): New macro.
26880 (expand_mask_store_optab_fn): Handle masked operations.
26881 (expand_mask_store_lanes_optab_fn): New macro.
26882 (direct_mask_load_lanes_optab_supported_p): Likewise.
26883 (direct_mask_store_lanes_optab_supported_p): Likewise.
26884 * tree-vectorizer.h (vect_store_lanes_supported): Take a masked_p
26886 (vect_load_lanes_supported): Likewise.
26887 * tree-vect-data-refs.c (strip_conversion): New function.
26888 (can_group_stmts_p): Likewise.
26889 (vect_analyze_data_ref_accesses): Use it instead of checking
26890 for a pair of assignments.
26891 (vect_store_lanes_supported): Take a masked_p parameter.
26892 (vect_load_lanes_supported): Likewise.
26893 * tree-vect-loop.c (vect_analyze_loop_2): Update calls to
26894 vect_store_lanes_supported and vect_load_lanes_supported.
26895 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
26896 * tree-vect-stmts.c (get_group_load_store_type): Take a masked_p
26897 parameter. Don't allow gaps for masked accesses.
26898 Use vect_get_store_rhs. Update calls to vect_store_lanes_supported
26899 and vect_load_lanes_supported.
26900 (get_load_store_type): Take a masked_p parameter and update
26901 call to get_group_load_store_type.
26902 (vectorizable_store): Update call to get_load_store_type.
26903 Handle IFN_MASK_STORE_LANES.
26904 (vectorizable_load): Update call to get_load_store_type.
26905 Handle IFN_MASK_LOAD_LANES.
26907 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26908 Alan Hayward <alan.hayward@arm.com>
26909 David Sherwood <david.sherwood@arm.com>
26911 * config/aarch64/aarch64-modes.def: Define x2, x3 and x4 vector
26913 * config/aarch64/aarch64-protos.h
26914 (aarch64_sve_struct_memory_operand_p): Declare.
26915 * config/aarch64/iterators.md (SVE_STRUCT): New mode iterator.
26916 (vector_count, insn_length, VSINGLE, vsingle): New mode attributes.
26917 (VPRED, vpred): Handle SVE structure modes.
26918 * config/aarch64/constraints.md (Utx): New constraint.
26919 * config/aarch64/predicates.md (aarch64_sve_struct_memory_operand)
26920 (aarch64_sve_struct_nonimmediate_operand): New predicates.
26921 * config/aarch64/aarch64.md (UNSPEC_LDN, UNSPEC_STN): New unspecs.
26922 * config/aarch64/aarch64-sve.md (mov<mode>, *aarch64_sve_mov<mode>_le)
26923 (*aarch64_sve_mov<mode>_be, pred_mov<mode>): New patterns for
26924 structure modes. Split into pieces after RA.
26925 (vec_load_lanes<mode><vsingle>, vec_mask_load_lanes<mode><vsingle>)
26926 (vec_store_lanes<mode><vsingle>, vec_mask_store_lanes<mode><vsingle>):
26928 * config/aarch64/aarch64.c (aarch64_classify_vector_mode): Handle
26929 SVE structure modes.
26930 (aarch64_classify_address): Likewise.
26931 (sizetochar): Move earlier in file.
26932 (aarch64_print_operand): Handle SVE register lists.
26933 (aarch64_array_mode): New function.
26934 (aarch64_sve_struct_memory_operand_p): Likewise.
26935 (TARGET_ARRAY_MODE): Redefine.
26937 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26938 Alan Hayward <alan.hayward@arm.com>
26939 David Sherwood <david.sherwood@arm.com>
26941 * target.def (array_mode): New target hook.
26942 * doc/tm.texi.in (TARGET_ARRAY_MODE): New hook.
26943 * doc/tm.texi: Regenerate.
26944 * hooks.h (hook_optmode_mode_uhwi_none): Declare.
26945 * hooks.c (hook_optmode_mode_uhwi_none): New function.
26946 * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Use
26947 targetm.array_mode.
26948 * stor-layout.c (mode_for_array): Likewise. Support polynomial
26951 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26952 Alan Hayward <alan.hayward@arm.com>
26953 David Sherwood <david.sherwood@arm.com>
26955 * fold-const.c (fold_binary_loc): Check the argument types
26956 rather than the result type when testing for a vector operation.
26958 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26960 * doc/tm.texi.in (DWARF_LAZY_REGISTER_VALUE): Document.
26961 * doc/tm.texi: Regenerate.
26963 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26964 Alan Hayward <alan.hayward@arm.com>
26965 David Sherwood <david.sherwood@arm.com>
26967 * doc/invoke.texi (-msve-vector-bits=): Document new option.
26968 (sve): Document new AArch64 extension.
26969 * doc/md.texi (w): Extend the description of the AArch64
26970 constraint to include SVE vectors.
26971 (Upl, Upa): Document new AArch64 predicate constraints.
26972 * config/aarch64/aarch64-opts.h (aarch64_sve_vector_bits_enum): New
26974 * config/aarch64/aarch64.opt (sve_vector_bits): New enum.
26975 (msve-vector-bits=): New option.
26976 * config/aarch64/aarch64-option-extensions.def (fp, simd): Disable
26977 SVE when these are disabled.
26978 (sve): New extension.
26979 * config/aarch64/aarch64-modes.def: Define SVE vector and predicate
26980 modes. Adjust their number of units based on aarch64_sve_vg.
26981 (MAX_BITSIZE_MODE_ANY_MODE): Define.
26982 * config/aarch64/aarch64-protos.h (ADDR_QUERY_ANY): New
26983 aarch64_addr_query_type.
26984 (aarch64_const_vec_all_same_in_range_p, aarch64_sve_pred_mode)
26985 (aarch64_sve_cnt_immediate_p, aarch64_sve_addvl_addpl_immediate_p)
26986 (aarch64_sve_inc_dec_immediate_p, aarch64_add_offset_temporaries)
26987 (aarch64_split_add_offset, aarch64_output_sve_cnt_immediate)
26988 (aarch64_output_sve_addvl_addpl, aarch64_output_sve_inc_dec_immediate)
26989 (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): Declare.
26990 (aarch64_simd_imm_zero_p): Delete.
26991 (aarch64_check_zero_based_sve_index_immediate): Declare.
26992 (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
26993 (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
26994 (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
26995 (aarch64_sve_float_mul_immediate_p): Likewise.
26996 (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
26997 rather than an rtx.
26998 (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): Declare.
26999 (aarch64_expand_mov_immediate): Take a gen_vec_duplicate callback.
27000 (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move): Declare.
27001 (aarch64_expand_sve_vec_cmp_int, aarch64_expand_sve_vec_cmp_float)
27002 (aarch64_expand_sve_vcond, aarch64_expand_sve_vec_perm): Declare.
27003 (aarch64_regmode_natural_size): Likewise.
27004 * config/aarch64/aarch64.h (AARCH64_FL_SVE): New macro.
27005 (AARCH64_FL_V8_3, AARCH64_FL_RCPC, AARCH64_FL_DOTPROD): Shift
27007 (AARCH64_ISA_SVE, TARGET_SVE): New macros.
27008 (FIXED_REGISTERS, CALL_USED_REGISTERS, REGISTER_NAMES): Add entries
27009 for VG and the SVE predicate registers.
27010 (V_ALIASES): Add a "z"-prefixed alias.
27011 (FIRST_PSEUDO_REGISTER): Change to P15_REGNUM + 1.
27012 (AARCH64_DWARF_VG, AARCH64_DWARF_P0): New macros.
27013 (PR_REGNUM_P, PR_LO_REGNUM_P): Likewise.
27014 (PR_LO_REGS, PR_HI_REGS, PR_REGS): New reg_classes.
27015 (REG_CLASS_NAMES): Add entries for them.
27016 (REG_CLASS_CONTENTS): Likewise. Update ALL_REGS to include VG
27017 and the predicate registers.
27018 (aarch64_sve_vg): Declare.
27019 (BITS_PER_SVE_VECTOR, BYTES_PER_SVE_VECTOR, BYTES_PER_SVE_PRED)
27020 (SVE_BYTE_MODE, MAX_COMPILE_TIME_VEC_BYTES): New macros.
27021 (REGMODE_NATURAL_SIZE): Define.
27022 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins): Handle
27024 * config/aarch64/aarch64.c: Include cfgrtl.h.
27025 (simd_immediate_info): Add a constructor for series vectors,
27026 and an associated step field.
27027 (aarch64_sve_vg): New variable.
27028 (aarch64_dbx_register_number): Handle VG and the predicate registers.
27029 (aarch64_vect_struct_mode_p, aarch64_vector_mode_p): Delete.
27030 (VEC_ADVSIMD, VEC_SVE_DATA, VEC_SVE_PRED, VEC_STRUCT, VEC_ANY_SVE)
27031 (VEC_ANY_DATA, VEC_STRUCT): New constants.
27032 (aarch64_advsimd_struct_mode_p, aarch64_sve_pred_mode_p)
27033 (aarch64_classify_vector_mode, aarch64_vector_data_mode_p)
27034 (aarch64_sve_data_mode_p, aarch64_sve_pred_mode)
27035 (aarch64_get_mask_mode): New functions.
27036 (aarch64_hard_regno_nregs): Handle SVE data modes for FP_REGS
27037 and FP_LO_REGS. Handle PR_REGS, PR_LO_REGS and PR_HI_REGS.
27038 (aarch64_hard_regno_mode_ok): Handle VG. Also handle the SVE
27039 predicate modes and predicate registers. Explicitly restrict
27040 GPRs to modes of 16 bytes or smaller. Only allow FP registers
27041 to store a vector mode if it is recognized by
27042 aarch64_classify_vector_mode.
27043 (aarch64_regmode_natural_size): New function.
27044 (aarch64_hard_regno_caller_save_mode): Return the original mode
27046 (aarch64_sve_cnt_immediate_p, aarch64_output_sve_cnt_immediate)
27047 (aarch64_sve_addvl_addpl_immediate_p, aarch64_output_sve_addvl_addpl)
27048 (aarch64_sve_inc_dec_immediate_p, aarch64_output_sve_inc_dec_immediate)
27049 (aarch64_add_offset_1_temporaries, aarch64_offset_temporaries): New
27051 (aarch64_add_offset): Add a temp2 parameter. Assert that temp1
27052 does not overlap dest if the function is frame-related. Handle
27054 (aarch64_split_add_offset): New function.
27055 (aarch64_add_sp, aarch64_sub_sp): Add temp2 parameters and pass
27056 them aarch64_add_offset.
27057 (aarch64_allocate_and_probe_stack_space): Add a temp2 parameter
27058 and update call to aarch64_sub_sp.
27059 (aarch64_add_cfa_expression): New function.
27060 (aarch64_expand_prologue): Pass extra temporary registers to the
27061 functions above. Handle the case in which we need to emit new
27062 DW_CFA_expressions for registers that were originally saved
27063 relative to the stack pointer, but now have to be expressed
27064 relative to the frame pointer.
27065 (aarch64_output_mi_thunk): Pass extra temporary registers to the
27067 (aarch64_expand_epilogue): Likewise. Prevent inheritance of
27068 IP0 and IP1 values for SVE frames.
27069 (aarch64_expand_vec_series): New function.
27070 (aarch64_expand_sve_widened_duplicate): Likewise.
27071 (aarch64_expand_sve_const_vector): Likewise.
27072 (aarch64_expand_mov_immediate): Add a gen_vec_duplicate parameter.
27073 Handle SVE constants. Use emit_move_insn to move a force_const_mem
27074 into the register, rather than emitting a SET directly.
27075 (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move)
27076 (aarch64_get_reg_raw_mode, offset_4bit_signed_scaled_p)
27077 (offset_6bit_unsigned_scaled_p, aarch64_offset_7bit_signed_scaled_p)
27078 (offset_9bit_signed_scaled_p): New functions.
27079 (aarch64_replicate_bitmask_imm): New function.
27080 (aarch64_bitmask_imm): Use it.
27081 (aarch64_cannot_force_const_mem): Reject expressions involving
27082 a CONST_POLY_INT. Update call to aarch64_classify_symbol.
27083 (aarch64_classify_index): Handle SVE indices, by requiring
27084 a plain register index with a scale that matches the element size.
27085 (aarch64_classify_address): Handle SVE addresses. Assert that
27086 the mode of the address is VOIDmode or an integer mode.
27087 Update call to aarch64_classify_symbol.
27088 (aarch64_classify_symbolic_expression): Update call to
27089 aarch64_classify_symbol.
27090 (aarch64_const_vec_all_in_range_p): New function.
27091 (aarch64_print_vector_float_operand): Likewise.
27092 (aarch64_print_operand): Handle 'N' and 'C'. Use "zN" rather than
27093 "vN" for FP registers with SVE modes. Handle (const ...) vectors
27094 and the FP immediates 1.0 and 0.5.
27095 (aarch64_print_address_internal): Handle SVE addresses.
27096 (aarch64_print_operand_address): Use ADDR_QUERY_ANY.
27097 (aarch64_regno_regclass): Handle predicate registers.
27098 (aarch64_secondary_reload): Handle big-endian reloads of SVE
27100 (aarch64_class_max_nregs): Handle SVE modes and predicate registers.
27101 (aarch64_rtx_costs): Check for ADDVL and ADDPL instructions.
27102 (aarch64_convert_sve_vector_bits): New function.
27103 (aarch64_override_options): Use it to handle -msve-vector-bits=.
27104 (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
27105 rather than an rtx.
27106 (aarch64_legitimate_constant_p): Use aarch64_classify_vector_mode.
27107 Handle SVE vector and predicate modes. Accept VL-based constants
27108 that need only one temporary register, and VL offsets that require
27109 no temporary registers.
27110 (aarch64_conditional_register_usage): Mark the predicate registers
27111 as fixed if SVE isn't available.
27112 (aarch64_vector_mode_supported_p): Use aarch64_classify_vector_mode.
27113 Return true for SVE vector and predicate modes.
27114 (aarch64_simd_container_mode): Take the number of bits as a poly_int64
27115 rather than an unsigned int. Handle SVE modes.
27116 (aarch64_preferred_simd_mode): Update call accordingly. Handle
27118 (aarch64_autovectorize_vector_sizes): Add BYTES_PER_SVE_VECTOR
27120 (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
27121 (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
27122 (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
27123 (aarch64_sve_float_mul_immediate_p): New functions.
27124 (aarch64_sve_valid_immediate): New function.
27125 (aarch64_simd_valid_immediate): Use it as the fallback for SVE vectors.
27126 Explicitly reject structure modes. Check for INDEX constants.
27127 Handle PTRUE and PFALSE constants.
27128 (aarch64_check_zero_based_sve_index_immediate): New function.
27129 (aarch64_simd_imm_zero_p): Delete.
27130 (aarch64_mov_operand_p): Use aarch64_simd_valid_immediate for
27131 vector modes. Accept constants in the range of CNT[BHWD].
27132 (aarch64_simd_scalar_immediate_valid_for_move): Explicitly
27133 ask for an Advanced SIMD mode.
27134 (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): New functions.
27135 (aarch64_simd_vector_alignment): Handle SVE predicates.
27136 (aarch64_vectorize_preferred_vector_alignment): New function.
27137 (aarch64_simd_vector_alignment_reachable): Use it instead of
27139 (aarch64_shift_truncation_mask): Use aarch64_vector_data_mode_p.
27140 (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): New
27142 (MAX_VECT_LEN): Delete.
27143 (expand_vec_perm_d): Add a vec_flags field.
27144 (emit_unspec2, aarch64_expand_sve_vec_perm): New functions.
27145 (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_zip)
27146 (aarch64_evpc_ext): Don't apply a big-endian lane correction
27148 (aarch64_evpc_rev): Rename to...
27149 (aarch64_evpc_rev_local): ...this. Use a predicated operation for SVE.
27150 (aarch64_evpc_rev_global): New function.
27151 (aarch64_evpc_dup): Enforce a 64-byte range for SVE DUP.
27152 (aarch64_evpc_tbl): Use MAX_COMPILE_TIME_VEC_BYTES instead of
27154 (aarch64_evpc_sve_tbl): New function.
27155 (aarch64_expand_vec_perm_const_1): Update after rename of
27156 aarch64_evpc_rev. Handle SVE permutes too, trying
27157 aarch64_evpc_rev_global and using aarch64_evpc_sve_tbl rather
27158 than aarch64_evpc_tbl.
27159 (aarch64_vectorize_vec_perm_const): Initialize vec_flags.
27160 (aarch64_sve_cmp_operand_p, aarch64_unspec_cond_code)
27161 (aarch64_gen_unspec_cond, aarch64_expand_sve_vec_cmp_int)
27162 (aarch64_emit_unspec_cond, aarch64_emit_unspec_cond_or)
27163 (aarch64_emit_inverted_unspec_cond, aarch64_expand_sve_vec_cmp_float)
27164 (aarch64_expand_sve_vcond): New functions.
27165 (aarch64_modes_tieable_p): Use aarch64_vector_data_mode_p instead
27166 of aarch64_vector_mode_p.
27167 (aarch64_dwarf_poly_indeterminate_value): New function.
27168 (aarch64_compute_pressure_classes): Likewise.
27169 (aarch64_can_change_mode_class): Likewise.
27170 (TARGET_GET_RAW_RESULT_MODE, TARGET_GET_RAW_ARG_MODE): Redefine.
27171 (TARGET_VECTORIZE_PREFERRED_VECTOR_ALIGNMENT): Likewise.
27172 (TARGET_VECTORIZE_GET_MASK_MODE): Likewise.
27173 (TARGET_DWARF_POLY_INDETERMINATE_VALUE): Likewise.
27174 (TARGET_COMPUTE_PRESSURE_CLASSES): Likewise.
27175 (TARGET_CAN_CHANGE_MODE_CLASS): Likewise.
27176 * config/aarch64/constraints.md (Upa, Upl, Uav, Uat, Usv, Usi, Utr)
27177 (Uty, Dm, vsa, vsc, vsd, vsi, vsn, vsl, vsm, vsA, vsM, vsN): New
27179 (Dn, Dl, Dr): Accept const as well as const_vector.
27180 (Dz): Likewise. Compare against CONST0_RTX.
27181 * config/aarch64/iterators.md: Refer to "Advanced SIMD" instead
27182 of "vector" where appropriate.
27183 (SVE_ALL, SVE_BH, SVE_BHS, SVE_BHSI, SVE_HSDI, SVE_HSF, SVE_SD)
27184 (SVE_SDI, SVE_I, SVE_F, PRED_ALL, PRED_BHS): New mode iterators.
27185 (UNSPEC_SEL, UNSPEC_ANDF, UNSPEC_IORF, UNSPEC_XORF, UNSPEC_COND_LT)
27186 (UNSPEC_COND_LE, UNSPEC_COND_EQ, UNSPEC_COND_NE, UNSPEC_COND_GE)
27187 (UNSPEC_COND_GT, UNSPEC_COND_LO, UNSPEC_COND_LS, UNSPEC_COND_HS)
27188 (UNSPEC_COND_HI, UNSPEC_COND_UO): New unspecs.
27189 (Vetype, VEL, Vel, VWIDE, Vwide, vw, vwcore, V_INT_EQUIV)
27190 (v_int_equiv): Extend to SVE modes.
27191 (Vesize, V128, v128, Vewtype, V_FP_EQUIV, v_fp_equiv, VPRED): New
27193 (LOGICAL_OR, SVE_INT_UNARY, SVE_FP_UNARY): New code iterators.
27194 (optab): Handle popcount, smin, smax, umin, umax, abs and sqrt.
27195 (logical_nn, lr, sve_int_op, sve_fp_op): New code attributs.
27196 (LOGICALF, OPTAB_PERMUTE, UNPACK, UNPACK_UNSIGNED, SVE_COND_INT_CMP)
27197 (SVE_COND_FP_CMP): New int iterators.
27198 (perm_hilo): Handle the new unpack unspecs.
27199 (optab, logicalf_op, su, perm_optab, cmp_op, imm_con): New int
27201 * config/aarch64/predicates.md (aarch64_sve_cnt_immediate)
27202 (aarch64_sve_addvl_addpl_immediate, aarch64_split_add_offset_immediate)
27203 (aarch64_pluslong_or_poly_operand, aarch64_nonmemory_operand)
27204 (aarch64_equality_operator, aarch64_constant_vector_operand)
27205 (aarch64_sve_ld1r_operand, aarch64_sve_ldr_operand): New predicates.
27206 (aarch64_sve_nonimmediate_operand): Likewise.
27207 (aarch64_sve_general_operand): Likewise.
27208 (aarch64_sve_dup_operand, aarch64_sve_arith_immediate): Likewise.
27209 (aarch64_sve_sub_arith_immediate, aarch64_sve_inc_dec_immediate)
27210 (aarch64_sve_logical_immediate, aarch64_sve_mul_immediate): Likewise.
27211 (aarch64_sve_dup_immediate, aarch64_sve_cmp_vsc_immediate): Likewise.
27212 (aarch64_sve_cmp_vsd_immediate, aarch64_sve_index_immediate): Likewise.
27213 (aarch64_sve_float_arith_immediate): Likewise.
27214 (aarch64_sve_float_arith_with_sub_immediate): Likewise.
27215 (aarch64_sve_float_mul_immediate, aarch64_sve_arith_operand): Likewise.
27216 (aarch64_sve_add_operand, aarch64_sve_logical_operand): Likewise.
27217 (aarch64_sve_lshift_operand, aarch64_sve_rshift_operand): Likewise.
27218 (aarch64_sve_mul_operand, aarch64_sve_cmp_vsc_operand): Likewise.
27219 (aarch64_sve_cmp_vsd_operand, aarch64_sve_index_operand): Likewise.
27220 (aarch64_sve_float_arith_operand): Likewise.
27221 (aarch64_sve_float_arith_with_sub_operand): Likewise.
27222 (aarch64_sve_float_mul_operand): Likewise.
27223 (aarch64_sve_vec_perm_operand): Likewise.
27224 (aarch64_pluslong_operand): Include aarch64_sve_addvl_addpl_immediate.
27225 (aarch64_mov_operand): Accept const_poly_int and const_vector.
27226 (aarch64_simd_lshift_imm, aarch64_simd_rshift_imm): Accept const
27227 as well as const_vector.
27228 (aarch64_simd_imm_zero, aarch64_simd_imm_minus_one): Move earlier
27229 in file. Use CONST0_RTX and CONSTM1_RTX.
27230 (aarch64_simd_or_scalar_imm_zero): Likewise. Add match_codes.
27231 (aarch64_simd_reg_or_zero): Accept const as well as const_vector.
27232 Use aarch64_simd_imm_zero.
27233 * config/aarch64/aarch64-sve.md: New file.
27234 * config/aarch64/aarch64.md: Include it.
27235 (VG_REGNUM, P0_REGNUM, P7_REGNUM, P15_REGNUM): New register numbers.
27236 (UNSPEC_REV, UNSPEC_LD1_SVE, UNSPEC_ST1_SVE, UNSPEC_MERGE_PTRUE)
27237 (UNSPEC_PTEST_PTRUE, UNSPEC_UNPACKSHI, UNSPEC_UNPACKUHI)
27238 (UNSPEC_UNPACKSLO, UNSPEC_UNPACKULO, UNSPEC_PACK)
27239 (UNSPEC_FLOAT_CONVERT, UNSPEC_WHILE_LO): New unspec constants.
27240 (sve): New attribute.
27241 (enabled): Disable instructions with the sve attribute unless
27243 (movqi, movhi): Pass CONST_POLY_INT operaneds through
27244 aarch64_expand_mov_immediate.
27245 (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64): Handle
27246 CNT[BHSD] immediates.
27247 (movti): Split CONST_POLY_INT moves into two halves.
27248 (add<mode>3): Accept aarch64_pluslong_or_poly_operand.
27249 Split additions that need a temporary here if the destination
27250 is the stack pointer.
27251 (*add<mode>3_aarch64): Handle ADDVL and ADDPL immediates.
27252 (*add<mode>3_poly_1): New instruction.
27253 (set_clobber_cc): New expander.
27255 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
27257 * simplify-rtx.c (simplify_immed_subreg): Add an inner_bytes
27258 parameter and use it instead of GET_MODE_SIZE (innermode). Use
27259 inner_bytes * BITS_PER_UNIT instead of GET_MODE_BITSIZE (innermode).
27260 Use CEIL (inner_bytes, GET_MODE_UNIT_SIZE (innermode)) instead of
27261 GET_MODE_NUNITS (innermode). Also add a first_elem parameter.
27262 Change innermode from fixed_mode_size to machine_mode.
27263 (simplify_subreg): Update call accordingly. Handle a constant-sized
27264 subreg of a variable-length CONST_VECTOR.
27266 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
27267 Alan Hayward <alan.hayward@arm.com>
27268 David Sherwood <david.sherwood@arm.com>
27270 * tree-ssa-address.c (mem_ref_valid_without_offset_p): New function.
27271 (add_offset_to_base): New function, split out from...
27272 (create_mem_ref): ...here. When handling a scale other than 1,
27273 check first whether the address is valid without the offset.
27274 Add it into the base if so, leaving the index and scale as-is.
27276 2018-01-12 Jakub Jelinek <jakub@redhat.com>
27279 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Call
27280 fold_for_warn before checking if arg2 is INTEGER_CST.
27282 2018-01-12 Segher Boessenkool <segher@kernel.crashing.org>
27284 * config/rs6000/predicates.md (load_multiple_operation): Delete.
27285 (store_multiple_operation): Delete.
27286 * config/rs6000/rs6000-cpus.def (601): Remove MASK_STRING.
27287 * config/rs6000/rs6000-protos.h (rs6000_output_load_multiple): Delete.
27288 * config/rs6000/rs6000-string.c (expand_block_move): Delete everything
27289 guarded by TARGET_STRING.
27290 (rs6000_output_load_multiple): Delete.
27291 * config/rs6000/rs6000.c (rs6000_option_override_internal): Delete
27292 OPTION_MASK_STRING / TARGET_STRING handling.
27293 (print_operand) <'N', 'O'>: Add comment that these are unused now.
27294 (const rs6000_opt_masks) <"string">: Change mask to 0.
27295 * config/rs6000/rs6000.h (TARGET_DEFAULT): Remove MASK_STRING.
27296 (MASK_STRING): Delete.
27297 * config/rs6000/rs6000.md (*mov<mode>_string): Delete TARGET_STRING
27299 (load_multiple): Delete.
27306 (store_multiple): Delete.
27313 (movmemsi_8reg): Delete.
27314 (corresponding unnamed define_insn): Delete.
27315 (movmemsi_6reg): Delete.
27316 (corresponding unnamed define_insn): Delete.
27317 (movmemsi_4reg): Delete.
27318 (corresponding unnamed define_insn): Delete.
27319 (movmemsi_2reg): Delete.
27320 (corresponding unnamed define_insn): Delete.
27321 (movmemsi_1reg): Delete.
27322 (corresponding unnamed define_insn): Delete.
27323 * config/rs6000/rs6000.opt (mno-string): New.
27324 (mstring): Replace by deprecation warning stub.
27325 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mstring.
27327 2018-01-12 Jakub Jelinek <jakub@redhat.com>
27329 * regrename.c (regrename_do_replace): If replacing the same
27330 reg multiple times, try to reuse last created gen_raw_REG.
27333 * bb-reorder.c (pass_partition_blocks::gate): In lto don't partition
27334 main to workaround a bug in GDB.
27336 2018-01-12 Tom de Vries <tom@codesourcery.com>
27339 * config.gcc (nvptx*-*-*): Set use_gcc_stdint=wrap.
27341 2018-01-12 Vladimir Makarov <vmakarov@redhat.com>
27343 PR rtl-optimization/80481
27344 * ira-color.c (get_cap_member): New function.
27345 (allocnos_conflict_by_live_ranges_p): Use it.
27346 (slot_coalesced_allocno_live_ranges_intersect_p): Add assert.
27347 (setup_slot_coalesced_allocno_live_ranges): Ditto.
27349 2018-01-12 Uros Bizjak <ubizjak@gmail.com>
27352 * config/alpha/alpha.md (*saddsi_1): New insn_ans_split pattern.
27353 (*saddl_se_1): Ditto.
27354 (*ssubsi_1): Ditto.
27355 (*ssubl_se_1): Ditto.
27357 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
27359 * tree-predcom.c (aff_combination_dr_offset): Use wi::to_poly_widest
27360 rather than wi::to_widest for DR_INITs.
27361 * tree-vect-data-refs.c (vect_find_same_alignment_drs): Use
27362 wi::to_poly_offset rather than wi::to_offset for DR_INIT.
27363 (vect_analyze_data_ref_accesses): Require both DR_INITs to be
27365 (vect_analyze_group_access_1): Note that here.
27367 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
27369 * tree-vectorizer.c (get_vec_alignment_for_array_type): Handle
27370 polynomial type sizes.
27372 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
27374 * gimplify.c (gimple_add_tmp_var_fn): Allow variables to have a
27375 poly_uint64 size, rather than requiring an unsigned HOST_WIDE_INT size.
27376 (gimple_add_tmp_var): Likewise.
27378 2018-01-12 Martin Liska <mliska@suse.cz>
27380 * gimple.c (gimple_alloc_counts): Use uint64_t instead of int.
27381 (gimple_alloc_sizes): Likewise.
27382 (dump_gimple_statistics): Use PRIu64 in printf format.
27383 * gimple.h: Change uint64_t to int.
27385 2018-01-12 Martin Liska <mliska@suse.cz>
27387 * tree-core.h: Use uint64_t instead of int.
27388 * tree.c (tree_node_counts): Likewise.
27389 (tree_node_sizes): Likewise.
27390 (dump_tree_statistics): Use PRIu64 in printf format.
27392 2018-01-12 Martin Liska <mliska@suse.cz>
27394 * Makefile.in: As qsort_chk is implemented in vec.c, add
27395 vec.o to linkage of gencfn-macros.
27396 * tree.c (build_new_poly_int_cst): Add CXX_MEM_STAT_INFO as it's
27397 passing the info to record_node_allocation_statistics.
27398 (test_vector_cst_patterns): Add CXX_MEM_STAT_INFO to declaration
27400 * ggc-common.c (struct ggc_usage): Add operator== and use
27401 it in operator< and compare function.
27402 * mem-stats.h (struct mem_usage): Likewise.
27403 * vec.c (struct vec_usage): Remove operator< and compare
27404 function. Can be simply inherited.
27406 2018-01-12 Martin Jambor <mjambor@suse.cz>
27409 * params.def: New parameter PARAM_AVOID_FMA_MAX_BITS.
27410 * tree-ssa-math-opts.c: Include domwalk.h.
27411 (convert_mult_to_fma_1): New function.
27412 (fma_transformation_info): New type.
27413 (fma_deferring_state): Likewise.
27414 (cancel_fma_deferring): New function.
27415 (result_of_phi): Likewise.
27416 (last_fma_candidate_feeds_initial_phi): Likewise.
27417 (convert_mult_to_fma): Added deferring logic, split actual
27418 transformation to convert_mult_to_fma_1.
27419 (math_opts_dom_walker): New type.
27420 (math_opts_dom_walker::after_dom_children): New method, body moved
27421 here from pass_optimize_widening_mul::execute, added deferring logic
27423 (pass_optimize_widening_mul::execute): Moved most of code to
27424 math_opts_dom_walker::after_dom_children.
27425 * config/i386/x86-tune.def (X86_TUNE_AVOID_128FMA_CHAINS): New.
27426 * config/i386/i386.c (ix86_option_override_internal): Added
27427 maybe_setting of PARAM_AVOID_FMA_MAX_BITS.
27429 2018-01-12 Richard Biener <rguenther@suse.de>
27432 * dwarf2out.c (gen_variable_die): Do not reset old_die for
27433 inline instance vars.
27435 2018-01-12 Oleg Endo <olegendo@gcc.gnu.org>
27438 * config/rx/rx.c (rx_is_restricted_memory_address):
27439 Handle SUBREG case.
27441 2018-01-12 Richard Biener <rguenther@suse.de>
27443 PR tree-optimization/80846
27444 * target.def (split_reduction): New target hook.
27445 * targhooks.c (default_split_reduction): New function.
27446 * targhooks.h (default_split_reduction): Declare.
27447 * tree-vect-loop.c (vect_create_epilog_for_reduction): If the
27448 target requests first reduce vectors by combining low and high
27450 * tree-vect-stmts.c (vect_gen_perm_mask_any): Adjust.
27451 (get_vectype_for_scalar_type_and_size): Export.
27452 * tree-vectorizer.h (get_vectype_for_scalar_type_and_size): Declare.
27453 * doc/tm.texi.in (TARGET_VECTORIZE_SPLIT_REDUCTION): Document.
27454 * doc/tm.texi: Regenerate.
27455 * config/i386/i386.c (ix86_split_reduction): Implement
27456 TARGET_VECTORIZE_SPLIT_REDUCTION.
27458 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
27461 * config/sparc/sparc.h (PIC_OFFSET_TABLE_REGNUM): Set to INVALID_REGNUM
27462 in PIC mode except for TARGET_VXWORKS_RTP.
27463 * config/sparc/sparc.c: Include cfgrtl.h.
27464 (TARGET_INIT_PIC_REG): Define.
27465 (TARGET_USE_PSEUDO_PIC_REG): Likewise.
27466 (sparc_pic_register_p): New predicate.
27467 (sparc_legitimate_address_p): Use it.
27468 (sparc_legitimize_pic_address): Likewise.
27469 (sparc_delegitimize_address): Likewise.
27470 (sparc_mode_dependent_address_p): Likewise.
27471 (gen_load_pcrel_sym): Remove 4th parameter.
27472 (load_got_register): Adjust call to above. Remove obsolete stuff.
27473 (sparc_expand_prologue): Do not call load_got_register here.
27474 (sparc_flat_expand_prologue): Likewise.
27475 (sparc_output_mi_thunk): Set the pic_offset_table_rtx object.
27476 (sparc_use_pseudo_pic_reg): New function.
27477 (sparc_init_pic_reg): Likewise.
27478 * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
27479 (builtin_setjmp_receiver): Enable only for TARGET_VXWORKS_RTP.
27481 2018-01-12 Christophe Lyon <christophe.lyon@linaro.org>
27483 * doc/sourcebuild.texi (Effective-Target Keywords, Other attributes):
27484 Add item for branch_cost.
27486 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
27488 PR rtl-optimization/83565
27489 * rtlanal.c (nonzero_bits1): On WORD_REGISTER_OPERATIONS machines, do
27490 not extend the result to a larger mode for rotate operations.
27491 (num_sign_bit_copies1): Likewise.
27493 2018-01-12 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
27496 * config/sol2.h (STARTFILE_ARCH_SPEC): Don't use with -shared or
27498 Use values-Xc.o for -pedantic.
27499 Link with values-xpg4.o for C90, values-xpg6.o otherwise.
27501 2018-01-12 Martin Liska <mliska@suse.cz>
27504 * ipa-devirt.c (final_warning_record::grow_type_warnings):
27506 (possible_polymorphic_call_targets): Use it.
27507 (ipa_devirt): Likewise.
27509 2018-01-12 Martin Liska <mliska@suse.cz>
27511 * profile-count.h (enum profile_quality): Use 0 as invalid
27512 enum value of profile_quality.
27514 2018-01-12 Chung-Ju Wu <jasonwucj@gmail.com>
27516 * doc/invoke.texi (NDS32 Options): Add -mext-perf, -mext-perf2 and
27517 -mext-string options.
27519 2018-01-12 Richard Biener <rguenther@suse.de>
27521 * lto-streamer-out.c (DFS::DFS_write_tree_body): Process
27522 DECL_DEBUG_EXPR conditional on DECL_HAS_DEBUG_EXPR_P.
27523 * tree-streamer-in.c (lto_input_ts_decl_common_tree_pointers):
27525 * tree-streamer-out.c (write_ts_decl_common_tree_pointers): Likewise.
27527 2018-01-11 Michael Meissner <meissner@linux.vnet.ibm.com>
27529 * configure.ac (--with-long-double-format): Add support for the
27530 configuration option to change the default long double format on
27532 * config.gcc (powerpc*-linux*-*): Likewise.
27533 * configure: Regenerate.
27534 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): If long
27535 double is IEEE, define __KC__ and __KF__ to allow floatn.h to be
27536 used without modification.
27538 2018-01-11 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
27540 * config/rs6000/rs6000-builtin.def (BU_P7_MISC_X): New #define.
27541 (SPEC_BARRIER): New instantiation of BU_P7_MISC_X.
27542 * config/rs6000/rs6000.c (rs6000_expand_builtin): Handle
27543 MISC_BUILTIN_SPEC_BARRIER.
27544 (rs6000_init_builtins): Likewise.
27545 * config/rs6000/rs6000.md (UNSPECV_SPEC_BARRIER): New UNSPECV
27547 (speculation_barrier): New define_insn.
27548 * doc/extend.texi: Document __builtin_speculation_barrier.
27550 2018-01-11 Jakub Jelinek <jakub@redhat.com>
27553 * config/i386/i386.c (ix86_expand_vector_init_one_nonzero): If one_var
27554 is 0, for V{8,16}S[IF] and V[48]D[IF]mode use gen_vec_set<mode>_0.
27555 * config/i386/sse.md (VI8_AVX_AVX512F, VI4F_256_512): New mode
27557 (ssescalarmodesuffix): Add 512-bit vectors. Use "d" or "q" for
27558 integral modes instead of "ss" and "sd".
27559 (vec_set<mode>_0): New define_insns for 256-bit and 512-bit
27560 vectors with 32-bit and 64-bit elements.
27561 (vecdupssescalarmodesuffix): New mode attribute.
27562 (vec_dup<mode>): Use it.
27564 2018-01-11 H.J. Lu <hongjiu.lu@intel.com>
27567 * config/i386/i386.c (ix86_compute_frame_layout): Align stack
27568 frame if argument is passed on stack.
27570 2018-01-11 Jakub Jelinek <jakub@redhat.com>
27573 * ree.c (combine_reaching_defs): Optimize also
27574 reg2=exp; reg1=reg2; reg2=any_extend(reg1); into
27575 reg2=any_extend(exp); reg1=reg2;, formatting fix.
27577 2018-01-11 Jan Hubicka <hubicka@ucw.cz>
27579 PR middle-end/83189
27580 * gimple-ssa-isolate-paths.c (isolate_path): Fix profile update.
27582 2018-01-11 Jan Hubicka <hubicka@ucw.cz>
27584 PR middle-end/83718
27585 * tree-inline.c (copy_cfg_body): Adjust num&den for scaling
27586 after they are computed.
27588 2018-01-11 Bin Cheng <bin.cheng@arm.com>
27590 PR tree-optimization/83695
27591 * gimple-loop-linterchange.cc
27592 (tree_loop_interchange::interchange_loops): Call scev_reset_htab to
27593 reset cached scev information after interchange.
27594 (pass_linterchange::execute): Remove call to scev_reset_htab.
27596 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
27598 * config/arm/arm_neon.h (vfmlal_lane_low_u32, vfmlal_lane_high_u32,
27599 vfmlalq_laneq_low_u32, vfmlalq_lane_low_u32, vfmlal_laneq_low_u32,
27600 vfmlalq_laneq_high_u32, vfmlalq_lane_high_u32, vfmlal_laneq_high_u32,
27601 vfmlsl_lane_low_u32, vfmlsl_lane_high_u32, vfmlslq_laneq_low_u32,
27602 vfmlslq_lane_low_u32, vfmlsl_laneq_low_u32, vfmlslq_laneq_high_u32,
27603 vfmlslq_lane_high_u32, vfmlsl_laneq_high_u32): Define.
27604 * config/arm/arm_neon_builtins.def (vfmal_lane_low,
27605 vfmal_lane_lowv4hf, vfmal_lane_lowv8hf, vfmal_lane_high,
27606 vfmal_lane_highv4hf, vfmal_lane_highv8hf, vfmsl_lane_low,
27607 vfmsl_lane_lowv4hf, vfmsl_lane_lowv8hf, vfmsl_lane_high,
27608 vfmsl_lane_highv4hf, vfmsl_lane_highv8hf): New sets of builtins.
27609 * config/arm/iterators.md (VFMLSEL2, vfmlsel2): New mode attributes.
27610 (V_lane_reg): Likewise.
27611 * config/arm/neon.md (neon_vfm<vfml_op>l_lane_<vfml_half><VCVTF:mode>):
27613 (neon_vfm<vfml_op>l_lane_<vfml_half><vfmlsel2><mode>): Likewise.
27614 (vfmal_lane_low<mode>_intrinsic,
27615 vfmal_lane_low<vfmlsel2><mode>_intrinsic,
27616 vfmal_lane_high<vfmlsel2><mode>_intrinsic,
27617 vfmal_lane_high<mode>_intrinsic, vfmsl_lane_low<mode>_intrinsic,
27618 vfmsl_lane_low<vfmlsel2><mode>_intrinsic,
27619 vfmsl_lane_high<vfmlsel2><mode>_intrinsic,
27620 vfmsl_lane_high<mode>_intrinsic): New define_insns.
27622 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
27624 * config/arm/arm-cpus.in (fp16fml): New feature.
27625 (ALL_SIMD): Add fp16fml.
27626 (armv8.2-a): Add fp16fml as an option.
27627 (armv8.3-a): Likewise.
27628 (armv8.4-a): Add fp16fml as part of fp16.
27629 * config/arm/arm.h (TARGET_FP16FML): Define.
27630 * config/arm/arm-c.c (arm_cpu_builtins): Define __ARM_FEATURE_FP16_FML
27632 * config/arm/arm-modes.def (V2HF): Define.
27633 * config/arm/arm_neon.h (vfmlal_low_u32, vfmlsl_low_u32,
27634 vfmlal_high_u32, vfmlsl_high_u32, vfmlalq_low_u32,
27635 vfmlslq_low_u32, vfmlalq_high_u32, vfmlslq_high_u32): Define.
27636 * config/arm/arm_neon_builtins.def (vfmal_low, vfmal_high,
27637 vfmsl_low, vfmsl_high): New set of builtins.
27638 * config/arm/iterators.md (PLUSMINUS): New code iterator.
27639 (vfml_op): New code attribute.
27640 (VFMLHALVES): New int iterator.
27641 (VFML, VFMLSEL): New mode attributes.
27642 (V_reg): Define mapping for V2HF.
27643 (V_hi, V_lo): New mode attributes.
27644 (VF_constraint): Likewise.
27645 (vfml_half, vfml_half_selector): New int attributes.
27646 * config/arm/neon.md (neon_vfm<vfml_op>l_<vfml_half><mode>): New
27648 (vfmal_low<mode>_intrinsic, vfmsl_high<mode>_intrinsic,
27649 vfmal_high<mode>_intrinsic, vfmsl_low<mode>_intrinsic):
27651 * config/arm/t-arm-elf (v8_fps): Add fp16fml.
27652 * config/arm/t-multilib (v8_2_a_simd_variants): Add fp16fml.
27653 * config/arm/unspecs.md (UNSPEC_VFML_LO, UNSPEC_VFML_HI): New unspecs.
27654 * doc/invoke.texi (ARM Options): Document fp16fml. Update armv8.4-a
27656 * doc/sourcebuild.texi (arm_fp16fml_neon_ok, arm_fp16fml_neon):
27657 Document new effective target and option set.
27659 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
27661 * config/arm/arm-cpus.in (armv8_4): New feature.
27662 (ARMv8_4a): New fgroup.
27663 (armv8.4-a): New arch.
27664 * config/arm/arm-tables.opt: Regenerate.
27665 * config/arm/t-aprofile: Add matching rules for -march=armv8.4-a.
27666 * config/arm/t-arm-elf (all_v8_archs): Add armv8.4-a.
27667 * config/arm/t-multilib (v8_4_a_simd_variants): New variable.
27668 Add matching rules for -march=armv8.4-a and extensions.
27669 * doc/invoke.texi (ARM Options): Document -march=armv8.4-a.
27671 2018-01-11 Oleg Endo <olegendo@gcc.gnu.org>
27674 * config/rx/rx.md (BW): New mode attribute.
27675 (sync_lock_test_and_setsi): Add mode suffix to insn output.
27677 2018-01-11 Richard Biener <rguenther@suse.de>
27679 PR tree-optimization/83435
27680 * graphite.c (canonicalize_loop_form): Ignore fake loop exit edges.
27681 * graphite-scop-detection.c (scop_detection::get_sese): Likewise.
27682 * tree-vrp.c (add_assert_info): Drop TREE_OVERFLOW if they appear.
27684 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
27685 Alan Hayward <alan.hayward@arm.com>
27686 David Sherwood <david.sherwood@arm.com>
27688 * config/aarch64/aarch64.c (aarch64_address_info): Add a const_offset
27690 (aarch64_classify_address): Initialize it. Track polynomial offsets.
27691 (aarch64_print_address_internal): Use it to check for a zero offset.
27693 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
27694 Alan Hayward <alan.hayward@arm.com>
27695 David Sherwood <david.sherwood@arm.com>
27697 * config/aarch64/aarch64-modes.def (NUM_POLY_INT_COEFFS): Set to 2.
27698 * config/aarch64/aarch64-protos.h (aarch64_initial_elimination_offset):
27699 Return a poly_int64 rather than a HOST_WIDE_INT.
27700 (aarch64_offset_7bit_signed_scaled_p): Take the offset as a poly_int64
27701 rather than a HOST_WIDE_INT.
27702 * config/aarch64/aarch64.h (aarch64_frame): Protect with
27703 HAVE_POLY_INT_H rather than HOST_WIDE_INT. Change locals_offset,
27704 hard_fp_offset, frame_size, initial_adjust, callee_offset and
27705 final_offset from HOST_WIDE_INT to poly_int64.
27706 * config/aarch64/aarch64-builtins.c (aarch64_simd_expand_args): Use
27707 to_constant when getting the number of units in an Advanced SIMD
27709 (aarch64_builtin_vectorized_function): Check for a constant number
27711 * config/aarch64/aarch64-simd.md (mov<mode>): Handle polynomial
27713 (aarch64_ld<VSTRUCT:nregs>_lane<VALLDIF:mode>): Use the nunits
27714 attribute instead of GET_MODE_NUNITS.
27715 * config/aarch64/aarch64.c (aarch64_hard_regno_nregs)
27716 (aarch64_class_max_nregs): Use the constant_lowest_bound of the
27717 GET_MODE_SIZE for fixed-size registers.
27718 (aarch64_const_vec_all_same_in_range_p): Use const_vec_duplicate_p.
27719 (aarch64_hard_regno_call_part_clobbered, aarch64_classify_index)
27720 (aarch64_mode_valid_for_sched_fusion_p, aarch64_classify_address)
27721 (aarch64_legitimize_address_displacement, aarch64_secondary_reload)
27722 (aarch64_print_operand, aarch64_print_address_internal)
27723 (aarch64_address_cost, aarch64_rtx_costs, aarch64_register_move_cost)
27724 (aarch64_short_vector_p, aapcs_vfp_sub_candidate)
27725 (aarch64_simd_attr_length_rglist, aarch64_operands_ok_for_ldpstp):
27726 Handle polynomial GET_MODE_SIZE.
27727 (aarch64_hard_regno_caller_save_mode): Likewise. Return modes
27728 wider than SImode without modification.
27729 (tls_symbolic_operand_type): Use strip_offset instead of split_const.
27730 (aarch64_pass_by_reference, aarch64_layout_arg, aarch64_pad_reg_upward)
27731 (aarch64_gimplify_va_arg_expr): Assert that we don't yet handle
27732 passing and returning SVE modes.
27733 (aarch64_function_value, aarch64_layout_arg): Use gen_int_mode
27734 rather than GEN_INT.
27735 (aarch64_emit_probe_stack_range): Take the size as a poly_int64
27736 rather than a HOST_WIDE_INT, but call sorry if it isn't constant.
27737 (aarch64_allocate_and_probe_stack_space): Likewise.
27738 (aarch64_layout_frame): Cope with polynomial offsets.
27739 (aarch64_save_callee_saves, aarch64_restore_callee_saves): Take the
27740 start_offset as a poly_int64 rather than a HOST_WIDE_INT. Track
27741 polynomial offsets.
27742 (offset_9bit_signed_unscaled_p, offset_12bit_unsigned_scaled_p)
27743 (aarch64_offset_7bit_signed_scaled_p): Take the offset as a
27744 poly_int64 rather than a HOST_WIDE_INT.
27745 (aarch64_get_separate_components, aarch64_process_components)
27746 (aarch64_expand_prologue, aarch64_expand_epilogue)
27747 (aarch64_use_return_insn_p): Handle polynomial frame offsets.
27748 (aarch64_anchor_offset): New function, split out from...
27749 (aarch64_legitimize_address): ...here.
27750 (aarch64_builtin_vectorization_cost): Handle polynomial
27751 TYPE_VECTOR_SUBPARTS.
27752 (aarch64_simd_check_vect_par_cnst_half): Handle polynomial
27754 (aarch64_simd_make_constant, aarch64_expand_vector_init): Get the
27755 number of elements from the PARALLEL rather than the mode.
27756 (aarch64_shift_truncation_mask): Use GET_MODE_UNIT_BITSIZE
27757 rather than GET_MODE_BITSIZE.
27758 (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_ext)
27759 (aarch64_evpc_rev, aarch64_evpc_dup, aarch64_evpc_zip)
27760 (aarch64_expand_vec_perm_const_1): Handle polynomial
27761 d->perm.length () and d->perm elements.
27762 (aarch64_evpc_tbl): Likewise. Use nelt rather than GET_MODE_NUNITS.
27763 Apply to_constant to d->perm elements.
27764 (aarch64_simd_valid_immediate, aarch64_vec_fpconst_pow_of_2): Handle
27765 polynomial CONST_VECTOR_NUNITS.
27766 (aarch64_move_pointer): Take amount as a poly_int64 rather
27768 (aarch64_progress_pointer): Avoid temporary variable.
27769 * config/aarch64/aarch64.md (aarch64_<crc_variant>): Use
27770 the mode attribute instead of GET_MODE.
27772 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
27773 Alan Hayward <alan.hayward@arm.com>
27774 David Sherwood <david.sherwood@arm.com>
27776 * config/aarch64/aarch64.c (aarch64_force_temporary): Assert that
27777 x exists before using it.
27778 (aarch64_add_constant_internal): Rename to...
27779 (aarch64_add_offset_1): ...this. Replace regnum with separate
27780 src and dest rtxes. Handle the case in which they're different,
27781 including when the offset is zero. Replace scratchreg with an rtx.
27782 Use 2 additions if there is no spare register into which we can
27783 move a 16-bit constant.
27784 (aarch64_add_constant): Delete.
27785 (aarch64_add_offset): Replace reg with separate src and dest
27786 rtxes. Take a poly_int64 offset instead of a HOST_WIDE_INT.
27787 Use aarch64_add_offset_1.
27788 (aarch64_add_sp, aarch64_sub_sp): Take the scratch register as
27789 an rtx rather than an int. Take the delta as a poly_int64
27790 rather than a HOST_WIDE_INT. Use aarch64_add_offset.
27791 (aarch64_expand_mov_immediate): Update uses of aarch64_add_offset.
27792 (aarch64_expand_prologue): Update calls to aarch64_sub_sp,
27793 aarch64_allocate_and_probe_stack_space and aarch64_add_offset.
27794 (aarch64_expand_epilogue): Update calls to aarch64_add_offset
27795 and aarch64_add_sp.
27796 (aarch64_output_mi_thunk): Use aarch64_add_offset rather than
27797 aarch64_add_constant.
27799 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
27801 * config/aarch64/aarch64.c (aarch64_reinterpret_float_as_int):
27802 Use scalar_float_mode.
27804 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
27806 * config/aarch64/aarch64-simd.md
27807 (aarch64_fml<f16mac1>l<f16quad>_low<mode>): Avoid GET_MODE_NUNITS.
27808 (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Likewise.
27809 (aarch64_fml<f16mac1>l_lane_lowv2sf): Likewise.
27810 (aarch64_fml<f16mac1>l_lane_highv2sf): Likewise.
27811 (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Likewise.
27812 (aarch64_fml<f16mac1>lq_laneq_highv4sf): Likewise.
27813 (aarch64_fml<f16mac1>l_laneq_lowv2sf): Likewise.
27814 (aarch64_fml<f16mac1>l_laneq_highv2sf): Likewise.
27815 (aarch64_fml<f16mac1>lq_lane_lowv4sf): Likewise.
27816 (aarch64_fml<f16mac1>lq_lane_highv4sf): Likewise.
27818 2018-01-11 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
27821 * config/arm/arm.c (arm_declare_function_name): Set arch_to_print if
27822 targ_options->x_arm_arch_string is non NULL.
27824 2018-01-11 Tamar Christina <tamar.christina@arm.com>
27826 * config/aarch64/aarch64.h
27827 (AARCH64_FL_FOR_ARCH8_4): Add AARCH64_FL_DOTPROD.
27829 2018-01-11 Sudakshina Das <sudi.das@arm.com>
27832 * expmed.c (emit_store_flag_force): Swap if const op0
27833 and change VOIDmode to mode of op0.
27835 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
27837 PR rtl-optimization/83761
27838 * caller-save.c (replace_reg_with_saved_mem): Pass bits rather
27839 than bytes to mode_for_size.
27841 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
27843 PR middle-end/83189
27844 * gfortran.fortran-torture/compile/pr83189.f90: New testcase.
27845 * tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): Handle zero
27848 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
27850 PR middle-end/83575
27851 * cfgrtl.c (rtl_verify_edges): Only verify fixability of partition
27852 when in layout mode.
27853 (cfg_layout_finalize): Do not verify cfg before we are out of layout.
27854 * cfgcleanup.c (try_optimize_cfg): Only verify flow info when doing
27857 2018-01-10 Michael Collison <michael.collison@arm.com>
27859 * config/aarch64/aarch64-modes.def (V2HF): New VECTOR_MODE.
27860 * config/aarch64/aarch64-option-extension.def: Add
27861 AARCH64_OPT_EXTENSION of 'fp16fml'.
27862 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
27863 (__ARM_FEATURE_FP16_FML): Define if TARGET_F16FML is true.
27864 * config/aarch64/predicates.md (aarch64_lane_imm3): New predicate.
27865 * config/aarch64/constraints.md (Ui7): New constraint.
27866 * config/aarch64/iterators.md (VFMLA_W): New mode iterator.
27867 (VFMLA_SEL_W): Ditto.
27870 (VFMLA16_LOW): New int iterator.
27871 (VFMLA16_HIGH): Ditto.
27872 (UNSPEC_FMLAL): New unspec.
27873 (UNSPEC_FMLSL): Ditto.
27874 (UNSPEC_FMLAL2): Ditto.
27875 (UNSPEC_FMLSL2): Ditto.
27876 (f16mac): New code attribute.
27877 * config/aarch64/aarch64-simd-builtins.def
27878 (aarch64_fmlal_lowv2sf): Ditto.
27879 (aarch64_fmlsl_lowv2sf): Ditto.
27880 (aarch64_fmlalq_lowv4sf): Ditto.
27881 (aarch64_fmlslq_lowv4sf): Ditto.
27882 (aarch64_fmlal_highv2sf): Ditto.
27883 (aarch64_fmlsl_highv2sf): Ditto.
27884 (aarch64_fmlalq_highv4sf): Ditto.
27885 (aarch64_fmlslq_highv4sf): Ditto.
27886 (aarch64_fmlal_lane_lowv2sf): Ditto.
27887 (aarch64_fmlsl_lane_lowv2sf): Ditto.
27888 (aarch64_fmlal_laneq_lowv2sf): Ditto.
27889 (aarch64_fmlsl_laneq_lowv2sf): Ditto.
27890 (aarch64_fmlalq_lane_lowv4sf): Ditto.
27891 (aarch64_fmlsl_lane_lowv4sf): Ditto.
27892 (aarch64_fmlalq_laneq_lowv4sf): Ditto.
27893 (aarch64_fmlsl_laneq_lowv4sf): Ditto.
27894 (aarch64_fmlal_lane_highv2sf): Ditto.
27895 (aarch64_fmlsl_lane_highv2sf): Ditto.
27896 (aarch64_fmlal_laneq_highv2sf): Ditto.
27897 (aarch64_fmlsl_laneq_highv2sf): Ditto.
27898 (aarch64_fmlalq_lane_highv4sf): Ditto.
27899 (aarch64_fmlsl_lane_highv4sf): Ditto.
27900 (aarch64_fmlalq_laneq_highv4sf): Ditto.
27901 (aarch64_fmlsl_laneq_highv4sf): Ditto.
27902 * config/aarch64/aarch64-simd.md:
27903 (aarch64_fml<f16mac1>l<f16quad>_low<mode>): New pattern.
27904 (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
27905 (aarch64_simd_fml<f16mac1>l<f16quad>_low<mode>): Ditto.
27906 (aarch64_simd_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
27907 (aarch64_fml<f16mac1>l_lane_lowv2sf): Ditto.
27908 (aarch64_fml<f16mac1>l_lane_highv2sf): Ditto.
27909 (aarch64_simd_fml<f16mac>l_lane_lowv2sf): Ditto.
27910 (aarch64_simd_fml<f16mac>l_lane_highv2sf): Ditto.
27911 (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Ditto.
27912 (aarch64_fml<f16mac1>lq_laneq_highv4sf): Ditto.
27913 (aarch64_simd_fml<f16mac>lq_laneq_lowv4sf): Ditto.
27914 (aarch64_simd_fml<f16mac>lq_laneq_highv4sf): Ditto.
27915 (aarch64_fml<f16mac1>l_laneq_lowv2sf): Ditto.
27916 (aarch64_fml<f16mac1>l_laneq_highv2sf): Ditto.
27917 (aarch64_simd_fml<f16mac>l_laneq_lowv2sf): Ditto.
27918 (aarch64_simd_fml<f16mac>l_laneq_highv2sf): Ditto.
27919 (aarch64_fml<f16mac1>lq_lane_lowv4sf): Ditto.
27920 (aarch64_fml<f16mac1>lq_lane_highv4sf): Ditto.
27921 (aarch64_simd_fml<f16mac>lq_lane_lowv4sf): Ditto.
27922 (aarch64_simd_fml<f16mac>lq_lane_highv4sf): Ditto.
27923 * config/aarch64/arm_neon.h (vfmlal_low_u32): New intrinsic.
27924 (vfmlsl_low_u32): Ditto.
27925 (vfmlalq_low_u32): Ditto.
27926 (vfmlslq_low_u32): Ditto.
27927 (vfmlal_high_u32): Ditto.
27928 (vfmlsl_high_u32): Ditto.
27929 (vfmlalq_high_u32): Ditto.
27930 (vfmlslq_high_u32): Ditto.
27931 (vfmlal_lane_low_u32): Ditto.
27932 (vfmlsl_lane_low_u32): Ditto.
27933 (vfmlal_laneq_low_u32): Ditto.
27934 (vfmlsl_laneq_low_u32): Ditto.
27935 (vfmlalq_lane_low_u32): Ditto.
27936 (vfmlslq_lane_low_u32): Ditto.
27937 (vfmlalq_laneq_low_u32): Ditto.
27938 (vfmlslq_laneq_low_u32): Ditto.
27939 (vfmlal_lane_high_u32): Ditto.
27940 (vfmlsl_lane_high_u32): Ditto.
27941 (vfmlal_laneq_high_u32): Ditto.
27942 (vfmlsl_laneq_high_u32): Ditto.
27943 (vfmlalq_lane_high_u32): Ditto.
27944 (vfmlslq_lane_high_u32): Ditto.
27945 (vfmlalq_laneq_high_u32): Ditto.
27946 (vfmlslq_laneq_high_u32): Ditto.
27947 * config/aarch64/aarch64.h (AARCH64_FL_F16SML): New flag.
27948 (AARCH64_FL_FOR_ARCH8_4): New.
27949 (AARCH64_ISA_F16FML): New ISA flag.
27950 (TARGET_F16FML): New feature flag for fp16fml.
27951 (doc/invoke.texi): Document new fp16fml option.
27953 2018-01-10 Michael Collison <michael.collison@arm.com>
27955 * config/aarch64/aarch64-builtins.c:
27956 (aarch64_types_ternopu_imm_qualifiers, TYPES_TERNOPUI): New.
27957 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
27958 (__ARM_FEATURE_SHA3): Define if TARGET_SHA3 is true.
27959 * config/aarch64/aarch64.h (AARCH64_FL_SHA3): New flags.
27960 (AARCH64_ISA_SHA3): New ISA flag.
27961 (TARGET_SHA3): New feature flag for sha3.
27962 * config/aarch64/iterators.md (sha512_op): New int attribute.
27963 (CRYPTO_SHA512): New int iterator.
27964 (UNSPEC_SHA512H): New unspec.
27965 (UNSPEC_SHA512H2): Ditto.
27966 (UNSPEC_SHA512SU0): Ditto.
27967 (UNSPEC_SHA512SU1): Ditto.
27968 * config/aarch64/aarch64-simd-builtins.def
27969 (aarch64_crypto_sha512hqv2di): New builtin.
27970 (aarch64_crypto_sha512h2qv2di): Ditto.
27971 (aarch64_crypto_sha512su0qv2di): Ditto.
27972 (aarch64_crypto_sha512su1qv2di): Ditto.
27973 (aarch64_eor3qv8hi): Ditto.
27974 (aarch64_rax1qv2di): Ditto.
27975 (aarch64_xarqv2di): Ditto.
27976 (aarch64_bcaxqv8hi): Ditto.
27977 * config/aarch64/aarch64-simd.md:
27978 (aarch64_crypto_sha512h<sha512_op>qv2di): New pattern.
27979 (aarch64_crypto_sha512su0qv2di): Ditto.
27980 (aarch64_crypto_sha512su1qv2di): Ditto.
27981 (aarch64_eor3qv8hi): Ditto.
27982 (aarch64_rax1qv2di): Ditto.
27983 (aarch64_xarqv2di): Ditto.
27984 (aarch64_bcaxqv8hi): Ditto.
27985 * config/aarch64/arm_neon.h (vsha512hq_u64): New intrinsic.
27986 (vsha512h2q_u64): Ditto.
27987 (vsha512su0q_u64): Ditto.
27988 (vsha512su1q_u64): Ditto.
27989 (veor3q_u16): Ditto.
27990 (vrax1q_u64): Ditto.
27991 (vxarq_u64): Ditto.
27992 (vbcaxq_u16): Ditto.
27993 * config/arm/types.md (crypto_sha512): New type attribute.
27994 (crypto_sha3): Ditto.
27995 (doc/invoke.texi): Document new sha3 option.
27997 2018-01-10 Michael Collison <michael.collison@arm.com>
27999 * config/aarch64/aarch64-builtins.c:
28000 (aarch64_types_quadopu_imm_qualifiers, TYPES_QUADOPUI): New.
28001 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
28002 (__ARM_FEATURE_SM3): Define if TARGET_SM4 is true.
28003 (__ARM_FEATURE_SM4): Define if TARGET_SM4 is true.
28004 * config/aarch64/aarch64.h (AARCH64_FL_SM4): New flags.
28005 (AARCH64_ISA_SM4): New ISA flag.
28006 (TARGET_SM4): New feature flag for sm4.
28007 * config/aarch64/aarch64-simd-builtins.def
28008 (aarch64_sm3ss1qv4si): Ditto.
28009 (aarch64_sm3tt1aq4si): Ditto.
28010 (aarch64_sm3tt1bq4si): Ditto.
28011 (aarch64_sm3tt2aq4si): Ditto.
28012 (aarch64_sm3tt2bq4si): Ditto.
28013 (aarch64_sm3partw1qv4si): Ditto.
28014 (aarch64_sm3partw2qv4si): Ditto.
28015 (aarch64_sm4eqv4si): Ditto.
28016 (aarch64_sm4ekeyqv4si): Ditto.
28017 * config/aarch64/aarch64-simd.md:
28018 (aarch64_sm3ss1qv4si): Ditto.
28019 (aarch64_sm3tt<sm3tt_op>qv4si): Ditto.
28020 (aarch64_sm3partw<sm3part_op>qv4si): Ditto.
28021 (aarch64_sm4eqv4si): Ditto.
28022 (aarch64_sm4ekeyqv4si): Ditto.
28023 * config/aarch64/iterators.md (sm3tt_op): New int iterator.
28024 (sm3part_op): Ditto.
28025 (CRYPTO_SM3TT): Ditto.
28026 (CRYPTO_SM3PART): Ditto.
28027 (UNSPEC_SM3SS1): New unspec.
28028 (UNSPEC_SM3TT1A): Ditto.
28029 (UNSPEC_SM3TT1B): Ditto.
28030 (UNSPEC_SM3TT2A): Ditto.
28031 (UNSPEC_SM3TT2B): Ditto.
28032 (UNSPEC_SM3PARTW1): Ditto.
28033 (UNSPEC_SM3PARTW2): Ditto.
28034 (UNSPEC_SM4E): Ditto.
28035 (UNSPEC_SM4EKEY): Ditto.
28036 * config/aarch64/constraints.md (Ui2): New constraint.
28037 * config/aarch64/predicates.md (aarch64_imm2): New predicate.
28038 * config/arm/types.md (crypto_sm3): New type attribute.
28039 (crypto_sm4): Ditto.
28040 * config/aarch64/arm_neon.h (vsm3ss1q_u32): New intrinsic.
28041 (vsm3tt1aq_u32): Ditto.
28042 (vsm3tt1bq_u32): Ditto.
28043 (vsm3tt2aq_u32): Ditto.
28044 (vsm3tt2bq_u32): Ditto.
28045 (vsm3partw1q_u32): Ditto.
28046 (vsm3partw2q_u32): Ditto.
28047 (vsm4eq_u32): Ditto.
28048 (vsm4ekeyq_u32): Ditto.
28049 (doc/invoke.texi): Document new sm4 option.
28051 2018-01-10 Michael Collison <michael.collison@arm.com>
28053 * config/aarch64/aarch64-arches.def (armv8.4-a): New architecture.
28054 * config/aarch64/aarch64.h (AARCH64_ISA_V8_4): New ISA flag.
28055 (AARCH64_FL_FOR_ARCH8_4): New.
28056 (AARCH64_FL_V8_4): New flag.
28057 (doc/invoke.texi): Document new armv8.4-a option.
28059 2018-01-10 Michael Collison <michael.collison@arm.com>
28061 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
28062 (__ARM_FEATURE_AES): Define if TARGET_AES is true.
28063 (__ARM_FEATURE_SHA2): Define if TARGET_SHA2 is true.
28064 * config/aarch64/aarch64-option-extension.def: Add
28065 AARCH64_OPT_EXTENSION of 'sha2'.
28066 (aes): Add AARCH64_OPT_EXTENSION of 'aes'.
28067 (crypto): Disable sha2 and aes if crypto disabled.
28068 (crypto): Enable aes and sha2 if enabled.
28069 (simd): Disable sha2 and aes if simd disabled.
28070 * config/aarch64/aarch64.h (AARCH64_FL_AES, AARCH64_FL_SHA2):
28072 (AARCH64_ISA_AES, AARCH64_ISA_SHA2): New ISA flags.
28073 (TARGET_SHA2): New feature flag for sha2.
28074 (TARGET_AES): New feature flag for aes.
28075 * config/aarch64/aarch64-simd.md:
28076 (aarch64_crypto_aes<aes_op>v16qi): Make pattern
28077 conditional on TARGET_AES.
28078 (aarch64_crypto_aes<aesmc_op>v16qi): Ditto.
28079 (aarch64_crypto_sha1hsi): Make pattern conditional
28081 (aarch64_crypto_sha1hv4si): Ditto.
28082 (aarch64_be_crypto_sha1hv4si): Ditto.
28083 (aarch64_crypto_sha1su1v4si): Ditto.
28084 (aarch64_crypto_sha1<sha1_op>v4si): Ditto.
28085 (aarch64_crypto_sha1su0v4si): Ditto.
28086 (aarch64_crypto_sha256h<sha256_op>v4si): Ditto.
28087 (aarch64_crypto_sha256su0v4si): Ditto.
28088 (aarch64_crypto_sha256su1v4si): Ditto.
28089 (doc/invoke.texi): Document new aes and sha2 options.
28091 2018-01-10 Martin Sebor <msebor@redhat.com>
28093 PR tree-optimization/83781
28094 * gimple-fold.c (get_range_strlen): Avoid treating arrays of pointers
28097 2018-01-11 Martin Sebor <msebor@gmail.com>
28098 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
28100 PR tree-optimization/83501
28101 PR tree-optimization/81703
28103 * tree-ssa-strlen.c (get_string_cst): Rename...
28104 (get_string_len): ...to this. Handle global constants.
28105 (handle_char_store): Adjust.
28107 2018-01-10 Kito Cheng <kito.cheng@gmail.com>
28108 Jim Wilson <jimw@sifive.com>
28110 * config/riscv/riscv-protos.h (riscv_output_return): New.
28111 * config/riscv/riscv.c (struct machine_function): New naked_p field.
28112 (riscv_attribute_table, riscv_output_return),
28113 (riscv_handle_fndecl_attribute, riscv_naked_function_p),
28114 (riscv_allocate_stack_slots_for_args, riscv_warn_func_return): New.
28115 (riscv_compute_frame_info): Only compute frame->mask if not a naked
28117 (riscv_expand_prologue): Add early return for naked function.
28118 (riscv_expand_epilogue): Likewise.
28119 (riscv_function_ok_for_sibcall): Return false for naked function.
28120 (riscv_set_current_function): New.
28121 (TARGET_SET_CURRENT_FUNCTION, TARGET_ALLOCATE_STACK_SLOTS_FOR_ARGS),
28122 (TARGET_ATTRIBUTE_TABLE, TARGET_WARN_FUNC_RETURN): New.
28123 * config/riscv/riscv.md (simple_return): Call riscv_output_return.
28124 * doc/extend.texi (RISC-V Function Attributes): New.
28126 2018-01-10 Michael Meissner <meissner@linux.vnet.ibm.com>
28128 * config/rs6000/rs6000.c (is_complex_IBM_long_double): Explicitly
28129 check for 128-bit long double before checking TCmode.
28130 * config/rs6000/rs6000.h (FLOAT128_IEEE_P): Explicitly check for
28131 128-bit long doubles before checking TFmode or TCmode.
28132 (FLOAT128_IBM_P): Likewise.
28134 2018-01-10 Martin Sebor <msebor@redhat.com>
28136 PR tree-optimization/83671
28137 * builtins.c (c_strlen): Unconditionally return zero for the empty
28139 Use -Warray-bounds for warnings.
28140 * gimple-fold.c (get_range_strlen): Handle non-constant lengths
28141 for non-constant array indices with COMPONENT_REF, arrays of
28142 arrays, and pointers to arrays.
28143 (gimple_fold_builtin_strlen): Determine and set length range for
28144 non-constant character arrays.
28146 2018-01-10 Aldy Hernandez <aldyh@redhat.com>
28148 PR middle-end/81897
28149 * tree-ssa-uninit.c (convert_control_dep_chain_into_preds): Skip
28152 2018-01-10 Eric Botcazou <ebotcazou@adacore.com>
28154 * dwarf2out.c (dwarf2out_var_location): Do not pass NULL to fprintf.
28156 2018-01-10 Peter Bergner <bergner@vnet.ibm.com>
28159 * config/rs6000/rs6000.c (print_operand) <'y'>: Use
28160 VECTOR_MEM_ALTIVEC_OR_VSX_P.
28161 * config/rs6000/vsx.md (*vsx_le_perm_load_<mode> for VSX_D): Use
28162 indexed_or_indirect_operand predicate.
28163 (*vsx_le_perm_load_<mode> for VSX_W): Likewise.
28164 (*vsx_le_perm_load_v8hi): Likewise.
28165 (*vsx_le_perm_load_v16qi): Likewise.
28166 (*vsx_le_perm_store_<mode> for VSX_D): Likewise.
28167 (*vsx_le_perm_store_<mode> for VSX_W): Likewise.
28168 (*vsx_le_perm_store_v8hi): Likewise.
28169 (*vsx_le_perm_store_v16qi): Likewise.
28170 (eight unnamed splitters): Likewise.
28172 2018-01-10 Peter Bergner <bergner@vnet.ibm.com>
28174 * config/rs6000/x86intrin.h: Change #warning to #error. Update message.
28175 * config/rs6000/emmintrin.h: Likewise.
28176 * config/rs6000/mmintrin.h: Likewise.
28177 * config/rs6000/xmmintrin.h: Likewise.
28179 2018-01-10 David Malcolm <dmalcolm@redhat.com>
28182 * tree-core.h: Document EXPR_LOCATION_WRAPPER_P's usage of
28184 * tree.c (tree_nop_conversion): Return true for location wrapper
28186 (maybe_wrap_with_location): New function.
28187 (selftest::check_strip_nops): New function.
28188 (selftest::test_location_wrappers): New function.
28189 (selftest::tree_c_tests): Call it.
28190 * tree.h (STRIP_ANY_LOCATION_WRAPPER): New macro.
28191 (maybe_wrap_with_location): New decl.
28192 (EXPR_LOCATION_WRAPPER_P): New macro.
28193 (location_wrapper_p): New inline function.
28194 (tree_strip_any_location_wrapper): New inline function.
28196 2018-01-10 H.J. Lu <hongjiu.lu@intel.com>
28199 * config/i386/i386.c (ix86_compute_frame_layout): Always adjust
28200 stack_realign_offset for the largest alignment of stack slot
28202 (ix86_find_max_used_stack_alignment): New function.
28203 (ix86_finalize_stack_frame_flags): Use it. Set
28204 max_used_stack_alignment if we don't realign stack.
28205 * config/i386/i386.h (machine_function): Add
28206 max_used_stack_alignment.
28208 2018-01-10 Christophe Lyon <christophe.lyon@linaro.org>
28210 * config/arm/arm.opt (-mbranch-cost): New option.
28211 * config/arm/arm.h (BRANCH_COST): Take arm_branch_cost into
28214 2018-01-10 Segher Boessenkool <segher@kernel.crashing.org>
28217 * config/rs6000/rs6000.md (load_toc_v4_PIC_2, load_toc_v4_PIC_3b,
28218 load_toc_v4_PIC_3c): Wrap const term in CONST RTL.
28220 2018-01-10 Richard Biener <rguenther@suse.de>
28223 * dwarf2out.c (gen_subprogram_die): Hoist old_die && declaration
28224 early out so it also covers the case where we have a non-NULL
28227 2018-01-10 Richard Sandiford <richard.sandiford@linaro.org>
28229 PR tree-optimization/83753
28230 * tree-vect-stmts.c (get_group_load_store_type): Use VMAT_CONTIGUOUS
28231 for non-strided grouped accesses if the number of elements is 1.
28233 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
28236 * i386.c (ix86_vectorize_builtin_gather): Check TARGET_USE_GATHER.
28237 * i386.h (TARGET_USE_GATHER): Define.
28238 * x86-tune.def (X86_TUNE_USE_GATHER): New.
28240 2018-01-10 Martin Liska <mliska@suse.cz>
28243 * basic-block.h (CLEANUP_NO_PARTITIONING): New define.
28244 * bb-reorder.c (pass_reorder_blocks::execute): Do not clean up
28246 * cfgcleanup.c (try_optimize_cfg): Fix up partitioning if
28247 CLEANUP_NO_PARTITIONING is not set.
28249 2018-01-10 Richard Sandiford <richard.sandiford@linaro.org>
28251 * doc/rtl.texi: Remove documentation of (const ...) wrappers
28252 for vectors, as a partial revert of r254296.
28253 * rtl.h (const_vec_p): Delete.
28254 (const_vec_duplicate_p): Don't test for vector CONSTs.
28255 (unwrap_const_vec_duplicate, const_vec_series_p): Likewise.
28256 * expmed.c (make_tree): Likewise.
28259 * common.md (E, F): Use CONSTANT_P instead of checking for
28261 * emit-rtl.c (gen_lowpart_common): Use const_vec_p instead of
28262 checking for CONST_VECTOR.
28264 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
28266 PR middle-end/83575
28267 * predict.c (force_edge_cold): Handle in more sane way edges
28268 with no prediction.
28270 2018-01-09 Carl Love <cel@us.ibm.com>
28272 * config/rs6002/altivec.md (p8_vmrgow): Add support for V2DI, V2DF,
28274 (p8_vmrgew): Add support for V2DI, V2DF, V4SF types.
28275 * config/rs6000/rs6000-builtin.def: Add definitions for FLOAT2_V2DF,
28276 VMRGEW_V2DI, VMRGEW_V2DF, VMRGEW_V4SF, VMRGOW_V4SI, VMRGOW_V4SF,
28277 VMRGOW_V2DI, VMRGOW_V2DF. Remove definition for VMRGOW.
28278 * config/rs6000/rs6000-c.c (VSX_BUILTIN_VEC_FLOAT2,
28279 P8V_BUILTIN_VEC_VMRGEW, P8V_BUILTIN_VEC_VMRGOW): Add definitions.
28280 * config/rs6000/rs6000-protos.h: Add extern defition for
28281 rs6000_generate_float2_double_code.
28282 * config/rs6000/rs6000.c (rs6000_generate_float2_double_code): Add
28284 * config/rs6000/vsx.md (vsx_xvcdpsp): Add define_insn.
28285 (float2_v2df): Add define_expand.
28287 2018-01-09 Uros Bizjak <ubizjak@gmail.com>
28290 * combine.c (force_int_to_mode) <case ASHIFT>: Use mode instead of
28291 op_mode in the force_to_mode call.
28293 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
28295 * config/aarch64/aarch64.c (aarch64_evpc_trn): Use d.perm.series_p
28296 instead of checking each element individually.
28297 (aarch64_evpc_uzp): Likewise.
28298 (aarch64_evpc_zip): Likewise.
28299 (aarch64_evpc_ext): Likewise.
28300 (aarch64_evpc_rev): Likewise.
28301 (aarch64_evpc_dup): Test the encoding for a single duplicated element,
28302 instead of checking each element individually. Return true without
28304 (aarch64_vectorize_vec_perm_const): Use all_from_input_p to test
28305 whether all selected elements come from the same input, instead of
28306 checking each element individually. Remove calls to gen_rtx_REG,
28307 start_sequence and end_sequence and instead assert that no rtl is
28310 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
28312 * config/aarch64/aarch64.c (aarch64_legitimate_constant_p): Fix
28313 order of HIGH and CONST checks.
28315 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
28317 * tree-vect-stmts.c (permute_vec_elements): Create a fresh variable
28318 if the destination isn't an SSA_NAME.
28320 2018-01-09 Richard Biener <rguenther@suse.de>
28322 PR tree-optimization/83668
28323 * graphite.c (canonicalize_loop_closed_ssa): Add edge argument,
28325 (canonicalize_loop_form): ... here, renamed from ...
28326 (canonicalize_loop_closed_ssa_form): ... this and amended to
28327 swap successor edges for loop exit blocks to make us use
28328 the RPO order we need for initial schedule generation.
28330 2018-01-09 Joseph Myers <joseph@codesourcery.com>
28332 PR tree-optimization/64811
28333 * match.pd: When optimizing comparisons with Inf, avoid
28334 introducing or losing exceptions from comparisons with NaN.
28336 2018-01-09 Martin Liska <mliska@suse.cz>
28339 * asan.c (shadow_mem_size): Add gcc_assert.
28341 2018-01-09 Georg-Johann Lay <avr@gjlay.de>
28343 Don't save registers in main().
28346 * doc/invoke.texi (AVR Options) [-mmain-is-OS_task]: Document it.
28347 * config/avr/avr.opt (-mmain-is-OS_task): New target option.
28348 * config/avr/avr.c (avr_set_current_function): Don't error if
28349 naked, OS_task or OS_main are specified at the same time.
28350 (avr_function_ok_for_sibcall): Don't disable sibcalls for OS_task,
28352 (avr_insert_attributes) [-mmain-is-OS_task] <main>: Add OS_task
28354 * common/config/avr/avr-common.c (avr_option_optimization_table):
28355 Switch on -mmain-is-OS_task for optimizing compilations.
28357 2018-01-09 Richard Biener <rguenther@suse.de>
28359 PR tree-optimization/83572
28360 * graphite.c: Include cfganal.h.
28361 (graphite_transform_loops): Connect infinite loops to exit
28362 and remove fake edges at the end.
28364 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
28366 * ipa-inline.c (edge_badness): Revert accidental checkin.
28368 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
28371 * ipa-comdats.c (set_comdat_group): Only set comdat group of real
28372 symbols; not inline clones.
28374 2018-01-09 Jakub Jelinek <jakub@redhat.com>
28377 * modulo-sched.c (schedule_reg_moves): Punt if we'd need to move
28378 hard registers. Formatting fixes.
28380 PR preprocessor/83722
28381 * gcc.c (try_generate_repro): Pass
28382 &temp_stderr_files[RETRY_ICE_ATTEMPTS - 1] rather than
28383 &temp_stdout_files[RETRY_ICE_ATTEMPTS - 1] as last argument to
28386 2018-01-08 Monk Chiang <sh.chiang04@gmail.com>
28387 Kito Cheng <kito.cheng@gmail.com>
28389 * config/riscv/riscv.c (machine_function::is_leaf): Remove field.
28390 (riscv_leaf_function_p): Delete.
28391 (riscv_function_ok_for_sibcall): Return false when TARGET_SAVE_RESTORE.
28393 2018-01-08 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
28395 * config/rs6000/rs6000-string.c (do_load_for_compare_from_addr): New
28397 (do_ifelse): New function.
28398 (do_isel): New function.
28399 (do_sub3): New function.
28400 (do_add3): New function.
28401 (do_load_mask_compare): New function.
28402 (do_overlap_load_compare): New function.
28403 (expand_compare_loop): New function.
28404 (expand_block_compare): Call expand_compare_loop() when appropriate.
28405 * config/rs6000/rs6000.opt (-mblock-compare-inline-limit): Change
28406 option description.
28407 (-mblock-compare-inline-loop-limit): New option.
28409 2018-01-08 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
28412 * config/rs6000/altivec.md (*altivec_vpermr_<mode>_internal):
28413 Reverse order of second and third operands in first alternative.
28414 * config/rs6000/rs6000.c (rs6000_expand_vector_set): Reverse order
28415 of first and second elements in UNSPEC_VPERMR vector.
28416 (altivec_expand_vec_perm_le): Likewise.
28418 2018-01-08 Jeff Law <law@redhat.com>
28420 PR rtl-optimizatin/81308
28421 * tree-switch-conversion.c (cfg_altered): New file scoped static.
28422 (process_switch): If group_case_labels makes a change, then set
28424 (pass_convert_switch::execute): If a switch is converted, then
28425 set cfg_altered. Return TODO_cfg_cleanup if cfg_altered is true.
28427 PR rtl-optimization/81308
28428 * recog.c (split_all_insns): Conditionally cleanup the CFG after
28431 2018-01-08 Vidya Praveen <vidyapraveen@arm.com>
28433 PR target/83663 - Revert r255946
28434 * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify code
28435 generation for cases where splatting a value is not useful.
28436 * simplify-rtx.c (simplify_ternary_operation): Simplify vec_merge
28437 across a vec_duplicate and a paradoxical subreg forming a vector
28438 mode to a vec_concat.
28440 2018-01-08 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
28442 * config/arm/t-aprofile (MULTILIB_MATCHES): Add mapping rules for
28443 -march=armv8.3-a variants.
28444 * config/arm/t-multilib: Likewise.
28445 * config/arm/t-arm-elf: Likewise. Handle dotprod extension.
28447 2018-01-08 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
28449 * config/rs6000/rs6000.md (cceq_ior_compare): Remove * so I can use it
28451 (cceq_ior_compare_complement): Give it a name so I can use it, and
28452 change boolean_or_operator predicate to boolean_operator so it can
28453 be used to generate a crand.
28454 (eqne): New code iterator.
28455 (bd/bd_neg): New code_attrs.
28456 (<bd>_<mode>): New name for ctr<mode>_internal[12] now combined into
28457 a single define_insn.
28458 (<bd>tf_<mode>): A new insn pattern for the conditional form branch
28459 decrement (bdnzt/bdnzf/bdzt/bdzf).
28460 * config/rs6000/rs6000.c (rs6000_legitimate_combined_insn): Updated
28461 with the new names of the branch decrement patterns, and added the
28462 names of the branch decrement conditional patterns.
28464 2018-01-08 Richard Biener <rguenther@suse.de>
28466 PR tree-optimization/83563
28467 * graphite.c (canonicalize_loop_closed_ssa_form): Reset the SCEV
28470 2018-01-08 Richard Biener <rguenther@suse.de>
28472 PR middle-end/83713
28473 * convert.c (do_narrow): Properly guard TYPE_OVERFLOW_WRAPS checks.
28475 2018-01-08 Richard Biener <rguenther@suse.de>
28477 PR tree-optimization/83685
28478 * tree-ssa-pre.c (create_expression_by_pieces): Do not insert
28479 references to abnormals.
28481 2018-01-08 Richard Biener <rguenther@suse.de>
28484 * dwarf2out.c (output_indirect_strings): Handle empty
28485 skeleton_debug_str_hash.
28486 (dwarf2out_early_finish): Index strings for -gsplit-dwarf.
28488 2018-01-08 Claudiu Zissulescu <claziss@synopsys.com>
28490 * config/arc/arc.c (TARGET_TRAMPOLINE_ADJUST_ADDRESS): Delete.
28491 (emit_store_direct): Likewise.
28492 (arc_trampoline_adjust_address): Likewise.
28493 (arc_asm_trampoline_template): New function.
28494 (arc_initialize_trampoline): Use asm_trampoline_template.
28495 (TARGET_ASM_TRAMPOLINE_TEMPLATE): Define.
28496 * config/arc/arc.h (TRAMPOLINE_SIZE): Adjust to 16.
28497 * config/arc/arc.md (flush_icache): Delete pattern.
28499 2018-01-08 Claudiu Zissulescu <claziss@synopsys.com>
28501 * config/arc/arc-c.def (__ARC_UNALIGNED__): New define.
28502 * config/arc/arc.h (STRICT_ALIGNMENT): Control this macro using
28505 2018-01-08 Sebastian Huber <sebastian.huber@embedded-brains.de>
28508 * config/epiphany/epiphany.h (make_pass_mode_switch_use): Guard
28509 by not USED_FOR_TARGET.
28510 (make_pass_resolve_sw_modes): Likewise.
28512 2018-01-08 Sebastian Huber <sebastian.huber@embedded-brains.de>
28514 * config/nios2/nios2.h (nios2_section_threshold): Guard by not
28517 2018-01-08 Richard Biener <rguenther@suse.de>
28519 PR middle-end/83580
28520 * tree-data-ref.c (split_constant_offset): Remove STRIP_NOPS.
28522 2018-01-08 Richard Biener <rguenther@suse.de>
28524 PR middle-end/83517
28525 * match.pd ((t * 2) / 2) -> t): Add missing :c.
28527 2018-01-06 Aldy Hernandez <aldyh@redhat.com>
28529 PR middle-end/81897
28530 * tree-ssa-uninit.c (compute_control_dep_chain): Do not bail on
28531 basic blocks with a small number of successors.
28532 (convert_control_dep_chain_into_preds): Improve handling of
28534 (dump_predicates): Split apart into...
28535 (dump_pred_chain): ...here...
28536 (dump_pred_info): ...and here.
28537 (can_one_predicate_be_invalidated_p): Add debugging printfs.
28538 (can_chain_union_be_invalidated_p): Improve check for invalidation
28540 (uninit_uses_cannot_happen): Avoid unnecessary if
28541 convert_control_dep_chain_into_preds yielded nothing.
28543 2018-01-06 Martin Sebor <msebor@redhat.com>
28545 PR tree-optimization/83640
28546 * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Avoid
28547 subtracting negative offset from size.
28548 (builtin_access::overlap): Adjust offset bounds of the access to fall
28549 within the size of the object if possible.
28551 2018-01-06 Richard Sandiford <richard.sandiford@linaro.org>
28553 PR rtl-optimization/83699
28554 * expmed.c (extract_bit_field_1): Restrict the vector usage of
28555 extract_bit_field_as_subreg to cases in which the extracted
28556 value is also a vector.
28558 * lra-constraints.c (process_alt_operands): Test for the equivalence
28559 substitutions when detecting a possible reload cycle.
28561 2018-01-06 Jakub Jelinek <jakub@redhat.com>
28564 * toplev.c (process_options): Don't enable debug_nonbind_markers_p
28565 by default if flag_selective_schedling{,2}. Formatting fixes.
28567 PR rtl-optimization/83682
28568 * rtl.h (const_vec_duplicate_p): Only return true for VEC_DUPLICATE
28569 if it has non-VECTOR_MODE element mode.
28570 (vec_duplicate_p): Likewise.
28572 PR middle-end/83694
28573 * cfgexpand.c (expand_debug_expr): Punt if mode1 is VOIDmode
28574 and bitsize might be greater than MAX_BITSIZE_MODE_ANY_INT.
28576 2018-01-05 Jakub Jelinek <jakub@redhat.com>
28579 * config/i386/i386-builtin.def
28580 (__builtin_ia32_vgf2p8affineinvqb_v64qi,
28581 __builtin_ia32_vgf2p8affineqb_v64qi, __builtin_ia32_vgf2p8mulb_v64qi):
28582 Require also OPTION_MASK_ISA_AVX512F in addition to
28583 OPTION_MASK_ISA_GFNI.
28584 (__builtin_ia32_vgf2p8affineinvqb_v16qi_mask,
28585 __builtin_ia32_vgf2p8affineqb_v16qi_mask): Require
28586 OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_SSE in addition
28587 to OPTION_MASK_ISA_GFNI.
28588 (__builtin_ia32_vgf2p8mulb_v32qi_mask): Require
28589 OPTION_MASK_ISA_AVX512VL in addition to OPTION_MASK_ISA_GFNI and
28590 OPTION_MASK_ISA_AVX512BW.
28591 (__builtin_ia32_vgf2p8mulb_v16qi_mask): Require
28592 OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_AVX512BW in
28593 addition to OPTION_MASK_ISA_GFNI.
28594 (__builtin_ia32_vgf2p8affineinvqb_v16qi,
28595 __builtin_ia32_vgf2p8affineqb_v16qi, __builtin_ia32_vgf2p8mulb_v16qi):
28596 Require OPTION_MASK_ISA_SSE2 instead of OPTION_MASK_ISA_SSE in addition
28597 to OPTION_MASK_ISA_GFNI.
28598 * config/i386/i386.c (def_builtin): Change to builtin isa/isa2 being
28599 a requirement for all ISAs rather than any of them with a few
28601 (ix86_add_new_builtins): Clear OPTION_MASK_ISA_64BIT from isa before
28603 (ix86_expand_builtin): Require all ISAs from builtin's isa and isa2
28604 bitmasks to be enabled with 3 exceptions, instead of requiring any
28605 enabled ISA with lots of exceptions.
28606 * config/i386/sse.md (vgf2p8affineinvqb_<mode><mask_name>,
28607 vgf2p8affineqb_<mode><mask_name>, vgf2p8mulb_<mode><mask_name>):
28608 Change avx512bw in isa attribute to avx512f.
28609 * config/i386/sgxintrin.h: Add license boilerplate.
28610 * config/i386/vaesintrin.h: Likewise. Fix macro spelling __AVX512F
28611 to __AVX512F__ and __AVX512VL to __AVX512VL__.
28612 (_mm256_aesdec_epi128, _mm256_aesdeclast_epi128, _mm256_aesenc_epi128,
28613 _mm256_aesenclast_epi128): Enable temporarily avx if __AVX__ is not
28615 * config/i386/gfniintrin.h (_mm_gf2p8mul_epi8,
28616 _mm_gf2p8affineinv_epi64_epi8, _mm_gf2p8affine_epi64_epi8): Enable
28617 temporarily sse2 rather than sse if not enabled already.
28620 * config/i386/sse.md (VI248_VLBW): Rename to ...
28621 (VI248_AVX512VL): ... this. Don't guard V32HI with TARGET_AVX512BW.
28622 (vpshrd_<mode><mask_name>, vpshld_<mode><mask_name>,
28623 vpshrdv_<mode>, vpshrdv_<mode>_mask, vpshrdv_<mode>_maskz,
28624 vpshrdv_<mode>_maskz_1, vpshldv_<mode>, vpshldv_<mode>_mask,
28625 vpshldv_<mode>_maskz, vpshldv_<mode>_maskz_1): Use VI248_AVX512VL
28626 mode iterator instead of VI248_VLBW.
28628 2018-01-05 Jan Hubicka <hubicka@ucw.cz>
28630 * ipa-fnsummary.c (record_modified_bb_info): Add OP.
28631 (record_modified): Skip clobbers; add debug output.
28632 (param_change_prob): Use sreal frequencies.
28634 2018-01-05 Richard Sandiford <richard.sandiford@linaro.org>
28636 * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Don't
28637 punt for user-aligned variables.
28639 2018-01-05 Richard Sandiford <richard.sandiford@linaro.org>
28641 * tree-chrec.c (chrec_contains_symbols): Return true for
28644 2018-01-05 Sudakshina Das <sudi.das@arm.com>
28647 * simplify-rtx.c (simplify_relational_operation_1): Add simplifications
28648 of (x|y) == x for BICS pattern.
28650 2018-01-05 Jakub Jelinek <jakub@redhat.com>
28652 PR tree-optimization/83605
28653 * gimple-ssa-strength-reduction.c: Include tree-eh.h.
28654 (find_candidates_dom_walker::before_dom_children): Ignore stmts that
28657 2018-01-05 Sebastian Huber <sebastian.huber@embedded-brains.de>
28659 * config.gcc (epiphany-*-elf*): Add (epiphany-*-rtems*) configuration.
28660 * config/epiphany/rtems.h: New file.
28662 2018-01-04 Jakub Jelinek <jakub@redhat.com>
28663 Uros Bizjak <ubizjak@gmail.com>
28666 * config/i386/i386.md (*<rotate_insn>hi3_1 splitter): Use
28667 QIreg_operand instead of register_operand predicate.
28668 * config/i386/i386.c (ix86_rop_should_change_byte_p,
28669 set_rop_modrm_reg_bits, ix86_mitigate_rop): Use -mmitigate-rop in
28670 comments instead of -fmitigate[-_]rop.
28672 2018-01-04 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
28675 * cgraphunit.c (symbol_table::compile): Switch to text_section
28676 before calling assembly_start debug hook.
28677 * run-rtl-passes.c (run_rtl_passes): Likewise.
28680 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
28682 * tree-vrp.c (extract_range_from_binary_expr_1): Check
28683 range_int_cst_p rather than !symbolic_range_p before calling
28684 extract_range_from_multiplicative_op_1.
28686 2018-01-04 Jeff Law <law@redhat.com>
28688 * tree-ssa-math-opts.c (execute_cse_reciprocals_1): Remove
28689 redundant test in assertion.
28691 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
28693 * doc/rtl.texi: Document machine_mode wrapper classes.
28695 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
28697 * fold-const.c (fold_ternary_loc): Check tree_fits_uhwi_p before
28698 using tree_to_uhwi.
28700 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
28702 * tree-ssa-forwprop.c (is_combined_permutation_identity): Allow
28703 the VEC_PERM_EXPR fold to fail.
28705 2018-01-04 Jakub Jelinek <jakub@redhat.com>
28708 * bb-reorder.c (insert_section_boundary_note): Set has_bb_partition
28709 to switched_sections.
28711 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
28714 * config/arm/arm.c (arm_vectorize_vec_perm_const): Fix inverted
28715 test for d.testing.
28717 2018-01-04 Peter Bergner <bergner@vnet.ibm.com>
28720 * config/rs6000/rs6000.c (rs6000_discover_homogeneous_aggregate): Do not
28721 allow arguments in FP registers if TARGET_HARD_FLOAT is false.
28723 2018-01-04 Jakub Jelinek <jakub@redhat.com>
28726 * cfgexpand.c (expand_debug_expr) <case BIT_FIELD_REF>: Punt if mode
28727 is BLKmode and bitpos not zero or mode change is needed.
28729 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
28732 * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): Require
28735 2018-01-04 Uros Bizjak <ubizjak@gmail.com>
28738 * config/alpha/alpha.md (*sadd<modesuffix>): Use ASHIFT
28739 instead of MULT rtx. Update all corresponding splitters.
28740 (*saddl_se): Ditto.
28741 (*ssub<modesuffix>): Ditto.
28742 (*ssubl_se): Ditto.
28743 (*cmp_sadd_di): Update split patterns.
28744 (*cmp_sadd_si): Ditto.
28745 (*cmp_sadd_sidi): Ditto.
28746 (*cmp_ssub_di): Ditto.
28747 (*cmp_ssub_si): Ditto.
28748 (*cmp_ssub_sidi): Ditto.
28749 * config/alpha/predicates.md (const23_operand): New predicate.
28750 * config/alpha/alpha.c (alpha_rtx_costs) [PLUS, MINUS]:
28751 Look for ASHIFT, not MULT inner operand.
28752 (alpha_split_conditional_move): Update for *sadd<modesuffix> change.
28754 2018-01-04 Martin Liska <mliska@suse.cz>
28756 PR gcov-profile/83669
28757 * gcov.c (output_intermediate_file): Add version to intermediate
28759 * doc/gcov.texi: Document new field 'version' in intermediate
28760 file format. Fix location of '-k' option of gcov command.
28762 2018-01-04 Martin Liska <mliska@suse.cz>
28765 * ipa-icf.c (sem_function::merge): Do not cross comdat boundary.
28767 2018-01-04 Jakub Jelinek <jakub@redhat.com>
28769 * gimple-ssa-sprintf.c (parse_directive): Cast second dir.len to uhwi.
28771 2018-01-03 Martin Sebor <msebor@redhat.com>
28773 PR tree-optimization/83655
28774 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call): Avoid
28775 checking calls with invalid arguments.
28777 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28779 * tree-vect-stmts.c (vect_get_store_rhs): New function.
28780 (vectorizable_mask_load_store): Delete.
28781 (vectorizable_call): Return false for masked loads and stores.
28782 (vectorizable_store): Handle IFN_MASK_STORE. Use vect_get_store_rhs
28783 instead of gimple_assign_rhs1.
28784 (vectorizable_load): Handle IFN_MASK_LOAD.
28785 (vect_transform_stmt): Don't set is_store for call_vec_info_type.
28787 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28789 * tree-vect-stmts.c (vect_build_gather_load_calls): New function,
28791 (vectorizable_mask_load_store): ...here.
28792 (vectorizable_load): ...and here.
28794 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28796 * tree-vect-stmts.c (vect_build_all_ones_mask)
28797 (vect_build_zero_merge_argument): New functions, split out from...
28798 (vectorizable_load): ...here.
28800 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28802 * tree-vect-stmts.c (vect_check_store_rhs): New function,
28804 (vectorizable_mask_load_store): ...here.
28805 (vectorizable_store): ...and here.
28807 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28809 * tree-vect-stmts.c (vect_check_load_store_mask): New function,
28811 (vectorizable_mask_load_store): ...here.
28813 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28815 * tree-vectorizer.h (vec_load_store_type): Moved from tree-vec-stmts.c
28816 (vect_model_store_cost): Take a vec_load_store_type instead of a
28818 * tree-vect-stmts.c (vec_load_store_type): Move to tree-vectorizer.h.
28819 (vect_model_store_cost): Take a vec_load_store_type instead of a
28821 (vectorizable_mask_load_store): Update accordingly.
28822 (vectorizable_store): Likewise.
28823 * tree-vect-slp.c (vect_analyze_slp_cost_1): Update accordingly.
28825 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28827 * tree-vect-loop.c (vect_transform_loop): Stub out scalar
28828 IFN_MASK_LOAD calls here rather than...
28829 * tree-vect-stmts.c (vectorizable_mask_load_store): ...here.
28831 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28832 Alan Hayward <alan.hayward@arm.com>
28833 David Sherwood <david.sherwood@arm.com>
28835 * expmed.c (extract_bit_field_1): For vector extracts,
28836 fall back to extract_bit_field_as_subreg if vec_extract
28839 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28840 Alan Hayward <alan.hayward@arm.com>
28841 David Sherwood <david.sherwood@arm.com>
28843 * lra-spills.c (pseudo_reg_slot_compare): Sort slots by whether
28844 they are variable or constant sized.
28845 (assign_stack_slot_num_and_sort_pseudos): Don't reuse variable-sized
28846 slots for constant-sized data.
28848 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28849 Alan Hayward <alan.hayward@arm.com>
28850 David Sherwood <david.sherwood@arm.com>
28852 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): When
28853 handling COND_EXPRs with boolean comparisons, try to find a better
28854 basis for the mask type than the boolean itself.
28856 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28858 * doc/rtl.texi (MAX_BITSIZE_MODE_ANY_MODE): Describe how the default
28859 is calculated and how it can be overridden.
28860 * genmodes.c (max_bitsize_mode_any_mode): New variable.
28861 (create_modes): Initialize it from MAX_BITSIZE_MODE_ANY_MODE,
28863 (emit_max_int): Use it to set the output MAX_BITSIZE_MODE_ANY_MODE,
28866 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28867 Alan Hayward <alan.hayward@arm.com>
28868 David Sherwood <david.sherwood@arm.com>
28870 * config/aarch64/aarch64-protos.h (aarch64_output_simd_mov_immediate):
28871 Remove the mode argument.
28872 (aarch64_simd_valid_immediate): Remove the mode and inverse
28874 * config/aarch64/iterators.md (bitsize): New iterator.
28875 * config/aarch64/aarch64-simd.md (*aarch64_simd_mov<mode>, and<mode>3)
28876 (ior<mode>3): Update calls to aarch64_output_simd_mov_immediate.
28877 * config/aarch64/constraints.md (Do, Db, Dn): Update calls to
28878 aarch64_simd_valid_immediate.
28879 * config/aarch64/predicates.md (aarch64_reg_or_orr_imm): Likewise.
28880 (aarch64_reg_or_bic_imm): Likewise.
28881 * config/aarch64/aarch64.c (simd_immediate_info): Replace mvn
28882 with an insn_type enum and msl with a modifier_type enum.
28883 Replace element_width with a scalar_mode. Change the shift
28884 to unsigned int. Add constructors for scalar_float_mode and
28885 scalar_int_mode elements.
28886 (aarch64_vect_float_const_representable_p): Delete.
28887 (aarch64_can_const_movi_rtx_p)
28888 (aarch64_simd_scalar_immediate_valid_for_move)
28889 (aarch64_simd_make_constant): Update call to
28890 aarch64_simd_valid_immediate.
28891 (aarch64_advsimd_valid_immediate_hs): New function.
28892 (aarch64_advsimd_valid_immediate): Likewise.
28893 (aarch64_simd_valid_immediate): Remove mode and inverse
28894 arguments. Rewrite to use the above. Use const_vec_duplicate_p
28895 to detect duplicated constants and use aarch64_float_const_zero_rtx_p
28896 and aarch64_float_const_representable_p on the result.
28897 (aarch64_output_simd_mov_immediate): Remove mode argument.
28898 Update call to aarch64_simd_valid_immediate and use of
28899 simd_immediate_info.
28900 (aarch64_output_scalar_simd_mov_immediate): Update call
28903 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28904 Alan Hayward <alan.hayward@arm.com>
28905 David Sherwood <david.sherwood@arm.com>
28907 * machmode.h (mode_precision): Prefix with CONST_MODE_PRECISION.
28908 (mode_nunits): Likewise CONST_MODE_NUNITS.
28909 * machmode.def (ADJUST_NUNITS): Document.
28910 * genmodes.c (mode_data::need_nunits_adj): New field.
28911 (blank_mode): Update accordingly.
28912 (adj_nunits): New variable.
28913 (print_maybe_const_decl): Replace CATEGORY with a NEEDS_ADJ
28915 (emit_mode_size_inline): Set need_bytesize_adj for all modes
28916 listed in adj_nunits.
28917 (emit_mode_nunits_inline): Set need_nunits_adj for all modes
28918 listed in adj_nunits. Don't emit case statements for such modes.
28919 (emit_insn_modes_h): Emit definitions of CONST_MODE_NUNITS
28920 and CONST_MODE_PRECISION. Make CONST_MODE_SIZE expand to
28921 nothing if adj_nunits is nonnull.
28922 (emit_mode_precision, emit_mode_nunits): Use print_maybe_const_decl.
28923 (emit_mode_unit_size, emit_mode_base_align, emit_mode_ibit)
28924 (emit_mode_fbit): Update use of print_maybe_const_decl.
28925 (emit_move_size): Likewise. Treat the array as non-const
28927 (emit_mode_adjustments): Handle adj_nunits.
28929 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28931 * machmode.def (VECTOR_MODES_WITH_PREFIX): Document.
28932 * genmodes.c (VECTOR_MODES_WITH_PREFIX): New macro.
28933 (VECTOR_MODES): Use it.
28934 (make_vector_modes): Take the prefix as an argument.
28936 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28937 Alan Hayward <alan.hayward@arm.com>
28938 David Sherwood <david.sherwood@arm.com>
28940 * mode-classes.def (MODE_VECTOR_BOOL): New mode class.
28941 * machmode.h (INTEGRAL_MODE_P, VECTOR_MODE_P): Return true
28942 for MODE_VECTOR_BOOL.
28943 * machmode.def (VECTOR_BOOL_MODE): Document.
28944 * genmodes.c (VECTOR_BOOL_MODE): New macro.
28945 (make_vector_bool_mode): New function.
28946 (complete_mode, emit_mode_wider, emit_mode_adjustments): Handle
28948 * lto-streamer-in.c (lto_input_mode_table): Likewise.
28949 * rtx-vector-builder.c (rtx_vector_builder::find_cached_value):
28951 * stor-layout.c (int_mode_for_mode): Likewise.
28952 * tree.c (build_vector_type_for_mode): Likewise.
28953 * varasm.c (output_constant_pool_2): Likewise.
28954 * emit-rtl.c (init_emit_once): Make sure that CONST1_RTX (BImode) and
28955 CONSTM1_RTX (BImode) are the same thing. Initialize const_tiny_rtx
28956 for MODE_VECTOR_BOOL.
28957 * expr.c (expand_expr_real_1): Use VECTOR_MODE_P instead of a list
28958 of mode class checks.
28959 * tree-vect-generic.c (expand_vector_operation): Use VECTOR_MODE_P
28960 instead of a list of mode class checks.
28961 (expand_vector_scalar_condition): Likewise.
28962 (type_for_widest_vector_mode): Handle BImode as an inner mode.
28964 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28965 Alan Hayward <alan.hayward@arm.com>
28966 David Sherwood <david.sherwood@arm.com>
28968 * machmode.h (mode_size): Change from unsigned short to
28970 (mode_to_bytes): Return a poly_uint16 rather than an unsigned short.
28971 (GET_MODE_SIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
28972 or if measurement_type is not polynomial.
28973 (fixed_size_mode::includes_p): Check for constant-sized modes.
28974 * genmodes.c (emit_mode_size_inline): Make mode_size_inline
28975 return a poly_uint16 rather than an unsigned short.
28976 (emit_mode_size): Change the type of mode_size from unsigned short
28977 to poly_uint16_pod. Use ZERO_COEFFS for the initializer.
28978 (emit_mode_adjustments): Cope with polynomial vector sizes.
28979 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
28981 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
28983 * auto-inc-dec.c (try_merge): Treat GET_MODE_SIZE as polynomial.
28984 * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Likewise.
28985 * caller-save.c (setup_save_areas): Likewise.
28986 (replace_reg_with_saved_mem): Likewise.
28987 * calls.c (emit_library_call_value_1): Likewise.
28988 * combine-stack-adj.c (combine_stack_adjustments_for_block): Likewise.
28989 * combine.c (simplify_set, make_extraction, simplify_shift_const_1)
28990 (gen_lowpart_for_combine): Likewise.
28991 * convert.c (convert_to_integer_1): Likewise.
28992 * cse.c (equiv_constant, cse_insn): Likewise.
28993 * cselib.c (autoinc_split, cselib_hash_rtx): Likewise.
28994 (cselib_subst_to_values): Likewise.
28995 * dce.c (word_dce_process_block): Likewise.
28996 * df-problems.c (df_word_lr_mark_ref): Likewise.
28997 * dwarf2cfi.c (init_one_dwarf_reg_size): Likewise.
28998 * dwarf2out.c (multiple_reg_loc_descriptor, mem_loc_descriptor)
28999 (concat_loc_descriptor, concatn_loc_descriptor, loc_descriptor)
29000 (rtl_for_decl_location): Likewise.
29001 * emit-rtl.c (gen_highpart, widen_memory_access): Likewise.
29002 * expmed.c (extract_bit_field_1, extract_integral_bit_field): Likewise.
29003 * expr.c (emit_group_load_1, clear_storage_hints): Likewise.
29004 (emit_move_complex, emit_move_multi_word, emit_push_insn): Likewise.
29005 (expand_expr_real_1): Likewise.
29006 * function.c (assign_parm_setup_block_p, assign_parm_setup_block)
29007 (pad_below): Likewise.
29008 * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
29009 * gimple-ssa-store-merging.c (rhs_valid_for_store_merging_p): Likewise.
29010 * ira.c (get_subreg_tracking_sizes): Likewise.
29011 * ira-build.c (ira_create_allocno_objects): Likewise.
29012 * ira-color.c (coalesced_pseudo_reg_slot_compare): Likewise.
29013 (ira_sort_regnos_for_alter_reg): Likewise.
29014 * ira-costs.c (record_operand_costs): Likewise.
29015 * lower-subreg.c (interesting_mode_p, simplify_gen_subreg_concatn)
29016 (resolve_simple_move): Likewise.
29017 * lra-constraints.c (get_reload_reg, operands_match_p): Likewise.
29018 (process_addr_reg, simplify_operand_subreg, curr_insn_transform)
29019 (lra_constraints): Likewise.
29020 (CONST_POOL_OK_P): Reject variable-sized modes.
29021 * lra-spills.c (slot, assign_mem_slot, pseudo_reg_slot_compare)
29022 (add_pseudo_to_slot, lra_spill): Likewise.
29023 * omp-low.c (omp_clause_aligned_alignment): Likewise.
29024 * optabs-query.c (get_best_extraction_insn): Likewise.
29025 * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
29026 * optabs.c (expand_vec_perm_var, expand_vec_cond_expr): Likewise.
29027 (expand_mult_highpart, valid_multiword_target_p): Likewise.
29028 * recog.c (offsettable_address_addr_space_p): Likewise.
29029 * regcprop.c (maybe_mode_change): Likewise.
29030 * reginfo.c (choose_hard_reg_mode, record_subregs_of_mode): Likewise.
29031 * regrename.c (build_def_use): Likewise.
29032 * regstat.c (dump_reg_info): Likewise.
29033 * reload.c (complex_word_subreg_p, push_reload, find_dummy_reload)
29034 (find_reloads, find_reloads_subreg_address): Likewise.
29035 * reload1.c (eliminate_regs_1): Likewise.
29036 * rtlanal.c (for_each_inc_dec_find_inc_dec, rtx_cost): Likewise.
29037 * simplify-rtx.c (avoid_constant_pool_reference): Likewise.
29038 (simplify_binary_operation_1, simplify_subreg): Likewise.
29039 * targhooks.c (default_function_arg_padding): Likewise.
29040 (default_hard_regno_nregs, default_class_max_nregs): Likewise.
29041 * tree-cfg.c (verify_gimple_assign_binary): Likewise.
29042 (verify_gimple_assign_ternary): Likewise.
29043 * tree-inline.c (estimate_move_cost): Likewise.
29044 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
29045 * tree-ssa-loop-ivopts.c (add_autoinc_candidates): Likewise.
29046 (get_address_cost_ainc): Likewise.
29047 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Likewise.
29048 (vect_supportable_dr_alignment): Likewise.
29049 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
29050 (vectorizable_reduction): Likewise.
29051 * tree-vect-stmts.c (vectorizable_assignment, vectorizable_shift)
29052 (vectorizable_operation, vectorizable_load): Likewise.
29053 * tree.c (build_same_sized_truth_vector_type): Likewise.
29054 * valtrack.c (cleanup_auto_inc_dec): Likewise.
29055 * var-tracking.c (emit_note_insn_var_location): Likewise.
29056 * config/arc/arc.h (ASM_OUTPUT_CASE_END): Use as_a <scalar_int_mode>.
29057 (ADDR_VEC_ALIGN): Likewise.
29059 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29060 Alan Hayward <alan.hayward@arm.com>
29061 David Sherwood <david.sherwood@arm.com>
29063 * machmode.h (mode_to_bits): Return a poly_uint16 rather than an
29065 (GET_MODE_BITSIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
29066 or if measurement_type is polynomial.
29067 * calls.c (shift_return_value): Treat GET_MODE_BITSIZE as polynomial.
29068 * combine.c (make_extraction): Likewise.
29069 * dse.c (find_shift_sequence): Likewise.
29070 * dwarf2out.c (mem_loc_descriptor): Likewise.
29071 * expmed.c (store_integral_bit_field, extract_bit_field_1): Likewise.
29072 (extract_bit_field, extract_low_bits): Likewise.
29073 * expr.c (convert_move, convert_modes, emit_move_insn_1): Likewise.
29074 (optimize_bitfield_assignment_op, expand_assignment): Likewise.
29075 (store_expr_with_bounds, store_field, expand_expr_real_1): Likewise.
29076 * fold-const.c (optimize_bit_field_compare, merge_ranges): Likewise.
29077 * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
29078 * reload.c (find_reloads): Likewise.
29079 * reload1.c (alter_reg): Likewise.
29080 * stor-layout.c (bitwise_mode_for_mode, compute_record_mode): Likewise.
29081 * targhooks.c (default_secondary_memory_needed_mode): Likewise.
29082 * tree-if-conv.c (predicate_mem_writes): Likewise.
29083 * tree-ssa-strlen.c (handle_builtin_memcmp): Likewise.
29084 * tree-vect-patterns.c (adjust_bool_pattern): Likewise.
29085 * tree-vect-stmts.c (vectorizable_simd_clone_call): Likewise.
29086 * valtrack.c (dead_debug_insert_temp): Likewise.
29087 * varasm.c (mergeable_constant_section): Likewise.
29088 * config/sh/sh.h (LOCAL_ALIGNMENT): Use as_a <fixed_size_mode>.
29090 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29091 Alan Hayward <alan.hayward@arm.com>
29092 David Sherwood <david.sherwood@arm.com>
29094 * expr.c (expand_assignment): Cope with polynomial mode sizes
29095 when assigning to a CONCAT.
29097 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29098 Alan Hayward <alan.hayward@arm.com>
29099 David Sherwood <david.sherwood@arm.com>
29101 * machmode.h (mode_precision): Change from unsigned short to
29103 (mode_to_precision): Return a poly_uint16 rather than an unsigned
29105 (GET_MODE_PRECISION): Return a constant if ONLY_FIXED_SIZE_MODES,
29106 or if measurement_type is not polynomial.
29107 (HWI_COMPUTABLE_MODE_P): Turn into a function. Optimize the case
29108 in which the mode is already known to be a scalar_int_mode.
29109 * genmodes.c (emit_mode_precision): Change the type of mode_precision
29110 from unsigned short to poly_uint16_pod. Use ZERO_COEFFS for the
29112 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
29113 for GET_MODE_PRECISION.
29114 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
29115 for GET_MODE_PRECISION.
29116 * combine.c (update_rsp_from_reg_equal): Treat GET_MODE_PRECISION
29118 (try_combine, find_split_point, combine_simplify_rtx): Likewise.
29119 (expand_field_assignment, make_extraction): Likewise.
29120 (make_compound_operation_int, record_dead_and_set_regs_1): Likewise.
29121 (get_last_value): Likewise.
29122 * convert.c (convert_to_integer_1): Likewise.
29123 * cse.c (cse_insn): Likewise.
29124 * expr.c (expand_expr_real_1): Likewise.
29125 * lra-constraints.c (simplify_operand_subreg): Likewise.
29126 * optabs-query.c (can_atomic_load_p): Likewise.
29127 * optabs.c (expand_atomic_load): Likewise.
29128 (expand_atomic_store): Likewise.
29129 * ree.c (combine_reaching_defs): Likewise.
29130 * rtl.h (partial_subreg_p, paradoxical_subreg_p): Likewise.
29131 * rtlanal.c (nonzero_bits1, lsb_bitfield_op_p): Likewise.
29132 * tree.h (type_has_mode_precision_p): Likewise.
29133 * ubsan.c (instrument_si_overflow): Likewise.
29135 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29136 Alan Hayward <alan.hayward@arm.com>
29137 David Sherwood <david.sherwood@arm.com>
29139 * tree.h (TYPE_VECTOR_SUBPARTS): Turn into a function and handle
29140 polynomial numbers of units.
29141 (SET_TYPE_VECTOR_SUBPARTS): Likewise.
29142 (valid_vector_subparts_p): New function.
29143 (build_vector_type): Remove temporary shim and take the number
29144 of units as a poly_uint64 rather than an int.
29145 (build_opaque_vector_type): Take the number of units as a
29146 poly_uint64 rather than an int.
29147 * tree.c (build_vector_from_ctor): Handle polynomial
29148 TYPE_VECTOR_SUBPARTS.
29149 (type_hash_canon_hash, type_cache_hasher::equal): Likewise.
29150 (uniform_vector_p, vector_type_mode, build_vector): Likewise.
29151 (build_vector_from_val): If the number of units is variable,
29152 use build_vec_duplicate_cst for constant operands and
29153 VEC_DUPLICATE_EXPR otherwise.
29154 (make_vector_type): Remove temporary is_constant ().
29155 (build_vector_type, build_opaque_vector_type): Take the number of
29156 units as a poly_uint64 rather than an int.
29157 (check_vector_cst): Handle polynomial TYPE_VECTOR_SUBPARTS and
29159 * cfgexpand.c (expand_debug_expr): Likewise.
29160 * expr.c (count_type_elements, categorize_ctor_elements_1): Likewise.
29161 (store_constructor, expand_expr_real_1): Likewise.
29162 (const_scalar_mask_from_tree): Likewise.
29163 * fold-const-call.c (fold_const_reduction): Likewise.
29164 * fold-const.c (const_binop, const_unop, fold_convert_const): Likewise.
29165 (operand_equal_p, fold_vec_perm, fold_ternary_loc): Likewise.
29166 (native_encode_vector, vec_cst_ctor_to_array): Likewise.
29167 (fold_relational_const): Likewise.
29168 (native_interpret_vector): Likewise. Change the size from an
29169 int to an unsigned int.
29170 * gimple-fold.c (gimple_fold_stmt_to_constant_1): Handle polynomial
29171 TYPE_VECTOR_SUBPARTS.
29172 (gimple_fold_indirect_ref, gimple_build_vector): Likewise.
29173 (gimple_build_vector_from_val): Use VEC_DUPLICATE_EXPR when
29174 duplicating a non-constant operand into a variable-length vector.
29175 * hsa-brig.c (hsa_op_immed::emit_to_buffer): Handle polynomial
29176 TYPE_VECTOR_SUBPARTS and VECTOR_CST_NELTS.
29177 * ipa-icf.c (sem_variable::equals): Likewise.
29178 * match.pd: Likewise.
29179 * omp-simd-clone.c (simd_clone_subparts): Likewise.
29180 * print-tree.c (print_node): Likewise.
29181 * stor-layout.c (layout_type): Likewise.
29182 * targhooks.c (default_builtin_vectorization_cost): Likewise.
29183 * tree-cfg.c (verify_gimple_comparison): Likewise.
29184 (verify_gimple_assign_binary): Likewise.
29185 (verify_gimple_assign_ternary): Likewise.
29186 (verify_gimple_assign_single): Likewise.
29187 * tree-pretty-print.c (dump_generic_node): Likewise.
29188 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
29189 (simplify_bitfield_ref, is_combined_permutation_identity): Likewise.
29190 * tree-vect-data-refs.c (vect_permute_store_chain): Likewise.
29191 (vect_grouped_load_supported, vect_permute_load_chain): Likewise.
29192 (vect_shift_permute_load_chain): Likewise.
29193 * tree-vect-generic.c (nunits_for_known_piecewise_op): Likewise.
29194 (expand_vector_condition, optimize_vector_constructor): Likewise.
29195 (lower_vec_perm, get_compute_type): Likewise.
29196 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
29197 (get_initial_defs_for_reduction, vect_transform_loop): Likewise.
29198 * tree-vect-patterns.c (vect_recog_bool_pattern): Likewise.
29199 (vect_recog_mask_conversion_pattern): Likewise.
29200 * tree-vect-slp.c (vect_supported_load_permutation_p): Likewise.
29201 (vect_get_constant_vectors, vect_transform_slp_perm_load): Likewise.
29202 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
29203 (get_group_load_store_type, vectorizable_mask_load_store): Likewise.
29204 (vectorizable_bswap, simd_clone_subparts, vectorizable_assignment)
29205 (vectorizable_shift, vectorizable_operation, vectorizable_store)
29206 (vectorizable_load, vect_is_simple_cond, vectorizable_comparison)
29207 (supportable_widening_operation): Likewise.
29208 (supportable_narrowing_operation): Likewise.
29209 * tree-vector-builder.c (tree_vector_builder::binary_encoded_nelts):
29211 * varasm.c (output_constant): Likewise.
29213 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29214 Alan Hayward <alan.hayward@arm.com>
29215 David Sherwood <david.sherwood@arm.com>
29217 * tree-vect-data-refs.c (vect_permute_store_chain): Reorganize
29218 so that both the length == 3 and length != 3 cases set up their
29219 own permute vectors. Add comments explaining why we know the
29220 number of elements is constant.
29221 (vect_permute_load_chain): Likewise.
29223 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29224 Alan Hayward <alan.hayward@arm.com>
29225 David Sherwood <david.sherwood@arm.com>
29227 * machmode.h (mode_nunits): Change from unsigned char to
29229 (ONLY_FIXED_SIZE_MODES): New macro.
29230 (pod_mode::measurement_type, scalar_int_mode::measurement_type)
29231 (scalar_float_mode::measurement_type, scalar_mode::measurement_type)
29232 (complex_mode::measurement_type, fixed_size_mode::measurement_type):
29234 (mode_to_nunits): Return a poly_uint16 rather than an unsigned short.
29235 (GET_MODE_NUNITS): Return a constant if ONLY_FIXED_SIZE_MODES,
29236 or if measurement_type is not polynomial.
29237 * genmodes.c (ZERO_COEFFS): New macro.
29238 (emit_mode_nunits_inline): Make mode_nunits_inline return a
29240 (emit_mode_nunits): Change the type of mode_nunits to poly_uint16_pod.
29241 Use ZERO_COEFFS when emitting initializers.
29242 * data-streamer.h (bp_pack_poly_value): New function.
29243 (bp_unpack_poly_value): Likewise.
29244 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
29245 for GET_MODE_NUNITS.
29246 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
29247 for GET_MODE_NUNITS.
29248 * tree.c (make_vector_type): Remove temporary shim and make
29249 the real function take the number of units as a poly_uint64
29250 rather than an int.
29251 (build_vector_type_for_mode): Handle polynomial nunits.
29252 * dwarf2out.c (loc_descriptor, add_const_value_attribute): Likewise.
29253 * emit-rtl.c (const_vec_series_p_1): Likewise.
29254 (gen_rtx_CONST_VECTOR): Likewise.
29255 * fold-const.c (test_vec_duplicate_folding): Likewise.
29256 * genrecog.c (validate_pattern): Likewise.
29257 * optabs-query.c (can_vec_perm_var_p, can_mult_highpart_p): Likewise.
29258 * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
29259 * optabs.c (expand_vector_broadcast, expand_binop_directly): Likewise.
29260 (shift_amt_for_vec_perm_mask, expand_vec_perm_var): Likewise.
29261 (expand_vec_cond_expr, expand_mult_highpart): Likewise.
29262 * rtlanal.c (subreg_get_info): Likewise.
29263 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
29264 (vect_grouped_load_supported): Likewise.
29265 * tree-vect-generic.c (type_for_widest_vector_mode): Likewise.
29266 * tree-vect-loop.c (have_whole_vector_shift): Likewise.
29267 * simplify-rtx.c (simplify_unary_operation_1): Likewise.
29268 (simplify_const_unary_operation, simplify_binary_operation_1)
29269 (simplify_const_binary_operation, simplify_ternary_operation)
29270 (test_vector_ops_duplicate, test_vector_ops): Likewise.
29271 (simplify_immed_subreg): Use GET_MODE_NUNITS on a fixed_size_mode
29272 instead of CONST_VECTOR_NUNITS.
29273 * varasm.c (output_constant_pool_2): Likewise.
29274 * rtx-vector-builder.c (rtx_vector_builder::build): Only include the
29275 explicit-encoded elements in the XVEC for variable-length vectors.
29277 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29279 * lra-constraints.c (curr_insn_transform): Use partial_subreg_p.
29281 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29282 Alan Hayward <alan.hayward@arm.com>
29283 David Sherwood <david.sherwood@arm.com>
29285 * coretypes.h (fixed_size_mode): Declare.
29286 (fixed_size_mode_pod): New typedef.
29287 * builtins.h (target_builtins::x_apply_args_mode)
29288 (target_builtins::x_apply_result_mode): Change type to
29289 fixed_size_mode_pod.
29290 * builtins.c (apply_args_size, apply_result_size, result_vector)
29291 (expand_builtin_apply_args_1, expand_builtin_apply)
29292 (expand_builtin_return): Update accordingly.
29294 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29296 * cse.c (hash_rtx_cb): Hash only the encoded elements.
29297 * cselib.c (cselib_hash_rtx): Likewise.
29298 * expmed.c (make_tree): Build VECTOR_CSTs directly from the
29299 CONST_VECTOR encoding.
29301 2018-01-03 Jakub Jelinek <jakub@redhat.com>
29302 Jeff Law <law@redhat.com>
29305 * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): For
29306 noreturn probe, use gen_pop instead of ix86_emit_restore_reg_using_pop,
29307 only set RTX_FRAME_RELATED_P on both the push and pop if cfa_reg is sp
29308 and add REG_CFA_ADJUST_CFA notes in that case to both insns.
29311 * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): Do not
29312 explicitly probe *sp in a noreturn function if there were any callee
29313 register saves or frame pointer is needed.
29315 2018-01-03 Jakub Jelinek <jakub@redhat.com>
29318 * cfgexpand.c (expand_debug_expr): Return NULL if mode is
29319 BLKmode for ternary, binary or unary expressions.
29322 * var-tracking.c (delete_vta_debug_insn): New inline function.
29323 (delete_vta_debug_insns): Add USE_CFG argument, if true, walk just
29324 insns from get_insns () to NULL instead of each bb separately.
29325 Use delete_vta_debug_insn. No longer static.
29326 (vt_debug_insns_local, variable_tracking_main_1): Adjust
29327 delete_vta_debug_insns callers.
29328 * rtl.h (delete_vta_debug_insns): Declare.
29329 * final.c (rest_of_handle_final): Call delete_vta_debug_insns
29330 instead of variable_tracking_main.
29332 2018-01-03 Martin Sebor <msebor@redhat.com>
29334 PR tree-optimization/83603
29335 * calls.c (maybe_warn_nonstring_arg): Avoid accessing function
29336 arguments past the endof the argument list in functions declared
29337 without a prototype.
29338 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call):
29339 Avoid checking when arguments are null.
29341 2018-01-03 Martin Sebor <msebor@redhat.com>
29344 * doc/extend.texi (attribute const): Fix a typo.
29345 * ipa-pure-const.c ((warn_function_const, warn_function_pure): Avoid
29346 issuing -Wsuggest-attribute for void functions.
29348 2018-01-03 Martin Sebor <msebor@redhat.com>
29350 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Use
29351 offset_int::from instead of wide_int::to_shwi.
29352 (maybe_diag_overlap): Remove assertion.
29353 Use HOST_WIDE_INT_PRINT_DEC instead of %lli.
29354 * gimple-ssa-sprintf.c (format_directive): Same.
29355 (parse_directive): Same.
29356 (sprintf_dom_walker::compute_format_length): Same.
29357 (try_substitute_return_value): Same.
29359 2018-01-03 Jeff Law <law@redhat.com>
29361 PR middle-end/83654
29362 * explow.c (anti_adjust_stack_and_probe_stack_clash): Test a
29363 non-constant residual for zero at runtime and avoid probing in
29364 that case. Reorganize code for trailing problem to mirror handling
29367 2018-01-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
29369 PR tree-optimization/83501
29370 * tree-ssa-strlen.c (get_string_cst): New.
29371 (handle_char_store): Call get_string_cst.
29373 2018-01-03 Martin Liska <mliska@suse.cz>
29375 PR tree-optimization/83593
29376 * tree-ssa-strlen.c: Include tree-cfg.h.
29377 (strlen_check_and_optimize_stmt): Add new argument cleanup_eh.
29378 (strlen_dom_walker): Add new member variable m_cleanup_cfg.
29379 (strlen_dom_walker::strlen_dom_walker): Initialize m_cleanup_cfg
29381 (strlen_dom_walker::before_dom_children): Call
29382 gimple_purge_dead_eh_edges. Dump tranformation with details
29384 (strlen_dom_walker::before_dom_children): Update call by adding
29385 new argument cleanup_eh.
29386 (pass_strlen::execute): Return TODO_cleanup_cfg if needed.
29388 2018-01-03 Martin Liska <mliska@suse.cz>
29391 * cif-code.def (VARIADIC_THUNK): New enum value.
29392 * ipa-fnsummary.c (compute_fn_summary): Do not inline variadic
29395 2018-01-03 Jan Beulich <jbeulich@suse.com>
29397 * sse.md (mov<mode>_internal): Tighten condition for when to use
29398 vmovdqu<ssescalarsize> for TI and OI modes.
29400 2018-01-03 Jakub Jelinek <jakub@redhat.com>
29402 Update copyright years.
29404 2018-01-03 Martin Liska <mliska@suse.cz>
29407 * ipa-visibility.c (function_and_variable_visibility): Skip
29408 functions with noipa attribure.
29410 2018-01-03 Jakub Jelinek <jakub@redhat.com>
29412 * gcc.c (process_command): Update copyright notice dates.
29413 * gcov-dump.c (print_version): Ditto.
29414 * gcov.c (print_version): Ditto.
29415 * gcov-tool.c (print_version): Ditto.
29416 * gengtype.c (create_file): Ditto.
29417 * doc/cpp.texi: Bump @copying's copyright year.
29418 * doc/cppinternals.texi: Ditto.
29419 * doc/gcc.texi: Ditto.
29420 * doc/gccint.texi: Ditto.
29421 * doc/gcov.texi: Ditto.
29422 * doc/install.texi: Ditto.
29423 * doc/invoke.texi: Ditto.
29425 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29427 * vector-builder.h (vector_builder::m_full_nelts): Change from
29428 unsigned int to poly_uint64.
29429 (vector_builder::full_nelts): Update prototype accordingly.
29430 (vector_builder::new_vector): Likewise.
29431 (vector_builder::encoded_full_vector_p): Handle polynomial full_nelts.
29432 (vector_builder::operator ==): Likewise.
29433 (vector_builder::finalize): Likewise.
29434 * int-vector-builder.h (int_vector_builder::int_vector_builder):
29435 Take the number of elements as a poly_uint64 rather than an
29437 * vec-perm-indices.h (vec_perm_indices::m_nelts_per_input): Change
29438 from unsigned int to poly_uint64.
29439 (vec_perm_indices::vec_perm_indices): Update prototype accordingly.
29440 (vec_perm_indices::new_vector): Likewise.
29441 (vec_perm_indices::length): Likewise.
29442 (vec_perm_indices::nelts_per_input): Likewise.
29443 (vec_perm_indices::input_nelts): Likewise.
29444 * vec-perm-indices.c (vec_perm_indices::new_vector): Take the
29445 number of elements per input as a poly_uint64 rather than an
29446 unsigned int. Use the original encoding for variable-length
29447 vectors, rather than clamping each individual element.
29448 For the second and subsequent elements in each pattern,
29449 clamp the step and base before clamping their sum.
29450 (vec_perm_indices::series_p): Handle polynomial element counts.
29451 (vec_perm_indices::all_in_range_p): Likewise.
29452 (vec_perm_indices_to_tree): Likewise.
29453 (vec_perm_indices_to_rtx): Likewise.
29454 * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise.
29455 * tree-vector-builder.c (tree_vector_builder::new_unary_operation)
29456 (tree_vector_builder::new_binary_operation): Handle polynomial
29457 element counts. Return false if we need to know the number
29458 of elements at compile time.
29459 * fold-const.c (fold_vec_perm): Punt if the number of elements
29460 isn't known at compile time.
29462 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29464 * vec-perm-indices.h (vec_perm_builder): Change element type
29465 from HOST_WIDE_INT to poly_int64.
29466 (vec_perm_indices::element_type): Update accordingly.
29467 (vec_perm_indices::clamp): Handle polynomial element_types.
29468 * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
29469 (vec_perm_indices::all_in_range_p): Likewise.
29470 (tree_to_vec_perm_builder): Check for poly_int64 trees rather
29472 * vector-builder.h (vector_builder::stepped_sequence_p): Handle
29473 polynomial vec_perm_indices element types.
29474 * int-vector-builder.h (int_vector_builder::equal_p): Likewise.
29475 * fold-const.c (fold_vec_perm): Likewise.
29476 * optabs.c (shift_amt_for_vec_perm_mask): Likewise.
29477 * tree-vect-generic.c (lower_vec_perm): Likewise.
29478 * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
29479 * config/aarch64/aarch64.c (aarch64_evpc_tbl): Cast d->perm
29480 element type to HOST_WIDE_INT.
29482 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29483 Alan Hayward <alan.hayward@arm.com>
29484 David Sherwood <david.sherwood@arm.com>
29486 * alias.c (addr_side_effect_eval): Take the size as a poly_int64
29487 rather than an int. Use plus_constant.
29488 (memrefs_conflict_p): Take the sizes as poly_int64s rather than ints.
29489 Take the offset "c" as a poly_int64 rather than a HOST_WIDE_INT.
29491 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29492 Alan Hayward <alan.hayward@arm.com>
29493 David Sherwood <david.sherwood@arm.com>
29495 * calls.c (emit_call_1, expand_call): Change struct_value_size from
29496 a HOST_WIDE_INT to a poly_int64.
29498 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29499 Alan Hayward <alan.hayward@arm.com>
29500 David Sherwood <david.sherwood@arm.com>
29502 * calls.c (load_register_parameters): Cope with polynomial
29503 mode sizes. Require a constant size for BLKmode parameters
29504 that aren't described by a PARALLEL. If BLOCK_REG_PADDING
29505 forces a parameter to be padded at the lsb end in order to
29506 fill a complete number of words, require the parameter size
29507 to be ordered wrt UNITS_PER_WORD.
29509 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29510 Alan Hayward <alan.hayward@arm.com>
29511 David Sherwood <david.sherwood@arm.com>
29513 * reload1.c (spill_stack_slot_width): Change element type
29514 from unsigned int to poly_uint64_pod.
29515 (alter_reg): Treat mode sizes as polynomial.
29517 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29518 Alan Hayward <alan.hayward@arm.com>
29519 David Sherwood <david.sherwood@arm.com>
29521 * reload.c (complex_word_subreg_p): New function.
29522 (reload_inner_reg_of_subreg, push_reload): Use it.
29524 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29525 Alan Hayward <alan.hayward@arm.com>
29526 David Sherwood <david.sherwood@arm.com>
29528 * lra-constraints.c (process_alt_operands): Reject matched
29529 operands whose sizes aren't ordered.
29530 (match_reload): Refer to this check here.
29532 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29533 Alan Hayward <alan.hayward@arm.com>
29534 David Sherwood <david.sherwood@arm.com>
29536 * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Assert
29537 that the mode size is in the set {1, 2, 4, 8, 16}.
29539 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29540 Alan Hayward <alan.hayward@arm.com>
29541 David Sherwood <david.sherwood@arm.com>
29543 * var-tracking.c (adjust_mems): Treat mode sizes as polynomial.
29544 Use plus_constant instead of gen_rtx_PLUS.
29546 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29547 Alan Hayward <alan.hayward@arm.com>
29548 David Sherwood <david.sherwood@arm.com>
29550 * config/cr16/cr16-protos.h (cr16_push_rounding): Declare.
29551 * config/cr16/cr16.h (PUSH_ROUNDING): Move implementation to...
29552 * config/cr16/cr16.c (cr16_push_rounding): ...this new function.
29553 * config/h8300/h8300-protos.h (h8300_push_rounding): Declare.
29554 * config/h8300/h8300.h (PUSH_ROUNDING): Move implementation to...
29555 * config/h8300/h8300.c (h8300_push_rounding): ...this new function.
29556 * config/i386/i386-protos.h (ix86_push_rounding): Declare.
29557 * config/i386/i386.h (PUSH_ROUNDING): Move implementation to...
29558 * config/i386/i386.c (ix86_push_rounding): ...this new function.
29559 * config/m32c/m32c-protos.h (m32c_push_rounding): Take and return
29561 * config/m32c/m32c.c (m32c_push_rounding): Likewise.
29562 * config/m68k/m68k-protos.h (m68k_push_rounding): Declare.
29563 * config/m68k/m68k.h (PUSH_ROUNDING): Move implementation to...
29564 * config/m68k/m68k.c (m68k_push_rounding): ...this new function.
29565 * config/pdp11/pdp11-protos.h (pdp11_push_rounding): Declare.
29566 * config/pdp11/pdp11.h (PUSH_ROUNDING): Move implementation to...
29567 * config/pdp11/pdp11.c (pdp11_push_rounding): ...this new function.
29568 * config/stormy16/stormy16-protos.h (xstormy16_push_rounding): Declare.
29569 * config/stormy16/stormy16.h (PUSH_ROUNDING): Move implementation to...
29570 * config/stormy16/stormy16.c (xstormy16_push_rounding): ...this new
29572 * expr.c (emit_move_resolve_push): Treat the input and result
29573 of PUSH_ROUNDING as a poly_int64.
29574 (emit_move_complex_push, emit_single_push_insn_1): Likewise.
29575 (emit_push_insn): Likewise.
29576 * lra-eliminations.c (mark_not_eliminable): Likewise.
29577 * recog.c (push_operand): Likewise.
29578 * reload1.c (elimination_effects): Likewise.
29579 * rtlanal.c (nonzero_bits1): Likewise.
29580 * calls.c (store_one_arg): Likewise. Require the padding to be
29581 known at compile time.
29583 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29584 Alan Hayward <alan.hayward@arm.com>
29585 David Sherwood <david.sherwood@arm.com>
29587 * expr.c (emit_single_push_insn_1): Treat mode sizes as polynomial.
29588 Use plus_constant instead of gen_rtx_PLUS.
29590 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29591 Alan Hayward <alan.hayward@arm.com>
29592 David Sherwood <david.sherwood@arm.com>
29594 * auto-inc-dec.c (set_inc_state): Take the mode size as a poly_int64
29595 rather than an int.
29597 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29598 Alan Hayward <alan.hayward@arm.com>
29599 David Sherwood <david.sherwood@arm.com>
29601 * expr.c (expand_expr_real_1): Use tree_to_poly_uint64
29602 instead of int_size_in_bytes when handling VIEW_CONVERT_EXPRs
29603 via stack temporaries. Treat the mode size as polynomial too.
29605 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29606 Alan Hayward <alan.hayward@arm.com>
29607 David Sherwood <david.sherwood@arm.com>
29609 * expr.c (expand_expr_real_2): When handling conversions involving
29610 unions, apply tree_to_poly_uint64 to the TYPE_SIZE rather than
29611 multiplying int_size_in_bytes by BITS_PER_UNIT. Treat GET_MODE_BISIZE
29612 as a poly_uint64 too.
29614 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29615 Alan Hayward <alan.hayward@arm.com>
29616 David Sherwood <david.sherwood@arm.com>
29618 * rtlanal.c (subreg_get_info): Handle polynomial mode sizes.
29620 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29621 Alan Hayward <alan.hayward@arm.com>
29622 David Sherwood <david.sherwood@arm.com>
29624 * combine.c (can_change_dest_mode): Handle polynomial
29625 REGMODE_NATURAL_SIZE.
29626 * expmed.c (store_bit_field_1): Likewise.
29627 * expr.c (store_constructor): Likewise.
29628 * emit-rtl.c (validate_subreg): Operate on polynomial mode sizes
29629 and polynomial REGMODE_NATURAL_SIZE.
29630 (gen_lowpart_common): Likewise.
29631 * reginfo.c (record_subregs_of_mode): Likewise.
29632 * rtlanal.c (read_modify_subreg_p): Likewise.
29634 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29635 Alan Hayward <alan.hayward@arm.com>
29636 David Sherwood <david.sherwood@arm.com>
29638 * internal-fn.c (expand_vector_ubsan_overflow): Handle polynomial
29639 numbers of elements.
29641 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29642 Alan Hayward <alan.hayward@arm.com>
29643 David Sherwood <david.sherwood@arm.com>
29645 * match.pd: Cope with polynomial numbers of vector elements.
29647 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29648 Alan Hayward <alan.hayward@arm.com>
29649 David Sherwood <david.sherwood@arm.com>
29651 * fold-const.c (fold_indirect_ref_1): Handle polynomial offsets
29652 in a POINTER_PLUS_EXPR.
29654 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29655 Alan Hayward <alan.hayward@arm.com>
29656 David Sherwood <david.sherwood@arm.com>
29658 * omp-simd-clone.c (simd_clone_subparts): New function.
29659 (simd_clone_init_simd_arrays): Use it instead of TYPE_VECTOR_SUBPARTS.
29660 (ipa_simd_modify_function_body): Likewise.
29662 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29663 Alan Hayward <alan.hayward@arm.com>
29664 David Sherwood <david.sherwood@arm.com>
29666 * tree-vect-generic.c (nunits_for_known_piecewise_op): New function.
29667 (expand_vector_piecewise): Use it instead of TYPE_VECTOR_SUBPARTS.
29668 (expand_vector_addition, add_rshift, expand_vector_divmod): Likewise.
29669 (expand_vector_condition, vector_element): Likewise.
29670 (subparts_gt): New function.
29671 (get_compute_type): Use subparts_gt.
29672 (count_type_subparts): Delete.
29673 (expand_vector_operations_1): Use subparts_gt instead of
29674 count_type_subparts.
29676 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29677 Alan Hayward <alan.hayward@arm.com>
29678 David Sherwood <david.sherwood@arm.com>
29680 * tree-vect-data-refs.c (vect_no_alias_p): Replace with...
29681 (vect_compile_time_alias): ...this new function. Do the calculation
29682 on poly_ints rather than trees.
29683 (vect_prune_runtime_alias_test_list): Update call accordingly.
29685 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29686 Alan Hayward <alan.hayward@arm.com>
29687 David Sherwood <david.sherwood@arm.com>
29689 * tree-vect-slp.c (vect_build_slp_tree_1): Handle polynomial
29691 (vect_schedule_slp_instance): Likewise.
29693 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29694 Alan Hayward <alan.hayward@arm.com>
29695 David Sherwood <david.sherwood@arm.com>
29697 * tree-vect-slp.c (vect_get_and_check_slp_defs): Reject
29698 constant and extern definitions for variable-length vectors.
29699 (vect_get_constant_vectors): Note that the number of units
29700 is known to be constant.
29702 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29703 Alan Hayward <alan.hayward@arm.com>
29704 David Sherwood <david.sherwood@arm.com>
29706 * tree-vect-stmts.c (vectorizable_conversion): Treat the number
29707 of units as polynomial. Choose between WIDE and NARROW based
29710 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29711 Alan Hayward <alan.hayward@arm.com>
29712 David Sherwood <david.sherwood@arm.com>
29714 * tree-vect-stmts.c (simd_clone_subparts): New function.
29715 (vectorizable_simd_clone_call): Use it instead of TYPE_VECTOR_SUBPARTS.
29717 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29718 Alan Hayward <alan.hayward@arm.com>
29719 David Sherwood <david.sherwood@arm.com>
29721 * tree-vect-stmts.c (vectorizable_call): Treat the number of
29722 vectors as polynomial. Use build_index_vector for
29723 IFN_GOMP_SIMD_LANE.
29725 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29726 Alan Hayward <alan.hayward@arm.com>
29727 David Sherwood <david.sherwood@arm.com>
29729 * tree-vect-stmts.c (get_load_store_type): Treat the number of
29730 units as polynomial. Reject VMAT_ELEMENTWISE and VMAT_STRIDED_SLP
29731 for variable-length vectors.
29732 (vectorizable_mask_load_store): Treat the number of units as
29733 polynomial, asserting that it is constant if the condition has
29734 already been enforced.
29735 (vectorizable_store, vectorizable_load): Likewise.
29737 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29738 Alan Hayward <alan.hayward@arm.com>
29739 David Sherwood <david.sherwood@arm.com>
29741 * tree-vect-loop.c (vectorizable_live_operation): Treat the number
29742 of units as polynomial. Punt if we can't tell at compile time
29743 which vector contains the final result.
29745 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29746 Alan Hayward <alan.hayward@arm.com>
29747 David Sherwood <david.sherwood@arm.com>
29749 * tree-vect-loop.c (vectorizable_induction): Treat the number
29750 of units as polynomial. Punt on SLP inductions. Use an integer
29751 VEC_SERIES_EXPR for variable-length integer reductions. Use a
29752 cast of such a series for variable-length floating-point
29755 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29756 Alan Hayward <alan.hayward@arm.com>
29757 David Sherwood <david.sherwood@arm.com>
29759 * tree.h (build_index_vector): Declare.
29760 * tree.c (build_index_vector): New function.
29761 * tree-vect-loop.c (get_initial_defs_for_reduction): Treat the number
29762 of units as polynomial, forcibly converting it to a constant if
29763 vectorizable_reduction has already enforced the condition.
29764 (vect_create_epilog_for_reduction): Likewise. Use build_index_vector
29765 to create a {1,2,3,...} vector.
29766 (vectorizable_reduction): Treat the number of units as polynomial.
29767 Choose vectype_in based on the largest scalar element size rather
29768 than the smallest number of units. Enforce the restrictions
29771 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29772 Alan Hayward <alan.hayward@arm.com>
29773 David Sherwood <david.sherwood@arm.com>
29775 * tree-vect-data-refs.c (vector_alignment_reachable_p): Treat the
29776 number of units as polynomial.
29778 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29779 Alan Hayward <alan.hayward@arm.com>
29780 David Sherwood <david.sherwood@arm.com>
29782 * target.h (vector_sizes, auto_vector_sizes): New typedefs.
29783 * target.def (autovectorize_vector_sizes): Return the vector sizes
29784 by pointer, using vector_sizes rather than a bitmask.
29785 * targhooks.h (default_autovectorize_vector_sizes): Update accordingly.
29786 * targhooks.c (default_autovectorize_vector_sizes): Likewise.
29787 * config/aarch64/aarch64.c (aarch64_autovectorize_vector_sizes):
29789 * config/arc/arc.c (arc_autovectorize_vector_sizes): Likewise.
29790 * config/arm/arm.c (arm_autovectorize_vector_sizes): Likewise.
29791 * config/i386/i386.c (ix86_autovectorize_vector_sizes): Likewise.
29792 * config/mips/mips.c (mips_autovectorize_vector_sizes): Likewise.
29793 * omp-general.c (omp_max_vf): Likewise.
29794 * omp-low.c (omp_clause_aligned_alignment): Likewise.
29795 * optabs-query.c (can_vec_mask_load_store_p): Likewise.
29796 * tree-vect-loop.c (vect_analyze_loop): Likewise.
29797 * tree-vect-slp.c (vect_slp_bb): Likewise.
29798 * doc/tm.texi: Regenerate.
29799 * tree-vectorizer.h (current_vector_size): Change from an unsigned int
29801 * tree-vect-stmts.c (get_vectype_for_scalar_type_and_size): Take
29802 the vector size as a poly_uint64 rather than an unsigned int.
29803 (current_vector_size): Change from an unsigned int to a poly_uint64.
29804 (get_vectype_for_scalar_type): Update accordingly.
29805 * tree.h (build_truth_vector_type): Take the size and number of
29806 units as a poly_uint64 rather than an unsigned int.
29807 (build_vector_type): Add a temporary overload that takes
29808 the number of units as a poly_uint64 rather than an unsigned int.
29809 * tree.c (make_vector_type): Likewise.
29810 (build_truth_vector_type): Take the number of units as a poly_uint64
29811 rather than an unsigned int.
29813 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29814 Alan Hayward <alan.hayward@arm.com>
29815 David Sherwood <david.sherwood@arm.com>
29817 * target.def (get_mask_mode): Take the number of units and length
29818 as poly_uint64s rather than unsigned ints.
29819 * targhooks.h (default_get_mask_mode): Update accordingly.
29820 * targhooks.c (default_get_mask_mode): Likewise.
29821 * config/i386/i386.c (ix86_get_mask_mode): Likewise.
29822 * doc/tm.texi: Regenerate.
29824 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29825 Alan Hayward <alan.hayward@arm.com>
29826 David Sherwood <david.sherwood@arm.com>
29828 * omp-general.h (omp_max_vf): Return a poly_uint64 instead of an int.
29829 * omp-general.c (omp_max_vf): Likewise.
29830 * omp-expand.c (omp_adjust_chunk_size): Update call to omp_max_vf.
29831 (expand_omp_simd): Handle polynomial safelen.
29832 * omp-low.c (omplow_simd_context): Add a default constructor.
29833 (omplow_simd_context::max_vf): Change from int to poly_uint64.
29834 (lower_rec_simd_input_clauses): Update accordingly.
29835 (lower_rec_input_clauses): Likewise.
29837 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29838 Alan Hayward <alan.hayward@arm.com>
29839 David Sherwood <david.sherwood@arm.com>
29841 * tree-vectorizer.h (vect_nunits_for_cost): New function.
29842 * tree-vect-loop.c (vect_model_reduction_cost): Use it.
29843 * tree-vect-slp.c (vect_analyze_slp_cost_1): Likewise.
29844 (vect_analyze_slp_cost): Likewise.
29845 * tree-vect-stmts.c (vect_model_store_cost): Likewise.
29846 (vect_model_load_cost): Likewise.
29848 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29849 Alan Hayward <alan.hayward@arm.com>
29850 David Sherwood <david.sherwood@arm.com>
29852 * tree-vect-slp.c (vect_record_max_nunits, vect_build_slp_tree_1)
29853 (vect_build_slp_tree_2, vect_build_slp_tree): Change max_nunits
29854 from an unsigned int * to a poly_uint64_pod *.
29855 (calculate_unrolling_factor): New function.
29856 (vect_analyze_slp_instance): Use it. Track polynomial max_nunits.
29858 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29859 Alan Hayward <alan.hayward@arm.com>
29860 David Sherwood <david.sherwood@arm.com>
29862 * tree-vectorizer.h (_slp_instance::unrolling_factor): Change
29863 from an unsigned int to a poly_uint64.
29864 (_loop_vec_info::slp_unrolling_factor): Likewise.
29865 (_loop_vec_info::vectorization_factor): Change from an int
29867 (MAX_VECTORIZATION_FACTOR): Bump from 64 to INT_MAX.
29868 (vect_get_num_vectors): New function.
29869 (vect_update_max_nunits, vect_vf_for_cost): Likewise.
29870 (vect_get_num_copies): Use vect_get_num_vectors.
29871 (vect_analyze_data_ref_dependences): Change max_vf from an int *
29872 to an unsigned int *.
29873 (vect_analyze_data_refs): Change min_vf from an int * to a
29875 (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
29876 than an unsigned HOST_WIDE_INT.
29877 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
29878 (vect_analyze_data_ref_dependence): Change max_vf from an int *
29879 to an unsigned int *.
29880 (vect_analyze_data_ref_dependences): Likewise.
29881 (vect_compute_data_ref_alignment): Handle polynomial vf.
29882 (vect_enhance_data_refs_alignment): Likewise.
29883 (vect_prune_runtime_alias_test_list): Likewise.
29884 (vect_shift_permute_load_chain): Likewise.
29885 (vect_supportable_dr_alignment): Likewise.
29886 (dependence_distance_ge_vf): Take the vectorization factor as a
29887 poly_uint64 rather than an unsigned HOST_WIDE_INT.
29888 (vect_analyze_data_refs): Change min_vf from an int * to a
29890 * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Take
29891 vfm1 as a poly_uint64 rather than an int. Make the same change
29892 for the returned bound_scalar.
29893 (vect_gen_vector_loop_niters): Handle polynomial vf.
29894 (vect_do_peeling): Likewise. Update call to
29895 vect_gen_scalar_loop_niters and handle polynomial bound_scalars.
29896 (vect_gen_vector_loop_niters_mult_vf): Assert that the vf must
29898 * tree-vect-loop.c (vect_determine_vectorization_factor)
29899 (vect_update_vf_for_slp, vect_analyze_loop_2): Handle polynomial vf.
29900 (vect_get_known_peeling_cost): Likewise.
29901 (vect_estimate_min_profitable_iters, vectorizable_reduction): Likewise.
29902 (vect_worthwhile_without_simd_p, vectorizable_induction): Likewise.
29903 (vect_transform_loop): Likewise. Use the lowest possible VF when
29904 updating the upper bounds of the loop.
29905 (vect_min_worthwhile_factor): Make static. Return an unsigned int
29906 rather than an int.
29907 * tree-vect-slp.c (vect_attempt_slp_rearrange_stmts): Cope with
29908 polynomial unroll factors.
29909 (vect_analyze_slp_cost_1, vect_analyze_slp_instance): Likewise.
29910 (vect_make_slp_decision): Likewise.
29911 (vect_supported_load_permutation_p): Likewise, and polynomial
29913 (vect_analyze_slp_cost): Handle polynomial vf.
29914 (vect_slp_analyze_node_operations): Likewise.
29915 (vect_slp_analyze_bb_1): Likewise.
29916 (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
29917 than an unsigned HOST_WIDE_INT.
29918 * tree-vect-stmts.c (vectorizable_simd_clone_call, vectorizable_store)
29919 (vectorizable_load): Handle polynomial vf.
29920 * tree-vectorizer.c (simduid_to_vf::vf): Change from an int to
29922 (adjust_simduid_builtins, shrink_simd_arrays): Update accordingly.
29924 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29925 Alan Hayward <alan.hayward@arm.com>
29926 David Sherwood <david.sherwood@arm.com>
29928 * match.pd: Handle bit operations involving three constants
29929 and try to fold one pair.
29931 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29933 * tree-vect-loop-manip.c: Include gimple-fold.h.
29934 (slpeel_make_loop_iterate_ntimes): Add step, final_iv and
29935 niters_maybe_zero parameters. Handle other cases besides a step of 1.
29936 (vect_gen_vector_loop_niters): Add a step_vector_ptr parameter.
29937 Add a path that uses a step of VF instead of 1, but disable it
29939 (vect_do_peeling): Add step_vector, niters_vector_mult_vf_var
29940 and niters_no_overflow parameters. Update calls to
29941 slpeel_make_loop_iterate_ntimes and vect_gen_vector_loop_niters.
29942 Create a new SSA name if the latter choses to use a ste other
29943 than zero, and return it via niters_vector_mult_vf_var.
29944 * tree-vect-loop.c (vect_transform_loop): Update calls to
29945 vect_do_peeling, vect_gen_vector_loop_niters and
29946 slpeel_make_loop_iterate_ntimes.
29947 * tree-vectorizer.h (slpeel_make_loop_iterate_ntimes, vect_do_peeling)
29948 (vect_gen_vector_loop_niters): Update declarations after above changes.
29950 2018-01-02 Michael Meissner <meissner@linux.vnet.ibm.com>
29952 * config/rs6000/rs6000.md (floor<mode>2): Add support for IEEE
29953 128-bit round to integer instructions.
29954 (ceil<mode>2): Likewise.
29955 (btrunc<mode>2): Likewise.
29956 (round<mode>2): Likewise.
29958 2018-01-02 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
29960 * config/rs6000/rs6000-string.c (expand_block_move): Allow the use of
29961 unaligned VSX load/store on P8/P9.
29962 (expand_block_clear): Allow the use of unaligned VSX
29963 load/store on P8/P9.
29965 2018-01-02 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
29967 * config/rs6000/rs6000-p8swap.c (swap_feeds_both_load_and_store):
29969 (rs6000_analyze_swaps): Mark a web unoptimizable if it contains a
29970 swap associated with both a load and a store.
29972 2018-01-02 Andrew Waterman <andrew@sifive.com>
29974 * config/riscv/linux.h (ICACHE_FLUSH_FUNC): New.
29975 * config/riscv/riscv.md (clear_cache): Use it.
29977 2018-01-02 Artyom Skrobov <tyomitch@gmail.com>
29979 * web.c: Remove out-of-date comment.
29981 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
29983 * expr.c (fixup_args_size_notes): Check that any existing
29984 REG_ARGS_SIZE notes are correct, and don't try to re-add them.
29985 (emit_single_push_insn_1): Move stack_pointer_delta adjustment to...
29986 (emit_single_push_insn): ...here.
29988 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
29990 * rtl.h (CONST_VECTOR_ELT): Redefine to const_vector_elt.
29991 (const_vector_encoded_nelts): New function.
29992 (CONST_VECTOR_NUNITS): Redefine to use GET_MODE_NUNITS.
29993 (const_vector_int_elt, const_vector_elt): Declare.
29994 * emit-rtl.c (const_vector_int_elt_1): New function.
29995 (const_vector_elt): Likewise.
29996 * simplify-rtx.c (simplify_immed_subreg): Avoid taking the address
29997 of CONST_VECTOR_ELT.
29999 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
30001 * expr.c: Include rtx-vector-builder.h.
30002 (const_vector_mask_from_tree): Use rtx_vector_builder and operate
30003 directly on the tree encoding.
30004 (const_vector_from_tree): Likewise.
30005 * optabs.c: Include rtx-vector-builder.h.
30006 (expand_vec_perm_var): Use rtx_vector_builder and create a repeating
30007 sequence of "u" values.
30008 * vec-perm-indices.c: Include rtx-vector-builder.h.
30009 (vec_perm_indices_to_rtx): Use rtx_vector_builder and operate
30010 directly on the vec_perm_indices encoding.
30012 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
30014 * doc/rtl.texi (const_vector): Describe new encoding scheme.
30015 * Makefile.in (OBJS): Add rtx-vector-builder.o.
30016 * rtx-vector-builder.h: New file.
30017 * rtx-vector-builder.c: Likewise.
30018 * rtl.h (rtx_def::u2): Add a const_vector field.
30019 (CONST_VECTOR_NPATTERNS): New macro.
30020 (CONST_VECTOR_NELTS_PER_PATTERN): Likewise.
30021 (CONST_VECTOR_DUPLICATE_P): Likewise.
30022 (CONST_VECTOR_STEPPED_P): Likewise.
30023 (CONST_VECTOR_ENCODED_ELT): Likewise.
30024 (const_vec_duplicate_p): Check for a duplicated vector encoding.
30025 (unwrap_const_vec_duplicate): Likewise.
30026 (const_vec_series_p): Check for a non-duplicated vector encoding.
30027 Say that the function only returns true for integer vectors.
30028 * emit-rtl.c: Include rtx-vector-builder.h.
30029 (gen_const_vec_duplicate_1): Delete.
30030 (gen_const_vector): Call gen_const_vec_duplicate instead of
30031 gen_const_vec_duplicate_1.
30032 (const_vec_series_p_1): Operate directly on the CONST_VECTOR encoding.
30033 (gen_const_vec_duplicate): Use rtx_vector_builder.
30034 (gen_const_vec_series): Likewise.
30035 (gen_rtx_CONST_VECTOR): Likewise.
30036 * config/powerpcspe/powerpcspe.c: Include rtx-vector-builder.h.
30037 (swap_const_vector_halves): Take an rtx pointer rather than rtx.
30038 Build a new vector rather than modifying a CONST_VECTOR in-place.
30039 (handle_special_swappables): Update call accordingly.
30040 * config/rs6000/rs6000-p8swap.c: Include rtx-vector-builder.h.
30041 (swap_const_vector_halves): Take an rtx pointer rather than rtx.
30042 Build a new vector rather than modifying a CONST_VECTOR in-place.
30043 (handle_special_swappables): Update call accordingly.
30045 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
30047 * simplify-rtx.c (simplify_const_binary_operation): Use
30048 CONST_VECTOR_ELT instead of XVECEXP.
30050 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
30052 * tree-cfg.c (verify_gimple_assign_ternary): Allow the size of
30053 the selector elements to be different from the data elements
30054 if the selector is a VECTOR_CST.
30055 * tree-vect-stmts.c (vect_gen_perm_mask_any): Use a vector of
30056 ssizetype for the selector.
30058 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
30060 * optabs.c (shift_amt_for_vec_perm_mask): Try using series_p
30061 before testing each element individually.
30062 * tree-vect-generic.c (lower_vec_perm): Likewise.
30064 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
30066 * selftest.h (selftest::vec_perm_indices_c_tests): Declare.
30067 * selftest-run-tests.c (selftest::run_tests): Call it.
30068 * vector-builder.h (vector_builder::operator ==): New function.
30069 (vector_builder::operator !=): Likewise.
30070 * vec-perm-indices.h (vec_perm_indices::series_p): Declare.
30071 (vec_perm_indices::all_from_input_p): New function.
30072 * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
30073 (test_vec_perm_12, selftest::vec_perm_indices_c_tests): Likewise.
30074 * fold-const.c (fold_ternary_loc): Use tree_to_vec_perm_builder
30075 instead of reading the VECTOR_CST directly. Detect whether both
30076 vector inputs are the same before constructing the vec_perm_indices,
30077 and update the number of inputs argument accordingly. Use the
30078 utility functions added above. Only construct sel2 if we need to.
30080 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
30082 * optabs.c (expand_vec_perm_var): Use an explicit encoding for
30083 the broadcast of the low byte.
30084 (expand_mult_highpart): Use an explicit encoding for the permutes.
30085 * optabs-query.c (can_mult_highpart_p): Likewise.
30086 * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Likewise.
30087 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
30088 (vectorizable_bswap): Likewise.
30089 * tree-vect-data-refs.c (vect_grouped_store_supported): Use an
30090 explicit encoding for the power-of-2 permutes.
30091 (vect_permute_store_chain): Likewise.
30092 (vect_grouped_load_supported): Likewise.
30093 (vect_permute_load_chain): Likewise.
30095 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
30097 * vec-perm-indices.h (vec_perm_indices_to_tree): Declare.
30098 * vec-perm-indices.c (vec_perm_indices_to_tree): New function.
30099 * tree-ssa-forwprop.c (simplify_vector_constructor): Use it.
30100 * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
30101 * tree-vect-stmts.c (vectorizable_bswap): Likewise.
30102 (vect_gen_perm_mask_any): Likewise.
30104 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
30106 * int-vector-builder.h: New file.
30107 * vec-perm-indices.h: Include int-vector-builder.h.
30108 (vec_perm_indices): Redefine as an int_vector_builder.
30109 (auto_vec_perm_indices): Delete.
30110 (vec_perm_builder): Redefine as a stand-alone class.
30111 (vec_perm_indices::vec_perm_indices): New function.
30112 (vec_perm_indices::clamp): Likewise.
30113 * vec-perm-indices.c: Include fold-const.h and tree-vector-builder.h.
30114 (vec_perm_indices::new_vector): New function.
30115 (vec_perm_indices::new_expanded_vector): Update for new
30116 vec_perm_indices class.
30117 (vec_perm_indices::rotate_inputs): New function.
30118 (vec_perm_indices::all_in_range_p): Operate directly on the
30119 encoded form, without computing elided elements.
30120 (tree_to_vec_perm_builder): Operate directly on the VECTOR_CST
30121 encoding. Update for new vec_perm_indices class.
30122 * optabs.c (expand_vec_perm_const): Create a vec_perm_indices for
30123 the given vec_perm_builder.
30124 (expand_vec_perm_var): Update vec_perm_builder constructor.
30125 (expand_mult_highpart): Use vec_perm_builder instead of
30126 auto_vec_perm_indices.
30127 * optabs-query.c (can_mult_highpart_p): Use vec_perm_builder and
30128 vec_perm_indices instead of auto_vec_perm_indices. Use a single
30129 or double series encoding as appropriate.
30130 * fold-const.c (fold_ternary_loc): Use vec_perm_builder and
30131 vec_perm_indices instead of auto_vec_perm_indices.
30132 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
30133 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
30134 (vect_permute_store_chain): Likewise.
30135 (vect_grouped_load_supported): Likewise.
30136 (vect_permute_load_chain): Likewise.
30137 (vect_shift_permute_load_chain): Likewise.
30138 * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
30139 (vect_transform_slp_perm_load): Likewise.
30140 (vect_schedule_slp_instance): Likewise.
30141 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
30142 (vectorizable_mask_load_store): Likewise.
30143 (vectorizable_bswap): Likewise.
30144 (vectorizable_store): Likewise.
30145 (vectorizable_load): Likewise.
30146 * tree-vect-generic.c (lower_vec_perm): Use vec_perm_builder and
30147 vec_perm_indices instead of auto_vec_perm_indices. Use
30148 tree_to_vec_perm_builder to read the vector from a tree.
30149 * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Take a
30150 vec_perm_builder instead of a vec_perm_indices.
30151 (have_whole_vector_shift): Use vec_perm_builder and
30152 vec_perm_indices instead of auto_vec_perm_indices. Leave the
30153 truncation to calc_vec_perm_mask_for_shift.
30154 (vect_create_epilog_for_reduction): Likewise.
30155 * config/aarch64/aarch64.c (expand_vec_perm_d::perm): Change
30156 from auto_vec_perm_indices to vec_perm_indices.
30157 (aarch64_expand_vec_perm_const_1): Use rotate_inputs on d.perm
30158 instead of changing individual elements.
30159 (aarch64_vectorize_vec_perm_const): Use new_vector to install
30160 the vector in d.perm.
30161 * config/arm/arm.c (expand_vec_perm_d::perm): Change
30162 from auto_vec_perm_indices to vec_perm_indices.
30163 (arm_expand_vec_perm_const_1): Use rotate_inputs on d.perm
30164 instead of changing individual elements.
30165 (arm_vectorize_vec_perm_const): Use new_vector to install
30166 the vector in d.perm.
30167 * config/powerpcspe/powerpcspe.c (rs6000_expand_extract_even):
30168 Update vec_perm_builder constructor.
30169 (rs6000_expand_interleave): Likewise.
30170 * config/rs6000/rs6000.c (rs6000_expand_extract_even): Likewise.
30171 (rs6000_expand_interleave): Likewise.
30173 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
30175 * optabs-query.c (can_vec_perm_var_p): Check whether lowering
30176 to qimode could truncate the indices.
30177 * optabs.c (expand_vec_perm_var): Likewise.
30179 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
30181 * Makefile.in (OBJS): Add vec-perm-indices.o.
30182 * vec-perm-indices.h: New file.
30183 * vec-perm-indices.c: Likewise.
30184 * target.h (vec_perm_indices): Replace with a forward class
30186 (auto_vec_perm_indices): Move to vec-perm-indices.h.
30187 * optabs.h: Include vec-perm-indices.h.
30188 (expand_vec_perm): Delete.
30189 (selector_fits_mode_p, expand_vec_perm_var): Declare.
30190 (expand_vec_perm_const): Declare.
30191 * target.def (vec_perm_const_ok): Replace with...
30192 (vec_perm_const): ...this new hook.
30193 * doc/tm.texi.in (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Replace with...
30194 (TARGET_VECTORIZE_VEC_PERM_CONST): ...this new hook.
30195 * doc/tm.texi: Regenerate.
30196 * optabs.def (vec_perm_const): Delete.
30197 * doc/md.texi (vec_perm_const): Likewise.
30198 (vec_perm): Refer to TARGET_VECTORIZE_VEC_PERM_CONST.
30199 * expr.c (expand_expr_real_2): Use expand_vec_perm_const rather than
30200 expand_vec_perm for constant permutation vectors. Assert that
30201 the mode of variable permutation vectors is the integer equivalent
30202 of the mode that is being permuted.
30203 * optabs-query.h (selector_fits_mode_p): Declare.
30204 * optabs-query.c: Include vec-perm-indices.h.
30205 (selector_fits_mode_p): New function.
30206 (can_vec_perm_const_p): Check whether targetm.vectorize.vec_perm_const
30207 is defined, instead of checking whether the vec_perm_const_optab
30208 exists. Use targetm.vectorize.vec_perm_const instead of
30209 targetm.vectorize.vec_perm_const_ok. Check whether the indices
30210 fit in the vector mode before using a variable permute.
30211 * optabs.c (shift_amt_for_vec_perm_mask): Take a mode and a
30212 vec_perm_indices instead of an rtx.
30213 (expand_vec_perm): Replace with...
30214 (expand_vec_perm_const): ...this new function. Take the selector
30215 as a vec_perm_indices rather than an rtx. Also take the mode of
30216 the selector. Update call to shift_amt_for_vec_perm_mask.
30217 Use targetm.vectorize.vec_perm_const instead of vec_perm_const_optab.
30218 Use vec_perm_indices::new_expanded_vector to expand the original
30219 selector into bytes. Check whether the indices fit in the vector
30220 mode before using a variable permute.
30221 (expand_vec_perm_var): Make global.
30222 (expand_mult_highpart): Use expand_vec_perm_const.
30223 * fold-const.c: Includes vec-perm-indices.h.
30224 * tree-ssa-forwprop.c: Likewise.
30225 * tree-vect-data-refs.c: Likewise.
30226 * tree-vect-generic.c: Likewise.
30227 * tree-vect-loop.c: Likewise.
30228 * tree-vect-slp.c: Likewise.
30229 * tree-vect-stmts.c: Likewise.
30230 * config/aarch64/aarch64-protos.h (aarch64_expand_vec_perm_const):
30232 * config/aarch64/aarch64-simd.md (vec_perm_const<mode>): Delete.
30233 * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const)
30234 (aarch64_vectorize_vec_perm_const_ok): Fuse into...
30235 (aarch64_vectorize_vec_perm_const): ...this new function.
30236 (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
30237 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
30238 * config/arm/arm-protos.h (arm_expand_vec_perm_const): Delete.
30239 * config/arm/vec-common.md (vec_perm_const<mode>): Delete.
30240 * config/arm/arm.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
30241 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
30242 (arm_expand_vec_perm_const, arm_vectorize_vec_perm_const_ok): Merge
30244 (arm_vectorize_vec_perm_const): ...this new function. Explicitly
30245 check for NEON modes.
30246 * config/i386/i386-protos.h (ix86_expand_vec_perm_const): Delete.
30247 * config/i386/sse.md (VEC_PERM_CONST, vec_perm_const<mode>): Delete.
30248 * config/i386/i386.c (ix86_expand_vec_perm_const_1): Update comment.
30249 (ix86_expand_vec_perm_const, ix86_vectorize_vec_perm_const_ok): Merge
30251 (ix86_vectorize_vec_perm_const): ...this new function. Incorporate
30252 the old VEC_PERM_CONST conditions.
30253 * config/ia64/ia64-protos.h (ia64_expand_vec_perm_const): Delete.
30254 * config/ia64/vect.md (vec_perm_const<mode>): Delete.
30255 * config/ia64/ia64.c (ia64_expand_vec_perm_const)
30256 (ia64_vectorize_vec_perm_const_ok): Merge into...
30257 (ia64_vectorize_vec_perm_const): ...this new function.
30258 * config/mips/loongson.md (vec_perm_const<mode>): Delete.
30259 * config/mips/mips-msa.md (vec_perm_const<mode>): Delete.
30260 * config/mips/mips-ps-3d.md (vec_perm_constv2sf): Delete.
30261 * config/mips/mips-protos.h (mips_expand_vec_perm_const): Delete.
30262 * config/mips/mips.c (mips_expand_vec_perm_const)
30263 (mips_vectorize_vec_perm_const_ok): Merge into...
30264 (mips_vectorize_vec_perm_const): ...this new function.
30265 * config/powerpcspe/altivec.md (vec_perm_constv16qi): Delete.
30266 * config/powerpcspe/paired.md (vec_perm_constv2sf): Delete.
30267 * config/powerpcspe/spe.md (vec_perm_constv2si): Delete.
30268 * config/powerpcspe/vsx.md (vec_perm_const<mode>): Delete.
30269 * config/powerpcspe/powerpcspe-protos.h (altivec_expand_vec_perm_const)
30270 (rs6000_expand_vec_perm_const): Delete.
30271 * config/powerpcspe/powerpcspe.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK):
30273 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
30274 (altivec_expand_vec_perm_const_le): Take each operand individually.
30275 Operate on constant selectors rather than rtxes.
30276 (altivec_expand_vec_perm_const): Likewise. Update call to
30277 altivec_expand_vec_perm_const_le.
30278 (rs6000_expand_vec_perm_const): Delete.
30279 (rs6000_vectorize_vec_perm_const_ok): Delete.
30280 (rs6000_vectorize_vec_perm_const): New function.
30281 (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
30282 an element count and rtx array.
30283 (rs6000_expand_extract_even): Update call accordingly.
30284 (rs6000_expand_interleave): Likewise.
30285 * config/rs6000/altivec.md (vec_perm_constv16qi): Delete.
30286 * config/rs6000/paired.md (vec_perm_constv2sf): Delete.
30287 * config/rs6000/vsx.md (vec_perm_const<mode>): Delete.
30288 * config/rs6000/rs6000-protos.h (altivec_expand_vec_perm_const)
30289 (rs6000_expand_vec_perm_const): Delete.
30290 * config/rs6000/rs6000.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
30291 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
30292 (altivec_expand_vec_perm_const_le): Take each operand individually.
30293 Operate on constant selectors rather than rtxes.
30294 (altivec_expand_vec_perm_const): Likewise. Update call to
30295 altivec_expand_vec_perm_const_le.
30296 (rs6000_expand_vec_perm_const): Delete.
30297 (rs6000_vectorize_vec_perm_const_ok): Delete.
30298 (rs6000_vectorize_vec_perm_const): New function. Remove stray
30299 reference to the SPE evmerge intructions.
30300 (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
30301 an element count and rtx array.
30302 (rs6000_expand_extract_even): Update call accordingly.
30303 (rs6000_expand_interleave): Likewise.
30304 * config/sparc/sparc.md (vec_perm_constv8qi): Delete in favor of...
30305 * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): ...this
30307 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
30309 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
30311 * optabs.c (expand_vec_perm_1): Assert that SEL has an integer
30312 vector mode and that that mode matches the mode of the data
30314 (expand_vec_perm): Split handling of non-CONST_VECTOR selectors
30315 out into expand_vec_perm_var. Do all CONST_VECTOR handling here,
30316 directly using expand_vec_perm_1 when forcing selectors into
30318 (expand_vec_perm_var): New function, split out from expand_vec_perm.
30320 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
30322 * optabs-query.h (can_vec_perm_p): Delete.
30323 (can_vec_perm_var_p, can_vec_perm_const_p): Declare.
30324 * optabs-query.c (can_vec_perm_p): Split into...
30325 (can_vec_perm_var_p, can_vec_perm_const_p): ...these two functions.
30326 (can_mult_highpart_p): Use can_vec_perm_const_p to test whether a
30327 particular selector is valid.
30328 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
30329 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
30330 (vect_grouped_load_supported): Likewise.
30331 (vect_shift_permute_load_chain): Likewise.
30332 * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
30333 (vect_transform_slp_perm_load): Likewise.
30334 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
30335 (vectorizable_bswap): Likewise.
30336 (vect_gen_perm_mask_checked): Likewise.
30337 * fold-const.c (fold_ternary_loc): Likewise. Don't take
30338 implementations of variable permutation vectors into account
30339 when deciding which selector to use.
30340 * tree-vect-loop.c (have_whole_vector_shift): Don't check whether
30341 vec_perm_const_optab is supported; instead use can_vec_perm_const_p
30342 with a false third argument.
30343 * tree-vect-generic.c (lower_vec_perm): Use can_vec_perm_const_p
30344 to test whether the constant selector is valid and can_vec_perm_var_p
30345 to test whether a variable selector is valid.
30347 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
30349 * optabs-query.h (can_vec_perm_p): Take a const vec_perm_indices *.
30350 * optabs-query.c (can_vec_perm_p): Likewise.
30351 * fold-const.c (fold_vec_perm): Take a const vec_perm_indices &
30352 instead of vec_perm_indices.
30353 * tree-vectorizer.h (vect_gen_perm_mask_any): Likewise,
30354 (vect_gen_perm_mask_checked): Likewise,
30355 * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise,
30356 (vect_gen_perm_mask_checked): Likewise,
30358 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
30360 * optabs-query.h (qimode_for_vec_perm): Declare.
30361 * optabs-query.c (can_vec_perm_p): Split out qimode search to...
30362 (qimode_for_vec_perm): ...this new function.
30363 * optabs.c (expand_vec_perm): Use qimode_for_vec_perm.
30365 2018-01-02 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
30367 * rtlanal.c (canonicalize_condition): Return 0 if final rtx
30368 does not have a conditional at the top.
30370 2018-01-02 Richard Biener <rguenther@suse.de>
30372 * ipa-inline.c (big_speedup_p): Fix expression.
30374 2018-01-02 Jan Hubicka <hubicka@ucw.cz>
30377 * config/i386/x86-tune-costs.h: Increase cost of integer load costs
30380 2018-01-02 Jan Hubicka <hubicka@ucw.cz>
30384 * x86-tune-costs.h (generic_cost): Reduce cost of FDIV 20->17,
30385 cost of sqrt 20->14, DIVSS 18->13, DIVSD 32->17, SQRtSS 30->14
30386 and SQRTsD 58->18, cond_not_taken_branch_cost. 2->1. Increase
30387 cond_taken_branch_cost 3->4.
30389 2018-01-01 Jakub Jelinek <jakub@redhat.com>
30391 PR tree-optimization/83581
30392 * tree-loop-distribution.c (pass_loop_distribution::execute): Return
30393 TODO_cleanup_cfg if any changes have been made.
30395 PR middle-end/83608
30396 * expr.c (store_expr_with_bounds): Use simplify_gen_subreg instead of
30397 convert_modes if target mode has the right side, but different mode
30400 PR middle-end/83609
30401 * expr.c (expand_assignment): Fix up a typo in simplify_gen_subreg
30402 last argument when extracting from CONCAT. If either from_real or
30403 from_imag is NULL, use expansion through memory. If result is not
30404 a CONCAT and simplify_gen_subreg fails, try to simplify_gen_subreg
30405 the parts directly to inner mode, if even that fails, use expansion
30408 PR middle-end/83623
30409 * expmed.c (expand_shift_1): For 2-byte rotates by BITS_PER_UNIT,
30410 check for bswap in mode rather than HImode and use that in expand_unop
30413 Copyright (C) 2018 Free Software Foundation, Inc.
30415 Copying and distribution of this file, with or without modification,
30416 are permitted in any medium without royalty provided the copyright
30417 notice and this notice are preserved.