1 2018-11-07 Richard Biener <rguenther@suse.de>
4 * tree-streamer-in.c (lto_input_ts_block_tree_pointers): Fixup
5 BLOCK_ABSTRACT_ORIGIN to be the ultimate origin.
7 2018-11-07 Alexandre Oliva <aoliva@redhat.com>
9 PR rtl-optimization/87874
10 * lra.c (lra_substitute_pseudo): Do not create a subreg for
13 2018-11-06 Aaron Sawdey <acsawdey@linux.ibm.com>
15 * config/rs6000/rs6000.md (bswap<mode>2): Force address into register
16 if not in indexed or indirect form.
17 (bswap<mode>2_load): Change predicate to indexed_or_indirect_operand.
18 (bswap<mode>2_store): Ditto.
20 2018-11-06 Richard Earnshaw <rearnsha@arm.com>
22 * config/aarch64/aarch64.md (speculation_tracker): Set the mode for
25 2018-11-06 Richard Biener <rguenther@suse.de>
27 PR tree-optimization/86850
28 * vec.h (vec<T, va_heap, vl_ptr>::splice): Check src.length ()
31 2018-11-06 Jan Hubicka <jh@suse.cz>
33 * tree.c (fld_simplified_type_name): Break out form ...
34 (free_lang_data_in_type): ... here.
35 (fld_type_variant_equal_p): Use it.
37 2018-11-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
39 * config/default-d.c: Include memmodel.h.
41 * config/sol2-d.c: New file.
42 * config/t-sol2 (sol2-d.o): New rule.
43 * config.gcc <*-*-solaris2*>: Set d_target_objs,
46 2018-11-06 Jan Hubicka <jh@suse.cz>
48 * tree.c (fld_type_variant): Also copy alignment; be sure that
51 2018-11-06 Ilya Leoshkevich <iii@linux.ibm.com>
54 * config/s390/s390.md: Add relative_long attribute.
56 2018-11-06 Jan Hubicka <jh@suse.cz>
58 * ipa-pure-const.c (check_decl): Do not test TYPE_NEEDS_CONSTRUCTING.
59 * lto-streamer-out.c (hash_tree): Do not hash TYPE_NEEDS_CONSTRUCTING.
60 * tree-streamer-in.c (unpack_ts_type_common_value_fields): Do not
61 stream TYPE_NEEDS_CONSTRUCTING.
62 * tree-streamer-out.c (pack_ts_type_common_value_fields): Likewise.
63 * tree.c (free_lang_data_in_type): Clear TYPE_NEEDS_CONSTRUCTING.
65 2018-11-06 Richard Biener <rguenther@suse.de>
67 * tree-vect-slp.c (vect_slp_bb): Move opening of vect_slp_analyze_bb
69 (vect_slp_analyze_bb_1): ... here to avoid hiding optimized locations.
71 2018-11-06 Jozef Lawrynowicz <jozef.l@mittosystems.com>
73 * gcc/config/msp430/msp430.h (REG_CLASS_CONTENTS): Add R0 to
74 REG_CLASS_CONTENTS[GEN_REGS].
75 (REGNO_REG_CLASS): Return NO_REGS for R2 and R3.
77 2018-11-06 Jan Hubicka <jh@suse.cz>
79 * tree.c (fld_simplified_type_of): Clear TYPELESS_STORAGE flag.
81 2018-11-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
84 * config/sol2.h (ASAN_CC1_SPEC): Define.
85 (LD_WHOLE_ARCHIVE_OPTION): Define.
86 (LD_NO_WHOLE_ARCHIVE_OPTION): Define.
87 (ASAN_REJECT_SPEC): Provide default.
88 (LIBASAN_EARLY_SPEC): Define.
89 (LIBTSAN_EARLY_SPEC): Define.
90 (LIBLSAN_EARLY_SPEC): Define.
91 * config/i386/sol2.h (CC1_SPEC): Redefine.
92 (ASAN_REJECT_SPEC): Define.
94 * config/sparc/sparc.c (sparc_asan_shadow_offset): Declare.
95 (TARGET_ASAN_SHADOW_OFFSET): Define.
96 (sparc_asan_shadow_offset): New function.
97 * config/sparc/sol2.h (CC1_SPEC): Append ASAN_CC1_SPEC.
98 (ASAN_REJECT_SPEC): Define.
100 2018-11-06 Jan Hubicka <jh@suse.cz>
102 * tree.c (fld_type_variant): Copy canonical type.
103 (fld_incomplete_type_of): Check that canonical types looks sane;
105 (verify_type): Accept when incomplete type has complete canonical type.
107 2018-11-06 Jan Hubicka <jh@suse.cz>
109 * tree.c (free_lang_data): Reset overwite_assembler_name,
110 print_xnode, print_decl, print_type and print_identifier of
113 2018-11-06 Richard Biener <rguenther@suse.de>
115 PR tree-optimization/87889
116 * tree-vect-loop-manip.c (slpeel_duplicate_current_defs_from_edges):
117 Do nothing if old and new arg are the same
119 2018-11-06 Andreas Krebbel <krebbel@linux.ibm.com>
122 * config/s390/s390.md ("*r<noxa>sbg_di_rotl"): Remove mode
123 attributes for operands 3 and 4.
125 2018-11-06 Richard Biener <rguenther@suse.de>
128 * simplify-rtx.c (simplify_binary_operation_1): Add pattern
129 matching bitfield insertion.
131 2018-11-06 Alexandre Oliva <aoliva@redhat.com>
133 * auto-inc-dec.c: Include valtrack.h. Improve comments.
134 (reg_next_debug_use): New.
135 (attempt_change): Propagate adjusted expression into affected
137 (merge_in_block): Track uses in debug insns.
138 (pass_inc_dec::execute): Allocate and release
141 2018-11-06 Wei Xiao <wei3.xiao@intel.com>
143 * config/i386/avx512fintrin.h: Update VFIXUPIMM* intrinsics.
144 (_mm512_fixupimm_round_pd): Update parameters and builtin.
145 (_mm512_maskz_fixupimm_round_pd): Ditto.
146 (_mm512_fixupimm_round_ps): Ditto.
147 (_mm512_maskz_fixupimm_round_ps): Ditto.
148 (_mm_fixupimm_round_sd): Ditto.
149 (_mm_maskz_fixupimm_round_sd): Ditto.
150 (_mm_fixupimm_round_ss): Ditto.
151 (_mm_maskz_fixupimm_round_ss): Ditto.
152 (_mm512_fixupimm_pd): Ditto.
153 (_mm512_maskz_fixupimm_pd): Ditto.
154 (_mm512_fixupimm_ps): Ditto.
155 (_mm512_maskz_fixupimm_ps): Ditto.
156 (_mm_fixupimm_sd): Ditto.
157 (_mm_maskz_fixupimm_sd): Ditto.
158 (_mm_fixupimm_ss): Ditto.
159 (_mm_maskz_fixupimm_ss): Ditto.
160 (_mm512_mask_fixupimm_round_pd): Update builtin.
161 (_mm512_mask_fixupimm_round_ps): Ditto.
162 (_mm_mask_fixupimm_round_sd): Ditto.
163 (_mm_mask_fixupimm_round_ss): Ditto.
164 (_mm512_mask_fixupimm_pd): Ditto.
165 (_mm512_mask_fixupimm_ps): Ditto.
166 (_mm_mask_fixupimm_sd): Ditto.
167 (_mm_mask_fixupimm_ss): Ditto.
168 * config/i386/avx512vlintrin.h:
169 (_mm256_fixupimm_pd): Update parameters and builtin.
170 (_mm256_maskz_fixupimm_pd): Ditto.
171 (_mm256_fixupimm_ps): Ditto.
172 (_mm256_maskz_fixupimm_ps): Ditto.
173 (_mm_fixupimm_pd): Ditto.
174 (_mm_maskz_fixupimm_pd): Ditto.
175 (_mm_fixupimm_ps): Ditto.
176 (_mm_maskz_fixupimm_ps): Ditto.
177 (_mm256_mask_fixupimm_pd): Update builtin.
178 (_mm256_mask_fixupimm_ps): Ditto.
179 (_mm_mask_fixupimm_pd): Ditto.
180 (_mm_mask_fixupimm_ps): Ditto.
181 * config/i386/i386-builtin-types.def: Add new types and remove useless ones.
182 * config/i386/i386-builtin.def: Update builtin definitions.
183 * config/i386/i386.c: Handle new builtin types and remove useless ones.
184 * config/i386/sse.md: Update VFIXUPIMM* patterns.
185 (<avx512>_fixupimm<mode>_maskz<round_saeonly_expand_name>): Update.
186 (<avx512>_fixupimm<mode><sd_maskz_name><round_saeonly_name>): Update.
187 (<avx512>_fixupimm<mode>_mask<round_saeonly_name>): Update.
188 (avx512f_sfixupimm<mode>_maskz<round_saeonly_expand_name>): Update.
189 (avx512f_sfixupimm<mode><sd_maskz_name><round_saeonly_name>): Update.
190 (avx512f_sfixupimm<mode>_mask<round_saeonly_name>): Update.
191 * config/i386/subst.md:
192 (round_saeonly_sd_mask_operand4): Add new subst_attr.
193 (round_saeonly_sd_mask_op4): Ditto.
194 (round_saeonly_expand_operand5): Ditto.
195 (round_saeonly_expand): Update.
197 2018-11-05 Max Filippov <jcmvbkbc@gmail.com>
199 * config/xtensa/uclinux.h (XTENSA_ALWAYS_PIC): Change to 0.
201 2018-11-05 Segher Boessenkool <segher@kernel.crashing.org>
203 PR rtl-optimization/87871
204 * combine.c (make_more_copies): Skip if dest is frame_pointer_rtx.
206 2018-11-05 Paul Koning <ni1d@arrl.net>
208 * doc/sourcebuild.texi (target attributes): Document new "inf"
209 effective target keyword.
211 2018-11-05 Robin Dapp <rdapp@linux.ibm.com>
213 * config/s390/s390.c (s390_register_move_cost): Increase costs for
214 moves involving the CC reg.
216 2018-11-05 Richard Biener <rguenther@suse.de>
218 PR tree-optimization/87873
219 * tree-ssa-loop-manip.h (split_loop_exit_edge): Add copy_constants_p
221 * tree-ssa-loop-manip.c (split_loop_exit_edge): Likewise.
222 * tree-vect-loop.c (vect_transform_loop): When splitting the
223 loop exit also create forwarder PHIs for constants.
224 * tree-vect-loop-manip.c (slpeel_duplicate_current_defs_from_edges):
225 Handle constant to_arg, add extra checking we match up the correct
228 2018-11-05 Robin Dapp <rdapp@linux.ibm.com>
230 * config/s390/s390.md: QImode and HImode for load on condition.
232 2018-11-05 Robin Dapp <rdapp@linux.ibm.com>
234 * config/s390/predicates.md: Fix typo.
235 * config/s390/s390.md: Allow immediates for load on condition.
237 2018-11-05 Martin Liska <mliska@suse.cz>
239 * alloc-pool.h (struct pool_usage): Use SIZE_AMOUNT.
240 * bitmap.h (struct bitmap_usage): Likewise.
241 * ggc-common.c (SCALE): Remove.
243 (struct ggc_usage): Use SIZE_AMOUNT. And update
245 * ggc-page.c (SCALE): Remove.
246 (STAT_LABEL): Remove.
247 (ggc_print_statistics): Use SIZE_AMOUNT.
248 * gimple.h (SCALE): Remove.
250 * input.c (ONE_K): Remove.
253 (STAT_LABEL): Likewise.
254 (FORMAT_AMOUNT): Likewise.
255 (dump_line_table_statistics): Use SIZE_AMOUNT.
256 * mem-stats.h (struct mem_usage): Likewise.
257 * rtl.c (dump_rtx_statistics): Likewise.
258 (rtx_alloc_counts): Change type to size_t.
259 (rtx_alloc_sizes): Likewise.
260 (rtx_count_cmp): New.
261 (dump_rtx_statistics): Sort first based on counts.
262 * tree.c (tree_nodes_cmp): New.
263 (tree_codes_cmp): New.
264 (dump_tree_statistics): Sort first based on counts.
265 * system.h (ONE_K): New.
267 (SIZE_SCALE): Likewise.
268 (SIZE_LABEL): Likewise.
269 (SIZE_AMOUNT): Likewise.
270 * tree-cfg.c (dump_cfg_stats): Use SIZE_AMOUNT.
271 * tree-dfa.c (dump_dfa_stats): Likewise.
272 * tree-phinodes.c (phinodes_print_statistics): Likewise.
273 * tree-ssanames.c (ssanames_print_statistics): Likewise.
274 * tree.c (dump_tree_statistics): Likewise.
275 * vec.c (struct vec_usage): Likewise.
276 * trans-mem.c (tm_mangle): Enlarge buffer in order to not
277 trigger a -Werror=format-overflow with
278 --enable-gather-detailed-stats.
280 2018-11-05 Martin Liska <mliska@suse.cz>
282 * mem-stats.h (mem_alloc_description::release_instance_overhead):
284 * vec.c (struct vec_usage): Register m_element_size.
285 (vec_prefix::register_overhead): New arguments: elements and
287 (vec_prefix::release_overhead): Subtract elements.
288 * vec.h (struct vec_prefix): Change signature.
289 (va_heap::reserve): Pass proper arguments.
290 (va_heap::release): Likewise.
292 2018-11-05 Martin Liska <mliska@suse.cz>
294 * mem-stats.h (mem_alloc_description::get_list): Fix GNU coding
298 2018-11-05 Richard Biener <rguenther@suse.de>
300 * tree-scalar-evolution.h (final_value_replacement_loop): Update
302 * tree-scalar-evolution.c (final_value_replacement_loop): Return
303 whether anything was done.
304 (scev_const_prop): Remove constant propagation part, fold
306 * tree-ssa-loop.c (pass_scev_cprop::execute): ... here.
307 (pass_data_scev_cprop): TODO_cleanup_cfg is now done
310 2018-11-05 Jakub Jelinek <jakub@redhat.com>
312 PR tree-optimization/87859
313 * gimple-ssa-store-merging.c (struct merged_store_group): Add
314 only_constants and first_nonmergeable_order members.
315 (merged_store_group::merged_store_group): Initialize them.
316 (merged_store_group::do_merge): Clear only_constants member if
317 adding something other than INTEGER_CST store.
318 (imm_store_chain_info::coalesce_immediate_stores): Don't merge
319 stores with order >= first_nonmergeable_order. Use
320 merged_store->only_constants instead of always recomputing it.
321 Set merged_store->first_nonmergeable_order if we've skipped any
322 stores. Attempt to merge overlapping INTEGER_CST stores that
323 we would otherwise skip.
326 * match.pd (X + Y < X): Don't optimize if TYPE_OVERFLOW_SANITIZED.
328 2018-11-05 Xuepeng Guo <xuepeng.guo@intel.com>
331 * config/i386/emmintrin.h (__v16qs): New to cope with option
333 (_mm_cmpeq_epi8): Replace __v16qi with __v16qs.
334 (_mm_cmplt_epi8): Likewise.
335 (_mm_cmpgt_epi8): Likewise.
337 2018-11-05 Richard Biener <rguenther@suse.de>
339 PR rtl-optimization/87852
340 * fwprop.c (use_killed_between): Only consider single-defs of the
341 use whose definition statement dominates the use.
343 2018-11-05 Martin Liska <mliska@suse.cz>
346 * doc/invoke.texi: Remove options that are
347 not disabled with -Os.
349 2018-11-05 Martin Liska <mliska@suse.cz>
352 * doc/extend.texi: Update constrain about the last argument
353 of __builtin_expect_with_probability.
355 2018-11-05 Martin Liska <mliska@suse.cz>
358 * predict.c (expr_expected_value_1): Verify
359 that last argument is a real constants and emit
362 2018-11-05 Martin Liska <mliska@suse.cz>
364 PR gcov-profile/77698
365 * ipa-profile.c (ipa_profile): Adjust hotness threshold
368 2018-11-04 Bernd Edlinger <bernd.edlinger@hotmail.de>
370 PR tree-optimization/86572
371 * builtins.c (c_strlen): Handle negative offsets in a safe way.
373 2018-11-04 Bernd Edlinger <bernd.edlinger@hotmail.de>
375 PR tree-optimization/87672
376 * gimple-fold.c (gimple_fold_builtin_stxcpy_chk): Gimplify.
377 * tree-ssa-strlen.c (handle_builtin_strcat): Adjust object size.
379 2018-11-04 Uros Bizjak <ubizjak@gmail.com>
382 * cfgexpand.c (pass_expand::execute): Move the call to
383 finish_eh_generation in front of the call to expand_stack_alignment.
385 2018-11-04 Venkataramanan Kumar <venkataramanan.kumar@amd.com>
387 * common/config/i386/i386-common.c (processor_alias_table): Add
389 * config.gcc (i[34567]86-*-linux* | ...): Add znver2.
390 (case ${target}): Add znver2.
391 * config/i386/driver-i386.c: (host_detect_local_cpu): Let
392 -march=native recognize znver2 processors.
393 * config/i386/i386-c.c (ix86_target_macros_internal): Add znver2.
394 * config/i386/i386.c (m_znver2): New definition.
395 (m_ZNVER): New definition.
396 (m_AMD_MULTIPLE): Includes m_znver2.
397 (processor_cost_table): Add znver2 entry.
398 (processor_target_table): Add znver2 entry.
399 (get_builtin_code_for_version): Set priority for
401 (processor_model): Add M_AMDFAM17H_ZNVER2.
402 (arch_names_table): Ditto.
403 (ix86_reassociation_width): Include znver2.
404 * config/i386/i386.h (TARGET_znver2): New definition.
405 (struct ix86_size_cost): Add TARGET_ZNVER2.
406 (enum processor_type): Add PROCESSOR_ZNVER2.
407 * config/i386/i386.md (define_attr "cpu"): Add znver2.
408 * config/i386/x86-tune-costs.h: (processor_costs) Add znver2 costs.
409 * config/i386/x86-tune-sched.c: (ix86_issue_rate): Add znver2.
410 (ix86_adjust_cost): Add znver2.
411 * config/i386/x86-tune.def: Replace m_ZNVER1 by m_ZNVER.
412 * gcc/doc/extend.texi: Add details about znver2.
413 * gcc/doc/invoke.texi: Add details about znver2.
415 2018-11-03 Sandra Loosemore <sandra@codesourcery.com>
419 * config/nios2/nios2.c (nios2_rtx_costs): Recognize <mul>sidi3
422 2018-11-02 Aaron Sawdey <acsawdey@linux.ibm.com>
424 * config/rs6000/rs6000-string.c (expand_strncmp_gpr_sequence): Pay
425 attention to TARGET_AVOID_XFORM and BYTES_BIG_ENDIAN.
427 2018-11-02 Richard Earnshaw <rearnsha@arm.com>
429 * config/aarch64/aarch64.c ((aarch64_override_options): Disable
430 shrink-wrapping when -mtrack-speculation.
432 2018-11-02 Richard Biener <rguenther@suse.de>
434 * tree-ssa-coalesce.c (struct coalesce_list): Add obstack member.
435 (pop_cost_one_pair): Do not free pair.
436 (pop_best_coalesce): Likewise.
437 (create_coalesce_list): Initialize obstack.
438 (delete_coalesce_list): Free obstack.
439 (find_coalesce_pair): Obstack-allocate coalesce pairs.
440 (add_cost_one_coalesce): Likewise.
441 (struct live_track): Remove bitmap pointer indirections.
442 (new_live_track): Adjust.
443 (delete_live_track): Likewise.
444 (live_track_remove_partition): Likewise.
445 (live_track_add_partition): Likewise.
446 (live_track_live_p): Likewise.
447 (live_track_process_def): Likewise.
448 (live_track_clear_base_vars): Likewise.
450 2018-11-02 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
452 * configure.ac (gcc_cv_as_sparc_register_op): Remove.
453 * configure: Regenerate.
454 * config.in: Regenerate.
455 * config/sparc/sparc.c (sparc_output_scratch_registers): Remove
456 HAVE_AS_REGISTER_PSEUDO_OP guard.
457 * config/sparc/sparc.h (ASM_ARCH64_SPEC): Remove
458 !HAVE_AS_REGISTER_PSEUDO_OP support.
459 (ASM_DECLARE_REGISTER_GLOBAL): Remove HAVE_AS_REGISTER_PSEUDO_OP
462 2018-11-02 Richard Biener <rguenther@suse.de>
464 * dwarf2out.c (build_abbrev_table): Guard lookup_external_ref call
467 2018-11-02 Richard Biener <rguenther@suse.de>
469 PR tree-optimization/87776
470 * tree-ssa-sccvn.c (do_rpo_vn): Do not mark backedges
471 executable when iterating but running into rpo-vn-max-loop-depth
472 and not eliding the iteration.
474 2018-11-30 Jan Hubicka <jh@suse.cz>
476 * tree.c (free_lang_data_in_decl): Free TREE_TYPE and alignment of
479 2018-11-01 Aaron Sawdey <acsawdey@linux.ibm.com>
481 * config/rs6000/rs6000-protos.h (rs6000_address_for_fpconvert): Remove
483 * config/rs6000/rs6000.c (rs6000_force_indexed_or_indirect_mem):
484 Combine with rs6000_address_for_fpconvert.
485 (rs6000_address_for_fpconvert): Combine with
486 rs6000_force_indexed_or_indirect_mem.
487 (rs6000_expand_vector_init): Change function call from
488 rs6000_address_for_fpconvert to rs6000_force_indexed_or_indirect_mem.
489 * config/rs6000/rs6000.md (floatsi<mode>2_lfiwax): Change call from
490 rs6000_address_for_fpconvert to rs6000_force_indexed_or_indirect_mem.
491 (floatsi<mode>2_lfiwax_mem): Ditto.
492 (floatunssi<mode>2_lfiwzx): Ditto.
493 (floatunssi<mode>2_lfiwzx_mem): Ditto.
494 (float<QHI:mode><FP_ISA3:mode>2): Ditto.
495 (floatuns<QHI:mode><FP_ISA3:mode>2): Ditto.
496 (fix_trunc<mode>si2_stfiwx): Ditto.
497 (fixuns_trunc<mode>si2_stfiwx): Ditto.
498 (float_<mode>si2_hw): Ditto.
499 (floatuns_<mode>si2_hw): Ditto.
500 * config/rs6000/vsx.md (*vsx_extract_si): Ditto.
501 (vsx_splat_<mode>): Ditto.
503 2018-11-01 Joseph Myers <joseph@codesourcery.com>
505 * configure.ac (gcc_cv_as_ia64_ltoffx_ldxmov_relocs): Add newline
506 at end of assembler input text.
507 * configure: Regenerate.
509 2018-11-01 Jakub Jelinek <jakub@redhat.com>
511 PR tree-optimization/87826
512 * gimple-ssa-store-merging.c (do_shift_rotate): Punt if count is
513 negative or larger or equal to type's precision.
515 2018-10-31 Alexandre Oliva <aoliva@redhat.com>
517 * opts.c (default_options_table): Do not enable
518 OPT_fdelayed_branch at -Og.
519 * doc/invoke.texi (-fdelayed-branch): Document it.
521 2018-10-31 Richard Henderson <richard.henderson@linaro.org>
523 * optabs-libfuncs.c (build_libfunc_function_visibility):
524 New, split out from...
525 (build_libfunc_function): ... here.
526 (init_one_libfunc_visibility): New, split out from ...
527 (init_one_libfunc): ... here.
529 * config/aarch64/atomics.md (aarch64_atomic_<ATOMIC_LDOP><ALLI>_lse):
530 scratch register need not be early-clobber. Document the reason
531 why we cannot use ST<OP>.
533 2018-10-31 Joseph Myers <joseph@codesourcery.com>
536 * configure.ac: Remove AC_PREREQ. Use AC_LANG_SOURCE. Use single
537 line for second argument of AC_DEFINE_UNQUOTED.
538 * doc/install.texi (Tools/packages necessary for modifying GCC):
539 Update to autoconf 2.69 and automake 1.15.1.
540 * aclocal.m4, config.in, configure: Regenerate.
542 2018-10-31 Pat Haugen <pthaugen@us.ibm.com>
544 * tree-ssa-loop-ivcanon.c (try_peel_loop): Fix typo and remove dead
547 2018-10-31 Martin Liska <mliska@suse.cz>
550 * common/config/aarch64/aarch64-common.c (aarch64_parse_extension):
551 Add new argument invalid_extension.
552 (aarch64_get_all_extension_candidates): New function.
553 (aarch64_rewrite_selected_cpu): Add NULL to function call.
554 * config/aarch64/aarch64-protos.h (aarch64_parse_extension): Add
556 (aarch64_get_all_extension_candidates): New function.
557 * config/aarch64/aarch64.c (aarch64_parse_arch): Add new
558 argument invalid_extension.
559 (aarch64_parse_cpu): Likewise.
560 (aarch64_print_hint_for_extensions): New function.
561 (aarch64_validate_mcpu): Provide hint about invalid extension.
562 (aarch64_validate_march): Likewise.
563 (aarch64_handle_attr_arch): Pass new argument.
564 (aarch64_handle_attr_cpu): Provide hint about invalid extension.
565 (aarch64_handle_attr_isa_flags): Likewise.
567 2018-10-31 Richard Biener <rguenther@suse.de>
571 * tree-outof-ssa.c (insert_backedge_copies): Restrict
572 copy generation to useful cases. Place the copy before
573 the definition of the backedge value when possible.
575 2018-10-31 Claudiu Zissulescu <claziss@synopsys.com>
577 * config/arc/arc-arch.h (ARC_TUNE_ARC7XX): New tune value.
578 * config/arc/arc.c (arc_active_insn): New function.
579 (check_store_cacheline_hazard): Likewise.
580 (workaround_arc_anomaly): Use check_store_cacheline_hazard.
581 (arc_override_options): Disable delay slot scheduler for older
583 (arc_store_addr_hazard_p): New implementation, old one renamed to
585 (arc_store_addr_hazard_internal_p): Renamed.
586 (arc_reorg): Don't combine into brcc instructions which are part
587 of hardware hazard solution.
588 * config/arc/arc.md (attr tune): Consider new arc7xx tune value.
589 (tune_arc700): Likewise.
590 * config/arc/arc.opt (arc7xx): New tune value.
591 * config/arc/arc700.md: Improve A7 scheduler.
593 2018-10-31 Claudiu Zissulescu <claziss@synopsys.com>
595 * config/arc/arc.c (arc_override_options): Remove
596 TARGET_COMPACT_CASESI.
597 * config/arc/arc.h (ASM_OUTPUT_ADDR_DIFF_ELT): Update.
598 (CASE_VECTOR_MODE): Likewise.
599 (CASE_VECTOR_PC_RELATIVE): Likewise.
600 (CASE_VECTOR_SHORTEN_MODE): Likewise.
601 (CASE_VECTOR_SHORTEN_MODE1): Delete.
602 (ADDR_VEC_ALIGN): Update.
603 (ASM_OUTPUT_CASE_LABEL): Undefine.
604 (ASM_OUTPUT_BEFORE_CASE_LABEL): Undefine.
605 (TARGET_BI_BIH): Define.
606 (DEFAULT_BRANCH_INDEX): Likewise.
607 * config/arc/arc.md (casesi): Rework to accept BI/BIH
608 instructions, remove compact_casesi use case.
609 (casesi_compact_jump): Remove.
610 (casesi_dispatch): New pattern.
611 * config/arc/arc.opt: Add mbranch-index option. Deprecate
612 compact_casesi option.
613 * doc/invoke.texi: Document mbranch-index option.
615 2018-10-31 Claudiu Zissulescu <claziss@synopsys.com>
617 * config/arc/arc.c (arc_get_tp): Remove function.
618 (arc_emit_call_tls_get_addr): Likewise.
619 (arc_call_tls_get_addr): New function.
620 (arc_legitimize_tls_address): Make use of arc_call_tls_get_addr.
621 * config/arc/arc.md (tls_load_tp_soft): Remove.
622 (tls_gd_get_addr): Likewise.
624 2018-10-31 Claudiu Zissulescu <claziss@synopsys.com>
626 * config/arc/arc.md (mulsi3): Remove call to mulsi_600_lib.
627 (mulsi3_600_lib): Remove pattern.
628 (umulsi3_highpart_600_lib_le): Likewise.
629 (umulsi3_highpart): Remove call to umulsi3_highpart_600_lib_le.
630 (umulsidi3): Remove call to umulsidi3_600_lib.
631 (umulsidi3_600_lib): Remove pattern.
632 (peephole2): Remove peephole using the above deprecated patterns.
634 2018-10-31 Thomas Preud'homme <thomas.preudhomme@linaro.org>
637 * config/arm/arm.c (arm_option_check_internal): Disable the combined
638 use of -mslow-flash-data and -mword-relocations.
639 (arm_option_override): Enable -mword-relocations if -fpic or -fPIC.
640 * config/arm/arm.md (SYMBOL_REF MOVT splitter): Stop checking for
642 * doc/invoke.texi (-mword-relocations): Mention conflict with
644 (-mslow-flash-data): Reciprocally.
646 2018-10-31 Richard Henderson <richard.henderson@linaro.org>
648 * config/aarch64/aarch64.c (aarch64_hard_regno_mode_ok): Force
649 16-byte modes held in GP registers to use an even regno.
651 * config/aarch64/aarch64.c (aarch64_emit_bic): Remove.
652 (aarch64_atomic_ldop_supported_p): Remove.
653 (aarch64_gen_atomic_ldop): Remove.
654 * config/aarch64/atomic.md (atomic_<atomic_optab><ALLI>):
655 Fully expand LSE operations here.
656 (atomic_fetch_<atomic_optab><ALLI>): Likewise.
657 (atomic_<atomic_optab>_fetch<ALLI>): Likewise.
658 (aarch64_atomic_<ATOMIC_LDOP><ALLI>_lse): Drop atomic_op iterator
659 and use ATOMIC_LDOP instead; use register_operand for the input;
660 drop the split and emit insns directly.
661 (aarch64_atomic_fetch_<ATOMIC_LDOP><ALLI>_lse): Likewise.
662 (aarch64_atomic_<atomic_op>_fetch<ALLI>_lse): Remove.
663 (@aarch64_atomic_load<ATOMIC_LDOP><ALLI>): Remove.
665 * config/aarch64/aarch64.c (aarch64_emit_atomic_swap): Remove.
666 (aarch64_gen_atomic_ldop): Don't call it.
667 * config/aarch64/atomics.md (atomic_exchange<ALLI>):
668 Use aarch64_reg_or_zero.
669 (aarch64_atomic_exchange<ALLI>): Likewise.
670 (aarch64_atomic_exchange<ALLI>_lse): Remove split; remove & from
671 operand 0; use aarch64_reg_or_zero for input; merge ...
672 (@aarch64_atomic_swp<ALLI>): ... this and remove.
674 * config/aarch64/aarch64.c (aarch64_gen_compare_reg_maybe_ze): New.
675 (aarch64_split_compare_and_swap): Use it.
676 (aarch64_expand_compare_and_swap): Likewise. Remove convert_modes;
677 test oldval against the proper predicate.
678 * config/aarch64/atomics.md (@atomic_compare_and_swap<ALLI>):
679 Use nonmemory_operand for expected.
680 (cas_short_expected_pred): New.
681 (@aarch64_compare_and_swap<SHORT>): Use it; use "rn" not "rI" to match.
682 (@aarch64_compare_and_swap<GPI>): Use "rn" not "rI" for expected.
683 * config/aarch64/predicates.md (aarch64_plushi_immediate): New.
684 (aarch64_plushi_operand): New.
686 * config/aarch64/aarch64.c (aarch64_expand_compare_and_swap):
687 Force oldval into the rval register for TARGET_LSE; emit the compare
688 during initial expansion so that it may be deleted if unused.
689 (aarch64_gen_atomic_cas): Remove.
690 * config/aarch64/atomics.md (@aarch64_compare_and_swap<SHORT>_lse):
691 Change =&r to +r for operand 0; use match_dup for operand 2;
692 remove is_weak and mod_f operands as unused. Drop the split
694 (@aarch64_atomic_cas<SHORT>): ... this pattern's output; remove.
695 (@aarch64_compare_and_swap<GPI>_lse): Similarly.
696 (@aarch64_atomic_cas<GPI>): Similarly.
698 2018-10-31 Richard Biener <rguenther@suse.de>
700 * tree-eh.c (replace_trapping_overflow): Simplify ABS_EXPR case
703 2018-10-31 Sameera Deshpande <sameera.deshpande@linaro.org>
705 * config/aarch64/aarch64-cores.def (saphira): Use saphira pipeline.
706 * config/aarch64/aarch64.md: Include saphira.md
707 * config/aarch64/saphira.md: New file for pipeline description.
709 2018-10-30 Martin Sebor <msebor@redhat.com>
712 * gimple-ssa-sprintf.c (format_directive): Use %G to include
714 (sprintf_dom_walker::compute_format_length):
715 Avoid setting POSUNDER4K here.
716 (get_destination_size): Handle null argument values.
717 (get_user_idx_format): New function.
718 (sprintf_dom_walker::handle_gimple_call): Handle all printf-like
719 functions, including user-defined with attribute format printf.
720 Use %G to include inlining context.
723 2018-10-30 Jan Hubicka <jh@suse.cz>
725 * params.def (lto-partitions): Bump from 32 to 128.
727 2018-10-30 Jan Hubicka <jh@suse.cz>
730 (free_lang_data_d, add_tree_to_fld_list, fld_worklist_push): Move
732 (free_lang_data_in_type): Forward declare.
733 (fld_type_variant_equal_p): New function.
734 (fld_type_variant): New function
735 (fld_incomplete_types): New hash.
736 (fld_incomplete_type_of): New function
737 (fld_simplfied-type): New function.
738 (free_lang_data_in_decl): Add fld parameter; simplify type of FIELD_DECL
739 (free_lang_data): Allocate and free fld_incomplete_type; update call
740 of free_lang_data_in_decl.
742 2018-10-30 Eric Botcazou <ebotcazou@adacore.com>
744 * gcov.c (output_lines): Remove duplicate line.
746 2018-10-30 Aaron Sawdey <acsawdey@linux.ibm.com>
748 * config/rs6000/rs6000.md (bswapdi2): Force address into register
749 if not in indexed or indirect form.
750 (bswapdi2_load): Change predicate to indexed_or_indirect_operand.
751 (bswapdi2_store): Ditto.
752 * config/rs6000/rs6000.c (rs6000_force_indexed_or_indirect_mem): New
754 * config/rs6000/rs6000-protos.h (rs6000_force_indexed_or_indirect_mem):
755 Prototype for helper function.
757 2018-10-30 Martin Sebor <msebor@redhat.com>
759 * doc/extend.texi (optimize): Clarify/expand attribute documentation.
760 (target, pragma GCC optimize, pragma GCC target): Ditto.
762 2018-10-30 Jonathan Wakely <jwakely@redhat.com>
764 * doc/extend.texi: Fix prototype and description of
765 __builtin_expect_with_probability.
767 2018-10-30 Michael Ploujnikov <michael.ploujnikov@oracle.com>
769 * cgraph.h (clone_function_name_1): Replaced by new
770 clone_function_name_numbered that takes name as string; for
771 privatize_symbol_name_1 use only.
772 (clone_function_name): Renamed to
773 clone_function_name_numbered to be explicit about numbering.
774 (clone_function_name): New two-argument function that does
775 not number its output.
776 (clone_function_name): New three-argument function that
777 takes a number to append to its output.
778 * cgraphclones.c (duplicate_thunk_for_node):
779 (clone_function_name_1): Renamed.
780 (clone_function_name_numbered): Two new functions.
781 (clone_function_name): Improved documentation.
782 (cgraph_node::create_virtual_clone): Use clone_function_name_numbered.
783 * config/rs6000/rs6000.c (make_resolver_func): Ditto.
784 * final.c (final_scan_insn_1): Use the new clone_function_name
786 * multiple_target.c (create_dispatcher_calls): Ditto.
787 (create_target_clone): Ditto.
788 * omp-expand.c (grid_expand_target_grid_body): Ditto.
789 * omp-low.c (create_omp_child_function_name): Ditto.
790 * omp-simd-clone.c (simd_clone_create): Ditto.
791 * symtab.c (simd_symtab_node::noninterposable_alias): Use the
792 new clone_function_name without numbering.
794 2018-10-30 Richard Earnshaw <rearnsha@arm.com>
796 * alloc-pool.h (base_pool_allocator <TBlockAllocator>::initialize):
797 Assert that the allocation size is not zero.
799 2018-10-30 Richard Biener <rguenther@suse.de>
801 PR tree-optimization/87800
802 * tree-vect-slp.c (vect_build_slp_tree_2): Reject any
803 non-induction or reduction PHIs.
805 2018-10-30 Sameera Deshpande <sameera.deshpande@linaro.org
807 * config/aarch64/falkor-tag-collision-avoidance.c
808 (execute_tag_collision_avoidance): Call df_note_add_problem.
810 2018-10-30 Martin Liska <mliska@suse.cz>
812 * doc/extend.texi: Fix typo in documentation
813 of __builtin_expect_with_probability.
815 2018-10-29 David Malcolm <dmalcolm@redhat.com>
818 * input.c (get_substring_ranges_for_loc): Detect if
819 linemap_resolve_location gives us a NULL map, and reject
822 2018-10-29 Iain Buclaw <ibuclaw@gdcproject.org>
824 * config.gcc (xstormy16-*-elf): Set tm_d_file.
826 2018-10-29 David Malcolm <dmalcolm@redhat.com>
827 Martin Sebor <msebor@redhat.com>
828 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
830 * doc/ux.texi (Quoting): New subsection, adapted from material at
831 https://gcc.gnu.org/wiki/DiagnosticsGuidelines written by
832 MartinSebor and ManuelLopezIbanez.
833 (Fix-it hints): Note that fix-it hints shouldn't be marked for
836 2018-10-29 Kugan Vivekanandarajah <kuganv@linaro.org>
839 * tree-ssa-loop-niter.c (number_of_iterations_popcount): Fix niter
842 2018-10-29 Paul A. Clarke <pc@us.ibm.com>
844 * gcc.target/powerpc/ssse3-check.h: Remove inaccurate comment.
846 2018-10-29 Paul Koning <ni1d@arrl.net>
848 * doc/rtl.texi (CONST_WIDE_INT_ELT): Give correct macro name.
850 2018-10-29 Paul A. Clarke <pc@us.ibm.com>
852 * gcc/config/rs6000/mmintrin.h (_mm_packs_pi16, _mm_packs_pi32,
853 _mm_packs_pu16, _mm_unpackhi_pi8, _mm_unpacklo_pi8, _mm_add_pi8,
854 _mm_add_pi16, _mm_add_pi32, _mm_sub_pi8, _mm_sub_pi16, _mm_sub_pi32,
855 _mm_cmpgt_pi8, _mm_cmpeq_pi16, _mm_cmpgt_pi16, _mm_cmpeq_pi32,
856 _mm_cmpgt_pi32, _mm_adds_pi8, _mm_adds_pi16, _mm_adds_pu8,
857 _mm_adds_pu16, _mm_subs_pi8, _mm_subs_pi16, _mm_subs_pu8,
858 _mm_subs_pu16, _mm_madd_pi16, _mm_mulhi_pi16, _mm_mullo_pi16,
859 _mm_sll_pi16, _mm_sra_pi16, _mm_srl_pi16, _mm_set1_pi16, _mm_set1_pi8):
860 Change 'vector' to '__vector'.
861 * gcc/config/rs6000/xmmintrin.h (_mm_cvtps_pi32, _mm_cvttps_pi32,
862 _mm_cvtps_pi16, _mm_cvtps_pi8, _mm_max_pi16, _mm_max_pu8, _mm_min_pi16,
863 _mm_min_pu8, _mm_mulhi_pu16, _mm_shuffle_pi16, _mm_avg_pu8,
864 _mm_avg_pu16): Likewise. And, whitespace corrections.
866 2018-10-29 Richard Biener <rguenther@suse.de>
868 PR tree-optimization/87785
869 * tree-vect-slp.c (vect_gather_slp_loads): Only gather
872 2018-10-29 Olivier Hainque <hainque@adacore.com>
874 * VXWORKS_NET_LIBS_RTP: New macro, network part of VXWORKS_LIBS_RTP.
876 2018-10-29 Olivier Hainque <hainque@adacore.com>
878 * config/vxworks.h (VXWORKS_PERSONALITY): New VxWorks
879 ports configuration macro, defaults to "gnu".
880 (VXWORKS_OS_CPP_BUILTINS): Use it. Feed TOOL and
881 TOOL_FAMILY instead of _VX_TOOL/_VXTOOL_FAMILY.
883 2018-10-29 Olivier Hainque <hainque@adacore.com>
885 * config/vxworks.h (CLEAR_INSN_CACHE): #undef before #define.
887 2018-10-29 Richard Biener <rguenther@suse.de>
889 PR tree-optimization/87790
890 * tree-vect-slp.c (vect_mark_slp_stmts): Simplify.
891 (vect_make_slp_decision): Adjust.
892 (vect_slp_analyze_bb_1): Likewise.
893 (vect_detect_hybrid_slp_stmts): Properly union SLP type over
896 2018-10-29 Richard Biener <rguenther@suse.de>
898 PR tree-optimization/87785
899 * tree-vect-slp.c (vect_build_slp_tree_2): Remove loads argument
901 (vect_build_slp_tree): Likewise.
902 (vect_gather_slp_loads): New function.
903 (vect_analyze_slp_instance): Gather loads separately from the
906 2018-10-29 Martin Liska <mliska@suse.cz>
908 * Makefile.in: Make dependency to json.o.
909 * doc/gcov.texi: Document new JSON format, remove
910 old intermediate format documentation.
911 * gcov.c (struct function_info): Come up with m_name and
913 (function_info::function_info): Initialize it.
914 (function_info::~function_info): Release it.
915 (main): Rename flag_intermediate_format to flag_json_format.
916 (print_usage): Describe --json-format.
917 (process_args): Set flag_json_format.
918 (output_intermediate_line): Remove.
919 (output_intermediate_json_line): Likewise.
920 (get_gcov_intermediate_filename): Return new extension
922 (output_intermediate_file): Implement JSON emission.
923 (output_json_intermediate_file): Implement JSON emission.
924 (generate_results): Use ::get_name for function name.
925 Handle JSON output file.
926 (read_graph_file): Use ::get_name instead of cplus_demangle.
927 (read_count_file): Likewise.
928 (solve_flow_graph): Likewise.
929 (add_line_counts): Likewise.
930 (accumulate_line_counts): Use new flag_json_format.
931 (output_function_details): Use ::get_name instead of cplus_demangle.
932 (output_lines): Likewise.
933 * json.cc (test_writing_literals): Add new tests.
934 * json.h (class literal): Add new boolean constructor.
936 2018-10-29 Segher Boessenkool <segher@kernel.crashing.org>
938 PR rtl-optimization/87701
939 PR rtl-optimization/87780
940 * combine.c (make_more_copies): Rewrite.
942 2018-10-28 Kugan Vivekanandarajah <kuganv@linaro.org>
944 * doc/generic.texi (ABSU_EXPR): Document.
945 * match.pd (absu(x)*absu(x) -> x*x): Handle.
946 (absu(absu(X)) -> absu(X)): Likewise.
947 (absu(-X) -> absu(X)): Likewise.
948 (absu(X) where X is nonnegative -> X): Likewise.
950 2018-10-28 Iain Buclaw <ibuclaw@gdcproject.org>
952 * Makefile.in (tm_d_file_list, tm_d_include_list): New variables.
953 (TM_D_H, D_TARGET_DEF, D_TARGET_H, D_TARGET_OBJS): New variables.
954 (tm_d.h, cs-tm_d.h, default-d.o): New rules.
955 (d/d-target-hooks-def.h, s-d-target-hooks-def-h): New rules.
956 (s-tm-texi): Also check timestamp on d-target.def.
957 (generated_files): Add TM_D_H and d-target-hooks-def.h.
958 (build/genhooks.o): Also depend on D_TARGET_DEF.
959 * config.gcc (tm_d_file, d_target_objs, target_has_targetdm): New
961 * config/aarch64/aarch64-d.c: New file.
962 * config/aarch64/aarch64-linux.h (GNU_USER_TARGET_D_CRITSEC_SIZE):
964 * config/aarch64/aarch64-protos.h (aarch64_d_target_versions): New
966 * config/aarch64/aarch64.h (TARGET_D_CPU_VERSIONS): Define.
967 * config/aarch64/t-aarch64 (aarch64-d.o): New rule.
968 * config/arm/arm-d.c: New file.
969 * config/arm/arm-protos.h (arm_d_target_versions): New prototype.
970 * config/arm/arm.h (TARGET_D_CPU_VERSIONS): Define.
971 * config/arm/linux-eabi.h (EXTRA_TARGET_D_OS_VERSIONS): Define.
972 * config/arm/t-arm (arm-d.o): New rule.
973 * config/default-d.c: New file.
974 * config/glibc-d.c: New file.
975 * config/gnu.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
976 * config/i386/i386-d.c: New file.
977 * config/i386/i386-protos.h (ix86_d_target_versions): New prototype.
978 * config/i386/i386.h (TARGET_D_CPU_VERSIONS): Define.
979 * config/i386/linux-common.h (EXTRA_TARGET_D_OS_VERSIONS): Define.
980 (GNU_USER_TARGET_D_CRITSEC_SIZE): Define.
981 * config/i386/t-i386 (i386-d.o): New rule.
982 * config/kfreebsd-gnu.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
983 * config/kopensolaris-gnu.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
984 * config/linux-android.h (ANDROID_TARGET_D_OS_VERSIONS): Define.
985 * config/linux.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
986 * config/mips/linux-common.h (EXTRA_TARGET_D_OS_VERSIONS): Define.
987 * config/mips/mips-d.c: New file.
988 * config/mips/mips-protos.h (mips_d_target_versions): New prototype.
989 * config/mips/mips.h (TARGET_D_CPU_VERSIONS): Define.
990 * config/mips/t-mips (mips-d.o): New rule.
991 * config/powerpcspe/linux.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
992 * config/powerpcspe/linux64.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
993 * config/powerpcspe/powerpcspe-d.c: New file.
994 * config/powerpcspe/powerpcspe-protos.h (rs6000_d_target_versions):
996 * config/powerpcspe/powerpcspe.c (rs6000_output_function_epilogue):
997 Support GNU D by using 0 as the language type.
998 * config/powerpcspe/powerpcspe.h (TARGET_D_CPU_VERSIONS): Define.
999 * config/powerpcspe/t-powerpcspe (powerpcspe-d.o): New rule.
1000 * config/riscv/riscv-d.c: New file.
1001 * config/riscv/riscv-protos.h (riscv_d_target_versions): New
1003 * config/riscv/riscv.h (TARGET_D_CPU_VERSIONS): Define.
1004 * config/riscv/t-riscv (riscv-d.o): New rule.
1005 * config/rs6000/linux.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
1006 * config/rs6000/linux64.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
1007 * config/rs6000/rs6000-d.c: New file.
1008 * config/rs6000/rs6000-protos.h (rs6000_d_target_versions): New
1010 * config/rs6000/rs6000.c (rs6000_output_function_epilogue):
1011 Support GNU D by using 0 as the language type.
1012 * config/rs6000/rs6000.h (TARGET_D_CPU_VERSIONS): Define.
1013 * config/rs6000/t-rs6000 (rs6000-d.o): New rule.
1014 * config/s390/s390-d.c: New file.
1015 * config/s390/s390-protos.h (s390_d_target_versions): New prototype.
1016 * config/s390/s390.h (TARGET_D_CPU_VERSIONS): Define.
1017 * config/s390/t-s390 (s390-d.o): New rule.
1018 * config/sparc/sparc-d.c: New file.
1019 * config/sparc/sparc-protos.h (sparc_d_target_versions): New
1021 * config/sparc/sparc.h (TARGET_D_CPU_VERSIONS): Define.
1022 * config/sparc/t-sparc (sparc-d.o): New rule.
1023 * config/t-glibc (glibc-d.o): New rule.
1024 * configure: Regenerated.
1025 * configure.ac (tm_d_file): New variable.
1026 (tm_d_file_list, tm_d_include_list, d_target_objs): Add substitutes.
1027 * doc/contrib.texi (Contributors): Add self for the D frontend.
1028 * doc/frontends.texi (G++ and GCC): Mention D as a supported language.
1029 * doc/install.texi (Configuration): Mention libphobos as an option for
1030 --enable-shared. Mention d as an option for --enable-languages.
1031 (Testing): Mention check-d as a target.
1032 * doc/invoke.texi (Overall Options): Mention .d, .dd, and .di as file
1033 name suffixes. Mention d as a -x option.
1034 * doc/sourcebuild.texi (Top Level): Mention libphobos.
1035 * doc/standards.texi (Standards): Add section on D language.
1036 * doc/tm.texi: Regenerated.
1037 * doc/tm.texi.in: Add @node for D language and ABI, and @hook for
1038 TARGET_CPU_VERSIONS, TARGET_D_OS_VERSIONS, and TARGET_D_CRITSEC_SIZE.
1039 * dwarf2out.c (is_dlang): New function.
1040 (gen_compile_unit_die): Use DW_LANG_D for D.
1041 (declare_in_namespace): Return module die for D, instead of adding
1042 extra declarations into the namespace.
1043 (gen_namespace_die): Generate DW_TAG_module for D.
1044 (gen_decl_die): Handle CONST_DECLSs for D.
1045 (dwarf2out_decl): Likewise.
1046 (prune_unused_types_walk_local_classes): Handle DW_tag_interface_type.
1047 (prune_unused_types_walk): Handle DW_tag_interface_type same as other
1048 kinds of aggregates.
1049 * gcc.c (default_compilers): Add entries for .d, .dd and .di.
1050 * genhooks.c: Include d/d-target.def.
1052 2018-10-28 Iain Sandoe <iain@sandoe.co.uk>
1055 * config/rs6000/darwin.h (STACK_BOUNDARY): New.
1056 (RS6000_STARTING_FRAME_OFFSET): Adjust to preserve 16byte alignment.
1057 (STACK_DYNAMIC_OFFSET): Likewise.
1059 2018-10-27 Sandra Loosemore <sandra@codesourcery.com>
1062 * config/nios2/nios2.c (nios2_valid_target_attribute_rec): Fix
1065 2018-10-26 Tulio Magno Quites Machado Filho <tuliom@linux.ibm.com>
1067 * doc/extend.texi (PowerPC builtins): Fix __builtin_unpack_ibm128
1068 return type and other typos.
1070 2018-10-26 Aaron Sawdey <acsawdey@linux.ibm.com>
1072 * config/rs6000/rs6000-string.c (expand_strncmp_gpr_sequence): Change to
1073 a shorter sequence with fewer branches.
1074 (emit_final_str_compare_gpr): Ditto.
1076 2018-10-26 Paul A. Clarke <pc@us.ibm.com>
1078 * config/rs6000/tmmintrin.h: New file.
1079 * config.gcc (powerpc*-*-*): Add tmmintrin.h to extra_headers.
1081 2018-10-26 Paul A. Clarke <pc@us.ibm.com>
1083 * config/rs6000/mmintrin.h: Enable 32bit compilation.
1084 * config/rs6000/xmmintrin.h: Likewise.
1086 2018-10-26 Paul A. Clarke <pc@us.ibm.com>
1088 * config/rs6000/xmmintrin.h (_mm_extract_pi16): Fix for big-endian.
1090 2018-10-26 Richard Biener <rguenther@suse.de>
1092 * tree-vect-slp.c (vect_mark_slp_stmts): Add visited hash_set
1094 (vect_mark_slp_stmts_relevant): Likewise.
1095 (vect_detect_hybrid_slp_stmts): Likewise.
1096 (vect_bb_slp_scalar_cost): Likewise.
1097 (vect_remove_slp_scalar_calls): Likewise.
1099 2018-10-26 Jan Hubicka <jh@suse.cz>
1101 * ipa-devirt.c (odr_subtypes_equivalent_p): Fix recursion.
1102 (warn_types_mismatch): Fix walk of DECL_NAME.
1103 (odr_types_equivalent_p): Fix overactive assert.
1105 2018-10-26 Richard Biener <rguenther@suse.de>
1107 PR tree-optimization/87105
1108 * tree-vectorizer.h (_slp_tree::refcnt): New member.
1109 * tree-vect-slp.c (vect_free_slp_tree): Decrement and honor
1111 (vect_create_new_slp_node): Initialize refcnt to one.
1113 (scalar_stmts_set_t, bst_fail): Remove.
1114 (vect_build_slp_tree_2): Add bst_map argument and adjust calls.
1115 (vect_build_slp_tree): Add bst_map argument and lookup
1116 already created SLP nodes.
1117 (vect_print_slp_tree): Handle a SLP graph, print SLP node
1119 (vect_slp_rearrange_stmts): Handle a SLP graph.
1120 (vect_analyze_slp_instance): Adjust and free SLP nodes from
1121 the CSE map. Fix indenting.
1122 (vect_schedule_slp_instance): Add short-cut.
1124 2018-10-26 Martin Liska <mliska@suse.cz>
1127 * ipa-prop.c (struct ipa_vr_ggc_hash_traits): Hash with
1128 addr_expr and not with pointers.
1130 2018-10-26 Jan Hubicka <jh@suse.cz>
1132 * tree.c (free_lang_data_in_type): Only check main variants.
1133 * ipa-devirt.c (warn_odr): Make static.
1134 (types_same_for_odr): Drop strict variant.
1135 (types_odr_comparable): Likewise.
1136 (odr_or_derived_type_p): Look for main variants.
1137 (odr_name_hasher::equal): Cleanup comment.
1138 (odr_subtypes_equivalent): Add warn and warned arguments; check main
1140 (type_variants_equivalent_p): break out from ...
1141 (odr_types_equivalent): ... here; go for main variants where needed.
1142 (warn_odr): ... here; turn static.
1143 (warn_types_mismatch): Compare mangled names of main variants.
1144 * ipa-utils.h (types_odr_comparable): Drop strict parameter.
1145 (type_with_linkage_p): Sanity check that we look at main variant.
1146 * lto.c (lto_read_decls): Only consider main variant to be ODR type.
1147 * tree.h (types_same_for_odr): Drop strict argument.
1149 2018-10-26 Richard Biener <rguenther@suse.de>
1151 PR tree-optimization/87746
1152 * tree-vect-data-refs.c (vect_update_misalignment_for_peel):
1153 Simplify and fix WRT strided store groups with size not
1154 equal to step in element count.
1155 (vect_analyze_group_access_1): Dump the whole group.
1157 2018-10-25 Carl Love <cel@us.ibm.com>
1159 * config/rs6000/rs6000-c.c (P9V_BUILTIN_VEC_VSCEDPGT,
1160 P9V_BUILTIN_VEC_VSCEDPLT, P9V_BUILTIN_VEC_VSCEDPEQ,
1161 P9V_BUILTIN_VEC_VSCEDPUO): Rename base overloaded name. Add quad
1162 precicion entry for each overloaded builtin.
1163 * config/rs6000/rs6000-builtin.def (VSCEDPGT, VSCEDPLT, VSCEDPEQ,
1164 VSCEDPUO): Rename overloaded name.
1165 (VSCEDPGT, VSCEQPGT, VSCEDPLT, VSCEQPLT, VSCEDPEQ, VSCEQPEQ,
1166 VSCEDPUO, VSCEQPUO): Add defitions for overloaded builtins.
1167 * config/rs6000/vsx.md (xscmpexpqp_<code>_<mode>): Add
1168 define_expand for xscmpexqp instruction.
1169 (*xscmpexpqp): Add define_insn for the xscmpexqp instruction.
1171 2018-10-25 Bill Schmidt <wschmidt@linux.ibm.com>
1172 Jinsong Ji <jji@us.ibm.com>
1174 * config/rs6000/emmintrin.h (_mm_slli_epi16): Replace deprecated
1175 function with vec_sl.
1176 (_mm_slli_epi32): Likewise.
1177 (_mm_slli_epi64): Likewise.
1178 (_mm_srai_epi16): Replace deprecated function with vec_sra.
1179 (_mm_srai_epi32): Likewise.
1180 (_mm_srli_epi16): Replace deprecated function with vec_sr.
1181 (_mm_srli_epi32): Likewise.
1182 (_mm_srli_epi64): Likewise.
1183 (_mm_sll_epi16): Replace deprecated function with vec_sl.
1184 (_mm_sll_epi32): Likewise.
1185 (_mm_sll_epi64): Likewise.
1186 (_mm_sra_epi16): Replace deprecated function with vec_sra.
1187 (_mm_sra_epi32): Likewise.
1188 (_mm_srl_epi16): Replace deprecated function with vec_sr.
1189 (_mm_srl_epi32): Likewise.
1190 (_mm_srl_epi64): Likewise.
1192 2018-10-25 Bill Schmidt <wschmidt@linux.ibm.com>
1193 Jinsong Ji <jji@us.ibm.com>
1195 * gcc/config/rs6000/emmintrin.h (_mm_sll_epi16): Replace
1196 comparison operators with vec_cmp* for compatibility due to
1197 unfortunate history; clean up formatting and use types more
1199 (_mm_sll_epi32): Likewise.
1200 (_mm_sll_epi64): Likewise.
1201 (_mm_srl_epi16): Likewise.
1202 (_mm_srl_epi32): Likewise.
1203 (_mm_srl_epi64): Likewise.
1205 2018-10-25 Bill Schmidt <wschmidt@linux.ibm.com>
1206 Jinsong Ji <jji@us.ibm.com>
1208 * config/rs6000/emmintrin.h (_mm_sll_epi64): Remove wrong cast.
1209 * config/rs6000/xmmintrin.h (_mm_min_ps): Change m's type to
1210 __vector __bool int. Use vec_cmpgt in preference to deprecated
1211 function vec_vcmpgtfp.
1212 (_mm_max_ps): Likewise.
1214 2018-10-25 Jeff Law <law@redhat.com>
1216 * config/rl78/rl78.c (insn_ok_now): Always re-recognize the insn
1219 2018-10-25 Martin Sebor <msebor@redhat.com>
1221 * doc/extend.texi (aligned): Expand attribute description.
1222 (Alignment): Rename section. Discuss function arguments.
1224 2018-10-25 Jan Hubicka <jh@suse.cz>
1226 * ipa-devirt.c (main_odr_variant): Remove.
1227 (hash_odr_name, types_same_for_odr, types_odr_comparable,
1228 odr_name_hasher::equal, odr_subtypes_equivalent_p):
1229 Drop use of main_odr_variant.
1230 (add_type_duplicate): Silence confused warnings on integer types.
1231 (get_odr_type): Always look for main variant.
1232 (register_odr_type): Simplify.
1234 2018-10-25 Richard Biener <rguenther@suse.de>
1236 * tree-vect-data-refs.c (vect_analyze_data_ref_accesses):
1237 Initialize ng to silence error with release checking bootstrap.
1239 2018-10-25 Richard Biener <rguenther@suse.de>
1241 * tree-if-conv.c: Include tree-ssa-sccvn.h.
1242 (tree_if_conversion): Run CSE on the if-converted loop body.
1244 2018-10-25 Ilya Leoshkevich <iii@linux.ibm.com>
1246 * config/s390/constraints.md (ZL): New constraint.
1247 * config/s390/s390.c (legitimate_pic_operand_p): Accept LARL
1249 * config/s390/s390.md (movdi_larl): Remove.
1250 (movdi_64): Add the LARL alternative.
1252 2018-10-25 Ilya Leoshkevich <iii@linux.ibm.com>
1255 * rtl.c (RTX_CODE_HWINT_P_1): New helper macro.
1256 (RTX_CODE_HWINT_P): New macro.
1257 (rtx_code_size): Use RTX_CODE_HWINT_P ().
1259 2018-10-25 Jan Hubicka <jh@suse.cz>
1261 * ipa-devirt.c (odr_types_equivalent_p): Do not ICE if one of types
1264 2018-10-25 Richard Biener <rguenther@suse.de>
1266 PR tree-optimization/87665
1267 PR tree-optimization/87745
1268 * tree-vectorizer.h (get_earlier_stmt): Remove.
1269 (get_later_stmt): Pick up UID from the original non-pattern stmt.
1271 2018-10-25 Sam Tebbs <sam.tebbs@arm.com>
1273 * options.texi (Deprecated): Move list to Var section.
1275 2018-10-24 Bill Schmidt <wschmidt@linux.ibm.com>
1276 Jinsong Ji <jji@us.ibm.com>
1278 * config/rs6000/emmintrin.h (_mm_cvtpd_epi32): Change deprecated
1279 __vector long to __vector long long.
1280 (_mm_cvtpd_ps): Likewise.
1281 (_mm_cvttpd_epi32): Likewise.
1282 (_mm_cvtpi32_pd): Likewise.
1283 (_mm_unpackhi_epi64): Likewise.
1284 (_mm_unpacklo_epi64): Likewise.
1286 2018-10-24 Segher Boessenkool <segher@kernel.crashing.org>
1288 PR rtl-optimization/87720
1289 * combine.c (make_more_copies): Skip if the dest is pc_rtx.
1291 2018-10-24 Alexandre Oliva <aoliva@redhat.com>
1293 * gimple-ssa-isolate-paths.c
1294 (find_implicit_erroneous_behavior): Do not change code if the
1295 pass is running for warnings only.
1296 (find_explicit_erroneous_behavior): Likewise.
1298 2018-10-24 Michael Meissner <meissner@linux.ibm.com>
1300 * config/rs6000/rs6000.c (TARGET_MANGLE_DECL_ASSEMBLER_NAME):
1301 Define as rs6000_mangle_decl_assembler_name.
1302 (rs6000_mangle_decl_assembler_name): If the user switched from IBM
1303 long double to IEEE long double, switch the names of the long
1304 double built-in functions to be <func>f128 instead of <func>l.
1306 2018-10-24 Martin Sebor <msebor@redhat.com>
1308 * doc/extend.texi (nonnull): List no-argument form. Reference
1309 -fno-delete-null-pointer-checks and -fisolate-erroneous-paths-attribute.
1311 2018-10-24 Richard Biener <rguenther@suse.de>
1313 * tree-ssa-sccvn.c (do_rpo_vn): Free rpo_state.
1315 2018-10-24 Martin Liska <mliska@suse.cz>
1317 PR tree-optimization/84436
1318 * tree-switch-conversion.c (switch_conversion::contains_same_values_p):
1320 (switch_conversion::contains_linear_function_p): New.
1321 (switch_conversion::build_one_array): Support linear
1322 transformation on input.
1323 * tree-switch-conversion.h (struct switch_conversion): Add
1324 contains_linear_function_p declaration.
1326 2018-10-24 Richard Biener <rguenther@suse.de>
1328 * varasm.c (const_hash_1): Return hash of ADDR_EXPR
1329 if its argument is CONSTANT_CLASS_P.
1331 2018-10-11 Jan Hubicka <hubicka@ucw.cz>
1333 * ipa-utils.h (type_with_linkage_p): No longer check for TYPE_STUB_DECL;
1334 it is wrong for forward declarations.
1336 2018-10-24 Ilya Leoshkevich <iii@linux.ibm.com>
1338 * config/s390/s390.c (s390_check_qrst_address): Add the missing
1339 SYMBOL_REF_P () check.
1341 2018-10-24 Richard Biener <rguenther@suse.de>
1343 PR tree-optimization/87105
1344 * tree-vect-data-refs.c (vect_analyze_group_access_1): Adjust
1345 dump classification.
1346 (vect_analyze_data_ref_accesses): Handle duplicate loads and
1347 stores by splitting the affected group after the fact.
1348 * tree-vect-slp.c (vect_build_slp_tree_2): Dump when we
1349 fail the SLP build because of size constraints.
1351 2018-10-24 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1353 * configure.ac (gcc_cv_ld_aligned_shf_merge): New test.
1354 * configure: Regenerate.
1355 * config.in: Regenerate.
1356 * varasm.c (mergeable_string_section): Use readonly_data_section
1357 if linker doesn't support SHF_MERGE with alignment > 8.
1358 (mergeable_constant_section): Likewise.
1360 2018-10-24 Richard Biener <rguenther@suse.de>
1362 PR tree-optimization/84013
1363 * tree-ssa-structalias.c (struct msdi_data): New struct for
1364 marshalling data to walk_stmt_load_store_ops.
1365 (maybe_set_dependence_info): Refactor as callback for
1366 walk_stmt_load_store_ops.
1367 (compute_dependence_clique): Set restrict info on all stmt kinds.
1369 2018-10-24 Martin Liska <mliska@suse.cz>
1371 * cgraph.c (cgraph_node::dump):
1372 Remove reduntant dumps and make tp_first_run dump more compact.
1374 2018-10-24 Richard Biener <rguenther@suse.de>
1376 PR tree-optimization/87665
1377 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Adjust
1380 2018-10-12 Jeff Law <law@redhat.com>
1382 * config/h8300/h8300.c (h8300_expand_prologue): Fix stm generation
1385 2018-10-23 Richard Biener <rguenther@suse.de>
1387 * tree-vrp.c (add_assert_info): Guard dump_printf with
1389 * gimple-ssa-evrp-analyze.c
1390 (evrp_range_analyzer::record_ranges_from_incoming_edge):
1391 Use value_range::ignore_equivs_equal_p.
1393 2018-10-23 Richard Biener <rguenther@suse.de>
1395 PR tree-optimization/87105
1396 PR tree-optimization/87608
1397 * passes.def (pass_all_early_optimizations): Add early phi-opt
1399 * tree-ssa-phiopt.c (value_replacement): Ignore NOPs and predicts in
1400 addition to debug stmts.
1401 (tree_ssa_phiopt_worker): Add early_p argument, do only min/max
1402 and abs replacement early.
1403 * tree-cfg.c (gimple_empty_block_p): Likewise.
1405 2018-10-23 Richard Earnshaw <rearnsha@arm.com>
1408 * config.gcc (arm*-*-netbsdelf*): Default to StrongARM if no CPU
1409 specified to configure.
1410 (arm*-*-*): Use ARM7TDMI as the target CPU if no default provided.
1412 2018-10-23 Richard Biener <rguenther@suse.de>
1414 PR tree-optimization/87700
1415 * tree-ssa-copy.c (set_copy_of_val): Fix change detection logic.
1417 2018-10-23 Jakub Jelinek <jakub@redhat.com>
1420 * config/i386/avx512vlintrin.h (_mm_mask_mullo_epi32): Change type of
1421 second argument from __mmask16 to __mmask8.
1422 * config/i386/avx512vlbwintrin.h (_mm_mask_packus_epi32,
1423 _mm_mask_packs_epi32): Likewise.
1424 * config/i386/avx512pfintrin.h (_mm512_mask_prefetch_i64scatter_ps):
1426 (_mm512_mask_prefetch_i64scatter_pd): Likewise. Formatting fix.
1428 2018-10-23 Richard Biener <rguenther@suse.de>
1430 * tree-vect-stmts.c (vect_analyze_stmt): Fix typo in comment.
1432 2018-10-23 Richard Biener <rguenther@suse.de>
1434 PR tree-optimization/86144
1435 * tree-vect-stmts.c (vect_analyze_stmt): Prefer -mveclibabi
1436 over simd attribute.
1438 2018-10-23 Richard Biener <rguenther@suse.de>
1440 PR tree-optimization/87693
1441 * tree-ssa-threadedge.c (thread_around_empty_blocks): Handle
1442 the case we do not find the taken edge.
1444 2018-10-22 Bill Schmidt <wschmidt@linux.ibm.com>
1445 Jinsong Ji <jji@us.ibm.com>
1447 * config/rs6000/emmintrin.h (_MM_SHUFFLE2): Comment cleanup.
1448 (_mm_store_pd): Use unaligned vector type for pointer cast.
1449 (_mm_maskmoveu_si128): Likewise.
1450 * config/rs6000/xmmintrin.h (__m128_u): New typedef.
1451 (_mm_store_ps): Use unaligned vector type for pointer cast.
1453 2018-10-22 Paul Koning <ni1d@arrl.net>
1455 * symtab.c (symtab_node::increase_alignment): Correct max
1458 2018-10-22 Yury Gribov <tetra2005@gmail.com>
1460 PR tree-optimization/87633
1461 * match.pd: Do not generate unordered integer comparisons.
1463 2018-10-22 Segher Boessenkool <segher@kernel.crashing.org>
1465 PR rtl-optimization/87600
1466 * combine.c: Add include of expr.h.
1467 (cant_combine_insn_p): Do not combine moves from any hard non-fixed
1468 register to a pseudo.
1469 (make_more_copies): New function, add a copy to a new pseudo after
1470 the moves from hard registers into pseudos.
1471 (rest_of_handle_combine): Declare rebuild_jump_labels_after_combine
1472 later. Call make_more_copies.
1474 2018-10-22 Andrew Stubbs <ams@codesourcery.com>
1476 * lra-constraints.c (process_alt_operands): New local array,
1477 matching_early_clobber. Check matching_early_clobber before
1478 decrementing reject, and set matching_early_clobber after.
1480 2018-10-22 Segher Boessenkool <segher@kernel.crashing.org>
1483 * config/rs6000/rs6000.c (print_operand_address): For unexpected RTL
1484 call output_addr_const and hope for the best.
1486 2018-10-22 Richard Biener <rguenther@suse.de>
1488 * gimple-ssa-evrp-analyze.c
1489 (evrp_range_analyzer::record_ranges_from_incoming_edge): Be
1490 smarter about what ranges to use.
1491 * tree-vrp.c (add_assert_info): Dump here.
1492 (register_edge_assert_for_2): Instead of here at multiple but
1495 * gcc.dg/tree-ssa/evrp12.c: New testcase.
1496 * gcc.dg/predict-6.c: Adjust.
1497 * gcc.dg/tree-ssa/vrp33.c: Disable EVRP.
1498 * gcc.dg/tree-ssa/vrp02.c: Likewise.
1499 * gcc.dg/tree-ssa/cunroll-9.c: Likewise.
1501 2018-10-22 Steven Bosscher <steven@gcc.gnu.org>
1502 Richard Biener <rguenther@suse.de>
1504 * bitmap.h: Update data structure documentation, including a
1505 description of bitmap views as either linked-lists or splay trees.
1506 (struct bitmap_element_def): Update comments for splay tree bitmaps.
1507 (struct bitmap_head_def): Likewise.
1508 (bitmap_list_view, bitmap_tree_view): New prototypes.
1509 (bitmap_initialize_stat): Initialize a bitmap_head's indx and
1511 (bmp_iter_set_init): Assert the iterated bitmaps are in list form.
1512 (bmp_iter_and_init, bmp_iter_and_compl_init): Likewise.
1513 * bitmap.c (bitmap_elem_to_freelist): Unregister overhead of a
1514 released bitmap element here.
1515 (bitmap_element_free): Remove.
1516 (bitmap_elt_clear_from): Work on splay tree bitmaps.
1517 (bitmap_list_link_element): Renamed from bitmap_element_link. Move
1518 this function similar ones such that linked-list bitmap implementation
1519 functions are grouped.
1520 (bitmap_list_unlink_element): Renamed from bitmap_element_unlink,
1521 and moved for grouping.
1522 (bitmap_list_insert_element_after): Renamed from
1523 bitmap_elt_insert_after, and moved for grouping.
1524 (bitmap_list_find_element): New function spliced from bitmap_find_bit.
1525 (bitmap_tree_link_left, bitmap_tree_link_right,
1526 bitmap_tree_rotate_left, bitmap_tree_rotate_right, bitmap_tree_splay,
1527 bitmap_tree_link_element, bitmap_tree_unlink_element,
1528 bitmap_tree_find_element): New functions for splay-tree bitmap
1530 (bitmap_element_link, bitmap_element_unlink, bitmap_elt_insert_after):
1531 Renamed and moved, see above entries.
1532 (bitmap_tree_listify_from): New function to convert part of a splay
1533 tree bitmap to a linked-list bitmap.
1534 (bitmap_list_view): Convert a splay tree bitmap to linked-list form.
1535 (bitmap_tree_view): Convert a linked-list bitmap to splay tree form.
1536 (bitmap_find_bit): Remove.
1537 (bitmap_clear, bitmap_clear_bit, bitmap_set_bit,
1538 bitmap_single_bit_set_p, bitmap_first_set_bit, bitmap_last_set_bit):
1539 Handle splay tree bitmaps.
1540 (bitmap_copy, bitmap_count_bits, bitmap_and, bitmap_and_into,
1541 bitmap_elt_copy, bitmap_and_compl, bitmap_and_compl_into,
1542 bitmap_compl_and_into, bitmap_elt_ior, bitmap_ior, bitmap_ior_into,
1543 bitmap_xor, bitmap_xor_into, bitmap_equal_p, bitmap_intersect_p,
1544 bitmap_intersect_compl_p, bitmap_ior_and_compl,
1545 bitmap_ior_and_compl_into, bitmap_set_range, bitmap_clear_range,
1546 bitmap_hash): Reject trying to act on splay tree bitmaps. Make
1547 corresponding changes to use linked-list specific bitmap_element
1548 manipulation functions as applicable for efficiency.
1549 (bitmap_tree_to_vec): New function.
1550 (debug_bitmap_elt_file): New function split out from ...
1551 (debug_bitmap_file): ... here. Handle splay tree bitmaps.
1552 (bitmap_print): Likewise.
1554 PR tree-optimization/63155
1555 * tree-ssa-propagate.c (ssa_prop_init): Use tree-view for the
1557 * tree-ssa-coalesce.c (coalesce_ssa_name): Populate used_in_copies
1560 2018-10-22 Martin Liska <mliska@suse.cz>
1562 PR tree-optimization/87686
1564 2018-08-29 Martin Liska <mliska@suse.cz>
1566 * tree-switch-conversion.c (switch_conversion::expand):
1567 Strenghten assumption about gswitch statements.
1569 2018-10-22 Martin Liska <mliska@suse.cz>
1571 * ipa-icf.c (sem_item::compare_attributes): Remove.
1572 (sem_item::compare_referenced_symbol_properties): Use
1573 attribute_list_equal instead.
1574 (sem_function::equals_wpa): Likewise.
1575 * ipa-icf.h: Remove compare_attributes.
1577 2018-10-22 Richard Biener <rguenther@suse.de>
1580 * mem-stats.h (mem_usage::operator==): Fix pasto.
1582 2018-10-22 Richard Biener <rguenther@suse.de>
1584 PR tree-optimization/87640
1585 * tree-vrp.c (set_value_range_with_overflow): Decompose
1587 (extract_range_from_binary_expr_1): Adjust.
1589 2018-10-22 Martin Jambor <mjambor@suse.cz>
1591 * tree-eh.h (stmt_could_throw_p): Add function parameter.
1592 (stmt_can_throw_external): Likewise.
1593 (stmt_can_throw_internal): Likewise.
1594 * tree-eh.c (lower_eh_constructs_2): Pass cfun to stmt_could_throw_p.
1595 (lower_eh_constructs_2): Likewise.
1596 (stmt_could_throw_p): Add fun parameter, use it instead of cfun.
1597 (stmt_can_throw_external): Likewise.
1598 (stmt_can_throw_internal): Likewise.
1599 (maybe_clean_eh_stmt_fn): Pass cfun to stmt_could_throw_p.
1600 (maybe_clean_or_replace_eh_stmt): Pass cfun to stmt_could_throw_p.
1601 (maybe_duplicate_eh_stmt_fn): Pass new_fun to stmt_could_throw_p.
1602 (maybe_duplicate_eh_stmt): Pass cfun to stmt_could_throw_p.
1603 (pass_lower_eh_dispatch::execute): Pass cfun to
1604 stmt_can_throw_external.
1605 (cleanup_empty_eh): Likewise.
1606 (verify_eh_edges): Pass cfun to stmt_could_throw_p.
1607 * cgraph.c (cgraph_edge::set_call_stmt): Pass a function to
1608 stmt_can_throw_external instead of pushing it to cfun.
1609 (symbol_table::create_edge): Likewise.
1610 * gimple-fold.c (fold_builtin_atomic_compare_exchange): Pass cfun to
1611 stmt_can_throw_internal.
1612 * gimple-ssa-evrp.c (evrp_dom_walker::before_dom_children): Pass cfun
1613 to stmt_could_throw_p.
1614 * gimple-ssa-store-merging.c (handled_load): Pass cfun to
1615 stmt_can_throw_internal.
1616 (pass_store_merging::execute): Likewise.
1617 * gimple-ssa-strength-reduction.c
1618 (find_candidates_dom_walker::before_dom_children): Pass cfun to
1620 * gimplify-me.c (gimple_regimplify_operands): Pass cfun to
1621 stmt_can_throw_internal.
1622 * ipa-pure-const.c (check_call): Pass cfun to stmt_could_throw_p and
1623 to stmt_can_throw_external.
1624 (check_stmt): Pass cfun to stmt_could_throw_p.
1625 (check_stmt): Pass cfun to stmt_can_throw_external.
1626 (pass_nothrow::execute): Likewise.
1627 * trans-mem.c (expand_call_tm): Pass cfun to stmt_can_throw_internal.
1628 * tree-cfg.c (is_ctrl_altering_stmt): Pass cfun to
1629 stmt_can_throw_internal.
1630 (verify_gimple_in_cfg): Pass cfun to stmt_could_throw_p.
1631 (stmt_can_terminate_bb_p): Pass cfun to stmt_can_throw_external.
1632 (gimple_purge_dead_eh_edges): Pass cfun to stmt_can_throw_internal.
1633 * tree-complex.c (expand_complex_libcall): Pass cfun to
1634 stmt_could_throw_p and to stmt_can_throw_internal.
1635 (expand_complex_multiplication): Pass cfun to stmt_can_throw_internal.
1636 * tree-inline.c (copy_edges_for_bb): Likewise.
1637 (maybe_move_debug_stmts_to_successors): Likewise.
1638 * tree-outof-ssa.c (ssa_is_replaceable_p): Pass cfun to
1640 * tree-parloops.c (oacc_entry_exit_ok_1): Likewise.
1641 * tree-sra.c (scan_function): Pass cfun to stmt_can_throw_external.
1642 * tree-ssa-alias.c (stmt_kills_ref_p): Pass cfun to
1643 stmt_can_throw_internal.
1644 * tree-ssa-ccp.c (optimize_atomic_bit_test_and): Likewise.
1645 * tree-ssa-dce.c (mark_stmt_if_obviously_necessary): Pass cfun to
1647 (mark_aliased_reaching_defs_necessary_1): Pass cfun to
1648 stmt_can_throw_internal.
1649 * tree-ssa-forwprop.c (pass_forwprop::execute): Likewise.
1650 * tree-ssa-loop-im.c (movement_possibility): Pass cfun to
1652 * tree-ssa-loop-ivopts.c (find_givs_in_stmt_scev): Likewise.
1653 (add_autoinc_candidates): Pass cfun to stmt_can_throw_internal.
1654 * tree-ssa-math-opts.c (pass_cse_reciprocals::execute): Likewise.
1655 (convert_mult_to_fma_1): Likewise.
1656 (convert_to_divmod): Likewise.
1657 * tree-ssa-phiprop.c (propagate_with_phi): Likewise.
1658 * tree-ssa-pre.c (compute_avail): Pass cfun to stmt_could_throw_p.
1659 * tree-ssa-propagate.c
1660 (substitute_and_fold_dom_walker::before_dom_children): Likewise.
1661 * tree-ssa-reassoc.c (suitable_cond_bb): Likewise.
1662 (maybe_optimize_range_tests): Likewise.
1663 (linearize_expr_tree): Likewise.
1664 (reassociate_bb): Likewise.
1665 * tree-ssa-sccvn.c (copy_reference_ops_from_call): Likewise.
1666 * tree-ssa-scopedtables.c (hashable_expr_equal_p): Likewise.
1667 * tree-ssa-strlen.c (adjust_last_stmt): Likewise.
1668 (handle_char_store): Likewise.
1669 * tree-vect-data-refs.c (vect_find_stmt_data_reference): Pass cfun to
1670 stmt_can_throw_internal.
1671 * tree-vect-patterns.c (check_bool_pattern): Pass cfun to
1673 * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
1674 (vectorizable_call): Pass cfun to stmt_can_throw_internal.
1675 (vectorizable_simd_clone_call): Likewise.
1676 * value-prof.c (gimple_ic): Pass cfun to stmt_could_throw_p.
1677 (gimple_stringop_fixed_value): Likewise.
1679 2018-10-22 Ilya Leoshkevich <iii@linux.ibm.com>
1681 * config/s390/s390.c (s390_loadrelative_operand_p): Accept
1682 literal pool references.
1683 (s390_check_qrst_address): Adapt to the new behavior of
1684 s390_loadrelative_operand_p ().
1686 2018-10-22 H.J. Lu <hongjiu.lu@intel.com>
1689 * config/i386/sse.md (*andnot<mode>3_bcst): New.
1691 2018-10-22 H.J. Lu <hongjiu.lu@intel.com>
1694 * config/i386/sse.md (*<code><mode>3_bcst): New.
1696 2018-10-22 H.J. Lu <hongjiu.lu@intel.com>
1699 * config/i386/sse.md (avx512bcst): Updated for V4SI, V2DI, V8SI,
1700 V4DI, V16SI and V8DI.
1701 (*sub<mode>3<mask_name>_bcst): New.
1702 (*add<mode>3<mask_name>_bcst): Likewise.
1704 2018-10-21 Bill Schmidt <wschmidt@linux.ibm.com>
1705 Jinsong Ji <jji@us.ibm.com>
1707 * config/rs6000/emmintrin.h (_mm_movemask_pd): Replace __vector
1708 __m64 with __vector unsigned long long for compatibility.
1709 (_mm_movemask_epi8): Likewise.
1710 * config/rs6000/xmmintrin.h (_mm_cvtps_pi32): Likewise.
1711 (_mm_cvttps_pi32): Likewise.
1712 (_mm_cvtpi32_ps): Likewise.
1713 (_mm_cvtps_pi16): Likewise.
1714 (_mm_loadh_pi): Likewise.
1715 (_mm_storeh_pi): Likewise.
1716 (_mm_movehl_ps): Likewise.
1717 (_mm_movelh_ps): Likewise.
1718 (_mm_loadl_pi): Likewise.
1719 (_mm_storel_pi): Likewise.
1720 (_mm_movemask_ps): Likewise.
1721 (_mm_shuffle_pi16): Likewise.
1723 2018-10-21 H.J. Lu <hongjiu.lu@intel.com>
1726 * config/i386/avx512fintrin.h (_mm512_fnmsub_round_pd): Use
1727 __builtin_ia32_vfnmsubpd512_mask.
1728 (_mm512_mask_fnmsub_round_pd): Likewise.
1729 (_mm512_fnmsub_pd): Likewise.
1730 (_mm512_mask_fnmsub_pd): Likewise.
1731 (_mm512_maskz_fnmsub_round_pd): Use
1732 __builtin_ia32_vfnmsubpd512_maskz.
1733 (_mm512_maskz_fnmsub_pd): Likewise.
1734 (_mm512_fnmsub_round_ps): Use __builtin_ia32_vfnmsubps512_mask.
1735 (_mm512_mask_fnmsub_round_ps): Likewise.
1736 (_mm512_fnmsub_ps): Likewise.
1737 (_mm512_mask_fnmsub_ps): Likewise.
1738 (_mm512_maskz_fnmsub_round_ps): Use
1739 __builtin_ia32_vfnmsubps512_maskz.
1740 (_mm512_maskz_fnmsub_ps): Likewise.
1741 * config/i386/avx512vlintrin.h (_mm256_mask_fnmsub_pd): Use
1742 __builtin_ia32_vfnmsubpd256_mask.
1743 (_mm256_maskz_fnmsub_pd): Use __builtin_ia32_vfnmsubpd256_maskz.
1744 (_mm_mask_fnmsub_pd): Use __builtin_ia32_vfmaddpd128_mask
1745 (_mm_maskz_fnmsub_pd): Use __builtin_ia32_vfnmsubpd128_maskz.
1746 (_mm256_mask_fnmsub_ps): Use __builtin_ia32_vfnmsubps256_mask.
1747 (_mm256_mask_fnmsub_ps): Use __builtin_ia32_vfnmsubps256_mask.
1748 (_mm256_maskz_fnmsub_ps): Use __builtin_ia32_vfnmsubps256_maskz.
1749 (_mm_mask_fnmsub_ps): Use __builtin_ia32_vfnmsubps128_mask.
1750 (_mm_maskz_fnmsub_ps): Use __builtin_ia32_vfnmsubps128_maskz.
1751 * config/i386/fmaintrin.h (_mm_fnmsub_pd): Use
1752 __builtin_ia32_vfnmsubpd.
1753 (_mm256_fnmsub_pd): Use __builtin_ia32_vfnmsubpd256.
1754 (_mm_fnmsub_ps): Use __builtin_ia32_vfnmsubps.
1755 (_mm256_fnmsub_ps): Use __builtin_ia32_vfnmsubps256.
1756 (_mm_fnmsub_sd): Use __builtin_ia32_vfnmsubsd3.
1757 (_mm_fnmsub_ss): Use __builtin_ia32_vfnmsubss3.
1758 * config/i386/i386-builtin.def: Add
1759 __builtin_ia32_vfnmsubpd256_mask,
1760 __builtin_ia32_vfnmsubpd256_maskz,
1761 __builtin_ia32_vfnmsubpd128_mask,
1762 __builtin_ia32_vfnmsubpd128_maskz,
1763 __builtin_ia32_vfnmsubps256_mask,
1764 __builtin_ia32_vfnmsubps256_maskz,
1765 __builtin_ia32_vfnmsubps128_mask,
1766 __builtin_ia32_vfnmsubps128_maskz,
1767 __builtin_ia32_vfnmsubpd512_mask,
1768 __builtin_ia32_vfnmsubpd512_maskz,
1769 __builtin_ia32_vfnmsubps512_mask,
1770 __builtin_ia32_vfnmsubps512_maskz, __builtin_ia32_vfnmsubss3,
1771 __builtin_ia32_vfnmsubsd3, __builtin_ia32_vfnmsubps,
1772 __builtin_ia32_vfnmsubpd, __builtin_ia32_vfnmsubps256 and.
1773 __builtin_ia32_vfnmsubpd256.
1774 * config/i386/sse.md (fma4i_fnmsub_<mode>): New.
1775 (<avx512>_fnmsub_<mode>_maskz<round_expand_name>): Likewise.
1776 (*<sd_mask_codefor>fma_fnmsub_<mode><sd_maskz_name>_bcst_1):
1778 (*<sd_mask_codefor>fma_fnmsub_<mode><sd_maskz_name>_bcst_2):
1780 (*<sd_mask_codefor>fma_fnmsub_<mode><sd_maskz_name>_bcst_3):
1782 (fmai_vmfnmsub_<mode><round_name>): Likewise.
1784 2018-10-21 H.J. Lu <hongjiu.lu@intel.com>
1787 * config/i386/avx512fintrin.h (_mm512_fnmadd_round_pd): Use
1788 __builtin_ia32_vfnmaddpd512_mask.
1789 (_mm512_mask_fnmadd_round_pd): Likewise.
1790 (_mm512_fnmadd_pd): Likewise.
1791 (_mm512_mask_fnmadd_pd): Likewise.
1792 (_mm512_maskz_fnmadd_round_pd): Use
1793 __builtin_ia32_vfnmaddpd512_maskz.
1794 (_mm512_maskz_fnmadd_pd): Likewise.
1795 (_mm512_fnmadd_round_ps): Use __builtin_ia32_vfnmaddps512_mask.
1796 (_mm512_mask_fnmadd_round_ps): Likewise.
1797 (_mm512_fnmadd_ps): Likewise.
1798 (_mm512_mask_fnmadd_ps): Likewise.
1799 (_mm512_maskz_fnmadd_round_ps): Use
1800 __builtin_ia32_vfnmaddps512_maskz.
1801 (_mm512_maskz_fnmadd_ps): Likewise.
1802 * config/i386/avx512vlintrin.h (_mm256_mask_fnmadd_pd): Use
1803 __builtin_ia32_vfnmaddpd256_mask.
1804 (_mm256_maskz_fnmadd_pd): Use __builtin_ia32_vfnmaddpd256_maskz.
1805 (_mm_mask_fnmadd_pd): Use __builtin_ia32_vfmaddpd128_mask
1806 (_mm_maskz_fnmadd_pd): Use __builtin_ia32_vfnmaddpd128_maskz.
1807 (_mm256_mask_fnmadd_ps): Use __builtin_ia32_vfnmaddps256_mask.
1808 (_mm256_mask_fnmadd_ps): Use __builtin_ia32_vfnmaddps256_mask.
1809 (_mm256_maskz_fnmadd_ps): Use __builtin_ia32_vfnmaddps256_maskz.
1810 (_mm_mask_fnmadd_ps): Use __builtin_ia32_vfnmaddps128_mask.
1811 (_mm_maskz_fnmadd_ps): Use __builtin_ia32_vfnmaddps128_maskz.
1812 * config/i386/fmaintrin.h (_mm_fnmadd_pd): Use
1813 __builtin_ia32_vfnmaddpd.
1814 (_mm256_fnmadd_pd): Use __builtin_ia32_vfnmaddpd256.
1815 (_mm_fnmadd_ps): Use __builtin_ia32_vfnmaddps.
1816 (_mm256_fnmadd_ps): Use __builtin_ia32_vfnmaddps256.
1817 (_mm_fnmadd_sd): Use __builtin_ia32_vfnmaddsd3.
1818 (_mm_fnmadd_ss): Use __builtin_ia32_vfnmaddss3.
1819 * config/i386/i386-builtin.def: Add
1820 __builtin_ia32_vfnmaddpd256_mask,
1821 __builtin_ia32_vfnmaddpd256_maskz,
1822 __builtin_ia32_vfnmaddpd128_mask,
1823 __builtin_ia32_vfnmaddpd128_maskz,
1824 __builtin_ia32_vfnmaddps256_mask,
1825 __builtin_ia32_vfnmaddps256_maskz,
1826 __builtin_ia32_vfnmaddps128_mask,
1827 __builtin_ia32_vfnmaddps128_maskz,
1828 __builtin_ia32_vfnmaddpd512_mask,
1829 __builtin_ia32_vfnmaddpd512_maskz,
1830 __builtin_ia32_vfnmaddps512_mask,
1831 __builtin_ia32_vfnmaddps512_maskz, __builtin_ia32_vfnmaddss3,
1832 __builtin_ia32_vfnmaddsd3, __builtin_ia32_vfnmaddps,
1833 __builtin_ia32_vfnmaddpd, __builtin_ia32_vfnmaddps256 and.
1834 __builtin_ia32_vfnmaddpd256.
1835 * config/i386/sse.md (fma4i_fnmadd_<mode>): New.
1836 (<avx512>_fnmadd_<mode>_maskz<round_expand_name>): Likewise.
1837 (*<sd_mask_codefor>fma_fnmadd_<mode><sd_maskz_name>_bcst_1):
1839 (*<sd_mask_codefor>fma_fnmadd_<mode><sd_maskz_name>_bcst_2):
1841 (*<sd_mask_codefor>fma_fnmadd_<mode><sd_maskz_name>_bcst_3):
1843 (fmai_vmfnmadd_<mode><round_name>): Likewise.
1845 2018-10-21 H.J. Lu <hongjiu.lu@intel.com>
1848 * config/i386/avx512fintrin.h (_mm512_fmsub_round_pd): Use
1849 __builtin_ia32_vfmsubpd512_mask.
1850 (_mm512_mask_fmsub_round_pd): Likewise.
1851 (_mm512_fmsub_pd): Likewise.
1852 (_mm512_mask_fmsub_pd): Likewise.
1853 (_mm512_maskz_fmsub_round_pd): Use
1854 __builtin_ia32_vfmsubpd512_maskz.
1855 (_mm512_maskz_fmsub_pd): Likewise.
1856 (_mm512_fmsub_round_ps): Use __builtin_ia32_vfmsubps512_mask.
1857 (_mm512_mask_fmsub_round_ps): Likewise.
1858 (_mm512_fmsub_ps): Likewise.
1859 (_mm512_mask_fmsub_ps): Likewise.
1860 (_mm512_maskz_fmsub_round_ps): Use
1861 __builtin_ia32_vfmsubps512_maskz.
1862 (_mm512_maskz_fmsub_ps): Likewise.
1863 * config/i386/avx512vlintrin.h (_mm256_mask_fmsub_pd): Use
1864 __builtin_ia32_vfmsubpd256_mask.
1865 (_mm256_maskz_fmsub_pd): Use __builtin_ia32_vfmsubpd256_maskz.
1866 (_mm_mask_fmsub_pd): Use __builtin_ia32_vfmaddpd128_mask
1867 (_mm_maskz_fmsub_pd): Use __builtin_ia32_vfmsubpd128_maskz.
1868 (_mm256_mask_fmsub_ps): Use __builtin_ia32_vfmsubps256_mask.
1869 (_mm256_mask_fmsub_ps): Use __builtin_ia32_vfmsubps256_mask.
1870 (_mm256_maskz_fmsub_ps): Use __builtin_ia32_vfmsubps256_maskz.
1871 (_mm_mask_fmsub_ps): Use __builtin_ia32_vfmsubps128_mask.
1872 (_mm_maskz_fmsub_ps): Use __builtin_ia32_vfmsubps128_maskz.
1873 * config/i386/fmaintrin.h (_mm_fmsub_pd): Use
1874 __builtin_ia32_vfmsubpd.
1875 (_mm256_fmsub_pd): Use __builtin_ia32_vfmsubpd256.
1876 (_mm_fmsub_ps): Use __builtin_ia32_vfmsubps.
1877 (_mm256_fmsub_ps): Use __builtin_ia32_vfmsubps256.
1878 (_mm_fmsub_sd): Use __builtin_ia32_vfmsubsd3.
1879 (_mm_fmsub_ss): Use __builtin_ia32_vfmsubss3.
1880 * config/i386/i386-builtin.def: Add
1881 __builtin_ia32_vfmsubpd256_mask,
1882 __builtin_ia32_vfmsubpd256_maskz,
1883 __builtin_ia32_vfmsubpd128_mask,
1884 __builtin_ia32_vfmsubpd128_maskz,
1885 __builtin_ia32_vfmsubps256_mask,
1886 __builtin_ia32_vfmsubps256_maskz,
1887 __builtin_ia32_vfmsubps128_mask,
1888 __builtin_ia32_vfmsubps128_maskz,
1889 __builtin_ia32_vfmsubpd512_mask,
1890 __builtin_ia32_vfmsubpd512_maskz,
1891 __builtin_ia32_vfmsubps512_mask,
1892 __builtin_ia32_vfmsubps512_maskz, __builtin_ia32_vfmsubss3,
1893 __builtin_ia32_vfmsubsd3, __builtin_ia32_vfmsubps,
1894 __builtin_ia32_vfmsubpd, __builtin_ia32_vfmsubps256 and.
1895 __builtin_ia32_vfmsubpd256.
1896 * config/i386/sse.md (fma4i_fmsub_<mode>): New.
1897 (<avx512>_fmsub_<mode>_maskz<round_expand_name>): Likewise.
1898 (*<sd_mask_codefor>fma_fmsub_<mode><sd_maskz_name>_bcst_1):
1900 (*<sd_mask_codefor>fma_fmsub_<mode><sd_maskz_name>_bcst_2):
1902 (*<sd_mask_codefor>fma_fmsub_<mode><sd_maskz_name>_bcst_3):
1904 (fmai_vmfmsub_<mode><round_name>): Likewise.
1906 2018-10-21 H.J. Lu <hongjiu.lu@intel.com>
1908 * config/i386/sse.md (*<plusminus_insn><mode>3<mask_name>_bcst_1):
1909 Remove plus. Renamed to ...
1910 (*sub<mode>3<mask_name>_bcst): This.
1911 (*add<mode>3<mask_name>_bcst_2): Renamede to ...
1912 (*add<mode>3<mask_name>_bcst): This.
1914 2018-10-21 H.J. Lu <hongjiu.lu@intel.com>
1917 * config/i386/sse.md (*mul<mode>3<mask_name>_bcst): New.
1919 2018-10-21 H.J. Lu <hongjiu.lu@intel.com>
1922 * i386/avx512vlintrin.h (_mm256_or_epi32): New.
1923 (_mm_or_epi32): Likewise.
1924 (_mm256_xor_epi32): Likewise.
1925 (_mm_xor_epi32): Likewise.
1926 (_mm256_or_epi64): Likewise.
1927 (_mm_or_epi64): Likewise.
1928 (_mm256_xor_epi64): Likewise.
1929 (_mm_xor_epi64): Likewise.
1931 2018-10-20 H.J. Lu <hongjiu.lu@intel.com>
1934 * config/i386/sse.md (*<avx512>_div<mode>3<mask_name>_bcst): New.
1936 2018-10-20 Jakub Jelinek <jakub@redhat.com>
1939 * varasm.c (decode_addr_const): Handle COMPOUND_LITERAL_EXPR.
1941 2018-10-20 Andreas Schwab <schwab@linux-m68k.org>
1943 * doc/ux.texi: Move @section directly after @node.
1945 2018-10-19 Jakub Jelinek <jakub@redhat.com>
1949 * omp-low.c (check_omp_nesting_restrictions): Diagnose ordered without
1950 depend closely nested inside of loop with ordered clause with
1953 2018-10-19 David Malcolm <dmalcolm@redhat.com>
1955 * Makefile.in (TEXI_GCCINT_FILES): Add ux.texi.
1956 * doc/gccint.texi: Include ux.texi and use it in top-level menu.
1957 * doc/ux.texi: New file.
1959 2018-10-19 Segher Boessenkool <segher@kernel.crashing.org>
1961 * config/rs6000/rs6000.h (REG_ALLOC_ORDER): Move 68 (that is, CR0) to
1962 be the first CR field allocated.
1964 2018-10-19 Richard Biener <rguenther@suse.de>
1967 * config/i386/i386.c (ix86_builtin_vectorization_cost): Use
1968 TYPE_VECTOR_SUBPARTS and avoid relying on vector mode.
1970 2018-10-19 H.J. Lu <hongjiu.lu@intel.com>
1973 * config/i386/sse.md
1974 (*<plusminus_insn><mode>3<mask_name>_bcst_1): New.
1975 (*add<mode>3<mask_name>_bcst_2): Likewise.
1977 2018-10-19 H.J. Lu <hongjiu.lu@intel.com>
1979 * config/i386/sse.md
1980 (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_1):
1981 Replace nonimmediate_operand with register_operand.
1982 (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_2):
1984 (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_3):
1987 2018-10-19 Ilya Leoshkevich <iii@linux.ibm.com>
1989 PR rtl-optimization/87596
1990 * lra-constraints.c (spill_hard_reg_in_range): Use INSN_P () +
1991 lra_get_insn_recog_data () instead of lra_insn_recog_data[]
1992 for instructions in FROM..TO range.
1994 2018-10-19 Eric Botcazou <ebotcazou@adacore.com>
1996 * cfgexpand.c (expand_one_var): Use specific wording in error message
1997 for non-local frame variables.
1998 * stor-layout.c (layout_decl): Do not issue a warning for them.
2000 2018-10-19 Robin Dapp <rdapp@linux.ibm.com>
2002 * haifa-sched.c (priority): Add force_recompute parameter.
2003 (apply_replacement): Call priority () with force_recompute = true.
2004 (restore_pattern): Likewise.
2006 2018-10-18 H.J. Lu <hongjiu.lu@intel.com>
2008 * simplify-rtx.c (simplify_subreg): Limit mask of vec_merge to
2009 HOST_BITS_PER_WIDE_INT.
2010 (test_vector_ops_duplicate): Likewise.
2012 2018-10-18 H.J. Lu <hongjiu.lu@intel.com>
2015 * config/i386/sse.md (VF_AVX512): New.
2016 (avx512bcst): Likewise.
2017 (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_1):
2019 (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_2):
2021 (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_3):
2024 2018-10-18 Jonathan Wakely <jwakely@redhat.com>
2026 * doc/invoke.texi (-dumpversion): Improve grammar.
2027 (-dumpfullversion): Make more consistent with -dumpversion.
2029 2018-10-18 Uros Bizjak <ubizjak@gmail.com>
2031 * config/i386/i386.c (ix86_emit_fp_unordered_jump):
2032 Set JUMP_LABEL to the jump insn.
2033 (ix86_emit_i387_log1p): Use ix86_expand_branch to expand branch.
2034 Predict emitted jump and add label to jump insn.
2036 2018-10-18 David Malcolm <dmalcolm@redhat.com>
2038 PR tree-optimization/87562
2039 * input.c (get_substring_ranges_for_loc): Use
2040 LRK_SPELLING_LOCATION rather than LRK_MACRO_EXPANSION_POINT when
2041 getting the linemap for the endpoint. Verify that it's either
2042 in the same linemap as the start point's spelling location, or
2043 at least in the same file.
2045 2018-10-18 Richard Biener <rguenther@suse.de>
2047 * config/i386/i386.c (ix86_builtin_vectorization_cost): Do not
2048 feed width-specific load/store costs through ix86_vec_cost.
2049 * config/i386/x86-tune-costs.h (athlon_cost): Adjust.
2050 (k8_cost): Likewise.
2051 (bdver_cost): Likewise.
2052 (znver1_cost): Likewise.
2053 (btver1_cost): Likewise.
2054 (btver2_cost): Likewise.
2056 2018-10-18 H.J. Lu <hongjiu.lu@intel.com>
2058 * simplify-rtx.c (simplify_subreg): Call simplify_gen_subreg
2059 to simplify subreg of vec_merge.
2061 2018-10-18 Richard Biener <rguenther@suse.de>
2063 * config/i386/i386.c: Fix costing of vector FMA.
2065 2018-10-18 Richard Biener <rguenther@suse.de>
2067 * config/i386/i386.c (ix86_vec_cost): Remove !parallel path
2069 (ix86_builtin_vectorization_cost): For vec_construct properly
2070 cost insertion into SSE regs.
2071 (...): Adjust calls to ix86_vec_cost.
2073 2018-10-18 Richard Biener <rguenther@suse.de>
2077 2018-02-07 Richard Biener <rguenther@suse.de>
2079 PR tree-optimization/84204
2080 * tree-chrec.c (chrec_fold_plus_1): Remove size limiting in
2083 2018-10-18 H.J. Lu <hongjiu.lu@intel.com>
2086 * simplify-rtx.c (simplify_subreg): Simplify subreg of vec_merge
2088 (test_vector_ops_duplicate): Add test for a scalar subreg of a
2089 VEC_MERGE of a VEC_DUPLICATE.
2091 2018-10-17 Joseph Myers <joseph@codesourcery.com>
2093 * doc/cpp.texi (__STDC_VERSION__): Document C2X handling.
2094 * doc/invoke.texi (-std=c2x, -std=gnu2x): Document new options.
2095 * doc/standards.texi (C Language): Document C2X.
2096 * dwarf2out.c (highest_c_language), config/rl78/rl78.c
2097 (rl78_option_override): Handle "GNU C2X" language name.
2099 2018-10-17 Joseph Myers <joseph@codesourcery.com>
2101 * doc/invoke.texi (-std=c17), doc/standards.texi (C Language):
2102 Document C17 as published in 2018.
2104 2018-10-17 Eric Botcazou <ebotcazou@adacore.com>
2107 * fold-const.c (fold_truth_andor_1): If the right side is not constant,
2108 bail out if both sides do not have the same storage order.
2110 2018-10-17 Aldy Hernandez <aldyh@redhat.com>
2112 * bitmap.c (bitmap_head::dump): New.
2113 * bitmap.h (bitmap_head): Add dump().
2114 * gimple-ssa-evrp-analyze.c
2115 (evrp_range_analyzer::try_find_new_range): Adjust for value_range API.
2116 (evrp_range_analyzer::set_ssa_range_info): Same.
2117 (evrp_range_analyzer::record_ranges_from_phis): Same.
2118 (evrp_range_analyzer::record_ranges_from_stmt): Same.
2119 * gimple-ssa-evrp.c (evrp_dom_walker::before_dom_children): Same.
2120 * gimple-ssa-sprintf.c (get_int_range): Same.
2121 (format_integer): Same.
2122 (sprintf_dom_walker::handle_gimple_call): Same.
2123 * ipa-cp.c (ipcp_vr_lattice::meet_with_1): Same.
2124 (ipcp_vr_lattice::top_p): Same.
2125 (ipcp_vr_lattice::bottom_p): Same.
2126 (ipcp_vr_lattice::set_to_bottom): Same.
2127 (ipa_vr_operation_and_type_effects): Same.
2128 (propagate_vr_across_jump_function): Same.
2129 (ipcp_store_vr_results): Same.
2130 * ipa-prop.c (struct ipa_vr_ggc_hash_traits): Same.
2131 (ipa_print_node_jump_functions_for_edge): Same.
2132 (ipa_get_value_range): Same.
2133 (ipa_compute_jump_functions_for_edge): Same.
2134 (ipa_write_jump_function): Same.
2135 * tree-ssa-dom.c (simplify_stmt_for_jump_threading): Same.
2136 * tree-ssa-threadedge.c (record_temporary_equivalences_from_phis):
2138 * vr-values.c (set_value_range_to_nonnegative): Same.
2139 (set_value_range_to_truthvalue): Same.
2140 (vr_values::get_value_range): Same.
2141 (vr_values::set_defs_to_varying): Same.
2142 (vr_values::update_value_range): Same.
2143 (symbolic_range_based_on_p): Same.
2144 (vr_values::op_with_boolean_value_range_p): Same.
2145 (vr_values::extract_range_for_var_from_comparison_expr): Same.
2146 (vr_values::extract_range_from_ssa_name): Same.
2147 (vr_values::extract_range_from_binary_expr): Same.
2148 (vr_values::extract_range_from_unary_expr): Same.
2149 (vr_values::extract_range_from_cond_expr): Same.
2150 (vr_values::extract_range_from_comparison): Same.
2151 (vr_values::check_for_binary_op_overflow): Same.
2152 (vr_values::extract_range_basic): Same.
2153 (vr_values::extract_range_from_assignment): Same.
2154 (compare_ranges): Same.
2155 (compare_range_with_value): Same.
2156 (vr_values::adjust_range_with_scev): Same.
2157 (vrp_valueize): Same.
2158 (vrp_valueize_1): Same.
2159 (vr_values::get_vr_for_comparison): Same.
2160 (vr_values::compare_name_with_value): Same.
2161 (vr_values::compare_names): Same.
2162 (vr_values::vrp_evaluate_conditional): Same.
2163 (find_case_label_ranges): Same.
2164 (vr_values::vrp_visit_switch_stmt): Same.
2165 (vr_values::extract_range_from_phi_node): Same.
2166 (vr_values::simplify_div_or_mod_using_ranges): Same.
2167 (vr_values::simplify_bit_ops_using_ranges): Same.
2168 (test_for_singularity): Same.
2169 (range_fits_type_p): Same.
2170 (vr_values::simplify_cond_using_ranges_1): Same.
2171 (vr_values::simplify_switch_using_ranges): Same.
2172 (vr_values::simplify_float_conversion_using_ranges): Same.
2173 (vr_values::two_valued_val_range_p): Same.
2174 (vr_values::add_equivalence): Move to value_range::equiv_add.
2175 * vr-values.h (vr_values::add_equivalence): Remove.
2176 (VR_INITIALIZER): Remove.
2177 * tree-vrp.c (value_range::set): New.
2178 (value_range::equiv_add): New.
2179 (value_range::value_range): New.
2180 (value_range::deep_copy): New.
2181 (value_range::check): New.
2182 (value_range::equal_p): New.
2183 (value_range::ignore_equivs_equal_p): New.
2184 (value_range::operator==): New.
2185 (value_range::operator!=): New.
2186 (value_range::symbolic_p): New.
2187 (value_range::numeric_p): New.
2188 (value_range::set_undefined): New.
2189 (value_range::set_varying): New.
2190 (value_range::may_contain_p): New.
2191 (value_range::equiv_clear): New.
2192 (value_range::singleton_p): New.
2193 (value_range::intersect): New.
2194 (value_range::dump): New.
2195 (value_range::set_and_canonicalize): New.
2196 (set_value_range): Adjust for value_range API.
2197 (set_value_range_to_undefined): Same.
2198 (set_value_range_to_varying): Same.
2199 (set_and_canonicalize_value_range): Same.
2200 (set_value_range_to_nonnull): Same.
2201 (set_value_range_to_null): Same.
2202 (range_is_null): Same.
2203 (range_is_nonnull): Same.
2204 (range_int_cst_p): Same.
2205 (range_int_cst_singleton_p): Same.
2206 (symbolic_range_p): Same.
2207 (range_includes_zero_p): Same.
2208 (value_range_constant_singleton): Same.
2209 (vrp_set_zero_nonzero_bits): Same.
2210 (ranges_from_anti_range): Same.
2211 (extract_range_into_wide_ints): Same.
2212 (extract_range_from_multiplicative_op): Same.
2213 (set_value_range_with_overflow): Same.
2214 (extract_range_from_binary_expr_1): Same.
2215 (extract_range_from_unary_expr): Same.
2216 (dump_value_range): Same.
2217 (debug_value_range): Same.
2218 (vrp_prop::check_array_ref): Same.
2219 (vrp_prop::check_mem_ref): Same.
2220 (vrp_prop::vrp_initialize): Same.
2221 (vrp_prop::visit_stmt): Same.
2222 (intersect_ranges): Same.
2223 (vrp_prop::visit_phi): Same.
2224 (vrp_prop::vrp_finalize): Same.
2225 (determine_value_range_1): Same.
2226 (determine_value_range): Same.
2227 (vrp_intersect_ranges_1): Rename to...
2228 (vrp_intersect_1): this.
2229 (vrp_intersect_ranges): Rename to...
2230 (value_range::intersect_helper): ...this.
2231 (vrp_meet_1): Rename to...
2232 (value_range::union_helper): ...this.
2233 (vrp_meet): Rename to...
2234 (value_range::union_): ...this.
2235 (copy_value_range): Remove.
2236 * tree-vrp.h (struct value_range): Rewrite into a proper class.
2237 (value_range::vrtype): New.
2238 (value_range::type): New.
2239 (value_range::equiv): New.
2240 (value_range::min): New.
2241 (value_range::max): New.
2242 (value_range::varying_p): New.
2243 (value_range::undefined_p): New.
2244 (value_range::null_p): New.
2245 (value_range::equiv_add): New.
2246 (copy_value_range): Remove.
2248 2018-10-17 David Malcolm <dmalcolm@redhat.com>
2250 * Makefile.in (SELFTEST_TARGETS): New.
2251 (selftest) Change from s-selftest-c to $(SELFTEST_TARGETS).
2252 (C_SELFTEST_FLAGS, C_SELFTEST_DEPS, s-selftest-c, selftest-c-gdb)
2253 (selftest-gdb, selftest-c-valgrind, selftest-valgrind): Move to
2255 (CPP_SELFTEST_FLAGS, CPP_SELFTEST_DEPS, s-selftest-c++)
2256 (selftest-c++-gdb, selftest-c++-valgrind): Move to
2258 * configure: Regenerate.
2259 * configure.ac (selftest_languages): New.
2261 2018-10-17 Aldy Hernandez <aldyh@redhat.com>
2263 * tree-vrp.c (extract_range_from_multiplicative_op): Remove
2264 overflow wraps argument.
2265 (extract_range_from_binary_expr_1): Do not pass overflow wraps to
2266 wide_int_range_multiplicative_op.
2267 * wide-int-range.cc (wide_int_range_mult_wrapping): Remove
2268 overflow wraps argument.
2269 (wide_int_range_multiplicative_op): Same.
2270 (wide_int_range_lshift): Same.
2271 (wide_int_range_div): Same.
2272 * wide-int-range.h (wide_int_range_multiplicative_op): Same.
2273 (wide_int_range_lshift): Same.
2274 (wide_int_range_div): Same.
2276 2018-10-17 Aldy Hernandez <aldyh@redhat.com>
2278 * wide-int-range.h (wide_int_range_shift_undefined_p): Adjust to
2279 use sign as argument.
2280 * tree-vrp.c (extract_range_from_binary_expr_1): Pass sign to
2281 wide_int_range_shift_undefined_p.
2283 2018-10-16 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
2285 * config/aarch64/aarch64.md (despeculate_copy<ALLI_TI:mode>):
2287 (@despeculate_copy<ALLI_TI:mode>): ... This.
2288 * config/aarch64/aarch64.c (aarch64_speculation_safe_value): Remove
2291 2018-10-16 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2293 * config.gcc: Obsolete *-*-solaris2.10*.
2294 * doc/install.texi (Specific, *-*-solaris2*): Document it.
2296 2018-10-12 Jeff Law <law@redhat.com>
2298 * config/ft32/ft32.md (ft32_general_movsrc_operand): Disable
2299 reg + sym +- const_int addressing modes.
2301 2018-10-15 David Malcolm <dmalcolm@redhat.com>
2303 * common.opt (fdiagnostics-minimum-margin-width=): New option.
2304 * diagnostic-show-locus.c (layout::layout): Apply the minimum
2306 (layout::start_annotation_line): Only print up to 3 of the
2307 margin character, to avoid touching the left-hand side.
2308 (selftest::test_diagnostic_show_locus_fixit_lines): Update for
2309 minimum margin width, as set by test_diagnostic_context's ctor.
2310 (selftest::test_fixit_insert_containing_newline): Likewise.
2311 (selftest::test_fixit_insert_containing_newline_2): Likewise.
2312 (selftest::test_line_numbers_multiline_range): Clear
2313 dc.min_margin_width.
2314 * diagnostic.c (diagnostic_initialize): Initialize
2316 * diagnostic.h (struct diagnostic_context): Add field
2318 * doc/invoke.texi: Add -fdiagnostics-minimum-margin-width=.
2319 * opts.c (common_handle_option): Handle
2320 OPT_fdiagnostics_minimum_margin_width_.
2321 * selftest-diagnostic.c
2322 (selftest::test_diagnostic_context::test_diagnostic_context):
2323 Initialize min_margin_width to 6.
2324 * toplev.c (general_init): Initialize global_dc->min_margin_width.
2326 2018-10-15 David Malcolm <dmalcolm@redhat.com>
2328 * gcc-rich-location.h (gcc_rich_location::add_location_if_nearby):
2329 Fix usage of "error_at_rich_loc" in the comment.
2331 2018-10-15 Renlin Li <renlin.li@arm.com>
2334 * tree-vectorizer.c (try_vectorize_loop_1): Don't use
2335 if-conversioned loop when it contains ifn with types not
2336 supported by backend.
2337 * internal-fn.c (expand_direct_optab_fn): Add an assert.
2338 (direct_internal_fn_supported_p): New helper function.
2339 * internal-fn.h (direct_internal_fn_supported_p): Declare.
2341 2018-10-15 Jakub Jelinek <jakub@redhat.com>
2344 * common/config/i386/i386-common.c (OPTION_MASK_ISA_AVX512F_UNSET):
2345 Remove OPTION_MASK_ISA_AVX5124FMAPS_UNSET and
2346 OPTION_MASK_ISA_AVX5124VNNIW_UNSET.
2348 2018-10-15 Bin Cheng <bin.cheng@linux.alibaba.com>
2350 PR tree-optimization/87022
2351 * tree-loop-distribution.c (pg_add_dependence_edges): Check all
2352 bits in dist vector rather than the first one.
2354 2018-10-15 Richard Biener <rguenther@suse.de>
2357 * tree-ssa-structalias.c (struct vls_data): Add escaped_p member.
2358 (visit_loadstore): When a used restrict tag escaped verify that
2359 the points-to solution of "other" pointers do not include
2361 (compute_dependence_clique): If a used restrict tag escaped
2362 communicated that down to visit_loadstore.
2364 2018-10-15 Andreas Krebbel <krebbel@linux.ibm.com>
2366 * config/s390/s390.c (s390_expand_vec_init): Force vector element
2367 into reg if it isn't a general operand.
2369 2018-10-14 H.J. Lu <hongjiu.lu@intel.com>
2372 * config/i386/sse.md (*vec_dupv2di): Add register source to
2375 2018-10-14 H.J. Lu <hongjiu.lu@intel.com>
2378 * common/config/i386/i386-common.c (OPTION_MASK_ISA_AVX512F_UNSET):
2379 Add OPTION_MASK_ISA_AVX512IFMA_UNSET,
2380 OPTION_MASK_ISA_AVX5124FMAPS_UNSET and
2381 OPTION_MASK_ISA_AVX5124VNNIW_UNSET.
2383 2018-10-13 Eric Botcazou <ebotcazou@adacore.com>
2385 * dwarf2cfi.c (struct dw_trace_info): Add args_size_defined_for_eh.
2386 (notice_args_size): Set it in the current trace if no insn that can
2387 throw internally has been seen yet.
2388 (connect_traces): When connecting args_size between traces, allow the
2389 incoming values not to match if there is an insn setting it before the
2390 first insn that can throw internally; in that case, force the creation
2391 of a CFI note on this latter insn.
2393 2018-10-13 Jonathan Wakely <jwakely@redhat.com>
2395 * opt-problem.h (opt_wrapper): Use template-argument-list when naming
2396 the base class, because using the injected-class-name was not clearly
2397 specified until DR 176.
2399 2018-10-12 Paul Koning <ni1d@arrl.net>
2401 * config/pdp11/pdp11.md (doloop_end): New expander.
2402 (doloop_end_insn): renamed from "doloop_end".
2403 (addqi3): New pattern.
2404 (subqi3): New pattern.
2405 * config/pdp11/predicates.md (incdec_operand): New predicate.
2407 2018-10-12 Yury Gribov <tetra2005@gmail.com>
2410 * real.c (format_helper::can_represent_integral_type_p): New function
2411 * real.h (format_helper::can_represent_integral_type_p): Ditto.
2412 * match.pd: New pattern.
2414 2018-10-12 Alexandre Oliva <oliva@adacore.com>
2416 * configure.ac: Introduce --enable-large-address-aware
2417 to define MINGW_DEFAULT_LARGE_ADDR_AWARE.
2418 * doc/install.texi: Document it.
2419 * configure, config.in: Rebuilt.
2420 * config/i386/mingw32.h (LINK_SPEC_LARGE_ADDR_AWARE): Define,
2421 based on MINGW_DEFAULT_LARGE_ADDR_AWARE.
2422 (LINK_SPEC): Insert it.
2423 * config/i386/mingw-w64.h: Likewise.
2425 * cygming.h (HAVE_GAS_ALIGNED_COMM): Fallback-define.
2427 2018-10-12 Peter Bergner <bergner@linux.ibm.com>
2429 PR rtl-optimization/87600
2430 * ira-lives (non_conflicting_reg_copy_p): Disable for non LRA targets.
2432 2018-10-12 Paul Koning <ni1d@arrl.net>
2434 * doc/md.texi (doloop_end): Document that the pattern code may
2435 need to check operand mode.
2437 2018-10-12 Wilco Dijkstra <wdijkstr@arm.com>
2439 * config/aarch64/aarch64.md (zero_extendsidi2_aarch64): Add alternatives
2440 to zero-extend between int and floating-point registers.
2441 (load_pair_zero_extendsidi2_aarch64): Add alternative for zero-extended
2442 ldp into floating-point registers. Add type and arch attributes.
2443 (zero_extend<SHORT:mode><GPI:mode>2_aarch64): Add arch attribute.
2444 Use f_loads for type attribute.
2446 2018-10-11 Martin Sebor <msebor@redhat.com>
2448 * doc/extend.texi (attribute packed): Correct typos.
2450 2018-10-11 Martin Sebor <msebor@redhat.com>
2452 * doc/extend.texi (attribute flatten): Mention interaction with
2455 2018-10-11 Jan Hubicka <hubicka@ucw.cz>
2458 * cgraphclones.c (cgraph_node::create_version_clone_with_body):
2459 Set new_decl virtual flag to zero.
2461 2018-10-11 Martin Sebor <msebor@redhat.com>
2464 * doc/extend.texi (attribute format_arg): Discuss using multiple
2465 attributes on a single function.
2467 2018-10-11 Giuliano Belinassi <giuliano.belinassi@usp.br>
2469 PR tree-optimization/86829
2470 * match.pd (sin (atan (x))): New simplification rules.
2471 (cos (atan (x))): Likewise.
2472 * real.c (build_sinatan_real): New function.
2473 * real.h (build_sinatan_real): Prototype.
2475 2018-10-11 Will Schmidt <will_schmidt@vnet.ibm.com>
2477 * config/rs6000/rs6000.c (map_to_integral_tree_type): New helper
2479 (fold_mergeeo_helper): New helper function.
2480 (rs6000_gimple_fold_builtin): Add hooks for vec_mergee and vec_mergeo
2481 intrinsics. Correct some whitespace indentation issues.
2483 2018-10-11 Wilco Dijkstra <wdijkstr@arm.com>
2486 * config/aarch64/aarch64.c (aarch64_mask_and_shift_for_ubfiz_p):
2487 Use HOST_WIDE_INT_1U for shift.
2489 2018-10-11 Doug Rupp <rupp@adacore.com>
2490 Olivier Hainque <hainque@adacore.com>
2492 * config/rs6000/vxworks.h (VXWORKS_RELAX_LINK_SPEC): New macro.
2493 Pass --relax to the linker for RTPs.
2494 (LINK_SPEC): Append VXWORKS_RELAX_LINK_SPEC.
2496 2018-10-11 Andrew Stubbs <ams@codesourcery.com>
2497 Jan Hubicka <jh@suse.cz>
2498 Martin Jambor <mjambor@suse.cz>
2500 * print-rtl.c (print_rtx_operand_codes_E_and_V): Print how many times
2501 the same elements are repeated rather than printing all of them.
2502 * read-rtl.c (rtx_reader::read_rtx_operand): Recognize and expand
2503 "repeated" elements.
2504 * read-rtl-function.c (test_loading_repeat): New function.
2505 (read_rtl_function_c_tests): Call test_loading_repeat.
2506 * rtl-tests.c (test_dumping_repeat): New function.
2507 (rtl_tests_c_tests): Call test_dumping_repeat.
2509 2018-10-11 Richard Biener <rguenther@suse.de>
2511 * config/i386/x86-tune-costs.h (bdver?_memcpy, bdver?_memset,
2512 bdver?_cost): Unify to ...
2513 (bdver_memcpy, bdver_memset, bdver_cost): ... this.
2514 * config/i386/i386.c (processor_cost_table): Adjust.
2516 2018-10-10 Eric Botcazou <ebotcazou@adacore.com>
2519 * cgraphunit.c (cgraph_node::expand_thunk): Force DECL_IGNORED_P on
2520 the thunk when expanding to GIMPLE.
2522 2018-10-10 Bernd Edlinger <bernd.edlinger@hotmail.de>
2524 * varasm.c (mergeable_string_section): Don't try to move zero-length
2525 strings to the merge section.
2527 2018-10-10 Uros Bizjak <ubizjak@gmail.com>
2530 * config/i386/mmx.md (const_vector 0 -> mem splitter): New splitter.
2532 2018-10-10 Jakub Jelinek <jakub@redhat.com>
2535 * config/i386/i386-builtin.def (IX86_BUILTIN_RDPMC): Move from args set
2536 to special_args set.
2538 2018-10-10 Richard Biener <rguenther@suse.de>
2540 * config/i386/sse.md (reduc_plus_scal_v8df, reduc_plus_scal_v4df,
2541 reduc_plus_scal_v2df, reduc_plus_scal_v16sf, reduc_plus_scal_v8sf,
2542 reduc_plus_scal_v4sf): Merge into pattern reducing to half width
2543 and recursing and pattern terminating the recursion on SSE
2544 vector width using ix86_expand_reduc.
2545 (reduc_sminmax_scal_<mode>): Split into part reducing to half
2546 width and recursing and SSE2 vector variant doing the final
2547 reduction with ix86_expand_reduc.
2548 (reduc_uminmax_scal_<mode>): Likewise for the AVX512 variants
2549 with terminating the recursion at AVX level, splitting that
2552 2018-10-09 David Malcolm <dmalcolm@redhat.com>
2554 * genmatch.c (error_cb): Rename to...
2555 (diagnostic_cb): ...this, converting int params to enums.
2556 (fatal_at): Update for renaming.
2557 (warning_at): Likewise.
2559 * input.c (selftest::ebcdic_execution_charset::apply):
2560 Update for renaming of...
2561 (selftest::ebcdic_execution_charset::on_error): ...this, renaming
2563 (selftest::ebcdic_execution_charset::on_diagnostic): ...this,
2564 converting level and reason to enums.
2565 (class selftest::lexer_error_sink): Rename to...
2566 (class selftest::lexer_test_options): ...this, renaming field
2567 "m_errors" to "m_diagnostics".
2568 (selftest::lexer_test_options::apply): Update for renaming of...
2569 (selftest::lexer_test_options::on_error): ...this, renaming to...
2570 (selftest::lexer_test_options::on_diagnostic): ...this
2571 converting level and reason to enums.
2572 (selftest::test_lexer_string_locations_raw_string_unterminated):
2573 Update for renamings.
2574 * opth-gen.awk (struct cpp_reason_option_codes_t): Use enum for
2577 2018-10-09 Paul A. Clarke <pc@us.ibm.com>
2579 * config.gcc (powerpc*-*-*): Add pmmintrin.h to extra_headers.
2580 * config/rs6000/pmmintrin.h: New file.
2582 2018-10-09 Eric Botcazou <ebotcazou@adacore.com>
2584 PR tree-optimization/86659
2585 * gimple-match.h (gimple_match_op constructors): Initialize reverse.
2587 2018-10-09 Richard Biener <rguenther@suse.de>
2589 PR tree-optimization/63155
2590 * tree-ssa-structalias.c: Include tree-ssa.h.
2591 (get_constraint_for_ssa_var): For undefs return nothing_id.
2592 (find_func_aliases): Cleanup PHI handling.
2594 2018-10-09 Richard Biener <rguenther@suse.de>
2596 * tree-vectorizer.c (dump_stmt_cost): Fix cut&paste missing
2599 2018-10-09 Martin Liska <mliska@suse.cz>
2601 * asan.c (asan_emit_stack_protection): If a stack variable
2602 is located in a same file as current function, then emit
2603 line info into variable definition string.
2605 2018-10-08 Eric Botcazou <ebotcazou@adacore.com>
2607 * print-rtl.c (rtx_writer::print_rtx_operand_code_i): Print column
2610 2018-10-08 Eric Botcazou <ebotcazou@adacore.com>
2612 * cgraphunit.c (cgraph_node::expand_thunk): Do not force DECL_IGNORED_P
2615 2018-10-08 Eric Botcazou <ebotcazou@adacore.com>
2617 PR tree-optimization/86659
2618 * gimple-match.h (struct gimple_match_op): Add reverse field.
2619 (gimple_match_op::set_op): New overloaded method.
2620 * gimple-match-head.c (maybe_build_generic_op) <BIT_FIELD_REF>: Set
2621 the REF_REVERSE_STORAGE_ORDER flag on the value.
2622 (gimple_simplify) <GIMPLE_ASSIGN>: For BIT_FIELD_REF, propagate the
2623 REF_REVERSE_STORAGE_ORDER flag and avoid simplifying if it is set.
2625 2018-10-08 Richard Sandiford <richard.sandiford@arm.com>
2628 * gimple-ssa-backprop.c (backprop::intersect_uses): Use
2629 FOR_EACH_IMM_USE_FAST instead of FOR_EACH_IMM_USE_STMT.
2631 2018-10-08 H.J. Lu <hongjiu.lu@intel.com>
2634 * config/i386/avx512fintrin.h (_mm512_mask_fmaddsub_round_pd):
2635 Defined with __builtin_ia32_vfmaddsubpd512_mask.
2637 2018-10-08 Richard Biener <rguenther@suse.de>
2639 * config/i386/x86-tune-costs.h (znver1_cost): Make AVX256 vector loads
2640 cost the same as AVX128 ones.
2642 2018-10-08 Paul Koning <ni1d@arrl.net>
2644 * config/pdp11/pdp11-protos.h (output_block_move): Remove.
2645 (expand_block_move): New function.
2646 * config/pdp11/pdp11.c (output_block_move): Remove.
2647 (expand_block_move): New function.
2648 * config/pdp11/pdp11.h (MOVE_RATIO): New definition.
2649 * config/pdp11/pdp11.md (movmemhi): Use expand_block_move.
2650 (*movmemhi1): Remove.
2652 2018-10-08 Robin Dapp <rdapp@linux.ibm.com>
2654 * config/s390/2827.md: Increase latencies for some FP instructions.
2656 2018-10-08 Richard Biener <rguenther@suse.de>
2658 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost):
2660 * tree-vectorizer.c (dump_stmt_cost): Add cost param and dump it.
2661 * tree-vectorizer.h (dump_stmt_cost): Adjust.
2662 (add_stmt_cost): Dump return value of the hook.
2664 2018-10-08 Richard Biener <rguenther@suse.de>
2666 PR tree-optimization/63155
2667 * tree-ssa-propagate.c (add_ssa_edge): Do cheap check first.
2668 (ssa_propagation_engine::ssa_propagate): Remove redundant
2669 bitmap bit clearing.
2671 2018-10-05 Peter Bergner <bergner@linux.ibm.com>
2673 PR rtl-optimization/86939
2674 PR rtl-optimization/87479
2675 * ira.h (non_conflicting_reg_copy_p): New prototype.
2676 * ira-lives.c (ignore_reg_for_conflicts): New static variable.
2677 (make_hard_regno_dead): Don't add conflicts for register
2678 ignore_reg_for_conflicts.
2679 (make_object_dead): Likewise.
2680 (non_conflicting_reg_copy_p): New function.
2681 (process_bb_node_lives): Set ignore_reg_for_conflicts for copies.
2682 Remove special conflict handling of REAL_PIC_OFFSET_TABLE_REGNUM.
2683 * lra-lives.c (ignore_reg_for_conflicts): New static variable.
2684 (make_hard_regno_dead): Don't add conflicts for register
2685 ignore_reg_for_conflicts. Remove special conflict handling of
2686 REAL_PIC_OFFSET_TABLE_REGNUM. Remove now unused argument
2687 check_pic_pseudo_p and update callers.
2688 (mark_pseudo_dead): Don't add conflicts for register
2689 ignore_reg_for_conflicts.
2690 (process_bb_lives): Set ignore_reg_for_conflicts for copies.
2692 2018-10-05 Andrew Waterman <andrew@sifive.com>
2693 Jim Wilson <jimw@sifive.com>
2695 * config/riscv/riscv.md (f<quiet_pattern>_quiet<ANYF:mode><X:mode>4):
2696 Add define_expand. Add ! HONOR_SNANS check to current pattern. Add
2697 new pattern using HONOR_SNANS that emits one extra instruction.
2699 2018-10-05 Segher Boessenkool <segher@kernel.crashing.org>
2701 * config/rs6000/rs6000.md (unnamed mfcr scc_comparison_operator
2702 patterns): Merge SI and DI patterns to a GPR pattern.
2703 (unnamed define_insn and define_split for record form of that): Merge
2704 to a single define_insn_and_split pattern.
2706 2018-10-05 David Malcolm <dmalcolm@redhat.com>
2709 * input.c (expand_location_to_spelling_point): Add param "aspect"
2710 and use rather than hardcoding LOCATION_ASPECT_CARET.
2711 (get_substring_ranges_for_loc): Handle the case of a single token
2712 within a macro expansion.
2713 * input.h (expand_location_to_spelling_point): Add "aspect" param,
2714 defaulting to LOCATION_ASPECT_CARET.
2716 2018-10-05 Paul Koning <ni1d@arrl.net>
2718 * config/pdp11/pdp11.c (TARGET_CXX_GUARD_TYPE): Define.
2719 (TARGET_CXX_CLASS_DATA_ALWAYS_COMDAT): Define.
2720 (TARGET_CXX_LIBRARY_RTTI_COMDAT): Define.
2721 (pdp11_guard_type): New function.
2723 2018-10-05 Paul Koning <ni1d@arrl.net>
2725 * config/pdp11/pdp11.h (FLOAT_TYPE_SIZE): Always 32.
2726 * config/pdp11/pdp11.opt (mfloat32): Remove.
2728 * doc/invoke.texi (pdp11 -mfloat32): Remove:
2729 (pdp11 -mfloat64): Remove.
2731 2018-10-05 Uros Bizjak <ubizjak@gmail.com>
2733 * config/i386/i386.md (*cmpxf_cc_i387): Remove pattern.
2734 (*cmp<mode>_cc_i387): Ditto.
2735 (*cmpu<mode>_cc_i387): Ditto.
2736 (*cmp<X87MODEF:mode>_<SWI24:mode>_cc_i387): Ditto.
2737 * config/i386/i386.c (ix86_expand_fp_compare): Remove
2739 <case IX86_FPCMP_SAHF>: Do not generate pattern with HImode clobber.
2740 Emit x86_sahf_1 pattern.
2741 (ix86_expand_compare): Update call to ix86_expand_fp_compare.
2742 (ix86_expand_carry_flag_compare): Ditto.
2744 2018-10-05 Uros Bizjak <ubizjak@gmail.com>
2746 * config/i386/i386.md (*cmpxf_i387): Change operand 2 predicate
2747 to reg_or_0_operand. Add "C" constraint.
2748 (*cmpxf_cc_i387): Ditto.
2749 (*cmp<mode>_i387): Change operand 2 predicate
2750 to nonimm_or_0_operand. Add "C" constraint.
2751 (*cmp<mode>_cc_i387): Ditto.
2752 (*cmp<mode>_0_i387): Remove insn pattern.
2753 (*cmp<mode>_0_cc_i387): Ditto.
2755 2018-10-05 Uros Bizjak <ubizjak@gmail.com>
2757 * config/i386/constraints.md ("C"): Do not depend on TARGET_SSE.
2758 * config/i386/predicates.md (nonimm_or_0_operand): Rename
2759 from vector_move_operand. Update all uses.
2761 2018-10-05 Martin Sebor <msebor@redhat.com>
2763 PR tree-optimization/87490
2764 * builtins.c (expand_builtin_strnlen): Handle a null data.decl
2767 2018-10-05 Richard Biener <rguenther@suse.de>
2769 PR tree-optimization/63155
2770 * tree-ssa-ccp.c (ccp_propagate::visit_phi): Avoid excess
2771 vertical space in dumpfiles.
2772 * tree-ssa-propagate.h
2773 (ssa_propagation_engine::process_ssa_edge_worklist): Remove.
2774 * tree-ssa-propagate.c (cfg_blocks_back): New global.
2775 (ssa_edge_worklist_back): Likewise.
2776 (curr_order): Likewise.
2777 (cfg_blocks_get): Remove abstraction.
2778 (cfg_blocks_add): Likewise.
2779 (cfg_blocks_empty_p): Likewise.
2780 (add_ssa_edge): Add to current or next worklist based on
2782 (add_control_edge): Likewise.
2783 (ssa_propagation_engine::process_ssa_edge_worklist): Fold
2785 (ssa_propagation_engine::ssa_propagate): ... here. Unify
2786 iteration from CFG and SSA edge worklist so we process
2787 everything in RPO order, prioritizing forward progress
2789 (ssa_prop_init): Allocate new worklists, do not dump
2791 (ssa_prop_fini): Free new worklists.
2793 2018-10-05 Richard Biener <rguenther@suse.de>
2795 * tree-core.h (tree_block::abstract_flag): Remove.
2796 (tree_block::block_num): Make full 32bits.
2797 * tree.def (BLOCK): Remove docs about BLOCK_ABSTRACT.
2798 * tree.h (BLOCK_ABSTRACT): Remove.
2799 * dwarf2out.c (gen_lexical_block_die): Remove dead code
2800 resulting from BLOCK_ABSTRACT being always false.
2801 (gen_inlined_subroutine_die): Likewise.
2802 (gen_block_die): Likewise.
2803 * tree.c (block_ultimate_origin): Likewise.
2804 * tree-pretty-print.c (dump_block_node): Remove code dealing
2805 with BLOCK_ABSTRACT.
2806 * tree-ssa-live.c (dump_scope_block): Likewise.
2807 * tree-streamer-in.c (unpack_ts_block_value_fields): Likewise.
2808 * tree-streamer-out.c (pack_ts_block_value_fields): Likewise.
2810 2018-10-05 Richard Biener <rguenther@suse.de>
2812 * config/i386/i386.c (ix86_add_stmt_cost): When scalar cost
2813 is asked for initialize mode to the component mode of the
2816 2018-10-05 H.J. Lu <hongjiu.lu@intel.com>
2819 * config/i386/gnu-user.h (ASM_SPEC): Don't pass -msse2avx to
2820 assembler for -mavx.
2821 * config/i386/gnu-user64.h (ASM_SPEC): Likewise.
2823 2018-10-05 Segher Boessenkool <segher@kernel.crashing.org>
2826 * config/rs6000/rs6000-builtin.def (RS6000_BUILTIN_SET_FPSCR_DRN): Use
2828 * config/rs6000/rs6000.md (rs6000_set_fpscr_rn): Require the operand
2829 to be DImode. When using mffscrn, force the operand to a register.
2831 2018-10-04 Uros Bizjak <ubizjak@gmail.com>
2833 * config/i386/i386.md (*fop_<X87MODEF:mode>_2_i387): Macroize insn
2834 from *fop_<MODEF:mode>_2_i387 and *fop_xf_2_i387 using
2835 X87MODEF mode iterator.
2836 (*fop_<X87MODEF:mode>_3_i387): Macroize insn from
2837 *fop_<MODEF:mode>_3_i387 and *fop_xf_3_i387 using
2838 X87MODEF mode iterator.
2840 2018-10-04 Vinay Kumar <vinay.kumar@blackfigtech.com>
2842 * doc/invoke.texi (-Wno-prio-ctor-dtor): Document new warning
2843 -Wno-prio-ctor-dtor.
2845 2018-10-04 David Malcolm <dmalcolm@redhat.com>
2847 * Makefile.in (OBJS): Add opt-problem.o.
2848 * dump-context.h: Include "selftest.h.
2849 (selftest::temp_dump_context): New forward decl.
2850 (class dump_context): Make friend of class
2851 selftest::temp_dump_context.
2852 (dump_context::dump_loc_immediate): New decl.
2853 (class dump_pretty_printer): Move here from dumpfile.c.
2854 (class temp_dump_context): Move to namespace selftest.
2855 (temp_dump_context::temp_dump_context): Add param
2856 "forcibly_enable_dumping".
2857 (selftest::verify_dumped_text):
2858 (ASSERT_DUMPED_TEXT_EQ): Move here from dumpfile.c.
2859 (selftest::verify_item):
2860 (ASSERT_IS_TEXT): Move here from dumpfile.c.
2861 (ASSERT_IS_TREE): Likewise.
2862 (ASSERT_IS_GIMPLE): Likewise.
2863 * dumpfile.c (dump_context::dump_loc): Move immediate dumping
2865 (dump_context::dump_loc_immediate): ...this new function.
2866 (class dump_pretty_printer): Move to dump-context.h.
2867 (dump_switch_p_1): Don't enable MSG_PRIORITY_REEMITTED.
2868 (opt_info_switch_p_1): Enable MSG_PRIORITY_REEMITTED.
2869 (temp_dump_context::temp_dump_context): Move to "selftest"
2870 namespace. Add param "forcibly_enable_dumping", and use it to
2871 conditionalize the use of m_pp;
2872 (selftest::verify_dumped_text): Make non-static.
2873 (ASSERT_DUMPED_TEXT_EQ): Move to dump-context.h.
2874 (selftest::verify_item): Make non-static.
2875 (ASSERT_IS_TEXT): Move to dump-context.h.
2876 (ASSERT_IS_TREE): Likewise.
2877 (ASSERT_IS_GIMPLE): Likewise.
2878 (selftest::test_capture_of_dump_calls): Pass "true" for new
2879 param of temp_dump_context.
2880 * dumpfile.h (enum dump_flag): Add MSG_PRIORITY_REEMITTED, adding
2881 it to MSG_ALL_PRIORITIES. Update values of TDF_COMPARE_DEBUG and
2883 * opt-problem.cc: New file.
2884 * opt-problem.h: New file.
2885 * optinfo-emit-json.cc
2886 (selftest::test_building_json_from_dump_calls): Pass "true" for
2887 new param of temp_dump_context.
2888 * optinfo.cc (optinfo_kind_to_dump_flag): New function.
2889 (optinfo::emit_for_opt_problem): New function.
2890 (optinfo::emit): Clarity which emit_item is used.
2891 * optinfo.h (optinfo::get_dump_location): New accessor.
2892 (optinfo::emit_for_opt_problem): New decl.
2893 (optinfo::emit): Make const.
2894 * selftest-run-tests.c (selftest::run_tests): Call
2895 selftest::opt_problem_cc_tests.
2896 * selftest.h (selftest::opt_problem_cc_tests): New decl.
2897 * tree-data-ref.c (dr_analyze_innermost): Convert return type from
2898 bool to opt_result, converting fprintf messages to
2899 opt_result::failure_at calls. Add "stmt" param for use by the
2901 (create_data_ref): Pass "stmt" to the dr_analyze_innermost call.
2902 (runtime_alias_check_p): Convert return type from bool to
2903 opt_result, converting dump_printf calls to
2904 opt_result::failure_at, using the statement DDR_A for their
2906 (find_data_references_in_stmt): Convert return type from bool to
2907 opt_result, converting "return false" to opt_result::failure_at
2909 * tree-data-ref.h: Include "opt-problem.h".
2910 (dr_analyze_innermost): Convert return type from bool to opt_result,
2911 and add a const gimple * param.
2912 (find_data_references_in_stmt): Convert return type from bool to
2914 (runtime_alias_check_p): Likewise.
2915 * tree-predcom.c (find_looparound_phi): Pass "init_stmt" to
2916 dr_analyze_innermost.
2917 * tree-vect-data-refs.c (vect_mark_for_runtime_alias_test):
2918 Convert return type from bool to opt_result, adding a message for
2919 the PARAM_VECT_MAX_VERSION_FOR_ALIAS_CHECKS zero case.
2920 (vect_analyze_data_ref_dependence): Convert return type from bool
2921 to opt_result. Change sense of return type from "false"
2922 effectively meaning "no problems" to "false" meaning a problem,
2923 so that "return false" becomes "return opt_result::success".
2924 Convert "return true" calls to opt_result::failure_at, using
2925 the location of statement A rather than vect_location.
2926 (vect_analyze_data_ref_dependences): Convert return type from bool
2928 (verify_data_ref_alignment): Likewise, converting dump_printf_loc
2929 calls to opt_result::failure_at, using the stmt location rather
2931 (vect_verify_datarefs_alignment): Convert return type from bool
2933 (vect_enhance_data_refs_alignment): Likewise. Split local "stat"
2934 into multiple more-tightly-scoped copies.
2935 (vect_analyze_data_refs_alignment): Convert return type from bool
2937 (vect_analyze_data_ref_accesses): Likewise, converting a
2938 "return false" to a "return opt_result::failure_at", adding a
2940 (vect_prune_runtime_alias_test_list): Convert return type from
2941 bool to opt_result, converting dump_printf_loc to
2942 opt_result::failure_at. Add a %G to show the pertinent statement,
2943 and use the stmt's location rather than vect_location.
2944 (vect_find_stmt_data_reference): Convert return type from
2945 bool to opt_result, converting dump_printf_loc to
2946 opt_result::failure_at, using stmt's location.
2947 (vect_analyze_data_refs): Convert return type from bool to
2948 opt_result. Convert "return false" to "return
2949 opt_result::failure_at", adding messages as needed.
2950 * tree-vect-loop.c (vect_determine_vf_for_stmt_1): Convert return
2951 type from bool to opt_result.
2952 (vect_determine_vf_for_stmt): Likewise.
2953 (vect_determine_vectorization_factor): Likewise, converting
2954 dump_printf_loc to opt_result::failure_at, using location of phi
2955 rather than vect_location.
2956 (vect_analyze_loop_form_1): Convert return type from bool to
2957 opt_result, converting dump_printf_loc calls, retaining the use of
2959 (vect_analyze_loop_form): Convert return type from loop_vec_info
2960 to opt_loop_vec_info.
2961 (vect_analyze_loop_operations): Convert return type from bool to
2962 opt_result, converting dump_printf_loc calls, using the location
2963 of phi/stmt rather than vect_location where available. Convert
2964 various "return false" to "return opt_result::failure_at" with
2965 "unsupported phi" messages.
2966 (vect_get_datarefs_in_loop): Convert return type from bool to
2967 opt_result. Add a message for the
2968 PARAM_LOOP_MAX_DATAREFS_FOR_DATADEPS failure.
2969 (vect_analyze_loop_2): Convert return type from bool to
2970 opt_result. Ensure "ok" is set to a opt_result::failure_at before
2971 each "goto again;", adding new messages where needed.
2972 Add "unsupported grouped {store|load}" messages.
2973 (vect_analyze_loop): Convert return type from loop_vec_info to
2975 * tree-vect-slp.c (vect_analyze_slp): Convert return type from
2977 * tree-vect-stmts.c (process_use): Likewise, converting
2978 dump_printf_loc call and using stmt location, rather than
2980 (vect_mark_stmts_to_be_vectorized): Likeise.
2981 (vect_analyze_stmt): Likewise, adding a %G.
2982 (vect_get_vector_types_for_stmt): Convert return type from bool to
2983 opt_result, converting dump_printf_loc calls and using stmt
2984 location, rather than vect_location.
2985 (vect_get_mask_type_for_stmt): Convert return type from tree to
2986 opt_tree, converting dump_printf_loc calls and using stmt location.
2987 * tree-vectorizer.c: Include "opt-problem.h.
2988 (try_vectorize_loop_1): Flag "Analyzing loop at" dump message as
2989 MSG_PRIORITY_INTERNALS. Convert local "loop_vinfo" from
2990 loop_vec_info to opt_loop_vec_info. If if fails, and dumping is
2991 enabled, use it to report at the top level "couldn't vectorize
2992 loop" followed by the problem.
2993 * tree-vectorizer.h (opt_loop_vec_info): New typedef.
2994 (vect_mark_stmts_to_be_vectorized): Convert return type from bool
2996 (vect_analyze_stmt): Likewise.
2997 (vect_get_vector_types_for_stmt): Likewise.
2998 (tree vect_get_mask_type_for_stmt): Likewise.
2999 (vect_analyze_data_ref_dependences): Likewise.
3000 (vect_enhance_data_refs_alignment): Likewise.
3001 (vect_analyze_data_refs_alignment): Likewise.
3002 (vect_verify_datarefs_alignment): Likewise.
3003 (vect_analyze_data_ref_accesses): Likewise.
3004 (vect_prune_runtime_alias_test_list): Likewise.
3005 (vect_find_stmt_data_reference): Likewise.
3006 (vect_analyze_data_refs): Likewise.
3007 (vect_analyze_loop): Convert return type from loop_vec_info to
3009 (vect_analyze_loop_form): Likewise.
3010 (vect_analyze_slp): Convert return type from bool to opt_result.
3012 2018-10-04 David Malcolm <dmalcolm@redhat.com>
3014 * doc/invoke.texi (-fopt-info): Document new "internals"
3016 * dump-context.h (dump_context::apply_dump_filter_p): New decl.
3017 * dumpfile.c (dump_options): Update for renaming of MSG_ALL to
3019 (optinfo_verbosity_options): Add "internals".
3020 (kind_as_string): Update for renaming of MSG_ALL to MSG_ALL_KINDS.
3021 (dump_context::apply_dump_filter_p): New member function.
3022 (dump_context::dump_loc): Use apply_dump_filter_p rather than
3023 explicitly masking the dump_kind.
3024 (dump_context::begin_scope): Increment the scope depth first. Use
3025 apply_dump_filter_p rather than explicitly masking the dump_kind.
3026 (dump_context::emit_item): Use apply_dump_filter_p rather than
3027 explicitly masking the dump_kind.
3028 (dump_dec): Likewise.
3029 (dump_hex): Likewise.
3030 (dump_switch_p_1): Default to MSG_ALL_PRIORITIES.
3031 (opt_info_switch_p_1): Default to MSG_PRIORITY_USER_FACING.
3032 (opt_info_switch_p): Update handling of default
3033 MSG_OPTIMIZED_LOCATIONS to cope with default of
3034 MSG_PRIORITY_USER_FACING.
3035 (dump_basic_block): Use apply_dump_filter_p rather than explicitly
3036 masking the dump_kind.
3037 (selftest::test_capture_of_dump_calls): Update test_dump_context
3038 instances to use MSG_ALL_KINDS | MSG_PRIORITY_USER_FACING rather
3039 than MSG_ALL. Generalize scope test to be run at all four
3040 combinations of with/without MSG_PRIORITY_USER_FACING and
3041 MSG_PRIORITY_INTERNALS, adding examples of explicit priority
3042 for each of the two values.
3043 * dumpfile.h (enum dump_flag): Add comment about the MSG_* flags.
3044 Rename MSG_ALL to MSG_ALL_KINDS. Add MSG_PRIORITY_USER_FACING,
3045 MSG_PRIORITY_INTERNALS, and MSG_ALL_PRIORITIES, updating the
3046 values for TDF_COMPARE_DEBUG and TDF_ALL_VALUES.
3047 (AUTO_DUMP_SCOPE): Add a note to the comment about the interaction
3048 with MSG_PRIORITY_*.
3049 * tree-vect-loop-manip.c (vect_loop_versioning): Mark versioning
3050 dump messages as MSG_PRIORITY_USER_FACING.
3051 * tree-vectorizer.h (DUMP_VECT_SCOPE): Add a note to the comment
3052 about the interaction with MSG_PRIORITY_*.
3054 2018-10-04 Bernd Edlinger <bernd.edlinger@hotmail.de>
3056 * varasm.c (output_constant): Add new parameter merge_strings.
3057 Make strings properly zero terminated in merge string sections.
3058 (mergeable_string_section): Don't fail if the last char is non-zero.
3059 (assemble_variable_contents): Handle merge string sections.
3060 (assemble_variable): Likewise.
3061 (assemble_constant_contents): Likewise.
3062 (output_constant_def_contents): Likewise.
3063 (output_constructor_array_range,
3064 output_constructor_regular_field): Adjust call to output_constant.
3065 (output_object_block): Adjust call to assemble_constant_contents
3066 and assemble_variable_contents.
3068 2018-10-04 Martin Liska <mliska@suse.cz>
3071 * cgraphunit.c (process_function_and_variable_attributes):
3072 Warn about a function with alias attribute and a body.
3074 2018-10-04 Martin Liska <mliska@suse.cz>
3077 * multiple_target.c (redirect_to_specific_clone): New function.
3078 (ipa_target_clone): Use it.
3079 * tree-inline.c: Fix comment.
3081 2018-10-04 David Malcolm <dmalcolm@redhat.com>
3083 * dumpfile.c (gcc::dump_manager::dump_manager): Initialize new
3085 (gcc::dump_manager::~dump_manager): Free m_optinfo_filename.
3086 (gcc::dump_manager::register_pass): New member function, adapted
3087 from loop body in gcc::pass_manager::register_pass, adding a
3088 call to update_dfi_for_opt_info.
3089 (gcc::dump_manager::opt_info_enable_passes): Store the
3090 -fopt-info options into the new fields. Move the loop
3092 (gcc::dump_manager::update_dfi_for_opt_info): ...this new member
3094 * dumpfile.h (struct opt_pass): New forward decl.
3095 (gcc::dump_manager::register_pass): New decl.
3096 (gcc::dump_manager::update_dfi_for_opt_info): New decl.
3097 (class gcc::dump_manager): Add fields "m_optgroup_flags",
3098 "m_optinfo_flags", and "m_optinfo_filename".
3099 * passes.c (gcc::pass_manager::register_pass): Move all of the
3100 dump-handling code to gcc::dump_manager::register_pass.
3102 2018-10-04 Peter Bergner <bergner@linux.ibm.com>
3104 PR rtl-optimization/87466
3105 * target.def (setjmp_preserves_nonvolatile_regs_p): New target hook.
3106 * doc/tm.texi.in (TARGET_SETJMP_PRESERVES_NONVOLATILE_REGS_P): New hook.
3107 * doc/tm.texi: Regenerate.
3108 * ira-lives.c (process_bb_node_lives): Use the new target hook.
3109 * lra-lives.c (process_bb_lives): Likewise.
3110 * config/rs6000/rs6000.c (TARGET_SETJMP_PRESERVES_NONVOLATILE_REGS_P):
3113 2018-10-04 Tamar Christina <tamar.christina@arm.com>
3115 * params.c (add_params): Fix initialization.
3117 2018-10-04 Martin Liska <mliska@suse.cz>
3119 PR gcov-profile/84107
3120 * tree-profile.c (init_ic_make_global_vars):
3121 Remove ic_void_ptr_var and ic_gcov_type_ptr_var.
3122 Come up with new ic_tuple* variables. Emit
3123 __gcov_indirect_call{,_topn} variables.
3124 (gimple_gen_ic_profiler): Access the variable
3126 (gimple_gen_ic_func_profiler): Access
3127 __gcov_indirect_call.callee field.
3128 (gimple_init_gcov_profiler): Use ptr_type_node.
3129 * value-prof.c (gimple_ic): Use ptr_type_node.
3131 2018-10-04 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3133 PR tree-optimization/85787
3134 * ipa-pure-const.c (malloc_candidate_p_1): Move most of malloc_candidate_p
3135 into this function and add support for detecting multiple phis.
3136 (DUMP_AND_RETURN): Move from malloc_candidate_p into top-level macro.
3138 2018-10-04 Martin Liska <mliska@suse.cz>
3141 * ipa-inline.c (inline_to_all_callers_1):
3142 Call ultimate_alias_target for node being inlined.
3144 2018-10-03 Jeff Law <law@redhat.com>
3146 * gimple-ssa-sprintf.c (format_string): Do not hardcode size of
3148 * tree.c (get_typenode_from_name): Moved from fortran/trans-types.c.
3149 * tree.h (get_typenode_from_name): Prototype.
3151 2018-10-03 Uros Bizjak <ubizjak@gmail.com>
3153 * config/i386/i386.md (*cmp<X87MODEF:mode>_<SWI24:mode>_i387):
3154 Change operand 2 predicate to nonimmediate_operand.
3155 (*cmp<X87MODEF:mode>_<SWI24:mode>_cc_i387): Ditto.
3157 2018-10-03 Martin Sebor <msebor@redhat.com>
3158 Jeff Law <law@redhat.com>
3160 * gimple-ssa-sprintf.c (struct fmtresult): Add new member and
3162 (get_string_length): Detect unterminated arrays.
3163 (format_string): Same.
3164 (format_directive): Warn about unterminated arrays.
3165 (handle_gimple_call): Mark statements with no_warning as needed.
3167 2018-10-03 Jim Wilson <jimw@sifive.com>
3169 * config/riscv/riscv-c.c (riscv_cpu_cpp_builtins): For ABI_ILP32E,
3170 also define __riscv_abi_rve. Delete trailing white space.
3172 2018-10-03 Paul Koning <ni1d@arrl.net>
3174 Enable LRA register allocator for PDP11.
3175 * config/pdp11/constraints.md (Q): Use define_memory_constraint.
3178 * config/pdp11/pdp11.c (pdp11_lra_p): New function.
3179 * config/pdp11/pdp11.opt (-mlra): New option.
3180 * doc/invoke.texi (PDP-11 Options): Document -mlra.
3182 2018-10-03 Uros Bizjak <ubizjak@gmail.com>
3184 * config/i386/i386.md (*<absneg:code>extendsfdf2): Remove.
3185 (*<absneg:code>extend<mode>xf2): Ditto.
3187 2018-10-03 Aldy Hernandez <aldyh@redhat.com>
3189 PR tree-optimization/87415
3190 * tree-vrp.c (set_value_range_with_overflow): Special case one bit
3193 2018-10-02 Jeff Law <law@redhat.com>
3195 * gimple-fold.c (get_range_strlen): Only set *nonstr when
3196 an unterminated string is discovered. Bubble up range
3197 even for unterminated strings.
3198 (gimple_fold_builtin_strlen): Do not fold if get_range_strlen
3199 indicates the string was not terminated via NONSTR.
3201 2018-10-03 Aldy Hernandez <aldyh@redhat.com>
3203 * tree-vrp.c (extract_range_from_unary_expr): Special case all
3204 pointer conversions.
3205 Do not do anything special for anti-ranges.
3207 2018-10-03 Jérôme Lambourg <lambourg@adacore.com>
3209 * config/arm/vxworks.h (ARM_TARGET2_DWARF_FORMAT): Adjust to
3210 DW_EH_PE_pcrel | DW_EH_PE_indirect for RTPs.
3212 2018-10-03 Martin Liska <mliska@suse.cz>
3214 PR gcov-profile/86109
3215 * coverage.c (coverage_begin_function): Do not
3216 mark lambdas as artificial.
3217 * tree-core.h (struct GTY): Remove tm_clone_flag
3218 and introduce new lambda_function.
3219 * tree.h (DECL_LAMBDA_FUNCTION): New macro.
3221 2018-10-02 Aaron Sawdey <acsawdey@linux.ibm.com>
3224 * config/rs6000/rs6000-string.c (expand_strn_compare): Check that both
3225 P8_VECTOR and VSX are enabled.
3227 2018-10-02 Andreas Krebbel <krebbel@linux.ibm.com>
3229 * config/s390/driver-native.c (s390_host_detect_local_cpu): Add
3230 0x3907 as CPU model number.
3232 2018-10-02 Andreas Krebbel <krebbel@linux.ibm.com>
3234 * common/config/s390/s390-common.c: Rename PF_ARCH12 to PF_Z14.
3235 * config/s390/s390.h (enum processor_flags): Rename PF_ARCH12 to
3236 PF_Z14. Rename TARGET_CPU_ARCH12 to TARGET_CPU_Z14,
3237 TARGET_CPU_ARCH12_P to TARGET_CPU_Z14_P, TARGET_ARCH12 to
3238 TARGET_Z14, and TARGET_ARCH12_P to TARGET_Z14_P.
3239 * config/s390/s390.md: Likewise. Rename also the cpu attribute
3240 value from arch12 to z14.
3242 2018-10-02 Uros Bizjak <ubizjak@gmail.com>
3244 * config/i386/i386.md (fxam<mode>2_i387_with_temp): Remove.
3246 (isinf<mode>2): Ditto.
3248 2018-10-02 Uros Bizjak <ubizjak@gmail.com>
3250 * config/i386/i386.c (ix86_emit_i387_round): Extend op1 to XFmode
3251 before emitting fxam. Perform calculations in XFmode.
3253 2018-10-02 Marc Glisse <marc.glisse@inria.fr>
3255 * match.pd (((X /[ex] A) +- B) * A): New transformation.
3257 2018-10-02 Marc Glisse <marc.glisse@inria.fr>
3260 * fold-const.c (fold_plusminus_mult_expr): Handle complex and vectors.
3261 * tree.c (signed_or_unsigned_type_for): Handle complex.
3263 2018-10-02 Jeff Law <law@redhat.com>
3265 * gimple-fold.c (get_range_strlen): Remove dead code.
3267 2018-10-02 Martin Sebor <msebor@redhat.com>
3268 Jeff Law <law@redhat.com>
3270 * builtins.c (unterminated_array): Add new arguments.
3271 If argument is not terminated, bubble up size and exact
3273 (expand_builtin_strnlen): Detect, avoid expanding
3274 and diagnose unterminated arrays.
3275 (c_strlen): Fill in offset of start of unterminated strings.
3276 * builtins.h (unterminated_array): Update prototype.
3278 2018-10-02 Richard Biener <rguenther@suse.de>
3280 * config/i386/sse.md (reduc_plus_scal_v4df): Avoid the use
3281 of haddv4df, first reduce to SSE width and exploit the fact
3282 that we only need element zero with the reduction result.
3283 (reduc_plus_scal_v2df): Likewise.
3285 2018-10-02 Eric Botcazou <ebotcazou@adacore.com>
3287 * dojump.h (do_jump): Delete.
3288 (do_jump_1): Likewise.
3289 (split_comparison): Move around.
3290 * dojump.c (do_jump): Make static.
3291 (do_jump_1): Likewise.
3292 (jumpifnot): Move around.
3293 (jumpifnot_1): Likewise.
3295 (jumpif_1): Likewise.
3296 * expr.c (expand_expr_real_1): Call jumpif[not] instead of do_jump.
3298 2018-10-02 Eric Botcazou <ebotcazou@adacore.com>
3300 * reorg.c (make_return_insns): Use emit_copy_of_insn_after for the
3301 insns in the delay slot and add_insn_after for the jump insn.
3303 2018-10-02 Richard Biener <rguenther@suse.de>
3305 * tree-inline.c (expand_call_inline): Use the location of
3306 the callee declaration for the inline-entry marker.
3307 * final.c (notice_source_line): Remove special-casing of
3308 NOTE_INSN_INLINE_ENTRY.
3310 2018-10-01 Carl Love <cel@us.ibm.com>
3313 * config/rs6000/rs6000-builtin.def (__builtin_mffsl): New.
3314 (__builtin_mtfsb0): New.
3315 (__builtin_mtfsb1): New.
3316 ( __builtin_set_fpscr_rn): New.
3317 (__builtin_set_fpscr_drn): New.
3318 * config/rs6000/rs6000.c (rs6000_expand_mtfsb_builtin): Add.
3319 (rs6000_expand_set_fpscr_rn_builtin): Add.
3320 (rs6000_expand_set_fpscr_drn_builtin): Add.
3321 (rs6000_expand_builtin): Add case statement entries for
3322 RS6000_BUILTIN_MTFSB0, RS6000_BUILTIN_MTFSB1,
3323 RS6000_BUILTIN_SET_FPSCR_RN, RS6000_BUILTIN_SET_FPSCR_DRN,
3324 RS6000_BUILTIN_MFFSL.
3325 (rs6000_init_builtins): Add ftype initialization and def_builtin
3326 calls for __builtin_mffsl, __builtin_mtfsb0, __builtin_mtfsb1,
3327 __builtin_set_fpscr_rn, __builtin_set_fpscr_drn.
3328 * config/rs6000.md (rs6000_mtfsb0, rs6000_mtfsb1, rs6000_mffscrn,
3329 rs6000_mffscdrn): Add define_insn.
3330 (rs6000_set_fpscr_rn, rs6000_set_fpscr_drn): Add define_expand.
3331 * doc/extend.texi: Add documentation for the builtins.
3333 2018-10-01 Richard Biener <rguenther@suse.de>
3335 PR tree-optimization/87465
3336 * tree-ssa-loop-ivcanon.c (tree_estimate_loop_size): Fix typo
3337 causing branch miscounts.
3339 2018-10-01 Tamar Christina <tamar.christina@arm.com>
3341 * common/config/aarch64/aarch64-common.c (TARGET_OPTION_DEFAULT_PARAM,
3342 aarch64_option_default_param): New.
3343 (params.h): Include.
3344 (TARGET_OPTION_VALIDATE_PARAM, aarch64_option_validate_param): New.
3345 * config/aarch64/aarch64.c (aarch64_override_options_internal): Simplify
3346 stack-clash protection validation code.
3348 2018-10-01 Tamar Christina <tamar.christina@arm.com>
3350 * params.c (validate_param): New.
3351 (add_params): Use it.
3352 (set_param_value): Refactor param validation into validate_param.
3353 (diagnostic.h): Include.
3354 * diagnostic.h (diagnostic_ready_p): New.
3356 2018-10-01 Tamar Christina <tamar.christina@arm.com>
3358 * params.c (set_param_value):
3359 Add index of parameter being validated.
3360 * common/common-target.def (option_validate_param): New.
3361 * common/common-targhooks.h (default_option_validate_param): New.
3362 * common/common-targhooks.c (default_option_validate_param): New.
3363 * doc/tm.texi.in (TARGET_OPTION_VALIDATE_PARAM): New.
3364 * doc/tm.texi: Regenerate.
3366 2018-10-01 Tamar Christina <tamar.christina@arm.com>
3369 * config/aarch64/aarch64.c (aarch64_override_options_internal):
3370 Add validation for stack-clash parameters and set defaults.
3372 2018-10-01 Tamar Christina <tamar.christina@arm.com>
3375 * configure.ac: Add stack-clash-protection-guard-size.
3376 * doc/install.texi: Document it.
3377 * config.in (DEFAULT_STK_CLASH_GUARD_SIZE): New.
3378 * params.def: Update comment for guard-size.
3379 (PARAM_STACK_CLASH_PROTECTION_GUARD_SIZE,
3380 PARAM_STACK_CLASH_PROTECTION_PROBE_INTERVAL): Update description.
3381 * configure: Regenerate.
3383 2018-10-01 Tamar Christina <tamar.christina@arm.com>
3386 * config/aarch64/aarch64.h (STACK_CLASH_MIN_BYTES_OUTGOING_ARGS,
3387 STACK_DYNAMIC_OFFSET): New.
3388 * config/aarch64/aarch64.c (aarch64_layout_frame):
3389 Update outgoing args size.
3390 (aarch64_stack_clash_protection_alloca_probe_range,
3391 TARGET_STACK_CLASH_PROTECTION_ALLOCA_PROBE_RANGE): New.
3393 2018-10-01 Tamar Christina <tamar.christina@arm.com>
3396 * explow.c (anti_adjust_stack_and_probe_stack_clash): Support custom
3398 * target.def (stack_clash_protection_alloca_probe_range): New.
3399 (stack_clash_protection_final_dynamic_probe): Remove.
3400 * targhooks.h (default_stack_clash_protection_alloca_probe_range) New.
3401 (default_stack_clash_protection_final_dynamic_probe): Remove.
3402 * targhooks.c: Likewise.
3403 * doc/tm.texi.in (TARGET_STACK_CLASH_PROTECTION_ALLOCA_PROBE_RANGE): New.
3404 (TARGET_STACK_CLASH_PROTECTION_FINAL_DYNAMIC_PROBE): Remove.
3405 * doc/tm.texi: Regenerate.
3407 2018-10-01 Tamar Christina <tamar.christina@arm.com>
3410 * config/aarch64/aarch64-protos.h (aarch64_output_probe_sve_stack_clash): New.
3411 * config/aarch64/aarch64.c (aarch64_output_probe_sve_stack_clash,
3412 aarch64_clamp_to_uimm12_shift): New.
3413 (aarch64_allocate_and_probe_stack_space): Add SVE specific section.
3414 * config/aarch64/aarch64.md (probe_sve_stack_clash): New.
3416 2018-10-01 Tamar Christina <tamar.christina@arm.com>
3419 * config/aarch64/aarch64.c (aarch64_layout_frame): Add assert.
3421 2018-10-01 Jeff Law <law@redhat.com>
3422 Richard Sandiford <richard.sandiford@linaro.org>
3423 Tamar Christina <tamar.christina@arm.com>
3426 * config/aarch64/aarch64.md
3427 (probe_stack_range): Add k (SP) constraint.
3428 * config/aarch64/aarch64.h (STACK_CLASH_CALLER_GUARD,
3429 STACK_CLASH_MAX_UNROLL_PAGES): New.
3430 * config/aarch64/aarch64.c (aarch64_output_probe_stack_range): Emit
3431 stack probes for stack clash.
3432 (aarch64_allocate_and_probe_stack_space): New.
3433 (aarch64_expand_prologue): Use it.
3434 (aarch64_expand_epilogue): Likewise and update IP regs re-use criteria.
3435 (aarch64_sub_sp): Add emit_move_imm optional param.
3437 2018-10-01 MCC CS <deswurstes@users.noreply.github.com>
3439 PR tree-optimization/87261
3440 * match.pd: Remove trailing whitespace.
3441 Add (x & y) | ~(x | y) -> ~(x ^ y),
3442 (~x | y) ^ (x ^ y) -> x | ~y and (x ^ y) | ~(x | y) -> ~(x & y)
3444 2018-10-01 Claudiu Zissulescu <claziss@synopsys.com>
3446 * config/arc/arc.md (*add_n): Clean up pattern, update instruction
3448 (ashlsi3_insn): Update instruction constraints.
3449 (ashrsi3_insn): Likewise.
3450 (rotrsi3): Likewise.
3451 (add_shift): Likewise.
3452 * config/arc/constraints.md (Csz): New 32 bit constraint. It
3453 avoids placing in the limm field small constants which, otherwise,
3454 could end into a small instruction.
3456 2018-10-01 Claudiu Zissulescu <claziss@synopsys.com>
3458 * config/arc/arc.md (maddsidi4_split): Don't use dmac if the
3459 destination register is not odd-even.
3460 (umaddsidi4_split): Likewise.
3462 2018-10-01 Richard Biener <rguenther@suse.de>
3464 * tree-inline.c (expand_call_inline): Store origin of fn
3465 in BLOCK_ABSTRACT_ORIGIN for the inline BLOCK.
3466 * tree.c (block_ultimate_origin): Simplify and do some
3469 2018-09-30 Uros Bizjak <ubizjak@gmail.com>
3471 * config/i386/mmx.md (EMMS): New int iterator.
3472 (emms): New int attribute.
3473 (mmx_<emms>): Macroize insn from *mmx_emms and *mmx_femms using
3474 EMMS int iterator. Explicitly declare clobbers.
3475 (mmx_emms): Remove expander.
3477 * config/i386/predicates.md (emms_operation): Remove predicate.
3478 (vzeroall_pattern): New predicate.
3479 (vzeroupper_pattern): Rename from vzeroupper_operation.
3480 * config/i386/i386.c (ix86_avx_u128_mode_after): Use
3481 vzeroupper_pattern and vzeroall_pattern predicates.
3483 2018-09-30 Peter Bergner <bergner@linux.ibm.com>
3485 PR rtl-optimization/86939
3486 * ira-lives.c (make_hard_regno_born): Rename from this...
3487 (make_hard_regno_live): ... to this. Remove update to conflict
3488 information. Update function comment.
3489 (make_hard_regno_dead): Add conflict information update. Update
3491 (make_object_born): Rename from this...
3492 (make_object_live): ... to this. Remove update to conflict information.
3493 Update function comment.
3494 (make_object_dead): Add conflict information update. Update function
3496 (mark_pseudo_regno_live): Call make_object_live.
3497 (mark_pseudo_regno_subword_live): Likewise.
3498 (mark_hard_reg_dead): Update function comment.
3499 (mark_hard_reg_live): Call make_hard_regno_live.
3500 (process_bb_node_lives): Likewise.
3501 * lra-lives.c (make_hard_regno_born): Rename from this...
3502 (make_hard_regno_live): ... to this. Remove update to conflict
3503 information. Remove now uneeded check_pic_pseudo_p argument.
3504 Update function comment.
3505 (make_hard_regno_dead): Add check_pic_pseudo_p argument and add update
3506 to conflict information. Update function comment.
3507 (mark_pseudo_live): Remove update to conflict information. Update
3509 (mark_pseudo_dead): Add conflict information update.
3510 (mark_regno_live): Call make_hard_regno_live.
3511 (mark_regno_dead): Call make_hard_regno_dead with new arguement.
3512 (process_bb_lives): Call make_hard_regno_live and make_hard_regno_dead.
3514 2018-09-29 H.J. Lu <hongjiu.lu@intel.com>
3517 * config/i386/i386.c (construct_container): Use TImode for
3518 BLKmode values in 2 integer registers.
3520 2018-09-29 Jeff Law <law@redhat.com>
3522 * builtins.c (unterminated_array): Pass in c_strlen_data * to
3523 c_strlen rather than just a tree *.
3524 (c_strlen): Change NONSTR argument to a c_strlen_data pointer.
3525 Update recursive calls appropriately. If caller did not provide a
3526 suitable data pointer, create a local one. When a non-terminated
3527 string is discovered, bubble up information about the string via the
3528 c_strlen_data object.
3529 * builtins.h (c_strlen): Update prototype.
3530 (c_strlen_data): New structure.
3531 * gimple-fold.c (get_range_strlen): Update calls to c_strlen.
3532 For a type 2 call, if c_strlen indicates a non-terminated string
3533 use the length of the non-terminated string.
3534 (gimple_fold_builtin_stpcpy): Update calls to c_strlen.
3536 2018-09-29 Jakub Jelinek <jakub@redhat.com>
3539 * config/i386/avx512fintrin.h (_mm512_abs_pd, _mm512_mask_abs_pd): Use
3540 __m512d type for __A argument rather than __m512.
3542 2018-09-28 John David Anglin <danglin@gcc.gnu.org>
3544 * match.pd (simple_comparison): Don't optimize if either operand is
3545 a function pointer when target needs function pointer canonicalization.
3547 2018-09-28 Segher Boessenkool <segher@kernel.crashing.org>
3549 * config/rs6000/driver-rs6000.c (asm_names): Adjust the entries for
3550 power5 .. power9 to remove indirection.
3551 * config/rs6000/rs6000.h (ASM_CPU_POWER5_SPEC, ASM_CPU_POWER6_SPEC,
3552 ASM_CPU_POWER7_SPEC, ASM_CPU_POWER8_SPEC, ASM_CPU_POWER9_SPEC,
3553 ASM_CPU_476_SPEC): Delete.
3554 (ASM_CPU_SPEC): Adjust.
3555 (EXTRA_SPECS): Delete asm_cpu_power5, asm_cpu_power6, asm_cpu_power7,
3556 asm_cpu_power8, asm_cpu_power9, asm_cpu_476.
3558 2018-09-28 Segher Boessenkool <segher@kernel.crashing.org>
3560 * config.in: Delete HAVE_AS_DCI.
3561 * config/powerpcspe/powerpcspe.h: Treat HAVE_AS_DCI as always true.
3562 * config/rs6000/rs6000.h: Ditto.
3563 * configure.ac: Delete HAVE_AS_DCI.
3564 * configure: Regenerate.
3566 2018-09-28 Segher Boessenkool <segher@kernel.crashing.org>
3568 * config.in (HAVE_AS_LWSYNC): Delete.
3569 * config/powerpcspe/powerpcspe.h (TARGET_LWSYNC_INSTRUCTION): Delete.
3570 * config/powerpcspe/sync.md (*lwsync): Always generate lwsync, never
3572 * config/rs6000/rs6000.h (TARGET_LWSYNC_INSTRUCTION): Delete.
3573 * config/rs6000/sync.md (*lwsync): Always generate lwsync, never do it
3575 * configure.ac: Delete HAVE_AS_LWSYNC.
3576 * configure: Regenerate.
3578 2018-09-28 Eric Botcazou <ebotcazou@adacore.com>
3579 Pierre-Marie de Rodat <derodat@adacore.com>
3581 * calls.c (expand_call): Try to do a tail call for thunks at -O0 too.
3582 * cgraph.h (struct cgraph_thunk_info): Add indirect_offset.
3583 (cgraph_node::create_thunk): Add indirect_offset parameter.
3584 (thunk_adjust): Likewise.
3585 * cgraph.c (cgraph_node::create_thunk): Add indirect_offset parameter
3586 and initialize the corresponding field with it.
3587 (cgraph_node::dump): Dump indirect_offset field.
3588 * cgraphclones.c (duplicate_thunk_for_node): Deal with indirect_offset.
3589 * cgraphunit.c (cgraph_node::analyze): Be prepared for external thunks.
3590 (thunk_adjust): Add indirect_offset parameter and deal with it.
3591 (cgraph_node::expand_thunk): Deal with the indirect_offset field and
3592 pass it to thunk_adjust. Do not call the target hook if it's non-zero
3593 or if the thunk is external or local. Fix formatting. Do not chain
3594 the RESULT_DECL to BLOCK_VARS. Pass the static chain to the target,
3595 if any, in the GIMPLE representation.
3596 * ipa-icf.c (sem_function::equals_wpa): Deal with indirect_offset.
3597 * lto-cgraph.c (lto_output_node): Write indirect_offset field.
3598 (input_node): Read indirect_offset field.
3599 * tree-inline.c (expand_call_inline): Pass indirect_offset field in the
3600 call to thunk_adjust.
3601 * tree-nested.c (struct nesting_info): Add thunk_p field.
3602 (create_nesting_tree): Set it.
3603 (convert_all_function_calls): Copy static chain from targets to thunks.
3604 (finalize_nesting_tree_1): Return early for thunks.
3605 (unnest_nesting_tree_1): Do not finalize thunks.
3606 (gimplify_all_functions): Do not gimplify thunks.
3608 2018-09-28 David Malcolm <dmalcolm@redhat.com>
3610 * opt-suggestions.c (option_proposer::build_option_suggestions):
3611 Release "option_values".
3613 2018-09-28 David Malcolm <dmalcolm@redhat.com>
3615 * coverage.c (get_coverage_counts): Convert problem-reporting dump
3616 messages from MSG_OPTIMIZED_LOCATIONS to MSG_MISSED_OPTIMIZATION.
3617 * dumpfile.c (kind_as_string): New function.
3618 (dump_loc): Rather than a hardcoded prefix of "note: ", use
3619 kind_as_string to vary the prefix based on dump_kind.
3620 (selftest::test_capture_of_dump_calls): Update for above.
3622 2018-09-28 Uros Bizjak <ubizjak@gmail.com>
3624 * config/i386/i386.h (SSE_REGNO): Fix check for FIRST_REX_SSE_REG.
3625 (GET_SSE_REGNO): Rename from SSE_REGNO. Update all uses for rename.
3627 2018-09-28 Uros Bizjak <ubizjak@gmail.com>
3629 * config/i386/i386.h (CC_REGNO): Remove FPSR_REG.
3630 * config/i386/i386.c (ix86_fixed_condition_code_regs): Use
3631 INVALID_REGNUM instead of FPSR_REG.
3632 (ix86_md_asm_adjust): Do not clobber FPSR_REG.
3633 * config/i386/i386.md: Update comment of FP compares.
3634 (fldenv): Do not clobber FPSR_REG.
3636 2018-09-28 Richard Biener <rguenther@suse.de>
3638 * tree.h (BLOCK_ORIGIN): New.
3639 * omp-expand.c (grid_expand_target_grid_body): Assign
3640 BLOCK_ORIGIN to BLOCK_ABSTRACT_ORIGIN.
3641 * tree-inline.c (remap_block): Likewise.
3642 * auto-profile.c (get_function_decl_from_block): Simplify
3643 by eliding the BLOCK_ABSTRACT_ORIGIN chasing.
3644 * langhooks.c (lhd_print_error_function): Likewise.
3645 * optinfo-emit-json.cc (optrecord_json_writer::inlining_chain_to):
3647 * tree-ssa-live.c (remove_unused_scope_block_p): Likewise.
3648 * tree.c (block_nonartificial_location): Likewise.
3649 (block_ultimate_origin): Likewise.
3650 * tree-pretty-print.c (percent_K_format): Likewise. Remove
3651 no longer needed LTO case.
3653 2018-09-28 Andrew Stubbs <ams@codesourcery.com>
3654 Jan Hubicka <jh@suse.cz>
3655 Martin Jambor <mjambor@suse.cz>
3657 * simplify-rtx.c (simplify_merge_mask): New function.
3658 (simplify_ternary_operation): Use it, also see if VEC_MERGEs with the
3659 same masks are used in op1 or op2.
3660 (test_vec_merge): New function.
3661 (test_vector_ops): Call test_vec_merge.
3663 2018-09-28 Eric Botcazou <ebotcazou@adacore.com>
3665 * config/sparc/sparc-protos.h (sparc_branch_cost): Declare.
3666 * config/sparc/sparc.h (BRANCH_COST): Call sparc_branch_cost.
3667 * config/sparc/sparc.c (struct processor_costs): Add branch_cost field.
3668 (cypress_costs): Set it.
3669 (supersparc_costs): Likewise.
3670 (hypersparc_costs): Likewise.
3671 (leon_cost): Likewise.
3672 (leon3_costs): Likewise.
3673 (sparclet_costs): Likewise.
3674 (ultrasparc_costs): Likewise.
3675 (ultrasparc_costs): Likewise.
3676 (niagara_costs): Likewise.
3677 (niagara2_costs): Likewise.
3678 (niagara3_costs): Likewise.
3679 (niagara4_costs): Likewise.
3680 (niagara7_costs): Likewise.
3681 (m8_costs): Likewise.
3682 (TARGET_CAN_FOLLOW_JUMP): Define.
3683 (pass_work_around_errata::gate): Minor tweak.
3684 (sparc_option_override): Remove MASK_FSMULD mask for V7 processors.
3685 Do not set both MASK_VIS4 and MASK_VIS4B for M8 processor.
3686 Automaitcally clear MASK_FSMULD mask for V7 processors.
3687 (sparc_can_follow_jump): New static function.
3688 (output_ubranch): Deal with CROSSING_JUMP_P.
3689 (sparc_use_sched_lookahead): Rewrite using switch statement.
3690 (sparc_issue_rate): Reorder.
3691 (sparc_branch_cost): New function.
3693 2018-09-27 Martin Sebor <msebor@redhat.com>
3695 * tree.h (tree_to_shwi): Add attribute nonnull and pure.
3696 (tree_to_poly_int64, tree_to_uhwi, tree_to_poly_uint64): Same.
3697 (int_fits_type_p): Same.
3699 2018-09-27 Uros Bizjak <ubizjak@gmail.com>
3701 * config/i386/i386.md (FPCR_REG): Remove.
3702 (UNSPEC_FLDCW): Remove.
3703 (x86_fnstcw_1): Use (const_int 0) instead of FPCR_REG.
3704 (x86_fldcw_1): Remove insn pattern.
3705 (fnstenv): Do not clobber FPCR_REG.
3707 * config/i386/i386.h (FIXED_REGISTERS) Remove fpsr register.
3708 (CALL_USED_REGISTERS): Ditto.
3709 (REG_ALLOC_ORDER): Ditto.
3710 (REG_CLASS_CONTENTS): Ditto.
3711 (HI_REGISTER_NAMES): Ditto.
3712 (ADDITIONAL_REGISTER_NAMES): Use defines instead
3713 of numerical constants.
3714 * config/i386/i386.c (regclass_map): Remove fpsr register.
3715 (dbx_register_map): Ditto.
3716 (dbx64_register_map): Ditto.
3717 (svr4_dbx_register_map): Ditto.
3718 (print_reg): Do not handle FPCR_REG.
3720 2018-09-27 Segher Boessenkool <segher@kernel.crashing.org>
3723 * config.in (HAVE_AS_CMPB, HAVE_AS_DFP, HAVE_AS_FPRND, HAVE_AS_MFPGPR,
3724 HAVE_AS_POPCNTB, HAVE_AS_POPCNTD, HAVE_AS_POWER8, HAVE_AS_POWER9):
3725 Delete, always treat as true.
3726 * config/powerpcspe/powerpcspe.c (rs6000_option_override_internal):
3727 Ditto. Simplify remaining code.
3728 * config/powerpcspe/powerpcspe.h: Ditto.
3729 * config/rs6000/rs6000.c (rs6000_option_override_internal): Ditto.
3730 Simplify remaining code.
3731 (rs6000_expand_builtin): Ditto.
3732 * config/rs6000/rs6000.h: Ditto.
3733 * configure.ac: Ditto.
3734 * configure: Regenerate.
3736 2018-09-27 Martin Liska <mliska@suse.cz>
3738 * coverage.c (get_coverage_counts): Revert the formatting
3739 of missing profile opt info.
3741 2018-09-27 Richard Biener <rguenther@suse.de>
3745 * dwarf2out.c (set_block_origin_self): Do not mark outermost
3746 block as we do not output that.
3747 (gen_inlined_subroutine_die): Elide the originally outermost
3748 block, matching what we do for concrete instances.
3749 (decls_for_scope): Add parameter specifying whether to recurse
3752 2018-09-27 Andrew Stubbs <ams@codesourcery.com>
3753 Tom de Vries <tom@codesourcery.com>
3757 * expmed.c (emit_cstore): Fix handling of result_mode == BImode and
3758 STORE_FLAG_VALUE == 1.
3760 2018-09-27 Andreas Krebbel <krebbel@linux.ibm.com>
3762 * config/s390/s390.md (PPA_TX_ABORT, PPA_OOO_BARRIER): New
3763 constant definitions.
3764 ("tx_assist"): Replace magic number with PPA_TX_ABORT.
3765 ("*ppa"): Enable pattern also for -march=zEC12 -mno-htm.
3766 ("speculation_barrier"): New expander definition.
3768 2018-09-26 Indu Bhagat <indu.bhagat@oracle.com>
3770 PR gcov-profile/86957
3771 * common.opt: New warning option -Wmissing-profile.
3772 * coverage.c (get_coverage_counts): Add warning for missing .gcda file.
3773 * doc/invoke.texi: Document -Wmissing-profile.
3775 2018-09-26 Jim Wilson <jimw@sifive.com>
3777 * config/riscv/riscv.md (subsi3_extended2): Add J constraint.
3778 (negdi2, negsi2, negsi2_extended, negsi2_extended2): New.
3780 2018-09-26 Martin Sebor <msebor@redhat.com>
3782 * tree.c (zerop): Change return type to bool.
3783 (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.
3788 * tree.h (zerop): Same.
3789 (zerop, integer_zerop, integer_onep, integer_each_onep): Same.
3790 (integer_all_onesp, integer_minus_onep, integer_pow2p): Same.
3791 (integer_nonzerop, integer_truep, tree_ctz, real_zerop): Same.
3792 (real_onep, real_minus_onep, chain_index): Same.
3793 (print_type_hash_statistics, type_list_equal): Same.
3795 2018-09-26 Jim Wilson <jimw@sifive.com>
3797 * config/riscv/riscv.h (FUNCTION_ARG_REGNO_P): Fix comment.
3799 2018-09-26 Jakub Jelinek <jakub@redhat.com>
3802 * config/i386/i386.c: Include debug.h and dwarf2out.h.
3803 (output_indirect_thunk): Emit DW_CFA_def_cfa_offset after the
3806 2018-09-25 Andrew Stubbs <ams@codesourcery.com>
3808 * builtins.c (get_builtin_sync_mem): Force address mode conversion.
3810 2018-09-26 Uros Bizjak <ubizjak@gmail.com>
3812 * config/i386/i386.h (enum reg_class): Remove FP_TOP_SSE_REGS
3813 and FP_SECOND_SSE_REGS.
3814 (REG_CLASS_NAMES): Ditto.
3815 (REG_CLASS_CONTENTS): Ditto.
3816 * config/i386/i386.c (ix86_preferred_reload_class) Do not handle
3817 FP_TOP_SSE_REGS and FP_SECOND_SSE_REGS classes.
3818 (ix86_preferred_output_reload_class): Ditto.
3819 * config/i386/i386.md (fix_trunc<mode>_i387_fisttp): Change "=&1f"
3820 clobber constraint to "=&f".
3821 (fix_truncdi_i387): Ditto.
3822 (lrintxfdi2): Ditto.
3823 (fistdi2_<rounding>): Ditto.
3824 (fpremxf4_i387): Change "=u" constraint to "=f".
3825 (fprem1xf4_i387): Ditto.
3827 (fptanxf4_i387): Ditto.
3828 (fxtractxf3_i387): Ditto.
3829 (fscalexf4_i387): Ditto.
3830 (atan2xf3): Change "u" constraint to "f".
3831 (fyl2xxf3_i387): Ditto.
3832 (fyl2xp1xf3_i387): Ditto.
3834 2018-09-26 Uros Bizjak <ubizjak@gmail.com>
3837 * config/i386/i386.h (NUM_MODES_FOR_MODE_SWITCHING): Update
3838 for removed I387_MASK_PM entity.
3841 2018-09-26 Jeff Law <law@redhat.com>
3843 2018-09-26 Alexey Neyman <stilor@att.net>
3845 * graphite.h: Include <isl/id.h> and <isl/space.h>; these
3846 headers are no longer pulled in by <isl/val.h>.
3848 2018-09-26 Richard Biener <rguenther@suse.de>
3851 * dwarf2out.c (gen_lexical_block_die): Do not equate inline
3852 or concrete instance DIE to the tree. Create abstract origin
3853 attributes also for concrete instances.
3855 2018-09-26 Alexey Neyman <stilor@att.net>
3857 * graphite.h: Include <isl/id.h> and <isl/space.h>; these
3858 headers are no longer pulled in by <isl/val.h>.
3860 2018-09-26 Matthew Malcomson <matthew.malcomson@arm.com>
3862 * config/arm/arm.c (arm_split_compare_and_swap, arm_split_atomic_op):
3863 Use new helper functions.
3864 * config/arm/sync.md (atomic_load<mode>, atomic_store<mode>):
3865 Use new helper functions.
3866 * config/arm/aarch-common-protos.h (aarch_mm_needs_acquire,
3867 aarch_mm_needs_release): New declarations.
3868 * config/arm/aarch-common.c (aarch_mm_needs_acquire,
3869 aarch_mm_needs_release): New.
3871 2018-09-26 Eric Botcazou <ebotcazou@adacore.com>
3873 * config/arm/arm.c (arm_reorg): Skip Thumb reorg pass for thunks.
3874 (arm32_output_mi_thunk): Deal with long calls.
3876 2018-09-26 Richard Biener <rguenther@suse.de>
3880 * tree-inline.c (expand_call_inline): When the location
3881 of the call is UNKNOWN_LOCATION use DECL_SOURCE_LOCATION
3882 or BUILTINS_LOCATION for the BLOCK_SOURCE_LOCATION of
3883 the inserted BLOCK to make inlined_function_outer_scope_p
3885 * dwarf2out.c (add_call_src_coords_attributes): Do not add
3886 coords for reserved locations.
3888 2018-09-25 Segher Boessenkool <segher@kernel.crashing.org>
3890 * config/rs6000/rs6000.md (*movcc_internal1): Use set_attr_alternative.
3891 (*call_indirect_nonlocal_sysv<mode>): Ditto.
3892 (*call_value_indirect_nonlocal_sysv<mode>): Ditto.
3893 (*sibcall_nonlocal_sysv<mode>): Ditto.
3894 (*sibcall_value_nonlocal_sysv<mode>): Ditto.
3895 (<bd>_<mode>): Ditto.
3896 (<bd>tf_<mode>): Ditto.
3898 2018-09-25 Segher Boessenkool <segher@kernel.crashing.org>
3900 * config/rs6000/altivec.md (*altivec_mov<mode>): Write the output
3901 control string as a list of templates instead of as C code.
3902 (*altivec_movti): Ditto.
3903 * config/rs6000/darwin.md (movdf_low_di): Ditto.
3905 2018-09-25 Jim Wilson <jimw@sifive.com>
3907 * config/riscv/riscv.c (riscv_split_symbol): Mark auipc label as weak
3908 when target symbol is weak.
3910 2018-09-25 Bernd Edlinger <bernd.edlinger@hotmail.de>
3913 * builtins.c (unterminated_array): Simplify.
3914 * expr.c (string_constant): Handle SSA_NAME. Add more exceptions
3915 where pointer arithmetic is safe.
3917 2018-09-25 Segher Boessenkool <segher@kernel.crashing.org>
3920 * config/rs6000/altivec.md (altivec_vspltb): Use
3921 const_0_to_15_operand instead of u5bit_cint_operand.
3922 (*altivec_vspltb_internal): Ditto.
3923 (altivec_vspltb_direct): Ditto.
3924 (altivec_vsplth): Use const_0_to_7_operand instead of
3926 (*altivec_vsplth_internal): Ditto.
3927 (altivec_vsplth_direct): Ditto.
3928 (altivec_vspltw): Use const_0_to_3_operand instead of
3930 (*altivec_vspltw_internal): Ditto.
3931 (altivec_vspltw_direct): Ditto.
3932 (altivec_vspltsf): Ditto.
3933 (*altivec_vspltsf_internal): Ditto.
3934 * config/rs6000/rs6000.c (rs6000_expand_binop_builtin): Handle the
3935 various splats with the proper size immediate. Reorder the various
3936 cases by ascending size of immediate, and put all such together.
3938 2018-09-25 Richard Biener <rguenther@suse.de>
3941 * dwarf2out.c (add_AT_external_die_ref): Remove now redundant
3943 (maybe_create_die_with_external_ref): Do not create
3944 DW_TAG_imported_unit here.
3945 (add_abstract_origin_attribute): Handle external BLOCK refs.
3946 (dwarf2out_abstract_function): Simplify LTO case.
3947 (dwarf2out_early_finish): Create DW_TAG_imported_unit explicitely
3948 rather than using maybe_create_die_with_external_ref.
3950 2018-09-25 Uros Bizjak <ubizjak@gmail.com>
3953 * config/i386/i386.md (frndintxf2_mask_pm): Remove.
3954 (frndintxf2_mask_pm_i387): Ditto.
3955 (nearbyintxf2): Rewrite expander pattern to match rintxf2.
3956 Enable for !flag_trapping_math.
3957 (nearbyint<mode>2): Enable x87 modes for !flag_trapping_math.
3958 Enable SSE modes for TARGET_SSE4_1 and expand them with round insn.
3959 Change operand 1 predicate to nonimmediate_operand.
3960 (attr "i387_cw"): Remove mask_pm.
3961 * config/i386/i386.h (enum ix86_stack_slot): Remove SLOT_CW_MASK_PM.
3962 (enum ix86_entity): Remove I387_MASK_PM.
3963 * config/i386/i386.c (ix86_i387_mode_needed): Do not
3964 handle I387_MASK_PM.
3965 (ix86_mode_needed): Ditto.
3966 (ix86_mode_after): Ditto.
3967 (ix86_mode_entry): Ditto.
3968 (ix86_mode_exit): Ditto.
3969 (emit_i387_cw_initialization): Do not handle I387_CW_MASK_PM.
3971 2018-09-25 Jakub Jelinek <jakub@redhat.com>
3973 * vr-values.c (vr_values::vr_values): Initialize to_remove_edges and
3974 to_update_switch_stmts to vNULL instead of calling create on them
3977 2018-09-25 Richard Biener <rguenther@suse.de>
3979 PR tree-optimization/87402
3980 * tree-ssa-sccvn.c (SSA_VISITED): Remove unused function.
3981 (visit_phi): Re-instantiate handling of supposed to be VARYING
3982 but non-VARYING backedge value.
3984 2018-09-25 Richard Biener <rguenther@suse.de>
3987 * dwarf2out.c (struct sym_off_pair): New.
3988 (external_die_map): New global.
3989 (lookup_decl_die): When in LTO create DIEs lazily from the
3991 (lookup_block_die): New function, create DIEs lazily in LTO.
3992 (equate_block_to_die): New function.
3993 (dwarf2out_die_ref_for_decl): During WPA get the association
3994 from the external DIE map.
3995 (dwarf2out_register_external_die): Record mapping into the
3997 (maybe_create_die_with_external_ref): New function split out from
3998 DIE generation part of old dwarf2out_register_external_die.
3999 (add_abstract_origin_attribute): Do not return the DIE. When
4000 in LTO reference externals directly.
4001 (dwarf2out_abstract_function): When in LTO ignore calls for
4002 decls with external DIEs (already present abstract instances).
4003 (gen_call_site_die): Adjust.
4004 (add_high_low_attributes): Likewise.
4005 (gen_lexical_block_die): Likewise.
4006 (gen_inlined_subroutine_die): Likewie.
4007 (gen_block_die): Likewise.
4008 (dwarf2out_inline_entry): Likewise.
4009 (dwarf2out_early_finish): In LTRANS phase create DW_TAG_imported_unit
4012 2018-09-25 Martin Liska <mliska@suse.cz>
4014 * ipa-fnsummary.c (estimate_node_size_and_time): Scale by two
4015 integers and not by a float value.
4017 2018-09-25 Martin Liska <mliska@suse.cz>
4020 * dbgcnt.c (dbg_cnt_process_single_pair): Return false
4022 * dumpfile.c (dump_enable_all): Remove extra parenthesis.
4023 * gcov-tool.c: Declare the function with ATTRIBUTE_NORETURN.
4024 * godump.c (go_format_type): Remove extra parenthesis.
4026 2018-09-25 Martin Liska <mliska@suse.cz>
4028 * alias.c (set_dest_equal_p): Remove unused function.
4029 * config/i386/i386.c (def_builtin_pure2): Likewise.
4030 * diagnostic-show-locus.c (class layout): Remove
4032 (layout::layout): Likewise here.
4033 * dump-context.h (class temp_dump_context): Likewise.
4034 * dwarf2out.c (add_AT_fde_ref): Remove unused function.
4035 (add_AT_loclistsptr): Likewise.
4036 (add_AT_offset): Likewise.
4037 (get_AT_hi_pc): Likewise.
4038 (is_comdat_die): Likewise.
4039 (type_is_enum): Likewise.
4040 (ceiling): Likewise.
4041 (add_AT_vms_delta): Likewise.
4042 (is_class_die): Likewise.
4043 * edit-context.c (class line_event): Remove unused field.
4044 * graphite-sese-to-poly.c (tree_int_to_gmp): Remove
4046 * ipa-cp.c (ipa_get_vr_lat): Likewise.
4047 * lra-constraints.c (ok_for_index_p_nonstrict): Likewise.
4048 (ok_for_base_p_nonstrict): Likewise.
4049 * tree-chrec.c (is_not_constant_evolution): Likewise.
4050 (chrec_fold_poly_cst): Likewise.
4051 * tree-if-conv.c (has_pred_critical_p): Likewise.
4052 * tree-ssa-coalesce.c (print_exprs): Likewise.
4053 * tree-ssa-pre.c (bitmap_set_contains_expr): Likewise.
4054 * tree-ssa-uninit.c (is_and_or_or_p): Likewise.
4055 * tree-vrp.c (value_ranges_intersect_p): Likewise.
4056 (value_range_nonnegative_p): Likewise.
4058 2018-09-25 Martin Liska <mliska@suse.cz>
4060 * config/powerpcspe/powerpcspe.c (rs6000_output_function_epilogue):
4061 Do not handle "GNU Pascal".
4062 * config/rs6000/rs6000.c (rs6000_output_function_epilogue):
4064 * config/sparc/sparc.c (sparc_pass_by_reference): Remove Pascal
4065 from documentation. Likewise.
4066 * dbxout.c (dbxout_range_type): Likewise.
4067 * doc/cpp.texi: Likewise.
4068 * doc/extend.texi: Likewise.
4069 * doc/frontends.texi: Likewise.
4070 * doc/invoke.texi: Remove Pascal entry.
4071 * tree.def (CLEANUP_POINT_EXPR): Likewise.
4072 * doc/rtl.texi (MODE_FUNCTION): Remove not used entry.
4074 2018-09-25 Martin Liska <mliska@suse.cz>
4077 * doc/invoke.texi: Document all parameters and remove default
4080 2018-09-25 Ilya Leoshkevich <iii@linux.ibm.com>
4083 * rtl.c (rtx_code_size): Take into account that EQ_ATTR_ALT
4084 contains HOST_WIDE_INTs when computing its size.
4086 2018-09-24 Jim Wilson <jimw@sifive.com>
4089 * config/riscv/riscv.h (STACK_BOUNDARY): Test riscv_abi == ABI_ILP32E
4091 (ABI_STACK_BOUNDARY, MAX_ARGS_IN_REGISTERS): Likewise.
4093 2018-09-24 Andrew Pinski <apinski@marvell.com>
4095 * config/aarch64/aarch64.c (aarch_macro_fusion_pair_p): Don't
4096 access prev before checking it for NULLness in the
4097 AARCH64_FUSE_CMP_BRANCH case.
4099 2018-09-24 H.J. Lu <hongjiu.lu@intel.com>
4102 * config/i386/i386.c (rest_of_insert_endbranch): Set
4103 endbr_queued_at_entrance to true and don't insert ENDBR if
4104 x86_function_profiler will be called.
4105 (x86_function_profiler): Insert ENDBR if endbr_queued_at_entrance
4107 * config/i386/i386.h (machine_function): Add
4108 endbr_queued_at_entrance.
4110 2018-09-24 Ilya Leoshkevich <iii@linux.ibm.com>
4112 * genattrtab.c (mk_attr_alt): Use alternative_mask.
4113 (attr_rtx_1): Adjust caching to match the new EQ_ATTR_ALT field
4115 (check_attr_test): Use alternative_mask.
4116 (get_attr_value): Likewise.
4117 (compute_alternative_mask): Use alternative_mask and XWINT.
4118 (make_alternative_compare): Use alternative_mask.
4119 (attr_alt_subset_p): Use XWINT.
4120 (attr_alt_subset_of_compl_p): Likewise.
4121 (attr_alt_intersection): Use alternative_mask and XWINT.
4122 (attr_alt_union): Likewise.
4123 (attr_alt_complement): Use HOST_WIDE_INT and XWINT.
4124 (mk_attr_alt): Use alternative_mask and HOST_WIDE_INT.
4125 (simplify_test_exp): Use alternative_mask and XWINT.
4126 (write_test_expr): Use alternative_mask and XWINT, adjust bit
4127 number calculation to support 64 bits. Generate code that
4128 checks 64-bit masks.
4129 (main): Use alternative_mask.
4130 * rtl.def (EQ_ATTR_ALT): Change field types from ii to ww.
4132 2018-09-24 Ilya Leoshkevich <iii@linux.ibm.com>
4135 * config/s390/s390.c (s390_emit_epilogue): Do not use PARALLEL
4136 RETURN+USE when returning via %r14.
4138 2018-09-24 Martin Liska <mliska@suse.cz>
4140 * gcov.c (output_lines): Print colorization legend
4141 for both flag_use_colors and flag_use_hotness_colors.
4144 2018-09-24 Martin Liska <mliska@suse.cz>
4146 * coverage.c (get_coverage_counts): Use warning_at
4147 with current_function_decl location. Use %qD in warning
4150 2018-09-24 Martin Liska <mliska@suse.cz>
4152 * memory-block.h (memory_block_pool::release): Annotate with
4153 valgrind that the memory is not accessible.
4155 2018-09-24 Martin Liska <mliska@suse.cz>
4158 * asan.c: Make asan_handled_variables extern.
4160 * cfgexpand.c (expand_stack_vars): Make sure
4161 a representative is unpoison if another
4162 variable in the partition is handled by
4163 use-after-scope sanitization.
4165 2018-09-24 Richard Biener <rguenther@suse.de>
4167 PR tree-optimization/63155
4168 * tree-ssa-propagate.c (add_ssa_edge): Avoid adding PHIs to
4169 the worklist when the edge of the respective argument isn't
4172 2018-09-23 Uros Bizjak <ubizjak@gmail.com>
4174 * config/i386/i386.h (enum reg_class): Rename MASK_REGS to
4175 ALL_MASK_REGS and MASK_EVEX_REGS to MASK_REGS.
4176 (MASK_CLASS_P): Update for rename.
4177 (MAYBE_MASK_CLASS_P): Ditto.
4178 (REG_CLASS_NAMES): Update.
4179 (REG_CLASS_CONTENT): Update.
4180 * config/i386/i386.c (regclass_map): Update for MASK_REG
4181 and ALL_MASK_REGS rename.
4182 * config/i386/constraints.md (Yk): Update for rename.
4185 2018-09-23 Uros Bizjak <ubizjak@gmail.com>
4187 * config/i386/i386.h (enum reg_class): Remove
4188 EVEX_SSE_REGS and MOD4_SSE_REGS.
4189 (REG_CLASS_NAMES): Update.
4190 (REG_CLASS_CONTENT): Update.
4191 * config/i386/i386.c (regclass_map): Declare AVX-512 SSE
4192 registers as ALL_SSE_REGS.
4193 (ix86_additional_allocno_class_p): Remove.
4194 (TARGET_ADDITIONAL_ALLOCNO_CLASS_P): Remove.
4195 (ix86_register_priority): Lower priority of EVEX SSE registers.
4196 Use IN_RANGE macro where appropriate.
4197 (ix86_hard_regno_mode_ok): Merge AVX-5124FMAPS and
4198 AVX-5124VNNIW checks.
4199 (ix86_modes_tieable_p): Tie 512-bit SSE modes.
4200 * config/i386/sse.md (avx5124fmaddps_4fmaddps)
4201 (avx5124fmaddps_4fmaddps_mask, avx5124fmaddps_4fmaddps_maskz)
4202 (avx5124fmaddps_4fmaddss, avx5124fmaddps_4fmaddss_mask)
4203 (avx5124fmaddps_4fmaddss_maskz, avx5124fmaddps_4fnmaddps)
4204 (avx5124fmaddps_4fnmaddps_mask, avx5124fmaddps_4fnmaddps_maskz)
4205 (avx5124fmaddps_4fnmaddss, avx5124fmaddps_4fnmaddss_mask)
4206 (avx5124fmaddps_4fnmaddss_maskz, avx5124vnniw_vp4dpwssd)
4207 (avx5124vnniw_vp4dpwssd_mask, avx5124vnniw_vp4dpwssd_maskz)
4208 (avx5124vnniw_vp4dpwssds, avx5124vnniw_vp4dpwssds_mask)
4209 (avx5124vnniw_vp4dpwssds_maskz): Use "v" instead of "Yh" constraint.
4210 * config/i386/constraints.md (Yh): Remove.
4212 2018-09-23 Uros Bizjak <ubizjak@gmail.com>
4214 * config/i386/i386.c (regclass_map): Declare integer REX registers
4217 2018-09-23 Gerald Pfeifer <gerald@pfeifer.com>
4219 * doc/service.texi (Service): Switch the fsf.org link to https.
4221 2018-09-22 Chung-Ju Wu <jasonwucj@gmail.com>
4224 * config/nds32/nds32.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
4225 Define to speculation_safe_value_not_needed.
4227 2018-09-21 Florian Weimer <fweimer@redhat.com>
4230 * doc/extend.texi (Common Function Attributes): Mention that
4231 noreturn suppresses tail call optimization.
4233 2018-09-21 Jeff Law <law@redhat.com>
4235 * gimple-ssa-evrp.c (evrp_dom_walker::cleanup): Call
4236 vr_values::cleanup_edges_and_switches.
4237 * tree-vrp.c (to_remove_edges, to_update_switch_stmts): Moved into
4239 (identify_jump_threads): Remove EDGE_IGNORE handling.
4240 (execute_vrp): Move handling of to_remove_edges and
4241 to_update_switch_stmts into vr_values class member functions.
4242 * tree-vrp.h (switch_update, to_remove_edges): Remove declarations.
4243 (to_update_switch_stmts): Likewise.
4244 * vr-values.c: Include cfghooks.h.
4245 (vr_values::vr_values): Initialize to_remove_edges and
4246 to_update_switch_stmts.
4247 (vr_values::~vr_values): Verify to_remove_edges and
4248 to_update_switch_stmts are empty.
4249 (vr_values::simplify_switch_using_ranges): Set EDGE_IGNORE as needed.
4250 (vr_values::cleanup_edges_and_switches): New member function.
4251 * vr-values.h (vr_values): Add cleanup_edges_and_switches member
4252 function. Add new data members.
4254 2018-09-21 David Malcolm <dmalcolm@redhat.com>
4256 PR tree-optimization/87309
4257 * dumpfile.c (dump_context::begin_scope): Filter the dump_loc
4258 calls with pflags and alt_flags.
4259 (selftest::test_capture_of_dump_calls): Add test of interaction of
4260 MSG_OPTIMIZED_LOCATIONS with AUTO_DUMP_SCOPE.
4262 2018-09-21 Olivier Hainque <hainque@adacore.com>
4264 * config.gcc: Factorize and comment inclusion of vxworks-dummy.h.
4266 2018-09-21 Olivier Hainque <hainque@adacore.com>
4268 * config/vxworks.h (CLEAR_INSN_CACHE): #define to 1.
4270 2018-09-21 Olivier Hainque <hainque@adacore.com>
4272 * config/vxworks.h (VXWORKS_LIBGCC_SPEC): Remove -lc_internal.
4273 Merge block comment with the one ahead of VXWORKS_LIBS_RTP. Then:
4274 (VXWORKS_LIBS_RTP): Minor reordering.
4276 2018-09-21 Olivier Hainque <hainque@adacore.com>
4278 * config/vxworks.h (STARTFILE_PREFIX_SPEC): Define.
4279 (VXWORKS_LIBS_DIR_RTP): Remove definition and use.
4281 2018-09-21 Olivier Hainque <hainque@adacore.com>
4283 * config/vxworks.h (SIZE_TYPE): Account for TARGET_VXWORKS64.
4284 (PTRDIFF_TYPE): Likewise.
4286 2018-09-21 Olivier Hainque <hainque@adacore.com>
4288 * config.gcc: Enforce def of TARGET_VXWORKS64 to 1 from
4289 triplet, similar to support for VxWorks7.
4290 * config/vxworks-dummy.h: Provide a default definition
4291 of TARGET_VXWORKS64 to 0.
4293 2018-09-21 Olivier Hainque <hainque@adacore.com>
4295 * config/vxworks.h (TARGET_VXWORKS7): Move default definition ...
4296 * config/vxworks-dummy.h: here.
4298 2018-09-21 Olivier Hainque <hainque@adacore.com>
4300 * config.gcc: Prepend vxworks-dummy.h to tm_file for powerpc*
4302 2018-09-21 Shaokun Zhang <zhangshaokun@hisilicon.com>
4303 Bo Zhou <zbo.zhou@hisilicon.com>
4305 * config/aarch64/aarch64-cores.def (tsv110): New CPU.
4306 * config/aarch64/aarch64-tune.md: Regenerated.
4307 * doc/invoke.texi (AArch64 Options/-mtune): Add "tsv110".
4308 * config/aarch64/aarch64.c (tsv110_tunings): New tuning table.
4309 * config/aarch64/aarch64-cost-tables.h: Add "tsv110" extra costs.
4311 2018-09-21 Andrew Stubbs <ams@codesourcery.com>
4312 Julian Brown <julian@codesourcery.com>
4314 * builtins.c (get_builtin_sync_mem): Handle address spaces.
4316 2018-09-21 Eric Botcazou <ebotcazou@adacore.com>
4318 * config/rs6000/rs6000.c (rs6000_function_ok_for_sibcall): Return false
4319 if the call takes a static chain.
4321 2018-09-21 Martin Liska <mliska@suse.cz>
4323 * auto-profile.c (autofdo_source_profile::read): Do not
4325 (read_profile): Do not add working sets.
4326 (read_autofdo_file): Remove sum_all.
4327 (afdo_callsite_hot_enough_for_early_inline): Remove const
4329 * coverage.c (struct counts_entry): Remove gcov_summary.
4330 (read_counts_file): Read new GCOV_TAG_OBJECT_SUMMARY,
4331 do not support GCOV_TAG_PROGRAM_SUMMARY.
4332 (get_coverage_counts): Remove summary and expected
4334 * coverage.h (get_coverage_counts): Likewise.
4335 * doc/gcov-dump.texi: Remove -w option.
4336 * gcov-dump.c (dump_working_sets): Remove.
4337 (main): Do not support '-w' option.
4338 (print_usage): Likewise.
4339 (tag_summary): Likewise.
4340 * gcov-io.c (gcov_write_summary): Do not dump
4342 (gcov_read_summary): Likewise.
4343 (gcov_histo_index): Remove.
4344 (gcov_histogram_merge): Likewise.
4345 (compute_working_sets): Likewise.
4346 * gcov-io.h (GCOV_TAG_OBJECT_SUMMARY): Mark
4348 (GCOV_TAG_PROGRAM_SUMMARY): Mark it obsolete.
4349 (GCOV_TAG_SUMMARY_LENGTH): Adjust.
4350 (GCOV_HISTOGRAM_SIZE): Remove.
4351 (GCOV_HISTOGRAM_BITVECTOR_SIZE): Likewise.
4352 (struct gcov_summary): Simplify rapidly just
4353 to runs and sum_max fields.
4354 (gcov_histo_index): Remove.
4355 (NUM_GCOV_WORKING_SETS): Likewise.
4356 (compute_working_sets): Likewise.
4357 * gcov-tool.c (print_overlap_usage_message): Remove
4358 trailing empty line.
4359 * gcov.c (read_count_file): Read GCOV_TAG_OBJECT_SUMMARY.
4360 (output_lines): Remove program related line.
4361 * ipa-profile.c (ipa_profile): Do not consider GCOV histogram.
4362 * lto-cgraph.c (output_profile_summary): Do not stream GCOV
4364 (input_profile_summary): Do not read it.
4365 (merge_profile_summaries): And do not merge it.
4366 (input_symtab): Do not call removed function.
4367 * modulo-sched.c (sms_schedule): Do not print sum_max.
4368 * params.def (HOT_BB_COUNT_FRACTION): Reincarnate param that was
4369 removed when histogram method was invented.
4370 (HOT_BB_COUNT_WS_PERMILLE): Mention that it's used only in LTO
4372 * postreload-gcse.c (eliminate_partially_redundant_load): Fix
4374 * predict.c (get_hot_bb_threshold): Use HOT_BB_COUNT_FRACTION
4375 and dump selected value.
4376 * profile.c (add_working_set): Remove.
4377 (get_working_sets): Likewise.
4378 (find_working_set): Likewise.
4379 (get_exec_counts): Do not work with working sets.
4380 (read_profile_edge_counts): Do not inform as sum_max is removed.
4381 (compute_branch_probabilities): Likewise.
4382 (compute_value_histograms): Remove argument for call of
4383 get_coverage_counts.
4384 * profile.h: Do not make gcov_summary const.
4386 2018-09-21 Monk Chiang <sh.chiang04@gmail.com>
4388 * config.gcc (nds32*-*-*): Set TARGET_DEFAULT_TLSDESC_TRAMPOLINE=0.
4390 2018-09-21 Eric Botcazou <ebotcazou@adacore.com>
4392 PR tree-optimization/86990
4393 * gimple-ssa-store-merging.c (imm_store_chain_info:coalesce_immediate):
4394 Check that the entire merged store group is made of constants only for
4397 2018-09-20 Allan Sandfeld Jensen <allan.jensen@qt.io>
4399 * gcc.c (LINK_COMMAND_SPEC): Handle -r like -nostdlib.
4400 (VTABLE_VERIFICATION_SPEC): Likewise.
4401 (SANITIZER_EARLY_SPEC): Likewise.
4402 (SANITIZER_SPEC): Likewise.
4403 * config/darwin.h (LINK_COMMAND_SPEC): Likewise.
4404 * doc/invoke.texi (Link Options): Document -r.
4406 2018-09-20 Richard Biener <rguenther@suse.de>
4409 * gimplify.c (gimplify_expr): Retain alignment of
4410 addressable lvalue in dereference.
4412 2018-09-20 Alexandre Oliva <aoliva@redhat.com>
4415 * configure.ac: Check for .loc is_stmt support.
4416 * configure, config.in: Rebuilt.
4417 * dwarf2out.c (dwarf2out_source_line): Skip is_stmt
4420 2018-09-20 Segher Boessenkool <segher@kernel.crashing.org>
4422 * config/rs6000/rs6000.opt (misel=no, misel=yes): Delete.
4423 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -misel=yes and
4426 2018-09-20 Segher Boessenkool <segher@kernel.crashing.org>
4428 * config/rs6000/rs6000-opts.h (enum rs6000_vector): Delete
4430 * config/rs6000/rs6000.c (rs6000_debug_vector_unit): Delete
4433 2018-09-20 Marek Polacek <polacek@redhat.com>
4435 * doc/invoke.texi: Add -Wno-init-list-lifetime to C++ Language Options.
4437 2018-09-20 Richard Sandiford <richard.sandiford@arm.com>
4439 PR tree-optimization/87288
4440 * tree-vect-loop.c (vect_analyze_loop_2): Take PEELING_FOR_GAPS
4441 into account when determining PEELING_FOR_NITERS.
4443 2018-09-20 Richard Sandiford <richard.sandiford@arm.com>
4445 PR tree-optimization/86877
4446 * tree-vect-loop.c (vect_analyze_loop_2): Call
4447 vect_verify_datarefs_alignment.
4449 2018-09-19 Marek Polacek <polacek@redhat.com>
4451 * doc/invoke.texi: Document -Wclass-conversion.
4453 2018-09-19 John David Anglin <danglin@gcc.gnu.org>
4455 * config/pa/pa.c (pa_adjust_priority): Delete.
4456 (TARGET_SCHED_ADJUST_PRIORITY): Delete define.
4458 * config/pa/pa.md (atomic_storeqi): Restore deleted expander.
4459 (atomic_storehi): Likewise.
4460 (atomic_storesi): Likewise.
4461 (atomic_loaddi): Restore compare and swap exchange loop code.
4463 2018-09-19 Segher Boessenkool <segher@kernel.crashing.org>
4465 PR rtl-optimization/86902
4466 * combine.c (try_combine): When changing the CC mode used, don't change
4467 an unrelated mode in other_insn to that new CC mode.
4469 2018-09-19 David Malcolm <dmalcolm@redhat.com>
4471 * tree-data-ref.c (runtime_alias_check_p): Use formatted printing
4472 with %T in place of calls to dump_generic_expr.
4473 (prune_runtime_alias_test_list): Likewise.
4474 (create_runtime_alias_checks): Likewise.
4475 * tree-vect-data-refs.c (vect_check_nonzero_value): Likewise.
4476 (vect_analyze_data_ref_dependence): Likewise.
4477 (vect_slp_analyze_data_ref_dependence): Likewise.
4478 (vect_record_base_alignment): Likewise. Use %G in place of call
4479 to dump_gimple_stmt.
4480 (vect_compute_data_ref_alignment): Likewise.
4481 (verify_data_ref_alignment): Likewise.
4482 (vect_find_same_alignment_drs): Likewise.
4483 (vect_analyze_group_access_1): Likewise.
4484 (vect_analyze_data_ref_accesses): Likewise.
4485 (dependence_distance_ge_vf): Likewise.
4486 (dump_lower_bound): Likewise.
4487 (vect_prune_runtime_alias_test_list): Likewise.
4488 (vect_find_stmt_data_reference): Likewise.
4489 (vect_analyze_data_refs): Likewise.
4490 (vect_create_addr_base_for_vector_ref): Likewise.
4491 (vect_create_data_ref_ptr): Likewise.
4492 * tree-vect-loop-manip.c (vect_set_loop_condition): Likewise.
4493 (vect_can_advance_ivs_p): Likewise.
4494 (vect_update_ivs_after_vectorizer): Likewise.
4495 (vect_gen_prolog_loop_niters): Likewise.
4496 (vect_prepare_for_masked_peels): Likewise.
4497 * tree-vect-loop.c (vect_determine_vf_for_stmt): Likewise.
4498 (vect_determine_vectorization_factor): Likewise.
4499 (vect_is_simple_iv_evolution): Likewise.
4500 (vect_analyze_scalar_cycles_1): Likewise.
4501 (vect_analyze_loop_operations): Likewise.
4502 (report_vect_op): Likewise.
4503 (vect_is_slp_reduction): Likewise.
4504 (check_reduction_path): Likewise.
4505 (vect_is_simple_reduction): Likewise.
4506 (vect_create_epilog_for_reduction): Likewise.
4507 (vect_finalize_reduction:): Likewise.
4508 (vectorizable_induction): Likewise.
4509 (vect_transform_loop_stmt): Likewise.
4510 (vect_transform_loop): Likewise.
4511 (optimize_mask_stores): Likewise.
4512 * tree-vect-patterns.c (vect_pattern_detected): Likewise.
4513 (vect_split_statement): Likewise.
4514 (vect_recog_over_widening_pattern): Likewise.
4515 (vect_recog_average_pattern): Likewise.
4516 (vect_determine_min_output_precision_1): Likewise.
4517 (vect_determine_precisions_from_range): Likewise.
4518 (vect_determine_precisions_from_users): Likewise.
4519 (vect_mark_pattern_stmts): Likewise.
4520 (vect_pattern_recog_1): Likewise.
4521 * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
4522 (vect_record_max_nunits): Likewise.
4523 (vect_build_slp_tree_1): Likewise.
4524 (vect_build_slp_tree_2): Likewise.
4525 (vect_print_slp_tree): Likewise.
4526 (vect_analyze_slp_instance): Likewise.
4527 (vect_detect_hybrid_slp_stmts): Likewise.
4528 (vect_detect_hybrid_slp_1): Likewise.
4529 (vect_slp_analyze_operations): Likewise.
4530 (vect_slp_analyze_bb_1): Likewise.
4531 (vect_transform_slp_perm_load): Likewise.
4532 (vect_schedule_slp_instance): Likewise.
4533 * tree-vect-stmts.c (vect_mark_relevant): Likewise.
4534 (vect_mark_stmts_to_be_vectorized): Likewise.
4535 (vect_init_vector_1): Likewise.
4536 (vect_get_vec_def_for_operand): Likewise.
4537 (vect_finish_stmt_generation_1): Likewise.
4538 (vect_check_load_store_mask): Likewise.
4539 (vectorizable_call): Likewise.
4540 (vectorizable_conversion): Likewise.
4541 (vectorizable_operation): Likewise.
4542 (vectorizable_load): Likewise.
4543 (vect_analyze_stmt): Likewise.
4544 (vect_is_simple_use): Likewise.
4545 (vect_get_vector_types_for_stmt): Likewise.
4546 (vect_get_mask_type_for_stmt): Likewise.
4547 * tree-vectorizer.c (increase_alignment): Likewise.
4549 2018-09-19 Andrew Stubbs <ams@codesourcery.com>
4551 * doc/rtl.texi: Adjust vec_select description.
4552 * simplify-rtx.c (simplify_binary_operation_1): Allow VEC_SELECT to use
4553 non-constant selectors.
4555 2018-09-19 Matthew Malcomson <matthew.malcomson@arm.com>
4557 * config/aarch64/aarch64-protos.h
4558 (aarch64_offset_9bit_signed_unscaled_p): New declaration.
4559 * config/aarch64/aarch64.md (arches): New "rcpc8_4" attribute value.
4560 (arch_enabled): Add check for "rcpc8_4" attribute value of "arch".
4561 * config/aarch64/aarch64.h (AARCH64_FL_RCPC8_4): New bitfield.
4562 (AARCH64_FL_FOR_ARCH8_4): Include AARCH64_FL_RCPC8_4.
4563 (AARCH64_FL_PROFILE): Move index so flags are ordered.
4564 (AARCH64_ISA_RCPC8_4): New flag.
4565 * config/aarch64/aarch64.c (offset_9bit_signed_unscaled_p): Renamed
4566 to aarch64_offset_9bit_signed_unscaled_p.
4567 * config/aarch64/atomics.md (atomic_store<mode>): Allow offset
4569 * config/aarch64/constraints.md (Ust): New constraint.
4570 * config/aarch64/predicates.md.
4571 (aarch64_9bit_offset_memory_operand): New predicate.
4572 (aarch64_rcpc_memory_operand): New predicate.
4574 2018-09-19 Eric Botcazou <ebotcazou@adacore.com>
4576 PR rtl-optimization/87361
4577 * rtlanal.c (nonzero_bits1): Revert accidental change.
4579 2018-09-19 Richard Biener <rguenther@suse.de>
4581 PR tree-optimization/87349
4582 PR tree-optimization/87342
4583 * tree-ssa-sccvn.c (do_rpo_vn): Iterate max_rpo computation.
4585 2018-09-18 Marek Polacek <polacek@redhat.com>
4587 P1064R0 - Allowing Virtual Function Calls in Constant Expressions
4588 * gimple-fold.c (gimple_get_virt_method_for_vtable): Adjust assert.
4590 2018-09-18 Segher Boessenkool <segher@kernel.crashing.org>
4592 * config/rs6000/rs6000.md: Remove old "Cygnus sibcall" comment.
4594 2018-09-18 Segher Boessenkool <segher@kernel.crashing.org>
4596 PR rtl-optimization/86882
4597 * rtlanal.c (reg_overlap_mentioned_p): Handle CLOBBER.
4599 2018-09-18 Uros Bizjak <ubizjak@gmail.com>
4601 * config/i386/i386.md (*<code>extend<mode>xf2): Macroize insn from
4602 *<code>extendsfxf2 and *<code>extenddfxf2 using MODEF mode iterator.
4604 2018-09-18 Jonathan Wakely <jwakely@redhat.com>
4607 * doc/invoke.texi (Link Options): Fix formatting and grammar.
4609 2018-09-18 Richard Biener <rguenther@suse.de>
4612 * tree-ssa-coalesce.c (tree_int_map_hasher): Remove.
4613 (compute_samebase_partition_bases): Likewise.
4614 (coalesce_ssa_name): Always use compute_optimized_partition_bases.
4615 (gimple_can_coalesce_p): Simplify.
4617 2018-09-18 Hans-Peter Nilsson <hp@bitrange.com>
4619 Handle a library implementation of ffs calling __builtin_ffs.
4620 * config/mmix/mmix.c (TARGET_INIT_LIBFUNCS): Override with...
4621 (mmix_init_libfuncs): New function: make __builtin_ffs expand
4624 2018-09-17 David Malcolm <dmalcolm@redhat.com>
4626 * diagnostic-show-locus.c (class layout_range): Add field
4628 (layout_range::layout_range): Add "original_idx" param and use it
4629 to initialize new field.
4630 (make_range): Use 0 for original_idx.
4631 (layout::layout): Pass in index to calls to
4632 maybe_add_location_range.
4633 (layout::maybe_add_location_range): Add param "original_idx" and
4634 pass it on to layout_range.
4635 (layout::print_any_labels): Pass on range->m_original_idx to
4637 (gcc_rich_location::add_location_if_nearby): Use 0 for
4639 * gcc-rich-location.h (text_range_label::get_text): Update for new
4641 (range_label_for_type_mismatch::get_text): Likewise.
4643 2018-09-17 Uros Bizjak <ubizjak@gmail.com>
4645 * config/i386/i386.c (ix86_emit_i387_log1p): Emit fldln2 earlier.
4647 2018-09-17 David Malcolm <dmalcolm@redhat.com>
4649 * gimple-ssa-sprintf.c (fmtwarn): Update for introduction of
4650 format_string_diagnostic_t.
4651 (fmtwarn_n): Likewise.
4652 * substring-locations.c
4653 (format_string_diagnostic_t::format_string_diagnostic_t) New ctor.
4654 (format_warning_n_va): Convert to...
4655 (format_string_diagnostic_t::emit_warning_n_va): ...this.
4656 (format_warning_va): Convert to...
4657 (format_string_diagnostic_t::emit_warning_va): ...this.
4658 (format_warning_at_substring): Convert to...
4659 (format_string_diagnostic_t::emit_warning): ...this.
4660 (format_warning_at_substring_n): Convert to...
4661 (format_string_diagnostic_t::emit_warning_n): ...this.
4662 * substring-locations.h (class format_string_diagnostic_t): New
4664 (format_warning_va): Convert to
4665 format_string_diagnostic_t::emit_warning_va.
4666 (format_warning_n_va): Convert to
4667 format_string_diagnostic_t::emit_warning_n_va.
4668 (format_warning_at_substring): Convert to
4669 format_string_diagnostic_t::emit_warning.
4670 (format_warning_at_substring_n): Convert to
4671 format_string_diagnostic_t::emit_warning_n.
4673 2018-09-17 Cesar Philippidis <cesar@codesourcery.com>
4674 Bernd Schmidt <bernds_cb1@t-online.de>
4676 * config/nvptx/nvptx.md (atomic_fetch_<logic><mode>): Enable with
4679 2018-09-17 Uros Bizjak <ubizjak@gmail.com>
4681 * config/i386/i386.md (truncxf<mode>2_i387_noop_unspec): Change
4682 operand 0 predicate to nonimmediate operand.
4683 (rint<mode>2_frndint): Remove insn pattern.
4684 (rint<mode>2): Change operand 1 predicate to general_operand.
4685 Extend operand 1 to XFmode and generate rintxf2 insn.
4686 (frndintxf2_<rounding>): Rename from frndint<mode>2_<rounding>.
4687 Do not use X87MODEF mode macro.
4688 (frndintxf2_<rounding>_i387): Rename from
4689 frndint<mode>2_<rounding>_i387. Do not use X87MODEF mode macro.
4690 (<rounding_insn><mode>2): For non-SSE modes, extend operand 1
4691 to XFmode and generate significandxf3 insn.
4693 2018-09-17 Richard Biener <rguenther@suse.de>
4695 PR tree-optimization/87328
4696 * tree-ssa-sccvn.c (process_bb): Remove assertion about not
4697 visiting unexecutable backedges when not iterating.
4698 (do_rpo_vn): Mark all edges not executable even when not
4701 2018-09-17 Martin Jambor <mjambor@suse.cz>
4704 * doc/invoke.texi (Warning Options): Likewise.
4706 2018-09-17 Richard Biener <rguenther@suse.de>
4708 PR tree-optimization/87301
4709 * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_cleanup): Properly
4710 clean EH info from leftover copy assignments.
4712 2018-09-17 Martin Liska <mliska@suse.cz>
4714 PR gcov-profile/85871
4715 * gcov.c (output_intermediate_file): Fix out of bounds
4718 2018-09-17 Vineet Gupta <vgupta@synopsys.com>
4720 * config/arc/arc.c: Object attributes for core4 not reflected
4722 * config/arc/arc.h: Don't restrict DBNZ to core3 (core4 includes
4725 2018-09-17 Alexey Brodkin <abrodkin@synopsys.com>
4727 * config/arc/linux.h (LINK_EH_SPEC): Add missing space.
4729 2018-09-17 Martin Liska <mliska@suse.cz>
4731 * doc/gcov.texi: Document new option --use-hotness-colors.
4732 * gcov.c (struct source_info): Declare new field.
4733 (source_info::source_info): Set default for maximum_count.
4734 (print_usage): Add new -q option.
4735 (process_args): Process it.
4736 (accumulate_line_info): Save src->maximum_count.
4737 (output_line_beginning): Make color line number if
4738 flag_use_hotness_colors is set.
4739 (output_line_details): Pass default argument value.
4740 (output_lines): Pass src->maximum_count.
4742 2018-09-17 Martin Liska <mliska@suse.cz>
4744 * common/config/i386/i386-common.c (ix86_get_valid_option_values):
4745 Use processor_names table.
4746 * config/i386/i386.c (ix86_default_align): Use
4747 processor_cost_table for alignment values.
4748 (ix86_option_override_internal): Use processor_names.
4749 (ix86_function_specific_print): Likewise.
4750 * config/i386/i386.h (struct processor_costs):
4751 Add alignment values.
4752 (struct ptt): Remove and replace with const char *.
4753 * config/i386/x86-tune-costs.h (struct processor_costs):
4754 Declare default alignments for all costs.
4756 2018-09-17 Aldy Hernandez <aldyh@redhat.com>
4758 * tree-vrp.c (extract_range_from_unary_expr): Do not special case
4759 symbolics or VR_VARYING ranges for ABS_EXPR.
4760 * wide-int-range.cc (wide_int_range_abs): Return positive numbers
4761 when range will wrap.
4763 2018-09-15 Eric Botcazou <ebotcazou@adacore.com>
4766 * cfgexpand.c (expand_gimple_basic_block): Be prepared for a BARRIER
4767 before and after a JUMP_TABLE_DATA.
4769 2018-09-14 John David Anglin <danglin@gcc.gnu.org>
4772 * dojump.c (do_compare_and_jump): Canonicalize function pointers
4773 when one operand is a function pointer. Use POINTER_TYPE_P and
4774 FUNC_OR_METHOD_TYPE_P.
4775 * expr.c (do_store_flag): Use POINTER_TYPE_P and FUNC_OR_METHOD_TYPE_P.
4776 * fold-const.c (build_range_check): Likewise.
4777 * match.pd (simple_comparison): Likewise.
4779 2018-09-14 David Malcolm <dmalcolm@redhat.com>
4782 * spellcheck.c (get_edit_distance_cutoff): New function.
4783 (selftest::test_edit_distance_unit_test_oneway): Rename to...
4784 (selftest::test_get_edit_distance_one_way): ...this.
4785 (selftest::test_get_edit_distance_unit): Rename to...
4786 (selftest::test_get_edit_distance_both_ways): ...this.
4787 (selftest::test_edit_distances): Move tests to this new function,
4788 and test some more pairs of strings. Update for above renaming.
4789 (selftest::get_old_cutoff): New function.
4790 (selftest::test_get_edit_distance_cutoff): New function.
4791 (selftest::assert_suggested_for): New function.
4792 (ASSERT_SUGGESTED_FOR): New macro.
4793 (selftest::assert_not_suggested_for): New function.
4794 (ASSERT_NOT_SUGGESTED_FOR): New macro.
4795 (selftest::test_suggestions): New function.
4796 (selftest::spellcheck_c_tests): Move test_get_edit_distance_unit
4797 tests to selftest::test_edit_distances and call it. Add calls to
4798 selftest::test_get_edit_distance_cutoff and
4799 selftest::test_suggestions.
4800 * spellcheck.h (get_edit_distance_cutoff): New function declaration.
4801 (best_match::consider): Replace hard-coded cutoff calculation with
4803 (best_match::get_cutoff): New declaration.
4804 (best_match::get_best_meaningful_candidate): Likewise.
4806 2018-09-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
4808 * builtins.c (fold_builtin_strlen): Remove TODO comment.
4810 2018-09-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
4813 2018-07-30 Bernd Edlinger <bernd.edlinger@hotmail.de>
4815 * tree-ssa-forwprop.c (simplify_builtin_call): Don't create a not NUL
4816 terminated string literal.
4818 2018-09-14 Martin Sebor <msebor@redhat.com>
4820 * builtins.c (unterminated_array): Handle ARRAY_REF.
4821 (expand_builtin_stpcpy_1): Detect unterminated char arrays.
4822 * builtins.h (unterminated_array): Declare extern.
4823 * gimple-fold.c (gimple_fold_builtin_stpcpy): Detect unterminated
4825 (gimple_fold_builtin_sprintf): Propagate NO_WARNING to transformed
4828 2018-09-14 Martin Sebor <msebor@redhat.com>
4829 Jeff Law <law@redhat.com>
4831 * builtins.c (unterminated_array): New.
4832 (expand_builtin_strcpy): Adjust.
4833 (expand_builtin_strcpy_args): Detect unterminated arrays.
4834 * gimple-fold.c (get_maxval_strlen): Add argument. Detect
4835 unterminated arrays.
4836 * gimple-fold.h (get_maxval_strlen): Add argument.
4837 (gimple_fold_builtin_strcpy): Detec unterminated arrays.
4839 * gimple-fold.c (get_range_strlen): Add argument.
4840 (get_maxval_strlen): Adjust.
4841 * gimple-fold.h (get_range_strlen): Add argument.
4843 2018-09-14 Wei Xiao <wei3.xiao@intel.com>
4845 * config/i386/movdirintrin.h: Fix copyright year.
4847 2018-09-14 Uros Bizjak <ubizjak@gmail.com>
4849 * reg-stack.c: Include regs.h.
4850 (replace_reg): Assert that mode is MODE_FLOAT or MODE_COMPLEX_FLOAT.
4851 (emit_pop_insn): Default pop insn mode to the reg_raw_mode of
4852 FIRST_STACK_REG, not DFmode.
4853 (emit_swap_insn): Default swap insn mode to the reg_raw_mode of
4854 FIRST_STACK_REG, not XFmode. Explicitly construct swap RTX.
4855 (change stack): Default register mode to the reg_raw_mode of
4856 FIRST_STACK_REG, not DFmode.
4857 * config/i386/i386.md (*swap<mode>): Remove insn pattern.
4858 (*swapxf): Rename from swapxf.
4860 2018-09-14 Carl Love <cel@us.ibm.com>
4862 * config/rs6000/emmintrin.h: Add _MM_SHUFFLE2.
4863 * config/rs6000/xmmintrin.h: Add _MM_SHUFFLE.
4865 2018-09-14 Segher Boessenkool <segher@kernel.crashing.org>
4868 * config/rs6000/rs6000.md (*mov<mode>_hardfloat64): Add Z to the Y
4871 2018-09-14 Sam Tebbs <sam.tebbs@arm.com>
4874 * config/aarch64/aarch64.md (*aarch64_bfxilsi_uxtw): Define.
4876 2018-09-14 Jason Merrill <jason@redhat.com>
4878 Fix --enable-gather-detailed-mem-stats.
4879 * hash-table.c (hash_table_usage): Change from variable to function.
4880 * hash-table.h: Adjust.
4881 * Makefile.in: Add missing dependencies on hash-table.h.
4883 2018-09-14 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
4885 PR tree-optimization/87259
4887 (pass_cse_reciprocals::execute): Run optimize_recip_sqrt after
4888 execute_cse_reciprocals_1 has tried transforming.
4890 2018-09-14 Aldy Hernandez <aldyh@redhat.com>
4892 * tree-vrp.c (extract_range_from_binary_expr_1): Normalize
4893 VR_VARYING for PLUS/MINUS_EXPR.
4895 2018-09-14 Ilya Leoshkevich <iii@linux.ibm.com>
4897 * config/s390/s390-passes.def (INSERT_PASS_BEFORE): Improve
4900 2018-09-14 Richard Biener <rguenther@suse.de>
4903 * tree-ssa-coalesce.c (ssa_conflicts_merge): Remove conflict
4904 bits for the merged partition.
4906 2018-09-13 Martin Sebor <msebor@redhat.com>
4907 Bernd Edlinger <bernd.edlinger@hotmail.de>
4909 * builtins.h (c_srlen): Add argument.
4910 * builtins.c (warn_string_no_nul): New function.
4911 (c_strlen): Add argument and use it. Update recursive calls.
4912 Pass DECL argument to string_constant to get info on non
4913 terminated strings. Update *NONSTR as needed.
4914 (fold_builtin_strlen): Add argument to calls to c_strlen.
4915 Warn for unterminated arrays.
4916 (warn_string_no_null): Add prototype.
4917 * expr.c (string_constant): Update arguments. Update recursive
4918 calls appropriately. Detect missing NUL terminator and outermost
4919 declaration its missing in.
4920 Improve checks for arrays with nonzero lower bound or elements
4921 that are not a single byte. Simplify offset computation.
4922 Simplify checks for non-NUL terminated strings.
4923 * gimple-fold.c (get_range_strlen): Add argument to c_strlen call.
4924 * gimple-ssa-sprintf.c (get_string_length): Remove unnecessary code.
4926 2018-09-13 Bernd Edlinger <bernd.edlinger@hotmail.de>
4928 * builtins.c (c_strlen): Handle not zero terminated STRING_CSTs
4930 * fold-const.c (c_getstr): Fix function comment. Remove unused third
4931 argument. Fix range checks.
4932 * fold-const.h (c_getstr): Adjust protoype.
4933 * gimple-fold.c (gimple_fold_builtin_memory_op): Avoid folding when
4934 string is constant but contains no NUL byte.
4936 * expr.c (string_constant): Adjust function comment.
4937 Remove bogus check for zero termination.
4939 * fold-const.c (c_getstr): Clamp STRING_LENGTH to STRING_SIZE.
4941 * varasm.c (compare_constant): Compare type size of STRING_CSTs.
4942 (get_constant_size): Don't make STRING_CSTs larger than they are.
4943 (check_string_literal): New check function for STRING_CSTs.
4944 (output_constant): Use it.
4946 2018-09-13 Eric Botcazou <ebotcazou@adacore.com>
4949 * config/visium/visium.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define.
4951 2018-09-13 Richard Biener <rguenther@suse.de>
4953 PR tree-optimization/87263
4954 * tree-ssa-sccvn.c (visit_phi): Revert some earlier changes.
4955 (struct unwind_state): Add max_rpo field.
4956 (do_rpo_vn): Allow up-to-date loop state to be used when not iterating.
4957 Compute max_rpo, the max RPO number a block can be backwards reached
4958 from. Re-write non-iterating mode to a RPO ordered worklist approach,
4959 separating it from the iterating mode.
4961 2018-09-13 Vlad Lazar <vlad.lazar@arm.com>
4963 * haifa-sched.c (rank_for_schedule): Schedule by INSN_COST.
4964 (rfs_decision): New scheduling decision.
4966 2018-09-13 Richard Biener <rguenther@suse.de>
4969 * tree-ssa-sccvn.c (vn_nary_op_insert_into): Fix assert.
4970 (vn_nary_op_insert_pieces_predicated): Do not write useless
4971 valid_dominated_by_p entry outside of the allocated storage.
4973 2018-09-13 Omar Sandoval <osandov@osandov.com>
4974 Tom de Vries <tdevries@suse.de>
4977 * dwarf2out.c (is_c): New function.
4978 (add_subscript_info): Add DW_AT_count of 0 for C zero-length arrays.
4980 2018-09-13 Sam Tebbs <sam.tebbs@arm.com>
4983 * config/aarch64/aarch64.md (*aarch64_bfxil):
4985 * config/aarch64/constraints.md (Ulc): Define.
4986 * config/aarch64/aarch64-protos.h (aarch64_high_bits_all_ones_p):
4988 * config/aarch64/aarch64.c (aarch64_high_bits_all_ones_p):
4991 2018-09-13 Vlad Lazar <vlad.lazar@arm.com>
4993 * config/aarch64/aarch64.h (TARGET_COMPUTE_FRAME_LAYOUT): Define.
4994 * config/aarch64/aarch64.c (aarch64_expand_prologue): Remove
4995 aarch64_layout_frame call.
4996 (aarch64_expand_epilogue): Likewise.
4997 (aarch64_initial_elimination_offset): Likewise.
4998 (aarch64_get_separate_components): Likewise.
4999 (aarch64_use_return_insn_p): Likewise.
5000 (aarch64_layout_frame): Remove unneeded check.
5002 2018-09-13 Jakub Jelinek <jakub@redhat.com>
5004 * configure.ac: Only append
5005 " : (reconfigured) $TOPLEVEL_CONFIGURE_ARGUMENTS" to
5006 gcc_config_arguments if it was never reconfigured or last reconfigure
5007 was with different arguments.
5008 * configure: Regenerated.
5010 2018-09-13 Jakub Jelinek <jakub@redhat.com>
5011 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
5014 * expr.c (maybe_optimize_pow2p_mod_cmp): New function.
5015 (maybe_optimize_mod_cmp): Use it if integer_pow2p treeop1.
5017 2018-09-13 Jakub Jelinek <jakub@redhat.com>
5019 PR tree-optimization/87287
5020 * fold-const.c (fold_binary_loc) <case EQ_EXPR>: Move signed modulo
5021 X % C == 0 to X % (unsigned) C == 0 optimization to ...
5022 * match.pd (X % C == 0): ... here. New optimization.
5024 2018-09-12 Jakub Jelinek <jakub@redhat.com>
5027 * expr.h (maybe_optimize_mod_cmp): Declare.
5028 * expr.c (mod_inv): New function.
5029 (maybe_optimize_mod_cmp): New function.
5030 (do_store_flag): Use it.
5031 * cfgexpand.c (expand_gimple_cond): Likewise.
5033 2018-09-09 Cesar Philippidis <cesar@codesourcery.com>
5034 Julian Brown <julian@codesourcery.com>
5037 * gimplify.c (gimplify_scan_omp_clauses): Set
5038 target_firstprivatize_array_bases in OpenACC parallel and kernels
5039 region contexts. Remove GOMP_MAP_FIRSTPRIVATE_REFERENCE clauses from
5040 OpenACC data regions.
5042 2018-09-12 Uros Bizjak <ubizjak@gmail.com>
5044 * config/i386/i386.md (sqrt_extend<mode>xf3_i387): Remove.
5045 (sqrt<mode>2): Extend operand 1 to XFmode and generate sqrtxf3 insn.
5047 2018-09-12 Richard Biener <rguenther@suse.de>
5049 PR tree-optimization/87280
5050 * tree-ssa-sccvn.c (process_bb): Handle the case of executable
5051 edge but unreachable target.
5052 (do_rpo_vn): For conservatively handling a PHI only mark
5053 the backedge executable but not the block reachable.
5055 2018-09-12 Richard Biener <rguenther@suse.de>
5057 PR tree-optimization/87266
5058 * tree-ssa-sccvn.c (do_rpo_vn): Always iterate to not yet
5061 2018-09-12 Andreas Krebbel <krebbel@linux.ibm.com>
5063 * config/s390/s390.md (PFPO_RND_MODE_DFP, PFPO_RND_MODE_BFP): New
5065 ("trunc<BFP:mode><DFP_ALL:mode>2")
5066 ("trunc<DFP_ALL:mode><BFP:mode>2")
5067 ("extend<BFP:mode><DFP_ALL:mode>2")
5068 ("extend<DFP_ALL:mode><BFP:mode>2"): Set proper rounding mode
5069 according to the target operand type.
5071 2018-09-12 Jakub Jelinek <jakub@redhat.com>
5072 Andreas Krebbel <krebbel@linux.ibm.com>
5074 PR tree-optimization/86844
5075 * gimple-ssa-store-merging.c
5076 (imm_store_chain_info::coalesce_immediate): For overlapping stores, if
5077 there are any overlapping stores in between them, make sure they are
5078 also coalesced or we give up completely.
5080 2018-09-12 Jakub Jelinek <jakub@redhat.com>
5083 * fold-const.c (fold_ternary_loc) <case COND_EXPR>: Verify also that
5084 BIT_AND_EXPR's second operand is a power of two. Formatting fix.
5086 2018-09-12 Tom de Vries <tdevries@suse.de>
5088 * common.opt (gdescribe-dies): Add option.
5089 * dwarf2out.c (add_name_and_src_coords_attributes): Add description
5090 attribute for artifical and nameless decls.
5091 (dwarf2out_register_external_die): Add description attribute to
5092 external reference die.
5093 (add_desc_attribute): New functions.
5094 (gen_subprogram_die): Add description attribute to
5095 DW_TAG_call_site_parameter.
5096 * tree-pretty-print.c (print_generic_expr_to_str): New function.
5097 * tree-pretty-print.h (print_generic_expr_to_str): Declare.
5098 * doc/invoke.texi (@item Debugging Options): Add -gdescribe-dies and
5100 (@item -gdescribe-dies): Add.
5102 2018-09-12 Aldy Hernandez <aldyh@redhat.com>
5104 * tree-vrp.c (vrp_shift_undefined_p): Remove.
5105 (extract_range_from_binary_expr_1: Call
5106 wide_int_range_shift_undefined_p instead of vrp_shift_undefined_p.
5107 * wide-int-range.h (wide_int_range_shift_undefined_p): Do not
5110 2018-09-12 Aldy Hernandez <aldyh@redhat.com>
5112 * gimple-ssa-warn-alloca.c
5113 (alloca_type_and_limit::alloca_type_and_limit): Initialize limit
5114 field for ALLOCA_BOUND_*_LARGE.
5116 2018-09-11 Nathan Sidwell <nathan@acm.org>
5118 * gcc.c (load_specs, execute, run_attempt): Use %qs not '%s'.
5120 2018-09-11 Uros Bizjak <ubizjak@gmail.com>
5122 * reg-stack.c (subst_asm_stack_regs): Call replace_reg also
5123 for clobbers. Remove obsolete comment.
5125 2018-09-11 Uros Bizjak <ubizjak@gmail.com>
5127 * config/i386/i386.md (define_attr "type"): Remove mpxmov, mpxmk,
5128 mpxchk, mpxld and mpxst types.
5129 (define_attr length_immediate): Remove all processing of mpx types.
5130 (define_attr prefix_0f): Ditto.
5131 (define_attr memory): Ditto.
5133 2018-09-11 Uros Bizjak <ubizjak@gmail.com>
5135 * config/i386/i386.md (fyl2x_extend<mode>xf3_i387): Remove.
5136 (log<mode>2): Change operand 1 predicate to general_operand.
5137 Extend operand 1 to XFmode and generate logxf3 insn.
5138 (log10<mode>2): Change operand 1 predicate to general_operand.
5139 Extend operand 1 to XFmode and generate log10xf3 insn.
5140 (log2<mode>2): Change operand 1 predicate to general_operand.
5141 Extend operand 1 to XFmode and generate log2xf3 insn.
5142 (fyl2xp1_extend<mode>xf3_i387): Remove.
5143 (log1p<mode>2): Change operand 1 predicate to general_operand.
5144 Extend operand 1 to XFmode and generate log1pxf3 insn.
5145 (fxtract_extend<mode>xf3_i387): Remove.
5146 (logb<mode>2): Change operand 1 predicate to general_operand.
5147 Extend operand 1 to XFmode and generate logbxf3 insn.
5148 (ilogb<mode>2): Change operand 1 predicate to general_operand.
5149 Extend operand 1 to XFmode and generate fxtractxf3_i387 insn.
5150 (significand<mode>2): Change operand 1 predicate to general_operand.
5151 Extend operand 1 to XFmode and generate significandxf3 insn.
5153 2018-09-11 Nathan Sidwell <nathan@acm.org>
5155 * gcc.c (perror_with_name, pfatal_with_name): Delete.
5156 (load_specs): Use fatal_error.
5157 (DELETE_IF_ORDINARY, process_command): Use error.
5158 (execute, run_attempt): Use fatal_error.
5160 2018-09-11 Andrew Stubbs <ams@codesourcery.com>
5162 * diagnostic-core.h (sorry_at): New prototype.
5163 * diagnostic.c (sorry_at): New function.
5165 2018-09-11 Aldy Hernandez <aldyh@redhat.com>
5167 * tree-vrp.c (extract_range_from_binary_expr_1): Treat all divisions
5168 by zero as VR_UNDEFINED.
5170 2018-09-10 Uros Bizjak <ubizjak@gmail.com>
5172 * config/i386/i386.md (<sincos>xf2): Rename from *<sincos>xf2_i387.
5173 (*<sincos>_extend<mode>xf2_i387): Remove insn pattern.
5174 (<sincos>mode2): New expander.
5175 (sincos_extend<mode>xf3_i387): Remove insn pattern.
5176 (sincos -> sin, cos splitters): Remove splitter patterns.
5177 (sincos<mode>3): Change operand 2 predicate to general_operand.
5178 Extend operand 2 to XFmode and generate sincosxf3 insn.
5179 (fptanxf4_i387): Change mode of operands 0 and 3 to SFmode.
5180 Change operand 3 predicate to const1_operand.
5181 (fptan_extend<mode>xf4_i387): Remove insn pattern.
5182 (tanxf2): Update operands in the call to fptanxf4_i387.
5183 (tan<mode>2): Change operand 1 predicate to general_operand.
5184 Extend operand 1 to XFmode and generate tanxf3 insn.
5185 (atan2xf3): Rename from *fpatanxf3_i387.
5186 (fpatan_extend<mode>xf3_i387): Remove insn pattern.
5187 (atan2xf3): Remove expander.
5188 (atan2<mode<3): Change operand 1 and 2 predicates to general_operand.
5189 Extend operands 1 and 2 to XFmode and generate atan2xf3 insn.
5190 (atan<mode>2): Change operand 1 predicate to general_operand.
5191 Extend operand 1 to XFmode and generate atanxf3 insn.
5193 2018-09-10 Uros Bizjak <ubizjak@gmail.com>
5195 * config/i386/i386.md (x87/SSE constant load splitter): Use
5196 memory_operand instead of nonimmediate_operand for input operand
5199 2018-09-09 Uros Bizjak <ubizjak@gmail.com>
5201 * config/i386/i386.md (float partial SSE register stall splitter): Move
5202 splitter near its instruction pattern.
5203 (float_extend partial SSE register stall splitter): Ditto.
5204 (float_truncate partial SSE register stall splitter): Ditto.
5206 2018-09-09 Hans-Peter Nilsson <hp@bitrange.com>
5209 * config/mmix/mmix.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
5210 to speculation_safe_value_not_needed.
5213 * config/mmix/mmix.c (mmix_assemble_integer): Handle byte-size
5214 non-CONST_INT rtx:es using assemble_integer_with_op ".byte".
5215 (MMIX_CFUN_NEEDS_SAVED_EH_RETURN_ADDRESS): Don't call
5216 leaf_function_p, instead use has_hard_reg_initial_val.
5218 2018-09-09 Nathan Sidwell <nathan@acm.org>
5220 * gcc.h (pfatal_with_name): Don't declare here.
5221 * gcc.c (pfatal_with_name): Make static.
5223 2018-09-09 Xianmiao Qu <xianmiao_qu@c-sky.com>
5225 * config/csky/csky.md (*cskyv2_adddi3, *cskyv2_subdi3): Add
5228 2018-09-08 John David Anglin <danglin@gcc.gnu.org>
5230 PR rtl-optimization/85458
5231 * sel-sched.c (sel_target_adjust_priority): Allow backend adjust
5232 priority hook to reduce the priority of EXPR.
5234 2018-09-07 Uros Bizjak <ubizjak@gmail.com>
5236 * config/i386/i386.md (float<SWI48x:mode><MODEF:mode>2) Enable
5237 DImode for x87 on 32bit targets. Conditionally disable x87 modes
5238 with X87_ENABLE_FLOAT. Remove preparation code.
5239 (*float<SWI48:mode><MODEF:mode>2): Rename from
5240 *float<SWI48:mode><MODEF:mode>2_mixed. Handle x87, SSE and mixed
5241 math using "enabled" attribute.
5242 (*floatdi<MODEF:mode>2_i387): Rename from
5243 *float<SWI48x:mode><MODEF:mode>2_i387. Handle only DImode and
5244 enable for 32bit targets only.
5245 (floatdi<X87MODEF:mode>2_i387_with_xmm pre-reload splitter): New
5247 (floatdi<X87MODEF:mode>2_i387_with_xmm): Use register_operand
5248 as operand 1 predicate. Rewrite as define_insn_and_split.
5249 (floatdi<X87MODEF:mode>2_i387_with_xmm memory input splitter): Remove.
5251 2018-09-06 Uros Bizjak <ubizjak@gmail.com>
5253 * reg-stack.c (get_true_reg) <case FLOAT_TRUNCATE>: Reorder
5254 to fallthru to FLOAT case.
5256 2018-09-06 Will Schmidt <will_schmidt@vnet.ibm.com>
5259 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Update logic
5260 around folding of vec_sl to handle out of range shift values.
5262 2018-09-06 Uros Bizjak <ubizjak@gmail.com>
5264 * config/i386/i386.md (fix_trunc<mode>_fisttp_i387_1): Remove.
5265 Update callers to gen_fix_trunc<mode>_i387_fisttp
5266 (fix_trunc<mode>_i387_fisttp): Change operand 0 predicate to
5267 nonimmediate_operand.
5268 (fix_trunc<mode>_i387_fisttp_with_temp): Remove insn pattern
5269 and corresponding splitters.
5270 (*fix_trunc<mode>_i387_1): Always expand with fix_trunc<mode>_i387.
5271 (fix_truncdi_i387): Change operand 0 predicate to nonimmediate_operand.
5272 (fix_truncdi_i387_with_temp): Remove insn pattern
5273 and corresponding splitters.
5274 (fix_trunc<mode>_i387): Change operand 0 predicate to
5275 nonimmediate_operand.
5276 (fix_trunc<mode>_i387_with_temp): Remove insn pattern
5277 and corresponding splitters.
5278 (*fistdi2_1): Remove.
5280 (fistdi2_with_temp): Remove insn pattern and corresponding splitters.
5281 (lrintxfdi2): Remove expander. Reimplement as define_insn.
5282 (*fist<mode>2_1): Remove.
5283 (fist<mode>2): Ditto.
5284 (fist<mode>2_with_temp): Remove insn pattern and corresponding
5286 (lrintxf<mode>2): Remove expander. Reimplement as define_insn.
5287 (*fist<mode>2_<rounding>_1): Always expand with fist<mode>2_<rounding>.
5288 (fistdi2_<rounding>): Change operand 0 predicate to
5289 nonimmediate_operand.
5290 (fistdi2_<rounding>_with_temp): Remove insn pattern
5291 and corresponding splitters.
5292 (fist<mode>2_<rounding>): Change operand 0 predicate to
5293 nonimmediate_operand.
5294 (fist<mode>2_<rounding>_with_temp): Remove insn pattern
5295 and corresponding splitters.
5297 (*fixuns_trunc<mode>si2_avx512f_zext): Depend on TARGET_SSE_MATH.
5299 2018-09-06 Bernd Edlinger <bernd.edlinger@hotmail.de>
5301 * varasm.c (output_constructor_regular_field): Check TYPE_SIZE_UNIT of
5304 2018-09-06 Will Schmidt <will_schmidt@vnet.ibm.com>
5306 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add support for
5307 early gimple folding of vec_splat().
5308 * tree-vect-generic.c: Remove static from tree_vec_extract() definition.
5309 * gimple-fold.h: Add an extern define for tree_vec_extract().
5311 2018-09-06 Will Schmidt <will_schmidt@vnet.ibm.com>
5313 * config/rs6000/rs6000.c (fold_mergehl_helper): Add types_compatible_p
5314 wrappers around TREE_TYPE comparisons.
5316 2018-09-06 Ilya Leoshkevich <iii@linux.ibm.com>
5319 * config/s390/predicates.md: Add nonsym_memory_operand.
5320 * config/s390/s390.c (s390_legitimize_cs_operand): If operand
5321 contains a SYMBOL_REF, load it into an intermediate pseudo.
5322 (s390_emit_compare_and_swap): Legitimize operand.
5323 * config/s390/s390.md: Use the new nonsym_memory_operand
5324 with UNSPECV_CAS patterns.
5326 2018-09-06 Ilya Leoshkevich <iii@linux.ibm.com>
5329 * config/s390/s390-passes.def: New file.
5330 * config/s390/s390-protos.h (class rtl_opt_pass): Add forward
5332 (make_pass_s390_early_mach): Add declaration.
5333 * config/s390/s390.c (make_pass_s390_early_mach):
5334 (s390_option_override): Remove dynamic registration.
5335 * config/s390/t-s390: Add s390-passes.def.
5337 2018-09-06 Ilya Leoshkevich <iii@linux.ibm.com>
5339 * config/s390/s390.c (s390_decompose_constant_pool_ref):
5340 Remove UNSPEC_LTREL_BASE check.
5341 (annotate_constant_pool_refs): Likewise.
5342 (find_constant_pool_ref): Likewise.
5343 (find_ltrel_base): Removed.
5344 (replace_ltrel_base): Removed.
5345 (s390_mainpool_finish): Remove replace_ltrel_base call.
5346 (s390_chunkify_start): Remove pending LTREL_BASE logic.
5347 (s390_chunkify_finish): Remove replace_ltrel_base call.
5348 * config/s390/s390.md: Remove UNSPEC_LTREL_BASE.
5350 2018-09-06 Hans-Peter Nilsson <hp@axis.com>
5353 * config/cris/cris.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
5354 to speculation_safe_value_not_needed.
5356 2018-09-05 Cesar Philippidis <cesar@codesourcery.com>
5357 Bernd Schmidt <bernds_cb1@t-online.de>
5359 * config/nvptx/nvptx-opts.h: New file.
5360 * config/nvptx/nvptx.c (nvptx_file_start): Print the correct .target.
5361 * config/nvptx/nvptx.h: Include "nvptx-opts.h".
5363 (TARGET_SM35): New macro.
5364 * config/nvptx/nvptx.md (atomic_fetch_<logic><mode>): Enable with the
5366 * config/nvptx/nvptx.opt (ptx_isa, sm_30, sm_35): New enum and its
5368 (misa=): New option.
5369 * doc/invoke.texi (Nvidia PTX Options): Document -misa.
5371 2018-09-05 Uros Bizjak <ubizjak@gmail.com>
5373 * config/i386/i386.md (truncdfsf2): Remove expander.
5374 (truncdfsf2_with_temp): Ditto.
5375 (truncxf<mode>2): Ditto.
5376 (*truncdfsf_fast_mixed): Remove insn pattern.
5377 (*truncdfsf_fast_i387): Ditto.
5378 (*truncdfsf_mixed): Ditto.
5379 (*truncdfsf_i387): Ditto.
5380 (*truncdfsf2_i387_1): Ditto.
5381 (*truncxfsf2_mixed): Ditto.
5382 (*truncxfdf2_mixed): Ditto.
5383 (*truncxf<mode>2_i387_noop): Ditto. Update callers
5384 to call gen_truncxf<mode>2 instead.
5385 (*truncxf<mode>2_i387): Remove.
5386 (reg->reg splitters): Remove splitter pattern.
5387 (reg->mem splitters): Ditto.
5389 (truncdfsf2): New insn pattern.
5390 (truncxf<mode>2): Ditto.
5392 2018-09-05 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
5394 * tree-ssa-math-opts.c (is_mult_by): New function.
5395 (is_square_of): Use the above.
5396 (optimize_recip_sqrt): New function.
5397 (pass_cse_reciprocals::execute): Use the above.
5399 2018-09-05 Richard Biener <rguenther@suse.de>
5402 * tree-ssa-sccvn.c (rpo_elim::eliminate_push_avail): Make sure
5403 to zero-init the emplaced vec.
5405 2018-09-05 Martin Liska <mliska@suse.cz>
5407 PR tree-optimization/87205
5408 * tree-switch-conversion.c (pass_lower_switch::execute):
5409 Group cases for switch statements.
5411 2018-09-05 Richard Biener <rguenther@suse.de>
5413 PR tree-optimization/87217
5414 * tree-ssa-sccvn.c (vuse_valueize): New.
5415 (vn_reference_lookup_pieces): Use it.
5416 (vn_reference_lookup): Likewise.
5418 2018-09-05 Nathan Sidwell <nathan@acm.org>
5421 * stor-layout.c (place_field): Scan forwards to check last
5422 bitfield when ms_bitfield_placement is in effect.
5424 2018-09-05 Richard Biener <rguenther@suse.de>
5427 * tree-vect-stmts.c (vectorizable_simd_clone_call): Fix bogus
5430 2018-09-05 Siddhesh Poyarekar <siddhesh@sourceware.org>
5431 Kugan Vivekanandarajah <kugan.vivekanandarajah@linaro.org>
5433 * config/aarch64/falkor-tag-collision-avoidance.c: New file.
5434 * config.gcc (extra_objs): Build it.
5435 * config/aarch64/t-aarch64 (falkor-tag-collision-avoidance.o):
5437 * config/aarch64/aarch64-passes.def
5438 (pass_tag_collision_avoidance): New pass.
5439 * config/aarch64/aarch64.c (qdf24xx_tunings): Add
5440 AARCH64_EXTRA_TUNE_RENAME_LOAD_REGS to tuning_flags.
5441 (aarch64_classify_address): Remove static qualifier.
5442 (aarch64_address_info, aarch64_address_type): Move to...
5443 * config/aarch64/aarch64-protos.h: ... here.
5444 (make_pass_tag_collision_avoidance): New function.
5445 * config/aarch64/aarch64-tuning-flags.def (rename_load_regs):
5448 2018-09-05 Martin Liska <mliska@suse.cz>
5450 * doc/gcov.texi: Update documentation of humar
5452 * gcov.c (format_count): Print one decimal place, it provides
5453 more fine number of situations like '1G' vs. '1.4G'.
5455 2018-09-05 Martin Liska <mliska@suse.cz>
5458 * config/rs6000/rs6000.opt: Mark the option as Deprecated.
5459 * optc-gen.awk: Allow 'Var' for Deprecated options in order
5460 to generate a MASK value.
5462 2018-09-04 H.J. Lu <hongjiu.lu@intel.com>
5465 * dwarf2out.c (based_loc_descr): Allow hard frame pointer even
5466 if frame pointer isn't used.
5467 (compute_frame_pointer_to_fb_displacement): Likewise.
5469 2018-09-04 Jakub Jelinek <jakub@redhat.com>
5472 * common/config/i386/i386-common.c (OPTION_MASK_ISA_XSAVEOPT_SET,
5473 OPTION_MASK_ISA_XSAVES_SET, OPTION_MASK_ISA_XSAVEC_SET): Use
5474 OPTION_MASK_ISA_XSAVE_SET instead of OPTION_MASK_ISA_XSAVE.
5475 (OPTION_MASK_ISA_XSAVE_UNSET): Add OPTION_MASK_ISA_XSAVES_UNSET
5476 and OPTION_MASK_ISA_XSAVEC_UNSET.
5478 2018-09-04 Max Filippov <jcmvbkbc@gmail.com>
5480 * config/xtensa/xtensa.c (xtensa_expand_atomic): Reorder AND and
5481 XOR operations in NAND case.
5483 2018-09-04 Aldy Hernandez <aldyh@redhat.com>
5485 * wide-int-range.cc (wide_int_range_convert): New.
5486 * wide-int-range.h (wide_int_range_convert): New.
5487 * tree-vrp.c (extract_range_from_unary_expr): Abstract wide int
5488 code into wide_int_range_convert.
5489 (extract_range_into_wide_ints): Do not munge anti range constants
5490 into the entire domain. Just return the range back.
5492 2018-09-04 Martin Liska <mliska@suse.cz>
5494 * genmatch.c (output_line_directive): Add new argument
5496 (dt_simplify::gen_1): Encapsulate dump within __builtin_expect.
5498 2018-09-04 Jonathan Wakely <jwakely@redhat.com>
5500 * doc/invoke.texi (Option Summary): Add whitespace.
5502 * doc/invoke.texi (Option Summary): Add -Waligned-new.
5504 2018-09-04 Richard Biener <rguenther@suse.de>
5506 PR tree-optimization/87211
5507 * tree-ssa-sccvn.c (visit_phi): When value-numbering to a
5508 backedge value we're supposed to treat as VARYING also number
5509 the PHI to VARYING in case it got a different value-number already.
5511 2018-09-04 Aldy Hernandez <aldyh@redhat.com>
5513 * tree-vrp.c (vrp_can_optimize_bit_op): Remove.
5514 (extract_range_from_binary_expr_1): Do not call
5515 vrp_can_optimize_bit_op.
5516 * wide-int-range.cc (wide_int_range_can_optimize_bit_op): Make
5518 (wide_int_range_get_mask_and_bounds): New.
5519 (wide_int_range_optimize_bit_op): New.
5520 (wide_int_range_bit_ior): Call wide_int_range_optimize_bit_op.
5521 (wide_int_range_bit_and): Same.
5522 * wide-int-range.h (wide_int_range_can_optimize_bit_op): Remove.
5523 (wide_int_range_optimize_bit_op): New.
5524 (wide_int_range_get_mask_and_bounds): New.
5526 2018-09-04 Richard Biener <rguenther@suse.de>
5528 PR tree-optimization/87176
5529 * tree-ssa-sccvn.c (visit_phi): Remove redundant allsame
5530 variable. When value-numbering a virtual PHI node make sure
5531 to not value-number to the backedge value.
5533 2018-09-04 Jonathan Wakely <jwakely@redhat.com>
5535 * doc/extend.texi (Long Long, Hex Floats): Document support for
5536 long long and hex floats in more recent versions of ISO C++.
5538 2018-09-03 Richard Biener <rguenther@suse.de>
5540 PR tree-optimization/87177
5541 * tree-ssa-sccvn.c (vuse_ssa_val): Revert previous change, keep
5544 2018-09-03 Alexander Monakov <amonakov@ispras.ru>
5546 * bb-reorder.c (edge_order): Convert to C-qsort-style
5547 tri-state comparator.
5548 (reorder_basic_blocks_simple): Change std::stable_sort to
5551 2018-09-03 Alexander Monakov <amonakov@ispras.ru>
5553 * tree-loop-distribution.c (offset_cmp): Convert to C-qsort-style
5554 tri-state comparator.
5555 (fuse_memset_builtins): Change std::stable_sort to gcc_stablesort.
5557 2018-09-03 Alexander Monakov <amonakov@ispras.ru>
5559 * sort.cc (struct sort_ctx): New field 'nlim'. Use it...
5560 (mergesort): ... here as maximum count for using netsort.
5561 (gcc_qsort): Set nlim to 3 if stable sort is requested.
5562 (gcc_stablesort): New.
5563 * system.h (gcc_stablesort): Declare.
5565 2018-09-03 Alexander Monakov <amonakov@ispras.ru>
5567 * sort.cc (gcc_qsort) [CHECKING_P]: Call qsort_chk.
5568 * system.h (qsort): Always redirect to gcc_qsort. Update comment.
5569 * vec.c (qsort_chk): Do not call gcc_qsort. Update comment.
5571 2018-09-03 Segher Boessenkool <segher@kernel.crashing.org>
5573 * config/rs6000/rs6000.md (*mov<mode>_hardfloat32): Remove %U from the
5574 lxsdx and stxsdx alternatives.
5575 (*mov<mode>_hardfloat64): Ditto.
5576 * config/rs6000/vsx.md (*vsx_extract_<mode>_store): Ditto.
5578 2018-09-03 Richard Biener <rguenther@suse.de>
5580 PR tree-optimization/87200
5581 * tree-ssa-sccvn.c (vn_nary_build_or_lookup_1): Valueize a
5584 2018-09-03 Martin Liska <mliska@suse.cz>
5586 PR tree-optimization/87201
5587 * tree-switch-conversion.c (switch_decision_tree::balance_case_nodes):
5588 Fix parenthesis in an expression.
5590 2018-09-03 Richard Biener <rguenther@suse.de>
5592 PR tree-optimization/87197
5593 * tree-ssa-sccvn.c (vn_nary_build_or_lookup_1): Mark the new def
5594 visited. CSE the VN_INFO hashtable lookup.
5596 PR tree-optimization/87169
5597 * tree-ssa-sccvn.c (do_rpo_vn): When marking loops for not
5598 iterating make sure there's no extra backedges from irreducible
5599 regions feeding the header. Mark the destination block
5602 2018-09-03 Martin Liska <mliska@suse.cz>
5605 * common/common-target.def: Add TARGET_GET_VALID_OPTION_VALUES.
5606 * common/common-targhooks.c (default_get_valid_option_values):
5608 * common/common-targhooks.h (default_get_valid_option_values):
5610 * common/config/i386/i386-common.c: Move processor_target_table
5612 (ix86_get_valid_option_values): New function.
5613 (TARGET_GET_VALID_OPTION_VALUES): New macro.
5614 * config/i386/i386.c (struct ptt): Move to i386-common.c.
5615 (PTA_*): Move all defined masks into i386-common.c.
5616 (ix86_function_specific_restore): Use new processor_cost_table.
5617 * config/i386/i386.h (struct ptt): Moved from i386.c.
5618 (struct pta): Likewise.
5619 * doc/tm.texi: Document new TARGET_GET_VALID_OPTION_VALUES.
5620 * doc/tm.texi.in: Likewise.
5621 * opt-suggestions.c (option_proposer::suggest_option):
5622 Pass prefix to build_option_suggestions.
5623 (option_proposer::get_completions): Likewise.
5624 (option_proposer::build_option_suggestions): Use the new target
5626 * opts.c (struct option_help_tuple): New struct.
5627 (print_filtered_help): Use the new target hook.
5629 2018-09-03 Martin Liska <mliska@suse.cz>
5632 * predict.c (set_even_probabilities): Add likely_edges
5633 argument and handle cases where we have precisely one
5635 (combine_predictions_for_bb): Catch also likely_edges.
5636 (tree_predict_by_opcode): Handle gswitch statements.
5637 * tree-cfg.h (find_case_label_for_value): New declaration.
5638 (find_taken_edge_switch_expr): Likewise.
5639 * tree-switch-conversion.c (switch_decision_tree::balance_case_nodes):
5640 Find pivot in decision tree based on probabily, not by number of
5643 2018-09-02 Gerald Pfeifer <gerald@pfeifer.com>
5645 * doc/standards.texi (Standards): Update Objective-C reference.
5647 2018-09-01 Gerald Pfeifer <gerald@pfeifer.com>
5649 * doc/install.texi (Prerequisites): Update link for MPC.
5651 2018-09-01 Michael Matz <matz@suse.de>
5653 PR tree-optimization/87074
5654 * gimple-loop-jam.c (unroll_jam_possible_p): Check loop exit
5655 PHIs for outer-loop uses.
5657 2018-09-01 Gerald Pfeifer <gerald@pfeifer.com>
5659 * doc/generic.texi (OpenMP): Adjust link to openmp.org.
5660 * doc/invoke.texi (C Dialect Options): Ditto.
5662 2018-09-01 Gerald Pfeifer <gerald@pfeifer.com>
5664 * doc/install.texi (Prerequisites): Adjust link mpfr.org.
5666 2018-08-31 Richard Biener <rguenther@suse.de>
5668 PR tree-optimization/87168
5669 * tree-ssa-sccvn.c (SSA_VAL): Add visited output parameter.
5670 (rpo_elim::eliminate_avail): When OP was not visited it must
5673 2018-08-31 David Malcolm <dmalcolm@redhat.com>
5675 * tree-vrp.c (copy_value_range): Convert param "from" from
5676 "value_range *" to "const value_range *".
5677 (range_is_null): Likewise for param "vr".
5678 (range_int_cst_p): Likewise.
5679 (range_int_cst_singleton_p): Likewise.
5680 (symbolic_range_p): Likewise.
5681 (value_ranges_intersect_p): Likewise for both params.
5682 (value_range_nonnegative_p): Likewise for param "vr".
5683 (value_range_constant_singleton): Likewise.
5684 (vrp_set_zero_nonzero_bits): Likewise for param "ar".
5685 (extract_range_into_wide_ints): Likewise for param "vr".
5686 (extract_range_from_multiplicative_op): Likewise for params "vr0"
5688 (vrp_can_optimize_bit_op): Likewise.
5689 (extract_range_from_binary_expr_1): Likewise for params "vr0_" and
5691 (extract_range_from_unary_expr): Likewise.
5692 (debug_value_range): Likewise for param "vr".
5693 (value_range::dump): Add "const" qualifier.
5694 (vrp_prop::check_array_ref): Convert local "vr" from
5695 "value_range *" to "const value_range *".
5696 (vrp_prop::check_mem_ref): Likewise.
5697 (vrp_prop::visit_stmt): Likewise for local "old_vr".
5698 (vrp_intersect_ranges_1): Likewise for param "vr_1".
5699 (vrp_intersect_ranges): Likewise.
5700 (simplify_stmt_for_jump_threading): Likewise for local "vr".
5701 (vrp_prop::vrp_finalize): Likewise.
5702 * tree-vrp.h (value_range::dump): Add "const" qualifier.
5703 (vrp_intersect_ranges): Add "const" qualifier to params as above.
5704 (extract_range_from_unary_expr): Likewise.
5705 (value_range_constant_singleton): Likewise.
5706 (symbolic_range_p): Likewise.
5707 (copy_value_range): Likewise.
5708 (extract_range_from_binary_expr_1): Likewise.
5709 (range_int_cst_p): Likewise.
5710 (vrp_set_zero_nonzero_bits): Likewise.
5711 (range_int_cst_singleton_p): Likewise.
5713 2018-08-31 Vlad Lazar <vlad.lazar@arm.com>
5715 * config/aarch64/arm_neon.h (vabsd_s64): New.
5716 (vnegd_s64): Likewise.
5718 2018-08-31 Martin Jambor <mjambor@suse.cz>
5720 * ipa-cp.c (estimate_local_effects): Replace wrong MAX with MIN.
5722 2018-08-31 Martin Liska <mliska@suse.cz>
5724 * ipa-icf.c (sem_item::add_type): Use
5725 sem_item::m_type_hash_cache.
5726 * ipa-icf.h: Move the cache from sem_item_optimizer
5729 2018-08-31 Nathan Sidwell <nathan@acm.org>
5731 * doc/extend.texi (Backwards Compatibility): Remove implicit
5732 extern C leeway of () being (...).
5734 2018-08-31 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
5736 * ipa-inline.c (can_inline_edge_by_limits_p): Fix typos in comment.
5738 2018-08-31 Segher Boessenkool <segher@kernel.crashing.org>
5742 * config/rs6000/rs6000.md (lround<mode>di2): Gate on TARGET_FPRND.
5744 2018-08-31 Jakub Jelinek <jakub@redhat.com>
5747 * expmed.c (expand_mult_const): Use immed_wide_int_const instead of
5748 gen_int_mode. Formatting fixes.
5750 2018-08-30 Sandra Loosemore <sandra@codesourcery.com>
5752 * target.def (custom_function_descriptors): Improve documentation.
5753 * doc/tm.texi.in (Trampolines): Expand discussion of function
5754 descriptors and move TARGET_CUSTOM_FUNCTION_DESCRIPTORS to the
5755 beginning of the section.
5756 * doc/tm.texi: Regenerated.
5758 2018-08-30 Jose E. Marchesi <jose.marchesi@oracle.com>
5760 * cfg.h (class auto_edge_flag): Spell out the template-id of the
5761 base class in the initializer list. This is a workaround for
5762 building with older GCC.
5763 (class auto_bb_flag): Likewise.
5765 2018-08-30 Aaron Sawdey <acsawdey@linux.ibm.com>
5767 * config/rs6000/altivec.md (altivec_eq<mode>): Remove star.
5768 (altivec_vcmpequ<VI_char>_p): Remove star.
5769 * config/rs6000/rs6000-string.c (do_load_for_compare): Support
5771 (expand_strncmp_vec_sequence): New function.
5772 (emit_final_str_compare_vec): New function.
5773 (expand_strn_compare): Add support for vector strncmp.
5774 * config/rs6000/rs6000.opt (-mstring-compare-inline-limit): Change
5775 length specification to bytes.
5776 * config/rs6000/vsx.md (vsx_ld_elemrev_v16qi_internal): Remove star.
5777 (vcmpnezb_p): New pattern.
5778 * doc/invoke.texi (RS/6000 and PowerPC Options): Update documentation
5779 for option -mstring-compare-inline-limit.
5781 2018-08-30 Thiago Macieira <thiago.macieira@intel.com>
5783 * config/i386/i386.c (PTA_WESTMERE): Remove PTA_AES.
5784 (PTA_SKYLAKE): Add PTA_AES.
5785 (PTA_GOLDMONT): Likewise.
5787 2018-08-29 Jan Hubicka <jh@suse.cz>
5790 * lto-opts.c (lto_write_options): Always stream PIC/PIE mode.
5791 * lto-wrapper.c (merge_and_complain): Fix merging of PIC/PIE.
5793 2018-08-29 Jan Hubicka <jh@suse.cz>
5795 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not follow
5797 (hash_tree): Do not visit TYPE_STUB_DECL.
5798 * tree-streamer-out.c (write_ts_type_common_tree_pointers): Do not
5799 stream TYPE_STUB_DECL.
5800 * tree-streamer-in.c (lto_input_ts_type_common_tree_pointers): Likewise.
5801 * ipa-utils.h (type_with_linkage_p): Do not rely on TYPE_STUB_DECL
5802 after free_lang_data.
5803 (type_in_anonymous_namespace_p): Likewise.
5805 2018-08-29 Jan Hubicka <jh@suse.cz>
5807 * sreal.h (SREAL_PART_BITS): Change to 31; remove seemingly unnecessary
5808 comment that it has to be even number.
5809 (class sreal): Change m_sig type to int32_t.
5810 * sreal.c (sreal::dump, sreal::to_int, opreator+, operator-): Use
5811 int64_t for temporary calculations.
5812 (sreal_verify_basics): Drop one bit from minimum and maximum.
5814 2018-08-30 Richard Biener <rguenther@suse.de>
5816 PR tree-optimization/87147
5817 * tree-ssa-sccvn.c (SSA_VISITED): New function.
5818 (visit_phi): When the degenerate result is from the backedge and
5819 we didn't visit its definition yet drop to VARYING.
5820 (do_rpo_vn): Properly mark blocks with incoming backedges as executable.
5822 2018-08-29 Jan Hubicka <jh@suse.cz>
5824 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not walk
5826 (hash_tree): Likewise.
5828 2018-08-29 Jan Hubicka <jh@suse.cz>
5830 * tree.c (find_decls_types_r): Walk also TYPE_NEXT_PTR_TO
5831 and TYPE_NEXT_REF_TO.
5833 2018-08-29 Jan Hubicka <jh@suse.cz>
5835 * sreal.h (SREAL_PART_BITS): Change to 31; remove seemingly unnecessary
5836 comment that it has to be even number.
5837 (class sreal): Change m_sig type to int32_t.
5838 * sreal.c (sreal::dump, sreal::to_int, opreator+, operator-): Use
5839 int64_t for temporary calculations.
5840 (sreal_verify_basics): Drop one bit from minimum and maximum.
5842 2018-08-30 Tamar Christina <tamar.christina@arm.com>
5844 * config/aarch64/aarch64.c (aarch64_expand_movmem): Set TImode max.
5846 2018-08-30 Vlad Lazar <vlad.lazar@arm.com>
5849 * expmed.c (canonicalize_comparison): Use wi::sub instead of wi::add
5850 if to_add is negative.
5852 2018-08-29 Bernd Edlinger <bernd.edlinger@hotmail.de>
5855 * builtins.c (c_strlen): Improve range checks.
5857 2018-08-29 Martin Sebor <msebor@redhat.com>
5858 Jeff Law <law@redhat.com>
5860 PR tree-optimization/86714
5861 PR tree-optimization/86711
5862 * builtins.c (c_strlen): Add arguments to call to string_constant.
5863 * expr.c (string_constant): Add argument. Detect missing nul
5864 terminator and outermost declaration it's missing in.
5865 * expr.h (string_constant): Add argument.
5866 * fold-const.c (read_from_constant_string): Add arguments to call to
5868 (c_getstr): Likewise.
5869 * tree-ssa-forwprop.c (simplify_builtin_call): Likewise.
5871 * tree-ssa-strlen.c (get_stridx): Likewise.
5873 2018-08-29 Jan Hubicka <jh@suse.cz>
5875 * tree-streamer-in.c (lto_input_ts_function_decl_tree_pointers):
5876 Do not stream DECL_VINDEX.
5877 * tree-streamer-out.c (write_ts_function_decl_tree_pointers): Likewise.
5878 * tree.c (free_lang_data_in_decl): Clear DECL_VINDEX.
5879 (decl_function_context): Use DECL_VIRTUAL_P rather than DECL_VINDEX.
5881 2018-08-29 Richard Biener <rguenther@suse.de>
5883 * tree-ssa-sccvn.c (vuse_ssa_val): Return NULL for unvisited
5884 virtual operands that are not default defs to honor region
5886 (rpo_vn_valueize): Remove ineffective code here.
5888 2018-08-29 Richard Biener <rguenther@suse.de>
5890 PR tree-optimization/87132
5891 * tree-ssa-alias.c (get_continuation_for_phi): Do not translate
5892 when skipping defs reachable over backedges.
5894 2018-08-29 Richard Biener <rguenther@suse.de>
5896 * tree-core.h: Document use of deprecated_flag in SSA_NAME.
5897 * tree.h (SSA_NAME_POINTS_TO_READONLY_MEMORY): Define.
5898 * tree-into-ssa.c (pass_build_ssa::execute): Initialize
5899 function parameters SSA_NAME_POINTS_TO_READONLY_MEMORY from fnspec.
5900 * tree-ssa-sccvn.c (const_parms, init_const_parms): Remove.
5901 (vn_reference_lookup_3): Remove use of const_parms.
5902 (free_rpo_vn): Do not free const_parms.
5903 (do_rpo_vn): Do not call init_const_parms.
5904 * tree-ssa-alias.c (refs_may_alias_p_1): Honor
5905 SSA_NAME_POINTS_TO_READONLY_MEMORY.
5906 (call_may_clobber_ref_p_1): Likewise.
5908 2018-08-29 Alexander Monakov <amonakov@ispras.ru>
5911 * invoke.texi (Optimization Options): List -ftree-scev-cprop.
5913 (-ftree-scev-cprop): Document.
5915 2018-08-29 Jan Hubicka <jh@suse.cz>
5917 * sreal.h (normalize, normalize_up, normalize_down): Add new_sig/new_exp
5919 (sreal constructor): Update.
5920 * sreal.c (sreal:operator+, sreal:operator-, sreal:operator*,
5921 sreal:operator/): Update.
5923 2018-08-29 Martin Liska <mliska@suse.cz>
5925 * tree-switch-conversion.c (switch_conversion::expand):
5926 Strenghten assumption about gswitch statements.
5928 2018-08-29 Richard Biener <rguenther@suse.de>
5930 PR tree-optimization/87117
5931 * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_stmt): Only
5932 re-value-number released SSA VDEFs.
5934 2018-08-29 Richard Biener <rguenther@suse.de>
5936 PR tree-optimization/87126
5937 * tree-ssa-sccvn.c (vn_reference_insert): Remove assert.
5939 2018-08-28 Jim Wilson <jimw@sifive.com>
5941 * config/riscv/pic.md: Rewrite.
5942 * config/riscv/riscv.c (riscv_address_insns): Return cost of 3 for
5944 * config/riscv/riscv.md (ZERO_EXTEND_LOAD): Delete.
5945 (SOFTF, default_load, softload, softstore): New.
5947 2018-08-28 Jeff Law <law@redhat.com>
5949 * fold-const.c (fold_binary_loc): Remove recently added assert.
5951 2018-08-28 Joern Rennecke <joern.rennecke@riscy-ip.com>
5953 * genpreds.c (write_predicate_subfunction): Also add ATTRIBUTE_UNUSED
5954 to OP parmeter of generated function.
5956 2018-08-28 MCC CS <deswurstes@users.noreply.github.com>
5958 PR tree-optimization/87009
5959 * match.pd: Add boolean optimizations.
5961 2018-08-28 Martin Sebor <msebor@redhat.com>
5964 * calls.c (alloc_max_size): Treat HOST_WIDE_INT special.
5965 * gimple-ssa-warn-alloca.c (adjusted_warn_limit): New function.
5966 (pass_walloca::gate): Use it.
5967 (alloca_call_type): Same.
5968 (pass_walloca::execute): Same.
5969 * stor-layout.c (layout_decl): Treat HOST_WIDE_INT special.
5971 2018-08-28 David Malcolm <dmalcolm@redhat.com>
5973 * dumpfile.h (ATTRIBUTE_GCC_DUMP_PRINTF): Change version check on
5974 GCC_VERSION for usage of "__gcc_dump_printf__" format from
5977 2018-08-28 Richard Biener <rguenther@suse.de>
5979 PR tree-optimization/87124
5980 * tree-ssa-sccvn.c (vn_lookup_simplify_result): Guard against
5981 constants before looking up avail.
5983 2018-08-28 Jakub Jelinek <jakub@redhat.com>
5986 * calls.c (maybe_warn_nonstring_arg): Punt early if
5987 warn_stringop_overflow is zero. Don't call get_range_strlen
5988 on 3rd argument, keep iterating until lenrng[1] is INTEGER_CST.
5989 Swap comparison operands to have constants on rhs. Only use
5990 lenrng[1] if non-NULL and INTEGER_CST. Don't uselessly
5991 increment lenrng[0].
5993 2018-08-28 Richard Sandiford <richard.sandiford@arm.com>
5995 * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Fix unguarded
5996 use of tree_to_shwi. Remove duplicated test for the size being
5997 a whole number of bytes.
5999 2018-08-28 Richard Biener <rguenther@suse.de>
6001 PR tree-optimization/87117
6002 * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_cleanup):
6003 Handle removed stmt without LHS (GIMPLE_NOP).
6005 2018-08-28 Richard Biener <rguenther@suse.de>
6007 PR tree-optimization/87117
6008 * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Exclude
6009 void which is is_gimple_reg_type by checking for COMPLETE_TYPE_P.
6011 2018-08-28 Richard Biener <rguenther@suse.de>
6013 PR tree-optimization/87117
6014 * tree-ssa-pre.c (compute_avail): Do not make expressions
6015 with predicated values available.
6016 (get_expr_value_id): Assert we do not run into predicated value
6019 2018-08-28 Richard Biener <rguenther@suse.de>
6021 PR tree-optimization/87117
6022 * tree-ssa-operands.c (add_stmt_operand): STRING_CST may
6023 get virtual operands.
6024 (get_expr_operands): Handle STRING_CST like other decls.
6026 2018-08-28 Martin Liska <mliska@suse.cz>
6028 * tree.h: Update documentation of fndecl_built_in_p
6032 2018-08-27 Jeff Law <law@redhat.com>
6033 PR tree-optimization/87110
6034 * tree-ssa-dse.c (compute_trims): Handle non-constant
6037 2018-08-27 Martin Sebor <msebor@redhat.com>
6039 PR tree-optimization/86914
6040 * tree-ssa-strlen.c (maybe_set_strlen_range): Avoid MEM_REF.
6042 2018-08-27 Martin Sebor <msebor@redhat.com>
6044 PR tree-optimization/87112
6045 * builtins.c (expand_builtin_strnlen): Convert c_strlen result to
6046 the type of the bound argument.
6048 2018-08-27 Jeff Law <law@redhat.com>
6050 * tree-ssa-dse.c (compute_trims): Handle case where the reference's
6051 type does not have a TYPE_SIZE_UNIT.
6053 2018-08-27 Steve Ellcey <sellcey@cavium.com>
6055 * config/aarch64/aarch64-speculation.cc: Replace include of cfg.h
6056 with include of backend.h.
6058 2018-08-27 Richard Biener <rguenther@suse.de>
6060 PR tree-optimization/86927
6061 * tree-vect-loop.c (vect_create_epilog_for_reduction): Properly
6062 use const cond reduction code.
6064 2018-08-27 Alexander Monakov <amonakov@ispras.ru>
6066 PR tree-optimization/85758
6067 * match.pd ((X & Y) ^ Y): Add :s qualifier to inner expression.
6069 2018-08-27 David Malcolm <dmalcolm@redhat.com>
6072 * diagnostic-show-locus.c (class layout_range): Update for
6073 conversion of show_caret_p to a tri-state.
6074 (layout_range::layout_range): Likewise.
6075 (make_range): Likewise.
6076 (layout::maybe_add_location_range): Likewise.
6077 (layout::should_print_annotation_line_p): Don't show annotation
6078 lines for ranges that are SHOW_LINES_WITHOUT_RANGE.
6079 (layout::get_state_at_point): Update for conversion of
6080 show_caret_p to a tri-state. Bail out early for
6081 SHOW_LINES_WITHOUT_RANGE, so that such ranges don't affect
6082 underlining or source colorization.
6083 (gcc_rich_location::add_location_if_nearby): Update for conversion
6084 of show_caret_p to a tri-state.
6085 (selftest::test_one_liner_multiple_carets_and_ranges): Likewise.
6086 (selftest::test_one_liner_fixit_replace_equal_secondary_range):
6088 (selftest::test_one_liner_labels): Likewise.
6089 * gcc-rich-location.c (gcc_rich_location::add_expr): Update for
6090 conversion of show_caret_p to a tri-state.
6091 * pretty-print.c (text_info::set_location): Likewise.
6092 * pretty-print.h (text_info::set_location): Likewise.
6093 * substring-locations.c (format_warning_n_va): Likewise.
6094 * tree-diagnostic.c (default_tree_printer): Likewise.
6095 * tree-pretty-print.c (newline_and_indent): Likewise.
6097 2018-08-27 David Malcolm <dmalcolm@redhat.com>
6100 * diagnostic-show-locus.c (get_line_span_for_fixit_hint): Show the
6101 line above for line-insertion fix-it hints.
6102 (selftest::test_fixit_insert_containing_newline): Update the
6103 expected results, and add a test with line-numbering enabled.
6105 2018-08-27 Martin Liska <mliska@suse.cz>
6108 * sanopt.c (sanitize_rewrite_addressable_params): Ignore
6109 params with DECL_HAS_VALUE_EXPR_P.
6111 2018-08-27 Martin Liska <mliska@suse.cz>
6113 * config/i386/i386.c (ix86_expand_set_or_movmem): Dump
6114 selected expansion strategy.
6116 2018-08-27 Martin Liska <mliska@suse.cz>
6118 * builtins.h (is_builtin_fn): Remove and fndecl_built_in_p.
6119 * builtins.c (is_builtin_fn): Likewise.
6120 * attribs.c (diag_attr_exclusions): Use new function
6121 fndecl_built_in_p and remove check for FUNCTION_DECL if
6123 (builtin_mathfn_code): Likewise.
6124 (fold_builtin_expect): Likewise.
6125 (fold_call_expr): Likewise.
6126 (fold_builtin_call_array): Likewise.
6127 (fold_call_stmt): Likewise.
6128 (set_builtin_user_assembler_name): Likewise.
6129 (is_simple_builtin): Likewise.
6130 * calls.c (gimple_alloca_call_p): Likewise.
6131 (maybe_warn_nonstring_arg): Likewise.
6132 * cfgexpand.c (expand_call_stmt): Likewise.
6133 * cgraph.c (cgraph_update_edges_for_call_stmt_node): Likewise.
6134 (cgraph_edge::verify_corresponds_to_fndecl): Likewise.
6135 (cgraph_node::verify_node): Likewise.
6136 * cgraphclones.c (build_function_decl_skip_args): Likewise.
6137 (cgraph_node::create_clone): Likewise.
6138 * config/arm/arm.c (arm_insert_attributes): Likewise.
6139 * config/i386/i386.c (ix86_gimple_fold_builtin): Likewise.
6140 * dse.c (scan_insn): Likewise.
6141 * expr.c (expand_expr_real_1): Likewise.
6142 * fold-const.c (operand_equal_p): Likewise.
6143 (fold_binary_loc): Likewise.
6144 * gimple-fold.c (gimple_fold_stmt_to_constant_1): Likewise.
6145 * gimple-low.c (lower_stmt): Likewise.
6146 * gimple-pretty-print.c (dump_gimple_call): Likewise.
6147 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call):
6149 * gimple.c (gimple_build_call_from_tree): Likewise.
6150 (gimple_call_builtin_p): Likewise.
6151 (gimple_call_combined_fn): Likewise.
6152 * gimplify.c (gimplify_call_expr): Likewise.
6153 (gimple_boolify): Likewise.
6154 (gimplify_modify_expr): Likewise.
6155 (gimplify_addr_expr): Likewise.
6156 * hsa-gen.c (gen_hsa_insns_for_call): Likewise.
6157 * ipa-cp.c (determine_versionability): Likewise.
6158 * ipa-fnsummary.c (compute_fn_summary): Likewise.
6159 * ipa-param-manipulation.c (ipa_modify_formal_parameters): Likewise.
6160 * ipa-split.c (visit_bb): Likewise.
6161 (split_function): Likewise.
6162 * ipa-visibility.c (cgraph_externally_visible_p): Likewise.
6163 * lto-cgraph.c (input_node): Likewise.
6164 * lto-streamer-out.c (write_symbol): Likewise.
6165 * omp-low.c (setjmp_or_longjmp_p): Likewise.
6166 (lower_omp_1): Likewise.
6167 * predict.c (strip_predict_hints): Likewise.
6168 * print-tree.c (print_node): Likewise.
6169 * symtab.c (symtab_node::output_to_lto_symbol_table_p): Likewise.
6170 * trans-mem.c (is_tm_irrevocable): Likewise.
6171 (is_tm_load): Likewise.
6172 (is_tm_simple_load): Likewise.
6173 (is_tm_store): Likewise.
6174 (is_tm_simple_store): Likewise.
6175 (is_tm_abort): Likewise.
6176 (tm_region_init_1): Likewise.
6177 * tree-call-cdce.c (gen_shrink_wrap_conditions): Likewise.
6178 * tree-cfg.c (verify_gimple_call): Likewise.
6179 (move_stmt_r): Likewise.
6180 (stmt_can_terminate_bb_p): Likewise.
6181 * tree-eh.c (lower_eh_constructs_2): Likewise.
6182 * tree-if-conv.c (if_convertible_stmt_p): Likewise.
6183 * tree-inline.c (remap_gimple_stmt): Likewise.
6184 (copy_bb): Likewise.
6185 (estimate_num_insns): Likewise.
6186 (fold_marked_statements): Likewise.
6187 * tree-sra.c (scan_function): Likewise.
6188 * tree-ssa-ccp.c (surely_varying_stmt_p): Likewise.
6189 (optimize_stack_restore): Likewise.
6190 (pass_fold_builtins::execute): Likewise.
6191 * tree-ssa-dce.c (mark_stmt_if_obviously_necessary): Likewise.
6192 (mark_all_reaching_defs_necessary_1): Likewise.
6193 * tree-ssa-dom.c (dom_opt_dom_walker::optimize_stmt): Likewise.
6194 * tree-ssa-forwprop.c (simplify_builtin_call): Likewise.
6195 (pass_forwprop::execute): Likewise.
6196 * tree-ssa-loop-im.c (stmt_cost): Likewise.
6197 * tree-ssa-math-opts.c (pass_cse_reciprocals::execute): Likewise.
6198 * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Likewise.
6199 * tree-ssa-strlen.c (get_string_length): Likewise.
6200 * tree-ssa-structalias.c (handle_lhs_call): Likewise.
6201 (find_func_aliases_for_call): Likewise.
6202 * tree-ssa-ter.c (find_replaceable_in_bb): Likewise.
6203 * tree-stdarg.c (optimize_va_list_gpr_fpr_size): Likewise.
6204 * tree-tailcall.c (find_tail_calls): Likewise.
6205 * tree.c (need_assembler_name_p): Likewise.
6206 (free_lang_data_in_decl): Likewise.
6207 (get_call_combined_fn): Likewise.
6208 * ubsan.c (is_ubsan_builtin_p): Likewise.
6209 * varasm.c (incorporeal_function_p): Likewise.
6210 * tree.h (DECL_BUILT_IN): Remove and replace with
6212 (DECL_BUILT_IN_P): Transfort to fndecl_built_in_p.
6213 (fndecl_built_in_p): New.
6215 2018-08-27 Martin Liska <mliska@suse.cz>
6217 PR tree-optimization/86847
6218 * tree-switch-conversion.c (switch_decision_tree::dump_case_nodes):
6219 Dump also subtree probability.
6220 (switch_decision_tree::do_jump_if_equal): New function.
6221 (switch_decision_tree::emit_case_nodes): Handle special
6222 situations in balanced tree that can be emitted much simpler.
6223 Fix calculation of probabilities that happen in tree expansion.
6224 * tree-switch-conversion.h (struct cluster): Add
6226 (struct simple_cluster): Likewise.
6227 (struct case_tree_node): Add new function has_child.
6228 (do_jump_if_equal): New.
6230 2018-08-27 Martin Liska <mliska@suse.cz>
6232 * tree-switch-conversion.c (bit_test_cluster::find_bit_tests):
6233 Add new argument to bit_test_cluster constructor.
6234 (bit_test_cluster::emit): Set bits really number of values
6236 (bit_test_cluster::hoist_edge_and_branch_if_true): Add
6237 probability argument.
6238 * tree-switch-conversion.h (struct bit_test_cluster):
6239 Add m_handles_entire_switch.
6241 2018-08-27 Martin Liska <mliska@suse.cz>
6243 PR tree-optimization/86702
6244 * tree-switch-conversion.c (jump_table_cluster::emit):
6245 Make probabilities even for values in jump table
6246 according to number of cases handled.
6247 (switch_decision_tree::compute_cases_per_edge): Pass
6248 argument to reset_out_edges_aux function.
6249 (switch_decision_tree::analyze_switch_statement): Likewise.
6250 * tree-switch-conversion.h (switch_decision_tree::reset_out_edges_aux):
6253 2018-08-27 Martin Liska <mliska@suse.cz>
6255 * cfgexpand.c (expand_asm_stmt): Use label_to_block and pass
6256 cfun argument explicitly.
6257 * gimple-pretty-print.c (dump_gimple_switch): Likewise.
6258 * hsa-gen.c (gen_hsa_insns_for_switch_stmt): Use new
6259 function gimple_switch_default_bb.
6260 (convert_switch_statements):
6262 * ipa-fnsummary.c (set_switch_stmt_execution_predicate):
6263 * stmt.c (label_to_block_fn): Use label_to_block and pass
6264 cfun argument explicitly and use gimple_switch_label_bb.
6265 (expand_case): Likewise.
6266 * tree-cfg.c (lower_phi_internal_fn): Use label_to_block and pass
6267 cfun argument explicitly. Likewise.
6268 (make_edges_bb): Likewise.
6269 (make_cond_expr_edges): Likewise.
6270 (get_cases_for_edge): Likewise.
6271 (make_gimple_switch_edges): Likewise.
6272 (label_to_block_fn): Likewise.
6273 (label_to_block): Likewise.
6274 (make_goto_expr_edges): Likewise.
6275 (make_gimple_asm_edges): Likewise.
6276 (main_block_label): Likewise.
6277 (group_case_labels_stmt): Likewise.
6278 (find_taken_edge_computed_goto): Likewise.
6279 (find_taken_edge_switch_expr): Likewise.
6280 (gimple_verify_flow_info): Likewise.
6281 (gimple_redirect_edge_and_branch): Likewise.
6282 (gimple_switch_label_bb): New function.
6283 (gimple_switch_default_bb): Likewise.
6284 (gimple_switch_edge): Likewise.
6285 (gimple_switch_default_edge): Likewise.
6286 * tree-cfg.h (label_to_block_fn): Remove and replace ...
6287 (label_to_block): ... with this.
6288 (gimple_switch_label_bb): New.
6289 (gimple_switch_default_bb): Likewise.
6290 (gimple_switch_edge): Likewise.
6291 (gimple_switch_default_edge): Likewise.
6292 * tree-cfgcleanup.c (convert_single_case_switch): Use
6293 new gimple functions and pass new argument to label_to_block.
6294 (cleanup_control_flow_bb):
6295 * tree-eh.c (make_eh_dispatch_edges): Use label_to_block and pass
6296 cfun argument explicitly.
6297 (make_eh_edges): Likewise.
6298 (redirect_eh_dispatch_edge): Likewise.
6299 (lower_resx): Likewise.
6300 (lower_eh_dispatch): Likewise.
6301 (maybe_remove_unreachable_handlers): Likewise.
6302 (unsplit_eh): Likewise.
6303 (cleanup_empty_eh): Likewise.
6304 (verify_eh_edges): Likewise.
6305 (verify_eh_dispatch_edge): Likewise.
6306 * tree-ssa-dom.c (record_edge_info): Likewise.
6307 * tree-ssa-forwprop.c (simplify_gimple_switch_label_vec): Likewise.
6308 * tree-ssa-threadedge.c (thread_around_empty_blocks): Likewise.
6309 (thread_through_normal_block): Likewise.
6310 * tree-ssa-uncprop.c (associate_equivalences_with_edges): Likewise.
6311 * tree-ssa-uninit.c (convert_control_dep_chain_into_preds):
6312 * tree-switch-conversion.c (switch_conversion::collect): Use new
6314 (switch_conversion::check_final_bb): Likewise.
6315 (switch_conversion::gather_default_values): Pass new argument
6317 (switch_conversion::build_constructors): Likewise.
6318 (switch_decision_tree::compute_cases_per_edge): Use new
6319 gimple_switch_edge function.
6320 (switch_decision_tree::analyze_switch_statement): Pass new argument
6322 (switch_decision_tree::try_switch_expansion): Use
6323 gimple_switch_default_edge.
6324 * tree-vrp.c (find_switch_asserts): Pass new argument
6326 * vr-values.c (vr_values::vrp_visit_switch_stmt): Likewise.
6327 (vr_values::simplify_switch_using_ranges): Likewise.
6329 2018-08-27 Richard Biener <rguenther@suse.de>
6331 * cfganal.h (rev_post_order_and_mark_dfs_back_seme): Declare.
6332 * cfganal.c (rev_post_order_and_mark_dfs_back_seme): New function.
6334 * tree-ssa-sccvn.h (struct vn_pval): New structure.
6335 (struct vn_nary_op_s): Add unwind_to member. Add
6336 predicated_values flag and put result into a union together
6337 with a linked list of vn_pval.
6338 (struct vn_ssa_aux): Add name member to make maintaining
6339 a map of SSA name to vn_ssa_aux possible. Remove no longer
6340 needed info, dfsnum, low, visited, on_sccstack, use_processed
6341 and range_info_anti_range_p members.
6342 (run_scc_vn, vn_eliminate, free_scc_vn, vn_valueize): Remove.
6343 (do_rpo_vn, run_rpo_vn, eliminate_with_rpo_vn, free_rpo_vn):
6345 (vn_valueize): New global.
6346 (vn_context_bb): Likewise.
6347 (VN_INFO_RANGE_INFO, VN_INFO_ANTI_RANGE_P, VN_INFO_RANGE_TYPE,
6348 VN_INFO_PTR_INFO): Remove.
6349 * tree-ssa-sccvn.c: ... (rewrite)
6350 (pass_fre::execute): For -O2+ initialize loops and run
6351 RPO VN in optimistic mode (iterating). For -O1 and -Og
6352 run RPO VN in non-optimistic mode.
6353 * params.def (PARAM_SCCVN_MAX_SCC_SIZE): Remove.
6354 (PARAM_RPO_VN_MAX_LOOP_DEPTH): Add.
6355 * doc/invoke.texi (sccvn-max-scc-size): Remove.
6356 (rpo-vn-max-loop-depth): Document.
6357 * tree-ssa-alias.c (walk_non_aliased_vuses): Stop walking
6358 when valuezing the VUSE signals we walked out of the region.
6359 * tree-ssa-pre.c (phi_translate_1): Ignore predicated values.
6360 (phi_translate): Set VN context block to use for availability
6362 (compute_avail): Likewise.
6363 (pre_valueize): New function.
6364 (pass_pre::execute): Adjust to the RPO VN API.
6366 * tree-ssa-loop-ivcanon.c: Include tree-ssa-sccvn.h.
6367 (propagate_constants_for_unrolling): Remove.
6368 (tree_unroll_loops_completely): Perform value-numbering
6369 on the unrolled bodies loop parent.
6371 2018-08-27 Richard Biener <rguenther@suse.de>
6373 * tree-ssa-pre.c (compute_antic): Re-use inverted postorder
6374 for partial antic compute.
6376 2018-08-27 Jakub Jelinek <jakub@redhat.com>
6378 PR rtl-optimization/87065
6379 * combine.c (simplify_if_then_else): Formatting fix.
6380 (if_then_else_cond): Guard MULT optimization with SCALAR_INT_MODE_P
6382 (known_cond): Don't return const_true_rtx for vector modes. Use
6383 CONST0_RTX instead of const0_rtx. Formatting fixes.
6385 2018-08-27 Martin Liska <mliska@suse.cz>
6387 PR gcov-profile/87069
6388 * gcov.c (process_file): Record files already processed
6389 and warn about a file being processed multiple times.
6391 2018-08-27 Martin Liska <mliska@suse.cz>
6394 * config/aarch64/aarch64.c (aarch64_override_options_internal):
6395 Set default values for x_aarch64_*_string strings.
6396 * config/aarch64/aarch64.opt: Remove --{march,mcpu,mtune}==
6397 prefix. For -mabi do not print '=ABI' in help and use
6398 <option_value> format for -msve-vector-bits and -moverride
6401 2018-08-26 Jeff Law <law@redhat.com>
6403 * config/mips/frame-header-opt.c: Include "backend.h" rather than
6406 2018-08-26 Marek Polacek <polacek@redhat.com>
6408 PR c++/87029, Implement -Wredundant-move.
6409 * doc/invoke.texi: Document -Wredundant-move.
6411 2018-08-25 Martin Sebor <msebor@redhat.com>
6413 PR tree-optimization/87059
6414 * builtins.c (expand_builtin_strncmp): Convert MIN_EXPR operand
6415 to the same type as the other.
6416 * fold-const.c (fold_binary_loc): Assert expectation.
6418 2018-08-25 Iain Sandoe <iain@sandoe.co.uk>
6420 * config/darwin.c (machopic_legitimize_pic_address): Clean up
6421 extraneous parentheses, dead code section and formatting.
6423 2018-08-24 David Malcolm <dmalcolm@redhat.com>
6426 * diagnostic-show-locus.c (layout::layout): Ensure the margin is
6427 wide enough for jumps in the line-numbering to be visible.
6428 (layout::print_gap_in_line_numbering): New member function.
6429 (layout::calculate_line_spans): When using line numbering, merge
6430 line spans that are only 1 line apart.
6431 (diagnostic_show_locus): When printing line numbers, show gaps in
6432 line numbering directly, rather than printing headers.
6433 (selftest::test_diagnostic_show_locus_fixit_lines): Add test of
6434 line-numbering with multiple line spans.
6435 (selftest::test_fixit_insert_containing_newline_2): Add test of
6436 line-numbering, in which the spans are close enough to be merged.
6438 2018-08-24 Aldy Hernandez <aldyh@redhat.com>
6440 * gimple-ssa-evrp-analyze.c (set_ssa_range_info): Pass value_range
6441 to range_includes_zero_p. Do not special case VR_ANTI_RANGE.
6442 * tree-vrp.c (range_is_nonnull): Remove.
6443 (range_includes_zero_p): Accept value_range instead of min/max.
6444 (extract_range_from_binary_expr_1): Do not early bail on
6446 Use range_includes_zero_p instead of range_is_nonnull.
6447 (extract_range_from_unary_expr): Use range_includes_zero_p instead
6448 of range_is_nonnull.
6449 (vrp_meet_1): Pass value_range to range_includes_zero_p. Do not
6450 special case VR_ANTI_RANGE.
6451 (vrp_finalize): Same.
6452 * tree-vrp.h (range_includes_zero_p): Pass value_range as argument
6454 (range_is_nonnull): Remove.
6455 * vr-values.c (vrp_stmt_computes_nonzero): Use
6456 range_includes_zero_p instead of range_is_nonnull.
6457 (extract_range_basic): Pass value_range to range_includes_zero_p
6458 instead of range_is_nonnull.
6460 2018-08-24 Uros Bizjak <ubizjak@gmail.com>
6462 * emit-rtl.c (init_emit_once): Do not emit MODE_POINTER_BOUNDS RTXes.
6463 * emit-rtl.h (rtl_data): Remove return_bnd.
6464 * explow.c (trunc_int_for_mode): Do not handle POINTER_BOUNDS_MODE_P.
6465 * function.c (diddle_return_value): Do not handle crtl->return_bnd.
6466 * genmodes.c (complete_mode): Do not handle MODE_POINTER_BOUNDS.
6467 (POINTER_BOUNDS_MODE): Remove definition.
6468 (make_pointer_bounds_mode): Remove.
6469 (get_mode_class): Do not handle MODE_POINTER_BOUNDS.
6470 * machmode.h (POINTER_BOUNDS_MODE_P): Remove definition.
6471 (scalare_mode::includes_p): Do not handle MODE_POINTER_BOUNDS.
6472 * mode-classes.def: Do not define MODE_POINTER_BOUNDS.
6473 * stor-layout.c (int_mode_for_mode): Do not handle MODE_POINTER_BOUNDS.
6474 * tree-core.h (enum tree_index): Remove TI_POINTER_BOUNDS_TYPE.
6475 * varasm.c (output_constant_pool_2): Do not handle MODE_POINTER_BOUNDS.
6477 * config/i386/i386-modes.def (BND32, BND64): Remove.
6478 * config/i386/i386.c (dbx_register_map): Remove bound registers.
6479 (dbx64_register_map): Ditto.
6480 (svr4_dbx_register_map): Ditto.
6481 (indirect_thunk_bnd_needed): Remove.
6482 (indirect_thunks_bnd_used): Ditto.
6483 (indirect_return_bnd_needed): Ditto.
6484 (indirect_return_via_cx_bnd): Ditto.
6485 (enum indirect_thunk_prefix): Remove indirect_thunk_prefix_bnd.
6486 (indirect_thunk_name): Remove handling of indirect_thunk_prefix_bnd.
6487 (output_indirect_thunk): Ditto. Remove need_prefix argument.
6488 (output_indirect_thunk_function): Remove handling of
6489 indirect_return_bnd_needed, indirect_return_via_cx_bnd,
6490 indirect_thunk_bnd_needed and indirect_thunks_bnd_used variables.
6491 (ix86_save_reg): Remove handling of crtl->return_bnd.
6492 (ix86_legitimate_constant_p): Remove handling of POINTER_BOUNDS_MODE_P.
6493 (ix86_print_operand_address_as): Remove handling of UNSPEC_BNDMK_ADDR
6494 and UNSPEC_BNDLX_ADDR.
6495 (ix86_output_indirect_branch_via_reg): Remove handling of
6496 indirect_thunk_prefix_bnd.
6497 (ix86_output_indirect_branch_via_push): Ditto.
6498 (ix86_output_function_return): Ditto.
6499 (ix86_output_indirect_function_return): Ditto.
6500 (avoid_func_arg_motion): Do not handle UNSPEC_BNDSTX.
6501 * config/i386/i386.h (FIXED_REGISTERS): Remove bound registers.
6502 (CALL_USED_REGISTERS): Ditto.
6503 (REG_ALLOC_ORDER): Update for removal of bound registers.
6504 (HI_REGISTER_NAMES): Ditto.
6505 * config/i386/i386.md (UNSPEC_BNDMK, UNSPEC_BNDMK_ADDR, UNSPEC_BNDSTX)
6506 (UNSPEC_BNDLDX, UNSPEC_BNDLDX_ADDR, UNSPEC_BNDCL, UNSPEC_BNDCU)
6507 (UNSPEC_BNDCN, UNSPEC_MPX_FENCE): Remove.
6508 (BND0_REG, BND1_REG, BND2_REG, BND3_REG): Remove
6509 (FIRST_PSEUDO_REG): Update.
6510 (BND): Remove mode iterator.
6511 * config/i386/predicates.md (bnd_mem_operator): Remove.
6513 2018-08-24 Richard Sandiford <richard.sandiford@arm.com>
6515 * tree-vect-stmts.c (vectorizable_bswap): Handle variable-length
6518 2018-08-24 Richard Sandiford <richard.sandiford@arm.com>
6520 * tree-vect-slp.c (vect_transform_slp_perm_load): Separate out
6521 the case in which the permute needs only a single element and
6522 repeats for every vector of the result. Extend that case to
6523 handle variable-length vectors.
6524 * tree-vect-stmts.c (vectorizable_load): Update accordingly.
6526 2018-08-24 H.J. Lu <hongjiu.lu@intel.com>
6529 * dwarf2out.c (save_macinfo_strings): Call set_indirect_string
6530 on DW_MACINFO_start_file for -gsplit-dwarf -g3.
6532 2018-08-24 Richard Biener <rguenther@suse.de>
6534 * cfg.h (struct control_flow_graph): Add edge_flags_allocated and
6535 bb_flags_allocated members.
6536 (auto_flag): New RAII class for allocating flags.
6537 (auto_edge_flag): New RAII class for allocating edge flags.
6538 (auto_bb_flag): New RAII class for allocating bb flags.
6539 * cfgloop.c (verify_loop_structure): Allocate temporary edge
6541 * cfganal.c (dfs_enumerate_from): Remove use of visited sbitmap
6542 in favor of temporarily allocated BB flag.
6543 * hsa-brig.c: Re-order includes.
6544 * hsa-dump.c: Likewise.
6545 * hsa-regalloc.c: Likewise.
6546 * print-rtl.c: Likewise.
6547 * profile-count.c: Likewise.
6549 2018-08-24 Segher Boessenkool <segher@kernel.crashing.org>
6552 * config/rs6000/rs6000.c (toc_relative_expr_p): Check that the base is
6555 2018-08-24 Aldy Hernandez <aldyh@redhat.com>
6558 * wide-int-range.cc (wide_int_range_div): Do not ignore result
6559 from wide_int_range_multiplicative_op.
6561 2018-08-23 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
6563 * tree-vect-data-refs.c (vect_grouped_store_supported): Fix typo
6566 2018-08-23 Giuliano Belinassi <giuliano.belinassi@usp.br>
6568 * genmatch.c (parser::parse_operation): Fix typo 'exapnded'
6571 2018-08-23 Alexander Monakov <amonakov@ispras.ru>
6573 * tree-scalar-evolution.c (final_value_replacement_loop): Dump
6574 full GENERIC expression used for replacement.
6576 2018-08-23 Aldy Hernandez <aldyh@redhat.com>
6578 * tree-vrp.c (abs_extent_range): Remove.
6579 (extract_range_into_wide_ints): Pass wide ints by reference.
6580 (extract_range_from_binary_expr_1): Rewrite the *DIV_EXPR code.
6581 Pass wide ints by reference in all calls to
6582 extract_range_into_wide_ints.
6583 * wide-int-range.cc (wide_int_range_div): New.
6584 * wide-int-range.h (wide_int_range_div): New.
6585 (wide_int_range_includes_zero_p): New.
6586 (wide_int_range_zero_p): New.
6588 2018-08-23 Matthew Malcomson <matthew.malcomson@arm.com>
6590 * config/aarch64/aarch64.md (arches): New enum.
6591 (arch): New enum attr.
6592 (arch_enabled): New attr.
6593 (enabled): Now uses arch_enabled only.
6594 (simd, sve, fp16): Removed attribute.
6595 (fp): Attr now defined in terms of 'arch'.
6596 (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64, *movti_aarch64,
6597 *movhf_aarch64, <optab><fcvt_target><GPF:mode>2,
6598 <FCVT_F2FIXED:fcvt_fixed_insn><GPF:mode>3,
6599 <FCVT_FIXED2F:fcvt_fixed_insn><GPI:mode>3): Merge 'fp' and 'simd'
6600 attributes into 'arch'.
6601 (*movsf_aarch64, *movdf_aarch64, *movtf_aarch64, *add<mode>3_aarch64,
6602 subdi3, neg<mode>2, <optab><mode>3, one_cmpl<mode>2,
6603 *<NLOGICAL:optab>_one_cmpl<mode>3, *xor_one_cmpl<mode>3,
6604 *aarch64_ashl_sisd_or_int_<mode>3, *aarch64_lshr_sisd_or_int_<mode>3,
6605 *aarch64_ashr_sisd_or_int_<mode>3, *aarch64_sisd_ushl): Convert use of
6606 'simd' attribute into 'arch'.
6607 (load_pair_sw_<SX:mode><SX2:mode>, load_pair_dw_<DX:mode><DX2:mode>,
6608 store_pair_sw_<SX:mode><SX2:mode>, store_pair_dw_<DX:mode><DX2:mode>):
6609 Convert use of 'fp' attribute to 'arch'.
6610 * config/aarch64/aarch64-simd.md (move_lo_quad_internal_<mode>,
6611 move_lo_quad_internal_<mode>): (different modes) Merge 'fp' and 'simd'
6613 (move_lo_quad_internal_be_<mode>, move_lo_quad_internal_be_<mode>):
6614 (different modes) Merge 'fp' and 'simd' into 'arch'.
6615 (*aarch64_combinez<mode>, *aarch64_combinez_be<mode>): Merge 'fp' and
6618 2018-08-23 Segher Boessenkool <segher@kernel.crashing.org>
6620 PR rtl-optimization/87026
6621 * expmed.c (canonicalize_comparison): If we can no longer create
6622 pseudoregisters, don't.
6624 2018-08-23 Richard Earnshaw <rearnsha@arm.com>
6627 * config/arm/arm-protos.h (arm_emit_speculation_barrier): New
6629 * config/arm/arm.c (speculation_barrier_libfunc): New static
6631 (arm_init_libfuncs): Initialize it.
6632 (arm_emit_speculation_barrier): New function.
6633 * config/arm/arm.md (speculation_barrier): Call
6634 arm_emit_speculation_barrier for architectures that do not have
6636 (speculation_barrier_insn): Only match on Armv7 or later.
6638 2018-08-23 Richard Biener <rguenther@suse.de>
6641 * tree-inline.c (copy_bb): Drop unused __builtin_va_arg_pack_len
6644 2018-08-23 Richard Sandiford <richard.sandiford@arm.com>
6646 * config/aarch64/aarch64.c (aarch64_evpc_sve_tbl): Fix handling
6647 of single-vector TBLs.
6648 (aarch64_vectorize_vec_perm_const): Set one_vector_p when only
6651 2018-08-23 Richard Sandiford <richard.sandiford@arm.com>
6654 * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const_1): Fix
6655 aarch64_evpc_tbl guard.
6657 2018-08-22 Bernd Edlinger <bernd.edlinger@hotmail.de>
6659 * tree-ssa-dse.c (compute_trims): Avoid folding away undefined
6662 2018-08-22 Martin Sebor <msebor@redhat.com>
6665 * tree-pretty-print.c (pretty_print_string): Add argument.
6666 (dump_generic_node): Call to pretty_print_string with string size.
6668 2018-08-22 Segher Boessenkool <segher@kernel.crashing.org>
6670 PR rtl-optimization/86771
6671 * combine.c (try_combine): Do not allow splitting a resulting PARALLEL
6672 of two SETs into those two SETs, one to be placed at i2, if that SETs
6673 destination is modified between i2 and i3.
6675 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
6677 PR tree-optimization/86725
6678 * tree-vect-loop.c (vect_inner_phi_in_double_reduction_p): New
6680 (vect_analyze_scalar_cycles_1): Check it.
6682 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
6684 PR tree-optimization/86725
6685 * tree-vect-loop.c (vect_is_simple_reduction): When treating
6686 an outer loop phi as a double reduction, make sure that the
6687 single user of the phi result is an inner loop phi.
6689 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
6691 * tree-vect-data-refs.c (vect_analyze_group_access_1): Convert
6692 grouped stores with gaps to a strided group.
6694 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
6696 * tree-vect-stmts.c (get_group_load_store_type)
6697 (get_load_store_type): Only test STMT_VINFO_STRIDED_P for the
6698 first statement in a group.
6700 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
6702 * config/darwin.h (LINK_COMMAND_SPEC_A): Sync LTO options with
6703 the sequence used in gcc/gcc.c.
6705 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
6708 * gcc-ar.c (main): Don’t try to invoke the plug-in if we’re not
6711 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
6713 * config/darwin10.h (LINK_GCC_C_SEQUENCE_SPEC): Adjust to use the
6714 Darwin10-specific unwinder-shim.
6715 * config/darwin12.h (LINK_GCC_C_SEQUENCE_SPEC): Remove.
6716 * config/rs6000/darwin.h (DARWIN_CRT1_SPEC, DARWIN_DYLIB1_SPEC):
6717 New to cater for Darwin10 Rosetta.
6719 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
6721 * config/i386/i386.c (ix86_output_addr_diff_elt): Move the MACH-O
6722 specific test before the one for HAVE_AS_GOTOFF_IN_DATA.
6724 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
6729 * gcc/dwarf2out.c (FUNC_SECOND_SECT_LABEL): New.
6730 (dwarf2out_switch_text_section): Generate a local label for the
6731 second function sub-section and apply it as the second FDE start
6733 * gcc/final.c (final_scan_insn_1): Emit second FDE label after the
6734 second sub-section start.
6736 2018-08-22 Richard Biener <rguenther@suse.de>
6738 PR tree-optimization/86988
6739 * tree-vrp.c (vrp_prop::check_mem_ref): Bail out on VLAs.
6741 2018-08-22 Richard Biener <rguenther@suse.de>
6743 PR tree-optimization/86945
6744 * tree-cfg.c (generate_range_test): Use unsigned arithmetic.
6746 2018-08-22 Alexandre Oliva <oliva@adacore.com>
6748 * config/rs6000/rs6000.c (SMALL_DATA_RELOC, SMALL_DATA_REG): Add
6749 a comment about how uses of r2 for .sdata2 come about.
6751 2018-08-22 Alexandre Oliva <aoliva@redhat.com>
6753 * tree-ssa-reassoc.c (is_reassociable_op): Fix cut&pasto.
6755 2018-08-21 Marek Polacek <polacek@redhat.com>
6757 PR c++/86981, Implement -Wpessimizing-move.
6758 * doc/invoke.texi: Document -Wpessimizing-move.
6760 2018-08-21 Jan Hubicka <jh@suse.cz>
6762 * tree.c (find_decls_types_r): Do not check for redundant typedefs.
6763 * tree.h (is_redundant_typedef): Remove.
6764 * dwarf2out.c (is_redundant_typedef): Turn into static function.
6766 2018-08-21 Jan Hubicka <jh@suse.cz>
6768 * tree.c (free_lang_data_in_decl): Remove types from DECL_CONTEXT
6771 2018-08-21 Tamar Christina <tamar.christina@arm.com>
6773 * expmed.c (extract_low_bits): Reject invalid subregs early.
6775 2018-08-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
6778 * tree-ssa-strlen.c (adjust_last_stmt): Avoid folding away undefined
6781 2018-08-21 Rasmus Villemoes <rv@rasmusvillemoes.dk>
6783 * config/vxworks.h: Guard vxworks_asm_out_constructor and
6784 vxworks_asm_out_destructor by !HAVE_INITFINI_ARRAY_SUPPORT
6785 * config/vxworks.c: Likewise.
6787 2018-08-21 Rasmus Villemoes <rv@rasmusvillemoes.dk>
6789 * config/vxworks.c: Set targetm.have_ctors_dtors
6790 if HAVE_INITFINI_ARRAY_SUPPORT.
6791 * config/vxworks.h: Set SUPPORTS_INIT_PRIORITY
6792 if HAVE_INITFINI_ARRAY_SUPPORT.
6794 2018-08-21 Rasmus Villemoes <rv@rasmusvillemoes.dk>
6796 * config/vxworks.h: Add $(WIND_BASE)/target/h/wrn/coreip to
6797 default search path for VxWorks < 7.
6799 2018-08-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
6801 * gimple-ssa-sprintf.c (decl_constant_value): Remove.
6802 (get_format_string): Refer to c_getstr.
6804 2018-08-21 Tom de Vries <tdevries@suse.de>
6806 * cgraph.h (debuginfo_early_init, debuginfo_init, debuginfo_fini)
6807 (debuginfo_start, debuginfo_stop, debuginfo_early_start)
6808 (debuginfo_early_stop): Declare.
6809 * cgraphunit.c (debuginfo_early_init, debuginfo_init, debuginfo_fini)
6810 (debuginfo_start, debuginfo_stop, debuginfo_early_start)
6811 (debuginfo_early_stop): New function.
6812 (symbol_table::finalize_compilation_unit): Call debuginfo_early_start
6813 and debuginfo_early_stop.
6814 * dwarf2out.c (dwarf2out_finish, dwarf2out_early_finish): Dump dwarf.
6815 * toplev.c (compile_file): Call debuginfo_start and debuginfo_stop.
6816 (general_init): Call debuginfo_early_init.
6817 (finalize): Call debuginfo_fini.
6818 (do_compile): Call debuginfo_init.
6819 * doc/invoke.texi (@gccoptlist): Add -fdump-debug and
6821 (@item -fdump-debug, @item -fdump-earlydebug): Add.
6823 2018-08-21 Tom de Vries <tdevries@suse.de>
6825 * dwarf2out.c (print_dw_val, print_loc_descr, print_die): Handle
6826 flag_dump_noaddr and flag_dump_unnumbered.
6828 2018-08-21 Aldy Hernandez <aldyh@redhat.com>
6830 * wide-int-range.cc (wide_int_range_abs): New.
6831 (wide_int_range_order_set): Rename from wide_int_range_min_max.
6832 * wide-int-range.h (wide_int_range_abs): New.
6833 (wide_int_range_min_max): New.
6834 * tree-vrp.c (extract_range_from_unary_expr): Rewrite ABS_EXPR
6835 case to call wide_int_range_abs.
6836 Rewrite MIN/MAX_EXPR to call wide_int_range_min_max.
6837 (extract_range_from_abs_expr): Delete.
6839 2018-08-20 Michael Meissner <meissner@linux.ibm.com>
6842 * config/rs6000/rs6000.md (extendsi<mode>2): Change constraints
6843 from 'Y' to 'YZ' to enable the LWAX instruction to be generated
6846 2018-08-20 Nathan Sidwell <nathan@acm.org>
6847 Jeff Law <law@redhat.com>
6849 * config/s390/s390-c (s390_macro_to_expand): Use cpp_macro_p.
6850 * config/spu/spu-c.c (spu_macro_to_expand): Likewise.
6852 2018-08-20 David Malcolm <dmalcolm@redhat.com>
6855 * attribs.c (diag_attr_exclusions): Add auto_diagnostic_group instance.
6856 (decl_attributes): Likewise.
6857 * calls.c (maybe_warn_nonstring_arg): Add auto_diagnostic_group
6859 * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
6860 * diagnostic-core.h (class auto_diagnostic_group): New class.
6861 * diagnostic.c (diagnostic_initialize): Initialize the new fields.
6862 (diagnostic_report_diagnostic): Handle the first diagnostics within
6864 (emit_diagnostic): Add auto_diagnostic_group instance.
6866 (inform_n): Likewise.
6867 (warning): Likewise.
6868 (warning_at): Likewise.
6869 (warning_n): Likewise.
6870 (pedwarn): Likewise.
6871 (permerror): Likewise.
6873 (error_n): Likewise.
6874 (error_at): Likewise.
6876 (fatal_error): Likewise.
6877 (internal_error): Likewise.
6878 (internal_error_no_backtrace): Likewise.
6879 (auto_diagnostic_group::auto_diagnostic_group): New ctor.
6880 (auto_diagnostic_group::~auto_diagnostic_group): New dtor.
6881 * diagnostic.h (struct diagnostic_context): Add fields
6882 "diagnostic_group_nesting_depth",
6883 "diagnostic_group_emission_count", "begin_group_cb",
6885 * gimple-ssa-isolate-paths.c (find_implicit_erroneous_behavior):
6886 Add auto_diagnostic_group instance(s).
6887 (find_explicit_erroneous_behavior): Likewise.
6888 * gimple-ssa-warn-alloca.c (pass_walloca::execute): Likewise.
6889 * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Likewise.
6890 * gimplify.c (warn_implicit_fallthrough_r): Likewise.
6891 (gimplify_va_arg_expr): Likewise.
6892 * hsa-gen.c (HSA_SORRY_ATV): Likewise.
6893 (HSA_SORRY_AT): Likewise.
6894 * ipa-devirt.c (compare_virtual_tables): Likewise.
6895 (warn_odr): Likewise.
6896 * multiple_target.c (expand_target_clones): Likewise.
6897 * opts-common.c (cmdline_handle_error): Likewise.
6898 * reginfo.c (globalize_reg): Likewise.
6899 * substring-locations.c (format_warning_n_va): Likewise.
6900 * tree-inline.c (expand_call_inline): Likewise.
6901 * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Likewise.
6902 * tree-ssa-loop-niter.c
6903 (do_warn_aggressive_loop_optimizations): Likewise.
6904 * tree-ssa-uninit.c (warn_uninit): Likewise.
6905 * tree.c (warn_deprecated_use): Likewise.
6907 2018-08-20 H.J. Lu <hongjiu.lu@intel.com>
6910 * config/i386/i386.md (eh_return): Always update EH return
6911 address in word_mode.
6913 2018-08-20 Chung-Lin Tang <cltang@codesourcery.com>
6915 * targhooks.c (std_gimplify_va_arg_expr): Properly handle case of when
6916 TARGET_SPLIT_COMPLEX_ARG is defined.
6918 2018-08-20 Bernd Edlinger <bernd.edlinger@hotmail.de>
6920 * expr.c (store_field): Change gcc_assert to gcc_checking_assert.
6922 2018-08-20 Bernd Edlinger <bernd.edlinger@hotmail.de>
6925 * expr.c (expand_assignment): Assert that bitpos is positive.
6926 (store_field): Likewise
6927 (expand_expr_real_1): Make sure that bitpos is positive.
6928 * config/alpha/alpha.h (CONSTANT_ADDRESS_P): Avoid signed
6931 2018-08-20 Nathan Sidwell <nathan@acm.org>
6933 * Makefile.in (CPP_ID_DATA_H): Delete.
6934 (CPP_INTERNAL_H): Don't add it.
6935 (GTFILES): Replace CPP_ID_DATA_H with CPPLIB_H.
6936 * gengtype.c (open_base_files): Replace cpp-id-data.h with cpplib.h
6938 2018-08-20 Richard Biener <rguenther@suse.de>
6940 PR tree-optimization/78655
6941 * tree-vrp.c (extract_range_from_binary_expr_1): Make
6942 pointer + offset nonnull if either operand is nonnull work.
6944 2018-08-20 Tom de Vries <tdevries@suse.de>
6946 * dwarf2out.c (add_scalar_info): Don't add reference to existing die
6947 unless the referenced die describes the added property using
6948 DW_AT_location or DW_AT_const_value. Fall back to exprloc case.
6949 Otherwise, add a DW_AT_location to the referenced die.
6951 2018-08-19 Uros Bizjak <ubizjak@gmail.com>
6954 * config/i386/i386.c (ix86_rtx_costs) [case SET]: Check source for
6955 register_operand when calling ix86_set_reg_reg_cost.
6956 [case CONST_INT, case CONST, case LABEL_REF, case SYMBOL_REF]:
6957 Set *total to 0 for operands that satisfy x86_64_immediate_operand
6958 predicate and to 1 otherwise.
6960 2018-08-18 Iain Sandoe <iain@sandoe.co.uk>
6962 * config/darwin.c (darwin_override_options): If -gsplit-dwarf is set,
6963 emit a diagnostic that it is not supported and reset the option.
6964 * config/darwin.h (DRIVER_SELF_SPECS): Note that gsplit-dwarf is not
6965 supported and consume the option. (ASM_FINAL_SPEC): New.
6967 2018-08-17 Segher Boessenkool <segher@kernel.crashing.org>
6969 * doc/md.texi (Patterns): Use @ref instead of @xref in the middle of
6972 2018-08-17 Sandra Loosemore <sandra@codesourcery.com>
6974 C-SKY port: Documentation
6976 * doc/extend.texi (C-SKY Function Attributes): New section.
6977 * doc/invoke.texi (Option Summary): Add C-SKY options.
6978 (C-SKY Options): New section.
6979 * doc/md.texi (Machine Constraints): Document C-SKY constraints.
6981 2018-08-17 Jojo <jijie_rong@c-sky.com>
6982 Huibin Wang <huibin_wang@c-sky.com>
6983 Sandra Loosemore <sandra@codesourcery.com>
6984 Chung-Lin Tang <cltang@codesourcery.com>
6986 C-SKY port: Backend implementation
6988 * config/csky/*: New.
6989 * common/config/csky/*: New.
6991 2018-08-17 Jojo <jijie_rong@c-sky.com>
6992 Huibin Wang <huibin_wang@c-sky.com>
6993 Sandra Loosemore <sandra@codesourcery.com>
6994 Chung-Lin Tang <cltang@codesourcery.com>
6995 Andrew Jenner <andrew@codesourcery.com>
6997 C-SKY port: Configury
6999 * config.gcc (csky-*-*): New.
7000 * configure.ac: Add csky to targets for dwarf2 debug_line support.
7001 * configure: Regenerated.
7003 2018-08-17 David Malcolm <dmalcolm@redhat.com>
7005 * dump-context.h: Include "dumpfile.h".
7006 (dump_context::dump_printf_va): Convert final param from va_list
7007 to va_list *. Convert from ATTRIBUTE_PRINTF to
7008 ATTRIBUTE_GCC_DUMP_PRINTF.
7009 (dump_context::dump_printf_loc_va): Likewise.
7010 * dumpfile.c: Include "stringpool.h".
7011 (make_item_for_dump_printf_va): Delete.
7012 (make_item_for_dump_printf): Delete.
7013 (class dump_pretty_printer): New class.
7014 (dump_pretty_printer::dump_pretty_printer): New ctor.
7015 (dump_pretty_printer::emit_items): New member function.
7016 (dump_pretty_printer::emit_any_pending_textual_chunks): New member
7018 (dump_pretty_printer::emit_item): New member function.
7019 (dump_pretty_printer::stash_item): New member function.
7020 (dump_pretty_printer::format_decoder_cb): New member function.
7021 (dump_pretty_printer::decode_format): New member function.
7022 (dump_context::dump_printf_va): Reimplement in terms of
7023 dump_pretty_printer.
7024 (dump_context::dump_printf_loc_va): Convert final param from va_list
7026 (dump_context::begin_scope): Reimplement call to
7027 make_item_for_dump_printf.
7028 (dump_printf): Update for change to dump_printf_va.
7029 (dump_printf_loc): Likewise.
7030 (selftest::test_capture_of_dump_calls): Convert "stmt" from
7031 greturn * to gimple *. Add a test_decl. Add tests of dump_printf
7032 with %T, %E, and %G.
7033 * dumpfile.h (ATTRIBUTE_GCC_DUMP_PRINTF): New macro.
7034 (dump_printf): Replace ATTRIBUTE_PRINTF_2 with
7035 ATTRIBUTE_GCC_DUMP_PRINTF (2, 3).
7036 (dump_printf_loc): Replace ATTRIBUTE_PRINTF_3 with
7037 ATTRIBUTE_GCC_DUMP_PRINTF (3, 0).
7038 * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Convert
7039 use of HOST_WIDE_INT_PRINT_DEC on unsigned HOST_WIDE_INT "count"
7040 within a dump_printf_loc call to "%wu".
7041 (vector_alignment_reachable_p): Merge two dump_printf[_loc] calls,
7042 converting a use of HOST_WIDE_INT_PRINT_DEC to "%wd". Add a
7043 missing space after "=".
7044 * tree-vect-loop.c (vect_analyze_loop_2) Within a dump_printf
7045 call, convert use of HOST_WIDE_INT_PRINT_DEC to "%wd".
7046 * tree-vect-slp.c (vect_slp_bb): Within a dump_printf_loc call,
7047 convert use of HOST_WIDE_INT_PRINT_UNSIGNED to "%wu".
7048 * tree-vectorizer.c (try_vectorize_loop_1): Likewise. Remove
7049 duplicate "vectorized" from message.
7051 2018-08-17 Szabolcs Nagy <szabolcs.nagy@arm.com>
7053 * config/arm/arm-builtins.c (arm_init_simd_builtin_types): Clear
7054 polyNxK_t element's TYPE_STRING_FLAG.
7056 2018-08-17 Segher Boessenkool <segher@kernel.crashing.org>
7058 * config/rs6000/rs6000.md (*cbranch, *creturn): Name these patterns
7059 (they were unnamed before). Fix comments.
7061 2018-08-17 Nathan Sidwell <nathan@acm.org>
7063 * cppbuiltin.c: Include "cpplib.h", not "cpp-id-data.h".
7065 2018-08-17 Richard Biener <rguenther@suse.de>
7067 PR tree-optimization/86841
7068 * wide-int-range.cc (wide_int_range_lshift): Use to_uhwi.
7070 2018-08-17 Martin Liska <mliska@suse.cz>
7072 * common.opt: Remove Warn, Init and Report for options with
7073 Ignore/Deprecated flag. Warning is done automatically for
7075 * config/i386/i386.opt: Likewise.
7076 * config/ia64/ia64.opt: Likewise.
7077 * config/rs6000/rs6000.opt: Likewise.
7078 * cppbuiltin.c (define_builtin_macros_for_compilation_flags):
7079 Remove usage of flag_check_pointer_bounds.
7080 * lto-wrapper.c (merge_and_complain): Do not handle
7081 OPT_fcheck_pointer_bounds.
7082 (append_compiler_options): Likewise.
7083 * opt-functions.awk: Do not handle Deprecated.
7084 * optc-gen.awk: Check that Var, Report and Init are not
7085 used for an option with Ignore/Deprecated flag.
7086 * opts-common.c (decode_cmdline_option): Do not report
7088 (read_cmdline_option): Report warning for OPT_SPECIAL_deprecated
7090 * opts.h (struct cl_option): Remove cl_deprecated flag.
7091 (CL_ERR_DEPRECATED): Remove error enum value.
7093 2018-08-17 Richard Biener <rguenther@suse.de>
7096 * tree-inline.c (copy_bb): When inlining __builtin_va_arg_pack_len ()
7097 across a va-arg-pack using call adjust its return value accordingly.
7099 2018-08-16 Martin Sebor <msebor@redhat.com>
7101 PR tree-optimization/86853
7102 * gimple-ssa-sprintf.c (struct format_result): Rename member.
7103 (struct fmtresult): Add member and initialize it in ctors.
7104 (format_character): Handle %C. Extend range to NUL. Set MAYFAIL.
7105 (format_string): Handle %S the same as %ls. Set MAYFAIL.
7106 (format_directive): Set POSUNDER4K when MAYFAIL is set.
7107 (parse_directive): Handle %C same as %c.
7108 (sprintf_dom_walker::compute_format_length): Adjust.
7109 (is_call_safe): Adjust.
7111 2018-08-16 Bernd Edlinger <bernd.edlinger@hotmail.de>
7113 * builtins.c (c_strlen): Add new parameter eltsize. Use it
7114 for determining how to count the elements.
7115 * builtins.h (c_strlen): Adjust prototype.
7116 * expr.c (string_constant): Add new parameter mem_size.
7117 Set *mem_size appropriately.
7118 * expr.h (string_constant): Adjust protoype.
7119 * gimple-fold.c (get_range_strlen): Add new parameter eltsize.
7120 * gimple-fold.h (get_range_strlen): Adjust prototype.
7121 * gimple-ssa-sprintf.c (get_string_length): Add new parameter eltsize.
7122 (format_string): Call get_string_length with eltsize.
7124 2018-08-16 David Malcolm <dmalcolm@redhat.com>
7126 * diagnostic.c (default_diagnostic_start_span_fn): Call pp_string
7127 to emit the span, rather than setting it as the prefix.
7129 2018-08-16 David Malcolm <dmalcolm@redhat.com>
7131 * diagnostic-show-locus.c (layout::start_annotation_line): Add
7132 "margin_char" parameter, defaulting to space. Use it in place
7133 of pp_space for the initial part of the margin.
7134 (layout::print_leading_fixits): Use '+' when filling the margin
7135 of line-insertion fix-it hints.
7137 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
7139 * config/rs6000/rs6000.md (two unnamed define_insn and define_split):
7142 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
7144 * config/rs6000/altivec.md: Don't set length attribute to the default
7146 * config/rs6000/darwin.md: Ditto.
7147 * config/rs6000/dfp.md: Ditto.
7148 * config/rs6000/htm.md: Ditto.
7149 * config/rs6000/rs6000.md: Ditto.
7150 * config/rs6000/sync.md: Ditto.
7151 * config/rs6000/vsx.md: Ditto.
7153 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
7155 * config/rs6000/altivec.md: Don't set length attribute to the default
7156 value, for branch instructions.
7157 * config/rs6000/darwin.md: Ditto.
7158 * config/rs6000/rs6000.md: Ditto.
7160 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
7162 * config/rs6000/rs6000.md (length): Always define as const_int 4.
7163 (unnamed conditional branch define_insn): Set length to 4 or 8
7164 depending on offset.
7165 (<bd>_<mode>): Similar, for alternative 0.
7166 (<bd>tf_<mode>): Ditto.
7168 2018-08-16 Tamar Christina <tamar.christina@arm.com>
7170 * expr.c (copy_blkmode_to_reg): Perform larger copies when safe.
7172 2018-08-16 Matthew Malcomson <matthew.malcomson@arm.com>
7174 * doc/rtl.texi: Replace old RTX class names with new names.
7177 2018-08-16 Vlad Lazar <vlad.lazar@arm.com>
7179 * expmed.h (canonicalize_comparison): New declaration.
7180 * expmed.c (canonicalize_comparison, equivalent_cmp_code): New function.
7181 * expmed.c (emit_store_flag_1): Add call to canonicalize_comparison.
7182 * optabs.c (prepare_cmp_insn): Likewise.
7183 * rtl.h (unsigned_condition_p): New function which checks if a
7184 comparison operator is unsigned.
7186 2018-08-16 Nathan Sidwell <nathan@acm.org>
7188 * config/rs6000/rs6000-c.c (rs6000_macro_to_expend): Use cpp_macro_p.
7189 * config/powerpcspc/powerpcspe-c.c (rs6000_macro_to_expend): Likewise.
7191 2018-08-16 Tamar Christina <tamar.christina@arm.com>
7194 * config/arm/arm.c (arm_can_change_mode_class): Disallow subreg.
7195 * config/arm/neon.md (movv4hf, movv8hf): Refactored to..
7196 (mov<mov>): ..this and enable unconditionally.
7198 2018-08-16 Tamar Christina <tamar.christina@arm.com>
7200 * config/arm/neon.md (*neon_mov<mode>): Remove reg-to-reg alternative.
7202 2018-08-16 Sam Tebbs <sam.tebbs@arm.com>
7204 * config/aarch64/aarch64.opt (mlow-precision-recip-sqrt)
7205 (mlow-precision-sqrt, mlow-precision-div, mverbose-cost-dump): Replace
7206 "Common" with "Target".
7208 2018-08-15 Uros Bizjak <ubizjak@gmail.com>
7210 * config/i386/i386.opt (mmitigate-rop): Mark as deprecated.
7211 * doc/invoke.texi (mmitigate-rop): Remove.
7212 * config/i386/i386.c: Do not include "regrename.h".
7213 (ix86_rop_should_change_byte_p, reg_encoded_number)
7214 (ix86_get_modrm_for_rop, set_rop_modrm_reg_bits, ix86_mitigate_rop):
7216 (ix86_reorg): Remove call to ix86_mitigate_rop.
7217 * config/i386/i386.md (attr "modrm_class"): Remove.
7218 (cmp<mode>_ccno_1, mov<mode>_xor, movstrict<mode>_xor)
7219 (x86_mov<mode>cc_0_m1. x86_mov<mode>cc_0_m1_se)
7220 (x86_mov<mode>cc_0_m1_neg): Remove modrm_class attribute override.
7222 2018-08-15 Will Schmidt <will_schmidt@vnet.ibm.com>
7224 * config/rs6000/rs600.c (rs6000_gimple_fold_builtin): Add entries to
7225 allow folding of mergeh() and mergel() for the float and double types.
7226 (fold_mergehl_helper): Rework to handle building a permute tree
7229 2018-08-15 Uros Bizjak <ubizjak@gmail.com>
7231 * config/i386/i386.c (expand_vec_perm_movs): Enable V4SFmode
7234 2018-08-15 David Malcolm <dmalcolm@redhat.com>
7236 * common.opt (fdiagnostics-show-labels): New option.
7237 * diagnostic-show-locus.c (class layout_range): Add field
7239 (class layout): Add field "m_show_labels_p".
7240 (layout_range::layout_range): Add param "label" and use it to
7242 (make_range): Pass in NULL for new "label" param of layout_range's
7244 (layout::layout): Initialize m_show_labels_p.
7245 (layout::maybe_add_location_range): Pass in loc_range->m_label
7246 when constructing layout_range instances.
7247 (struct line_label): New struct.
7248 (layout::print_any_labels): New member function.
7249 (layout::print_line): Call it if label-printing is enabled.
7250 (selftest::test_one_liner_labels): New test.
7251 (selftest::test_diagnostic_show_locus_one_liner): Call it.
7252 * diagnostic.c (diagnostic_initialize): Initialize
7253 context->show_labels_p.
7254 * diagnostic.h (struct diagnostic_context): Add field
7256 * doc/invoke.texi (Diagnostic Message Formatting Options): Add
7257 -fno-diagnostics-show-labels.
7258 * dwarf2out.c (gen_producer_string): Add
7259 OPT_fdiagnostics_show_labels to the ignored options.
7260 * gcc-rich-location.c (gcc_rich_location::add_expr): Add "label"
7262 (gcc_rich_location::maybe_add_expr): Likewise.
7263 * gcc-rich-location.h (gcc_rich_location::gcc_rich_location): Add
7264 label" param, defaulting to NULL.
7265 (gcc_rich_location::add_expr): Add "label" param.
7266 (gcc_rich_location::maybe_add_expr): Likewise.
7267 (class text_range_label): New class.
7268 (class range_label_for_type_mismatch): New class.
7269 * gimple-ssa-sprintf.c (fmtwarn): Pass NULL for new label params
7270 of format_warning_va.
7271 (fmtwarn_n): Likewise for new params of format_warning_n_va.
7272 * lto-wrapper.c (merge_and_complain): Add
7273 OPT_fdiagnostics_show_labels to the "pick one setting" options.
7274 (append_compiler_options): Likewise to the dropped options.
7275 (append_diag_options): Likewise to the passed-on options.
7276 * opts.c (common_handle_option): Handle the new option.
7277 * selftest-diagnostic.c
7278 (test_diagnostic_context::test_diagnostic_context): Enable
7280 * substring-locations.c: Include "gcc-rich-location.h".
7281 (format_warning_n_va): Add "fmt_label" and "param_label" params
7282 and use them as appropriate.
7283 (format_warning_va): Add "fmt_label" and "param_label" params,
7284 passing them on to format_warning_n_va.
7285 (format_warning_at_substring): Likewise.
7286 (format_warning_at_substring_n): Likewise.
7287 * substring-locations.h (format_warning_va): Add "fmt_label" and
7288 "param_label" params.
7289 (format_warning_n_va): Likewise.
7290 (format_warning_at_substring): Likewise.
7291 (format_warning_at_substring_n): Likewise.
7292 * toplev.c (general_init): Initialize global_dc->show_labels_p.
7294 2018-08-15 Qing Zhao <qing.zhao@oracle.com>
7297 * builtins.c (expand_builtin_memcmp): Do not expand the call
7298 when overflow is detected.
7300 2018-08-15 Martin Sebor <msebor@redhat.com>
7302 PR tree-optimization/71625
7303 * config/aarch64/aarch64-builtins.c
7304 (aarch64_init_simd_builtin_types): Clear Poly8_t's TYPE_STRING_FLAG.
7306 2018-08-15 Ilya Leoshkevich <iii@linux.ibm.com>
7308 * config/s390/s390.c (s390_reorg): Remove loop.
7310 2018-08-15 Iain Sandoe <iain@sandoe.co.uk>
7313 (darwin_function_switched_text_sections): Delete.
7314 * gcc/config/darwin.h
7315 (TARGET_ASM_FUNCTION_SWITCHED_TEXT_SECTIONS): Likewise.
7317 2018-08-15 Iain Sandoe <iain@sandoe.co.uk>
7320 * config/darwin.h: (DEBUG_STR_OFFSETS_SECTION, DEBUG_LOCLISTS_SECTION,
7321 DEBUG_RNGLISTS_SECTION) new macros. (DEBUG_PUBNAMES_SECTION,
7322 DEBUG_PUBTYPES_SECTION) update to include GNU variant.
7324 2018-08-15 Martin Liska <mliska@suse.cz>
7326 PR tree-optimization/86925
7327 * predict.c (expr_expected_value_1): When taking
7328 later predictor, assign also probability.
7329 Use fold_build2_initializer_loc in order to fold
7330 the expression in -frounding-math.
7332 2018-08-14 Allan Sandfeld Jensen <allan.jensen@qt.io>
7334 * config/i386/i386.c (expand_vec_perm_movs): New method matching movs
7336 (expand_vec_perm_1): Try the new method.
7338 2018-08-14 Ilya Leoshkevich <iii@linux.ibm.com>
7341 * lra-lives.c (remove_some_program_points_and_update_live_ranges):
7342 Check whether lra_live_max_point is 0 before dividing.
7344 2018-08-14 Martin Sebor <msebor@redhat.com>
7346 PR tree-optimization/86650
7347 * tree-vrp.c (vrp_prop::check_array_ref): Print an inform message.
7348 (vrp_prop::check_mem_ref): Same.
7350 2018-08-13 Liu Hao <lh_mouse@126.com>
7352 * pretty-print.c (eat_esc_sequence): Swap the foreground and
7353 background colors if the COMMON_LVB_REVERSE_VIDEO flag is set,
7354 and clear it thereafter, as it only works for DBCS.
7356 2018-08-13 Liu Hao <lh_mouse@126.com>
7358 * pretty-print.c (mingw_ansi_fputs): Do not call _close() on the
7359 handle returned by _get_osf_handle().
7361 2018-08-13 Will Schmidt <will_schmidt@vnet.ibm.com>
7363 * gcc/config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add support
7364 for folding vec_perm.
7366 2018-08-13 Will Schmidt <will_schmidt@vnet.ibm.com>
7368 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin):
7369 Add support for gimple-folding of vec_pack() and vec_unpack()
7372 2018-08-13 Will Schmidt <will_schmidt@vnet.ibm.com>
7374 * config/rs6000/rs6000.c (rs6000_builtin_valid_without_lhs): Add
7375 vec_xst variants to the list.
7376 (rs6000_gimple_fold_builtin): Add support for folding unaligned
7377 vector loads and stores.
7379 2018-08-13 David Edelsohn <dje.gcc@gmail.com>
7381 * config.gcc (rs6000-ibm-aix4.x): Delete.
7382 (rs6000-ibm-aix5.1): Delete.
7383 (rs6000-ibm-aix5.2): Delete.
7384 (rs6000-ibm-aix5.3): Delete.
7385 * config/rs6000/aix43.h: Delete.
7386 * config/rs6000/aix51.h: Delete.
7387 * config/rs6000/aix52.h: Delete.
7388 * config/rs6000/t-aix43: Delete.
7390 2018-08-13 Ilya Leoshkevich <iii@linux.ibm.com>
7392 * config/s390/s390.c (s390_decompose_constant_pool_ref):
7394 (s390_decompose_address): Factor out constant pool ref
7397 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
7399 * config/nds32/nds32-predicates.c
7400 (nds32_can_use_bclr_p): Change return type as bool.
7401 (nds32_can_use_bset_p): Ditto.
7402 (nds32_can_use_btgl_p): Ditto.
7403 (nds32_can_use_bitci_p): Ditto.
7404 * config/nds32/nds32-protos.h
7405 (nds32_can_use_bclr_p): Change declaration.
7406 (nds32_can_use_bset_p): Ditto.
7407 (nds32_can_use_btgl_p): Ditto.
7408 (nds32_can_use_bitci_p): Ditto.
7410 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
7412 * config/nds32/nds32.c (nds32_expand_prologue, nds32_expand_epilogue):
7413 Support -msched-prolog-epilog option.
7414 * config/nds32/nds32.opt (msched-prolog-epilog): New option.
7416 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
7418 * common/config/nds32/nds32-common.c
7419 (nds32_option_optimization_table): Enalbe -malways-align.
7421 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
7423 * config.gcc (nds32*): Add nds32_isr.h and nds32_init.inc in
7425 * common/config/nds32/nds32-common.c (nds32_handle_option): Handle
7426 OPT_misr_secure_ case.
7427 * config/nds32/nds32-isr.c: Implementation of backward compatibility.
7428 * config/nds32/nds32-protos.h (nds32_isr_function_critical_p): New.
7429 * config/nds32/nds32.c (nds32_attribute_table): Add critical and
7431 * config/nds32/nds32.h (nds32_isr_nested_type): Add NDS32_CRITICAL.
7432 (nds32_isr_info): New field security_level.
7433 (TARGET_ISR_VECTOR_SIZE_4_BYTE): New macro.
7434 * config/nds32/nds32.md (return_internal): Consider critical attribute.
7435 * config/nds32/nds32.opt (misr-secure): New option.
7436 * config/nds32/nds32_init.inc: New file.
7437 * config/nds32/nds32_isr.h: New file.
7439 2018-08-11 John David Anglin <danglin@gcc.gnu.org>
7441 * config/pa/pa.md (UNSPEC_MEMORY_BARRIER): New unspec enum.
7442 Update comment for atomic instructions.
7443 (atomic_storeqi, atomic_storehi, atomic_storesi, atomic_storesf,
7444 atomic_loaddf, atomic_loaddf_1, atomic_storedf, atomic_storedf_1):
7446 (atomic_loaddi): Revise fence expansion to only emit fence prior to
7447 load for __ATOMIC_SEQ_CST model.
7448 (atomic_loaddi_1): Remove float register target.
7449 (atomic_storedi): Handle CONST_INT values.
7450 (atomic_storedi_1): Remove float register source. Add special case
7452 (memory_barrier): New expander and insn.
7454 2018-08-11 Jakub Jelinek <jakub@redhat.com>
7456 PR tree-optimization/86835
7457 * tree-ssa-math-opts.c (insert_reciprocals): Even when inserting
7458 new_stmt after def_gsi, make sure to insert new_square_stmt after
7459 that stmt, not 2 stmts before it.
7461 2018-08-10 Alexander Monakov <amonakov@ispras.ru>
7464 * config/i386/i386.md (<s>mul<mode>3_highpart): Use DWIH mode iterator
7467 2018-08-10 Martin Liska <mliska@suse.cz>
7470 * builtin-types.def (BT_FN_LONG_LONG_LONG_DOUBLE): Add new
7472 * builtins.c (expand_builtin_expect_with_probability):
7474 (expand_builtin_expect_with_probability): New function.
7475 (build_builtin_expect_predicate): Add new argumnet probability
7476 for BUILT_IN_EXPECT_WITH_PROBABILITY.
7477 (fold_builtin_expect):
7480 * builtins.def (BUILT_IN_EXPECT_WITH_PROBABILITY):
7481 * builtins.h (fold_builtin_expect): Set new argument.
7482 * doc/extend.texi: Document __builtin_expect_with_probability.
7483 * doc/invoke.texi: Likewise.
7484 * gimple-fold.c (gimple_fold_call): Pass new argument.
7485 * ipa-fnsummary.c (find_foldable_builtin_expect): Handle
7486 also BUILT_IN_EXPECT_WITH_PROBABILITY.
7487 * predict.c (get_predictor_value): New function.
7488 (expr_expected_value): Add new argument probability. Assume
7489 that predictor and probability are always non-null.
7490 (expr_expected_value_1): Likewise. For __builtin_expect and
7491 __builtin_expect_with_probability set probability. Handle
7492 combination in binary expressions.
7493 (tree_predict_by_opcode): Simplify code by simply calling
7494 get_predictor_value.
7495 (pass_strip_predict_hints::execute): Add handling of
7496 BUILT_IN_EXPECT_WITH_PROBABILITY.
7497 * predict.def (PRED_BUILTIN_EXPECT_WITH_PROBABILITY): Add
7499 * tree.h (DECL_BUILT_IN_P): New function.
7501 2018-08-10 Martin Liska <mliska@suse.cz>
7503 PR tree-optimization/85799
7504 * passes.def: Add argument for pass_strip_predict_hints.
7505 * predict.c (class pass_strip_predict_hints): Add new argument
7507 (strip_predictor_early): New function.
7508 (pass_strip_predict_hints::execute): Call the function to
7510 (strip_predict_hints): New function.
7511 * predict.def: Fix comment.
7513 2018-08-10 Thomas Preud'homme <thomas.preudhomme@linaro.org>
7515 * Makefile.in: Clarify which tm.texi to copy over to assert the
7516 right to grant a GFDL license for all.
7518 2018-08-09 Jeff Law <law@redhat.com>
7520 * config/m68k/m68k.c (m68k_adjust_decorated_operand): Remove
7523 2018-08-09 Andreas Schwab <schwab@linux-m68k.org>
7525 * config/m68k/m68k-protos.h (m68k_final_prescan_insn): Remove
7528 2018-08-09 Richard Sandiford <richard.sandiford@arm.com>
7530 * tree-vect-loop.c (vectorizable_reduction): Allow inner-loop
7531 reductions for variable-length vectors.
7533 2018-08-09 David Malcolm <dmalcolm@redhat.com>
7536 * common.opt (fdiagnostics-show-line-numbers): New option.
7537 * diagnostic-show-locus.c (class layout): Add fields
7538 "m_show_line_numbers_p" and "m_linenum_width";
7539 (num_digits): New function.
7540 (test_num_digits): New function.
7541 (layout::layout): Initialize new fields. Update m_x_offset
7542 logic to handle any left margin.
7543 (layout::print_source_line): Print line number when requested.
7544 (layout::start_annotation_line): New member function.
7545 (layout::print_annotation_line): Call it.
7546 (layout::print_leading_fixits): Likewise.
7547 (layout::print_trailing_fixits): Likewise. Update calls to
7548 move_to_column for new parameter.
7549 (layout::get_x_bound_for_row): Add "add_left_margin" param and use
7550 it to potentially call start_annotation_line.
7551 (layout::show_ruler): Call start_annotation_line.
7552 (selftest::test_line_numbers_multiline_range): New selftest.
7553 (selftest::diagnostic_show_locus_c_tests): Call test_num_digits
7554 and selftest::test_line_numbers_multiline_range.
7555 * diagnostic.c (diagnostic_initialize): Initialize
7556 show_line_numbers_p.
7557 * diagnostic.h (struct diagnostic_context): Add field
7558 "show_line_numbers_p".
7559 * doc/invoke.texi (Diagnostic Message Formatting Options): Add
7560 -fno-diagnostics-show-line-numbers.
7561 * dwarf2out.c (gen_producer_string): Add
7562 OPT_fdiagnostics_show_line_numbers to the ignored options.
7563 * lto-wrapper.c (merge_and_complain): Likewise to the "pick
7564 one setting" options.
7565 (append_compiler_options): Likewise to the dropped options.
7566 (append_diag_options): Likewise to the passed-on options.
7567 * opts.c (common_handle_option): Handle the new option.
7568 * toplev.c (general_init): Set up global_dc->show_line_numbers_p.
7570 2018-08-09 Kelvin Nilsen <kelvin@gcc.gnu.org>
7572 * doc/extend.texi (PowerPC AltiVec Built-in Functions Available on
7573 ISA 2.07): Correct spelling of bcdsub to be __builtin_bcdsub. Add
7574 third argument of type "const signed char" to descriptions of
7575 __builtin_bcdadd, __builtin_bcdadd_lt, __builtin_bcdadd_eq,
7576 __builtin_bcdadd_gt, __builtin_bcdadd_ov, __builtin_bcdsub,
7577 __builtin_bcdsub_lt, __builtin_bcdsub_eq, __builtin_bcdsub_gt,
7578 __builtin_bcdsub_ov functions.
7580 2018-08-09 Richard Sandiford <richard.sandiford@arm.com>
7582 PR tree-optimization/86858
7583 * tree-vect-loop.c (vect_is_simple_reduction): Restore
7584 flow_bb_inside_loop_p calls.
7586 2018-08-09 Richard Sandiford <richard.sandiford@arm.com>
7588 PR tree-optimization/86871
7589 * tree-vect-stmts.c (vect_transform_stmt): Use gimple_get_lhs
7590 instead of gimple_assign_lhs.
7592 2018-08-09 Richard Earnshaw <rearnsha@arm.com>
7595 * config/aarch64/aarch64.md (add<mode>3_carryinC_zero): Add missing
7596 register constraint to operand 0.
7597 (add<mode>3_carryinC): Likewise.
7598 (add<mode>3_carryinV_zero, add<mode>3_carryinV): Likewise.
7600 2018-08-09 Martin Liska <mliska@suse.cz>
7603 * common.opt: Remove extra line.
7605 2018-08-09 Martin Liska <mliska@suse.cz>
7607 * params.def (PARAM_ALIGN_LOOP_ITERATIONS): Remove double dots
7608 at the end of a line, make first letter capital and end up
7609 a sentence with a dot.
7610 (PARAM_LOOP_INTERCHANGE_STRIDE_RATIO): Likewise.
7611 (PARAM_LOOP_BLOCK_TILE_SIZE): Likewise.
7612 (PARAM_GRAPHITE_MAX_NB_SCOP_PARAMS): Likewise.
7613 (PARAM_GRAPHITE_MAX_ARRAYS_PER_SCOP): Likewise.
7614 (PARAM_MAX_ISL_OPERATIONS): Likewise.
7615 (PARAM_GRAPHITE_ALLOW_CODEGEN_ERRORS): Likewise.
7616 (PARAM_PROFILE_FUNC_INTERNAL_ID): Likewise.
7617 (PARAM_INDIR_CALL_TOPN_PROFILE): Likewise.
7618 (PARAM_SLP_MAX_INSNS_IN_BB): Likewise.
7619 (PARAM_IPA_CP_EVAL_THRESHOLD): Likewise.
7620 (PARAM_IPA_CP_RECURSION_PENALTY): Likewise.
7621 (PARAM_IPA_CP_SINGLE_CALL_PENALTY): Likewise.
7622 (PARAM_IPA_CP_LOOP_HINT_BONUS): Likewise.
7623 (PARAM_IPA_CP_ARRAY_INDEX_HINT_BONUS): Likewise.
7624 (PARAM_TREE_REASSOC_WIDTH): Likewise.
7625 (PARAM_HSA_GEN_DEBUG_STORES): Likewise.
7626 (PARAM_MAX_SPECULATIVE_DEVIRT_MAYDEFS): Likewise.
7627 (PARAM_MAX_VRP_SWITCH_ASSERTIONS): Likewise.
7629 2018-08-09 Andreas Krebbel <krebbel@linux.ibm.com>
7632 * config/s390/s390.c (s390_option_override_internal): Reduce the
7633 stack-clash-protection-probe-interval param if it would be too big
7636 2018-08-08 Andreas Schwab <schwab@linux-m68k.org>
7639 * config/m68k/m68k.h (FINAL_PRESCAN_INSN): Don't define.
7640 * config/m68k/m68k.c (handle_move_double): Don't call
7641 m68k_final_prescan_insn.
7642 (m68k_adjust_decorated_operand): Renamed from
7643 m68k_final_prescan_insn, remove first and third operand and
7645 (print_operand): Call it.
7646 (print_operand_address): Call it.
7648 2018-08-08 Nathan Sidwell <nathan@acm.org>
7650 * diagnostic.c (diagnostic_report_current_module): Use
7651 linemap_included_from & linemap_included_from_linemap.
7653 2018-08-08 Hongbo Zhang <hongbo.zhang@linaro.org>
7655 * config/aarch64/aarch64-cores.def: Add phecda core.
7656 * config/aarch64/aarch64-tune.md: Regenerate.
7657 * doc/invoke.texi: Add phecda core.
7659 2018-08-08 Andreas Krebbel <krebbel@linux.ibm.com>
7662 * config/s390/constraints.md ("NxHD0", "NxSD0"): New constraint
7664 * config/s390/s390.md ("movti"): Add more alternatives for
7665 constant to GPR copies.
7667 2018-08-08 Andreas Krebbel <krebbel@linux.ibm.com>
7669 * config/s390/s390.c: Fix whitespace damage throughout the file.
7670 * config/s390/s390.h: Likewise.
7671 * config/s390/tpf.h: Likewise.
7673 2018-08-08 Ilya Leoshkevich <iii@linux.ibm.com>
7675 * config/s390/s390.c (s390_loadrelative_operand_p):
7676 Remove TARGET_CPU_ZARCH usages.
7677 (s390_rtx_costs): Likewise.
7678 (s390_legitimate_constant_p): Likewise.
7679 (s390_cannot_force_const_mem): Likewise.
7680 (legitimate_reload_constant_p): Likewise.
7681 (s390_preferred_reload_class): Likewise.
7682 (legitimize_pic_address): Likewise.
7683 (legitimize_tls_address): Likewise.
7684 (s390_split_branches): Removed.
7685 (s390_add_execute): Removed.
7686 (s390_dump_pool): Remove TARGET_CPU_ZARCH usages.
7687 (s390_mainpool_start): Likewise.
7688 (s390_mainpool_finish): Likewise.
7689 (s390_mainpool_cancel): Removed.
7690 (s390_chunkify_start): Remove TARGET_CPU_ZARCH usages.
7691 (s390_chunkify_cancel): Likewise.
7692 (s390_return_addr_rtx): Likewise.
7693 (s390_register_info): Remove split_branches_pending_p uages.
7694 (s390_optimize_register_info): Likewise.
7695 (s390_init_frame_layout): Remove TARGET_CPU_ZARCH and
7696 split_branches_pending_p usages.
7697 (s390_can_eliminate): Remove TARGET_CPU_ZARCH usages.
7698 (s390_load_got): Likewise.
7699 (s390_expand_split_stack_prologue): Likewise.
7700 (output_asm_nops): Likewise.
7701 (s390_function_profiler): Likewise.
7702 (s390_emit_call): Likewise.
7703 (s390_conditional_register_usage): Likewise.
7704 (s390_optimize_prologue): Likewise.
7705 (s390_reorg): Remove TARGET_CPU_ZARCH and
7706 split_branches_pending_p usages.
7707 (s390_option_override_internal): Remove TARGET_CPU_ZARCH
7709 (s390_output_indirect_thunk_function): Likewise.
7710 * config/s390/s390.h (TARGET_CPU_ZARCH): Removed.
7711 (TARGET_CPU_ZARCH_P): Removed.
7712 (struct machine_function): Remove split_branches_pending_p.
7713 * config/s390/s390.md: Remove TARGET_CPU_ZARCH usages.
7715 2018-08-08 Ilya Leoshkevich <iii@linux.ibm.com>
7717 * common/config/s390/s390-common.c (processor_flags_table):
7719 * config.gcc: Remove with_arch/with_tune support.
7720 * config/s390/2064.md: Remove cpu attribute comparisons.
7721 * config/s390/driver-native.c (s390_host_detect_local_cpu):
7723 * config/s390/linux.h (ASM_SPEC):
7724 Remove -march support.
7725 * config/s390/s390-c.c (s390_cpu_cpp_builtins_internal):
7726 Use a table to get an arch level.
7727 * config/s390/s390-opts.h (enum processor_type):
7729 * config/s390/s390.c
7730 (processor_table): Remove entries, add arch_level values.
7731 (s390_issue_rate): Remove cases.
7732 (s390_option_override): Adjust
7733 s390_option_override_internal() call.
7734 (s390_option_override_internal): Remove deprecation warning.
7735 (s390_valid_target_attribute_tree): Adjust
7736 s390_option_override_internal() call.
7737 * config/s390/s390.h (struct s390_processor):
7738 Share with s390-c.c, add arch_level field.
7739 * config/s390/s390.md:
7740 Remove occurrences in cpu attribute.
7741 * config/s390/s390.opt: Remove -march/-mtune support.
7742 * config/s390/tpf.h (ASM_SPEC): Remove -march support.
7743 * doc/invoke.texi: Remove deprecation warning.
7745 2018-08-08 Luis Machado <luis.machado@linaro.org>
7747 * config/aarch64/aarch64.c (qdf24xx_vector_cost): New static
7749 (qdf24xx_tunings): Set vector cost structure to
7750 qdf24xx_vector_cost.
7752 * config/aarch64/aarch64.c (qdf24xx_addrcost_table)
7753 <register_sextend>: Set to 3.
7755 2018-08-07 Richard Sandiford <richard.sandiford@arm.com>
7758 * config/aarch64/iterators.md (FRECP, frecp_suffix): Delete.
7759 * config/aarch64/aarch64-simd.md
7760 (aarch64_frecp<FRECP:frecp_suffix><mode>): Fold FRECPE into...
7761 (@aarch64_frecpe<mode>): ...here and the move FRECPX to...
7762 (aarch64_frecpx<mode>): ...this new pattern.
7763 * config/aarch64/aarch64-simd-builtins.def: Remove comment
7764 about aarch64_frecp<FRECP:frecp_suffix><mode>.
7766 2018-08-07 Martin Liska <mliska@suse.cz>
7769 * predict.c (expr_expected_value_1): Handle DECL_IS_MALLOC,
7770 BUILT_IN_REALLOC and DECL_IS_OPERATOR_NEW.
7771 * predict.def (PRED_MALLOC_NONNULL): New predictor.
7772 * doc/extend.texi: Document that malloc attribute adds
7775 2018-08-06 John David Anglin <danglin@gcc.gnu.org>
7778 * config/pa/pa.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
7779 Define to speculation_safe_value_not_needed.
7781 2018-08-06 Jeff Law <law@redhat.com>
7783 * tree-ssa-dom.c (dom_opt_dom_walker::optimize_stmt): Pass down
7784 the vr_values instance to cprop_into_stmt.
7785 (cprop_into_stmt): Pass vr_values instance down to cprop_operand.
7786 (cprop_operand): Also query EVRP to determine if OP is a constant.
7788 2018-08-06 Nathan Sidwell <nathan@acm.org>
7790 * diagnostic.c (diagnostic_report_current_module): Reroll
7791 included-at loop. Translate text.
7793 2018-08-06 David Malcolm <dmalcolm@redhat.com>
7795 * function-tests.c (selftest::test_expansion_to_rtl): Call
7796 free_after_compilation.
7798 2018-08-06 Alan Hayward <alan.hayward@arm.com>
7800 * config/aarch64/aarch64.md: Add clobber highs to tls_desc.
7802 2018-08-06 Andreas Krebbel <krebbel@linux.ibm.com>
7804 * config/s390/s390.c (s390_loop_unroll_adjust): Prevent small
7805 loops with memory block operations from getting unrolled.
7807 2018-08-06 Ulrich Weigand <uweigand@de.ibm.com>
7810 * config/spu/spu.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
7811 Define to speculation_safe_value_not_needed.
7813 2018-08-06 Jeff Law <law@redhat.com>
7815 * reload1.c (forget_old_reloads_1): Adjust CLOBBER_HIGH
7818 2018-08-06 Jozef Lawrynowicz <jozef.l@mittosystems.com>
7821 * gcc/tree.c (build_common_tree_nodes): Initialize integer_types array
7822 with all enabled __intN types.
7824 * gcc/testsuite/gcc.target/msp430/pr86662.c: New test.
7826 2018-08-06 Alan Hayward <alan.hayward@arm.com>
7828 * alias.c (record_set): Check for clobber high.
7829 * cfgexpand.c (expand_gimple_stmt): Likewise.
7830 * combine-stack-adj.c (single_set_for_csa): Likewise.
7831 * combine.c (find_single_use_1): Likewise.
7832 (set_nonzero_bits_and_sign_copies): Likewise.
7833 (get_combine_src_dest): Likewise.
7834 (is_parallel_of_n_reg_sets): Likewise.
7835 (try_combine): Likewise.
7836 (record_dead_and_set_regs_1): Likewise.
7837 (reg_dead_at_p_1): Likewise.
7838 (reg_dead_at_p): Likewise.
7839 * dce.c (deletable_insn_p): Likewise.
7840 (mark_nonreg_stores_1): Likewise.
7841 (mark_nonreg_stores_2): Likewise.
7842 * df-scan.c (df_find_hard_reg_defs): Likewise.
7843 (df_uses_record): Likewise.
7844 (df_get_call_refs): Likewise.
7845 * dwarf2out.c (mem_loc_descriptor): Likewise.
7846 * haifa-sched.c (haifa_classify_rtx): Likewise.
7847 * ira-build.c (create_insn_allocnos): Likewise.
7848 * ira-costs.c (scan_one_insn): Likewise.
7849 * ira.c (equiv_init_movable_p): Likewise.
7850 (rtx_moveable_p): Likewise.
7851 (interesting_dest_for_shprep): Likewise.
7852 * jump.c (mark_jump_label_1): Likewise.
7853 * postreload-gcse.c (record_opr_changes): Likewise.
7854 * postreload.c (reload_cse_simplify): Likewise.
7855 (struct reg_use): Add source expr.
7856 (reload_combine): Check for clobber high.
7857 (reload_combine_note_use): Likewise.
7858 (reload_cse_move2add): Likewise.
7859 (move2add_note_store): Likewise.
7860 * print-rtl.c (print_pattern): Likewise.
7861 * recog.c (decode_asm_operands): Likewise.
7862 (store_data_bypass_p): Likewise.
7863 (if_test_bypass_p): Likewise.
7864 * regcprop.c (kill_clobbered_value): Likewise.
7865 (kill_set_value): Likewise.
7866 * reginfo.c (reg_scan_mark_refs): Likewise.
7867 * reload1.c (maybe_fix_stack_asms): Likewise.
7868 (eliminate_regs_1): Likewise.
7869 (elimination_effects): Likewise.
7870 (mark_not_eliminable): Likewise.
7871 (scan_paradoxical_subregs): Likewise.
7872 (forget_old_reloads_1): Likewise.
7873 * reorg.c (find_end_label): Likewise.
7874 (try_merge_delay_insns): Likewise.
7875 (redundant_insn): Likewise.
7876 (own_thread_p): Likewise.
7877 (fill_simple_delay_slots): Likewise.
7878 (fill_slots_from_thread): Likewise.
7879 (dbr_schedule): Likewise.
7880 * resource.c (update_live_status): Likewise.
7881 (mark_referenced_resources): Likewise.
7882 (mark_set_resources): Likewise.
7883 * rtl.c (copy_rtx): Likewise.
7884 * rtlanal.c (reg_referenced_p): Likewise.
7885 (single_set_2): Likewise.
7886 (noop_move_p): Likewise.
7887 (note_stores): Likewise.
7888 * sched-deps.c (sched_analyze_reg): Likewise.
7889 (sched_analyze_insn): Likewise.
7891 2018-08-06 Alan Hayward <alan.hayward@arm.com>
7893 * cse.c (invalidate_reg): New function extracted from...
7894 (invalidate): ...here.
7895 (canonicalize_insn): Check for clobber high.
7896 (invalidate_from_clobbers): invalidate clobber highs.
7897 (invalidate_from_sets_and_clobbers): Likewise.
7898 (count_reg_usage): Check for clobber high.
7899 (insn_live_p): Likewise.
7900 * cselib.c (cselib_expand_value_rtx_1):Likewise.
7901 (cselib_invalidate_regno): Check for clobber in setter.
7902 (cselib_invalidate_rtx): Pass through setter.
7903 (cselib_invalidate_rtx_note_stores):
7904 (cselib_process_insn): Check for clobber high.
7905 * cselib.h (cselib_invalidate_rtx): Add operand.
7907 2018-08-06 Alan Hayward <alan.hayward@arm.com>
7909 * lra-eliminations.c (lra_eliminate_regs_1): Check for clobber high.
7910 (mark_not_eliminable): Likewise.
7911 * lra-int.h (struct lra_insn_reg): Add clobber high marker.
7912 * lra-lives.c (process_bb_lives): Check for clobber high.
7913 * lra.c (new_insn_reg): Remember clobber highs.
7914 (collect_non_operand_hard_regs): Check for clobber high.
7915 (lra_set_insn_recog_data): Likewise.
7916 (add_regs_to_insn_regno_info): Likewise.
7917 (lra_update_insn_regno_info): Likewise.
7919 2018-08-06 Alan Hayward <alan.hayward@arm.com>
7921 * rtl.h (reg_is_clobbered_by_clobber_high): Add declarations.
7922 * rtlanal.c (reg_is_clobbered_by_clobber_high): Add function.
7924 2018-08-06 Alan Hayward <alan.hayward@arm.com>
7926 * emit-rtl.c (verify_rtx_sharing): Check for CLOBBER_HIGH.
7927 (copy_insn_1): Likewise.
7928 (gen_hard_reg_clobber_high): New gen function.
7929 * genconfig.c (walk_insn_part): Check for CLOBBER_HIGH.
7930 * genemit.c (gen_exp): Likewise.
7931 (gen_emit_seq): Pass through info.
7932 (gen_insn): Check for CLOBBER_HIGH.
7933 (gen_expand): Pass through info.
7934 (gen_split): Likewise.
7935 (output_add_clobbers): Likewise.
7936 * genrecog.c (validate_pattern): Check for CLOBBER_HIGH.
7937 (remove_clobbers): Likewise.
7938 * rtl.h (gen_hard_reg_clobber_high): New declaration.
7940 2018-08-06 Alan Hayward <alan.hayward@arm.com>
7942 * doc/rtl.texi (clobber_high): Add.
7943 (parallel): Add in clobber high
7944 * rtl.c (rtl_check_failed_code3): Add function.
7945 * rtl.def (CLOBBER_HIGH): Add expression.
7946 * rtl.h (RTL_CHECKC3): Add macro.
7947 (rtl_check_failed_code3): Add declaration.
7948 (XC3EXP): Add macro.
7950 2018-08-05 H.J. Lu <hongjiu.lu@intel.com>
7953 * config/i386/i386.c (ix86_finalize_stack_frame_flags): Set
7954 cfun->machine->max_used_stack_alignment if needed.
7956 2018-08-04 Martin Sebor <msebor@redhat.com>
7958 PR tree-optimization/86571
7959 * gimple-ssa-sprintf.c (format_floating): Extend upper bound of
7962 2018-08-03 Sandra Loosemore <sandra@codesourcery.com>
7965 * config/nios2/nios2.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
7968 2018-08-03 Jeff Law <law@redhat.com>
7971 * config/mn10300/mn10300.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
7972 Define to speculation_safe_value_not_needed.
7974 2018-08-03 David Malcolm <dmalcolm@redhat.com>
7976 * doc/gcov.texi (-x): Remove duplicate "to".
7977 * doc/invoke.texi (-Wnoexcept-type): Remove duplicate "calls".
7978 (-Wif-not-aligned): Remove duplicate "is".
7979 (-flto): Remove duplicate "the".
7980 (MicroBlaze Options): In examples of "-mcpu=cpu-type", remove
7981 duplicate "v5.00.b".
7982 (MSP430 Options): Remove duplicate "and" from the description
7983 of "-mgprel-sec=regexp".
7984 (x86 Options): Remove duplicate copies of "vmldLog102" and
7985 vmlsLog104 from description of "-mveclibabi=type".
7987 2018-08-03 Richard Sandiford <richard.sandiford@arm.com>
7989 * internal-fn.h (first_commutative_argument): Declare.
7990 * internal-fn.c (first_commutative_argument): New function.
7991 * tree-vect-slp.c (vect_get_and_check_slp_defs): Remove extra
7992 restrictions for pattern statements. Use first_commutative_argument
7993 to look for commutative operands in calls to internal functions.
7995 2018-08-03 Aldy Hernandez <aldyh@redhat.com>
7997 * Makefile.in (wide-int-range.o): New.
7998 * tree-vrp.c: Move all the wide_int_* functions to...
7999 * wide-int-range.cc: ...here.
8000 * tree-vrp.h: Move all the wide_int_* prototypes to...
8001 * wide-int-range.h: ...here.
8003 2018-08-03 Tom de Vries <tdevries@suse.de>
8005 * common/config/nvptx/nvptx-common.c (nvptx_except_unwind_info): Return
8007 * config/nvptx/nvptx.c (TARGET_ASM_BYTE_OP): Remove define.
8008 * except.c (output_function_exception_table): Do early exit if
8009 targetm_common.except_unwind_info (&global_options) == UI_NONE.
8011 2018-08-03 Martin Liska <mliska@suse.cz>
8013 * predict.c (dump_prediction): Change to 2 digits
8016 2018-08-03 Siddhesh Poyarekar <siddhesh@sourceware.org>
8018 * config/aarch64/falkor.md (falkor_am_1_vxvy_vxvy): Move
8020 (falkor_am_1_gtov_gtov): ... a new insn reservation.
8022 2018-07-19 Ilya Leoshkevich <iii@linux.ibm.com>
8024 * config/nds32/nds32.c (nds32_hard_regno_mode_ok): Replace > with >=.
8025 * df-problems.c (df_remove_dead_eq_notes): Replace > with >=.
8026 * dwarf2out.c (mem_loc_descriptor): Replace > with >=.
8027 * lra-constraints.c (spill_hard_reg_in_range): Replace <= with <.
8028 * lra-remat.c (call_used_input_regno_present_p): Replace <= with <.
8030 2018-08-02 David Malcolm <dmalcolm@redhat.com>
8032 * diagnostic-show-locus.c (diagnostic_show_locus): Use
8033 pp_take_prefix when saving the existing prefix.
8034 * diagnostic.c (diagnostic_append_note): Likewise.
8035 * langhooks.c (lhd_print_error_function): Likewise.
8036 * pretty-print.c (pp_set_prefix): Drop the "const" from "prefix"
8037 param's type. Free the existing prefix.
8038 (pp_take_prefix): New function.
8039 (pretty_printer::pretty_printer): Drop the prefix parameter.
8040 Rename the length parameter to match the comment.
8041 (pretty_printer::~pretty_printer): Free the prefix.
8042 * pretty-print.h (pretty_printer::pretty_printer): Drop the prefix
8044 (struct pretty_printer): Drop the "const" from "prefix" field's
8045 type and clarify memory management.
8046 (pp_set_prefix): Drop the "const" from the 2nd param.
8047 (pp_take_prefix): New decl.
8049 2018-08-02 Aaron Sawdey <acsawdey@linux.ibm.com>
8051 * config/rs6000/rs6000-string.c (select_block_compare_mode): Move test
8052 for word_mode_ok here instead of passing as argument.
8053 (expand_block_compare): Change select_block_compare_mode() call.
8054 (expand_strncmp_gpr_sequence): New function.
8055 (expand_strn_compare): Make use of expand_strncmp_gpr_sequence.
8057 2018-08-02 Jeff Law <law@redhat.com>
8060 * config/m68k/m68k.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
8061 Define to speculation_safe_value_not_needed.
8064 * config/h8300/h8300.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
8065 Define to speculation_safe_value_not_needed.
8067 2018-08-02 Tom de Vries <tdevries@suse.de>
8070 * common/config/nvptx/nvptx-common.c (nvptx_except_unwind_info): New
8071 function. Return UI_TARGET unconditionally.
8072 (TARGET_EXCEPT_UNWIND_INFO): Redefine to nvptx_except_unwind_info.
8073 * config/nvptx/nvptx.c (TARGET_ASM_BYTE_OP): Emit commented out '.byte'.
8075 2018-08-02 Richard Sandiford <richard.sandiford@arm.com>
8077 * genemit.c (print_overload_test): Fix typo.
8079 2018-08-02 Richard Biener <rguenther@suse.de>
8081 PR tree-optimization/86816
8082 * tree-ssa-tail-merge.c (tail_merge_valueize): New function
8083 which checks for value availability before querying it.
8084 (gvn_uses_equal): Use it.
8085 (same_succ_hash): Likewise.
8086 (gimple_equal_p): Likewise.
8088 2018-08-02 Nick Clifton <nickc@redhat.com>
8091 * config/stormy16/stormy16.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
8092 Define to speculation_safe_value_not_needed.
8095 * config/v850/v850.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
8096 Define to speculation_safe_value_not_needed.
8099 * config/v850/v850.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
8100 Define to speculation_safe_value_not_needed.
8103 * config/rx/rx.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
8104 Define to speculation_safe_value_not_needed.
8107 * config/msp430/msp430.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
8108 Define to speculation_safe_value_not_needed.
8111 * config/mcore/mcore.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
8112 Define to speculation_safe_value_not_needed.
8115 * config/m32r/m32r.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
8116 Define to speculation_safe_value_not_needed.
8119 * config/iq2000/iq2000.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
8120 Define to speculation_safe_value_not_needed.
8123 * config/frv/frv.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define to
8124 speculation_safe_value_not_needed.
8127 * config/fr30/fr30.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define
8128 to speculation_safe_value_not_needed.
8130 2018-08-02 Richard Sandiford <richard.sandiford@arm.com>
8132 * doc/md.texi: Expand the documentation of instruction names
8133 to mention port-local uses. Document '@' in pattern names.
8134 * read-md.h (overloaded_instance, overloaded_name): New structs.
8136 (md_reader::handle_overloaded_name): New member function.
8137 (md_reader::get_overloads): Likewise.
8138 (md_reader::m_first_overload): New member variable.
8139 (md_reader::m_next_overload_ptr): Likewise.
8140 (md_reader::m_overloads_htab): Likewise.
8141 * read-md.c (md_reader::md_reader): Initialize m_first_overload,
8142 m_next_overload_ptr and m_overloads_htab.
8143 * read-rtl.c (iterator_group): Add "type" and "get_c_token" fields.
8144 (get_mode_token, get_code_token, get_int_token): New functions.
8145 (map_attr_string): Add an optional argument that passes back
8146 the associated iterator.
8147 (overloaded_name_hash, overloaded_name_eq_p, named_rtx_p):
8148 (md_reader::handle_overloaded_name, add_overload_instance): New
8150 (apply_iterators): Handle '@' names. Report an error if '@'
8151 is used without iterators.
8152 (initialize_iterators): Initialize the new iterator_group fields.
8153 * genopinit.c (handle_overloaded_code_for)
8154 (handle_overloaded_gen): New functions.
8155 (main): Use them to print declarations of maybe_code_for_* and
8156 maybe_gen_* functions, and inline definitions of code_for_* and gen_*.
8157 * genemit.c (print_overload_arguments, print_overload_test)
8158 (handle_overloaded_code_for, handle_overloaded_gen): New functions.
8159 (main): Use it to print definitions of maybe_code_for_* and
8160 maybe_gen_* functions.
8161 * config/aarch64/aarch64.c (aarch64_split_128bit_move): Use
8162 gen_aarch64_mov{low,high}_di and gen_aarch64_movdi_{low,high}
8163 instead of explicit mode checks.
8164 (aarch64_split_simd_combine): Likewise gen_aarch64_simd_combine.
8165 (aarch64_split_simd_move): Likewise gen_aarch64_split_simd_mov.
8166 (aarch64_emit_load_exclusive): Likewise gen_aarch64_load_exclusive.
8167 (aarch64_emit_store_exclusive): Likewise gen_aarch64_store_exclusive.
8168 (aarch64_expand_compare_and_swap): Likewise
8169 gen_aarch64_compare_and_swap and gen_aarch64_compare_and_swap_lse
8170 (aarch64_gen_atomic_cas): Likewise gen_aarch64_atomic_cas.
8171 (aarch64_emit_atomic_swap): Likewise gen_aarch64_atomic_swp.
8172 (aarch64_constant_pool_reload_icode): Delete.
8173 (aarch64_secondary_reload): Use code_for_aarch64_reload_movcp
8174 instead of aarch64_constant_pool_reload_icode. Use
8175 code_for_aarch64_reload_mov instead of explicit mode checks.
8176 (rsqrte_type, get_rsqrte_type, rsqrts_type, get_rsqrts_type): Delete.
8177 (aarch64_emit_approx_sqrt): Use gen_aarch64_rsqrte instead of
8178 get_rsqrte_type and gen_aarch64_rsqrts instead of gen_rqrts_type.
8179 (recpe_type, get_recpe_type, recps_type, get_recps_type): Delete.
8180 (aarch64_emit_approx_div): Use gen_aarch64_frecpe instead of
8181 get_recpe_type and gen_aarch64_frecps instead of get_recps_type.
8182 (aarch64_atomic_load_op_code): Delete.
8183 (aarch64_emit_atomic_load_op): Likewise.
8184 (aarch64_gen_atomic_ldop): Use UNSPECV_ATOMIC_* instead of
8185 aarch64_atomic_load_op_code. Use gen_aarch64_atomic_load
8186 instead of aarch64_emit_atomic_load_op.
8187 * config/aarch64/aarch64.md (aarch64_reload_movcp<GPF_TF:mode><P:mode>)
8188 (aarch64_reload_movcp<VALL:mode><P:mode>, aarch64_reload_mov<mode>)
8189 (aarch64_movdi_<mode>low, aarch64_movdi_<mode>high)
8190 (aarch64_mov<mode>high_di, aarch64_mov<mode>low_di): Add a '@'
8191 character before the pattern name.
8192 * config/aarch64/aarch64-simd.md (aarch64_split_simd_mov<mode>)
8193 (aarch64_rsqrte<mode>, aarch64_rsqrts<mode>)
8194 (aarch64_simd_combine<mode>, aarch64_frecpe<mode>)
8195 (aarch64_frecps<mode>): Likewise.
8196 * config/aarch64/atomics.md (atomic_compare_and_swap<mode>)
8197 (aarch64_compare_and_swap<mode>, aarch64_compare_and_swap<mode>_lse)
8198 (aarch64_load_exclusive<mode>, aarch64_store_exclusive<mode>)
8199 (aarch64_atomic_swp<mode>, aarch64_atomic_cas<mode>)
8200 (aarch64_atomic_load<atomic_ldop><mode>): Likewise.
8202 2018-08-02 Richard Sandiford <richard.sandiford@arm.com>
8204 * config/aarch64/aarch64.c (aarch64_float_const_representable_p):
8205 Allow HFmode constants if TARGET_FP_F16INST.
8207 2018-08-02 Jackson Woodruff <jackson.woodruff@arm.com>
8210 * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp):
8211 No longer check last store for clobber of address register.
8213 2018-08-02 Martin Liska <mliska@suse.cz>
8215 PR gcov-profile/86817
8216 * gcov.c (process_all_functions): New function.
8218 (process_file): Move functions processing to
8219 process_all_functions.
8221 2018-08-02 David Malcolm <dmalcolm@redhat.com>
8223 * dumpfile.c (dump_user_location_t::dump_user_location_t): Add
8224 "const" to the "gimple *" and "rtx_insn *" parameters.
8225 * dumpfile.h (dump_user_location_t::dump_user_location_t):
8227 (dump_location_t::dump_location_t): Likewise.
8229 2018-08-01 Martin Sebor <msebor@redhat.com>
8231 PR tree-optimization/86650
8232 * gimple-pretty-print.c (percent_G_format): Accept a "gimple *"
8233 rather than a "gcall *". Directly pass the data of interest
8234 to percent_K_format, rather than building a temporary CALL_EXPR
8236 * gimple-fold.c (gimple_fold_builtin_strncpy): Adjust.
8237 (gimple_fold_builtin_strncat): Adjust.
8238 * gimple-ssa-warn-restrict.h (check_bounds_or_overlap): Replace
8239 gcall* argument with gimple*.
8240 * gimple-ssa-warn-restrict.c (check_call): Same.
8241 (wrestrict_dom_walker::before_dom_children): Same.
8242 (builtin_access::builtin_access): Same.
8243 (check_bounds_or_overlap): Same
8244 (maybe_diag_overlap): Same.
8245 (maybe_diag_offset_bounds): Same.
8246 * tree-diagnostic.c (default_tree_printer): Move usage of
8247 EXPR_LOCATION (t) and TREE_BLOCK (t) from within percent_K_format
8249 * tree-pretty-print.c (percent_K_format): Add argument.
8250 * tree-pretty-print.h: Add argument.
8251 * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Adjust.
8252 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Adjust.
8253 (maybe_diag_stxncpy_trunc): Same.
8254 (handle_builtin_stxncpy): Same.
8255 (handle_builtin_strcat): Same.
8257 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
8259 * match.pd: Optimise pointer range checks.
8261 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
8263 PR tree-optimization/86758
8264 * tree-vect-stmts.c (vectorizable_simd_clone_call): Don't try
8265 to remove pattern statements.
8267 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
8269 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Use the
8270 result of dfs_enumerate_from when constructing stmt_vec_infos,
8271 instead of additionally calling get_loop_body.
8273 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
8275 * tree-vectorizer.h (vect_create_data_ref_ptr): Remove inv_p
8277 * tree-vect-data-refs.c (vect_create_data_ref_ptr): Likewise.
8278 When creating an iv, assert that the step is not known to be zero.
8279 (vect_setup_realignment): Update call accordingly.
8280 * tree-vect-stmts.c (vectorizable_store): Likewise.
8281 (vectorizable_load): Likewise. Handle VMAT_INVARIANT separately.
8283 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
8285 * tree-vectorizer.h (vect_stmt_to_vectorize): New function.
8286 * tree-vect-loop.c (vect_update_vf_for_slp): Use it.
8287 (vectorizable_reduction): Likewise.
8288 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
8289 (vect_detect_hybrid_slp_stmts): Likewise.
8290 * tree-vect-stmts.c (vect_is_simple_use): Likewise.
8292 2018-08-01 Aldy Hernandez <aldyh@redhat.com>
8294 * tree-vrp (zero_nonzero_bits_from_bounds): Rename to...
8295 (wide_int_set_zero_nonzero_bits): ...this.
8296 (zero_nonzero_bits_from_vr): Rename to...
8297 (vrp_set_zero_nonzero_bits): ...this.
8298 (extract_range_from_multiplicative_op_1): Abstract wide int
8300 (wide_int_range_multiplicative_op): ...here.
8301 (extract_range_from_binary_expr_1): Extract wide int binary
8302 operations into their own functions.
8303 (wide_int_range_lshift): New.
8304 (wide_int_range_can_optimize_bit_op): New.
8305 (wide_int_range_shift_undefined_p): New.
8306 (wide_int_range_bit_xor): New.
8307 (wide_int_range_bit_ior): New.
8308 (wide_int_range_bit_and): New.
8309 (wide_int_range_trunc_mod): New.
8310 (extract_range_into_wide_ints): New.
8311 (vrp_shift_undefined_p): New.
8312 (extract_range_from_multiplicative_op): New.
8313 (vrp_can_optimize_bit_op): New.
8314 * tree-vrp.h (value_range::dump): New.
8315 (wide_int_range_multiplicative_op): New.
8316 (wide_int_range_lshift):New.
8317 (wide_int_range_shift_undefined_p): New.
8318 (wide_int_range_bit_xor): New.
8319 (wide_int_range_bit_ior): New.
8320 (wide_int_range_bit_and): New.
8321 (wide_int_range_trunc_mod): New.
8322 (zero_nonzero_bits_from_bounds): Rename to...
8323 (wide_int_set_zero_nonzero_bits): ...this.
8324 (zero_nonzero_bits_from_vr): Rename to...
8325 (vrp_set_zero_nonzero_bits): ...this.
8326 (range_easy_mask_min_max): Rename to...
8327 (wide_int_range_can_optimize_bit_op): this.
8328 * vr-values.c (simplify_bit_ops_using_ranges): Rename
8329 zero_nonzero_bits_from_vr into vrp_set_zero_nonzero_bits.
8331 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
8333 * tree-vectorizer.h (vect_orig_stmt): New function.
8334 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Use it.
8335 * tree-vect-loop.c (vect_model_reduction_cost): Likewise.
8336 (vect_create_epilog_for_reduction): Likewise.
8337 (vectorizable_live_operation): Likewise.
8338 * tree-vect-slp.c (vect_find_last_scalar_stmt_in_slp): Likewise.
8339 (vect_detect_hybrid_slp_stmts, vect_schedule_slp): Likewise.
8340 * tree-vect-stmts.c (vectorizable_call): Likewise.
8341 (vectorizable_simd_clone_call, vect_remove_stores): Likewise.
8343 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
8345 * tree-vectorizer.h (vect_transform_stmt): Remove grouped_store
8347 * tree-vect-stmts.c (vect_transform_stmt): Likewise.
8348 * tree-vect-loop.c (vect_transform_loop_stmt): Update call accordingly.
8349 (vect_transform_loop): Likewise.
8350 * tree-vect-slp.c (vect_schedule_slp_instance): Likewise.
8352 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
8354 * tree-vectorizer.h (vect_schedule_slp): Return void.
8355 * tree-vect-slp.c (vect_schedule_slp_instance): Likewise.
8356 (vect_schedule_slp): Likewise.
8358 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
8360 * tree-vect-loop.c (vect_transform_loop_stmt): Remove slp_scheduled
8362 (vect_transform_loop): Update calls accordingly. Schedule SLP
8363 instances before the main loop, if any exist.
8365 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
8367 PR tree-optimization/86749
8368 * tree-vect-patterns.c (vect_determine_min_output_precision_1):
8369 If the lhs is used in a COND_EXPR, check that it is being used
8370 as the "then" or "else" value.
8372 2018-08-01 Tom de Vries <tdevries@suse.de>
8375 * config/nvptx/nvptx.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define to
8376 speculation_safe_value_not_needed.
8378 2018-08-01 Richard Biener <rguenther@suse.de>
8380 * tree-ssa-sccvn.c (visit_phi): Compare invariant addresses
8383 2018-08-01 Martin Liska <mliska@suse.cz>
8385 * value-prof.c (gimple_divmod_fixed_value_transform): Unify
8386 format how successful transformation is dumped.
8387 (gimple_mod_pow2_value_transform): Likewise.
8388 (gimple_mod_subtract_transform): Likewise.
8389 (gimple_stringops_transform): Likewise.
8391 2018-08-01 Martin Liska <mliska@suse.cz>
8394 * value-prof.c (interesting_stringop_to_profile_p):
8395 Simplify the code and add BUILT_IN_MEMMOVE.
8396 (gimple_stringops_transform): Likewise.
8398 2018-08-01 Sam Tebbs <sam.tebbs@arm.com>
8400 * config/aarch64/aarch64-simd.md
8401 (*aarch64_get_lane_zero_extendsi<mode>): Rename to...
8402 (*aarch64_get_lane_zero_extend<GPI:mode><VDQQH:mode>): ... This and
8403 use GPI iterator instead of SI mode.
8405 2018-08-01 Richard Earnshaw <rearnsha@arm.com>
8407 * config/rs6000/rs6000.md (speculation_barrier): Renamed from
8408 rs6000_speculation_barrier.
8409 * config/rs6000/rs6000.c (rs6000_expand_builtin): Adjust for
8410 new barrier pattern name.
8412 2018-08-01 Richard Earnshaw <rearnsha@arm.com>
8414 * config/i386/i386.md (unspecv): Add UNSPECV_SPECULATION_BARRIER.
8415 (speculation_barrier): New insn.
8417 2018-08-01 Richard Biener <rguenther@suse.de>
8420 * graphite.h: Include isl/id.h and isl/space.h to allow build
8423 2018-08-01 Jan Willem Jagersma <jwjagersma@gmail.com>
8426 * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
8427 mode for COFF targets.
8428 * defaults.h (TARGET_COFF): Define.
8429 * config/i386/djgpp.h (TARGET_ASM_LTO_START, TARGET_ASM_LTO_END,
8430 TARGET_COFF): Define.
8431 (i386_djgpp_asm_lto_start, i386_djgpp_asm_lto_end): Declare.
8432 * config/i386/djgpp.c (saved_debug_info_level): New static variable.
8433 (i386_djgpp_asm_lto_start, i386_djgpp_asm_lto_end): New functions.
8435 2018-07-31 Alexandre Oliva <oliva@adacore.com>
8437 * gimple-streamer-in.c (input_bb): Restore BB discriminator.
8438 * gimple-streamer-out.c (output_bb): Save it.
8439 * lto-streamer-in.c (input_struct_function_base): Restore
8440 instance discriminator if available. Create map on demand.
8441 * lto-streamer-out.c (output_struct_function_base): Save it if
8443 * final.c (decl_to_instance_map): Document LTO strategy.
8445 2018-07-31 Alexandre Oliva <oliva@adacore.com>
8446 Olivier Hainque <hainque@adacore.com>
8448 * debug.h (decl_to_instance_map_t): New type.
8449 (decl_to_instance_map): Declare.
8450 (maybe_create_decl_to_instance_map): New inline function.
8451 * final.c (bb_discriminator, last_bb_discriminator): New statics,
8452 to track basic block discriminators.
8453 (final_start_function_1): Initialize them.
8454 (final_scan_insn_1): On NOTE_INSN_BASIC_BLOCK, track
8456 (decl_to_instance_map): New variable.
8457 (map_decl_to_instance, maybe_set_discriminator): New functions.
8458 (notice_source_line): Set discriminator.
8460 2018-07-31 Ian Lance Taylor <iant@golang.org>
8462 * targhooks.c (default_have_speculation_safe_value): Add
8465 2018-07-31 David Malcolm <dmalcolm@redhat.com>
8467 * dump-context.h: Include "pretty-print.h".
8468 (dump_context::refresh_dumps_are_enabled): New decl.
8469 (dump_context::emit_item): New decl.
8470 (class dump_context): Add fields "m_test_pp" and
8472 (temp_dump_context::temp_dump_context): Add param "test_pp_flags".
8473 (temp_dump_context::get_dumped_text): New decl.
8474 (class temp_dump_context): Add field "m_pp".
8475 * dumpfile.c (refresh_dumps_are_enabled): Convert to...
8476 (dump_context::refresh_dumps_are_enabled): ...and add a test for
8478 (set_dump_file): Update for above change.
8479 (set_alt_dump_file): Likewise.
8480 (dump_loc): New overload, taking a pretty_printer *.
8481 (dump_context::dump_loc): Call end_any_optinfo. Dump the location
8482 to any test pretty-printer.
8483 (make_item_for_dump_gimple_stmt): New function, adapted from
8484 optinfo::add_gimple_stmt.
8485 (dump_context::dump_gimple_stmt): Call it, and use the result,
8486 eliminating the direct usage of dump_file and alt_dump_file in
8487 favor of indirectly using them via emit_item.
8488 (make_item_for_dump_gimple_expr): New function, adapted from
8489 optinfo::add_gimple_expr.
8490 (dump_context::dump_gimple_expr): Call it, and use the result,
8491 eliminating the direct usage of dump_file and alt_dump_file in
8492 favor of indirectly using them via emit_item.
8493 (make_item_for_dump_generic_expr): New function, adapted from
8495 (dump_context::dump_generic_expr): Call it, and use the result,
8496 eliminating the direct usage of dump_file and alt_dump_file in
8497 favor of indirectly using them via emit_item.
8498 (make_item_for_dump_printf_va): New function, adapted from
8499 optinfo::add_printf_va.
8500 (make_item_for_dump_printf): New function.
8501 (dump_context::dump_printf_va): Call make_item_for_dump_printf_va,
8502 and use the result, eliminating the direct usage of dump_file and
8503 alt_dump_file in favor of indirectly using them via emit_item.
8504 (make_item_for_dump_dec): New function.
8505 (dump_context::dump_dec): Call it, and use the result,
8506 eliminating the direct usage of dump_file and alt_dump_file in
8507 favor of indirectly using them via emit_item.
8508 (make_item_for_dump_symtab_node): New function, adapted from
8509 optinfo::add_symtab_node.
8510 (dump_context::dump_symtab_node): Call it, and use the result,
8511 eliminating the direct usage of dump_file and alt_dump_file in
8512 favor of indirectly using them via emit_item.
8513 (dump_context::begin_scope): Reimplement, avoiding direct usage
8514 of dump_file and alt_dump_file in favor of indirectly using them
8516 (dump_context::emit_item): New member function.
8517 (temp_dump_context::temp_dump_context): Add param "test_pp_flags".
8518 Set up test pretty-printer on the underlying context. Call
8519 refresh_dumps_are_enabled.
8520 (temp_dump_context::~temp_dump_context): Call
8521 refresh_dumps_are_enabled.
8522 (temp_dump_context::get_dumped_text): New member function.
8523 (selftest::verify_dumped_text): New function.
8524 (ASSERT_DUMPED_TEXT_EQ): New macro.
8525 (selftest::test_capture_of_dump_calls): Run all tests twice, with
8526 and then without optinfo enabled. Add uses of
8527 ASSERT_DUMPED_TEXT_EQ to all tests. Add test of nested scopes.
8528 * dumpfile.h: Update comment for the dump_* API.
8529 * optinfo-emit-json.cc
8530 (selftest::test_building_json_from_dump_calls): Update for new
8531 param for temp_dump_context ctor.
8532 * optinfo.cc (optinfo_item::optinfo_item): Remove "owned" param
8533 and "m_owned" field.
8534 (optinfo_item::~optinfo_item): Likewise.
8535 (optinfo::add_item): New member function.
8536 (optinfo::emit): Update comment.
8537 (optinfo::add_string): Delete.
8538 (optinfo::add_printf): Delete.
8539 (optinfo::add_printf_va): Delete.
8540 (optinfo::add_gimple_stmt): Delete.
8541 (optinfo::add_gimple_expr): Delete.
8542 (optinfo::add_tree): Delete.
8543 (optinfo::add_symtab_node): Delete.
8544 (optinfo::add_dec): Delete.
8545 * optinfo.h (class dump_context): New forward decl.
8546 (optinfo::add_item): New decl.
8547 (optinfo::add_string): Delete.
8548 (optinfo::add_printf): Delete.
8549 (optinfo::add_printf_va): Delete.
8550 (optinfo::add_gimple_stmt): Delete.
8551 (optinfo::add_gimple_expr): Delete.
8552 (optinfo::add_tree): Delete.
8553 (optinfo::add_symtab_node): Delete.
8554 (optinfo::add_dec): Delete.
8555 (optinfo::add_poly_int): Delete.
8556 (optinfo_item::optinfo_item): Remove "owned" param.
8557 (class optinfo_item): Remove field "m_owned".
8559 2018-07-31 Jozef Lawrynowicz <jozef.l@mittosystems.com>
8562 * gcc/cfgexpand.c (set_parm_rtl): Use the alignment of Pmode when
8563 MAX_SUPPORTED_STACK_ALIGNMENT would otherwise be exceeded by the
8564 requested variable alignment.
8565 (expand_one_ssa_partition): Likewise.
8566 (expand_one_var): Likewise.
8568 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
8570 * config/pdp11/pdp11.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
8571 to speculation_safe_value_not_needed.
8573 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
8575 * targhooks.h (speculation_safe_value_not_needed): New prototype.
8576 * targhooks.c (speculation_safe_value_not_needed): New function.
8577 * target.def (have_speculation_safe_value): Update documentation.
8578 * doc/tm.texi: Regenerated.
8580 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
8582 * config/aarch64/iterators.md (ALLI_TI): New iterator.
8583 * config/aarch64/aarch64.md (despeculate_copy<ALLI_TI:mode>): New
8585 (despeculate_copy<ALLI:mode>_insn): New insn.
8586 (despeculate_copyti_insn): New insn.
8587 (despeculate_simple<ALLI:mode>): New insn
8588 (despeculate_simpleti): New insn.
8589 * config/aarch64/aarch64.c (aarch64_speculation_safe_value): New
8591 (TARGET_SPECULATION_SAFE_VALUE): Redefine to
8592 aarch64_speculation_safe_value.
8593 (aarch64_print_operand): Handle const0_rtx in modifier 'H'.
8595 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
8597 * config/aarch64/aarch64-speculation.cc: New file.
8598 * config/aarch64/aarch64-passes.def (pass_track_speculation): Add
8599 before pass_reorder_blocks.
8600 * config/aarch64/aarch64-protos.h (make_pass_track_speculation): Add
8602 * config/aarch64/aarch64.c (aarch64_conditional_register_usage): Fix
8603 X14 and X15 when tracking speculation.
8604 * config/aarch64/aarch64.md (register name constants): Add
8605 SPECULATION_TRACKER_REGNUM and SPECULATION_SCRATCH_REGNUM.
8606 (unspec): Add UNSPEC_SPECULATION_TRACKER.
8607 (speculation_barrier): New insn attribute.
8608 (cmp<mode>): Allow SP in comparisons.
8609 (speculation_tracker): New insn.
8610 (speculation_barrier): Add speculation_barrier attribute.
8611 * config/aarch64/t-aarch64: Add make rule for aarch64-speculation.o.
8612 * config.gcc (aarch64*-*-*): Add aarch64-speculation.o to extra_objs.
8613 * doc/invoke.texi (AArch64 Options): Document -mtrack-speculation.
8615 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
8617 * config/aarch64/aarch64.md (cb<optab><mode>1): Disable when
8618 aarch64_track_speculation is true.
8619 (tb<optab><mode>1): Likewise.
8620 * config/aarch64/aarch64.c (aarch64_split_compare_regs): Do not
8621 generate CB[N]Z when tracking speculation.
8622 (aarch64_split_compare_and_swap): Likewise.
8623 (aarch64_split_atomic_op): Likewise.
8625 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
8627 * config/aarch64/aarch64.opt (mtrack-speculation): New target option.
8629 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
8631 * config/aarch64.md (unspecv): Add UNSPECV_SPECULAION_BARRIER.
8632 (speculation_barrier): New insn.
8634 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
8636 * config/arm/unspecs.md (unspecv): Add VUNSPEC_SPECULATION_BARRIER.
8637 * config/arm/arm.md (speculation_barrier): New expand.
8638 (speculation_barrier_insn): New pattern.
8640 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
8642 * builtin-types.def (BT_FN_PTR_PTR_VAR): New function type.
8643 (BT_FN_I1_I1_VAR, BT_FN_I2_I2_VAR, BT_FN_I4_I4_VAR): Likewise.
8644 (BT_FN_I8_I8_VAR, BT_FN_I16_I16_VAR): Likewise.
8645 * builtin-attrs.def (ATTR_NOVOPS_NOTHROW_LEAF_LIST): New attribute
8647 * builtins.def (BUILT_IN_SPECULATION_SAFE_VALUE_N): New builtin.
8648 (BUILT_IN_SPECULATION_SAFE_VALUE_PTR): New internal builtin.
8649 (BUILT_IN_SPECULATION_SAFE_VALUE_1): Likewise.
8650 (BUILT_IN_SPECULATION_SAFE_VALUE_2): Likewise.
8651 (BUILT_IN_SPECULATION_SAFE_VALUE_4): Likewise.
8652 (BUILT_IN_SPECULATION_SAFE_VALUE_8): Likewise.
8653 (BUILT_IN_SPECULATION_SAFE_VALUE_16): Likewise.
8654 * builtins.c (expand_speculation_safe_value): New function.
8655 (expand_builtin): Call it.
8656 * doc/cpp.texi: Document predefine __HAVE_SPECULATION_SAFE_VALUE.
8657 * doc/extend.texi: Document __builtin_speculation_safe_value.
8658 * doc/md.texi: Document "speculation_barrier" pattern.
8659 * doc/tm.texi.in: Pull in TARGET_SPECULATION_SAFE_VALUE and
8660 TARGET_HAVE_SPECULATION_SAFE_VALUE.
8661 * doc/tm.texi: Regenerated.
8662 * target.def (have_speculation_safe_value, speculation_safe_value): New
8664 * targhooks.c (default_have_speculation_safe_value): New function.
8665 (default_speculation_safe_value): New function.
8666 * targhooks.h (default_have_speculation_safe_value): Add prototype.
8667 (default_speculation_safe_value): Add prototype.
8669 2018-07-31 David Malcolm <dmalcolm@redhat.com>
8671 * dump-context.h (dump_context::dump_loc): New decl.
8672 * dumpfile.c (dump_context::dump_loc): New member function.
8673 (dump_context::dump_gimple_stmt_loc): Reimplement using dump_loc
8674 and dump_gimple_stmt.
8675 (dump_context::dump_gimple_expr_loc): Likewise, using
8677 (dump_context::dump_generic_expr_loc): Likewise, using
8679 (dump_context::dump_printf_loc_va): Likewise, using
8681 (dump_context::begin_scope): Explicitly using the global function
8682 "dump_loc", rather than the member function.
8684 2018-07-31 Martin Sebor <msebor@redhat.com>
8686 PR tree-optimization/86741
8687 * tree-vrp.c (vrp_prop::check_mem_ref): Avoid incomplete types.
8689 2018-07-31 Andreas Krebbel <krebbel@linux.ibm.com>
8691 * config/s390/s390.c (s390_expand_setmem): Make the unrolling to
8692 depend on whether prefetch instructions will be emitted or not.
8693 Use TARGET_SETMEM_PFD for checking whether prefetch instructions
8694 will be emitted or not.
8695 * config/s390/s390.h (TARGET_SETMEM_PREFETCH_DISTANCE)
8696 (TARGET_SETMEM_PFD): New macros.
8698 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8700 * tree-vectorizer.h (stmt_vec_info): Turn back into a typedef.
8701 (NULL_STMT_VEC_INFO): Delete.
8702 (stmt_vec_info::operator*): Likewise.
8703 (stmt_vec_info::operator gimple *): Likewise.
8704 * tree-vect-loop.c (vectorizable_reduction): Use NULL instead
8705 of NULL_STMT_VEC_INFO.
8706 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
8707 (vect_reassociating_reduction_p): Likewise.
8708 * tree-vect-stmts.c (vect_build_gather_load_calls): Likewise.
8709 (vectorizable_store): Likewise.
8710 * tree-vectorizer.c (vec_info::set_vinfo_for_stmt): Likewise.
8711 (vec_info::free_stmt_vec_infos): Likewise.
8713 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8715 * tree-vectorizer.h (vect_stmt_in_region_p): Delete.
8716 * tree-vectorizer.c (vect_stmt_in_region_p): Likewise.
8718 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8720 * tree-vectorizer.h (vec_info::new_vinfo_for_stmt)
8721 (vec_info::set_vinfo_for_stmt, vec_info::free_stmt_vec_infos)
8722 (vec_info::free_stmt_vec_info): New private member functions.
8723 (set_stmt_vec_info_vec, free_stmt_vec_infos, vinfo_for_stmt)
8724 (set_vinfo_for_stmt, new_stmt_vec_info, free_stmt_vec_info): Delete.
8725 * tree-parloops.c (gather_scalar_reductions): Remove calls to
8726 set_stmt_vec_info_vec and free_stmt_vec_infos.
8727 * tree-vect-loop.c (_loop_vec_info): Remove call to
8728 set_stmt_vec_info_vec.
8729 * tree-vect-stmts.c (new_stmt_vec_info, set_stmt_vec_info_vec)
8730 (free_stmt_vec_infos, free_stmt_vec_info): Delete in favor of...
8731 * tree-vectorizer.c (vec_info::new_stmt_vec_info)
8732 (vec_info::set_vinfo_for_stmt, vec_info::free_stmt_vec_infos)
8733 (vec_info::free_stmt_vec_info): ...these new functions. Remove
8734 assignments in {vec_info::,}new_stmt_vec_info that are redundant
8735 with the clearing in the xcalloc.
8736 (stmt_vec_info_vec): Delete.
8737 (vec_info::vec_info): Don't call set_stmt_vec_info_vec.
8738 (vectorize_loops): Likewise.
8739 (vec_info::~vec_info): Remove argument from call to
8740 free_stmt_vec_infos.
8741 (vec_info::add_stmt): Remove vinfo argument from call to
8744 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8746 * tree-vectorizer.h (free_stmt_vec_info): Take a stmt_vec_info
8747 rather than a gimple stmt.
8748 * tree-vect-stmts.c (free_stmt_vec_info): Likewise. Don't free
8749 information for pattern statements when passed the original
8750 statement; instead wait to be passed the pattern statement itself.
8751 Don't call set_vinfo_for_stmt here.
8752 (free_stmt_vec_infos): Update call to free_stmt_vec_info.
8753 * tree-vect-loop.c (_loop_vec_info::~loop_vec_info): Don't free
8754 stmt_vec_infos here.
8755 * tree-vect-slp.c (_bb_vec_info::~bb_vec_info): Likewise.
8756 * tree-vectorizer.c (vec_info::remove_stmt): Nullify the statement's
8757 stmt_vec_infos entry.
8759 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8761 * tree-vectorizer.h (vec_info::replace_stmt): Declare.
8762 * tree-vectorizer.c (vec_info::replace_stmt): New function.
8763 * tree-vect-slp.c (vect_remove_slp_scalar_calls): Use it.
8764 * tree-vect-stmts.c (vectorizable_call): Likewise.
8765 (vectorizable_simd_clone_call): Likewise.
8767 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8769 * tree-vectorizer.h (vec_info::remove_stmt): Declare.
8770 * tree-vectorizer.c (vec_info::remove_stmt): New function.
8771 * tree-vect-loop-manip.c (vect_set_loop_condition): Use it.
8772 * tree-vect-loop.c (vect_transform_loop): Likewise.
8773 * tree-vect-slp.c (vect_schedule_slp): Likewise.
8774 * tree-vect-stmts.c (vect_remove_stores): Likewise.
8776 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8778 * tree-vectorizer.h (vec_info::lookup_dr): New member function.
8779 (vect_dr_stmt): Delete.
8780 * tree-vectorizer.c (vec_info::lookup_dr): New function.
8781 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Use it instead
8783 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
8784 (vect_analyze_data_ref_dependence, vect_record_base_alignments)
8785 (vect_verify_datarefs_alignment, vect_peeling_supportable)
8786 (vect_analyze_data_ref_accesses, vect_prune_runtime_alias_test_list)
8787 (vect_analyze_data_refs): Likewise.
8788 (vect_slp_analyze_data_ref_dependence): Likewise. Take a vec_info
8790 (vect_find_same_alignment_drs): Likewise.
8791 (vect_slp_analyze_node_dependences): Update calls accordingly.
8792 (vect_analyze_data_refs_alignment): Likewise. Use vec_info::lookup_dr
8793 instead of DR_VECT_AUX.
8794 (vect_get_peeling_costs_all_drs): Take a loop_vec_info instead
8795 of a vector data references. Use vec_info::lookup_dr instead of
8797 (vect_peeling_hash_get_lowest_cost): Update calls accordingly.
8798 (vect_enhance_data_refs_alignment): Likewise. Use vec_info::lookup_dr
8799 instead of DR_VECT_AUX.
8801 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8803 * tree-vectorizer.h (_loop_vec_info::unaligned_dr): Change to
8805 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Update
8807 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
8808 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
8809 (vect_gen_prolog_loop_niters): Likewise.
8811 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8813 * tree-vectorizer.h (set_dr_misalignment, dr_misalignment)
8814 (DR_TARGET_ALIGNMENT, aligned_access_p, known_alignment_for_access_p)
8815 (vect_known_alignment_in_bytes, vect_dr_behavior)
8816 (vect_get_scalar_dr_size): Take references as dr_vec_infos
8817 instead of data_references. Update calls to other routines for
8818 which the same change has been made.
8819 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Take
8820 dr_vec_infos instead of stmt_vec_infos.
8821 (vect_analyze_data_ref_dependence): Update call accordingly.
8822 (vect_slp_analyze_data_ref_dependence)
8823 (vect_record_base_alignments): Use DR_VECT_AUX.
8824 (vect_calculate_target_alignment, vect_compute_data_ref_alignment)
8825 (vect_update_misalignment_for_peel, verify_data_ref_alignment)
8826 (vector_alignment_reachable_p, vect_get_data_access_cost)
8827 (vect_peeling_supportable, vect_analyze_group_access_1)
8828 (vect_analyze_group_access, vect_analyze_data_ref_access)
8829 (vect_vfa_segment_size, vect_vfa_access_size, vect_vfa_align)
8830 (vect_compile_time_alias, vect_small_gap_p)
8831 (vectorizable_with_step_bound_p, vect_duplicate_ssa_name_ptr_info):
8832 (vect_supportable_dr_alignment): Take references as dr_vec_infos
8833 instead of data_references. Update calls to other routines for
8834 which the same change has been made.
8835 (vect_verify_datarefs_alignment, vect_get_peeling_costs_all_drs)
8836 (vect_find_same_alignment_drs, vect_analyze_data_refs_alignment)
8837 (vect_slp_analyze_and_verify_node_alignment)
8838 (vect_analyze_data_ref_accesses, vect_prune_runtime_alias_test_list)
8839 (vect_create_addr_base_for_vector_ref, vect_create_data_ref_ptr)
8840 (vect_setup_realignment): Use dr_vec_infos. Update calls after
8842 (_vect_peel_info::dr): Replace with...
8843 (_vect_peel_info::dr_info): ...this new field.
8844 (vect_peeling_hash_get_most_frequent)
8845 (vect_peeling_hash_choose_best_peeling): Update accordingly.
8846 (vect_peeling_hash_get_lowest_cost):
8847 (vect_enhance_data_refs_alignment): Likewise. Update calls to other
8848 routines for which the same change has been made.
8849 (vect_peeling_hash_insert): Likewise. Take a dr_vec_info instead of a
8851 * tree-vect-loop-manip.c (get_misalign_in_elems)
8852 (vect_gen_prolog_loop_niters): Use dr_vec_infos. Update calls after
8854 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
8855 * tree-vect-stmts.c (vect_get_store_cost, vect_get_load_cost)
8856 (vect_truncate_gather_scatter_offset, compare_step_with_zero)
8857 (get_group_load_store_type, get_negative_load_store_type)
8858 (vect_get_data_ptr_increment, vectorizable_store)
8859 (vectorizable_load): Likewise.
8860 (ensure_base_align): Take a dr_vec_info instead of a data_reference.
8861 Update calls to other routines for which the same change has been made.
8863 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8865 * tree-vectorizer.h (vec_info::move_dr): New member function.
8866 (dataref_aux): Rename to...
8867 (dr_vec_info): ...this and add "dr" and "stmt" fields.
8868 (_stmt_vec_info::dr_aux): Update accordingly.
8869 (_stmt_vec_info::data_ref_info): Delete.
8870 (STMT_VINFO_GROUPED_ACCESS, DR_GROUP_FIRST_ELEMENT)
8871 (DR_GROUP_NEXT_ELEMENT, DR_GROUP_SIZE, DR_GROUP_STORE_COUNT)
8872 (DR_GROUP_GAP, DR_GROUP_SAME_DR_STMT, REDUC_GROUP_FIRST_ELEMENT):
8873 (REDUC_GROUP_NEXT_ELEMENT, REDUC_GROUP_SIZE): Use dr_aux.dr instead
8875 (STMT_VINFO_DATA_REF): Likewise. Turn into an lvalue.
8876 (STMT_VINFO_DR_INFO): New macro.
8877 (DR_VECT_AUX): Use STMT_VINFO_DR_INKFO and vect_dr_stmt.
8878 (set_dr_misalignment): Update after rename of dataref_aux.
8879 (vect_dr_stmt): Move earlier in file. Return dr_aux.stmt.
8880 * tree-vect-stmts.c (new_stmt_vec_info): Remove redundant
8881 initialization of STMT_VINFO_DATA_REF.
8882 * tree-vectorizer.c (vec_info::move_dr): New function.
8883 * tree-vect-patterns.c (vect_recog_bool_pattern)
8884 (vect_recog_mask_conversion_pattern)
8885 (vect_recog_gather_scatter_pattern): Use it.
8886 * tree-vect-data-refs.c (vect_analyze_data_refs): Initialize
8887 the "dr" and "stmt" fields of dr_vec_info instead of
8888 STMT_VINFO_DATA_REF.
8890 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8892 * tree-vectorizer.h (_stmt_vec_info::pattern_stmt_p): New field.
8893 (is_pattern_stmt_p): Use it.
8894 * tree-vect-patterns.c (vect_init_pattern_stmt): Set pattern_stmt_p
8895 on pattern statements.
8897 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8899 * tree-vect-patterns.c (vect_mark_pattern_stmts): Take the
8900 original stmt as a stmt_vec_info rather than a gimple stmt.
8901 (vect_pattern_recog_1): Take the statement directly as a
8902 stmt_vec_info, rather than via a gimple_stmt_iterator.
8903 Update call to vect_mark_pattern_stmts.
8904 (vect_pattern_recog): Update calls accordingly.
8906 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8908 * tree-vectorizer.h (vect_get_vec_defs_for_stmt_copy)
8909 (vect_get_vec_def_for_stmt_copy): Take a vec_info rather than
8910 a vect_def_type for the first argument.
8911 * tree-vect-stmts.c (vect_get_vec_defs_for_stmt_copy): Likewise.
8912 (vect_get_vec_def_for_stmt_copy): Likewise. Return the original
8913 operand if it isn't defined by a vectorized statement.
8914 (vect_build_gather_load_calls): Remove the mask_dt argument and
8915 update calls to vect_get_vec_def_for_stmt_copy.
8916 (vectorizable_bswap): Likewise the dt argument.
8917 (vectorizable_call): Update calls to vectorizable_bswap and
8918 vect_get_vec_def_for_stmt_copy.
8919 (vectorizable_simd_clone_call, vectorizable_assignment)
8920 (vectorizable_shift, vectorizable_operation, vectorizable_condition)
8921 (vectorizable_comparison): Update calls to
8922 vect_get_vec_def_for_stmt_copy.
8923 (vectorizable_store): Likewise. Remove now-unnecessary calls to
8925 (vect_get_loop_based_defs): Remove dt argument and update call
8926 to vect_get_vec_def_for_stmt_copy.
8927 (vectorizable_conversion): Update calls to vect_get_loop_based_defs
8928 and vect_get_vec_def_for_stmt_copy.
8929 (vectorizable_load): Update calls to vect_build_gather_load_calls
8930 and vect_get_vec_def_for_stmt_copy.
8931 * tree-vect-loop.c (vect_create_epilog_for_reduction)
8932 (vectorizable_reduction, vectorizable_live_operation): Update calls
8933 to vect_get_vec_def_for_stmt_copy.
8935 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8937 * tree-vect-data-refs.c (vect_record_base_alignment): Replace vec_info
8938 and gimple stmt arguments with a stmt_vec_info.
8939 (vect_record_base_alignments): Update calls accordingly.
8940 * tree-vect-slp.c (vect_record_max_nunits): Replace vec_info
8941 and gimple stmt arguments with a stmt_vec_info.
8942 (vect_build_slp_tree_1): Remove vinfo argument and update call
8943 to vect_record_max_nunits.
8944 (vect_build_slp_tree_2): Update calls to vect_build_slp_tree_1
8945 and vect_record_max_nunits.
8947 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8949 * tree-vectorizer.h (nested_in_vect_loop_p): Move further down
8950 file and take a stmt_vec_info instead of a gimple stmt.
8951 (supportable_widening_operation, vect_finish_replace_stmt)
8952 (vect_finish_stmt_generation, vect_get_store_rhs)
8953 (vect_get_vec_def_for_operand_1, vect_get_vec_def_for_operand)
8954 (vect_get_vec_defs, vect_init_vector, vect_transform_stmt)
8955 (vect_remove_stores, vect_analyze_stmt, vectorizable_condition)
8956 (vect_get_smallest_scalar_type, vect_check_gather_scatter)
8957 (vect_create_data_ref_ptr, bump_vector_ptr)
8958 (vect_permute_store_chain, vect_setup_realignment)
8959 (vect_transform_grouped_load, vect_record_grouped_load_vectors)
8960 (vect_create_addr_base_for_vector_ref, vectorizable_live_operation)
8961 (vectorizable_reduction, vectorizable_induction)
8962 (get_initial_def_for_reduction, is_simple_and_all_uses_invariant)
8963 (vect_get_place_in_interleaving_chain): Take stmt_vec_infos rather
8964 than gimple stmts as arguments.
8965 * tree-vect-data-refs.c (vect_get_smallest_scalar_type)
8966 (vect_preserves_scalar_order_p, vect_slp_analyze_node_dependences)
8967 (can_group_stmts_p, vect_check_gather_scatter)
8968 (vect_create_addr_base_for_vector_ref, vect_create_data_ref_ptr)
8969 (bump_vector_ptr, vect_permute_store_chain, vect_setup_realignment)
8970 (vect_permute_load_chain, vect_shift_permute_load_chain)
8971 (vect_transform_grouped_load)
8972 (vect_record_grouped_load_vectors): Likewise.
8973 * tree-vect-loop.c (vect_fixup_reduc_chain)
8974 (get_initial_def_for_reduction, vect_create_epilog_for_reduction)
8975 (vectorize_fold_left_reduction, is_nonwrapping_integer_induction)
8976 (vectorizable_reduction, vectorizable_induction)
8977 (vectorizable_live_operation, vect_loop_kill_debug_uses): Likewise.
8978 * tree-vect-patterns.c (type_conversion_p, adjust_bool_stmts)
8979 (vect_get_load_store_mask): Likewise.
8980 * tree-vect-slp.c (vect_get_place_in_interleaving_chain)
8981 (vect_analyze_slp_instance, vect_mask_constant_operand_p): Likewise.
8982 * tree-vect-stmts.c (vect_mark_relevant)
8983 (is_simple_and_all_uses_invariant)
8984 (exist_non_indexing_operands_for_use_p, process_use)
8985 (vect_init_vector_1, vect_init_vector, vect_get_vec_def_for_operand_1)
8986 (vect_get_vec_def_for_operand, vect_get_vec_defs)
8987 (vect_finish_stmt_generation_1, vect_finish_replace_stmt)
8988 (vect_finish_stmt_generation, vect_truncate_gather_scatter_offset)
8989 (compare_step_with_zero, vect_get_store_rhs, get_group_load_store_type)
8990 (get_negative_load_store_type, get_load_store_type)
8991 (vect_check_load_store_mask, vect_check_store_rhs)
8992 (vect_build_gather_load_calls, vect_get_strided_load_store_ops)
8993 (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
8994 (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
8995 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
8996 (get_group_alias_ptr_type, vectorizable_store, hoist_defs_of_uses)
8997 (vectorizable_load, vectorizable_condition, vectorizable_comparison)
8998 (vect_analyze_stmt, vect_transform_stmt, vect_remove_stores)
8999 (supportable_widening_operation): Likewise.
9001 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
9003 * tree-vect-data-refs.c (vect_describe_gather_scatter_call): Take
9004 a stmt_vec_info instead of a gcall.
9005 (vect_check_gather_scatter): Update call accordingly.
9006 * tree-vect-loop-manip.c (iv_phi_p): Take a stmt_vec_info instead
9008 (vect_can_advance_ivs_p, vect_update_ivs_after_vectorizer)
9009 (slpeel_update_phi_nodes_for_loops):): Update calls accordingly.
9010 * tree-vect-loop.c (vect_transform_loop_stmt): Take a stmt_vec_info
9011 instead of a gimple stmt.
9012 (vect_transform_loop): Update calls accordingly.
9013 * tree-vect-slp.c (vect_split_slp_store_group): Take and return
9014 stmt_vec_infos instead of gimple stmts.
9015 (vect_analyze_slp_instance): Update use accordingly.
9016 * tree-vect-stmts.c (read_vector_array, write_vector_array)
9017 (vect_clobber_variable, vect_stmt_relevant_p, permute_vec_elements)
9018 (vect_use_strided_gather_scatters_p, vect_build_all_ones_mask)
9019 (vect_build_zero_merge_argument, vect_get_gather_scatter_ops)
9020 (vect_gen_widened_results_half, vect_get_loop_based_defs)
9021 (vect_create_vectorized_promotion_stmts, can_vectorize_live_stmts):
9022 Take a stmt_vec_info instead of a gimple stmt and pass stmt_vec_infos
9023 down to subroutines.
9025 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
9027 * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Change the type
9028 of the worklist from a vector of gimple stmts to a vector of
9030 * tree-vect-stmts.c (vect_mark_relevant, process_use)
9031 (vect_mark_stmts_to_be_vectorized): Likewise
9033 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
9035 * tree-vect-loop.c (vect_analyze_loop_operations): Look up the
9036 statement before passing it to vect_analyze_stmt.
9037 (vect_create_epilog_for_reduction): Use a stmt_vec_info to walk
9038 the chain of phi vector definitions. Track the exit phi via its
9040 (vectorizable_reduction): Set cond_stmt_vinfo directly from the
9041 STMT_VINFO_REDUC_DEF.
9042 * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Use
9043 stmt_vec_infos to handle the statement chains.
9044 (vect_get_slp_defs): Record the first statement in the node
9045 using a stmt_vec_info.
9046 * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Look up
9047 statements here and pass their stmt_vec_info down to subroutines.
9048 (vect_init_vector_1): Hoist call to vinfo_for_stmt and pass it
9049 down to vect_finish_stmt_generation.
9050 (vect_init_vector, vect_get_vec_defs, vect_finish_replace_stmt)
9051 (vect_finish_stmt_generation): Call vinfo_for_stmt and pass
9052 stmt_vec_infos to subroutines.
9053 (vect_remove_stores): Use stmt_vec_infos to handle the statement
9056 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
9058 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences):
9059 (vect_check_gather_scatter, vect_create_data_ref_ptr, bump_vector_ptr)
9060 (vect_permute_store_chain, vect_setup_realignment)
9061 (vect_permute_load_chain, vect_shift_permute_load_chain)
9062 (vect_transform_grouped_load): Use stmt_vec_info rather than gimple
9063 stmts internally, and when passing values to other vectorizer routines.
9064 * tree-vect-loop-manip.c (vect_can_advance_ivs_p): Likewise.
9065 * tree-vect-loop.c (vect_analyze_scalar_cycles_1)
9066 (vect_analyze_loop_operations, get_initial_def_for_reduction)
9067 (vect_create_epilog_for_reduction, vectorize_fold_left_reduction)
9068 (vectorizable_reduction, vectorizable_induction)
9069 (vectorizable_live_operation, vect_transform_loop_stmt)
9070 (vect_transform_loop): Likewise.
9071 * tree-vect-patterns.c (vect_reassociating_reduction_p)
9072 (vect_recog_widen_op_pattern, vect_recog_mixed_size_cond_pattern)
9073 (vect_recog_bool_pattern, vect_recog_gather_scatter_pattern): Likewise.
9074 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
9075 (vect_slp_analyze_node_operations_1): Likewise.
9076 * tree-vect-stmts.c (vect_mark_relevant, process_use)
9077 (exist_non_indexing_operands_for_use_p, vect_init_vector_1)
9078 (vect_mark_stmts_to_be_vectorized, vect_get_vec_def_for_operand)
9079 (vect_finish_stmt_generation_1, get_group_load_store_type)
9080 (get_load_store_type, vect_build_gather_load_calls)
9081 (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
9082 (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
9083 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
9084 (vectorizable_store, vectorizable_load, vectorizable_condition)
9085 (vectorizable_comparison, vect_analyze_stmt, vect_transform_stmt)
9086 (supportable_widening_operation): Likewise.
9087 (vect_get_vector_types_for_stmt): Likewise.
9088 * tree-vectorizer.h (vect_dr_behavior): Likewise.
9090 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
9092 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
9093 (vect_slp_analyze_node_dependences, vect_analyze_data_ref_accesses)
9094 (vect_permute_store_chain, vect_permute_load_chain)
9095 (vect_shift_permute_load_chain, vect_transform_grouped_load): Avoid
9096 repeated stmt_vec_info lookups.
9097 * tree-vect-loop-manip.c (vect_can_advance_ivs_p): Likewise.
9098 (vect_update_ivs_after_vectorizer): Likewise.
9099 * tree-vect-loop.c (vect_is_simple_reduction): Likewise.
9100 (vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
9101 * tree-vect-patterns.c (adjust_bool_stmts): Likewise.
9102 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
9103 (vect_bb_slp_scalar_cost): Likewise.
9104 * tree-vect-stmts.c (get_group_alias_ptr_type): Likewise.
9106 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
9108 * tree-vect-data-refs.c (vect_check_gather_scatter): Pass the
9109 gcall rather than the generic gimple stmt to gimple_call_internal_fn.
9110 (vect_get_smallest_scalar_type, can_group_stmts_p): Use dyn_cast
9111 to get gassigns and gcalls, rather than operating on generc gimple
9113 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p)
9114 (vect_mark_stmts_to_be_vectorized, vectorizable_store)
9115 (vectorizable_load, vect_analyze_stmt): Likewise.
9116 * tree-vect-loop.c (vectorizable_reduction): Likewise gphi.
9118 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
9120 * tree-vectorizer.h (get_earlier_stmt, get_later_stmt): Take and
9121 return stmt_vec_infos rather than gimple stmts. Do not accept
9123 (vect_find_last_scalar_stmt_in_slp): Return a stmt_vec_info instead
9125 * tree-vect-slp.c (vect_find_last_scalar_stmt_in_slp): Likewise.
9126 Update use of get_later_stmt.
9127 (vect_get_constant_vectors): Update call accordingly.
9128 (vect_schedule_slp_instance): Likewise
9129 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Likewise.
9130 (vect_slp_analyze_instance_dependence): Likewise.
9131 (vect_preserves_scalar_order_p): Update use of get_earlier_stmt.
9133 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
9135 * tree-vectorizer.h (stmt_info_for_cost::stmt): Replace with...
9136 (stmt_info_for_cost::stmt_info): ...this new field.
9137 (add_stmt_costs): Update accordingly.
9138 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
9139 (vect_get_known_peeling_cost): Likewise.
9140 (vect_estimate_min_profitable_iters): Likewise.
9141 * tree-vect-stmts.c (record_stmt_cost): Likewise.
9143 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
9145 * tree-vectorizer.h (_loop_vec_info::may_misalign_stmts): Change
9146 from an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
9147 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Update
9149 * tree-vect-loop-manip.c (vect_create_cond_for_align_checks): Likewise.
9151 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
9153 * tree-vectorizer.h (_stmt_vec_info::same_dr_stmt): Change from
9154 a gimple stmt to a stmt_vec_info.
9155 * tree-vect-stmts.c (vectorizable_load): Update accordingly.
9157 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
9159 * tree-vectorizer.h (vec_info::grouped_stores): Change from
9160 an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
9161 (_loop_vec_info::reduction_chains): Likewise.
9162 * tree-vect-loop.c (vect_fixup_scalar_cycles_with_patterns): Update
9164 * tree-vect-slp.c (vect_analyze_slp): Likewise.
9166 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
9168 * tree-vectorizer.h (_stmt_vec_info::first_element): Change from
9169 a gimple stmt to a stmt_vec_info.
9170 (_stmt_vec_info::next_element): Likewise.
9171 * tree-vect-data-refs.c (vect_update_misalignment_for_peel)
9172 (vect_slp_analyze_and_verify_node_alignment)
9173 (vect_analyze_group_access_1, vect_analyze_group_access)
9174 (vect_small_gap_p, vect_prune_runtime_alias_test_list)
9175 (vect_create_data_ref_ptr, vect_record_grouped_load_vectors)
9176 (vect_supportable_dr_alignment): Update accordingly.
9177 * tree-vect-loop.c (vect_fixup_reduc_chain): Likewise.
9178 (vect_fixup_scalar_cycles_with_patterns, vect_is_slp_reduction)
9179 (vect_is_simple_reduction, vectorizable_reduction): Likewise.
9180 * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
9181 * tree-vect-slp.c (vect_build_slp_tree_1)
9182 (vect_attempt_slp_rearrange_stmts, vect_supported_load_permutation_p)
9183 (vect_split_slp_store_group, vect_analyze_slp_instance)
9184 (vect_analyze_slp, vect_transform_slp_perm_load): Likewise.
9185 * tree-vect-stmts.c (vect_model_store_cost, vect_model_load_cost)
9186 (get_group_load_store_type, get_load_store_type)
9187 (get_group_alias_ptr_type, vectorizable_store, vectorizable_load)
9188 (vect_transform_stmt, vect_remove_stores): Likewise.
9190 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
9192 * tree-vectorizer.h (vect_dr_stmt): Return a stmt_vec_info rather
9194 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
9195 (vect_slp_analyze_data_ref_dependence, vect_record_base_alignments)
9196 (vect_calculate_target_alignmentm, vect_compute_data_ref_alignment)
9197 (vect_update_misalignment_for_peel, vect_verify_datarefs_alignment)
9198 (vector_alignment_reachable_p, vect_get_data_access_cost)
9199 (vect_get_peeling_costs_all_drs, vect_peeling_hash_get_lowest_cost)
9200 (vect_peeling_supportable, vect_enhance_data_refs_alignment)
9201 (vect_find_same_alignment_drs, vect_analyze_data_refs_alignment)
9202 (vect_analyze_group_access_1, vect_analyze_group_access)
9203 (vect_analyze_data_ref_access, vect_analyze_data_ref_accesses)
9204 (vect_vfa_access_size, vect_small_gap_p, vect_analyze_data_refs)
9205 (vect_supportable_dr_alignment): Remove vinfo_for_stmt from the
9206 result of vect_dr_stmt and use the stmt_vec_info instead of
9207 the associated gimple stmt.
9208 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
9209 (vect_gen_prolog_loop_niters): Likewise.
9210 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
9212 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
9214 * tree-vectorizer.h (_slp_tree::stmts): Change from a vec<gimple *>
9215 to a vec<stmt_vec_info>.
9216 * tree-vect-slp.c (vect_free_slp_tree): Update accordingly.
9217 (vect_create_new_slp_node): Take a vec<gimple *> instead of a
9219 (_slp_oprnd_info::def_stmts): Change from a vec<gimple *>
9220 to a vec<stmt_vec_info>.
9221 (bst_traits::value_type, bst_traits::value_type): Likewise.
9222 (bst_traits::hash): Update accordingly.
9223 (vect_get_and_check_slp_defs): Change the stmts parameter from
9224 a vec<gimple *> to a vec<stmt_vec_info>.
9225 (vect_two_operations_perm_ok_p, vect_build_slp_tree_1): Likewise.
9226 (vect_build_slp_tree): Likewise.
9227 (vect_build_slp_tree_2): Likewise. Update uses of
9228 SLP_TREE_SCALAR_STMTS.
9229 (vect_print_slp_tree): Update uses of SLP_TREE_SCALAR_STMTS.
9230 (vect_mark_slp_stmts, vect_mark_slp_stmts_relevant)
9231 (vect_slp_rearrange_stmts, vect_attempt_slp_rearrange_stmts)
9232 (vect_supported_load_permutation_p, vect_find_last_scalar_stmt_in_slp)
9233 (vect_detect_hybrid_slp_stmts, vect_slp_analyze_node_operations_1)
9234 (vect_slp_analyze_node_operations, vect_slp_analyze_operations)
9235 (vect_bb_slp_scalar_cost, vect_slp_analyze_bb_1)
9236 (vect_get_constant_vectors, vect_get_slp_defs)
9237 (vect_transform_slp_perm_load, vect_schedule_slp_instance)
9238 (vect_remove_slp_scalar_calls, vect_schedule_slp): Likewise.
9239 (vect_analyze_slp_instance): Build up a vec of stmt_vec_infos
9240 instead of gimple stmts.
9241 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Change
9242 the stores parameter for a vec<gimple *> to a vec<stmt_vec_info>.
9243 (vect_slp_analyze_instance_dependence): Update uses of
9244 SLP_TREE_SCALAR_STMTS.
9245 (vect_slp_analyze_and_verify_node_alignment): Likewise.
9246 (vect_slp_analyze_and_verify_instance_alignment): Likewise.
9247 * tree-vect-loop.c (neutral_op_for_slp_reduction): Likewise.
9248 (get_initial_defs_for_reduction): Likewise.
9249 (vect_create_epilog_for_reduction): Likewise.
9250 (vectorize_fold_left_reduction): Likewise.
9251 * tree-vect-stmts.c (vect_prologue_cost_for_slp_op): Likewise.
9252 (vect_model_simple_cost, vectorizable_shift, vectorizable_load)
9253 (can_vectorize_live_stmts): Likewise.
9255 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
9257 * tree-vectorizer.h (_loop_vec_info::reductions): Change from an
9258 auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
9259 (vect_force_simple_reduction): Take and return stmt_vec_infos rather
9261 * tree-parloops.c (valid_reduction_p): Take a stmt_vec_info instead
9263 (gather_scalar_reductions): Update after above interface changes.
9264 * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Likewise.
9265 (vect_is_simple_reduction): Take and return stmt_vec_infos rather
9267 (vect_force_simple_reduction): Likewise.
9268 * tree-vect-patterns.c (vect_pattern_recog_1): Update use of
9269 LOOP_VINFO_REDUCTIONS.
9270 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
9272 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
9274 * tree-vectorizer.h (_stmt_vec_info::reduc_def): Change from
9275 a gimple stmt to a stmt_vec_info.
9276 * tree-vect-loop.c (vect_active_double_reduction_p)
9277 (vect_force_simple_reduction, vectorizable_reduction): Update
9280 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
9282 * tree-vectorizer.h (_slp_tree::vec_stmts): Change from a
9283 vec<gimple *> to a vec<stmt_vec_info>.
9284 * tree-vect-loop.c (vect_create_epilog_for_reduction): Change
9285 the reduction_phis argument from a vec<gimple *> to a
9287 (vectorizable_reduction): Likewise the phis local variable that
9288 is passed to vect_create_epilog_for_reduction. Update for new type
9289 of SLP_TREE_VEC_STMTS.
9290 (vectorizable_induction): Update for new type of SLP_TREE_VEC_STMTS.
9291 (vectorizable_live_operation): Likewise.
9292 * tree-vect-slp.c (vect_get_slp_vect_defs): Likewise.
9293 (vect_transform_slp_perm_load, vect_schedule_slp_instance): Likewise.
9295 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
9297 * tree-vectorizer.h (_stmt_vec_info::vectorized_stmt): Change from
9298 a gimple stmt to a stmt_vec_info.
9299 (vectorizable_condition, vectorizable_live_operation)
9300 (vectorizable_reduction, vectorizable_induction): Pass back the
9301 vectorized statement as a stmt_vec_info.
9302 * tree-vect-data-refs.c (vect_record_grouped_load_vectors): Update
9303 use of STMT_VINFO_VEC_STMT.
9304 * tree-vect-loop.c (vect_create_epilog_for_reduction): Likewise,
9305 accumulating the inner phis that feed the STMT_VINFO_VEC_STMT
9306 as stmt_vec_infos rather than gimple stmts.
9307 (vectorize_fold_left_reduction): Change vec_stmt from a gimple stmt
9309 (vectorizable_live_operation): Likewise.
9310 (vectorizable_reduction, vectorizable_induction): Likewise,
9311 updating use of STMT_VINFO_VEC_STMT.
9312 * tree-vect-stmts.c (vect_get_vec_def_for_operand_1): Update use
9313 of STMT_VINFO_VEC_STMT.
9314 (vect_build_gather_load_calls, vectorizable_bswap, vectorizable_call)
9315 (vectorizable_simd_clone_call, vectorizable_conversion)
9316 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
9317 (vectorizable_store, vectorizable_load, vectorizable_condition)
9318 (vectorizable_comparison, can_vectorize_live_stmts): Change vec_stmt
9319 from a gimple stmt to a stmt_vec_info.
9320 (vect_transform_stmt): Update use of STMT_VINFO_VEC_STMT. Pass a
9321 pointer to a stmt_vec_info to the vectorizable_* routines.
9323 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
9325 * tree-vectorizer.h (_stmt_vec_info::related_stmt): Change from
9326 a gimple stmt to a stmt_vec_info.
9327 (is_pattern_stmt_p): Update accordingly.
9328 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Likewise.
9329 (vect_record_grouped_load_vectors): Likewise.
9330 * tree-vect-loop.c (vect_determine_vf_for_stmt): Likewise.
9331 (vect_fixup_reduc_chain, vect_update_vf_for_slp): Likewise.
9332 (vect_model_reduction_cost): Likewise.
9333 (vect_create_epilog_for_reduction): Likewise.
9334 (vectorizable_reduction, vectorizable_induction): Likewise.
9335 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
9336 Return the stmt_vec_info for the pattern statement.
9337 (vect_set_pattern_stmt): Update use of STMT_VINFO_RELATED_STMT.
9338 (vect_split_statement, vect_mark_pattern_stmts): Likewise.
9339 * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
9340 (vect_detect_hybrid_slp, vect_get_slp_defs): Likewise.
9341 * tree-vect-stmts.c (vect_mark_relevant): Likewise.
9342 (vect_get_vec_def_for_operand_1, vectorizable_call): Likewise.
9343 (vectorizable_simd_clone_call, vect_analyze_stmt, new_stmt_vec_info)
9344 (free_stmt_vec_info, vect_is_simple_use): Likewise.
9346 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
9348 * tree-vectorizer.h (vect_finish_replace_stmt): Return a stmt_vec_info
9349 (vect_finish_stmt_generation): Likewise.
9350 * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
9351 (vect_finish_replace_stmt, vect_finish_stmt_generation): Likewise.
9352 (vect_build_gather_load_calls): Use the return value of the above
9353 functions instead of a separate call to vinfo_for_stmt. Use narrow
9354 scopes for the input gimple stmt and wider scopes for the associated
9355 stmt_vec_info. Use vec_info::lookup_def when setting these
9356 stmt_vec_infos from an SSA_NAME definition.
9357 (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
9358 (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
9359 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
9360 (vectorizable_store, vectorizable_load, vectorizable_condition)
9361 (vectorizable_comparison): Likewise.
9362 * tree-vect-loop.c (vectorize_fold_left_reduction): Likewise.
9363 (vectorizable_reduction): Likewise.
9365 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
9367 * tree-vectorizer.h (vect_is_simple_use): Add an optional
9368 stmt_vec_info * parameter before the optional gimple **.
9369 * tree-vect-stmts.c (vect_is_simple_use): Likewise.
9370 (process_use, vect_get_vec_def_for_operand_1): Update callers.
9371 (vect_get_vec_def_for_operand, vectorizable_shift): Likewise.
9372 * tree-vect-loop.c (vectorizable_reduction): Likewise.
9373 (vectorizable_live_operation): Likewise.
9374 * tree-vect-patterns.c (type_conversion_p): Likewise.
9375 (vect_look_through_possible_promotion): Likewise.
9376 (vect_recog_rotate_pattern): Likewise.
9377 * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
9379 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
9381 * tree-vectorizer.h (stmt_vec_info): Temporarily change from
9382 a typedef to a wrapper class.
9383 (NULL_STMT_VEC_INFO): New macro.
9384 (vec_info::stmt_infos): Change to vec<stmt_vec_info>.
9385 (stmt_vec_info::operator*): New function.
9386 (stmt_vec_info::operator gimple *): Likewise.
9387 (set_vinfo_for_stmt): Use NULL_STMT_VEC_INFO.
9388 (add_stmt_costs): Likewise.
9389 * tree-vect-loop-manip.c (iv_phi_p): Likewise.
9390 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
9391 (vect_get_known_peeling_cost): Likewise.
9392 (vect_estimate_min_profitable_iters): Likewise.
9393 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
9394 * tree-vect-slp.c (vect_remove_slp_scalar_calls): Likewise.
9395 * tree-vect-stmts.c (vect_build_gather_load_calls): Likewise.
9396 (vectorizable_store, free_stmt_vec_infos): Likewise.
9397 (new_stmt_vec_info): Change return type of xcalloc to
9400 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
9402 * tree-vectorizer.h (vec_info::lookup_single_use): Declare.
9403 * tree-vectorizer.c (vec_info::lookup_single_use): New function.
9404 * tree-vect-loop.c (vectorizable_reduction): Use it instead of
9405 a single_imm_use-based sequence.
9406 * tree-vect-stmts.c (supportable_widening_operation): Likewise.
9408 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
9410 * tree-vectorizer.h (vec_info::lookup_def): Declare.
9411 * tree-vectorizer.c (vec_info::lookup_def): New function.
9412 * tree-vect-patterns.c (vect_get_internal_def): Use it.
9413 (vect_widened_op_tree): Likewise.
9414 * tree-vect-stmts.c (vect_is_simple_use): Likewise.
9415 * tree-vect-loop.c (vect_analyze_loop_operations): Likewise.
9416 (vectorizable_reduction): Likewise.
9417 (vect_valid_reduction_input_p): Take a stmt_vec_info instead
9419 (vect_is_slp_reduction): Update calls accordingly. Use
9420 vec_info::lookup_def.
9421 (vect_is_simple_reduction): Likewise
9422 * tree-vect-slp.c (vect_detect_hybrid_slp_1): Use vec_info::lookup_def.
9424 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
9426 * tree-vectorizer.h (vec_info::lookup_stmt): Declare.
9427 * tree-vectorizer.c (vec_info::lookup_stmt): New function.
9428 * tree-vect-loop.c (vect_determine_vf_for_stmt): Use it instead
9430 (vect_determine_vectorization_factor, vect_analyze_scalar_cycles_1)
9431 (vect_compute_single_scalar_iteration_cost, vect_analyze_loop_form)
9432 (vect_update_vf_for_slp, vect_analyze_loop_operations)
9433 (vect_is_slp_reduction, vectorizable_induction)
9434 (vect_transform_loop_stmt, vect_transform_loop): Likewise.
9435 * tree-vect-patterns.c (vect_init_pattern_stmt):
9436 (vect_determine_min_output_precision_1, vect_determine_precisions)
9437 (vect_pattern_recog): Likewise.
9438 * tree-vect-stmts.c (vect_analyze_stmt, vect_transform_stmt): Likewise.
9439 * config/powerpcspe/powerpcspe.c (rs6000_density_test): Likewise.
9440 * config/rs6000/rs6000.c (rs6000_density_test): Likewise.
9441 * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
9442 (vect_detect_hybrid_slp_1, vect_detect_hybrid_slp_2)
9443 (vect_detect_hybrid_slp): Likewise. Change the walk_stmt_info
9444 info field from a loop to a loop_vec_info.
9446 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
9448 * tree-vectorizer.h (stmt_vec_info): Move typedef earlier in file.
9449 (vec_info::add_stmt): Declare.
9450 * tree-vectorizer.c (vec_info::add_stmt): New function.
9451 * tree-vect-data-refs.c (vect_create_data_ref_ptr): Use it.
9452 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Likewise.
9453 (vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
9454 (vectorizable_induction): Likewise.
9455 * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Likewise.
9456 * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
9457 (vectorizable_simd_clone_call, vectorizable_store): Likewise.
9458 (vectorizable_load): Likewise.
9459 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
9460 (vect_recog_bool_pattern, vect_recog_mask_conversion_pattern)
9461 (vect_recog_gather_scatter_pattern): Likewise.
9462 (append_pattern_def_seq): Likewise. Remove a check that is
9463 performed by add_stmt itself.
9465 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
9467 * tree-vect-loop.c (vectorizable_reduction): Fix an instance in
9468 which make_ssa_name was called with new_stmt before new_stmt
9471 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
9473 * tree-vect-loop.c (vect_valid_reduction_input_p): New function,
9475 (vect_is_slp_reduction): ...here...
9476 (vect_is_simple_reduction): ...and here. Remove repetition of tests
9477 that are already known to be false.
9479 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
9481 * tree-vectorizer.h (vect_free_slp_instance): Add a final_p parameter.
9482 * tree-vect-slp.c (vect_free_slp_tree): Likewise. Don't update
9483 STMT_VINFO_NUM_SLP_USES when it's true.
9484 (vect_free_slp_instance): Add a final_p parameter and pass it to
9486 (vect_build_slp_tree_2): Update call to vect_free_slp_instance.
9487 (vect_analyze_slp_instance): Likewise.
9488 (vect_slp_analyze_operations): Likewise.
9489 (vect_slp_analyze_bb_1): Likewise.
9490 * tree-vectorizer.c (vec_info): Likewise.
9491 * tree-vect-loop.c (vect_transform_loop): Likewise.
9493 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
9495 * tree-vect-loop.c (vectorizable_reduction): Assert that the
9496 function is not called for second and subsequent members of
9499 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
9501 * tree-vect-loop.c (get_initial_def_for_reduction): Move special
9502 cases for nested loops from here to ...
9503 (vect_create_epilog_for_reduction): ...here. Only call
9504 vect_is_simple_use for inner-loop reductions.
9506 2018-07-31 Martin Liska <mliska@suse.cz>
9508 PR gcov-profile/85338
9509 PR gcov-profile/85350
9510 PR gcov-profile/85372
9511 * profile.c (struct location_triplet): New.
9512 (struct location_triplet_hash): Likewise.
9513 (output_location): Do not output a BB that
9514 is already recorded for a line.
9515 (branch_prob): Use streamed_locations.
9517 2018-07-31 Martin Liska <mliska@suse.cz>
9519 PR gcov-profile/85370
9520 * coverage.c (coverage_begin_function): Do not mark target
9521 clones as artificial functions.
9523 2018-07-31 Martin Liska <mliska@suse.cz>
9525 PR gcov-profile/83813
9526 PR gcov-profile/84758
9527 PR gcov-profile/85217
9528 PR gcov-profile/85332
9529 * profile.c (branch_prob): Do not record GOTO expressions
9530 for GIMPLE statements which locations are already streamed.
9532 2018-07-31 Olivier Hainque <hainque@adacore.com>
9534 * gcc.c (handle_spec_function): Accept a soft_matched_part
9535 argument, as do_spec_1. Pass it down to ...
9536 (eval_spec_function): Accept a soft_matched_part argument,
9537 and pass it down to ...
9538 (do_spec_2): Accept a soft_matched_part argument, and pass
9539 it down to do_spec_1.
9540 (do_spec_1): Pass soft_matched_part to handle_spec_function.
9541 (handle_braces): Update call to handle_spec_function.
9542 (driver::set_up_specs): Update calls to do_spec_2.
9543 (compare_debug_dump_opt_spec_function): Likewise.
9544 (compare_debug_self_opt_spec_function): Likewise.
9546 2018-07-31 Olivier Hainque <hainque@adacore.com>
9548 * common.opt (nolibc): New option.
9549 * doc/invoke.texi (Link Options): Document it.
9550 * gcc.c (LINK_GCC_C_SEQUENCE_SPEC): Honor nolibc.
9551 * config/alpha/linux.h: Likewise.
9552 * config/arc/elf.h: Likewise.
9553 * config/arm/uclinux-elf.h: Likewise.
9554 * config/arm/unknown-elf.h: Likewise.
9555 * config/avr/avrlibc.h: Likewise.
9556 * config/bfin/bfin.h: Likewise.
9557 * config/bfin/linux.h: Likewise.
9558 * config/bfin/uclinux.h: Likewise.
9559 * config/darwin.h: Likewise.
9560 * config/darwin10.h: Likewise.
9561 * config/darwin12.h: Likewise.
9562 * config/gnu-user.h: Likewise.
9563 * config/lm32/uclinux-elf.h: Likewise.
9564 * config/pa/pa-hpux11.h: Likewise.
9565 * config/pa/pa64-hpux.h: Likewise.
9566 * config/sparc/sparc.h: Likewise.
9568 2018-07-31 Olivier Hainque <hainque@adacore.com>
9570 * gcc.c (getenv_spec_function): Prepend '/' to value for allowed
9571 undefined variables.
9573 2018-07-30 Segher Boessenkool <segher@kernel.crashing.org>
9576 * config/arm/arm.c (arm_block_set_aligned_vect): Use gen_int_mode
9579 2018-07-30 Bernd Edlinger <bernd.edlinger@hotmail.de>
9581 * tree-ssa-forwprop.c (simplify_builtin_call): Don't create a not NUL
9582 terminated string literal.
9584 2018-07-30 Segher Boessenkool <segher@kernel.crashing.org>
9586 PR rtl-optimization/85160
9587 * combine.c (is_just_move): New function.
9588 (try_combine): Allow combining two instructions into two if neither of
9589 the original instructions was a move.
9591 2018-07-30 Alexander Monakov <amonakov@ispras.ru>
9594 * doc/extend.texi (Global Register Variables): Discourage use of type
9596 (Local Register Variables): Likewise.
9598 2018-07-30 Richard Sandiford <richard.sandiford@arm.com>
9600 PR tree-optimization/86506
9601 * hwint.h (ceil_log2): Resync with hwint.c implementation.
9603 2018-07-30 Ilya Leoshkevich <iii@linux.ibm.com>
9606 * lra-constraints.c (spill_hard_reg_in_range): When selecting the
9607 hard_regno, make sure no insn between `from` and `to` clobbers it.
9609 2018-07-30 Cesar Philippidis <cesar@codesourcery.com>
9610 Tom de Vries <tdevries@suse.de>
9612 * config/nvptx/nvptx.c (PTX_GANG_DEFAULT): Rename to ...
9613 (PTX_DEFAULT_RUNTIME_DIM): ... this.
9614 (nvptx_goacc_validate_dims): Set default worker and gang dims to
9615 PTX_DEFAULT_RUNTIME_DIM.
9616 (nvptx_dim_limit): Ignore GOMP_DIM_WORKER.
9618 2018-07-29 John David Anglin <danglin@gcc.gnu.org>
9620 * config/pa/pa.c (pa_output_addr_vec): Align address table.
9621 * config/pa/pa.h (JUMP_TABLES_IN_TEXT_SECTION): Revise comment.
9622 * config/pa/pa32-linux.h (JUMP_TABLES_IN_TEXT_SECTION): Define.
9624 2018-07-27 Michael Meissner <meissner@linux.ibm.com>
9626 * config/rs6000/constraints.md (wG constraint): Delete, no longer
9628 * config/rs6000/predicates.md (p9_fusion_reg_operand): Rename
9629 predicate to reflect toc fusion has been deleted.
9630 (toc_fusion_mem_raw): Delete, no longer used.
9631 (toc_fusion_mem_wrapped): Likewise.
9632 * config/rs6000/rs6000-cpus.def (POWERPC_MASKS): Delete toc
9634 * config/rs6000/rs6000-protos.h (fusion_wrap_memory_address):
9635 Delete, no longer used.
9636 * config/rs6000/rs6000.c (struct rs6000_reg_addr): Delete fields
9637 meant to be used for toc fusion.
9638 (rs6000_debug_print_mode): Delete toc fusion debugging.
9639 (rs6000_debug_reg_global): Likewise.
9640 (rs6000_init_hard_regno_mode_ok): Delete setting up fields for toc
9641 fusion and secondary reload support that were never used.
9642 (rs6000_option_override_internal): Delete TOC fusion, that was only
9643 partially defined, and it did not work unless you also used the
9645 (rs6000_legitimate_address_p): Delete TOC fusion support.
9646 (rs6000_opt_masks): Likewise.
9647 (fusion_wrap_memory_address): Delete function, no longer used.
9648 (fusion_split_address); Delete TOC fusion support.
9649 * config/rs6000/rs6000.h (TARGET_TOC_FUSION_INT): Delete, no
9650 longer used with toc fusion being deleted.
9651 (TARGET_TOC_FUSION_FP): Likewise.
9652 * config/rs6000/rs6000.md (UNSPEC_FUSION_ADDIS): Delete TOC fusion
9654 (toc fusion spliter): Delete TOC fusion support.
9655 (toc_fusionload_<mode>): Likewise.
9656 (toc_fusionload_di): Likewise.
9657 (fusion_gpr_load_<mode>): Delete generator function, this insn no
9658 longer needs to be named. Rename predicate to delete TOC fusion.
9659 (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
9660 (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
9661 (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
9662 (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
9663 (p9 fusion peephole2s): Rename predicate to delete TOC fusion.
9665 2018-07-27 Kelvin Nilsen <kelvin@gcc.gnu.org>
9667 * doc/extend.texi (Basic PowerPC Built-in Functions Available on
9668 ISA 2.05): Replace __uint128_t with __uint128 and __int128_t with
9669 __int128 in built-in function prototypes.
9670 (PowerPC AltiVec Built-in Functions on ISA 2.07): Likewise.
9671 (PowerPC AltiVec Built-in Functions on ISA 3.0): Likewise.
9673 2018-07-27 Martin Sebor <msebor@redhat.com>
9675 PR tree-optimization/86696
9676 * tree-ssa-strlen.c (get_min_string_length): Handle all integer
9677 types, including enums.
9678 (handle_char_store): Be prepared for the above function to fail.
9680 2018-07-26 Qing Zhao <qing.zhao@oracle.com>
9682 * builtins.c (inline_expand_builtin_string_cmp): Disable inlining
9683 when optimization level is lower than 2 or optimize for size.
9685 2018-07-26 Martin Sebor <msebor@redhat.com>
9687 PR tree-optimization/86043
9688 PR tree-optimization/86042
9689 * tree-ssa-strlen.c (handle_builtin_memcpy): Handle strict overlaps.
9690 (get_string_cst_length): Rename...
9691 (get_min_string_length): ...to this. Add argument.
9692 (handle_char_store): Extend to handle multi-character stores by
9694 * tree.c (initializer_zerop): Use new argument. Handle MEM_REF.
9695 * tree.h (initializer_zerop): Add argument.
9697 2018-07-26 Jakub Jelinek <jakub@redhat.com>
9700 * omp-low.c (scan_sharing_clauses): Don't ignore map clauses for
9701 declare target to variables if they have always,{to,from,tofrom} map
9704 2018-07-26 Martin Liska <mliska@suse.cz>
9707 * lto-wrapper.c: Add linker_output as prefix
9708 for ltrans_output_file.
9710 2018-07-26 Segher Boessenkool <segher@kernel.crashing.org>
9712 PR rtl-optimization/85805
9713 * combine.c (reg_nonzero_bits_for_combine): Only use the last set
9714 value for hard registers if that was written in the same mode.
9716 2018-07-26 Martin Liska <mliska@suse.cz>
9718 PR gcov-profile/86536
9719 * gcov.c (format_gcov): Use printf format %.*f directly
9720 and do not handle special values.
9722 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
9724 * common/config/arc/arc-common.c (arc_option_optimization_table):
9725 Update default optimizations for size.
9727 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
9729 * config/arc/arc.md (movsf_insn): Add short instruction selection.
9730 * config/arc/constraints.md (CfZ): New constraint.
9731 * config/arc/fpu.md (addssf3_fpu): Use CfZ constraint.
9732 (subsf3_fpu): Likewise.
9733 (cmpsf_fpu): Likewise.
9734 (cmpsf_fpu_uneq): Likewise.
9736 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
9738 * config/arc/arc.c (compact_memory_operand_p): Check for uncached
9740 (arc_is_uncached_mem_p): uncached applies to both the variable and
9743 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
9745 * config/arc/arc.h (ADDITIONAL_REGISTER_NAMES): Add additional
9748 2018-07-25 David Malcolm <dmalcolm@redhat.com>
9750 * optinfo-emit-json.cc (class optrecord_json_writer): Convert
9751 field "m_scopes" from vec to auto_vec.
9753 2018-07-25 Martin Liska <mliska@suse.cz>
9755 * config/powerpcspe/powerpcspe-protos.h (rs6000_loop_align): Fix
9758 2018-07-25 Richard Biener <rguenther@suse.de>
9761 * dwarf2out.c (dwarf2out_decl): Do not handle nested functions
9762 special wrt context_die late.
9763 (gen_subprogram_die): Re-use DIEs in local scope.
9765 2018-07-25 Richard Sandiford <richard.sandiford@arm.com>
9767 PR tree-optimization/86644
9768 * hwint.c (ceil_log2): Fix comment. Return 0 for 0.
9770 2018-07-25 Martin Liska <mliska@suse.cz>
9773 * dumpfile.c: And excluded values with TDF_ALL_VALUES.
9774 * dumpfile.h (enum dump_flag): Defince TDF_ALL_VALUES.
9776 2018-07-25 Martin Liska <mliska@suse.cz>
9779 * params.def: Explain ASan abbreviation and provide
9780 a documentation link.
9782 2018-07-24 Martin Sebor <msebor@redhat.com>
9784 PR tree-optimization/86622
9785 PR tree-optimization/86532
9786 * builtins.h (string_length): Declare.
9787 * builtins.c (c_strlen): Correct handling of non-constant offsets.
9788 (check_access): Be prepared for non-constant length ranges.
9789 (string_length): Make extern.
9790 * expr.c (string_constant): Only handle the minor non-constant
9791 array index. Use string_constant to compute the length of
9792 a generic string constant.
9794 2018-07-24 Richard Sandiford <richard.sandiford@arm.com>
9796 PR tree-optimization/86618
9797 * tree-vect-stmts.c (vectorizable_call): Don't take the address
9798 of LOOP_VINFO_MASKS (loop_vinfo) when loop_vinfo is null.
9800 2018-07-24 David Malcolm <dmalcolm@redhat.com>
9802 PR tree-optimization/86636
9803 * json.cc (json::object::set): Fix comment. Add assertions.
9804 (json::array::append): Move here from json.h. Add comment and an
9806 (json::string::string): Likewise.
9807 * json.h (json::array::append): Move to json.cc.
9808 (json::string::string): Likewise.
9809 * optinfo-emit-json.cc
9810 (optrecord_json_writer::impl_location_to_json): Assert that we
9811 aren't attempting to write out UNKNOWN_LOCATION, or an ad-hoc
9812 wrapper around it. Expand the location once, rather than three
9814 (optrecord_json_writer::inlining_chain_to_json): Fix the check for
9815 UNKNOWN_LOCATION, to use LOCATION_LOCUS to look through ad-hoc
9817 (optrecord_json_writer::optinfo_to_json): Likewise, in four
9818 places. Fix some overlong lines.
9820 2018-07-24 Matthew Malcomson <matthew.malcomson@arm.com>
9822 * config/aarch64/aarch64-simd.md
9823 (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>): Split into...
9824 (aarch64_<ANY_EXTEND:su>subw<mode>): ... This...
9825 (aarch64_<ANY_EXTEND:su>addw<mode>): ... And this.
9826 (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>_internal): Split into...
9827 (aarch64_<ANY_EXTEND:su>subw<mode>_internal): ... This...
9828 (aarch64_<ANY_EXTEND:su>addw<mode>_internal): ... And this.
9829 (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w2<mode>_internal): Split into...
9830 (aarch64_<ANY_EXTEND:su>subw2<mode>_internal): ... This...
9831 (aarch64_<ANY_EXTEND:su>addw2<mode>_internal): ... And this.
9833 2018-07-24 Jakub Jelinek <jakub@redhat.com>
9836 * expmed.c (expand_divmod): Punt if d == HOST_WIDE_INT_MIN
9837 and size > HOST_BITS_PER_WIDE_INT. For size > HOST_BITS_PER_WIDE_INT
9838 and abs_d == d, do the power of two handling if profitable.
9840 2018-07-24 Richard Biener <rguenther@suse.de>
9842 * match.pd: Add BIT_FIELD_REF canonicalizations.
9844 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
9847 * genmatch.c (dt_operand::gen_match_op): Avoid folding volatile values.
9849 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
9851 * gimple-fold.c (gimple_fold_builtin_printf): Don't create a not NUL
9852 terminated STRING_CST object.
9854 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
9856 hsa-dump.c (dump_hsa_symbol): Avoid out of scope access to buf.
9858 2018-07-23 Segher Boessenkool <segher@kernel.crashing.org>
9860 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Adjust.
9861 * config/rs6000/rs6000-protos.h (rs6000_split_v4si_init): Delete.
9862 * config/rs6000/rs6000.c (rs6000_expand_vector_init): Always force
9863 the elements into a register.
9864 (rs6000_split_v4si_init_di_reg): Delete.
9865 (rs6000_split_v4si_init): Delete.
9866 * config/rs6000/vsx.md (unspec): Delete UNSPEC_VSX_VEC_INIT.
9867 (vsx_init_v4si): Rewrite as a define_expand.
9869 2018-07-23 Segher Boessenkool <segher@kernel.crashing.org>
9871 * config/rs6000/rs6000.md (splitters for rldimi and rlwimi with the
9872 zero_extend argument from memory): New.
9874 2018-07-22 Martin Sebor <msebor@redhat.com>
9877 * gimple-ssa-warn-alloca.c (alloca_call_type_by_arg): Avoid
9878 diagnosing calls with unknown arguments unless -Walloca-larger-than
9879 is restricted to less than PTRDIFF_MAX bytes.
9881 2018-07-22 Gerald Pfeifer <gerald@pfeifer.com>
9883 * doc/gcov.texi (Invoking Gcov): Editorial changes.
9885 2018-07-20 David Malcolm <dmalcolm@redhat.com>
9887 * pretty-print.c (text_info::set_location): Remove redundant
9888 "line_table" parameter from call to rich_location::set_range.
9890 2018-07-20 Martin Sebor <msebor@redhat.com>
9893 * builtins.c (expand_builtin_alloca): Adjust.
9894 * calls.c (alloc_max_size): Simplify.
9895 * cgraphunit.c (cgraph_node::expand): Adjust.
9896 * common.opt (larger_than_size, warn_frame_larger_than): Remove
9898 (frame_larger_than_size): Same.
9899 (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Change options
9900 to take a HOST_WIDE_INT argument and accept a byte-size suffix.
9902 * doc/invoke.texi (GCC Command Options): Document option arguments.
9903 Explain byte-size arguments and suffixes.
9904 (-Wvla-larger-than, -Wno-alloc-size-larger-than): Update.
9905 (-Wno-alloca-larger-than, -Wno-vla-larger-than): Same.
9906 (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Same.
9907 * doc/options.texi (UInteger): Expand.
9908 (Host_Wide_Int, ByteSize): Document new properties.
9909 * final.c (final_start_function_1): Include sizes in an error message.
9910 * function.c (frame_offset_overflow): Same.
9911 * gimple-ssa-warn-alloca.c (pass_walloca::gate): Adjust.
9912 (alloca_call_type_by_arg): Change function argument to HOST_WIDE_INT.
9913 Diagnose unbounded alloca calls only for limits of less than
9915 (alloca_call_type): Adjust. Diagnose possibly out-of-bounds alloca
9916 calls and VLA size only for limits of less than PTRDIFF_MAX. Same
9918 (pass_walloca::execute): Adjust. Diagnose alloca calls in loops
9919 only for limits of less than PTRDIFF_MAX.
9920 * langhooks-def.h (lhd_handle_option): Change function argument
9922 * langhooks.c (lhd_handle_option): Same.
9923 * langhooks.h (handle_option): Same.
9924 * opt-functions.awk (switch_bit_fields): Handle Host_Wide_Int and
9926 (var_type, var_type_struct): Same.
9927 (var_set): Handle ByteSize flag.
9928 * optc-gen.awk: Add comments to output to ease debugging. Make
9929 use of HOST_WIDE_INT where appropriate.
9930 * opts-gen-save.awk: Use %lx to format unsigned long.
9931 * opth-gen.awk: Change function argument to HOST_WIDE_INT.
9932 * opts-common.c (integral_argument): Return HOST_WIDE_INT and add
9933 arguments. Parse bytes-size suffixes.
9934 (enum_arg_to_value): Change function argument to HOST_WIDE_INT.
9935 (enum_value_to_arg): Same.
9936 (decode_cmdline_option): Handle cl_host_wide_int. Adjust.
9937 (handle_option): Adjust.
9938 (generate_option): Change function argument to HOST_WIDE_INT.
9939 (cmdline_handle_error): Adjust.
9940 (read_cmdline_option): Change function argument to HOST_WIDE_INT.
9941 (set_option): Change function argument to HOST_WIDE_INT.
9942 (option_enabled): Handle cl_host_wide_int.
9943 (get_option_state): Handle CLVC_SIZE.
9944 (control_warning_option): Same.
9945 * opts.c (common_handle_option): Change function argument to
9946 HOST_WIDE_INT. Remove handling of OPT_Walloca_larger_than_ and
9947 OPT_Wvla_larger_than_.
9948 * opts.h (enum cl_var_type): Add an enumerator.
9949 * stor-layout.c (layout_decl): Print a more meaningful warning.
9950 * toplev.c (output_stack_usage): Adjust.
9952 2018-07-20 Qing Zhao <qing.zhao@oracle.com>
9954 * builtins.c (expand_builtin_memcmp): Delete the last parameter for
9955 call to inline_expand_builtin_string_cmp.
9956 (expand_builtin_strcmp): Likewise.
9957 (expand_builtin_strncmp): Likewise.
9958 (inline_string_cmp): Delete the last parameter, change char_type_node
9959 to unsigned_char_type_node for strcmp/strncmp, add conversions to the
9961 (inline_expand_builtin_string_cmp): Delete the last parameter, give up
9962 the inlining expansion on target where the type of the call has same or
9963 narrower precision than unsigned char.
9965 2018-07-20 David Malcolm <dmalcolm@redhat.com>
9967 * Makefile.in (OBJS): Add json.o and optinfo-emit-json.o.
9968 (CFLAGS-optinfo-emit-json.o): Define TARGET_NAME.
9969 * common.opt (fsave-optimization-record): New option.
9970 * coretypes.h (struct kv_pair): Move here from dumpfile.c.
9971 * doc/invoke.texi (-fsave-optimization-record): New option.
9972 * dumpfile.c: Include "optinfo-emit-json.h".
9973 (struct kv_pair): Move to coretypes.h.
9974 (optgroup_options): Make non-static.
9975 (dump_context::end_scope): Call
9976 optimization_records_maybe_pop_dump_scope.
9977 * dumpfile.h (optgroup_options): New decl.
9978 * json.cc: New file.
9980 * optinfo-emit-json.cc: New file.
9981 * optinfo-emit-json.h: New file.
9982 * optinfo.cc: Include "optinfo-emit-json.h".
9983 (optinfo::emit): Call optimization_records_maybe_record_optinfo.
9984 (optinfo_enabled_p): Check optimization_records_enabled_p.
9985 (optinfo_wants_inlining_info_p): Likewise.
9986 * optinfo.h: Update comment.
9987 * profile-count.c (profile_quality_as_string): New function.
9988 * profile-count.h (profile_quality_as_string): New decl.
9989 (profile_count::quality): New accessor.
9990 * selftest-run-tests.c (selftest::run_tests): Call json_cc_tests
9991 and optinfo_emit_json_cc_tests.
9992 * selftest.h (selftest::json_cc_tests): New decl.
9993 (selftest::optinfo_emit_json_cc_tests): New decl.
9994 * toplev.c: Include "optinfo-emit-json.h".
9995 (compile_file): Call optimization_records_finish.
9996 (do_compile): Call optimization_records_start.
9997 * tree-ssa-live.c: Include optinfo.h.
9998 (remove_unused_scope_block_p): Retain inlining information if
9999 optinfo_wants_inlining_info_p returns true.
10001 2018-07-20 Richard Biener <rguenther@suse.de>
10004 * dwarf2out.c (dwarf2out_die_ref_for_decl): Test in_lto_p
10005 to cover -flto-partition=none.
10007 2018-07-20 Martin Liska <mliska@suse.cz>
10009 * tree.h (DECL_LOCATION_RANGE): Remove unused macro.
10010 (get_decl_source_range): Remove unused function.
10012 2018-07-20 Richard Biener <rguenther@suse.de>
10014 * tree-ssa-sccvn.h (struct vn_nary_op_s): Add next member.
10015 (struct vn_phi_s): Likewise.
10016 (struct vn_reference_s): Likewise.
10017 * tree-ssa-sccvn.c (vn_nary_op_hasher::equal): Add shortcut
10018 for searching the slot of an entry known to be in the hash itself.
10019 (vn_phi_hasher::equal): Likewise.
10020 (vn_reference_hasher::equal): Likewise.
10021 (last_inserted_ref, last_inserted_phi, last_inserted_nary): New
10023 (optimistic_info, current_info): Remove, keeping only valid_info.
10024 (vn_reference_lookup_1): Remove fallback lookup.
10025 (vn_reference_lookup_2): Likewise.
10026 (vn_nary_op_lookup_1): Likewise.
10027 (vn_phi_lookup): Likewise.
10028 (vn_nary_build_or_lookup_1): Make sure to not chain the built
10030 (vn_reference_insert): Adjust, chain the inserted hash element
10031 at last_inserted_ref.
10032 (vn_reference_insert_pieces): Likewise.
10033 (visit_reference_op_call): Likewise.
10034 (vn_nary_op_insert_into): Chain the inserted hash element at
10035 last_inserted_nary.
10036 (vn_nary_op_insert_pieces): Adjust.
10037 (vn_nary_op_insert): Likewise.
10038 (vn_nary_op_insert_stmt): Likewise.
10039 (vn_phi_insert): Adjust, chain the inserted hash element at
10041 (process_scc): Remove clearing and copying the optimistic
10042 table. Instead remove elements inserted during an optimistic
10043 iteration from the single table we maintain.
10044 (init_scc_vn): Adjust.
10045 (free_scc_vn): Likewise.
10046 (sccvn_dom_walker::record_cond): Likewise.
10047 (sccvn_dom_walker::after_dom_children): Likewise.
10049 2018-07-19 Martin Sebor <msebor@redhat.com>
10051 PR tree-optimization/84047
10052 PR tree-optimization/83776
10053 * tree-vrp.c (vrp_prop::check_mem_ref): New function.
10054 (check_array_bounds): Call it.
10056 2018-07-19 Martin Sebor <msebor@redhat.com>
10058 * align.h (align_flags): Use member initialization.
10060 2018-07-19 David Malcolm <dmalcolm@redhat.com>
10062 * Makefile.in (OBJS): Add optinfo.o.
10063 * coretypes.h (class symtab_node): New forward decl.
10064 (struct cgraph_node): New forward decl.
10065 (class varpool_node): New forward decl.
10066 * dump-context.h: New file.
10067 * dumpfile.c: Include "optinfo.h", "dump-context.h", "cgraph.h",
10069 (refresh_dumps_are_enabled): Use optinfo_enabled_p.
10070 (set_dump_file): Call dumpfile_ensure_any_optinfo_are_flushed.
10071 (set_alt_dump_file): Likewise.
10072 (dump_context::~dump_context): New dtor.
10073 (dump_gimple_stmt): Move implementation to...
10074 (dump_context::dump_gimple_stmt): ...this new member function.
10075 Add the stmt to any pending optinfo, creating one if need be.
10076 (dump_gimple_stmt_loc): Move implementation to...
10077 (dump_context::dump_gimple_stmt_loc): ...this new member function.
10078 Start a new optinfo and add the stmt to it.
10079 (dump_gimple_expr): Move implementation to...
10080 (dump_context::dump_gimple_expr): ...this new member function.
10081 Add the stmt to any pending optinfo, creating one if need be.
10082 (dump_gimple_expr_loc): Move implementation to...
10083 (dump_context::dump_gimple_expr_loc): ...this new member function.
10084 Start a new optinfo and add the stmt to it.
10085 (dump_generic_expr): Move implementation to...
10086 (dump_context::dump_generic_expr): ...this new member function.
10087 Add the tree to any pending optinfo, creating one if need be.
10088 (dump_generic_expr_loc): Move implementation to...
10089 (dump_context::dump_generic_expr_loc): ...this new member
10090 function. Add the tree to any pending optinfo, creating one if
10092 (dump_printf): Move implementation to...
10093 (dump_context::dump_printf_va): ...this new member function. Add
10094 the text to any pending optinfo, creating one if need be.
10095 (dump_printf_loc): Move implementation to...
10096 (dump_context::dump_printf_loc_va): ...this new member function.
10097 Start a new optinfo and add the stmt to it.
10098 (dump_dec): Move implementation to...
10099 (dump_context::dump_dec): ...this new member function. Add the
10100 value to any pending optinfo, creating one if need be.
10101 (dump_context::dump_symtab_node): New member function.
10102 (dump_context::get_scope_depth): New member function.
10103 (dump_context::begin_scope): New member function.
10104 (dump_context::end_scope): New member function.
10105 (dump_context::ensure_pending_optinfo): New member function.
10106 (dump_context::begin_next_optinfo): New member function.
10107 (dump_context::end_any_optinfo): New member function.
10108 (dump_context::s_current): New global.
10109 (dump_context::s_default): New global.
10110 (dump_scope_depth): Delete global.
10111 (dumpfile_ensure_any_optinfo_are_flushed): New function.
10112 (dump_symtab_node): New function.
10113 (get_dump_scope_depth): Reimplement in terms of dump_context.
10114 (dump_begin_scope): Likewise.
10115 (dump_end_scope): Likewise.
10116 (selftest::temp_dump_context::temp_dump_context): New ctor.
10117 (selftest::temp_dump_context::~temp_dump_context): New dtor.
10118 (selftest::verify_item): New function.
10119 (ASSERT_IS_TEXT): New macro.
10120 (ASSERT_IS_TREE): New macro.
10121 (ASSERT_IS_GIMPLE): New macro.
10122 (selftest::test_capture_of_dump_calls): New test.
10123 (selftest::dumpfile_c_tests): Call it.
10124 * dumpfile.h (dump_printf, dump_printf_loc, dump_basic_block)
10125 (dump_generic_expr_loc, dump_generic_expr, dump_gimple_stmt_loc)
10126 (dump_gimple_stmt, dump_dec): Gather these related decls and add a
10127 descriptive comment.
10128 (dump_function, print_combine_total_stats, enable_rtl_dump_file)
10129 (dump_node, dump_bb): Move these unrelated decls.
10130 (class dump_manager): Add leading comment.
10131 * optinfo.cc: New file.
10132 * optinfo.h: New file.
10134 2018-07-19 Michael Collison <michael.collison@arm.com>
10135 Richard Henderson <rth@redhat.com>
10137 * config/aarch64/aarch64.md (subv<GPI>4, usubv<GPI>4): New patterns.
10138 (subti): Handle op1 zero.
10139 (subvti4, usub4ti4): New.
10140 (*sub<GPI>3_compare1_imm): New.
10141 (sub<GPI>3_carryinCV): New.
10142 (*sub<GPI>3_carryinCV_z1_z2, *sub<GPI>3_carryinCV_z1): New.
10143 (*sub<GPI>3_carryinCV_z2, *sub<GPI>3_carryinCV): New.
10145 2018-07-19 Michael Collison <michael.collison@arm.com>
10146 Richard Henderson <rth@redhat.com>
10148 * config/aarch64/aarch64.md: (addv<GPI>4, uaddv<GPI>4): New.
10149 (addti3): Create simpler code if low part is already known to be 0.
10150 (addvti4, uaddvti4): New.
10151 (*add<GPI>3_compareC_cconly_imm): New.
10152 (*add<GPI>3_compareC_cconly): New.
10153 (*add<GPI>3_compareC_imm): New.
10154 (*add<GPI>3_compareC): Rename from add<GPI>3_compare1; do not
10155 handle constants within this pattern..
10156 (*add<GPI>3_compareV_cconly_imm): New.
10157 (*add<GPI>3_compareV_cconly): New.
10158 (*add<GPI>3_compareV_imm): New.
10159 (add<GPI>3_compareV): New.
10160 (add<GPI>3_carryinC, add<GPI>3_carryinV): New.
10161 (*add<GPI>3_carryinC_zero, *add<GPI>3_carryinV_zero): New.
10162 (*add<GPI>3_carryinC, *add<GPI>3_carryinV): New.
10163 ((*add<GPI>3_compareC_cconly_imm): Replace 'ne' operator
10164 with 'comparison' operator.
10165 (*add<GPI>3_compareV_cconly_imm): Ditto.
10166 (*add<GPI>3_compareV_cconly): Ditto.
10167 (*add<GPI>3_compareV_imm): Ditto.
10168 (add<GPI>3_compareV): Ditto.
10169 (add<mode>3_carryinC): Ditto.
10170 (*add<mode>3_carryinC_zero): Ditto.
10171 (*add<mode>3_carryinC): Ditto.
10172 (add<mode>3_carryinV): Ditto.
10173 (*add<mode>3_carryinV_zero): Ditto.
10174 (*add<mode>3_carryinV): Ditto.
10176 2018-07-19 Michael Collison <michael.collison@arm.com>
10177 Richard Henderson <rth@redhat.com>
10179 * config/aarch64/aarch64-modes.def (CC_V): New.
10180 * config/aarch64/aarch64-protos.h
10181 (aarch64_addti_scratch_regs): Declare
10182 (aarch64_subvti_scratch_regs): Declare.
10183 (aarch64_expand_subvti): Declare.
10184 (aarch64_gen_unlikely_cbranch): Declare
10185 * config/aarch64/aarch64.c (aarch64_select_cc_mode): Test
10186 for signed overflow using CC_Vmode.
10187 (aarch64_get_condition_code_1): Handle CC_Vmode.
10188 (aarch64_gen_unlikely_cbranch): New function.
10189 (aarch64_addti_scratch_regs): New function.
10190 (aarch64_subvti_scratch_regs): New function.
10191 (aarch64_expand_subvti): New function.
10193 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
10195 * config/aarch64/aarch64-option-extensions.def: New entry for profile
10197 * config/aarch64/aarch64.h (AARCH64_FL_PROFILE): New.
10198 * doc/invoke.texi (aarch64-feature-modifiers): New entry for profile
10201 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
10204 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
10205 address check not strict.
10207 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
10209 * config/aarch64/aarch64-simd.md (aarch64_simd_mov<VQ:mode>): Replace
10211 (store_pair_lanes<mode>): Likewise.
10212 * config/aarch64/aarch64-protos.h (aarch64_addr_query_type): Add new
10213 enum value 'ADDR_QUERY_LDP_STP_N'.
10214 * config/aarch64/aarch64.c (aarch64_addr_query_type): Likewise.
10215 (aarch64_print_address_internal): Add declaration.
10216 (aarch64_print_ldpstp_address): Remove.
10217 (aarch64_classify_address): Adapt mode for 'ADDR_QUERY_LDP_STP_N'.
10218 (aarch64_print_operand): Change printing of 'y'.
10219 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Use
10220 new enum value 'ADDR_QUERY_LDP_STP_N', don't hardcode mode and use
10221 'true' rather than '1'.
10222 * config/aarch64/constraints.md (Uml): Likewise.
10223 (Uml): Rename to Umn.
10226 2018-07-19 Richard Biener <rguenther@suse.de>
10228 * tree-ssa-sccvn.h (struct vn_phi_s): Make phiargs member
10230 * tree-ssa-sccvn.c: Remove alloc-pool.h use.
10231 (vn_phi_hasher): Derive from nofree_ptr_hash and remove remove method.
10232 (vn_reference_hasher): Likewise.
10233 (struct vn_tables_s): Remove obstack and alloc-pool members.
10234 (vn_tables_obstack, vn_tables_insert_obstack): New global obstacks.
10235 (vn_nary_build_or_lookup_1): Manually build in vn_tables_insert_obstack.
10236 (vn_reference_insert): Allocate from obstack instead of from alloc-pool.
10237 (vn_reference_insert_pieces): Likewise.
10238 (alloc_vn_nary_op_noinit): Adjust.
10239 (vn_nary_op_insert_stmt): Allocate phiargs in-place.
10240 (vn_phi_eq): Adjust.
10241 (shared_lookup_phiargs): Remove.
10242 (vn_phi_lookup): Allocate temporary vn_phi_s on the stack.
10243 (vn_phi_insert): Allocate from obstack instead of from alloc-pool.
10244 (visit_reference_op_call): Likewise.
10245 (copy_nary, copy_phi, copy_reference): Remove.
10246 (process_scc): Rewind the obstack when iterating. Do not
10247 copy the elements to valid_info but just move them from one
10248 hashtable to the other.
10249 (allocate_vn_table): Adjust.
10250 (free_vn_table): Likewise.
10251 (init_scc_vn): Likewise.
10252 (free_scc_vn): Likewise.
10254 2018-07-19 H.J. Lu <hongjiu.lu@intel.com>
10257 * config/i386/i386.c (rest_of_insert_endbranch): Lookup
10258 indirect_return as function type attribute.
10259 (ix86_attribute_table): Change indirect_return to function
10261 * doc/extend.texi: Update indirect_return attribute.
10263 2018-07-19 Aldy Hernandez <aldyh@redhat.com>
10265 * wide-int.h (widest2_int): New.
10266 * gimple-fold.c (arith_overflowed_p): Use it.
10267 * tree.h (widest2_int_cst): New.
10268 * tree-vrp.c (wide_int_binop_overflow): Rename from
10269 vrp_int_const_binop.
10270 Rewrite to work on trees.
10271 (extract_range_from_multiplicative_op_1): Abstract code to...
10272 (wide_int_range_min_max): ...here.
10273 (wide_int_range_cross_product): ...and here.
10274 (extract_range_from_binary_expr_1): Abstract overflow code to...
10275 (wide_int_range_mult_wrapping): ...here.
10276 * tree-vrp.h (wide_int_range_cross_product): New.
10277 (wide_int_range_mult_wrapping): New.
10279 2018-07-19 Andrew Senkevich <andrew.senkevich@intel.com>
10280 Julia Koval <julia.koval@intel.com>
10282 * config/i386/x86-tune-costs.h (skylake_memcpy,
10283 skylake_memset): Replace rep_prefix with unrolling for size 512.
10285 2018-07-18 Kugan Vivekanandarajah <kuganv@linaro.org>
10287 PR middle-end/86544
10288 * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): Handle
10289 comparision with EQ_EXPR in last stmt.
10291 2018-07-18 Kelvin Nilsen <kelvin@gcc.gnu.org>
10293 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Rename
10294 this subsection to "PowerPC AltiVec/VSX Built-in Functions".
10295 (PowerPC AltiVec/VSX Built-in Functions): New name for subsection
10296 previously known as "PowerPC AltiVec Built-in Functions". Move
10297 some material to new subsubsections "PowerPC AltiVec Built-in
10298 Functions on ISA 2.06" and "PowerPC AltiVec Built-in Functions on
10300 (PowerPC Altivec Built-in Functions on ISA 2.05): New subsubsection.
10301 (PowerPC Altivec Built-in Functions on ISA 2.06): Likewise.
10302 (PowerPC Altivec Built-in Functions on ISA 2.07): Likewise.
10303 (PowerPC Altivec Built-in Functions on ISA 3.0): Likewise.
10305 2018-07-18 Richard Biener <rguenther@suse.de>
10307 PR tree-optimization/86557
10308 * tree-vect-patterns.c (vect_recog_divmod_pattern): Also handle
10311 2018-07-18 Ilya Leoshkevich <iii@linux.ibm.com>
10313 * config/s390/s390.c (s390_function_profiler): Generate CFI.
10315 2018-07-17 Jeff Law <law@redhat.com>
10317 * config/arm/arm.c (get_label_padding): Update for recent
10318 changes to label_to_alignment.
10320 PR tree-optimization/86010
10321 * tree-ssa-dse.c (compute_trims): Fix typo/thinko.
10323 * config/mips/mips.c (vr4130_align_insns): Update for recent
10324 changes to label_to_alignment.
10326 * config/frv/frv.c (frv_label_align): Update for recent changes
10327 to label_to_alignment.
10329 * config/nios2/nios2.c (nios2_label_align): Update for recent
10330 changes which dropped ALIGN_LABELS_LOG.
10332 2018-07-17 Andreas Schwab <schwab@linux-m68k.org>
10334 * config/m68k/m68k.md (umulsi3_highpart+1, const_umulsi3_highpart)
10335 (smulsi3_highpart+1, const_smulsi3_highpart): Add CC_STATUS_INIT.
10337 2018-07-17 Claudiu Zissulescu <claziss@synopsys.com>
10339 * config/arc/arc.c (arc_label_align): Use align_labels instead of
10340 deprecated align_labels_log.
10342 2018-07-17 Richard Biener <rguenther@suse.de>
10345 * dwarf2out.c (init_sections_and_labels): Always generate
10346 a debug_line_str_section for early LTO debug.
10347 (dwarf2out_finish): Reset debug_line_str_hash output early.
10348 Bump counter for extra dwarf5 .debug_loc labels to not conflict
10350 (dwarf2out_early_finish): Output debug_line_str.
10352 2018-07-17 Robin Dapp <rdapp@linux.ibm.com>
10354 * config/s390/s390.c (preferred_la_operand_p): Do not use LA with
10355 index register on z196 or later.
10357 2018-07-17 Robin Dapp <rdapp@linux.ibm.com>
10359 * config/s390/s390.c (s390_default_align): Set default function
10361 (s390_override_options_after_change): Call s390_default align.
10362 (s390_option_override_internal): Call s390_default_align.
10363 (TARGET_OVERRIDE_OPTIONS_AFTER_CHANGE): Define.
10365 2018-07-17 Jakub Jelinek <jakub@redhat.com>
10367 PR middle-end/86542
10368 * omp-low.c (create_task_copyfn): Copy over also fields corresponding
10369 to _looptemp_ clauses, other than the first two.
10371 2018-07-17 Martin Liska <mliska@suse.cz>
10373 * opts.c: Do not enable OPT_falign_* for -Os.
10375 2018-07-17 Martin Liska <mliska@suse.cz>
10377 * align.h (MAX_CODE_ALIGN): New.
10378 (MAX_CODE_ALIGN_VALUE): New.
10379 * common/config/i386/i386-common.c (ix86_handle_option):
10380 (MAX_CODE_ALIGN): Moved to align.h.
10381 * final.c (MAX_CODE_ALIGN): Likewise.
10382 * opts.c (parse_and_check_align_values):
10383 (MAX_CODE_ALIGN): Likewise.
10384 (MAX_CODE_ALIGN_VALUE): Likewise.
10386 2018-07-17 Martin Liska <mliska@suse.cz>
10388 * config/i386/att.h (ASM_OUTPUT_ALIGN): Fix spacing
10389 in order to fulfil coding style.
10390 * config/i386/cygming.h (ASM_OUTPUT_ALIGN): Likewise.
10391 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
10392 * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
10393 * config/iq2000/iq2000.h (ASM_OUTPUT_ALIGN): Likewise.
10394 * config/pa/pa.h (ASM_OUTPUT_ALIGN): Likewise.
10395 * config/sparc/sol2.h (ASM_OUTPUT_ALIGN_WITH_NOP): Likewise.
10396 * config/sparc/sparc.h (ASM_OUTPUT_ALIGN): Likewise.
10397 * config/visium/visium.h (ASM_OUTPUT_ALIGN): Likewise.
10398 (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
10400 2018-07-17 Martin Liska <mliska@suse.cz>
10402 * align.h: New file.
10403 * config/alpha/alpha.c (alpha_align_insns_1): Use align_functions
10405 * config/i386/i386.c (ix86_avoid_jump_mispredicts): Use new return type
10406 align_flags of label_to_alignment.
10407 * config/m32r/m32r.h (LOOP_ALIGN): Wrap returned values into
10409 * config/m68k/m68k.c: Do not use removed align_labels_value and
10411 * config/nds32/nds32.h (JUMP_ALIGN): Wrap result into align_flags class.
10412 (LOOP_ALIGN): Likewise.
10413 (LABEL_ALIGN): Likewise.
10414 * config/powerpcspe/powerpcspe.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/rs6000/rs6000-protos.h (rs6000_loop_align):
10419 Change return type to align_flags.
10420 * config/rs6000/rs6000.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
10421 Remove not used macro.
10422 (rs6000_loop_align): Change return type to align_flags.
10423 (rs6000_loop_align_max_skip): Remove.
10424 * config/rx/rx.h (JUMP_ALIGN): Wrap integer values
10425 * config/rx/rx-protos.h (rx_align_for_label): Make it
10427 * config/rx/rx.c (rx_align_for_label): Change return type
10429 (rx_max_skip_for_label): Remove TARGET_ASM_*_ALIGN_MAX_SKIP
10431 into align_flags class.
10432 (LABEL_ALIGN): Likewise.
10433 (LOOP_ALIGN): Likewise.
10434 * config/s390/s390.c (s390_label_align): Use align_flags
10436 (s390_asm_output_function_label): Likewise.
10437 * config/sh/sh.c (sh_override_options_after_change):
10438 Use align_flags class directly without macros.
10439 (find_barrier): Likewise.
10440 (barrier_align): Likewise.
10441 (sh_loop_align): Likewise.
10442 * config/spu/spu.c (spu_option_override):
10443 Use align_flags_tuple::get_value instead of removed macros.
10444 (spu_sched_init): Likewise.
10445 * config/spu/spu.h (GTY): Likewise.
10446 * config/visium/visium.c (visium_option_override):
10447 Set "8" as default secondary alignment.
10448 * config/visium/visium.h (SUBALIGN_LOG): Define to 3
10449 in order to guarantee secondary alignment of 8.
10450 * coretypes.h: Include align.h header file.
10451 * doc/tm.texi: Remove TARGET_ASM_JUMP_ALIGN_MAX_SKIP,
10452 TARGET_ASM_LOOP_ALIGN_MAX_SKIP, TARGET_ASM_LABEL_ALIGN_MAX_SKIP
10453 and TARGET_ASM_LABEL_ALIGN_AFTER_BARRIER_MAX_SKIP macros.
10454 * doc/tm.texi.in: Likewise.
10455 * final.c (struct label_alignment): Remove not used structure.
10456 (LABEL_ALIGN): Change type to align_flags.
10457 (LOOP_ALIGN): Likewise.
10458 (JUMP_ALIGN): Likewise.
10459 (default_loop_align_max_skip): Remove.
10460 (default_label_align_max_skip): Likewise.
10461 (default_jump_align_max_skip): Likewise.
10462 (default_label_align_after_barrier_max_skip):
10463 (LABEL_TO_ALIGNMENT): Change to access label_align vector.
10464 (LABEL_TO_MAX_SKIP): Remove.
10465 (label_to_alignment): Return align_flags type instead of integer.
10466 (label_to_max_skip): Remove.
10467 (align_fuzz): Use align_flags type.
10468 (compute_alignments): Use align_flags type and use align_flags::max
10469 to combine multiple alignments.
10470 (grow_label_align): Grow vec instead of C array.
10471 (update_alignments): Assign just LABEL_TO_ALIGNMENT.
10472 (shorten_branches): Use align_flags type and use align_flags::max
10473 to combine multiple alignments.
10474 (final_scan_insn_1): Remove usage of secondary alignment that comes
10475 from label alignment, but instead use proper secondary alignment
10476 which is computed in grow_label_align.
10477 * flags.h (struct align_flags_tuple): Move to align.h.
10478 (struct align_flags): Likewise.
10479 (state_align_loops): Rename to align_loops.
10480 (state_align_jumps): Rename to align_jumps.
10481 (state_align_labels): Rename to align_labels.
10482 (state_align_functions): Rename to align_functions.
10483 (align_loops_log): Remove.
10484 (align_jumps_log): Remove.
10485 (align_labels_log): Remove.
10486 (align_functions_log): Remove.
10487 (align_loops_max_skip): Remove.
10488 (align_jumps_max_skip): Remove.
10489 (align_labels_max_skip): Remove.
10490 (align_functions_max_skip): Remove.
10491 (align_loops_value): Remove.
10492 (align_jumps_value): Remove.
10493 (align_labels_value): Remove.
10494 (align_functions_value): Remove.
10495 * output.h (label_to_alignment): Change return type to align_flags.
10496 (label_to_max_skip): Remove.
10497 * target.def: Remove loop_align_max_skip, label_align_max_skip,
10498 jump_align_max_skip macros.
10499 * targhooks.h (default_loop_align_max_skip): Remove.
10500 (default_label_align_max_skip): Likewise.
10501 (default_jump_align_max_skip): Likewise.
10502 (default_label_align_after_barrier_max_skip): Remove.
10503 * toplev.c (read_log_maxskip): Use ::normalize function.
10504 (parse_N_M): Remove not used argument and also call ::normalize.
10505 (parse_alignment_opts): Do not pass unused arguments.
10506 * varasm.c (assemble_start_function): Use directly align_functions
10507 instead of removed macros.
10508 * system.h: Do not poison removed macros.
10510 2018-07-17 Jakub Jelinek <jakub@redhat.com>
10512 PR middle-end/86539
10513 * gimplify.c (gimplify_omp_for): Ensure taskloop firstprivatized init
10514 and cond temporaries don't have reference type if iterator has
10515 pointer type. For init use &for_pre_body instead of pre_p if
10516 for_pre_body is non-empty.
10518 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
10520 * config/rs6000/rs6000.md (trunc<mode>sf2): Expand truncates of
10521 double-double modes to SFmode directly directly.
10522 (trunc<mode>sf2_fprs): Delete.
10524 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
10526 * config/rs6000/rs6000.c (init_float128_ibm): Use the correct names
10527 for conversions between IFmode and the decimal floating point modes.
10528 (init_float128_ieee): Use the correct names for conversions between
10529 KFmode and the decimal floating point modes.
10531 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
10533 * config/rs6000/rs6000.c (init_float128_ibm): Use more correct names
10534 for the conversions between TDmode and IFmode.
10535 (init_float128_ieee): Use more correct names for the conversions
10536 between TDmode and KFmode.
10538 2018-07-16 Jakub Jelinek <jakub@redhat.com>
10540 PR tree-optimization/86526
10541 * builtins.c (expand_builtin_memcmp): Formatting fixes.
10542 (inline_expand_builtin_string_cmp): Likewise.
10543 (inline_string_cmp): Likewise. Use c_readstr instead of
10544 builtin_memcpy_read_str. Add unit_mode temporary.
10546 2018-07-16 Bernd Edlinger <bernd.edlinger@hotmail.de>
10548 PR middle-end/86528
10549 * builtins.c (check_access): Bail out if range[0] is no INTEGER_CST.
10550 * expr.c (string_constant): Fix the element size of ARRAY_TYPE.
10552 2018-07-16 Kelvin Nilsen <kelvin@gcc.gnu.org>
10554 * doc/extend.texi (PowerPC AltiVec Built-in Functions):
10555 Alphabetize prototypes of built-in functions, separating out
10556 built-in functions that are listed in this section but should be
10557 described elsewhere.
10559 2018-07-16 Uros Bizjak <ubizjak@gmail.com>
10562 * expmed.c (emit_store_flag): Do not emit setcc followed by a
10563 conditional move when trapping comparison was split to a
10564 non-trapping one (and vice versa).
10566 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
10568 * config/s390/s390.c (s390_function_profiler): Generate nops
10569 instead of profiler call sequences.
10570 * config/s390/s390.opt: Add the new option.
10572 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
10574 * config/s390/s390.c (s390_function_profiler): Generate
10575 __mcount_loc section.
10576 * config/s390/s390.opt: Add the new option.
10578 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
10580 * common.opt: Add the new warning.
10581 * config/s390/s390.c (s390_function_profiler): Emit "brasl
10582 %r0,__fentry__" when -mfentry is specified.
10583 (s390_option_override_internal): Disallow -mfentry for 31-bit
10585 * config/s390/s390.opt: Add the new option.
10587 2018-07-16 Richard Biener <rguenther@suse.de>
10590 * dwarf2out.c (dwarf2out_register_external_die): Assign DIE parents
10591 for function-local FUNCTION_DECL and RESULT_DECL immediately.
10593 2018-07-16 Martin Liska <mliska@suse.cz>
10596 * ipa-pure-const.c (malloc_candidate_p): Revert ::get
10599 2017-07-16 Claudiu Zissulescu <claziss@synopsys.com>
10601 * config/arc/arcHS.md: Update ARCHS scheduling rules.
10603 2017-07-16 Claudiu Zissulescu <claziss@synopsys.com>
10605 * config/arc/arc-arch.h (arc_tune_attr): Add new tune parameters
10607 * config/arc/arc-cpus.def (hs4x): New cpu.
10609 * config/arc/arc-tables.opt: Regenerate.
10610 * config/arc/arc.c (arc_sched_issue_rate): New function.
10611 (TARGET_SCHED_ISSUE_RATE): Define.
10612 (TARGET_SCHED_EXPOSED_PIPELINE): Likewise.
10613 * config/arc/arc.md (attr type): Add fpu_fuse, fpu_sdiv, fpu_ddiv,
10615 (attr tune): Add ARCHS4x tune values.
10616 (attr tune_dspmpy): Define.
10617 (*tst): Correct instruction type.
10618 * config/arc/arcHS.md: Don't use this automaton for ARCHS4x cpus.
10619 * config/arc/arcHS4x.md: New file.
10620 * config/arc/fpu.md: Update instruction type attributes.
10621 * config/arc/t-multilib: Regenerate.
10623 2018-07-16 Tom de Vries <tdevries@suse.de>
10626 * var-tracking.c (vt_initialize): Fix pre_dec handling.
10628 2018-07-16 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
10630 * config/aarch64/atomics.md (aarch64_store_execlusive<mode>): Add
10633 2018-07-16 Eric Botcazou <ebotcazou@adacore.com>
10635 PR tree-optimization/86514
10636 * tree-ssa-reassoc.c (init_range_entry) <CASE_CONVERT>: Return for a
10637 conversion to a boolean type from a type with greater precision.
10639 2018-07-16 Tom de Vries <tdevries@suse.de>
10641 * var-tracking.c (vt_initialize): Print adjusted insn slim if
10642 dump_flags request TDF_SLIM.
10644 2018-07-16 Aldy Hernandez <aldyh@redhat.com>
10646 * fold-const.c (int_const_binop_1): Abstract...
10647 (wide_int_binop): ...wide int code here.
10648 (poly_int_binop): ...poly int code here.
10649 Abstract the rest of int_const_binop_1 into int_const_binop.
10650 * fold-const.h (wide_int_binop): New.
10651 * tree-vrp.c (vrp_int_const_binop): Call wide_int_binop.
10652 Remove useless PLUS/MINUS_EXPR case.
10653 (zero_nonzero_bits_from_vr): Move wide int code...
10654 (zero_nonzero_bits_from_bounds): ...here.
10655 (extract_range_from_binary_expr_1): Move mask optimization code...
10656 (range_easy_mask_min_max): ...here.
10657 * tree-vrp.h (zero_nonzero_bits_from_bounds): New.
10658 (range_easy_mask_min_max): New.
10660 2018-07-15 Jeff Law <law@redhat.com>
10663 * config/sh/sh.c (output_mi_thunk): Remove dead conditional
10666 2018-07-14 Jim Wilson <jimw@sifive.com>
10668 * config/riscv/linux.h (TARGET_ASM_FILE_END): New.
10670 2018-07-14 Paul Koning <ni1d@arrl.net>
10672 * config/pdp11/pdp11.c (pdp11_rtx_costs): Bugfixes.
10674 2018-07-13 Jan Hubicka <hubicka@ucw.cz>
10676 * lto-streamer-out.c (copy_function_or_variable): Dump info about
10679 2018-07-13 Bill Schmidt <wschmidt@linux.ibm.com>
10680 Steve Munroe <munroesj52@gmail.com>
10682 * config/rs6000/emmintrin.h (_mm_and_si128): New function.
10683 (_mm_andnot_si128): Likewise.
10684 (_mm_or_si128): Likewise.
10685 (_mm_xor_si128): Likewise.
10687 2018-07-13 Qing Zhao <qing.zhao@oracle.com>
10689 PR middle-end/78809
10690 * builtins.c (expand_builtin_memcmp): Inline the calls first
10691 when result_eq is false.
10692 (expand_builtin_strcmp): Inline the calls first.
10693 (expand_builtin_strncmp): Likewise.
10694 (inline_string_cmp): New routine. Expand a string compare
10695 call by using a sequence of char comparison.
10696 (inline_expand_builtin_string_cmp): New routine. Inline expansion
10697 a call to str(n)cmp/memcmp.
10698 * doc/invoke.texi (--param builtin-string-cmp-inline-length):
10700 * params.def (BUILTIN_STRING_CMP_INLINE_LENGTH): New.
10702 2018-07-13 Richard Earnshaw <rearnsha@arm.com>
10704 * config/arm/driver-arm.c: Include arm-native.h.
10705 (host_detect_local_cpu): Use auto-generated data tables.
10706 (vendors, arm_cpu_table): Delete. Move part information to ...
10707 * config/arm/arm-cpus.in: ... here.
10708 * config/arm/parsecpu.awk (gen_native): New function.
10709 (vendor, part): New CPU fields.
10710 (END): Add support for building the native CPU detection tables.
10711 * config/arm/t-arm (arm-native.h): Add build rule.
10712 (driver-arm.o): Add dependency on arm-native.h.
10714 2018-07-13 Richard Biener <rguenther@suse.de>
10716 PR middle-end/85974
10717 * match.pd (addr1 - addr2): Allow either of the operand to
10720 2018-07-13 Tom de Vries <tdevries@suse.de>
10722 * tree-inline.c (remap_ssa_name): Save and reuse debug exprs generated
10725 2018-07-13 Jackson Woodruff <jackson.woodruff@arm.com>
10727 * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp): Use
10728 arrays instead of numbered variables.
10730 2018-07-13 Eric Botcazou <ebotcazou@adacore.com>
10732 * config/sparc/sparc-protos.h (sparc_compute_frame_size): Delete.
10733 * config/sparc/sparc.c (sparc_compute_frame_size): Make static.
10735 2018-07-13 Richard Biener <rguenther@suse.de>
10738 * dwarf2out.c (gen_type_die_with_usage): Use scope_die_for
10739 instead of get_context_die.
10741 2018-07-13 Kugan Vivekanandarajah <kuganv@linaro.org>
10742 Richard Biener <rguenther@suse.de>
10744 PR middle-end/86489
10745 * tree-ssa-loop-niter.c (number_of_iterations_popcount): Check
10746 that the loop latch destination where phi is defined.
10748 2018-07-12 Kito Cheng <kito.cheng@gmail.com>
10750 * config/riscv/riscv.c (enum riscv_privilege_levels): Add UNKNOWN_MODE.
10751 (riscv_expand_epilogue): Add assertion to check interrupt mode.
10752 (riscv_set_current_function): Extract getting interrupt type to new
10754 (riscv_get_interrupt_type): New function.
10755 (riscv_merge_decl_attributes): New function, checking interrupt type is
10757 (TARGET_MERGE_DECL_ATTRIBUTES): Define.
10759 2018-07-12 Paul Koning <ni1d@arrl.net>
10761 * config/pdp11/pdp11.c (pdp11_output_def): Fix typo in .set
10764 2018-07-12 Paul Koning <ni1d@arrl.net>
10766 * doc/rtl.texi (REG_NONNEG): Remove decrement and branch until
10767 zero reference, add doloop_end instead.
10768 * doc/md.texi (decrement_and_branch_until_zero): Remove.
10769 (Looping patterns): Remove decrement_and_branch_until_zero. Add
10770 detail for doloop_end.
10772 2018-07-12 Martin Sebor <msebor@redhat.com>
10775 * attribs.c (decl_attributes): Reject conflicting attributes before
10776 calling attribute handlers.
10778 2018-07-12 Jan Hubicka <hubicka@ucw.cz>
10780 * dumpfile.c (gcc::dump_manager::get_dump_file_name): Add PART
10782 (gcc::dump_manager::get_dump_file_name): likewise.
10783 (dump_begin): Likewise.
10784 * dumpfile.h (dump_begin): Update prototype.
10785 (gcc::dump_manager::get_dump_file_name,
10786 gcc::dump_manager::get_dump_file_name): Update prototype.
10788 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
10790 * internal-fn.h (vectorizable_internal_fn_p): New function.
10791 * tree-vect-slp.c (compatible_calls_p): Likewise.
10792 (vect_build_slp_tree_1): Remove nops argument. Handle calls
10793 to internal functions.
10794 (vect_build_slp_tree_2): Update call to vect_build_slp_tree_1.
10796 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
10798 * fold-const.h (inverse_conditions_p): Declare.
10799 * fold-const.c (inverse_conditions_p): New function.
10800 * match.pd: Use inverse_conditions_p. Add folds of view_converts
10801 that test the inverse condition of a conditional internal function.
10802 * internal-fn.h (vectorized_internal_fn_supported_p): Declare.
10803 * internal-fn.c (internal_fn_mask_index): Handle conditional
10804 internal functions.
10805 (vectorized_internal_fn_supported_p): New function.
10806 * tree-if-conv.c: Include internal-fn.h and fold-const.h.
10807 (any_pred_load_store): Replace with...
10808 (need_to_predicate): ...this new variable.
10809 (redundant_ssa_names): New variable.
10810 (ifcvt_can_use_mask_load_store): Move initial checks to...
10811 (ifcvt_can_predicate): ...this new function. Handle tree codes
10812 for which a conditional internal function exists.
10813 (if_convertible_gimple_assign_stmt_p): Use ifcvt_can_predicate
10814 instead of ifcvt_can_use_mask_load_store. Update after variable
10816 (predicate_load_or_store): New function, split out from
10817 predicate_mem_writes.
10818 (check_redundant_cond_expr): New function.
10819 (value_available_p): Likewise.
10820 (predicate_rhs_code): Likewise.
10821 (predicate_mem_writes): Rename to...
10822 (predicate_statements): ...this. Use predicate_load_or_store
10823 and predicate_rhs_code.
10824 (combine_blocks, tree_if_conversion): Update after above name changes.
10825 (ifcvt_local_dce): Handle redundant_ssa_names.
10826 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): Handle
10827 general conditional functions.
10828 * tree-vect-stmts.c (vectorizable_call): Likewise.
10830 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
10831 Alan Hayward <alan.hayward@arm.com>
10832 David Sherwood <david.sherwood@arm.com>
10834 * internal-fn.h (can_interpret_as_conditional_op_p): Declare.
10835 * internal-fn.c (can_interpret_as_conditional_op_p): New function.
10836 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Handle conditional
10837 plus and minus and convert them into IFN_COND_FMA-based sequences.
10838 (convert_mult_to_fma): Handle conditional plus and minus.
10840 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
10842 * doc/md.texi (cond_fma, cond_fms, cond_fnma, cond_fnms): Document.
10843 * optabs.def (cond_fma_optab, cond_fms_optab, cond_fnma_optab)
10844 (cond_fnms_optab): New optabs.
10845 * internal-fn.def (COND_FMA, COND_FMS, COND_FNMA, COND_FNMS): New
10846 internal functions.
10847 (FMA): Use DEF_INTERNAL_FLT_FN rather than DEF_INTERNAL_FLT_FLOATN_FN.
10848 * internal-fn.h (get_conditional_internal_fn): Declare.
10849 (get_unconditional_internal_fn): Likewise.
10850 * internal-fn.c (cond_ternary_direct): New macro.
10851 (expand_cond_ternary_optab_fn): Likewise.
10852 (direct_cond_ternary_optab_supported_p): Likewise.
10853 (FOR_EACH_COND_FN_PAIR): Likewise.
10854 (get_conditional_internal_fn): New function.
10855 (get_unconditional_internal_fn): Likewise.
10856 * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 5.
10857 (gimple_match_op::gimple_match_op): Add a new overload for 5
10859 (gimple_match_op::set_op): Likewise.
10860 (gimple_resimplify5): Declare.
10861 * genmatch.c (decision_tree::gen): Generate simplifications for
10863 * gimple-match-head.c (gimple_simplify): Define an overload for
10864 5 operands. Handle calls with 5 arguments in the top-level overload.
10865 (convert_conditional_op): Handle conversions from unconditional
10866 internal functions to conditional ones.
10867 (gimple_resimplify5): New function.
10868 (build_call_internal): Pass a fifth operand.
10869 (maybe_push_res_to_seq): Likewise.
10870 (try_conditional_simplification): Try converting conditional
10871 internal functions to unconditional internal functions.
10872 Handle 3-operand unconditional forms.
10873 * match.pd (UNCOND_TERNARY, COND_TERNARY): Operator lists.
10874 Define ternary equivalents of the current rules for binary conditional
10875 internal functions.
10876 * config/aarch64/aarch64.c (aarch64_preferred_else_value): Handle
10877 ternary operations.
10878 * config/aarch64/iterators.md (UNSPEC_COND_FMLA, UNSPEC_COND_FMLS)
10879 (UNSPEC_COND_FNMLA, UNSPEC_COND_FNMLS): New unspecs.
10880 (optab): Handle them.
10881 (SVE_COND_FP_TERNARY): New int iterator.
10882 (sve_fmla_op, sve_fmad_op): New int attributes.
10883 * config/aarch64/aarch64-sve.md (cond_<optab><mode>)
10884 (*cond_<optab><mode>_2, *cond_<optab><mode_4)
10885 (*cond_<optab><mode>_any): New SVE_COND_FP_TERNARY patterns.
10887 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
10889 * target.def (preferred_else_value): New target hook.
10890 * doc/tm.texi.in (TARGET_PREFERRED_ELSE_VALUE): New hook.
10891 * doc/tm.texi: Regenerate.
10892 * targhooks.h (default_preferred_else_value): Declare.
10893 * targhooks.c (default_preferred_else_value): New function.
10894 * internal-fn.h (conditional_internal_fn_code): Declare.
10895 * internal-fn.c (FOR_EACH_CODE_MAPPING): New macro.
10896 (get_conditional_internal_fn): Use it.
10897 (conditional_internal_fn_code): New function.
10898 * gimple-match.h (gimple_match_cond): New struct.
10899 (gimple_match_op): Add a cond member function.
10900 (gimple_match_op::gimple_match_op): Update all forms to take a
10902 * genmatch.c (expr::gen_transform): Use the same condition as res_op
10903 for the suboperation, but don't specify a particular else_value.
10904 * tree-ssa-sccvn.c (vn_nary_simplify, vn_reference_lookup_3)
10905 (visit_nary_op, visit_reference_op_load): Pass
10906 gimple_match_cond::UNCOND to the gimple_match_op constructor.
10907 * gimple-match-head.c: Include tree-eh.h
10908 (convert_conditional_op): New function.
10909 (maybe_resimplify_conditional_op): Likewise.
10910 (gimple_resimplify1): Call maybe_resimplify_conditional_op.
10911 (gimple_resimplify2): Likewise.
10912 (gimple_resimplify3): Likewise.
10913 (gimple_resimplify4): Likewise.
10914 (maybe_push_res_to_seq): Return null for conditional operations.
10915 (try_conditional_simplification): New function.
10916 (gimple_simplify): Call it. Pass conditions to the gimple_match_op
10918 * match.pd: Fold VEC_COND_EXPRs of an IFN_COND_* call to a new
10920 * config/aarch64/aarch64.c (aarch64_preferred_else_value): New
10922 (TARGET_PREFERRED_ELSE_VALUE): Redefine.
10924 2018-07-12 Jan Hubicka <hubicka@ucw.cz>
10926 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
10928 (hash_tree): Do not hash DECL_FCONTEXT
10929 * tree-streamer-in.c (lto_input_ts_field_decl_tree_pointers):
10930 Do not stream DECL_FCONTEXT.
10931 * tree-streamer-out.c (write_ts_field_decl_tree_pointers): Likewise.
10932 * tree.c (free_lang_data_in_decl): Free DECL_FCONTEXT.
10934 2018-07-12 Richard Biener <rguenther@suse.de>
10937 * dwarf2out.c (gen_block_die): Only output blocks when they have
10938 at least one !DECL_IGNORED_P variable.
10940 2018-07-12 Richard Biener <rguenther@suse.de>
10943 * config/gnu-user.h (GNU_USER_TARGET_NO_PTHREADS_LIB_SPEC):
10944 Remove -mieee-fp handling.
10946 2018-07-12 Richard Biener <rguenther@suse.de>
10948 * tree-ssa-sccvn.c (vn_lookup_simplify_result): Remove bogus
10949 left-over from last patch.
10951 2018-07-12 Jakub Jelinek <jakub@redhat.com>
10953 PR tree-optimization/86492
10954 * gimple-ssa-store-merging.c
10955 (imm_store_chain_info::coalesce_immediate_stores): Call
10956 check_no_overlap even for the merge_overlapping case. Formatting fix.
10958 2018-07-12 Richard Biener <rguenther@suse.de>
10960 PR middle-end/86479
10961 * fold-const.c (fold_binary_op_with_conditional_arg): Do not
10962 move possibly trapping operations into the conditional.
10964 2018-07-12 Richard Biener <rguenther@suse.de>
10966 * tree-ssa-sccvn.c (mprts_hook_cnt): Remove.
10967 (vn_lookup_simplify_result): Remove recursion limit applied
10969 (vn_nary_build_or_lookup_1): Adjust.
10970 (try_to_simplify): Likewise.
10971 * gimple-match-head.c (gimple_resimplify1): Instead apply one
10973 (gimple_resimplify2): Likewise.
10974 (gimple_resimplify3): Likewise.
10975 (gimple_resimplify4): Likewise.
10977 2018-07-11 Jakub Jelinek <jakub@redhat.com>
10979 * config/i386/avx512bitalgintrin.h (_mm512_mask_bitshuffle_epi64_mask):
10980 Use __mmask64 type instead of __mmask8 for __M argument.
10981 * config/i386/avx512fintrin.h (_mm512_mask_xor_epi64,
10982 _mm512_maskz_xor_epi64): Use __mmask8 type instead of __mmask16 for
10984 (_mm512_mask_cmpneq_epi64_mask): Use __mmask8 type instead of
10985 __mmask16 for __M argument.
10986 (_mm512_maskz_insertf32x4, _mm512_maskz_inserti32x4,
10987 _mm512_mask_insertf32x4, _mm512_mask_inserti32x4): Cast last argument
10988 to __mmask16 instead of __mmask8.
10989 * config/i386/avx512vlintrin.h (_mm_mask_add_ps, _mm_maskz_add_ps,
10990 _mm256_mask_add_ps, _mm256_maskz_add_ps, _mm_mask_sub_ps,
10991 _mm_maskz_sub_ps, _mm256_mask_sub_ps, _mm256_maskz_sub_ps,
10992 _mm256_maskz_cvtepi32_ps, _mm_maskz_cvtepi32_ps): Use __mmask8 type
10993 instead of __mmask16 for __U argument.
10994 * config/i386/avx512vlbwintrin.h (_mm_mask_cmp_epi8_mask): Use
10995 __mmask16 instead of __mmask8 for __U argument.
10996 (_mm256_mask_cmp_epi8_mask): Use __mmask32 instead of __mmask16 for
10998 (_mm256_cmp_epi8_mask): Use __mmask32 return type instead of
11000 (_mm_mask_cmp_epu8_mask): Use __mmask16 instead of __mmask8 for __U
11002 (_mm256_mask_cmp_epu8_mask): Use __mmask32 instead of __mmask16 for
11004 (_mm256_cmp_epu8_mask): Use __mmask32 return type instead of
11006 (_mm_mask_cmp_epi16_mask): Cast last argument to __mmask8 instead
11008 (_mm256_mask_cvtepi8_epi16): Use __mmask16 instead of __mmask32 for
11010 (_mm_mask_cvtepi8_epi16): Use __mmask8 instead of __mmask32 for
11012 (_mm256_mask_cvtepu8_epi16): Use __mmask16 instead of __mmask32 for
11014 (_mm_mask_cvtepu8_epi16): Use __mmask8 instead of __mmask32 for
11016 (_mm256_mask_cmpneq_epu8_mask, _mm256_mask_cmplt_epu8_mask,
11017 _mm256_mask_cmpge_epu8_mask, _mm256_mask_cmple_epu8_mask): Change
11018 return type as well as __M argument type and all casts from __mmask8
11020 (_mm256_mask_cmpneq_epu16_mask, _mm256_mask_cmplt_epu16_mask,
11021 _mm256_mask_cmpge_epu16_mask, _mm256_mask_cmple_epu16_mask): Change
11022 return type as well as __M argument type and all casts from __mmask8
11024 (_mm256_mask_cmpneq_epi8_mask, _mm256_mask_cmplt_epi8_mask,
11025 _mm256_mask_cmpge_epi8_mask, _mm256_mask_cmple_epi8_mask): Change
11026 return type as well as __M argument type and all casts from __mmask8
11028 (_mm256_mask_cmpneq_epi16_mask, _mm256_mask_cmplt_epi16_mask,
11029 _mm256_mask_cmpge_epi16_mask, _mm256_mask_cmple_epi16_mask): Change
11030 return type as well as __M argument type and all casts from __mmask8
11032 * config/i386/avx512vbmi2vlintrin.h (_mm_mask_shrdi_epi32,
11033 _mm_mask_shldi_epi32): Cast last argument to __mmask8 instead of
11036 2018-07-11 Grazvydas Ignotas <notasas@gmail.com>
11038 * config/i386/avx512bwintrin.h: (_mm512_mask_cmp_epi8_mask,
11039 _mm512_mask_cmp_epu8_mask): Use __mmask64 type instead of __mmask32
11042 2018-07-11 Paul Koning <ni1d@arrl.net>
11044 * doc/md.texi (define_subst): Document how multiple occurrences of
11045 the same argument in the replacement pattern are handled.
11047 2018-07-11 Paul Koning <ni1d@arrl.net>
11049 * doc/extend.texi (Common Variable Attributes): Move "mode" into
11050 alphabetical order.
11051 (Common Type Attributes): Add "mode" attribute.
11053 2018-07-11 Jan Hubicka <hubicka@ucw.cz>
11055 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not
11056 stream DECL_ORIGINAL_TYPE.
11057 (DFS::DFS_write_tree_body): Drop hack handling local external decls.
11058 (hash_tree): Do not walk DECL_ORIGINAL_TYPE.
11059 * tree-streamer-in.c (lto_input_ts_decl_non_common_tree_pointers):
11060 Do not walk original type.
11061 * tree-streamer-out.c (streamer_write_chain): Drop hack handling
11063 (write_ts_decl_non_common_tree_pointers): Do not stream
11065 * tree.c (free_lang_data_in_decl): Clear DECL_ORIGINAL_TYPE.
11066 (find_decls_types_r): Do not walk DEC_ORIGINAL_TYPE.
11068 2018-07-11 Aldy Hernandez <aldyh@redhat.com>
11070 * tree-ssa-threadupdate.c (thread_through_all_blocks): Do not jump
11071 thread twice from the same starting edge.
11073 2018-07-11 Aldy Hernandez <aldyh@redhat.com>
11075 * vr-values.c (gimple_stmt_nonzero_p): Abstract common code to...
11076 * gimple.c (gimple_call_nonnull_result_p): ...here...
11077 (gimple_call_nonnull_arg): ...and here.
11078 * gimple.h (gimple_call_nonnull_result_p): New.
11079 (gimple_call_nonnull_arg): New.
11081 2018-07-11 Richard Earnshaw <rearnsha@arm.com>
11083 * config/arm/arm-cpus.in: Move information from fpu field of each
11084 cpu definition to the isa field.
11085 * config/arm/parsecpu.awk (fpu): Delete match rule.
11086 (gen_comm_data): Don't add bits from the CPU's FPU entry.
11088 2018-07-11 Richard Biener <rguenther@suse.de>
11091 * dwarf2out.c (init_sections_and_labels): Use
11092 output_asm_line_debug_info consistently.
11093 (dwarf2out_early_finish): Likewise.
11094 (dwarf2out_finish): Remove DW_AT_stmt_list from early generated
11097 2018-07-11 Richard Biener <rguenther@suse.de>
11099 * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1):
11100 Rework father_bb setting in a way to avoid propagating constants
11101 multiple times on a loop body.
11103 2018-07-10 Mark Wielaard <mark@klomp.org>
11106 * dwarf2out.c (output_macinfo_op): Fix dwarf_FORM typo in gcc_assert.
11108 2018-07-10 Richard Biener <rguenther@suse.de>
11110 * hash-map.h (hash_map::iterator::operator*): Return
11111 references to key and value.
11113 2018-07-10 Jakub Jelinek <jakub@redhat.com>
11116 * gimplify.c (find_combined_omp_for): Add DATA argument, in addition
11117 to finding the inner OMP_FOR/OMP_SIMD stmt find non-trivial wrappers,
11118 BLOCKs with BLOCK_VARs, OMP_PARALLEL in between, OMP_FOR in between.
11119 (gimplify_omp_for): For composite loops, move outer
11120 OMP_{DISTRIBUTE,TASKLOOP,FOR,PARALLEL} right around innermost
11121 OMP_FOR/OMP_SIMD if there are any non-trivial wrappers. For class
11122 iterators add any needed clauses. Allow OMP_FOR_ORIG_DECLS to contain
11123 TREE_LIST for both the original class iterator and the "last" helper
11124 var. Gimplify OMP_FOR_PRE_BODY before the outermost composite
11125 loop, remember has_decl_expr from outer composite loops for the
11126 innermost OMP_SIMD in TREE_PRIVATE bit on OMP_FOR_INIT.
11128 2018-07-09 Martin Sebor <msebor@redhat.com>
11130 PR middle-end/77357
11131 PR middle-end/86428
11132 * builtins.c (c_strlen): Avoid out-of-bounds warnings when
11133 accessing implicitly initialized array elements.
11134 * expr.c (string_constant): Handle string initializers of
11135 character arrays within aggregates.
11136 * gimple-fold.c (fold_array_ctor_reference): Add argument.
11137 Store element offset. As a special case, handle zero size.
11138 (fold_nonarray_ctor_reference): Same.
11139 (fold_ctor_reference): Add argument. Store subobject offset.
11140 * gimple-fold.h (fold_ctor_reference): Add argument.
11142 2018-07-09 Paul Koning <ni1d@arrl.net>
11144 * config/pdp11/pdp11.c (pdp11_addr_cost): New function.
11145 (pdp11_insn_cost): New function.
11146 (pdp11_md_asm_adjust): New function.
11147 (TARGET_INVALID_WITHIN_DOLOOP): Define.
11148 (pdp11_rtx_costs): Update to match machine better.
11149 (output_addr_const_pdp11): Correct format mismatch warnings.
11150 * config/pdp11/pdp11.h (SLOW_BYTE_ACCESS): Correct definition.
11151 * config/pdp11/pdp11.md: General change to add base_cost and/or
11152 length attributes for use by new pdp11_insn_cost function.
11153 (MIN_BRANCH): Correct definition.
11155 (doloop_end): Use standard pattern name for looping pattern.
11156 (doloop_end_nocc): New.
11157 (movsf): Add another constraint alternative.
11158 (zero_extendqihi2): Add constraint alternatives for not in place
11160 (zero_extendhisi2): Remove.
11161 (shift patterns): Add CC handling variants.
11165 (define_peephole2): New peephole to recognize mov that sets CC for
11168 2018-07-09 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
11170 * config/sparc/sparc.c (sparc_fold_builtin) <SPARC_BUILTIN_PDIST,
11171 SPARC_BUILTIN_PDISTN>: Adapt for signature change of wi::neg,
11174 2018-07-09 Jakub Jelinek <jakub@redhat.com>
11177 * real.c (real_nextafter): Return true if result is denormal.
11179 2018-07-09 Martin Liska <mliska@suse.cz>
11181 * common.opt: Add back wrongly removed attribute.
11183 2018-07-09 Richard Biener <rguenther@suse.de>
11186 * dwarf2out.c (gen_block_die): For an early generated DIE
11187 always output high/low PC attributes.
11189 2018-07-09 Tom de Vries <tdevries@suse.de>
11191 * cfgexpand.c (expand_debug_source_expr): Handle VAR_DECL.
11192 * tree-inline.c (remap_ssa_name): Handle default def ssa_name mapping
11193 onto VAR_DECL with abstract origin.
11195 2018-07-07 Jim Wilson <jimw@sifive.com>
11197 * config/riscv/riscv.c (TARGET_CUSTOM_FUNCTION_DESCRIPTORS): New.
11199 2018-07-07 Tom de Vries <tdevries@suse.de>
11201 * tree-dfa.c (dump_enumerated_decls): Handle cfun->cfg == NULL.
11203 2018-07-07 Aldy Hernandez <aldyh@redhat.com>
11205 * tree-vrp.c (vrp_int_const_binop): Change overflow type to
11207 (combine_bound): Use wide-int overflow calculation instead of
11209 * calls.c (maybe_warn_alloc_args_overflow): Change overflow type to
11211 * fold-const.c (int_const_binop_2): Same.
11212 (extract_muldiv_1): Same.
11213 (fold_div_compare): Same.
11214 (fold_abs_const): Same.
11216 * poly-int.h (add): Same.
11220 * predict.c (predict_iv_comparison): Same.
11221 * profile-count.c (slow_safe_scale_64bit): Same.
11222 * simplify-rtx.c (simplify_const_binary_operation): Same.
11223 * tree-chrec.c (tree_fold_binomial): Same.
11224 * tree-data-ref.c (split_constant_offset_1): Same.
11225 * tree-if-conv.c (idx_within_array_bound): Same.
11226 * tree-scalar-evolution.c (iv_can_overflow_p): Same.
11227 * tree-ssa-phiopt.c (minmax_replacement): Same.
11228 * tree-vect-loop.c (is_nonwrapping_integer_induction): Same.
11229 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Same.
11230 * vr-values.c (vr_values::adjust_range_with_scev): Same.
11231 * wide-int.cc (wi::add_large): Same.
11232 (wi::mul_internal): Same.
11233 (wi::sub_large): Same.
11234 (wi::divmod_internal): Same.
11235 * wide-int.h: Change overflow type to overflow_type for neg, add,
11236 mul, smul, umul, div_trunc, div_floor, div_ceil, div_round,
11237 mod_trunc, mod_ceil, mod_round, add_large, sub_large,
11238 mul_internal, divmod_internal.
11239 (overflow_type): New enum.
11240 (accumulate_overflow): New.
11242 2018-07-06 Kugan Vivekanandarajah <kugan.vivekanandarajah@linaro.org>
11244 * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): New.
11245 (tree_ssa_phiopt_worker): Call cond_removal_in_popcount_pattern.
11247 2018-07-06 Kugan Vivekanandarajah <kuganv@linaro.org>
11249 * tree-ssa-loop-niter.c (number_of_iterations_popcount): If popcount
11250 argument is checked for zero before entering loop, avoid checking again.
11252 2018-07-06 Kugan Vivekanandarajah <kuganv@linaro.org>
11254 * gimplify.h (generic_expr_could_trap_p): Set as global function.
11255 * gimplify.h (generic_expr_could_trap_p): Likwise.
11256 * tree-scalar-evolution.c (expression_expensive_p): Handle COND_EXPR.
11258 2018-07-06 Jakub Jelinek <jakub@redhat.com>
11260 PR tree-optimization/86401
11261 * fold-const.c (fold_binary_loc) <case BIT_AND_EXPR>: Move the
11262 ((A & N) + B) & M -> (A + B) & M etc. optimization into ...
11263 (fold_bit_and_mask): ... here. New helper function for match.pd.
11264 * fold-const.h (fold_bit_and_mask): Declare.
11265 * match.pd (((A & N) + B) & M -> (A + B) & M): New optimization.
11267 2018-07-06 Peter Bergner <bergner@linux.ibm.com>
11270 * target.def (translate_mode_attribute): New hook.
11271 * targhooks.h (default_translate_mode_attribute): Declare.
11272 * targhooks.c (default_translate_mode_attribute): New function.
11273 * doc/tm.texi.in (TARGET_TRANSLATE_MODE_ATTRIBUTE): New hook.
11274 * doc/tm.texi: Regenerate.
11275 * config/rs6000/rs6000.c (TARGET_TRANSLATE_MODE_ATTRIBUTE): Define.
11276 (rs6000_translate_mode_attribute): New function.
11278 2018-07-06 Paul Koning <ni1d@arrl.net>
11280 * doc/md.texi (define_split): Document DONE and FAIL.
11281 (define_peephole2): Ditto.
11283 2018-07-05 Jeff Law <law@redhat.com>
11285 PR tree-optimization/86010
11286 * tree-ssa-dse.c (compute_trims): More aggressively trim at
11287 both the head and tail of mem* and str* calls.
11289 2018-07-05 Jim Wilson <jimw@sifive.com>
11291 * config.gcc (riscv*-*-*): When setting xlen, handle riscv-*.
11293 2018-07-05 Indu Bhagat <indu.bhagat@oracle.com>
11295 * config/aarch64/aarch64-simd.md: correct flags text for
11296 MIN_EXPR replacement.
11298 2018-07-05 James Clarke <jrtc27@jrtc27.com>
11300 * configure: Regenerated.
11302 2018-07-05 Carl Love <cel@us.ibm.com>
11304 * config/rs6000/rs6000-c.c: Map ALTIVEC_BUILTIN_VEC_UNPACKH for
11305 float argument to VSX_BUILTIN_DOUBLEH_V4SF.
11306 Map ALTIVEC_BUILTIN_VEC_UNPACKL for float argument to
11307 VSX_BUILTIN_DOUBLEL_V4SF.
11309 2018-07-05 Martin Sebor <msebor@redhat.com>
11312 * tree-ssa-strlen.c (maybe_set_strlen_range): Use type size rather
11313 than its domain to compute its the upper bound of a char array.
11315 2018-07-05 Nathan Sidwell <nathan@acm.org>
11317 Replace NO_IMPLICIT_EXTERN_C with SYSTEM_IMPLICIT_EXTERN_C.
11318 * doc/cpp.texi: Update comment.
11319 * doc/tm.texi: Rebuilt.
11320 * doc/tm.texi.in (NO_IMPLICIT_EXTERN_C): Replace with ...
11321 (SYSTEM_IMPLICIT_EXTERN_C): ... this, opposite sense.
11322 * doc/extend.texi (Backwards Compatibility): Clarify it is system
11323 headers affected by extern "C".
11324 * system.h: Poison NO_IMPLICIT_EXTERN_C.
11325 * config/alpha/alpha.h, config/arm/uclinux-elf.h,
11326 config/bfin/elf.h, config/cris/cris.h, config/darwin.h,
11327 config/dragonfly.h, config/freebsd.h, config/gnu-user.h,
11328 config/i386/cygming.h, config/i386/djgpp.h, config/i386/nto.h,
11329 config/ia64/hpux.h, config/lm32/lm32.h, config/lm32/uclinux-elf.h,
11330 config/lynx.h, config/mips/elf.h, config/mmix/mmix.h,
11331 config/netbsd.h, config/pa/pa-hpux.h, config/powerpcspe/sysv4.h,
11332 config/riscv/elf.h, config/rs6000/sysv4.h, config/rtems.h,
11333 config/s390/tpf.h, config/sh/newlib.h, config/sol2.h,
11334 config/sparc/openbsd64.h, config/sparc/sp-elf.h,
11335 config/sparc/sp64-elf.h, config/spu/spu.h,
11336 config/stormy16/stormy16.h, config/v850/v850.h,
11337 config/visium/visium.h, config/vx-common.h, config/xtensa/elf.h: Don't
11338 define NO_IMPLICIT_EXTERN_C.
11339 * config/rs6000/aix.h: Set SYSTEM_IMPLICIT_EXTERN_C.
11341 2018-07-05 Tamar Christina <tamar.christina@arm.com>
11344 * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
11345 instead of GET_MODE_SIZE when comparing Units.
11347 2018-07-05 Tamar Christina <tamar.christina@arm.com>
11350 * rtlanal.c (set_noop_p): Constrain on mode change,
11351 include hard-reg-set.h
11353 2018-07-05 Tamar Christina <tamar.christina@arm.com>
11355 * config/aarch64/aarch64.c (aarch64_expand_movmem): Fix mode size.
11357 2018-07-05 Jakub Jelinek <jakub@redhat.com>
11360 2018-07-04 Maxim Ostapenko <m.ostapenko@samsung.com>
11363 * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
11365 * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
11367 2018-07-04 Maxim Ostapenko <m.ostapenko@samsung.com>
11370 * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
11372 * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
11374 2018-07-04 Eric Botcazou <ebotcazou@adacore.com>
11376 PR middle-end/86380
11377 * expmed.c (choose_multiplier): Fix incorrect comparison with mask.
11379 2018-07-04 Aldy Hernandez <aldyh@redhat.com>
11381 * tree-vrp.c (extract_range_from_binary_expr_1): Initialize
11382 neg_*_op* variables.
11384 2018-07-04 Martin Liska <mliska@suse.cz>
11386 * tree-switch-conversion.c: Define
11387 max_ratio_for_speed and max_ratio_for_size constants.
11389 2018-07-04 Denys Vlasenko <dvlasenk@redhat.com>
11390 Martin Liska <mliska@suse.cz>
11392 PR middle-end/66240
11395 * common.opt: Rename align options with 'str_' prefix.
11396 * common/config/i386/i386-common.c (set_malign_value): New
11398 (ix86_handle_option): Use it to set -falign-* options/
11399 * config/aarch64/aarch64-protos.h (struct tune_params): Change
11400 type from int to string.
11401 * config/aarch64/aarch64.c: Update default values from int
11403 * config/alpha/alpha.c (alpha_override_options_after_change):
11405 * config/arm/arm.c (arm_override_options_after_change_1): Likewise.
11406 * config/i386/dragonfly.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
11407 max skip conditionally.
11408 * config/i386/freebsd.h (SUBALIGN_LOG): New.
11409 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
11410 max skip conditionally.
11411 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
11412 max skip conditionally.
11413 * config/i386/gnu-user.h (SUBALIGN_LOG): New.
11414 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
11415 max skip conditionally.
11416 * config/i386/i386.c (struct ptt): Change type from int to
11418 (ix86_default_align): Set default values.
11419 * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Print
11420 max skip conditionally.
11421 * config/i386/iamcu.h (SUBALIGN_LOG): New.
11422 (ASM_OUTPUT_MAX_SKIP_ALIGN):
11423 * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN):
11424 * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
11425 max skip conditionally.
11426 * config/i386/openbsdelf.h (SUBALIGN_LOG): New.
11427 (ASM_OUTPUT_MAX_SKIP_ALIGN) Print max skip conditionally.:
11428 * config/i386/x86-64.h (SUBALIGN_LOG): New.
11429 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
11430 max skip conditionally.
11431 (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
11432 * config/ia64/ia64.c (ia64_option_override): Set default values
11433 for alignment options.
11434 * config/m68k/m68k.c: Handle new str_align_* options.
11435 * config/mips/mips.c (mips_set_compression_mode): Change
11437 (mips_option_override): Set default values for options.
11438 * config/powerpcspe/powerpcspe.c (rs6000_option_override_internal):
11440 * config/rs6000/rs6000.c (rs6000_option_override_internal):
11442 * config/rx/rx.c (rx_option_override): Likewise.
11443 * config/rx/rx.h (JUMP_ALIGN): Use align_jumps_log.
11444 (LABEL_ALIGN): Use align_labels_log.
11445 (LOOP_ALIGN): Use align_loops_align.
11446 * config/s390/s390.c (s390_asm_output_function_label): Use new
11448 * config/sh/sh.c (sh_override_options_after_change):
11449 Change type of constants.
11450 * config/spu/spu.c (spu_sched_init): Likewise.
11451 * config/sparc/sparc.c (sparc_option_override): Set default
11452 values for options.
11453 * config/visium/visium.c (visium_option_override): Likewise.
11454 * config/visium/visium.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Do not
11455 emit p2align format with last argument if it's not needed.
11456 * doc/invoke.texi: Document extended format of -falign-*.
11457 * final.c: Use align_labels alignment.
11458 * flags.h (struct target_flag_state): Change type to use
11460 (struct align_flags_tuple): New.
11461 (struct align_flags): Likewise.
11462 (align_loops_log): Redefine macro to use new types.
11463 (align_loops_max_skip): Redefine macro to use new types.
11464 (align_jumps_log): Redefine macro to use new types.
11465 (align_jumps_max_skip): Redefine macro to use new types.
11466 (align_labels_log): Redefine macro to use new types.
11467 (align_labels_max_skip): Redefine macro to use new types.
11468 (align_functions_log): Redefine macro to use new types.
11469 (align_loops): Redefine macro to use new types.
11470 (align_jumps): Redefine macro to use new types.
11471 (align_labels): Redefine macro to use new types.
11472 (align_functions): Redefine macro to use new types.
11473 (align_functions_max_skip): Redefine macro to use new types.
11474 (align_loops_value): New macro.
11475 (align_jumps_value): New macro.
11476 (align_labels_value): New macro.
11477 (align_functions_value): New macro.
11478 * function.c (invoke_set_current_function_hook): Propagate
11479 alignment values from flags to global variables default in
11481 * ipa-icf.c (sem_function::equals_wpa): Use
11482 cl_optimization_option_eq instead of memcmp.
11483 * lto-streamer.h (cl_optimization_stream_out): Support streaming
11485 (cl_optimization_stream_in): Likewise.
11486 * optc-save-gen.awk: Support strings in cl_optimization.
11487 * opth-gen.awk: Likewise.
11488 * opts.c (finish_options): Remove error checking of invalid
11490 (MAX_CODE_ALIGN): Remove.
11491 (MAX_CODE_ALIGN_VALUE): Likewise.
11492 (parse_and_check_align_values): New function.
11493 (check_alignment_argument): Likewise.
11494 (common_handle_option): Use check_alignment_argument.
11495 * opts.h (parse_and_check_align_values): Declare.
11496 * toplev.c (init_alignments): Remove.
11497 (read_log_maxskip): New.
11498 (parse_N_M): Likewise.
11499 (parse_alignment_opts): Likewise.
11500 (backend_init_target): Remove usage of init_alignments.
11501 * toplev.h (parse_alignment_opts): Declare.
11502 * tree-streamer-in.c (streamer_read_tree_bitfields): Add new
11504 * tree-streamer-out.c (streamer_write_tree_bitfields): Likewise.
11505 * tree.c (cl_option_hasher::equal): New.
11506 * varasm.c: Use new global macros.
11508 2018-07-04 Denys Vlasenko <dvlasenk@redhat.com>
11510 * config/i386/dragonfly.h: (ASM_OUTPUT_MAX_SKIP_ALIGN):
11511 Use a simpler align directive also if MAXSKIP = ALIGN-1.
11512 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
11513 * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
11514 * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
11515 * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
11516 * config/i386/freebsd.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Remove "If N
11517 is large, do at least 8 byte alignment" code. Add SUBALIGN_LOG
11518 define. Use a simpler align directive also if MAXSKIP = ALIGN-1.
11519 * config/i386/gnu-user.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
11520 * config/i386/iamcu.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
11521 * config/i386/openbsdelf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
11522 * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
11524 2018-07-04 Martin Liska <mliska@suse.cz>
11525 Jonathan Wakely <jwakely@redhat.com>
11527 * coverage.c: Use correct type.
11528 * doc/invoke.texi: Language correction.
11530 2018-07-03 H.J. Lu <hongjiu.lu@intel.com>
11533 * config/i386/i386.c (rest_of_insert_endbranch): Also generate
11534 ENDBRANCH for non-tail call which may return via indirect branch.
11535 * doc/extend.texi: Document indirect_return attribute.
11537 2018-07-03 Martin Sebor <msebor@redhat.com>
11539 PR tree-optimization/86274
11540 * gimple-ssa-sprintf.c (fmtresult::type_max_digits): Verify
11542 (format_floating): Correct handling of infinities and NaNs.
11544 2018-07-03 Martin Sebor <msebor@redhat.com>
11546 * print-tree.c (print_real_cst): New function.
11547 (print_node_brief): Call it.
11548 (print_node): Ditto.
11550 2018-07-03 Jeff Law <law@redhat.com>
11552 * config/h8300/h8300.md (logical<mode>3_sn, logical<mode>3): Merge
11553 into a single pattern.
11555 * config/h8300/h8300.md (ors code_iterator): New.
11556 (bsetqi_msx, bnotqi_msx patterns and splitters): Consolidate into
11557 a single pattern and single splitter.
11558 (bsethi_msx, bnothi_msx patterns): Consolidate into a single pattern.
11559 (iorqi3_1, xorqi3_1): Likewise.
11560 (iorqi3, xorqi3 expanders): Similarly.
11562 * config/h8300/h8300.md (movmd_internal_normal): Consolidated with
11563 (movmd_internal) into a single pattern using the P mode iterator.
11564 (movmd splitters): Similarly.
11565 (stpcpy_internal_normal, stpcpy_internal): Similarly for thes patterns.
11566 (movsd splitters): Similarly.
11568 * config/h8300/h8300.c (h8300_insn_length_from_table): Consolidate
11569 ADDB, ADDW and ADDL into a single ADD attribute which selects the
11570 right table based on the size of the operand.
11571 * config/h8300/h8300.md (length_table): Corresponding changes. All
11572 references to "addb", "addw" and "addl" changed to "add".
11573 (btst patterns): Merge two variants into a single pattern.
11574 (tstqi, tsthi): Likewise.
11575 (addhi3_incdec, addsi3_incdec): Likewise.
11576 (subhi3_h8300hs, subsi3_h8300hs): Likewise.
11577 (mulhi3, mulsi3): Likewise.
11578 (udivhi3, udivsi3): Likewise.
11579 (divhi3, divsi3): Likewise.
11580 (andorqi3, andorhi3, andorsi3): Likewise.
11582 2018-07-03 Uros Bizjak <ubizjak@gmail.com>
11585 * config/i386/sse.md (uavg<mode>3_ceil): New expander.
11586 (<sse2_avx2>_uavg<mode>3<mask_name>): Simplify expander.
11588 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
11590 PR tree-optimization/85694
11591 * config/aarch64/iterators.md (HADD, RHADD): New int iterators.
11592 (u): Handle UNSPEC_SHADD, UNSPEC_UHADD, UNSPEC_SRHADD and
11594 * config/aarch64/aarch64-simd.md (<u>avg<mode>3_floor)
11595 (<u>avg<mode>3_ceil): New patterns.
11597 2018-07-03 David Malcolm <dmalcolm@redhat.com>
11599 * gcc.dg/vect/slp-perm-1.c: Remove "note: " prefix from
11600 scan-tree-dump directive.
11601 * gcc.dg/vect/slp-perm-2.c: Likewise.
11602 * gcc.dg/vect/slp-perm-3.c: Likewise.
11603 * gcc.dg/vect/slp-perm-5.c: Likewise.
11604 * gcc.dg/vect/slp-perm-6.c: Likewise.
11605 * gcc.dg/vect/slp-perm-7.c: Likewise.
11606 * gcc.dg/vect/slp-perm-8.c: Likewise.
11608 2018-07-03 Marek Polacek <polacek@redhat.com>
11610 PR middle-end/86202
11611 * gimple-fold.c (size_must_be_zero_p): Check the type of the size.
11613 2018-07-03 Richard Biener <rguenther@suse.de>
11616 * tree-ssa-structalias.c (find_func_clobbers): Properly
11617 handle indirect calls.
11619 2018-07-03 Jeff Law <law@redhat.com>
11621 * config/h8300/h8300.md (HSI, QHSI, QHSIF): New mode iterators.
11622 (shifts): New code iterator.
11623 (movqi, movhi, movsi, movsf expanders): Consolidate into a single
11624 expander. Fix HImode handling on H8/SX.
11625 (addqi3, addhi3, addsi3 expanders): Consolidate into a single expander.
11626 (subqi3, subhi3, subsi3 expanders): Likewise.
11627 (andqi3, andhi3, andsi3 expanders): Likewise.
11628 (iorqi3, iorhi3, iorsi3 expanders): Likewise.
11629 (xorqi3, xorhi3, xorsi3 expanders): Likewise.
11630 (negqi2, neghi2, negsi2, negsf2 expanders): Likewise.
11631 (one_cmplqi2, one_cmplhi2, one_cmplsi2): Likewise.
11632 (zero_extendqihi2, zero_extendqisi2): Likewise.
11633 (extendqihi2, extendqisi2): Likewise.
11634 (rotlqi3, rotlhi3, rotlsi3): Likewise.
11635 (neghi2_h8300, negsi2_h8300): Likewise for these patterns.
11636 (rotlqi3_1, rotlhi3_1): Likewise.
11637 (logicalhi3_sn, logicalsi3_sn): Likewise.
11638 (logicalhi3, logicalsi3): Likewise.
11640 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
11642 * tree-vect-patterns.c (vect_recog_rotate_pattern)
11643 (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
11644 (vect_recog_mixed_size_cond_pattern, adjust_bool_pattern_cast)
11645 (adjust_bool_pattern, vect_recog_bool_pattern): Pass the vector
11646 type to append_pattern_def_seq instead of creating a stmt_vec_info
11648 (build_mask_conversion): Likewise. Remove vinfo argument.
11649 (vect_add_conversion_to_patterm): Likewise, renaming to...
11650 (vect_add_conversion_to_pattern): ...this.
11651 (vect_recog_mask_conversion_pattern): Update call to
11652 build_mask_conversion. Pass the vector type to
11653 append_pattern_def_seq here too.
11654 (vect_recog_gather_scatter_pattern): Update call to
11655 vect_add_conversion_to_pattern.
11657 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
11659 * tree-vect-patterns.c (new_pattern_def_seq): Delete.
11660 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
11661 (vect_recog_widen_op_pattern, vect_recog_over_widening_pattern)
11662 (vect_recog_rotate_pattern, vect_synth_mult_by_constant): Don't set
11663 STMT_VINFO_PATTERN_DEF_SEQ to null here.
11664 (vect_recog_pow_pattern, vect_recog_vector_vector_shift_pattern)
11665 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern): Use
11666 append_pattern_def_seq instead of new_pattern_def_seq.
11667 (vect_recog_divmod_pattern): Do both of the above.
11668 (vect_pattern_recog_1): Assert that STMT_VINO_PATTERN_DEF_SEQ
11671 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
11673 * tree-vect-patterns.c (vect_recog_dot_prod_pattern):
11674 (vect_recog_sad_pattern, vect_recog_widen_op_pattern)
11675 (vect_recog_widen_mult_pattern, vect_recog_pow_pattern):
11676 (vect_recog_widen_sum_pattern, vect_recog_over_widening_pattern)
11677 (vect_recog_average_pattern, vect_recog_cast_forwprop_pattern)
11678 (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
11679 (vect_recog_vector_vector_shift_pattern, vect_synth_mult_by_constant)
11680 (vect_recog_mult_pattern, vect_recog_divmod_pattern)
11681 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
11682 (vect_recog_mask_conversion_pattern): Replace vec<gimple *>
11683 parameter with a single stmt_vec_info.
11684 (vect_recog_func_ptr): Likewise.
11685 (vect_recog_gather_scatter_pattern): Likewise, folding in...
11686 (vect_try_gather_scatter_pattern): ...this.
11687 (vect_pattern_recog_1): Remove stmts_to_replace and just pass
11688 the stmt_vec_info of the statement to be matched. Don't clear
11689 STMT_VINFO_RELATED_STMT.
11690 (vect_pattern_recog): Update call accordingly.
11692 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
11694 PR tree-optimization/85694
11695 * doc/md.texi (avgM3_floor, uavgM3_floor, avgM3_ceil)
11696 (uavgM3_ceil): Document new optabs.
11697 * doc/sourcebuild.texi (vect_avg_qi): Document new target selector.
11698 * internal-fn.def (IFN_AVG_FLOOR, IFN_AVG_CEIL): New internal
11700 * optabs.def (savg_floor_optab, uavg_floor_optab, savg_ceil_optab)
11701 (savg_ceil_optab): New optabs.
11702 * tree-vect-patterns.c (vect_recog_average_pattern): New function.
11703 (vect_vect_recog_func_ptrs): Add it.
11704 * tree-vect-stmts.c (vectorizable_call): Get the type of the zero
11705 constant directly from the associated lhs.
11707 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
11709 * tree-vect-patterns.c (vect_split_statement): New function.
11710 (vect_convert_input): Use it to try to split an existing cast.
11712 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
11714 * poly-int.h (print_hex): New function.
11715 * dumpfile.h (dump_dec, dump_hex): Declare.
11716 * dumpfile.c (dump_dec, dump_hex): New poly_wide_int functions.
11717 * tree-vectorizer.h (_stmt_vec_info): Add min_output_precision,
11718 min_input_precision, operation_precision and operation_sign.
11719 * tree-vect-patterns.c (vect_get_range_info): New function.
11720 (vect_same_loop_or_bb_p, vect_single_imm_use)
11721 (vect_operation_fits_smaller_type): Delete.
11722 (vect_look_through_possible_promotion): Add an optional
11723 single_use_p parameter.
11724 (vect_recog_over_widening_pattern): Rewrite to use new
11725 stmt_vec_info infomration. Handle one operation at a time.
11726 (vect_recog_cast_forwprop_pattern, vect_narrowable_type_p)
11727 (vect_truncatable_operation_p, vect_set_operation_type)
11728 (vect_set_min_input_precision): New functions.
11729 (vect_determine_min_output_precision_1): Likewise.
11730 (vect_determine_min_output_precision): Likewise.
11731 (vect_determine_precisions_from_range): Likewise.
11732 (vect_determine_precisions_from_users): Likewise.
11733 (vect_determine_stmt_precisions, vect_determine_precisions): Likewise.
11734 (vect_vect_recog_func_ptrs): Put over_widening first.
11736 (vect_pattern_recog): Call vect_determine_precisions.
11738 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
11740 * tree-vect-patterns.c (vect_mark_pattern_stmts): Remove pattern
11741 statements that have been replaced by further pattern statements.
11742 (vect_pattern_recog_1): Clear STMT_VINFO_PATTERN_DEF_SEQ on failure.
11744 2018-07-03 Richard Biener <rguenther@suse.de>
11746 * tree-vect-stmts.c (vect_is_simple_use): Consolidate dumping,
11747 always set *dt. Dump vectype in vectype overload.
11748 * dumpfile.h (dump_gimple_expr): New function.
11749 (dump_gimple_expr_loc): Likewise.
11750 * dumpfile.c (dump_gimple_expr): New function.
11751 (dump_gimple_expr_loc): Likewise.
11753 2018-07-02 Jeff Law <law@redhat.com>
11755 * config/h8300/h8300.md (movqi_h8300, movqi_h8300hs): Consolidate
11756 the H8/300, H8/300H and H8/S variants into a single pattern.
11757 (movhi_h8300, movqi_h8300hs): Similarly.
11758 (pushqi_h8300hs, pushhi_h8300hs): Consolidate into a single pattern.
11759 (QHI mode iterator): New.
11761 * config/h8300/h8300.md: Remove trailing whitespace.
11763 2018-07-02 Jim Wilson <jimw@sifive.com>
11765 * config/riscv/riscv.c (riscv_expand_epilogue): Use emit_jump_insn
11766 instead of emit_insn for interrupt returns.
11767 * config/riscv/riscv.md (riscv_met): Add (return) to rtl.
11768 (riscv_sret, riscv_uret): Likewise.
11770 2018-07-02 David Malcolm <dmalcolm@redhat.com>
11772 * pretty-print.c (selftest::test_pp_format): Move save and restore
11773 of quotes to class auto_fix_quotes, and add an instance.
11774 * selftest.c: Include "intl.h".
11775 (selftest::auto_fix_quotes::auto_fix_quotes): New ctor.
11776 (selftest::auto_fix_quotes::~auto_fix_quotes): New dtor.
11777 * selftest.h (selftest::auto_fix_quotes): New class.
11779 2018-07-02 Richard Henderson <richard.henderson@linaro.org>
11781 * config/aarch64/aarch64-protos.h, config/aarch64/aarch64.c
11782 (aarch64_sve_prepare_conditional_op): Remove.
11783 * config/aarch64/aarch64-sve.md (cond_<SVE_INT_BINARY><SVE_I>):
11784 Allow aarch64_simd_reg_or_zero as select operand; remove
11785 the aarch64_sve_prepare_conditional_op call.
11786 (cond_<SVE_INT_BINARY_SD><SVE_SDI>): Likewise.
11787 (cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
11788 (*cond_<SVE_INT_BINARY><SVE_I>_z): New pattern.
11789 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_z): New pattern.
11790 (*cond_<SVE_COND_FP_BINARY><SVE_F>_z): New pattern.
11791 (*cond_<SVE_INT_BINARY><SVE_I>_any): New pattern.
11792 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_any): New pattern.
11793 (*cond_<SVE_COND_FP_BINARY><SVE_F>_any): New pattern
11794 and a splitters to match all of the *_any patterns.
11795 * config/aarch64/predicates.md (aarch64_sve_any_binary_operator): New.
11797 * config/aarch64/iterators.md (SVE_INT_BINARY_REV): Remove.
11798 (SVE_COND_FP_BINARY_REV): Remove.
11799 (sve_int_op_rev, sve_fp_op_rev): New.
11800 * config/aarch64/aarch64-sve.md (*cond_<SVE_INT_BINARY><SVE_I>_0): New.
11801 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_0): New.
11802 (*cond_<SVE_COND_FP_BINARY><SVE_F>_0): New.
11803 (*cond_<SVE_INT_BINARY><SVE_I>_2): Rename, add movprfx alternative.
11804 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_2): Similarly.
11805 (*cond_<SVE_COND_FP_BINARY><SVE_F>_2): Similarly.
11806 (*cond_<SVE_INT_BINARY><SVE_I>_3): Similarly; use sve_int_op_rev.
11807 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_3): Similarly.
11808 (*cond_<SVE_COND_FP_BINARY><SVE_F>_3): Similarly; use sve_fp_op_rev.
11810 * config/aarch64/aarch64-sve.md (cond_<SVE_COND_FP_BINARY><SVE_F>):
11811 Remove match_dup 1 from the inner unspec.
11812 (*cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
11814 * config/aarch64/aarch64.md (movprfx): New attr.
11815 (length): Default movprfx to 8.
11816 * config/aarch64/aarch64-sve.md (*mul<SVE_I>3): Add movprfx alt.
11817 (*madd<SVE_I>, *msub<SVE_I): Likewise.
11818 (*<su>mul<SVE_I>3_highpart): Likewise.
11819 (*<SVE_INT_BINARY_SD><SVE_SDI>3): Likewise.
11820 (*v<ASHIFT><SVE_I>3): Likewise.
11821 (*<su><MAXMIN><SVE_I>3): Likewise.
11822 (*<su><MAXMIN><SVE_F>3): Likewise.
11823 (*fma<SVE_F>4, *fnma<SVE_F>4): Likewise.
11824 (*fms<SVE_F>4, *fnms<SVE_F>4): Likewise.
11825 (*div<SVE_F>4): Likewise.
11827 2018-07-02 Richard Sandiford <richard.sandiford@arm.com>
11829 * tree-vect-patterns.c (vect_recog_widen_shift_pattern): Fix typo
11832 2018-07-02 Richard Biener <rguenther@suse.de>
11834 PR tree-optimization/86363
11835 * tree-ssa-sccvn.c (vn_reference_lookup_3): Check the
11836 memset argument refers to a non-variable address.
11838 2018-07-02 Aldy Hernandez <aldyh@redhat.com>
11840 * tree-vrp.c (extract_range_from_binary_expr_1): Abstract a lot of the
11841 {PLUS,MINUS}_EXPR code to...
11842 (adjust_symbolic_bound): ...here,
11843 (combine_bound): ...here,
11844 (set_value_range_with_overflow): ...and here.
11846 2018-07-02 Aldy Hernandez <aldyh@redhat.com>
11848 * tree-vrp.c (extract_range_from_unary_expr): Abstract ABS_EXPR
11850 (extract_range_from_abs_expr): ...here.
11852 2018-07-02 Eric Botcazou <ebotcazou@adacore.com>
11854 * config/i386/i386.c (ix86_finalize_stack_frame_flags): Do not overrule
11855 -fno-omit-frame-pointer when not optimizing.
11857 2018-07-02 Martin Liska <mliska@suse.cz>
11860 * ipa-pure-const.c (malloc_candidate_p): Revert usage of ::get.
11861 (propagate_nothrow): Likewise.
11863 2018-07-02 Martin Liska <mliska@suse.cz>
11866 * ipa-inline.c (early_inliner): Revert wrongly added ::get call.
11868 2018-07-02 David Malcolm <dmalcolm@redhat.com>
11870 * dumpfile.c (dump_generic_expr_loc): Undo removal of this
11871 function in r262149, changing "loc" param from source_location to
11872 const dump_location_t &.
11873 * dumpfile.h (dump_generic_expr_loc): Undo removal of this
11874 declaration, as above.
11876 2018-07-01 Paul Koning <ni1d@arrl.net>
11878 * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
11879 -munit-asm, -mgnu-asm, -mdec-asm.
11880 * config/pdp11/pdp11-protos.h (pdp11_gen_int_label): New.
11881 (pdp11_output_labelref): New.
11882 (pdp11_output_def): New.
11883 (pdp11_output_addr_vec_elt): New.
11884 * config/pdp11/pdp11.c: Use tab between opcode and operands. Use
11885 %# and %@ format codes.
11886 (pdp11_option_override): New.
11887 (TARGET_ASM_FILE_START_FILE_DIRECTIVE): Define.
11888 (pdp11_output_ident): New.
11889 (pdp11_asm_named_section): New.
11890 (pdp11_asm_init_sections): New.
11891 (pdp11_file_start): New.
11892 (pdp11_file_end): New.
11893 (output_ascii): Use .ascii/.asciz for -mdec-asm.
11894 (pdp11_asm_print_operand): Update %# and %$ for -mdec-asm. Add
11895 %o, like %c but octal.
11896 (pdp11_option_override): New.
11897 * config/pdp11/pdp11.h (TEXT_SECTION_ASM_OP): Update for
11899 (DATA_SECTION_ASM_OP): Ditto.
11900 (READONLY_DATA_SECTION_ASM_OP): New.
11901 (IS_ASM_LOGICAL_LINE_SEPARATOR): New.
11902 (ASM_GENERATE_INTERNAL_LABEL): Use new function.
11903 (ASM_OUTPUT_LABELREF): Ditto.
11904 (ASM_OUTPUT_DEF): Ditto.
11905 (ASM_OUTPUT_EXTERNAL): New.
11906 (ASM_OUTPUT_SOURCE_FILENAME): New.
11907 (ASM_OUTPUT_ADDR_VEC_ELT): Use new function.
11908 (ASM_OUTPUT_SKIP): Update for -mdec-asm.
11909 * config/pdp11/pdp11.md: Use tab between opcode and operands. Use
11910 %# and %@ format codes.
11911 * config/pdp11/pdp11.opt (mgnu-asm): New.
11912 (mdec-asm): Conflicts with -mgnu-asm and -munix-asm.
11913 (munix-asm): Conflicts with -mdec-asm and -mgnu-asm.
11914 * doc/invoke.txt (PDP-11 Options): Add -mgnu-asm.
11916 2018-07-01 Aldy Hernandez <aldyh@redhat.com>
11918 * tree-ssa-threadupdate.c (mark_threaded_blocks): Avoid
11919 dereferencing path[] beyond its length.
11921 (debug_all_paths): New.
11922 (rewire_first_differing_edge): New.
11923 (adjust_paths_after_duplication): New.
11924 (duplicate_thread_path): Call adjust_paths_after_duplication.
11926 (thread_through_all_blocks): Add new argument to
11927 duplicate_thread_path.
11929 2018-06-30 Jim Wilson <jimw@sifive.com>
11931 * config/riscv/predicates.md (p2m1_shift_operand): New.
11932 (high_mask_shift_operand): New.
11933 * config/riscv/riscv.md (lshrsi3_zero_extend_3+1): New combiner
11934 pattern using p2m1_shift_operand.
11935 (lshsi3_zero_extend_3+2): New combiner pattern using
11936 high_mask_shift_operand.
11938 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
11940 * tree-vect-patterns.c (vect_get_external_def_edge): New function,
11942 (vect_recog_rotate_pattern): ...here.
11943 (vect_convert_input): Try to insert casts of invariants in the
11945 * tree-vect-loop-manip.c (vect_loop_versioning): Don't require the
11946 preheader to be empty.
11948 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
11950 * tree-vect-patterns.c (append_pattern_def_seq): Take an optional
11951 vector type. If given, install it in the new statement's
11952 STMT_VINFO_VECTYPE.
11953 (vect_element_precision): New function.
11954 (vect_unpromoted_value): New struct.
11955 (vect_unpromoted_value::vect_unpromoted_value): New function.
11956 (vect_unpromoted_value::set_op): Likewise.
11957 (vect_look_through_possible_promotion): Likewise.
11958 (vect_joust_widened_integer, vect_joust_widened_type): Likewise.
11959 (vect_widened_op_tree, vect_convert_input): Likewise.
11960 (vect_convert_inputs, vect_convert_output): Likewise.
11961 (vect_recog_dot_prod_pattern): Use vect_look_through_possible_promotion
11962 to handle the optional cast of the multiplication result and
11963 vect_widened_op_tree to detect the widened multiplication itself.
11964 Do not require the input and output of promotion casts to have
11965 the same sign, but base the signedness of the operation on the
11966 input rather than the result. If the pattern includes two
11967 promotions, check that those promotions have the same sign.
11968 Do not restrict the MULT_EXPR handling to a double-width result;
11969 handle quadruple-width results and wider. Use vect_convert_inputs
11970 to convert the inputs to the common type.
11971 (vect_recog_sad_pattern): Use vect_look_through_possible_promotion
11972 to handle the optional cast of the ABS result. Also allow a sign
11973 change or a sign extension between the ABS and MINUS.
11974 Use vect_widened_op_tree to detect the widened subtraction and use
11975 vect_convert_inputs to convert the inputs to the common type.
11976 (vect_handle_widen_op_by_const): Delete.
11977 (vect_recog_widen_op_pattern): New function.
11978 (vect_recog_widen_mult_pattern): Use it.
11979 (vect_recog_widen_shift_pattern): Likewise.
11980 (vect_recog_widen_sum_pattern): Use
11981 vect_look_through_possible_promotion to handle the promoted
11984 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
11986 * gimple-iterator.c (gsi_for_stmt): Add a new overload that takes
11987 the containing gimple_seq *.
11988 * gimple-iterator.h (gsi_for_stmt): Declare it.
11989 * tree-vect-patterns.c (vect_recog_dot_prod_pattern)
11990 (vect_recog_sad_pattern, vect_recog_widen_sum_pattern)
11991 (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
11992 (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
11993 (vect_recog_mask_conversion_pattern): Remove STMT_VINFO_IN_PATTERN_P
11995 (vect_init_pattern_stmt, vect_set_pattern_stmt): New functions,
11997 (vect_mark_pattern_stmts): ...here. Handle cases in which the
11998 statement being replaced is part of an existing pattern
11999 definition sequence, inserting the new pattern statements before
12001 (vect_pattern_recog_1): Don't return a bool. If the statement
12002 is already part of a pattern, instead apply pattern matching
12003 to the pattern definition statements. Don't clear the
12004 STMT_VINFO_RELATED_STMT if is_pattern_stmt_p.
12005 (vect_pattern_recog): Don't break after the first match;
12006 continue processing the pattern definition statements instead.
12007 Don't bail out for STMT_VINFO_IN_PATTERN_P here.
12009 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
12011 * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
12012 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
12013 (vect_recog_widen_sum_pattern): Use it.
12015 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
12017 * tree-vect-loop.c (vectorizable_reduction): Assert that the
12018 phi is not a pattern statement and has not been replaced by
12019 a pattern statement.
12020 * tree-vect-patterns.c (type_conversion_p): Don't check
12021 STMT_VINFO_IN_PATTERN_P.
12022 (vect_recog_vector_vector_shift_pattern): Likewise.
12023 (vect_recog_dot_prod_pattern): Expect vect_is_simple_use to return
12024 the pattern statement rather than the original statement; check
12025 directly for a WIDEN_MULT_EXPR here.
12026 * tree-vect-slp.c (vect_get_and_check_slp_defs): Expect
12027 vect_is_simple_use to return the pattern statement rather
12028 than the original statement; use is_pattern_stmt_p to check
12029 for such a pattern statement.
12030 * tree-vect-stmts.c (process_use): Expect vect_is_simple_use
12031 to return the pattern statement rather than the original statement;
12032 don't do the same transformation here.
12033 (vect_is_simple_use): If the defining statement has been replaced
12034 by a pattern statement, return the pattern statement instead.
12035 Remove the corresponding (local) transformation from the vectype
12038 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
12040 * tree-vectorizer.h (vect_is_simple_use): Move the gimple ** to the
12041 end and default to null.
12042 * tree-vect-loop.c (vect_create_epilog_for_reduction)
12043 (vectorizable_reduction): Update calls accordingly, dropping the
12044 gimple ** argument if the passed-back statement isn't needed.
12045 * tree-vect-patterns.c (vect_get_internal_def, type_conversion_p)
12046 (vect_recog_rotate_pattern): Likewise.
12047 (vect_recog_mask_conversion_pattern): Likewise.
12048 * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
12049 (vect_mask_constant_operand_p): Likewise.
12050 * tree-vect-stmts.c (is_simple_and_all_uses_invariant, process_use):
12051 (vect_model_simple_cost, vect_get_vec_def_for_operand): Likewise.
12052 (get_group_load_store_type, get_load_store_type): Likewise.
12053 (vect_check_load_store_mask, vect_check_store_rhs): Likewise.
12054 (vectorizable_call, vectorizable_simd_clone_call): Likewise.
12055 (vectorizable_conversion, vectorizable_assignment): Likewise.
12056 (vectorizable_shift, vectorizable_operation): Likewise.
12057 (vectorizable_store, vect_is_simple_cond): Likewise.
12058 (vectorizable_condition, vectorizable_comparison): Likewise.
12059 (get_same_sized_vectype, vect_get_mask_type_for_stmt): Likewise.
12060 (vect_is_simple_use): Rename the def_stmt argument to def_stmt_out
12061 and move it to the end. Cope with null def_stmt_outs.
12063 2018-06-30 Bernd Edlinger <bernd.edlinger@hotmail.de>
12065 * Makefile.in (FLAGS_TO_PASS): Add RANLIB_FOR_TARGET.
12067 2018-06-29 Jeff Law <law@redhat.com>
12069 * config/v850/v850.c (v850_legitimate_address_p): Handle large
12070 displacements for TARGET_V850E2V3 and newer.
12071 (TARGET_LRA_P): Remove. Defaults to LRA now.
12072 * config/v850/v850.md (sign23byte_load): Remove.
12073 (unsign23byte_load, sign23hword_load, unsign23hword_load): Likewise.
12074 (23word_load, 23byte_store, 23hword_store, 23word_store): Likewise.
12076 2018-06-29 Martin Liska <mliska@suse.cz>
12079 * coverage.c (coverage_init): Mangle full path name.
12080 * doc/invoke.texi: Document the change.
12081 * gcov-io.c (mangle_path): New.
12082 * gcov-io.h (mangle_path): Likewise.
12083 * gcov.c (mangle_name): Use mangle_path for path mangling.
12085 2018-06-29 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
12087 * config/arm/arm.c (output_move_double): Don't allow STRD instructions
12088 if starting source register is not even.
12090 2018-06-29 Martin Liska <mliska@suse.cz>
12092 PR tree-optimization/86263
12093 * tree-switch-conversion.c (switch_decision_tree::try_switch_expansion):
12094 Make edge redirection.
12096 2018-06-29 David Malcolm <dmalcolm@redhat.com>
12098 * dumpfile.c (dump_loc): Add indentation based on scope depth.
12099 (dump_scope_depth): New variable.
12100 (get_dump_scope_depth): New function.
12101 (dump_begin_scope): New function.
12102 (dump_end_scope): New function.
12103 * dumpfile.h (get_dump_scope_depth): New declaration.
12104 (dump_begin_scope): New declaration.
12105 (dump_end_scope): New declaration.
12106 (class auto_dump_scope): New class.
12107 (AUTO_DUMP_SCOPE): New macro.
12108 * tree-vectorizer.h (DUMP_VECT_SCOPE): Reimplement in terms of
12111 2018-06-29 Richard Biener <rguenther@suse.de>
12113 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences): Assert
12114 compute_all_dependences succeeds.
12115 * tree-vect-loop.c (vect_get_datarefs_in_loop): Fail early if we
12116 exceed --param loop-max-datarefs-for-datadeps.
12118 2018-06-29 Jakub Jelinek <jakub@redhat.com>
12120 * config/rs6000/t-rs6000: Append rs6000-modes.h to TM_H.
12122 2018-06-28 Uros Bizjak <ubizjak@gmail.com>
12125 * config/i386/sse.md (*vec_extractv4si_0_zext_sse4): Use
12126 alternative 0 in preferred_for_speed attribute.
12128 2018-06-28 Paul Koning <ni1d@arrl.net>
12130 * config/pdp11/pdp11-protos.h (pdp11_shift_length): New function.
12131 * config/pdp11/pdp11.c (pdp11_shift_length): New function.
12132 * config/pdp11/pdp11.h (ADJUST_INSN_LENGTH): Remove.
12133 * config/pdp11/pdp11.md: Correct "length" attribute calculation
12134 for shift insn patterns.
12136 2018-06-28 David Malcolm <dmalcolm@redhat.com>
12138 * cgraph.c (cgraph_node::get_body): Replace assignments to
12139 "dump_file" with calls to set_dump_file.
12140 * dumpfile.c (alt_dump_file): Make static, and group with...
12141 (alt_flags): ...this definition.
12142 (dumps_are_enabled): New variable.
12143 (refresh_dumps_are_enabled): New function.
12144 (set_dump_file): New function.
12145 (set_alt_dump_file): New function.
12146 (gcc::dump_manager::dump_start): Replace assignments to
12147 "dump_file" and "alt_dump_file" with calls to set_dump_file and
12149 (gcc::dump_manager::dump_finish): Likewise.
12150 * dumpfile.h (alt_dump_file): Delete decl.
12151 (dumps_are_enabled): New variable decl.
12152 (set_dump_file): New function decl.
12153 (dump_enabled_p): Rewrite in terms of new "dumps_are_enabled"
12155 * tree-nested.c (lower_nested_functions): Replace assignments to
12156 "dump_file" with calls to set_dump_file.
12158 2018-06-28 Eric Botcazou <ebotcazou@adacore.com>
12160 * tree-cfg.c (verify_gimple_in_cfg): Call verify_location on the
12161 goto_locus of each outgoing edge of each basic block.
12163 2018-06-28 Richard Biener <rguenther@suse.de>
12165 * dwarf2out.c (decl_scope_table): Remove.
12166 (push_decl_scope): Likewise.
12167 (pop_decl_scope): Likewise.
12168 (gen_type_die_for_member): Do not call push/pop_decl_scope.
12169 (gen_struct_or_union_type_die): Likewise.
12170 (gen_tagged_type_die): Likewise.
12171 (dwarf2out_init): Do not initialize decl_scope_table.
12172 (dwarf2out_c_finalize): Do not free it.
12174 2018-06-28 Richard Biener <rguenther@suse.de>
12176 * dwarf2out.c (gen_subprogram_die): Use is_unit_die when
12177 deciding whether to not re-use a DIE.
12179 2018-06-28 Richard Biener <rguenther@suse.de>
12181 * dwarf2out.c (gen_subprogram_die): Always re-use DIEs with an
12182 DW_AT_abstract_origin attribute.
12184 2018-06-28 Martin Liska <mliska@suse.cz>
12186 * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
12187 Use newly introduced constants.
12188 * tree-switch-conversion.h (struct jump_table_cluster):
12189 Define max_ratio_for_size and max_ratio_for_speed.
12191 2018-06-28 Martin Liska <mliska@suse.cz>
12193 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
12194 Add new checking assert to catch invalid state.
12195 (jump_table_cluster::can_be_handled): Handle single case
12197 (jump_table_cluster::is_beneficial): Bail out for such case.
12198 (bit_test_cluster::find_bit_tests):
12199 Add new checking assert to catch invalid state.
12200 (bit_test_cluster::can_be_handled): Handle single case
12202 (bit_test_cluster::is_beneficial): Bail out for such case.
12203 (switch_decision_tree::analyze_switch_statement):
12206 2018-06-28 Martin Liska <mliska@suse.cz>
12208 * common.opt: Introduce -completion option.
12209 * gcc.c (driver_handle_option): Handle it.
12210 (driver::main): Print completions if completion
12212 * opt-suggestions.c (option_proposer::get_completions):
12214 (option_proposer::suggest_completion): Likewise.
12215 (option_proposer::find_param_completions): Likewise.
12216 (verify_autocompletions): Likewise.
12217 (test_completion_valid_options): Likewise.
12218 (test_completion_valid_params): Likewise.
12219 (in_completion_p): Likewise.
12220 (empty_completion_p): Likewise.
12221 (test_completion_partial_match): Likewise.
12222 (test_completion_garbage): Likewise.
12223 (opt_proposer_c_tests): Likewise.
12224 * opt-suggestions.h: Declare new functions.
12225 * opts.c (common_handle_option): Handle OPT__completion_.
12226 * selftest-run-tests.c (selftest::run_tests): Add
12227 opt_proposer_c_tests.
12228 * selftest.c (assert_str_startswith): New.
12229 * selftest.h (assert_str_startswith): Likewise.
12230 (opt_proposer_c_tests): New.
12231 (ASSERT_STR_STARTSWITH): Likewise.
12233 2018-06-28 Martin Liska <mliska@suse.cz>
12235 * Makefile.in: Add opt-suggestions.o.
12236 * gcc-main.c: Include opt-suggestions.h.
12237 * gcc.c (driver::driver): Likewise.
12238 (driver::~driver): Remove m_option_suggestions.
12239 (driver::build_option_suggestions): Moved to option_proposer.
12240 (driver::suggest_option): Likewise.
12241 (driver::handle_unrecognized_options): Use option_proposer.
12242 * gcc.h (class driver): Add new memver m_option_proposer.
12243 * opt-suggestions.c: New file.
12244 * opt-suggestions.h: New file.
12246 2018-06-28 Martin Liska <mliska@suse.cz>
12248 * vec.h (class auto_string_vec): New (moved from auto_argvec).
12249 (auto_string_vec::~auto_string_vec): Likewise.
12251 2018-06-28 Eric Botcazou <ebotcazou@adacore.com>
12253 * tree-inline.h (struct copy_body_data): Move remapping_type_depth and
12254 prevent_decl_creation_for_types fields up and add reset_location field.
12255 * tree-inline.c (remap_gimple_stmt): Force input_location on the new
12256 statement if id->reset_location is true.
12257 (copy_edges_for_bb): Do not set goto_locus on the new edges if
12258 id->reset_location is true.
12259 (copy_phis_for_bb): Force input_location on the arguments if
12260 id->reset_location is true.
12261 (expand_call_inline): Set id->reset_location if DECL_IGNORED_P
12262 is set on the function to be inlined.
12264 2018-06-27 Stephan Bergmann <sbergman@redhat.com>
12266 * doc/invoke.texi (Debugging Options): Add -gsplit-dwarf.
12268 2018-06-27 Dimitar Dimitrov <dimitar@dinux.eu>
12270 * lra-eliminations.c (update_reg_eliminate): Mark all spanning hard
12271 registers for Pmode.
12272 * lra-lives.c (check_pseudos_live_through_calls): Mark all spanning
12273 hard registers for the clobbered pseudo.
12275 2018-06-27 Paul Koning <ni1d@arrl.net>
12277 * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
12278 mutually exclusive options.
12279 * config/pdp11/constraints.md (h): New constraint.
12280 (O): Update definition to match shift code generation.
12281 (D): New constraint.
12282 * config/pdp11/pdp11-modes.def (CCNZ): Define mode.
12284 * config/pdp11/pdp11-protos.h (int_no_side_effect_operand): New
12286 (output_jump): Change arguments.
12287 (pdp11_fixed_cc_regs): New function.
12288 (pdp11_cc_mode): Ditto.
12289 (pdp11_expand_shift): Ditto.
12290 (pdp11_assemble_shift): Ditto.
12291 (pdp11_small_shift): Ditto.
12292 (pdp11_branch_cost): Remove.
12293 * config/pdp11/pdp11.c (pdp11_assemble_integer): Remove comments
12295 (pdp11_register_move_cost): Update for CC registers.
12296 (pdp11_rtx_costs): Add case for LSHIFTRT.
12297 (pdp11_output_jump): Add CCNZ mode conditional branches.
12298 (notice_update_cc_on_set): Remove.
12299 (pdp11_cc_mode): New function.
12300 (simple_memory_operand): Correct pre/post decrement case.
12301 (no_side_effect_operand): New function.
12302 (pdp11_regno_reg_class): Add CC_REGS class.
12303 (pdp11_fixed_cc_regs): New function.
12304 (pdp11_small_shift): New function.
12305 (pdp11_expand_shift): New function to expand shift insns.
12306 (pdp11_assemble_shift): New function to output shifts.
12307 (pdp11_branch_cost): Remove.
12308 (pdp11_modes_tieable_p): Make QI/HI modes tieable.
12309 * config/pdp11/pdp11.h (SIZE_TYPE): Ensure 16-bit type.
12310 (WCHAR_TYPE): Ditto.
12311 (PTRDIFF_TYPE): Ditto.
12312 (ADJUST_INSN_LENGTH): New macro.
12313 (FIXED_REGISTERS): Add CC registers.
12314 (CALL_USED_REGISTERS): Ditto.
12315 (reg_class): Ditto.
12316 (REG_CLASS_NAMES): Ditto.
12317 (REG_CLASS_CONTENTS): Ditto.
12318 (SELECT_CC_MODE): Use new function.
12319 (TARGET_FLAGS_REGNUM): New macro.
12320 (TARGET_FIXED_CONDITION_CODE_REGS): Ditto.
12321 (cc0_reg_rtx): Remove.
12322 (CC_STATUS_MDEP): Remove.
12323 (CC_STATUS_MDEFP_INIT): Remove.
12324 (CC_IN_FPU): Remove.
12325 (NOTICE_UPDATE_CC): Remove.
12326 (REGISTER_NAMES): Add CC registers.
12327 (BRANCH_COST): Change to constant 1.
12328 * config/pdp11/pdp11.md: Rewrite for CCmode condition code
12330 * config/pdp11/pdp11.opt (mbcopy): Remove.
12331 (mbcopy-builtin): Remove.
12332 (mbranch-cheap): Remove.
12333 (mbranch-expensive): Remove.
12334 * config/pdp11/predicates.md (expand_shift_operand): Update to
12335 match shift code generation.
12336 (ccnz_operator): New predicate.
12337 * doc/invoke.texi (PDP-11 Options): Remove deleted options
12338 -mbcopy, -mbcopy-builtin, -mbranch-cheap, -mbranch-expensive.
12339 Remove non-existent option -mabshi, -mno-abshi. Document mutually
12341 * doc/md.texi (PDP-11): Document new D and h constraints. Update
12342 description of O constraint.
12344 2018-06-27 Jeff Law <law@redhat.com>
12345 Austin Law <austinklaw@gmail.com>
12347 * config/v850/v850.md (addsi3_set_flags): New pattern.
12348 (subsi3_set_flags, negsi2_set_flags, andsi3_set_flags): Likewise.
12349 (iorsi3_set_flags, xorsi3_set_flags, one_cmplsi2_set_flags): Likewise.
12350 (zero_extendhisi2_v850_set_flags): Likewise.
12351 (zero_extendqisi2_v850_set_flags): Likewise.
12352 (ashlsi3_set_flags, ashlsi3_v850e2_set_flags): Likewise.
12353 (lshrsi3_set_flags, lshrsi3_v850e2_set_flags): Likewise.
12354 (ashrsi3_set_flags, ashrsi3_v850e2_set_flags): Likewise.
12356 * config/v850/v850-protos.h (notice_update_cc): Remove.
12357 * config/v850/v850.c (v850_compare_op0, v850_compare_op1): Remove.
12358 (v850_print_operand): Handle 'D' and "d".
12359 (v850_select_cc_mode): Remove ATTRIBUTE_UNUSED for last argument.
12360 Add handling of arithmetic/logical operations compared against zero.
12361 (v850_gen_float_compare): Remove ATTRIBUTE_UNUSED for last argument.
12362 Do not look at v850_compare_op, instead get mode from last argument.
12363 (v850_gen_compare): Remove
12364 (increment_stack): Use addsi3_clobber_flags to avoid splitting failure
12365 after reload for prologue insns.
12366 (expand_prologue): Account for CLOBBER of CC_REGNUM in various
12368 (construct_save_jarl): Likewise.
12369 (TARGET_FLAGS_REGNUM): Define.
12370 * config/v850/v850.h (v850_compare_op0, v850_compare_op1): Remove.
12371 (NOTICE_UPDATE_CC): Remove.
12372 * config/v850/v850.md (v850_tst1): Use (reg:CCZ CC_REGNUM) rather
12373 than cc0. Conditionalize on reload_completed.
12374 (cmpsi_insn, setfcc_insn): Likewise.
12375 (tst1 splitter): Turn into define_and_split which sets the flags
12377 (cstoresi4, cbranchsf4, cbranchdf4, cbranchsi4_insn): Likewise.
12378 (cbranchsi4, branch_normal, branch_invert): Do not expose cc0 here.
12379 (cstoresf4, cstoredf4): Clobber the flags.
12380 (cmpsi, cmpsf, cmpdf): Remove expanders.
12381 (setf_insn): Remove pattern.
12382 (addsi3): Turn into define_and_split which clobbers the flags after
12383 reload and a suitable pattern (addsi3_clobber_flags) for use after
12385 (subsi3, negsi2, andsi3, iorsi3, xorsi3, one_cmplsi2) Likewise.
12386 (ashlsi3, ashlsi3_v850e2, lshrsi3, lsh4si3_v850e2): Likewise.
12387 (ashrsi3, ashrsi3_v850e2): Likewise.
12388 (bins): Clobber the flags.
12389 (movsicc_normal_cc, movsicc_normal, movsicc_tst1): Likewise.
12390 (movsicc_tst1_revesed, sasf, swap and rotate patterns): Likewise.
12391 (fix_loop_counter, call_internal_short, call_internal_long): Likewise.
12392 (call_value_internal_short, call_value_internal_long): Likewise.
12393 (callt_save_interrupt, callt_return_interrupt): Likewise.
12394 (save_interrupt, return_interrupt): Likewise.
12395 (callt_save_all_interrupt, save_all_interrupt): Likewise.
12396 (_save_all_interrupt, callt_restore_all_interrupt): Likewise.
12397 (restore_all_interrupt, _restore_all_interrupt): Likewise.
12398 (All FP comparisons): Only allow after reload has completed.
12400 (divh, divhu): Tweak output template.
12401 (branch_z_normal, branch_z_invert): Remove
12402 (branch_nz_normal, branch_nz_invert): Likewise.
12403 (extendhisi_insn, extendqisi_insn): Do not clobber flags.
12405 * config/v850/v850-modes.def (CCZ, CCNZ): Add new modes.
12406 * config/v850/v850.c (notice_update_cc): Remove.
12407 * config/v850/v850.h (CC_OVERFLOW_UNUSABLE): Remove
12408 (CC_NO_CARRY): Likewise.
12409 (NOTICE_UPDATE_CC): Define to nothing.
12410 * config/v850/v850.md: Remove block comment on cc0 handling
12411 Remove "cc" attribute from all patterns. Remove cc_status handling
12412 from all patterns. Minor formatting fixes.
12414 2018-06-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
12416 * config/aarch64/aarch64-cores.def (cortex-a76): New entry.
12417 (cortex-a76.cortex-a55): Likewise.
12418 * config/aarch64/aarch64-tune.md: Regenerate.
12419 * doc/invoke.texi (AArch64 Options): Document cortex-a76 and
12420 cortex-a76.cortex-a55.
12422 2018-06-27 Jeff Law <law@redhat.com>
12424 * config/v850/t-v850 (MULTILIB_OPTIONS): Remove 8byte-align.
12425 (MULTILIB_DIRNAMES): Similarly.
12427 2018-06-27 Eric Botcazou <ebotcazou@adacore.com>
12429 * gimple.h (gimple_return_retbnd): Delete.
12430 (gimple_return_set_retbnd): Likewise.
12431 * cgraphunit.c (cgraph_node::expand_thunk): Remove call to
12432 gimple_return_set_retbnd.
12433 * gimple-pretty-print.c (dump_gimple_return): Remove call to
12434 gimple_return_retbnd and adjust.
12435 * tree-inline.h (struct copy_body_data): Remove retbnd field.
12436 * tree-inline.c (remap_gimple_stmt): Remove handling of retbnd.
12437 Explicitly return NULL in a couple more cases. Move assertion
12438 on debug statements and remove unreachable code.
12439 (reset_debug_binding): Do not test id->retbnd.
12440 (expand_call_inline): Do not set it.
12442 2018-06-27 Rasmus Villemoes <rv@rasmusvillemoes.dk>
12444 * configure.ac: Add --disable-gcov option.
12445 * configure: Regenerate.
12446 * Makefile.in: Honour @enable_gcov@.
12447 * doc/install.texi: Document --disable-gcov.
12449 2018-06-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
12451 * config/arm/arm-cpus.in (cortex-a76): New entry.
12452 (cortex-a76.cortex-a55): Likewise.
12453 * config/arm/arm-tables.opt: Regenerate.
12454 * config/arm/arm-tune.md: Likewise.
12455 * config/arm/driver-arm.c (arm_cpu_table): Add Cortex-A76 entry.
12456 * doc/invoke.texi (ARM Options): Document cortex-a76 and
12457 cortex-a76.cortex-a55.
12459 2018-06-27 Tamar Christina <tamar.christina@arm.com>
12462 * config/aarch64/aarch64.md (*movhf_aarch64): Add dup v0.4h pattern.
12464 2018-06-27 Siddhesh Poyarekar <siddhesh@sourceware.org>
12466 * config/aarch64/aarch64.h (CALL_USE_REGISTERS): Fix obsolete
12468 (EPILOGUE_USES): Likewise.
12470 2018-06-26 Eric Botcazou <ebotcazou@adacore.com>
12472 * tree-inline.c (remap_location): New function extracted from...
12473 (copy_edges_for_bb): Add ID parameter. Remap goto_locus.
12474 (copy_phis_for_bb): ...here. Call remap_location.
12475 (copy_cfg_body): Adjust call to copy_edges_for_bb.
12477 2018-06-26 Aaron Sawdey <acsawdey@linux.ibm.com>
12479 * config/rs6000/rs6000-string.c (expand_block_clear): Don't use
12480 unaligned vsx for 16B memset.
12482 2018-06-26 Segher Boessenkool <segher@kernel.crashing.org>
12485 * config/rs6000/rs6000.c (rs6000_init_builtins): Do not set
12486 ieee128_float_type_node to long_double_type_node unless
12487 TARGET_LONG_DOUBLE_128 is set.
12489 2018-06-26 David Malcolm <dmalcolm@redhat.com>
12491 * cfgloop.c (get_loop_location): Convert return type from
12492 location_t to dump_user_location_t, replacing INSN_LOCATION lookups
12493 by implicit construction from rtx_insn *, and using
12494 dump_user_location_t::from_function_decl for the fallback case.
12495 * cfgloop.h (get_loop_location): Convert return type from
12496 location_t to dump_user_location_t.
12497 * cgraphunit.c (walk_polymorphic_call_targets): Update call to
12498 dump_printf_loc to pass in a dump_location_t rather than a
12499 location_t, via the gimple stmt.
12500 * coverage.c (get_coverage_counts): Update calls to
12501 dump_printf_loc to pass in dump_location_t rather than a
12503 * doc/optinfo.texi (Dump types): Convert example of
12504 dump_printf_loc from taking "locus" to taking "insn". Update
12505 description of the "_loc" calls to cover dump_location_t.
12506 * dumpfile.c: Include "backend.h", "gimple.h", "rtl.h", and
12508 (dump_user_location_t::dump_user_location_t): New constructors,
12509 from gimple *stmt and rtx_insn *.
12510 (dump_user_location_t::from_function_decl): New function.
12511 (dump_loc): Make static.
12512 (dump_gimple_stmt_loc): Convert param "loc" from location_t to
12513 const dump_location_t &.
12514 (dump_generic_expr_loc): Delete.
12515 (dump_printf_loc): Convert param "loc" from location_t to
12516 const dump_location_t &.
12517 (selftest::test_impl_location): New function.
12518 (selftest::dumpfile_c_tests): New function.
12519 * dumpfile.h: Include "profile-count.h".
12520 (class dump_user_location_t): New class.
12521 (struct dump_impl_location_t): New struct.
12522 (class dump_location_t): New class.
12523 (dump_printf_loc): Convert 2nd param from source_location to
12524 const dump_location_t &.
12525 (dump_generic_expr_loc): Delete.
12526 (dump_gimple_stmt_loc): Convert 2nd param from source_location to
12527 const dump_location_t &.
12528 * gimple-fold.c (fold_gimple_assign): Update call to
12529 dump_printf_loc to pass in a dump_location_t rather than a
12530 location_t, via the gimple stmt.
12531 (gimple_fold_call): Likewise.
12532 * gimple-loop-interchange.cc
12533 (loop_cand::analyze_iloop_reduction_var): Update for change to
12534 check_reduction_path.
12535 (tree_loop_interchange::interchange): Update for change to
12536 find_loop_location.
12537 * graphite-isl-ast-to-gimple.c (scop_to_isl_ast): Update for
12538 change in return-type of find_loop_location.
12539 (graphite_regenerate_ast_isl): Likewise.
12540 * graphite-optimize-isl.c (optimize_isl): Likewise.
12541 * graphite.c (graphite_transform_loops): Likewise.
12542 * ipa-devirt.c (ipa_devirt): Update call to dump_printf_loc to
12543 pass in a dump_location_t rather than a location_t, via the
12545 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
12546 * ipa.c (walk_polymorphic_call_targets): Likewise.
12547 * loop-unroll.c (report_unroll): Convert "locus" param from
12548 location_t to dump_location_t.
12549 (decide_unrolling): Update for change to get_loop_location's
12551 * omp-grid.c (struct grid_prop): Convert field "target_loc" from
12552 location_t to dump_user_location_t.
12553 (grid_find_single_omp_among_assignments_1): Updates calls to
12554 dump_printf_loc to pass in a dump_location_t rather than a
12555 location_t, via the gimple stmt.
12556 (grid_parallel_clauses_gridifiable): Convert "tloc" from
12557 location_t to dump_location_t. Updates calls to dump_printf_loc
12558 to pass in a dump_location_t rather than a location_t, via the
12560 (grid_inner_loop_gridifiable_p): Likewise.
12561 (grid_dist_follows_simple_pattern): Likewise.
12562 (grid_gfor_follows_tiling_pattern): Likewise.
12563 (grid_target_follows_gridifiable_pattern): Likewise.
12564 (grid_attempt_target_gridification): Convert initialization
12565 of local "grid" from memset to zero-initialization; FIXME: does
12566 this require C++11? Update call to dump_printf_loc to pass in a
12567 optinfo_location rather than a location_t, via the gimple stmt.
12568 * profile.c (read_profile_edge_counts): Updates call to
12569 dump_printf_loc to pass in a dump_location_t rather than a
12571 (compute_branch_probabilities): Likewise.
12572 * selftest-run-tests.c (selftest::run_tests): Call
12574 * selftest.h (dumpfile_c_tests): New decl.
12575 * tree-loop-distribution.c (pass_loop_distribution::execute):
12576 Update for change in return type of find_loop_location.
12577 * tree-parloops.c (parallelize_loops): Likewise.
12578 * tree-ssa-loop-ivcanon.c (try_unroll_loop_completely): Convert
12579 "locus" from location_t to dump_user_location_t.
12580 (canonicalize_loop_induction_variables): Likewise.
12581 * tree-ssa-loop-ivopts.c (tree_ssa_iv_optimize_loop): Update
12582 for change in return type of find_loop_location.
12583 * tree-ssa-loop-niter.c (number_of_iterations_exit): Update call
12584 to dump_printf_loc to pass in a dump_location_t rather than a
12585 location_t, via the stmt.
12586 * tree-ssa-sccvn.c (eliminate_dom_walker::before_dom_children):
12588 * tree-vect-loop-manip.c (find_loop_location): Convert return
12589 type from source_location to dump_user_location_t.
12590 (vect_do_peeling): Update for above change.
12591 (vect_loop_versioning): Update for change in type of
12593 * tree-vect-loop.c (check_reduction_path): Convert "loc" param
12594 from location_t to dump_user_location_t.
12595 (vect_estimate_min_profitable_iters): Update for change in type
12597 * tree-vect-slp.c (vect_print_slp_tree): Convert param "loc" from
12598 location_t to dump_location_t.
12599 (vect_slp_bb): Update for change in type of vect_location.
12600 * tree-vectorizer.c (vect_location): Convert from source_location
12601 to dump_user_location_t.
12602 (try_vectorize_loop_1): Update for change in vect_location's type.
12603 (vectorize_loops): Likewise.
12604 (increase_alignment): Likewise.
12605 * tree-vectorizer.h (vect_location): Convert from source_location
12606 to dump_user_location_t.
12607 (find_loop_location): Convert return type from source_location to
12608 dump_user_location_t.
12609 (check_reduction_path): Convert 1st param from location_t to
12610 dump_user_location_t.
12611 * value-prof.c (check_counter): Update call to dump_printf_loc to
12612 pass in a dump_user_location_t rather than a location_t; update
12613 call to error_at for change in type of "locus".
12614 (check_ic_target): Update call to dump_printf_loc to
12615 pass in a dump_user_location_t rather than a location_t, via the
12618 2018-06-26 Robin Dapp <rdapp@linux.vnet.ibm.com>
12620 * config/s390/s390.h (enum processor_flags): Do not use
12621 default tune parameter when -march was specified.
12623 2018-06-26 Jakub Jelinek <jakub@redhat.com>
12626 * config/i386/i386.md (setcc + movzbl to xor + setcc peephole2s):
12627 Check reg_overlap_mentioned_p in addition to reg_set_p with the same
12630 2018-06-26 Richard Biener <rguenther@suse.de>
12632 PR tree-optimization/86287
12634 * tree-vect-loop.c (vect_transform_loop_stmt): Fix read-after-free.
12635 (vect_analyze_loop): Initialize n_stmts.
12637 2018-06-26 Richard Biener <rguenther@suse.de>
12639 PR middle-end/86271
12640 * fold-const.c (fold_convertible_p): Pointer extension
12643 2018-06-26 Alexandre Oliva <aoliva@redhat.com>
12646 * dwarf2out.c (loc_list_has_views): Adjust comments.
12647 (dw_loc_list): Split single cross-partition range with
12650 2018-06-25 Jeff Law <law@redhat.com>
12652 * common/config/v850/v850-common.c (TARGET_DEFAULT_TARGET_FLAGS): Turn
12653 on -mbig-switch by default.
12655 * config/v850/predicates.md (const_float_1_operand): Fix match_code
12657 (const_float_0_operand): Remove unused predicate.
12658 * config/v850/v850.md (define_constants): Remove UNSPEC_LOOP.
12659 (define_c_enum unspec): Add LOOP, RCP and RSQRT constants.
12660 (recipsf2): New expander. Original pattern now called
12662 (recipdf2, recipdf2_insn): Similarly.
12663 (rsqrtsf2, rsqrtsf2_insn): Similarly
12664 (rsqrtdf2, rsqrtdf2_insn): Similarly
12666 2018-06-26 Gerald Pfeifer <gerald@pfeifer.com>
12668 * ginclude/stddef.h: Remove an obsolete comment on FreeBSD 5.
12669 Simplify logic for FreeBSD (twice).
12671 2018-06-25 Martin Sebor <msebor@redhat.com>
12673 PR tree-optimization/86204
12674 * tree-ssa-strlen.c (handle_builtin_strlen): Avoid storing
12675 a strnlen result if it's less than the length of the string.
12677 2018-06-25 Martin Sebor <msebor@redhat.com>
12679 PR tree-optimization/85700
12680 * gimple-fold.c (gimple_fold_builtin_strncat): Adjust comment.
12681 * tree-ssa-strlen.c (is_strlen_related_p): Handle integer subtraction.
12682 (maybe_diag_stxncpy_trunc): Distinguish strncat from strncpy.
12684 2018-06-25 Martin Sebor <msebor@redhat.com>
12686 * doc/extend.texi (Zero-length arrays): Update and clarify.
12688 2018-06-25 Michael Meissner <meissner@linux.ibm.com>
12690 * config.gcc (powerpc64le*): Revert January 16th, 2018 patch that
12691 added IEEE/IBM long double multilib support on PowerPC little
12692 endian Linux systems.
12693 * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Likewise.
12694 (MULTILIB_DEFAULTS): Likewise.
12695 * config/rs6000/rs6000.c (rs6000_option_override_internal):
12697 * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Likewise.
12698 * config/rs6000/t-ldouble-linux64le-ibm: Delete, no longer used.
12699 * config/rs6000/t-ldouble-linux64le-ieee: Delete, no longer used.
12701 2018-06-25 Alexander Monakov <amonakov@ispras.ru>
12703 PR middle-end/86311
12704 * sort.cc (REORDER_23): Avoid memcpy with same destination and source.
12705 (REORDER_45): Likewise.
12707 2018-06-25 Jeff Law <law@redhat.com>
12709 * config/v850/v850.md (divmodhi4): Make sure to sign extend the
12710 dividend to 32 bits. Adjust length.
12711 (udivmodhi4): Cleanup output template. Fix length.
12713 2018-06-25 Carl Love <cel@us.ibm.com>
12715 * config/rs6000/vsx.md: Change word selector to prefered location.
12717 2018-06-25 Richard Biener <rguenther@suse.de>
12719 PR tree-optimization/86304
12720 * tree-vectorizer.c (vectorize_loops): Walk over new possibly
12721 epilogue-if-converted loops as well.
12723 2018-06-25 Jan Hubicka <hubicka@ucw.cz>
12725 * lto-section-out.c (lto_begin_section): Do not print section
12726 name for noaddr and unnumbered dumps.
12728 2018-06-25 Richard Biener <rguenther@suse.de>
12730 * tree-vectorizer.h (struct vec_info_shared): New structure
12731 with parts split out from struct vec_info and loop_nest from
12732 struct _loop_vec_info.
12733 (struct vec_info): Adjust accordingly.
12734 (struct _loop_vec_info): Likewise.
12735 (LOOP_VINFO_LOOP_NEST): Adjust.
12736 (LOOP_VINFO_DATAREFS): Likewise.
12737 (LOOP_VINFO_DDRS): Likewise.
12738 (struct _bb_vec_info): Likewise.
12739 (BB_VINFO_DATAREFS): Likewise.
12740 (BB_VINFO_DDRS): Likewise.
12741 (struct _stmt_vec_info): Add dr_aux member.
12742 (DR_VECT_AUX): Adjust to refer to member of DR_STMTs vinfo.
12743 (DR_MISALIGNMENT_UNINITIALIZED): New.
12744 (set_dr_misalignment): Adjust.
12745 (dr_misalignment): Assert misalign isn't DR_MISALIGNMENT_UNINITIALIZED.
12746 (vect_analyze_loop): Adjust prototype.
12747 (vect_analyze_loop_form): Likewise.
12748 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
12749 Compute dependences lazily.
12750 (vect_record_base_alignments): Use shared datarefs/ddrs.
12751 (vect_verify_datarefs_alignment): Likewise.
12752 (vect_analyze_data_refs_alignment): Likewise.
12753 (vect_analyze_data_ref_accesses): Likewise.
12754 (vect_analyze_data_refs): Likewise.
12755 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Add
12756 constructor parameter for shared part.
12757 (vect_analyze_loop_form): Pass in shared part and adjust.
12758 (vect_analyze_loop_2): Pass in storage for the number of
12759 stmts. Move loop nest finding to the caller. Compute
12761 (vect_analyze_loop): Pass in shared part.
12762 (vect_transform_loop): Verify shared datarefs are unchanged.
12763 * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Add
12764 constructor parameter for shared part.
12765 (vect_slp_analyze_bb_1): Pass in shared part and adjust.
12766 (vect_slp_bb): Verify shared datarefs are unchanged before
12768 * tree-vect-stmts.c (ensure_base_align): Adjust for DR_AUX
12770 (new_stmt_vec_info): Initialize DR_AUX misalignment to
12771 DR_MISALIGNMENT_UNINITIALIZED.
12772 * tree-vectorizer.c (vec_info::vec_info): Add constructor
12773 parameter for shared part.
12774 (vec_info::~vec_info): Adjust.
12775 (vec_info_shared::vec_info_shared): New.
12776 (vec_info_shared::~vec_info_shared): Likewise.
12777 (vec_info_shared::save_datarefs): Likewise.
12778 (vec_info_shared::check_datarefs): Likewise.
12779 (try_vectorize_loop_1): Construct shared part live for analyses
12780 of a single loop for multiple vector sizes.
12781 * tree-parloops.c (gather_scalar_reductions): Adjust.
12783 2018-06-25 Richard Biener <rguenther@suse.de>
12785 * tree-vect-data-refs.c (vect_find_stmt_data_reference): Modify
12786 DR for SIMD lane accesses here and mark DR with (void *)-1 aux.
12787 (vect_analyze_data_refs): Remove similar code from here and
12788 simplify accordingly.
12790 2018-06-25 Richard Biener <rguenther@suse.de>
12792 * tree-vect-data-refs.c (vect_check_gather_scatter): Fail
12793 for reverse storage order accesses rather than asserting
12794 they cannot happen here.
12796 2018-06-25 Tom de Vries <tdevries@suse.de>
12799 * config/i386/i386.md (define_insn "*tls_global_dynamic_64_<mode>"):
12800 Use data16 instead of .byte for insn prefix.
12802 2018-06-25 Andreas Krebbel <krebbel@linux.ibm.com>
12805 * parser.c (make_char_string_pack): Pass this literal chars
12806 through cpp_interpret_string.
12807 (cp_parser_userdef_numeric_literal): Check the result of
12808 make_char_string_pack.
12810 2018-06-24 Maya Rashish <coypu@sdf.org>
12812 * ginclude/stddef.h: Simplify conditions around avoiding
12813 re-definition of __size_t.
12815 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
12817 * lto-streamer-out.c (tree_is_indexable): Make LABEL_DECL nonindexable
12818 unless it is forced or nonlocal; assert that we stream no IMPORTED_DECL.
12820 2018-06-22 Maya Rashish <coypu@sdf.org>
12822 * doc/invoke.texi (mno-fancy-math-387): Update for changes
12823 made to OpenBSD and NetBSD through the years.
12825 2018-06-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
12827 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
12828 behavior of vec_pack (vector double, vector double) to match
12829 behavior of vec_float2 (vector double, vector double).
12831 2018-06-22 Olivier Hainque <hainque@adacore.com>
12833 * gimplify.c (gimplify_function_tree): Prevent creation
12834 of a trampoline for the address of the current function
12835 passed to entry/exit instrumentation hooks.
12837 2018-06-22 Aaron Sawdey <acsawdey@linux.ibm.com>
12840 * config/rs6000/rs6000-string.c (expand_strn_compare): Handle -m32
12843 2018-06-22 Martin Liska <mliska@suse.cz>
12845 PR tree-optimization/86263
12846 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
12847 Bail out if is_enabled is false.
12848 * tree-switch-conversion.h (jump_table_cluster::is_enabled):
12850 (jump_table_cluster::is_enabled): New function.
12852 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
12854 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
12855 BINFO_BASE_ACCESSES and BINFO_VPTR_FIELD.
12856 * tree-streamer-in.c (streamer_read_tree_bitfields): Likewise.
12857 (lto_input_ts_binfo_tree_pointers): Likewise.
12858 * tree-streamer-out.c (streamer_write_tree_bitfields,
12859 write_ts_binfo_tree_pointers): Likewise.
12860 * tree.c (free_lang_data_in_binfo): Clear BINFO_VPTR_FIELD.
12862 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
12864 * tree.c (free_lang_data_in_type): Free all TYPE_VFIELDs.
12866 2018-06-22 Martin Liska <mliska@suse.cz>
12868 * symbol-summary.h (get): Make it pure and inline move
12869 functionality from ::get function.
12870 (get): Remove and inline into ::get and ::get_create.
12871 (get_create): Move code from ::get function.
12873 2018-06-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
12876 * config/i386/sol2.h (CPP_SPEC): Don't pass -P for
12877 -x assembler-with-cpp.
12879 2018-06-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
12881 * config/sol2.h (TARGET_OS_CPP_BUILTINS): Define
12882 _FILE_OFFSET_BITS=64 for C++.
12884 2018-06-21 Michael Meissner <meissner@linux.ibm.com>
12886 * config/rs6000/rs6000.md (extendtfif2): Add missing 128-bit
12887 conversion insn that shows up when pr85657-3.c is compiled using
12888 IEEE 128-bit long double.
12889 (neg<mode>2_internal): Use the correct mode to check whether the
12890 mode is IBM extended.
12891 * config/rs6000/rs6000.c (init_float128_ieee): Prevent complex
12892 multiply and divide external functions from being created more
12895 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
12897 * cfgrtl.c (fixup_reorder_chain): Do not emit NOPs in DECL_IGNORED_P
12899 (rtl_merge_blocks): Likewise. Do not emit a NOP if the location of
12900 the edge can be forwarded.
12901 (cfg_layout_merge_blocks): Likewise.
12903 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
12905 * except.c (finish_eh_generation): Commit edge insertions only after
12906 the EH edges have been redirected from post-landing to landing pads.
12908 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
12910 * tree-nested.c (get_frame_type): Use create_tmp_var_raw instead of
12911 create_tmp_var_for to create the FRAME decl.
12912 (finalize_nesting_tree_1): Do not unchain the FRAME decl.
12914 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
12916 * tree-inline.c (copy_edges_for_bb): Minor tweak.
12917 (maybe_move_debug_stmts_to_successors): Also reset the locus of the
12918 debug statement when resetting its value.
12919 (expand_call_inline): Copy the locus of the call onto the assignment
12920 of the return value, if any. Use local variable in more cases.
12922 2018-06-21 Martin Liska <mliska@suse.cz>
12924 * ipa-pure-const.c (propagate_nothrow): Use
12925 funct_state_summaries->get.
12926 (dump_malloc_lattice): Likewise.
12927 (propagate_malloc): Likewise.
12929 2018-06-21 Richard Biener <rguenther@suse.de>
12931 * lto-streamer-out.c (DFS::DFS_write_tree_body): Update outdated
12932 comment. Follow BLOCK_ABSTRACT_ORIGIN unconditionally.
12933 * tree-streamer-in.c (lto_input_ts_block_tree_pointers): Update
12935 * tree-streamer-out.c (write_ts_block_tree_pointers): Stream
12936 BLOCK_ABSTRACT_ORIGIN unconditionally.
12938 2018-06-21 David Malcolm <dmalcolm@redhat.com>
12940 * ipa-cp.c (ipcp_driver): Set edge_clone_summaries to NULL after
12942 * ipa-reference.c (ipa_reference_c_finalize): Delete
12943 ipa_ref_opt_sum_summaries and set it to NULL.
12945 2018-06-21 Tom de Vries <tdevries@suse.de>
12947 PR tree-optimization/85859
12948 * tree-ssa-tail-merge.c (stmt_local_def): Copy gimple_is_call
12949 test with comment from bb_no_side_effects_p.
12951 2018-06-21 Richard Biener <rguenther@suse.de>
12953 PR tree-optimization/86232
12954 * tree-ssa-loop-niter.c (number_of_iterations_popcount): Adjust
12955 max for constant niter.
12957 2018-06-21 Andre Vieira <andre.simoesdiasvieira@arm.com>
12959 * config/aarch64/aarch64-simd.md
12960 (*aarch64_crypto_aes<aes_op>v16qi_xor_combine): New.
12962 2018-06-21 Andre Vieira <andre.simoesdiasvieira@arm.com>
12964 * config/aarch64/aarch64-simd.md (aarch64_crypto_aes<aes_op>v16qi):
12965 Make opernads of the unspec commutative.
12967 2018-06-21 Richard Biener <rguenther@suse.de>
12969 * tree-data-ref.c (dr_step_indicator): Handle NULL DR_STEP.
12970 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr):
12971 Avoid calling vect_mark_for_runtime_alias_test with gathers or scatters.
12972 (vect_analyze_data_ref_dependence): Re-order checks to deal with
12974 (vect_record_base_alignments): Do not record base alignment
12975 for gathers or scatters.
12976 (vect_compute_data_ref_alignment): Drop return value that is always
12977 true. Bail out early for gathers or scatters.
12978 (vect_enhance_data_refs_alignment): Bail out early for gathers
12980 (vect_find_same_alignment_drs): Likewise.
12981 (vect_analyze_data_refs_alignment): Remove dead code.
12982 (vect_slp_analyze_and_verify_node_alignment): Likewise.
12983 (vect_analyze_data_refs): For possible gathers or scatters do
12984 not create an alternate DR, just check their possible validity
12985 and mark them. Adjust DECL_NONALIASED handling to not rely
12986 on DR_BASE_ADDRESS.
12987 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Do not
12988 update inits of gathers or scatters.
12989 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern):
12990 Also copy gather/scatter flag to pattern vinfo.
12992 2018-06-20 Kelvin Nilsen <kelvin@gcc.gnu.org>
12994 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
12995 behavior of vec_packsu (vector unsigned long long, vector unsigned
12996 long long) to match behavior of vec_packs with same signature.
12998 2018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
12999 Thomas Schwinge <thomas@codesourcery.com>
13000 Cesar Philippidis <cesar@codesourcery.com>
13002 * gimplify.c (gimplify_scan_omp_clauses): Add support for
13003 OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
13004 (gimplify_adjust_omp_clauses): Likewise.
13005 (gimplify_oacc_declare_1): Add support for GOMP_MAP_RELEASE, remove
13006 support for GOMP_MAP_FORCE_{ALLOC,TO,FROM,TOFROM}.
13007 (gimplify_omp_target_update): Update handling of acc update and
13009 * omp-low.c (install_var_field): Remove unused parameter
13010 base_pointers_restrict.
13011 (scan_sharing_clauses): Remove base_pointers_restrict parameter.
13012 Update call to install_var_field. Handle OMP_CLAUSE_{IF_PRESENT,
13014 (omp_target_base_pointers_restrict_p): Delete.
13015 (scan_omp_target): Update call to scan_sharing_clauses.
13016 * tree-core.h (enum omp_clause_code): Add OMP_CLAUSE_{IF_PRESENT,
13018 * tree-nested.c (convert_nonlocal_omp_clauses): Handle
13019 OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
13020 (convert_local_omp_clauses): Likewise.
13021 * tree-pretty-print.c (dump_omp_clause): Likewise.
13022 * tree.c (omp_clause_num_ops): Add entries for OMP_CLAUSE_{IF_PRESENT,
13024 (omp_clause_code_name): Likewise.
13026 2018-06-20 Jakub Jelinek <jakub@redhat.com>
13029 * var-tracking.c (use_narrower_mode_test): Check if shift amount can
13032 PR tree-optimization/86231
13033 * tree-vrp.c (union_ranges): For ( [ ) ] or ( )[ ] range and
13034 anti-range don't overwrite *vr0min before using it to compute *vr0max.
13036 2018-06-20 Tom de Vries <tdevries@suse.de>
13038 PR tree-optimization/86097
13039 * tree-ssa-loop-manip.c (canonicalize_loop_ivs): Also convert *nit to
13040 iv type if signedness of iv type is not the same as that of *nit.
13042 2018-06-20 Jakub Jelinek <jakub@redhat.com>
13044 * cfgrtl.c (rtl_verify_edges): Formatting fix. If bb->preds has any
13045 EDGE_EH edges, verify they are all EDGE_EH.
13047 2018-06-20 Maya Rashish <coypu@sdf.org>
13049 * ginclude/stddef.h: Limit #include <machine/ansi.h> to NetBSD.
13051 2018-06-20 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
13053 * config/aarch64/aarch64-tuning-flags.def (no_ldp_stp_qregs): New.
13054 * config/aarch64/aarch64.c (xgene1_tunings): Add
13055 AARCH64_EXTRA_TUNE_NO_LDP_STP_QREGS to tune_flags.
13056 (aarch64_mode_valid_for_sched_fusion_p):
13057 Allow 16-byte modes.
13058 (aarch64_classify_address): Allow 16-byte modes for load_store_pair_p.
13059 * config/aarch64/aarch64-ldpstp.md: Add peepholes for LDP STP of
13061 * config/aarch64/aarch64-simd.md (load_pair<VQ:mode><VQ2:mode>):
13063 (vec_store_pair<VQ:mode><VQ2:mode>): Likewise.
13064 * config/aarch64/iterators.md (VQ2): New mode iterator.
13066 2018-06-20 Martin Liska <mliska@suse.cz>
13068 * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
13069 Change default ratio from 10 to 8.
13071 2018-06-20 Martin Liska <mliska@suse.cz>
13073 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
13075 (bit_test_cluster::find_bit_tests): Likewise.
13076 (switch_decision_tree::analyze_switch_statement): Find clusters.
13077 * tree-switch-conversion.h (struct jump_table_cluster): Document
13080 2018-06-20 Martin Liska <mliska@suse.cz>
13082 * tree-switch-conversion.c (switch_conversion::collect):
13083 Record m_uniq property.
13084 (switch_conversion::expand): Bail out for special conditions.
13085 (group_cluster::~group_cluster): New.
13086 (group_cluster::group_cluster): Likewise.
13087 (group_cluster::dump): Likewise.
13088 (jump_table_cluster::emit): New.
13089 (switch_decision_tree::fix_phi_operands_for_edges): New.
13090 (struct case_node): Remove struct.
13091 (jump_table_cluster::can_be_handled): New.
13092 (case_values_threshold): Moved to header.
13093 (reset_out_edges_aux): Likewise.
13094 (jump_table_cluster::is_beneficial): New.
13095 (bit_test_cluster::can_be_handled): Likewise.
13096 (add_case_node): Remove.
13097 (bit_test_cluster::is_beneficial): New.
13098 (case_bit_test::cmp): New.
13099 (bit_test_cluster::emit): New.
13100 (expand_switch_as_decision_tree_p): Remove.
13101 (bit_test_cluster::hoist_edge_and_branch_if_true): New.
13102 (fix_phi_operands_for_edge): Likewise.
13103 (switch_decision_tree::analyze_switch_statement): New.
13104 (compute_cases_per_edge): Move ...
13105 (switch_decision_tree::compute_cases_per_edge): ... here.
13106 (try_switch_expansion): Likewise.
13107 (switch_decision_tree::try_switch_expansion): Likewise.
13108 (record_phi_operand_mapping): Likewise.
13109 (switch_decision_tree::record_phi_operand_mapping): Likewise.
13110 (emit_case_decision_tree): Likewise.
13111 (switch_decision_tree::emit): Likewise.
13112 (balance_case_nodes): Likewise.
13113 (switch_decision_tree::balance_case_nodes): Likewise.
13114 (dump_case_nodes): Likewise.
13115 (switch_decision_tree::dump_case_nodes): Likewise.
13116 (emit_jump): Likewise.
13117 (switch_decision_tree::emit_jump): Likewise.
13118 (emit_cmp_and_jump_insns): Likewise.
13119 (switch_decision_tree::emit_cmp_and_jump_insns): Likewise.
13120 (emit_case_nodes): Likewise.
13121 (switch_decision_tree::emit_case_nodes): Likewise.
13122 (conditional_probability): Remove.
13123 * tree-switch-conversion.h (enum cluster_type): New.
13125 (struct cluster): Likewise.
13126 (cluster::cluster): Likewise.
13127 (struct simple_cluster): Likewise.
13128 (simple_cluster::simple_cluster): Likewise.
13129 (struct group_cluster): Likewise.
13130 (struct jump_table_cluster): Likewise.
13131 (struct bit_test_cluster): Likewise.
13132 (struct min_cluster_item): Likewise.
13133 (struct case_tree_node): Likewise.
13134 (case_tree_node::case_tree_node): Likewise.
13135 (jump_table_cluster::case_values_threshold): Likewise.
13136 (struct case_bit_test): Likewise.
13137 (struct switch_decision_tree): Likewise.
13138 (struct switch_conversion): Likewise.
13139 (switch_decision_tree::reset_out_edges_aux): Likewise.
13141 2018-06-20 Martin Liska <mliska@suse.cz>
13143 * tree-switch-conversion.c (MAX_CASE_BIT_TESTS): Remove.
13144 (hoist_edge_and_branch_if_true): Likewise.
13145 (expand_switch_using_bit_tests_p): Likewise.
13146 (struct case_bit_test): Likewise.
13147 (case_bit_test_cmp): Likewise.
13148 (emit_case_bit_tests): Likewise.
13149 (switch_conversion::switch_conversion): New class.
13150 (struct switch_conv_info): Remove old struct.
13151 (collect_switch_conv_info): More to ...
13152 (switch_conversion::collect): ... this.
13153 (check_range): Likewise.
13154 (switch_conversion::check_range): Likewise.
13155 (check_all_empty_except_final): Likewise.
13156 (switch_conversion::check_all_empty_except_final): Likewise.
13157 (check_final_bb): Likewise.
13158 (switch_conversion::check_final_bb): Likewise.
13159 (create_temp_arrays): Likewise.
13160 (switch_conversion::create_temp_arrays): Likewise.
13161 (free_temp_arrays): Likewise.
13162 (gather_default_values): Likewise.
13163 (switch_conversion::gather_default_values): Likewise.
13164 (build_constructors): Likewise.
13165 (switch_conversion::build_constructors): Likewise.
13166 (constructor_contains_same_values_p): Likewise.
13167 (switch_conversion::contains_same_values_p): Likewise.
13168 (array_value_type): Likewise.
13169 (switch_conversion::array_value_type): Likewise.
13170 (build_one_array): Likewise.
13171 (switch_conversion::build_one_array): Likewise.
13172 (build_arrays): Likewise.
13173 (switch_conversion::build_arrays): Likewise.
13174 (gen_def_assigns): Likewise.
13175 (switch_conversion::gen_def_assigns): Likewise.
13176 (prune_bbs): Likewise.
13177 (switch_conversion::prune_bbs): Likewise.
13178 (fix_phi_nodes): Likewise.
13179 (switch_conversion::fix_phi_nodes): Likewise.
13180 (gen_inbound_check): Likewise.
13181 (switch_conversion::gen_inbound_check): Likewise.
13182 (process_switch): Use the newly created class.
13183 (switch_conversion::expand): New.
13184 (switch_conversion::~switch_conversion): New.
13185 * tree-switch-conversion.h: New file.
13187 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
13189 * tree-vectorizer.h (NUM_PATTERNS, vect_recog_func_ptr): Move to
13190 tree-vect-patterns.c.
13191 * tree-vect-patterns.c (vect_supportable_direct_optab_p): New function.
13192 (vect_recog_dot_prod_pattern): Use it. Remove the type_in argument.
13193 (vect_recog_sad_pattern): Likewise.
13194 (vect_recog_widen_sum_pattern): Likewise.
13195 (vect_recog_pow_pattern): Likewise. Check for a null vectype.
13196 (vect_recog_widen_shift_pattern): Remove the type_in argument.
13197 (vect_recog_rotate_pattern): Likewise.
13198 (vect_recog_mult_pattern): Likewise.
13199 (vect_recog_vector_vector_shift_pattern): Likewise.
13200 (vect_recog_divmod_pattern): Likewise.
13201 (vect_recog_mixed_size_cond_pattern): Likewise.
13202 (vect_recog_bool_pattern): Likewise.
13203 (vect_recog_mask_conversion_pattern): Likewise.
13204 (vect_try_gather_scatter_pattern): Likewise.
13205 (vect_recog_widen_mult_pattern): Likewise. Check for a null vectype.
13206 (vect_recog_over_widening_pattern): Likewise.
13207 (vect_recog_gather_scatter_pattern): Likewise.
13208 (vect_recog_func_ptr): Move from tree-vectorizer.h
13209 (vect_vect_recog_func_ptrs): Move further down the file.
13210 (vect_recog_func): Likewise. Remove the third argument.
13211 (NUM_PATTERNS): Define based on vect_vect_recog_func_ptrs.
13212 (vect_pattern_recog_1): Expect the pattern function to do any
13213 necessary target tests. Also expect it to provide a vector type.
13214 Remove the type_in handling.
13216 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
13218 * tree-vect-patterns.c (vect_pattern_detected): New function.
13219 (vect_recog_dot_prod_patternm, vect_recog_sad_pattern)
13220 (vect_recog_widen_mult_pattern, vect_recog_widen_sum_pattern)
13221 (vect_recog_over_widening_pattern, vect_recog_widen_shift_pattern
13222 (vect_recog_rotate_pattern, vect_recog_vector_vector_shift_pattern)
13223 (vect_recog_mult_pattern, vect_recog_divmod_pattern)
13224 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
13225 (vect_recog_mask_conversion_pattern)
13226 (vect_try_gather_scatter_pattern): Likewise.
13228 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
13230 * tree-vect-patterns.c (vect_get_internal_def): New function.
13231 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
13232 (vect_recog_vector_vector_shift_pattern, check_bool_pattern)
13233 (search_type_for_mask_1): Use it.
13235 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
13237 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
13238 redundant WIDEN_SUM_EXPR handling.
13239 (vect_recog_sad_pattern): Likewise.
13241 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
13243 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
13244 redundant check that the types of a PLUS_EXPR or MULT_EXPR agree.
13245 (vect_recog_sad_pattern): Likewise PLUS_EXPR, ABS_EXPR and MINUS_EXPR.
13246 (vect_recog_widen_mult_pattern): Likewise MULT_EXPR.
13247 (vect_recog_widen_sum_pattern): Likewise PLUS_EXPR.
13249 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
13251 * tree-vect-stmts.c (vectorizable_call): Make sure that we
13252 use the stmt_vec_info of the original bb statement for the
13253 new zero assignment, even if the call is part of a pattern.
13255 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
13257 * tree-vectorizer.h (_stmt_vec_info): Note above pattern_def_seq
13258 that the sequence is attached to the original statement rather
13259 than the pattern statement.
13260 * tree-vect-loop.c (vect_determine_vf_for_stmt): Take the
13261 PATTERN_DEF_SEQ from the original statement rather than
13262 the main pattern statement.
13263 * tree-vect-stmts.c (free_stmt_vec_info): Likewise.
13264 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Likewise.
13265 (vect_mark_pattern_stmts): Don't copy the PATTERN_DEF_SEQ.
13267 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
13269 * tree-vect-stmts.c (vect_analyze_stmt): Move the handling of pattern
13270 definition statements before the early exit for statements that aren't
13272 * tree-vect-loop.c (vect_transform_loop_stmt): New function,
13274 (vect_transform_loop): ...here. Process pattern definition
13275 statements without first checking whether the main pattern
13276 statement is live or relevant.
13278 2018-06-19 Eric Botcazou <ebotcazou@adacore.com>
13280 * tree-cfgcleanup.c (tree_forwarder_block_p): Do not return false at
13281 -O0 if the locus represent UNKNOWN_LOCATION but have different values.
13283 2018-06-19 Aaron Sawdey <acsawdey@linux.ibm.com>
13285 * config/rs6000/rs6000-string.c (select_block_compare_mode): Check
13286 TARGET_EFFICIENT_OVERLAPPING_UNALIGNED here instead of in caller.
13287 (do_and3, do_and3_mask, do_compb3, do_rotl3): New functions.
13288 (expand_block_compare): Change select_block_compare_mode call.
13289 (expand_strncmp_align_check): Use new functions, fix comment.
13290 (emit_final_str_compare_gpr): New function.
13291 (expand_strn_compare): Refactor and clean up code.
13292 * config/rs6000/vsx.md (vsx_mov<mode>_64bit): Remove *.
13294 2018-06-19 Tony Reix <tony.reix@atos.com>
13295 Damien Bergamini <damien.bergamini@atos.com>
13296 David Edelsohn <dje.gcc@gmail.com>
13298 * collect2.c (static_obj): New variable.
13299 (static_libs): New variable.
13300 (is_in_list): Uncomment declaration.
13301 (main): Track AIX libraries linked statically.
13302 (is_in_list): Uncomment definition.
13303 (scan_prog_file): Don't add AIX shared libraries initializer
13304 to constructor list if linking statically.
13306 2018-06-19 Max Filippov <jcmvbkbc@gmail.com>
13308 * config/xtensa/xtensa.md (UNSPEC_FRAME_BLOCKAGE): New unspec
13310 (allocate_stack, frame_blockage, *frame_blockage): New patterns.
13312 2018-06-19 Jan Hubicka <hubicka@ucw.cz>
13314 * tree.c (find_decls_types_r): Remove all non-VAR_DECLs from
13317 2018-06-19 Martin Liska <mliska@suse.cz>
13319 * config/i386/i386.c (ix86_can_inline_p): Do not use
13320 ipa_fn_summaries::get_create.
13321 * ipa-cp.c (ipcp_cloning_candidate_p): Replace get_create with
13323 (devirtualization_time_bonus): Likewise.
13324 (ipcp_propagate_stage): Likewise.
13325 * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
13326 (edge_set_predicate): Likewise.
13327 (evaluate_conditions_for_known_args): Likewise.
13328 (evaluate_properties_for_edge): Likewise.
13329 (ipa_call_summary::reset): Tranform to ...
13330 (ipa_call_summary::~ipa_call_summary): ... this.
13331 (ipa_fn_summary::reset): Transform to ...
13332 (ipa_fn_summary::~ipa_fn_summary): ... this.
13333 (ipa_fn_summary_t::remove): Rename to ...
13334 (ipa_fn_summary_t::remove_callees): ... this.
13335 (ipa_fn_summary_t::duplicate): Use placement new
13336 instead of memory copy.
13337 (ipa_call_summary_t::duplicate): Likewise.
13338 (ipa_call_summary_t::remove): Remove.
13339 (dump_ipa_call_summary): Change get_create to get.
13340 (ipa_dump_fn_summary): Dump only when summary exists.
13341 (analyze_function_body): Use symbol_summary::get instead
13343 (compute_fn_summary): Likewise.
13344 (estimate_edge_devirt_benefit): Likewise.
13345 (estimate_edge_size_and_time): Likewise.
13346 (inline_update_callee_summaries): Likewise.
13347 (remap_edge_change_prob): Likewise.
13348 (remap_edge_summaries): Likewise.
13349 (ipa_merge_fn_summary_after_inlining): Likewise.
13350 (write_ipa_call_summary): Likewise.
13351 (ipa_fn_summary_write): Likewise.
13352 (ipa_free_fn_summary): Likewise.
13353 * ipa-fnsummary.h (struct GTY): Add new ctor and copy ctor.
13354 (struct ipa_call_summary): Likewise.
13355 * ipa-icf.c (sem_function::merge): Use symbol_summary::get instead
13357 * ipa-inline-analysis.c (do_estimate_edge_time): Likewise.
13358 (estimate_size_after_inlining): Likewise.
13359 (estimate_growth): Likewise.
13360 (growth_likely_positive): Likewise.
13361 * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
13362 (inline_call): Likewise.
13363 * ipa-inline.c (caller_growth_limits): Likewise.
13364 (can_inline_edge_p): Likewise.
13365 (can_inline_edge_by_limits_p): Likewise.
13366 (compute_uninlined_call_time): Likewise.
13367 (compute_inlined_call_time): Likewise.
13368 (want_inline_small_function_p): Likewise.
13369 (edge_badness): Likewise.
13370 (update_caller_keys): Likewise.
13371 (update_callee_keys): Likewise.
13372 (inline_small_functions): Likewise.
13373 (inline_to_all_callers_1): Likewise.
13374 (dump_overall_stats): Likewise.
13375 (early_inline_small_functions): Likewise.
13376 (early_inliner): Likewise.
13377 * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
13378 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
13379 * ipa-pure-const.c (malloc_candidate_p): Likewise.
13380 * ipa-split.c (execute_split_functions): Likewise.
13381 * symbol-summary.h: Likewise.
13382 * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
13384 2018-06-19 Richard Biener <rguenther@suse.de>
13386 * tree-vectorizer.c (try_vectorize_loop_1): Split out of ...
13387 (vectorize_loops): ... here. Fix dbgcnt handling.
13388 (try_vectorize_loop): Wrap try_vectorize_loop_1.
13390 2018-06-19 Segher Boessenkool <segher@kernel.crashing.org>
13393 * config/rs6000/rs6000.md (rs6000_discover_homogeneous_aggregate): An
13394 ieee128 argument takes up only one (vector) register, not two (floating
13397 2018-06-19 Eric Botcazou <ebotcazou@adacore.com>
13399 * gimplify.c (gimplify_init_constructor): Really never clear for an
13400 incomplete constructor if CONSTRUCTOR_NO_CLEARING is set.
13402 2018-06-19 Richard Biener <rguenther@suse.de>
13404 PR tree-optimization/86179
13405 * tree-vect-patterns.c (vect_pattern_recog_1): Clean up
13406 after failed recognition.
13408 2018-06-18 Martin Sebor <msebor@redhat.com>
13410 PR middle-end/85602
13411 * calls.c (maybe_warn_nonstring_arg): Handle strncat.
13412 * tree-ssa-strlen.c (is_strlen_related_p): Make extern.
13413 Handle integer subtraction.
13414 (maybe_diag_stxncpy_trunc): Handle nonstring source arguments.
13415 * tree-ssa-strlen.h (is_strlen_related_p): Declare.
13417 2018-06-18 David Malcolm <dmalcolm@redhat.com>
13419 * config/frv/frv-protos.h (frv_ifcvt_modify_insn): Strengthen 3rd
13420 param from rtx to rtx_insn *.
13421 * config/frv/frv.c (frv_ifcvt_add_insn): Likewise for "insn"
13423 (frv_ifcvt_modify_insn): Likwise.
13424 (frv_ifcvt_modify_final): Likwise for local "existing_insn",
13425 adding an as_a <rtx_insn *> cast. Likewise for local "insn".
13426 * config/mips/mips.c (r10k_insert_cache_barriers): Add an
13427 as_a <rtx_insn *> cast to local "unprotected_region" once
13428 it's been established that it's not NULL or pc_rtx.
13429 * config/nds32/nds32-relax-opt.c (nds32_group_insns): Strengthen
13430 param "sethi" from rtx to rtx_insn *.
13431 (nds32_group_float_insns): Likewise for param "insn".
13432 * config/vax/vax-protos.h (vax_output_int_add): Likewise for 1st
13434 (vax_output_int_subtract): Likewise.
13435 * config/vax/vax.c (vax_output_int_add): Likewise for param
13437 (vax_output_int_subtract): Likewise.
13438 * emit-rtl.c (set_insn_deleted): Likewise, removing cast.
13439 (emit_pattern_after): Likewise for param "after".
13440 (emit_insn_after): Likewise.
13441 (emit_jump_insn_after): Likewise.
13442 (emit_call_insn_after): Likewise.
13443 (emit_debug_insn_after): Likewise.
13444 (emit_pattern_before): Likewise for param "before".
13445 (emit_insn_before): Likewise.
13446 (emit_jump_insn_before): Likewise.
13447 * final.c (get_insn_template): Likewise for param "insn", removing
13449 * output.h (get_insn_template): Likewise for 2nd param.
13450 * rtl.h (emit_insn_before): Likewise.
13451 (emit_jump_insn_before): Likewise.
13452 (emit_debug_insn_before_noloc): Likewise.
13453 (emit_insn_after): Likewise.
13454 (emit_jump_insn_after): Likewise.
13455 (emit_call_insn_after): Likewise.
13456 (emit_debug_insn_after): Likewise.
13457 (set_insn_deleted): Likewise for param.
13459 2018-06-18 Michael Meissner <meissner@linux.ibm.com>
13462 * config/rs6000/rs6000-modes.def (toplevel): Rework the 128-bit
13463 floating point modes, so that IFmode is numerically greater than
13464 TFmode, which is greater than KFmode using FRACTIONAL_FLOAT_MODE
13465 to declare the ordering. This prevents IFmode from being
13466 converted to TFmode when long double is IEEE 128-bit on an ISA 3.0
13467 machine. Include rs6000-modes.h to share the fractional values
13468 between genmodes* and the rest of the compiler.
13469 (IFmode): Likewise.
13470 (KFmode): Likewise.
13471 (TFmode): Likewise.
13472 * config/rs6000/rs6000-modes.h: New file.
13473 * config/rs6000/rs6000.c (rs6000_debug_reg_global): Change the
13474 meaning of rs6000_long_double_size so that 126..128 selects an
13475 appropriate 128-bit floating point type.
13476 (rs6000_option_override_internal): Likewise.
13477 * config/rs6000/rs6000.h (toplevel): Include rs6000-modes.h.
13478 (TARGET_LONG_DOUBLE_128): Change the meaning of
13479 rs6000_long_double_size so that 126..128 selects an appropriate
13480 128-bit floating point type.
13481 (LONG_DOUBLE_TYPE_SIZE): Update comment.
13482 * config/rs6000/rs6000.md (trunciftf2): Correct the modes of the
13483 source and destination to match the standard usage.
13484 (truncifkf2): Likewise.
13485 (copysign<mode>3, IEEE iterator): Rework copysign of float128 on
13486 ISA 2.07 to use an explicit clobber, instead of passing in a
13488 (copysign<mode>3_soft): Likewise.
13490 2018-06-18 David Malcolm <dmalcolm@redhat.com>
13492 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
13493 Replace dump_printf_loc call with DUMP_VECT_SCOPE.
13494 (vect_slp_analyze_instance_dependence): Likewise.
13495 (vect_enhance_data_refs_alignment): Likewise.
13496 (vect_analyze_data_refs_alignment): Likewise.
13497 (vect_slp_analyze_and_verify_instance_alignment
13498 (vect_analyze_data_ref_accesses): Likewise.
13499 (vect_prune_runtime_alias_test_list): Likewise.
13500 (vect_analyze_data_refs): Likewise.
13501 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Likewise.
13502 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
13503 (vect_analyze_scalar_cycles_1): Likewise.
13504 (vect_get_loop_niters): Likewise.
13505 (vect_analyze_loop_form_1): Likewise.
13506 (vect_update_vf_for_slp): Likewise.
13507 (vect_analyze_loop_operations): Likewise.
13508 (vect_analyze_loop): Likewise.
13509 (vectorizable_induction): Likewise.
13510 (vect_transform_loop): Likewise.
13511 * tree-vect-patterns.c (vect_pattern_recog): Likewise.
13512 * tree-vect-slp.c (vect_analyze_slp): Likewise.
13513 (vect_make_slp_decision): Likewise.
13514 (vect_detect_hybrid_slp): Likewise.
13515 (vect_slp_analyze_operations): Likewise.
13516 (vect_slp_bb): Likewise.
13517 * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Likewise.
13518 (vectorizable_bswap): Likewise.
13519 (vectorizable_call): Likewise.
13520 (vectorizable_simd_clone_call): Likewise.
13521 (vectorizable_conversion): Likewise.
13522 (vectorizable_assignment): Likewise.
13523 (vectorizable_shift): Likewise.
13524 (vectorizable_operation): Likewise.
13525 * tree-vectorizer.h (DUMP_VECT_SCOPE): New macro.
13527 2018-06-18 Martin Sebor <msebor@redhat.com>
13529 PR tree-optimization/81384
13530 * builtin-types.def (BT_FN_SIZE_CONST_STRING_SIZE): New.
13531 * builtins.c (expand_builtin_strnlen): New function.
13532 (expand_builtin): Call it.
13533 (fold_builtin_n): Avoid setting TREE_NO_WARNING.
13534 * builtins.def (BUILT_IN_STRNLEN): New.
13535 * calls.c (maybe_warn_nonstring_arg): Handle BUILT_IN_STRNLEN.
13536 Warn for bounds in excess of maximum object size.
13537 * tree-ssa-strlen.c (maybe_set_strlen_range): Return tree representing
13538 single-value ranges. Handle strnlen.
13539 (handle_builtin_strlen): Handle strnlen.
13540 (strlen_check_and_optimize_stmt): Same.
13541 * doc/extend.texi (Other Builtins): Document strnlen.
13543 2018-06-18 Maya Rashish <coypu@sdf.org>
13545 * config/alpha/openbsd.h (TARGET_DEFAULT): Define.
13546 (LINK_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): Likewise.
13547 (INTMAX_TYPE, UINTMAX_TYPE, WINT_TYPE): Likewise.
13549 * config/alpha/elf.h (STARTFILE_SPEC, ENDFILE_SPEC): Move from
13551 * config/alpha/linux.h (STARTFILE_SPEC, ENDFILE_SPEC): Here.
13553 2018-06-18 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
13555 * tree.c (escaped_string::escape): Replace cast to char * by
13556 const_cast<char *> (unescaped).
13558 2018-06-18 Nick Clifton <nickc@redhat.com>
13561 * tree.c (escaped_string): New class. Converts an unescaped
13562 string into its escaped equivalent.
13563 (warn_deprecated_use): Use the new class to convert the
13564 deprecation message, if present.
13565 (test_escaped_strings): New self test.
13566 (test_c_tests): Add test_escaped_strings.
13567 * doc/extend.texi (deprecated): Add a note that the
13568 deprecation message is affected by the -fmessage-length
13569 option, and that control characters will be escaped.
13570 (#pragma GCC error): Document this pragma.
13571 (#pragma GCC warning): Likewise.
13572 * doc/invoke.texi (-fmessage-length): Document this option's
13573 effect on the #warning and #error preprocessor directives and
13574 the deprecated attribute.
13576 2018-06-18 Eric Botcazou <ebotcazou@adacore.com>
13578 * tree.c (decl_value_expr_lookup): Revert latest change.
13579 (decl_value_expr_insert): Likewise.
13581 2018-06-17 Eric Botcazou <ebotcazou@adacore.com>
13583 * gimplify.c (nonlocal_vlas): Delete.
13584 (nonlocal_vla_vars): Likewise.
13585 (gimplify_var_or_parm_decl): Do not add debug VAR_DECLs for non-local
13587 (gimplify_body): Do not create and destroy nonlocal_vlas.
13588 * tree-nested.c: Include diagnostic.h.
13589 (use_pointer_in_frame): Tweak.
13590 (lookup_field_for_decl): Add assertion and declare the transformation.
13591 (convert_nonlocal_reference_op) <PARM_DECL>: Rework and issue an
13592 internal error when the reference is in a wrong context. Do not
13593 create a debug decl by default.
13594 (note_nonlocal_block_vlas): Delete.
13595 (convert_nonlocal_reference_stmt) <GIMPLE_BIND>: Do not call it.
13596 (convert_local_reference_op) <PARM_DECL>: Skip the frame decl. Do not
13597 create a debug decl by default.
13598 (convert_gimple_call) <GIMPLE_CALL>: Issue an internal error when the
13599 call is in a wrong context.
13600 (fixup_vla_decls): New function.
13601 (finalize_nesting_tree_1): Adjust comment. Call fixup_vla_decls if no
13602 debug variables were created.
13603 * tree.c (decl_value_expr_lookup): Add checking assertion.
13604 (decl_value_expr_insert): Likewise.
13606 2018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
13608 PR middle-end/82479
13609 * ipa-fnsummary.c (will_be_nonconstant_expr_predicate): Handle CALL_EXPR.
13610 * tree-scalar-evolution.c (interpret_expr): Likewise.
13611 (expression_expensive_p): Likewise.
13612 * tree-ssa-loop-ivopts.c (contains_abnormal_ssa_name_p): Likewise.
13613 * tree-ssa-loop-niter.c (number_of_iterations_popcount): New.
13614 (number_of_iterations_exit_assumptions): Use number_of_iterations_popcount.
13615 (ssa_defined_by_minus_one_stmt_p): New.
13617 2018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
13619 PR middle-end/64946
13620 * cfgexpand.c (expand_debug_expr): Hande ABSU_EXPR.
13621 * config/i386/i386.c (ix86_add_stmt_cost): Likewise.
13622 * dojump.c (do_jump): Likewise.
13623 * expr.c (expand_expr_real_2): Check operand type's sign.
13624 * fold-const.c (const_unop): Handle ABSU_EXPR.
13625 (fold_abs_const): Likewise.
13626 * gimple-pretty-print.c (dump_unary_rhs): Likewise.
13627 * gimple-ssa-backprop.c (backprop::process_assign_use): Likesie.
13628 (strip_sign_op_1): Likesise.
13629 * match.pd: Add new pattern to generate ABSU_EXPR.
13630 * optabs-tree.c (optab_for_tree_code): Handle ABSU_EXPR.
13631 * tree-cfg.c (verify_gimple_assign_unary): Likewise.
13632 * tree-eh.c (operation_could_trap_helper_p): Likewise.
13633 * tree-inline.c (estimate_operator_cost): Likewise.
13634 * tree-pretty-print.c (dump_generic_node): Likewise.
13635 * tree-vect-patterns.c (vect_recog_sad_pattern): Likewise.
13636 * tree.def (ABSU_EXPR): New.
13638 2018-06-16 Jakub Jelinek <jakub@redhat.com>
13640 PR middle-end/86095
13641 * common.opt (Wunsafe-loop-optimizations): Add Ignore, remove Var,
13642 documented as preserved for backward compatibility only.
13643 * doc/invoke.texi: Remove -Wunsafe-loop-optimizations documentation.
13645 PR rtl-optimization/86108
13646 * bb-reorder.c (create_forwarder_block): Renamed to ...
13647 (create_eh_forwarder_block): ... this. Split OLD_BB after labels and
13648 jump from new landing pad to the second part.
13649 (sjlj_fix_up_crossing_landing_pad, dw2_fix_up_crossing_landing_pad):
13652 2018-06-15 Jakub Jelinek <jakub@redhat.com>
13654 PR middle-end/85878
13655 * expr.c (expand_assignment): Remove now redundant COMPLEX_MODE_P
13656 check from first store_expr, use to_mode instead of GET_MODE (to_rtx).
13657 Only call store_expr for halves if the mode is the same.
13659 PR middle-end/86123
13660 * match.pd ((X / Y) == 0 -> X < Y): Don't transform complex divisions.
13661 Fix up comment formatting.
13663 2018-06-15 Bernd Edlinger <bernd.edlinger@hotmail.de>
13665 * typed-splay-tree.h (typed_splay_tree::remove): New function.
13666 (typed_splay_tree::closure,
13667 typed_splay_tree::inner_foreach_fn, typed_splay_tree::m_inner): Deleted.
13668 (typed_splay_tree::typed_splay_tree,
13669 typed_splay_tree::operator =): Declared private.
13670 (typed_splay_tree::splay_tree_key, typed_splay_tree::splay_tree_value,
13671 typed_splay_tree::splay_tree_node_s, typed_splay_tree::KDEL,
13672 typed_splay_tree::VDEL, typed_splay_tree::splay_tree_delete_helper,
13673 typed_splay_tree::rotate_left, typed_splay_tree::rotate_right,
13674 typed_splay_tree::splay_tree_splay,
13675 typed_splay_tree::splay_tree_foreach_helper,
13676 typed_splay_tree::splay_tree_insert,
13677 typed_splay_tree::splay_tree_remove,
13678 typed_splay_tree::splay_tree_lookup,
13679 typed_splay_tree::splay_tree_predecessor,
13680 typed_splay_tree::splay_tree_successor,
13681 typed_splay_tree::splay_tree_min,
13682 typed_splay_tree::splay_tree_max): Took over from splay-tree.c/.h.
13683 (typed_splay_tree::root, typed_splay_tree::comp,
13684 typed_splay_tree::delete_key,
13685 typed_splay_tree::delete_value): New data members.
13686 * typed-splay-tree.c (selftest::test_str_to_int): Add a test for
13687 typed_splay_tree::remove.
13689 2018-06-15 Matthew Fortune <matthew.fortune@mips.com>
13691 * config/mips/mips.h (ASM_SPEC): Pass through -mcrc, -mno-crc,
13692 -mginv and -mno-ginv to the assembler.
13693 * config/mips/mips.opt (-mcrc): New option.
13694 (-mginv): Likewise.
13695 * doc/invoke.text (-mcrc): Document.
13696 (-mginv): Likewise.
13698 2018-06-15 Nick Clifton <nickc@redhat.com>
13701 * tree.c (escaped_string): New class. Converts an unescaped
13702 string into its escaped equivalent.
13703 (warn_deprecated_use): Use the new class to convert the
13704 deprecation message, if present.
13705 (test_escaped_strings): New self test.
13706 (test_c_tests): Add test_escaped_strings.
13707 * doc/extend.texi (deprecated): Add a note that the
13708 deprecation message is affected by the -fmessage-length
13709 option, and that control characters will be escaped.
13710 (#pragma GCC error): Document this pragma.
13711 (#pragma GCC warning): Likewise.
13712 * doc/invoke.texi (-fmessage-length): Document this option's
13713 effect on the #warning and #error preprocessor directives and
13714 the deprecated attribute.
13716 2018-06-15 Richard Biener <rguenther@suse.de>
13718 * tree-vect-slp.c (vect_slp_bb): Dump MSG_OPTIMIZED_LOCATIONS
13719 here, also noting vector size used.
13720 * tree-vectorizer.c (vectorize_loops): Adjust. Note vector
13721 size used in MSG_OPTIMIZED_LOCATIONS dump.
13722 (pass_slp_vectorize::execute): Adjust.
13724 2018-06-15 Claudiu Zissulescu <claziss@synopsys.com>
13727 * config/arc/arc.c (arc_return_address_register): Fix
13730 2018-06-15 Richard Biener <rguenther@suse.de>
13732 PR middle-end/86159
13733 * tree-cfg.c (gimplify_build3): Do not strip sign conversions,
13734 leave useless conversion stripping to force_gimple_operand_gsi.
13735 (gimplify_build2): Likewise.
13736 (gimplify_build1): Likewise.
13738 2018-06-15 Richard Biener <rguenther@suse.de>
13740 PR middle-end/86076
13741 * tree-cfg.c (move_stmt_op): unshare invariant addresses
13742 before adjusting their block.
13744 2018-06-15 Sebastian Huber <sebastian.huber@embedded-brains.de>
13746 * config.gcc (riscv*-*-elf* | riscv*-*-rtems*): Use custom
13747 multilibs for *-*-rtems*.
13748 * config/riscv/t-rtems: New file.
13750 2018-06-14 Jakub Jelinek <jakub@redhat.com>
13752 PR middle-end/86122
13753 * match.pd ((A +- CST1) +- CST2): Punt if last resort
13754 unsigned_type_for returns NULL.
13757 * lower-subreg.c (find_decomposable_subregs): Don't decompose float
13758 subregs of multi-word pseudos unless the float mode has word size.
13760 2018-06-14 Richard Biener <rguenther@suse.de>
13762 PR middle-end/86139
13763 * tree-vect-generic.c (build_word_mode_vector_type): Remove
13764 duplicate and harmful type_hash_canon.
13765 * tree.c (type_hash_canon): Assert we didn't find ourselves.
13767 2018-06-14 Richard Biener <rguenther@suse.de>
13770 * tree-ssa-struct-alias.c (create_variable_info_for): Handle
13773 2018-06-14 Sebastian Huber <sebastian.huber@embedded-brains.de>
13775 * config/rtems.h (STDINT_LONG32): Define.
13777 2018-06-13 Matthew Fortune <matthew.fortune@mips.com>
13778 Prachi Godbole <prachi.godbole@imgtec.com>
13780 * config/mips/mips-cpus.def: Define P6600.
13781 * config/mips/mips-tables.opt: Regenerate.
13782 * config/mips/mips.c (mips_ucbranch_type): New enum.
13783 (mips_rtx_cost_data): Add support for P6600.
13784 (mips_issue_rate): Likewise.
13785 (mips_multipass_dfa_lookahead): Likewise.
13786 (mips_avoid_hazard): Likewise.
13787 (mips_reorg_process_insns): Likewise.
13788 (mips_classify_branch_p6600): New function.
13789 * config/mips/mips.h (TUNE_P6600): New define.
13790 (MIPS_ISA_LEVEL_SPEC): Infer mips64r6 from p6600.
13791 (ENABLE_LD_ST_PAIRS): Enable load/store bonding for p6600.
13792 * config/mips/mips.md: Include p6600.md.
13793 (processor): Add p6600.
13794 * config/mips/p6600.md: New file.
13795 * doc/invoke.texi: Add p6600 to supported architectures.
13797 2018-06-13 Martin Sebor <msebor@redhat.com>
13799 PR tree-optimization/86114
13800 * gimple-fold.c (gimple_fold_builtin_strlen): Only handle LHS
13802 * tree-ssa-strlen.c (maybe_set_strlen_range): Same.
13804 2018-06-13 Richard Biener <rguenther@suse.de>
13806 * tree-vect-patterns.c (vect_recog_vector_vector_shift_pattern):
13807 Properly set vector type of the intermediate stmt.
13808 * tree-vect-stmts.c (vectorizable_operation): The destination
13809 var always has vectype_out type.
13811 2018-06-13 Jeff Law <law@redhat.com>
13813 * config/rl78/rl78.c (move_elim_pass): Use TDF_NONE rather than
13814 integer 0 for argument to print_rtl_with_bb.
13815 (rl78_reorg): Likewise.
13817 2018-06-13 David Malcolm <dmalcolm@redhat.com>
13819 * config/arc/arc.c (hwloop_optimize): Strengthen local "end_label"
13820 from rtx to rtx_insn *.
13821 * config/bfin/bfin.c (hwloop_optimize): Likewise for local
13823 (add_sched_insns_for_speculation): Likewise for local "target",
13824 converting usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
13825 * config/c6x/c6x.c (reorg_split_calls): Strengthen param "call_labels"
13826 from rtx_insn ** to rtx_code_label **.
13827 (reorg_emit_nops): Likewise.
13828 (c6x_reorg): Likewise for local "call_labels".
13829 * config/sh/sh-protos.h (get_dest_uid): Strengthen 1st param from
13831 * config/sh/sh.c (dump_table): Strengthen local "lab" from rtx to
13832 rtx_code_label *, adding safe_as_a <rtx_code_label *> casts to
13833 the loops over LABEL_REFS.
13834 (fixup_addr_diff_vecs): Add as_a <rtx_insn *> to usage of
13836 (barrier_align): Convert usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
13837 (get_dest_uid): Strengthen param "label" from rtx to rtx_insn *.
13838 (split_branches): Strengthen local "olabel" from rtx to
13839 rtx_insn *, adding a safe_as_a cast.
13840 * emit-rtl.c (next_real_insn): Strengthen param from "rtx"
13842 (add_insn_after): Likewise for first two params.
13843 (add_insn_before): Likewise.
13844 (remove_insn): Likewise for param.
13845 (emit_pattern_before_noloc): Likewise for second and third params.
13846 (emit_jump_insn_before_noloc): Convert NULL_RTX to NULL.
13847 (emit_call_insn_before_noloc): Likewise.
13848 (emit_debug_insn_before_noloc): Strengthen "before" param from "rtx"
13850 (emit_barrier_before): Likewise.
13851 (emit_label_before): Strengthen "label" param from "rtx" to
13852 "rtx_code_label *". Strengthen "before" param from "rtx" to
13854 (emit_insn_after_1): Strengthen "after" param from "rtx" to
13856 (emit_pattern_after_noloc): Likewise.
13857 (emit_insn_after_noloc): Likewise.
13858 (emit_jump_insn_after_noloc): Likewise.
13859 (emit_call_insn_after_noloc): Likewise.
13860 (emit_debug_insn_after_noloc): Likewise.
13861 (emit_barrier_after): Likewise.
13862 (emit_label_after): Likewise for both params.
13863 (emit_pattern_after_setloc): Likewise for "after" param. Convert
13864 "loc" param from "int" to "location_t".
13865 (emit_insn_after_setloc): Likewise.
13866 (emit_jump_insn_after_setloc): Likewise.
13867 (emit_call_insn_after_setloc): Likewise.
13868 (emit_debug_insn_after_setloc): Likewise.
13869 (emit_pattern_before_setloc): Likewise for "before" param. Convert
13870 "loc" param from "int" to "location_t".
13871 (emit_pattern_before): Convert NULL_RTX to NULL.
13872 (emit_insn_before_setloc): Convert "loc" param from "int" to
13874 (emit_jump_insn_before_setloc): Likewise.
13875 (emit_call_insn_before_setloc): Likewise.
13876 (emit_debug_insn_before_setloc): Strengthen "before" param from rtx to
13877 rtx_insn *. Convert "loc" param from "int" to "location_t".
13878 * rtl.h (emit_insn_before_setloc, emit_jump_insn_before_setloc,
13879 emit_call_insn_before_setloc, emit_debug_insn_before_setloc):
13880 Convert 3rd param from "int" to "location_t".
13881 (emit_barrier_before, emit_barrier_after, next_real_insn):
13882 Strengthen param from rtx to rtx_insn *.
13883 (emit_label_before): Strengthen 1st param from "rtx" to
13884 "rtx_code_label *". Strengthen 2nd param from "rtx" to
13886 (emit_insn_after_noloc, emit_jump_insn_after_noloc,
13887 emit_call_insn_after_noloc, emit_debug_insn_after_noloc):
13888 Strengthen 2nd param from "rtx" to "rtx_insn *".
13889 (emit_insn_after_setloc, emit_jump_insn_after_setloc)
13890 emit_call_insn_after_setloc, emit_debug_insn_after_setloc):
13891 Likewise. Convert 3rd param from "int" to "location_t".
13892 (emit_label_after): Strengthen 1st param from "rtx" to
13893 "rtx_code_label *".
13894 (next_real_insn, remove_insn): Strengthen param from "rtx" to
13896 (add_insn_before, add_insn_after): Strengthen 1st and 2nd params
13897 from "rtx" to "rtx_insn *".
13899 2018-06-13 Jan Hubicka <hubicka@gcc.gnu.org>
13901 * cgraph.c (cgraph_node::get_untransformed_body): Dump function
13902 bodies streamed in with -Q.
13903 * dumpfile.c (dump_files): Add lto-stream-out dump file.
13904 * dumpfile.h (tree_dump_index): Add lto_stream_out.
13905 * gimple-streamer-out.c: Include gimple-pretty-print.h
13906 (output_bb): Dump stmts streamed.
13907 * lto-section-out.c: Include print-tree.h
13908 (lto_begin_section): Dump sections created.
13909 (lto_output_decl_index): Dump decl encoded.
13910 * lto-streamer-out.c: Include print-tree.h
13911 (create_output_block): Dump output block created.
13912 (DFS::DFS_write_tree_body): Dump DFS SCCs streamed.
13913 (output_function): Dump function output.
13914 (output_constructor): Dump constructor streamed.
13915 (write_global_stream): Output indexes encoded.
13916 (produce_asm_for_decls): Dump streams encoded.
13917 * lto-streamer.c (streamer_dump_file): New global var.
13918 * lto-streamer.h (streamer_dump_file): Declare.
13919 * passes.c (ipa_write_summaries): Initialize streamer dump.
13920 * varpool.c (varpool_node::get_constructor): Dump constructors streamed
13923 2018-06-13 Eric Botcazou <ebotcazou@adacore.com>
13926 * config/i386/winnt.c (i386_pe_seh_cold_init): Do not emit negative
13927 offsets for register save directives. Emit a second batch of save
13928 directives, if need be, when the function accesses prior frames.
13930 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
13932 * config/arc/fpu.md (fmasf4): Force operand to register.
13933 (fnmasf4): Likewise.
13935 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
13937 * config/arc/arc-protos.h (arc_pad_return): Remove.
13938 * config/arc/arc.c (machine_function): Remove force_short_suffix
13940 (arc_print_operand): Adjust printing of '&'.
13941 (arc_verify_short): Remove conditional printing of short suffix.
13942 (arc_final_prescan_insn): Remove reference to size_reason.
13943 (pad_return): New function.
13944 (arc_reorg): Call pad_return.
13945 (arc_pad_return): Remove.
13946 (arc_init_machine_status): Remove reference to force_short_suffix.
13947 * config/arc/arc.md (vunspec): Add VUNSPEC_ARC_BLOCKAGE.
13948 (attr length): When attribute iscompact is true force to 2
13949 regardless; in the case of maybe check if we want to force the
13950 instruction to have 4 bytes length.
13951 (nopv): Change it to generate 4 byte long nop as well.
13952 (blockage): New pattern.
13953 (simple_return): Remove call to arc_pad_return.
13954 (p_return_i): Likewise.
13956 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
13958 * config/arc/elf.h (LINK_GCC_C_SEQUENCE_SPEC): Define.
13960 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
13962 * config/arc/builtins.def (SYNC): SYNC instruction is valid on all
13965 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
13967 * config/arc/arc.c (atomic_exchangesi): EX instruction is default
13968 for ARC700 and ARCv2.
13970 2018-06-13 Chenghua Xu <paul.hua.gm@gmail.com>
13973 * config/mips/loongson.md (vec_setv4hi): Gen_lowpart for
13974 operands[2] instead of operands[1].
13977 2018-06-12 Richard Sandiford <richard.sandiford@linaro.org>
13979 * lra-constraints.c (simplify_operand_subreg): In the paradoxical
13980 case, check whether the outer register overlaps an unallocatable
13981 register, not just whether it fits the required class.
13983 2018-06-12 Richard Sandiford <richard.sandiford@linaro.org>
13985 * poly-int.h (can_div_trunc_p): Add new overload in which all values
13987 * alias.c (get_addr): Extend CONST_INT handling to poly_int_rtx_p.
13988 (memrefs_conflict_p): Likewise.
13989 (init_alias_analysis): Likewise.
13990 * cfgexpand.c (expand_debug_expr): Likewise.
13991 * combine.c (combine_simplify_rtx, force_int_to_mode): Likewise.
13992 * cse.c (fold_rtx): Likewise.
13993 * explow.c (adjust_stack, anti_adjust_stack): Likewise.
13994 * expr.c (emit_block_move_hints): Likewise.
13995 (clear_storage_hints, push_block, emit_push_insn): Likewise.
13996 (store_expr_with_bounds, reduce_to_bit_field_precision): Likewise.
13997 (emit_group_load_1): Use rtx_to_poly_int64 for group offsets.
13998 (emit_group_store): Likewise.
13999 (find_args_size_adjust): Use strip_offset. Use rtx_to_poly_int64
14000 to read the PRE/POST_MODIFY increment.
14001 * calls.c (store_one_arg): Use strip_offset.
14002 * rtlanal.c (rtx_addr_can_trap_p_1): Extend CONST_INT handling to
14004 (set_noop_p): Use rtx_to_poly_int64 for the elements selected
14006 * simplify-rtx.c (avoid_constant_pool_reference): Use strip_offset.
14007 (simplify_binary_operation_1): Extend CONST_INT handling to
14009 * var-tracking.c (compute_cfa_pointer): Take a poly_int64 rather
14010 than a HOST_WIDE_INT.
14011 (hard_frame_pointer_adjustment): Change from HOST_WIDE_INT to
14013 (adjust_mems, add_stores): Update accodingly.
14014 (vt_canonicalize_addr): Track polynomial offsets.
14015 (emit_note_insn_var_location): Likewise.
14016 (vt_add_function_parameter): Likewise.
14017 (vt_initialize): Likewise.
14019 2018-06-12 Jeff Law <law@redhat.com>
14021 * config.gcc (alpha*-*-freebsd*): Remove.
14022 * config/alpha/freebsd.h: Remove.
14024 2018-06-12 David Malcolm <dmalcolm@redhat.com>
14027 * spellcheck-tree.c (levenshtein_distance): Rename to...
14028 (get_edit_distance): ...this, and update for underlying renaming.
14029 * spellcheck-tree.h (levenshtein_distance): Rename to...
14030 (get_edit_distance): ...this.
14031 * spellcheck.c (levenshtein_distance): Rename to...
14032 (get_edit_distance): ...this. Convert from Levenshtein distance
14033 to Damerau-Levenshtein distance by supporting transpositions of
14034 adjacent characters. Rename "v1" to "v_next" and "v0" to
14036 (selftest::levenshtein_distance_unit_test_oneway): Rename to...
14037 (selftest::test_edit_distance_unit_test_oneway): ...this, and
14038 update for underlying renaming.
14039 (selftest::levenshtein_distance_unit_test): Rename to...
14040 (selftest::test_get_edit_distance_unit): ...this, and update for
14041 underlying renaming.
14042 (selftest::test_find_closest_string): Add example from PR 69968
14043 where transposition helps
14044 (selftest::test_metric_conditions): Update for renaming.
14045 (selftest::test_metric_conditions): Likewise.
14046 (selftest::spellcheck_c_tests): Likewise.
14047 * spellcheck.h (levenshtein_distance): Rename both overloads to...
14048 (get_edit_distance): ...this.
14049 (best_match::consider): Update for renaming.
14051 2018-06-12 Martin Sebor <msebor@redhat.com>
14053 PR tree-optimization/85259
14054 * builtins.c (compute_objsize): Handle constant offsets.
14055 * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Return
14056 true iff a warning has been issued.
14057 * gimple.h (gimple_nonartificial_location): New function.
14058 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Call
14059 gimple_nonartificial_location and handle -Wno-system-headers.
14060 (handle_builtin_stxncpy): Same.
14062 2018-06-12 Martin Sebor <msebor@redhat.com>
14065 * fold-const.c (operand_equal_p): Handle SAVE_EXPR.
14067 2018-06-12 Will Schmidt <will_schmidt@vnet.ibm.com>
14069 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add
14070 BUILTIN_VEC_XST entries for pointer to double and long long.
14072 2018-06-12 H.J. Lu <hongjiu.lu@intel.com>
14075 * config/i386/gnu-user.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
14077 * config/i386/gnu-user64.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
14080 2018-06-12 Martin Liska <mliska@suse.cz>
14082 * doc/options.texi: Document IntegerRange.
14084 2018-06-12 Martin Liska <mliska@suse.cz>
14086 * config/i386/i386.opt: Make MPX-related options as Deprecated.
14087 * opt-functions.awk: Handle Deprecated flag.
14088 * opts-common.c (decode_cmdline_option): Handle cl_deprecated
14090 (read_cmdline_option): Report warning for a deprecated option.
14091 * opts.h (struct cl_option): Add new field cl_deprecated.
14092 (CL_ERR_DEPRECATED): New.
14094 2018-06-12 Martin Liska <mliska@suse.cz>
14096 * doc/options.texi: Document Deprecated option flag.
14098 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
14100 * config/arc/arc-arch.h (arc_extras): New enum.
14101 (arc_cpu_t):Add field extra.
14102 (arc_cpu_types): Consider the extras.
14103 * config/arc/arc-cpus.def: Add extras info.
14104 * config/arc/arc-opts.h (processor_type): Consider extra field.
14105 * config/arc/arc.c (arc_override_options): Handle extra field.
14107 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
14109 * config/arc/arc-arch.h: Update ARC_OPTX macro.
14110 * config/arc/arc-options.def (ARC_OPTX): Introduce a new doc
14112 * config/arc/arc.c (arc_init): Update pic warning.
14113 (irq_range): Update irq range parsing warnings.
14114 (arc_override_options): Update various warning messages.
14115 (arc_handle_aux_attribute): Likewise.
14117 2018-06-12 Robert Suchanek <robert.suchanek@mips.com>
14119 * config/mips/i6400.md (i6400_fpu_fadd): Remove frint.
14121 2018-06-12 Jozef Lawrynowicz <jozef.l@mittosystems.com>
14123 * doc/sourcebuild.texi: Document usage of line number 0 in verify
14124 compiler messages directives.
14126 2018-06-12 Matthew Fortune <mfortune@gmail.com>
14128 * config/mips/mips-cpus.def: New MIPS_CPU for i6500.
14129 * config/mips/mips-tables.opt: Regenerate.
14130 * config/mips/mips.h (MIPS_ISA_LEVEL_SPEC): Mark i6500 as
14132 * doc/invoke.texi: Document -march=i6500.
14134 2018-06-12 Prachi Godbole <prachi.godbole@imgtec.com>
14136 * config/mips/i6400.md (i6400_gpmuldiv): Remove cpu_unit.
14137 (i6400_gpmul): Add cpu_unit.
14138 (i6400_gpdiv): Likewise.
14139 (i6400_msa_add_d): Update reservations.
14140 (i6400_msa_int_add) Likewise.
14141 (i6400_msa_short_logic3) Likewise.
14142 (i6400_msa_short_logic2) Likewise.
14143 (i6400_msa_short_logic) Likewise.
14144 (i6400_msa_move) Likewise.
14145 (i6400_msa_cmp) Likewise.
14146 (i6400_msa_short_float2) Likewise.
14147 (i6400_msa_div_d) Likewise.
14148 (i6400_msa_long_logic1) Likewise.
14149 (i6400_msa_long_logic2) Likewise.
14150 (i6400_msa_mult) Likewise.
14151 (i6400_msa_long_float2) Likewise.
14152 (i6400_msa_long_float4) Likewise.
14153 (i6400_msa_long_float5) Likewise.
14154 (i6400_msa_long_float8) Likewise.
14155 (i6400_fpu_fadd): Include frint type.
14156 (i6400_fpu_store): New define_insn_reservation.
14157 (i6400_fpu_load): Likewise.
14158 (i6400_fpu_move): Likewise.
14159 (i6400_fpu_fcmp): Likewise.
14160 (i6400_fpu_fmadd): Likewise.
14161 (i6400_int_mult): Include imul3nc type and update reservation.
14162 (i6400_int_div): Include idiv3 type and update reservation.
14163 (i6400_int_load): Update to check type not move_type.
14164 (i6400_int_store): Likewise.
14165 (i6400_int_prefetch): Set zero latency.
14167 2018-06-12 Eric Botcazou <ebotcazou@adacore.com>
14169 * gcc.c: Document new %@{...} sequence.
14170 (LINK_COMMAND_SPEC): Use it for the -L switches.
14171 (cpp_unique_options): Use it for the -I switches.
14172 (at_file_argbuf): New global variable.
14173 (in_at_file): Likewise.
14174 (alloc_args): Create at_file_argbuf.
14175 (clear_args): Truncate at_file_argbuf.
14176 (store_arg): If in_at_file, push the argument onto at_file_argbuf.
14177 (open_at_file): New function.
14178 (close_at_file): Likewise.
14179 (create_at_file): Delete.
14180 (do_spec_1) <'i'>: Use open_at_file/close_at_file.
14183 (validate_switches_from_spec): Deal with %@{...} sequence.
14184 (validate_switches): Likewise.
14185 (driver::finalize): Call clear_args.
14187 2018-06-11 Rasmus Villemoes <rasmus.villemoes@prevas.dk>
14189 * config/vx-common.h (USE_TM_CLONE_REGISTRY): #define to 0.
14191 2018-06-11 Martin Sebor <msebor@redhat.com>
14193 * doc/invoke.texi (-Wall): List -Wc++17-compat.
14194 (Wno-class-memaccess): Add @opindex.
14195 (Wno-templates, Wno-multiple-inheritance): Same.
14196 (Wno-virtual-inheritance, Wno-namespaces): Same.
14197 (Wno-pedantic, Wno-chkp, Wcoverage-mismatch): Same.
14198 (Wno-format-overflow, Wno-format-truncation): Same.
14199 (Wno-unused-local-typedefs, Walloc-size-larger-than): Same.
14200 (Wno-alloc-size-larger-than, Wframe-larger-than): Same
14201 (Wno-stack-usage, Wno-c++-compat, Wno-c++11-compat): Same.
14202 (Wno-c++14-compat, Wno-c++17-compat, Wno-openmp-simd): Same.
14203 (Wno-unsuffixed-float-constants, Wno-addr-space-convert): Same.
14204 (Wno-misspelled-isr): Same.
14206 2018-06-11 Martin Sebor <msebor@redhat.com>
14208 * PR tree-optimization/86083
14209 * tree-ssa-strlen.c (handle_char_store): Use tree_expr_nonzero_p.
14211 2018-06-11 Zhouyi Zhou <zhouzhouyi@gmail.com>
14213 * tree-eh.c (lower_eh_constructs_2): Add a comma to comment.
14215 2018-06-11 Segher Boessenkool <segher@kernel.crashing.org>
14218 * config/rs6000/rs6000.md (*movdi_internal32): Put constraint modifiers
14219 on the correct operand.
14220 (*movdi_internal64): Ditto.
14222 2018-06-11 Martin Liska <mliska@suse.cz>
14224 PR tree-optimization/86089
14225 * tree-ssa-strlen.c (get_string_length): Move back removed hunk.
14227 2018-06-11 Julia Koval <julia.koval@intel.com>
14229 * config/i386/vaesintrin.h (_mm_aesdec_epi128, _mm_aesdeclast_epi128)
14230 _mm_aesenc_epi128, _mm_aesenclast_epi128: Remove.
14231 * config/i386/vpclmulqdqintrin.h (_mm_clmulepi64_epi128): Remove.
14233 2018-06-11 Olivier Hainque <hainque@adacore.com>
14235 * dwarf2out.c (gen_compile_unit_die): Fallout to DW_LANG_Ada83
14236 for Ada with strict dwarf2.
14238 2018-06-08 Peter Bergner <bergner@vnet.ibm.com>
14241 * config/rs6000/rs6000.c (mem_operand_gpr): Enable PRE_INC and PRE_DEC
14244 2018-06-08 Jan Hubicka <hubicka@ucw.cz>
14246 * dumpfile.c (FIRST_ME_AUTO_NUMBERED_DUMP): Bump to 4.
14248 2018-06-08 David Edelsohn <dje.gcc@gmail.com>
14250 * config/rs6000/rs6000.c (rs6000_passes_ieee128): Protect with #if
14253 2018-06-08 Martin Liska <mliska@suse.cz>
14255 * tree-cfg.h (debug_function): Fix argument type to match
14258 2018-06-08 Martin Liska <mliska@suse.cz>
14260 * config/powerpcspe/powerpcspe.c (rs6000_xcoff_visibility):
14261 Remove usage of MPX-related (and removed) fields.
14262 * config/rs6000/rs6000.c (rs6000_xcoff_visibility): Likewise.
14264 2018-06-08 David Malcolm <dmalcolm@redhat.com>
14266 * cfg.c (debug): Use TDF_NONE rather than 0.
14267 * cfghooks.c (debug): Likewise.
14268 * dumpfile.c (DUMP_FILE_INFO): Likewise; also for OPTGROUP.
14269 (struct dump_option_value_info): Convert to...
14270 (struct kv_pair): ...this template type.
14271 (dump_options): Convert to kv_pair<dump_flags_t>; use TDF_NONE
14273 (optinfo_verbosity_options): Likewise.
14274 (optgroup_options): Convert to kv_pair<optgroup_flags_t>; use
14276 (gcc::dump_manager::dump_register): Use optgroup_flags_t rather
14277 than int for "optgroup_flags" param.
14278 (dump_generic_expr_loc): Use dump_flags_t rather than int for
14280 (dump_dec): Likewise.
14281 (dump_finish): Use TDF_NONE rather than 0.
14282 (gcc::dump_manager::opt_info_enable_passes): Use optgroup_flags_t
14283 rather than int for "optgroup_flags" param. Use TDF_NONE rather
14284 than 0. Update for change to option_ptr.
14285 (opt_info_switch_p_1): Convert "optgroup_flags" param from int *
14286 to optgroup_flags_t *. Use TDF_NONE and OPTGROUP_NONE rather than
14287 0. Update for changes to optinfo_verbosity_options and
14289 (opt_info_switch_p): Convert optgroup_flags from int to
14291 (dump_basic_block): Use dump_flags_t rather than int
14292 for "dump_kind" param.
14293 * dumpfile.h (TDF_ADDRESS, TDF_SLIM, TDF_RAW, TDF_DETAILS,
14294 TDF_STATS, TDF_BLOCKS, TDF_VOPS, TDF_LINENO, TDF_UID)
14295 TDF_STMTADDR, TDF_GRAPH, TDF_MEMSYMS, TDF_RHS_ONLY, TDF_ASMNAME,
14296 TDF_EH, TDF_NOUID, TDF_ALIAS, TDF_ENUMERATE_LOCALS, TDF_CSELIB,
14297 TDF_SCEV, TDF_GIMPLE, TDF_FOLDING, MSG_OPTIMIZED_LOCATIONS,
14298 MSG_MISSED_OPTIMIZATION, MSG_NOTE, MSG_ALL, TDF_COMPARE_DEBUG,
14299 TDF_NONE): Convert from macros to...
14300 (enum dump_flag): ...this new enum.
14301 (dump_flags_t): Update to use enum.
14302 (operator|, operator&, operator~, operator|=, operator&=):
14303 Implement for dump_flags_t.
14304 (OPTGROUP_NONE, OPTGROUP_IPA, OPTGROUP_LOOP, OPTGROUP_INLINE,
14305 OPTGROUP_OMP, OPTGROUP_VEC, OPTGROUP_OTHER, OPTGROUP_ALL):
14306 Convert from macros to...
14307 (enum optgroup_flag): ...this new enum.
14308 (optgroup_flags_t): New typedef.
14309 (operator|, operator|=): Implement for optgroup_flags_t.
14310 (struct dump_file_info): Convert field "alt_flags" to
14311 dump_flags_t. Convert field "optgroup_flags" to
14313 (dump_basic_block): Use dump_flags_t rather than int for param.
14314 (dump_generic_expr_loc): Likewise.
14315 (dump_dec): Likewise.
14316 (dump_register): Convert param "optgroup_flags" to
14318 (opt_info_enable_passes): Likewise.
14319 * early-remat.c (early_remat::dump_edge_list): Use TDF_NONE rather
14321 * gimple-pretty-print.c (debug): Likewise.
14322 * gimple-ssa-store-merging.c (bswap_replace): Likewise.
14323 (merged_store_group::apply_stores): Likewise.
14324 * gimple-ssa-strength-reduction.c (insert_initializers): Likewise.
14325 * gimple.c (verify_gimple_pp): Likewise.
14326 * graphite-poly.c (print_pbb_body): Likewise.
14327 * passes.c (pass_manager::register_one_dump_file): Convert
14328 local "optgroup_flags" to optgroup_flags_t.
14329 * print-tree.c (print_node): Use TDF_NONE rather than 0.
14331 (debug_body): Likewise.
14332 * tree-pass.h (struct pass_data): Convert field "optgroup_flags"
14333 to optgroup_flags_t.
14334 * tree-pretty-print.c (print_struct_decl): Use TDF_NONE rather
14336 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Likewise.
14337 (convert_mult_to_fma): Likewise.
14338 * tree-ssa-reassoc.c (undistribute_ops_list): Likewise.
14339 * tree-ssa-sccvn.c (vn_eliminate): Likewise.
14340 * tree-vect-data-refs.c (dump_lower_bound): Convert param
14341 "dump_kind" to dump_flags_t.
14343 2018-06-08 Segher Boessenkool <segher@kernel.crashing.org>
14345 * config/rs6000/rs6000.c (min, max): Delete.
14347 2018-06-08 Segher Boessenkool <segher@kernel.crashing.org>
14349 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete mention of
14350 -mabi=spe and -mabi=no-spe.
14352 2018-06-08 Martin Liska <mliska@suse.cz>
14354 * ipa-pure-const.c (propagate_pure_const): Use ::get at places
14355 where we expect an existing summary.
14357 2018-06-08 Martin Liska <mliska@suse.cz>
14359 * ipa-inline-analysis.c (simple_edge_hints): Use ::get method.
14360 * ipa-inline.h (estimate_edge_growth): Likewise.
14362 2018-06-08 Martin Liska <mliska@suse.cz>
14364 * cgraph.c (function_version_hasher::hash): Use
14365 cgraph_node::get_uid ().
14366 (function_version_hasher::equal):
14367 * cgraph.h (cgraph_node::get_uid): New method.
14368 * ipa-inline.c (update_caller_keys): Use
14369 cgraph_node::get_uid ().
14370 (update_callee_keys): Likewise.
14371 * ipa-utils.c (searchc): Likewise.
14372 (ipa_reduced_postorder): Likewise.
14373 * lto-cgraph.c (input_node): Likewise.
14374 * passes.c (is_pass_explicitly_enabled_or_disabled): Likewise.
14375 * symbol-summary.h (symtab_insertion): Likewise.
14376 (symtab_removal): Likewise.
14377 (symtab_duplication): Likewise.
14378 * tree-pretty-print.c (dump_function_header): Likewise.
14379 * tree-sra.c (convert_callers_for_node): Likewise.
14381 2018-06-08 Martin Liska <mliska@suse.cz>
14383 * cgraph.c (symbol_table::create_edge): Always assign a new
14385 (symbol_table::free_edge): Do not recycle numbers.
14386 * cgraph.h (cgraph_edge::get): New method.
14387 * symbol-summary.h (symtab_removal): Use it.
14388 (symtab_duplication): Likewise.
14389 (call_summary::hashable_uid): Remove.
14391 2018-06-08 Martin Liska <mliska@suse.cz>
14393 * ipa-inline-analysis.c (inline_edge_removal_hook): Remove.
14394 (initialize_growth_caches): Remove.
14395 (free_growth_caches): Likewise.
14396 (do_estimate_edge_time): Use edge_growth_cache.
14397 (do_estimate_edge_size): Likewise.
14398 (do_estimate_edge_hints): Likewise.
14399 * ipa-inline.c (reset_edge_caches): Likewise.
14400 (recursive_inlining): Likewise.
14401 (inline_small_functions): Likewise.
14402 * ipa-inline.h (initialize_growth_caches): Remove.
14403 (estimate_edge_size): Likewise.
14404 (estimate_edge_time): Likewise.
14405 (estimate_edge_hints): Likewise.
14406 (reset_edge_growth_cache): Likewise.
14407 * symbol-summary.h (call_summary::remove): New method.
14409 2018-06-08 Martin Liska <mliska@suse.cz>
14411 * ipa-cp.c (class edge_clone_summary): New summary.
14412 (grow_edge_clone_vectors): Remove.
14413 (ipcp_edge_duplication_hook): Remove.
14414 (class edge_clone_summary_t): New call_summary class.
14415 (ipcp_edge_removal_hook): Remove.
14416 (edge_clone_summary_t::duplicate): New function.
14417 (get_next_cgraph_edge_clone): Use edge_clone_summaries.
14418 (create_specialized_node): Likewise.
14419 (ipcp_driver): Initialize edge_clone_summaries and do not
14422 2018-06-08 Martin Liska <mliska@suse.cz>
14424 * symbol-summary.h (get): New function.
14425 (call_summary::m_initialize_when_cloning): New class member.
14427 2018-06-08 Martin Liska <mliska@suse.cz>
14429 * cgraph.c (cgraph_node::remove): Do not recycle uid.
14430 * cgraph.h (symbol_table::release_symbol): Do not pass uid.
14431 (symbol_table::allocate_cgraph_symbol): Do not set uid.
14432 * passes.c (uid_hash_t): Record removed_nodes by their uids.
14433 (remove_cgraph_node_from_order): Use the removed_nodes set.
14434 (do_per_function_toporder): Likwise.
14435 * symbol-summary.h (symtab_insertion): Use cgraph_node::uid
14436 instead of summary_uid.
14437 (symtab_removal): Likewise.
14438 (symtab_duplication): Likewise.
14440 2018-06-08 Martin Liska <mliska@suse.cz>
14442 * ipa-cp.c (ipcp_store_bits_results): Use
14443 ipcp_transformation_sum.
14444 (ipcp_store_vr_results): Likewise.
14445 * ipa-prop.c (ipcp_grow_transformations_if_necessary): Renamed
14447 (ipcp_transformation_initialize): ... this.
14448 (ipa_set_node_agg_value_chain):
14449 (ipa_node_params_t::duplicate): Use ipcp_transformation_sum.
14450 (write_ipcp_transformation_info): Likewise.
14451 (read_ipcp_transformation_info): Likewise.
14452 (ipcp_update_bits): Likewise.
14453 (ipcp_update_vr): Likewise.
14454 (ipcp_transform_function): Likewise.
14455 * ipa-prop.h: Rename ipcp_transformation_summary to
14456 ipcp_transformation.
14457 (class ipcp_transformation_t): New function summary.
14458 (ipcp_get_transformation_summary): Use ipcp_transformation_sum.
14459 (ipa_get_agg_replacements_for_node): Likewise.
14461 2018-06-08 Martin Liska <mliska@suse.cz>
14463 * ipa-pure-const.c (struct funct_state_d): Do it class instead
14465 (class funct_state_summary_t): New function_summary class.
14466 (has_function_state): Remove.
14467 (get_function_state): Likewise.
14468 (set_function_state): Likewise.
14469 (add_new_function): Likewise.
14470 (funct_state_summary_t::insert): New function.
14471 (duplicate_node_data): Remove.
14472 (remove_node_data): Remove.
14473 (funct_state_summary_t::duplicate): New function.
14474 (register_hooks): Create new funct_state_summaries.
14475 (pure_const_generate_summary): Use it.
14476 (pure_const_write_summary): Likewise.
14477 (pure_const_read_summary): Likewise.
14478 (propagate_pure_const): Likewise.
14479 (propagate_nothrow): Likewise.
14480 (dump_malloc_lattice): Likewise.
14481 (propagate_malloc): Likewise.
14482 (execute): Do not register hooks, just remove summary
14484 (pass_ipa_pure_const::pass_ipa_pure_const): Simplify
14487 2018-06-08 Martin Liska <mliska@suse.cz>
14489 * ipa-reference.c (remove_node_data): Remove.
14490 (duplicate_node_data): Likewise.
14491 (class ipa_ref_var_info_summary_t): New class.
14492 (class ipa_ref_opt_summary_t): Likewise.
14493 (get_reference_vars_info): Use ipa_ref_var_info_summaries.
14494 (get_reference_optimization_summary): Use
14495 ipa_ref_opt_sum_summaries.
14496 (set_reference_vars_info): Remove.
14497 (set_reference_optimization_summary): Likewise.
14498 (ipa_init): Create summaries.
14499 (init_function_info): Use function summary.
14500 (ipa_ref_opt_summary_t::duplicate): New function.
14501 (ipa_ref_opt_summary_t::remove): New function.
14502 (get_read_write_all_from_node): Fix GNU coding style.
14503 (propagate): Use function summary.
14504 (write_node_summary_p): Fix GNU coding style.
14505 (stream_out_bitmap): Likewise.
14506 (ipa_reference_read_optimization_summary): Use function summary.
14507 (ipa_reference_c_finalize): Do not release hooks.
14509 2018-06-08 Martin Liska <mliska@suse.cz>
14511 * ipa-fnsummary.c (dump_ipa_call_summary): Use ::get method.
14512 (analyze_function_body): Extract multiple calls of get_create.
14513 * ipa-inline-analysis.c (simple_edge_hints): Likewise.
14514 * ipa-inline.c (recursive_inlining): Use ::get method.
14515 * ipa-inline.h (estimate_edge_growth): Likewise.
14517 2018-06-08 Martin Liska <mliska@suse.cz>
14519 * hsa-common.h (enum hsa_function_kind): Rename HSA_NONE to
14521 (hsa_function_summary::hsa_function_summary): Use the new enum
14523 (hsa_gpu_implementation_p): Use hsa_summaries::get.
14524 * hsa-gen.c (hsa_get_host_function): Likewise.
14525 (get_brig_function_name): Likewise.
14526 * ipa-hsa.c (process_hsa_functions): Likewise.
14527 (ipa_hsa_write_summary): Likewise.
14528 * symbol-summary.h (symtab_duplication): Use ::get function/
14529 (get): New function.
14531 2018-06-08 Martin Liska <mliska@suse.cz>
14533 * config/i386/i386.c (ix86_can_inline_p): Use get_create instead
14535 * hsa-common.c (hsa_summary_t::link_functions): Likewise.
14536 (hsa_register_kernel): Likewise.
14537 * hsa-common.h (hsa_gpu_implementation_p): Likewise.
14538 * hsa-gen.c (hsa_get_host_function): Likewise.
14539 (get_brig_function_name): Likewise.
14540 (generate_hsa): Likewise.
14541 (pass_gen_hsail::execute): Likewise.
14542 * ipa-cp.c (ipcp_cloning_candidate_p): Likewise.
14543 (devirtualization_time_bonus): Likewise.
14544 (ipcp_propagate_stage): Likewise.
14545 * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
14546 (edge_set_predicate): Likewise.
14547 (evaluate_conditions_for_known_args): Likewise.
14548 (evaluate_properties_for_edge): Likewise.
14549 (ipa_fn_summary::reset): Likewise.
14550 (ipa_fn_summary_t::duplicate): Likewise.
14551 (dump_ipa_call_summary): Likewise.
14552 (ipa_dump_fn_summary): Likewise.
14553 (analyze_function_body): Likewise.
14554 (compute_fn_summary): Likewise.
14555 (estimate_edge_devirt_benefit): Likewise.
14556 (estimate_edge_size_and_time): Likewise.
14557 (estimate_calls_size_and_time): Likewise.
14558 (estimate_node_size_and_time): Likewise.
14559 (inline_update_callee_summaries): Likewise.
14560 (remap_edge_change_prob): Likewise.
14561 (remap_edge_summaries): Likewise.
14562 (ipa_merge_fn_summary_after_inlining): Likewise.
14563 (ipa_update_overall_fn_summary): Likewise.
14564 (read_ipa_call_summary): Likewise.
14565 (inline_read_section): Likewise.
14566 (write_ipa_call_summary): Likewise.
14567 (ipa_fn_summary_write): Likewise.
14568 (ipa_free_fn_summary): Likewise.
14569 * ipa-hsa.c (process_hsa_functions): Likewise.
14570 (ipa_hsa_write_summary): Likewise.
14571 (ipa_hsa_read_section): Likewise.
14572 * ipa-icf.c (sem_function::merge): Likewise.
14573 * ipa-inline-analysis.c (simple_edge_hints): Likewise.
14574 (do_estimate_edge_time): Likewise.
14575 (estimate_size_after_inlining): Likewise.
14576 (estimate_growth): Likewise.
14577 (growth_likely_positive): Likewise.
14578 * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
14579 (inline_call): Likewise.
14580 * ipa-inline.c (caller_growth_limits): Likewise.
14581 (can_inline_edge_p): Likewise.
14582 (can_inline_edge_by_limits_p): Likewise.
14583 (compute_uninlined_call_time): Likewise.
14584 (compute_inlined_call_time): Likewise.
14585 (want_inline_small_function_p): Likewise.
14586 (edge_badness): Likewise.
14587 (update_caller_keys): Likewise.
14588 (update_callee_keys): Likewise.
14589 (recursive_inlining): Likewise.
14590 (inline_small_functions): Likewise.
14591 (inline_to_all_callers_1): Likewise.
14592 (dump_overall_stats): Likewise.
14593 (early_inline_small_functions): Likewise.
14594 (early_inliner): Likewise.
14595 * ipa-inline.h (estimate_edge_growth): Likewise.
14596 * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
14597 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
14598 * ipa-prop.h (IPA_NODE_REF): Likewise.
14599 (IPA_EDGE_REF): Likewise.
14600 * ipa-pure-const.c (malloc_candidate_p): Likewise.
14601 (propagate_malloc): Likewise.
14602 * ipa-split.c (execute_split_functions): Likewise.
14603 * symbol-summary.h: Rename get to get_create.
14605 (get_create): Likewise.
14606 * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
14608 2018-06-08 Martin Liska <mliska@suse.cz>
14610 * symbol-summary.h (release): Move definition out of class
14612 (symtab_removal): Likewise.
14613 (symtab_duplication): Likewise.
14615 2018-06-08 Martin Liska <mliska@suse.cz>
14617 * symbol-summary.h (function_summary): Move constructor
14618 implementation out of class declaration.
14619 (release): Likewise.
14620 (symtab_insertion): Likewise.
14621 (symtab_removal): Likewise.
14622 (symtab_duplication): Likewise.
14625 2018-06-08 Martin Liska <mliska@suse.cz>
14627 * Makefile.in: Remove support for MPX (macros, related functions,
14628 fields in cgraph_node, ...).
14629 * builtin-types.def (BT_BND): Likewise.
14630 (BT_FN_BND_CONST_PTR): Likewise.
14631 (BT_FN_CONST_PTR_BND): Likewise.
14632 (BT_FN_VOID_PTR_BND): Likewise.
14633 (BT_FN_BND_CONST_PTR_SIZE): Likewise.
14634 (BT_FN_VOID_CONST_PTR_BND_CONST_PTR): Likewise.
14635 * builtins.c (expand_builtin_memcpy_with_bounds): Likewise.
14636 (expand_builtin_mempcpy_with_bounds): Likewise.
14637 (expand_builtin_memset_with_bounds): Likewise.
14638 (expand_builtin_memset_args): Likewise.
14639 (std_expand_builtin_va_start): Likewise.
14640 (expand_builtin): Likewise.
14641 (expand_builtin_with_bounds): Likewise.
14642 * builtins.def (DEF_BUILTIN_CHKP): Likewise.
14643 (DEF_LIB_BUILTIN_CHKP): Likewise.
14644 (DEF_EXT_LIB_BUILTIN_CHKP): Likewise.
14645 (DEF_CHKP_BUILTIN): Likewise.
14646 (BUILT_IN_MEMCPY): Likewise.
14647 (BUILT_IN_MEMMOVE): Likewise.
14648 (BUILT_IN_MEMPCPY): Likewise.
14649 (BUILT_IN_MEMSET): Likewise.
14650 (BUILT_IN_STPCPY): Likewise.
14651 (BUILT_IN_STRCAT): Likewise.
14652 (BUILT_IN_STRCHR): Likewise.
14653 (BUILT_IN_STRCPY): Likewise.
14654 (BUILT_IN_STRLEN): Likewise.
14655 (BUILT_IN_MEMCPY_CHK): Likewise.
14656 (BUILT_IN_MEMMOVE_CHK): Likewise.
14657 (BUILT_IN_MEMPCPY_CHK): Likewise.
14658 (BUILT_IN_MEMSET_CHK): Likewise.
14659 (BUILT_IN_STPCPY_CHK): Likewise.
14660 (BUILT_IN_STRCAT_CHK): Likewise.
14661 (BUILT_IN_STRCPY_CHK): Likewise.
14662 * calls.c (store_bounds): Likewise.
14663 (emit_call_1): Likewise.
14664 (special_function_p): Likewise.
14665 (maybe_warn_nonstring_arg): Likewise.
14666 (initialize_argument_information): Likewise.
14667 (finalize_must_preallocate): Likewise.
14668 (compute_argument_addresses): Likewise.
14669 (expand_call): Likewise.
14670 * cfgexpand.c (expand_call_stmt): Likewise.
14671 (expand_return): Likewise.
14672 (expand_gimple_stmt_1): Likewise.
14673 (pass_expand::execute): Likewise.
14674 * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Likewise.
14675 (cgraph_node::remove): Likewise.
14676 (cgraph_node::dump): Likewise.
14677 (cgraph_node::verify_node): Likewise.
14678 * cgraph.h (chkp_function_instrumented_p): Likewise.
14679 (symtab_node::get_alias_target): Likewise.
14680 (cgraph_node::can_remove_if_no_direct_calls_and_refs_p): Likewise.
14681 (cgraph_local_p): Likewise.
14682 * cgraphbuild.c (cgraph_edge::rebuild_edges): Likewise.
14683 (cgraph_edge::rebuild_references): Likewise.
14684 * cgraphunit.c (varpool_node::finalize_decl): Likewise.
14685 (walk_polymorphic_call_targets): Likewise.
14686 (cgraph_node::expand_thunk): Likewise.
14687 (symbol_table::output_weakrefs): Likewise.
14688 * common/config/i386/i386-common.c (OPTION_MASK_ISA2_GENERAL_REGS_ONLY_UNSET): Likewise.
14689 (ix86_handle_option): Likewise.
14690 * config/i386/constraints.md: Likewise.
14691 * config/i386/i386-builtin-types.def (BND): Likewise.
14695 * config/i386/i386-builtin.def (BDESC_END): Likewise.
14696 (BDESC_FIRST): Likewise.
14698 * config/i386/i386-c.c (ix86_target_macros_internal): Likewise.
14699 * config/i386/i386-protos.h (ix86_bnd_prefixed_insn_p): Likewise.
14700 * config/i386/i386.c (enum reg_class): Likewise.
14701 (ix86_target_string): Likewise.
14702 (ix86_option_override_internal): Likewise.
14703 (ix86_conditional_register_usage): Likewise.
14704 (ix86_valid_target_attribute_inner_p): Likewise.
14705 (ix86_set_indirect_branch_type): Likewise.
14706 (ix86_set_current_function): Likewise.
14707 (ix86_function_arg_regno_p): Likewise.
14708 (init_cumulative_args): Likewise.
14709 (ix86_function_arg_advance): Likewise.
14710 (ix86_function_arg): Likewise.
14711 (ix86_pass_by_reference): Likewise.
14712 (ix86_function_value_regno_p): Likewise.
14713 (ix86_function_value_1): Likewise.
14714 (ix86_function_value_bounds): Likewise.
14715 (ix86_return_in_memory): Likewise.
14716 (ix86_setup_incoming_vararg_bounds): Likewise.
14717 (ix86_va_start): Likewise.
14718 (indirect_thunk_need_prefix): Likewise.
14719 (print_reg): Likewise.
14720 (ix86_print_operand): Likewise.
14721 (ix86_expand_call): Likewise.
14722 (ix86_output_function_return): Likewise.
14723 (reg_encoded_number): Likewise.
14724 (BDESC_VERIFYS): Likewise.
14725 (ix86_init_mpx_builtins): Likewise.
14726 (ix86_init_builtins): Likewise.
14727 (ix86_emit_cmove): Likewise.
14728 (ix86_emit_move_max): Likewise.
14729 (ix86_expand_builtin): Likewise.
14730 (ix86_builtin_mpx_function): Likewise.
14731 (ix86_get_arg_address_for_bt): Likewise.
14732 (ix86_load_bounds): Likewise.
14733 (ix86_store_bounds): Likewise.
14734 (ix86_load_returned_bounds): Likewise.
14735 (ix86_store_returned_bounds): Likewise.
14736 (ix86_class_likely_spilled_p): Likewise.
14737 (ix86_hard_regno_mode_ok): Likewise.
14738 (x86_order_regs_for_local_alloc): Likewise.
14739 (ix86_mitigate_rop): Likewise.
14740 (ix86_bnd_prefixed_insn_p): Likewise.
14741 (ix86_mpx_bound_mode): Likewise.
14742 (ix86_make_bounds_constant): Likewise.
14743 (ix86_initialize_bounds): Likewise.
14744 (TARGET_LOAD_BOUNDS_FOR_ARG): Likewise.
14745 (TARGET_STORE_BOUNDS_FOR_ARG): Likewise.
14746 (TARGET_LOAD_RETURNED_BOUNDS): Likewise.
14747 (TARGET_STORE_RETURNED_BOUNDS): Likewise.
14748 (TARGET_CHKP_BOUND_MODE): Likewise.
14749 (TARGET_BUILTIN_CHKP_FUNCTION): Likewise.
14750 (TARGET_CHKP_FUNCTION_VALUE_BOUNDS): Likewise.
14751 (TARGET_CHKP_MAKE_BOUNDS_CONSTANT): Likewise.
14752 (TARGET_CHKP_INITIALIZE_BOUNDS): Likewise.
14753 * config/i386/i386.h (TARGET_MPX): Likewise.
14754 (TARGET_MPX_P): Likewise.
14755 (VALID_BND_REG_MODE): Likewise.
14756 (FIRST_BND_REG): Likewise.
14757 (LAST_BND_REG): Likewise.
14758 (enum reg_class): Likewise.
14759 (BND_REG_P): Likewise.
14760 (BND_REGNO_P): Likewise.
14761 (BNDmode): Likewise.
14762 (ADJUST_INSN_LENGTH): Likewise.
14763 * config/i386/i386.md: Likewise.
14764 * config/i386/i386.opt: Likewise.
14765 * config/i386/linux-common.h (LIBMPX_LIBS): Likewise.
14766 (defined): Likewise.
14767 (LINK_MPX): Likewise.
14768 (MPX_SPEC): Likewise.
14769 (LIBMPX_SPEC): Likewise.
14770 (LIBMPXWRAPPERS_SPEC): Likewise.
14771 (CHKP_SPEC): Likewise.
14772 * config/i386/predicates.md: Likewise.
14773 * dbxout.c (dbxout_type): Likewise.
14774 * doc/extend.texi: Likewise.
14775 * doc/invoke.texi: Likewise.
14776 * doc/md.texi: Likewise.
14777 * doc/tm.texi: Likewise.
14778 * doc/tm.texi.in: Likewise.
14779 * dwarf2out.c (is_base_type): Likewise.
14780 (gen_formal_types_die): Likewise.
14781 (gen_subprogram_die): Likewise.
14782 (gen_type_die_with_usage): Likewise.
14783 (gen_decl_die): Likewise.
14784 (dwarf2out_late_global_decl): Likewise.
14785 * expr.c (expand_assignment): Likewise.
14786 (emit_storent_insn): Likewise.
14787 (store_expr_with_bounds): Likewise.
14788 (store_expr): Likewise.
14789 (expand_expr_real_1): Likewise.
14790 * expr.h (store_expr_with_bounds): Likewise.
14791 * function.c (use_register_for_decl): Likewise.
14792 (struct bounds_parm_data): Likewise.
14793 (assign_parms_augmented_arg_list): Likewise.
14794 (assign_parm_find_entry_rtl): Likewise.
14795 (assign_parm_is_stack_parm): Likewise.
14796 (assign_parm_load_bounds): Likewise.
14797 (assign_bounds): Likewise.
14798 (assign_parms): Likewise.
14799 (expand_function_start): Likewise.
14800 * gcc.c (CHKP_SPEC): Likewise.
14801 * gimple-fold.c (gimple_fold_builtin_memory_op): Likewise.
14802 * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Likewise.
14803 (wrestrict_dom_walker::check_call): Likewise.
14804 * gimple.c (gimple_build_call_from_tree): Likewise.
14805 * gimple.h (enum gf_mask): Likewise.
14806 (gimple_call_with_bounds_p): Likewise.
14807 (gimple_call_set_with_bounds): Likewise.
14808 * gimplify.c (gimplify_init_constructor): Likewise.
14809 * ipa-cp.c (initialize_node_lattices): Likewise.
14810 (propagate_constants_across_call): Likewise.
14811 (find_more_scalar_values_for_callers_subset): Likewise.
14812 * ipa-hsa.c (process_hsa_functions): Likewise.
14813 * ipa-icf-gimple.c (func_checker::compare_gimple_call): Likewise.
14814 * ipa-icf.c (sem_function::merge): Likewise.
14815 * ipa-inline.c (early_inliner): Likewise.
14816 * ipa-pure-const.c (warn_function_noreturn): Likewise.
14817 (warn_function_cold): Likewise.
14818 (propagate_pure_const): Likewise.
14819 * ipa-ref.h (enum GTY): Likewise.
14820 * ipa-split.c (find_retbnd): Likewise.
14821 (consider_split): Likewise.
14822 (split_function): Likewise.
14823 * ipa-visibility.c (cgraph_externally_visible_p): Likewise.
14824 * ipa.c (walk_polymorphic_call_targets): Likewise.
14825 (symbol_table::remove_unreachable_nodes): Likewise.
14826 (process_references): Likewise.
14827 (cgraph_build_static_cdtor_1): Likewise.
14828 * lto-cgraph.c (lto_output_node): Likewise.
14829 (output_refs): Likewise.
14830 (compute_ltrans_boundary): Likewise.
14831 (input_overwrite_node): Likewise.
14832 (input_node): Likewise.
14833 (input_cgraph_1): Likewise.
14834 * params.def (PARAM_CHKP_MAX_CTOR_SIZE): Likewise.
14835 * passes.c (pass_manager::execute_early_local_passes): Likewise.
14836 (class pass_chkp_instrumentation_passes): Likewise.
14837 (make_pass_chkp_instrumentation_passes): Likewise.
14838 * passes.def: Likewise.
14839 * rtl.h (struct GTY): Likewise.
14840 (CALL_EXPR_WITH_BOUNDS_P): Likewise.
14841 * stor-layout.c (layout_type): Likewise.
14842 * symtab.c: Likewise.
14843 * target.def: Likewise.
14844 * targhooks.c (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 * targhooks.h (default_chkp_bound_type): Likewise.
14851 (default_chkp_bound_mode): Likewise.
14852 (default_builtin_chkp_function): Likewise.
14853 (default_chkp_function_value_bounds): Likewise.
14854 (default_chkp_make_bounds_constant): Likewise.
14855 (default_chkp_initialize_bounds): Likewise.
14856 * toplev.c (compile_file): Likewise.
14857 (process_options): Likewise.
14858 * tree-core.h (DEF_BUILTIN): Likewise.
14859 (DEF_BUILTIN_CHKP): Likewise.
14860 * tree-inline.c (declare_return_variable): Likewise.
14861 (remap_gimple_stmt): Likewise.
14862 (copy_bb): Likewise.
14863 (initialize_inlined_parameters): Likewise.
14864 (expand_call_inline): Likewise.
14865 * tree-pass.h (make_pass_ipa_chkp_versioning): Likewise.
14866 (make_pass_ipa_chkp_early_produce_thunks): Likewise.
14867 (make_pass_ipa_chkp_produce_thunks): Likewise.
14868 (make_pass_chkp): Likewise.
14869 (make_pass_chkp_opt): Likewise.
14870 (make_pass_chkp_instrumentation_passes): Likewise.
14871 * tree-pretty-print.c (dump_generic_node): Likewise.
14872 * tree-ssa-ccp.c (insert_clobber_before_stack_restore): Likewise.
14873 * tree-ssa-dce.c (propagate_necessity): Likewise.
14874 (eliminate_unnecessary_stmts): Likewise.
14875 * tree-ssa-pre.c (create_expression_by_pieces): Likewise.
14876 * tree-ssa-sccvn.c (copy_reference_ops_from_call): Likewise.
14877 * tree-ssa-sccvn.h: Likewise.
14878 * tree-ssa-strlen.c (get_string_length): Likewise.
14879 (valid_builtin_call): Likewise.
14880 (adjust_last_stmt): Likewise.
14881 (handle_builtin_strchr): Likewise.
14882 (handle_builtin_strcpy): Likewise.
14883 (handle_builtin_stxncpy): Likewise.
14884 (handle_builtin_memcpy): Likewise.
14885 (handle_builtin_strcat): Likewise.
14886 (strlen_check_and_optimize_stmt): Likewise.
14887 * tree-stdarg.c (expand_ifn_va_arg_1): Likewise.
14888 * tree-streamer-in.c: Likewise.
14889 * tree-streamer.c (record_common_node): Likewise.
14890 * tree.c (tree_code_size): Likewise.
14891 (wide_int_to_tree_1): Likewise.
14892 (type_contains_placeholder_1): Likewise.
14893 (build_common_tree_nodes): Likewise.
14894 * tree.def (POINTER_BOUNDS_TYPE): Likewise.
14895 * tree.h (POINTER_BOUNDS_TYPE_P): Likewise.
14896 (POINTER_BOUNDS_P): Likewise.
14897 (BOUNDED_TYPE_P): Likewise.
14898 (BOUNDED_P): Likewise.
14899 (CALL_WITH_BOUNDS_P): Likewise.
14900 (pointer_bounds_type_node): Likewise.
14901 * value-prof.c (gimple_ic): Likewise.
14902 * var-tracking.c (vt_add_function_parameters): Likewise.
14903 * varasm.c (make_decl_rtl): Likewise.
14904 (assemble_start_function): Likewise.
14905 (output_constant): Likewise.
14906 (maybe_assemble_visibility): Likewise.
14907 * varpool.c (ctor_for_folding): Likewise.
14908 * chkp-builtins.def: Remove.
14909 * ipa-chkp.c: Remove.
14910 * ipa-chkp.h: Remove.
14911 * rtl-chkp.c: Remove.
14912 * rtl-chkp.h: Remove.
14913 * tree-chkp-opt.c: Remove.
14914 * tree-chkp.c: Remove.
14915 * tree-chkp.h: Remove.
14917 2018-06-07 Carl Love <cel@us.ibm.com>
14919 * config/rs6000/vsx.md (vextract_fp_from_shorth,
14920 vextract_fp_from_shortl): Add BE support.
14922 2018-06-07 Paul Koning <ni1d@arrl.net>
14924 * compare-elim.c (try_merge_compare): Don't merge compare if
14925 address contains a side effect.
14926 (try_eliminate_compare): Likewise.
14928 2018-06-07 Olga Makhotina <olga.makhotina@intel.com>
14930 * config.gcc: Support "tremont".
14931 * config/i386/driver-i386.c (host_detect_local_cpu): Detect "tremont".
14932 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
14934 * config/i386/i386.c (m_TREMONT): Define.
14935 (processor_target_table): Add "tremont".
14936 (PTA_TREMONT): Define.
14937 (ix86_lea_outperforms): Add TARGET_TREMONT.
14938 (get_builtin_code_for_version): Handle PROCESSOR_TREMONT.
14939 (fold_builtin_cpu): Add M_INTEL_TREMONT, replace M_INTEL_GOLDMONT
14940 and M_INTEL_GOLDMONT_PLUS.
14941 (fold_builtin_cpu): Add "tremont".
14942 (ix86_add_stmt_cost): Add TARGET_TREMONT.
14943 (ix86_option_override_internal): Add "tremont".
14944 * config/i386/i386.h (processor_costs): Define TARGET_TREMONT.
14945 (processor_type): Add PROCESSOR_TREMONT.
14946 * config/i386/x86-tune.def: Add m_TREMONT.
14947 * doc/invoke.texi: Add tremont as x86 -march=/-mtune= CPU type.
14949 2018-06-07 Jozef Lawrynowicz <jozef.l@mittosystems.com>
14951 * config/msp430/msp430.c (msp430_mcu_name): Set the "i" in the
14952 symbol defined for msp430i* devices to be lower case.
14954 2018-06-07 Richard Biener <rguenther@suse.de>
14956 * graphite-sese-to-poly.c (extract_affine): Avoid unneded
14957 wrapping. Properly wrap the result of a BIT_NOT_EXPR.
14958 Properly wrap signed arithmetic if overflow wraps.
14960 2018-06-07 Jakub Jelinek <jakub@redhat.com>
14962 PR tree-optimization/69615
14963 * tree-ssa-reassoc.c (optimize_range_tests_var_bound): If rhs2 is lhs
14964 of a cast from a same precision integral SSA_NAME in a bb dominated
14965 by first_bb, retry with rhs2 set to the rhs1 of the cast. Don't emit
14966 cast to utype if rhs2 has already a compatible type.
14968 2018-06-07 Richard Biener <rguenther@suse.de>
14970 PR tree-optimization/85935
14971 * graphite-scop-detection.c (find_params_in_bb): Analyze
14972 condition operands with respect to the correct loop. Assert
14973 the analysis doesn't fail.
14975 2018-06-04 Carl Love <cel@us.ibm.com>
14977 * config/rs6000/vsx.md (first_match_index_<mode>): Calculate index
14978 using natural element order. Use gen_lshrsi3 instead of gen_ashrsi3
14979 as it is slightly cheaper.
14980 (first_match_or_eos_index_<mode>):
14981 Calculate index using natural element order.
14982 (first_match_index_<mode>):
14983 Calculate index using natural element order.
14984 (first_match_or_eos_index_<mode>):
14985 Calculate index using natural order.
14986 (define_insn vclzlsbb): Change to define_insn vclzlsbb_<mode>.
14987 for BE and LE modes.
14988 * config/rs6000/rs6000-c.c: Rename P9V_BUILTIN_VCLZLSBB,
14989 P9V_BUILTIN_VCLZLSBB_V16QI.
14990 * config/rs6000/rs6000-builtin.def: Make VCLZLSBB mode
14993 2018-06-06 Kelvin Nilsen <kelvin@gcc.gnu.org>
14995 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Adjust
14996 indentation and line wrap for many prototypes. Add missing
14997 @smallexample directives around block of prototypes for vec_xl and
15000 2018-06-05 Michael Meissner <meissner@linux.ibm.com>
15002 * config/rs6000/rs6000.c (rs6000_passes_ieee128): New boolean to
15003 track if we pass or return IEEE 128-bit floating point.
15004 (ieee128_mangling_gcc_8_1): New boolean to say whether to generate
15005 C++ mangling that is compatible with GCC 8.1.
15006 (TARGET_ASM_GLOBALIZE_DECL_NAME): Override target hook.
15007 (init_cumulative_args): Note if we pass or return IEEE 128-bit
15008 floating point types.
15009 (rs6000_function_arg_advance_1): Likewise.
15010 (rs6000_mangle_type): Optionally generate mangled names that match
15011 what GCC 8.1 generated for IEEE 128-bit floating point types.
15012 (rs6000_globalize_decl_name): If we have an external function that
15013 passes or returns IEEE 128-bit types, generate a weak reference
15014 from the mangled name used in GCC 8.1 to the current mangled
15016 (rs6000_init_builtins): Make __ibm128 use the long double type if
15017 long double is IBM extended double. Make __float128 use the long
15018 double type if long double is IEEE 128-bit.
15021 * config/rs6000/rs6000-builtin.def (BU_IBM128_2): New helper
15022 macro for __ibm128 built-in functions.
15023 (PACK_IF): Add __ibm128 pack/unpack functions.
15024 (UNPACK_IF): Likewise.
15025 * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Do not
15026 enable long double built-in functions if long double is IEEE
15027 128-bit floating point.
15028 (rs6000_invalid_builtin): Update long double built-in function
15030 (rs6000_expand_builtin): For PACK_IF and UNPACK_IF built-in
15031 functions, adjust the built-in function to use the long double
15032 built-in function if __ibm128 and long double are the same type.
15033 * doc/extend.texi (PowerPC builtins): Update documention for
15034 __builtin_{,un}pack_longdouble. Add documentation for
15035 __builtin_{,un}pack_ibm128.
15037 2018-06-06 Jim Wilson <jimw@sifive.com>
15039 * config/riscv/riscv.c (enum riscv_privilege_levels): New.
15040 (struct machine_function): New field interrupt_mode.
15041 (riscv_handle_type_attribute): New function. Add forward declaration.
15042 (riscv_attribute_table) <interrupt>: Use riscv_handle_type_attribute.
15043 (riscv_expand_epilogue): Check interrupt_mode field.
15044 (riscv_set_current_function): Check interrupt attribute args and
15045 set interrupt_mode field.
15046 * config/riscv/riscv.md (UNSPECV_SRET, UNSPECV_URET): New.
15047 (riscv_sret, riscv_uret): New.
15048 * doc/extend.texi (RISC-V Function Attributes) <interrupt>: Document
15049 new arguments to interrupt attribute.
15051 2018-06-06 Peter Bergner <bergner@vnet.ibm.com>
15054 * /config/rs6000/rs6000.h (ASM_CPU_SPEC): Add support for -mpower9.
15055 Don't handle -mcpu=power8 if -mpower9-vector is also used.
15057 2018-06-06 Kelvin Nilsen <kelvin@gcc.gnu.org>
15059 * config/rs6000/rs6000-builtin.def (VSX_BUILTIN_VEC_LD,
15060 VSX_BUILTIN_VEC_ST): Add comment to explain non-traditional uses.
15061 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
15062 several redundant entries.
15064 2018-06-06 David Malcolm <dmalcolm@redhat.com>
15066 * config/i386/i386-protos.h (ix86_expand_call): Strengthen return
15067 type from "rtx" to "rtx_insn *".
15068 * config/i386/i386.c (ix86_expand_split_stack_prologue): Likewise
15069 for local "call_insn", removing cast.
15070 (ix86_expand_call): Likewise, introducing a "call_insn" local.
15072 2018-06-06 Eric Botcazou <ebotcazou@adacore.com>
15074 PR tree-optimization/86066
15075 * gimple-ssa-store-merging.c (process_store): Do not bypass BIT_NOT_EXPR
15076 for BIT_INSERT_EXPR stores.
15078 2018-06-06 Richard Biener <rguenther@suse.de>
15080 PR tree-optimization/86062
15081 * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
15082 component refs ontop
15083 of to be offsetted base.
15085 2018-06-06 Jozef Lawrynowicz <jozef.l@mittosystems.com>
15087 * config/msp430/msp430.c (msp430_attr): Allow interrupt handlers
15088 to be static and remove check on interrupt attribute name.
15090 2018-06-05 Kelvin Nilsen <kelvin@gcc.gnu.org>
15092 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
15093 volatile qualifier from vec_lvsl and vec_lvsr argument prototypes.
15095 2018-06-05 Steve Ellcey <sellcey@cavium.com>
15098 * config/aarch64/aarch64-protos.h (aarch64_err_no_fpadvsimd): Remove
15100 * config/aarch64/aarch64-protos..c (aarch64_err_no_fpadvsimd):
15101 Remove second argument, change how error is called.
15102 (aarch64_layout_arg): Remove second argument from
15103 aarch64_err_no_fpadvsimd call.
15104 (aarch64_init_cumulative_args): Ditto.
15105 (aarch64_gimplify_va_arg_expr): Ditto.
15106 * config/aarch64/aarch64.md (mov<mode>): Ditto.
15108 2018-06-05 Uros Bizjak <ubizjak@gmail.com>
15110 * config/i386/i386.md (simple_return_indirect_internal): New expander.
15111 (*simple_return_indirect_internal<mode>): Rename from
15112 simple_return_indirect_internal. Use W mode iterator.
15113 (rstorssp): New expander.
15114 (*rstorssp<mode>): Rename from rstorssp. Use P mode iterator.
15115 (clrssbsy): New expander.
15116 (*clrssbsy<mode>): Rename from clrssbsy. Use P mode iterator.
15118 2018-06-05 Andre Vieira <andre.simoesdiasvieira@arm.com>
15120 * config/arm/arm_cmse.h (cmse_nsfptr_create): Change typeof to
15122 (cmse_check_pointed_object): Likewise.
15124 2018-06-05 Martin Liska <mliska@suse.cz>
15126 PR gcov-profile/47618
15127 * doc/invoke.texi: Document how -fprofile-dir format
15130 2018-06-05 Richard Biener <rguenther@suse.de>
15132 * tree-cfgcleanup.c (cleanup_control_flow_pre): For edge
15133 removal pretend DOM info isn't available so we do not update
15134 it and only remove edges, not dominated blocks. Actually free
15135 DOM info in case we removed something. Remove unreachable blocks.
15136 (mfb_keep_latches): Work with either DOM info or marked backedges.
15137 (cleanup_tree_cfg_noloop): Do not remove unreachable blocks
15138 first. Mark backedges if DOM info isn't available.
15139 (Re-)compute DOM info after cleanup_control_flow_pre.
15141 2018-06-05 Richard Biener <rguenther@suse.de>
15143 * tree-cfg.c (struct locus_discrim_map): Store line, not location.
15144 (locus_discrim_hasher::hash): Adjust.
15145 (locus_discrim_hasher::equal): Likewise.
15146 (next_discriminator_for_locus): Work on line directly.
15147 (same_line_p): Pass in expanded locus1 as well.
15148 (assign_discriminators): Avoid redundant location expansions.
15150 2018-06-05 Richard Biener <rguenther@suse.de>
15152 PR tree-optimization/86046
15153 * tree-ssa.c (maybe_optimize_var): Clear DECL_GIMPLE_REG_P
15154 if required after clearing TREE_ADDRESSABLE.
15156 2018-06-05 Richard Biener <rguenther@suse.de>
15158 PR tree-optimization/86047
15159 * tree-ssa-loop.c (for_each_index): Glob handling of all
15160 decls and constants and really handle all of them.
15162 2018-06-05 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
15165 * config/arm/arm-builtins.c (arm_type_qualifiers): Add
15166 qualifier_void_pointer and qualifier_const_void_pointer.
15167 (arm_ldc_qualifiers, arm_stc_qualifiers): Use the above.
15168 (arm_init_builtins): Handle the above.
15169 * config/arm/arm_acle.h (__arm_cdp, __arm_ldc, __arm_ldcl, __arm_stc,
15170 __arm_stcl, __arm_mcr, __arm_cdp2, __arm_ldc2, __arm_ldcl2, __arm_stc2,
15171 __arm_stcl2,__arm_mcr2, __arm_mcrr, __arm_mcrr2): Remove return for
15174 2018-06-05 Martin Liska <mliska@suse.cz>
15176 * auto-profile.c (read_autofdo_file): Do not use
15177 gcov_ctr_summary struct.
15178 (afdo_callsite_hot_enough_for_early_inline): Likewise.
15179 * coverage.c (struct counts_entry): Likewise.
15180 (read_counts_file): Read just single summary entry.
15181 (get_coverage_counts): Use gcov_summary struct.
15182 * coverage.h (get_coverage_counts): Likewise.
15183 * gcov-dump.c (dump_working_sets): Likewise.
15184 (tag_summary): Dump just single summary.
15185 * gcov-io.c (gcov_write_summary): Write just histogram
15187 (gcov_read_summary): Read just single summary.
15188 (compute_working_sets): Use gcov_summary struct.
15189 * gcov-io.h (GCOV_TAG_SUMMARY_LENGTH): Remove usage
15190 of GCOV_COUNTERS_SUMMABLE.
15191 (GCOV_COUNTERS_SUMMABLE): Remove.
15192 (GCOV_FIRST_VALUE_COUNTER): Replace with
15193 GCOV_COUNTER_V_INTERVAL.
15194 (struct gcov_ctr_summary): Remove.
15195 (struct gcov_summary): Directly use fields of former
15197 (compute_working_sets): Use gcov_summary struct.
15198 * gcov.c (read_count_file): Do not use ctrs fields.
15199 * lto-cgraph.c (merge_profile_summaries): Use gcov_summary
15201 * lto-streamer.h (struct GTY): Make profile_info gcov_summary
15203 * profile.c: Likewise.
15204 * profile.h: Likewise.
15206 2018-06-05 Martin Liska <mliska@suse.cz>
15208 PR gcov-profile/84846
15209 * gcov.c (output_lines): Print working directory only
15210 in intermediate format.
15212 2018-06-05 Andreas Krebbel <krebbel@linux.ibm.com>
15214 * config/s390/s390-builtin-types.def: Add void function type.
15215 * config/s390/s390-builtins.def: Use the function type for the
15218 2018-06-04 Jim Wilson <jimw@sifive.com>
15220 * config/riscv/riscv-protos.h (riscv_expand_epilogue): Change bool arg
15222 * config/riscv/riscv.c (riscv_for_each_saved_reg): New args epilogue
15223 and maybe_eh_return. Change regno to unsigned int. Use new args to
15224 handle EH_RETURN_DATA_REGNO registers properly.
15225 (riscv_expand_prologue): Pass new args to riscv_for_each_saved_reg.
15226 (riscv_expand_epilogue): Update comment. Change argument name and
15227 type. Update code to use new name and type. Pass new args to
15228 riscv_for_each_saved_reg. Only use EH_RETURN_STACKADJ_RTX when
15230 * config/riscv/riscv.md (NORMAL_RETURN): New.
15231 (SIBCALL_RETURN, EXCEPTION_RETURN): New.
15232 (epilogue, sibcall_epilogue): Update riscv_expand_epilogue arg.
15233 (eh_return): Call gen_eh_return_internal and emit barrier.
15234 (eh_return_internal): Call riscv_expand_epilogue.
15236 2018-06-04 Eric Botcazou <ebotcazou@adacore.com>
15238 * gimple-ssa-store-merging.c (struct merged_store_group): Move up
15239 bit_insertion field and declare can_be_merged_into method.
15240 (merged_store_group::can_be_merged_into): New method.
15241 (imm_store_chain_info::coalesce_immediate): Call it to decide whether
15242 consecutive non-overlapping stores can be merged. Turn MEM_REF stores
15243 into BIT_INSERT_EXPR stores if the group contains a non-MEM_REF store.
15245 2018-06-04 Richard Biener <rguenther@suse.de>
15247 PR tree-optimization/85955
15248 * builtins.c (fold_builtin_sincos): Convert pointers to
15249 destination to appropriate type before dereferencing.
15251 2018-06-04 Segher Boessenkool <segher@kernel.crashing.org>
15253 * config/rs6000/rs6000.md (abs<mode>2 for FLOAT128): Handle IFmode.
15255 2018-06-04 Richard Sandiford <richard.sandiford@linaro.org>
15257 * expr.c (expand_expr_real_1): Force the operand into memory if
15258 its TYPE_MODE is BLKmode and if there is no integer mode for
15259 the number of bits being extracted.
15261 2018-06-04 Jakub Jelinek <jakub@redhat.com>
15265 * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
15266 Use vptestnm rather than vptestm in (=Yc,v,C) variant.
15268 2018-06-04 Richard Biener <rguenther@suse.de>
15270 * tree-cfgcleanup.c (cleanup_tree_cfg_1): Fold into...
15271 (cleanup_tree_cfg_noloop): ... single caller. Do
15272 start_recording_case_labels later.
15274 2018-06-04 Sebastian Peryt <sebastian.peryt@intel.com>
15276 * config/i386/cldemoteintrin.h: Change define from _X86INTRIN_H_INCLUDED
15277 to _IMMINTRIN_H_INCLUDED.
15278 * config/i386/pconfigintrin.h: Ditto.
15279 * config/i386/waitpkgintrin.h: Ditto.
15280 * config/i386/immintrin.h: Add includes for sgxintrin.h,
15281 pconfigintrin.h, waitpkgintrin.h and cldemoteintrin.h.
15282 * config/i386/x86intrin.h: Remove includes for mintrin.h, xmmintrin.h,
15283 emmintrin.h, pmmintrin.h, tmmintrin.h, smmintrin.h, wmmintrin.h,
15284 bmiintrin.h, bmi2intrin.h, lzcntintrin.h, sgxintrin.h, pconfigintrin.h,
15285 waitpkgintrin.h and cldemoteintrin.h.
15287 2018-06-04 Richard Biener <rguenther@suse.de>
15289 PR tree-optimization/86038
15290 * tracer.c (find_best_successor): Check probability for
15291 being initialized, bail out if not.
15293 2018-06-04 Richard Earnshaw <rearnsha@arm.com>
15296 * config/arm/arm-cpus.in (ALL_QUIRKS): Add xscale feature to the list
15297 of bits to ignore when comparing architectures.
15299 2018-06-04 Jakub Jelinek <jakub@redhat.com>
15301 PR tree-optimization/69615
15302 * fold-const.c (merge_ranges): If range1 is - [x, x] and x is the
15303 maximum or minimum of the type, try to merge it also as if
15304 range1 is + [-, x - 1] or + [x + 1, -].
15307 * tree.c (inchash::add_expr): Handle IDENTIFIER_NODE.
15309 2018-06-03 Eric Botcazou <ebotcazou@adacore.com>
15311 PR tree-optimization/86034
15312 * gimple-ssa-store-merging.c (output_merged_store): Convert the RHS to
15313 the unsigned bitfield type in a bit insertion sequence if it does not
15314 have a larger precision than the bitfield size.
15315 (process_store): Also bypass widening conversions for BIT_INSERT_EXPR.
15317 2018-06-03 Kito Cheng <kito.cheng@gmail.com>
15319 * config/nds32/nds32-peephole2.md: Add new patterns for code size.
15321 2018-06-03 Chung-Ju Wu <jasonwucj@gmail.com>
15323 * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3J.
15324 * config/nds32/nds32.c (nds32_option_override): Consider ARCH_V3J.
15325 * config/nds32/nds32.h (TARGET_ISA_V3): Add ARCH_V3J checking.
15326 * config/nds32/nds32.opt (march): Add enum value Value(ARCH_V3J).
15328 2018-06-03 Chung-Ju Wu <jasonwucj@gmail.com>
15330 * common/config/nds32/nds32-common.c (nds32_option_optimization_table):
15331 Disable -fdelete-null-pointer-checks for ELF toolchain.
15333 2018-06-02 Chung-Ju Wu <jasonwucj@gmail.com>
15334 Kito Cheng <kito.cheng@gmail.com>
15336 * config.gcc (nds32*): Use nds32-linux.opt and nds32-elf.opt.
15337 (nds32le-*-*, nds32be-*-*): Integrate checking process.
15338 (nds32*-*-*): Add glibc and uclibc conditions.
15339 * common/config/nds32/nds32-common.c (nds32_except_unwind_info): New.
15340 (TARGET_EXCEPT_UNWIND_INFO): Define.
15341 * config/nds32/elf.h: New file.
15342 * config/nds32/linux.h: New file.
15343 * config/nds32/nds32-elf.opt: New file.
15344 * config/nds32/nds32-linux.opt: New file.
15345 * config/nds32/nds32-fp-as-gp.c
15346 (pass_nds32_fp_as_gp::gate): Consider TARGET_LINUX_ABI.
15347 * config/nds32/nds32.c (nds32_conditional_register_usage): Consider
15349 (nds32_asm_file_end): Ditto.
15350 (nds32_print_operand): Ditto.
15351 (nds32_insert_attributes): Ditto.
15352 (nds32_init_libfuncs): New function.
15353 (TARGET_HAVE_TLS): Define.
15354 (TARGET_INIT_LIBFUNCS): Define.
15355 * config/nds32/nds32.h (TARGET_DEFAULT_RELAX): Apply different relax
15357 (TARGET_ELF): Apply different mcmodel setting.
15358 (LINK_SPEC, LIB_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): The content has
15359 been migrated into elf.h and linux.h files.
15360 * config/nds32/nds32.md (add_pc): Consider TARGET_LINUX_ABI.
15361 * config/nds32/nds32.opt (mvh): Consider TARGET_LINUX_ABI.
15362 (mcmodel): The content has been migrated into nds32-elf.opt and
15363 nds32-linux.opt files.
15364 * config/nds32/t-elf: New file.
15365 * config/nds32/t-linux: New file.
15367 2018-06-02 Chung-Ju Wu <jasonwucj@gmail.com>
15368 Shiva Chen <shiva0217@gmail.com>
15370 * config/nds32/constants.md (unspec_volatile_element): Add
15371 UNSPEC_VOLATILE_OMIT_FP_BEGIN and UNSPEC_VOLATILE_OMIT_FP_END.
15372 * config/nds32/nds32-fp-as-gp.c: New implementation of fp_as_gp
15374 * config/nds32/nds32-protos.h (nds32_naked_function_p): Declare.
15375 (make_pass_nds32_fp_as_gp): Declare.
15376 * config/nds32/nds32.c (nds32_register_passes): Add fp_as_gp as one
15378 (nds32_asm_function_end_prologue): Remove unused asm output.
15379 (nds32_asm_function_begin_epilogue): Remove unused asm output.
15380 (nds32_asm_file_start): Output necessary fp_as_gp information.
15381 (nds32_option_override): Adjust register usage.
15382 (nds32_expand_prologue): Consider fp_as_gp situation.
15383 (nds32_expand_prologue_v3push): Consider fp_as_gp situation.
15384 * config/nds32/nds32.md (prologue): Check fp_as_gp_p and naked_p.
15387 (simple_return): Ditto.
15388 (omit_fp_begin): Output special directive for fp_as_gp.
15389 (omit_fp_end): Output special directive for fp_as_gp.
15390 * config/nds32/nds32.opt (mfp-as-gp, mno-fp-as-gp, mforce-fp-as-gp,
15391 mforbid-fp-as-gp): New options.
15393 2018-06-01 Mark Wielaard <mark@klomp.org>
15395 * dwarf2out.c (dwarf2out_finish): Remove generation of
15396 DW_AT_loclists_base.
15398 2018-06-01 Eric Botcazou <ebotcazou@adacore.com>
15400 * gimple-ssa-store-merging.c: Include gimple-fold.h.
15401 (struct store_immediate_info): Document BIT_INSERT_EXPR stores.
15402 (struct merged_store_group): Add bit_insertion field.
15403 (dump_char_array): Use standard hexadecimal format.
15404 (merged_store_group::merged_store_group): Set bit_insertion to false.
15405 (merged_store_group::apply_stores): Use optimal buffer size. Deal
15406 with BIT_INSERT_EXPR stores. Move up code updating the mask and
15407 also print the mask in the dump file.
15408 (pass_store_merging::gate): Minor tweak.
15409 (imm_store_chain_info::coalesce_immediate): Fix wrong association
15410 of stores with groups in dump. Allow coalescing of BIT_INSERT_EXPR
15411 stores with INTEGER_CST stores.
15412 (count_multiple_uses) <BIT_INSERT_EXPR>: New case.
15413 (imm_store_chain_info::output_merged_store): Add try_bitpos variable
15414 and use it throughout. Generate bit insertion sequences if need be.
15415 (pass_store_merging::process_store): Remove redundant condition.
15416 Record stores from a SSA name to a bit-field with BIT_INSERT_EXPR.
15418 2018-06-01 Segher Boessenkool <segher@kernel.crashing.org>
15420 * config/rs6000/rs6000.c (rs6000_mangle_type): Change the mangling of
15421 the 128-bit floating point types. Fix function comment.
15423 2018-06-01 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
15425 * config/aarch64/aarch64-simd.md
15426 (aarch64_simd_vec_unpack<su>_lo_<mode>): Use UXTL and SXTL assembler
15428 (aarch64_simd_vec_unpack<su>_hi_<mode>): Use UXTL2 and SXTL2 assembler
15431 2018-06-01 Richard Sandiford <richard.sandiford@linaro.org>
15433 PR tree-optimization/85989
15434 * gimple-ssa-backprop.c (backprop::m_visited_phis): New member
15436 (backprop::intersect_uses): Check it when deciding whether this
15437 is a backedge reference.
15438 (backprop::process_block): Add each phi to m_visited_phis
15439 after visiting it, then clear it at the end.
15441 2018-06-01 Richard Biener <rguenther@suse.de>
15443 * tree-vectorizer.h (vect_dr_stmt): New function.
15444 (vect_get_load_cost): Adjust.
15445 (vect_get_store_cost): Likewise.
15446 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence):
15447 Use vect_dr_stmt instead of DR_SMTT.
15448 (vect_record_base_alignments): Likewise.
15449 (vect_calculate_target_alignment): Likewise.
15450 (vect_compute_data_ref_alignment): Likewise and make static.
15451 (vect_update_misalignment_for_peel): Likewise.
15452 (vect_verify_datarefs_alignment): Likewise.
15453 (vector_alignment_reachable_p): Likewise.
15454 (vect_get_data_access_cost): Likewise. Pass down
15455 vinfo to vect_get_load_cost/vect_get_store_cost instead of DR.
15456 (vect_get_peeling_costs_all_drs): Likewise.
15457 (vect_peeling_hash_get_lowest_cost): Likewise.
15458 (vect_enhance_data_refs_alignment): Likewise.
15459 (vect_find_same_alignment_drs): Likewise.
15460 (vect_analyze_data_refs_alignment): Likewise.
15461 (vect_analyze_group_access_1): Likewise.
15462 (vect_analyze_group_access): Likewise.
15463 (vect_analyze_data_ref_access): Likewise.
15464 (vect_analyze_data_ref_accesses): Likewise.
15465 (vect_vfa_segment_size): Likewise.
15466 (vect_small_gap_p): Likewise.
15467 (vectorizable_with_step_bound_p): Likewise.
15468 (vect_prune_runtime_alias_test_list): Likewise.
15469 (vect_analyze_data_refs): Likewise.
15470 (vect_supportable_dr_alignment): Likewise.
15471 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
15472 (vect_gen_prolog_loop_niters): Likewise.
15473 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
15474 * tree-vect-patterns.c (vect_recog_bool_pattern): Do not
15476 (vect_recog_mask_conversion_pattern): Likewise.
15477 (vect_try_gather_scatter_pattern): Likewise.
15478 * tree-vect-stmts.c (vect_model_store_cost): Pass stmt_info
15479 to vect_get_store_cost.
15480 (vect_get_store_cost): Get stmt_info instead of DR.
15481 (vect_model_load_cost): Pass stmt_info to vect_get_load_cost.
15482 (vect_get_load_cost): Get stmt_info instead of DR.
15484 2018-06-01 Richard Biener <rguenther@suse.de>
15486 PR middle-end/86017
15487 * gimple-fold.c (var_decl_component_p): Also allow offsetted
15488 vars wrapped in MEM_REFs.
15490 2018-06-01 Richard Sandiford <richard.sandiford@linaro.org>
15492 * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
15493 Fix subreg tests so that we only return a choice between
15494 GENERAL_REGS and FP_REGS if the original classes included both.
15496 2018-06-01 Richard Biener <rguenther@suse.de>
15499 * tree-ssa-structalias.c (get_function_part_constraint):
15500 Handle NULL fi->decl.
15501 (find_func_aliases_for_call): Properly handle indirect
15502 fi from direct call.
15503 (find_func_clobbers): Likewise.
15504 (ipa_pta_execute): Likewise.
15505 (create_variable_info_for): For functions that are ifunc_resolver
15506 resolve to a varinfo that contains the result of the resolver call.
15507 (associate_varinfo_to_alias): Do not treat ifunc resolvers as
15510 2018-05-31 Michael Collison <michael.collison@arm.com>
15512 * config/aarch64/aarch64.md:
15513 (*fix_to_zero_extenddfdi2): New pattern.
15514 * gcc.target/aarch64/fix_extend1.c: New testcase.
15516 2018-05-31 Qing Zhao <qing.zhao@oracle.com>
15518 PR middle-end/78809
15519 PR middle-end/83026
15520 * builtins.c (expand_builtin): Add the handling of BUILT_IN_STRCMP_EQ
15521 and BUILT_IN_STRNCMP_EQ.
15522 * builtins.def: Add new builtins BUILT_IN_STRCMP_EQ and
15523 BUILT_IN_STRNCMP_EQ.
15524 * gimple-fold.c (gimple_fold_builtin_string_compare): Add the
15525 handling of BUILTIN_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
15526 (gimple_fold_builtin): Likewise.
15527 * tree-ssa-strlen.c (compute_string_length): New function.
15528 (determine_min_obsize): New function.
15529 (handle_builtin_string_cmp): New function to handle calls to
15530 string compare functions.
15531 (strlen_optimize_stmt): Add handling to builtin string compare
15533 * tree-ssa-structalias.c (find_func_aliases_for_builtin_call):
15534 Add the handling of BUILT_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
15535 * tree.c (build_common_builtin_nodes): Add new defines of
15536 BUILT_IN_STRNCMP_EQ and BUILT_IN_STRCMP_EQ.
15538 2018-05-31 Jakub Jelinek <jakub@redhat.com>
15541 * bb-reorder.c (pass_partition_blocks::gate): Return false for
15542 functions with naked attribute.
15544 2018-05-31 Uros Bizjak <ubizjak@gmail.com>
15546 * config/i386/sse.md (avx_vec_concat<mode>):
15547 Substitute concat_tg_mode mode attribute with xtg_mode.
15548 (<mask_codefor>avx512dq_broadcast<mode><mask_name>_1): Ditto.
15549 (concat_tg_mode): Remove mode attribute.
15551 2018-05-31 Martin Sebor <msebor@redhat.com>
15554 * calls.c (alloc_max_size): Correct a logic error/typo.
15555 Treat excessive arguments as infinite. Warn for invalid arguments.
15556 * doc/invoke.texi (-Walloc-size-larger-than): Update.
15558 2018-05-31 H.J. Lu <hongjiu.lu@intel.com>
15561 * config/i386/x86-tune.def: Re-enable partial_reg_dependency
15562 and movx for Haswell.
15564 2018-05-31 Chung-Lin Tang <cltang@codesourcery.com>
15565 Cesar Philippidis <cesar@codesourcery.com>
15567 PR middle-end/85879
15568 * gimplify.c (gimplify_adjust_omp_clauses): Add 'remove = true'
15569 when emitting error on private/firstprivate reductions.
15570 * omp-low.c (lower_omp_target): Avoid reference-type processing
15571 on pointers for firstprivate clause.
15573 2018-05-31 Sameera Deshpande <sameera.deshpande@linaro.org>
15575 * config/aarch64/aarch64-simd-builtins.def (ld1x3): New.
15578 * config/aarch64/aarch64-simd.md
15579 (aarch64_ld1x3<VALLDIF:mode>): New pattern.
15580 (aarch64_ld1_x3_<mode>): Likewise
15581 (aarch64_st1x2<VALLDIF:mode>): Likewise
15582 (aarch64_st1_x2_<mode>): Likewise
15583 (aarch64_st1x3<VALLDIF:mode>): Likewise
15584 (aarch64_st1_x3_<mode>): Likewise
15585 * config/aarch64/arm_neon.h (vld1_u8_x3): New function.
15586 (vld1_s8_x3): Likewise.
15587 (vld1_u16_x3): Likewise.
15588 (vld1_s16_x3): Likewise.
15589 (vld1_u32_x3): Likewise.
15590 (vld1_s32_x3): Likewise.
15591 (vld1_u64_x3): Likewise.
15592 (vld1_s64_x3): Likewise.
15593 (vld1_f16_x3): Likewise.
15594 (vld1_f32_x3): Likewise.
15595 (vld1_f64_x3): Likewise.
15596 (vld1_p8_x3): Likewise.
15597 (vld1_p16_x3): Likewise.
15598 (vld1_p64_x3): Likewise.
15599 (vld1q_u8_x3): Likewise.
15600 (vld1q_s8_x3): Likewise.
15601 (vld1q_u16_x3): Likewise.
15602 (vld1q_s16_x3): Likewise.
15603 (vld1q_u32_x3): Likewise.
15604 (vld1q_s32_x3): Likewise.
15605 (vld1q_u64_x3): Likewise.
15606 (vld1q_s64_x3): Likewise.
15607 (vld1q_f16_x3): Likewise.
15608 (vld1q_f32_x3): Likewise.
15609 (vld1q_f64_x3): Likewise.
15610 (vld1q_p8_x3): Likewise.
15611 (vld1q_p16_x3): Likewise.
15612 (vld1q_p64_x3): Likewise.
15613 (vst1_s64_x2): Likewise.
15614 (vst1_u64_x2): Likewise.
15615 (vst1_f64_x2): Likewise.
15616 (vst1_s8_x2): Likewise.
15617 (vst1_p8_x2): Likewise.
15618 (vst1_s16_x2): Likewise.
15619 (vst1_p16_x2): Likewise.
15620 (vst1_s32_x2): Likewise.
15621 (vst1_u8_x2): Likewise.
15622 (vst1_u16_x2): Likewise.
15623 (vst1_u32_x2): Likewise.
15624 (vst1_f16_x2): Likewise.
15625 (vst1_f32_x2): Likewise.
15626 (vst1_p64_x2): Likewise.
15627 (vst1q_s8_x2): Likewise.
15628 (vst1q_p8_x2): Likewise.
15629 (vst1q_s16_x2): Likewise.
15630 (vst1q_p16_x2): Likewise.
15631 (vst1q_s32_x2): Likewise.
15632 (vst1q_s64_x2): Likewise.
15633 (vst1q_u8_x2): Likewise.
15634 (vst1q_u16_x2): Likewise.
15635 (vst1q_u32_x2): Likewise.
15636 (vst1q_u64_x2): Likewise.
15637 (vst1q_f16_x2): Likewise.
15638 (vst1q_f32_x2): Likewise.
15639 (vst1q_f64_x2): Likewise.
15640 (vst1q_p64_x2): Likewise.
15641 (vst1_s64_x3): Likewise.
15642 (vst1_u64_x3): Likewise.
15643 (vst1_f64_x3): Likewise.
15644 (vst1_s8_x3): Likewise.
15645 (vst1_p8_x3): Likewise.
15646 (vst1_s16_x3): Likewise.
15647 (vst1_p16_x3): Likewise.
15648 (vst1_s32_x3): Likewise.
15649 (vst1_u8_x3): Likewise.
15650 (vst1_u16_x3): Likewise.
15651 (vst1_u32_x3): Likewise.
15652 (vst1_f16_x3): Likewise.
15653 (vst1_f32_x3): Likewise.
15654 (vst1_p64_x3): Likewise.
15655 (vst1q_s8_x3): Likewise.
15656 (vst1q_p8_x3): Likewise.
15657 (vst1q_s16_x3): Likewise.
15658 (vst1q_p16_x3): Likewise.
15659 (vst1q_s32_x3): Likewise.
15660 (vst1q_s64_x3): Likewise.
15661 (vst1q_u8_x3): Likewise.
15662 (vst1q_u16_x3): Likewise.
15663 (vst1q_u32_x3): Likewise.
15664 (vst1q_u64_x3): Likewise.
15665 (vst1q_f16_x3): Likewise.
15666 (vst1q_f32_x3): Likewise.
15667 (vst1q_f64_x3): Likewise.
15668 (vst1q_p64_x3): Likewise.
15670 2018-05-30 Jozef Lawrynowicz <jozef.l@mittosystems.com>
15672 * config/msp430/msp430.c (msp430_output_labelref): Prepend
15673 user_label_prefix to name.
15675 * tree-core.h: Update comment about the format of NAME string
15676 passed to handler in attribute_spec.
15678 * config/msp430/msp430.md: Remove erroneous subreg expression from
15679 zero_extendqisi2 insn pattern. Remove msp430x ISA restriction on
15680 zero_extend{q,h}isi2.
15682 2018-05-30 Borislav Petkov <bp@suse.de>
15684 * doc/extend.texi: Document some architecture specific
15685 constraints and sort entries.
15687 2018-05-30 Martin Sebor <msebor@redhat.com>
15689 PR middle-end/85369
15690 * builtins.c (expand_builtin_stpcpy_1): New function.
15691 (expand_builtin_stpcpy): Call it, and call maybe_warn_nonstring_arg
15692 only if the former succeeds.
15694 2018-05-31 Sameera Deshpande <sameera.deshpande@linaro.org>
15696 * config/aarch64/aarch64-cores.def (saphira) : Add support for ARMv8.4
15699 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
15701 * doc/invoke.texi (-flinker-output): Document
15703 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
15705 * passes.c (ipa_write_summaries): Only modify statements if body
15707 * cgraphunit.c (ipa_passes): Also produce intermeidate code when
15708 incrementally linking.
15709 (ipa_passes): Likewise.
15710 * lto-cgraph.c (lto_output_node): When incrementally linking do not
15711 pass down resolution info.
15712 * common.opt (flag_incremental_link): Update info.
15713 * gcc.c (plugin specs): Turn flinker-output=* to
15714 -plugin-opt=-linker-output-known
15715 * toplev.c (compile_file): Also cut compilation when doing incremental
15717 * flag-types. (enum lto_partition_model): Add
15718 LTO_LINKER_OUTPUT_NOLTOREL.
15719 (invoke.texi): Add -flinker-output docs.
15720 * ipa.c (symbol_table::remove_unreachable_nodes): Handle LTO incremental
15721 link same way as WPA; do not stream in dead initializers.
15723 * dwarf2out.c (dwarf2out_die_ref_for_decl,
15724 darf2out_register_external_decl): Support incremental link.
15726 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
15728 * lto-opts.c (lto_write_options): Skip OPT_dumpdir, OPT_fresolution_.
15730 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
15732 * lto-wrapper.c (debug_objcopy): Add rename parameter; pass
15733 it down to simple_object_copy_lto_debug_sections.
15734 (run_gcc): Determine incremental LTO link time and configure
15735 lto1 into non-wpa mode, disable renaming of debug sections.
15737 2018-05-30 Kelvin Nilsen <kelvin@gcc.gnu.org>
15739 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
15740 descriptions of various incorrectly documented functions.
15742 2018-05-30 Andre Vieira <andre.simoesdiasvieira@arm.com>
15745 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
15746 address check not strict.
15748 2018-05-30 Richard Biener <rguenther@suse.de>
15750 PR tree-optimization/85964
15751 * tracer.c (better_p): Drop initialized count check, we only
15752 call the function with initialized counts now.
15753 (find_best_successor): Do find a best edge if one
15754 has uninitialized count.
15755 (find_best_predecessor): Likewise. Do BB frequency check only
15756 if count is initialized.
15758 2017-05-30 Jackson Woodruff <jackson.woodruff@arm.com>
15760 * config/aarch64/aarch64.c (aarch64_host_wide_int_compare): New.
15761 (aarch64_ldrstr_offset_compare): New.
15762 (aarch64_operands_adjust_ok_for_ldpstp): Update to consider all
15763 load/store orderings.
15764 (aarch64_gen_adjusted_ldpstp): Likewise.
15766 2018-05-30 Wilco Dijkstra <wdijkstr@arm.com>
15768 * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
15769 Check for subset of GENERAL_REGS and FP_REGS.
15770 * config/aarch64/aarch64-simd.md (aarch64_get_lane): Increase cost of
15773 2018-05-30 Richard Sandiford <richard.sandiford@linaro.org>
15775 * alias.c (adjust_offset_for_component_ref): Use poly_int_tree_p
15776 and wi::to_poly_offset. Add the current offset and then check
15777 whether the sum fits, rather than using an unchecked addition of
15778 a checked term. Check for a shwi rather than a uhwi.
15779 * expr.c (get_bit_range): Use tree_to_poly_uint64.
15780 (store_constructor): Use poly_int_tree_p.
15781 (expand_expr_real_1): Likewise.
15782 * function.c (assign_temp): Likewise.
15783 * fold-const.c (const_binop): Use poly_int_tree_p and
15784 wi::to_poly_offset.
15785 (fold_indirect_ref_1): Likewise. Use multiple_p to attempt an exact
15787 * ipa-icf-gimple.c (func_checker::compare_operand): Use
15788 to_poly_offset for MEM offsets.
15789 * ipa-icf.c (sem_variable::equals): Likewise.
15790 * stor-layout.c (compute_record_mode): Use poly_int_tree_p.
15791 * tree-ssa-sccvn.c (ao_ref_init_from_vn_reference): Use
15792 wi::to_poly_offset for BIT_FIELD_REF offsets.
15793 (vn_reference_maybe_forwprop_address): Use poly_int_tree_p and
15794 wi::to_poly_offset.
15795 * var-tracking.c (emit_note_insn_var_location): Use
15796 tree_to_poly_uint64.
15798 2018-05-29 Jim Wilson <jimw@sifive.com>
15800 * config/riscv/riscv.c (riscv_interrupt_type): Fix comment typo.
15802 2018-05-29 Uros Bizjak <ubizjak@gmail.com>
15805 * config/i386/i386.md (l<rounding_insn><MODEF:mode><SWI48:mode>2):
15806 Enable for TARGET_SSE4_1 and generate rounds{s,d} and cvtts{s,d}2si{,q}
15808 (sse4_1_round<mode>2): Use nonimmediate_operand
15809 for operand 1 predicate.
15811 2018-05-29 Martin Sebor <msebor@redhat.com>
15812 Richard Biener <rguenther@suse.de>
15815 * calls.c (get_size_range): Call determine_value_range instead
15816 of get_value_range..
15817 * tree-vrp.h (determine_value_range): Declared new function.
15818 * tree-vrp.c (determine_value_range_1, determine_value_range): New.
15820 2018-05-29 Richard Biener <rguenther@suse.de>
15822 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Make
15823 sure to use non-pattern stmts for get_earlier_stmt arguments.
15824 * tree-vectorizer.h (get_earlier_stmt): Assert we do not get
15825 called on pattern stmts.
15826 (get_later_stmt): Likewise.
15828 2018-05-29 Martin Liska <mliska@suse.cz>
15830 PR gcov-profile/85759
15831 * doc/gcov.texi: Document GCOV_ERROR_FILE and GCOV_EXIT_AT_ERROR
15834 2018-05-29 Jakub Jelinek <jakub@redhat.com>
15836 * tree-cfg.c (verify_gimple_assign_unary): Add checking for
15838 (verify_gimple_assign_binary): Check TYPE_VECTOR_SUBPARTS for
15842 * tree.def (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
15843 VEC_PACK_FLOAT_EXPR): New tree codes.
15844 * tree-pretty-print.c (op_code_prio): Handle
15845 VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR.
15846 (dump_generic_node): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
15847 VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
15848 * tree-inline.c (estimate_operator_cost): Likewise.
15849 * gimple-pretty-print.c (dump_binary_rhs): Handle VEC_PACK_FLOAT_EXPR.
15850 * fold-const.c (const_binop): Likewise.
15851 (const_unop): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR and
15852 VEC_UNPACK_FIX_TRUNC_LO_EXPR.
15853 * tree-cfg.c (verify_gimple_assign_unary): Likewise.
15854 (verify_gimple_assign_binary): Handle VEC_PACK_FLOAT_EXPR.
15855 * cfgexpand.c (expand_debug_expr): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
15856 VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
15857 * expr.c (expand_expr_real_2): Likewise.
15858 * optabs.def (vec_packs_float_optab, vec_packu_float_optab,
15859 vec_unpack_sfix_trunc_hi_optab, vec_unpack_sfix_trunc_lo_optab,
15860 vec_unpack_ufix_trunc_hi_optab, vec_unpack_ufix_trunc_lo_optab): New
15862 * optabs.c (expand_widen_pattern_expr): For
15863 VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR use
15864 sign from result type rather than operand's type.
15865 (expand_binop_directly): For vec_packu_float_optab and
15866 vec_packs_float_optab allow result type to be different from operand's
15868 * optabs-tree.c (optab_for_tree_code): Handle
15869 VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
15870 VEC_PACK_FLOAT_EXPR. Formatting fixes.
15871 * tree-vect-generic.c (expand_vector_operations_1): Handle
15872 VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
15873 VEC_PACK_FLOAT_EXPR.
15874 * tree-vect-stmts.c (supportable_widening_operation): Handle
15876 (supportable_narrowing_operation): Handle FLOAT_EXPR.
15877 * config/i386/i386.md (fixprefix, floatprefix): New code attributes.
15878 * config/i386/sse.md (*float<floatunssuffix>v2div2sf2): Rename to ...
15879 (float<floatunssuffix>v2div2sf2): ... this. Formatting fix.
15880 (vpckfloat_concat_mode, vpckfloat_temp_mode, vpckfloat_op_mode): New
15882 (vec_pack<floatprefix>_float_<mode>): New expander.
15883 (vunpckfixt_mode, vunpckfixt_model, vunpckfixt_extract_mode): New mode
15885 (vec_unpack_<fixprefix>fix_trunc_lo_<mode>,
15886 vec_unpack_<fixprefix>fix_trunc_hi_<mode>): New expanders.
15887 * doc/md.texi (vec_packs_float_@var{m}, vec_packu_float_@var{m},
15888 vec_unpack_sfix_trunc_hi_@var{m}, vec_unpack_sfix_trunc_lo_@var{m},
15889 vec_unpack_ufix_trunc_hi_@var{m}, vec_unpack_ufix_trunc_lo_@var{m}):
15891 * doc/generic.texi (VEC_UNPACK_FLOAT_HI_EXPR,
15892 VEC_UNPACK_FLOAT_LO_EXPR): Fix pasto in description.
15893 (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
15894 VEC_PACK_FLOAT_EXPR): Document.
15896 2018-05-29 Richard Biener <rguenther@suse.de>
15898 * tree-vectorizer.h (struct vec_info): Add stmt_vec_infos
15900 (stmt_vec_info_vec): Make pointer.
15901 (init_stmt_vec_info_vec): Remove.
15902 (free_stmt_vec_info_vec): Likewise.
15903 (set_stmt_vec_info_vec): New function.
15904 (free_stmt_vec_infos): Likewise.
15905 (vinfo_for_stmt): Adjust for stmt_vec_info_vec indirection.
15906 (set_vinfo_for_stmt): Likewise.
15907 (get_earlier_stmt): Likewise.
15908 (get_later_stmt): Likewise.
15909 * tree-vectorizer.c (stmt_vec_info_vec): Make pointer.
15910 (vec_info::vec_info): Allocate stmt_vec_infos and set the global.
15911 (vec_info::~vec_info): Free stmt_vec_infos.
15912 (vectorize_loops): Set the global stmt_vec_info_vec to NULL.
15913 Remove old init_stmt_vec_info_vec/free_stmt_vec_info_vec calls.
15914 (pass_slp_vectorize::execute): Likewise.
15915 * tree-vect-stmts.c (init_stmt_vec_info_vec): Remove.
15916 (free_stmt_vec_info_vec): Likewise.
15917 (set_stmt_vec_info_vec): New function.
15918 (free_stmt_vec_infos): Likewise.
15919 * tree-vect-loop.c (_loop_vec_info::~_loop_vec_info): Set
15920 the global stmt_vec_info_vec.
15921 * tree-parloops.c (gather_scalar_reductions): Use
15922 set_stmt_vec_info_vec/free_stmt_vec_infos and maintain a local
15925 2018-05-29 Richard Biener <rguenther@suse.de>
15927 * dominance.c (iterate_fix_dominators): Push/pop TV_DOMINANCE.
15929 2018-05-29 Martin Liska <mliska@suse.cz>
15930 David Malcolm <dmalcolm@redhat.com>
15932 * vec.c (test_reverse): New.
15933 (vec_c_tests): Add new test.
15934 * vec.h (vl_ptr>::reverse): New function.
15936 2018-05-29 Gerald Pfeifer <gerald@pfeifer.com>
15938 * config.gcc: Identify FreeBSD 3.x and 4.x as unsupported.
15940 * config/freebsd-spec.h (FBSD_LIB_SPEC): Only consider FreeBSD 5
15943 2018-05-28 Bernd Edlinger <bernd.edlinger@hotmail.de>
15945 * tree-dump.c (dump_node): Use splay_tree_delete_pointers.
15947 2018-05-28 Richard Biener <rguenther@suse.de>
15949 PR tree-optimization/85933
15950 * tree-vect-data-refs.c (vect_record_base_alignments): Only
15951 look at stmts marked as vectorizable.
15953 2018-05-28 Richard Biener <rguenther@suse.de>
15955 PR tree-optimization/85934
15956 * tree-vect-generic.c (expand_vector_operations_1): Hoist
15957 vector boolean check before scalar optimization.
15959 2018-05-28 Jakub Jelinek <jakub@redhat.com>
15961 * doc/invoke.texi (ARM Options): Use @item instead of @itemx
15964 2018-05-28 Mark Wielaard <mark@klomp.org>
15966 * dwarf2asm.c (dw2_asm_output_delta_uleb128): Add brackets around lab2
15967 if it is an expression containing a minus sign.
15969 2018-05-27 John David Anglin <danglin@gcc.gnu.org>
15971 * config/pa/pa-linux.h (NEED_INDICATE_EXEC_STACK): Define to 0.
15973 2018-05-27 Paul Koning <ni1d@arrl.net>
15975 * config/pdp11/pdp11.md (truncsihi2): Remove.
15977 2018-05-27 Monk Chiang <sh.chiang04@gmail.com>
15978 Chung-Ju Wu <jasonwucj@gmail.com>
15980 * config/nds32/nds32-intrinsic.md (unaligned_storedi): Modify patterns
15982 (unaligned_store_dw): Ditto.
15983 * config/nds32/nds32-memory-manipulation.c
15984 (nds32_expand_movmemsi_loop_known_size): Refactoring implementation.
15985 (nds32_gen_dup_4_byte_to_word_value): Rename to ...
15986 (nds32_gen_dup_4_byte_to_word_value_aux): ... this.
15987 (emit_setmem_word_loop): Rename to ...
15988 (emit_setmem_doubleword_loop): ... this.
15989 (nds32_gen_dup_4_byte_to_word_value): New function.
15990 (nds32_gen_dup_8_byte_to_double_word_value): New function.
15991 (nds32_expand_setmem_loop): Refine implementation.
15992 (nds32_expand_setmem_loop_v3m): Ditto.
15993 * config/nds32/nds32-multiple.md (unaligned_store_update_base_dw): New
15996 2018-05-27 Chung-Ju Wu <jasonwucj@gmail.com>
15998 * config/nds32/nds32.md (bswapsi2, bswaphi2): New patterns.
16000 2018-05-27 Chung-Ju Wu <jasonwucj@gmail.com>
16002 * config/nds32/nds32.c (nds32_attribute_table): Add "no_prologue".
16003 (nds32_init_machine_status): Initialize machine->attr_naked_p and
16004 machine->attr_no_prologue_p.
16005 (nds32_compute_stack_frame): Check "naked" and "no_prologue" attributes.
16006 (nds32_naked_function_p): Handle "naked" and "no_prologue" attributes.
16007 (nds32_expand_epilogue): Consider attr_naked_p.
16008 (nds32_expand_epilogue_v3pop): Likewise.
16009 (nds32_can_use_return_insn): Likewise.
16010 * config/nds32/nds32.h (machine_function): Add attr_naked_p and
16011 attr_no_prologue_p fields.
16012 * config/nds32/nds32.opt (mret-in-naked-func): New option.
16014 2018-05-27 Jakub Jelinek <jakub@redhat.com>
16017 * config/i386/i386.md (fixunssuffix, floatunssuffix): New code
16019 * config/i386/sse.md
16020 (<floatsuffix>float<sseintvecmodelower><mode>2<mask_name><round_name>):
16022 (float<floatunssuffix><sseintvecmodelower><mode>2<mask_name><round_name>):
16024 (<floatsuffix>float<sselongvecmodelower><mode>2<mask_name><round_name>):
16026 (float<floatunssuffix><sselongvecmodelower><mode>2<mask_name><round_name>):
16028 (*<floatsuffix>floatv2div2sf2): Rename to ...
16029 (*float<floatunssuffix>v2div2sf2): ... this.
16030 (<floatsuffix>floatv2div2sf2_mask): Rename to ...
16031 (float<floatunssuffix>v2div2sf2_mask): ... this.
16032 (*<floatsuffix>floatv2div2sf2_mask_1): Rename to ...
16033 (*float<floatunssuffix>v2div2sf2_mask_1): ... this.
16034 (<fixsuffix>fix_truncv8dfv8si2<mask_name><round_saeonly_name>): Rename
16036 (fix<fixunssuffix>_truncv8dfv8si2<mask_name><round_saeonly_name>):
16038 (<fixsuffix>fix_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
16040 (fix<fixunssuffix>_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
16042 (<fixsuffix>fix_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
16044 (fix<fixunssuffix>_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
16046 (<fixsuffix>fix_truncv2sfv2di2<mask_name>): Rename to ...
16047 (fix<fixunssuffix>_truncv2sfv2di2<mask_name>): ... this.
16048 (vec_pack_ufix_trunc_<mode>): Use gen_fixuns_truncv8dfv8si2 instead of
16049 gen_ufix_truncv8dfv8si2.
16050 * config/i386/i386-builtin.def (__builtin_ia32_cvttpd2uqq256_mask,
16051 __builtin_ia32_cvttpd2uqq128_mask, __builtin_ia32_cvttps2uqq256_mask,
16052 __builtin_ia32_cvttps2uqq128_mask, __builtin_ia32_cvtuqq2ps256_mask,
16053 __builtin_ia32_cvtuqq2ps128_mask, __builtin_ia32_cvtuqq2pd256_mask,
16054 __builtin_ia32_cvtuqq2pd128_mask, __builtin_ia32_cvttpd2udq512_mask,
16055 __builtin_ia32_cvtuqq2ps512_mask, __builtin_ia32_cvtuqq2pd512_mask,
16056 __builtin_ia32_cvttps2uqq512_mask, __builtin_ia32_cvttpd2uqq512_mask):
16057 Use fixuns instead ufix or floatuns instead ufloat in CODE_FOR_ names.
16059 2018-05-24 H.J. Lu <hongjiu.lu@intel.com>
16063 * varasm.c (assemble_alias): Lookup ifunc attribute on error.
16065 2018-05-25 Jim Wilson <jimw@sifive.com>
16067 * config/riscv/riscv-protos.h (riscv_epilogue_uses): New.
16068 * config/riscv/riscv.c (struct machine_function): Add
16069 interrupt_handler_p and attribute_checked_p fields.
16070 (riscv_attribute_table): Add interrupt.
16071 (riscv_interrupt_type_p): New.
16072 (riscv_save_reg_p): Save extra regs for interrupt handler.
16073 (riscv_use_save_libcall): Return false for interrupt handler.
16074 (riscv_first_stack_step): Add forward declaration.
16075 (riscv_compute_frame_info): New local interrupt_save_t1. Set it
16076 for interrupt handler with large frame. Use it for saved reg list.
16077 (riscv_expand_prologue): Move flag_stack_usage_info support to
16078 eliminate duplication.
16079 (riscv_expand_epilogue): Generate mret for interrupt handler.
16080 (riscv_epilogue_uses): New.
16081 (riscv_can_use_return_insn): Return false for interrupt handler.
16082 (riscv_function_ok_for_sibcall): Likewise.
16083 (riscv_set_current_function): Add interrupt handler support.
16084 * config/riscv/riscv.h (EPILOGUE_USES): Call riscv_epilogue_uses.
16085 * config/riscv/riscv.md (UNSPECV_MRET): New.
16087 (riscv_frflags, riscv_fsflags): Use tab after opcode.
16089 * doc/extend.texi (RISC-V Function Attributes) <interrupt>: New.
16091 2018-05-25 Bill Schmidt <wschmidt@linux.ibm.com>
16093 PR tree-optimization/85712
16094 * gimple-ssa-strength-reduction.c (replace_one_candidate): Skip if
16095 this candidate has already been replaced in-situ by a copy.
16097 2018-05-25 Jason Merrill <jason@redhat.com>
16099 PR c++/80485 - inline function non-zero address.
16100 * symtab.c (nonzero_address): Check DECL_COMDAT.
16102 2018-05-25 Uros Bizjak <ubizjak@gmail.com>
16105 * config/alpha/alpha.md (ashlsi3): New insn pattern.
16106 (*ashlsi_se): Rename from *ashldi_se. Define as sign
16107 extension of SImode operation. Use const123_operand predicate.
16108 (*saddsi_1): Remove.
16109 (*saddl_se_1): Ditto.
16110 (*ssubsi_1): Ditto.
16111 (*ssubl_se_1): Ditto.
16112 * config/alpha/predicates.md (const123_operand): New predicate.
16113 * config/alpha/constraints.md (P): Use IN_RANGE.
16115 2018-05-25 Richard Biener <rguenther@suse.de>
16117 * tree-ssa-alias.h (refs_may_alias_p): Add tbaa_p bool parameter,
16119 (ref_maybe_used_by_stmt_p): Likewise.
16120 (stmt_may_clobber_ref_p): Likewise.
16121 (stmt_may_clobber_ref_p_1): Likewise.
16122 * tree-ssa-alias.c (refs_may_alias_p): Add tbaa_p bool parameter
16124 (ref_maybe_used_by_stmt_p): Likewise.
16125 (stmt_may_clobber_ref_p): Likewise.
16126 (stmt_may_clobber_ref_p_1): Likewise.
16127 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Use
16128 the alias oracle to disambiguate DRs with stmts DR analysis
16130 (vect_analyze_data_refs): Do not give up on not analyzable
16131 DRs for BB vectorization. Remove code truncating the dataref
16134 2018-05-25 Jakub Jelinek <jakub@redhat.com>
16137 * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
16138 Add (=Yk,v,C) variant using vptestm insn. Use TARGET_AVX512BW
16139 in test instead of TARGET_AVX512F for VI12_AVX512VL iterator.
16141 2018-05-25 Richard Biener <rguenther@suse.de>
16143 * tree-vect-data-refs.c (vect_find_stmt_data_reference): New
16144 function, combining stmt data ref gathering and fatal analysis
16146 (vect_analyze_data_refs): Remove now redudnant code and simplify.
16147 * tree-vect-loop.c (vect_get_datarefs_in_loop): Factor out from
16148 vect_analyze_loop_2 and use vect_find_stmt_data_reference.
16149 * tree-vect-slp.c (vect_slp_bb): Use vect_find_stmt_data_reference.
16150 * tree-vectorizer.h (vect_find_stmt_data_reference): Declare.
16152 2018-05-25 Bin Cheng <bin.cheng@arm.com>
16154 PR tree-optimization/85720
16155 * tree-loop-distribution.c (break_alias_scc_partitions): Don't merge
16156 SCC if all partitions are builtins.
16157 (version_loop_by_alias_check): New parameter. Generate cancelable
16158 runtime alias check if all partitions are builtins.
16159 (distribute_loop): Update call to above function.
16161 2018-05-25 Bin Cheng <bin.cheng@arm.com>
16163 * tree-outof-ssa.c (tree-ssa.h, tree-dfa.h): Include header files.
16164 (create_default_def, for_all_parms): Moved from tree-ssa-coalesce.c.
16165 (parm_default_def_partition_arg): Ditto.
16166 (set_parm_default_def_partition): Ditto.
16167 (get_parm_default_def_partitions): Ditto and make it static.
16168 (get_undefined_value_partitions): Ditto and make it static.
16169 (remove_ssa_form): Refactor call to init_var_map here.
16170 * tree-ssa-coalesce.c (build_ssa_conflict_graph): Support live range
16171 computation for loop region.
16172 (coalesce_partitions, compute_optimized_partition_bases): Ditto.
16173 (register_default_def): Delete.
16174 (for_all_parms, create_default_def): Move to tree-outof-ssa.c.
16175 (parm_default_def_partition_arg): Ditto.
16176 (set_parm_default_def_partition): Ditto.
16177 (get_parm_default_def_partitions): Ditto and make it static.
16178 (get_undefined_value_partitions): Ditto and make it static.
16179 (coalesce_with_default, coalesce_with_default): Update comment.
16180 (create_coalesce_list_for_region): New func factored out from
16181 create_outofssa_var_map.
16182 (populate_coalesce_list_for_outofssa): New func factored out from
16183 create_outofssa_var_map and coalesce_ssa_name.
16184 (create_outofssa_var_map): Delete.
16185 (coalesce_ssa_name): Refactor to support live range computation.
16186 * tree-ssa-coalesce.h (coalesce_ssa_name): Change decl.
16187 (get_parm_default_def_partitions): Delete.
16188 (get_undefined_value_partitions): Ditto.
16189 * tree-ssa-live.c (init_var_map, delete_var_map): Support live range
16190 computation for loop region.
16191 (new_tree_live_info, loe_visit_block): Ditto.
16192 (live_worklist, set_var_live_on_entry): Ditto.
16193 (calculate_live_on_exit, verify_live_on_entry): Ditto.
16194 * tree-ssa-live.h (struct _var_map): New fields.
16195 (init_var_map): Change decl.
16196 (region_contains_p): New.
16198 2018-05-25 Bin Cheng <bin.cheng@arm.com>
16200 * tree-ssa-live.h (live_merge_and_clear): Delete.
16202 2018-05-25 Richard Biener <rguenther@suse.de>
16205 * tree-dump.c (dequeue_and_dump): Remove access to removed
16206 operand 2 of a SWITCH_EXPR.
16208 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
16210 * doc/sourcebuild.texi (vect_double_cond_arith): Include
16211 multiplication and division.
16212 * doc/md.texi (cond_mul@var{m}, cond_div@var{m}, cond_mod@var{m})
16213 (cond_udiv@var{m}, cond_umod@var{m}): Document.
16214 * optabs.def (cond_smul_optab, cond_sdiv_optab, cond_smod_optab)
16215 (cond_udiv_optab, cond_umod_optab): New optabs.
16216 * internal-fn.def (IFN_COND_MUL, IFN_COND_DIV, IFN_COND_MOD)
16217 (IFN_COND_RDIV): New internal functions.
16218 * internal-fn.c (get_conditional_internal_fn): Handle TRUNC_DIV_EXPR,
16219 TRUNC_MOD_EXPR and RDIV_EXPR.
16220 * match.pd (UNCOND_BINARY, COND_BINARY): Handle them.
16221 * config/aarch64/iterators.md (UNSPEC_COND_MUL, UNSPEC_COND_DIV):
16223 (SVE_INT_BINARY): Include mult.
16224 (SVE_COND_FP_BINARY): Include UNSPEC_MUL and UNSPEC_DIV.
16225 (optab, sve_int_op): Handle mult.
16226 (optab, sve_fp_op, commutative): Handle UNSPEC_COND_MUL and
16228 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New pattern
16229 for SVE_INT_BINARY_SD.
16231 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
16233 * config/aarch64/iterators.md (SVE_INT_BINARY_SD): New code iterator.
16234 (optab, sve_int_op): Handle div and udiv.
16235 * config/aarch64/aarch64-sve.md (<optab><mode>3): New expander
16236 for SVE_INT_BINARY_SD.
16237 (*<optab><mode>3): New insn for the same.
16239 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
16241 * tree-vect-patterns.c: Include predict.h.
16242 (vect_recog_divmod_pattern): Restrict check for division support
16243 to when optimizing for size.
16245 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
16247 * doc/sourcebuild.texi (vect_double_cond_arith: Document.
16248 * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 4.
16249 (gimple_match_op::gimple_match_op): Add an overload for 4 operands.
16250 (gimple_match_op::set_op): Likewise.
16251 (gimple_resimplify4): Declare.
16252 * genmatch.c (get_operand_type): Handle CFN_COND_* functions.
16253 (expr::gen_transform): Likewise.
16254 (decision_tree::gen): Generate a simplification routine for 4 operands.
16255 * gimple-match-head.c (gimple_simplify): Add an overload for
16256 4 operands. In the top-level function, handle up to 4 call
16257 arguments and call gimple_resimplify4.
16258 (gimple_resimplify4): New function.
16259 (build_call_internal): Pass a fourth operand.
16260 (maybe_push_to_seq): Likewise.
16261 * match.pd (UNCOND_BINARY, COND_BINARY): New operator lists.
16262 Fold VEC_COND_EXPRs of an operation and a default value into
16263 an IFN_COND_* function if possible.
16264 * config/aarch64/iterators.md (UNSPEC_COND_MAX, UNSPEC_COND_MIN):
16266 (SVE_COND_FP_BINARY): Include them.
16267 (optab, sve_fp_op): Handle them.
16268 (SVE_INT_BINARY_REV): New code iterator.
16269 (SVE_COND_FP_BINARY_REV): New int iterator.
16270 (commutative): New int attribute.
16271 * config/aarch64/aarch64-protos.h (aarch64_sve_prepare_conditional_op):
16273 * config/aarch64/aarch64.c (aarch64_sve_prepare_conditional_op): New
16275 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Use it.
16276 (*cond_<optab><mode>): New patterns for reversed operands.
16278 2018-05-25 Richard Biener <rguenther@suse.de>
16280 * tree-vectorizer.h (STMT_VINFO_GROUP_*, GROUP_*): Remove.
16281 (DR_GROUP_*): New, assert we have non-NULL ->data_ref_info.
16282 (REDUC_GROUP_*): New, assert we have NULL ->data_ref_info.
16283 (STMT_VINFO_GROUPED_ACCESS): Adjust.
16284 * tree-vect-data-refs.c (everywhere): Adjust users.
16285 * tree-vect-loop.c (everywhere): Likewise.
16286 * tree-vect-slp.c (everywhere): Likewise.
16287 * tree-vect-stmts.c (everywhere): Likewise.
16288 * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
16290 2018-05-25 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
16292 * configure.ac (gcc_cv_as_section_has_e): Move to common section.
16294 (gcc_cv_as_section_exclude): ... this.
16295 Try Solaris as #exclude syntax.
16296 * configure: Regenerate.
16297 * config.in: Regenerate.
16298 * config/i386/i386.c (i386_solaris_elf_named_section): Handle
16300 * config/sparc/sparc.c (sparc_solaris_elf_asm_named_section)
16301 [HAVE_GAS_SECTION_EXCLUDE]: Handle SECTION_EXCLUDE.
16303 * varasm.c (default_elf_asm_named_section): Don't check if
16304 HAVE_GAS_SECTION_EXCLUDE is defined.
16306 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
16308 * doc/md.texi: Update the documentation of the cond_* optabs
16309 to mention the new final operand. Fix GET_MODE_NUNITS call.
16310 Describe the scalar case too.
16311 * internal-fn.def (IFN_EXTRACT_LAST): Change type to fold_left.
16312 * internal-fn.c (expand_cond_unary_optab_fn): Expect 3 operands
16314 (expand_cond_binary_optab_fn): Expect 4 operands instead of 3.
16315 (get_conditional_internal_fn): Update comment.
16316 * tree-vect-loop.c (vectorizable_reduction): Pass the original
16317 accumulator value as a final argument to conditional functions.
16318 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Turn into
16319 a define_expand and add an "else" operand. Assert for now that
16320 the else operand is equal to operand 2. Use SVE_INT_BINARY and
16321 SVE_COND_FP_BINARY instead of SVE_COND_INT_OP and SVE_COND_FP_OP.
16322 (*cond_<optab><mode>): New patterns.
16323 * config/aarch64/iterators.md (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX)
16324 (UNSPEC_COND_SMIN, UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
16325 (UNSPEC_COND_EOR): Delete.
16326 (optab): Remove associated mappings.
16327 (SVE_INT_BINARY): New code iterator.
16328 (sve_int_op): Remove int attribute and add "minus" to the code
16330 (SVE_COND_INT_OP): Delete.
16331 (SVE_COND_FP_OP): Rename to...
16332 (SVE_COND_FP_BINARY): ...this.
16334 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
16336 * optabs.c (can_reuse_operands_p): New function.
16337 (maybe_legitimize_operands): Try to reuse the results for
16340 2018-05-24 Uros Bizjak <ubizjak@gmail.com>
16342 * config/i386/sse.md (cvtusi2<ssescalarmodesuffix>64<round_name>):
16343 Add {q} suffix to insn mnemonic.
16345 2018-05-23 Jozef Lawrynowicz <jozef.l@mittosystems.com>
16347 * config/msp430/msp430.c (TARGET_WARN_FUNC_RETURN): Define.
16348 (msp430_warn_func_return): New.
16350 2018-05-24 Roger Sayle <roger@nextmovesoftware.com>
16352 * fold-const.c (tree_nonzero_bits): New function.
16353 * fold-const.h (tree_nonzero_bits): Likewise.
16354 * match.pd (POPCOUNT): New patterns to fold BUILTIN_POPCOUNT and
16355 friends. POPCOUNT(x&1) => x&1, POPCOUNT(x)==0 => x==0, etc.
16357 2018-05-24 H.J. Lu <hongjiu.lu@intel.com>
16361 * varasm.c (assemble_alias): Check ifunc_resolver only on
16364 2018-05-24 Uros Bizjak <ubizjak@gmail.com>
16367 * config/i386/sse.md (movdi_to_sse): Do not generate pseudo
16368 when memory input operand is handled.
16370 2018-05-24 Luis Machado <luis.machado@linaro.org>
16372 * config/aarch64/aarch64.c (qdf24xx_addrcost_table): New static
16374 (qdf24xx_tunings) <addr_costs>: Set to qdf24xx_addrcost_table.
16376 2018-05-24 Richard Sandiford <richard.sandiford@linaro.org>
16378 * match.pd: Delay FMA folds until after vectorization.
16380 2018-05-24 Andre Vieira <andre.simoesdiasvieira@arm.com>
16383 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
16384 address check not strict.
16386 2018-05-24 Richard Sandiford <richard.sandiford@linaro.org>
16388 * gimple-match.h (gimple_match_op): New class.
16389 (mprts_hook): Replace parameters with a gimple_match_op *.
16390 (maybe_build_generic_op): Likewise.
16391 (gimple_simplified_result_is_gimple_val): Replace parameters with
16392 a const gimple_match_op *.
16393 (gimple_simplify): Replace code_helper * and tree * parameters with
16394 a gimple_match_op * parameter.
16395 (gimple_resimplify1): Replace code_helper *, tree and tree *
16396 parameters with a gimple_match_op * parameter.
16397 (gimple_resimplify2): Likewise.
16398 (gimple_resimplify3): Likewise.
16399 (maybe_push_res_to_seq): Replace code_helper, tree and tree *
16400 parameters with a gimple_match_op * parameter.
16401 * gimple-match-head.c (gimple_simplify): Change prototypes of
16402 auto-generated functions to take a gimple_match_op * instead of
16403 separate code_helper * and tree * parameters. Make the same
16404 change in the top-level overload and update calls to the
16405 gimple_resimplify routines. Update calls to the auto-generated
16406 functions and to maybe_push_res_to_seq in the publicly-facing
16407 operation-specific gimple_simplify overloads.
16408 (gimple_match_op::MAX_NUM_OPS): Define.
16409 (gimple_resimplify1): Replace rcode and ops with a single res_op
16410 parameter. Update call to gimple_simplify.
16411 (gimple_resimplify2): Likewise.
16412 (gimple_resimplify3): Likewise.
16413 (mprts_hook): Replace parameters with a gimple_match_op *.
16414 (maybe_build_generic_op): Likewise.
16415 (build_call_internal): Replace type, nargs and ops with
16416 a gimple_match_op *.
16417 (maybe_push_res_to_seq): Replace res_code, type and ops parameters
16418 with a single gimple_match_op *. Update calls to mprts_hook,
16419 build_call_internal and gimple_simplified_result_is_gimple_val.
16420 Factor out code that is common to the tree_code and combined_fn cases.
16421 * genmatch.c (expr::gen_transform): Replace tem_code and
16422 tem_ops with a gimple_match_op called tem_op. Update calls
16423 to the gimple_resimplify functions and maybe_push_res_to_seq.
16424 (dt_simplify::gen_1): Manipulate res_op instead of res_code and
16425 res_ops. Update call to the gimple_resimplify functions.
16426 (dt_simplify::gen): Pass res_op instead of res_code and res_ops.
16427 (decision_tree::gen): Make the functions take a gimple_match_op *
16428 called res_op instead of separate res_code and res_ops parameters.
16429 Update call accordingly.
16430 * gimple-fold.c (replace_stmt_with_simplification): Replace rcode
16431 and ops with a single res_op parameter. Update calls to
16432 maybe_build_generic_op and maybe_push_res_to_seq.
16433 (fold_stmt_1): Update calls to gimple_simplify and
16434 replace_stmt_with_simplification.
16435 (gimple_fold_stmt_to_constant_1): Update calls to gimple_simplify
16436 and gimple_simplified_result_is_gimple_val.
16437 * tree-cfgcleanup.c (cleanup_control_expr_graph): Update call to
16439 * tree-ssa-sccvn.c (vn_lookup_simplify_result): Replace parameters
16440 with a gimple_match_op *.
16441 (vn_nary_build_or_lookup): Likewise. Update call to
16442 vn_nary_build_or_lookup_1.
16443 (vn_nary_build_or_lookup_1): Replace rcode, type and ops with a
16444 gimple_match_op *. Update calls to the gimple_resimplify routines
16445 and to gimple_simplified_result_is_gimple_val.
16446 (vn_nary_simplify): Update call to vn_nary_build_or_lookup_1.
16447 Use gimple_match_op::MAX_NUM_OPS instead of a hard-coded 3.
16448 (vn_reference_lookup_3): Update call to vn_nary_build_or_lookup.
16449 (visit_nary_op): Likewise.
16450 (visit_reference_op_load): Likewise.
16452 2018-05-23 Luis Machado <luis.machado@linaro.org>
16454 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Use correct type
16455 modifier for printing the step amount.
16457 2018-05-23 Jozef Lawrynowicz <jozef.l@somniumtech.com>
16460 * tree.c (build_common_tree_nodes): Dont set TYPE_SIZE for __intN
16463 2018-05-23 Segher Boessenkool <segher@kernel.crashing.org>
16465 * doc/sourcebuild.texi (Endianness): New subsubsection.
16467 2018-05-23 Luis Machado <luis.machado@linaro.org>
16469 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
16470 <prefetch_dynamic_strides>: New const bool field.
16471 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
16472 prefetch_dynamic_strides.
16473 (exynosm1_prefetch_tune): Likewise.
16474 (thunderxt88_prefetch_tune): Likewise.
16475 (thunderx_prefetch_tune): Likewise.
16476 (thunderx2t99_prefetch_tune): Likewise.
16477 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides to
16479 (aarch64_override_options_internal): Update to set
16480 PARAM_PREFETCH_DYNAMIC_STRIDES.
16481 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
16482 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
16483 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
16484 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
16485 prefetch-dynamic-strides setting.
16487 2018-05-23 Luis Machado <luis.machado@linaro.org>
16489 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
16490 <minimum_stride>: New const int field.
16491 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
16492 minimum_stride field defaulting to -1.
16493 (exynosm1_prefetch_tune): Likewise.
16494 (thunderxt88_prefetch_tune): Likewise.
16495 (thunderx_prefetch_tune): Likewise.
16496 (thunderx2t99_prefetch_tune): Likewise.
16497 (qdf24xx_prefetch_tune) <minimum_stride>: Set to 2048.
16498 <default_opt_level>: Set to 3.
16499 (aarch64_override_options_internal): Update to set
16500 PARAM_PREFETCH_MINIMUM_STRIDE.
16501 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
16502 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
16503 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
16504 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
16505 stride is constant and is below the minimum stride threshold.
16507 2018-05-23 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
16509 * config/arm/arm-cpus.in (mode26): Delete.
16510 (armv4): Delete mode26 reference.
16511 * config/arm/arm.c (arm_configure_build_target): Delete use of
16514 2018-05-23 Uros Bizjak <ubizjak@gmail.com>
16516 * config/i386/i386.md (*floatuns<SWI48:mode><MODEF:mode>2_avx512):
16518 (floatunssi<mode>2): Also enable for AVX512F and TARGET_SSE_MATH.
16519 Rewrite expander pattern. Emit gen_floatunssi<mode>2_i387_with_xmm
16521 (floatunsdisf2): Rewrite expander pattern. Hanlde TARGET_AVX512F.
16522 (floatunsdidf2): Ditto.
16524 2018-05-23 Uros Bizjak <ubizjak@gmail.com>
16526 * config/i386/i386.md (fixuns_trunc<mode>di2): New insn pattern.
16527 (fixuns_trunc<mode>si2_avx512f): Ditto.
16528 (*fixuns_trunc<mode>si2_avx512f_zext): Ditto.
16529 (fixuns_trunc<mode>si2): Also enable for AVX512F and TARGET_SSE_MATH.
16530 Emit fixuns_trunc<mode>si2_avx512f for AVX512F targets.
16532 2018-05-23 Alexander Monakov <amonakov@ispras.ru>
16534 PR rtl-optimization/79985
16535 * df-scan.c (df_insn_refs_collect): Remove special case for
16536 global registers and asm statements.
16538 2018-05-23 Alexander Monakov <amonakov@ispras.ru>
16540 * extend.texi (Global Register Variables): Rewrite the bullet list.
16541 Note that the register is available for allocation. Note that access
16542 via inline asm must use constraints. Add note about async-signal
16543 handlers. Remove paragraph about automagic register selection.
16545 2018-05-23 Richard Biener <rguenther@suse.de>
16547 * tree-ssa-sccvn.c (vn_reference_lookup_3): Remove restriction
16548 of fixed offset from memset VN.
16550 2018-05-23 Bill Schmidt <wschmidt@linux.ibm.com>
16552 * gimple-ssa-strength-reduction.c (struct slsr_cand_d): Add
16553 first_interp field.
16554 (alloc_cand_and_find_basis): Initialize first_interp field.
16555 (slsr_process_mul): Modify first_interp field.
16556 (slsr_process_add): Likewise.
16557 (slsr_process_cast): Modify first_interp field for each new
16559 (slsr_process_copy): Likewise.
16560 (dump_candidate): Dump first_interp field.
16561 (replace_mult_candidate): Process all interpretations, not just
16563 (replace_rhs_if_not_dup): Likewise.
16564 (replace_one_candidate): Likewise.
16566 2018-05-23 Wilco Dijkstra <wdijkstr@arm.com>
16568 * config/aarch64/aarch64.c (aarch64_use_frame_pointer):
16570 (aarch64_needs_frame_chain): New function.
16571 (aarch64_parse_override_string): Set aarch64_use_frame_pointer.
16573 2018-05-23 Sudakshina Das <sudi.das@arm.com>
16576 * common/config/aarch64/aarch64-common.c (aarch64_handle_option):
16577 Check val before adding MASK_STRICT_ALIGN to opts->x_target_flags.
16578 * config/aarch64/aarch64.opt (mstrict-align): Remove RejectNegative.
16579 * config/aarch64/aarch64.c (aarch64_attributes): Mark allow_neg
16580 as true for strict-align.
16581 (aarch64_can_inline_p): Perform checks even when callee has no
16582 attributes to check for strict alignment.
16583 * doc/extend.texi (AArch64 Function Attributes): Document
16585 * doc/invoke.texi: (AArch64 Options): Likewise.
16587 2018-05-23 Richard Sandiford <richard.sandiford@linaro.org>
16589 PR tree-optimization/85853
16590 * tree-vect-slp.c (vect_slp_analyze_node_operations): Split out
16591 the handling of the root of the node to...
16592 (vect_slp_analyze_node_operations_1): ...this new function,
16593 and run the whole thing with the child nodes' def types
16594 set according to their SLP node's def type.
16596 2018-05-23 Richard Biener <rguenther@suse.de>
16598 PR middle-end/85874
16599 * tree-data-ref.c (create_runtime_alias_checks): Defer
16600 and ignore overflow warnings.
16602 2018-05-23 Yury Gribov <tetra2005@gmail.com>
16604 PR tree-optimization/85822
16605 * tree-vrp.c (is_masked_range_test): Fix handling of negative
16608 2018-05-23 Richard Biener <rguenther@suse.de>
16610 * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
16611 memset constants via native_interpret_expr.
16613 2018-05-22 H.J. Lu <hongjiu.lu@intel.com>
16616 * cgraph.h (cgraph_node::create): Set ifunc_resolver for ifunc
16618 (cgraph_node::create_alias): Likewise.
16619 (cgraph_node::get_availability): Check ifunc_resolver instead
16620 of looking up ifunc attribute.
16621 * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
16622 * varasm.c (do_assemble_alias): Likewise.
16623 (assemble_alias): Likewise.
16624 (default_binds_local_p_3): Likewise.
16625 * cgraph.h (cgraph_node): Add ifunc_resolver.
16626 (cgraph_node::only_called_directly_or_aliased_p): Return false
16627 for IFUNC resolver.
16628 * lto-cgraph.c (input_node): Set ifunc_resolver for ifunc
16630 * symtab.c (symtab_node::verify_base): Verify that ifunc_resolver
16631 is equivalent to lookup_attribute ("ifunc", DECL_ATTRIBUTES (decl)).
16632 (symtab_node::binds_to_current_def_p): Check ifunc_resolver
16633 instead of looking up ifunc attribute.
16635 2018-05-22 Luis Machado <luis.machado@linaro.org>
16637 * config/aarch64/aarch64.md (*ashift<mode>_extv_bfiz): New pattern.
16639 2018-05-22 Martin Sebor <msebor@redhat.com>
16641 PR middle-end/85359
16642 * builtins.c (expand_builtin_strcpy): Call maybe_warn_nonstring_arg
16643 only when expasion succeeds.
16644 (expand_builtin_strcmp): Same.
16645 (expand_builtin_strncmp): Same.
16647 2018-05-22 Martin Sebor <msebor@redhat.com>
16649 * calls.c (maybe_warn_nonstring_arg): Fix a typo in a comment.
16651 2018-05-22 Jackson Woodruff <jackson.woodruff@arm.com>
16652 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
16654 * config/aarch64/aarch64-ldpstp.md: Replace uses of
16655 aarch64_mem_pair_operand with memory_operand and delete operand swapping
16657 * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
16658 Add check for legitimate_address.
16659 (aarch64_gen_adjusted_ldpstp): Swap operands where appropriate.
16660 (aarch64_swap_ldrstr_operands): New.
16661 * config/aarch64/aarch64-protos.h (aarch64_swap_ldrstr_operands):
16664 2018-05-22 Jackson Woodruff <jackson.woodruff@arm.com>
16665 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
16667 * config/aarch64/aarch64.md: New patterns to generate stp
16669 (store_pair_sw, store_pair_dw): New patterns to generate stp for
16670 single words and double words.
16671 (load_pair_sw, load_pair_dw): Likewise.
16672 (store_pair_sf, store_pair_df, store_pair_si, store_pair_di):
16674 (load_pair_sf, load_pair_df, load_pair_si, load_pair_di):
16676 * config/aarch64/aarch64-ldpstp.md: Modify peephole
16677 for different mode ldpstp and add peephole for merged zero stores.
16678 Likewise for loads.
16679 * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
16681 (aarch64_gen_store_pair): Rename calls to match new patterns.
16682 (aarch64_gen_load_pair): Rename calls to match new patterns.
16683 * config/aarch64/aarch64-simd.md (load_pair<mode>): Rename to...
16684 (load_pair<DREG:mode><DREG2:mode>): ... This.
16685 (store_pair<mode>): Rename to...
16686 (vec_store_pair<DREG:mode><DREG2:mode>): ... This.
16687 * config/aarch64/iterators.md (DREG, DREG2, DX2, SX, SX2, DSX):
16688 New mode iterators.
16689 (V_INT_EQUIV): Handle SImode.
16690 * config/aarch64/predicates.md (aarch64_reg_zero_or_fp_zero):
16693 2018-05-22 Martin Sebor <msebor@redhat.com>
16696 * calls.c (maybe_warn_nonstring_arg): Use string length to set
16697 or ajust the presumed bound on an operation to avoid unnecessary
16700 2018-05-22 Martin Sebor <msebor@redhat.com>
16702 PR tree-optimization/85826
16703 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Avoid
16704 assuming that a DECL necesarily has a constant size.
16706 2018-05-22 Richard Sandiford <richard.sandiford@linaro.org>
16708 PR middle-end/85862
16709 * internal-fn.c (expand_direct_optab_fn): Cope with a null lhs.
16711 2018-05-22 Richard Biener <rguenther@suse.de>
16713 PR tree-optimization/85834
16714 * tree-ssa-sccvn.c (vn_reference_lookup_3): Properly handle
16715 non-constant and non-zero memset arguments.
16717 2018-05-22 Martin Liska <mliska@suse.cz>
16720 * ipa-icf.c (sem_item::add_type): Do not ICE for incomplete types.
16722 2018-05-22 Richard Biener <rguenther@suse.de>
16724 PR tree-optimization/85863
16725 * tree-vect-stmts.c (vect_is_simple_cond): Only widen invariant
16726 comparisons when vectype is specified.
16727 (vectorizable_condition): Do not specify vectype for
16728 vect_is_simple_cond when SLP vectorizing.
16730 2018-05-21 Michael Meissner <meissner@linux.ibm.com>
16733 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Do not
16734 define __ibm128 as long double.
16735 * config/rs6000/rs6000.c (rs6000_init_builtins): Create __ibm128
16736 as a distinct type when IEEE 128-bit support is enabled.
16737 (init_float128_ieee): Fix up conversions between IFmode and IEEE
16738 128-bit types to use the correct functions.
16739 (rs6000_expand_float128_convert): Use explicit FLOAT_EXTEND to
16740 convert between 128-bit floating point types that have different
16741 modes but the same representation, instead of using gen_lowpart to
16743 * config/rs6000/rs6000.md (IFKF): New iterator for IFmode and
16745 (IFKF_reg): New attributes to give the register constraints for
16747 (extend<mode>tf2_internal): New insns to mark an explicit
16748 conversion between 128-bit floating point types that have a
16749 different mode but share the same representation.
16751 2018-05-21 Richard Sandiford <richard.sandiford@linaro.org>
16753 PR tree-optimization/85814
16754 * tree-ssa-strlen.c (get_stridx_plus_constant): Cope with
16755 a null return from get_strinfo when unsharing the next
16756 strinfo in the chain.
16758 2018-05-21 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
16761 * varasm.c (weak_finish): Clean up weak_decls.
16763 2018-05-21 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
16765 * config/aarch64/aarch64.md ("unspec"): Define UNSPEC_SABAL,
16766 UNSPEC_SABDL2, UNSPEC_SADALP, UNSPEC_UABAL, UNSPEC_UABDL2,
16767 UNSPEC_UADALP values.
16768 * config/aarch64/iterators.md (ABAL): New int iterator.
16771 (sur): Add mappings for the above.
16772 * config/aarch64/aarch64-simd.md (aarch64_<sur>abdl2<mode>_3):
16774 (aarch64_<sur>abal<mode>_4): Likewise.
16775 (aarch64_<sur>adalp<mode>_3): Likewise.
16776 (<sur>sadv16qi): New define_expand.
16778 2018-05-21 Alexander Nesterovskiy <alexander.nesterovskiy@intel.com>
16780 * config/i386/i386.md (*movsf_internal): AVX falsedep fix.
16781 (*movdf_internal): Ditto.
16782 (*rcpsf2_sse): Ditto.
16783 (*rsqrtsf2_sse): Ditto.
16784 (*sqrt<mode>2_sse): Ditto.
16786 2018-05-21 Tamar Christina <tamar.christina@arm.com>
16788 * config/aarch64/aarch64-simd.md (aarch64_eor3qv8hi): Change to
16790 (aarch64_bcaxqv8hi): Change to bcaxq<mode>4.
16791 * config/aarch64/aarch64-simd-builtins.def (veor3q_u8, veor3q_u32,
16792 veor3q_u64, veor3q_s8, veor3q_s16, veor3q_s32, veor3q_s64, vbcaxq_u8,
16793 vbcaxq_u32, vbcaxq_u64, vbcaxq_s8, vbcaxq_s16, vbcaxq_s32,
16795 * config/aarch64/arm_neon.h: Likewise.
16796 * config/aarch64/iterators.md (VQ_I): New.
16798 2018-05-21 Alexey Brodkin <abrodkin@synopsys.com>
16800 * config.gcc: Add arc/t-multilib-linux to tmake_file for
16802 * config/arc/t-multilib-linux: Specify MULTILIB_OPTIONS and
16805 2018-05-20 Chung-Ju Wu <jasonwucj@gmail.com>
16807 * config/nds32/constraints.md (S): New constraint.
16808 * config/nds32/nds32.md (call_internal): Use constraint S.
16809 (call_value_internal): Likewise.
16810 (sibcall_internal): Likewise.
16811 (sibcall_value_internal): Likewise.
16813 2018-05-20 Kito Cheng <kito.cheng@gmail.com>
16814 Chung-Ju Wu <jasonwucj@gmail.com>
16816 * config/nds32/nds32.c (nds32_register_move_cost): Take garywolf cpu
16817 into consideration.
16819 2018-05-20 Kito Cheng <kito.cheng@gmail.com>
16820 Chung-Ju Wu <jasonwucj@gmail.com>
16822 * config/nds32/nds32-cost.c (rtx_cost_model_t): New structure.
16823 (insn_size_16bit, insn_size_32bit): New variables for cost evaluation.
16824 (nds32_rtx_costs_impl): Simplify.
16825 (nds32_address_cost_impl): Simplify.
16826 (nds32_init_rtx_costs): New function.
16827 (nds32_rtx_costs_speed_prefer): Likewise.
16828 (nds32_rtx_costs_size_prefer): Likewise.
16829 (nds32_address_cost_speed_prefer): Likewise.
16830 (nds32_address_cost_speed_fwprop): Likewise.
16831 (nds32_address_cost_size_prefer): Likewise.
16832 * config/nds32/nds32-protos.h (nds32_init_rtx_costs): Declare.
16833 * config/nds32/nds32.c (nds32_option_override): Use
16834 nds32_init_rtx_costs function.
16836 2018-05-20 Chung-Ju Wu <jasonwucj@gmail.com>
16838 * config/nds32/nds32.c (nds32_asm_file_start): Output pipeline model.
16839 * config/nds32/nds32.h (TARGET_PIPELINE_N7): Define.
16840 (TARGET_PIPELINE_N8): Likewise.
16841 (TARGET_PIPELINE_N10): Likewise.
16842 (TARGET_PIPELINE_N13): Likewise.
16843 (TARGET_PIPELINE_GRAYWOLF): Likewise.
16845 2018-05-19 Monk Chiang <sh.chiang04@gmail.com>
16847 * config/nds32/nds32-fpu.md: Update copyright year.
16849 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
16851 * config/nds32/nds32.h (ASM_SPEC): Adjust spec rule.
16853 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
16855 * config/nds32/nds32.c
16856 (nds32_md_asm_adjust): Consider flag_inline_asm_r15 variable.
16857 * config/nds32/nds32.opt (minline-asm-r15): New option.
16859 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
16861 * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS): Add
16863 * config/nds32/nds32.md (abssi2): New pattern.
16865 2018-05-19 Uros Bizjak <ubizjak@gmail.com>
16867 * config/i386/i386.md (rex64namesuffix): New mode attribute.
16868 * config/i386/sse.md (sse_cvtsi2ss<rex64namesuffix><round_name>):
16869 Merge insn pattern from sse_cvtsi2ss<round_name> and
16870 sse_cvtsi2ssq<round_name> using SWI48 mode iterator.
16871 (sse_cvtss2si<rex64namesuffix><round_name>): Merge insn pattern
16872 from sse_cvtss2si<round_name> and sse_cvtss2siq<round_name>
16873 using SWI48 mode iterator.
16874 (sse_cvtss2si<rex64namesuffix>_2): Merge insn pattern from
16875 sse_cvtss2si_2 and sse_cvtss2siq_2 using SWI48 mode iterator.
16876 (sse_cvttss2si<rex64namesuffix><round_saeonly_name>): Merge insn
16877 pattern from sse_cvttss2si<round_saeonly_name>
16878 and sse_cvttss2siq<round_saeonly_name> using SWI48 mode iterator.
16879 (avx512f_vcvtss2usi<rex64namesuffix><round_name>): Merge insn pattern
16880 from avx512f_vcvtss2usi<round_name> and avx512f_vcvtss2usiq<round_name>
16881 using SWI48 mode iterator.
16882 (avx512f_vcvttss2usi<rex64namesuffix><round_saeonly_name>): Merge
16883 insn pattern from avx512f_vcvttss2usi<round_saeonly_name> and
16884 avx512f_vcvttss2usiq<round_saeonly_name> using SWI48 mode iterator.
16885 (avx512f_vcvtsd2usi<rex64namesuffix><round_name>): Merge insn pattern
16886 from avx512f_vcvtsd2usi<round_name> and avx512f_vcvtsd2usiq<round_name>
16887 using SWI48 mode iterator.
16888 (avx512f_vcvttsd2usi<rex64namesuffix><round_saeonly_name>): Merge
16889 insn pattern from avx512f_vcvttsd2usi<round_saeonly_name> and
16890 avx512f_vcvttsd2usiq<round_saeonly_name> using SWI48 mode iterator.
16891 (sse2_cvtsd2si<rex64namesuffix><round_name>): Merge insn pattern from
16892 sse2_cvtsd2si<round_name> and sse2_cvtsd2siq<round_name> using
16893 SWI48 mode iterator.
16894 (sse2_cvtsd2si<rex64namesuffix>_2): Merge insn pattern from
16895 sse2_cvtsd2si_2 and sse2_cvtsd2siq_2 using SWI48 mode iterator.
16896 (sse_cvttsd2si<rex64namesuffix><round_saeonly_name>): Merge insn
16897 pattern from sse_cvttsd2si<round_saeonly_name>
16898 and sse_cvttsd2siq<round_saeonly_name> using SWI48 mode iterator.
16900 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
16902 * config/nds32/nds32-md-auxiliary.c
16903 (nds32_valid_smw_lwm_base_p): Refine.
16904 (nds32_output_smw_single_word): Refine.
16905 (nds32_output_smw_double_word): New.
16906 * config/nds32/nds32-protos.h (nds32_output_smw_double_word): New.
16908 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
16910 * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push): Refine.
16911 (nds32_output_stack_pop): Refine.
16912 (nds32_expand_unaligned_load): Refine.
16913 (nds32_expand_unaligned_store): Refine.
16915 2018-05-19 Kuan-Lin Chen <kuanlinchentw@gmail.com>
16916 Chung-Ju Wu <jasonwucj@gmail.com>
16918 * config/nds32/constants.md: Add TP_REGNUM constant.
16919 (unspec_element): Add UNSPEC_GOTINIT, UNSPEC_GOT, UNSPEC_GOTOFF,
16920 UNSPEC_PLT, UNSPEC_TLSGD, UNSPEC_TLSLD, UNSPEC_TLSIE, UNSPEC_TLSLE and
16922 * config/nds32/nds32-doubleword.md: Consider flag_pic.
16923 * config/nds32/nds32-dspext.md (mov<mode>): Expand TLS and PIC cases.
16924 * config/nds32/nds32-predicates.c (nds32_const_unspec_p): New.
16925 * config/nds32/nds32-md-auxiliary.c: Implementation that support TLS
16926 and PIC code generation.
16927 * config/nds32/nds32-protos.h: Declarations that support TLS and PIC
16929 * config/nds32/nds32-relax-opt.c: Consider TLS and PIC for relax
16931 * config/nds32/nds32.md: Support TLS and PIC.
16932 * config/nds32/nds32.c: Support TLS and PIC.
16933 * config/nds32/nds32.h (nds32_relax_insn_type): New enum type.
16934 * config/nds32/predicates.md (nds32_nonunspec_symbolic_operand): New
16937 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
16939 * config/nds32/nds32-predicates.c (const_vector_to_hwint): Use machine
16940 mode with E_ prefix.
16942 2018-05-19 Kuan-Lin Chen <kuanlinchentw@gmail.com>
16943 Chung-Ju Wu <jasonwucj@gmail.com>
16945 * config/nds32/constants.md (unspec_element): Add UNSPEC_ICT.
16946 * config/nds32/nds32-md-auxiliary.c
16947 (symbolic_reference_mentioned_p): New.
16948 (nds32_legitimize_ict_address): New.
16949 (nds32_expand_ict_move): New.
16950 (nds32_indirect_call_referenced_p): New.
16951 (nds32_symbol_binds_local_p): Delete.
16952 (nds32_long_call_p): Modify.
16953 * config/nds32/nds32-opts.h (nds32_ict_model_type): New enum type.
16954 * config/nds32/nds32-protos.h
16955 (symbolic_reference_mentioned_p): Declare.
16956 (nds32_legitimize_ict_address): Declare.
16957 (nds32_expand_ict_move): Declare.
16958 (nds32_indirect_call_referenced_p): Declare.
16959 * config/nds32/nds32-relax-opt.c (nds32_ict_const_p): New.
16960 (nds32_relax_group): Use nds32_ict_const_p as condition.
16961 * config/nds32/nds32.c (nds32_attribute_table): Add "indirect_call".
16962 (nds32_asm_file_start): Output ict_model directive in asm code.
16963 (nds32_legitimate_address_p): Consider indirect call.
16964 (nds32_print_operand): Consider indirect call.
16965 (nds32_print_operand_address): Consider indirect call.
16966 (nds32_insert_attributes): Handle "indirect_call" attribute.
16967 (TARGET_LEGITIMATE_ADDRESS_P): Define.
16968 (TARGET_LEGITIMATE_CONSTANT_P): Define.
16969 (TARGET_CANNOT_FORCE_CONST_MEM): Define.
16970 (TARGET_DELEGITIMIZE_ADDRESS): Define.
16971 (TARGET_ASM_OUTPUT_ADDR_CONST_EXTRA): Define.
16972 * config/nds32/nds32.h (SYMBOLIC_CONST_P): Define.
16973 (TARGET_ICT_MODEL_SMALL): Define.
16974 (TARGET_ICT_MODEL_LARGE): Define.
16975 * config/nds32/nds32.md (movsi): Consider ict model.
16976 (call, call_value): Consider ict model.
16977 (sibcall, sibcall_value): Consider ict model.
16978 * config/nds32/nds32.opt (mict-model): New option.
16979 * config/nds32/predicates.md (nds32_symbolic_operand): Consider ict
16982 2018-05-18 Kito Cheng <kito.cheng@gmail.com>
16983 Monk Chiang <sh.chiang04@gmail.com>
16984 Jim Wilson <jimw@sifive.com>
16986 * common/config/riscv/riscv-common.c (riscv_parse_arch_string):
16987 Add support to parse rv32e*. Clear MASK_RVE for rv32i and rv64i.
16988 * config.gcc (riscv*-*-*): Add support for rv32e* and ilp32e.
16989 * config/riscv/riscv-c.c (riscv_cpu_cpp_builtins): Define
16990 __riscv_32e when TARGET_RVE. Handle ABI_ILP32E as soft-float ABI.
16991 * config/riscv/riscv-opts.h (riscv_abi_type): Add ABI_ILP32E.
16992 * config/riscv/riscv.c (riscv_compute_frame_info): When TARGET_RVE,
16993 compute save_libcall_adjustment properly.
16994 (riscv_option_override): Call error if TARGET_RVE and not ABI_ILP32E.
16995 (riscv_conditional_register_usage): Handle TARGET_RVE and ABI_ILP32E.
16996 * config/riscv/riscv.h (UNITS_PER_FP_ARG): Handle ABI_ILP32E.
16997 (STACK_BOUNDARY, ABI_STACK_BOUNDARY): Handle TARGET_RVE.
16998 (GP_REG_LAST, MAX_ARGS_IN_REGISTERS): Likewise.
16999 (ABI_SPEC): Handle mabi=ilp32e.
17000 * config/riscv/riscv.opt (abi_type): Add ABI_ILP32E.
17001 (RVE): Add RVE mask.
17002 * doc/invoke.texi (RISC-V options) <-mabi>: Add ilp32e info.
17003 <-march>: Add rv32e as an example.
17005 2018-05-18 Marc Glisse <marc.glisse@inria.fr>
17008 * tree-ssa-structalias.c (create_variable_info_for_1): Extra argument.
17009 (intra_create_variable_infos): Handle C++ constructors.
17011 2018-05-18 Martin Liska <mliska@suse.cz>
17013 * passes.def: Remove a redundant pass.
17015 2018-05-18 Eric Botcazou <ebotcazou@adacore.com>
17018 * config/sparc/sparc.c (sparc_expand_builtin): Always initialize op[0].
17020 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
17022 * config/arm/arm-cpus.in (armv3m, mode32): Delete features.
17024 (ARMv2, ARMv3, ARMv3m): Delete fgroups.
17026 (armv2, armv2a, armv3, armv3m): Delete architectures.
17027 (arm2, arm250, arm3, arm6, arm60, arm600, arm610, arm620,
17028 arm7, arm7d, arm7di, arm70, arm700, arm700i, arm710, arm720,
17029 arm710c, arm7100, arm7500, arm7500fe, arm7m, arm7dm, arm7dmi):
17031 * config/arm/arm.md (maddsidi4): Remove check for arm_arch3m.
17032 (*mulsidi3adddi): Likewise.
17033 (mulsidi3): Likewise.
17034 (*mulsidi3_nov6): Likewise.
17035 (umulsidi3): Likewise.
17036 (umulsidi3_nov6): Likewise.
17037 (umaddsidi4): Likewise.
17038 (*umulsidi3adddi): Likewise.
17039 (smulsi3_highpart): Likewise.
17040 (*smulsi3_highpart_nov6): Likewise.
17041 (umulsi3_highpart): Likewise.
17042 (*umulsi3_highpart_nov6): Likewise.
17043 * config/arm/arm.h (arm_arch3m): Delete.
17044 * config/arm/arm.c (arm_arch3m): Delete.
17045 (arm_option_override_internal): Update armv3-related comment.
17046 (arm_configure_build_target): Delete use of isa_bit_mode32.
17047 (arm_option_reconfigure_globals): Delete set of arm_ach3m.
17048 (arm_rtx_costs_internal): Delete check of arm_arch3m.
17049 * config/arm/arm-fixed.md (mulsq3): Delete check for arm_arch3m.
17050 (mulsa3): Likewise.
17051 (mulusa3): Likewise.
17052 * config/arm/arm-protos.h (arm_arch3m): Delete.
17053 * config/arm/arm-tables.opt: Regenerate.
17054 * config/arm/arm-tune.md: Likewise.
17055 * config/arm/t-arm-elf (all_early_nofp): Delete mentions of
17056 deleted architectures.
17058 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
17060 * config/arm/arm-cpus.in (armv5, armv5e): Delete features.
17061 (armv5t, armv5te): New features.
17062 (ARMv5, ARMv5e): Delete fgroups.
17063 (ARMv5t, ARMv5te): Adjust for above changes.
17064 (ARMv6m): Likewise.
17065 (armv5, armv5e): Delete arches.
17066 * config/arm/arm.md (*call_reg_armv5): Use arm_arch5t instead of
17068 (*call_reg_arm): Likewise.
17069 (*call_value_reg_armv5): Likewise.
17070 (*call_value_reg_arm): Likewise.
17071 (*call_symbol): Likewise.
17072 (*call_value_symbol): Likewise.
17073 (*sibcall_insn): Likewise.
17074 (*sibcall_value_insn): Likewise.
17075 (clzsi2): Likewise.
17076 (prefetch): Likewise.
17077 (define_split and define_peephole2 dependent on arm_arch5):
17079 * config/arm/arm.h (TARGET_LDRD): Use arm_arch5te instead of
17081 (TARGET_ARM_QBIT): Likewise.
17082 (TARGET_DSP_MULTIPLY): Likewise.
17083 (enum base_architecture): Delete BASE_ARCH_5, BASE_ARCH_5E.
17084 (arm_arch5, arm_arch5e): Delete.
17085 (arm_arch5t, arm_arch5te): Declare.
17086 * config/arm/arm.c (arm_arch5, arm_arch5e): Delete.
17087 (arm_arch5t): Declare.
17088 (arm_option_reconfigure_globals): Update for the above.
17089 (arm_options_perform_arch_sanity_checks): Update comment, replace
17090 use of arm_arch5 with arm_arch5t.
17091 (use_return_insn): Likewise.
17092 (arm_emit_call_insn): Likewise.
17093 (output_return_instruction): Likewise.
17094 (arm_final_prescan_insn): Likewise.
17095 (arm_coproc_builtin_available): Likewise.
17096 * config/arm/arm-c.c (arm_cpu_builtins): Replace arm_arch5 and
17097 arm_arch5e with arm_arch5t and arm_arch5te.
17098 * config/arm/arm-protos.h (arm_arch5, arm_arch5e): Delete.
17099 (arm_arch5t, arm_arch5te): Declare.
17100 * config/arm/arm-tables.opt: Regenerate.
17101 * config/arm/t-arm-elf: Remove references to armv5, armv5e.
17102 * config/arm/t-multilib: Likewise.
17103 * config/arm/thumb1.md (*call_reg_thumb1_v5): Check arm_arch5t
17104 instead of arm_arch5.
17105 (*call_reg_thumb1): Likewise.
17106 (*call_value_reg_thumb1_v5): Likewise.
17107 (*call_value_reg_thumb1): Likewise.
17108 * config/arm/vxworks.h (TARGET_OS_CPP_BUILTINS): Remove now
17110 * doc/invoke.texi (ARM Options): Remove references to armv5, armv5e.
17112 2018-05-18 Martin Liska <mliska@suse.cz>
17114 PR gcov-profile/84846
17115 * doc/gcov.texi: Document -t option of gcov tool.
17117 2018-05-18 Martin Liska <mliska@suse.cz>
17119 PR gcov-profile/84846
17120 * gcov.c (print_usage): Add new -t option.
17121 (process_args): Handle the option.
17122 (generate_results): Use stdout as output when requested by
17125 2018-05-18 Martin Liska <mliska@suse.cz>
17127 PR gcov-profile/84846
17128 * coverage.c (coverage_init): Write PWD to .gcno file.
17129 * doc/gcov.texi: Document how working directory is printed.
17130 * gcov-dump.c (dump_gcov_file): Print PWD.
17131 * gcov.c (output_intermediate_file): Likewise.
17132 (read_graph_file): Read PWD string.
17133 (output_lines): Print PWD.
17135 2018-05-18 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
17137 PR middle-end/85817
17138 * ipa-pure-const.c (malloc_candidate_p): Remove the check integer_zerop
17139 for retval and return false if all args to phi are zero.
17141 2018-05-18 Richard Biener <rguenther@suse.de>
17143 * gimple-ssa-evrp.c (class evrp_folder): Add simplify_stmt_using_ranges
17145 (evrp_dom_walker::before_dom_children): Call it.
17147 2018-05-18 Richard Biener <rguenther@suse.de>
17149 * tree-dfa.c (get_ref_base_and_extent): Use range-info to refine
17150 results when processing array refs with variable index.
17152 2018-05-18 Toon Moene <toon@moene.org>
17154 * doc/invoke.texi: Move -floop-unroll-and-jam documentation
17155 directly after that of -floop-interchange. Indicate that both
17156 options are enabled by default when specifying -O3.
17158 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
17160 * config/aarch64/aarch64-simd.md (vec_set<mode>): Use VALL_F16 mode
17161 iterator. Delete separate integer-mode vec_set<mode> expander.
17162 (aarch64_simd_vec_setv2di): Delete.
17163 (vec_setv2di): Delete.
17164 (aarch64_simd_vec_set<mode>): Delete all other patterns with that name.
17165 Use VALL_F16 mode iterator. Add LD1 alternative and use vwcore for
17166 the "w, r" alternative.
17168 2018-05-18 Martin Liska <mliska@suse.cz>
17170 * passes.def: Add pass_lower_switch and pass_lower_switch_O0.
17171 * tree-pass.h (make_pass_lower_switch_O0): New function.
17172 * tree-switch-conversion.c (node_has_low_bound): Remove.
17173 (node_has_high_bound): Likewise.
17174 (node_is_bounded): Likewise.
17175 (class pass_lower_switch): Make it a template type and create
17177 (pass_lower_switch::execute): Add template argument.
17178 (make_pass_lower_switch): New function.
17179 (make_pass_lower_switch_O0): New function.
17180 (do_jump_if_equal): Remove.
17181 (emit_case_nodes): Simplify to just handle all 3 cases and leave
17182 all the hard work to tree optimization passes.
17184 2018-05-18 Martin Liska <mliska@suse.cz>
17186 * dbgcnt.c (limit_low): Renamed from limit.
17187 (limit_high): New variable.
17188 (dbg_cnt_is_enabled): Check for upper limit.
17189 (dbg_cnt): Adjust dumping.
17190 (dbg_cnt_set_limit_by_index): Add new argument for high
17192 (dbg_cnt_set_limit_by_name): Likewise.
17193 (dbg_cnt_process_single_pair): Parse new format.
17194 (dbg_cnt_process_opt): Use strtok.
17195 (dbg_cnt_list_all_counters): Remove 'value' and add
17197 * doc/invoke.texi: Document changes.
17199 2018-05-18 Richard Sandiford <richard.sandiford@linaro.org>
17201 * doc/sourcebuild.texi (scalar_all_fma): Document.
17202 * tree.def (FMA_EXPR): Delete.
17203 * internal-fn.def (FMA, FMS, FNMA, FNMS): New internal functions.
17204 * internal-fn.c (ternary_direct): New macro.
17205 (expand_ternary_optab_fn): Likewise.
17206 (direct_ternary_optab_supported_p): Likewise.
17207 * Makefile.in (build/genmatch.o): Depend on case-fn-macros.h.
17208 * builtins.c (fold_builtin_fma): Delete.
17209 (fold_builtin_3): Don't call it.
17210 * cfgexpand.c (expand_debug_expr): Remove FMA_EXPR handling.
17211 * expr.c (expand_expr_real_2): Likewise.
17212 * fold-const.c (operand_equal_p): Likewise.
17213 (fold_ternary_loc): Likewise.
17214 * gimple-pretty-print.c (dump_ternary_rhs): Likewise.
17215 * gimple.c (DEFTREECODE): Likewise.
17216 * gimplify.c (gimplify_expr): Likewise.
17217 * optabs-tree.c (optab_for_tree_code): Likewise.
17218 * tree-cfg.c (verify_gimple_assign_ternary): Likewise.
17219 * tree-eh.c (operation_could_trap_p): Likewise.
17220 (stmt_could_throw_1_p): Likewise.
17221 * tree-inline.c (estimate_operator_cost): Likewise.
17222 * tree-pretty-print.c (dump_generic_node): Likewise.
17223 (op_code_prio): Likewise.
17224 * tree-ssa-loop-im.c (stmt_cost): Likewise.
17225 * tree-ssa-operands.c (get_expr_operands): Likewise.
17226 * tree.c (commutative_ternary_tree_code, add_expr): Likewise.
17227 * fold-const-call.h (fold_fma): Delete.
17228 * fold-const-call.c (fold_const_call_ssss): Handle CFN_FMS,
17229 CFN_FNMA and CFN_FNMS.
17230 (fold_fma): Delete.
17231 * genmatch.c (combined_fn): New enum.
17232 (commutative_ternary_tree_code): Remove FMA_EXPR handling.
17233 (commutative_op): New function.
17234 (commutate): Use it. Handle more than 2 operands.
17235 (dt_operand::gen_gimple_expr): Use commutative_op.
17236 (parser::parse_expr): Allow :c to be used with non-binary
17237 operators if the commutative operand is known.
17238 * gimple-ssa-backprop.c (backprop::process_builtin_call_use): Handle
17239 CFN_FMS, CFN_FNMA and CFN_FNMS.
17240 (backprop::process_assign_use): Remove FMA_EXPR handling.
17241 * hsa-gen.c (gen_hsa_insns_for_operation_assignment): Likewise.
17242 (gen_hsa_fma): New function.
17243 (gen_hsa_insn_for_internal_fn_call): Use it for IFN_FMA, IFN_FMS,
17244 IFN_FNMA and IFN_FNMS.
17245 * match.pd: Add folds for IFN_FMS, IFN_FNMA and IFN_FNMS.
17246 * gimple-fold.h (follow_all_ssa_edges): Declare.
17247 * gimple-fold.c (follow_all_ssa_edges): New function.
17248 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Use the
17249 gimple_build interface and use follow_all_ssa_edges to fold the result.
17250 (convert_mult_to_fma): Use direct_internal_fn_suppoerted_p
17251 instead of checking for optabs directly.
17252 * config/i386/i386.c (ix86_add_stmt_cost): Recognize FMAs as calls
17253 rather than FMA_EXPRs.
17254 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Create a
17255 call to IFN_FMA instead of an FMA_EXPR.
17257 2018-05-17 Jim Wilson <jimw@sifive.com>
17259 * expr.c (do_tablejump): When converting index to Pmode, if we have a
17260 sign extended promoted subreg, and the range does not have the sign bit
17261 set, then do a sign extend.
17263 * config/riscv/riscv.c (riscv_extend_comparands): In unsigned QImode
17264 test, check for sign extended subreg and/or constant operands, and
17265 do a sign extend in that case.
17267 2018-05-17 Steve Ellcey <sellcey@cavium.com>
17269 * config/aarch64/thunderx2t99.md (thunderx2t99_ls_both): Delete.
17270 (thunderx2t99_multiple): Delete psuedo-units from used cpus.
17272 (thunderx2t99_alu_shift): Remove alu_shift_reg, alus_shift_reg.
17273 Change logics_shift_reg to logics_shift_imm.
17274 (thunderx2t99_fp_loadpair_basic): Delete.
17275 (thunderx2t99_fp_storepair_basic): Delete.
17276 (thunderx2t99_asimd_int): Add neon_sub and neon_sub_q types.
17277 (thunderx2t99_asimd_polynomial): Delete.
17278 (thunderx2t99_asimd_fp_simple): Add neon_fp_mul_s_scalar_q
17279 and neon_fp_mul_d_scalar_q.
17280 (thunderx2t99_asimd_fp_conv): Add *int_to_fp* types.
17281 (thunderx2t99_asimd_misc): Delete neon_dup and neon_dup_q.
17282 (thunderx2t99_asimd_recip_step): Add missing *sqrt* types.
17283 (thunderx2t99_asimd_lut): Add missing tbl types.
17284 (thunderx2t99_asimd_ext): Delete.
17285 (thunderx2t99_asimd_load1_1_mult): Delete.
17286 (thunderx2t99_asimd_load1_2_mult): Delete.
17287 (thunderx2t99_asimd_load1_ldp): New.
17288 (thunderx2t99_asimd_load1): New.
17289 (thunderx2t99_asimd_load2): Add missing *load2* types.
17290 (thunderx2t99_asimd_load3): New.
17291 (thunderx2t99_asimd_load4): New.
17292 (thunderx2t99_asimd_store1_1_mult): Delete.
17293 (thunderx2t99_asimd_store1_2_mult): Delete.
17294 (thunderx2t99_asimd_store2_mult): Delete.
17295 (thunderx2t99_asimd_store2_onelane): Delete.
17296 (thunderx2t99_asimd_store_stp): New.
17297 (thunderx2t99_asimd_store1): New.
17298 (thunderx2t99_asimd_store2): New.
17299 (thunderx2t99_asimd_store3): New.
17300 (thunderx2t99_asimd_store4): New.
17302 2018-05-17 Jerome Lambourg <lambourg@adacore.com>
17304 * config/arm/arm_cmse.h (cmse_nsfptr_create, cmse_is_nsfptr): Remove
17305 #include <stdint.h>. Replace intptr_t with __INTPTR_TYPE__.
17307 2018-05-17 Pat Haugen <pthaugen@us.ibm.com>
17308 Segher Boessenkool <segher@kernel.crashing.org>
17311 * config/rs6000/rs6000.c (rs6000_output_move_128bit): Check dest
17314 2018-05-17 Richard Biener <rguenther@suse.de>
17316 * tree-ssa-dse.c (dse_classify_store): Fix iterator increment
17317 for pruning loop and prune defs feeding only already visited PHIs.
17319 2018-05-17 Richard Biener <rguenther@suse.de>
17321 * tree-ssa-sccvn.c (vn_reference_lookup_3): Improve memset handling.
17323 2018-05-17 Bin Cheng <bin.cheng@arm.com>
17324 Richard Biener <rguenther@suse.de>
17326 PR tree-optimization/85793
17327 * tree-vect-stmts.c (vectorizable_load): Handle 1 element-wise load
17328 for VMAT_ELEMENTWISE.
17330 2018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
17332 * internal-fn.h (lookup_internal_fn): Declare
17333 * internal-fn.c (lookup_internal_fn): New function.
17334 * gimple.c (gimple_build_call_from_tree): Handle calls to
17335 internal functions.
17336 * gimple-pretty-print.c (dump_gimple_call): Print "." before
17337 internal function names.
17338 * tree-pretty-print.c (dump_generic_node): Likewise.
17339 * tree-ssa-scopedtables.c (expr_hash_elt::print): Likewise.
17341 2018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
17343 * gimple-fold.h (gimple_build): Make the function forms take
17344 combined_fn rather than built_in_function.
17345 (gimple_simplify): Likewise.
17346 * gimple-match-head.c (gimple_simplify): Likewise.
17347 * gimple-fold.c (gimple_build): Likewise.
17348 * tree-vect-loop.c (get_initial_def_for_reduction): Use gimple_build
17349 rather than gimple_build_call_internal.
17350 (get_initial_defs_for_reduction): Likewise.
17351 (vect_create_epilog_for_reduction): Likewise.
17352 (vectorizable_live_operation): Likewise.
17354 2018-05-17 Martin Liska <mliska@suse.cz>
17356 * gimple-ssa-sprintf.c (format_directive): Do not use
17357 space in between 'G_' and '('.
17359 2018-05-17 Jakub Jelinek <jakub@redhat.com>
17362 * config/i386/i386.c (ix86_fold_builtin): Handle masked shifts
17363 even if the mask is not all ones.
17366 * config/i386/i386.c (ix86_fold_builtin): Fold shift builtins by
17368 (ix86_gimple_fold_builtin): Likewise.
17371 * config/i386/i386.c: Include tree-vector-builder.h.
17372 (ix86_vector_shift_count): New function.
17373 (ix86_fold_builtin): Fold shift builtins by scalar count.
17374 (ix86_gimple_fold_builtin): Likewise.
17376 * config/i386/avx512fintrin.h (_mm512_set_epi16, _mm512_set_epi8,
17377 _mm512_setzero): New intrinsics.
17379 2018-05-17 James Greenhalgh <james.greenhalgh@arm.com>
17380 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
17382 * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify
17383 code generation for cases where splatting a value is not useful.
17384 * simplify-rtx.c (simplify_ternary_operation): Simplify
17385 vec_merge across a vec_duplicate and a paradoxical subreg forming
17386 a vector mode to a vec_concat.
17388 2018-05-17 Olga Makhotina <olga.makhotina@intel.com>
17390 * config.gcc: Support "goldmont-plus".
17391 * config/i386/driver-i386.c (host_detect_local_cpu): Detect
17393 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
17394 PROCESSOR_GOLDMONT_PLUS.
17395 * config/i386/i386.c (m_GOLDMONT_PLUS): Define.
17396 (processor_target_table): Add "goldmont-plus".
17397 (PTA_GOLDMONT_PLUS): Define.
17398 (ix86_lea_outperforms): Add TARGET_GOLDMONT_PLUS.
17399 (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT_PLUS.
17400 (fold_builtin_cpu): Add M_INTEL_GOLDMONT_PLUS.
17401 (fold_builtin_cpu): Add "goldmont-plus".
17402 (ix86_add_stmt_cost): Add TARGET_GOLDMONT_PLUS.
17403 (ix86_option_override_internal): Add "goldmont-plus".
17404 * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT_PLUS.
17405 (processor_type): Add PROCESSOR_GOLDMONT_PLUS.
17406 * config/i386/x86-tune.def: Add m_GOLDMONT_PLUS.
17407 * doc/invoke.texi: Add goldmont-plus as x86 -march=/-mtune= CPU type.
17409 2018-05-17 Richard Biener <rguenther@suse.de>
17411 PR tree-optimization/85757
17412 * tree-ssa-dse.c (dse_classify_store): Record a PHI def and
17413 remove defs that only feed that PHI from further processing.
17415 2018-05-16 Jim Wilson <jimw@sifive.com>
17417 * config/riscv/riscv.md (<optab>si3_mask, <optab>si3_mask_1): Prepend
17419 (<optab>di3_mask, <optab>di3_mask_1): Likewise.
17421 2018-05-16 Mark Wielaard <mark@klomp.org>
17423 * dwarf2out.c (count_index_strings): New function.
17424 (output_indirect_strings): Call count_index_strings and generate
17425 header for dwarf_version >= 5.
17427 2018-05-16 Mark Wielaard <mark@klomp.org>
17429 * dwarf2out.c (dwarf_FORM): New function.
17430 (set_indirect_string): Use dwarf_FORM.
17431 (reset_indirect_string): Likewise.
17432 (size_of_die): Likewise.
17433 (value_format): Likewise.
17434 (output_die): Likewise.
17435 (add_skeleton_AT_string): Likewise.
17436 (output_macinfo_op): Likewise.
17437 (index_string): Likewise.
17438 (output_index_string_offset): Likewise.
17439 (output_index_string): Likewise.
17440 (count_index_strings): Likewise.
17442 2018-05-16 Carl Love <cel@us.ibm.com>
17444 * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
17445 dcbt and dcbtstt with TH=16 if operands[2] is 0 and Power 8 or newer.
17447 2018-05-16 Martin Jambor <mjambor@suse.cz>
17449 * ipa-prop.c (ipa_free_all_edge_args): Remove.
17450 * ipa-prop.h (ipa_free_all_edge_args): Likewise.
17452 2018-05-16 Wilco Dijkstra <wdijkstr@arm.com>
17454 * config/aarch64/aarch64.md (fma<mode>4): Change into expand pattern.
17455 (fnma<mode>4): Likewise.
17456 (fms<mode>4): Likewise.
17457 (fnms<mode>4): Likewise.
17458 (aarch64_fma<mode>4): Rename insn, reorder accumulator operand.
17459 (aarch64_fnma<mode>4): Likewise.
17460 (aarch64_fms<mode>4): Likewise.
17461 (aarch64_fnms<mode>4): Likewise.
17462 (aarch64_fnmadd<mode>4): Likewise.
17464 2018-05-16 Jason Merrill <jason@redhat.com>
17466 * tree.c (warn_deprecated_use): Return bool. Simplify logic.
17468 2018-05-16 Richard Biener <rguenther@suse.de>
17470 * tree-vectorizer.h (struct stmt_info_for_cost): Add where member.
17471 (dump_stmt_cost): Declare.
17472 (add_stmt_cost): Dump cost we add.
17473 (add_stmt_costs): New function.
17474 (vect_model_simple_cost, vect_model_store_cost, vect_model_load_cost):
17475 No longer exported.
17476 (vect_analyze_stmt): Adjust prototype.
17477 (vectorizable_condition): Likewise.
17478 (vectorizable_live_operation): Likewise.
17479 (vectorizable_reduction): Likewise.
17480 (vectorizable_induction): Likewise.
17481 * tree-vect-loop.c (vect_analyze_loop_operations): Create local
17482 cost vector to pass to vectorizable_ and record afterwards.
17483 (vect_model_reduction_cost): Take cost vector argument and adjust.
17484 (vect_model_induction_cost): Likewise.
17485 (vectorizable_reduction): Likewise.
17486 (vectorizable_induction): Likewise.
17487 (vectorizable_live_operation): Likewise.
17488 * tree-vect-slp.c (vect_create_new_slp_node): Initialize
17489 SLP_TREE_NUMBER_OF_VEC_STMTS.
17490 (vect_analyze_slp_cost_1): Remove.
17491 (vect_analyze_slp_cost): Likewise.
17492 (vect_slp_analyze_node_operations): Take visited args and
17493 a target cost vector. Avoid processing already visited stmt sets.
17494 (vect_slp_analyze_operations): Use a local cost vector to gather
17495 costs and register those of non-discarded instances.
17496 (vect_bb_vectorization_profitable_p): Use add_stmt_costs.
17497 (vect_schedule_slp_instance): Remove copying of
17498 SLP_TREE_NUMBER_OF_VEC_STMTS. Instead assert that it is not
17500 * tree-vect-stmts.c (record_stmt_cost): Remove path directly
17501 adding cost. Record cost entry location.
17502 (vect_prologue_cost_for_slp_op): Function to compute cost of
17503 a constant or invariant generated for SLP vect in the prologue,
17504 split out from vect_analyze_slp_cost_1.
17505 (vect_model_simple_cost): Make static. Adjust for SLP costing.
17506 (vect_model_promotion_demotion_cost): Likewise.
17507 (vect_model_store_cost): Likewise, make static.
17508 (vect_model_load_cost): Likewise.
17509 (vectorizable_bswap): Add cost vector arg and adjust.
17510 (vectorizable_call): Likewise.
17511 (vectorizable_simd_clone_call): Likewise.
17512 (vectorizable_conversion): Likewise.
17513 (vectorizable_assignment): Likewise.
17514 (vectorizable_shift): Likewise.
17515 (vectorizable_operation): Likewise.
17516 (vectorizable_store): Likewise.
17517 (vectorizable_load): Likewise.
17518 (vectorizable_condition): Likewise.
17519 (vectorizable_comparison): Likewise.
17520 (can_vectorize_live_stmts): Likewise.
17521 (vect_analyze_stmt): Likewise.
17522 (vect_transform_stmt): Adjust calls to vectorizable_*.
17523 * tree-vectorizer.c: Include gimple-pretty-print.h.
17524 (dump_stmt_cost): New function.
17526 2018-05-16 Richard Biener <rguenther@suse.de>
17528 * params.def (PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE): New param.
17529 * doc/invoke.texi (dse-max-alias-queries-per-store): Document.
17530 * tree-ssa-dse.c: Include tree-ssa-loop.h.
17531 (check_name): New callback.
17532 (dse_classify_store): Track cycles via a visited bitmap of PHI
17533 defs and simplify handling of in-loop and across loop dead stores
17534 and properly fail for loop-variant refs. Handle byte-tracking with
17535 multiple defs. Use PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE for
17538 2018-05-16 Richard Sandiford <richard.sandiford@linaro.org>
17540 * tree-vectorizer.h (vect_get_vector_types_for_stmt): Declare.
17541 (vect_get_mask_type_for_stmt): Likewise.
17542 * tree-vect-slp.c (vect_two_operations_perm_ok_p): New function,
17544 (vect_build_slp_tree_1): ...here. Use vect_get_vector_types_for_stmt
17545 to determine the statement's vector type and the vector type that
17546 should be used for calculating nunits. Deal with cases in which
17547 the type has to be deferred.
17548 (vect_slp_analyze_node_operations): Use vect_get_vector_types_for_stmt
17549 and vect_get_mask_type_for_stmt to calculate STMT_VINFO_VECTYPE.
17550 * tree-vect-loop.c (vect_determine_vf_for_stmt_1)
17551 (vect_determine_vf_for_stmt): New functions, split out from...
17552 (vect_determine_vectorization_factor): ...here.
17553 * tree-vect-stmts.c (vect_get_vector_types_for_stmt)
17554 (vect_get_mask_type_for_stmt): New functions, split out from
17555 vect_determine_vectorization_factor.
17557 2018-05-16 Richard Biener <rguenther@suse.de>
17559 * tree-cfg.c (verify_gimple_assign_ternary): Properly
17560 verify the [VEC_]COND_EXPR embedded comparison.
17562 2018-05-15 Martin Sebor <msebor@redhat.com>
17564 PR tree-optimization/85753
17565 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Handle
17566 RECORD_TYPE in addition to ARRAY_TYPE.
17568 2018-05-15 Martin Sebor <msebor@redhat.com>
17570 PR middle-end/85643
17571 * calls.c (get_attr_nonstring_decl): Handle MEM_REF.
17573 2018-05-15 Richard Biener <rguenther@suse.de>
17575 * tree-ssa-dse.c (dse_classify_store): Remove use_stmt parameter,
17576 add by_clobber_p one. Change algorithm to collect all defs
17577 representing uses we need to walk and try reducing them to
17578 a single one before failing.
17579 (dse_dom_walker::dse_optimize_stmt): Adjust.
17581 2018-05-13 Mark Wielaard <mark@klomp.org>
17583 * dwarf2out.c (dwarf_OP): Handle DW_OP_addrx and DW_OP_constx.
17584 (size_of_loc_descr): Likewise.
17585 (output_loc_operands): Likewise.
17586 (output_loc_operands_raw): Likewise.
17587 (dw_addr_op): Use dwarf_OP () for DW_OP_constx and DW_OP_addrx.
17588 (resolve_addr_in_expr): Handle DW_OP_addrx and DW_OP_constx.
17589 (hash_loc_operands): Likewise.
17590 (compare_loc_operands): Likewise.
17592 2018-05-14 Mark Wielaard <mark@klomp.org>
17594 * dwarf2out.c (count_index_addrs): New function.
17595 (dwarf2out_finish): Use count_index_addrs to calculate addrs_length.
17597 2018-05-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
17599 PR tree-optimization/83648
17600 * ipa-pure-const.c (malloc_candidate_p): Allow function with NULL
17601 return value as malloc candidate.
17603 2018-05-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
17606 * ipa-pure-const.c (warn_function_malloc): Pass value of known_finite
17607 param as true in call to suggest_attribute.
17609 2018-05-14 Segher Boessenkool <segher@kernel.crashing.org>
17611 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete @itemx for
17612 -mreadonly-in-sdata.
17614 2018-05-14 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
17616 * config/aarch64/aarch64-simd.md (*aarch64_crypto_aese_fused):
17618 (aarch64_crypto_aesd_fused): Likewise.
17620 2018-05-14 Wilco Dijkstra <wdijkstr@arm.com>
17622 * config/aarch64/aarch64.md (mov<mode>): Remove '*' in alternatives.
17623 (movsi_aarch64): Likewise.
17624 (load_pairsi): Likewise.
17625 (load_pairdi): Likewise.
17626 (store_pairsi): Likewise.
17627 (store_pairdi): Likewise.
17628 (load_pairsf): Likewise.
17629 (load_pairdf): Likewise.
17630 (store_pairsf): Likewise.
17631 (store_pairdf): Likewise.
17632 (zero_extend): Likewise.
17633 (trunc): Swap alternatives.
17634 (fcvt_target): Add '?' to prefer w over r.
17636 2018-05-14 Jakub Jelinek <jakub@redhat.com>
17639 * config/i386/i386.md: Disallow non-commutative arithmetics in
17640 last twpeephole for mem {+,-,&,|,^}= x; mem != 0 after cmpelim
17641 optimization. Use COMMUTATIVE_ARITH_P test rather than != MINUS
17642 in the peephole2 before it.
17644 2018-05-14 Sebastian Peryt <sebastian.peryt@intel.com>
17646 * common/config/i386/i386-common.c (OPTION_MASK_ISA_CLDEMOTE_SET,
17647 OPTION_MASK_ISA_CLDEMOTE_UNSET): New defines.
17648 (ix86_handle_option): Handle -mcldemote.
17649 * config.gcc: New header.
17650 * config/i386/cldemoteintrin.h: New file.
17651 * config/i386/cpuid.h (bit_CLDEMOTE): New bit.
17652 * config/i386/driver-i386.c (host_detect_local_cpu): Detect
17654 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
17655 OPTION_MASK_ISA_CLDEMOTE.
17656 * config/i386/i386.c (ix86_target_string): Add -mcldemote.
17657 (ix86_valid_target_attribute_inner_p): Ditto.
17658 (enum ix86_builtins): Add IX86_BUILTIN_CLDEMOTE.
17659 (ix86_init_mmx_sse_builtins): Define __builtin_ia32_cldemote.
17660 (ix86_expand_builtin): Expand IX86_BUILTIN_CLDEMOTE.
17661 * config/i386/i386.h (TARGET_CLDEMOTE, TARGET_CLDEMOTE_P): New.
17662 * config/i386/i386.md (UNSPECV_CLDEMOTE): New.
17664 * config/i386/i386.opt: Add -mcldemote.
17665 * config/i386/x86intrin.h: New header.
17666 * doc/invoke.texi: Add -mcldemote.
17668 2018-05-14 Richard Biener <rguenther@suse.de>
17670 * doc/match-and-simplify.texi: Adjust :s documentation.
17672 2018-05-14 Alexander Monakov <amonakov@ispras.ru>
17674 * sort.cc (REORDER_23): Pass the type for the temporaries instead of
17675 intended memcpy size.
17676 (REORDER_45): Likewise.
17678 2018-05-13 Alexander Monakov <amonakov@ispras.ru>
17680 * sort.cc: New file.
17681 * system.h [!CHECKING_P] (qsort): Redirect to gcc_qsort.
17682 * vec.c (qsort_chk): Use gcc_qsort.
17683 * Makefile.in (OBJS-libcommon): Add sort.o.
17684 (build/sort.o): New target. Use it...
17685 (BUILD_RTL): ... here, and...
17686 (build/gencfn-macros): ... here, and...
17687 (build/genmatch): ... here.
17689 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
17690 Chung-Ju Wu <jasonwucj@gmail.com>
17692 * config.gcc (nds32*-*-*): Check that n15 is valid to --with-cpu.
17693 * config/nds32/nds32-graywolf.md: New file.
17694 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_GRAYWOLF.
17695 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n15
17697 * config/nds32/nds32-protos.h: More declarations for n15 pipeline.
17698 * config/nds32/nds32-utils.c: More implementations for n15 pipeline.
17699 * config/nds32/nds32.md (pipeline_model): Add graywolf.
17700 * config/nds32/nds32.opt (mcpu): Support n15 pipeline cpus.
17701 * config/nds32/pipelines.md: Include n15 settings.
17703 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
17704 Chung-Ju Wu <jasonwucj@gmail.com>
17706 * config.gcc (nds32*-*-*): Check that n12/n13 are valid to --with-cpu.
17707 * config/nds32/nds32-n13.md: New file.
17708 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N12 and CPU_N13.
17709 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n12/n13
17711 * config/nds32/nds32-protos.h: More declarations for n12/n13 pipeline.
17712 * config/nds32/nds32.md (pipeline_model): Add n13.
17713 * config/nds32/nds32.opt (mcpu): Support n12/n13 pipeline cpus.
17714 * config/nds32/pipelines.md: Include n13 settings.
17716 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
17717 Chung-Ju Wu <jasonwucj@gmail.com>
17719 * config.gcc (nds32*-*-*): Check that n10/d10 are valid to --with-cpu.
17720 * config/nds32/nds32-n10.md: New file.
17721 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N10.
17722 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n10
17724 * config/nds32/nds32-protos.h: More declarations for n10 pipeline.
17725 * config/nds32/nds32-utils.c: More implementations for n10 pipeline.
17726 * config/nds32/nds32.md (pipeline_model): Add n10.
17727 * config/nds32/nds32.opt (mcpu): Support n10 pipeline cpus.
17728 * config/nds32/pipelines.md: Include n10 settings.
17730 2018-05-13 Monk Chiang <sh.chiang04@gmail.com>
17731 Kito Cheng <kito.cheng@gmail.com>
17732 Chung-Ju Wu <jasonwucj@gmail.com>
17734 * config.gcc (nds32be-*-*): Handle --with-ext-dsp.
17735 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
17736 Add enum values for DSP extension instructions.
17737 * config/nds32/constraints.md (Iu06, IU06, CVp5, CVs5, CVs2, CVhi):
17739 * config/nds32/iterators.md (shifts, shiftrt, sat_plus, all_plus,
17740 sat_minus, all_minus, plus_minus, extend, sumax, sumin, sumin_max):
17741 New code iterators.
17742 (su, zs, uk, opcode, add_rsub, add_sub): New code attributes.
17743 * config/nds32/nds32-dspext.md: New file for DSP implementation.
17744 * config/nds32/nds32-intrinsic.c: Implementation of DSP extension.
17745 * config/nds32/nds32-intrinsic.md: Likewise.
17746 * config/nds32/nds32_intrinsic.h: Likewise.
17747 * config/nds32/nds32-md-auxiliary.c: Likewise.
17748 * config/nds32/nds32-memory-manipulation.c: Consider DSP extension.
17749 * config/nds32/nds32-predicates.c (const_vector_to_hwint): New.
17750 (nds32_valid_CVp5_p, nds32_valid_CVs5_p): New.
17751 (nds32_valid_CVs2_p, nds32_valid_CVhi_p): New.
17752 * config/nds32/nds32-protos.h: New declarations for DSP extension.
17753 * config/nds32/nds32-utils.c (extract_mac_non_acc_rtx): New case
17754 TYPE_DMAC in switch statement.
17755 * config/nds32/nds32.c: New checking and implementation for DSP
17756 extension instructions.
17757 * config/nds32/nds32.h: Likewise.
17758 * config/nds32/nds32.md: Likewise.
17759 * config/nds32/nds32.opt (mhw-abs, mext-dsp): New options.
17760 * config/nds32/predicates.md: Implement new predicates for DSP
17763 2018-05-11 Michael Meissner <meissner@linux.vnet.ibm.com>
17765 * config/rs6000/rs6000.md (mov<mode>_softfloat, FMOVE32):
17766 Reformat alternatives and attributes so it is easier to identify
17767 which constraints/attributes go with which instruction.
17768 (mov<mode>_hardfloat32, FMOVE64): Likewise.
17769 (mov<mode>_softfloat32, FMOVE64): Likewise.
17770 (mov<mode>_hardfloat64, FMOVE64): Likewise.
17771 (mov<mode>_softfloat64, FMOVE64): Likewise.
17773 2018-05-11 Kelvin Nilsen <kelvin@gcc.gnu.org>
17775 * doc/extend.texi (PowerPC Built-in Functions): Rename this
17777 (Basic PowerPC Built-in Functions): The new name of the
17778 subsection previously known as "PowerPC Built-in Functions".
17779 (Basic PowerPC Built-in Functions Available on all Configurations):
17781 (Basic PowerPC Built-in Functions Available on ISA 2.05): Likewise.
17782 (Basic PowerPC Built-in Functions Available on ISA 2.06): Likewise.
17783 (Basic PowerPC Built-in Functions Available on ISA 2.07): Likewise.
17784 (Basic PowerPC Built-in Functions Available on ISA 3.0): Likewise.
17786 2018-05-11 Martin Jambor <mjambor@suse.cz>
17789 * ipa-cp.c (intersect_with_plats): Check that the lattice contains
17792 2018-05-11 Richard Earnshaw <rearnsha@arm.com>
17795 * config/arm/arm-cpus.in (fgroup ARMv6m): Add be8 feature.
17797 2018-05-11 Sebastian Peryt <sebastian.peryt@intel.com>
17799 * common/config/i386/i386-common.c (OPTION_MASK_ISA_WAITPKG_SET,
17800 OPTION_MASK_ISA_WAITPKG_UNSET): New defines.
17801 (ix86_handle_option): Handle -mwaitpkg.
17802 * config.gcc: New header.
17803 * config/i386/cpuid.h (bit_WAITPKG): New bit.
17804 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mwaitpkg.
17805 * config/i386/i386-builtin-types.def ((UINT8, UNSIGNED, UINT64)): New
17807 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
17808 OPTION_MASK_ISA_WAITPKG.
17809 * config/i386/i386.c (ix86_target_string): Add -mwaitpkg.
17810 (ix86_option_override_internal): Add PTA_WAITPKG.
17811 (ix86_valid_target_attribute_inner_p): Add -mwaitpkg.
17812 (enum ix86_builtins): Add IX86_BUILTIN_UMONITOR, IX86_BUILTIN_UMWAIT,
17813 IX86_BUILTIN_TPAUSE.
17814 (ix86_init_mmx_sse_builtins): Define __builtin_ia32_umonitor,
17815 __builtin_ia32_umwait and __builtin_ia32_tpause.
17816 (ix86_expand_builtin): Expand IX86_BUILTIN_UMONITOR,
17817 IX86_BUILTIN_UMWAIT, IX86_BUILTIN_TPAUSE.
17818 * config/i386/i386.h (TARGET_WAITPKG, TARGET_WAITPKG_P): New.
17819 * config/i386/i386.md (UNSPECV_UMWAIT, UNSPECV_UMONITOR,
17820 UNSPECV_TPAUSE): New.
17821 (umwait, umwait_rex64, umonitor_<mode>, tpause, tpause_rex64): New.
17822 * config/i386/i386.opt: Add -mwaitpkg.
17823 * config/i386/waitpkgintrin.h: New file.
17824 * config/i386/x86intrin.h: New header.
17825 * doc/invoke.texi: Add -mwaitpkg.
17827 2018-05-11 Richard Earnshaw <rearnsha@arm.com>
17830 * config/arm/arm-cpus.in: Add comment that ARMv6-m and ARMv6S-m are now
17832 (cortex-m0): Use armv6s-m isa.
17833 (cortex-m0plus): Likewise.
17834 (cortex-m1): Likewise.
17835 (cortex-m0.small-multiply): Likewise.
17836 (cortex-m0plus.small-multiply): Likewise.
17837 (cortex-m1.small-multiply): Likewise.
17839 2018-05-11 Allan Sandfeld Jensen <allan.jensen@qt.io>
17840 Jakub Jelinek <jakub@redhat.com>
17842 PR tree-optimization/85692
17843 * tree-ssa-forwprop.c (simplify_vector_constructor): Try two
17844 source permute as well.
17846 2018-05-11 Martin Liska <mliska@suse.cz>
17849 * doc/extend.texi: Document LLVM style format for no_sanitize
17852 2018-05-10 Michael Meissner <meissner@linux.vnet.ibm.com>
17854 * config/rs6000/rs6000.c (mode_supports_dq_form): Rename
17855 mode_supports_vsx_dform_quad to mode_supports_dq_form.
17856 (mode_supports_vsx_dform_quad): Likewise.
17857 (mode_supports_vmx_dform): Move these functions to be next to the
17858 other mode_supports functions.
17859 (mode_supports_dq_form): Likewise.
17860 (quad_address_p): Change calls of mode_supports_vsx_dform_quad to
17861 mode_supports_dq_form.
17862 (reg_offset_addressing_ok_p): Likewise.
17863 (offsettable_ok_by_alignment): Likewise.
17864 (rs6000_legitimate_offset_address_p): Likewise.
17865 (legitimate_lo_sum_address_p): Likewise.
17866 (rs6000_legitimize_address): Likewise.
17867 (rs6000_legitimize_reload_address): Likewise.
17868 (rs6000_secondary_reload_inner): Likewise.
17869 (rs6000_preferred_reload_class): Likewise.
17870 (rs6000_output_move_128bit): Likewise.
17872 2018-05-10 Uros Bizjak <ubizjak@gmail.com>
17874 * config/i386/i386.c (ix86_expand_builtin) <case IX86_BUILTIN_RDPID>:
17875 Generate SImode target register for null target.
17876 <case IX86_BUILTIN_XGETBV>: Ditto.
17877 <case IX86_BUILTIN_XSETBV>: Optimize LSHIFTRT generation.
17878 * config/i386/xsaveintrin.h (_xgetbv): Add missing return.
17880 2018-05-10 Carl Love <cel@us.ibm.com>
17882 * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
17883 dcbtt and dcbtstt if operands[2] is 0.
17885 2018-05-10 Uros Bizjak <ubizjak@gmail.com>
17888 * config/i386/sse.md (usadv64qi): New expander.
17890 2018-05-10 Segher Boessenkool <segher@kernel.crashing.org>
17892 * config/rs6000/altivec.md (altivec_vmrghb, altivec_vmrghh,
17893 altivec_vmrghw, altivec_vmrglb, altivec_vmrglh, altivec_vmrglw): Remove
17894 -maltivec=be support.
17895 (vec_widen_umult_even_v16qi, vec_widen_smult_even_v16qi,
17896 vec_widen_umult_even_v8hi, vec_widen_smult_even_v8hi,
17897 vec_widen_umult_even_v4si, vec_widen_smult_even_v4si,
17898 vec_widen_umult_odd_v16qi, vec_widen_smult_odd_v16qi,
17899 vec_widen_umult_odd_v8hi, vec_widen_smult_odd_v8hi,
17900 vec_widen_umult_odd_v4si, vec_widen_smult_odd_v4si, altivec_vpkpx,
17901 altivec_vpks<VI_char>ss, altivec_vpks<VI_char>us,
17902 altivec_vpku<VI_char>us, altivec_vpku<VI_char>um, altivec_vsum2sws,
17903 altivec_vsumsws): Adjust.
17904 (altivec_vspltb *altivec_vspltb_internal, altivec_vsplth,
17905 *altivec_vsplth_internal, altivec_vspltw, *altivec_vspltw_internal,
17906 altivec_vspltsf, *altivec_vspltsf_internal): Remove -maltivec=be
17908 (altivec_vperm_<mode>, altivec_vperm_<mode>_uns,
17909 altivec_vupkhs<VU_char>, altivec_vupkls<VU_char>, altivec_vupkhpx,
17910 altivec_vupklpx, altivec_lvsl, altivec_lvsr): Adjust.
17911 (altivec_lve<VI_char>x): Delete expand.
17912 (*altivec_lve<VI_char>x_internal): Rename to...
17913 (altivec_lve<VI_char>x): ... this.
17914 (altivec_lvxl_<mode>): Delete expand.
17915 (*altivec_lvxl_<mode>_internal): Rename to ...
17916 (altivec_lvxl_<mode>): ... this.
17917 (altivec_stvxl_<mode>): Delete expand.
17918 (*altivec_stvxl_<mode>_internal): Rename to ...
17919 (altivec_stvxl_<mode>): ... this.
17920 (altivec_stve<VI_char>x): Delete expand.
17921 (*altivec_stve<VI_char>x_internal): Rename to ...
17922 (altivec_stve<VI_char>x): ... this.
17923 (doublee<mode>2, unsdoubleev4si2, doubleo<mode>2, unsdoubleov4si2,
17924 doubleh<mode>2, unsdoublehv4si2, doublel<mode>2, unsdoublelv4si2,
17925 reduc_plus_scal_<mode>): Adjust.
17926 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Adjust
17928 (rs6000_cpu_cpp_builtins): Adjust.
17929 (altivec_resolve_overloaded_builtin): Remove -maltivec=be support.
17930 * config/rs6000/rs6000-protos.h (altivec_expand_lvx_be,
17931 altivec_expand_stvx_be, altivec_expand_stvex_be): Delete.
17932 * config/rs6000/rs6000.c (rs6000_option_override_internal): Remove
17933 -maltivec=be support.
17934 (rs6000_split_vec_extract_var): Adjust.
17935 (rs6000_split_v4si_init): Adjust.
17936 (swap_selector_for_mode): Delete.
17937 (altivec_expand_lvx_be, altivec_expand_stvx_be,
17938 altivec_expand_stvex_be): Delete.
17939 (altivec_expand_lv_builtin, altivec_expand_stv_builtin): Remove
17940 -maltivec=be support.
17941 (rs6000_gimple_fold_builtin): Ditto.
17942 (rs6000_generate_float2_double_code, rs6000_generate_float2_code):
17944 * config/rs6000/rs6000.h (VECTOR_ELT_ORDER_BIG): Delete.
17945 (TARGET_DIRECT_MOVE_64BIT): Adjust.
17946 * config/rs6000/rs6000.md (split for extendsidi2 for vectors): Adjust.
17947 * config/rs6000/rs6000.opt (maltivec=le, maltivec=be): Delete.
17948 * config/rs6000/vsx.md (floate<mode>, unsfloatev2di, floato<mode>,
17949 unsfloatov2di, vsignedo_v2df, vsignede_v2df, vunsignedo_v2df,
17950 vunsignede_v2df, vsx_extract_<mode>_p9, *vsx_extract_si,
17951 *vsx_extract_<mode>_p8, *vsx_extract_si_<uns>float_df,
17952 *vsx_extract_si_<uns>float_<mode>, vsx_set_<mode>_p9, vsx_set_v4sf_p9,
17953 *vsx_insert_extract_v4sf_p9, *vsx_insert_extract_v4sf_p9_2, and an
17954 anonymous split): Adjust.
17955 (vsx_mergel_<mode>, vsx_mergeh_<mode>): Remove -maltivec=be support.
17956 (vsx_xxspltd_<mode>, extract4b, insert4b): Adjust.
17958 2018-05-10 Eric Botcazou <ebotcazou@adacore.com>
17960 * configure.ac (gcc_gxx_include_dir_add_sysroot): Set it to 1 only
17961 when --with-gxx-include-dir is also specified.
17962 * configure: Regenerate.
17964 2018-05-09 Jim Wilson <jimw@sifive.com>
17967 * config.gcc (riscv*-*-*): Handle --with-multilib-list.
17968 * config/riscv/t-withmultilib: New.
17969 * config/riscv/withmultilib.h: New.
17970 * doc/install.texi: Document RISC-V --with-multilib-list support.
17972 2018-05-09 Richard Biener <rguenther@suse.de>
17974 * tree-vect-slp.c (vect_bb_slp_scalar_cost): Fill a cost
17976 (vect_bb_vectorization_profitable_p): Adjust. Compute
17977 actual scalar cost using the cost vector and the add_stmt_cost
17980 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
17982 PR rtl-optimization/85645
17983 * config/rs6000/rs6000.c (rs6000_emit_prologue_components): Put a SET
17984 in the REG_CFA_REGISTER note for LR, don't leave it empty.
17986 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
17988 PR rtl-optimization/85645
17989 * shrink-wrap.c (spread_components): Return a boolean saying if
17990 anything was changed.
17991 (try_shrink_wrapping_separate): Iterate spread_components until
17992 nothing changes anymore.
17994 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
17996 PR rtl-optimization/85645
17997 * regrename.c (build_def_use): Also kill the chains that include the
17998 destination of a REG_CFA_REGISTER note.
18000 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
18002 PR rtl-optimization/85645
18003 * regcprop.c (copyprop_hardreg_forward_1): Don't propagate into an
18004 insn that has a REG_CFA_REGISTER note.
18006 2018-05-09 Richard Sandiford <richard.sandiford@linaro.org>
18008 * cfgexpand.c (expand_clobber): New function.
18009 (expand_gimple_stmt_1): Use it.
18010 * tree-vect-stmts.c (vect_clobber_variable): New function,
18012 (vectorizable_simd_clone_call): ...here.
18013 (vectorizable_store): Emit a clobber either side of an
18014 IFN_STORE_LANES sequence.
18015 (vectorizable_load): Emit a clobber after an IFN_LOAD_LANES sequence.
18017 2018-05-09 Tom de Vries <tom@codesourcery.com>
18020 * config/nvptx/nvptx.md (define_insn "trap", define_insn "trap_if_true")
18021 (define_insn "trap_if_false"): Add exit after trap.
18023 2018-05-09 Eric Botcazou <ebotcazou@adacore.com>
18025 PR rtl-optimization/85638
18026 * bb-reorder.c: Include common/common-target.h.
18027 (create_forwarder_block): New function extracted from...
18028 (fix_up_crossing_landing_pad): ...here. Rename into...
18029 (dw2_fix_up_crossing_landing_pad): ...this.
18030 (sjlj_fix_up_crossing_landing_pad): New function.
18031 (find_rarely_executed_basic_blocks_and_crossing_edges): In SJLJ mode,
18032 call sjlj_fix_up_crossing_landing_pad if there are incoming EH edges
18033 from both partitions and exit the loop after one iteration.
18035 2018-05-08 Kelvin Nilsen <kelvin@gcc.gnu.org>
18038 * doc/extend.texi (PowerPC Built-in Functions): Rename this
18040 (Basic PowerPC Built-in Functions): The new name of the
18041 subsection previously known as "PowerPC Built-in Functions".
18042 (Basic PowerPC Built-in Functions Available on all Configurations):
18044 (Basic PowerPC Built-in Functions Available on ISA 2.05): New
18046 (Basic PowerPC Built-in Functions Available on ISA 2.06): New
18048 (Basic PowerPC Built-in Functions Available on ISA 2.07): New
18050 (Basic PowerPC Built-in Functions Available on ISA 3.0): New
18053 2018-05-08 Jim Wilson <jimw@sifive.com>
18055 * config/riscv/linux.h (MUSL_ABI_SUFFIX): Delete unnecessary backslash.
18056 (LD_EMUL_SUFFIX): New.
18057 (LINK_SPEC): Use it.
18059 2018-05-08 Kelvin Nilsen <kelvin@gcc.gnu.org>
18061 * doc/extend.texi (PowerPC Built-in Functions): Rename this
18063 (Basic PowerPC Built-in Functions): The new name of the
18064 subsection previously known as "PowerPC Built-in Functions".
18065 (Basic PowerPC Built-in Functions Available on all Configurations):
18067 (Basic PowerPC Built-in Functions Available on ISA 2.05): New
18069 (Basic PowerPC Built-in Functions Available on ISA 2.06): New
18071 (Basic PowerPC Built-in Functions Available on ISA 2.07): New
18073 (Basic PowerPC Built-in Functions Available on ISA 3.0): New
18076 2018-05-08 Jakub Jelinek <jakub@redhat.com>
18079 * config/i386/i386.md: Add peepholes for mem {+,-,&,|,^}= x; mem != 0
18080 after cmpelim optimization.
18082 2018-05-08 Olga Makhotina <olga.makhotina@intel.com>
18084 * config.gcc: Support "goldmont".
18085 * config/i386/driver-i386.c (host_detect_local_cpu): Detect "goldmont".
18086 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
18087 PROCESSOR_GOLDMONT.
18088 * config/i386/i386.c (m_GOLDMONT): Define.
18089 (processor_target_table): Add "goldmont".
18090 (PTA_GOLDMONT): Define.
18091 (ix86_lea_outperforms): Add TARGET_GOLDMONT.
18092 (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT.
18093 (fold_builtin_cpu): Add M_INTEL_GOLDMONT.
18094 (fold_builtin_cpu): Add "goldmont".
18095 (ix86_add_stmt_cost): Add TARGET_GOLDMONT.
18096 (ix86_option_override_internal): Add "goldmont".
18097 * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT.
18098 (processor_type): Add PROCESSOR_GOLDMONT.
18099 * config/i386/i386.md: Add CPU "glm".
18100 * config/i386/glm.md: New file.
18101 * config/i386/x86-tune.def: Add m_GOLDMONT.
18102 * doc/invoke.texi: Add goldmont as x86 -march=/-mtune= CPU type.
18104 2018-05-08 Jakub Jelinek <jakub@redhat.com>
18107 * config/i386/i386.c (ix86_expand_sse2_abs): Handle E_V2DImode and
18109 * config/i386/sse.md (abs<mode>2): Use VI_AVX2 iterator instead of
18110 VI1248_AVX512VL_AVX512BW. Handle V2DImode and V4DImode if not
18111 TARGET_AVX512VL using ix86_expand_sse2_abs. Formatting fixes.
18114 * config/i386/i386.c (ix86_fold_builtin): Handle
18115 IX86_BUILTIN_{,P}MOVMSK{PS,PD,B}{,128,256}.
18118 * config/i386/sse.md (ssequaterinsnmode): New mode attribute.
18119 (*<extract_type>_vinsert<shuffletype><extract_suf>_0): New pattern.
18121 2018-05-08 Richard Earnshaw <rearnsha@arm.com>
18124 * config/arm/parsecpu.awk (check_cpu): Fix operator precedence.
18125 (check_arch): Likewise.
18126 (check_fpu): Return the result rather than printing it.
18127 (end arch): Fix operator precedence.
18128 (end cpu): Likewise.
18129 (END): Print the result from check_fpu.
18131 2018-05-08 Richard Sandiford <richard.sandiford@linaro.org>
18132 Alan Hayward <alan.hayward@arm.com>
18133 David Sherwood <david.sherwood@arm.com>
18135 * config/aarch64/aarch64-sve.md (*pred_cmp<cmp_op><mode>_combine)
18136 (*pred_cmp<cmp_op><mode>, *fcm<cmp_op><mode>_and_combine)
18137 (*fcmuo<mode>_and_combine, *fcm<cmp_op><mode>_and)
18138 (*fcmuo<mode>_and): New patterns.
18140 2018-05-08 Richard Sandiford <richard.sandiford@linaro.org>
18142 * config/aarch64/iterators.md (UNSPEC_COND_LO, UNSPEC_COND_LS)
18143 (UNSPEC_COND_HI, UNSPEC_COND_HS, UNSPEC_COND_UO): Delete.
18144 (SVE_INT_CMP, SVE_FP_CMP): New code iterators.
18145 (cmp_op, sve_imm_con): New code attributes.
18146 (SVE_COND_INT_CMP, imm_con): Delete.
18147 (cmp_op): Remove above unspecs from int attribute.
18148 * config/aarch64/aarch64-sve.md (*vec_cmp<cmp_op>_<mode>): Rename
18150 (*cmp<cmp_op><mode>): ...this. Use UNSPEC_MERGE_PTRUE instead of
18151 comparison-specific unspecs.
18152 (*vec_cmp<cmp_op>_<mode>_ptest): Rename to...
18153 (*cmp<cmp_op><mode>_ptest): ...this and adjust likewise.
18154 (*vec_cmp<cmp_op>_<mode>_cc): Rename to...
18155 (*cmp<cmp_op><mode>_cc): ...this and adjust likewise.
18156 (*vec_fcm<cmp_op><mode>): Rename to...
18157 (*fcm<cmp_op><mode>): ...this and adjust likewise.
18158 (*vec_fcmuo<mode>): Rename to...
18159 (*fcmuo<mode>): ...this and adjust likewise.
18160 (*pred_fcm<cmp_op><mode>): New pattern.
18161 * config/aarch64/aarch64.c (aarch64_emit_unop, aarch64_emit_binop)
18162 (aarch64_emit_sve_ptrue_op, aarch64_emit_sve_ptrue_op_cc): New
18164 (aarch64_unspec_cond_code): Remove handling of LTU, GTU, LEU, GEU
18166 (aarch64_gen_unspec_cond, aarch64_emit_unspec_cond): Delete.
18167 (aarch64_emit_sve_predicated_cond): New function.
18168 (aarch64_expand_sve_vec_cmp_int): Use aarch64_emit_sve_ptrue_op_cc.
18169 (aarch64_emit_unspec_cond_or): Replace with...
18170 (aarch64_emit_sve_or_conds): ...this new function. Use
18171 aarch64_emit_sve_ptrue_op for the individual comparisons and
18172 aarch64_emit_binop to OR them together.
18173 (aarch64_emit_inverted_unspec_cond): Replace with...
18174 (aarch64_emit_sve_inverted_cond): ...this new function. Use
18175 aarch64_emit_sve_ptrue_op for the comparison and
18176 aarch64_emit_unop to invert the result.
18177 (aarch64_expand_sve_vec_cmp_float): Update after the above
18178 changes. Use aarch64_emit_sve_ptrue_op for native comparisons.
18180 2018-05-07 Nathan Sidwell <nathan@acm.org>
18182 * doc/invoke.texi (C++ Dialect Options): Remove -ffor-scope.
18183 * doc/extend.texi (Deprecated Features): Remove -fno-for-scope
18184 (Backwards Compatibility): Likewise.
18186 2018-05-07 Luis Machado <luis.machado@linaro.org>
18190 2018-05-07 Luis Machado <luis.machado@linaro.org>
18192 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
18193 <prefetch_dynamic_strides>: New const bool field.
18194 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
18195 prefetch_dynamic_strides.
18196 (exynosm1_prefetch_tune): Likewise.
18197 (thunderxt88_prefetch_tune): Likewise.
18198 (thunderx_prefetch_tune): Likewise.
18199 (thunderx2t99_prefetch_tune): Likewise.
18200 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
18202 (aarch64_override_options_internal): Update to set
18203 PARAM_PREFETCH_DYNAMIC_STRIDES.
18204 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
18205 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
18206 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
18207 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
18208 prefetch-dynamic-strides setting.
18210 2018-05-07 Luis Machado <luis.machado@linaro.org>
18212 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
18213 <minimum_stride>: New const int field.
18214 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
18215 minimum_stride field.
18216 (exynosm1_prefetch_tune): Likewise.
18217 (thunderxt88_prefetch_tune): Likewise.
18218 (thunderx_prefetch_tune): Likewise.
18219 (thunderx2t99_prefetch_tune): Likewise.
18220 (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
18221 (aarch64_override_options_internal): Update to set
18222 PARAM_PREFETCH_MINIMUM_STRIDE.
18223 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
18224 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
18225 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
18226 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
18227 stride is constant and is below the minimum stride threshold.
18229 2018-05-07 Luis Machado <luis.machado@linaro.org>
18231 * config/aarch64/aarch64.c (qdf24xx_prefetch_tune) <l2_cache_size>: Set
18234 2018-05-07 Luis Machado <luis.machado@linaro.org>
18236 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
18237 <prefetch_dynamic_strides>: New const bool field.
18238 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
18239 prefetch_dynamic_strides.
18240 (exynosm1_prefetch_tune): Likewise.
18241 (thunderxt88_prefetch_tune): Likewise.
18242 (thunderx_prefetch_tune): Likewise.
18243 (thunderx2t99_prefetch_tune): Likewise.
18244 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
18246 (aarch64_override_options_internal): Update to set
18247 PARAM_PREFETCH_DYNAMIC_STRIDES.
18248 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
18249 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
18250 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
18251 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
18252 prefetch-dynamic-strides setting.
18254 2018-05-07 Luis Machado <luis.machado@linaro.org>
18256 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
18257 <minimum_stride>: New const int field.
18258 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
18259 minimum_stride field.
18260 (exynosm1_prefetch_tune): Likewise.
18261 (thunderxt88_prefetch_tune): Likewise.
18262 (thunderx_prefetch_tune): Likewise.
18263 (thunderx2t99_prefetch_tune): Likewise.
18264 (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
18265 (aarch64_override_options_internal): Update to set
18266 PARAM_PREFETCH_MINIMUM_STRIDE.
18267 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
18268 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
18269 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
18270 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
18271 stride is constant and is below the minimum stride threshold.
18273 2018-05-06 Jakub Jelinek <jakub@redhat.com>
18276 * cfgexpand.c (expand_asm_stmt): Don't create a temporary if
18277 the type is addressable. Don't force op into register if it has
18280 2018-05-05 Roland McGrath <mcgrathr@google.com>
18283 * varasm.c (default_section_type_flags): Set SECTION_NOTYPE for
18284 any section for which we don't know a specific type it should have,
18285 regardless of name. Previously this was done only for the exact
18286 names ".init_array", ".fini_array", and ".preinit_array".
18287 (default_elf_asm_named_section): Add comment about
18288 relationship with default_section_type_flags and SECTION_NOTYPE.
18289 (get_section): Don't consider it a type conflict if one side has
18290 SECTION_NOTYPE and the other doesn't, as long as neither has the
18291 SECTION_BSS et al used in the default_section_type_flags logic.
18293 2018-05-05 Tom de Vries <tom@codesourcery.com>
18296 * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_3): Define.
18297 (workaround_barsyncs): New function.
18298 (nvptx_reorg): Use workaround_barsyncs.
18299 * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
18300 (define_expand "nvptx_membar_cta"): New define_expand.
18301 (define_insn "*nvptx_membar_cta"): New insn.
18303 2018-05-04 Pekka Jääskeläinen <pekka.jaaskelainen@parmance.com>
18305 * brig-builtins.def: Add consts to ptrs etc. in BRIG builtin defs.
18306 To improve optimization opportunities.
18307 * builtin-types.def: The new needed builtin types for the above.
18309 2018-05-04 Richard Biener <rguenther@suse.de>
18311 * bb-reorder.c (sanitize_hot_paths): Release hot_bbs_to_check.
18312 * gimple-ssa-store-merging.c
18313 (imm_store_chain_info::output_merged_store): Remove redundant create,
18314 release split_store vector contents on failure.
18315 * tree-vect-slp.c (vect_schedule_slp_instance): Avoid leaking
18316 scalar stmt vector on cache hit.
18318 2018-05-04 Segher Boessenkool <segher@kernel.crashing.org>
18320 * common/config/rs6000/rs6000-common.c (rs6000_handle_option): Remove
18322 * config.gcc (powerpc-xilinx-eabi*): Remove.
18323 * config/rs6000/predicates.md (easy_fp_constant): Remove Xilinx FP
18325 (fusion_addis_mem_combo_load): Ditto.
18326 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Remove Xilinx
18328 (rs6000_cpu_cpp_builtins): Ditto.
18329 * config/rs6000/rs6000-linux.c
18330 (rs6000_linux_float_exceptions_rounding_supported_p): Ditto.
18331 * config/rs6000/rs6000-opts.h (enum fpu_type_t): Delete.
18332 * config/rs6000/rs6000.c (rs6000_debug_reg_global): Remove Xilinx FP
18334 (rs6000_setup_reg_addr_masks): Ditto.
18335 (rs6000_init_hard_regno_mode_ok): Ditto.
18336 (rs6000_option_override_internal): Ditto.
18337 (legitimate_lo_sum_address_p): Ditto.
18338 (rs6000_legitimize_address): Ditto.
18339 (rs6000_legitimize_reload_address): Ditto.
18340 (rs6000_legitimate_address_p): Ditto.
18341 (abi_v4_pass_in_fpr): Ditto.
18342 (setup_incoming_varargs): Ditto.
18343 (rs6000_gimplify_va_arg): Ditto.
18344 (rs6000_split_multireg_move): Ditto.
18345 (rs6000_savres_strategy): Ditto.
18346 (rs6000_emit_prologue_components): Ditto.
18347 (rs6000_emit_epilogue_components): Ditto.
18348 (rs6000_emit_prologue): Ditto.
18349 (rs6000_emit_epilogue): Ditto.
18350 (rs6000_elf_file_end): Ditto.
18351 (rs6000_function_value): Ditto.
18352 (rs6000_libcall_value): Ditto.
18353 * config/rs6000/rs6000.h: Ditto.
18354 (TARGET_MINMAX_SF, TARGET_MINMAX_DF): Delete, merge to ...
18355 (TARGET_MINMAX): ... this. New.
18356 (TARGET_SF_FPR, TARGET_DF_FPR, TARGET_SF_INSN, TARGET_DF_INSN): Delete.
18357 * config/rs6000/rs6000.md: Remove Xilinx FP support.
18358 (*movsi_internal1_single): Delete.
18359 * config/rs6000/rs6000.opt (msingle-float, mdouble-float, msimple-fpu,
18360 mfpu=, mxilinx-fpu): Delete.
18361 * config/rs6000/singlefp.h: Delete.
18362 * config/rs6000/sysv4.h: Remove Xilinx FP support.
18363 * config/rs6000/t-rs6000: Ditto.
18364 * config/rs6000/t-xilinx: Delete.
18365 * config/rs6000/titan.md: Adjust for fp_type removal.
18366 * config/rs6000/vsx.md: Remove Xilinx FP support.
18367 (VStype_simple): Delete.
18368 (VSfptype_simple, VSfptype_mul, VSfptype_div, VSfptype_sqrt): Delete.
18369 * config/rs6000/xfpu.h: Delete.
18370 * config/rs6000/xfpu.md: Delete.
18371 * config/rs6000/xilinx.h: Delete.
18372 * config/rs6000/xilinx.opt: Delete.
18373 * doc/invoke.texi (RS/6000 and PowerPC Options): Remove
18374 -msingle-float, -mdouble-float, -msimple-fpu, -mfpu=, and -mxilinx-fpu.
18376 2018-05-04 Tom de Vries <tom@codesourcery.com>
18379 * builtins.c (expand_builtin_goacc_parlevel_id_size): Handle null target
18382 2018-05-04 Richard Biener <rguenther@suse.de>
18384 PR middle-end/85627
18385 * tree-complex.c (update_complex_assignment): We are always in SSA form.
18386 (expand_complex_div_wide): Likewise.
18387 (expand_complex_operations_1): Likewise.
18388 (expand_complex_libcall): Preserve EH info of the original stmt.
18389 (tree_lower_complex): Handle removed blocks.
18390 * tree.c (build_common_builtin_nodes): Do not set ECF_NOTRHOW
18391 on complex multiplication and division libcall builtins.
18393 2018-05-04 Richard Biener <rguenther@suse.de>
18395 PR middle-end/85574
18396 * fold-const.c (negate_expr_p): Restrict negation of operand
18397 zero of a division to when we know that can happen without
18399 (fold_negate_expr_1): Likewise.
18401 2018-05-04 Jakub Jelinek <jakub@redhat.com>
18404 * real.h (real_nextafter): Declare.
18405 * real.c (real_nextafter): New function.
18406 * fold-const-call.c (fold_const_nextafter): New function.
18407 (fold_const_call_sss): Call it for CASE_CFN_NEXTAFTER and
18408 CASE_CFN_NEXTTOWARD.
18409 (fold_const_call_1): For CASE_CFN_NEXTTOWARD call fold_const_call_sss
18410 even when arg1_mode is different from arg0_mode.
18412 2018-05-03 Nathan Sidwell <nathan@acm.org>
18414 * doc/extend.texi (Deprecated Features): Remove
18415 -ffriend-injection.
18416 (Backwards Compatibility): Likewise.
18417 * doc/invoke.texi (C++ Language Options): Likewise.
18418 (C++ Dialect Options): Likewise.
18420 2018-05-03 Jakub Jelinek <jakub@redhat.com>
18423 * config/i386/avx512fintrin.h (_mm512_mullox_epi64,
18424 _mm512_mask_mullox_epi64): New intrinsics.
18426 2018-05-03 Tom de Vries <tom@codesourcery.com>
18429 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
18430 dump files): Add offload-tree.
18432 2018-05-03 Richard Biener <rguenther@suse.de>
18434 PR tree-optimization/85615
18435 * tree-ssa-threadupdate.c (thread_block_1): Only allow exits
18436 to loops not nested in BBs loop father to avoid creating multi-entry
18439 2018-05-03 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
18441 PR tree-optimization/70291
18442 * tree-complex.c (expand_complex_libcall): Add type, inplace_p
18443 arguments. Change return type to tree. Emit libcall as a new
18444 statement rather than replacing existing one when inplace_p is true.
18445 (expand_complex_multiplication_components): New function.
18446 (expand_complex_multiplication): Expand floating-point complex
18447 multiplication using the above.
18448 (expand_complex_division): Rename inner_type parameter to type.
18449 Update expand_complex_libcall call-site.
18450 (expand_complex_operations_1): Update expand_complex_multiplication
18451 and expand_complex_division call-sites.
18453 2018-05-02 Jakub Jelinek <jakub@redhat.com>
18456 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
18457 *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
18458 *<shift_insn><dwi>3_doubleword_mask_1): In condition require that
18459 the highest significant bit of the shift count mask is clear. In
18460 check whether and[sq]i3 is needed verify that all significant bits
18461 of the shift count other than the highest are set.
18463 2018-05-02 Tom de Vries <tom@codesourcery.com>
18466 * builtins.def (DEF_GOACC_BUILTIN_ONLY): Define.
18467 * omp-builtins.def (BUILT_IN_GOACC_PARLEVEL_ID)
18468 (BUILT_IN_GOACC_PARLEVEL_SIZE): New builtin.
18469 * builtins.c (expand_builtin_goacc_parlevel_id_size): New function.
18470 (expand_builtin): Call expand_builtin_goacc_parlevel_id_size.
18471 * doc/extend.texi (Other Builtins): Add __builtin_goacc_parlevel_id and
18472 __builtin_goacc_parlevel_size.
18474 2018-05-02 Richard Biener <rguenther@suse.de>
18476 PR tree-optimization/85597
18477 * tree-vect-stmts.c (vectorizable_operation): For ternary SLP
18478 do not use split vect_get_vec_defs call but call vect_get_slp_defs
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 ltrans-tree.
18487 2018-05-02 Tom de Vries <tom@codesourcery.com>
18490 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
18491 dump files): Add wpa-ipa.
18493 2018-05-02 Segher Boessenkool <segher@kernel.crashing.org>
18495 * config.gcc (powerpc*-*-*): Remove paired.h. Unsupport the
18496 powerpc*-*-linux*paired* target.
18497 * config/rs6000/750cl.h: Delete.
18498 * config/rs6000/paired.h: Delete.
18499 * config/rs6000/paired.md: Delete.
18500 * config/rs6000/predicates.md (easy_vector_constant): Remove paired
18502 * config/rs6000/rs6000-builtin.def: Remove paired float support.
18503 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Update
18504 comment. Remove paired float support.
18505 * config/rs6000/rs6000-modes.def: Remove V2SF and V2SI.
18506 * config/rs6000/rs6000-opts.h (enum rs6000_vector): Delete
18508 * config/rs6000/rs6000-protos.h (paired_expand_vector_init,
18509 paired_emit_vector_cond_expr, paired_expand_vector_move): Delete
18511 * config/rs6000/rs6000.c: Remove paired float support.
18512 (paired_expand_vector_init, paired_expand_vector_move,
18513 paired_emit_vector_compare, paired_emit_vector_cond_expr,
18514 (paired_expand_lv_builtin, paired_expand_stv_builtin,
18515 paired_expand_builtin, paired_expand_predicate_builtin,
18516 paired_init_builtins): Delete.
18517 * config/rs6000/rs6000.h: Remove paired float support.
18518 * config/rs6000/rs6000.md: Remove paired float support.
18519 (move_from_CR_ov_bit): Delete.
18520 * config/rs6000/rs6000.opt (mpaired): Delete.
18521 * config/rs6000/t-rs6000: Remove paired.md from MD_INCLUDES.
18522 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mpaired.
18524 2018-05-02 Richard Biener <rguenther@suse.de>
18526 PR middle-end/85567
18527 * gimplify.c (gimplify_save_expr): When in SSA form allow
18528 SAVE_EXPRs to compute to SSA vars.
18530 2018-05-02 Jakub Jelinek <jakub@redhat.com>
18533 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
18534 *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
18535 *<shift_insn><dwi>3_doubleword_mask_1): If and[sq]i3 is needed, don't
18536 clobber operands[2], instead use a new pseudo. Formatting fixes.
18538 2018-05-02 Richard Sandiford <richard.sandiford@linaro.org>
18540 PR tree-optimization/85586
18541 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence): Only
18542 exit early for statements in the same group if the accesses are
18545 2018-05-02 Tom de Vries <tom@codesourcery.com>
18548 * lto-wrapper.c (compile_offload_image): Add "could not find mkoffload"
18551 2018-05-01 Marc Glisse <marc.glisse@inria.fr>
18553 PR tree-optimization/85143
18554 * match.pd (A<B&A<C): Extend to BIT_IOR_EXPR.
18556 2018-05-01 Tom de Vries <tom@codesourcery.com>
18559 * config/nvptx/mkoffload.c (main): Suggest using -B in "offload compiler
18560 not found" error message.
18562 2018-05-01 Tom de Vries <tom@codesourcery.com>
18565 * vec.h (VEC_ORDERED_REMOVE_IF, VEC_ORDERED_REMOVE_IF_FROM_TO): Define.
18566 * vec.c (test_ordered_remove_if): New function.
18567 (vec_c_tests): Call test_ordered_remove_if.
18568 * dwarf2cfi.c (connect_traces): Use VEC_ORDERED_REMOVE_IF_FROM_TO.
18569 * lto-streamer-out.c (prune_offload_funcs): Use VEC_ORDERED_REMOVE_IF.
18570 * tree-vect-patterns.c (vect_pattern_recog_1): Use
18571 VEC_ORDERED_REMOVE_IF.
18573 2018-05-01 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
18575 PR tree-optimization/82665
18576 * vr-values.c (vr_values::extract_range_from_binary_expr): Handle
18577 pointer subtraction where arguments come from a memchr call.
18579 2018-05-01 Jakub Jelinek <jakub@redhat.com>
18581 * configure.ac (LD_AS_NEEDED_OPTION, LD_NO_AS_NEEDED_OPTION): Use
18582 --push-state --as-needed and --pop-state instead of --as-needed and
18583 --no-as-needed if ld supports it.
18584 * configure: Regenerated.
18587 * doc/install.texi2html: Replace _002d with - and _002a with * in
18588 generated html files using sed.
18590 2018-04-30 David Malcolm <dmalcolm@redhat.com>
18593 * gcc-rich-location.c (blank_line_before_p): New function.
18594 (use_new_line): New function.
18595 (gcc_rich_location::add_fixit_insert_formatted): New function.
18596 * gcc-rich-location.h
18597 (gcc_rich_location::add_fixit_insert_formatted): New function.
18599 2018-04-30 David Malcolm <dmalcolm@redhat.com>
18601 * selftest.c (assert_streq): Rename "expected" and "actual" to
18602 "val1" and "val2". Extend NULL-handling to cover both inputs
18603 symmetrically, while still requiring both to be non-NULL for a pass.
18604 * selftest.h (assert_streq): Rename "expected" and "actual" to
18606 (ASSERT_EQ): Likewise.
18607 (ASSERT_EQ_AT): Likewise.
18608 (ASSERT_KNOWN_EQ): Likewise.
18609 (ASSERT_KNOWN_EQ_AT): Likewise.
18610 (ASSERT_NE): Likewise.
18611 (ASSERT_MAYBE_NE): Likewise.
18612 (ASSERT_MAYBE_NE_AT): Likewise.
18613 (ASSERT_STREQ): Likewise. Clarify that both must be non-NULL for
18614 the assertion to pass.
18615 (ASSERT_STREQ_AT): Likewise.
18617 2018-04-30 Jonathan Wakely <jwakely@redhat.com>
18619 * doc/invoke.texi (-fpie, -fPIE): Fix grammar and clarify
18620 interaction with -pie.
18622 2018-04-30 David Malcolm <dmalcolm@redhat.com>
18624 * selftest.h: Fix alphabetization of per-source-file selftest
18627 2018-04-30 Jason Merrill <jason@redhat.com>
18629 PR c++/61982 - dead stores to destroyed objects.
18630 * gimplify.c (gimplify_modify_expr): Simplify complex lvalue on LHS
18633 2018-04-30 Jason Merrill <jason@redhat.com>
18635 * tree.c (build_clobber): New.
18636 * tree.h: Declare it.
18637 * gimplify.c (gimplify_bind_expr, gimplify_target_expr): Use it.
18639 2018-04-30 David Malcolm <dmalcolm@redhat.com>
18641 * diagnostic-show-locus.c (layout::layout): Update for
18642 location_get_source_line returning a char_span.
18643 (struct char_span): Move to input.h.
18644 (struct correction): Update for fields in char_span becoming
18646 (struct source_line): Update for location_get_source_line
18647 returning a char_span.
18648 (layout::print_line): Likewise.
18649 * edit-context.c (edited_file::print_content): Likewise.
18650 (edited_file::print_diff_hunk): Likewise.
18651 (edited_file::print_run_of_changed_lines): Likewise.
18652 (edited_file::get_num_lines): Likewise.
18653 (edited_line::edited_line): Likewise.
18654 * final.c (asm_show_source): Likewise.
18655 * input.c (location_get_source_line): Convert return type
18656 from const char * to char_span, losing the final "line_len"
18658 (dump_location_info): Update for the above.
18659 (get_substring_ranges_for_loc): Likewise. Use a char_span
18660 when handling the literal within the line.
18661 (test_reading_source_line): Update for location_get_source_line
18662 returning a char_span.
18663 * input.h (class char_span): Move here from
18664 diagnostic-show-locus.c, converting from a struct to a class.
18665 Make data members private.
18666 (char_span::operator bool): New.
18667 (char_span::length): New.
18668 (char_span::get_buffer): New.
18669 (char_span::operator[]): New.
18670 (char_span::subspan): Make const.
18671 (char_span::xstrdup): New.
18672 (location_get_source_line): Convert return type from const char *
18673 to char_span, losing the final "line_size" param.
18675 2018-04-30 Jan Hubicka <jh@suse.cz>
18677 * lto-wrapper.c (ltrans_priorities): New static var.
18678 (cmp_priority): New.
18679 (run_gcc): Read priorities and if doing parallel build order
18680 the Makefile by them.
18682 2018-04-30 David Malcolm <dmalcolm@redhat.com>
18684 * input.h (builtins_location_check): Convert to a STATIC_ASSERT.
18686 2018-04-30 Richard Biener <rguenther@suse.de>
18688 * tree-cfg.c (verify_address): Remove base argument, add
18689 flag whether to check TREE_ADDRESSABLE and do that.
18690 (verify_expr): Remove.
18691 (verify_types_in_gimple_reference): Add pieces from verify_expr.
18692 (verify_gimple_assign_single): Likewise.
18693 (verify_gimple_switch): Likewise.
18694 (verify_expr_location_1): Dereference tp once. Add (disabled)
18695 piece from verify_expr.
18696 (verify_gimple_in_cfg): Do not call verify_expr on all ops.
18698 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
18700 * config/arc/linux.h (CLEAR_INSN_CACHE): Define.
18702 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
18704 * config/arc/arc-protos.h (prepare_extend_operands): Remove.
18705 (small_data_pattern): Likewise.
18706 (arc_rewrite_small_data): Likewise.
18707 * config/arc/arc.c (LEGITIMATE_SMALL_DATA_OFFSET_P): Remove.
18708 (LEGITIMATE_SMALL_DATA_ADDRESS_P): Likewise.
18709 (get_symbol_alignment): New function.
18710 (legitimate_small_data_address_p): Likewise.
18711 (legitimate_scaled_address): Update, call
18712 legitimate_small_data_address_p.
18713 (output_sdata): New static variable.
18714 (arc_print_operand): Update how we handle small data operands.
18715 (arc_print_operand_address): Likewise.
18716 (arc_legitimate_address_p): Update, use
18717 legitimate_small_data_address_p.
18718 (arc_rewrite_small_data_p): Remove.
18719 (arc_rewrite_small_data_1): Likewise.
18720 (arc_rewrite_small_data): Likewise.
18721 (small_data_pattern): Likewise.
18722 (compact_sda_memory_operand): Update to use
18723 legitimate_small_data_address_p and get_symbol_alignment.
18724 (prepare_move_operands): Don't rewite sdata pattern.
18725 (prepare_extend_operands): Remove.
18726 * config/arc/arc.md (zero_extendqihi2): Don't rewrite sdata
18728 (zero_extendqisi2): Likewise.
18729 (zero_extendhisi2): Likewise.
18730 (extendqihi2): Likewise.
18731 (extendqisi2): Likewise.
18732 (extendhisi2): Likewise.
18733 (addsi3): Likewise.
18734 (subsi3): Likewise.
18735 (andsi3): Likewise.
18736 * config/arc/constraints.md (Usd): Change it to memory constraint.
18738 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
18740 * config/arc/arc.c (arc_split_move): Allow signed 6-bit constants
18741 as source of std instructions.
18742 * config/arc/arc.md (movsi_insn): Update pattern predicate to
18743 allow 6-bit constants as source for store instructions.
18744 (movdi_insn): Update instruction pattern to allow 6-bit constants
18745 as source for store instructions.
18747 2018-04-30 Jonathan Wakely <jwakely@redhat.com>
18749 * doc/invoke.texi (-fdebug-types-section): Fix grammar.
18751 2018-04-30 Nathan Sidwell <nathan@acm.org>
18752 Sandra Loosemore <sandra@codesourcery.com>
18754 * dumpfile.c (dump_open): Allow '-' for stdout.
18755 * doc/invoke.texi (Developer Options): Document dump filename
18756 determination early. Document stdin/stdout selection.
18758 2018-04-30 Andrew Sadek <andrew.sadek.se@gmail.com>
18760 Microblaze Target: PIC data text relative
18762 * config/microblaze/microblaze.opt: add new option -mpic-data-text-rel.
18763 * config/microblaze/microblaze-protos.h (microblaze_constant_address_p):
18765 * config/microblaze/microblaze.h (microblaze_constant_address_p):
18766 CONSTANT_ADDRESS_P definition to microblaze_constant_address_p.
18767 * config/microblaze/microblaze.c (TARGET_PIC_DATA_TEXT_REL):
18768 New addressing mode for data-text relative position indepenedent code.
18769 (microblaze_classify_unspec): add 'UNSPEC_TEXT' case ->
18770 'ADDRESS_SYMBOLIC_TXT_REL'.
18771 (microblaze_classify_address): Add handling for UNSPEC + CONST_INT.
18772 (microblaze_legitimate_pic_operand): Exclude function calls from
18773 pic operands in case of TARGET_PIC_DATA_TEXT_REL option.
18774 (microblaze_legitimize_address): Generate 'UNSPEC_TEXT' for all possible
18776 (microblaze_address_insns): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
18777 (print_operand): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
18778 (print_operand_address): Add 'ADDRESS_SYMBOLIC_TXT_REL' case + handling
18779 for 'address + offset'.
18780 (microblaze_expand_prologue): Add new function prologue call for
18782 (microblaze_asm_generate_pic_addr_dif_vec): Override new target hook
18783 'TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC' to disable address diff vector
18784 table in case of TARGET_PIC_DATA_TEXT_REL.
18785 (expand_pic_symbol_ref): Add handling for 'UNSPEC_TEXT'.
18786 * config/microblaze/microblaze.md (TARGET_PIC_DATA_TEXT_REL):
18787 Add new macros 'UNSPEC_TEXT',
18788 'UNSPEC_SET_TEXT' + add rule for setting r20 in function prologue
18789 + exclude function calls from 'UNSPEC_PLT' in case of data text
18791 * doc/tm.texi.in (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
18792 new target hook for generating address diff vector tables in case of
18794 * doc/tm.texi : Regenerate.
18795 * stmt.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Append new condition
18796 'targetm.asm_out.generate_pic_addr_diff_vec' to flag_pic in case
18797 of addr diff vector generation.
18798 * target.def (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
18799 target hook definition.
18800 * targhooks.h, targhooks.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC):
18801 Add default function for generate_pic_addr_diff_vec -> flag_pic.
18802 * doc/invoke.texi (Add new pic option): Add new microblaze pic
18803 option for data text relative.
18805 2018-04-30 Richard Biener <rguenther@suse.de>
18807 * tree-chrec.h (evolution_function_is_constant_p): Remove
18809 * tree-cfg.c (tree_node_can_be_shared): Re-order checks.
18811 2018-04-30 Richard Biener <rguenther@suse.de>
18814 * dwarf2out.c (gen_producer_string): Ignore -fchecking[=].
18816 2018-04-30 Richard Biener <rguenther@suse.de>
18818 PR tree-optimization/28364
18819 PR tree-optimization/85275
18820 * tree-ssa-loop-ch.c (ch_base::copy_headers): Stop after
18821 copying first exit test.
18823 2018-04-28 Mark Wielaard <mark@klomp.org>
18825 * dwarf2out.c (dwarf2out_finish): Add .debug_addr table header for
18826 dwarf_version >= 5.
18827 (dwarf_AT): Handle DW_AT_addr_base.
18828 (add_top_level_skeleton_die_attrs): Use dwarf_AT for DW_AT_addr_base.
18830 2018-04-28 Uros Bizjak <ubizjak@gmail.com>
18833 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask): New pattern.
18834 (*ashl<dwi>3_doubleword_mask_1): Ditto.
18835 (*<shift_insn><dwi>3_doubleword_mask): Ditto.
18836 (*<shift_insn><dwi>3_doubleword_mask_1): Ditto.
18838 2018-04-28 Richard Biener <rguenther@suse.de>
18840 * tree-cfg.c (verify_gimple_phi): Take a gphi * argument.
18841 (verify_gimple_in_cfg): Rename visited_stmts to visited_throwing_stmts
18842 to reflect use. Only add interesting stmts.
18844 2018-04-27 Martin Jambor <mjambor@suse.cz>
18847 * ipa-cp.c (find_aggregate_values_for_callers_subset): Make sure
18848 the jump function allows for passing through aggregate values.
18850 2018-04-27 David Malcolm <dmalcolm@redhat.com>
18852 * input.h (in_system_header_at): Convert from macro to inline
18854 (from_macro_expansion_at): Likewise.
18855 (from_macro_definition_at): Likewise.
18857 2018-04-27 Jeff Law <law@redhat.com>
18859 * config.gcc: Mark tile* targets as deprecated/obsolete.
18861 2018-04-27 Richard Biener <rguenther@suse.de>
18863 * config/aarch64/aarch64.c: Simplify ap.__stack advance and
18866 2018-04-27 Richard Biener <rguenther@suse.de>
18868 * tree-cfg.c (verify_expr): Make dead code hit gcc_unreachable.
18870 2018-04-27 Uros Bizjak <ubizjak@gmail.com>
18872 * config/i386/i386.md (*movti_internal): Substitute Ye constraint
18873 with Yd constraint. Set "preferred_for_speed" attribute from
18874 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for alternatives
18875 with Yd constraint.
18876 (*movdi_internal): Ditto.
18877 (movti_interunit splitters): Remove
18878 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC from insn condition.
18879 (movdi_interunit splitters): Ditto.
18880 * config/i386/constraints.md (Ye): Remove.
18881 (Yd): Do not depend on TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC.
18883 2018-04-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
18886 * config/aarch64/constraints.md (Usg): Limit to 31.
18887 (Usj): Limit to 63.
18889 2018-04-27 Jakub Jelinek <jakub@redhat.com>
18891 PR tree-optimization/85529
18892 * tree-ssa-reassoc.c (optimize_range_tests_var_bound): Add FIRST_BB
18893 argument. Don't call get_nonzero_bits if opcode is ERROR_MARK_NODE,
18894 rhs2 def stmt's bb is dominated by first_bb and it isn't an obvious
18895 zero extension or masking of the MSB bit.
18896 (optimize_range_tests): Add FIRST_BB argument, pass it through
18897 to optimize_range_tests_var_bound.
18898 (maybe_optimize_range_tests, reassociate_bb): Adjust
18899 optimize_range_tests callers.
18901 2018-04-26 Richard Biener <rguenther@suse.de>
18902 Jakub Jelinek <jakub@redhat.com>
18904 * cgraph.h (symbol_table): Just declare debug method here.
18905 * symtab.c (symbol_table::debug): Define.
18907 2018-04-26 Eric Botcazou <ebotcazou@adacore.com>
18909 * loop-invariant.c (may_assign_reg_p): Return false for frame pointer.
18911 2018-04-26 Uros Bizjak <ubizjak@gmail.com>
18913 * config/i386/i386.md ("isa" attribute): Add x64_sse2.
18914 ("enabled" attribute): Handle x64_sse2 "isa" attribute.
18915 (*movdi_internal): Substitute Yi and Yj constraint with x
18916 and Ym and Yn constraint with y constraint. Update "isa"
18917 attribute and set "preferred_for_speed" attribute from
18918 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for updated alternatives.
18919 (*movsi_internal): Ditto.
18920 (*movdf_internal): Ditto.
18921 (*movsf_internal): Ditto.
18922 (*zero_extendsidi2): Ditto.
18923 * config/i386/sse.md (vec_set<mode>_0): Ditto.
18924 (sse2_loadld): Ditto.
18925 (*vec_extract<ssevecmodelower>_0): Ditto.
18926 (*vec_extractv4si_0_zext_sse4): Ditto.
18927 (vec_concatv2di): Ditto.
18928 (*vec_dup<mode>): Ditto.
18929 * config/i386/mmx.md (*mov<mode>_internal): Ditto.
18930 * config/i386/constraints.md (Yi): Remove.
18935 2018-04-26 Nathan Sidwell <nathan@acm.org>
18937 * dumpfile.c (dump_open): New.
18938 (dump_open_alternate_stream, dump_start, dump_begin): Call it.
18939 (dump_finish): Detect stdio/stderr by value not name.
18941 2018-04-26 Jonathan Wakely <jwakely@redhat.com>
18943 * doc/invoke.texi (-Wreturn-type): Document default status for C++.
18945 2018-04-26 Tom de Vries <tom@codesourcery.com>
18948 * config/nvptx/nvptx.c (verify_neutering_jumps)
18949 (verify_neutering_labels): New function
18950 (nvptx_single): Use verify_neutering_jumps and verify_neutering_labels.
18952 2018-04-26 Tom de Vries <tom@codesourcery.com>
18955 * config/nvptx/nvptx.c (needs_neutering_p): New function.
18956 (nvptx_single): Use needs_neutering_p to skip over insns that do not
18959 2018-04-26 Richard Biener <rguenther@suse.de>
18960 Tom de Vries <tom@codesourcery.com>
18963 * lto-streamer-out.c (output_function): Fixup loops if required to match
18964 discovery done in the reader.
18966 2018-04-26 Richard Biener <rguenther@suse.de>
18968 PR tree-optimization/85116
18969 * tree-ssa-loop-ch.c (do_while_loop_p): A do-while loop should
18970 have a loop exit from the single latch predecessor. Remove
18971 case of header with just condition.
18972 (ch_base::copy_headers): Exclude infinite loops from any
18974 (pass_ch::execute): Record exits.
18976 2018-04-26 Richard Biener <rguenther@suse.de>
18978 * tree-vect-data-refs.c (vect_get_data_access_cost): Get
18979 prologue cost vector and pass it to vect_get_load_cost.
18980 (vect_get_peeling_costs_all_drs): Likewise.
18981 (vect_peeling_hash_get_lowest_cost): Likewise.
18982 (vect_enhance_data_refs_alignment): Likewise.
18984 2018-04-26 Richard Biener <rguenther@suse.de>
18986 PR middle-end/85450
18987 * tree-cfg.c (verify_gimple_assign_unary): Restore proper
18988 checking of integer<->pointer conversions.
18989 * omp-expand.c (expand_omp_for_static_nochunk): Avoid
18990 sign-/zero-extending pointer types.
18991 (expand_omp_for_static_chunk): Likewise.
18993 2018-03-22 Hans-Peter Nilsson <hp@axis.com>
18994 Jean Lee <xiaoyur347@gmail.com>
18996 * config/mips/mips.c (mips_asan_shadow_offset): New function.
18997 (TARGET_ASAN_SHADOW_OFFSET): Define.
18998 * config/mips/mips.h (FRAME_GROWS_DOWNWARD): Augment to also be
18999 true for -fsanitize=address.
19001 2018-04-25 Mark Wielaard <mark@klomp.org>
19003 * dwarf2out.c (file_info_cmp): Sort longer dir prefixes before
19006 2018-04-25 Jakub Jelinek <jakub@redhat.com>
19008 * config/i386/i386.md (*x86_mov<mode>cc_0_m1): Use type "alu1" rather
19009 than "alu", remove explicit "memory" and "imm_disp" attributes.
19010 (*x86_mov<mode>cc_0_m1_se, *x86_mov<mode>cc_0_m1_neg): Likewise.
19012 PR middle-end/85414
19013 * simplify-rtx.c (simplify_unary_operation_1) <case SIGN_EXTEND,
19014 case ZERO_EXTEND>: Pass SUBREG_REG (op) rather than op to
19015 gen_lowpart_no_emit.
19017 2018-04-25 Sebastian Peryt <sebastian.peryt@intel.com>
19020 * config/i386/i386.c (ix86_expand_builtin): Change memory
19021 operand to XI, extend p0 to Pmode.
19022 * config/i386/i386.md: Change unspec volatile and operand
19023 1 mode to XI, change operand 0 mode to P.
19025 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
19027 * config/nds32/nds32-predicates.c (nds32_can_use_bclr_p): Mask with
19028 GET_MODE_MASK before any checking.
19029 (nds32_can_use_bset_p): Likewise.
19030 (nds32_can_use_btgl_p): Likewise.
19032 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
19034 * config/nds32/nds32-doubleword.md: New define_split pattern for
19035 illegal register number.
19037 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
19039 * config/nds32/nds32.c (nds32_print_operand): Set op_value ealier.
19041 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
19043 * config/nds32/nds32.h (ASM_APP_ON): Add missing newline character.
19045 2018-04-25 Richard Biener <rguenther@suse.de>
19047 * lto-streamer.h (LTO_major_version): Bump to 8.
19049 2018-04-25 Jakub Jelinek <jakub@redhat.com>
19051 * BASE-VER: Set to 9.0.0.
19053 2018-04-24 Segher Boessenkool <segher@kernel.crashing.org>
19055 * config/rs6000/rs6000.c (init_float128_ieee): Fix spelling mistakes
19056 in __abskf2 and __powikf2.
19058 2018-04-24 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
19061 * config/aarch64/constraints.md (Usg, Usj): New constraints.
19062 * config/aarch64/iterators.md (cmode_simd): New mode attribute.
19063 * config/aarch64/aarch64.md (*aarch64_ashr_sisd_or_int_<mode>3):
19064 Use the above on operand 2. Reindent.
19065 (*aarch64_lshr_sisd_or_int_<mode>3): Likewise.
19067 2018-04-24 H.J. Lu <hongjiu.lu@intel.com>
19070 * common/config/i386/i386-common.c (ix86_handle_option): Don't
19072 * config/i386/i386.opt (mcet): Removed.
19073 * doc/install.texi: Remove -mcet documentation.
19074 * doc/invoke.texi: Likewise.
19076 2018-04-24 H.J. Lu <hongjiu.lu@intel.com>
19079 * doc/install.texi: Remove -mcet from bootstrap-cet.
19081 2018-04-24 Jakub Jelinek <jakub@redhat.com>
19084 * config/i386/i386.c (ix86_init_mmx_sse_builtins): Don't define
19085 __builtin_ia32_readeflags_u32 and __builtin_ia32_writeeflags_u32
19089 * config/rs6000/rs6000-p8swap.c (const_load_sequence_p): Punt if
19090 const_vector is not CONST_VECTOR or SYMBOL_REF for a constant pool
19091 containing a CONST_VECTOR.
19093 2018-04-24 Cesar Philippidis <cesar@codesourcery.com>
19095 * doc/install.texi: Update newlib dependency for nvptx.
19097 2018-04-24 Jakub Jelinek <jakub@redhat.com>
19100 * config/i386/i386.c (ix86_expand_vector_init_one_var): Use UINTVAL
19101 instead of INTVAL when shifting x left.
19103 2018-04-24 Andreas Krebbel <krebbel@linux.ibm.com>
19105 PR tree-optimization/85478
19106 * tree-vect-loop.c (vect_analyze_loop_2): Do not call
19107 vect_grouped_store_supported for single element vectors.
19109 2018-04-24 Richard Biener <rguenther@suse.de>
19112 * config/i386/i386.c (ix86_add_stmt_cost): Restrict strided
19113 load cost increase to the case of non-constant step.
19115 2018-04-24 Jakub Jelinek <jakub@redhat.com>
19118 * reg-stack.c (move_for_stack_reg): Don't fail assertion about dead
19119 destination if any_malformed_asm.
19121 2018-04-23 Eric Botcazou <ebotcazou@adacore.com>
19123 PR middle-end/85496
19124 * expr.c (store_field): In the bitfield case, if the value comes from
19125 a function call and is returned in registers by means of a PARALLEL,
19126 do not change the mode of the temporary unless BLKmode and VOIDmode.
19128 2018-04-23 Andrey Belevantsev <abel@ispras.ru>
19130 PR rtl-optimization/85423
19131 * sel-sched-ir.c (has_dependence_note_mem_dep): Only discard
19132 dependencies to debug insns when the previous insn is non-debug.
19134 2018-04-23 Claudiu Zissulescu <claziss@synopsys.com>
19136 * config/arc/arc.md ("vunspec"): Delete it, unify all the unspec
19137 enums into a single definition.
19138 (fls): Fix predicates and printing.
19141 2018-04-23 Claudiu Zissulescu <claziss@synopsys.com>
19143 * config/arc/arc-protos.h (check_if_valid_sleep_operand): Remove.
19144 * config/arc/arc.c (arc_expand_builtin): Sleep accepts registers
19145 and short u6 immediate.
19146 (check_if_valid_sleep_operand): Remove.
19147 * config/arc/arc.md (Sleep): Accepts registers and u6 immediates.
19149 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
19151 * config/nds32/nds32.c (nds32_compute_stack_frame): Consider
19152 flag_always_save_lp condition.
19153 * config/nds32/nds32.opt (malways-save-lp): New option.
19155 2018-04-22 Shiva Chen <shiva0217@gmail.com>
19157 * config/nds32/nds32-protos.h (nds32_use_load_post_increment): Declare.
19158 * config/nds32/nds32.c (nds32_use_load_post_increment): New.
19159 * config/nds32/nds32.h
19160 (USE_LOAD_POST_INCREMENT, USE_LOAD_POST_DECREMENT): Define.
19161 (USE_STORE_POST_INCREMENT, USE_STORE_POST_DECREMENT): Define.
19163 2018-04-22 Shiva Chen <shiva0217@gmail.com>
19165 * config/nds32/nds32-protos.h (nds32_ls_333_p): Remove.
19166 * config/nds32/nds32.c (nds32_ls_333_p): Remove.
19168 2018-04-22 Shiva Chen <shiva0217@gmail.com>
19169 Chung-Ju Wu <jasonwucj@gmail.com>
19171 * config/nds32/nds32-protos.h (nds32_case_vector_shorten_mode):
19173 * config/nds32/nds32.c (nds32_case_vector_shorten_mode): New function.
19174 * config/nds32/nds32.h (CASE_VECTOR_SHORTEN_MODE): Modify.
19176 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
19178 * config/nds32/nds32.c (nds32_compute_stack_frame): Fix wrong value.
19180 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
19182 * config/nds32/nds32-protos.h (nds32_data_alignment,
19183 nds32_local_alignment): Declare.
19184 * config/nds32/nds32.c (nds32_data_alignment, nds32_constant_alignment,
19185 nds32_local_alignment): New functions.
19186 (TARGET_CONSTANT_ALIGNMENT): Define.
19187 * config/nds32/nds32.h (DATA_ALIGNMENT, LOCAL_ALIGNMENT): Define.
19189 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
19191 * config/nds32/nds32.c
19192 (TARGET_HARD_REGNO_MODE_OK): Move to the bottom of file.
19193 (TARGET_MODES_TIEABLE_P): Likewise.
19195 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
19197 * config/nds32/nds32.c (nds32_asm_file_start): Display optimization
19198 level Ofast and Og.
19200 2018-04-22 Monk Chiang <sh.chiang04@gmail.com>
19201 Chung-Ju Wu <jasonwucj@gmail.com>
19203 * config/nds32/constants.md (unspec_volatile_element): Add enum values
19204 for unaligned access.
19205 * config/nds32/nds32-intrinsic.c: Implementation of expanding
19207 * config/nds32/nds32-intrinsic.md: Likewise.
19208 * config/nds32/nds32_intrinsic.h: Likewise.
19209 * config/nds32/nds32.h (nds32_builtins): Likewise.
19210 * config/nds32/nds32.opt (munaligned-access): New option.
19211 * config/nds32/nds32.c (nds32_asm_file_start): Display
19212 flag_unaligned_access status.
19214 2018-04-20 Kito Cheng <kito.cheng@gmail.com>
19216 * config/riscv/elf.h (LINK_SPEC): Pass --no-relax if
19217 -mno-relax is present.
19218 * config/riscv/linux.h (LINK_SPEC): Ditto.
19220 2018-04-20 Martin Sebor <msebor@redhat.com>
19223 * gimple-fold.c (gimple_fold_builtin_strcpy): Suppress -Wrestrict
19225 (gimple_fold_builtin_stxcpy_chk): Same.
19226 * gimple-ssa-warn-restrict.c (check_bounds_or_overlap): Same.
19228 2018-04-20 Michael Meissner <meissner@linux.ibm.com>
19231 * config/rs6000/rs6000.c (init_float128_ieee): Add support to call
19232 __powikf2 when long double is IEEE 128-bit.
19234 2018-04-20 Kito Cheng <kito.cheng@gmail.com>
19236 * config/riscv/riscv.c (riscv_first_stack_step): Round up min
19237 step to make sure stack always aligned.
19239 2018-04-20 Carl Love <cel@us.ibm.com>
19242 * config/rs6000/rs6000-c.c (rs6000_gimple_fold_builtin): Add
19243 size check for arg0.
19245 2018-04-20 Nathan Sidwell <nathan@codesourcery.com>
19246 Tom de Vries <tom@codesourcery.com>
19249 * config/nvptx/nvptx.c (nvptx_emit_forking, nvptx_emit_joining):
19250 Emit insns for calls too.
19251 (nvptx_find_par): Always look for worker-level predecessor insn.
19252 (nvptx_propagate): Add is_call parm, return bool. Copy frame for
19254 (nvptx_vpropagate, nvptx_wpropagate): Adjust.
19255 (nvptx_process_pars): Propagate frames for calls.
19257 2018-04-20 H.J. Lu <hongjiu.lu@intel.com>
19260 * common/config/i386/i386-common.c (OPTION_MASK_ISA_IBT_SET):
19262 (OPTION_MASK_ISA_IBT_UNSET): Likewise.
19263 (ix86_handle_option): Don't handle OPT_mibt.
19264 * config/i386/cet.h: Check __CET__ instead of __IBT__ and
19266 * config/i386/driver-i386.c (host_detect_local_cpu): Remove
19268 * config/i386/i386-c.c (ix86_target_macros_internal): Don't
19269 check OPTION_MASK_ISA_IBT nor flag_cf_protection.
19270 (ix86_target_macros): Define __CET__ with flag_cf_protection
19271 for -fcf-protection.
19272 * config/i386/i386.c (isa2_opts): Remove -mibt.
19273 * config/i386/i386.h (TARGET_IBT): Removed.
19274 (TARGET_IBT_P): Likewise.
19275 (ix86_valid_target_attribute_inner_p): Don't check OPT_mibt.
19276 * config/i386/i386.md (nop_endbr): Don't check TARGET_IBT.
19277 * config/i386/i386.opt (mcet): Update help message.
19278 (mshstk): Likewise.
19280 * doc/invoke.texi: Remove -mibt. Document __CET__. Document
19281 -mcet as an alias for -mshstk.
19283 2018-04-20 Richard Biener <rguenther@suse.de>
19285 PR middle-end/85475
19286 * match.pd ((X * CST) * Y -> (X * Y) * CST): Avoid exponential
19287 complexity by forcing a single use of the multiply operand.
19289 2018-04-20 Martin Jambor <mjambor@suse.cz>
19292 * ipa-cp.c (cgraph_edge_brings_value_p): Move check for self-feeding
19293 recursion dependency to only apply to non-clones.
19295 2018-04-20 Martin Jambor <mjambor@suse.cz>
19298 * ipa-cp.c (create_specialized_node): Check that clones of
19299 self-recursive edges exist during IPA-CP.
19301 2018-04-19 Toon Moene <toon@moene.org>
19303 * doc/invoke.texi: Add -floop-unroll-and-jam to options enabled
19306 2018-04-19 Jakub Jelinek <jakub@redhat.com>
19308 PR tree-optimization/85467
19309 * fold-const.c (fold_ternary_loc) <case BIT_FIELD_REF>: Use
19310 VECTOR_TYPE_P macro. If type is vector type, VIEW_CONVERT_EXPR the
19311 VECTOR_CST element to type.
19313 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
19316 * config/i386/i386.h (STACK_SAVEAREA_MODE): New.
19317 * config/i386/i386.md (builtin_setjmp_setup): Removed.
19318 (builtin_longjmp): Likewise.
19319 (save_stack_nonlocal): New pattern.
19320 (restore_stack_nonlocal): Likewise.
19322 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
19325 * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
19326 Replace ASM_OUTPUT_LABEL with fprintf.
19328 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
19331 * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
19332 Check flag_cf_protection instead of TARGET_IBT and TARGET_SHSTK.
19333 * config/i386/i386-c.c (ix86_target_macros_internal): Also
19334 define __IBT__ and __SHSTK__ for -fcf-protection.
19335 * config/i386/i386.c (pass_insert_endbranch::gate): Don't check
19337 (ix86_trampoline_init): Likewise.
19338 (x86_output_mi_thunk): Likewise.
19339 (ix86_notrack_prefixed_insn_p): Likewise.
19340 (ix86_option_override_internal): Don't disallow -fcf-protection.
19341 * config/i386/i386.md (rdssp<mode>): Also enable for
19343 (incssp<mode>): Likewise.
19344 (nop_endbr): Likewise.
19345 * config/i386/i386.opt (mcet): Change help message to built-in
19348 (mshstk): Likewise.
19349 * doc/invoke.texi: Remove -mcet, -mibt and -mshstk condition
19350 on -fcf-protection. Change -mcet, -mibt and -mshstk to only
19351 enable CET built-in functions.
19353 2018-04-19 Sebastian Peryt <sebastian.peryt@intel.com>
19355 * common/config/i386/i386-common.c
19356 (OPTION_MASK_ISA_MOVDIRI_SET, OPTION_MASK_ISA_MOVDIR64B_SET,
19357 OPTION_MASK_ISA_MOVDIRI_UNSET,
19358 OPTION_MASK_ISA_MOVDIR64B_UNSET): New defines.
19359 (ix86_handle_option): Handle -mmovdiri and -mmovdir64b.
19360 * config.gcc (movdirintrin.h): New header.
19361 * config/i386/cpuid.h (bit_MOVDIRI,
19362 bit_MOVDIR64B): New bits.
19363 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mmovdiri
19365 * config/i386/i386-builtin-types.def ((VOID, PUNSIGNED, UNSIGNED),
19366 (VOID, PVOID, PCVOID)): New function types.
19367 * config/i386/i386-builtin.def (__builtin_ia32_directstoreu_u32,
19368 __builtin_ia32_directstoreu_u64,
19369 __builtin_ia32_movdir64b): New builtins.
19370 * config/i386/i386-c.c (__MOVDIRI__, __MOVDIR64B__): New.
19371 * config/i386/i386.c (ix86_target_string): Added -mmovdir64b
19373 (ix86_valid_target_attribute_inner_p): Ditto.
19374 (ix86_expand_special_args_builtin): Added VOID_FTYPE_PUNSIGNED_UNSIGNED
19375 and VOID_FTYPE_PUNSIGNED_UNSIGNED.
19376 (ix86_expand_builtin): Expand IX86_BUILTIN_MOVDIR64B.
19377 * config/i386/i386.h (TARGET_MOVDIRI, TARGET_MOVDIRI_P,
19378 TARGET_MOVDIR64B, TARGET_MOVDIR64B_P): New.
19379 * config/i386/i386.md (UNSPECV_MOVDIRI, UNSPECV_MOVDIR64B): New.
19380 (movdiri<mode>, movdir64b_<mode>): New.
19381 * config/i386/i386.opt: Add -mmovdiri and -mmovdir64b.
19382 * config/i386/immintrin.h: Include movdirintrin.h.
19383 * config/i386/movdirintrin.h: New file.
19384 * doc/invoke.texi: Added -mmovdiri and -mmovdir64b.
19386 2018-04-19 Richard Biener <rguenther@suse.de>
19388 PR middle-end/85455
19389 * cfg.c (clear_bb_flags): When loop state says we have
19390 marked irreducible regions also preserve BB_IRREDUCIBLE_LOOP.
19392 2018-04-19 Richard Biener <rguenther@suse.de>
19394 PR tree-optimization/84737
19395 * tree-vect-data-refs.c (vect_copy_ref_info): New function
19396 copying restrict info.
19397 (vect_setup_realignment): Use it.
19398 * tree-vectorizer.h (vect_copy_ref_info): Declare.
19399 * tree-vect-stmts.c (vectorizable_store): Copy ref info from
19400 the first DR to all generated stores.
19401 (vectorizable_load): Likewise for loads.
19403 2018-04-19 Jakub Jelinek <jakub@redhat.com>
19405 PR tree-optimization/85446
19406 * match.pd ((intptr_t) x eq/ne CST to x eq/ne (typeof x) cst): Require
19407 the integral and pointer types to have the same precision.
19409 * doc/install.texi: Document --disable-cet being the default and
19412 2018-04-18 Martin Liska <mliska@suse.cz>
19414 * ipa-devirt.c (odr_subtypes_equivalent_p): Fix GNU coding
19417 2018-04-18 Martin Liska <mliska@suse.cz>
19420 2018-03-02 Eric Botcazou <ebotcazou@adacore.com>
19423 * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
19424 arguments if they are comparable.
19426 2018-04-18 Martin Liska <mliska@suse.cz>
19429 2018-03-13 Eric Botcazou <ebotcazou@adacore.com>
19432 * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
19435 2018-04-18 H.J. Lu <hongjiu.lu@intel.com>
19438 * config/i386/i386.c (ix86_expand_split_stack_prologue): Insert
19439 ENDBR after calling __morestack.
19441 2018-04-18 David Malcolm <dmalcolm@redhat.com>
19444 * configure.ac (gcc-driver-name.h): Honor --with-gcc-major-version
19445 by using gcc_base_ver to generate a gcc_driver_version, and use
19446 it when generating GCC_DRIVER_NAME.
19447 * configure: Regenerate.
19449 2018-04-18 Jakub Jelinek <jakub@redhat.com>
19452 * config.gcc: Obsolete powerpc*-*-*spe*.
19454 2018-04-17 Jakub Jelinek <jakub@redhat.com>
19457 * dbxout.c (dbxout_int): Perform negation in unsigned int type.
19458 (stabstr_D): Change type of unum from unsigned int to
19459 unsigned HOST_WIDE_INT. Perform negation in unsigned HOST_WIDE_INT
19462 2018-04-17 Jim Wilson <jimw@sifive.com>
19465 * config/riscv/riscv.c (riscv_compute_frame_info): Add calls to
19466 RISCV_STACK_ALIGN when using outgoing_args_size and pretend_args_size.
19467 Set arg_pointer_offset after using pretend_args_size.
19469 2018-04-17 Jakub Jelinek <jakub@redhat.com>
19471 PR rtl-optimization/85431
19472 * dse.c (record_store): Ignore zero width stores.
19475 * asan.c (handle_builtin_stack_restore): Adjust comment. Emit
19476 __asan_allocas_unpoison call and last_alloca_addr = new_sp before
19477 __builtin_stack_restore rather than after it.
19478 * builtins.c (expand_asan_emit_allocas_unpoison): Pass
19479 arg1 + (virtual_dynamic_stack_rtx - stack_pointer_rtx) as second
19480 argument instead of virtual_dynamic_stack_rtx.
19482 2018-04-17 Kelvin Nilsen <kelvin@gcc.gnu.org>
19484 * config/rs6000/rs6000-protos.h (rs6000_builtin_is_supported_p):
19486 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
19487 Add note to error message to explain internal mapping of overloaded
19488 built-in function name to non-overloaded built-in function name.
19489 * config/rs6000/rs6000.c (rs6000_builtin_is_supported_p): New
19492 2018-04-17 Michael Meissner <meissner@linux.vnet.ibm.com>
19495 * config/rs6000/rs6000.md (pack<mode>): Do not try handle a pack
19496 where the inputs overlap with the output.
19498 2018-04-17 Jakub Jelinek <jakub@redhat.com>
19500 * config/i386/sse.md (vec_extract_lo_<mode><mask_name>): Add
19501 (=v, v) alternative and explicit "memory" attribute.
19502 (vec_extract_lo_<mode><mask_name>): Likewise. Also add
19503 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
19505 (vec_extract_lo_<mode><mask_name>): Add (=v, v) alternative and use
19506 "sselog1" type instead of "sselog".
19507 (vec_extract_hi_<mode><mask_name>): Use "sselog1" type instead of
19508 "sselog". Remove explicit "memory" attribute.
19509 (vec_extract_lo_v32hi): Add (=v, v) alternative and explicit "memory",
19510 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
19512 (vec_extract_hi_v32hi): Merge all alternatives into one, use
19513 "sselog1" type instead of "sselog". Remove explicit "memory"
19515 (vec_extract_hi_v16hi): Merge each pair of alternatives into one,
19516 use "sselog1" type instead of "sselog". Remove explicit "memory"
19518 (vec_extract_lo_v64qi): Add (=v, v) alternative and explicit "memory",
19519 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
19521 (vec_extract_hi_v64qi): Merge all alternatives into one, use
19522 "sselog1" type instead of "sselog". Remove explicit "memory"
19524 (vec_extract_hi_v32qi): Merge each pair of alternatives into one,
19525 use "sselog1" type instead of "sselog". Remove explicit "memory"
19529 * config/i386/i386.md (*ashlqi3_1_slp): Use alu1 type instead of alu.
19531 PR middle-end/85414
19532 * rtlhooks.c (gen_lowpart_if_possible): Don't call gen_lowpart_SUBREG
19535 2018-04-17 Martin Jambor <mjambor@suse.cz>
19538 * ipa-cp.c (create_specialized_node): Call
19539 expand_all_artificial_thunks if necessary.
19541 2018-04-17 Martin Liska <mliska@suse.cz>
19544 * ipa-devirt.c (odr_types_equivalent_p): Remove trailing
19545 in message, remote space in between '_G' and '('.
19547 2018-04-17 Jakub Jelinek <jakub@redhat.com>
19550 * config/i386/sse.md (reduces<mode><mask_scalar_name>,
19551 avx512f_vmcmp<mode>3<round_saeonly_name>,
19552 avx512f_vmcmp<mode>3_mask<round_saeonly_name>,
19553 avx512f_sgetexp<mode><mask_scalar_name><round_saeonly_scalar_name>,
19554 avx512f_rndscale<mode><round_saeonly_name>,
19555 avx512dq_ranges<mode><mask_scalar_name><round_saeonly_scalar_name>,
19556 avx512f_vgetmant<mode><mask_scalar_name><round_saeonly_scalar_name>):
19557 Use %<iptr>2 instead of %2 for -masm=intel.
19558 (avx512f_vcvtss2usi<round_name>, avx512f_vcvtss2usiq<round_name>,
19559 avx512f_vcvttss2usi<round_saeonly_name>,
19560 avx512f_vcvttss2usiq<round_saeonly_name>): Use %k1 instead of %1 for
19562 (avx512f_vcvtsd2usi<round_name>, avx512f_vcvtsd2usiq<round_name>,
19563 avx512f_vcvttsd2usi<round_saeonly_name>,
19564 avx512f_vcvttsd2usiq<round_saeonly_name>, ufloatv2siv2df2<mask_name>):
19565 Use %q1 instead of %1 for -masm=intel.
19566 (avx512f_sfixupimm<mode><sd_maskz_name><round_saeonly_name>,
19567 avx512f_sfixupimm<mode>_mask<round_saeonly_name>): Use %<iptr>3 instead
19568 of %3 for -masm=intel.
19569 (sse2_shufpd_v2df_mask): Fix a typo, change %{6%} to %{%6%} for
19571 (*avx512vl_<code>v2div2qi2_store): Use %w0 instead of %0 for
19573 (*avx512vl_<code><mode>v4qi2_store): Use %k0 instead of %0 for
19575 (avx512vl_<code><mode>v4qi2_mask_store): Use a single pattern with
19576 %k0 and %1 for -masm=intel rather than two patterns, one with %0 and
19578 (*avx512vl_<code><mode>v8qi2_store): Use %q0 instead of %0 for
19580 (avx512vl_<code><mode>v8qi2_mask_store): Use a single pattern with
19581 %q0 and %1 for -masm=intel rather than two patterns, one with %0 and
19582 %g1 and one with %0 and %1.
19583 (avx512er_vmrcp28<mode><round_saeonly_name>,
19584 avx512er_vmrsqrt28<mode><round_saeonly_name>): Use %<iptr>1 instead of
19585 %1 for -masm=intel.
19586 (avx5124fmaddps_4fmaddps_mask, avx5124fmaddps_4fmaddss_mask,
19587 avx5124fmaddps_4fnmaddps_mask, avx5124fmaddps_4fnmaddss_mask,
19588 avx5124vnniw_vp4dpwssd_mask, avx5124vnniw_vp4dpwssds_mask): Swap order
19589 of %0 and %{%4%} for -masm=intel.
19590 (avx5124fmaddps_4fmaddps_maskz, avx5124fmaddps_4fmaddss_maskz,
19591 avx5124fmaddps_4fnmaddps_maskz, avx5124fmaddps_4fnmaddss_maskz,
19592 avx5124vnniw_vp4dpwssd_maskz, avx5124vnniw_vp4dpwssds_maskz): Swap
19593 order of %0 and %{%5%}%{z%} for -masm=intel.
19595 2018-04-17 Jan Hubicka <jh@suse.cz>
19598 * ipa-devirt.c (odr_types_equivalent_p): Handle bit fields.
19600 2018-04-17 Martin Liska <mliska@suse.cz>
19603 * multiple_target.c (create_dispatcher_calls): Set apostrophes
19604 for target_clone error message. Make default implementation
19605 clone to be a local declaration.
19606 (separate_attrs): Add new argument and check for an empty
19608 (expand_target_clones): Handle it.
19609 (ipa_target_clone): Make redirection just for target_clones
19612 2018-04-16 Cesar Philippidis <cesar@codesourcery.com>
19613 Tom de Vries <tom@codesourcery.com>
19615 PR middle-end/84955
19616 * omp-expand.c (expand_oacc_for): Add dummy false branch for
19617 tiled basic blocks without omp continue statements.
19619 2018-04-16 Aaron Sawdey <acsawdey@linux.ibm.com>
19622 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Mark
19623 vec_extract expression as having side effects to make sure it gets
19626 2018-04-16 H.J. Lu <hongjiu.lu@intel.com>
19629 * config/i386/i386.c (get_builtin_code_for_version): Check
19632 2018-04-16 Olga Makhotina <olga.makhotina@intel.com>
19635 * config.gcc: Support "skylake".
19636 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
19638 * config/i386/i386.c (m_SKYLAKE): Define.
19639 (processor_target_table): Add "skylake".
19640 (ix86_option_override_internal): Add "skylake".
19641 (get_builtin_code_for_version): Handle PROCESSOR_SKYLAKE,
19642 PROCESSOR_CANNONLAKE.
19643 (get_builtin_code_for_version): Fix priority for
19644 PROCESSOR_ICELAKE_CLIENT, PROCESSOR_ICELAKE_SERVER,
19645 PROCESSOR_SKYLAKE-AVX512.
19646 * config/i386/i386.h (processor_costs): Define TARGET_SKYLAKE.
19647 (processor_type): Add PROCESSOR_SKYLAKE.
19649 2018-04-16 Paolo Carlini <paolo.carlini@oracle.com>
19650 Jason Merrill <jason@redhat.com>
19653 * convert.c (convert_to_integer_1): Use direct recursion for
19654 enumeral types and types with a precision less than the number
19655 of bits in their mode.
19657 2018-04-16 Julia Koval <julia.koval@intel.com>
19660 * config/i386/x86-tune.def (X86_TUNE_SSE_UNALIGNED_LOAD_OPTIMAL,
19661 X86_TUNE_SSE_UNALIGNED_STORE_OPTIMAL): Add m_SKYLAKE_AVX512
19663 2018-04-14 Segher Boessenkool <segher@kernel.crashing.org>
19666 * config/rs6000/rs6000.opt (mdirect-move): Make deprecated.
19667 * doc/invoke.texi (RS/6000 and PowerPC Options): Remove -mdirect-move
19668 and -mno-direct-move.
19670 2018-04-13 Paul A. Clarke <pc@us.ibm.com>
19673 * config/rs6000/emmintrin.h (_mm_slli_epi{16,32,64}):
19674 Ensure that vec_splat_s32 is only called with 0 <= shift < 16.
19675 Ensure negative shifts result in {0}.
19677 2018-04-13 Vladimir Makarov <vmakarov@redhat.com>
19679 PR rtl-optimization/79916
19680 * config/rs6000/rs6000.c (rs6000_emit_move): Use assigned hard
19681 regs (if any) to define how to gnerate SD moves when LRA is in
19684 2018-04-13 Jakub Jelinek <jakub@redhat.com>
19686 PR rtl-optimization/85393
19687 * except.h (expand_dw2_landing_pad_for_region): Remove declaration.
19688 * except.c (expand_dw2_landing_pad_for_region): Make static.
19689 * bb-reorder.c (fix_up_crossing_landing_pad): In new_bb emit just
19690 a label and unconditional jump to old_bb, rather than
19691 expand_dw2_landing_pad_for_region insn(s) and jump to single_succ
19694 PR rtl-optimization/85376
19695 * simplify-rtx.c (simplify_const_unary_operation): For CLZ and CTZ and
19696 zero op0, if C?Z_DEFINED_VALUE_AT_ZERO is false, return NULL_RTX
19697 instead of a specific value.
19699 2018-04-13 Jan Hubicka <hubicka@ucw.cz>
19700 Bin Cheng <bin.cheng@arm.com>
19702 PR tree-optimization/82965
19703 PR tree-optimization/83991
19704 * cfgloopanal.c (expected_loop_iterations_unbounded): Add
19705 by_profile_only parameter.
19706 * cfgloopmanip.c (scale_loop_profile): Further scale loop's profile
19707 information if the loop was predicted to iterate too many times.
19708 * cfgloop.h (expected_loop_iterations_unbounded): Update prototype
19710 2018-04-13 Jan Hubicka <hubicka@ucw.cz>
19713 * config/i386/i386.c (ix86_can_inline_p): Allow safe transitions for
19716 2018-04-13 Martin Liska <mliska@suse.cz>
19717 Jakub Jelinek <jakub@redhat.com>
19719 PR middle-end/81657
19720 * expr.h (enum block_op_methods): Add BLOCK_OP_NO_LIBCALL_RET.
19721 * expr.c (emit_block_move_hints): Handle BLOCK_OP_NO_LIBCALL_RET.
19722 * builtins.c (expand_builtin_memory_copy_args): Use
19723 BLOCK_OP_NO_LIBCALL_RET method for mempcpy with non-ignored target,
19724 handle dest_addr == pc_rtx.
19726 2018-04-12 Segher Boessenkool <segher@kernel.crashing.org>
19729 * config/rs6000/rs6000.md (fix_trunc<mode>si2): Use legacy code if
19730 asked to not generate direct moves.
19731 (fix_trunc<mode>si2_stfiwx): Similar.
19732 (fix_trunc<mode>si2_internal): Similar.
19734 2018-04-12 Jakub Jelinek <jakub@redhat.com>
19737 * var-tracking.c (add_stores): Handle STRICT_LOW_PART SET_DEST.
19738 * cselib.c (cselib_record_sets): For STRICT_LOW_PART dest,
19739 lookup if dest in some wider mode is known to be const0_rtx and
19740 if so, record permanent equivalence for it to be ZERO_EXTEND of
19741 the narrower mode destination.
19743 2018-04-12 Cesar Philippidis <cesar@codesourcery.com>
19745 * lto-streamer-out.c (output_function): Revert 259346.
19746 * omp-expand.c (expand_oacc_for): Likewise.
19748 2018-04-12 Alexander Monakov <amonakov@ispras.ru>
19750 PR rtl-optimization/85354
19751 * sel-sched-ir.c (sel_init_pipelining): Move cfg_cleanup call...
19752 * sel-sched.c (sel_global_init): ... here.
19754 2018-04-12 Eric Botcazou <ebotcazou@adacore.com>
19757 * lto-wrapper.c (debug_objcopy): Open the files in binary mode.
19758 * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
19759 mode for PE-COFF targets.
19760 * config/i386/i386-protos.h (i386_pe_asm_lto_start): Declare.
19761 (i386_pe_asm_lto_end): Likewise.
19762 * config/i386/cygming.h (TARGET_ASM_LTO_START): Define.
19763 (TARGET_ASM_LTO_END): Likewise.
19764 * config/i386/winnt.c (saved_debug_info_level): New static variable.
19765 (i386_pe_asm_lto_start): New function.
19766 (i386_pe_asm_lto_end): Likewise.
19768 2018-04-12 Cesar Philippidis <cesar@codesourcery.com>
19769 Richard Biener <rguenther@suse.de>
19771 PR middle-end/84955
19772 * lto-streamer-out.c (output_function): Fix CFG loop state before
19774 * omp-expand.c (expand_oacc_for): Handle calls to internal
19775 functions like regular functions.
19777 2018-04-12 Richard Biener <rguenther@suse.de>
19780 * dwarf2out.c (init_sections_and_labels): Use debug_line_section[_label]
19781 for the early LTO debug to properly generate references to it
19782 during DIE emission. Do not re-use that for the skeleton for
19784 (dwarf2out_early_finish): Likewise.
19786 2018-04-12 Jakub Jelinek <jakub@redhat.com>
19789 * config/i386/sse.md
19790 (<mask_codefor>avx512dq_vextract<shuffletype>64x2_1<mask_name> split,
19791 <mask_codefor>avx512f_vextract<shuffletype>32x4_1<mask_name> split,
19792 vec_extract_lo_<mode><mask_name> split, vec_extract_lo_v32hi,
19793 vec_extract_lo_v64qi): For non-AVX512VL if input is xmm16+ reg
19794 and output is a reg, avoid creating invalid lowpart subreg, but
19795 instead split into a 512-bit move. Don't split if not AVX512VL,
19796 input is xmm16+ reg and output is a mem.
19797 (vec_extract_lo_<mode><mask_name>, vec_extract_lo_v32hi,
19798 vec_extract_lo_v64qi): Don't require split if not AVX512VL, input is
19799 xmm16+ reg and output is a mem.
19801 2018-04-12 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
19803 * config/s390/s390.c (s390_output_indirect_thunk_function): Check
19804 also for flag_dwarf2_cfi_asm.
19806 2018-04-12 Jakub Jelinek <jakub@redhat.com>
19808 PR rtl-optimization/85342
19809 * regcprop.c (copyprop_hardreg_forward_1): Remove replaced array, use
19810 a bool scalar var inside of the loop instead. Don't try to update
19811 recog_data.operand after failed apply_change_group.
19813 2018-04-12 Tom de Vries <tom@codesourcery.com>
19816 * config/nvptx/nvptx.c (flexible_array_member_type_p): New function.
19817 (nvptx_assemble_decl_begin): Add undefined param. Declare undefined
19818 array with flexible array member as array without given dimension.
19819 (nvptx_assemble_undefined_decl): Set nvptx_assemble_decl_begin call
19820 argument for undefined param to true.
19822 2018-04-11 Aaron Sawdey <acsawdey@linux.ibm.com>
19825 * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
19826 -mcall- and -mtraceback=. Remove options -mabi=spe and -mabi=no-spe
19827 from PowerPC section.
19828 * config/rs6000/sysv4.opt (mcall-): Improve help text.
19829 * config/rs6000/rs6000.opt (mblock-compare-inline-limit=): Trim
19830 help text that is too long.
19831 * config/rs6000/rs6000.opt (mblock-compare-inline-loop-limit=): Trim
19832 help text that is too long.
19833 * config/rs6000/rs6000.opt (mstring-compare-inline-limit=): Trim
19834 help text that is too long.
19836 2018-04-11 Uros Bizjak <ubizjak@gmail.com>
19838 * config/alpha/alpha.md (stack_probe_internal): Rename
19839 from "probe_stack". Update all callers.
19841 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
19843 PR rtl-optimization/84566
19844 * sched-deps.c (sched_analyze_insn): Check deps->readonly when invoking
19845 sched_macro_fuse_insns.
19847 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
19850 * sched-rgn.c (add_branch_dependences): Move sel_sched_p check here...
19851 (compute_block_dependences): ... from here.
19853 2018-04-11 Jakub Jelinek <jakub@redhat.com>
19855 PR tree-optimization/85331
19856 * vec-perm-indices.h (vec_perm_indices::clamp): Change input type
19857 from int to HOST_WIDE_INT.
19859 2018-04-11 Martin Jambor <mjambor@suse.cz>
19862 * ipa-cp.c (propagate_vals_across_pass_through): Expand comment.
19863 (cgraph_edge_brings_value_p): New parameter dest_val, check if it is
19864 not the same as the source val.
19865 (cgraph_edge_brings_value_p): New parameter.
19866 (gather_edges_for_value): Pass destination value to
19867 cgraph_edge_brings_value_p.
19868 (perhaps_add_new_callers): Likewise.
19869 (get_info_about_necessary_edges): Likewise and exclude values brought
19870 only by self-recursive edges.
19871 (create_specialized_node): Redirect only clones of self-calling edges.
19872 (+self_recursive_pass_through_p): New function.
19873 (find_more_scalar_values_for_callers_subset): Use it.
19874 (find_aggregate_values_for_callers_subset): Likewise.
19875 (known_aggs_to_agg_replacement_list): Removed.
19876 (decide_whether_version_node): Re-calculate known constants for all
19877 remaining context clones.
19879 2018-04-11 Richard Biener <rguenther@suse.de>
19882 * dwarf2out.c (dwarf2out_finish): Remove DW_AT_stmt_list attribute
19883 from early DWARF output.
19884 (dwarf2out_early_finish): Output line info unconditionally into
19885 early DWARF and add reference to it.
19887 2018-04-11 Jakub Jelinek <jakub@redhat.com>
19890 * config/i386/sse.md (iptr): Add V16SFmode and V8DFmode cases.
19891 (<avx512>_vec_dup<mode><mask_name>): Use a single pattern for modes
19892 other than V2DFmode using iptr mode attribute.
19893 (<avx512>_vec_dup<mode><mask_name>): Use iptr mode attribute.
19895 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
19897 PR rtl-optimization/84659
19898 * sel-sched-ir.c (sel_init_pipelining): Invoke cleanup_cfg.
19900 2018-04-11 Jakub Jelinek <jakub@redhat.com>
19903 * dwarf2out.c (skip_loc_list_entry): Don't call size_of_locs if
19905 (output_loc_list): Pass address of a dummy size variable even in the
19906 locview handling loop.
19907 (index_location_lists): Add comment on why skip_loc_list_entry can't
19910 2018-04-11 Thomas Preud'homme <thomas.preudhomme@arm.com>
19913 * config/arm/arm-builtins.c (arm_expand_builtin): Force input operand
19916 2018-04-10 Aaron Sawdey <acsawdey@linux.ibm.com>
19919 * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
19920 -mblock-compare-inline-limit, -mblock-compare-inline-loop-limit,
19921 and -mstring-compare-inline-limit.
19923 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
19926 * config/rs6000/rs6000.md (allocate_stack): Put the residual size
19927 for stack clash protection in a register whenever we need it to be in
19930 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
19932 * common/config/rs6000/rs6000-common.c (rs6000_option_init_struct):
19933 Enable -fasynchronous-unwind-tables by default if OBJECT_FORMAT_ELF.
19935 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
19938 * config/rs6000/rs6000.opt (mtraceback=): Show the allowed values in
19940 (mlong-double-): Ditto.
19941 * config/rs6000/sysv4.opt (msdata=): Ditto.
19942 (mtls-size=): Ditto.
19944 2018-04-10 Kelvin Nilsen <kelvin@gcc.gnu.org>
19946 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
19947 erroneous entries for
19948 "vector int vec_ldl (int, long int *)", and
19949 "vector unsigned int vec_ldl (int, unsigned long int *)".
19950 Add comments and entries for
19951 "vector bool char vec_ldl (int, bool char *)",
19952 "vector bool short vec_ldl (int, bool short *)",
19953 "vector bool int vec_ldl (int, bool int *)",
19954 "vector bool long long vec_ldl (int, bool long long *)",
19955 "vector pixel vec_ldl (int, pixel *)",
19956 "vector long long vec_ldl (int, long long *)",
19957 "vector unsigned long long vec_ldl (int, unsigned long long *)".
19958 * config/rs6000/rs6000.c (rs6000_init_builtins): Initialize new
19959 type tree bool_long_long_type_node and correct definition of
19960 bool_V2DI_type_node to make reference to this new type tree.
19961 (rs6000_mangle_type): Replace erroneous reference to
19962 bool_long_type_node with bool_long_long_type_node.
19963 * config/rs6000/rs6000.h (enum rs6000_builtin_type_index): Add
19964 comments to emphasize sign distinctions for char and int types and
19965 replace RS6000_BTI_bool_long constant with
19966 RS6000_BTI_bool_long_long constant. Also add comment to restrict
19967 use of RS6000_BTI_pixel.
19968 (bool_long_type_node): Remove this macro definition.
19969 (bool_long_long_type_node): New macro definition
19971 2018-04-10 Jakub Jelinek <jakub@redhat.com>
19973 PR rtl-optimization/85300
19974 * combine.c (subst): Handle subst of CONST_SCALAR_INT_P new_rtx also
19975 into FLOAT and UNSIGNED_FLOAT like ZERO_EXTEND, return a CLOBBER if
19976 simplify_unary_operation fails.
19978 2018-04-10 Martin Liska <mliska@suse.cz>
19980 * gdbhooks.py: Add pretty-printers for varpool_node, symtab_node,
19981 cgraph_edge and ipa_ref.
19983 2018-04-10 Jakub Jelinek <jakub@redhat.com>
19987 * config/i386/sse.md
19988 (<extract_type>_vinsert<shuffletype><extract_suf>_mask): Fix
19989 computation of the VEC_MERGE selector from mask.
19990 (<extract_type>_vinsert<shuffletype><extract_suf>_1<mask_name>):
19991 Fix decoding of the VEC_MERGE selector into mask.
19993 2018-04-10 Richard Sandiford <richard.sandiford@linaro.org>
19995 PR tree-optimization/85286
19996 * tree-vect-data-refs.c (vect_get_smallest_scalar_type):
19998 2018-04-10 Richard Sandiford <richard.sandiford@linaro.org>
20000 * final.c (final_1): Set insn_last_address as well as
20001 insn_current_address.
20003 2018-04-10 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
20006 * explow.c (emit_stack_probe): Call validize_mem on memory location
20007 before passing it to gen_probe_stack. Create address operand and
20008 legitimize it for the probe_stack_address case.
20010 2018-04-09 Jan Hubicka <jh@suse.cz>
20013 * ipa-devirt.c (rebuild_type_inheritance-hash): New.
20014 * ipa-utils.h (rebuild_type_inheritance-hash): Declare.
20015 * tree.c (free_lang_data_in_type): Fix handling of binfos;
20017 (free_lang_data): Rebuild type inheritance graph.
20019 2018-04-09 Martin Sebor <msebor@redhat.com>
20021 * invoke.texi (-finline-small-functions): Mention other optimization
20023 (-findirect-inlining, -fpartial-inlining): Same.
20024 (-finline-functions-called-once): Same.
20025 (-freorder-blocks-and-partition): Same.
20027 2018-04-09 Jan Hubicka <jh@suse.cz>
20030 * cfgcleanup.c (try_forward_edges): Do not give up on crossing
20031 jumps; choose last target that matches the criteria (i.e.
20032 no partition changes for non-crossing jumps).
20033 * cfgrtl.c (cfg_layout_redirect_edge_and_branch): Add basic
20034 support for redirecting crossing jumps to non-crossing.
20036 2018-04-09 Alexey Brodkin <abrodkin@synopsys.com>
20038 * config/arc/arc.c (arc_expand_prologue): Set stack usage info
20039 also for naked functions.
20041 2018-04-09 Claudiu Zissulescu <claziss@synopsys.com>
20043 * config/arc/arc.md (add_shift): New pattern.
20044 (add_shift2): Likewise.
20045 (sub_shift): Likewise.
20046 (sub_shift_cmp0_noout): Likewise.
20047 (compare_si_ashiftsi): Likewise.
20048 (xbfu_cmp0_noout): New combine pattern.
20049 (xbfu_cmp0"): Likewise.
20050 (movsi_set_cc_insn): Place the predicable variant first.
20051 (commutative_binary_cmp0_noout): Remove clobber.
20052 (commutative_binary_cmp0): New pattern.
20053 (noncommutative_binary_cmp0): Likewise.
20054 (noncommutative_binary_cmp0_noout): Likewise.
20055 (noncommutative_binary_comparison_result_used): Removed.
20056 (rsub_cmp0): New pattern.
20057 (rsub_cmp0_noout): Likewise.
20058 (extzvsi): Changed, keep only meaningful variants.
20059 (SQH, SEZ): New iterators.
20060 (SQH_postfix): New mode attribute.
20061 (SEZ_prefix): New code attribute.
20062 (<SEZ_prefix>xt<SQH_postfix>_cmp0_noout): New instruction pattern.
20063 (<SEZ_prefix>xt<SQH_postfix>_cmp0): Likewise.
20064 * config/arc/predicates.md (cc_set_register): Use CC_REG instead
20065 of numerical value.
20066 (noncommutative_operator): Check the availability of barrel
20069 2018-04-09 Richard Biener <rguenther@suse.de>
20071 PR tree-optimization/85284
20072 * tree-ssa-loop-niter.c (number_of_iterations_exit_assumptions):
20073 Only use the niter constraining form of simple_iv when the exit
20074 is always executed.
20076 2018-04-09 Tom de Vries <tom@codesourcery.com>
20079 * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
20080 (define_expand "*memory_barrier"): New define_expand.
20081 (define_insn "memory_barrier"): New insn.
20083 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
20085 PR rtl-optimization/80463
20086 PR rtl-optimization/83972
20087 PR rtl-optimization/83480
20089 * sel-sched-ir.c (has_dependence_note_mem_dep): Take into account the
20090 correct producer for the insn.
20091 (tidy_control_flow): Fixup seqnos in case of debug insns.
20093 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
20095 PR rtl-optimization/83913
20097 * sel-sched-ir.c (merge_expr_data): Choose the middle between two
20098 different sched-times when merging exprs.
20100 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
20102 PR rtl-optimization/83962
20104 * sel-sched-ir.c (tidy_control_flow): Correct the order in which we call
20105 tidy_fallthru_edge and tidy_control_flow.
20107 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
20109 PR rtl-optimization/83530
20111 * sel-sched.c (force_next_insn): New global variable.
20112 (remove_insn_for_debug): When force_next_insn is true, also leave only
20113 next insn in the ready list.
20114 (sel_sched_region): When the region wasn't scheduled, make another pass
20115 over it with force_next_insn set to 1.
20117 2018-04-08 Monk Chiang <sh.chiang04@gmail.com>
20119 * config.gcc (nds32le-*-*, nds32be-*-*): Add nds32/nds32_intrinsic.h
20121 * config/nds32/constants.md (unspec_volatile_element): Add enum values
20122 for interrupt control.
20123 * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
20124 functions for interrupt control.
20125 * config/nds32/nds32-intrinsic.md: Likewise.
20126 * config/nds32/nds32_intrinsic.h: Likewise.
20127 * config/nds32/nds32.h (nds32_builtins): Likewise.
20129 2018-04-08 Chung-Ju Wu <jasonwucj@gmail.com>
20131 * config/nds32/nds32.c (nds32_init_machine_status,
20132 nds32_legitimate_index_p, nds32_legitimate_address_p): Consider
20133 strict_aligned_p field.
20134 (nds32_expand_to_rtl_hook): New function.
20135 (TARGET_EXPAND_TO_RTL_HOOK): Define.
20136 * config/nds32/nds32.h (machine_function): Add strict_aligned_p field.
20138 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
20139 Chung-Ju Wu <jasonwucj@gmail.com>
20141 * config.gcc (nds32*-*-*): Check that n7 is valid to --with-cpu.
20142 * config/nds32/nds32-n7.md: New file.
20143 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N7.
20144 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n7
20146 * config/nds32/nds32-protos.h: More declarations for n7 pipeline.
20147 * config/nds32/nds32.md (pipeline_model): Add n7.
20148 * config/nds32/nds32.opt (mcpu): Support n7 pipeline cpus.
20149 * config/nds32/pipelines.md: Include n7 settings.
20151 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
20152 Chung-Ju Wu <jasonwucj@gmail.com>
20154 * config.gcc (nds32*-*-*): Check that e8 is valid to --with-cpu.
20155 * config/nds32/nds32-e8.md: New file.
20156 * config/nds32/nds32-opts.h (nds32-cpu_type): Add CPU_E8.
20157 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for e8
20159 * config/nds32/nds32-protos.h: More declarations for e8 pipeline.
20160 * config/nds32/nds32.md (pipeline_model): Add e8.
20161 * config/nds32/nds32.opt (mcpu): Support e8 pipeline cpus.
20162 * config/nds32/pipelines.md: Include e8 settings.
20164 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
20165 Chung-Ju Wu <jasonwucj@gmail.com>
20167 * config.gcc (nds32*-*-*): Check that n6/n8/s8 are valid to --with-cpu.
20168 * config/nds32/nds32-n8.md: New file.
20169 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N6 and CPU_N8.
20170 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n8
20172 * config/nds32/nds32-protos.h: More declarations for n8 pipeline.
20173 * config/nds32/nds32-utils.c: More implementations for n8 pipeline.
20174 * config/nds32/nds32.md (pipeline_model): Add n8.
20175 * config/nds32/nds32.opt (mcpu): Support n8 pipeline cpus.
20176 * config/nds32/pipelines.md: Include n8 settings.
20178 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
20179 Chung-Ju Wu <jasonwucj@gmail.com>
20181 * config.gcc (nds32*): Add nds32-utils.o into extra_objs.
20182 * config/nds32/nds32-n9-2r1w.md: New file.
20183 * config/nds32/nds32-n9-3r2w.md: New file.
20184 * config/nds32/nds32-opts.h (nds32_cpu_type, nds32_mul_type,
20185 nds32_register_ports): New or modify for cpu n9.
20186 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n9
20188 * config/nds32/nds32-protos.h: More declarations for n9 pipeline.
20189 * config/nds32/nds32-utils.c: New file.
20190 * config/nds32/nds32.h (TARGET_PIPELINE_N9, TARGET_PIPELINE_SIMPLE,
20191 TARGET_MUL_SLOW): Define.
20192 * config/nds32/nds32.md (pipeline_model): New attribute.
20193 * config/nds32/nds32.opt (mcpu, mconfig-mul, mconfig-register-ports):
20194 New options that support cpu n9.
20195 * config/nds32/pipelines.md: Include n9 settings.
20196 * config/nds32/t-nds32 (nds32-utils.o): Add dependency.
20198 2018-04-08 Chung-Ju Wu <jasonwucj@gmail.com>
20200 * config/nds32/nds32-md-auxiliary.c (output_cond_branch): Output align
20201 information if necessary.
20202 (output_cond_branch_compare_zero): Likewise.
20203 * config/nds32/nds32.c (nds32_adjust_insn_length): Consider align case.
20204 (nds32_target_alignment): Refine for alignment.
20205 * config/nds32/nds32.h (NDS32_ALIGN_P): Define.
20206 (FUNCTION_BOUNDARY): Modify.
20207 * config/nds32/nds32.md (call_internal, call_value_internal): Consider
20209 * config/nds32/nds32.opt (malways-align, malign-functions): New.
20211 2018-04-08 Monk Chiang <sh.chiang04@gmail.com>
20213 * config/nds32/constants.md (unspec_volatile_element): Add values for
20214 TLB operation and data prefetch.
20215 * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
20216 functions for TLB operation and data prefetch.
20217 * config/nds32/nds32-intrinsic.md: Likewise.
20218 * config/nds32/nds32_intrinsic.h: Likewise.
20219 * config/nds32/nds32.c (nds32_dpref_names): Likewise.
20220 (nds32_print_operand): Likewise.
20221 * config/nds32/nds32.h (nds32_builtins): Likewise.
20223 2018-04-07 Thomas Koenig <tkoenig@gcc.gnu.org>
20224 Andrew Pinski <pinsika@gcc.gnu.org>
20226 PR middle-end/82976
20227 * match.pd: Use constant_boolean_node of correct type instead of
20228 boolean_true_node or boolean_false_node for simplifying
20229 pointer comparisons to zero.
20231 2018-04-07 Jakub Jelinek <jakub@redhat.com>
20233 PR tree-optimization/80021
20234 * tree.c (verify_type_variant): Make error call in verify_variant_match
20235 translatable and remove final full stop.
20237 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
20239 * config/nds32/constants.md (unspec_volatile_element): Add
20240 UNSPEC_VOLATILE_EH_RETURN.
20241 * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push,
20242 nds32_output_stack_pop): Support dwarf exception handling process.
20243 * config/nds32/nds32-protos.h (nds32_dynamic_chain_address): Declare.
20244 * config/nds32/nds32.c (nds32_init_machine_status): Support dwarf
20245 exception handling process.
20246 (nds32_compute_stack_frame): Likewise.
20247 (nds32_return_addr_rtx): Likewise.
20248 (nds32_initial_elimination_offset): Likewise.
20249 (nds32_expand_prologue): Likewise.
20250 (nds32_expand_epilogue): Likewise.
20251 (nds32_dynamic_chain_address): New function.
20252 * config/nds32/nds32.h (machine_function): Add fields for dwarf
20253 exception handling.
20254 (DYNAMIC_CHAIN_ADDRESS): Define.
20255 (EH_RETURN_DATA_REGNO): Define.
20256 (EH_RETURN_STACKADJ_RTX): Define.
20257 * config/nds32/nds32.md (eh_return, nds32_eh_return): Implement
20258 patterns for dwarf exception handling.
20260 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
20262 * config/nds32/nds32.h: Clean up obsolete macros.
20264 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
20266 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
20267 Add enum values for particular instructions.
20268 * config/nds32/nds32-intrinsic.c: Implementation of expanding
20269 particular intrinsic functions.
20270 * config/nds32/nds32-intrinsic.md: Likewise.
20271 * config/nds32/nds32_intrinsic.h: Likewise.
20272 * config/nds32/nds32.h (nds32_builtins): Likewise.
20273 * config/nds32/nds32.md (type): Add pbsad and pbsada.
20274 (btst, ave): New patterns for particular instructions.
20276 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
20278 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
20279 Add enum values for atomic load/store and memory sync.
20280 * config/nds32/nds32-intrinsic.c: Implementation for atomic load/store
20282 * config/nds32/nds32-intrinsic.md: Likewise.
20283 * config/nds32/nds32_intrinsic.h: Likewise.
20284 * config/nds32/nds32.h (nds32_builtins): Likewise.
20286 2018-04-07 Jakub Jelinek <jakub@redhat.com>
20288 PR tree-optimization/85257
20289 * fold-const.c (native_encode_vector): If not all elts could fit
20290 and off is -1, return 0 rather than offset.
20291 * tree-ssa-sccvn.c (vn_reference_lookup_3): Pass
20292 (offseti - offset2) / BITS_PER_UNIT as 4th argument to
20293 native_encode_expr. Verify len * BITS_PER_UNIT >= maxsizei. Don't
20294 adjust buffer in native_interpret_expr call.
20296 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
20298 * config/nds32/constants.md (unspec_volatile_element): Add cache
20299 control enum values.
20300 * config/nds32/nds32-intrinsic.c: Add cache control expand functions.
20301 * config/nds32/nds32-intrinsic.md: Add cache control patterns.
20302 * config/nds32/nds32.c (nds32_cctl_names): New.
20303 (nds32_print_operand): Handle cache control register names.
20304 * config/nds32/nds32.h (nds32_builtins): New enum values.
20305 * config/nds32/nds32_intrinsic.h: Add cache control enum types and
20307 * config/nds32/nds32.md (type): Add mmu.
20308 * config/nds32/pipelines.md (simple_insn): Add mmu.
20310 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
20312 * config/nds32/nds32.md (type): Remove call.
20313 * config/nds32/pipelines.md (simple_insn): Likewise.
20315 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
20317 * config/nds32/constants.md (unspec_volatile_element): Add
20318 UNSPEC_VOLATILE_FMFCSR, UNSPEC_VOLATILE_FMTCSR and
20319 UNSPEC_VOLATILE_FMFCFG.
20320 * config/nds32/nds32-intrinsic.c (bdesc_noarg): New builtin
20321 description for fmfcfg and fmfcsr.
20322 (bdesc_1arg): Add fmtcsr.
20323 (bdesc_2arg): Add fcpynss, fcpyss, fcpynsd and fcpysd.
20324 (nds32_expand_builtin_impl): Deal with FPU intrinsic functions.
20325 * config/nds32/nds32-intrinsic.md (unspec_fcpynsd, unspec_fcpysd,
20326 unspec_fcpynss, unspec_fcpysd, unspec_fcpyss, unspec_fmfcsr,
20327 unspec_fmfcfg): New patterns.
20328 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FMFCFG,
20329 NDS32_BUILTIN_FMFCSR, NDS32_BUILTIN_FMTCSR, NDS32_BUILTIN_FCPYNSS,
20330 NDS32_BUILTIN_FCPYSS,NDS32_BUILTIN_FCPYNSD and NDS32_BUILTIN_FCPYSD.
20331 * config/nds32/nds32_intrinsic.h (__nds32__fcpynsd, __nds32__fcpynss,
20332 __nds32__fcpysd, __nds32__fcpyss, __nds32__fmfcsr, __nds32__fmtcsr,
20333 __nds32__fmfcfg): Define.
20335 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
20337 * config/nds32/nds32.c (nds32_intrinsic_register_names): Add more
20338 intrinsic register names.
20339 * config/nds32/nds32_intrinsic.h (nds32_intrinsic_registers): Add more
20340 intrinsic register enum values and macros.
20342 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
20344 * config/nds32/nds32.c (nds32_legitimate_index_p): Modify condition
20345 for load/store addressing form.
20346 (nds32_print_operand_address): Likewise.
20348 2018-04-06 Eric Botcazou <ebotcazou@adacore.com>
20351 * config/sparc/sparc.c (sparc_expand_move): Deal with symbolic operands
20352 based on LABEL_REF. Remove useless assertion.
20353 (pic_address_needs_scratch): Fix formatting.
20354 (sparc_legitimize_pic_address): Minor tweaks.
20355 (sparc_delegitimize_address): Adjust assertion accordingly.
20356 * config/sparc/sparc.md (movsi_pic_label_ref): Change label_ref_operand
20357 into symbolic_operand.
20358 (movsi_high_pic_label_ref): Likewise.
20359 (movsi_lo_sum_pic_label_ref): Likewise.
20360 (movdi_pic_label_ref): Likewise.
20361 (movdi_high_pic_label_ref): Likewise.
20362 (movdi_lo_sum_pic_label_ref): Likewise.
20364 2018-04-06 Amaan Cheval <amaan.cheval@gmail.com>
20366 * config.gcc (x86_64-*-rtems*): Add rtems.h to tm_file for
20367 custom LIB_SPEC setup.
20369 2018-04-06 Ruslan Bukin <br@bsdpad.com>
20370 Kito Cheng <kito.cheng@gmail.com>
20372 * config.gcc (riscv*-*-freebsd*): Add RISC-V FreeBSD support.
20373 * config/riscv/freebsd.h: New.
20375 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
20377 * config/nds32/nds32.c (nds32_adjust_insn_length): Refine.
20378 * config/nds32/nds32.h (ADJUST_INSN_LENGTH): Change the location in
20381 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
20382 Kito Cheng <kito.cheng@gmail.com>
20384 * config/nds32/nds32-md-auxiliary.c (nds32_output_return,
20385 nds32_output_call, nds32_symbol_binds_local_p): New functions.
20386 * config/nds32/nds32-protos.h (nds32_output_call,
20387 nds32_output_return): Declare.
20388 * config/nds32/nds32.md: Refine all the call and return patterns.
20390 2018-04-06 Jakub Jelinek <jakub@redhat.com>
20393 * dwarf2out.c (rtl_for_decl_init): For STRING_CST initializer only
20394 build CONST_STRING if TYPE_MAX_VALUE is non-NULL and is INTEGER_CST.
20396 PR rtl-optimization/84872
20397 * cfgloopmanip.c (create_preheader): Use make_forwarder_block even if
20398 nentry == 1 when CP_FALLTHRU_PREHEADERS and single_entry is
20399 EDGE_CROSSING edge.
20401 2018-04-06 Tamar Christina <tamar.christina@arm.com>
20403 * expr.c (copy_blkmode_to_reg): Revert 254862.
20404 * doc/sourcebuild.texi (word_mode_no_slow_unalign): Likewise.
20406 2018-04-06 Richard Biener <rguenther@suse.de>
20408 PR middle-end/85244
20409 * tree-dfa.c (get_ref_base_and_extent): Reset seen_variable_array_ref
20410 after seeing a component reference with an adjacent field. Treat
20411 refs to arrays at struct end of external decls similar to
20412 refs to unconstrained commons.
20414 2018-04-06 Jakub Jelinek <jakub@redhat.com>
20417 * fold-const.c (twoval_comparison_p): Remove SAVE_P argument and don't
20418 look through SAVE_EXPRs with non-side-effects argument. Adjust
20420 (fold_comparison): Adjust twoval_comparison_p caller, don't handle
20423 2018-04-06 Richard Biener <rguenther@suse.de>
20425 PR middle-end/85180
20426 * alias.c (find_base_term): New wrapper around find_base_term
20427 unwinding CSELIB_VAL_PTR changes.
20428 (find_base_term): Do not restore CSELIB_VAL_PTR during the
20431 2018-04-06 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
20433 * config/s390/s390.c (s390_z10_optimize_cmp): Expand dedicated NOP
20435 * config/s390/s390.md (UNSPECV_NOP_LR_0, UNSPECV_NOP_LR_1): New
20436 constant definitions.
20437 ("nop"): lr 0,0 -> nopr r0
20438 ("nop_lr0", "nop_lr1"): New insn definitions.
20440 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
20442 * config/nds32/nds32.md (*stack_push, *stack_pop): Use
20443 NDS32_V3PUSH_AVAILABLE_P macro.
20445 2018-04-06 Monk Chiang <sh.chiang04@gmail.com>
20446 Chung-Ju Wu <jasonwucj@gmail.com>
20448 * config.gcc (nds32*-*-*): Add v2j v3f v3s checking.
20449 (nds32*-*-*): Add float and fpu_config into supported_defaults.
20450 * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS):
20451 Include TARGET_DEFAULT_FPU_ISA and TARGET_DEFAULT_FPU_FMA.
20452 * config/nds32/constants.md (unspec_element): Add UNSPEC_COPYSIGN,
20453 UNSPEC_FCPYNSD, UNSPEC_FCPYNSS, UNSPEC_FCPYSD and UNSPEC_FCPYSS.
20454 * config/nds32/constraints.md: New constraints and checking for hard
20455 float configuration.
20456 * config/nds32/iterators.md: New mode iterator and attribute for hard
20457 float configuration.
20458 * config/nds32/nds32-doubleword.md: Use hard float alternatives and
20460 * config/nds32/nds32-fpu.md: New file.
20461 * config/nds32/nds32-md-auxiliary.c: New functions and checkings to
20462 deal with hard float code generation.
20463 * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3F and
20465 (abi_type, float_reg_number): New enum type.
20466 * config/nds32/nds32-predicates.c: New predicates for hard float.
20467 * config/nds32/nds32-protos.h: Declare functions for hard float.
20468 * config/nds32/nds32.c: Implementation for hard float configuration.
20469 * config/nds32/nds32.h: Definitions for hard float configuration.
20470 * config/nds32/nds32.md: Include hard float machine description and
20471 modify patterns for hard float configuration.
20472 * config/nds32/nds32.opt: New options for hard float configuration.
20473 * config/nds32/predicates.md: New predicates for hard float
20476 2018-04-06 Kuan-Lin Chen <kuanlinchentw@gmail.com>
20478 * common/config/nds32/nds32-common.c
20479 (nds32_option_optimization_table): Enable -mreleax-hint by default.
20481 2018-04-05 Jakub Jelinek <jakub@redhat.com>
20483 PR middle-end/85195
20484 * match.pd (BIT_FIELD_REF CONSTRUCTOR@0 @1 @2): Use view_convert around
20485 CONSTRUCTOR_ELT (ctor, ...)->value.
20487 2018-04-05 Uros Bizjak <ubizjak@gmail.com>
20490 * config/i386/i386.md (define_attr "memory"): Handle rotate1 type.
20492 2018-04-05 Tom de Vries <tom@codesourcery.com>
20495 * config/nvptx/nvptx.c (nvptx_single): Fix neutering of bb with only
20498 2018-04-05 Shiva Chen <shiva0217@gmail.com>
20499 Kito Cheng <kito.cheng@gmail.com>
20501 * config/nds32/constraints.md (U33): Fine-tune checking condition.
20502 * config/nds32/nds32-md-auxiliary.c (nds32_mem_format): Ditto.
20503 * config/nds32/nds32.h (nds32_16bit_address_type): Add
20504 ADDRESS_POST_MODIFY_LO_REG_IMM3U.
20506 2018-04-05 Shiva Chen <shiva0217@gmail.com>
20507 Kito Cheng <kito.cheng@gmail.com>
20509 * config/nds32/constraints.md (Ufe): New memory constraint.
20510 * config/nds32/nds32-md-auxiliary.c (nds32_mem_format,
20511 nds32_output_16bit_load): Consider r8 register for lwi45.fe format.
20512 * config/nds32/nds32.c (nds32_print_operand): Output lwi45.fe
20514 * config/nds32/nds32.h (nds32_16bit_address_type): Add ADDRESS_R8_IMM7U.
20515 * config/nds32/nds32.md (*mov<mode>): Adjust pattern.
20517 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
20519 * config/nds32/nds32.md: Use optimize_size in the condition for
20520 alu-shift instructions.
20522 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
20524 * config/nds32/nds32.md (divsi4, udivsi4): New patterns.
20526 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
20528 * config/nds32/nds32.md (negsi2): Refine pattern.
20530 2018-04-05 Kito Cheng <kito.cheng@gmail.com>
20531 Chung-Ju Wu <jasonwucj@gmail.com>
20533 * config/nds32/iterators.md (shift_rotate): New code iterator.
20534 (shift): New code attribute.
20535 * config/nds32/nds32-md-auxiliary.c (nds32_expand_constant): New.
20536 * config/nds32/nds32-protos.h (nds32_expand_constant): Declare.
20537 * config/nds32/nds32.c (nds32_print_operand): Deal with more cases.
20538 * config/nds32/nds32.md (addsi3, *add_srli): Refine implementation for
20539 bit-wise operations.
20540 (andsi3, *andsi3): Ditto.
20541 (iorsi3, *iorsi3, *or_slli, *or_srli): Ditto.
20542 (xorsi3, *xorsi3, *xor_slli, *xor_srli): Ditto.
20543 (<shift>si3, *ashlsi3, *ashrsi3, *lshrsi3, *rotrsi3): Ditto.
20544 * config/nds32/predicates.md (nds32_rimm5u_operand, nds32_and_operand,
20545 nds32_ior_operand, nds32_xor_operand): New predicates.
20547 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
20549 * config/nds32/nds32.md (add<mode>3, sub<mode>3): Rename to ...
20550 (addsi3, subsi3): ... this.
20552 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
20554 * config/nds32/nds32.md (*sub_srli, *and_slli): Fine-tune predicator.
20556 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
20558 * config/nds32/nds32.md: Adjust indention.
20560 2018-04-05 Kito Cheng <kito.cheng@gmail.com>
20562 * config/nds32/nds32.md (feature): New attribute.
20564 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
20566 * config/nds32/nds32.md (subtype): New attribute.
20568 2018-04-04 Thomas Preud'homme <thomas.preudhomme@arm.com>
20571 * config/arm/arm-builtins.c (arm_expand_builtin): Change
20572 expansion to perform a bitwise AND of the argument followed by a
20573 boolean negation of the result.
20575 2018-04-04 Peter Bergner <bergner@vnet.ibm.com>
20577 PR rtl-optimization/84878
20578 * ddg.c (add_cross_iteration_register_deps): Use DF_REF_BB to determine
20579 the basic block. Assert the use reference is not artificial and that
20580 it has an associated insn.
20582 2018-04-04 Michael Matz <matz@suse.de>
20584 * builtins.c (compute_objsize): Pass correct operand
20585 to array_at_struct_end_p.
20587 2018-04-04 Richard Biener <rguenther@suse.de>
20590 * dwarf2out.c (dwarf2out_register_external_die): Peel namespaces
20591 from contexts for DINFO_LEVEL_TERSE and below.
20593 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
20595 * config/nds32/nds32-doubleword.md (move_<mode>): Require
20596 resiter_operand condition.
20597 * config/nds32/nds32.md (*move<mode>): Ditto.
20599 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
20600 Monk Chiang <sh.chiang04@gmail.com>
20602 * config/nds32/nds32.md (movmisalign<mode>): New pattern.
20604 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
20606 * config/nds32/nds32.md (movqi, movhi): Merge into mov<mode>.
20608 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
20609 Kito Cheng <kito.cheng@gmail.com>
20611 * config/nds32/nds32-md-auxiliary.c (nds32_inverse_cond_code,
20612 nds32_cond_code_str, output_cond_branch,
20613 output_cond_branch_compare_zero, 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: New functions.
20619 * config/nds32/nds32-protos.h (nds32_expand_cbranch,
20620 nds32_expand_cstore, nds32_expand_movcc,
20621 nds32_output_cbranchsi4_equality_zero,
20622 nds32_output_cbranchsi4_equality_reg,
20623 nds32_output_cbranchsi4_equality_reg_or_const_int,
20624 nds32_output_cbranchsi4_greater_less_zero): Declare.
20625 * config/nds32/predicates.md (nds32_movecc_comparison_operator,
20626 nds32_rimm11s_operand): New predicates.
20627 * config/nds32/nds32.h (nds32_expand_result_type): New enum type.
20628 * config/nds32/nds32.md: Rewrite all the branch and conditional move
20631 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
20633 * config/nds32/nds32-doubleword.md: Refine all the instruction type.
20634 * config/nds32/nds32.md: Ditto.
20635 * config/nds32/pipelines.md: Ditto.
20637 2018-04-04 Richard Biener <rguenther@suse.de>
20639 PR tree-optimization/85168
20640 * tree-ssa-sccvn.c (vn_reference_maybe_forwprop_address): Avoid
20641 propagating abnormals.
20643 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
20645 * config/nds32/nds32.md (enabled): Use yes/no for this attribute.
20647 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
20648 Kito Cheng <kito.cheng@gmail.com>
20650 * config/nds32/nds32-md-auxiliary.c (nds32_long_call_p): New function.
20651 * config/nds32/nds32-protos.h (nds32_long_call_p): Declare.
20652 * config/nds32/nds32.c (nds32_function_ok_for_sibcall): New function.
20653 (TARGET_FUNCTION_OK_FOR_SIBCALL): Define.
20654 * config/nds32/nds32.md (sibcall_internal): New.
20655 (sibcall_register): Remove.
20656 (sibcall_immediate): Remove.
20657 (sibcall_value_internal): New.
20658 (sibcall_value_register): Remove.
20659 (sibcall_value_immediate): Remove.
20660 * config/nds32/predicates.md (nds32_general_register_operand): New.
20661 (nds32_call_address_operand): New.
20663 2018-04-03 Jakub Jelinek <jakub@redhat.com>
20665 PR rtl-optimization/85167
20666 * shrink-wrap.c (move_insn_for_shrink_wrap): Don't set bb_uses and
20667 bb_defs if *split_p, instead preinitialize it to NULL.
20669 PR tree-optimization/85156
20670 * builtins.c (fold_builtin_expect): Use save_expr on arg1 to avoid
20671 evaluating the argument multiple times.
20673 2018-04-03 Bill Schmidt <wschmidt@linux.ibm.com>
20675 * config/rs6000/emmintrin.h (_mm_cvtpd_epi32): Use __vector rather
20677 (_mm_cvtpd_ps): Likewise.
20678 (_mm_cvttpd_epi32): Likewise.
20679 * config/rs6000/mmintrin.h (_mm_unpacklo_pi8): Likewise.
20680 * config/rs6000/xmmintrin.h: For strict-ANSI C++ or C11, undefine
20681 vector, pixel, and bool following altivec.h include.
20683 2018-04-03 Martin Sebor <msebor@redhat.com>
20685 * doc/extend.texi (Common Function Attributes): Clarify.
20686 (const attribute): Likewise.
20687 (pure attribute): Likewise.
20689 2018-04-03 Jakub Jelinek <jakub@redhat.com>
20692 * config/i386/i386.c (ix86_expand_vector_set): Use
20693 HOST_WIDE_INT_1U << elt instead of 1 << elt. Formatting fix.
20695 2018-04-03 Uros Bizjak <ubizjak@gmail.com>
20697 * config/i386/i386.c (emit_i387_cw_initialization): Always use logic
20698 instructions when changing rounding bits to preserve precision bits
20699 in the x87 control word.
20701 2018-04-03 Martin Liska <mliska@suse.cz>
20703 PR tree-optimization/82491
20704 * rtl.h (strip_offset_and_add): Replace += suboffset with
20705 poly_uint64 () + suboffset.
20707 2018-03-29 Martin Liska <mliska@suse.cz>
20708 Martin Jambor <mjambor@suse.cz>
20711 * ipa-cp.c (propagate_bits_across_jump_function): Bail out if
20712 param_type is not an integral or pointer type.
20714 2018-04-03 Richard Biener <rguenther@suse.de>
20716 * sese.h (recompute_all_dominators): Remove.
20718 2018-04-02 Martin Sebor <msebor@redhat.com>
20720 * doc/invoke.texi (-Wrestrict): Fix typos.
20722 2018-04-02 Jim Wilson <jimw@sifive.com>
20724 * config/riscv/riscv.h (SHIFT_COUNT_TRUNCATED): Set to zero.
20725 * config/riscv/riscv.md (<optab>si3): Use QImode shift count.
20726 (<optab>di3, <optab>si3_extend): Likewise.
20727 (<optab>si3_mask, <optab>si3_mask_1): New.
20728 (<optab>di3_mask, <optab>di3_mask_1): New.
20729 (<optab>si3_extend_mask, <optab>si3_extend_mask_1): New.
20730 (lshrsi3_zero_extend_1): Use VOIDmode shift count.
20731 * config/riscv/sync.md (atomic_test_and_set): Emit QImode shift count.
20733 2018-04-02 Gerald Pfeifer <gerald@pfeifer.com>
20735 * doc/cpp.texi (Variadic Macros): Fix line continuation in an
20738 2018-04-02 Chung-Ju Wu <jasonwucj@gmail.com>
20740 * config/nds32/nds32.c (TARGET_CANONICALIZE_COMPARISON): Define.
20741 (nds32_canonicalize_comparison): New function.
20743 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
20744 Kito Cheng <kito.cheng@gmail.com>
20745 Kuan-Lin Chen <kuanlinchentw@gmail.com>
20747 * config.gcc (nds32): Add nds32-relax-opt.o into extra_objs.
20748 * config/nds32/constants.md (unspec_volatile_element): Add
20749 UNSPEC_VOLATILE_RELAX_GROUP.
20750 * config/nds32/nds32-relax-opt.c: New file.
20751 * config/nds32/nds32-predicates.c
20752 (nds32_symbol_load_store_p): New function.
20753 * config/nds32/nds32-protos.h
20754 (nds32_symbol_load_store_p): Declare function.
20755 (make_pass_nds32_relax_opt): Declare new rtl pass function.
20756 * config/nds32/nds32.c
20757 (nds32_register_pass): New function to register pass.
20758 (nds32_register_passes): New function to register passes.
20759 * config/nds32/nds32.md (relax_group): New pattern.
20760 * config/nds32/nds32.opt (mrelax-hint): New option.
20761 * config/nds32/t-nds32 (nds32-relax-opt.o): New dependency.
20763 2018-04-01 Kito Cheng <kito.cheng@gmail.com>
20765 * config/nds32/t-nds32: Modify files dependency.
20767 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
20769 * config/nds32/nds32.h (FUNCTION_PROFILER): Output newline character.
20770 (PROFILE_HOOK): Define its implementation.
20772 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
20774 * config/nds32/nds32.h (WCHAR_TYPE, WCHAR_TYPE_SIZE): Use unsigned int
20775 type and 32-bit size.
20777 2018-04-01 Jakub Jelinek <jakub@redhat.com>
20779 PR middle-end/85090
20780 * config/i386/sse.md (V): Add V64QI and V32HI for TARGET_AVX512F.
20781 (V_128_256): New mode iterator.
20782 (*avx512dq_vextract<shuffletype>64x2_1 splitter): New define_split.
20783 (*avx512f_vextract<shuffletype>32x4_1 splitter): Likewise.
20784 (xop_pcmov_<mode><avxsizesuffix>): Use V_128_256 mode iterator instead
20786 * config/i386/i386.c (ix86_expand_vector_set): Improve V32HImode and
20787 V64QImode expansion for !TARGET_AVX512BW && TARGET_AVX512F.
20789 2018-03-31 Segher Boessenkool <segher@kernel.crashing.org>
20792 * config/rs6000/xmmintrin.h (_mm_set_ps, _mm_max_ps): Handle (quiet)
20793 NaN inputs correctly.
20795 2018-03-30 Peter Bergner <bergner@vnet.ibm.com>
20798 * config/rs6000/vsx.md (??r): New mode attribute.
20799 (*vsx_mov<mode>_64bit): Use it.
20800 (*vsx_mov<mode>_32bit): Likewise.
20802 2018-03-30 Martin Sebor <msebor@redhat.com>
20804 PR tree-optimization/84818
20805 * builtins.c (check_access): Use warning_n.
20807 2018-03-30 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
20810 * config/rs6000/rs6000-string.c (expand_compare_loop): Fix redundant
20812 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Fix redundant
20815 2018-03-30 Julia Koval <julia.koval@intel.com>
20818 * x86-tune.def (movx, partial_reg_dependency): Enable for
20821 2018-03-29 Vladimir Makarov <vmakarov@redhat.com>
20823 PR inline-asm/84985
20824 * lra-constraints.c (process_alt_operands): Move setting
20825 this_alternative_matches below.
20827 2018-03-29 Martin Liska <mliska@suse.cz>
20830 * doc/invoke.texi: Document how LTO works with debug info.
20831 Describe auto-load support of binutils. Mention 'x86-64'
20832 as valid option value of -march option.
20834 2018-03-29 Jakub Jelinek <jakub@redhat.com>
20836 * config/i386/sse.md (<avx512>_blendm<mode>): Use <sseintprefix>.
20839 * fold-const.c (operand_equal_p): Handle DEBUG_BEGIN_STMT.
20840 For STATEMENT_LIST, pass down OEP_LEXICOGRAPHIC and maybe
20841 OEP_NO_HASH_CHECK for recursive call, to avoid exponential
20844 2018-03-28 Peter Bergner <bergner@vnet.ibm.com>
20847 * config/rs6000/rs6000.h (RS6000_BTM_POWERPC64): New define.
20848 (RS6000_BTM_COMMON): Add RS6000_BTM_POWERPC64.
20849 * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Add support
20850 for RS6000_BTM_POWERPC64.
20851 (rs6000_invalid_builtin): Add handling for RS6000_BTM_POWERPC64
20852 (rs6000_builtin_mask_names): Add RS6000_BTM_POWERPC64.
20853 * config/rs6000/rs6000-builtin.def (BU_P7_POWERPC64_MISC_2): New macro
20856 (DIVDEU): Likewise.
20858 2018-03-28 Carl Love <cel@us.ibm.com>
20861 2017-09-27 Carl Love <cel@us.ibm.com>
20863 * config/rs6000/rs6000-builtin.def (BU_FP_1MISC_1): Add define macro.
20864 (FCTID, FCTIW): Add BU_FP_MISC_1 macro expansion for builtins.
20865 * config/rs6000/rs6000.md (lrintsfsi2): Add define_insn for the
20868 2018-03-28 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
20870 * config/rs6000/xmmintrin.h (_mm_max_pi16): Use __vector __bool
20871 instead of __vector bool.
20872 (_mm_max_pu8): Likewise.
20873 (_mm_min_pi16): Likewise.
20875 2018-03-28 Peter Bergner <bergner@vnet.ibm.com>
20878 * config/rs6000/rs6000-builtin.def (DIVWEO): Delete macro expansion.
20879 (DIVWEUO): Likewise.
20880 (DIVDEO): Likewise.
20881 (DIVDEUO): Likewise.
20882 * config/rs6000/rs6000.c (builtin_function_type): Remove support for
20883 DIVWEUO and DIVDEUO.
20884 * config/rs6000/rs6000.md (UNSPEC_DIVEO, UNSPEC_DIVEUO): Delete unspecs.
20885 (UNSPEC_DIV_EXTEND): Remove deleted unspecs.
20886 (div_extend): Likewise.
20887 * doc/extend.texi (__builtin_divweo): Remove documentation for deleted
20889 (__builtin_divweuo): Likewise.
20890 (__builtin_divdeo): Likewise.
20891 (__builtin_divdeuo): Likewise.
20893 2018-03-28 Jakub Jelinek <jakub@redhat.com>
20896 * config/i386/i386.md (*add<mode>3_carry_0, *addsi3_carry_zext_0,
20897 *sub<mode>3_carry_0, *subsi3_carry_zext_0): New patterns.
20899 PR tree-optimization/82004
20900 * gimple-match-head.c (optimize_pow_to_exp): New function.
20901 * match.pd (pow(C,x) -> exp(log(C)*x)): Wrap with #if GIMPLE.
20902 Don't fold to exp if optimize_pow_to_exp is false.
20904 2018-03-28 Martin Liska <mliska@suse.cz>
20907 * calls.c (initialize_argument_information): Fix trailing space.
20908 * common.opt: Fix typo and provide better explanation for
20909 -fsanitize-coverage option.
20910 * config/i386/i386.opt: Fix typo.
20912 2018-03-28 Jakub Jelinek <jakub@redhat.com>
20913 Martin Liska <mliska@suse.cz>
20916 * gimplify.c (asan_poison_variable): Don't do the check for
20917 gimplify_omp_ctxp here.
20918 (gimplify_decl_expr): Do it here.
20919 (gimplify_target_expr): Likewise.
20921 2018-03-28 Martin Liska <mliska@suse.cz>
20924 * config/i386/i386.c (ix86_function_arg_advance): Do not call
20925 chkp_type_bounds_count if MPX is not enabled.
20927 2018-03-27 Chung-Ju Wu <jasonwucj@gmail.com>
20929 * config/nds32/nds32.h (BRANCH_COST): Adjust cost.
20931 2018-03-27 Michael Meissner <meissner@linux.vnet.ibm.com>
20934 * config/rs6000/rs6000.c (create_complex_muldiv): New helper
20935 function to create the function decl for complex long double
20936 multiply and divide for -mabi=ieeelongdouble.
20937 (init_float128_ieee): Call it.
20939 2018-03-27 H.J. Lu <hongjiu.lu@intel.com>
20942 * config/i386/i386.c (ix86_trampoline_init): Insert ENDBR for
20943 -fcf-protection=branch -mibt.
20944 * config/i386/i386.h (TRAMPOLINE_SIZE): Increased by 4 bytes.
20946 2018-03-27 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
20949 * config/arm/arm.c (arm_valid_symbolic_address): Handle
20950 arm_word_relocations.
20952 2018-03-27 Cesar Philippidis <cesar@codesourcery.com>
20955 * config/nvptx/nvptx.c (nvptx_assemble_decl_begin): Add '[]' to
20956 extern array declarations.
20958 2018-03-27 Richard Biener <rguenther@suse.de>
20960 PR middle-end/84067
20961 * match.pd ((A * C) +- (B * C) -> (A+-B) * C): Guard with
20962 explicit single_use checks.
20964 2018-03-27 Richard Biener <rguenther@suse.de>
20966 PR tree-optimization/85082
20967 * tree-ssa-sccvn.c (vn_reference_lookup_or_insert_for_pieces):
20970 2018-03-27 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
20972 * config.gcc (aarch64*-*-linux*): New TARGET_DEFAULT_ASYNC_UNWIND_TABLES
20973 * common/config/aarch64/aarch64-common.c (aarch64_optimization_table[]):
20974 Turn on fasynchronous-unwind-tables and funwind-tables.
20976 2018-03-26 Uros Bizjak <ubizjak@gmail.com>
20979 * config/i386/i386.md (*bmi_blsr_<mode>_cmp): New insn pattern.
20980 (*bmi_blsr_<mode>_ccz): Ditto.
20982 2018-03-26 Tom de Vries <tom@codesourcery.com>
20984 PR tree-optimization/85063
20985 * omp-general.c (offloading_function_p): New function. Factor out
20987 * omp-offload.c (pass_omp_target_link::gate): ... here.
20988 * omp-general.h (offloading_function_p): Declare.
20989 * tree-switch-conversion.c (build_one_array): Mark CSWTCH.x variable
20990 with attribute omp declare target for offloading functions.
20992 2018-03-24 Richard Sandiford <richard.sandiford@linaro.org>
20994 PR tree-optimization/84005
20995 * tree-data-ref.h (get_base_for_alignment): Declare.
20996 * tree-data-ref.c (get_base_for_alignment_1): New function.
20997 (get_base_for_alignment): Likewise.
20998 * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Use
20999 get_base_for_alignment to find a suitable base object, instead
21000 of always using drb->base_address.
21002 2018-03-23 Jakub Jelinek <jakub@redhat.com>
21004 PR inline-asm/85022
21005 * emit-rtl.c (init_emit_regs): Indicate that VOIDmode MEMs don't have
21006 known size by default.
21008 2018-03-23 Vladimir Makarov <vmakarov@redhat.com>
21010 PR inline-asm/85030
21011 * lra-constraints.c (process_alt_operands): Don't match BLKmode
21012 and non BLKmode operands.
21014 2018-03-23 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
21017 * config/arm/arm.md (unaligned_loadhis): Remove first alternative.
21018 Clean up attributes.
21020 2018-03-23 Richard Biener <rguenther@suse.de>
21023 * dwarf2out.c (rtl_for_decl_location): Do not generate RTL early when
21024 we are going to emit early debug for LTO.
21026 2018-03-23 Jakub Jelinek <jakub@redhat.com>
21028 PR inline-asm/85034
21029 * function.c (match_asm_constraints_1): Don't optimize if input
21030 doesn't satisfy general_operand predicate for output's mode.
21032 PR inline-asm/85022
21033 * alias.c (write_dependence_p): Don't require for x_canonicalized
21034 non-VOIDmode if x has VOIDmode.
21037 * sanopt.c (maybe_optimize_ubsan_ptr_ifn): If DECL_REGISTER (base),
21038 just don't try to optimize it rather than assert it never happens.
21040 2018-03-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
21042 * config/rs6000/rs6000-builtin.def: Remove various BU_ALTIVEC_X
21043 macro expansions for definition of ST_INTERNAL_<mode> and
21044 LD_INTERNAL_<mode> builtins.
21045 * config/rs6000/rs6000-protos.h (rs6000_address_for_altivec):
21047 * config/rs6000/rs6000.c (altivec_expand_ld_builtin): Delete this
21049 (altivec_expand_st_builtin): Likewise.
21050 (altivec_expand_builtin): Remove calls to deleted functions.
21051 (rs6000_address_for_altivec): Delete this function.
21052 * config/rs6000/vector.md: Remove expands for
21053 vector_altivec_load_<mode> and vector_altivec_store_<mode>.
21055 2018-03-22 Sudakshina Das <sudi.das@arm.com>
21058 * config/arm/arm.h (machine_function): Add static_chain_stack_bytes.
21059 * config/arm/arm.c (arm_compute_static_chain_stack_bytes): Avoid
21060 re-computing once computed.
21061 (arm_expand_prologue): Compute machine->static_chain_stack_bytes.
21062 (arm_init_machine_status): Initialize
21063 machine->static_chain_stack_bytes.
21065 2018-03-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
21068 * doc/extend.texi: Add four new prototypes for vec_ld.
21069 * config/rs6000/rs6000-builtin.def (LVX_V1TI): Reorder symbol
21070 definitions for more logical presentation.
21071 * config/rs6000/rs6000-c.c: (altivec_overloaded_builtins): Add
21072 entries for V1TI variants of __builtin_altivec_ld builtin.
21073 * config/rs6000/rs6000.c: (altivec_expand_lv_builtin): Add test and
21074 handling of V1TI variant of LVX icode pattern.
21075 (altivec_expand_builtin): Add case for ALTIVEC_BUILTIN_LVX_V1TI.
21076 (rs6000_gimple_fold_builtin): Likewise.
21077 (altivec_init_builtins): Add code to define
21078 __builtin_altivec_lvx_v1ti function.
21080 2018-03-22 Jakub Jelinek <jakub@redhat.com>
21082 PR inline-asm/84941
21083 * function.c (match_asm_constraints_1): Don't do the optimization
21084 if input isn't a REG, SUBREG, MEM or constant.
21086 2018-03-22 Tom de Vries <tom@codesourcery.com>
21088 PR tree-optimization/84956
21089 * tree-ssa-tail-merge.c (find_clusters_1): Skip bbs with
21090 bb_has_abnormal_pred.
21092 2018-03-22 Jakub Jelinek <jakub@redhat.com>
21095 * dwarf2asm.c (dw2_output_indirect_constant_1): Set
21096 DECL_INITIAL (decl) to decl at the end.
21097 * varasm.c (use_blocks_for_decl_p): Revert the 2018-03-20 change,
21098 adjust the comment.
21100 2018-03-21 Joseph Myers <joseph@codesourcery.com>
21102 * doc/extend.texi (__builtin_tgmath): Document when complex
21103 integer types are treated as _Complex _Float64.
21105 2018-03-21 Tom de Vries <tom@codesourcery.com>
21107 * doc/extend.texi (__builtin_extend_pointer): Remove pasto.
21109 2018-03-21 Jakub Jelinek <jakub@redhat.com>
21111 PR tree-optimization/84960
21112 * tree-cfg.c (remove_bb): Don't move forced labels into bb->prev_bb
21113 if it is ENTRY block, move them into single succ of ENTRY in that case.
21115 2018-03-21 Richard Sandiford <richard.sandiford@linaro.org>
21117 PR tree-optimization/84811
21118 * poly-int.h (poly_span_traits): Remove the T3 parameter and
21119 promote HOST_WIDE_INT T2 - T1 results to unsigned HOST_WIDE_INT.
21120 (maybe_in_range_p, known_in_range_p, ranges_known_overlap_p):
21121 (known_subrange_p): Update accordingly. Cast each value involved
21122 in the size comparison, rather than casting the result of the
21125 2018-03-21 Jakub Jelinek <jakub@redhat.com>
21127 PR tree-optimization/84982
21128 * gimple-ssa-store-merging.c (invert_op): Handle boolean inversion
21129 by flipping the least significant bit rather than all bits from
21130 bitpos to bitpos + bitsize - 1.
21132 2018-03-21 Nathan Sidwell <nathan@acm.org>
21134 * doc/extend.texi (Deprecated Features): Remove mention of
21135 long-deleted deprecations.
21137 2018-03-21 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
21140 * configure.ac (gcc_cv_ld_soname) <*-*-solaris2*>: Set.
21141 * configure: Regenerate.
21143 2018-03-21 Tom de Vries <tom@codesourcery.com>
21145 PR tree-optimization/83126
21146 * tree-parloops.c (num_phis): New function.
21147 (gen_parallel_loop): Detect and handle canonicalize_loop_ivs failure.
21149 2018-03-21 Nathan Sidwell <nathan@acm.org>
21151 * doc/extend.texi (Deprecated Features): Update deprecated flags,
21152 mention anon-struct/union members and trailing attributes.
21154 2018-03-21 Bin Cheng <bin.cheng@arm.com>
21156 PR tree-optimization/84969
21157 * tree-loop-distribution.c (fuse_memset_builtins): Don't reorder
21158 builtin memset partitions if they set different rhs values.
21160 2018-03-21 Jakub Jelinek <jakub@redhat.com>
21162 PR rtl-optimization/84989
21163 * simplify-rtx.c (simplify_unary_operation_1): Don't try to simplify
21164 VEC_DUPLICATE with scalar result mode.
21166 2018-03-21 Martin Liska <mliska@suse.cz>
21169 * ipa-icf.c (sem_item_optimizer::fixup_points_to_sets): Remove
21170 not intended return statement.
21172 2018-03-21 Martin Liska <mliska@suse.cz>
21175 * tree-chkp.c (CHKP_ARRAY_MAX_CHECK_STEPS): Define a new macro.
21176 (chkp_find_bound_slots_1): Limit number of iterations.
21178 2018-03-20 David H. Gutteridge <dhgutteridge@sympatico.ca>
21181 * Minor grammar fixes for x86 options.
21183 2018-03-20 Jakub Jelinek <jakub@redhat.com>
21186 * dce.c (delete_unmarked_insns): Don't remove frame related noop moves
21187 holding REG_CFA_RESTORE notes, instead turn them into a USE.
21189 2018-03-20 Peter Bergner <bergner@vnet.ibm.com>
21192 * config/rs6000/altivec.md (altivec_lvx_<mode>_2op): Delete define_insn.
21193 (altivec_lvx_<mode>_1op): Likewise.
21194 (altivec_stvx_<mode>_2op): Likewise.
21195 (altivec_stvx_<mode>_1op): Likewise.
21196 (altivec_lvx_<VM2:mode>): New define_expand.
21197 (altivec_stvx_<VM2:mode>): Likewise.
21198 (altivec_lvx_<VM2:mode>_2op_<P:mptrsize>): New define_insn.
21199 (altivec_lvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
21200 (altivec_stvx_<VM2:mode>_2op_<P:mptrsize>): Likewise.
21201 (altivec_stvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
21202 * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Use new expanders.
21203 (rs6000_gen_lvx): Likewise.
21204 * config/rs6000/rs6000.c (altivec_expand_lv_builtin): Likewise.
21205 (altivec_expand_stv_builtin): Likewise.
21206 (altivec_expand_builtin): Likewise.
21207 * config/rs6000/vector.md: Likewise.
21209 2018-03-20 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
21212 * config/arm/arm.c (arm_array_mode_supported_p): Return false for
21215 2018-03-20 Richard Biener <rguenther@suse.de>
21218 * config/i386/i386.c (ix86_add_stmt_cost): Only cost
21219 sign-conversions as zero, fall back to standard scalar_stmt
21222 2018-03-20 Martin Liska <mliska@suse.cz>
21225 * predict.c (rebuild_frequencies): Handle case when we have
21226 PROFILE_ABSENT, but flag_guess_branch_prob is false.
21228 2018-03-20 Jakub Jelinek <jakub@redhat.com>
21231 * dwarf2asm.c (dw2_output_indirect_constant_1): Temporarily turn off
21232 flag_section_anchors.
21233 * varasm.c (use_blocks_for_decl_p): Remove hack for
21234 dw2_force_const_mem.
21237 * config/aarch64/aarch64.md (*aarch64_reg_<mode>3_neg_mask2): Rename
21239 (*aarch64_<optab>_reg_<mode>3_neg_mask2): ... this. If pseudos can't
21240 be created, use lowpart_subreg of operands[0] rather than operands[0]
21242 (*aarch64_reg_<mode>3_minus_mask): Rename to ...
21243 (*aarch64_ashl_reg_<mode>3_minus_mask): ... this.
21244 (*aarch64_<optab>_reg_di3_mask2): Use const_int_operand predicate
21245 and n constraint instead of aarch64_shift_imm_di and Usd.
21246 (*aarch64_reg_<optab>_minus<mode>3): Rename to ...
21247 (*aarch64_<optab>_reg_minus<mode>3): ... this.
21249 2018-03-20 Sudakshina Das <sudi.das@arm.com>
21252 * config/arm/neon.md (ashldi3_neon): Update ?s for constraints
21253 to favor GPR over NEON registers.
21254 (<shift>di3_neon): Likewise.
21256 2018-03-20 Tom de Vries <tom@codesourcery.com>
21259 * config/nvptx/nvptx.c (nvptx_single): Don't neuter bar.sync.
21260 (nvptx_process_pars): Emit bar.sync asap and alap.
21262 2018-03-20 Tom de Vries <tom@codesourcery.com>
21265 * config/nvptx/nvptx.c (prevent_branch_around_nothing): Also update
21266 seen_label if seen_label is already set.
21268 2018-03-20 Jakub Jelinek <jakub@redhat.com>
21271 * config/i386/i386.c (fold_builtin_cpu): For features above 31
21272 use __cpu_features2 variable instead of __cpu_model.__cpu_features[0].
21273 Use 1U instead of 1. Formatting fixes.
21276 * builtins.c (fold_builtin_strpbrk): For strpbrk(x, "") use type
21277 instead of TREE_TYPE (s1) for the return value.
21279 2018-03-19 Jakub Jelinek <jakub@redhat.com>
21281 PR tree-optimization/84946
21282 * gimple-ssa-store-merging.c (mem_valid_for_store_merging): Compute
21283 bitsize + bitsize in poly_uint64 rather than poly_int64.
21286 * dwarf2asm.c: Include fold-const.c.
21287 (dw2_output_indirect_constant_1): Set DECL_INITIAL (decl) to ADDR_EXPR
21288 of decl rather than decl itself.
21290 PR rtl-optimization/84643
21291 * memmodel.h (enum memmodel): Add MEMMODEL_MAX enumerator.
21293 2018-03-19 Maxim Ostapenko <m.ostapenko@samsung.com>
21296 * dwarf2asm.c (dw2_output_indirect_constant_1): Disable ASan before
21297 calling assemble_variable.
21299 2018-03-19 Sudakshina Das <sudi.das@arm.com>
21302 * config/aarch64/aarch64-simd.md (vec_cmp<mode><v_int_equiv>): Modify
21303 instructions for UNLT, UNLE, UNGT, UNGE, UNEQ, UNORDERED and ORDERED.
21305 2018-03-19 Jim Wilson <jimw@sifive.com>
21308 * config/riscv/riscv.c (riscv_function_arg_boundary): Use
21309 PREFERRED_STACK_BOUNDARY instead of STACK_BOUNDARY.
21310 (riscv_first_stack_step): Likewise.
21311 (riscv_option_override): Use STACK_BOUNDARY instead of
21312 MIN_STACK_BOUNDARY.
21313 * config/riscv/riscv.h (STACK_BOUNDARY): Renamed from
21314 MIN_STACK_BOUNDARY.
21315 (BIGGEST_ALIGNMENT): Set to 128.
21316 (PREFERRED_STACK_BOUNDARY): Renamed from STACK_BOUNDARY.
21317 (RISCV_STACK_ALIGN): Use PREFERRED_STACK_BOUNDARY instead of
21320 2018-03-19 Richard Biener <rguenther@suse.de>
21322 PR tree-optimization/84933
21323 * tree-vrp.c (set_and_canonicalize_value_range): Treat out-of-bound
21324 values as -INF/INF when canonicalizing an ANTI_RANGE to a RANGE.
21326 2018-03-19 Richard Biener <rguenther@suse.de>
21328 PR tree-optimization/84859
21329 * tree-ssa-phiopt.c (single_trailing_store_in_bb): New function.
21330 (cond_if_else_store_replacement): Perform sinking operation on
21331 single-store BBs regardless of MAX_STORES_TO_SINK setting.
21332 Generalize what a BB with a single eligible store is.
21334 2018-03-19 Richard Biener <rguenther@suse.de>
21336 PR tree-optimization/84929
21337 * tree-data-ref.c (analyze_siv_subscript_cst_affine): Guard
21338 chrec_is_positive against non-chrec arg.
21340 2018-03-19 Tamar Christina <tamar.christina@arm.com>
21343 * config/arm/arm.c (arm_can_change_mode_class): revert r258554.
21345 2018-03-18 Martin Liska <mliska@suse.cz>
21347 PR rtl-optimization/84635
21348 * regrename.c (build_def_use): Use matches_mode only when
21351 2018-03-18 Richard Sandiford <richard.sandiford@linaro.org>
21353 PR tree-optimization/84913
21354 * tree-vect-loop.c (vectorizable_reduction): Don't try to
21355 vectorize chains of COND_EXPRs.
21357 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
21359 * config/nds32/nds32.h (MAX_REGS_PER_ADDRESS): Fix the value.
21361 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
21363 * config/nds32/nds32.h (LOGICAL_OP_NON_SHORT_CIRCUIT): Define.
21365 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
21367 * config/nds32/nds32.h (CLZ_DEFINED_VALUE_AT_ZERO): Define.
21369 2018-03-17 Chung-Ju Wu <jasonwucj@gmail.com>
21370 Kito Cheng <kito.cheng@gmail.com>
21372 * config/nds32/nds32-protos.h (nds32_adjust_reg_alloc_order): Declare.
21373 * config/nds32/nds32.c (nds32_reg_alloc_order_for_speed): New array.
21374 (nds32_adjust_reg_alloc_order): New function.
21375 * config/nds32/nds32.h (ADJUST_REG_ALLOC_ORDER): Define.
21377 2018-03-17 Kito Cheng <kito.cheng@gmail.com>
21379 * config/nds32/nds32.c (nds32_asm_output_mi_thunk,
21380 nds32_print_operand, nds32_print_operand_address): Use
21381 HOST_WIDE_INT_PRINT_DEC instead.
21383 2018-03-17 Chung-Ju Wu <jasonwucj@gmail.com>
21385 * config/nds32/nds32.c (nds32_register_priority): Modify cost.
21387 2018-03-17 Jakub Jelinek <jakub@redhat.com>
21390 * config/i386/i386.c (initial_ix86_tune_features,
21391 initial_ix86_arch_features): Use unsigned HOST_WIDE_INT rather than
21392 unsigned long long.
21393 (set_ix86_tune_features): Change ix86_tune_mask from unsigned int
21394 to unsigned HOST_WIDE_INT, initialize to HOST_WIDE_INT_1U << ix86_tune
21395 rather than 1u << ix86_tune. Formatting fix.
21396 (ix86_option_override_internal): Change ix86_arch_mask from
21397 unsigned int to unsigned HOST_WIDE_INT, initialize to
21398 HOST_WIDE_INT_1U << ix86_arch rather than 1u << ix86_arch.
21399 (ix86_function_specific_restore): Likewise.
21401 2018-03-16 Jakub Jelinek <jakub@redhat.com>
21404 * postreload.c (reload_combine_recognize_pattern): Perform
21405 INTVAL addition in unsigned HOST_WIDE_INT type to avoid UB and
21406 truncate_int_for_mode the result for the destination's mode.
21409 * hsa-gen.c (mem_type_for_type): Fix comment typo.
21410 * tree-vect-loop-manip.c (vect_create_cond_for_niters_checks):
21412 * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
21415 2018-03-16 Vladimir Makarov <vmakarov@redhat.com>
21418 * lra-assigns.c (lra_split_hard_reg_for): Don't use
21419 regno_allocno_class_array and sorted_pseudos.
21420 * lra-constraints.c (spill_hard_reg_in_range): Ignore hard regs in
21421 insns where regno is used.
21423 2018-03-16 Martin Liska <mliska@suse.cz>
21426 * multiple_target.c (create_dispatcher_calls): Redirect
21427 reference in the symbol table.
21429 2018-03-16 Martin Liska <mliska@suse.cz>
21432 * multiple_target.c (create_dispatcher_calls): Redirect also
21435 2018-03-16 Jakub Jelinek <jakub@redhat.com>
21439 * tree.h (TARGET_EXPR_NO_ELIDE): Define.
21440 * gimplify.c (gimplify_modify_expr_rhs): Don't elide TARGET_EXPRs with
21441 TARGET_EXPR_NO_ELIDE flag set unless *expr_p is INIT_EXPR.
21443 2018-03-16 Julia Koval <julia.koval@intel.com>
21445 * doc/invoke.texi (Skylake Server): Add CLWB.
21446 Cannonlake): Remove CLWB.
21448 2018-03-16 Jakub Jelinek <jakub@redhat.com>
21450 PR tree-optimization/84841
21451 * tree-ssa-reassoc.c (INTEGER_CONST_TYPE): Change to 1 << 4 from
21453 (FLOAT_ONE_CONST_TYPE): Define.
21454 (constant_type): Return FLOAT_ONE_CONST_TYPE for -1.0 and 1.0.
21455 (sort_by_operand_rank): Put entries with higher constant_type last
21456 rather than first to match comments.
21458 2018-03-15 Sandra Loosemore <sandra@codesourcery.com>
21460 * config/nios2/nios2.md (movsi_internal): Fix thinko in
21463 2018-03-15 Jakub Jelinek <jakub@redhat.com>
21466 * calls.c (expand_call): For TREE_ADDRESSABLE rettype ignore alignment
21467 check and use address of target always.
21469 2018-03-15 H.J. Lu <hongjiu.lu@intel.com>
21472 * config/i386/i386.c (indirect_thunk_needed): Update comments.
21473 (indirect_thunk_bnd_needed): Likewise.
21474 (indirect_thunks_used): Likewise.
21475 (indirect_thunks_bnd_used): Likewise.
21476 (indirect_return_needed): New.
21477 (indirect_return_bnd_needed): Likewise.
21478 (output_indirect_thunk_function): Add a bool argument for
21480 (output_indirect_thunk_function): Don't generate alias for
21481 function return thunk.
21482 (ix86_code_end): Call output_indirect_thunk_function to generate
21483 function return thunks.
21484 (ix86_output_function_return): Set indirect_return_bnd_needed
21485 and indirect_return_needed instead of indirect_thunk_bnd_needed
21486 and indirect_thunk_needed.
21488 2018-03-15 Olga Makhotina <olga.makhotina@intel.com>
21490 * config/i386/sgxintrin.h (_enclv_u32): New intrinsic.
21491 (__enclv_bc, __enclv_cd, __enclv_generic): New definitions.
21492 (ERDINFO, ETRACKC, ELDBC, ELDUC): New leaves.
21494 2018-03-15 David Malcolm <dmalcolm@redhat.com>
21495 Paul Hua <paul.hua.gm@gmail.com>
21498 * gcc.dg/fixits-pr84852-1.c: Fix filename in dg-regexp.
21500 2018-03-15 Segher Boessenkool <segher@kernel.crashing.org>
21502 * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add back the
21503 TARGET_DOUBLE_FLOAT and TARGET_SINGLE_FLOAT conditions on the DFmode
21504 resp. SFmode cases.
21506 2018-03-15 Tamar Christina <tamar.christina@arm.com>
21509 * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
21510 instead of GET_MODE_SIZE when comparing Units.
21512 2018-03-15 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
21515 * varasm.c (hash_section): Return an unchangeble hash value
21516 * config/aarch64/aarch64.c (aarch64_use_blocks_for_constant_p):
21517 Return !aarch64_can_use_per_function_literal_pools_p ().
21519 2018-03-15 Jakub Jelinek <jakub@redhat.com>
21522 * optabs.c (emit_conditional_move): Pass address of cmode's copy
21523 rather than address of cmode as last argument to prepare_cmp_insn.
21525 2018-03-15 Julia Koval <julia.koval@intel.com>
21527 * config/i386/i386.c (F_AVX512VBMI2, F_GFNI, F_VPCLMULQDQ,
21528 F_AVX512VNNI, F_AVX512BITALG): New.
21530 2018-03-14 John David Anglin <danglin@gcc.gnu.org>
21533 * config/pa/pa.c (pa_emit_move_sequence): Always emit secondary reload
21534 insn for floating-point loads and stores.
21536 2018-03-14 Carl Love <cel@us.ibm.com>
21538 * config/rs6000/rs6000-c.c: Add macro definitions for
21539 ALTIVEC_BUILTIN_VEC_PERMXOR.
21540 * config/rs6000/rs6000.h: Add #define for vec_permxor builtin.
21541 * config/rs6000/rs6000-builtin.def: Add macro expansions for VPERMXOR.
21542 * config/rs6000/altivec.md (altivec_vpermxor): New define expand.
21543 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Add case
21545 * config/doc/extend.texi: Add prototypes for vec_permxor.
21547 2018-03-14 David Malcolm <dmalcolm@redhat.com>
21550 * diagnostic-show-locus.c (class layout_point): Convert m_line
21551 from int to linenum_type.
21552 (line_span::comparator): Use linenum "compare" function when
21553 comparing line numbers.
21554 (test_line_span): New function.
21555 (layout_range::contains_point): Convert param "row" from int to
21557 (layout_range::intersects_line_p): Likewise.
21558 (layout::will_show_line_p): Likewise.
21559 (layout::print_source_line): Likewise.
21560 (layout::should_print_annotation_line_p): Likewise.
21561 (layout::print_annotation_line): Likewise.
21562 (layout::print_leading_fixits): Likewise.
21563 (layout::annotation_line_showed_range_p): Likewise.
21564 (struct line_corrections): Likewise for field m_row.
21565 (line_corrections::line_corrections): Likewise for param "row".
21566 (layout::print_trailing_fixits): Likewise.
21567 (layout::get_state_at_point): Likewise.
21568 (layout::get_x_bound_for_row): Likewise.
21569 (layout::print_line): Likewise.
21570 (diagnostic_show_locus): Likewise for locals "last_line" and "row".
21571 (selftest::diagnostic_show_locus_c_tests): Call test_line_span.
21572 * input.c (selftest::test_linenum_comparisons): New function.
21573 (selftest::input_c_tests): Call it.
21574 * selftest.c (selftest::test_assertions): Test ASSERT_GT,
21575 ASSERT_GT_AT, ASSERT_LT, and ASSERT_LT_AT.
21576 * selftest.h (ASSERT_GT): New macro.
21577 (ASSERT_GT_AT): New macro.
21578 (ASSERT_LT): New macro.
21579 (ASSERT_LT_AT): New macro.
21581 2018-03-14 Segher Boessenkool <segher@kernel.crashing.org>
21583 PR rtl-optimization/84780
21584 * combine.c (distribute_links): Don't make a link based on pc_rtx.
21586 2018-03-14 Martin Liska <mliska@suse.cz>
21588 * tree.c (record_node_allocation_statistics): Use
21589 get_stats_node_kind.
21590 (get_stats_node_kind): New function extracted from
21591 record_node_allocation_statistics.
21592 (free_node): Use get_stats_node_kind.
21594 2018-03-14 Richard Biener <rguenther@suse.de>
21596 * tree-ssa-pre.c (compute_antic_aux): Remove code that asserts
21597 that the value-set of ANTIC_IN doesn't grow.
21600 * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
21602 (BB_VISITED_WITH_VISITED_SUCCS): New define.
21603 (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
21605 2018-03-14 Julia Koval <julia.koval@intel.com>
21607 * config.gcc (icelake-client, icelake-server): New.
21609 * config/i386/i386.c (initial_ix86_tune_features): Extend to 64 bit.
21610 (initial_ix86_arch_features): Ditto.
21611 (PTA_SKYLAKE): Add SGX.
21612 (PTA_ICELAKE): Remove.
21613 (PTA_ICELAKE_CLIENT): New.
21614 (PTA_ICELAKE_SERVER): New.
21615 (ix86_option_override_internal): Split up icelake on icelake client and
21617 (get_builtin_code_for_version): Ditto.
21618 (fold_builtin_cpu): Ditto.
21619 * config/i386/driver-i386.c (config/i386/driver-i386.c): Ditto.
21620 * config/i386/i386-c.c (ix86_target_macros_internal): Ditto
21621 * config/i386/i386.h (processor_type): Ditto.
21622 * doc/invoke.texi: Ditto.
21624 2018-03-14 Jakub Jelinek <jakub@redhat.com>
21627 * sanopt.c (maybe_optimize_ubsan_ptr_ifn): Handle also
21628 INTEGER_CST offset, add it together with bitpos / 8 and
21629 sign extend based on POINTER_SIZE.
21633 2017-04-20 Uros Bizjak <ubizjak@gmail.com>
21636 * config/i386/constraints.md (Yc): New register constraint.
21637 * config/i386/i386.md (*float<SWI48:mode><MODEF:mode>2_mixed):
21638 Use Yc constraint for alternative 2 of operand 0. Remove
21639 preferred_for_speed attribute.
21641 2018-03-14 Richard Biener <rguenther@suse.de>
21643 PR tree-optimization/84830
21644 * tree-ssa-pre.c (compute_antic_aux): Intersect the new ANTIC_IN
21645 with the old one to avoid oscillations.
21647 2018-03-13 Vladimir Makarov <vmakarov@redhat.com>
21650 * lra-assigns.c (find_all_spills_for): Ignore uninteresting
21652 (assign_by_spills): Return a flag of reload assignment failure.
21653 Do not process the reload assignment failures. Do not spill other
21654 reload pseudos if they has the same reg class. Update n if
21656 (lra_assign): Add a return arg. Set up from the result of
21657 assign_by_spills call.
21658 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
21659 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
21660 usage_insns if it is not NULL.
21661 (spill_hard_reg_in_range): New function.
21662 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
21663 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
21664 function prototypes.
21665 (lra_assign): Change prototype.
21666 * lra.c (lra): Add code to deal with fails by splitting hard reg
21669 2018-03-01 Palmer Dabbelt <palmer@sifive.com>
21671 * config/riscv/riscv.opt (mrelax): New option.
21672 * config/riscv/riscv.c (riscv_file_start): Emit ".option
21673 "norelax" when riscv_mrelax is disabled.
21674 * doc/invoke.texi (RISC-V): Document "-mrelax" and "-mno-relax".
21676 2018-03-13 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
21679 * config/rs6000/rs6000.c (rs6000_reassociation_width): Disable parallel
21680 reassociation for int modes.
21682 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
21684 * tree-vect-loop-manip.c (vect_maybe_permute_loop_masks):
21685 Reverse the choice between VEC_UNPACK_LO_EXPR and VEC_UNPACK_HI_EXPR
21687 * config/aarch64/iterators.md (hi_lanes_optab): New int attribute.
21688 * config/aarch64/aarch64-sve.md
21689 (*aarch64_sve_<perm_insn><perm_hilo><mode>): Rename to...
21690 (aarch64_sve_<perm_insn><perm_hilo><mode>): ...this.
21691 (*extend<mode><Vwide>2): Rename to...
21692 (aarch64_sve_extend<mode><Vwide>2): ...this.
21693 (vec_unpack<su>_<perm_hilo>_<mode>): Turn into a define_expand,
21694 renaming the old pattern to...
21695 (aarch64_sve_punpk<perm_hilo>_<mode>): ...this. Only define
21697 (vec_unpack<su>_<perm_hilo>_<SVE_BHSI:mode>): Turn into a
21698 define_expand, renaming the old pattern to...
21699 (aarch64_sve_<su>unpk<perm_hilo>_<SVE_BHSI:mode>): ...this.
21700 (*vec_unpacku_<perm_hilo>_<mode>_no_convert): Delete.
21701 (vec_unpacks_<perm_hilo>_<mode>): Take BYTES_BIG_ENDIAN into
21702 account when deciding which SVE instruction the optab should use.
21703 (vec_unpack<su_optab>_float_<perm_hilo>_vnx4si): Likewise.
21705 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
21707 * config/aarch64/aarch64.md (V4_REGNUM, V8_REGNUM, V12_REGNUM)
21708 (V20_REGNUM, V24_REGNUM, V28_REGNUM, P1_REGNUM, P2_REGNUM, P3_REGNUM)
21709 (P4_REGNUM, P5_REGNUM, P6_REGNUM, P8_REGNUM, P9_REGNUM, P10_REGNUM)
21710 (P11_REGNUM, P12_REGNUM, P13_REGNUM, P14_REGNUM): New define_constants.
21711 (tlsdesc_small_<mode>): Turn a define_expand and use
21712 tlsdesc_small_sve_<mode> for SVE. Rename original define_insn to...
21713 (tlsdesc_small_advsimd_<mode>): ...this.
21714 (tlsdesc_small_sve_<mode>): New pattern.
21716 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
21718 * config/aarch64/iterators.md (UNSPEC_SMUL_HIGHPART)
21719 (UNSPEC_UMUL_HIGHPART): New constants.
21720 (MUL_HIGHPART): New int iteraor.
21721 (su): Handle UNSPEC_SMUL_HIGHPART and UNSPEC_UMUL_HIGHPART.
21722 * config/aarch64/aarch64-sve.md (<su>mul<mode>3_highpart): New
21724 (*<su>mul<mode>3_highpart): New define_insn.
21726 2018-03-13 Eric Botcazou <ebotcazou@adacore.com>
21729 * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
21732 2018-03-13 Martin Liska <mliska@suse.cz>
21735 * (sem_item_optimizer::sem_item_optimizer): Initialize new
21737 (sem_item_optimizer::~sem_item_optimizer): Release it.
21738 (sem_item_optimizer::merge_classes): Register variable aliases.
21739 (sem_item_optimizer::fixup_pt_set): New function.
21740 (sem_item_optimizer::fixup_points_to_sets): Likewise.
21741 * ipa-icf.h: Declare new variables and functions.
21743 2018-03-13 Jakub Jelinek <jakub@redhat.com>
21745 PR middle-end/84834
21746 * match.pd ((A & C) != 0 ? D : 0): Use INTEGER_CST@2 instead of
21747 integer_pow2p@2 and test integer_pow2p in condition.
21748 (A < 0 ? C : 0): Similarly for @1.
21750 PR middle-end/84831
21751 * stmt.c (parse_output_constraint): If the CONSTRAINT_LEN (*p, p)
21752 characters starting at p contain '\0' character, don't look beyond
21756 * config/i386/i386.md (round<mode>2): For 387 fancy math, disable
21757 pattern if -ftrapping-math -fno-fp-int-builtin-inexact.
21760 * reg-stack.c (change_stack): Change update_end var from int to
21761 rtx_insn *, if non-NULL don't update just BB_END (current_block), but
21762 also call set_block_for_insn on the newly added insns and rescan.
21765 * config/i386/sse.md (sse2_loadhpd): Use Yv constraint rather than v
21766 on the last operand.
21769 * tree.c (stabilize_reference_1): Return save_expr (e) for
21770 STATEMENT_LIST even if it doesn't have side-effects.
21772 2018-03-12 Jonathan Wakely <jwakely@redhat.com>
21774 * doc/invoke.texi (-mclflushopt): Fix spelling of option.
21776 2018-03-12 Renlin Li <renlin.li@arm.com>
21778 * config/aarch64/aarch64.md (movhf_aarch64): Fix mode argument to
21779 aarch64_output_scalar_simd_mov_immediate.
21781 2018-03-12 Martin Sebor <msebor@redhat.com>
21783 PR tree-optimization/83456
21784 * gimple-fold.c (gimple_fold_builtin_memory_op): Avoid warning
21785 for perfectly overlapping calls to memcpy.
21786 (gimple_fold_builtin_memory_chk): Same.
21787 (gimple_fold_builtin_strcpy): Handle no-warning.
21788 (gimple_fold_builtin_stxcpy_chk): Same.
21789 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Handle no-warning.
21791 2018-03-12 Segher Boessenkool <segher@kernel.crashing.org>
21793 * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add bool "named"
21794 parameter. Use it for SFmode.
21795 (rs6000_function_arg_advance_1): Adjust.
21796 (rs6000_function_arg): Adjust.
21797 (rs6000_gimplify_va_arg): Pass false for that new parameter.
21799 2018-03-12 Segher Boessenkool <segher@kernel.crashing.org>
21801 PR rtl-optimization/84169
21802 PR rtl-optimization/84780
21803 * combine.c (can_combine_p): Check for a 2-insn combination whether
21804 the destination register is used between the two insns, too.
21806 2018-03-12 Richard Biener <rguenther@suse.de>
21808 PR tree-optimization/84803
21809 * tree-if-conv.c (ifcvt_memrefs_wont_trap): Don't do anything
21810 for refs DR analysis didn't process.
21812 2018-03-12 Richard Biener <rguenther@suse.de>
21814 PR tree-optimization/84777
21815 * tree-ssa-loop-ch.c (should_duplicate_loop_header_p): For
21816 force-vectorize loops ignore whether we are optimizing for size.
21818 2018-03-12 Chung-Ju Wu <jasonwucj@gmail.com>
21820 * config/nds32/nds32.c (nds32_md_asm_adjust): New function.
21821 (TARGET_MD_ASM_ADJUST): Define.
21823 2018-03-12 Monk Chiang <sh.chiang04@gmail.com>
21824 Kito Cheng <kito.cheng@gmail.com>
21825 Chung-Ju Wu <jasonwucj@gmail.com>
21827 * config/nds32/nds32.c (nds32_compute_stack_frame,
21828 nds32_emit_stack_push_multiple, nds32_emit_stack_pop_multiple,
21829 nds32_emit_stack_v3push, nds32_emit_stack_v3pop,
21830 nds32_emit_adjust_frame, nds32_expand_prologue, nds32_expand_epilogue,
21831 nds32_expand_prologue_v3push, nds32_expand_epilogue_v3pop): Refine.
21832 * config/nds32/nds32.h (NDS32_FIRST_CALLEE_SAVE_GPR_REGNUM,
21833 NDS32_LAST_CALLEE_SAVE_GPR_REGNUM, NDS32_V3PUSH_AVAILABLE_P): New.
21834 * config/nds32/nds32.md (prologue, epilogue): Use macro
21835 NDS32_V3PUSH_AVAILABLE_P to do checking.
21837 2018-03-11 Jakub Jelinek <jakub@redhat.com>
21840 * dwarf2out.c (gen_enumeration_type_die): Don't guard adding
21841 DW_AT_declaration for ENUM_IS_OPAQUE on -gdwarf-4 or -gno-strict-dwarf,
21842 but on TYPE_SIZE. Don't do anything for ENUM_IS_OPAQUE if not creating
21843 a new die. Don't set TREE_ASM_WRITTEN if ENUM_IS_OPAQUE. Guard
21844 addition of most attributes on !orig_type_die or the attribute not
21845 being present already. Assert TYPE_VALUES is NULL for ENUM_IS_OPAQUE.
21847 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
21848 Chung-Ju Wu <jasonwucj@gmail.com>
21850 * config/nds32/nds32.c (nds32_cpu_cpp_builtins): Modify to define
21851 __NDS32_VH__ macro.
21852 * config/nds32/nds32.opt (mvh): New option.
21854 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
21855 Chung-Ju Wu <jasonwucj@gmail.com>
21857 * config/nds32/nds32-protos.h (nds32_cpu_cpp_builtins): Declare
21859 * config/nds32/nds32.c (nds32_cpu_cpp_builtins): New function.
21860 * config/nds32/nds32.h (TARGET_CPU_CPP_BUILTINS): Modify its
21863 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
21864 Chung-Ju Wu <jasonwucj@gmail.com>
21866 * config/nds32/nds32-memory-manipulation.c (nds32_expand_strlen): New
21868 * config/nds32/nds32-multiple.md (strlensi): New pattern.
21869 * config/nds32/nds32-protos.h (nds32_expand_strlen): Declare function.
21871 2018-03-11 Monk Chiang <sh.chiang04@gmail.com>
21872 Kito Cheng <kito.cheng@gmail.com>
21873 Chung-Ju Wu <jasonwucj@gmail.com>
21875 * config/nds32/constants.md (unspec_element): Add UNSPEC_FFB,
21876 UNSPEC_FFMISM and UNSPEC_FLMISM.
21877 * config/nds32/nds32-intrinsic.c (bdesc_2arg): Add builtin description
21878 for ffb, ffmism and flmism.
21879 * config/nds32/nds32-intrinsic.md (unspec_ffb): Define new pattern.
21880 (unspec_ffmism): Ditto.
21881 (unspec_flmism): Ditto.
21882 (nds32_expand_builtin_impl): Check if string extension is available.
21883 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FFB,
21884 NDS32_BUILTIN_FFMISM and NDS32_BUILTIN_FLMISM.
21886 2018-03-10 Vladimir Makarov <vmakarov@redhat.com>
21889 2018-03-09 Vladimir Makarov <vmakarov@redhat.com>
21892 * lra-assigns.c (assign_by_spills): Return a flag of reload
21893 assignment failure. Do not process the reload assignment
21894 failures. Do not spill other reload pseudos if they has the same
21896 (lra_assign): Add a return arg. Set up from the result of
21897 assign_by_spills call.
21898 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
21899 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
21900 usage_insns if it is not NULL.
21901 (spill_hard_reg_in_range): New function.
21902 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
21903 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
21904 function prototypes.
21905 (lra_assign): Change prototype.
21906 * lra.c (lra): Add code to deal with fails by splitting hard reg
21909 2018-03-10 H.J. Lu <hongjiu.lu@intel.com>
21912 * config/i386/i386.opt: Replace Enforcment with Enforcement.
21914 2018-03-10 Alexandre Oliva <aoliva@redhat.com>
21917 * dwarf2out.h (dw_val_class): Add dw_val_class_symview.
21918 (dw_val_node): Add val_symbolic_view.
21919 * dwarf2out.c (dw_line_info_table): Add symviews_since_reset.
21920 (symview_upper_bound): New.
21921 (new_line_info_table): Initialize symviews_since_reset.
21922 (dwarf2out_source_line): Count symviews_since_reset and set
21923 symview_upper_bound.
21924 (dw_val_equal_p): Handle symview.
21925 (add_AT_symview): New.
21926 (print_dw_val): Handle symview.
21927 (attr_checksum, attr_checksum_ordered): Likewise.
21928 (same_dw_val_p, size_of_die): Likewise.
21929 (value_format, output_die): Likewise.
21930 (add_high_low_attributes): Use add_AT_symview for entry_view.
21931 (dwarf2out_finish): Reset symview_upper_bound, clear
21934 2018-03-09 Peter Bergner <bergner@vnet.ibm.com>
21937 * config/rs6000/rs6000.c (rs6000_offsettable_memref_p): New prototype.
21938 Add strict argument and use it.
21939 (rs6000_split_multireg_move): Update for new strict argument.
21940 (mem_operand_gpr): Disallow all non-offsettable addresses.
21941 * config/rs6000/rs6000.md (*movdi_internal64): Use YZ constraint.
21943 2018-03-09 Jakub Jelinek <jakub@redhat.com>
21946 * config/rs6000/rs6000.c (rs6000_gimplify_va_arg): Mark va_arg_tmp
21947 temporary TREE_ADDRESSABLE before gimplification of BUILT_IN_MEMCPY.
21948 * config/powerpcspe/powerpcspe.c (rs6000_gimplify_va_arg): Likewise.
21951 * tree-inline.c (copy_tree_body_r): For INDIRECT_REF of a remapped
21952 decl, use remap_type if we want to use the type.
21954 2018-03-09 Martin Sebor <msebor@redhat.com>
21956 PR tree-optimization/84526
21957 * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
21959 (builtin_access::generic_overlap): Be prepared to handle non-array
21962 2018-03-09 Alexandre Oliva <aoliva@redhat.com>
21964 PR rtl-optimization/84682
21965 * lra-constraints.c (process_address_1): Check is_address flag
21966 for address constraints.
21967 (process_alt_operands): Likewise.
21968 * lra.c (lra_set_insn_recog_data): Pass asm operand locs to
21969 preprocess_constraints.
21970 * recog.h (preprocess_constraints): Add oploc parameter.
21972 * recog.c (preprocess_constraints): Test address_operand for
21973 CT_ADDRESS constraints.
21975 2018-03-09 Vladimir Makarov <vmakarov@redhat.com>
21978 * lra-assigns.c (assign_by_spills): Return a flag of reload
21979 assignment failure. Do not process the reload assignment
21980 failures. Do not spill other reload pseudos if they has the same
21982 (lra_assign): Add a return arg. Set up from the result of
21983 assign_by_spills call.
21984 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
21985 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
21986 usage_insns if it is not NULL.
21987 (spill_hard_reg_in_range): New function.
21988 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
21989 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
21990 function prototypes.
21991 (lra_assign): Change prototype.
21992 * lra.c (lra): Add code to deal with fails by splitting hard reg
21995 2018-03-09 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
21998 * common/config/arm/arm-common.c (arm_parse_arch_option_name):
21999 Accept complain bool parameter. Only emit errors if it is true.
22000 (arm_parse_cpu_option_name): Likewise.
22001 (arm_target_thumb_only): Adjust callers of the above.
22002 * config/arm/arm-protos.h (arm_parse_cpu_option_name): Adjust
22003 prototype to take a default true bool parameter.
22004 (arm_parse_arch_option_name): Likewise.
22006 2018-03-09 David Malcolm <dmalcolm@redhat.com>
22007 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
22011 * Makefile.in (LD_VERSION_SCRIPT_OPTION, LD_SONAME_OPTION): New.
22012 * configure: Regenerate.
22013 * configure.ac ("linker --version-script option"): New.
22014 ("linker soname option"): New.
22016 2018-03-09 Richard Biener <rguenther@suse.de>
22018 PR tree-optimization/84775
22019 * tree-if-conv.c (add_bb_predicate_gimplified_stmts): Delink
22020 immediate uses of predicate stmts and mark them modified.
22023 PR tree-optimization/84178
22024 * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
22026 (version_loop_for_if_conversion): Delay update_ssa call.
22027 (tree_if_conversion): Delay update_ssa until after predicate
22030 2018-03-09 Eric Botcazou <ebotcazou@adacore.com>
22033 * config/i386/winnt.c (i386_pe_seh_cold_init): Use small pre-allocation
22034 when the function accesses prior frames.
22036 2018-03-08 Jakub Jelinek <jakub@redhat.com>
22039 * dwarf2out.c (dw_loc_list): If list && loc_list->first->next, call
22040 gen_llsym, otherwise call maybe_gen_llsym.
22042 PR inline-asm/84742
22043 * recog.c (asm_operand_ok): Return 0 if multi-character constraint
22044 has ',' character inside of it.
22046 2018-03-08 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
22049 * config/aarch64/aarch64.md (*compare_cstore<mode>_insn): Mark pattern
22050 as clobbering CC_REGNUM.
22052 2018-03-08 Richard Biener <rguenther@suse.de>
22054 PR middle-end/84552
22055 * tree-scalar-evolution.c: Include tree-into-ssa.h.
22056 (follow_copies_to_constant): Do not follow SSA names registered
22059 2018-03-08 Richard Biener <rguenther@suse.de>
22061 PR tree-optimization/84178
22062 * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
22064 (version_loop_for_if_conversion): Delay update_ssa call.
22065 (tree_if_conversion): Delay update_ssa until after predicate
22068 2018-03-08 David Malcolm <dmalcolm@redhat.com>
22070 PR tree-optimization/84178
22071 * tree-if-conv.c (release_bb_predicate): Remove the
22072 the assertion that the stmts have NULL use_ops.
22073 Discard the statements, asserting that they haven't
22074 yet been added to a BB.
22076 2018-03-08 Richard Biener <rguenther@suse.de>
22078 PR tree-optimization/84746
22079 * tree-ssa-pre.c (find_leader_in_sets): Deal with SET1 being NULL.
22080 (phi_translate): Pass in destination ANTIC_OUT set.
22081 (phi_translate_1): Likewise. For a simplified result lookup
22082 a leader in ANTIC_OUT and AVAIL_OUT, not the ANTIC_IN sets.
22083 (phi_translate_set): Adjust.
22084 (do_pre_regular_insertion): Likewise.
22085 (do_pre_partial_partial_insertion): Likewise.
22087 2018-03-08 Martin Liska <mliska@suse.cz>
22089 PR gcov-profile/84735
22090 * doc/gcov.texi: Document usage of profile files.
22091 * gcov-io.h: Document changes in the format.
22093 2018-03-08 Alexandre Oliva <aoliva@redhat.com>
22097 * dwarf2out.c (struct dw_line_info_table): Update comments for
22099 (FORCE_RESET_NEXT_VIEW): New.
22100 (FORCE_RESETTING_VIEW_P): New.
22101 (RESETTING_VIEW_P): Check for -1 too.
22102 (ZERO_VIEW_P): Likewise.
22103 (new_line_info_table): Force-reset next view.
22104 (dwarf2out_begin_function): Likewise.
22105 (dwarf2out_source_line): Simplify zero_view_p initialization.
22106 Test FORCE_RESETTING_VIEW_P and RESETTING_VIEW_P instead of
22107 view directly. Omit view when omitting .loc at line 0.
22109 2018-03-08 Jakub Jelinek <jakub@redhat.com>
22111 PR tree-optimization/84740
22112 * tree-switch-conversion.c (process_switch): Call build_constructors
22113 only if info.phi_count is non-zero.
22115 PR tree-optimization/84739
22116 * tree-tailcall.c (find_tail_calls): Check call arguments against
22117 DECL_ARGUMENTS (current_function_decl) rather than
22118 DECL_ARGUMENTS (func) when checking for tail recursion.
22120 2018-03-07 Jakub Jelinek <jakub@redhat.com>
22122 * doc/contrib.texi: Add entries for Martin Liska, David Malcolm,
22123 Marek Polacek, extend Vladimir Makarov's, Jonathan Wakely's and
22124 Volker Reichelt's entry and add entries for people that perform
22125 GCC fuzzy testing and report numerous bugs.
22127 2018-03-07 Segher Boessenkool <segher@kernel.crashing.org>
22130 * config/rs6000/rs6000.c (rs6000_elf_in_small_data_p): Don't put
22131 readonly data in sdata, if that is disabled.
22132 * config/rs6000/sysv4.opt (mreadonly-in-sdata): New option.
22133 * doc/invoke.texi (RS/6000 and PowerPC Options): Document
22134 -mreadonly-in-sdata option.
22136 2018-03-07 Martin Sebor <msebor@redhat.com>
22138 PR tree-optimization/84468
22139 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Consider successor
22140 basic block when looking for nul assignment.
22142 2018-03-07 Eric Botcazou <ebotcazou@adacore.com>
22145 * except.h (output_function_exception_table): Adjust prototype.
22146 * except.c (output_function_exception_table): Remove FNNAME parameter
22147 and add SECTION parameter. Ouput one part of the table at a time.
22148 * final.c (final_scan_insn_1) <NOTE_INSN_SWITCH_TEXT_SECTIONS>: Output
22149 the first part of the exception table and emit unwind directives.
22150 * config/i386/i386-protos.h (i386_pe_end_cold_function): Declare.
22151 (i386_pe_seh_cold_init): Likewise.
22152 * config/i386/cygming.h (ASM_DECLARE_COLD_FUNCTION_NAME): New macro.
22153 (ASM_DECLARE_COLD_FUNCTION_SIZE): Likewise.
22154 * config/i386/i386.c (x86_expand_epilogue): Fix wording in comment.
22155 (ix86_output_call_insn): Emit a nop in one more case for SEH.
22156 * config/i386/winnt.c: Include except.h.
22157 (struct seh_frame_state): Add reg_offset, after_prologue and
22158 in_cold_section fields.
22159 (i386_pe_seh_end_prologue): Set seh->after_prologue.
22160 (i386_pe_seh_cold_init): New function.
22161 (i386_pe_seh_fini): Add COLD parameter and bail out if it is not equal
22162 to seh->in_cold_section.
22163 (seh_emit_push): Record the offset of the push.
22164 (seh_emit_save): Record the offet of the save.
22165 (i386_pe_seh_unwind_emit): Deal with NOTE_INSN_SWITCH_TEXT_SECTIONS.
22166 Test seh->after_prologue to disregard the epilogue.
22167 (i386_pe_end_function): Pass FALSE to i386_pe_seh_fini.
22168 (i386_pe_end_cold_function): New function.
22170 2018-03-07 Jakub Jelinek <jakub@redhat.com>
22173 * config/aarch64/predicates.md (aarch64_simd_reg_or_zero): Use
22174 aarch64_simd_or_scalar_imm_zero rather than aarch64_simd_imm_zero.
22177 * gimple-expr.c (create_tmp_var_raw): Set DECL_NAMELESS flag
22179 * tree-pretty-print.c (dump_decl_name): For TDF_COMPARE_DEBUG,
22180 don't print names of DECL_NAMELESS DECL_IGNORED_P decls.
22182 PR middle-end/84723
22183 * multiple_target.c: Include tree-inline.h and intl.h.
22184 (expand_target_clones): Diagnose and fail if node->definition and
22185 !tree_versionable_function_p (node->decl).
22187 2018-03-06 John David Anglin <danglin@gcc.gnu.org>
22189 * config/pa/pa.h (ASM_GENERATE_INTERNAL_LABEL): Revise to use
22191 (ASM_OUTPUT_ADDR_VEC_ELT): Revise for above change.
22192 (ASM_OUTPUT_ADDR_DIFF_ELT): Likewise.
22193 * config/pa/pa64-hpux.h (ASM_GENERATE_INTERNAL_LABEL): Revise as above.
22195 2018-03-06 Jakub Jelinek <jakub@redhat.com>
22198 * combine.c (try_combine): Use reg_or_subregno instead of handling
22199 just paradoxical SUBREGs and REGs.
22201 2018-03-06 Claudiu Zissulescu <claziss@synopsys.com>
22203 * config/arc/arc.c (arc_finalize_pic): Remove function.
22204 (arc_must_save_register): We use single base PIC register, remove
22205 checks to save/restore the PIC register.
22206 (arc_expand_prologue): Likewise.
22207 * config/arc/arc-protos.h (arc_set_default_type_attributes):
22209 (arc_verify_short): Likewise.
22210 (arc_attr_type): Likewise.
22211 * config/arc/arc.c (arc_set_default_type_attributes): Remove.
22212 (walk_stores): Likewise.
22213 (arc_address_cost): Make it static.
22214 (arc_verify_short): Likewise.
22215 (branch_dest): Likewise.
22216 (arc_attr_type): Likewise.
22217 * config/arc/arc.c (TARGET_ADJUST_INSN_LENGTH): Remove.
22218 (TARGET_INSN_LENGTH_PARAMETERS): Likewise.
22219 (arc_final_prescan_insn): Remove inserting the nops due to
22220 hardware hazards. It is done in reorg step.
22221 (insn_length_variant_t): Remove.
22222 (insn_length_parameters_t): Likewise.
22223 (arc_insn_length_parameters): Likewise.
22224 (arc_get_insn_variants): Likewise.
22225 * config/arc/arc.h (TARGET_UPSIZE_DBR): Remove.
22227 2018-03-06 Jakub Jelinek <jakub@redhat.com>
22229 PR inline-asm/84683
22230 * reg-stack.c (move_for_stack_reg): If any_malformed_asm, avoid
22233 PR tree-optimization/84687
22234 * omp-simd-clone.c (simd_clone_create): Clear DECL_BUILT_IN_CLASS
22236 * match.pd (pow(C,x)*expN(y) -> expN(logN(C)*x+y)): New optimization.
22238 2018-03-05 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
22240 * config/rs6000/rs6000-builtin.def (rs6000_speculation_barrier):
22241 Rename to ppc_speculation_barrier.
22242 * config/rs6000/rs6000.c (rs6000_init_builtins): Rename builtin to
22243 __builtin_ppc_speculation_barrier.
22245 2018-03-05 Jakub Jelinek <jakub@redhat.com>
22248 * combine.c (combine_simplify_rtx): Don't try to simplify if
22249 if_then_else_cond returned non-NULL, but either true_rtx or false_rtx
22252 2018-03-05 Segher Boessenkool <segher@kernel.crashing.org>
22254 * config/rs6000/rs6000.c (rs6000_loop_align): Don't align tiny loops
22255 to 32 bytes when compiling for POWER9.
22257 2018-03-05 Jakub Jelinek <jakub@redhat.com>
22260 * config/i386/i386.c (ix86_function_ok_for_sibcall): Check for
22261 regparm >= 3 with no arg reg available also for calls with
22262 flag_force_indirect_call. Pass decl to ix86_function_regparm.
22265 * config/i386/sse.md (*<code><mode>3): Replace <mask_prefix3> with
22267 (*<plusminus_insn><mode>3): Likewise. Remove <mask_operand3> uses.
22269 2018-03-05 Peter Bergner <bergner@vnet.ibm.com>
22272 * config/rs6000/vector.md (mov<mode>): Disallow altivec memory operands.
22274 2018-03-05 Richard Biener <rguenther@suse.de>
22276 PR tree-optimization/84486
22277 * tree-ssa-pre.c (create_expression_by_pieces): Remove dead code.
22278 When inserting a __builtin_assume_aligned call set the LHS
22279 SSA name alignment info accordingly.
22281 2018-03-05 Wilco Dijkstra <wdijkstr@arm.com>
22283 PR tree-optimization/84114
22284 * config/aarch64/aarch64.c (aarch64_reassociation_width)
22285 Avoid reassociation of FLOAT_MODE addition.
22287 2018-03-05 Olga Makhotina <olga.makhotina@intel.com>
22289 * common/config/i386/i386-common.c (OPTION_MASK_ISA_PCONFIG_SET,
22290 OPTION_MASK_ISA_PCONFIG_UNSET, OPTION_MASK_ISA_WBNOINVD_SET,
22291 OPTION_MASK_ISA_WBNOINVD_UNSET): New definitions.
22292 (ix86_handle_option): Handle -mpconfig and -mwbnoinvd.
22293 * config.gcc (pconfigintrin.h, wbnoinvdintrin.h) : Add headers.
22294 * config/i386/cpuid.h (bit_PCONFIG, bit_WBNOINVD): New.
22295 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mpconfig
22297 * config/i386/i386-builtin.def (__builtin_ia32_wbnoinvd,
22298 __builtin_ia32_wbinvd): New builtins.
22299 (SPECIAL_ARGS2): New.
22300 * config/i386/i386-c.c (__WBNOINVD__, __PCONFIG__): New.
22301 (SPECIAL_ARGS2): New.
22302 * config/i386/i386.c (ix86_target_string): Add -mpconfig and -mwbnoinvd.
22303 (ix86_valid_target_attribute_inner_p): Ditto.
22304 (ix86_init_mmx_sse_builtins): Add special_args2.
22305 * config/i386/i386.h (TARGET_PCONFIG, TARGET_PCONFIG_P, TARGET_WBNOINVD,
22306 TARGET_WBNOINVD_P): New.
22307 * config/i386/i386.md (UNSPECV_WBINVD, UNSPECV_WBNOINVD): New.
22308 (define_insn "wbinvd", define_insn "wbnoinvd"): New.
22309 * config/i386/i386.opt: Add -mpconfig and -mwbnoinvd.
22310 * config/i386/immintrin.h (_wbinvd): New intrinsic.
22311 * config/i386/pconfigintrin.h: New file.
22312 * config/i386/wbnoinvdintrin.h: Ditto.
22313 * config/i386/x86intrin.h: Add headers pconfigintrin.h and
22315 * doc/invoke.texi (-mpconfig, -mwbnoinvd): New.
22317 2018-03-05 Richard Biener <rguenther@suse.de>
22319 PR tree-optimization/84670
22320 * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
22322 (BB_VISITED_WITH_VISITED_SUCCS): New define.
22323 (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
22324 (compute_antic_aux): Only assert the number of values in ANTIC_IN
22325 doesn't grow if all successors (recursively) were visited at least
22328 2018-03-05 Richard Biener <rguenther@suse.de>
22330 PR tree-optimization/84650
22331 * tree-ssa-loop-im.c (pass_lim::execute): Reset the SCEV cache
22332 if executed in the loop pipeline.
22334 2018-03-05 Sandra Loosemore <sandra@codesourcery.com>
22336 * doc/configfiles.texi (Configuration Files): Move info about
22337 conditionalizing $target-protos.h to...
22338 * doc/sourcebuild.texi (Back End): Here. Explain how $target.h
22339 differs from $target-protos.h.
22341 2018-03-05 Kito Cheng <kito.cheng@gmail.com>
22342 Chung-Ju Wu <jasonwucj@gmail.com>
22344 * config/nds32/nds32-protos.h (nds32_expand_setmem): Declare.
22345 * config/nds32/nds32-multiple.md (setmemsi): Define.
22346 * config/nds32/nds32-memory-manipulation.c
22347 (nds32_gen_dup_4_byte_to_word_value): New.
22348 (emit_setmem_word_loop): New.
22349 (emit_setmem_byte_loop): New.
22350 (nds32_expand_setmem_loop): New.
22351 (nds32_expand_setmem_loop_v3m): New.
22352 (nds32_expand_setmem_unroll): New.
22353 (nds32_expand_setmem): New.
22355 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
22356 Chung-Ju Wu <jasonwucj@gmail.com>
22358 * config/nds32/nds32-memory-manipulation.c
22359 (nds32_emit_load_store): New.
22360 (nds32_emit_post_inc_load_store): New.
22361 (nds32_emit_mem_move): New.
22362 (nds32_emit_mem_move_block): New.
22363 (nds32_expand_movmemsi_loop_unknown_size): New.
22364 (nds32_expand_movmemsi_loop_known_size): New.
22365 (nds32_expand_movmemsi_loop): New.
22366 (nds32_expand_movmemsi_unroll): New.
22367 (nds32_expand_movmemqi): Rename ...
22368 (nds32_expand_movmemsi): ... to this.
22369 * config/nds32/nds32-multiple.md (movmemqi): Rename ...
22370 (movmemsi): ... to this.
22371 * config/nds32/nds32-protos.h (nds32_expand_movmemqi): Rename ...
22372 (nds32_expand_movmemsi): ... to this.
22374 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
22375 Monk Chiang <sh.chiang04@gmail.com>
22376 Chung-Ju Wu <jasonwucj@gmail.com>
22378 * config/nds32/nds32-protos.h
22379 (nds32_expand_load_multiple): New arguments.
22380 (nds32_expand_store_multiple): Ditto.
22381 (nds32_valid_multiple_load_store): Rename ...
22382 (nds32_valid_multiple_load_store_p): ... to this.
22383 * config/nds32/nds32-memory-manipulation.c
22384 (nds32_expand_load_multiple): Refine implementation.
22385 (nds32_expand_store_multiple): Ditto.
22386 * config/nds32/nds32-multiple.md
22387 (load_multiple): Update nds32_expand_load_multiple interface.
22388 (store_multiple): Update nds32_expand_store_multiple interface.
22389 * config/nds32/nds32-predicates.c
22390 (nds32_valid_multiple_load_store): Rename ...
22391 (nds32_valid_multiple_load_store_p): ... to this and refine
22393 * config/nds32/predicates.md
22394 (nds32_load_multiple_and_update_address_operation): New predicate.
22395 (nds32_store_multiple_and_update_address_operation): New predicate.
22397 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
22398 Chung-Ju Wu <jasonwucj@gmail.com>
22400 * config/nds32/nds32.md (type): Add load_multiple and store_multiple.
22401 (combo): New attribute.
22402 * config/nds32/nds32-multiple.md: Refine patterns with new attributes.
22404 2018-03-03 Chung-Ju Wu <jasonwucj@gmail.com>
22406 * config/nds32/nds32.opt: Change -mcmodel= default value.
22408 2018-03-03 Kito Cheng <kito.cheng@gmail.com>
22409 Monk Chiang <sh.chiang04@gmail.com>
22410 Chung-Ju Wu <jasonwucj@gmail.com>
22412 * config/nds32/constants.md (unspec_element): New enum.
22413 * config/nds32/constraints.md (Umw): New constraint.
22414 * config/nds32/nds32-intrinsic.c: Add more builtin functions.
22415 * config/nds32/nds32-intrinsic.md: Likewise.
22416 * config/nds32/nds32-md-auxiliary.c (nds32_regno_to_enable4): New.
22417 (nds32_valid_smw_lwm_base_p): New.
22418 (nds32_output_smw_single_word): New.
22419 (nds32_output_lmw_single_word): New.
22420 (nds32_expand_unaligned_load): New.
22421 (nds32_expand_unaligned_store): New.
22422 * config/nds32/nds32-protos.h (nds32_valid_smw_lwm_base_p): Declare.
22423 (nds32_output_smw_single_word): Declare.
22424 (nds32_output_lmw_single_word): Declare.
22425 (nds32_expand_unaligned_load): Declare.
22426 (nds32_expand_unaligned_store): Declare.
22427 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_UALOAD_HW,
22428 NDS32_BUILTIN_UALOAD_W, NDS32_BUILTIN_UALOAD_DW,
22429 NDS32_BUILTIN_UASTORE_HW, NDS32_BUILTIN_UASTORE_W,
22430 NDS32_BUILTIN_UASTORE_DW.
22431 * config/nds32/predicates.md (nds32_lmw_smw_base_operand): New
22434 2018-03-03 Monk Chiang <sh.chiang04@gmail.com>
22435 Kito Cheng <kito.cheng@gmail.com>
22436 Chung-Ju Wu <jasonwucj@gmail.com>
22438 * config/nds32/nds32-intrinsic.c
22439 (nds32_expand_builtin_null_ftype_reg): Delete.
22440 (nds32_expand_builtin_reg_ftype_imm): Ditto.
22441 (nds32_expand_builtin_null_ftype_reg_imm): Ditto.
22442 (nds32_read_argument): New.
22443 (nds32_legitimize_target): Ditto.
22444 (nds32_legitimize_argument): Ditto.
22445 (nds32_check_constant_argument): Ditto.
22446 (nds32_expand_unop_builtin): Ditto.
22447 (nds32_expand_unopimm_builtin): Ditto.
22448 (nds32_expand_binop_builtin): Ditto.
22449 (nds32_builtin_decl_impl): Ditto.
22450 (builtin_description): Ditto.
22451 (nds32_expand_builtin_impl): Rewrite with new infrastructure.
22452 (nds32_init_builtins_impl): Ditto.
22453 * config/nds32/nds32.c (TARGET_BUILTIN_DECL): Define.
22454 (nds32_builtin_decl): New.
22455 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_COUNT.
22456 * config/nds32/nds32-protos.h (nds32_builtin_decl_impl): Declare.
22458 2018-03-02 Jeff Law <law@redhat.com>
22460 * reorg.c (stop_search_p): Handle DEBUG_INSN.
22461 (redundant_insn, fill_simple_delay_slots): Likewise.
22462 (fill_slots_from_thread): Likewise.
22463 * resource.c (mark_referenced_resources): Likewise.
22464 (mark_set_resources, find_dead_or_set_registers): Likewise.
22466 2018-03-02 Jakub Jelinek <jakub@redhat.com>
22468 * substring-locations.h (format_warning_va): Formatting fix for
22469 ATTRIBUTE_GCC_DIAG.
22470 (format_warning_at_substring): Fix up ATTRIBUTE_GCC_DIAG second
22472 (format_warning_n_va, format_warning_at_substring_n): New prototypes.
22473 * substring-locations.c: Include intl.h.
22474 (format_warning_va): Turned into small wrapper around
22475 format_warning_n_va, renamed to ...
22476 (format_warning_n_va): ... this, add N and PLURAL_GMSGID arguments,
22477 rename GMSGID to SINGULAR_GMSGID, if SINGULAR_GMSGID != PLURAL_GMSGID,
22479 (format_warning_at_substring_n): New function.
22480 * gimple-ssa-sprintf.c: Remove GCC diagnostic ignored pragma.
22481 (fmtwarn): Add ATTRIBUTE_GCC_DIAG. Turn into a copy of
22482 format_warning_at_substring with just a shorter name instead of
22483 const function pointer.
22484 (fmtwarn_n): New function.
22485 (maybe_warn, format_directive, parse_directive): Use fmtwarn_n where
22486 appropriate, get rid of all the fmtstr temporaries, move conditionals
22487 with G_() wrapped string literals directly into fmtwarn arguments,
22488 cast dir.len to (int), formatting fixes.
22490 2018-03-02 Thomas Schwinge <thomas@codesourcery.com>
22492 * doc/invoke.texi: Remove "Cilk Plus" references.
22494 2018-03-02 Jakub Jelinek <jakub@redhat.com>
22495 Richard Biener <rguenther@suse.de>
22498 * expr.c (expand_expr_real_1) <case CALL_EXPR>: Don't emit diagnostics
22499 for error or warning attributes if CALL_FROM_THUNK_P is set.
22502 2018-03-02 Jakub Jelinek <jakub@redhat.com>
22505 * config/pa/pa.h (TARGET_CPU_CPP_BUILTINS): Predefine
22506 __SIZEOF_128__ macro if HPUX_LONG_DOUBLE_LIBRARY.
22509 * config/ia64/ia64.h (TARGET_CPU_CPP_BUILTINS): Predefine
22510 __SIZEOF_{FPREG,FLOAT{80,128}}__ macros.
22512 * predict.c (test_prediction_value_range): Use PROB_UNINITIALIZED
22513 instead of -1U in last predictors element's probability member.
22515 2018-03-02 Eric Botcazou <ebotcazou@adacore.com>
22518 * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
22519 arguments if they are comparable.
22521 2018-03-02 Richard Sandiford <richard.sandiford@linaro.org>
22523 PR tree-optimization/84634
22524 * tree-vect-stmts.c (vectorizable_store, vectorizable_load): Replace
22525 masks and masked_loop_p with a single loop_masks, making sure it's
22526 null for bb vectorization.
22528 2018-03-02 Richard Sandiford <richard.sandiford@linaro.org>
22530 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
22531 (vect_analyze_data_ref_access): Use loop->safe_len rather than
22532 loop->force_vectorize to check whether there is no alias.
22534 2018-03-02 Jakub Jelinek <jakub@redhat.com>
22537 * rtl.h (prev_real_nondebug_insn, next_real_nondebug_insn): New
22539 * emit-rtl.c (next_real_insn, prev_real_insn): Fix up function
22541 (next_real_nondebug_insn, prev_real_nondebug_insn): New functions.
22542 * cfgcleanup.c (try_head_merge_bb): Use prev_real_nondebug_insn
22543 instead of a loop around prev_real_insn.
22544 * combine.c (move_deaths): Use prev_real_nondebug_insn instead of
22547 PR inline-asm/84625
22548 * config/i386/i386.c (ix86_print_operand): Use conditional
22549 output_operand_lossage instead of gcc_assert if CONST_VECTOR is not
22552 2018-03-02 Richard Biener <rguenther@suse.de>
22554 PR tree-optimization/84427
22555 * tree-ssa-pre.c (bitmap_remove_expr_from_set): Remove.
22556 (bitmap_set_subtract_values): Rewrite to handle multiple
22559 (prune_clobbered_mems): Likewise.
22560 (phi_translate): Take edge instead of pred/phiblock.
22561 (phi_translate_1): Likewise.
22562 (phi_translate_set): Likewise. Insert all translated
22563 exprs for a value into the set, keeping possibly multiple
22564 expressions per value.
22565 (compute_antic_aux): Adjust for phi_translate changes.
22566 When intersecting union the expressions and prune those
22567 not in the final value set, keeping possibly multiple
22568 expressions per value. Do not use value-insertion
22569 for unioning ANTIC_OUT U EXP_GEN - TMP_GEN but merge
22570 all expressions. Add verification that the value-sets
22571 only shrink during iteration.
22572 (compute_partial_antic_aux): Adjust for the phi_translate changes.
22573 (do_pre_regular_insertion): Likewise.
22574 (do_pre_partial_partial_insertion): Likewise.
22576 2018-03-02 Richard Biener <rguenther@suse.de>
22579 * config/darwin.c (saved_debug_info_level): New static global.
22580 (darwin_asm_lto_start): Disable debug info generation for LTO out.
22581 (darwin_asm_lto_end): Restore debug info generation settings.
22583 2018-03-01 Martin Liska <mliska@suse.cz>
22586 * sanopt.c (sanitize_rewrite_addressable_params): Do not handle
22587 volatile arguments.
22589 2018-03-01 Richard Biener <rguenther@suse.de>
22592 * dwarf2out.c (gen_variable_die): Properly handle late VLA
22593 type annotation with LTO when debug was disabled at compile-time.
22595 2018-03-01 Matthew Fortune <mfortune@gmail.com>
22597 * config/mips/mips.c (mips_final_prescan_insn): Fix incorrect
22599 (mips_final_postscan_insn): Likewise.
22601 2018-03-01 Richard Sandiford <richard.sandiford@linaro.org>
22603 PR rtl-optimization/84528
22604 * alias.c (init_alias_target): Add commentary.
22605 (init_alias_analysis): Only give HARD_FRAME_POINTER_REGNUM
22606 a unique base value if the frame pointer is not eliminated
22607 to the stack pointer.
22609 2018-03-01 Tom de Vries <tom@codesourcery.com>
22611 PR rtl-optimization/83327
22612 * lra-int.h (hard_regs_spilled_into): Declare.
22613 * lra.c (hard_regs_spilled_into): Define.
22614 (init_reg_info): Init hard_regs_spilled_into.
22615 * lra-spills.c (assign_spill_hard_regs): Update hard_regs_spilled_into.
22616 * lra-lives.c (make_hard_regno_born, make_hard_regno_dead)
22617 (process_bb_lives): Handle hard_regs_spilled_into.
22618 (lra_create_live_ranges_1): Before doing liveness propagation, clear
22619 regs in all_hard_regs_bitmap if set in hard_regs_spilled_into.
22621 2018-02-28 David Edelsohn <dje.gcc@gmail.com>
22623 * config.gcc (powerpc-ibm-aix7.1.*): New stanza.
22624 (powerpc-ibm-aix[789]*): Default to AIX 7.2.
22625 * config/rs6000/aix71.h (TARGET_DEFAULT): Revert to Power4 ISA.
22626 * config/rs6000/aix72.h: New file.
22628 2018-02-28 Jakub Jelinek <jakub@redhat.com>
22630 * gimple-ssa-warn-restrict.c (maybe_diag_overlap): Use warning_n
22631 instead of warning_at with conditional singular and plural messages
22635 * stor-layout.c (update_alignment_for_field): For
22636 targetm.ms_bitfield_layout_p (rli->t), if !is_bitfield
22637 && !DECL_PACKED (field), do the alignment update, just use
22638 only desired_align instead of MAX (type_align, desired_align)
22640 (place_field): Don't do known_align < desired_align handling
22641 early if targetm.ms_bitfield_layout_p (rli->t) and rli->prev_field
22642 is non-NULL, instead do it after rli->prev_field handling and
22643 only if not within a bitfield word. For DECL_PACKED (field)
22644 use type_align of BITS_PER_UNIT.
22646 2018-02-28 Eric Botcazou <ebotcazou@adacore.com>
22648 * config/aarch64/aarch64.c (aarch64_emit_probe_stack_range): Remove
22649 superfluous parentheses and trailing spaces.
22651 2018-02-28 Richard Biener <rguenther@suse.de>
22653 PR tree-optimization/84584
22654 * graphite-scop-detection.c (scop_detection::add_scop): Discard
22655 SCoPs with fake exit edge.
22657 2018-02-28 Martin Liska <mliska@suse.cz>
22660 * timevar.c (timer::print): Fix format to properly print 100%
22663 2018-02-28 Richard Biener <rguenther@suse.de>
22665 PR middle-end/84607
22666 * genmatch.c (capture_info::walk_match): Do not mark
22667 captured expressions without operands as expr_p given
22668 they act more like predicates and should be subject to
22669 "lost tail" side-effect preserving.
22671 2018-02-28 Alexandre Oliva <aoliva@redhat.com>
22673 PR rtl-optimization/81611
22674 * auto-inc-dec.c (attempt_change): Move dead note from
22675 mem_insn if it's the next use of regno
22676 (find_address): Take address use of reg holding
22677 non-incremented value. Add parm to limit search to the named
22679 (merge_in_block): Attempt to use a mem insn that is the next
22680 use of the original regno.
22682 2018-02-27 Martin Sebor <msebor@redhat.com>
22685 * doc/invoke.texi (-Wmissing-attributes): New option.
22686 * print-tree.c (print_node): Handle DECL_UNINLINABLE.
22688 2018-02-27 Martin Sebor <msebor@redhat.com>
22690 PR translation/84207
22691 * diagnostic-core.h (warning_n, error_n, inform_n): Change
22692 n argument to unsigned HOST_WIDE_INT.
22693 * diagnostic.c (warning_n, error_n, inform_n): Ditto.
22694 (diagnostic_n_impl): Ditto. Handle arguments in excess of LONG_MAX.
22695 * gimple-ssa-sprintf.c (format_directive): Simplify inform_n call.
22696 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Use warning_n.
22698 2018-02-27 Richard Biener <rguenther@suse.de>
22700 PR tree-optimization/84512
22701 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost):
22702 Do not use the estimate returned from record_stmt_cost for
22703 the scalar iteration cost but sum properly using add_stmt_cost.
22705 2018-02-27 Richard Biener <rguenther@suse.de>
22707 PR tree-optimization/84466
22708 * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
22709 Adjust last change to less strictly validate use operands.
22711 2018-02-27 Martin Liska <mliska@suse.cz>
22713 PR gcov-profile/84548
22714 * gcov.c (process_file): Allow partial overlap and consider it
22715 also as group functions.
22716 (output_lines): Properly calculate range of lines for a group.
22718 2018-02-27 Martin Liska <mliska@suse.cz>
22720 * timevar.c (timer::print_row): Remove 'usr', 'sys', 'wall' and
22721 'ggc' suffixes. Change first column width.
22722 (timer::print): Fix formatting of the column.
22724 2018-02-27 Alexandre Oliva <aoliva@redhat.com>
22726 * tree-ssa-live.c (remove_unused_scope_block_p): Do not
22727 preserve inline entry blocks for the sake of debug inline
22728 entry point markers alone.
22729 (remove_unused_locals): Suggest in comments a better place to
22730 force the preservation of inline entry blocks that are
22731 otherwise unused, but do not preserve them.
22733 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
22735 * config/i386/i386.c (ix86_output_indirect_jmp): Update comments.
22737 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
22740 * config/i386/constraints.md (Bs): Replace
22741 ix86_indirect_branch_register with
22742 TARGET_INDIRECT_BRANCH_REGISTER.
22744 * config/i386/i386.md (indirect_jump): Likewise.
22745 (tablejump): Likewise.
22746 (*sibcall_memory): Likewise.
22747 (*sibcall_value_memory): Likewise.
22748 Peepholes of indirect call and jump via memory: Likewise.
22749 (*sibcall_GOT_32): Disallowed for TARGET_INDIRECT_BRANCH_REGISTER.
22750 (*sibcall_value_GOT_32): Likewise.
22751 * config/i386/predicates.md (indirect_branch_operand): Likewise.
22752 (GOT_memory_operand): Likewise.
22753 (call_insn_operand): Likewise.
22754 (sibcall_insn_operand): Likewise.
22755 (GOT32_symbol_operand): Likewise.
22756 * config/i386/i386.h (TARGET_INDIRECT_BRANCH_REGISTER): New.
22758 2018-02-26 Eric Botcazou <ebotcazou@adacore.com>
22760 PR rtl-optimization/83496
22761 * reorg.c (steal_delay_list_from_target): Change REDUNDANT array from
22762 booleans to RTXes. Call fix_reg_dead_note on every non-null element.
22763 (steal_delay_list_from_fallthrough): Call fix_reg_dead_note on a
22764 redundant insn, if any.
22765 (relax_delay_slots): Likewise.
22766 (update_reg_unused_notes): Rename REDUNDANT_INSN to OTHER_INSN.
22768 2018-02-26 Richard Sandiford <richard.sandiford@linaro.org>
22770 PR tree-optimization/83965
22771 * tree-vect-patterns.c (vect_reassociating_reduction_p): Assume
22772 that grouped statements are part of a reduction chain. Return
22773 true if the statement is not marked as a reduction itself but
22774 is part of a group.
22775 (vect_recog_dot_prod_pattern): Don't check whether the statement
22776 is part of a group here.
22777 (vect_recog_sad_pattern): Likewise.
22778 (vect_recog_widen_sum_pattern): Likewise.
22780 2018-02-26 Eric Botcazou <ebotcazou@adacore.com>
22783 * final.c (rest_of_clean_state): Also look for calls inside sequences.
22785 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
22788 * config/i386/i386-protos.h (ix86_output_indirect_jmp): Remove
22790 (ix86_output_indirect_function_return): New prototype.
22791 (ix86_split_simple_return_pop_internal): Likewise.
22792 * config/i386/i386.c (indirect_return_via_cx): New.
22793 (indirect_return_via_cx_bnd): Likewise.
22794 (indirect_thunk_name): Handle return va CX_REG.
22795 (output_indirect_thunk_function): Create alias for
22796 __x86_return_thunk_[re]cx and __x86_return_thunk_[re]cx_bnd.
22797 (ix86_output_indirect_jmp): Remove the bool argument.
22798 (ix86_output_indirect_function_return): New function.
22799 (ix86_split_simple_return_pop_internal): Likewise.
22800 * config/i386/i386.md (*indirect_jump): Don't pass false
22801 to ix86_output_indirect_jmp.
22802 (*tablejump_1): Likewise.
22803 (simple_return_pop_internal): Change it to define_insn_and_split.
22804 Call ix86_split_simple_return_pop_internal to split it for
22805 -mfunction-return=.
22806 (simple_return_indirect_internal): Call
22807 ix86_output_indirect_function_return instead of
22808 ix86_output_indirect_jmp.
22810 2018-02-26 Jakub Jelinek <jakub@redhat.com>
22813 * vec.h (vec_default_construct): For BROKEN_VALUE_INITIALIZATION use
22814 memset and value initialization afterwards.
22816 2018-02-26 Christophe Lyon <christophe.lyon@linaro.org>
22818 * Makefile.in (lto-wrapper): Use ALL_LINKERFLAGS.
22820 2018-02-26 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
22823 * common/config/aarch64/aarch64-common.c
22824 (aarch_option_optimization_table[]): Switch
22825 off fomit-frame-pointer
22827 2018-02-26 Kito Cheng <kito.cheng@gmail.com>
22828 Chung-Ju Wu <jasonwucj@gmail.com>
22830 * config/nds32/nds32-multiple.md (load_multiple): Disallow
22832 (store_multiple): Ditto.
22834 2018-02-26 Kito Cheng <kito.cheng@gmail.com>
22836 * config.gcc: Add --with-cpu support for nds32 target.
22837 * config/nds32/nds32-opts.h (nds32_cpu_type): New.
22838 * config/nds32/nds32.opt: Add -mcpu= option.
22840 2018-02-25 Segher Boessenkool <segher@kernel.crashing.org>
22842 * config/rs6000/rs6000.opt (mvrsave=no, mvrsave=yes, isel=no,
22843 isel=yes): Warn for these deprecated options.
22845 2018-02-23 David Edelsohn <dje.gcc@gmail.com>
22847 * config/rs6000/aix71.h (TARGET_DEFAULT): Change to
22848 ISA_2_5_MASKS_EMBEDDED.
22850 2018-02-23 Jakub Jelinek <jakub@redhat.com>
22852 * ipa-prop.c (ipa_vr_ggc_hash_traits::hash): Hash p->min and
22853 p->max as pointers rather than using iterative_hash_expr.
22855 2018-02-23 Carl Love <cel@us.ibm.com>
22857 * config/rs6000/rs6000-builtin.def: Change VSIGNED2 and VUNSIGNED2
22858 macro expansions from BU_VSX_2 to BU_P8V_VSX_2 and BU_VSX_OVERLOAD_2 to
22860 * config/rs6000/rs6000-c.c: Change VSX_BUILTIN_VEC_VSIGNED2 to
22861 P8V_BUILTIN_VEC_VSIGNED2. Change VSX_BUILTIN_VEC_VUNSIGNED2 to
22862 P8V_BUILTIN_VEC_VUNSIGNED2.
22864 2018-02-22 Vladimir Makarov <vmakarov@redhat.com>
22867 * lra-int.h (LRA_UNKNOWN_ALT, LRA_NON_CLOBBERED_ALT): New macros.
22868 * lra.c (lra_set_insn_recog_data, lra_update_insn_recog_data): Use
22870 * lra-constraints.c (curr_insn_transform): Set up
22871 LRA_NON_CLOBBERED_ALT for moves processed on the fast path. Use
22873 (remove_inheritance_pseudos): Use LRA_UNKNOWN_ALT.
22874 * lra-eliminations.c (spill_pseudos): Ditto.
22875 (process_insn_for_elimination): Ditto.
22876 * lra-lives.c (reg_early_clobber_p): Use the new macros.
22877 * lra-spills.c (spill_pseudos): Use LRA_UNKNOWN_ALT and
22878 LRA_NON_CLOBBERED_ALT.
22880 2018-02-22 Martin Sebor <msebor@redhat.com>
22882 PR tree-optimization/84480
22883 * gimple-fold.c (gimple_fold_builtin_strcpy): Move warnings
22884 to maybe_diag_stxncpy_trunc. Call it.
22885 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Integrate warnings
22886 from gimple_fold_builtin_strcpy. Print inlining stack.
22887 (handle_builtin_stxncpy): Print inlining stack.
22888 * tree-ssa-strlen.h (maybe_diag_stxncpy_trunc): Declare.
22890 2018-02-22 H.J. Lu <hongjiu.lu@intel.com>
22893 * config/i386/i386.c (ix86_set_indirect_branch_type): Issue an
22894 error when -mindirect-branch=thunk-extern, -fcf-protection=branch
22895 and -fcheck-pointer-bounds are used together.
22896 (indirect_thunk_prefix): New enum.
22897 (indirect_thunk_need_prefix): New function.
22898 (indirect_thunk_name): Replace need_bnd_p with need_prefix. Use
22899 "_nt" instead of "_bnd" for NOTRACK prefix.
22900 (output_indirect_thunk): Replace need_bnd_p with need_prefix.
22901 (output_indirect_thunk_function): Likewise.
22903 (ix86_code_end): Update output_indirect_thunk_function calls.
22904 (ix86_output_indirect_branch_via_reg): Replace
22905 ix86_bnd_prefixed_insn_p with indirect_thunk_need_prefix.
22906 (ix86_output_indirect_branch_via_push): Likewise.
22907 (ix86_output_function_return): Likewise.
22908 * doc/invoke.texi: Document -mindirect-branch=thunk-extern is
22909 incompatible with -fcf-protection=branch and
22910 -fcheck-pointer-bounds.
22912 2018-02-22 Steve Ellcey <sellcey@cavium.com>
22915 * config/aarch64/aarch64.c (aarch64_print_address_internal):
22916 Change gcc_assert call to output_operand_lossage.
22918 2018-02-22 Steve Ellcey <sellcey@cavium.com>
22920 * doc/extend.texi (__builtin_extend_pointer): Document builtin.
22922 2018-02-22 DJ Delorie <dj@redhat.com>
22923 Sebastian Perta <sebastian.perta@renesas.com>
22924 Oleg Endo <olegendo@gcc.gnu.org>
22926 * config/rx/rx.c (rx_rtx_costs): New function.
22927 (TARGET_RTX_COSTS): Override to use rx_rtx_costs.
22929 2018-02-22 Thomas Preud'homme <thomas.preudhomme@arm.com>
22931 * config/arm/t-multilib: Map Armv8-R to Armv7 multilibs.
22933 2018-02-22 Martin Liska <mliska@suse.cz>
22936 * common/config/arm/arm-common.c (arm_print_hint_for_cpu_option):
22937 Add "native" as a possible value.
22939 2018-02-22 Martin Liska <mliska@suse.cz>
22942 * config/i386/i386.c (ix86_option_override_internal):
22943 Add "native" as a possible value for -march and -mtune.
22945 2018-02-22 Jakub Jelinek <jakub@redhat.com>
22948 * stor-layout.c (finalize_type_size): Propagate TYPE_EMPTY_P flag
22949 to all type variants.
22951 PR tree-optimization/84503
22952 * gimple-ssa-store-merging.c (merged_store_group::merge_into): Compute
22953 width as info->bitpos + info->bitsize - start.
22954 (merged_store_group::merge_overlapping): Simplify width computation.
22955 (check_no_overlap): New function.
22956 (imm_store_chain_info::try_coalesce_bswap): Compute expected
22957 start + width and last_order of the group, fail if check_no_overlap
22959 (imm_store_chain_info::coalesce_immediate_stores): Don't merge info
22960 to group if check_no_overlap fails.
22962 2018-02-21 Segher Boessenkool <segher@kernel.crashing.org>
22964 * config/rs6000/altivec.md: Delete contraint arguments to
22965 define_expand, define_split, and define_peephole2, and in
22966 define_insn_and_split if always unused.
22967 * config/rs6000/darwin.md: Ditto.
22968 * config/rs6000/dfp.md: Ditto.
22969 * config/rs6000/rs6000.md: Ditto.
22970 * config/rs6000/sync.md: Ditto.
22971 * config/rs6000/vector.md: Ditto.
22972 * config/rs6000/vsx.md: Ditto.
22974 2018-02-21 Segher Boessenkool <segher@kernel.crashing.org>
22976 * config/rs6000/altivec.md: Write output control strings as braced
22977 blocks instead of double-quoted strings.
22978 * config/rs6000/darwin.md: Ditto.
22979 * config/rs6000/rs6000.md: Ditto.
22980 * config/rs6000/vector.md: Ditto.
22981 * config/rs6000/vsx.md: Ditto.
22983 2018-02-21 Jason Merrill <jason@redhat.com>
22985 PR c++/84314 - ICE with templates and fastcall attribute.
22986 * attribs.c (build_type_attribute_qual_variant): Remove assert.
22988 2018-02-21 Jan Hubicka <hubicka@ucw.cz>
22990 * ipa-cp.c (determine_versionability): Fix comment typos.
22992 2018-02-21 Jan Hubicka <hubicka@ucw.cz>
22995 * ipa-cp.c (determine_versionability): Do not version functions caling
22998 2018-02-21 Martin Liska <mliska@suse.cz>
23001 * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch):
23002 Add "native" as a possible value.
23003 * config/aarch64/aarch64.h (HAVE_LOCAL_CPU_DETECT): Define
23004 the macro when native cpu detection is available.
23006 2018-02-21 Martin Liska <mliska@suse.cz>
23009 * common/config/arm/arm-common.c (arm_print_hint_for_arch_option):
23010 Add "native" as a possible value.
23011 * config/arm/arm.h (HAVE_LOCAL_CPU_DETECT): Define the macro
23012 when native cpu detection is available.
23014 2018-02-21 Jakub Jelinek <jakub@redhat.com>
23015 Martin Sebor <msebor@redhat.com>
23017 PR tree-optimization/84478
23018 * gimple-fold.h (get_range_strlen): Add a bool argument defaulted to
23020 * gimple-fold.c (get_range_strlen): Make minlen const and assume it
23021 can't be NULL. Change FUZZY from bool to int, for 1 add PHI/COND_EXPR
23022 support which is conservatively correct, for 2 only stay conservative
23023 for maxlen. Formatting and comment capitalization fixes. Add STRICT
23024 argument to the 2 argument get_range_strlen, adjust 6 arg
23025 get_range_strlen caller and clear minmaxlen[0] and [1] if it returned
23027 (get_maxval_strlen): Adjust 6 arg get_range_strlen caller.
23028 (gimple_fold_builtin_strlen): Pass true as last argument to
23031 2018-02-20 Martin Sebor <msebor@redhat.com>
23033 PR middle-end/84095
23034 * gimple-ssa-warn-restrict.c (builtin_memref::extend_offset_range): New.
23035 (builtin_memref::set_base_and_offset): Same. Handle inner references.
23036 (builtin_memref::builtin_memref): Factor out parts into
23037 set_base_and_offset and call it.
23039 2018-02-20 Richard Sandiford <richard.sandiford@linaro.org>
23041 PR middle-end/84406
23042 * optabs-query.c (find_widening_optab_handler_and_mode): If from_mode
23043 is a scalar_int_mode, assert that to_mode is a scalar_int_mode with
23044 greater precision. If to_mode is a MODE_PARTIAL_INT, stop the
23045 search at the associated MODE_INT.
23047 2018-02-20 Jeff Law <law@redhat.com>
23049 PR middle-end/82123
23050 PR tree-optimization/81592
23051 PR middle-end/79257
23052 * gimple-ssa-sprintf.c (format_integer): Query EVRP range analyzer
23053 for range data rather than using global data.
23054 * gimple-ssa-sprintf.c (get_int_range): Query EVRP range analyzer for
23055 range data rather than using global data.
23056 * gimple-ssa-sprintf.c (get_int_range): Accept vr_values parameter
23057 pass it to children as needed.
23058 (struct directive::fmtresult): Similarly.
23059 (struct directive::set_width): Similarly.
23060 (struct directive::set_precision): Similarly.
23061 (format_integer, format_directive, parse_directive): Similarly.
23062 (format_none): Accept unnamed vr_values parameter.
23063 (format_percent, format_floating, format_character): Similarly.
23064 (format_string, format_plain): Similarly.
23065 * gimple-ssa-sprintf.c (sprintf_dom_walker::handle_gimple_call): Query
23066 the EVRP range analyzer for range data rather than using global data.
23067 * gimple-ssa-sprintf.c: Include alloc-pool.h, vr-values.h and
23068 gimple-ssa-evrp-analyze.h
23069 (class sprintf_dom_walker): Add after_dom_children member function.
23070 Add evrp_range_analyzer member.
23071 (sprintf_dom_walker::before_dom_children): Call into the EVRP
23072 range analyzer as needed.
23073 (sprintf_dom_walker::after_dom_children): New member function.
23074 * gimple-ssa-evrp-analyze.c (evrp_range_analyzer::enter): Do nothing
23076 (evrp_range_analyzer::record_ranges_from_stmt): Likewise.
23077 (evrp_range_analyzer::pop_to_marker): Likewise.
23079 2018-02-20 Richard Sandiford <richard.sandiford@linaro.org>
23081 PR tree-optimization/84419
23082 * internal-fn.c (expand_call_mem_ref): Create a TARGET_MEM_REF
23083 with the required type if its current type is compatible but
23086 2018-02-20 Jakub Jelinek <jakub@redhat.com>
23088 PR middle-end/82004
23089 * match.pd (pow(C,x) -> exp(log(C)*x)): Delay all folding until
23090 after vectorization.
23092 2018-02-20 Martin Liska <mliska@suse.cz>
23095 * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch): Print
23096 possible values if we don't have a hint.
23098 2018-02-20 Martin Liska <mliska@suse.cz>
23102 * final.c (shorten_branches): Build align_tab array with one
23104 * opts.c (finish_options): Add alignment option limit check.
23105 (MAX_CODE_ALIGN): Likewise.
23106 (MAX_CODE_ALIGN_VALUE): Likewise.
23107 * doc/invoke.texi: Document maximum allowed option value for
23108 all -falign-* options.
23110 2018-02-19 Jakub Jelinek <jakub@redhat.com>
23113 * reg-notes.def (REG_CALL_ARG_LOCATION): New reg note.
23114 * insn-notes.def (NOTE_INSN_CALL_ARG_LOCATION): Remove.
23115 * var-tracking.c (emit_note_insn_var_location): Remove all references
23116 to NOTE_INSN_CALL_ARG_LOCATION.
23117 (emit_notes_in_bb): Emit arguments as REG_CALL_ARG_LOCATION note on
23118 the CALL_INSN rather than separate NOTE_INSN_CALL_ARG_LOCATION note.
23119 Use copy_rtx_if_shared.
23120 * dwarf2out.c (gen_subprogram_die): Use XEXP with 0 instead of
23121 NOTE_VAR_LOCATION on ca_loc->call_arg_loc_note.
23122 (dwarf2out_var_location): Remove handling of
23123 NOTE_INSN_CALL_ARG_LOCATION, instead handle REG_CALL_ARG_LOCATION note
23125 * final.c (final_scan_insn): Remove all references to
23126 NOTE_INSN_CALL_ARG_LOCATION.
23127 (rest_of_clean_state): Likewise. Remove REG_CALL_ARG_LOCATION notes
23128 before dumping final insns.
23129 * except.c (emit_note_eh_region_end): Remove all references to
23130 NOTE_INSN_CALL_ARG_LOCATION.
23131 * config/alpha/alpha.c (alpha_pad_function_end): Likewise.
23132 * config/c6x/c6x.c (c6x_gen_bundles): Likewise.
23133 * config/arc/arc.c (hwloop_optimize): Likewise.
23134 * config/arm/arm.c (create_fix_barrier): Likewise.
23135 * config/s390/s390.c (s390_chunkify_start): Likewise.
23136 * config/sh/sh.c (find_barrier): Likewise.
23137 * config/i386/i386.c (rest_of_insert_endbranch,
23138 ix86_seh_fixup_eh_fallthru): Likewise.
23139 * config/xtensa/xtensa.c (hwloop_optimize): Likewise.
23140 * config/iq2000/iq2000.c (final_prescan_insn): Likewise.
23141 * config/frv/frv.c (frv_function_prologue): Likewise.
23142 * emit-rtl.c (try_split): Likewise. Copy over REG_CALL_ARG_LOCATION
23144 (note_outside_basic_block_p): Remove all references to
23145 NOTE_INSN_CALL_ARG_LOCATION.
23146 * gengtype.c (adjust_field_rtx_def): Likewise.
23147 * print-rtl.c (rtx_writer::print_rtx_operand_code_0, print_insn):
23149 * jump.c (cleanup_barriers, delete_related_insns): Likewise.
23150 * cfgrtl.c (force_nonfallthru_and_redirect): Likewise.
23153 * builtins.c (builtin_mathfn_code): Don't check if CALL_EXPR_FN (t)
23156 PR tree-optimization/84452
23157 * tree-vect-patterns.c (vect_recog_pow_pattern): Don't call
23158 expand_simd_clones if targetm.simd_clone.compute_vecsize_and_simdlen
23161 2018-02-19 Martin Liska <mliska@suse.cz>
23164 * passes.def: Put pass_sancov_O0 before pass_lower_switch with -O0.
23166 2018-02-19 Martin Liska <mliska@suse.cz>
23167 Richard Sandiford <richard.sandiford@linaro.org>
23169 PR tree-optimization/82491
23170 * gimple-fold.c (get_base_constructor): Make earlier bail out
23173 2018-02-19 Carl Love <cel@us.ibm.com>
23175 * config/rs6000/rs6000-builtin.def: Change NEG macro expansions from
23176 BU_ALTIVEC_A to BU_P8V_AV_1 and BU_ALTIVEC_OVERLOAD_1 to
23178 * config/rs6000/rs6000-c.c: Change ALTIVEC_BUILTIN_VEC_NEG to
23179 P8V_BUILTIN_VEC_NEG.
23181 2018-02-19 Sebastian Perta <sebastian.perta@renesas.com>
23183 * config/rl78/rl78.md (movdf): New define expand.
23185 2018-02-19 Martin Liska <mliska@suse.cz>
23188 * doc/invoke.texi: Fix typo.
23189 * params.def (PARAM_MAX_LOOP_HEADER_INSNS): Likewise.
23191 2018-02-18 Segher Boessenkool <segher@kernel.crashing.org>
23193 * config/rs6000/rs6000.c (rs6000_option_override_internal): Don't
23194 handle rs6000_single_float and rs6000_double_float specially for
23197 2018-02-16 Jeff Law <law@redhat.com>
23199 * config/rx/rx.c (add_pop_cfi_notes): New function.;
23200 (pop_regs): Use it.
23202 2018-02-16 Jakub Jelinek <jakub@redhat.com>
23205 * ipa-inline.c (inline_small_functions): Fix a typo.
23207 2018-02-16 Nathan Sidwell <nathan@acm.org>
23209 * doc/extend.texi (Backwards Compatibility): Americanize 'behaviour'.
23211 2018-02-16 Carl Love <cel@us.ibm.com>
23213 * config/rs6000/rs6000-builtin.def: Add BU_P8V_VSX_2 macro definition.
23214 Change FLOAT2 expansions from BU_VSX_2 to BU_P8V_VSX_2 and
23215 from BU_VSX_OVERLOAD_2 to BU_P8V_OVERLOAD_2.
23216 * config/rs6000/rs6000-c.c: Changed macro VSX_BUILTIN_VEC_FLOAT2
23217 expansion to P8V_BUILTIN_VEC_FLOAT2.
23219 2018-02-16 Vladimir Makarov <vmakarov@redhat.com>
23221 PR rtl-optimization/70023
23222 * lra-constraints.c (inherit_in_ebb): Take hard reg mode of
23223 src_regno into account.
23225 2018-02-16 Carl Love <cel@us.ibm.com>
23227 * config/rs6000/altivec.h: Remove vec_vextract4b and vec_vinsert4b.
23228 * config/rs6000/rs6000-builtin.def: Remove macro expansion for
23229 VEXTRACT4B, VINSERT4B, VINSERT4B_DI and VEXTRACT4B.
23230 * config/rs6000/rs6000.c: Remove case statements for
23231 P9V_BUILTIN_VEXTRACT4B, P9V_BUILTIN_VEC_VEXTRACT4B,
23232 P9V_BUILTIN_VINSERT4B, P9V_BUILTIN_VINSERT4B_DI,
23233 and P9V_BUILTIN_VEC_VINSERT4B.
23234 * config/rs6000/rs6000-c.c (altivec_expand_builtin): Remove entries for
23235 P9V_BUILTIN_VEC_VEXTRACT4B and P9V_BUILTIN_VEC_VINSERT4B.
23236 * config/rs6000/vsx.md:
23237 * doc/extend.texi: Remove vec_vextract4b, non ABI definitions for
23240 2018-02-16 Carl Love <cel@us.ibm.com>
23242 * config/rs6000/altivec.h: Add builtin names vec_extract4b
23244 * config/rs6000/rs6000-builtin.def: Add INSERT4B and EXTRACT4B
23246 * config/rs6000/rs6000-c.c: Add the definitions for
23247 P9V_BUILTIN_VEC_EXTRACT4B and P9V_BUILTIN_VEC_INSERT4B.
23248 * config/rs6000/rs6000.c (altivec_expand_builtin): Add
23249 P9V_BUILTIN_EXTRACT4B and P9V_BUILTIN_INSERT4B case statements.
23250 * config/rs6000/vsx.md: Add define_insn extract4b. Add define_expand
23251 definition for insert4b and define insn *insert3b_internal.
23252 * doc/extend.texi: Add documentation for vec_extract4b.
23254 2018-02-16 Nathan Sidwell <nathan@acm.org>
23256 * doc/extend.texi (Backwards Compatibility): Mention friend
23257 injection. Note for-scope is deprecated.
23258 * doc/invoke.texi (-ffriend-injection): Deprecate.
23260 2018-02-16 Segher Boessenkool <segher@kernel.crashing.org>
23262 * combine.c (try_combine): When adjusting LOG_LINKS for the destination
23263 that moved to I2, also allow destinations that are a paradoxical
23264 subreg (instead of a normal reg).
23266 2018-02-16 Oleg Endo <olegendo@gcc.gnu.org>
23269 * config/rx/rx.c (rx_fuse_in_memory_bitop): Convert shift operand
23272 2018-02-16 Richard Biener <rguenther@suse.de>
23274 PR tree-optimization/84037
23275 PR tree-optimization/84016
23277 * config/i386/i386.c (ix86_builtin_vectorization_cost):
23278 Adjust vec_construct for the fact we need additional higher latency
23279 128bit inserts for AVX256 and AVX512 vector builds.
23280 (ix86_add_stmt_cost): Scale vector construction cost for
23283 2018-02-16 Richard Biener <rguenther@suse.de>
23285 PR tree-optimization/84417
23286 * tree-ssa.c (non_rewritable_mem_ref_base): Properly constrain
23287 the MEM_REF offset when conversion to BIT_FIELD_REF is desired.
23288 (non_rewritable_lvalue_p): Likewise, use poly-ints.
23290 2018-02-16 Martin Liska <mliska@suse.cz>
23293 * internal-fn.def (ASAN_CHECK): Set proper flags.
23294 (ASAN_MARK): Likewise.
23296 2018-02-16 Julia Koval <julia.koval@intel.com>
23298 * config/i386/i386.c (ix86_option_override_internal): Remove PTA_CLWB
23299 from PTA_CANNONLAKE.
23301 2018-02-16 Jakub Jelinek <jakub@redhat.com>
23304 * config/aarch64/cortex-a57-fma-steering.c (fma_forest::merge_forest):
23305 Use ++iter rather than iter++ for std::list iterators.
23306 (func_fma_steering::dfs): Likewise. Don't delete nodes right away,
23307 defer deleting them until all nodes in the forest are processed. Do
23308 free even leaf nodes. Change to_process into auto_vec.
23311 * system.h (BROKEN_VALUE_INITIALIZATION): Define for GCC < 4.3.
23312 * vec.h (vec_default_construct): Use memset instead of placement new
23313 if BROKEN_VALUE_INITIALIZATION is defined.
23314 * hash-table.h (hash_table<Descriptor, Allocator>::empty_slow): Use
23315 memset instead of value initialization if BROKEN_VALUE_INITIALIZATION
23318 PR rtl-optimization/83723
23319 * lra-int.h (lra_substitute_pseudo): Add DEBUG_P argument.
23320 * lra.c (lra_substitute_pseudo): Likewise. If true, use
23321 gen_rtx_raw_SUBREG instead of gen_rtx_SUBREG. Pass DEBUG_P to
23323 (lra_substitute_pseudo_within_insn): Adjust lra_substitute_pseudo
23325 * lra-constraints.c (inherit_reload_reg, split_reg): Likewise.
23327 2018-02-16 Eric Botcazou <ebotcazou@adacore.com>
23329 PR rtl-optimization/81443
23330 * rtlanal.c (num_sign_bit_copies1) <SUBREG>: Do not propagate results
23331 from inner REGs to paradoxical SUBREGs.
23333 2018-02-16 Richard Biener <rguenther@suse.de>
23335 PR tree-optimization/84399
23336 * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
23337 For operands we can analyze at their definition make sure we can
23338 analyze them at each use as well.
23340 2018-02-16 Richard Biener <rguenther@suse.de>
23342 PR tree-optimization/84190
23343 * tree-ssa.c (non_rewritable_mem_ref_base): Do not touch
23344 volatile accesses if the decl isn't volatile.
23346 2018-02-15 Jason Merrill <jason@redhat.com>
23348 PR c++/84314 - ICE with templates and fastcall attribute.
23349 * attribs.c (build_type_attribute_qual_variant): Don't clobber
23350 TYPE_CANONICAL on an existing type.
23352 2018-02-15 Jakub Jelinek <jakub@redhat.com>
23354 PR tree-optimization/84383
23355 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Don't look at
23356 dstoff nor call operand_equal_p if dstbase is NULL.
23358 PR tree-optimization/84334
23359 * match.pd ((A +- CST1) +- CST2 -> A + CST3): If A is
23360 also a CONSTANT_CLASS_P, punt.
23362 2018-02-14 Jim Wilson <jimw@sifive.com>
23364 * config/riscv/riscv.c (riscv_first_stack_step): Move locals after
23365 first SMALL_OPERAND check. New local min_second_step. Move assert
23366 to where locals are set. Add TARGET_RVC support.
23367 * config/riscv/riscv.h (C_SxSP_BITS, SWSP_REACH, SDSP_REACH): New.
23369 2018-02-14 Indu Bhagat <indu.bhagat@oracle.com>
23371 * doc/invoke.texi: Correct -Wformat-overflow code sample.
23373 2018-02-14 Martin Sebor <msebor@redhat.com>
23375 PR tree-optimization/83698
23376 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For
23377 arrays constrain the offset range to their bounds.
23378 (builtin_access::strcat_overlap): Adjust the bounds of overlap offset.
23379 (builtin_access::overlap): Avoid setting the size of overlap if it's
23381 (maybe_diag_overlap): Also consider arrays when deciding what values
23382 of offsets to include in diagnostics.
23384 2018-02-14 Martin Sebor <msebor@redhat.com>
23387 * attribs.c (diag_attr_exclusions): Consider the exclusion(s)
23388 that correspond to the kind of a declaration.
23390 2018-02-14 John David Anglin <danglin@gcc.gnu.org>
23393 * config/pa/pa.md: Load address of PIC label using the linkage table
23394 if the label is nonlocal.
23396 2018-02-14 Kelvin Nilsen <kelvin@gcc.gnu.org>
23398 * config/rs6000/rs6000.c (rs6000_option_override_internal): Issue
23399 warning message if user requests -maltivec=be.
23400 * doc/invoke.texi: Document deprecation of -maltivec=be.
23402 2018-02-14 Will Schmidt <will_schmidt@vnet.ibm.com>
23405 * config/rs6000/rs6000-c.c: Update definitions for
23406 ALTIVEC_BUILTIN_VEC_SLD, ALTIVEC_BUILTIN_VEC_SLDW,
23407 VEC_XXSLDWI and ALTIVEC_BUILTIN_VEC_XXPERMDI builtins.
23409 2018-02-14 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
23412 * config/i386/cetintrin.h: Remove _rdssp[d|q] and
23413 add _get_ssp intrinsics. Remove argument from
23414 __builtin_ia32_rdssp[d|q].
23415 * config/i386/i386-builtin-types.def: Add UINT_FTYPE_VOID.
23416 * config/i386/i386-builtin.def: Remove argument from
23417 __builtin_ia32_rdssp[d|q].
23418 * config/i386/i386.c: Use UINT_FTYPE_VOID. Use
23419 ix86_expand_special_args_builtin for _rdssp[d|q].
23420 * config/i386/i386.md: Remove argument from rdssp[si|di] insn.
23421 Clear register before usage.
23422 * doc/extend.texi: Remove argument from __builtin_ia32_rdssp[d|q].
23423 Add documentation for new _get_ssp and _inc_ssp intrinsics.
23425 2018-02-14 Richard Sandiford <richard.sandiford@linaro.org>
23427 PR tree-optimization/84357
23428 * tree-data-ref.c (object_address_invariant_in_loop_p): Check
23429 operand 1 of an ARRAY_REF too.
23431 2018-02-14 Oleg Endo <olegendo@gcc.gnu.org>
23434 * config/rx/rx-protos.h (rx_reg_dead_or_unused_after_insn,
23435 rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
23437 (set_of_reg): New struct.
23438 (rx_find_set_of_reg, rx_find_use_of_reg): New functions.
23439 * config/rx/rx.c (rx_reg_dead_or_unused_after_insn,
23440 rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
23442 * config/rx/rx.md (andsi3, iorsi3, xorsi3): Convert to insn_and_split.
23443 Split into bitclr, bitset, bitinvert patterns if appropriate.
23444 (*bitset, *bitinvert, *bitclr): Convert to named insn_and_split and
23445 use rx_fuse_in_memory_bitop.
23446 (*bitset_in_memory, *bitinvert_in_memory, *bitclr_in_memory): Convert
23447 to named insn, correct maximum insn length.
23449 2018-02-14 Jozef Lawrynowicz <jozefl.gcc@gmail.com>
23452 * machmode.def: Define a complex mode for PARTIAL_INT.
23453 * genmodes.c (complex_class): Return MODE_COMPLEX_INT for
23455 * doc/rtl.texi: Document CSPImode.
23456 * config/msp430/msp430.c (msp430_hard_regno_nregs): Add CPSImode
23458 (msp430_hard_regno_nregs_with_padding): Likewise.
23460 2018-02-13 Peter Bergner <bergner@vnet.ibm.com>
23463 * config/rs6000/rs6000.c (mem_operand_gpr): Disallow altivec addresses.
23465 2018-02-13 Segher Boessenkool <segher@kernel.crashing.org>
23467 PR rtl-optimization/84169
23468 * combine.c (try_combine): New variable split_i2i3. Set it to true if
23469 we generated a parallel as new i3 and we split that to new i2 and i3
23470 instructions. Handle split_i2i3 similar to swap_i2i3: scan the
23471 LOG_LINKs of i3 to see which of those need to link to i2 now. Link
23472 those to i2, not i1. Partially rewrite this scan code.
23474 2018-02-13 Jakub Jelinek <jakub@redhat.com>
23477 * stor-layout.c (place_field): For variable length fields, adjust
23478 offset_align afterwards not just based on the field's alignment,
23479 but also on the size.
23481 PR middle-end/84309
23482 * match.pd (pow(C,x) -> exp(log(C)*x)): Use exp2s and log2s instead
23483 of exps and logs in the use_exp2 case.
23485 2018-02-13 Jeff Law <law@redhat.com>
23487 * config/rl/rl78.c (rl78_attribute_table): Fix terminator and
23488 entry for "vector".
23490 * config/rl78/rl78.c (rl78_handle_func_attribute): Mark
23493 2018-02-13 Alexandre Oliva <aoliva@redhat.com>
23497 * common.opt (gas-loc-support, gas-locview-support): New.
23498 (ginline-points, ginternal-reset-location-views): New.
23499 * doc/invoke.texi: Document them. Use @itemx where intended.
23500 (gvariable-location-views): Adjust.
23501 * target.def (reset_location_view): New.
23502 * doc/tm.texi.in (DWARF2_ASM_VIEW_DEBUG_INFO): New.
23503 (TARGET_RESET_LOCATION_VIEW): New.
23504 * doc/tm.texi: Rebuilt.
23505 * dwarf2out.c (dwarf2out_default_as_loc_support): New.
23506 (dwarf2out_default_as_locview_support): New.
23507 (output_asm_line_debug_info): Use option variables.
23508 (dwarf2out_maybe_output_loclist_view_pair): Likewise.
23509 (output_loc_list): Likewise.
23510 (add_high_low_attributes): Check option variables.
23511 Don't output entry view attribute in strict mode.
23512 (gen_inlined_subroutine_die): Check option variables.
23513 (dwarf2out_inline_entry): Likewise.
23514 (init_sections_and_labels): Likewise.
23515 (dwarf2out_early_finish): Likewise.
23516 (maybe_reset_location_view): New, from...
23517 (dwarf2out_var_location): ... here. Call it.
23518 * debug.h (dwarf2out_default_as_loc_support): Declare.
23519 (dwarf2out_default_as_locview_support): Declare.
23520 * hooks.c (hook_int_rtx_insn_0): New.
23521 * hooks.h (hook_int_rtx_insn_0): Declare.
23522 * toplev.c (process_options): Take -gas-loc-support and
23523 -gas-locview-support from dwarf2out. Enable
23524 -gvariable-location-views by default only with locview
23525 assembler support. Enable -ginternal-reset-location-views by
23526 default only if the target defines the corresponding hook.
23527 Enable -ginline-points by default if location views are
23528 enabled; force it disabled if statement frontiers are
23530 * tree-inline.c (expand_call_inline): Check option variables.
23531 * tree-ssa-live.c (remove_unused_scope_block_p): Likewise.
23533 2018-02-13 Richard Sandiford <richard.sandiford@linaro.org>
23535 PR tree-optimization/84321
23536 * tree-vrp.c (intersect_range_with_nonzero_bits): Fix VR_ANTI_RANGE
23537 handling. Also check whether the anti-range contains any values
23538 that satisfy the mask; switch to a VR_RANGE if not.
23540 2018-02-13 Paolo Bonzini <bonzini@gnu.org>
23543 * internal-fn.def (ASAN_CHECK, ASAN_MARK): Revert changes to fnspec.
23545 2018-02-13 Martin Jambor <mjambor@suse.cz>
23548 * ipa-param-manipulation.c (ipa_modify_call_arguments): Use location
23549 of call statements, also set location of a load to a temporary.
23551 2018-02-13 Sebastian Perta <sebastian.perta@renesas.com>
23553 * config/rl78/rl78.c (add_vector_labels): New function.
23554 * config/rl78/rl78.c (rl78_handle_vector_attribute): New function.
23555 * config/rl78/rl78.c (rl78_start_function): Call add_vector_labels.
23556 * config/rl78/rl78.c (rl78_handle_func_attribute): Removed the assert
23557 which checks that no arguments are passed.
23558 * config/rl78/rl78.c (rl78_attribute_table): Add "vector" attribute.
23559 * doc/extend.texi: Documentation for the new attribute.
23561 2018-02-13 Andreas Schwab <schwab@suse.de>
23563 * config/riscv/linux.h (CPP_SPEC): Define.
23565 2018-02-13 Jakub Jelinek <jakub@redhat.com>
23568 * config/i386/i386.c (ix86_init_mmx_sse_builtins): Pass
23569 OPTION_MASK_ISA_AES | OPTION_MASK_ISA_SSE2 instead of
23570 OPTION_MASK_ISA_AES as first argument to def_builtin_const
23571 for AES builtins. Pass OPTION_MASK_ISA_PCLMUL | OPTION_MASK_ISA_SSE2
23572 instead of OPTION_MASK_ISA_PCLMUL as first argument to
23573 def_builtin_const for __builtin_ia32_pclmulqdq128 builtin.
23574 * config/i386/wmmintrin.h: If __SSE2__ is not defined, enable it
23575 temporarily for AES and PCLMUL builtins.
23577 PR tree-optimization/84339
23578 * gimple-fold.c (get_range_strlen): Set *FLEXP to true when handling
23579 ARRAY_REF where first operand is array_at_struct_end_p COMPONENT_REF.
23582 PR middle-end/84309
23583 * match.pd (pow(C,x) -> exp(log(C)*x)): Optimize instead into
23584 exp2(log2(C)*x) if C is a power of 2 and c99 runtime is available.
23585 * generic-match-head.c (canonicalize_math_after_vectorization_p): New
23587 * gimple-match-head.c (canonicalize_math_after_vectorization_p): New
23589 * omp-simd-clone.h: New file.
23590 * omp-simd-clone.c: Include omp-simd-clone.h.
23591 (expand_simd_clones): No longer static.
23592 * tree-vect-patterns.c: Include fold-const-call.h, attribs.h,
23593 cgraph.h and omp-simd-clone.h.
23594 (vect_recog_pow_pattern): Optimize pow(C,x) to exp(log(C)*x).
23595 (vect_recog_widen_shift_pattern): Formatting fix.
23596 (vect_pattern_recog_1): Don't check optab for calls.
23599 * config/i386/sse.md (<avx512>_vpermi2var<mode>3_mask): Force
23600 operands[2] into a REG before using gen_lowpart on it.
23602 2018-02-12 Jeff Law <law@redhat.com>
23605 * config/sh/sh.c (find_barrier): Consider a sibling call
23608 * cse.c (try_back_substitute_reg): Move any REG_ARGS_SIZE note when
23609 successfully back substituting a reg.
23611 2018-02-12 Richard Biener <rguenther@suse.de>
23613 PR tree-optimization/84037
23614 * tree-vect-slp.c (vect_analyze_slp_cost): Add visited
23615 parameter, move visited init to caller.
23616 (vect_slp_analyze_operations): Separate cost from validity
23617 check, initialize visited once for all instances.
23618 (vect_schedule_slp): Analyze map to CSE vectorized nodes once
23620 * tree-vect-stmts.c (vect_model_simple_cost): Make early
23622 (vect_model_promotion_demotion_cost): Likewise.
23623 (vectorizable_bswap): Guard cost modeling with !slp_node
23624 instead of !PURE_SLP_STMT to avoid double-counting on hybrid
23626 (vectorizable_call): Likewise.
23627 (vectorizable_conversion): Likewise.
23628 (vectorizable_assignment): Likewise.
23629 (vectorizable_shift): Likewise.
23630 (vectorizable_operation): Likewise.
23631 (vectorizable_store): Likewise.
23632 (vectorizable_load): Likewise.
23633 (vectorizable_condition): Likewise.
23634 (vectorizable_comparison): Likewise.
23636 2018-02-12 Paolo Bonzini <bonzini@gnu.org>
23639 * internal-fn.def (ASAN_CHECK): Fix fnspec to account for return value.
23640 (ASAN_MARK): Fix fnspec to account for return value, change pointer
23641 argument from 'R' to 'W' so that the pointed-to datum is clobbered.
23643 2018-02-08 Jan Hubicka <hubicka@ucw.cz>
23645 PR middle-end/83665
23646 * params.def (inline-min-speedup): Increase from 8 to 15.
23647 (max-inline-insns-auto): Decrease from 40 to 30.
23648 * ipa-split.c (consider_split): Add some buffer for function to
23649 be considered inlining candidate.
23650 * invoke.texi (max-inline-insns-auto, inline-min-speedup): UPdate
23653 2018-02-12 Richard Biener <rguenther@suse.de>
23655 PR tree-optimization/84037
23656 * tree-vect-slp.c (vect_build_slp_tree_2): Try swapping the
23657 matched stmts if we cannot swap the non-matched ones.
23659 2018-02-12 Olga Makhotina <olga.makhotina@intel.com>
23661 * config/i386/avx512fintrin.h (_mm_mask_scalef_round_sd,
23662 _mm_maskz_scalef_round_sd, _mm_mask_scalef_round_ss,
23663 _mm_maskz_scalef_round_ss): New intrinsics.
23664 (__builtin_ia32_scalefsd_round, __builtin_ia32_scalefss_round): Fix.
23665 * config/i386/i386-builtin.def (__builtin_ia32_scalefsd_round,
23666 __builtin_ia32_scalefss_round): Remove.
23667 (__builtin_ia32_scalefsd_mask_round,
23668 __builtin_ia32_scalefss_mask_round): New intrinsics.
23669 * config/i386/sse.md (vmscalef<mode><round_name>): Renamed to ...
23670 (vmscalef<mode><mask_scalar_name><round_scalar_name>): ... this.
23671 ((match_operand:VF_128 2 "<round_nimm_predicate>"
23672 "<round_constraint>")): Changed to ...
23673 ((match_operand:VF_128 2 "<round_scalar_nimm_predicate>"
23674 "<round_scalar_constraint>")): ... this.
23675 ("vscalef<ssescalarmodesuffix>\t{<round_op3>%2, %1, %0|
23676 %0, %1, %2<round_op3>}"): Changed to ...
23677 ("vscalef<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%2, %1,
23678 %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %1,
23679 %2<round_scalar_mask_op3>}"): ... this.
23680 * config/i386/subst.md (round_scalar_nimm_predicate): New.
23682 2018-02-12 Olga Makhotina <olga.makhotina@intel.com>
23684 * config/i386/avx512fintrin.h (_mm_mask_sqrt_round_sd)
23685 (_mm_maskz_sqrt_round_sd, _mm_mask_sqrt_round_ss)
23686 (_mm_maskz_sqrt_round_ss): New intrinsics.
23687 (__builtin_ia32_sqrtsd_round, __builtin_ia32_sqrtss_round): Remove.
23688 (__builtin_ia32_sqrtsd_mask_round)
23689 (__builtin_ia32_sqrtss_mask_round): New builtins.
23690 * config/i386/i386-builtin.def (__builtin_ia32_sqrtsd_round)
23691 (__builtin_ia32_sqrtss_round): Remove.
23692 (__builtin_ia32_sqrtsd_mask_round)
23693 (__builtin_ia32_sqrtss_mask_round): New builtins.
23694 * config/i386/sse.md (vmsqrt<mode>2<round_name>): Renamed to ...
23695 (vmsqrt<mode>2<mask_scalar_name><round_scalar_name>): ... this.
23696 ((match_operand:VF_128 1 "vector_operand"
23697 "xBm,<round_constraint>")): Changed to ...
23698 ((match_operand:VF_128 1 "vector_operand"
23699 "xBm,<round_scalar_constraint>")): ... this.
23700 (vsqrt<ssescalarmodesuffix>\t{<round_op3>%1, %2, %0|
23701 %0, %2, %<iptr>1<round_op3>}): Changed to ...
23702 (vsqrt<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%1, %2,
23703 %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %2,
23704 %<iptr>1<round_scalar_mask_op3>}): ... this.
23705 ((set_attr "prefix" "<round_prefix>")): Changed to ...
23706 ((set_attr "prefix" "<round_scalar_prefix>")): ... this.
23708 2018-02-11 Steven Munroe <munroesj@gcc.gnu.org>
23711 * config/rs6000/mmintrin.h (_mm_cmpeq_pi32 [_ARCH_PWR9]):
23712 Cast vec_cmpeq result to correct type.
23713 * config/rs6000/mmintrin.h (_mm_cmpgt_pi32 [_ARCH_PWR9]):
23714 Cast vec_cmpgt result to correct type.
23716 2018-02-11 Alexandre Oliva <aoliva@redhat.com>
23718 * final.c (final_scan_insn_1): Renamed from...
23719 (final_scan_insn): ... this. New wrapper, to recover
23720 seen from the outermost call in recursive ones.
23721 * config/sparc/sparc.c (output_return): Drop seen from call.
23722 (output_sibcall): Likewise.
23723 * config/visium/visium.c (output_branch): Likewise.
23725 2018-02-10 John David Anglin <danglin@gcc.gnu.org>
23727 * config/pa/pa.c (hppa_profile_hook): Mark SYMBOL_REF for _mcount as
23730 2018-02-10 Alan Modra <amodra@gmail.com>
23733 * config/rs6000/rs6000.md (split_stack_return): Remove (use ..).
23734 Specify LR as an input.
23736 2018-02-10 Jakub Jelinek <jakub@redhat.com>
23739 * omp-low.c (maybe_remove_omp_member_access_dummy_vars,
23740 remove_member_access_dummy_vars): New functions.
23741 (lower_omp_for, lower_omp_taskreg, lower_omp_target,
23742 lower_omp_1, execute_lower_omp): Use them.
23744 PR rtl-optimization/84308
23745 * shrink-wrap.c (spread_components): Release todo vector.
23747 2018-02-09 Vladimir Makarov <vmakarov@redhat.com>
23749 PR rtl-optimization/57193
23750 * ira-color.c (struct allocno_color_data): Add member
23751 conflict_allocno_hard_prefs.
23752 (update_conflict_allocno_hard_prefs): New.
23753 (bucket_allocno_compare_func): Add a preference based on
23754 conflict_allocno_hard_prefs.
23755 (push_allocno_to_stack): Update conflict_allocno_hard_prefs.
23756 (color_allocnos): Remove a dead code. Initiate
23757 conflict_allocno_hard_prefs. Call update_costs_from_prefs.
23759 2018-02-09 Jakub Jelinek <jakub@redhat.com>
23762 * config/rs6000/vsx.md (p9_xxbrq_v16qi): Change input operand
23763 constraint from =wa to wa. Avoid a subreg on the output operand,
23764 instead use a pseudo and subreg it in a move.
23765 (p9_xxbrd_<mode>): Changed to ...
23766 (p9_xxbrd_v2di): ... this insn, without VSX_D iterator.
23767 (p9_xxbrd_v2df): New expander.
23768 (p9_xxbrw_<mode>): Changed to ...
23769 (p9_xxbrw_v4si): ... this insn, without VSX_W iterator.
23770 (p9_xxbrw_v4sf): New expander.
23772 2018-02-09 Sebastian Perta <sebastian.perta@renesas.com>
23774 * config/rx/rx.md (movsicc): Update expander to be matched by GCC.
23776 2018-02-09 Peter Bergner <bergner@vnet.ibm.com>
23779 * config/rs6000/vsx.md (vsx_mul_v2di): Handle generating a 64-bit
23780 multiply in 32-bit mode.
23781 (vsx_div_v2di): Handle generating a 64-bit signed divide in 32-bit mode.
23782 (vsx_udiv_v2di): Handle generating a 64-bit unsigned divide in 32-bit
23785 2018-02-09 Sebastian Perta <sebastian.perta@renesas.com>
23787 * config/rx/constraints.md (CALL_OP_SYMBOL_REF): Added new constraint
23788 to allow or block "symbol_ref" depending on the value of TARGET_JSR.
23789 * config/rx/rx.md (call_internal): Use CALL_OP_SYMBOL_REF.
23790 * config/rx/rx.md (call_value_internal): Use CALL_OP_SYMBOL_REF.
23792 2018-02-09 Pierre-Marie de Rodat <derodat@adacore.com>
23795 * dwarf2out.c (is_trivial_indirect_ref): New function.
23796 (dwarf2out_late_global_decl): Do not generate a location
23797 attribute for variables that have a non-trivial DECL_VALUE_EXPR
23798 and that are not defined in the current unit.
23800 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
23802 * optabs.c (prepare_cmp_insn): Try harder to emit a direct comparison
23803 instead of a libcall for UNORDERED.
23805 2018-02-09 Tamar Christina <tamar.christina@arm.com>
23808 * config/arm/arm-c.c (arm_cpu_builtins): Un-define __ARM_FEATURE_LDREX,
23809 __ARM_ARCH_PROFILE, __ARM_ARCH_ISA_THUMB, __ARM_FP and __ARM_NEON_FP.
23811 2018-02-09 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
23814 * config/s390/s390.c (s390_set_current_function): Invoke
23815 s390_indirect_branch_settings also if fndecl didn't change.
23817 2018-02-09 Alexandre Oliva <aoliva@redhat.com>
23819 * config/rs6000/rs6000.md (blockage): Set length to zero.
23821 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
23823 * expr.c (optimize_bitfield_assignment_op): Remove obsolete assertion.
23825 2018-02-09 Jakub Jelinek <jakub@redhat.com>
23828 * gcc.c (STATIC_LIBASAN_LIBS, STATIC_LIBTSAN_LIBS,
23829 STATIC_LIBLSAN_LIBS, STATIC_LIBUBSAN_LIBS): Handle -static like
23833 * var-tracking.c (vt_add_function_parameter): Punt for non-onepart
23834 PARALLEL incoming that failed vt_get_decl_and_offset check.
23836 PR middle-end/84237
23837 * output.h (bss_initializer_p): Add NAMED argument, defaulted to false.
23838 * varasm.c (bss_initializer_p): Add NAMED argument, if true, ignore
23840 (get_variable_section): For decls in named .bss* sections pass true as
23841 second argument to bss_initializer_p.
23843 2018-02-09 Marek Polacek <polacek@redhat.com>
23844 Jakub Jelinek <jakub@redhat.com>
23847 * fold-const.c (fold_indirect_ref_1): Use VECTOR_TYPE_P macro.
23848 Formatting fixes. Verify first that tree_fits_poly_int64_p (op01).
23849 Sync some changes from cxx_fold_indirect_ref.
23851 2018-02-09 Alexandre Oliva <aoliva@redhat.com>
23853 * cfgexpand.c (expand_gimple_basic_block): Handle inline entry
23855 * dwarf2out.c (dwarf2_debug_hooks): Enable inline_entry hook.
23856 (BLOCK_INLINE_ENTRY_LABEL): New.
23857 (dwarf2out_var_location): Disregard inline entry markers.
23858 (inline_entry_data): New struct.
23859 (inline_entry_data_hasher): New hashtable type.
23860 (inline_entry_data_hasher::hash): New.
23861 (inline_entry_data_hasher::equal): New.
23862 (inline_entry_data_table): New variable.
23863 (add_high_low_attributes): Add DW_AT_entry_pc and
23864 DW_AT_GNU_entry_view attributes if a pending entry is found
23865 in inline_entry_data_table. Add old entry_pc attribute only
23866 if debug nonbinding markers are disabled.
23867 (gen_inlined_subroutine_die): Set BLOCK_DIE if nonbinding
23868 markers are enabled.
23869 (block_within_block_p, dwarf2out_inline_entry): New.
23870 (dwarf2out_finish): Check that no entries remained in
23871 inline_entry_data_table.
23872 * final.c (reemit_insn_block_notes): Handle inline entry notes.
23873 (final_scan_insn, notice_source_line): Likewise.
23874 (rest_of_clean_state): Skip inline entry markers.
23875 * gimple-pretty-print.c (dump_gimple_debug): Handle inline entry
23877 * gimple.c (gimple_build_debug_inline_entry): New.
23878 * gimple.h (enum gimple_debug_subcode): Add
23879 GIMPLE_DEBUG_INLINE_ENTRY.
23880 (gimple_build_debug_inline_entry): Declare.
23881 (gimple_debug_inline_entry_p): New.
23882 (gimple_debug_nonbind_marker_p): Adjust.
23883 * insn-notes.def (INLINE_ENTRY): New.
23884 * print-rtl.c (rtx_writer::print_rtx_operand_code_0): Handle
23885 inline entry marker notes.
23886 (print_insn): Likewise.
23887 * rtl.h (NOTE_MARKER_P): Add INLINE_ENTRY support.
23888 (INSN_DEBUG_MARKER_KIND): Likewise.
23889 (GEN_RTX_DEBUG_MARKER_INLINE_ENTRY_PAT): New.
23890 * tree-inline.c (expand_call_inline): Build and insert
23891 debug_inline_entry stmt.
23892 * tree-ssa-live.c (remove_unused_scope_block_p): Preserve
23893 inline entry blocks early, if nonbind markers are enabled.
23894 (dump_scope_block): Dump fragment info.
23895 * var-tracking.c (reemit_marker_as_note): Handle inline entry note.
23896 * doc/gimple.texi (gimple_debug_inline_entry_p): New.
23897 (gimple_build_debug_inline_entry): New.
23898 * doc/invoke.texi (gstatement-frontiers, gno-statement-frontiers):
23899 Enable/disable inline entry points too.
23900 * doc/rtl.texi (NOTE_INSN_INLINE_ENTRY): New.
23901 (DEBUG_INSN): Describe inline entry markers.
23903 * common.opt (gvariable-location-views): New.
23904 (gvariable-location-views=incompat5): New.
23905 * config.in: Rebuilt.
23906 * configure: Rebuilt.
23907 * configure.ac: Test assembler for view support.
23908 * dwarf2asm.c (dw2_asm_output_symname_uleb128): New.
23909 * dwarf2asm.h (dw2_asm_output_symname_uleb128): Declare.
23910 * dwarf2out.c (var_loc_view): New typedef.
23911 (struct dw_loc_list_struct): Add vl_symbol, vbegin, vend.
23912 (dwarf2out_locviews_in_attribute): New.
23913 (dwarf2out_locviews_in_loclist): New.
23914 (dw_val_equal_p): Compare val_view_list of dw_val_class_view_lists.
23915 (enum dw_line_info_opcode): Add LI_adv_address.
23916 (struct dw_line_info_table): Add view.
23917 (RESET_NEXT_VIEW, RESETTING_VIEW_P): New macros.
23918 (DWARF2_ASM_VIEW_DEBUG_INFO): Define default.
23919 (zero_view_p): New variable.
23920 (ZERO_VIEW_P): New macro.
23921 (output_asm_line_debug_info): New.
23922 (struct var_loc_node): Add view.
23923 (add_AT_view_list, AT_loc_list): New.
23924 (add_var_loc_to_decl): Add view param. Test it against last.
23925 (new_loc_list): Add view params. Record them.
23926 (AT_loc_list_ptr): Handle loc and view lists.
23927 (view_list_to_loc_list_val_node): New.
23928 (print_dw_val): Handle dw_val_class_view_list.
23929 (size_of_die): Likewise.
23930 (value_format): Likewise.
23931 (loc_list_has_views): New.
23932 (gen_llsym): Set vl_symbol too.
23933 (maybe_gen_llsym, skip_loc_list_entry): New.
23934 (dwarf2out_maybe_output_loclist_view_pair): New.
23935 (output_loc_list): Output view list or entries too.
23936 (output_view_list_offset): New.
23937 (output_die): Handle dw_val_class_view_list.
23938 (output_dwarf_version): New.
23939 (output_compilation_unit_header): Use it.
23940 (output_skeleton_debug_sections): Likewise.
23941 (output_rnglists, output_line_info): Likewise.
23942 (output_pubnames, output_aranges): Update version comments.
23943 (output_one_line_info_table): Output view numbers in asm comments.
23944 (dw_loc_list): Determine current endview, pass it to new_loc_list.
23945 Call maybe_gen_llsym.
23946 (loc_list_from_tree_1): Adjust.
23947 (add_AT_location_description): Create view list attribute if
23948 needed, check it's absent otherwise.
23949 (convert_cfa_to_fb_loc_list): Adjust.
23950 (maybe_emit_file): Call output_asm_line_debug_info for test.
23951 (dwarf2out_var_location): Reset views as needed. Precompute
23952 add_var_loc_to_decl args. Call get_attr_min_length only if we have the
23953 attribute. Set view.
23954 (new_line_info_table): Reset next view.
23955 (set_cur_line_info_table): Call output_asm_line_debug_info for test.
23956 (dwarf2out_source_line): Likewise. Output view resets and labels to
23957 the assembler, or select appropriate line info opcodes.
23958 (prune_unused_types_walk_attribs): Handle dw_val_class_view_list.
23959 (optimize_string_length): Catch it. Adjust.
23960 (resolve_addr): Copy vl_symbol along with ll_symbol. Handle
23961 dw_val_class_view_list, and remove it if no longer needed.
23962 (hash_loc_list): Hash view numbers.
23963 (loc_list_hasher::equal): Compare them.
23964 (optimize_location_lists): Check whether a view list symbol is
23965 needed, and whether the locview attribute is present, and
23966 whether they match. Remove the locview attribute if no longer
23968 (index_location_lists): Call skip_loc_list_entry for test.
23969 (dwarf2out_finish): Call output_asm_line_debug_info for test.
23970 Use output_dwarf_version.
23971 * dwarf2out.h (enum dw_val_class): Add dw_val_class_view_list.
23972 (struct dw_val_node): Add val_view_list.
23973 * final.c (SEEN_NEXT_VIEW): New.
23974 (set_next_view_needed): New.
23975 (clear_next_view_needed): New.
23976 (maybe_output_next_view): New.
23977 (final_start_function): Rename to...
23978 (final_start_function_1): ... this. Take pointer to FIRST,
23979 add SEEN parameter. Emit param bindings in the initial view.
23980 (final_start_function): Reintroduce SEEN-less interface.
23981 (final): Rename to...
23982 (final_1): ... this. Take SEEN parameter. Output final pending
23983 next view at the end.
23984 (final): Reintroduce seen-less interface.
23985 (final_scan_insn): Output pending next view before switching
23986 sections or ending a block. Mark the next view as needed when
23987 outputting variable locations. Notify debug backend of section
23988 changes, and of location view changes.
23989 (rest_of_handle_final): Adjust.
23990 * toplev.c (process_options): Autodetect value for debug variable
23991 location views option. Warn on incompat5 without -gdwarf-5.
23992 * doc/invoke.texi (gvariable-location-views): New.
23993 (gvariable-location-views=incompat5): New.
23994 (gno-variable-location-views): New.
23996 2018-02-08 David Malcolm <dmalcolm@redhat.com>
23998 PR tree-optimization/84136
23999 * tree-cfg.c (find_taken_edge_computed_goto): Remove assertion
24000 that the result of find_edge is non-NULL.
24002 2018-02-08 Sergey Shalnov <sergey.shalnov@intel.com>
24005 * config/i386/x86-tune-costs.h (skylake_cost): Fix cost of
24006 storing integer register in SImode. Fix cost of 256 and 512
24007 byte aligned SSE register store.
24009 2018-02-08 Sergey Shalnov <sergey.shalnov@intel.com>
24011 * config/i386/i386.c (ix86_multiplication_cost): Fix
24012 multiplication cost for TARGET_AVX512DQ.
24014 2018-02-08 Marek Polacek <polacek@redhat.com>
24016 PR tree-optimization/84238
24017 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Verify the result of
24020 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
24022 PR tree-optimization/84265
24023 * tree-vect-stmts.c (vectorizable_store): Don't treat
24024 VMAT_CONTIGUOUS accesses as grouped.
24025 (vectorizable_load): Likewise.
24027 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
24029 PR tree-optimization/81635
24030 * wide-int.h (wi::round_down_for_mask, wi::round_up_for_mask): Declare.
24031 * wide-int.cc (wi::round_down_for_mask, wi::round_up_for_mask)
24032 (test_round_for_mask): New functions.
24033 (wide_int_cc_tests): Call test_round_for_mask.
24034 * tree-vrp.h (intersect_range_with_nonzero_bits): Declare.
24035 * tree-vrp.c (intersect_range_with_nonzero_bits): New function.
24036 * tree-data-ref.c (split_constant_offset_1): Use it to refine the
24037 range returned by get_range_info.
24039 2018-02-08 Jan Hubicka <hubicka@ucw.cz>
24042 * cgraph.h (symtab_node::output_to_lto_symbol_table_p): Declare
24043 * symtab.c: Include builtins.h
24044 (symtab_node::output_to_lto_symbol_table_p): Move here
24045 from lto-streamer-out.c:output_symbol_p.
24046 * lto-streamer-out.c (write_symbol): Turn early exit to assert.
24047 (output_symbol_p): Move all logic to symtab.c
24048 (produce_symtab): Update.
24050 2018-02-08 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
24052 * config/s390/s390-opts.h (enum indirect_branch): Define.
24053 * config/s390/s390-protos.h (s390_return_addr_from_memory)
24054 (s390_indirect_branch_via_thunk)
24055 (s390_indirect_branch_via_inline_thunk): Add function prototypes.
24056 (enum s390_indirect_branch_type): Define.
24057 * config/s390/s390.c (struct s390_frame_layout, struct
24058 machine_function): Remove.
24059 (indirect_branch_prez10thunk_mask, indirect_branch_z10thunk_mask)
24060 (indirect_branch_table_label_no, indirect_branch_table_name):
24062 (INDIRECT_BRANCH_NUM_OPTIONS): Define macro.
24063 (enum s390_indirect_branch_option): Define.
24064 (s390_return_addr_from_memory): New function.
24065 (s390_handle_string_attribute): New function.
24066 (s390_attribute_table): Add new attribute handler.
24067 (s390_execute_label): Handle UNSPEC_EXECUTE_JUMP patterns.
24068 (s390_indirect_branch_via_thunk): New function.
24069 (s390_indirect_branch_via_inline_thunk): New function.
24070 (s390_function_ok_for_sibcall): When jumping via thunk disallow
24071 sibling call optimization for non z10 compiles.
24072 (s390_emit_call): Force indirect branch target to be a single
24073 register. Add r1 clobber for non-z10 compiles.
24074 (s390_emit_epilogue): Emit return jump via return_use expander.
24075 (s390_reorg): Handle JUMP_INSNs as execute targets.
24076 (s390_option_override_internal): Perform validity checks for the
24077 new command line options.
24078 (s390_indirect_branch_attrvalue): New function.
24079 (s390_indirect_branch_settings): New function.
24080 (s390_set_current_function): Invoke s390_indirect_branch_settings.
24081 (s390_output_indirect_thunk_function): New function.
24082 (s390_code_end): Implement target hook.
24083 (s390_case_values_threshold): Implement target hook.
24084 (TARGET_ASM_CODE_END, TARGET_CASE_VALUES_THRESHOLD): Define target
24086 * config/s390/s390.h (struct s390_frame_layout)
24087 (struct machine_function): Move here from s390.c.
24088 (TARGET_INDIRECT_BRANCH_NOBP_RET)
24089 (TARGET_INDIRECT_BRANCH_NOBP_JUMP)
24090 (TARGET_INDIRECT_BRANCH_NOBP_JUMP_THUNK)
24091 (TARGET_INDIRECT_BRANCH_NOBP_JUMP_INLINE_THUNK)
24092 (TARGET_INDIRECT_BRANCH_NOBP_CALL)
24093 (TARGET_DEFAULT_INDIRECT_BRANCH_TABLE)
24094 (TARGET_INDIRECT_BRANCH_THUNK_NAME_EXRL)
24095 (TARGET_INDIRECT_BRANCH_THUNK_NAME_EX)
24096 (TARGET_INDIRECT_BRANCH_TABLE): Define macros.
24097 * config/s390/s390.md (UNSPEC_EXECUTE_JUMP)
24098 (INDIRECT_BRANCH_THUNK_REGNUM): Define constants.
24099 (mnemonic attribute): Add values which aren't recognized
24101 ("*cjump_long", "*icjump_long", "*basr", "*basr_r"): Disable
24102 pattern for branch conversion. Fix mnemonic attribute.
24103 ("*c<code>", "*sibcall_br", "*sibcall_value_br", "*return"): Emit
24104 indirect branch via thunk if requested.
24105 ("indirect_jump", "<code>"): Expand patterns for branch conversion.
24106 ("*indirect_jump"): Disable for branch conversion using out of
24108 ("indirect_jump_via_thunk<mode>_z10")
24109 ("indirect_jump_via_thunk<mode>")
24110 ("indirect_jump_via_inlinethunk<mode>_z10")
24111 ("indirect_jump_via_inlinethunk<mode>", "*casesi_jump")
24112 ("casesi_jump_via_thunk<mode>_z10", "casesi_jump_via_thunk<mode>")
24113 ("casesi_jump_via_inlinethunk<mode>_z10")
24114 ("casesi_jump_via_inlinethunk<mode>", "*basr_via_thunk<mode>_z10")
24115 ("*basr_via_thunk<mode>", "*basr_r_via_thunk_z10")
24116 ("*basr_r_via_thunk", "return<mode>_prez10"): New pattern.
24117 ("*indirect2_jump"): Disable for branch conversion.
24118 ("casesi_jump"): Turn into expander and expand patterns for branch
24120 ("return_use"): New expander.
24121 ("*return"): Emit return via thunk and rename it to ...
24122 ("*return<mode>"): ... this one.
24123 * config/s390/s390.opt: Add new options and and enum for the
24126 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
24128 * lra-constraints.c (match_reload): Unconditionally use
24129 gen_lowpart_SUBREG, rather than selecting between that
24130 and equivalent gen_rtx_SUBREG code.
24132 2018-02-08 Richard Biener <rguenther@suse.de>
24134 PR tree-optimization/84233
24135 * tree-ssa-phiprop.c (propagate_with_phi): Use separate
24136 changed flag instead of boguously re-using phi_inserted.
24138 2018-02-08 Martin Jambor <mjambor@suse.cz>
24140 * hsa-gen.c (get_symbol_for_decl): Set program allocation for
24141 static local variables.
24143 2018-02-08 Richard Biener <rguenther@suse.de>
24145 PR tree-optimization/84278
24146 * tree-vect-stmts.c (vectorizable_store): When looking for
24147 smaller vector types to perform grouped strided loads/stores
24148 make sure the mode is supported by the target.
24149 (vectorizable_load): Likewise.
24151 2018-02-08 Wilco Dijkstra <wdijkstr@arm.com>
24153 * config/aarch64/aarch64.c (aarch64_components_for_bb):
24154 Increase LDP/STP opportunities by adding adjacent callee-saves.
24156 2018-02-08 Wilco Dijkstra <wdijkstr@arm.com>
24158 PR rtl-optimization/84068
24159 PR rtl-optimization/83459
24160 * haifa-sched.c (rank_for_schedule): Fix SCHED_PRESSURE_MODEL sorting.
24162 2018-02-08 Aldy Hernandez <aldyh@redhat.com>
24164 PR tree-optimization/84224
24165 * gimple-ssa-warn-alloca.c (pass_walloca::execute): Remove assert.
24166 * calls.c (gimple_alloca_call_p): Only return TRUE when we have
24167 non-zero arguments.
24169 2018-02-07 Iain Sandoe <iain@codesourcery.com>
24172 * config/rs6000/altivec.md (*restore_world): Remove LR use.
24173 * config/rs6000/predicates.md (restore_world_operation): Adjust op
24174 count, remove one USE.
24176 2018-02-07 Michael Meissner <meissner@linux.vnet.ibm.com>
24178 * doc/install.texi (Configuration): Document the
24179 --with-long-double-format={ibm,ieee} PowerPC configuration
24183 * config/rs6000/rs6000.md (fix_trunc<SFDF:mode><QHI:mode>2):
24184 Convert from define_expand to be define_insn_and_split. Rework
24185 float/double/_Float128 conversions to QI/HI/SImode to work with
24186 both ISA 2.07 (power8) or ISA 3.0 (power9). Fix regression where
24187 conversions to QI/HImode types did a store and then a load to
24188 truncate the value. For conversions to VSX registers, don't split
24189 the insn, instead emit the code directly. Use the code iterator
24190 any_fix to combine signed and unsigned conversions.
24191 (fix<uns>_trunc<SFDF:mode>si2_p8): Likewise.
24192 (fixuns_trunc<SFDF:mode><QHI:mode>2): Likewise.
24193 (fix_trunc<IEEE128:mode><QHI:mode>2): Likewise.
24194 (fix<uns>_trunc<SFDF:mode><QHI:mode>2): Likewise.
24195 (fix_<mode>di2_hw): Likewise.
24196 (fixuns_<mode>di2_hw): Likewise.
24197 (fix_<mode>si2_hw): Likewise.
24198 (fixuns_<mode>si2_hw): Likewise.
24199 (fix<uns>_<IEEE128:mode><SDI:mode>2_hw): Likewise.
24200 (fix<uns>_trunc<IEEE128:mode><QHI:mode>2): Likewise.
24201 (fctiw<u>z_<mode>_smallint): Rename fctiw<u>z_<mode>_smallint to
24202 fix<uns>_trunc<SFDF:mode>si2_p8.
24203 (fix_trunc<SFDF:mode><QHI:mode>2_internal): Delete, no longer used.
24204 (fixuns_trunc<SFDF:mode><QHI:mode>2_internal): Likewise.
24205 (fix<uns>_<mode>_mem): Likewise.
24206 (fctiw<u>z_<mode>_mem): Likewise.
24207 (fix<uns>_<mode>_mem): Likewise.
24208 (fix<uns>_trunc<SFDF:mode><QHSI:mode>2_mem): On ISA 3.0, prevent
24209 the register allocator from doing a direct move to the GPRs to do
24210 a store, and instead use the ISA 3.0 store byte/half-word from
24211 vector register instruction. For IEEE 128-bit floating point,
24212 also optimize stores of 32-bit ints.
24213 (fix<uns>_trunc<IEEE128:mode><QHSI:mode>2_mem): Likewise.
24215 2018-02-07 Alan Hayward <alan.hayward@arm.com>
24217 * genextract.c (push_pathstr_operand): New function to support
24219 (walk_rtx): Call push_pathstr_operand.
24220 (print_path): Support [a-zA-Z].
24222 2018-02-07 Richard Biener <rguenther@suse.de>
24224 PR tree-optimization/84037
24225 * tree-vectorizer.h (struct _loop_vec_info): Add ivexpr_map member.
24226 (cse_and_gimplify_to_preheader): Declare.
24227 (vect_get_place_in_interleaving_chain): Likewise.
24228 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
24230 (_loop_vec_info::~_loop_vec_info): Delete it.
24231 (cse_and_gimplify_to_preheader): New function.
24232 * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Export.
24233 * tree-vect-stmts.c (vectorizable_store): CSE base and steps.
24234 (vectorizable_load): Likewise. For grouped stores always base
24235 the IV on the first element.
24236 * tree-vect-loop-manip.c (vect_loop_versioning): Unshare versioning
24237 condition before gimplifying.
24239 2018-02-07 Jakub Jelinek <jakub@redhat.com>
24241 * tree-eh.c (operation_could_trap_helper_p): Ignore honor_trapv for
24242 *DIV_EXPR and *MOD_EXPR.
24244 2018-02-07 H.J. Lu <hongjiu.lu@intel.com>
24247 * config/i386/i386.c (ix86_option_override_internal): Mask out
24248 the CF_SET bit when checking -fcf-protection.
24250 2018-02-07 Tom de Vries <tom@codesourcery.com>
24253 * omp-expand.c (expand_oacc_collapse_init): Ensure diff_type is large
24256 2018-02-07 Richard Biener <rguenther@suse.de>
24258 PR tree-optimization/84204
24259 * tree-chrec.c (chrec_fold_plus_1): Remove size limiting in
24262 PR tree-optimization/84205
24263 * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Also
24264 special-case isl_ast_op_zdiv_r.
24266 PR tree-optimization/84223
24267 * graphite-scop-detection.c (gather_bbs::before_dom_children):
24268 Only add conditions from within the region.
24269 (gather_bbs::after_dom_children): Adjust.
24271 2018-02-07 Georg-Johann Lay <avr@gjlay.de>
24274 * config/avr/avr.h (GENERAL_REGNO_P, GENERAL_REG_P): New macros.
24275 * config/avr/avr.md: Only post-reload split REG-REG moves if
24276 either register is GENERAL_REG_P.
24278 2018-02-07 Jakub Jelinek <jakub@redhat.com>
24280 PR tree-optimization/84235
24281 * tree-ssa-scopedtables.c
24282 (avail_exprs_stack::simplify_binary_operation): Fir MINUS_EXPR, punt
24283 if the subtraction is performed in floating point type where NaNs are
24284 honored. For *DIV_EXPR, punt for ALL_FRACT_MODE_Ps where we can't
24285 build 1. Formatting fix.
24287 2018-02-06 Jakub Jelinek <jakub@redhat.com>
24290 * config/i386/i386.c (rest_of_insert_endbranch): Only skip
24291 NOTE_INSN_CALL_ARG_LOCATION after a call, not anything else,
24292 and skip it regardless of bb boundaries. Use CALL_P macro,
24293 don't test INSN_P (insn) together with CALL_P or JUMP_P check
24294 unnecessarily, formatting fix.
24296 2018-02-06 Michael Collison <michael.collison@arm.com>
24298 * config/arm/thumb2.md:
24299 (*thumb2_mov_negscc): Split only if TARGET_THUMB2 && !arm_restrict_it.
24300 (*thumb_mov_notscc): Ditto.
24302 2018-02-06 Michael Meissner <meissner@linux.vnet.ibm.com>
24305 * config/rs6000/rs6000.md (su code attribute): Use "u" for
24306 unsigned_fix, not "s".
24308 2018-02-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
24310 * configure.ac (gcc_fn_eh_frame_ro): New function.
24311 (gcc_cv_as_cfi_directive): Check both 32 and 64-bit assembler for
24312 correct .eh_frame permissions.
24313 * configure: Regenerate.
24315 2018-02-06 Andrew Jenner <andrew@codeourcery.com>
24317 * doc/invoke.texi: Add section for the PowerPC SPE backend. Remove
24318 irrelevant options.
24320 2018-02-06 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
24322 * config/rs6000/rs6000.c (rs6000_option_override_internal):
24323 Display warning message for -mno-speculate-indirect-jumps.
24325 2018-02-06 Andrew Jenner <andrew@codesourcery.com>
24327 * config/powerpcspe/powerpcspe.opt: (msimple-fpu, mfpu) Add
24329 * config/powerpcspe/sysv4.opt (mbit-align): Likewise.
24331 2018-02-06 Aldy Hernandez <aldyh@redhat.com>
24333 PR tree-optimization/84225
24334 * tree-eh.c (find_trapping_overflow): Only call
24335 operation_no_trapping_overflow when ANY_INTEGRAL_TYPE_P.
24337 2018-02-06 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
24340 * config/i386/i386.c: Reimplement the check of possible options
24341 -mibt/-mshstk conbination. Change error messages.
24342 * doc/invoke.texi: Fix a typo: remove extra '='.
24344 2018-02-06 Marek Polacek <polacek@redhat.com>
24346 PR tree-optimization/84228
24347 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Skip debug statements.
24349 2018-02-06 Tamar Christina <tamar.christina@arm.com>
24352 * config/arm/arm.c (arm_print_asm_arch_directives): Record already
24353 emitted arch directives.
24354 * config/arm/arm-c.c (arm_cpu_builtins): Undefine __ARM_ARCH and
24355 __ARM_FEATURE_COPROC before changing architectures.
24357 2018-02-06 Richard Biener <rguenther@suse.de>
24359 * config/i386/i386.c (print_reg): Fix typo.
24360 (ix86_loop_unroll_adjust): Do not unroll beyond the original nunroll.
24362 2018-02-06 Eric Botcazou <ebotcazou@adacore.com>
24364 * configure: Regenerate.
24366 2018-02-05 Martin Sebor <msebor@redhat.com>
24368 PR tree-optimization/83369
24369 * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Use %G to print
24372 2018-02-05 Martin Liska <mliska@suse.cz>
24374 * doc/invoke.texi: Cherry-pick upstream r323995.
24376 2018-02-05 Richard Sandiford <richard.sandiford@linaro.org>
24378 * ira.c (ira_init_register_move_cost): Adjust comment.
24380 2018-02-05 Martin Liska <mliska@suse.cz>
24382 PR gcov-profile/84137
24383 * doc/gcov.texi: Fix typo in documentation.
24385 2018-02-05 Martin Liska <mliska@suse.cz>
24387 PR gcov-profile/83879
24388 * doc/gcov.texi: Document necessity of --dynamic-list-data when
24389 using dlopen functionality.
24391 2018-02-05 Olga Makhotina <olga.makhotina@intel.com>
24393 * config/i386/avx512dqintrin.h (_mm_mask_range_sd, _mm_maskz_range_sd,
24394 _mm_mask_range_round_sd, _mm_maskz_range_round_sd, _mm_mask_range_ss,
24395 _mm_maskz_range_ss, _mm_mask_range_round_ss,
24396 _mm_maskz_range_round_ss): New intrinsics.
24397 (__builtin_ia32_rangesd128_round)
24398 (__builtin_ia32_rangess128_round): Remove.
24399 (__builtin_ia32_rangesd128_mask_round,
24400 __builtin_ia32_rangess128_mask_round): New builtins.
24401 * config/i386/i386-builtin.def (__builtin_ia32_rangesd128_round,
24402 __builtin_ia32_rangess128_round): Remove.
24403 (__builtin_ia32_rangesd128_mask_round,
24404 __builtin_ia32_rangess128_mask_round): New builtins.
24405 * config/i386/sse.md (ranges<mode><round_saeonly_name>): Renamed to ...
24406 (ranges<mode><mask_scalar_name><round_saeonly_scalar_name>): ... this.
24407 ((match_operand:VF_128 2 "<round_saeonly_nimm_predicate>"
24408 "<round_saeonly_constraint>")): Changed to ...
24409 ((match_operand:VF_128 2 "<round_saeonly_scalar_nimm_predicate>"
24410 "<round_saeonly_scalar_constraint>")): ... this.
24411 ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_op4>%2, %1, %0|
24412 %0, %1, %2<round_saeonly_op4>, %3}"): Changed to ...
24413 ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_scalar_mask_op4>%2,
24414 %1, %0<mask_scalar_operand4>|%0<mask_scalar_operand4>, %1,
24415 %2<round_saeonly_scalar_mask_op4>, %3}"): ... this.
24417 2018-02-02 Andrew Jenner <andrew@codesourcery.com>
24419 * config/powerpcspe/powerpcspe.opt: Add Undocumented to irrelevant
24421 * config/powerpcspe/powerpcspe-tables.opt (rs6000_cpu_opt_value):
24422 Remove all values except native, 8540 and 8548.
24424 2018-02-02 H.J. Lu <hongjiu.lu@intel.com>
24426 * config/i386/i386.c (ix86_output_function_return): Pass
24427 INVALID_REGNUM, instead of -1, as invalid register number to
24428 indirect_thunk_name and output_indirect_thunk.
24430 2018-02-02 Julia Koval <julia.koval@intel.com>
24432 * config.gcc: Add -march=icelake.
24433 * config/i386/driver-i386.c (host_detect_local_cpu): Detect icelake.
24434 * config/i386/i386-c.c (ix86_target_macros_internal): Handle icelake.
24435 * config/i386/i386.c (processor_costs): Add m_ICELAKE.
24436 (PTA_ICELAKE, PTA_AVX512VNNI, PTA_GFNI, PTA_VAES, PTA_AVX512VBMI2,
24437 PTA_VPCLMULQDQ, PTA_RDPID, PTA_AVX512BITALG): New.
24438 (processor_target_table): Add icelake.
24439 (ix86_option_override_internal): Handle new PTAs.
24440 (get_builtin_code_for_version): Handle icelake.
24441 (M_INTEL_COREI7_ICELAKE): New.
24442 (fold_builtin_cpu): Handle icelake.
24443 * config/i386/i386.h (TARGET_ICELAKE, PROCESSOR_ICELAKE): New.
24444 * doc/invoke.texi: Add -march=icelake.
24446 2018-02-02 Julia Koval <julia.koval@intel.com>
24448 * config/i386/i386.c (ix86_option_override_internal): Change flags type
24449 to wide_int_bitmask.
24450 * wide-int-bitmask.h: New.
24452 2018-02-02 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
24455 * config/i386/i386.md: Replace Pmode with word_mode in
24456 builtin_setjmp_setup and builtin_longjmp to support x32.
24458 2018-02-01 Peter Bergner <bergner@vnet.ibm.com>
24462 * config/rs6000/driver-rs6000.c: #include "diagnostic.h".
24464 (rs6000_supported_cpu_names): New static variable.
24465 (linux_cpu_translation_table): Likewise.
24466 (elf_platform) <cpu>: Define new static variable and use it.
24467 Translate kernel AT_PLATFORM name to canonical name if needed.
24468 Error if platform name is unknown.
24470 2018-02-01 Aldy Hernandez <aldyh@redhat.com>
24473 * config/pa/predicates.md (base14_operand): Handle E_VOIDmode.
24475 2018-02-01 Jeff Law <law@redhat.com>
24478 * config/i386/i386.c (release_scratch_register_on_entry): Add new
24479 OFFSET and RELEASE_VIA_POP arguments. Use SP+OFFSET to restore
24480 the scratch if RELEASE_VIA_POP is false.
24481 (ix86_adjust_stack_and_probe_stack_clash): Un-constify SIZE.
24482 If we have to save a temporary register, decrement SIZE appropriately.
24483 Pass new arguments to release_scratch_register_on_entry.
24484 (ix86_adjust_stack_and_probe): Likewise.
24485 (ix86_emit_probe_stack_range): Pass new arguments to
24486 release_scratch_register_on_entry.
24488 2018-02-01 Uros Bizjak <ubizjak@gmail.com>
24490 PR rtl-optimization/84157
24491 * combine.c (change_zero_ext): Use REG_P predicate in
24492 front of HARD_REGISTER_P predicate.
24494 2018-02-01 Georg-Johann Lay <avr@gjlay.de>
24496 * config/avr/avr.c (avr_option_override): Move disabling of
24497 -fdelete-null-pointer-checks to...
24498 * common/config/avr/avr-common.c (avr_option_optimization_table):
24501 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
24503 PR tree-optimization/81635
24504 * tree-data-ref.c (split_constant_offset_1): For types that
24505 wrap on overflow, try to use range info to prove that wrapping
24508 2018-02-01 Renlin Li <renlin.li@arm.com>
24511 * config/aarch64/aarch64.c (aarch64_class_max_nregs): Handle
24512 TAILCALL_ADDR_REGS.
24513 (aarch64_register_move_cost): Likewise.
24514 * config/aarch64/aarch64.h (reg_class): Rename CALLER_SAVE_REGS to
24515 TAILCALL_ADDR_REGS.
24516 (REG_CLASS_NAMES): Likewise.
24517 (REG_CLASS_CONTENTS): Rename CALLER_SAVE_REGS to
24518 TAILCALL_ADDR_REGS. Remove IP registers.
24519 * config/aarch64/aarch64.md (Ucs): Update register constraint.
24521 2018-02-01 Richard Biener <rguenther@suse.de>
24523 * domwalk.h (dom_walker::dom_walker): Add additional constructor
24524 for specifying RPO order and allow NULL for that.
24525 * domwalk.c (dom_walker::dom_walker): Likewise.
24526 (dom_walker::walk): Handle NULL RPO order.
24527 * tree-into-ssa.c (rewrite_dom_walker): Do not walk dom children
24529 (rewrite_update_dom_walker): Likewise.
24530 (mark_def_dom_walker): Likewise.
24532 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
24534 * config/aarch64/aarch64-protos.h (aarch64_split_sve_subreg_move)
24535 (aarch64_maybe_expand_sve_subreg_move): Declare.
24536 * config/aarch64/aarch64.md (UNSPEC_REV_SUBREG): New unspec.
24537 * config/aarch64/predicates.md (aarch64_any_register_operand): New
24539 * config/aarch64/aarch64-sve.md (mov<mode>): Optimize subreg moves
24540 that are semantically a reverse operation.
24541 (*aarch64_sve_mov<mode>_subreg_be): New pattern.
24542 * config/aarch64/aarch64.c (aarch64_maybe_expand_sve_subreg_move):
24543 (aarch64_replace_reg_mode, aarch64_split_sve_subreg_move): New
24545 (aarch64_can_change_mode_class): For big-endian, forbid changes
24546 between two SVE modes if they have different element sizes.
24548 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
24550 * config/aarch64/aarch64.c (aarch64_expand_sve_const_vector): Prefer
24551 the TImode handling for big-endian targets.
24553 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
24555 * config/aarch64/aarch64-sve.md (sve_ld1rq): Replace with...
24556 (*sve_ld1rq<Vesize>): ... this new pattern. Handle all element sizes,
24558 * config/aarch64/aarch64.c (aarch64_expand_sve_widened_duplicate):
24559 Remove BSWAP handing for big-endian targets and use the form of
24560 LD1RQ appropariate for the mode.
24562 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
24564 * config/aarch64/aarch64.c (aarch64_simd_valid_immediate): Handle
24565 all CONST_VECTOR_DUPLICATE_P vectors, not just those with a single
24566 duplicated element.
24568 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
24571 * config/aarch64/aarch64.c (aarch64_secondary_reload): Tighten
24572 check for operands that need to go through aarch64_sve_reload_be.
24574 2018-02-01 Jakub Jelinek <jakub@redhat.com>
24576 PR tree-optimization/81661
24577 PR tree-optimization/84117
24578 * tree-eh.h (rewrite_to_non_trapping_overflow): Declare.
24579 * tree-eh.c: Include gimplify.h.
24580 (find_trapping_overflow, replace_trapping_overflow,
24581 rewrite_to_non_trapping_overflow): New functions.
24582 * tree-vect-loop.c: Include tree-eh.h.
24583 (vect_get_loop_niters): Use rewrite_to_non_trapping_overflow.
24584 * tree-data-ref.c: Include tree-eh.h.
24585 (get_segment_min_max): Use rewrite_to_non_trapping_overflow.
24587 2018-01-31 Uros Bizjak <ubizjak@gmail.com>
24589 PR rtl-optimization/84123
24590 * combine.c (change_zero_ext): Check if hard register satisfies
24591 can_change_dest_mode before calling gen_lowpart_SUBREG.
24593 2018-01-31 Vladimir Makarov <vmakarov@redhat.com>
24596 * ira.c (ira_init_register_move_cost): Remove assert.
24598 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
24600 PR rtl-optimization/84071
24601 * doc/tm.texi.in (WORD_REGISTER_OPERATIONS): Add explicit case.
24602 * doc/tm.texi: Regenerate.
24604 2018-01-31 Richard Biener <rguenther@suse.de>
24606 PR tree-optimization/84132
24607 * tree-data-ref.c (analyze_miv_subscript): Properly
24608 check whether evolution_function_is_affine_multivariate_p
24609 before calling gcd_of_steps_may_divide_p.
24611 2018-01-31 Julia Koval <julia.koval@intel.com>
24614 * config/i386/i386.c (ix86_expand_builtin): Handle IX86_BUILTIN_RDPID.
24615 * config/i386/i386.md (rdpid_rex64) New.
24616 (rdpid): Make 32bit only.
24618 2018-01-29 Aldy Hernandez <aldyh@redhat.com>
24621 * tree-pretty-print.c (dump_generic_node): Handle a TYPE_NAME with
24622 an IDENTIFIER_NODE for FUNCTION_TYPE's.
24624 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
24627 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
24629 * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
24631 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
24633 PR rtl-optimization/84071
24634 * combine.c (record_dead_and_set_regs_1): Record the source unmodified
24635 for a paradoxical SUBREG on a WORD_REGISTER_OPERATIONS target.
24637 2018-01-31 Claudiu Zissulescu <claziss@synopsys.com>
24639 * config/arc/arc.c (arc_handle_aux_attribute): New function.
24640 (arc_attribute_table): Add 'aux' attribute.
24641 (arc_in_small_data_p): Consider aux like variables.
24642 (arc_is_aux_reg_p): New function.
24643 (arc_asm_output_aligned_decl_local): Ignore 'aux' like variables.
24644 (arc_get_aux_arg): New function.
24645 (prepare_move_operands): Handle aux-register access.
24646 (arc_handle_aux_attribute): New function.
24647 * doc/extend.texi (ARC Variable attributes): Add subsection.
24649 2018-01-31 Claudiu Zissulescu <claziss@synopsys.com>
24651 * config/arc/arc-protos.h (arc_is_uncached_mem_p): Function proto.
24652 * config/arc/arc.c (arc_handle_uncached_attribute): New function.
24653 (arc_attribute_table): Add 'uncached' attribute.
24654 (arc_print_operand): Print '.di' flag for uncached memory
24656 (arc_in_small_data_p): Do not consider for small data the uncached
24658 (arc_is_uncached_mem_p): New function.
24659 * config/arc/predicates.md (compact_store_memory_operand): Check
24660 for uncached memory accesses.
24661 (nonvol_nonimm_operand): Likewise.
24662 * doc/extend.texi (ARC Type Attribute): New subsection.
24664 2018-01-31 Jakub Jelinek <jakub@redhat.com>
24667 * common.opt (falign-functions=, falign-jumps=, falign-labels=,
24668 falign-loops=): Add Optimization flag.
24670 2018-01-30 Jeff Law <law@redhat.com>
24673 * i386.c (ix86_adjust_stack_and_probe_stack_clash): New argument
24674 INT_REGISTERS_SAVED. Check it prior to calling
24675 get_scratch_register_on_entry.
24676 (ix86_adjust_stack_and_probe): Similarly.
24677 (ix86_emit_probe_stack_range): Similarly.
24678 (ix86_expand_prologue): Corresponding changes.
24680 2018-01-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
24683 * config/sol2.h (STARTFILE_ARCH_SPEC): Use -std=c*,
24684 -std=iso9899:199409 instead of -pedantic to select values-Xc.o.
24686 2018-01-30 Vladimir Makarov <vmakarov@redhat.com>
24689 * lra-constraints.c (curr_insn_transform): Process AND in the
24692 2018-01-30 Jakub Jelinek <jakub@redhat.com>
24694 PR rtl-optimization/83986
24695 * sched-deps.c (sched_analyze_insn): For frame related insns, add anti
24696 dependence against last_pending_memory_flush in addition to
24697 pending_jump_insns.
24699 2018-01-30 Alexandre Oliva <aoliva@redhat.com>
24701 PR tree-optimization/81611
24702 * tree-ssa-dom.c (simple_iv_increment_p): Skip intervening
24705 2018-01-30 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
24708 * config/rs6000/rs6000.c (rs6000_internal_arg_pointer): Only return
24711 2018-01-30 Richard Biener <rguenther@suse.de>
24712 Jakub Jelinek <jakub@redhat.com>
24714 PR tree-optimization/84111
24715 * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1): Skip
24716 inner loops added during recursion, as they don't have up-to-date
24719 2018-01-30 Jan Hubicka <hubicka@ucw.cz>
24722 * ipa-inline.c (can_inline_edge_p): Break out late tests to...
24723 (can_inline_edge_by_limits_p): ... here.
24724 (can_early_inline_edge_p, check_callers,
24725 update_caller_keys, update_callee_keys, recursive_inlining,
24726 add_new_edges_to_heap, speculation_useful_p,
24727 inline_small_functions,
24728 inline_small_functions, flatten_function,
24729 inline_to_all_callers_1): Update.
24731 2018-01-30 Jan Hubicka <hubicka@ucw.cz>
24733 * profile-count.c (profile_count::combine_with_ipa_count): Handle
24736 2018-01-30 Richard Biener <rguenther@suse.de>
24738 PR tree-optimization/83008
24739 * tree-vect-slp.c (vect_analyze_slp_cost_1): Properly cost
24740 invariant and constant vector uses in stmts when they need
24741 more than one stmt.
24743 2018-01-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
24746 * configure.ac (gcc_cv_as_shf_merge): Disable on Solaris 10/x86.
24747 * configure: Regenerate.
24749 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
24751 * config/aarch64/aarch64-sve.md (*vec_extract<mode><Vel>_0): New
24753 (*vec_extract<mode><Vel>_v128): Require a nonzero lane number.
24754 Use gen_rtx_REG rather than gen_lowpart.
24756 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
24758 * lra-constraints.c (match_reload): Use subreg_lowpart_offset
24759 rather than 0 when creating partial subregs.
24761 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
24763 * vec-perm-indices.c (vec_perm_indices::series_p): Give examples
24766 2018-01-29 Michael Meissner <meissner@linux.vnet.ibm.com>
24769 * config/rs6000/rs6000.c (rs6000_setup_reg_addr_masks): If DFmode
24770 and SFmode can go in Altivec registers (-mcpu=power7 for DFmode,
24771 -mcpu=power8 for SFmode) don't set the PRE_INCDEC or PRE_MODIFY
24772 flags. This restores the settings used before the 2017-07-24.
24773 Turning off pre increment/decrement/modify allows IVOPTS to
24774 optimize DF/SF loops where the index is an int.
24776 2018-01-29 Richard Biener <rguenther@suse.de>
24777 Kelvin Nilsen <kelvin@gcc.gnu.org>
24780 * tree-vect-stmts.c (vectorizable_call): Don't call
24781 targetm.vectorize_builtin_md_vectorized_function if callee is
24784 2018-01-22 Carl Love <cel@us.ibm.com>
24786 * doc/extend.tex: Fix typo in second arg in
24787 __builtin_bcdadd_{lt|eq|gt|ov} and __builtin_bcdsub_{lt|eq|gt|ov}.
24789 2018-01-29 Richard Biener <rguenther@suse.de>
24791 PR tree-optimization/84086
24792 * tree-ssanames.c: Include cfgloop.h and tree-scalar-evolution.h.
24793 (flush_ssaname_freelist): When SSA names were released reset
24794 the SCEV hash table.
24796 2018-01-29 Richard Biener <rguenther@suse.de>
24798 PR tree-optimization/84057
24799 * tree-ssa-loop-ivcanon.c (unloop_loops): Deal with already
24800 removed paths when removing edges.
24802 2018-01-27 H.J. Lu <hongjiu.lu@intel.com>
24804 * doc/invoke.texi: Replace -mfunction-return==@var{choice} with
24805 -mfunction-return=@var{choice}.
24807 2018-01-27 Bernd Edlinger <bernd.edlinger@hotmail.de>
24809 PR diagnostic/84034
24810 * diagnostic-show-locus.c (get_line_width_without_trailing_whitespace):
24811 Handle CR like TAB.
24812 (layout::print_source_line): Likewise.
24813 (test_get_line_width_without_trailing_whitespace): Add test cases.
24815 2018-01-27 Jakub Jelinek <jakub@redhat.com>
24817 PR middle-end/84040
24818 * sched-deps.c (sched_macro_fuse_insns): Return immediately for
24821 2018-01-26 Jim Wilson <jimw@sifive.com>
24823 * config/riscv/riscv.h (MAX_FIXED_MODE_SIZE): New.
24825 * config/riscv/elf.h (LIB_SPEC): Don't include -lgloss when nosys.specs
24828 2018-01-26 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
24830 * config/aarch64/aarch64.md: Add peepholes for CMP + SUB -> SUBS
24831 and CMP + SUB-immediate -> SUBS.
24833 2018-01-26 Martin Sebor <msebor@redhat.com>
24835 PR tree-optimization/83896
24836 * tree-ssa-strlen.c (get_string_len): Rename...
24837 (get_string_cst_length): ...to this. Return HOST_WIDE_INT.
24838 Avoid assuming length is constant.
24839 (handle_char_store): Use HOST_WIDE_INT for string length.
24841 2018-01-26 Uros Bizjak <ubizjak@gmail.com>
24844 * config/i386/i386.md (*andndi3_doubleword): Add earlyclobber
24845 to (=&r,r,rm) alternative. Add (=r,0,rm) and (=r,r,0) alternatives.
24847 2018-01-26 Richard Biener <rguenther@suse.de>
24849 PR rtl-optimization/84003
24850 * dse.c (record_store): Only record redundant stores when
24851 the earlier store aliases at least all accesses the later one does.
24853 2018-01-26 Jakub Jelinek <jakub@redhat.com>
24855 PR rtl-optimization/83985
24856 * dce.c (deletable_insn_p): Return false for separate shrink wrapping
24857 REG_CFA_RESTORE insns.
24858 (delete_unmarked_insns): Don't ignore separate shrink wrapping
24859 REG_CFA_RESTORE insns here.
24862 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Don't
24863 use SSA_NAME_VAR as base for SSA_NAMEs with non-NULL SSA_NAME_VAR.
24865 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
24867 * config/arc/arc-arch.h (arc_tune_attr): Add ARC_TUNE_CORE_3.
24868 * config/arc/arc.c (arc_sched_issue_rate): Use ARC_TUNE_... .
24869 (arc_init): Likewise.
24870 (arc_override_options): Likewise.
24871 (arc_file_start): Choose Tag_ARC_CPU_variation based on arc_tune
24873 (hwloop_fail): Use TARGET_DBNZ when we want to check for dbnz insn
24875 * config/arc/arc.h (TARGET_DBNZ): Define.
24876 * config/arc/arc.md (attr tune): Add core_3, use ARC_TUNE_... to
24877 properly set the tune attribute.
24878 (dbnz): Use TARGET_DBNZ guard.
24879 * config/arc/arc.opt (mtune): Add core3 option.
24881 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
24883 * config/arc/arc.c (arc_delegitimize_address_0): Refactored to
24884 recognize new pic like addresses.
24885 (arc_delegitimize_address): Clean up.
24887 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
24889 * config/arc/arc-arches.def: Option mrf16 valid for all
24891 * config/arc/arc-c.def (__ARC_RF16__): New predefined macro.
24892 * config/arc/arc-cpus.def (em_mini): New cpu with rf16 on.
24893 * config/arc/arc-options.def (FL_RF16): Add mrf16 option.
24894 * config/arc/arc-tables.opt: Regenerate.
24895 * config/arc/arc.c (arc_conditional_register_usage): Handle
24896 reduced register file case.
24897 (arc_file_start): Set must have build attributes.
24898 * config/arc/arc.h (MAX_ARC_PARM_REGS): Conditional define using
24899 mrf16 option value.
24900 * config/arc/arc.opt (mrf16): Add new option.
24901 * config/arc/elf.h (ATTRIBUTE_PCS): Define.
24902 * config/arc/genmultilib.awk: Handle new mrf16 option.
24903 * config/arc/linux.h (ATTRIBUTE_PCS): Define.
24904 * config/arc/t-multilib: Regenerate.
24905 * doc/invoke.texi (ARC Options): Document mrf16 option.
24907 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
24909 * config/arc/arc-protos.h: Add arc_is_secure_call_p proto.
24910 * config/arc/arc.c (arc_handle_secure_attribute): New function.
24911 (arc_attribute_table): Add 'secure_call' attribute.
24912 (arc_print_operand): Print secure call operand.
24913 (arc_function_ok_for_sibcall): Don't optimize tail calls when
24915 (arc_is_secure_call_p): New function. * config/arc/arc.md
24916 (call_i): Add support for sjli instruction.
24917 (call_value_i): Likewise.
24918 * config/arc/constraints.md (Csc): New constraint.
24920 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
24921 John Eric Martin <John.Martin@emmicro-us.com>
24923 * config/arc/arc-protos.h: Add arc_is_jli_call_p proto.
24924 * config/arc/arc.c (_arc_jli_section): New struct.
24925 (arc_jli_section): New type.
24926 (rc_jli_sections): New static variable.
24927 (arc_handle_jli_attribute): New function.
24928 (arc_attribute_table): Add jli_always and jli_fixed attribute.
24929 (arc_file_end): New function.
24930 (TARGET_ASM_FILE_END): Define.
24931 (arc_print_operand): Reuse 'S' letter for JLI output instruction.
24932 (arc_add_jli_section): New function.
24933 (jli_call_scan): Likewise.
24934 (arc_reorg): Call jli_call_scan.
24935 (arc_output_addsi): Remove 'S' from printing asm operand.
24936 (arc_is_jli_call_p): New function.
24937 * config/arc/arc.md (movqi_insn): Remove 'S' from printing asm
24939 (movhi_insn): Likewise.
24940 (movsi_insn): Likewise.
24941 (movsi_set_cc_insn): Likewise.
24942 (loadqi_update): Likewise.
24943 (load_zeroextendqisi_update): Likewise.
24944 (load_signextendqisi_update): Likewise.
24945 (loadhi_update): Likewise.
24946 (load_zeroextendhisi_update): Likewise.
24947 (load_signextendhisi_update): Likewise.
24948 (loadsi_update): Likewise.
24949 (loadsf_update): Likewise.
24950 (movsicc_insn): Likewise.
24951 (bset_insn): Likewise.
24952 (bxor_insn): Likewise.
24953 (bclr_insn): Likewise.
24954 (bmsk_insn): Likewise.
24955 (bicsi3_insn): Likewise.
24956 (cmpsi_cc_c_insn): Likewise.
24957 (movsi_ne): Likewise.
24958 (movsi_cond_exec): Likewise.
24959 (clrsbsi2): Likewise.
24960 (norm_f): Likewise.
24970 (call_i): Remove 'S' asm letter, add jli instruction.
24971 (call_value_i): Likewise.
24972 * config/arc/arc.op (mjli-always): New option.
24973 * config/arc/constraints.md (Cji): New constraint.
24974 * config/arc/fpx.md (addsf3_fpx): Remove 'S' from printing asm
24976 (subsf3_fpx): Likewise.
24977 (mulsf3_fpx): Likewise.
24978 * config/arc/simdext.md (vendrec_insn): Remove 'S' from printing
24980 * doc/extend.texi (ARC): Document 'jli-always' and 'jli-fixed'
24981 function attrbutes.
24982 * doc/invoke.texi (ARC): Document mjli-always option.
24984 2018-01-26 Sebastian Perta <sebastian.perta@renesas.com>
24986 * config/rl78/rl78.c (rl78_addsi3_internal): If operand 2 is const
24987 avoid addition with 0 and use incw and decw where possible.
24989 2018-01-26 Richard Biener <rguenther@suse.de>
24991 PR tree-optimization/81082
24992 * fold-const.c (fold_plusminus_mult_expr): Do not perform the
24993 association if it requires casting to unsigned.
24994 * match.pd ((A * C) +- (B * C) -> (A+-B)): New patterns derived
24995 from fold_plusminus_mult_expr to catch important cases late when
24996 range info is available.
24998 2018-01-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
25000 * config/i386/sol2.h (USE_HIDDEN_LINKONCE): Remove.
25001 * configure.ac (hidden_linkonce): New test.
25002 * configure: Regenerate.
25003 * config.in: Regenerate.
25005 2018-01-26 Julia Koval <julia.koval@intel.com>
25007 * config/i386/avx512bitalgintrin.h (_mm512_bitshuffle_epi64_mask,
25008 _mm512_mask_bitshuffle_epi64_mask, _mm256_bitshuffle_epi64_mask,
25009 _mm256_mask_bitshuffle_epi64_mask, _mm_bitshuffle_epi64_mask,
25010 _mm_mask_bitshuffle_epi64_mask): Fix type.
25011 * config/i386/i386-builtin-types.def (UHI_FTYPE_V2DI_V2DI_UHI,
25012 USI_FTYPE_V4DI_V4DI_USI): Remove.
25013 * config/i386/i386-builtin.def (__builtin_ia32_vpshufbitqmb512_mask,
25014 __builtin_ia32_vpshufbitqmb256_mask,
25015 __builtin_ia32_vpshufbitqmb128_mask): Fix types.
25016 * config/i386/i386.c (ix86_expand_args_builtin): Remove old types.
25017 * config/i386/sse.md (VI1_AVX512VLBW): Change types.
25019 2018-01-26 Alan Modra <amodra@gmail.com>
25022 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Exclude
25023 UNSPEC_VBPERMQ. Sort other unspecs.
25025 2018-01-25 David Edelsohn <dje.gcc@gmail.com>
25027 * doc/invoke.texi (PowerPC Options): Document 'native' cpu type.
25029 2018-01-25 Jan Hubicka <hubicka@ucw.cz>
25031 PR middle-end/83055
25032 * predict.c (drop_profile): Do not push/pop cfun; update also
25034 (handle_missing_profiles): Fix logic looking for zero profiles.
25036 2018-01-25 Jakub Jelinek <jakub@redhat.com>
25038 PR middle-end/83977
25039 * ipa-fnsummary.c (compute_fn_summary): Clear can_change_signature
25040 on functions with #pragma omp declare simd or functions with simd
25042 * omp-simd-clone.c (expand_simd_clones): Revert 2018-01-24 change.
25043 * config/i386/i386.c (ix86_simd_clone_compute_vecsize_and_simdlen):
25044 Remove trailing \n from warning_at calls.
25046 2018-01-25 Tom de Vries <tom@codesourcery.com>
25049 * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
25050 for neutered workers.
25052 2018-01-24 Joseph Myers <joseph@codesourcery.com>
25055 * config/m68k/m68k.c (m68k_promote_function_mode): New function.
25056 (TARGET_PROMOTE_FUNCTION_MODE): New macro.
25058 2018-01-24 Jeff Law <law@redhat.com>
25061 * i386.c (get_probe_interval): Move to earlier point.
25062 (ix86_compute_frame_layout): If -fstack-clash-protection and
25063 the frame is larger than the probe interval, then use pushes
25064 to save registers rather than reg->mem moves.
25065 (ix86_expand_prologue): Remove conditional for int_registers_saved
25068 2018-01-24 Vladimir Makarov <vmakarov@redhat.com>
25071 * ira-build.c (setup_min_max_allocno_live_range_point): Set up
25072 min/max for never referenced object.
25074 2018-01-24 Jakub Jelinek <jakub@redhat.com>
25076 PR middle-end/83977
25077 * tree.c (free_lang_data_in_decl): Don't clear DECL_ABSTRACT_ORIGIN
25079 * omp-low.c (create_omp_child_function): Remove "omp declare simd"
25080 attributes from DECL_ATTRIBUTES (decl) without affecting
25081 DECL_ATTRIBUTES (current_function_decl).
25082 * omp-simd-clone.c (expand_simd_clones): Ignore DECL_ARTIFICIAL
25083 functions with non-NULL DECL_ABSTRACT_ORIGIN.
25085 2018-01-24 Richard Sandiford <richard.sandiford@linaro.org>
25087 PR tree-optimization/83979
25088 * fold-const.c (fold_comparison): Use constant_boolean_node
25089 instead of boolean_{true,false}_node.
25091 2018-01-24 Jan Hubicka <hubicka@ucw.cz>
25093 * ipa-profile.c (ipa_propagate_frequency_1): Fix logic skipping calls
25096 2018-01-24 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
25098 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
25099 Simplify the clause that sets the length attribute.
25100 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
25101 (*sibcall_nonlocal_sysv<mode>): Clean up code block; simplify the
25102 clause that sets the length attribute.
25103 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
25105 2018-01-24 Tom de Vries <tom@codesourcery.com>
25108 * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_2): Define to 1.
25109 (nvptx_pc_set, nvptx_condjump_label): New function. Copy from jump.c.
25110 Add strict parameter.
25111 (prevent_branch_around_nothing): Insert dummy insn between branch to
25112 label and label with no ptx insn inbetween.
25113 * config/nvptx/nvptx.md (define_insn "fake_nop"): New insn.
25115 2018-01-24 Tom de Vries <tom@codesourcery.com>
25118 * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
25119 for neutered threads in warp.
25120 * config/nvptx/nvptx.md (define_insn "exit"): New insn.
25122 2018-01-24 Richard Biener <rguenther@suse.de>
25124 PR tree-optimization/83176
25125 * tree-chrec.c (chrec_fold_plus_1): Handle (signed T){(T) .. }
25128 2018-01-24 Richard Biener <rguenther@suse.de>
25130 PR tree-optimization/82819
25131 * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Avoid
25132 code generating pluses that are no-ops in the target precision.
25134 2018-01-24 Richard Biener <rguenther@suse.de>
25136 PR middle-end/84000
25137 * tree-cfg.c (replace_loop_annotate): Handle annot_expr_parallel_kind.
25139 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
25141 * cfgcleanup.c (try_crossjump_to_edge): Use combine_with_count
25142 to merge probabilities.
25143 * predict.c (probably_never_executed): Also mark as cold functions
25144 with global 0 profile and guessed local profile.
25145 * profile-count.c (profile_probability::combine_with_count): New
25147 * profile-count.h (profile_probability::operator*,
25148 profile_probability::operator*=, profile_probability::operator/,
25149 profile_probability::operator/=): Reduce precision to adjusted
25150 and set value to guessed on contradictory divisions.
25151 (profile_probability::combine_with_freq): Remove.
25152 (profile_probability::combine_wiht_count): Declare.
25153 (profile_count::force_nonzero):: Set to adjusted.
25154 (profile_count::probability_in):: Set quality to adjusted.
25155 * tree-ssa-tail-merge.c (replace_block_by): Use
25156 combine_with_count.
25158 2018-01-23 Andrew Waterman <andrew@sifive.com>
25159 Jim Wilson <jimw@sifive.com>
25161 * config/riscv/riscv.c (riscv_stack_boundary): New.
25162 (riscv_option_override): Set riscv_stack_boundary. Handle
25163 riscv_preferred_stack_boundary_arg.
25164 * config/riscv/riscv.h (MIN_STACK_BOUNDARY, ABI_STACK_BOUNDARY): New.
25165 (BIGGEST_ALIGNMENT): Set to STACK_BOUNDARY.
25166 (STACK_BOUNDARY): Set to riscv_stack_boundary.
25167 (RISCV_STACK_ALIGN): Use STACK_BOUNDARY.
25168 * config/riscv/riscv.opt (mpreferred-stack-boundary): New.
25169 * doc/invoke.tex (RISC-V Options): Add -mpreferred-stack-boundary.
25171 2018-01-23 H.J. Lu <hongjiu.lu@intel.com>
25174 * config/i386/i386.c (ix86_expand_prologue): Use cost reference
25175 of struct ix86_frame.
25176 (ix86_expand_epilogue): Likewise. Add a local variable for
25177 the reg_save_offset field in struct ix86_frame.
25179 2018-01-23 Bin Cheng <bin.cheng@arm.com>
25181 PR tree-optimization/82604
25182 * tree-loop-distribution.c (enum partition_kind): New enum item
25183 PKIND_PARTIAL_MEMSET.
25184 (partition_builtin_p): Support above new enum item.
25185 (generate_code_for_partition): Ditto.
25186 (compute_access_range): Differentiate cases that equality can be
25187 proven at all loops, the innermost loops or no loops.
25188 (classify_builtin_st, classify_builtin_ldst): Adjust call to above
25189 function. Set PKIND_PARTIAL_MEMSET for partition appropriately.
25190 (finalize_partitions, distribute_loop): Don't fuse partition of
25191 PKIND_PARTIAL_MEMSET kind when distributing 3-level loop nest.
25192 (prepare_perfect_loop_nest): Distribute 3-level loop nest only if
25193 parloop is enabled.
25195 2018-01-23 Martin Liska <mliska@suse.cz>
25197 * predict.def (PRED_INDIR_CALL): Set probability to PROB_EVEN in
25198 order to ignore the predictor.
25199 (PRED_POLYMORPHIC_CALL): Likewise.
25200 (PRED_RECURSIVE_CALL): Likewise.
25202 2018-01-23 Martin Liska <mliska@suse.cz>
25204 * tree-profile.c (tree_profiling): Print function header to
25205 aware reader which function we are working on.
25206 * value-prof.c (gimple_find_values_to_profile): Do not print
25207 not interesting value histograms.
25209 2018-01-23 Martin Liska <mliska@suse.cz>
25211 * profile-count.h (enum profile_quality): Add
25212 profile_uninitialized as the first value. Do not number values
25213 as they are zero based.
25214 (profile_count::verify): Update sanity check.
25215 (profile_probability::verify): Likewise.
25217 2018-01-23 Nathan Sidwell <nathan@acm.org>
25219 * doc/invoke.texi (ffor-scope): Deprecate.
25221 2018-01-23 David Malcolm <dmalcolm@redhat.com>
25223 PR tree-optimization/83510
25224 * domwalk.c (set_all_edges_as_executable): New function.
25225 (dom_walker::dom_walker): Convert bool param
25226 "skip_unreachable_blocks" to enum reachability. Move setup of
25227 edge flags to set_all_edges_as_executable and only do it when
25228 reachability is REACHABLE_BLOCKS.
25229 * domwalk.h (enum dom_walker::reachability): New enum.
25230 (dom_walker::dom_walker): Convert bool param
25231 "skip_unreachable_blocks" to enum reachability.
25232 (set_all_edges_as_executable): New decl.
25233 * graphite-scop-detection.c (gather_bbs::gather_bbs): Convert
25234 from false for "skip_unreachable_blocks" to ALL_BLOCKS for
25236 * tree-ssa-dom.c (dom_opt_dom_walker::dom_opt_dom_walker): Likewise,
25237 but converting true to REACHABLE_BLOCKS.
25238 * tree-ssa-sccvn.c (sccvn_dom_walker::sccvn_dom_walker): Likewise.
25240 (check_array_bounds_dom_walker::check_array_bounds_dom_walker):
25241 Likewise, but converting it to REACHABLE_BLOCKS_PRESERVING_FLAGS.
25242 (vrp_dom_walker::vrp_dom_walker): Likewise, but converting it to
25244 (vrp_prop::vrp_finalize): Call set_all_edges_as_executable
25245 if check_all_array_refs will be called.
25247 2018-01-23 David Malcolm <dmalcolm@redhat.com>
25249 * tree.c (selftest::test_location_wrappers): Add more test
25252 2018-01-23 David Malcolm <dmalcolm@redhat.com>
25254 * sbitmap.c (selftest::test_set_range): Fix memory leaks.
25255 (selftest::test_bit_in_range): Likewise.
25257 2018-01-23 Richard Sandiford <richard.sandiford@linaro.org>
25260 * doc/sourcebuild.texi (vect_float): Say that the selector
25261 only describes the situation when -funsafe-math-optimizations is on.
25262 (vect_float_strict): Document.
25264 2018-01-23 Richard Sandiford <richard.sandiford@linaro.org>
25266 PR tree-optimization/83965
25267 * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
25268 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern): Use it
25269 instead of checking only for a reduction.
25270 (vect_recog_widen_sum_pattern): Likewise.
25272 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
25274 * predict.c (probably_never_executed): Only use precise profile info.
25275 (compute_function_frequency): Skip after inlining hack since we now
25276 have quality checking.
25278 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
25280 * profile-count.h (profile_probability::very_unlikely,
25281 profile_probability::unlikely, profile_probability::even): Set
25282 precision to guessed.
25284 2018-01-23 Richard Biener <rguenther@suse.de>
25286 PR tree-optimization/83963
25287 * graphite-scop-detection.c (scop_detection::harmful_loop_in_region):
25288 Properly terminate dominator walk when crossing the exit edge not
25289 when visiting its source block.
25291 2018-01-23 Jakub Jelinek <jakub@redhat.com>
25294 * tree.c (maybe_wrap_with_location): Use NON_LVALUE_EXPR rather than
25295 VIEW_CONVERT_EXPR to wrap CONST_DECLs.
25297 2018-01-22 Jakub Jelinek <jakub@redhat.com>
25299 PR tree-optimization/83957
25300 * omp-expand.c (expand_omp_for_generic): Ignore virtual PHIs. Remove
25301 semicolon after for body surrounded by braces.
25303 PR tree-optimization/83081
25304 * profile-count.h (profile_probability::split): New method.
25305 * dojump.c (do_jump_1) <case TRUTH_ANDIF_EXPR, case TRUTH_ORIF_EXPR>:
25306 Use profile_probability::split.
25307 (do_compare_rtx_and_jump): Fix adjustment of probabilities
25308 when splitting a single conditional jump into 2.
25310 2018-01-22 David Malcolm <dmalcolm@redhat.com>
25312 PR tree-optimization/69452
25313 * tree-ssa-loop-im.c (class move_computations_dom_walker): Remove
25316 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
25318 * config/rl78/rl78-expand.md (bswaphi2): New define_expand.
25319 * config/rl78/rl78-virt.md (*bswaphi2_virt): New define_insn.
25320 * config/rl78/rl78-real.md (*bswaphi2_real): New define_insn.
25322 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
25324 * config/rl78/rl78-protos.h (rl78_split_movdi): New function
25326 * config/rl78/rl78.md (movdi): New define_expand.
25327 * config/rl78/rl78.c (rl78_split_movdi): New function.
25329 2018-01-22 Michael Meissner <meissner@linux.vnet.ibm.com>
25332 * config/rs6000/rs6000-protos.h (rs6000_split_signbit): Delete,
25334 * config/rs6000/rs6000.c (rs6000_split_signbit): Likewise.
25335 * config/rs6000/rs6000.md (signbit<mode>2): Change code for IEEE
25336 128-bit to produce an UNSPEC move to get the double word with the
25337 signbit and then a shift directly to do signbit.
25338 (signbit<mode>2_dm): Replace old IEEE 128-bit signbit
25339 implementation with a new version that just does either a direct
25340 move or a regular move. Move memory interface to separate insns.
25341 Move insns so they are next to the expander.
25342 (signbit<mode>2_dm_mem_be): New combiner insns to combine load
25343 with signbit move. Split big and little endian case.
25344 (signbit<mode>2_dm_mem_le): Likewise.
25345 (signbit<mode>2_dm_<su>ext): Delete, no longer used.
25346 (signbit<mode>2_dm2): Likewise.
25348 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
25350 * config/rl78/rl78.md (anddi3): New define_expand.
25352 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
25354 * config/rl78/rl78.md (umindi3): New define_expand.
25356 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
25358 * config/rl78/rl78.md (smindi3): New define_expand.
25360 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
25362 * config/rl78/rl78.md (smaxdi3): New define_expand.
25364 2018-01-22 Carl Love <cel@us.ibm.com>
25366 * config/rs6000/rs6000-builtin.def (ST_ELEMREV_V1TI, LD_ELEMREV_V1TI,
25367 LVX_V1TI): Add macro expansion.
25368 * config/rs6000/rs6000-c.c (altivec_builtin_types): Add argument
25369 definitions for VSX_BUILTIN_VEC_XST_BE, VSX_BUILTIN_VEC_ST,
25370 VSX_BUILTIN_VEC_XL, LD_ELEMREV_V1TI builtins.
25371 * config/rs6000/rs6000-p8swap.c (insn_is_swappable_p);
25372 Change check to determine if the instruction is a byte reversing
25373 entry. Fix typo in comment.
25374 * config/rs6000/rs6000.c (altivec_expand_builtin): Add case entry
25375 for VSX_BUILTIN_ST_ELEMREV_V1TI and VSX_BUILTIN_LD_ELEMREV_V1TI.
25376 Add def_builtin calls for new builtins.
25377 * config/rs6000/vsx.md (vsx_st_elemrev_v1ti, vsx_ld_elemrev_v1ti):
25378 Add define_insn expansion.
25380 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
25382 * config/rl78/rl78.md (umaxdi3): New define_expand.
25384 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
25386 * config/rl78/rl78.c (rl78_note_reg_set): Fixed dead reg check
25387 for non-QImode registers.
25389 2018-01-22 Richard Biener <rguenther@suse.de>
25391 PR tree-optimization/83963
25392 * graphite-scop-detection.c (scop_detection::get_sese): Delay
25393 including the loop exit block.
25394 (scop_detection::merge_sese): Likewise.
25395 (scop_detection::add_scop): Do it here instead.
25397 2018-01-22 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
25399 * doc/sourcebuild.texi (arm_softfloat): Document.
25401 2018-01-21 John David Anglin <danglin@gcc.gnu.org>
25404 * config/pa/pa.c (pa_function_ok_for_sibcall): Use
25405 targetm.binds_local_p instead of TREE_PUBLIC to check local binding.
25406 Move TARGET_PORTABLE_RUNTIME check after TARGET_64BIT check.
25408 2018-01-21 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
25409 David Edelsohn <dje.gcc@gmail.com>
25412 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
25413 Change "crset eq" to "crset 2".
25414 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
25415 (*call_indirect_aix<mode>_nospec): Likewise.
25416 (*call_value_indirect_aix<mode>_nospec): Likewise.
25417 (*call_indirect_elfv2<mode>_nospec): Likewise.
25418 (*call_value_indirect_elfv2<mode>_nospec): Likewise.
25419 (*sibcall_nonlocal_sysv<mode>): Change "crset eq" to "crset 2";
25420 change assembly output from . to $.
25421 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
25422 (indirect_jump<mode>_nospec): Change assembly output from . to $.
25423 (*tablejump<mode>_internal1_nospec): Likewise.
25425 2018-01-21 Oleg Endo <olegendo@gcc.gnu.org>
25428 * config/sh/sh_optimize_sett_clrt.cc:
25429 Use INCLUDE_ALGORITHM and INCLUDE_VECTOR instead of direct includes.
25431 2018-01-20 Richard Sandiford <richard.sandiford@linaro.org>
25433 PR tree-optimization/83940
25434 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Set
25435 offset_dt to vect_constant_def rather than vect_unknown_def_type.
25436 (vect_check_load_store_mask): Add a mask_dt_out parameter and
25437 use it to pass back the definition type.
25438 (vect_check_store_rhs): Likewise rhs_dt_out.
25439 (vect_build_gather_load_calls): Add a mask_dt argument and use
25440 it instead of a call to vect_is_simple_use.
25441 (vectorizable_store): Update calls to vect_check_load_store_mask
25442 and vect_check_store_rhs. Use the dt returned by the latter instead
25443 of scatter_src_dt. Use the cached mask_dt and gs_info.offset_dt
25444 instead of calls to vect_is_simple_use. Pass the scalar rather
25445 than the vector operand to vect_is_simple_use when handling
25446 second and subsequent copies of an rhs value.
25447 (vectorizable_load): Update calls to vect_check_load_store_mask
25448 and vect_build_gather_load_calls. Use the cached mask_dt and
25449 gs_info.offset_dt instead of calls to vect_is_simple_use.
25451 2018-01-20 Jakub Jelinek <jakub@redhat.com>
25453 PR middle-end/83945
25454 * tree-emutls.c: Include gimplify.h.
25455 (lower_emutls_2): New function.
25456 (lower_emutls_1): If ADDR_EXPR is a gimple invariant and walk_tree
25457 with lower_emutls_2 callback finds some TLS decl in it, unshare_expr
25458 it before further processing.
25461 * simplify-rtx.c (simplify_binary_operation_1) <case UMOD>: Use
25462 UINTVAL (trueop1) instead of INTVAL (op1).
25464 2018-01-19 Jakub Jelinek <jakub@redhat.com>
25468 * dwarf2cfi.c (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define to
25469 INCOMING_FRAME_SP_OFFSET if not defined.
25470 (scan_trace): Add ENTRY argument. If true and
25471 DEFAULT_INCOMING_FRAME_SP_OFFSET != INCOMING_FRAME_SP_OFFSET,
25472 emit a note to adjust the CFA offset.
25473 (create_cfi_notes): Adjust scan_trace callers.
25474 (create_cie_data): Use DEFAULT_INCOMING_FRAME_SP_OFFSET rather than
25475 INCOMING_FRAME_SP_OFFSET in the CIE.
25476 * config/i386/i386.h (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define.
25477 * config/stormy16/stormy16.h (DEFAULT_INCOMING_FRAME_SP_OFFSET):
25479 * doc/tm.texi.in (DEFAULT_INCOMING_FRAME_SP_OFFSET): Document.
25480 * doc/tm.texi: Regenerated.
25482 2018-01-19 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
25484 PR rtl-optimization/83147
25485 * lra-constraints.c (remove_inheritance_pseudos): Use
25486 lra_substitute_pseudo_within_insn.
25488 2018-01-19 Tom de Vries <tom@codesourcery.com>
25489 Cesar Philippidis <cesar@codesourcery.com>
25492 * config/nvptx/nvptx.c (nvptx_single): Fix jit workaround.
25494 2018-01-19 Cesar Philippidis <cesar@codesourcery.com>
25497 * config/nvptx/nvptx.c (output_init_frag): Don't use generic address
25498 spaces for function labels.
25500 2018-01-19 Martin Liska <mliska@suse.cz>
25502 * predict.def (PRED_LOOP_EXIT): Change from 85 to 89.
25503 (PRED_LOOP_EXIT_WITH_RECURSION): Change from 72 to 78.
25504 (PRED_LOOP_EXTRA_EXIT): Change from 83 to 67.
25505 (PRED_OPCODE_POSITIVE): Change from 64 to 59.
25506 (PRED_TREE_OPCODE_POSITIVE): Change from 64 to 59.
25507 (PRED_CONST_RETURN): Change from 69 to 65.
25508 (PRED_NULL_RETURN): Change from 91 to 71.
25509 (PRED_LOOP_IV_COMPARE_GUESS): Change from 98 to 64.
25510 (PRED_LOOP_GUARD): Change from 66 to 73.
25512 2018-01-19 Martin Liska <mliska@suse.cz>
25514 * predict.c (predict_insn_def): Add new assert.
25515 (struct branch_predictor): Change type to signed integer.
25516 (test_prediction_value_range): Amend test to cover
25517 PROB_UNINITIALIZED.
25518 * predict.def (PRED_LOOP_ITERATIONS): Use the new constant.
25519 (PRED_LOOP_ITERATIONS_GUESSED): Likewise.
25520 (PRED_LOOP_ITERATIONS_MAX): Likewise.
25521 (PRED_LOOP_IV_COMPARE): Likewise.
25522 * predict.h (PROB_UNINITIALIZED): Define new constant.
25524 2018-01-19 Martin Liska <mliska@suse.cz>
25526 * predict.c (dump_prediction): Add new format for
25527 analyze_brprob.py script which is enabled with -details
25529 * profile-count.h (precise_p): New function.
25531 2018-01-19 Richard Sandiford <richard.sandiford@linaro.org>
25533 PR tree-optimization/83922
25534 * tree-vect-loop.c (vect_verify_full_masking): Return false if
25535 there are no statements that need masking.
25536 (vect_active_double_reduction_p): New function.
25537 (vect_analyze_loop_operations): Use it when handling phis that
25538 are not in the loop header.
25540 2018-01-19 Richard Sandiford <richard.sandiford@linaro.org>
25542 PR tree-optimization/83914
25543 * tree-vect-loop.c (vectorizable_induction): Don't convert
25544 init_expr or apply the peeling adjustment for inductions
25545 that are nested within the vectorized loop.
25547 2018-01-19 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
25549 * config/arm/thumb2.md (*thumb2_negsi2_short): Use RSB mnemonic
25552 2018-01-18 Jakub Jelinek <jakub@redhat.com>
25556 * function.h (gimplify_parameters): Add gimple_seq * argument.
25557 * function.c: Include gimple.h and options.h.
25558 (gimplify_parameters): Add cleanup argument, add CLOBBER stmts
25559 for the added local temporaries if needed.
25560 * gimplify.c (gimplify_body): Adjust gimplify_parameters caller,
25561 if there are any parameter cleanups, wrap whole body into a
25562 try/finally with the cleanups.
25564 2018-01-18 Wilco Dijkstra <wdijkstr@arm.com>
25567 * config/aarch64/aarch64.c (aarch64_legitimate_constant_p):
25568 Use GET_MODE_CLASS for scalar floating point.
25570 2018-01-18 Jan Hubicka <hubicka@ucw.cz>
25574 * cgraphclones.c (cgraph_node::create_version_clone_with_body):
25575 Fix call of call_cgraph_insertion_hooks.
25577 2018-01-18 Martin Sebor <msebor@redhat.com>
25579 * doc/invoke.texi (-Wclass-memaccess): Tweak text.
25581 2018-01-18 Jan Hubicka <hubicka@ucw.cz>
25584 * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Update edge
25587 2018-01-18 Boris Kolpackov <boris@codesynthesis.com>
25590 * common.opt: (-ffile-prefix-map): New option.
25591 * opts.c (common_handle_option): Defer it.
25592 * opts-global.c (handle_common_deferred_options): Handle it.
25593 * debug.h (remap_debug_filename, add_debug_prefix_map): Move to...
25594 * file-prefix-map.h: New file.
25595 (remap_debug_filename, add_debug_prefix_map): ...here.
25596 (add_macro_prefix_map, add_file_prefix_map, remap_macro_filename): New.
25597 * final.c (debug_prefix_map, add_debug_prefix_map
25598 remap_debug_filename): Move to...
25599 * file-prefix-map.c: New file.
25600 (file_prefix_map, add_prefix_map, remap_filename) ...here and rename,
25601 generalize, get rid of alloca(), use strrchr() instead of strchr().
25602 (add_macro_prefix_map, add_debug_prefix_map, add_file_prefix_map):
25603 Implement in terms of add_prefix_map().
25604 (remap_macro_filename, remap_debug_filename): Implement in term of
25606 * Makefile.in (OBJS, PLUGIN_HEADERS): Add new files.
25607 * builtins.c (fold_builtin_FILE): Call remap_macro_filename().
25608 * dbxout.c: Include file-prefix-map.h.
25609 * varasm.c: Likewise.
25610 * vmsdbgout.c: Likewise.
25611 * xcoffout.c: Likewise.
25612 * dwarf2out.c: Likewise plus omit new options from DW_AT_producer.
25613 * doc/cppopts.texi (-fmacro-prefix-map): Document.
25614 * doc/invoke.texi (-ffile-prefix-map): Document.
25615 (-fdebug-prefix-map): Update description.
25617 2018-01-18 Martin Liska <mliska@suse.cz>
25619 * config/i386/i386.c (indirect_thunk_name): Document that also
25621 (output_indirect_thunk): Document why both instructions
25622 (pause and lfence) are generated.
25624 2018-01-18 Richard Biener <rguenther@suse.de>
25626 PR tree-optimization/83887
25627 * graphite-scop-detection.c
25628 (scop_detection::get_nearest_dom_with_single_entry): Remove.
25629 (scop_detection::get_nearest_pdom_with_single_exit): Likewise.
25630 (scop_detection::merge_sese): Re-implement with a flood-fill
25631 algorithm that properly finds a SESE region if it exists.
25633 2018-01-18 Jakub Jelinek <jakub@redhat.com>
25636 * match.pd ((P + A) - P, P - (P + A), (P + A) - (P + B)): For
25637 pointer_diff optimizations use view_convert instead of convert.
25639 2018-01-17 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
25641 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
25642 Generate different code for -mno-speculate-indirect-jumps.
25643 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
25644 (*call_indirect_aix<mode>): Disable for
25645 -mno-speculate-indirect-jumps.
25646 (*call_indirect_aix<mode>_nospec): New define_insn.
25647 (*call_value_indirect_aix<mode>): Disable for
25648 -mno-speculate-indirect-jumps.
25649 (*call_value_indirect_aix<mode>_nospec): New define_insn.
25650 (*sibcall_nonlocal_sysv<mode>): Generate different code for
25651 -mno-speculate-indirect-jumps.
25652 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
25654 2018-01-17 Michael Meissner <meissner@linux.vnet.ibm.com>
25656 * config/rs6000/rs6000.c (rs6000_emit_move): If we load or store a
25657 long double type, set the flags for noting the default long double
25658 type, even if we don't pass or return a long double type.
25660 2018-01-17 Jan Hubicka <hubicka@ucw.cz>
25663 * ipa-inline.c (flatten_function): Do not overwrite final inlining
25666 2018-01-17 Will Schmidt <will_schmidt@vnet.ibm.com>
25668 * config/rs6000/rs6000.c (rs6000_gimple_builtin): Add gimple folding
25669 support for merge[hl].
25670 (fold_mergehl_helper): New helper function.
25671 (tree-vector-builder.h): New #include for tree_vector_builder usage.
25672 * config/rs6000/altivec.md (altivec_vmrghw_direct): Add xxmrghw insn.
25673 (altivec_vmrglw_direct): Add xxmrglw insn.
25675 2018-01-17 Andrew Waterman <andrew@sifive.com>
25677 * config/riscv/riscv.c (riscv_conditional_register_usage): If
25678 UNITS_PER_FP_ARG is 0, set call_used_regs to 1 for all FP regs.
25680 2018-01-17 David Malcolm <dmalcolm@redhat.com>
25683 * ipa-devirt.c (add_type_duplicate): When comparing memory layout,
25684 call the lto_location_cache before reading the
25685 DECL_SOURCE_LOCATION of the types.
25687 2018-01-17 Wilco Dijkstra <wdijkstr@arm.com>
25688 Richard Sandiford <richard.sandiford@linaro.org>
25690 * config/aarch64/aarch64.md (movti_aarch64): Use Uti constraint.
25691 * config/aarch64/aarch64.c (aarch64_mov128_immediate): New function.
25692 (aarch64_legitimate_constant_p): Just support CONST_DOUBLE
25693 SF/DF/TF mode to avoid creating illegal CONST_WIDE_INT immediates.
25694 * config/aarch64/aarch64-protos.h (aarch64_mov128_immediate):
25696 * config/aarch64/constraints.md (aarch64_movti_operand):
25698 * config/aarch64/predicates.md (Uti): Add new constraint.
25700 2018-01-17 Carl Love <cel@us.ibm.com>
25702 * config/rs6000/vsx.md (define_expand xl_len_r,
25703 define_expand stxvl, define_expand *stxvl): Add match_dup argument.
25704 (define_insn): Add, match_dup 1 argument to define_insn stxvll and
25706 (define_expand, define_insn): Move the shift left from the
25707 define_insn to the define_expand for lxvl and stxvl instructions.
25708 * config/rs6000/rs6000-builtin.def (BU_P9V_64BIT_VSX_2): Change LXVL
25709 and XL_LEN_R definitions to PURE.
25711 2018-01-17 Uros Bizjak <ubizjak@gmail.com>
25713 * config/i386/i386.c (indirect_thunk_name): Declare regno
25714 as unsigned int. Compare regno with INVALID_REGNUM.
25715 (output_indirect_thunk): Ditto.
25716 (output_indirect_thunk_function): Ditto.
25717 (ix86_code_end): Declare regno as unsigned int. Use INVALID_REGNUM
25718 in the call to output_indirect_thunk_function.
25720 2018-01-17 Richard Sandiford <richard.sandiford@linaro.org>
25722 PR middle-end/83884
25723 * expr.c (expand_expr_real_1): Use the size of GET_MODE (op0)
25724 rather than the size of inner_type to determine the stack slot size
25725 when handling VIEW_CONVERT_EXPRs on strict-alignment targets.
25727 2018-01-16 Sebastian Peryt <sebastian.peryt@intel.com>
25730 * config/i386/i386.c (ix86_option_override_internal): Add PTA_RDRND
25733 2018-01-16 Michael Meissner <meissner@linux.vnet.ibm.com>
25735 * config.gcc (powerpc*-linux*-*): Add support for 64-bit little
25736 endian Linux systems to optionally enable multilibs for selecting
25737 the long double type if the user configured an explicit type.
25738 * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Indicate we
25739 have no long double multilibs if not defined.
25740 * config/rs6000/rs6000.c (rs6000_option_override_internal): Do not
25741 warn if the user used -mabi={ieee,ibm}longdouble and we built
25742 multilibs for long double.
25743 * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Define as the
25744 appropriate multilib option.
25745 (MULTILIB_DEFAULTS): Add MULTILIB_DEFAULTS_IEEE to the default
25747 * config/rs6000/t-ldouble-linux64le-ibm: New configuration files
25748 for building long double multilibs.
25749 * config/rs6000/t-ldouble-linux64le-ieee: Likewise.
25751 2018-01-16 John David Anglin <danglin@gcc.gnu.org>
25753 * config.gcc (hppa*-*-linux*): Change callee copies ABI to caller
25756 * config/pa.h (MALLOC_ABI_ALIGNMENT): Set 32-bit alignment default to
25758 * config/pa/pa32-linux.h (MALLOC_ABI_ALIGNMENT): Set alignment to
25761 * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Cleanup type and mode
25764 * config/pa/pa.c (pa_function_arg_size): Apply CEIL to GET_MODE_SIZE
25767 2018-01-16 Eric Botcazou <ebotcazou@adacore.com>
25769 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For an
25770 ADDR_EXPR, do not count the offset of a COMPONENT_REF twice.
25772 2018-01-16 Kelvin Nilsen <kelvin@gcc.gnu.org>
25774 * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Generate
25775 different rtl trees depending on TARGET_64BIT.
25776 (rs6000_gen_lvx): Likewise.
25778 2018-01-16 Eric Botcazou <ebotcazou@adacore.com>
25780 * config/visium/visium.md (nop): Tweak comment.
25781 (hazard_nop): Likewise.
25783 2018-01-16 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
25785 * config/rs6000/rs6000.c (rs6000_opt_vars): Add entry for
25786 -mspeculate-indirect-jumps.
25787 * config/rs6000/rs6000.md (*call_indirect_elfv2<mode>): Disable
25788 for -mno-speculate-indirect-jumps.
25789 (*call_indirect_elfv2<mode>_nospec): New define_insn.
25790 (*call_value_indirect_elfv2<mode>): Disable for
25791 -mno-speculate-indirect-jumps.
25792 (*call_value_indirect_elfv2<mode>_nospec): New define_insn.
25793 (indirect_jump): Emit different RTL for
25794 -mno-speculate-indirect-jumps.
25795 (*indirect_jump<mode>): Disable for
25796 -mno-speculate-indirect-jumps.
25797 (*indirect_jump<mode>_nospec): New define_insn.
25798 (tablejump): Emit different RTL for
25799 -mno-speculate-indirect-jumps.
25800 (tablejumpsi): Disable for -mno-speculate-indirect-jumps.
25801 (tablejumpsi_nospec): New define_expand.
25802 (tablejumpdi): Disable for -mno-speculate-indirect-jumps.
25803 (tablejumpdi_nospec): New define_expand.
25804 (*tablejump<mode>_internal1): Disable for
25805 -mno-speculate-indirect-jumps.
25806 (*tablejump<mode>_internal1_nospec): New define_insn.
25807 * config/rs6000/rs6000.opt (mspeculate-indirect-jumps): New
25810 2018-01-16 Artyom Skrobov tyomitch@gmail.com
25812 * caller-save.c (insert_save): Drop unnecessary parameter. All
25815 2018-01-16 Jakub Jelinek <jakub@redhat.com>
25816 Richard Biener <rguenth@suse.de>
25819 * gimplify.c (gimplify_one_sizepos): For is_gimple_constant (expr)
25820 return early, inline manually is_gimple_sizepos. Make sure if we
25821 call gimplify_expr we don't end up with a gimple constant.
25822 * tree.c (variably_modified_type_p): Don't return true for
25823 is_gimple_constant (_t). Inline manually is_gimple_sizepos.
25824 * gimplify.h (is_gimple_sizepos): Remove.
25826 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
25828 PR tree-optimization/83857
25829 * tree-vect-loop.c (vect_analyze_loop_operations): Don't call
25830 vectorizable_live_operation for pure SLP statements.
25831 (vectorizable_live_operation): Handle PHIs.
25833 2018-01-16 Richard Biener <rguenther@suse.de>
25835 PR tree-optimization/83867
25836 * tree-vect-stmts.c (vect_transform_stmt): Precompute
25837 nested_in_vect_loop_p since the scalar stmt may get invalidated.
25839 2018-01-16 Jakub Jelinek <jakub@redhat.com>
25842 * stor-layout.c (handle_warn_if_not_align): Use byte_position and
25843 multiple_of_p instead of unchecked tree_to_uhwi and UHWI check.
25844 If off is not INTEGER_CST, issue a may not be aligned warning
25845 rather than isn't aligned. Use isn%'t rather than isn't.
25846 * fold-const.c (multiple_of_p) <case BIT_AND_EXPR>: Don't fall through
25848 <case MULT_EXPR>: Improve the case when bottom and one of the
25849 MULT_EXPR operands are INTEGER_CSTs and bottom is multiple of that
25850 operand, in that case check if the other operand is multiple of
25851 bottom divided by the INTEGER_CST operand.
25853 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
25856 * config/pa/pa.h (FUNCTION_ARG_SIZE): Delete.
25857 * config/pa/pa-protos.h (pa_function_arg_size): Declare.
25858 * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Use
25859 pa_function_arg_size instead of FUNCTION_ARG_SIZE.
25860 * config/pa/pa.c (pa_function_arg_advance): Likewise.
25861 (pa_function_arg, pa_arg_partial_bytes): Likewise.
25862 (pa_function_arg_size): New function.
25864 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
25866 * fold-const.c (fold_ternary_loc): Construct the vec_perm_indices
25867 in a separate statement.
25869 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
25871 PR tree-optimization/83847
25872 * tree-vect-data-refs.c (vect_analyze_data_ref_accesses): Don't
25873 group gathers and scatters.
25875 2018-01-16 Jakub Jelinek <jakub@redhat.com>
25877 PR rtl-optimization/86620
25878 * params.def (max-sched-ready-insns): Bump minimum value to 1.
25880 PR rtl-optimization/83213
25881 * recog.c (peep2_attempt): Copy over CROSSING_JUMP_P from peepinsn
25882 to last if both are JUMP_INSNs.
25884 PR tree-optimization/83843
25885 * gimple-ssa-store-merging.c
25886 (imm_store_chain_info::output_merged_store): Handle bit_not_p on
25887 store_immediate_info for bswap/nop orig_stores.
25889 2018-01-15 Andrew Waterman <andrew@sifive.com>
25891 * config/riscv/riscv.c (riscv_rtx_costs) <MULT>: Increase cost if
25893 <UDIV>: Increase cost if !TARGET_DIV.
25895 2018-01-15 Segher Boessenkool <segher@kernel.crashing.org>
25897 * config/rs6000/rs6000.md (define_attr "type"): Remove delayed_cr.
25898 (define_attr "cr_logical_3op"): New.
25899 (cceq_ior_compare): Adjust.
25900 (cceq_ior_compare_complement): Adjust.
25901 (*cceq_rev_compare): Adjust.
25902 * config/rs6000/rs6000.c (rs6000_adjust_cost): Adjust.
25903 (is_cracked_insn): Adjust.
25904 (insn_must_be_first_in_group): Adjust.
25905 * config/rs6000/40x.md: Adjust.
25906 * config/rs6000/440.md: Adjust.
25907 * config/rs6000/476.md: Adjust.
25908 * config/rs6000/601.md: Adjust.
25909 * config/rs6000/603.md: Adjust.
25910 * config/rs6000/6xx.md: Adjust.
25911 * config/rs6000/7450.md: Adjust.
25912 * config/rs6000/7xx.md: Adjust.
25913 * config/rs6000/8540.md: Adjust.
25914 * config/rs6000/cell.md: Adjust.
25915 * config/rs6000/e300c2c3.md: Adjust.
25916 * config/rs6000/e500mc.md: Adjust.
25917 * config/rs6000/e500mc64.md: Adjust.
25918 * config/rs6000/e5500.md: Adjust.
25919 * config/rs6000/e6500.md: Adjust.
25920 * config/rs6000/mpc.md: Adjust.
25921 * config/rs6000/power4.md: Adjust.
25922 * config/rs6000/power5.md: Adjust.
25923 * config/rs6000/power6.md: Adjust.
25924 * config/rs6000/power7.md: Adjust.
25925 * config/rs6000/power8.md: Adjust.
25926 * config/rs6000/power9.md: Adjust.
25927 * config/rs6000/rs64.md: Adjust.
25928 * config/rs6000/titan.md: Adjust.
25930 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
25932 * config/i386/predicates.md (indirect_branch_operand): Rewrite
25933 ix86_indirect_branch_register logic.
25935 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
25937 * config/i386/constraints.md (Bs): Update
25938 ix86_indirect_branch_register check. Don't check
25939 ix86_indirect_branch_register with GOT_memory_operand.
25941 * config/i386/predicates.md (GOT_memory_operand): Don't check
25942 ix86_indirect_branch_register here.
25943 (GOT32_symbol_operand): Likewise.
25945 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
25947 * config/i386/predicates.md (constant_call_address_operand):
25948 Rewrite ix86_indirect_branch_register logic.
25949 (sibcall_insn_operand): Likewise.
25951 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
25953 * config/i386/constraints.md (Bs): Replace
25954 ix86_indirect_branch_thunk_register with
25955 ix86_indirect_branch_register.
25957 * config/i386/i386.md (indirect_jump): Likewise.
25958 (tablejump): Likewise.
25959 (*sibcall_memory): Likewise.
25960 (*sibcall_value_memory): Likewise.
25961 Peepholes of indirect call and jump via memory: Likewise.
25962 * config/i386/i386.opt: Likewise.
25963 * config/i386/predicates.md (indirect_branch_operand): Likewise.
25964 (GOT_memory_operand): Likewise.
25965 (call_insn_operand): Likewise.
25966 (sibcall_insn_operand): Likewise.
25967 (GOT32_symbol_operand): Likewise.
25969 2018-01-15 Jakub Jelinek <jakub@redhat.com>
25971 PR middle-end/83837
25972 * omp-expand.c (expand_omp_atomic_pipeline): Use loaded_val
25973 type rather than type addr's type points to.
25974 (expand_omp_atomic_mutex): Likewise.
25975 (expand_omp_atomic): Likewise.
25977 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
25980 * config/i386/i386.c (output_indirect_thunk_function): Use
25981 ASM_OUTPUT_LABEL, instead of ASM_OUTPUT_DEF, for TARGET_MACHO
25982 for __x86_return_thunk.
25984 2018-01-15 Richard Biener <rguenther@suse.de>
25986 PR middle-end/83850
25987 * expmed.c (extract_bit_field_1): Fix typo.
25989 2018-01-15 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
25992 * config/arm/iterators.md (VF): New mode iterator.
25993 * config/arm/neon.md (neon_vabd<mode>_2): Use the above.
25994 Remove integer-related logic from pattern.
25995 (neon_vabd<mode>_3): Likewise.
25997 2018-01-15 Jakub Jelinek <jakub@redhat.com>
25999 PR middle-end/82694
26000 * common.opt (fstrict-overflow): No longer an alias.
26001 (fwrapv-pointer): New option.
26002 * tree.h (TYPE_OVERFLOW_WRAPS, TYPE_OVERFLOW_UNDEFINED): Define
26003 also for pointer types based on flag_wrapv_pointer.
26004 * opts.c (common_handle_option) <case OPT_fstrict_overflow>: Set
26005 opts->x_flag_wrap[pv] to !value, clear opts->x_flag_trapv if
26006 opts->x_flag_wrapv got set.
26007 * fold-const.c (fold_comparison, fold_binary_loc): Revert 2017-08-01
26008 changes, just use TYPE_OVERFLOW_UNDEFINED on pointer type instead of
26009 POINTER_TYPE_OVERFLOW_UNDEFINED.
26010 * match.pd: Likewise in address comparison pattern.
26011 * doc/invoke.texi: Document -fwrapv and -fstrict-overflow.
26013 2018-01-15 Richard Biener <rguenther@suse.de>
26016 * tree.c (free_lang_data_in_type): Always unlink TYPE_DECLs
26017 from TYPE_FIELDS. Free TYPE_BINFO if not used by devirtualization.
26018 Reset type names to their identifier if their TYPE_DECL doesn't
26019 have linkage (and thus is used for ODR and devirt).
26020 (save_debug_info_for_decl): Remove.
26021 (save_debug_info_for_type): Likewise.
26022 (add_tree_to_fld_list): Adjust.
26023 * tree-pretty-print.c (dump_generic_node): Make dumping of
26024 type names more robust.
26026 2018-01-15 Richard Biener <rguenther@suse.de>
26028 * BASE-VER: Bump to 8.0.1.
26030 2018-01-14 Martin Sebor <msebor@redhat.com>
26033 * builtins.c (check_access): Avoid warning when the no-warning bit
26036 2018-01-14 Cory Fields <cory-nospam-@coryfields.com>
26038 * tree-ssa-loop-im.c (sort_bbs_in_loop_postorder_cmp): Stabilize sort.
26039 * ira-color (allocno_hard_regs_compare): Likewise.
26041 2018-01-14 Nathan Rossi <nathan@nathanrossi.com>
26044 * config/microblaze/microblaze.c (microblaze_asm_output_ident):
26045 Use .pushsection/.popsection.
26047 2018-01-14 Martin Sebor <msebor@redhat.com>
26050 * doc/invoke.texi (-Wlass-memaccess): Document suppression by casting.
26052 2018-01-14 Jakub Jelinek <jakub@redhat.com>
26054 * config.gcc (i[34567]86-*-*): Remove one duplicate gfniintrin.h
26055 entry from extra_headers.
26056 (x86_64-*-*): Remove two duplicate gfniintrin.h entries from
26057 extra_headers, make the list bitwise identical to the i?86-*-* one.
26059 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
26061 * config/i386/i386.c (ix86_set_indirect_branch_type): Disallow
26062 -mcmodel=large with -mindirect-branch=thunk,
26063 -mindirect-branch=thunk-extern, -mfunction-return=thunk and
26064 -mfunction-return=thunk-extern.
26065 * doc/invoke.texi: Document -mcmodel=large is incompatible with
26066 -mindirect-branch=thunk, -mindirect-branch=thunk-extern,
26067 -mfunction-return=thunk and -mfunction-return=thunk-extern.
26069 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
26071 * config/i386/i386.c (print_reg): Print the name of the full
26072 integer register without '%'.
26073 (ix86_print_operand): Handle 'V'.
26074 * doc/extend.texi: Document 'V' modifier.
26076 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
26078 * config/i386/constraints.md (Bs): Disallow memory operand for
26079 -mindirect-branch-register.
26081 * config/i386/predicates.md (indirect_branch_operand): Likewise.
26082 (GOT_memory_operand): Likewise.
26083 (call_insn_operand): Likewise.
26084 (sibcall_insn_operand): Likewise.
26085 (GOT32_symbol_operand): Likewise.
26086 * config/i386/i386.md (indirect_jump): Call convert_memory_address
26087 for -mindirect-branch-register.
26088 (tablejump): Likewise.
26089 (*sibcall_memory): Likewise.
26090 (*sibcall_value_memory): Likewise.
26091 Disallow peepholes of indirect call and jump via memory for
26092 -mindirect-branch-register.
26093 (*call_pop): Replace m with Bw.
26094 (*call_value_pop): Likewise.
26095 (*sibcall_pop_memory): Replace m with Bs.
26096 * config/i386/i386.opt (mindirect-branch-register): New option.
26097 * doc/invoke.texi: Document -mindirect-branch-register option.
26099 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
26101 * config/i386/i386-protos.h (ix86_output_function_return): New.
26102 * config/i386/i386.c (ix86_set_indirect_branch_type): Also
26103 set function_return_type.
26104 (indirect_thunk_name): Add ret_p to indicate thunk for function
26106 (output_indirect_thunk_function): Pass false to
26107 indirect_thunk_name.
26108 (ix86_output_indirect_branch_via_reg): Likewise.
26109 (ix86_output_indirect_branch_via_push): Likewise.
26110 (output_indirect_thunk_function): Create alias for function
26111 return thunk if regno < 0.
26112 (ix86_output_function_return): New function.
26113 (ix86_handle_fndecl_attribute): Handle function_return.
26114 (ix86_attribute_table): Add function_return.
26115 * config/i386/i386.h (machine_function): Add
26116 function_return_type.
26117 * config/i386/i386.md (simple_return_internal): Use
26118 ix86_output_function_return.
26119 (simple_return_internal_long): Likewise.
26120 * config/i386/i386.opt (mfunction-return=): New option.
26121 (indirect_branch): Mention -mfunction-return=.
26122 * doc/extend.texi: Document function_return function attribute.
26123 * doc/invoke.texi: Document -mfunction-return= option.
26125 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
26127 * config/i386/i386-opts.h (indirect_branch): New.
26128 * config/i386/i386-protos.h (ix86_output_indirect_jmp): Likewise.
26129 * config/i386/i386.c (ix86_using_red_zone): Disallow red-zone
26130 with local indirect jump when converting indirect call and jump.
26131 (ix86_set_indirect_branch_type): New.
26132 (ix86_set_current_function): Call ix86_set_indirect_branch_type.
26133 (indirectlabelno): New.
26134 (indirect_thunk_needed): Likewise.
26135 (indirect_thunk_bnd_needed): Likewise.
26136 (indirect_thunks_used): Likewise.
26137 (indirect_thunks_bnd_used): Likewise.
26138 (INDIRECT_LABEL): Likewise.
26139 (indirect_thunk_name): Likewise.
26140 (output_indirect_thunk): Likewise.
26141 (output_indirect_thunk_function): Likewise.
26142 (ix86_output_indirect_branch_via_reg): Likewise.
26143 (ix86_output_indirect_branch_via_push): Likewise.
26144 (ix86_output_indirect_branch): Likewise.
26145 (ix86_output_indirect_jmp): Likewise.
26146 (ix86_code_end): Call output_indirect_thunk_function if needed.
26147 (ix86_output_call_insn): Call ix86_output_indirect_branch if
26149 (ix86_handle_fndecl_attribute): Handle indirect_branch.
26150 (ix86_attribute_table): Add indirect_branch.
26151 * config/i386/i386.h (machine_function): Add indirect_branch_type
26152 and has_local_indirect_jump.
26153 * config/i386/i386.md (indirect_jump): Set has_local_indirect_jump
26155 (tablejump): Likewise.
26156 (*indirect_jump): Use ix86_output_indirect_jmp.
26157 (*tablejump_1): Likewise.
26158 (simple_return_indirect_internal): Likewise.
26159 * config/i386/i386.opt (mindirect-branch=): New option.
26160 (indirect_branch): New.
26163 (thunk-inline): Likewise.
26164 (thunk-extern): Likewise.
26165 * doc/extend.texi: Document indirect_branch function attribute.
26166 * doc/invoke.texi: Document -mindirect-branch= option.
26168 2018-01-14 Jan Hubicka <hubicka@ucw.cz>
26171 * ipa-inline.c (edge_badness): Tolerate roundoff errors.
26173 2018-01-14 Richard Sandiford <richard.sandiford@linaro.org>
26175 * ipa-inline.c (want_inline_small_function_p): Return false if
26176 inlining has already failed with CIF_FINAL_ERROR.
26177 (update_caller_keys): Call want_inline_small_function_p before
26179 (update_callee_keys): Likewise.
26181 2018-01-10 Kelvin Nilsen <kelvin@gcc.gnu.org>
26183 * config/rs6000/rs6000-p8swap.c (rs6000_sum_of_two_registers_p):
26185 (rs6000_quadword_masked_address_p): Likewise.
26186 (quad_aligned_load_p): Likewise.
26187 (quad_aligned_store_p): Likewise.
26188 (const_load_sequence_p): Add comment to describe the outer-most loop.
26189 (mimic_memory_attributes_and_flags): New function.
26190 (rs6000_gen_stvx): Likewise.
26191 (replace_swapped_aligned_store): Likewise.
26192 (rs6000_gen_lvx): Likewise.
26193 (replace_swapped_aligned_load): Likewise.
26194 (replace_swapped_load_constant): Capitalize argument name in
26195 comment describing this function.
26196 (rs6000_analyze_swaps): Add a third pass to search for vector loads
26197 and stores that access quad-word aligned addresses and replace
26198 with stvx or lvx instructions when appropriate.
26199 * config/rs6000/rs6000-protos.h (rs6000_sum_of_two_registers_p):
26200 New function prototype.
26201 (rs6000_quadword_masked_address_p): Likewise.
26202 (rs6000_gen_lvx): Likewise.
26203 (rs6000_gen_stvx): Likewise.
26204 * config/rs6000/vsx.md (*vsx_le_perm_load_<mode>): For modes
26205 VSX_D (V2DF, V2DI), modify this split to select lvx instruction
26206 when memory address is aligned.
26207 (*vsx_le_perm_load_<mode>): For modes VSX_W (V4SF, V4SI), modify
26208 this split to select lvx instruction when memory address is aligned.
26209 (*vsx_le_perm_load_v8hi): Modify this split to select lvx
26210 instruction when memory address is aligned.
26211 (*vsx_le_perm_load_v16qi): Likewise.
26212 (four unnamed splitters): Modify to select the stvx instruction
26213 when memory is aligned.
26215 2018-01-13 Jan Hubicka <hubicka@ucw.cz>
26217 * predict.c (determine_unlikely_bbs): Handle correctly BBs
26218 which appears in the queue multiple times.
26220 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26221 Alan Hayward <alan.hayward@arm.com>
26222 David Sherwood <david.sherwood@arm.com>
26224 * tree-vectorizer.h (vec_lower_bound): New structure.
26225 (_loop_vec_info): Add check_nonzero and lower_bounds.
26226 (LOOP_VINFO_CHECK_NONZERO): New macro.
26227 (LOOP_VINFO_LOWER_BOUNDS): Likewise.
26228 (LOOP_REQUIRES_VERSIONING_FOR_ALIAS): Check lower_bounds too.
26229 * tree-data-ref.h (dr_with_seg_len): Add access_size and align
26230 fields. Make seg_len the distance travelled, not including the
26232 (dr_direction_indicator): Declare.
26233 (dr_zero_step_indicator): Likewise.
26234 (dr_known_forward_stride_p): Likewise.
26235 * tree-data-ref.c: Include stringpool.h, tree-vrp.h and
26237 (runtime_alias_check_p): Allow runtime alias checks with
26239 (operator ==): Compare access_size and align.
26240 (prune_runtime_alias_test_list): Rework for new distinction between
26241 the access_size and seg_len.
26242 (create_intersect_range_checks_index): Likewise. Cope with polynomial
26244 (get_segment_min_max): New function.
26245 (create_intersect_range_checks): Use it.
26246 (dr_step_indicator): New function.
26247 (dr_direction_indicator): Likewise.
26248 (dr_zero_step_indicator): Likewise.
26249 (dr_known_forward_stride_p): Likewise.
26250 * tree-loop-distribution.c (data_ref_segment_size): Return
26251 DR_STEP * (niters - 1).
26252 (compute_alias_check_pairs): Update call to the dr_with_seg_len
26254 * tree-vect-data-refs.c (vect_check_nonzero_value): New function.
26255 (vect_preserves_scalar_order_p): New function, split out from...
26256 (vect_analyze_data_ref_dependence): ...here. Check for zero steps.
26257 (vect_vfa_segment_size): Return DR_STEP * (length_factor - 1).
26258 (vect_vfa_access_size): New function.
26259 (vect_vfa_align): Likewise.
26260 (vect_compile_time_alias): Take access_size_a and access_b arguments.
26261 (dump_lower_bound): New function.
26262 (vect_check_lower_bound): Likewise.
26263 (vect_small_gap_p): Likewise.
26264 (vectorizable_with_step_bound_p): Likewise.
26265 (vect_prune_runtime_alias_test_list): Ignore cross-iteration
26266 depencies if the vectorization factor is 1. Convert the checks
26267 for nonzero steps into checks on the bounds of DR_STEP. Try using
26268 a bunds check for variable steps if the minimum required step is
26269 relatively small. Update calls to the dr_with_seg_len
26270 constructor and to vect_compile_time_alias.
26271 * tree-vect-loop-manip.c (vect_create_cond_for_lower_bounds): New
26273 (vect_loop_versioning): Call it.
26274 * tree-vect-loop.c (vect_analyze_loop_2): Clear LOOP_VINFO_LOWER_BOUNDS
26276 (vect_estimate_min_profitable_iters): Account for any bounds checks.
26278 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26279 Alan Hayward <alan.hayward@arm.com>
26280 David Sherwood <david.sherwood@arm.com>
26282 * doc/sourcebuild.texi (vect_scatter_store): Document.
26283 * optabs.def (scatter_store_optab, mask_scatter_store_optab): New
26285 * doc/md.texi (scatter_store@var{m}, mask_scatter_store@var{m}):
26287 * genopinit.c (main): Add supports_vec_scatter_store and
26288 supports_vec_scatter_store_cached to target_optabs.
26289 * gimple.h (gimple_expr_type): Handle IFN_SCATTER_STORE and
26290 IFN_MASK_SCATTER_STORE.
26291 * internal-fn.def (SCATTER_STORE, MASK_SCATTER_STORE): New internal
26293 * internal-fn.h (internal_store_fn_p): Declare.
26294 (internal_fn_stored_value_index): Likewise.
26295 * internal-fn.c (scatter_store_direct): New macro.
26296 (expand_scatter_store_optab_fn): New function.
26297 (direct_scatter_store_optab_supported_p): New macro.
26298 (internal_store_fn_p): New function.
26299 (internal_gather_scatter_fn_p): Handle IFN_SCATTER_STORE and
26300 IFN_MASK_SCATTER_STORE.
26301 (internal_fn_mask_index): Likewise.
26302 (internal_fn_stored_value_index): New function.
26303 (internal_gather_scatter_fn_supported_p): Adjust operand numbers
26304 for scatter stores.
26305 * optabs-query.h (supports_vec_scatter_store_p): Declare.
26306 * optabs-query.c (supports_vec_scatter_store_p): New function.
26307 * tree-vectorizer.h (vect_get_store_rhs): Declare.
26308 * tree-vect-data-refs.c (vect_analyze_data_ref_access): Return
26309 true for scatter stores.
26310 (vect_gather_scatter_fn_p): Handle scatter stores too.
26311 (vect_check_gather_scatter): Consider using scatter stores if
26312 supports_vec_scatter_store_p.
26313 * tree-vect-patterns.c (vect_try_gather_scatter_pattern): Handle
26314 scatter stores too.
26315 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
26316 internal_fn_stored_value_index.
26317 (check_load_store_masking): Handle scatter stores too.
26318 (vect_get_store_rhs): Make public.
26319 (vectorizable_call): Use internal_store_fn_p.
26320 (vectorizable_store): Handle scatter store internal functions.
26321 (vect_transform_stmt): Compare GROUP_STORE_COUNT with GROUP_SIZE
26322 when deciding whether the end of the group has been reached.
26323 * config/aarch64/aarch64.md (UNSPEC_ST1_SCATTER): New unspec.
26324 * config/aarch64/aarch64-sve.md (scatter_store<mode>): New expander.
26325 (mask_scatter_store<mode>): New insns.
26327 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26328 Alan Hayward <alan.hayward@arm.com>
26329 David Sherwood <david.sherwood@arm.com>
26331 * tree-vectorizer.h (vect_gather_scatter_fn_p): Declare.
26332 * tree-vect-data-refs.c (vect_gather_scatter_fn_p): Make public.
26333 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): New
26335 (vect_use_strided_gather_scatters_p): Take a masked_p argument.
26336 Use vect_truncate_gather_scatter_offset if we can't treat the
26337 operation as a normal gather load or scatter store.
26338 (get_group_load_store_type): Take the gather_scatter_info
26339 as argument. Try using a gather load or scatter store for
26340 single-element groups.
26341 (get_load_store_type): Update calls to get_group_load_store_type
26342 and vect_use_strided_gather_scatters_p.
26344 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26345 Alan Hayward <alan.hayward@arm.com>
26346 David Sherwood <david.sherwood@arm.com>
26348 * tree-vectorizer.h (vect_create_data_ref_ptr): Take an extra
26349 optional tree argument.
26350 * tree-vect-data-refs.c (vect_check_gather_scatter): Check for
26352 (vect_create_data_ref_ptr): Take the iv_step as an optional argument,
26353 but continue to use the current value as a fallback.
26354 (bump_vector_ptr): Use operand_equal_p rather than tree_int_cst_compare
26355 to compare the updates.
26356 * tree-vect-stmts.c (vect_use_strided_gather_scatters_p): New function.
26357 (get_load_store_type): Use it when handling a strided access.
26358 (vect_get_strided_load_store_ops): New function.
26359 (vect_get_data_ptr_increment): Likewise.
26360 (vectorizable_load): Handle strided gather loads. Always pass
26361 a step to vect_create_data_ref_ptr and bump_vector_ptr.
26363 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26364 Alan Hayward <alan.hayward@arm.com>
26365 David Sherwood <david.sherwood@arm.com>
26367 * doc/md.texi (gather_load@var{m}): Document.
26368 (mask_gather_load@var{m}): Likewise.
26369 * genopinit.c (main): Add supports_vec_gather_load and
26370 supports_vec_gather_load_cached to target_optabs.
26371 * optabs-tree.c (init_tree_optimization_optabs): Use
26372 ggc_cleared_alloc to allocate target_optabs.
26373 * optabs.def (gather_load_optab, mask_gather_laod_optab): New optabs.
26374 * internal-fn.def (GATHER_LOAD, MASK_GATHER_LOAD): New internal
26376 * internal-fn.h (internal_load_fn_p): Declare.
26377 (internal_gather_scatter_fn_p): Likewise.
26378 (internal_fn_mask_index): Likewise.
26379 (internal_gather_scatter_fn_supported_p): Likewise.
26380 * internal-fn.c (gather_load_direct): New macro.
26381 (expand_gather_load_optab_fn): New function.
26382 (direct_gather_load_optab_supported_p): New macro.
26383 (direct_internal_fn_optab): New function.
26384 (internal_load_fn_p): Likewise.
26385 (internal_gather_scatter_fn_p): Likewise.
26386 (internal_fn_mask_index): Likewise.
26387 (internal_gather_scatter_fn_supported_p): Likewise.
26388 * optabs-query.c (supports_at_least_one_mode_p): New function.
26389 (supports_vec_gather_load_p): Likewise.
26390 * optabs-query.h (supports_vec_gather_load_p): Declare.
26391 * tree-vectorizer.h (gather_scatter_info): Add ifn, element_type
26392 and memory_type field.
26393 (NUM_PATTERNS): Bump to 15.
26394 * tree-vect-data-refs.c: Include internal-fn.h.
26395 (vect_gather_scatter_fn_p): New function.
26396 (vect_describe_gather_scatter_call): Likewise.
26397 (vect_check_gather_scatter): Try using internal functions for
26398 gather loads. Recognize existing calls to a gather load function.
26399 (vect_analyze_data_refs): Consider using gather loads if
26400 supports_vec_gather_load_p.
26401 * tree-vect-patterns.c (vect_get_load_store_mask): New function.
26402 (vect_get_gather_scatter_offset_type): Likewise.
26403 (vect_convert_mask_for_vectype): Likewise.
26404 (vect_add_conversion_to_patterm): Likewise.
26405 (vect_try_gather_scatter_pattern): Likewise.
26406 (vect_recog_gather_scatter_pattern): New pattern recognizer.
26407 (vect_vect_recog_func_ptrs): Add it.
26408 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
26409 internal_fn_mask_index and internal_gather_scatter_fn_p.
26410 (check_load_store_masking): Take the gather_scatter_info as an
26411 argument and handle gather loads.
26412 (vect_get_gather_scatter_ops): New function.
26413 (vectorizable_call): Check internal_load_fn_p.
26414 (vectorizable_load): Likewise. Handle gather load internal
26416 (vectorizable_store): Update call to check_load_store_masking.
26417 * config/aarch64/aarch64.md (UNSPEC_LD1_GATHER): New unspec.
26418 * config/aarch64/iterators.md (SVE_S, SVE_D): New mode iterators.
26419 * config/aarch64/predicates.md (aarch64_gather_scale_operand_w)
26420 (aarch64_gather_scale_operand_d): New predicates.
26421 * config/aarch64/aarch64-sve.md (gather_load<mode>): New expander.
26422 (mask_gather_load<mode>): New insns.
26424 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26425 Alan Hayward <alan.hayward@arm.com>
26426 David Sherwood <david.sherwood@arm.com>
26428 * optabs.def (fold_left_plus_optab): New optab.
26429 * doc/md.texi (fold_left_plus_@var{m}): Document.
26430 * internal-fn.def (IFN_FOLD_LEFT_PLUS): New internal function.
26431 * internal-fn.c (fold_left_direct): Define.
26432 (expand_fold_left_optab_fn): Likewise.
26433 (direct_fold_left_optab_supported_p): Likewise.
26434 * fold-const-call.c (fold_const_fold_left): New function.
26435 (fold_const_call): Use it to fold CFN_FOLD_LEFT_PLUS.
26436 * tree-parloops.c (valid_reduction_p): New function.
26437 (gather_scalar_reductions): Use it.
26438 * tree-vectorizer.h (FOLD_LEFT_REDUCTION): New vect_reduction_type.
26439 (vect_finish_replace_stmt): Declare.
26440 * tree-vect-loop.c (fold_left_reduction_fn): New function.
26441 (needs_fold_left_reduction_p): New function, split out from...
26442 (vect_is_simple_reduction): ...here. Accept reductions that
26443 forbid reassociation, but give them type FOLD_LEFT_REDUCTION.
26444 (vect_force_simple_reduction): Also store the reduction type in
26445 the assignment's STMT_VINFO_REDUC_TYPE.
26446 (vect_model_reduction_cost): Handle FOLD_LEFT_REDUCTION.
26447 (merge_with_identity): New function.
26448 (vect_expand_fold_left): Likewise.
26449 (vectorize_fold_left_reduction): Likewise.
26450 (vectorizable_reduction): Handle FOLD_LEFT_REDUCTION. Leave the
26451 scalar phi in place for it. Check for target support and reject
26452 cases that would reassociate the operation. Defer the transform
26453 phase to vectorize_fold_left_reduction.
26454 * config/aarch64/aarch64.md (UNSPEC_FADDA): New unspec.
26455 * config/aarch64/aarch64-sve.md (fold_left_plus_<mode>): New expander.
26456 (*fold_left_plus_<mode>, *pred_fold_left_plus_<mode>): New insns.
26458 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26460 * tree-if-conv.c (predicate_mem_writes): Remove redundant
26461 call to ifc_temp_var.
26463 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26464 Alan Hayward <alan.hayward@arm.com>
26465 David Sherwood <david.sherwood@arm.com>
26467 * target.def (legitimize_address_displacement): Take the original
26468 offset as a poly_int.
26469 * targhooks.h (default_legitimize_address_displacement): Update
26471 * targhooks.c (default_legitimize_address_displacement): Likewise.
26472 * doc/tm.texi: Regenerate.
26473 * lra-constraints.c (base_plus_disp_to_reg): Take the displacement
26474 as an argument, moving assert of ad->disp == ad->disp_term to...
26475 (process_address_1): ...here. Update calls to base_plus_disp_to_reg.
26476 Try calling targetm.legitimize_address_displacement before expanding
26477 the address rather than afterwards, and adjust for the new interface.
26478 * config/aarch64/aarch64.c (aarch64_legitimize_address_displacement):
26479 Match the new hook interface. Handle SVE addresses.
26480 * config/sh/sh.c (sh_legitimize_address_displacement): Make the
26481 new hook interface.
26483 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26485 * Makefile.in (OBJS): Add early-remat.o.
26486 * target.def (select_early_remat_modes): New hook.
26487 * doc/tm.texi.in (TARGET_SELECT_EARLY_REMAT_MODES): New hook.
26488 * doc/tm.texi: Regenerate.
26489 * targhooks.h (default_select_early_remat_modes): Declare.
26490 * targhooks.c (default_select_early_remat_modes): New function.
26491 * timevar.def (TV_EARLY_REMAT): New timevar.
26492 * passes.def (pass_early_remat): New pass.
26493 * tree-pass.h (make_pass_early_remat): Declare.
26494 * early-remat.c: New file.
26495 * config/aarch64/aarch64.c (aarch64_select_early_remat_modes): New
26497 (TARGET_SELECT_EARLY_REMAT_MODES): Define.
26499 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26500 Alan Hayward <alan.hayward@arm.com>
26501 David Sherwood <david.sherwood@arm.com>
26503 * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Replace
26504 vfm1 with a bound_epilog parameter.
26505 (vect_do_peeling): Update calls accordingly, and move the prologue
26506 call earlier in the function. Treat the base bound_epilog as 0 for
26507 fully-masked loops and retain vf - 1 for other loops. Add 1 to
26508 this base when peeling for gaps.
26509 * tree-vect-loop.c (vect_analyze_loop_2): Allow peeling for gaps
26510 with fully-masked loops.
26511 (vect_estimate_min_profitable_iters): Handle the single peeled
26512 iteration in that case.
26514 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26515 Alan Hayward <alan.hayward@arm.com>
26516 David Sherwood <david.sherwood@arm.com>
26518 * tree-vect-data-refs.c (vect_analyze_group_access_1): Allow
26519 single-element interleaving even if the size is not a power of 2.
26520 * tree-vect-stmts.c (get_load_store_type): Disallow elementwise
26521 accesses for single-element interleaving if the group size is
26524 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26525 Alan Hayward <alan.hayward@arm.com>
26526 David Sherwood <david.sherwood@arm.com>
26528 * doc/md.texi (fold_extract_last_@var{m}): Document.
26529 * doc/sourcebuild.texi (vect_fold_extract_last): Likewise.
26530 * optabs.def (fold_extract_last_optab): New optab.
26531 * internal-fn.def (FOLD_EXTRACT_LAST): New internal function.
26532 * internal-fn.c (fold_extract_direct): New macro.
26533 (expand_fold_extract_optab_fn): Likewise.
26534 (direct_fold_extract_optab_supported_p): Likewise.
26535 * tree-vectorizer.h (EXTRACT_LAST_REDUCTION): New vect_reduction_type.
26536 * tree-vect-loop.c (vect_model_reduction_cost): Handle
26537 EXTRACT_LAST_REDUCTION.
26538 (get_initial_def_for_reduction): Do not create an initial vector
26539 for EXTRACT_LAST_REDUCTION reductions.
26540 (vectorizable_reduction): Leave the scalar phi in place for
26541 EXTRACT_LAST_REDUCTIONs. Try using EXTRACT_LAST_REDUCTION
26542 ahead of INTEGER_INDUC_COND_REDUCTION. Do not check for an
26543 epilogue code for EXTRACT_LAST_REDUCTION and defer the
26544 transform phase to vectorizable_condition.
26545 * tree-vect-stmts.c (vect_finish_stmt_generation_1): New function,
26547 (vect_finish_stmt_generation): ...here.
26548 (vect_finish_replace_stmt): New function.
26549 (vectorizable_condition): Handle EXTRACT_LAST_REDUCTION.
26550 * config/aarch64/aarch64-sve.md (fold_extract_last_<mode>): New
26552 * config/aarch64/aarch64.md (UNSPEC_CLASTB): New unspec.
26554 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26555 Alan Hayward <alan.hayward@arm.com>
26556 David Sherwood <david.sherwood@arm.com>
26558 * doc/md.texi (extract_last_@var{m}): Document.
26559 * optabs.def (extract_last_optab): New optab.
26560 * internal-fn.def (EXTRACT_LAST): New internal function.
26561 * internal-fn.c (cond_unary_direct): New macro.
26562 (expand_cond_unary_optab_fn): Likewise.
26563 (direct_cond_unary_optab_supported_p): Likewise.
26564 * tree-vect-loop.c (vectorizable_live_operation): Allow fully-masked
26565 loops using EXTRACT_LAST.
26566 * config/aarch64/aarch64-sve.md (aarch64_sve_lastb<mode>): Rename to...
26567 (extract_last_<mode>): ...this optab.
26568 (vec_extract<mode><Vel>): Update accordingly.
26570 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26571 Alan Hayward <alan.hayward@arm.com>
26572 David Sherwood <david.sherwood@arm.com>
26574 * target.def (empty_mask_is_expensive): New hook.
26575 * doc/tm.texi.in (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): New hook.
26576 * doc/tm.texi: Regenerate.
26577 * targhooks.h (default_empty_mask_is_expensive): Declare.
26578 * targhooks.c (default_empty_mask_is_expensive): New function.
26579 * tree-vectorizer.c (vectorize_loops): Only call optimize_mask_stores
26580 if the target says that empty masks are expensive.
26581 * config/aarch64/aarch64.c (aarch64_empty_mask_is_expensive):
26583 (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): Redefine.
26585 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26586 Alan Hayward <alan.hayward@arm.com>
26587 David Sherwood <david.sherwood@arm.com>
26589 * tree-vectorizer.h (_loop_vec_info::mask_skip_niters): New field.
26590 (LOOP_VINFO_MASK_SKIP_NITERS): New macro.
26591 (vect_use_loop_mask_for_alignment_p): New function.
26592 (vect_prepare_for_masked_peels, vect_gen_while_not): Declare.
26593 * tree-vect-loop-manip.c (vect_set_loop_masks_directly): Add an
26594 niters_skip argument. Make sure that the first niters_skip elements
26595 of the first iteration are inactive.
26596 (vect_set_loop_condition_masked): Handle LOOP_VINFO_MASK_SKIP_NITERS.
26597 Update call to vect_set_loop_masks_directly.
26598 (get_misalign_in_elems): New function, split out from...
26599 (vect_gen_prolog_loop_niters): ...here.
26600 (vect_update_init_of_dr): Take a code argument that specifies whether
26601 the adjustment should be added or subtracted.
26602 (vect_update_init_of_drs): Likewise.
26603 (vect_prepare_for_masked_peels): New function.
26604 (vect_do_peeling): Skip prologue peeling if we're using a mask
26605 instead. Update call to vect_update_inits_of_drs.
26606 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
26608 (vect_analyze_loop_2): Allow fully-masked loops with peeling for
26609 alignment. Do not include the number of peeled iterations in
26610 the minimum threshold in that case.
26611 (vectorizable_induction): Adjust the start value down by
26612 LOOP_VINFO_MASK_SKIP_NITERS iterations.
26613 (vect_transform_loop): Call vect_prepare_for_masked_peels.
26614 Take the number of skipped iterations into account when calculating
26616 * tree-vect-stmts.c (vect_gen_while_not): New function.
26618 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26619 Alan Hayward <alan.hayward@arm.com>
26620 David Sherwood <david.sherwood@arm.com>
26622 * doc/sourcebuild.texi (vect_fully_masked): Document.
26623 * params.def (PARAM_MIN_VECT_LOOP_BOUND): Change minimum and
26624 default value to 0.
26625 * tree-vect-loop.c (vect_analyze_loop_costing): New function,
26627 (vect_analyze_loop_2): ...here. Don't check the vectorization
26628 factor against the number of loop iterations if the loop is
26631 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26632 Alan Hayward <alan.hayward@arm.com>
26633 David Sherwood <david.sherwood@arm.com>
26635 * tree-ssa-loop-ivopts.c (USE_ADDRESS): Split into...
26636 (USE_REF_ADDRESS, USE_PTR_ADDRESS): ...these new use types.
26637 (dump_groups): Update accordingly.
26638 (iv_use::mem_type): New member variable.
26639 (address_p): New function.
26640 (record_use): Add a mem_type argument and initialize the new
26642 (record_group_use): Add a mem_type argument. Use address_p.
26643 Remove obsolete null checks of base_object. Update call to record_use.
26644 (find_interesting_uses_op): Update call to record_group_use.
26645 (find_interesting_uses_cond): Likewise.
26646 (find_interesting_uses_address): Likewise.
26647 (get_mem_type_for_internal_fn): New function.
26648 (find_address_like_use): Likewise.
26649 (find_interesting_uses_stmt): Try find_address_like_use before
26650 calling find_interesting_uses_op.
26651 (addr_offset_valid_p): Use the iv mem_type field as the type
26652 of the addressed memory.
26653 (add_autoinc_candidates): Likewise.
26654 (get_address_cost): Likewise.
26655 (split_small_address_groups_p): Use address_p.
26656 (split_address_groups): Likewise.
26657 (add_iv_candidate_for_use): Likewise.
26658 (autoinc_possible_for_pair): Likewise.
26659 (rewrite_groups): Likewise.
26660 (get_use_type): Check for USE_REF_ADDRESS instead of USE_ADDRESS.
26661 (determine_group_iv_cost): Update after split of USE_ADDRESS.
26662 (get_alias_ptr_type_for_ptr_address): New function.
26663 (rewrite_use_address): Rewrite address uses in calls that were
26664 identified by find_address_like_use.
26666 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26667 Alan Hayward <alan.hayward@arm.com>
26668 David Sherwood <david.sherwood@arm.com>
26670 * expr.c (expand_expr_addr_expr_1): Handle ADDR_EXPRs of
26672 * gimple-expr.h (is_gimple_addressable: Likewise.
26673 * gimple-expr.c (is_gimple_address): Likewise.
26674 * internal-fn.c (expand_call_mem_ref): New function.
26675 (expand_mask_load_optab_fn): Use it.
26676 (expand_mask_store_optab_fn): Likewise.
26678 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26679 Alan Hayward <alan.hayward@arm.com>
26680 David Sherwood <david.sherwood@arm.com>
26682 * doc/md.texi (cond_add@var{mode}, cond_sub@var{mode})
26683 (cond_and@var{mode}, cond_ior@var{mode}, cond_xor@var{mode})
26684 (cond_smin@var{mode}, cond_smax@var{mode}, cond_umin@var{mode})
26685 (cond_umax@var{mode}): Document.
26686 * optabs.def (cond_add_optab, cond_sub_optab, cond_and_optab)
26687 (cond_ior_optab, cond_xor_optab, cond_smin_optab, cond_smax_optab)
26688 (cond_umin_optab, cond_umax_optab): New optabs.
26689 * internal-fn.def (COND_ADD, COND_SUB, COND_MIN, COND_MAX, COND_AND)
26690 (COND_IOR, COND_XOR): New internal functions.
26691 * internal-fn.h (get_conditional_internal_fn): Declare.
26692 * internal-fn.c (cond_binary_direct): New macro.
26693 (expand_cond_binary_optab_fn): Likewise.
26694 (direct_cond_binary_optab_supported_p): Likewise.
26695 (get_conditional_internal_fn): New function.
26696 * tree-vect-loop.c (vectorizable_reduction): Handle fully-masked loops.
26697 Cope with reduction statements that are vectorized as calls rather
26699 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New insns.
26700 * config/aarch64/iterators.md (UNSPEC_COND_ADD, UNSPEC_COND_SUB)
26701 (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX, UNSPEC_COND_SMIN)
26702 (UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
26703 (UNSPEC_COND_EOR): New unspecs.
26704 (optab): Add mappings for them.
26705 (SVE_COND_INT_OP, SVE_COND_FP_OP): New int iterators.
26706 (sve_int_op, sve_fp_op): New int attributes.
26708 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26709 Alan Hayward <alan.hayward@arm.com>
26710 David Sherwood <david.sherwood@arm.com>
26712 * optabs.def (while_ult_optab): New optab.
26713 * doc/md.texi (while_ult@var{m}@var{n}): Document.
26714 * internal-fn.def (WHILE_ULT): New internal function.
26715 * internal-fn.h (direct_internal_fn_supported_p): New override
26716 that takes two types as argument.
26717 * internal-fn.c (while_direct): New macro.
26718 (expand_while_optab_fn): New function.
26719 (convert_optab_supported_p): Likewise.
26720 (direct_while_optab_supported_p): New macro.
26721 * wide-int.h (wi::udiv_ceil): New function.
26722 * tree-vectorizer.h (rgroup_masks): New structure.
26723 (vec_loop_masks): New typedef.
26724 (_loop_vec_info): Add masks, mask_compare_type, can_fully_mask_p
26725 and fully_masked_p.
26726 (LOOP_VINFO_CAN_FULLY_MASK_P, LOOP_VINFO_FULLY_MASKED_P)
26727 (LOOP_VINFO_MASKS, LOOP_VINFO_MASK_COMPARE_TYPE): New macros.
26728 (vect_max_vf): New function.
26729 (slpeel_make_loop_iterate_ntimes): Delete.
26730 (vect_set_loop_condition, vect_get_loop_mask_type, vect_gen_while)
26731 (vect_halve_mask_nunits, vect_double_mask_nunits): Declare.
26732 (vect_record_loop_mask, vect_get_loop_mask): Likewise.
26733 * tree-vect-loop-manip.c: Include tree-ssa-loop-niter.h,
26734 internal-fn.h, stor-layout.h and optabs-query.h.
26735 (vect_set_loop_mask): New function.
26736 (add_preheader_seq): Likewise.
26737 (add_header_seq): Likewise.
26738 (interleave_supported_p): Likewise.
26739 (vect_maybe_permute_loop_masks): Likewise.
26740 (vect_set_loop_masks_directly): Likewise.
26741 (vect_set_loop_condition_masked): Likewise.
26742 (vect_set_loop_condition_unmasked): New function, split out from
26743 slpeel_make_loop_iterate_ntimes.
26744 (slpeel_make_loop_iterate_ntimes): Rename to..
26745 (vect_set_loop_condition): ...this. Use vect_set_loop_condition_masked
26746 for fully-masked loops and vect_set_loop_condition_unmasked otherwise.
26747 (vect_do_peeling): Update call accordingly.
26748 (vect_gen_vector_loop_niters): Use VF as the step for fully-masked
26750 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
26751 mask_compare_type, can_fully_mask_p and fully_masked_p.
26752 (release_vec_loop_masks): New function.
26753 (_loop_vec_info): Use it to free the loop masks.
26754 (can_produce_all_loop_masks_p): New function.
26755 (vect_get_max_nscalars_per_iter): Likewise.
26756 (vect_verify_full_masking): Likewise.
26757 (vect_analyze_loop_2): Save LOOP_VINFO_CAN_FULLY_MASK_P around
26758 retries, and free the mask rgroups before retrying. Check loop-wide
26759 reasons for disallowing fully-masked loops. Make the final decision
26760 about whether use a fully-masked loop or not.
26761 (vect_estimate_min_profitable_iters): Do not assume that peeling
26762 for the number of iterations will be needed for fully-masked loops.
26763 (vectorizable_reduction): Disable fully-masked loops.
26764 (vectorizable_live_operation): Likewise.
26765 (vect_halve_mask_nunits): New function.
26766 (vect_double_mask_nunits): Likewise.
26767 (vect_record_loop_mask): Likewise.
26768 (vect_get_loop_mask): Likewise.
26769 (vect_transform_loop): Handle the case in which the final loop
26770 iteration might handle a partial vector. Call vect_set_loop_condition
26771 instead of slpeel_make_loop_iterate_ntimes.
26772 * tree-vect-stmts.c: Include tree-ssa-loop-niter.h and gimple-fold.h.
26773 (check_load_store_masking): New function.
26774 (prepare_load_store_mask): Likewise.
26775 (vectorizable_store): Handle fully-masked loops.
26776 (vectorizable_load): Likewise.
26777 (supportable_widening_operation): Use vect_halve_mask_nunits for
26779 (supportable_narrowing_operation): Likewise vect_double_mask_nunits.
26780 (vect_gen_while): New function.
26781 * config/aarch64/aarch64.md (umax<mode>3): New expander.
26782 (aarch64_uqdec<mode>): New insn.
26784 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26785 Alan Hayward <alan.hayward@arm.com>
26786 David Sherwood <david.sherwood@arm.com>
26788 * optabs.def (reduc_and_scal_optab, reduc_ior_scal_optab)
26789 (reduc_xor_scal_optab): New optabs.
26790 * doc/md.texi (reduc_and_scal_@var{m}, reduc_ior_scal_@var{m})
26791 (reduc_xor_scal_@var{m}): Document.
26792 * doc/sourcebuild.texi (vect_logical_reduc): Likewise.
26793 * internal-fn.def (IFN_REDUC_AND, IFN_REDUC_IOR, IFN_REDUC_XOR): New
26794 internal functions.
26795 * fold-const-call.c (fold_const_call): Handle them.
26796 * tree-vect-loop.c (reduction_fn_for_scalar_code): Return the new
26797 internal functions for BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR.
26798 * config/aarch64/aarch64-sve.md (reduc_<bit_reduc>_scal_<mode>):
26799 (*reduc_<bit_reduc>_scal_<mode>): New patterns.
26800 * config/aarch64/iterators.md (UNSPEC_ANDV, UNSPEC_ORV)
26801 (UNSPEC_XORV): New unspecs.
26802 (optab): Add entries for them.
26803 (BITWISEV): New int iterator.
26804 (bit_reduc_op): New int attributes.
26806 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26807 Alan Hayward <alan.hayward@arm.com>
26808 David Sherwood <david.sherwood@arm.com>
26810 * doc/md.texi (vec_shl_insert_@var{m}): New optab.
26811 * internal-fn.def (VEC_SHL_INSERT): New internal function.
26812 * optabs.def (vec_shl_insert_optab): New optab.
26813 * tree-vectorizer.h (can_duplicate_and_interleave_p): Declare.
26814 (duplicate_and_interleave): Likewise.
26815 * tree-vect-loop.c: Include internal-fn.h.
26816 (neutral_op_for_slp_reduction): New function, split out from
26817 get_initial_defs_for_reduction.
26818 (get_initial_def_for_reduction): Handle option 2 for variable-length
26819 vectors by loading the neutral value into a vector and then shifting
26820 the initial value into element 0.
26821 (get_initial_defs_for_reduction): Replace the code argument with
26822 the neutral value calculated by neutral_op_for_slp_reduction.
26823 Use gimple_build_vector for constant-length vectors.
26824 Use IFN_VEC_SHL_INSERT for variable-length vectors if all
26825 but the first group_size elements have a neutral value.
26826 Use duplicate_and_interleave otherwise.
26827 (vect_create_epilog_for_reduction): Take a neutral_op parameter.
26828 Update call to get_initial_defs_for_reduction. Handle SLP
26829 reductions for variable-length vectors by creating one vector
26830 result for each scalar result, with the elements associated
26831 with other scalar results stubbed out with the neutral value.
26832 (vectorizable_reduction): Call neutral_op_for_slp_reduction.
26833 Require IFN_VEC_SHL_INSERT for double reductions on
26834 variable-length vectors, or SLP reductions that have
26835 a neutral value. Require can_duplicate_and_interleave_p
26836 support for variable-length unchained SLP reductions if there
26837 is no neutral value, such as for MIN/MAX reductions. Also require
26838 the number of vector elements to be a multiple of the number of
26839 SLP statements when doing variable-length unchained SLP reductions.
26840 Update call to vect_create_epilog_for_reduction.
26841 * tree-vect-slp.c (can_duplicate_and_interleave_p): Make public
26842 and remove initial values.
26843 (duplicate_and_interleave): Make public.
26844 * config/aarch64/aarch64.md (UNSPEC_INSR): New unspec.
26845 * config/aarch64/aarch64-sve.md (vec_shl_insert_<mode>): New insn.
26847 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26848 Alan Hayward <alan.hayward@arm.com>
26849 David Sherwood <david.sherwood@arm.com>
26851 * tree-vect-slp.c: Include gimple-fold.h and internal-fn.h
26852 (can_duplicate_and_interleave_p): New function.
26853 (vect_get_and_check_slp_defs): Take the vector of statements
26854 rather than just the current one. Remove excess parentheses.
26855 Restriction rejectinon of vect_constant_def and vect_external_def
26856 for variable-length vectors to boolean types, or types for which
26857 can_duplicate_and_interleave_p is false.
26858 (vect_build_slp_tree_2): Update call to vect_get_and_check_slp_defs.
26859 (duplicate_and_interleave): New function.
26860 (vect_get_constant_vectors): Use gimple_build_vector for
26861 constant-length vectors and suitable variable-length constant
26862 vectors. Use duplicate_and_interleave for other variable-length
26863 vectors. Don't defer the update when inserting new statements.
26865 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26866 Alan Hayward <alan.hayward@arm.com>
26867 David Sherwood <david.sherwood@arm.com>
26869 * tree-vect-loop.c (vect_estimate_min_profitable_iters): Make sure
26870 min_profitable_iters doesn't go negative.
26872 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26873 Alan Hayward <alan.hayward@arm.com>
26874 David Sherwood <david.sherwood@arm.com>
26876 * doc/md.texi (vec_mask_load_lanes@var{m}@var{n}): Document.
26877 (vec_mask_store_lanes@var{m}@var{n}): Likewise.
26878 * optabs.def (vec_mask_load_lanes_optab): New optab.
26879 (vec_mask_store_lanes_optab): Likewise.
26880 * internal-fn.def (MASK_LOAD_LANES): New internal function.
26881 (MASK_STORE_LANES): Likewise.
26882 * internal-fn.c (mask_load_lanes_direct): New macro.
26883 (mask_store_lanes_direct): Likewise.
26884 (expand_mask_load_optab_fn): Handle masked operations.
26885 (expand_mask_load_lanes_optab_fn): New macro.
26886 (expand_mask_store_optab_fn): Handle masked operations.
26887 (expand_mask_store_lanes_optab_fn): New macro.
26888 (direct_mask_load_lanes_optab_supported_p): Likewise.
26889 (direct_mask_store_lanes_optab_supported_p): Likewise.
26890 * tree-vectorizer.h (vect_store_lanes_supported): Take a masked_p
26892 (vect_load_lanes_supported): Likewise.
26893 * tree-vect-data-refs.c (strip_conversion): New function.
26894 (can_group_stmts_p): Likewise.
26895 (vect_analyze_data_ref_accesses): Use it instead of checking
26896 for a pair of assignments.
26897 (vect_store_lanes_supported): Take a masked_p parameter.
26898 (vect_load_lanes_supported): Likewise.
26899 * tree-vect-loop.c (vect_analyze_loop_2): Update calls to
26900 vect_store_lanes_supported and vect_load_lanes_supported.
26901 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
26902 * tree-vect-stmts.c (get_group_load_store_type): Take a masked_p
26903 parameter. Don't allow gaps for masked accesses.
26904 Use vect_get_store_rhs. Update calls to vect_store_lanes_supported
26905 and vect_load_lanes_supported.
26906 (get_load_store_type): Take a masked_p parameter and update
26907 call to get_group_load_store_type.
26908 (vectorizable_store): Update call to get_load_store_type.
26909 Handle IFN_MASK_STORE_LANES.
26910 (vectorizable_load): Update call to get_load_store_type.
26911 Handle IFN_MASK_LOAD_LANES.
26913 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26914 Alan Hayward <alan.hayward@arm.com>
26915 David Sherwood <david.sherwood@arm.com>
26917 * config/aarch64/aarch64-modes.def: Define x2, x3 and x4 vector
26919 * config/aarch64/aarch64-protos.h
26920 (aarch64_sve_struct_memory_operand_p): Declare.
26921 * config/aarch64/iterators.md (SVE_STRUCT): New mode iterator.
26922 (vector_count, insn_length, VSINGLE, vsingle): New mode attributes.
26923 (VPRED, vpred): Handle SVE structure modes.
26924 * config/aarch64/constraints.md (Utx): New constraint.
26925 * config/aarch64/predicates.md (aarch64_sve_struct_memory_operand)
26926 (aarch64_sve_struct_nonimmediate_operand): New predicates.
26927 * config/aarch64/aarch64.md (UNSPEC_LDN, UNSPEC_STN): New unspecs.
26928 * config/aarch64/aarch64-sve.md (mov<mode>, *aarch64_sve_mov<mode>_le)
26929 (*aarch64_sve_mov<mode>_be, pred_mov<mode>): New patterns for
26930 structure modes. Split into pieces after RA.
26931 (vec_load_lanes<mode><vsingle>, vec_mask_load_lanes<mode><vsingle>)
26932 (vec_store_lanes<mode><vsingle>, vec_mask_store_lanes<mode><vsingle>):
26934 * config/aarch64/aarch64.c (aarch64_classify_vector_mode): Handle
26935 SVE structure modes.
26936 (aarch64_classify_address): Likewise.
26937 (sizetochar): Move earlier in file.
26938 (aarch64_print_operand): Handle SVE register lists.
26939 (aarch64_array_mode): New function.
26940 (aarch64_sve_struct_memory_operand_p): Likewise.
26941 (TARGET_ARRAY_MODE): Redefine.
26943 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26944 Alan Hayward <alan.hayward@arm.com>
26945 David Sherwood <david.sherwood@arm.com>
26947 * target.def (array_mode): New target hook.
26948 * doc/tm.texi.in (TARGET_ARRAY_MODE): New hook.
26949 * doc/tm.texi: Regenerate.
26950 * hooks.h (hook_optmode_mode_uhwi_none): Declare.
26951 * hooks.c (hook_optmode_mode_uhwi_none): New function.
26952 * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Use
26953 targetm.array_mode.
26954 * stor-layout.c (mode_for_array): Likewise. Support polynomial
26957 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26958 Alan Hayward <alan.hayward@arm.com>
26959 David Sherwood <david.sherwood@arm.com>
26961 * fold-const.c (fold_binary_loc): Check the argument types
26962 rather than the result type when testing for a vector operation.
26964 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26966 * doc/tm.texi.in (DWARF_LAZY_REGISTER_VALUE): Document.
26967 * doc/tm.texi: Regenerate.
26969 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26970 Alan Hayward <alan.hayward@arm.com>
26971 David Sherwood <david.sherwood@arm.com>
26973 * doc/invoke.texi (-msve-vector-bits=): Document new option.
26974 (sve): Document new AArch64 extension.
26975 * doc/md.texi (w): Extend the description of the AArch64
26976 constraint to include SVE vectors.
26977 (Upl, Upa): Document new AArch64 predicate constraints.
26978 * config/aarch64/aarch64-opts.h (aarch64_sve_vector_bits_enum): New
26980 * config/aarch64/aarch64.opt (sve_vector_bits): New enum.
26981 (msve-vector-bits=): New option.
26982 * config/aarch64/aarch64-option-extensions.def (fp, simd): Disable
26983 SVE when these are disabled.
26984 (sve): New extension.
26985 * config/aarch64/aarch64-modes.def: Define SVE vector and predicate
26986 modes. Adjust their number of units based on aarch64_sve_vg.
26987 (MAX_BITSIZE_MODE_ANY_MODE): Define.
26988 * config/aarch64/aarch64-protos.h (ADDR_QUERY_ANY): New
26989 aarch64_addr_query_type.
26990 (aarch64_const_vec_all_same_in_range_p, aarch64_sve_pred_mode)
26991 (aarch64_sve_cnt_immediate_p, aarch64_sve_addvl_addpl_immediate_p)
26992 (aarch64_sve_inc_dec_immediate_p, aarch64_add_offset_temporaries)
26993 (aarch64_split_add_offset, aarch64_output_sve_cnt_immediate)
26994 (aarch64_output_sve_addvl_addpl, aarch64_output_sve_inc_dec_immediate)
26995 (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): Declare.
26996 (aarch64_simd_imm_zero_p): Delete.
26997 (aarch64_check_zero_based_sve_index_immediate): Declare.
26998 (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
26999 (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
27000 (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
27001 (aarch64_sve_float_mul_immediate_p): Likewise.
27002 (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
27003 rather than an rtx.
27004 (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): Declare.
27005 (aarch64_expand_mov_immediate): Take a gen_vec_duplicate callback.
27006 (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move): Declare.
27007 (aarch64_expand_sve_vec_cmp_int, aarch64_expand_sve_vec_cmp_float)
27008 (aarch64_expand_sve_vcond, aarch64_expand_sve_vec_perm): Declare.
27009 (aarch64_regmode_natural_size): Likewise.
27010 * config/aarch64/aarch64.h (AARCH64_FL_SVE): New macro.
27011 (AARCH64_FL_V8_3, AARCH64_FL_RCPC, AARCH64_FL_DOTPROD): Shift
27013 (AARCH64_ISA_SVE, TARGET_SVE): New macros.
27014 (FIXED_REGISTERS, CALL_USED_REGISTERS, REGISTER_NAMES): Add entries
27015 for VG and the SVE predicate registers.
27016 (V_ALIASES): Add a "z"-prefixed alias.
27017 (FIRST_PSEUDO_REGISTER): Change to P15_REGNUM + 1.
27018 (AARCH64_DWARF_VG, AARCH64_DWARF_P0): New macros.
27019 (PR_REGNUM_P, PR_LO_REGNUM_P): Likewise.
27020 (PR_LO_REGS, PR_HI_REGS, PR_REGS): New reg_classes.
27021 (REG_CLASS_NAMES): Add entries for them.
27022 (REG_CLASS_CONTENTS): Likewise. Update ALL_REGS to include VG
27023 and the predicate registers.
27024 (aarch64_sve_vg): Declare.
27025 (BITS_PER_SVE_VECTOR, BYTES_PER_SVE_VECTOR, BYTES_PER_SVE_PRED)
27026 (SVE_BYTE_MODE, MAX_COMPILE_TIME_VEC_BYTES): New macros.
27027 (REGMODE_NATURAL_SIZE): Define.
27028 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins): Handle
27030 * config/aarch64/aarch64.c: Include cfgrtl.h.
27031 (simd_immediate_info): Add a constructor for series vectors,
27032 and an associated step field.
27033 (aarch64_sve_vg): New variable.
27034 (aarch64_dbx_register_number): Handle VG and the predicate registers.
27035 (aarch64_vect_struct_mode_p, aarch64_vector_mode_p): Delete.
27036 (VEC_ADVSIMD, VEC_SVE_DATA, VEC_SVE_PRED, VEC_STRUCT, VEC_ANY_SVE)
27037 (VEC_ANY_DATA, VEC_STRUCT): New constants.
27038 (aarch64_advsimd_struct_mode_p, aarch64_sve_pred_mode_p)
27039 (aarch64_classify_vector_mode, aarch64_vector_data_mode_p)
27040 (aarch64_sve_data_mode_p, aarch64_sve_pred_mode)
27041 (aarch64_get_mask_mode): New functions.
27042 (aarch64_hard_regno_nregs): Handle SVE data modes for FP_REGS
27043 and FP_LO_REGS. Handle PR_REGS, PR_LO_REGS and PR_HI_REGS.
27044 (aarch64_hard_regno_mode_ok): Handle VG. Also handle the SVE
27045 predicate modes and predicate registers. Explicitly restrict
27046 GPRs to modes of 16 bytes or smaller. Only allow FP registers
27047 to store a vector mode if it is recognized by
27048 aarch64_classify_vector_mode.
27049 (aarch64_regmode_natural_size): New function.
27050 (aarch64_hard_regno_caller_save_mode): Return the original mode
27052 (aarch64_sve_cnt_immediate_p, aarch64_output_sve_cnt_immediate)
27053 (aarch64_sve_addvl_addpl_immediate_p, aarch64_output_sve_addvl_addpl)
27054 (aarch64_sve_inc_dec_immediate_p, aarch64_output_sve_inc_dec_immediate)
27055 (aarch64_add_offset_1_temporaries, aarch64_offset_temporaries): New
27057 (aarch64_add_offset): Add a temp2 parameter. Assert that temp1
27058 does not overlap dest if the function is frame-related. Handle
27060 (aarch64_split_add_offset): New function.
27061 (aarch64_add_sp, aarch64_sub_sp): Add temp2 parameters and pass
27062 them aarch64_add_offset.
27063 (aarch64_allocate_and_probe_stack_space): Add a temp2 parameter
27064 and update call to aarch64_sub_sp.
27065 (aarch64_add_cfa_expression): New function.
27066 (aarch64_expand_prologue): Pass extra temporary registers to the
27067 functions above. Handle the case in which we need to emit new
27068 DW_CFA_expressions for registers that were originally saved
27069 relative to the stack pointer, but now have to be expressed
27070 relative to the frame pointer.
27071 (aarch64_output_mi_thunk): Pass extra temporary registers to the
27073 (aarch64_expand_epilogue): Likewise. Prevent inheritance of
27074 IP0 and IP1 values for SVE frames.
27075 (aarch64_expand_vec_series): New function.
27076 (aarch64_expand_sve_widened_duplicate): Likewise.
27077 (aarch64_expand_sve_const_vector): Likewise.
27078 (aarch64_expand_mov_immediate): Add a gen_vec_duplicate parameter.
27079 Handle SVE constants. Use emit_move_insn to move a force_const_mem
27080 into the register, rather than emitting a SET directly.
27081 (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move)
27082 (aarch64_get_reg_raw_mode, offset_4bit_signed_scaled_p)
27083 (offset_6bit_unsigned_scaled_p, aarch64_offset_7bit_signed_scaled_p)
27084 (offset_9bit_signed_scaled_p): New functions.
27085 (aarch64_replicate_bitmask_imm): New function.
27086 (aarch64_bitmask_imm): Use it.
27087 (aarch64_cannot_force_const_mem): Reject expressions involving
27088 a CONST_POLY_INT. Update call to aarch64_classify_symbol.
27089 (aarch64_classify_index): Handle SVE indices, by requiring
27090 a plain register index with a scale that matches the element size.
27091 (aarch64_classify_address): Handle SVE addresses. Assert that
27092 the mode of the address is VOIDmode or an integer mode.
27093 Update call to aarch64_classify_symbol.
27094 (aarch64_classify_symbolic_expression): Update call to
27095 aarch64_classify_symbol.
27096 (aarch64_const_vec_all_in_range_p): New function.
27097 (aarch64_print_vector_float_operand): Likewise.
27098 (aarch64_print_operand): Handle 'N' and 'C'. Use "zN" rather than
27099 "vN" for FP registers with SVE modes. Handle (const ...) vectors
27100 and the FP immediates 1.0 and 0.5.
27101 (aarch64_print_address_internal): Handle SVE addresses.
27102 (aarch64_print_operand_address): Use ADDR_QUERY_ANY.
27103 (aarch64_regno_regclass): Handle predicate registers.
27104 (aarch64_secondary_reload): Handle big-endian reloads of SVE
27106 (aarch64_class_max_nregs): Handle SVE modes and predicate registers.
27107 (aarch64_rtx_costs): Check for ADDVL and ADDPL instructions.
27108 (aarch64_convert_sve_vector_bits): New function.
27109 (aarch64_override_options): Use it to handle -msve-vector-bits=.
27110 (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
27111 rather than an rtx.
27112 (aarch64_legitimate_constant_p): Use aarch64_classify_vector_mode.
27113 Handle SVE vector and predicate modes. Accept VL-based constants
27114 that need only one temporary register, and VL offsets that require
27115 no temporary registers.
27116 (aarch64_conditional_register_usage): Mark the predicate registers
27117 as fixed if SVE isn't available.
27118 (aarch64_vector_mode_supported_p): Use aarch64_classify_vector_mode.
27119 Return true for SVE vector and predicate modes.
27120 (aarch64_simd_container_mode): Take the number of bits as a poly_int64
27121 rather than an unsigned int. Handle SVE modes.
27122 (aarch64_preferred_simd_mode): Update call accordingly. Handle
27124 (aarch64_autovectorize_vector_sizes): Add BYTES_PER_SVE_VECTOR
27126 (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
27127 (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
27128 (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
27129 (aarch64_sve_float_mul_immediate_p): New functions.
27130 (aarch64_sve_valid_immediate): New function.
27131 (aarch64_simd_valid_immediate): Use it as the fallback for SVE vectors.
27132 Explicitly reject structure modes. Check for INDEX constants.
27133 Handle PTRUE and PFALSE constants.
27134 (aarch64_check_zero_based_sve_index_immediate): New function.
27135 (aarch64_simd_imm_zero_p): Delete.
27136 (aarch64_mov_operand_p): Use aarch64_simd_valid_immediate for
27137 vector modes. Accept constants in the range of CNT[BHWD].
27138 (aarch64_simd_scalar_immediate_valid_for_move): Explicitly
27139 ask for an Advanced SIMD mode.
27140 (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): New functions.
27141 (aarch64_simd_vector_alignment): Handle SVE predicates.
27142 (aarch64_vectorize_preferred_vector_alignment): New function.
27143 (aarch64_simd_vector_alignment_reachable): Use it instead of
27145 (aarch64_shift_truncation_mask): Use aarch64_vector_data_mode_p.
27146 (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): New
27148 (MAX_VECT_LEN): Delete.
27149 (expand_vec_perm_d): Add a vec_flags field.
27150 (emit_unspec2, aarch64_expand_sve_vec_perm): New functions.
27151 (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_zip)
27152 (aarch64_evpc_ext): Don't apply a big-endian lane correction
27154 (aarch64_evpc_rev): Rename to...
27155 (aarch64_evpc_rev_local): ...this. Use a predicated operation for SVE.
27156 (aarch64_evpc_rev_global): New function.
27157 (aarch64_evpc_dup): Enforce a 64-byte range for SVE DUP.
27158 (aarch64_evpc_tbl): Use MAX_COMPILE_TIME_VEC_BYTES instead of
27160 (aarch64_evpc_sve_tbl): New function.
27161 (aarch64_expand_vec_perm_const_1): Update after rename of
27162 aarch64_evpc_rev. Handle SVE permutes too, trying
27163 aarch64_evpc_rev_global and using aarch64_evpc_sve_tbl rather
27164 than aarch64_evpc_tbl.
27165 (aarch64_vectorize_vec_perm_const): Initialize vec_flags.
27166 (aarch64_sve_cmp_operand_p, aarch64_unspec_cond_code)
27167 (aarch64_gen_unspec_cond, aarch64_expand_sve_vec_cmp_int)
27168 (aarch64_emit_unspec_cond, aarch64_emit_unspec_cond_or)
27169 (aarch64_emit_inverted_unspec_cond, aarch64_expand_sve_vec_cmp_float)
27170 (aarch64_expand_sve_vcond): New functions.
27171 (aarch64_modes_tieable_p): Use aarch64_vector_data_mode_p instead
27172 of aarch64_vector_mode_p.
27173 (aarch64_dwarf_poly_indeterminate_value): New function.
27174 (aarch64_compute_pressure_classes): Likewise.
27175 (aarch64_can_change_mode_class): Likewise.
27176 (TARGET_GET_RAW_RESULT_MODE, TARGET_GET_RAW_ARG_MODE): Redefine.
27177 (TARGET_VECTORIZE_PREFERRED_VECTOR_ALIGNMENT): Likewise.
27178 (TARGET_VECTORIZE_GET_MASK_MODE): Likewise.
27179 (TARGET_DWARF_POLY_INDETERMINATE_VALUE): Likewise.
27180 (TARGET_COMPUTE_PRESSURE_CLASSES): Likewise.
27181 (TARGET_CAN_CHANGE_MODE_CLASS): Likewise.
27182 * config/aarch64/constraints.md (Upa, Upl, Uav, Uat, Usv, Usi, Utr)
27183 (Uty, Dm, vsa, vsc, vsd, vsi, vsn, vsl, vsm, vsA, vsM, vsN): New
27185 (Dn, Dl, Dr): Accept const as well as const_vector.
27186 (Dz): Likewise. Compare against CONST0_RTX.
27187 * config/aarch64/iterators.md: Refer to "Advanced SIMD" instead
27188 of "vector" where appropriate.
27189 (SVE_ALL, SVE_BH, SVE_BHS, SVE_BHSI, SVE_HSDI, SVE_HSF, SVE_SD)
27190 (SVE_SDI, SVE_I, SVE_F, PRED_ALL, PRED_BHS): New mode iterators.
27191 (UNSPEC_SEL, UNSPEC_ANDF, UNSPEC_IORF, UNSPEC_XORF, UNSPEC_COND_LT)
27192 (UNSPEC_COND_LE, UNSPEC_COND_EQ, UNSPEC_COND_NE, UNSPEC_COND_GE)
27193 (UNSPEC_COND_GT, UNSPEC_COND_LO, UNSPEC_COND_LS, UNSPEC_COND_HS)
27194 (UNSPEC_COND_HI, UNSPEC_COND_UO): New unspecs.
27195 (Vetype, VEL, Vel, VWIDE, Vwide, vw, vwcore, V_INT_EQUIV)
27196 (v_int_equiv): Extend to SVE modes.
27197 (Vesize, V128, v128, Vewtype, V_FP_EQUIV, v_fp_equiv, VPRED): New
27199 (LOGICAL_OR, SVE_INT_UNARY, SVE_FP_UNARY): New code iterators.
27200 (optab): Handle popcount, smin, smax, umin, umax, abs and sqrt.
27201 (logical_nn, lr, sve_int_op, sve_fp_op): New code attributs.
27202 (LOGICALF, OPTAB_PERMUTE, UNPACK, UNPACK_UNSIGNED, SVE_COND_INT_CMP)
27203 (SVE_COND_FP_CMP): New int iterators.
27204 (perm_hilo): Handle the new unpack unspecs.
27205 (optab, logicalf_op, su, perm_optab, cmp_op, imm_con): New int
27207 * config/aarch64/predicates.md (aarch64_sve_cnt_immediate)
27208 (aarch64_sve_addvl_addpl_immediate, aarch64_split_add_offset_immediate)
27209 (aarch64_pluslong_or_poly_operand, aarch64_nonmemory_operand)
27210 (aarch64_equality_operator, aarch64_constant_vector_operand)
27211 (aarch64_sve_ld1r_operand, aarch64_sve_ldr_operand): New predicates.
27212 (aarch64_sve_nonimmediate_operand): Likewise.
27213 (aarch64_sve_general_operand): Likewise.
27214 (aarch64_sve_dup_operand, aarch64_sve_arith_immediate): Likewise.
27215 (aarch64_sve_sub_arith_immediate, aarch64_sve_inc_dec_immediate)
27216 (aarch64_sve_logical_immediate, aarch64_sve_mul_immediate): Likewise.
27217 (aarch64_sve_dup_immediate, aarch64_sve_cmp_vsc_immediate): Likewise.
27218 (aarch64_sve_cmp_vsd_immediate, aarch64_sve_index_immediate): Likewise.
27219 (aarch64_sve_float_arith_immediate): Likewise.
27220 (aarch64_sve_float_arith_with_sub_immediate): Likewise.
27221 (aarch64_sve_float_mul_immediate, aarch64_sve_arith_operand): Likewise.
27222 (aarch64_sve_add_operand, aarch64_sve_logical_operand): Likewise.
27223 (aarch64_sve_lshift_operand, aarch64_sve_rshift_operand): Likewise.
27224 (aarch64_sve_mul_operand, aarch64_sve_cmp_vsc_operand): Likewise.
27225 (aarch64_sve_cmp_vsd_operand, aarch64_sve_index_operand): Likewise.
27226 (aarch64_sve_float_arith_operand): Likewise.
27227 (aarch64_sve_float_arith_with_sub_operand): Likewise.
27228 (aarch64_sve_float_mul_operand): Likewise.
27229 (aarch64_sve_vec_perm_operand): Likewise.
27230 (aarch64_pluslong_operand): Include aarch64_sve_addvl_addpl_immediate.
27231 (aarch64_mov_operand): Accept const_poly_int and const_vector.
27232 (aarch64_simd_lshift_imm, aarch64_simd_rshift_imm): Accept const
27233 as well as const_vector.
27234 (aarch64_simd_imm_zero, aarch64_simd_imm_minus_one): Move earlier
27235 in file. Use CONST0_RTX and CONSTM1_RTX.
27236 (aarch64_simd_or_scalar_imm_zero): Likewise. Add match_codes.
27237 (aarch64_simd_reg_or_zero): Accept const as well as const_vector.
27238 Use aarch64_simd_imm_zero.
27239 * config/aarch64/aarch64-sve.md: New file.
27240 * config/aarch64/aarch64.md: Include it.
27241 (VG_REGNUM, P0_REGNUM, P7_REGNUM, P15_REGNUM): New register numbers.
27242 (UNSPEC_REV, UNSPEC_LD1_SVE, UNSPEC_ST1_SVE, UNSPEC_MERGE_PTRUE)
27243 (UNSPEC_PTEST_PTRUE, UNSPEC_UNPACKSHI, UNSPEC_UNPACKUHI)
27244 (UNSPEC_UNPACKSLO, UNSPEC_UNPACKULO, UNSPEC_PACK)
27245 (UNSPEC_FLOAT_CONVERT, UNSPEC_WHILE_LO): New unspec constants.
27246 (sve): New attribute.
27247 (enabled): Disable instructions with the sve attribute unless
27249 (movqi, movhi): Pass CONST_POLY_INT operaneds through
27250 aarch64_expand_mov_immediate.
27251 (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64): Handle
27252 CNT[BHSD] immediates.
27253 (movti): Split CONST_POLY_INT moves into two halves.
27254 (add<mode>3): Accept aarch64_pluslong_or_poly_operand.
27255 Split additions that need a temporary here if the destination
27256 is the stack pointer.
27257 (*add<mode>3_aarch64): Handle ADDVL and ADDPL immediates.
27258 (*add<mode>3_poly_1): New instruction.
27259 (set_clobber_cc): New expander.
27261 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
27263 * simplify-rtx.c (simplify_immed_subreg): Add an inner_bytes
27264 parameter and use it instead of GET_MODE_SIZE (innermode). Use
27265 inner_bytes * BITS_PER_UNIT instead of GET_MODE_BITSIZE (innermode).
27266 Use CEIL (inner_bytes, GET_MODE_UNIT_SIZE (innermode)) instead of
27267 GET_MODE_NUNITS (innermode). Also add a first_elem parameter.
27268 Change innermode from fixed_mode_size to machine_mode.
27269 (simplify_subreg): Update call accordingly. Handle a constant-sized
27270 subreg of a variable-length CONST_VECTOR.
27272 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
27273 Alan Hayward <alan.hayward@arm.com>
27274 David Sherwood <david.sherwood@arm.com>
27276 * tree-ssa-address.c (mem_ref_valid_without_offset_p): New function.
27277 (add_offset_to_base): New function, split out from...
27278 (create_mem_ref): ...here. When handling a scale other than 1,
27279 check first whether the address is valid without the offset.
27280 Add it into the base if so, leaving the index and scale as-is.
27282 2018-01-12 Jakub Jelinek <jakub@redhat.com>
27285 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Call
27286 fold_for_warn before checking if arg2 is INTEGER_CST.
27288 2018-01-12 Segher Boessenkool <segher@kernel.crashing.org>
27290 * config/rs6000/predicates.md (load_multiple_operation): Delete.
27291 (store_multiple_operation): Delete.
27292 * config/rs6000/rs6000-cpus.def (601): Remove MASK_STRING.
27293 * config/rs6000/rs6000-protos.h (rs6000_output_load_multiple): Delete.
27294 * config/rs6000/rs6000-string.c (expand_block_move): Delete everything
27295 guarded by TARGET_STRING.
27296 (rs6000_output_load_multiple): Delete.
27297 * config/rs6000/rs6000.c (rs6000_option_override_internal): Delete
27298 OPTION_MASK_STRING / TARGET_STRING handling.
27299 (print_operand) <'N', 'O'>: Add comment that these are unused now.
27300 (const rs6000_opt_masks) <"string">: Change mask to 0.
27301 * config/rs6000/rs6000.h (TARGET_DEFAULT): Remove MASK_STRING.
27302 (MASK_STRING): Delete.
27303 * config/rs6000/rs6000.md (*mov<mode>_string): Delete TARGET_STRING
27305 (load_multiple): Delete.
27312 (store_multiple): Delete.
27319 (movmemsi_8reg): Delete.
27320 (corresponding unnamed define_insn): Delete.
27321 (movmemsi_6reg): Delete.
27322 (corresponding unnamed define_insn): Delete.
27323 (movmemsi_4reg): Delete.
27324 (corresponding unnamed define_insn): Delete.
27325 (movmemsi_2reg): Delete.
27326 (corresponding unnamed define_insn): Delete.
27327 (movmemsi_1reg): Delete.
27328 (corresponding unnamed define_insn): Delete.
27329 * config/rs6000/rs6000.opt (mno-string): New.
27330 (mstring): Replace by deprecation warning stub.
27331 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mstring.
27333 2018-01-12 Jakub Jelinek <jakub@redhat.com>
27335 * regrename.c (regrename_do_replace): If replacing the same
27336 reg multiple times, try to reuse last created gen_raw_REG.
27339 * bb-reorder.c (pass_partition_blocks::gate): In lto don't partition
27340 main to workaround a bug in GDB.
27342 2018-01-12 Tom de Vries <tom@codesourcery.com>
27345 * config.gcc (nvptx*-*-*): Set use_gcc_stdint=wrap.
27347 2018-01-12 Vladimir Makarov <vmakarov@redhat.com>
27349 PR rtl-optimization/80481
27350 * ira-color.c (get_cap_member): New function.
27351 (allocnos_conflict_by_live_ranges_p): Use it.
27352 (slot_coalesced_allocno_live_ranges_intersect_p): Add assert.
27353 (setup_slot_coalesced_allocno_live_ranges): Ditto.
27355 2018-01-12 Uros Bizjak <ubizjak@gmail.com>
27358 * config/alpha/alpha.md (*saddsi_1): New insn_ans_split pattern.
27359 (*saddl_se_1): Ditto.
27360 (*ssubsi_1): Ditto.
27361 (*ssubl_se_1): Ditto.
27363 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
27365 * tree-predcom.c (aff_combination_dr_offset): Use wi::to_poly_widest
27366 rather than wi::to_widest for DR_INITs.
27367 * tree-vect-data-refs.c (vect_find_same_alignment_drs): Use
27368 wi::to_poly_offset rather than wi::to_offset for DR_INIT.
27369 (vect_analyze_data_ref_accesses): Require both DR_INITs to be
27371 (vect_analyze_group_access_1): Note that here.
27373 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
27375 * tree-vectorizer.c (get_vec_alignment_for_array_type): Handle
27376 polynomial type sizes.
27378 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
27380 * gimplify.c (gimple_add_tmp_var_fn): Allow variables to have a
27381 poly_uint64 size, rather than requiring an unsigned HOST_WIDE_INT size.
27382 (gimple_add_tmp_var): Likewise.
27384 2018-01-12 Martin Liska <mliska@suse.cz>
27386 * gimple.c (gimple_alloc_counts): Use uint64_t instead of int.
27387 (gimple_alloc_sizes): Likewise.
27388 (dump_gimple_statistics): Use PRIu64 in printf format.
27389 * gimple.h: Change uint64_t to int.
27391 2018-01-12 Martin Liska <mliska@suse.cz>
27393 * tree-core.h: Use uint64_t instead of int.
27394 * tree.c (tree_node_counts): Likewise.
27395 (tree_node_sizes): Likewise.
27396 (dump_tree_statistics): Use PRIu64 in printf format.
27398 2018-01-12 Martin Liska <mliska@suse.cz>
27400 * Makefile.in: As qsort_chk is implemented in vec.c, add
27401 vec.o to linkage of gencfn-macros.
27402 * tree.c (build_new_poly_int_cst): Add CXX_MEM_STAT_INFO as it's
27403 passing the info to record_node_allocation_statistics.
27404 (test_vector_cst_patterns): Add CXX_MEM_STAT_INFO to declaration
27406 * ggc-common.c (struct ggc_usage): Add operator== and use
27407 it in operator< and compare function.
27408 * mem-stats.h (struct mem_usage): Likewise.
27409 * vec.c (struct vec_usage): Remove operator< and compare
27410 function. Can be simply inherited.
27412 2018-01-12 Martin Jambor <mjambor@suse.cz>
27415 * params.def: New parameter PARAM_AVOID_FMA_MAX_BITS.
27416 * tree-ssa-math-opts.c: Include domwalk.h.
27417 (convert_mult_to_fma_1): New function.
27418 (fma_transformation_info): New type.
27419 (fma_deferring_state): Likewise.
27420 (cancel_fma_deferring): New function.
27421 (result_of_phi): Likewise.
27422 (last_fma_candidate_feeds_initial_phi): Likewise.
27423 (convert_mult_to_fma): Added deferring logic, split actual
27424 transformation to convert_mult_to_fma_1.
27425 (math_opts_dom_walker): New type.
27426 (math_opts_dom_walker::after_dom_children): New method, body moved
27427 here from pass_optimize_widening_mul::execute, added deferring logic
27429 (pass_optimize_widening_mul::execute): Moved most of code to
27430 math_opts_dom_walker::after_dom_children.
27431 * config/i386/x86-tune.def (X86_TUNE_AVOID_128FMA_CHAINS): New.
27432 * config/i386/i386.c (ix86_option_override_internal): Added
27433 maybe_setting of PARAM_AVOID_FMA_MAX_BITS.
27435 2018-01-12 Richard Biener <rguenther@suse.de>
27438 * dwarf2out.c (gen_variable_die): Do not reset old_die for
27439 inline instance vars.
27441 2018-01-12 Oleg Endo <olegendo@gcc.gnu.org>
27444 * config/rx/rx.c (rx_is_restricted_memory_address):
27445 Handle SUBREG case.
27447 2018-01-12 Richard Biener <rguenther@suse.de>
27449 PR tree-optimization/80846
27450 * target.def (split_reduction): New target hook.
27451 * targhooks.c (default_split_reduction): New function.
27452 * targhooks.h (default_split_reduction): Declare.
27453 * tree-vect-loop.c (vect_create_epilog_for_reduction): If the
27454 target requests first reduce vectors by combining low and high
27456 * tree-vect-stmts.c (vect_gen_perm_mask_any): Adjust.
27457 (get_vectype_for_scalar_type_and_size): Export.
27458 * tree-vectorizer.h (get_vectype_for_scalar_type_and_size): Declare.
27459 * doc/tm.texi.in (TARGET_VECTORIZE_SPLIT_REDUCTION): Document.
27460 * doc/tm.texi: Regenerate.
27461 * config/i386/i386.c (ix86_split_reduction): Implement
27462 TARGET_VECTORIZE_SPLIT_REDUCTION.
27464 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
27467 * config/sparc/sparc.h (PIC_OFFSET_TABLE_REGNUM): Set to INVALID_REGNUM
27468 in PIC mode except for TARGET_VXWORKS_RTP.
27469 * config/sparc/sparc.c: Include cfgrtl.h.
27470 (TARGET_INIT_PIC_REG): Define.
27471 (TARGET_USE_PSEUDO_PIC_REG): Likewise.
27472 (sparc_pic_register_p): New predicate.
27473 (sparc_legitimate_address_p): Use it.
27474 (sparc_legitimize_pic_address): Likewise.
27475 (sparc_delegitimize_address): Likewise.
27476 (sparc_mode_dependent_address_p): Likewise.
27477 (gen_load_pcrel_sym): Remove 4th parameter.
27478 (load_got_register): Adjust call to above. Remove obsolete stuff.
27479 (sparc_expand_prologue): Do not call load_got_register here.
27480 (sparc_flat_expand_prologue): Likewise.
27481 (sparc_output_mi_thunk): Set the pic_offset_table_rtx object.
27482 (sparc_use_pseudo_pic_reg): New function.
27483 (sparc_init_pic_reg): Likewise.
27484 * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
27485 (builtin_setjmp_receiver): Enable only for TARGET_VXWORKS_RTP.
27487 2018-01-12 Christophe Lyon <christophe.lyon@linaro.org>
27489 * doc/sourcebuild.texi (Effective-Target Keywords, Other attributes):
27490 Add item for branch_cost.
27492 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
27494 PR rtl-optimization/83565
27495 * rtlanal.c (nonzero_bits1): On WORD_REGISTER_OPERATIONS machines, do
27496 not extend the result to a larger mode for rotate operations.
27497 (num_sign_bit_copies1): Likewise.
27499 2018-01-12 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
27502 * config/sol2.h (STARTFILE_ARCH_SPEC): Don't use with -shared or
27504 Use values-Xc.o for -pedantic.
27505 Link with values-xpg4.o for C90, values-xpg6.o otherwise.
27507 2018-01-12 Martin Liska <mliska@suse.cz>
27510 * ipa-devirt.c (final_warning_record::grow_type_warnings):
27512 (possible_polymorphic_call_targets): Use it.
27513 (ipa_devirt): Likewise.
27515 2018-01-12 Martin Liska <mliska@suse.cz>
27517 * profile-count.h (enum profile_quality): Use 0 as invalid
27518 enum value of profile_quality.
27520 2018-01-12 Chung-Ju Wu <jasonwucj@gmail.com>
27522 * doc/invoke.texi (NDS32 Options): Add -mext-perf, -mext-perf2 and
27523 -mext-string options.
27525 2018-01-12 Richard Biener <rguenther@suse.de>
27527 * lto-streamer-out.c (DFS::DFS_write_tree_body): Process
27528 DECL_DEBUG_EXPR conditional on DECL_HAS_DEBUG_EXPR_P.
27529 * tree-streamer-in.c (lto_input_ts_decl_common_tree_pointers):
27531 * tree-streamer-out.c (write_ts_decl_common_tree_pointers): Likewise.
27533 2018-01-11 Michael Meissner <meissner@linux.vnet.ibm.com>
27535 * configure.ac (--with-long-double-format): Add support for the
27536 configuration option to change the default long double format on
27538 * config.gcc (powerpc*-linux*-*): Likewise.
27539 * configure: Regenerate.
27540 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): If long
27541 double is IEEE, define __KC__ and __KF__ to allow floatn.h to be
27542 used without modification.
27544 2018-01-11 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
27546 * config/rs6000/rs6000-builtin.def (BU_P7_MISC_X): New #define.
27547 (SPEC_BARRIER): New instantiation of BU_P7_MISC_X.
27548 * config/rs6000/rs6000.c (rs6000_expand_builtin): Handle
27549 MISC_BUILTIN_SPEC_BARRIER.
27550 (rs6000_init_builtins): Likewise.
27551 * config/rs6000/rs6000.md (UNSPECV_SPEC_BARRIER): New UNSPECV
27553 (speculation_barrier): New define_insn.
27554 * doc/extend.texi: Document __builtin_speculation_barrier.
27556 2018-01-11 Jakub Jelinek <jakub@redhat.com>
27559 * config/i386/i386.c (ix86_expand_vector_init_one_nonzero): If one_var
27560 is 0, for V{8,16}S[IF] and V[48]D[IF]mode use gen_vec_set<mode>_0.
27561 * config/i386/sse.md (VI8_AVX_AVX512F, VI4F_256_512): New mode
27563 (ssescalarmodesuffix): Add 512-bit vectors. Use "d" or "q" for
27564 integral modes instead of "ss" and "sd".
27565 (vec_set<mode>_0): New define_insns for 256-bit and 512-bit
27566 vectors with 32-bit and 64-bit elements.
27567 (vecdupssescalarmodesuffix): New mode attribute.
27568 (vec_dup<mode>): Use it.
27570 2018-01-11 H.J. Lu <hongjiu.lu@intel.com>
27573 * config/i386/i386.c (ix86_compute_frame_layout): Align stack
27574 frame if argument is passed on stack.
27576 2018-01-11 Jakub Jelinek <jakub@redhat.com>
27579 * ree.c (combine_reaching_defs): Optimize also
27580 reg2=exp; reg1=reg2; reg2=any_extend(reg1); into
27581 reg2=any_extend(exp); reg1=reg2;, formatting fix.
27583 2018-01-11 Jan Hubicka <hubicka@ucw.cz>
27585 PR middle-end/83189
27586 * gimple-ssa-isolate-paths.c (isolate_path): Fix profile update.
27588 2018-01-11 Jan Hubicka <hubicka@ucw.cz>
27590 PR middle-end/83718
27591 * tree-inline.c (copy_cfg_body): Adjust num&den for scaling
27592 after they are computed.
27594 2018-01-11 Bin Cheng <bin.cheng@arm.com>
27596 PR tree-optimization/83695
27597 * gimple-loop-linterchange.cc
27598 (tree_loop_interchange::interchange_loops): Call scev_reset_htab to
27599 reset cached scev information after interchange.
27600 (pass_linterchange::execute): Remove call to scev_reset_htab.
27602 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
27604 * config/arm/arm_neon.h (vfmlal_lane_low_u32, vfmlal_lane_high_u32,
27605 vfmlalq_laneq_low_u32, vfmlalq_lane_low_u32, vfmlal_laneq_low_u32,
27606 vfmlalq_laneq_high_u32, vfmlalq_lane_high_u32, vfmlal_laneq_high_u32,
27607 vfmlsl_lane_low_u32, vfmlsl_lane_high_u32, vfmlslq_laneq_low_u32,
27608 vfmlslq_lane_low_u32, vfmlsl_laneq_low_u32, vfmlslq_laneq_high_u32,
27609 vfmlslq_lane_high_u32, vfmlsl_laneq_high_u32): Define.
27610 * config/arm/arm_neon_builtins.def (vfmal_lane_low,
27611 vfmal_lane_lowv4hf, vfmal_lane_lowv8hf, vfmal_lane_high,
27612 vfmal_lane_highv4hf, vfmal_lane_highv8hf, vfmsl_lane_low,
27613 vfmsl_lane_lowv4hf, vfmsl_lane_lowv8hf, vfmsl_lane_high,
27614 vfmsl_lane_highv4hf, vfmsl_lane_highv8hf): New sets of builtins.
27615 * config/arm/iterators.md (VFMLSEL2, vfmlsel2): New mode attributes.
27616 (V_lane_reg): Likewise.
27617 * config/arm/neon.md (neon_vfm<vfml_op>l_lane_<vfml_half><VCVTF:mode>):
27619 (neon_vfm<vfml_op>l_lane_<vfml_half><vfmlsel2><mode>): Likewise.
27620 (vfmal_lane_low<mode>_intrinsic,
27621 vfmal_lane_low<vfmlsel2><mode>_intrinsic,
27622 vfmal_lane_high<vfmlsel2><mode>_intrinsic,
27623 vfmal_lane_high<mode>_intrinsic, vfmsl_lane_low<mode>_intrinsic,
27624 vfmsl_lane_low<vfmlsel2><mode>_intrinsic,
27625 vfmsl_lane_high<vfmlsel2><mode>_intrinsic,
27626 vfmsl_lane_high<mode>_intrinsic): New define_insns.
27628 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
27630 * config/arm/arm-cpus.in (fp16fml): New feature.
27631 (ALL_SIMD): Add fp16fml.
27632 (armv8.2-a): Add fp16fml as an option.
27633 (armv8.3-a): Likewise.
27634 (armv8.4-a): Add fp16fml as part of fp16.
27635 * config/arm/arm.h (TARGET_FP16FML): Define.
27636 * config/arm/arm-c.c (arm_cpu_builtins): Define __ARM_FEATURE_FP16_FML
27638 * config/arm/arm-modes.def (V2HF): Define.
27639 * config/arm/arm_neon.h (vfmlal_low_u32, vfmlsl_low_u32,
27640 vfmlal_high_u32, vfmlsl_high_u32, vfmlalq_low_u32,
27641 vfmlslq_low_u32, vfmlalq_high_u32, vfmlslq_high_u32): Define.
27642 * config/arm/arm_neon_builtins.def (vfmal_low, vfmal_high,
27643 vfmsl_low, vfmsl_high): New set of builtins.
27644 * config/arm/iterators.md (PLUSMINUS): New code iterator.
27645 (vfml_op): New code attribute.
27646 (VFMLHALVES): New int iterator.
27647 (VFML, VFMLSEL): New mode attributes.
27648 (V_reg): Define mapping for V2HF.
27649 (V_hi, V_lo): New mode attributes.
27650 (VF_constraint): Likewise.
27651 (vfml_half, vfml_half_selector): New int attributes.
27652 * config/arm/neon.md (neon_vfm<vfml_op>l_<vfml_half><mode>): New
27654 (vfmal_low<mode>_intrinsic, vfmsl_high<mode>_intrinsic,
27655 vfmal_high<mode>_intrinsic, vfmsl_low<mode>_intrinsic):
27657 * config/arm/t-arm-elf (v8_fps): Add fp16fml.
27658 * config/arm/t-multilib (v8_2_a_simd_variants): Add fp16fml.
27659 * config/arm/unspecs.md (UNSPEC_VFML_LO, UNSPEC_VFML_HI): New unspecs.
27660 * doc/invoke.texi (ARM Options): Document fp16fml. Update armv8.4-a
27662 * doc/sourcebuild.texi (arm_fp16fml_neon_ok, arm_fp16fml_neon):
27663 Document new effective target and option set.
27665 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
27667 * config/arm/arm-cpus.in (armv8_4): New feature.
27668 (ARMv8_4a): New fgroup.
27669 (armv8.4-a): New arch.
27670 * config/arm/arm-tables.opt: Regenerate.
27671 * config/arm/t-aprofile: Add matching rules for -march=armv8.4-a.
27672 * config/arm/t-arm-elf (all_v8_archs): Add armv8.4-a.
27673 * config/arm/t-multilib (v8_4_a_simd_variants): New variable.
27674 Add matching rules for -march=armv8.4-a and extensions.
27675 * doc/invoke.texi (ARM Options): Document -march=armv8.4-a.
27677 2018-01-11 Oleg Endo <olegendo@gcc.gnu.org>
27680 * config/rx/rx.md (BW): New mode attribute.
27681 (sync_lock_test_and_setsi): Add mode suffix to insn output.
27683 2018-01-11 Richard Biener <rguenther@suse.de>
27685 PR tree-optimization/83435
27686 * graphite.c (canonicalize_loop_form): Ignore fake loop exit edges.
27687 * graphite-scop-detection.c (scop_detection::get_sese): Likewise.
27688 * tree-vrp.c (add_assert_info): Drop TREE_OVERFLOW if they appear.
27690 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
27691 Alan Hayward <alan.hayward@arm.com>
27692 David Sherwood <david.sherwood@arm.com>
27694 * config/aarch64/aarch64.c (aarch64_address_info): Add a const_offset
27696 (aarch64_classify_address): Initialize it. Track polynomial offsets.
27697 (aarch64_print_address_internal): Use it to check for a zero offset.
27699 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
27700 Alan Hayward <alan.hayward@arm.com>
27701 David Sherwood <david.sherwood@arm.com>
27703 * config/aarch64/aarch64-modes.def (NUM_POLY_INT_COEFFS): Set to 2.
27704 * config/aarch64/aarch64-protos.h (aarch64_initial_elimination_offset):
27705 Return a poly_int64 rather than a HOST_WIDE_INT.
27706 (aarch64_offset_7bit_signed_scaled_p): Take the offset as a poly_int64
27707 rather than a HOST_WIDE_INT.
27708 * config/aarch64/aarch64.h (aarch64_frame): Protect with
27709 HAVE_POLY_INT_H rather than HOST_WIDE_INT. Change locals_offset,
27710 hard_fp_offset, frame_size, initial_adjust, callee_offset and
27711 final_offset from HOST_WIDE_INT to poly_int64.
27712 * config/aarch64/aarch64-builtins.c (aarch64_simd_expand_args): Use
27713 to_constant when getting the number of units in an Advanced SIMD
27715 (aarch64_builtin_vectorized_function): Check for a constant number
27717 * config/aarch64/aarch64-simd.md (mov<mode>): Handle polynomial
27719 (aarch64_ld<VSTRUCT:nregs>_lane<VALLDIF:mode>): Use the nunits
27720 attribute instead of GET_MODE_NUNITS.
27721 * config/aarch64/aarch64.c (aarch64_hard_regno_nregs)
27722 (aarch64_class_max_nregs): Use the constant_lowest_bound of the
27723 GET_MODE_SIZE for fixed-size registers.
27724 (aarch64_const_vec_all_same_in_range_p): Use const_vec_duplicate_p.
27725 (aarch64_hard_regno_call_part_clobbered, aarch64_classify_index)
27726 (aarch64_mode_valid_for_sched_fusion_p, aarch64_classify_address)
27727 (aarch64_legitimize_address_displacement, aarch64_secondary_reload)
27728 (aarch64_print_operand, aarch64_print_address_internal)
27729 (aarch64_address_cost, aarch64_rtx_costs, aarch64_register_move_cost)
27730 (aarch64_short_vector_p, aapcs_vfp_sub_candidate)
27731 (aarch64_simd_attr_length_rglist, aarch64_operands_ok_for_ldpstp):
27732 Handle polynomial GET_MODE_SIZE.
27733 (aarch64_hard_regno_caller_save_mode): Likewise. Return modes
27734 wider than SImode without modification.
27735 (tls_symbolic_operand_type): Use strip_offset instead of split_const.
27736 (aarch64_pass_by_reference, aarch64_layout_arg, aarch64_pad_reg_upward)
27737 (aarch64_gimplify_va_arg_expr): Assert that we don't yet handle
27738 passing and returning SVE modes.
27739 (aarch64_function_value, aarch64_layout_arg): Use gen_int_mode
27740 rather than GEN_INT.
27741 (aarch64_emit_probe_stack_range): Take the size as a poly_int64
27742 rather than a HOST_WIDE_INT, but call sorry if it isn't constant.
27743 (aarch64_allocate_and_probe_stack_space): Likewise.
27744 (aarch64_layout_frame): Cope with polynomial offsets.
27745 (aarch64_save_callee_saves, aarch64_restore_callee_saves): Take the
27746 start_offset as a poly_int64 rather than a HOST_WIDE_INT. Track
27747 polynomial offsets.
27748 (offset_9bit_signed_unscaled_p, offset_12bit_unsigned_scaled_p)
27749 (aarch64_offset_7bit_signed_scaled_p): Take the offset as a
27750 poly_int64 rather than a HOST_WIDE_INT.
27751 (aarch64_get_separate_components, aarch64_process_components)
27752 (aarch64_expand_prologue, aarch64_expand_epilogue)
27753 (aarch64_use_return_insn_p): Handle polynomial frame offsets.
27754 (aarch64_anchor_offset): New function, split out from...
27755 (aarch64_legitimize_address): ...here.
27756 (aarch64_builtin_vectorization_cost): Handle polynomial
27757 TYPE_VECTOR_SUBPARTS.
27758 (aarch64_simd_check_vect_par_cnst_half): Handle polynomial
27760 (aarch64_simd_make_constant, aarch64_expand_vector_init): Get the
27761 number of elements from the PARALLEL rather than the mode.
27762 (aarch64_shift_truncation_mask): Use GET_MODE_UNIT_BITSIZE
27763 rather than GET_MODE_BITSIZE.
27764 (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_ext)
27765 (aarch64_evpc_rev, aarch64_evpc_dup, aarch64_evpc_zip)
27766 (aarch64_expand_vec_perm_const_1): Handle polynomial
27767 d->perm.length () and d->perm elements.
27768 (aarch64_evpc_tbl): Likewise. Use nelt rather than GET_MODE_NUNITS.
27769 Apply to_constant to d->perm elements.
27770 (aarch64_simd_valid_immediate, aarch64_vec_fpconst_pow_of_2): Handle
27771 polynomial CONST_VECTOR_NUNITS.
27772 (aarch64_move_pointer): Take amount as a poly_int64 rather
27774 (aarch64_progress_pointer): Avoid temporary variable.
27775 * config/aarch64/aarch64.md (aarch64_<crc_variant>): Use
27776 the mode attribute instead of GET_MODE.
27778 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
27779 Alan Hayward <alan.hayward@arm.com>
27780 David Sherwood <david.sherwood@arm.com>
27782 * config/aarch64/aarch64.c (aarch64_force_temporary): Assert that
27783 x exists before using it.
27784 (aarch64_add_constant_internal): Rename to...
27785 (aarch64_add_offset_1): ...this. Replace regnum with separate
27786 src and dest rtxes. Handle the case in which they're different,
27787 including when the offset is zero. Replace scratchreg with an rtx.
27788 Use 2 additions if there is no spare register into which we can
27789 move a 16-bit constant.
27790 (aarch64_add_constant): Delete.
27791 (aarch64_add_offset): Replace reg with separate src and dest
27792 rtxes. Take a poly_int64 offset instead of a HOST_WIDE_INT.
27793 Use aarch64_add_offset_1.
27794 (aarch64_add_sp, aarch64_sub_sp): Take the scratch register as
27795 an rtx rather than an int. Take the delta as a poly_int64
27796 rather than a HOST_WIDE_INT. Use aarch64_add_offset.
27797 (aarch64_expand_mov_immediate): Update uses of aarch64_add_offset.
27798 (aarch64_expand_prologue): Update calls to aarch64_sub_sp,
27799 aarch64_allocate_and_probe_stack_space and aarch64_add_offset.
27800 (aarch64_expand_epilogue): Update calls to aarch64_add_offset
27801 and aarch64_add_sp.
27802 (aarch64_output_mi_thunk): Use aarch64_add_offset rather than
27803 aarch64_add_constant.
27805 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
27807 * config/aarch64/aarch64.c (aarch64_reinterpret_float_as_int):
27808 Use scalar_float_mode.
27810 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
27812 * config/aarch64/aarch64-simd.md
27813 (aarch64_fml<f16mac1>l<f16quad>_low<mode>): Avoid GET_MODE_NUNITS.
27814 (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Likewise.
27815 (aarch64_fml<f16mac1>l_lane_lowv2sf): Likewise.
27816 (aarch64_fml<f16mac1>l_lane_highv2sf): Likewise.
27817 (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Likewise.
27818 (aarch64_fml<f16mac1>lq_laneq_highv4sf): Likewise.
27819 (aarch64_fml<f16mac1>l_laneq_lowv2sf): Likewise.
27820 (aarch64_fml<f16mac1>l_laneq_highv2sf): Likewise.
27821 (aarch64_fml<f16mac1>lq_lane_lowv4sf): Likewise.
27822 (aarch64_fml<f16mac1>lq_lane_highv4sf): Likewise.
27824 2018-01-11 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
27827 * config/arm/arm.c (arm_declare_function_name): Set arch_to_print if
27828 targ_options->x_arm_arch_string is non NULL.
27830 2018-01-11 Tamar Christina <tamar.christina@arm.com>
27832 * config/aarch64/aarch64.h
27833 (AARCH64_FL_FOR_ARCH8_4): Add AARCH64_FL_DOTPROD.
27835 2018-01-11 Sudakshina Das <sudi.das@arm.com>
27838 * expmed.c (emit_store_flag_force): Swap if const op0
27839 and change VOIDmode to mode of op0.
27841 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
27843 PR rtl-optimization/83761
27844 * caller-save.c (replace_reg_with_saved_mem): Pass bits rather
27845 than bytes to mode_for_size.
27847 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
27849 PR middle-end/83189
27850 * gfortran.fortran-torture/compile/pr83189.f90: New testcase.
27851 * tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): Handle zero
27854 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
27856 PR middle-end/83575
27857 * cfgrtl.c (rtl_verify_edges): Only verify fixability of partition
27858 when in layout mode.
27859 (cfg_layout_finalize): Do not verify cfg before we are out of layout.
27860 * cfgcleanup.c (try_optimize_cfg): Only verify flow info when doing
27863 2018-01-10 Michael Collison <michael.collison@arm.com>
27865 * config/aarch64/aarch64-modes.def (V2HF): New VECTOR_MODE.
27866 * config/aarch64/aarch64-option-extension.def: Add
27867 AARCH64_OPT_EXTENSION of 'fp16fml'.
27868 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
27869 (__ARM_FEATURE_FP16_FML): Define if TARGET_F16FML is true.
27870 * config/aarch64/predicates.md (aarch64_lane_imm3): New predicate.
27871 * config/aarch64/constraints.md (Ui7): New constraint.
27872 * config/aarch64/iterators.md (VFMLA_W): New mode iterator.
27873 (VFMLA_SEL_W): Ditto.
27876 (VFMLA16_LOW): New int iterator.
27877 (VFMLA16_HIGH): Ditto.
27878 (UNSPEC_FMLAL): New unspec.
27879 (UNSPEC_FMLSL): Ditto.
27880 (UNSPEC_FMLAL2): Ditto.
27881 (UNSPEC_FMLSL2): Ditto.
27882 (f16mac): New code attribute.
27883 * config/aarch64/aarch64-simd-builtins.def
27884 (aarch64_fmlal_lowv2sf): Ditto.
27885 (aarch64_fmlsl_lowv2sf): Ditto.
27886 (aarch64_fmlalq_lowv4sf): Ditto.
27887 (aarch64_fmlslq_lowv4sf): Ditto.
27888 (aarch64_fmlal_highv2sf): Ditto.
27889 (aarch64_fmlsl_highv2sf): Ditto.
27890 (aarch64_fmlalq_highv4sf): Ditto.
27891 (aarch64_fmlslq_highv4sf): Ditto.
27892 (aarch64_fmlal_lane_lowv2sf): Ditto.
27893 (aarch64_fmlsl_lane_lowv2sf): Ditto.
27894 (aarch64_fmlal_laneq_lowv2sf): Ditto.
27895 (aarch64_fmlsl_laneq_lowv2sf): Ditto.
27896 (aarch64_fmlalq_lane_lowv4sf): Ditto.
27897 (aarch64_fmlsl_lane_lowv4sf): Ditto.
27898 (aarch64_fmlalq_laneq_lowv4sf): Ditto.
27899 (aarch64_fmlsl_laneq_lowv4sf): Ditto.
27900 (aarch64_fmlal_lane_highv2sf): Ditto.
27901 (aarch64_fmlsl_lane_highv2sf): Ditto.
27902 (aarch64_fmlal_laneq_highv2sf): Ditto.
27903 (aarch64_fmlsl_laneq_highv2sf): Ditto.
27904 (aarch64_fmlalq_lane_highv4sf): Ditto.
27905 (aarch64_fmlsl_lane_highv4sf): Ditto.
27906 (aarch64_fmlalq_laneq_highv4sf): Ditto.
27907 (aarch64_fmlsl_laneq_highv4sf): Ditto.
27908 * config/aarch64/aarch64-simd.md:
27909 (aarch64_fml<f16mac1>l<f16quad>_low<mode>): New pattern.
27910 (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
27911 (aarch64_simd_fml<f16mac1>l<f16quad>_low<mode>): Ditto.
27912 (aarch64_simd_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
27913 (aarch64_fml<f16mac1>l_lane_lowv2sf): Ditto.
27914 (aarch64_fml<f16mac1>l_lane_highv2sf): Ditto.
27915 (aarch64_simd_fml<f16mac>l_lane_lowv2sf): Ditto.
27916 (aarch64_simd_fml<f16mac>l_lane_highv2sf): Ditto.
27917 (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Ditto.
27918 (aarch64_fml<f16mac1>lq_laneq_highv4sf): Ditto.
27919 (aarch64_simd_fml<f16mac>lq_laneq_lowv4sf): Ditto.
27920 (aarch64_simd_fml<f16mac>lq_laneq_highv4sf): Ditto.
27921 (aarch64_fml<f16mac1>l_laneq_lowv2sf): Ditto.
27922 (aarch64_fml<f16mac1>l_laneq_highv2sf): Ditto.
27923 (aarch64_simd_fml<f16mac>l_laneq_lowv2sf): Ditto.
27924 (aarch64_simd_fml<f16mac>l_laneq_highv2sf): Ditto.
27925 (aarch64_fml<f16mac1>lq_lane_lowv4sf): Ditto.
27926 (aarch64_fml<f16mac1>lq_lane_highv4sf): Ditto.
27927 (aarch64_simd_fml<f16mac>lq_lane_lowv4sf): Ditto.
27928 (aarch64_simd_fml<f16mac>lq_lane_highv4sf): Ditto.
27929 * config/aarch64/arm_neon.h (vfmlal_low_u32): New intrinsic.
27930 (vfmlsl_low_u32): Ditto.
27931 (vfmlalq_low_u32): Ditto.
27932 (vfmlslq_low_u32): Ditto.
27933 (vfmlal_high_u32): Ditto.
27934 (vfmlsl_high_u32): Ditto.
27935 (vfmlalq_high_u32): Ditto.
27936 (vfmlslq_high_u32): Ditto.
27937 (vfmlal_lane_low_u32): Ditto.
27938 (vfmlsl_lane_low_u32): Ditto.
27939 (vfmlal_laneq_low_u32): Ditto.
27940 (vfmlsl_laneq_low_u32): Ditto.
27941 (vfmlalq_lane_low_u32): Ditto.
27942 (vfmlslq_lane_low_u32): Ditto.
27943 (vfmlalq_laneq_low_u32): Ditto.
27944 (vfmlslq_laneq_low_u32): Ditto.
27945 (vfmlal_lane_high_u32): Ditto.
27946 (vfmlsl_lane_high_u32): Ditto.
27947 (vfmlal_laneq_high_u32): Ditto.
27948 (vfmlsl_laneq_high_u32): Ditto.
27949 (vfmlalq_lane_high_u32): Ditto.
27950 (vfmlslq_lane_high_u32): Ditto.
27951 (vfmlalq_laneq_high_u32): Ditto.
27952 (vfmlslq_laneq_high_u32): Ditto.
27953 * config/aarch64/aarch64.h (AARCH64_FL_F16SML): New flag.
27954 (AARCH64_FL_FOR_ARCH8_4): New.
27955 (AARCH64_ISA_F16FML): New ISA flag.
27956 (TARGET_F16FML): New feature flag for fp16fml.
27957 (doc/invoke.texi): Document new fp16fml option.
27959 2018-01-10 Michael Collison <michael.collison@arm.com>
27961 * config/aarch64/aarch64-builtins.c:
27962 (aarch64_types_ternopu_imm_qualifiers, TYPES_TERNOPUI): New.
27963 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
27964 (__ARM_FEATURE_SHA3): Define if TARGET_SHA3 is true.
27965 * config/aarch64/aarch64.h (AARCH64_FL_SHA3): New flags.
27966 (AARCH64_ISA_SHA3): New ISA flag.
27967 (TARGET_SHA3): New feature flag for sha3.
27968 * config/aarch64/iterators.md (sha512_op): New int attribute.
27969 (CRYPTO_SHA512): New int iterator.
27970 (UNSPEC_SHA512H): New unspec.
27971 (UNSPEC_SHA512H2): Ditto.
27972 (UNSPEC_SHA512SU0): Ditto.
27973 (UNSPEC_SHA512SU1): Ditto.
27974 * config/aarch64/aarch64-simd-builtins.def
27975 (aarch64_crypto_sha512hqv2di): New builtin.
27976 (aarch64_crypto_sha512h2qv2di): Ditto.
27977 (aarch64_crypto_sha512su0qv2di): Ditto.
27978 (aarch64_crypto_sha512su1qv2di): Ditto.
27979 (aarch64_eor3qv8hi): Ditto.
27980 (aarch64_rax1qv2di): Ditto.
27981 (aarch64_xarqv2di): Ditto.
27982 (aarch64_bcaxqv8hi): Ditto.
27983 * config/aarch64/aarch64-simd.md:
27984 (aarch64_crypto_sha512h<sha512_op>qv2di): New pattern.
27985 (aarch64_crypto_sha512su0qv2di): Ditto.
27986 (aarch64_crypto_sha512su1qv2di): Ditto.
27987 (aarch64_eor3qv8hi): Ditto.
27988 (aarch64_rax1qv2di): Ditto.
27989 (aarch64_xarqv2di): Ditto.
27990 (aarch64_bcaxqv8hi): Ditto.
27991 * config/aarch64/arm_neon.h (vsha512hq_u64): New intrinsic.
27992 (vsha512h2q_u64): Ditto.
27993 (vsha512su0q_u64): Ditto.
27994 (vsha512su1q_u64): Ditto.
27995 (veor3q_u16): Ditto.
27996 (vrax1q_u64): Ditto.
27997 (vxarq_u64): Ditto.
27998 (vbcaxq_u16): Ditto.
27999 * config/arm/types.md (crypto_sha512): New type attribute.
28000 (crypto_sha3): Ditto.
28001 (doc/invoke.texi): Document new sha3 option.
28003 2018-01-10 Michael Collison <michael.collison@arm.com>
28005 * config/aarch64/aarch64-builtins.c:
28006 (aarch64_types_quadopu_imm_qualifiers, TYPES_QUADOPUI): New.
28007 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
28008 (__ARM_FEATURE_SM3): Define if TARGET_SM4 is true.
28009 (__ARM_FEATURE_SM4): Define if TARGET_SM4 is true.
28010 * config/aarch64/aarch64.h (AARCH64_FL_SM4): New flags.
28011 (AARCH64_ISA_SM4): New ISA flag.
28012 (TARGET_SM4): New feature flag for sm4.
28013 * config/aarch64/aarch64-simd-builtins.def
28014 (aarch64_sm3ss1qv4si): Ditto.
28015 (aarch64_sm3tt1aq4si): Ditto.
28016 (aarch64_sm3tt1bq4si): Ditto.
28017 (aarch64_sm3tt2aq4si): Ditto.
28018 (aarch64_sm3tt2bq4si): Ditto.
28019 (aarch64_sm3partw1qv4si): Ditto.
28020 (aarch64_sm3partw2qv4si): Ditto.
28021 (aarch64_sm4eqv4si): Ditto.
28022 (aarch64_sm4ekeyqv4si): Ditto.
28023 * config/aarch64/aarch64-simd.md:
28024 (aarch64_sm3ss1qv4si): Ditto.
28025 (aarch64_sm3tt<sm3tt_op>qv4si): Ditto.
28026 (aarch64_sm3partw<sm3part_op>qv4si): Ditto.
28027 (aarch64_sm4eqv4si): Ditto.
28028 (aarch64_sm4ekeyqv4si): Ditto.
28029 * config/aarch64/iterators.md (sm3tt_op): New int iterator.
28030 (sm3part_op): Ditto.
28031 (CRYPTO_SM3TT): Ditto.
28032 (CRYPTO_SM3PART): Ditto.
28033 (UNSPEC_SM3SS1): New unspec.
28034 (UNSPEC_SM3TT1A): Ditto.
28035 (UNSPEC_SM3TT1B): Ditto.
28036 (UNSPEC_SM3TT2A): Ditto.
28037 (UNSPEC_SM3TT2B): Ditto.
28038 (UNSPEC_SM3PARTW1): Ditto.
28039 (UNSPEC_SM3PARTW2): Ditto.
28040 (UNSPEC_SM4E): Ditto.
28041 (UNSPEC_SM4EKEY): Ditto.
28042 * config/aarch64/constraints.md (Ui2): New constraint.
28043 * config/aarch64/predicates.md (aarch64_imm2): New predicate.
28044 * config/arm/types.md (crypto_sm3): New type attribute.
28045 (crypto_sm4): Ditto.
28046 * config/aarch64/arm_neon.h (vsm3ss1q_u32): New intrinsic.
28047 (vsm3tt1aq_u32): Ditto.
28048 (vsm3tt1bq_u32): Ditto.
28049 (vsm3tt2aq_u32): Ditto.
28050 (vsm3tt2bq_u32): Ditto.
28051 (vsm3partw1q_u32): Ditto.
28052 (vsm3partw2q_u32): Ditto.
28053 (vsm4eq_u32): Ditto.
28054 (vsm4ekeyq_u32): Ditto.
28055 (doc/invoke.texi): Document new sm4 option.
28057 2018-01-10 Michael Collison <michael.collison@arm.com>
28059 * config/aarch64/aarch64-arches.def (armv8.4-a): New architecture.
28060 * config/aarch64/aarch64.h (AARCH64_ISA_V8_4): New ISA flag.
28061 (AARCH64_FL_FOR_ARCH8_4): New.
28062 (AARCH64_FL_V8_4): New flag.
28063 (doc/invoke.texi): Document new armv8.4-a option.
28065 2018-01-10 Michael Collison <michael.collison@arm.com>
28067 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
28068 (__ARM_FEATURE_AES): Define if TARGET_AES is true.
28069 (__ARM_FEATURE_SHA2): Define if TARGET_SHA2 is true.
28070 * config/aarch64/aarch64-option-extension.def: Add
28071 AARCH64_OPT_EXTENSION of 'sha2'.
28072 (aes): Add AARCH64_OPT_EXTENSION of 'aes'.
28073 (crypto): Disable sha2 and aes if crypto disabled.
28074 (crypto): Enable aes and sha2 if enabled.
28075 (simd): Disable sha2 and aes if simd disabled.
28076 * config/aarch64/aarch64.h (AARCH64_FL_AES, AARCH64_FL_SHA2):
28078 (AARCH64_ISA_AES, AARCH64_ISA_SHA2): New ISA flags.
28079 (TARGET_SHA2): New feature flag for sha2.
28080 (TARGET_AES): New feature flag for aes.
28081 * config/aarch64/aarch64-simd.md:
28082 (aarch64_crypto_aes<aes_op>v16qi): Make pattern
28083 conditional on TARGET_AES.
28084 (aarch64_crypto_aes<aesmc_op>v16qi): Ditto.
28085 (aarch64_crypto_sha1hsi): Make pattern conditional
28087 (aarch64_crypto_sha1hv4si): Ditto.
28088 (aarch64_be_crypto_sha1hv4si): Ditto.
28089 (aarch64_crypto_sha1su1v4si): Ditto.
28090 (aarch64_crypto_sha1<sha1_op>v4si): Ditto.
28091 (aarch64_crypto_sha1su0v4si): Ditto.
28092 (aarch64_crypto_sha256h<sha256_op>v4si): Ditto.
28093 (aarch64_crypto_sha256su0v4si): Ditto.
28094 (aarch64_crypto_sha256su1v4si): Ditto.
28095 (doc/invoke.texi): Document new aes and sha2 options.
28097 2018-01-10 Martin Sebor <msebor@redhat.com>
28099 PR tree-optimization/83781
28100 * gimple-fold.c (get_range_strlen): Avoid treating arrays of pointers
28103 2018-01-11 Martin Sebor <msebor@gmail.com>
28104 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
28106 PR tree-optimization/83501
28107 PR tree-optimization/81703
28109 * tree-ssa-strlen.c (get_string_cst): Rename...
28110 (get_string_len): ...to this. Handle global constants.
28111 (handle_char_store): Adjust.
28113 2018-01-10 Kito Cheng <kito.cheng@gmail.com>
28114 Jim Wilson <jimw@sifive.com>
28116 * config/riscv/riscv-protos.h (riscv_output_return): New.
28117 * config/riscv/riscv.c (struct machine_function): New naked_p field.
28118 (riscv_attribute_table, riscv_output_return),
28119 (riscv_handle_fndecl_attribute, riscv_naked_function_p),
28120 (riscv_allocate_stack_slots_for_args, riscv_warn_func_return): New.
28121 (riscv_compute_frame_info): Only compute frame->mask if not a naked
28123 (riscv_expand_prologue): Add early return for naked function.
28124 (riscv_expand_epilogue): Likewise.
28125 (riscv_function_ok_for_sibcall): Return false for naked function.
28126 (riscv_set_current_function): New.
28127 (TARGET_SET_CURRENT_FUNCTION, TARGET_ALLOCATE_STACK_SLOTS_FOR_ARGS),
28128 (TARGET_ATTRIBUTE_TABLE, TARGET_WARN_FUNC_RETURN): New.
28129 * config/riscv/riscv.md (simple_return): Call riscv_output_return.
28130 * doc/extend.texi (RISC-V Function Attributes): New.
28132 2018-01-10 Michael Meissner <meissner@linux.vnet.ibm.com>
28134 * config/rs6000/rs6000.c (is_complex_IBM_long_double): Explicitly
28135 check for 128-bit long double before checking TCmode.
28136 * config/rs6000/rs6000.h (FLOAT128_IEEE_P): Explicitly check for
28137 128-bit long doubles before checking TFmode or TCmode.
28138 (FLOAT128_IBM_P): Likewise.
28140 2018-01-10 Martin Sebor <msebor@redhat.com>
28142 PR tree-optimization/83671
28143 * builtins.c (c_strlen): Unconditionally return zero for the empty
28145 Use -Warray-bounds for warnings.
28146 * gimple-fold.c (get_range_strlen): Handle non-constant lengths
28147 for non-constant array indices with COMPONENT_REF, arrays of
28148 arrays, and pointers to arrays.
28149 (gimple_fold_builtin_strlen): Determine and set length range for
28150 non-constant character arrays.
28152 2018-01-10 Aldy Hernandez <aldyh@redhat.com>
28154 PR middle-end/81897
28155 * tree-ssa-uninit.c (convert_control_dep_chain_into_preds): Skip
28158 2018-01-10 Eric Botcazou <ebotcazou@adacore.com>
28160 * dwarf2out.c (dwarf2out_var_location): Do not pass NULL to fprintf.
28162 2018-01-10 Peter Bergner <bergner@vnet.ibm.com>
28165 * config/rs6000/rs6000.c (print_operand) <'y'>: Use
28166 VECTOR_MEM_ALTIVEC_OR_VSX_P.
28167 * config/rs6000/vsx.md (*vsx_le_perm_load_<mode> for VSX_D): Use
28168 indexed_or_indirect_operand predicate.
28169 (*vsx_le_perm_load_<mode> for VSX_W): Likewise.
28170 (*vsx_le_perm_load_v8hi): Likewise.
28171 (*vsx_le_perm_load_v16qi): Likewise.
28172 (*vsx_le_perm_store_<mode> for VSX_D): Likewise.
28173 (*vsx_le_perm_store_<mode> for VSX_W): Likewise.
28174 (*vsx_le_perm_store_v8hi): Likewise.
28175 (*vsx_le_perm_store_v16qi): Likewise.
28176 (eight unnamed splitters): Likewise.
28178 2018-01-10 Peter Bergner <bergner@vnet.ibm.com>
28180 * config/rs6000/x86intrin.h: Change #warning to #error. Update message.
28181 * config/rs6000/emmintrin.h: Likewise.
28182 * config/rs6000/mmintrin.h: Likewise.
28183 * config/rs6000/xmmintrin.h: Likewise.
28185 2018-01-10 David Malcolm <dmalcolm@redhat.com>
28188 * tree-core.h: Document EXPR_LOCATION_WRAPPER_P's usage of
28190 * tree.c (tree_nop_conversion): Return true for location wrapper
28192 (maybe_wrap_with_location): New function.
28193 (selftest::check_strip_nops): New function.
28194 (selftest::test_location_wrappers): New function.
28195 (selftest::tree_c_tests): Call it.
28196 * tree.h (STRIP_ANY_LOCATION_WRAPPER): New macro.
28197 (maybe_wrap_with_location): New decl.
28198 (EXPR_LOCATION_WRAPPER_P): New macro.
28199 (location_wrapper_p): New inline function.
28200 (tree_strip_any_location_wrapper): New inline function.
28202 2018-01-10 H.J. Lu <hongjiu.lu@intel.com>
28205 * config/i386/i386.c (ix86_compute_frame_layout): Always adjust
28206 stack_realign_offset for the largest alignment of stack slot
28208 (ix86_find_max_used_stack_alignment): New function.
28209 (ix86_finalize_stack_frame_flags): Use it. Set
28210 max_used_stack_alignment if we don't realign stack.
28211 * config/i386/i386.h (machine_function): Add
28212 max_used_stack_alignment.
28214 2018-01-10 Christophe Lyon <christophe.lyon@linaro.org>
28216 * config/arm/arm.opt (-mbranch-cost): New option.
28217 * config/arm/arm.h (BRANCH_COST): Take arm_branch_cost into
28220 2018-01-10 Segher Boessenkool <segher@kernel.crashing.org>
28223 * config/rs6000/rs6000.md (load_toc_v4_PIC_2, load_toc_v4_PIC_3b,
28224 load_toc_v4_PIC_3c): Wrap const term in CONST RTL.
28226 2018-01-10 Richard Biener <rguenther@suse.de>
28229 * dwarf2out.c (gen_subprogram_die): Hoist old_die && declaration
28230 early out so it also covers the case where we have a non-NULL
28233 2018-01-10 Richard Sandiford <richard.sandiford@linaro.org>
28235 PR tree-optimization/83753
28236 * tree-vect-stmts.c (get_group_load_store_type): Use VMAT_CONTIGUOUS
28237 for non-strided grouped accesses if the number of elements is 1.
28239 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
28242 * i386.c (ix86_vectorize_builtin_gather): Check TARGET_USE_GATHER.
28243 * i386.h (TARGET_USE_GATHER): Define.
28244 * x86-tune.def (X86_TUNE_USE_GATHER): New.
28246 2018-01-10 Martin Liska <mliska@suse.cz>
28249 * basic-block.h (CLEANUP_NO_PARTITIONING): New define.
28250 * bb-reorder.c (pass_reorder_blocks::execute): Do not clean up
28252 * cfgcleanup.c (try_optimize_cfg): Fix up partitioning if
28253 CLEANUP_NO_PARTITIONING is not set.
28255 2018-01-10 Richard Sandiford <richard.sandiford@linaro.org>
28257 * doc/rtl.texi: Remove documentation of (const ...) wrappers
28258 for vectors, as a partial revert of r254296.
28259 * rtl.h (const_vec_p): Delete.
28260 (const_vec_duplicate_p): Don't test for vector CONSTs.
28261 (unwrap_const_vec_duplicate, const_vec_series_p): Likewise.
28262 * expmed.c (make_tree): Likewise.
28265 * common.md (E, F): Use CONSTANT_P instead of checking for
28267 * emit-rtl.c (gen_lowpart_common): Use const_vec_p instead of
28268 checking for CONST_VECTOR.
28270 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
28272 PR middle-end/83575
28273 * predict.c (force_edge_cold): Handle in more sane way edges
28274 with no prediction.
28276 2018-01-09 Carl Love <cel@us.ibm.com>
28278 * config/rs6002/altivec.md (p8_vmrgow): Add support for V2DI, V2DF,
28280 (p8_vmrgew): Add support for V2DI, V2DF, V4SF types.
28281 * config/rs6000/rs6000-builtin.def: Add definitions for FLOAT2_V2DF,
28282 VMRGEW_V2DI, VMRGEW_V2DF, VMRGEW_V4SF, VMRGOW_V4SI, VMRGOW_V4SF,
28283 VMRGOW_V2DI, VMRGOW_V2DF. Remove definition for VMRGOW.
28284 * config/rs6000/rs6000-c.c (VSX_BUILTIN_VEC_FLOAT2,
28285 P8V_BUILTIN_VEC_VMRGEW, P8V_BUILTIN_VEC_VMRGOW): Add definitions.
28286 * config/rs6000/rs6000-protos.h: Add extern defition for
28287 rs6000_generate_float2_double_code.
28288 * config/rs6000/rs6000.c (rs6000_generate_float2_double_code): Add
28290 * config/rs6000/vsx.md (vsx_xvcdpsp): Add define_insn.
28291 (float2_v2df): Add define_expand.
28293 2018-01-09 Uros Bizjak <ubizjak@gmail.com>
28296 * combine.c (force_int_to_mode) <case ASHIFT>: Use mode instead of
28297 op_mode in the force_to_mode call.
28299 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
28301 * config/aarch64/aarch64.c (aarch64_evpc_trn): Use d.perm.series_p
28302 instead of checking each element individually.
28303 (aarch64_evpc_uzp): Likewise.
28304 (aarch64_evpc_zip): Likewise.
28305 (aarch64_evpc_ext): Likewise.
28306 (aarch64_evpc_rev): Likewise.
28307 (aarch64_evpc_dup): Test the encoding for a single duplicated element,
28308 instead of checking each element individually. Return true without
28310 (aarch64_vectorize_vec_perm_const): Use all_from_input_p to test
28311 whether all selected elements come from the same input, instead of
28312 checking each element individually. Remove calls to gen_rtx_REG,
28313 start_sequence and end_sequence and instead assert that no rtl is
28316 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
28318 * config/aarch64/aarch64.c (aarch64_legitimate_constant_p): Fix
28319 order of HIGH and CONST checks.
28321 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
28323 * tree-vect-stmts.c (permute_vec_elements): Create a fresh variable
28324 if the destination isn't an SSA_NAME.
28326 2018-01-09 Richard Biener <rguenther@suse.de>
28328 PR tree-optimization/83668
28329 * graphite.c (canonicalize_loop_closed_ssa): Add edge argument,
28331 (canonicalize_loop_form): ... here, renamed from ...
28332 (canonicalize_loop_closed_ssa_form): ... this and amended to
28333 swap successor edges for loop exit blocks to make us use
28334 the RPO order we need for initial schedule generation.
28336 2018-01-09 Joseph Myers <joseph@codesourcery.com>
28338 PR tree-optimization/64811
28339 * match.pd: When optimizing comparisons with Inf, avoid
28340 introducing or losing exceptions from comparisons with NaN.
28342 2018-01-09 Martin Liska <mliska@suse.cz>
28345 * asan.c (shadow_mem_size): Add gcc_assert.
28347 2018-01-09 Georg-Johann Lay <avr@gjlay.de>
28349 Don't save registers in main().
28352 * doc/invoke.texi (AVR Options) [-mmain-is-OS_task]: Document it.
28353 * config/avr/avr.opt (-mmain-is-OS_task): New target option.
28354 * config/avr/avr.c (avr_set_current_function): Don't error if
28355 naked, OS_task or OS_main are specified at the same time.
28356 (avr_function_ok_for_sibcall): Don't disable sibcalls for OS_task,
28358 (avr_insert_attributes) [-mmain-is-OS_task] <main>: Add OS_task
28360 * common/config/avr/avr-common.c (avr_option_optimization_table):
28361 Switch on -mmain-is-OS_task for optimizing compilations.
28363 2018-01-09 Richard Biener <rguenther@suse.de>
28365 PR tree-optimization/83572
28366 * graphite.c: Include cfganal.h.
28367 (graphite_transform_loops): Connect infinite loops to exit
28368 and remove fake edges at the end.
28370 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
28372 * ipa-inline.c (edge_badness): Revert accidental checkin.
28374 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
28377 * ipa-comdats.c (set_comdat_group): Only set comdat group of real
28378 symbols; not inline clones.
28380 2018-01-09 Jakub Jelinek <jakub@redhat.com>
28383 * modulo-sched.c (schedule_reg_moves): Punt if we'd need to move
28384 hard registers. Formatting fixes.
28386 PR preprocessor/83722
28387 * gcc.c (try_generate_repro): Pass
28388 &temp_stderr_files[RETRY_ICE_ATTEMPTS - 1] rather than
28389 &temp_stdout_files[RETRY_ICE_ATTEMPTS - 1] as last argument to
28392 2018-01-08 Monk Chiang <sh.chiang04@gmail.com>
28393 Kito Cheng <kito.cheng@gmail.com>
28395 * config/riscv/riscv.c (machine_function::is_leaf): Remove field.
28396 (riscv_leaf_function_p): Delete.
28397 (riscv_function_ok_for_sibcall): Return false when TARGET_SAVE_RESTORE.
28399 2018-01-08 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
28401 * config/rs6000/rs6000-string.c (do_load_for_compare_from_addr): New
28403 (do_ifelse): New function.
28404 (do_isel): New function.
28405 (do_sub3): New function.
28406 (do_add3): New function.
28407 (do_load_mask_compare): New function.
28408 (do_overlap_load_compare): New function.
28409 (expand_compare_loop): New function.
28410 (expand_block_compare): Call expand_compare_loop() when appropriate.
28411 * config/rs6000/rs6000.opt (-mblock-compare-inline-limit): Change
28412 option description.
28413 (-mblock-compare-inline-loop-limit): New option.
28415 2018-01-08 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
28418 * config/rs6000/altivec.md (*altivec_vpermr_<mode>_internal):
28419 Reverse order of second and third operands in first alternative.
28420 * config/rs6000/rs6000.c (rs6000_expand_vector_set): Reverse order
28421 of first and second elements in UNSPEC_VPERMR vector.
28422 (altivec_expand_vec_perm_le): Likewise.
28424 2018-01-08 Jeff Law <law@redhat.com>
28426 PR rtl-optimizatin/81308
28427 * tree-switch-conversion.c (cfg_altered): New file scoped static.
28428 (process_switch): If group_case_labels makes a change, then set
28430 (pass_convert_switch::execute): If a switch is converted, then
28431 set cfg_altered. Return TODO_cfg_cleanup if cfg_altered is true.
28433 PR rtl-optimization/81308
28434 * recog.c (split_all_insns): Conditionally cleanup the CFG after
28437 2018-01-08 Vidya Praveen <vidyapraveen@arm.com>
28439 PR target/83663 - Revert r255946
28440 * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify code
28441 generation for cases where splatting a value is not useful.
28442 * simplify-rtx.c (simplify_ternary_operation): Simplify vec_merge
28443 across a vec_duplicate and a paradoxical subreg forming a vector
28444 mode to a vec_concat.
28446 2018-01-08 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
28448 * config/arm/t-aprofile (MULTILIB_MATCHES): Add mapping rules for
28449 -march=armv8.3-a variants.
28450 * config/arm/t-multilib: Likewise.
28451 * config/arm/t-arm-elf: Likewise. Handle dotprod extension.
28453 2018-01-08 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
28455 * config/rs6000/rs6000.md (cceq_ior_compare): Remove * so I can use it
28457 (cceq_ior_compare_complement): Give it a name so I can use it, and
28458 change boolean_or_operator predicate to boolean_operator so it can
28459 be used to generate a crand.
28460 (eqne): New code iterator.
28461 (bd/bd_neg): New code_attrs.
28462 (<bd>_<mode>): New name for ctr<mode>_internal[12] now combined into
28463 a single define_insn.
28464 (<bd>tf_<mode>): A new insn pattern for the conditional form branch
28465 decrement (bdnzt/bdnzf/bdzt/bdzf).
28466 * config/rs6000/rs6000.c (rs6000_legitimate_combined_insn): Updated
28467 with the new names of the branch decrement patterns, and added the
28468 names of the branch decrement conditional patterns.
28470 2018-01-08 Richard Biener <rguenther@suse.de>
28472 PR tree-optimization/83563
28473 * graphite.c (canonicalize_loop_closed_ssa_form): Reset the SCEV
28476 2018-01-08 Richard Biener <rguenther@suse.de>
28478 PR middle-end/83713
28479 * convert.c (do_narrow): Properly guard TYPE_OVERFLOW_WRAPS checks.
28481 2018-01-08 Richard Biener <rguenther@suse.de>
28483 PR tree-optimization/83685
28484 * tree-ssa-pre.c (create_expression_by_pieces): Do not insert
28485 references to abnormals.
28487 2018-01-08 Richard Biener <rguenther@suse.de>
28490 * dwarf2out.c (output_indirect_strings): Handle empty
28491 skeleton_debug_str_hash.
28492 (dwarf2out_early_finish): Index strings for -gsplit-dwarf.
28494 2018-01-08 Claudiu Zissulescu <claziss@synopsys.com>
28496 * config/arc/arc.c (TARGET_TRAMPOLINE_ADJUST_ADDRESS): Delete.
28497 (emit_store_direct): Likewise.
28498 (arc_trampoline_adjust_address): Likewise.
28499 (arc_asm_trampoline_template): New function.
28500 (arc_initialize_trampoline): Use asm_trampoline_template.
28501 (TARGET_ASM_TRAMPOLINE_TEMPLATE): Define.
28502 * config/arc/arc.h (TRAMPOLINE_SIZE): Adjust to 16.
28503 * config/arc/arc.md (flush_icache): Delete pattern.
28505 2018-01-08 Claudiu Zissulescu <claziss@synopsys.com>
28507 * config/arc/arc-c.def (__ARC_UNALIGNED__): New define.
28508 * config/arc/arc.h (STRICT_ALIGNMENT): Control this macro using
28511 2018-01-08 Sebastian Huber <sebastian.huber@embedded-brains.de>
28514 * config/epiphany/epiphany.h (make_pass_mode_switch_use): Guard
28515 by not USED_FOR_TARGET.
28516 (make_pass_resolve_sw_modes): Likewise.
28518 2018-01-08 Sebastian Huber <sebastian.huber@embedded-brains.de>
28520 * config/nios2/nios2.h (nios2_section_threshold): Guard by not
28523 2018-01-08 Richard Biener <rguenther@suse.de>
28525 PR middle-end/83580
28526 * tree-data-ref.c (split_constant_offset): Remove STRIP_NOPS.
28528 2018-01-08 Richard Biener <rguenther@suse.de>
28530 PR middle-end/83517
28531 * match.pd ((t * 2) / 2) -> t): Add missing :c.
28533 2018-01-06 Aldy Hernandez <aldyh@redhat.com>
28535 PR middle-end/81897
28536 * tree-ssa-uninit.c (compute_control_dep_chain): Do not bail on
28537 basic blocks with a small number of successors.
28538 (convert_control_dep_chain_into_preds): Improve handling of
28540 (dump_predicates): Split apart into...
28541 (dump_pred_chain): ...here...
28542 (dump_pred_info): ...and here.
28543 (can_one_predicate_be_invalidated_p): Add debugging printfs.
28544 (can_chain_union_be_invalidated_p): Improve check for invalidation
28546 (uninit_uses_cannot_happen): Avoid unnecessary if
28547 convert_control_dep_chain_into_preds yielded nothing.
28549 2018-01-06 Martin Sebor <msebor@redhat.com>
28551 PR tree-optimization/83640
28552 * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Avoid
28553 subtracting negative offset from size.
28554 (builtin_access::overlap): Adjust offset bounds of the access to fall
28555 within the size of the object if possible.
28557 2018-01-06 Richard Sandiford <richard.sandiford@linaro.org>
28559 PR rtl-optimization/83699
28560 * expmed.c (extract_bit_field_1): Restrict the vector usage of
28561 extract_bit_field_as_subreg to cases in which the extracted
28562 value is also a vector.
28564 * lra-constraints.c (process_alt_operands): Test for the equivalence
28565 substitutions when detecting a possible reload cycle.
28567 2018-01-06 Jakub Jelinek <jakub@redhat.com>
28570 * toplev.c (process_options): Don't enable debug_nonbind_markers_p
28571 by default if flag_selective_schedling{,2}. Formatting fixes.
28573 PR rtl-optimization/83682
28574 * rtl.h (const_vec_duplicate_p): Only return true for VEC_DUPLICATE
28575 if it has non-VECTOR_MODE element mode.
28576 (vec_duplicate_p): Likewise.
28578 PR middle-end/83694
28579 * cfgexpand.c (expand_debug_expr): Punt if mode1 is VOIDmode
28580 and bitsize might be greater than MAX_BITSIZE_MODE_ANY_INT.
28582 2018-01-05 Jakub Jelinek <jakub@redhat.com>
28585 * config/i386/i386-builtin.def
28586 (__builtin_ia32_vgf2p8affineinvqb_v64qi,
28587 __builtin_ia32_vgf2p8affineqb_v64qi, __builtin_ia32_vgf2p8mulb_v64qi):
28588 Require also OPTION_MASK_ISA_AVX512F in addition to
28589 OPTION_MASK_ISA_GFNI.
28590 (__builtin_ia32_vgf2p8affineinvqb_v16qi_mask,
28591 __builtin_ia32_vgf2p8affineqb_v16qi_mask): Require
28592 OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_SSE in addition
28593 to OPTION_MASK_ISA_GFNI.
28594 (__builtin_ia32_vgf2p8mulb_v32qi_mask): Require
28595 OPTION_MASK_ISA_AVX512VL in addition to OPTION_MASK_ISA_GFNI and
28596 OPTION_MASK_ISA_AVX512BW.
28597 (__builtin_ia32_vgf2p8mulb_v16qi_mask): Require
28598 OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_AVX512BW in
28599 addition to OPTION_MASK_ISA_GFNI.
28600 (__builtin_ia32_vgf2p8affineinvqb_v16qi,
28601 __builtin_ia32_vgf2p8affineqb_v16qi, __builtin_ia32_vgf2p8mulb_v16qi):
28602 Require OPTION_MASK_ISA_SSE2 instead of OPTION_MASK_ISA_SSE in addition
28603 to OPTION_MASK_ISA_GFNI.
28604 * config/i386/i386.c (def_builtin): Change to builtin isa/isa2 being
28605 a requirement for all ISAs rather than any of them with a few
28607 (ix86_add_new_builtins): Clear OPTION_MASK_ISA_64BIT from isa before
28609 (ix86_expand_builtin): Require all ISAs from builtin's isa and isa2
28610 bitmasks to be enabled with 3 exceptions, instead of requiring any
28611 enabled ISA with lots of exceptions.
28612 * config/i386/sse.md (vgf2p8affineinvqb_<mode><mask_name>,
28613 vgf2p8affineqb_<mode><mask_name>, vgf2p8mulb_<mode><mask_name>):
28614 Change avx512bw in isa attribute to avx512f.
28615 * config/i386/sgxintrin.h: Add license boilerplate.
28616 * config/i386/vaesintrin.h: Likewise. Fix macro spelling __AVX512F
28617 to __AVX512F__ and __AVX512VL to __AVX512VL__.
28618 (_mm256_aesdec_epi128, _mm256_aesdeclast_epi128, _mm256_aesenc_epi128,
28619 _mm256_aesenclast_epi128): Enable temporarily avx if __AVX__ is not
28621 * config/i386/gfniintrin.h (_mm_gf2p8mul_epi8,
28622 _mm_gf2p8affineinv_epi64_epi8, _mm_gf2p8affine_epi64_epi8): Enable
28623 temporarily sse2 rather than sse if not enabled already.
28626 * config/i386/sse.md (VI248_VLBW): Rename to ...
28627 (VI248_AVX512VL): ... this. Don't guard V32HI with TARGET_AVX512BW.
28628 (vpshrd_<mode><mask_name>, vpshld_<mode><mask_name>,
28629 vpshrdv_<mode>, vpshrdv_<mode>_mask, vpshrdv_<mode>_maskz,
28630 vpshrdv_<mode>_maskz_1, vpshldv_<mode>, vpshldv_<mode>_mask,
28631 vpshldv_<mode>_maskz, vpshldv_<mode>_maskz_1): Use VI248_AVX512VL
28632 mode iterator instead of VI248_VLBW.
28634 2018-01-05 Jan Hubicka <hubicka@ucw.cz>
28636 * ipa-fnsummary.c (record_modified_bb_info): Add OP.
28637 (record_modified): Skip clobbers; add debug output.
28638 (param_change_prob): Use sreal frequencies.
28640 2018-01-05 Richard Sandiford <richard.sandiford@linaro.org>
28642 * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Don't
28643 punt for user-aligned variables.
28645 2018-01-05 Richard Sandiford <richard.sandiford@linaro.org>
28647 * tree-chrec.c (chrec_contains_symbols): Return true for
28650 2018-01-05 Sudakshina Das <sudi.das@arm.com>
28653 * simplify-rtx.c (simplify_relational_operation_1): Add simplifications
28654 of (x|y) == x for BICS pattern.
28656 2018-01-05 Jakub Jelinek <jakub@redhat.com>
28658 PR tree-optimization/83605
28659 * gimple-ssa-strength-reduction.c: Include tree-eh.h.
28660 (find_candidates_dom_walker::before_dom_children): Ignore stmts that
28663 2018-01-05 Sebastian Huber <sebastian.huber@embedded-brains.de>
28665 * config.gcc (epiphany-*-elf*): Add (epiphany-*-rtems*) configuration.
28666 * config/epiphany/rtems.h: New file.
28668 2018-01-04 Jakub Jelinek <jakub@redhat.com>
28669 Uros Bizjak <ubizjak@gmail.com>
28672 * config/i386/i386.md (*<rotate_insn>hi3_1 splitter): Use
28673 QIreg_operand instead of register_operand predicate.
28674 * config/i386/i386.c (ix86_rop_should_change_byte_p,
28675 set_rop_modrm_reg_bits, ix86_mitigate_rop): Use -mmitigate-rop in
28676 comments instead of -fmitigate[-_]rop.
28678 2018-01-04 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
28681 * cgraphunit.c (symbol_table::compile): Switch to text_section
28682 before calling assembly_start debug hook.
28683 * run-rtl-passes.c (run_rtl_passes): Likewise.
28686 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
28688 * tree-vrp.c (extract_range_from_binary_expr_1): Check
28689 range_int_cst_p rather than !symbolic_range_p before calling
28690 extract_range_from_multiplicative_op_1.
28692 2018-01-04 Jeff Law <law@redhat.com>
28694 * tree-ssa-math-opts.c (execute_cse_reciprocals_1): Remove
28695 redundant test in assertion.
28697 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
28699 * doc/rtl.texi: Document machine_mode wrapper classes.
28701 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
28703 * fold-const.c (fold_ternary_loc): Check tree_fits_uhwi_p before
28704 using tree_to_uhwi.
28706 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
28708 * tree-ssa-forwprop.c (is_combined_permutation_identity): Allow
28709 the VEC_PERM_EXPR fold to fail.
28711 2018-01-04 Jakub Jelinek <jakub@redhat.com>
28714 * bb-reorder.c (insert_section_boundary_note): Set has_bb_partition
28715 to switched_sections.
28717 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
28720 * config/arm/arm.c (arm_vectorize_vec_perm_const): Fix inverted
28721 test for d.testing.
28723 2018-01-04 Peter Bergner <bergner@vnet.ibm.com>
28726 * config/rs6000/rs6000.c (rs6000_discover_homogeneous_aggregate): Do not
28727 allow arguments in FP registers if TARGET_HARD_FLOAT is false.
28729 2018-01-04 Jakub Jelinek <jakub@redhat.com>
28732 * cfgexpand.c (expand_debug_expr) <case BIT_FIELD_REF>: Punt if mode
28733 is BLKmode and bitpos not zero or mode change is needed.
28735 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
28738 * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): Require
28741 2018-01-04 Uros Bizjak <ubizjak@gmail.com>
28744 * config/alpha/alpha.md (*sadd<modesuffix>): Use ASHIFT
28745 instead of MULT rtx. Update all corresponding splitters.
28746 (*saddl_se): Ditto.
28747 (*ssub<modesuffix>): Ditto.
28748 (*ssubl_se): Ditto.
28749 (*cmp_sadd_di): Update split patterns.
28750 (*cmp_sadd_si): Ditto.
28751 (*cmp_sadd_sidi): Ditto.
28752 (*cmp_ssub_di): Ditto.
28753 (*cmp_ssub_si): Ditto.
28754 (*cmp_ssub_sidi): Ditto.
28755 * config/alpha/predicates.md (const23_operand): New predicate.
28756 * config/alpha/alpha.c (alpha_rtx_costs) [PLUS, MINUS]:
28757 Look for ASHIFT, not MULT inner operand.
28758 (alpha_split_conditional_move): Update for *sadd<modesuffix> change.
28760 2018-01-04 Martin Liska <mliska@suse.cz>
28762 PR gcov-profile/83669
28763 * gcov.c (output_intermediate_file): Add version to intermediate
28765 * doc/gcov.texi: Document new field 'version' in intermediate
28766 file format. Fix location of '-k' option of gcov command.
28768 2018-01-04 Martin Liska <mliska@suse.cz>
28771 * ipa-icf.c (sem_function::merge): Do not cross comdat boundary.
28773 2018-01-04 Jakub Jelinek <jakub@redhat.com>
28775 * gimple-ssa-sprintf.c (parse_directive): Cast second dir.len to uhwi.
28777 2018-01-03 Martin Sebor <msebor@redhat.com>
28779 PR tree-optimization/83655
28780 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call): Avoid
28781 checking calls with invalid arguments.
28783 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28785 * tree-vect-stmts.c (vect_get_store_rhs): New function.
28786 (vectorizable_mask_load_store): Delete.
28787 (vectorizable_call): Return false for masked loads and stores.
28788 (vectorizable_store): Handle IFN_MASK_STORE. Use vect_get_store_rhs
28789 instead of gimple_assign_rhs1.
28790 (vectorizable_load): Handle IFN_MASK_LOAD.
28791 (vect_transform_stmt): Don't set is_store for call_vec_info_type.
28793 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28795 * tree-vect-stmts.c (vect_build_gather_load_calls): New function,
28797 (vectorizable_mask_load_store): ...here.
28798 (vectorizable_load): ...and here.
28800 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28802 * tree-vect-stmts.c (vect_build_all_ones_mask)
28803 (vect_build_zero_merge_argument): New functions, split out from...
28804 (vectorizable_load): ...here.
28806 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28808 * tree-vect-stmts.c (vect_check_store_rhs): New function,
28810 (vectorizable_mask_load_store): ...here.
28811 (vectorizable_store): ...and here.
28813 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28815 * tree-vect-stmts.c (vect_check_load_store_mask): New function,
28817 (vectorizable_mask_load_store): ...here.
28819 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28821 * tree-vectorizer.h (vec_load_store_type): Moved from tree-vec-stmts.c
28822 (vect_model_store_cost): Take a vec_load_store_type instead of a
28824 * tree-vect-stmts.c (vec_load_store_type): Move to tree-vectorizer.h.
28825 (vect_model_store_cost): Take a vec_load_store_type instead of a
28827 (vectorizable_mask_load_store): Update accordingly.
28828 (vectorizable_store): Likewise.
28829 * tree-vect-slp.c (vect_analyze_slp_cost_1): Update accordingly.
28831 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28833 * tree-vect-loop.c (vect_transform_loop): Stub out scalar
28834 IFN_MASK_LOAD calls here rather than...
28835 * tree-vect-stmts.c (vectorizable_mask_load_store): ...here.
28837 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28838 Alan Hayward <alan.hayward@arm.com>
28839 David Sherwood <david.sherwood@arm.com>
28841 * expmed.c (extract_bit_field_1): For vector extracts,
28842 fall back to extract_bit_field_as_subreg if vec_extract
28845 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28846 Alan Hayward <alan.hayward@arm.com>
28847 David Sherwood <david.sherwood@arm.com>
28849 * lra-spills.c (pseudo_reg_slot_compare): Sort slots by whether
28850 they are variable or constant sized.
28851 (assign_stack_slot_num_and_sort_pseudos): Don't reuse variable-sized
28852 slots for constant-sized data.
28854 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28855 Alan Hayward <alan.hayward@arm.com>
28856 David Sherwood <david.sherwood@arm.com>
28858 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): When
28859 handling COND_EXPRs with boolean comparisons, try to find a better
28860 basis for the mask type than the boolean itself.
28862 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28864 * doc/rtl.texi (MAX_BITSIZE_MODE_ANY_MODE): Describe how the default
28865 is calculated and how it can be overridden.
28866 * genmodes.c (max_bitsize_mode_any_mode): New variable.
28867 (create_modes): Initialize it from MAX_BITSIZE_MODE_ANY_MODE,
28869 (emit_max_int): Use it to set the output MAX_BITSIZE_MODE_ANY_MODE,
28872 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28873 Alan Hayward <alan.hayward@arm.com>
28874 David Sherwood <david.sherwood@arm.com>
28876 * config/aarch64/aarch64-protos.h (aarch64_output_simd_mov_immediate):
28877 Remove the mode argument.
28878 (aarch64_simd_valid_immediate): Remove the mode and inverse
28880 * config/aarch64/iterators.md (bitsize): New iterator.
28881 * config/aarch64/aarch64-simd.md (*aarch64_simd_mov<mode>, and<mode>3)
28882 (ior<mode>3): Update calls to aarch64_output_simd_mov_immediate.
28883 * config/aarch64/constraints.md (Do, Db, Dn): Update calls to
28884 aarch64_simd_valid_immediate.
28885 * config/aarch64/predicates.md (aarch64_reg_or_orr_imm): Likewise.
28886 (aarch64_reg_or_bic_imm): Likewise.
28887 * config/aarch64/aarch64.c (simd_immediate_info): Replace mvn
28888 with an insn_type enum and msl with a modifier_type enum.
28889 Replace element_width with a scalar_mode. Change the shift
28890 to unsigned int. Add constructors for scalar_float_mode and
28891 scalar_int_mode elements.
28892 (aarch64_vect_float_const_representable_p): Delete.
28893 (aarch64_can_const_movi_rtx_p)
28894 (aarch64_simd_scalar_immediate_valid_for_move)
28895 (aarch64_simd_make_constant): Update call to
28896 aarch64_simd_valid_immediate.
28897 (aarch64_advsimd_valid_immediate_hs): New function.
28898 (aarch64_advsimd_valid_immediate): Likewise.
28899 (aarch64_simd_valid_immediate): Remove mode and inverse
28900 arguments. Rewrite to use the above. Use const_vec_duplicate_p
28901 to detect duplicated constants and use aarch64_float_const_zero_rtx_p
28902 and aarch64_float_const_representable_p on the result.
28903 (aarch64_output_simd_mov_immediate): Remove mode argument.
28904 Update call to aarch64_simd_valid_immediate and use of
28905 simd_immediate_info.
28906 (aarch64_output_scalar_simd_mov_immediate): Update call
28909 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28910 Alan Hayward <alan.hayward@arm.com>
28911 David Sherwood <david.sherwood@arm.com>
28913 * machmode.h (mode_precision): Prefix with CONST_MODE_PRECISION.
28914 (mode_nunits): Likewise CONST_MODE_NUNITS.
28915 * machmode.def (ADJUST_NUNITS): Document.
28916 * genmodes.c (mode_data::need_nunits_adj): New field.
28917 (blank_mode): Update accordingly.
28918 (adj_nunits): New variable.
28919 (print_maybe_const_decl): Replace CATEGORY with a NEEDS_ADJ
28921 (emit_mode_size_inline): Set need_bytesize_adj for all modes
28922 listed in adj_nunits.
28923 (emit_mode_nunits_inline): Set need_nunits_adj for all modes
28924 listed in adj_nunits. Don't emit case statements for such modes.
28925 (emit_insn_modes_h): Emit definitions of CONST_MODE_NUNITS
28926 and CONST_MODE_PRECISION. Make CONST_MODE_SIZE expand to
28927 nothing if adj_nunits is nonnull.
28928 (emit_mode_precision, emit_mode_nunits): Use print_maybe_const_decl.
28929 (emit_mode_unit_size, emit_mode_base_align, emit_mode_ibit)
28930 (emit_mode_fbit): Update use of print_maybe_const_decl.
28931 (emit_move_size): Likewise. Treat the array as non-const
28933 (emit_mode_adjustments): Handle adj_nunits.
28935 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28937 * machmode.def (VECTOR_MODES_WITH_PREFIX): Document.
28938 * genmodes.c (VECTOR_MODES_WITH_PREFIX): New macro.
28939 (VECTOR_MODES): Use it.
28940 (make_vector_modes): Take the prefix as an argument.
28942 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28943 Alan Hayward <alan.hayward@arm.com>
28944 David Sherwood <david.sherwood@arm.com>
28946 * mode-classes.def (MODE_VECTOR_BOOL): New mode class.
28947 * machmode.h (INTEGRAL_MODE_P, VECTOR_MODE_P): Return true
28948 for MODE_VECTOR_BOOL.
28949 * machmode.def (VECTOR_BOOL_MODE): Document.
28950 * genmodes.c (VECTOR_BOOL_MODE): New macro.
28951 (make_vector_bool_mode): New function.
28952 (complete_mode, emit_mode_wider, emit_mode_adjustments): Handle
28954 * lto-streamer-in.c (lto_input_mode_table): Likewise.
28955 * rtx-vector-builder.c (rtx_vector_builder::find_cached_value):
28957 * stor-layout.c (int_mode_for_mode): Likewise.
28958 * tree.c (build_vector_type_for_mode): Likewise.
28959 * varasm.c (output_constant_pool_2): Likewise.
28960 * emit-rtl.c (init_emit_once): Make sure that CONST1_RTX (BImode) and
28961 CONSTM1_RTX (BImode) are the same thing. Initialize const_tiny_rtx
28962 for MODE_VECTOR_BOOL.
28963 * expr.c (expand_expr_real_1): Use VECTOR_MODE_P instead of a list
28964 of mode class checks.
28965 * tree-vect-generic.c (expand_vector_operation): Use VECTOR_MODE_P
28966 instead of a list of mode class checks.
28967 (expand_vector_scalar_condition): Likewise.
28968 (type_for_widest_vector_mode): Handle BImode as an inner mode.
28970 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28971 Alan Hayward <alan.hayward@arm.com>
28972 David Sherwood <david.sherwood@arm.com>
28974 * machmode.h (mode_size): Change from unsigned short to
28976 (mode_to_bytes): Return a poly_uint16 rather than an unsigned short.
28977 (GET_MODE_SIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
28978 or if measurement_type is not polynomial.
28979 (fixed_size_mode::includes_p): Check for constant-sized modes.
28980 * genmodes.c (emit_mode_size_inline): Make mode_size_inline
28981 return a poly_uint16 rather than an unsigned short.
28982 (emit_mode_size): Change the type of mode_size from unsigned short
28983 to poly_uint16_pod. Use ZERO_COEFFS for the initializer.
28984 (emit_mode_adjustments): Cope with polynomial vector sizes.
28985 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
28987 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
28989 * auto-inc-dec.c (try_merge): Treat GET_MODE_SIZE as polynomial.
28990 * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Likewise.
28991 * caller-save.c (setup_save_areas): Likewise.
28992 (replace_reg_with_saved_mem): Likewise.
28993 * calls.c (emit_library_call_value_1): Likewise.
28994 * combine-stack-adj.c (combine_stack_adjustments_for_block): Likewise.
28995 * combine.c (simplify_set, make_extraction, simplify_shift_const_1)
28996 (gen_lowpart_for_combine): Likewise.
28997 * convert.c (convert_to_integer_1): Likewise.
28998 * cse.c (equiv_constant, cse_insn): Likewise.
28999 * cselib.c (autoinc_split, cselib_hash_rtx): Likewise.
29000 (cselib_subst_to_values): Likewise.
29001 * dce.c (word_dce_process_block): Likewise.
29002 * df-problems.c (df_word_lr_mark_ref): Likewise.
29003 * dwarf2cfi.c (init_one_dwarf_reg_size): Likewise.
29004 * dwarf2out.c (multiple_reg_loc_descriptor, mem_loc_descriptor)
29005 (concat_loc_descriptor, concatn_loc_descriptor, loc_descriptor)
29006 (rtl_for_decl_location): Likewise.
29007 * emit-rtl.c (gen_highpart, widen_memory_access): Likewise.
29008 * expmed.c (extract_bit_field_1, extract_integral_bit_field): Likewise.
29009 * expr.c (emit_group_load_1, clear_storage_hints): Likewise.
29010 (emit_move_complex, emit_move_multi_word, emit_push_insn): Likewise.
29011 (expand_expr_real_1): Likewise.
29012 * function.c (assign_parm_setup_block_p, assign_parm_setup_block)
29013 (pad_below): Likewise.
29014 * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
29015 * gimple-ssa-store-merging.c (rhs_valid_for_store_merging_p): Likewise.
29016 * ira.c (get_subreg_tracking_sizes): Likewise.
29017 * ira-build.c (ira_create_allocno_objects): Likewise.
29018 * ira-color.c (coalesced_pseudo_reg_slot_compare): Likewise.
29019 (ira_sort_regnos_for_alter_reg): Likewise.
29020 * ira-costs.c (record_operand_costs): Likewise.
29021 * lower-subreg.c (interesting_mode_p, simplify_gen_subreg_concatn)
29022 (resolve_simple_move): Likewise.
29023 * lra-constraints.c (get_reload_reg, operands_match_p): Likewise.
29024 (process_addr_reg, simplify_operand_subreg, curr_insn_transform)
29025 (lra_constraints): Likewise.
29026 (CONST_POOL_OK_P): Reject variable-sized modes.
29027 * lra-spills.c (slot, assign_mem_slot, pseudo_reg_slot_compare)
29028 (add_pseudo_to_slot, lra_spill): Likewise.
29029 * omp-low.c (omp_clause_aligned_alignment): Likewise.
29030 * optabs-query.c (get_best_extraction_insn): Likewise.
29031 * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
29032 * optabs.c (expand_vec_perm_var, expand_vec_cond_expr): Likewise.
29033 (expand_mult_highpart, valid_multiword_target_p): Likewise.
29034 * recog.c (offsettable_address_addr_space_p): Likewise.
29035 * regcprop.c (maybe_mode_change): Likewise.
29036 * reginfo.c (choose_hard_reg_mode, record_subregs_of_mode): Likewise.
29037 * regrename.c (build_def_use): Likewise.
29038 * regstat.c (dump_reg_info): Likewise.
29039 * reload.c (complex_word_subreg_p, push_reload, find_dummy_reload)
29040 (find_reloads, find_reloads_subreg_address): Likewise.
29041 * reload1.c (eliminate_regs_1): Likewise.
29042 * rtlanal.c (for_each_inc_dec_find_inc_dec, rtx_cost): Likewise.
29043 * simplify-rtx.c (avoid_constant_pool_reference): Likewise.
29044 (simplify_binary_operation_1, simplify_subreg): Likewise.
29045 * targhooks.c (default_function_arg_padding): Likewise.
29046 (default_hard_regno_nregs, default_class_max_nregs): Likewise.
29047 * tree-cfg.c (verify_gimple_assign_binary): Likewise.
29048 (verify_gimple_assign_ternary): Likewise.
29049 * tree-inline.c (estimate_move_cost): Likewise.
29050 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
29051 * tree-ssa-loop-ivopts.c (add_autoinc_candidates): Likewise.
29052 (get_address_cost_ainc): Likewise.
29053 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Likewise.
29054 (vect_supportable_dr_alignment): Likewise.
29055 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
29056 (vectorizable_reduction): Likewise.
29057 * tree-vect-stmts.c (vectorizable_assignment, vectorizable_shift)
29058 (vectorizable_operation, vectorizable_load): Likewise.
29059 * tree.c (build_same_sized_truth_vector_type): Likewise.
29060 * valtrack.c (cleanup_auto_inc_dec): Likewise.
29061 * var-tracking.c (emit_note_insn_var_location): Likewise.
29062 * config/arc/arc.h (ASM_OUTPUT_CASE_END): Use as_a <scalar_int_mode>.
29063 (ADDR_VEC_ALIGN): Likewise.
29065 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29066 Alan Hayward <alan.hayward@arm.com>
29067 David Sherwood <david.sherwood@arm.com>
29069 * machmode.h (mode_to_bits): Return a poly_uint16 rather than an
29071 (GET_MODE_BITSIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
29072 or if measurement_type is polynomial.
29073 * calls.c (shift_return_value): Treat GET_MODE_BITSIZE as polynomial.
29074 * combine.c (make_extraction): Likewise.
29075 * dse.c (find_shift_sequence): Likewise.
29076 * dwarf2out.c (mem_loc_descriptor): Likewise.
29077 * expmed.c (store_integral_bit_field, extract_bit_field_1): Likewise.
29078 (extract_bit_field, extract_low_bits): Likewise.
29079 * expr.c (convert_move, convert_modes, emit_move_insn_1): Likewise.
29080 (optimize_bitfield_assignment_op, expand_assignment): Likewise.
29081 (store_expr_with_bounds, store_field, expand_expr_real_1): Likewise.
29082 * fold-const.c (optimize_bit_field_compare, merge_ranges): Likewise.
29083 * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
29084 * reload.c (find_reloads): Likewise.
29085 * reload1.c (alter_reg): Likewise.
29086 * stor-layout.c (bitwise_mode_for_mode, compute_record_mode): Likewise.
29087 * targhooks.c (default_secondary_memory_needed_mode): Likewise.
29088 * tree-if-conv.c (predicate_mem_writes): Likewise.
29089 * tree-ssa-strlen.c (handle_builtin_memcmp): Likewise.
29090 * tree-vect-patterns.c (adjust_bool_pattern): Likewise.
29091 * tree-vect-stmts.c (vectorizable_simd_clone_call): Likewise.
29092 * valtrack.c (dead_debug_insert_temp): Likewise.
29093 * varasm.c (mergeable_constant_section): Likewise.
29094 * config/sh/sh.h (LOCAL_ALIGNMENT): Use as_a <fixed_size_mode>.
29096 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29097 Alan Hayward <alan.hayward@arm.com>
29098 David Sherwood <david.sherwood@arm.com>
29100 * expr.c (expand_assignment): Cope with polynomial mode sizes
29101 when assigning to a CONCAT.
29103 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29104 Alan Hayward <alan.hayward@arm.com>
29105 David Sherwood <david.sherwood@arm.com>
29107 * machmode.h (mode_precision): Change from unsigned short to
29109 (mode_to_precision): Return a poly_uint16 rather than an unsigned
29111 (GET_MODE_PRECISION): Return a constant if ONLY_FIXED_SIZE_MODES,
29112 or if measurement_type is not polynomial.
29113 (HWI_COMPUTABLE_MODE_P): Turn into a function. Optimize the case
29114 in which the mode is already known to be a scalar_int_mode.
29115 * genmodes.c (emit_mode_precision): Change the type of mode_precision
29116 from unsigned short to poly_uint16_pod. Use ZERO_COEFFS for the
29118 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
29119 for GET_MODE_PRECISION.
29120 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
29121 for GET_MODE_PRECISION.
29122 * combine.c (update_rsp_from_reg_equal): Treat GET_MODE_PRECISION
29124 (try_combine, find_split_point, combine_simplify_rtx): Likewise.
29125 (expand_field_assignment, make_extraction): Likewise.
29126 (make_compound_operation_int, record_dead_and_set_regs_1): Likewise.
29127 (get_last_value): Likewise.
29128 * convert.c (convert_to_integer_1): Likewise.
29129 * cse.c (cse_insn): Likewise.
29130 * expr.c (expand_expr_real_1): Likewise.
29131 * lra-constraints.c (simplify_operand_subreg): Likewise.
29132 * optabs-query.c (can_atomic_load_p): Likewise.
29133 * optabs.c (expand_atomic_load): Likewise.
29134 (expand_atomic_store): Likewise.
29135 * ree.c (combine_reaching_defs): Likewise.
29136 * rtl.h (partial_subreg_p, paradoxical_subreg_p): Likewise.
29137 * rtlanal.c (nonzero_bits1, lsb_bitfield_op_p): Likewise.
29138 * tree.h (type_has_mode_precision_p): Likewise.
29139 * ubsan.c (instrument_si_overflow): Likewise.
29141 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29142 Alan Hayward <alan.hayward@arm.com>
29143 David Sherwood <david.sherwood@arm.com>
29145 * tree.h (TYPE_VECTOR_SUBPARTS): Turn into a function and handle
29146 polynomial numbers of units.
29147 (SET_TYPE_VECTOR_SUBPARTS): Likewise.
29148 (valid_vector_subparts_p): New function.
29149 (build_vector_type): Remove temporary shim and take the number
29150 of units as a poly_uint64 rather than an int.
29151 (build_opaque_vector_type): Take the number of units as a
29152 poly_uint64 rather than an int.
29153 * tree.c (build_vector_from_ctor): Handle polynomial
29154 TYPE_VECTOR_SUBPARTS.
29155 (type_hash_canon_hash, type_cache_hasher::equal): Likewise.
29156 (uniform_vector_p, vector_type_mode, build_vector): Likewise.
29157 (build_vector_from_val): If the number of units is variable,
29158 use build_vec_duplicate_cst for constant operands and
29159 VEC_DUPLICATE_EXPR otherwise.
29160 (make_vector_type): Remove temporary is_constant ().
29161 (build_vector_type, build_opaque_vector_type): Take the number of
29162 units as a poly_uint64 rather than an int.
29163 (check_vector_cst): Handle polynomial TYPE_VECTOR_SUBPARTS and
29165 * cfgexpand.c (expand_debug_expr): Likewise.
29166 * expr.c (count_type_elements, categorize_ctor_elements_1): Likewise.
29167 (store_constructor, expand_expr_real_1): Likewise.
29168 (const_scalar_mask_from_tree): Likewise.
29169 * fold-const-call.c (fold_const_reduction): Likewise.
29170 * fold-const.c (const_binop, const_unop, fold_convert_const): Likewise.
29171 (operand_equal_p, fold_vec_perm, fold_ternary_loc): Likewise.
29172 (native_encode_vector, vec_cst_ctor_to_array): Likewise.
29173 (fold_relational_const): Likewise.
29174 (native_interpret_vector): Likewise. Change the size from an
29175 int to an unsigned int.
29176 * gimple-fold.c (gimple_fold_stmt_to_constant_1): Handle polynomial
29177 TYPE_VECTOR_SUBPARTS.
29178 (gimple_fold_indirect_ref, gimple_build_vector): Likewise.
29179 (gimple_build_vector_from_val): Use VEC_DUPLICATE_EXPR when
29180 duplicating a non-constant operand into a variable-length vector.
29181 * hsa-brig.c (hsa_op_immed::emit_to_buffer): Handle polynomial
29182 TYPE_VECTOR_SUBPARTS and VECTOR_CST_NELTS.
29183 * ipa-icf.c (sem_variable::equals): Likewise.
29184 * match.pd: Likewise.
29185 * omp-simd-clone.c (simd_clone_subparts): Likewise.
29186 * print-tree.c (print_node): Likewise.
29187 * stor-layout.c (layout_type): Likewise.
29188 * targhooks.c (default_builtin_vectorization_cost): Likewise.
29189 * tree-cfg.c (verify_gimple_comparison): Likewise.
29190 (verify_gimple_assign_binary): Likewise.
29191 (verify_gimple_assign_ternary): Likewise.
29192 (verify_gimple_assign_single): Likewise.
29193 * tree-pretty-print.c (dump_generic_node): Likewise.
29194 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
29195 (simplify_bitfield_ref, is_combined_permutation_identity): Likewise.
29196 * tree-vect-data-refs.c (vect_permute_store_chain): Likewise.
29197 (vect_grouped_load_supported, vect_permute_load_chain): Likewise.
29198 (vect_shift_permute_load_chain): Likewise.
29199 * tree-vect-generic.c (nunits_for_known_piecewise_op): Likewise.
29200 (expand_vector_condition, optimize_vector_constructor): Likewise.
29201 (lower_vec_perm, get_compute_type): Likewise.
29202 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
29203 (get_initial_defs_for_reduction, vect_transform_loop): Likewise.
29204 * tree-vect-patterns.c (vect_recog_bool_pattern): Likewise.
29205 (vect_recog_mask_conversion_pattern): Likewise.
29206 * tree-vect-slp.c (vect_supported_load_permutation_p): Likewise.
29207 (vect_get_constant_vectors, vect_transform_slp_perm_load): Likewise.
29208 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
29209 (get_group_load_store_type, vectorizable_mask_load_store): Likewise.
29210 (vectorizable_bswap, simd_clone_subparts, vectorizable_assignment)
29211 (vectorizable_shift, vectorizable_operation, vectorizable_store)
29212 (vectorizable_load, vect_is_simple_cond, vectorizable_comparison)
29213 (supportable_widening_operation): Likewise.
29214 (supportable_narrowing_operation): Likewise.
29215 * tree-vector-builder.c (tree_vector_builder::binary_encoded_nelts):
29217 * varasm.c (output_constant): Likewise.
29219 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29220 Alan Hayward <alan.hayward@arm.com>
29221 David Sherwood <david.sherwood@arm.com>
29223 * tree-vect-data-refs.c (vect_permute_store_chain): Reorganize
29224 so that both the length == 3 and length != 3 cases set up their
29225 own permute vectors. Add comments explaining why we know the
29226 number of elements is constant.
29227 (vect_permute_load_chain): Likewise.
29229 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29230 Alan Hayward <alan.hayward@arm.com>
29231 David Sherwood <david.sherwood@arm.com>
29233 * machmode.h (mode_nunits): Change from unsigned char to
29235 (ONLY_FIXED_SIZE_MODES): New macro.
29236 (pod_mode::measurement_type, scalar_int_mode::measurement_type)
29237 (scalar_float_mode::measurement_type, scalar_mode::measurement_type)
29238 (complex_mode::measurement_type, fixed_size_mode::measurement_type):
29240 (mode_to_nunits): Return a poly_uint16 rather than an unsigned short.
29241 (GET_MODE_NUNITS): Return a constant if ONLY_FIXED_SIZE_MODES,
29242 or if measurement_type is not polynomial.
29243 * genmodes.c (ZERO_COEFFS): New macro.
29244 (emit_mode_nunits_inline): Make mode_nunits_inline return a
29246 (emit_mode_nunits): Change the type of mode_nunits to poly_uint16_pod.
29247 Use ZERO_COEFFS when emitting initializers.
29248 * data-streamer.h (bp_pack_poly_value): New function.
29249 (bp_unpack_poly_value): Likewise.
29250 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
29251 for GET_MODE_NUNITS.
29252 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
29253 for GET_MODE_NUNITS.
29254 * tree.c (make_vector_type): Remove temporary shim and make
29255 the real function take the number of units as a poly_uint64
29256 rather than an int.
29257 (build_vector_type_for_mode): Handle polynomial nunits.
29258 * dwarf2out.c (loc_descriptor, add_const_value_attribute): Likewise.
29259 * emit-rtl.c (const_vec_series_p_1): Likewise.
29260 (gen_rtx_CONST_VECTOR): Likewise.
29261 * fold-const.c (test_vec_duplicate_folding): Likewise.
29262 * genrecog.c (validate_pattern): Likewise.
29263 * optabs-query.c (can_vec_perm_var_p, can_mult_highpart_p): Likewise.
29264 * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
29265 * optabs.c (expand_vector_broadcast, expand_binop_directly): Likewise.
29266 (shift_amt_for_vec_perm_mask, expand_vec_perm_var): Likewise.
29267 (expand_vec_cond_expr, expand_mult_highpart): Likewise.
29268 * rtlanal.c (subreg_get_info): Likewise.
29269 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
29270 (vect_grouped_load_supported): Likewise.
29271 * tree-vect-generic.c (type_for_widest_vector_mode): Likewise.
29272 * tree-vect-loop.c (have_whole_vector_shift): Likewise.
29273 * simplify-rtx.c (simplify_unary_operation_1): Likewise.
29274 (simplify_const_unary_operation, simplify_binary_operation_1)
29275 (simplify_const_binary_operation, simplify_ternary_operation)
29276 (test_vector_ops_duplicate, test_vector_ops): Likewise.
29277 (simplify_immed_subreg): Use GET_MODE_NUNITS on a fixed_size_mode
29278 instead of CONST_VECTOR_NUNITS.
29279 * varasm.c (output_constant_pool_2): Likewise.
29280 * rtx-vector-builder.c (rtx_vector_builder::build): Only include the
29281 explicit-encoded elements in the XVEC for variable-length vectors.
29283 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29285 * lra-constraints.c (curr_insn_transform): Use partial_subreg_p.
29287 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29288 Alan Hayward <alan.hayward@arm.com>
29289 David Sherwood <david.sherwood@arm.com>
29291 * coretypes.h (fixed_size_mode): Declare.
29292 (fixed_size_mode_pod): New typedef.
29293 * builtins.h (target_builtins::x_apply_args_mode)
29294 (target_builtins::x_apply_result_mode): Change type to
29295 fixed_size_mode_pod.
29296 * builtins.c (apply_args_size, apply_result_size, result_vector)
29297 (expand_builtin_apply_args_1, expand_builtin_apply)
29298 (expand_builtin_return): Update accordingly.
29300 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29302 * cse.c (hash_rtx_cb): Hash only the encoded elements.
29303 * cselib.c (cselib_hash_rtx): Likewise.
29304 * expmed.c (make_tree): Build VECTOR_CSTs directly from the
29305 CONST_VECTOR encoding.
29307 2018-01-03 Jakub Jelinek <jakub@redhat.com>
29308 Jeff Law <law@redhat.com>
29311 * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): For
29312 noreturn probe, use gen_pop instead of ix86_emit_restore_reg_using_pop,
29313 only set RTX_FRAME_RELATED_P on both the push and pop if cfa_reg is sp
29314 and add REG_CFA_ADJUST_CFA notes in that case to both insns.
29317 * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): Do not
29318 explicitly probe *sp in a noreturn function if there were any callee
29319 register saves or frame pointer is needed.
29321 2018-01-03 Jakub Jelinek <jakub@redhat.com>
29324 * cfgexpand.c (expand_debug_expr): Return NULL if mode is
29325 BLKmode for ternary, binary or unary expressions.
29328 * var-tracking.c (delete_vta_debug_insn): New inline function.
29329 (delete_vta_debug_insns): Add USE_CFG argument, if true, walk just
29330 insns from get_insns () to NULL instead of each bb separately.
29331 Use delete_vta_debug_insn. No longer static.
29332 (vt_debug_insns_local, variable_tracking_main_1): Adjust
29333 delete_vta_debug_insns callers.
29334 * rtl.h (delete_vta_debug_insns): Declare.
29335 * final.c (rest_of_handle_final): Call delete_vta_debug_insns
29336 instead of variable_tracking_main.
29338 2018-01-03 Martin Sebor <msebor@redhat.com>
29340 PR tree-optimization/83603
29341 * calls.c (maybe_warn_nonstring_arg): Avoid accessing function
29342 arguments past the endof the argument list in functions declared
29343 without a prototype.
29344 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call):
29345 Avoid checking when arguments are null.
29347 2018-01-03 Martin Sebor <msebor@redhat.com>
29350 * doc/extend.texi (attribute const): Fix a typo.
29351 * ipa-pure-const.c ((warn_function_const, warn_function_pure): Avoid
29352 issuing -Wsuggest-attribute for void functions.
29354 2018-01-03 Martin Sebor <msebor@redhat.com>
29356 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Use
29357 offset_int::from instead of wide_int::to_shwi.
29358 (maybe_diag_overlap): Remove assertion.
29359 Use HOST_WIDE_INT_PRINT_DEC instead of %lli.
29360 * gimple-ssa-sprintf.c (format_directive): Same.
29361 (parse_directive): Same.
29362 (sprintf_dom_walker::compute_format_length): Same.
29363 (try_substitute_return_value): Same.
29365 2018-01-03 Jeff Law <law@redhat.com>
29367 PR middle-end/83654
29368 * explow.c (anti_adjust_stack_and_probe_stack_clash): Test a
29369 non-constant residual for zero at runtime and avoid probing in
29370 that case. Reorganize code for trailing problem to mirror handling
29373 2018-01-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
29375 PR tree-optimization/83501
29376 * tree-ssa-strlen.c (get_string_cst): New.
29377 (handle_char_store): Call get_string_cst.
29379 2018-01-03 Martin Liska <mliska@suse.cz>
29381 PR tree-optimization/83593
29382 * tree-ssa-strlen.c: Include tree-cfg.h.
29383 (strlen_check_and_optimize_stmt): Add new argument cleanup_eh.
29384 (strlen_dom_walker): Add new member variable m_cleanup_cfg.
29385 (strlen_dom_walker::strlen_dom_walker): Initialize m_cleanup_cfg
29387 (strlen_dom_walker::before_dom_children): Call
29388 gimple_purge_dead_eh_edges. Dump tranformation with details
29390 (strlen_dom_walker::before_dom_children): Update call by adding
29391 new argument cleanup_eh.
29392 (pass_strlen::execute): Return TODO_cleanup_cfg if needed.
29394 2018-01-03 Martin Liska <mliska@suse.cz>
29397 * cif-code.def (VARIADIC_THUNK): New enum value.
29398 * ipa-fnsummary.c (compute_fn_summary): Do not inline variadic
29401 2018-01-03 Jan Beulich <jbeulich@suse.com>
29403 * sse.md (mov<mode>_internal): Tighten condition for when to use
29404 vmovdqu<ssescalarsize> for TI and OI modes.
29406 2018-01-03 Jakub Jelinek <jakub@redhat.com>
29408 Update copyright years.
29410 2018-01-03 Martin Liska <mliska@suse.cz>
29413 * ipa-visibility.c (function_and_variable_visibility): Skip
29414 functions with noipa attribure.
29416 2018-01-03 Jakub Jelinek <jakub@redhat.com>
29418 * gcc.c (process_command): Update copyright notice dates.
29419 * gcov-dump.c (print_version): Ditto.
29420 * gcov.c (print_version): Ditto.
29421 * gcov-tool.c (print_version): Ditto.
29422 * gengtype.c (create_file): Ditto.
29423 * doc/cpp.texi: Bump @copying's copyright year.
29424 * doc/cppinternals.texi: Ditto.
29425 * doc/gcc.texi: Ditto.
29426 * doc/gccint.texi: Ditto.
29427 * doc/gcov.texi: Ditto.
29428 * doc/install.texi: Ditto.
29429 * doc/invoke.texi: Ditto.
29431 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29433 * vector-builder.h (vector_builder::m_full_nelts): Change from
29434 unsigned int to poly_uint64.
29435 (vector_builder::full_nelts): Update prototype accordingly.
29436 (vector_builder::new_vector): Likewise.
29437 (vector_builder::encoded_full_vector_p): Handle polynomial full_nelts.
29438 (vector_builder::operator ==): Likewise.
29439 (vector_builder::finalize): Likewise.
29440 * int-vector-builder.h (int_vector_builder::int_vector_builder):
29441 Take the number of elements as a poly_uint64 rather than an
29443 * vec-perm-indices.h (vec_perm_indices::m_nelts_per_input): Change
29444 from unsigned int to poly_uint64.
29445 (vec_perm_indices::vec_perm_indices): Update prototype accordingly.
29446 (vec_perm_indices::new_vector): Likewise.
29447 (vec_perm_indices::length): Likewise.
29448 (vec_perm_indices::nelts_per_input): Likewise.
29449 (vec_perm_indices::input_nelts): Likewise.
29450 * vec-perm-indices.c (vec_perm_indices::new_vector): Take the
29451 number of elements per input as a poly_uint64 rather than an
29452 unsigned int. Use the original encoding for variable-length
29453 vectors, rather than clamping each individual element.
29454 For the second and subsequent elements in each pattern,
29455 clamp the step and base before clamping their sum.
29456 (vec_perm_indices::series_p): Handle polynomial element counts.
29457 (vec_perm_indices::all_in_range_p): Likewise.
29458 (vec_perm_indices_to_tree): Likewise.
29459 (vec_perm_indices_to_rtx): Likewise.
29460 * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise.
29461 * tree-vector-builder.c (tree_vector_builder::new_unary_operation)
29462 (tree_vector_builder::new_binary_operation): Handle polynomial
29463 element counts. Return false if we need to know the number
29464 of elements at compile time.
29465 * fold-const.c (fold_vec_perm): Punt if the number of elements
29466 isn't known at compile time.
29468 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29470 * vec-perm-indices.h (vec_perm_builder): Change element type
29471 from HOST_WIDE_INT to poly_int64.
29472 (vec_perm_indices::element_type): Update accordingly.
29473 (vec_perm_indices::clamp): Handle polynomial element_types.
29474 * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
29475 (vec_perm_indices::all_in_range_p): Likewise.
29476 (tree_to_vec_perm_builder): Check for poly_int64 trees rather
29478 * vector-builder.h (vector_builder::stepped_sequence_p): Handle
29479 polynomial vec_perm_indices element types.
29480 * int-vector-builder.h (int_vector_builder::equal_p): Likewise.
29481 * fold-const.c (fold_vec_perm): Likewise.
29482 * optabs.c (shift_amt_for_vec_perm_mask): Likewise.
29483 * tree-vect-generic.c (lower_vec_perm): Likewise.
29484 * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
29485 * config/aarch64/aarch64.c (aarch64_evpc_tbl): Cast d->perm
29486 element type to HOST_WIDE_INT.
29488 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29489 Alan Hayward <alan.hayward@arm.com>
29490 David Sherwood <david.sherwood@arm.com>
29492 * alias.c (addr_side_effect_eval): Take the size as a poly_int64
29493 rather than an int. Use plus_constant.
29494 (memrefs_conflict_p): Take the sizes as poly_int64s rather than ints.
29495 Take the offset "c" as a poly_int64 rather than a HOST_WIDE_INT.
29497 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29498 Alan Hayward <alan.hayward@arm.com>
29499 David Sherwood <david.sherwood@arm.com>
29501 * calls.c (emit_call_1, expand_call): Change struct_value_size from
29502 a HOST_WIDE_INT to a poly_int64.
29504 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29505 Alan Hayward <alan.hayward@arm.com>
29506 David Sherwood <david.sherwood@arm.com>
29508 * calls.c (load_register_parameters): Cope with polynomial
29509 mode sizes. Require a constant size for BLKmode parameters
29510 that aren't described by a PARALLEL. If BLOCK_REG_PADDING
29511 forces a parameter to be padded at the lsb end in order to
29512 fill a complete number of words, require the parameter size
29513 to be ordered wrt UNITS_PER_WORD.
29515 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29516 Alan Hayward <alan.hayward@arm.com>
29517 David Sherwood <david.sherwood@arm.com>
29519 * reload1.c (spill_stack_slot_width): Change element type
29520 from unsigned int to poly_uint64_pod.
29521 (alter_reg): Treat mode sizes as polynomial.
29523 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29524 Alan Hayward <alan.hayward@arm.com>
29525 David Sherwood <david.sherwood@arm.com>
29527 * reload.c (complex_word_subreg_p): New function.
29528 (reload_inner_reg_of_subreg, push_reload): Use it.
29530 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29531 Alan Hayward <alan.hayward@arm.com>
29532 David Sherwood <david.sherwood@arm.com>
29534 * lra-constraints.c (process_alt_operands): Reject matched
29535 operands whose sizes aren't ordered.
29536 (match_reload): Refer to this check here.
29538 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29539 Alan Hayward <alan.hayward@arm.com>
29540 David Sherwood <david.sherwood@arm.com>
29542 * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Assert
29543 that the mode size is in the set {1, 2, 4, 8, 16}.
29545 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29546 Alan Hayward <alan.hayward@arm.com>
29547 David Sherwood <david.sherwood@arm.com>
29549 * var-tracking.c (adjust_mems): Treat mode sizes as polynomial.
29550 Use plus_constant instead of gen_rtx_PLUS.
29552 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29553 Alan Hayward <alan.hayward@arm.com>
29554 David Sherwood <david.sherwood@arm.com>
29556 * config/cr16/cr16-protos.h (cr16_push_rounding): Declare.
29557 * config/cr16/cr16.h (PUSH_ROUNDING): Move implementation to...
29558 * config/cr16/cr16.c (cr16_push_rounding): ...this new function.
29559 * config/h8300/h8300-protos.h (h8300_push_rounding): Declare.
29560 * config/h8300/h8300.h (PUSH_ROUNDING): Move implementation to...
29561 * config/h8300/h8300.c (h8300_push_rounding): ...this new function.
29562 * config/i386/i386-protos.h (ix86_push_rounding): Declare.
29563 * config/i386/i386.h (PUSH_ROUNDING): Move implementation to...
29564 * config/i386/i386.c (ix86_push_rounding): ...this new function.
29565 * config/m32c/m32c-protos.h (m32c_push_rounding): Take and return
29567 * config/m32c/m32c.c (m32c_push_rounding): Likewise.
29568 * config/m68k/m68k-protos.h (m68k_push_rounding): Declare.
29569 * config/m68k/m68k.h (PUSH_ROUNDING): Move implementation to...
29570 * config/m68k/m68k.c (m68k_push_rounding): ...this new function.
29571 * config/pdp11/pdp11-protos.h (pdp11_push_rounding): Declare.
29572 * config/pdp11/pdp11.h (PUSH_ROUNDING): Move implementation to...
29573 * config/pdp11/pdp11.c (pdp11_push_rounding): ...this new function.
29574 * config/stormy16/stormy16-protos.h (xstormy16_push_rounding): Declare.
29575 * config/stormy16/stormy16.h (PUSH_ROUNDING): Move implementation to...
29576 * config/stormy16/stormy16.c (xstormy16_push_rounding): ...this new
29578 * expr.c (emit_move_resolve_push): Treat the input and result
29579 of PUSH_ROUNDING as a poly_int64.
29580 (emit_move_complex_push, emit_single_push_insn_1): Likewise.
29581 (emit_push_insn): Likewise.
29582 * lra-eliminations.c (mark_not_eliminable): Likewise.
29583 * recog.c (push_operand): Likewise.
29584 * reload1.c (elimination_effects): Likewise.
29585 * rtlanal.c (nonzero_bits1): Likewise.
29586 * calls.c (store_one_arg): Likewise. Require the padding to be
29587 known at compile time.
29589 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29590 Alan Hayward <alan.hayward@arm.com>
29591 David Sherwood <david.sherwood@arm.com>
29593 * expr.c (emit_single_push_insn_1): Treat mode sizes as polynomial.
29594 Use plus_constant instead of gen_rtx_PLUS.
29596 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29597 Alan Hayward <alan.hayward@arm.com>
29598 David Sherwood <david.sherwood@arm.com>
29600 * auto-inc-dec.c (set_inc_state): Take the mode size as a poly_int64
29601 rather than an int.
29603 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29604 Alan Hayward <alan.hayward@arm.com>
29605 David Sherwood <david.sherwood@arm.com>
29607 * expr.c (expand_expr_real_1): Use tree_to_poly_uint64
29608 instead of int_size_in_bytes when handling VIEW_CONVERT_EXPRs
29609 via stack temporaries. Treat the mode size as polynomial too.
29611 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29612 Alan Hayward <alan.hayward@arm.com>
29613 David Sherwood <david.sherwood@arm.com>
29615 * expr.c (expand_expr_real_2): When handling conversions involving
29616 unions, apply tree_to_poly_uint64 to the TYPE_SIZE rather than
29617 multiplying int_size_in_bytes by BITS_PER_UNIT. Treat GET_MODE_BISIZE
29618 as a poly_uint64 too.
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 * rtlanal.c (subreg_get_info): Handle polynomial mode sizes.
29626 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29627 Alan Hayward <alan.hayward@arm.com>
29628 David Sherwood <david.sherwood@arm.com>
29630 * combine.c (can_change_dest_mode): Handle polynomial
29631 REGMODE_NATURAL_SIZE.
29632 * expmed.c (store_bit_field_1): Likewise.
29633 * expr.c (store_constructor): Likewise.
29634 * emit-rtl.c (validate_subreg): Operate on polynomial mode sizes
29635 and polynomial REGMODE_NATURAL_SIZE.
29636 (gen_lowpart_common): Likewise.
29637 * reginfo.c (record_subregs_of_mode): Likewise.
29638 * rtlanal.c (read_modify_subreg_p): Likewise.
29640 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29641 Alan Hayward <alan.hayward@arm.com>
29642 David Sherwood <david.sherwood@arm.com>
29644 * internal-fn.c (expand_vector_ubsan_overflow): Handle polynomial
29645 numbers of 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 * match.pd: Cope with polynomial numbers of vector elements.
29653 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29654 Alan Hayward <alan.hayward@arm.com>
29655 David Sherwood <david.sherwood@arm.com>
29657 * fold-const.c (fold_indirect_ref_1): Handle polynomial offsets
29658 in a POINTER_PLUS_EXPR.
29660 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29661 Alan Hayward <alan.hayward@arm.com>
29662 David Sherwood <david.sherwood@arm.com>
29664 * omp-simd-clone.c (simd_clone_subparts): New function.
29665 (simd_clone_init_simd_arrays): Use it instead of TYPE_VECTOR_SUBPARTS.
29666 (ipa_simd_modify_function_body): Likewise.
29668 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29669 Alan Hayward <alan.hayward@arm.com>
29670 David Sherwood <david.sherwood@arm.com>
29672 * tree-vect-generic.c (nunits_for_known_piecewise_op): New function.
29673 (expand_vector_piecewise): Use it instead of TYPE_VECTOR_SUBPARTS.
29674 (expand_vector_addition, add_rshift, expand_vector_divmod): Likewise.
29675 (expand_vector_condition, vector_element): Likewise.
29676 (subparts_gt): New function.
29677 (get_compute_type): Use subparts_gt.
29678 (count_type_subparts): Delete.
29679 (expand_vector_operations_1): Use subparts_gt instead of
29680 count_type_subparts.
29682 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29683 Alan Hayward <alan.hayward@arm.com>
29684 David Sherwood <david.sherwood@arm.com>
29686 * tree-vect-data-refs.c (vect_no_alias_p): Replace with...
29687 (vect_compile_time_alias): ...this new function. Do the calculation
29688 on poly_ints rather than trees.
29689 (vect_prune_runtime_alias_test_list): Update call accordingly.
29691 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29692 Alan Hayward <alan.hayward@arm.com>
29693 David Sherwood <david.sherwood@arm.com>
29695 * tree-vect-slp.c (vect_build_slp_tree_1): Handle polynomial
29697 (vect_schedule_slp_instance): Likewise.
29699 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29700 Alan Hayward <alan.hayward@arm.com>
29701 David Sherwood <david.sherwood@arm.com>
29703 * tree-vect-slp.c (vect_get_and_check_slp_defs): Reject
29704 constant and extern definitions for variable-length vectors.
29705 (vect_get_constant_vectors): Note that the number of units
29706 is known to be constant.
29708 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29709 Alan Hayward <alan.hayward@arm.com>
29710 David Sherwood <david.sherwood@arm.com>
29712 * tree-vect-stmts.c (vectorizable_conversion): Treat the number
29713 of units as polynomial. Choose between WIDE and NARROW based
29716 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29717 Alan Hayward <alan.hayward@arm.com>
29718 David Sherwood <david.sherwood@arm.com>
29720 * tree-vect-stmts.c (simd_clone_subparts): New function.
29721 (vectorizable_simd_clone_call): Use it instead of TYPE_VECTOR_SUBPARTS.
29723 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29724 Alan Hayward <alan.hayward@arm.com>
29725 David Sherwood <david.sherwood@arm.com>
29727 * tree-vect-stmts.c (vectorizable_call): Treat the number of
29728 vectors as polynomial. Use build_index_vector for
29729 IFN_GOMP_SIMD_LANE.
29731 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29732 Alan Hayward <alan.hayward@arm.com>
29733 David Sherwood <david.sherwood@arm.com>
29735 * tree-vect-stmts.c (get_load_store_type): Treat the number of
29736 units as polynomial. Reject VMAT_ELEMENTWISE and VMAT_STRIDED_SLP
29737 for variable-length vectors.
29738 (vectorizable_mask_load_store): Treat the number of units as
29739 polynomial, asserting that it is constant if the condition has
29740 already been enforced.
29741 (vectorizable_store, vectorizable_load): Likewise.
29743 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29744 Alan Hayward <alan.hayward@arm.com>
29745 David Sherwood <david.sherwood@arm.com>
29747 * tree-vect-loop.c (vectorizable_live_operation): Treat the number
29748 of units as polynomial. Punt if we can't tell at compile time
29749 which vector contains the final result.
29751 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29752 Alan Hayward <alan.hayward@arm.com>
29753 David Sherwood <david.sherwood@arm.com>
29755 * tree-vect-loop.c (vectorizable_induction): Treat the number
29756 of units as polynomial. Punt on SLP inductions. Use an integer
29757 VEC_SERIES_EXPR for variable-length integer reductions. Use a
29758 cast of such a series for variable-length floating-point
29761 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29762 Alan Hayward <alan.hayward@arm.com>
29763 David Sherwood <david.sherwood@arm.com>
29765 * tree.h (build_index_vector): Declare.
29766 * tree.c (build_index_vector): New function.
29767 * tree-vect-loop.c (get_initial_defs_for_reduction): Treat the number
29768 of units as polynomial, forcibly converting it to a constant if
29769 vectorizable_reduction has already enforced the condition.
29770 (vect_create_epilog_for_reduction): Likewise. Use build_index_vector
29771 to create a {1,2,3,...} vector.
29772 (vectorizable_reduction): Treat the number of units as polynomial.
29773 Choose vectype_in based on the largest scalar element size rather
29774 than the smallest number of units. Enforce the restrictions
29777 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29778 Alan Hayward <alan.hayward@arm.com>
29779 David Sherwood <david.sherwood@arm.com>
29781 * tree-vect-data-refs.c (vector_alignment_reachable_p): Treat the
29782 number of units as polynomial.
29784 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29785 Alan Hayward <alan.hayward@arm.com>
29786 David Sherwood <david.sherwood@arm.com>
29788 * target.h (vector_sizes, auto_vector_sizes): New typedefs.
29789 * target.def (autovectorize_vector_sizes): Return the vector sizes
29790 by pointer, using vector_sizes rather than a bitmask.
29791 * targhooks.h (default_autovectorize_vector_sizes): Update accordingly.
29792 * targhooks.c (default_autovectorize_vector_sizes): Likewise.
29793 * config/aarch64/aarch64.c (aarch64_autovectorize_vector_sizes):
29795 * config/arc/arc.c (arc_autovectorize_vector_sizes): Likewise.
29796 * config/arm/arm.c (arm_autovectorize_vector_sizes): Likewise.
29797 * config/i386/i386.c (ix86_autovectorize_vector_sizes): Likewise.
29798 * config/mips/mips.c (mips_autovectorize_vector_sizes): Likewise.
29799 * omp-general.c (omp_max_vf): Likewise.
29800 * omp-low.c (omp_clause_aligned_alignment): Likewise.
29801 * optabs-query.c (can_vec_mask_load_store_p): Likewise.
29802 * tree-vect-loop.c (vect_analyze_loop): Likewise.
29803 * tree-vect-slp.c (vect_slp_bb): Likewise.
29804 * doc/tm.texi: Regenerate.
29805 * tree-vectorizer.h (current_vector_size): Change from an unsigned int
29807 * tree-vect-stmts.c (get_vectype_for_scalar_type_and_size): Take
29808 the vector size as a poly_uint64 rather than an unsigned int.
29809 (current_vector_size): Change from an unsigned int to a poly_uint64.
29810 (get_vectype_for_scalar_type): Update accordingly.
29811 * tree.h (build_truth_vector_type): Take the size and number of
29812 units as a poly_uint64 rather than an unsigned int.
29813 (build_vector_type): Add a temporary overload that takes
29814 the number of units as a poly_uint64 rather than an unsigned int.
29815 * tree.c (make_vector_type): Likewise.
29816 (build_truth_vector_type): Take the number of units as a poly_uint64
29817 rather than an unsigned int.
29819 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29820 Alan Hayward <alan.hayward@arm.com>
29821 David Sherwood <david.sherwood@arm.com>
29823 * target.def (get_mask_mode): Take the number of units and length
29824 as poly_uint64s rather than unsigned ints.
29825 * targhooks.h (default_get_mask_mode): Update accordingly.
29826 * targhooks.c (default_get_mask_mode): Likewise.
29827 * config/i386/i386.c (ix86_get_mask_mode): Likewise.
29828 * doc/tm.texi: Regenerate.
29830 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29831 Alan Hayward <alan.hayward@arm.com>
29832 David Sherwood <david.sherwood@arm.com>
29834 * omp-general.h (omp_max_vf): Return a poly_uint64 instead of an int.
29835 * omp-general.c (omp_max_vf): Likewise.
29836 * omp-expand.c (omp_adjust_chunk_size): Update call to omp_max_vf.
29837 (expand_omp_simd): Handle polynomial safelen.
29838 * omp-low.c (omplow_simd_context): Add a default constructor.
29839 (omplow_simd_context::max_vf): Change from int to poly_uint64.
29840 (lower_rec_simd_input_clauses): Update accordingly.
29841 (lower_rec_input_clauses): Likewise.
29843 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29844 Alan Hayward <alan.hayward@arm.com>
29845 David Sherwood <david.sherwood@arm.com>
29847 * tree-vectorizer.h (vect_nunits_for_cost): New function.
29848 * tree-vect-loop.c (vect_model_reduction_cost): Use it.
29849 * tree-vect-slp.c (vect_analyze_slp_cost_1): Likewise.
29850 (vect_analyze_slp_cost): Likewise.
29851 * tree-vect-stmts.c (vect_model_store_cost): Likewise.
29852 (vect_model_load_cost): Likewise.
29854 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29855 Alan Hayward <alan.hayward@arm.com>
29856 David Sherwood <david.sherwood@arm.com>
29858 * tree-vect-slp.c (vect_record_max_nunits, vect_build_slp_tree_1)
29859 (vect_build_slp_tree_2, vect_build_slp_tree): Change max_nunits
29860 from an unsigned int * to a poly_uint64_pod *.
29861 (calculate_unrolling_factor): New function.
29862 (vect_analyze_slp_instance): Use it. Track polynomial max_nunits.
29864 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29865 Alan Hayward <alan.hayward@arm.com>
29866 David Sherwood <david.sherwood@arm.com>
29868 * tree-vectorizer.h (_slp_instance::unrolling_factor): Change
29869 from an unsigned int to a poly_uint64.
29870 (_loop_vec_info::slp_unrolling_factor): Likewise.
29871 (_loop_vec_info::vectorization_factor): Change from an int
29873 (MAX_VECTORIZATION_FACTOR): Bump from 64 to INT_MAX.
29874 (vect_get_num_vectors): New function.
29875 (vect_update_max_nunits, vect_vf_for_cost): Likewise.
29876 (vect_get_num_copies): Use vect_get_num_vectors.
29877 (vect_analyze_data_ref_dependences): Change max_vf from an int *
29878 to an unsigned int *.
29879 (vect_analyze_data_refs): Change min_vf from an int * to a
29881 (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
29882 than an unsigned HOST_WIDE_INT.
29883 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
29884 (vect_analyze_data_ref_dependence): Change max_vf from an int *
29885 to an unsigned int *.
29886 (vect_analyze_data_ref_dependences): Likewise.
29887 (vect_compute_data_ref_alignment): Handle polynomial vf.
29888 (vect_enhance_data_refs_alignment): Likewise.
29889 (vect_prune_runtime_alias_test_list): Likewise.
29890 (vect_shift_permute_load_chain): Likewise.
29891 (vect_supportable_dr_alignment): Likewise.
29892 (dependence_distance_ge_vf): Take the vectorization factor as a
29893 poly_uint64 rather than an unsigned HOST_WIDE_INT.
29894 (vect_analyze_data_refs): Change min_vf from an int * to a
29896 * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Take
29897 vfm1 as a poly_uint64 rather than an int. Make the same change
29898 for the returned bound_scalar.
29899 (vect_gen_vector_loop_niters): Handle polynomial vf.
29900 (vect_do_peeling): Likewise. Update call to
29901 vect_gen_scalar_loop_niters and handle polynomial bound_scalars.
29902 (vect_gen_vector_loop_niters_mult_vf): Assert that the vf must
29904 * tree-vect-loop.c (vect_determine_vectorization_factor)
29905 (vect_update_vf_for_slp, vect_analyze_loop_2): Handle polynomial vf.
29906 (vect_get_known_peeling_cost): Likewise.
29907 (vect_estimate_min_profitable_iters, vectorizable_reduction): Likewise.
29908 (vect_worthwhile_without_simd_p, vectorizable_induction): Likewise.
29909 (vect_transform_loop): Likewise. Use the lowest possible VF when
29910 updating the upper bounds of the loop.
29911 (vect_min_worthwhile_factor): Make static. Return an unsigned int
29912 rather than an int.
29913 * tree-vect-slp.c (vect_attempt_slp_rearrange_stmts): Cope with
29914 polynomial unroll factors.
29915 (vect_analyze_slp_cost_1, vect_analyze_slp_instance): Likewise.
29916 (vect_make_slp_decision): Likewise.
29917 (vect_supported_load_permutation_p): Likewise, and polynomial
29919 (vect_analyze_slp_cost): Handle polynomial vf.
29920 (vect_slp_analyze_node_operations): Likewise.
29921 (vect_slp_analyze_bb_1): Likewise.
29922 (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
29923 than an unsigned HOST_WIDE_INT.
29924 * tree-vect-stmts.c (vectorizable_simd_clone_call, vectorizable_store)
29925 (vectorizable_load): Handle polynomial vf.
29926 * tree-vectorizer.c (simduid_to_vf::vf): Change from an int to
29928 (adjust_simduid_builtins, shrink_simd_arrays): Update accordingly.
29930 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29931 Alan Hayward <alan.hayward@arm.com>
29932 David Sherwood <david.sherwood@arm.com>
29934 * match.pd: Handle bit operations involving three constants
29935 and try to fold one pair.
29937 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29939 * tree-vect-loop-manip.c: Include gimple-fold.h.
29940 (slpeel_make_loop_iterate_ntimes): Add step, final_iv and
29941 niters_maybe_zero parameters. Handle other cases besides a step of 1.
29942 (vect_gen_vector_loop_niters): Add a step_vector_ptr parameter.
29943 Add a path that uses a step of VF instead of 1, but disable it
29945 (vect_do_peeling): Add step_vector, niters_vector_mult_vf_var
29946 and niters_no_overflow parameters. Update calls to
29947 slpeel_make_loop_iterate_ntimes and vect_gen_vector_loop_niters.
29948 Create a new SSA name if the latter choses to use a ste other
29949 than zero, and return it via niters_vector_mult_vf_var.
29950 * tree-vect-loop.c (vect_transform_loop): Update calls to
29951 vect_do_peeling, vect_gen_vector_loop_niters and
29952 slpeel_make_loop_iterate_ntimes.
29953 * tree-vectorizer.h (slpeel_make_loop_iterate_ntimes, vect_do_peeling)
29954 (vect_gen_vector_loop_niters): Update declarations after above changes.
29956 2018-01-02 Michael Meissner <meissner@linux.vnet.ibm.com>
29958 * config/rs6000/rs6000.md (floor<mode>2): Add support for IEEE
29959 128-bit round to integer instructions.
29960 (ceil<mode>2): Likewise.
29961 (btrunc<mode>2): Likewise.
29962 (round<mode>2): Likewise.
29964 2018-01-02 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
29966 * config/rs6000/rs6000-string.c (expand_block_move): Allow the use of
29967 unaligned VSX load/store on P8/P9.
29968 (expand_block_clear): Allow the use of unaligned VSX
29969 load/store on P8/P9.
29971 2018-01-02 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
29973 * config/rs6000/rs6000-p8swap.c (swap_feeds_both_load_and_store):
29975 (rs6000_analyze_swaps): Mark a web unoptimizable if it contains a
29976 swap associated with both a load and a store.
29978 2018-01-02 Andrew Waterman <andrew@sifive.com>
29980 * config/riscv/linux.h (ICACHE_FLUSH_FUNC): New.
29981 * config/riscv/riscv.md (clear_cache): Use it.
29983 2018-01-02 Artyom Skrobov <tyomitch@gmail.com>
29985 * web.c: Remove out-of-date comment.
29987 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
29989 * expr.c (fixup_args_size_notes): Check that any existing
29990 REG_ARGS_SIZE notes are correct, and don't try to re-add them.
29991 (emit_single_push_insn_1): Move stack_pointer_delta adjustment to...
29992 (emit_single_push_insn): ...here.
29994 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
29996 * rtl.h (CONST_VECTOR_ELT): Redefine to const_vector_elt.
29997 (const_vector_encoded_nelts): New function.
29998 (CONST_VECTOR_NUNITS): Redefine to use GET_MODE_NUNITS.
29999 (const_vector_int_elt, const_vector_elt): Declare.
30000 * emit-rtl.c (const_vector_int_elt_1): New function.
30001 (const_vector_elt): Likewise.
30002 * simplify-rtx.c (simplify_immed_subreg): Avoid taking the address
30003 of CONST_VECTOR_ELT.
30005 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
30007 * expr.c: Include rtx-vector-builder.h.
30008 (const_vector_mask_from_tree): Use rtx_vector_builder and operate
30009 directly on the tree encoding.
30010 (const_vector_from_tree): Likewise.
30011 * optabs.c: Include rtx-vector-builder.h.
30012 (expand_vec_perm_var): Use rtx_vector_builder and create a repeating
30013 sequence of "u" values.
30014 * vec-perm-indices.c: Include rtx-vector-builder.h.
30015 (vec_perm_indices_to_rtx): Use rtx_vector_builder and operate
30016 directly on the vec_perm_indices encoding.
30018 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
30020 * doc/rtl.texi (const_vector): Describe new encoding scheme.
30021 * Makefile.in (OBJS): Add rtx-vector-builder.o.
30022 * rtx-vector-builder.h: New file.
30023 * rtx-vector-builder.c: Likewise.
30024 * rtl.h (rtx_def::u2): Add a const_vector field.
30025 (CONST_VECTOR_NPATTERNS): New macro.
30026 (CONST_VECTOR_NELTS_PER_PATTERN): Likewise.
30027 (CONST_VECTOR_DUPLICATE_P): Likewise.
30028 (CONST_VECTOR_STEPPED_P): Likewise.
30029 (CONST_VECTOR_ENCODED_ELT): Likewise.
30030 (const_vec_duplicate_p): Check for a duplicated vector encoding.
30031 (unwrap_const_vec_duplicate): Likewise.
30032 (const_vec_series_p): Check for a non-duplicated vector encoding.
30033 Say that the function only returns true for integer vectors.
30034 * emit-rtl.c: Include rtx-vector-builder.h.
30035 (gen_const_vec_duplicate_1): Delete.
30036 (gen_const_vector): Call gen_const_vec_duplicate instead of
30037 gen_const_vec_duplicate_1.
30038 (const_vec_series_p_1): Operate directly on the CONST_VECTOR encoding.
30039 (gen_const_vec_duplicate): Use rtx_vector_builder.
30040 (gen_const_vec_series): Likewise.
30041 (gen_rtx_CONST_VECTOR): Likewise.
30042 * config/powerpcspe/powerpcspe.c: Include rtx-vector-builder.h.
30043 (swap_const_vector_halves): Take an rtx pointer rather than rtx.
30044 Build a new vector rather than modifying a CONST_VECTOR in-place.
30045 (handle_special_swappables): Update call accordingly.
30046 * config/rs6000/rs6000-p8swap.c: Include rtx-vector-builder.h.
30047 (swap_const_vector_halves): Take an rtx pointer rather than rtx.
30048 Build a new vector rather than modifying a CONST_VECTOR in-place.
30049 (handle_special_swappables): Update call accordingly.
30051 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
30053 * simplify-rtx.c (simplify_const_binary_operation): Use
30054 CONST_VECTOR_ELT instead of XVECEXP.
30056 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
30058 * tree-cfg.c (verify_gimple_assign_ternary): Allow the size of
30059 the selector elements to be different from the data elements
30060 if the selector is a VECTOR_CST.
30061 * tree-vect-stmts.c (vect_gen_perm_mask_any): Use a vector of
30062 ssizetype for the selector.
30064 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
30066 * optabs.c (shift_amt_for_vec_perm_mask): Try using series_p
30067 before testing each element individually.
30068 * tree-vect-generic.c (lower_vec_perm): Likewise.
30070 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
30072 * selftest.h (selftest::vec_perm_indices_c_tests): Declare.
30073 * selftest-run-tests.c (selftest::run_tests): Call it.
30074 * vector-builder.h (vector_builder::operator ==): New function.
30075 (vector_builder::operator !=): Likewise.
30076 * vec-perm-indices.h (vec_perm_indices::series_p): Declare.
30077 (vec_perm_indices::all_from_input_p): New function.
30078 * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
30079 (test_vec_perm_12, selftest::vec_perm_indices_c_tests): Likewise.
30080 * fold-const.c (fold_ternary_loc): Use tree_to_vec_perm_builder
30081 instead of reading the VECTOR_CST directly. Detect whether both
30082 vector inputs are the same before constructing the vec_perm_indices,
30083 and update the number of inputs argument accordingly. Use the
30084 utility functions added above. Only construct sel2 if we need to.
30086 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
30088 * optabs.c (expand_vec_perm_var): Use an explicit encoding for
30089 the broadcast of the low byte.
30090 (expand_mult_highpart): Use an explicit encoding for the permutes.
30091 * optabs-query.c (can_mult_highpart_p): Likewise.
30092 * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Likewise.
30093 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
30094 (vectorizable_bswap): Likewise.
30095 * tree-vect-data-refs.c (vect_grouped_store_supported): Use an
30096 explicit encoding for the power-of-2 permutes.
30097 (vect_permute_store_chain): Likewise.
30098 (vect_grouped_load_supported): Likewise.
30099 (vect_permute_load_chain): Likewise.
30101 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
30103 * vec-perm-indices.h (vec_perm_indices_to_tree): Declare.
30104 * vec-perm-indices.c (vec_perm_indices_to_tree): New function.
30105 * tree-ssa-forwprop.c (simplify_vector_constructor): Use it.
30106 * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
30107 * tree-vect-stmts.c (vectorizable_bswap): Likewise.
30108 (vect_gen_perm_mask_any): Likewise.
30110 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
30112 * int-vector-builder.h: New file.
30113 * vec-perm-indices.h: Include int-vector-builder.h.
30114 (vec_perm_indices): Redefine as an int_vector_builder.
30115 (auto_vec_perm_indices): Delete.
30116 (vec_perm_builder): Redefine as a stand-alone class.
30117 (vec_perm_indices::vec_perm_indices): New function.
30118 (vec_perm_indices::clamp): Likewise.
30119 * vec-perm-indices.c: Include fold-const.h and tree-vector-builder.h.
30120 (vec_perm_indices::new_vector): New function.
30121 (vec_perm_indices::new_expanded_vector): Update for new
30122 vec_perm_indices class.
30123 (vec_perm_indices::rotate_inputs): New function.
30124 (vec_perm_indices::all_in_range_p): Operate directly on the
30125 encoded form, without computing elided elements.
30126 (tree_to_vec_perm_builder): Operate directly on the VECTOR_CST
30127 encoding. Update for new vec_perm_indices class.
30128 * optabs.c (expand_vec_perm_const): Create a vec_perm_indices for
30129 the given vec_perm_builder.
30130 (expand_vec_perm_var): Update vec_perm_builder constructor.
30131 (expand_mult_highpart): Use vec_perm_builder instead of
30132 auto_vec_perm_indices.
30133 * optabs-query.c (can_mult_highpart_p): Use vec_perm_builder and
30134 vec_perm_indices instead of auto_vec_perm_indices. Use a single
30135 or double series encoding as appropriate.
30136 * fold-const.c (fold_ternary_loc): Use vec_perm_builder and
30137 vec_perm_indices instead of auto_vec_perm_indices.
30138 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
30139 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
30140 (vect_permute_store_chain): Likewise.
30141 (vect_grouped_load_supported): Likewise.
30142 (vect_permute_load_chain): Likewise.
30143 (vect_shift_permute_load_chain): Likewise.
30144 * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
30145 (vect_transform_slp_perm_load): Likewise.
30146 (vect_schedule_slp_instance): Likewise.
30147 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
30148 (vectorizable_mask_load_store): Likewise.
30149 (vectorizable_bswap): Likewise.
30150 (vectorizable_store): Likewise.
30151 (vectorizable_load): Likewise.
30152 * tree-vect-generic.c (lower_vec_perm): Use vec_perm_builder and
30153 vec_perm_indices instead of auto_vec_perm_indices. Use
30154 tree_to_vec_perm_builder to read the vector from a tree.
30155 * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Take a
30156 vec_perm_builder instead of a vec_perm_indices.
30157 (have_whole_vector_shift): Use vec_perm_builder and
30158 vec_perm_indices instead of auto_vec_perm_indices. Leave the
30159 truncation to calc_vec_perm_mask_for_shift.
30160 (vect_create_epilog_for_reduction): Likewise.
30161 * config/aarch64/aarch64.c (expand_vec_perm_d::perm): Change
30162 from auto_vec_perm_indices to vec_perm_indices.
30163 (aarch64_expand_vec_perm_const_1): Use rotate_inputs on d.perm
30164 instead of changing individual elements.
30165 (aarch64_vectorize_vec_perm_const): Use new_vector to install
30166 the vector in d.perm.
30167 * config/arm/arm.c (expand_vec_perm_d::perm): Change
30168 from auto_vec_perm_indices to vec_perm_indices.
30169 (arm_expand_vec_perm_const_1): Use rotate_inputs on d.perm
30170 instead of changing individual elements.
30171 (arm_vectorize_vec_perm_const): Use new_vector to install
30172 the vector in d.perm.
30173 * config/powerpcspe/powerpcspe.c (rs6000_expand_extract_even):
30174 Update vec_perm_builder constructor.
30175 (rs6000_expand_interleave): Likewise.
30176 * config/rs6000/rs6000.c (rs6000_expand_extract_even): Likewise.
30177 (rs6000_expand_interleave): Likewise.
30179 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
30181 * optabs-query.c (can_vec_perm_var_p): Check whether lowering
30182 to qimode could truncate the indices.
30183 * optabs.c (expand_vec_perm_var): Likewise.
30185 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
30187 * Makefile.in (OBJS): Add vec-perm-indices.o.
30188 * vec-perm-indices.h: New file.
30189 * vec-perm-indices.c: Likewise.
30190 * target.h (vec_perm_indices): Replace with a forward class
30192 (auto_vec_perm_indices): Move to vec-perm-indices.h.
30193 * optabs.h: Include vec-perm-indices.h.
30194 (expand_vec_perm): Delete.
30195 (selector_fits_mode_p, expand_vec_perm_var): Declare.
30196 (expand_vec_perm_const): Declare.
30197 * target.def (vec_perm_const_ok): Replace with...
30198 (vec_perm_const): ...this new hook.
30199 * doc/tm.texi.in (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Replace with...
30200 (TARGET_VECTORIZE_VEC_PERM_CONST): ...this new hook.
30201 * doc/tm.texi: Regenerate.
30202 * optabs.def (vec_perm_const): Delete.
30203 * doc/md.texi (vec_perm_const): Likewise.
30204 (vec_perm): Refer to TARGET_VECTORIZE_VEC_PERM_CONST.
30205 * expr.c (expand_expr_real_2): Use expand_vec_perm_const rather than
30206 expand_vec_perm for constant permutation vectors. Assert that
30207 the mode of variable permutation vectors is the integer equivalent
30208 of the mode that is being permuted.
30209 * optabs-query.h (selector_fits_mode_p): Declare.
30210 * optabs-query.c: Include vec-perm-indices.h.
30211 (selector_fits_mode_p): New function.
30212 (can_vec_perm_const_p): Check whether targetm.vectorize.vec_perm_const
30213 is defined, instead of checking whether the vec_perm_const_optab
30214 exists. Use targetm.vectorize.vec_perm_const instead of
30215 targetm.vectorize.vec_perm_const_ok. Check whether the indices
30216 fit in the vector mode before using a variable permute.
30217 * optabs.c (shift_amt_for_vec_perm_mask): Take a mode and a
30218 vec_perm_indices instead of an rtx.
30219 (expand_vec_perm): Replace with...
30220 (expand_vec_perm_const): ...this new function. Take the selector
30221 as a vec_perm_indices rather than an rtx. Also take the mode of
30222 the selector. Update call to shift_amt_for_vec_perm_mask.
30223 Use targetm.vectorize.vec_perm_const instead of vec_perm_const_optab.
30224 Use vec_perm_indices::new_expanded_vector to expand the original
30225 selector into bytes. Check whether the indices fit in the vector
30226 mode before using a variable permute.
30227 (expand_vec_perm_var): Make global.
30228 (expand_mult_highpart): Use expand_vec_perm_const.
30229 * fold-const.c: Includes vec-perm-indices.h.
30230 * tree-ssa-forwprop.c: Likewise.
30231 * tree-vect-data-refs.c: Likewise.
30232 * tree-vect-generic.c: Likewise.
30233 * tree-vect-loop.c: Likewise.
30234 * tree-vect-slp.c: Likewise.
30235 * tree-vect-stmts.c: Likewise.
30236 * config/aarch64/aarch64-protos.h (aarch64_expand_vec_perm_const):
30238 * config/aarch64/aarch64-simd.md (vec_perm_const<mode>): Delete.
30239 * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const)
30240 (aarch64_vectorize_vec_perm_const_ok): Fuse into...
30241 (aarch64_vectorize_vec_perm_const): ...this new function.
30242 (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
30243 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
30244 * config/arm/arm-protos.h (arm_expand_vec_perm_const): Delete.
30245 * config/arm/vec-common.md (vec_perm_const<mode>): Delete.
30246 * config/arm/arm.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
30247 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
30248 (arm_expand_vec_perm_const, arm_vectorize_vec_perm_const_ok): Merge
30250 (arm_vectorize_vec_perm_const): ...this new function. Explicitly
30251 check for NEON modes.
30252 * config/i386/i386-protos.h (ix86_expand_vec_perm_const): Delete.
30253 * config/i386/sse.md (VEC_PERM_CONST, vec_perm_const<mode>): Delete.
30254 * config/i386/i386.c (ix86_expand_vec_perm_const_1): Update comment.
30255 (ix86_expand_vec_perm_const, ix86_vectorize_vec_perm_const_ok): Merge
30257 (ix86_vectorize_vec_perm_const): ...this new function. Incorporate
30258 the old VEC_PERM_CONST conditions.
30259 * config/ia64/ia64-protos.h (ia64_expand_vec_perm_const): Delete.
30260 * config/ia64/vect.md (vec_perm_const<mode>): Delete.
30261 * config/ia64/ia64.c (ia64_expand_vec_perm_const)
30262 (ia64_vectorize_vec_perm_const_ok): Merge into...
30263 (ia64_vectorize_vec_perm_const): ...this new function.
30264 * config/mips/loongson.md (vec_perm_const<mode>): Delete.
30265 * config/mips/mips-msa.md (vec_perm_const<mode>): Delete.
30266 * config/mips/mips-ps-3d.md (vec_perm_constv2sf): Delete.
30267 * config/mips/mips-protos.h (mips_expand_vec_perm_const): Delete.
30268 * config/mips/mips.c (mips_expand_vec_perm_const)
30269 (mips_vectorize_vec_perm_const_ok): Merge into...
30270 (mips_vectorize_vec_perm_const): ...this new function.
30271 * config/powerpcspe/altivec.md (vec_perm_constv16qi): Delete.
30272 * config/powerpcspe/paired.md (vec_perm_constv2sf): Delete.
30273 * config/powerpcspe/spe.md (vec_perm_constv2si): Delete.
30274 * config/powerpcspe/vsx.md (vec_perm_const<mode>): Delete.
30275 * config/powerpcspe/powerpcspe-protos.h (altivec_expand_vec_perm_const)
30276 (rs6000_expand_vec_perm_const): Delete.
30277 * config/powerpcspe/powerpcspe.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK):
30279 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
30280 (altivec_expand_vec_perm_const_le): Take each operand individually.
30281 Operate on constant selectors rather than rtxes.
30282 (altivec_expand_vec_perm_const): Likewise. Update call to
30283 altivec_expand_vec_perm_const_le.
30284 (rs6000_expand_vec_perm_const): Delete.
30285 (rs6000_vectorize_vec_perm_const_ok): Delete.
30286 (rs6000_vectorize_vec_perm_const): New function.
30287 (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
30288 an element count and rtx array.
30289 (rs6000_expand_extract_even): Update call accordingly.
30290 (rs6000_expand_interleave): Likewise.
30291 * config/rs6000/altivec.md (vec_perm_constv16qi): Delete.
30292 * config/rs6000/paired.md (vec_perm_constv2sf): Delete.
30293 * config/rs6000/vsx.md (vec_perm_const<mode>): Delete.
30294 * config/rs6000/rs6000-protos.h (altivec_expand_vec_perm_const)
30295 (rs6000_expand_vec_perm_const): Delete.
30296 * config/rs6000/rs6000.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
30297 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
30298 (altivec_expand_vec_perm_const_le): Take each operand individually.
30299 Operate on constant selectors rather than rtxes.
30300 (altivec_expand_vec_perm_const): Likewise. Update call to
30301 altivec_expand_vec_perm_const_le.
30302 (rs6000_expand_vec_perm_const): Delete.
30303 (rs6000_vectorize_vec_perm_const_ok): Delete.
30304 (rs6000_vectorize_vec_perm_const): New function. Remove stray
30305 reference to the SPE evmerge intructions.
30306 (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
30307 an element count and rtx array.
30308 (rs6000_expand_extract_even): Update call accordingly.
30309 (rs6000_expand_interleave): Likewise.
30310 * config/sparc/sparc.md (vec_perm_constv8qi): Delete in favor of...
30311 * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): ...this
30313 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
30315 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
30317 * optabs.c (expand_vec_perm_1): Assert that SEL has an integer
30318 vector mode and that that mode matches the mode of the data
30320 (expand_vec_perm): Split handling of non-CONST_VECTOR selectors
30321 out into expand_vec_perm_var. Do all CONST_VECTOR handling here,
30322 directly using expand_vec_perm_1 when forcing selectors into
30324 (expand_vec_perm_var): New function, split out from expand_vec_perm.
30326 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
30328 * optabs-query.h (can_vec_perm_p): Delete.
30329 (can_vec_perm_var_p, can_vec_perm_const_p): Declare.
30330 * optabs-query.c (can_vec_perm_p): Split into...
30331 (can_vec_perm_var_p, can_vec_perm_const_p): ...these two functions.
30332 (can_mult_highpart_p): Use can_vec_perm_const_p to test whether a
30333 particular selector is valid.
30334 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
30335 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
30336 (vect_grouped_load_supported): Likewise.
30337 (vect_shift_permute_load_chain): Likewise.
30338 * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
30339 (vect_transform_slp_perm_load): Likewise.
30340 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
30341 (vectorizable_bswap): Likewise.
30342 (vect_gen_perm_mask_checked): Likewise.
30343 * fold-const.c (fold_ternary_loc): Likewise. Don't take
30344 implementations of variable permutation vectors into account
30345 when deciding which selector to use.
30346 * tree-vect-loop.c (have_whole_vector_shift): Don't check whether
30347 vec_perm_const_optab is supported; instead use can_vec_perm_const_p
30348 with a false third argument.
30349 * tree-vect-generic.c (lower_vec_perm): Use can_vec_perm_const_p
30350 to test whether the constant selector is valid and can_vec_perm_var_p
30351 to test whether a variable selector is valid.
30353 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
30355 * optabs-query.h (can_vec_perm_p): Take a const vec_perm_indices *.
30356 * optabs-query.c (can_vec_perm_p): Likewise.
30357 * fold-const.c (fold_vec_perm): Take a const vec_perm_indices &
30358 instead of vec_perm_indices.
30359 * tree-vectorizer.h (vect_gen_perm_mask_any): Likewise,
30360 (vect_gen_perm_mask_checked): Likewise,
30361 * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise,
30362 (vect_gen_perm_mask_checked): Likewise,
30364 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
30366 * optabs-query.h (qimode_for_vec_perm): Declare.
30367 * optabs-query.c (can_vec_perm_p): Split out qimode search to...
30368 (qimode_for_vec_perm): ...this new function.
30369 * optabs.c (expand_vec_perm): Use qimode_for_vec_perm.
30371 2018-01-02 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
30373 * rtlanal.c (canonicalize_condition): Return 0 if final rtx
30374 does not have a conditional at the top.
30376 2018-01-02 Richard Biener <rguenther@suse.de>
30378 * ipa-inline.c (big_speedup_p): Fix expression.
30380 2018-01-02 Jan Hubicka <hubicka@ucw.cz>
30383 * config/i386/x86-tune-costs.h: Increase cost of integer load costs
30386 2018-01-02 Jan Hubicka <hubicka@ucw.cz>
30390 * x86-tune-costs.h (generic_cost): Reduce cost of FDIV 20->17,
30391 cost of sqrt 20->14, DIVSS 18->13, DIVSD 32->17, SQRtSS 30->14
30392 and SQRTsD 58->18, cond_not_taken_branch_cost. 2->1. Increase
30393 cond_taken_branch_cost 3->4.
30395 2018-01-01 Jakub Jelinek <jakub@redhat.com>
30397 PR tree-optimization/83581
30398 * tree-loop-distribution.c (pass_loop_distribution::execute): Return
30399 TODO_cleanup_cfg if any changes have been made.
30401 PR middle-end/83608
30402 * expr.c (store_expr_with_bounds): Use simplify_gen_subreg instead of
30403 convert_modes if target mode has the right side, but different mode
30406 PR middle-end/83609
30407 * expr.c (expand_assignment): Fix up a typo in simplify_gen_subreg
30408 last argument when extracting from CONCAT. If either from_real or
30409 from_imag is NULL, use expansion through memory. If result is not
30410 a CONCAT and simplify_gen_subreg fails, try to simplify_gen_subreg
30411 the parts directly to inner mode, if even that fails, use expansion
30414 PR middle-end/83623
30415 * expmed.c (expand_shift_1): For 2-byte rotates by BITS_PER_UNIT,
30416 check for bswap in mode rather than HImode and use that in expand_unop
30419 Copyright (C) 2018 Free Software Foundation, Inc.
30421 Copying and distribution of this file, with or without modification,
30422 are permitted in any medium without royalty provided the copyright
30423 notice and this notice are preserved.