1 2018-11-05 Robin Dapp <rdapp@linux.ibm.com>
3 * config/s390/s390.md: QImode and HImode for load on condition.
5 2018-11-05 Robin Dapp <rdapp@linux.ibm.com>
7 * config/s390/predicates.md: Fix typo.
8 * config/s390/s390.md: Allow immediates for load on condition.
10 2018-11-05 Martin Liska <mliska@suse.cz>
12 * alloc-pool.h (struct pool_usage): Use SIZE_AMOUNT.
13 * bitmap.h (struct bitmap_usage): Likewise.
14 * ggc-common.c (SCALE): Remove.
16 (struct ggc_usage): Use SIZE_AMOUNT. And update
18 * ggc-page.c (SCALE): Remove.
20 (ggc_print_statistics): Use SIZE_AMOUNT.
21 * gimple.h (SCALE): Remove.
23 * input.c (ONE_K): Remove.
26 (STAT_LABEL): Likewise.
27 (FORMAT_AMOUNT): Likewise.
28 (dump_line_table_statistics): Use SIZE_AMOUNT.
29 * mem-stats.h (struct mem_usage): Likewise.
30 * rtl.c (dump_rtx_statistics): Likewise.
31 (rtx_alloc_counts): Change type to size_t.
32 (rtx_alloc_sizes): Likewise.
34 (dump_rtx_statistics): Sort first based on counts.
35 * tree.c (tree_nodes_cmp): New.
36 (tree_codes_cmp): New.
37 (dump_tree_statistics): Sort first based on counts.
38 * system.h (ONE_K): New.
40 (SIZE_SCALE): Likewise.
41 (SIZE_LABEL): Likewise.
42 (SIZE_AMOUNT): Likewise.
43 * tree-cfg.c (dump_cfg_stats): Use SIZE_AMOUNT.
44 * tree-dfa.c (dump_dfa_stats): Likewise.
45 * tree-phinodes.c (phinodes_print_statistics): Likewise.
46 * tree-ssanames.c (ssanames_print_statistics): Likewise.
47 * tree.c (dump_tree_statistics): Likewise.
48 * vec.c (struct vec_usage): Likewise.
49 * trans-mem.c (tm_mangle): Enlarge buffer in order to not
50 trigger a -Werror=format-overflow with
51 --enable-gather-detailed-stats.
53 2018-11-05 Martin Liska <mliska@suse.cz>
55 * mem-stats.h (mem_alloc_description::release_instance_overhead):
57 * vec.c (struct vec_usage): Register m_element_size.
58 (vec_prefix::register_overhead): New arguments: elements and
60 (vec_prefix::release_overhead): Subtract elements.
61 * vec.h (struct vec_prefix): Change signature.
62 (va_heap::reserve): Pass proper arguments.
63 (va_heap::release): Likewise.
65 2018-11-05 Martin Liska <mliska@suse.cz>
67 * mem-stats.h (mem_alloc_description::get_list): Fix GNU coding
71 2018-11-05 Richard Biener <rguenther@suse.de>
73 * tree-scalar-evolution.h (final_value_replacement_loop): Update
75 * tree-scalar-evolution.c (final_value_replacement_loop): Return
76 whether anything was done.
77 (scev_const_prop): Remove constant propagation part, fold
79 * tree-ssa-loop.c (pass_scev_cprop::execute): ... here.
80 (pass_data_scev_cprop): TODO_cleanup_cfg is now done
83 2018-11-05 Jakub Jelinek <jakub@redhat.com>
85 PR tree-optimization/87859
86 * gimple-ssa-store-merging.c (struct merged_store_group): Add
87 only_constants and first_nonmergeable_order members.
88 (merged_store_group::merged_store_group): Initialize them.
89 (merged_store_group::do_merge): Clear only_constants member if
90 adding something other than INTEGER_CST store.
91 (imm_store_chain_info::coalesce_immediate_stores): Don't merge
92 stores with order >= first_nonmergeable_order. Use
93 merged_store->only_constants instead of always recomputing it.
94 Set merged_store->first_nonmergeable_order if we've skipped any
95 stores. Attempt to merge overlapping INTEGER_CST stores that
96 we would otherwise skip.
99 * match.pd (X + Y < X): Don't optimize if TYPE_OVERFLOW_SANITIZED.
101 2018-11-05 Xuepeng Guo <xuepeng.guo@intel.com>
104 * config/i386/emmintrin.h (__v16qs): New to cope with option
106 (_mm_cmpeq_epi8): Replace __v16qi with __v16qs.
107 (_mm_cmplt_epi8): Likewise.
108 (_mm_cmpgt_epi8): Likewise.
110 2018-11-05 Richard Biener <rguenther@suse.de>
112 PR rtl-optimization/87852
113 * fwprop.c (use_killed_between): Only consider single-defs of the
114 use whose definition statement dominates the use.
116 2018-11-05 Martin Liska <mliska@suse.cz>
119 * doc/invoke.texi: Remove options that are
120 not disabled with -Os.
122 2018-11-05 Martin Liska <mliska@suse.cz>
125 * doc/extend.texi: Update constrain about the last argument
126 of __builtin_expect_with_probability.
128 2018-11-05 Martin Liska <mliska@suse.cz>
131 * predict.c (expr_expected_value_1): Verify
132 that last argument is a real constants and emit
135 2018-11-05 Martin Liska <mliska@suse.cz>
137 PR gcov-profile/77698
138 * ipa-profile.c (ipa_profile): Adjust hotness threshold
141 2018-11-04 Bernd Edlinger <bernd.edlinger@hotmail.de>
143 PR tree-optimization/86572
144 * builtins.c (c_strlen): Handle negative offsets in a safe way.
146 2018-11-04 Bernd Edlinger <bernd.edlinger@hotmail.de>
148 PR tree-optimization/87672
149 * gimple-fold.c (gimple_fold_builtin_stxcpy_chk): Gimplify.
150 * tree-ssa-strlen.c (handle_builtin_strcat): Adjust object size.
152 2018-11-04 Uros Bizjak <ubizjak@gmail.com>
155 * cfgexpand.c (pass_expand::execute): Move the call to
156 finish_eh_generation in front of the call to expand_stack_alignment.
158 2018-11-04 Venkataramanan Kumar <venkataramanan.kumar@amd.com>
160 * common/config/i386/i386-common.c (processor_alias_table): Add
162 * config.gcc (i[34567]86-*-linux* | ...): Add znver2.
163 (case ${target}): Add znver2.
164 * config/i386/driver-i386.c: (host_detect_local_cpu): Let
165 -march=native recognize znver2 processors.
166 * config/i386/i386-c.c (ix86_target_macros_internal): Add znver2.
167 * config/i386/i386.c (m_znver2): New definition.
168 (m_ZNVER): New definition.
169 (m_AMD_MULTIPLE): Includes m_znver2.
170 (processor_cost_table): Add znver2 entry.
171 (processor_target_table): Add znver2 entry.
172 (get_builtin_code_for_version): Set priority for
174 (processor_model): Add M_AMDFAM17H_ZNVER2.
175 (arch_names_table): Ditto.
176 (ix86_reassociation_width): Include znver2.
177 * config/i386/i386.h (TARGET_znver2): New definition.
178 (struct ix86_size_cost): Add TARGET_ZNVER2.
179 (enum processor_type): Add PROCESSOR_ZNVER2.
180 * config/i386/i386.md (define_attr "cpu"): Add znver2.
181 * config/i386/x86-tune-costs.h: (processor_costs) Add znver2 costs.
182 * config/i386/x86-tune-sched.c: (ix86_issue_rate): Add znver2.
183 (ix86_adjust_cost): Add znver2.
184 * config/i386/x86-tune.def: Replace m_ZNVER1 by m_ZNVER.
185 * gcc/doc/extend.texi: Add details about znver2.
186 * gcc/doc/invoke.texi: Add details about znver2.
188 2018-11-03 Sandra Loosemore <sandra@codesourcery.com>
192 * config/nios2/nios2.c (nios2_rtx_costs): Recognize <mul>sidi3
195 2018-11-02 Aaron Sawdey <acsawdey@linux.ibm.com>
197 * config/rs6000/rs6000-string.c (expand_strncmp_gpr_sequence): Pay
198 attention to TARGET_AVOID_XFORM and BYTES_BIG_ENDIAN.
200 2018-11-02 Richard Earnshaw <rearnsha@arm.com>
202 * config/aarch64/aarch64.c ((aarch64_override_options): Disable
203 shrink-wrapping when -mtrack-speculation.
205 2018-11-02 Richard Biener <rguenther@suse.de>
207 * tree-ssa-coalesce.c (struct coalesce_list): Add obstack member.
208 (pop_cost_one_pair): Do not free pair.
209 (pop_best_coalesce): Likewise.
210 (create_coalesce_list): Initialize obstack.
211 (delete_coalesce_list): Free obstack.
212 (find_coalesce_pair): Obstack-allocate coalesce pairs.
213 (add_cost_one_coalesce): Likewise.
214 (struct live_track): Remove bitmap pointer indirections.
215 (new_live_track): Adjust.
216 (delete_live_track): Likewise.
217 (live_track_remove_partition): Likewise.
218 (live_track_add_partition): Likewise.
219 (live_track_live_p): Likewise.
220 (live_track_process_def): Likewise.
221 (live_track_clear_base_vars): Likewise.
223 2018-11-02 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
225 * configure.ac (gcc_cv_as_sparc_register_op): Remove.
226 * configure: Regenerate.
227 * config.in: Regenerate.
228 * config/sparc/sparc.c (sparc_output_scratch_registers): Remove
229 HAVE_AS_REGISTER_PSEUDO_OP guard.
230 * config/sparc/sparc.h (ASM_ARCH64_SPEC): Remove
231 !HAVE_AS_REGISTER_PSEUDO_OP support.
232 (ASM_DECLARE_REGISTER_GLOBAL): Remove HAVE_AS_REGISTER_PSEUDO_OP
235 2018-11-02 Richard Biener <rguenther@suse.de>
237 * dwarf2out.c (build_abbrev_table): Guard lookup_external_ref call
240 2018-11-02 Richard Biener <rguenther@suse.de>
242 PR tree-optimization/87776
243 * tree-ssa-sccvn.c (do_rpo_vn): Do not mark backedges
244 executable when iterating but running into rpo-vn-max-loop-depth
245 and not eliding the iteration.
247 2018-11-30 Jan Hubicka <jh@suse.cz>
249 * tree.c (free_lang_data_in_decl): Free TREE_TYPE and alignment of
252 2018-11-01 Aaron Sawdey <acsawdey@linux.ibm.com>
254 * config/rs6000/rs6000-protos.h (rs6000_address_for_fpconvert): Remove
256 * config/rs6000/rs6000.c (rs6000_force_indexed_or_indirect_mem):
257 Combine with rs6000_address_for_fpconvert.
258 (rs6000_address_for_fpconvert): Combine with
259 rs6000_force_indexed_or_indirect_mem.
260 (rs6000_expand_vector_init): Change function call from
261 rs6000_address_for_fpconvert to rs6000_force_indexed_or_indirect_mem.
262 * config/rs6000/rs6000.md (floatsi<mode>2_lfiwax): Change call from
263 rs6000_address_for_fpconvert to rs6000_force_indexed_or_indirect_mem.
264 (floatsi<mode>2_lfiwax_mem): Ditto.
265 (floatunssi<mode>2_lfiwzx): Ditto.
266 (floatunssi<mode>2_lfiwzx_mem): Ditto.
267 (float<QHI:mode><FP_ISA3:mode>2): Ditto.
268 (floatuns<QHI:mode><FP_ISA3:mode>2): Ditto.
269 (fix_trunc<mode>si2_stfiwx): Ditto.
270 (fixuns_trunc<mode>si2_stfiwx): Ditto.
271 (float_<mode>si2_hw): Ditto.
272 (floatuns_<mode>si2_hw): Ditto.
273 * config/rs6000/vsx.md (*vsx_extract_si): Ditto.
274 (vsx_splat_<mode>): Ditto.
276 2018-11-01 Joseph Myers <joseph@codesourcery.com>
278 * configure.ac (gcc_cv_as_ia64_ltoffx_ldxmov_relocs): Add newline
279 at end of assembler input text.
280 * configure: Regenerate.
282 2018-11-01 Jakub Jelinek <jakub@redhat.com>
284 PR tree-optimization/87826
285 * gimple-ssa-store-merging.c (do_shift_rotate): Punt if count is
286 negative or larger or equal to type's precision.
288 2018-10-31 Alexandre Oliva <aoliva@redhat.com>
290 * opts.c (default_options_table): Do not enable
291 OPT_fdelayed_branch at -Og.
292 * doc/invoke.texi (-fdelayed-branch): Document it.
294 2018-10-31 Richard Henderson <richard.henderson@linaro.org>
296 * optabs-libfuncs.c (build_libfunc_function_visibility):
297 New, split out from...
298 (build_libfunc_function): ... here.
299 (init_one_libfunc_visibility): New, split out from ...
300 (init_one_libfunc): ... here.
302 * config/aarch64/atomics.md (aarch64_atomic_<ATOMIC_LDOP><ALLI>_lse):
303 scratch register need not be early-clobber. Document the reason
304 why we cannot use ST<OP>.
306 2018-10-31 Joseph Myers <joseph@codesourcery.com>
309 * configure.ac: Remove AC_PREREQ. Use AC_LANG_SOURCE. Use single
310 line for second argument of AC_DEFINE_UNQUOTED.
311 * doc/install.texi (Tools/packages necessary for modifying GCC):
312 Update to autoconf 2.69 and automake 1.15.1.
313 * aclocal.m4, config.in, configure: Regenerate.
315 2018-10-31 Pat Haugen <pthaugen@us.ibm.com>
317 * tree-ssa-loop-ivcanon.c (try_peel_loop): Fix typo and remove dead
320 2018-10-31 Martin Liska <mliska@suse.cz>
323 * common/config/aarch64/aarch64-common.c (aarch64_parse_extension):
324 Add new argument invalid_extension.
325 (aarch64_get_all_extension_candidates): New function.
326 (aarch64_rewrite_selected_cpu): Add NULL to function call.
327 * config/aarch64/aarch64-protos.h (aarch64_parse_extension): Add
329 (aarch64_get_all_extension_candidates): New function.
330 * config/aarch64/aarch64.c (aarch64_parse_arch): Add new
331 argument invalid_extension.
332 (aarch64_parse_cpu): Likewise.
333 (aarch64_print_hint_for_extensions): New function.
334 (aarch64_validate_mcpu): Provide hint about invalid extension.
335 (aarch64_validate_march): Likewise.
336 (aarch64_handle_attr_arch): Pass new argument.
337 (aarch64_handle_attr_cpu): Provide hint about invalid extension.
338 (aarch64_handle_attr_isa_flags): Likewise.
340 2018-10-31 Richard Biener <rguenther@suse.de>
344 * tree-outof-ssa.c (insert_backedge_copies): Restrict
345 copy generation to useful cases. Place the copy before
346 the definition of the backedge value when possible.
348 2018-10-31 Claudiu Zissulescu <claziss@synopsys.com>
350 * config/arc/arc-arch.h (ARC_TUNE_ARC7XX): New tune value.
351 * config/arc/arc.c (arc_active_insn): New function.
352 (check_store_cacheline_hazard): Likewise.
353 (workaround_arc_anomaly): Use check_store_cacheline_hazard.
354 (arc_override_options): Disable delay slot scheduler for older
356 (arc_store_addr_hazard_p): New implementation, old one renamed to
358 (arc_store_addr_hazard_internal_p): Renamed.
359 (arc_reorg): Don't combine into brcc instructions which are part
360 of hardware hazard solution.
361 * config/arc/arc.md (attr tune): Consider new arc7xx tune value.
362 (tune_arc700): Likewise.
363 * config/arc/arc.opt (arc7xx): New tune value.
364 * config/arc/arc700.md: Improve A7 scheduler.
366 2018-10-31 Claudiu Zissulescu <claziss@synopsys.com>
368 * config/arc/arc.c (arc_override_options): Remove
369 TARGET_COMPACT_CASESI.
370 * config/arc/arc.h (ASM_OUTPUT_ADDR_DIFF_ELT): Update.
371 (CASE_VECTOR_MODE): Likewise.
372 (CASE_VECTOR_PC_RELATIVE): Likewise.
373 (CASE_VECTOR_SHORTEN_MODE): Likewise.
374 (CASE_VECTOR_SHORTEN_MODE1): Delete.
375 (ADDR_VEC_ALIGN): Update.
376 (ASM_OUTPUT_CASE_LABEL): Undefine.
377 (ASM_OUTPUT_BEFORE_CASE_LABEL): Undefine.
378 (TARGET_BI_BIH): Define.
379 (DEFAULT_BRANCH_INDEX): Likewise.
380 * config/arc/arc.md (casesi): Rework to accept BI/BIH
381 instructions, remove compact_casesi use case.
382 (casesi_compact_jump): Remove.
383 (casesi_dispatch): New pattern.
384 * config/arc/arc.opt: Add mbranch-index option. Deprecate
385 compact_casesi option.
386 * doc/invoke.texi: Document mbranch-index option.
388 2018-10-31 Claudiu Zissulescu <claziss@synopsys.com>
390 * config/arc/arc.c (arc_get_tp): Remove function.
391 (arc_emit_call_tls_get_addr): Likewise.
392 (arc_call_tls_get_addr): New function.
393 (arc_legitimize_tls_address): Make use of arc_call_tls_get_addr.
394 * config/arc/arc.md (tls_load_tp_soft): Remove.
395 (tls_gd_get_addr): Likewise.
397 2018-10-31 Claudiu Zissulescu <claziss@synopsys.com>
399 * config/arc/arc.md (mulsi3): Remove call to mulsi_600_lib.
400 (mulsi3_600_lib): Remove pattern.
401 (umulsi3_highpart_600_lib_le): Likewise.
402 (umulsi3_highpart): Remove call to umulsi3_highpart_600_lib_le.
403 (umulsidi3): Remove call to umulsidi3_600_lib.
404 (umulsidi3_600_lib): Remove pattern.
405 (peephole2): Remove peephole using the above deprecated patterns.
407 2018-10-31 Thomas Preud'homme <thomas.preudhomme@linaro.org>
410 * config/arm/arm.c (arm_option_check_internal): Disable the combined
411 use of -mslow-flash-data and -mword-relocations.
412 (arm_option_override): Enable -mword-relocations if -fpic or -fPIC.
413 * config/arm/arm.md (SYMBOL_REF MOVT splitter): Stop checking for
415 * doc/invoke.texi (-mword-relocations): Mention conflict with
417 (-mslow-flash-data): Reciprocally.
419 2018-10-31 Richard Henderson <richard.henderson@linaro.org>
421 * config/aarch64/aarch64.c (aarch64_hard_regno_mode_ok): Force
422 16-byte modes held in GP registers to use an even regno.
424 * config/aarch64/aarch64.c (aarch64_emit_bic): Remove.
425 (aarch64_atomic_ldop_supported_p): Remove.
426 (aarch64_gen_atomic_ldop): Remove.
427 * config/aarch64/atomic.md (atomic_<atomic_optab><ALLI>):
428 Fully expand LSE operations here.
429 (atomic_fetch_<atomic_optab><ALLI>): Likewise.
430 (atomic_<atomic_optab>_fetch<ALLI>): Likewise.
431 (aarch64_atomic_<ATOMIC_LDOP><ALLI>_lse): Drop atomic_op iterator
432 and use ATOMIC_LDOP instead; use register_operand for the input;
433 drop the split and emit insns directly.
434 (aarch64_atomic_fetch_<ATOMIC_LDOP><ALLI>_lse): Likewise.
435 (aarch64_atomic_<atomic_op>_fetch<ALLI>_lse): Remove.
436 (@aarch64_atomic_load<ATOMIC_LDOP><ALLI>): Remove.
438 * config/aarch64/aarch64.c (aarch64_emit_atomic_swap): Remove.
439 (aarch64_gen_atomic_ldop): Don't call it.
440 * config/aarch64/atomics.md (atomic_exchange<ALLI>):
441 Use aarch64_reg_or_zero.
442 (aarch64_atomic_exchange<ALLI>): Likewise.
443 (aarch64_atomic_exchange<ALLI>_lse): Remove split; remove & from
444 operand 0; use aarch64_reg_or_zero for input; merge ...
445 (@aarch64_atomic_swp<ALLI>): ... this and remove.
447 * config/aarch64/aarch64.c (aarch64_gen_compare_reg_maybe_ze): New.
448 (aarch64_split_compare_and_swap): Use it.
449 (aarch64_expand_compare_and_swap): Likewise. Remove convert_modes;
450 test oldval against the proper predicate.
451 * config/aarch64/atomics.md (@atomic_compare_and_swap<ALLI>):
452 Use nonmemory_operand for expected.
453 (cas_short_expected_pred): New.
454 (@aarch64_compare_and_swap<SHORT>): Use it; use "rn" not "rI" to match.
455 (@aarch64_compare_and_swap<GPI>): Use "rn" not "rI" for expected.
456 * config/aarch64/predicates.md (aarch64_plushi_immediate): New.
457 (aarch64_plushi_operand): New.
459 * config/aarch64/aarch64.c (aarch64_expand_compare_and_swap):
460 Force oldval into the rval register for TARGET_LSE; emit the compare
461 during initial expansion so that it may be deleted if unused.
462 (aarch64_gen_atomic_cas): Remove.
463 * config/aarch64/atomics.md (@aarch64_compare_and_swap<SHORT>_lse):
464 Change =&r to +r for operand 0; use match_dup for operand 2;
465 remove is_weak and mod_f operands as unused. Drop the split
467 (@aarch64_atomic_cas<SHORT>): ... this pattern's output; remove.
468 (@aarch64_compare_and_swap<GPI>_lse): Similarly.
469 (@aarch64_atomic_cas<GPI>): Similarly.
471 2018-10-31 Richard Biener <rguenther@suse.de>
473 * tree-eh.c (replace_trapping_overflow): Simplify ABS_EXPR case
476 2018-10-31 Sameera Deshpande <sameera.deshpande@linaro.org>
478 * config/aarch64/aarch64-cores.def (saphira): Use saphira pipeline.
479 * config/aarch64/aarch64.md: Include saphira.md
480 * config/aarch64/saphira.md: New file for pipeline description.
482 2018-10-30 Martin Sebor <msebor@redhat.com>
485 * gimple-ssa-sprintf.c (format_directive): Use %G to include
487 (sprintf_dom_walker::compute_format_length):
488 Avoid setting POSUNDER4K here.
489 (get_destination_size): Handle null argument values.
490 (get_user_idx_format): New function.
491 (sprintf_dom_walker::handle_gimple_call): Handle all printf-like
492 functions, including user-defined with attribute format printf.
493 Use %G to include inlining context.
496 2018-10-30 Jan Hubicka <jh@suse.cz>
498 * params.def (lto-partitions): Bump from 32 to 128.
500 2018-10-30 Jan Hubicka <jh@suse.cz>
503 (free_lang_data_d, add_tree_to_fld_list, fld_worklist_push): Move
505 (free_lang_data_in_type): Forward declare.
506 (fld_type_variant_equal_p): New function.
507 (fld_type_variant): New function
508 (fld_incomplete_types): New hash.
509 (fld_incomplete_type_of): New function
510 (fld_simplfied-type): New function.
511 (free_lang_data_in_decl): Add fld parameter; simplify type of FIELD_DECL
512 (free_lang_data): Allocate and free fld_incomplete_type; update call
513 of free_lang_data_in_decl.
515 2018-10-30 Eric Botcazou <ebotcazou@adacore.com>
517 * gcov.c (output_lines): Remove duplicate line.
519 2018-10-30 Aaron Sawdey <acsawdey@linux.ibm.com>
521 * config/rs6000/rs6000.md (bswapdi2): Force address into register
522 if not in indexed or indirect form.
523 (bswapdi2_load): Change predicate to indexed_or_indirect_operand.
524 (bswapdi2_store): Ditto.
525 * config/rs6000/rs6000.c (rs6000_force_indexed_or_indirect_mem): New
527 * config/rs6000/rs6000-protos.h (rs6000_force_indexed_or_indirect_mem):
528 Prototype for helper function.
530 2018-10-30 Martin Sebor <msebor@redhat.com>
532 * doc/extend.texi (optimize): Clarify/expand attribute documentation.
533 (target, pragma GCC optimize, pragma GCC target): Ditto.
535 2018-10-30 Jonathan Wakely <jwakely@redhat.com>
537 * doc/extend.texi: Fix prototype and description of
538 __builtin_expect_with_probability.
540 2018-10-30 Michael Ploujnikov <michael.ploujnikov@oracle.com>
542 * cgraph.h (clone_function_name_1): Replaced by new
543 clone_function_name_numbered that takes name as string; for
544 privatize_symbol_name_1 use only.
545 (clone_function_name): Renamed to
546 clone_function_name_numbered to be explicit about numbering.
547 (clone_function_name): New two-argument function that does
548 not number its output.
549 (clone_function_name): New three-argument function that
550 takes a number to append to its output.
551 * cgraphclones.c (duplicate_thunk_for_node):
552 (clone_function_name_1): Renamed.
553 (clone_function_name_numbered): Two new functions.
554 (clone_function_name): Improved documentation.
555 (cgraph_node::create_virtual_clone): Use clone_function_name_numbered.
556 * config/rs6000/rs6000.c (make_resolver_func): Ditto.
557 * final.c (final_scan_insn_1): Use the new clone_function_name
559 * multiple_target.c (create_dispatcher_calls): Ditto.
560 (create_target_clone): Ditto.
561 * omp-expand.c (grid_expand_target_grid_body): Ditto.
562 * omp-low.c (create_omp_child_function_name): Ditto.
563 * omp-simd-clone.c (simd_clone_create): Ditto.
564 * symtab.c (simd_symtab_node::noninterposable_alias): Use the
565 new clone_function_name without numbering.
567 2018-10-30 Richard Earnshaw <rearnsha@arm.com>
569 * alloc-pool.h (base_pool_allocator <TBlockAllocator>::initialize):
570 Assert that the allocation size is not zero.
572 2018-10-30 Richard Biener <rguenther@suse.de>
574 PR tree-optimization/87800
575 * tree-vect-slp.c (vect_build_slp_tree_2): Reject any
576 non-induction or reduction PHIs.
578 2018-10-30 Sameera Deshpande <sameera.deshpande@linaro.org
580 * config/aarch64/falkor-tag-collision-avoidance.c
581 (execute_tag_collision_avoidance): Call df_note_add_problem.
583 2018-10-30 Martin Liska <mliska@suse.cz>
585 * doc/extend.texi: Fix typo in documentation
586 of __builtin_expect_with_probability.
588 2018-10-29 David Malcolm <dmalcolm@redhat.com>
591 * input.c (get_substring_ranges_for_loc): Detect if
592 linemap_resolve_location gives us a NULL map, and reject
595 2018-10-29 Iain Buclaw <ibuclaw@gdcproject.org>
597 * config.gcc (xstormy16-*-elf): Set tm_d_file.
599 2018-10-29 David Malcolm <dmalcolm@redhat.com>
600 Martin Sebor <msebor@redhat.com>
601 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
603 * doc/ux.texi (Quoting): New subsection, adapted from material at
604 https://gcc.gnu.org/wiki/DiagnosticsGuidelines written by
605 MartinSebor and ManuelLopezIbanez.
606 (Fix-it hints): Note that fix-it hints shouldn't be marked for
609 2018-10-29 Kugan Vivekanandarajah <kuganv@linaro.org>
612 * tree-ssa-loop-niter.c (number_of_iterations_popcount): Fix niter
615 2018-10-29 Paul A. Clarke <pc@us.ibm.com>
617 * gcc.target/powerpc/ssse3-check.h: Remove inaccurate comment.
619 2018-10-29 Paul Koning <ni1d@arrl.net>
621 * doc/rtl.texi (CONST_WIDE_INT_ELT): Give correct macro name.
623 2018-10-29 Paul A. Clarke <pc@us.ibm.com>
625 * gcc/config/rs6000/mmintrin.h (_mm_packs_pi16, _mm_packs_pi32,
626 _mm_packs_pu16, _mm_unpackhi_pi8, _mm_unpacklo_pi8, _mm_add_pi8,
627 _mm_add_pi16, _mm_add_pi32, _mm_sub_pi8, _mm_sub_pi16, _mm_sub_pi32,
628 _mm_cmpgt_pi8, _mm_cmpeq_pi16, _mm_cmpgt_pi16, _mm_cmpeq_pi32,
629 _mm_cmpgt_pi32, _mm_adds_pi8, _mm_adds_pi16, _mm_adds_pu8,
630 _mm_adds_pu16, _mm_subs_pi8, _mm_subs_pi16, _mm_subs_pu8,
631 _mm_subs_pu16, _mm_madd_pi16, _mm_mulhi_pi16, _mm_mullo_pi16,
632 _mm_sll_pi16, _mm_sra_pi16, _mm_srl_pi16, _mm_set1_pi16, _mm_set1_pi8):
633 Change 'vector' to '__vector'.
634 * gcc/config/rs6000/xmmintrin.h (_mm_cvtps_pi32, _mm_cvttps_pi32,
635 _mm_cvtps_pi16, _mm_cvtps_pi8, _mm_max_pi16, _mm_max_pu8, _mm_min_pi16,
636 _mm_min_pu8, _mm_mulhi_pu16, _mm_shuffle_pi16, _mm_avg_pu8,
637 _mm_avg_pu16): Likewise. And, whitespace corrections.
639 2018-10-29 Richard Biener <rguenther@suse.de>
641 PR tree-optimization/87785
642 * tree-vect-slp.c (vect_gather_slp_loads): Only gather
645 2018-10-29 Olivier Hainque <hainque@adacore.com>
647 * VXWORKS_NET_LIBS_RTP: New macro, network part of VXWORKS_LIBS_RTP.
649 2018-10-29 Olivier Hainque <hainque@adacore.com>
651 * config/vxworks.h (VXWORKS_PERSONALITY): New VxWorks
652 ports configuration macro, defaults to "gnu".
653 (VXWORKS_OS_CPP_BUILTINS): Use it. Feed TOOL and
654 TOOL_FAMILY instead of _VX_TOOL/_VXTOOL_FAMILY.
656 2018-10-29 Olivier Hainque <hainque@adacore.com>
658 * config/vxworks.h (CLEAR_INSN_CACHE): #undef before #define.
660 2018-10-29 Richard Biener <rguenther@suse.de>
662 PR tree-optimization/87790
663 * tree-vect-slp.c (vect_mark_slp_stmts): Simplify.
664 (vect_make_slp_decision): Adjust.
665 (vect_slp_analyze_bb_1): Likewise.
666 (vect_detect_hybrid_slp_stmts): Properly union SLP type over
669 2018-10-29 Richard Biener <rguenther@suse.de>
671 PR tree-optimization/87785
672 * tree-vect-slp.c (vect_build_slp_tree_2): Remove loads argument
674 (vect_build_slp_tree): Likewise.
675 (vect_gather_slp_loads): New function.
676 (vect_analyze_slp_instance): Gather loads separately from the
679 2018-10-29 Martin Liska <mliska@suse.cz>
681 * Makefile.in: Make dependency to json.o.
682 * doc/gcov.texi: Document new JSON format, remove
683 old intermediate format documentation.
684 * gcov.c (struct function_info): Come up with m_name and
686 (function_info::function_info): Initialize it.
687 (function_info::~function_info): Release it.
688 (main): Rename flag_intermediate_format to flag_json_format.
689 (print_usage): Describe --json-format.
690 (process_args): Set flag_json_format.
691 (output_intermediate_line): Remove.
692 (output_intermediate_json_line): Likewise.
693 (get_gcov_intermediate_filename): Return new extension
695 (output_intermediate_file): Implement JSON emission.
696 (output_json_intermediate_file): Implement JSON emission.
697 (generate_results): Use ::get_name for function name.
698 Handle JSON output file.
699 (read_graph_file): Use ::get_name instead of cplus_demangle.
700 (read_count_file): Likewise.
701 (solve_flow_graph): Likewise.
702 (add_line_counts): Likewise.
703 (accumulate_line_counts): Use new flag_json_format.
704 (output_function_details): Use ::get_name instead of cplus_demangle.
705 (output_lines): Likewise.
706 * json.cc (test_writing_literals): Add new tests.
707 * json.h (class literal): Add new boolean constructor.
709 2018-10-29 Segher Boessenkool <segher@kernel.crashing.org>
711 PR rtl-optimization/87701
712 PR rtl-optimization/87780
713 * combine.c (make_more_copies): Rewrite.
715 2018-10-28 Kugan Vivekanandarajah <kuganv@linaro.org>
717 * doc/generic.texi (ABSU_EXPR): Document.
718 * match.pd (absu(x)*absu(x) -> x*x): Handle.
719 (absu(absu(X)) -> absu(X)): Likewise.
720 (absu(-X) -> absu(X)): Likewise.
721 (absu(X) where X is nonnegative -> X): Likewise.
723 2018-10-28 Iain Buclaw <ibuclaw@gdcproject.org>
725 * Makefile.in (tm_d_file_list, tm_d_include_list): New variables.
726 (TM_D_H, D_TARGET_DEF, D_TARGET_H, D_TARGET_OBJS): New variables.
727 (tm_d.h, cs-tm_d.h, default-d.o): New rules.
728 (d/d-target-hooks-def.h, s-d-target-hooks-def-h): New rules.
729 (s-tm-texi): Also check timestamp on d-target.def.
730 (generated_files): Add TM_D_H and d-target-hooks-def.h.
731 (build/genhooks.o): Also depend on D_TARGET_DEF.
732 * config.gcc (tm_d_file, d_target_objs, target_has_targetdm): New
734 * config/aarch64/aarch64-d.c: New file.
735 * config/aarch64/aarch64-linux.h (GNU_USER_TARGET_D_CRITSEC_SIZE):
737 * config/aarch64/aarch64-protos.h (aarch64_d_target_versions): New
739 * config/aarch64/aarch64.h (TARGET_D_CPU_VERSIONS): Define.
740 * config/aarch64/t-aarch64 (aarch64-d.o): New rule.
741 * config/arm/arm-d.c: New file.
742 * config/arm/arm-protos.h (arm_d_target_versions): New prototype.
743 * config/arm/arm.h (TARGET_D_CPU_VERSIONS): Define.
744 * config/arm/linux-eabi.h (EXTRA_TARGET_D_OS_VERSIONS): Define.
745 * config/arm/t-arm (arm-d.o): New rule.
746 * config/default-d.c: New file.
747 * config/glibc-d.c: New file.
748 * config/gnu.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
749 * config/i386/i386-d.c: New file.
750 * config/i386/i386-protos.h (ix86_d_target_versions): New prototype.
751 * config/i386/i386.h (TARGET_D_CPU_VERSIONS): Define.
752 * config/i386/linux-common.h (EXTRA_TARGET_D_OS_VERSIONS): Define.
753 (GNU_USER_TARGET_D_CRITSEC_SIZE): Define.
754 * config/i386/t-i386 (i386-d.o): New rule.
755 * config/kfreebsd-gnu.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
756 * config/kopensolaris-gnu.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
757 * config/linux-android.h (ANDROID_TARGET_D_OS_VERSIONS): Define.
758 * config/linux.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
759 * config/mips/linux-common.h (EXTRA_TARGET_D_OS_VERSIONS): Define.
760 * config/mips/mips-d.c: New file.
761 * config/mips/mips-protos.h (mips_d_target_versions): New prototype.
762 * config/mips/mips.h (TARGET_D_CPU_VERSIONS): Define.
763 * config/mips/t-mips (mips-d.o): New rule.
764 * config/powerpcspe/linux.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
765 * config/powerpcspe/linux64.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
766 * config/powerpcspe/powerpcspe-d.c: New file.
767 * config/powerpcspe/powerpcspe-protos.h (rs6000_d_target_versions):
769 * config/powerpcspe/powerpcspe.c (rs6000_output_function_epilogue):
770 Support GNU D by using 0 as the language type.
771 * config/powerpcspe/powerpcspe.h (TARGET_D_CPU_VERSIONS): Define.
772 * config/powerpcspe/t-powerpcspe (powerpcspe-d.o): New rule.
773 * config/riscv/riscv-d.c: New file.
774 * config/riscv/riscv-protos.h (riscv_d_target_versions): New
776 * config/riscv/riscv.h (TARGET_D_CPU_VERSIONS): Define.
777 * config/riscv/t-riscv (riscv-d.o): New rule.
778 * config/rs6000/linux.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
779 * config/rs6000/linux64.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
780 * config/rs6000/rs6000-d.c: New file.
781 * config/rs6000/rs6000-protos.h (rs6000_d_target_versions): New
783 * config/rs6000/rs6000.c (rs6000_output_function_epilogue):
784 Support GNU D by using 0 as the language type.
785 * config/rs6000/rs6000.h (TARGET_D_CPU_VERSIONS): Define.
786 * config/rs6000/t-rs6000 (rs6000-d.o): New rule.
787 * config/s390/s390-d.c: New file.
788 * config/s390/s390-protos.h (s390_d_target_versions): New prototype.
789 * config/s390/s390.h (TARGET_D_CPU_VERSIONS): Define.
790 * config/s390/t-s390 (s390-d.o): New rule.
791 * config/sparc/sparc-d.c: New file.
792 * config/sparc/sparc-protos.h (sparc_d_target_versions): New
794 * config/sparc/sparc.h (TARGET_D_CPU_VERSIONS): Define.
795 * config/sparc/t-sparc (sparc-d.o): New rule.
796 * config/t-glibc (glibc-d.o): New rule.
797 * configure: Regenerated.
798 * configure.ac (tm_d_file): New variable.
799 (tm_d_file_list, tm_d_include_list, d_target_objs): Add substitutes.
800 * doc/contrib.texi (Contributors): Add self for the D frontend.
801 * doc/frontends.texi (G++ and GCC): Mention D as a supported language.
802 * doc/install.texi (Configuration): Mention libphobos as an option for
803 --enable-shared. Mention d as an option for --enable-languages.
804 (Testing): Mention check-d as a target.
805 * doc/invoke.texi (Overall Options): Mention .d, .dd, and .di as file
806 name suffixes. Mention d as a -x option.
807 * doc/sourcebuild.texi (Top Level): Mention libphobos.
808 * doc/standards.texi (Standards): Add section on D language.
809 * doc/tm.texi: Regenerated.
810 * doc/tm.texi.in: Add @node for D language and ABI, and @hook for
811 TARGET_CPU_VERSIONS, TARGET_D_OS_VERSIONS, and TARGET_D_CRITSEC_SIZE.
812 * dwarf2out.c (is_dlang): New function.
813 (gen_compile_unit_die): Use DW_LANG_D for D.
814 (declare_in_namespace): Return module die for D, instead of adding
815 extra declarations into the namespace.
816 (gen_namespace_die): Generate DW_TAG_module for D.
817 (gen_decl_die): Handle CONST_DECLSs for D.
818 (dwarf2out_decl): Likewise.
819 (prune_unused_types_walk_local_classes): Handle DW_tag_interface_type.
820 (prune_unused_types_walk): Handle DW_tag_interface_type same as other
822 * gcc.c (default_compilers): Add entries for .d, .dd and .di.
823 * genhooks.c: Include d/d-target.def.
825 2018-10-28 Iain Sandoe <iain@sandoe.co.uk>
828 * config/rs6000/darwin.h (STACK_BOUNDARY): New.
829 (RS6000_STARTING_FRAME_OFFSET): Adjust to preserve 16byte alignment.
830 (STACK_DYNAMIC_OFFSET): Likewise.
832 2018-10-27 Sandra Loosemore <sandra@codesourcery.com>
835 * config/nios2/nios2.c (nios2_valid_target_attribute_rec): Fix
838 2018-10-26 Tulio Magno Quites Machado Filho <tuliom@linux.ibm.com>
840 * doc/extend.texi (PowerPC builtins): Fix __builtin_unpack_ibm128
841 return type and other typos.
843 2018-10-26 Aaron Sawdey <acsawdey@linux.ibm.com>
845 * config/rs6000/rs6000-string.c (expand_strncmp_gpr_sequence): Change to
846 a shorter sequence with fewer branches.
847 (emit_final_str_compare_gpr): Ditto.
849 2018-10-26 Paul A. Clarke <pc@us.ibm.com>
851 * config/rs6000/tmmintrin.h: New file.
852 * config.gcc (powerpc*-*-*): Add tmmintrin.h to extra_headers.
854 2018-10-26 Paul A. Clarke <pc@us.ibm.com>
856 * config/rs6000/mmintrin.h: Enable 32bit compilation.
857 * config/rs6000/xmmintrin.h: Likewise.
859 2018-10-26 Paul A. Clarke <pc@us.ibm.com>
861 * config/rs6000/xmmintrin.h (_mm_extract_pi16): Fix for big-endian.
863 2018-10-26 Richard Biener <rguenther@suse.de>
865 * tree-vect-slp.c (vect_mark_slp_stmts): Add visited hash_set
867 (vect_mark_slp_stmts_relevant): Likewise.
868 (vect_detect_hybrid_slp_stmts): Likewise.
869 (vect_bb_slp_scalar_cost): Likewise.
870 (vect_remove_slp_scalar_calls): Likewise.
872 2018-10-26 Jan Hubicka <jh@suse.cz>
874 * ipa-devirt.c (odr_subtypes_equivalent_p): Fix recursion.
875 (warn_types_mismatch): Fix walk of DECL_NAME.
876 (odr_types_equivalent_p): Fix overactive assert.
878 2018-10-26 Richard Biener <rguenther@suse.de>
880 PR tree-optimization/87105
881 * tree-vectorizer.h (_slp_tree::refcnt): New member.
882 * tree-vect-slp.c (vect_free_slp_tree): Decrement and honor
884 (vect_create_new_slp_node): Initialize refcnt to one.
886 (scalar_stmts_set_t, bst_fail): Remove.
887 (vect_build_slp_tree_2): Add bst_map argument and adjust calls.
888 (vect_build_slp_tree): Add bst_map argument and lookup
889 already created SLP nodes.
890 (vect_print_slp_tree): Handle a SLP graph, print SLP node
892 (vect_slp_rearrange_stmts): Handle a SLP graph.
893 (vect_analyze_slp_instance): Adjust and free SLP nodes from
894 the CSE map. Fix indenting.
895 (vect_schedule_slp_instance): Add short-cut.
897 2018-10-26 Martin Liska <mliska@suse.cz>
900 * ipa-prop.c (struct ipa_vr_ggc_hash_traits): Hash with
901 addr_expr and not with pointers.
903 2018-10-26 Jan Hubicka <jh@suse.cz>
905 * tree.c (free_lang_data_in_type): Only check main variants.
906 * ipa-devirt.c (warn_odr): Make static.
907 (types_same_for_odr): Drop strict variant.
908 (types_odr_comparable): Likewise.
909 (odr_or_derived_type_p): Look for main variants.
910 (odr_name_hasher::equal): Cleanup comment.
911 (odr_subtypes_equivalent): Add warn and warned arguments; check main
913 (type_variants_equivalent_p): break out from ...
914 (odr_types_equivalent): ... here; go for main variants where needed.
915 (warn_odr): ... here; turn static.
916 (warn_types_mismatch): Compare mangled names of main variants.
917 * ipa-utils.h (types_odr_comparable): Drop strict parameter.
918 (type_with_linkage_p): Sanity check that we look at main variant.
919 * lto.c (lto_read_decls): Only consider main variant to be ODR type.
920 * tree.h (types_same_for_odr): Drop strict argument.
922 2018-10-26 Richard Biener <rguenther@suse.de>
924 PR tree-optimization/87746
925 * tree-vect-data-refs.c (vect_update_misalignment_for_peel):
926 Simplify and fix WRT strided store groups with size not
927 equal to step in element count.
928 (vect_analyze_group_access_1): Dump the whole group.
930 2018-10-25 Carl Love <cel@us.ibm.com>
932 * config/rs6000/rs6000-c.c (P9V_BUILTIN_VEC_VSCEDPGT,
933 P9V_BUILTIN_VEC_VSCEDPLT, P9V_BUILTIN_VEC_VSCEDPEQ,
934 P9V_BUILTIN_VEC_VSCEDPUO): Rename base overloaded name. Add quad
935 precicion entry for each overloaded builtin.
936 * config/rs6000/rs6000-builtin.def (VSCEDPGT, VSCEDPLT, VSCEDPEQ,
937 VSCEDPUO): Rename overloaded name.
938 (VSCEDPGT, VSCEQPGT, VSCEDPLT, VSCEQPLT, VSCEDPEQ, VSCEQPEQ,
939 VSCEDPUO, VSCEQPUO): Add defitions for overloaded builtins.
940 * config/rs6000/vsx.md (xscmpexpqp_<code>_<mode>): Add
941 define_expand for xscmpexqp instruction.
942 (*xscmpexpqp): Add define_insn for the xscmpexqp instruction.
944 2018-10-25 Bill Schmidt <wschmidt@linux.ibm.com>
945 Jinsong Ji <jji@us.ibm.com>
947 * config/rs6000/emmintrin.h (_mm_slli_epi16): Replace deprecated
948 function with vec_sl.
949 (_mm_slli_epi32): Likewise.
950 (_mm_slli_epi64): Likewise.
951 (_mm_srai_epi16): Replace deprecated function with vec_sra.
952 (_mm_srai_epi32): Likewise.
953 (_mm_srli_epi16): Replace deprecated function with vec_sr.
954 (_mm_srli_epi32): Likewise.
955 (_mm_srli_epi64): Likewise.
956 (_mm_sll_epi16): Replace deprecated function with vec_sl.
957 (_mm_sll_epi32): Likewise.
958 (_mm_sll_epi64): Likewise.
959 (_mm_sra_epi16): Replace deprecated function with vec_sra.
960 (_mm_sra_epi32): Likewise.
961 (_mm_srl_epi16): Replace deprecated function with vec_sr.
962 (_mm_srl_epi32): Likewise.
963 (_mm_srl_epi64): Likewise.
965 2018-10-25 Bill Schmidt <wschmidt@linux.ibm.com>
966 Jinsong Ji <jji@us.ibm.com>
968 * gcc/config/rs6000/emmintrin.h (_mm_sll_epi16): Replace
969 comparison operators with vec_cmp* for compatibility due to
970 unfortunate history; clean up formatting and use types more
972 (_mm_sll_epi32): Likewise.
973 (_mm_sll_epi64): Likewise.
974 (_mm_srl_epi16): Likewise.
975 (_mm_srl_epi32): Likewise.
976 (_mm_srl_epi64): Likewise.
978 2018-10-25 Bill Schmidt <wschmidt@linux.ibm.com>
979 Jinsong Ji <jji@us.ibm.com>
981 * config/rs6000/emmintrin.h (_mm_sll_epi64): Remove wrong cast.
982 * config/rs6000/xmmintrin.h (_mm_min_ps): Change m's type to
983 __vector __bool int. Use vec_cmpgt in preference to deprecated
984 function vec_vcmpgtfp.
985 (_mm_max_ps): Likewise.
987 2018-10-25 Jeff Law <law@redhat.com>
989 * config/rl78/rl78.c (insn_ok_now): Always re-recognize the insn
992 2018-10-25 Martin Sebor <msebor@redhat.com>
994 * doc/extend.texi (aligned): Expand attribute description.
995 (Alignment): Rename section. Discuss function arguments.
997 2018-10-25 Jan Hubicka <jh@suse.cz>
999 * ipa-devirt.c (main_odr_variant): Remove.
1000 (hash_odr_name, types_same_for_odr, types_odr_comparable,
1001 odr_name_hasher::equal, odr_subtypes_equivalent_p):
1002 Drop use of main_odr_variant.
1003 (add_type_duplicate): Silence confused warnings on integer types.
1004 (get_odr_type): Always look for main variant.
1005 (register_odr_type): Simplify.
1007 2018-10-25 Richard Biener <rguenther@suse.de>
1009 * tree-vect-data-refs.c (vect_analyze_data_ref_accesses):
1010 Initialize ng to silence error with release checking bootstrap.
1012 2018-10-25 Richard Biener <rguenther@suse.de>
1014 * tree-if-conv.c: Include tree-ssa-sccvn.h.
1015 (tree_if_conversion): Run CSE on the if-converted loop body.
1017 2018-10-25 Ilya Leoshkevich <iii@linux.ibm.com>
1019 * config/s390/constraints.md (ZL): New constraint.
1020 * config/s390/s390.c (legitimate_pic_operand_p): Accept LARL
1022 * config/s390/s390.md (movdi_larl): Remove.
1023 (movdi_64): Add the LARL alternative.
1025 2018-10-25 Ilya Leoshkevich <iii@linux.ibm.com>
1028 * rtl.c (RTX_CODE_HWINT_P_1): New helper macro.
1029 (RTX_CODE_HWINT_P): New macro.
1030 (rtx_code_size): Use RTX_CODE_HWINT_P ().
1032 2018-10-25 Jan Hubicka <jh@suse.cz>
1034 * ipa-devirt.c (odr_types_equivalent_p): Do not ICE if one of types
1037 2018-10-25 Richard Biener <rguenther@suse.de>
1039 PR tree-optimization/87665
1040 PR tree-optimization/87745
1041 * tree-vectorizer.h (get_earlier_stmt): Remove.
1042 (get_later_stmt): Pick up UID from the original non-pattern stmt.
1044 2018-10-25 Sam Tebbs <sam.tebbs@arm.com>
1046 * options.texi (Deprecated): Move list to Var section.
1048 2018-10-24 Bill Schmidt <wschmidt@linux.ibm.com>
1049 Jinsong Ji <jji@us.ibm.com>
1051 * config/rs6000/emmintrin.h (_mm_cvtpd_epi32): Change deprecated
1052 __vector long to __vector long long.
1053 (_mm_cvtpd_ps): Likewise.
1054 (_mm_cvttpd_epi32): Likewise.
1055 (_mm_cvtpi32_pd): Likewise.
1056 (_mm_unpackhi_epi64): Likewise.
1057 (_mm_unpacklo_epi64): Likewise.
1059 2018-10-24 Segher Boessenkool <segher@kernel.crashing.org>
1061 PR rtl-optimization/87720
1062 * combine.c (make_more_copies): Skip if the dest is pc_rtx.
1064 2018-10-24 Alexandre Oliva <aoliva@redhat.com>
1066 * gimple-ssa-isolate-paths.c
1067 (find_implicit_erroneous_behavior): Do not change code if the
1068 pass is running for warnings only.
1069 (find_explicit_erroneous_behavior): Likewise.
1071 2018-10-24 Michael Meissner <meissner@linux.ibm.com>
1073 * config/rs6000/rs6000.c (TARGET_MANGLE_DECL_ASSEMBLER_NAME):
1074 Define as rs6000_mangle_decl_assembler_name.
1075 (rs6000_mangle_decl_assembler_name): If the user switched from IBM
1076 long double to IEEE long double, switch the names of the long
1077 double built-in functions to be <func>f128 instead of <func>l.
1079 2018-10-24 Martin Sebor <msebor@redhat.com>
1081 * doc/extend.texi (nonnull): List no-argument form. Reference
1082 -fno-delete-null-pointer-checks and -fisolate-erroneous-paths-attribute.
1084 2018-10-24 Richard Biener <rguenther@suse.de>
1086 * tree-ssa-sccvn.c (do_rpo_vn): Free rpo_state.
1088 2018-10-24 Martin Liska <mliska@suse.cz>
1090 PR tree-optimization/84436
1091 * tree-switch-conversion.c (switch_conversion::contains_same_values_p):
1093 (switch_conversion::contains_linear_function_p): New.
1094 (switch_conversion::build_one_array): Support linear
1095 transformation on input.
1096 * tree-switch-conversion.h (struct switch_conversion): Add
1097 contains_linear_function_p declaration.
1099 2018-10-24 Richard Biener <rguenther@suse.de>
1101 * varasm.c (const_hash_1): Return hash of ADDR_EXPR
1102 if its argument is CONSTANT_CLASS_P.
1104 2018-10-11 Jan Hubicka <hubicka@ucw.cz>
1106 * ipa-utils.h (type_with_linkage_p): No longer check for TYPE_STUB_DECL;
1107 it is wrong for forward declarations.
1109 2018-10-24 Ilya Leoshkevich <iii@linux.ibm.com>
1111 * config/s390/s390.c (s390_check_qrst_address): Add the missing
1112 SYMBOL_REF_P () check.
1114 2018-10-24 Richard Biener <rguenther@suse.de>
1116 PR tree-optimization/87105
1117 * tree-vect-data-refs.c (vect_analyze_group_access_1): Adjust
1118 dump classification.
1119 (vect_analyze_data_ref_accesses): Handle duplicate loads and
1120 stores by splitting the affected group after the fact.
1121 * tree-vect-slp.c (vect_build_slp_tree_2): Dump when we
1122 fail the SLP build because of size constraints.
1124 2018-10-24 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1126 * configure.ac (gcc_cv_ld_aligned_shf_merge): New test.
1127 * configure: Regenerate.
1128 * config.in: Regenerate.
1129 * varasm.c (mergeable_string_section): Use readonly_data_section
1130 if linker doesn't support SHF_MERGE with alignment > 8.
1131 (mergeable_constant_section): Likewise.
1133 2018-10-24 Richard Biener <rguenther@suse.de>
1135 PR tree-optimization/84013
1136 * tree-ssa-structalias.c (struct msdi_data): New struct for
1137 marshalling data to walk_stmt_load_store_ops.
1138 (maybe_set_dependence_info): Refactor as callback for
1139 walk_stmt_load_store_ops.
1140 (compute_dependence_clique): Set restrict info on all stmt kinds.
1142 2018-10-24 Martin Liska <mliska@suse.cz>
1144 * cgraph.c (cgraph_node::dump):
1145 Remove reduntant dumps and make tp_first_run dump more compact.
1147 2018-10-24 Richard Biener <rguenther@suse.de>
1149 PR tree-optimization/87665
1150 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Adjust
1153 2018-10-12 Jeff Law <law@redhat.com>
1155 * config/h8300/h8300.c (h8300_expand_prologue): Fix stm generation
1158 2018-10-23 Richard Biener <rguenther@suse.de>
1160 * tree-vrp.c (add_assert_info): Guard dump_printf with
1162 * gimple-ssa-evrp-analyze.c
1163 (evrp_range_analyzer::record_ranges_from_incoming_edge):
1164 Use value_range::ignore_equivs_equal_p.
1166 2018-10-23 Richard Biener <rguenther@suse.de>
1168 PR tree-optimization/87105
1169 PR tree-optimization/87608
1170 * passes.def (pass_all_early_optimizations): Add early phi-opt
1172 * tree-ssa-phiopt.c (value_replacement): Ignore NOPs and predicts in
1173 addition to debug stmts.
1174 (tree_ssa_phiopt_worker): Add early_p argument, do only min/max
1175 and abs replacement early.
1176 * tree-cfg.c (gimple_empty_block_p): Likewise.
1178 2018-10-23 Richard Earnshaw <rearnsha@arm.com>
1181 * config.gcc (arm*-*-netbsdelf*): Default to StrongARM if no CPU
1182 specified to configure.
1183 (arm*-*-*): Use ARM7TDMI as the target CPU if no default provided.
1185 2018-10-23 Richard Biener <rguenther@suse.de>
1187 PR tree-optimization/87700
1188 * tree-ssa-copy.c (set_copy_of_val): Fix change detection logic.
1190 2018-10-23 Jakub Jelinek <jakub@redhat.com>
1193 * config/i386/avx512vlintrin.h (_mm_mask_mullo_epi32): Change type of
1194 second argument from __mmask16 to __mmask8.
1195 * config/i386/avx512vlbwintrin.h (_mm_mask_packus_epi32,
1196 _mm_mask_packs_epi32): Likewise.
1197 * config/i386/avx512pfintrin.h (_mm512_mask_prefetch_i64scatter_ps):
1199 (_mm512_mask_prefetch_i64scatter_pd): Likewise. Formatting fix.
1201 2018-10-23 Richard Biener <rguenther@suse.de>
1203 * tree-vect-stmts.c (vect_analyze_stmt): Fix typo in comment.
1205 2018-10-23 Richard Biener <rguenther@suse.de>
1207 PR tree-optimization/86144
1208 * tree-vect-stmts.c (vect_analyze_stmt): Prefer -mveclibabi
1209 over simd attribute.
1211 2018-10-23 Richard Biener <rguenther@suse.de>
1213 PR tree-optimization/87693
1214 * tree-ssa-threadedge.c (thread_around_empty_blocks): Handle
1215 the case we do not find the taken edge.
1217 2018-10-22 Bill Schmidt <wschmidt@linux.ibm.com>
1218 Jinsong Ji <jji@us.ibm.com>
1220 * config/rs6000/emmintrin.h (_MM_SHUFFLE2): Comment cleanup.
1221 (_mm_store_pd): Use unaligned vector type for pointer cast.
1222 (_mm_maskmoveu_si128): Likewise.
1223 * config/rs6000/xmmintrin.h (__m128_u): New typedef.
1224 (_mm_store_ps): Use unaligned vector type for pointer cast.
1226 2018-10-22 Paul Koning <ni1d@arrl.net>
1228 * symtab.c (symtab_node::increase_alignment): Correct max
1231 2018-10-22 Yury Gribov <tetra2005@gmail.com>
1233 PR tree-optimization/87633
1234 * match.pd: Do not generate unordered integer comparisons.
1236 2018-10-22 Segher Boessenkool <segher@kernel.crashing.org>
1238 PR rtl-optimization/87600
1239 * combine.c: Add include of expr.h.
1240 (cant_combine_insn_p): Do not combine moves from any hard non-fixed
1241 register to a pseudo.
1242 (make_more_copies): New function, add a copy to a new pseudo after
1243 the moves from hard registers into pseudos.
1244 (rest_of_handle_combine): Declare rebuild_jump_labels_after_combine
1245 later. Call make_more_copies.
1247 2018-10-22 Andrew Stubbs <ams@codesourcery.com>
1249 * lra-constraints.c (process_alt_operands): New local array,
1250 matching_early_clobber. Check matching_early_clobber before
1251 decrementing reject, and set matching_early_clobber after.
1253 2018-10-22 Segher Boessenkool <segher@kernel.crashing.org>
1256 * config/rs6000/rs6000.c (print_operand_address): For unexpected RTL
1257 call output_addr_const and hope for the best.
1259 2018-10-22 Richard Biener <rguenther@suse.de>
1261 * gimple-ssa-evrp-analyze.c
1262 (evrp_range_analyzer::record_ranges_from_incoming_edge): Be
1263 smarter about what ranges to use.
1264 * tree-vrp.c (add_assert_info): Dump here.
1265 (register_edge_assert_for_2): Instead of here at multiple but
1268 * gcc.dg/tree-ssa/evrp12.c: New testcase.
1269 * gcc.dg/predict-6.c: Adjust.
1270 * gcc.dg/tree-ssa/vrp33.c: Disable EVRP.
1271 * gcc.dg/tree-ssa/vrp02.c: Likewise.
1272 * gcc.dg/tree-ssa/cunroll-9.c: Likewise.
1274 2018-10-22 Steven Bosscher <steven@gcc.gnu.org>
1275 Richard Biener <rguenther@suse.de>
1277 * bitmap.h: Update data structure documentation, including a
1278 description of bitmap views as either linked-lists or splay trees.
1279 (struct bitmap_element_def): Update comments for splay tree bitmaps.
1280 (struct bitmap_head_def): Likewise.
1281 (bitmap_list_view, bitmap_tree_view): New prototypes.
1282 (bitmap_initialize_stat): Initialize a bitmap_head's indx and
1284 (bmp_iter_set_init): Assert the iterated bitmaps are in list form.
1285 (bmp_iter_and_init, bmp_iter_and_compl_init): Likewise.
1286 * bitmap.c (bitmap_elem_to_freelist): Unregister overhead of a
1287 released bitmap element here.
1288 (bitmap_element_free): Remove.
1289 (bitmap_elt_clear_from): Work on splay tree bitmaps.
1290 (bitmap_list_link_element): Renamed from bitmap_element_link. Move
1291 this function similar ones such that linked-list bitmap implementation
1292 functions are grouped.
1293 (bitmap_list_unlink_element): Renamed from bitmap_element_unlink,
1294 and moved for grouping.
1295 (bitmap_list_insert_element_after): Renamed from
1296 bitmap_elt_insert_after, and moved for grouping.
1297 (bitmap_list_find_element): New function spliced from bitmap_find_bit.
1298 (bitmap_tree_link_left, bitmap_tree_link_right,
1299 bitmap_tree_rotate_left, bitmap_tree_rotate_right, bitmap_tree_splay,
1300 bitmap_tree_link_element, bitmap_tree_unlink_element,
1301 bitmap_tree_find_element): New functions for splay-tree bitmap
1303 (bitmap_element_link, bitmap_element_unlink, bitmap_elt_insert_after):
1304 Renamed and moved, see above entries.
1305 (bitmap_tree_listify_from): New function to convert part of a splay
1306 tree bitmap to a linked-list bitmap.
1307 (bitmap_list_view): Convert a splay tree bitmap to linked-list form.
1308 (bitmap_tree_view): Convert a linked-list bitmap to splay tree form.
1309 (bitmap_find_bit): Remove.
1310 (bitmap_clear, bitmap_clear_bit, bitmap_set_bit,
1311 bitmap_single_bit_set_p, bitmap_first_set_bit, bitmap_last_set_bit):
1312 Handle splay tree bitmaps.
1313 (bitmap_copy, bitmap_count_bits, bitmap_and, bitmap_and_into,
1314 bitmap_elt_copy, bitmap_and_compl, bitmap_and_compl_into,
1315 bitmap_compl_and_into, bitmap_elt_ior, bitmap_ior, bitmap_ior_into,
1316 bitmap_xor, bitmap_xor_into, bitmap_equal_p, bitmap_intersect_p,
1317 bitmap_intersect_compl_p, bitmap_ior_and_compl,
1318 bitmap_ior_and_compl_into, bitmap_set_range, bitmap_clear_range,
1319 bitmap_hash): Reject trying to act on splay tree bitmaps. Make
1320 corresponding changes to use linked-list specific bitmap_element
1321 manipulation functions as applicable for efficiency.
1322 (bitmap_tree_to_vec): New function.
1323 (debug_bitmap_elt_file): New function split out from ...
1324 (debug_bitmap_file): ... here. Handle splay tree bitmaps.
1325 (bitmap_print): Likewise.
1327 PR tree-optimization/63155
1328 * tree-ssa-propagate.c (ssa_prop_init): Use tree-view for the
1330 * tree-ssa-coalesce.c (coalesce_ssa_name): Populate used_in_copies
1333 2018-10-22 Martin Liska <mliska@suse.cz>
1335 PR tree-optimization/87686
1337 2018-08-29 Martin Liska <mliska@suse.cz>
1339 * tree-switch-conversion.c (switch_conversion::expand):
1340 Strenghten assumption about gswitch statements.
1342 2018-10-22 Martin Liska <mliska@suse.cz>
1344 * ipa-icf.c (sem_item::compare_attributes): Remove.
1345 (sem_item::compare_referenced_symbol_properties): Use
1346 attribute_list_equal instead.
1347 (sem_function::equals_wpa): Likewise.
1348 * ipa-icf.h: Remove compare_attributes.
1350 2018-10-22 Richard Biener <rguenther@suse.de>
1353 * mem-stats.h (mem_usage::operator==): Fix pasto.
1355 2018-10-22 Richard Biener <rguenther@suse.de>
1357 PR tree-optimization/87640
1358 * tree-vrp.c (set_value_range_with_overflow): Decompose
1360 (extract_range_from_binary_expr_1): Adjust.
1362 2018-10-22 Martin Jambor <mjambor@suse.cz>
1364 * tree-eh.h (stmt_could_throw_p): Add function parameter.
1365 (stmt_can_throw_external): Likewise.
1366 (stmt_can_throw_internal): Likewise.
1367 * tree-eh.c (lower_eh_constructs_2): Pass cfun to stmt_could_throw_p.
1368 (lower_eh_constructs_2): Likewise.
1369 (stmt_could_throw_p): Add fun parameter, use it instead of cfun.
1370 (stmt_can_throw_external): Likewise.
1371 (stmt_can_throw_internal): Likewise.
1372 (maybe_clean_eh_stmt_fn): Pass cfun to stmt_could_throw_p.
1373 (maybe_clean_or_replace_eh_stmt): Pass cfun to stmt_could_throw_p.
1374 (maybe_duplicate_eh_stmt_fn): Pass new_fun to stmt_could_throw_p.
1375 (maybe_duplicate_eh_stmt): Pass cfun to stmt_could_throw_p.
1376 (pass_lower_eh_dispatch::execute): Pass cfun to
1377 stmt_can_throw_external.
1378 (cleanup_empty_eh): Likewise.
1379 (verify_eh_edges): Pass cfun to stmt_could_throw_p.
1380 * cgraph.c (cgraph_edge::set_call_stmt): Pass a function to
1381 stmt_can_throw_external instead of pushing it to cfun.
1382 (symbol_table::create_edge): Likewise.
1383 * gimple-fold.c (fold_builtin_atomic_compare_exchange): Pass cfun to
1384 stmt_can_throw_internal.
1385 * gimple-ssa-evrp.c (evrp_dom_walker::before_dom_children): Pass cfun
1386 to stmt_could_throw_p.
1387 * gimple-ssa-store-merging.c (handled_load): Pass cfun to
1388 stmt_can_throw_internal.
1389 (pass_store_merging::execute): Likewise.
1390 * gimple-ssa-strength-reduction.c
1391 (find_candidates_dom_walker::before_dom_children): Pass cfun to
1393 * gimplify-me.c (gimple_regimplify_operands): Pass cfun to
1394 stmt_can_throw_internal.
1395 * ipa-pure-const.c (check_call): Pass cfun to stmt_could_throw_p and
1396 to stmt_can_throw_external.
1397 (check_stmt): Pass cfun to stmt_could_throw_p.
1398 (check_stmt): Pass cfun to stmt_can_throw_external.
1399 (pass_nothrow::execute): Likewise.
1400 * trans-mem.c (expand_call_tm): Pass cfun to stmt_can_throw_internal.
1401 * tree-cfg.c (is_ctrl_altering_stmt): Pass cfun to
1402 stmt_can_throw_internal.
1403 (verify_gimple_in_cfg): Pass cfun to stmt_could_throw_p.
1404 (stmt_can_terminate_bb_p): Pass cfun to stmt_can_throw_external.
1405 (gimple_purge_dead_eh_edges): Pass cfun to stmt_can_throw_internal.
1406 * tree-complex.c (expand_complex_libcall): Pass cfun to
1407 stmt_could_throw_p and to stmt_can_throw_internal.
1408 (expand_complex_multiplication): Pass cfun to stmt_can_throw_internal.
1409 * tree-inline.c (copy_edges_for_bb): Likewise.
1410 (maybe_move_debug_stmts_to_successors): Likewise.
1411 * tree-outof-ssa.c (ssa_is_replaceable_p): Pass cfun to
1413 * tree-parloops.c (oacc_entry_exit_ok_1): Likewise.
1414 * tree-sra.c (scan_function): Pass cfun to stmt_can_throw_external.
1415 * tree-ssa-alias.c (stmt_kills_ref_p): Pass cfun to
1416 stmt_can_throw_internal.
1417 * tree-ssa-ccp.c (optimize_atomic_bit_test_and): Likewise.
1418 * tree-ssa-dce.c (mark_stmt_if_obviously_necessary): Pass cfun to
1420 (mark_aliased_reaching_defs_necessary_1): Pass cfun to
1421 stmt_can_throw_internal.
1422 * tree-ssa-forwprop.c (pass_forwprop::execute): Likewise.
1423 * tree-ssa-loop-im.c (movement_possibility): Pass cfun to
1425 * tree-ssa-loop-ivopts.c (find_givs_in_stmt_scev): Likewise.
1426 (add_autoinc_candidates): Pass cfun to stmt_can_throw_internal.
1427 * tree-ssa-math-opts.c (pass_cse_reciprocals::execute): Likewise.
1428 (convert_mult_to_fma_1): Likewise.
1429 (convert_to_divmod): Likewise.
1430 * tree-ssa-phiprop.c (propagate_with_phi): Likewise.
1431 * tree-ssa-pre.c (compute_avail): Pass cfun to stmt_could_throw_p.
1432 * tree-ssa-propagate.c
1433 (substitute_and_fold_dom_walker::before_dom_children): Likewise.
1434 * tree-ssa-reassoc.c (suitable_cond_bb): Likewise.
1435 (maybe_optimize_range_tests): Likewise.
1436 (linearize_expr_tree): Likewise.
1437 (reassociate_bb): Likewise.
1438 * tree-ssa-sccvn.c (copy_reference_ops_from_call): Likewise.
1439 * tree-ssa-scopedtables.c (hashable_expr_equal_p): Likewise.
1440 * tree-ssa-strlen.c (adjust_last_stmt): Likewise.
1441 (handle_char_store): Likewise.
1442 * tree-vect-data-refs.c (vect_find_stmt_data_reference): Pass cfun to
1443 stmt_can_throw_internal.
1444 * tree-vect-patterns.c (check_bool_pattern): Pass cfun to
1446 * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
1447 (vectorizable_call): Pass cfun to stmt_can_throw_internal.
1448 (vectorizable_simd_clone_call): Likewise.
1449 * value-prof.c (gimple_ic): Pass cfun to stmt_could_throw_p.
1450 (gimple_stringop_fixed_value): Likewise.
1452 2018-10-22 Ilya Leoshkevich <iii@linux.ibm.com>
1454 * config/s390/s390.c (s390_loadrelative_operand_p): Accept
1455 literal pool references.
1456 (s390_check_qrst_address): Adapt to the new behavior of
1457 s390_loadrelative_operand_p ().
1459 2018-10-22 H.J. Lu <hongjiu.lu@intel.com>
1462 * config/i386/sse.md (*andnot<mode>3_bcst): New.
1464 2018-10-22 H.J. Lu <hongjiu.lu@intel.com>
1467 * config/i386/sse.md (*<code><mode>3_bcst): New.
1469 2018-10-22 H.J. Lu <hongjiu.lu@intel.com>
1472 * config/i386/sse.md (avx512bcst): Updated for V4SI, V2DI, V8SI,
1473 V4DI, V16SI and V8DI.
1474 (*sub<mode>3<mask_name>_bcst): New.
1475 (*add<mode>3<mask_name>_bcst): Likewise.
1477 2018-10-21 Bill Schmidt <wschmidt@linux.ibm.com>
1478 Jinsong Ji <jji@us.ibm.com>
1480 * config/rs6000/emmintrin.h (_mm_movemask_pd): Replace __vector
1481 __m64 with __vector unsigned long long for compatibility.
1482 (_mm_movemask_epi8): Likewise.
1483 * config/rs6000/xmmintrin.h (_mm_cvtps_pi32): Likewise.
1484 (_mm_cvttps_pi32): Likewise.
1485 (_mm_cvtpi32_ps): Likewise.
1486 (_mm_cvtps_pi16): Likewise.
1487 (_mm_loadh_pi): Likewise.
1488 (_mm_storeh_pi): Likewise.
1489 (_mm_movehl_ps): Likewise.
1490 (_mm_movelh_ps): Likewise.
1491 (_mm_loadl_pi): Likewise.
1492 (_mm_storel_pi): Likewise.
1493 (_mm_movemask_ps): Likewise.
1494 (_mm_shuffle_pi16): Likewise.
1496 2018-10-21 H.J. Lu <hongjiu.lu@intel.com>
1499 * config/i386/avx512fintrin.h (_mm512_fnmsub_round_pd): Use
1500 __builtin_ia32_vfnmsubpd512_mask.
1501 (_mm512_mask_fnmsub_round_pd): Likewise.
1502 (_mm512_fnmsub_pd): Likewise.
1503 (_mm512_mask_fnmsub_pd): Likewise.
1504 (_mm512_maskz_fnmsub_round_pd): Use
1505 __builtin_ia32_vfnmsubpd512_maskz.
1506 (_mm512_maskz_fnmsub_pd): Likewise.
1507 (_mm512_fnmsub_round_ps): Use __builtin_ia32_vfnmsubps512_mask.
1508 (_mm512_mask_fnmsub_round_ps): Likewise.
1509 (_mm512_fnmsub_ps): Likewise.
1510 (_mm512_mask_fnmsub_ps): Likewise.
1511 (_mm512_maskz_fnmsub_round_ps): Use
1512 __builtin_ia32_vfnmsubps512_maskz.
1513 (_mm512_maskz_fnmsub_ps): Likewise.
1514 * config/i386/avx512vlintrin.h (_mm256_mask_fnmsub_pd): Use
1515 __builtin_ia32_vfnmsubpd256_mask.
1516 (_mm256_maskz_fnmsub_pd): Use __builtin_ia32_vfnmsubpd256_maskz.
1517 (_mm_mask_fnmsub_pd): Use __builtin_ia32_vfmaddpd128_mask
1518 (_mm_maskz_fnmsub_pd): Use __builtin_ia32_vfnmsubpd128_maskz.
1519 (_mm256_mask_fnmsub_ps): Use __builtin_ia32_vfnmsubps256_mask.
1520 (_mm256_mask_fnmsub_ps): Use __builtin_ia32_vfnmsubps256_mask.
1521 (_mm256_maskz_fnmsub_ps): Use __builtin_ia32_vfnmsubps256_maskz.
1522 (_mm_mask_fnmsub_ps): Use __builtin_ia32_vfnmsubps128_mask.
1523 (_mm_maskz_fnmsub_ps): Use __builtin_ia32_vfnmsubps128_maskz.
1524 * config/i386/fmaintrin.h (_mm_fnmsub_pd): Use
1525 __builtin_ia32_vfnmsubpd.
1526 (_mm256_fnmsub_pd): Use __builtin_ia32_vfnmsubpd256.
1527 (_mm_fnmsub_ps): Use __builtin_ia32_vfnmsubps.
1528 (_mm256_fnmsub_ps): Use __builtin_ia32_vfnmsubps256.
1529 (_mm_fnmsub_sd): Use __builtin_ia32_vfnmsubsd3.
1530 (_mm_fnmsub_ss): Use __builtin_ia32_vfnmsubss3.
1531 * config/i386/i386-builtin.def: Add
1532 __builtin_ia32_vfnmsubpd256_mask,
1533 __builtin_ia32_vfnmsubpd256_maskz,
1534 __builtin_ia32_vfnmsubpd128_mask,
1535 __builtin_ia32_vfnmsubpd128_maskz,
1536 __builtin_ia32_vfnmsubps256_mask,
1537 __builtin_ia32_vfnmsubps256_maskz,
1538 __builtin_ia32_vfnmsubps128_mask,
1539 __builtin_ia32_vfnmsubps128_maskz,
1540 __builtin_ia32_vfnmsubpd512_mask,
1541 __builtin_ia32_vfnmsubpd512_maskz,
1542 __builtin_ia32_vfnmsubps512_mask,
1543 __builtin_ia32_vfnmsubps512_maskz, __builtin_ia32_vfnmsubss3,
1544 __builtin_ia32_vfnmsubsd3, __builtin_ia32_vfnmsubps,
1545 __builtin_ia32_vfnmsubpd, __builtin_ia32_vfnmsubps256 and.
1546 __builtin_ia32_vfnmsubpd256.
1547 * config/i386/sse.md (fma4i_fnmsub_<mode>): New.
1548 (<avx512>_fnmsub_<mode>_maskz<round_expand_name>): Likewise.
1549 (*<sd_mask_codefor>fma_fnmsub_<mode><sd_maskz_name>_bcst_1):
1551 (*<sd_mask_codefor>fma_fnmsub_<mode><sd_maskz_name>_bcst_2):
1553 (*<sd_mask_codefor>fma_fnmsub_<mode><sd_maskz_name>_bcst_3):
1555 (fmai_vmfnmsub_<mode><round_name>): Likewise.
1557 2018-10-21 H.J. Lu <hongjiu.lu@intel.com>
1560 * config/i386/avx512fintrin.h (_mm512_fnmadd_round_pd): Use
1561 __builtin_ia32_vfnmaddpd512_mask.
1562 (_mm512_mask_fnmadd_round_pd): Likewise.
1563 (_mm512_fnmadd_pd): Likewise.
1564 (_mm512_mask_fnmadd_pd): Likewise.
1565 (_mm512_maskz_fnmadd_round_pd): Use
1566 __builtin_ia32_vfnmaddpd512_maskz.
1567 (_mm512_maskz_fnmadd_pd): Likewise.
1568 (_mm512_fnmadd_round_ps): Use __builtin_ia32_vfnmaddps512_mask.
1569 (_mm512_mask_fnmadd_round_ps): Likewise.
1570 (_mm512_fnmadd_ps): Likewise.
1571 (_mm512_mask_fnmadd_ps): Likewise.
1572 (_mm512_maskz_fnmadd_round_ps): Use
1573 __builtin_ia32_vfnmaddps512_maskz.
1574 (_mm512_maskz_fnmadd_ps): Likewise.
1575 * config/i386/avx512vlintrin.h (_mm256_mask_fnmadd_pd): Use
1576 __builtin_ia32_vfnmaddpd256_mask.
1577 (_mm256_maskz_fnmadd_pd): Use __builtin_ia32_vfnmaddpd256_maskz.
1578 (_mm_mask_fnmadd_pd): Use __builtin_ia32_vfmaddpd128_mask
1579 (_mm_maskz_fnmadd_pd): Use __builtin_ia32_vfnmaddpd128_maskz.
1580 (_mm256_mask_fnmadd_ps): Use __builtin_ia32_vfnmaddps256_mask.
1581 (_mm256_mask_fnmadd_ps): Use __builtin_ia32_vfnmaddps256_mask.
1582 (_mm256_maskz_fnmadd_ps): Use __builtin_ia32_vfnmaddps256_maskz.
1583 (_mm_mask_fnmadd_ps): Use __builtin_ia32_vfnmaddps128_mask.
1584 (_mm_maskz_fnmadd_ps): Use __builtin_ia32_vfnmaddps128_maskz.
1585 * config/i386/fmaintrin.h (_mm_fnmadd_pd): Use
1586 __builtin_ia32_vfnmaddpd.
1587 (_mm256_fnmadd_pd): Use __builtin_ia32_vfnmaddpd256.
1588 (_mm_fnmadd_ps): Use __builtin_ia32_vfnmaddps.
1589 (_mm256_fnmadd_ps): Use __builtin_ia32_vfnmaddps256.
1590 (_mm_fnmadd_sd): Use __builtin_ia32_vfnmaddsd3.
1591 (_mm_fnmadd_ss): Use __builtin_ia32_vfnmaddss3.
1592 * config/i386/i386-builtin.def: Add
1593 __builtin_ia32_vfnmaddpd256_mask,
1594 __builtin_ia32_vfnmaddpd256_maskz,
1595 __builtin_ia32_vfnmaddpd128_mask,
1596 __builtin_ia32_vfnmaddpd128_maskz,
1597 __builtin_ia32_vfnmaddps256_mask,
1598 __builtin_ia32_vfnmaddps256_maskz,
1599 __builtin_ia32_vfnmaddps128_mask,
1600 __builtin_ia32_vfnmaddps128_maskz,
1601 __builtin_ia32_vfnmaddpd512_mask,
1602 __builtin_ia32_vfnmaddpd512_maskz,
1603 __builtin_ia32_vfnmaddps512_mask,
1604 __builtin_ia32_vfnmaddps512_maskz, __builtin_ia32_vfnmaddss3,
1605 __builtin_ia32_vfnmaddsd3, __builtin_ia32_vfnmaddps,
1606 __builtin_ia32_vfnmaddpd, __builtin_ia32_vfnmaddps256 and.
1607 __builtin_ia32_vfnmaddpd256.
1608 * config/i386/sse.md (fma4i_fnmadd_<mode>): New.
1609 (<avx512>_fnmadd_<mode>_maskz<round_expand_name>): Likewise.
1610 (*<sd_mask_codefor>fma_fnmadd_<mode><sd_maskz_name>_bcst_1):
1612 (*<sd_mask_codefor>fma_fnmadd_<mode><sd_maskz_name>_bcst_2):
1614 (*<sd_mask_codefor>fma_fnmadd_<mode><sd_maskz_name>_bcst_3):
1616 (fmai_vmfnmadd_<mode><round_name>): Likewise.
1618 2018-10-21 H.J. Lu <hongjiu.lu@intel.com>
1621 * config/i386/avx512fintrin.h (_mm512_fmsub_round_pd): Use
1622 __builtin_ia32_vfmsubpd512_mask.
1623 (_mm512_mask_fmsub_round_pd): Likewise.
1624 (_mm512_fmsub_pd): Likewise.
1625 (_mm512_mask_fmsub_pd): Likewise.
1626 (_mm512_maskz_fmsub_round_pd): Use
1627 __builtin_ia32_vfmsubpd512_maskz.
1628 (_mm512_maskz_fmsub_pd): Likewise.
1629 (_mm512_fmsub_round_ps): Use __builtin_ia32_vfmsubps512_mask.
1630 (_mm512_mask_fmsub_round_ps): Likewise.
1631 (_mm512_fmsub_ps): Likewise.
1632 (_mm512_mask_fmsub_ps): Likewise.
1633 (_mm512_maskz_fmsub_round_ps): Use
1634 __builtin_ia32_vfmsubps512_maskz.
1635 (_mm512_maskz_fmsub_ps): Likewise.
1636 * config/i386/avx512vlintrin.h (_mm256_mask_fmsub_pd): Use
1637 __builtin_ia32_vfmsubpd256_mask.
1638 (_mm256_maskz_fmsub_pd): Use __builtin_ia32_vfmsubpd256_maskz.
1639 (_mm_mask_fmsub_pd): Use __builtin_ia32_vfmaddpd128_mask
1640 (_mm_maskz_fmsub_pd): Use __builtin_ia32_vfmsubpd128_maskz.
1641 (_mm256_mask_fmsub_ps): Use __builtin_ia32_vfmsubps256_mask.
1642 (_mm256_mask_fmsub_ps): Use __builtin_ia32_vfmsubps256_mask.
1643 (_mm256_maskz_fmsub_ps): Use __builtin_ia32_vfmsubps256_maskz.
1644 (_mm_mask_fmsub_ps): Use __builtin_ia32_vfmsubps128_mask.
1645 (_mm_maskz_fmsub_ps): Use __builtin_ia32_vfmsubps128_maskz.
1646 * config/i386/fmaintrin.h (_mm_fmsub_pd): Use
1647 __builtin_ia32_vfmsubpd.
1648 (_mm256_fmsub_pd): Use __builtin_ia32_vfmsubpd256.
1649 (_mm_fmsub_ps): Use __builtin_ia32_vfmsubps.
1650 (_mm256_fmsub_ps): Use __builtin_ia32_vfmsubps256.
1651 (_mm_fmsub_sd): Use __builtin_ia32_vfmsubsd3.
1652 (_mm_fmsub_ss): Use __builtin_ia32_vfmsubss3.
1653 * config/i386/i386-builtin.def: Add
1654 __builtin_ia32_vfmsubpd256_mask,
1655 __builtin_ia32_vfmsubpd256_maskz,
1656 __builtin_ia32_vfmsubpd128_mask,
1657 __builtin_ia32_vfmsubpd128_maskz,
1658 __builtin_ia32_vfmsubps256_mask,
1659 __builtin_ia32_vfmsubps256_maskz,
1660 __builtin_ia32_vfmsubps128_mask,
1661 __builtin_ia32_vfmsubps128_maskz,
1662 __builtin_ia32_vfmsubpd512_mask,
1663 __builtin_ia32_vfmsubpd512_maskz,
1664 __builtin_ia32_vfmsubps512_mask,
1665 __builtin_ia32_vfmsubps512_maskz, __builtin_ia32_vfmsubss3,
1666 __builtin_ia32_vfmsubsd3, __builtin_ia32_vfmsubps,
1667 __builtin_ia32_vfmsubpd, __builtin_ia32_vfmsubps256 and.
1668 __builtin_ia32_vfmsubpd256.
1669 * config/i386/sse.md (fma4i_fmsub_<mode>): New.
1670 (<avx512>_fmsub_<mode>_maskz<round_expand_name>): Likewise.
1671 (*<sd_mask_codefor>fma_fmsub_<mode><sd_maskz_name>_bcst_1):
1673 (*<sd_mask_codefor>fma_fmsub_<mode><sd_maskz_name>_bcst_2):
1675 (*<sd_mask_codefor>fma_fmsub_<mode><sd_maskz_name>_bcst_3):
1677 (fmai_vmfmsub_<mode><round_name>): Likewise.
1679 2018-10-21 H.J. Lu <hongjiu.lu@intel.com>
1681 * config/i386/sse.md (*<plusminus_insn><mode>3<mask_name>_bcst_1):
1682 Remove plus. Renamed to ...
1683 (*sub<mode>3<mask_name>_bcst): This.
1684 (*add<mode>3<mask_name>_bcst_2): Renamede to ...
1685 (*add<mode>3<mask_name>_bcst): This.
1687 2018-10-21 H.J. Lu <hongjiu.lu@intel.com>
1690 * config/i386/sse.md (*mul<mode>3<mask_name>_bcst): New.
1692 2018-10-21 H.J. Lu <hongjiu.lu@intel.com>
1695 * i386/avx512vlintrin.h (_mm256_or_epi32): New.
1696 (_mm_or_epi32): Likewise.
1697 (_mm256_xor_epi32): Likewise.
1698 (_mm_xor_epi32): Likewise.
1699 (_mm256_or_epi64): Likewise.
1700 (_mm_or_epi64): Likewise.
1701 (_mm256_xor_epi64): Likewise.
1702 (_mm_xor_epi64): Likewise.
1704 2018-10-20 H.J. Lu <hongjiu.lu@intel.com>
1707 * config/i386/sse.md (*<avx512>_div<mode>3<mask_name>_bcst): New.
1709 2018-10-20 Jakub Jelinek <jakub@redhat.com>
1712 * varasm.c (decode_addr_const): Handle COMPOUND_LITERAL_EXPR.
1714 2018-10-20 Andreas Schwab <schwab@linux-m68k.org>
1716 * doc/ux.texi: Move @section directly after @node.
1718 2018-10-19 Jakub Jelinek <jakub@redhat.com>
1722 * omp-low.c (check_omp_nesting_restrictions): Diagnose ordered without
1723 depend closely nested inside of loop with ordered clause with
1726 2018-10-19 David Malcolm <dmalcolm@redhat.com>
1728 * Makefile.in (TEXI_GCCINT_FILES): Add ux.texi.
1729 * doc/gccint.texi: Include ux.texi and use it in top-level menu.
1730 * doc/ux.texi: New file.
1732 2018-10-19 Segher Boessenkool <segher@kernel.crashing.org>
1734 * config/rs6000/rs6000.h (REG_ALLOC_ORDER): Move 68 (that is, CR0) to
1735 be the first CR field allocated.
1737 2018-10-19 Richard Biener <rguenther@suse.de>
1740 * config/i386/i386.c (ix86_builtin_vectorization_cost): Use
1741 TYPE_VECTOR_SUBPARTS and avoid relying on vector mode.
1743 2018-10-19 H.J. Lu <hongjiu.lu@intel.com>
1746 * config/i386/sse.md
1747 (*<plusminus_insn><mode>3<mask_name>_bcst_1): New.
1748 (*add<mode>3<mask_name>_bcst_2): Likewise.
1750 2018-10-19 H.J. Lu <hongjiu.lu@intel.com>
1752 * config/i386/sse.md
1753 (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_1):
1754 Replace nonimmediate_operand with register_operand.
1755 (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_2):
1757 (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_3):
1760 2018-10-19 Ilya Leoshkevich <iii@linux.ibm.com>
1762 PR rtl-optimization/87596
1763 * lra-constraints.c (spill_hard_reg_in_range): Use INSN_P () +
1764 lra_get_insn_recog_data () instead of lra_insn_recog_data[]
1765 for instructions in FROM..TO range.
1767 2018-10-19 Eric Botcazou <ebotcazou@adacore.com>
1769 * cfgexpand.c (expand_one_var): Use specific wording in error message
1770 for non-local frame variables.
1771 * stor-layout.c (layout_decl): Do not issue a warning for them.
1773 2018-10-19 Robin Dapp <rdapp@linux.ibm.com>
1775 * haifa-sched.c (priority): Add force_recompute parameter.
1776 (apply_replacement): Call priority () with force_recompute = true.
1777 (restore_pattern): Likewise.
1779 2018-10-18 H.J. Lu <hongjiu.lu@intel.com>
1781 * simplify-rtx.c (simplify_subreg): Limit mask of vec_merge to
1782 HOST_BITS_PER_WIDE_INT.
1783 (test_vector_ops_duplicate): Likewise.
1785 2018-10-18 H.J. Lu <hongjiu.lu@intel.com>
1788 * config/i386/sse.md (VF_AVX512): New.
1789 (avx512bcst): Likewise.
1790 (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_1):
1792 (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_2):
1794 (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_3):
1797 2018-10-18 Jonathan Wakely <jwakely@redhat.com>
1799 * doc/invoke.texi (-dumpversion): Improve grammar.
1800 (-dumpfullversion): Make more consistent with -dumpversion.
1802 2018-10-18 Uros Bizjak <ubizjak@gmail.com>
1804 * config/i386/i386.c (ix86_emit_fp_unordered_jump):
1805 Set JUMP_LABEL to the jump insn.
1806 (ix86_emit_i387_log1p): Use ix86_expand_branch to expand branch.
1807 Predict emitted jump and add label to jump insn.
1809 2018-10-18 David Malcolm <dmalcolm@redhat.com>
1811 PR tree-optimization/87562
1812 * input.c (get_substring_ranges_for_loc): Use
1813 LRK_SPELLING_LOCATION rather than LRK_MACRO_EXPANSION_POINT when
1814 getting the linemap for the endpoint. Verify that it's either
1815 in the same linemap as the start point's spelling location, or
1816 at least in the same file.
1818 2018-10-18 Richard Biener <rguenther@suse.de>
1820 * config/i386/i386.c (ix86_builtin_vectorization_cost): Do not
1821 feed width-specific load/store costs through ix86_vec_cost.
1822 * config/i386/x86-tune-costs.h (athlon_cost): Adjust.
1823 (k8_cost): Likewise.
1824 (bdver_cost): Likewise.
1825 (znver1_cost): Likewise.
1826 (btver1_cost): Likewise.
1827 (btver2_cost): Likewise.
1829 2018-10-18 H.J. Lu <hongjiu.lu@intel.com>
1831 * simplify-rtx.c (simplify_subreg): Call simplify_gen_subreg
1832 to simplify subreg of vec_merge.
1834 2018-10-18 Richard Biener <rguenther@suse.de>
1836 * config/i386/i386.c: Fix costing of vector FMA.
1838 2018-10-18 Richard Biener <rguenther@suse.de>
1840 * config/i386/i386.c (ix86_vec_cost): Remove !parallel path
1842 (ix86_builtin_vectorization_cost): For vec_construct properly
1843 cost insertion into SSE regs.
1844 (...): Adjust calls to ix86_vec_cost.
1846 2018-10-18 Richard Biener <rguenther@suse.de>
1850 2018-02-07 Richard Biener <rguenther@suse.de>
1852 PR tree-optimization/84204
1853 * tree-chrec.c (chrec_fold_plus_1): Remove size limiting in
1856 2018-10-18 H.J. Lu <hongjiu.lu@intel.com>
1859 * simplify-rtx.c (simplify_subreg): Simplify subreg of vec_merge
1861 (test_vector_ops_duplicate): Add test for a scalar subreg of a
1862 VEC_MERGE of a VEC_DUPLICATE.
1864 2018-10-17 Joseph Myers <joseph@codesourcery.com>
1866 * doc/cpp.texi (__STDC_VERSION__): Document C2X handling.
1867 * doc/invoke.texi (-std=c2x, -std=gnu2x): Document new options.
1868 * doc/standards.texi (C Language): Document C2X.
1869 * dwarf2out.c (highest_c_language), config/rl78/rl78.c
1870 (rl78_option_override): Handle "GNU C2X" language name.
1872 2018-10-17 Joseph Myers <joseph@codesourcery.com>
1874 * doc/invoke.texi (-std=c17), doc/standards.texi (C Language):
1875 Document C17 as published in 2018.
1877 2018-10-17 Eric Botcazou <ebotcazou@adacore.com>
1880 * fold-const.c (fold_truth_andor_1): If the right side is not constant,
1881 bail out if both sides do not have the same storage order.
1883 2018-10-17 Aldy Hernandez <aldyh@redhat.com>
1885 * bitmap.c (bitmap_head::dump): New.
1886 * bitmap.h (bitmap_head): Add dump().
1887 * gimple-ssa-evrp-analyze.c
1888 (evrp_range_analyzer::try_find_new_range): Adjust for value_range API.
1889 (evrp_range_analyzer::set_ssa_range_info): Same.
1890 (evrp_range_analyzer::record_ranges_from_phis): Same.
1891 (evrp_range_analyzer::record_ranges_from_stmt): Same.
1892 * gimple-ssa-evrp.c (evrp_dom_walker::before_dom_children): Same.
1893 * gimple-ssa-sprintf.c (get_int_range): Same.
1894 (format_integer): Same.
1895 (sprintf_dom_walker::handle_gimple_call): Same.
1896 * ipa-cp.c (ipcp_vr_lattice::meet_with_1): Same.
1897 (ipcp_vr_lattice::top_p): Same.
1898 (ipcp_vr_lattice::bottom_p): Same.
1899 (ipcp_vr_lattice::set_to_bottom): Same.
1900 (ipa_vr_operation_and_type_effects): Same.
1901 (propagate_vr_across_jump_function): Same.
1902 (ipcp_store_vr_results): Same.
1903 * ipa-prop.c (struct ipa_vr_ggc_hash_traits): Same.
1904 (ipa_print_node_jump_functions_for_edge): Same.
1905 (ipa_get_value_range): Same.
1906 (ipa_compute_jump_functions_for_edge): Same.
1907 (ipa_write_jump_function): Same.
1908 * tree-ssa-dom.c (simplify_stmt_for_jump_threading): Same.
1909 * tree-ssa-threadedge.c (record_temporary_equivalences_from_phis):
1911 * vr-values.c (set_value_range_to_nonnegative): Same.
1912 (set_value_range_to_truthvalue): Same.
1913 (vr_values::get_value_range): Same.
1914 (vr_values::set_defs_to_varying): Same.
1915 (vr_values::update_value_range): Same.
1916 (symbolic_range_based_on_p): Same.
1917 (vr_values::op_with_boolean_value_range_p): Same.
1918 (vr_values::extract_range_for_var_from_comparison_expr): Same.
1919 (vr_values::extract_range_from_ssa_name): Same.
1920 (vr_values::extract_range_from_binary_expr): Same.
1921 (vr_values::extract_range_from_unary_expr): Same.
1922 (vr_values::extract_range_from_cond_expr): Same.
1923 (vr_values::extract_range_from_comparison): Same.
1924 (vr_values::check_for_binary_op_overflow): Same.
1925 (vr_values::extract_range_basic): Same.
1926 (vr_values::extract_range_from_assignment): Same.
1927 (compare_ranges): Same.
1928 (compare_range_with_value): Same.
1929 (vr_values::adjust_range_with_scev): Same.
1930 (vrp_valueize): Same.
1931 (vrp_valueize_1): Same.
1932 (vr_values::get_vr_for_comparison): Same.
1933 (vr_values::compare_name_with_value): Same.
1934 (vr_values::compare_names): Same.
1935 (vr_values::vrp_evaluate_conditional): Same.
1936 (find_case_label_ranges): Same.
1937 (vr_values::vrp_visit_switch_stmt): Same.
1938 (vr_values::extract_range_from_phi_node): Same.
1939 (vr_values::simplify_div_or_mod_using_ranges): Same.
1940 (vr_values::simplify_bit_ops_using_ranges): Same.
1941 (test_for_singularity): Same.
1942 (range_fits_type_p): Same.
1943 (vr_values::simplify_cond_using_ranges_1): Same.
1944 (vr_values::simplify_switch_using_ranges): Same.
1945 (vr_values::simplify_float_conversion_using_ranges): Same.
1946 (vr_values::two_valued_val_range_p): Same.
1947 (vr_values::add_equivalence): Move to value_range::equiv_add.
1948 * vr-values.h (vr_values::add_equivalence): Remove.
1949 (VR_INITIALIZER): Remove.
1950 * tree-vrp.c (value_range::set): New.
1951 (value_range::equiv_add): New.
1952 (value_range::value_range): New.
1953 (value_range::deep_copy): New.
1954 (value_range::check): New.
1955 (value_range::equal_p): New.
1956 (value_range::ignore_equivs_equal_p): New.
1957 (value_range::operator==): New.
1958 (value_range::operator!=): New.
1959 (value_range::symbolic_p): New.
1960 (value_range::numeric_p): New.
1961 (value_range::set_undefined): New.
1962 (value_range::set_varying): New.
1963 (value_range::may_contain_p): New.
1964 (value_range::equiv_clear): New.
1965 (value_range::singleton_p): New.
1966 (value_range::intersect): New.
1967 (value_range::dump): New.
1968 (value_range::set_and_canonicalize): New.
1969 (set_value_range): Adjust for value_range API.
1970 (set_value_range_to_undefined): Same.
1971 (set_value_range_to_varying): Same.
1972 (set_and_canonicalize_value_range): Same.
1973 (set_value_range_to_nonnull): Same.
1974 (set_value_range_to_null): Same.
1975 (range_is_null): Same.
1976 (range_is_nonnull): Same.
1977 (range_int_cst_p): Same.
1978 (range_int_cst_singleton_p): Same.
1979 (symbolic_range_p): Same.
1980 (range_includes_zero_p): Same.
1981 (value_range_constant_singleton): Same.
1982 (vrp_set_zero_nonzero_bits): Same.
1983 (ranges_from_anti_range): Same.
1984 (extract_range_into_wide_ints): Same.
1985 (extract_range_from_multiplicative_op): Same.
1986 (set_value_range_with_overflow): Same.
1987 (extract_range_from_binary_expr_1): Same.
1988 (extract_range_from_unary_expr): Same.
1989 (dump_value_range): Same.
1990 (debug_value_range): Same.
1991 (vrp_prop::check_array_ref): Same.
1992 (vrp_prop::check_mem_ref): Same.
1993 (vrp_prop::vrp_initialize): Same.
1994 (vrp_prop::visit_stmt): Same.
1995 (intersect_ranges): Same.
1996 (vrp_prop::visit_phi): Same.
1997 (vrp_prop::vrp_finalize): Same.
1998 (determine_value_range_1): Same.
1999 (determine_value_range): Same.
2000 (vrp_intersect_ranges_1): Rename to...
2001 (vrp_intersect_1): this.
2002 (vrp_intersect_ranges): Rename to...
2003 (value_range::intersect_helper): ...this.
2004 (vrp_meet_1): Rename to...
2005 (value_range::union_helper): ...this.
2006 (vrp_meet): Rename to...
2007 (value_range::union_): ...this.
2008 (copy_value_range): Remove.
2009 * tree-vrp.h (struct value_range): Rewrite into a proper class.
2010 (value_range::vrtype): New.
2011 (value_range::type): New.
2012 (value_range::equiv): New.
2013 (value_range::min): New.
2014 (value_range::max): New.
2015 (value_range::varying_p): New.
2016 (value_range::undefined_p): New.
2017 (value_range::null_p): New.
2018 (value_range::equiv_add): New.
2019 (copy_value_range): Remove.
2021 2018-10-17 David Malcolm <dmalcolm@redhat.com>
2023 * Makefile.in (SELFTEST_TARGETS): New.
2024 (selftest) Change from s-selftest-c to $(SELFTEST_TARGETS).
2025 (C_SELFTEST_FLAGS, C_SELFTEST_DEPS, s-selftest-c, selftest-c-gdb)
2026 (selftest-gdb, selftest-c-valgrind, selftest-valgrind): Move to
2028 (CPP_SELFTEST_FLAGS, CPP_SELFTEST_DEPS, s-selftest-c++)
2029 (selftest-c++-gdb, selftest-c++-valgrind): Move to
2031 * configure: Regenerate.
2032 * configure.ac (selftest_languages): New.
2034 2018-10-17 Aldy Hernandez <aldyh@redhat.com>
2036 * tree-vrp.c (extract_range_from_multiplicative_op): Remove
2037 overflow wraps argument.
2038 (extract_range_from_binary_expr_1): Do not pass overflow wraps to
2039 wide_int_range_multiplicative_op.
2040 * wide-int-range.cc (wide_int_range_mult_wrapping): Remove
2041 overflow wraps argument.
2042 (wide_int_range_multiplicative_op): Same.
2043 (wide_int_range_lshift): Same.
2044 (wide_int_range_div): Same.
2045 * wide-int-range.h (wide_int_range_multiplicative_op): Same.
2046 (wide_int_range_lshift): Same.
2047 (wide_int_range_div): Same.
2049 2018-10-17 Aldy Hernandez <aldyh@redhat.com>
2051 * wide-int-range.h (wide_int_range_shift_undefined_p): Adjust to
2052 use sign as argument.
2053 * tree-vrp.c (extract_range_from_binary_expr_1): Pass sign to
2054 wide_int_range_shift_undefined_p.
2056 2018-10-16 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
2058 * config/aarch64/aarch64.md (despeculate_copy<ALLI_TI:mode>):
2060 (@despeculate_copy<ALLI_TI:mode>): ... This.
2061 * config/aarch64/aarch64.c (aarch64_speculation_safe_value): Remove
2064 2018-10-16 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2066 * config.gcc: Obsolete *-*-solaris2.10*.
2067 * doc/install.texi (Specific, *-*-solaris2*): Document it.
2069 2018-10-12 Jeff Law <law@redhat.com>
2071 * config/ft32/ft32.md (ft32_general_movsrc_operand): Disable
2072 reg + sym +- const_int addressing modes.
2074 2018-10-15 David Malcolm <dmalcolm@redhat.com>
2076 * common.opt (fdiagnostics-minimum-margin-width=): New option.
2077 * diagnostic-show-locus.c (layout::layout): Apply the minimum
2079 (layout::start_annotation_line): Only print up to 3 of the
2080 margin character, to avoid touching the left-hand side.
2081 (selftest::test_diagnostic_show_locus_fixit_lines): Update for
2082 minimum margin width, as set by test_diagnostic_context's ctor.
2083 (selftest::test_fixit_insert_containing_newline): Likewise.
2084 (selftest::test_fixit_insert_containing_newline_2): Likewise.
2085 (selftest::test_line_numbers_multiline_range): Clear
2086 dc.min_margin_width.
2087 * diagnostic.c (diagnostic_initialize): Initialize
2089 * diagnostic.h (struct diagnostic_context): Add field
2091 * doc/invoke.texi: Add -fdiagnostics-minimum-margin-width=.
2092 * opts.c (common_handle_option): Handle
2093 OPT_fdiagnostics_minimum_margin_width_.
2094 * selftest-diagnostic.c
2095 (selftest::test_diagnostic_context::test_diagnostic_context):
2096 Initialize min_margin_width to 6.
2097 * toplev.c (general_init): Initialize global_dc->min_margin_width.
2099 2018-10-15 David Malcolm <dmalcolm@redhat.com>
2101 * gcc-rich-location.h (gcc_rich_location::add_location_if_nearby):
2102 Fix usage of "error_at_rich_loc" in the comment.
2104 2018-10-15 Renlin Li <renlin.li@arm.com>
2107 * tree-vectorizer.c (try_vectorize_loop_1): Don't use
2108 if-conversioned loop when it contains ifn with types not
2109 supported by backend.
2110 * internal-fn.c (expand_direct_optab_fn): Add an assert.
2111 (direct_internal_fn_supported_p): New helper function.
2112 * internal-fn.h (direct_internal_fn_supported_p): Declare.
2114 2018-10-15 Jakub Jelinek <jakub@redhat.com>
2117 * common/config/i386/i386-common.c (OPTION_MASK_ISA_AVX512F_UNSET):
2118 Remove OPTION_MASK_ISA_AVX5124FMAPS_UNSET and
2119 OPTION_MASK_ISA_AVX5124VNNIW_UNSET.
2121 2018-10-15 Bin Cheng <bin.cheng@linux.alibaba.com>
2123 PR tree-optimization/87022
2124 * tree-loop-distribution.c (pg_add_dependence_edges): Check all
2125 bits in dist vector rather than the first one.
2127 2018-10-15 Richard Biener <rguenther@suse.de>
2130 * tree-ssa-structalias.c (struct vls_data): Add escaped_p member.
2131 (visit_loadstore): When a used restrict tag escaped verify that
2132 the points-to solution of "other" pointers do not include
2134 (compute_dependence_clique): If a used restrict tag escaped
2135 communicated that down to visit_loadstore.
2137 2018-10-15 Andreas Krebbel <krebbel@linux.ibm.com>
2139 * config/s390/s390.c (s390_expand_vec_init): Force vector element
2140 into reg if it isn't a general operand.
2142 2018-10-14 H.J. Lu <hongjiu.lu@intel.com>
2145 * config/i386/sse.md (*vec_dupv2di): Add register source to
2148 2018-10-14 H.J. Lu <hongjiu.lu@intel.com>
2151 * common/config/i386/i386-common.c (OPTION_MASK_ISA_AVX512F_UNSET):
2152 Add OPTION_MASK_ISA_AVX512IFMA_UNSET,
2153 OPTION_MASK_ISA_AVX5124FMAPS_UNSET and
2154 OPTION_MASK_ISA_AVX5124VNNIW_UNSET.
2156 2018-10-13 Eric Botcazou <ebotcazou@adacore.com>
2158 * dwarf2cfi.c (struct dw_trace_info): Add args_size_defined_for_eh.
2159 (notice_args_size): Set it in the current trace if no insn that can
2160 throw internally has been seen yet.
2161 (connect_traces): When connecting args_size between traces, allow the
2162 incoming values not to match if there is an insn setting it before the
2163 first insn that can throw internally; in that case, force the creation
2164 of a CFI note on this latter insn.
2166 2018-10-13 Jonathan Wakely <jwakely@redhat.com>
2168 * opt-problem.h (opt_wrapper): Use template-argument-list when naming
2169 the base class, because using the injected-class-name was not clearly
2170 specified until DR 176.
2172 2018-10-12 Paul Koning <ni1d@arrl.net>
2174 * config/pdp11/pdp11.md (doloop_end): New expander.
2175 (doloop_end_insn): renamed from "doloop_end".
2176 (addqi3): New pattern.
2177 (subqi3): New pattern.
2178 * config/pdp11/predicates.md (incdec_operand): New predicate.
2180 2018-10-12 Yury Gribov <tetra2005@gmail.com>
2183 * real.c (format_helper::can_represent_integral_type_p): New function
2184 * real.h (format_helper::can_represent_integral_type_p): Ditto.
2185 * match.pd: New pattern.
2187 2018-10-12 Alexandre Oliva <oliva@adacore.com>
2189 * configure.ac: Introduce --enable-large-address-aware
2190 to define MINGW_DEFAULT_LARGE_ADDR_AWARE.
2191 * doc/install.texi: Document it.
2192 * configure, config.in: Rebuilt.
2193 * config/i386/mingw32.h (LINK_SPEC_LARGE_ADDR_AWARE): Define,
2194 based on MINGW_DEFAULT_LARGE_ADDR_AWARE.
2195 (LINK_SPEC): Insert it.
2196 * config/i386/mingw-w64.h: Likewise.
2198 * cygming.h (HAVE_GAS_ALIGNED_COMM): Fallback-define.
2200 2018-10-12 Peter Bergner <bergner@linux.ibm.com>
2202 PR rtl-optimization/87600
2203 * ira-lives (non_conflicting_reg_copy_p): Disable for non LRA targets.
2205 2018-10-12 Paul Koning <ni1d@arrl.net>
2207 * doc/md.texi (doloop_end): Document that the pattern code may
2208 need to check operand mode.
2210 2018-10-12 Wilco Dijkstra <wdijkstr@arm.com>
2212 * config/aarch64/aarch64.md (zero_extendsidi2_aarch64): Add alternatives
2213 to zero-extend between int and floating-point registers.
2214 (load_pair_zero_extendsidi2_aarch64): Add alternative for zero-extended
2215 ldp into floating-point registers. Add type and arch attributes.
2216 (zero_extend<SHORT:mode><GPI:mode>2_aarch64): Add arch attribute.
2217 Use f_loads for type attribute.
2219 2018-10-11 Martin Sebor <msebor@redhat.com>
2221 * doc/extend.texi (attribute packed): Correct typos.
2223 2018-10-11 Martin Sebor <msebor@redhat.com>
2225 * doc/extend.texi (attribute flatten): Mention interaction with
2228 2018-10-11 Jan Hubicka <hubicka@ucw.cz>
2231 * cgraphclones.c (cgraph_node::create_version_clone_with_body):
2232 Set new_decl virtual flag to zero.
2234 2018-10-11 Martin Sebor <msebor@redhat.com>
2237 * doc/extend.texi (attribute format_arg): Discuss using multiple
2238 attributes on a single function.
2240 2018-10-11 Giuliano Belinassi <giuliano.belinassi@usp.br>
2242 PR tree-optimization/86829
2243 * match.pd (sin (atan (x))): New simplification rules.
2244 (cos (atan (x))): Likewise.
2245 * real.c (build_sinatan_real): New function.
2246 * real.h (build_sinatan_real): Prototype.
2248 2018-10-11 Will Schmidt <will_schmidt@vnet.ibm.com>
2250 * config/rs6000/rs6000.c (map_to_integral_tree_type): New helper
2252 (fold_mergeeo_helper): New helper function.
2253 (rs6000_gimple_fold_builtin): Add hooks for vec_mergee and vec_mergeo
2254 intrinsics. Correct some whitespace indentation issues.
2256 2018-10-11 Wilco Dijkstra <wdijkstr@arm.com>
2259 * config/aarch64/aarch64.c (aarch64_mask_and_shift_for_ubfiz_p):
2260 Use HOST_WIDE_INT_1U for shift.
2262 2018-10-11 Doug Rupp <rupp@adacore.com>
2263 Olivier Hainque <hainque@adacore.com>
2265 * config/rs6000/vxworks.h (VXWORKS_RELAX_LINK_SPEC): New macro.
2266 Pass --relax to the linker for RTPs.
2267 (LINK_SPEC): Append VXWORKS_RELAX_LINK_SPEC.
2269 2018-10-11 Andrew Stubbs <ams@codesourcery.com>
2270 Jan Hubicka <jh@suse.cz>
2271 Martin Jambor <mjambor@suse.cz>
2273 * print-rtl.c (print_rtx_operand_codes_E_and_V): Print how many times
2274 the same elements are repeated rather than printing all of them.
2275 * read-rtl.c (rtx_reader::read_rtx_operand): Recognize and expand
2276 "repeated" elements.
2277 * read-rtl-function.c (test_loading_repeat): New function.
2278 (read_rtl_function_c_tests): Call test_loading_repeat.
2279 * rtl-tests.c (test_dumping_repeat): New function.
2280 (rtl_tests_c_tests): Call test_dumping_repeat.
2282 2018-10-11 Richard Biener <rguenther@suse.de>
2284 * config/i386/x86-tune-costs.h (bdver?_memcpy, bdver?_memset,
2285 bdver?_cost): Unify to ...
2286 (bdver_memcpy, bdver_memset, bdver_cost): ... this.
2287 * config/i386/i386.c (processor_cost_table): Adjust.
2289 2018-10-10 Eric Botcazou <ebotcazou@adacore.com>
2292 * cgraphunit.c (cgraph_node::expand_thunk): Force DECL_IGNORED_P on
2293 the thunk when expanding to GIMPLE.
2295 2018-10-10 Bernd Edlinger <bernd.edlinger@hotmail.de>
2297 * varasm.c (mergeable_string_section): Don't try to move zero-length
2298 strings to the merge section.
2300 2018-10-10 Uros Bizjak <ubizjak@gmail.com>
2303 * config/i386/mmx.md (const_vector 0 -> mem splitter): New splitter.
2305 2018-10-10 Jakub Jelinek <jakub@redhat.com>
2308 * config/i386/i386-builtin.def (IX86_BUILTIN_RDPMC): Move from args set
2309 to special_args set.
2311 2018-10-10 Richard Biener <rguenther@suse.de>
2313 * config/i386/sse.md (reduc_plus_scal_v8df, reduc_plus_scal_v4df,
2314 reduc_plus_scal_v2df, reduc_plus_scal_v16sf, reduc_plus_scal_v8sf,
2315 reduc_plus_scal_v4sf): Merge into pattern reducing to half width
2316 and recursing and pattern terminating the recursion on SSE
2317 vector width using ix86_expand_reduc.
2318 (reduc_sminmax_scal_<mode>): Split into part reducing to half
2319 width and recursing and SSE2 vector variant doing the final
2320 reduction with ix86_expand_reduc.
2321 (reduc_uminmax_scal_<mode>): Likewise for the AVX512 variants
2322 with terminating the recursion at AVX level, splitting that
2325 2018-10-09 David Malcolm <dmalcolm@redhat.com>
2327 * genmatch.c (error_cb): Rename to...
2328 (diagnostic_cb): ...this, converting int params to enums.
2329 (fatal_at): Update for renaming.
2330 (warning_at): Likewise.
2332 * input.c (selftest::ebcdic_execution_charset::apply):
2333 Update for renaming of...
2334 (selftest::ebcdic_execution_charset::on_error): ...this, renaming
2336 (selftest::ebcdic_execution_charset::on_diagnostic): ...this,
2337 converting level and reason to enums.
2338 (class selftest::lexer_error_sink): Rename to...
2339 (class selftest::lexer_test_options): ...this, renaming field
2340 "m_errors" to "m_diagnostics".
2341 (selftest::lexer_test_options::apply): Update for renaming of...
2342 (selftest::lexer_test_options::on_error): ...this, renaming to...
2343 (selftest::lexer_test_options::on_diagnostic): ...this
2344 converting level and reason to enums.
2345 (selftest::test_lexer_string_locations_raw_string_unterminated):
2346 Update for renamings.
2347 * opth-gen.awk (struct cpp_reason_option_codes_t): Use enum for
2350 2018-10-09 Paul A. Clarke <pc@us.ibm.com>
2352 * config.gcc (powerpc*-*-*): Add pmmintrin.h to extra_headers.
2353 * config/rs6000/pmmintrin.h: New file.
2355 2018-10-09 Eric Botcazou <ebotcazou@adacore.com>
2357 PR tree-optimization/86659
2358 * gimple-match.h (gimple_match_op constructors): Initialize reverse.
2360 2018-10-09 Richard Biener <rguenther@suse.de>
2362 PR tree-optimization/63155
2363 * tree-ssa-structalias.c: Include tree-ssa.h.
2364 (get_constraint_for_ssa_var): For undefs return nothing_id.
2365 (find_func_aliases): Cleanup PHI handling.
2367 2018-10-09 Richard Biener <rguenther@suse.de>
2369 * tree-vectorizer.c (dump_stmt_cost): Fix cut&paste missing
2372 2018-10-09 Martin Liska <mliska@suse.cz>
2374 * asan.c (asan_emit_stack_protection): If a stack variable
2375 is located in a same file as current function, then emit
2376 line info into variable definition string.
2378 2018-10-08 Eric Botcazou <ebotcazou@adacore.com>
2380 * print-rtl.c (rtx_writer::print_rtx_operand_code_i): Print column
2383 2018-10-08 Eric Botcazou <ebotcazou@adacore.com>
2385 * cgraphunit.c (cgraph_node::expand_thunk): Do not force DECL_IGNORED_P
2388 2018-10-08 Eric Botcazou <ebotcazou@adacore.com>
2390 PR tree-optimization/86659
2391 * gimple-match.h (struct gimple_match_op): Add reverse field.
2392 (gimple_match_op::set_op): New overloaded method.
2393 * gimple-match-head.c (maybe_build_generic_op) <BIT_FIELD_REF>: Set
2394 the REF_REVERSE_STORAGE_ORDER flag on the value.
2395 (gimple_simplify) <GIMPLE_ASSIGN>: For BIT_FIELD_REF, propagate the
2396 REF_REVERSE_STORAGE_ORDER flag and avoid simplifying if it is set.
2398 2018-10-08 Richard Sandiford <richard.sandiford@arm.com>
2401 * gimple-ssa-backprop.c (backprop::intersect_uses): Use
2402 FOR_EACH_IMM_USE_FAST instead of FOR_EACH_IMM_USE_STMT.
2404 2018-10-08 H.J. Lu <hongjiu.lu@intel.com>
2407 * config/i386/avx512fintrin.h (_mm512_mask_fmaddsub_round_pd):
2408 Defined with __builtin_ia32_vfmaddsubpd512_mask.
2410 2018-10-08 Richard Biener <rguenther@suse.de>
2412 * config/i386/x86-tune-costs.h (znver1_cost): Make AVX256 vector loads
2413 cost the same as AVX128 ones.
2415 2018-10-08 Paul Koning <ni1d@arrl.net>
2417 * config/pdp11/pdp11-protos.h (output_block_move): Remove.
2418 (expand_block_move): New function.
2419 * config/pdp11/pdp11.c (output_block_move): Remove.
2420 (expand_block_move): New function.
2421 * config/pdp11/pdp11.h (MOVE_RATIO): New definition.
2422 * config/pdp11/pdp11.md (movmemhi): Use expand_block_move.
2423 (*movmemhi1): Remove.
2425 2018-10-08 Robin Dapp <rdapp@linux.ibm.com>
2427 * config/s390/2827.md: Increase latencies for some FP instructions.
2429 2018-10-08 Richard Biener <rguenther@suse.de>
2431 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost):
2433 * tree-vectorizer.c (dump_stmt_cost): Add cost param and dump it.
2434 * tree-vectorizer.h (dump_stmt_cost): Adjust.
2435 (add_stmt_cost): Dump return value of the hook.
2437 2018-10-08 Richard Biener <rguenther@suse.de>
2439 PR tree-optimization/63155
2440 * tree-ssa-propagate.c (add_ssa_edge): Do cheap check first.
2441 (ssa_propagation_engine::ssa_propagate): Remove redundant
2442 bitmap bit clearing.
2444 2018-10-05 Peter Bergner <bergner@linux.ibm.com>
2446 PR rtl-optimization/86939
2447 PR rtl-optimization/87479
2448 * ira.h (non_conflicting_reg_copy_p): New prototype.
2449 * ira-lives.c (ignore_reg_for_conflicts): New static variable.
2450 (make_hard_regno_dead): Don't add conflicts for register
2451 ignore_reg_for_conflicts.
2452 (make_object_dead): Likewise.
2453 (non_conflicting_reg_copy_p): New function.
2454 (process_bb_node_lives): Set ignore_reg_for_conflicts for copies.
2455 Remove special conflict handling of REAL_PIC_OFFSET_TABLE_REGNUM.
2456 * lra-lives.c (ignore_reg_for_conflicts): New static variable.
2457 (make_hard_regno_dead): Don't add conflicts for register
2458 ignore_reg_for_conflicts. Remove special conflict handling of
2459 REAL_PIC_OFFSET_TABLE_REGNUM. Remove now unused argument
2460 check_pic_pseudo_p and update callers.
2461 (mark_pseudo_dead): Don't add conflicts for register
2462 ignore_reg_for_conflicts.
2463 (process_bb_lives): Set ignore_reg_for_conflicts for copies.
2465 2018-10-05 Andrew Waterman <andrew@sifive.com>
2466 Jim Wilson <jimw@sifive.com>
2468 * config/riscv/riscv.md (f<quiet_pattern>_quiet<ANYF:mode><X:mode>4):
2469 Add define_expand. Add ! HONOR_SNANS check to current pattern. Add
2470 new pattern using HONOR_SNANS that emits one extra instruction.
2472 2018-10-05 Segher Boessenkool <segher@kernel.crashing.org>
2474 * config/rs6000/rs6000.md (unnamed mfcr scc_comparison_operator
2475 patterns): Merge SI and DI patterns to a GPR pattern.
2476 (unnamed define_insn and define_split for record form of that): Merge
2477 to a single define_insn_and_split pattern.
2479 2018-10-05 David Malcolm <dmalcolm@redhat.com>
2482 * input.c (expand_location_to_spelling_point): Add param "aspect"
2483 and use rather than hardcoding LOCATION_ASPECT_CARET.
2484 (get_substring_ranges_for_loc): Handle the case of a single token
2485 within a macro expansion.
2486 * input.h (expand_location_to_spelling_point): Add "aspect" param,
2487 defaulting to LOCATION_ASPECT_CARET.
2489 2018-10-05 Paul Koning <ni1d@arrl.net>
2491 * config/pdp11/pdp11.c (TARGET_CXX_GUARD_TYPE): Define.
2492 (TARGET_CXX_CLASS_DATA_ALWAYS_COMDAT): Define.
2493 (TARGET_CXX_LIBRARY_RTTI_COMDAT): Define.
2494 (pdp11_guard_type): New function.
2496 2018-10-05 Paul Koning <ni1d@arrl.net>
2498 * config/pdp11/pdp11.h (FLOAT_TYPE_SIZE): Always 32.
2499 * config/pdp11/pdp11.opt (mfloat32): Remove.
2501 * doc/invoke.texi (pdp11 -mfloat32): Remove:
2502 (pdp11 -mfloat64): Remove.
2504 2018-10-05 Uros Bizjak <ubizjak@gmail.com>
2506 * config/i386/i386.md (*cmpxf_cc_i387): Remove pattern.
2507 (*cmp<mode>_cc_i387): Ditto.
2508 (*cmpu<mode>_cc_i387): Ditto.
2509 (*cmp<X87MODEF:mode>_<SWI24:mode>_cc_i387): Ditto.
2510 * config/i386/i386.c (ix86_expand_fp_compare): Remove
2512 <case IX86_FPCMP_SAHF>: Do not generate pattern with HImode clobber.
2513 Emit x86_sahf_1 pattern.
2514 (ix86_expand_compare): Update call to ix86_expand_fp_compare.
2515 (ix86_expand_carry_flag_compare): Ditto.
2517 2018-10-05 Uros Bizjak <ubizjak@gmail.com>
2519 * config/i386/i386.md (*cmpxf_i387): Change operand 2 predicate
2520 to reg_or_0_operand. Add "C" constraint.
2521 (*cmpxf_cc_i387): Ditto.
2522 (*cmp<mode>_i387): Change operand 2 predicate
2523 to nonimm_or_0_operand. Add "C" constraint.
2524 (*cmp<mode>_cc_i387): Ditto.
2525 (*cmp<mode>_0_i387): Remove insn pattern.
2526 (*cmp<mode>_0_cc_i387): Ditto.
2528 2018-10-05 Uros Bizjak <ubizjak@gmail.com>
2530 * config/i386/constraints.md ("C"): Do not depend on TARGET_SSE.
2531 * config/i386/predicates.md (nonimm_or_0_operand): Rename
2532 from vector_move_operand. Update all uses.
2534 2018-10-05 Martin Sebor <msebor@redhat.com>
2536 PR tree-optimization/87490
2537 * builtins.c (expand_builtin_strnlen): Handle a null data.decl
2540 2018-10-05 Richard Biener <rguenther@suse.de>
2542 PR tree-optimization/63155
2543 * tree-ssa-ccp.c (ccp_propagate::visit_phi): Avoid excess
2544 vertical space in dumpfiles.
2545 * tree-ssa-propagate.h
2546 (ssa_propagation_engine::process_ssa_edge_worklist): Remove.
2547 * tree-ssa-propagate.c (cfg_blocks_back): New global.
2548 (ssa_edge_worklist_back): Likewise.
2549 (curr_order): Likewise.
2550 (cfg_blocks_get): Remove abstraction.
2551 (cfg_blocks_add): Likewise.
2552 (cfg_blocks_empty_p): Likewise.
2553 (add_ssa_edge): Add to current or next worklist based on
2555 (add_control_edge): Likewise.
2556 (ssa_propagation_engine::process_ssa_edge_worklist): Fold
2558 (ssa_propagation_engine::ssa_propagate): ... here. Unify
2559 iteration from CFG and SSA edge worklist so we process
2560 everything in RPO order, prioritizing forward progress
2562 (ssa_prop_init): Allocate new worklists, do not dump
2564 (ssa_prop_fini): Free new worklists.
2566 2018-10-05 Richard Biener <rguenther@suse.de>
2568 * tree-core.h (tree_block::abstract_flag): Remove.
2569 (tree_block::block_num): Make full 32bits.
2570 * tree.def (BLOCK): Remove docs about BLOCK_ABSTRACT.
2571 * tree.h (BLOCK_ABSTRACT): Remove.
2572 * dwarf2out.c (gen_lexical_block_die): Remove dead code
2573 resulting from BLOCK_ABSTRACT being always false.
2574 (gen_inlined_subroutine_die): Likewise.
2575 (gen_block_die): Likewise.
2576 * tree.c (block_ultimate_origin): Likewise.
2577 * tree-pretty-print.c (dump_block_node): Remove code dealing
2578 with BLOCK_ABSTRACT.
2579 * tree-ssa-live.c (dump_scope_block): Likewise.
2580 * tree-streamer-in.c (unpack_ts_block_value_fields): Likewise.
2581 * tree-streamer-out.c (pack_ts_block_value_fields): Likewise.
2583 2018-10-05 Richard Biener <rguenther@suse.de>
2585 * config/i386/i386.c (ix86_add_stmt_cost): When scalar cost
2586 is asked for initialize mode to the component mode of the
2589 2018-10-05 H.J. Lu <hongjiu.lu@intel.com>
2592 * config/i386/gnu-user.h (ASM_SPEC): Don't pass -msse2avx to
2593 assembler for -mavx.
2594 * config/i386/gnu-user64.h (ASM_SPEC): Likewise.
2596 2018-10-05 Segher Boessenkool <segher@kernel.crashing.org>
2599 * config/rs6000/rs6000-builtin.def (RS6000_BUILTIN_SET_FPSCR_DRN): Use
2601 * config/rs6000/rs6000.md (rs6000_set_fpscr_rn): Require the operand
2602 to be DImode. When using mffscrn, force the operand to a register.
2604 2018-10-04 Uros Bizjak <ubizjak@gmail.com>
2606 * config/i386/i386.md (*fop_<X87MODEF:mode>_2_i387): Macroize insn
2607 from *fop_<MODEF:mode>_2_i387 and *fop_xf_2_i387 using
2608 X87MODEF mode iterator.
2609 (*fop_<X87MODEF:mode>_3_i387): Macroize insn from
2610 *fop_<MODEF:mode>_3_i387 and *fop_xf_3_i387 using
2611 X87MODEF mode iterator.
2613 2018-10-04 Vinay Kumar <vinay.kumar@blackfigtech.com>
2615 * doc/invoke.texi (-Wno-prio-ctor-dtor): Document new warning
2616 -Wno-prio-ctor-dtor.
2618 2018-10-04 David Malcolm <dmalcolm@redhat.com>
2620 * Makefile.in (OBJS): Add opt-problem.o.
2621 * dump-context.h: Include "selftest.h.
2622 (selftest::temp_dump_context): New forward decl.
2623 (class dump_context): Make friend of class
2624 selftest::temp_dump_context.
2625 (dump_context::dump_loc_immediate): New decl.
2626 (class dump_pretty_printer): Move here from dumpfile.c.
2627 (class temp_dump_context): Move to namespace selftest.
2628 (temp_dump_context::temp_dump_context): Add param
2629 "forcibly_enable_dumping".
2630 (selftest::verify_dumped_text):
2631 (ASSERT_DUMPED_TEXT_EQ): Move here from dumpfile.c.
2632 (selftest::verify_item):
2633 (ASSERT_IS_TEXT): Move here from dumpfile.c.
2634 (ASSERT_IS_TREE): Likewise.
2635 (ASSERT_IS_GIMPLE): Likewise.
2636 * dumpfile.c (dump_context::dump_loc): Move immediate dumping
2638 (dump_context::dump_loc_immediate): ...this new function.
2639 (class dump_pretty_printer): Move to dump-context.h.
2640 (dump_switch_p_1): Don't enable MSG_PRIORITY_REEMITTED.
2641 (opt_info_switch_p_1): Enable MSG_PRIORITY_REEMITTED.
2642 (temp_dump_context::temp_dump_context): Move to "selftest"
2643 namespace. Add param "forcibly_enable_dumping", and use it to
2644 conditionalize the use of m_pp;
2645 (selftest::verify_dumped_text): Make non-static.
2646 (ASSERT_DUMPED_TEXT_EQ): Move to dump-context.h.
2647 (selftest::verify_item): Make non-static.
2648 (ASSERT_IS_TEXT): Move to dump-context.h.
2649 (ASSERT_IS_TREE): Likewise.
2650 (ASSERT_IS_GIMPLE): Likewise.
2651 (selftest::test_capture_of_dump_calls): Pass "true" for new
2652 param of temp_dump_context.
2653 * dumpfile.h (enum dump_flag): Add MSG_PRIORITY_REEMITTED, adding
2654 it to MSG_ALL_PRIORITIES. Update values of TDF_COMPARE_DEBUG and
2656 * opt-problem.cc: New file.
2657 * opt-problem.h: New file.
2658 * optinfo-emit-json.cc
2659 (selftest::test_building_json_from_dump_calls): Pass "true" for
2660 new param of temp_dump_context.
2661 * optinfo.cc (optinfo_kind_to_dump_flag): New function.
2662 (optinfo::emit_for_opt_problem): New function.
2663 (optinfo::emit): Clarity which emit_item is used.
2664 * optinfo.h (optinfo::get_dump_location): New accessor.
2665 (optinfo::emit_for_opt_problem): New decl.
2666 (optinfo::emit): Make const.
2667 * selftest-run-tests.c (selftest::run_tests): Call
2668 selftest::opt_problem_cc_tests.
2669 * selftest.h (selftest::opt_problem_cc_tests): New decl.
2670 * tree-data-ref.c (dr_analyze_innermost): Convert return type from
2671 bool to opt_result, converting fprintf messages to
2672 opt_result::failure_at calls. Add "stmt" param for use by the
2674 (create_data_ref): Pass "stmt" to the dr_analyze_innermost call.
2675 (runtime_alias_check_p): Convert return type from bool to
2676 opt_result, converting dump_printf calls to
2677 opt_result::failure_at, using the statement DDR_A for their
2679 (find_data_references_in_stmt): Convert return type from bool to
2680 opt_result, converting "return false" to opt_result::failure_at
2682 * tree-data-ref.h: Include "opt-problem.h".
2683 (dr_analyze_innermost): Convert return type from bool to opt_result,
2684 and add a const gimple * param.
2685 (find_data_references_in_stmt): Convert return type from bool to
2687 (runtime_alias_check_p): Likewise.
2688 * tree-predcom.c (find_looparound_phi): Pass "init_stmt" to
2689 dr_analyze_innermost.
2690 * tree-vect-data-refs.c (vect_mark_for_runtime_alias_test):
2691 Convert return type from bool to opt_result, adding a message for
2692 the PARAM_VECT_MAX_VERSION_FOR_ALIAS_CHECKS zero case.
2693 (vect_analyze_data_ref_dependence): Convert return type from bool
2694 to opt_result. Change sense of return type from "false"
2695 effectively meaning "no problems" to "false" meaning a problem,
2696 so that "return false" becomes "return opt_result::success".
2697 Convert "return true" calls to opt_result::failure_at, using
2698 the location of statement A rather than vect_location.
2699 (vect_analyze_data_ref_dependences): Convert return type from bool
2701 (verify_data_ref_alignment): Likewise, converting dump_printf_loc
2702 calls to opt_result::failure_at, using the stmt location rather
2704 (vect_verify_datarefs_alignment): Convert return type from bool
2706 (vect_enhance_data_refs_alignment): Likewise. Split local "stat"
2707 into multiple more-tightly-scoped copies.
2708 (vect_analyze_data_refs_alignment): Convert return type from bool
2710 (vect_analyze_data_ref_accesses): Likewise, converting a
2711 "return false" to a "return opt_result::failure_at", adding a
2713 (vect_prune_runtime_alias_test_list): Convert return type from
2714 bool to opt_result, converting dump_printf_loc to
2715 opt_result::failure_at. Add a %G to show the pertinent statement,
2716 and use the stmt's location rather than vect_location.
2717 (vect_find_stmt_data_reference): Convert return type from
2718 bool to opt_result, converting dump_printf_loc to
2719 opt_result::failure_at, using stmt's location.
2720 (vect_analyze_data_refs): Convert return type from bool to
2721 opt_result. Convert "return false" to "return
2722 opt_result::failure_at", adding messages as needed.
2723 * tree-vect-loop.c (vect_determine_vf_for_stmt_1): Convert return
2724 type from bool to opt_result.
2725 (vect_determine_vf_for_stmt): Likewise.
2726 (vect_determine_vectorization_factor): Likewise, converting
2727 dump_printf_loc to opt_result::failure_at, using location of phi
2728 rather than vect_location.
2729 (vect_analyze_loop_form_1): Convert return type from bool to
2730 opt_result, converting dump_printf_loc calls, retaining the use of
2732 (vect_analyze_loop_form): Convert return type from loop_vec_info
2733 to opt_loop_vec_info.
2734 (vect_analyze_loop_operations): Convert return type from bool to
2735 opt_result, converting dump_printf_loc calls, using the location
2736 of phi/stmt rather than vect_location where available. Convert
2737 various "return false" to "return opt_result::failure_at" with
2738 "unsupported phi" messages.
2739 (vect_get_datarefs_in_loop): Convert return type from bool to
2740 opt_result. Add a message for the
2741 PARAM_LOOP_MAX_DATAREFS_FOR_DATADEPS failure.
2742 (vect_analyze_loop_2): Convert return type from bool to
2743 opt_result. Ensure "ok" is set to a opt_result::failure_at before
2744 each "goto again;", adding new messages where needed.
2745 Add "unsupported grouped {store|load}" messages.
2746 (vect_analyze_loop): Convert return type from loop_vec_info to
2748 * tree-vect-slp.c (vect_analyze_slp): Convert return type from
2750 * tree-vect-stmts.c (process_use): Likewise, converting
2751 dump_printf_loc call and using stmt location, rather than
2753 (vect_mark_stmts_to_be_vectorized): Likeise.
2754 (vect_analyze_stmt): Likewise, adding a %G.
2755 (vect_get_vector_types_for_stmt): Convert return type from bool to
2756 opt_result, converting dump_printf_loc calls and using stmt
2757 location, rather than vect_location.
2758 (vect_get_mask_type_for_stmt): Convert return type from tree to
2759 opt_tree, converting dump_printf_loc calls and using stmt location.
2760 * tree-vectorizer.c: Include "opt-problem.h.
2761 (try_vectorize_loop_1): Flag "Analyzing loop at" dump message as
2762 MSG_PRIORITY_INTERNALS. Convert local "loop_vinfo" from
2763 loop_vec_info to opt_loop_vec_info. If if fails, and dumping is
2764 enabled, use it to report at the top level "couldn't vectorize
2765 loop" followed by the problem.
2766 * tree-vectorizer.h (opt_loop_vec_info): New typedef.
2767 (vect_mark_stmts_to_be_vectorized): Convert return type from bool
2769 (vect_analyze_stmt): Likewise.
2770 (vect_get_vector_types_for_stmt): Likewise.
2771 (tree vect_get_mask_type_for_stmt): Likewise.
2772 (vect_analyze_data_ref_dependences): Likewise.
2773 (vect_enhance_data_refs_alignment): Likewise.
2774 (vect_analyze_data_refs_alignment): Likewise.
2775 (vect_verify_datarefs_alignment): Likewise.
2776 (vect_analyze_data_ref_accesses): Likewise.
2777 (vect_prune_runtime_alias_test_list): Likewise.
2778 (vect_find_stmt_data_reference): Likewise.
2779 (vect_analyze_data_refs): Likewise.
2780 (vect_analyze_loop): Convert return type from loop_vec_info to
2782 (vect_analyze_loop_form): Likewise.
2783 (vect_analyze_slp): Convert return type from bool to opt_result.
2785 2018-10-04 David Malcolm <dmalcolm@redhat.com>
2787 * doc/invoke.texi (-fopt-info): Document new "internals"
2789 * dump-context.h (dump_context::apply_dump_filter_p): New decl.
2790 * dumpfile.c (dump_options): Update for renaming of MSG_ALL to
2792 (optinfo_verbosity_options): Add "internals".
2793 (kind_as_string): Update for renaming of MSG_ALL to MSG_ALL_KINDS.
2794 (dump_context::apply_dump_filter_p): New member function.
2795 (dump_context::dump_loc): Use apply_dump_filter_p rather than
2796 explicitly masking the dump_kind.
2797 (dump_context::begin_scope): Increment the scope depth first. Use
2798 apply_dump_filter_p rather than explicitly masking the dump_kind.
2799 (dump_context::emit_item): Use apply_dump_filter_p rather than
2800 explicitly masking the dump_kind.
2801 (dump_dec): Likewise.
2802 (dump_hex): Likewise.
2803 (dump_switch_p_1): Default to MSG_ALL_PRIORITIES.
2804 (opt_info_switch_p_1): Default to MSG_PRIORITY_USER_FACING.
2805 (opt_info_switch_p): Update handling of default
2806 MSG_OPTIMIZED_LOCATIONS to cope with default of
2807 MSG_PRIORITY_USER_FACING.
2808 (dump_basic_block): Use apply_dump_filter_p rather than explicitly
2809 masking the dump_kind.
2810 (selftest::test_capture_of_dump_calls): Update test_dump_context
2811 instances to use MSG_ALL_KINDS | MSG_PRIORITY_USER_FACING rather
2812 than MSG_ALL. Generalize scope test to be run at all four
2813 combinations of with/without MSG_PRIORITY_USER_FACING and
2814 MSG_PRIORITY_INTERNALS, adding examples of explicit priority
2815 for each of the two values.
2816 * dumpfile.h (enum dump_flag): Add comment about the MSG_* flags.
2817 Rename MSG_ALL to MSG_ALL_KINDS. Add MSG_PRIORITY_USER_FACING,
2818 MSG_PRIORITY_INTERNALS, and MSG_ALL_PRIORITIES, updating the
2819 values for TDF_COMPARE_DEBUG and TDF_ALL_VALUES.
2820 (AUTO_DUMP_SCOPE): Add a note to the comment about the interaction
2821 with MSG_PRIORITY_*.
2822 * tree-vect-loop-manip.c (vect_loop_versioning): Mark versioning
2823 dump messages as MSG_PRIORITY_USER_FACING.
2824 * tree-vectorizer.h (DUMP_VECT_SCOPE): Add a note to the comment
2825 about the interaction with MSG_PRIORITY_*.
2827 2018-10-04 Bernd Edlinger <bernd.edlinger@hotmail.de>
2829 * varasm.c (output_constant): Add new parameter merge_strings.
2830 Make strings properly zero terminated in merge string sections.
2831 (mergeable_string_section): Don't fail if the last char is non-zero.
2832 (assemble_variable_contents): Handle merge string sections.
2833 (assemble_variable): Likewise.
2834 (assemble_constant_contents): Likewise.
2835 (output_constant_def_contents): Likewise.
2836 (output_constructor_array_range,
2837 output_constructor_regular_field): Adjust call to output_constant.
2838 (output_object_block): Adjust call to assemble_constant_contents
2839 and assemble_variable_contents.
2841 2018-10-04 Martin Liska <mliska@suse.cz>
2844 * cgraphunit.c (process_function_and_variable_attributes):
2845 Warn about a function with alias attribute and a body.
2847 2018-10-04 Martin Liska <mliska@suse.cz>
2850 * multiple_target.c (redirect_to_specific_clone): New function.
2851 (ipa_target_clone): Use it.
2852 * tree-inline.c: Fix comment.
2854 2018-10-04 David Malcolm <dmalcolm@redhat.com>
2856 * dumpfile.c (gcc::dump_manager::dump_manager): Initialize new
2858 (gcc::dump_manager::~dump_manager): Free m_optinfo_filename.
2859 (gcc::dump_manager::register_pass): New member function, adapted
2860 from loop body in gcc::pass_manager::register_pass, adding a
2861 call to update_dfi_for_opt_info.
2862 (gcc::dump_manager::opt_info_enable_passes): Store the
2863 -fopt-info options into the new fields. Move the loop
2865 (gcc::dump_manager::update_dfi_for_opt_info): ...this new member
2867 * dumpfile.h (struct opt_pass): New forward decl.
2868 (gcc::dump_manager::register_pass): New decl.
2869 (gcc::dump_manager::update_dfi_for_opt_info): New decl.
2870 (class gcc::dump_manager): Add fields "m_optgroup_flags",
2871 "m_optinfo_flags", and "m_optinfo_filename".
2872 * passes.c (gcc::pass_manager::register_pass): Move all of the
2873 dump-handling code to gcc::dump_manager::register_pass.
2875 2018-10-04 Peter Bergner <bergner@linux.ibm.com>
2877 PR rtl-optimization/87466
2878 * target.def (setjmp_preserves_nonvolatile_regs_p): New target hook.
2879 * doc/tm.texi.in (TARGET_SETJMP_PRESERVES_NONVOLATILE_REGS_P): New hook.
2880 * doc/tm.texi: Regenerate.
2881 * ira-lives.c (process_bb_node_lives): Use the new target hook.
2882 * lra-lives.c (process_bb_lives): Likewise.
2883 * config/rs6000/rs6000.c (TARGET_SETJMP_PRESERVES_NONVOLATILE_REGS_P):
2886 2018-10-04 Tamar Christina <tamar.christina@arm.com>
2888 * params.c (add_params): Fix initialization.
2890 2018-10-04 Martin Liska <mliska@suse.cz>
2892 PR gcov-profile/84107
2893 * tree-profile.c (init_ic_make_global_vars):
2894 Remove ic_void_ptr_var and ic_gcov_type_ptr_var.
2895 Come up with new ic_tuple* variables. Emit
2896 __gcov_indirect_call{,_topn} variables.
2897 (gimple_gen_ic_profiler): Access the variable
2899 (gimple_gen_ic_func_profiler): Access
2900 __gcov_indirect_call.callee field.
2901 (gimple_init_gcov_profiler): Use ptr_type_node.
2902 * value-prof.c (gimple_ic): Use ptr_type_node.
2904 2018-10-04 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
2906 PR tree-optimization/85787
2907 * ipa-pure-const.c (malloc_candidate_p_1): Move most of malloc_candidate_p
2908 into this function and add support for detecting multiple phis.
2909 (DUMP_AND_RETURN): Move from malloc_candidate_p into top-level macro.
2911 2018-10-04 Martin Liska <mliska@suse.cz>
2914 * ipa-inline.c (inline_to_all_callers_1):
2915 Call ultimate_alias_target for node being inlined.
2917 2018-10-03 Jeff Law <law@redhat.com>
2919 * gimple-ssa-sprintf.c (format_string): Do not hardcode size of
2921 * tree.c (get_typenode_from_name): Moved from fortran/trans-types.c.
2922 * tree.h (get_typenode_from_name): Prototype.
2924 2018-10-03 Uros Bizjak <ubizjak@gmail.com>
2926 * config/i386/i386.md (*cmp<X87MODEF:mode>_<SWI24:mode>_i387):
2927 Change operand 2 predicate to nonimmediate_operand.
2928 (*cmp<X87MODEF:mode>_<SWI24:mode>_cc_i387): Ditto.
2930 2018-10-03 Martin Sebor <msebor@redhat.com>
2931 Jeff Law <law@redhat.com>
2933 * gimple-ssa-sprintf.c (struct fmtresult): Add new member and
2935 (get_string_length): Detect unterminated arrays.
2936 (format_string): Same.
2937 (format_directive): Warn about unterminated arrays.
2938 (handle_gimple_call): Mark statements with no_warning as needed.
2940 2018-10-03 Jim Wilson <jimw@sifive.com>
2942 * config/riscv/riscv-c.c (riscv_cpu_cpp_builtins): For ABI_ILP32E,
2943 also define __riscv_abi_rve. Delete trailing white space.
2945 2018-10-03 Paul Koning <ni1d@arrl.net>
2947 Enable LRA register allocator for PDP11.
2948 * config/pdp11/constraints.md (Q): Use define_memory_constraint.
2951 * config/pdp11/pdp11.c (pdp11_lra_p): New function.
2952 * config/pdp11/pdp11.opt (-mlra): New option.
2953 * doc/invoke.texi (PDP-11 Options): Document -mlra.
2955 2018-10-03 Uros Bizjak <ubizjak@gmail.com>
2957 * config/i386/i386.md (*<absneg:code>extendsfdf2): Remove.
2958 (*<absneg:code>extend<mode>xf2): Ditto.
2960 2018-10-03 Aldy Hernandez <aldyh@redhat.com>
2962 PR tree-optimization/87415
2963 * tree-vrp.c (set_value_range_with_overflow): Special case one bit
2966 2018-10-02 Jeff Law <law@redhat.com>
2968 * gimple-fold.c (get_range_strlen): Only set *nonstr when
2969 an unterminated string is discovered. Bubble up range
2970 even for unterminated strings.
2971 (gimple_fold_builtin_strlen): Do not fold if get_range_strlen
2972 indicates the string was not terminated via NONSTR.
2974 2018-10-03 Aldy Hernandez <aldyh@redhat.com>
2976 * tree-vrp.c (extract_range_from_unary_expr): Special case all
2977 pointer conversions.
2978 Do not do anything special for anti-ranges.
2980 2018-10-03 Jérôme Lambourg <lambourg@adacore.com>
2982 * config/arm/vxworks.h (ARM_TARGET2_DWARF_FORMAT): Adjust to
2983 DW_EH_PE_pcrel | DW_EH_PE_indirect for RTPs.
2985 2018-10-03 Martin Liska <mliska@suse.cz>
2987 PR gcov-profile/86109
2988 * coverage.c (coverage_begin_function): Do not
2989 mark lambdas as artificial.
2990 * tree-core.h (struct GTY): Remove tm_clone_flag
2991 and introduce new lambda_function.
2992 * tree.h (DECL_LAMBDA_FUNCTION): New macro.
2994 2018-10-02 Aaron Sawdey <acsawdey@linux.ibm.com>
2997 * config/rs6000/rs6000-string.c (expand_strn_compare): Check that both
2998 P8_VECTOR and VSX are enabled.
3000 2018-10-02 Andreas Krebbel <krebbel@linux.ibm.com>
3002 * config/s390/driver-native.c (s390_host_detect_local_cpu): Add
3003 0x3907 as CPU model number.
3005 2018-10-02 Andreas Krebbel <krebbel@linux.ibm.com>
3007 * common/config/s390/s390-common.c: Rename PF_ARCH12 to PF_Z14.
3008 * config/s390/s390.h (enum processor_flags): Rename PF_ARCH12 to
3009 PF_Z14. Rename TARGET_CPU_ARCH12 to TARGET_CPU_Z14,
3010 TARGET_CPU_ARCH12_P to TARGET_CPU_Z14_P, TARGET_ARCH12 to
3011 TARGET_Z14, and TARGET_ARCH12_P to TARGET_Z14_P.
3012 * config/s390/s390.md: Likewise. Rename also the cpu attribute
3013 value from arch12 to z14.
3015 2018-10-02 Uros Bizjak <ubizjak@gmail.com>
3017 * config/i386/i386.md (fxam<mode>2_i387_with_temp): Remove.
3019 (isinf<mode>2): Ditto.
3021 2018-10-02 Uros Bizjak <ubizjak@gmail.com>
3023 * config/i386/i386.c (ix86_emit_i387_round): Extend op1 to XFmode
3024 before emitting fxam. Perform calculations in XFmode.
3026 2018-10-02 Marc Glisse <marc.glisse@inria.fr>
3028 * match.pd (((X /[ex] A) +- B) * A): New transformation.
3030 2018-10-02 Marc Glisse <marc.glisse@inria.fr>
3033 * fold-const.c (fold_plusminus_mult_expr): Handle complex and vectors.
3034 * tree.c (signed_or_unsigned_type_for): Handle complex.
3036 2018-10-02 Jeff Law <law@redhat.com>
3038 * gimple-fold.c (get_range_strlen): Remove dead code.
3040 2018-10-02 Martin Sebor <msebor@redhat.com>
3041 Jeff Law <law@redhat.com>
3043 * builtins.c (unterminated_array): Add new arguments.
3044 If argument is not terminated, bubble up size and exact
3046 (expand_builtin_strnlen): Detect, avoid expanding
3047 and diagnose unterminated arrays.
3048 (c_strlen): Fill in offset of start of unterminated strings.
3049 * builtins.h (unterminated_array): Update prototype.
3051 2018-10-02 Richard Biener <rguenther@suse.de>
3053 * config/i386/sse.md (reduc_plus_scal_v4df): Avoid the use
3054 of haddv4df, first reduce to SSE width and exploit the fact
3055 that we only need element zero with the reduction result.
3056 (reduc_plus_scal_v2df): Likewise.
3058 2018-10-02 Eric Botcazou <ebotcazou@adacore.com>
3060 * dojump.h (do_jump): Delete.
3061 (do_jump_1): Likewise.
3062 (split_comparison): Move around.
3063 * dojump.c (do_jump): Make static.
3064 (do_jump_1): Likewise.
3065 (jumpifnot): Move around.
3066 (jumpifnot_1): Likewise.
3068 (jumpif_1): Likewise.
3069 * expr.c (expand_expr_real_1): Call jumpif[not] instead of do_jump.
3071 2018-10-02 Eric Botcazou <ebotcazou@adacore.com>
3073 * reorg.c (make_return_insns): Use emit_copy_of_insn_after for the
3074 insns in the delay slot and add_insn_after for the jump insn.
3076 2018-10-02 Richard Biener <rguenther@suse.de>
3078 * tree-inline.c (expand_call_inline): Use the location of
3079 the callee declaration for the inline-entry marker.
3080 * final.c (notice_source_line): Remove special-casing of
3081 NOTE_INSN_INLINE_ENTRY.
3083 2018-10-01 Carl Love <cel@us.ibm.com>
3086 * config/rs6000/rs6000-builtin.def (__builtin_mffsl): New.
3087 (__builtin_mtfsb0): New.
3088 (__builtin_mtfsb1): New.
3089 ( __builtin_set_fpscr_rn): New.
3090 (__builtin_set_fpscr_drn): New.
3091 * config/rs6000/rs6000.c (rs6000_expand_mtfsb_builtin): Add.
3092 (rs6000_expand_set_fpscr_rn_builtin): Add.
3093 (rs6000_expand_set_fpscr_drn_builtin): Add.
3094 (rs6000_expand_builtin): Add case statement entries for
3095 RS6000_BUILTIN_MTFSB0, RS6000_BUILTIN_MTFSB1,
3096 RS6000_BUILTIN_SET_FPSCR_RN, RS6000_BUILTIN_SET_FPSCR_DRN,
3097 RS6000_BUILTIN_MFFSL.
3098 (rs6000_init_builtins): Add ftype initialization and def_builtin
3099 calls for __builtin_mffsl, __builtin_mtfsb0, __builtin_mtfsb1,
3100 __builtin_set_fpscr_rn, __builtin_set_fpscr_drn.
3101 * config/rs6000.md (rs6000_mtfsb0, rs6000_mtfsb1, rs6000_mffscrn,
3102 rs6000_mffscdrn): Add define_insn.
3103 (rs6000_set_fpscr_rn, rs6000_set_fpscr_drn): Add define_expand.
3104 * doc/extend.texi: Add documentation for the builtins.
3106 2018-10-01 Richard Biener <rguenther@suse.de>
3108 PR tree-optimization/87465
3109 * tree-ssa-loop-ivcanon.c (tree_estimate_loop_size): Fix typo
3110 causing branch miscounts.
3112 2018-10-01 Tamar Christina <tamar.christina@arm.com>
3114 * common/config/aarch64/aarch64-common.c (TARGET_OPTION_DEFAULT_PARAM,
3115 aarch64_option_default_param): New.
3116 (params.h): Include.
3117 (TARGET_OPTION_VALIDATE_PARAM, aarch64_option_validate_param): New.
3118 * config/aarch64/aarch64.c (aarch64_override_options_internal): Simplify
3119 stack-clash protection validation code.
3121 2018-10-01 Tamar Christina <tamar.christina@arm.com>
3123 * params.c (validate_param): New.
3124 (add_params): Use it.
3125 (set_param_value): Refactor param validation into validate_param.
3126 (diagnostic.h): Include.
3127 * diagnostic.h (diagnostic_ready_p): New.
3129 2018-10-01 Tamar Christina <tamar.christina@arm.com>
3131 * params.c (set_param_value):
3132 Add index of parameter being validated.
3133 * common/common-target.def (option_validate_param): New.
3134 * common/common-targhooks.h (default_option_validate_param): New.
3135 * common/common-targhooks.c (default_option_validate_param): New.
3136 * doc/tm.texi.in (TARGET_OPTION_VALIDATE_PARAM): New.
3137 * doc/tm.texi: Regenerate.
3139 2018-10-01 Tamar Christina <tamar.christina@arm.com>
3142 * config/aarch64/aarch64.c (aarch64_override_options_internal):
3143 Add validation for stack-clash parameters and set defaults.
3145 2018-10-01 Tamar Christina <tamar.christina@arm.com>
3148 * configure.ac: Add stack-clash-protection-guard-size.
3149 * doc/install.texi: Document it.
3150 * config.in (DEFAULT_STK_CLASH_GUARD_SIZE): New.
3151 * params.def: Update comment for guard-size.
3152 (PARAM_STACK_CLASH_PROTECTION_GUARD_SIZE,
3153 PARAM_STACK_CLASH_PROTECTION_PROBE_INTERVAL): Update description.
3154 * configure: Regenerate.
3156 2018-10-01 Tamar Christina <tamar.christina@arm.com>
3159 * config/aarch64/aarch64.h (STACK_CLASH_MIN_BYTES_OUTGOING_ARGS,
3160 STACK_DYNAMIC_OFFSET): New.
3161 * config/aarch64/aarch64.c (aarch64_layout_frame):
3162 Update outgoing args size.
3163 (aarch64_stack_clash_protection_alloca_probe_range,
3164 TARGET_STACK_CLASH_PROTECTION_ALLOCA_PROBE_RANGE): New.
3166 2018-10-01 Tamar Christina <tamar.christina@arm.com>
3169 * explow.c (anti_adjust_stack_and_probe_stack_clash): Support custom
3171 * target.def (stack_clash_protection_alloca_probe_range): New.
3172 (stack_clash_protection_final_dynamic_probe): Remove.
3173 * targhooks.h (default_stack_clash_protection_alloca_probe_range) New.
3174 (default_stack_clash_protection_final_dynamic_probe): Remove.
3175 * targhooks.c: Likewise.
3176 * doc/tm.texi.in (TARGET_STACK_CLASH_PROTECTION_ALLOCA_PROBE_RANGE): New.
3177 (TARGET_STACK_CLASH_PROTECTION_FINAL_DYNAMIC_PROBE): Remove.
3178 * doc/tm.texi: Regenerate.
3180 2018-10-01 Tamar Christina <tamar.christina@arm.com>
3183 * config/aarch64/aarch64-protos.h (aarch64_output_probe_sve_stack_clash): New.
3184 * config/aarch64/aarch64.c (aarch64_output_probe_sve_stack_clash,
3185 aarch64_clamp_to_uimm12_shift): New.
3186 (aarch64_allocate_and_probe_stack_space): Add SVE specific section.
3187 * config/aarch64/aarch64.md (probe_sve_stack_clash): New.
3189 2018-10-01 Tamar Christina <tamar.christina@arm.com>
3192 * config/aarch64/aarch64.c (aarch64_layout_frame): Add assert.
3194 2018-10-01 Jeff Law <law@redhat.com>
3195 Richard Sandiford <richard.sandiford@linaro.org>
3196 Tamar Christina <tamar.christina@arm.com>
3199 * config/aarch64/aarch64.md
3200 (probe_stack_range): Add k (SP) constraint.
3201 * config/aarch64/aarch64.h (STACK_CLASH_CALLER_GUARD,
3202 STACK_CLASH_MAX_UNROLL_PAGES): New.
3203 * config/aarch64/aarch64.c (aarch64_output_probe_stack_range): Emit
3204 stack probes for stack clash.
3205 (aarch64_allocate_and_probe_stack_space): New.
3206 (aarch64_expand_prologue): Use it.
3207 (aarch64_expand_epilogue): Likewise and update IP regs re-use criteria.
3208 (aarch64_sub_sp): Add emit_move_imm optional param.
3210 2018-10-01 MCC CS <deswurstes@users.noreply.github.com>
3212 PR tree-optimization/87261
3213 * match.pd: Remove trailing whitespace.
3214 Add (x & y) | ~(x | y) -> ~(x ^ y),
3215 (~x | y) ^ (x ^ y) -> x | ~y and (x ^ y) | ~(x | y) -> ~(x & y)
3217 2018-10-01 Claudiu Zissulescu <claziss@synopsys.com>
3219 * config/arc/arc.md (*add_n): Clean up pattern, update instruction
3221 (ashlsi3_insn): Update instruction constraints.
3222 (ashrsi3_insn): Likewise.
3223 (rotrsi3): Likewise.
3224 (add_shift): Likewise.
3225 * config/arc/constraints.md (Csz): New 32 bit constraint. It
3226 avoids placing in the limm field small constants which, otherwise,
3227 could end into a small instruction.
3229 2018-10-01 Claudiu Zissulescu <claziss@synopsys.com>
3231 * config/arc/arc.md (maddsidi4_split): Don't use dmac if the
3232 destination register is not odd-even.
3233 (umaddsidi4_split): Likewise.
3235 2018-10-01 Richard Biener <rguenther@suse.de>
3237 * tree-inline.c (expand_call_inline): Store origin of fn
3238 in BLOCK_ABSTRACT_ORIGIN for the inline BLOCK.
3239 * tree.c (block_ultimate_origin): Simplify and do some
3242 2018-09-30 Uros Bizjak <ubizjak@gmail.com>
3244 * config/i386/mmx.md (EMMS): New int iterator.
3245 (emms): New int attribute.
3246 (mmx_<emms>): Macroize insn from *mmx_emms and *mmx_femms using
3247 EMMS int iterator. Explicitly declare clobbers.
3248 (mmx_emms): Remove expander.
3250 * config/i386/predicates.md (emms_operation): Remove predicate.
3251 (vzeroall_pattern): New predicate.
3252 (vzeroupper_pattern): Rename from vzeroupper_operation.
3253 * config/i386/i386.c (ix86_avx_u128_mode_after): Use
3254 vzeroupper_pattern and vzeroall_pattern predicates.
3256 2018-09-30 Peter Bergner <bergner@linux.ibm.com>
3258 PR rtl-optimization/86939
3259 * ira-lives.c (make_hard_regno_born): Rename from this...
3260 (make_hard_regno_live): ... to this. Remove update to conflict
3261 information. Update function comment.
3262 (make_hard_regno_dead): Add conflict information update. Update
3264 (make_object_born): Rename from this...
3265 (make_object_live): ... to this. Remove update to conflict information.
3266 Update function comment.
3267 (make_object_dead): Add conflict information update. Update function
3269 (mark_pseudo_regno_live): Call make_object_live.
3270 (mark_pseudo_regno_subword_live): Likewise.
3271 (mark_hard_reg_dead): Update function comment.
3272 (mark_hard_reg_live): Call make_hard_regno_live.
3273 (process_bb_node_lives): Likewise.
3274 * lra-lives.c (make_hard_regno_born): Rename from this...
3275 (make_hard_regno_live): ... to this. Remove update to conflict
3276 information. Remove now uneeded check_pic_pseudo_p argument.
3277 Update function comment.
3278 (make_hard_regno_dead): Add check_pic_pseudo_p argument and add update
3279 to conflict information. Update function comment.
3280 (mark_pseudo_live): Remove update to conflict information. Update
3282 (mark_pseudo_dead): Add conflict information update.
3283 (mark_regno_live): Call make_hard_regno_live.
3284 (mark_regno_dead): Call make_hard_regno_dead with new arguement.
3285 (process_bb_lives): Call make_hard_regno_live and make_hard_regno_dead.
3287 2018-09-29 H.J. Lu <hongjiu.lu@intel.com>
3290 * config/i386/i386.c (construct_container): Use TImode for
3291 BLKmode values in 2 integer registers.
3293 2018-09-29 Jeff Law <law@redhat.com>
3295 * builtins.c (unterminated_array): Pass in c_strlen_data * to
3296 c_strlen rather than just a tree *.
3297 (c_strlen): Change NONSTR argument to a c_strlen_data pointer.
3298 Update recursive calls appropriately. If caller did not provide a
3299 suitable data pointer, create a local one. When a non-terminated
3300 string is discovered, bubble up information about the string via the
3301 c_strlen_data object.
3302 * builtins.h (c_strlen): Update prototype.
3303 (c_strlen_data): New structure.
3304 * gimple-fold.c (get_range_strlen): Update calls to c_strlen.
3305 For a type 2 call, if c_strlen indicates a non-terminated string
3306 use the length of the non-terminated string.
3307 (gimple_fold_builtin_stpcpy): Update calls to c_strlen.
3309 2018-09-29 Jakub Jelinek <jakub@redhat.com>
3312 * config/i386/avx512fintrin.h (_mm512_abs_pd, _mm512_mask_abs_pd): Use
3313 __m512d type for __A argument rather than __m512.
3315 2018-09-28 John David Anglin <danglin@gcc.gnu.org>
3317 * match.pd (simple_comparison): Don't optimize if either operand is
3318 a function pointer when target needs function pointer canonicalization.
3320 2018-09-28 Segher Boessenkool <segher@kernel.crashing.org>
3322 * config/rs6000/driver-rs6000.c (asm_names): Adjust the entries for
3323 power5 .. power9 to remove indirection.
3324 * config/rs6000/rs6000.h (ASM_CPU_POWER5_SPEC, ASM_CPU_POWER6_SPEC,
3325 ASM_CPU_POWER7_SPEC, ASM_CPU_POWER8_SPEC, ASM_CPU_POWER9_SPEC,
3326 ASM_CPU_476_SPEC): Delete.
3327 (ASM_CPU_SPEC): Adjust.
3328 (EXTRA_SPECS): Delete asm_cpu_power5, asm_cpu_power6, asm_cpu_power7,
3329 asm_cpu_power8, asm_cpu_power9, asm_cpu_476.
3331 2018-09-28 Segher Boessenkool <segher@kernel.crashing.org>
3333 * config.in: Delete HAVE_AS_DCI.
3334 * config/powerpcspe/powerpcspe.h: Treat HAVE_AS_DCI as always true.
3335 * config/rs6000/rs6000.h: Ditto.
3336 * configure.ac: Delete HAVE_AS_DCI.
3337 * configure: Regenerate.
3339 2018-09-28 Segher Boessenkool <segher@kernel.crashing.org>
3341 * config.in (HAVE_AS_LWSYNC): Delete.
3342 * config/powerpcspe/powerpcspe.h (TARGET_LWSYNC_INSTRUCTION): Delete.
3343 * config/powerpcspe/sync.md (*lwsync): Always generate lwsync, never
3345 * config/rs6000/rs6000.h (TARGET_LWSYNC_INSTRUCTION): Delete.
3346 * config/rs6000/sync.md (*lwsync): Always generate lwsync, never do it
3348 * configure.ac: Delete HAVE_AS_LWSYNC.
3349 * configure: Regenerate.
3351 2018-09-28 Eric Botcazou <ebotcazou@adacore.com>
3352 Pierre-Marie de Rodat <derodat@adacore.com>
3354 * calls.c (expand_call): Try to do a tail call for thunks at -O0 too.
3355 * cgraph.h (struct cgraph_thunk_info): Add indirect_offset.
3356 (cgraph_node::create_thunk): Add indirect_offset parameter.
3357 (thunk_adjust): Likewise.
3358 * cgraph.c (cgraph_node::create_thunk): Add indirect_offset parameter
3359 and initialize the corresponding field with it.
3360 (cgraph_node::dump): Dump indirect_offset field.
3361 * cgraphclones.c (duplicate_thunk_for_node): Deal with indirect_offset.
3362 * cgraphunit.c (cgraph_node::analyze): Be prepared for external thunks.
3363 (thunk_adjust): Add indirect_offset parameter and deal with it.
3364 (cgraph_node::expand_thunk): Deal with the indirect_offset field and
3365 pass it to thunk_adjust. Do not call the target hook if it's non-zero
3366 or if the thunk is external or local. Fix formatting. Do not chain
3367 the RESULT_DECL to BLOCK_VARS. Pass the static chain to the target,
3368 if any, in the GIMPLE representation.
3369 * ipa-icf.c (sem_function::equals_wpa): Deal with indirect_offset.
3370 * lto-cgraph.c (lto_output_node): Write indirect_offset field.
3371 (input_node): Read indirect_offset field.
3372 * tree-inline.c (expand_call_inline): Pass indirect_offset field in the
3373 call to thunk_adjust.
3374 * tree-nested.c (struct nesting_info): Add thunk_p field.
3375 (create_nesting_tree): Set it.
3376 (convert_all_function_calls): Copy static chain from targets to thunks.
3377 (finalize_nesting_tree_1): Return early for thunks.
3378 (unnest_nesting_tree_1): Do not finalize thunks.
3379 (gimplify_all_functions): Do not gimplify thunks.
3381 2018-09-28 David Malcolm <dmalcolm@redhat.com>
3383 * opt-suggestions.c (option_proposer::build_option_suggestions):
3384 Release "option_values".
3386 2018-09-28 David Malcolm <dmalcolm@redhat.com>
3388 * coverage.c (get_coverage_counts): Convert problem-reporting dump
3389 messages from MSG_OPTIMIZED_LOCATIONS to MSG_MISSED_OPTIMIZATION.
3390 * dumpfile.c (kind_as_string): New function.
3391 (dump_loc): Rather than a hardcoded prefix of "note: ", use
3392 kind_as_string to vary the prefix based on dump_kind.
3393 (selftest::test_capture_of_dump_calls): Update for above.
3395 2018-09-28 Uros Bizjak <ubizjak@gmail.com>
3397 * config/i386/i386.h (SSE_REGNO): Fix check for FIRST_REX_SSE_REG.
3398 (GET_SSE_REGNO): Rename from SSE_REGNO. Update all uses for rename.
3400 2018-09-28 Uros Bizjak <ubizjak@gmail.com>
3402 * config/i386/i386.h (CC_REGNO): Remove FPSR_REG.
3403 * config/i386/i386.c (ix86_fixed_condition_code_regs): Use
3404 INVALID_REGNUM instead of FPSR_REG.
3405 (ix86_md_asm_adjust): Do not clobber FPSR_REG.
3406 * config/i386/i386.md: Update comment of FP compares.
3407 (fldenv): Do not clobber FPSR_REG.
3409 2018-09-28 Richard Biener <rguenther@suse.de>
3411 * tree.h (BLOCK_ORIGIN): New.
3412 * omp-expand.c (grid_expand_target_grid_body): Assign
3413 BLOCK_ORIGIN to BLOCK_ABSTRACT_ORIGIN.
3414 * tree-inline.c (remap_block): Likewise.
3415 * auto-profile.c (get_function_decl_from_block): Simplify
3416 by eliding the BLOCK_ABSTRACT_ORIGIN chasing.
3417 * langhooks.c (lhd_print_error_function): Likewise.
3418 * optinfo-emit-json.cc (optrecord_json_writer::inlining_chain_to):
3420 * tree-ssa-live.c (remove_unused_scope_block_p): Likewise.
3421 * tree.c (block_nonartificial_location): Likewise.
3422 (block_ultimate_origin): Likewise.
3423 * tree-pretty-print.c (percent_K_format): Likewise. Remove
3424 no longer needed LTO case.
3426 2018-09-28 Andrew Stubbs <ams@codesourcery.com>
3427 Jan Hubicka <jh@suse.cz>
3428 Martin Jambor <mjambor@suse.cz>
3430 * simplify-rtx.c (simplify_merge_mask): New function.
3431 (simplify_ternary_operation): Use it, also see if VEC_MERGEs with the
3432 same masks are used in op1 or op2.
3433 (test_vec_merge): New function.
3434 (test_vector_ops): Call test_vec_merge.
3436 2018-09-28 Eric Botcazou <ebotcazou@adacore.com>
3438 * config/sparc/sparc-protos.h (sparc_branch_cost): Declare.
3439 * config/sparc/sparc.h (BRANCH_COST): Call sparc_branch_cost.
3440 * config/sparc/sparc.c (struct processor_costs): Add branch_cost field.
3441 (cypress_costs): Set it.
3442 (supersparc_costs): Likewise.
3443 (hypersparc_costs): Likewise.
3444 (leon_cost): Likewise.
3445 (leon3_costs): Likewise.
3446 (sparclet_costs): Likewise.
3447 (ultrasparc_costs): Likewise.
3448 (ultrasparc_costs): Likewise.
3449 (niagara_costs): Likewise.
3450 (niagara2_costs): Likewise.
3451 (niagara3_costs): Likewise.
3452 (niagara4_costs): Likewise.
3453 (niagara7_costs): Likewise.
3454 (m8_costs): Likewise.
3455 (TARGET_CAN_FOLLOW_JUMP): Define.
3456 (pass_work_around_errata::gate): Minor tweak.
3457 (sparc_option_override): Remove MASK_FSMULD mask for V7 processors.
3458 Do not set both MASK_VIS4 and MASK_VIS4B for M8 processor.
3459 Automaitcally clear MASK_FSMULD mask for V7 processors.
3460 (sparc_can_follow_jump): New static function.
3461 (output_ubranch): Deal with CROSSING_JUMP_P.
3462 (sparc_use_sched_lookahead): Rewrite using switch statement.
3463 (sparc_issue_rate): Reorder.
3464 (sparc_branch_cost): New function.
3466 2018-09-27 Martin Sebor <msebor@redhat.com>
3468 * tree.h (tree_to_shwi): Add attribute nonnull and pure.
3469 (tree_to_poly_int64, tree_to_uhwi, tree_to_poly_uint64): Same.
3470 (int_fits_type_p): Same.
3472 2018-09-27 Uros Bizjak <ubizjak@gmail.com>
3474 * config/i386/i386.md (FPCR_REG): Remove.
3475 (UNSPEC_FLDCW): Remove.
3476 (x86_fnstcw_1): Use (const_int 0) instead of FPCR_REG.
3477 (x86_fldcw_1): Remove insn pattern.
3478 (fnstenv): Do not clobber FPCR_REG.
3480 * config/i386/i386.h (FIXED_REGISTERS) Remove fpsr register.
3481 (CALL_USED_REGISTERS): Ditto.
3482 (REG_ALLOC_ORDER): Ditto.
3483 (REG_CLASS_CONTENTS): Ditto.
3484 (HI_REGISTER_NAMES): Ditto.
3485 (ADDITIONAL_REGISTER_NAMES): Use defines instead
3486 of numerical constants.
3487 * config/i386/i386.c (regclass_map): Remove fpsr register.
3488 (dbx_register_map): Ditto.
3489 (dbx64_register_map): Ditto.
3490 (svr4_dbx_register_map): Ditto.
3491 (print_reg): Do not handle FPCR_REG.
3493 2018-09-27 Segher Boessenkool <segher@kernel.crashing.org>
3496 * config.in (HAVE_AS_CMPB, HAVE_AS_DFP, HAVE_AS_FPRND, HAVE_AS_MFPGPR,
3497 HAVE_AS_POPCNTB, HAVE_AS_POPCNTD, HAVE_AS_POWER8, HAVE_AS_POWER9):
3498 Delete, always treat as true.
3499 * config/powerpcspe/powerpcspe.c (rs6000_option_override_internal):
3500 Ditto. Simplify remaining code.
3501 * config/powerpcspe/powerpcspe.h: Ditto.
3502 * config/rs6000/rs6000.c (rs6000_option_override_internal): Ditto.
3503 Simplify remaining code.
3504 (rs6000_expand_builtin): Ditto.
3505 * config/rs6000/rs6000.h: Ditto.
3506 * configure.ac: Ditto.
3507 * configure: Regenerate.
3509 2018-09-27 Martin Liska <mliska@suse.cz>
3511 * coverage.c (get_coverage_counts): Revert the formatting
3512 of missing profile opt info.
3514 2018-09-27 Richard Biener <rguenther@suse.de>
3518 * dwarf2out.c (set_block_origin_self): Do not mark outermost
3519 block as we do not output that.
3520 (gen_inlined_subroutine_die): Elide the originally outermost
3521 block, matching what we do for concrete instances.
3522 (decls_for_scope): Add parameter specifying whether to recurse
3525 2018-09-27 Andrew Stubbs <ams@codesourcery.com>
3526 Tom de Vries <tom@codesourcery.com>
3530 * expmed.c (emit_cstore): Fix handling of result_mode == BImode and
3531 STORE_FLAG_VALUE == 1.
3533 2018-09-27 Andreas Krebbel <krebbel@linux.ibm.com>
3535 * config/s390/s390.md (PPA_TX_ABORT, PPA_OOO_BARRIER): New
3536 constant definitions.
3537 ("tx_assist"): Replace magic number with PPA_TX_ABORT.
3538 ("*ppa"): Enable pattern also for -march=zEC12 -mno-htm.
3539 ("speculation_barrier"): New expander definition.
3541 2018-09-26 Indu Bhagat <indu.bhagat@oracle.com>
3543 PR gcov-profile/86957
3544 * common.opt: New warning option -Wmissing-profile.
3545 * coverage.c (get_coverage_counts): Add warning for missing .gcda file.
3546 * doc/invoke.texi: Document -Wmissing-profile.
3548 2018-09-26 Jim Wilson <jimw@sifive.com>
3550 * config/riscv/riscv.md (subsi3_extended2): Add J constraint.
3551 (negdi2, negsi2, negsi2_extended, negsi2_extended2): New.
3553 2018-09-26 Martin Sebor <msebor@redhat.com>
3555 * tree.c (zerop): Change return type to bool.
3556 (integer_zerop, integer_onep, integer_each_onep): Same.
3557 (integer_all_onesp, integer_minus_onep, integer_pow2p): Same.
3558 (integer_nonzerop, integer_truep, tree_ctz, real_zerop): Same.
3559 (real_onep, real_minus_onep, chain_index): Same.
3560 (print_type_hash_statistics, type_list_equal): Same.
3561 * tree.h (zerop): Same.
3562 (zerop, integer_zerop, integer_onep, integer_each_onep): Same.
3563 (integer_all_onesp, integer_minus_onep, integer_pow2p): Same.
3564 (integer_nonzerop, integer_truep, tree_ctz, real_zerop): Same.
3565 (real_onep, real_minus_onep, chain_index): Same.
3566 (print_type_hash_statistics, type_list_equal): Same.
3568 2018-09-26 Jim Wilson <jimw@sifive.com>
3570 * config/riscv/riscv.h (FUNCTION_ARG_REGNO_P): Fix comment.
3572 2018-09-26 Jakub Jelinek <jakub@redhat.com>
3575 * config/i386/i386.c: Include debug.h and dwarf2out.h.
3576 (output_indirect_thunk): Emit DW_CFA_def_cfa_offset after the
3579 2018-09-25 Andrew Stubbs <ams@codesourcery.com>
3581 * builtins.c (get_builtin_sync_mem): Force address mode conversion.
3583 2018-09-26 Uros Bizjak <ubizjak@gmail.com>
3585 * config/i386/i386.h (enum reg_class): Remove FP_TOP_SSE_REGS
3586 and FP_SECOND_SSE_REGS.
3587 (REG_CLASS_NAMES): Ditto.
3588 (REG_CLASS_CONTENTS): Ditto.
3589 * config/i386/i386.c (ix86_preferred_reload_class) Do not handle
3590 FP_TOP_SSE_REGS and FP_SECOND_SSE_REGS classes.
3591 (ix86_preferred_output_reload_class): Ditto.
3592 * config/i386/i386.md (fix_trunc<mode>_i387_fisttp): Change "=&1f"
3593 clobber constraint to "=&f".
3594 (fix_truncdi_i387): Ditto.
3595 (lrintxfdi2): Ditto.
3596 (fistdi2_<rounding>): Ditto.
3597 (fpremxf4_i387): Change "=u" constraint to "=f".
3598 (fprem1xf4_i387): Ditto.
3600 (fptanxf4_i387): Ditto.
3601 (fxtractxf3_i387): Ditto.
3602 (fscalexf4_i387): Ditto.
3603 (atan2xf3): Change "u" constraint to "f".
3604 (fyl2xxf3_i387): Ditto.
3605 (fyl2xp1xf3_i387): Ditto.
3607 2018-09-26 Uros Bizjak <ubizjak@gmail.com>
3610 * config/i386/i386.h (NUM_MODES_FOR_MODE_SWITCHING): Update
3611 for removed I387_MASK_PM entity.
3614 2018-09-26 Jeff Law <law@redhat.com>
3616 2018-09-26 Alexey Neyman <stilor@att.net>
3618 * graphite.h: Include <isl/id.h> and <isl/space.h>; these
3619 headers are no longer pulled in by <isl/val.h>.
3621 2018-09-26 Richard Biener <rguenther@suse.de>
3624 * dwarf2out.c (gen_lexical_block_die): Do not equate inline
3625 or concrete instance DIE to the tree. Create abstract origin
3626 attributes also for concrete instances.
3628 2018-09-26 Alexey Neyman <stilor@att.net>
3630 * graphite.h: Include <isl/id.h> and <isl/space.h>; these
3631 headers are no longer pulled in by <isl/val.h>.
3633 2018-09-26 Matthew Malcomson <matthew.malcomson@arm.com>
3635 * config/arm/arm.c (arm_split_compare_and_swap, arm_split_atomic_op):
3636 Use new helper functions.
3637 * config/arm/sync.md (atomic_load<mode>, atomic_store<mode>):
3638 Use new helper functions.
3639 * config/arm/aarch-common-protos.h (aarch_mm_needs_acquire,
3640 aarch_mm_needs_release): New declarations.
3641 * config/arm/aarch-common.c (aarch_mm_needs_acquire,
3642 aarch_mm_needs_release): New.
3644 2018-09-26 Eric Botcazou <ebotcazou@adacore.com>
3646 * config/arm/arm.c (arm_reorg): Skip Thumb reorg pass for thunks.
3647 (arm32_output_mi_thunk): Deal with long calls.
3649 2018-09-26 Richard Biener <rguenther@suse.de>
3653 * tree-inline.c (expand_call_inline): When the location
3654 of the call is UNKNOWN_LOCATION use DECL_SOURCE_LOCATION
3655 or BUILTINS_LOCATION for the BLOCK_SOURCE_LOCATION of
3656 the inserted BLOCK to make inlined_function_outer_scope_p
3658 * dwarf2out.c (add_call_src_coords_attributes): Do not add
3659 coords for reserved locations.
3661 2018-09-25 Segher Boessenkool <segher@kernel.crashing.org>
3663 * config/rs6000/rs6000.md (*movcc_internal1): Use set_attr_alternative.
3664 (*call_indirect_nonlocal_sysv<mode>): Ditto.
3665 (*call_value_indirect_nonlocal_sysv<mode>): Ditto.
3666 (*sibcall_nonlocal_sysv<mode>): Ditto.
3667 (*sibcall_value_nonlocal_sysv<mode>): Ditto.
3668 (<bd>_<mode>): Ditto.
3669 (<bd>tf_<mode>): Ditto.
3671 2018-09-25 Segher Boessenkool <segher@kernel.crashing.org>
3673 * config/rs6000/altivec.md (*altivec_mov<mode>): Write the output
3674 control string as a list of templates instead of as C code.
3675 (*altivec_movti): Ditto.
3676 * config/rs6000/darwin.md (movdf_low_di): Ditto.
3678 2018-09-25 Jim Wilson <jimw@sifive.com>
3680 * config/riscv/riscv.c (riscv_split_symbol): Mark auipc label as weak
3681 when target symbol is weak.
3683 2018-09-25 Bernd Edlinger <bernd.edlinger@hotmail.de>
3686 * builtins.c (unterminated_array): Simplify.
3687 * expr.c (string_constant): Handle SSA_NAME. Add more exceptions
3688 where pointer arithmetic is safe.
3690 2018-09-25 Segher Boessenkool <segher@kernel.crashing.org>
3693 * config/rs6000/altivec.md (altivec_vspltb): Use
3694 const_0_to_15_operand instead of u5bit_cint_operand.
3695 (*altivec_vspltb_internal): Ditto.
3696 (altivec_vspltb_direct): Ditto.
3697 (altivec_vsplth): Use const_0_to_7_operand instead of
3699 (*altivec_vsplth_internal): Ditto.
3700 (altivec_vsplth_direct): Ditto.
3701 (altivec_vspltw): Use const_0_to_3_operand instead of
3703 (*altivec_vspltw_internal): Ditto.
3704 (altivec_vspltw_direct): Ditto.
3705 (altivec_vspltsf): Ditto.
3706 (*altivec_vspltsf_internal): Ditto.
3707 * config/rs6000/rs6000.c (rs6000_expand_binop_builtin): Handle the
3708 various splats with the proper size immediate. Reorder the various
3709 cases by ascending size of immediate, and put all such together.
3711 2018-09-25 Richard Biener <rguenther@suse.de>
3714 * dwarf2out.c (add_AT_external_die_ref): Remove now redundant
3716 (maybe_create_die_with_external_ref): Do not create
3717 DW_TAG_imported_unit here.
3718 (add_abstract_origin_attribute): Handle external BLOCK refs.
3719 (dwarf2out_abstract_function): Simplify LTO case.
3720 (dwarf2out_early_finish): Create DW_TAG_imported_unit explicitely
3721 rather than using maybe_create_die_with_external_ref.
3723 2018-09-25 Uros Bizjak <ubizjak@gmail.com>
3726 * config/i386/i386.md (frndintxf2_mask_pm): Remove.
3727 (frndintxf2_mask_pm_i387): Ditto.
3728 (nearbyintxf2): Rewrite expander pattern to match rintxf2.
3729 Enable for !flag_trapping_math.
3730 (nearbyint<mode>2): Enable x87 modes for !flag_trapping_math.
3731 Enable SSE modes for TARGET_SSE4_1 and expand them with round insn.
3732 Change operand 1 predicate to nonimmediate_operand.
3733 (attr "i387_cw"): Remove mask_pm.
3734 * config/i386/i386.h (enum ix86_stack_slot): Remove SLOT_CW_MASK_PM.
3735 (enum ix86_entity): Remove I387_MASK_PM.
3736 * config/i386/i386.c (ix86_i387_mode_needed): Do not
3737 handle I387_MASK_PM.
3738 (ix86_mode_needed): Ditto.
3739 (ix86_mode_after): Ditto.
3740 (ix86_mode_entry): Ditto.
3741 (ix86_mode_exit): Ditto.
3742 (emit_i387_cw_initialization): Do not handle I387_CW_MASK_PM.
3744 2018-09-25 Jakub Jelinek <jakub@redhat.com>
3746 * vr-values.c (vr_values::vr_values): Initialize to_remove_edges and
3747 to_update_switch_stmts to vNULL instead of calling create on them
3750 2018-09-25 Richard Biener <rguenther@suse.de>
3752 PR tree-optimization/87402
3753 * tree-ssa-sccvn.c (SSA_VISITED): Remove unused function.
3754 (visit_phi): Re-instantiate handling of supposed to be VARYING
3755 but non-VARYING backedge value.
3757 2018-09-25 Richard Biener <rguenther@suse.de>
3760 * dwarf2out.c (struct sym_off_pair): New.
3761 (external_die_map): New global.
3762 (lookup_decl_die): When in LTO create DIEs lazily from the
3764 (lookup_block_die): New function, create DIEs lazily in LTO.
3765 (equate_block_to_die): New function.
3766 (dwarf2out_die_ref_for_decl): During WPA get the association
3767 from the external DIE map.
3768 (dwarf2out_register_external_die): Record mapping into the
3770 (maybe_create_die_with_external_ref): New function split out from
3771 DIE generation part of old dwarf2out_register_external_die.
3772 (add_abstract_origin_attribute): Do not return the DIE. When
3773 in LTO reference externals directly.
3774 (dwarf2out_abstract_function): When in LTO ignore calls for
3775 decls with external DIEs (already present abstract instances).
3776 (gen_call_site_die): Adjust.
3777 (add_high_low_attributes): Likewise.
3778 (gen_lexical_block_die): Likewise.
3779 (gen_inlined_subroutine_die): Likewie.
3780 (gen_block_die): Likewise.
3781 (dwarf2out_inline_entry): Likewise.
3782 (dwarf2out_early_finish): In LTRANS phase create DW_TAG_imported_unit
3785 2018-09-25 Martin Liska <mliska@suse.cz>
3787 * ipa-fnsummary.c (estimate_node_size_and_time): Scale by two
3788 integers and not by a float value.
3790 2018-09-25 Martin Liska <mliska@suse.cz>
3793 * dbgcnt.c (dbg_cnt_process_single_pair): Return false
3795 * dumpfile.c (dump_enable_all): Remove extra parenthesis.
3796 * gcov-tool.c: Declare the function with ATTRIBUTE_NORETURN.
3797 * godump.c (go_format_type): Remove extra parenthesis.
3799 2018-09-25 Martin Liska <mliska@suse.cz>
3801 * alias.c (set_dest_equal_p): Remove unused function.
3802 * config/i386/i386.c (def_builtin_pure2): Likewise.
3803 * diagnostic-show-locus.c (class layout): Remove
3805 (layout::layout): Likewise here.
3806 * dump-context.h (class temp_dump_context): Likewise.
3807 * dwarf2out.c (add_AT_fde_ref): Remove unused function.
3808 (add_AT_loclistsptr): Likewise.
3809 (add_AT_offset): Likewise.
3810 (get_AT_hi_pc): Likewise.
3811 (is_comdat_die): Likewise.
3812 (type_is_enum): Likewise.
3813 (ceiling): Likewise.
3814 (add_AT_vms_delta): Likewise.
3815 (is_class_die): Likewise.
3816 * edit-context.c (class line_event): Remove unused field.
3817 * graphite-sese-to-poly.c (tree_int_to_gmp): Remove
3819 * ipa-cp.c (ipa_get_vr_lat): Likewise.
3820 * lra-constraints.c (ok_for_index_p_nonstrict): Likewise.
3821 (ok_for_base_p_nonstrict): Likewise.
3822 * tree-chrec.c (is_not_constant_evolution): Likewise.
3823 (chrec_fold_poly_cst): Likewise.
3824 * tree-if-conv.c (has_pred_critical_p): Likewise.
3825 * tree-ssa-coalesce.c (print_exprs): Likewise.
3826 * tree-ssa-pre.c (bitmap_set_contains_expr): Likewise.
3827 * tree-ssa-uninit.c (is_and_or_or_p): Likewise.
3828 * tree-vrp.c (value_ranges_intersect_p): Likewise.
3829 (value_range_nonnegative_p): Likewise.
3831 2018-09-25 Martin Liska <mliska@suse.cz>
3833 * config/powerpcspe/powerpcspe.c (rs6000_output_function_epilogue):
3834 Do not handle "GNU Pascal".
3835 * config/rs6000/rs6000.c (rs6000_output_function_epilogue):
3837 * config/sparc/sparc.c (sparc_pass_by_reference): Remove Pascal
3838 from documentation. Likewise.
3839 * dbxout.c (dbxout_range_type): Likewise.
3840 * doc/cpp.texi: Likewise.
3841 * doc/extend.texi: Likewise.
3842 * doc/frontends.texi: Likewise.
3843 * doc/invoke.texi: Remove Pascal entry.
3844 * tree.def (CLEANUP_POINT_EXPR): Likewise.
3845 * doc/rtl.texi (MODE_FUNCTION): Remove not used entry.
3847 2018-09-25 Martin Liska <mliska@suse.cz>
3850 * doc/invoke.texi: Document all parameters and remove default
3853 2018-09-25 Ilya Leoshkevich <iii@linux.ibm.com>
3856 * rtl.c (rtx_code_size): Take into account that EQ_ATTR_ALT
3857 contains HOST_WIDE_INTs when computing its size.
3859 2018-09-24 Jim Wilson <jimw@sifive.com>
3862 * config/riscv/riscv.h (STACK_BOUNDARY): Test riscv_abi == ABI_ILP32E
3864 (ABI_STACK_BOUNDARY, MAX_ARGS_IN_REGISTERS): Likewise.
3866 2018-09-24 Andrew Pinski <apinski@marvell.com>
3868 * config/aarch64/aarch64.c (aarch_macro_fusion_pair_p): Don't
3869 access prev before checking it for NULLness in the
3870 AARCH64_FUSE_CMP_BRANCH case.
3872 2018-09-24 H.J. Lu <hongjiu.lu@intel.com>
3875 * config/i386/i386.c (rest_of_insert_endbranch): Set
3876 endbr_queued_at_entrance to true and don't insert ENDBR if
3877 x86_function_profiler will be called.
3878 (x86_function_profiler): Insert ENDBR if endbr_queued_at_entrance
3880 * config/i386/i386.h (machine_function): Add
3881 endbr_queued_at_entrance.
3883 2018-09-24 Ilya Leoshkevich <iii@linux.ibm.com>
3885 * genattrtab.c (mk_attr_alt): Use alternative_mask.
3886 (attr_rtx_1): Adjust caching to match the new EQ_ATTR_ALT field
3888 (check_attr_test): Use alternative_mask.
3889 (get_attr_value): Likewise.
3890 (compute_alternative_mask): Use alternative_mask and XWINT.
3891 (make_alternative_compare): Use alternative_mask.
3892 (attr_alt_subset_p): Use XWINT.
3893 (attr_alt_subset_of_compl_p): Likewise.
3894 (attr_alt_intersection): Use alternative_mask and XWINT.
3895 (attr_alt_union): Likewise.
3896 (attr_alt_complement): Use HOST_WIDE_INT and XWINT.
3897 (mk_attr_alt): Use alternative_mask and HOST_WIDE_INT.
3898 (simplify_test_exp): Use alternative_mask and XWINT.
3899 (write_test_expr): Use alternative_mask and XWINT, adjust bit
3900 number calculation to support 64 bits. Generate code that
3901 checks 64-bit masks.
3902 (main): Use alternative_mask.
3903 * rtl.def (EQ_ATTR_ALT): Change field types from ii to ww.
3905 2018-09-24 Ilya Leoshkevich <iii@linux.ibm.com>
3908 * config/s390/s390.c (s390_emit_epilogue): Do not use PARALLEL
3909 RETURN+USE when returning via %r14.
3911 2018-09-24 Martin Liska <mliska@suse.cz>
3913 * gcov.c (output_lines): Print colorization legend
3914 for both flag_use_colors and flag_use_hotness_colors.
3917 2018-09-24 Martin Liska <mliska@suse.cz>
3919 * coverage.c (get_coverage_counts): Use warning_at
3920 with current_function_decl location. Use %qD in warning
3923 2018-09-24 Martin Liska <mliska@suse.cz>
3925 * memory-block.h (memory_block_pool::release): Annotate with
3926 valgrind that the memory is not accessible.
3928 2018-09-24 Martin Liska <mliska@suse.cz>
3931 * asan.c: Make asan_handled_variables extern.
3933 * cfgexpand.c (expand_stack_vars): Make sure
3934 a representative is unpoison if another
3935 variable in the partition is handled by
3936 use-after-scope sanitization.
3938 2018-09-24 Richard Biener <rguenther@suse.de>
3940 PR tree-optimization/63155
3941 * tree-ssa-propagate.c (add_ssa_edge): Avoid adding PHIs to
3942 the worklist when the edge of the respective argument isn't
3945 2018-09-23 Uros Bizjak <ubizjak@gmail.com>
3947 * config/i386/i386.h (enum reg_class): Rename MASK_REGS to
3948 ALL_MASK_REGS and MASK_EVEX_REGS to MASK_REGS.
3949 (MASK_CLASS_P): Update for rename.
3950 (MAYBE_MASK_CLASS_P): Ditto.
3951 (REG_CLASS_NAMES): Update.
3952 (REG_CLASS_CONTENT): Update.
3953 * config/i386/i386.c (regclass_map): Update for MASK_REG
3954 and ALL_MASK_REGS rename.
3955 * config/i386/constraints.md (Yk): Update for rename.
3958 2018-09-23 Uros Bizjak <ubizjak@gmail.com>
3960 * config/i386/i386.h (enum reg_class): Remove
3961 EVEX_SSE_REGS and MOD4_SSE_REGS.
3962 (REG_CLASS_NAMES): Update.
3963 (REG_CLASS_CONTENT): Update.
3964 * config/i386/i386.c (regclass_map): Declare AVX-512 SSE
3965 registers as ALL_SSE_REGS.
3966 (ix86_additional_allocno_class_p): Remove.
3967 (TARGET_ADDITIONAL_ALLOCNO_CLASS_P): Remove.
3968 (ix86_register_priority): Lower priority of EVEX SSE registers.
3969 Use IN_RANGE macro where appropriate.
3970 (ix86_hard_regno_mode_ok): Merge AVX-5124FMAPS and
3971 AVX-5124VNNIW checks.
3972 (ix86_modes_tieable_p): Tie 512-bit SSE modes.
3973 * config/i386/sse.md (avx5124fmaddps_4fmaddps)
3974 (avx5124fmaddps_4fmaddps_mask, avx5124fmaddps_4fmaddps_maskz)
3975 (avx5124fmaddps_4fmaddss, avx5124fmaddps_4fmaddss_mask)
3976 (avx5124fmaddps_4fmaddss_maskz, avx5124fmaddps_4fnmaddps)
3977 (avx5124fmaddps_4fnmaddps_mask, avx5124fmaddps_4fnmaddps_maskz)
3978 (avx5124fmaddps_4fnmaddss, avx5124fmaddps_4fnmaddss_mask)
3979 (avx5124fmaddps_4fnmaddss_maskz, avx5124vnniw_vp4dpwssd)
3980 (avx5124vnniw_vp4dpwssd_mask, avx5124vnniw_vp4dpwssd_maskz)
3981 (avx5124vnniw_vp4dpwssds, avx5124vnniw_vp4dpwssds_mask)
3982 (avx5124vnniw_vp4dpwssds_maskz): Use "v" instead of "Yh" constraint.
3983 * config/i386/constraints.md (Yh): Remove.
3985 2018-09-23 Uros Bizjak <ubizjak@gmail.com>
3987 * config/i386/i386.c (regclass_map): Declare integer REX registers
3990 2018-09-23 Gerald Pfeifer <gerald@pfeifer.com>
3992 * doc/service.texi (Service): Switch the fsf.org link to https.
3994 2018-09-22 Chung-Ju Wu <jasonwucj@gmail.com>
3997 * config/nds32/nds32.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
3998 Define to speculation_safe_value_not_needed.
4000 2018-09-21 Florian Weimer <fweimer@redhat.com>
4003 * doc/extend.texi (Common Function Attributes): Mention that
4004 noreturn suppresses tail call optimization.
4006 2018-09-21 Jeff Law <law@redhat.com>
4008 * gimple-ssa-evrp.c (evrp_dom_walker::cleanup): Call
4009 vr_values::cleanup_edges_and_switches.
4010 * tree-vrp.c (to_remove_edges, to_update_switch_stmts): Moved into
4012 (identify_jump_threads): Remove EDGE_IGNORE handling.
4013 (execute_vrp): Move handling of to_remove_edges and
4014 to_update_switch_stmts into vr_values class member functions.
4015 * tree-vrp.h (switch_update, to_remove_edges): Remove declarations.
4016 (to_update_switch_stmts): Likewise.
4017 * vr-values.c: Include cfghooks.h.
4018 (vr_values::vr_values): Initialize to_remove_edges and
4019 to_update_switch_stmts.
4020 (vr_values::~vr_values): Verify to_remove_edges and
4021 to_update_switch_stmts are empty.
4022 (vr_values::simplify_switch_using_ranges): Set EDGE_IGNORE as needed.
4023 (vr_values::cleanup_edges_and_switches): New member function.
4024 * vr-values.h (vr_values): Add cleanup_edges_and_switches member
4025 function. Add new data members.
4027 2018-09-21 David Malcolm <dmalcolm@redhat.com>
4029 PR tree-optimization/87309
4030 * dumpfile.c (dump_context::begin_scope): Filter the dump_loc
4031 calls with pflags and alt_flags.
4032 (selftest::test_capture_of_dump_calls): Add test of interaction of
4033 MSG_OPTIMIZED_LOCATIONS with AUTO_DUMP_SCOPE.
4035 2018-09-21 Olivier Hainque <hainque@adacore.com>
4037 * config.gcc: Factorize and comment inclusion of vxworks-dummy.h.
4039 2018-09-21 Olivier Hainque <hainque@adacore.com>
4041 * config/vxworks.h (CLEAR_INSN_CACHE): #define to 1.
4043 2018-09-21 Olivier Hainque <hainque@adacore.com>
4045 * config/vxworks.h (VXWORKS_LIBGCC_SPEC): Remove -lc_internal.
4046 Merge block comment with the one ahead of VXWORKS_LIBS_RTP. Then:
4047 (VXWORKS_LIBS_RTP): Minor reordering.
4049 2018-09-21 Olivier Hainque <hainque@adacore.com>
4051 * config/vxworks.h (STARTFILE_PREFIX_SPEC): Define.
4052 (VXWORKS_LIBS_DIR_RTP): Remove definition and use.
4054 2018-09-21 Olivier Hainque <hainque@adacore.com>
4056 * config/vxworks.h (SIZE_TYPE): Account for TARGET_VXWORKS64.
4057 (PTRDIFF_TYPE): Likewise.
4059 2018-09-21 Olivier Hainque <hainque@adacore.com>
4061 * config.gcc: Enforce def of TARGET_VXWORKS64 to 1 from
4062 triplet, similar to support for VxWorks7.
4063 * config/vxworks-dummy.h: Provide a default definition
4064 of TARGET_VXWORKS64 to 0.
4066 2018-09-21 Olivier Hainque <hainque@adacore.com>
4068 * config/vxworks.h (TARGET_VXWORKS7): Move default definition ...
4069 * config/vxworks-dummy.h: here.
4071 2018-09-21 Olivier Hainque <hainque@adacore.com>
4073 * config.gcc: Prepend vxworks-dummy.h to tm_file for powerpc*
4075 2018-09-21 Shaokun Zhang <zhangshaokun@hisilicon.com>
4076 Bo Zhou <zbo.zhou@hisilicon.com>
4078 * config/aarch64/aarch64-cores.def (tsv110): New CPU.
4079 * config/aarch64/aarch64-tune.md: Regenerated.
4080 * doc/invoke.texi (AArch64 Options/-mtune): Add "tsv110".
4081 * config/aarch64/aarch64.c (tsv110_tunings): New tuning table.
4082 * config/aarch64/aarch64-cost-tables.h: Add "tsv110" extra costs.
4084 2018-09-21 Andrew Stubbs <ams@codesourcery.com>
4085 Julian Brown <julian@codesourcery.com>
4087 * builtins.c (get_builtin_sync_mem): Handle address spaces.
4089 2018-09-21 Eric Botcazou <ebotcazou@adacore.com>
4091 * config/rs6000/rs6000.c (rs6000_function_ok_for_sibcall): Return false
4092 if the call takes a static chain.
4094 2018-09-21 Martin Liska <mliska@suse.cz>
4096 * auto-profile.c (autofdo_source_profile::read): Do not
4098 (read_profile): Do not add working sets.
4099 (read_autofdo_file): Remove sum_all.
4100 (afdo_callsite_hot_enough_for_early_inline): Remove const
4102 * coverage.c (struct counts_entry): Remove gcov_summary.
4103 (read_counts_file): Read new GCOV_TAG_OBJECT_SUMMARY,
4104 do not support GCOV_TAG_PROGRAM_SUMMARY.
4105 (get_coverage_counts): Remove summary and expected
4107 * coverage.h (get_coverage_counts): Likewise.
4108 * doc/gcov-dump.texi: Remove -w option.
4109 * gcov-dump.c (dump_working_sets): Remove.
4110 (main): Do not support '-w' option.
4111 (print_usage): Likewise.
4112 (tag_summary): Likewise.
4113 * gcov-io.c (gcov_write_summary): Do not dump
4115 (gcov_read_summary): Likewise.
4116 (gcov_histo_index): Remove.
4117 (gcov_histogram_merge): Likewise.
4118 (compute_working_sets): Likewise.
4119 * gcov-io.h (GCOV_TAG_OBJECT_SUMMARY): Mark
4121 (GCOV_TAG_PROGRAM_SUMMARY): Mark it obsolete.
4122 (GCOV_TAG_SUMMARY_LENGTH): Adjust.
4123 (GCOV_HISTOGRAM_SIZE): Remove.
4124 (GCOV_HISTOGRAM_BITVECTOR_SIZE): Likewise.
4125 (struct gcov_summary): Simplify rapidly just
4126 to runs and sum_max fields.
4127 (gcov_histo_index): Remove.
4128 (NUM_GCOV_WORKING_SETS): Likewise.
4129 (compute_working_sets): Likewise.
4130 * gcov-tool.c (print_overlap_usage_message): Remove
4131 trailing empty line.
4132 * gcov.c (read_count_file): Read GCOV_TAG_OBJECT_SUMMARY.
4133 (output_lines): Remove program related line.
4134 * ipa-profile.c (ipa_profile): Do not consider GCOV histogram.
4135 * lto-cgraph.c (output_profile_summary): Do not stream GCOV
4137 (input_profile_summary): Do not read it.
4138 (merge_profile_summaries): And do not merge it.
4139 (input_symtab): Do not call removed function.
4140 * modulo-sched.c (sms_schedule): Do not print sum_max.
4141 * params.def (HOT_BB_COUNT_FRACTION): Reincarnate param that was
4142 removed when histogram method was invented.
4143 (HOT_BB_COUNT_WS_PERMILLE): Mention that it's used only in LTO
4145 * postreload-gcse.c (eliminate_partially_redundant_load): Fix
4147 * predict.c (get_hot_bb_threshold): Use HOT_BB_COUNT_FRACTION
4148 and dump selected value.
4149 * profile.c (add_working_set): Remove.
4150 (get_working_sets): Likewise.
4151 (find_working_set): Likewise.
4152 (get_exec_counts): Do not work with working sets.
4153 (read_profile_edge_counts): Do not inform as sum_max is removed.
4154 (compute_branch_probabilities): Likewise.
4155 (compute_value_histograms): Remove argument for call of
4156 get_coverage_counts.
4157 * profile.h: Do not make gcov_summary const.
4159 2018-09-21 Monk Chiang <sh.chiang04@gmail.com>
4161 * config.gcc (nds32*-*-*): Set TARGET_DEFAULT_TLSDESC_TRAMPOLINE=0.
4163 2018-09-21 Eric Botcazou <ebotcazou@adacore.com>
4165 PR tree-optimization/86990
4166 * gimple-ssa-store-merging.c (imm_store_chain_info:coalesce_immediate):
4167 Check that the entire merged store group is made of constants only for
4170 2018-09-20 Allan Sandfeld Jensen <allan.jensen@qt.io>
4172 * gcc.c (LINK_COMMAND_SPEC): Handle -r like -nostdlib.
4173 (VTABLE_VERIFICATION_SPEC): Likewise.
4174 (SANITIZER_EARLY_SPEC): Likewise.
4175 (SANITIZER_SPEC): Likewise.
4176 * config/darwin.h (LINK_COMMAND_SPEC): Likewise.
4177 * doc/invoke.texi (Link Options): Document -r.
4179 2018-09-20 Richard Biener <rguenther@suse.de>
4182 * gimplify.c (gimplify_expr): Retain alignment of
4183 addressable lvalue in dereference.
4185 2018-09-20 Alexandre Oliva <aoliva@redhat.com>
4188 * configure.ac: Check for .loc is_stmt support.
4189 * configure, config.in: Rebuilt.
4190 * dwarf2out.c (dwarf2out_source_line): Skip is_stmt
4193 2018-09-20 Segher Boessenkool <segher@kernel.crashing.org>
4195 * config/rs6000/rs6000.opt (misel=no, misel=yes): Delete.
4196 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -misel=yes and
4199 2018-09-20 Segher Boessenkool <segher@kernel.crashing.org>
4201 * config/rs6000/rs6000-opts.h (enum rs6000_vector): Delete
4203 * config/rs6000/rs6000.c (rs6000_debug_vector_unit): Delete
4206 2018-09-20 Marek Polacek <polacek@redhat.com>
4208 * doc/invoke.texi: Add -Wno-init-list-lifetime to C++ Language Options.
4210 2018-09-20 Richard Sandiford <richard.sandiford@arm.com>
4212 PR tree-optimization/87288
4213 * tree-vect-loop.c (vect_analyze_loop_2): Take PEELING_FOR_GAPS
4214 into account when determining PEELING_FOR_NITERS.
4216 2018-09-20 Richard Sandiford <richard.sandiford@arm.com>
4218 PR tree-optimization/86877
4219 * tree-vect-loop.c (vect_analyze_loop_2): Call
4220 vect_verify_datarefs_alignment.
4222 2018-09-19 Marek Polacek <polacek@redhat.com>
4224 * doc/invoke.texi: Document -Wclass-conversion.
4226 2018-09-19 John David Anglin <danglin@gcc.gnu.org>
4228 * config/pa/pa.c (pa_adjust_priority): Delete.
4229 (TARGET_SCHED_ADJUST_PRIORITY): Delete define.
4231 * config/pa/pa.md (atomic_storeqi): Restore deleted expander.
4232 (atomic_storehi): Likewise.
4233 (atomic_storesi): Likewise.
4234 (atomic_loaddi): Restore compare and swap exchange loop code.
4236 2018-09-19 Segher Boessenkool <segher@kernel.crashing.org>
4238 PR rtl-optimization/86902
4239 * combine.c (try_combine): When changing the CC mode used, don't change
4240 an unrelated mode in other_insn to that new CC mode.
4242 2018-09-19 David Malcolm <dmalcolm@redhat.com>
4244 * tree-data-ref.c (runtime_alias_check_p): Use formatted printing
4245 with %T in place of calls to dump_generic_expr.
4246 (prune_runtime_alias_test_list): Likewise.
4247 (create_runtime_alias_checks): Likewise.
4248 * tree-vect-data-refs.c (vect_check_nonzero_value): Likewise.
4249 (vect_analyze_data_ref_dependence): Likewise.
4250 (vect_slp_analyze_data_ref_dependence): Likewise.
4251 (vect_record_base_alignment): Likewise. Use %G in place of call
4252 to dump_gimple_stmt.
4253 (vect_compute_data_ref_alignment): Likewise.
4254 (verify_data_ref_alignment): Likewise.
4255 (vect_find_same_alignment_drs): Likewise.
4256 (vect_analyze_group_access_1): Likewise.
4257 (vect_analyze_data_ref_accesses): Likewise.
4258 (dependence_distance_ge_vf): Likewise.
4259 (dump_lower_bound): Likewise.
4260 (vect_prune_runtime_alias_test_list): Likewise.
4261 (vect_find_stmt_data_reference): Likewise.
4262 (vect_analyze_data_refs): Likewise.
4263 (vect_create_addr_base_for_vector_ref): Likewise.
4264 (vect_create_data_ref_ptr): Likewise.
4265 * tree-vect-loop-manip.c (vect_set_loop_condition): Likewise.
4266 (vect_can_advance_ivs_p): Likewise.
4267 (vect_update_ivs_after_vectorizer): Likewise.
4268 (vect_gen_prolog_loop_niters): Likewise.
4269 (vect_prepare_for_masked_peels): Likewise.
4270 * tree-vect-loop.c (vect_determine_vf_for_stmt): Likewise.
4271 (vect_determine_vectorization_factor): Likewise.
4272 (vect_is_simple_iv_evolution): Likewise.
4273 (vect_analyze_scalar_cycles_1): Likewise.
4274 (vect_analyze_loop_operations): Likewise.
4275 (report_vect_op): Likewise.
4276 (vect_is_slp_reduction): Likewise.
4277 (check_reduction_path): Likewise.
4278 (vect_is_simple_reduction): Likewise.
4279 (vect_create_epilog_for_reduction): Likewise.
4280 (vect_finalize_reduction:): Likewise.
4281 (vectorizable_induction): Likewise.
4282 (vect_transform_loop_stmt): Likewise.
4283 (vect_transform_loop): Likewise.
4284 (optimize_mask_stores): Likewise.
4285 * tree-vect-patterns.c (vect_pattern_detected): Likewise.
4286 (vect_split_statement): Likewise.
4287 (vect_recog_over_widening_pattern): Likewise.
4288 (vect_recog_average_pattern): Likewise.
4289 (vect_determine_min_output_precision_1): Likewise.
4290 (vect_determine_precisions_from_range): Likewise.
4291 (vect_determine_precisions_from_users): Likewise.
4292 (vect_mark_pattern_stmts): Likewise.
4293 (vect_pattern_recog_1): Likewise.
4294 * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
4295 (vect_record_max_nunits): Likewise.
4296 (vect_build_slp_tree_1): Likewise.
4297 (vect_build_slp_tree_2): Likewise.
4298 (vect_print_slp_tree): Likewise.
4299 (vect_analyze_slp_instance): Likewise.
4300 (vect_detect_hybrid_slp_stmts): Likewise.
4301 (vect_detect_hybrid_slp_1): Likewise.
4302 (vect_slp_analyze_operations): Likewise.
4303 (vect_slp_analyze_bb_1): Likewise.
4304 (vect_transform_slp_perm_load): Likewise.
4305 (vect_schedule_slp_instance): Likewise.
4306 * tree-vect-stmts.c (vect_mark_relevant): Likewise.
4307 (vect_mark_stmts_to_be_vectorized): Likewise.
4308 (vect_init_vector_1): Likewise.
4309 (vect_get_vec_def_for_operand): Likewise.
4310 (vect_finish_stmt_generation_1): Likewise.
4311 (vect_check_load_store_mask): Likewise.
4312 (vectorizable_call): Likewise.
4313 (vectorizable_conversion): Likewise.
4314 (vectorizable_operation): Likewise.
4315 (vectorizable_load): Likewise.
4316 (vect_analyze_stmt): Likewise.
4317 (vect_is_simple_use): Likewise.
4318 (vect_get_vector_types_for_stmt): Likewise.
4319 (vect_get_mask_type_for_stmt): Likewise.
4320 * tree-vectorizer.c (increase_alignment): Likewise.
4322 2018-09-19 Andrew Stubbs <ams@codesourcery.com>
4324 * doc/rtl.texi: Adjust vec_select description.
4325 * simplify-rtx.c (simplify_binary_operation_1): Allow VEC_SELECT to use
4326 non-constant selectors.
4328 2018-09-19 Matthew Malcomson <matthew.malcomson@arm.com>
4330 * config/aarch64/aarch64-protos.h
4331 (aarch64_offset_9bit_signed_unscaled_p): New declaration.
4332 * config/aarch64/aarch64.md (arches): New "rcpc8_4" attribute value.
4333 (arch_enabled): Add check for "rcpc8_4" attribute value of "arch".
4334 * config/aarch64/aarch64.h (AARCH64_FL_RCPC8_4): New bitfield.
4335 (AARCH64_FL_FOR_ARCH8_4): Include AARCH64_FL_RCPC8_4.
4336 (AARCH64_FL_PROFILE): Move index so flags are ordered.
4337 (AARCH64_ISA_RCPC8_4): New flag.
4338 * config/aarch64/aarch64.c (offset_9bit_signed_unscaled_p): Renamed
4339 to aarch64_offset_9bit_signed_unscaled_p.
4340 * config/aarch64/atomics.md (atomic_store<mode>): Allow offset
4342 * config/aarch64/constraints.md (Ust): New constraint.
4343 * config/aarch64/predicates.md.
4344 (aarch64_9bit_offset_memory_operand): New predicate.
4345 (aarch64_rcpc_memory_operand): New predicate.
4347 2018-09-19 Eric Botcazou <ebotcazou@adacore.com>
4349 PR rtl-optimization/87361
4350 * rtlanal.c (nonzero_bits1): Revert accidental change.
4352 2018-09-19 Richard Biener <rguenther@suse.de>
4354 PR tree-optimization/87349
4355 PR tree-optimization/87342
4356 * tree-ssa-sccvn.c (do_rpo_vn): Iterate max_rpo computation.
4358 2018-09-18 Marek Polacek <polacek@redhat.com>
4360 P1064R0 - Allowing Virtual Function Calls in Constant Expressions
4361 * gimple-fold.c (gimple_get_virt_method_for_vtable): Adjust assert.
4363 2018-09-18 Segher Boessenkool <segher@kernel.crashing.org>
4365 * config/rs6000/rs6000.md: Remove old "Cygnus sibcall" comment.
4367 2018-09-18 Segher Boessenkool <segher@kernel.crashing.org>
4369 PR rtl-optimization/86882
4370 * rtlanal.c (reg_overlap_mentioned_p): Handle CLOBBER.
4372 2018-09-18 Uros Bizjak <ubizjak@gmail.com>
4374 * config/i386/i386.md (*<code>extend<mode>xf2): Macroize insn from
4375 *<code>extendsfxf2 and *<code>extenddfxf2 using MODEF mode iterator.
4377 2018-09-18 Jonathan Wakely <jwakely@redhat.com>
4380 * doc/invoke.texi (Link Options): Fix formatting and grammar.
4382 2018-09-18 Richard Biener <rguenther@suse.de>
4385 * tree-ssa-coalesce.c (tree_int_map_hasher): Remove.
4386 (compute_samebase_partition_bases): Likewise.
4387 (coalesce_ssa_name): Always use compute_optimized_partition_bases.
4388 (gimple_can_coalesce_p): Simplify.
4390 2018-09-18 Hans-Peter Nilsson <hp@bitrange.com>
4392 Handle a library implementation of ffs calling __builtin_ffs.
4393 * config/mmix/mmix.c (TARGET_INIT_LIBFUNCS): Override with...
4394 (mmix_init_libfuncs): New function: make __builtin_ffs expand
4397 2018-09-17 David Malcolm <dmalcolm@redhat.com>
4399 * diagnostic-show-locus.c (class layout_range): Add field
4401 (layout_range::layout_range): Add "original_idx" param and use it
4402 to initialize new field.
4403 (make_range): Use 0 for original_idx.
4404 (layout::layout): Pass in index to calls to
4405 maybe_add_location_range.
4406 (layout::maybe_add_location_range): Add param "original_idx" and
4407 pass it on to layout_range.
4408 (layout::print_any_labels): Pass on range->m_original_idx to
4410 (gcc_rich_location::add_location_if_nearby): Use 0 for
4412 * gcc-rich-location.h (text_range_label::get_text): Update for new
4414 (range_label_for_type_mismatch::get_text): Likewise.
4416 2018-09-17 Uros Bizjak <ubizjak@gmail.com>
4418 * config/i386/i386.c (ix86_emit_i387_log1p): Emit fldln2 earlier.
4420 2018-09-17 David Malcolm <dmalcolm@redhat.com>
4422 * gimple-ssa-sprintf.c (fmtwarn): Update for introduction of
4423 format_string_diagnostic_t.
4424 (fmtwarn_n): Likewise.
4425 * substring-locations.c
4426 (format_string_diagnostic_t::format_string_diagnostic_t) New ctor.
4427 (format_warning_n_va): Convert to...
4428 (format_string_diagnostic_t::emit_warning_n_va): ...this.
4429 (format_warning_va): Convert to...
4430 (format_string_diagnostic_t::emit_warning_va): ...this.
4431 (format_warning_at_substring): Convert to...
4432 (format_string_diagnostic_t::emit_warning): ...this.
4433 (format_warning_at_substring_n): Convert to...
4434 (format_string_diagnostic_t::emit_warning_n): ...this.
4435 * substring-locations.h (class format_string_diagnostic_t): New
4437 (format_warning_va): Convert to
4438 format_string_diagnostic_t::emit_warning_va.
4439 (format_warning_n_va): Convert to
4440 format_string_diagnostic_t::emit_warning_n_va.
4441 (format_warning_at_substring): Convert to
4442 format_string_diagnostic_t::emit_warning.
4443 (format_warning_at_substring_n): Convert to
4444 format_string_diagnostic_t::emit_warning_n.
4446 2018-09-17 Cesar Philippidis <cesar@codesourcery.com>
4447 Bernd Schmidt <bernds_cb1@t-online.de>
4449 * config/nvptx/nvptx.md (atomic_fetch_<logic><mode>): Enable with
4452 2018-09-17 Uros Bizjak <ubizjak@gmail.com>
4454 * config/i386/i386.md (truncxf<mode>2_i387_noop_unspec): Change
4455 operand 0 predicate to nonimmediate operand.
4456 (rint<mode>2_frndint): Remove insn pattern.
4457 (rint<mode>2): Change operand 1 predicate to general_operand.
4458 Extend operand 1 to XFmode and generate rintxf2 insn.
4459 (frndintxf2_<rounding>): Rename from frndint<mode>2_<rounding>.
4460 Do not use X87MODEF mode macro.
4461 (frndintxf2_<rounding>_i387): Rename from
4462 frndint<mode>2_<rounding>_i387. Do not use X87MODEF mode macro.
4463 (<rounding_insn><mode>2): For non-SSE modes, extend operand 1
4464 to XFmode and generate significandxf3 insn.
4466 2018-09-17 Richard Biener <rguenther@suse.de>
4468 PR tree-optimization/87328
4469 * tree-ssa-sccvn.c (process_bb): Remove assertion about not
4470 visiting unexecutable backedges when not iterating.
4471 (do_rpo_vn): Mark all edges not executable even when not
4474 2018-09-17 Martin Jambor <mjambor@suse.cz>
4477 * doc/invoke.texi (Warning Options): Likewise.
4479 2018-09-17 Richard Biener <rguenther@suse.de>
4481 PR tree-optimization/87301
4482 * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_cleanup): Properly
4483 clean EH info from leftover copy assignments.
4485 2018-09-17 Martin Liska <mliska@suse.cz>
4487 PR gcov-profile/85871
4488 * gcov.c (output_intermediate_file): Fix out of bounds
4491 2018-09-17 Vineet Gupta <vgupta@synopsys.com>
4493 * config/arc/arc.c: Object attributes for core4 not reflected
4495 * config/arc/arc.h: Don't restrict DBNZ to core3 (core4 includes
4498 2018-09-17 Alexey Brodkin <abrodkin@synopsys.com>
4500 * config/arc/linux.h (LINK_EH_SPEC): Add missing space.
4502 2018-09-17 Martin Liska <mliska@suse.cz>
4504 * doc/gcov.texi: Document new option --use-hotness-colors.
4505 * gcov.c (struct source_info): Declare new field.
4506 (source_info::source_info): Set default for maximum_count.
4507 (print_usage): Add new -q option.
4508 (process_args): Process it.
4509 (accumulate_line_info): Save src->maximum_count.
4510 (output_line_beginning): Make color line number if
4511 flag_use_hotness_colors is set.
4512 (output_line_details): Pass default argument value.
4513 (output_lines): Pass src->maximum_count.
4515 2018-09-17 Martin Liska <mliska@suse.cz>
4517 * common/config/i386/i386-common.c (ix86_get_valid_option_values):
4518 Use processor_names table.
4519 * config/i386/i386.c (ix86_default_align): Use
4520 processor_cost_table for alignment values.
4521 (ix86_option_override_internal): Use processor_names.
4522 (ix86_function_specific_print): Likewise.
4523 * config/i386/i386.h (struct processor_costs):
4524 Add alignment values.
4525 (struct ptt): Remove and replace with const char *.
4526 * config/i386/x86-tune-costs.h (struct processor_costs):
4527 Declare default alignments for all costs.
4529 2018-09-17 Aldy Hernandez <aldyh@redhat.com>
4531 * tree-vrp.c (extract_range_from_unary_expr): Do not special case
4532 symbolics or VR_VARYING ranges for ABS_EXPR.
4533 * wide-int-range.cc (wide_int_range_abs): Return positive numbers
4534 when range will wrap.
4536 2018-09-15 Eric Botcazou <ebotcazou@adacore.com>
4539 * cfgexpand.c (expand_gimple_basic_block): Be prepared for a BARRIER
4540 before and after a JUMP_TABLE_DATA.
4542 2018-09-14 John David Anglin <danglin@gcc.gnu.org>
4545 * dojump.c (do_compare_and_jump): Canonicalize function pointers
4546 when one operand is a function pointer. Use POINTER_TYPE_P and
4547 FUNC_OR_METHOD_TYPE_P.
4548 * expr.c (do_store_flag): Use POINTER_TYPE_P and FUNC_OR_METHOD_TYPE_P.
4549 * fold-const.c (build_range_check): Likewise.
4550 * match.pd (simple_comparison): Likewise.
4552 2018-09-14 David Malcolm <dmalcolm@redhat.com>
4555 * spellcheck.c (get_edit_distance_cutoff): New function.
4556 (selftest::test_edit_distance_unit_test_oneway): Rename to...
4557 (selftest::test_get_edit_distance_one_way): ...this.
4558 (selftest::test_get_edit_distance_unit): Rename to...
4559 (selftest::test_get_edit_distance_both_ways): ...this.
4560 (selftest::test_edit_distances): Move tests to this new function,
4561 and test some more pairs of strings. Update for above renaming.
4562 (selftest::get_old_cutoff): New function.
4563 (selftest::test_get_edit_distance_cutoff): New function.
4564 (selftest::assert_suggested_for): New function.
4565 (ASSERT_SUGGESTED_FOR): New macro.
4566 (selftest::assert_not_suggested_for): New function.
4567 (ASSERT_NOT_SUGGESTED_FOR): New macro.
4568 (selftest::test_suggestions): New function.
4569 (selftest::spellcheck_c_tests): Move test_get_edit_distance_unit
4570 tests to selftest::test_edit_distances and call it. Add calls to
4571 selftest::test_get_edit_distance_cutoff and
4572 selftest::test_suggestions.
4573 * spellcheck.h (get_edit_distance_cutoff): New function declaration.
4574 (best_match::consider): Replace hard-coded cutoff calculation with
4576 (best_match::get_cutoff): New declaration.
4577 (best_match::get_best_meaningful_candidate): Likewise.
4579 2018-09-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
4581 * builtins.c (fold_builtin_strlen): Remove TODO comment.
4583 2018-09-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
4586 2018-07-30 Bernd Edlinger <bernd.edlinger@hotmail.de>
4588 * tree-ssa-forwprop.c (simplify_builtin_call): Don't create a not NUL
4589 terminated string literal.
4591 2018-09-14 Martin Sebor <msebor@redhat.com>
4593 * builtins.c (unterminated_array): Handle ARRAY_REF.
4594 (expand_builtin_stpcpy_1): Detect unterminated char arrays.
4595 * builtins.h (unterminated_array): Declare extern.
4596 * gimple-fold.c (gimple_fold_builtin_stpcpy): Detect unterminated
4598 (gimple_fold_builtin_sprintf): Propagate NO_WARNING to transformed
4601 2018-09-14 Martin Sebor <msebor@redhat.com>
4602 Jeff Law <law@redhat.com>
4604 * builtins.c (unterminated_array): New.
4605 (expand_builtin_strcpy): Adjust.
4606 (expand_builtin_strcpy_args): Detect unterminated arrays.
4607 * gimple-fold.c (get_maxval_strlen): Add argument. Detect
4608 unterminated arrays.
4609 * gimple-fold.h (get_maxval_strlen): Add argument.
4610 (gimple_fold_builtin_strcpy): Detec unterminated arrays.
4612 * gimple-fold.c (get_range_strlen): Add argument.
4613 (get_maxval_strlen): Adjust.
4614 * gimple-fold.h (get_range_strlen): Add argument.
4616 2018-09-14 Wei Xiao <wei3.xiao@intel.com>
4618 * config/i386/movdirintrin.h: Fix copyright year.
4620 2018-09-14 Uros Bizjak <ubizjak@gmail.com>
4622 * reg-stack.c: Include regs.h.
4623 (replace_reg): Assert that mode is MODE_FLOAT or MODE_COMPLEX_FLOAT.
4624 (emit_pop_insn): Default pop insn mode to the reg_raw_mode of
4625 FIRST_STACK_REG, not DFmode.
4626 (emit_swap_insn): Default swap insn mode to the reg_raw_mode of
4627 FIRST_STACK_REG, not XFmode. Explicitly construct swap RTX.
4628 (change stack): Default register mode to the reg_raw_mode of
4629 FIRST_STACK_REG, not DFmode.
4630 * config/i386/i386.md (*swap<mode>): Remove insn pattern.
4631 (*swapxf): Rename from swapxf.
4633 2018-09-14 Carl Love <cel@us.ibm.com>
4635 * config/rs6000/emmintrin.h: Add _MM_SHUFFLE2.
4636 * config/rs6000/xmmintrin.h: Add _MM_SHUFFLE.
4638 2018-09-14 Segher Boessenkool <segher@kernel.crashing.org>
4641 * config/rs6000/rs6000.md (*mov<mode>_hardfloat64): Add Z to the Y
4644 2018-09-14 Sam Tebbs <sam.tebbs@arm.com>
4647 * config/aarch64/aarch64.md (*aarch64_bfxilsi_uxtw): Define.
4649 2018-09-14 Jason Merrill <jason@redhat.com>
4651 Fix --enable-gather-detailed-mem-stats.
4652 * hash-table.c (hash_table_usage): Change from variable to function.
4653 * hash-table.h: Adjust.
4654 * Makefile.in: Add missing dependencies on hash-table.h.
4656 2018-09-14 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
4658 PR tree-optimization/87259
4660 (pass_cse_reciprocals::execute): Run optimize_recip_sqrt after
4661 execute_cse_reciprocals_1 has tried transforming.
4663 2018-09-14 Aldy Hernandez <aldyh@redhat.com>
4665 * tree-vrp.c (extract_range_from_binary_expr_1): Normalize
4666 VR_VARYING for PLUS/MINUS_EXPR.
4668 2018-09-14 Ilya Leoshkevich <iii@linux.ibm.com>
4670 * config/s390/s390-passes.def (INSERT_PASS_BEFORE): Improve
4673 2018-09-14 Richard Biener <rguenther@suse.de>
4676 * tree-ssa-coalesce.c (ssa_conflicts_merge): Remove conflict
4677 bits for the merged partition.
4679 2018-09-13 Martin Sebor <msebor@redhat.com>
4680 Bernd Edlinger <bernd.edlinger@hotmail.de>
4682 * builtins.h (c_srlen): Add argument.
4683 * builtins.c (warn_string_no_nul): New function.
4684 (c_strlen): Add argument and use it. Update recursive calls.
4685 Pass DECL argument to string_constant to get info on non
4686 terminated strings. Update *NONSTR as needed.
4687 (fold_builtin_strlen): Add argument to calls to c_strlen.
4688 Warn for unterminated arrays.
4689 (warn_string_no_null): Add prototype.
4690 * expr.c (string_constant): Update arguments. Update recursive
4691 calls appropriately. Detect missing NUL terminator and outermost
4692 declaration its missing in.
4693 Improve checks for arrays with nonzero lower bound or elements
4694 that are not a single byte. Simplify offset computation.
4695 Simplify checks for non-NUL terminated strings.
4696 * gimple-fold.c (get_range_strlen): Add argument to c_strlen call.
4697 * gimple-ssa-sprintf.c (get_string_length): Remove unnecessary code.
4699 2018-09-13 Bernd Edlinger <bernd.edlinger@hotmail.de>
4701 * builtins.c (c_strlen): Handle not zero terminated STRING_CSTs
4703 * fold-const.c (c_getstr): Fix function comment. Remove unused third
4704 argument. Fix range checks.
4705 * fold-const.h (c_getstr): Adjust protoype.
4706 * gimple-fold.c (gimple_fold_builtin_memory_op): Avoid folding when
4707 string is constant but contains no NUL byte.
4709 * expr.c (string_constant): Adjust function comment.
4710 Remove bogus check for zero termination.
4712 * fold-const.c (c_getstr): Clamp STRING_LENGTH to STRING_SIZE.
4714 * varasm.c (compare_constant): Compare type size of STRING_CSTs.
4715 (get_constant_size): Don't make STRING_CSTs larger than they are.
4716 (check_string_literal): New check function for STRING_CSTs.
4717 (output_constant): Use it.
4719 2018-09-13 Eric Botcazou <ebotcazou@adacore.com>
4722 * config/visium/visium.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define.
4724 2018-09-13 Richard Biener <rguenther@suse.de>
4726 PR tree-optimization/87263
4727 * tree-ssa-sccvn.c (visit_phi): Revert some earlier changes.
4728 (struct unwind_state): Add max_rpo field.
4729 (do_rpo_vn): Allow up-to-date loop state to be used when not iterating.
4730 Compute max_rpo, the max RPO number a block can be backwards reached
4731 from. Re-write non-iterating mode to a RPO ordered worklist approach,
4732 separating it from the iterating mode.
4734 2018-09-13 Vlad Lazar <vlad.lazar@arm.com>
4736 * haifa-sched.c (rank_for_schedule): Schedule by INSN_COST.
4737 (rfs_decision): New scheduling decision.
4739 2018-09-13 Richard Biener <rguenther@suse.de>
4742 * tree-ssa-sccvn.c (vn_nary_op_insert_into): Fix assert.
4743 (vn_nary_op_insert_pieces_predicated): Do not write useless
4744 valid_dominated_by_p entry outside of the allocated storage.
4746 2018-09-13 Omar Sandoval <osandov@osandov.com>
4747 Tom de Vries <tdevries@suse.de>
4750 * dwarf2out.c (is_c): New function.
4751 (add_subscript_info): Add DW_AT_count of 0 for C zero-length arrays.
4753 2018-09-13 Sam Tebbs <sam.tebbs@arm.com>
4756 * config/aarch64/aarch64.md (*aarch64_bfxil):
4758 * config/aarch64/constraints.md (Ulc): Define.
4759 * config/aarch64/aarch64-protos.h (aarch64_high_bits_all_ones_p):
4761 * config/aarch64/aarch64.c (aarch64_high_bits_all_ones_p):
4764 2018-09-13 Vlad Lazar <vlad.lazar@arm.com>
4766 * config/aarch64/aarch64.h (TARGET_COMPUTE_FRAME_LAYOUT): Define.
4767 * config/aarch64/aarch64.c (aarch64_expand_prologue): Remove
4768 aarch64_layout_frame call.
4769 (aarch64_expand_epilogue): Likewise.
4770 (aarch64_initial_elimination_offset): Likewise.
4771 (aarch64_get_separate_components): Likewise.
4772 (aarch64_use_return_insn_p): Likewise.
4773 (aarch64_layout_frame): Remove unneeded check.
4775 2018-09-13 Jakub Jelinek <jakub@redhat.com>
4777 * configure.ac: Only append
4778 " : (reconfigured) $TOPLEVEL_CONFIGURE_ARGUMENTS" to
4779 gcc_config_arguments if it was never reconfigured or last reconfigure
4780 was with different arguments.
4781 * configure: Regenerated.
4783 2018-09-13 Jakub Jelinek <jakub@redhat.com>
4784 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
4787 * expr.c (maybe_optimize_pow2p_mod_cmp): New function.
4788 (maybe_optimize_mod_cmp): Use it if integer_pow2p treeop1.
4790 2018-09-13 Jakub Jelinek <jakub@redhat.com>
4792 PR tree-optimization/87287
4793 * fold-const.c (fold_binary_loc) <case EQ_EXPR>: Move signed modulo
4794 X % C == 0 to X % (unsigned) C == 0 optimization to ...
4795 * match.pd (X % C == 0): ... here. New optimization.
4797 2018-09-12 Jakub Jelinek <jakub@redhat.com>
4800 * expr.h (maybe_optimize_mod_cmp): Declare.
4801 * expr.c (mod_inv): New function.
4802 (maybe_optimize_mod_cmp): New function.
4803 (do_store_flag): Use it.
4804 * cfgexpand.c (expand_gimple_cond): Likewise.
4806 2018-09-09 Cesar Philippidis <cesar@codesourcery.com>
4807 Julian Brown <julian@codesourcery.com>
4810 * gimplify.c (gimplify_scan_omp_clauses): Set
4811 target_firstprivatize_array_bases in OpenACC parallel and kernels
4812 region contexts. Remove GOMP_MAP_FIRSTPRIVATE_REFERENCE clauses from
4813 OpenACC data regions.
4815 2018-09-12 Uros Bizjak <ubizjak@gmail.com>
4817 * config/i386/i386.md (sqrt_extend<mode>xf3_i387): Remove.
4818 (sqrt<mode>2): Extend operand 1 to XFmode and generate sqrtxf3 insn.
4820 2018-09-12 Richard Biener <rguenther@suse.de>
4822 PR tree-optimization/87280
4823 * tree-ssa-sccvn.c (process_bb): Handle the case of executable
4824 edge but unreachable target.
4825 (do_rpo_vn): For conservatively handling a PHI only mark
4826 the backedge executable but not the block reachable.
4828 2018-09-12 Richard Biener <rguenther@suse.de>
4830 PR tree-optimization/87266
4831 * tree-ssa-sccvn.c (do_rpo_vn): Always iterate to not yet
4834 2018-09-12 Andreas Krebbel <krebbel@linux.ibm.com>
4836 * config/s390/s390.md (PFPO_RND_MODE_DFP, PFPO_RND_MODE_BFP): New
4838 ("trunc<BFP:mode><DFP_ALL:mode>2")
4839 ("trunc<DFP_ALL:mode><BFP:mode>2")
4840 ("extend<BFP:mode><DFP_ALL:mode>2")
4841 ("extend<DFP_ALL:mode><BFP:mode>2"): Set proper rounding mode
4842 according to the target operand type.
4844 2018-09-12 Jakub Jelinek <jakub@redhat.com>
4845 Andreas Krebbel <krebbel@linux.ibm.com>
4847 PR tree-optimization/86844
4848 * gimple-ssa-store-merging.c
4849 (imm_store_chain_info::coalesce_immediate): For overlapping stores, if
4850 there are any overlapping stores in between them, make sure they are
4851 also coalesced or we give up completely.
4853 2018-09-12 Jakub Jelinek <jakub@redhat.com>
4856 * fold-const.c (fold_ternary_loc) <case COND_EXPR>: Verify also that
4857 BIT_AND_EXPR's second operand is a power of two. Formatting fix.
4859 2018-09-12 Tom de Vries <tdevries@suse.de>
4861 * common.opt (gdescribe-dies): Add option.
4862 * dwarf2out.c (add_name_and_src_coords_attributes): Add description
4863 attribute for artifical and nameless decls.
4864 (dwarf2out_register_external_die): Add description attribute to
4865 external reference die.
4866 (add_desc_attribute): New functions.
4867 (gen_subprogram_die): Add description attribute to
4868 DW_TAG_call_site_parameter.
4869 * tree-pretty-print.c (print_generic_expr_to_str): New function.
4870 * tree-pretty-print.h (print_generic_expr_to_str): Declare.
4871 * doc/invoke.texi (@item Debugging Options): Add -gdescribe-dies and
4873 (@item -gdescribe-dies): Add.
4875 2018-09-12 Aldy Hernandez <aldyh@redhat.com>
4877 * tree-vrp.c (vrp_shift_undefined_p): Remove.
4878 (extract_range_from_binary_expr_1: Call
4879 wide_int_range_shift_undefined_p instead of vrp_shift_undefined_p.
4880 * wide-int-range.h (wide_int_range_shift_undefined_p): Do not
4883 2018-09-12 Aldy Hernandez <aldyh@redhat.com>
4885 * gimple-ssa-warn-alloca.c
4886 (alloca_type_and_limit::alloca_type_and_limit): Initialize limit
4887 field for ALLOCA_BOUND_*_LARGE.
4889 2018-09-11 Nathan Sidwell <nathan@acm.org>
4891 * gcc.c (load_specs, execute, run_attempt): Use %qs not '%s'.
4893 2018-09-11 Uros Bizjak <ubizjak@gmail.com>
4895 * reg-stack.c (subst_asm_stack_regs): Call replace_reg also
4896 for clobbers. Remove obsolete comment.
4898 2018-09-11 Uros Bizjak <ubizjak@gmail.com>
4900 * config/i386/i386.md (define_attr "type"): Remove mpxmov, mpxmk,
4901 mpxchk, mpxld and mpxst types.
4902 (define_attr length_immediate): Remove all processing of mpx types.
4903 (define_attr prefix_0f): Ditto.
4904 (define_attr memory): Ditto.
4906 2018-09-11 Uros Bizjak <ubizjak@gmail.com>
4908 * config/i386/i386.md (fyl2x_extend<mode>xf3_i387): Remove.
4909 (log<mode>2): Change operand 1 predicate to general_operand.
4910 Extend operand 1 to XFmode and generate logxf3 insn.
4911 (log10<mode>2): Change operand 1 predicate to general_operand.
4912 Extend operand 1 to XFmode and generate log10xf3 insn.
4913 (log2<mode>2): Change operand 1 predicate to general_operand.
4914 Extend operand 1 to XFmode and generate log2xf3 insn.
4915 (fyl2xp1_extend<mode>xf3_i387): Remove.
4916 (log1p<mode>2): Change operand 1 predicate to general_operand.
4917 Extend operand 1 to XFmode and generate log1pxf3 insn.
4918 (fxtract_extend<mode>xf3_i387): Remove.
4919 (logb<mode>2): Change operand 1 predicate to general_operand.
4920 Extend operand 1 to XFmode and generate logbxf3 insn.
4921 (ilogb<mode>2): Change operand 1 predicate to general_operand.
4922 Extend operand 1 to XFmode and generate fxtractxf3_i387 insn.
4923 (significand<mode>2): Change operand 1 predicate to general_operand.
4924 Extend operand 1 to XFmode and generate significandxf3 insn.
4926 2018-09-11 Nathan Sidwell <nathan@acm.org>
4928 * gcc.c (perror_with_name, pfatal_with_name): Delete.
4929 (load_specs): Use fatal_error.
4930 (DELETE_IF_ORDINARY, process_command): Use error.
4931 (execute, run_attempt): Use fatal_error.
4933 2018-09-11 Andrew Stubbs <ams@codesourcery.com>
4935 * diagnostic-core.h (sorry_at): New prototype.
4936 * diagnostic.c (sorry_at): New function.
4938 2018-09-11 Aldy Hernandez <aldyh@redhat.com>
4940 * tree-vrp.c (extract_range_from_binary_expr_1): Treat all divisions
4941 by zero as VR_UNDEFINED.
4943 2018-09-10 Uros Bizjak <ubizjak@gmail.com>
4945 * config/i386/i386.md (<sincos>xf2): Rename from *<sincos>xf2_i387.
4946 (*<sincos>_extend<mode>xf2_i387): Remove insn pattern.
4947 (<sincos>mode2): New expander.
4948 (sincos_extend<mode>xf3_i387): Remove insn pattern.
4949 (sincos -> sin, cos splitters): Remove splitter patterns.
4950 (sincos<mode>3): Change operand 2 predicate to general_operand.
4951 Extend operand 2 to XFmode and generate sincosxf3 insn.
4952 (fptanxf4_i387): Change mode of operands 0 and 3 to SFmode.
4953 Change operand 3 predicate to const1_operand.
4954 (fptan_extend<mode>xf4_i387): Remove insn pattern.
4955 (tanxf2): Update operands in the call to fptanxf4_i387.
4956 (tan<mode>2): Change operand 1 predicate to general_operand.
4957 Extend operand 1 to XFmode and generate tanxf3 insn.
4958 (atan2xf3): Rename from *fpatanxf3_i387.
4959 (fpatan_extend<mode>xf3_i387): Remove insn pattern.
4960 (atan2xf3): Remove expander.
4961 (atan2<mode<3): Change operand 1 and 2 predicates to general_operand.
4962 Extend operands 1 and 2 to XFmode and generate atan2xf3 insn.
4963 (atan<mode>2): Change operand 1 predicate to general_operand.
4964 Extend operand 1 to XFmode and generate atanxf3 insn.
4966 2018-09-10 Uros Bizjak <ubizjak@gmail.com>
4968 * config/i386/i386.md (x87/SSE constant load splitter): Use
4969 memory_operand instead of nonimmediate_operand for input operand
4972 2018-09-09 Uros Bizjak <ubizjak@gmail.com>
4974 * config/i386/i386.md (float partial SSE register stall splitter): Move
4975 splitter near its instruction pattern.
4976 (float_extend partial SSE register stall splitter): Ditto.
4977 (float_truncate partial SSE register stall splitter): Ditto.
4979 2018-09-09 Hans-Peter Nilsson <hp@bitrange.com>
4982 * config/mmix/mmix.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
4983 to speculation_safe_value_not_needed.
4986 * config/mmix/mmix.c (mmix_assemble_integer): Handle byte-size
4987 non-CONST_INT rtx:es using assemble_integer_with_op ".byte".
4988 (MMIX_CFUN_NEEDS_SAVED_EH_RETURN_ADDRESS): Don't call
4989 leaf_function_p, instead use has_hard_reg_initial_val.
4991 2018-09-09 Nathan Sidwell <nathan@acm.org>
4993 * gcc.h (pfatal_with_name): Don't declare here.
4994 * gcc.c (pfatal_with_name): Make static.
4996 2018-09-09 Xianmiao Qu <xianmiao_qu@c-sky.com>
4998 * config/csky/csky.md (*cskyv2_adddi3, *cskyv2_subdi3): Add
5001 2018-09-08 John David Anglin <danglin@gcc.gnu.org>
5003 PR rtl-optimization/85458
5004 * sel-sched.c (sel_target_adjust_priority): Allow backend adjust
5005 priority hook to reduce the priority of EXPR.
5007 2018-09-07 Uros Bizjak <ubizjak@gmail.com>
5009 * config/i386/i386.md (float<SWI48x:mode><MODEF:mode>2) Enable
5010 DImode for x87 on 32bit targets. Conditionally disable x87 modes
5011 with X87_ENABLE_FLOAT. Remove preparation code.
5012 (*float<SWI48:mode><MODEF:mode>2): Rename from
5013 *float<SWI48:mode><MODEF:mode>2_mixed. Handle x87, SSE and mixed
5014 math using "enabled" attribute.
5015 (*floatdi<MODEF:mode>2_i387): Rename from
5016 *float<SWI48x:mode><MODEF:mode>2_i387. Handle only DImode and
5017 enable for 32bit targets only.
5018 (floatdi<X87MODEF:mode>2_i387_with_xmm pre-reload splitter): New
5020 (floatdi<X87MODEF:mode>2_i387_with_xmm): Use register_operand
5021 as operand 1 predicate. Rewrite as define_insn_and_split.
5022 (floatdi<X87MODEF:mode>2_i387_with_xmm memory input splitter): Remove.
5024 2018-09-06 Uros Bizjak <ubizjak@gmail.com>
5026 * reg-stack.c (get_true_reg) <case FLOAT_TRUNCATE>: Reorder
5027 to fallthru to FLOAT case.
5029 2018-09-06 Will Schmidt <will_schmidt@vnet.ibm.com>
5032 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Update logic
5033 around folding of vec_sl to handle out of range shift values.
5035 2018-09-06 Uros Bizjak <ubizjak@gmail.com>
5037 * config/i386/i386.md (fix_trunc<mode>_fisttp_i387_1): Remove.
5038 Update callers to gen_fix_trunc<mode>_i387_fisttp
5039 (fix_trunc<mode>_i387_fisttp): Change operand 0 predicate to
5040 nonimmediate_operand.
5041 (fix_trunc<mode>_i387_fisttp_with_temp): Remove insn pattern
5042 and corresponding splitters.
5043 (*fix_trunc<mode>_i387_1): Always expand with fix_trunc<mode>_i387.
5044 (fix_truncdi_i387): Change operand 0 predicate to nonimmediate_operand.
5045 (fix_truncdi_i387_with_temp): Remove insn pattern
5046 and corresponding splitters.
5047 (fix_trunc<mode>_i387): Change operand 0 predicate to
5048 nonimmediate_operand.
5049 (fix_trunc<mode>_i387_with_temp): Remove insn pattern
5050 and corresponding splitters.
5051 (*fistdi2_1): Remove.
5053 (fistdi2_with_temp): Remove insn pattern and corresponding splitters.
5054 (lrintxfdi2): Remove expander. Reimplement as define_insn.
5055 (*fist<mode>2_1): Remove.
5056 (fist<mode>2): Ditto.
5057 (fist<mode>2_with_temp): Remove insn pattern and corresponding
5059 (lrintxf<mode>2): Remove expander. Reimplement as define_insn.
5060 (*fist<mode>2_<rounding>_1): Always expand with fist<mode>2_<rounding>.
5061 (fistdi2_<rounding>): Change operand 0 predicate to
5062 nonimmediate_operand.
5063 (fistdi2_<rounding>_with_temp): Remove insn pattern
5064 and corresponding splitters.
5065 (fist<mode>2_<rounding>): Change operand 0 predicate to
5066 nonimmediate_operand.
5067 (fist<mode>2_<rounding>_with_temp): Remove insn pattern
5068 and corresponding splitters.
5070 (*fixuns_trunc<mode>si2_avx512f_zext): Depend on TARGET_SSE_MATH.
5072 2018-09-06 Bernd Edlinger <bernd.edlinger@hotmail.de>
5074 * varasm.c (output_constructor_regular_field): Check TYPE_SIZE_UNIT of
5077 2018-09-06 Will Schmidt <will_schmidt@vnet.ibm.com>
5079 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add support for
5080 early gimple folding of vec_splat().
5081 * tree-vect-generic.c: Remove static from tree_vec_extract() definition.
5082 * gimple-fold.h: Add an extern define for tree_vec_extract().
5084 2018-09-06 Will Schmidt <will_schmidt@vnet.ibm.com>
5086 * config/rs6000/rs6000.c (fold_mergehl_helper): Add types_compatible_p
5087 wrappers around TREE_TYPE comparisons.
5089 2018-09-06 Ilya Leoshkevich <iii@linux.ibm.com>
5092 * config/s390/predicates.md: Add nonsym_memory_operand.
5093 * config/s390/s390.c (s390_legitimize_cs_operand): If operand
5094 contains a SYMBOL_REF, load it into an intermediate pseudo.
5095 (s390_emit_compare_and_swap): Legitimize operand.
5096 * config/s390/s390.md: Use the new nonsym_memory_operand
5097 with UNSPECV_CAS patterns.
5099 2018-09-06 Ilya Leoshkevich <iii@linux.ibm.com>
5102 * config/s390/s390-passes.def: New file.
5103 * config/s390/s390-protos.h (class rtl_opt_pass): Add forward
5105 (make_pass_s390_early_mach): Add declaration.
5106 * config/s390/s390.c (make_pass_s390_early_mach):
5107 (s390_option_override): Remove dynamic registration.
5108 * config/s390/t-s390: Add s390-passes.def.
5110 2018-09-06 Ilya Leoshkevich <iii@linux.ibm.com>
5112 * config/s390/s390.c (s390_decompose_constant_pool_ref):
5113 Remove UNSPEC_LTREL_BASE check.
5114 (annotate_constant_pool_refs): Likewise.
5115 (find_constant_pool_ref): Likewise.
5116 (find_ltrel_base): Removed.
5117 (replace_ltrel_base): Removed.
5118 (s390_mainpool_finish): Remove replace_ltrel_base call.
5119 (s390_chunkify_start): Remove pending LTREL_BASE logic.
5120 (s390_chunkify_finish): Remove replace_ltrel_base call.
5121 * config/s390/s390.md: Remove UNSPEC_LTREL_BASE.
5123 2018-09-06 Hans-Peter Nilsson <hp@axis.com>
5126 * config/cris/cris.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
5127 to speculation_safe_value_not_needed.
5129 2018-09-05 Cesar Philippidis <cesar@codesourcery.com>
5130 Bernd Schmidt <bernds_cb1@t-online.de>
5132 * config/nvptx/nvptx-opts.h: New file.
5133 * config/nvptx/nvptx.c (nvptx_file_start): Print the correct .target.
5134 * config/nvptx/nvptx.h: Include "nvptx-opts.h".
5136 (TARGET_SM35): New macro.
5137 * config/nvptx/nvptx.md (atomic_fetch_<logic><mode>): Enable with the
5139 * config/nvptx/nvptx.opt (ptx_isa, sm_30, sm_35): New enum and its
5141 (misa=): New option.
5142 * doc/invoke.texi (Nvidia PTX Options): Document -misa.
5144 2018-09-05 Uros Bizjak <ubizjak@gmail.com>
5146 * config/i386/i386.md (truncdfsf2): Remove expander.
5147 (truncdfsf2_with_temp): Ditto.
5148 (truncxf<mode>2): Ditto.
5149 (*truncdfsf_fast_mixed): Remove insn pattern.
5150 (*truncdfsf_fast_i387): Ditto.
5151 (*truncdfsf_mixed): Ditto.
5152 (*truncdfsf_i387): Ditto.
5153 (*truncdfsf2_i387_1): Ditto.
5154 (*truncxfsf2_mixed): Ditto.
5155 (*truncxfdf2_mixed): Ditto.
5156 (*truncxf<mode>2_i387_noop): Ditto. Update callers
5157 to call gen_truncxf<mode>2 instead.
5158 (*truncxf<mode>2_i387): Remove.
5159 (reg->reg splitters): Remove splitter pattern.
5160 (reg->mem splitters): Ditto.
5162 (truncdfsf2): New insn pattern.
5163 (truncxf<mode>2): Ditto.
5165 2018-09-05 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
5167 * tree-ssa-math-opts.c (is_mult_by): New function.
5168 (is_square_of): Use the above.
5169 (optimize_recip_sqrt): New function.
5170 (pass_cse_reciprocals::execute): Use the above.
5172 2018-09-05 Richard Biener <rguenther@suse.de>
5175 * tree-ssa-sccvn.c (rpo_elim::eliminate_push_avail): Make sure
5176 to zero-init the emplaced vec.
5178 2018-09-05 Martin Liska <mliska@suse.cz>
5180 PR tree-optimization/87205
5181 * tree-switch-conversion.c (pass_lower_switch::execute):
5182 Group cases for switch statements.
5184 2018-09-05 Richard Biener <rguenther@suse.de>
5186 PR tree-optimization/87217
5187 * tree-ssa-sccvn.c (vuse_valueize): New.
5188 (vn_reference_lookup_pieces): Use it.
5189 (vn_reference_lookup): Likewise.
5191 2018-09-05 Nathan Sidwell <nathan@acm.org>
5194 * stor-layout.c (place_field): Scan forwards to check last
5195 bitfield when ms_bitfield_placement is in effect.
5197 2018-09-05 Richard Biener <rguenther@suse.de>
5200 * tree-vect-stmts.c (vectorizable_simd_clone_call): Fix bogus
5203 2018-09-05 Siddhesh Poyarekar <siddhesh@sourceware.org>
5204 Kugan Vivekanandarajah <kugan.vivekanandarajah@linaro.org>
5206 * config/aarch64/falkor-tag-collision-avoidance.c: New file.
5207 * config.gcc (extra_objs): Build it.
5208 * config/aarch64/t-aarch64 (falkor-tag-collision-avoidance.o):
5210 * config/aarch64/aarch64-passes.def
5211 (pass_tag_collision_avoidance): New pass.
5212 * config/aarch64/aarch64.c (qdf24xx_tunings): Add
5213 AARCH64_EXTRA_TUNE_RENAME_LOAD_REGS to tuning_flags.
5214 (aarch64_classify_address): Remove static qualifier.
5215 (aarch64_address_info, aarch64_address_type): Move to...
5216 * config/aarch64/aarch64-protos.h: ... here.
5217 (make_pass_tag_collision_avoidance): New function.
5218 * config/aarch64/aarch64-tuning-flags.def (rename_load_regs):
5221 2018-09-05 Martin Liska <mliska@suse.cz>
5223 * doc/gcov.texi: Update documentation of humar
5225 * gcov.c (format_count): Print one decimal place, it provides
5226 more fine number of situations like '1G' vs. '1.4G'.
5228 2018-09-05 Martin Liska <mliska@suse.cz>
5231 * config/rs6000/rs6000.opt: Mark the option as Deprecated.
5232 * optc-gen.awk: Allow 'Var' for Deprecated options in order
5233 to generate a MASK value.
5235 2018-09-04 H.J. Lu <hongjiu.lu@intel.com>
5238 * dwarf2out.c (based_loc_descr): Allow hard frame pointer even
5239 if frame pointer isn't used.
5240 (compute_frame_pointer_to_fb_displacement): Likewise.
5242 2018-09-04 Jakub Jelinek <jakub@redhat.com>
5245 * common/config/i386/i386-common.c (OPTION_MASK_ISA_XSAVEOPT_SET,
5246 OPTION_MASK_ISA_XSAVES_SET, OPTION_MASK_ISA_XSAVEC_SET): Use
5247 OPTION_MASK_ISA_XSAVE_SET instead of OPTION_MASK_ISA_XSAVE.
5248 (OPTION_MASK_ISA_XSAVE_UNSET): Add OPTION_MASK_ISA_XSAVES_UNSET
5249 and OPTION_MASK_ISA_XSAVEC_UNSET.
5251 2018-09-04 Max Filippov <jcmvbkbc@gmail.com>
5253 * config/xtensa/xtensa.c (xtensa_expand_atomic): Reorder AND and
5254 XOR operations in NAND case.
5256 2018-09-04 Aldy Hernandez <aldyh@redhat.com>
5258 * wide-int-range.cc (wide_int_range_convert): New.
5259 * wide-int-range.h (wide_int_range_convert): New.
5260 * tree-vrp.c (extract_range_from_unary_expr): Abstract wide int
5261 code into wide_int_range_convert.
5262 (extract_range_into_wide_ints): Do not munge anti range constants
5263 into the entire domain. Just return the range back.
5265 2018-09-04 Martin Liska <mliska@suse.cz>
5267 * genmatch.c (output_line_directive): Add new argument
5269 (dt_simplify::gen_1): Encapsulate dump within __builtin_expect.
5271 2018-09-04 Jonathan Wakely <jwakely@redhat.com>
5273 * doc/invoke.texi (Option Summary): Add whitespace.
5275 * doc/invoke.texi (Option Summary): Add -Waligned-new.
5277 2018-09-04 Richard Biener <rguenther@suse.de>
5279 PR tree-optimization/87211
5280 * tree-ssa-sccvn.c (visit_phi): When value-numbering to a
5281 backedge value we're supposed to treat as VARYING also number
5282 the PHI to VARYING in case it got a different value-number already.
5284 2018-09-04 Aldy Hernandez <aldyh@redhat.com>
5286 * tree-vrp.c (vrp_can_optimize_bit_op): Remove.
5287 (extract_range_from_binary_expr_1): Do not call
5288 vrp_can_optimize_bit_op.
5289 * wide-int-range.cc (wide_int_range_can_optimize_bit_op): Make
5291 (wide_int_range_get_mask_and_bounds): New.
5292 (wide_int_range_optimize_bit_op): New.
5293 (wide_int_range_bit_ior): Call wide_int_range_optimize_bit_op.
5294 (wide_int_range_bit_and): Same.
5295 * wide-int-range.h (wide_int_range_can_optimize_bit_op): Remove.
5296 (wide_int_range_optimize_bit_op): New.
5297 (wide_int_range_get_mask_and_bounds): New.
5299 2018-09-04 Richard Biener <rguenther@suse.de>
5301 PR tree-optimization/87176
5302 * tree-ssa-sccvn.c (visit_phi): Remove redundant allsame
5303 variable. When value-numbering a virtual PHI node make sure
5304 to not value-number to the backedge value.
5306 2018-09-04 Jonathan Wakely <jwakely@redhat.com>
5308 * doc/extend.texi (Long Long, Hex Floats): Document support for
5309 long long and hex floats in more recent versions of ISO C++.
5311 2018-09-03 Richard Biener <rguenther@suse.de>
5313 PR tree-optimization/87177
5314 * tree-ssa-sccvn.c (vuse_ssa_val): Revert previous change, keep
5317 2018-09-03 Alexander Monakov <amonakov@ispras.ru>
5319 * bb-reorder.c (edge_order): Convert to C-qsort-style
5320 tri-state comparator.
5321 (reorder_basic_blocks_simple): Change std::stable_sort to
5324 2018-09-03 Alexander Monakov <amonakov@ispras.ru>
5326 * tree-loop-distribution.c (offset_cmp): Convert to C-qsort-style
5327 tri-state comparator.
5328 (fuse_memset_builtins): Change std::stable_sort to gcc_stablesort.
5330 2018-09-03 Alexander Monakov <amonakov@ispras.ru>
5332 * sort.cc (struct sort_ctx): New field 'nlim'. Use it...
5333 (mergesort): ... here as maximum count for using netsort.
5334 (gcc_qsort): Set nlim to 3 if stable sort is requested.
5335 (gcc_stablesort): New.
5336 * system.h (gcc_stablesort): Declare.
5338 2018-09-03 Alexander Monakov <amonakov@ispras.ru>
5340 * sort.cc (gcc_qsort) [CHECKING_P]: Call qsort_chk.
5341 * system.h (qsort): Always redirect to gcc_qsort. Update comment.
5342 * vec.c (qsort_chk): Do not call gcc_qsort. Update comment.
5344 2018-09-03 Segher Boessenkool <segher@kernel.crashing.org>
5346 * config/rs6000/rs6000.md (*mov<mode>_hardfloat32): Remove %U from the
5347 lxsdx and stxsdx alternatives.
5348 (*mov<mode>_hardfloat64): Ditto.
5349 * config/rs6000/vsx.md (*vsx_extract_<mode>_store): Ditto.
5351 2018-09-03 Richard Biener <rguenther@suse.de>
5353 PR tree-optimization/87200
5354 * tree-ssa-sccvn.c (vn_nary_build_or_lookup_1): Valueize a
5357 2018-09-03 Martin Liska <mliska@suse.cz>
5359 PR tree-optimization/87201
5360 * tree-switch-conversion.c (switch_decision_tree::balance_case_nodes):
5361 Fix parenthesis in an expression.
5363 2018-09-03 Richard Biener <rguenther@suse.de>
5365 PR tree-optimization/87197
5366 * tree-ssa-sccvn.c (vn_nary_build_or_lookup_1): Mark the new def
5367 visited. CSE the VN_INFO hashtable lookup.
5369 PR tree-optimization/87169
5370 * tree-ssa-sccvn.c (do_rpo_vn): When marking loops for not
5371 iterating make sure there's no extra backedges from irreducible
5372 regions feeding the header. Mark the destination block
5375 2018-09-03 Martin Liska <mliska@suse.cz>
5378 * common/common-target.def: Add TARGET_GET_VALID_OPTION_VALUES.
5379 * common/common-targhooks.c (default_get_valid_option_values):
5381 * common/common-targhooks.h (default_get_valid_option_values):
5383 * common/config/i386/i386-common.c: Move processor_target_table
5385 (ix86_get_valid_option_values): New function.
5386 (TARGET_GET_VALID_OPTION_VALUES): New macro.
5387 * config/i386/i386.c (struct ptt): Move to i386-common.c.
5388 (PTA_*): Move all defined masks into i386-common.c.
5389 (ix86_function_specific_restore): Use new processor_cost_table.
5390 * config/i386/i386.h (struct ptt): Moved from i386.c.
5391 (struct pta): Likewise.
5392 * doc/tm.texi: Document new TARGET_GET_VALID_OPTION_VALUES.
5393 * doc/tm.texi.in: Likewise.
5394 * opt-suggestions.c (option_proposer::suggest_option):
5395 Pass prefix to build_option_suggestions.
5396 (option_proposer::get_completions): Likewise.
5397 (option_proposer::build_option_suggestions): Use the new target
5399 * opts.c (struct option_help_tuple): New struct.
5400 (print_filtered_help): Use the new target hook.
5402 2018-09-03 Martin Liska <mliska@suse.cz>
5405 * predict.c (set_even_probabilities): Add likely_edges
5406 argument and handle cases where we have precisely one
5408 (combine_predictions_for_bb): Catch also likely_edges.
5409 (tree_predict_by_opcode): Handle gswitch statements.
5410 * tree-cfg.h (find_case_label_for_value): New declaration.
5411 (find_taken_edge_switch_expr): Likewise.
5412 * tree-switch-conversion.c (switch_decision_tree::balance_case_nodes):
5413 Find pivot in decision tree based on probabily, not by number of
5416 2018-09-02 Gerald Pfeifer <gerald@pfeifer.com>
5418 * doc/standards.texi (Standards): Update Objective-C reference.
5420 2018-09-01 Gerald Pfeifer <gerald@pfeifer.com>
5422 * doc/install.texi (Prerequisites): Update link for MPC.
5424 2018-09-01 Michael Matz <matz@suse.de>
5426 PR tree-optimization/87074
5427 * gimple-loop-jam.c (unroll_jam_possible_p): Check loop exit
5428 PHIs for outer-loop uses.
5430 2018-09-01 Gerald Pfeifer <gerald@pfeifer.com>
5432 * doc/generic.texi (OpenMP): Adjust link to openmp.org.
5433 * doc/invoke.texi (C Dialect Options): Ditto.
5435 2018-09-01 Gerald Pfeifer <gerald@pfeifer.com>
5437 * doc/install.texi (Prerequisites): Adjust link mpfr.org.
5439 2018-08-31 Richard Biener <rguenther@suse.de>
5441 PR tree-optimization/87168
5442 * tree-ssa-sccvn.c (SSA_VAL): Add visited output parameter.
5443 (rpo_elim::eliminate_avail): When OP was not visited it must
5446 2018-08-31 David Malcolm <dmalcolm@redhat.com>
5448 * tree-vrp.c (copy_value_range): Convert param "from" from
5449 "value_range *" to "const value_range *".
5450 (range_is_null): Likewise for param "vr".
5451 (range_int_cst_p): Likewise.
5452 (range_int_cst_singleton_p): Likewise.
5453 (symbolic_range_p): Likewise.
5454 (value_ranges_intersect_p): Likewise for both params.
5455 (value_range_nonnegative_p): Likewise for param "vr".
5456 (value_range_constant_singleton): Likewise.
5457 (vrp_set_zero_nonzero_bits): Likewise for param "ar".
5458 (extract_range_into_wide_ints): Likewise for param "vr".
5459 (extract_range_from_multiplicative_op): Likewise for params "vr0"
5461 (vrp_can_optimize_bit_op): Likewise.
5462 (extract_range_from_binary_expr_1): Likewise for params "vr0_" and
5464 (extract_range_from_unary_expr): Likewise.
5465 (debug_value_range): Likewise for param "vr".
5466 (value_range::dump): Add "const" qualifier.
5467 (vrp_prop::check_array_ref): Convert local "vr" from
5468 "value_range *" to "const value_range *".
5469 (vrp_prop::check_mem_ref): Likewise.
5470 (vrp_prop::visit_stmt): Likewise for local "old_vr".
5471 (vrp_intersect_ranges_1): Likewise for param "vr_1".
5472 (vrp_intersect_ranges): Likewise.
5473 (simplify_stmt_for_jump_threading): Likewise for local "vr".
5474 (vrp_prop::vrp_finalize): Likewise.
5475 * tree-vrp.h (value_range::dump): Add "const" qualifier.
5476 (vrp_intersect_ranges): Add "const" qualifier to params as above.
5477 (extract_range_from_unary_expr): Likewise.
5478 (value_range_constant_singleton): Likewise.
5479 (symbolic_range_p): Likewise.
5480 (copy_value_range): Likewise.
5481 (extract_range_from_binary_expr_1): Likewise.
5482 (range_int_cst_p): Likewise.
5483 (vrp_set_zero_nonzero_bits): Likewise.
5484 (range_int_cst_singleton_p): Likewise.
5486 2018-08-31 Vlad Lazar <vlad.lazar@arm.com>
5488 * config/aarch64/arm_neon.h (vabsd_s64): New.
5489 (vnegd_s64): Likewise.
5491 2018-08-31 Martin Jambor <mjambor@suse.cz>
5493 * ipa-cp.c (estimate_local_effects): Replace wrong MAX with MIN.
5495 2018-08-31 Martin Liska <mliska@suse.cz>
5497 * ipa-icf.c (sem_item::add_type): Use
5498 sem_item::m_type_hash_cache.
5499 * ipa-icf.h: Move the cache from sem_item_optimizer
5502 2018-08-31 Nathan Sidwell <nathan@acm.org>
5504 * doc/extend.texi (Backwards Compatibility): Remove implicit
5505 extern C leeway of () being (...).
5507 2018-08-31 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
5509 * ipa-inline.c (can_inline_edge_by_limits_p): Fix typos in comment.
5511 2018-08-31 Segher Boessenkool <segher@kernel.crashing.org>
5515 * config/rs6000/rs6000.md (lround<mode>di2): Gate on TARGET_FPRND.
5517 2018-08-31 Jakub Jelinek <jakub@redhat.com>
5520 * expmed.c (expand_mult_const): Use immed_wide_int_const instead of
5521 gen_int_mode. Formatting fixes.
5523 2018-08-30 Sandra Loosemore <sandra@codesourcery.com>
5525 * target.def (custom_function_descriptors): Improve documentation.
5526 * doc/tm.texi.in (Trampolines): Expand discussion of function
5527 descriptors and move TARGET_CUSTOM_FUNCTION_DESCRIPTORS to the
5528 beginning of the section.
5529 * doc/tm.texi: Regenerated.
5531 2018-08-30 Jose E. Marchesi <jose.marchesi@oracle.com>
5533 * cfg.h (class auto_edge_flag): Spell out the template-id of the
5534 base class in the initializer list. This is a workaround for
5535 building with older GCC.
5536 (class auto_bb_flag): Likewise.
5538 2018-08-30 Aaron Sawdey <acsawdey@linux.ibm.com>
5540 * config/rs6000/altivec.md (altivec_eq<mode>): Remove star.
5541 (altivec_vcmpequ<VI_char>_p): Remove star.
5542 * config/rs6000/rs6000-string.c (do_load_for_compare): Support
5544 (expand_strncmp_vec_sequence): New function.
5545 (emit_final_str_compare_vec): New function.
5546 (expand_strn_compare): Add support for vector strncmp.
5547 * config/rs6000/rs6000.opt (-mstring-compare-inline-limit): Change
5548 length specification to bytes.
5549 * config/rs6000/vsx.md (vsx_ld_elemrev_v16qi_internal): Remove star.
5550 (vcmpnezb_p): New pattern.
5551 * doc/invoke.texi (RS/6000 and PowerPC Options): Update documentation
5552 for option -mstring-compare-inline-limit.
5554 2018-08-30 Thiago Macieira <thiago.macieira@intel.com>
5556 * config/i386/i386.c (PTA_WESTMERE): Remove PTA_AES.
5557 (PTA_SKYLAKE): Add PTA_AES.
5558 (PTA_GOLDMONT): Likewise.
5560 2018-08-29 Jan Hubicka <jh@suse.cz>
5563 * lto-opts.c (lto_write_options): Always stream PIC/PIE mode.
5564 * lto-wrapper.c (merge_and_complain): Fix merging of PIC/PIE.
5566 2018-08-29 Jan Hubicka <jh@suse.cz>
5568 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not follow
5570 (hash_tree): Do not visit TYPE_STUB_DECL.
5571 * tree-streamer-out.c (write_ts_type_common_tree_pointers): Do not
5572 stream TYPE_STUB_DECL.
5573 * tree-streamer-in.c (lto_input_ts_type_common_tree_pointers): Likewise.
5574 * ipa-utils.h (type_with_linkage_p): Do not rely on TYPE_STUB_DECL
5575 after free_lang_data.
5576 (type_in_anonymous_namespace_p): Likewise.
5578 2018-08-29 Jan Hubicka <jh@suse.cz>
5580 * sreal.h (SREAL_PART_BITS): Change to 31; remove seemingly unnecessary
5581 comment that it has to be even number.
5582 (class sreal): Change m_sig type to int32_t.
5583 * sreal.c (sreal::dump, sreal::to_int, opreator+, operator-): Use
5584 int64_t for temporary calculations.
5585 (sreal_verify_basics): Drop one bit from minimum and maximum.
5587 2018-08-30 Richard Biener <rguenther@suse.de>
5589 PR tree-optimization/87147
5590 * tree-ssa-sccvn.c (SSA_VISITED): New function.
5591 (visit_phi): When the degenerate result is from the backedge and
5592 we didn't visit its definition yet drop to VARYING.
5593 (do_rpo_vn): Properly mark blocks with incoming backedges as executable.
5595 2018-08-29 Jan Hubicka <jh@suse.cz>
5597 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not walk
5599 (hash_tree): Likewise.
5601 2018-08-29 Jan Hubicka <jh@suse.cz>
5603 * tree.c (find_decls_types_r): Walk also TYPE_NEXT_PTR_TO
5604 and TYPE_NEXT_REF_TO.
5606 2018-08-29 Jan Hubicka <jh@suse.cz>
5608 * sreal.h (SREAL_PART_BITS): Change to 31; remove seemingly unnecessary
5609 comment that it has to be even number.
5610 (class sreal): Change m_sig type to int32_t.
5611 * sreal.c (sreal::dump, sreal::to_int, opreator+, operator-): Use
5612 int64_t for temporary calculations.
5613 (sreal_verify_basics): Drop one bit from minimum and maximum.
5615 2018-08-30 Tamar Christina <tamar.christina@arm.com>
5617 * config/aarch64/aarch64.c (aarch64_expand_movmem): Set TImode max.
5619 2018-08-30 Vlad Lazar <vlad.lazar@arm.com>
5622 * expmed.c (canonicalize_comparison): Use wi::sub instead of wi::add
5623 if to_add is negative.
5625 2018-08-29 Bernd Edlinger <bernd.edlinger@hotmail.de>
5628 * builtins.c (c_strlen): Improve range checks.
5630 2018-08-29 Martin Sebor <msebor@redhat.com>
5631 Jeff Law <law@redhat.com>
5633 PR tree-optimization/86714
5634 PR tree-optimization/86711
5635 * builtins.c (c_strlen): Add arguments to call to string_constant.
5636 * expr.c (string_constant): Add argument. Detect missing nul
5637 terminator and outermost declaration it's missing in.
5638 * expr.h (string_constant): Add argument.
5639 * fold-const.c (read_from_constant_string): Add arguments to call to
5641 (c_getstr): Likewise.
5642 * tree-ssa-forwprop.c (simplify_builtin_call): Likewise.
5644 * tree-ssa-strlen.c (get_stridx): Likewise.
5646 2018-08-29 Jan Hubicka <jh@suse.cz>
5648 * tree-streamer-in.c (lto_input_ts_function_decl_tree_pointers):
5649 Do not stream DECL_VINDEX.
5650 * tree-streamer-out.c (write_ts_function_decl_tree_pointers): Likewise.
5651 * tree.c (free_lang_data_in_decl): Clear DECL_VINDEX.
5652 (decl_function_context): Use DECL_VIRTUAL_P rather than DECL_VINDEX.
5654 2018-08-29 Richard Biener <rguenther@suse.de>
5656 * tree-ssa-sccvn.c (vuse_ssa_val): Return NULL for unvisited
5657 virtual operands that are not default defs to honor region
5659 (rpo_vn_valueize): Remove ineffective code here.
5661 2018-08-29 Richard Biener <rguenther@suse.de>
5663 PR tree-optimization/87132
5664 * tree-ssa-alias.c (get_continuation_for_phi): Do not translate
5665 when skipping defs reachable over backedges.
5667 2018-08-29 Richard Biener <rguenther@suse.de>
5669 * tree-core.h: Document use of deprecated_flag in SSA_NAME.
5670 * tree.h (SSA_NAME_POINTS_TO_READONLY_MEMORY): Define.
5671 * tree-into-ssa.c (pass_build_ssa::execute): Initialize
5672 function parameters SSA_NAME_POINTS_TO_READONLY_MEMORY from fnspec.
5673 * tree-ssa-sccvn.c (const_parms, init_const_parms): Remove.
5674 (vn_reference_lookup_3): Remove use of const_parms.
5675 (free_rpo_vn): Do not free const_parms.
5676 (do_rpo_vn): Do not call init_const_parms.
5677 * tree-ssa-alias.c (refs_may_alias_p_1): Honor
5678 SSA_NAME_POINTS_TO_READONLY_MEMORY.
5679 (call_may_clobber_ref_p_1): Likewise.
5681 2018-08-29 Alexander Monakov <amonakov@ispras.ru>
5684 * invoke.texi (Optimization Options): List -ftree-scev-cprop.
5686 (-ftree-scev-cprop): Document.
5688 2018-08-29 Jan Hubicka <jh@suse.cz>
5690 * sreal.h (normalize, normalize_up, normalize_down): Add new_sig/new_exp
5692 (sreal constructor): Update.
5693 * sreal.c (sreal:operator+, sreal:operator-, sreal:operator*,
5694 sreal:operator/): Update.
5696 2018-08-29 Martin Liska <mliska@suse.cz>
5698 * tree-switch-conversion.c (switch_conversion::expand):
5699 Strenghten assumption about gswitch statements.
5701 2018-08-29 Richard Biener <rguenther@suse.de>
5703 PR tree-optimization/87117
5704 * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_stmt): Only
5705 re-value-number released SSA VDEFs.
5707 2018-08-29 Richard Biener <rguenther@suse.de>
5709 PR tree-optimization/87126
5710 * tree-ssa-sccvn.c (vn_reference_insert): Remove assert.
5712 2018-08-28 Jim Wilson <jimw@sifive.com>
5714 * config/riscv/pic.md: Rewrite.
5715 * config/riscv/riscv.c (riscv_address_insns): Return cost of 3 for
5717 * config/riscv/riscv.md (ZERO_EXTEND_LOAD): Delete.
5718 (SOFTF, default_load, softload, softstore): New.
5720 2018-08-28 Jeff Law <law@redhat.com>
5722 * fold-const.c (fold_binary_loc): Remove recently added assert.
5724 2018-08-28 Joern Rennecke <joern.rennecke@riscy-ip.com>
5726 * genpreds.c (write_predicate_subfunction): Also add ATTRIBUTE_UNUSED
5727 to OP parmeter of generated function.
5729 2018-08-28 MCC CS <deswurstes@users.noreply.github.com>
5731 PR tree-optimization/87009
5732 * match.pd: Add boolean optimizations.
5734 2018-08-28 Martin Sebor <msebor@redhat.com>
5737 * calls.c (alloc_max_size): Treat HOST_WIDE_INT special.
5738 * gimple-ssa-warn-alloca.c (adjusted_warn_limit): New function.
5739 (pass_walloca::gate): Use it.
5740 (alloca_call_type): Same.
5741 (pass_walloca::execute): Same.
5742 * stor-layout.c (layout_decl): Treat HOST_WIDE_INT special.
5744 2018-08-28 David Malcolm <dmalcolm@redhat.com>
5746 * dumpfile.h (ATTRIBUTE_GCC_DUMP_PRINTF): Change version check on
5747 GCC_VERSION for usage of "__gcc_dump_printf__" format from
5750 2018-08-28 Richard Biener <rguenther@suse.de>
5752 PR tree-optimization/87124
5753 * tree-ssa-sccvn.c (vn_lookup_simplify_result): Guard against
5754 constants before looking up avail.
5756 2018-08-28 Jakub Jelinek <jakub@redhat.com>
5759 * calls.c (maybe_warn_nonstring_arg): Punt early if
5760 warn_stringop_overflow is zero. Don't call get_range_strlen
5761 on 3rd argument, keep iterating until lenrng[1] is INTEGER_CST.
5762 Swap comparison operands to have constants on rhs. Only use
5763 lenrng[1] if non-NULL and INTEGER_CST. Don't uselessly
5764 increment lenrng[0].
5766 2018-08-28 Richard Sandiford <richard.sandiford@arm.com>
5768 * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Fix unguarded
5769 use of tree_to_shwi. Remove duplicated test for the size being
5770 a whole number of bytes.
5772 2018-08-28 Richard Biener <rguenther@suse.de>
5774 PR tree-optimization/87117
5775 * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_cleanup):
5776 Handle removed stmt without LHS (GIMPLE_NOP).
5778 2018-08-28 Richard Biener <rguenther@suse.de>
5780 PR tree-optimization/87117
5781 * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Exclude
5782 void which is is_gimple_reg_type by checking for COMPLETE_TYPE_P.
5784 2018-08-28 Richard Biener <rguenther@suse.de>
5786 PR tree-optimization/87117
5787 * tree-ssa-pre.c (compute_avail): Do not make expressions
5788 with predicated values available.
5789 (get_expr_value_id): Assert we do not run into predicated value
5792 2018-08-28 Richard Biener <rguenther@suse.de>
5794 PR tree-optimization/87117
5795 * tree-ssa-operands.c (add_stmt_operand): STRING_CST may
5796 get virtual operands.
5797 (get_expr_operands): Handle STRING_CST like other decls.
5799 2018-08-28 Martin Liska <mliska@suse.cz>
5801 * tree.h: Update documentation of fndecl_built_in_p
5805 2018-08-27 Jeff Law <law@redhat.com>
5806 PR tree-optimization/87110
5807 * tree-ssa-dse.c (compute_trims): Handle non-constant
5810 2018-08-27 Martin Sebor <msebor@redhat.com>
5812 PR tree-optimization/86914
5813 * tree-ssa-strlen.c (maybe_set_strlen_range): Avoid MEM_REF.
5815 2018-08-27 Martin Sebor <msebor@redhat.com>
5817 PR tree-optimization/87112
5818 * builtins.c (expand_builtin_strnlen): Convert c_strlen result to
5819 the type of the bound argument.
5821 2018-08-27 Jeff Law <law@redhat.com>
5823 * tree-ssa-dse.c (compute_trims): Handle case where the reference's
5824 type does not have a TYPE_SIZE_UNIT.
5826 2018-08-27 Steve Ellcey <sellcey@cavium.com>
5828 * config/aarch64/aarch64-speculation.cc: Replace include of cfg.h
5829 with include of backend.h.
5831 2018-08-27 Richard Biener <rguenther@suse.de>
5833 PR tree-optimization/86927
5834 * tree-vect-loop.c (vect_create_epilog_for_reduction): Properly
5835 use const cond reduction code.
5837 2018-08-27 Alexander Monakov <amonakov@ispras.ru>
5839 PR tree-optimization/85758
5840 * match.pd ((X & Y) ^ Y): Add :s qualifier to inner expression.
5842 2018-08-27 David Malcolm <dmalcolm@redhat.com>
5845 * diagnostic-show-locus.c (class layout_range): Update for
5846 conversion of show_caret_p to a tri-state.
5847 (layout_range::layout_range): Likewise.
5848 (make_range): Likewise.
5849 (layout::maybe_add_location_range): Likewise.
5850 (layout::should_print_annotation_line_p): Don't show annotation
5851 lines for ranges that are SHOW_LINES_WITHOUT_RANGE.
5852 (layout::get_state_at_point): Update for conversion of
5853 show_caret_p to a tri-state. Bail out early for
5854 SHOW_LINES_WITHOUT_RANGE, so that such ranges don't affect
5855 underlining or source colorization.
5856 (gcc_rich_location::add_location_if_nearby): Update for conversion
5857 of show_caret_p to a tri-state.
5858 (selftest::test_one_liner_multiple_carets_and_ranges): Likewise.
5859 (selftest::test_one_liner_fixit_replace_equal_secondary_range):
5861 (selftest::test_one_liner_labels): Likewise.
5862 * gcc-rich-location.c (gcc_rich_location::add_expr): Update for
5863 conversion of show_caret_p to a tri-state.
5864 * pretty-print.c (text_info::set_location): Likewise.
5865 * pretty-print.h (text_info::set_location): Likewise.
5866 * substring-locations.c (format_warning_n_va): Likewise.
5867 * tree-diagnostic.c (default_tree_printer): Likewise.
5868 * tree-pretty-print.c (newline_and_indent): Likewise.
5870 2018-08-27 David Malcolm <dmalcolm@redhat.com>
5873 * diagnostic-show-locus.c (get_line_span_for_fixit_hint): Show the
5874 line above for line-insertion fix-it hints.
5875 (selftest::test_fixit_insert_containing_newline): Update the
5876 expected results, and add a test with line-numbering enabled.
5878 2018-08-27 Martin Liska <mliska@suse.cz>
5881 * sanopt.c (sanitize_rewrite_addressable_params): Ignore
5882 params with DECL_HAS_VALUE_EXPR_P.
5884 2018-08-27 Martin Liska <mliska@suse.cz>
5886 * config/i386/i386.c (ix86_expand_set_or_movmem): Dump
5887 selected expansion strategy.
5889 2018-08-27 Martin Liska <mliska@suse.cz>
5891 * builtins.h (is_builtin_fn): Remove and fndecl_built_in_p.
5892 * builtins.c (is_builtin_fn): Likewise.
5893 * attribs.c (diag_attr_exclusions): Use new function
5894 fndecl_built_in_p and remove check for FUNCTION_DECL if
5896 (builtin_mathfn_code): Likewise.
5897 (fold_builtin_expect): Likewise.
5898 (fold_call_expr): Likewise.
5899 (fold_builtin_call_array): Likewise.
5900 (fold_call_stmt): Likewise.
5901 (set_builtin_user_assembler_name): Likewise.
5902 (is_simple_builtin): Likewise.
5903 * calls.c (gimple_alloca_call_p): Likewise.
5904 (maybe_warn_nonstring_arg): Likewise.
5905 * cfgexpand.c (expand_call_stmt): Likewise.
5906 * cgraph.c (cgraph_update_edges_for_call_stmt_node): Likewise.
5907 (cgraph_edge::verify_corresponds_to_fndecl): Likewise.
5908 (cgraph_node::verify_node): Likewise.
5909 * cgraphclones.c (build_function_decl_skip_args): Likewise.
5910 (cgraph_node::create_clone): Likewise.
5911 * config/arm/arm.c (arm_insert_attributes): Likewise.
5912 * config/i386/i386.c (ix86_gimple_fold_builtin): Likewise.
5913 * dse.c (scan_insn): Likewise.
5914 * expr.c (expand_expr_real_1): Likewise.
5915 * fold-const.c (operand_equal_p): Likewise.
5916 (fold_binary_loc): Likewise.
5917 * gimple-fold.c (gimple_fold_stmt_to_constant_1): Likewise.
5918 * gimple-low.c (lower_stmt): Likewise.
5919 * gimple-pretty-print.c (dump_gimple_call): Likewise.
5920 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call):
5922 * gimple.c (gimple_build_call_from_tree): Likewise.
5923 (gimple_call_builtin_p): Likewise.
5924 (gimple_call_combined_fn): Likewise.
5925 * gimplify.c (gimplify_call_expr): Likewise.
5926 (gimple_boolify): Likewise.
5927 (gimplify_modify_expr): Likewise.
5928 (gimplify_addr_expr): Likewise.
5929 * hsa-gen.c (gen_hsa_insns_for_call): Likewise.
5930 * ipa-cp.c (determine_versionability): Likewise.
5931 * ipa-fnsummary.c (compute_fn_summary): Likewise.
5932 * ipa-param-manipulation.c (ipa_modify_formal_parameters): Likewise.
5933 * ipa-split.c (visit_bb): Likewise.
5934 (split_function): Likewise.
5935 * ipa-visibility.c (cgraph_externally_visible_p): Likewise.
5936 * lto-cgraph.c (input_node): Likewise.
5937 * lto-streamer-out.c (write_symbol): Likewise.
5938 * omp-low.c (setjmp_or_longjmp_p): Likewise.
5939 (lower_omp_1): Likewise.
5940 * predict.c (strip_predict_hints): Likewise.
5941 * print-tree.c (print_node): Likewise.
5942 * symtab.c (symtab_node::output_to_lto_symbol_table_p): Likewise.
5943 * trans-mem.c (is_tm_irrevocable): Likewise.
5944 (is_tm_load): Likewise.
5945 (is_tm_simple_load): Likewise.
5946 (is_tm_store): Likewise.
5947 (is_tm_simple_store): Likewise.
5948 (is_tm_abort): Likewise.
5949 (tm_region_init_1): Likewise.
5950 * tree-call-cdce.c (gen_shrink_wrap_conditions): Likewise.
5951 * tree-cfg.c (verify_gimple_call): Likewise.
5952 (move_stmt_r): Likewise.
5953 (stmt_can_terminate_bb_p): Likewise.
5954 * tree-eh.c (lower_eh_constructs_2): Likewise.
5955 * tree-if-conv.c (if_convertible_stmt_p): Likewise.
5956 * tree-inline.c (remap_gimple_stmt): Likewise.
5957 (copy_bb): Likewise.
5958 (estimate_num_insns): Likewise.
5959 (fold_marked_statements): Likewise.
5960 * tree-sra.c (scan_function): Likewise.
5961 * tree-ssa-ccp.c (surely_varying_stmt_p): Likewise.
5962 (optimize_stack_restore): Likewise.
5963 (pass_fold_builtins::execute): Likewise.
5964 * tree-ssa-dce.c (mark_stmt_if_obviously_necessary): Likewise.
5965 (mark_all_reaching_defs_necessary_1): Likewise.
5966 * tree-ssa-dom.c (dom_opt_dom_walker::optimize_stmt): Likewise.
5967 * tree-ssa-forwprop.c (simplify_builtin_call): Likewise.
5968 (pass_forwprop::execute): Likewise.
5969 * tree-ssa-loop-im.c (stmt_cost): Likewise.
5970 * tree-ssa-math-opts.c (pass_cse_reciprocals::execute): Likewise.
5971 * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Likewise.
5972 * tree-ssa-strlen.c (get_string_length): Likewise.
5973 * tree-ssa-structalias.c (handle_lhs_call): Likewise.
5974 (find_func_aliases_for_call): Likewise.
5975 * tree-ssa-ter.c (find_replaceable_in_bb): Likewise.
5976 * tree-stdarg.c (optimize_va_list_gpr_fpr_size): Likewise.
5977 * tree-tailcall.c (find_tail_calls): Likewise.
5978 * tree.c (need_assembler_name_p): Likewise.
5979 (free_lang_data_in_decl): Likewise.
5980 (get_call_combined_fn): Likewise.
5981 * ubsan.c (is_ubsan_builtin_p): Likewise.
5982 * varasm.c (incorporeal_function_p): Likewise.
5983 * tree.h (DECL_BUILT_IN): Remove and replace with
5985 (DECL_BUILT_IN_P): Transfort to fndecl_built_in_p.
5986 (fndecl_built_in_p): New.
5988 2018-08-27 Martin Liska <mliska@suse.cz>
5990 PR tree-optimization/86847
5991 * tree-switch-conversion.c (switch_decision_tree::dump_case_nodes):
5992 Dump also subtree probability.
5993 (switch_decision_tree::do_jump_if_equal): New function.
5994 (switch_decision_tree::emit_case_nodes): Handle special
5995 situations in balanced tree that can be emitted much simpler.
5996 Fix calculation of probabilities that happen in tree expansion.
5997 * tree-switch-conversion.h (struct cluster): Add
5999 (struct simple_cluster): Likewise.
6000 (struct case_tree_node): Add new function has_child.
6001 (do_jump_if_equal): New.
6003 2018-08-27 Martin Liska <mliska@suse.cz>
6005 * tree-switch-conversion.c (bit_test_cluster::find_bit_tests):
6006 Add new argument to bit_test_cluster constructor.
6007 (bit_test_cluster::emit): Set bits really number of values
6009 (bit_test_cluster::hoist_edge_and_branch_if_true): Add
6010 probability argument.
6011 * tree-switch-conversion.h (struct bit_test_cluster):
6012 Add m_handles_entire_switch.
6014 2018-08-27 Martin Liska <mliska@suse.cz>
6016 PR tree-optimization/86702
6017 * tree-switch-conversion.c (jump_table_cluster::emit):
6018 Make probabilities even for values in jump table
6019 according to number of cases handled.
6020 (switch_decision_tree::compute_cases_per_edge): Pass
6021 argument to reset_out_edges_aux function.
6022 (switch_decision_tree::analyze_switch_statement): Likewise.
6023 * tree-switch-conversion.h (switch_decision_tree::reset_out_edges_aux):
6026 2018-08-27 Martin Liska <mliska@suse.cz>
6028 * cfgexpand.c (expand_asm_stmt): Use label_to_block and pass
6029 cfun argument explicitly.
6030 * gimple-pretty-print.c (dump_gimple_switch): Likewise.
6031 * hsa-gen.c (gen_hsa_insns_for_switch_stmt): Use new
6032 function gimple_switch_default_bb.
6033 (convert_switch_statements):
6035 * ipa-fnsummary.c (set_switch_stmt_execution_predicate):
6036 * stmt.c (label_to_block_fn): Use label_to_block and pass
6037 cfun argument explicitly and use gimple_switch_label_bb.
6038 (expand_case): Likewise.
6039 * tree-cfg.c (lower_phi_internal_fn): Use label_to_block and pass
6040 cfun argument explicitly. Likewise.
6041 (make_edges_bb): Likewise.
6042 (make_cond_expr_edges): Likewise.
6043 (get_cases_for_edge): Likewise.
6044 (make_gimple_switch_edges): Likewise.
6045 (label_to_block_fn): Likewise.
6046 (label_to_block): Likewise.
6047 (make_goto_expr_edges): Likewise.
6048 (make_gimple_asm_edges): Likewise.
6049 (main_block_label): Likewise.
6050 (group_case_labels_stmt): Likewise.
6051 (find_taken_edge_computed_goto): Likewise.
6052 (find_taken_edge_switch_expr): Likewise.
6053 (gimple_verify_flow_info): Likewise.
6054 (gimple_redirect_edge_and_branch): Likewise.
6055 (gimple_switch_label_bb): New function.
6056 (gimple_switch_default_bb): Likewise.
6057 (gimple_switch_edge): Likewise.
6058 (gimple_switch_default_edge): Likewise.
6059 * tree-cfg.h (label_to_block_fn): Remove and replace ...
6060 (label_to_block): ... with this.
6061 (gimple_switch_label_bb): New.
6062 (gimple_switch_default_bb): Likewise.
6063 (gimple_switch_edge): Likewise.
6064 (gimple_switch_default_edge): Likewise.
6065 * tree-cfgcleanup.c (convert_single_case_switch): Use
6066 new gimple functions and pass new argument to label_to_block.
6067 (cleanup_control_flow_bb):
6068 * tree-eh.c (make_eh_dispatch_edges): Use label_to_block and pass
6069 cfun argument explicitly.
6070 (make_eh_edges): Likewise.
6071 (redirect_eh_dispatch_edge): Likewise.
6072 (lower_resx): Likewise.
6073 (lower_eh_dispatch): Likewise.
6074 (maybe_remove_unreachable_handlers): Likewise.
6075 (unsplit_eh): Likewise.
6076 (cleanup_empty_eh): Likewise.
6077 (verify_eh_edges): Likewise.
6078 (verify_eh_dispatch_edge): Likewise.
6079 * tree-ssa-dom.c (record_edge_info): Likewise.
6080 * tree-ssa-forwprop.c (simplify_gimple_switch_label_vec): Likewise.
6081 * tree-ssa-threadedge.c (thread_around_empty_blocks): Likewise.
6082 (thread_through_normal_block): Likewise.
6083 * tree-ssa-uncprop.c (associate_equivalences_with_edges): Likewise.
6084 * tree-ssa-uninit.c (convert_control_dep_chain_into_preds):
6085 * tree-switch-conversion.c (switch_conversion::collect): Use new
6087 (switch_conversion::check_final_bb): Likewise.
6088 (switch_conversion::gather_default_values): Pass new argument
6090 (switch_conversion::build_constructors): Likewise.
6091 (switch_decision_tree::compute_cases_per_edge): Use new
6092 gimple_switch_edge function.
6093 (switch_decision_tree::analyze_switch_statement): Pass new argument
6095 (switch_decision_tree::try_switch_expansion): Use
6096 gimple_switch_default_edge.
6097 * tree-vrp.c (find_switch_asserts): Pass new argument
6099 * vr-values.c (vr_values::vrp_visit_switch_stmt): Likewise.
6100 (vr_values::simplify_switch_using_ranges): Likewise.
6102 2018-08-27 Richard Biener <rguenther@suse.de>
6104 * cfganal.h (rev_post_order_and_mark_dfs_back_seme): Declare.
6105 * cfganal.c (rev_post_order_and_mark_dfs_back_seme): New function.
6107 * tree-ssa-sccvn.h (struct vn_pval): New structure.
6108 (struct vn_nary_op_s): Add unwind_to member. Add
6109 predicated_values flag and put result into a union together
6110 with a linked list of vn_pval.
6111 (struct vn_ssa_aux): Add name member to make maintaining
6112 a map of SSA name to vn_ssa_aux possible. Remove no longer
6113 needed info, dfsnum, low, visited, on_sccstack, use_processed
6114 and range_info_anti_range_p members.
6115 (run_scc_vn, vn_eliminate, free_scc_vn, vn_valueize): Remove.
6116 (do_rpo_vn, run_rpo_vn, eliminate_with_rpo_vn, free_rpo_vn):
6118 (vn_valueize): New global.
6119 (vn_context_bb): Likewise.
6120 (VN_INFO_RANGE_INFO, VN_INFO_ANTI_RANGE_P, VN_INFO_RANGE_TYPE,
6121 VN_INFO_PTR_INFO): Remove.
6122 * tree-ssa-sccvn.c: ... (rewrite)
6123 (pass_fre::execute): For -O2+ initialize loops and run
6124 RPO VN in optimistic mode (iterating). For -O1 and -Og
6125 run RPO VN in non-optimistic mode.
6126 * params.def (PARAM_SCCVN_MAX_SCC_SIZE): Remove.
6127 (PARAM_RPO_VN_MAX_LOOP_DEPTH): Add.
6128 * doc/invoke.texi (sccvn-max-scc-size): Remove.
6129 (rpo-vn-max-loop-depth): Document.
6130 * tree-ssa-alias.c (walk_non_aliased_vuses): Stop walking
6131 when valuezing the VUSE signals we walked out of the region.
6132 * tree-ssa-pre.c (phi_translate_1): Ignore predicated values.
6133 (phi_translate): Set VN context block to use for availability
6135 (compute_avail): Likewise.
6136 (pre_valueize): New function.
6137 (pass_pre::execute): Adjust to the RPO VN API.
6139 * tree-ssa-loop-ivcanon.c: Include tree-ssa-sccvn.h.
6140 (propagate_constants_for_unrolling): Remove.
6141 (tree_unroll_loops_completely): Perform value-numbering
6142 on the unrolled bodies loop parent.
6144 2018-08-27 Richard Biener <rguenther@suse.de>
6146 * tree-ssa-pre.c (compute_antic): Re-use inverted postorder
6147 for partial antic compute.
6149 2018-08-27 Jakub Jelinek <jakub@redhat.com>
6151 PR rtl-optimization/87065
6152 * combine.c (simplify_if_then_else): Formatting fix.
6153 (if_then_else_cond): Guard MULT optimization with SCALAR_INT_MODE_P
6155 (known_cond): Don't return const_true_rtx for vector modes. Use
6156 CONST0_RTX instead of const0_rtx. Formatting fixes.
6158 2018-08-27 Martin Liska <mliska@suse.cz>
6160 PR gcov-profile/87069
6161 * gcov.c (process_file): Record files already processed
6162 and warn about a file being processed multiple times.
6164 2018-08-27 Martin Liska <mliska@suse.cz>
6167 * config/aarch64/aarch64.c (aarch64_override_options_internal):
6168 Set default values for x_aarch64_*_string strings.
6169 * config/aarch64/aarch64.opt: Remove --{march,mcpu,mtune}==
6170 prefix. For -mabi do not print '=ABI' in help and use
6171 <option_value> format for -msve-vector-bits and -moverride
6174 2018-08-26 Jeff Law <law@redhat.com>
6176 * config/mips/frame-header-opt.c: Include "backend.h" rather than
6179 2018-08-26 Marek Polacek <polacek@redhat.com>
6181 PR c++/87029, Implement -Wredundant-move.
6182 * doc/invoke.texi: Document -Wredundant-move.
6184 2018-08-25 Martin Sebor <msebor@redhat.com>
6186 PR tree-optimization/87059
6187 * builtins.c (expand_builtin_strncmp): Convert MIN_EXPR operand
6188 to the same type as the other.
6189 * fold-const.c (fold_binary_loc): Assert expectation.
6191 2018-08-25 Iain Sandoe <iain@sandoe.co.uk>
6193 * config/darwin.c (machopic_legitimize_pic_address): Clean up
6194 extraneous parentheses, dead code section and formatting.
6196 2018-08-24 David Malcolm <dmalcolm@redhat.com>
6199 * diagnostic-show-locus.c (layout::layout): Ensure the margin is
6200 wide enough for jumps in the line-numbering to be visible.
6201 (layout::print_gap_in_line_numbering): New member function.
6202 (layout::calculate_line_spans): When using line numbering, merge
6203 line spans that are only 1 line apart.
6204 (diagnostic_show_locus): When printing line numbers, show gaps in
6205 line numbering directly, rather than printing headers.
6206 (selftest::test_diagnostic_show_locus_fixit_lines): Add test of
6207 line-numbering with multiple line spans.
6208 (selftest::test_fixit_insert_containing_newline_2): Add test of
6209 line-numbering, in which the spans are close enough to be merged.
6211 2018-08-24 Aldy Hernandez <aldyh@redhat.com>
6213 * gimple-ssa-evrp-analyze.c (set_ssa_range_info): Pass value_range
6214 to range_includes_zero_p. Do not special case VR_ANTI_RANGE.
6215 * tree-vrp.c (range_is_nonnull): Remove.
6216 (range_includes_zero_p): Accept value_range instead of min/max.
6217 (extract_range_from_binary_expr_1): Do not early bail on
6219 Use range_includes_zero_p instead of range_is_nonnull.
6220 (extract_range_from_unary_expr): Use range_includes_zero_p instead
6221 of range_is_nonnull.
6222 (vrp_meet_1): Pass value_range to range_includes_zero_p. Do not
6223 special case VR_ANTI_RANGE.
6224 (vrp_finalize): Same.
6225 * tree-vrp.h (range_includes_zero_p): Pass value_range as argument
6227 (range_is_nonnull): Remove.
6228 * vr-values.c (vrp_stmt_computes_nonzero): Use
6229 range_includes_zero_p instead of range_is_nonnull.
6230 (extract_range_basic): Pass value_range to range_includes_zero_p
6231 instead of range_is_nonnull.
6233 2018-08-24 Uros Bizjak <ubizjak@gmail.com>
6235 * emit-rtl.c (init_emit_once): Do not emit MODE_POINTER_BOUNDS RTXes.
6236 * emit-rtl.h (rtl_data): Remove return_bnd.
6237 * explow.c (trunc_int_for_mode): Do not handle POINTER_BOUNDS_MODE_P.
6238 * function.c (diddle_return_value): Do not handle crtl->return_bnd.
6239 * genmodes.c (complete_mode): Do not handle MODE_POINTER_BOUNDS.
6240 (POINTER_BOUNDS_MODE): Remove definition.
6241 (make_pointer_bounds_mode): Remove.
6242 (get_mode_class): Do not handle MODE_POINTER_BOUNDS.
6243 * machmode.h (POINTER_BOUNDS_MODE_P): Remove definition.
6244 (scalare_mode::includes_p): Do not handle MODE_POINTER_BOUNDS.
6245 * mode-classes.def: Do not define MODE_POINTER_BOUNDS.
6246 * stor-layout.c (int_mode_for_mode): Do not handle MODE_POINTER_BOUNDS.
6247 * tree-core.h (enum tree_index): Remove TI_POINTER_BOUNDS_TYPE.
6248 * varasm.c (output_constant_pool_2): Do not handle MODE_POINTER_BOUNDS.
6250 * config/i386/i386-modes.def (BND32, BND64): Remove.
6251 * config/i386/i386.c (dbx_register_map): Remove bound registers.
6252 (dbx64_register_map): Ditto.
6253 (svr4_dbx_register_map): Ditto.
6254 (indirect_thunk_bnd_needed): Remove.
6255 (indirect_thunks_bnd_used): Ditto.
6256 (indirect_return_bnd_needed): Ditto.
6257 (indirect_return_via_cx_bnd): Ditto.
6258 (enum indirect_thunk_prefix): Remove indirect_thunk_prefix_bnd.
6259 (indirect_thunk_name): Remove handling of indirect_thunk_prefix_bnd.
6260 (output_indirect_thunk): Ditto. Remove need_prefix argument.
6261 (output_indirect_thunk_function): Remove handling of
6262 indirect_return_bnd_needed, indirect_return_via_cx_bnd,
6263 indirect_thunk_bnd_needed and indirect_thunks_bnd_used variables.
6264 (ix86_save_reg): Remove handling of crtl->return_bnd.
6265 (ix86_legitimate_constant_p): Remove handling of POINTER_BOUNDS_MODE_P.
6266 (ix86_print_operand_address_as): Remove handling of UNSPEC_BNDMK_ADDR
6267 and UNSPEC_BNDLX_ADDR.
6268 (ix86_output_indirect_branch_via_reg): Remove handling of
6269 indirect_thunk_prefix_bnd.
6270 (ix86_output_indirect_branch_via_push): Ditto.
6271 (ix86_output_function_return): Ditto.
6272 (ix86_output_indirect_function_return): Ditto.
6273 (avoid_func_arg_motion): Do not handle UNSPEC_BNDSTX.
6274 * config/i386/i386.h (FIXED_REGISTERS): Remove bound registers.
6275 (CALL_USED_REGISTERS): Ditto.
6276 (REG_ALLOC_ORDER): Update for removal of bound registers.
6277 (HI_REGISTER_NAMES): Ditto.
6278 * config/i386/i386.md (UNSPEC_BNDMK, UNSPEC_BNDMK_ADDR, UNSPEC_BNDSTX)
6279 (UNSPEC_BNDLDX, UNSPEC_BNDLDX_ADDR, UNSPEC_BNDCL, UNSPEC_BNDCU)
6280 (UNSPEC_BNDCN, UNSPEC_MPX_FENCE): Remove.
6281 (BND0_REG, BND1_REG, BND2_REG, BND3_REG): Remove
6282 (FIRST_PSEUDO_REG): Update.
6283 (BND): Remove mode iterator.
6284 * config/i386/predicates.md (bnd_mem_operator): Remove.
6286 2018-08-24 Richard Sandiford <richard.sandiford@arm.com>
6288 * tree-vect-stmts.c (vectorizable_bswap): Handle variable-length
6291 2018-08-24 Richard Sandiford <richard.sandiford@arm.com>
6293 * tree-vect-slp.c (vect_transform_slp_perm_load): Separate out
6294 the case in which the permute needs only a single element and
6295 repeats for every vector of the result. Extend that case to
6296 handle variable-length vectors.
6297 * tree-vect-stmts.c (vectorizable_load): Update accordingly.
6299 2018-08-24 H.J. Lu <hongjiu.lu@intel.com>
6302 * dwarf2out.c (save_macinfo_strings): Call set_indirect_string
6303 on DW_MACINFO_start_file for -gsplit-dwarf -g3.
6305 2018-08-24 Richard Biener <rguenther@suse.de>
6307 * cfg.h (struct control_flow_graph): Add edge_flags_allocated and
6308 bb_flags_allocated members.
6309 (auto_flag): New RAII class for allocating flags.
6310 (auto_edge_flag): New RAII class for allocating edge flags.
6311 (auto_bb_flag): New RAII class for allocating bb flags.
6312 * cfgloop.c (verify_loop_structure): Allocate temporary edge
6314 * cfganal.c (dfs_enumerate_from): Remove use of visited sbitmap
6315 in favor of temporarily allocated BB flag.
6316 * hsa-brig.c: Re-order includes.
6317 * hsa-dump.c: Likewise.
6318 * hsa-regalloc.c: Likewise.
6319 * print-rtl.c: Likewise.
6320 * profile-count.c: Likewise.
6322 2018-08-24 Segher Boessenkool <segher@kernel.crashing.org>
6325 * config/rs6000/rs6000.c (toc_relative_expr_p): Check that the base is
6328 2018-08-24 Aldy Hernandez <aldyh@redhat.com>
6331 * wide-int-range.cc (wide_int_range_div): Do not ignore result
6332 from wide_int_range_multiplicative_op.
6334 2018-08-23 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
6336 * tree-vect-data-refs.c (vect_grouped_store_supported): Fix typo
6339 2018-08-23 Giuliano Belinassi <giuliano.belinassi@usp.br>
6341 * genmatch.c (parser::parse_operation): Fix typo 'exapnded'
6344 2018-08-23 Alexander Monakov <amonakov@ispras.ru>
6346 * tree-scalar-evolution.c (final_value_replacement_loop): Dump
6347 full GENERIC expression used for replacement.
6349 2018-08-23 Aldy Hernandez <aldyh@redhat.com>
6351 * tree-vrp.c (abs_extent_range): Remove.
6352 (extract_range_into_wide_ints): Pass wide ints by reference.
6353 (extract_range_from_binary_expr_1): Rewrite the *DIV_EXPR code.
6354 Pass wide ints by reference in all calls to
6355 extract_range_into_wide_ints.
6356 * wide-int-range.cc (wide_int_range_div): New.
6357 * wide-int-range.h (wide_int_range_div): New.
6358 (wide_int_range_includes_zero_p): New.
6359 (wide_int_range_zero_p): New.
6361 2018-08-23 Matthew Malcomson <matthew.malcomson@arm.com>
6363 * config/aarch64/aarch64.md (arches): New enum.
6364 (arch): New enum attr.
6365 (arch_enabled): New attr.
6366 (enabled): Now uses arch_enabled only.
6367 (simd, sve, fp16): Removed attribute.
6368 (fp): Attr now defined in terms of 'arch'.
6369 (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64, *movti_aarch64,
6370 *movhf_aarch64, <optab><fcvt_target><GPF:mode>2,
6371 <FCVT_F2FIXED:fcvt_fixed_insn><GPF:mode>3,
6372 <FCVT_FIXED2F:fcvt_fixed_insn><GPI:mode>3): Merge 'fp' and 'simd'
6373 attributes into 'arch'.
6374 (*movsf_aarch64, *movdf_aarch64, *movtf_aarch64, *add<mode>3_aarch64,
6375 subdi3, neg<mode>2, <optab><mode>3, one_cmpl<mode>2,
6376 *<NLOGICAL:optab>_one_cmpl<mode>3, *xor_one_cmpl<mode>3,
6377 *aarch64_ashl_sisd_or_int_<mode>3, *aarch64_lshr_sisd_or_int_<mode>3,
6378 *aarch64_ashr_sisd_or_int_<mode>3, *aarch64_sisd_ushl): Convert use of
6379 'simd' attribute into 'arch'.
6380 (load_pair_sw_<SX:mode><SX2:mode>, load_pair_dw_<DX:mode><DX2:mode>,
6381 store_pair_sw_<SX:mode><SX2:mode>, store_pair_dw_<DX:mode><DX2:mode>):
6382 Convert use of 'fp' attribute to 'arch'.
6383 * config/aarch64/aarch64-simd.md (move_lo_quad_internal_<mode>,
6384 move_lo_quad_internal_<mode>): (different modes) Merge 'fp' and 'simd'
6386 (move_lo_quad_internal_be_<mode>, move_lo_quad_internal_be_<mode>):
6387 (different modes) Merge 'fp' and 'simd' into 'arch'.
6388 (*aarch64_combinez<mode>, *aarch64_combinez_be<mode>): Merge 'fp' and
6391 2018-08-23 Segher Boessenkool <segher@kernel.crashing.org>
6393 PR rtl-optimization/87026
6394 * expmed.c (canonicalize_comparison): If we can no longer create
6395 pseudoregisters, don't.
6397 2018-08-23 Richard Earnshaw <rearnsha@arm.com>
6400 * config/arm/arm-protos.h (arm_emit_speculation_barrier): New
6402 * config/arm/arm.c (speculation_barrier_libfunc): New static
6404 (arm_init_libfuncs): Initialize it.
6405 (arm_emit_speculation_barrier): New function.
6406 * config/arm/arm.md (speculation_barrier): Call
6407 arm_emit_speculation_barrier for architectures that do not have
6409 (speculation_barrier_insn): Only match on Armv7 or later.
6411 2018-08-23 Richard Biener <rguenther@suse.de>
6414 * tree-inline.c (copy_bb): Drop unused __builtin_va_arg_pack_len
6417 2018-08-23 Richard Sandiford <richard.sandiford@arm.com>
6419 * config/aarch64/aarch64.c (aarch64_evpc_sve_tbl): Fix handling
6420 of single-vector TBLs.
6421 (aarch64_vectorize_vec_perm_const): Set one_vector_p when only
6424 2018-08-23 Richard Sandiford <richard.sandiford@arm.com>
6427 * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const_1): Fix
6428 aarch64_evpc_tbl guard.
6430 2018-08-22 Bernd Edlinger <bernd.edlinger@hotmail.de>
6432 * tree-ssa-dse.c (compute_trims): Avoid folding away undefined
6435 2018-08-22 Martin Sebor <msebor@redhat.com>
6438 * tree-pretty-print.c (pretty_print_string): Add argument.
6439 (dump_generic_node): Call to pretty_print_string with string size.
6441 2018-08-22 Segher Boessenkool <segher@kernel.crashing.org>
6443 PR rtl-optimization/86771
6444 * combine.c (try_combine): Do not allow splitting a resulting PARALLEL
6445 of two SETs into those two SETs, one to be placed at i2, if that SETs
6446 destination is modified between i2 and i3.
6448 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
6450 PR tree-optimization/86725
6451 * tree-vect-loop.c (vect_inner_phi_in_double_reduction_p): New
6453 (vect_analyze_scalar_cycles_1): Check it.
6455 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
6457 PR tree-optimization/86725
6458 * tree-vect-loop.c (vect_is_simple_reduction): When treating
6459 an outer loop phi as a double reduction, make sure that the
6460 single user of the phi result is an inner loop phi.
6462 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
6464 * tree-vect-data-refs.c (vect_analyze_group_access_1): Convert
6465 grouped stores with gaps to a strided group.
6467 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
6469 * tree-vect-stmts.c (get_group_load_store_type)
6470 (get_load_store_type): Only test STMT_VINFO_STRIDED_P for the
6471 first statement in a group.
6473 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
6475 * config/darwin.h (LINK_COMMAND_SPEC_A): Sync LTO options with
6476 the sequence used in gcc/gcc.c.
6478 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
6481 * gcc-ar.c (main): Don’t try to invoke the plug-in if we’re not
6484 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
6486 * config/darwin10.h (LINK_GCC_C_SEQUENCE_SPEC): Adjust to use the
6487 Darwin10-specific unwinder-shim.
6488 * config/darwin12.h (LINK_GCC_C_SEQUENCE_SPEC): Remove.
6489 * config/rs6000/darwin.h (DARWIN_CRT1_SPEC, DARWIN_DYLIB1_SPEC):
6490 New to cater for Darwin10 Rosetta.
6492 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
6494 * config/i386/i386.c (ix86_output_addr_diff_elt): Move the MACH-O
6495 specific test before the one for HAVE_AS_GOTOFF_IN_DATA.
6497 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
6502 * gcc/dwarf2out.c (FUNC_SECOND_SECT_LABEL): New.
6503 (dwarf2out_switch_text_section): Generate a local label for the
6504 second function sub-section and apply it as the second FDE start
6506 * gcc/final.c (final_scan_insn_1): Emit second FDE label after the
6507 second sub-section start.
6509 2018-08-22 Richard Biener <rguenther@suse.de>
6511 PR tree-optimization/86988
6512 * tree-vrp.c (vrp_prop::check_mem_ref): Bail out on VLAs.
6514 2018-08-22 Richard Biener <rguenther@suse.de>
6516 PR tree-optimization/86945
6517 * tree-cfg.c (generate_range_test): Use unsigned arithmetic.
6519 2018-08-22 Alexandre Oliva <oliva@adacore.com>
6521 * config/rs6000/rs6000.c (SMALL_DATA_RELOC, SMALL_DATA_REG): Add
6522 a comment about how uses of r2 for .sdata2 come about.
6524 2018-08-22 Alexandre Oliva <aoliva@redhat.com>
6526 * tree-ssa-reassoc.c (is_reassociable_op): Fix cut&pasto.
6528 2018-08-21 Marek Polacek <polacek@redhat.com>
6530 PR c++/86981, Implement -Wpessimizing-move.
6531 * doc/invoke.texi: Document -Wpessimizing-move.
6533 2018-08-21 Jan Hubicka <jh@suse.cz>
6535 * tree.c (find_decls_types_r): Do not check for redundant typedefs.
6536 * tree.h (is_redundant_typedef): Remove.
6537 * dwarf2out.c (is_redundant_typedef): Turn into static function.
6539 2018-08-21 Jan Hubicka <jh@suse.cz>
6541 * tree.c (free_lang_data_in_decl): Remove types from DECL_CONTEXT
6544 2018-08-21 Tamar Christina <tamar.christina@arm.com>
6546 * expmed.c (extract_low_bits): Reject invalid subregs early.
6548 2018-08-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
6551 * tree-ssa-strlen.c (adjust_last_stmt): Avoid folding away undefined
6554 2018-08-21 Rasmus Villemoes <rv@rasmusvillemoes.dk>
6556 * config/vxworks.h: Guard vxworks_asm_out_constructor and
6557 vxworks_asm_out_destructor by !HAVE_INITFINI_ARRAY_SUPPORT
6558 * config/vxworks.c: Likewise.
6560 2018-08-21 Rasmus Villemoes <rv@rasmusvillemoes.dk>
6562 * config/vxworks.c: Set targetm.have_ctors_dtors
6563 if HAVE_INITFINI_ARRAY_SUPPORT.
6564 * config/vxworks.h: Set SUPPORTS_INIT_PRIORITY
6565 if HAVE_INITFINI_ARRAY_SUPPORT.
6567 2018-08-21 Rasmus Villemoes <rv@rasmusvillemoes.dk>
6569 * config/vxworks.h: Add $(WIND_BASE)/target/h/wrn/coreip to
6570 default search path for VxWorks < 7.
6572 2018-08-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
6574 * gimple-ssa-sprintf.c (decl_constant_value): Remove.
6575 (get_format_string): Refer to c_getstr.
6577 2018-08-21 Tom de Vries <tdevries@suse.de>
6579 * cgraph.h (debuginfo_early_init, debuginfo_init, debuginfo_fini)
6580 (debuginfo_start, debuginfo_stop, debuginfo_early_start)
6581 (debuginfo_early_stop): Declare.
6582 * cgraphunit.c (debuginfo_early_init, debuginfo_init, debuginfo_fini)
6583 (debuginfo_start, debuginfo_stop, debuginfo_early_start)
6584 (debuginfo_early_stop): New function.
6585 (symbol_table::finalize_compilation_unit): Call debuginfo_early_start
6586 and debuginfo_early_stop.
6587 * dwarf2out.c (dwarf2out_finish, dwarf2out_early_finish): Dump dwarf.
6588 * toplev.c (compile_file): Call debuginfo_start and debuginfo_stop.
6589 (general_init): Call debuginfo_early_init.
6590 (finalize): Call debuginfo_fini.
6591 (do_compile): Call debuginfo_init.
6592 * doc/invoke.texi (@gccoptlist): Add -fdump-debug and
6594 (@item -fdump-debug, @item -fdump-earlydebug): Add.
6596 2018-08-21 Tom de Vries <tdevries@suse.de>
6598 * dwarf2out.c (print_dw_val, print_loc_descr, print_die): Handle
6599 flag_dump_noaddr and flag_dump_unnumbered.
6601 2018-08-21 Aldy Hernandez <aldyh@redhat.com>
6603 * wide-int-range.cc (wide_int_range_abs): New.
6604 (wide_int_range_order_set): Rename from wide_int_range_min_max.
6605 * wide-int-range.h (wide_int_range_abs): New.
6606 (wide_int_range_min_max): New.
6607 * tree-vrp.c (extract_range_from_unary_expr): Rewrite ABS_EXPR
6608 case to call wide_int_range_abs.
6609 Rewrite MIN/MAX_EXPR to call wide_int_range_min_max.
6610 (extract_range_from_abs_expr): Delete.
6612 2018-08-20 Michael Meissner <meissner@linux.ibm.com>
6615 * config/rs6000/rs6000.md (extendsi<mode>2): Change constraints
6616 from 'Y' to 'YZ' to enable the LWAX instruction to be generated
6619 2018-08-20 Nathan Sidwell <nathan@acm.org>
6620 Jeff Law <law@redhat.com>
6622 * config/s390/s390-c (s390_macro_to_expand): Use cpp_macro_p.
6623 * config/spu/spu-c.c (spu_macro_to_expand): Likewise.
6625 2018-08-20 David Malcolm <dmalcolm@redhat.com>
6628 * attribs.c (diag_attr_exclusions): Add auto_diagnostic_group instance.
6629 (decl_attributes): Likewise.
6630 * calls.c (maybe_warn_nonstring_arg): Add auto_diagnostic_group
6632 * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
6633 * diagnostic-core.h (class auto_diagnostic_group): New class.
6634 * diagnostic.c (diagnostic_initialize): Initialize the new fields.
6635 (diagnostic_report_diagnostic): Handle the first diagnostics within
6637 (emit_diagnostic): Add auto_diagnostic_group instance.
6639 (inform_n): Likewise.
6640 (warning): Likewise.
6641 (warning_at): Likewise.
6642 (warning_n): Likewise.
6643 (pedwarn): Likewise.
6644 (permerror): Likewise.
6646 (error_n): Likewise.
6647 (error_at): Likewise.
6649 (fatal_error): Likewise.
6650 (internal_error): Likewise.
6651 (internal_error_no_backtrace): Likewise.
6652 (auto_diagnostic_group::auto_diagnostic_group): New ctor.
6653 (auto_diagnostic_group::~auto_diagnostic_group): New dtor.
6654 * diagnostic.h (struct diagnostic_context): Add fields
6655 "diagnostic_group_nesting_depth",
6656 "diagnostic_group_emission_count", "begin_group_cb",
6658 * gimple-ssa-isolate-paths.c (find_implicit_erroneous_behavior):
6659 Add auto_diagnostic_group instance(s).
6660 (find_explicit_erroneous_behavior): Likewise.
6661 * gimple-ssa-warn-alloca.c (pass_walloca::execute): Likewise.
6662 * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Likewise.
6663 * gimplify.c (warn_implicit_fallthrough_r): Likewise.
6664 (gimplify_va_arg_expr): Likewise.
6665 * hsa-gen.c (HSA_SORRY_ATV): Likewise.
6666 (HSA_SORRY_AT): Likewise.
6667 * ipa-devirt.c (compare_virtual_tables): Likewise.
6668 (warn_odr): Likewise.
6669 * multiple_target.c (expand_target_clones): Likewise.
6670 * opts-common.c (cmdline_handle_error): Likewise.
6671 * reginfo.c (globalize_reg): Likewise.
6672 * substring-locations.c (format_warning_n_va): Likewise.
6673 * tree-inline.c (expand_call_inline): Likewise.
6674 * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Likewise.
6675 * tree-ssa-loop-niter.c
6676 (do_warn_aggressive_loop_optimizations): Likewise.
6677 * tree-ssa-uninit.c (warn_uninit): Likewise.
6678 * tree.c (warn_deprecated_use): Likewise.
6680 2018-08-20 H.J. Lu <hongjiu.lu@intel.com>
6683 * config/i386/i386.md (eh_return): Always update EH return
6684 address in word_mode.
6686 2018-08-20 Chung-Lin Tang <cltang@codesourcery.com>
6688 * targhooks.c (std_gimplify_va_arg_expr): Properly handle case of when
6689 TARGET_SPLIT_COMPLEX_ARG is defined.
6691 2018-08-20 Bernd Edlinger <bernd.edlinger@hotmail.de>
6693 * expr.c (store_field): Change gcc_assert to gcc_checking_assert.
6695 2018-08-20 Bernd Edlinger <bernd.edlinger@hotmail.de>
6698 * expr.c (expand_assignment): Assert that bitpos is positive.
6699 (store_field): Likewise
6700 (expand_expr_real_1): Make sure that bitpos is positive.
6701 * config/alpha/alpha.h (CONSTANT_ADDRESS_P): Avoid signed
6704 2018-08-20 Nathan Sidwell <nathan@acm.org>
6706 * Makefile.in (CPP_ID_DATA_H): Delete.
6707 (CPP_INTERNAL_H): Don't add it.
6708 (GTFILES): Replace CPP_ID_DATA_H with CPPLIB_H.
6709 * gengtype.c (open_base_files): Replace cpp-id-data.h with cpplib.h
6711 2018-08-20 Richard Biener <rguenther@suse.de>
6713 PR tree-optimization/78655
6714 * tree-vrp.c (extract_range_from_binary_expr_1): Make
6715 pointer + offset nonnull if either operand is nonnull work.
6717 2018-08-20 Tom de Vries <tdevries@suse.de>
6719 * dwarf2out.c (add_scalar_info): Don't add reference to existing die
6720 unless the referenced die describes the added property using
6721 DW_AT_location or DW_AT_const_value. Fall back to exprloc case.
6722 Otherwise, add a DW_AT_location to the referenced die.
6724 2018-08-19 Uros Bizjak <ubizjak@gmail.com>
6727 * config/i386/i386.c (ix86_rtx_costs) [case SET]: Check source for
6728 register_operand when calling ix86_set_reg_reg_cost.
6729 [case CONST_INT, case CONST, case LABEL_REF, case SYMBOL_REF]:
6730 Set *total to 0 for operands that satisfy x86_64_immediate_operand
6731 predicate and to 1 otherwise.
6733 2018-08-18 Iain Sandoe <iain@sandoe.co.uk>
6735 * config/darwin.c (darwin_override_options): If -gsplit-dwarf is set,
6736 emit a diagnostic that it is not supported and reset the option.
6737 * config/darwin.h (DRIVER_SELF_SPECS): Note that gsplit-dwarf is not
6738 supported and consume the option. (ASM_FINAL_SPEC): New.
6740 2018-08-17 Segher Boessenkool <segher@kernel.crashing.org>
6742 * doc/md.texi (Patterns): Use @ref instead of @xref in the middle of
6745 2018-08-17 Sandra Loosemore <sandra@codesourcery.com>
6747 C-SKY port: Documentation
6749 * doc/extend.texi (C-SKY Function Attributes): New section.
6750 * doc/invoke.texi (Option Summary): Add C-SKY options.
6751 (C-SKY Options): New section.
6752 * doc/md.texi (Machine Constraints): Document C-SKY constraints.
6754 2018-08-17 Jojo <jijie_rong@c-sky.com>
6755 Huibin Wang <huibin_wang@c-sky.com>
6756 Sandra Loosemore <sandra@codesourcery.com>
6757 Chung-Lin Tang <cltang@codesourcery.com>
6759 C-SKY port: Backend implementation
6761 * config/csky/*: New.
6762 * common/config/csky/*: New.
6764 2018-08-17 Jojo <jijie_rong@c-sky.com>
6765 Huibin Wang <huibin_wang@c-sky.com>
6766 Sandra Loosemore <sandra@codesourcery.com>
6767 Chung-Lin Tang <cltang@codesourcery.com>
6768 Andrew Jenner <andrew@codesourcery.com>
6770 C-SKY port: Configury
6772 * config.gcc (csky-*-*): New.
6773 * configure.ac: Add csky to targets for dwarf2 debug_line support.
6774 * configure: Regenerated.
6776 2018-08-17 David Malcolm <dmalcolm@redhat.com>
6778 * dump-context.h: Include "dumpfile.h".
6779 (dump_context::dump_printf_va): Convert final param from va_list
6780 to va_list *. Convert from ATTRIBUTE_PRINTF to
6781 ATTRIBUTE_GCC_DUMP_PRINTF.
6782 (dump_context::dump_printf_loc_va): Likewise.
6783 * dumpfile.c: Include "stringpool.h".
6784 (make_item_for_dump_printf_va): Delete.
6785 (make_item_for_dump_printf): Delete.
6786 (class dump_pretty_printer): New class.
6787 (dump_pretty_printer::dump_pretty_printer): New ctor.
6788 (dump_pretty_printer::emit_items): New member function.
6789 (dump_pretty_printer::emit_any_pending_textual_chunks): New member
6791 (dump_pretty_printer::emit_item): New member function.
6792 (dump_pretty_printer::stash_item): New member function.
6793 (dump_pretty_printer::format_decoder_cb): New member function.
6794 (dump_pretty_printer::decode_format): New member function.
6795 (dump_context::dump_printf_va): Reimplement in terms of
6796 dump_pretty_printer.
6797 (dump_context::dump_printf_loc_va): Convert final param from va_list
6799 (dump_context::begin_scope): Reimplement call to
6800 make_item_for_dump_printf.
6801 (dump_printf): Update for change to dump_printf_va.
6802 (dump_printf_loc): Likewise.
6803 (selftest::test_capture_of_dump_calls): Convert "stmt" from
6804 greturn * to gimple *. Add a test_decl. Add tests of dump_printf
6805 with %T, %E, and %G.
6806 * dumpfile.h (ATTRIBUTE_GCC_DUMP_PRINTF): New macro.
6807 (dump_printf): Replace ATTRIBUTE_PRINTF_2 with
6808 ATTRIBUTE_GCC_DUMP_PRINTF (2, 3).
6809 (dump_printf_loc): Replace ATTRIBUTE_PRINTF_3 with
6810 ATTRIBUTE_GCC_DUMP_PRINTF (3, 0).
6811 * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Convert
6812 use of HOST_WIDE_INT_PRINT_DEC on unsigned HOST_WIDE_INT "count"
6813 within a dump_printf_loc call to "%wu".
6814 (vector_alignment_reachable_p): Merge two dump_printf[_loc] calls,
6815 converting a use of HOST_WIDE_INT_PRINT_DEC to "%wd". Add a
6816 missing space after "=".
6817 * tree-vect-loop.c (vect_analyze_loop_2) Within a dump_printf
6818 call, convert use of HOST_WIDE_INT_PRINT_DEC to "%wd".
6819 * tree-vect-slp.c (vect_slp_bb): Within a dump_printf_loc call,
6820 convert use of HOST_WIDE_INT_PRINT_UNSIGNED to "%wu".
6821 * tree-vectorizer.c (try_vectorize_loop_1): Likewise. Remove
6822 duplicate "vectorized" from message.
6824 2018-08-17 Szabolcs Nagy <szabolcs.nagy@arm.com>
6826 * config/arm/arm-builtins.c (arm_init_simd_builtin_types): Clear
6827 polyNxK_t element's TYPE_STRING_FLAG.
6829 2018-08-17 Segher Boessenkool <segher@kernel.crashing.org>
6831 * config/rs6000/rs6000.md (*cbranch, *creturn): Name these patterns
6832 (they were unnamed before). Fix comments.
6834 2018-08-17 Nathan Sidwell <nathan@acm.org>
6836 * cppbuiltin.c: Include "cpplib.h", not "cpp-id-data.h".
6838 2018-08-17 Richard Biener <rguenther@suse.de>
6840 PR tree-optimization/86841
6841 * wide-int-range.cc (wide_int_range_lshift): Use to_uhwi.
6843 2018-08-17 Martin Liska <mliska@suse.cz>
6845 * common.opt: Remove Warn, Init and Report for options with
6846 Ignore/Deprecated flag. Warning is done automatically for
6848 * config/i386/i386.opt: Likewise.
6849 * config/ia64/ia64.opt: Likewise.
6850 * config/rs6000/rs6000.opt: Likewise.
6851 * cppbuiltin.c (define_builtin_macros_for_compilation_flags):
6852 Remove usage of flag_check_pointer_bounds.
6853 * lto-wrapper.c (merge_and_complain): Do not handle
6854 OPT_fcheck_pointer_bounds.
6855 (append_compiler_options): Likewise.
6856 * opt-functions.awk: Do not handle Deprecated.
6857 * optc-gen.awk: Check that Var, Report and Init are not
6858 used for an option with Ignore/Deprecated flag.
6859 * opts-common.c (decode_cmdline_option): Do not report
6861 (read_cmdline_option): Report warning for OPT_SPECIAL_deprecated
6863 * opts.h (struct cl_option): Remove cl_deprecated flag.
6864 (CL_ERR_DEPRECATED): Remove error enum value.
6866 2018-08-17 Richard Biener <rguenther@suse.de>
6869 * tree-inline.c (copy_bb): When inlining __builtin_va_arg_pack_len ()
6870 across a va-arg-pack using call adjust its return value accordingly.
6872 2018-08-16 Martin Sebor <msebor@redhat.com>
6874 PR tree-optimization/86853
6875 * gimple-ssa-sprintf.c (struct format_result): Rename member.
6876 (struct fmtresult): Add member and initialize it in ctors.
6877 (format_character): Handle %C. Extend range to NUL. Set MAYFAIL.
6878 (format_string): Handle %S the same as %ls. Set MAYFAIL.
6879 (format_directive): Set POSUNDER4K when MAYFAIL is set.
6880 (parse_directive): Handle %C same as %c.
6881 (sprintf_dom_walker::compute_format_length): Adjust.
6882 (is_call_safe): Adjust.
6884 2018-08-16 Bernd Edlinger <bernd.edlinger@hotmail.de>
6886 * builtins.c (c_strlen): Add new parameter eltsize. Use it
6887 for determining how to count the elements.
6888 * builtins.h (c_strlen): Adjust prototype.
6889 * expr.c (string_constant): Add new parameter mem_size.
6890 Set *mem_size appropriately.
6891 * expr.h (string_constant): Adjust protoype.
6892 * gimple-fold.c (get_range_strlen): Add new parameter eltsize.
6893 * gimple-fold.h (get_range_strlen): Adjust prototype.
6894 * gimple-ssa-sprintf.c (get_string_length): Add new parameter eltsize.
6895 (format_string): Call get_string_length with eltsize.
6897 2018-08-16 David Malcolm <dmalcolm@redhat.com>
6899 * diagnostic.c (default_diagnostic_start_span_fn): Call pp_string
6900 to emit the span, rather than setting it as the prefix.
6902 2018-08-16 David Malcolm <dmalcolm@redhat.com>
6904 * diagnostic-show-locus.c (layout::start_annotation_line): Add
6905 "margin_char" parameter, defaulting to space. Use it in place
6906 of pp_space for the initial part of the margin.
6907 (layout::print_leading_fixits): Use '+' when filling the margin
6908 of line-insertion fix-it hints.
6910 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
6912 * config/rs6000/rs6000.md (two unnamed define_insn and define_split):
6915 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
6917 * config/rs6000/altivec.md: Don't set length attribute to the default
6919 * config/rs6000/darwin.md: Ditto.
6920 * config/rs6000/dfp.md: Ditto.
6921 * config/rs6000/htm.md: Ditto.
6922 * config/rs6000/rs6000.md: Ditto.
6923 * config/rs6000/sync.md: Ditto.
6924 * config/rs6000/vsx.md: Ditto.
6926 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
6928 * config/rs6000/altivec.md: Don't set length attribute to the default
6929 value, for branch instructions.
6930 * config/rs6000/darwin.md: Ditto.
6931 * config/rs6000/rs6000.md: Ditto.
6933 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
6935 * config/rs6000/rs6000.md (length): Always define as const_int 4.
6936 (unnamed conditional branch define_insn): Set length to 4 or 8
6937 depending on offset.
6938 (<bd>_<mode>): Similar, for alternative 0.
6939 (<bd>tf_<mode>): Ditto.
6941 2018-08-16 Tamar Christina <tamar.christina@arm.com>
6943 * expr.c (copy_blkmode_to_reg): Perform larger copies when safe.
6945 2018-08-16 Matthew Malcomson <matthew.malcomson@arm.com>
6947 * doc/rtl.texi: Replace old RTX class names with new names.
6950 2018-08-16 Vlad Lazar <vlad.lazar@arm.com>
6952 * expmed.h (canonicalize_comparison): New declaration.
6953 * expmed.c (canonicalize_comparison, equivalent_cmp_code): New function.
6954 * expmed.c (emit_store_flag_1): Add call to canonicalize_comparison.
6955 * optabs.c (prepare_cmp_insn): Likewise.
6956 * rtl.h (unsigned_condition_p): New function which checks if a
6957 comparison operator is unsigned.
6959 2018-08-16 Nathan Sidwell <nathan@acm.org>
6961 * config/rs6000/rs6000-c.c (rs6000_macro_to_expend): Use cpp_macro_p.
6962 * config/powerpcspc/powerpcspe-c.c (rs6000_macro_to_expend): Likewise.
6964 2018-08-16 Tamar Christina <tamar.christina@arm.com>
6967 * config/arm/arm.c (arm_can_change_mode_class): Disallow subreg.
6968 * config/arm/neon.md (movv4hf, movv8hf): Refactored to..
6969 (mov<mov>): ..this and enable unconditionally.
6971 2018-08-16 Tamar Christina <tamar.christina@arm.com>
6973 * config/arm/neon.md (*neon_mov<mode>): Remove reg-to-reg alternative.
6975 2018-08-16 Sam Tebbs <sam.tebbs@arm.com>
6977 * config/aarch64/aarch64.opt (mlow-precision-recip-sqrt)
6978 (mlow-precision-sqrt, mlow-precision-div, mverbose-cost-dump): Replace
6979 "Common" with "Target".
6981 2018-08-15 Uros Bizjak <ubizjak@gmail.com>
6983 * config/i386/i386.opt (mmitigate-rop): Mark as deprecated.
6984 * doc/invoke.texi (mmitigate-rop): Remove.
6985 * config/i386/i386.c: Do not include "regrename.h".
6986 (ix86_rop_should_change_byte_p, reg_encoded_number)
6987 (ix86_get_modrm_for_rop, set_rop_modrm_reg_bits, ix86_mitigate_rop):
6989 (ix86_reorg): Remove call to ix86_mitigate_rop.
6990 * config/i386/i386.md (attr "modrm_class"): Remove.
6991 (cmp<mode>_ccno_1, mov<mode>_xor, movstrict<mode>_xor)
6992 (x86_mov<mode>cc_0_m1. x86_mov<mode>cc_0_m1_se)
6993 (x86_mov<mode>cc_0_m1_neg): Remove modrm_class attribute override.
6995 2018-08-15 Will Schmidt <will_schmidt@vnet.ibm.com>
6997 * config/rs6000/rs600.c (rs6000_gimple_fold_builtin): Add entries to
6998 allow folding of mergeh() and mergel() for the float and double types.
6999 (fold_mergehl_helper): Rework to handle building a permute tree
7002 2018-08-15 Uros Bizjak <ubizjak@gmail.com>
7004 * config/i386/i386.c (expand_vec_perm_movs): Enable V4SFmode
7007 2018-08-15 David Malcolm <dmalcolm@redhat.com>
7009 * common.opt (fdiagnostics-show-labels): New option.
7010 * diagnostic-show-locus.c (class layout_range): Add field
7012 (class layout): Add field "m_show_labels_p".
7013 (layout_range::layout_range): Add param "label" and use it to
7015 (make_range): Pass in NULL for new "label" param of layout_range's
7017 (layout::layout): Initialize m_show_labels_p.
7018 (layout::maybe_add_location_range): Pass in loc_range->m_label
7019 when constructing layout_range instances.
7020 (struct line_label): New struct.
7021 (layout::print_any_labels): New member function.
7022 (layout::print_line): Call it if label-printing is enabled.
7023 (selftest::test_one_liner_labels): New test.
7024 (selftest::test_diagnostic_show_locus_one_liner): Call it.
7025 * diagnostic.c (diagnostic_initialize): Initialize
7026 context->show_labels_p.
7027 * diagnostic.h (struct diagnostic_context): Add field
7029 * doc/invoke.texi (Diagnostic Message Formatting Options): Add
7030 -fno-diagnostics-show-labels.
7031 * dwarf2out.c (gen_producer_string): Add
7032 OPT_fdiagnostics_show_labels to the ignored options.
7033 * gcc-rich-location.c (gcc_rich_location::add_expr): Add "label"
7035 (gcc_rich_location::maybe_add_expr): Likewise.
7036 * gcc-rich-location.h (gcc_rich_location::gcc_rich_location): Add
7037 label" param, defaulting to NULL.
7038 (gcc_rich_location::add_expr): Add "label" param.
7039 (gcc_rich_location::maybe_add_expr): Likewise.
7040 (class text_range_label): New class.
7041 (class range_label_for_type_mismatch): New class.
7042 * gimple-ssa-sprintf.c (fmtwarn): Pass NULL for new label params
7043 of format_warning_va.
7044 (fmtwarn_n): Likewise for new params of format_warning_n_va.
7045 * lto-wrapper.c (merge_and_complain): Add
7046 OPT_fdiagnostics_show_labels to the "pick one setting" options.
7047 (append_compiler_options): Likewise to the dropped options.
7048 (append_diag_options): Likewise to the passed-on options.
7049 * opts.c (common_handle_option): Handle the new option.
7050 * selftest-diagnostic.c
7051 (test_diagnostic_context::test_diagnostic_context): Enable
7053 * substring-locations.c: Include "gcc-rich-location.h".
7054 (format_warning_n_va): Add "fmt_label" and "param_label" params
7055 and use them as appropriate.
7056 (format_warning_va): Add "fmt_label" and "param_label" params,
7057 passing them on to format_warning_n_va.
7058 (format_warning_at_substring): Likewise.
7059 (format_warning_at_substring_n): Likewise.
7060 * substring-locations.h (format_warning_va): Add "fmt_label" and
7061 "param_label" params.
7062 (format_warning_n_va): Likewise.
7063 (format_warning_at_substring): Likewise.
7064 (format_warning_at_substring_n): Likewise.
7065 * toplev.c (general_init): Initialize global_dc->show_labels_p.
7067 2018-08-15 Qing Zhao <qing.zhao@oracle.com>
7070 * builtins.c (expand_builtin_memcmp): Do not expand the call
7071 when overflow is detected.
7073 2018-08-15 Martin Sebor <msebor@redhat.com>
7075 PR tree-optimization/71625
7076 * config/aarch64/aarch64-builtins.c
7077 (aarch64_init_simd_builtin_types): Clear Poly8_t's TYPE_STRING_FLAG.
7079 2018-08-15 Ilya Leoshkevich <iii@linux.ibm.com>
7081 * config/s390/s390.c (s390_reorg): Remove loop.
7083 2018-08-15 Iain Sandoe <iain@sandoe.co.uk>
7086 (darwin_function_switched_text_sections): Delete.
7087 * gcc/config/darwin.h
7088 (TARGET_ASM_FUNCTION_SWITCHED_TEXT_SECTIONS): Likewise.
7090 2018-08-15 Iain Sandoe <iain@sandoe.co.uk>
7093 * config/darwin.h: (DEBUG_STR_OFFSETS_SECTION, DEBUG_LOCLISTS_SECTION,
7094 DEBUG_RNGLISTS_SECTION) new macros. (DEBUG_PUBNAMES_SECTION,
7095 DEBUG_PUBTYPES_SECTION) update to include GNU variant.
7097 2018-08-15 Martin Liska <mliska@suse.cz>
7099 PR tree-optimization/86925
7100 * predict.c (expr_expected_value_1): When taking
7101 later predictor, assign also probability.
7102 Use fold_build2_initializer_loc in order to fold
7103 the expression in -frounding-math.
7105 2018-08-14 Allan Sandfeld Jensen <allan.jensen@qt.io>
7107 * config/i386/i386.c (expand_vec_perm_movs): New method matching movs
7109 (expand_vec_perm_1): Try the new method.
7111 2018-08-14 Ilya Leoshkevich <iii@linux.ibm.com>
7114 * lra-lives.c (remove_some_program_points_and_update_live_ranges):
7115 Check whether lra_live_max_point is 0 before dividing.
7117 2018-08-14 Martin Sebor <msebor@redhat.com>
7119 PR tree-optimization/86650
7120 * tree-vrp.c (vrp_prop::check_array_ref): Print an inform message.
7121 (vrp_prop::check_mem_ref): Same.
7123 2018-08-13 Liu Hao <lh_mouse@126.com>
7125 * pretty-print.c (eat_esc_sequence): Swap the foreground and
7126 background colors if the COMMON_LVB_REVERSE_VIDEO flag is set,
7127 and clear it thereafter, as it only works for DBCS.
7129 2018-08-13 Liu Hao <lh_mouse@126.com>
7131 * pretty-print.c (mingw_ansi_fputs): Do not call _close() on the
7132 handle returned by _get_osf_handle().
7134 2018-08-13 Will Schmidt <will_schmidt@vnet.ibm.com>
7136 * gcc/config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add support
7137 for folding vec_perm.
7139 2018-08-13 Will Schmidt <will_schmidt@vnet.ibm.com>
7141 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin):
7142 Add support for gimple-folding of vec_pack() and vec_unpack()
7145 2018-08-13 Will Schmidt <will_schmidt@vnet.ibm.com>
7147 * config/rs6000/rs6000.c (rs6000_builtin_valid_without_lhs): Add
7148 vec_xst variants to the list.
7149 (rs6000_gimple_fold_builtin): Add support for folding unaligned
7150 vector loads and stores.
7152 2018-08-13 David Edelsohn <dje.gcc@gmail.com>
7154 * config.gcc (rs6000-ibm-aix4.x): Delete.
7155 (rs6000-ibm-aix5.1): Delete.
7156 (rs6000-ibm-aix5.2): Delete.
7157 (rs6000-ibm-aix5.3): Delete.
7158 * config/rs6000/aix43.h: Delete.
7159 * config/rs6000/aix51.h: Delete.
7160 * config/rs6000/aix52.h: Delete.
7161 * config/rs6000/t-aix43: Delete.
7163 2018-08-13 Ilya Leoshkevich <iii@linux.ibm.com>
7165 * config/s390/s390.c (s390_decompose_constant_pool_ref):
7167 (s390_decompose_address): Factor out constant pool ref
7170 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
7172 * config/nds32/nds32-predicates.c
7173 (nds32_can_use_bclr_p): Change return type as bool.
7174 (nds32_can_use_bset_p): Ditto.
7175 (nds32_can_use_btgl_p): Ditto.
7176 (nds32_can_use_bitci_p): Ditto.
7177 * config/nds32/nds32-protos.h
7178 (nds32_can_use_bclr_p): Change declaration.
7179 (nds32_can_use_bset_p): Ditto.
7180 (nds32_can_use_btgl_p): Ditto.
7181 (nds32_can_use_bitci_p): Ditto.
7183 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
7185 * config/nds32/nds32.c (nds32_expand_prologue, nds32_expand_epilogue):
7186 Support -msched-prolog-epilog option.
7187 * config/nds32/nds32.opt (msched-prolog-epilog): New option.
7189 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
7191 * common/config/nds32/nds32-common.c
7192 (nds32_option_optimization_table): Enalbe -malways-align.
7194 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
7196 * config.gcc (nds32*): Add nds32_isr.h and nds32_init.inc in
7198 * common/config/nds32/nds32-common.c (nds32_handle_option): Handle
7199 OPT_misr_secure_ case.
7200 * config/nds32/nds32-isr.c: Implementation of backward compatibility.
7201 * config/nds32/nds32-protos.h (nds32_isr_function_critical_p): New.
7202 * config/nds32/nds32.c (nds32_attribute_table): Add critical and
7204 * config/nds32/nds32.h (nds32_isr_nested_type): Add NDS32_CRITICAL.
7205 (nds32_isr_info): New field security_level.
7206 (TARGET_ISR_VECTOR_SIZE_4_BYTE): New macro.
7207 * config/nds32/nds32.md (return_internal): Consider critical attribute.
7208 * config/nds32/nds32.opt (misr-secure): New option.
7209 * config/nds32/nds32_init.inc: New file.
7210 * config/nds32/nds32_isr.h: New file.
7212 2018-08-11 John David Anglin <danglin@gcc.gnu.org>
7214 * config/pa/pa.md (UNSPEC_MEMORY_BARRIER): New unspec enum.
7215 Update comment for atomic instructions.
7216 (atomic_storeqi, atomic_storehi, atomic_storesi, atomic_storesf,
7217 atomic_loaddf, atomic_loaddf_1, atomic_storedf, atomic_storedf_1):
7219 (atomic_loaddi): Revise fence expansion to only emit fence prior to
7220 load for __ATOMIC_SEQ_CST model.
7221 (atomic_loaddi_1): Remove float register target.
7222 (atomic_storedi): Handle CONST_INT values.
7223 (atomic_storedi_1): Remove float register source. Add special case
7225 (memory_barrier): New expander and insn.
7227 2018-08-11 Jakub Jelinek <jakub@redhat.com>
7229 PR tree-optimization/86835
7230 * tree-ssa-math-opts.c (insert_reciprocals): Even when inserting
7231 new_stmt after def_gsi, make sure to insert new_square_stmt after
7232 that stmt, not 2 stmts before it.
7234 2018-08-10 Alexander Monakov <amonakov@ispras.ru>
7237 * config/i386/i386.md (<s>mul<mode>3_highpart): Use DWIH mode iterator
7240 2018-08-10 Martin Liska <mliska@suse.cz>
7243 * builtin-types.def (BT_FN_LONG_LONG_LONG_DOUBLE): Add new
7245 * builtins.c (expand_builtin_expect_with_probability):
7247 (expand_builtin_expect_with_probability): New function.
7248 (build_builtin_expect_predicate): Add new argumnet probability
7249 for BUILT_IN_EXPECT_WITH_PROBABILITY.
7250 (fold_builtin_expect):
7253 * builtins.def (BUILT_IN_EXPECT_WITH_PROBABILITY):
7254 * builtins.h (fold_builtin_expect): Set new argument.
7255 * doc/extend.texi: Document __builtin_expect_with_probability.
7256 * doc/invoke.texi: Likewise.
7257 * gimple-fold.c (gimple_fold_call): Pass new argument.
7258 * ipa-fnsummary.c (find_foldable_builtin_expect): Handle
7259 also BUILT_IN_EXPECT_WITH_PROBABILITY.
7260 * predict.c (get_predictor_value): New function.
7261 (expr_expected_value): Add new argument probability. Assume
7262 that predictor and probability are always non-null.
7263 (expr_expected_value_1): Likewise. For __builtin_expect and
7264 __builtin_expect_with_probability set probability. Handle
7265 combination in binary expressions.
7266 (tree_predict_by_opcode): Simplify code by simply calling
7267 get_predictor_value.
7268 (pass_strip_predict_hints::execute): Add handling of
7269 BUILT_IN_EXPECT_WITH_PROBABILITY.
7270 * predict.def (PRED_BUILTIN_EXPECT_WITH_PROBABILITY): Add
7272 * tree.h (DECL_BUILT_IN_P): New function.
7274 2018-08-10 Martin Liska <mliska@suse.cz>
7276 PR tree-optimization/85799
7277 * passes.def: Add argument for pass_strip_predict_hints.
7278 * predict.c (class pass_strip_predict_hints): Add new argument
7280 (strip_predictor_early): New function.
7281 (pass_strip_predict_hints::execute): Call the function to
7283 (strip_predict_hints): New function.
7284 * predict.def: Fix comment.
7286 2018-08-10 Thomas Preud'homme <thomas.preudhomme@linaro.org>
7288 * Makefile.in: Clarify which tm.texi to copy over to assert the
7289 right to grant a GFDL license for all.
7291 2018-08-09 Jeff Law <law@redhat.com>
7293 * config/m68k/m68k.c (m68k_adjust_decorated_operand): Remove
7296 2018-08-09 Andreas Schwab <schwab@linux-m68k.org>
7298 * config/m68k/m68k-protos.h (m68k_final_prescan_insn): Remove
7301 2018-08-09 Richard Sandiford <richard.sandiford@arm.com>
7303 * tree-vect-loop.c (vectorizable_reduction): Allow inner-loop
7304 reductions for variable-length vectors.
7306 2018-08-09 David Malcolm <dmalcolm@redhat.com>
7309 * common.opt (fdiagnostics-show-line-numbers): New option.
7310 * diagnostic-show-locus.c (class layout): Add fields
7311 "m_show_line_numbers_p" and "m_linenum_width";
7312 (num_digits): New function.
7313 (test_num_digits): New function.
7314 (layout::layout): Initialize new fields. Update m_x_offset
7315 logic to handle any left margin.
7316 (layout::print_source_line): Print line number when requested.
7317 (layout::start_annotation_line): New member function.
7318 (layout::print_annotation_line): Call it.
7319 (layout::print_leading_fixits): Likewise.
7320 (layout::print_trailing_fixits): Likewise. Update calls to
7321 move_to_column for new parameter.
7322 (layout::get_x_bound_for_row): Add "add_left_margin" param and use
7323 it to potentially call start_annotation_line.
7324 (layout::show_ruler): Call start_annotation_line.
7325 (selftest::test_line_numbers_multiline_range): New selftest.
7326 (selftest::diagnostic_show_locus_c_tests): Call test_num_digits
7327 and selftest::test_line_numbers_multiline_range.
7328 * diagnostic.c (diagnostic_initialize): Initialize
7329 show_line_numbers_p.
7330 * diagnostic.h (struct diagnostic_context): Add field
7331 "show_line_numbers_p".
7332 * doc/invoke.texi (Diagnostic Message Formatting Options): Add
7333 -fno-diagnostics-show-line-numbers.
7334 * dwarf2out.c (gen_producer_string): Add
7335 OPT_fdiagnostics_show_line_numbers to the ignored options.
7336 * lto-wrapper.c (merge_and_complain): Likewise to the "pick
7337 one setting" options.
7338 (append_compiler_options): Likewise to the dropped options.
7339 (append_diag_options): Likewise to the passed-on options.
7340 * opts.c (common_handle_option): Handle the new option.
7341 * toplev.c (general_init): Set up global_dc->show_line_numbers_p.
7343 2018-08-09 Kelvin Nilsen <kelvin@gcc.gnu.org>
7345 * doc/extend.texi (PowerPC AltiVec Built-in Functions Available on
7346 ISA 2.07): Correct spelling of bcdsub to be __builtin_bcdsub. Add
7347 third argument of type "const signed char" to descriptions of
7348 __builtin_bcdadd, __builtin_bcdadd_lt, __builtin_bcdadd_eq,
7349 __builtin_bcdadd_gt, __builtin_bcdadd_ov, __builtin_bcdsub,
7350 __builtin_bcdsub_lt, __builtin_bcdsub_eq, __builtin_bcdsub_gt,
7351 __builtin_bcdsub_ov functions.
7353 2018-08-09 Richard Sandiford <richard.sandiford@arm.com>
7355 PR tree-optimization/86858
7356 * tree-vect-loop.c (vect_is_simple_reduction): Restore
7357 flow_bb_inside_loop_p calls.
7359 2018-08-09 Richard Sandiford <richard.sandiford@arm.com>
7361 PR tree-optimization/86871
7362 * tree-vect-stmts.c (vect_transform_stmt): Use gimple_get_lhs
7363 instead of gimple_assign_lhs.
7365 2018-08-09 Richard Earnshaw <rearnsha@arm.com>
7368 * config/aarch64/aarch64.md (add<mode>3_carryinC_zero): Add missing
7369 register constraint to operand 0.
7370 (add<mode>3_carryinC): Likewise.
7371 (add<mode>3_carryinV_zero, add<mode>3_carryinV): Likewise.
7373 2018-08-09 Martin Liska <mliska@suse.cz>
7376 * common.opt: Remove extra line.
7378 2018-08-09 Martin Liska <mliska@suse.cz>
7380 * params.def (PARAM_ALIGN_LOOP_ITERATIONS): Remove double dots
7381 at the end of a line, make first letter capital and end up
7382 a sentence with a dot.
7383 (PARAM_LOOP_INTERCHANGE_STRIDE_RATIO): Likewise.
7384 (PARAM_LOOP_BLOCK_TILE_SIZE): Likewise.
7385 (PARAM_GRAPHITE_MAX_NB_SCOP_PARAMS): Likewise.
7386 (PARAM_GRAPHITE_MAX_ARRAYS_PER_SCOP): Likewise.
7387 (PARAM_MAX_ISL_OPERATIONS): Likewise.
7388 (PARAM_GRAPHITE_ALLOW_CODEGEN_ERRORS): Likewise.
7389 (PARAM_PROFILE_FUNC_INTERNAL_ID): Likewise.
7390 (PARAM_INDIR_CALL_TOPN_PROFILE): Likewise.
7391 (PARAM_SLP_MAX_INSNS_IN_BB): Likewise.
7392 (PARAM_IPA_CP_EVAL_THRESHOLD): Likewise.
7393 (PARAM_IPA_CP_RECURSION_PENALTY): Likewise.
7394 (PARAM_IPA_CP_SINGLE_CALL_PENALTY): Likewise.
7395 (PARAM_IPA_CP_LOOP_HINT_BONUS): Likewise.
7396 (PARAM_IPA_CP_ARRAY_INDEX_HINT_BONUS): Likewise.
7397 (PARAM_TREE_REASSOC_WIDTH): Likewise.
7398 (PARAM_HSA_GEN_DEBUG_STORES): Likewise.
7399 (PARAM_MAX_SPECULATIVE_DEVIRT_MAYDEFS): Likewise.
7400 (PARAM_MAX_VRP_SWITCH_ASSERTIONS): Likewise.
7402 2018-08-09 Andreas Krebbel <krebbel@linux.ibm.com>
7405 * config/s390/s390.c (s390_option_override_internal): Reduce the
7406 stack-clash-protection-probe-interval param if it would be too big
7409 2018-08-08 Andreas Schwab <schwab@linux-m68k.org>
7412 * config/m68k/m68k.h (FINAL_PRESCAN_INSN): Don't define.
7413 * config/m68k/m68k.c (handle_move_double): Don't call
7414 m68k_final_prescan_insn.
7415 (m68k_adjust_decorated_operand): Renamed from
7416 m68k_final_prescan_insn, remove first and third operand and
7418 (print_operand): Call it.
7419 (print_operand_address): Call it.
7421 2018-08-08 Nathan Sidwell <nathan@acm.org>
7423 * diagnostic.c (diagnostic_report_current_module): Use
7424 linemap_included_from & linemap_included_from_linemap.
7426 2018-08-08 Hongbo Zhang <hongbo.zhang@linaro.org>
7428 * config/aarch64/aarch64-cores.def: Add phecda core.
7429 * config/aarch64/aarch64-tune.md: Regenerate.
7430 * doc/invoke.texi: Add phecda core.
7432 2018-08-08 Andreas Krebbel <krebbel@linux.ibm.com>
7435 * config/s390/constraints.md ("NxHD0", "NxSD0"): New constraint
7437 * config/s390/s390.md ("movti"): Add more alternatives for
7438 constant to GPR copies.
7440 2018-08-08 Andreas Krebbel <krebbel@linux.ibm.com>
7442 * config/s390/s390.c: Fix whitespace damage throughout the file.
7443 * config/s390/s390.h: Likewise.
7444 * config/s390/tpf.h: Likewise.
7446 2018-08-08 Ilya Leoshkevich <iii@linux.ibm.com>
7448 * config/s390/s390.c (s390_loadrelative_operand_p):
7449 Remove TARGET_CPU_ZARCH usages.
7450 (s390_rtx_costs): Likewise.
7451 (s390_legitimate_constant_p): Likewise.
7452 (s390_cannot_force_const_mem): Likewise.
7453 (legitimate_reload_constant_p): Likewise.
7454 (s390_preferred_reload_class): Likewise.
7455 (legitimize_pic_address): Likewise.
7456 (legitimize_tls_address): Likewise.
7457 (s390_split_branches): Removed.
7458 (s390_add_execute): Removed.
7459 (s390_dump_pool): Remove TARGET_CPU_ZARCH usages.
7460 (s390_mainpool_start): Likewise.
7461 (s390_mainpool_finish): Likewise.
7462 (s390_mainpool_cancel): Removed.
7463 (s390_chunkify_start): Remove TARGET_CPU_ZARCH usages.
7464 (s390_chunkify_cancel): Likewise.
7465 (s390_return_addr_rtx): Likewise.
7466 (s390_register_info): Remove split_branches_pending_p uages.
7467 (s390_optimize_register_info): Likewise.
7468 (s390_init_frame_layout): Remove TARGET_CPU_ZARCH and
7469 split_branches_pending_p usages.
7470 (s390_can_eliminate): Remove TARGET_CPU_ZARCH usages.
7471 (s390_load_got): Likewise.
7472 (s390_expand_split_stack_prologue): Likewise.
7473 (output_asm_nops): Likewise.
7474 (s390_function_profiler): Likewise.
7475 (s390_emit_call): Likewise.
7476 (s390_conditional_register_usage): Likewise.
7477 (s390_optimize_prologue): Likewise.
7478 (s390_reorg): Remove TARGET_CPU_ZARCH and
7479 split_branches_pending_p usages.
7480 (s390_option_override_internal): Remove TARGET_CPU_ZARCH
7482 (s390_output_indirect_thunk_function): Likewise.
7483 * config/s390/s390.h (TARGET_CPU_ZARCH): Removed.
7484 (TARGET_CPU_ZARCH_P): Removed.
7485 (struct machine_function): Remove split_branches_pending_p.
7486 * config/s390/s390.md: Remove TARGET_CPU_ZARCH usages.
7488 2018-08-08 Ilya Leoshkevich <iii@linux.ibm.com>
7490 * common/config/s390/s390-common.c (processor_flags_table):
7492 * config.gcc: Remove with_arch/with_tune support.
7493 * config/s390/2064.md: Remove cpu attribute comparisons.
7494 * config/s390/driver-native.c (s390_host_detect_local_cpu):
7496 * config/s390/linux.h (ASM_SPEC):
7497 Remove -march support.
7498 * config/s390/s390-c.c (s390_cpu_cpp_builtins_internal):
7499 Use a table to get an arch level.
7500 * config/s390/s390-opts.h (enum processor_type):
7502 * config/s390/s390.c
7503 (processor_table): Remove entries, add arch_level values.
7504 (s390_issue_rate): Remove cases.
7505 (s390_option_override): Adjust
7506 s390_option_override_internal() call.
7507 (s390_option_override_internal): Remove deprecation warning.
7508 (s390_valid_target_attribute_tree): Adjust
7509 s390_option_override_internal() call.
7510 * config/s390/s390.h (struct s390_processor):
7511 Share with s390-c.c, add arch_level field.
7512 * config/s390/s390.md:
7513 Remove occurrences in cpu attribute.
7514 * config/s390/s390.opt: Remove -march/-mtune support.
7515 * config/s390/tpf.h (ASM_SPEC): Remove -march support.
7516 * doc/invoke.texi: Remove deprecation warning.
7518 2018-08-08 Luis Machado <luis.machado@linaro.org>
7520 * config/aarch64/aarch64.c (qdf24xx_vector_cost): New static
7522 (qdf24xx_tunings): Set vector cost structure to
7523 qdf24xx_vector_cost.
7525 * config/aarch64/aarch64.c (qdf24xx_addrcost_table)
7526 <register_sextend>: Set to 3.
7528 2018-08-07 Richard Sandiford <richard.sandiford@arm.com>
7531 * config/aarch64/iterators.md (FRECP, frecp_suffix): Delete.
7532 * config/aarch64/aarch64-simd.md
7533 (aarch64_frecp<FRECP:frecp_suffix><mode>): Fold FRECPE into...
7534 (@aarch64_frecpe<mode>): ...here and the move FRECPX to...
7535 (aarch64_frecpx<mode>): ...this new pattern.
7536 * config/aarch64/aarch64-simd-builtins.def: Remove comment
7537 about aarch64_frecp<FRECP:frecp_suffix><mode>.
7539 2018-08-07 Martin Liska <mliska@suse.cz>
7542 * predict.c (expr_expected_value_1): Handle DECL_IS_MALLOC,
7543 BUILT_IN_REALLOC and DECL_IS_OPERATOR_NEW.
7544 * predict.def (PRED_MALLOC_NONNULL): New predictor.
7545 * doc/extend.texi: Document that malloc attribute adds
7548 2018-08-06 John David Anglin <danglin@gcc.gnu.org>
7551 * config/pa/pa.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
7552 Define to speculation_safe_value_not_needed.
7554 2018-08-06 Jeff Law <law@redhat.com>
7556 * tree-ssa-dom.c (dom_opt_dom_walker::optimize_stmt): Pass down
7557 the vr_values instance to cprop_into_stmt.
7558 (cprop_into_stmt): Pass vr_values instance down to cprop_operand.
7559 (cprop_operand): Also query EVRP to determine if OP is a constant.
7561 2018-08-06 Nathan Sidwell <nathan@acm.org>
7563 * diagnostic.c (diagnostic_report_current_module): Reroll
7564 included-at loop. Translate text.
7566 2018-08-06 David Malcolm <dmalcolm@redhat.com>
7568 * function-tests.c (selftest::test_expansion_to_rtl): Call
7569 free_after_compilation.
7571 2018-08-06 Alan Hayward <alan.hayward@arm.com>
7573 * config/aarch64/aarch64.md: Add clobber highs to tls_desc.
7575 2018-08-06 Andreas Krebbel <krebbel@linux.ibm.com>
7577 * config/s390/s390.c (s390_loop_unroll_adjust): Prevent small
7578 loops with memory block operations from getting unrolled.
7580 2018-08-06 Ulrich Weigand <uweigand@de.ibm.com>
7583 * config/spu/spu.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
7584 Define to speculation_safe_value_not_needed.
7586 2018-08-06 Jeff Law <law@redhat.com>
7588 * reload1.c (forget_old_reloads_1): Adjust CLOBBER_HIGH
7591 2018-08-06 Jozef Lawrynowicz <jozef.l@mittosystems.com>
7594 * gcc/tree.c (build_common_tree_nodes): Initialize integer_types array
7595 with all enabled __intN types.
7597 * gcc/testsuite/gcc.target/msp430/pr86662.c: New test.
7599 2018-08-06 Alan Hayward <alan.hayward@arm.com>
7601 * alias.c (record_set): Check for clobber high.
7602 * cfgexpand.c (expand_gimple_stmt): Likewise.
7603 * combine-stack-adj.c (single_set_for_csa): Likewise.
7604 * combine.c (find_single_use_1): Likewise.
7605 (set_nonzero_bits_and_sign_copies): Likewise.
7606 (get_combine_src_dest): Likewise.
7607 (is_parallel_of_n_reg_sets): Likewise.
7608 (try_combine): Likewise.
7609 (record_dead_and_set_regs_1): Likewise.
7610 (reg_dead_at_p_1): Likewise.
7611 (reg_dead_at_p): Likewise.
7612 * dce.c (deletable_insn_p): Likewise.
7613 (mark_nonreg_stores_1): Likewise.
7614 (mark_nonreg_stores_2): Likewise.
7615 * df-scan.c (df_find_hard_reg_defs): Likewise.
7616 (df_uses_record): Likewise.
7617 (df_get_call_refs): Likewise.
7618 * dwarf2out.c (mem_loc_descriptor): Likewise.
7619 * haifa-sched.c (haifa_classify_rtx): Likewise.
7620 * ira-build.c (create_insn_allocnos): Likewise.
7621 * ira-costs.c (scan_one_insn): Likewise.
7622 * ira.c (equiv_init_movable_p): Likewise.
7623 (rtx_moveable_p): Likewise.
7624 (interesting_dest_for_shprep): Likewise.
7625 * jump.c (mark_jump_label_1): Likewise.
7626 * postreload-gcse.c (record_opr_changes): Likewise.
7627 * postreload.c (reload_cse_simplify): Likewise.
7628 (struct reg_use): Add source expr.
7629 (reload_combine): Check for clobber high.
7630 (reload_combine_note_use): Likewise.
7631 (reload_cse_move2add): Likewise.
7632 (move2add_note_store): Likewise.
7633 * print-rtl.c (print_pattern): Likewise.
7634 * recog.c (decode_asm_operands): Likewise.
7635 (store_data_bypass_p): Likewise.
7636 (if_test_bypass_p): Likewise.
7637 * regcprop.c (kill_clobbered_value): Likewise.
7638 (kill_set_value): Likewise.
7639 * reginfo.c (reg_scan_mark_refs): Likewise.
7640 * reload1.c (maybe_fix_stack_asms): Likewise.
7641 (eliminate_regs_1): Likewise.
7642 (elimination_effects): Likewise.
7643 (mark_not_eliminable): Likewise.
7644 (scan_paradoxical_subregs): Likewise.
7645 (forget_old_reloads_1): Likewise.
7646 * reorg.c (find_end_label): Likewise.
7647 (try_merge_delay_insns): Likewise.
7648 (redundant_insn): Likewise.
7649 (own_thread_p): Likewise.
7650 (fill_simple_delay_slots): Likewise.
7651 (fill_slots_from_thread): Likewise.
7652 (dbr_schedule): Likewise.
7653 * resource.c (update_live_status): Likewise.
7654 (mark_referenced_resources): Likewise.
7655 (mark_set_resources): Likewise.
7656 * rtl.c (copy_rtx): Likewise.
7657 * rtlanal.c (reg_referenced_p): Likewise.
7658 (single_set_2): Likewise.
7659 (noop_move_p): Likewise.
7660 (note_stores): Likewise.
7661 * sched-deps.c (sched_analyze_reg): Likewise.
7662 (sched_analyze_insn): Likewise.
7664 2018-08-06 Alan Hayward <alan.hayward@arm.com>
7666 * cse.c (invalidate_reg): New function extracted from...
7667 (invalidate): ...here.
7668 (canonicalize_insn): Check for clobber high.
7669 (invalidate_from_clobbers): invalidate clobber highs.
7670 (invalidate_from_sets_and_clobbers): Likewise.
7671 (count_reg_usage): Check for clobber high.
7672 (insn_live_p): Likewise.
7673 * cselib.c (cselib_expand_value_rtx_1):Likewise.
7674 (cselib_invalidate_regno): Check for clobber in setter.
7675 (cselib_invalidate_rtx): Pass through setter.
7676 (cselib_invalidate_rtx_note_stores):
7677 (cselib_process_insn): Check for clobber high.
7678 * cselib.h (cselib_invalidate_rtx): Add operand.
7680 2018-08-06 Alan Hayward <alan.hayward@arm.com>
7682 * lra-eliminations.c (lra_eliminate_regs_1): Check for clobber high.
7683 (mark_not_eliminable): Likewise.
7684 * lra-int.h (struct lra_insn_reg): Add clobber high marker.
7685 * lra-lives.c (process_bb_lives): Check for clobber high.
7686 * lra.c (new_insn_reg): Remember clobber highs.
7687 (collect_non_operand_hard_regs): Check for clobber high.
7688 (lra_set_insn_recog_data): Likewise.
7689 (add_regs_to_insn_regno_info): Likewise.
7690 (lra_update_insn_regno_info): Likewise.
7692 2018-08-06 Alan Hayward <alan.hayward@arm.com>
7694 * rtl.h (reg_is_clobbered_by_clobber_high): Add declarations.
7695 * rtlanal.c (reg_is_clobbered_by_clobber_high): Add function.
7697 2018-08-06 Alan Hayward <alan.hayward@arm.com>
7699 * emit-rtl.c (verify_rtx_sharing): Check for CLOBBER_HIGH.
7700 (copy_insn_1): Likewise.
7701 (gen_hard_reg_clobber_high): New gen function.
7702 * genconfig.c (walk_insn_part): Check for CLOBBER_HIGH.
7703 * genemit.c (gen_exp): Likewise.
7704 (gen_emit_seq): Pass through info.
7705 (gen_insn): Check for CLOBBER_HIGH.
7706 (gen_expand): Pass through info.
7707 (gen_split): Likewise.
7708 (output_add_clobbers): Likewise.
7709 * genrecog.c (validate_pattern): Check for CLOBBER_HIGH.
7710 (remove_clobbers): Likewise.
7711 * rtl.h (gen_hard_reg_clobber_high): New declaration.
7713 2018-08-06 Alan Hayward <alan.hayward@arm.com>
7715 * doc/rtl.texi (clobber_high): Add.
7716 (parallel): Add in clobber high
7717 * rtl.c (rtl_check_failed_code3): Add function.
7718 * rtl.def (CLOBBER_HIGH): Add expression.
7719 * rtl.h (RTL_CHECKC3): Add macro.
7720 (rtl_check_failed_code3): Add declaration.
7721 (XC3EXP): Add macro.
7723 2018-08-05 H.J. Lu <hongjiu.lu@intel.com>
7726 * config/i386/i386.c (ix86_finalize_stack_frame_flags): Set
7727 cfun->machine->max_used_stack_alignment if needed.
7729 2018-08-04 Martin Sebor <msebor@redhat.com>
7731 PR tree-optimization/86571
7732 * gimple-ssa-sprintf.c (format_floating): Extend upper bound of
7735 2018-08-03 Sandra Loosemore <sandra@codesourcery.com>
7738 * config/nios2/nios2.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
7741 2018-08-03 Jeff Law <law@redhat.com>
7744 * config/mn10300/mn10300.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
7745 Define to speculation_safe_value_not_needed.
7747 2018-08-03 David Malcolm <dmalcolm@redhat.com>
7749 * doc/gcov.texi (-x): Remove duplicate "to".
7750 * doc/invoke.texi (-Wnoexcept-type): Remove duplicate "calls".
7751 (-Wif-not-aligned): Remove duplicate "is".
7752 (-flto): Remove duplicate "the".
7753 (MicroBlaze Options): In examples of "-mcpu=cpu-type", remove
7754 duplicate "v5.00.b".
7755 (MSP430 Options): Remove duplicate "and" from the description
7756 of "-mgprel-sec=regexp".
7757 (x86 Options): Remove duplicate copies of "vmldLog102" and
7758 vmlsLog104 from description of "-mveclibabi=type".
7760 2018-08-03 Richard Sandiford <richard.sandiford@arm.com>
7762 * internal-fn.h (first_commutative_argument): Declare.
7763 * internal-fn.c (first_commutative_argument): New function.
7764 * tree-vect-slp.c (vect_get_and_check_slp_defs): Remove extra
7765 restrictions for pattern statements. Use first_commutative_argument
7766 to look for commutative operands in calls to internal functions.
7768 2018-08-03 Aldy Hernandez <aldyh@redhat.com>
7770 * Makefile.in (wide-int-range.o): New.
7771 * tree-vrp.c: Move all the wide_int_* functions to...
7772 * wide-int-range.cc: ...here.
7773 * tree-vrp.h: Move all the wide_int_* prototypes to...
7774 * wide-int-range.h: ...here.
7776 2018-08-03 Tom de Vries <tdevries@suse.de>
7778 * common/config/nvptx/nvptx-common.c (nvptx_except_unwind_info): Return
7780 * config/nvptx/nvptx.c (TARGET_ASM_BYTE_OP): Remove define.
7781 * except.c (output_function_exception_table): Do early exit if
7782 targetm_common.except_unwind_info (&global_options) == UI_NONE.
7784 2018-08-03 Martin Liska <mliska@suse.cz>
7786 * predict.c (dump_prediction): Change to 2 digits
7789 2018-08-03 Siddhesh Poyarekar <siddhesh@sourceware.org>
7791 * config/aarch64/falkor.md (falkor_am_1_vxvy_vxvy): Move
7793 (falkor_am_1_gtov_gtov): ... a new insn reservation.
7795 2018-07-19 Ilya Leoshkevich <iii@linux.ibm.com>
7797 * config/nds32/nds32.c (nds32_hard_regno_mode_ok): Replace > with >=.
7798 * df-problems.c (df_remove_dead_eq_notes): Replace > with >=.
7799 * dwarf2out.c (mem_loc_descriptor): Replace > with >=.
7800 * lra-constraints.c (spill_hard_reg_in_range): Replace <= with <.
7801 * lra-remat.c (call_used_input_regno_present_p): Replace <= with <.
7803 2018-08-02 David Malcolm <dmalcolm@redhat.com>
7805 * diagnostic-show-locus.c (diagnostic_show_locus): Use
7806 pp_take_prefix when saving the existing prefix.
7807 * diagnostic.c (diagnostic_append_note): Likewise.
7808 * langhooks.c (lhd_print_error_function): Likewise.
7809 * pretty-print.c (pp_set_prefix): Drop the "const" from "prefix"
7810 param's type. Free the existing prefix.
7811 (pp_take_prefix): New function.
7812 (pretty_printer::pretty_printer): Drop the prefix parameter.
7813 Rename the length parameter to match the comment.
7814 (pretty_printer::~pretty_printer): Free the prefix.
7815 * pretty-print.h (pretty_printer::pretty_printer): Drop the prefix
7817 (struct pretty_printer): Drop the "const" from "prefix" field's
7818 type and clarify memory management.
7819 (pp_set_prefix): Drop the "const" from the 2nd param.
7820 (pp_take_prefix): New decl.
7822 2018-08-02 Aaron Sawdey <acsawdey@linux.ibm.com>
7824 * config/rs6000/rs6000-string.c (select_block_compare_mode): Move test
7825 for word_mode_ok here instead of passing as argument.
7826 (expand_block_compare): Change select_block_compare_mode() call.
7827 (expand_strncmp_gpr_sequence): New function.
7828 (expand_strn_compare): Make use of expand_strncmp_gpr_sequence.
7830 2018-08-02 Jeff Law <law@redhat.com>
7833 * config/m68k/m68k.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
7834 Define to speculation_safe_value_not_needed.
7837 * config/h8300/h8300.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
7838 Define to speculation_safe_value_not_needed.
7840 2018-08-02 Tom de Vries <tdevries@suse.de>
7843 * common/config/nvptx/nvptx-common.c (nvptx_except_unwind_info): New
7844 function. Return UI_TARGET unconditionally.
7845 (TARGET_EXCEPT_UNWIND_INFO): Redefine to nvptx_except_unwind_info.
7846 * config/nvptx/nvptx.c (TARGET_ASM_BYTE_OP): Emit commented out '.byte'.
7848 2018-08-02 Richard Sandiford <richard.sandiford@arm.com>
7850 * genemit.c (print_overload_test): Fix typo.
7852 2018-08-02 Richard Biener <rguenther@suse.de>
7854 PR tree-optimization/86816
7855 * tree-ssa-tail-merge.c (tail_merge_valueize): New function
7856 which checks for value availability before querying it.
7857 (gvn_uses_equal): Use it.
7858 (same_succ_hash): Likewise.
7859 (gimple_equal_p): Likewise.
7861 2018-08-02 Nick Clifton <nickc@redhat.com>
7864 * config/stormy16/stormy16.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
7865 Define to speculation_safe_value_not_needed.
7868 * config/v850/v850.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
7869 Define to speculation_safe_value_not_needed.
7872 * config/v850/v850.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
7873 Define to speculation_safe_value_not_needed.
7876 * config/rx/rx.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
7877 Define to speculation_safe_value_not_needed.
7880 * config/msp430/msp430.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
7881 Define to speculation_safe_value_not_needed.
7884 * config/mcore/mcore.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
7885 Define to speculation_safe_value_not_needed.
7888 * config/m32r/m32r.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
7889 Define to speculation_safe_value_not_needed.
7892 * config/iq2000/iq2000.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
7893 Define to speculation_safe_value_not_needed.
7896 * config/frv/frv.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define to
7897 speculation_safe_value_not_needed.
7900 * config/fr30/fr30.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define
7901 to speculation_safe_value_not_needed.
7903 2018-08-02 Richard Sandiford <richard.sandiford@arm.com>
7905 * doc/md.texi: Expand the documentation of instruction names
7906 to mention port-local uses. Document '@' in pattern names.
7907 * read-md.h (overloaded_instance, overloaded_name): New structs.
7909 (md_reader::handle_overloaded_name): New member function.
7910 (md_reader::get_overloads): Likewise.
7911 (md_reader::m_first_overload): New member variable.
7912 (md_reader::m_next_overload_ptr): Likewise.
7913 (md_reader::m_overloads_htab): Likewise.
7914 * read-md.c (md_reader::md_reader): Initialize m_first_overload,
7915 m_next_overload_ptr and m_overloads_htab.
7916 * read-rtl.c (iterator_group): Add "type" and "get_c_token" fields.
7917 (get_mode_token, get_code_token, get_int_token): New functions.
7918 (map_attr_string): Add an optional argument that passes back
7919 the associated iterator.
7920 (overloaded_name_hash, overloaded_name_eq_p, named_rtx_p):
7921 (md_reader::handle_overloaded_name, add_overload_instance): New
7923 (apply_iterators): Handle '@' names. Report an error if '@'
7924 is used without iterators.
7925 (initialize_iterators): Initialize the new iterator_group fields.
7926 * genopinit.c (handle_overloaded_code_for)
7927 (handle_overloaded_gen): New functions.
7928 (main): Use them to print declarations of maybe_code_for_* and
7929 maybe_gen_* functions, and inline definitions of code_for_* and gen_*.
7930 * genemit.c (print_overload_arguments, print_overload_test)
7931 (handle_overloaded_code_for, handle_overloaded_gen): New functions.
7932 (main): Use it to print definitions of maybe_code_for_* and
7933 maybe_gen_* functions.
7934 * config/aarch64/aarch64.c (aarch64_split_128bit_move): Use
7935 gen_aarch64_mov{low,high}_di and gen_aarch64_movdi_{low,high}
7936 instead of explicit mode checks.
7937 (aarch64_split_simd_combine): Likewise gen_aarch64_simd_combine.
7938 (aarch64_split_simd_move): Likewise gen_aarch64_split_simd_mov.
7939 (aarch64_emit_load_exclusive): Likewise gen_aarch64_load_exclusive.
7940 (aarch64_emit_store_exclusive): Likewise gen_aarch64_store_exclusive.
7941 (aarch64_expand_compare_and_swap): Likewise
7942 gen_aarch64_compare_and_swap and gen_aarch64_compare_and_swap_lse
7943 (aarch64_gen_atomic_cas): Likewise gen_aarch64_atomic_cas.
7944 (aarch64_emit_atomic_swap): Likewise gen_aarch64_atomic_swp.
7945 (aarch64_constant_pool_reload_icode): Delete.
7946 (aarch64_secondary_reload): Use code_for_aarch64_reload_movcp
7947 instead of aarch64_constant_pool_reload_icode. Use
7948 code_for_aarch64_reload_mov instead of explicit mode checks.
7949 (rsqrte_type, get_rsqrte_type, rsqrts_type, get_rsqrts_type): Delete.
7950 (aarch64_emit_approx_sqrt): Use gen_aarch64_rsqrte instead of
7951 get_rsqrte_type and gen_aarch64_rsqrts instead of gen_rqrts_type.
7952 (recpe_type, get_recpe_type, recps_type, get_recps_type): Delete.
7953 (aarch64_emit_approx_div): Use gen_aarch64_frecpe instead of
7954 get_recpe_type and gen_aarch64_frecps instead of get_recps_type.
7955 (aarch64_atomic_load_op_code): Delete.
7956 (aarch64_emit_atomic_load_op): Likewise.
7957 (aarch64_gen_atomic_ldop): Use UNSPECV_ATOMIC_* instead of
7958 aarch64_atomic_load_op_code. Use gen_aarch64_atomic_load
7959 instead of aarch64_emit_atomic_load_op.
7960 * config/aarch64/aarch64.md (aarch64_reload_movcp<GPF_TF:mode><P:mode>)
7961 (aarch64_reload_movcp<VALL:mode><P:mode>, aarch64_reload_mov<mode>)
7962 (aarch64_movdi_<mode>low, aarch64_movdi_<mode>high)
7963 (aarch64_mov<mode>high_di, aarch64_mov<mode>low_di): Add a '@'
7964 character before the pattern name.
7965 * config/aarch64/aarch64-simd.md (aarch64_split_simd_mov<mode>)
7966 (aarch64_rsqrte<mode>, aarch64_rsqrts<mode>)
7967 (aarch64_simd_combine<mode>, aarch64_frecpe<mode>)
7968 (aarch64_frecps<mode>): Likewise.
7969 * config/aarch64/atomics.md (atomic_compare_and_swap<mode>)
7970 (aarch64_compare_and_swap<mode>, aarch64_compare_and_swap<mode>_lse)
7971 (aarch64_load_exclusive<mode>, aarch64_store_exclusive<mode>)
7972 (aarch64_atomic_swp<mode>, aarch64_atomic_cas<mode>)
7973 (aarch64_atomic_load<atomic_ldop><mode>): Likewise.
7975 2018-08-02 Richard Sandiford <richard.sandiford@arm.com>
7977 * config/aarch64/aarch64.c (aarch64_float_const_representable_p):
7978 Allow HFmode constants if TARGET_FP_F16INST.
7980 2018-08-02 Jackson Woodruff <jackson.woodruff@arm.com>
7983 * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp):
7984 No longer check last store for clobber of address register.
7986 2018-08-02 Martin Liska <mliska@suse.cz>
7988 PR gcov-profile/86817
7989 * gcov.c (process_all_functions): New function.
7991 (process_file): Move functions processing to
7992 process_all_functions.
7994 2018-08-02 David Malcolm <dmalcolm@redhat.com>
7996 * dumpfile.c (dump_user_location_t::dump_user_location_t): Add
7997 "const" to the "gimple *" and "rtx_insn *" parameters.
7998 * dumpfile.h (dump_user_location_t::dump_user_location_t):
8000 (dump_location_t::dump_location_t): Likewise.
8002 2018-08-01 Martin Sebor <msebor@redhat.com>
8004 PR tree-optimization/86650
8005 * gimple-pretty-print.c (percent_G_format): Accept a "gimple *"
8006 rather than a "gcall *". Directly pass the data of interest
8007 to percent_K_format, rather than building a temporary CALL_EXPR
8009 * gimple-fold.c (gimple_fold_builtin_strncpy): Adjust.
8010 (gimple_fold_builtin_strncat): Adjust.
8011 * gimple-ssa-warn-restrict.h (check_bounds_or_overlap): Replace
8012 gcall* argument with gimple*.
8013 * gimple-ssa-warn-restrict.c (check_call): Same.
8014 (wrestrict_dom_walker::before_dom_children): Same.
8015 (builtin_access::builtin_access): Same.
8016 (check_bounds_or_overlap): Same
8017 (maybe_diag_overlap): Same.
8018 (maybe_diag_offset_bounds): Same.
8019 * tree-diagnostic.c (default_tree_printer): Move usage of
8020 EXPR_LOCATION (t) and TREE_BLOCK (t) from within percent_K_format
8022 * tree-pretty-print.c (percent_K_format): Add argument.
8023 * tree-pretty-print.h: Add argument.
8024 * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Adjust.
8025 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Adjust.
8026 (maybe_diag_stxncpy_trunc): Same.
8027 (handle_builtin_stxncpy): Same.
8028 (handle_builtin_strcat): Same.
8030 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
8032 * match.pd: Optimise pointer range checks.
8034 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
8036 PR tree-optimization/86758
8037 * tree-vect-stmts.c (vectorizable_simd_clone_call): Don't try
8038 to remove pattern statements.
8040 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
8042 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Use the
8043 result of dfs_enumerate_from when constructing stmt_vec_infos,
8044 instead of additionally calling get_loop_body.
8046 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
8048 * tree-vectorizer.h (vect_create_data_ref_ptr): Remove inv_p
8050 * tree-vect-data-refs.c (vect_create_data_ref_ptr): Likewise.
8051 When creating an iv, assert that the step is not known to be zero.
8052 (vect_setup_realignment): Update call accordingly.
8053 * tree-vect-stmts.c (vectorizable_store): Likewise.
8054 (vectorizable_load): Likewise. Handle VMAT_INVARIANT separately.
8056 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
8058 * tree-vectorizer.h (vect_stmt_to_vectorize): New function.
8059 * tree-vect-loop.c (vect_update_vf_for_slp): Use it.
8060 (vectorizable_reduction): Likewise.
8061 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
8062 (vect_detect_hybrid_slp_stmts): Likewise.
8063 * tree-vect-stmts.c (vect_is_simple_use): Likewise.
8065 2018-08-01 Aldy Hernandez <aldyh@redhat.com>
8067 * tree-vrp (zero_nonzero_bits_from_bounds): Rename to...
8068 (wide_int_set_zero_nonzero_bits): ...this.
8069 (zero_nonzero_bits_from_vr): Rename to...
8070 (vrp_set_zero_nonzero_bits): ...this.
8071 (extract_range_from_multiplicative_op_1): Abstract wide int
8073 (wide_int_range_multiplicative_op): ...here.
8074 (extract_range_from_binary_expr_1): Extract wide int binary
8075 operations into their own functions.
8076 (wide_int_range_lshift): New.
8077 (wide_int_range_can_optimize_bit_op): New.
8078 (wide_int_range_shift_undefined_p): New.
8079 (wide_int_range_bit_xor): New.
8080 (wide_int_range_bit_ior): New.
8081 (wide_int_range_bit_and): New.
8082 (wide_int_range_trunc_mod): New.
8083 (extract_range_into_wide_ints): New.
8084 (vrp_shift_undefined_p): New.
8085 (extract_range_from_multiplicative_op): New.
8086 (vrp_can_optimize_bit_op): New.
8087 * tree-vrp.h (value_range::dump): New.
8088 (wide_int_range_multiplicative_op): New.
8089 (wide_int_range_lshift):New.
8090 (wide_int_range_shift_undefined_p): New.
8091 (wide_int_range_bit_xor): New.
8092 (wide_int_range_bit_ior): New.
8093 (wide_int_range_bit_and): New.
8094 (wide_int_range_trunc_mod): New.
8095 (zero_nonzero_bits_from_bounds): Rename to...
8096 (wide_int_set_zero_nonzero_bits): ...this.
8097 (zero_nonzero_bits_from_vr): Rename to...
8098 (vrp_set_zero_nonzero_bits): ...this.
8099 (range_easy_mask_min_max): Rename to...
8100 (wide_int_range_can_optimize_bit_op): this.
8101 * vr-values.c (simplify_bit_ops_using_ranges): Rename
8102 zero_nonzero_bits_from_vr into vrp_set_zero_nonzero_bits.
8104 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
8106 * tree-vectorizer.h (vect_orig_stmt): New function.
8107 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Use it.
8108 * tree-vect-loop.c (vect_model_reduction_cost): Likewise.
8109 (vect_create_epilog_for_reduction): Likewise.
8110 (vectorizable_live_operation): Likewise.
8111 * tree-vect-slp.c (vect_find_last_scalar_stmt_in_slp): Likewise.
8112 (vect_detect_hybrid_slp_stmts, vect_schedule_slp): Likewise.
8113 * tree-vect-stmts.c (vectorizable_call): Likewise.
8114 (vectorizable_simd_clone_call, vect_remove_stores): Likewise.
8116 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
8118 * tree-vectorizer.h (vect_transform_stmt): Remove grouped_store
8120 * tree-vect-stmts.c (vect_transform_stmt): Likewise.
8121 * tree-vect-loop.c (vect_transform_loop_stmt): Update call accordingly.
8122 (vect_transform_loop): Likewise.
8123 * tree-vect-slp.c (vect_schedule_slp_instance): Likewise.
8125 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
8127 * tree-vectorizer.h (vect_schedule_slp): Return void.
8128 * tree-vect-slp.c (vect_schedule_slp_instance): Likewise.
8129 (vect_schedule_slp): Likewise.
8131 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
8133 * tree-vect-loop.c (vect_transform_loop_stmt): Remove slp_scheduled
8135 (vect_transform_loop): Update calls accordingly. Schedule SLP
8136 instances before the main loop, if any exist.
8138 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
8140 PR tree-optimization/86749
8141 * tree-vect-patterns.c (vect_determine_min_output_precision_1):
8142 If the lhs is used in a COND_EXPR, check that it is being used
8143 as the "then" or "else" value.
8145 2018-08-01 Tom de Vries <tdevries@suse.de>
8148 * config/nvptx/nvptx.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define to
8149 speculation_safe_value_not_needed.
8151 2018-08-01 Richard Biener <rguenther@suse.de>
8153 * tree-ssa-sccvn.c (visit_phi): Compare invariant addresses
8156 2018-08-01 Martin Liska <mliska@suse.cz>
8158 * value-prof.c (gimple_divmod_fixed_value_transform): Unify
8159 format how successful transformation is dumped.
8160 (gimple_mod_pow2_value_transform): Likewise.
8161 (gimple_mod_subtract_transform): Likewise.
8162 (gimple_stringops_transform): Likewise.
8164 2018-08-01 Martin Liska <mliska@suse.cz>
8167 * value-prof.c (interesting_stringop_to_profile_p):
8168 Simplify the code and add BUILT_IN_MEMMOVE.
8169 (gimple_stringops_transform): Likewise.
8171 2018-08-01 Sam Tebbs <sam.tebbs@arm.com>
8173 * config/aarch64/aarch64-simd.md
8174 (*aarch64_get_lane_zero_extendsi<mode>): Rename to...
8175 (*aarch64_get_lane_zero_extend<GPI:mode><VDQQH:mode>): ... This and
8176 use GPI iterator instead of SI mode.
8178 2018-08-01 Richard Earnshaw <rearnsha@arm.com>
8180 * config/rs6000/rs6000.md (speculation_barrier): Renamed from
8181 rs6000_speculation_barrier.
8182 * config/rs6000/rs6000.c (rs6000_expand_builtin): Adjust for
8183 new barrier pattern name.
8185 2018-08-01 Richard Earnshaw <rearnsha@arm.com>
8187 * config/i386/i386.md (unspecv): Add UNSPECV_SPECULATION_BARRIER.
8188 (speculation_barrier): New insn.
8190 2018-08-01 Richard Biener <rguenther@suse.de>
8193 * graphite.h: Include isl/id.h and isl/space.h to allow build
8196 2018-08-01 Jan Willem Jagersma <jwjagersma@gmail.com>
8199 * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
8200 mode for COFF targets.
8201 * defaults.h (TARGET_COFF): Define.
8202 * config/i386/djgpp.h (TARGET_ASM_LTO_START, TARGET_ASM_LTO_END,
8203 TARGET_COFF): Define.
8204 (i386_djgpp_asm_lto_start, i386_djgpp_asm_lto_end): Declare.
8205 * config/i386/djgpp.c (saved_debug_info_level): New static variable.
8206 (i386_djgpp_asm_lto_start, i386_djgpp_asm_lto_end): New functions.
8208 2018-07-31 Alexandre Oliva <oliva@adacore.com>
8210 * gimple-streamer-in.c (input_bb): Restore BB discriminator.
8211 * gimple-streamer-out.c (output_bb): Save it.
8212 * lto-streamer-in.c (input_struct_function_base): Restore
8213 instance discriminator if available. Create map on demand.
8214 * lto-streamer-out.c (output_struct_function_base): Save it if
8216 * final.c (decl_to_instance_map): Document LTO strategy.
8218 2018-07-31 Alexandre Oliva <oliva@adacore.com>
8219 Olivier Hainque <hainque@adacore.com>
8221 * debug.h (decl_to_instance_map_t): New type.
8222 (decl_to_instance_map): Declare.
8223 (maybe_create_decl_to_instance_map): New inline function.
8224 * final.c (bb_discriminator, last_bb_discriminator): New statics,
8225 to track basic block discriminators.
8226 (final_start_function_1): Initialize them.
8227 (final_scan_insn_1): On NOTE_INSN_BASIC_BLOCK, track
8229 (decl_to_instance_map): New variable.
8230 (map_decl_to_instance, maybe_set_discriminator): New functions.
8231 (notice_source_line): Set discriminator.
8233 2018-07-31 Ian Lance Taylor <iant@golang.org>
8235 * targhooks.c (default_have_speculation_safe_value): Add
8238 2018-07-31 David Malcolm <dmalcolm@redhat.com>
8240 * dump-context.h: Include "pretty-print.h".
8241 (dump_context::refresh_dumps_are_enabled): New decl.
8242 (dump_context::emit_item): New decl.
8243 (class dump_context): Add fields "m_test_pp" and
8245 (temp_dump_context::temp_dump_context): Add param "test_pp_flags".
8246 (temp_dump_context::get_dumped_text): New decl.
8247 (class temp_dump_context): Add field "m_pp".
8248 * dumpfile.c (refresh_dumps_are_enabled): Convert to...
8249 (dump_context::refresh_dumps_are_enabled): ...and add a test for
8251 (set_dump_file): Update for above change.
8252 (set_alt_dump_file): Likewise.
8253 (dump_loc): New overload, taking a pretty_printer *.
8254 (dump_context::dump_loc): Call end_any_optinfo. Dump the location
8255 to any test pretty-printer.
8256 (make_item_for_dump_gimple_stmt): New function, adapted from
8257 optinfo::add_gimple_stmt.
8258 (dump_context::dump_gimple_stmt): Call it, and use the result,
8259 eliminating the direct usage of dump_file and alt_dump_file in
8260 favor of indirectly using them via emit_item.
8261 (make_item_for_dump_gimple_expr): New function, adapted from
8262 optinfo::add_gimple_expr.
8263 (dump_context::dump_gimple_expr): Call it, and use the result,
8264 eliminating the direct usage of dump_file and alt_dump_file in
8265 favor of indirectly using them via emit_item.
8266 (make_item_for_dump_generic_expr): New function, adapted from
8268 (dump_context::dump_generic_expr): Call it, and use the result,
8269 eliminating the direct usage of dump_file and alt_dump_file in
8270 favor of indirectly using them via emit_item.
8271 (make_item_for_dump_printf_va): New function, adapted from
8272 optinfo::add_printf_va.
8273 (make_item_for_dump_printf): New function.
8274 (dump_context::dump_printf_va): Call make_item_for_dump_printf_va,
8275 and use the result, eliminating the direct usage of dump_file and
8276 alt_dump_file in favor of indirectly using them via emit_item.
8277 (make_item_for_dump_dec): New function.
8278 (dump_context::dump_dec): Call it, and use the result,
8279 eliminating the direct usage of dump_file and alt_dump_file in
8280 favor of indirectly using them via emit_item.
8281 (make_item_for_dump_symtab_node): New function, adapted from
8282 optinfo::add_symtab_node.
8283 (dump_context::dump_symtab_node): Call it, and use the result,
8284 eliminating the direct usage of dump_file and alt_dump_file in
8285 favor of indirectly using them via emit_item.
8286 (dump_context::begin_scope): Reimplement, avoiding direct usage
8287 of dump_file and alt_dump_file in favor of indirectly using them
8289 (dump_context::emit_item): New member function.
8290 (temp_dump_context::temp_dump_context): Add param "test_pp_flags".
8291 Set up test pretty-printer on the underlying context. Call
8292 refresh_dumps_are_enabled.
8293 (temp_dump_context::~temp_dump_context): Call
8294 refresh_dumps_are_enabled.
8295 (temp_dump_context::get_dumped_text): New member function.
8296 (selftest::verify_dumped_text): New function.
8297 (ASSERT_DUMPED_TEXT_EQ): New macro.
8298 (selftest::test_capture_of_dump_calls): Run all tests twice, with
8299 and then without optinfo enabled. Add uses of
8300 ASSERT_DUMPED_TEXT_EQ to all tests. Add test of nested scopes.
8301 * dumpfile.h: Update comment for the dump_* API.
8302 * optinfo-emit-json.cc
8303 (selftest::test_building_json_from_dump_calls): Update for new
8304 param for temp_dump_context ctor.
8305 * optinfo.cc (optinfo_item::optinfo_item): Remove "owned" param
8306 and "m_owned" field.
8307 (optinfo_item::~optinfo_item): Likewise.
8308 (optinfo::add_item): New member function.
8309 (optinfo::emit): Update comment.
8310 (optinfo::add_string): Delete.
8311 (optinfo::add_printf): Delete.
8312 (optinfo::add_printf_va): Delete.
8313 (optinfo::add_gimple_stmt): Delete.
8314 (optinfo::add_gimple_expr): Delete.
8315 (optinfo::add_tree): Delete.
8316 (optinfo::add_symtab_node): Delete.
8317 (optinfo::add_dec): Delete.
8318 * optinfo.h (class dump_context): New forward decl.
8319 (optinfo::add_item): New decl.
8320 (optinfo::add_string): Delete.
8321 (optinfo::add_printf): Delete.
8322 (optinfo::add_printf_va): Delete.
8323 (optinfo::add_gimple_stmt): Delete.
8324 (optinfo::add_gimple_expr): Delete.
8325 (optinfo::add_tree): Delete.
8326 (optinfo::add_symtab_node): Delete.
8327 (optinfo::add_dec): Delete.
8328 (optinfo::add_poly_int): Delete.
8329 (optinfo_item::optinfo_item): Remove "owned" param.
8330 (class optinfo_item): Remove field "m_owned".
8332 2018-07-31 Jozef Lawrynowicz <jozef.l@mittosystems.com>
8335 * gcc/cfgexpand.c (set_parm_rtl): Use the alignment of Pmode when
8336 MAX_SUPPORTED_STACK_ALIGNMENT would otherwise be exceeded by the
8337 requested variable alignment.
8338 (expand_one_ssa_partition): Likewise.
8339 (expand_one_var): Likewise.
8341 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
8343 * config/pdp11/pdp11.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
8344 to speculation_safe_value_not_needed.
8346 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
8348 * targhooks.h (speculation_safe_value_not_needed): New prototype.
8349 * targhooks.c (speculation_safe_value_not_needed): New function.
8350 * target.def (have_speculation_safe_value): Update documentation.
8351 * doc/tm.texi: Regenerated.
8353 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
8355 * config/aarch64/iterators.md (ALLI_TI): New iterator.
8356 * config/aarch64/aarch64.md (despeculate_copy<ALLI_TI:mode>): New
8358 (despeculate_copy<ALLI:mode>_insn): New insn.
8359 (despeculate_copyti_insn): New insn.
8360 (despeculate_simple<ALLI:mode>): New insn
8361 (despeculate_simpleti): New insn.
8362 * config/aarch64/aarch64.c (aarch64_speculation_safe_value): New
8364 (TARGET_SPECULATION_SAFE_VALUE): Redefine to
8365 aarch64_speculation_safe_value.
8366 (aarch64_print_operand): Handle const0_rtx in modifier 'H'.
8368 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
8370 * config/aarch64/aarch64-speculation.cc: New file.
8371 * config/aarch64/aarch64-passes.def (pass_track_speculation): Add
8372 before pass_reorder_blocks.
8373 * config/aarch64/aarch64-protos.h (make_pass_track_speculation): Add
8375 * config/aarch64/aarch64.c (aarch64_conditional_register_usage): Fix
8376 X14 and X15 when tracking speculation.
8377 * config/aarch64/aarch64.md (register name constants): Add
8378 SPECULATION_TRACKER_REGNUM and SPECULATION_SCRATCH_REGNUM.
8379 (unspec): Add UNSPEC_SPECULATION_TRACKER.
8380 (speculation_barrier): New insn attribute.
8381 (cmp<mode>): Allow SP in comparisons.
8382 (speculation_tracker): New insn.
8383 (speculation_barrier): Add speculation_barrier attribute.
8384 * config/aarch64/t-aarch64: Add make rule for aarch64-speculation.o.
8385 * config.gcc (aarch64*-*-*): Add aarch64-speculation.o to extra_objs.
8386 * doc/invoke.texi (AArch64 Options): Document -mtrack-speculation.
8388 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
8390 * config/aarch64/aarch64.md (cb<optab><mode>1): Disable when
8391 aarch64_track_speculation is true.
8392 (tb<optab><mode>1): Likewise.
8393 * config/aarch64/aarch64.c (aarch64_split_compare_regs): Do not
8394 generate CB[N]Z when tracking speculation.
8395 (aarch64_split_compare_and_swap): Likewise.
8396 (aarch64_split_atomic_op): Likewise.
8398 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
8400 * config/aarch64/aarch64.opt (mtrack-speculation): New target option.
8402 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
8404 * config/aarch64.md (unspecv): Add UNSPECV_SPECULAION_BARRIER.
8405 (speculation_barrier): New insn.
8407 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
8409 * config/arm/unspecs.md (unspecv): Add VUNSPEC_SPECULATION_BARRIER.
8410 * config/arm/arm.md (speculation_barrier): New expand.
8411 (speculation_barrier_insn): New pattern.
8413 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
8415 * builtin-types.def (BT_FN_PTR_PTR_VAR): New function type.
8416 (BT_FN_I1_I1_VAR, BT_FN_I2_I2_VAR, BT_FN_I4_I4_VAR): Likewise.
8417 (BT_FN_I8_I8_VAR, BT_FN_I16_I16_VAR): Likewise.
8418 * builtin-attrs.def (ATTR_NOVOPS_NOTHROW_LEAF_LIST): New attribute
8420 * builtins.def (BUILT_IN_SPECULATION_SAFE_VALUE_N): New builtin.
8421 (BUILT_IN_SPECULATION_SAFE_VALUE_PTR): New internal builtin.
8422 (BUILT_IN_SPECULATION_SAFE_VALUE_1): Likewise.
8423 (BUILT_IN_SPECULATION_SAFE_VALUE_2): Likewise.
8424 (BUILT_IN_SPECULATION_SAFE_VALUE_4): Likewise.
8425 (BUILT_IN_SPECULATION_SAFE_VALUE_8): Likewise.
8426 (BUILT_IN_SPECULATION_SAFE_VALUE_16): Likewise.
8427 * builtins.c (expand_speculation_safe_value): New function.
8428 (expand_builtin): Call it.
8429 * doc/cpp.texi: Document predefine __HAVE_SPECULATION_SAFE_VALUE.
8430 * doc/extend.texi: Document __builtin_speculation_safe_value.
8431 * doc/md.texi: Document "speculation_barrier" pattern.
8432 * doc/tm.texi.in: Pull in TARGET_SPECULATION_SAFE_VALUE and
8433 TARGET_HAVE_SPECULATION_SAFE_VALUE.
8434 * doc/tm.texi: Regenerated.
8435 * target.def (have_speculation_safe_value, speculation_safe_value): New
8437 * targhooks.c (default_have_speculation_safe_value): New function.
8438 (default_speculation_safe_value): New function.
8439 * targhooks.h (default_have_speculation_safe_value): Add prototype.
8440 (default_speculation_safe_value): Add prototype.
8442 2018-07-31 David Malcolm <dmalcolm@redhat.com>
8444 * dump-context.h (dump_context::dump_loc): New decl.
8445 * dumpfile.c (dump_context::dump_loc): New member function.
8446 (dump_context::dump_gimple_stmt_loc): Reimplement using dump_loc
8447 and dump_gimple_stmt.
8448 (dump_context::dump_gimple_expr_loc): Likewise, using
8450 (dump_context::dump_generic_expr_loc): Likewise, using
8452 (dump_context::dump_printf_loc_va): Likewise, using
8454 (dump_context::begin_scope): Explicitly using the global function
8455 "dump_loc", rather than the member function.
8457 2018-07-31 Martin Sebor <msebor@redhat.com>
8459 PR tree-optimization/86741
8460 * tree-vrp.c (vrp_prop::check_mem_ref): Avoid incomplete types.
8462 2018-07-31 Andreas Krebbel <krebbel@linux.ibm.com>
8464 * config/s390/s390.c (s390_expand_setmem): Make the unrolling to
8465 depend on whether prefetch instructions will be emitted or not.
8466 Use TARGET_SETMEM_PFD for checking whether prefetch instructions
8467 will be emitted or not.
8468 * config/s390/s390.h (TARGET_SETMEM_PREFETCH_DISTANCE)
8469 (TARGET_SETMEM_PFD): New macros.
8471 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8473 * tree-vectorizer.h (stmt_vec_info): Turn back into a typedef.
8474 (NULL_STMT_VEC_INFO): Delete.
8475 (stmt_vec_info::operator*): Likewise.
8476 (stmt_vec_info::operator gimple *): Likewise.
8477 * tree-vect-loop.c (vectorizable_reduction): Use NULL instead
8478 of NULL_STMT_VEC_INFO.
8479 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
8480 (vect_reassociating_reduction_p): Likewise.
8481 * tree-vect-stmts.c (vect_build_gather_load_calls): Likewise.
8482 (vectorizable_store): Likewise.
8483 * tree-vectorizer.c (vec_info::set_vinfo_for_stmt): Likewise.
8484 (vec_info::free_stmt_vec_infos): Likewise.
8486 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8488 * tree-vectorizer.h (vect_stmt_in_region_p): Delete.
8489 * tree-vectorizer.c (vect_stmt_in_region_p): Likewise.
8491 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8493 * tree-vectorizer.h (vec_info::new_vinfo_for_stmt)
8494 (vec_info::set_vinfo_for_stmt, vec_info::free_stmt_vec_infos)
8495 (vec_info::free_stmt_vec_info): New private member functions.
8496 (set_stmt_vec_info_vec, free_stmt_vec_infos, vinfo_for_stmt)
8497 (set_vinfo_for_stmt, new_stmt_vec_info, free_stmt_vec_info): Delete.
8498 * tree-parloops.c (gather_scalar_reductions): Remove calls to
8499 set_stmt_vec_info_vec and free_stmt_vec_infos.
8500 * tree-vect-loop.c (_loop_vec_info): Remove call to
8501 set_stmt_vec_info_vec.
8502 * tree-vect-stmts.c (new_stmt_vec_info, set_stmt_vec_info_vec)
8503 (free_stmt_vec_infos, free_stmt_vec_info): Delete in favor of...
8504 * tree-vectorizer.c (vec_info::new_stmt_vec_info)
8505 (vec_info::set_vinfo_for_stmt, vec_info::free_stmt_vec_infos)
8506 (vec_info::free_stmt_vec_info): ...these new functions. Remove
8507 assignments in {vec_info::,}new_stmt_vec_info that are redundant
8508 with the clearing in the xcalloc.
8509 (stmt_vec_info_vec): Delete.
8510 (vec_info::vec_info): Don't call set_stmt_vec_info_vec.
8511 (vectorize_loops): Likewise.
8512 (vec_info::~vec_info): Remove argument from call to
8513 free_stmt_vec_infos.
8514 (vec_info::add_stmt): Remove vinfo argument from call to
8517 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8519 * tree-vectorizer.h (free_stmt_vec_info): Take a stmt_vec_info
8520 rather than a gimple stmt.
8521 * tree-vect-stmts.c (free_stmt_vec_info): Likewise. Don't free
8522 information for pattern statements when passed the original
8523 statement; instead wait to be passed the pattern statement itself.
8524 Don't call set_vinfo_for_stmt here.
8525 (free_stmt_vec_infos): Update call to free_stmt_vec_info.
8526 * tree-vect-loop.c (_loop_vec_info::~loop_vec_info): Don't free
8527 stmt_vec_infos here.
8528 * tree-vect-slp.c (_bb_vec_info::~bb_vec_info): Likewise.
8529 * tree-vectorizer.c (vec_info::remove_stmt): Nullify the statement's
8530 stmt_vec_infos entry.
8532 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8534 * tree-vectorizer.h (vec_info::replace_stmt): Declare.
8535 * tree-vectorizer.c (vec_info::replace_stmt): New function.
8536 * tree-vect-slp.c (vect_remove_slp_scalar_calls): Use it.
8537 * tree-vect-stmts.c (vectorizable_call): Likewise.
8538 (vectorizable_simd_clone_call): Likewise.
8540 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8542 * tree-vectorizer.h (vec_info::remove_stmt): Declare.
8543 * tree-vectorizer.c (vec_info::remove_stmt): New function.
8544 * tree-vect-loop-manip.c (vect_set_loop_condition): Use it.
8545 * tree-vect-loop.c (vect_transform_loop): Likewise.
8546 * tree-vect-slp.c (vect_schedule_slp): Likewise.
8547 * tree-vect-stmts.c (vect_remove_stores): Likewise.
8549 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8551 * tree-vectorizer.h (vec_info::lookup_dr): New member function.
8552 (vect_dr_stmt): Delete.
8553 * tree-vectorizer.c (vec_info::lookup_dr): New function.
8554 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Use it instead
8556 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
8557 (vect_analyze_data_ref_dependence, vect_record_base_alignments)
8558 (vect_verify_datarefs_alignment, vect_peeling_supportable)
8559 (vect_analyze_data_ref_accesses, vect_prune_runtime_alias_test_list)
8560 (vect_analyze_data_refs): Likewise.
8561 (vect_slp_analyze_data_ref_dependence): Likewise. Take a vec_info
8563 (vect_find_same_alignment_drs): Likewise.
8564 (vect_slp_analyze_node_dependences): Update calls accordingly.
8565 (vect_analyze_data_refs_alignment): Likewise. Use vec_info::lookup_dr
8566 instead of DR_VECT_AUX.
8567 (vect_get_peeling_costs_all_drs): Take a loop_vec_info instead
8568 of a vector data references. Use vec_info::lookup_dr instead of
8570 (vect_peeling_hash_get_lowest_cost): Update calls accordingly.
8571 (vect_enhance_data_refs_alignment): Likewise. Use vec_info::lookup_dr
8572 instead of DR_VECT_AUX.
8574 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8576 * tree-vectorizer.h (_loop_vec_info::unaligned_dr): Change to
8578 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Update
8580 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
8581 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
8582 (vect_gen_prolog_loop_niters): Likewise.
8584 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8586 * tree-vectorizer.h (set_dr_misalignment, dr_misalignment)
8587 (DR_TARGET_ALIGNMENT, aligned_access_p, known_alignment_for_access_p)
8588 (vect_known_alignment_in_bytes, vect_dr_behavior)
8589 (vect_get_scalar_dr_size): Take references as dr_vec_infos
8590 instead of data_references. Update calls to other routines for
8591 which the same change has been made.
8592 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Take
8593 dr_vec_infos instead of stmt_vec_infos.
8594 (vect_analyze_data_ref_dependence): Update call accordingly.
8595 (vect_slp_analyze_data_ref_dependence)
8596 (vect_record_base_alignments): Use DR_VECT_AUX.
8597 (vect_calculate_target_alignment, vect_compute_data_ref_alignment)
8598 (vect_update_misalignment_for_peel, verify_data_ref_alignment)
8599 (vector_alignment_reachable_p, vect_get_data_access_cost)
8600 (vect_peeling_supportable, vect_analyze_group_access_1)
8601 (vect_analyze_group_access, vect_analyze_data_ref_access)
8602 (vect_vfa_segment_size, vect_vfa_access_size, vect_vfa_align)
8603 (vect_compile_time_alias, vect_small_gap_p)
8604 (vectorizable_with_step_bound_p, vect_duplicate_ssa_name_ptr_info):
8605 (vect_supportable_dr_alignment): Take references as dr_vec_infos
8606 instead of data_references. Update calls to other routines for
8607 which the same change has been made.
8608 (vect_verify_datarefs_alignment, vect_get_peeling_costs_all_drs)
8609 (vect_find_same_alignment_drs, vect_analyze_data_refs_alignment)
8610 (vect_slp_analyze_and_verify_node_alignment)
8611 (vect_analyze_data_ref_accesses, vect_prune_runtime_alias_test_list)
8612 (vect_create_addr_base_for_vector_ref, vect_create_data_ref_ptr)
8613 (vect_setup_realignment): Use dr_vec_infos. Update calls after
8615 (_vect_peel_info::dr): Replace with...
8616 (_vect_peel_info::dr_info): ...this new field.
8617 (vect_peeling_hash_get_most_frequent)
8618 (vect_peeling_hash_choose_best_peeling): Update accordingly.
8619 (vect_peeling_hash_get_lowest_cost):
8620 (vect_enhance_data_refs_alignment): Likewise. Update calls to other
8621 routines for which the same change has been made.
8622 (vect_peeling_hash_insert): Likewise. Take a dr_vec_info instead of a
8624 * tree-vect-loop-manip.c (get_misalign_in_elems)
8625 (vect_gen_prolog_loop_niters): Use dr_vec_infos. Update calls after
8627 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
8628 * tree-vect-stmts.c (vect_get_store_cost, vect_get_load_cost)
8629 (vect_truncate_gather_scatter_offset, compare_step_with_zero)
8630 (get_group_load_store_type, get_negative_load_store_type)
8631 (vect_get_data_ptr_increment, vectorizable_store)
8632 (vectorizable_load): Likewise.
8633 (ensure_base_align): Take a dr_vec_info instead of a data_reference.
8634 Update calls to other routines for which the same change has been made.
8636 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8638 * tree-vectorizer.h (vec_info::move_dr): New member function.
8639 (dataref_aux): Rename to...
8640 (dr_vec_info): ...this and add "dr" and "stmt" fields.
8641 (_stmt_vec_info::dr_aux): Update accordingly.
8642 (_stmt_vec_info::data_ref_info): Delete.
8643 (STMT_VINFO_GROUPED_ACCESS, DR_GROUP_FIRST_ELEMENT)
8644 (DR_GROUP_NEXT_ELEMENT, DR_GROUP_SIZE, DR_GROUP_STORE_COUNT)
8645 (DR_GROUP_GAP, DR_GROUP_SAME_DR_STMT, REDUC_GROUP_FIRST_ELEMENT):
8646 (REDUC_GROUP_NEXT_ELEMENT, REDUC_GROUP_SIZE): Use dr_aux.dr instead
8648 (STMT_VINFO_DATA_REF): Likewise. Turn into an lvalue.
8649 (STMT_VINFO_DR_INFO): New macro.
8650 (DR_VECT_AUX): Use STMT_VINFO_DR_INKFO and vect_dr_stmt.
8651 (set_dr_misalignment): Update after rename of dataref_aux.
8652 (vect_dr_stmt): Move earlier in file. Return dr_aux.stmt.
8653 * tree-vect-stmts.c (new_stmt_vec_info): Remove redundant
8654 initialization of STMT_VINFO_DATA_REF.
8655 * tree-vectorizer.c (vec_info::move_dr): New function.
8656 * tree-vect-patterns.c (vect_recog_bool_pattern)
8657 (vect_recog_mask_conversion_pattern)
8658 (vect_recog_gather_scatter_pattern): Use it.
8659 * tree-vect-data-refs.c (vect_analyze_data_refs): Initialize
8660 the "dr" and "stmt" fields of dr_vec_info instead of
8661 STMT_VINFO_DATA_REF.
8663 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8665 * tree-vectorizer.h (_stmt_vec_info::pattern_stmt_p): New field.
8666 (is_pattern_stmt_p): Use it.
8667 * tree-vect-patterns.c (vect_init_pattern_stmt): Set pattern_stmt_p
8668 on pattern statements.
8670 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8672 * tree-vect-patterns.c (vect_mark_pattern_stmts): Take the
8673 original stmt as a stmt_vec_info rather than a gimple stmt.
8674 (vect_pattern_recog_1): Take the statement directly as a
8675 stmt_vec_info, rather than via a gimple_stmt_iterator.
8676 Update call to vect_mark_pattern_stmts.
8677 (vect_pattern_recog): Update calls accordingly.
8679 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8681 * tree-vectorizer.h (vect_get_vec_defs_for_stmt_copy)
8682 (vect_get_vec_def_for_stmt_copy): Take a vec_info rather than
8683 a vect_def_type for the first argument.
8684 * tree-vect-stmts.c (vect_get_vec_defs_for_stmt_copy): Likewise.
8685 (vect_get_vec_def_for_stmt_copy): Likewise. Return the original
8686 operand if it isn't defined by a vectorized statement.
8687 (vect_build_gather_load_calls): Remove the mask_dt argument and
8688 update calls to vect_get_vec_def_for_stmt_copy.
8689 (vectorizable_bswap): Likewise the dt argument.
8690 (vectorizable_call): Update calls to vectorizable_bswap and
8691 vect_get_vec_def_for_stmt_copy.
8692 (vectorizable_simd_clone_call, vectorizable_assignment)
8693 (vectorizable_shift, vectorizable_operation, vectorizable_condition)
8694 (vectorizable_comparison): Update calls to
8695 vect_get_vec_def_for_stmt_copy.
8696 (vectorizable_store): Likewise. Remove now-unnecessary calls to
8698 (vect_get_loop_based_defs): Remove dt argument and update call
8699 to vect_get_vec_def_for_stmt_copy.
8700 (vectorizable_conversion): Update calls to vect_get_loop_based_defs
8701 and vect_get_vec_def_for_stmt_copy.
8702 (vectorizable_load): Update calls to vect_build_gather_load_calls
8703 and vect_get_vec_def_for_stmt_copy.
8704 * tree-vect-loop.c (vect_create_epilog_for_reduction)
8705 (vectorizable_reduction, vectorizable_live_operation): Update calls
8706 to vect_get_vec_def_for_stmt_copy.
8708 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8710 * tree-vect-data-refs.c (vect_record_base_alignment): Replace vec_info
8711 and gimple stmt arguments with a stmt_vec_info.
8712 (vect_record_base_alignments): Update calls accordingly.
8713 * tree-vect-slp.c (vect_record_max_nunits): Replace vec_info
8714 and gimple stmt arguments with a stmt_vec_info.
8715 (vect_build_slp_tree_1): Remove vinfo argument and update call
8716 to vect_record_max_nunits.
8717 (vect_build_slp_tree_2): Update calls to vect_build_slp_tree_1
8718 and vect_record_max_nunits.
8720 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8722 * tree-vectorizer.h (nested_in_vect_loop_p): Move further down
8723 file and take a stmt_vec_info instead of a gimple stmt.
8724 (supportable_widening_operation, vect_finish_replace_stmt)
8725 (vect_finish_stmt_generation, vect_get_store_rhs)
8726 (vect_get_vec_def_for_operand_1, vect_get_vec_def_for_operand)
8727 (vect_get_vec_defs, vect_init_vector, vect_transform_stmt)
8728 (vect_remove_stores, vect_analyze_stmt, vectorizable_condition)
8729 (vect_get_smallest_scalar_type, vect_check_gather_scatter)
8730 (vect_create_data_ref_ptr, bump_vector_ptr)
8731 (vect_permute_store_chain, vect_setup_realignment)
8732 (vect_transform_grouped_load, vect_record_grouped_load_vectors)
8733 (vect_create_addr_base_for_vector_ref, vectorizable_live_operation)
8734 (vectorizable_reduction, vectorizable_induction)
8735 (get_initial_def_for_reduction, is_simple_and_all_uses_invariant)
8736 (vect_get_place_in_interleaving_chain): Take stmt_vec_infos rather
8737 than gimple stmts as arguments.
8738 * tree-vect-data-refs.c (vect_get_smallest_scalar_type)
8739 (vect_preserves_scalar_order_p, vect_slp_analyze_node_dependences)
8740 (can_group_stmts_p, vect_check_gather_scatter)
8741 (vect_create_addr_base_for_vector_ref, vect_create_data_ref_ptr)
8742 (bump_vector_ptr, vect_permute_store_chain, vect_setup_realignment)
8743 (vect_permute_load_chain, vect_shift_permute_load_chain)
8744 (vect_transform_grouped_load)
8745 (vect_record_grouped_load_vectors): Likewise.
8746 * tree-vect-loop.c (vect_fixup_reduc_chain)
8747 (get_initial_def_for_reduction, vect_create_epilog_for_reduction)
8748 (vectorize_fold_left_reduction, is_nonwrapping_integer_induction)
8749 (vectorizable_reduction, vectorizable_induction)
8750 (vectorizable_live_operation, vect_loop_kill_debug_uses): Likewise.
8751 * tree-vect-patterns.c (type_conversion_p, adjust_bool_stmts)
8752 (vect_get_load_store_mask): Likewise.
8753 * tree-vect-slp.c (vect_get_place_in_interleaving_chain)
8754 (vect_analyze_slp_instance, vect_mask_constant_operand_p): Likewise.
8755 * tree-vect-stmts.c (vect_mark_relevant)
8756 (is_simple_and_all_uses_invariant)
8757 (exist_non_indexing_operands_for_use_p, process_use)
8758 (vect_init_vector_1, vect_init_vector, vect_get_vec_def_for_operand_1)
8759 (vect_get_vec_def_for_operand, vect_get_vec_defs)
8760 (vect_finish_stmt_generation_1, vect_finish_replace_stmt)
8761 (vect_finish_stmt_generation, vect_truncate_gather_scatter_offset)
8762 (compare_step_with_zero, vect_get_store_rhs, get_group_load_store_type)
8763 (get_negative_load_store_type, get_load_store_type)
8764 (vect_check_load_store_mask, vect_check_store_rhs)
8765 (vect_build_gather_load_calls, vect_get_strided_load_store_ops)
8766 (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
8767 (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
8768 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
8769 (get_group_alias_ptr_type, vectorizable_store, hoist_defs_of_uses)
8770 (vectorizable_load, vectorizable_condition, vectorizable_comparison)
8771 (vect_analyze_stmt, vect_transform_stmt, vect_remove_stores)
8772 (supportable_widening_operation): Likewise.
8774 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8776 * tree-vect-data-refs.c (vect_describe_gather_scatter_call): Take
8777 a stmt_vec_info instead of a gcall.
8778 (vect_check_gather_scatter): Update call accordingly.
8779 * tree-vect-loop-manip.c (iv_phi_p): Take a stmt_vec_info instead
8781 (vect_can_advance_ivs_p, vect_update_ivs_after_vectorizer)
8782 (slpeel_update_phi_nodes_for_loops):): Update calls accordingly.
8783 * tree-vect-loop.c (vect_transform_loop_stmt): Take a stmt_vec_info
8784 instead of a gimple stmt.
8785 (vect_transform_loop): Update calls accordingly.
8786 * tree-vect-slp.c (vect_split_slp_store_group): Take and return
8787 stmt_vec_infos instead of gimple stmts.
8788 (vect_analyze_slp_instance): Update use accordingly.
8789 * tree-vect-stmts.c (read_vector_array, write_vector_array)
8790 (vect_clobber_variable, vect_stmt_relevant_p, permute_vec_elements)
8791 (vect_use_strided_gather_scatters_p, vect_build_all_ones_mask)
8792 (vect_build_zero_merge_argument, vect_get_gather_scatter_ops)
8793 (vect_gen_widened_results_half, vect_get_loop_based_defs)
8794 (vect_create_vectorized_promotion_stmts, can_vectorize_live_stmts):
8795 Take a stmt_vec_info instead of a gimple stmt and pass stmt_vec_infos
8796 down to subroutines.
8798 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8800 * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Change the type
8801 of the worklist from a vector of gimple stmts to a vector of
8803 * tree-vect-stmts.c (vect_mark_relevant, process_use)
8804 (vect_mark_stmts_to_be_vectorized): Likewise
8806 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8808 * tree-vect-loop.c (vect_analyze_loop_operations): Look up the
8809 statement before passing it to vect_analyze_stmt.
8810 (vect_create_epilog_for_reduction): Use a stmt_vec_info to walk
8811 the chain of phi vector definitions. Track the exit phi via its
8813 (vectorizable_reduction): Set cond_stmt_vinfo directly from the
8814 STMT_VINFO_REDUC_DEF.
8815 * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Use
8816 stmt_vec_infos to handle the statement chains.
8817 (vect_get_slp_defs): Record the first statement in the node
8818 using a stmt_vec_info.
8819 * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Look up
8820 statements here and pass their stmt_vec_info down to subroutines.
8821 (vect_init_vector_1): Hoist call to vinfo_for_stmt and pass it
8822 down to vect_finish_stmt_generation.
8823 (vect_init_vector, vect_get_vec_defs, vect_finish_replace_stmt)
8824 (vect_finish_stmt_generation): Call vinfo_for_stmt and pass
8825 stmt_vec_infos to subroutines.
8826 (vect_remove_stores): Use stmt_vec_infos to handle the statement
8829 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8831 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences):
8832 (vect_check_gather_scatter, vect_create_data_ref_ptr, bump_vector_ptr)
8833 (vect_permute_store_chain, vect_setup_realignment)
8834 (vect_permute_load_chain, vect_shift_permute_load_chain)
8835 (vect_transform_grouped_load): Use stmt_vec_info rather than gimple
8836 stmts internally, and when passing values to other vectorizer routines.
8837 * tree-vect-loop-manip.c (vect_can_advance_ivs_p): Likewise.
8838 * tree-vect-loop.c (vect_analyze_scalar_cycles_1)
8839 (vect_analyze_loop_operations, get_initial_def_for_reduction)
8840 (vect_create_epilog_for_reduction, vectorize_fold_left_reduction)
8841 (vectorizable_reduction, vectorizable_induction)
8842 (vectorizable_live_operation, vect_transform_loop_stmt)
8843 (vect_transform_loop): Likewise.
8844 * tree-vect-patterns.c (vect_reassociating_reduction_p)
8845 (vect_recog_widen_op_pattern, vect_recog_mixed_size_cond_pattern)
8846 (vect_recog_bool_pattern, vect_recog_gather_scatter_pattern): Likewise.
8847 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
8848 (vect_slp_analyze_node_operations_1): Likewise.
8849 * tree-vect-stmts.c (vect_mark_relevant, process_use)
8850 (exist_non_indexing_operands_for_use_p, vect_init_vector_1)
8851 (vect_mark_stmts_to_be_vectorized, vect_get_vec_def_for_operand)
8852 (vect_finish_stmt_generation_1, get_group_load_store_type)
8853 (get_load_store_type, vect_build_gather_load_calls)
8854 (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
8855 (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
8856 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
8857 (vectorizable_store, vectorizable_load, vectorizable_condition)
8858 (vectorizable_comparison, vect_analyze_stmt, vect_transform_stmt)
8859 (supportable_widening_operation): Likewise.
8860 (vect_get_vector_types_for_stmt): Likewise.
8861 * tree-vectorizer.h (vect_dr_behavior): Likewise.
8863 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8865 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
8866 (vect_slp_analyze_node_dependences, vect_analyze_data_ref_accesses)
8867 (vect_permute_store_chain, vect_permute_load_chain)
8868 (vect_shift_permute_load_chain, vect_transform_grouped_load): Avoid
8869 repeated stmt_vec_info lookups.
8870 * tree-vect-loop-manip.c (vect_can_advance_ivs_p): Likewise.
8871 (vect_update_ivs_after_vectorizer): Likewise.
8872 * tree-vect-loop.c (vect_is_simple_reduction): Likewise.
8873 (vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
8874 * tree-vect-patterns.c (adjust_bool_stmts): Likewise.
8875 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
8876 (vect_bb_slp_scalar_cost): Likewise.
8877 * tree-vect-stmts.c (get_group_alias_ptr_type): Likewise.
8879 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8881 * tree-vect-data-refs.c (vect_check_gather_scatter): Pass the
8882 gcall rather than the generic gimple stmt to gimple_call_internal_fn.
8883 (vect_get_smallest_scalar_type, can_group_stmts_p): Use dyn_cast
8884 to get gassigns and gcalls, rather than operating on generc gimple
8886 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p)
8887 (vect_mark_stmts_to_be_vectorized, vectorizable_store)
8888 (vectorizable_load, vect_analyze_stmt): Likewise.
8889 * tree-vect-loop.c (vectorizable_reduction): Likewise gphi.
8891 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8893 * tree-vectorizer.h (get_earlier_stmt, get_later_stmt): Take and
8894 return stmt_vec_infos rather than gimple stmts. Do not accept
8896 (vect_find_last_scalar_stmt_in_slp): Return a stmt_vec_info instead
8898 * tree-vect-slp.c (vect_find_last_scalar_stmt_in_slp): Likewise.
8899 Update use of get_later_stmt.
8900 (vect_get_constant_vectors): Update call accordingly.
8901 (vect_schedule_slp_instance): Likewise
8902 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Likewise.
8903 (vect_slp_analyze_instance_dependence): Likewise.
8904 (vect_preserves_scalar_order_p): Update use of get_earlier_stmt.
8906 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8908 * tree-vectorizer.h (stmt_info_for_cost::stmt): Replace with...
8909 (stmt_info_for_cost::stmt_info): ...this new field.
8910 (add_stmt_costs): Update accordingly.
8911 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
8912 (vect_get_known_peeling_cost): Likewise.
8913 (vect_estimate_min_profitable_iters): Likewise.
8914 * tree-vect-stmts.c (record_stmt_cost): Likewise.
8916 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8918 * tree-vectorizer.h (_loop_vec_info::may_misalign_stmts): Change
8919 from an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
8920 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Update
8922 * tree-vect-loop-manip.c (vect_create_cond_for_align_checks): Likewise.
8924 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8926 * tree-vectorizer.h (_stmt_vec_info::same_dr_stmt): Change from
8927 a gimple stmt to a stmt_vec_info.
8928 * tree-vect-stmts.c (vectorizable_load): Update accordingly.
8930 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8932 * tree-vectorizer.h (vec_info::grouped_stores): Change from
8933 an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
8934 (_loop_vec_info::reduction_chains): Likewise.
8935 * tree-vect-loop.c (vect_fixup_scalar_cycles_with_patterns): Update
8937 * tree-vect-slp.c (vect_analyze_slp): Likewise.
8939 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8941 * tree-vectorizer.h (_stmt_vec_info::first_element): Change from
8942 a gimple stmt to a stmt_vec_info.
8943 (_stmt_vec_info::next_element): Likewise.
8944 * tree-vect-data-refs.c (vect_update_misalignment_for_peel)
8945 (vect_slp_analyze_and_verify_node_alignment)
8946 (vect_analyze_group_access_1, vect_analyze_group_access)
8947 (vect_small_gap_p, vect_prune_runtime_alias_test_list)
8948 (vect_create_data_ref_ptr, vect_record_grouped_load_vectors)
8949 (vect_supportable_dr_alignment): Update accordingly.
8950 * tree-vect-loop.c (vect_fixup_reduc_chain): Likewise.
8951 (vect_fixup_scalar_cycles_with_patterns, vect_is_slp_reduction)
8952 (vect_is_simple_reduction, vectorizable_reduction): Likewise.
8953 * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
8954 * tree-vect-slp.c (vect_build_slp_tree_1)
8955 (vect_attempt_slp_rearrange_stmts, vect_supported_load_permutation_p)
8956 (vect_split_slp_store_group, vect_analyze_slp_instance)
8957 (vect_analyze_slp, vect_transform_slp_perm_load): Likewise.
8958 * tree-vect-stmts.c (vect_model_store_cost, vect_model_load_cost)
8959 (get_group_load_store_type, get_load_store_type)
8960 (get_group_alias_ptr_type, vectorizable_store, vectorizable_load)
8961 (vect_transform_stmt, vect_remove_stores): Likewise.
8963 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8965 * tree-vectorizer.h (vect_dr_stmt): Return a stmt_vec_info rather
8967 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
8968 (vect_slp_analyze_data_ref_dependence, vect_record_base_alignments)
8969 (vect_calculate_target_alignmentm, vect_compute_data_ref_alignment)
8970 (vect_update_misalignment_for_peel, vect_verify_datarefs_alignment)
8971 (vector_alignment_reachable_p, vect_get_data_access_cost)
8972 (vect_get_peeling_costs_all_drs, vect_peeling_hash_get_lowest_cost)
8973 (vect_peeling_supportable, vect_enhance_data_refs_alignment)
8974 (vect_find_same_alignment_drs, vect_analyze_data_refs_alignment)
8975 (vect_analyze_group_access_1, vect_analyze_group_access)
8976 (vect_analyze_data_ref_access, vect_analyze_data_ref_accesses)
8977 (vect_vfa_access_size, vect_small_gap_p, vect_analyze_data_refs)
8978 (vect_supportable_dr_alignment): Remove vinfo_for_stmt from the
8979 result of vect_dr_stmt and use the stmt_vec_info instead of
8980 the associated gimple stmt.
8981 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
8982 (vect_gen_prolog_loop_niters): Likewise.
8983 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
8985 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
8987 * tree-vectorizer.h (_slp_tree::stmts): Change from a vec<gimple *>
8988 to a vec<stmt_vec_info>.
8989 * tree-vect-slp.c (vect_free_slp_tree): Update accordingly.
8990 (vect_create_new_slp_node): Take a vec<gimple *> instead of a
8992 (_slp_oprnd_info::def_stmts): Change from a vec<gimple *>
8993 to a vec<stmt_vec_info>.
8994 (bst_traits::value_type, bst_traits::value_type): Likewise.
8995 (bst_traits::hash): Update accordingly.
8996 (vect_get_and_check_slp_defs): Change the stmts parameter from
8997 a vec<gimple *> to a vec<stmt_vec_info>.
8998 (vect_two_operations_perm_ok_p, vect_build_slp_tree_1): Likewise.
8999 (vect_build_slp_tree): Likewise.
9000 (vect_build_slp_tree_2): Likewise. Update uses of
9001 SLP_TREE_SCALAR_STMTS.
9002 (vect_print_slp_tree): Update uses of SLP_TREE_SCALAR_STMTS.
9003 (vect_mark_slp_stmts, vect_mark_slp_stmts_relevant)
9004 (vect_slp_rearrange_stmts, vect_attempt_slp_rearrange_stmts)
9005 (vect_supported_load_permutation_p, vect_find_last_scalar_stmt_in_slp)
9006 (vect_detect_hybrid_slp_stmts, vect_slp_analyze_node_operations_1)
9007 (vect_slp_analyze_node_operations, vect_slp_analyze_operations)
9008 (vect_bb_slp_scalar_cost, vect_slp_analyze_bb_1)
9009 (vect_get_constant_vectors, vect_get_slp_defs)
9010 (vect_transform_slp_perm_load, vect_schedule_slp_instance)
9011 (vect_remove_slp_scalar_calls, vect_schedule_slp): Likewise.
9012 (vect_analyze_slp_instance): Build up a vec of stmt_vec_infos
9013 instead of gimple stmts.
9014 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Change
9015 the stores parameter for a vec<gimple *> to a vec<stmt_vec_info>.
9016 (vect_slp_analyze_instance_dependence): Update uses of
9017 SLP_TREE_SCALAR_STMTS.
9018 (vect_slp_analyze_and_verify_node_alignment): Likewise.
9019 (vect_slp_analyze_and_verify_instance_alignment): Likewise.
9020 * tree-vect-loop.c (neutral_op_for_slp_reduction): Likewise.
9021 (get_initial_defs_for_reduction): Likewise.
9022 (vect_create_epilog_for_reduction): Likewise.
9023 (vectorize_fold_left_reduction): Likewise.
9024 * tree-vect-stmts.c (vect_prologue_cost_for_slp_op): Likewise.
9025 (vect_model_simple_cost, vectorizable_shift, vectorizable_load)
9026 (can_vectorize_live_stmts): Likewise.
9028 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
9030 * tree-vectorizer.h (_loop_vec_info::reductions): Change from an
9031 auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
9032 (vect_force_simple_reduction): Take and return stmt_vec_infos rather
9034 * tree-parloops.c (valid_reduction_p): Take a stmt_vec_info instead
9036 (gather_scalar_reductions): Update after above interface changes.
9037 * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Likewise.
9038 (vect_is_simple_reduction): Take and return stmt_vec_infos rather
9040 (vect_force_simple_reduction): Likewise.
9041 * tree-vect-patterns.c (vect_pattern_recog_1): Update use of
9042 LOOP_VINFO_REDUCTIONS.
9043 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
9045 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
9047 * tree-vectorizer.h (_stmt_vec_info::reduc_def): Change from
9048 a gimple stmt to a stmt_vec_info.
9049 * tree-vect-loop.c (vect_active_double_reduction_p)
9050 (vect_force_simple_reduction, vectorizable_reduction): Update
9053 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
9055 * tree-vectorizer.h (_slp_tree::vec_stmts): Change from a
9056 vec<gimple *> to a vec<stmt_vec_info>.
9057 * tree-vect-loop.c (vect_create_epilog_for_reduction): Change
9058 the reduction_phis argument from a vec<gimple *> to a
9060 (vectorizable_reduction): Likewise the phis local variable that
9061 is passed to vect_create_epilog_for_reduction. Update for new type
9062 of SLP_TREE_VEC_STMTS.
9063 (vectorizable_induction): Update for new type of SLP_TREE_VEC_STMTS.
9064 (vectorizable_live_operation): Likewise.
9065 * tree-vect-slp.c (vect_get_slp_vect_defs): Likewise.
9066 (vect_transform_slp_perm_load, vect_schedule_slp_instance): Likewise.
9068 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
9070 * tree-vectorizer.h (_stmt_vec_info::vectorized_stmt): Change from
9071 a gimple stmt to a stmt_vec_info.
9072 (vectorizable_condition, vectorizable_live_operation)
9073 (vectorizable_reduction, vectorizable_induction): Pass back the
9074 vectorized statement as a stmt_vec_info.
9075 * tree-vect-data-refs.c (vect_record_grouped_load_vectors): Update
9076 use of STMT_VINFO_VEC_STMT.
9077 * tree-vect-loop.c (vect_create_epilog_for_reduction): Likewise,
9078 accumulating the inner phis that feed the STMT_VINFO_VEC_STMT
9079 as stmt_vec_infos rather than gimple stmts.
9080 (vectorize_fold_left_reduction): Change vec_stmt from a gimple stmt
9082 (vectorizable_live_operation): Likewise.
9083 (vectorizable_reduction, vectorizable_induction): Likewise,
9084 updating use of STMT_VINFO_VEC_STMT.
9085 * tree-vect-stmts.c (vect_get_vec_def_for_operand_1): Update use
9086 of STMT_VINFO_VEC_STMT.
9087 (vect_build_gather_load_calls, vectorizable_bswap, vectorizable_call)
9088 (vectorizable_simd_clone_call, vectorizable_conversion)
9089 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
9090 (vectorizable_store, vectorizable_load, vectorizable_condition)
9091 (vectorizable_comparison, can_vectorize_live_stmts): Change vec_stmt
9092 from a gimple stmt to a stmt_vec_info.
9093 (vect_transform_stmt): Update use of STMT_VINFO_VEC_STMT. Pass a
9094 pointer to a stmt_vec_info to the vectorizable_* routines.
9096 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
9098 * tree-vectorizer.h (_stmt_vec_info::related_stmt): Change from
9099 a gimple stmt to a stmt_vec_info.
9100 (is_pattern_stmt_p): Update accordingly.
9101 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Likewise.
9102 (vect_record_grouped_load_vectors): Likewise.
9103 * tree-vect-loop.c (vect_determine_vf_for_stmt): Likewise.
9104 (vect_fixup_reduc_chain, vect_update_vf_for_slp): Likewise.
9105 (vect_model_reduction_cost): Likewise.
9106 (vect_create_epilog_for_reduction): Likewise.
9107 (vectorizable_reduction, vectorizable_induction): Likewise.
9108 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
9109 Return the stmt_vec_info for the pattern statement.
9110 (vect_set_pattern_stmt): Update use of STMT_VINFO_RELATED_STMT.
9111 (vect_split_statement, vect_mark_pattern_stmts): Likewise.
9112 * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
9113 (vect_detect_hybrid_slp, vect_get_slp_defs): Likewise.
9114 * tree-vect-stmts.c (vect_mark_relevant): Likewise.
9115 (vect_get_vec_def_for_operand_1, vectorizable_call): Likewise.
9116 (vectorizable_simd_clone_call, vect_analyze_stmt, new_stmt_vec_info)
9117 (free_stmt_vec_info, vect_is_simple_use): Likewise.
9119 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
9121 * tree-vectorizer.h (vect_finish_replace_stmt): Return a stmt_vec_info
9122 (vect_finish_stmt_generation): Likewise.
9123 * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
9124 (vect_finish_replace_stmt, vect_finish_stmt_generation): Likewise.
9125 (vect_build_gather_load_calls): Use the return value of the above
9126 functions instead of a separate call to vinfo_for_stmt. Use narrow
9127 scopes for the input gimple stmt and wider scopes for the associated
9128 stmt_vec_info. Use vec_info::lookup_def when setting these
9129 stmt_vec_infos from an SSA_NAME definition.
9130 (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
9131 (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
9132 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
9133 (vectorizable_store, vectorizable_load, vectorizable_condition)
9134 (vectorizable_comparison): Likewise.
9135 * tree-vect-loop.c (vectorize_fold_left_reduction): Likewise.
9136 (vectorizable_reduction): Likewise.
9138 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
9140 * tree-vectorizer.h (vect_is_simple_use): Add an optional
9141 stmt_vec_info * parameter before the optional gimple **.
9142 * tree-vect-stmts.c (vect_is_simple_use): Likewise.
9143 (process_use, vect_get_vec_def_for_operand_1): Update callers.
9144 (vect_get_vec_def_for_operand, vectorizable_shift): Likewise.
9145 * tree-vect-loop.c (vectorizable_reduction): Likewise.
9146 (vectorizable_live_operation): Likewise.
9147 * tree-vect-patterns.c (type_conversion_p): Likewise.
9148 (vect_look_through_possible_promotion): Likewise.
9149 (vect_recog_rotate_pattern): Likewise.
9150 * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
9152 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
9154 * tree-vectorizer.h (stmt_vec_info): Temporarily change from
9155 a typedef to a wrapper class.
9156 (NULL_STMT_VEC_INFO): New macro.
9157 (vec_info::stmt_infos): Change to vec<stmt_vec_info>.
9158 (stmt_vec_info::operator*): New function.
9159 (stmt_vec_info::operator gimple *): Likewise.
9160 (set_vinfo_for_stmt): Use NULL_STMT_VEC_INFO.
9161 (add_stmt_costs): Likewise.
9162 * tree-vect-loop-manip.c (iv_phi_p): Likewise.
9163 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
9164 (vect_get_known_peeling_cost): Likewise.
9165 (vect_estimate_min_profitable_iters): Likewise.
9166 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
9167 * tree-vect-slp.c (vect_remove_slp_scalar_calls): Likewise.
9168 * tree-vect-stmts.c (vect_build_gather_load_calls): Likewise.
9169 (vectorizable_store, free_stmt_vec_infos): Likewise.
9170 (new_stmt_vec_info): Change return type of xcalloc to
9173 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
9175 * tree-vectorizer.h (vec_info::lookup_single_use): Declare.
9176 * tree-vectorizer.c (vec_info::lookup_single_use): New function.
9177 * tree-vect-loop.c (vectorizable_reduction): Use it instead of
9178 a single_imm_use-based sequence.
9179 * tree-vect-stmts.c (supportable_widening_operation): Likewise.
9181 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
9183 * tree-vectorizer.h (vec_info::lookup_def): Declare.
9184 * tree-vectorizer.c (vec_info::lookup_def): New function.
9185 * tree-vect-patterns.c (vect_get_internal_def): Use it.
9186 (vect_widened_op_tree): Likewise.
9187 * tree-vect-stmts.c (vect_is_simple_use): Likewise.
9188 * tree-vect-loop.c (vect_analyze_loop_operations): Likewise.
9189 (vectorizable_reduction): Likewise.
9190 (vect_valid_reduction_input_p): Take a stmt_vec_info instead
9192 (vect_is_slp_reduction): Update calls accordingly. Use
9193 vec_info::lookup_def.
9194 (vect_is_simple_reduction): Likewise
9195 * tree-vect-slp.c (vect_detect_hybrid_slp_1): Use vec_info::lookup_def.
9197 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
9199 * tree-vectorizer.h (vec_info::lookup_stmt): Declare.
9200 * tree-vectorizer.c (vec_info::lookup_stmt): New function.
9201 * tree-vect-loop.c (vect_determine_vf_for_stmt): Use it instead
9203 (vect_determine_vectorization_factor, vect_analyze_scalar_cycles_1)
9204 (vect_compute_single_scalar_iteration_cost, vect_analyze_loop_form)
9205 (vect_update_vf_for_slp, vect_analyze_loop_operations)
9206 (vect_is_slp_reduction, vectorizable_induction)
9207 (vect_transform_loop_stmt, vect_transform_loop): Likewise.
9208 * tree-vect-patterns.c (vect_init_pattern_stmt):
9209 (vect_determine_min_output_precision_1, vect_determine_precisions)
9210 (vect_pattern_recog): Likewise.
9211 * tree-vect-stmts.c (vect_analyze_stmt, vect_transform_stmt): Likewise.
9212 * config/powerpcspe/powerpcspe.c (rs6000_density_test): Likewise.
9213 * config/rs6000/rs6000.c (rs6000_density_test): Likewise.
9214 * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
9215 (vect_detect_hybrid_slp_1, vect_detect_hybrid_slp_2)
9216 (vect_detect_hybrid_slp): Likewise. Change the walk_stmt_info
9217 info field from a loop to a loop_vec_info.
9219 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
9221 * tree-vectorizer.h (stmt_vec_info): Move typedef earlier in file.
9222 (vec_info::add_stmt): Declare.
9223 * tree-vectorizer.c (vec_info::add_stmt): New function.
9224 * tree-vect-data-refs.c (vect_create_data_ref_ptr): Use it.
9225 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Likewise.
9226 (vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
9227 (vectorizable_induction): Likewise.
9228 * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Likewise.
9229 * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
9230 (vectorizable_simd_clone_call, vectorizable_store): Likewise.
9231 (vectorizable_load): Likewise.
9232 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
9233 (vect_recog_bool_pattern, vect_recog_mask_conversion_pattern)
9234 (vect_recog_gather_scatter_pattern): Likewise.
9235 (append_pattern_def_seq): Likewise. Remove a check that is
9236 performed by add_stmt itself.
9238 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
9240 * tree-vect-loop.c (vectorizable_reduction): Fix an instance in
9241 which make_ssa_name was called with new_stmt before new_stmt
9244 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
9246 * tree-vect-loop.c (vect_valid_reduction_input_p): New function,
9248 (vect_is_slp_reduction): ...here...
9249 (vect_is_simple_reduction): ...and here. Remove repetition of tests
9250 that are already known to be false.
9252 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
9254 * tree-vectorizer.h (vect_free_slp_instance): Add a final_p parameter.
9255 * tree-vect-slp.c (vect_free_slp_tree): Likewise. Don't update
9256 STMT_VINFO_NUM_SLP_USES when it's true.
9257 (vect_free_slp_instance): Add a final_p parameter and pass it to
9259 (vect_build_slp_tree_2): Update call to vect_free_slp_instance.
9260 (vect_analyze_slp_instance): Likewise.
9261 (vect_slp_analyze_operations): Likewise.
9262 (vect_slp_analyze_bb_1): Likewise.
9263 * tree-vectorizer.c (vec_info): Likewise.
9264 * tree-vect-loop.c (vect_transform_loop): Likewise.
9266 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
9268 * tree-vect-loop.c (vectorizable_reduction): Assert that the
9269 function is not called for second and subsequent members of
9272 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
9274 * tree-vect-loop.c (get_initial_def_for_reduction): Move special
9275 cases for nested loops from here to ...
9276 (vect_create_epilog_for_reduction): ...here. Only call
9277 vect_is_simple_use for inner-loop reductions.
9279 2018-07-31 Martin Liska <mliska@suse.cz>
9281 PR gcov-profile/85338
9282 PR gcov-profile/85350
9283 PR gcov-profile/85372
9284 * profile.c (struct location_triplet): New.
9285 (struct location_triplet_hash): Likewise.
9286 (output_location): Do not output a BB that
9287 is already recorded for a line.
9288 (branch_prob): Use streamed_locations.
9290 2018-07-31 Martin Liska <mliska@suse.cz>
9292 PR gcov-profile/85370
9293 * coverage.c (coverage_begin_function): Do not mark target
9294 clones as artificial functions.
9296 2018-07-31 Martin Liska <mliska@suse.cz>
9298 PR gcov-profile/83813
9299 PR gcov-profile/84758
9300 PR gcov-profile/85217
9301 PR gcov-profile/85332
9302 * profile.c (branch_prob): Do not record GOTO expressions
9303 for GIMPLE statements which locations are already streamed.
9305 2018-07-31 Olivier Hainque <hainque@adacore.com>
9307 * gcc.c (handle_spec_function): Accept a soft_matched_part
9308 argument, as do_spec_1. Pass it down to ...
9309 (eval_spec_function): Accept a soft_matched_part argument,
9310 and pass it down to ...
9311 (do_spec_2): Accept a soft_matched_part argument, and pass
9312 it down to do_spec_1.
9313 (do_spec_1): Pass soft_matched_part to handle_spec_function.
9314 (handle_braces): Update call to handle_spec_function.
9315 (driver::set_up_specs): Update calls to do_spec_2.
9316 (compare_debug_dump_opt_spec_function): Likewise.
9317 (compare_debug_self_opt_spec_function): Likewise.
9319 2018-07-31 Olivier Hainque <hainque@adacore.com>
9321 * common.opt (nolibc): New option.
9322 * doc/invoke.texi (Link Options): Document it.
9323 * gcc.c (LINK_GCC_C_SEQUENCE_SPEC): Honor nolibc.
9324 * config/alpha/linux.h: Likewise.
9325 * config/arc/elf.h: Likewise.
9326 * config/arm/uclinux-elf.h: Likewise.
9327 * config/arm/unknown-elf.h: Likewise.
9328 * config/avr/avrlibc.h: Likewise.
9329 * config/bfin/bfin.h: Likewise.
9330 * config/bfin/linux.h: Likewise.
9331 * config/bfin/uclinux.h: Likewise.
9332 * config/darwin.h: Likewise.
9333 * config/darwin10.h: Likewise.
9334 * config/darwin12.h: Likewise.
9335 * config/gnu-user.h: Likewise.
9336 * config/lm32/uclinux-elf.h: Likewise.
9337 * config/pa/pa-hpux11.h: Likewise.
9338 * config/pa/pa64-hpux.h: Likewise.
9339 * config/sparc/sparc.h: Likewise.
9341 2018-07-31 Olivier Hainque <hainque@adacore.com>
9343 * gcc.c (getenv_spec_function): Prepend '/' to value for allowed
9344 undefined variables.
9346 2018-07-30 Segher Boessenkool <segher@kernel.crashing.org>
9349 * config/arm/arm.c (arm_block_set_aligned_vect): Use gen_int_mode
9352 2018-07-30 Bernd Edlinger <bernd.edlinger@hotmail.de>
9354 * tree-ssa-forwprop.c (simplify_builtin_call): Don't create a not NUL
9355 terminated string literal.
9357 2018-07-30 Segher Boessenkool <segher@kernel.crashing.org>
9359 PR rtl-optimization/85160
9360 * combine.c (is_just_move): New function.
9361 (try_combine): Allow combining two instructions into two if neither of
9362 the original instructions was a move.
9364 2018-07-30 Alexander Monakov <amonakov@ispras.ru>
9367 * doc/extend.texi (Global Register Variables): Discourage use of type
9369 (Local Register Variables): Likewise.
9371 2018-07-30 Richard Sandiford <richard.sandiford@arm.com>
9373 PR tree-optimization/86506
9374 * hwint.h (ceil_log2): Resync with hwint.c implementation.
9376 2018-07-30 Ilya Leoshkevich <iii@linux.ibm.com>
9379 * lra-constraints.c (spill_hard_reg_in_range): When selecting the
9380 hard_regno, make sure no insn between `from` and `to` clobbers it.
9382 2018-07-30 Cesar Philippidis <cesar@codesourcery.com>
9383 Tom de Vries <tdevries@suse.de>
9385 * config/nvptx/nvptx.c (PTX_GANG_DEFAULT): Rename to ...
9386 (PTX_DEFAULT_RUNTIME_DIM): ... this.
9387 (nvptx_goacc_validate_dims): Set default worker and gang dims to
9388 PTX_DEFAULT_RUNTIME_DIM.
9389 (nvptx_dim_limit): Ignore GOMP_DIM_WORKER.
9391 2018-07-29 John David Anglin <danglin@gcc.gnu.org>
9393 * config/pa/pa.c (pa_output_addr_vec): Align address table.
9394 * config/pa/pa.h (JUMP_TABLES_IN_TEXT_SECTION): Revise comment.
9395 * config/pa/pa32-linux.h (JUMP_TABLES_IN_TEXT_SECTION): Define.
9397 2018-07-27 Michael Meissner <meissner@linux.ibm.com>
9399 * config/rs6000/constraints.md (wG constraint): Delete, no longer
9401 * config/rs6000/predicates.md (p9_fusion_reg_operand): Rename
9402 predicate to reflect toc fusion has been deleted.
9403 (toc_fusion_mem_raw): Delete, no longer used.
9404 (toc_fusion_mem_wrapped): Likewise.
9405 * config/rs6000/rs6000-cpus.def (POWERPC_MASKS): Delete toc
9407 * config/rs6000/rs6000-protos.h (fusion_wrap_memory_address):
9408 Delete, no longer used.
9409 * config/rs6000/rs6000.c (struct rs6000_reg_addr): Delete fields
9410 meant to be used for toc fusion.
9411 (rs6000_debug_print_mode): Delete toc fusion debugging.
9412 (rs6000_debug_reg_global): Likewise.
9413 (rs6000_init_hard_regno_mode_ok): Delete setting up fields for toc
9414 fusion and secondary reload support that were never used.
9415 (rs6000_option_override_internal): Delete TOC fusion, that was only
9416 partially defined, and it did not work unless you also used the
9418 (rs6000_legitimate_address_p): Delete TOC fusion support.
9419 (rs6000_opt_masks): Likewise.
9420 (fusion_wrap_memory_address): Delete function, no longer used.
9421 (fusion_split_address); Delete TOC fusion support.
9422 * config/rs6000/rs6000.h (TARGET_TOC_FUSION_INT): Delete, no
9423 longer used with toc fusion being deleted.
9424 (TARGET_TOC_FUSION_FP): Likewise.
9425 * config/rs6000/rs6000.md (UNSPEC_FUSION_ADDIS): Delete TOC fusion
9427 (toc fusion spliter): Delete TOC fusion support.
9428 (toc_fusionload_<mode>): Likewise.
9429 (toc_fusionload_di): Likewise.
9430 (fusion_gpr_load_<mode>): Delete generator function, this insn no
9431 longer needs to be named. Rename predicate to delete TOC fusion.
9432 (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
9433 (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
9434 (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
9435 (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
9436 (p9 fusion peephole2s): Rename predicate to delete TOC fusion.
9438 2018-07-27 Kelvin Nilsen <kelvin@gcc.gnu.org>
9440 * doc/extend.texi (Basic PowerPC Built-in Functions Available on
9441 ISA 2.05): Replace __uint128_t with __uint128 and __int128_t with
9442 __int128 in built-in function prototypes.
9443 (PowerPC AltiVec Built-in Functions on ISA 2.07): Likewise.
9444 (PowerPC AltiVec Built-in Functions on ISA 3.0): Likewise.
9446 2018-07-27 Martin Sebor <msebor@redhat.com>
9448 PR tree-optimization/86696
9449 * tree-ssa-strlen.c (get_min_string_length): Handle all integer
9450 types, including enums.
9451 (handle_char_store): Be prepared for the above function to fail.
9453 2018-07-26 Qing Zhao <qing.zhao@oracle.com>
9455 * builtins.c (inline_expand_builtin_string_cmp): Disable inlining
9456 when optimization level is lower than 2 or optimize for size.
9458 2018-07-26 Martin Sebor <msebor@redhat.com>
9460 PR tree-optimization/86043
9461 PR tree-optimization/86042
9462 * tree-ssa-strlen.c (handle_builtin_memcpy): Handle strict overlaps.
9463 (get_string_cst_length): Rename...
9464 (get_min_string_length): ...to this. Add argument.
9465 (handle_char_store): Extend to handle multi-character stores by
9467 * tree.c (initializer_zerop): Use new argument. Handle MEM_REF.
9468 * tree.h (initializer_zerop): Add argument.
9470 2018-07-26 Jakub Jelinek <jakub@redhat.com>
9473 * omp-low.c (scan_sharing_clauses): Don't ignore map clauses for
9474 declare target to variables if they have always,{to,from,tofrom} map
9477 2018-07-26 Martin Liska <mliska@suse.cz>
9480 * lto-wrapper.c: Add linker_output as prefix
9481 for ltrans_output_file.
9483 2018-07-26 Segher Boessenkool <segher@kernel.crashing.org>
9485 PR rtl-optimization/85805
9486 * combine.c (reg_nonzero_bits_for_combine): Only use the last set
9487 value for hard registers if that was written in the same mode.
9489 2018-07-26 Martin Liska <mliska@suse.cz>
9491 PR gcov-profile/86536
9492 * gcov.c (format_gcov): Use printf format %.*f directly
9493 and do not handle special values.
9495 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
9497 * common/config/arc/arc-common.c (arc_option_optimization_table):
9498 Update default optimizations for size.
9500 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
9502 * config/arc/arc.md (movsf_insn): Add short instruction selection.
9503 * config/arc/constraints.md (CfZ): New constraint.
9504 * config/arc/fpu.md (addssf3_fpu): Use CfZ constraint.
9505 (subsf3_fpu): Likewise.
9506 (cmpsf_fpu): Likewise.
9507 (cmpsf_fpu_uneq): Likewise.
9509 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
9511 * config/arc/arc.c (compact_memory_operand_p): Check for uncached
9513 (arc_is_uncached_mem_p): uncached applies to both the variable and
9516 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
9518 * config/arc/arc.h (ADDITIONAL_REGISTER_NAMES): Add additional
9521 2018-07-25 David Malcolm <dmalcolm@redhat.com>
9523 * optinfo-emit-json.cc (class optrecord_json_writer): Convert
9524 field "m_scopes" from vec to auto_vec.
9526 2018-07-25 Martin Liska <mliska@suse.cz>
9528 * config/powerpcspe/powerpcspe-protos.h (rs6000_loop_align): Fix
9531 2018-07-25 Richard Biener <rguenther@suse.de>
9534 * dwarf2out.c (dwarf2out_decl): Do not handle nested functions
9535 special wrt context_die late.
9536 (gen_subprogram_die): Re-use DIEs in local scope.
9538 2018-07-25 Richard Sandiford <richard.sandiford@arm.com>
9540 PR tree-optimization/86644
9541 * hwint.c (ceil_log2): Fix comment. Return 0 for 0.
9543 2018-07-25 Martin Liska <mliska@suse.cz>
9546 * dumpfile.c: And excluded values with TDF_ALL_VALUES.
9547 * dumpfile.h (enum dump_flag): Defince TDF_ALL_VALUES.
9549 2018-07-25 Martin Liska <mliska@suse.cz>
9552 * params.def: Explain ASan abbreviation and provide
9553 a documentation link.
9555 2018-07-24 Martin Sebor <msebor@redhat.com>
9557 PR tree-optimization/86622
9558 PR tree-optimization/86532
9559 * builtins.h (string_length): Declare.
9560 * builtins.c (c_strlen): Correct handling of non-constant offsets.
9561 (check_access): Be prepared for non-constant length ranges.
9562 (string_length): Make extern.
9563 * expr.c (string_constant): Only handle the minor non-constant
9564 array index. Use string_constant to compute the length of
9565 a generic string constant.
9567 2018-07-24 Richard Sandiford <richard.sandiford@arm.com>
9569 PR tree-optimization/86618
9570 * tree-vect-stmts.c (vectorizable_call): Don't take the address
9571 of LOOP_VINFO_MASKS (loop_vinfo) when loop_vinfo is null.
9573 2018-07-24 David Malcolm <dmalcolm@redhat.com>
9575 PR tree-optimization/86636
9576 * json.cc (json::object::set): Fix comment. Add assertions.
9577 (json::array::append): Move here from json.h. Add comment and an
9579 (json::string::string): Likewise.
9580 * json.h (json::array::append): Move to json.cc.
9581 (json::string::string): Likewise.
9582 * optinfo-emit-json.cc
9583 (optrecord_json_writer::impl_location_to_json): Assert that we
9584 aren't attempting to write out UNKNOWN_LOCATION, or an ad-hoc
9585 wrapper around it. Expand the location once, rather than three
9587 (optrecord_json_writer::inlining_chain_to_json): Fix the check for
9588 UNKNOWN_LOCATION, to use LOCATION_LOCUS to look through ad-hoc
9590 (optrecord_json_writer::optinfo_to_json): Likewise, in four
9591 places. Fix some overlong lines.
9593 2018-07-24 Matthew Malcomson <matthew.malcomson@arm.com>
9595 * config/aarch64/aarch64-simd.md
9596 (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>): Split into...
9597 (aarch64_<ANY_EXTEND:su>subw<mode>): ... This...
9598 (aarch64_<ANY_EXTEND:su>addw<mode>): ... And this.
9599 (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>_internal): Split into...
9600 (aarch64_<ANY_EXTEND:su>subw<mode>_internal): ... This...
9601 (aarch64_<ANY_EXTEND:su>addw<mode>_internal): ... And this.
9602 (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w2<mode>_internal): Split into...
9603 (aarch64_<ANY_EXTEND:su>subw2<mode>_internal): ... This...
9604 (aarch64_<ANY_EXTEND:su>addw2<mode>_internal): ... And this.
9606 2018-07-24 Jakub Jelinek <jakub@redhat.com>
9609 * expmed.c (expand_divmod): Punt if d == HOST_WIDE_INT_MIN
9610 and size > HOST_BITS_PER_WIDE_INT. For size > HOST_BITS_PER_WIDE_INT
9611 and abs_d == d, do the power of two handling if profitable.
9613 2018-07-24 Richard Biener <rguenther@suse.de>
9615 * match.pd: Add BIT_FIELD_REF canonicalizations.
9617 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
9620 * genmatch.c (dt_operand::gen_match_op): Avoid folding volatile values.
9622 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
9624 * gimple-fold.c (gimple_fold_builtin_printf): Don't create a not NUL
9625 terminated STRING_CST object.
9627 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
9629 hsa-dump.c (dump_hsa_symbol): Avoid out of scope access to buf.
9631 2018-07-23 Segher Boessenkool <segher@kernel.crashing.org>
9633 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Adjust.
9634 * config/rs6000/rs6000-protos.h (rs6000_split_v4si_init): Delete.
9635 * config/rs6000/rs6000.c (rs6000_expand_vector_init): Always force
9636 the elements into a register.
9637 (rs6000_split_v4si_init_di_reg): Delete.
9638 (rs6000_split_v4si_init): Delete.
9639 * config/rs6000/vsx.md (unspec): Delete UNSPEC_VSX_VEC_INIT.
9640 (vsx_init_v4si): Rewrite as a define_expand.
9642 2018-07-23 Segher Boessenkool <segher@kernel.crashing.org>
9644 * config/rs6000/rs6000.md (splitters for rldimi and rlwimi with the
9645 zero_extend argument from memory): New.
9647 2018-07-22 Martin Sebor <msebor@redhat.com>
9650 * gimple-ssa-warn-alloca.c (alloca_call_type_by_arg): Avoid
9651 diagnosing calls with unknown arguments unless -Walloca-larger-than
9652 is restricted to less than PTRDIFF_MAX bytes.
9654 2018-07-22 Gerald Pfeifer <gerald@pfeifer.com>
9656 * doc/gcov.texi (Invoking Gcov): Editorial changes.
9658 2018-07-20 David Malcolm <dmalcolm@redhat.com>
9660 * pretty-print.c (text_info::set_location): Remove redundant
9661 "line_table" parameter from call to rich_location::set_range.
9663 2018-07-20 Martin Sebor <msebor@redhat.com>
9666 * builtins.c (expand_builtin_alloca): Adjust.
9667 * calls.c (alloc_max_size): Simplify.
9668 * cgraphunit.c (cgraph_node::expand): Adjust.
9669 * common.opt (larger_than_size, warn_frame_larger_than): Remove
9671 (frame_larger_than_size): Same.
9672 (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Change options
9673 to take a HOST_WIDE_INT argument and accept a byte-size suffix.
9675 * doc/invoke.texi (GCC Command Options): Document option arguments.
9676 Explain byte-size arguments and suffixes.
9677 (-Wvla-larger-than, -Wno-alloc-size-larger-than): Update.
9678 (-Wno-alloca-larger-than, -Wno-vla-larger-than): Same.
9679 (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Same.
9680 * doc/options.texi (UInteger): Expand.
9681 (Host_Wide_Int, ByteSize): Document new properties.
9682 * final.c (final_start_function_1): Include sizes in an error message.
9683 * function.c (frame_offset_overflow): Same.
9684 * gimple-ssa-warn-alloca.c (pass_walloca::gate): Adjust.
9685 (alloca_call_type_by_arg): Change function argument to HOST_WIDE_INT.
9686 Diagnose unbounded alloca calls only for limits of less than
9688 (alloca_call_type): Adjust. Diagnose possibly out-of-bounds alloca
9689 calls and VLA size only for limits of less than PTRDIFF_MAX. Same
9691 (pass_walloca::execute): Adjust. Diagnose alloca calls in loops
9692 only for limits of less than PTRDIFF_MAX.
9693 * langhooks-def.h (lhd_handle_option): Change function argument
9695 * langhooks.c (lhd_handle_option): Same.
9696 * langhooks.h (handle_option): Same.
9697 * opt-functions.awk (switch_bit_fields): Handle Host_Wide_Int and
9699 (var_type, var_type_struct): Same.
9700 (var_set): Handle ByteSize flag.
9701 * optc-gen.awk: Add comments to output to ease debugging. Make
9702 use of HOST_WIDE_INT where appropriate.
9703 * opts-gen-save.awk: Use %lx to format unsigned long.
9704 * opth-gen.awk: Change function argument to HOST_WIDE_INT.
9705 * opts-common.c (integral_argument): Return HOST_WIDE_INT and add
9706 arguments. Parse bytes-size suffixes.
9707 (enum_arg_to_value): Change function argument to HOST_WIDE_INT.
9708 (enum_value_to_arg): Same.
9709 (decode_cmdline_option): Handle cl_host_wide_int. Adjust.
9710 (handle_option): Adjust.
9711 (generate_option): Change function argument to HOST_WIDE_INT.
9712 (cmdline_handle_error): Adjust.
9713 (read_cmdline_option): Change function argument to HOST_WIDE_INT.
9714 (set_option): Change function argument to HOST_WIDE_INT.
9715 (option_enabled): Handle cl_host_wide_int.
9716 (get_option_state): Handle CLVC_SIZE.
9717 (control_warning_option): Same.
9718 * opts.c (common_handle_option): Change function argument to
9719 HOST_WIDE_INT. Remove handling of OPT_Walloca_larger_than_ and
9720 OPT_Wvla_larger_than_.
9721 * opts.h (enum cl_var_type): Add an enumerator.
9722 * stor-layout.c (layout_decl): Print a more meaningful warning.
9723 * toplev.c (output_stack_usage): Adjust.
9725 2018-07-20 Qing Zhao <qing.zhao@oracle.com>
9727 * builtins.c (expand_builtin_memcmp): Delete the last parameter for
9728 call to inline_expand_builtin_string_cmp.
9729 (expand_builtin_strcmp): Likewise.
9730 (expand_builtin_strncmp): Likewise.
9731 (inline_string_cmp): Delete the last parameter, change char_type_node
9732 to unsigned_char_type_node for strcmp/strncmp, add conversions to the
9734 (inline_expand_builtin_string_cmp): Delete the last parameter, give up
9735 the inlining expansion on target where the type of the call has same or
9736 narrower precision than unsigned char.
9738 2018-07-20 David Malcolm <dmalcolm@redhat.com>
9740 * Makefile.in (OBJS): Add json.o and optinfo-emit-json.o.
9741 (CFLAGS-optinfo-emit-json.o): Define TARGET_NAME.
9742 * common.opt (fsave-optimization-record): New option.
9743 * coretypes.h (struct kv_pair): Move here from dumpfile.c.
9744 * doc/invoke.texi (-fsave-optimization-record): New option.
9745 * dumpfile.c: Include "optinfo-emit-json.h".
9746 (struct kv_pair): Move to coretypes.h.
9747 (optgroup_options): Make non-static.
9748 (dump_context::end_scope): Call
9749 optimization_records_maybe_pop_dump_scope.
9750 * dumpfile.h (optgroup_options): New decl.
9751 * json.cc: New file.
9753 * optinfo-emit-json.cc: New file.
9754 * optinfo-emit-json.h: New file.
9755 * optinfo.cc: Include "optinfo-emit-json.h".
9756 (optinfo::emit): Call optimization_records_maybe_record_optinfo.
9757 (optinfo_enabled_p): Check optimization_records_enabled_p.
9758 (optinfo_wants_inlining_info_p): Likewise.
9759 * optinfo.h: Update comment.
9760 * profile-count.c (profile_quality_as_string): New function.
9761 * profile-count.h (profile_quality_as_string): New decl.
9762 (profile_count::quality): New accessor.
9763 * selftest-run-tests.c (selftest::run_tests): Call json_cc_tests
9764 and optinfo_emit_json_cc_tests.
9765 * selftest.h (selftest::json_cc_tests): New decl.
9766 (selftest::optinfo_emit_json_cc_tests): New decl.
9767 * toplev.c: Include "optinfo-emit-json.h".
9768 (compile_file): Call optimization_records_finish.
9769 (do_compile): Call optimization_records_start.
9770 * tree-ssa-live.c: Include optinfo.h.
9771 (remove_unused_scope_block_p): Retain inlining information if
9772 optinfo_wants_inlining_info_p returns true.
9774 2018-07-20 Richard Biener <rguenther@suse.de>
9777 * dwarf2out.c (dwarf2out_die_ref_for_decl): Test in_lto_p
9778 to cover -flto-partition=none.
9780 2018-07-20 Martin Liska <mliska@suse.cz>
9782 * tree.h (DECL_LOCATION_RANGE): Remove unused macro.
9783 (get_decl_source_range): Remove unused function.
9785 2018-07-20 Richard Biener <rguenther@suse.de>
9787 * tree-ssa-sccvn.h (struct vn_nary_op_s): Add next member.
9788 (struct vn_phi_s): Likewise.
9789 (struct vn_reference_s): Likewise.
9790 * tree-ssa-sccvn.c (vn_nary_op_hasher::equal): Add shortcut
9791 for searching the slot of an entry known to be in the hash itself.
9792 (vn_phi_hasher::equal): Likewise.
9793 (vn_reference_hasher::equal): Likewise.
9794 (last_inserted_ref, last_inserted_phi, last_inserted_nary): New
9796 (optimistic_info, current_info): Remove, keeping only valid_info.
9797 (vn_reference_lookup_1): Remove fallback lookup.
9798 (vn_reference_lookup_2): Likewise.
9799 (vn_nary_op_lookup_1): Likewise.
9800 (vn_phi_lookup): Likewise.
9801 (vn_nary_build_or_lookup_1): Make sure to not chain the built
9803 (vn_reference_insert): Adjust, chain the inserted hash element
9804 at last_inserted_ref.
9805 (vn_reference_insert_pieces): Likewise.
9806 (visit_reference_op_call): Likewise.
9807 (vn_nary_op_insert_into): Chain the inserted hash element at
9809 (vn_nary_op_insert_pieces): Adjust.
9810 (vn_nary_op_insert): Likewise.
9811 (vn_nary_op_insert_stmt): Likewise.
9812 (vn_phi_insert): Adjust, chain the inserted hash element at
9814 (process_scc): Remove clearing and copying the optimistic
9815 table. Instead remove elements inserted during an optimistic
9816 iteration from the single table we maintain.
9817 (init_scc_vn): Adjust.
9818 (free_scc_vn): Likewise.
9819 (sccvn_dom_walker::record_cond): Likewise.
9820 (sccvn_dom_walker::after_dom_children): Likewise.
9822 2018-07-19 Martin Sebor <msebor@redhat.com>
9824 PR tree-optimization/84047
9825 PR tree-optimization/83776
9826 * tree-vrp.c (vrp_prop::check_mem_ref): New function.
9827 (check_array_bounds): Call it.
9829 2018-07-19 Martin Sebor <msebor@redhat.com>
9831 * align.h (align_flags): Use member initialization.
9833 2018-07-19 David Malcolm <dmalcolm@redhat.com>
9835 * Makefile.in (OBJS): Add optinfo.o.
9836 * coretypes.h (class symtab_node): New forward decl.
9837 (struct cgraph_node): New forward decl.
9838 (class varpool_node): New forward decl.
9839 * dump-context.h: New file.
9840 * dumpfile.c: Include "optinfo.h", "dump-context.h", "cgraph.h",
9842 (refresh_dumps_are_enabled): Use optinfo_enabled_p.
9843 (set_dump_file): Call dumpfile_ensure_any_optinfo_are_flushed.
9844 (set_alt_dump_file): Likewise.
9845 (dump_context::~dump_context): New dtor.
9846 (dump_gimple_stmt): Move implementation to...
9847 (dump_context::dump_gimple_stmt): ...this new member function.
9848 Add the stmt to any pending optinfo, creating one if need be.
9849 (dump_gimple_stmt_loc): Move implementation to...
9850 (dump_context::dump_gimple_stmt_loc): ...this new member function.
9851 Start a new optinfo and add the stmt to it.
9852 (dump_gimple_expr): Move implementation to...
9853 (dump_context::dump_gimple_expr): ...this new member function.
9854 Add the stmt to any pending optinfo, creating one if need be.
9855 (dump_gimple_expr_loc): Move implementation to...
9856 (dump_context::dump_gimple_expr_loc): ...this new member function.
9857 Start a new optinfo and add the stmt to it.
9858 (dump_generic_expr): Move implementation to...
9859 (dump_context::dump_generic_expr): ...this new member function.
9860 Add the tree to any pending optinfo, creating one if need be.
9861 (dump_generic_expr_loc): Move implementation to...
9862 (dump_context::dump_generic_expr_loc): ...this new member
9863 function. Add the tree to any pending optinfo, creating one if
9865 (dump_printf): Move implementation to...
9866 (dump_context::dump_printf_va): ...this new member function. Add
9867 the text to any pending optinfo, creating one if need be.
9868 (dump_printf_loc): Move implementation to...
9869 (dump_context::dump_printf_loc_va): ...this new member function.
9870 Start a new optinfo and add the stmt to it.
9871 (dump_dec): Move implementation to...
9872 (dump_context::dump_dec): ...this new member function. Add the
9873 value to any pending optinfo, creating one if need be.
9874 (dump_context::dump_symtab_node): New member function.
9875 (dump_context::get_scope_depth): New member function.
9876 (dump_context::begin_scope): New member function.
9877 (dump_context::end_scope): New member function.
9878 (dump_context::ensure_pending_optinfo): New member function.
9879 (dump_context::begin_next_optinfo): New member function.
9880 (dump_context::end_any_optinfo): New member function.
9881 (dump_context::s_current): New global.
9882 (dump_context::s_default): New global.
9883 (dump_scope_depth): Delete global.
9884 (dumpfile_ensure_any_optinfo_are_flushed): New function.
9885 (dump_symtab_node): New function.
9886 (get_dump_scope_depth): Reimplement in terms of dump_context.
9887 (dump_begin_scope): Likewise.
9888 (dump_end_scope): Likewise.
9889 (selftest::temp_dump_context::temp_dump_context): New ctor.
9890 (selftest::temp_dump_context::~temp_dump_context): New dtor.
9891 (selftest::verify_item): New function.
9892 (ASSERT_IS_TEXT): New macro.
9893 (ASSERT_IS_TREE): New macro.
9894 (ASSERT_IS_GIMPLE): New macro.
9895 (selftest::test_capture_of_dump_calls): New test.
9896 (selftest::dumpfile_c_tests): Call it.
9897 * dumpfile.h (dump_printf, dump_printf_loc, dump_basic_block)
9898 (dump_generic_expr_loc, dump_generic_expr, dump_gimple_stmt_loc)
9899 (dump_gimple_stmt, dump_dec): Gather these related decls and add a
9900 descriptive comment.
9901 (dump_function, print_combine_total_stats, enable_rtl_dump_file)
9902 (dump_node, dump_bb): Move these unrelated decls.
9903 (class dump_manager): Add leading comment.
9904 * optinfo.cc: New file.
9905 * optinfo.h: New file.
9907 2018-07-19 Michael Collison <michael.collison@arm.com>
9908 Richard Henderson <rth@redhat.com>
9910 * config/aarch64/aarch64.md (subv<GPI>4, usubv<GPI>4): New patterns.
9911 (subti): Handle op1 zero.
9912 (subvti4, usub4ti4): New.
9913 (*sub<GPI>3_compare1_imm): New.
9914 (sub<GPI>3_carryinCV): New.
9915 (*sub<GPI>3_carryinCV_z1_z2, *sub<GPI>3_carryinCV_z1): New.
9916 (*sub<GPI>3_carryinCV_z2, *sub<GPI>3_carryinCV): New.
9918 2018-07-19 Michael Collison <michael.collison@arm.com>
9919 Richard Henderson <rth@redhat.com>
9921 * config/aarch64/aarch64.md: (addv<GPI>4, uaddv<GPI>4): New.
9922 (addti3): Create simpler code if low part is already known to be 0.
9923 (addvti4, uaddvti4): New.
9924 (*add<GPI>3_compareC_cconly_imm): New.
9925 (*add<GPI>3_compareC_cconly): New.
9926 (*add<GPI>3_compareC_imm): New.
9927 (*add<GPI>3_compareC): Rename from add<GPI>3_compare1; do not
9928 handle constants within this pattern..
9929 (*add<GPI>3_compareV_cconly_imm): New.
9930 (*add<GPI>3_compareV_cconly): New.
9931 (*add<GPI>3_compareV_imm): New.
9932 (add<GPI>3_compareV): New.
9933 (add<GPI>3_carryinC, add<GPI>3_carryinV): New.
9934 (*add<GPI>3_carryinC_zero, *add<GPI>3_carryinV_zero): New.
9935 (*add<GPI>3_carryinC, *add<GPI>3_carryinV): New.
9936 ((*add<GPI>3_compareC_cconly_imm): Replace 'ne' operator
9937 with 'comparison' operator.
9938 (*add<GPI>3_compareV_cconly_imm): Ditto.
9939 (*add<GPI>3_compareV_cconly): Ditto.
9940 (*add<GPI>3_compareV_imm): Ditto.
9941 (add<GPI>3_compareV): Ditto.
9942 (add<mode>3_carryinC): Ditto.
9943 (*add<mode>3_carryinC_zero): Ditto.
9944 (*add<mode>3_carryinC): Ditto.
9945 (add<mode>3_carryinV): Ditto.
9946 (*add<mode>3_carryinV_zero): Ditto.
9947 (*add<mode>3_carryinV): Ditto.
9949 2018-07-19 Michael Collison <michael.collison@arm.com>
9950 Richard Henderson <rth@redhat.com>
9952 * config/aarch64/aarch64-modes.def (CC_V): New.
9953 * config/aarch64/aarch64-protos.h
9954 (aarch64_addti_scratch_regs): Declare
9955 (aarch64_subvti_scratch_regs): Declare.
9956 (aarch64_expand_subvti): Declare.
9957 (aarch64_gen_unlikely_cbranch): Declare
9958 * config/aarch64/aarch64.c (aarch64_select_cc_mode): Test
9959 for signed overflow using CC_Vmode.
9960 (aarch64_get_condition_code_1): Handle CC_Vmode.
9961 (aarch64_gen_unlikely_cbranch): New function.
9962 (aarch64_addti_scratch_regs): New function.
9963 (aarch64_subvti_scratch_regs): New function.
9964 (aarch64_expand_subvti): New function.
9966 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
9968 * config/aarch64/aarch64-option-extensions.def: New entry for profile
9970 * config/aarch64/aarch64.h (AARCH64_FL_PROFILE): New.
9971 * doc/invoke.texi (aarch64-feature-modifiers): New entry for profile
9974 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
9977 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
9978 address check not strict.
9980 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
9982 * config/aarch64/aarch64-simd.md (aarch64_simd_mov<VQ:mode>): Replace
9984 (store_pair_lanes<mode>): Likewise.
9985 * config/aarch64/aarch64-protos.h (aarch64_addr_query_type): Add new
9986 enum value 'ADDR_QUERY_LDP_STP_N'.
9987 * config/aarch64/aarch64.c (aarch64_addr_query_type): Likewise.
9988 (aarch64_print_address_internal): Add declaration.
9989 (aarch64_print_ldpstp_address): Remove.
9990 (aarch64_classify_address): Adapt mode for 'ADDR_QUERY_LDP_STP_N'.
9991 (aarch64_print_operand): Change printing of 'y'.
9992 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Use
9993 new enum value 'ADDR_QUERY_LDP_STP_N', don't hardcode mode and use
9994 'true' rather than '1'.
9995 * config/aarch64/constraints.md (Uml): Likewise.
9996 (Uml): Rename to Umn.
9999 2018-07-19 Richard Biener <rguenther@suse.de>
10001 * tree-ssa-sccvn.h (struct vn_phi_s): Make phiargs member
10003 * tree-ssa-sccvn.c: Remove alloc-pool.h use.
10004 (vn_phi_hasher): Derive from nofree_ptr_hash and remove remove method.
10005 (vn_reference_hasher): Likewise.
10006 (struct vn_tables_s): Remove obstack and alloc-pool members.
10007 (vn_tables_obstack, vn_tables_insert_obstack): New global obstacks.
10008 (vn_nary_build_or_lookup_1): Manually build in vn_tables_insert_obstack.
10009 (vn_reference_insert): Allocate from obstack instead of from alloc-pool.
10010 (vn_reference_insert_pieces): Likewise.
10011 (alloc_vn_nary_op_noinit): Adjust.
10012 (vn_nary_op_insert_stmt): Allocate phiargs in-place.
10013 (vn_phi_eq): Adjust.
10014 (shared_lookup_phiargs): Remove.
10015 (vn_phi_lookup): Allocate temporary vn_phi_s on the stack.
10016 (vn_phi_insert): Allocate from obstack instead of from alloc-pool.
10017 (visit_reference_op_call): Likewise.
10018 (copy_nary, copy_phi, copy_reference): Remove.
10019 (process_scc): Rewind the obstack when iterating. Do not
10020 copy the elements to valid_info but just move them from one
10021 hashtable to the other.
10022 (allocate_vn_table): Adjust.
10023 (free_vn_table): Likewise.
10024 (init_scc_vn): Likewise.
10025 (free_scc_vn): Likewise.
10027 2018-07-19 H.J. Lu <hongjiu.lu@intel.com>
10030 * config/i386/i386.c (rest_of_insert_endbranch): Lookup
10031 indirect_return as function type attribute.
10032 (ix86_attribute_table): Change indirect_return to function
10034 * doc/extend.texi: Update indirect_return attribute.
10036 2018-07-19 Aldy Hernandez <aldyh@redhat.com>
10038 * wide-int.h (widest2_int): New.
10039 * gimple-fold.c (arith_overflowed_p): Use it.
10040 * tree.h (widest2_int_cst): New.
10041 * tree-vrp.c (wide_int_binop_overflow): Rename from
10042 vrp_int_const_binop.
10043 Rewrite to work on trees.
10044 (extract_range_from_multiplicative_op_1): Abstract code to...
10045 (wide_int_range_min_max): ...here.
10046 (wide_int_range_cross_product): ...and here.
10047 (extract_range_from_binary_expr_1): Abstract overflow code to...
10048 (wide_int_range_mult_wrapping): ...here.
10049 * tree-vrp.h (wide_int_range_cross_product): New.
10050 (wide_int_range_mult_wrapping): New.
10052 2018-07-19 Andrew Senkevich <andrew.senkevich@intel.com>
10053 Julia Koval <julia.koval@intel.com>
10055 * config/i386/x86-tune-costs.h (skylake_memcpy,
10056 skylake_memset): Replace rep_prefix with unrolling for size 512.
10058 2018-07-18 Kugan Vivekanandarajah <kuganv@linaro.org>
10060 PR middle-end/86544
10061 * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): Handle
10062 comparision with EQ_EXPR in last stmt.
10064 2018-07-18 Kelvin Nilsen <kelvin@gcc.gnu.org>
10066 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Rename
10067 this subsection to "PowerPC AltiVec/VSX Built-in Functions".
10068 (PowerPC AltiVec/VSX Built-in Functions): New name for subsection
10069 previously known as "PowerPC AltiVec Built-in Functions". Move
10070 some material to new subsubsections "PowerPC AltiVec Built-in
10071 Functions on ISA 2.06" and "PowerPC AltiVec Built-in Functions on
10073 (PowerPC Altivec Built-in Functions on ISA 2.05): New subsubsection.
10074 (PowerPC Altivec Built-in Functions on ISA 2.06): Likewise.
10075 (PowerPC Altivec Built-in Functions on ISA 2.07): Likewise.
10076 (PowerPC Altivec Built-in Functions on ISA 3.0): Likewise.
10078 2018-07-18 Richard Biener <rguenther@suse.de>
10080 PR tree-optimization/86557
10081 * tree-vect-patterns.c (vect_recog_divmod_pattern): Also handle
10084 2018-07-18 Ilya Leoshkevich <iii@linux.ibm.com>
10086 * config/s390/s390.c (s390_function_profiler): Generate CFI.
10088 2018-07-17 Jeff Law <law@redhat.com>
10090 * config/arm/arm.c (get_label_padding): Update for recent
10091 changes to label_to_alignment.
10093 PR tree-optimization/86010
10094 * tree-ssa-dse.c (compute_trims): Fix typo/thinko.
10096 * config/mips/mips.c (vr4130_align_insns): Update for recent
10097 changes to label_to_alignment.
10099 * config/frv/frv.c (frv_label_align): Update for recent changes
10100 to label_to_alignment.
10102 * config/nios2/nios2.c (nios2_label_align): Update for recent
10103 changes which dropped ALIGN_LABELS_LOG.
10105 2018-07-17 Andreas Schwab <schwab@linux-m68k.org>
10107 * config/m68k/m68k.md (umulsi3_highpart+1, const_umulsi3_highpart)
10108 (smulsi3_highpart+1, const_smulsi3_highpart): Add CC_STATUS_INIT.
10110 2018-07-17 Claudiu Zissulescu <claziss@synopsys.com>
10112 * config/arc/arc.c (arc_label_align): Use align_labels instead of
10113 deprecated align_labels_log.
10115 2018-07-17 Richard Biener <rguenther@suse.de>
10118 * dwarf2out.c (init_sections_and_labels): Always generate
10119 a debug_line_str_section for early LTO debug.
10120 (dwarf2out_finish): Reset debug_line_str_hash output early.
10121 Bump counter for extra dwarf5 .debug_loc labels to not conflict
10123 (dwarf2out_early_finish): Output debug_line_str.
10125 2018-07-17 Robin Dapp <rdapp@linux.ibm.com>
10127 * config/s390/s390.c (preferred_la_operand_p): Do not use LA with
10128 index register on z196 or later.
10130 2018-07-17 Robin Dapp <rdapp@linux.ibm.com>
10132 * config/s390/s390.c (s390_default_align): Set default function
10134 (s390_override_options_after_change): Call s390_default align.
10135 (s390_option_override_internal): Call s390_default_align.
10136 (TARGET_OVERRIDE_OPTIONS_AFTER_CHANGE): Define.
10138 2018-07-17 Jakub Jelinek <jakub@redhat.com>
10140 PR middle-end/86542
10141 * omp-low.c (create_task_copyfn): Copy over also fields corresponding
10142 to _looptemp_ clauses, other than the first two.
10144 2018-07-17 Martin Liska <mliska@suse.cz>
10146 * opts.c: Do not enable OPT_falign_* for -Os.
10148 2018-07-17 Martin Liska <mliska@suse.cz>
10150 * align.h (MAX_CODE_ALIGN): New.
10151 (MAX_CODE_ALIGN_VALUE): New.
10152 * common/config/i386/i386-common.c (ix86_handle_option):
10153 (MAX_CODE_ALIGN): Moved to align.h.
10154 * final.c (MAX_CODE_ALIGN): Likewise.
10155 * opts.c (parse_and_check_align_values):
10156 (MAX_CODE_ALIGN): Likewise.
10157 (MAX_CODE_ALIGN_VALUE): Likewise.
10159 2018-07-17 Martin Liska <mliska@suse.cz>
10161 * config/i386/att.h (ASM_OUTPUT_ALIGN): Fix spacing
10162 in order to fulfil coding style.
10163 * config/i386/cygming.h (ASM_OUTPUT_ALIGN): Likewise.
10164 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
10165 * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
10166 * config/iq2000/iq2000.h (ASM_OUTPUT_ALIGN): Likewise.
10167 * config/pa/pa.h (ASM_OUTPUT_ALIGN): Likewise.
10168 * config/sparc/sol2.h (ASM_OUTPUT_ALIGN_WITH_NOP): Likewise.
10169 * config/sparc/sparc.h (ASM_OUTPUT_ALIGN): Likewise.
10170 * config/visium/visium.h (ASM_OUTPUT_ALIGN): Likewise.
10171 (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
10173 2018-07-17 Martin Liska <mliska@suse.cz>
10175 * align.h: New file.
10176 * config/alpha/alpha.c (alpha_align_insns_1): Use align_functions
10178 * config/i386/i386.c (ix86_avoid_jump_mispredicts): Use new return type
10179 align_flags of label_to_alignment.
10180 * config/m32r/m32r.h (LOOP_ALIGN): Wrap returned values into
10182 * config/m68k/m68k.c: Do not use removed align_labels_value and
10184 * config/nds32/nds32.h (JUMP_ALIGN): Wrap result into align_flags class.
10185 (LOOP_ALIGN): Likewise.
10186 (LABEL_ALIGN): Likewise.
10187 * config/powerpcspe/powerpcspe.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
10188 Remove not used macro.
10189 (rs6000_loop_align): Change return type to align_flags.
10190 (rs6000_loop_align_max_skip): Remove.
10191 * config/rs6000/rs6000-protos.h (rs6000_loop_align):
10192 Change return type to align_flags.
10193 * config/rs6000/rs6000.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
10194 Remove not used macro.
10195 (rs6000_loop_align): Change return type to align_flags.
10196 (rs6000_loop_align_max_skip): Remove.
10197 * config/rx/rx.h (JUMP_ALIGN): Wrap integer values
10198 * config/rx/rx-protos.h (rx_align_for_label): Make it
10200 * config/rx/rx.c (rx_align_for_label): Change return type
10202 (rx_max_skip_for_label): Remove TARGET_ASM_*_ALIGN_MAX_SKIP
10204 into align_flags class.
10205 (LABEL_ALIGN): Likewise.
10206 (LOOP_ALIGN): Likewise.
10207 * config/s390/s390.c (s390_label_align): Use align_flags
10209 (s390_asm_output_function_label): Likewise.
10210 * config/sh/sh.c (sh_override_options_after_change):
10211 Use align_flags class directly without macros.
10212 (find_barrier): Likewise.
10213 (barrier_align): Likewise.
10214 (sh_loop_align): Likewise.
10215 * config/spu/spu.c (spu_option_override):
10216 Use align_flags_tuple::get_value instead of removed macros.
10217 (spu_sched_init): Likewise.
10218 * config/spu/spu.h (GTY): Likewise.
10219 * config/visium/visium.c (visium_option_override):
10220 Set "8" as default secondary alignment.
10221 * config/visium/visium.h (SUBALIGN_LOG): Define to 3
10222 in order to guarantee secondary alignment of 8.
10223 * coretypes.h: Include align.h header file.
10224 * doc/tm.texi: Remove TARGET_ASM_JUMP_ALIGN_MAX_SKIP,
10225 TARGET_ASM_LOOP_ALIGN_MAX_SKIP, TARGET_ASM_LABEL_ALIGN_MAX_SKIP
10226 and TARGET_ASM_LABEL_ALIGN_AFTER_BARRIER_MAX_SKIP macros.
10227 * doc/tm.texi.in: Likewise.
10228 * final.c (struct label_alignment): Remove not used structure.
10229 (LABEL_ALIGN): Change type to align_flags.
10230 (LOOP_ALIGN): Likewise.
10231 (JUMP_ALIGN): Likewise.
10232 (default_loop_align_max_skip): Remove.
10233 (default_label_align_max_skip): Likewise.
10234 (default_jump_align_max_skip): Likewise.
10235 (default_label_align_after_barrier_max_skip):
10236 (LABEL_TO_ALIGNMENT): Change to access label_align vector.
10237 (LABEL_TO_MAX_SKIP): Remove.
10238 (label_to_alignment): Return align_flags type instead of integer.
10239 (label_to_max_skip): Remove.
10240 (align_fuzz): Use align_flags type.
10241 (compute_alignments): Use align_flags type and use align_flags::max
10242 to combine multiple alignments.
10243 (grow_label_align): Grow vec instead of C array.
10244 (update_alignments): Assign just LABEL_TO_ALIGNMENT.
10245 (shorten_branches): Use align_flags type and use align_flags::max
10246 to combine multiple alignments.
10247 (final_scan_insn_1): Remove usage of secondary alignment that comes
10248 from label alignment, but instead use proper secondary alignment
10249 which is computed in grow_label_align.
10250 * flags.h (struct align_flags_tuple): Move to align.h.
10251 (struct align_flags): Likewise.
10252 (state_align_loops): Rename to align_loops.
10253 (state_align_jumps): Rename to align_jumps.
10254 (state_align_labels): Rename to align_labels.
10255 (state_align_functions): Rename to align_functions.
10256 (align_loops_log): Remove.
10257 (align_jumps_log): Remove.
10258 (align_labels_log): Remove.
10259 (align_functions_log): Remove.
10260 (align_loops_max_skip): Remove.
10261 (align_jumps_max_skip): Remove.
10262 (align_labels_max_skip): Remove.
10263 (align_functions_max_skip): Remove.
10264 (align_loops_value): Remove.
10265 (align_jumps_value): Remove.
10266 (align_labels_value): Remove.
10267 (align_functions_value): Remove.
10268 * output.h (label_to_alignment): Change return type to align_flags.
10269 (label_to_max_skip): Remove.
10270 * target.def: Remove loop_align_max_skip, label_align_max_skip,
10271 jump_align_max_skip macros.
10272 * targhooks.h (default_loop_align_max_skip): Remove.
10273 (default_label_align_max_skip): Likewise.
10274 (default_jump_align_max_skip): Likewise.
10275 (default_label_align_after_barrier_max_skip): Remove.
10276 * toplev.c (read_log_maxskip): Use ::normalize function.
10277 (parse_N_M): Remove not used argument and also call ::normalize.
10278 (parse_alignment_opts): Do not pass unused arguments.
10279 * varasm.c (assemble_start_function): Use directly align_functions
10280 instead of removed macros.
10281 * system.h: Do not poison removed macros.
10283 2018-07-17 Jakub Jelinek <jakub@redhat.com>
10285 PR middle-end/86539
10286 * gimplify.c (gimplify_omp_for): Ensure taskloop firstprivatized init
10287 and cond temporaries don't have reference type if iterator has
10288 pointer type. For init use &for_pre_body instead of pre_p if
10289 for_pre_body is non-empty.
10291 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
10293 * config/rs6000/rs6000.md (trunc<mode>sf2): Expand truncates of
10294 double-double modes to SFmode directly directly.
10295 (trunc<mode>sf2_fprs): Delete.
10297 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
10299 * config/rs6000/rs6000.c (init_float128_ibm): Use the correct names
10300 for conversions between IFmode and the decimal floating point modes.
10301 (init_float128_ieee): Use the correct names for conversions between
10302 KFmode and the decimal floating point modes.
10304 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
10306 * config/rs6000/rs6000.c (init_float128_ibm): Use more correct names
10307 for the conversions between TDmode and IFmode.
10308 (init_float128_ieee): Use more correct names for the conversions
10309 between TDmode and KFmode.
10311 2018-07-16 Jakub Jelinek <jakub@redhat.com>
10313 PR tree-optimization/86526
10314 * builtins.c (expand_builtin_memcmp): Formatting fixes.
10315 (inline_expand_builtin_string_cmp): Likewise.
10316 (inline_string_cmp): Likewise. Use c_readstr instead of
10317 builtin_memcpy_read_str. Add unit_mode temporary.
10319 2018-07-16 Bernd Edlinger <bernd.edlinger@hotmail.de>
10321 PR middle-end/86528
10322 * builtins.c (check_access): Bail out if range[0] is no INTEGER_CST.
10323 * expr.c (string_constant): Fix the element size of ARRAY_TYPE.
10325 2018-07-16 Kelvin Nilsen <kelvin@gcc.gnu.org>
10327 * doc/extend.texi (PowerPC AltiVec Built-in Functions):
10328 Alphabetize prototypes of built-in functions, separating out
10329 built-in functions that are listed in this section but should be
10330 described elsewhere.
10332 2018-07-16 Uros Bizjak <ubizjak@gmail.com>
10335 * expmed.c (emit_store_flag): Do not emit setcc followed by a
10336 conditional move when trapping comparison was split to a
10337 non-trapping one (and vice versa).
10339 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
10341 * config/s390/s390.c (s390_function_profiler): Generate nops
10342 instead of profiler call sequences.
10343 * config/s390/s390.opt: Add the new option.
10345 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
10347 * config/s390/s390.c (s390_function_profiler): Generate
10348 __mcount_loc section.
10349 * config/s390/s390.opt: Add the new option.
10351 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
10353 * common.opt: Add the new warning.
10354 * config/s390/s390.c (s390_function_profiler): Emit "brasl
10355 %r0,__fentry__" when -mfentry is specified.
10356 (s390_option_override_internal): Disallow -mfentry for 31-bit
10358 * config/s390/s390.opt: Add the new option.
10360 2018-07-16 Richard Biener <rguenther@suse.de>
10363 * dwarf2out.c (dwarf2out_register_external_die): Assign DIE parents
10364 for function-local FUNCTION_DECL and RESULT_DECL immediately.
10366 2018-07-16 Martin Liska <mliska@suse.cz>
10369 * ipa-pure-const.c (malloc_candidate_p): Revert ::get
10372 2017-07-16 Claudiu Zissulescu <claziss@synopsys.com>
10374 * config/arc/arcHS.md: Update ARCHS scheduling rules.
10376 2017-07-16 Claudiu Zissulescu <claziss@synopsys.com>
10378 * config/arc/arc-arch.h (arc_tune_attr): Add new tune parameters
10380 * config/arc/arc-cpus.def (hs4x): New cpu.
10382 * config/arc/arc-tables.opt: Regenerate.
10383 * config/arc/arc.c (arc_sched_issue_rate): New function.
10384 (TARGET_SCHED_ISSUE_RATE): Define.
10385 (TARGET_SCHED_EXPOSED_PIPELINE): Likewise.
10386 * config/arc/arc.md (attr type): Add fpu_fuse, fpu_sdiv, fpu_ddiv,
10388 (attr tune): Add ARCHS4x tune values.
10389 (attr tune_dspmpy): Define.
10390 (*tst): Correct instruction type.
10391 * config/arc/arcHS.md: Don't use this automaton for ARCHS4x cpus.
10392 * config/arc/arcHS4x.md: New file.
10393 * config/arc/fpu.md: Update instruction type attributes.
10394 * config/arc/t-multilib: Regenerate.
10396 2018-07-16 Tom de Vries <tdevries@suse.de>
10399 * var-tracking.c (vt_initialize): Fix pre_dec handling.
10401 2018-07-16 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
10403 * config/aarch64/atomics.md (aarch64_store_execlusive<mode>): Add
10406 2018-07-16 Eric Botcazou <ebotcazou@adacore.com>
10408 PR tree-optimization/86514
10409 * tree-ssa-reassoc.c (init_range_entry) <CASE_CONVERT>: Return for a
10410 conversion to a boolean type from a type with greater precision.
10412 2018-07-16 Tom de Vries <tdevries@suse.de>
10414 * var-tracking.c (vt_initialize): Print adjusted insn slim if
10415 dump_flags request TDF_SLIM.
10417 2018-07-16 Aldy Hernandez <aldyh@redhat.com>
10419 * fold-const.c (int_const_binop_1): Abstract...
10420 (wide_int_binop): ...wide int code here.
10421 (poly_int_binop): ...poly int code here.
10422 Abstract the rest of int_const_binop_1 into int_const_binop.
10423 * fold-const.h (wide_int_binop): New.
10424 * tree-vrp.c (vrp_int_const_binop): Call wide_int_binop.
10425 Remove useless PLUS/MINUS_EXPR case.
10426 (zero_nonzero_bits_from_vr): Move wide int code...
10427 (zero_nonzero_bits_from_bounds): ...here.
10428 (extract_range_from_binary_expr_1): Move mask optimization code...
10429 (range_easy_mask_min_max): ...here.
10430 * tree-vrp.h (zero_nonzero_bits_from_bounds): New.
10431 (range_easy_mask_min_max): New.
10433 2018-07-15 Jeff Law <law@redhat.com>
10436 * config/sh/sh.c (output_mi_thunk): Remove dead conditional
10439 2018-07-14 Jim Wilson <jimw@sifive.com>
10441 * config/riscv/linux.h (TARGET_ASM_FILE_END): New.
10443 2018-07-14 Paul Koning <ni1d@arrl.net>
10445 * config/pdp11/pdp11.c (pdp11_rtx_costs): Bugfixes.
10447 2018-07-13 Jan Hubicka <hubicka@ucw.cz>
10449 * lto-streamer-out.c (copy_function_or_variable): Dump info about
10452 2018-07-13 Bill Schmidt <wschmidt@linux.ibm.com>
10453 Steve Munroe <munroesj52@gmail.com>
10455 * config/rs6000/emmintrin.h (_mm_and_si128): New function.
10456 (_mm_andnot_si128): Likewise.
10457 (_mm_or_si128): Likewise.
10458 (_mm_xor_si128): Likewise.
10460 2018-07-13 Qing Zhao <qing.zhao@oracle.com>
10462 PR middle-end/78809
10463 * builtins.c (expand_builtin_memcmp): Inline the calls first
10464 when result_eq is false.
10465 (expand_builtin_strcmp): Inline the calls first.
10466 (expand_builtin_strncmp): Likewise.
10467 (inline_string_cmp): New routine. Expand a string compare
10468 call by using a sequence of char comparison.
10469 (inline_expand_builtin_string_cmp): New routine. Inline expansion
10470 a call to str(n)cmp/memcmp.
10471 * doc/invoke.texi (--param builtin-string-cmp-inline-length):
10473 * params.def (BUILTIN_STRING_CMP_INLINE_LENGTH): New.
10475 2018-07-13 Richard Earnshaw <rearnsha@arm.com>
10477 * config/arm/driver-arm.c: Include arm-native.h.
10478 (host_detect_local_cpu): Use auto-generated data tables.
10479 (vendors, arm_cpu_table): Delete. Move part information to ...
10480 * config/arm/arm-cpus.in: ... here.
10481 * config/arm/parsecpu.awk (gen_native): New function.
10482 (vendor, part): New CPU fields.
10483 (END): Add support for building the native CPU detection tables.
10484 * config/arm/t-arm (arm-native.h): Add build rule.
10485 (driver-arm.o): Add dependency on arm-native.h.
10487 2018-07-13 Richard Biener <rguenther@suse.de>
10489 PR middle-end/85974
10490 * match.pd (addr1 - addr2): Allow either of the operand to
10493 2018-07-13 Tom de Vries <tdevries@suse.de>
10495 * tree-inline.c (remap_ssa_name): Save and reuse debug exprs generated
10498 2018-07-13 Jackson Woodruff <jackson.woodruff@arm.com>
10500 * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp): Use
10501 arrays instead of numbered variables.
10503 2018-07-13 Eric Botcazou <ebotcazou@adacore.com>
10505 * config/sparc/sparc-protos.h (sparc_compute_frame_size): Delete.
10506 * config/sparc/sparc.c (sparc_compute_frame_size): Make static.
10508 2018-07-13 Richard Biener <rguenther@suse.de>
10511 * dwarf2out.c (gen_type_die_with_usage): Use scope_die_for
10512 instead of get_context_die.
10514 2018-07-13 Kugan Vivekanandarajah <kuganv@linaro.org>
10515 Richard Biener <rguenther@suse.de>
10517 PR middle-end/86489
10518 * tree-ssa-loop-niter.c (number_of_iterations_popcount): Check
10519 that the loop latch destination where phi is defined.
10521 2018-07-12 Kito Cheng <kito.cheng@gmail.com>
10523 * config/riscv/riscv.c (enum riscv_privilege_levels): Add UNKNOWN_MODE.
10524 (riscv_expand_epilogue): Add assertion to check interrupt mode.
10525 (riscv_set_current_function): Extract getting interrupt type to new
10527 (riscv_get_interrupt_type): New function.
10528 (riscv_merge_decl_attributes): New function, checking interrupt type is
10530 (TARGET_MERGE_DECL_ATTRIBUTES): Define.
10532 2018-07-12 Paul Koning <ni1d@arrl.net>
10534 * config/pdp11/pdp11.c (pdp11_output_def): Fix typo in .set
10537 2018-07-12 Paul Koning <ni1d@arrl.net>
10539 * doc/rtl.texi (REG_NONNEG): Remove decrement and branch until
10540 zero reference, add doloop_end instead.
10541 * doc/md.texi (decrement_and_branch_until_zero): Remove.
10542 (Looping patterns): Remove decrement_and_branch_until_zero. Add
10543 detail for doloop_end.
10545 2018-07-12 Martin Sebor <msebor@redhat.com>
10548 * attribs.c (decl_attributes): Reject conflicting attributes before
10549 calling attribute handlers.
10551 2018-07-12 Jan Hubicka <hubicka@ucw.cz>
10553 * dumpfile.c (gcc::dump_manager::get_dump_file_name): Add PART
10555 (gcc::dump_manager::get_dump_file_name): likewise.
10556 (dump_begin): Likewise.
10557 * dumpfile.h (dump_begin): Update prototype.
10558 (gcc::dump_manager::get_dump_file_name,
10559 gcc::dump_manager::get_dump_file_name): Update prototype.
10561 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
10563 * internal-fn.h (vectorizable_internal_fn_p): New function.
10564 * tree-vect-slp.c (compatible_calls_p): Likewise.
10565 (vect_build_slp_tree_1): Remove nops argument. Handle calls
10566 to internal functions.
10567 (vect_build_slp_tree_2): Update call to vect_build_slp_tree_1.
10569 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
10571 * fold-const.h (inverse_conditions_p): Declare.
10572 * fold-const.c (inverse_conditions_p): New function.
10573 * match.pd: Use inverse_conditions_p. Add folds of view_converts
10574 that test the inverse condition of a conditional internal function.
10575 * internal-fn.h (vectorized_internal_fn_supported_p): Declare.
10576 * internal-fn.c (internal_fn_mask_index): Handle conditional
10577 internal functions.
10578 (vectorized_internal_fn_supported_p): New function.
10579 * tree-if-conv.c: Include internal-fn.h and fold-const.h.
10580 (any_pred_load_store): Replace with...
10581 (need_to_predicate): ...this new variable.
10582 (redundant_ssa_names): New variable.
10583 (ifcvt_can_use_mask_load_store): Move initial checks to...
10584 (ifcvt_can_predicate): ...this new function. Handle tree codes
10585 for which a conditional internal function exists.
10586 (if_convertible_gimple_assign_stmt_p): Use ifcvt_can_predicate
10587 instead of ifcvt_can_use_mask_load_store. Update after variable
10589 (predicate_load_or_store): New function, split out from
10590 predicate_mem_writes.
10591 (check_redundant_cond_expr): New function.
10592 (value_available_p): Likewise.
10593 (predicate_rhs_code): Likewise.
10594 (predicate_mem_writes): Rename to...
10595 (predicate_statements): ...this. Use predicate_load_or_store
10596 and predicate_rhs_code.
10597 (combine_blocks, tree_if_conversion): Update after above name changes.
10598 (ifcvt_local_dce): Handle redundant_ssa_names.
10599 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): Handle
10600 general conditional functions.
10601 * tree-vect-stmts.c (vectorizable_call): Likewise.
10603 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
10604 Alan Hayward <alan.hayward@arm.com>
10605 David Sherwood <david.sherwood@arm.com>
10607 * internal-fn.h (can_interpret_as_conditional_op_p): Declare.
10608 * internal-fn.c (can_interpret_as_conditional_op_p): New function.
10609 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Handle conditional
10610 plus and minus and convert them into IFN_COND_FMA-based sequences.
10611 (convert_mult_to_fma): Handle conditional plus and minus.
10613 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
10615 * doc/md.texi (cond_fma, cond_fms, cond_fnma, cond_fnms): Document.
10616 * optabs.def (cond_fma_optab, cond_fms_optab, cond_fnma_optab)
10617 (cond_fnms_optab): New optabs.
10618 * internal-fn.def (COND_FMA, COND_FMS, COND_FNMA, COND_FNMS): New
10619 internal functions.
10620 (FMA): Use DEF_INTERNAL_FLT_FN rather than DEF_INTERNAL_FLT_FLOATN_FN.
10621 * internal-fn.h (get_conditional_internal_fn): Declare.
10622 (get_unconditional_internal_fn): Likewise.
10623 * internal-fn.c (cond_ternary_direct): New macro.
10624 (expand_cond_ternary_optab_fn): Likewise.
10625 (direct_cond_ternary_optab_supported_p): Likewise.
10626 (FOR_EACH_COND_FN_PAIR): Likewise.
10627 (get_conditional_internal_fn): New function.
10628 (get_unconditional_internal_fn): Likewise.
10629 * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 5.
10630 (gimple_match_op::gimple_match_op): Add a new overload for 5
10632 (gimple_match_op::set_op): Likewise.
10633 (gimple_resimplify5): Declare.
10634 * genmatch.c (decision_tree::gen): Generate simplifications for
10636 * gimple-match-head.c (gimple_simplify): Define an overload for
10637 5 operands. Handle calls with 5 arguments in the top-level overload.
10638 (convert_conditional_op): Handle conversions from unconditional
10639 internal functions to conditional ones.
10640 (gimple_resimplify5): New function.
10641 (build_call_internal): Pass a fifth operand.
10642 (maybe_push_res_to_seq): Likewise.
10643 (try_conditional_simplification): Try converting conditional
10644 internal functions to unconditional internal functions.
10645 Handle 3-operand unconditional forms.
10646 * match.pd (UNCOND_TERNARY, COND_TERNARY): Operator lists.
10647 Define ternary equivalents of the current rules for binary conditional
10648 internal functions.
10649 * config/aarch64/aarch64.c (aarch64_preferred_else_value): Handle
10650 ternary operations.
10651 * config/aarch64/iterators.md (UNSPEC_COND_FMLA, UNSPEC_COND_FMLS)
10652 (UNSPEC_COND_FNMLA, UNSPEC_COND_FNMLS): New unspecs.
10653 (optab): Handle them.
10654 (SVE_COND_FP_TERNARY): New int iterator.
10655 (sve_fmla_op, sve_fmad_op): New int attributes.
10656 * config/aarch64/aarch64-sve.md (cond_<optab><mode>)
10657 (*cond_<optab><mode>_2, *cond_<optab><mode_4)
10658 (*cond_<optab><mode>_any): New SVE_COND_FP_TERNARY patterns.
10660 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
10662 * target.def (preferred_else_value): New target hook.
10663 * doc/tm.texi.in (TARGET_PREFERRED_ELSE_VALUE): New hook.
10664 * doc/tm.texi: Regenerate.
10665 * targhooks.h (default_preferred_else_value): Declare.
10666 * targhooks.c (default_preferred_else_value): New function.
10667 * internal-fn.h (conditional_internal_fn_code): Declare.
10668 * internal-fn.c (FOR_EACH_CODE_MAPPING): New macro.
10669 (get_conditional_internal_fn): Use it.
10670 (conditional_internal_fn_code): New function.
10671 * gimple-match.h (gimple_match_cond): New struct.
10672 (gimple_match_op): Add a cond member function.
10673 (gimple_match_op::gimple_match_op): Update all forms to take a
10675 * genmatch.c (expr::gen_transform): Use the same condition as res_op
10676 for the suboperation, but don't specify a particular else_value.
10677 * tree-ssa-sccvn.c (vn_nary_simplify, vn_reference_lookup_3)
10678 (visit_nary_op, visit_reference_op_load): Pass
10679 gimple_match_cond::UNCOND to the gimple_match_op constructor.
10680 * gimple-match-head.c: Include tree-eh.h
10681 (convert_conditional_op): New function.
10682 (maybe_resimplify_conditional_op): Likewise.
10683 (gimple_resimplify1): Call maybe_resimplify_conditional_op.
10684 (gimple_resimplify2): Likewise.
10685 (gimple_resimplify3): Likewise.
10686 (gimple_resimplify4): Likewise.
10687 (maybe_push_res_to_seq): Return null for conditional operations.
10688 (try_conditional_simplification): New function.
10689 (gimple_simplify): Call it. Pass conditions to the gimple_match_op
10691 * match.pd: Fold VEC_COND_EXPRs of an IFN_COND_* call to a new
10693 * config/aarch64/aarch64.c (aarch64_preferred_else_value): New
10695 (TARGET_PREFERRED_ELSE_VALUE): Redefine.
10697 2018-07-12 Jan Hubicka <hubicka@ucw.cz>
10699 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
10701 (hash_tree): Do not hash DECL_FCONTEXT
10702 * tree-streamer-in.c (lto_input_ts_field_decl_tree_pointers):
10703 Do not stream DECL_FCONTEXT.
10704 * tree-streamer-out.c (write_ts_field_decl_tree_pointers): Likewise.
10705 * tree.c (free_lang_data_in_decl): Free DECL_FCONTEXT.
10707 2018-07-12 Richard Biener <rguenther@suse.de>
10710 * dwarf2out.c (gen_block_die): Only output blocks when they have
10711 at least one !DECL_IGNORED_P variable.
10713 2018-07-12 Richard Biener <rguenther@suse.de>
10716 * config/gnu-user.h (GNU_USER_TARGET_NO_PTHREADS_LIB_SPEC):
10717 Remove -mieee-fp handling.
10719 2018-07-12 Richard Biener <rguenther@suse.de>
10721 * tree-ssa-sccvn.c (vn_lookup_simplify_result): Remove bogus
10722 left-over from last patch.
10724 2018-07-12 Jakub Jelinek <jakub@redhat.com>
10726 PR tree-optimization/86492
10727 * gimple-ssa-store-merging.c
10728 (imm_store_chain_info::coalesce_immediate_stores): Call
10729 check_no_overlap even for the merge_overlapping case. Formatting fix.
10731 2018-07-12 Richard Biener <rguenther@suse.de>
10733 PR middle-end/86479
10734 * fold-const.c (fold_binary_op_with_conditional_arg): Do not
10735 move possibly trapping operations into the conditional.
10737 2018-07-12 Richard Biener <rguenther@suse.de>
10739 * tree-ssa-sccvn.c (mprts_hook_cnt): Remove.
10740 (vn_lookup_simplify_result): Remove recursion limit applied
10742 (vn_nary_build_or_lookup_1): Adjust.
10743 (try_to_simplify): Likewise.
10744 * gimple-match-head.c (gimple_resimplify1): Instead apply one
10746 (gimple_resimplify2): Likewise.
10747 (gimple_resimplify3): Likewise.
10748 (gimple_resimplify4): Likewise.
10750 2018-07-11 Jakub Jelinek <jakub@redhat.com>
10752 * config/i386/avx512bitalgintrin.h (_mm512_mask_bitshuffle_epi64_mask):
10753 Use __mmask64 type instead of __mmask8 for __M argument.
10754 * config/i386/avx512fintrin.h (_mm512_mask_xor_epi64,
10755 _mm512_maskz_xor_epi64): Use __mmask8 type instead of __mmask16 for
10757 (_mm512_mask_cmpneq_epi64_mask): Use __mmask8 type instead of
10758 __mmask16 for __M argument.
10759 (_mm512_maskz_insertf32x4, _mm512_maskz_inserti32x4,
10760 _mm512_mask_insertf32x4, _mm512_mask_inserti32x4): Cast last argument
10761 to __mmask16 instead of __mmask8.
10762 * config/i386/avx512vlintrin.h (_mm_mask_add_ps, _mm_maskz_add_ps,
10763 _mm256_mask_add_ps, _mm256_maskz_add_ps, _mm_mask_sub_ps,
10764 _mm_maskz_sub_ps, _mm256_mask_sub_ps, _mm256_maskz_sub_ps,
10765 _mm256_maskz_cvtepi32_ps, _mm_maskz_cvtepi32_ps): Use __mmask8 type
10766 instead of __mmask16 for __U argument.
10767 * config/i386/avx512vlbwintrin.h (_mm_mask_cmp_epi8_mask): Use
10768 __mmask16 instead of __mmask8 for __U argument.
10769 (_mm256_mask_cmp_epi8_mask): Use __mmask32 instead of __mmask16 for
10771 (_mm256_cmp_epi8_mask): Use __mmask32 return type instead of
10773 (_mm_mask_cmp_epu8_mask): Use __mmask16 instead of __mmask8 for __U
10775 (_mm256_mask_cmp_epu8_mask): Use __mmask32 instead of __mmask16 for
10777 (_mm256_cmp_epu8_mask): Use __mmask32 return type instead of
10779 (_mm_mask_cmp_epi16_mask): Cast last argument to __mmask8 instead
10781 (_mm256_mask_cvtepi8_epi16): Use __mmask16 instead of __mmask32 for
10783 (_mm_mask_cvtepi8_epi16): Use __mmask8 instead of __mmask32 for
10785 (_mm256_mask_cvtepu8_epi16): Use __mmask16 instead of __mmask32 for
10787 (_mm_mask_cvtepu8_epi16): Use __mmask8 instead of __mmask32 for
10789 (_mm256_mask_cmpneq_epu8_mask, _mm256_mask_cmplt_epu8_mask,
10790 _mm256_mask_cmpge_epu8_mask, _mm256_mask_cmple_epu8_mask): Change
10791 return type as well as __M argument type and all casts from __mmask8
10793 (_mm256_mask_cmpneq_epu16_mask, _mm256_mask_cmplt_epu16_mask,
10794 _mm256_mask_cmpge_epu16_mask, _mm256_mask_cmple_epu16_mask): Change
10795 return type as well as __M argument type and all casts from __mmask8
10797 (_mm256_mask_cmpneq_epi8_mask, _mm256_mask_cmplt_epi8_mask,
10798 _mm256_mask_cmpge_epi8_mask, _mm256_mask_cmple_epi8_mask): Change
10799 return type as well as __M argument type and all casts from __mmask8
10801 (_mm256_mask_cmpneq_epi16_mask, _mm256_mask_cmplt_epi16_mask,
10802 _mm256_mask_cmpge_epi16_mask, _mm256_mask_cmple_epi16_mask): Change
10803 return type as well as __M argument type and all casts from __mmask8
10805 * config/i386/avx512vbmi2vlintrin.h (_mm_mask_shrdi_epi32,
10806 _mm_mask_shldi_epi32): Cast last argument to __mmask8 instead of
10809 2018-07-11 Grazvydas Ignotas <notasas@gmail.com>
10811 * config/i386/avx512bwintrin.h: (_mm512_mask_cmp_epi8_mask,
10812 _mm512_mask_cmp_epu8_mask): Use __mmask64 type instead of __mmask32
10815 2018-07-11 Paul Koning <ni1d@arrl.net>
10817 * doc/md.texi (define_subst): Document how multiple occurrences of
10818 the same argument in the replacement pattern are handled.
10820 2018-07-11 Paul Koning <ni1d@arrl.net>
10822 * doc/extend.texi (Common Variable Attributes): Move "mode" into
10823 alphabetical order.
10824 (Common Type Attributes): Add "mode" attribute.
10826 2018-07-11 Jan Hubicka <hubicka@ucw.cz>
10828 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not
10829 stream DECL_ORIGINAL_TYPE.
10830 (DFS::DFS_write_tree_body): Drop hack handling local external decls.
10831 (hash_tree): Do not walk DECL_ORIGINAL_TYPE.
10832 * tree-streamer-in.c (lto_input_ts_decl_non_common_tree_pointers):
10833 Do not walk original type.
10834 * tree-streamer-out.c (streamer_write_chain): Drop hack handling
10836 (write_ts_decl_non_common_tree_pointers): Do not stream
10838 * tree.c (free_lang_data_in_decl): Clear DECL_ORIGINAL_TYPE.
10839 (find_decls_types_r): Do not walk DEC_ORIGINAL_TYPE.
10841 2018-07-11 Aldy Hernandez <aldyh@redhat.com>
10843 * tree-ssa-threadupdate.c (thread_through_all_blocks): Do not jump
10844 thread twice from the same starting edge.
10846 2018-07-11 Aldy Hernandez <aldyh@redhat.com>
10848 * vr-values.c (gimple_stmt_nonzero_p): Abstract common code to...
10849 * gimple.c (gimple_call_nonnull_result_p): ...here...
10850 (gimple_call_nonnull_arg): ...and here.
10851 * gimple.h (gimple_call_nonnull_result_p): New.
10852 (gimple_call_nonnull_arg): New.
10854 2018-07-11 Richard Earnshaw <rearnsha@arm.com>
10856 * config/arm/arm-cpus.in: Move information from fpu field of each
10857 cpu definition to the isa field.
10858 * config/arm/parsecpu.awk (fpu): Delete match rule.
10859 (gen_comm_data): Don't add bits from the CPU's FPU entry.
10861 2018-07-11 Richard Biener <rguenther@suse.de>
10864 * dwarf2out.c (init_sections_and_labels): Use
10865 output_asm_line_debug_info consistently.
10866 (dwarf2out_early_finish): Likewise.
10867 (dwarf2out_finish): Remove DW_AT_stmt_list from early generated
10870 2018-07-11 Richard Biener <rguenther@suse.de>
10872 * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1):
10873 Rework father_bb setting in a way to avoid propagating constants
10874 multiple times on a loop body.
10876 2018-07-10 Mark Wielaard <mark@klomp.org>
10879 * dwarf2out.c (output_macinfo_op): Fix dwarf_FORM typo in gcc_assert.
10881 2018-07-10 Richard Biener <rguenther@suse.de>
10883 * hash-map.h (hash_map::iterator::operator*): Return
10884 references to key and value.
10886 2018-07-10 Jakub Jelinek <jakub@redhat.com>
10889 * gimplify.c (find_combined_omp_for): Add DATA argument, in addition
10890 to finding the inner OMP_FOR/OMP_SIMD stmt find non-trivial wrappers,
10891 BLOCKs with BLOCK_VARs, OMP_PARALLEL in between, OMP_FOR in between.
10892 (gimplify_omp_for): For composite loops, move outer
10893 OMP_{DISTRIBUTE,TASKLOOP,FOR,PARALLEL} right around innermost
10894 OMP_FOR/OMP_SIMD if there are any non-trivial wrappers. For class
10895 iterators add any needed clauses. Allow OMP_FOR_ORIG_DECLS to contain
10896 TREE_LIST for both the original class iterator and the "last" helper
10897 var. Gimplify OMP_FOR_PRE_BODY before the outermost composite
10898 loop, remember has_decl_expr from outer composite loops for the
10899 innermost OMP_SIMD in TREE_PRIVATE bit on OMP_FOR_INIT.
10901 2018-07-09 Martin Sebor <msebor@redhat.com>
10903 PR middle-end/77357
10904 PR middle-end/86428
10905 * builtins.c (c_strlen): Avoid out-of-bounds warnings when
10906 accessing implicitly initialized array elements.
10907 * expr.c (string_constant): Handle string initializers of
10908 character arrays within aggregates.
10909 * gimple-fold.c (fold_array_ctor_reference): Add argument.
10910 Store element offset. As a special case, handle zero size.
10911 (fold_nonarray_ctor_reference): Same.
10912 (fold_ctor_reference): Add argument. Store subobject offset.
10913 * gimple-fold.h (fold_ctor_reference): Add argument.
10915 2018-07-09 Paul Koning <ni1d@arrl.net>
10917 * config/pdp11/pdp11.c (pdp11_addr_cost): New function.
10918 (pdp11_insn_cost): New function.
10919 (pdp11_md_asm_adjust): New function.
10920 (TARGET_INVALID_WITHIN_DOLOOP): Define.
10921 (pdp11_rtx_costs): Update to match machine better.
10922 (output_addr_const_pdp11): Correct format mismatch warnings.
10923 * config/pdp11/pdp11.h (SLOW_BYTE_ACCESS): Correct definition.
10924 * config/pdp11/pdp11.md: General change to add base_cost and/or
10925 length attributes for use by new pdp11_insn_cost function.
10926 (MIN_BRANCH): Correct definition.
10928 (doloop_end): Use standard pattern name for looping pattern.
10929 (doloop_end_nocc): New.
10930 (movsf): Add another constraint alternative.
10931 (zero_extendqihi2): Add constraint alternatives for not in place
10933 (zero_extendhisi2): Remove.
10934 (shift patterns): Add CC handling variants.
10938 (define_peephole2): New peephole to recognize mov that sets CC for
10941 2018-07-09 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
10943 * config/sparc/sparc.c (sparc_fold_builtin) <SPARC_BUILTIN_PDIST,
10944 SPARC_BUILTIN_PDISTN>: Adapt for signature change of wi::neg,
10947 2018-07-09 Jakub Jelinek <jakub@redhat.com>
10950 * real.c (real_nextafter): Return true if result is denormal.
10952 2018-07-09 Martin Liska <mliska@suse.cz>
10954 * common.opt: Add back wrongly removed attribute.
10956 2018-07-09 Richard Biener <rguenther@suse.de>
10959 * dwarf2out.c (gen_block_die): For an early generated DIE
10960 always output high/low PC attributes.
10962 2018-07-09 Tom de Vries <tdevries@suse.de>
10964 * cfgexpand.c (expand_debug_source_expr): Handle VAR_DECL.
10965 * tree-inline.c (remap_ssa_name): Handle default def ssa_name mapping
10966 onto VAR_DECL with abstract origin.
10968 2018-07-07 Jim Wilson <jimw@sifive.com>
10970 * config/riscv/riscv.c (TARGET_CUSTOM_FUNCTION_DESCRIPTORS): New.
10972 2018-07-07 Tom de Vries <tdevries@suse.de>
10974 * tree-dfa.c (dump_enumerated_decls): Handle cfun->cfg == NULL.
10976 2018-07-07 Aldy Hernandez <aldyh@redhat.com>
10978 * tree-vrp.c (vrp_int_const_binop): Change overflow type to
10980 (combine_bound): Use wide-int overflow calculation instead of
10982 * calls.c (maybe_warn_alloc_args_overflow): Change overflow type to
10984 * fold-const.c (int_const_binop_2): Same.
10985 (extract_muldiv_1): Same.
10986 (fold_div_compare): Same.
10987 (fold_abs_const): Same.
10989 * poly-int.h (add): Same.
10993 * predict.c (predict_iv_comparison): Same.
10994 * profile-count.c (slow_safe_scale_64bit): Same.
10995 * simplify-rtx.c (simplify_const_binary_operation): Same.
10996 * tree-chrec.c (tree_fold_binomial): Same.
10997 * tree-data-ref.c (split_constant_offset_1): Same.
10998 * tree-if-conv.c (idx_within_array_bound): Same.
10999 * tree-scalar-evolution.c (iv_can_overflow_p): Same.
11000 * tree-ssa-phiopt.c (minmax_replacement): Same.
11001 * tree-vect-loop.c (is_nonwrapping_integer_induction): Same.
11002 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Same.
11003 * vr-values.c (vr_values::adjust_range_with_scev): Same.
11004 * wide-int.cc (wi::add_large): Same.
11005 (wi::mul_internal): Same.
11006 (wi::sub_large): Same.
11007 (wi::divmod_internal): Same.
11008 * wide-int.h: Change overflow type to overflow_type for neg, add,
11009 mul, smul, umul, div_trunc, div_floor, div_ceil, div_round,
11010 mod_trunc, mod_ceil, mod_round, add_large, sub_large,
11011 mul_internal, divmod_internal.
11012 (overflow_type): New enum.
11013 (accumulate_overflow): New.
11015 2018-07-06 Kugan Vivekanandarajah <kugan.vivekanandarajah@linaro.org>
11017 * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): New.
11018 (tree_ssa_phiopt_worker): Call cond_removal_in_popcount_pattern.
11020 2018-07-06 Kugan Vivekanandarajah <kuganv@linaro.org>
11022 * tree-ssa-loop-niter.c (number_of_iterations_popcount): If popcount
11023 argument is checked for zero before entering loop, avoid checking again.
11025 2018-07-06 Kugan Vivekanandarajah <kuganv@linaro.org>
11027 * gimplify.h (generic_expr_could_trap_p): Set as global function.
11028 * gimplify.h (generic_expr_could_trap_p): Likwise.
11029 * tree-scalar-evolution.c (expression_expensive_p): Handle COND_EXPR.
11031 2018-07-06 Jakub Jelinek <jakub@redhat.com>
11033 PR tree-optimization/86401
11034 * fold-const.c (fold_binary_loc) <case BIT_AND_EXPR>: Move the
11035 ((A & N) + B) & M -> (A + B) & M etc. optimization into ...
11036 (fold_bit_and_mask): ... here. New helper function for match.pd.
11037 * fold-const.h (fold_bit_and_mask): Declare.
11038 * match.pd (((A & N) + B) & M -> (A + B) & M): New optimization.
11040 2018-07-06 Peter Bergner <bergner@linux.ibm.com>
11043 * target.def (translate_mode_attribute): New hook.
11044 * targhooks.h (default_translate_mode_attribute): Declare.
11045 * targhooks.c (default_translate_mode_attribute): New function.
11046 * doc/tm.texi.in (TARGET_TRANSLATE_MODE_ATTRIBUTE): New hook.
11047 * doc/tm.texi: Regenerate.
11048 * config/rs6000/rs6000.c (TARGET_TRANSLATE_MODE_ATTRIBUTE): Define.
11049 (rs6000_translate_mode_attribute): New function.
11051 2018-07-06 Paul Koning <ni1d@arrl.net>
11053 * doc/md.texi (define_split): Document DONE and FAIL.
11054 (define_peephole2): Ditto.
11056 2018-07-05 Jeff Law <law@redhat.com>
11058 PR tree-optimization/86010
11059 * tree-ssa-dse.c (compute_trims): More aggressively trim at
11060 both the head and tail of mem* and str* calls.
11062 2018-07-05 Jim Wilson <jimw@sifive.com>
11064 * config.gcc (riscv*-*-*): When setting xlen, handle riscv-*.
11066 2018-07-05 Indu Bhagat <indu.bhagat@oracle.com>
11068 * config/aarch64/aarch64-simd.md: correct flags text for
11069 MIN_EXPR replacement.
11071 2018-07-05 James Clarke <jrtc27@jrtc27.com>
11073 * configure: Regenerated.
11075 2018-07-05 Carl Love <cel@us.ibm.com>
11077 * config/rs6000/rs6000-c.c: Map ALTIVEC_BUILTIN_VEC_UNPACKH for
11078 float argument to VSX_BUILTIN_DOUBLEH_V4SF.
11079 Map ALTIVEC_BUILTIN_VEC_UNPACKL for float argument to
11080 VSX_BUILTIN_DOUBLEL_V4SF.
11082 2018-07-05 Martin Sebor <msebor@redhat.com>
11085 * tree-ssa-strlen.c (maybe_set_strlen_range): Use type size rather
11086 than its domain to compute its the upper bound of a char array.
11088 2018-07-05 Nathan Sidwell <nathan@acm.org>
11090 Replace NO_IMPLICIT_EXTERN_C with SYSTEM_IMPLICIT_EXTERN_C.
11091 * doc/cpp.texi: Update comment.
11092 * doc/tm.texi: Rebuilt.
11093 * doc/tm.texi.in (NO_IMPLICIT_EXTERN_C): Replace with ...
11094 (SYSTEM_IMPLICIT_EXTERN_C): ... this, opposite sense.
11095 * doc/extend.texi (Backwards Compatibility): Clarify it is system
11096 headers affected by extern "C".
11097 * system.h: Poison NO_IMPLICIT_EXTERN_C.
11098 * config/alpha/alpha.h, config/arm/uclinux-elf.h,
11099 config/bfin/elf.h, config/cris/cris.h, config/darwin.h,
11100 config/dragonfly.h, config/freebsd.h, config/gnu-user.h,
11101 config/i386/cygming.h, config/i386/djgpp.h, config/i386/nto.h,
11102 config/ia64/hpux.h, config/lm32/lm32.h, config/lm32/uclinux-elf.h,
11103 config/lynx.h, config/mips/elf.h, config/mmix/mmix.h,
11104 config/netbsd.h, config/pa/pa-hpux.h, config/powerpcspe/sysv4.h,
11105 config/riscv/elf.h, config/rs6000/sysv4.h, config/rtems.h,
11106 config/s390/tpf.h, config/sh/newlib.h, config/sol2.h,
11107 config/sparc/openbsd64.h, config/sparc/sp-elf.h,
11108 config/sparc/sp64-elf.h, config/spu/spu.h,
11109 config/stormy16/stormy16.h, config/v850/v850.h,
11110 config/visium/visium.h, config/vx-common.h, config/xtensa/elf.h: Don't
11111 define NO_IMPLICIT_EXTERN_C.
11112 * config/rs6000/aix.h: Set SYSTEM_IMPLICIT_EXTERN_C.
11114 2018-07-05 Tamar Christina <tamar.christina@arm.com>
11117 * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
11118 instead of GET_MODE_SIZE when comparing Units.
11120 2018-07-05 Tamar Christina <tamar.christina@arm.com>
11123 * rtlanal.c (set_noop_p): Constrain on mode change,
11124 include hard-reg-set.h
11126 2018-07-05 Tamar Christina <tamar.christina@arm.com>
11128 * config/aarch64/aarch64.c (aarch64_expand_movmem): Fix mode size.
11130 2018-07-05 Jakub Jelinek <jakub@redhat.com>
11133 2018-07-04 Maxim Ostapenko <m.ostapenko@samsung.com>
11136 * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
11138 * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
11140 2018-07-04 Maxim Ostapenko <m.ostapenko@samsung.com>
11143 * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
11145 * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
11147 2018-07-04 Eric Botcazou <ebotcazou@adacore.com>
11149 PR middle-end/86380
11150 * expmed.c (choose_multiplier): Fix incorrect comparison with mask.
11152 2018-07-04 Aldy Hernandez <aldyh@redhat.com>
11154 * tree-vrp.c (extract_range_from_binary_expr_1): Initialize
11155 neg_*_op* variables.
11157 2018-07-04 Martin Liska <mliska@suse.cz>
11159 * tree-switch-conversion.c: Define
11160 max_ratio_for_speed and max_ratio_for_size constants.
11162 2018-07-04 Denys Vlasenko <dvlasenk@redhat.com>
11163 Martin Liska <mliska@suse.cz>
11165 PR middle-end/66240
11168 * common.opt: Rename align options with 'str_' prefix.
11169 * common/config/i386/i386-common.c (set_malign_value): New
11171 (ix86_handle_option): Use it to set -falign-* options/
11172 * config/aarch64/aarch64-protos.h (struct tune_params): Change
11173 type from int to string.
11174 * config/aarch64/aarch64.c: Update default values from int
11176 * config/alpha/alpha.c (alpha_override_options_after_change):
11178 * config/arm/arm.c (arm_override_options_after_change_1): Likewise.
11179 * config/i386/dragonfly.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
11180 max skip conditionally.
11181 * config/i386/freebsd.h (SUBALIGN_LOG): New.
11182 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
11183 max skip conditionally.
11184 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
11185 max skip conditionally.
11186 * config/i386/gnu-user.h (SUBALIGN_LOG): New.
11187 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
11188 max skip conditionally.
11189 * config/i386/i386.c (struct ptt): Change type from int to
11191 (ix86_default_align): Set default values.
11192 * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Print
11193 max skip conditionally.
11194 * config/i386/iamcu.h (SUBALIGN_LOG): New.
11195 (ASM_OUTPUT_MAX_SKIP_ALIGN):
11196 * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN):
11197 * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
11198 max skip conditionally.
11199 * config/i386/openbsdelf.h (SUBALIGN_LOG): New.
11200 (ASM_OUTPUT_MAX_SKIP_ALIGN) Print max skip conditionally.:
11201 * config/i386/x86-64.h (SUBALIGN_LOG): New.
11202 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
11203 max skip conditionally.
11204 (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
11205 * config/ia64/ia64.c (ia64_option_override): Set default values
11206 for alignment options.
11207 * config/m68k/m68k.c: Handle new str_align_* options.
11208 * config/mips/mips.c (mips_set_compression_mode): Change
11210 (mips_option_override): Set default values for options.
11211 * config/powerpcspe/powerpcspe.c (rs6000_option_override_internal):
11213 * config/rs6000/rs6000.c (rs6000_option_override_internal):
11215 * config/rx/rx.c (rx_option_override): Likewise.
11216 * config/rx/rx.h (JUMP_ALIGN): Use align_jumps_log.
11217 (LABEL_ALIGN): Use align_labels_log.
11218 (LOOP_ALIGN): Use align_loops_align.
11219 * config/s390/s390.c (s390_asm_output_function_label): Use new
11221 * config/sh/sh.c (sh_override_options_after_change):
11222 Change type of constants.
11223 * config/spu/spu.c (spu_sched_init): Likewise.
11224 * config/sparc/sparc.c (sparc_option_override): Set default
11225 values for options.
11226 * config/visium/visium.c (visium_option_override): Likewise.
11227 * config/visium/visium.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Do not
11228 emit p2align format with last argument if it's not needed.
11229 * doc/invoke.texi: Document extended format of -falign-*.
11230 * final.c: Use align_labels alignment.
11231 * flags.h (struct target_flag_state): Change type to use
11233 (struct align_flags_tuple): New.
11234 (struct align_flags): Likewise.
11235 (align_loops_log): Redefine macro to use new types.
11236 (align_loops_max_skip): Redefine macro to use new types.
11237 (align_jumps_log): Redefine macro to use new types.
11238 (align_jumps_max_skip): Redefine macro to use new types.
11239 (align_labels_log): Redefine macro to use new types.
11240 (align_labels_max_skip): Redefine macro to use new types.
11241 (align_functions_log): Redefine macro to use new types.
11242 (align_loops): Redefine macro to use new types.
11243 (align_jumps): Redefine macro to use new types.
11244 (align_labels): Redefine macro to use new types.
11245 (align_functions): Redefine macro to use new types.
11246 (align_functions_max_skip): Redefine macro to use new types.
11247 (align_loops_value): New macro.
11248 (align_jumps_value): New macro.
11249 (align_labels_value): New macro.
11250 (align_functions_value): New macro.
11251 * function.c (invoke_set_current_function_hook): Propagate
11252 alignment values from flags to global variables default in
11254 * ipa-icf.c (sem_function::equals_wpa): Use
11255 cl_optimization_option_eq instead of memcmp.
11256 * lto-streamer.h (cl_optimization_stream_out): Support streaming
11258 (cl_optimization_stream_in): Likewise.
11259 * optc-save-gen.awk: Support strings in cl_optimization.
11260 * opth-gen.awk: Likewise.
11261 * opts.c (finish_options): Remove error checking of invalid
11263 (MAX_CODE_ALIGN): Remove.
11264 (MAX_CODE_ALIGN_VALUE): Likewise.
11265 (parse_and_check_align_values): New function.
11266 (check_alignment_argument): Likewise.
11267 (common_handle_option): Use check_alignment_argument.
11268 * opts.h (parse_and_check_align_values): Declare.
11269 * toplev.c (init_alignments): Remove.
11270 (read_log_maxskip): New.
11271 (parse_N_M): Likewise.
11272 (parse_alignment_opts): Likewise.
11273 (backend_init_target): Remove usage of init_alignments.
11274 * toplev.h (parse_alignment_opts): Declare.
11275 * tree-streamer-in.c (streamer_read_tree_bitfields): Add new
11277 * tree-streamer-out.c (streamer_write_tree_bitfields): Likewise.
11278 * tree.c (cl_option_hasher::equal): New.
11279 * varasm.c: Use new global macros.
11281 2018-07-04 Denys Vlasenko <dvlasenk@redhat.com>
11283 * config/i386/dragonfly.h: (ASM_OUTPUT_MAX_SKIP_ALIGN):
11284 Use a simpler align directive also if MAXSKIP = ALIGN-1.
11285 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
11286 * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
11287 * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
11288 * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
11289 * config/i386/freebsd.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Remove "If N
11290 is large, do at least 8 byte alignment" code. Add SUBALIGN_LOG
11291 define. Use a simpler align directive also if MAXSKIP = ALIGN-1.
11292 * config/i386/gnu-user.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
11293 * config/i386/iamcu.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
11294 * config/i386/openbsdelf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
11295 * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
11297 2018-07-04 Martin Liska <mliska@suse.cz>
11298 Jonathan Wakely <jwakely@redhat.com>
11300 * coverage.c: Use correct type.
11301 * doc/invoke.texi: Language correction.
11303 2018-07-03 H.J. Lu <hongjiu.lu@intel.com>
11306 * config/i386/i386.c (rest_of_insert_endbranch): Also generate
11307 ENDBRANCH for non-tail call which may return via indirect branch.
11308 * doc/extend.texi: Document indirect_return attribute.
11310 2018-07-03 Martin Sebor <msebor@redhat.com>
11312 PR tree-optimization/86274
11313 * gimple-ssa-sprintf.c (fmtresult::type_max_digits): Verify
11315 (format_floating): Correct handling of infinities and NaNs.
11317 2018-07-03 Martin Sebor <msebor@redhat.com>
11319 * print-tree.c (print_real_cst): New function.
11320 (print_node_brief): Call it.
11321 (print_node): Ditto.
11323 2018-07-03 Jeff Law <law@redhat.com>
11325 * config/h8300/h8300.md (logical<mode>3_sn, logical<mode>3): Merge
11326 into a single pattern.
11328 * config/h8300/h8300.md (ors code_iterator): New.
11329 (bsetqi_msx, bnotqi_msx patterns and splitters): Consolidate into
11330 a single pattern and single splitter.
11331 (bsethi_msx, bnothi_msx patterns): Consolidate into a single pattern.
11332 (iorqi3_1, xorqi3_1): Likewise.
11333 (iorqi3, xorqi3 expanders): Similarly.
11335 * config/h8300/h8300.md (movmd_internal_normal): Consolidated with
11336 (movmd_internal) into a single pattern using the P mode iterator.
11337 (movmd splitters): Similarly.
11338 (stpcpy_internal_normal, stpcpy_internal): Similarly for thes patterns.
11339 (movsd splitters): Similarly.
11341 * config/h8300/h8300.c (h8300_insn_length_from_table): Consolidate
11342 ADDB, ADDW and ADDL into a single ADD attribute which selects the
11343 right table based on the size of the operand.
11344 * config/h8300/h8300.md (length_table): Corresponding changes. All
11345 references to "addb", "addw" and "addl" changed to "add".
11346 (btst patterns): Merge two variants into a single pattern.
11347 (tstqi, tsthi): Likewise.
11348 (addhi3_incdec, addsi3_incdec): Likewise.
11349 (subhi3_h8300hs, subsi3_h8300hs): Likewise.
11350 (mulhi3, mulsi3): Likewise.
11351 (udivhi3, udivsi3): Likewise.
11352 (divhi3, divsi3): Likewise.
11353 (andorqi3, andorhi3, andorsi3): Likewise.
11355 2018-07-03 Uros Bizjak <ubizjak@gmail.com>
11358 * config/i386/sse.md (uavg<mode>3_ceil): New expander.
11359 (<sse2_avx2>_uavg<mode>3<mask_name>): Simplify expander.
11361 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
11363 PR tree-optimization/85694
11364 * config/aarch64/iterators.md (HADD, RHADD): New int iterators.
11365 (u): Handle UNSPEC_SHADD, UNSPEC_UHADD, UNSPEC_SRHADD and
11367 * config/aarch64/aarch64-simd.md (<u>avg<mode>3_floor)
11368 (<u>avg<mode>3_ceil): New patterns.
11370 2018-07-03 David Malcolm <dmalcolm@redhat.com>
11372 * gcc.dg/vect/slp-perm-1.c: Remove "note: " prefix from
11373 scan-tree-dump directive.
11374 * gcc.dg/vect/slp-perm-2.c: Likewise.
11375 * gcc.dg/vect/slp-perm-3.c: Likewise.
11376 * gcc.dg/vect/slp-perm-5.c: Likewise.
11377 * gcc.dg/vect/slp-perm-6.c: Likewise.
11378 * gcc.dg/vect/slp-perm-7.c: Likewise.
11379 * gcc.dg/vect/slp-perm-8.c: Likewise.
11381 2018-07-03 Marek Polacek <polacek@redhat.com>
11383 PR middle-end/86202
11384 * gimple-fold.c (size_must_be_zero_p): Check the type of the size.
11386 2018-07-03 Richard Biener <rguenther@suse.de>
11389 * tree-ssa-structalias.c (find_func_clobbers): Properly
11390 handle indirect calls.
11392 2018-07-03 Jeff Law <law@redhat.com>
11394 * config/h8300/h8300.md (HSI, QHSI, QHSIF): New mode iterators.
11395 (shifts): New code iterator.
11396 (movqi, movhi, movsi, movsf expanders): Consolidate into a single
11397 expander. Fix HImode handling on H8/SX.
11398 (addqi3, addhi3, addsi3 expanders): Consolidate into a single expander.
11399 (subqi3, subhi3, subsi3 expanders): Likewise.
11400 (andqi3, andhi3, andsi3 expanders): Likewise.
11401 (iorqi3, iorhi3, iorsi3 expanders): Likewise.
11402 (xorqi3, xorhi3, xorsi3 expanders): Likewise.
11403 (negqi2, neghi2, negsi2, negsf2 expanders): Likewise.
11404 (one_cmplqi2, one_cmplhi2, one_cmplsi2): Likewise.
11405 (zero_extendqihi2, zero_extendqisi2): Likewise.
11406 (extendqihi2, extendqisi2): Likewise.
11407 (rotlqi3, rotlhi3, rotlsi3): Likewise.
11408 (neghi2_h8300, negsi2_h8300): Likewise for these patterns.
11409 (rotlqi3_1, rotlhi3_1): Likewise.
11410 (logicalhi3_sn, logicalsi3_sn): Likewise.
11411 (logicalhi3, logicalsi3): Likewise.
11413 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
11415 * tree-vect-patterns.c (vect_recog_rotate_pattern)
11416 (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
11417 (vect_recog_mixed_size_cond_pattern, adjust_bool_pattern_cast)
11418 (adjust_bool_pattern, vect_recog_bool_pattern): Pass the vector
11419 type to append_pattern_def_seq instead of creating a stmt_vec_info
11421 (build_mask_conversion): Likewise. Remove vinfo argument.
11422 (vect_add_conversion_to_patterm): Likewise, renaming to...
11423 (vect_add_conversion_to_pattern): ...this.
11424 (vect_recog_mask_conversion_pattern): Update call to
11425 build_mask_conversion. Pass the vector type to
11426 append_pattern_def_seq here too.
11427 (vect_recog_gather_scatter_pattern): Update call to
11428 vect_add_conversion_to_pattern.
11430 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
11432 * tree-vect-patterns.c (new_pattern_def_seq): Delete.
11433 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
11434 (vect_recog_widen_op_pattern, vect_recog_over_widening_pattern)
11435 (vect_recog_rotate_pattern, vect_synth_mult_by_constant): Don't set
11436 STMT_VINFO_PATTERN_DEF_SEQ to null here.
11437 (vect_recog_pow_pattern, vect_recog_vector_vector_shift_pattern)
11438 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern): Use
11439 append_pattern_def_seq instead of new_pattern_def_seq.
11440 (vect_recog_divmod_pattern): Do both of the above.
11441 (vect_pattern_recog_1): Assert that STMT_VINO_PATTERN_DEF_SEQ
11444 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
11446 * tree-vect-patterns.c (vect_recog_dot_prod_pattern):
11447 (vect_recog_sad_pattern, vect_recog_widen_op_pattern)
11448 (vect_recog_widen_mult_pattern, vect_recog_pow_pattern):
11449 (vect_recog_widen_sum_pattern, vect_recog_over_widening_pattern)
11450 (vect_recog_average_pattern, vect_recog_cast_forwprop_pattern)
11451 (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
11452 (vect_recog_vector_vector_shift_pattern, vect_synth_mult_by_constant)
11453 (vect_recog_mult_pattern, vect_recog_divmod_pattern)
11454 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
11455 (vect_recog_mask_conversion_pattern): Replace vec<gimple *>
11456 parameter with a single stmt_vec_info.
11457 (vect_recog_func_ptr): Likewise.
11458 (vect_recog_gather_scatter_pattern): Likewise, folding in...
11459 (vect_try_gather_scatter_pattern): ...this.
11460 (vect_pattern_recog_1): Remove stmts_to_replace and just pass
11461 the stmt_vec_info of the statement to be matched. Don't clear
11462 STMT_VINFO_RELATED_STMT.
11463 (vect_pattern_recog): Update call accordingly.
11465 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
11467 PR tree-optimization/85694
11468 * doc/md.texi (avgM3_floor, uavgM3_floor, avgM3_ceil)
11469 (uavgM3_ceil): Document new optabs.
11470 * doc/sourcebuild.texi (vect_avg_qi): Document new target selector.
11471 * internal-fn.def (IFN_AVG_FLOOR, IFN_AVG_CEIL): New internal
11473 * optabs.def (savg_floor_optab, uavg_floor_optab, savg_ceil_optab)
11474 (savg_ceil_optab): New optabs.
11475 * tree-vect-patterns.c (vect_recog_average_pattern): New function.
11476 (vect_vect_recog_func_ptrs): Add it.
11477 * tree-vect-stmts.c (vectorizable_call): Get the type of the zero
11478 constant directly from the associated lhs.
11480 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
11482 * tree-vect-patterns.c (vect_split_statement): New function.
11483 (vect_convert_input): Use it to try to split an existing cast.
11485 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
11487 * poly-int.h (print_hex): New function.
11488 * dumpfile.h (dump_dec, dump_hex): Declare.
11489 * dumpfile.c (dump_dec, dump_hex): New poly_wide_int functions.
11490 * tree-vectorizer.h (_stmt_vec_info): Add min_output_precision,
11491 min_input_precision, operation_precision and operation_sign.
11492 * tree-vect-patterns.c (vect_get_range_info): New function.
11493 (vect_same_loop_or_bb_p, vect_single_imm_use)
11494 (vect_operation_fits_smaller_type): Delete.
11495 (vect_look_through_possible_promotion): Add an optional
11496 single_use_p parameter.
11497 (vect_recog_over_widening_pattern): Rewrite to use new
11498 stmt_vec_info infomration. Handle one operation at a time.
11499 (vect_recog_cast_forwprop_pattern, vect_narrowable_type_p)
11500 (vect_truncatable_operation_p, vect_set_operation_type)
11501 (vect_set_min_input_precision): New functions.
11502 (vect_determine_min_output_precision_1): Likewise.
11503 (vect_determine_min_output_precision): Likewise.
11504 (vect_determine_precisions_from_range): Likewise.
11505 (vect_determine_precisions_from_users): Likewise.
11506 (vect_determine_stmt_precisions, vect_determine_precisions): Likewise.
11507 (vect_vect_recog_func_ptrs): Put over_widening first.
11509 (vect_pattern_recog): Call vect_determine_precisions.
11511 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
11513 * tree-vect-patterns.c (vect_mark_pattern_stmts): Remove pattern
11514 statements that have been replaced by further pattern statements.
11515 (vect_pattern_recog_1): Clear STMT_VINFO_PATTERN_DEF_SEQ on failure.
11517 2018-07-03 Richard Biener <rguenther@suse.de>
11519 * tree-vect-stmts.c (vect_is_simple_use): Consolidate dumping,
11520 always set *dt. Dump vectype in vectype overload.
11521 * dumpfile.h (dump_gimple_expr): New function.
11522 (dump_gimple_expr_loc): Likewise.
11523 * dumpfile.c (dump_gimple_expr): New function.
11524 (dump_gimple_expr_loc): Likewise.
11526 2018-07-02 Jeff Law <law@redhat.com>
11528 * config/h8300/h8300.md (movqi_h8300, movqi_h8300hs): Consolidate
11529 the H8/300, H8/300H and H8/S variants into a single pattern.
11530 (movhi_h8300, movqi_h8300hs): Similarly.
11531 (pushqi_h8300hs, pushhi_h8300hs): Consolidate into a single pattern.
11532 (QHI mode iterator): New.
11534 * config/h8300/h8300.md: Remove trailing whitespace.
11536 2018-07-02 Jim Wilson <jimw@sifive.com>
11538 * config/riscv/riscv.c (riscv_expand_epilogue): Use emit_jump_insn
11539 instead of emit_insn for interrupt returns.
11540 * config/riscv/riscv.md (riscv_met): Add (return) to rtl.
11541 (riscv_sret, riscv_uret): Likewise.
11543 2018-07-02 David Malcolm <dmalcolm@redhat.com>
11545 * pretty-print.c (selftest::test_pp_format): Move save and restore
11546 of quotes to class auto_fix_quotes, and add an instance.
11547 * selftest.c: Include "intl.h".
11548 (selftest::auto_fix_quotes::auto_fix_quotes): New ctor.
11549 (selftest::auto_fix_quotes::~auto_fix_quotes): New dtor.
11550 * selftest.h (selftest::auto_fix_quotes): New class.
11552 2018-07-02 Richard Henderson <richard.henderson@linaro.org>
11554 * config/aarch64/aarch64-protos.h, config/aarch64/aarch64.c
11555 (aarch64_sve_prepare_conditional_op): Remove.
11556 * config/aarch64/aarch64-sve.md (cond_<SVE_INT_BINARY><SVE_I>):
11557 Allow aarch64_simd_reg_or_zero as select operand; remove
11558 the aarch64_sve_prepare_conditional_op call.
11559 (cond_<SVE_INT_BINARY_SD><SVE_SDI>): Likewise.
11560 (cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
11561 (*cond_<SVE_INT_BINARY><SVE_I>_z): New pattern.
11562 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_z): New pattern.
11563 (*cond_<SVE_COND_FP_BINARY><SVE_F>_z): New pattern.
11564 (*cond_<SVE_INT_BINARY><SVE_I>_any): New pattern.
11565 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_any): New pattern.
11566 (*cond_<SVE_COND_FP_BINARY><SVE_F>_any): New pattern
11567 and a splitters to match all of the *_any patterns.
11568 * config/aarch64/predicates.md (aarch64_sve_any_binary_operator): New.
11570 * config/aarch64/iterators.md (SVE_INT_BINARY_REV): Remove.
11571 (SVE_COND_FP_BINARY_REV): Remove.
11572 (sve_int_op_rev, sve_fp_op_rev): New.
11573 * config/aarch64/aarch64-sve.md (*cond_<SVE_INT_BINARY><SVE_I>_0): New.
11574 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_0): New.
11575 (*cond_<SVE_COND_FP_BINARY><SVE_F>_0): New.
11576 (*cond_<SVE_INT_BINARY><SVE_I>_2): Rename, add movprfx alternative.
11577 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_2): Similarly.
11578 (*cond_<SVE_COND_FP_BINARY><SVE_F>_2): Similarly.
11579 (*cond_<SVE_INT_BINARY><SVE_I>_3): Similarly; use sve_int_op_rev.
11580 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_3): Similarly.
11581 (*cond_<SVE_COND_FP_BINARY><SVE_F>_3): Similarly; use sve_fp_op_rev.
11583 * config/aarch64/aarch64-sve.md (cond_<SVE_COND_FP_BINARY><SVE_F>):
11584 Remove match_dup 1 from the inner unspec.
11585 (*cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
11587 * config/aarch64/aarch64.md (movprfx): New attr.
11588 (length): Default movprfx to 8.
11589 * config/aarch64/aarch64-sve.md (*mul<SVE_I>3): Add movprfx alt.
11590 (*madd<SVE_I>, *msub<SVE_I): Likewise.
11591 (*<su>mul<SVE_I>3_highpart): Likewise.
11592 (*<SVE_INT_BINARY_SD><SVE_SDI>3): Likewise.
11593 (*v<ASHIFT><SVE_I>3): Likewise.
11594 (*<su><MAXMIN><SVE_I>3): Likewise.
11595 (*<su><MAXMIN><SVE_F>3): Likewise.
11596 (*fma<SVE_F>4, *fnma<SVE_F>4): Likewise.
11597 (*fms<SVE_F>4, *fnms<SVE_F>4): Likewise.
11598 (*div<SVE_F>4): Likewise.
11600 2018-07-02 Richard Sandiford <richard.sandiford@arm.com>
11602 * tree-vect-patterns.c (vect_recog_widen_shift_pattern): Fix typo
11605 2018-07-02 Richard Biener <rguenther@suse.de>
11607 PR tree-optimization/86363
11608 * tree-ssa-sccvn.c (vn_reference_lookup_3): Check the
11609 memset argument refers to a non-variable address.
11611 2018-07-02 Aldy Hernandez <aldyh@redhat.com>
11613 * tree-vrp.c (extract_range_from_binary_expr_1): Abstract a lot of the
11614 {PLUS,MINUS}_EXPR code to...
11615 (adjust_symbolic_bound): ...here,
11616 (combine_bound): ...here,
11617 (set_value_range_with_overflow): ...and here.
11619 2018-07-02 Aldy Hernandez <aldyh@redhat.com>
11621 * tree-vrp.c (extract_range_from_unary_expr): Abstract ABS_EXPR
11623 (extract_range_from_abs_expr): ...here.
11625 2018-07-02 Eric Botcazou <ebotcazou@adacore.com>
11627 * config/i386/i386.c (ix86_finalize_stack_frame_flags): Do not overrule
11628 -fno-omit-frame-pointer when not optimizing.
11630 2018-07-02 Martin Liska <mliska@suse.cz>
11633 * ipa-pure-const.c (malloc_candidate_p): Revert usage of ::get.
11634 (propagate_nothrow): Likewise.
11636 2018-07-02 Martin Liska <mliska@suse.cz>
11639 * ipa-inline.c (early_inliner): Revert wrongly added ::get call.
11641 2018-07-02 David Malcolm <dmalcolm@redhat.com>
11643 * dumpfile.c (dump_generic_expr_loc): Undo removal of this
11644 function in r262149, changing "loc" param from source_location to
11645 const dump_location_t &.
11646 * dumpfile.h (dump_generic_expr_loc): Undo removal of this
11647 declaration, as above.
11649 2018-07-01 Paul Koning <ni1d@arrl.net>
11651 * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
11652 -munit-asm, -mgnu-asm, -mdec-asm.
11653 * config/pdp11/pdp11-protos.h (pdp11_gen_int_label): New.
11654 (pdp11_output_labelref): New.
11655 (pdp11_output_def): New.
11656 (pdp11_output_addr_vec_elt): New.
11657 * config/pdp11/pdp11.c: Use tab between opcode and operands. Use
11658 %# and %@ format codes.
11659 (pdp11_option_override): New.
11660 (TARGET_ASM_FILE_START_FILE_DIRECTIVE): Define.
11661 (pdp11_output_ident): New.
11662 (pdp11_asm_named_section): New.
11663 (pdp11_asm_init_sections): New.
11664 (pdp11_file_start): New.
11665 (pdp11_file_end): New.
11666 (output_ascii): Use .ascii/.asciz for -mdec-asm.
11667 (pdp11_asm_print_operand): Update %# and %$ for -mdec-asm. Add
11668 %o, like %c but octal.
11669 (pdp11_option_override): New.
11670 * config/pdp11/pdp11.h (TEXT_SECTION_ASM_OP): Update for
11672 (DATA_SECTION_ASM_OP): Ditto.
11673 (READONLY_DATA_SECTION_ASM_OP): New.
11674 (IS_ASM_LOGICAL_LINE_SEPARATOR): New.
11675 (ASM_GENERATE_INTERNAL_LABEL): Use new function.
11676 (ASM_OUTPUT_LABELREF): Ditto.
11677 (ASM_OUTPUT_DEF): Ditto.
11678 (ASM_OUTPUT_EXTERNAL): New.
11679 (ASM_OUTPUT_SOURCE_FILENAME): New.
11680 (ASM_OUTPUT_ADDR_VEC_ELT): Use new function.
11681 (ASM_OUTPUT_SKIP): Update for -mdec-asm.
11682 * config/pdp11/pdp11.md: Use tab between opcode and operands. Use
11683 %# and %@ format codes.
11684 * config/pdp11/pdp11.opt (mgnu-asm): New.
11685 (mdec-asm): Conflicts with -mgnu-asm and -munix-asm.
11686 (munix-asm): Conflicts with -mdec-asm and -mgnu-asm.
11687 * doc/invoke.txt (PDP-11 Options): Add -mgnu-asm.
11689 2018-07-01 Aldy Hernandez <aldyh@redhat.com>
11691 * tree-ssa-threadupdate.c (mark_threaded_blocks): Avoid
11692 dereferencing path[] beyond its length.
11694 (debug_all_paths): New.
11695 (rewire_first_differing_edge): New.
11696 (adjust_paths_after_duplication): New.
11697 (duplicate_thread_path): Call adjust_paths_after_duplication.
11699 (thread_through_all_blocks): Add new argument to
11700 duplicate_thread_path.
11702 2018-06-30 Jim Wilson <jimw@sifive.com>
11704 * config/riscv/predicates.md (p2m1_shift_operand): New.
11705 (high_mask_shift_operand): New.
11706 * config/riscv/riscv.md (lshrsi3_zero_extend_3+1): New combiner
11707 pattern using p2m1_shift_operand.
11708 (lshsi3_zero_extend_3+2): New combiner pattern using
11709 high_mask_shift_operand.
11711 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
11713 * tree-vect-patterns.c (vect_get_external_def_edge): New function,
11715 (vect_recog_rotate_pattern): ...here.
11716 (vect_convert_input): Try to insert casts of invariants in the
11718 * tree-vect-loop-manip.c (vect_loop_versioning): Don't require the
11719 preheader to be empty.
11721 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
11723 * tree-vect-patterns.c (append_pattern_def_seq): Take an optional
11724 vector type. If given, install it in the new statement's
11725 STMT_VINFO_VECTYPE.
11726 (vect_element_precision): New function.
11727 (vect_unpromoted_value): New struct.
11728 (vect_unpromoted_value::vect_unpromoted_value): New function.
11729 (vect_unpromoted_value::set_op): Likewise.
11730 (vect_look_through_possible_promotion): Likewise.
11731 (vect_joust_widened_integer, vect_joust_widened_type): Likewise.
11732 (vect_widened_op_tree, vect_convert_input): Likewise.
11733 (vect_convert_inputs, vect_convert_output): Likewise.
11734 (vect_recog_dot_prod_pattern): Use vect_look_through_possible_promotion
11735 to handle the optional cast of the multiplication result and
11736 vect_widened_op_tree to detect the widened multiplication itself.
11737 Do not require the input and output of promotion casts to have
11738 the same sign, but base the signedness of the operation on the
11739 input rather than the result. If the pattern includes two
11740 promotions, check that those promotions have the same sign.
11741 Do not restrict the MULT_EXPR handling to a double-width result;
11742 handle quadruple-width results and wider. Use vect_convert_inputs
11743 to convert the inputs to the common type.
11744 (vect_recog_sad_pattern): Use vect_look_through_possible_promotion
11745 to handle the optional cast of the ABS result. Also allow a sign
11746 change or a sign extension between the ABS and MINUS.
11747 Use vect_widened_op_tree to detect the widened subtraction and use
11748 vect_convert_inputs to convert the inputs to the common type.
11749 (vect_handle_widen_op_by_const): Delete.
11750 (vect_recog_widen_op_pattern): New function.
11751 (vect_recog_widen_mult_pattern): Use it.
11752 (vect_recog_widen_shift_pattern): Likewise.
11753 (vect_recog_widen_sum_pattern): Use
11754 vect_look_through_possible_promotion to handle the promoted
11757 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
11759 * gimple-iterator.c (gsi_for_stmt): Add a new overload that takes
11760 the containing gimple_seq *.
11761 * gimple-iterator.h (gsi_for_stmt): Declare it.
11762 * tree-vect-patterns.c (vect_recog_dot_prod_pattern)
11763 (vect_recog_sad_pattern, vect_recog_widen_sum_pattern)
11764 (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
11765 (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
11766 (vect_recog_mask_conversion_pattern): Remove STMT_VINFO_IN_PATTERN_P
11768 (vect_init_pattern_stmt, vect_set_pattern_stmt): New functions,
11770 (vect_mark_pattern_stmts): ...here. Handle cases in which the
11771 statement being replaced is part of an existing pattern
11772 definition sequence, inserting the new pattern statements before
11774 (vect_pattern_recog_1): Don't return a bool. If the statement
11775 is already part of a pattern, instead apply pattern matching
11776 to the pattern definition statements. Don't clear the
11777 STMT_VINFO_RELATED_STMT if is_pattern_stmt_p.
11778 (vect_pattern_recog): Don't break after the first match;
11779 continue processing the pattern definition statements instead.
11780 Don't bail out for STMT_VINFO_IN_PATTERN_P here.
11782 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
11784 * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
11785 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
11786 (vect_recog_widen_sum_pattern): Use it.
11788 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
11790 * tree-vect-loop.c (vectorizable_reduction): Assert that the
11791 phi is not a pattern statement and has not been replaced by
11792 a pattern statement.
11793 * tree-vect-patterns.c (type_conversion_p): Don't check
11794 STMT_VINFO_IN_PATTERN_P.
11795 (vect_recog_vector_vector_shift_pattern): Likewise.
11796 (vect_recog_dot_prod_pattern): Expect vect_is_simple_use to return
11797 the pattern statement rather than the original statement; check
11798 directly for a WIDEN_MULT_EXPR here.
11799 * tree-vect-slp.c (vect_get_and_check_slp_defs): Expect
11800 vect_is_simple_use to return the pattern statement rather
11801 than the original statement; use is_pattern_stmt_p to check
11802 for such a pattern statement.
11803 * tree-vect-stmts.c (process_use): Expect vect_is_simple_use
11804 to return the pattern statement rather than the original statement;
11805 don't do the same transformation here.
11806 (vect_is_simple_use): If the defining statement has been replaced
11807 by a pattern statement, return the pattern statement instead.
11808 Remove the corresponding (local) transformation from the vectype
11811 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
11813 * tree-vectorizer.h (vect_is_simple_use): Move the gimple ** to the
11814 end and default to null.
11815 * tree-vect-loop.c (vect_create_epilog_for_reduction)
11816 (vectorizable_reduction): Update calls accordingly, dropping the
11817 gimple ** argument if the passed-back statement isn't needed.
11818 * tree-vect-patterns.c (vect_get_internal_def, type_conversion_p)
11819 (vect_recog_rotate_pattern): Likewise.
11820 (vect_recog_mask_conversion_pattern): Likewise.
11821 * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
11822 (vect_mask_constant_operand_p): Likewise.
11823 * tree-vect-stmts.c (is_simple_and_all_uses_invariant, process_use):
11824 (vect_model_simple_cost, vect_get_vec_def_for_operand): Likewise.
11825 (get_group_load_store_type, get_load_store_type): Likewise.
11826 (vect_check_load_store_mask, vect_check_store_rhs): Likewise.
11827 (vectorizable_call, vectorizable_simd_clone_call): Likewise.
11828 (vectorizable_conversion, vectorizable_assignment): Likewise.
11829 (vectorizable_shift, vectorizable_operation): Likewise.
11830 (vectorizable_store, vect_is_simple_cond): Likewise.
11831 (vectorizable_condition, vectorizable_comparison): Likewise.
11832 (get_same_sized_vectype, vect_get_mask_type_for_stmt): Likewise.
11833 (vect_is_simple_use): Rename the def_stmt argument to def_stmt_out
11834 and move it to the end. Cope with null def_stmt_outs.
11836 2018-06-30 Bernd Edlinger <bernd.edlinger@hotmail.de>
11838 * Makefile.in (FLAGS_TO_PASS): Add RANLIB_FOR_TARGET.
11840 2018-06-29 Jeff Law <law@redhat.com>
11842 * config/v850/v850.c (v850_legitimate_address_p): Handle large
11843 displacements for TARGET_V850E2V3 and newer.
11844 (TARGET_LRA_P): Remove. Defaults to LRA now.
11845 * config/v850/v850.md (sign23byte_load): Remove.
11846 (unsign23byte_load, sign23hword_load, unsign23hword_load): Likewise.
11847 (23word_load, 23byte_store, 23hword_store, 23word_store): Likewise.
11849 2018-06-29 Martin Liska <mliska@suse.cz>
11852 * coverage.c (coverage_init): Mangle full path name.
11853 * doc/invoke.texi: Document the change.
11854 * gcov-io.c (mangle_path): New.
11855 * gcov-io.h (mangle_path): Likewise.
11856 * gcov.c (mangle_name): Use mangle_path for path mangling.
11858 2018-06-29 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
11860 * config/arm/arm.c (output_move_double): Don't allow STRD instructions
11861 if starting source register is not even.
11863 2018-06-29 Martin Liska <mliska@suse.cz>
11865 PR tree-optimization/86263
11866 * tree-switch-conversion.c (switch_decision_tree::try_switch_expansion):
11867 Make edge redirection.
11869 2018-06-29 David Malcolm <dmalcolm@redhat.com>
11871 * dumpfile.c (dump_loc): Add indentation based on scope depth.
11872 (dump_scope_depth): New variable.
11873 (get_dump_scope_depth): New function.
11874 (dump_begin_scope): New function.
11875 (dump_end_scope): New function.
11876 * dumpfile.h (get_dump_scope_depth): New declaration.
11877 (dump_begin_scope): New declaration.
11878 (dump_end_scope): New declaration.
11879 (class auto_dump_scope): New class.
11880 (AUTO_DUMP_SCOPE): New macro.
11881 * tree-vectorizer.h (DUMP_VECT_SCOPE): Reimplement in terms of
11884 2018-06-29 Richard Biener <rguenther@suse.de>
11886 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences): Assert
11887 compute_all_dependences succeeds.
11888 * tree-vect-loop.c (vect_get_datarefs_in_loop): Fail early if we
11889 exceed --param loop-max-datarefs-for-datadeps.
11891 2018-06-29 Jakub Jelinek <jakub@redhat.com>
11893 * config/rs6000/t-rs6000: Append rs6000-modes.h to TM_H.
11895 2018-06-28 Uros Bizjak <ubizjak@gmail.com>
11898 * config/i386/sse.md (*vec_extractv4si_0_zext_sse4): Use
11899 alternative 0 in preferred_for_speed attribute.
11901 2018-06-28 Paul Koning <ni1d@arrl.net>
11903 * config/pdp11/pdp11-protos.h (pdp11_shift_length): New function.
11904 * config/pdp11/pdp11.c (pdp11_shift_length): New function.
11905 * config/pdp11/pdp11.h (ADJUST_INSN_LENGTH): Remove.
11906 * config/pdp11/pdp11.md: Correct "length" attribute calculation
11907 for shift insn patterns.
11909 2018-06-28 David Malcolm <dmalcolm@redhat.com>
11911 * cgraph.c (cgraph_node::get_body): Replace assignments to
11912 "dump_file" with calls to set_dump_file.
11913 * dumpfile.c (alt_dump_file): Make static, and group with...
11914 (alt_flags): ...this definition.
11915 (dumps_are_enabled): New variable.
11916 (refresh_dumps_are_enabled): New function.
11917 (set_dump_file): New function.
11918 (set_alt_dump_file): New function.
11919 (gcc::dump_manager::dump_start): Replace assignments to
11920 "dump_file" and "alt_dump_file" with calls to set_dump_file and
11922 (gcc::dump_manager::dump_finish): Likewise.
11923 * dumpfile.h (alt_dump_file): Delete decl.
11924 (dumps_are_enabled): New variable decl.
11925 (set_dump_file): New function decl.
11926 (dump_enabled_p): Rewrite in terms of new "dumps_are_enabled"
11928 * tree-nested.c (lower_nested_functions): Replace assignments to
11929 "dump_file" with calls to set_dump_file.
11931 2018-06-28 Eric Botcazou <ebotcazou@adacore.com>
11933 * tree-cfg.c (verify_gimple_in_cfg): Call verify_location on the
11934 goto_locus of each outgoing edge of each basic block.
11936 2018-06-28 Richard Biener <rguenther@suse.de>
11938 * dwarf2out.c (decl_scope_table): Remove.
11939 (push_decl_scope): Likewise.
11940 (pop_decl_scope): Likewise.
11941 (gen_type_die_for_member): Do not call push/pop_decl_scope.
11942 (gen_struct_or_union_type_die): Likewise.
11943 (gen_tagged_type_die): Likewise.
11944 (dwarf2out_init): Do not initialize decl_scope_table.
11945 (dwarf2out_c_finalize): Do not free it.
11947 2018-06-28 Richard Biener <rguenther@suse.de>
11949 * dwarf2out.c (gen_subprogram_die): Use is_unit_die when
11950 deciding whether to not re-use a DIE.
11952 2018-06-28 Richard Biener <rguenther@suse.de>
11954 * dwarf2out.c (gen_subprogram_die): Always re-use DIEs with an
11955 DW_AT_abstract_origin attribute.
11957 2018-06-28 Martin Liska <mliska@suse.cz>
11959 * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
11960 Use newly introduced constants.
11961 * tree-switch-conversion.h (struct jump_table_cluster):
11962 Define max_ratio_for_size and max_ratio_for_speed.
11964 2018-06-28 Martin Liska <mliska@suse.cz>
11966 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
11967 Add new checking assert to catch invalid state.
11968 (jump_table_cluster::can_be_handled): Handle single case
11970 (jump_table_cluster::is_beneficial): Bail out for such case.
11971 (bit_test_cluster::find_bit_tests):
11972 Add new checking assert to catch invalid state.
11973 (bit_test_cluster::can_be_handled): Handle single case
11975 (bit_test_cluster::is_beneficial): Bail out for such case.
11976 (switch_decision_tree::analyze_switch_statement):
11979 2018-06-28 Martin Liska <mliska@suse.cz>
11981 * common.opt: Introduce -completion option.
11982 * gcc.c (driver_handle_option): Handle it.
11983 (driver::main): Print completions if completion
11985 * opt-suggestions.c (option_proposer::get_completions):
11987 (option_proposer::suggest_completion): Likewise.
11988 (option_proposer::find_param_completions): Likewise.
11989 (verify_autocompletions): Likewise.
11990 (test_completion_valid_options): Likewise.
11991 (test_completion_valid_params): Likewise.
11992 (in_completion_p): Likewise.
11993 (empty_completion_p): Likewise.
11994 (test_completion_partial_match): Likewise.
11995 (test_completion_garbage): Likewise.
11996 (opt_proposer_c_tests): Likewise.
11997 * opt-suggestions.h: Declare new functions.
11998 * opts.c (common_handle_option): Handle OPT__completion_.
11999 * selftest-run-tests.c (selftest::run_tests): Add
12000 opt_proposer_c_tests.
12001 * selftest.c (assert_str_startswith): New.
12002 * selftest.h (assert_str_startswith): Likewise.
12003 (opt_proposer_c_tests): New.
12004 (ASSERT_STR_STARTSWITH): Likewise.
12006 2018-06-28 Martin Liska <mliska@suse.cz>
12008 * Makefile.in: Add opt-suggestions.o.
12009 * gcc-main.c: Include opt-suggestions.h.
12010 * gcc.c (driver::driver): Likewise.
12011 (driver::~driver): Remove m_option_suggestions.
12012 (driver::build_option_suggestions): Moved to option_proposer.
12013 (driver::suggest_option): Likewise.
12014 (driver::handle_unrecognized_options): Use option_proposer.
12015 * gcc.h (class driver): Add new memver m_option_proposer.
12016 * opt-suggestions.c: New file.
12017 * opt-suggestions.h: New file.
12019 2018-06-28 Martin Liska <mliska@suse.cz>
12021 * vec.h (class auto_string_vec): New (moved from auto_argvec).
12022 (auto_string_vec::~auto_string_vec): Likewise.
12024 2018-06-28 Eric Botcazou <ebotcazou@adacore.com>
12026 * tree-inline.h (struct copy_body_data): Move remapping_type_depth and
12027 prevent_decl_creation_for_types fields up and add reset_location field.
12028 * tree-inline.c (remap_gimple_stmt): Force input_location on the new
12029 statement if id->reset_location is true.
12030 (copy_edges_for_bb): Do not set goto_locus on the new edges if
12031 id->reset_location is true.
12032 (copy_phis_for_bb): Force input_location on the arguments if
12033 id->reset_location is true.
12034 (expand_call_inline): Set id->reset_location if DECL_IGNORED_P
12035 is set on the function to be inlined.
12037 2018-06-27 Stephan Bergmann <sbergman@redhat.com>
12039 * doc/invoke.texi (Debugging Options): Add -gsplit-dwarf.
12041 2018-06-27 Dimitar Dimitrov <dimitar@dinux.eu>
12043 * lra-eliminations.c (update_reg_eliminate): Mark all spanning hard
12044 registers for Pmode.
12045 * lra-lives.c (check_pseudos_live_through_calls): Mark all spanning
12046 hard registers for the clobbered pseudo.
12048 2018-06-27 Paul Koning <ni1d@arrl.net>
12050 * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
12051 mutually exclusive options.
12052 * config/pdp11/constraints.md (h): New constraint.
12053 (O): Update definition to match shift code generation.
12054 (D): New constraint.
12055 * config/pdp11/pdp11-modes.def (CCNZ): Define mode.
12057 * config/pdp11/pdp11-protos.h (int_no_side_effect_operand): New
12059 (output_jump): Change arguments.
12060 (pdp11_fixed_cc_regs): New function.
12061 (pdp11_cc_mode): Ditto.
12062 (pdp11_expand_shift): Ditto.
12063 (pdp11_assemble_shift): Ditto.
12064 (pdp11_small_shift): Ditto.
12065 (pdp11_branch_cost): Remove.
12066 * config/pdp11/pdp11.c (pdp11_assemble_integer): Remove comments
12068 (pdp11_register_move_cost): Update for CC registers.
12069 (pdp11_rtx_costs): Add case for LSHIFTRT.
12070 (pdp11_output_jump): Add CCNZ mode conditional branches.
12071 (notice_update_cc_on_set): Remove.
12072 (pdp11_cc_mode): New function.
12073 (simple_memory_operand): Correct pre/post decrement case.
12074 (no_side_effect_operand): New function.
12075 (pdp11_regno_reg_class): Add CC_REGS class.
12076 (pdp11_fixed_cc_regs): New function.
12077 (pdp11_small_shift): New function.
12078 (pdp11_expand_shift): New function to expand shift insns.
12079 (pdp11_assemble_shift): New function to output shifts.
12080 (pdp11_branch_cost): Remove.
12081 (pdp11_modes_tieable_p): Make QI/HI modes tieable.
12082 * config/pdp11/pdp11.h (SIZE_TYPE): Ensure 16-bit type.
12083 (WCHAR_TYPE): Ditto.
12084 (PTRDIFF_TYPE): Ditto.
12085 (ADJUST_INSN_LENGTH): New macro.
12086 (FIXED_REGISTERS): Add CC registers.
12087 (CALL_USED_REGISTERS): Ditto.
12088 (reg_class): Ditto.
12089 (REG_CLASS_NAMES): Ditto.
12090 (REG_CLASS_CONTENTS): Ditto.
12091 (SELECT_CC_MODE): Use new function.
12092 (TARGET_FLAGS_REGNUM): New macro.
12093 (TARGET_FIXED_CONDITION_CODE_REGS): Ditto.
12094 (cc0_reg_rtx): Remove.
12095 (CC_STATUS_MDEP): Remove.
12096 (CC_STATUS_MDEFP_INIT): Remove.
12097 (CC_IN_FPU): Remove.
12098 (NOTICE_UPDATE_CC): Remove.
12099 (REGISTER_NAMES): Add CC registers.
12100 (BRANCH_COST): Change to constant 1.
12101 * config/pdp11/pdp11.md: Rewrite for CCmode condition code
12103 * config/pdp11/pdp11.opt (mbcopy): Remove.
12104 (mbcopy-builtin): Remove.
12105 (mbranch-cheap): Remove.
12106 (mbranch-expensive): Remove.
12107 * config/pdp11/predicates.md (expand_shift_operand): Update to
12108 match shift code generation.
12109 (ccnz_operator): New predicate.
12110 * doc/invoke.texi (PDP-11 Options): Remove deleted options
12111 -mbcopy, -mbcopy-builtin, -mbranch-cheap, -mbranch-expensive.
12112 Remove non-existent option -mabshi, -mno-abshi. Document mutually
12114 * doc/md.texi (PDP-11): Document new D and h constraints. Update
12115 description of O constraint.
12117 2018-06-27 Jeff Law <law@redhat.com>
12118 Austin Law <austinklaw@gmail.com>
12120 * config/v850/v850.md (addsi3_set_flags): New pattern.
12121 (subsi3_set_flags, negsi2_set_flags, andsi3_set_flags): Likewise.
12122 (iorsi3_set_flags, xorsi3_set_flags, one_cmplsi2_set_flags): Likewise.
12123 (zero_extendhisi2_v850_set_flags): Likewise.
12124 (zero_extendqisi2_v850_set_flags): Likewise.
12125 (ashlsi3_set_flags, ashlsi3_v850e2_set_flags): Likewise.
12126 (lshrsi3_set_flags, lshrsi3_v850e2_set_flags): Likewise.
12127 (ashrsi3_set_flags, ashrsi3_v850e2_set_flags): Likewise.
12129 * config/v850/v850-protos.h (notice_update_cc): Remove.
12130 * config/v850/v850.c (v850_compare_op0, v850_compare_op1): Remove.
12131 (v850_print_operand): Handle 'D' and "d".
12132 (v850_select_cc_mode): Remove ATTRIBUTE_UNUSED for last argument.
12133 Add handling of arithmetic/logical operations compared against zero.
12134 (v850_gen_float_compare): Remove ATTRIBUTE_UNUSED for last argument.
12135 Do not look at v850_compare_op, instead get mode from last argument.
12136 (v850_gen_compare): Remove
12137 (increment_stack): Use addsi3_clobber_flags to avoid splitting failure
12138 after reload for prologue insns.
12139 (expand_prologue): Account for CLOBBER of CC_REGNUM in various
12141 (construct_save_jarl): Likewise.
12142 (TARGET_FLAGS_REGNUM): Define.
12143 * config/v850/v850.h (v850_compare_op0, v850_compare_op1): Remove.
12144 (NOTICE_UPDATE_CC): Remove.
12145 * config/v850/v850.md (v850_tst1): Use (reg:CCZ CC_REGNUM) rather
12146 than cc0. Conditionalize on reload_completed.
12147 (cmpsi_insn, setfcc_insn): Likewise.
12148 (tst1 splitter): Turn into define_and_split which sets the flags
12150 (cstoresi4, cbranchsf4, cbranchdf4, cbranchsi4_insn): Likewise.
12151 (cbranchsi4, branch_normal, branch_invert): Do not expose cc0 here.
12152 (cstoresf4, cstoredf4): Clobber the flags.
12153 (cmpsi, cmpsf, cmpdf): Remove expanders.
12154 (setf_insn): Remove pattern.
12155 (addsi3): Turn into define_and_split which clobbers the flags after
12156 reload and a suitable pattern (addsi3_clobber_flags) for use after
12158 (subsi3, negsi2, andsi3, iorsi3, xorsi3, one_cmplsi2) Likewise.
12159 (ashlsi3, ashlsi3_v850e2, lshrsi3, lsh4si3_v850e2): Likewise.
12160 (ashrsi3, ashrsi3_v850e2): Likewise.
12161 (bins): Clobber the flags.
12162 (movsicc_normal_cc, movsicc_normal, movsicc_tst1): Likewise.
12163 (movsicc_tst1_revesed, sasf, swap and rotate patterns): Likewise.
12164 (fix_loop_counter, call_internal_short, call_internal_long): Likewise.
12165 (call_value_internal_short, call_value_internal_long): Likewise.
12166 (callt_save_interrupt, callt_return_interrupt): Likewise.
12167 (save_interrupt, return_interrupt): Likewise.
12168 (callt_save_all_interrupt, save_all_interrupt): Likewise.
12169 (_save_all_interrupt, callt_restore_all_interrupt): Likewise.
12170 (restore_all_interrupt, _restore_all_interrupt): Likewise.
12171 (All FP comparisons): Only allow after reload has completed.
12173 (divh, divhu): Tweak output template.
12174 (branch_z_normal, branch_z_invert): Remove
12175 (branch_nz_normal, branch_nz_invert): Likewise.
12176 (extendhisi_insn, extendqisi_insn): Do not clobber flags.
12178 * config/v850/v850-modes.def (CCZ, CCNZ): Add new modes.
12179 * config/v850/v850.c (notice_update_cc): Remove.
12180 * config/v850/v850.h (CC_OVERFLOW_UNUSABLE): Remove
12181 (CC_NO_CARRY): Likewise.
12182 (NOTICE_UPDATE_CC): Define to nothing.
12183 * config/v850/v850.md: Remove block comment on cc0 handling
12184 Remove "cc" attribute from all patterns. Remove cc_status handling
12185 from all patterns. Minor formatting fixes.
12187 2018-06-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
12189 * config/aarch64/aarch64-cores.def (cortex-a76): New entry.
12190 (cortex-a76.cortex-a55): Likewise.
12191 * config/aarch64/aarch64-tune.md: Regenerate.
12192 * doc/invoke.texi (AArch64 Options): Document cortex-a76 and
12193 cortex-a76.cortex-a55.
12195 2018-06-27 Jeff Law <law@redhat.com>
12197 * config/v850/t-v850 (MULTILIB_OPTIONS): Remove 8byte-align.
12198 (MULTILIB_DIRNAMES): Similarly.
12200 2018-06-27 Eric Botcazou <ebotcazou@adacore.com>
12202 * gimple.h (gimple_return_retbnd): Delete.
12203 (gimple_return_set_retbnd): Likewise.
12204 * cgraphunit.c (cgraph_node::expand_thunk): Remove call to
12205 gimple_return_set_retbnd.
12206 * gimple-pretty-print.c (dump_gimple_return): Remove call to
12207 gimple_return_retbnd and adjust.
12208 * tree-inline.h (struct copy_body_data): Remove retbnd field.
12209 * tree-inline.c (remap_gimple_stmt): Remove handling of retbnd.
12210 Explicitly return NULL in a couple more cases. Move assertion
12211 on debug statements and remove unreachable code.
12212 (reset_debug_binding): Do not test id->retbnd.
12213 (expand_call_inline): Do not set it.
12215 2018-06-27 Rasmus Villemoes <rv@rasmusvillemoes.dk>
12217 * configure.ac: Add --disable-gcov option.
12218 * configure: Regenerate.
12219 * Makefile.in: Honour @enable_gcov@.
12220 * doc/install.texi: Document --disable-gcov.
12222 2018-06-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
12224 * config/arm/arm-cpus.in (cortex-a76): New entry.
12225 (cortex-a76.cortex-a55): Likewise.
12226 * config/arm/arm-tables.opt: Regenerate.
12227 * config/arm/arm-tune.md: Likewise.
12228 * config/arm/driver-arm.c (arm_cpu_table): Add Cortex-A76 entry.
12229 * doc/invoke.texi (ARM Options): Document cortex-a76 and
12230 cortex-a76.cortex-a55.
12232 2018-06-27 Tamar Christina <tamar.christina@arm.com>
12235 * config/aarch64/aarch64.md (*movhf_aarch64): Add dup v0.4h pattern.
12237 2018-06-27 Siddhesh Poyarekar <siddhesh@sourceware.org>
12239 * config/aarch64/aarch64.h (CALL_USE_REGISTERS): Fix obsolete
12241 (EPILOGUE_USES): Likewise.
12243 2018-06-26 Eric Botcazou <ebotcazou@adacore.com>
12245 * tree-inline.c (remap_location): New function extracted from...
12246 (copy_edges_for_bb): Add ID parameter. Remap goto_locus.
12247 (copy_phis_for_bb): ...here. Call remap_location.
12248 (copy_cfg_body): Adjust call to copy_edges_for_bb.
12250 2018-06-26 Aaron Sawdey <acsawdey@linux.ibm.com>
12252 * config/rs6000/rs6000-string.c (expand_block_clear): Don't use
12253 unaligned vsx for 16B memset.
12255 2018-06-26 Segher Boessenkool <segher@kernel.crashing.org>
12258 * config/rs6000/rs6000.c (rs6000_init_builtins): Do not set
12259 ieee128_float_type_node to long_double_type_node unless
12260 TARGET_LONG_DOUBLE_128 is set.
12262 2018-06-26 David Malcolm <dmalcolm@redhat.com>
12264 * cfgloop.c (get_loop_location): Convert return type from
12265 location_t to dump_user_location_t, replacing INSN_LOCATION lookups
12266 by implicit construction from rtx_insn *, and using
12267 dump_user_location_t::from_function_decl for the fallback case.
12268 * cfgloop.h (get_loop_location): Convert return type from
12269 location_t to dump_user_location_t.
12270 * cgraphunit.c (walk_polymorphic_call_targets): Update call to
12271 dump_printf_loc to pass in a dump_location_t rather than a
12272 location_t, via the gimple stmt.
12273 * coverage.c (get_coverage_counts): Update calls to
12274 dump_printf_loc to pass in dump_location_t rather than a
12276 * doc/optinfo.texi (Dump types): Convert example of
12277 dump_printf_loc from taking "locus" to taking "insn". Update
12278 description of the "_loc" calls to cover dump_location_t.
12279 * dumpfile.c: Include "backend.h", "gimple.h", "rtl.h", and
12281 (dump_user_location_t::dump_user_location_t): New constructors,
12282 from gimple *stmt and rtx_insn *.
12283 (dump_user_location_t::from_function_decl): New function.
12284 (dump_loc): Make static.
12285 (dump_gimple_stmt_loc): Convert param "loc" from location_t to
12286 const dump_location_t &.
12287 (dump_generic_expr_loc): Delete.
12288 (dump_printf_loc): Convert param "loc" from location_t to
12289 const dump_location_t &.
12290 (selftest::test_impl_location): New function.
12291 (selftest::dumpfile_c_tests): New function.
12292 * dumpfile.h: Include "profile-count.h".
12293 (class dump_user_location_t): New class.
12294 (struct dump_impl_location_t): New struct.
12295 (class dump_location_t): New class.
12296 (dump_printf_loc): Convert 2nd param from source_location to
12297 const dump_location_t &.
12298 (dump_generic_expr_loc): Delete.
12299 (dump_gimple_stmt_loc): Convert 2nd param from source_location to
12300 const dump_location_t &.
12301 * gimple-fold.c (fold_gimple_assign): Update call to
12302 dump_printf_loc to pass in a dump_location_t rather than a
12303 location_t, via the gimple stmt.
12304 (gimple_fold_call): Likewise.
12305 * gimple-loop-interchange.cc
12306 (loop_cand::analyze_iloop_reduction_var): Update for change to
12307 check_reduction_path.
12308 (tree_loop_interchange::interchange): Update for change to
12309 find_loop_location.
12310 * graphite-isl-ast-to-gimple.c (scop_to_isl_ast): Update for
12311 change in return-type of find_loop_location.
12312 (graphite_regenerate_ast_isl): Likewise.
12313 * graphite-optimize-isl.c (optimize_isl): Likewise.
12314 * graphite.c (graphite_transform_loops): Likewise.
12315 * ipa-devirt.c (ipa_devirt): Update call to dump_printf_loc to
12316 pass in a dump_location_t rather than a location_t, via the
12318 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
12319 * ipa.c (walk_polymorphic_call_targets): Likewise.
12320 * loop-unroll.c (report_unroll): Convert "locus" param from
12321 location_t to dump_location_t.
12322 (decide_unrolling): Update for change to get_loop_location's
12324 * omp-grid.c (struct grid_prop): Convert field "target_loc" from
12325 location_t to dump_user_location_t.
12326 (grid_find_single_omp_among_assignments_1): Updates calls to
12327 dump_printf_loc to pass in a dump_location_t rather than a
12328 location_t, via the gimple stmt.
12329 (grid_parallel_clauses_gridifiable): Convert "tloc" from
12330 location_t to dump_location_t. Updates calls to dump_printf_loc
12331 to pass in a dump_location_t rather than a location_t, via the
12333 (grid_inner_loop_gridifiable_p): Likewise.
12334 (grid_dist_follows_simple_pattern): Likewise.
12335 (grid_gfor_follows_tiling_pattern): Likewise.
12336 (grid_target_follows_gridifiable_pattern): Likewise.
12337 (grid_attempt_target_gridification): Convert initialization
12338 of local "grid" from memset to zero-initialization; FIXME: does
12339 this require C++11? Update call to dump_printf_loc to pass in a
12340 optinfo_location rather than a location_t, via the gimple stmt.
12341 * profile.c (read_profile_edge_counts): Updates call to
12342 dump_printf_loc to pass in a dump_location_t rather than a
12344 (compute_branch_probabilities): Likewise.
12345 * selftest-run-tests.c (selftest::run_tests): Call
12347 * selftest.h (dumpfile_c_tests): New decl.
12348 * tree-loop-distribution.c (pass_loop_distribution::execute):
12349 Update for change in return type of find_loop_location.
12350 * tree-parloops.c (parallelize_loops): Likewise.
12351 * tree-ssa-loop-ivcanon.c (try_unroll_loop_completely): Convert
12352 "locus" from location_t to dump_user_location_t.
12353 (canonicalize_loop_induction_variables): Likewise.
12354 * tree-ssa-loop-ivopts.c (tree_ssa_iv_optimize_loop): Update
12355 for change in return type of find_loop_location.
12356 * tree-ssa-loop-niter.c (number_of_iterations_exit): Update call
12357 to dump_printf_loc to pass in a dump_location_t rather than a
12358 location_t, via the stmt.
12359 * tree-ssa-sccvn.c (eliminate_dom_walker::before_dom_children):
12361 * tree-vect-loop-manip.c (find_loop_location): Convert return
12362 type from source_location to dump_user_location_t.
12363 (vect_do_peeling): Update for above change.
12364 (vect_loop_versioning): Update for change in type of
12366 * tree-vect-loop.c (check_reduction_path): Convert "loc" param
12367 from location_t to dump_user_location_t.
12368 (vect_estimate_min_profitable_iters): Update for change in type
12370 * tree-vect-slp.c (vect_print_slp_tree): Convert param "loc" from
12371 location_t to dump_location_t.
12372 (vect_slp_bb): Update for change in type of vect_location.
12373 * tree-vectorizer.c (vect_location): Convert from source_location
12374 to dump_user_location_t.
12375 (try_vectorize_loop_1): Update for change in vect_location's type.
12376 (vectorize_loops): Likewise.
12377 (increase_alignment): Likewise.
12378 * tree-vectorizer.h (vect_location): Convert from source_location
12379 to dump_user_location_t.
12380 (find_loop_location): Convert return type from source_location to
12381 dump_user_location_t.
12382 (check_reduction_path): Convert 1st param from location_t to
12383 dump_user_location_t.
12384 * value-prof.c (check_counter): Update call to dump_printf_loc to
12385 pass in a dump_user_location_t rather than a location_t; update
12386 call to error_at for change in type of "locus".
12387 (check_ic_target): Update call to dump_printf_loc to
12388 pass in a dump_user_location_t rather than a location_t, via the
12391 2018-06-26 Robin Dapp <rdapp@linux.vnet.ibm.com>
12393 * config/s390/s390.h (enum processor_flags): Do not use
12394 default tune parameter when -march was specified.
12396 2018-06-26 Jakub Jelinek <jakub@redhat.com>
12399 * config/i386/i386.md (setcc + movzbl to xor + setcc peephole2s):
12400 Check reg_overlap_mentioned_p in addition to reg_set_p with the same
12403 2018-06-26 Richard Biener <rguenther@suse.de>
12405 PR tree-optimization/86287
12407 * tree-vect-loop.c (vect_transform_loop_stmt): Fix read-after-free.
12408 (vect_analyze_loop): Initialize n_stmts.
12410 2018-06-26 Richard Biener <rguenther@suse.de>
12412 PR middle-end/86271
12413 * fold-const.c (fold_convertible_p): Pointer extension
12416 2018-06-26 Alexandre Oliva <aoliva@redhat.com>
12419 * dwarf2out.c (loc_list_has_views): Adjust comments.
12420 (dw_loc_list): Split single cross-partition range with
12423 2018-06-25 Jeff Law <law@redhat.com>
12425 * common/config/v850/v850-common.c (TARGET_DEFAULT_TARGET_FLAGS): Turn
12426 on -mbig-switch by default.
12428 * config/v850/predicates.md (const_float_1_operand): Fix match_code
12430 (const_float_0_operand): Remove unused predicate.
12431 * config/v850/v850.md (define_constants): Remove UNSPEC_LOOP.
12432 (define_c_enum unspec): Add LOOP, RCP and RSQRT constants.
12433 (recipsf2): New expander. Original pattern now called
12435 (recipdf2, recipdf2_insn): Similarly.
12436 (rsqrtsf2, rsqrtsf2_insn): Similarly
12437 (rsqrtdf2, rsqrtdf2_insn): Similarly
12439 2018-06-26 Gerald Pfeifer <gerald@pfeifer.com>
12441 * ginclude/stddef.h: Remove an obsolete comment on FreeBSD 5.
12442 Simplify logic for FreeBSD (twice).
12444 2018-06-25 Martin Sebor <msebor@redhat.com>
12446 PR tree-optimization/86204
12447 * tree-ssa-strlen.c (handle_builtin_strlen): Avoid storing
12448 a strnlen result if it's less than the length of the string.
12450 2018-06-25 Martin Sebor <msebor@redhat.com>
12452 PR tree-optimization/85700
12453 * gimple-fold.c (gimple_fold_builtin_strncat): Adjust comment.
12454 * tree-ssa-strlen.c (is_strlen_related_p): Handle integer subtraction.
12455 (maybe_diag_stxncpy_trunc): Distinguish strncat from strncpy.
12457 2018-06-25 Martin Sebor <msebor@redhat.com>
12459 * doc/extend.texi (Zero-length arrays): Update and clarify.
12461 2018-06-25 Michael Meissner <meissner@linux.ibm.com>
12463 * config.gcc (powerpc64le*): Revert January 16th, 2018 patch that
12464 added IEEE/IBM long double multilib support on PowerPC little
12465 endian Linux systems.
12466 * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Likewise.
12467 (MULTILIB_DEFAULTS): Likewise.
12468 * config/rs6000/rs6000.c (rs6000_option_override_internal):
12470 * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Likewise.
12471 * config/rs6000/t-ldouble-linux64le-ibm: Delete, no longer used.
12472 * config/rs6000/t-ldouble-linux64le-ieee: Delete, no longer used.
12474 2018-06-25 Alexander Monakov <amonakov@ispras.ru>
12476 PR middle-end/86311
12477 * sort.cc (REORDER_23): Avoid memcpy with same destination and source.
12478 (REORDER_45): Likewise.
12480 2018-06-25 Jeff Law <law@redhat.com>
12482 * config/v850/v850.md (divmodhi4): Make sure to sign extend the
12483 dividend to 32 bits. Adjust length.
12484 (udivmodhi4): Cleanup output template. Fix length.
12486 2018-06-25 Carl Love <cel@us.ibm.com>
12488 * config/rs6000/vsx.md: Change word selector to prefered location.
12490 2018-06-25 Richard Biener <rguenther@suse.de>
12492 PR tree-optimization/86304
12493 * tree-vectorizer.c (vectorize_loops): Walk over new possibly
12494 epilogue-if-converted loops as well.
12496 2018-06-25 Jan Hubicka <hubicka@ucw.cz>
12498 * lto-section-out.c (lto_begin_section): Do not print section
12499 name for noaddr and unnumbered dumps.
12501 2018-06-25 Richard Biener <rguenther@suse.de>
12503 * tree-vectorizer.h (struct vec_info_shared): New structure
12504 with parts split out from struct vec_info and loop_nest from
12505 struct _loop_vec_info.
12506 (struct vec_info): Adjust accordingly.
12507 (struct _loop_vec_info): Likewise.
12508 (LOOP_VINFO_LOOP_NEST): Adjust.
12509 (LOOP_VINFO_DATAREFS): Likewise.
12510 (LOOP_VINFO_DDRS): Likewise.
12511 (struct _bb_vec_info): Likewise.
12512 (BB_VINFO_DATAREFS): Likewise.
12513 (BB_VINFO_DDRS): Likewise.
12514 (struct _stmt_vec_info): Add dr_aux member.
12515 (DR_VECT_AUX): Adjust to refer to member of DR_STMTs vinfo.
12516 (DR_MISALIGNMENT_UNINITIALIZED): New.
12517 (set_dr_misalignment): Adjust.
12518 (dr_misalignment): Assert misalign isn't DR_MISALIGNMENT_UNINITIALIZED.
12519 (vect_analyze_loop): Adjust prototype.
12520 (vect_analyze_loop_form): Likewise.
12521 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
12522 Compute dependences lazily.
12523 (vect_record_base_alignments): Use shared datarefs/ddrs.
12524 (vect_verify_datarefs_alignment): Likewise.
12525 (vect_analyze_data_refs_alignment): Likewise.
12526 (vect_analyze_data_ref_accesses): Likewise.
12527 (vect_analyze_data_refs): Likewise.
12528 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Add
12529 constructor parameter for shared part.
12530 (vect_analyze_loop_form): Pass in shared part and adjust.
12531 (vect_analyze_loop_2): Pass in storage for the number of
12532 stmts. Move loop nest finding to the caller. Compute
12534 (vect_analyze_loop): Pass in shared part.
12535 (vect_transform_loop): Verify shared datarefs are unchanged.
12536 * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Add
12537 constructor parameter for shared part.
12538 (vect_slp_analyze_bb_1): Pass in shared part and adjust.
12539 (vect_slp_bb): Verify shared datarefs are unchanged before
12541 * tree-vect-stmts.c (ensure_base_align): Adjust for DR_AUX
12543 (new_stmt_vec_info): Initialize DR_AUX misalignment to
12544 DR_MISALIGNMENT_UNINITIALIZED.
12545 * tree-vectorizer.c (vec_info::vec_info): Add constructor
12546 parameter for shared part.
12547 (vec_info::~vec_info): Adjust.
12548 (vec_info_shared::vec_info_shared): New.
12549 (vec_info_shared::~vec_info_shared): Likewise.
12550 (vec_info_shared::save_datarefs): Likewise.
12551 (vec_info_shared::check_datarefs): Likewise.
12552 (try_vectorize_loop_1): Construct shared part live for analyses
12553 of a single loop for multiple vector sizes.
12554 * tree-parloops.c (gather_scalar_reductions): Adjust.
12556 2018-06-25 Richard Biener <rguenther@suse.de>
12558 * tree-vect-data-refs.c (vect_find_stmt_data_reference): Modify
12559 DR for SIMD lane accesses here and mark DR with (void *)-1 aux.
12560 (vect_analyze_data_refs): Remove similar code from here and
12561 simplify accordingly.
12563 2018-06-25 Richard Biener <rguenther@suse.de>
12565 * tree-vect-data-refs.c (vect_check_gather_scatter): Fail
12566 for reverse storage order accesses rather than asserting
12567 they cannot happen here.
12569 2018-06-25 Tom de Vries <tdevries@suse.de>
12572 * config/i386/i386.md (define_insn "*tls_global_dynamic_64_<mode>"):
12573 Use data16 instead of .byte for insn prefix.
12575 2018-06-25 Andreas Krebbel <krebbel@linux.ibm.com>
12578 * parser.c (make_char_string_pack): Pass this literal chars
12579 through cpp_interpret_string.
12580 (cp_parser_userdef_numeric_literal): Check the result of
12581 make_char_string_pack.
12583 2018-06-24 Maya Rashish <coypu@sdf.org>
12585 * ginclude/stddef.h: Simplify conditions around avoiding
12586 re-definition of __size_t.
12588 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
12590 * lto-streamer-out.c (tree_is_indexable): Make LABEL_DECL nonindexable
12591 unless it is forced or nonlocal; assert that we stream no IMPORTED_DECL.
12593 2018-06-22 Maya Rashish <coypu@sdf.org>
12595 * doc/invoke.texi (mno-fancy-math-387): Update for changes
12596 made to OpenBSD and NetBSD through the years.
12598 2018-06-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
12600 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
12601 behavior of vec_pack (vector double, vector double) to match
12602 behavior of vec_float2 (vector double, vector double).
12604 2018-06-22 Olivier Hainque <hainque@adacore.com>
12606 * gimplify.c (gimplify_function_tree): Prevent creation
12607 of a trampoline for the address of the current function
12608 passed to entry/exit instrumentation hooks.
12610 2018-06-22 Aaron Sawdey <acsawdey@linux.ibm.com>
12613 * config/rs6000/rs6000-string.c (expand_strn_compare): Handle -m32
12616 2018-06-22 Martin Liska <mliska@suse.cz>
12618 PR tree-optimization/86263
12619 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
12620 Bail out if is_enabled is false.
12621 * tree-switch-conversion.h (jump_table_cluster::is_enabled):
12623 (jump_table_cluster::is_enabled): New function.
12625 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
12627 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
12628 BINFO_BASE_ACCESSES and BINFO_VPTR_FIELD.
12629 * tree-streamer-in.c (streamer_read_tree_bitfields): Likewise.
12630 (lto_input_ts_binfo_tree_pointers): Likewise.
12631 * tree-streamer-out.c (streamer_write_tree_bitfields,
12632 write_ts_binfo_tree_pointers): Likewise.
12633 * tree.c (free_lang_data_in_binfo): Clear BINFO_VPTR_FIELD.
12635 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
12637 * tree.c (free_lang_data_in_type): Free all TYPE_VFIELDs.
12639 2018-06-22 Martin Liska <mliska@suse.cz>
12641 * symbol-summary.h (get): Make it pure and inline move
12642 functionality from ::get function.
12643 (get): Remove and inline into ::get and ::get_create.
12644 (get_create): Move code from ::get function.
12646 2018-06-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
12649 * config/i386/sol2.h (CPP_SPEC): Don't pass -P for
12650 -x assembler-with-cpp.
12652 2018-06-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
12654 * config/sol2.h (TARGET_OS_CPP_BUILTINS): Define
12655 _FILE_OFFSET_BITS=64 for C++.
12657 2018-06-21 Michael Meissner <meissner@linux.ibm.com>
12659 * config/rs6000/rs6000.md (extendtfif2): Add missing 128-bit
12660 conversion insn that shows up when pr85657-3.c is compiled using
12661 IEEE 128-bit long double.
12662 (neg<mode>2_internal): Use the correct mode to check whether the
12663 mode is IBM extended.
12664 * config/rs6000/rs6000.c (init_float128_ieee): Prevent complex
12665 multiply and divide external functions from being created more
12668 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
12670 * cfgrtl.c (fixup_reorder_chain): Do not emit NOPs in DECL_IGNORED_P
12672 (rtl_merge_blocks): Likewise. Do not emit a NOP if the location of
12673 the edge can be forwarded.
12674 (cfg_layout_merge_blocks): Likewise.
12676 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
12678 * except.c (finish_eh_generation): Commit edge insertions only after
12679 the EH edges have been redirected from post-landing to landing pads.
12681 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
12683 * tree-nested.c (get_frame_type): Use create_tmp_var_raw instead of
12684 create_tmp_var_for to create the FRAME decl.
12685 (finalize_nesting_tree_1): Do not unchain the FRAME decl.
12687 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
12689 * tree-inline.c (copy_edges_for_bb): Minor tweak.
12690 (maybe_move_debug_stmts_to_successors): Also reset the locus of the
12691 debug statement when resetting its value.
12692 (expand_call_inline): Copy the locus of the call onto the assignment
12693 of the return value, if any. Use local variable in more cases.
12695 2018-06-21 Martin Liska <mliska@suse.cz>
12697 * ipa-pure-const.c (propagate_nothrow): Use
12698 funct_state_summaries->get.
12699 (dump_malloc_lattice): Likewise.
12700 (propagate_malloc): Likewise.
12702 2018-06-21 Richard Biener <rguenther@suse.de>
12704 * lto-streamer-out.c (DFS::DFS_write_tree_body): Update outdated
12705 comment. Follow BLOCK_ABSTRACT_ORIGIN unconditionally.
12706 * tree-streamer-in.c (lto_input_ts_block_tree_pointers): Update
12708 * tree-streamer-out.c (write_ts_block_tree_pointers): Stream
12709 BLOCK_ABSTRACT_ORIGIN unconditionally.
12711 2018-06-21 David Malcolm <dmalcolm@redhat.com>
12713 * ipa-cp.c (ipcp_driver): Set edge_clone_summaries to NULL after
12715 * ipa-reference.c (ipa_reference_c_finalize): Delete
12716 ipa_ref_opt_sum_summaries and set it to NULL.
12718 2018-06-21 Tom de Vries <tdevries@suse.de>
12720 PR tree-optimization/85859
12721 * tree-ssa-tail-merge.c (stmt_local_def): Copy gimple_is_call
12722 test with comment from bb_no_side_effects_p.
12724 2018-06-21 Richard Biener <rguenther@suse.de>
12726 PR tree-optimization/86232
12727 * tree-ssa-loop-niter.c (number_of_iterations_popcount): Adjust
12728 max for constant niter.
12730 2018-06-21 Andre Vieira <andre.simoesdiasvieira@arm.com>
12732 * config/aarch64/aarch64-simd.md
12733 (*aarch64_crypto_aes<aes_op>v16qi_xor_combine): New.
12735 2018-06-21 Andre Vieira <andre.simoesdiasvieira@arm.com>
12737 * config/aarch64/aarch64-simd.md (aarch64_crypto_aes<aes_op>v16qi):
12738 Make opernads of the unspec commutative.
12740 2018-06-21 Richard Biener <rguenther@suse.de>
12742 * tree-data-ref.c (dr_step_indicator): Handle NULL DR_STEP.
12743 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr):
12744 Avoid calling vect_mark_for_runtime_alias_test with gathers or scatters.
12745 (vect_analyze_data_ref_dependence): Re-order checks to deal with
12747 (vect_record_base_alignments): Do not record base alignment
12748 for gathers or scatters.
12749 (vect_compute_data_ref_alignment): Drop return value that is always
12750 true. Bail out early for gathers or scatters.
12751 (vect_enhance_data_refs_alignment): Bail out early for gathers
12753 (vect_find_same_alignment_drs): Likewise.
12754 (vect_analyze_data_refs_alignment): Remove dead code.
12755 (vect_slp_analyze_and_verify_node_alignment): Likewise.
12756 (vect_analyze_data_refs): For possible gathers or scatters do
12757 not create an alternate DR, just check their possible validity
12758 and mark them. Adjust DECL_NONALIASED handling to not rely
12759 on DR_BASE_ADDRESS.
12760 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Do not
12761 update inits of gathers or scatters.
12762 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern):
12763 Also copy gather/scatter flag to pattern vinfo.
12765 2018-06-20 Kelvin Nilsen <kelvin@gcc.gnu.org>
12767 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
12768 behavior of vec_packsu (vector unsigned long long, vector unsigned
12769 long long) to match behavior of vec_packs with same signature.
12771 2018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
12772 Thomas Schwinge <thomas@codesourcery.com>
12773 Cesar Philippidis <cesar@codesourcery.com>
12775 * gimplify.c (gimplify_scan_omp_clauses): Add support for
12776 OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
12777 (gimplify_adjust_omp_clauses): Likewise.
12778 (gimplify_oacc_declare_1): Add support for GOMP_MAP_RELEASE, remove
12779 support for GOMP_MAP_FORCE_{ALLOC,TO,FROM,TOFROM}.
12780 (gimplify_omp_target_update): Update handling of acc update and
12782 * omp-low.c (install_var_field): Remove unused parameter
12783 base_pointers_restrict.
12784 (scan_sharing_clauses): Remove base_pointers_restrict parameter.
12785 Update call to install_var_field. Handle OMP_CLAUSE_{IF_PRESENT,
12787 (omp_target_base_pointers_restrict_p): Delete.
12788 (scan_omp_target): Update call to scan_sharing_clauses.
12789 * tree-core.h (enum omp_clause_code): Add OMP_CLAUSE_{IF_PRESENT,
12791 * tree-nested.c (convert_nonlocal_omp_clauses): Handle
12792 OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
12793 (convert_local_omp_clauses): Likewise.
12794 * tree-pretty-print.c (dump_omp_clause): Likewise.
12795 * tree.c (omp_clause_num_ops): Add entries for OMP_CLAUSE_{IF_PRESENT,
12797 (omp_clause_code_name): Likewise.
12799 2018-06-20 Jakub Jelinek <jakub@redhat.com>
12802 * var-tracking.c (use_narrower_mode_test): Check if shift amount can
12805 PR tree-optimization/86231
12806 * tree-vrp.c (union_ranges): For ( [ ) ] or ( )[ ] range and
12807 anti-range don't overwrite *vr0min before using it to compute *vr0max.
12809 2018-06-20 Tom de Vries <tdevries@suse.de>
12811 PR tree-optimization/86097
12812 * tree-ssa-loop-manip.c (canonicalize_loop_ivs): Also convert *nit to
12813 iv type if signedness of iv type is not the same as that of *nit.
12815 2018-06-20 Jakub Jelinek <jakub@redhat.com>
12817 * cfgrtl.c (rtl_verify_edges): Formatting fix. If bb->preds has any
12818 EDGE_EH edges, verify they are all EDGE_EH.
12820 2018-06-20 Maya Rashish <coypu@sdf.org>
12822 * ginclude/stddef.h: Limit #include <machine/ansi.h> to NetBSD.
12824 2018-06-20 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
12826 * config/aarch64/aarch64-tuning-flags.def (no_ldp_stp_qregs): New.
12827 * config/aarch64/aarch64.c (xgene1_tunings): Add
12828 AARCH64_EXTRA_TUNE_NO_LDP_STP_QREGS to tune_flags.
12829 (aarch64_mode_valid_for_sched_fusion_p):
12830 Allow 16-byte modes.
12831 (aarch64_classify_address): Allow 16-byte modes for load_store_pair_p.
12832 * config/aarch64/aarch64-ldpstp.md: Add peepholes for LDP STP of
12834 * config/aarch64/aarch64-simd.md (load_pair<VQ:mode><VQ2:mode>):
12836 (vec_store_pair<VQ:mode><VQ2:mode>): Likewise.
12837 * config/aarch64/iterators.md (VQ2): New mode iterator.
12839 2018-06-20 Martin Liska <mliska@suse.cz>
12841 * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
12842 Change default ratio from 10 to 8.
12844 2018-06-20 Martin Liska <mliska@suse.cz>
12846 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
12848 (bit_test_cluster::find_bit_tests): Likewise.
12849 (switch_decision_tree::analyze_switch_statement): Find clusters.
12850 * tree-switch-conversion.h (struct jump_table_cluster): Document
12853 2018-06-20 Martin Liska <mliska@suse.cz>
12855 * tree-switch-conversion.c (switch_conversion::collect):
12856 Record m_uniq property.
12857 (switch_conversion::expand): Bail out for special conditions.
12858 (group_cluster::~group_cluster): New.
12859 (group_cluster::group_cluster): Likewise.
12860 (group_cluster::dump): Likewise.
12861 (jump_table_cluster::emit): New.
12862 (switch_decision_tree::fix_phi_operands_for_edges): New.
12863 (struct case_node): Remove struct.
12864 (jump_table_cluster::can_be_handled): New.
12865 (case_values_threshold): Moved to header.
12866 (reset_out_edges_aux): Likewise.
12867 (jump_table_cluster::is_beneficial): New.
12868 (bit_test_cluster::can_be_handled): Likewise.
12869 (add_case_node): Remove.
12870 (bit_test_cluster::is_beneficial): New.
12871 (case_bit_test::cmp): New.
12872 (bit_test_cluster::emit): New.
12873 (expand_switch_as_decision_tree_p): Remove.
12874 (bit_test_cluster::hoist_edge_and_branch_if_true): New.
12875 (fix_phi_operands_for_edge): Likewise.
12876 (switch_decision_tree::analyze_switch_statement): New.
12877 (compute_cases_per_edge): Move ...
12878 (switch_decision_tree::compute_cases_per_edge): ... here.
12879 (try_switch_expansion): Likewise.
12880 (switch_decision_tree::try_switch_expansion): Likewise.
12881 (record_phi_operand_mapping): Likewise.
12882 (switch_decision_tree::record_phi_operand_mapping): Likewise.
12883 (emit_case_decision_tree): Likewise.
12884 (switch_decision_tree::emit): Likewise.
12885 (balance_case_nodes): Likewise.
12886 (switch_decision_tree::balance_case_nodes): Likewise.
12887 (dump_case_nodes): Likewise.
12888 (switch_decision_tree::dump_case_nodes): Likewise.
12889 (emit_jump): Likewise.
12890 (switch_decision_tree::emit_jump): Likewise.
12891 (emit_cmp_and_jump_insns): Likewise.
12892 (switch_decision_tree::emit_cmp_and_jump_insns): Likewise.
12893 (emit_case_nodes): Likewise.
12894 (switch_decision_tree::emit_case_nodes): Likewise.
12895 (conditional_probability): Remove.
12896 * tree-switch-conversion.h (enum cluster_type): New.
12898 (struct cluster): Likewise.
12899 (cluster::cluster): Likewise.
12900 (struct simple_cluster): Likewise.
12901 (simple_cluster::simple_cluster): Likewise.
12902 (struct group_cluster): Likewise.
12903 (struct jump_table_cluster): Likewise.
12904 (struct bit_test_cluster): Likewise.
12905 (struct min_cluster_item): Likewise.
12906 (struct case_tree_node): Likewise.
12907 (case_tree_node::case_tree_node): Likewise.
12908 (jump_table_cluster::case_values_threshold): Likewise.
12909 (struct case_bit_test): Likewise.
12910 (struct switch_decision_tree): Likewise.
12911 (struct switch_conversion): Likewise.
12912 (switch_decision_tree::reset_out_edges_aux): Likewise.
12914 2018-06-20 Martin Liska <mliska@suse.cz>
12916 * tree-switch-conversion.c (MAX_CASE_BIT_TESTS): Remove.
12917 (hoist_edge_and_branch_if_true): Likewise.
12918 (expand_switch_using_bit_tests_p): Likewise.
12919 (struct case_bit_test): Likewise.
12920 (case_bit_test_cmp): Likewise.
12921 (emit_case_bit_tests): Likewise.
12922 (switch_conversion::switch_conversion): New class.
12923 (struct switch_conv_info): Remove old struct.
12924 (collect_switch_conv_info): More to ...
12925 (switch_conversion::collect): ... this.
12926 (check_range): Likewise.
12927 (switch_conversion::check_range): Likewise.
12928 (check_all_empty_except_final): Likewise.
12929 (switch_conversion::check_all_empty_except_final): Likewise.
12930 (check_final_bb): Likewise.
12931 (switch_conversion::check_final_bb): Likewise.
12932 (create_temp_arrays): Likewise.
12933 (switch_conversion::create_temp_arrays): Likewise.
12934 (free_temp_arrays): Likewise.
12935 (gather_default_values): Likewise.
12936 (switch_conversion::gather_default_values): Likewise.
12937 (build_constructors): Likewise.
12938 (switch_conversion::build_constructors): Likewise.
12939 (constructor_contains_same_values_p): Likewise.
12940 (switch_conversion::contains_same_values_p): Likewise.
12941 (array_value_type): Likewise.
12942 (switch_conversion::array_value_type): Likewise.
12943 (build_one_array): Likewise.
12944 (switch_conversion::build_one_array): Likewise.
12945 (build_arrays): Likewise.
12946 (switch_conversion::build_arrays): Likewise.
12947 (gen_def_assigns): Likewise.
12948 (switch_conversion::gen_def_assigns): Likewise.
12949 (prune_bbs): Likewise.
12950 (switch_conversion::prune_bbs): Likewise.
12951 (fix_phi_nodes): Likewise.
12952 (switch_conversion::fix_phi_nodes): Likewise.
12953 (gen_inbound_check): Likewise.
12954 (switch_conversion::gen_inbound_check): Likewise.
12955 (process_switch): Use the newly created class.
12956 (switch_conversion::expand): New.
12957 (switch_conversion::~switch_conversion): New.
12958 * tree-switch-conversion.h: New file.
12960 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
12962 * tree-vectorizer.h (NUM_PATTERNS, vect_recog_func_ptr): Move to
12963 tree-vect-patterns.c.
12964 * tree-vect-patterns.c (vect_supportable_direct_optab_p): New function.
12965 (vect_recog_dot_prod_pattern): Use it. Remove the type_in argument.
12966 (vect_recog_sad_pattern): Likewise.
12967 (vect_recog_widen_sum_pattern): Likewise.
12968 (vect_recog_pow_pattern): Likewise. Check for a null vectype.
12969 (vect_recog_widen_shift_pattern): Remove the type_in argument.
12970 (vect_recog_rotate_pattern): Likewise.
12971 (vect_recog_mult_pattern): Likewise.
12972 (vect_recog_vector_vector_shift_pattern): Likewise.
12973 (vect_recog_divmod_pattern): Likewise.
12974 (vect_recog_mixed_size_cond_pattern): Likewise.
12975 (vect_recog_bool_pattern): Likewise.
12976 (vect_recog_mask_conversion_pattern): Likewise.
12977 (vect_try_gather_scatter_pattern): Likewise.
12978 (vect_recog_widen_mult_pattern): Likewise. Check for a null vectype.
12979 (vect_recog_over_widening_pattern): Likewise.
12980 (vect_recog_gather_scatter_pattern): Likewise.
12981 (vect_recog_func_ptr): Move from tree-vectorizer.h
12982 (vect_vect_recog_func_ptrs): Move further down the file.
12983 (vect_recog_func): Likewise. Remove the third argument.
12984 (NUM_PATTERNS): Define based on vect_vect_recog_func_ptrs.
12985 (vect_pattern_recog_1): Expect the pattern function to do any
12986 necessary target tests. Also expect it to provide a vector type.
12987 Remove the type_in handling.
12989 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
12991 * tree-vect-patterns.c (vect_pattern_detected): New function.
12992 (vect_recog_dot_prod_patternm, vect_recog_sad_pattern)
12993 (vect_recog_widen_mult_pattern, vect_recog_widen_sum_pattern)
12994 (vect_recog_over_widening_pattern, vect_recog_widen_shift_pattern
12995 (vect_recog_rotate_pattern, vect_recog_vector_vector_shift_pattern)
12996 (vect_recog_mult_pattern, vect_recog_divmod_pattern)
12997 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
12998 (vect_recog_mask_conversion_pattern)
12999 (vect_try_gather_scatter_pattern): Likewise.
13001 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
13003 * tree-vect-patterns.c (vect_get_internal_def): New function.
13004 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
13005 (vect_recog_vector_vector_shift_pattern, check_bool_pattern)
13006 (search_type_for_mask_1): Use it.
13008 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
13010 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
13011 redundant WIDEN_SUM_EXPR handling.
13012 (vect_recog_sad_pattern): Likewise.
13014 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
13016 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
13017 redundant check that the types of a PLUS_EXPR or MULT_EXPR agree.
13018 (vect_recog_sad_pattern): Likewise PLUS_EXPR, ABS_EXPR and MINUS_EXPR.
13019 (vect_recog_widen_mult_pattern): Likewise MULT_EXPR.
13020 (vect_recog_widen_sum_pattern): Likewise PLUS_EXPR.
13022 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
13024 * tree-vect-stmts.c (vectorizable_call): Make sure that we
13025 use the stmt_vec_info of the original bb statement for the
13026 new zero assignment, even if the call is part of a pattern.
13028 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
13030 * tree-vectorizer.h (_stmt_vec_info): Note above pattern_def_seq
13031 that the sequence is attached to the original statement rather
13032 than the pattern statement.
13033 * tree-vect-loop.c (vect_determine_vf_for_stmt): Take the
13034 PATTERN_DEF_SEQ from the original statement rather than
13035 the main pattern statement.
13036 * tree-vect-stmts.c (free_stmt_vec_info): Likewise.
13037 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Likewise.
13038 (vect_mark_pattern_stmts): Don't copy the PATTERN_DEF_SEQ.
13040 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
13042 * tree-vect-stmts.c (vect_analyze_stmt): Move the handling of pattern
13043 definition statements before the early exit for statements that aren't
13045 * tree-vect-loop.c (vect_transform_loop_stmt): New function,
13047 (vect_transform_loop): ...here. Process pattern definition
13048 statements without first checking whether the main pattern
13049 statement is live or relevant.
13051 2018-06-19 Eric Botcazou <ebotcazou@adacore.com>
13053 * tree-cfgcleanup.c (tree_forwarder_block_p): Do not return false at
13054 -O0 if the locus represent UNKNOWN_LOCATION but have different values.
13056 2018-06-19 Aaron Sawdey <acsawdey@linux.ibm.com>
13058 * config/rs6000/rs6000-string.c (select_block_compare_mode): Check
13059 TARGET_EFFICIENT_OVERLAPPING_UNALIGNED here instead of in caller.
13060 (do_and3, do_and3_mask, do_compb3, do_rotl3): New functions.
13061 (expand_block_compare): Change select_block_compare_mode call.
13062 (expand_strncmp_align_check): Use new functions, fix comment.
13063 (emit_final_str_compare_gpr): New function.
13064 (expand_strn_compare): Refactor and clean up code.
13065 * config/rs6000/vsx.md (vsx_mov<mode>_64bit): Remove *.
13067 2018-06-19 Tony Reix <tony.reix@atos.com>
13068 Damien Bergamini <damien.bergamini@atos.com>
13069 David Edelsohn <dje.gcc@gmail.com>
13071 * collect2.c (static_obj): New variable.
13072 (static_libs): New variable.
13073 (is_in_list): Uncomment declaration.
13074 (main): Track AIX libraries linked statically.
13075 (is_in_list): Uncomment definition.
13076 (scan_prog_file): Don't add AIX shared libraries initializer
13077 to constructor list if linking statically.
13079 2018-06-19 Max Filippov <jcmvbkbc@gmail.com>
13081 * config/xtensa/xtensa.md (UNSPEC_FRAME_BLOCKAGE): New unspec
13083 (allocate_stack, frame_blockage, *frame_blockage): New patterns.
13085 2018-06-19 Jan Hubicka <hubicka@ucw.cz>
13087 * tree.c (find_decls_types_r): Remove all non-VAR_DECLs from
13090 2018-06-19 Martin Liska <mliska@suse.cz>
13092 * config/i386/i386.c (ix86_can_inline_p): Do not use
13093 ipa_fn_summaries::get_create.
13094 * ipa-cp.c (ipcp_cloning_candidate_p): Replace get_create with
13096 (devirtualization_time_bonus): Likewise.
13097 (ipcp_propagate_stage): Likewise.
13098 * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
13099 (edge_set_predicate): Likewise.
13100 (evaluate_conditions_for_known_args): Likewise.
13101 (evaluate_properties_for_edge): Likewise.
13102 (ipa_call_summary::reset): Tranform to ...
13103 (ipa_call_summary::~ipa_call_summary): ... this.
13104 (ipa_fn_summary::reset): Transform to ...
13105 (ipa_fn_summary::~ipa_fn_summary): ... this.
13106 (ipa_fn_summary_t::remove): Rename to ...
13107 (ipa_fn_summary_t::remove_callees): ... this.
13108 (ipa_fn_summary_t::duplicate): Use placement new
13109 instead of memory copy.
13110 (ipa_call_summary_t::duplicate): Likewise.
13111 (ipa_call_summary_t::remove): Remove.
13112 (dump_ipa_call_summary): Change get_create to get.
13113 (ipa_dump_fn_summary): Dump only when summary exists.
13114 (analyze_function_body): Use symbol_summary::get instead
13116 (compute_fn_summary): Likewise.
13117 (estimate_edge_devirt_benefit): Likewise.
13118 (estimate_edge_size_and_time): Likewise.
13119 (inline_update_callee_summaries): Likewise.
13120 (remap_edge_change_prob): Likewise.
13121 (remap_edge_summaries): Likewise.
13122 (ipa_merge_fn_summary_after_inlining): Likewise.
13123 (write_ipa_call_summary): Likewise.
13124 (ipa_fn_summary_write): Likewise.
13125 (ipa_free_fn_summary): Likewise.
13126 * ipa-fnsummary.h (struct GTY): Add new ctor and copy ctor.
13127 (struct ipa_call_summary): Likewise.
13128 * ipa-icf.c (sem_function::merge): Use symbol_summary::get instead
13130 * ipa-inline-analysis.c (do_estimate_edge_time): Likewise.
13131 (estimate_size_after_inlining): Likewise.
13132 (estimate_growth): Likewise.
13133 (growth_likely_positive): Likewise.
13134 * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
13135 (inline_call): Likewise.
13136 * ipa-inline.c (caller_growth_limits): Likewise.
13137 (can_inline_edge_p): Likewise.
13138 (can_inline_edge_by_limits_p): Likewise.
13139 (compute_uninlined_call_time): Likewise.
13140 (compute_inlined_call_time): Likewise.
13141 (want_inline_small_function_p): Likewise.
13142 (edge_badness): Likewise.
13143 (update_caller_keys): Likewise.
13144 (update_callee_keys): Likewise.
13145 (inline_small_functions): Likewise.
13146 (inline_to_all_callers_1): Likewise.
13147 (dump_overall_stats): Likewise.
13148 (early_inline_small_functions): Likewise.
13149 (early_inliner): Likewise.
13150 * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
13151 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
13152 * ipa-pure-const.c (malloc_candidate_p): Likewise.
13153 * ipa-split.c (execute_split_functions): Likewise.
13154 * symbol-summary.h: Likewise.
13155 * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
13157 2018-06-19 Richard Biener <rguenther@suse.de>
13159 * tree-vectorizer.c (try_vectorize_loop_1): Split out of ...
13160 (vectorize_loops): ... here. Fix dbgcnt handling.
13161 (try_vectorize_loop): Wrap try_vectorize_loop_1.
13163 2018-06-19 Segher Boessenkool <segher@kernel.crashing.org>
13166 * config/rs6000/rs6000.md (rs6000_discover_homogeneous_aggregate): An
13167 ieee128 argument takes up only one (vector) register, not two (floating
13170 2018-06-19 Eric Botcazou <ebotcazou@adacore.com>
13172 * gimplify.c (gimplify_init_constructor): Really never clear for an
13173 incomplete constructor if CONSTRUCTOR_NO_CLEARING is set.
13175 2018-06-19 Richard Biener <rguenther@suse.de>
13177 PR tree-optimization/86179
13178 * tree-vect-patterns.c (vect_pattern_recog_1): Clean up
13179 after failed recognition.
13181 2018-06-18 Martin Sebor <msebor@redhat.com>
13183 PR middle-end/85602
13184 * calls.c (maybe_warn_nonstring_arg): Handle strncat.
13185 * tree-ssa-strlen.c (is_strlen_related_p): Make extern.
13186 Handle integer subtraction.
13187 (maybe_diag_stxncpy_trunc): Handle nonstring source arguments.
13188 * tree-ssa-strlen.h (is_strlen_related_p): Declare.
13190 2018-06-18 David Malcolm <dmalcolm@redhat.com>
13192 * config/frv/frv-protos.h (frv_ifcvt_modify_insn): Strengthen 3rd
13193 param from rtx to rtx_insn *.
13194 * config/frv/frv.c (frv_ifcvt_add_insn): Likewise for "insn"
13196 (frv_ifcvt_modify_insn): Likwise.
13197 (frv_ifcvt_modify_final): Likwise for local "existing_insn",
13198 adding an as_a <rtx_insn *> cast. Likewise for local "insn".
13199 * config/mips/mips.c (r10k_insert_cache_barriers): Add an
13200 as_a <rtx_insn *> cast to local "unprotected_region" once
13201 it's been established that it's not NULL or pc_rtx.
13202 * config/nds32/nds32-relax-opt.c (nds32_group_insns): Strengthen
13203 param "sethi" from rtx to rtx_insn *.
13204 (nds32_group_float_insns): Likewise for param "insn".
13205 * config/vax/vax-protos.h (vax_output_int_add): Likewise for 1st
13207 (vax_output_int_subtract): Likewise.
13208 * config/vax/vax.c (vax_output_int_add): Likewise for param
13210 (vax_output_int_subtract): Likewise.
13211 * emit-rtl.c (set_insn_deleted): Likewise, removing cast.
13212 (emit_pattern_after): Likewise for param "after".
13213 (emit_insn_after): Likewise.
13214 (emit_jump_insn_after): Likewise.
13215 (emit_call_insn_after): Likewise.
13216 (emit_debug_insn_after): Likewise.
13217 (emit_pattern_before): Likewise for param "before".
13218 (emit_insn_before): Likewise.
13219 (emit_jump_insn_before): Likewise.
13220 * final.c (get_insn_template): Likewise for param "insn", removing
13222 * output.h (get_insn_template): Likewise for 2nd param.
13223 * rtl.h (emit_insn_before): Likewise.
13224 (emit_jump_insn_before): Likewise.
13225 (emit_debug_insn_before_noloc): Likewise.
13226 (emit_insn_after): Likewise.
13227 (emit_jump_insn_after): Likewise.
13228 (emit_call_insn_after): Likewise.
13229 (emit_debug_insn_after): Likewise.
13230 (set_insn_deleted): Likewise for param.
13232 2018-06-18 Michael Meissner <meissner@linux.ibm.com>
13235 * config/rs6000/rs6000-modes.def (toplevel): Rework the 128-bit
13236 floating point modes, so that IFmode is numerically greater than
13237 TFmode, which is greater than KFmode using FRACTIONAL_FLOAT_MODE
13238 to declare the ordering. This prevents IFmode from being
13239 converted to TFmode when long double is IEEE 128-bit on an ISA 3.0
13240 machine. Include rs6000-modes.h to share the fractional values
13241 between genmodes* and the rest of the compiler.
13242 (IFmode): Likewise.
13243 (KFmode): Likewise.
13244 (TFmode): Likewise.
13245 * config/rs6000/rs6000-modes.h: New file.
13246 * config/rs6000/rs6000.c (rs6000_debug_reg_global): Change the
13247 meaning of rs6000_long_double_size so that 126..128 selects an
13248 appropriate 128-bit floating point type.
13249 (rs6000_option_override_internal): Likewise.
13250 * config/rs6000/rs6000.h (toplevel): Include rs6000-modes.h.
13251 (TARGET_LONG_DOUBLE_128): Change the meaning of
13252 rs6000_long_double_size so that 126..128 selects an appropriate
13253 128-bit floating point type.
13254 (LONG_DOUBLE_TYPE_SIZE): Update comment.
13255 * config/rs6000/rs6000.md (trunciftf2): Correct the modes of the
13256 source and destination to match the standard usage.
13257 (truncifkf2): Likewise.
13258 (copysign<mode>3, IEEE iterator): Rework copysign of float128 on
13259 ISA 2.07 to use an explicit clobber, instead of passing in a
13261 (copysign<mode>3_soft): Likewise.
13263 2018-06-18 David Malcolm <dmalcolm@redhat.com>
13265 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
13266 Replace dump_printf_loc call with DUMP_VECT_SCOPE.
13267 (vect_slp_analyze_instance_dependence): Likewise.
13268 (vect_enhance_data_refs_alignment): Likewise.
13269 (vect_analyze_data_refs_alignment): Likewise.
13270 (vect_slp_analyze_and_verify_instance_alignment
13271 (vect_analyze_data_ref_accesses): Likewise.
13272 (vect_prune_runtime_alias_test_list): Likewise.
13273 (vect_analyze_data_refs): Likewise.
13274 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Likewise.
13275 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
13276 (vect_analyze_scalar_cycles_1): Likewise.
13277 (vect_get_loop_niters): Likewise.
13278 (vect_analyze_loop_form_1): Likewise.
13279 (vect_update_vf_for_slp): Likewise.
13280 (vect_analyze_loop_operations): Likewise.
13281 (vect_analyze_loop): Likewise.
13282 (vectorizable_induction): Likewise.
13283 (vect_transform_loop): Likewise.
13284 * tree-vect-patterns.c (vect_pattern_recog): Likewise.
13285 * tree-vect-slp.c (vect_analyze_slp): Likewise.
13286 (vect_make_slp_decision): Likewise.
13287 (vect_detect_hybrid_slp): Likewise.
13288 (vect_slp_analyze_operations): Likewise.
13289 (vect_slp_bb): Likewise.
13290 * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Likewise.
13291 (vectorizable_bswap): Likewise.
13292 (vectorizable_call): Likewise.
13293 (vectorizable_simd_clone_call): Likewise.
13294 (vectorizable_conversion): Likewise.
13295 (vectorizable_assignment): Likewise.
13296 (vectorizable_shift): Likewise.
13297 (vectorizable_operation): Likewise.
13298 * tree-vectorizer.h (DUMP_VECT_SCOPE): New macro.
13300 2018-06-18 Martin Sebor <msebor@redhat.com>
13302 PR tree-optimization/81384
13303 * builtin-types.def (BT_FN_SIZE_CONST_STRING_SIZE): New.
13304 * builtins.c (expand_builtin_strnlen): New function.
13305 (expand_builtin): Call it.
13306 (fold_builtin_n): Avoid setting TREE_NO_WARNING.
13307 * builtins.def (BUILT_IN_STRNLEN): New.
13308 * calls.c (maybe_warn_nonstring_arg): Handle BUILT_IN_STRNLEN.
13309 Warn for bounds in excess of maximum object size.
13310 * tree-ssa-strlen.c (maybe_set_strlen_range): Return tree representing
13311 single-value ranges. Handle strnlen.
13312 (handle_builtin_strlen): Handle strnlen.
13313 (strlen_check_and_optimize_stmt): Same.
13314 * doc/extend.texi (Other Builtins): Document strnlen.
13316 2018-06-18 Maya Rashish <coypu@sdf.org>
13318 * config/alpha/openbsd.h (TARGET_DEFAULT): Define.
13319 (LINK_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): Likewise.
13320 (INTMAX_TYPE, UINTMAX_TYPE, WINT_TYPE): Likewise.
13322 * config/alpha/elf.h (STARTFILE_SPEC, ENDFILE_SPEC): Move from
13324 * config/alpha/linux.h (STARTFILE_SPEC, ENDFILE_SPEC): Here.
13326 2018-06-18 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
13328 * tree.c (escaped_string::escape): Replace cast to char * by
13329 const_cast<char *> (unescaped).
13331 2018-06-18 Nick Clifton <nickc@redhat.com>
13334 * tree.c (escaped_string): New class. Converts an unescaped
13335 string into its escaped equivalent.
13336 (warn_deprecated_use): Use the new class to convert the
13337 deprecation message, if present.
13338 (test_escaped_strings): New self test.
13339 (test_c_tests): Add test_escaped_strings.
13340 * doc/extend.texi (deprecated): Add a note that the
13341 deprecation message is affected by the -fmessage-length
13342 option, and that control characters will be escaped.
13343 (#pragma GCC error): Document this pragma.
13344 (#pragma GCC warning): Likewise.
13345 * doc/invoke.texi (-fmessage-length): Document this option's
13346 effect on the #warning and #error preprocessor directives and
13347 the deprecated attribute.
13349 2018-06-18 Eric Botcazou <ebotcazou@adacore.com>
13351 * tree.c (decl_value_expr_lookup): Revert latest change.
13352 (decl_value_expr_insert): Likewise.
13354 2018-06-17 Eric Botcazou <ebotcazou@adacore.com>
13356 * gimplify.c (nonlocal_vlas): Delete.
13357 (nonlocal_vla_vars): Likewise.
13358 (gimplify_var_or_parm_decl): Do not add debug VAR_DECLs for non-local
13360 (gimplify_body): Do not create and destroy nonlocal_vlas.
13361 * tree-nested.c: Include diagnostic.h.
13362 (use_pointer_in_frame): Tweak.
13363 (lookup_field_for_decl): Add assertion and declare the transformation.
13364 (convert_nonlocal_reference_op) <PARM_DECL>: Rework and issue an
13365 internal error when the reference is in a wrong context. Do not
13366 create a debug decl by default.
13367 (note_nonlocal_block_vlas): Delete.
13368 (convert_nonlocal_reference_stmt) <GIMPLE_BIND>: Do not call it.
13369 (convert_local_reference_op) <PARM_DECL>: Skip the frame decl. Do not
13370 create a debug decl by default.
13371 (convert_gimple_call) <GIMPLE_CALL>: Issue an internal error when the
13372 call is in a wrong context.
13373 (fixup_vla_decls): New function.
13374 (finalize_nesting_tree_1): Adjust comment. Call fixup_vla_decls if no
13375 debug variables were created.
13376 * tree.c (decl_value_expr_lookup): Add checking assertion.
13377 (decl_value_expr_insert): Likewise.
13379 2018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
13381 PR middle-end/82479
13382 * ipa-fnsummary.c (will_be_nonconstant_expr_predicate): Handle CALL_EXPR.
13383 * tree-scalar-evolution.c (interpret_expr): Likewise.
13384 (expression_expensive_p): Likewise.
13385 * tree-ssa-loop-ivopts.c (contains_abnormal_ssa_name_p): Likewise.
13386 * tree-ssa-loop-niter.c (number_of_iterations_popcount): New.
13387 (number_of_iterations_exit_assumptions): Use number_of_iterations_popcount.
13388 (ssa_defined_by_minus_one_stmt_p): New.
13390 2018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
13392 PR middle-end/64946
13393 * cfgexpand.c (expand_debug_expr): Hande ABSU_EXPR.
13394 * config/i386/i386.c (ix86_add_stmt_cost): Likewise.
13395 * dojump.c (do_jump): Likewise.
13396 * expr.c (expand_expr_real_2): Check operand type's sign.
13397 * fold-const.c (const_unop): Handle ABSU_EXPR.
13398 (fold_abs_const): Likewise.
13399 * gimple-pretty-print.c (dump_unary_rhs): Likewise.
13400 * gimple-ssa-backprop.c (backprop::process_assign_use): Likesie.
13401 (strip_sign_op_1): Likesise.
13402 * match.pd: Add new pattern to generate ABSU_EXPR.
13403 * optabs-tree.c (optab_for_tree_code): Handle ABSU_EXPR.
13404 * tree-cfg.c (verify_gimple_assign_unary): Likewise.
13405 * tree-eh.c (operation_could_trap_helper_p): Likewise.
13406 * tree-inline.c (estimate_operator_cost): Likewise.
13407 * tree-pretty-print.c (dump_generic_node): Likewise.
13408 * tree-vect-patterns.c (vect_recog_sad_pattern): Likewise.
13409 * tree.def (ABSU_EXPR): New.
13411 2018-06-16 Jakub Jelinek <jakub@redhat.com>
13413 PR middle-end/86095
13414 * common.opt (Wunsafe-loop-optimizations): Add Ignore, remove Var,
13415 documented as preserved for backward compatibility only.
13416 * doc/invoke.texi: Remove -Wunsafe-loop-optimizations documentation.
13418 PR rtl-optimization/86108
13419 * bb-reorder.c (create_forwarder_block): Renamed to ...
13420 (create_eh_forwarder_block): ... this. Split OLD_BB after labels and
13421 jump from new landing pad to the second part.
13422 (sjlj_fix_up_crossing_landing_pad, dw2_fix_up_crossing_landing_pad):
13425 2018-06-15 Jakub Jelinek <jakub@redhat.com>
13427 PR middle-end/85878
13428 * expr.c (expand_assignment): Remove now redundant COMPLEX_MODE_P
13429 check from first store_expr, use to_mode instead of GET_MODE (to_rtx).
13430 Only call store_expr for halves if the mode is the same.
13432 PR middle-end/86123
13433 * match.pd ((X / Y) == 0 -> X < Y): Don't transform complex divisions.
13434 Fix up comment formatting.
13436 2018-06-15 Bernd Edlinger <bernd.edlinger@hotmail.de>
13438 * typed-splay-tree.h (typed_splay_tree::remove): New function.
13439 (typed_splay_tree::closure,
13440 typed_splay_tree::inner_foreach_fn, typed_splay_tree::m_inner): Deleted.
13441 (typed_splay_tree::typed_splay_tree,
13442 typed_splay_tree::operator =): Declared private.
13443 (typed_splay_tree::splay_tree_key, typed_splay_tree::splay_tree_value,
13444 typed_splay_tree::splay_tree_node_s, typed_splay_tree::KDEL,
13445 typed_splay_tree::VDEL, typed_splay_tree::splay_tree_delete_helper,
13446 typed_splay_tree::rotate_left, typed_splay_tree::rotate_right,
13447 typed_splay_tree::splay_tree_splay,
13448 typed_splay_tree::splay_tree_foreach_helper,
13449 typed_splay_tree::splay_tree_insert,
13450 typed_splay_tree::splay_tree_remove,
13451 typed_splay_tree::splay_tree_lookup,
13452 typed_splay_tree::splay_tree_predecessor,
13453 typed_splay_tree::splay_tree_successor,
13454 typed_splay_tree::splay_tree_min,
13455 typed_splay_tree::splay_tree_max): Took over from splay-tree.c/.h.
13456 (typed_splay_tree::root, typed_splay_tree::comp,
13457 typed_splay_tree::delete_key,
13458 typed_splay_tree::delete_value): New data members.
13459 * typed-splay-tree.c (selftest::test_str_to_int): Add a test for
13460 typed_splay_tree::remove.
13462 2018-06-15 Matthew Fortune <matthew.fortune@mips.com>
13464 * config/mips/mips.h (ASM_SPEC): Pass through -mcrc, -mno-crc,
13465 -mginv and -mno-ginv to the assembler.
13466 * config/mips/mips.opt (-mcrc): New option.
13467 (-mginv): Likewise.
13468 * doc/invoke.text (-mcrc): Document.
13469 (-mginv): Likewise.
13471 2018-06-15 Nick Clifton <nickc@redhat.com>
13474 * tree.c (escaped_string): New class. Converts an unescaped
13475 string into its escaped equivalent.
13476 (warn_deprecated_use): Use the new class to convert the
13477 deprecation message, if present.
13478 (test_escaped_strings): New self test.
13479 (test_c_tests): Add test_escaped_strings.
13480 * doc/extend.texi (deprecated): Add a note that the
13481 deprecation message is affected by the -fmessage-length
13482 option, and that control characters will be escaped.
13483 (#pragma GCC error): Document this pragma.
13484 (#pragma GCC warning): Likewise.
13485 * doc/invoke.texi (-fmessage-length): Document this option's
13486 effect on the #warning and #error preprocessor directives and
13487 the deprecated attribute.
13489 2018-06-15 Richard Biener <rguenther@suse.de>
13491 * tree-vect-slp.c (vect_slp_bb): Dump MSG_OPTIMIZED_LOCATIONS
13492 here, also noting vector size used.
13493 * tree-vectorizer.c (vectorize_loops): Adjust. Note vector
13494 size used in MSG_OPTIMIZED_LOCATIONS dump.
13495 (pass_slp_vectorize::execute): Adjust.
13497 2018-06-15 Claudiu Zissulescu <claziss@synopsys.com>
13500 * config/arc/arc.c (arc_return_address_register): Fix
13503 2018-06-15 Richard Biener <rguenther@suse.de>
13505 PR middle-end/86159
13506 * tree-cfg.c (gimplify_build3): Do not strip sign conversions,
13507 leave useless conversion stripping to force_gimple_operand_gsi.
13508 (gimplify_build2): Likewise.
13509 (gimplify_build1): Likewise.
13511 2018-06-15 Richard Biener <rguenther@suse.de>
13513 PR middle-end/86076
13514 * tree-cfg.c (move_stmt_op): unshare invariant addresses
13515 before adjusting their block.
13517 2018-06-15 Sebastian Huber <sebastian.huber@embedded-brains.de>
13519 * config.gcc (riscv*-*-elf* | riscv*-*-rtems*): Use custom
13520 multilibs for *-*-rtems*.
13521 * config/riscv/t-rtems: New file.
13523 2018-06-14 Jakub Jelinek <jakub@redhat.com>
13525 PR middle-end/86122
13526 * match.pd ((A +- CST1) +- CST2): Punt if last resort
13527 unsigned_type_for returns NULL.
13530 * lower-subreg.c (find_decomposable_subregs): Don't decompose float
13531 subregs of multi-word pseudos unless the float mode has word size.
13533 2018-06-14 Richard Biener <rguenther@suse.de>
13535 PR middle-end/86139
13536 * tree-vect-generic.c (build_word_mode_vector_type): Remove
13537 duplicate and harmful type_hash_canon.
13538 * tree.c (type_hash_canon): Assert we didn't find ourselves.
13540 2018-06-14 Richard Biener <rguenther@suse.de>
13543 * tree-ssa-struct-alias.c (create_variable_info_for): Handle
13546 2018-06-14 Sebastian Huber <sebastian.huber@embedded-brains.de>
13548 * config/rtems.h (STDINT_LONG32): Define.
13550 2018-06-13 Matthew Fortune <matthew.fortune@mips.com>
13551 Prachi Godbole <prachi.godbole@imgtec.com>
13553 * config/mips/mips-cpus.def: Define P6600.
13554 * config/mips/mips-tables.opt: Regenerate.
13555 * config/mips/mips.c (mips_ucbranch_type): New enum.
13556 (mips_rtx_cost_data): Add support for P6600.
13557 (mips_issue_rate): Likewise.
13558 (mips_multipass_dfa_lookahead): Likewise.
13559 (mips_avoid_hazard): Likewise.
13560 (mips_reorg_process_insns): Likewise.
13561 (mips_classify_branch_p6600): New function.
13562 * config/mips/mips.h (TUNE_P6600): New define.
13563 (MIPS_ISA_LEVEL_SPEC): Infer mips64r6 from p6600.
13564 (ENABLE_LD_ST_PAIRS): Enable load/store bonding for p6600.
13565 * config/mips/mips.md: Include p6600.md.
13566 (processor): Add p6600.
13567 * config/mips/p6600.md: New file.
13568 * doc/invoke.texi: Add p6600 to supported architectures.
13570 2018-06-13 Martin Sebor <msebor@redhat.com>
13572 PR tree-optimization/86114
13573 * gimple-fold.c (gimple_fold_builtin_strlen): Only handle LHS
13575 * tree-ssa-strlen.c (maybe_set_strlen_range): Same.
13577 2018-06-13 Richard Biener <rguenther@suse.de>
13579 * tree-vect-patterns.c (vect_recog_vector_vector_shift_pattern):
13580 Properly set vector type of the intermediate stmt.
13581 * tree-vect-stmts.c (vectorizable_operation): The destination
13582 var always has vectype_out type.
13584 2018-06-13 Jeff Law <law@redhat.com>
13586 * config/rl78/rl78.c (move_elim_pass): Use TDF_NONE rather than
13587 integer 0 for argument to print_rtl_with_bb.
13588 (rl78_reorg): Likewise.
13590 2018-06-13 David Malcolm <dmalcolm@redhat.com>
13592 * config/arc/arc.c (hwloop_optimize): Strengthen local "end_label"
13593 from rtx to rtx_insn *.
13594 * config/bfin/bfin.c (hwloop_optimize): Likewise for local
13596 (add_sched_insns_for_speculation): Likewise for local "target",
13597 converting usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
13598 * config/c6x/c6x.c (reorg_split_calls): Strengthen param "call_labels"
13599 from rtx_insn ** to rtx_code_label **.
13600 (reorg_emit_nops): Likewise.
13601 (c6x_reorg): Likewise for local "call_labels".
13602 * config/sh/sh-protos.h (get_dest_uid): Strengthen 1st param from
13604 * config/sh/sh.c (dump_table): Strengthen local "lab" from rtx to
13605 rtx_code_label *, adding safe_as_a <rtx_code_label *> casts to
13606 the loops over LABEL_REFS.
13607 (fixup_addr_diff_vecs): Add as_a <rtx_insn *> to usage of
13609 (barrier_align): Convert usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
13610 (get_dest_uid): Strengthen param "label" from rtx to rtx_insn *.
13611 (split_branches): Strengthen local "olabel" from rtx to
13612 rtx_insn *, adding a safe_as_a cast.
13613 * emit-rtl.c (next_real_insn): Strengthen param from "rtx"
13615 (add_insn_after): Likewise for first two params.
13616 (add_insn_before): Likewise.
13617 (remove_insn): Likewise for param.
13618 (emit_pattern_before_noloc): Likewise for second and third params.
13619 (emit_jump_insn_before_noloc): Convert NULL_RTX to NULL.
13620 (emit_call_insn_before_noloc): Likewise.
13621 (emit_debug_insn_before_noloc): Strengthen "before" param from "rtx"
13623 (emit_barrier_before): Likewise.
13624 (emit_label_before): Strengthen "label" param from "rtx" to
13625 "rtx_code_label *". Strengthen "before" param from "rtx" to
13627 (emit_insn_after_1): Strengthen "after" param from "rtx" to
13629 (emit_pattern_after_noloc): Likewise.
13630 (emit_insn_after_noloc): Likewise.
13631 (emit_jump_insn_after_noloc): Likewise.
13632 (emit_call_insn_after_noloc): Likewise.
13633 (emit_debug_insn_after_noloc): Likewise.
13634 (emit_barrier_after): Likewise.
13635 (emit_label_after): Likewise for both params.
13636 (emit_pattern_after_setloc): Likewise for "after" param. Convert
13637 "loc" param from "int" to "location_t".
13638 (emit_insn_after_setloc): Likewise.
13639 (emit_jump_insn_after_setloc): Likewise.
13640 (emit_call_insn_after_setloc): Likewise.
13641 (emit_debug_insn_after_setloc): Likewise.
13642 (emit_pattern_before_setloc): Likewise for "before" param. Convert
13643 "loc" param from "int" to "location_t".
13644 (emit_pattern_before): Convert NULL_RTX to NULL.
13645 (emit_insn_before_setloc): Convert "loc" param from "int" to
13647 (emit_jump_insn_before_setloc): Likewise.
13648 (emit_call_insn_before_setloc): Likewise.
13649 (emit_debug_insn_before_setloc): Strengthen "before" param from rtx to
13650 rtx_insn *. Convert "loc" param from "int" to "location_t".
13651 * rtl.h (emit_insn_before_setloc, emit_jump_insn_before_setloc,
13652 emit_call_insn_before_setloc, emit_debug_insn_before_setloc):
13653 Convert 3rd param from "int" to "location_t".
13654 (emit_barrier_before, emit_barrier_after, next_real_insn):
13655 Strengthen param from rtx to rtx_insn *.
13656 (emit_label_before): Strengthen 1st param from "rtx" to
13657 "rtx_code_label *". Strengthen 2nd param from "rtx" to
13659 (emit_insn_after_noloc, emit_jump_insn_after_noloc,
13660 emit_call_insn_after_noloc, emit_debug_insn_after_noloc):
13661 Strengthen 2nd param from "rtx" to "rtx_insn *".
13662 (emit_insn_after_setloc, emit_jump_insn_after_setloc)
13663 emit_call_insn_after_setloc, emit_debug_insn_after_setloc):
13664 Likewise. Convert 3rd param from "int" to "location_t".
13665 (emit_label_after): Strengthen 1st param from "rtx" to
13666 "rtx_code_label *".
13667 (next_real_insn, remove_insn): Strengthen param from "rtx" to
13669 (add_insn_before, add_insn_after): Strengthen 1st and 2nd params
13670 from "rtx" to "rtx_insn *".
13672 2018-06-13 Jan Hubicka <hubicka@gcc.gnu.org>
13674 * cgraph.c (cgraph_node::get_untransformed_body): Dump function
13675 bodies streamed in with -Q.
13676 * dumpfile.c (dump_files): Add lto-stream-out dump file.
13677 * dumpfile.h (tree_dump_index): Add lto_stream_out.
13678 * gimple-streamer-out.c: Include gimple-pretty-print.h
13679 (output_bb): Dump stmts streamed.
13680 * lto-section-out.c: Include print-tree.h
13681 (lto_begin_section): Dump sections created.
13682 (lto_output_decl_index): Dump decl encoded.
13683 * lto-streamer-out.c: Include print-tree.h
13684 (create_output_block): Dump output block created.
13685 (DFS::DFS_write_tree_body): Dump DFS SCCs streamed.
13686 (output_function): Dump function output.
13687 (output_constructor): Dump constructor streamed.
13688 (write_global_stream): Output indexes encoded.
13689 (produce_asm_for_decls): Dump streams encoded.
13690 * lto-streamer.c (streamer_dump_file): New global var.
13691 * lto-streamer.h (streamer_dump_file): Declare.
13692 * passes.c (ipa_write_summaries): Initialize streamer dump.
13693 * varpool.c (varpool_node::get_constructor): Dump constructors streamed
13696 2018-06-13 Eric Botcazou <ebotcazou@adacore.com>
13699 * config/i386/winnt.c (i386_pe_seh_cold_init): Do not emit negative
13700 offsets for register save directives. Emit a second batch of save
13701 directives, if need be, when the function accesses prior frames.
13703 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
13705 * config/arc/fpu.md (fmasf4): Force operand to register.
13706 (fnmasf4): Likewise.
13708 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
13710 * config/arc/arc-protos.h (arc_pad_return): Remove.
13711 * config/arc/arc.c (machine_function): Remove force_short_suffix
13713 (arc_print_operand): Adjust printing of '&'.
13714 (arc_verify_short): Remove conditional printing of short suffix.
13715 (arc_final_prescan_insn): Remove reference to size_reason.
13716 (pad_return): New function.
13717 (arc_reorg): Call pad_return.
13718 (arc_pad_return): Remove.
13719 (arc_init_machine_status): Remove reference to force_short_suffix.
13720 * config/arc/arc.md (vunspec): Add VUNSPEC_ARC_BLOCKAGE.
13721 (attr length): When attribute iscompact is true force to 2
13722 regardless; in the case of maybe check if we want to force the
13723 instruction to have 4 bytes length.
13724 (nopv): Change it to generate 4 byte long nop as well.
13725 (blockage): New pattern.
13726 (simple_return): Remove call to arc_pad_return.
13727 (p_return_i): Likewise.
13729 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
13731 * config/arc/elf.h (LINK_GCC_C_SEQUENCE_SPEC): Define.
13733 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
13735 * config/arc/builtins.def (SYNC): SYNC instruction is valid on all
13738 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
13740 * config/arc/arc.c (atomic_exchangesi): EX instruction is default
13741 for ARC700 and ARCv2.
13743 2018-06-13 Chenghua Xu <paul.hua.gm@gmail.com>
13746 * config/mips/loongson.md (vec_setv4hi): Gen_lowpart for
13747 operands[2] instead of operands[1].
13750 2018-06-12 Richard Sandiford <richard.sandiford@linaro.org>
13752 * lra-constraints.c (simplify_operand_subreg): In the paradoxical
13753 case, check whether the outer register overlaps an unallocatable
13754 register, not just whether it fits the required class.
13756 2018-06-12 Richard Sandiford <richard.sandiford@linaro.org>
13758 * poly-int.h (can_div_trunc_p): Add new overload in which all values
13760 * alias.c (get_addr): Extend CONST_INT handling to poly_int_rtx_p.
13761 (memrefs_conflict_p): Likewise.
13762 (init_alias_analysis): Likewise.
13763 * cfgexpand.c (expand_debug_expr): Likewise.
13764 * combine.c (combine_simplify_rtx, force_int_to_mode): Likewise.
13765 * cse.c (fold_rtx): Likewise.
13766 * explow.c (adjust_stack, anti_adjust_stack): Likewise.
13767 * expr.c (emit_block_move_hints): Likewise.
13768 (clear_storage_hints, push_block, emit_push_insn): Likewise.
13769 (store_expr_with_bounds, reduce_to_bit_field_precision): Likewise.
13770 (emit_group_load_1): Use rtx_to_poly_int64 for group offsets.
13771 (emit_group_store): Likewise.
13772 (find_args_size_adjust): Use strip_offset. Use rtx_to_poly_int64
13773 to read the PRE/POST_MODIFY increment.
13774 * calls.c (store_one_arg): Use strip_offset.
13775 * rtlanal.c (rtx_addr_can_trap_p_1): Extend CONST_INT handling to
13777 (set_noop_p): Use rtx_to_poly_int64 for the elements selected
13779 * simplify-rtx.c (avoid_constant_pool_reference): Use strip_offset.
13780 (simplify_binary_operation_1): Extend CONST_INT handling to
13782 * var-tracking.c (compute_cfa_pointer): Take a poly_int64 rather
13783 than a HOST_WIDE_INT.
13784 (hard_frame_pointer_adjustment): Change from HOST_WIDE_INT to
13786 (adjust_mems, add_stores): Update accodingly.
13787 (vt_canonicalize_addr): Track polynomial offsets.
13788 (emit_note_insn_var_location): Likewise.
13789 (vt_add_function_parameter): Likewise.
13790 (vt_initialize): Likewise.
13792 2018-06-12 Jeff Law <law@redhat.com>
13794 * config.gcc (alpha*-*-freebsd*): Remove.
13795 * config/alpha/freebsd.h: Remove.
13797 2018-06-12 David Malcolm <dmalcolm@redhat.com>
13800 * spellcheck-tree.c (levenshtein_distance): Rename to...
13801 (get_edit_distance): ...this, and update for underlying renaming.
13802 * spellcheck-tree.h (levenshtein_distance): Rename to...
13803 (get_edit_distance): ...this.
13804 * spellcheck.c (levenshtein_distance): Rename to...
13805 (get_edit_distance): ...this. Convert from Levenshtein distance
13806 to Damerau-Levenshtein distance by supporting transpositions of
13807 adjacent characters. Rename "v1" to "v_next" and "v0" to
13809 (selftest::levenshtein_distance_unit_test_oneway): Rename to...
13810 (selftest::test_edit_distance_unit_test_oneway): ...this, and
13811 update for underlying renaming.
13812 (selftest::levenshtein_distance_unit_test): Rename to...
13813 (selftest::test_get_edit_distance_unit): ...this, and update for
13814 underlying renaming.
13815 (selftest::test_find_closest_string): Add example from PR 69968
13816 where transposition helps
13817 (selftest::test_metric_conditions): Update for renaming.
13818 (selftest::test_metric_conditions): Likewise.
13819 (selftest::spellcheck_c_tests): Likewise.
13820 * spellcheck.h (levenshtein_distance): Rename both overloads to...
13821 (get_edit_distance): ...this.
13822 (best_match::consider): Update for renaming.
13824 2018-06-12 Martin Sebor <msebor@redhat.com>
13826 PR tree-optimization/85259
13827 * builtins.c (compute_objsize): Handle constant offsets.
13828 * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Return
13829 true iff a warning has been issued.
13830 * gimple.h (gimple_nonartificial_location): New function.
13831 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Call
13832 gimple_nonartificial_location and handle -Wno-system-headers.
13833 (handle_builtin_stxncpy): Same.
13835 2018-06-12 Martin Sebor <msebor@redhat.com>
13838 * fold-const.c (operand_equal_p): Handle SAVE_EXPR.
13840 2018-06-12 Will Schmidt <will_schmidt@vnet.ibm.com>
13842 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add
13843 BUILTIN_VEC_XST entries for pointer to double and long long.
13845 2018-06-12 H.J. Lu <hongjiu.lu@intel.com>
13848 * config/i386/gnu-user.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
13850 * config/i386/gnu-user64.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
13853 2018-06-12 Martin Liska <mliska@suse.cz>
13855 * doc/options.texi: Document IntegerRange.
13857 2018-06-12 Martin Liska <mliska@suse.cz>
13859 * config/i386/i386.opt: Make MPX-related options as Deprecated.
13860 * opt-functions.awk: Handle Deprecated flag.
13861 * opts-common.c (decode_cmdline_option): Handle cl_deprecated
13863 (read_cmdline_option): Report warning for a deprecated option.
13864 * opts.h (struct cl_option): Add new field cl_deprecated.
13865 (CL_ERR_DEPRECATED): New.
13867 2018-06-12 Martin Liska <mliska@suse.cz>
13869 * doc/options.texi: Document Deprecated option flag.
13871 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
13873 * config/arc/arc-arch.h (arc_extras): New enum.
13874 (arc_cpu_t):Add field extra.
13875 (arc_cpu_types): Consider the extras.
13876 * config/arc/arc-cpus.def: Add extras info.
13877 * config/arc/arc-opts.h (processor_type): Consider extra field.
13878 * config/arc/arc.c (arc_override_options): Handle extra field.
13880 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
13882 * config/arc/arc-arch.h: Update ARC_OPTX macro.
13883 * config/arc/arc-options.def (ARC_OPTX): Introduce a new doc
13885 * config/arc/arc.c (arc_init): Update pic warning.
13886 (irq_range): Update irq range parsing warnings.
13887 (arc_override_options): Update various warning messages.
13888 (arc_handle_aux_attribute): Likewise.
13890 2018-06-12 Robert Suchanek <robert.suchanek@mips.com>
13892 * config/mips/i6400.md (i6400_fpu_fadd): Remove frint.
13894 2018-06-12 Jozef Lawrynowicz <jozef.l@mittosystems.com>
13896 * doc/sourcebuild.texi: Document usage of line number 0 in verify
13897 compiler messages directives.
13899 2018-06-12 Matthew Fortune <mfortune@gmail.com>
13901 * config/mips/mips-cpus.def: New MIPS_CPU for i6500.
13902 * config/mips/mips-tables.opt: Regenerate.
13903 * config/mips/mips.h (MIPS_ISA_LEVEL_SPEC): Mark i6500 as
13905 * doc/invoke.texi: Document -march=i6500.
13907 2018-06-12 Prachi Godbole <prachi.godbole@imgtec.com>
13909 * config/mips/i6400.md (i6400_gpmuldiv): Remove cpu_unit.
13910 (i6400_gpmul): Add cpu_unit.
13911 (i6400_gpdiv): Likewise.
13912 (i6400_msa_add_d): Update reservations.
13913 (i6400_msa_int_add) Likewise.
13914 (i6400_msa_short_logic3) Likewise.
13915 (i6400_msa_short_logic2) Likewise.
13916 (i6400_msa_short_logic) Likewise.
13917 (i6400_msa_move) Likewise.
13918 (i6400_msa_cmp) Likewise.
13919 (i6400_msa_short_float2) Likewise.
13920 (i6400_msa_div_d) Likewise.
13921 (i6400_msa_long_logic1) Likewise.
13922 (i6400_msa_long_logic2) Likewise.
13923 (i6400_msa_mult) Likewise.
13924 (i6400_msa_long_float2) Likewise.
13925 (i6400_msa_long_float4) Likewise.
13926 (i6400_msa_long_float5) Likewise.
13927 (i6400_msa_long_float8) Likewise.
13928 (i6400_fpu_fadd): Include frint type.
13929 (i6400_fpu_store): New define_insn_reservation.
13930 (i6400_fpu_load): Likewise.
13931 (i6400_fpu_move): Likewise.
13932 (i6400_fpu_fcmp): Likewise.
13933 (i6400_fpu_fmadd): Likewise.
13934 (i6400_int_mult): Include imul3nc type and update reservation.
13935 (i6400_int_div): Include idiv3 type and update reservation.
13936 (i6400_int_load): Update to check type not move_type.
13937 (i6400_int_store): Likewise.
13938 (i6400_int_prefetch): Set zero latency.
13940 2018-06-12 Eric Botcazou <ebotcazou@adacore.com>
13942 * gcc.c: Document new %@{...} sequence.
13943 (LINK_COMMAND_SPEC): Use it for the -L switches.
13944 (cpp_unique_options): Use it for the -I switches.
13945 (at_file_argbuf): New global variable.
13946 (in_at_file): Likewise.
13947 (alloc_args): Create at_file_argbuf.
13948 (clear_args): Truncate at_file_argbuf.
13949 (store_arg): If in_at_file, push the argument onto at_file_argbuf.
13950 (open_at_file): New function.
13951 (close_at_file): Likewise.
13952 (create_at_file): Delete.
13953 (do_spec_1) <'i'>: Use open_at_file/close_at_file.
13956 (validate_switches_from_spec): Deal with %@{...} sequence.
13957 (validate_switches): Likewise.
13958 (driver::finalize): Call clear_args.
13960 2018-06-11 Rasmus Villemoes <rasmus.villemoes@prevas.dk>
13962 * config/vx-common.h (USE_TM_CLONE_REGISTRY): #define to 0.
13964 2018-06-11 Martin Sebor <msebor@redhat.com>
13966 * doc/invoke.texi (-Wall): List -Wc++17-compat.
13967 (Wno-class-memaccess): Add @opindex.
13968 (Wno-templates, Wno-multiple-inheritance): Same.
13969 (Wno-virtual-inheritance, Wno-namespaces): Same.
13970 (Wno-pedantic, Wno-chkp, Wcoverage-mismatch): Same.
13971 (Wno-format-overflow, Wno-format-truncation): Same.
13972 (Wno-unused-local-typedefs, Walloc-size-larger-than): Same.
13973 (Wno-alloc-size-larger-than, Wframe-larger-than): Same
13974 (Wno-stack-usage, Wno-c++-compat, Wno-c++11-compat): Same.
13975 (Wno-c++14-compat, Wno-c++17-compat, Wno-openmp-simd): Same.
13976 (Wno-unsuffixed-float-constants, Wno-addr-space-convert): Same.
13977 (Wno-misspelled-isr): Same.
13979 2018-06-11 Martin Sebor <msebor@redhat.com>
13981 * PR tree-optimization/86083
13982 * tree-ssa-strlen.c (handle_char_store): Use tree_expr_nonzero_p.
13984 2018-06-11 Zhouyi Zhou <zhouzhouyi@gmail.com>
13986 * tree-eh.c (lower_eh_constructs_2): Add a comma to comment.
13988 2018-06-11 Segher Boessenkool <segher@kernel.crashing.org>
13991 * config/rs6000/rs6000.md (*movdi_internal32): Put constraint modifiers
13992 on the correct operand.
13993 (*movdi_internal64): Ditto.
13995 2018-06-11 Martin Liska <mliska@suse.cz>
13997 PR tree-optimization/86089
13998 * tree-ssa-strlen.c (get_string_length): Move back removed hunk.
14000 2018-06-11 Julia Koval <julia.koval@intel.com>
14002 * config/i386/vaesintrin.h (_mm_aesdec_epi128, _mm_aesdeclast_epi128)
14003 _mm_aesenc_epi128, _mm_aesenclast_epi128: Remove.
14004 * config/i386/vpclmulqdqintrin.h (_mm_clmulepi64_epi128): Remove.
14006 2018-06-11 Olivier Hainque <hainque@adacore.com>
14008 * dwarf2out.c (gen_compile_unit_die): Fallout to DW_LANG_Ada83
14009 for Ada with strict dwarf2.
14011 2018-06-08 Peter Bergner <bergner@vnet.ibm.com>
14014 * config/rs6000/rs6000.c (mem_operand_gpr): Enable PRE_INC and PRE_DEC
14017 2018-06-08 Jan Hubicka <hubicka@ucw.cz>
14019 * dumpfile.c (FIRST_ME_AUTO_NUMBERED_DUMP): Bump to 4.
14021 2018-06-08 David Edelsohn <dje.gcc@gmail.com>
14023 * config/rs6000/rs6000.c (rs6000_passes_ieee128): Protect with #if
14026 2018-06-08 Martin Liska <mliska@suse.cz>
14028 * tree-cfg.h (debug_function): Fix argument type to match
14031 2018-06-08 Martin Liska <mliska@suse.cz>
14033 * config/powerpcspe/powerpcspe.c (rs6000_xcoff_visibility):
14034 Remove usage of MPX-related (and removed) fields.
14035 * config/rs6000/rs6000.c (rs6000_xcoff_visibility): Likewise.
14037 2018-06-08 David Malcolm <dmalcolm@redhat.com>
14039 * cfg.c (debug): Use TDF_NONE rather than 0.
14040 * cfghooks.c (debug): Likewise.
14041 * dumpfile.c (DUMP_FILE_INFO): Likewise; also for OPTGROUP.
14042 (struct dump_option_value_info): Convert to...
14043 (struct kv_pair): ...this template type.
14044 (dump_options): Convert to kv_pair<dump_flags_t>; use TDF_NONE
14046 (optinfo_verbosity_options): Likewise.
14047 (optgroup_options): Convert to kv_pair<optgroup_flags_t>; use
14049 (gcc::dump_manager::dump_register): Use optgroup_flags_t rather
14050 than int for "optgroup_flags" param.
14051 (dump_generic_expr_loc): Use dump_flags_t rather than int for
14053 (dump_dec): Likewise.
14054 (dump_finish): Use TDF_NONE rather than 0.
14055 (gcc::dump_manager::opt_info_enable_passes): Use optgroup_flags_t
14056 rather than int for "optgroup_flags" param. Use TDF_NONE rather
14057 than 0. Update for change to option_ptr.
14058 (opt_info_switch_p_1): Convert "optgroup_flags" param from int *
14059 to optgroup_flags_t *. Use TDF_NONE and OPTGROUP_NONE rather than
14060 0. Update for changes to optinfo_verbosity_options and
14062 (opt_info_switch_p): Convert optgroup_flags from int to
14064 (dump_basic_block): Use dump_flags_t rather than int
14065 for "dump_kind" param.
14066 * dumpfile.h (TDF_ADDRESS, TDF_SLIM, TDF_RAW, TDF_DETAILS,
14067 TDF_STATS, TDF_BLOCKS, TDF_VOPS, TDF_LINENO, TDF_UID)
14068 TDF_STMTADDR, TDF_GRAPH, TDF_MEMSYMS, TDF_RHS_ONLY, TDF_ASMNAME,
14069 TDF_EH, TDF_NOUID, TDF_ALIAS, TDF_ENUMERATE_LOCALS, TDF_CSELIB,
14070 TDF_SCEV, TDF_GIMPLE, TDF_FOLDING, MSG_OPTIMIZED_LOCATIONS,
14071 MSG_MISSED_OPTIMIZATION, MSG_NOTE, MSG_ALL, TDF_COMPARE_DEBUG,
14072 TDF_NONE): Convert from macros to...
14073 (enum dump_flag): ...this new enum.
14074 (dump_flags_t): Update to use enum.
14075 (operator|, operator&, operator~, operator|=, operator&=):
14076 Implement for dump_flags_t.
14077 (OPTGROUP_NONE, OPTGROUP_IPA, OPTGROUP_LOOP, OPTGROUP_INLINE,
14078 OPTGROUP_OMP, OPTGROUP_VEC, OPTGROUP_OTHER, OPTGROUP_ALL):
14079 Convert from macros to...
14080 (enum optgroup_flag): ...this new enum.
14081 (optgroup_flags_t): New typedef.
14082 (operator|, operator|=): Implement for optgroup_flags_t.
14083 (struct dump_file_info): Convert field "alt_flags" to
14084 dump_flags_t. Convert field "optgroup_flags" to
14086 (dump_basic_block): Use dump_flags_t rather than int for param.
14087 (dump_generic_expr_loc): Likewise.
14088 (dump_dec): Likewise.
14089 (dump_register): Convert param "optgroup_flags" to
14091 (opt_info_enable_passes): Likewise.
14092 * early-remat.c (early_remat::dump_edge_list): Use TDF_NONE rather
14094 * gimple-pretty-print.c (debug): Likewise.
14095 * gimple-ssa-store-merging.c (bswap_replace): Likewise.
14096 (merged_store_group::apply_stores): Likewise.
14097 * gimple-ssa-strength-reduction.c (insert_initializers): Likewise.
14098 * gimple.c (verify_gimple_pp): Likewise.
14099 * graphite-poly.c (print_pbb_body): Likewise.
14100 * passes.c (pass_manager::register_one_dump_file): Convert
14101 local "optgroup_flags" to optgroup_flags_t.
14102 * print-tree.c (print_node): Use TDF_NONE rather than 0.
14104 (debug_body): Likewise.
14105 * tree-pass.h (struct pass_data): Convert field "optgroup_flags"
14106 to optgroup_flags_t.
14107 * tree-pretty-print.c (print_struct_decl): Use TDF_NONE rather
14109 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Likewise.
14110 (convert_mult_to_fma): Likewise.
14111 * tree-ssa-reassoc.c (undistribute_ops_list): Likewise.
14112 * tree-ssa-sccvn.c (vn_eliminate): Likewise.
14113 * tree-vect-data-refs.c (dump_lower_bound): Convert param
14114 "dump_kind" to dump_flags_t.
14116 2018-06-08 Segher Boessenkool <segher@kernel.crashing.org>
14118 * config/rs6000/rs6000.c (min, max): Delete.
14120 2018-06-08 Segher Boessenkool <segher@kernel.crashing.org>
14122 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete mention of
14123 -mabi=spe and -mabi=no-spe.
14125 2018-06-08 Martin Liska <mliska@suse.cz>
14127 * ipa-pure-const.c (propagate_pure_const): Use ::get at places
14128 where we expect an existing summary.
14130 2018-06-08 Martin Liska <mliska@suse.cz>
14132 * ipa-inline-analysis.c (simple_edge_hints): Use ::get method.
14133 * ipa-inline.h (estimate_edge_growth): Likewise.
14135 2018-06-08 Martin Liska <mliska@suse.cz>
14137 * cgraph.c (function_version_hasher::hash): Use
14138 cgraph_node::get_uid ().
14139 (function_version_hasher::equal):
14140 * cgraph.h (cgraph_node::get_uid): New method.
14141 * ipa-inline.c (update_caller_keys): Use
14142 cgraph_node::get_uid ().
14143 (update_callee_keys): Likewise.
14144 * ipa-utils.c (searchc): Likewise.
14145 (ipa_reduced_postorder): Likewise.
14146 * lto-cgraph.c (input_node): Likewise.
14147 * passes.c (is_pass_explicitly_enabled_or_disabled): Likewise.
14148 * symbol-summary.h (symtab_insertion): Likewise.
14149 (symtab_removal): Likewise.
14150 (symtab_duplication): Likewise.
14151 * tree-pretty-print.c (dump_function_header): Likewise.
14152 * tree-sra.c (convert_callers_for_node): Likewise.
14154 2018-06-08 Martin Liska <mliska@suse.cz>
14156 * cgraph.c (symbol_table::create_edge): Always assign a new
14158 (symbol_table::free_edge): Do not recycle numbers.
14159 * cgraph.h (cgraph_edge::get): New method.
14160 * symbol-summary.h (symtab_removal): Use it.
14161 (symtab_duplication): Likewise.
14162 (call_summary::hashable_uid): Remove.
14164 2018-06-08 Martin Liska <mliska@suse.cz>
14166 * ipa-inline-analysis.c (inline_edge_removal_hook): Remove.
14167 (initialize_growth_caches): Remove.
14168 (free_growth_caches): Likewise.
14169 (do_estimate_edge_time): Use edge_growth_cache.
14170 (do_estimate_edge_size): Likewise.
14171 (do_estimate_edge_hints): Likewise.
14172 * ipa-inline.c (reset_edge_caches): Likewise.
14173 (recursive_inlining): Likewise.
14174 (inline_small_functions): Likewise.
14175 * ipa-inline.h (initialize_growth_caches): Remove.
14176 (estimate_edge_size): Likewise.
14177 (estimate_edge_time): Likewise.
14178 (estimate_edge_hints): Likewise.
14179 (reset_edge_growth_cache): Likewise.
14180 * symbol-summary.h (call_summary::remove): New method.
14182 2018-06-08 Martin Liska <mliska@suse.cz>
14184 * ipa-cp.c (class edge_clone_summary): New summary.
14185 (grow_edge_clone_vectors): Remove.
14186 (ipcp_edge_duplication_hook): Remove.
14187 (class edge_clone_summary_t): New call_summary class.
14188 (ipcp_edge_removal_hook): Remove.
14189 (edge_clone_summary_t::duplicate): New function.
14190 (get_next_cgraph_edge_clone): Use edge_clone_summaries.
14191 (create_specialized_node): Likewise.
14192 (ipcp_driver): Initialize edge_clone_summaries and do not
14195 2018-06-08 Martin Liska <mliska@suse.cz>
14197 * symbol-summary.h (get): New function.
14198 (call_summary::m_initialize_when_cloning): New class member.
14200 2018-06-08 Martin Liska <mliska@suse.cz>
14202 * cgraph.c (cgraph_node::remove): Do not recycle uid.
14203 * cgraph.h (symbol_table::release_symbol): Do not pass uid.
14204 (symbol_table::allocate_cgraph_symbol): Do not set uid.
14205 * passes.c (uid_hash_t): Record removed_nodes by their uids.
14206 (remove_cgraph_node_from_order): Use the removed_nodes set.
14207 (do_per_function_toporder): Likwise.
14208 * symbol-summary.h (symtab_insertion): Use cgraph_node::uid
14209 instead of summary_uid.
14210 (symtab_removal): Likewise.
14211 (symtab_duplication): Likewise.
14213 2018-06-08 Martin Liska <mliska@suse.cz>
14215 * ipa-cp.c (ipcp_store_bits_results): Use
14216 ipcp_transformation_sum.
14217 (ipcp_store_vr_results): Likewise.
14218 * ipa-prop.c (ipcp_grow_transformations_if_necessary): Renamed
14220 (ipcp_transformation_initialize): ... this.
14221 (ipa_set_node_agg_value_chain):
14222 (ipa_node_params_t::duplicate): Use ipcp_transformation_sum.
14223 (write_ipcp_transformation_info): Likewise.
14224 (read_ipcp_transformation_info): Likewise.
14225 (ipcp_update_bits): Likewise.
14226 (ipcp_update_vr): Likewise.
14227 (ipcp_transform_function): Likewise.
14228 * ipa-prop.h: Rename ipcp_transformation_summary to
14229 ipcp_transformation.
14230 (class ipcp_transformation_t): New function summary.
14231 (ipcp_get_transformation_summary): Use ipcp_transformation_sum.
14232 (ipa_get_agg_replacements_for_node): Likewise.
14234 2018-06-08 Martin Liska <mliska@suse.cz>
14236 * ipa-pure-const.c (struct funct_state_d): Do it class instead
14238 (class funct_state_summary_t): New function_summary class.
14239 (has_function_state): Remove.
14240 (get_function_state): Likewise.
14241 (set_function_state): Likewise.
14242 (add_new_function): Likewise.
14243 (funct_state_summary_t::insert): New function.
14244 (duplicate_node_data): Remove.
14245 (remove_node_data): Remove.
14246 (funct_state_summary_t::duplicate): New function.
14247 (register_hooks): Create new funct_state_summaries.
14248 (pure_const_generate_summary): Use it.
14249 (pure_const_write_summary): Likewise.
14250 (pure_const_read_summary): Likewise.
14251 (propagate_pure_const): Likewise.
14252 (propagate_nothrow): Likewise.
14253 (dump_malloc_lattice): Likewise.
14254 (propagate_malloc): Likewise.
14255 (execute): Do not register hooks, just remove summary
14257 (pass_ipa_pure_const::pass_ipa_pure_const): Simplify
14260 2018-06-08 Martin Liska <mliska@suse.cz>
14262 * ipa-reference.c (remove_node_data): Remove.
14263 (duplicate_node_data): Likewise.
14264 (class ipa_ref_var_info_summary_t): New class.
14265 (class ipa_ref_opt_summary_t): Likewise.
14266 (get_reference_vars_info): Use ipa_ref_var_info_summaries.
14267 (get_reference_optimization_summary): Use
14268 ipa_ref_opt_sum_summaries.
14269 (set_reference_vars_info): Remove.
14270 (set_reference_optimization_summary): Likewise.
14271 (ipa_init): Create summaries.
14272 (init_function_info): Use function summary.
14273 (ipa_ref_opt_summary_t::duplicate): New function.
14274 (ipa_ref_opt_summary_t::remove): New function.
14275 (get_read_write_all_from_node): Fix GNU coding style.
14276 (propagate): Use function summary.
14277 (write_node_summary_p): Fix GNU coding style.
14278 (stream_out_bitmap): Likewise.
14279 (ipa_reference_read_optimization_summary): Use function summary.
14280 (ipa_reference_c_finalize): Do not release hooks.
14282 2018-06-08 Martin Liska <mliska@suse.cz>
14284 * ipa-fnsummary.c (dump_ipa_call_summary): Use ::get method.
14285 (analyze_function_body): Extract multiple calls of get_create.
14286 * ipa-inline-analysis.c (simple_edge_hints): Likewise.
14287 * ipa-inline.c (recursive_inlining): Use ::get method.
14288 * ipa-inline.h (estimate_edge_growth): Likewise.
14290 2018-06-08 Martin Liska <mliska@suse.cz>
14292 * hsa-common.h (enum hsa_function_kind): Rename HSA_NONE to
14294 (hsa_function_summary::hsa_function_summary): Use the new enum
14296 (hsa_gpu_implementation_p): Use hsa_summaries::get.
14297 * hsa-gen.c (hsa_get_host_function): Likewise.
14298 (get_brig_function_name): Likewise.
14299 * ipa-hsa.c (process_hsa_functions): Likewise.
14300 (ipa_hsa_write_summary): Likewise.
14301 * symbol-summary.h (symtab_duplication): Use ::get function/
14302 (get): New function.
14304 2018-06-08 Martin Liska <mliska@suse.cz>
14306 * config/i386/i386.c (ix86_can_inline_p): Use get_create instead
14308 * hsa-common.c (hsa_summary_t::link_functions): Likewise.
14309 (hsa_register_kernel): Likewise.
14310 * hsa-common.h (hsa_gpu_implementation_p): Likewise.
14311 * hsa-gen.c (hsa_get_host_function): Likewise.
14312 (get_brig_function_name): Likewise.
14313 (generate_hsa): Likewise.
14314 (pass_gen_hsail::execute): Likewise.
14315 * ipa-cp.c (ipcp_cloning_candidate_p): Likewise.
14316 (devirtualization_time_bonus): Likewise.
14317 (ipcp_propagate_stage): Likewise.
14318 * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
14319 (edge_set_predicate): Likewise.
14320 (evaluate_conditions_for_known_args): Likewise.
14321 (evaluate_properties_for_edge): Likewise.
14322 (ipa_fn_summary::reset): Likewise.
14323 (ipa_fn_summary_t::duplicate): Likewise.
14324 (dump_ipa_call_summary): Likewise.
14325 (ipa_dump_fn_summary): Likewise.
14326 (analyze_function_body): Likewise.
14327 (compute_fn_summary): Likewise.
14328 (estimate_edge_devirt_benefit): Likewise.
14329 (estimate_edge_size_and_time): Likewise.
14330 (estimate_calls_size_and_time): Likewise.
14331 (estimate_node_size_and_time): Likewise.
14332 (inline_update_callee_summaries): Likewise.
14333 (remap_edge_change_prob): Likewise.
14334 (remap_edge_summaries): Likewise.
14335 (ipa_merge_fn_summary_after_inlining): Likewise.
14336 (ipa_update_overall_fn_summary): Likewise.
14337 (read_ipa_call_summary): Likewise.
14338 (inline_read_section): Likewise.
14339 (write_ipa_call_summary): Likewise.
14340 (ipa_fn_summary_write): Likewise.
14341 (ipa_free_fn_summary): Likewise.
14342 * ipa-hsa.c (process_hsa_functions): Likewise.
14343 (ipa_hsa_write_summary): Likewise.
14344 (ipa_hsa_read_section): Likewise.
14345 * ipa-icf.c (sem_function::merge): Likewise.
14346 * ipa-inline-analysis.c (simple_edge_hints): Likewise.
14347 (do_estimate_edge_time): Likewise.
14348 (estimate_size_after_inlining): Likewise.
14349 (estimate_growth): Likewise.
14350 (growth_likely_positive): Likewise.
14351 * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
14352 (inline_call): Likewise.
14353 * ipa-inline.c (caller_growth_limits): Likewise.
14354 (can_inline_edge_p): Likewise.
14355 (can_inline_edge_by_limits_p): Likewise.
14356 (compute_uninlined_call_time): Likewise.
14357 (compute_inlined_call_time): Likewise.
14358 (want_inline_small_function_p): Likewise.
14359 (edge_badness): Likewise.
14360 (update_caller_keys): Likewise.
14361 (update_callee_keys): Likewise.
14362 (recursive_inlining): Likewise.
14363 (inline_small_functions): Likewise.
14364 (inline_to_all_callers_1): Likewise.
14365 (dump_overall_stats): Likewise.
14366 (early_inline_small_functions): Likewise.
14367 (early_inliner): Likewise.
14368 * ipa-inline.h (estimate_edge_growth): Likewise.
14369 * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
14370 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
14371 * ipa-prop.h (IPA_NODE_REF): Likewise.
14372 (IPA_EDGE_REF): Likewise.
14373 * ipa-pure-const.c (malloc_candidate_p): Likewise.
14374 (propagate_malloc): Likewise.
14375 * ipa-split.c (execute_split_functions): Likewise.
14376 * symbol-summary.h: Rename get to get_create.
14378 (get_create): Likewise.
14379 * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
14381 2018-06-08 Martin Liska <mliska@suse.cz>
14383 * symbol-summary.h (release): Move definition out of class
14385 (symtab_removal): Likewise.
14386 (symtab_duplication): Likewise.
14388 2018-06-08 Martin Liska <mliska@suse.cz>
14390 * symbol-summary.h (function_summary): Move constructor
14391 implementation out of class declaration.
14392 (release): Likewise.
14393 (symtab_insertion): Likewise.
14394 (symtab_removal): Likewise.
14395 (symtab_duplication): Likewise.
14398 2018-06-08 Martin Liska <mliska@suse.cz>
14400 * Makefile.in: Remove support for MPX (macros, related functions,
14401 fields in cgraph_node, ...).
14402 * builtin-types.def (BT_BND): Likewise.
14403 (BT_FN_BND_CONST_PTR): Likewise.
14404 (BT_FN_CONST_PTR_BND): Likewise.
14405 (BT_FN_VOID_PTR_BND): Likewise.
14406 (BT_FN_BND_CONST_PTR_SIZE): Likewise.
14407 (BT_FN_VOID_CONST_PTR_BND_CONST_PTR): Likewise.
14408 * builtins.c (expand_builtin_memcpy_with_bounds): Likewise.
14409 (expand_builtin_mempcpy_with_bounds): Likewise.
14410 (expand_builtin_memset_with_bounds): Likewise.
14411 (expand_builtin_memset_args): Likewise.
14412 (std_expand_builtin_va_start): Likewise.
14413 (expand_builtin): Likewise.
14414 (expand_builtin_with_bounds): Likewise.
14415 * builtins.def (DEF_BUILTIN_CHKP): Likewise.
14416 (DEF_LIB_BUILTIN_CHKP): Likewise.
14417 (DEF_EXT_LIB_BUILTIN_CHKP): Likewise.
14418 (DEF_CHKP_BUILTIN): Likewise.
14419 (BUILT_IN_MEMCPY): Likewise.
14420 (BUILT_IN_MEMMOVE): Likewise.
14421 (BUILT_IN_MEMPCPY): Likewise.
14422 (BUILT_IN_MEMSET): Likewise.
14423 (BUILT_IN_STPCPY): Likewise.
14424 (BUILT_IN_STRCAT): Likewise.
14425 (BUILT_IN_STRCHR): Likewise.
14426 (BUILT_IN_STRCPY): Likewise.
14427 (BUILT_IN_STRLEN): Likewise.
14428 (BUILT_IN_MEMCPY_CHK): Likewise.
14429 (BUILT_IN_MEMMOVE_CHK): Likewise.
14430 (BUILT_IN_MEMPCPY_CHK): Likewise.
14431 (BUILT_IN_MEMSET_CHK): Likewise.
14432 (BUILT_IN_STPCPY_CHK): Likewise.
14433 (BUILT_IN_STRCAT_CHK): Likewise.
14434 (BUILT_IN_STRCPY_CHK): Likewise.
14435 * calls.c (store_bounds): Likewise.
14436 (emit_call_1): Likewise.
14437 (special_function_p): Likewise.
14438 (maybe_warn_nonstring_arg): Likewise.
14439 (initialize_argument_information): Likewise.
14440 (finalize_must_preallocate): Likewise.
14441 (compute_argument_addresses): Likewise.
14442 (expand_call): Likewise.
14443 * cfgexpand.c (expand_call_stmt): Likewise.
14444 (expand_return): Likewise.
14445 (expand_gimple_stmt_1): Likewise.
14446 (pass_expand::execute): Likewise.
14447 * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Likewise.
14448 (cgraph_node::remove): Likewise.
14449 (cgraph_node::dump): Likewise.
14450 (cgraph_node::verify_node): Likewise.
14451 * cgraph.h (chkp_function_instrumented_p): Likewise.
14452 (symtab_node::get_alias_target): Likewise.
14453 (cgraph_node::can_remove_if_no_direct_calls_and_refs_p): Likewise.
14454 (cgraph_local_p): Likewise.
14455 * cgraphbuild.c (cgraph_edge::rebuild_edges): Likewise.
14456 (cgraph_edge::rebuild_references): Likewise.
14457 * cgraphunit.c (varpool_node::finalize_decl): Likewise.
14458 (walk_polymorphic_call_targets): Likewise.
14459 (cgraph_node::expand_thunk): Likewise.
14460 (symbol_table::output_weakrefs): Likewise.
14461 * common/config/i386/i386-common.c (OPTION_MASK_ISA2_GENERAL_REGS_ONLY_UNSET): Likewise.
14462 (ix86_handle_option): Likewise.
14463 * config/i386/constraints.md: Likewise.
14464 * config/i386/i386-builtin-types.def (BND): Likewise.
14468 * config/i386/i386-builtin.def (BDESC_END): Likewise.
14469 (BDESC_FIRST): Likewise.
14471 * config/i386/i386-c.c (ix86_target_macros_internal): Likewise.
14472 * config/i386/i386-protos.h (ix86_bnd_prefixed_insn_p): Likewise.
14473 * config/i386/i386.c (enum reg_class): Likewise.
14474 (ix86_target_string): Likewise.
14475 (ix86_option_override_internal): Likewise.
14476 (ix86_conditional_register_usage): Likewise.
14477 (ix86_valid_target_attribute_inner_p): Likewise.
14478 (ix86_set_indirect_branch_type): Likewise.
14479 (ix86_set_current_function): Likewise.
14480 (ix86_function_arg_regno_p): Likewise.
14481 (init_cumulative_args): Likewise.
14482 (ix86_function_arg_advance): Likewise.
14483 (ix86_function_arg): Likewise.
14484 (ix86_pass_by_reference): Likewise.
14485 (ix86_function_value_regno_p): Likewise.
14486 (ix86_function_value_1): Likewise.
14487 (ix86_function_value_bounds): Likewise.
14488 (ix86_return_in_memory): Likewise.
14489 (ix86_setup_incoming_vararg_bounds): Likewise.
14490 (ix86_va_start): Likewise.
14491 (indirect_thunk_need_prefix): Likewise.
14492 (print_reg): Likewise.
14493 (ix86_print_operand): Likewise.
14494 (ix86_expand_call): Likewise.
14495 (ix86_output_function_return): Likewise.
14496 (reg_encoded_number): Likewise.
14497 (BDESC_VERIFYS): Likewise.
14498 (ix86_init_mpx_builtins): Likewise.
14499 (ix86_init_builtins): Likewise.
14500 (ix86_emit_cmove): Likewise.
14501 (ix86_emit_move_max): Likewise.
14502 (ix86_expand_builtin): Likewise.
14503 (ix86_builtin_mpx_function): Likewise.
14504 (ix86_get_arg_address_for_bt): Likewise.
14505 (ix86_load_bounds): Likewise.
14506 (ix86_store_bounds): Likewise.
14507 (ix86_load_returned_bounds): Likewise.
14508 (ix86_store_returned_bounds): Likewise.
14509 (ix86_class_likely_spilled_p): Likewise.
14510 (ix86_hard_regno_mode_ok): Likewise.
14511 (x86_order_regs_for_local_alloc): Likewise.
14512 (ix86_mitigate_rop): Likewise.
14513 (ix86_bnd_prefixed_insn_p): Likewise.
14514 (ix86_mpx_bound_mode): Likewise.
14515 (ix86_make_bounds_constant): Likewise.
14516 (ix86_initialize_bounds): Likewise.
14517 (TARGET_LOAD_BOUNDS_FOR_ARG): Likewise.
14518 (TARGET_STORE_BOUNDS_FOR_ARG): Likewise.
14519 (TARGET_LOAD_RETURNED_BOUNDS): Likewise.
14520 (TARGET_STORE_RETURNED_BOUNDS): Likewise.
14521 (TARGET_CHKP_BOUND_MODE): Likewise.
14522 (TARGET_BUILTIN_CHKP_FUNCTION): Likewise.
14523 (TARGET_CHKP_FUNCTION_VALUE_BOUNDS): Likewise.
14524 (TARGET_CHKP_MAKE_BOUNDS_CONSTANT): Likewise.
14525 (TARGET_CHKP_INITIALIZE_BOUNDS): Likewise.
14526 * config/i386/i386.h (TARGET_MPX): Likewise.
14527 (TARGET_MPX_P): Likewise.
14528 (VALID_BND_REG_MODE): Likewise.
14529 (FIRST_BND_REG): Likewise.
14530 (LAST_BND_REG): Likewise.
14531 (enum reg_class): Likewise.
14532 (BND_REG_P): Likewise.
14533 (BND_REGNO_P): Likewise.
14534 (BNDmode): Likewise.
14535 (ADJUST_INSN_LENGTH): Likewise.
14536 * config/i386/i386.md: Likewise.
14537 * config/i386/i386.opt: Likewise.
14538 * config/i386/linux-common.h (LIBMPX_LIBS): Likewise.
14539 (defined): Likewise.
14540 (LINK_MPX): Likewise.
14541 (MPX_SPEC): Likewise.
14542 (LIBMPX_SPEC): Likewise.
14543 (LIBMPXWRAPPERS_SPEC): Likewise.
14544 (CHKP_SPEC): Likewise.
14545 * config/i386/predicates.md: Likewise.
14546 * dbxout.c (dbxout_type): Likewise.
14547 * doc/extend.texi: Likewise.
14548 * doc/invoke.texi: Likewise.
14549 * doc/md.texi: Likewise.
14550 * doc/tm.texi: Likewise.
14551 * doc/tm.texi.in: Likewise.
14552 * dwarf2out.c (is_base_type): Likewise.
14553 (gen_formal_types_die): Likewise.
14554 (gen_subprogram_die): Likewise.
14555 (gen_type_die_with_usage): Likewise.
14556 (gen_decl_die): Likewise.
14557 (dwarf2out_late_global_decl): Likewise.
14558 * expr.c (expand_assignment): Likewise.
14559 (emit_storent_insn): Likewise.
14560 (store_expr_with_bounds): Likewise.
14561 (store_expr): Likewise.
14562 (expand_expr_real_1): Likewise.
14563 * expr.h (store_expr_with_bounds): Likewise.
14564 * function.c (use_register_for_decl): Likewise.
14565 (struct bounds_parm_data): Likewise.
14566 (assign_parms_augmented_arg_list): Likewise.
14567 (assign_parm_find_entry_rtl): Likewise.
14568 (assign_parm_is_stack_parm): Likewise.
14569 (assign_parm_load_bounds): Likewise.
14570 (assign_bounds): Likewise.
14571 (assign_parms): Likewise.
14572 (expand_function_start): Likewise.
14573 * gcc.c (CHKP_SPEC): Likewise.
14574 * gimple-fold.c (gimple_fold_builtin_memory_op): Likewise.
14575 * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Likewise.
14576 (wrestrict_dom_walker::check_call): Likewise.
14577 * gimple.c (gimple_build_call_from_tree): Likewise.
14578 * gimple.h (enum gf_mask): Likewise.
14579 (gimple_call_with_bounds_p): Likewise.
14580 (gimple_call_set_with_bounds): Likewise.
14581 * gimplify.c (gimplify_init_constructor): Likewise.
14582 * ipa-cp.c (initialize_node_lattices): Likewise.
14583 (propagate_constants_across_call): Likewise.
14584 (find_more_scalar_values_for_callers_subset): Likewise.
14585 * ipa-hsa.c (process_hsa_functions): Likewise.
14586 * ipa-icf-gimple.c (func_checker::compare_gimple_call): Likewise.
14587 * ipa-icf.c (sem_function::merge): Likewise.
14588 * ipa-inline.c (early_inliner): Likewise.
14589 * ipa-pure-const.c (warn_function_noreturn): Likewise.
14590 (warn_function_cold): Likewise.
14591 (propagate_pure_const): Likewise.
14592 * ipa-ref.h (enum GTY): Likewise.
14593 * ipa-split.c (find_retbnd): Likewise.
14594 (consider_split): Likewise.
14595 (split_function): Likewise.
14596 * ipa-visibility.c (cgraph_externally_visible_p): Likewise.
14597 * ipa.c (walk_polymorphic_call_targets): Likewise.
14598 (symbol_table::remove_unreachable_nodes): Likewise.
14599 (process_references): Likewise.
14600 (cgraph_build_static_cdtor_1): Likewise.
14601 * lto-cgraph.c (lto_output_node): Likewise.
14602 (output_refs): Likewise.
14603 (compute_ltrans_boundary): Likewise.
14604 (input_overwrite_node): Likewise.
14605 (input_node): Likewise.
14606 (input_cgraph_1): Likewise.
14607 * params.def (PARAM_CHKP_MAX_CTOR_SIZE): Likewise.
14608 * passes.c (pass_manager::execute_early_local_passes): Likewise.
14609 (class pass_chkp_instrumentation_passes): Likewise.
14610 (make_pass_chkp_instrumentation_passes): Likewise.
14611 * passes.def: Likewise.
14612 * rtl.h (struct GTY): Likewise.
14613 (CALL_EXPR_WITH_BOUNDS_P): Likewise.
14614 * stor-layout.c (layout_type): Likewise.
14615 * symtab.c: Likewise.
14616 * target.def: Likewise.
14617 * targhooks.c (default_chkp_bound_type): Likewise.
14618 (default_chkp_bound_mode): Likewise.
14619 (default_builtin_chkp_function): Likewise.
14620 (default_chkp_function_value_bounds): Likewise.
14621 (default_chkp_make_bounds_constant): Likewise.
14622 (default_chkp_initialize_bounds): Likewise.
14623 * targhooks.h (default_chkp_bound_type): Likewise.
14624 (default_chkp_bound_mode): Likewise.
14625 (default_builtin_chkp_function): Likewise.
14626 (default_chkp_function_value_bounds): Likewise.
14627 (default_chkp_make_bounds_constant): Likewise.
14628 (default_chkp_initialize_bounds): Likewise.
14629 * toplev.c (compile_file): Likewise.
14630 (process_options): Likewise.
14631 * tree-core.h (DEF_BUILTIN): Likewise.
14632 (DEF_BUILTIN_CHKP): Likewise.
14633 * tree-inline.c (declare_return_variable): Likewise.
14634 (remap_gimple_stmt): Likewise.
14635 (copy_bb): Likewise.
14636 (initialize_inlined_parameters): Likewise.
14637 (expand_call_inline): Likewise.
14638 * tree-pass.h (make_pass_ipa_chkp_versioning): Likewise.
14639 (make_pass_ipa_chkp_early_produce_thunks): Likewise.
14640 (make_pass_ipa_chkp_produce_thunks): Likewise.
14641 (make_pass_chkp): Likewise.
14642 (make_pass_chkp_opt): Likewise.
14643 (make_pass_chkp_instrumentation_passes): Likewise.
14644 * tree-pretty-print.c (dump_generic_node): Likewise.
14645 * tree-ssa-ccp.c (insert_clobber_before_stack_restore): Likewise.
14646 * tree-ssa-dce.c (propagate_necessity): Likewise.
14647 (eliminate_unnecessary_stmts): Likewise.
14648 * tree-ssa-pre.c (create_expression_by_pieces): Likewise.
14649 * tree-ssa-sccvn.c (copy_reference_ops_from_call): Likewise.
14650 * tree-ssa-sccvn.h: Likewise.
14651 * tree-ssa-strlen.c (get_string_length): Likewise.
14652 (valid_builtin_call): Likewise.
14653 (adjust_last_stmt): Likewise.
14654 (handle_builtin_strchr): Likewise.
14655 (handle_builtin_strcpy): Likewise.
14656 (handle_builtin_stxncpy): Likewise.
14657 (handle_builtin_memcpy): Likewise.
14658 (handle_builtin_strcat): Likewise.
14659 (strlen_check_and_optimize_stmt): Likewise.
14660 * tree-stdarg.c (expand_ifn_va_arg_1): Likewise.
14661 * tree-streamer-in.c: Likewise.
14662 * tree-streamer.c (record_common_node): Likewise.
14663 * tree.c (tree_code_size): Likewise.
14664 (wide_int_to_tree_1): Likewise.
14665 (type_contains_placeholder_1): Likewise.
14666 (build_common_tree_nodes): Likewise.
14667 * tree.def (POINTER_BOUNDS_TYPE): Likewise.
14668 * tree.h (POINTER_BOUNDS_TYPE_P): Likewise.
14669 (POINTER_BOUNDS_P): Likewise.
14670 (BOUNDED_TYPE_P): Likewise.
14671 (BOUNDED_P): Likewise.
14672 (CALL_WITH_BOUNDS_P): Likewise.
14673 (pointer_bounds_type_node): Likewise.
14674 * value-prof.c (gimple_ic): Likewise.
14675 * var-tracking.c (vt_add_function_parameters): Likewise.
14676 * varasm.c (make_decl_rtl): Likewise.
14677 (assemble_start_function): Likewise.
14678 (output_constant): Likewise.
14679 (maybe_assemble_visibility): Likewise.
14680 * varpool.c (ctor_for_folding): Likewise.
14681 * chkp-builtins.def: Remove.
14682 * ipa-chkp.c: Remove.
14683 * ipa-chkp.h: Remove.
14684 * rtl-chkp.c: Remove.
14685 * rtl-chkp.h: Remove.
14686 * tree-chkp-opt.c: Remove.
14687 * tree-chkp.c: Remove.
14688 * tree-chkp.h: Remove.
14690 2018-06-07 Carl Love <cel@us.ibm.com>
14692 * config/rs6000/vsx.md (vextract_fp_from_shorth,
14693 vextract_fp_from_shortl): Add BE support.
14695 2018-06-07 Paul Koning <ni1d@arrl.net>
14697 * compare-elim.c (try_merge_compare): Don't merge compare if
14698 address contains a side effect.
14699 (try_eliminate_compare): Likewise.
14701 2018-06-07 Olga Makhotina <olga.makhotina@intel.com>
14703 * config.gcc: Support "tremont".
14704 * config/i386/driver-i386.c (host_detect_local_cpu): Detect "tremont".
14705 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
14707 * config/i386/i386.c (m_TREMONT): Define.
14708 (processor_target_table): Add "tremont".
14709 (PTA_TREMONT): Define.
14710 (ix86_lea_outperforms): Add TARGET_TREMONT.
14711 (get_builtin_code_for_version): Handle PROCESSOR_TREMONT.
14712 (fold_builtin_cpu): Add M_INTEL_TREMONT, replace M_INTEL_GOLDMONT
14713 and M_INTEL_GOLDMONT_PLUS.
14714 (fold_builtin_cpu): Add "tremont".
14715 (ix86_add_stmt_cost): Add TARGET_TREMONT.
14716 (ix86_option_override_internal): Add "tremont".
14717 * config/i386/i386.h (processor_costs): Define TARGET_TREMONT.
14718 (processor_type): Add PROCESSOR_TREMONT.
14719 * config/i386/x86-tune.def: Add m_TREMONT.
14720 * doc/invoke.texi: Add tremont as x86 -march=/-mtune= CPU type.
14722 2018-06-07 Jozef Lawrynowicz <jozef.l@mittosystems.com>
14724 * config/msp430/msp430.c (msp430_mcu_name): Set the "i" in the
14725 symbol defined for msp430i* devices to be lower case.
14727 2018-06-07 Richard Biener <rguenther@suse.de>
14729 * graphite-sese-to-poly.c (extract_affine): Avoid unneded
14730 wrapping. Properly wrap the result of a BIT_NOT_EXPR.
14731 Properly wrap signed arithmetic if overflow wraps.
14733 2018-06-07 Jakub Jelinek <jakub@redhat.com>
14735 PR tree-optimization/69615
14736 * tree-ssa-reassoc.c (optimize_range_tests_var_bound): If rhs2 is lhs
14737 of a cast from a same precision integral SSA_NAME in a bb dominated
14738 by first_bb, retry with rhs2 set to the rhs1 of the cast. Don't emit
14739 cast to utype if rhs2 has already a compatible type.
14741 2018-06-07 Richard Biener <rguenther@suse.de>
14743 PR tree-optimization/85935
14744 * graphite-scop-detection.c (find_params_in_bb): Analyze
14745 condition operands with respect to the correct loop. Assert
14746 the analysis doesn't fail.
14748 2018-06-04 Carl Love <cel@us.ibm.com>
14750 * config/rs6000/vsx.md (first_match_index_<mode>): Calculate index
14751 using natural element order. Use gen_lshrsi3 instead of gen_ashrsi3
14752 as it is slightly cheaper.
14753 (first_match_or_eos_index_<mode>):
14754 Calculate index using natural element order.
14755 (first_match_index_<mode>):
14756 Calculate index using natural element order.
14757 (first_match_or_eos_index_<mode>):
14758 Calculate index using natural order.
14759 (define_insn vclzlsbb): Change to define_insn vclzlsbb_<mode>.
14760 for BE and LE modes.
14761 * config/rs6000/rs6000-c.c: Rename P9V_BUILTIN_VCLZLSBB,
14762 P9V_BUILTIN_VCLZLSBB_V16QI.
14763 * config/rs6000/rs6000-builtin.def: Make VCLZLSBB mode
14766 2018-06-06 Kelvin Nilsen <kelvin@gcc.gnu.org>
14768 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Adjust
14769 indentation and line wrap for many prototypes. Add missing
14770 @smallexample directives around block of prototypes for vec_xl and
14773 2018-06-05 Michael Meissner <meissner@linux.ibm.com>
14775 * config/rs6000/rs6000.c (rs6000_passes_ieee128): New boolean to
14776 track if we pass or return IEEE 128-bit floating point.
14777 (ieee128_mangling_gcc_8_1): New boolean to say whether to generate
14778 C++ mangling that is compatible with GCC 8.1.
14779 (TARGET_ASM_GLOBALIZE_DECL_NAME): Override target hook.
14780 (init_cumulative_args): Note if we pass or return IEEE 128-bit
14781 floating point types.
14782 (rs6000_function_arg_advance_1): Likewise.
14783 (rs6000_mangle_type): Optionally generate mangled names that match
14784 what GCC 8.1 generated for IEEE 128-bit floating point types.
14785 (rs6000_globalize_decl_name): If we have an external function that
14786 passes or returns IEEE 128-bit types, generate a weak reference
14787 from the mangled name used in GCC 8.1 to the current mangled
14789 (rs6000_init_builtins): Make __ibm128 use the long double type if
14790 long double is IBM extended double. Make __float128 use the long
14791 double type if long double is IEEE 128-bit.
14794 * config/rs6000/rs6000-builtin.def (BU_IBM128_2): New helper
14795 macro for __ibm128 built-in functions.
14796 (PACK_IF): Add __ibm128 pack/unpack functions.
14797 (UNPACK_IF): Likewise.
14798 * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Do not
14799 enable long double built-in functions if long double is IEEE
14800 128-bit floating point.
14801 (rs6000_invalid_builtin): Update long double built-in function
14803 (rs6000_expand_builtin): For PACK_IF and UNPACK_IF built-in
14804 functions, adjust the built-in function to use the long double
14805 built-in function if __ibm128 and long double are the same type.
14806 * doc/extend.texi (PowerPC builtins): Update documention for
14807 __builtin_{,un}pack_longdouble. Add documentation for
14808 __builtin_{,un}pack_ibm128.
14810 2018-06-06 Jim Wilson <jimw@sifive.com>
14812 * config/riscv/riscv.c (enum riscv_privilege_levels): New.
14813 (struct machine_function): New field interrupt_mode.
14814 (riscv_handle_type_attribute): New function. Add forward declaration.
14815 (riscv_attribute_table) <interrupt>: Use riscv_handle_type_attribute.
14816 (riscv_expand_epilogue): Check interrupt_mode field.
14817 (riscv_set_current_function): Check interrupt attribute args and
14818 set interrupt_mode field.
14819 * config/riscv/riscv.md (UNSPECV_SRET, UNSPECV_URET): New.
14820 (riscv_sret, riscv_uret): New.
14821 * doc/extend.texi (RISC-V Function Attributes) <interrupt>: Document
14822 new arguments to interrupt attribute.
14824 2018-06-06 Peter Bergner <bergner@vnet.ibm.com>
14827 * /config/rs6000/rs6000.h (ASM_CPU_SPEC): Add support for -mpower9.
14828 Don't handle -mcpu=power8 if -mpower9-vector is also used.
14830 2018-06-06 Kelvin Nilsen <kelvin@gcc.gnu.org>
14832 * config/rs6000/rs6000-builtin.def (VSX_BUILTIN_VEC_LD,
14833 VSX_BUILTIN_VEC_ST): Add comment to explain non-traditional uses.
14834 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
14835 several redundant entries.
14837 2018-06-06 David Malcolm <dmalcolm@redhat.com>
14839 * config/i386/i386-protos.h (ix86_expand_call): Strengthen return
14840 type from "rtx" to "rtx_insn *".
14841 * config/i386/i386.c (ix86_expand_split_stack_prologue): Likewise
14842 for local "call_insn", removing cast.
14843 (ix86_expand_call): Likewise, introducing a "call_insn" local.
14845 2018-06-06 Eric Botcazou <ebotcazou@adacore.com>
14847 PR tree-optimization/86066
14848 * gimple-ssa-store-merging.c (process_store): Do not bypass BIT_NOT_EXPR
14849 for BIT_INSERT_EXPR stores.
14851 2018-06-06 Richard Biener <rguenther@suse.de>
14853 PR tree-optimization/86062
14854 * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
14855 component refs ontop
14856 of to be offsetted base.
14858 2018-06-06 Jozef Lawrynowicz <jozef.l@mittosystems.com>
14860 * config/msp430/msp430.c (msp430_attr): Allow interrupt handlers
14861 to be static and remove check on interrupt attribute name.
14863 2018-06-05 Kelvin Nilsen <kelvin@gcc.gnu.org>
14865 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
14866 volatile qualifier from vec_lvsl and vec_lvsr argument prototypes.
14868 2018-06-05 Steve Ellcey <sellcey@cavium.com>
14871 * config/aarch64/aarch64-protos.h (aarch64_err_no_fpadvsimd): Remove
14873 * config/aarch64/aarch64-protos..c (aarch64_err_no_fpadvsimd):
14874 Remove second argument, change how error is called.
14875 (aarch64_layout_arg): Remove second argument from
14876 aarch64_err_no_fpadvsimd call.
14877 (aarch64_init_cumulative_args): Ditto.
14878 (aarch64_gimplify_va_arg_expr): Ditto.
14879 * config/aarch64/aarch64.md (mov<mode>): Ditto.
14881 2018-06-05 Uros Bizjak <ubizjak@gmail.com>
14883 * config/i386/i386.md (simple_return_indirect_internal): New expander.
14884 (*simple_return_indirect_internal<mode>): Rename from
14885 simple_return_indirect_internal. Use W mode iterator.
14886 (rstorssp): New expander.
14887 (*rstorssp<mode>): Rename from rstorssp. Use P mode iterator.
14888 (clrssbsy): New expander.
14889 (*clrssbsy<mode>): Rename from clrssbsy. Use P mode iterator.
14891 2018-06-05 Andre Vieira <andre.simoesdiasvieira@arm.com>
14893 * config/arm/arm_cmse.h (cmse_nsfptr_create): Change typeof to
14895 (cmse_check_pointed_object): Likewise.
14897 2018-06-05 Martin Liska <mliska@suse.cz>
14899 PR gcov-profile/47618
14900 * doc/invoke.texi: Document how -fprofile-dir format
14903 2018-06-05 Richard Biener <rguenther@suse.de>
14905 * tree-cfgcleanup.c (cleanup_control_flow_pre): For edge
14906 removal pretend DOM info isn't available so we do not update
14907 it and only remove edges, not dominated blocks. Actually free
14908 DOM info in case we removed something. Remove unreachable blocks.
14909 (mfb_keep_latches): Work with either DOM info or marked backedges.
14910 (cleanup_tree_cfg_noloop): Do not remove unreachable blocks
14911 first. Mark backedges if DOM info isn't available.
14912 (Re-)compute DOM info after cleanup_control_flow_pre.
14914 2018-06-05 Richard Biener <rguenther@suse.de>
14916 * tree-cfg.c (struct locus_discrim_map): Store line, not location.
14917 (locus_discrim_hasher::hash): Adjust.
14918 (locus_discrim_hasher::equal): Likewise.
14919 (next_discriminator_for_locus): Work on line directly.
14920 (same_line_p): Pass in expanded locus1 as well.
14921 (assign_discriminators): Avoid redundant location expansions.
14923 2018-06-05 Richard Biener <rguenther@suse.de>
14925 PR tree-optimization/86046
14926 * tree-ssa.c (maybe_optimize_var): Clear DECL_GIMPLE_REG_P
14927 if required after clearing TREE_ADDRESSABLE.
14929 2018-06-05 Richard Biener <rguenther@suse.de>
14931 PR tree-optimization/86047
14932 * tree-ssa-loop.c (for_each_index): Glob handling of all
14933 decls and constants and really handle all of them.
14935 2018-06-05 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
14938 * config/arm/arm-builtins.c (arm_type_qualifiers): Add
14939 qualifier_void_pointer and qualifier_const_void_pointer.
14940 (arm_ldc_qualifiers, arm_stc_qualifiers): Use the above.
14941 (arm_init_builtins): Handle the above.
14942 * config/arm/arm_acle.h (__arm_cdp, __arm_ldc, __arm_ldcl, __arm_stc,
14943 __arm_stcl, __arm_mcr, __arm_cdp2, __arm_ldc2, __arm_ldcl2, __arm_stc2,
14944 __arm_stcl2,__arm_mcr2, __arm_mcrr, __arm_mcrr2): Remove return for
14947 2018-06-05 Martin Liska <mliska@suse.cz>
14949 * auto-profile.c (read_autofdo_file): Do not use
14950 gcov_ctr_summary struct.
14951 (afdo_callsite_hot_enough_for_early_inline): Likewise.
14952 * coverage.c (struct counts_entry): Likewise.
14953 (read_counts_file): Read just single summary entry.
14954 (get_coverage_counts): Use gcov_summary struct.
14955 * coverage.h (get_coverage_counts): Likewise.
14956 * gcov-dump.c (dump_working_sets): Likewise.
14957 (tag_summary): Dump just single summary.
14958 * gcov-io.c (gcov_write_summary): Write just histogram
14960 (gcov_read_summary): Read just single summary.
14961 (compute_working_sets): Use gcov_summary struct.
14962 * gcov-io.h (GCOV_TAG_SUMMARY_LENGTH): Remove usage
14963 of GCOV_COUNTERS_SUMMABLE.
14964 (GCOV_COUNTERS_SUMMABLE): Remove.
14965 (GCOV_FIRST_VALUE_COUNTER): Replace with
14966 GCOV_COUNTER_V_INTERVAL.
14967 (struct gcov_ctr_summary): Remove.
14968 (struct gcov_summary): Directly use fields of former
14970 (compute_working_sets): Use gcov_summary struct.
14971 * gcov.c (read_count_file): Do not use ctrs fields.
14972 * lto-cgraph.c (merge_profile_summaries): Use gcov_summary
14974 * lto-streamer.h (struct GTY): Make profile_info gcov_summary
14976 * profile.c: Likewise.
14977 * profile.h: Likewise.
14979 2018-06-05 Martin Liska <mliska@suse.cz>
14981 PR gcov-profile/84846
14982 * gcov.c (output_lines): Print working directory only
14983 in intermediate format.
14985 2018-06-05 Andreas Krebbel <krebbel@linux.ibm.com>
14987 * config/s390/s390-builtin-types.def: Add void function type.
14988 * config/s390/s390-builtins.def: Use the function type for the
14991 2018-06-04 Jim Wilson <jimw@sifive.com>
14993 * config/riscv/riscv-protos.h (riscv_expand_epilogue): Change bool arg
14995 * config/riscv/riscv.c (riscv_for_each_saved_reg): New args epilogue
14996 and maybe_eh_return. Change regno to unsigned int. Use new args to
14997 handle EH_RETURN_DATA_REGNO registers properly.
14998 (riscv_expand_prologue): Pass new args to riscv_for_each_saved_reg.
14999 (riscv_expand_epilogue): Update comment. Change argument name and
15000 type. Update code to use new name and type. Pass new args to
15001 riscv_for_each_saved_reg. Only use EH_RETURN_STACKADJ_RTX when
15003 * config/riscv/riscv.md (NORMAL_RETURN): New.
15004 (SIBCALL_RETURN, EXCEPTION_RETURN): New.
15005 (epilogue, sibcall_epilogue): Update riscv_expand_epilogue arg.
15006 (eh_return): Call gen_eh_return_internal and emit barrier.
15007 (eh_return_internal): Call riscv_expand_epilogue.
15009 2018-06-04 Eric Botcazou <ebotcazou@adacore.com>
15011 * gimple-ssa-store-merging.c (struct merged_store_group): Move up
15012 bit_insertion field and declare can_be_merged_into method.
15013 (merged_store_group::can_be_merged_into): New method.
15014 (imm_store_chain_info::coalesce_immediate): Call it to decide whether
15015 consecutive non-overlapping stores can be merged. Turn MEM_REF stores
15016 into BIT_INSERT_EXPR stores if the group contains a non-MEM_REF store.
15018 2018-06-04 Richard Biener <rguenther@suse.de>
15020 PR tree-optimization/85955
15021 * builtins.c (fold_builtin_sincos): Convert pointers to
15022 destination to appropriate type before dereferencing.
15024 2018-06-04 Segher Boessenkool <segher@kernel.crashing.org>
15026 * config/rs6000/rs6000.md (abs<mode>2 for FLOAT128): Handle IFmode.
15028 2018-06-04 Richard Sandiford <richard.sandiford@linaro.org>
15030 * expr.c (expand_expr_real_1): Force the operand into memory if
15031 its TYPE_MODE is BLKmode and if there is no integer mode for
15032 the number of bits being extracted.
15034 2018-06-04 Jakub Jelinek <jakub@redhat.com>
15038 * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
15039 Use vptestnm rather than vptestm in (=Yc,v,C) variant.
15041 2018-06-04 Richard Biener <rguenther@suse.de>
15043 * tree-cfgcleanup.c (cleanup_tree_cfg_1): Fold into...
15044 (cleanup_tree_cfg_noloop): ... single caller. Do
15045 start_recording_case_labels later.
15047 2018-06-04 Sebastian Peryt <sebastian.peryt@intel.com>
15049 * config/i386/cldemoteintrin.h: Change define from _X86INTRIN_H_INCLUDED
15050 to _IMMINTRIN_H_INCLUDED.
15051 * config/i386/pconfigintrin.h: Ditto.
15052 * config/i386/waitpkgintrin.h: Ditto.
15053 * config/i386/immintrin.h: Add includes for sgxintrin.h,
15054 pconfigintrin.h, waitpkgintrin.h and cldemoteintrin.h.
15055 * config/i386/x86intrin.h: Remove includes for mintrin.h, xmmintrin.h,
15056 emmintrin.h, pmmintrin.h, tmmintrin.h, smmintrin.h, wmmintrin.h,
15057 bmiintrin.h, bmi2intrin.h, lzcntintrin.h, sgxintrin.h, pconfigintrin.h,
15058 waitpkgintrin.h and cldemoteintrin.h.
15060 2018-06-04 Richard Biener <rguenther@suse.de>
15062 PR tree-optimization/86038
15063 * tracer.c (find_best_successor): Check probability for
15064 being initialized, bail out if not.
15066 2018-06-04 Richard Earnshaw <rearnsha@arm.com>
15069 * config/arm/arm-cpus.in (ALL_QUIRKS): Add xscale feature to the list
15070 of bits to ignore when comparing architectures.
15072 2018-06-04 Jakub Jelinek <jakub@redhat.com>
15074 PR tree-optimization/69615
15075 * fold-const.c (merge_ranges): If range1 is - [x, x] and x is the
15076 maximum or minimum of the type, try to merge it also as if
15077 range1 is + [-, x - 1] or + [x + 1, -].
15080 * tree.c (inchash::add_expr): Handle IDENTIFIER_NODE.
15082 2018-06-03 Eric Botcazou <ebotcazou@adacore.com>
15084 PR tree-optimization/86034
15085 * gimple-ssa-store-merging.c (output_merged_store): Convert the RHS to
15086 the unsigned bitfield type in a bit insertion sequence if it does not
15087 have a larger precision than the bitfield size.
15088 (process_store): Also bypass widening conversions for BIT_INSERT_EXPR.
15090 2018-06-03 Kito Cheng <kito.cheng@gmail.com>
15092 * config/nds32/nds32-peephole2.md: Add new patterns for code size.
15094 2018-06-03 Chung-Ju Wu <jasonwucj@gmail.com>
15096 * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3J.
15097 * config/nds32/nds32.c (nds32_option_override): Consider ARCH_V3J.
15098 * config/nds32/nds32.h (TARGET_ISA_V3): Add ARCH_V3J checking.
15099 * config/nds32/nds32.opt (march): Add enum value Value(ARCH_V3J).
15101 2018-06-03 Chung-Ju Wu <jasonwucj@gmail.com>
15103 * common/config/nds32/nds32-common.c (nds32_option_optimization_table):
15104 Disable -fdelete-null-pointer-checks for ELF toolchain.
15106 2018-06-02 Chung-Ju Wu <jasonwucj@gmail.com>
15107 Kito Cheng <kito.cheng@gmail.com>
15109 * config.gcc (nds32*): Use nds32-linux.opt and nds32-elf.opt.
15110 (nds32le-*-*, nds32be-*-*): Integrate checking process.
15111 (nds32*-*-*): Add glibc and uclibc conditions.
15112 * common/config/nds32/nds32-common.c (nds32_except_unwind_info): New.
15113 (TARGET_EXCEPT_UNWIND_INFO): Define.
15114 * config/nds32/elf.h: New file.
15115 * config/nds32/linux.h: New file.
15116 * config/nds32/nds32-elf.opt: New file.
15117 * config/nds32/nds32-linux.opt: New file.
15118 * config/nds32/nds32-fp-as-gp.c
15119 (pass_nds32_fp_as_gp::gate): Consider TARGET_LINUX_ABI.
15120 * config/nds32/nds32.c (nds32_conditional_register_usage): Consider
15122 (nds32_asm_file_end): Ditto.
15123 (nds32_print_operand): Ditto.
15124 (nds32_insert_attributes): Ditto.
15125 (nds32_init_libfuncs): New function.
15126 (TARGET_HAVE_TLS): Define.
15127 (TARGET_INIT_LIBFUNCS): Define.
15128 * config/nds32/nds32.h (TARGET_DEFAULT_RELAX): Apply different relax
15130 (TARGET_ELF): Apply different mcmodel setting.
15131 (LINK_SPEC, LIB_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): The content has
15132 been migrated into elf.h and linux.h files.
15133 * config/nds32/nds32.md (add_pc): Consider TARGET_LINUX_ABI.
15134 * config/nds32/nds32.opt (mvh): Consider TARGET_LINUX_ABI.
15135 (mcmodel): The content has been migrated into nds32-elf.opt and
15136 nds32-linux.opt files.
15137 * config/nds32/t-elf: New file.
15138 * config/nds32/t-linux: New file.
15140 2018-06-02 Chung-Ju Wu <jasonwucj@gmail.com>
15141 Shiva Chen <shiva0217@gmail.com>
15143 * config/nds32/constants.md (unspec_volatile_element): Add
15144 UNSPEC_VOLATILE_OMIT_FP_BEGIN and UNSPEC_VOLATILE_OMIT_FP_END.
15145 * config/nds32/nds32-fp-as-gp.c: New implementation of fp_as_gp
15147 * config/nds32/nds32-protos.h (nds32_naked_function_p): Declare.
15148 (make_pass_nds32_fp_as_gp): Declare.
15149 * config/nds32/nds32.c (nds32_register_passes): Add fp_as_gp as one
15151 (nds32_asm_function_end_prologue): Remove unused asm output.
15152 (nds32_asm_function_begin_epilogue): Remove unused asm output.
15153 (nds32_asm_file_start): Output necessary fp_as_gp information.
15154 (nds32_option_override): Adjust register usage.
15155 (nds32_expand_prologue): Consider fp_as_gp situation.
15156 (nds32_expand_prologue_v3push): Consider fp_as_gp situation.
15157 * config/nds32/nds32.md (prologue): Check fp_as_gp_p and naked_p.
15160 (simple_return): Ditto.
15161 (omit_fp_begin): Output special directive for fp_as_gp.
15162 (omit_fp_end): Output special directive for fp_as_gp.
15163 * config/nds32/nds32.opt (mfp-as-gp, mno-fp-as-gp, mforce-fp-as-gp,
15164 mforbid-fp-as-gp): New options.
15166 2018-06-01 Mark Wielaard <mark@klomp.org>
15168 * dwarf2out.c (dwarf2out_finish): Remove generation of
15169 DW_AT_loclists_base.
15171 2018-06-01 Eric Botcazou <ebotcazou@adacore.com>
15173 * gimple-ssa-store-merging.c: Include gimple-fold.h.
15174 (struct store_immediate_info): Document BIT_INSERT_EXPR stores.
15175 (struct merged_store_group): Add bit_insertion field.
15176 (dump_char_array): Use standard hexadecimal format.
15177 (merged_store_group::merged_store_group): Set bit_insertion to false.
15178 (merged_store_group::apply_stores): Use optimal buffer size. Deal
15179 with BIT_INSERT_EXPR stores. Move up code updating the mask and
15180 also print the mask in the dump file.
15181 (pass_store_merging::gate): Minor tweak.
15182 (imm_store_chain_info::coalesce_immediate): Fix wrong association
15183 of stores with groups in dump. Allow coalescing of BIT_INSERT_EXPR
15184 stores with INTEGER_CST stores.
15185 (count_multiple_uses) <BIT_INSERT_EXPR>: New case.
15186 (imm_store_chain_info::output_merged_store): Add try_bitpos variable
15187 and use it throughout. Generate bit insertion sequences if need be.
15188 (pass_store_merging::process_store): Remove redundant condition.
15189 Record stores from a SSA name to a bit-field with BIT_INSERT_EXPR.
15191 2018-06-01 Segher Boessenkool <segher@kernel.crashing.org>
15193 * config/rs6000/rs6000.c (rs6000_mangle_type): Change the mangling of
15194 the 128-bit floating point types. Fix function comment.
15196 2018-06-01 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
15198 * config/aarch64/aarch64-simd.md
15199 (aarch64_simd_vec_unpack<su>_lo_<mode>): Use UXTL and SXTL assembler
15201 (aarch64_simd_vec_unpack<su>_hi_<mode>): Use UXTL2 and SXTL2 assembler
15204 2018-06-01 Richard Sandiford <richard.sandiford@linaro.org>
15206 PR tree-optimization/85989
15207 * gimple-ssa-backprop.c (backprop::m_visited_phis): New member
15209 (backprop::intersect_uses): Check it when deciding whether this
15210 is a backedge reference.
15211 (backprop::process_block): Add each phi to m_visited_phis
15212 after visiting it, then clear it at the end.
15214 2018-06-01 Richard Biener <rguenther@suse.de>
15216 * tree-vectorizer.h (vect_dr_stmt): New function.
15217 (vect_get_load_cost): Adjust.
15218 (vect_get_store_cost): Likewise.
15219 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence):
15220 Use vect_dr_stmt instead of DR_SMTT.
15221 (vect_record_base_alignments): Likewise.
15222 (vect_calculate_target_alignment): Likewise.
15223 (vect_compute_data_ref_alignment): Likewise and make static.
15224 (vect_update_misalignment_for_peel): Likewise.
15225 (vect_verify_datarefs_alignment): Likewise.
15226 (vector_alignment_reachable_p): Likewise.
15227 (vect_get_data_access_cost): Likewise. Pass down
15228 vinfo to vect_get_load_cost/vect_get_store_cost instead of DR.
15229 (vect_get_peeling_costs_all_drs): Likewise.
15230 (vect_peeling_hash_get_lowest_cost): Likewise.
15231 (vect_enhance_data_refs_alignment): Likewise.
15232 (vect_find_same_alignment_drs): Likewise.
15233 (vect_analyze_data_refs_alignment): Likewise.
15234 (vect_analyze_group_access_1): Likewise.
15235 (vect_analyze_group_access): Likewise.
15236 (vect_analyze_data_ref_access): Likewise.
15237 (vect_analyze_data_ref_accesses): Likewise.
15238 (vect_vfa_segment_size): Likewise.
15239 (vect_small_gap_p): Likewise.
15240 (vectorizable_with_step_bound_p): Likewise.
15241 (vect_prune_runtime_alias_test_list): Likewise.
15242 (vect_analyze_data_refs): Likewise.
15243 (vect_supportable_dr_alignment): Likewise.
15244 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
15245 (vect_gen_prolog_loop_niters): Likewise.
15246 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
15247 * tree-vect-patterns.c (vect_recog_bool_pattern): Do not
15249 (vect_recog_mask_conversion_pattern): Likewise.
15250 (vect_try_gather_scatter_pattern): Likewise.
15251 * tree-vect-stmts.c (vect_model_store_cost): Pass stmt_info
15252 to vect_get_store_cost.
15253 (vect_get_store_cost): Get stmt_info instead of DR.
15254 (vect_model_load_cost): Pass stmt_info to vect_get_load_cost.
15255 (vect_get_load_cost): Get stmt_info instead of DR.
15257 2018-06-01 Richard Biener <rguenther@suse.de>
15259 PR middle-end/86017
15260 * gimple-fold.c (var_decl_component_p): Also allow offsetted
15261 vars wrapped in MEM_REFs.
15263 2018-06-01 Richard Sandiford <richard.sandiford@linaro.org>
15265 * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
15266 Fix subreg tests so that we only return a choice between
15267 GENERAL_REGS and FP_REGS if the original classes included both.
15269 2018-06-01 Richard Biener <rguenther@suse.de>
15272 * tree-ssa-structalias.c (get_function_part_constraint):
15273 Handle NULL fi->decl.
15274 (find_func_aliases_for_call): Properly handle indirect
15275 fi from direct call.
15276 (find_func_clobbers): Likewise.
15277 (ipa_pta_execute): Likewise.
15278 (create_variable_info_for): For functions that are ifunc_resolver
15279 resolve to a varinfo that contains the result of the resolver call.
15280 (associate_varinfo_to_alias): Do not treat ifunc resolvers as
15283 2018-05-31 Michael Collison <michael.collison@arm.com>
15285 * config/aarch64/aarch64.md:
15286 (*fix_to_zero_extenddfdi2): New pattern.
15287 * gcc.target/aarch64/fix_extend1.c: New testcase.
15289 2018-05-31 Qing Zhao <qing.zhao@oracle.com>
15291 PR middle-end/78809
15292 PR middle-end/83026
15293 * builtins.c (expand_builtin): Add the handling of BUILT_IN_STRCMP_EQ
15294 and BUILT_IN_STRNCMP_EQ.
15295 * builtins.def: Add new builtins BUILT_IN_STRCMP_EQ and
15296 BUILT_IN_STRNCMP_EQ.
15297 * gimple-fold.c (gimple_fold_builtin_string_compare): Add the
15298 handling of BUILTIN_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
15299 (gimple_fold_builtin): Likewise.
15300 * tree-ssa-strlen.c (compute_string_length): New function.
15301 (determine_min_obsize): New function.
15302 (handle_builtin_string_cmp): New function to handle calls to
15303 string compare functions.
15304 (strlen_optimize_stmt): Add handling to builtin string compare
15306 * tree-ssa-structalias.c (find_func_aliases_for_builtin_call):
15307 Add the handling of BUILT_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
15308 * tree.c (build_common_builtin_nodes): Add new defines of
15309 BUILT_IN_STRNCMP_EQ and BUILT_IN_STRCMP_EQ.
15311 2018-05-31 Jakub Jelinek <jakub@redhat.com>
15314 * bb-reorder.c (pass_partition_blocks::gate): Return false for
15315 functions with naked attribute.
15317 2018-05-31 Uros Bizjak <ubizjak@gmail.com>
15319 * config/i386/sse.md (avx_vec_concat<mode>):
15320 Substitute concat_tg_mode mode attribute with xtg_mode.
15321 (<mask_codefor>avx512dq_broadcast<mode><mask_name>_1): Ditto.
15322 (concat_tg_mode): Remove mode attribute.
15324 2018-05-31 Martin Sebor <msebor@redhat.com>
15327 * calls.c (alloc_max_size): Correct a logic error/typo.
15328 Treat excessive arguments as infinite. Warn for invalid arguments.
15329 * doc/invoke.texi (-Walloc-size-larger-than): Update.
15331 2018-05-31 H.J. Lu <hongjiu.lu@intel.com>
15334 * config/i386/x86-tune.def: Re-enable partial_reg_dependency
15335 and movx for Haswell.
15337 2018-05-31 Chung-Lin Tang <cltang@codesourcery.com>
15338 Cesar Philippidis <cesar@codesourcery.com>
15340 PR middle-end/85879
15341 * gimplify.c (gimplify_adjust_omp_clauses): Add 'remove = true'
15342 when emitting error on private/firstprivate reductions.
15343 * omp-low.c (lower_omp_target): Avoid reference-type processing
15344 on pointers for firstprivate clause.
15346 2018-05-31 Sameera Deshpande <sameera.deshpande@linaro.org>
15348 * config/aarch64/aarch64-simd-builtins.def (ld1x3): New.
15351 * config/aarch64/aarch64-simd.md
15352 (aarch64_ld1x3<VALLDIF:mode>): New pattern.
15353 (aarch64_ld1_x3_<mode>): Likewise
15354 (aarch64_st1x2<VALLDIF:mode>): Likewise
15355 (aarch64_st1_x2_<mode>): Likewise
15356 (aarch64_st1x3<VALLDIF:mode>): Likewise
15357 (aarch64_st1_x3_<mode>): Likewise
15358 * config/aarch64/arm_neon.h (vld1_u8_x3): New function.
15359 (vld1_s8_x3): Likewise.
15360 (vld1_u16_x3): Likewise.
15361 (vld1_s16_x3): Likewise.
15362 (vld1_u32_x3): Likewise.
15363 (vld1_s32_x3): Likewise.
15364 (vld1_u64_x3): Likewise.
15365 (vld1_s64_x3): Likewise.
15366 (vld1_f16_x3): Likewise.
15367 (vld1_f32_x3): Likewise.
15368 (vld1_f64_x3): Likewise.
15369 (vld1_p8_x3): Likewise.
15370 (vld1_p16_x3): Likewise.
15371 (vld1_p64_x3): Likewise.
15372 (vld1q_u8_x3): Likewise.
15373 (vld1q_s8_x3): Likewise.
15374 (vld1q_u16_x3): Likewise.
15375 (vld1q_s16_x3): Likewise.
15376 (vld1q_u32_x3): Likewise.
15377 (vld1q_s32_x3): Likewise.
15378 (vld1q_u64_x3): Likewise.
15379 (vld1q_s64_x3): Likewise.
15380 (vld1q_f16_x3): Likewise.
15381 (vld1q_f32_x3): Likewise.
15382 (vld1q_f64_x3): Likewise.
15383 (vld1q_p8_x3): Likewise.
15384 (vld1q_p16_x3): Likewise.
15385 (vld1q_p64_x3): Likewise.
15386 (vst1_s64_x2): Likewise.
15387 (vst1_u64_x2): Likewise.
15388 (vst1_f64_x2): Likewise.
15389 (vst1_s8_x2): Likewise.
15390 (vst1_p8_x2): Likewise.
15391 (vst1_s16_x2): Likewise.
15392 (vst1_p16_x2): Likewise.
15393 (vst1_s32_x2): Likewise.
15394 (vst1_u8_x2): Likewise.
15395 (vst1_u16_x2): Likewise.
15396 (vst1_u32_x2): Likewise.
15397 (vst1_f16_x2): Likewise.
15398 (vst1_f32_x2): Likewise.
15399 (vst1_p64_x2): Likewise.
15400 (vst1q_s8_x2): Likewise.
15401 (vst1q_p8_x2): Likewise.
15402 (vst1q_s16_x2): Likewise.
15403 (vst1q_p16_x2): Likewise.
15404 (vst1q_s32_x2): Likewise.
15405 (vst1q_s64_x2): Likewise.
15406 (vst1q_u8_x2): Likewise.
15407 (vst1q_u16_x2): Likewise.
15408 (vst1q_u32_x2): Likewise.
15409 (vst1q_u64_x2): Likewise.
15410 (vst1q_f16_x2): Likewise.
15411 (vst1q_f32_x2): Likewise.
15412 (vst1q_f64_x2): Likewise.
15413 (vst1q_p64_x2): Likewise.
15414 (vst1_s64_x3): Likewise.
15415 (vst1_u64_x3): Likewise.
15416 (vst1_f64_x3): Likewise.
15417 (vst1_s8_x3): Likewise.
15418 (vst1_p8_x3): Likewise.
15419 (vst1_s16_x3): Likewise.
15420 (vst1_p16_x3): Likewise.
15421 (vst1_s32_x3): Likewise.
15422 (vst1_u8_x3): Likewise.
15423 (vst1_u16_x3): Likewise.
15424 (vst1_u32_x3): Likewise.
15425 (vst1_f16_x3): Likewise.
15426 (vst1_f32_x3): Likewise.
15427 (vst1_p64_x3): Likewise.
15428 (vst1q_s8_x3): Likewise.
15429 (vst1q_p8_x3): Likewise.
15430 (vst1q_s16_x3): Likewise.
15431 (vst1q_p16_x3): Likewise.
15432 (vst1q_s32_x3): Likewise.
15433 (vst1q_s64_x3): Likewise.
15434 (vst1q_u8_x3): Likewise.
15435 (vst1q_u16_x3): Likewise.
15436 (vst1q_u32_x3): Likewise.
15437 (vst1q_u64_x3): Likewise.
15438 (vst1q_f16_x3): Likewise.
15439 (vst1q_f32_x3): Likewise.
15440 (vst1q_f64_x3): Likewise.
15441 (vst1q_p64_x3): Likewise.
15443 2018-05-30 Jozef Lawrynowicz <jozef.l@mittosystems.com>
15445 * config/msp430/msp430.c (msp430_output_labelref): Prepend
15446 user_label_prefix to name.
15448 * tree-core.h: Update comment about the format of NAME string
15449 passed to handler in attribute_spec.
15451 * config/msp430/msp430.md: Remove erroneous subreg expression from
15452 zero_extendqisi2 insn pattern. Remove msp430x ISA restriction on
15453 zero_extend{q,h}isi2.
15455 2018-05-30 Borislav Petkov <bp@suse.de>
15457 * doc/extend.texi: Document some architecture specific
15458 constraints and sort entries.
15460 2018-05-30 Martin Sebor <msebor@redhat.com>
15462 PR middle-end/85369
15463 * builtins.c (expand_builtin_stpcpy_1): New function.
15464 (expand_builtin_stpcpy): Call it, and call maybe_warn_nonstring_arg
15465 only if the former succeeds.
15467 2018-05-31 Sameera Deshpande <sameera.deshpande@linaro.org>
15469 * config/aarch64/aarch64-cores.def (saphira) : Add support for ARMv8.4
15472 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
15474 * doc/invoke.texi (-flinker-output): Document
15476 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
15478 * passes.c (ipa_write_summaries): Only modify statements if body
15480 * cgraphunit.c (ipa_passes): Also produce intermeidate code when
15481 incrementally linking.
15482 (ipa_passes): Likewise.
15483 * lto-cgraph.c (lto_output_node): When incrementally linking do not
15484 pass down resolution info.
15485 * common.opt (flag_incremental_link): Update info.
15486 * gcc.c (plugin specs): Turn flinker-output=* to
15487 -plugin-opt=-linker-output-known
15488 * toplev.c (compile_file): Also cut compilation when doing incremental
15490 * flag-types. (enum lto_partition_model): Add
15491 LTO_LINKER_OUTPUT_NOLTOREL.
15492 (invoke.texi): Add -flinker-output docs.
15493 * ipa.c (symbol_table::remove_unreachable_nodes): Handle LTO incremental
15494 link same way as WPA; do not stream in dead initializers.
15496 * dwarf2out.c (dwarf2out_die_ref_for_decl,
15497 darf2out_register_external_decl): Support incremental link.
15499 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
15501 * lto-opts.c (lto_write_options): Skip OPT_dumpdir, OPT_fresolution_.
15503 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
15505 * lto-wrapper.c (debug_objcopy): Add rename parameter; pass
15506 it down to simple_object_copy_lto_debug_sections.
15507 (run_gcc): Determine incremental LTO link time and configure
15508 lto1 into non-wpa mode, disable renaming of debug sections.
15510 2018-05-30 Kelvin Nilsen <kelvin@gcc.gnu.org>
15512 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
15513 descriptions of various incorrectly documented functions.
15515 2018-05-30 Andre Vieira <andre.simoesdiasvieira@arm.com>
15518 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
15519 address check not strict.
15521 2018-05-30 Richard Biener <rguenther@suse.de>
15523 PR tree-optimization/85964
15524 * tracer.c (better_p): Drop initialized count check, we only
15525 call the function with initialized counts now.
15526 (find_best_successor): Do find a best edge if one
15527 has uninitialized count.
15528 (find_best_predecessor): Likewise. Do BB frequency check only
15529 if count is initialized.
15531 2017-05-30 Jackson Woodruff <jackson.woodruff@arm.com>
15533 * config/aarch64/aarch64.c (aarch64_host_wide_int_compare): New.
15534 (aarch64_ldrstr_offset_compare): New.
15535 (aarch64_operands_adjust_ok_for_ldpstp): Update to consider all
15536 load/store orderings.
15537 (aarch64_gen_adjusted_ldpstp): Likewise.
15539 2018-05-30 Wilco Dijkstra <wdijkstr@arm.com>
15541 * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
15542 Check for subset of GENERAL_REGS and FP_REGS.
15543 * config/aarch64/aarch64-simd.md (aarch64_get_lane): Increase cost of
15546 2018-05-30 Richard Sandiford <richard.sandiford@linaro.org>
15548 * alias.c (adjust_offset_for_component_ref): Use poly_int_tree_p
15549 and wi::to_poly_offset. Add the current offset and then check
15550 whether the sum fits, rather than using an unchecked addition of
15551 a checked term. Check for a shwi rather than a uhwi.
15552 * expr.c (get_bit_range): Use tree_to_poly_uint64.
15553 (store_constructor): Use poly_int_tree_p.
15554 (expand_expr_real_1): Likewise.
15555 * function.c (assign_temp): Likewise.
15556 * fold-const.c (const_binop): Use poly_int_tree_p and
15557 wi::to_poly_offset.
15558 (fold_indirect_ref_1): Likewise. Use multiple_p to attempt an exact
15560 * ipa-icf-gimple.c (func_checker::compare_operand): Use
15561 to_poly_offset for MEM offsets.
15562 * ipa-icf.c (sem_variable::equals): Likewise.
15563 * stor-layout.c (compute_record_mode): Use poly_int_tree_p.
15564 * tree-ssa-sccvn.c (ao_ref_init_from_vn_reference): Use
15565 wi::to_poly_offset for BIT_FIELD_REF offsets.
15566 (vn_reference_maybe_forwprop_address): Use poly_int_tree_p and
15567 wi::to_poly_offset.
15568 * var-tracking.c (emit_note_insn_var_location): Use
15569 tree_to_poly_uint64.
15571 2018-05-29 Jim Wilson <jimw@sifive.com>
15573 * config/riscv/riscv.c (riscv_interrupt_type): Fix comment typo.
15575 2018-05-29 Uros Bizjak <ubizjak@gmail.com>
15578 * config/i386/i386.md (l<rounding_insn><MODEF:mode><SWI48:mode>2):
15579 Enable for TARGET_SSE4_1 and generate rounds{s,d} and cvtts{s,d}2si{,q}
15581 (sse4_1_round<mode>2): Use nonimmediate_operand
15582 for operand 1 predicate.
15584 2018-05-29 Martin Sebor <msebor@redhat.com>
15585 Richard Biener <rguenther@suse.de>
15588 * calls.c (get_size_range): Call determine_value_range instead
15589 of get_value_range..
15590 * tree-vrp.h (determine_value_range): Declared new function.
15591 * tree-vrp.c (determine_value_range_1, determine_value_range): New.
15593 2018-05-29 Richard Biener <rguenther@suse.de>
15595 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Make
15596 sure to use non-pattern stmts for get_earlier_stmt arguments.
15597 * tree-vectorizer.h (get_earlier_stmt): Assert we do not get
15598 called on pattern stmts.
15599 (get_later_stmt): Likewise.
15601 2018-05-29 Martin Liska <mliska@suse.cz>
15603 PR gcov-profile/85759
15604 * doc/gcov.texi: Document GCOV_ERROR_FILE and GCOV_EXIT_AT_ERROR
15607 2018-05-29 Jakub Jelinek <jakub@redhat.com>
15609 * tree-cfg.c (verify_gimple_assign_unary): Add checking for
15611 (verify_gimple_assign_binary): Check TYPE_VECTOR_SUBPARTS for
15615 * tree.def (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
15616 VEC_PACK_FLOAT_EXPR): New tree codes.
15617 * tree-pretty-print.c (op_code_prio): Handle
15618 VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR.
15619 (dump_generic_node): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
15620 VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
15621 * tree-inline.c (estimate_operator_cost): Likewise.
15622 * gimple-pretty-print.c (dump_binary_rhs): Handle VEC_PACK_FLOAT_EXPR.
15623 * fold-const.c (const_binop): Likewise.
15624 (const_unop): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR and
15625 VEC_UNPACK_FIX_TRUNC_LO_EXPR.
15626 * tree-cfg.c (verify_gimple_assign_unary): Likewise.
15627 (verify_gimple_assign_binary): Handle VEC_PACK_FLOAT_EXPR.
15628 * cfgexpand.c (expand_debug_expr): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
15629 VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
15630 * expr.c (expand_expr_real_2): Likewise.
15631 * optabs.def (vec_packs_float_optab, vec_packu_float_optab,
15632 vec_unpack_sfix_trunc_hi_optab, vec_unpack_sfix_trunc_lo_optab,
15633 vec_unpack_ufix_trunc_hi_optab, vec_unpack_ufix_trunc_lo_optab): New
15635 * optabs.c (expand_widen_pattern_expr): For
15636 VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR use
15637 sign from result type rather than operand's type.
15638 (expand_binop_directly): For vec_packu_float_optab and
15639 vec_packs_float_optab allow result type to be different from operand's
15641 * optabs-tree.c (optab_for_tree_code): Handle
15642 VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
15643 VEC_PACK_FLOAT_EXPR. Formatting fixes.
15644 * tree-vect-generic.c (expand_vector_operations_1): Handle
15645 VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
15646 VEC_PACK_FLOAT_EXPR.
15647 * tree-vect-stmts.c (supportable_widening_operation): Handle
15649 (supportable_narrowing_operation): Handle FLOAT_EXPR.
15650 * config/i386/i386.md (fixprefix, floatprefix): New code attributes.
15651 * config/i386/sse.md (*float<floatunssuffix>v2div2sf2): Rename to ...
15652 (float<floatunssuffix>v2div2sf2): ... this. Formatting fix.
15653 (vpckfloat_concat_mode, vpckfloat_temp_mode, vpckfloat_op_mode): New
15655 (vec_pack<floatprefix>_float_<mode>): New expander.
15656 (vunpckfixt_mode, vunpckfixt_model, vunpckfixt_extract_mode): New mode
15658 (vec_unpack_<fixprefix>fix_trunc_lo_<mode>,
15659 vec_unpack_<fixprefix>fix_trunc_hi_<mode>): New expanders.
15660 * doc/md.texi (vec_packs_float_@var{m}, vec_packu_float_@var{m},
15661 vec_unpack_sfix_trunc_hi_@var{m}, vec_unpack_sfix_trunc_lo_@var{m},
15662 vec_unpack_ufix_trunc_hi_@var{m}, vec_unpack_ufix_trunc_lo_@var{m}):
15664 * doc/generic.texi (VEC_UNPACK_FLOAT_HI_EXPR,
15665 VEC_UNPACK_FLOAT_LO_EXPR): Fix pasto in description.
15666 (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
15667 VEC_PACK_FLOAT_EXPR): Document.
15669 2018-05-29 Richard Biener <rguenther@suse.de>
15671 * tree-vectorizer.h (struct vec_info): Add stmt_vec_infos
15673 (stmt_vec_info_vec): Make pointer.
15674 (init_stmt_vec_info_vec): Remove.
15675 (free_stmt_vec_info_vec): Likewise.
15676 (set_stmt_vec_info_vec): New function.
15677 (free_stmt_vec_infos): Likewise.
15678 (vinfo_for_stmt): Adjust for stmt_vec_info_vec indirection.
15679 (set_vinfo_for_stmt): Likewise.
15680 (get_earlier_stmt): Likewise.
15681 (get_later_stmt): Likewise.
15682 * tree-vectorizer.c (stmt_vec_info_vec): Make pointer.
15683 (vec_info::vec_info): Allocate stmt_vec_infos and set the global.
15684 (vec_info::~vec_info): Free stmt_vec_infos.
15685 (vectorize_loops): Set the global stmt_vec_info_vec to NULL.
15686 Remove old init_stmt_vec_info_vec/free_stmt_vec_info_vec calls.
15687 (pass_slp_vectorize::execute): Likewise.
15688 * tree-vect-stmts.c (init_stmt_vec_info_vec): Remove.
15689 (free_stmt_vec_info_vec): Likewise.
15690 (set_stmt_vec_info_vec): New function.
15691 (free_stmt_vec_infos): Likewise.
15692 * tree-vect-loop.c (_loop_vec_info::~_loop_vec_info): Set
15693 the global stmt_vec_info_vec.
15694 * tree-parloops.c (gather_scalar_reductions): Use
15695 set_stmt_vec_info_vec/free_stmt_vec_infos and maintain a local
15698 2018-05-29 Richard Biener <rguenther@suse.de>
15700 * dominance.c (iterate_fix_dominators): Push/pop TV_DOMINANCE.
15702 2018-05-29 Martin Liska <mliska@suse.cz>
15703 David Malcolm <dmalcolm@redhat.com>
15705 * vec.c (test_reverse): New.
15706 (vec_c_tests): Add new test.
15707 * vec.h (vl_ptr>::reverse): New function.
15709 2018-05-29 Gerald Pfeifer <gerald@pfeifer.com>
15711 * config.gcc: Identify FreeBSD 3.x and 4.x as unsupported.
15713 * config/freebsd-spec.h (FBSD_LIB_SPEC): Only consider FreeBSD 5
15716 2018-05-28 Bernd Edlinger <bernd.edlinger@hotmail.de>
15718 * tree-dump.c (dump_node): Use splay_tree_delete_pointers.
15720 2018-05-28 Richard Biener <rguenther@suse.de>
15722 PR tree-optimization/85933
15723 * tree-vect-data-refs.c (vect_record_base_alignments): Only
15724 look at stmts marked as vectorizable.
15726 2018-05-28 Richard Biener <rguenther@suse.de>
15728 PR tree-optimization/85934
15729 * tree-vect-generic.c (expand_vector_operations_1): Hoist
15730 vector boolean check before scalar optimization.
15732 2018-05-28 Jakub Jelinek <jakub@redhat.com>
15734 * doc/invoke.texi (ARM Options): Use @item instead of @itemx
15737 2018-05-28 Mark Wielaard <mark@klomp.org>
15739 * dwarf2asm.c (dw2_asm_output_delta_uleb128): Add brackets around lab2
15740 if it is an expression containing a minus sign.
15742 2018-05-27 John David Anglin <danglin@gcc.gnu.org>
15744 * config/pa/pa-linux.h (NEED_INDICATE_EXEC_STACK): Define to 0.
15746 2018-05-27 Paul Koning <ni1d@arrl.net>
15748 * config/pdp11/pdp11.md (truncsihi2): Remove.
15750 2018-05-27 Monk Chiang <sh.chiang04@gmail.com>
15751 Chung-Ju Wu <jasonwucj@gmail.com>
15753 * config/nds32/nds32-intrinsic.md (unaligned_storedi): Modify patterns
15755 (unaligned_store_dw): Ditto.
15756 * config/nds32/nds32-memory-manipulation.c
15757 (nds32_expand_movmemsi_loop_known_size): Refactoring implementation.
15758 (nds32_gen_dup_4_byte_to_word_value): Rename to ...
15759 (nds32_gen_dup_4_byte_to_word_value_aux): ... this.
15760 (emit_setmem_word_loop): Rename to ...
15761 (emit_setmem_doubleword_loop): ... this.
15762 (nds32_gen_dup_4_byte_to_word_value): New function.
15763 (nds32_gen_dup_8_byte_to_double_word_value): New function.
15764 (nds32_expand_setmem_loop): Refine implementation.
15765 (nds32_expand_setmem_loop_v3m): Ditto.
15766 * config/nds32/nds32-multiple.md (unaligned_store_update_base_dw): New
15769 2018-05-27 Chung-Ju Wu <jasonwucj@gmail.com>
15771 * config/nds32/nds32.md (bswapsi2, bswaphi2): New patterns.
15773 2018-05-27 Chung-Ju Wu <jasonwucj@gmail.com>
15775 * config/nds32/nds32.c (nds32_attribute_table): Add "no_prologue".
15776 (nds32_init_machine_status): Initialize machine->attr_naked_p and
15777 machine->attr_no_prologue_p.
15778 (nds32_compute_stack_frame): Check "naked" and "no_prologue" attributes.
15779 (nds32_naked_function_p): Handle "naked" and "no_prologue" attributes.
15780 (nds32_expand_epilogue): Consider attr_naked_p.
15781 (nds32_expand_epilogue_v3pop): Likewise.
15782 (nds32_can_use_return_insn): Likewise.
15783 * config/nds32/nds32.h (machine_function): Add attr_naked_p and
15784 attr_no_prologue_p fields.
15785 * config/nds32/nds32.opt (mret-in-naked-func): New option.
15787 2018-05-27 Jakub Jelinek <jakub@redhat.com>
15790 * config/i386/i386.md (fixunssuffix, floatunssuffix): New code
15792 * config/i386/sse.md
15793 (<floatsuffix>float<sseintvecmodelower><mode>2<mask_name><round_name>):
15795 (float<floatunssuffix><sseintvecmodelower><mode>2<mask_name><round_name>):
15797 (<floatsuffix>float<sselongvecmodelower><mode>2<mask_name><round_name>):
15799 (float<floatunssuffix><sselongvecmodelower><mode>2<mask_name><round_name>):
15801 (*<floatsuffix>floatv2div2sf2): Rename to ...
15802 (*float<floatunssuffix>v2div2sf2): ... this.
15803 (<floatsuffix>floatv2div2sf2_mask): Rename to ...
15804 (float<floatunssuffix>v2div2sf2_mask): ... this.
15805 (*<floatsuffix>floatv2div2sf2_mask_1): Rename to ...
15806 (*float<floatunssuffix>v2div2sf2_mask_1): ... this.
15807 (<fixsuffix>fix_truncv8dfv8si2<mask_name><round_saeonly_name>): Rename
15809 (fix<fixunssuffix>_truncv8dfv8si2<mask_name><round_saeonly_name>):
15811 (<fixsuffix>fix_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
15813 (fix<fixunssuffix>_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
15815 (<fixsuffix>fix_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
15817 (fix<fixunssuffix>_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
15819 (<fixsuffix>fix_truncv2sfv2di2<mask_name>): Rename to ...
15820 (fix<fixunssuffix>_truncv2sfv2di2<mask_name>): ... this.
15821 (vec_pack_ufix_trunc_<mode>): Use gen_fixuns_truncv8dfv8si2 instead of
15822 gen_ufix_truncv8dfv8si2.
15823 * config/i386/i386-builtin.def (__builtin_ia32_cvttpd2uqq256_mask,
15824 __builtin_ia32_cvttpd2uqq128_mask, __builtin_ia32_cvttps2uqq256_mask,
15825 __builtin_ia32_cvttps2uqq128_mask, __builtin_ia32_cvtuqq2ps256_mask,
15826 __builtin_ia32_cvtuqq2ps128_mask, __builtin_ia32_cvtuqq2pd256_mask,
15827 __builtin_ia32_cvtuqq2pd128_mask, __builtin_ia32_cvttpd2udq512_mask,
15828 __builtin_ia32_cvtuqq2ps512_mask, __builtin_ia32_cvtuqq2pd512_mask,
15829 __builtin_ia32_cvttps2uqq512_mask, __builtin_ia32_cvttpd2uqq512_mask):
15830 Use fixuns instead ufix or floatuns instead ufloat in CODE_FOR_ names.
15832 2018-05-24 H.J. Lu <hongjiu.lu@intel.com>
15836 * varasm.c (assemble_alias): Lookup ifunc attribute on error.
15838 2018-05-25 Jim Wilson <jimw@sifive.com>
15840 * config/riscv/riscv-protos.h (riscv_epilogue_uses): New.
15841 * config/riscv/riscv.c (struct machine_function): Add
15842 interrupt_handler_p and attribute_checked_p fields.
15843 (riscv_attribute_table): Add interrupt.
15844 (riscv_interrupt_type_p): New.
15845 (riscv_save_reg_p): Save extra regs for interrupt handler.
15846 (riscv_use_save_libcall): Return false for interrupt handler.
15847 (riscv_first_stack_step): Add forward declaration.
15848 (riscv_compute_frame_info): New local interrupt_save_t1. Set it
15849 for interrupt handler with large frame. Use it for saved reg list.
15850 (riscv_expand_prologue): Move flag_stack_usage_info support to
15851 eliminate duplication.
15852 (riscv_expand_epilogue): Generate mret for interrupt handler.
15853 (riscv_epilogue_uses): New.
15854 (riscv_can_use_return_insn): Return false for interrupt handler.
15855 (riscv_function_ok_for_sibcall): Likewise.
15856 (riscv_set_current_function): Add interrupt handler support.
15857 * config/riscv/riscv.h (EPILOGUE_USES): Call riscv_epilogue_uses.
15858 * config/riscv/riscv.md (UNSPECV_MRET): New.
15860 (riscv_frflags, riscv_fsflags): Use tab after opcode.
15862 * doc/extend.texi (RISC-V Function Attributes) <interrupt>: New.
15864 2018-05-25 Bill Schmidt <wschmidt@linux.ibm.com>
15866 PR tree-optimization/85712
15867 * gimple-ssa-strength-reduction.c (replace_one_candidate): Skip if
15868 this candidate has already been replaced in-situ by a copy.
15870 2018-05-25 Jason Merrill <jason@redhat.com>
15872 PR c++/80485 - inline function non-zero address.
15873 * symtab.c (nonzero_address): Check DECL_COMDAT.
15875 2018-05-25 Uros Bizjak <ubizjak@gmail.com>
15878 * config/alpha/alpha.md (ashlsi3): New insn pattern.
15879 (*ashlsi_se): Rename from *ashldi_se. Define as sign
15880 extension of SImode operation. Use const123_operand predicate.
15881 (*saddsi_1): Remove.
15882 (*saddl_se_1): Ditto.
15883 (*ssubsi_1): Ditto.
15884 (*ssubl_se_1): Ditto.
15885 * config/alpha/predicates.md (const123_operand): New predicate.
15886 * config/alpha/constraints.md (P): Use IN_RANGE.
15888 2018-05-25 Richard Biener <rguenther@suse.de>
15890 * tree-ssa-alias.h (refs_may_alias_p): Add tbaa_p bool parameter,
15892 (ref_maybe_used_by_stmt_p): Likewise.
15893 (stmt_may_clobber_ref_p): Likewise.
15894 (stmt_may_clobber_ref_p_1): Likewise.
15895 * tree-ssa-alias.c (refs_may_alias_p): Add tbaa_p bool parameter
15897 (ref_maybe_used_by_stmt_p): Likewise.
15898 (stmt_may_clobber_ref_p): Likewise.
15899 (stmt_may_clobber_ref_p_1): Likewise.
15900 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Use
15901 the alias oracle to disambiguate DRs with stmts DR analysis
15903 (vect_analyze_data_refs): Do not give up on not analyzable
15904 DRs for BB vectorization. Remove code truncating the dataref
15907 2018-05-25 Jakub Jelinek <jakub@redhat.com>
15910 * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
15911 Add (=Yk,v,C) variant using vptestm insn. Use TARGET_AVX512BW
15912 in test instead of TARGET_AVX512F for VI12_AVX512VL iterator.
15914 2018-05-25 Richard Biener <rguenther@suse.de>
15916 * tree-vect-data-refs.c (vect_find_stmt_data_reference): New
15917 function, combining stmt data ref gathering and fatal analysis
15919 (vect_analyze_data_refs): Remove now redudnant code and simplify.
15920 * tree-vect-loop.c (vect_get_datarefs_in_loop): Factor out from
15921 vect_analyze_loop_2 and use vect_find_stmt_data_reference.
15922 * tree-vect-slp.c (vect_slp_bb): Use vect_find_stmt_data_reference.
15923 * tree-vectorizer.h (vect_find_stmt_data_reference): Declare.
15925 2018-05-25 Bin Cheng <bin.cheng@arm.com>
15927 PR tree-optimization/85720
15928 * tree-loop-distribution.c (break_alias_scc_partitions): Don't merge
15929 SCC if all partitions are builtins.
15930 (version_loop_by_alias_check): New parameter. Generate cancelable
15931 runtime alias check if all partitions are builtins.
15932 (distribute_loop): Update call to above function.
15934 2018-05-25 Bin Cheng <bin.cheng@arm.com>
15936 * tree-outof-ssa.c (tree-ssa.h, tree-dfa.h): Include header files.
15937 (create_default_def, for_all_parms): Moved from tree-ssa-coalesce.c.
15938 (parm_default_def_partition_arg): Ditto.
15939 (set_parm_default_def_partition): Ditto.
15940 (get_parm_default_def_partitions): Ditto and make it static.
15941 (get_undefined_value_partitions): Ditto and make it static.
15942 (remove_ssa_form): Refactor call to init_var_map here.
15943 * tree-ssa-coalesce.c (build_ssa_conflict_graph): Support live range
15944 computation for loop region.
15945 (coalesce_partitions, compute_optimized_partition_bases): Ditto.
15946 (register_default_def): Delete.
15947 (for_all_parms, create_default_def): Move to tree-outof-ssa.c.
15948 (parm_default_def_partition_arg): Ditto.
15949 (set_parm_default_def_partition): Ditto.
15950 (get_parm_default_def_partitions): Ditto and make it static.
15951 (get_undefined_value_partitions): Ditto and make it static.
15952 (coalesce_with_default, coalesce_with_default): Update comment.
15953 (create_coalesce_list_for_region): New func factored out from
15954 create_outofssa_var_map.
15955 (populate_coalesce_list_for_outofssa): New func factored out from
15956 create_outofssa_var_map and coalesce_ssa_name.
15957 (create_outofssa_var_map): Delete.
15958 (coalesce_ssa_name): Refactor to support live range computation.
15959 * tree-ssa-coalesce.h (coalesce_ssa_name): Change decl.
15960 (get_parm_default_def_partitions): Delete.
15961 (get_undefined_value_partitions): Ditto.
15962 * tree-ssa-live.c (init_var_map, delete_var_map): Support live range
15963 computation for loop region.
15964 (new_tree_live_info, loe_visit_block): Ditto.
15965 (live_worklist, set_var_live_on_entry): Ditto.
15966 (calculate_live_on_exit, verify_live_on_entry): Ditto.
15967 * tree-ssa-live.h (struct _var_map): New fields.
15968 (init_var_map): Change decl.
15969 (region_contains_p): New.
15971 2018-05-25 Bin Cheng <bin.cheng@arm.com>
15973 * tree-ssa-live.h (live_merge_and_clear): Delete.
15975 2018-05-25 Richard Biener <rguenther@suse.de>
15978 * tree-dump.c (dequeue_and_dump): Remove access to removed
15979 operand 2 of a SWITCH_EXPR.
15981 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
15983 * doc/sourcebuild.texi (vect_double_cond_arith): Include
15984 multiplication and division.
15985 * doc/md.texi (cond_mul@var{m}, cond_div@var{m}, cond_mod@var{m})
15986 (cond_udiv@var{m}, cond_umod@var{m}): Document.
15987 * optabs.def (cond_smul_optab, cond_sdiv_optab, cond_smod_optab)
15988 (cond_udiv_optab, cond_umod_optab): New optabs.
15989 * internal-fn.def (IFN_COND_MUL, IFN_COND_DIV, IFN_COND_MOD)
15990 (IFN_COND_RDIV): New internal functions.
15991 * internal-fn.c (get_conditional_internal_fn): Handle TRUNC_DIV_EXPR,
15992 TRUNC_MOD_EXPR and RDIV_EXPR.
15993 * match.pd (UNCOND_BINARY, COND_BINARY): Handle them.
15994 * config/aarch64/iterators.md (UNSPEC_COND_MUL, UNSPEC_COND_DIV):
15996 (SVE_INT_BINARY): Include mult.
15997 (SVE_COND_FP_BINARY): Include UNSPEC_MUL and UNSPEC_DIV.
15998 (optab, sve_int_op): Handle mult.
15999 (optab, sve_fp_op, commutative): Handle UNSPEC_COND_MUL and
16001 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New pattern
16002 for SVE_INT_BINARY_SD.
16004 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
16006 * config/aarch64/iterators.md (SVE_INT_BINARY_SD): New code iterator.
16007 (optab, sve_int_op): Handle div and udiv.
16008 * config/aarch64/aarch64-sve.md (<optab><mode>3): New expander
16009 for SVE_INT_BINARY_SD.
16010 (*<optab><mode>3): New insn for the same.
16012 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
16014 * tree-vect-patterns.c: Include predict.h.
16015 (vect_recog_divmod_pattern): Restrict check for division support
16016 to when optimizing for size.
16018 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
16020 * doc/sourcebuild.texi (vect_double_cond_arith: Document.
16021 * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 4.
16022 (gimple_match_op::gimple_match_op): Add an overload for 4 operands.
16023 (gimple_match_op::set_op): Likewise.
16024 (gimple_resimplify4): Declare.
16025 * genmatch.c (get_operand_type): Handle CFN_COND_* functions.
16026 (expr::gen_transform): Likewise.
16027 (decision_tree::gen): Generate a simplification routine for 4 operands.
16028 * gimple-match-head.c (gimple_simplify): Add an overload for
16029 4 operands. In the top-level function, handle up to 4 call
16030 arguments and call gimple_resimplify4.
16031 (gimple_resimplify4): New function.
16032 (build_call_internal): Pass a fourth operand.
16033 (maybe_push_to_seq): Likewise.
16034 * match.pd (UNCOND_BINARY, COND_BINARY): New operator lists.
16035 Fold VEC_COND_EXPRs of an operation and a default value into
16036 an IFN_COND_* function if possible.
16037 * config/aarch64/iterators.md (UNSPEC_COND_MAX, UNSPEC_COND_MIN):
16039 (SVE_COND_FP_BINARY): Include them.
16040 (optab, sve_fp_op): Handle them.
16041 (SVE_INT_BINARY_REV): New code iterator.
16042 (SVE_COND_FP_BINARY_REV): New int iterator.
16043 (commutative): New int attribute.
16044 * config/aarch64/aarch64-protos.h (aarch64_sve_prepare_conditional_op):
16046 * config/aarch64/aarch64.c (aarch64_sve_prepare_conditional_op): New
16048 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Use it.
16049 (*cond_<optab><mode>): New patterns for reversed operands.
16051 2018-05-25 Richard Biener <rguenther@suse.de>
16053 * tree-vectorizer.h (STMT_VINFO_GROUP_*, GROUP_*): Remove.
16054 (DR_GROUP_*): New, assert we have non-NULL ->data_ref_info.
16055 (REDUC_GROUP_*): New, assert we have NULL ->data_ref_info.
16056 (STMT_VINFO_GROUPED_ACCESS): Adjust.
16057 * tree-vect-data-refs.c (everywhere): Adjust users.
16058 * tree-vect-loop.c (everywhere): Likewise.
16059 * tree-vect-slp.c (everywhere): Likewise.
16060 * tree-vect-stmts.c (everywhere): Likewise.
16061 * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
16063 2018-05-25 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
16065 * configure.ac (gcc_cv_as_section_has_e): Move to common section.
16067 (gcc_cv_as_section_exclude): ... this.
16068 Try Solaris as #exclude syntax.
16069 * configure: Regenerate.
16070 * config.in: Regenerate.
16071 * config/i386/i386.c (i386_solaris_elf_named_section): Handle
16073 * config/sparc/sparc.c (sparc_solaris_elf_asm_named_section)
16074 [HAVE_GAS_SECTION_EXCLUDE]: Handle SECTION_EXCLUDE.
16076 * varasm.c (default_elf_asm_named_section): Don't check if
16077 HAVE_GAS_SECTION_EXCLUDE is defined.
16079 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
16081 * doc/md.texi: Update the documentation of the cond_* optabs
16082 to mention the new final operand. Fix GET_MODE_NUNITS call.
16083 Describe the scalar case too.
16084 * internal-fn.def (IFN_EXTRACT_LAST): Change type to fold_left.
16085 * internal-fn.c (expand_cond_unary_optab_fn): Expect 3 operands
16087 (expand_cond_binary_optab_fn): Expect 4 operands instead of 3.
16088 (get_conditional_internal_fn): Update comment.
16089 * tree-vect-loop.c (vectorizable_reduction): Pass the original
16090 accumulator value as a final argument to conditional functions.
16091 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Turn into
16092 a define_expand and add an "else" operand. Assert for now that
16093 the else operand is equal to operand 2. Use SVE_INT_BINARY and
16094 SVE_COND_FP_BINARY instead of SVE_COND_INT_OP and SVE_COND_FP_OP.
16095 (*cond_<optab><mode>): New patterns.
16096 * config/aarch64/iterators.md (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX)
16097 (UNSPEC_COND_SMIN, UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
16098 (UNSPEC_COND_EOR): Delete.
16099 (optab): Remove associated mappings.
16100 (SVE_INT_BINARY): New code iterator.
16101 (sve_int_op): Remove int attribute and add "minus" to the code
16103 (SVE_COND_INT_OP): Delete.
16104 (SVE_COND_FP_OP): Rename to...
16105 (SVE_COND_FP_BINARY): ...this.
16107 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
16109 * optabs.c (can_reuse_operands_p): New function.
16110 (maybe_legitimize_operands): Try to reuse the results for
16113 2018-05-24 Uros Bizjak <ubizjak@gmail.com>
16115 * config/i386/sse.md (cvtusi2<ssescalarmodesuffix>64<round_name>):
16116 Add {q} suffix to insn mnemonic.
16118 2018-05-23 Jozef Lawrynowicz <jozef.l@mittosystems.com>
16120 * config/msp430/msp430.c (TARGET_WARN_FUNC_RETURN): Define.
16121 (msp430_warn_func_return): New.
16123 2018-05-24 Roger Sayle <roger@nextmovesoftware.com>
16125 * fold-const.c (tree_nonzero_bits): New function.
16126 * fold-const.h (tree_nonzero_bits): Likewise.
16127 * match.pd (POPCOUNT): New patterns to fold BUILTIN_POPCOUNT and
16128 friends. POPCOUNT(x&1) => x&1, POPCOUNT(x)==0 => x==0, etc.
16130 2018-05-24 H.J. Lu <hongjiu.lu@intel.com>
16134 * varasm.c (assemble_alias): Check ifunc_resolver only on
16137 2018-05-24 Uros Bizjak <ubizjak@gmail.com>
16140 * config/i386/sse.md (movdi_to_sse): Do not generate pseudo
16141 when memory input operand is handled.
16143 2018-05-24 Luis Machado <luis.machado@linaro.org>
16145 * config/aarch64/aarch64.c (qdf24xx_addrcost_table): New static
16147 (qdf24xx_tunings) <addr_costs>: Set to qdf24xx_addrcost_table.
16149 2018-05-24 Richard Sandiford <richard.sandiford@linaro.org>
16151 * match.pd: Delay FMA folds until after vectorization.
16153 2018-05-24 Andre Vieira <andre.simoesdiasvieira@arm.com>
16156 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
16157 address check not strict.
16159 2018-05-24 Richard Sandiford <richard.sandiford@linaro.org>
16161 * gimple-match.h (gimple_match_op): New class.
16162 (mprts_hook): Replace parameters with a gimple_match_op *.
16163 (maybe_build_generic_op): Likewise.
16164 (gimple_simplified_result_is_gimple_val): Replace parameters with
16165 a const gimple_match_op *.
16166 (gimple_simplify): Replace code_helper * and tree * parameters with
16167 a gimple_match_op * parameter.
16168 (gimple_resimplify1): Replace code_helper *, tree and tree *
16169 parameters with a gimple_match_op * parameter.
16170 (gimple_resimplify2): Likewise.
16171 (gimple_resimplify3): Likewise.
16172 (maybe_push_res_to_seq): Replace code_helper, tree and tree *
16173 parameters with a gimple_match_op * parameter.
16174 * gimple-match-head.c (gimple_simplify): Change prototypes of
16175 auto-generated functions to take a gimple_match_op * instead of
16176 separate code_helper * and tree * parameters. Make the same
16177 change in the top-level overload and update calls to the
16178 gimple_resimplify routines. Update calls to the auto-generated
16179 functions and to maybe_push_res_to_seq in the publicly-facing
16180 operation-specific gimple_simplify overloads.
16181 (gimple_match_op::MAX_NUM_OPS): Define.
16182 (gimple_resimplify1): Replace rcode and ops with a single res_op
16183 parameter. Update call to gimple_simplify.
16184 (gimple_resimplify2): Likewise.
16185 (gimple_resimplify3): Likewise.
16186 (mprts_hook): Replace parameters with a gimple_match_op *.
16187 (maybe_build_generic_op): Likewise.
16188 (build_call_internal): Replace type, nargs and ops with
16189 a gimple_match_op *.
16190 (maybe_push_res_to_seq): Replace res_code, type and ops parameters
16191 with a single gimple_match_op *. Update calls to mprts_hook,
16192 build_call_internal and gimple_simplified_result_is_gimple_val.
16193 Factor out code that is common to the tree_code and combined_fn cases.
16194 * genmatch.c (expr::gen_transform): Replace tem_code and
16195 tem_ops with a gimple_match_op called tem_op. Update calls
16196 to the gimple_resimplify functions and maybe_push_res_to_seq.
16197 (dt_simplify::gen_1): Manipulate res_op instead of res_code and
16198 res_ops. Update call to the gimple_resimplify functions.
16199 (dt_simplify::gen): Pass res_op instead of res_code and res_ops.
16200 (decision_tree::gen): Make the functions take a gimple_match_op *
16201 called res_op instead of separate res_code and res_ops parameters.
16202 Update call accordingly.
16203 * gimple-fold.c (replace_stmt_with_simplification): Replace rcode
16204 and ops with a single res_op parameter. Update calls to
16205 maybe_build_generic_op and maybe_push_res_to_seq.
16206 (fold_stmt_1): Update calls to gimple_simplify and
16207 replace_stmt_with_simplification.
16208 (gimple_fold_stmt_to_constant_1): Update calls to gimple_simplify
16209 and gimple_simplified_result_is_gimple_val.
16210 * tree-cfgcleanup.c (cleanup_control_expr_graph): Update call to
16212 * tree-ssa-sccvn.c (vn_lookup_simplify_result): Replace parameters
16213 with a gimple_match_op *.
16214 (vn_nary_build_or_lookup): Likewise. Update call to
16215 vn_nary_build_or_lookup_1.
16216 (vn_nary_build_or_lookup_1): Replace rcode, type and ops with a
16217 gimple_match_op *. Update calls to the gimple_resimplify routines
16218 and to gimple_simplified_result_is_gimple_val.
16219 (vn_nary_simplify): Update call to vn_nary_build_or_lookup_1.
16220 Use gimple_match_op::MAX_NUM_OPS instead of a hard-coded 3.
16221 (vn_reference_lookup_3): Update call to vn_nary_build_or_lookup.
16222 (visit_nary_op): Likewise.
16223 (visit_reference_op_load): Likewise.
16225 2018-05-23 Luis Machado <luis.machado@linaro.org>
16227 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Use correct type
16228 modifier for printing the step amount.
16230 2018-05-23 Jozef Lawrynowicz <jozef.l@somniumtech.com>
16233 * tree.c (build_common_tree_nodes): Dont set TYPE_SIZE for __intN
16236 2018-05-23 Segher Boessenkool <segher@kernel.crashing.org>
16238 * doc/sourcebuild.texi (Endianness): New subsubsection.
16240 2018-05-23 Luis Machado <luis.machado@linaro.org>
16242 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
16243 <prefetch_dynamic_strides>: New const bool field.
16244 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
16245 prefetch_dynamic_strides.
16246 (exynosm1_prefetch_tune): Likewise.
16247 (thunderxt88_prefetch_tune): Likewise.
16248 (thunderx_prefetch_tune): Likewise.
16249 (thunderx2t99_prefetch_tune): Likewise.
16250 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides to
16252 (aarch64_override_options_internal): Update to set
16253 PARAM_PREFETCH_DYNAMIC_STRIDES.
16254 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
16255 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
16256 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
16257 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
16258 prefetch-dynamic-strides setting.
16260 2018-05-23 Luis Machado <luis.machado@linaro.org>
16262 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
16263 <minimum_stride>: New const int field.
16264 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
16265 minimum_stride field defaulting to -1.
16266 (exynosm1_prefetch_tune): Likewise.
16267 (thunderxt88_prefetch_tune): Likewise.
16268 (thunderx_prefetch_tune): Likewise.
16269 (thunderx2t99_prefetch_tune): Likewise.
16270 (qdf24xx_prefetch_tune) <minimum_stride>: Set to 2048.
16271 <default_opt_level>: Set to 3.
16272 (aarch64_override_options_internal): Update to set
16273 PARAM_PREFETCH_MINIMUM_STRIDE.
16274 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
16275 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
16276 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
16277 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
16278 stride is constant and is below the minimum stride threshold.
16280 2018-05-23 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
16282 * config/arm/arm-cpus.in (mode26): Delete.
16283 (armv4): Delete mode26 reference.
16284 * config/arm/arm.c (arm_configure_build_target): Delete use of
16287 2018-05-23 Uros Bizjak <ubizjak@gmail.com>
16289 * config/i386/i386.md (*floatuns<SWI48:mode><MODEF:mode>2_avx512):
16291 (floatunssi<mode>2): Also enable for AVX512F and TARGET_SSE_MATH.
16292 Rewrite expander pattern. Emit gen_floatunssi<mode>2_i387_with_xmm
16294 (floatunsdisf2): Rewrite expander pattern. Hanlde TARGET_AVX512F.
16295 (floatunsdidf2): Ditto.
16297 2018-05-23 Uros Bizjak <ubizjak@gmail.com>
16299 * config/i386/i386.md (fixuns_trunc<mode>di2): New insn pattern.
16300 (fixuns_trunc<mode>si2_avx512f): Ditto.
16301 (*fixuns_trunc<mode>si2_avx512f_zext): Ditto.
16302 (fixuns_trunc<mode>si2): Also enable for AVX512F and TARGET_SSE_MATH.
16303 Emit fixuns_trunc<mode>si2_avx512f for AVX512F targets.
16305 2018-05-23 Alexander Monakov <amonakov@ispras.ru>
16307 PR rtl-optimization/79985
16308 * df-scan.c (df_insn_refs_collect): Remove special case for
16309 global registers and asm statements.
16311 2018-05-23 Alexander Monakov <amonakov@ispras.ru>
16313 * extend.texi (Global Register Variables): Rewrite the bullet list.
16314 Note that the register is available for allocation. Note that access
16315 via inline asm must use constraints. Add note about async-signal
16316 handlers. Remove paragraph about automagic register selection.
16318 2018-05-23 Richard Biener <rguenther@suse.de>
16320 * tree-ssa-sccvn.c (vn_reference_lookup_3): Remove restriction
16321 of fixed offset from memset VN.
16323 2018-05-23 Bill Schmidt <wschmidt@linux.ibm.com>
16325 * gimple-ssa-strength-reduction.c (struct slsr_cand_d): Add
16326 first_interp field.
16327 (alloc_cand_and_find_basis): Initialize first_interp field.
16328 (slsr_process_mul): Modify first_interp field.
16329 (slsr_process_add): Likewise.
16330 (slsr_process_cast): Modify first_interp field for each new
16332 (slsr_process_copy): Likewise.
16333 (dump_candidate): Dump first_interp field.
16334 (replace_mult_candidate): Process all interpretations, not just
16336 (replace_rhs_if_not_dup): Likewise.
16337 (replace_one_candidate): Likewise.
16339 2018-05-23 Wilco Dijkstra <wdijkstr@arm.com>
16341 * config/aarch64/aarch64.c (aarch64_use_frame_pointer):
16343 (aarch64_needs_frame_chain): New function.
16344 (aarch64_parse_override_string): Set aarch64_use_frame_pointer.
16346 2018-05-23 Sudakshina Das <sudi.das@arm.com>
16349 * common/config/aarch64/aarch64-common.c (aarch64_handle_option):
16350 Check val before adding MASK_STRICT_ALIGN to opts->x_target_flags.
16351 * config/aarch64/aarch64.opt (mstrict-align): Remove RejectNegative.
16352 * config/aarch64/aarch64.c (aarch64_attributes): Mark allow_neg
16353 as true for strict-align.
16354 (aarch64_can_inline_p): Perform checks even when callee has no
16355 attributes to check for strict alignment.
16356 * doc/extend.texi (AArch64 Function Attributes): Document
16358 * doc/invoke.texi: (AArch64 Options): Likewise.
16360 2018-05-23 Richard Sandiford <richard.sandiford@linaro.org>
16362 PR tree-optimization/85853
16363 * tree-vect-slp.c (vect_slp_analyze_node_operations): Split out
16364 the handling of the root of the node to...
16365 (vect_slp_analyze_node_operations_1): ...this new function,
16366 and run the whole thing with the child nodes' def types
16367 set according to their SLP node's def type.
16369 2018-05-23 Richard Biener <rguenther@suse.de>
16371 PR middle-end/85874
16372 * tree-data-ref.c (create_runtime_alias_checks): Defer
16373 and ignore overflow warnings.
16375 2018-05-23 Yury Gribov <tetra2005@gmail.com>
16377 PR tree-optimization/85822
16378 * tree-vrp.c (is_masked_range_test): Fix handling of negative
16381 2018-05-23 Richard Biener <rguenther@suse.de>
16383 * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
16384 memset constants via native_interpret_expr.
16386 2018-05-22 H.J. Lu <hongjiu.lu@intel.com>
16389 * cgraph.h (cgraph_node::create): Set ifunc_resolver for ifunc
16391 (cgraph_node::create_alias): Likewise.
16392 (cgraph_node::get_availability): Check ifunc_resolver instead
16393 of looking up ifunc attribute.
16394 * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
16395 * varasm.c (do_assemble_alias): Likewise.
16396 (assemble_alias): Likewise.
16397 (default_binds_local_p_3): Likewise.
16398 * cgraph.h (cgraph_node): Add ifunc_resolver.
16399 (cgraph_node::only_called_directly_or_aliased_p): Return false
16400 for IFUNC resolver.
16401 * lto-cgraph.c (input_node): Set ifunc_resolver for ifunc
16403 * symtab.c (symtab_node::verify_base): Verify that ifunc_resolver
16404 is equivalent to lookup_attribute ("ifunc", DECL_ATTRIBUTES (decl)).
16405 (symtab_node::binds_to_current_def_p): Check ifunc_resolver
16406 instead of looking up ifunc attribute.
16408 2018-05-22 Luis Machado <luis.machado@linaro.org>
16410 * config/aarch64/aarch64.md (*ashift<mode>_extv_bfiz): New pattern.
16412 2018-05-22 Martin Sebor <msebor@redhat.com>
16414 PR middle-end/85359
16415 * builtins.c (expand_builtin_strcpy): Call maybe_warn_nonstring_arg
16416 only when expasion succeeds.
16417 (expand_builtin_strcmp): Same.
16418 (expand_builtin_strncmp): Same.
16420 2018-05-22 Martin Sebor <msebor@redhat.com>
16422 * calls.c (maybe_warn_nonstring_arg): Fix a typo in a comment.
16424 2018-05-22 Jackson Woodruff <jackson.woodruff@arm.com>
16425 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
16427 * config/aarch64/aarch64-ldpstp.md: Replace uses of
16428 aarch64_mem_pair_operand with memory_operand and delete operand swapping
16430 * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
16431 Add check for legitimate_address.
16432 (aarch64_gen_adjusted_ldpstp): Swap operands where appropriate.
16433 (aarch64_swap_ldrstr_operands): New.
16434 * config/aarch64/aarch64-protos.h (aarch64_swap_ldrstr_operands):
16437 2018-05-22 Jackson Woodruff <jackson.woodruff@arm.com>
16438 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
16440 * config/aarch64/aarch64.md: New patterns to generate stp
16442 (store_pair_sw, store_pair_dw): New patterns to generate stp for
16443 single words and double words.
16444 (load_pair_sw, load_pair_dw): Likewise.
16445 (store_pair_sf, store_pair_df, store_pair_si, store_pair_di):
16447 (load_pair_sf, load_pair_df, load_pair_si, load_pair_di):
16449 * config/aarch64/aarch64-ldpstp.md: Modify peephole
16450 for different mode ldpstp and add peephole for merged zero stores.
16451 Likewise for loads.
16452 * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
16454 (aarch64_gen_store_pair): Rename calls to match new patterns.
16455 (aarch64_gen_load_pair): Rename calls to match new patterns.
16456 * config/aarch64/aarch64-simd.md (load_pair<mode>): Rename to...
16457 (load_pair<DREG:mode><DREG2:mode>): ... This.
16458 (store_pair<mode>): Rename to...
16459 (vec_store_pair<DREG:mode><DREG2:mode>): ... This.
16460 * config/aarch64/iterators.md (DREG, DREG2, DX2, SX, SX2, DSX):
16461 New mode iterators.
16462 (V_INT_EQUIV): Handle SImode.
16463 * config/aarch64/predicates.md (aarch64_reg_zero_or_fp_zero):
16466 2018-05-22 Martin Sebor <msebor@redhat.com>
16469 * calls.c (maybe_warn_nonstring_arg): Use string length to set
16470 or ajust the presumed bound on an operation to avoid unnecessary
16473 2018-05-22 Martin Sebor <msebor@redhat.com>
16475 PR tree-optimization/85826
16476 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Avoid
16477 assuming that a DECL necesarily has a constant size.
16479 2018-05-22 Richard Sandiford <richard.sandiford@linaro.org>
16481 PR middle-end/85862
16482 * internal-fn.c (expand_direct_optab_fn): Cope with a null lhs.
16484 2018-05-22 Richard Biener <rguenther@suse.de>
16486 PR tree-optimization/85834
16487 * tree-ssa-sccvn.c (vn_reference_lookup_3): Properly handle
16488 non-constant and non-zero memset arguments.
16490 2018-05-22 Martin Liska <mliska@suse.cz>
16493 * ipa-icf.c (sem_item::add_type): Do not ICE for incomplete types.
16495 2018-05-22 Richard Biener <rguenther@suse.de>
16497 PR tree-optimization/85863
16498 * tree-vect-stmts.c (vect_is_simple_cond): Only widen invariant
16499 comparisons when vectype is specified.
16500 (vectorizable_condition): Do not specify vectype for
16501 vect_is_simple_cond when SLP vectorizing.
16503 2018-05-21 Michael Meissner <meissner@linux.ibm.com>
16506 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Do not
16507 define __ibm128 as long double.
16508 * config/rs6000/rs6000.c (rs6000_init_builtins): Create __ibm128
16509 as a distinct type when IEEE 128-bit support is enabled.
16510 (init_float128_ieee): Fix up conversions between IFmode and IEEE
16511 128-bit types to use the correct functions.
16512 (rs6000_expand_float128_convert): Use explicit FLOAT_EXTEND to
16513 convert between 128-bit floating point types that have different
16514 modes but the same representation, instead of using gen_lowpart to
16516 * config/rs6000/rs6000.md (IFKF): New iterator for IFmode and
16518 (IFKF_reg): New attributes to give the register constraints for
16520 (extend<mode>tf2_internal): New insns to mark an explicit
16521 conversion between 128-bit floating point types that have a
16522 different mode but share the same representation.
16524 2018-05-21 Richard Sandiford <richard.sandiford@linaro.org>
16526 PR tree-optimization/85814
16527 * tree-ssa-strlen.c (get_stridx_plus_constant): Cope with
16528 a null return from get_strinfo when unsharing the next
16529 strinfo in the chain.
16531 2018-05-21 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
16534 * varasm.c (weak_finish): Clean up weak_decls.
16536 2018-05-21 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
16538 * config/aarch64/aarch64.md ("unspec"): Define UNSPEC_SABAL,
16539 UNSPEC_SABDL2, UNSPEC_SADALP, UNSPEC_UABAL, UNSPEC_UABDL2,
16540 UNSPEC_UADALP values.
16541 * config/aarch64/iterators.md (ABAL): New int iterator.
16544 (sur): Add mappings for the above.
16545 * config/aarch64/aarch64-simd.md (aarch64_<sur>abdl2<mode>_3):
16547 (aarch64_<sur>abal<mode>_4): Likewise.
16548 (aarch64_<sur>adalp<mode>_3): Likewise.
16549 (<sur>sadv16qi): New define_expand.
16551 2018-05-21 Alexander Nesterovskiy <alexander.nesterovskiy@intel.com>
16553 * config/i386/i386.md (*movsf_internal): AVX falsedep fix.
16554 (*movdf_internal): Ditto.
16555 (*rcpsf2_sse): Ditto.
16556 (*rsqrtsf2_sse): Ditto.
16557 (*sqrt<mode>2_sse): Ditto.
16559 2018-05-21 Tamar Christina <tamar.christina@arm.com>
16561 * config/aarch64/aarch64-simd.md (aarch64_eor3qv8hi): Change to
16563 (aarch64_bcaxqv8hi): Change to bcaxq<mode>4.
16564 * config/aarch64/aarch64-simd-builtins.def (veor3q_u8, veor3q_u32,
16565 veor3q_u64, veor3q_s8, veor3q_s16, veor3q_s32, veor3q_s64, vbcaxq_u8,
16566 vbcaxq_u32, vbcaxq_u64, vbcaxq_s8, vbcaxq_s16, vbcaxq_s32,
16568 * config/aarch64/arm_neon.h: Likewise.
16569 * config/aarch64/iterators.md (VQ_I): New.
16571 2018-05-21 Alexey Brodkin <abrodkin@synopsys.com>
16573 * config.gcc: Add arc/t-multilib-linux to tmake_file for
16575 * config/arc/t-multilib-linux: Specify MULTILIB_OPTIONS and
16578 2018-05-20 Chung-Ju Wu <jasonwucj@gmail.com>
16580 * config/nds32/constraints.md (S): New constraint.
16581 * config/nds32/nds32.md (call_internal): Use constraint S.
16582 (call_value_internal): Likewise.
16583 (sibcall_internal): Likewise.
16584 (sibcall_value_internal): Likewise.
16586 2018-05-20 Kito Cheng <kito.cheng@gmail.com>
16587 Chung-Ju Wu <jasonwucj@gmail.com>
16589 * config/nds32/nds32.c (nds32_register_move_cost): Take garywolf cpu
16590 into consideration.
16592 2018-05-20 Kito Cheng <kito.cheng@gmail.com>
16593 Chung-Ju Wu <jasonwucj@gmail.com>
16595 * config/nds32/nds32-cost.c (rtx_cost_model_t): New structure.
16596 (insn_size_16bit, insn_size_32bit): New variables for cost evaluation.
16597 (nds32_rtx_costs_impl): Simplify.
16598 (nds32_address_cost_impl): Simplify.
16599 (nds32_init_rtx_costs): New function.
16600 (nds32_rtx_costs_speed_prefer): Likewise.
16601 (nds32_rtx_costs_size_prefer): Likewise.
16602 (nds32_address_cost_speed_prefer): Likewise.
16603 (nds32_address_cost_speed_fwprop): Likewise.
16604 (nds32_address_cost_size_prefer): Likewise.
16605 * config/nds32/nds32-protos.h (nds32_init_rtx_costs): Declare.
16606 * config/nds32/nds32.c (nds32_option_override): Use
16607 nds32_init_rtx_costs function.
16609 2018-05-20 Chung-Ju Wu <jasonwucj@gmail.com>
16611 * config/nds32/nds32.c (nds32_asm_file_start): Output pipeline model.
16612 * config/nds32/nds32.h (TARGET_PIPELINE_N7): Define.
16613 (TARGET_PIPELINE_N8): Likewise.
16614 (TARGET_PIPELINE_N10): Likewise.
16615 (TARGET_PIPELINE_N13): Likewise.
16616 (TARGET_PIPELINE_GRAYWOLF): Likewise.
16618 2018-05-19 Monk Chiang <sh.chiang04@gmail.com>
16620 * config/nds32/nds32-fpu.md: Update copyright year.
16622 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
16624 * config/nds32/nds32.h (ASM_SPEC): Adjust spec rule.
16626 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
16628 * config/nds32/nds32.c
16629 (nds32_md_asm_adjust): Consider flag_inline_asm_r15 variable.
16630 * config/nds32/nds32.opt (minline-asm-r15): New option.
16632 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
16634 * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS): Add
16636 * config/nds32/nds32.md (abssi2): New pattern.
16638 2018-05-19 Uros Bizjak <ubizjak@gmail.com>
16640 * config/i386/i386.md (rex64namesuffix): New mode attribute.
16641 * config/i386/sse.md (sse_cvtsi2ss<rex64namesuffix><round_name>):
16642 Merge insn pattern from sse_cvtsi2ss<round_name> and
16643 sse_cvtsi2ssq<round_name> using SWI48 mode iterator.
16644 (sse_cvtss2si<rex64namesuffix><round_name>): Merge insn pattern
16645 from sse_cvtss2si<round_name> and sse_cvtss2siq<round_name>
16646 using SWI48 mode iterator.
16647 (sse_cvtss2si<rex64namesuffix>_2): Merge insn pattern from
16648 sse_cvtss2si_2 and sse_cvtss2siq_2 using SWI48 mode iterator.
16649 (sse_cvttss2si<rex64namesuffix><round_saeonly_name>): Merge insn
16650 pattern from sse_cvttss2si<round_saeonly_name>
16651 and sse_cvttss2siq<round_saeonly_name> using SWI48 mode iterator.
16652 (avx512f_vcvtss2usi<rex64namesuffix><round_name>): Merge insn pattern
16653 from avx512f_vcvtss2usi<round_name> and avx512f_vcvtss2usiq<round_name>
16654 using SWI48 mode iterator.
16655 (avx512f_vcvttss2usi<rex64namesuffix><round_saeonly_name>): Merge
16656 insn pattern from avx512f_vcvttss2usi<round_saeonly_name> and
16657 avx512f_vcvttss2usiq<round_saeonly_name> using SWI48 mode iterator.
16658 (avx512f_vcvtsd2usi<rex64namesuffix><round_name>): Merge insn pattern
16659 from avx512f_vcvtsd2usi<round_name> and avx512f_vcvtsd2usiq<round_name>
16660 using SWI48 mode iterator.
16661 (avx512f_vcvttsd2usi<rex64namesuffix><round_saeonly_name>): Merge
16662 insn pattern from avx512f_vcvttsd2usi<round_saeonly_name> and
16663 avx512f_vcvttsd2usiq<round_saeonly_name> using SWI48 mode iterator.
16664 (sse2_cvtsd2si<rex64namesuffix><round_name>): Merge insn pattern from
16665 sse2_cvtsd2si<round_name> and sse2_cvtsd2siq<round_name> using
16666 SWI48 mode iterator.
16667 (sse2_cvtsd2si<rex64namesuffix>_2): Merge insn pattern from
16668 sse2_cvtsd2si_2 and sse2_cvtsd2siq_2 using SWI48 mode iterator.
16669 (sse_cvttsd2si<rex64namesuffix><round_saeonly_name>): Merge insn
16670 pattern from sse_cvttsd2si<round_saeonly_name>
16671 and sse_cvttsd2siq<round_saeonly_name> using SWI48 mode iterator.
16673 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
16675 * config/nds32/nds32-md-auxiliary.c
16676 (nds32_valid_smw_lwm_base_p): Refine.
16677 (nds32_output_smw_single_word): Refine.
16678 (nds32_output_smw_double_word): New.
16679 * config/nds32/nds32-protos.h (nds32_output_smw_double_word): New.
16681 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
16683 * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push): Refine.
16684 (nds32_output_stack_pop): Refine.
16685 (nds32_expand_unaligned_load): Refine.
16686 (nds32_expand_unaligned_store): Refine.
16688 2018-05-19 Kuan-Lin Chen <kuanlinchentw@gmail.com>
16689 Chung-Ju Wu <jasonwucj@gmail.com>
16691 * config/nds32/constants.md: Add TP_REGNUM constant.
16692 (unspec_element): Add UNSPEC_GOTINIT, UNSPEC_GOT, UNSPEC_GOTOFF,
16693 UNSPEC_PLT, UNSPEC_TLSGD, UNSPEC_TLSLD, UNSPEC_TLSIE, UNSPEC_TLSLE and
16695 * config/nds32/nds32-doubleword.md: Consider flag_pic.
16696 * config/nds32/nds32-dspext.md (mov<mode>): Expand TLS and PIC cases.
16697 * config/nds32/nds32-predicates.c (nds32_const_unspec_p): New.
16698 * config/nds32/nds32-md-auxiliary.c: Implementation that support TLS
16699 and PIC code generation.
16700 * config/nds32/nds32-protos.h: Declarations that support TLS and PIC
16702 * config/nds32/nds32-relax-opt.c: Consider TLS and PIC for relax
16704 * config/nds32/nds32.md: Support TLS and PIC.
16705 * config/nds32/nds32.c: Support TLS and PIC.
16706 * config/nds32/nds32.h (nds32_relax_insn_type): New enum type.
16707 * config/nds32/predicates.md (nds32_nonunspec_symbolic_operand): New
16710 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
16712 * config/nds32/nds32-predicates.c (const_vector_to_hwint): Use machine
16713 mode with E_ prefix.
16715 2018-05-19 Kuan-Lin Chen <kuanlinchentw@gmail.com>
16716 Chung-Ju Wu <jasonwucj@gmail.com>
16718 * config/nds32/constants.md (unspec_element): Add UNSPEC_ICT.
16719 * config/nds32/nds32-md-auxiliary.c
16720 (symbolic_reference_mentioned_p): New.
16721 (nds32_legitimize_ict_address): New.
16722 (nds32_expand_ict_move): New.
16723 (nds32_indirect_call_referenced_p): New.
16724 (nds32_symbol_binds_local_p): Delete.
16725 (nds32_long_call_p): Modify.
16726 * config/nds32/nds32-opts.h (nds32_ict_model_type): New enum type.
16727 * config/nds32/nds32-protos.h
16728 (symbolic_reference_mentioned_p): Declare.
16729 (nds32_legitimize_ict_address): Declare.
16730 (nds32_expand_ict_move): Declare.
16731 (nds32_indirect_call_referenced_p): Declare.
16732 * config/nds32/nds32-relax-opt.c (nds32_ict_const_p): New.
16733 (nds32_relax_group): Use nds32_ict_const_p as condition.
16734 * config/nds32/nds32.c (nds32_attribute_table): Add "indirect_call".
16735 (nds32_asm_file_start): Output ict_model directive in asm code.
16736 (nds32_legitimate_address_p): Consider indirect call.
16737 (nds32_print_operand): Consider indirect call.
16738 (nds32_print_operand_address): Consider indirect call.
16739 (nds32_insert_attributes): Handle "indirect_call" attribute.
16740 (TARGET_LEGITIMATE_ADDRESS_P): Define.
16741 (TARGET_LEGITIMATE_CONSTANT_P): Define.
16742 (TARGET_CANNOT_FORCE_CONST_MEM): Define.
16743 (TARGET_DELEGITIMIZE_ADDRESS): Define.
16744 (TARGET_ASM_OUTPUT_ADDR_CONST_EXTRA): Define.
16745 * config/nds32/nds32.h (SYMBOLIC_CONST_P): Define.
16746 (TARGET_ICT_MODEL_SMALL): Define.
16747 (TARGET_ICT_MODEL_LARGE): Define.
16748 * config/nds32/nds32.md (movsi): Consider ict model.
16749 (call, call_value): Consider ict model.
16750 (sibcall, sibcall_value): Consider ict model.
16751 * config/nds32/nds32.opt (mict-model): New option.
16752 * config/nds32/predicates.md (nds32_symbolic_operand): Consider ict
16755 2018-05-18 Kito Cheng <kito.cheng@gmail.com>
16756 Monk Chiang <sh.chiang04@gmail.com>
16757 Jim Wilson <jimw@sifive.com>
16759 * common/config/riscv/riscv-common.c (riscv_parse_arch_string):
16760 Add support to parse rv32e*. Clear MASK_RVE for rv32i and rv64i.
16761 * config.gcc (riscv*-*-*): Add support for rv32e* and ilp32e.
16762 * config/riscv/riscv-c.c (riscv_cpu_cpp_builtins): Define
16763 __riscv_32e when TARGET_RVE. Handle ABI_ILP32E as soft-float ABI.
16764 * config/riscv/riscv-opts.h (riscv_abi_type): Add ABI_ILP32E.
16765 * config/riscv/riscv.c (riscv_compute_frame_info): When TARGET_RVE,
16766 compute save_libcall_adjustment properly.
16767 (riscv_option_override): Call error if TARGET_RVE and not ABI_ILP32E.
16768 (riscv_conditional_register_usage): Handle TARGET_RVE and ABI_ILP32E.
16769 * config/riscv/riscv.h (UNITS_PER_FP_ARG): Handle ABI_ILP32E.
16770 (STACK_BOUNDARY, ABI_STACK_BOUNDARY): Handle TARGET_RVE.
16771 (GP_REG_LAST, MAX_ARGS_IN_REGISTERS): Likewise.
16772 (ABI_SPEC): Handle mabi=ilp32e.
16773 * config/riscv/riscv.opt (abi_type): Add ABI_ILP32E.
16774 (RVE): Add RVE mask.
16775 * doc/invoke.texi (RISC-V options) <-mabi>: Add ilp32e info.
16776 <-march>: Add rv32e as an example.
16778 2018-05-18 Marc Glisse <marc.glisse@inria.fr>
16781 * tree-ssa-structalias.c (create_variable_info_for_1): Extra argument.
16782 (intra_create_variable_infos): Handle C++ constructors.
16784 2018-05-18 Martin Liska <mliska@suse.cz>
16786 * passes.def: Remove a redundant pass.
16788 2018-05-18 Eric Botcazou <ebotcazou@adacore.com>
16791 * config/sparc/sparc.c (sparc_expand_builtin): Always initialize op[0].
16793 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
16795 * config/arm/arm-cpus.in (armv3m, mode32): Delete features.
16797 (ARMv2, ARMv3, ARMv3m): Delete fgroups.
16799 (armv2, armv2a, armv3, armv3m): Delete architectures.
16800 (arm2, arm250, arm3, arm6, arm60, arm600, arm610, arm620,
16801 arm7, arm7d, arm7di, arm70, arm700, arm700i, arm710, arm720,
16802 arm710c, arm7100, arm7500, arm7500fe, arm7m, arm7dm, arm7dmi):
16804 * config/arm/arm.md (maddsidi4): Remove check for arm_arch3m.
16805 (*mulsidi3adddi): Likewise.
16806 (mulsidi3): Likewise.
16807 (*mulsidi3_nov6): Likewise.
16808 (umulsidi3): Likewise.
16809 (umulsidi3_nov6): Likewise.
16810 (umaddsidi4): Likewise.
16811 (*umulsidi3adddi): Likewise.
16812 (smulsi3_highpart): Likewise.
16813 (*smulsi3_highpart_nov6): Likewise.
16814 (umulsi3_highpart): Likewise.
16815 (*umulsi3_highpart_nov6): Likewise.
16816 * config/arm/arm.h (arm_arch3m): Delete.
16817 * config/arm/arm.c (arm_arch3m): Delete.
16818 (arm_option_override_internal): Update armv3-related comment.
16819 (arm_configure_build_target): Delete use of isa_bit_mode32.
16820 (arm_option_reconfigure_globals): Delete set of arm_ach3m.
16821 (arm_rtx_costs_internal): Delete check of arm_arch3m.
16822 * config/arm/arm-fixed.md (mulsq3): Delete check for arm_arch3m.
16823 (mulsa3): Likewise.
16824 (mulusa3): Likewise.
16825 * config/arm/arm-protos.h (arm_arch3m): Delete.
16826 * config/arm/arm-tables.opt: Regenerate.
16827 * config/arm/arm-tune.md: Likewise.
16828 * config/arm/t-arm-elf (all_early_nofp): Delete mentions of
16829 deleted architectures.
16831 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
16833 * config/arm/arm-cpus.in (armv5, armv5e): Delete features.
16834 (armv5t, armv5te): New features.
16835 (ARMv5, ARMv5e): Delete fgroups.
16836 (ARMv5t, ARMv5te): Adjust for above changes.
16837 (ARMv6m): Likewise.
16838 (armv5, armv5e): Delete arches.
16839 * config/arm/arm.md (*call_reg_armv5): Use arm_arch5t instead of
16841 (*call_reg_arm): Likewise.
16842 (*call_value_reg_armv5): Likewise.
16843 (*call_value_reg_arm): Likewise.
16844 (*call_symbol): Likewise.
16845 (*call_value_symbol): Likewise.
16846 (*sibcall_insn): Likewise.
16847 (*sibcall_value_insn): Likewise.
16848 (clzsi2): Likewise.
16849 (prefetch): Likewise.
16850 (define_split and define_peephole2 dependent on arm_arch5):
16852 * config/arm/arm.h (TARGET_LDRD): Use arm_arch5te instead of
16854 (TARGET_ARM_QBIT): Likewise.
16855 (TARGET_DSP_MULTIPLY): Likewise.
16856 (enum base_architecture): Delete BASE_ARCH_5, BASE_ARCH_5E.
16857 (arm_arch5, arm_arch5e): Delete.
16858 (arm_arch5t, arm_arch5te): Declare.
16859 * config/arm/arm.c (arm_arch5, arm_arch5e): Delete.
16860 (arm_arch5t): Declare.
16861 (arm_option_reconfigure_globals): Update for the above.
16862 (arm_options_perform_arch_sanity_checks): Update comment, replace
16863 use of arm_arch5 with arm_arch5t.
16864 (use_return_insn): Likewise.
16865 (arm_emit_call_insn): Likewise.
16866 (output_return_instruction): Likewise.
16867 (arm_final_prescan_insn): Likewise.
16868 (arm_coproc_builtin_available): Likewise.
16869 * config/arm/arm-c.c (arm_cpu_builtins): Replace arm_arch5 and
16870 arm_arch5e with arm_arch5t and arm_arch5te.
16871 * config/arm/arm-protos.h (arm_arch5, arm_arch5e): Delete.
16872 (arm_arch5t, arm_arch5te): Declare.
16873 * config/arm/arm-tables.opt: Regenerate.
16874 * config/arm/t-arm-elf: Remove references to armv5, armv5e.
16875 * config/arm/t-multilib: Likewise.
16876 * config/arm/thumb1.md (*call_reg_thumb1_v5): Check arm_arch5t
16877 instead of arm_arch5.
16878 (*call_reg_thumb1): Likewise.
16879 (*call_value_reg_thumb1_v5): Likewise.
16880 (*call_value_reg_thumb1): Likewise.
16881 * config/arm/vxworks.h (TARGET_OS_CPP_BUILTINS): Remove now
16883 * doc/invoke.texi (ARM Options): Remove references to armv5, armv5e.
16885 2018-05-18 Martin Liska <mliska@suse.cz>
16887 PR gcov-profile/84846
16888 * doc/gcov.texi: Document -t option of gcov tool.
16890 2018-05-18 Martin Liska <mliska@suse.cz>
16892 PR gcov-profile/84846
16893 * gcov.c (print_usage): Add new -t option.
16894 (process_args): Handle the option.
16895 (generate_results): Use stdout as output when requested by
16898 2018-05-18 Martin Liska <mliska@suse.cz>
16900 PR gcov-profile/84846
16901 * coverage.c (coverage_init): Write PWD to .gcno file.
16902 * doc/gcov.texi: Document how working directory is printed.
16903 * gcov-dump.c (dump_gcov_file): Print PWD.
16904 * gcov.c (output_intermediate_file): Likewise.
16905 (read_graph_file): Read PWD string.
16906 (output_lines): Print PWD.
16908 2018-05-18 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
16910 PR middle-end/85817
16911 * ipa-pure-const.c (malloc_candidate_p): Remove the check integer_zerop
16912 for retval and return false if all args to phi are zero.
16914 2018-05-18 Richard Biener <rguenther@suse.de>
16916 * gimple-ssa-evrp.c (class evrp_folder): Add simplify_stmt_using_ranges
16918 (evrp_dom_walker::before_dom_children): Call it.
16920 2018-05-18 Richard Biener <rguenther@suse.de>
16922 * tree-dfa.c (get_ref_base_and_extent): Use range-info to refine
16923 results when processing array refs with variable index.
16925 2018-05-18 Toon Moene <toon@moene.org>
16927 * doc/invoke.texi: Move -floop-unroll-and-jam documentation
16928 directly after that of -floop-interchange. Indicate that both
16929 options are enabled by default when specifying -O3.
16931 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
16933 * config/aarch64/aarch64-simd.md (vec_set<mode>): Use VALL_F16 mode
16934 iterator. Delete separate integer-mode vec_set<mode> expander.
16935 (aarch64_simd_vec_setv2di): Delete.
16936 (vec_setv2di): Delete.
16937 (aarch64_simd_vec_set<mode>): Delete all other patterns with that name.
16938 Use VALL_F16 mode iterator. Add LD1 alternative and use vwcore for
16939 the "w, r" alternative.
16941 2018-05-18 Martin Liska <mliska@suse.cz>
16943 * passes.def: Add pass_lower_switch and pass_lower_switch_O0.
16944 * tree-pass.h (make_pass_lower_switch_O0): New function.
16945 * tree-switch-conversion.c (node_has_low_bound): Remove.
16946 (node_has_high_bound): Likewise.
16947 (node_is_bounded): Likewise.
16948 (class pass_lower_switch): Make it a template type and create
16950 (pass_lower_switch::execute): Add template argument.
16951 (make_pass_lower_switch): New function.
16952 (make_pass_lower_switch_O0): New function.
16953 (do_jump_if_equal): Remove.
16954 (emit_case_nodes): Simplify to just handle all 3 cases and leave
16955 all the hard work to tree optimization passes.
16957 2018-05-18 Martin Liska <mliska@suse.cz>
16959 * dbgcnt.c (limit_low): Renamed from limit.
16960 (limit_high): New variable.
16961 (dbg_cnt_is_enabled): Check for upper limit.
16962 (dbg_cnt): Adjust dumping.
16963 (dbg_cnt_set_limit_by_index): Add new argument for high
16965 (dbg_cnt_set_limit_by_name): Likewise.
16966 (dbg_cnt_process_single_pair): Parse new format.
16967 (dbg_cnt_process_opt): Use strtok.
16968 (dbg_cnt_list_all_counters): Remove 'value' and add
16970 * doc/invoke.texi: Document changes.
16972 2018-05-18 Richard Sandiford <richard.sandiford@linaro.org>
16974 * doc/sourcebuild.texi (scalar_all_fma): Document.
16975 * tree.def (FMA_EXPR): Delete.
16976 * internal-fn.def (FMA, FMS, FNMA, FNMS): New internal functions.
16977 * internal-fn.c (ternary_direct): New macro.
16978 (expand_ternary_optab_fn): Likewise.
16979 (direct_ternary_optab_supported_p): Likewise.
16980 * Makefile.in (build/genmatch.o): Depend on case-fn-macros.h.
16981 * builtins.c (fold_builtin_fma): Delete.
16982 (fold_builtin_3): Don't call it.
16983 * cfgexpand.c (expand_debug_expr): Remove FMA_EXPR handling.
16984 * expr.c (expand_expr_real_2): Likewise.
16985 * fold-const.c (operand_equal_p): Likewise.
16986 (fold_ternary_loc): Likewise.
16987 * gimple-pretty-print.c (dump_ternary_rhs): Likewise.
16988 * gimple.c (DEFTREECODE): Likewise.
16989 * gimplify.c (gimplify_expr): Likewise.
16990 * optabs-tree.c (optab_for_tree_code): Likewise.
16991 * tree-cfg.c (verify_gimple_assign_ternary): Likewise.
16992 * tree-eh.c (operation_could_trap_p): Likewise.
16993 (stmt_could_throw_1_p): Likewise.
16994 * tree-inline.c (estimate_operator_cost): Likewise.
16995 * tree-pretty-print.c (dump_generic_node): Likewise.
16996 (op_code_prio): Likewise.
16997 * tree-ssa-loop-im.c (stmt_cost): Likewise.
16998 * tree-ssa-operands.c (get_expr_operands): Likewise.
16999 * tree.c (commutative_ternary_tree_code, add_expr): Likewise.
17000 * fold-const-call.h (fold_fma): Delete.
17001 * fold-const-call.c (fold_const_call_ssss): Handle CFN_FMS,
17002 CFN_FNMA and CFN_FNMS.
17003 (fold_fma): Delete.
17004 * genmatch.c (combined_fn): New enum.
17005 (commutative_ternary_tree_code): Remove FMA_EXPR handling.
17006 (commutative_op): New function.
17007 (commutate): Use it. Handle more than 2 operands.
17008 (dt_operand::gen_gimple_expr): Use commutative_op.
17009 (parser::parse_expr): Allow :c to be used with non-binary
17010 operators if the commutative operand is known.
17011 * gimple-ssa-backprop.c (backprop::process_builtin_call_use): Handle
17012 CFN_FMS, CFN_FNMA and CFN_FNMS.
17013 (backprop::process_assign_use): Remove FMA_EXPR handling.
17014 * hsa-gen.c (gen_hsa_insns_for_operation_assignment): Likewise.
17015 (gen_hsa_fma): New function.
17016 (gen_hsa_insn_for_internal_fn_call): Use it for IFN_FMA, IFN_FMS,
17017 IFN_FNMA and IFN_FNMS.
17018 * match.pd: Add folds for IFN_FMS, IFN_FNMA and IFN_FNMS.
17019 * gimple-fold.h (follow_all_ssa_edges): Declare.
17020 * gimple-fold.c (follow_all_ssa_edges): New function.
17021 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Use the
17022 gimple_build interface and use follow_all_ssa_edges to fold the result.
17023 (convert_mult_to_fma): Use direct_internal_fn_suppoerted_p
17024 instead of checking for optabs directly.
17025 * config/i386/i386.c (ix86_add_stmt_cost): Recognize FMAs as calls
17026 rather than FMA_EXPRs.
17027 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Create a
17028 call to IFN_FMA instead of an FMA_EXPR.
17030 2018-05-17 Jim Wilson <jimw@sifive.com>
17032 * expr.c (do_tablejump): When converting index to Pmode, if we have a
17033 sign extended promoted subreg, and the range does not have the sign bit
17034 set, then do a sign extend.
17036 * config/riscv/riscv.c (riscv_extend_comparands): In unsigned QImode
17037 test, check for sign extended subreg and/or constant operands, and
17038 do a sign extend in that case.
17040 2018-05-17 Steve Ellcey <sellcey@cavium.com>
17042 * config/aarch64/thunderx2t99.md (thunderx2t99_ls_both): Delete.
17043 (thunderx2t99_multiple): Delete psuedo-units from used cpus.
17045 (thunderx2t99_alu_shift): Remove alu_shift_reg, alus_shift_reg.
17046 Change logics_shift_reg to logics_shift_imm.
17047 (thunderx2t99_fp_loadpair_basic): Delete.
17048 (thunderx2t99_fp_storepair_basic): Delete.
17049 (thunderx2t99_asimd_int): Add neon_sub and neon_sub_q types.
17050 (thunderx2t99_asimd_polynomial): Delete.
17051 (thunderx2t99_asimd_fp_simple): Add neon_fp_mul_s_scalar_q
17052 and neon_fp_mul_d_scalar_q.
17053 (thunderx2t99_asimd_fp_conv): Add *int_to_fp* types.
17054 (thunderx2t99_asimd_misc): Delete neon_dup and neon_dup_q.
17055 (thunderx2t99_asimd_recip_step): Add missing *sqrt* types.
17056 (thunderx2t99_asimd_lut): Add missing tbl types.
17057 (thunderx2t99_asimd_ext): Delete.
17058 (thunderx2t99_asimd_load1_1_mult): Delete.
17059 (thunderx2t99_asimd_load1_2_mult): Delete.
17060 (thunderx2t99_asimd_load1_ldp): New.
17061 (thunderx2t99_asimd_load1): New.
17062 (thunderx2t99_asimd_load2): Add missing *load2* types.
17063 (thunderx2t99_asimd_load3): New.
17064 (thunderx2t99_asimd_load4): New.
17065 (thunderx2t99_asimd_store1_1_mult): Delete.
17066 (thunderx2t99_asimd_store1_2_mult): Delete.
17067 (thunderx2t99_asimd_store2_mult): Delete.
17068 (thunderx2t99_asimd_store2_onelane): Delete.
17069 (thunderx2t99_asimd_store_stp): New.
17070 (thunderx2t99_asimd_store1): New.
17071 (thunderx2t99_asimd_store2): New.
17072 (thunderx2t99_asimd_store3): New.
17073 (thunderx2t99_asimd_store4): New.
17075 2018-05-17 Jerome Lambourg <lambourg@adacore.com>
17077 * config/arm/arm_cmse.h (cmse_nsfptr_create, cmse_is_nsfptr): Remove
17078 #include <stdint.h>. Replace intptr_t with __INTPTR_TYPE__.
17080 2018-05-17 Pat Haugen <pthaugen@us.ibm.com>
17081 Segher Boessenkool <segher@kernel.crashing.org>
17084 * config/rs6000/rs6000.c (rs6000_output_move_128bit): Check dest
17087 2018-05-17 Richard Biener <rguenther@suse.de>
17089 * tree-ssa-dse.c (dse_classify_store): Fix iterator increment
17090 for pruning loop and prune defs feeding only already visited PHIs.
17092 2018-05-17 Richard Biener <rguenther@suse.de>
17094 * tree-ssa-sccvn.c (vn_reference_lookup_3): Improve memset handling.
17096 2018-05-17 Bin Cheng <bin.cheng@arm.com>
17097 Richard Biener <rguenther@suse.de>
17099 PR tree-optimization/85793
17100 * tree-vect-stmts.c (vectorizable_load): Handle 1 element-wise load
17101 for VMAT_ELEMENTWISE.
17103 2018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
17105 * internal-fn.h (lookup_internal_fn): Declare
17106 * internal-fn.c (lookup_internal_fn): New function.
17107 * gimple.c (gimple_build_call_from_tree): Handle calls to
17108 internal functions.
17109 * gimple-pretty-print.c (dump_gimple_call): Print "." before
17110 internal function names.
17111 * tree-pretty-print.c (dump_generic_node): Likewise.
17112 * tree-ssa-scopedtables.c (expr_hash_elt::print): Likewise.
17114 2018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
17116 * gimple-fold.h (gimple_build): Make the function forms take
17117 combined_fn rather than built_in_function.
17118 (gimple_simplify): Likewise.
17119 * gimple-match-head.c (gimple_simplify): Likewise.
17120 * gimple-fold.c (gimple_build): Likewise.
17121 * tree-vect-loop.c (get_initial_def_for_reduction): Use gimple_build
17122 rather than gimple_build_call_internal.
17123 (get_initial_defs_for_reduction): Likewise.
17124 (vect_create_epilog_for_reduction): Likewise.
17125 (vectorizable_live_operation): Likewise.
17127 2018-05-17 Martin Liska <mliska@suse.cz>
17129 * gimple-ssa-sprintf.c (format_directive): Do not use
17130 space in between 'G_' and '('.
17132 2018-05-17 Jakub Jelinek <jakub@redhat.com>
17135 * config/i386/i386.c (ix86_fold_builtin): Handle masked shifts
17136 even if the mask is not all ones.
17139 * config/i386/i386.c (ix86_fold_builtin): Fold shift builtins by
17141 (ix86_gimple_fold_builtin): Likewise.
17144 * config/i386/i386.c: Include tree-vector-builder.h.
17145 (ix86_vector_shift_count): New function.
17146 (ix86_fold_builtin): Fold shift builtins by scalar count.
17147 (ix86_gimple_fold_builtin): Likewise.
17149 * config/i386/avx512fintrin.h (_mm512_set_epi16, _mm512_set_epi8,
17150 _mm512_setzero): New intrinsics.
17152 2018-05-17 James Greenhalgh <james.greenhalgh@arm.com>
17153 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
17155 * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify
17156 code generation for cases where splatting a value is not useful.
17157 * simplify-rtx.c (simplify_ternary_operation): Simplify
17158 vec_merge across a vec_duplicate and a paradoxical subreg forming
17159 a vector mode to a vec_concat.
17161 2018-05-17 Olga Makhotina <olga.makhotina@intel.com>
17163 * config.gcc: Support "goldmont-plus".
17164 * config/i386/driver-i386.c (host_detect_local_cpu): Detect
17166 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
17167 PROCESSOR_GOLDMONT_PLUS.
17168 * config/i386/i386.c (m_GOLDMONT_PLUS): Define.
17169 (processor_target_table): Add "goldmont-plus".
17170 (PTA_GOLDMONT_PLUS): Define.
17171 (ix86_lea_outperforms): Add TARGET_GOLDMONT_PLUS.
17172 (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT_PLUS.
17173 (fold_builtin_cpu): Add M_INTEL_GOLDMONT_PLUS.
17174 (fold_builtin_cpu): Add "goldmont-plus".
17175 (ix86_add_stmt_cost): Add TARGET_GOLDMONT_PLUS.
17176 (ix86_option_override_internal): Add "goldmont-plus".
17177 * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT_PLUS.
17178 (processor_type): Add PROCESSOR_GOLDMONT_PLUS.
17179 * config/i386/x86-tune.def: Add m_GOLDMONT_PLUS.
17180 * doc/invoke.texi: Add goldmont-plus as x86 -march=/-mtune= CPU type.
17182 2018-05-17 Richard Biener <rguenther@suse.de>
17184 PR tree-optimization/85757
17185 * tree-ssa-dse.c (dse_classify_store): Record a PHI def and
17186 remove defs that only feed that PHI from further processing.
17188 2018-05-16 Jim Wilson <jimw@sifive.com>
17190 * config/riscv/riscv.md (<optab>si3_mask, <optab>si3_mask_1): Prepend
17192 (<optab>di3_mask, <optab>di3_mask_1): Likewise.
17194 2018-05-16 Mark Wielaard <mark@klomp.org>
17196 * dwarf2out.c (count_index_strings): New function.
17197 (output_indirect_strings): Call count_index_strings and generate
17198 header for dwarf_version >= 5.
17200 2018-05-16 Mark Wielaard <mark@klomp.org>
17202 * dwarf2out.c (dwarf_FORM): New function.
17203 (set_indirect_string): Use dwarf_FORM.
17204 (reset_indirect_string): Likewise.
17205 (size_of_die): Likewise.
17206 (value_format): Likewise.
17207 (output_die): Likewise.
17208 (add_skeleton_AT_string): Likewise.
17209 (output_macinfo_op): Likewise.
17210 (index_string): Likewise.
17211 (output_index_string_offset): Likewise.
17212 (output_index_string): Likewise.
17213 (count_index_strings): Likewise.
17215 2018-05-16 Carl Love <cel@us.ibm.com>
17217 * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
17218 dcbt and dcbtstt with TH=16 if operands[2] is 0 and Power 8 or newer.
17220 2018-05-16 Martin Jambor <mjambor@suse.cz>
17222 * ipa-prop.c (ipa_free_all_edge_args): Remove.
17223 * ipa-prop.h (ipa_free_all_edge_args): Likewise.
17225 2018-05-16 Wilco Dijkstra <wdijkstr@arm.com>
17227 * config/aarch64/aarch64.md (fma<mode>4): Change into expand pattern.
17228 (fnma<mode>4): Likewise.
17229 (fms<mode>4): Likewise.
17230 (fnms<mode>4): Likewise.
17231 (aarch64_fma<mode>4): Rename insn, reorder accumulator operand.
17232 (aarch64_fnma<mode>4): Likewise.
17233 (aarch64_fms<mode>4): Likewise.
17234 (aarch64_fnms<mode>4): Likewise.
17235 (aarch64_fnmadd<mode>4): Likewise.
17237 2018-05-16 Jason Merrill <jason@redhat.com>
17239 * tree.c (warn_deprecated_use): Return bool. Simplify logic.
17241 2018-05-16 Richard Biener <rguenther@suse.de>
17243 * tree-vectorizer.h (struct stmt_info_for_cost): Add where member.
17244 (dump_stmt_cost): Declare.
17245 (add_stmt_cost): Dump cost we add.
17246 (add_stmt_costs): New function.
17247 (vect_model_simple_cost, vect_model_store_cost, vect_model_load_cost):
17248 No longer exported.
17249 (vect_analyze_stmt): Adjust prototype.
17250 (vectorizable_condition): Likewise.
17251 (vectorizable_live_operation): Likewise.
17252 (vectorizable_reduction): Likewise.
17253 (vectorizable_induction): Likewise.
17254 * tree-vect-loop.c (vect_analyze_loop_operations): Create local
17255 cost vector to pass to vectorizable_ and record afterwards.
17256 (vect_model_reduction_cost): Take cost vector argument and adjust.
17257 (vect_model_induction_cost): Likewise.
17258 (vectorizable_reduction): Likewise.
17259 (vectorizable_induction): Likewise.
17260 (vectorizable_live_operation): Likewise.
17261 * tree-vect-slp.c (vect_create_new_slp_node): Initialize
17262 SLP_TREE_NUMBER_OF_VEC_STMTS.
17263 (vect_analyze_slp_cost_1): Remove.
17264 (vect_analyze_slp_cost): Likewise.
17265 (vect_slp_analyze_node_operations): Take visited args and
17266 a target cost vector. Avoid processing already visited stmt sets.
17267 (vect_slp_analyze_operations): Use a local cost vector to gather
17268 costs and register those of non-discarded instances.
17269 (vect_bb_vectorization_profitable_p): Use add_stmt_costs.
17270 (vect_schedule_slp_instance): Remove copying of
17271 SLP_TREE_NUMBER_OF_VEC_STMTS. Instead assert that it is not
17273 * tree-vect-stmts.c (record_stmt_cost): Remove path directly
17274 adding cost. Record cost entry location.
17275 (vect_prologue_cost_for_slp_op): Function to compute cost of
17276 a constant or invariant generated for SLP vect in the prologue,
17277 split out from vect_analyze_slp_cost_1.
17278 (vect_model_simple_cost): Make static. Adjust for SLP costing.
17279 (vect_model_promotion_demotion_cost): Likewise.
17280 (vect_model_store_cost): Likewise, make static.
17281 (vect_model_load_cost): Likewise.
17282 (vectorizable_bswap): Add cost vector arg and adjust.
17283 (vectorizable_call): Likewise.
17284 (vectorizable_simd_clone_call): Likewise.
17285 (vectorizable_conversion): Likewise.
17286 (vectorizable_assignment): Likewise.
17287 (vectorizable_shift): Likewise.
17288 (vectorizable_operation): Likewise.
17289 (vectorizable_store): Likewise.
17290 (vectorizable_load): Likewise.
17291 (vectorizable_condition): Likewise.
17292 (vectorizable_comparison): Likewise.
17293 (can_vectorize_live_stmts): Likewise.
17294 (vect_analyze_stmt): Likewise.
17295 (vect_transform_stmt): Adjust calls to vectorizable_*.
17296 * tree-vectorizer.c: Include gimple-pretty-print.h.
17297 (dump_stmt_cost): New function.
17299 2018-05-16 Richard Biener <rguenther@suse.de>
17301 * params.def (PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE): New param.
17302 * doc/invoke.texi (dse-max-alias-queries-per-store): Document.
17303 * tree-ssa-dse.c: Include tree-ssa-loop.h.
17304 (check_name): New callback.
17305 (dse_classify_store): Track cycles via a visited bitmap of PHI
17306 defs and simplify handling of in-loop and across loop dead stores
17307 and properly fail for loop-variant refs. Handle byte-tracking with
17308 multiple defs. Use PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE for
17311 2018-05-16 Richard Sandiford <richard.sandiford@linaro.org>
17313 * tree-vectorizer.h (vect_get_vector_types_for_stmt): Declare.
17314 (vect_get_mask_type_for_stmt): Likewise.
17315 * tree-vect-slp.c (vect_two_operations_perm_ok_p): New function,
17317 (vect_build_slp_tree_1): ...here. Use vect_get_vector_types_for_stmt
17318 to determine the statement's vector type and the vector type that
17319 should be used for calculating nunits. Deal with cases in which
17320 the type has to be deferred.
17321 (vect_slp_analyze_node_operations): Use vect_get_vector_types_for_stmt
17322 and vect_get_mask_type_for_stmt to calculate STMT_VINFO_VECTYPE.
17323 * tree-vect-loop.c (vect_determine_vf_for_stmt_1)
17324 (vect_determine_vf_for_stmt): New functions, split out from...
17325 (vect_determine_vectorization_factor): ...here.
17326 * tree-vect-stmts.c (vect_get_vector_types_for_stmt)
17327 (vect_get_mask_type_for_stmt): New functions, split out from
17328 vect_determine_vectorization_factor.
17330 2018-05-16 Richard Biener <rguenther@suse.de>
17332 * tree-cfg.c (verify_gimple_assign_ternary): Properly
17333 verify the [VEC_]COND_EXPR embedded comparison.
17335 2018-05-15 Martin Sebor <msebor@redhat.com>
17337 PR tree-optimization/85753
17338 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Handle
17339 RECORD_TYPE in addition to ARRAY_TYPE.
17341 2018-05-15 Martin Sebor <msebor@redhat.com>
17343 PR middle-end/85643
17344 * calls.c (get_attr_nonstring_decl): Handle MEM_REF.
17346 2018-05-15 Richard Biener <rguenther@suse.de>
17348 * tree-ssa-dse.c (dse_classify_store): Remove use_stmt parameter,
17349 add by_clobber_p one. Change algorithm to collect all defs
17350 representing uses we need to walk and try reducing them to
17351 a single one before failing.
17352 (dse_dom_walker::dse_optimize_stmt): Adjust.
17354 2018-05-13 Mark Wielaard <mark@klomp.org>
17356 * dwarf2out.c (dwarf_OP): Handle DW_OP_addrx and DW_OP_constx.
17357 (size_of_loc_descr): Likewise.
17358 (output_loc_operands): Likewise.
17359 (output_loc_operands_raw): Likewise.
17360 (dw_addr_op): Use dwarf_OP () for DW_OP_constx and DW_OP_addrx.
17361 (resolve_addr_in_expr): Handle DW_OP_addrx and DW_OP_constx.
17362 (hash_loc_operands): Likewise.
17363 (compare_loc_operands): Likewise.
17365 2018-05-14 Mark Wielaard <mark@klomp.org>
17367 * dwarf2out.c (count_index_addrs): New function.
17368 (dwarf2out_finish): Use count_index_addrs to calculate addrs_length.
17370 2018-05-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
17372 PR tree-optimization/83648
17373 * ipa-pure-const.c (malloc_candidate_p): Allow function with NULL
17374 return value as malloc candidate.
17376 2018-05-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
17379 * ipa-pure-const.c (warn_function_malloc): Pass value of known_finite
17380 param as true in call to suggest_attribute.
17382 2018-05-14 Segher Boessenkool <segher@kernel.crashing.org>
17384 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete @itemx for
17385 -mreadonly-in-sdata.
17387 2018-05-14 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
17389 * config/aarch64/aarch64-simd.md (*aarch64_crypto_aese_fused):
17391 (aarch64_crypto_aesd_fused): Likewise.
17393 2018-05-14 Wilco Dijkstra <wdijkstr@arm.com>
17395 * config/aarch64/aarch64.md (mov<mode>): Remove '*' in alternatives.
17396 (movsi_aarch64): Likewise.
17397 (load_pairsi): Likewise.
17398 (load_pairdi): Likewise.
17399 (store_pairsi): Likewise.
17400 (store_pairdi): Likewise.
17401 (load_pairsf): Likewise.
17402 (load_pairdf): Likewise.
17403 (store_pairsf): Likewise.
17404 (store_pairdf): Likewise.
17405 (zero_extend): Likewise.
17406 (trunc): Swap alternatives.
17407 (fcvt_target): Add '?' to prefer w over r.
17409 2018-05-14 Jakub Jelinek <jakub@redhat.com>
17412 * config/i386/i386.md: Disallow non-commutative arithmetics in
17413 last twpeephole for mem {+,-,&,|,^}= x; mem != 0 after cmpelim
17414 optimization. Use COMMUTATIVE_ARITH_P test rather than != MINUS
17415 in the peephole2 before it.
17417 2018-05-14 Sebastian Peryt <sebastian.peryt@intel.com>
17419 * common/config/i386/i386-common.c (OPTION_MASK_ISA_CLDEMOTE_SET,
17420 OPTION_MASK_ISA_CLDEMOTE_UNSET): New defines.
17421 (ix86_handle_option): Handle -mcldemote.
17422 * config.gcc: New header.
17423 * config/i386/cldemoteintrin.h: New file.
17424 * config/i386/cpuid.h (bit_CLDEMOTE): New bit.
17425 * config/i386/driver-i386.c (host_detect_local_cpu): Detect
17427 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
17428 OPTION_MASK_ISA_CLDEMOTE.
17429 * config/i386/i386.c (ix86_target_string): Add -mcldemote.
17430 (ix86_valid_target_attribute_inner_p): Ditto.
17431 (enum ix86_builtins): Add IX86_BUILTIN_CLDEMOTE.
17432 (ix86_init_mmx_sse_builtins): Define __builtin_ia32_cldemote.
17433 (ix86_expand_builtin): Expand IX86_BUILTIN_CLDEMOTE.
17434 * config/i386/i386.h (TARGET_CLDEMOTE, TARGET_CLDEMOTE_P): New.
17435 * config/i386/i386.md (UNSPECV_CLDEMOTE): New.
17437 * config/i386/i386.opt: Add -mcldemote.
17438 * config/i386/x86intrin.h: New header.
17439 * doc/invoke.texi: Add -mcldemote.
17441 2018-05-14 Richard Biener <rguenther@suse.de>
17443 * doc/match-and-simplify.texi: Adjust :s documentation.
17445 2018-05-14 Alexander Monakov <amonakov@ispras.ru>
17447 * sort.cc (REORDER_23): Pass the type for the temporaries instead of
17448 intended memcpy size.
17449 (REORDER_45): Likewise.
17451 2018-05-13 Alexander Monakov <amonakov@ispras.ru>
17453 * sort.cc: New file.
17454 * system.h [!CHECKING_P] (qsort): Redirect to gcc_qsort.
17455 * vec.c (qsort_chk): Use gcc_qsort.
17456 * Makefile.in (OBJS-libcommon): Add sort.o.
17457 (build/sort.o): New target. Use it...
17458 (BUILD_RTL): ... here, and...
17459 (build/gencfn-macros): ... here, and...
17460 (build/genmatch): ... here.
17462 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
17463 Chung-Ju Wu <jasonwucj@gmail.com>
17465 * config.gcc (nds32*-*-*): Check that n15 is valid to --with-cpu.
17466 * config/nds32/nds32-graywolf.md: New file.
17467 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_GRAYWOLF.
17468 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n15
17470 * config/nds32/nds32-protos.h: More declarations for n15 pipeline.
17471 * config/nds32/nds32-utils.c: More implementations for n15 pipeline.
17472 * config/nds32/nds32.md (pipeline_model): Add graywolf.
17473 * config/nds32/nds32.opt (mcpu): Support n15 pipeline cpus.
17474 * config/nds32/pipelines.md: Include n15 settings.
17476 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
17477 Chung-Ju Wu <jasonwucj@gmail.com>
17479 * config.gcc (nds32*-*-*): Check that n12/n13 are valid to --with-cpu.
17480 * config/nds32/nds32-n13.md: New file.
17481 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N12 and CPU_N13.
17482 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n12/n13
17484 * config/nds32/nds32-protos.h: More declarations for n12/n13 pipeline.
17485 * config/nds32/nds32.md (pipeline_model): Add n13.
17486 * config/nds32/nds32.opt (mcpu): Support n12/n13 pipeline cpus.
17487 * config/nds32/pipelines.md: Include n13 settings.
17489 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
17490 Chung-Ju Wu <jasonwucj@gmail.com>
17492 * config.gcc (nds32*-*-*): Check that n10/d10 are valid to --with-cpu.
17493 * config/nds32/nds32-n10.md: New file.
17494 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N10.
17495 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n10
17497 * config/nds32/nds32-protos.h: More declarations for n10 pipeline.
17498 * config/nds32/nds32-utils.c: More implementations for n10 pipeline.
17499 * config/nds32/nds32.md (pipeline_model): Add n10.
17500 * config/nds32/nds32.opt (mcpu): Support n10 pipeline cpus.
17501 * config/nds32/pipelines.md: Include n10 settings.
17503 2018-05-13 Monk Chiang <sh.chiang04@gmail.com>
17504 Kito Cheng <kito.cheng@gmail.com>
17505 Chung-Ju Wu <jasonwucj@gmail.com>
17507 * config.gcc (nds32be-*-*): Handle --with-ext-dsp.
17508 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
17509 Add enum values for DSP extension instructions.
17510 * config/nds32/constraints.md (Iu06, IU06, CVp5, CVs5, CVs2, CVhi):
17512 * config/nds32/iterators.md (shifts, shiftrt, sat_plus, all_plus,
17513 sat_minus, all_minus, plus_minus, extend, sumax, sumin, sumin_max):
17514 New code iterators.
17515 (su, zs, uk, opcode, add_rsub, add_sub): New code attributes.
17516 * config/nds32/nds32-dspext.md: New file for DSP implementation.
17517 * config/nds32/nds32-intrinsic.c: Implementation of DSP extension.
17518 * config/nds32/nds32-intrinsic.md: Likewise.
17519 * config/nds32/nds32_intrinsic.h: Likewise.
17520 * config/nds32/nds32-md-auxiliary.c: Likewise.
17521 * config/nds32/nds32-memory-manipulation.c: Consider DSP extension.
17522 * config/nds32/nds32-predicates.c (const_vector_to_hwint): New.
17523 (nds32_valid_CVp5_p, nds32_valid_CVs5_p): New.
17524 (nds32_valid_CVs2_p, nds32_valid_CVhi_p): New.
17525 * config/nds32/nds32-protos.h: New declarations for DSP extension.
17526 * config/nds32/nds32-utils.c (extract_mac_non_acc_rtx): New case
17527 TYPE_DMAC in switch statement.
17528 * config/nds32/nds32.c: New checking and implementation for DSP
17529 extension instructions.
17530 * config/nds32/nds32.h: Likewise.
17531 * config/nds32/nds32.md: Likewise.
17532 * config/nds32/nds32.opt (mhw-abs, mext-dsp): New options.
17533 * config/nds32/predicates.md: Implement new predicates for DSP
17536 2018-05-11 Michael Meissner <meissner@linux.vnet.ibm.com>
17538 * config/rs6000/rs6000.md (mov<mode>_softfloat, FMOVE32):
17539 Reformat alternatives and attributes so it is easier to identify
17540 which constraints/attributes go with which instruction.
17541 (mov<mode>_hardfloat32, FMOVE64): Likewise.
17542 (mov<mode>_softfloat32, FMOVE64): Likewise.
17543 (mov<mode>_hardfloat64, FMOVE64): Likewise.
17544 (mov<mode>_softfloat64, FMOVE64): Likewise.
17546 2018-05-11 Kelvin Nilsen <kelvin@gcc.gnu.org>
17548 * doc/extend.texi (PowerPC Built-in Functions): Rename this
17550 (Basic PowerPC Built-in Functions): The new name of the
17551 subsection previously known as "PowerPC Built-in Functions".
17552 (Basic PowerPC Built-in Functions Available on all Configurations):
17554 (Basic PowerPC Built-in Functions Available on ISA 2.05): Likewise.
17555 (Basic PowerPC Built-in Functions Available on ISA 2.06): Likewise.
17556 (Basic PowerPC Built-in Functions Available on ISA 2.07): Likewise.
17557 (Basic PowerPC Built-in Functions Available on ISA 3.0): Likewise.
17559 2018-05-11 Martin Jambor <mjambor@suse.cz>
17562 * ipa-cp.c (intersect_with_plats): Check that the lattice contains
17565 2018-05-11 Richard Earnshaw <rearnsha@arm.com>
17568 * config/arm/arm-cpus.in (fgroup ARMv6m): Add be8 feature.
17570 2018-05-11 Sebastian Peryt <sebastian.peryt@intel.com>
17572 * common/config/i386/i386-common.c (OPTION_MASK_ISA_WAITPKG_SET,
17573 OPTION_MASK_ISA_WAITPKG_UNSET): New defines.
17574 (ix86_handle_option): Handle -mwaitpkg.
17575 * config.gcc: New header.
17576 * config/i386/cpuid.h (bit_WAITPKG): New bit.
17577 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mwaitpkg.
17578 * config/i386/i386-builtin-types.def ((UINT8, UNSIGNED, UINT64)): New
17580 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
17581 OPTION_MASK_ISA_WAITPKG.
17582 * config/i386/i386.c (ix86_target_string): Add -mwaitpkg.
17583 (ix86_option_override_internal): Add PTA_WAITPKG.
17584 (ix86_valid_target_attribute_inner_p): Add -mwaitpkg.
17585 (enum ix86_builtins): Add IX86_BUILTIN_UMONITOR, IX86_BUILTIN_UMWAIT,
17586 IX86_BUILTIN_TPAUSE.
17587 (ix86_init_mmx_sse_builtins): Define __builtin_ia32_umonitor,
17588 __builtin_ia32_umwait and __builtin_ia32_tpause.
17589 (ix86_expand_builtin): Expand IX86_BUILTIN_UMONITOR,
17590 IX86_BUILTIN_UMWAIT, IX86_BUILTIN_TPAUSE.
17591 * config/i386/i386.h (TARGET_WAITPKG, TARGET_WAITPKG_P): New.
17592 * config/i386/i386.md (UNSPECV_UMWAIT, UNSPECV_UMONITOR,
17593 UNSPECV_TPAUSE): New.
17594 (umwait, umwait_rex64, umonitor_<mode>, tpause, tpause_rex64): New.
17595 * config/i386/i386.opt: Add -mwaitpkg.
17596 * config/i386/waitpkgintrin.h: New file.
17597 * config/i386/x86intrin.h: New header.
17598 * doc/invoke.texi: Add -mwaitpkg.
17600 2018-05-11 Richard Earnshaw <rearnsha@arm.com>
17603 * config/arm/arm-cpus.in: Add comment that ARMv6-m and ARMv6S-m are now
17605 (cortex-m0): Use armv6s-m isa.
17606 (cortex-m0plus): Likewise.
17607 (cortex-m1): Likewise.
17608 (cortex-m0.small-multiply): Likewise.
17609 (cortex-m0plus.small-multiply): Likewise.
17610 (cortex-m1.small-multiply): Likewise.
17612 2018-05-11 Allan Sandfeld Jensen <allan.jensen@qt.io>
17613 Jakub Jelinek <jakub@redhat.com>
17615 PR tree-optimization/85692
17616 * tree-ssa-forwprop.c (simplify_vector_constructor): Try two
17617 source permute as well.
17619 2018-05-11 Martin Liska <mliska@suse.cz>
17622 * doc/extend.texi: Document LLVM style format for no_sanitize
17625 2018-05-10 Michael Meissner <meissner@linux.vnet.ibm.com>
17627 * config/rs6000/rs6000.c (mode_supports_dq_form): Rename
17628 mode_supports_vsx_dform_quad to mode_supports_dq_form.
17629 (mode_supports_vsx_dform_quad): Likewise.
17630 (mode_supports_vmx_dform): Move these functions to be next to the
17631 other mode_supports functions.
17632 (mode_supports_dq_form): Likewise.
17633 (quad_address_p): Change calls of mode_supports_vsx_dform_quad to
17634 mode_supports_dq_form.
17635 (reg_offset_addressing_ok_p): Likewise.
17636 (offsettable_ok_by_alignment): Likewise.
17637 (rs6000_legitimate_offset_address_p): Likewise.
17638 (legitimate_lo_sum_address_p): Likewise.
17639 (rs6000_legitimize_address): Likewise.
17640 (rs6000_legitimize_reload_address): Likewise.
17641 (rs6000_secondary_reload_inner): Likewise.
17642 (rs6000_preferred_reload_class): Likewise.
17643 (rs6000_output_move_128bit): Likewise.
17645 2018-05-10 Uros Bizjak <ubizjak@gmail.com>
17647 * config/i386/i386.c (ix86_expand_builtin) <case IX86_BUILTIN_RDPID>:
17648 Generate SImode target register for null target.
17649 <case IX86_BUILTIN_XGETBV>: Ditto.
17650 <case IX86_BUILTIN_XSETBV>: Optimize LSHIFTRT generation.
17651 * config/i386/xsaveintrin.h (_xgetbv): Add missing return.
17653 2018-05-10 Carl Love <cel@us.ibm.com>
17655 * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
17656 dcbtt and dcbtstt if operands[2] is 0.
17658 2018-05-10 Uros Bizjak <ubizjak@gmail.com>
17661 * config/i386/sse.md (usadv64qi): New expander.
17663 2018-05-10 Segher Boessenkool <segher@kernel.crashing.org>
17665 * config/rs6000/altivec.md (altivec_vmrghb, altivec_vmrghh,
17666 altivec_vmrghw, altivec_vmrglb, altivec_vmrglh, altivec_vmrglw): Remove
17667 -maltivec=be support.
17668 (vec_widen_umult_even_v16qi, vec_widen_smult_even_v16qi,
17669 vec_widen_umult_even_v8hi, vec_widen_smult_even_v8hi,
17670 vec_widen_umult_even_v4si, vec_widen_smult_even_v4si,
17671 vec_widen_umult_odd_v16qi, vec_widen_smult_odd_v16qi,
17672 vec_widen_umult_odd_v8hi, vec_widen_smult_odd_v8hi,
17673 vec_widen_umult_odd_v4si, vec_widen_smult_odd_v4si, altivec_vpkpx,
17674 altivec_vpks<VI_char>ss, altivec_vpks<VI_char>us,
17675 altivec_vpku<VI_char>us, altivec_vpku<VI_char>um, altivec_vsum2sws,
17676 altivec_vsumsws): Adjust.
17677 (altivec_vspltb *altivec_vspltb_internal, altivec_vsplth,
17678 *altivec_vsplth_internal, altivec_vspltw, *altivec_vspltw_internal,
17679 altivec_vspltsf, *altivec_vspltsf_internal): Remove -maltivec=be
17681 (altivec_vperm_<mode>, altivec_vperm_<mode>_uns,
17682 altivec_vupkhs<VU_char>, altivec_vupkls<VU_char>, altivec_vupkhpx,
17683 altivec_vupklpx, altivec_lvsl, altivec_lvsr): Adjust.
17684 (altivec_lve<VI_char>x): Delete expand.
17685 (*altivec_lve<VI_char>x_internal): Rename to...
17686 (altivec_lve<VI_char>x): ... this.
17687 (altivec_lvxl_<mode>): Delete expand.
17688 (*altivec_lvxl_<mode>_internal): Rename to ...
17689 (altivec_lvxl_<mode>): ... this.
17690 (altivec_stvxl_<mode>): Delete expand.
17691 (*altivec_stvxl_<mode>_internal): Rename to ...
17692 (altivec_stvxl_<mode>): ... this.
17693 (altivec_stve<VI_char>x): Delete expand.
17694 (*altivec_stve<VI_char>x_internal): Rename to ...
17695 (altivec_stve<VI_char>x): ... this.
17696 (doublee<mode>2, unsdoubleev4si2, doubleo<mode>2, unsdoubleov4si2,
17697 doubleh<mode>2, unsdoublehv4si2, doublel<mode>2, unsdoublelv4si2,
17698 reduc_plus_scal_<mode>): Adjust.
17699 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Adjust
17701 (rs6000_cpu_cpp_builtins): Adjust.
17702 (altivec_resolve_overloaded_builtin): Remove -maltivec=be support.
17703 * config/rs6000/rs6000-protos.h (altivec_expand_lvx_be,
17704 altivec_expand_stvx_be, altivec_expand_stvex_be): Delete.
17705 * config/rs6000/rs6000.c (rs6000_option_override_internal): Remove
17706 -maltivec=be support.
17707 (rs6000_split_vec_extract_var): Adjust.
17708 (rs6000_split_v4si_init): Adjust.
17709 (swap_selector_for_mode): Delete.
17710 (altivec_expand_lvx_be, altivec_expand_stvx_be,
17711 altivec_expand_stvex_be): Delete.
17712 (altivec_expand_lv_builtin, altivec_expand_stv_builtin): Remove
17713 -maltivec=be support.
17714 (rs6000_gimple_fold_builtin): Ditto.
17715 (rs6000_generate_float2_double_code, rs6000_generate_float2_code):
17717 * config/rs6000/rs6000.h (VECTOR_ELT_ORDER_BIG): Delete.
17718 (TARGET_DIRECT_MOVE_64BIT): Adjust.
17719 * config/rs6000/rs6000.md (split for extendsidi2 for vectors): Adjust.
17720 * config/rs6000/rs6000.opt (maltivec=le, maltivec=be): Delete.
17721 * config/rs6000/vsx.md (floate<mode>, unsfloatev2di, floato<mode>,
17722 unsfloatov2di, vsignedo_v2df, vsignede_v2df, vunsignedo_v2df,
17723 vunsignede_v2df, vsx_extract_<mode>_p9, *vsx_extract_si,
17724 *vsx_extract_<mode>_p8, *vsx_extract_si_<uns>float_df,
17725 *vsx_extract_si_<uns>float_<mode>, vsx_set_<mode>_p9, vsx_set_v4sf_p9,
17726 *vsx_insert_extract_v4sf_p9, *vsx_insert_extract_v4sf_p9_2, and an
17727 anonymous split): Adjust.
17728 (vsx_mergel_<mode>, vsx_mergeh_<mode>): Remove -maltivec=be support.
17729 (vsx_xxspltd_<mode>, extract4b, insert4b): Adjust.
17731 2018-05-10 Eric Botcazou <ebotcazou@adacore.com>
17733 * configure.ac (gcc_gxx_include_dir_add_sysroot): Set it to 1 only
17734 when --with-gxx-include-dir is also specified.
17735 * configure: Regenerate.
17737 2018-05-09 Jim Wilson <jimw@sifive.com>
17740 * config.gcc (riscv*-*-*): Handle --with-multilib-list.
17741 * config/riscv/t-withmultilib: New.
17742 * config/riscv/withmultilib.h: New.
17743 * doc/install.texi: Document RISC-V --with-multilib-list support.
17745 2018-05-09 Richard Biener <rguenther@suse.de>
17747 * tree-vect-slp.c (vect_bb_slp_scalar_cost): Fill a cost
17749 (vect_bb_vectorization_profitable_p): Adjust. Compute
17750 actual scalar cost using the cost vector and the add_stmt_cost
17753 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
17755 PR rtl-optimization/85645
17756 * config/rs6000/rs6000.c (rs6000_emit_prologue_components): Put a SET
17757 in the REG_CFA_REGISTER note for LR, don't leave it empty.
17759 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
17761 PR rtl-optimization/85645
17762 * shrink-wrap.c (spread_components): Return a boolean saying if
17763 anything was changed.
17764 (try_shrink_wrapping_separate): Iterate spread_components until
17765 nothing changes anymore.
17767 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
17769 PR rtl-optimization/85645
17770 * regrename.c (build_def_use): Also kill the chains that include the
17771 destination of a REG_CFA_REGISTER note.
17773 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
17775 PR rtl-optimization/85645
17776 * regcprop.c (copyprop_hardreg_forward_1): Don't propagate into an
17777 insn that has a REG_CFA_REGISTER note.
17779 2018-05-09 Richard Sandiford <richard.sandiford@linaro.org>
17781 * cfgexpand.c (expand_clobber): New function.
17782 (expand_gimple_stmt_1): Use it.
17783 * tree-vect-stmts.c (vect_clobber_variable): New function,
17785 (vectorizable_simd_clone_call): ...here.
17786 (vectorizable_store): Emit a clobber either side of an
17787 IFN_STORE_LANES sequence.
17788 (vectorizable_load): Emit a clobber after an IFN_LOAD_LANES sequence.
17790 2018-05-09 Tom de Vries <tom@codesourcery.com>
17793 * config/nvptx/nvptx.md (define_insn "trap", define_insn "trap_if_true")
17794 (define_insn "trap_if_false"): Add exit after trap.
17796 2018-05-09 Eric Botcazou <ebotcazou@adacore.com>
17798 PR rtl-optimization/85638
17799 * bb-reorder.c: Include common/common-target.h.
17800 (create_forwarder_block): New function extracted from...
17801 (fix_up_crossing_landing_pad): ...here. Rename into...
17802 (dw2_fix_up_crossing_landing_pad): ...this.
17803 (sjlj_fix_up_crossing_landing_pad): New function.
17804 (find_rarely_executed_basic_blocks_and_crossing_edges): In SJLJ mode,
17805 call sjlj_fix_up_crossing_landing_pad if there are incoming EH edges
17806 from both partitions and exit the loop after one iteration.
17808 2018-05-08 Kelvin Nilsen <kelvin@gcc.gnu.org>
17811 * doc/extend.texi (PowerPC Built-in Functions): Rename this
17813 (Basic PowerPC Built-in Functions): The new name of the
17814 subsection previously known as "PowerPC Built-in Functions".
17815 (Basic PowerPC Built-in Functions Available on all Configurations):
17817 (Basic PowerPC Built-in Functions Available on ISA 2.05): New
17819 (Basic PowerPC Built-in Functions Available on ISA 2.06): New
17821 (Basic PowerPC Built-in Functions Available on ISA 2.07): New
17823 (Basic PowerPC Built-in Functions Available on ISA 3.0): New
17826 2018-05-08 Jim Wilson <jimw@sifive.com>
17828 * config/riscv/linux.h (MUSL_ABI_SUFFIX): Delete unnecessary backslash.
17829 (LD_EMUL_SUFFIX): New.
17830 (LINK_SPEC): Use it.
17832 2018-05-08 Kelvin Nilsen <kelvin@gcc.gnu.org>
17834 * doc/extend.texi (PowerPC Built-in Functions): Rename this
17836 (Basic PowerPC Built-in Functions): The new name of the
17837 subsection previously known as "PowerPC Built-in Functions".
17838 (Basic PowerPC Built-in Functions Available on all Configurations):
17840 (Basic PowerPC Built-in Functions Available on ISA 2.05): New
17842 (Basic PowerPC Built-in Functions Available on ISA 2.06): New
17844 (Basic PowerPC Built-in Functions Available on ISA 2.07): New
17846 (Basic PowerPC Built-in Functions Available on ISA 3.0): New
17849 2018-05-08 Jakub Jelinek <jakub@redhat.com>
17852 * config/i386/i386.md: Add peepholes for mem {+,-,&,|,^}= x; mem != 0
17853 after cmpelim optimization.
17855 2018-05-08 Olga Makhotina <olga.makhotina@intel.com>
17857 * config.gcc: Support "goldmont".
17858 * config/i386/driver-i386.c (host_detect_local_cpu): Detect "goldmont".
17859 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
17860 PROCESSOR_GOLDMONT.
17861 * config/i386/i386.c (m_GOLDMONT): Define.
17862 (processor_target_table): Add "goldmont".
17863 (PTA_GOLDMONT): Define.
17864 (ix86_lea_outperforms): Add TARGET_GOLDMONT.
17865 (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT.
17866 (fold_builtin_cpu): Add M_INTEL_GOLDMONT.
17867 (fold_builtin_cpu): Add "goldmont".
17868 (ix86_add_stmt_cost): Add TARGET_GOLDMONT.
17869 (ix86_option_override_internal): Add "goldmont".
17870 * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT.
17871 (processor_type): Add PROCESSOR_GOLDMONT.
17872 * config/i386/i386.md: Add CPU "glm".
17873 * config/i386/glm.md: New file.
17874 * config/i386/x86-tune.def: Add m_GOLDMONT.
17875 * doc/invoke.texi: Add goldmont as x86 -march=/-mtune= CPU type.
17877 2018-05-08 Jakub Jelinek <jakub@redhat.com>
17880 * config/i386/i386.c (ix86_expand_sse2_abs): Handle E_V2DImode and
17882 * config/i386/sse.md (abs<mode>2): Use VI_AVX2 iterator instead of
17883 VI1248_AVX512VL_AVX512BW. Handle V2DImode and V4DImode if not
17884 TARGET_AVX512VL using ix86_expand_sse2_abs. Formatting fixes.
17887 * config/i386/i386.c (ix86_fold_builtin): Handle
17888 IX86_BUILTIN_{,P}MOVMSK{PS,PD,B}{,128,256}.
17891 * config/i386/sse.md (ssequaterinsnmode): New mode attribute.
17892 (*<extract_type>_vinsert<shuffletype><extract_suf>_0): New pattern.
17894 2018-05-08 Richard Earnshaw <rearnsha@arm.com>
17897 * config/arm/parsecpu.awk (check_cpu): Fix operator precedence.
17898 (check_arch): Likewise.
17899 (check_fpu): Return the result rather than printing it.
17900 (end arch): Fix operator precedence.
17901 (end cpu): Likewise.
17902 (END): Print the result from check_fpu.
17904 2018-05-08 Richard Sandiford <richard.sandiford@linaro.org>
17905 Alan Hayward <alan.hayward@arm.com>
17906 David Sherwood <david.sherwood@arm.com>
17908 * config/aarch64/aarch64-sve.md (*pred_cmp<cmp_op><mode>_combine)
17909 (*pred_cmp<cmp_op><mode>, *fcm<cmp_op><mode>_and_combine)
17910 (*fcmuo<mode>_and_combine, *fcm<cmp_op><mode>_and)
17911 (*fcmuo<mode>_and): New patterns.
17913 2018-05-08 Richard Sandiford <richard.sandiford@linaro.org>
17915 * config/aarch64/iterators.md (UNSPEC_COND_LO, UNSPEC_COND_LS)
17916 (UNSPEC_COND_HI, UNSPEC_COND_HS, UNSPEC_COND_UO): Delete.
17917 (SVE_INT_CMP, SVE_FP_CMP): New code iterators.
17918 (cmp_op, sve_imm_con): New code attributes.
17919 (SVE_COND_INT_CMP, imm_con): Delete.
17920 (cmp_op): Remove above unspecs from int attribute.
17921 * config/aarch64/aarch64-sve.md (*vec_cmp<cmp_op>_<mode>): Rename
17923 (*cmp<cmp_op><mode>): ...this. Use UNSPEC_MERGE_PTRUE instead of
17924 comparison-specific unspecs.
17925 (*vec_cmp<cmp_op>_<mode>_ptest): Rename to...
17926 (*cmp<cmp_op><mode>_ptest): ...this and adjust likewise.
17927 (*vec_cmp<cmp_op>_<mode>_cc): Rename to...
17928 (*cmp<cmp_op><mode>_cc): ...this and adjust likewise.
17929 (*vec_fcm<cmp_op><mode>): Rename to...
17930 (*fcm<cmp_op><mode>): ...this and adjust likewise.
17931 (*vec_fcmuo<mode>): Rename to...
17932 (*fcmuo<mode>): ...this and adjust likewise.
17933 (*pred_fcm<cmp_op><mode>): New pattern.
17934 * config/aarch64/aarch64.c (aarch64_emit_unop, aarch64_emit_binop)
17935 (aarch64_emit_sve_ptrue_op, aarch64_emit_sve_ptrue_op_cc): New
17937 (aarch64_unspec_cond_code): Remove handling of LTU, GTU, LEU, GEU
17939 (aarch64_gen_unspec_cond, aarch64_emit_unspec_cond): Delete.
17940 (aarch64_emit_sve_predicated_cond): New function.
17941 (aarch64_expand_sve_vec_cmp_int): Use aarch64_emit_sve_ptrue_op_cc.
17942 (aarch64_emit_unspec_cond_or): Replace with...
17943 (aarch64_emit_sve_or_conds): ...this new function. Use
17944 aarch64_emit_sve_ptrue_op for the individual comparisons and
17945 aarch64_emit_binop to OR them together.
17946 (aarch64_emit_inverted_unspec_cond): Replace with...
17947 (aarch64_emit_sve_inverted_cond): ...this new function. Use
17948 aarch64_emit_sve_ptrue_op for the comparison and
17949 aarch64_emit_unop to invert the result.
17950 (aarch64_expand_sve_vec_cmp_float): Update after the above
17951 changes. Use aarch64_emit_sve_ptrue_op for native comparisons.
17953 2018-05-07 Nathan Sidwell <nathan@acm.org>
17955 * doc/invoke.texi (C++ Dialect Options): Remove -ffor-scope.
17956 * doc/extend.texi (Deprecated Features): Remove -fno-for-scope
17957 (Backwards Compatibility): Likewise.
17959 2018-05-07 Luis Machado <luis.machado@linaro.org>
17963 2018-05-07 Luis Machado <luis.machado@linaro.org>
17965 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
17966 <prefetch_dynamic_strides>: New const bool field.
17967 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
17968 prefetch_dynamic_strides.
17969 (exynosm1_prefetch_tune): Likewise.
17970 (thunderxt88_prefetch_tune): Likewise.
17971 (thunderx_prefetch_tune): Likewise.
17972 (thunderx2t99_prefetch_tune): Likewise.
17973 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
17975 (aarch64_override_options_internal): Update to set
17976 PARAM_PREFETCH_DYNAMIC_STRIDES.
17977 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
17978 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
17979 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
17980 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
17981 prefetch-dynamic-strides setting.
17983 2018-05-07 Luis Machado <luis.machado@linaro.org>
17985 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
17986 <minimum_stride>: New const int field.
17987 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
17988 minimum_stride field.
17989 (exynosm1_prefetch_tune): Likewise.
17990 (thunderxt88_prefetch_tune): Likewise.
17991 (thunderx_prefetch_tune): Likewise.
17992 (thunderx2t99_prefetch_tune): Likewise.
17993 (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
17994 (aarch64_override_options_internal): Update to set
17995 PARAM_PREFETCH_MINIMUM_STRIDE.
17996 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
17997 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
17998 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
17999 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
18000 stride is constant and is below the minimum stride threshold.
18002 2018-05-07 Luis Machado <luis.machado@linaro.org>
18004 * config/aarch64/aarch64.c (qdf24xx_prefetch_tune) <l2_cache_size>: Set
18007 2018-05-07 Luis Machado <luis.machado@linaro.org>
18009 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
18010 <prefetch_dynamic_strides>: New const bool field.
18011 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
18012 prefetch_dynamic_strides.
18013 (exynosm1_prefetch_tune): Likewise.
18014 (thunderxt88_prefetch_tune): Likewise.
18015 (thunderx_prefetch_tune): Likewise.
18016 (thunderx2t99_prefetch_tune): Likewise.
18017 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
18019 (aarch64_override_options_internal): Update to set
18020 PARAM_PREFETCH_DYNAMIC_STRIDES.
18021 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
18022 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
18023 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
18024 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
18025 prefetch-dynamic-strides setting.
18027 2018-05-07 Luis Machado <luis.machado@linaro.org>
18029 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
18030 <minimum_stride>: New const int field.
18031 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
18032 minimum_stride field.
18033 (exynosm1_prefetch_tune): Likewise.
18034 (thunderxt88_prefetch_tune): Likewise.
18035 (thunderx_prefetch_tune): Likewise.
18036 (thunderx2t99_prefetch_tune): Likewise.
18037 (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
18038 (aarch64_override_options_internal): Update to set
18039 PARAM_PREFETCH_MINIMUM_STRIDE.
18040 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
18041 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
18042 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
18043 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
18044 stride is constant and is below the minimum stride threshold.
18046 2018-05-06 Jakub Jelinek <jakub@redhat.com>
18049 * cfgexpand.c (expand_asm_stmt): Don't create a temporary if
18050 the type is addressable. Don't force op into register if it has
18053 2018-05-05 Roland McGrath <mcgrathr@google.com>
18056 * varasm.c (default_section_type_flags): Set SECTION_NOTYPE for
18057 any section for which we don't know a specific type it should have,
18058 regardless of name. Previously this was done only for the exact
18059 names ".init_array", ".fini_array", and ".preinit_array".
18060 (default_elf_asm_named_section): Add comment about
18061 relationship with default_section_type_flags and SECTION_NOTYPE.
18062 (get_section): Don't consider it a type conflict if one side has
18063 SECTION_NOTYPE and the other doesn't, as long as neither has the
18064 SECTION_BSS et al used in the default_section_type_flags logic.
18066 2018-05-05 Tom de Vries <tom@codesourcery.com>
18069 * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_3): Define.
18070 (workaround_barsyncs): New function.
18071 (nvptx_reorg): Use workaround_barsyncs.
18072 * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
18073 (define_expand "nvptx_membar_cta"): New define_expand.
18074 (define_insn "*nvptx_membar_cta"): New insn.
18076 2018-05-04 Pekka Jääskeläinen <pekka.jaaskelainen@parmance.com>
18078 * brig-builtins.def: Add consts to ptrs etc. in BRIG builtin defs.
18079 To improve optimization opportunities.
18080 * builtin-types.def: The new needed builtin types for the above.
18082 2018-05-04 Richard Biener <rguenther@suse.de>
18084 * bb-reorder.c (sanitize_hot_paths): Release hot_bbs_to_check.
18085 * gimple-ssa-store-merging.c
18086 (imm_store_chain_info::output_merged_store): Remove redundant create,
18087 release split_store vector contents on failure.
18088 * tree-vect-slp.c (vect_schedule_slp_instance): Avoid leaking
18089 scalar stmt vector on cache hit.
18091 2018-05-04 Segher Boessenkool <segher@kernel.crashing.org>
18093 * common/config/rs6000/rs6000-common.c (rs6000_handle_option): Remove
18095 * config.gcc (powerpc-xilinx-eabi*): Remove.
18096 * config/rs6000/predicates.md (easy_fp_constant): Remove Xilinx FP
18098 (fusion_addis_mem_combo_load): Ditto.
18099 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Remove Xilinx
18101 (rs6000_cpu_cpp_builtins): Ditto.
18102 * config/rs6000/rs6000-linux.c
18103 (rs6000_linux_float_exceptions_rounding_supported_p): Ditto.
18104 * config/rs6000/rs6000-opts.h (enum fpu_type_t): Delete.
18105 * config/rs6000/rs6000.c (rs6000_debug_reg_global): Remove Xilinx FP
18107 (rs6000_setup_reg_addr_masks): Ditto.
18108 (rs6000_init_hard_regno_mode_ok): Ditto.
18109 (rs6000_option_override_internal): Ditto.
18110 (legitimate_lo_sum_address_p): Ditto.
18111 (rs6000_legitimize_address): Ditto.
18112 (rs6000_legitimize_reload_address): Ditto.
18113 (rs6000_legitimate_address_p): Ditto.
18114 (abi_v4_pass_in_fpr): Ditto.
18115 (setup_incoming_varargs): Ditto.
18116 (rs6000_gimplify_va_arg): Ditto.
18117 (rs6000_split_multireg_move): Ditto.
18118 (rs6000_savres_strategy): Ditto.
18119 (rs6000_emit_prologue_components): Ditto.
18120 (rs6000_emit_epilogue_components): Ditto.
18121 (rs6000_emit_prologue): Ditto.
18122 (rs6000_emit_epilogue): Ditto.
18123 (rs6000_elf_file_end): Ditto.
18124 (rs6000_function_value): Ditto.
18125 (rs6000_libcall_value): Ditto.
18126 * config/rs6000/rs6000.h: Ditto.
18127 (TARGET_MINMAX_SF, TARGET_MINMAX_DF): Delete, merge to ...
18128 (TARGET_MINMAX): ... this. New.
18129 (TARGET_SF_FPR, TARGET_DF_FPR, TARGET_SF_INSN, TARGET_DF_INSN): Delete.
18130 * config/rs6000/rs6000.md: Remove Xilinx FP support.
18131 (*movsi_internal1_single): Delete.
18132 * config/rs6000/rs6000.opt (msingle-float, mdouble-float, msimple-fpu,
18133 mfpu=, mxilinx-fpu): Delete.
18134 * config/rs6000/singlefp.h: Delete.
18135 * config/rs6000/sysv4.h: Remove Xilinx FP support.
18136 * config/rs6000/t-rs6000: Ditto.
18137 * config/rs6000/t-xilinx: Delete.
18138 * config/rs6000/titan.md: Adjust for fp_type removal.
18139 * config/rs6000/vsx.md: Remove Xilinx FP support.
18140 (VStype_simple): Delete.
18141 (VSfptype_simple, VSfptype_mul, VSfptype_div, VSfptype_sqrt): Delete.
18142 * config/rs6000/xfpu.h: Delete.
18143 * config/rs6000/xfpu.md: Delete.
18144 * config/rs6000/xilinx.h: Delete.
18145 * config/rs6000/xilinx.opt: Delete.
18146 * doc/invoke.texi (RS/6000 and PowerPC Options): Remove
18147 -msingle-float, -mdouble-float, -msimple-fpu, -mfpu=, and -mxilinx-fpu.
18149 2018-05-04 Tom de Vries <tom@codesourcery.com>
18152 * builtins.c (expand_builtin_goacc_parlevel_id_size): Handle null target
18155 2018-05-04 Richard Biener <rguenther@suse.de>
18157 PR middle-end/85627
18158 * tree-complex.c (update_complex_assignment): We are always in SSA form.
18159 (expand_complex_div_wide): Likewise.
18160 (expand_complex_operations_1): Likewise.
18161 (expand_complex_libcall): Preserve EH info of the original stmt.
18162 (tree_lower_complex): Handle removed blocks.
18163 * tree.c (build_common_builtin_nodes): Do not set ECF_NOTRHOW
18164 on complex multiplication and division libcall builtins.
18166 2018-05-04 Richard Biener <rguenther@suse.de>
18168 PR middle-end/85574
18169 * fold-const.c (negate_expr_p): Restrict negation of operand
18170 zero of a division to when we know that can happen without
18172 (fold_negate_expr_1): Likewise.
18174 2018-05-04 Jakub Jelinek <jakub@redhat.com>
18177 * real.h (real_nextafter): Declare.
18178 * real.c (real_nextafter): New function.
18179 * fold-const-call.c (fold_const_nextafter): New function.
18180 (fold_const_call_sss): Call it for CASE_CFN_NEXTAFTER and
18181 CASE_CFN_NEXTTOWARD.
18182 (fold_const_call_1): For CASE_CFN_NEXTTOWARD call fold_const_call_sss
18183 even when arg1_mode is different from arg0_mode.
18185 2018-05-03 Nathan Sidwell <nathan@acm.org>
18187 * doc/extend.texi (Deprecated Features): Remove
18188 -ffriend-injection.
18189 (Backwards Compatibility): Likewise.
18190 * doc/invoke.texi (C++ Language Options): Likewise.
18191 (C++ Dialect Options): Likewise.
18193 2018-05-03 Jakub Jelinek <jakub@redhat.com>
18196 * config/i386/avx512fintrin.h (_mm512_mullox_epi64,
18197 _mm512_mask_mullox_epi64): New intrinsics.
18199 2018-05-03 Tom de Vries <tom@codesourcery.com>
18202 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
18203 dump files): Add offload-tree.
18205 2018-05-03 Richard Biener <rguenther@suse.de>
18207 PR tree-optimization/85615
18208 * tree-ssa-threadupdate.c (thread_block_1): Only allow exits
18209 to loops not nested in BBs loop father to avoid creating multi-entry
18212 2018-05-03 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
18214 PR tree-optimization/70291
18215 * tree-complex.c (expand_complex_libcall): Add type, inplace_p
18216 arguments. Change return type to tree. Emit libcall as a new
18217 statement rather than replacing existing one when inplace_p is true.
18218 (expand_complex_multiplication_components): New function.
18219 (expand_complex_multiplication): Expand floating-point complex
18220 multiplication using the above.
18221 (expand_complex_division): Rename inner_type parameter to type.
18222 Update expand_complex_libcall call-site.
18223 (expand_complex_operations_1): Update expand_complex_multiplication
18224 and expand_complex_division call-sites.
18226 2018-05-02 Jakub Jelinek <jakub@redhat.com>
18229 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
18230 *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
18231 *<shift_insn><dwi>3_doubleword_mask_1): In condition require that
18232 the highest significant bit of the shift count mask is clear. In
18233 check whether and[sq]i3 is needed verify that all significant bits
18234 of the shift count other than the highest are set.
18236 2018-05-02 Tom de Vries <tom@codesourcery.com>
18239 * builtins.def (DEF_GOACC_BUILTIN_ONLY): Define.
18240 * omp-builtins.def (BUILT_IN_GOACC_PARLEVEL_ID)
18241 (BUILT_IN_GOACC_PARLEVEL_SIZE): New builtin.
18242 * builtins.c (expand_builtin_goacc_parlevel_id_size): New function.
18243 (expand_builtin): Call expand_builtin_goacc_parlevel_id_size.
18244 * doc/extend.texi (Other Builtins): Add __builtin_goacc_parlevel_id and
18245 __builtin_goacc_parlevel_size.
18247 2018-05-02 Richard Biener <rguenther@suse.de>
18249 PR tree-optimization/85597
18250 * tree-vect-stmts.c (vectorizable_operation): For ternary SLP
18251 do not use split vect_get_vec_defs call but call vect_get_slp_defs
18254 2018-05-02 Tom de Vries <tom@codesourcery.com>
18257 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
18258 dump files): Add ltrans-tree.
18260 2018-05-02 Tom de Vries <tom@codesourcery.com>
18263 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
18264 dump files): Add wpa-ipa.
18266 2018-05-02 Segher Boessenkool <segher@kernel.crashing.org>
18268 * config.gcc (powerpc*-*-*): Remove paired.h. Unsupport the
18269 powerpc*-*-linux*paired* target.
18270 * config/rs6000/750cl.h: Delete.
18271 * config/rs6000/paired.h: Delete.
18272 * config/rs6000/paired.md: Delete.
18273 * config/rs6000/predicates.md (easy_vector_constant): Remove paired
18275 * config/rs6000/rs6000-builtin.def: Remove paired float support.
18276 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Update
18277 comment. Remove paired float support.
18278 * config/rs6000/rs6000-modes.def: Remove V2SF and V2SI.
18279 * config/rs6000/rs6000-opts.h (enum rs6000_vector): Delete
18281 * config/rs6000/rs6000-protos.h (paired_expand_vector_init,
18282 paired_emit_vector_cond_expr, paired_expand_vector_move): Delete
18284 * config/rs6000/rs6000.c: Remove paired float support.
18285 (paired_expand_vector_init, paired_expand_vector_move,
18286 paired_emit_vector_compare, paired_emit_vector_cond_expr,
18287 (paired_expand_lv_builtin, paired_expand_stv_builtin,
18288 paired_expand_builtin, paired_expand_predicate_builtin,
18289 paired_init_builtins): Delete.
18290 * config/rs6000/rs6000.h: Remove paired float support.
18291 * config/rs6000/rs6000.md: Remove paired float support.
18292 (move_from_CR_ov_bit): Delete.
18293 * config/rs6000/rs6000.opt (mpaired): Delete.
18294 * config/rs6000/t-rs6000: Remove paired.md from MD_INCLUDES.
18295 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mpaired.
18297 2018-05-02 Richard Biener <rguenther@suse.de>
18299 PR middle-end/85567
18300 * gimplify.c (gimplify_save_expr): When in SSA form allow
18301 SAVE_EXPRs to compute to SSA vars.
18303 2018-05-02 Jakub Jelinek <jakub@redhat.com>
18306 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
18307 *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
18308 *<shift_insn><dwi>3_doubleword_mask_1): If and[sq]i3 is needed, don't
18309 clobber operands[2], instead use a new pseudo. Formatting fixes.
18311 2018-05-02 Richard Sandiford <richard.sandiford@linaro.org>
18313 PR tree-optimization/85586
18314 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence): Only
18315 exit early for statements in the same group if the accesses are
18318 2018-05-02 Tom de Vries <tom@codesourcery.com>
18321 * lto-wrapper.c (compile_offload_image): Add "could not find mkoffload"
18324 2018-05-01 Marc Glisse <marc.glisse@inria.fr>
18326 PR tree-optimization/85143
18327 * match.pd (A<B&A<C): Extend to BIT_IOR_EXPR.
18329 2018-05-01 Tom de Vries <tom@codesourcery.com>
18332 * config/nvptx/mkoffload.c (main): Suggest using -B in "offload compiler
18333 not found" error message.
18335 2018-05-01 Tom de Vries <tom@codesourcery.com>
18338 * vec.h (VEC_ORDERED_REMOVE_IF, VEC_ORDERED_REMOVE_IF_FROM_TO): Define.
18339 * vec.c (test_ordered_remove_if): New function.
18340 (vec_c_tests): Call test_ordered_remove_if.
18341 * dwarf2cfi.c (connect_traces): Use VEC_ORDERED_REMOVE_IF_FROM_TO.
18342 * lto-streamer-out.c (prune_offload_funcs): Use VEC_ORDERED_REMOVE_IF.
18343 * tree-vect-patterns.c (vect_pattern_recog_1): Use
18344 VEC_ORDERED_REMOVE_IF.
18346 2018-05-01 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
18348 PR tree-optimization/82665
18349 * vr-values.c (vr_values::extract_range_from_binary_expr): Handle
18350 pointer subtraction where arguments come from a memchr call.
18352 2018-05-01 Jakub Jelinek <jakub@redhat.com>
18354 * configure.ac (LD_AS_NEEDED_OPTION, LD_NO_AS_NEEDED_OPTION): Use
18355 --push-state --as-needed and --pop-state instead of --as-needed and
18356 --no-as-needed if ld supports it.
18357 * configure: Regenerated.
18360 * doc/install.texi2html: Replace _002d with - and _002a with * in
18361 generated html files using sed.
18363 2018-04-30 David Malcolm <dmalcolm@redhat.com>
18366 * gcc-rich-location.c (blank_line_before_p): New function.
18367 (use_new_line): New function.
18368 (gcc_rich_location::add_fixit_insert_formatted): New function.
18369 * gcc-rich-location.h
18370 (gcc_rich_location::add_fixit_insert_formatted): New function.
18372 2018-04-30 David Malcolm <dmalcolm@redhat.com>
18374 * selftest.c (assert_streq): Rename "expected" and "actual" to
18375 "val1" and "val2". Extend NULL-handling to cover both inputs
18376 symmetrically, while still requiring both to be non-NULL for a pass.
18377 * selftest.h (assert_streq): Rename "expected" and "actual" to
18379 (ASSERT_EQ): Likewise.
18380 (ASSERT_EQ_AT): Likewise.
18381 (ASSERT_KNOWN_EQ): Likewise.
18382 (ASSERT_KNOWN_EQ_AT): Likewise.
18383 (ASSERT_NE): Likewise.
18384 (ASSERT_MAYBE_NE): Likewise.
18385 (ASSERT_MAYBE_NE_AT): Likewise.
18386 (ASSERT_STREQ): Likewise. Clarify that both must be non-NULL for
18387 the assertion to pass.
18388 (ASSERT_STREQ_AT): Likewise.
18390 2018-04-30 Jonathan Wakely <jwakely@redhat.com>
18392 * doc/invoke.texi (-fpie, -fPIE): Fix grammar and clarify
18393 interaction with -pie.
18395 2018-04-30 David Malcolm <dmalcolm@redhat.com>
18397 * selftest.h: Fix alphabetization of per-source-file selftest
18400 2018-04-30 Jason Merrill <jason@redhat.com>
18402 PR c++/61982 - dead stores to destroyed objects.
18403 * gimplify.c (gimplify_modify_expr): Simplify complex lvalue on LHS
18406 2018-04-30 Jason Merrill <jason@redhat.com>
18408 * tree.c (build_clobber): New.
18409 * tree.h: Declare it.
18410 * gimplify.c (gimplify_bind_expr, gimplify_target_expr): Use it.
18412 2018-04-30 David Malcolm <dmalcolm@redhat.com>
18414 * diagnostic-show-locus.c (layout::layout): Update for
18415 location_get_source_line returning a char_span.
18416 (struct char_span): Move to input.h.
18417 (struct correction): Update for fields in char_span becoming
18419 (struct source_line): Update for location_get_source_line
18420 returning a char_span.
18421 (layout::print_line): Likewise.
18422 * edit-context.c (edited_file::print_content): Likewise.
18423 (edited_file::print_diff_hunk): Likewise.
18424 (edited_file::print_run_of_changed_lines): Likewise.
18425 (edited_file::get_num_lines): Likewise.
18426 (edited_line::edited_line): Likewise.
18427 * final.c (asm_show_source): Likewise.
18428 * input.c (location_get_source_line): Convert return type
18429 from const char * to char_span, losing the final "line_len"
18431 (dump_location_info): Update for the above.
18432 (get_substring_ranges_for_loc): Likewise. Use a char_span
18433 when handling the literal within the line.
18434 (test_reading_source_line): Update for location_get_source_line
18435 returning a char_span.
18436 * input.h (class char_span): Move here from
18437 diagnostic-show-locus.c, converting from a struct to a class.
18438 Make data members private.
18439 (char_span::operator bool): New.
18440 (char_span::length): New.
18441 (char_span::get_buffer): New.
18442 (char_span::operator[]): New.
18443 (char_span::subspan): Make const.
18444 (char_span::xstrdup): New.
18445 (location_get_source_line): Convert return type from const char *
18446 to char_span, losing the final "line_size" param.
18448 2018-04-30 Jan Hubicka <jh@suse.cz>
18450 * lto-wrapper.c (ltrans_priorities): New static var.
18451 (cmp_priority): New.
18452 (run_gcc): Read priorities and if doing parallel build order
18453 the Makefile by them.
18455 2018-04-30 David Malcolm <dmalcolm@redhat.com>
18457 * input.h (builtins_location_check): Convert to a STATIC_ASSERT.
18459 2018-04-30 Richard Biener <rguenther@suse.de>
18461 * tree-cfg.c (verify_address): Remove base argument, add
18462 flag whether to check TREE_ADDRESSABLE and do that.
18463 (verify_expr): Remove.
18464 (verify_types_in_gimple_reference): Add pieces from verify_expr.
18465 (verify_gimple_assign_single): Likewise.
18466 (verify_gimple_switch): Likewise.
18467 (verify_expr_location_1): Dereference tp once. Add (disabled)
18468 piece from verify_expr.
18469 (verify_gimple_in_cfg): Do not call verify_expr on all ops.
18471 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
18473 * config/arc/linux.h (CLEAR_INSN_CACHE): Define.
18475 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
18477 * config/arc/arc-protos.h (prepare_extend_operands): Remove.
18478 (small_data_pattern): Likewise.
18479 (arc_rewrite_small_data): Likewise.
18480 * config/arc/arc.c (LEGITIMATE_SMALL_DATA_OFFSET_P): Remove.
18481 (LEGITIMATE_SMALL_DATA_ADDRESS_P): Likewise.
18482 (get_symbol_alignment): New function.
18483 (legitimate_small_data_address_p): Likewise.
18484 (legitimate_scaled_address): Update, call
18485 legitimate_small_data_address_p.
18486 (output_sdata): New static variable.
18487 (arc_print_operand): Update how we handle small data operands.
18488 (arc_print_operand_address): Likewise.
18489 (arc_legitimate_address_p): Update, use
18490 legitimate_small_data_address_p.
18491 (arc_rewrite_small_data_p): Remove.
18492 (arc_rewrite_small_data_1): Likewise.
18493 (arc_rewrite_small_data): Likewise.
18494 (small_data_pattern): Likewise.
18495 (compact_sda_memory_operand): Update to use
18496 legitimate_small_data_address_p and get_symbol_alignment.
18497 (prepare_move_operands): Don't rewite sdata pattern.
18498 (prepare_extend_operands): Remove.
18499 * config/arc/arc.md (zero_extendqihi2): Don't rewrite sdata
18501 (zero_extendqisi2): Likewise.
18502 (zero_extendhisi2): Likewise.
18503 (extendqihi2): Likewise.
18504 (extendqisi2): Likewise.
18505 (extendhisi2): Likewise.
18506 (addsi3): Likewise.
18507 (subsi3): Likewise.
18508 (andsi3): Likewise.
18509 * config/arc/constraints.md (Usd): Change it to memory constraint.
18511 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
18513 * config/arc/arc.c (arc_split_move): Allow signed 6-bit constants
18514 as source of std instructions.
18515 * config/arc/arc.md (movsi_insn): Update pattern predicate to
18516 allow 6-bit constants as source for store instructions.
18517 (movdi_insn): Update instruction pattern to allow 6-bit constants
18518 as source for store instructions.
18520 2018-04-30 Jonathan Wakely <jwakely@redhat.com>
18522 * doc/invoke.texi (-fdebug-types-section): Fix grammar.
18524 2018-04-30 Nathan Sidwell <nathan@acm.org>
18525 Sandra Loosemore <sandra@codesourcery.com>
18527 * dumpfile.c (dump_open): Allow '-' for stdout.
18528 * doc/invoke.texi (Developer Options): Document dump filename
18529 determination early. Document stdin/stdout selection.
18531 2018-04-30 Andrew Sadek <andrew.sadek.se@gmail.com>
18533 Microblaze Target: PIC data text relative
18535 * config/microblaze/microblaze.opt: add new option -mpic-data-text-rel.
18536 * config/microblaze/microblaze-protos.h (microblaze_constant_address_p):
18538 * config/microblaze/microblaze.h (microblaze_constant_address_p):
18539 CONSTANT_ADDRESS_P definition to microblaze_constant_address_p.
18540 * config/microblaze/microblaze.c (TARGET_PIC_DATA_TEXT_REL):
18541 New addressing mode for data-text relative position indepenedent code.
18542 (microblaze_classify_unspec): add 'UNSPEC_TEXT' case ->
18543 'ADDRESS_SYMBOLIC_TXT_REL'.
18544 (microblaze_classify_address): Add handling for UNSPEC + CONST_INT.
18545 (microblaze_legitimate_pic_operand): Exclude function calls from
18546 pic operands in case of TARGET_PIC_DATA_TEXT_REL option.
18547 (microblaze_legitimize_address): Generate 'UNSPEC_TEXT' for all possible
18549 (microblaze_address_insns): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
18550 (print_operand): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
18551 (print_operand_address): Add 'ADDRESS_SYMBOLIC_TXT_REL' case + handling
18552 for 'address + offset'.
18553 (microblaze_expand_prologue): Add new function prologue call for
18555 (microblaze_asm_generate_pic_addr_dif_vec): Override new target hook
18556 'TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC' to disable address diff vector
18557 table in case of TARGET_PIC_DATA_TEXT_REL.
18558 (expand_pic_symbol_ref): Add handling for 'UNSPEC_TEXT'.
18559 * config/microblaze/microblaze.md (TARGET_PIC_DATA_TEXT_REL):
18560 Add new macros 'UNSPEC_TEXT',
18561 'UNSPEC_SET_TEXT' + add rule for setting r20 in function prologue
18562 + exclude function calls from 'UNSPEC_PLT' in case of data text
18564 * doc/tm.texi.in (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
18565 new target hook for generating address diff vector tables in case of
18567 * doc/tm.texi : Regenerate.
18568 * stmt.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Append new condition
18569 'targetm.asm_out.generate_pic_addr_diff_vec' to flag_pic in case
18570 of addr diff vector generation.
18571 * target.def (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
18572 target hook definition.
18573 * targhooks.h, targhooks.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC):
18574 Add default function for generate_pic_addr_diff_vec -> flag_pic.
18575 * doc/invoke.texi (Add new pic option): Add new microblaze pic
18576 option for data text relative.
18578 2018-04-30 Richard Biener <rguenther@suse.de>
18580 * tree-chrec.h (evolution_function_is_constant_p): Remove
18582 * tree-cfg.c (tree_node_can_be_shared): Re-order checks.
18584 2018-04-30 Richard Biener <rguenther@suse.de>
18587 * dwarf2out.c (gen_producer_string): Ignore -fchecking[=].
18589 2018-04-30 Richard Biener <rguenther@suse.de>
18591 PR tree-optimization/28364
18592 PR tree-optimization/85275
18593 * tree-ssa-loop-ch.c (ch_base::copy_headers): Stop after
18594 copying first exit test.
18596 2018-04-28 Mark Wielaard <mark@klomp.org>
18598 * dwarf2out.c (dwarf2out_finish): Add .debug_addr table header for
18599 dwarf_version >= 5.
18600 (dwarf_AT): Handle DW_AT_addr_base.
18601 (add_top_level_skeleton_die_attrs): Use dwarf_AT for DW_AT_addr_base.
18603 2018-04-28 Uros Bizjak <ubizjak@gmail.com>
18606 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask): New pattern.
18607 (*ashl<dwi>3_doubleword_mask_1): Ditto.
18608 (*<shift_insn><dwi>3_doubleword_mask): Ditto.
18609 (*<shift_insn><dwi>3_doubleword_mask_1): Ditto.
18611 2018-04-28 Richard Biener <rguenther@suse.de>
18613 * tree-cfg.c (verify_gimple_phi): Take a gphi * argument.
18614 (verify_gimple_in_cfg): Rename visited_stmts to visited_throwing_stmts
18615 to reflect use. Only add interesting stmts.
18617 2018-04-27 Martin Jambor <mjambor@suse.cz>
18620 * ipa-cp.c (find_aggregate_values_for_callers_subset): Make sure
18621 the jump function allows for passing through aggregate values.
18623 2018-04-27 David Malcolm <dmalcolm@redhat.com>
18625 * input.h (in_system_header_at): Convert from macro to inline
18627 (from_macro_expansion_at): Likewise.
18628 (from_macro_definition_at): Likewise.
18630 2018-04-27 Jeff Law <law@redhat.com>
18632 * config.gcc: Mark tile* targets as deprecated/obsolete.
18634 2018-04-27 Richard Biener <rguenther@suse.de>
18636 * config/aarch64/aarch64.c: Simplify ap.__stack advance and
18639 2018-04-27 Richard Biener <rguenther@suse.de>
18641 * tree-cfg.c (verify_expr): Make dead code hit gcc_unreachable.
18643 2018-04-27 Uros Bizjak <ubizjak@gmail.com>
18645 * config/i386/i386.md (*movti_internal): Substitute Ye constraint
18646 with Yd constraint. Set "preferred_for_speed" attribute from
18647 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for alternatives
18648 with Yd constraint.
18649 (*movdi_internal): Ditto.
18650 (movti_interunit splitters): Remove
18651 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC from insn condition.
18652 (movdi_interunit splitters): Ditto.
18653 * config/i386/constraints.md (Ye): Remove.
18654 (Yd): Do not depend on TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC.
18656 2018-04-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
18659 * config/aarch64/constraints.md (Usg): Limit to 31.
18660 (Usj): Limit to 63.
18662 2018-04-27 Jakub Jelinek <jakub@redhat.com>
18664 PR tree-optimization/85529
18665 * tree-ssa-reassoc.c (optimize_range_tests_var_bound): Add FIRST_BB
18666 argument. Don't call get_nonzero_bits if opcode is ERROR_MARK_NODE,
18667 rhs2 def stmt's bb is dominated by first_bb and it isn't an obvious
18668 zero extension or masking of the MSB bit.
18669 (optimize_range_tests): Add FIRST_BB argument, pass it through
18670 to optimize_range_tests_var_bound.
18671 (maybe_optimize_range_tests, reassociate_bb): Adjust
18672 optimize_range_tests callers.
18674 2018-04-26 Richard Biener <rguenther@suse.de>
18675 Jakub Jelinek <jakub@redhat.com>
18677 * cgraph.h (symbol_table): Just declare debug method here.
18678 * symtab.c (symbol_table::debug): Define.
18680 2018-04-26 Eric Botcazou <ebotcazou@adacore.com>
18682 * loop-invariant.c (may_assign_reg_p): Return false for frame pointer.
18684 2018-04-26 Uros Bizjak <ubizjak@gmail.com>
18686 * config/i386/i386.md ("isa" attribute): Add x64_sse2.
18687 ("enabled" attribute): Handle x64_sse2 "isa" attribute.
18688 (*movdi_internal): Substitute Yi and Yj constraint with x
18689 and Ym and Yn constraint with y constraint. Update "isa"
18690 attribute and set "preferred_for_speed" attribute from
18691 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for updated alternatives.
18692 (*movsi_internal): Ditto.
18693 (*movdf_internal): Ditto.
18694 (*movsf_internal): Ditto.
18695 (*zero_extendsidi2): Ditto.
18696 * config/i386/sse.md (vec_set<mode>_0): Ditto.
18697 (sse2_loadld): Ditto.
18698 (*vec_extract<ssevecmodelower>_0): Ditto.
18699 (*vec_extractv4si_0_zext_sse4): Ditto.
18700 (vec_concatv2di): Ditto.
18701 (*vec_dup<mode>): Ditto.
18702 * config/i386/mmx.md (*mov<mode>_internal): Ditto.
18703 * config/i386/constraints.md (Yi): Remove.
18708 2018-04-26 Nathan Sidwell <nathan@acm.org>
18710 * dumpfile.c (dump_open): New.
18711 (dump_open_alternate_stream, dump_start, dump_begin): Call it.
18712 (dump_finish): Detect stdio/stderr by value not name.
18714 2018-04-26 Jonathan Wakely <jwakely@redhat.com>
18716 * doc/invoke.texi (-Wreturn-type): Document default status for C++.
18718 2018-04-26 Tom de Vries <tom@codesourcery.com>
18721 * config/nvptx/nvptx.c (verify_neutering_jumps)
18722 (verify_neutering_labels): New function
18723 (nvptx_single): Use verify_neutering_jumps and verify_neutering_labels.
18725 2018-04-26 Tom de Vries <tom@codesourcery.com>
18728 * config/nvptx/nvptx.c (needs_neutering_p): New function.
18729 (nvptx_single): Use needs_neutering_p to skip over insns that do not
18732 2018-04-26 Richard Biener <rguenther@suse.de>
18733 Tom de Vries <tom@codesourcery.com>
18736 * lto-streamer-out.c (output_function): Fixup loops if required to match
18737 discovery done in the reader.
18739 2018-04-26 Richard Biener <rguenther@suse.de>
18741 PR tree-optimization/85116
18742 * tree-ssa-loop-ch.c (do_while_loop_p): A do-while loop should
18743 have a loop exit from the single latch predecessor. Remove
18744 case of header with just condition.
18745 (ch_base::copy_headers): Exclude infinite loops from any
18747 (pass_ch::execute): Record exits.
18749 2018-04-26 Richard Biener <rguenther@suse.de>
18751 * tree-vect-data-refs.c (vect_get_data_access_cost): Get
18752 prologue cost vector and pass it to vect_get_load_cost.
18753 (vect_get_peeling_costs_all_drs): Likewise.
18754 (vect_peeling_hash_get_lowest_cost): Likewise.
18755 (vect_enhance_data_refs_alignment): Likewise.
18757 2018-04-26 Richard Biener <rguenther@suse.de>
18759 PR middle-end/85450
18760 * tree-cfg.c (verify_gimple_assign_unary): Restore proper
18761 checking of integer<->pointer conversions.
18762 * omp-expand.c (expand_omp_for_static_nochunk): Avoid
18763 sign-/zero-extending pointer types.
18764 (expand_omp_for_static_chunk): Likewise.
18766 2018-03-22 Hans-Peter Nilsson <hp@axis.com>
18767 Jean Lee <xiaoyur347@gmail.com>
18769 * config/mips/mips.c (mips_asan_shadow_offset): New function.
18770 (TARGET_ASAN_SHADOW_OFFSET): Define.
18771 * config/mips/mips.h (FRAME_GROWS_DOWNWARD): Augment to also be
18772 true for -fsanitize=address.
18774 2018-04-25 Mark Wielaard <mark@klomp.org>
18776 * dwarf2out.c (file_info_cmp): Sort longer dir prefixes before
18779 2018-04-25 Jakub Jelinek <jakub@redhat.com>
18781 * config/i386/i386.md (*x86_mov<mode>cc_0_m1): Use type "alu1" rather
18782 than "alu", remove explicit "memory" and "imm_disp" attributes.
18783 (*x86_mov<mode>cc_0_m1_se, *x86_mov<mode>cc_0_m1_neg): Likewise.
18785 PR middle-end/85414
18786 * simplify-rtx.c (simplify_unary_operation_1) <case SIGN_EXTEND,
18787 case ZERO_EXTEND>: Pass SUBREG_REG (op) rather than op to
18788 gen_lowpart_no_emit.
18790 2018-04-25 Sebastian Peryt <sebastian.peryt@intel.com>
18793 * config/i386/i386.c (ix86_expand_builtin): Change memory
18794 operand to XI, extend p0 to Pmode.
18795 * config/i386/i386.md: Change unspec volatile and operand
18796 1 mode to XI, change operand 0 mode to P.
18798 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
18800 * config/nds32/nds32-predicates.c (nds32_can_use_bclr_p): Mask with
18801 GET_MODE_MASK before any checking.
18802 (nds32_can_use_bset_p): Likewise.
18803 (nds32_can_use_btgl_p): Likewise.
18805 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
18807 * config/nds32/nds32-doubleword.md: New define_split pattern for
18808 illegal register number.
18810 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
18812 * config/nds32/nds32.c (nds32_print_operand): Set op_value ealier.
18814 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
18816 * config/nds32/nds32.h (ASM_APP_ON): Add missing newline character.
18818 2018-04-25 Richard Biener <rguenther@suse.de>
18820 * lto-streamer.h (LTO_major_version): Bump to 8.
18822 2018-04-25 Jakub Jelinek <jakub@redhat.com>
18824 * BASE-VER: Set to 9.0.0.
18826 2018-04-24 Segher Boessenkool <segher@kernel.crashing.org>
18828 * config/rs6000/rs6000.c (init_float128_ieee): Fix spelling mistakes
18829 in __abskf2 and __powikf2.
18831 2018-04-24 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
18834 * config/aarch64/constraints.md (Usg, Usj): New constraints.
18835 * config/aarch64/iterators.md (cmode_simd): New mode attribute.
18836 * config/aarch64/aarch64.md (*aarch64_ashr_sisd_or_int_<mode>3):
18837 Use the above on operand 2. Reindent.
18838 (*aarch64_lshr_sisd_or_int_<mode>3): Likewise.
18840 2018-04-24 H.J. Lu <hongjiu.lu@intel.com>
18843 * common/config/i386/i386-common.c (ix86_handle_option): Don't
18845 * config/i386/i386.opt (mcet): Removed.
18846 * doc/install.texi: Remove -mcet documentation.
18847 * doc/invoke.texi: Likewise.
18849 2018-04-24 H.J. Lu <hongjiu.lu@intel.com>
18852 * doc/install.texi: Remove -mcet from bootstrap-cet.
18854 2018-04-24 Jakub Jelinek <jakub@redhat.com>
18857 * config/i386/i386.c (ix86_init_mmx_sse_builtins): Don't define
18858 __builtin_ia32_readeflags_u32 and __builtin_ia32_writeeflags_u32
18862 * config/rs6000/rs6000-p8swap.c (const_load_sequence_p): Punt if
18863 const_vector is not CONST_VECTOR or SYMBOL_REF for a constant pool
18864 containing a CONST_VECTOR.
18866 2018-04-24 Cesar Philippidis <cesar@codesourcery.com>
18868 * doc/install.texi: Update newlib dependency for nvptx.
18870 2018-04-24 Jakub Jelinek <jakub@redhat.com>
18873 * config/i386/i386.c (ix86_expand_vector_init_one_var): Use UINTVAL
18874 instead of INTVAL when shifting x left.
18876 2018-04-24 Andreas Krebbel <krebbel@linux.ibm.com>
18878 PR tree-optimization/85478
18879 * tree-vect-loop.c (vect_analyze_loop_2): Do not call
18880 vect_grouped_store_supported for single element vectors.
18882 2018-04-24 Richard Biener <rguenther@suse.de>
18885 * config/i386/i386.c (ix86_add_stmt_cost): Restrict strided
18886 load cost increase to the case of non-constant step.
18888 2018-04-24 Jakub Jelinek <jakub@redhat.com>
18891 * reg-stack.c (move_for_stack_reg): Don't fail assertion about dead
18892 destination if any_malformed_asm.
18894 2018-04-23 Eric Botcazou <ebotcazou@adacore.com>
18896 PR middle-end/85496
18897 * expr.c (store_field): In the bitfield case, if the value comes from
18898 a function call and is returned in registers by means of a PARALLEL,
18899 do not change the mode of the temporary unless BLKmode and VOIDmode.
18901 2018-04-23 Andrey Belevantsev <abel@ispras.ru>
18903 PR rtl-optimization/85423
18904 * sel-sched-ir.c (has_dependence_note_mem_dep): Only discard
18905 dependencies to debug insns when the previous insn is non-debug.
18907 2018-04-23 Claudiu Zissulescu <claziss@synopsys.com>
18909 * config/arc/arc.md ("vunspec"): Delete it, unify all the unspec
18910 enums into a single definition.
18911 (fls): Fix predicates and printing.
18914 2018-04-23 Claudiu Zissulescu <claziss@synopsys.com>
18916 * config/arc/arc-protos.h (check_if_valid_sleep_operand): Remove.
18917 * config/arc/arc.c (arc_expand_builtin): Sleep accepts registers
18918 and short u6 immediate.
18919 (check_if_valid_sleep_operand): Remove.
18920 * config/arc/arc.md (Sleep): Accepts registers and u6 immediates.
18922 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
18924 * config/nds32/nds32.c (nds32_compute_stack_frame): Consider
18925 flag_always_save_lp condition.
18926 * config/nds32/nds32.opt (malways-save-lp): New option.
18928 2018-04-22 Shiva Chen <shiva0217@gmail.com>
18930 * config/nds32/nds32-protos.h (nds32_use_load_post_increment): Declare.
18931 * config/nds32/nds32.c (nds32_use_load_post_increment): New.
18932 * config/nds32/nds32.h
18933 (USE_LOAD_POST_INCREMENT, USE_LOAD_POST_DECREMENT): Define.
18934 (USE_STORE_POST_INCREMENT, USE_STORE_POST_DECREMENT): Define.
18936 2018-04-22 Shiva Chen <shiva0217@gmail.com>
18938 * config/nds32/nds32-protos.h (nds32_ls_333_p): Remove.
18939 * config/nds32/nds32.c (nds32_ls_333_p): Remove.
18941 2018-04-22 Shiva Chen <shiva0217@gmail.com>
18942 Chung-Ju Wu <jasonwucj@gmail.com>
18944 * config/nds32/nds32-protos.h (nds32_case_vector_shorten_mode):
18946 * config/nds32/nds32.c (nds32_case_vector_shorten_mode): New function.
18947 * config/nds32/nds32.h (CASE_VECTOR_SHORTEN_MODE): Modify.
18949 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
18951 * config/nds32/nds32.c (nds32_compute_stack_frame): Fix wrong value.
18953 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
18955 * config/nds32/nds32-protos.h (nds32_data_alignment,
18956 nds32_local_alignment): Declare.
18957 * config/nds32/nds32.c (nds32_data_alignment, nds32_constant_alignment,
18958 nds32_local_alignment): New functions.
18959 (TARGET_CONSTANT_ALIGNMENT): Define.
18960 * config/nds32/nds32.h (DATA_ALIGNMENT, LOCAL_ALIGNMENT): Define.
18962 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
18964 * config/nds32/nds32.c
18965 (TARGET_HARD_REGNO_MODE_OK): Move to the bottom of file.
18966 (TARGET_MODES_TIEABLE_P): Likewise.
18968 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
18970 * config/nds32/nds32.c (nds32_asm_file_start): Display optimization
18971 level Ofast and Og.
18973 2018-04-22 Monk Chiang <sh.chiang04@gmail.com>
18974 Chung-Ju Wu <jasonwucj@gmail.com>
18976 * config/nds32/constants.md (unspec_volatile_element): Add enum values
18977 for unaligned access.
18978 * config/nds32/nds32-intrinsic.c: Implementation of expanding
18980 * config/nds32/nds32-intrinsic.md: Likewise.
18981 * config/nds32/nds32_intrinsic.h: Likewise.
18982 * config/nds32/nds32.h (nds32_builtins): Likewise.
18983 * config/nds32/nds32.opt (munaligned-access): New option.
18984 * config/nds32/nds32.c (nds32_asm_file_start): Display
18985 flag_unaligned_access status.
18987 2018-04-20 Kito Cheng <kito.cheng@gmail.com>
18989 * config/riscv/elf.h (LINK_SPEC): Pass --no-relax if
18990 -mno-relax is present.
18991 * config/riscv/linux.h (LINK_SPEC): Ditto.
18993 2018-04-20 Martin Sebor <msebor@redhat.com>
18996 * gimple-fold.c (gimple_fold_builtin_strcpy): Suppress -Wrestrict
18998 (gimple_fold_builtin_stxcpy_chk): Same.
18999 * gimple-ssa-warn-restrict.c (check_bounds_or_overlap): Same.
19001 2018-04-20 Michael Meissner <meissner@linux.ibm.com>
19004 * config/rs6000/rs6000.c (init_float128_ieee): Add support to call
19005 __powikf2 when long double is IEEE 128-bit.
19007 2018-04-20 Kito Cheng <kito.cheng@gmail.com>
19009 * config/riscv/riscv.c (riscv_first_stack_step): Round up min
19010 step to make sure stack always aligned.
19012 2018-04-20 Carl Love <cel@us.ibm.com>
19015 * config/rs6000/rs6000-c.c (rs6000_gimple_fold_builtin): Add
19016 size check for arg0.
19018 2018-04-20 Nathan Sidwell <nathan@codesourcery.com>
19019 Tom de Vries <tom@codesourcery.com>
19022 * config/nvptx/nvptx.c (nvptx_emit_forking, nvptx_emit_joining):
19023 Emit insns for calls too.
19024 (nvptx_find_par): Always look for worker-level predecessor insn.
19025 (nvptx_propagate): Add is_call parm, return bool. Copy frame for
19027 (nvptx_vpropagate, nvptx_wpropagate): Adjust.
19028 (nvptx_process_pars): Propagate frames for calls.
19030 2018-04-20 H.J. Lu <hongjiu.lu@intel.com>
19033 * common/config/i386/i386-common.c (OPTION_MASK_ISA_IBT_SET):
19035 (OPTION_MASK_ISA_IBT_UNSET): Likewise.
19036 (ix86_handle_option): Don't handle OPT_mibt.
19037 * config/i386/cet.h: Check __CET__ instead of __IBT__ and
19039 * config/i386/driver-i386.c (host_detect_local_cpu): Remove
19041 * config/i386/i386-c.c (ix86_target_macros_internal): Don't
19042 check OPTION_MASK_ISA_IBT nor flag_cf_protection.
19043 (ix86_target_macros): Define __CET__ with flag_cf_protection
19044 for -fcf-protection.
19045 * config/i386/i386.c (isa2_opts): Remove -mibt.
19046 * config/i386/i386.h (TARGET_IBT): Removed.
19047 (TARGET_IBT_P): Likewise.
19048 (ix86_valid_target_attribute_inner_p): Don't check OPT_mibt.
19049 * config/i386/i386.md (nop_endbr): Don't check TARGET_IBT.
19050 * config/i386/i386.opt (mcet): Update help message.
19051 (mshstk): Likewise.
19053 * doc/invoke.texi: Remove -mibt. Document __CET__. Document
19054 -mcet as an alias for -mshstk.
19056 2018-04-20 Richard Biener <rguenther@suse.de>
19058 PR middle-end/85475
19059 * match.pd ((X * CST) * Y -> (X * Y) * CST): Avoid exponential
19060 complexity by forcing a single use of the multiply operand.
19062 2018-04-20 Martin Jambor <mjambor@suse.cz>
19065 * ipa-cp.c (cgraph_edge_brings_value_p): Move check for self-feeding
19066 recursion dependency to only apply to non-clones.
19068 2018-04-20 Martin Jambor <mjambor@suse.cz>
19071 * ipa-cp.c (create_specialized_node): Check that clones of
19072 self-recursive edges exist during IPA-CP.
19074 2018-04-19 Toon Moene <toon@moene.org>
19076 * doc/invoke.texi: Add -floop-unroll-and-jam to options enabled
19079 2018-04-19 Jakub Jelinek <jakub@redhat.com>
19081 PR tree-optimization/85467
19082 * fold-const.c (fold_ternary_loc) <case BIT_FIELD_REF>: Use
19083 VECTOR_TYPE_P macro. If type is vector type, VIEW_CONVERT_EXPR the
19084 VECTOR_CST element to type.
19086 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
19089 * config/i386/i386.h (STACK_SAVEAREA_MODE): New.
19090 * config/i386/i386.md (builtin_setjmp_setup): Removed.
19091 (builtin_longjmp): Likewise.
19092 (save_stack_nonlocal): New pattern.
19093 (restore_stack_nonlocal): Likewise.
19095 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
19098 * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
19099 Replace ASM_OUTPUT_LABEL with fprintf.
19101 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
19104 * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
19105 Check flag_cf_protection instead of TARGET_IBT and TARGET_SHSTK.
19106 * config/i386/i386-c.c (ix86_target_macros_internal): Also
19107 define __IBT__ and __SHSTK__ for -fcf-protection.
19108 * config/i386/i386.c (pass_insert_endbranch::gate): Don't check
19110 (ix86_trampoline_init): Likewise.
19111 (x86_output_mi_thunk): Likewise.
19112 (ix86_notrack_prefixed_insn_p): Likewise.
19113 (ix86_option_override_internal): Don't disallow -fcf-protection.
19114 * config/i386/i386.md (rdssp<mode>): Also enable for
19116 (incssp<mode>): Likewise.
19117 (nop_endbr): Likewise.
19118 * config/i386/i386.opt (mcet): Change help message to built-in
19121 (mshstk): Likewise.
19122 * doc/invoke.texi: Remove -mcet, -mibt and -mshstk condition
19123 on -fcf-protection. Change -mcet, -mibt and -mshstk to only
19124 enable CET built-in functions.
19126 2018-04-19 Sebastian Peryt <sebastian.peryt@intel.com>
19128 * common/config/i386/i386-common.c
19129 (OPTION_MASK_ISA_MOVDIRI_SET, OPTION_MASK_ISA_MOVDIR64B_SET,
19130 OPTION_MASK_ISA_MOVDIRI_UNSET,
19131 OPTION_MASK_ISA_MOVDIR64B_UNSET): New defines.
19132 (ix86_handle_option): Handle -mmovdiri and -mmovdir64b.
19133 * config.gcc (movdirintrin.h): New header.
19134 * config/i386/cpuid.h (bit_MOVDIRI,
19135 bit_MOVDIR64B): New bits.
19136 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mmovdiri
19138 * config/i386/i386-builtin-types.def ((VOID, PUNSIGNED, UNSIGNED),
19139 (VOID, PVOID, PCVOID)): New function types.
19140 * config/i386/i386-builtin.def (__builtin_ia32_directstoreu_u32,
19141 __builtin_ia32_directstoreu_u64,
19142 __builtin_ia32_movdir64b): New builtins.
19143 * config/i386/i386-c.c (__MOVDIRI__, __MOVDIR64B__): New.
19144 * config/i386/i386.c (ix86_target_string): Added -mmovdir64b
19146 (ix86_valid_target_attribute_inner_p): Ditto.
19147 (ix86_expand_special_args_builtin): Added VOID_FTYPE_PUNSIGNED_UNSIGNED
19148 and VOID_FTYPE_PUNSIGNED_UNSIGNED.
19149 (ix86_expand_builtin): Expand IX86_BUILTIN_MOVDIR64B.
19150 * config/i386/i386.h (TARGET_MOVDIRI, TARGET_MOVDIRI_P,
19151 TARGET_MOVDIR64B, TARGET_MOVDIR64B_P): New.
19152 * config/i386/i386.md (UNSPECV_MOVDIRI, UNSPECV_MOVDIR64B): New.
19153 (movdiri<mode>, movdir64b_<mode>): New.
19154 * config/i386/i386.opt: Add -mmovdiri and -mmovdir64b.
19155 * config/i386/immintrin.h: Include movdirintrin.h.
19156 * config/i386/movdirintrin.h: New file.
19157 * doc/invoke.texi: Added -mmovdiri and -mmovdir64b.
19159 2018-04-19 Richard Biener <rguenther@suse.de>
19161 PR middle-end/85455
19162 * cfg.c (clear_bb_flags): When loop state says we have
19163 marked irreducible regions also preserve BB_IRREDUCIBLE_LOOP.
19165 2018-04-19 Richard Biener <rguenther@suse.de>
19167 PR tree-optimization/84737
19168 * tree-vect-data-refs.c (vect_copy_ref_info): New function
19169 copying restrict info.
19170 (vect_setup_realignment): Use it.
19171 * tree-vectorizer.h (vect_copy_ref_info): Declare.
19172 * tree-vect-stmts.c (vectorizable_store): Copy ref info from
19173 the first DR to all generated stores.
19174 (vectorizable_load): Likewise for loads.
19176 2018-04-19 Jakub Jelinek <jakub@redhat.com>
19178 PR tree-optimization/85446
19179 * match.pd ((intptr_t) x eq/ne CST to x eq/ne (typeof x) cst): Require
19180 the integral and pointer types to have the same precision.
19182 * doc/install.texi: Document --disable-cet being the default and
19185 2018-04-18 Martin Liska <mliska@suse.cz>
19187 * ipa-devirt.c (odr_subtypes_equivalent_p): Fix GNU coding
19190 2018-04-18 Martin Liska <mliska@suse.cz>
19193 2018-03-02 Eric Botcazou <ebotcazou@adacore.com>
19196 * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
19197 arguments if they are comparable.
19199 2018-04-18 Martin Liska <mliska@suse.cz>
19202 2018-03-13 Eric Botcazou <ebotcazou@adacore.com>
19205 * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
19208 2018-04-18 H.J. Lu <hongjiu.lu@intel.com>
19211 * config/i386/i386.c (ix86_expand_split_stack_prologue): Insert
19212 ENDBR after calling __morestack.
19214 2018-04-18 David Malcolm <dmalcolm@redhat.com>
19217 * configure.ac (gcc-driver-name.h): Honor --with-gcc-major-version
19218 by using gcc_base_ver to generate a gcc_driver_version, and use
19219 it when generating GCC_DRIVER_NAME.
19220 * configure: Regenerate.
19222 2018-04-18 Jakub Jelinek <jakub@redhat.com>
19225 * config.gcc: Obsolete powerpc*-*-*spe*.
19227 2018-04-17 Jakub Jelinek <jakub@redhat.com>
19230 * dbxout.c (dbxout_int): Perform negation in unsigned int type.
19231 (stabstr_D): Change type of unum from unsigned int to
19232 unsigned HOST_WIDE_INT. Perform negation in unsigned HOST_WIDE_INT
19235 2018-04-17 Jim Wilson <jimw@sifive.com>
19238 * config/riscv/riscv.c (riscv_compute_frame_info): Add calls to
19239 RISCV_STACK_ALIGN when using outgoing_args_size and pretend_args_size.
19240 Set arg_pointer_offset after using pretend_args_size.
19242 2018-04-17 Jakub Jelinek <jakub@redhat.com>
19244 PR rtl-optimization/85431
19245 * dse.c (record_store): Ignore zero width stores.
19248 * asan.c (handle_builtin_stack_restore): Adjust comment. Emit
19249 __asan_allocas_unpoison call and last_alloca_addr = new_sp before
19250 __builtin_stack_restore rather than after it.
19251 * builtins.c (expand_asan_emit_allocas_unpoison): Pass
19252 arg1 + (virtual_dynamic_stack_rtx - stack_pointer_rtx) as second
19253 argument instead of virtual_dynamic_stack_rtx.
19255 2018-04-17 Kelvin Nilsen <kelvin@gcc.gnu.org>
19257 * config/rs6000/rs6000-protos.h (rs6000_builtin_is_supported_p):
19259 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
19260 Add note to error message to explain internal mapping of overloaded
19261 built-in function name to non-overloaded built-in function name.
19262 * config/rs6000/rs6000.c (rs6000_builtin_is_supported_p): New
19265 2018-04-17 Michael Meissner <meissner@linux.vnet.ibm.com>
19268 * config/rs6000/rs6000.md (pack<mode>): Do not try handle a pack
19269 where the inputs overlap with the output.
19271 2018-04-17 Jakub Jelinek <jakub@redhat.com>
19273 * config/i386/sse.md (vec_extract_lo_<mode><mask_name>): Add
19274 (=v, v) alternative and explicit "memory" attribute.
19275 (vec_extract_lo_<mode><mask_name>): Likewise. Also add
19276 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
19278 (vec_extract_lo_<mode><mask_name>): Add (=v, v) alternative and use
19279 "sselog1" type instead of "sselog".
19280 (vec_extract_hi_<mode><mask_name>): Use "sselog1" type instead of
19281 "sselog". Remove explicit "memory" attribute.
19282 (vec_extract_lo_v32hi): Add (=v, v) alternative and explicit "memory",
19283 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
19285 (vec_extract_hi_v32hi): Merge all alternatives into one, use
19286 "sselog1" type instead of "sselog". Remove explicit "memory"
19288 (vec_extract_hi_v16hi): Merge each pair of alternatives into one,
19289 use "sselog1" type instead of "sselog". Remove explicit "memory"
19291 (vec_extract_lo_v64qi): Add (=v, v) alternative and explicit "memory",
19292 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
19294 (vec_extract_hi_v64qi): Merge all alternatives into one, use
19295 "sselog1" type instead of "sselog". Remove explicit "memory"
19297 (vec_extract_hi_v32qi): Merge each pair of alternatives into one,
19298 use "sselog1" type instead of "sselog". Remove explicit "memory"
19302 * config/i386/i386.md (*ashlqi3_1_slp): Use alu1 type instead of alu.
19304 PR middle-end/85414
19305 * rtlhooks.c (gen_lowpart_if_possible): Don't call gen_lowpart_SUBREG
19308 2018-04-17 Martin Jambor <mjambor@suse.cz>
19311 * ipa-cp.c (create_specialized_node): Call
19312 expand_all_artificial_thunks if necessary.
19314 2018-04-17 Martin Liska <mliska@suse.cz>
19317 * ipa-devirt.c (odr_types_equivalent_p): Remove trailing
19318 in message, remote space in between '_G' and '('.
19320 2018-04-17 Jakub Jelinek <jakub@redhat.com>
19323 * config/i386/sse.md (reduces<mode><mask_scalar_name>,
19324 avx512f_vmcmp<mode>3<round_saeonly_name>,
19325 avx512f_vmcmp<mode>3_mask<round_saeonly_name>,
19326 avx512f_sgetexp<mode><mask_scalar_name><round_saeonly_scalar_name>,
19327 avx512f_rndscale<mode><round_saeonly_name>,
19328 avx512dq_ranges<mode><mask_scalar_name><round_saeonly_scalar_name>,
19329 avx512f_vgetmant<mode><mask_scalar_name><round_saeonly_scalar_name>):
19330 Use %<iptr>2 instead of %2 for -masm=intel.
19331 (avx512f_vcvtss2usi<round_name>, avx512f_vcvtss2usiq<round_name>,
19332 avx512f_vcvttss2usi<round_saeonly_name>,
19333 avx512f_vcvttss2usiq<round_saeonly_name>): Use %k1 instead of %1 for
19335 (avx512f_vcvtsd2usi<round_name>, avx512f_vcvtsd2usiq<round_name>,
19336 avx512f_vcvttsd2usi<round_saeonly_name>,
19337 avx512f_vcvttsd2usiq<round_saeonly_name>, ufloatv2siv2df2<mask_name>):
19338 Use %q1 instead of %1 for -masm=intel.
19339 (avx512f_sfixupimm<mode><sd_maskz_name><round_saeonly_name>,
19340 avx512f_sfixupimm<mode>_mask<round_saeonly_name>): Use %<iptr>3 instead
19341 of %3 for -masm=intel.
19342 (sse2_shufpd_v2df_mask): Fix a typo, change %{6%} to %{%6%} for
19344 (*avx512vl_<code>v2div2qi2_store): Use %w0 instead of %0 for
19346 (*avx512vl_<code><mode>v4qi2_store): Use %k0 instead of %0 for
19348 (avx512vl_<code><mode>v4qi2_mask_store): Use a single pattern with
19349 %k0 and %1 for -masm=intel rather than two patterns, one with %0 and
19351 (*avx512vl_<code><mode>v8qi2_store): Use %q0 instead of %0 for
19353 (avx512vl_<code><mode>v8qi2_mask_store): Use a single pattern with
19354 %q0 and %1 for -masm=intel rather than two patterns, one with %0 and
19355 %g1 and one with %0 and %1.
19356 (avx512er_vmrcp28<mode><round_saeonly_name>,
19357 avx512er_vmrsqrt28<mode><round_saeonly_name>): Use %<iptr>1 instead of
19358 %1 for -masm=intel.
19359 (avx5124fmaddps_4fmaddps_mask, avx5124fmaddps_4fmaddss_mask,
19360 avx5124fmaddps_4fnmaddps_mask, avx5124fmaddps_4fnmaddss_mask,
19361 avx5124vnniw_vp4dpwssd_mask, avx5124vnniw_vp4dpwssds_mask): Swap order
19362 of %0 and %{%4%} for -masm=intel.
19363 (avx5124fmaddps_4fmaddps_maskz, avx5124fmaddps_4fmaddss_maskz,
19364 avx5124fmaddps_4fnmaddps_maskz, avx5124fmaddps_4fnmaddss_maskz,
19365 avx5124vnniw_vp4dpwssd_maskz, avx5124vnniw_vp4dpwssds_maskz): Swap
19366 order of %0 and %{%5%}%{z%} for -masm=intel.
19368 2018-04-17 Jan Hubicka <jh@suse.cz>
19371 * ipa-devirt.c (odr_types_equivalent_p): Handle bit fields.
19373 2018-04-17 Martin Liska <mliska@suse.cz>
19376 * multiple_target.c (create_dispatcher_calls): Set apostrophes
19377 for target_clone error message. Make default implementation
19378 clone to be a local declaration.
19379 (separate_attrs): Add new argument and check for an empty
19381 (expand_target_clones): Handle it.
19382 (ipa_target_clone): Make redirection just for target_clones
19385 2018-04-16 Cesar Philippidis <cesar@codesourcery.com>
19386 Tom de Vries <tom@codesourcery.com>
19388 PR middle-end/84955
19389 * omp-expand.c (expand_oacc_for): Add dummy false branch for
19390 tiled basic blocks without omp continue statements.
19392 2018-04-16 Aaron Sawdey <acsawdey@linux.ibm.com>
19395 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Mark
19396 vec_extract expression as having side effects to make sure it gets
19399 2018-04-16 H.J. Lu <hongjiu.lu@intel.com>
19402 * config/i386/i386.c (get_builtin_code_for_version): Check
19405 2018-04-16 Olga Makhotina <olga.makhotina@intel.com>
19408 * config.gcc: Support "skylake".
19409 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
19411 * config/i386/i386.c (m_SKYLAKE): Define.
19412 (processor_target_table): Add "skylake".
19413 (ix86_option_override_internal): Add "skylake".
19414 (get_builtin_code_for_version): Handle PROCESSOR_SKYLAKE,
19415 PROCESSOR_CANNONLAKE.
19416 (get_builtin_code_for_version): Fix priority for
19417 PROCESSOR_ICELAKE_CLIENT, PROCESSOR_ICELAKE_SERVER,
19418 PROCESSOR_SKYLAKE-AVX512.
19419 * config/i386/i386.h (processor_costs): Define TARGET_SKYLAKE.
19420 (processor_type): Add PROCESSOR_SKYLAKE.
19422 2018-04-16 Paolo Carlini <paolo.carlini@oracle.com>
19423 Jason Merrill <jason@redhat.com>
19426 * convert.c (convert_to_integer_1): Use direct recursion for
19427 enumeral types and types with a precision less than the number
19428 of bits in their mode.
19430 2018-04-16 Julia Koval <julia.koval@intel.com>
19433 * config/i386/x86-tune.def (X86_TUNE_SSE_UNALIGNED_LOAD_OPTIMAL,
19434 X86_TUNE_SSE_UNALIGNED_STORE_OPTIMAL): Add m_SKYLAKE_AVX512
19436 2018-04-14 Segher Boessenkool <segher@kernel.crashing.org>
19439 * config/rs6000/rs6000.opt (mdirect-move): Make deprecated.
19440 * doc/invoke.texi (RS/6000 and PowerPC Options): Remove -mdirect-move
19441 and -mno-direct-move.
19443 2018-04-13 Paul A. Clarke <pc@us.ibm.com>
19446 * config/rs6000/emmintrin.h (_mm_slli_epi{16,32,64}):
19447 Ensure that vec_splat_s32 is only called with 0 <= shift < 16.
19448 Ensure negative shifts result in {0}.
19450 2018-04-13 Vladimir Makarov <vmakarov@redhat.com>
19452 PR rtl-optimization/79916
19453 * config/rs6000/rs6000.c (rs6000_emit_move): Use assigned hard
19454 regs (if any) to define how to gnerate SD moves when LRA is in
19457 2018-04-13 Jakub Jelinek <jakub@redhat.com>
19459 PR rtl-optimization/85393
19460 * except.h (expand_dw2_landing_pad_for_region): Remove declaration.
19461 * except.c (expand_dw2_landing_pad_for_region): Make static.
19462 * bb-reorder.c (fix_up_crossing_landing_pad): In new_bb emit just
19463 a label and unconditional jump to old_bb, rather than
19464 expand_dw2_landing_pad_for_region insn(s) and jump to single_succ
19467 PR rtl-optimization/85376
19468 * simplify-rtx.c (simplify_const_unary_operation): For CLZ and CTZ and
19469 zero op0, if C?Z_DEFINED_VALUE_AT_ZERO is false, return NULL_RTX
19470 instead of a specific value.
19472 2018-04-13 Jan Hubicka <hubicka@ucw.cz>
19473 Bin Cheng <bin.cheng@arm.com>
19475 PR tree-optimization/82965
19476 PR tree-optimization/83991
19477 * cfgloopanal.c (expected_loop_iterations_unbounded): Add
19478 by_profile_only parameter.
19479 * cfgloopmanip.c (scale_loop_profile): Further scale loop's profile
19480 information if the loop was predicted to iterate too many times.
19481 * cfgloop.h (expected_loop_iterations_unbounded): Update prototype
19483 2018-04-13 Jan Hubicka <hubicka@ucw.cz>
19486 * config/i386/i386.c (ix86_can_inline_p): Allow safe transitions for
19489 2018-04-13 Martin Liska <mliska@suse.cz>
19490 Jakub Jelinek <jakub@redhat.com>
19492 PR middle-end/81657
19493 * expr.h (enum block_op_methods): Add BLOCK_OP_NO_LIBCALL_RET.
19494 * expr.c (emit_block_move_hints): Handle BLOCK_OP_NO_LIBCALL_RET.
19495 * builtins.c (expand_builtin_memory_copy_args): Use
19496 BLOCK_OP_NO_LIBCALL_RET method for mempcpy with non-ignored target,
19497 handle dest_addr == pc_rtx.
19499 2018-04-12 Segher Boessenkool <segher@kernel.crashing.org>
19502 * config/rs6000/rs6000.md (fix_trunc<mode>si2): Use legacy code if
19503 asked to not generate direct moves.
19504 (fix_trunc<mode>si2_stfiwx): Similar.
19505 (fix_trunc<mode>si2_internal): Similar.
19507 2018-04-12 Jakub Jelinek <jakub@redhat.com>
19510 * var-tracking.c (add_stores): Handle STRICT_LOW_PART SET_DEST.
19511 * cselib.c (cselib_record_sets): For STRICT_LOW_PART dest,
19512 lookup if dest in some wider mode is known to be const0_rtx and
19513 if so, record permanent equivalence for it to be ZERO_EXTEND of
19514 the narrower mode destination.
19516 2018-04-12 Cesar Philippidis <cesar@codesourcery.com>
19518 * lto-streamer-out.c (output_function): Revert 259346.
19519 * omp-expand.c (expand_oacc_for): Likewise.
19521 2018-04-12 Alexander Monakov <amonakov@ispras.ru>
19523 PR rtl-optimization/85354
19524 * sel-sched-ir.c (sel_init_pipelining): Move cfg_cleanup call...
19525 * sel-sched.c (sel_global_init): ... here.
19527 2018-04-12 Eric Botcazou <ebotcazou@adacore.com>
19530 * lto-wrapper.c (debug_objcopy): Open the files in binary mode.
19531 * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
19532 mode for PE-COFF targets.
19533 * config/i386/i386-protos.h (i386_pe_asm_lto_start): Declare.
19534 (i386_pe_asm_lto_end): Likewise.
19535 * config/i386/cygming.h (TARGET_ASM_LTO_START): Define.
19536 (TARGET_ASM_LTO_END): Likewise.
19537 * config/i386/winnt.c (saved_debug_info_level): New static variable.
19538 (i386_pe_asm_lto_start): New function.
19539 (i386_pe_asm_lto_end): Likewise.
19541 2018-04-12 Cesar Philippidis <cesar@codesourcery.com>
19542 Richard Biener <rguenther@suse.de>
19544 PR middle-end/84955
19545 * lto-streamer-out.c (output_function): Fix CFG loop state before
19547 * omp-expand.c (expand_oacc_for): Handle calls to internal
19548 functions like regular functions.
19550 2018-04-12 Richard Biener <rguenther@suse.de>
19553 * dwarf2out.c (init_sections_and_labels): Use debug_line_section[_label]
19554 for the early LTO debug to properly generate references to it
19555 during DIE emission. Do not re-use that for the skeleton for
19557 (dwarf2out_early_finish): Likewise.
19559 2018-04-12 Jakub Jelinek <jakub@redhat.com>
19562 * config/i386/sse.md
19563 (<mask_codefor>avx512dq_vextract<shuffletype>64x2_1<mask_name> split,
19564 <mask_codefor>avx512f_vextract<shuffletype>32x4_1<mask_name> split,
19565 vec_extract_lo_<mode><mask_name> split, vec_extract_lo_v32hi,
19566 vec_extract_lo_v64qi): For non-AVX512VL if input is xmm16+ reg
19567 and output is a reg, avoid creating invalid lowpart subreg, but
19568 instead split into a 512-bit move. Don't split if not AVX512VL,
19569 input is xmm16+ reg and output is a mem.
19570 (vec_extract_lo_<mode><mask_name>, vec_extract_lo_v32hi,
19571 vec_extract_lo_v64qi): Don't require split if not AVX512VL, input is
19572 xmm16+ reg and output is a mem.
19574 2018-04-12 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
19576 * config/s390/s390.c (s390_output_indirect_thunk_function): Check
19577 also for flag_dwarf2_cfi_asm.
19579 2018-04-12 Jakub Jelinek <jakub@redhat.com>
19581 PR rtl-optimization/85342
19582 * regcprop.c (copyprop_hardreg_forward_1): Remove replaced array, use
19583 a bool scalar var inside of the loop instead. Don't try to update
19584 recog_data.operand after failed apply_change_group.
19586 2018-04-12 Tom de Vries <tom@codesourcery.com>
19589 * config/nvptx/nvptx.c (flexible_array_member_type_p): New function.
19590 (nvptx_assemble_decl_begin): Add undefined param. Declare undefined
19591 array with flexible array member as array without given dimension.
19592 (nvptx_assemble_undefined_decl): Set nvptx_assemble_decl_begin call
19593 argument for undefined param to true.
19595 2018-04-11 Aaron Sawdey <acsawdey@linux.ibm.com>
19598 * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
19599 -mcall- and -mtraceback=. Remove options -mabi=spe and -mabi=no-spe
19600 from PowerPC section.
19601 * config/rs6000/sysv4.opt (mcall-): Improve help text.
19602 * config/rs6000/rs6000.opt (mblock-compare-inline-limit=): Trim
19603 help text that is too long.
19604 * config/rs6000/rs6000.opt (mblock-compare-inline-loop-limit=): Trim
19605 help text that is too long.
19606 * config/rs6000/rs6000.opt (mstring-compare-inline-limit=): Trim
19607 help text that is too long.
19609 2018-04-11 Uros Bizjak <ubizjak@gmail.com>
19611 * config/alpha/alpha.md (stack_probe_internal): Rename
19612 from "probe_stack". Update all callers.
19614 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
19616 PR rtl-optimization/84566
19617 * sched-deps.c (sched_analyze_insn): Check deps->readonly when invoking
19618 sched_macro_fuse_insns.
19620 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
19623 * sched-rgn.c (add_branch_dependences): Move sel_sched_p check here...
19624 (compute_block_dependences): ... from here.
19626 2018-04-11 Jakub Jelinek <jakub@redhat.com>
19628 PR tree-optimization/85331
19629 * vec-perm-indices.h (vec_perm_indices::clamp): Change input type
19630 from int to HOST_WIDE_INT.
19632 2018-04-11 Martin Jambor <mjambor@suse.cz>
19635 * ipa-cp.c (propagate_vals_across_pass_through): Expand comment.
19636 (cgraph_edge_brings_value_p): New parameter dest_val, check if it is
19637 not the same as the source val.
19638 (cgraph_edge_brings_value_p): New parameter.
19639 (gather_edges_for_value): Pass destination value to
19640 cgraph_edge_brings_value_p.
19641 (perhaps_add_new_callers): Likewise.
19642 (get_info_about_necessary_edges): Likewise and exclude values brought
19643 only by self-recursive edges.
19644 (create_specialized_node): Redirect only clones of self-calling edges.
19645 (+self_recursive_pass_through_p): New function.
19646 (find_more_scalar_values_for_callers_subset): Use it.
19647 (find_aggregate_values_for_callers_subset): Likewise.
19648 (known_aggs_to_agg_replacement_list): Removed.
19649 (decide_whether_version_node): Re-calculate known constants for all
19650 remaining context clones.
19652 2018-04-11 Richard Biener <rguenther@suse.de>
19655 * dwarf2out.c (dwarf2out_finish): Remove DW_AT_stmt_list attribute
19656 from early DWARF output.
19657 (dwarf2out_early_finish): Output line info unconditionally into
19658 early DWARF and add reference to it.
19660 2018-04-11 Jakub Jelinek <jakub@redhat.com>
19663 * config/i386/sse.md (iptr): Add V16SFmode and V8DFmode cases.
19664 (<avx512>_vec_dup<mode><mask_name>): Use a single pattern for modes
19665 other than V2DFmode using iptr mode attribute.
19666 (<avx512>_vec_dup<mode><mask_name>): Use iptr mode attribute.
19668 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
19670 PR rtl-optimization/84659
19671 * sel-sched-ir.c (sel_init_pipelining): Invoke cleanup_cfg.
19673 2018-04-11 Jakub Jelinek <jakub@redhat.com>
19676 * dwarf2out.c (skip_loc_list_entry): Don't call size_of_locs if
19678 (output_loc_list): Pass address of a dummy size variable even in the
19679 locview handling loop.
19680 (index_location_lists): Add comment on why skip_loc_list_entry can't
19683 2018-04-11 Thomas Preud'homme <thomas.preudhomme@arm.com>
19686 * config/arm/arm-builtins.c (arm_expand_builtin): Force input operand
19689 2018-04-10 Aaron Sawdey <acsawdey@linux.ibm.com>
19692 * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
19693 -mblock-compare-inline-limit, -mblock-compare-inline-loop-limit,
19694 and -mstring-compare-inline-limit.
19696 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
19699 * config/rs6000/rs6000.md (allocate_stack): Put the residual size
19700 for stack clash protection in a register whenever we need it to be in
19703 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
19705 * common/config/rs6000/rs6000-common.c (rs6000_option_init_struct):
19706 Enable -fasynchronous-unwind-tables by default if OBJECT_FORMAT_ELF.
19708 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
19711 * config/rs6000/rs6000.opt (mtraceback=): Show the allowed values in
19713 (mlong-double-): Ditto.
19714 * config/rs6000/sysv4.opt (msdata=): Ditto.
19715 (mtls-size=): Ditto.
19717 2018-04-10 Kelvin Nilsen <kelvin@gcc.gnu.org>
19719 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
19720 erroneous entries for
19721 "vector int vec_ldl (int, long int *)", and
19722 "vector unsigned int vec_ldl (int, unsigned long int *)".
19723 Add comments and entries for
19724 "vector bool char vec_ldl (int, bool char *)",
19725 "vector bool short vec_ldl (int, bool short *)",
19726 "vector bool int vec_ldl (int, bool int *)",
19727 "vector bool long long vec_ldl (int, bool long long *)",
19728 "vector pixel vec_ldl (int, pixel *)",
19729 "vector long long vec_ldl (int, long long *)",
19730 "vector unsigned long long vec_ldl (int, unsigned long long *)".
19731 * config/rs6000/rs6000.c (rs6000_init_builtins): Initialize new
19732 type tree bool_long_long_type_node and correct definition of
19733 bool_V2DI_type_node to make reference to this new type tree.
19734 (rs6000_mangle_type): Replace erroneous reference to
19735 bool_long_type_node with bool_long_long_type_node.
19736 * config/rs6000/rs6000.h (enum rs6000_builtin_type_index): Add
19737 comments to emphasize sign distinctions for char and int types and
19738 replace RS6000_BTI_bool_long constant with
19739 RS6000_BTI_bool_long_long constant. Also add comment to restrict
19740 use of RS6000_BTI_pixel.
19741 (bool_long_type_node): Remove this macro definition.
19742 (bool_long_long_type_node): New macro definition
19744 2018-04-10 Jakub Jelinek <jakub@redhat.com>
19746 PR rtl-optimization/85300
19747 * combine.c (subst): Handle subst of CONST_SCALAR_INT_P new_rtx also
19748 into FLOAT and UNSIGNED_FLOAT like ZERO_EXTEND, return a CLOBBER if
19749 simplify_unary_operation fails.
19751 2018-04-10 Martin Liska <mliska@suse.cz>
19753 * gdbhooks.py: Add pretty-printers for varpool_node, symtab_node,
19754 cgraph_edge and ipa_ref.
19756 2018-04-10 Jakub Jelinek <jakub@redhat.com>
19760 * config/i386/sse.md
19761 (<extract_type>_vinsert<shuffletype><extract_suf>_mask): Fix
19762 computation of the VEC_MERGE selector from mask.
19763 (<extract_type>_vinsert<shuffletype><extract_suf>_1<mask_name>):
19764 Fix decoding of the VEC_MERGE selector into mask.
19766 2018-04-10 Richard Sandiford <richard.sandiford@linaro.org>
19768 PR tree-optimization/85286
19769 * tree-vect-data-refs.c (vect_get_smallest_scalar_type):
19771 2018-04-10 Richard Sandiford <richard.sandiford@linaro.org>
19773 * final.c (final_1): Set insn_last_address as well as
19774 insn_current_address.
19776 2018-04-10 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
19779 * explow.c (emit_stack_probe): Call validize_mem on memory location
19780 before passing it to gen_probe_stack. Create address operand and
19781 legitimize it for the probe_stack_address case.
19783 2018-04-09 Jan Hubicka <jh@suse.cz>
19786 * ipa-devirt.c (rebuild_type_inheritance-hash): New.
19787 * ipa-utils.h (rebuild_type_inheritance-hash): Declare.
19788 * tree.c (free_lang_data_in_type): Fix handling of binfos;
19790 (free_lang_data): Rebuild type inheritance graph.
19792 2018-04-09 Martin Sebor <msebor@redhat.com>
19794 * invoke.texi (-finline-small-functions): Mention other optimization
19796 (-findirect-inlining, -fpartial-inlining): Same.
19797 (-finline-functions-called-once): Same.
19798 (-freorder-blocks-and-partition): Same.
19800 2018-04-09 Jan Hubicka <jh@suse.cz>
19803 * cfgcleanup.c (try_forward_edges): Do not give up on crossing
19804 jumps; choose last target that matches the criteria (i.e.
19805 no partition changes for non-crossing jumps).
19806 * cfgrtl.c (cfg_layout_redirect_edge_and_branch): Add basic
19807 support for redirecting crossing jumps to non-crossing.
19809 2018-04-09 Alexey Brodkin <abrodkin@synopsys.com>
19811 * config/arc/arc.c (arc_expand_prologue): Set stack usage info
19812 also for naked functions.
19814 2018-04-09 Claudiu Zissulescu <claziss@synopsys.com>
19816 * config/arc/arc.md (add_shift): New pattern.
19817 (add_shift2): Likewise.
19818 (sub_shift): Likewise.
19819 (sub_shift_cmp0_noout): Likewise.
19820 (compare_si_ashiftsi): Likewise.
19821 (xbfu_cmp0_noout): New combine pattern.
19822 (xbfu_cmp0"): Likewise.
19823 (movsi_set_cc_insn): Place the predicable variant first.
19824 (commutative_binary_cmp0_noout): Remove clobber.
19825 (commutative_binary_cmp0): New pattern.
19826 (noncommutative_binary_cmp0): Likewise.
19827 (noncommutative_binary_cmp0_noout): Likewise.
19828 (noncommutative_binary_comparison_result_used): Removed.
19829 (rsub_cmp0): New pattern.
19830 (rsub_cmp0_noout): Likewise.
19831 (extzvsi): Changed, keep only meaningful variants.
19832 (SQH, SEZ): New iterators.
19833 (SQH_postfix): New mode attribute.
19834 (SEZ_prefix): New code attribute.
19835 (<SEZ_prefix>xt<SQH_postfix>_cmp0_noout): New instruction pattern.
19836 (<SEZ_prefix>xt<SQH_postfix>_cmp0): Likewise.
19837 * config/arc/predicates.md (cc_set_register): Use CC_REG instead
19838 of numerical value.
19839 (noncommutative_operator): Check the availability of barrel
19842 2018-04-09 Richard Biener <rguenther@suse.de>
19844 PR tree-optimization/85284
19845 * tree-ssa-loop-niter.c (number_of_iterations_exit_assumptions):
19846 Only use the niter constraining form of simple_iv when the exit
19847 is always executed.
19849 2018-04-09 Tom de Vries <tom@codesourcery.com>
19852 * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
19853 (define_expand "*memory_barrier"): New define_expand.
19854 (define_insn "memory_barrier"): New insn.
19856 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
19858 PR rtl-optimization/80463
19859 PR rtl-optimization/83972
19860 PR rtl-optimization/83480
19862 * sel-sched-ir.c (has_dependence_note_mem_dep): Take into account the
19863 correct producer for the insn.
19864 (tidy_control_flow): Fixup seqnos in case of debug insns.
19866 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
19868 PR rtl-optimization/83913
19870 * sel-sched-ir.c (merge_expr_data): Choose the middle between two
19871 different sched-times when merging exprs.
19873 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
19875 PR rtl-optimization/83962
19877 * sel-sched-ir.c (tidy_control_flow): Correct the order in which we call
19878 tidy_fallthru_edge and tidy_control_flow.
19880 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
19882 PR rtl-optimization/83530
19884 * sel-sched.c (force_next_insn): New global variable.
19885 (remove_insn_for_debug): When force_next_insn is true, also leave only
19886 next insn in the ready list.
19887 (sel_sched_region): When the region wasn't scheduled, make another pass
19888 over it with force_next_insn set to 1.
19890 2018-04-08 Monk Chiang <sh.chiang04@gmail.com>
19892 * config.gcc (nds32le-*-*, nds32be-*-*): Add nds32/nds32_intrinsic.h
19894 * config/nds32/constants.md (unspec_volatile_element): Add enum values
19895 for interrupt control.
19896 * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
19897 functions for interrupt control.
19898 * config/nds32/nds32-intrinsic.md: Likewise.
19899 * config/nds32/nds32_intrinsic.h: Likewise.
19900 * config/nds32/nds32.h (nds32_builtins): Likewise.
19902 2018-04-08 Chung-Ju Wu <jasonwucj@gmail.com>
19904 * config/nds32/nds32.c (nds32_init_machine_status,
19905 nds32_legitimate_index_p, nds32_legitimate_address_p): Consider
19906 strict_aligned_p field.
19907 (nds32_expand_to_rtl_hook): New function.
19908 (TARGET_EXPAND_TO_RTL_HOOK): Define.
19909 * config/nds32/nds32.h (machine_function): Add strict_aligned_p field.
19911 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
19912 Chung-Ju Wu <jasonwucj@gmail.com>
19914 * config.gcc (nds32*-*-*): Check that n7 is valid to --with-cpu.
19915 * config/nds32/nds32-n7.md: New file.
19916 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N7.
19917 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n7
19919 * config/nds32/nds32-protos.h: More declarations for n7 pipeline.
19920 * config/nds32/nds32.md (pipeline_model): Add n7.
19921 * config/nds32/nds32.opt (mcpu): Support n7 pipeline cpus.
19922 * config/nds32/pipelines.md: Include n7 settings.
19924 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
19925 Chung-Ju Wu <jasonwucj@gmail.com>
19927 * config.gcc (nds32*-*-*): Check that e8 is valid to --with-cpu.
19928 * config/nds32/nds32-e8.md: New file.
19929 * config/nds32/nds32-opts.h (nds32-cpu_type): Add CPU_E8.
19930 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for e8
19932 * config/nds32/nds32-protos.h: More declarations for e8 pipeline.
19933 * config/nds32/nds32.md (pipeline_model): Add e8.
19934 * config/nds32/nds32.opt (mcpu): Support e8 pipeline cpus.
19935 * config/nds32/pipelines.md: Include e8 settings.
19937 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
19938 Chung-Ju Wu <jasonwucj@gmail.com>
19940 * config.gcc (nds32*-*-*): Check that n6/n8/s8 are valid to --with-cpu.
19941 * config/nds32/nds32-n8.md: New file.
19942 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N6 and CPU_N8.
19943 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n8
19945 * config/nds32/nds32-protos.h: More declarations for n8 pipeline.
19946 * config/nds32/nds32-utils.c: More implementations for n8 pipeline.
19947 * config/nds32/nds32.md (pipeline_model): Add n8.
19948 * config/nds32/nds32.opt (mcpu): Support n8 pipeline cpus.
19949 * config/nds32/pipelines.md: Include n8 settings.
19951 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
19952 Chung-Ju Wu <jasonwucj@gmail.com>
19954 * config.gcc (nds32*): Add nds32-utils.o into extra_objs.
19955 * config/nds32/nds32-n9-2r1w.md: New file.
19956 * config/nds32/nds32-n9-3r2w.md: New file.
19957 * config/nds32/nds32-opts.h (nds32_cpu_type, nds32_mul_type,
19958 nds32_register_ports): New or modify for cpu n9.
19959 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n9
19961 * config/nds32/nds32-protos.h: More declarations for n9 pipeline.
19962 * config/nds32/nds32-utils.c: New file.
19963 * config/nds32/nds32.h (TARGET_PIPELINE_N9, TARGET_PIPELINE_SIMPLE,
19964 TARGET_MUL_SLOW): Define.
19965 * config/nds32/nds32.md (pipeline_model): New attribute.
19966 * config/nds32/nds32.opt (mcpu, mconfig-mul, mconfig-register-ports):
19967 New options that support cpu n9.
19968 * config/nds32/pipelines.md: Include n9 settings.
19969 * config/nds32/t-nds32 (nds32-utils.o): Add dependency.
19971 2018-04-08 Chung-Ju Wu <jasonwucj@gmail.com>
19973 * config/nds32/nds32-md-auxiliary.c (output_cond_branch): Output align
19974 information if necessary.
19975 (output_cond_branch_compare_zero): Likewise.
19976 * config/nds32/nds32.c (nds32_adjust_insn_length): Consider align case.
19977 (nds32_target_alignment): Refine for alignment.
19978 * config/nds32/nds32.h (NDS32_ALIGN_P): Define.
19979 (FUNCTION_BOUNDARY): Modify.
19980 * config/nds32/nds32.md (call_internal, call_value_internal): Consider
19982 * config/nds32/nds32.opt (malways-align, malign-functions): New.
19984 2018-04-08 Monk Chiang <sh.chiang04@gmail.com>
19986 * config/nds32/constants.md (unspec_volatile_element): Add values for
19987 TLB operation and data prefetch.
19988 * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
19989 functions for TLB operation and data prefetch.
19990 * config/nds32/nds32-intrinsic.md: Likewise.
19991 * config/nds32/nds32_intrinsic.h: Likewise.
19992 * config/nds32/nds32.c (nds32_dpref_names): Likewise.
19993 (nds32_print_operand): Likewise.
19994 * config/nds32/nds32.h (nds32_builtins): Likewise.
19996 2018-04-07 Thomas Koenig <tkoenig@gcc.gnu.org>
19997 Andrew Pinski <pinsika@gcc.gnu.org>
19999 PR middle-end/82976
20000 * match.pd: Use constant_boolean_node of correct type instead of
20001 boolean_true_node or boolean_false_node for simplifying
20002 pointer comparisons to zero.
20004 2018-04-07 Jakub Jelinek <jakub@redhat.com>
20006 PR tree-optimization/80021
20007 * tree.c (verify_type_variant): Make error call in verify_variant_match
20008 translatable and remove final full stop.
20010 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
20012 * config/nds32/constants.md (unspec_volatile_element): Add
20013 UNSPEC_VOLATILE_EH_RETURN.
20014 * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push,
20015 nds32_output_stack_pop): Support dwarf exception handling process.
20016 * config/nds32/nds32-protos.h (nds32_dynamic_chain_address): Declare.
20017 * config/nds32/nds32.c (nds32_init_machine_status): Support dwarf
20018 exception handling process.
20019 (nds32_compute_stack_frame): Likewise.
20020 (nds32_return_addr_rtx): Likewise.
20021 (nds32_initial_elimination_offset): Likewise.
20022 (nds32_expand_prologue): Likewise.
20023 (nds32_expand_epilogue): Likewise.
20024 (nds32_dynamic_chain_address): New function.
20025 * config/nds32/nds32.h (machine_function): Add fields for dwarf
20026 exception handling.
20027 (DYNAMIC_CHAIN_ADDRESS): Define.
20028 (EH_RETURN_DATA_REGNO): Define.
20029 (EH_RETURN_STACKADJ_RTX): Define.
20030 * config/nds32/nds32.md (eh_return, nds32_eh_return): Implement
20031 patterns for dwarf exception handling.
20033 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
20035 * config/nds32/nds32.h: Clean up obsolete macros.
20037 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
20039 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
20040 Add enum values for particular instructions.
20041 * config/nds32/nds32-intrinsic.c: Implementation of expanding
20042 particular intrinsic functions.
20043 * config/nds32/nds32-intrinsic.md: Likewise.
20044 * config/nds32/nds32_intrinsic.h: Likewise.
20045 * config/nds32/nds32.h (nds32_builtins): Likewise.
20046 * config/nds32/nds32.md (type): Add pbsad and pbsada.
20047 (btst, ave): New patterns for particular instructions.
20049 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
20051 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
20052 Add enum values for atomic load/store and memory sync.
20053 * config/nds32/nds32-intrinsic.c: Implementation for atomic load/store
20055 * config/nds32/nds32-intrinsic.md: Likewise.
20056 * config/nds32/nds32_intrinsic.h: Likewise.
20057 * config/nds32/nds32.h (nds32_builtins): Likewise.
20059 2018-04-07 Jakub Jelinek <jakub@redhat.com>
20061 PR tree-optimization/85257
20062 * fold-const.c (native_encode_vector): If not all elts could fit
20063 and off is -1, return 0 rather than offset.
20064 * tree-ssa-sccvn.c (vn_reference_lookup_3): Pass
20065 (offseti - offset2) / BITS_PER_UNIT as 4th argument to
20066 native_encode_expr. Verify len * BITS_PER_UNIT >= maxsizei. Don't
20067 adjust buffer in native_interpret_expr call.
20069 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
20071 * config/nds32/constants.md (unspec_volatile_element): Add cache
20072 control enum values.
20073 * config/nds32/nds32-intrinsic.c: Add cache control expand functions.
20074 * config/nds32/nds32-intrinsic.md: Add cache control patterns.
20075 * config/nds32/nds32.c (nds32_cctl_names): New.
20076 (nds32_print_operand): Handle cache control register names.
20077 * config/nds32/nds32.h (nds32_builtins): New enum values.
20078 * config/nds32/nds32_intrinsic.h: Add cache control enum types and
20080 * config/nds32/nds32.md (type): Add mmu.
20081 * config/nds32/pipelines.md (simple_insn): Add mmu.
20083 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
20085 * config/nds32/nds32.md (type): Remove call.
20086 * config/nds32/pipelines.md (simple_insn): Likewise.
20088 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
20090 * config/nds32/constants.md (unspec_volatile_element): Add
20091 UNSPEC_VOLATILE_FMFCSR, UNSPEC_VOLATILE_FMTCSR and
20092 UNSPEC_VOLATILE_FMFCFG.
20093 * config/nds32/nds32-intrinsic.c (bdesc_noarg): New builtin
20094 description for fmfcfg and fmfcsr.
20095 (bdesc_1arg): Add fmtcsr.
20096 (bdesc_2arg): Add fcpynss, fcpyss, fcpynsd and fcpysd.
20097 (nds32_expand_builtin_impl): Deal with FPU intrinsic functions.
20098 * config/nds32/nds32-intrinsic.md (unspec_fcpynsd, unspec_fcpysd,
20099 unspec_fcpynss, unspec_fcpysd, unspec_fcpyss, unspec_fmfcsr,
20100 unspec_fmfcfg): New patterns.
20101 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FMFCFG,
20102 NDS32_BUILTIN_FMFCSR, NDS32_BUILTIN_FMTCSR, NDS32_BUILTIN_FCPYNSS,
20103 NDS32_BUILTIN_FCPYSS,NDS32_BUILTIN_FCPYNSD and NDS32_BUILTIN_FCPYSD.
20104 * config/nds32/nds32_intrinsic.h (__nds32__fcpynsd, __nds32__fcpynss,
20105 __nds32__fcpysd, __nds32__fcpyss, __nds32__fmfcsr, __nds32__fmtcsr,
20106 __nds32__fmfcfg): Define.
20108 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
20110 * config/nds32/nds32.c (nds32_intrinsic_register_names): Add more
20111 intrinsic register names.
20112 * config/nds32/nds32_intrinsic.h (nds32_intrinsic_registers): Add more
20113 intrinsic register enum values and macros.
20115 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
20117 * config/nds32/nds32.c (nds32_legitimate_index_p): Modify condition
20118 for load/store addressing form.
20119 (nds32_print_operand_address): Likewise.
20121 2018-04-06 Eric Botcazou <ebotcazou@adacore.com>
20124 * config/sparc/sparc.c (sparc_expand_move): Deal with symbolic operands
20125 based on LABEL_REF. Remove useless assertion.
20126 (pic_address_needs_scratch): Fix formatting.
20127 (sparc_legitimize_pic_address): Minor tweaks.
20128 (sparc_delegitimize_address): Adjust assertion accordingly.
20129 * config/sparc/sparc.md (movsi_pic_label_ref): Change label_ref_operand
20130 into symbolic_operand.
20131 (movsi_high_pic_label_ref): Likewise.
20132 (movsi_lo_sum_pic_label_ref): Likewise.
20133 (movdi_pic_label_ref): Likewise.
20134 (movdi_high_pic_label_ref): Likewise.
20135 (movdi_lo_sum_pic_label_ref): Likewise.
20137 2018-04-06 Amaan Cheval <amaan.cheval@gmail.com>
20139 * config.gcc (x86_64-*-rtems*): Add rtems.h to tm_file for
20140 custom LIB_SPEC setup.
20142 2018-04-06 Ruslan Bukin <br@bsdpad.com>
20143 Kito Cheng <kito.cheng@gmail.com>
20145 * config.gcc (riscv*-*-freebsd*): Add RISC-V FreeBSD support.
20146 * config/riscv/freebsd.h: New.
20148 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
20150 * config/nds32/nds32.c (nds32_adjust_insn_length): Refine.
20151 * config/nds32/nds32.h (ADJUST_INSN_LENGTH): Change the location in
20154 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
20155 Kito Cheng <kito.cheng@gmail.com>
20157 * config/nds32/nds32-md-auxiliary.c (nds32_output_return,
20158 nds32_output_call, nds32_symbol_binds_local_p): New functions.
20159 * config/nds32/nds32-protos.h (nds32_output_call,
20160 nds32_output_return): Declare.
20161 * config/nds32/nds32.md: Refine all the call and return patterns.
20163 2018-04-06 Jakub Jelinek <jakub@redhat.com>
20166 * dwarf2out.c (rtl_for_decl_init): For STRING_CST initializer only
20167 build CONST_STRING if TYPE_MAX_VALUE is non-NULL and is INTEGER_CST.
20169 PR rtl-optimization/84872
20170 * cfgloopmanip.c (create_preheader): Use make_forwarder_block even if
20171 nentry == 1 when CP_FALLTHRU_PREHEADERS and single_entry is
20172 EDGE_CROSSING edge.
20174 2018-04-06 Tamar Christina <tamar.christina@arm.com>
20176 * expr.c (copy_blkmode_to_reg): Revert 254862.
20177 * doc/sourcebuild.texi (word_mode_no_slow_unalign): Likewise.
20179 2018-04-06 Richard Biener <rguenther@suse.de>
20181 PR middle-end/85244
20182 * tree-dfa.c (get_ref_base_and_extent): Reset seen_variable_array_ref
20183 after seeing a component reference with an adjacent field. Treat
20184 refs to arrays at struct end of external decls similar to
20185 refs to unconstrained commons.
20187 2018-04-06 Jakub Jelinek <jakub@redhat.com>
20190 * fold-const.c (twoval_comparison_p): Remove SAVE_P argument and don't
20191 look through SAVE_EXPRs with non-side-effects argument. Adjust
20193 (fold_comparison): Adjust twoval_comparison_p caller, don't handle
20196 2018-04-06 Richard Biener <rguenther@suse.de>
20198 PR middle-end/85180
20199 * alias.c (find_base_term): New wrapper around find_base_term
20200 unwinding CSELIB_VAL_PTR changes.
20201 (find_base_term): Do not restore CSELIB_VAL_PTR during the
20204 2018-04-06 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
20206 * config/s390/s390.c (s390_z10_optimize_cmp): Expand dedicated NOP
20208 * config/s390/s390.md (UNSPECV_NOP_LR_0, UNSPECV_NOP_LR_1): New
20209 constant definitions.
20210 ("nop"): lr 0,0 -> nopr r0
20211 ("nop_lr0", "nop_lr1"): New insn definitions.
20213 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
20215 * config/nds32/nds32.md (*stack_push, *stack_pop): Use
20216 NDS32_V3PUSH_AVAILABLE_P macro.
20218 2018-04-06 Monk Chiang <sh.chiang04@gmail.com>
20219 Chung-Ju Wu <jasonwucj@gmail.com>
20221 * config.gcc (nds32*-*-*): Add v2j v3f v3s checking.
20222 (nds32*-*-*): Add float and fpu_config into supported_defaults.
20223 * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS):
20224 Include TARGET_DEFAULT_FPU_ISA and TARGET_DEFAULT_FPU_FMA.
20225 * config/nds32/constants.md (unspec_element): Add UNSPEC_COPYSIGN,
20226 UNSPEC_FCPYNSD, UNSPEC_FCPYNSS, UNSPEC_FCPYSD and UNSPEC_FCPYSS.
20227 * config/nds32/constraints.md: New constraints and checking for hard
20228 float configuration.
20229 * config/nds32/iterators.md: New mode iterator and attribute for hard
20230 float configuration.
20231 * config/nds32/nds32-doubleword.md: Use hard float alternatives and
20233 * config/nds32/nds32-fpu.md: New file.
20234 * config/nds32/nds32-md-auxiliary.c: New functions and checkings to
20235 deal with hard float code generation.
20236 * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3F and
20238 (abi_type, float_reg_number): New enum type.
20239 * config/nds32/nds32-predicates.c: New predicates for hard float.
20240 * config/nds32/nds32-protos.h: Declare functions for hard float.
20241 * config/nds32/nds32.c: Implementation for hard float configuration.
20242 * config/nds32/nds32.h: Definitions for hard float configuration.
20243 * config/nds32/nds32.md: Include hard float machine description and
20244 modify patterns for hard float configuration.
20245 * config/nds32/nds32.opt: New options for hard float configuration.
20246 * config/nds32/predicates.md: New predicates for hard float
20249 2018-04-06 Kuan-Lin Chen <kuanlinchentw@gmail.com>
20251 * common/config/nds32/nds32-common.c
20252 (nds32_option_optimization_table): Enable -mreleax-hint by default.
20254 2018-04-05 Jakub Jelinek <jakub@redhat.com>
20256 PR middle-end/85195
20257 * match.pd (BIT_FIELD_REF CONSTRUCTOR@0 @1 @2): Use view_convert around
20258 CONSTRUCTOR_ELT (ctor, ...)->value.
20260 2018-04-05 Uros Bizjak <ubizjak@gmail.com>
20263 * config/i386/i386.md (define_attr "memory"): Handle rotate1 type.
20265 2018-04-05 Tom de Vries <tom@codesourcery.com>
20268 * config/nvptx/nvptx.c (nvptx_single): Fix neutering of bb with only
20271 2018-04-05 Shiva Chen <shiva0217@gmail.com>
20272 Kito Cheng <kito.cheng@gmail.com>
20274 * config/nds32/constraints.md (U33): Fine-tune checking condition.
20275 * config/nds32/nds32-md-auxiliary.c (nds32_mem_format): Ditto.
20276 * config/nds32/nds32.h (nds32_16bit_address_type): Add
20277 ADDRESS_POST_MODIFY_LO_REG_IMM3U.
20279 2018-04-05 Shiva Chen <shiva0217@gmail.com>
20280 Kito Cheng <kito.cheng@gmail.com>
20282 * config/nds32/constraints.md (Ufe): New memory constraint.
20283 * config/nds32/nds32-md-auxiliary.c (nds32_mem_format,
20284 nds32_output_16bit_load): Consider r8 register for lwi45.fe format.
20285 * config/nds32/nds32.c (nds32_print_operand): Output lwi45.fe
20287 * config/nds32/nds32.h (nds32_16bit_address_type): Add ADDRESS_R8_IMM7U.
20288 * config/nds32/nds32.md (*mov<mode>): Adjust pattern.
20290 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
20292 * config/nds32/nds32.md: Use optimize_size in the condition for
20293 alu-shift instructions.
20295 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
20297 * config/nds32/nds32.md (divsi4, udivsi4): New patterns.
20299 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
20301 * config/nds32/nds32.md (negsi2): Refine pattern.
20303 2018-04-05 Kito Cheng <kito.cheng@gmail.com>
20304 Chung-Ju Wu <jasonwucj@gmail.com>
20306 * config/nds32/iterators.md (shift_rotate): New code iterator.
20307 (shift): New code attribute.
20308 * config/nds32/nds32-md-auxiliary.c (nds32_expand_constant): New.
20309 * config/nds32/nds32-protos.h (nds32_expand_constant): Declare.
20310 * config/nds32/nds32.c (nds32_print_operand): Deal with more cases.
20311 * config/nds32/nds32.md (addsi3, *add_srli): Refine implementation for
20312 bit-wise operations.
20313 (andsi3, *andsi3): Ditto.
20314 (iorsi3, *iorsi3, *or_slli, *or_srli): Ditto.
20315 (xorsi3, *xorsi3, *xor_slli, *xor_srli): Ditto.
20316 (<shift>si3, *ashlsi3, *ashrsi3, *lshrsi3, *rotrsi3): Ditto.
20317 * config/nds32/predicates.md (nds32_rimm5u_operand, nds32_and_operand,
20318 nds32_ior_operand, nds32_xor_operand): New predicates.
20320 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
20322 * config/nds32/nds32.md (add<mode>3, sub<mode>3): Rename to ...
20323 (addsi3, subsi3): ... this.
20325 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
20327 * config/nds32/nds32.md (*sub_srli, *and_slli): Fine-tune predicator.
20329 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
20331 * config/nds32/nds32.md: Adjust indention.
20333 2018-04-05 Kito Cheng <kito.cheng@gmail.com>
20335 * config/nds32/nds32.md (feature): New attribute.
20337 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
20339 * config/nds32/nds32.md (subtype): New attribute.
20341 2018-04-04 Thomas Preud'homme <thomas.preudhomme@arm.com>
20344 * config/arm/arm-builtins.c (arm_expand_builtin): Change
20345 expansion to perform a bitwise AND of the argument followed by a
20346 boolean negation of the result.
20348 2018-04-04 Peter Bergner <bergner@vnet.ibm.com>
20350 PR rtl-optimization/84878
20351 * ddg.c (add_cross_iteration_register_deps): Use DF_REF_BB to determine
20352 the basic block. Assert the use reference is not artificial and that
20353 it has an associated insn.
20355 2018-04-04 Michael Matz <matz@suse.de>
20357 * builtins.c (compute_objsize): Pass correct operand
20358 to array_at_struct_end_p.
20360 2018-04-04 Richard Biener <rguenther@suse.de>
20363 * dwarf2out.c (dwarf2out_register_external_die): Peel namespaces
20364 from contexts for DINFO_LEVEL_TERSE and below.
20366 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
20368 * config/nds32/nds32-doubleword.md (move_<mode>): Require
20369 resiter_operand condition.
20370 * config/nds32/nds32.md (*move<mode>): Ditto.
20372 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
20373 Monk Chiang <sh.chiang04@gmail.com>
20375 * config/nds32/nds32.md (movmisalign<mode>): New pattern.
20377 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
20379 * config/nds32/nds32.md (movqi, movhi): Merge into mov<mode>.
20381 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
20382 Kito Cheng <kito.cheng@gmail.com>
20384 * config/nds32/nds32-md-auxiliary.c (nds32_inverse_cond_code,
20385 nds32_cond_code_str, output_cond_branch,
20386 output_cond_branch_compare_zero, nds32_expand_cbranch,
20387 nds32_expand_cstore, nds32_expand_movcc,
20388 nds32_output_cbranchsi4_equality_zero,
20389 nds32_output_cbranchsi4_equality_reg,
20390 nds32_output_cbranchsi4_equality_reg_or_const_int,
20391 nds32_output_cbranchsi4_greater_less_zero: New functions.
20392 * config/nds32/nds32-protos.h (nds32_expand_cbranch,
20393 nds32_expand_cstore, nds32_expand_movcc,
20394 nds32_output_cbranchsi4_equality_zero,
20395 nds32_output_cbranchsi4_equality_reg,
20396 nds32_output_cbranchsi4_equality_reg_or_const_int,
20397 nds32_output_cbranchsi4_greater_less_zero): Declare.
20398 * config/nds32/predicates.md (nds32_movecc_comparison_operator,
20399 nds32_rimm11s_operand): New predicates.
20400 * config/nds32/nds32.h (nds32_expand_result_type): New enum type.
20401 * config/nds32/nds32.md: Rewrite all the branch and conditional move
20404 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
20406 * config/nds32/nds32-doubleword.md: Refine all the instruction type.
20407 * config/nds32/nds32.md: Ditto.
20408 * config/nds32/pipelines.md: Ditto.
20410 2018-04-04 Richard Biener <rguenther@suse.de>
20412 PR tree-optimization/85168
20413 * tree-ssa-sccvn.c (vn_reference_maybe_forwprop_address): Avoid
20414 propagating abnormals.
20416 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
20418 * config/nds32/nds32.md (enabled): Use yes/no for this attribute.
20420 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
20421 Kito Cheng <kito.cheng@gmail.com>
20423 * config/nds32/nds32-md-auxiliary.c (nds32_long_call_p): New function.
20424 * config/nds32/nds32-protos.h (nds32_long_call_p): Declare.
20425 * config/nds32/nds32.c (nds32_function_ok_for_sibcall): New function.
20426 (TARGET_FUNCTION_OK_FOR_SIBCALL): Define.
20427 * config/nds32/nds32.md (sibcall_internal): New.
20428 (sibcall_register): Remove.
20429 (sibcall_immediate): Remove.
20430 (sibcall_value_internal): New.
20431 (sibcall_value_register): Remove.
20432 (sibcall_value_immediate): Remove.
20433 * config/nds32/predicates.md (nds32_general_register_operand): New.
20434 (nds32_call_address_operand): New.
20436 2018-04-03 Jakub Jelinek <jakub@redhat.com>
20438 PR rtl-optimization/85167
20439 * shrink-wrap.c (move_insn_for_shrink_wrap): Don't set bb_uses and
20440 bb_defs if *split_p, instead preinitialize it to NULL.
20442 PR tree-optimization/85156
20443 * builtins.c (fold_builtin_expect): Use save_expr on arg1 to avoid
20444 evaluating the argument multiple times.
20446 2018-04-03 Bill Schmidt <wschmidt@linux.ibm.com>
20448 * config/rs6000/emmintrin.h (_mm_cvtpd_epi32): Use __vector rather
20450 (_mm_cvtpd_ps): Likewise.
20451 (_mm_cvttpd_epi32): Likewise.
20452 * config/rs6000/mmintrin.h (_mm_unpacklo_pi8): Likewise.
20453 * config/rs6000/xmmintrin.h: For strict-ANSI C++ or C11, undefine
20454 vector, pixel, and bool following altivec.h include.
20456 2018-04-03 Martin Sebor <msebor@redhat.com>
20458 * doc/extend.texi (Common Function Attributes): Clarify.
20459 (const attribute): Likewise.
20460 (pure attribute): Likewise.
20462 2018-04-03 Jakub Jelinek <jakub@redhat.com>
20465 * config/i386/i386.c (ix86_expand_vector_set): Use
20466 HOST_WIDE_INT_1U << elt instead of 1 << elt. Formatting fix.
20468 2018-04-03 Uros Bizjak <ubizjak@gmail.com>
20470 * config/i386/i386.c (emit_i387_cw_initialization): Always use logic
20471 instructions when changing rounding bits to preserve precision bits
20472 in the x87 control word.
20474 2018-04-03 Martin Liska <mliska@suse.cz>
20476 PR tree-optimization/82491
20477 * rtl.h (strip_offset_and_add): Replace += suboffset with
20478 poly_uint64 () + suboffset.
20480 2018-03-29 Martin Liska <mliska@suse.cz>
20481 Martin Jambor <mjambor@suse.cz>
20484 * ipa-cp.c (propagate_bits_across_jump_function): Bail out if
20485 param_type is not an integral or pointer type.
20487 2018-04-03 Richard Biener <rguenther@suse.de>
20489 * sese.h (recompute_all_dominators): Remove.
20491 2018-04-02 Martin Sebor <msebor@redhat.com>
20493 * doc/invoke.texi (-Wrestrict): Fix typos.
20495 2018-04-02 Jim Wilson <jimw@sifive.com>
20497 * config/riscv/riscv.h (SHIFT_COUNT_TRUNCATED): Set to zero.
20498 * config/riscv/riscv.md (<optab>si3): Use QImode shift count.
20499 (<optab>di3, <optab>si3_extend): Likewise.
20500 (<optab>si3_mask, <optab>si3_mask_1): New.
20501 (<optab>di3_mask, <optab>di3_mask_1): New.
20502 (<optab>si3_extend_mask, <optab>si3_extend_mask_1): New.
20503 (lshrsi3_zero_extend_1): Use VOIDmode shift count.
20504 * config/riscv/sync.md (atomic_test_and_set): Emit QImode shift count.
20506 2018-04-02 Gerald Pfeifer <gerald@pfeifer.com>
20508 * doc/cpp.texi (Variadic Macros): Fix line continuation in an
20511 2018-04-02 Chung-Ju Wu <jasonwucj@gmail.com>
20513 * config/nds32/nds32.c (TARGET_CANONICALIZE_COMPARISON): Define.
20514 (nds32_canonicalize_comparison): New function.
20516 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
20517 Kito Cheng <kito.cheng@gmail.com>
20518 Kuan-Lin Chen <kuanlinchentw@gmail.com>
20520 * config.gcc (nds32): Add nds32-relax-opt.o into extra_objs.
20521 * config/nds32/constants.md (unspec_volatile_element): Add
20522 UNSPEC_VOLATILE_RELAX_GROUP.
20523 * config/nds32/nds32-relax-opt.c: New file.
20524 * config/nds32/nds32-predicates.c
20525 (nds32_symbol_load_store_p): New function.
20526 * config/nds32/nds32-protos.h
20527 (nds32_symbol_load_store_p): Declare function.
20528 (make_pass_nds32_relax_opt): Declare new rtl pass function.
20529 * config/nds32/nds32.c
20530 (nds32_register_pass): New function to register pass.
20531 (nds32_register_passes): New function to register passes.
20532 * config/nds32/nds32.md (relax_group): New pattern.
20533 * config/nds32/nds32.opt (mrelax-hint): New option.
20534 * config/nds32/t-nds32 (nds32-relax-opt.o): New dependency.
20536 2018-04-01 Kito Cheng <kito.cheng@gmail.com>
20538 * config/nds32/t-nds32: Modify files dependency.
20540 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
20542 * config/nds32/nds32.h (FUNCTION_PROFILER): Output newline character.
20543 (PROFILE_HOOK): Define its implementation.
20545 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
20547 * config/nds32/nds32.h (WCHAR_TYPE, WCHAR_TYPE_SIZE): Use unsigned int
20548 type and 32-bit size.
20550 2018-04-01 Jakub Jelinek <jakub@redhat.com>
20552 PR middle-end/85090
20553 * config/i386/sse.md (V): Add V64QI and V32HI for TARGET_AVX512F.
20554 (V_128_256): New mode iterator.
20555 (*avx512dq_vextract<shuffletype>64x2_1 splitter): New define_split.
20556 (*avx512f_vextract<shuffletype>32x4_1 splitter): Likewise.
20557 (xop_pcmov_<mode><avxsizesuffix>): Use V_128_256 mode iterator instead
20559 * config/i386/i386.c (ix86_expand_vector_set): Improve V32HImode and
20560 V64QImode expansion for !TARGET_AVX512BW && TARGET_AVX512F.
20562 2018-03-31 Segher Boessenkool <segher@kernel.crashing.org>
20565 * config/rs6000/xmmintrin.h (_mm_set_ps, _mm_max_ps): Handle (quiet)
20566 NaN inputs correctly.
20568 2018-03-30 Peter Bergner <bergner@vnet.ibm.com>
20571 * config/rs6000/vsx.md (??r): New mode attribute.
20572 (*vsx_mov<mode>_64bit): Use it.
20573 (*vsx_mov<mode>_32bit): Likewise.
20575 2018-03-30 Martin Sebor <msebor@redhat.com>
20577 PR tree-optimization/84818
20578 * builtins.c (check_access): Use warning_n.
20580 2018-03-30 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
20583 * config/rs6000/rs6000-string.c (expand_compare_loop): Fix redundant
20585 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Fix redundant
20588 2018-03-30 Julia Koval <julia.koval@intel.com>
20591 * x86-tune.def (movx, partial_reg_dependency): Enable for
20594 2018-03-29 Vladimir Makarov <vmakarov@redhat.com>
20596 PR inline-asm/84985
20597 * lra-constraints.c (process_alt_operands): Move setting
20598 this_alternative_matches below.
20600 2018-03-29 Martin Liska <mliska@suse.cz>
20603 * doc/invoke.texi: Document how LTO works with debug info.
20604 Describe auto-load support of binutils. Mention 'x86-64'
20605 as valid option value of -march option.
20607 2018-03-29 Jakub Jelinek <jakub@redhat.com>
20609 * config/i386/sse.md (<avx512>_blendm<mode>): Use <sseintprefix>.
20612 * fold-const.c (operand_equal_p): Handle DEBUG_BEGIN_STMT.
20613 For STATEMENT_LIST, pass down OEP_LEXICOGRAPHIC and maybe
20614 OEP_NO_HASH_CHECK for recursive call, to avoid exponential
20617 2018-03-28 Peter Bergner <bergner@vnet.ibm.com>
20620 * config/rs6000/rs6000.h (RS6000_BTM_POWERPC64): New define.
20621 (RS6000_BTM_COMMON): Add RS6000_BTM_POWERPC64.
20622 * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Add support
20623 for RS6000_BTM_POWERPC64.
20624 (rs6000_invalid_builtin): Add handling for RS6000_BTM_POWERPC64
20625 (rs6000_builtin_mask_names): Add RS6000_BTM_POWERPC64.
20626 * config/rs6000/rs6000-builtin.def (BU_P7_POWERPC64_MISC_2): New macro
20629 (DIVDEU): Likewise.
20631 2018-03-28 Carl Love <cel@us.ibm.com>
20634 2017-09-27 Carl Love <cel@us.ibm.com>
20636 * config/rs6000/rs6000-builtin.def (BU_FP_1MISC_1): Add define macro.
20637 (FCTID, FCTIW): Add BU_FP_MISC_1 macro expansion for builtins.
20638 * config/rs6000/rs6000.md (lrintsfsi2): Add define_insn for the
20641 2018-03-28 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
20643 * config/rs6000/xmmintrin.h (_mm_max_pi16): Use __vector __bool
20644 instead of __vector bool.
20645 (_mm_max_pu8): Likewise.
20646 (_mm_min_pi16): Likewise.
20648 2018-03-28 Peter Bergner <bergner@vnet.ibm.com>
20651 * config/rs6000/rs6000-builtin.def (DIVWEO): Delete macro expansion.
20652 (DIVWEUO): Likewise.
20653 (DIVDEO): Likewise.
20654 (DIVDEUO): Likewise.
20655 * config/rs6000/rs6000.c (builtin_function_type): Remove support for
20656 DIVWEUO and DIVDEUO.
20657 * config/rs6000/rs6000.md (UNSPEC_DIVEO, UNSPEC_DIVEUO): Delete unspecs.
20658 (UNSPEC_DIV_EXTEND): Remove deleted unspecs.
20659 (div_extend): Likewise.
20660 * doc/extend.texi (__builtin_divweo): Remove documentation for deleted
20662 (__builtin_divweuo): Likewise.
20663 (__builtin_divdeo): Likewise.
20664 (__builtin_divdeuo): Likewise.
20666 2018-03-28 Jakub Jelinek <jakub@redhat.com>
20669 * config/i386/i386.md (*add<mode>3_carry_0, *addsi3_carry_zext_0,
20670 *sub<mode>3_carry_0, *subsi3_carry_zext_0): New patterns.
20672 PR tree-optimization/82004
20673 * gimple-match-head.c (optimize_pow_to_exp): New function.
20674 * match.pd (pow(C,x) -> exp(log(C)*x)): Wrap with #if GIMPLE.
20675 Don't fold to exp if optimize_pow_to_exp is false.
20677 2018-03-28 Martin Liska <mliska@suse.cz>
20680 * calls.c (initialize_argument_information): Fix trailing space.
20681 * common.opt: Fix typo and provide better explanation for
20682 -fsanitize-coverage option.
20683 * config/i386/i386.opt: Fix typo.
20685 2018-03-28 Jakub Jelinek <jakub@redhat.com>
20686 Martin Liska <mliska@suse.cz>
20689 * gimplify.c (asan_poison_variable): Don't do the check for
20690 gimplify_omp_ctxp here.
20691 (gimplify_decl_expr): Do it here.
20692 (gimplify_target_expr): Likewise.
20694 2018-03-28 Martin Liska <mliska@suse.cz>
20697 * config/i386/i386.c (ix86_function_arg_advance): Do not call
20698 chkp_type_bounds_count if MPX is not enabled.
20700 2018-03-27 Chung-Ju Wu <jasonwucj@gmail.com>
20702 * config/nds32/nds32.h (BRANCH_COST): Adjust cost.
20704 2018-03-27 Michael Meissner <meissner@linux.vnet.ibm.com>
20707 * config/rs6000/rs6000.c (create_complex_muldiv): New helper
20708 function to create the function decl for complex long double
20709 multiply and divide for -mabi=ieeelongdouble.
20710 (init_float128_ieee): Call it.
20712 2018-03-27 H.J. Lu <hongjiu.lu@intel.com>
20715 * config/i386/i386.c (ix86_trampoline_init): Insert ENDBR for
20716 -fcf-protection=branch -mibt.
20717 * config/i386/i386.h (TRAMPOLINE_SIZE): Increased by 4 bytes.
20719 2018-03-27 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
20722 * config/arm/arm.c (arm_valid_symbolic_address): Handle
20723 arm_word_relocations.
20725 2018-03-27 Cesar Philippidis <cesar@codesourcery.com>
20728 * config/nvptx/nvptx.c (nvptx_assemble_decl_begin): Add '[]' to
20729 extern array declarations.
20731 2018-03-27 Richard Biener <rguenther@suse.de>
20733 PR middle-end/84067
20734 * match.pd ((A * C) +- (B * C) -> (A+-B) * C): Guard with
20735 explicit single_use checks.
20737 2018-03-27 Richard Biener <rguenther@suse.de>
20739 PR tree-optimization/85082
20740 * tree-ssa-sccvn.c (vn_reference_lookup_or_insert_for_pieces):
20743 2018-03-27 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
20745 * config.gcc (aarch64*-*-linux*): New TARGET_DEFAULT_ASYNC_UNWIND_TABLES
20746 * common/config/aarch64/aarch64-common.c (aarch64_optimization_table[]):
20747 Turn on fasynchronous-unwind-tables and funwind-tables.
20749 2018-03-26 Uros Bizjak <ubizjak@gmail.com>
20752 * config/i386/i386.md (*bmi_blsr_<mode>_cmp): New insn pattern.
20753 (*bmi_blsr_<mode>_ccz): Ditto.
20755 2018-03-26 Tom de Vries <tom@codesourcery.com>
20757 PR tree-optimization/85063
20758 * omp-general.c (offloading_function_p): New function. Factor out
20760 * omp-offload.c (pass_omp_target_link::gate): ... here.
20761 * omp-general.h (offloading_function_p): Declare.
20762 * tree-switch-conversion.c (build_one_array): Mark CSWTCH.x variable
20763 with attribute omp declare target for offloading functions.
20765 2018-03-24 Richard Sandiford <richard.sandiford@linaro.org>
20767 PR tree-optimization/84005
20768 * tree-data-ref.h (get_base_for_alignment): Declare.
20769 * tree-data-ref.c (get_base_for_alignment_1): New function.
20770 (get_base_for_alignment): Likewise.
20771 * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Use
20772 get_base_for_alignment to find a suitable base object, instead
20773 of always using drb->base_address.
20775 2018-03-23 Jakub Jelinek <jakub@redhat.com>
20777 PR inline-asm/85022
20778 * emit-rtl.c (init_emit_regs): Indicate that VOIDmode MEMs don't have
20779 known size by default.
20781 2018-03-23 Vladimir Makarov <vmakarov@redhat.com>
20783 PR inline-asm/85030
20784 * lra-constraints.c (process_alt_operands): Don't match BLKmode
20785 and non BLKmode operands.
20787 2018-03-23 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
20790 * config/arm/arm.md (unaligned_loadhis): Remove first alternative.
20791 Clean up attributes.
20793 2018-03-23 Richard Biener <rguenther@suse.de>
20796 * dwarf2out.c (rtl_for_decl_location): Do not generate RTL early when
20797 we are going to emit early debug for LTO.
20799 2018-03-23 Jakub Jelinek <jakub@redhat.com>
20801 PR inline-asm/85034
20802 * function.c (match_asm_constraints_1): Don't optimize if input
20803 doesn't satisfy general_operand predicate for output's mode.
20805 PR inline-asm/85022
20806 * alias.c (write_dependence_p): Don't require for x_canonicalized
20807 non-VOIDmode if x has VOIDmode.
20810 * sanopt.c (maybe_optimize_ubsan_ptr_ifn): If DECL_REGISTER (base),
20811 just don't try to optimize it rather than assert it never happens.
20813 2018-03-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
20815 * config/rs6000/rs6000-builtin.def: Remove various BU_ALTIVEC_X
20816 macro expansions for definition of ST_INTERNAL_<mode> and
20817 LD_INTERNAL_<mode> builtins.
20818 * config/rs6000/rs6000-protos.h (rs6000_address_for_altivec):
20820 * config/rs6000/rs6000.c (altivec_expand_ld_builtin): Delete this
20822 (altivec_expand_st_builtin): Likewise.
20823 (altivec_expand_builtin): Remove calls to deleted functions.
20824 (rs6000_address_for_altivec): Delete this function.
20825 * config/rs6000/vector.md: Remove expands for
20826 vector_altivec_load_<mode> and vector_altivec_store_<mode>.
20828 2018-03-22 Sudakshina Das <sudi.das@arm.com>
20831 * config/arm/arm.h (machine_function): Add static_chain_stack_bytes.
20832 * config/arm/arm.c (arm_compute_static_chain_stack_bytes): Avoid
20833 re-computing once computed.
20834 (arm_expand_prologue): Compute machine->static_chain_stack_bytes.
20835 (arm_init_machine_status): Initialize
20836 machine->static_chain_stack_bytes.
20838 2018-03-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
20841 * doc/extend.texi: Add four new prototypes for vec_ld.
20842 * config/rs6000/rs6000-builtin.def (LVX_V1TI): Reorder symbol
20843 definitions for more logical presentation.
20844 * config/rs6000/rs6000-c.c: (altivec_overloaded_builtins): Add
20845 entries for V1TI variants of __builtin_altivec_ld builtin.
20846 * config/rs6000/rs6000.c: (altivec_expand_lv_builtin): Add test and
20847 handling of V1TI variant of LVX icode pattern.
20848 (altivec_expand_builtin): Add case for ALTIVEC_BUILTIN_LVX_V1TI.
20849 (rs6000_gimple_fold_builtin): Likewise.
20850 (altivec_init_builtins): Add code to define
20851 __builtin_altivec_lvx_v1ti function.
20853 2018-03-22 Jakub Jelinek <jakub@redhat.com>
20855 PR inline-asm/84941
20856 * function.c (match_asm_constraints_1): Don't do the optimization
20857 if input isn't a REG, SUBREG, MEM or constant.
20859 2018-03-22 Tom de Vries <tom@codesourcery.com>
20861 PR tree-optimization/84956
20862 * tree-ssa-tail-merge.c (find_clusters_1): Skip bbs with
20863 bb_has_abnormal_pred.
20865 2018-03-22 Jakub Jelinek <jakub@redhat.com>
20868 * dwarf2asm.c (dw2_output_indirect_constant_1): Set
20869 DECL_INITIAL (decl) to decl at the end.
20870 * varasm.c (use_blocks_for_decl_p): Revert the 2018-03-20 change,
20871 adjust the comment.
20873 2018-03-21 Joseph Myers <joseph@codesourcery.com>
20875 * doc/extend.texi (__builtin_tgmath): Document when complex
20876 integer types are treated as _Complex _Float64.
20878 2018-03-21 Tom de Vries <tom@codesourcery.com>
20880 * doc/extend.texi (__builtin_extend_pointer): Remove pasto.
20882 2018-03-21 Jakub Jelinek <jakub@redhat.com>
20884 PR tree-optimization/84960
20885 * tree-cfg.c (remove_bb): Don't move forced labels into bb->prev_bb
20886 if it is ENTRY block, move them into single succ of ENTRY in that case.
20888 2018-03-21 Richard Sandiford <richard.sandiford@linaro.org>
20890 PR tree-optimization/84811
20891 * poly-int.h (poly_span_traits): Remove the T3 parameter and
20892 promote HOST_WIDE_INT T2 - T1 results to unsigned HOST_WIDE_INT.
20893 (maybe_in_range_p, known_in_range_p, ranges_known_overlap_p):
20894 (known_subrange_p): Update accordingly. Cast each value involved
20895 in the size comparison, rather than casting the result of the
20898 2018-03-21 Jakub Jelinek <jakub@redhat.com>
20900 PR tree-optimization/84982
20901 * gimple-ssa-store-merging.c (invert_op): Handle boolean inversion
20902 by flipping the least significant bit rather than all bits from
20903 bitpos to bitpos + bitsize - 1.
20905 2018-03-21 Nathan Sidwell <nathan@acm.org>
20907 * doc/extend.texi (Deprecated Features): Remove mention of
20908 long-deleted deprecations.
20910 2018-03-21 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
20913 * configure.ac (gcc_cv_ld_soname) <*-*-solaris2*>: Set.
20914 * configure: Regenerate.
20916 2018-03-21 Tom de Vries <tom@codesourcery.com>
20918 PR tree-optimization/83126
20919 * tree-parloops.c (num_phis): New function.
20920 (gen_parallel_loop): Detect and handle canonicalize_loop_ivs failure.
20922 2018-03-21 Nathan Sidwell <nathan@acm.org>
20924 * doc/extend.texi (Deprecated Features): Update deprecated flags,
20925 mention anon-struct/union members and trailing attributes.
20927 2018-03-21 Bin Cheng <bin.cheng@arm.com>
20929 PR tree-optimization/84969
20930 * tree-loop-distribution.c (fuse_memset_builtins): Don't reorder
20931 builtin memset partitions if they set different rhs values.
20933 2018-03-21 Jakub Jelinek <jakub@redhat.com>
20935 PR rtl-optimization/84989
20936 * simplify-rtx.c (simplify_unary_operation_1): Don't try to simplify
20937 VEC_DUPLICATE with scalar result mode.
20939 2018-03-21 Martin Liska <mliska@suse.cz>
20942 * ipa-icf.c (sem_item_optimizer::fixup_points_to_sets): Remove
20943 not intended return statement.
20945 2018-03-21 Martin Liska <mliska@suse.cz>
20948 * tree-chkp.c (CHKP_ARRAY_MAX_CHECK_STEPS): Define a new macro.
20949 (chkp_find_bound_slots_1): Limit number of iterations.
20951 2018-03-20 David H. Gutteridge <dhgutteridge@sympatico.ca>
20954 * Minor grammar fixes for x86 options.
20956 2018-03-20 Jakub Jelinek <jakub@redhat.com>
20959 * dce.c (delete_unmarked_insns): Don't remove frame related noop moves
20960 holding REG_CFA_RESTORE notes, instead turn them into a USE.
20962 2018-03-20 Peter Bergner <bergner@vnet.ibm.com>
20965 * config/rs6000/altivec.md (altivec_lvx_<mode>_2op): Delete define_insn.
20966 (altivec_lvx_<mode>_1op): Likewise.
20967 (altivec_stvx_<mode>_2op): Likewise.
20968 (altivec_stvx_<mode>_1op): Likewise.
20969 (altivec_lvx_<VM2:mode>): New define_expand.
20970 (altivec_stvx_<VM2:mode>): Likewise.
20971 (altivec_lvx_<VM2:mode>_2op_<P:mptrsize>): New define_insn.
20972 (altivec_lvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
20973 (altivec_stvx_<VM2:mode>_2op_<P:mptrsize>): Likewise.
20974 (altivec_stvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
20975 * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Use new expanders.
20976 (rs6000_gen_lvx): Likewise.
20977 * config/rs6000/rs6000.c (altivec_expand_lv_builtin): Likewise.
20978 (altivec_expand_stv_builtin): Likewise.
20979 (altivec_expand_builtin): Likewise.
20980 * config/rs6000/vector.md: Likewise.
20982 2018-03-20 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
20985 * config/arm/arm.c (arm_array_mode_supported_p): Return false for
20988 2018-03-20 Richard Biener <rguenther@suse.de>
20991 * config/i386/i386.c (ix86_add_stmt_cost): Only cost
20992 sign-conversions as zero, fall back to standard scalar_stmt
20995 2018-03-20 Martin Liska <mliska@suse.cz>
20998 * predict.c (rebuild_frequencies): Handle case when we have
20999 PROFILE_ABSENT, but flag_guess_branch_prob is false.
21001 2018-03-20 Jakub Jelinek <jakub@redhat.com>
21004 * dwarf2asm.c (dw2_output_indirect_constant_1): Temporarily turn off
21005 flag_section_anchors.
21006 * varasm.c (use_blocks_for_decl_p): Remove hack for
21007 dw2_force_const_mem.
21010 * config/aarch64/aarch64.md (*aarch64_reg_<mode>3_neg_mask2): Rename
21012 (*aarch64_<optab>_reg_<mode>3_neg_mask2): ... this. If pseudos can't
21013 be created, use lowpart_subreg of operands[0] rather than operands[0]
21015 (*aarch64_reg_<mode>3_minus_mask): Rename to ...
21016 (*aarch64_ashl_reg_<mode>3_minus_mask): ... this.
21017 (*aarch64_<optab>_reg_di3_mask2): Use const_int_operand predicate
21018 and n constraint instead of aarch64_shift_imm_di and Usd.
21019 (*aarch64_reg_<optab>_minus<mode>3): Rename to ...
21020 (*aarch64_<optab>_reg_minus<mode>3): ... this.
21022 2018-03-20 Sudakshina Das <sudi.das@arm.com>
21025 * config/arm/neon.md (ashldi3_neon): Update ?s for constraints
21026 to favor GPR over NEON registers.
21027 (<shift>di3_neon): Likewise.
21029 2018-03-20 Tom de Vries <tom@codesourcery.com>
21032 * config/nvptx/nvptx.c (nvptx_single): Don't neuter bar.sync.
21033 (nvptx_process_pars): Emit bar.sync asap and alap.
21035 2018-03-20 Tom de Vries <tom@codesourcery.com>
21038 * config/nvptx/nvptx.c (prevent_branch_around_nothing): Also update
21039 seen_label if seen_label is already set.
21041 2018-03-20 Jakub Jelinek <jakub@redhat.com>
21044 * config/i386/i386.c (fold_builtin_cpu): For features above 31
21045 use __cpu_features2 variable instead of __cpu_model.__cpu_features[0].
21046 Use 1U instead of 1. Formatting fixes.
21049 * builtins.c (fold_builtin_strpbrk): For strpbrk(x, "") use type
21050 instead of TREE_TYPE (s1) for the return value.
21052 2018-03-19 Jakub Jelinek <jakub@redhat.com>
21054 PR tree-optimization/84946
21055 * gimple-ssa-store-merging.c (mem_valid_for_store_merging): Compute
21056 bitsize + bitsize in poly_uint64 rather than poly_int64.
21059 * dwarf2asm.c: Include fold-const.c.
21060 (dw2_output_indirect_constant_1): Set DECL_INITIAL (decl) to ADDR_EXPR
21061 of decl rather than decl itself.
21063 PR rtl-optimization/84643
21064 * memmodel.h (enum memmodel): Add MEMMODEL_MAX enumerator.
21066 2018-03-19 Maxim Ostapenko <m.ostapenko@samsung.com>
21069 * dwarf2asm.c (dw2_output_indirect_constant_1): Disable ASan before
21070 calling assemble_variable.
21072 2018-03-19 Sudakshina Das <sudi.das@arm.com>
21075 * config/aarch64/aarch64-simd.md (vec_cmp<mode><v_int_equiv>): Modify
21076 instructions for UNLT, UNLE, UNGT, UNGE, UNEQ, UNORDERED and ORDERED.
21078 2018-03-19 Jim Wilson <jimw@sifive.com>
21081 * config/riscv/riscv.c (riscv_function_arg_boundary): Use
21082 PREFERRED_STACK_BOUNDARY instead of STACK_BOUNDARY.
21083 (riscv_first_stack_step): Likewise.
21084 (riscv_option_override): Use STACK_BOUNDARY instead of
21085 MIN_STACK_BOUNDARY.
21086 * config/riscv/riscv.h (STACK_BOUNDARY): Renamed from
21087 MIN_STACK_BOUNDARY.
21088 (BIGGEST_ALIGNMENT): Set to 128.
21089 (PREFERRED_STACK_BOUNDARY): Renamed from STACK_BOUNDARY.
21090 (RISCV_STACK_ALIGN): Use PREFERRED_STACK_BOUNDARY instead of
21093 2018-03-19 Richard Biener <rguenther@suse.de>
21095 PR tree-optimization/84933
21096 * tree-vrp.c (set_and_canonicalize_value_range): Treat out-of-bound
21097 values as -INF/INF when canonicalizing an ANTI_RANGE to a RANGE.
21099 2018-03-19 Richard Biener <rguenther@suse.de>
21101 PR tree-optimization/84859
21102 * tree-ssa-phiopt.c (single_trailing_store_in_bb): New function.
21103 (cond_if_else_store_replacement): Perform sinking operation on
21104 single-store BBs regardless of MAX_STORES_TO_SINK setting.
21105 Generalize what a BB with a single eligible store is.
21107 2018-03-19 Richard Biener <rguenther@suse.de>
21109 PR tree-optimization/84929
21110 * tree-data-ref.c (analyze_siv_subscript_cst_affine): Guard
21111 chrec_is_positive against non-chrec arg.
21113 2018-03-19 Tamar Christina <tamar.christina@arm.com>
21116 * config/arm/arm.c (arm_can_change_mode_class): revert r258554.
21118 2018-03-18 Martin Liska <mliska@suse.cz>
21120 PR rtl-optimization/84635
21121 * regrename.c (build_def_use): Use matches_mode only when
21124 2018-03-18 Richard Sandiford <richard.sandiford@linaro.org>
21126 PR tree-optimization/84913
21127 * tree-vect-loop.c (vectorizable_reduction): Don't try to
21128 vectorize chains of COND_EXPRs.
21130 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
21132 * config/nds32/nds32.h (MAX_REGS_PER_ADDRESS): Fix the value.
21134 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
21136 * config/nds32/nds32.h (LOGICAL_OP_NON_SHORT_CIRCUIT): Define.
21138 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
21140 * config/nds32/nds32.h (CLZ_DEFINED_VALUE_AT_ZERO): Define.
21142 2018-03-17 Chung-Ju Wu <jasonwucj@gmail.com>
21143 Kito Cheng <kito.cheng@gmail.com>
21145 * config/nds32/nds32-protos.h (nds32_adjust_reg_alloc_order): Declare.
21146 * config/nds32/nds32.c (nds32_reg_alloc_order_for_speed): New array.
21147 (nds32_adjust_reg_alloc_order): New function.
21148 * config/nds32/nds32.h (ADJUST_REG_ALLOC_ORDER): Define.
21150 2018-03-17 Kito Cheng <kito.cheng@gmail.com>
21152 * config/nds32/nds32.c (nds32_asm_output_mi_thunk,
21153 nds32_print_operand, nds32_print_operand_address): Use
21154 HOST_WIDE_INT_PRINT_DEC instead.
21156 2018-03-17 Chung-Ju Wu <jasonwucj@gmail.com>
21158 * config/nds32/nds32.c (nds32_register_priority): Modify cost.
21160 2018-03-17 Jakub Jelinek <jakub@redhat.com>
21163 * config/i386/i386.c (initial_ix86_tune_features,
21164 initial_ix86_arch_features): Use unsigned HOST_WIDE_INT rather than
21165 unsigned long long.
21166 (set_ix86_tune_features): Change ix86_tune_mask from unsigned int
21167 to unsigned HOST_WIDE_INT, initialize to HOST_WIDE_INT_1U << ix86_tune
21168 rather than 1u << ix86_tune. Formatting fix.
21169 (ix86_option_override_internal): Change ix86_arch_mask from
21170 unsigned int to unsigned HOST_WIDE_INT, initialize to
21171 HOST_WIDE_INT_1U << ix86_arch rather than 1u << ix86_arch.
21172 (ix86_function_specific_restore): Likewise.
21174 2018-03-16 Jakub Jelinek <jakub@redhat.com>
21177 * postreload.c (reload_combine_recognize_pattern): Perform
21178 INTVAL addition in unsigned HOST_WIDE_INT type to avoid UB and
21179 truncate_int_for_mode the result for the destination's mode.
21182 * hsa-gen.c (mem_type_for_type): Fix comment typo.
21183 * tree-vect-loop-manip.c (vect_create_cond_for_niters_checks):
21185 * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
21188 2018-03-16 Vladimir Makarov <vmakarov@redhat.com>
21191 * lra-assigns.c (lra_split_hard_reg_for): Don't use
21192 regno_allocno_class_array and sorted_pseudos.
21193 * lra-constraints.c (spill_hard_reg_in_range): Ignore hard regs in
21194 insns where regno is used.
21196 2018-03-16 Martin Liska <mliska@suse.cz>
21199 * multiple_target.c (create_dispatcher_calls): Redirect
21200 reference in the symbol table.
21202 2018-03-16 Martin Liska <mliska@suse.cz>
21205 * multiple_target.c (create_dispatcher_calls): Redirect also
21208 2018-03-16 Jakub Jelinek <jakub@redhat.com>
21212 * tree.h (TARGET_EXPR_NO_ELIDE): Define.
21213 * gimplify.c (gimplify_modify_expr_rhs): Don't elide TARGET_EXPRs with
21214 TARGET_EXPR_NO_ELIDE flag set unless *expr_p is INIT_EXPR.
21216 2018-03-16 Julia Koval <julia.koval@intel.com>
21218 * doc/invoke.texi (Skylake Server): Add CLWB.
21219 Cannonlake): Remove CLWB.
21221 2018-03-16 Jakub Jelinek <jakub@redhat.com>
21223 PR tree-optimization/84841
21224 * tree-ssa-reassoc.c (INTEGER_CONST_TYPE): Change to 1 << 4 from
21226 (FLOAT_ONE_CONST_TYPE): Define.
21227 (constant_type): Return FLOAT_ONE_CONST_TYPE for -1.0 and 1.0.
21228 (sort_by_operand_rank): Put entries with higher constant_type last
21229 rather than first to match comments.
21231 2018-03-15 Sandra Loosemore <sandra@codesourcery.com>
21233 * config/nios2/nios2.md (movsi_internal): Fix thinko in
21236 2018-03-15 Jakub Jelinek <jakub@redhat.com>
21239 * calls.c (expand_call): For TREE_ADDRESSABLE rettype ignore alignment
21240 check and use address of target always.
21242 2018-03-15 H.J. Lu <hongjiu.lu@intel.com>
21245 * config/i386/i386.c (indirect_thunk_needed): Update comments.
21246 (indirect_thunk_bnd_needed): Likewise.
21247 (indirect_thunks_used): Likewise.
21248 (indirect_thunks_bnd_used): Likewise.
21249 (indirect_return_needed): New.
21250 (indirect_return_bnd_needed): Likewise.
21251 (output_indirect_thunk_function): Add a bool argument for
21253 (output_indirect_thunk_function): Don't generate alias for
21254 function return thunk.
21255 (ix86_code_end): Call output_indirect_thunk_function to generate
21256 function return thunks.
21257 (ix86_output_function_return): Set indirect_return_bnd_needed
21258 and indirect_return_needed instead of indirect_thunk_bnd_needed
21259 and indirect_thunk_needed.
21261 2018-03-15 Olga Makhotina <olga.makhotina@intel.com>
21263 * config/i386/sgxintrin.h (_enclv_u32): New intrinsic.
21264 (__enclv_bc, __enclv_cd, __enclv_generic): New definitions.
21265 (ERDINFO, ETRACKC, ELDBC, ELDUC): New leaves.
21267 2018-03-15 David Malcolm <dmalcolm@redhat.com>
21268 Paul Hua <paul.hua.gm@gmail.com>
21271 * gcc.dg/fixits-pr84852-1.c: Fix filename in dg-regexp.
21273 2018-03-15 Segher Boessenkool <segher@kernel.crashing.org>
21275 * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add back the
21276 TARGET_DOUBLE_FLOAT and TARGET_SINGLE_FLOAT conditions on the DFmode
21277 resp. SFmode cases.
21279 2018-03-15 Tamar Christina <tamar.christina@arm.com>
21282 * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
21283 instead of GET_MODE_SIZE when comparing Units.
21285 2018-03-15 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
21288 * varasm.c (hash_section): Return an unchangeble hash value
21289 * config/aarch64/aarch64.c (aarch64_use_blocks_for_constant_p):
21290 Return !aarch64_can_use_per_function_literal_pools_p ().
21292 2018-03-15 Jakub Jelinek <jakub@redhat.com>
21295 * optabs.c (emit_conditional_move): Pass address of cmode's copy
21296 rather than address of cmode as last argument to prepare_cmp_insn.
21298 2018-03-15 Julia Koval <julia.koval@intel.com>
21300 * config/i386/i386.c (F_AVX512VBMI2, F_GFNI, F_VPCLMULQDQ,
21301 F_AVX512VNNI, F_AVX512BITALG): New.
21303 2018-03-14 John David Anglin <danglin@gcc.gnu.org>
21306 * config/pa/pa.c (pa_emit_move_sequence): Always emit secondary reload
21307 insn for floating-point loads and stores.
21309 2018-03-14 Carl Love <cel@us.ibm.com>
21311 * config/rs6000/rs6000-c.c: Add macro definitions for
21312 ALTIVEC_BUILTIN_VEC_PERMXOR.
21313 * config/rs6000/rs6000.h: Add #define for vec_permxor builtin.
21314 * config/rs6000/rs6000-builtin.def: Add macro expansions for VPERMXOR.
21315 * config/rs6000/altivec.md (altivec_vpermxor): New define expand.
21316 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Add case
21318 * config/doc/extend.texi: Add prototypes for vec_permxor.
21320 2018-03-14 David Malcolm <dmalcolm@redhat.com>
21323 * diagnostic-show-locus.c (class layout_point): Convert m_line
21324 from int to linenum_type.
21325 (line_span::comparator): Use linenum "compare" function when
21326 comparing line numbers.
21327 (test_line_span): New function.
21328 (layout_range::contains_point): Convert param "row" from int to
21330 (layout_range::intersects_line_p): Likewise.
21331 (layout::will_show_line_p): Likewise.
21332 (layout::print_source_line): Likewise.
21333 (layout::should_print_annotation_line_p): Likewise.
21334 (layout::print_annotation_line): Likewise.
21335 (layout::print_leading_fixits): Likewise.
21336 (layout::annotation_line_showed_range_p): Likewise.
21337 (struct line_corrections): Likewise for field m_row.
21338 (line_corrections::line_corrections): Likewise for param "row".
21339 (layout::print_trailing_fixits): Likewise.
21340 (layout::get_state_at_point): Likewise.
21341 (layout::get_x_bound_for_row): Likewise.
21342 (layout::print_line): Likewise.
21343 (diagnostic_show_locus): Likewise for locals "last_line" and "row".
21344 (selftest::diagnostic_show_locus_c_tests): Call test_line_span.
21345 * input.c (selftest::test_linenum_comparisons): New function.
21346 (selftest::input_c_tests): Call it.
21347 * selftest.c (selftest::test_assertions): Test ASSERT_GT,
21348 ASSERT_GT_AT, ASSERT_LT, and ASSERT_LT_AT.
21349 * selftest.h (ASSERT_GT): New macro.
21350 (ASSERT_GT_AT): New macro.
21351 (ASSERT_LT): New macro.
21352 (ASSERT_LT_AT): New macro.
21354 2018-03-14 Segher Boessenkool <segher@kernel.crashing.org>
21356 PR rtl-optimization/84780
21357 * combine.c (distribute_links): Don't make a link based on pc_rtx.
21359 2018-03-14 Martin Liska <mliska@suse.cz>
21361 * tree.c (record_node_allocation_statistics): Use
21362 get_stats_node_kind.
21363 (get_stats_node_kind): New function extracted from
21364 record_node_allocation_statistics.
21365 (free_node): Use get_stats_node_kind.
21367 2018-03-14 Richard Biener <rguenther@suse.de>
21369 * tree-ssa-pre.c (compute_antic_aux): Remove code that asserts
21370 that the value-set of ANTIC_IN doesn't grow.
21373 * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
21375 (BB_VISITED_WITH_VISITED_SUCCS): New define.
21376 (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
21378 2018-03-14 Julia Koval <julia.koval@intel.com>
21380 * config.gcc (icelake-client, icelake-server): New.
21382 * config/i386/i386.c (initial_ix86_tune_features): Extend to 64 bit.
21383 (initial_ix86_arch_features): Ditto.
21384 (PTA_SKYLAKE): Add SGX.
21385 (PTA_ICELAKE): Remove.
21386 (PTA_ICELAKE_CLIENT): New.
21387 (PTA_ICELAKE_SERVER): New.
21388 (ix86_option_override_internal): Split up icelake on icelake client and
21390 (get_builtin_code_for_version): Ditto.
21391 (fold_builtin_cpu): Ditto.
21392 * config/i386/driver-i386.c (config/i386/driver-i386.c): Ditto.
21393 * config/i386/i386-c.c (ix86_target_macros_internal): Ditto
21394 * config/i386/i386.h (processor_type): Ditto.
21395 * doc/invoke.texi: Ditto.
21397 2018-03-14 Jakub Jelinek <jakub@redhat.com>
21400 * sanopt.c (maybe_optimize_ubsan_ptr_ifn): Handle also
21401 INTEGER_CST offset, add it together with bitpos / 8 and
21402 sign extend based on POINTER_SIZE.
21406 2017-04-20 Uros Bizjak <ubizjak@gmail.com>
21409 * config/i386/constraints.md (Yc): New register constraint.
21410 * config/i386/i386.md (*float<SWI48:mode><MODEF:mode>2_mixed):
21411 Use Yc constraint for alternative 2 of operand 0. Remove
21412 preferred_for_speed attribute.
21414 2018-03-14 Richard Biener <rguenther@suse.de>
21416 PR tree-optimization/84830
21417 * tree-ssa-pre.c (compute_antic_aux): Intersect the new ANTIC_IN
21418 with the old one to avoid oscillations.
21420 2018-03-13 Vladimir Makarov <vmakarov@redhat.com>
21423 * lra-assigns.c (find_all_spills_for): Ignore uninteresting
21425 (assign_by_spills): Return a flag of reload assignment failure.
21426 Do not process the reload assignment failures. Do not spill other
21427 reload pseudos if they has the same reg class. Update n if
21429 (lra_assign): Add a return arg. Set up from the result of
21430 assign_by_spills call.
21431 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
21432 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
21433 usage_insns if it is not NULL.
21434 (spill_hard_reg_in_range): New function.
21435 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
21436 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
21437 function prototypes.
21438 (lra_assign): Change prototype.
21439 * lra.c (lra): Add code to deal with fails by splitting hard reg
21442 2018-03-01 Palmer Dabbelt <palmer@sifive.com>
21444 * config/riscv/riscv.opt (mrelax): New option.
21445 * config/riscv/riscv.c (riscv_file_start): Emit ".option
21446 "norelax" when riscv_mrelax is disabled.
21447 * doc/invoke.texi (RISC-V): Document "-mrelax" and "-mno-relax".
21449 2018-03-13 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
21452 * config/rs6000/rs6000.c (rs6000_reassociation_width): Disable parallel
21453 reassociation for int modes.
21455 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
21457 * tree-vect-loop-manip.c (vect_maybe_permute_loop_masks):
21458 Reverse the choice between VEC_UNPACK_LO_EXPR and VEC_UNPACK_HI_EXPR
21460 * config/aarch64/iterators.md (hi_lanes_optab): New int attribute.
21461 * config/aarch64/aarch64-sve.md
21462 (*aarch64_sve_<perm_insn><perm_hilo><mode>): Rename to...
21463 (aarch64_sve_<perm_insn><perm_hilo><mode>): ...this.
21464 (*extend<mode><Vwide>2): Rename to...
21465 (aarch64_sve_extend<mode><Vwide>2): ...this.
21466 (vec_unpack<su>_<perm_hilo>_<mode>): Turn into a define_expand,
21467 renaming the old pattern to...
21468 (aarch64_sve_punpk<perm_hilo>_<mode>): ...this. Only define
21470 (vec_unpack<su>_<perm_hilo>_<SVE_BHSI:mode>): Turn into a
21471 define_expand, renaming the old pattern to...
21472 (aarch64_sve_<su>unpk<perm_hilo>_<SVE_BHSI:mode>): ...this.
21473 (*vec_unpacku_<perm_hilo>_<mode>_no_convert): Delete.
21474 (vec_unpacks_<perm_hilo>_<mode>): Take BYTES_BIG_ENDIAN into
21475 account when deciding which SVE instruction the optab should use.
21476 (vec_unpack<su_optab>_float_<perm_hilo>_vnx4si): Likewise.
21478 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
21480 * config/aarch64/aarch64.md (V4_REGNUM, V8_REGNUM, V12_REGNUM)
21481 (V20_REGNUM, V24_REGNUM, V28_REGNUM, P1_REGNUM, P2_REGNUM, P3_REGNUM)
21482 (P4_REGNUM, P5_REGNUM, P6_REGNUM, P8_REGNUM, P9_REGNUM, P10_REGNUM)
21483 (P11_REGNUM, P12_REGNUM, P13_REGNUM, P14_REGNUM): New define_constants.
21484 (tlsdesc_small_<mode>): Turn a define_expand and use
21485 tlsdesc_small_sve_<mode> for SVE. Rename original define_insn to...
21486 (tlsdesc_small_advsimd_<mode>): ...this.
21487 (tlsdesc_small_sve_<mode>): New pattern.
21489 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
21491 * config/aarch64/iterators.md (UNSPEC_SMUL_HIGHPART)
21492 (UNSPEC_UMUL_HIGHPART): New constants.
21493 (MUL_HIGHPART): New int iteraor.
21494 (su): Handle UNSPEC_SMUL_HIGHPART and UNSPEC_UMUL_HIGHPART.
21495 * config/aarch64/aarch64-sve.md (<su>mul<mode>3_highpart): New
21497 (*<su>mul<mode>3_highpart): New define_insn.
21499 2018-03-13 Eric Botcazou <ebotcazou@adacore.com>
21502 * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
21505 2018-03-13 Martin Liska <mliska@suse.cz>
21508 * (sem_item_optimizer::sem_item_optimizer): Initialize new
21510 (sem_item_optimizer::~sem_item_optimizer): Release it.
21511 (sem_item_optimizer::merge_classes): Register variable aliases.
21512 (sem_item_optimizer::fixup_pt_set): New function.
21513 (sem_item_optimizer::fixup_points_to_sets): Likewise.
21514 * ipa-icf.h: Declare new variables and functions.
21516 2018-03-13 Jakub Jelinek <jakub@redhat.com>
21518 PR middle-end/84834
21519 * match.pd ((A & C) != 0 ? D : 0): Use INTEGER_CST@2 instead of
21520 integer_pow2p@2 and test integer_pow2p in condition.
21521 (A < 0 ? C : 0): Similarly for @1.
21523 PR middle-end/84831
21524 * stmt.c (parse_output_constraint): If the CONSTRAINT_LEN (*p, p)
21525 characters starting at p contain '\0' character, don't look beyond
21529 * config/i386/i386.md (round<mode>2): For 387 fancy math, disable
21530 pattern if -ftrapping-math -fno-fp-int-builtin-inexact.
21533 * reg-stack.c (change_stack): Change update_end var from int to
21534 rtx_insn *, if non-NULL don't update just BB_END (current_block), but
21535 also call set_block_for_insn on the newly added insns and rescan.
21538 * config/i386/sse.md (sse2_loadhpd): Use Yv constraint rather than v
21539 on the last operand.
21542 * tree.c (stabilize_reference_1): Return save_expr (e) for
21543 STATEMENT_LIST even if it doesn't have side-effects.
21545 2018-03-12 Jonathan Wakely <jwakely@redhat.com>
21547 * doc/invoke.texi (-mclflushopt): Fix spelling of option.
21549 2018-03-12 Renlin Li <renlin.li@arm.com>
21551 * config/aarch64/aarch64.md (movhf_aarch64): Fix mode argument to
21552 aarch64_output_scalar_simd_mov_immediate.
21554 2018-03-12 Martin Sebor <msebor@redhat.com>
21556 PR tree-optimization/83456
21557 * gimple-fold.c (gimple_fold_builtin_memory_op): Avoid warning
21558 for perfectly overlapping calls to memcpy.
21559 (gimple_fold_builtin_memory_chk): Same.
21560 (gimple_fold_builtin_strcpy): Handle no-warning.
21561 (gimple_fold_builtin_stxcpy_chk): Same.
21562 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Handle no-warning.
21564 2018-03-12 Segher Boessenkool <segher@kernel.crashing.org>
21566 * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add bool "named"
21567 parameter. Use it for SFmode.
21568 (rs6000_function_arg_advance_1): Adjust.
21569 (rs6000_function_arg): Adjust.
21570 (rs6000_gimplify_va_arg): Pass false for that new parameter.
21572 2018-03-12 Segher Boessenkool <segher@kernel.crashing.org>
21574 PR rtl-optimization/84169
21575 PR rtl-optimization/84780
21576 * combine.c (can_combine_p): Check for a 2-insn combination whether
21577 the destination register is used between the two insns, too.
21579 2018-03-12 Richard Biener <rguenther@suse.de>
21581 PR tree-optimization/84803
21582 * tree-if-conv.c (ifcvt_memrefs_wont_trap): Don't do anything
21583 for refs DR analysis didn't process.
21585 2018-03-12 Richard Biener <rguenther@suse.de>
21587 PR tree-optimization/84777
21588 * tree-ssa-loop-ch.c (should_duplicate_loop_header_p): For
21589 force-vectorize loops ignore whether we are optimizing for size.
21591 2018-03-12 Chung-Ju Wu <jasonwucj@gmail.com>
21593 * config/nds32/nds32.c (nds32_md_asm_adjust): New function.
21594 (TARGET_MD_ASM_ADJUST): Define.
21596 2018-03-12 Monk Chiang <sh.chiang04@gmail.com>
21597 Kito Cheng <kito.cheng@gmail.com>
21598 Chung-Ju Wu <jasonwucj@gmail.com>
21600 * config/nds32/nds32.c (nds32_compute_stack_frame,
21601 nds32_emit_stack_push_multiple, nds32_emit_stack_pop_multiple,
21602 nds32_emit_stack_v3push, nds32_emit_stack_v3pop,
21603 nds32_emit_adjust_frame, nds32_expand_prologue, nds32_expand_epilogue,
21604 nds32_expand_prologue_v3push, nds32_expand_epilogue_v3pop): Refine.
21605 * config/nds32/nds32.h (NDS32_FIRST_CALLEE_SAVE_GPR_REGNUM,
21606 NDS32_LAST_CALLEE_SAVE_GPR_REGNUM, NDS32_V3PUSH_AVAILABLE_P): New.
21607 * config/nds32/nds32.md (prologue, epilogue): Use macro
21608 NDS32_V3PUSH_AVAILABLE_P to do checking.
21610 2018-03-11 Jakub Jelinek <jakub@redhat.com>
21613 * dwarf2out.c (gen_enumeration_type_die): Don't guard adding
21614 DW_AT_declaration for ENUM_IS_OPAQUE on -gdwarf-4 or -gno-strict-dwarf,
21615 but on TYPE_SIZE. Don't do anything for ENUM_IS_OPAQUE if not creating
21616 a new die. Don't set TREE_ASM_WRITTEN if ENUM_IS_OPAQUE. Guard
21617 addition of most attributes on !orig_type_die or the attribute not
21618 being present already. Assert TYPE_VALUES is NULL for ENUM_IS_OPAQUE.
21620 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
21621 Chung-Ju Wu <jasonwucj@gmail.com>
21623 * config/nds32/nds32.c (nds32_cpu_cpp_builtins): Modify to define
21624 __NDS32_VH__ macro.
21625 * config/nds32/nds32.opt (mvh): New option.
21627 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
21628 Chung-Ju Wu <jasonwucj@gmail.com>
21630 * config/nds32/nds32-protos.h (nds32_cpu_cpp_builtins): Declare
21632 * config/nds32/nds32.c (nds32_cpu_cpp_builtins): New function.
21633 * config/nds32/nds32.h (TARGET_CPU_CPP_BUILTINS): Modify its
21636 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
21637 Chung-Ju Wu <jasonwucj@gmail.com>
21639 * config/nds32/nds32-memory-manipulation.c (nds32_expand_strlen): New
21641 * config/nds32/nds32-multiple.md (strlensi): New pattern.
21642 * config/nds32/nds32-protos.h (nds32_expand_strlen): Declare function.
21644 2018-03-11 Monk Chiang <sh.chiang04@gmail.com>
21645 Kito Cheng <kito.cheng@gmail.com>
21646 Chung-Ju Wu <jasonwucj@gmail.com>
21648 * config/nds32/constants.md (unspec_element): Add UNSPEC_FFB,
21649 UNSPEC_FFMISM and UNSPEC_FLMISM.
21650 * config/nds32/nds32-intrinsic.c (bdesc_2arg): Add builtin description
21651 for ffb, ffmism and flmism.
21652 * config/nds32/nds32-intrinsic.md (unspec_ffb): Define new pattern.
21653 (unspec_ffmism): Ditto.
21654 (unspec_flmism): Ditto.
21655 (nds32_expand_builtin_impl): Check if string extension is available.
21656 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FFB,
21657 NDS32_BUILTIN_FFMISM and NDS32_BUILTIN_FLMISM.
21659 2018-03-10 Vladimir Makarov <vmakarov@redhat.com>
21662 2018-03-09 Vladimir Makarov <vmakarov@redhat.com>
21665 * lra-assigns.c (assign_by_spills): Return a flag of reload
21666 assignment failure. Do not process the reload assignment
21667 failures. Do not spill other reload pseudos if they has the same
21669 (lra_assign): Add a return arg. Set up from the result of
21670 assign_by_spills call.
21671 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
21672 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
21673 usage_insns if it is not NULL.
21674 (spill_hard_reg_in_range): New function.
21675 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
21676 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
21677 function prototypes.
21678 (lra_assign): Change prototype.
21679 * lra.c (lra): Add code to deal with fails by splitting hard reg
21682 2018-03-10 H.J. Lu <hongjiu.lu@intel.com>
21685 * config/i386/i386.opt: Replace Enforcment with Enforcement.
21687 2018-03-10 Alexandre Oliva <aoliva@redhat.com>
21690 * dwarf2out.h (dw_val_class): Add dw_val_class_symview.
21691 (dw_val_node): Add val_symbolic_view.
21692 * dwarf2out.c (dw_line_info_table): Add symviews_since_reset.
21693 (symview_upper_bound): New.
21694 (new_line_info_table): Initialize symviews_since_reset.
21695 (dwarf2out_source_line): Count symviews_since_reset and set
21696 symview_upper_bound.
21697 (dw_val_equal_p): Handle symview.
21698 (add_AT_symview): New.
21699 (print_dw_val): Handle symview.
21700 (attr_checksum, attr_checksum_ordered): Likewise.
21701 (same_dw_val_p, size_of_die): Likewise.
21702 (value_format, output_die): Likewise.
21703 (add_high_low_attributes): Use add_AT_symview for entry_view.
21704 (dwarf2out_finish): Reset symview_upper_bound, clear
21707 2018-03-09 Peter Bergner <bergner@vnet.ibm.com>
21710 * config/rs6000/rs6000.c (rs6000_offsettable_memref_p): New prototype.
21711 Add strict argument and use it.
21712 (rs6000_split_multireg_move): Update for new strict argument.
21713 (mem_operand_gpr): Disallow all non-offsettable addresses.
21714 * config/rs6000/rs6000.md (*movdi_internal64): Use YZ constraint.
21716 2018-03-09 Jakub Jelinek <jakub@redhat.com>
21719 * config/rs6000/rs6000.c (rs6000_gimplify_va_arg): Mark va_arg_tmp
21720 temporary TREE_ADDRESSABLE before gimplification of BUILT_IN_MEMCPY.
21721 * config/powerpcspe/powerpcspe.c (rs6000_gimplify_va_arg): Likewise.
21724 * tree-inline.c (copy_tree_body_r): For INDIRECT_REF of a remapped
21725 decl, use remap_type if we want to use the type.
21727 2018-03-09 Martin Sebor <msebor@redhat.com>
21729 PR tree-optimization/84526
21730 * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
21732 (builtin_access::generic_overlap): Be prepared to handle non-array
21735 2018-03-09 Alexandre Oliva <aoliva@redhat.com>
21737 PR rtl-optimization/84682
21738 * lra-constraints.c (process_address_1): Check is_address flag
21739 for address constraints.
21740 (process_alt_operands): Likewise.
21741 * lra.c (lra_set_insn_recog_data): Pass asm operand locs to
21742 preprocess_constraints.
21743 * recog.h (preprocess_constraints): Add oploc parameter.
21745 * recog.c (preprocess_constraints): Test address_operand for
21746 CT_ADDRESS constraints.
21748 2018-03-09 Vladimir Makarov <vmakarov@redhat.com>
21751 * lra-assigns.c (assign_by_spills): Return a flag of reload
21752 assignment failure. Do not process the reload assignment
21753 failures. Do not spill other reload pseudos if they has the same
21755 (lra_assign): Add a return arg. Set up from the result of
21756 assign_by_spills call.
21757 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
21758 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
21759 usage_insns if it is not NULL.
21760 (spill_hard_reg_in_range): New function.
21761 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
21762 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
21763 function prototypes.
21764 (lra_assign): Change prototype.
21765 * lra.c (lra): Add code to deal with fails by splitting hard reg
21768 2018-03-09 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
21771 * common/config/arm/arm-common.c (arm_parse_arch_option_name):
21772 Accept complain bool parameter. Only emit errors if it is true.
21773 (arm_parse_cpu_option_name): Likewise.
21774 (arm_target_thumb_only): Adjust callers of the above.
21775 * config/arm/arm-protos.h (arm_parse_cpu_option_name): Adjust
21776 prototype to take a default true bool parameter.
21777 (arm_parse_arch_option_name): Likewise.
21779 2018-03-09 David Malcolm <dmalcolm@redhat.com>
21780 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
21784 * Makefile.in (LD_VERSION_SCRIPT_OPTION, LD_SONAME_OPTION): New.
21785 * configure: Regenerate.
21786 * configure.ac ("linker --version-script option"): New.
21787 ("linker soname option"): New.
21789 2018-03-09 Richard Biener <rguenther@suse.de>
21791 PR tree-optimization/84775
21792 * tree-if-conv.c (add_bb_predicate_gimplified_stmts): Delink
21793 immediate uses of predicate stmts and mark them modified.
21796 PR tree-optimization/84178
21797 * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
21799 (version_loop_for_if_conversion): Delay update_ssa call.
21800 (tree_if_conversion): Delay update_ssa until after predicate
21803 2018-03-09 Eric Botcazou <ebotcazou@adacore.com>
21806 * config/i386/winnt.c (i386_pe_seh_cold_init): Use small pre-allocation
21807 when the function accesses prior frames.
21809 2018-03-08 Jakub Jelinek <jakub@redhat.com>
21812 * dwarf2out.c (dw_loc_list): If list && loc_list->first->next, call
21813 gen_llsym, otherwise call maybe_gen_llsym.
21815 PR inline-asm/84742
21816 * recog.c (asm_operand_ok): Return 0 if multi-character constraint
21817 has ',' character inside of it.
21819 2018-03-08 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
21822 * config/aarch64/aarch64.md (*compare_cstore<mode>_insn): Mark pattern
21823 as clobbering CC_REGNUM.
21825 2018-03-08 Richard Biener <rguenther@suse.de>
21827 PR middle-end/84552
21828 * tree-scalar-evolution.c: Include tree-into-ssa.h.
21829 (follow_copies_to_constant): Do not follow SSA names registered
21832 2018-03-08 Richard Biener <rguenther@suse.de>
21834 PR tree-optimization/84178
21835 * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
21837 (version_loop_for_if_conversion): Delay update_ssa call.
21838 (tree_if_conversion): Delay update_ssa until after predicate
21841 2018-03-08 David Malcolm <dmalcolm@redhat.com>
21843 PR tree-optimization/84178
21844 * tree-if-conv.c (release_bb_predicate): Remove the
21845 the assertion that the stmts have NULL use_ops.
21846 Discard the statements, asserting that they haven't
21847 yet been added to a BB.
21849 2018-03-08 Richard Biener <rguenther@suse.de>
21851 PR tree-optimization/84746
21852 * tree-ssa-pre.c (find_leader_in_sets): Deal with SET1 being NULL.
21853 (phi_translate): Pass in destination ANTIC_OUT set.
21854 (phi_translate_1): Likewise. For a simplified result lookup
21855 a leader in ANTIC_OUT and AVAIL_OUT, not the ANTIC_IN sets.
21856 (phi_translate_set): Adjust.
21857 (do_pre_regular_insertion): Likewise.
21858 (do_pre_partial_partial_insertion): Likewise.
21860 2018-03-08 Martin Liska <mliska@suse.cz>
21862 PR gcov-profile/84735
21863 * doc/gcov.texi: Document usage of profile files.
21864 * gcov-io.h: Document changes in the format.
21866 2018-03-08 Alexandre Oliva <aoliva@redhat.com>
21870 * dwarf2out.c (struct dw_line_info_table): Update comments for
21872 (FORCE_RESET_NEXT_VIEW): New.
21873 (FORCE_RESETTING_VIEW_P): New.
21874 (RESETTING_VIEW_P): Check for -1 too.
21875 (ZERO_VIEW_P): Likewise.
21876 (new_line_info_table): Force-reset next view.
21877 (dwarf2out_begin_function): Likewise.
21878 (dwarf2out_source_line): Simplify zero_view_p initialization.
21879 Test FORCE_RESETTING_VIEW_P and RESETTING_VIEW_P instead of
21880 view directly. Omit view when omitting .loc at line 0.
21882 2018-03-08 Jakub Jelinek <jakub@redhat.com>
21884 PR tree-optimization/84740
21885 * tree-switch-conversion.c (process_switch): Call build_constructors
21886 only if info.phi_count is non-zero.
21888 PR tree-optimization/84739
21889 * tree-tailcall.c (find_tail_calls): Check call arguments against
21890 DECL_ARGUMENTS (current_function_decl) rather than
21891 DECL_ARGUMENTS (func) when checking for tail recursion.
21893 2018-03-07 Jakub Jelinek <jakub@redhat.com>
21895 * doc/contrib.texi: Add entries for Martin Liska, David Malcolm,
21896 Marek Polacek, extend Vladimir Makarov's, Jonathan Wakely's and
21897 Volker Reichelt's entry and add entries for people that perform
21898 GCC fuzzy testing and report numerous bugs.
21900 2018-03-07 Segher Boessenkool <segher@kernel.crashing.org>
21903 * config/rs6000/rs6000.c (rs6000_elf_in_small_data_p): Don't put
21904 readonly data in sdata, if that is disabled.
21905 * config/rs6000/sysv4.opt (mreadonly-in-sdata): New option.
21906 * doc/invoke.texi (RS/6000 and PowerPC Options): Document
21907 -mreadonly-in-sdata option.
21909 2018-03-07 Martin Sebor <msebor@redhat.com>
21911 PR tree-optimization/84468
21912 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Consider successor
21913 basic block when looking for nul assignment.
21915 2018-03-07 Eric Botcazou <ebotcazou@adacore.com>
21918 * except.h (output_function_exception_table): Adjust prototype.
21919 * except.c (output_function_exception_table): Remove FNNAME parameter
21920 and add SECTION parameter. Ouput one part of the table at a time.
21921 * final.c (final_scan_insn_1) <NOTE_INSN_SWITCH_TEXT_SECTIONS>: Output
21922 the first part of the exception table and emit unwind directives.
21923 * config/i386/i386-protos.h (i386_pe_end_cold_function): Declare.
21924 (i386_pe_seh_cold_init): Likewise.
21925 * config/i386/cygming.h (ASM_DECLARE_COLD_FUNCTION_NAME): New macro.
21926 (ASM_DECLARE_COLD_FUNCTION_SIZE): Likewise.
21927 * config/i386/i386.c (x86_expand_epilogue): Fix wording in comment.
21928 (ix86_output_call_insn): Emit a nop in one more case for SEH.
21929 * config/i386/winnt.c: Include except.h.
21930 (struct seh_frame_state): Add reg_offset, after_prologue and
21931 in_cold_section fields.
21932 (i386_pe_seh_end_prologue): Set seh->after_prologue.
21933 (i386_pe_seh_cold_init): New function.
21934 (i386_pe_seh_fini): Add COLD parameter and bail out if it is not equal
21935 to seh->in_cold_section.
21936 (seh_emit_push): Record the offset of the push.
21937 (seh_emit_save): Record the offet of the save.
21938 (i386_pe_seh_unwind_emit): Deal with NOTE_INSN_SWITCH_TEXT_SECTIONS.
21939 Test seh->after_prologue to disregard the epilogue.
21940 (i386_pe_end_function): Pass FALSE to i386_pe_seh_fini.
21941 (i386_pe_end_cold_function): New function.
21943 2018-03-07 Jakub Jelinek <jakub@redhat.com>
21946 * config/aarch64/predicates.md (aarch64_simd_reg_or_zero): Use
21947 aarch64_simd_or_scalar_imm_zero rather than aarch64_simd_imm_zero.
21950 * gimple-expr.c (create_tmp_var_raw): Set DECL_NAMELESS flag
21952 * tree-pretty-print.c (dump_decl_name): For TDF_COMPARE_DEBUG,
21953 don't print names of DECL_NAMELESS DECL_IGNORED_P decls.
21955 PR middle-end/84723
21956 * multiple_target.c: Include tree-inline.h and intl.h.
21957 (expand_target_clones): Diagnose and fail if node->definition and
21958 !tree_versionable_function_p (node->decl).
21960 2018-03-06 John David Anglin <danglin@gcc.gnu.org>
21962 * config/pa/pa.h (ASM_GENERATE_INTERNAL_LABEL): Revise to use
21964 (ASM_OUTPUT_ADDR_VEC_ELT): Revise for above change.
21965 (ASM_OUTPUT_ADDR_DIFF_ELT): Likewise.
21966 * config/pa/pa64-hpux.h (ASM_GENERATE_INTERNAL_LABEL): Revise as above.
21968 2018-03-06 Jakub Jelinek <jakub@redhat.com>
21971 * combine.c (try_combine): Use reg_or_subregno instead of handling
21972 just paradoxical SUBREGs and REGs.
21974 2018-03-06 Claudiu Zissulescu <claziss@synopsys.com>
21976 * config/arc/arc.c (arc_finalize_pic): Remove function.
21977 (arc_must_save_register): We use single base PIC register, remove
21978 checks to save/restore the PIC register.
21979 (arc_expand_prologue): Likewise.
21980 * config/arc/arc-protos.h (arc_set_default_type_attributes):
21982 (arc_verify_short): Likewise.
21983 (arc_attr_type): Likewise.
21984 * config/arc/arc.c (arc_set_default_type_attributes): Remove.
21985 (walk_stores): Likewise.
21986 (arc_address_cost): Make it static.
21987 (arc_verify_short): Likewise.
21988 (branch_dest): Likewise.
21989 (arc_attr_type): Likewise.
21990 * config/arc/arc.c (TARGET_ADJUST_INSN_LENGTH): Remove.
21991 (TARGET_INSN_LENGTH_PARAMETERS): Likewise.
21992 (arc_final_prescan_insn): Remove inserting the nops due to
21993 hardware hazards. It is done in reorg step.
21994 (insn_length_variant_t): Remove.
21995 (insn_length_parameters_t): Likewise.
21996 (arc_insn_length_parameters): Likewise.
21997 (arc_get_insn_variants): Likewise.
21998 * config/arc/arc.h (TARGET_UPSIZE_DBR): Remove.
22000 2018-03-06 Jakub Jelinek <jakub@redhat.com>
22002 PR inline-asm/84683
22003 * reg-stack.c (move_for_stack_reg): If any_malformed_asm, avoid
22006 PR tree-optimization/84687
22007 * omp-simd-clone.c (simd_clone_create): Clear DECL_BUILT_IN_CLASS
22009 * match.pd (pow(C,x)*expN(y) -> expN(logN(C)*x+y)): New optimization.
22011 2018-03-05 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
22013 * config/rs6000/rs6000-builtin.def (rs6000_speculation_barrier):
22014 Rename to ppc_speculation_barrier.
22015 * config/rs6000/rs6000.c (rs6000_init_builtins): Rename builtin to
22016 __builtin_ppc_speculation_barrier.
22018 2018-03-05 Jakub Jelinek <jakub@redhat.com>
22021 * combine.c (combine_simplify_rtx): Don't try to simplify if
22022 if_then_else_cond returned non-NULL, but either true_rtx or false_rtx
22025 2018-03-05 Segher Boessenkool <segher@kernel.crashing.org>
22027 * config/rs6000/rs6000.c (rs6000_loop_align): Don't align tiny loops
22028 to 32 bytes when compiling for POWER9.
22030 2018-03-05 Jakub Jelinek <jakub@redhat.com>
22033 * config/i386/i386.c (ix86_function_ok_for_sibcall): Check for
22034 regparm >= 3 with no arg reg available also for calls with
22035 flag_force_indirect_call. Pass decl to ix86_function_regparm.
22038 * config/i386/sse.md (*<code><mode>3): Replace <mask_prefix3> with
22040 (*<plusminus_insn><mode>3): Likewise. Remove <mask_operand3> uses.
22042 2018-03-05 Peter Bergner <bergner@vnet.ibm.com>
22045 * config/rs6000/vector.md (mov<mode>): Disallow altivec memory operands.
22047 2018-03-05 Richard Biener <rguenther@suse.de>
22049 PR tree-optimization/84486
22050 * tree-ssa-pre.c (create_expression_by_pieces): Remove dead code.
22051 When inserting a __builtin_assume_aligned call set the LHS
22052 SSA name alignment info accordingly.
22054 2018-03-05 Wilco Dijkstra <wdijkstr@arm.com>
22056 PR tree-optimization/84114
22057 * config/aarch64/aarch64.c (aarch64_reassociation_width)
22058 Avoid reassociation of FLOAT_MODE addition.
22060 2018-03-05 Olga Makhotina <olga.makhotina@intel.com>
22062 * common/config/i386/i386-common.c (OPTION_MASK_ISA_PCONFIG_SET,
22063 OPTION_MASK_ISA_PCONFIG_UNSET, OPTION_MASK_ISA_WBNOINVD_SET,
22064 OPTION_MASK_ISA_WBNOINVD_UNSET): New definitions.
22065 (ix86_handle_option): Handle -mpconfig and -mwbnoinvd.
22066 * config.gcc (pconfigintrin.h, wbnoinvdintrin.h) : Add headers.
22067 * config/i386/cpuid.h (bit_PCONFIG, bit_WBNOINVD): New.
22068 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mpconfig
22070 * config/i386/i386-builtin.def (__builtin_ia32_wbnoinvd,
22071 __builtin_ia32_wbinvd): New builtins.
22072 (SPECIAL_ARGS2): New.
22073 * config/i386/i386-c.c (__WBNOINVD__, __PCONFIG__): New.
22074 (SPECIAL_ARGS2): New.
22075 * config/i386/i386.c (ix86_target_string): Add -mpconfig and -mwbnoinvd.
22076 (ix86_valid_target_attribute_inner_p): Ditto.
22077 (ix86_init_mmx_sse_builtins): Add special_args2.
22078 * config/i386/i386.h (TARGET_PCONFIG, TARGET_PCONFIG_P, TARGET_WBNOINVD,
22079 TARGET_WBNOINVD_P): New.
22080 * config/i386/i386.md (UNSPECV_WBINVD, UNSPECV_WBNOINVD): New.
22081 (define_insn "wbinvd", define_insn "wbnoinvd"): New.
22082 * config/i386/i386.opt: Add -mpconfig and -mwbnoinvd.
22083 * config/i386/immintrin.h (_wbinvd): New intrinsic.
22084 * config/i386/pconfigintrin.h: New file.
22085 * config/i386/wbnoinvdintrin.h: Ditto.
22086 * config/i386/x86intrin.h: Add headers pconfigintrin.h and
22088 * doc/invoke.texi (-mpconfig, -mwbnoinvd): New.
22090 2018-03-05 Richard Biener <rguenther@suse.de>
22092 PR tree-optimization/84670
22093 * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
22095 (BB_VISITED_WITH_VISITED_SUCCS): New define.
22096 (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
22097 (compute_antic_aux): Only assert the number of values in ANTIC_IN
22098 doesn't grow if all successors (recursively) were visited at least
22101 2018-03-05 Richard Biener <rguenther@suse.de>
22103 PR tree-optimization/84650
22104 * tree-ssa-loop-im.c (pass_lim::execute): Reset the SCEV cache
22105 if executed in the loop pipeline.
22107 2018-03-05 Sandra Loosemore <sandra@codesourcery.com>
22109 * doc/configfiles.texi (Configuration Files): Move info about
22110 conditionalizing $target-protos.h to...
22111 * doc/sourcebuild.texi (Back End): Here. Explain how $target.h
22112 differs from $target-protos.h.
22114 2018-03-05 Kito Cheng <kito.cheng@gmail.com>
22115 Chung-Ju Wu <jasonwucj@gmail.com>
22117 * config/nds32/nds32-protos.h (nds32_expand_setmem): Declare.
22118 * config/nds32/nds32-multiple.md (setmemsi): Define.
22119 * config/nds32/nds32-memory-manipulation.c
22120 (nds32_gen_dup_4_byte_to_word_value): New.
22121 (emit_setmem_word_loop): New.
22122 (emit_setmem_byte_loop): New.
22123 (nds32_expand_setmem_loop): New.
22124 (nds32_expand_setmem_loop_v3m): New.
22125 (nds32_expand_setmem_unroll): New.
22126 (nds32_expand_setmem): New.
22128 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
22129 Chung-Ju Wu <jasonwucj@gmail.com>
22131 * config/nds32/nds32-memory-manipulation.c
22132 (nds32_emit_load_store): New.
22133 (nds32_emit_post_inc_load_store): New.
22134 (nds32_emit_mem_move): New.
22135 (nds32_emit_mem_move_block): New.
22136 (nds32_expand_movmemsi_loop_unknown_size): New.
22137 (nds32_expand_movmemsi_loop_known_size): New.
22138 (nds32_expand_movmemsi_loop): New.
22139 (nds32_expand_movmemsi_unroll): New.
22140 (nds32_expand_movmemqi): Rename ...
22141 (nds32_expand_movmemsi): ... to this.
22142 * config/nds32/nds32-multiple.md (movmemqi): Rename ...
22143 (movmemsi): ... to this.
22144 * config/nds32/nds32-protos.h (nds32_expand_movmemqi): Rename ...
22145 (nds32_expand_movmemsi): ... to this.
22147 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
22148 Monk Chiang <sh.chiang04@gmail.com>
22149 Chung-Ju Wu <jasonwucj@gmail.com>
22151 * config/nds32/nds32-protos.h
22152 (nds32_expand_load_multiple): New arguments.
22153 (nds32_expand_store_multiple): Ditto.
22154 (nds32_valid_multiple_load_store): Rename ...
22155 (nds32_valid_multiple_load_store_p): ... to this.
22156 * config/nds32/nds32-memory-manipulation.c
22157 (nds32_expand_load_multiple): Refine implementation.
22158 (nds32_expand_store_multiple): Ditto.
22159 * config/nds32/nds32-multiple.md
22160 (load_multiple): Update nds32_expand_load_multiple interface.
22161 (store_multiple): Update nds32_expand_store_multiple interface.
22162 * config/nds32/nds32-predicates.c
22163 (nds32_valid_multiple_load_store): Rename ...
22164 (nds32_valid_multiple_load_store_p): ... to this and refine
22166 * config/nds32/predicates.md
22167 (nds32_load_multiple_and_update_address_operation): New predicate.
22168 (nds32_store_multiple_and_update_address_operation): New predicate.
22170 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
22171 Chung-Ju Wu <jasonwucj@gmail.com>
22173 * config/nds32/nds32.md (type): Add load_multiple and store_multiple.
22174 (combo): New attribute.
22175 * config/nds32/nds32-multiple.md: Refine patterns with new attributes.
22177 2018-03-03 Chung-Ju Wu <jasonwucj@gmail.com>
22179 * config/nds32/nds32.opt: Change -mcmodel= default value.
22181 2018-03-03 Kito Cheng <kito.cheng@gmail.com>
22182 Monk Chiang <sh.chiang04@gmail.com>
22183 Chung-Ju Wu <jasonwucj@gmail.com>
22185 * config/nds32/constants.md (unspec_element): New enum.
22186 * config/nds32/constraints.md (Umw): New constraint.
22187 * config/nds32/nds32-intrinsic.c: Add more builtin functions.
22188 * config/nds32/nds32-intrinsic.md: Likewise.
22189 * config/nds32/nds32-md-auxiliary.c (nds32_regno_to_enable4): New.
22190 (nds32_valid_smw_lwm_base_p): New.
22191 (nds32_output_smw_single_word): New.
22192 (nds32_output_lmw_single_word): New.
22193 (nds32_expand_unaligned_load): New.
22194 (nds32_expand_unaligned_store): New.
22195 * config/nds32/nds32-protos.h (nds32_valid_smw_lwm_base_p): Declare.
22196 (nds32_output_smw_single_word): Declare.
22197 (nds32_output_lmw_single_word): Declare.
22198 (nds32_expand_unaligned_load): Declare.
22199 (nds32_expand_unaligned_store): Declare.
22200 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_UALOAD_HW,
22201 NDS32_BUILTIN_UALOAD_W, NDS32_BUILTIN_UALOAD_DW,
22202 NDS32_BUILTIN_UASTORE_HW, NDS32_BUILTIN_UASTORE_W,
22203 NDS32_BUILTIN_UASTORE_DW.
22204 * config/nds32/predicates.md (nds32_lmw_smw_base_operand): New
22207 2018-03-03 Monk Chiang <sh.chiang04@gmail.com>
22208 Kito Cheng <kito.cheng@gmail.com>
22209 Chung-Ju Wu <jasonwucj@gmail.com>
22211 * config/nds32/nds32-intrinsic.c
22212 (nds32_expand_builtin_null_ftype_reg): Delete.
22213 (nds32_expand_builtin_reg_ftype_imm): Ditto.
22214 (nds32_expand_builtin_null_ftype_reg_imm): Ditto.
22215 (nds32_read_argument): New.
22216 (nds32_legitimize_target): Ditto.
22217 (nds32_legitimize_argument): Ditto.
22218 (nds32_check_constant_argument): Ditto.
22219 (nds32_expand_unop_builtin): Ditto.
22220 (nds32_expand_unopimm_builtin): Ditto.
22221 (nds32_expand_binop_builtin): Ditto.
22222 (nds32_builtin_decl_impl): Ditto.
22223 (builtin_description): Ditto.
22224 (nds32_expand_builtin_impl): Rewrite with new infrastructure.
22225 (nds32_init_builtins_impl): Ditto.
22226 * config/nds32/nds32.c (TARGET_BUILTIN_DECL): Define.
22227 (nds32_builtin_decl): New.
22228 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_COUNT.
22229 * config/nds32/nds32-protos.h (nds32_builtin_decl_impl): Declare.
22231 2018-03-02 Jeff Law <law@redhat.com>
22233 * reorg.c (stop_search_p): Handle DEBUG_INSN.
22234 (redundant_insn, fill_simple_delay_slots): Likewise.
22235 (fill_slots_from_thread): Likewise.
22236 * resource.c (mark_referenced_resources): Likewise.
22237 (mark_set_resources, find_dead_or_set_registers): Likewise.
22239 2018-03-02 Jakub Jelinek <jakub@redhat.com>
22241 * substring-locations.h (format_warning_va): Formatting fix for
22242 ATTRIBUTE_GCC_DIAG.
22243 (format_warning_at_substring): Fix up ATTRIBUTE_GCC_DIAG second
22245 (format_warning_n_va, format_warning_at_substring_n): New prototypes.
22246 * substring-locations.c: Include intl.h.
22247 (format_warning_va): Turned into small wrapper around
22248 format_warning_n_va, renamed to ...
22249 (format_warning_n_va): ... this, add N and PLURAL_GMSGID arguments,
22250 rename GMSGID to SINGULAR_GMSGID, if SINGULAR_GMSGID != PLURAL_GMSGID,
22252 (format_warning_at_substring_n): New function.
22253 * gimple-ssa-sprintf.c: Remove GCC diagnostic ignored pragma.
22254 (fmtwarn): Add ATTRIBUTE_GCC_DIAG. Turn into a copy of
22255 format_warning_at_substring with just a shorter name instead of
22256 const function pointer.
22257 (fmtwarn_n): New function.
22258 (maybe_warn, format_directive, parse_directive): Use fmtwarn_n where
22259 appropriate, get rid of all the fmtstr temporaries, move conditionals
22260 with G_() wrapped string literals directly into fmtwarn arguments,
22261 cast dir.len to (int), formatting fixes.
22263 2018-03-02 Thomas Schwinge <thomas@codesourcery.com>
22265 * doc/invoke.texi: Remove "Cilk Plus" references.
22267 2018-03-02 Jakub Jelinek <jakub@redhat.com>
22268 Richard Biener <rguenther@suse.de>
22271 * expr.c (expand_expr_real_1) <case CALL_EXPR>: Don't emit diagnostics
22272 for error or warning attributes if CALL_FROM_THUNK_P is set.
22275 2018-03-02 Jakub Jelinek <jakub@redhat.com>
22278 * config/pa/pa.h (TARGET_CPU_CPP_BUILTINS): Predefine
22279 __SIZEOF_128__ macro if HPUX_LONG_DOUBLE_LIBRARY.
22282 * config/ia64/ia64.h (TARGET_CPU_CPP_BUILTINS): Predefine
22283 __SIZEOF_{FPREG,FLOAT{80,128}}__ macros.
22285 * predict.c (test_prediction_value_range): Use PROB_UNINITIALIZED
22286 instead of -1U in last predictors element's probability member.
22288 2018-03-02 Eric Botcazou <ebotcazou@adacore.com>
22291 * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
22292 arguments if they are comparable.
22294 2018-03-02 Richard Sandiford <richard.sandiford@linaro.org>
22296 PR tree-optimization/84634
22297 * tree-vect-stmts.c (vectorizable_store, vectorizable_load): Replace
22298 masks and masked_loop_p with a single loop_masks, making sure it's
22299 null for bb vectorization.
22301 2018-03-02 Richard Sandiford <richard.sandiford@linaro.org>
22303 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
22304 (vect_analyze_data_ref_access): Use loop->safe_len rather than
22305 loop->force_vectorize to check whether there is no alias.
22307 2018-03-02 Jakub Jelinek <jakub@redhat.com>
22310 * rtl.h (prev_real_nondebug_insn, next_real_nondebug_insn): New
22312 * emit-rtl.c (next_real_insn, prev_real_insn): Fix up function
22314 (next_real_nondebug_insn, prev_real_nondebug_insn): New functions.
22315 * cfgcleanup.c (try_head_merge_bb): Use prev_real_nondebug_insn
22316 instead of a loop around prev_real_insn.
22317 * combine.c (move_deaths): Use prev_real_nondebug_insn instead of
22320 PR inline-asm/84625
22321 * config/i386/i386.c (ix86_print_operand): Use conditional
22322 output_operand_lossage instead of gcc_assert if CONST_VECTOR is not
22325 2018-03-02 Richard Biener <rguenther@suse.de>
22327 PR tree-optimization/84427
22328 * tree-ssa-pre.c (bitmap_remove_expr_from_set): Remove.
22329 (bitmap_set_subtract_values): Rewrite to handle multiple
22332 (prune_clobbered_mems): Likewise.
22333 (phi_translate): Take edge instead of pred/phiblock.
22334 (phi_translate_1): Likewise.
22335 (phi_translate_set): Likewise. Insert all translated
22336 exprs for a value into the set, keeping possibly multiple
22337 expressions per value.
22338 (compute_antic_aux): Adjust for phi_translate changes.
22339 When intersecting union the expressions and prune those
22340 not in the final value set, keeping possibly multiple
22341 expressions per value. Do not use value-insertion
22342 for unioning ANTIC_OUT U EXP_GEN - TMP_GEN but merge
22343 all expressions. Add verification that the value-sets
22344 only shrink during iteration.
22345 (compute_partial_antic_aux): Adjust for the phi_translate changes.
22346 (do_pre_regular_insertion): Likewise.
22347 (do_pre_partial_partial_insertion): Likewise.
22349 2018-03-02 Richard Biener <rguenther@suse.de>
22352 * config/darwin.c (saved_debug_info_level): New static global.
22353 (darwin_asm_lto_start): Disable debug info generation for LTO out.
22354 (darwin_asm_lto_end): Restore debug info generation settings.
22356 2018-03-01 Martin Liska <mliska@suse.cz>
22359 * sanopt.c (sanitize_rewrite_addressable_params): Do not handle
22360 volatile arguments.
22362 2018-03-01 Richard Biener <rguenther@suse.de>
22365 * dwarf2out.c (gen_variable_die): Properly handle late VLA
22366 type annotation with LTO when debug was disabled at compile-time.
22368 2018-03-01 Matthew Fortune <mfortune@gmail.com>
22370 * config/mips/mips.c (mips_final_prescan_insn): Fix incorrect
22372 (mips_final_postscan_insn): Likewise.
22374 2018-03-01 Richard Sandiford <richard.sandiford@linaro.org>
22376 PR rtl-optimization/84528
22377 * alias.c (init_alias_target): Add commentary.
22378 (init_alias_analysis): Only give HARD_FRAME_POINTER_REGNUM
22379 a unique base value if the frame pointer is not eliminated
22380 to the stack pointer.
22382 2018-03-01 Tom de Vries <tom@codesourcery.com>
22384 PR rtl-optimization/83327
22385 * lra-int.h (hard_regs_spilled_into): Declare.
22386 * lra.c (hard_regs_spilled_into): Define.
22387 (init_reg_info): Init hard_regs_spilled_into.
22388 * lra-spills.c (assign_spill_hard_regs): Update hard_regs_spilled_into.
22389 * lra-lives.c (make_hard_regno_born, make_hard_regno_dead)
22390 (process_bb_lives): Handle hard_regs_spilled_into.
22391 (lra_create_live_ranges_1): Before doing liveness propagation, clear
22392 regs in all_hard_regs_bitmap if set in hard_regs_spilled_into.
22394 2018-02-28 David Edelsohn <dje.gcc@gmail.com>
22396 * config.gcc (powerpc-ibm-aix7.1.*): New stanza.
22397 (powerpc-ibm-aix[789]*): Default to AIX 7.2.
22398 * config/rs6000/aix71.h (TARGET_DEFAULT): Revert to Power4 ISA.
22399 * config/rs6000/aix72.h: New file.
22401 2018-02-28 Jakub Jelinek <jakub@redhat.com>
22403 * gimple-ssa-warn-restrict.c (maybe_diag_overlap): Use warning_n
22404 instead of warning_at with conditional singular and plural messages
22408 * stor-layout.c (update_alignment_for_field): For
22409 targetm.ms_bitfield_layout_p (rli->t), if !is_bitfield
22410 && !DECL_PACKED (field), do the alignment update, just use
22411 only desired_align instead of MAX (type_align, desired_align)
22413 (place_field): Don't do known_align < desired_align handling
22414 early if targetm.ms_bitfield_layout_p (rli->t) and rli->prev_field
22415 is non-NULL, instead do it after rli->prev_field handling and
22416 only if not within a bitfield word. For DECL_PACKED (field)
22417 use type_align of BITS_PER_UNIT.
22419 2018-02-28 Eric Botcazou <ebotcazou@adacore.com>
22421 * config/aarch64/aarch64.c (aarch64_emit_probe_stack_range): Remove
22422 superfluous parentheses and trailing spaces.
22424 2018-02-28 Richard Biener <rguenther@suse.de>
22426 PR tree-optimization/84584
22427 * graphite-scop-detection.c (scop_detection::add_scop): Discard
22428 SCoPs with fake exit edge.
22430 2018-02-28 Martin Liska <mliska@suse.cz>
22433 * timevar.c (timer::print): Fix format to properly print 100%
22436 2018-02-28 Richard Biener <rguenther@suse.de>
22438 PR middle-end/84607
22439 * genmatch.c (capture_info::walk_match): Do not mark
22440 captured expressions without operands as expr_p given
22441 they act more like predicates and should be subject to
22442 "lost tail" side-effect preserving.
22444 2018-02-28 Alexandre Oliva <aoliva@redhat.com>
22446 PR rtl-optimization/81611
22447 * auto-inc-dec.c (attempt_change): Move dead note from
22448 mem_insn if it's the next use of regno
22449 (find_address): Take address use of reg holding
22450 non-incremented value. Add parm to limit search to the named
22452 (merge_in_block): Attempt to use a mem insn that is the next
22453 use of the original regno.
22455 2018-02-27 Martin Sebor <msebor@redhat.com>
22458 * doc/invoke.texi (-Wmissing-attributes): New option.
22459 * print-tree.c (print_node): Handle DECL_UNINLINABLE.
22461 2018-02-27 Martin Sebor <msebor@redhat.com>
22463 PR translation/84207
22464 * diagnostic-core.h (warning_n, error_n, inform_n): Change
22465 n argument to unsigned HOST_WIDE_INT.
22466 * diagnostic.c (warning_n, error_n, inform_n): Ditto.
22467 (diagnostic_n_impl): Ditto. Handle arguments in excess of LONG_MAX.
22468 * gimple-ssa-sprintf.c (format_directive): Simplify inform_n call.
22469 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Use warning_n.
22471 2018-02-27 Richard Biener <rguenther@suse.de>
22473 PR tree-optimization/84512
22474 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost):
22475 Do not use the estimate returned from record_stmt_cost for
22476 the scalar iteration cost but sum properly using add_stmt_cost.
22478 2018-02-27 Richard Biener <rguenther@suse.de>
22480 PR tree-optimization/84466
22481 * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
22482 Adjust last change to less strictly validate use operands.
22484 2018-02-27 Martin Liska <mliska@suse.cz>
22486 PR gcov-profile/84548
22487 * gcov.c (process_file): Allow partial overlap and consider it
22488 also as group functions.
22489 (output_lines): Properly calculate range of lines for a group.
22491 2018-02-27 Martin Liska <mliska@suse.cz>
22493 * timevar.c (timer::print_row): Remove 'usr', 'sys', 'wall' and
22494 'ggc' suffixes. Change first column width.
22495 (timer::print): Fix formatting of the column.
22497 2018-02-27 Alexandre Oliva <aoliva@redhat.com>
22499 * tree-ssa-live.c (remove_unused_scope_block_p): Do not
22500 preserve inline entry blocks for the sake of debug inline
22501 entry point markers alone.
22502 (remove_unused_locals): Suggest in comments a better place to
22503 force the preservation of inline entry blocks that are
22504 otherwise unused, but do not preserve them.
22506 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
22508 * config/i386/i386.c (ix86_output_indirect_jmp): Update comments.
22510 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
22513 * config/i386/constraints.md (Bs): Replace
22514 ix86_indirect_branch_register with
22515 TARGET_INDIRECT_BRANCH_REGISTER.
22517 * config/i386/i386.md (indirect_jump): Likewise.
22518 (tablejump): Likewise.
22519 (*sibcall_memory): Likewise.
22520 (*sibcall_value_memory): Likewise.
22521 Peepholes of indirect call and jump via memory: Likewise.
22522 (*sibcall_GOT_32): Disallowed for TARGET_INDIRECT_BRANCH_REGISTER.
22523 (*sibcall_value_GOT_32): Likewise.
22524 * config/i386/predicates.md (indirect_branch_operand): Likewise.
22525 (GOT_memory_operand): Likewise.
22526 (call_insn_operand): Likewise.
22527 (sibcall_insn_operand): Likewise.
22528 (GOT32_symbol_operand): Likewise.
22529 * config/i386/i386.h (TARGET_INDIRECT_BRANCH_REGISTER): New.
22531 2018-02-26 Eric Botcazou <ebotcazou@adacore.com>
22533 PR rtl-optimization/83496
22534 * reorg.c (steal_delay_list_from_target): Change REDUNDANT array from
22535 booleans to RTXes. Call fix_reg_dead_note on every non-null element.
22536 (steal_delay_list_from_fallthrough): Call fix_reg_dead_note on a
22537 redundant insn, if any.
22538 (relax_delay_slots): Likewise.
22539 (update_reg_unused_notes): Rename REDUNDANT_INSN to OTHER_INSN.
22541 2018-02-26 Richard Sandiford <richard.sandiford@linaro.org>
22543 PR tree-optimization/83965
22544 * tree-vect-patterns.c (vect_reassociating_reduction_p): Assume
22545 that grouped statements are part of a reduction chain. Return
22546 true if the statement is not marked as a reduction itself but
22547 is part of a group.
22548 (vect_recog_dot_prod_pattern): Don't check whether the statement
22549 is part of a group here.
22550 (vect_recog_sad_pattern): Likewise.
22551 (vect_recog_widen_sum_pattern): Likewise.
22553 2018-02-26 Eric Botcazou <ebotcazou@adacore.com>
22556 * final.c (rest_of_clean_state): Also look for calls inside sequences.
22558 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
22561 * config/i386/i386-protos.h (ix86_output_indirect_jmp): Remove
22563 (ix86_output_indirect_function_return): New prototype.
22564 (ix86_split_simple_return_pop_internal): Likewise.
22565 * config/i386/i386.c (indirect_return_via_cx): New.
22566 (indirect_return_via_cx_bnd): Likewise.
22567 (indirect_thunk_name): Handle return va CX_REG.
22568 (output_indirect_thunk_function): Create alias for
22569 __x86_return_thunk_[re]cx and __x86_return_thunk_[re]cx_bnd.
22570 (ix86_output_indirect_jmp): Remove the bool argument.
22571 (ix86_output_indirect_function_return): New function.
22572 (ix86_split_simple_return_pop_internal): Likewise.
22573 * config/i386/i386.md (*indirect_jump): Don't pass false
22574 to ix86_output_indirect_jmp.
22575 (*tablejump_1): Likewise.
22576 (simple_return_pop_internal): Change it to define_insn_and_split.
22577 Call ix86_split_simple_return_pop_internal to split it for
22578 -mfunction-return=.
22579 (simple_return_indirect_internal): Call
22580 ix86_output_indirect_function_return instead of
22581 ix86_output_indirect_jmp.
22583 2018-02-26 Jakub Jelinek <jakub@redhat.com>
22586 * vec.h (vec_default_construct): For BROKEN_VALUE_INITIALIZATION use
22587 memset and value initialization afterwards.
22589 2018-02-26 Christophe Lyon <christophe.lyon@linaro.org>
22591 * Makefile.in (lto-wrapper): Use ALL_LINKERFLAGS.
22593 2018-02-26 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
22596 * common/config/aarch64/aarch64-common.c
22597 (aarch_option_optimization_table[]): Switch
22598 off fomit-frame-pointer
22600 2018-02-26 Kito Cheng <kito.cheng@gmail.com>
22601 Chung-Ju Wu <jasonwucj@gmail.com>
22603 * config/nds32/nds32-multiple.md (load_multiple): Disallow
22605 (store_multiple): Ditto.
22607 2018-02-26 Kito Cheng <kito.cheng@gmail.com>
22609 * config.gcc: Add --with-cpu support for nds32 target.
22610 * config/nds32/nds32-opts.h (nds32_cpu_type): New.
22611 * config/nds32/nds32.opt: Add -mcpu= option.
22613 2018-02-25 Segher Boessenkool <segher@kernel.crashing.org>
22615 * config/rs6000/rs6000.opt (mvrsave=no, mvrsave=yes, isel=no,
22616 isel=yes): Warn for these deprecated options.
22618 2018-02-23 David Edelsohn <dje.gcc@gmail.com>
22620 * config/rs6000/aix71.h (TARGET_DEFAULT): Change to
22621 ISA_2_5_MASKS_EMBEDDED.
22623 2018-02-23 Jakub Jelinek <jakub@redhat.com>
22625 * ipa-prop.c (ipa_vr_ggc_hash_traits::hash): Hash p->min and
22626 p->max as pointers rather than using iterative_hash_expr.
22628 2018-02-23 Carl Love <cel@us.ibm.com>
22630 * config/rs6000/rs6000-builtin.def: Change VSIGNED2 and VUNSIGNED2
22631 macro expansions from BU_VSX_2 to BU_P8V_VSX_2 and BU_VSX_OVERLOAD_2 to
22633 * config/rs6000/rs6000-c.c: Change VSX_BUILTIN_VEC_VSIGNED2 to
22634 P8V_BUILTIN_VEC_VSIGNED2. Change VSX_BUILTIN_VEC_VUNSIGNED2 to
22635 P8V_BUILTIN_VEC_VUNSIGNED2.
22637 2018-02-22 Vladimir Makarov <vmakarov@redhat.com>
22640 * lra-int.h (LRA_UNKNOWN_ALT, LRA_NON_CLOBBERED_ALT): New macros.
22641 * lra.c (lra_set_insn_recog_data, lra_update_insn_recog_data): Use
22643 * lra-constraints.c (curr_insn_transform): Set up
22644 LRA_NON_CLOBBERED_ALT for moves processed on the fast path. Use
22646 (remove_inheritance_pseudos): Use LRA_UNKNOWN_ALT.
22647 * lra-eliminations.c (spill_pseudos): Ditto.
22648 (process_insn_for_elimination): Ditto.
22649 * lra-lives.c (reg_early_clobber_p): Use the new macros.
22650 * lra-spills.c (spill_pseudos): Use LRA_UNKNOWN_ALT and
22651 LRA_NON_CLOBBERED_ALT.
22653 2018-02-22 Martin Sebor <msebor@redhat.com>
22655 PR tree-optimization/84480
22656 * gimple-fold.c (gimple_fold_builtin_strcpy): Move warnings
22657 to maybe_diag_stxncpy_trunc. Call it.
22658 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Integrate warnings
22659 from gimple_fold_builtin_strcpy. Print inlining stack.
22660 (handle_builtin_stxncpy): Print inlining stack.
22661 * tree-ssa-strlen.h (maybe_diag_stxncpy_trunc): Declare.
22663 2018-02-22 H.J. Lu <hongjiu.lu@intel.com>
22666 * config/i386/i386.c (ix86_set_indirect_branch_type): Issue an
22667 error when -mindirect-branch=thunk-extern, -fcf-protection=branch
22668 and -fcheck-pointer-bounds are used together.
22669 (indirect_thunk_prefix): New enum.
22670 (indirect_thunk_need_prefix): New function.
22671 (indirect_thunk_name): Replace need_bnd_p with need_prefix. Use
22672 "_nt" instead of "_bnd" for NOTRACK prefix.
22673 (output_indirect_thunk): Replace need_bnd_p with need_prefix.
22674 (output_indirect_thunk_function): Likewise.
22676 (ix86_code_end): Update output_indirect_thunk_function calls.
22677 (ix86_output_indirect_branch_via_reg): Replace
22678 ix86_bnd_prefixed_insn_p with indirect_thunk_need_prefix.
22679 (ix86_output_indirect_branch_via_push): Likewise.
22680 (ix86_output_function_return): Likewise.
22681 * doc/invoke.texi: Document -mindirect-branch=thunk-extern is
22682 incompatible with -fcf-protection=branch and
22683 -fcheck-pointer-bounds.
22685 2018-02-22 Steve Ellcey <sellcey@cavium.com>
22688 * config/aarch64/aarch64.c (aarch64_print_address_internal):
22689 Change gcc_assert call to output_operand_lossage.
22691 2018-02-22 Steve Ellcey <sellcey@cavium.com>
22693 * doc/extend.texi (__builtin_extend_pointer): Document builtin.
22695 2018-02-22 DJ Delorie <dj@redhat.com>
22696 Sebastian Perta <sebastian.perta@renesas.com>
22697 Oleg Endo <olegendo@gcc.gnu.org>
22699 * config/rx/rx.c (rx_rtx_costs): New function.
22700 (TARGET_RTX_COSTS): Override to use rx_rtx_costs.
22702 2018-02-22 Thomas Preud'homme <thomas.preudhomme@arm.com>
22704 * config/arm/t-multilib: Map Armv8-R to Armv7 multilibs.
22706 2018-02-22 Martin Liska <mliska@suse.cz>
22709 * common/config/arm/arm-common.c (arm_print_hint_for_cpu_option):
22710 Add "native" as a possible value.
22712 2018-02-22 Martin Liska <mliska@suse.cz>
22715 * config/i386/i386.c (ix86_option_override_internal):
22716 Add "native" as a possible value for -march and -mtune.
22718 2018-02-22 Jakub Jelinek <jakub@redhat.com>
22721 * stor-layout.c (finalize_type_size): Propagate TYPE_EMPTY_P flag
22722 to all type variants.
22724 PR tree-optimization/84503
22725 * gimple-ssa-store-merging.c (merged_store_group::merge_into): Compute
22726 width as info->bitpos + info->bitsize - start.
22727 (merged_store_group::merge_overlapping): Simplify width computation.
22728 (check_no_overlap): New function.
22729 (imm_store_chain_info::try_coalesce_bswap): Compute expected
22730 start + width and last_order of the group, fail if check_no_overlap
22732 (imm_store_chain_info::coalesce_immediate_stores): Don't merge info
22733 to group if check_no_overlap fails.
22735 2018-02-21 Segher Boessenkool <segher@kernel.crashing.org>
22737 * config/rs6000/altivec.md: Delete contraint arguments to
22738 define_expand, define_split, and define_peephole2, and in
22739 define_insn_and_split if always unused.
22740 * config/rs6000/darwin.md: Ditto.
22741 * config/rs6000/dfp.md: Ditto.
22742 * config/rs6000/rs6000.md: Ditto.
22743 * config/rs6000/sync.md: Ditto.
22744 * config/rs6000/vector.md: Ditto.
22745 * config/rs6000/vsx.md: Ditto.
22747 2018-02-21 Segher Boessenkool <segher@kernel.crashing.org>
22749 * config/rs6000/altivec.md: Write output control strings as braced
22750 blocks instead of double-quoted strings.
22751 * config/rs6000/darwin.md: Ditto.
22752 * config/rs6000/rs6000.md: Ditto.
22753 * config/rs6000/vector.md: Ditto.
22754 * config/rs6000/vsx.md: Ditto.
22756 2018-02-21 Jason Merrill <jason@redhat.com>
22758 PR c++/84314 - ICE with templates and fastcall attribute.
22759 * attribs.c (build_type_attribute_qual_variant): Remove assert.
22761 2018-02-21 Jan Hubicka <hubicka@ucw.cz>
22763 * ipa-cp.c (determine_versionability): Fix comment typos.
22765 2018-02-21 Jan Hubicka <hubicka@ucw.cz>
22768 * ipa-cp.c (determine_versionability): Do not version functions caling
22771 2018-02-21 Martin Liska <mliska@suse.cz>
22774 * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch):
22775 Add "native" as a possible value.
22776 * config/aarch64/aarch64.h (HAVE_LOCAL_CPU_DETECT): Define
22777 the macro when native cpu detection is available.
22779 2018-02-21 Martin Liska <mliska@suse.cz>
22782 * common/config/arm/arm-common.c (arm_print_hint_for_arch_option):
22783 Add "native" as a possible value.
22784 * config/arm/arm.h (HAVE_LOCAL_CPU_DETECT): Define the macro
22785 when native cpu detection is available.
22787 2018-02-21 Jakub Jelinek <jakub@redhat.com>
22788 Martin Sebor <msebor@redhat.com>
22790 PR tree-optimization/84478
22791 * gimple-fold.h (get_range_strlen): Add a bool argument defaulted to
22793 * gimple-fold.c (get_range_strlen): Make minlen const and assume it
22794 can't be NULL. Change FUZZY from bool to int, for 1 add PHI/COND_EXPR
22795 support which is conservatively correct, for 2 only stay conservative
22796 for maxlen. Formatting and comment capitalization fixes. Add STRICT
22797 argument to the 2 argument get_range_strlen, adjust 6 arg
22798 get_range_strlen caller and clear minmaxlen[0] and [1] if it returned
22800 (get_maxval_strlen): Adjust 6 arg get_range_strlen caller.
22801 (gimple_fold_builtin_strlen): Pass true as last argument to
22804 2018-02-20 Martin Sebor <msebor@redhat.com>
22806 PR middle-end/84095
22807 * gimple-ssa-warn-restrict.c (builtin_memref::extend_offset_range): New.
22808 (builtin_memref::set_base_and_offset): Same. Handle inner references.
22809 (builtin_memref::builtin_memref): Factor out parts into
22810 set_base_and_offset and call it.
22812 2018-02-20 Richard Sandiford <richard.sandiford@linaro.org>
22814 PR middle-end/84406
22815 * optabs-query.c (find_widening_optab_handler_and_mode): If from_mode
22816 is a scalar_int_mode, assert that to_mode is a scalar_int_mode with
22817 greater precision. If to_mode is a MODE_PARTIAL_INT, stop the
22818 search at the associated MODE_INT.
22820 2018-02-20 Jeff Law <law@redhat.com>
22822 PR middle-end/82123
22823 PR tree-optimization/81592
22824 PR middle-end/79257
22825 * gimple-ssa-sprintf.c (format_integer): Query EVRP range analyzer
22826 for range data rather than using global data.
22827 * gimple-ssa-sprintf.c (get_int_range): Query EVRP range analyzer for
22828 range data rather than using global data.
22829 * gimple-ssa-sprintf.c (get_int_range): Accept vr_values parameter
22830 pass it to children as needed.
22831 (struct directive::fmtresult): Similarly.
22832 (struct directive::set_width): Similarly.
22833 (struct directive::set_precision): Similarly.
22834 (format_integer, format_directive, parse_directive): Similarly.
22835 (format_none): Accept unnamed vr_values parameter.
22836 (format_percent, format_floating, format_character): Similarly.
22837 (format_string, format_plain): Similarly.
22838 * gimple-ssa-sprintf.c (sprintf_dom_walker::handle_gimple_call): Query
22839 the EVRP range analyzer for range data rather than using global data.
22840 * gimple-ssa-sprintf.c: Include alloc-pool.h, vr-values.h and
22841 gimple-ssa-evrp-analyze.h
22842 (class sprintf_dom_walker): Add after_dom_children member function.
22843 Add evrp_range_analyzer member.
22844 (sprintf_dom_walker::before_dom_children): Call into the EVRP
22845 range analyzer as needed.
22846 (sprintf_dom_walker::after_dom_children): New member function.
22847 * gimple-ssa-evrp-analyze.c (evrp_range_analyzer::enter): Do nothing
22849 (evrp_range_analyzer::record_ranges_from_stmt): Likewise.
22850 (evrp_range_analyzer::pop_to_marker): Likewise.
22852 2018-02-20 Richard Sandiford <richard.sandiford@linaro.org>
22854 PR tree-optimization/84419
22855 * internal-fn.c (expand_call_mem_ref): Create a TARGET_MEM_REF
22856 with the required type if its current type is compatible but
22859 2018-02-20 Jakub Jelinek <jakub@redhat.com>
22861 PR middle-end/82004
22862 * match.pd (pow(C,x) -> exp(log(C)*x)): Delay all folding until
22863 after vectorization.
22865 2018-02-20 Martin Liska <mliska@suse.cz>
22868 * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch): Print
22869 possible values if we don't have a hint.
22871 2018-02-20 Martin Liska <mliska@suse.cz>
22875 * final.c (shorten_branches): Build align_tab array with one
22877 * opts.c (finish_options): Add alignment option limit check.
22878 (MAX_CODE_ALIGN): Likewise.
22879 (MAX_CODE_ALIGN_VALUE): Likewise.
22880 * doc/invoke.texi: Document maximum allowed option value for
22881 all -falign-* options.
22883 2018-02-19 Jakub Jelinek <jakub@redhat.com>
22886 * reg-notes.def (REG_CALL_ARG_LOCATION): New reg note.
22887 * insn-notes.def (NOTE_INSN_CALL_ARG_LOCATION): Remove.
22888 * var-tracking.c (emit_note_insn_var_location): Remove all references
22889 to NOTE_INSN_CALL_ARG_LOCATION.
22890 (emit_notes_in_bb): Emit arguments as REG_CALL_ARG_LOCATION note on
22891 the CALL_INSN rather than separate NOTE_INSN_CALL_ARG_LOCATION note.
22892 Use copy_rtx_if_shared.
22893 * dwarf2out.c (gen_subprogram_die): Use XEXP with 0 instead of
22894 NOTE_VAR_LOCATION on ca_loc->call_arg_loc_note.
22895 (dwarf2out_var_location): Remove handling of
22896 NOTE_INSN_CALL_ARG_LOCATION, instead handle REG_CALL_ARG_LOCATION note
22898 * final.c (final_scan_insn): Remove all references to
22899 NOTE_INSN_CALL_ARG_LOCATION.
22900 (rest_of_clean_state): Likewise. Remove REG_CALL_ARG_LOCATION notes
22901 before dumping final insns.
22902 * except.c (emit_note_eh_region_end): Remove all references to
22903 NOTE_INSN_CALL_ARG_LOCATION.
22904 * config/alpha/alpha.c (alpha_pad_function_end): Likewise.
22905 * config/c6x/c6x.c (c6x_gen_bundles): Likewise.
22906 * config/arc/arc.c (hwloop_optimize): Likewise.
22907 * config/arm/arm.c (create_fix_barrier): Likewise.
22908 * config/s390/s390.c (s390_chunkify_start): Likewise.
22909 * config/sh/sh.c (find_barrier): Likewise.
22910 * config/i386/i386.c (rest_of_insert_endbranch,
22911 ix86_seh_fixup_eh_fallthru): Likewise.
22912 * config/xtensa/xtensa.c (hwloop_optimize): Likewise.
22913 * config/iq2000/iq2000.c (final_prescan_insn): Likewise.
22914 * config/frv/frv.c (frv_function_prologue): Likewise.
22915 * emit-rtl.c (try_split): Likewise. Copy over REG_CALL_ARG_LOCATION
22917 (note_outside_basic_block_p): Remove all references to
22918 NOTE_INSN_CALL_ARG_LOCATION.
22919 * gengtype.c (adjust_field_rtx_def): Likewise.
22920 * print-rtl.c (rtx_writer::print_rtx_operand_code_0, print_insn):
22922 * jump.c (cleanup_barriers, delete_related_insns): Likewise.
22923 * cfgrtl.c (force_nonfallthru_and_redirect): Likewise.
22926 * builtins.c (builtin_mathfn_code): Don't check if CALL_EXPR_FN (t)
22929 PR tree-optimization/84452
22930 * tree-vect-patterns.c (vect_recog_pow_pattern): Don't call
22931 expand_simd_clones if targetm.simd_clone.compute_vecsize_and_simdlen
22934 2018-02-19 Martin Liska <mliska@suse.cz>
22937 * passes.def: Put pass_sancov_O0 before pass_lower_switch with -O0.
22939 2018-02-19 Martin Liska <mliska@suse.cz>
22940 Richard Sandiford <richard.sandiford@linaro.org>
22942 PR tree-optimization/82491
22943 * gimple-fold.c (get_base_constructor): Make earlier bail out
22946 2018-02-19 Carl Love <cel@us.ibm.com>
22948 * config/rs6000/rs6000-builtin.def: Change NEG macro expansions from
22949 BU_ALTIVEC_A to BU_P8V_AV_1 and BU_ALTIVEC_OVERLOAD_1 to
22951 * config/rs6000/rs6000-c.c: Change ALTIVEC_BUILTIN_VEC_NEG to
22952 P8V_BUILTIN_VEC_NEG.
22954 2018-02-19 Sebastian Perta <sebastian.perta@renesas.com>
22956 * config/rl78/rl78.md (movdf): New define expand.
22958 2018-02-19 Martin Liska <mliska@suse.cz>
22961 * doc/invoke.texi: Fix typo.
22962 * params.def (PARAM_MAX_LOOP_HEADER_INSNS): Likewise.
22964 2018-02-18 Segher Boessenkool <segher@kernel.crashing.org>
22966 * config/rs6000/rs6000.c (rs6000_option_override_internal): Don't
22967 handle rs6000_single_float and rs6000_double_float specially for
22970 2018-02-16 Jeff Law <law@redhat.com>
22972 * config/rx/rx.c (add_pop_cfi_notes): New function.;
22973 (pop_regs): Use it.
22975 2018-02-16 Jakub Jelinek <jakub@redhat.com>
22978 * ipa-inline.c (inline_small_functions): Fix a typo.
22980 2018-02-16 Nathan Sidwell <nathan@acm.org>
22982 * doc/extend.texi (Backwards Compatibility): Americanize 'behaviour'.
22984 2018-02-16 Carl Love <cel@us.ibm.com>
22986 * config/rs6000/rs6000-builtin.def: Add BU_P8V_VSX_2 macro definition.
22987 Change FLOAT2 expansions from BU_VSX_2 to BU_P8V_VSX_2 and
22988 from BU_VSX_OVERLOAD_2 to BU_P8V_OVERLOAD_2.
22989 * config/rs6000/rs6000-c.c: Changed macro VSX_BUILTIN_VEC_FLOAT2
22990 expansion to P8V_BUILTIN_VEC_FLOAT2.
22992 2018-02-16 Vladimir Makarov <vmakarov@redhat.com>
22994 PR rtl-optimization/70023
22995 * lra-constraints.c (inherit_in_ebb): Take hard reg mode of
22996 src_regno into account.
22998 2018-02-16 Carl Love <cel@us.ibm.com>
23000 * config/rs6000/altivec.h: Remove vec_vextract4b and vec_vinsert4b.
23001 * config/rs6000/rs6000-builtin.def: Remove macro expansion for
23002 VEXTRACT4B, VINSERT4B, VINSERT4B_DI and VEXTRACT4B.
23003 * config/rs6000/rs6000.c: Remove case statements for
23004 P9V_BUILTIN_VEXTRACT4B, P9V_BUILTIN_VEC_VEXTRACT4B,
23005 P9V_BUILTIN_VINSERT4B, P9V_BUILTIN_VINSERT4B_DI,
23006 and P9V_BUILTIN_VEC_VINSERT4B.
23007 * config/rs6000/rs6000-c.c (altivec_expand_builtin): Remove entries for
23008 P9V_BUILTIN_VEC_VEXTRACT4B and P9V_BUILTIN_VEC_VINSERT4B.
23009 * config/rs6000/vsx.md:
23010 * doc/extend.texi: Remove vec_vextract4b, non ABI definitions for
23013 2018-02-16 Carl Love <cel@us.ibm.com>
23015 * config/rs6000/altivec.h: Add builtin names vec_extract4b
23017 * config/rs6000/rs6000-builtin.def: Add INSERT4B and EXTRACT4B
23019 * config/rs6000/rs6000-c.c: Add the definitions for
23020 P9V_BUILTIN_VEC_EXTRACT4B and P9V_BUILTIN_VEC_INSERT4B.
23021 * config/rs6000/rs6000.c (altivec_expand_builtin): Add
23022 P9V_BUILTIN_EXTRACT4B and P9V_BUILTIN_INSERT4B case statements.
23023 * config/rs6000/vsx.md: Add define_insn extract4b. Add define_expand
23024 definition for insert4b and define insn *insert3b_internal.
23025 * doc/extend.texi: Add documentation for vec_extract4b.
23027 2018-02-16 Nathan Sidwell <nathan@acm.org>
23029 * doc/extend.texi (Backwards Compatibility): Mention friend
23030 injection. Note for-scope is deprecated.
23031 * doc/invoke.texi (-ffriend-injection): Deprecate.
23033 2018-02-16 Segher Boessenkool <segher@kernel.crashing.org>
23035 * combine.c (try_combine): When adjusting LOG_LINKS for the destination
23036 that moved to I2, also allow destinations that are a paradoxical
23037 subreg (instead of a normal reg).
23039 2018-02-16 Oleg Endo <olegendo@gcc.gnu.org>
23042 * config/rx/rx.c (rx_fuse_in_memory_bitop): Convert shift operand
23045 2018-02-16 Richard Biener <rguenther@suse.de>
23047 PR tree-optimization/84037
23048 PR tree-optimization/84016
23050 * config/i386/i386.c (ix86_builtin_vectorization_cost):
23051 Adjust vec_construct for the fact we need additional higher latency
23052 128bit inserts for AVX256 and AVX512 vector builds.
23053 (ix86_add_stmt_cost): Scale vector construction cost for
23056 2018-02-16 Richard Biener <rguenther@suse.de>
23058 PR tree-optimization/84417
23059 * tree-ssa.c (non_rewritable_mem_ref_base): Properly constrain
23060 the MEM_REF offset when conversion to BIT_FIELD_REF is desired.
23061 (non_rewritable_lvalue_p): Likewise, use poly-ints.
23063 2018-02-16 Martin Liska <mliska@suse.cz>
23066 * internal-fn.def (ASAN_CHECK): Set proper flags.
23067 (ASAN_MARK): Likewise.
23069 2018-02-16 Julia Koval <julia.koval@intel.com>
23071 * config/i386/i386.c (ix86_option_override_internal): Remove PTA_CLWB
23072 from PTA_CANNONLAKE.
23074 2018-02-16 Jakub Jelinek <jakub@redhat.com>
23077 * config/aarch64/cortex-a57-fma-steering.c (fma_forest::merge_forest):
23078 Use ++iter rather than iter++ for std::list iterators.
23079 (func_fma_steering::dfs): Likewise. Don't delete nodes right away,
23080 defer deleting them until all nodes in the forest are processed. Do
23081 free even leaf nodes. Change to_process into auto_vec.
23084 * system.h (BROKEN_VALUE_INITIALIZATION): Define for GCC < 4.3.
23085 * vec.h (vec_default_construct): Use memset instead of placement new
23086 if BROKEN_VALUE_INITIALIZATION is defined.
23087 * hash-table.h (hash_table<Descriptor, Allocator>::empty_slow): Use
23088 memset instead of value initialization if BROKEN_VALUE_INITIALIZATION
23091 PR rtl-optimization/83723
23092 * lra-int.h (lra_substitute_pseudo): Add DEBUG_P argument.
23093 * lra.c (lra_substitute_pseudo): Likewise. If true, use
23094 gen_rtx_raw_SUBREG instead of gen_rtx_SUBREG. Pass DEBUG_P to
23096 (lra_substitute_pseudo_within_insn): Adjust lra_substitute_pseudo
23098 * lra-constraints.c (inherit_reload_reg, split_reg): Likewise.
23100 2018-02-16 Eric Botcazou <ebotcazou@adacore.com>
23102 PR rtl-optimization/81443
23103 * rtlanal.c (num_sign_bit_copies1) <SUBREG>: Do not propagate results
23104 from inner REGs to paradoxical SUBREGs.
23106 2018-02-16 Richard Biener <rguenther@suse.de>
23108 PR tree-optimization/84399
23109 * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
23110 For operands we can analyze at their definition make sure we can
23111 analyze them at each use as well.
23113 2018-02-16 Richard Biener <rguenther@suse.de>
23115 PR tree-optimization/84190
23116 * tree-ssa.c (non_rewritable_mem_ref_base): Do not touch
23117 volatile accesses if the decl isn't volatile.
23119 2018-02-15 Jason Merrill <jason@redhat.com>
23121 PR c++/84314 - ICE with templates and fastcall attribute.
23122 * attribs.c (build_type_attribute_qual_variant): Don't clobber
23123 TYPE_CANONICAL on an existing type.
23125 2018-02-15 Jakub Jelinek <jakub@redhat.com>
23127 PR tree-optimization/84383
23128 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Don't look at
23129 dstoff nor call operand_equal_p if dstbase is NULL.
23131 PR tree-optimization/84334
23132 * match.pd ((A +- CST1) +- CST2 -> A + CST3): If A is
23133 also a CONSTANT_CLASS_P, punt.
23135 2018-02-14 Jim Wilson <jimw@sifive.com>
23137 * config/riscv/riscv.c (riscv_first_stack_step): Move locals after
23138 first SMALL_OPERAND check. New local min_second_step. Move assert
23139 to where locals are set. Add TARGET_RVC support.
23140 * config/riscv/riscv.h (C_SxSP_BITS, SWSP_REACH, SDSP_REACH): New.
23142 2018-02-14 Indu Bhagat <indu.bhagat@oracle.com>
23144 * doc/invoke.texi: Correct -Wformat-overflow code sample.
23146 2018-02-14 Martin Sebor <msebor@redhat.com>
23148 PR tree-optimization/83698
23149 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For
23150 arrays constrain the offset range to their bounds.
23151 (builtin_access::strcat_overlap): Adjust the bounds of overlap offset.
23152 (builtin_access::overlap): Avoid setting the size of overlap if it's
23154 (maybe_diag_overlap): Also consider arrays when deciding what values
23155 of offsets to include in diagnostics.
23157 2018-02-14 Martin Sebor <msebor@redhat.com>
23160 * attribs.c (diag_attr_exclusions): Consider the exclusion(s)
23161 that correspond to the kind of a declaration.
23163 2018-02-14 John David Anglin <danglin@gcc.gnu.org>
23166 * config/pa/pa.md: Load address of PIC label using the linkage table
23167 if the label is nonlocal.
23169 2018-02-14 Kelvin Nilsen <kelvin@gcc.gnu.org>
23171 * config/rs6000/rs6000.c (rs6000_option_override_internal): Issue
23172 warning message if user requests -maltivec=be.
23173 * doc/invoke.texi: Document deprecation of -maltivec=be.
23175 2018-02-14 Will Schmidt <will_schmidt@vnet.ibm.com>
23178 * config/rs6000/rs6000-c.c: Update definitions for
23179 ALTIVEC_BUILTIN_VEC_SLD, ALTIVEC_BUILTIN_VEC_SLDW,
23180 VEC_XXSLDWI and ALTIVEC_BUILTIN_VEC_XXPERMDI builtins.
23182 2018-02-14 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
23185 * config/i386/cetintrin.h: Remove _rdssp[d|q] and
23186 add _get_ssp intrinsics. Remove argument from
23187 __builtin_ia32_rdssp[d|q].
23188 * config/i386/i386-builtin-types.def: Add UINT_FTYPE_VOID.
23189 * config/i386/i386-builtin.def: Remove argument from
23190 __builtin_ia32_rdssp[d|q].
23191 * config/i386/i386.c: Use UINT_FTYPE_VOID. Use
23192 ix86_expand_special_args_builtin for _rdssp[d|q].
23193 * config/i386/i386.md: Remove argument from rdssp[si|di] insn.
23194 Clear register before usage.
23195 * doc/extend.texi: Remove argument from __builtin_ia32_rdssp[d|q].
23196 Add documentation for new _get_ssp and _inc_ssp intrinsics.
23198 2018-02-14 Richard Sandiford <richard.sandiford@linaro.org>
23200 PR tree-optimization/84357
23201 * tree-data-ref.c (object_address_invariant_in_loop_p): Check
23202 operand 1 of an ARRAY_REF too.
23204 2018-02-14 Oleg Endo <olegendo@gcc.gnu.org>
23207 * config/rx/rx-protos.h (rx_reg_dead_or_unused_after_insn,
23208 rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
23210 (set_of_reg): New struct.
23211 (rx_find_set_of_reg, rx_find_use_of_reg): New functions.
23212 * config/rx/rx.c (rx_reg_dead_or_unused_after_insn,
23213 rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
23215 * config/rx/rx.md (andsi3, iorsi3, xorsi3): Convert to insn_and_split.
23216 Split into bitclr, bitset, bitinvert patterns if appropriate.
23217 (*bitset, *bitinvert, *bitclr): Convert to named insn_and_split and
23218 use rx_fuse_in_memory_bitop.
23219 (*bitset_in_memory, *bitinvert_in_memory, *bitclr_in_memory): Convert
23220 to named insn, correct maximum insn length.
23222 2018-02-14 Jozef Lawrynowicz <jozefl.gcc@gmail.com>
23225 * machmode.def: Define a complex mode for PARTIAL_INT.
23226 * genmodes.c (complex_class): Return MODE_COMPLEX_INT for
23228 * doc/rtl.texi: Document CSPImode.
23229 * config/msp430/msp430.c (msp430_hard_regno_nregs): Add CPSImode
23231 (msp430_hard_regno_nregs_with_padding): Likewise.
23233 2018-02-13 Peter Bergner <bergner@vnet.ibm.com>
23236 * config/rs6000/rs6000.c (mem_operand_gpr): Disallow altivec addresses.
23238 2018-02-13 Segher Boessenkool <segher@kernel.crashing.org>
23240 PR rtl-optimization/84169
23241 * combine.c (try_combine): New variable split_i2i3. Set it to true if
23242 we generated a parallel as new i3 and we split that to new i2 and i3
23243 instructions. Handle split_i2i3 similar to swap_i2i3: scan the
23244 LOG_LINKs of i3 to see which of those need to link to i2 now. Link
23245 those to i2, not i1. Partially rewrite this scan code.
23247 2018-02-13 Jakub Jelinek <jakub@redhat.com>
23250 * stor-layout.c (place_field): For variable length fields, adjust
23251 offset_align afterwards not just based on the field's alignment,
23252 but also on the size.
23254 PR middle-end/84309
23255 * match.pd (pow(C,x) -> exp(log(C)*x)): Use exp2s and log2s instead
23256 of exps and logs in the use_exp2 case.
23258 2018-02-13 Jeff Law <law@redhat.com>
23260 * config/rl/rl78.c (rl78_attribute_table): Fix terminator and
23261 entry for "vector".
23263 * config/rl78/rl78.c (rl78_handle_func_attribute): Mark
23266 2018-02-13 Alexandre Oliva <aoliva@redhat.com>
23270 * common.opt (gas-loc-support, gas-locview-support): New.
23271 (ginline-points, ginternal-reset-location-views): New.
23272 * doc/invoke.texi: Document them. Use @itemx where intended.
23273 (gvariable-location-views): Adjust.
23274 * target.def (reset_location_view): New.
23275 * doc/tm.texi.in (DWARF2_ASM_VIEW_DEBUG_INFO): New.
23276 (TARGET_RESET_LOCATION_VIEW): New.
23277 * doc/tm.texi: Rebuilt.
23278 * dwarf2out.c (dwarf2out_default_as_loc_support): New.
23279 (dwarf2out_default_as_locview_support): New.
23280 (output_asm_line_debug_info): Use option variables.
23281 (dwarf2out_maybe_output_loclist_view_pair): Likewise.
23282 (output_loc_list): Likewise.
23283 (add_high_low_attributes): Check option variables.
23284 Don't output entry view attribute in strict mode.
23285 (gen_inlined_subroutine_die): Check option variables.
23286 (dwarf2out_inline_entry): Likewise.
23287 (init_sections_and_labels): Likewise.
23288 (dwarf2out_early_finish): Likewise.
23289 (maybe_reset_location_view): New, from...
23290 (dwarf2out_var_location): ... here. Call it.
23291 * debug.h (dwarf2out_default_as_loc_support): Declare.
23292 (dwarf2out_default_as_locview_support): Declare.
23293 * hooks.c (hook_int_rtx_insn_0): New.
23294 * hooks.h (hook_int_rtx_insn_0): Declare.
23295 * toplev.c (process_options): Take -gas-loc-support and
23296 -gas-locview-support from dwarf2out. Enable
23297 -gvariable-location-views by default only with locview
23298 assembler support. Enable -ginternal-reset-location-views by
23299 default only if the target defines the corresponding hook.
23300 Enable -ginline-points by default if location views are
23301 enabled; force it disabled if statement frontiers are
23303 * tree-inline.c (expand_call_inline): Check option variables.
23304 * tree-ssa-live.c (remove_unused_scope_block_p): Likewise.
23306 2018-02-13 Richard Sandiford <richard.sandiford@linaro.org>
23308 PR tree-optimization/84321
23309 * tree-vrp.c (intersect_range_with_nonzero_bits): Fix VR_ANTI_RANGE
23310 handling. Also check whether the anti-range contains any values
23311 that satisfy the mask; switch to a VR_RANGE if not.
23313 2018-02-13 Paolo Bonzini <bonzini@gnu.org>
23316 * internal-fn.def (ASAN_CHECK, ASAN_MARK): Revert changes to fnspec.
23318 2018-02-13 Martin Jambor <mjambor@suse.cz>
23321 * ipa-param-manipulation.c (ipa_modify_call_arguments): Use location
23322 of call statements, also set location of a load to a temporary.
23324 2018-02-13 Sebastian Perta <sebastian.perta@renesas.com>
23326 * config/rl78/rl78.c (add_vector_labels): New function.
23327 * config/rl78/rl78.c (rl78_handle_vector_attribute): New function.
23328 * config/rl78/rl78.c (rl78_start_function): Call add_vector_labels.
23329 * config/rl78/rl78.c (rl78_handle_func_attribute): Removed the assert
23330 which checks that no arguments are passed.
23331 * config/rl78/rl78.c (rl78_attribute_table): Add "vector" attribute.
23332 * doc/extend.texi: Documentation for the new attribute.
23334 2018-02-13 Andreas Schwab <schwab@suse.de>
23336 * config/riscv/linux.h (CPP_SPEC): Define.
23338 2018-02-13 Jakub Jelinek <jakub@redhat.com>
23341 * config/i386/i386.c (ix86_init_mmx_sse_builtins): Pass
23342 OPTION_MASK_ISA_AES | OPTION_MASK_ISA_SSE2 instead of
23343 OPTION_MASK_ISA_AES as first argument to def_builtin_const
23344 for AES builtins. Pass OPTION_MASK_ISA_PCLMUL | OPTION_MASK_ISA_SSE2
23345 instead of OPTION_MASK_ISA_PCLMUL as first argument to
23346 def_builtin_const for __builtin_ia32_pclmulqdq128 builtin.
23347 * config/i386/wmmintrin.h: If __SSE2__ is not defined, enable it
23348 temporarily for AES and PCLMUL builtins.
23350 PR tree-optimization/84339
23351 * gimple-fold.c (get_range_strlen): Set *FLEXP to true when handling
23352 ARRAY_REF where first operand is array_at_struct_end_p COMPONENT_REF.
23355 PR middle-end/84309
23356 * match.pd (pow(C,x) -> exp(log(C)*x)): Optimize instead into
23357 exp2(log2(C)*x) if C is a power of 2 and c99 runtime is available.
23358 * generic-match-head.c (canonicalize_math_after_vectorization_p): New
23360 * gimple-match-head.c (canonicalize_math_after_vectorization_p): New
23362 * omp-simd-clone.h: New file.
23363 * omp-simd-clone.c: Include omp-simd-clone.h.
23364 (expand_simd_clones): No longer static.
23365 * tree-vect-patterns.c: Include fold-const-call.h, attribs.h,
23366 cgraph.h and omp-simd-clone.h.
23367 (vect_recog_pow_pattern): Optimize pow(C,x) to exp(log(C)*x).
23368 (vect_recog_widen_shift_pattern): Formatting fix.
23369 (vect_pattern_recog_1): Don't check optab for calls.
23372 * config/i386/sse.md (<avx512>_vpermi2var<mode>3_mask): Force
23373 operands[2] into a REG before using gen_lowpart on it.
23375 2018-02-12 Jeff Law <law@redhat.com>
23378 * config/sh/sh.c (find_barrier): Consider a sibling call
23381 * cse.c (try_back_substitute_reg): Move any REG_ARGS_SIZE note when
23382 successfully back substituting a reg.
23384 2018-02-12 Richard Biener <rguenther@suse.de>
23386 PR tree-optimization/84037
23387 * tree-vect-slp.c (vect_analyze_slp_cost): Add visited
23388 parameter, move visited init to caller.
23389 (vect_slp_analyze_operations): Separate cost from validity
23390 check, initialize visited once for all instances.
23391 (vect_schedule_slp): Analyze map to CSE vectorized nodes once
23393 * tree-vect-stmts.c (vect_model_simple_cost): Make early
23395 (vect_model_promotion_demotion_cost): Likewise.
23396 (vectorizable_bswap): Guard cost modeling with !slp_node
23397 instead of !PURE_SLP_STMT to avoid double-counting on hybrid
23399 (vectorizable_call): Likewise.
23400 (vectorizable_conversion): Likewise.
23401 (vectorizable_assignment): Likewise.
23402 (vectorizable_shift): Likewise.
23403 (vectorizable_operation): Likewise.
23404 (vectorizable_store): Likewise.
23405 (vectorizable_load): Likewise.
23406 (vectorizable_condition): Likewise.
23407 (vectorizable_comparison): Likewise.
23409 2018-02-12 Paolo Bonzini <bonzini@gnu.org>
23412 * internal-fn.def (ASAN_CHECK): Fix fnspec to account for return value.
23413 (ASAN_MARK): Fix fnspec to account for return value, change pointer
23414 argument from 'R' to 'W' so that the pointed-to datum is clobbered.
23416 2018-02-08 Jan Hubicka <hubicka@ucw.cz>
23418 PR middle-end/83665
23419 * params.def (inline-min-speedup): Increase from 8 to 15.
23420 (max-inline-insns-auto): Decrease from 40 to 30.
23421 * ipa-split.c (consider_split): Add some buffer for function to
23422 be considered inlining candidate.
23423 * invoke.texi (max-inline-insns-auto, inline-min-speedup): UPdate
23426 2018-02-12 Richard Biener <rguenther@suse.de>
23428 PR tree-optimization/84037
23429 * tree-vect-slp.c (vect_build_slp_tree_2): Try swapping the
23430 matched stmts if we cannot swap the non-matched ones.
23432 2018-02-12 Olga Makhotina <olga.makhotina@intel.com>
23434 * config/i386/avx512fintrin.h (_mm_mask_scalef_round_sd,
23435 _mm_maskz_scalef_round_sd, _mm_mask_scalef_round_ss,
23436 _mm_maskz_scalef_round_ss): New intrinsics.
23437 (__builtin_ia32_scalefsd_round, __builtin_ia32_scalefss_round): Fix.
23438 * config/i386/i386-builtin.def (__builtin_ia32_scalefsd_round,
23439 __builtin_ia32_scalefss_round): Remove.
23440 (__builtin_ia32_scalefsd_mask_round,
23441 __builtin_ia32_scalefss_mask_round): New intrinsics.
23442 * config/i386/sse.md (vmscalef<mode><round_name>): Renamed to ...
23443 (vmscalef<mode><mask_scalar_name><round_scalar_name>): ... this.
23444 ((match_operand:VF_128 2 "<round_nimm_predicate>"
23445 "<round_constraint>")): Changed to ...
23446 ((match_operand:VF_128 2 "<round_scalar_nimm_predicate>"
23447 "<round_scalar_constraint>")): ... this.
23448 ("vscalef<ssescalarmodesuffix>\t{<round_op3>%2, %1, %0|
23449 %0, %1, %2<round_op3>}"): Changed to ...
23450 ("vscalef<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%2, %1,
23451 %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %1,
23452 %2<round_scalar_mask_op3>}"): ... this.
23453 * config/i386/subst.md (round_scalar_nimm_predicate): New.
23455 2018-02-12 Olga Makhotina <olga.makhotina@intel.com>
23457 * config/i386/avx512fintrin.h (_mm_mask_sqrt_round_sd)
23458 (_mm_maskz_sqrt_round_sd, _mm_mask_sqrt_round_ss)
23459 (_mm_maskz_sqrt_round_ss): New intrinsics.
23460 (__builtin_ia32_sqrtsd_round, __builtin_ia32_sqrtss_round): Remove.
23461 (__builtin_ia32_sqrtsd_mask_round)
23462 (__builtin_ia32_sqrtss_mask_round): New builtins.
23463 * config/i386/i386-builtin.def (__builtin_ia32_sqrtsd_round)
23464 (__builtin_ia32_sqrtss_round): Remove.
23465 (__builtin_ia32_sqrtsd_mask_round)
23466 (__builtin_ia32_sqrtss_mask_round): New builtins.
23467 * config/i386/sse.md (vmsqrt<mode>2<round_name>): Renamed to ...
23468 (vmsqrt<mode>2<mask_scalar_name><round_scalar_name>): ... this.
23469 ((match_operand:VF_128 1 "vector_operand"
23470 "xBm,<round_constraint>")): Changed to ...
23471 ((match_operand:VF_128 1 "vector_operand"
23472 "xBm,<round_scalar_constraint>")): ... this.
23473 (vsqrt<ssescalarmodesuffix>\t{<round_op3>%1, %2, %0|
23474 %0, %2, %<iptr>1<round_op3>}): Changed to ...
23475 (vsqrt<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%1, %2,
23476 %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %2,
23477 %<iptr>1<round_scalar_mask_op3>}): ... this.
23478 ((set_attr "prefix" "<round_prefix>")): Changed to ...
23479 ((set_attr "prefix" "<round_scalar_prefix>")): ... this.
23481 2018-02-11 Steven Munroe <munroesj@gcc.gnu.org>
23484 * config/rs6000/mmintrin.h (_mm_cmpeq_pi32 [_ARCH_PWR9]):
23485 Cast vec_cmpeq result to correct type.
23486 * config/rs6000/mmintrin.h (_mm_cmpgt_pi32 [_ARCH_PWR9]):
23487 Cast vec_cmpgt result to correct type.
23489 2018-02-11 Alexandre Oliva <aoliva@redhat.com>
23491 * final.c (final_scan_insn_1): Renamed from...
23492 (final_scan_insn): ... this. New wrapper, to recover
23493 seen from the outermost call in recursive ones.
23494 * config/sparc/sparc.c (output_return): Drop seen from call.
23495 (output_sibcall): Likewise.
23496 * config/visium/visium.c (output_branch): Likewise.
23498 2018-02-10 John David Anglin <danglin@gcc.gnu.org>
23500 * config/pa/pa.c (hppa_profile_hook): Mark SYMBOL_REF for _mcount as
23503 2018-02-10 Alan Modra <amodra@gmail.com>
23506 * config/rs6000/rs6000.md (split_stack_return): Remove (use ..).
23507 Specify LR as an input.
23509 2018-02-10 Jakub Jelinek <jakub@redhat.com>
23512 * omp-low.c (maybe_remove_omp_member_access_dummy_vars,
23513 remove_member_access_dummy_vars): New functions.
23514 (lower_omp_for, lower_omp_taskreg, lower_omp_target,
23515 lower_omp_1, execute_lower_omp): Use them.
23517 PR rtl-optimization/84308
23518 * shrink-wrap.c (spread_components): Release todo vector.
23520 2018-02-09 Vladimir Makarov <vmakarov@redhat.com>
23522 PR rtl-optimization/57193
23523 * ira-color.c (struct allocno_color_data): Add member
23524 conflict_allocno_hard_prefs.
23525 (update_conflict_allocno_hard_prefs): New.
23526 (bucket_allocno_compare_func): Add a preference based on
23527 conflict_allocno_hard_prefs.
23528 (push_allocno_to_stack): Update conflict_allocno_hard_prefs.
23529 (color_allocnos): Remove a dead code. Initiate
23530 conflict_allocno_hard_prefs. Call update_costs_from_prefs.
23532 2018-02-09 Jakub Jelinek <jakub@redhat.com>
23535 * config/rs6000/vsx.md (p9_xxbrq_v16qi): Change input operand
23536 constraint from =wa to wa. Avoid a subreg on the output operand,
23537 instead use a pseudo and subreg it in a move.
23538 (p9_xxbrd_<mode>): Changed to ...
23539 (p9_xxbrd_v2di): ... this insn, without VSX_D iterator.
23540 (p9_xxbrd_v2df): New expander.
23541 (p9_xxbrw_<mode>): Changed to ...
23542 (p9_xxbrw_v4si): ... this insn, without VSX_W iterator.
23543 (p9_xxbrw_v4sf): New expander.
23545 2018-02-09 Sebastian Perta <sebastian.perta@renesas.com>
23547 * config/rx/rx.md (movsicc): Update expander to be matched by GCC.
23549 2018-02-09 Peter Bergner <bergner@vnet.ibm.com>
23552 * config/rs6000/vsx.md (vsx_mul_v2di): Handle generating a 64-bit
23553 multiply in 32-bit mode.
23554 (vsx_div_v2di): Handle generating a 64-bit signed divide in 32-bit mode.
23555 (vsx_udiv_v2di): Handle generating a 64-bit unsigned divide in 32-bit
23558 2018-02-09 Sebastian Perta <sebastian.perta@renesas.com>
23560 * config/rx/constraints.md (CALL_OP_SYMBOL_REF): Added new constraint
23561 to allow or block "symbol_ref" depending on the value of TARGET_JSR.
23562 * config/rx/rx.md (call_internal): Use CALL_OP_SYMBOL_REF.
23563 * config/rx/rx.md (call_value_internal): Use CALL_OP_SYMBOL_REF.
23565 2018-02-09 Pierre-Marie de Rodat <derodat@adacore.com>
23568 * dwarf2out.c (is_trivial_indirect_ref): New function.
23569 (dwarf2out_late_global_decl): Do not generate a location
23570 attribute for variables that have a non-trivial DECL_VALUE_EXPR
23571 and that are not defined in the current unit.
23573 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
23575 * optabs.c (prepare_cmp_insn): Try harder to emit a direct comparison
23576 instead of a libcall for UNORDERED.
23578 2018-02-09 Tamar Christina <tamar.christina@arm.com>
23581 * config/arm/arm-c.c (arm_cpu_builtins): Un-define __ARM_FEATURE_LDREX,
23582 __ARM_ARCH_PROFILE, __ARM_ARCH_ISA_THUMB, __ARM_FP and __ARM_NEON_FP.
23584 2018-02-09 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
23587 * config/s390/s390.c (s390_set_current_function): Invoke
23588 s390_indirect_branch_settings also if fndecl didn't change.
23590 2018-02-09 Alexandre Oliva <aoliva@redhat.com>
23592 * config/rs6000/rs6000.md (blockage): Set length to zero.
23594 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
23596 * expr.c (optimize_bitfield_assignment_op): Remove obsolete assertion.
23598 2018-02-09 Jakub Jelinek <jakub@redhat.com>
23601 * gcc.c (STATIC_LIBASAN_LIBS, STATIC_LIBTSAN_LIBS,
23602 STATIC_LIBLSAN_LIBS, STATIC_LIBUBSAN_LIBS): Handle -static like
23606 * var-tracking.c (vt_add_function_parameter): Punt for non-onepart
23607 PARALLEL incoming that failed vt_get_decl_and_offset check.
23609 PR middle-end/84237
23610 * output.h (bss_initializer_p): Add NAMED argument, defaulted to false.
23611 * varasm.c (bss_initializer_p): Add NAMED argument, if true, ignore
23613 (get_variable_section): For decls in named .bss* sections pass true as
23614 second argument to bss_initializer_p.
23616 2018-02-09 Marek Polacek <polacek@redhat.com>
23617 Jakub Jelinek <jakub@redhat.com>
23620 * fold-const.c (fold_indirect_ref_1): Use VECTOR_TYPE_P macro.
23621 Formatting fixes. Verify first that tree_fits_poly_int64_p (op01).
23622 Sync some changes from cxx_fold_indirect_ref.
23624 2018-02-09 Alexandre Oliva <aoliva@redhat.com>
23626 * cfgexpand.c (expand_gimple_basic_block): Handle inline entry
23628 * dwarf2out.c (dwarf2_debug_hooks): Enable inline_entry hook.
23629 (BLOCK_INLINE_ENTRY_LABEL): New.
23630 (dwarf2out_var_location): Disregard inline entry markers.
23631 (inline_entry_data): New struct.
23632 (inline_entry_data_hasher): New hashtable type.
23633 (inline_entry_data_hasher::hash): New.
23634 (inline_entry_data_hasher::equal): New.
23635 (inline_entry_data_table): New variable.
23636 (add_high_low_attributes): Add DW_AT_entry_pc and
23637 DW_AT_GNU_entry_view attributes if a pending entry is found
23638 in inline_entry_data_table. Add old entry_pc attribute only
23639 if debug nonbinding markers are disabled.
23640 (gen_inlined_subroutine_die): Set BLOCK_DIE if nonbinding
23641 markers are enabled.
23642 (block_within_block_p, dwarf2out_inline_entry): New.
23643 (dwarf2out_finish): Check that no entries remained in
23644 inline_entry_data_table.
23645 * final.c (reemit_insn_block_notes): Handle inline entry notes.
23646 (final_scan_insn, notice_source_line): Likewise.
23647 (rest_of_clean_state): Skip inline entry markers.
23648 * gimple-pretty-print.c (dump_gimple_debug): Handle inline entry
23650 * gimple.c (gimple_build_debug_inline_entry): New.
23651 * gimple.h (enum gimple_debug_subcode): Add
23652 GIMPLE_DEBUG_INLINE_ENTRY.
23653 (gimple_build_debug_inline_entry): Declare.
23654 (gimple_debug_inline_entry_p): New.
23655 (gimple_debug_nonbind_marker_p): Adjust.
23656 * insn-notes.def (INLINE_ENTRY): New.
23657 * print-rtl.c (rtx_writer::print_rtx_operand_code_0): Handle
23658 inline entry marker notes.
23659 (print_insn): Likewise.
23660 * rtl.h (NOTE_MARKER_P): Add INLINE_ENTRY support.
23661 (INSN_DEBUG_MARKER_KIND): Likewise.
23662 (GEN_RTX_DEBUG_MARKER_INLINE_ENTRY_PAT): New.
23663 * tree-inline.c (expand_call_inline): Build and insert
23664 debug_inline_entry stmt.
23665 * tree-ssa-live.c (remove_unused_scope_block_p): Preserve
23666 inline entry blocks early, if nonbind markers are enabled.
23667 (dump_scope_block): Dump fragment info.
23668 * var-tracking.c (reemit_marker_as_note): Handle inline entry note.
23669 * doc/gimple.texi (gimple_debug_inline_entry_p): New.
23670 (gimple_build_debug_inline_entry): New.
23671 * doc/invoke.texi (gstatement-frontiers, gno-statement-frontiers):
23672 Enable/disable inline entry points too.
23673 * doc/rtl.texi (NOTE_INSN_INLINE_ENTRY): New.
23674 (DEBUG_INSN): Describe inline entry markers.
23676 * common.opt (gvariable-location-views): New.
23677 (gvariable-location-views=incompat5): New.
23678 * config.in: Rebuilt.
23679 * configure: Rebuilt.
23680 * configure.ac: Test assembler for view support.
23681 * dwarf2asm.c (dw2_asm_output_symname_uleb128): New.
23682 * dwarf2asm.h (dw2_asm_output_symname_uleb128): Declare.
23683 * dwarf2out.c (var_loc_view): New typedef.
23684 (struct dw_loc_list_struct): Add vl_symbol, vbegin, vend.
23685 (dwarf2out_locviews_in_attribute): New.
23686 (dwarf2out_locviews_in_loclist): New.
23687 (dw_val_equal_p): Compare val_view_list of dw_val_class_view_lists.
23688 (enum dw_line_info_opcode): Add LI_adv_address.
23689 (struct dw_line_info_table): Add view.
23690 (RESET_NEXT_VIEW, RESETTING_VIEW_P): New macros.
23691 (DWARF2_ASM_VIEW_DEBUG_INFO): Define default.
23692 (zero_view_p): New variable.
23693 (ZERO_VIEW_P): New macro.
23694 (output_asm_line_debug_info): New.
23695 (struct var_loc_node): Add view.
23696 (add_AT_view_list, AT_loc_list): New.
23697 (add_var_loc_to_decl): Add view param. Test it against last.
23698 (new_loc_list): Add view params. Record them.
23699 (AT_loc_list_ptr): Handle loc and view lists.
23700 (view_list_to_loc_list_val_node): New.
23701 (print_dw_val): Handle dw_val_class_view_list.
23702 (size_of_die): Likewise.
23703 (value_format): Likewise.
23704 (loc_list_has_views): New.
23705 (gen_llsym): Set vl_symbol too.
23706 (maybe_gen_llsym, skip_loc_list_entry): New.
23707 (dwarf2out_maybe_output_loclist_view_pair): New.
23708 (output_loc_list): Output view list or entries too.
23709 (output_view_list_offset): New.
23710 (output_die): Handle dw_val_class_view_list.
23711 (output_dwarf_version): New.
23712 (output_compilation_unit_header): Use it.
23713 (output_skeleton_debug_sections): Likewise.
23714 (output_rnglists, output_line_info): Likewise.
23715 (output_pubnames, output_aranges): Update version comments.
23716 (output_one_line_info_table): Output view numbers in asm comments.
23717 (dw_loc_list): Determine current endview, pass it to new_loc_list.
23718 Call maybe_gen_llsym.
23719 (loc_list_from_tree_1): Adjust.
23720 (add_AT_location_description): Create view list attribute if
23721 needed, check it's absent otherwise.
23722 (convert_cfa_to_fb_loc_list): Adjust.
23723 (maybe_emit_file): Call output_asm_line_debug_info for test.
23724 (dwarf2out_var_location): Reset views as needed. Precompute
23725 add_var_loc_to_decl args. Call get_attr_min_length only if we have the
23726 attribute. Set view.
23727 (new_line_info_table): Reset next view.
23728 (set_cur_line_info_table): Call output_asm_line_debug_info for test.
23729 (dwarf2out_source_line): Likewise. Output view resets and labels to
23730 the assembler, or select appropriate line info opcodes.
23731 (prune_unused_types_walk_attribs): Handle dw_val_class_view_list.
23732 (optimize_string_length): Catch it. Adjust.
23733 (resolve_addr): Copy vl_symbol along with ll_symbol. Handle
23734 dw_val_class_view_list, and remove it if no longer needed.
23735 (hash_loc_list): Hash view numbers.
23736 (loc_list_hasher::equal): Compare them.
23737 (optimize_location_lists): Check whether a view list symbol is
23738 needed, and whether the locview attribute is present, and
23739 whether they match. Remove the locview attribute if no longer
23741 (index_location_lists): Call skip_loc_list_entry for test.
23742 (dwarf2out_finish): Call output_asm_line_debug_info for test.
23743 Use output_dwarf_version.
23744 * dwarf2out.h (enum dw_val_class): Add dw_val_class_view_list.
23745 (struct dw_val_node): Add val_view_list.
23746 * final.c (SEEN_NEXT_VIEW): New.
23747 (set_next_view_needed): New.
23748 (clear_next_view_needed): New.
23749 (maybe_output_next_view): New.
23750 (final_start_function): Rename to...
23751 (final_start_function_1): ... this. Take pointer to FIRST,
23752 add SEEN parameter. Emit param bindings in the initial view.
23753 (final_start_function): Reintroduce SEEN-less interface.
23754 (final): Rename to...
23755 (final_1): ... this. Take SEEN parameter. Output final pending
23756 next view at the end.
23757 (final): Reintroduce seen-less interface.
23758 (final_scan_insn): Output pending next view before switching
23759 sections or ending a block. Mark the next view as needed when
23760 outputting variable locations. Notify debug backend of section
23761 changes, and of location view changes.
23762 (rest_of_handle_final): Adjust.
23763 * toplev.c (process_options): Autodetect value for debug variable
23764 location views option. Warn on incompat5 without -gdwarf-5.
23765 * doc/invoke.texi (gvariable-location-views): New.
23766 (gvariable-location-views=incompat5): New.
23767 (gno-variable-location-views): New.
23769 2018-02-08 David Malcolm <dmalcolm@redhat.com>
23771 PR tree-optimization/84136
23772 * tree-cfg.c (find_taken_edge_computed_goto): Remove assertion
23773 that the result of find_edge is non-NULL.
23775 2018-02-08 Sergey Shalnov <sergey.shalnov@intel.com>
23778 * config/i386/x86-tune-costs.h (skylake_cost): Fix cost of
23779 storing integer register in SImode. Fix cost of 256 and 512
23780 byte aligned SSE register store.
23782 2018-02-08 Sergey Shalnov <sergey.shalnov@intel.com>
23784 * config/i386/i386.c (ix86_multiplication_cost): Fix
23785 multiplication cost for TARGET_AVX512DQ.
23787 2018-02-08 Marek Polacek <polacek@redhat.com>
23789 PR tree-optimization/84238
23790 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Verify the result of
23793 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
23795 PR tree-optimization/84265
23796 * tree-vect-stmts.c (vectorizable_store): Don't treat
23797 VMAT_CONTIGUOUS accesses as grouped.
23798 (vectorizable_load): Likewise.
23800 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
23802 PR tree-optimization/81635
23803 * wide-int.h (wi::round_down_for_mask, wi::round_up_for_mask): Declare.
23804 * wide-int.cc (wi::round_down_for_mask, wi::round_up_for_mask)
23805 (test_round_for_mask): New functions.
23806 (wide_int_cc_tests): Call test_round_for_mask.
23807 * tree-vrp.h (intersect_range_with_nonzero_bits): Declare.
23808 * tree-vrp.c (intersect_range_with_nonzero_bits): New function.
23809 * tree-data-ref.c (split_constant_offset_1): Use it to refine the
23810 range returned by get_range_info.
23812 2018-02-08 Jan Hubicka <hubicka@ucw.cz>
23815 * cgraph.h (symtab_node::output_to_lto_symbol_table_p): Declare
23816 * symtab.c: Include builtins.h
23817 (symtab_node::output_to_lto_symbol_table_p): Move here
23818 from lto-streamer-out.c:output_symbol_p.
23819 * lto-streamer-out.c (write_symbol): Turn early exit to assert.
23820 (output_symbol_p): Move all logic to symtab.c
23821 (produce_symtab): Update.
23823 2018-02-08 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
23825 * config/s390/s390-opts.h (enum indirect_branch): Define.
23826 * config/s390/s390-protos.h (s390_return_addr_from_memory)
23827 (s390_indirect_branch_via_thunk)
23828 (s390_indirect_branch_via_inline_thunk): Add function prototypes.
23829 (enum s390_indirect_branch_type): Define.
23830 * config/s390/s390.c (struct s390_frame_layout, struct
23831 machine_function): Remove.
23832 (indirect_branch_prez10thunk_mask, indirect_branch_z10thunk_mask)
23833 (indirect_branch_table_label_no, indirect_branch_table_name):
23835 (INDIRECT_BRANCH_NUM_OPTIONS): Define macro.
23836 (enum s390_indirect_branch_option): Define.
23837 (s390_return_addr_from_memory): New function.
23838 (s390_handle_string_attribute): New function.
23839 (s390_attribute_table): Add new attribute handler.
23840 (s390_execute_label): Handle UNSPEC_EXECUTE_JUMP patterns.
23841 (s390_indirect_branch_via_thunk): New function.
23842 (s390_indirect_branch_via_inline_thunk): New function.
23843 (s390_function_ok_for_sibcall): When jumping via thunk disallow
23844 sibling call optimization for non z10 compiles.
23845 (s390_emit_call): Force indirect branch target to be a single
23846 register. Add r1 clobber for non-z10 compiles.
23847 (s390_emit_epilogue): Emit return jump via return_use expander.
23848 (s390_reorg): Handle JUMP_INSNs as execute targets.
23849 (s390_option_override_internal): Perform validity checks for the
23850 new command line options.
23851 (s390_indirect_branch_attrvalue): New function.
23852 (s390_indirect_branch_settings): New function.
23853 (s390_set_current_function): Invoke s390_indirect_branch_settings.
23854 (s390_output_indirect_thunk_function): New function.
23855 (s390_code_end): Implement target hook.
23856 (s390_case_values_threshold): Implement target hook.
23857 (TARGET_ASM_CODE_END, TARGET_CASE_VALUES_THRESHOLD): Define target
23859 * config/s390/s390.h (struct s390_frame_layout)
23860 (struct machine_function): Move here from s390.c.
23861 (TARGET_INDIRECT_BRANCH_NOBP_RET)
23862 (TARGET_INDIRECT_BRANCH_NOBP_JUMP)
23863 (TARGET_INDIRECT_BRANCH_NOBP_JUMP_THUNK)
23864 (TARGET_INDIRECT_BRANCH_NOBP_JUMP_INLINE_THUNK)
23865 (TARGET_INDIRECT_BRANCH_NOBP_CALL)
23866 (TARGET_DEFAULT_INDIRECT_BRANCH_TABLE)
23867 (TARGET_INDIRECT_BRANCH_THUNK_NAME_EXRL)
23868 (TARGET_INDIRECT_BRANCH_THUNK_NAME_EX)
23869 (TARGET_INDIRECT_BRANCH_TABLE): Define macros.
23870 * config/s390/s390.md (UNSPEC_EXECUTE_JUMP)
23871 (INDIRECT_BRANCH_THUNK_REGNUM): Define constants.
23872 (mnemonic attribute): Add values which aren't recognized
23874 ("*cjump_long", "*icjump_long", "*basr", "*basr_r"): Disable
23875 pattern for branch conversion. Fix mnemonic attribute.
23876 ("*c<code>", "*sibcall_br", "*sibcall_value_br", "*return"): Emit
23877 indirect branch via thunk if requested.
23878 ("indirect_jump", "<code>"): Expand patterns for branch conversion.
23879 ("*indirect_jump"): Disable for branch conversion using out of
23881 ("indirect_jump_via_thunk<mode>_z10")
23882 ("indirect_jump_via_thunk<mode>")
23883 ("indirect_jump_via_inlinethunk<mode>_z10")
23884 ("indirect_jump_via_inlinethunk<mode>", "*casesi_jump")
23885 ("casesi_jump_via_thunk<mode>_z10", "casesi_jump_via_thunk<mode>")
23886 ("casesi_jump_via_inlinethunk<mode>_z10")
23887 ("casesi_jump_via_inlinethunk<mode>", "*basr_via_thunk<mode>_z10")
23888 ("*basr_via_thunk<mode>", "*basr_r_via_thunk_z10")
23889 ("*basr_r_via_thunk", "return<mode>_prez10"): New pattern.
23890 ("*indirect2_jump"): Disable for branch conversion.
23891 ("casesi_jump"): Turn into expander and expand patterns for branch
23893 ("return_use"): New expander.
23894 ("*return"): Emit return via thunk and rename it to ...
23895 ("*return<mode>"): ... this one.
23896 * config/s390/s390.opt: Add new options and and enum for the
23899 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
23901 * lra-constraints.c (match_reload): Unconditionally use
23902 gen_lowpart_SUBREG, rather than selecting between that
23903 and equivalent gen_rtx_SUBREG code.
23905 2018-02-08 Richard Biener <rguenther@suse.de>
23907 PR tree-optimization/84233
23908 * tree-ssa-phiprop.c (propagate_with_phi): Use separate
23909 changed flag instead of boguously re-using phi_inserted.
23911 2018-02-08 Martin Jambor <mjambor@suse.cz>
23913 * hsa-gen.c (get_symbol_for_decl): Set program allocation for
23914 static local variables.
23916 2018-02-08 Richard Biener <rguenther@suse.de>
23918 PR tree-optimization/84278
23919 * tree-vect-stmts.c (vectorizable_store): When looking for
23920 smaller vector types to perform grouped strided loads/stores
23921 make sure the mode is supported by the target.
23922 (vectorizable_load): Likewise.
23924 2018-02-08 Wilco Dijkstra <wdijkstr@arm.com>
23926 * config/aarch64/aarch64.c (aarch64_components_for_bb):
23927 Increase LDP/STP opportunities by adding adjacent callee-saves.
23929 2018-02-08 Wilco Dijkstra <wdijkstr@arm.com>
23931 PR rtl-optimization/84068
23932 PR rtl-optimization/83459
23933 * haifa-sched.c (rank_for_schedule): Fix SCHED_PRESSURE_MODEL sorting.
23935 2018-02-08 Aldy Hernandez <aldyh@redhat.com>
23937 PR tree-optimization/84224
23938 * gimple-ssa-warn-alloca.c (pass_walloca::execute): Remove assert.
23939 * calls.c (gimple_alloca_call_p): Only return TRUE when we have
23940 non-zero arguments.
23942 2018-02-07 Iain Sandoe <iain@codesourcery.com>
23945 * config/rs6000/altivec.md (*restore_world): Remove LR use.
23946 * config/rs6000/predicates.md (restore_world_operation): Adjust op
23947 count, remove one USE.
23949 2018-02-07 Michael Meissner <meissner@linux.vnet.ibm.com>
23951 * doc/install.texi (Configuration): Document the
23952 --with-long-double-format={ibm,ieee} PowerPC configuration
23956 * config/rs6000/rs6000.md (fix_trunc<SFDF:mode><QHI:mode>2):
23957 Convert from define_expand to be define_insn_and_split. Rework
23958 float/double/_Float128 conversions to QI/HI/SImode to work with
23959 both ISA 2.07 (power8) or ISA 3.0 (power9). Fix regression where
23960 conversions to QI/HImode types did a store and then a load to
23961 truncate the value. For conversions to VSX registers, don't split
23962 the insn, instead emit the code directly. Use the code iterator
23963 any_fix to combine signed and unsigned conversions.
23964 (fix<uns>_trunc<SFDF:mode>si2_p8): Likewise.
23965 (fixuns_trunc<SFDF:mode><QHI:mode>2): Likewise.
23966 (fix_trunc<IEEE128:mode><QHI:mode>2): Likewise.
23967 (fix<uns>_trunc<SFDF:mode><QHI:mode>2): Likewise.
23968 (fix_<mode>di2_hw): Likewise.
23969 (fixuns_<mode>di2_hw): Likewise.
23970 (fix_<mode>si2_hw): Likewise.
23971 (fixuns_<mode>si2_hw): Likewise.
23972 (fix<uns>_<IEEE128:mode><SDI:mode>2_hw): Likewise.
23973 (fix<uns>_trunc<IEEE128:mode><QHI:mode>2): Likewise.
23974 (fctiw<u>z_<mode>_smallint): Rename fctiw<u>z_<mode>_smallint to
23975 fix<uns>_trunc<SFDF:mode>si2_p8.
23976 (fix_trunc<SFDF:mode><QHI:mode>2_internal): Delete, no longer used.
23977 (fixuns_trunc<SFDF:mode><QHI:mode>2_internal): Likewise.
23978 (fix<uns>_<mode>_mem): Likewise.
23979 (fctiw<u>z_<mode>_mem): Likewise.
23980 (fix<uns>_<mode>_mem): Likewise.
23981 (fix<uns>_trunc<SFDF:mode><QHSI:mode>2_mem): On ISA 3.0, prevent
23982 the register allocator from doing a direct move to the GPRs to do
23983 a store, and instead use the ISA 3.0 store byte/half-word from
23984 vector register instruction. For IEEE 128-bit floating point,
23985 also optimize stores of 32-bit ints.
23986 (fix<uns>_trunc<IEEE128:mode><QHSI:mode>2_mem): Likewise.
23988 2018-02-07 Alan Hayward <alan.hayward@arm.com>
23990 * genextract.c (push_pathstr_operand): New function to support
23992 (walk_rtx): Call push_pathstr_operand.
23993 (print_path): Support [a-zA-Z].
23995 2018-02-07 Richard Biener <rguenther@suse.de>
23997 PR tree-optimization/84037
23998 * tree-vectorizer.h (struct _loop_vec_info): Add ivexpr_map member.
23999 (cse_and_gimplify_to_preheader): Declare.
24000 (vect_get_place_in_interleaving_chain): Likewise.
24001 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
24003 (_loop_vec_info::~_loop_vec_info): Delete it.
24004 (cse_and_gimplify_to_preheader): New function.
24005 * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Export.
24006 * tree-vect-stmts.c (vectorizable_store): CSE base and steps.
24007 (vectorizable_load): Likewise. For grouped stores always base
24008 the IV on the first element.
24009 * tree-vect-loop-manip.c (vect_loop_versioning): Unshare versioning
24010 condition before gimplifying.
24012 2018-02-07 Jakub Jelinek <jakub@redhat.com>
24014 * tree-eh.c (operation_could_trap_helper_p): Ignore honor_trapv for
24015 *DIV_EXPR and *MOD_EXPR.
24017 2018-02-07 H.J. Lu <hongjiu.lu@intel.com>
24020 * config/i386/i386.c (ix86_option_override_internal): Mask out
24021 the CF_SET bit when checking -fcf-protection.
24023 2018-02-07 Tom de Vries <tom@codesourcery.com>
24026 * omp-expand.c (expand_oacc_collapse_init): Ensure diff_type is large
24029 2018-02-07 Richard Biener <rguenther@suse.de>
24031 PR tree-optimization/84204
24032 * tree-chrec.c (chrec_fold_plus_1): Remove size limiting in
24035 PR tree-optimization/84205
24036 * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Also
24037 special-case isl_ast_op_zdiv_r.
24039 PR tree-optimization/84223
24040 * graphite-scop-detection.c (gather_bbs::before_dom_children):
24041 Only add conditions from within the region.
24042 (gather_bbs::after_dom_children): Adjust.
24044 2018-02-07 Georg-Johann Lay <avr@gjlay.de>
24047 * config/avr/avr.h (GENERAL_REGNO_P, GENERAL_REG_P): New macros.
24048 * config/avr/avr.md: Only post-reload split REG-REG moves if
24049 either register is GENERAL_REG_P.
24051 2018-02-07 Jakub Jelinek <jakub@redhat.com>
24053 PR tree-optimization/84235
24054 * tree-ssa-scopedtables.c
24055 (avail_exprs_stack::simplify_binary_operation): Fir MINUS_EXPR, punt
24056 if the subtraction is performed in floating point type where NaNs are
24057 honored. For *DIV_EXPR, punt for ALL_FRACT_MODE_Ps where we can't
24058 build 1. Formatting fix.
24060 2018-02-06 Jakub Jelinek <jakub@redhat.com>
24063 * config/i386/i386.c (rest_of_insert_endbranch): Only skip
24064 NOTE_INSN_CALL_ARG_LOCATION after a call, not anything else,
24065 and skip it regardless of bb boundaries. Use CALL_P macro,
24066 don't test INSN_P (insn) together with CALL_P or JUMP_P check
24067 unnecessarily, formatting fix.
24069 2018-02-06 Michael Collison <michael.collison@arm.com>
24071 * config/arm/thumb2.md:
24072 (*thumb2_mov_negscc): Split only if TARGET_THUMB2 && !arm_restrict_it.
24073 (*thumb_mov_notscc): Ditto.
24075 2018-02-06 Michael Meissner <meissner@linux.vnet.ibm.com>
24078 * config/rs6000/rs6000.md (su code attribute): Use "u" for
24079 unsigned_fix, not "s".
24081 2018-02-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
24083 * configure.ac (gcc_fn_eh_frame_ro): New function.
24084 (gcc_cv_as_cfi_directive): Check both 32 and 64-bit assembler for
24085 correct .eh_frame permissions.
24086 * configure: Regenerate.
24088 2018-02-06 Andrew Jenner <andrew@codeourcery.com>
24090 * doc/invoke.texi: Add section for the PowerPC SPE backend. Remove
24091 irrelevant options.
24093 2018-02-06 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
24095 * config/rs6000/rs6000.c (rs6000_option_override_internal):
24096 Display warning message for -mno-speculate-indirect-jumps.
24098 2018-02-06 Andrew Jenner <andrew@codesourcery.com>
24100 * config/powerpcspe/powerpcspe.opt: (msimple-fpu, mfpu) Add
24102 * config/powerpcspe/sysv4.opt (mbit-align): Likewise.
24104 2018-02-06 Aldy Hernandez <aldyh@redhat.com>
24106 PR tree-optimization/84225
24107 * tree-eh.c (find_trapping_overflow): Only call
24108 operation_no_trapping_overflow when ANY_INTEGRAL_TYPE_P.
24110 2018-02-06 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
24113 * config/i386/i386.c: Reimplement the check of possible options
24114 -mibt/-mshstk conbination. Change error messages.
24115 * doc/invoke.texi: Fix a typo: remove extra '='.
24117 2018-02-06 Marek Polacek <polacek@redhat.com>
24119 PR tree-optimization/84228
24120 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Skip debug statements.
24122 2018-02-06 Tamar Christina <tamar.christina@arm.com>
24125 * config/arm/arm.c (arm_print_asm_arch_directives): Record already
24126 emitted arch directives.
24127 * config/arm/arm-c.c (arm_cpu_builtins): Undefine __ARM_ARCH and
24128 __ARM_FEATURE_COPROC before changing architectures.
24130 2018-02-06 Richard Biener <rguenther@suse.de>
24132 * config/i386/i386.c (print_reg): Fix typo.
24133 (ix86_loop_unroll_adjust): Do not unroll beyond the original nunroll.
24135 2018-02-06 Eric Botcazou <ebotcazou@adacore.com>
24137 * configure: Regenerate.
24139 2018-02-05 Martin Sebor <msebor@redhat.com>
24141 PR tree-optimization/83369
24142 * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Use %G to print
24145 2018-02-05 Martin Liska <mliska@suse.cz>
24147 * doc/invoke.texi: Cherry-pick upstream r323995.
24149 2018-02-05 Richard Sandiford <richard.sandiford@linaro.org>
24151 * ira.c (ira_init_register_move_cost): Adjust comment.
24153 2018-02-05 Martin Liska <mliska@suse.cz>
24155 PR gcov-profile/84137
24156 * doc/gcov.texi: Fix typo in documentation.
24158 2018-02-05 Martin Liska <mliska@suse.cz>
24160 PR gcov-profile/83879
24161 * doc/gcov.texi: Document necessity of --dynamic-list-data when
24162 using dlopen functionality.
24164 2018-02-05 Olga Makhotina <olga.makhotina@intel.com>
24166 * config/i386/avx512dqintrin.h (_mm_mask_range_sd, _mm_maskz_range_sd,
24167 _mm_mask_range_round_sd, _mm_maskz_range_round_sd, _mm_mask_range_ss,
24168 _mm_maskz_range_ss, _mm_mask_range_round_ss,
24169 _mm_maskz_range_round_ss): New intrinsics.
24170 (__builtin_ia32_rangesd128_round)
24171 (__builtin_ia32_rangess128_round): Remove.
24172 (__builtin_ia32_rangesd128_mask_round,
24173 __builtin_ia32_rangess128_mask_round): New builtins.
24174 * config/i386/i386-builtin.def (__builtin_ia32_rangesd128_round,
24175 __builtin_ia32_rangess128_round): Remove.
24176 (__builtin_ia32_rangesd128_mask_round,
24177 __builtin_ia32_rangess128_mask_round): New builtins.
24178 * config/i386/sse.md (ranges<mode><round_saeonly_name>): Renamed to ...
24179 (ranges<mode><mask_scalar_name><round_saeonly_scalar_name>): ... this.
24180 ((match_operand:VF_128 2 "<round_saeonly_nimm_predicate>"
24181 "<round_saeonly_constraint>")): Changed to ...
24182 ((match_operand:VF_128 2 "<round_saeonly_scalar_nimm_predicate>"
24183 "<round_saeonly_scalar_constraint>")): ... this.
24184 ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_op4>%2, %1, %0|
24185 %0, %1, %2<round_saeonly_op4>, %3}"): Changed to ...
24186 ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_scalar_mask_op4>%2,
24187 %1, %0<mask_scalar_operand4>|%0<mask_scalar_operand4>, %1,
24188 %2<round_saeonly_scalar_mask_op4>, %3}"): ... this.
24190 2018-02-02 Andrew Jenner <andrew@codesourcery.com>
24192 * config/powerpcspe/powerpcspe.opt: Add Undocumented to irrelevant
24194 * config/powerpcspe/powerpcspe-tables.opt (rs6000_cpu_opt_value):
24195 Remove all values except native, 8540 and 8548.
24197 2018-02-02 H.J. Lu <hongjiu.lu@intel.com>
24199 * config/i386/i386.c (ix86_output_function_return): Pass
24200 INVALID_REGNUM, instead of -1, as invalid register number to
24201 indirect_thunk_name and output_indirect_thunk.
24203 2018-02-02 Julia Koval <julia.koval@intel.com>
24205 * config.gcc: Add -march=icelake.
24206 * config/i386/driver-i386.c (host_detect_local_cpu): Detect icelake.
24207 * config/i386/i386-c.c (ix86_target_macros_internal): Handle icelake.
24208 * config/i386/i386.c (processor_costs): Add m_ICELAKE.
24209 (PTA_ICELAKE, PTA_AVX512VNNI, PTA_GFNI, PTA_VAES, PTA_AVX512VBMI2,
24210 PTA_VPCLMULQDQ, PTA_RDPID, PTA_AVX512BITALG): New.
24211 (processor_target_table): Add icelake.
24212 (ix86_option_override_internal): Handle new PTAs.
24213 (get_builtin_code_for_version): Handle icelake.
24214 (M_INTEL_COREI7_ICELAKE): New.
24215 (fold_builtin_cpu): Handle icelake.
24216 * config/i386/i386.h (TARGET_ICELAKE, PROCESSOR_ICELAKE): New.
24217 * doc/invoke.texi: Add -march=icelake.
24219 2018-02-02 Julia Koval <julia.koval@intel.com>
24221 * config/i386/i386.c (ix86_option_override_internal): Change flags type
24222 to wide_int_bitmask.
24223 * wide-int-bitmask.h: New.
24225 2018-02-02 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
24228 * config/i386/i386.md: Replace Pmode with word_mode in
24229 builtin_setjmp_setup and builtin_longjmp to support x32.
24231 2018-02-01 Peter Bergner <bergner@vnet.ibm.com>
24235 * config/rs6000/driver-rs6000.c: #include "diagnostic.h".
24237 (rs6000_supported_cpu_names): New static variable.
24238 (linux_cpu_translation_table): Likewise.
24239 (elf_platform) <cpu>: Define new static variable and use it.
24240 Translate kernel AT_PLATFORM name to canonical name if needed.
24241 Error if platform name is unknown.
24243 2018-02-01 Aldy Hernandez <aldyh@redhat.com>
24246 * config/pa/predicates.md (base14_operand): Handle E_VOIDmode.
24248 2018-02-01 Jeff Law <law@redhat.com>
24251 * config/i386/i386.c (release_scratch_register_on_entry): Add new
24252 OFFSET and RELEASE_VIA_POP arguments. Use SP+OFFSET to restore
24253 the scratch if RELEASE_VIA_POP is false.
24254 (ix86_adjust_stack_and_probe_stack_clash): Un-constify SIZE.
24255 If we have to save a temporary register, decrement SIZE appropriately.
24256 Pass new arguments to release_scratch_register_on_entry.
24257 (ix86_adjust_stack_and_probe): Likewise.
24258 (ix86_emit_probe_stack_range): Pass new arguments to
24259 release_scratch_register_on_entry.
24261 2018-02-01 Uros Bizjak <ubizjak@gmail.com>
24263 PR rtl-optimization/84157
24264 * combine.c (change_zero_ext): Use REG_P predicate in
24265 front of HARD_REGISTER_P predicate.
24267 2018-02-01 Georg-Johann Lay <avr@gjlay.de>
24269 * config/avr/avr.c (avr_option_override): Move disabling of
24270 -fdelete-null-pointer-checks to...
24271 * common/config/avr/avr-common.c (avr_option_optimization_table):
24274 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
24276 PR tree-optimization/81635
24277 * tree-data-ref.c (split_constant_offset_1): For types that
24278 wrap on overflow, try to use range info to prove that wrapping
24281 2018-02-01 Renlin Li <renlin.li@arm.com>
24284 * config/aarch64/aarch64.c (aarch64_class_max_nregs): Handle
24285 TAILCALL_ADDR_REGS.
24286 (aarch64_register_move_cost): Likewise.
24287 * config/aarch64/aarch64.h (reg_class): Rename CALLER_SAVE_REGS to
24288 TAILCALL_ADDR_REGS.
24289 (REG_CLASS_NAMES): Likewise.
24290 (REG_CLASS_CONTENTS): Rename CALLER_SAVE_REGS to
24291 TAILCALL_ADDR_REGS. Remove IP registers.
24292 * config/aarch64/aarch64.md (Ucs): Update register constraint.
24294 2018-02-01 Richard Biener <rguenther@suse.de>
24296 * domwalk.h (dom_walker::dom_walker): Add additional constructor
24297 for specifying RPO order and allow NULL for that.
24298 * domwalk.c (dom_walker::dom_walker): Likewise.
24299 (dom_walker::walk): Handle NULL RPO order.
24300 * tree-into-ssa.c (rewrite_dom_walker): Do not walk dom children
24302 (rewrite_update_dom_walker): Likewise.
24303 (mark_def_dom_walker): Likewise.
24305 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
24307 * config/aarch64/aarch64-protos.h (aarch64_split_sve_subreg_move)
24308 (aarch64_maybe_expand_sve_subreg_move): Declare.
24309 * config/aarch64/aarch64.md (UNSPEC_REV_SUBREG): New unspec.
24310 * config/aarch64/predicates.md (aarch64_any_register_operand): New
24312 * config/aarch64/aarch64-sve.md (mov<mode>): Optimize subreg moves
24313 that are semantically a reverse operation.
24314 (*aarch64_sve_mov<mode>_subreg_be): New pattern.
24315 * config/aarch64/aarch64.c (aarch64_maybe_expand_sve_subreg_move):
24316 (aarch64_replace_reg_mode, aarch64_split_sve_subreg_move): New
24318 (aarch64_can_change_mode_class): For big-endian, forbid changes
24319 between two SVE modes if they have different element sizes.
24321 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
24323 * config/aarch64/aarch64.c (aarch64_expand_sve_const_vector): Prefer
24324 the TImode handling for big-endian targets.
24326 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
24328 * config/aarch64/aarch64-sve.md (sve_ld1rq): Replace with...
24329 (*sve_ld1rq<Vesize>): ... this new pattern. Handle all element sizes,
24331 * config/aarch64/aarch64.c (aarch64_expand_sve_widened_duplicate):
24332 Remove BSWAP handing for big-endian targets and use the form of
24333 LD1RQ appropariate for the mode.
24335 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
24337 * config/aarch64/aarch64.c (aarch64_simd_valid_immediate): Handle
24338 all CONST_VECTOR_DUPLICATE_P vectors, not just those with a single
24339 duplicated element.
24341 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
24344 * config/aarch64/aarch64.c (aarch64_secondary_reload): Tighten
24345 check for operands that need to go through aarch64_sve_reload_be.
24347 2018-02-01 Jakub Jelinek <jakub@redhat.com>
24349 PR tree-optimization/81661
24350 PR tree-optimization/84117
24351 * tree-eh.h (rewrite_to_non_trapping_overflow): Declare.
24352 * tree-eh.c: Include gimplify.h.
24353 (find_trapping_overflow, replace_trapping_overflow,
24354 rewrite_to_non_trapping_overflow): New functions.
24355 * tree-vect-loop.c: Include tree-eh.h.
24356 (vect_get_loop_niters): Use rewrite_to_non_trapping_overflow.
24357 * tree-data-ref.c: Include tree-eh.h.
24358 (get_segment_min_max): Use rewrite_to_non_trapping_overflow.
24360 2018-01-31 Uros Bizjak <ubizjak@gmail.com>
24362 PR rtl-optimization/84123
24363 * combine.c (change_zero_ext): Check if hard register satisfies
24364 can_change_dest_mode before calling gen_lowpart_SUBREG.
24366 2018-01-31 Vladimir Makarov <vmakarov@redhat.com>
24369 * ira.c (ira_init_register_move_cost): Remove assert.
24371 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
24373 PR rtl-optimization/84071
24374 * doc/tm.texi.in (WORD_REGISTER_OPERATIONS): Add explicit case.
24375 * doc/tm.texi: Regenerate.
24377 2018-01-31 Richard Biener <rguenther@suse.de>
24379 PR tree-optimization/84132
24380 * tree-data-ref.c (analyze_miv_subscript): Properly
24381 check whether evolution_function_is_affine_multivariate_p
24382 before calling gcd_of_steps_may_divide_p.
24384 2018-01-31 Julia Koval <julia.koval@intel.com>
24387 * config/i386/i386.c (ix86_expand_builtin): Handle IX86_BUILTIN_RDPID.
24388 * config/i386/i386.md (rdpid_rex64) New.
24389 (rdpid): Make 32bit only.
24391 2018-01-29 Aldy Hernandez <aldyh@redhat.com>
24394 * tree-pretty-print.c (dump_generic_node): Handle a TYPE_NAME with
24395 an IDENTIFIER_NODE for FUNCTION_TYPE's.
24397 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
24400 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
24402 * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
24404 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
24406 PR rtl-optimization/84071
24407 * combine.c (record_dead_and_set_regs_1): Record the source unmodified
24408 for a paradoxical SUBREG on a WORD_REGISTER_OPERATIONS target.
24410 2018-01-31 Claudiu Zissulescu <claziss@synopsys.com>
24412 * config/arc/arc.c (arc_handle_aux_attribute): New function.
24413 (arc_attribute_table): Add 'aux' attribute.
24414 (arc_in_small_data_p): Consider aux like variables.
24415 (arc_is_aux_reg_p): New function.
24416 (arc_asm_output_aligned_decl_local): Ignore 'aux' like variables.
24417 (arc_get_aux_arg): New function.
24418 (prepare_move_operands): Handle aux-register access.
24419 (arc_handle_aux_attribute): New function.
24420 * doc/extend.texi (ARC Variable attributes): Add subsection.
24422 2018-01-31 Claudiu Zissulescu <claziss@synopsys.com>
24424 * config/arc/arc-protos.h (arc_is_uncached_mem_p): Function proto.
24425 * config/arc/arc.c (arc_handle_uncached_attribute): New function.
24426 (arc_attribute_table): Add 'uncached' attribute.
24427 (arc_print_operand): Print '.di' flag for uncached memory
24429 (arc_in_small_data_p): Do not consider for small data the uncached
24431 (arc_is_uncached_mem_p): New function.
24432 * config/arc/predicates.md (compact_store_memory_operand): Check
24433 for uncached memory accesses.
24434 (nonvol_nonimm_operand): Likewise.
24435 * doc/extend.texi (ARC Type Attribute): New subsection.
24437 2018-01-31 Jakub Jelinek <jakub@redhat.com>
24440 * common.opt (falign-functions=, falign-jumps=, falign-labels=,
24441 falign-loops=): Add Optimization flag.
24443 2018-01-30 Jeff Law <law@redhat.com>
24446 * i386.c (ix86_adjust_stack_and_probe_stack_clash): New argument
24447 INT_REGISTERS_SAVED. Check it prior to calling
24448 get_scratch_register_on_entry.
24449 (ix86_adjust_stack_and_probe): Similarly.
24450 (ix86_emit_probe_stack_range): Similarly.
24451 (ix86_expand_prologue): Corresponding changes.
24453 2018-01-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
24456 * config/sol2.h (STARTFILE_ARCH_SPEC): Use -std=c*,
24457 -std=iso9899:199409 instead of -pedantic to select values-Xc.o.
24459 2018-01-30 Vladimir Makarov <vmakarov@redhat.com>
24462 * lra-constraints.c (curr_insn_transform): Process AND in the
24465 2018-01-30 Jakub Jelinek <jakub@redhat.com>
24467 PR rtl-optimization/83986
24468 * sched-deps.c (sched_analyze_insn): For frame related insns, add anti
24469 dependence against last_pending_memory_flush in addition to
24470 pending_jump_insns.
24472 2018-01-30 Alexandre Oliva <aoliva@redhat.com>
24474 PR tree-optimization/81611
24475 * tree-ssa-dom.c (simple_iv_increment_p): Skip intervening
24478 2018-01-30 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
24481 * config/rs6000/rs6000.c (rs6000_internal_arg_pointer): Only return
24484 2018-01-30 Richard Biener <rguenther@suse.de>
24485 Jakub Jelinek <jakub@redhat.com>
24487 PR tree-optimization/84111
24488 * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1): Skip
24489 inner loops added during recursion, as they don't have up-to-date
24492 2018-01-30 Jan Hubicka <hubicka@ucw.cz>
24495 * ipa-inline.c (can_inline_edge_p): Break out late tests to...
24496 (can_inline_edge_by_limits_p): ... here.
24497 (can_early_inline_edge_p, check_callers,
24498 update_caller_keys, update_callee_keys, recursive_inlining,
24499 add_new_edges_to_heap, speculation_useful_p,
24500 inline_small_functions,
24501 inline_small_functions, flatten_function,
24502 inline_to_all_callers_1): Update.
24504 2018-01-30 Jan Hubicka <hubicka@ucw.cz>
24506 * profile-count.c (profile_count::combine_with_ipa_count): Handle
24509 2018-01-30 Richard Biener <rguenther@suse.de>
24511 PR tree-optimization/83008
24512 * tree-vect-slp.c (vect_analyze_slp_cost_1): Properly cost
24513 invariant and constant vector uses in stmts when they need
24514 more than one stmt.
24516 2018-01-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
24519 * configure.ac (gcc_cv_as_shf_merge): Disable on Solaris 10/x86.
24520 * configure: Regenerate.
24522 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
24524 * config/aarch64/aarch64-sve.md (*vec_extract<mode><Vel>_0): New
24526 (*vec_extract<mode><Vel>_v128): Require a nonzero lane number.
24527 Use gen_rtx_REG rather than gen_lowpart.
24529 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
24531 * lra-constraints.c (match_reload): Use subreg_lowpart_offset
24532 rather than 0 when creating partial subregs.
24534 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
24536 * vec-perm-indices.c (vec_perm_indices::series_p): Give examples
24539 2018-01-29 Michael Meissner <meissner@linux.vnet.ibm.com>
24542 * config/rs6000/rs6000.c (rs6000_setup_reg_addr_masks): If DFmode
24543 and SFmode can go in Altivec registers (-mcpu=power7 for DFmode,
24544 -mcpu=power8 for SFmode) don't set the PRE_INCDEC or PRE_MODIFY
24545 flags. This restores the settings used before the 2017-07-24.
24546 Turning off pre increment/decrement/modify allows IVOPTS to
24547 optimize DF/SF loops where the index is an int.
24549 2018-01-29 Richard Biener <rguenther@suse.de>
24550 Kelvin Nilsen <kelvin@gcc.gnu.org>
24553 * tree-vect-stmts.c (vectorizable_call): Don't call
24554 targetm.vectorize_builtin_md_vectorized_function if callee is
24557 2018-01-22 Carl Love <cel@us.ibm.com>
24559 * doc/extend.tex: Fix typo in second arg in
24560 __builtin_bcdadd_{lt|eq|gt|ov} and __builtin_bcdsub_{lt|eq|gt|ov}.
24562 2018-01-29 Richard Biener <rguenther@suse.de>
24564 PR tree-optimization/84086
24565 * tree-ssanames.c: Include cfgloop.h and tree-scalar-evolution.h.
24566 (flush_ssaname_freelist): When SSA names were released reset
24567 the SCEV hash table.
24569 2018-01-29 Richard Biener <rguenther@suse.de>
24571 PR tree-optimization/84057
24572 * tree-ssa-loop-ivcanon.c (unloop_loops): Deal with already
24573 removed paths when removing edges.
24575 2018-01-27 H.J. Lu <hongjiu.lu@intel.com>
24577 * doc/invoke.texi: Replace -mfunction-return==@var{choice} with
24578 -mfunction-return=@var{choice}.
24580 2018-01-27 Bernd Edlinger <bernd.edlinger@hotmail.de>
24582 PR diagnostic/84034
24583 * diagnostic-show-locus.c (get_line_width_without_trailing_whitespace):
24584 Handle CR like TAB.
24585 (layout::print_source_line): Likewise.
24586 (test_get_line_width_without_trailing_whitespace): Add test cases.
24588 2018-01-27 Jakub Jelinek <jakub@redhat.com>
24590 PR middle-end/84040
24591 * sched-deps.c (sched_macro_fuse_insns): Return immediately for
24594 2018-01-26 Jim Wilson <jimw@sifive.com>
24596 * config/riscv/riscv.h (MAX_FIXED_MODE_SIZE): New.
24598 * config/riscv/elf.h (LIB_SPEC): Don't include -lgloss when nosys.specs
24601 2018-01-26 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
24603 * config/aarch64/aarch64.md: Add peepholes for CMP + SUB -> SUBS
24604 and CMP + SUB-immediate -> SUBS.
24606 2018-01-26 Martin Sebor <msebor@redhat.com>
24608 PR tree-optimization/83896
24609 * tree-ssa-strlen.c (get_string_len): Rename...
24610 (get_string_cst_length): ...to this. Return HOST_WIDE_INT.
24611 Avoid assuming length is constant.
24612 (handle_char_store): Use HOST_WIDE_INT for string length.
24614 2018-01-26 Uros Bizjak <ubizjak@gmail.com>
24617 * config/i386/i386.md (*andndi3_doubleword): Add earlyclobber
24618 to (=&r,r,rm) alternative. Add (=r,0,rm) and (=r,r,0) alternatives.
24620 2018-01-26 Richard Biener <rguenther@suse.de>
24622 PR rtl-optimization/84003
24623 * dse.c (record_store): Only record redundant stores when
24624 the earlier store aliases at least all accesses the later one does.
24626 2018-01-26 Jakub Jelinek <jakub@redhat.com>
24628 PR rtl-optimization/83985
24629 * dce.c (deletable_insn_p): Return false for separate shrink wrapping
24630 REG_CFA_RESTORE insns.
24631 (delete_unmarked_insns): Don't ignore separate shrink wrapping
24632 REG_CFA_RESTORE insns here.
24635 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Don't
24636 use SSA_NAME_VAR as base for SSA_NAMEs with non-NULL SSA_NAME_VAR.
24638 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
24640 * config/arc/arc-arch.h (arc_tune_attr): Add ARC_TUNE_CORE_3.
24641 * config/arc/arc.c (arc_sched_issue_rate): Use ARC_TUNE_... .
24642 (arc_init): Likewise.
24643 (arc_override_options): Likewise.
24644 (arc_file_start): Choose Tag_ARC_CPU_variation based on arc_tune
24646 (hwloop_fail): Use TARGET_DBNZ when we want to check for dbnz insn
24648 * config/arc/arc.h (TARGET_DBNZ): Define.
24649 * config/arc/arc.md (attr tune): Add core_3, use ARC_TUNE_... to
24650 properly set the tune attribute.
24651 (dbnz): Use TARGET_DBNZ guard.
24652 * config/arc/arc.opt (mtune): Add core3 option.
24654 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
24656 * config/arc/arc.c (arc_delegitimize_address_0): Refactored to
24657 recognize new pic like addresses.
24658 (arc_delegitimize_address): Clean up.
24660 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
24662 * config/arc/arc-arches.def: Option mrf16 valid for all
24664 * config/arc/arc-c.def (__ARC_RF16__): New predefined macro.
24665 * config/arc/arc-cpus.def (em_mini): New cpu with rf16 on.
24666 * config/arc/arc-options.def (FL_RF16): Add mrf16 option.
24667 * config/arc/arc-tables.opt: Regenerate.
24668 * config/arc/arc.c (arc_conditional_register_usage): Handle
24669 reduced register file case.
24670 (arc_file_start): Set must have build attributes.
24671 * config/arc/arc.h (MAX_ARC_PARM_REGS): Conditional define using
24672 mrf16 option value.
24673 * config/arc/arc.opt (mrf16): Add new option.
24674 * config/arc/elf.h (ATTRIBUTE_PCS): Define.
24675 * config/arc/genmultilib.awk: Handle new mrf16 option.
24676 * config/arc/linux.h (ATTRIBUTE_PCS): Define.
24677 * config/arc/t-multilib: Regenerate.
24678 * doc/invoke.texi (ARC Options): Document mrf16 option.
24680 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
24682 * config/arc/arc-protos.h: Add arc_is_secure_call_p proto.
24683 * config/arc/arc.c (arc_handle_secure_attribute): New function.
24684 (arc_attribute_table): Add 'secure_call' attribute.
24685 (arc_print_operand): Print secure call operand.
24686 (arc_function_ok_for_sibcall): Don't optimize tail calls when
24688 (arc_is_secure_call_p): New function. * config/arc/arc.md
24689 (call_i): Add support for sjli instruction.
24690 (call_value_i): Likewise.
24691 * config/arc/constraints.md (Csc): New constraint.
24693 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
24694 John Eric Martin <John.Martin@emmicro-us.com>
24696 * config/arc/arc-protos.h: Add arc_is_jli_call_p proto.
24697 * config/arc/arc.c (_arc_jli_section): New struct.
24698 (arc_jli_section): New type.
24699 (rc_jli_sections): New static variable.
24700 (arc_handle_jli_attribute): New function.
24701 (arc_attribute_table): Add jli_always and jli_fixed attribute.
24702 (arc_file_end): New function.
24703 (TARGET_ASM_FILE_END): Define.
24704 (arc_print_operand): Reuse 'S' letter for JLI output instruction.
24705 (arc_add_jli_section): New function.
24706 (jli_call_scan): Likewise.
24707 (arc_reorg): Call jli_call_scan.
24708 (arc_output_addsi): Remove 'S' from printing asm operand.
24709 (arc_is_jli_call_p): New function.
24710 * config/arc/arc.md (movqi_insn): Remove 'S' from printing asm
24712 (movhi_insn): Likewise.
24713 (movsi_insn): Likewise.
24714 (movsi_set_cc_insn): Likewise.
24715 (loadqi_update): Likewise.
24716 (load_zeroextendqisi_update): Likewise.
24717 (load_signextendqisi_update): Likewise.
24718 (loadhi_update): Likewise.
24719 (load_zeroextendhisi_update): Likewise.
24720 (load_signextendhisi_update): Likewise.
24721 (loadsi_update): Likewise.
24722 (loadsf_update): Likewise.
24723 (movsicc_insn): Likewise.
24724 (bset_insn): Likewise.
24725 (bxor_insn): Likewise.
24726 (bclr_insn): Likewise.
24727 (bmsk_insn): Likewise.
24728 (bicsi3_insn): Likewise.
24729 (cmpsi_cc_c_insn): Likewise.
24730 (movsi_ne): Likewise.
24731 (movsi_cond_exec): Likewise.
24732 (clrsbsi2): Likewise.
24733 (norm_f): Likewise.
24743 (call_i): Remove 'S' asm letter, add jli instruction.
24744 (call_value_i): Likewise.
24745 * config/arc/arc.op (mjli-always): New option.
24746 * config/arc/constraints.md (Cji): New constraint.
24747 * config/arc/fpx.md (addsf3_fpx): Remove 'S' from printing asm
24749 (subsf3_fpx): Likewise.
24750 (mulsf3_fpx): Likewise.
24751 * config/arc/simdext.md (vendrec_insn): Remove 'S' from printing
24753 * doc/extend.texi (ARC): Document 'jli-always' and 'jli-fixed'
24754 function attrbutes.
24755 * doc/invoke.texi (ARC): Document mjli-always option.
24757 2018-01-26 Sebastian Perta <sebastian.perta@renesas.com>
24759 * config/rl78/rl78.c (rl78_addsi3_internal): If operand 2 is const
24760 avoid addition with 0 and use incw and decw where possible.
24762 2018-01-26 Richard Biener <rguenther@suse.de>
24764 PR tree-optimization/81082
24765 * fold-const.c (fold_plusminus_mult_expr): Do not perform the
24766 association if it requires casting to unsigned.
24767 * match.pd ((A * C) +- (B * C) -> (A+-B)): New patterns derived
24768 from fold_plusminus_mult_expr to catch important cases late when
24769 range info is available.
24771 2018-01-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
24773 * config/i386/sol2.h (USE_HIDDEN_LINKONCE): Remove.
24774 * configure.ac (hidden_linkonce): New test.
24775 * configure: Regenerate.
24776 * config.in: Regenerate.
24778 2018-01-26 Julia Koval <julia.koval@intel.com>
24780 * config/i386/avx512bitalgintrin.h (_mm512_bitshuffle_epi64_mask,
24781 _mm512_mask_bitshuffle_epi64_mask, _mm256_bitshuffle_epi64_mask,
24782 _mm256_mask_bitshuffle_epi64_mask, _mm_bitshuffle_epi64_mask,
24783 _mm_mask_bitshuffle_epi64_mask): Fix type.
24784 * config/i386/i386-builtin-types.def (UHI_FTYPE_V2DI_V2DI_UHI,
24785 USI_FTYPE_V4DI_V4DI_USI): Remove.
24786 * config/i386/i386-builtin.def (__builtin_ia32_vpshufbitqmb512_mask,
24787 __builtin_ia32_vpshufbitqmb256_mask,
24788 __builtin_ia32_vpshufbitqmb128_mask): Fix types.
24789 * config/i386/i386.c (ix86_expand_args_builtin): Remove old types.
24790 * config/i386/sse.md (VI1_AVX512VLBW): Change types.
24792 2018-01-26 Alan Modra <amodra@gmail.com>
24795 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Exclude
24796 UNSPEC_VBPERMQ. Sort other unspecs.
24798 2018-01-25 David Edelsohn <dje.gcc@gmail.com>
24800 * doc/invoke.texi (PowerPC Options): Document 'native' cpu type.
24802 2018-01-25 Jan Hubicka <hubicka@ucw.cz>
24804 PR middle-end/83055
24805 * predict.c (drop_profile): Do not push/pop cfun; update also
24807 (handle_missing_profiles): Fix logic looking for zero profiles.
24809 2018-01-25 Jakub Jelinek <jakub@redhat.com>
24811 PR middle-end/83977
24812 * ipa-fnsummary.c (compute_fn_summary): Clear can_change_signature
24813 on functions with #pragma omp declare simd or functions with simd
24815 * omp-simd-clone.c (expand_simd_clones): Revert 2018-01-24 change.
24816 * config/i386/i386.c (ix86_simd_clone_compute_vecsize_and_simdlen):
24817 Remove trailing \n from warning_at calls.
24819 2018-01-25 Tom de Vries <tom@codesourcery.com>
24822 * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
24823 for neutered workers.
24825 2018-01-24 Joseph Myers <joseph@codesourcery.com>
24828 * config/m68k/m68k.c (m68k_promote_function_mode): New function.
24829 (TARGET_PROMOTE_FUNCTION_MODE): New macro.
24831 2018-01-24 Jeff Law <law@redhat.com>
24834 * i386.c (get_probe_interval): Move to earlier point.
24835 (ix86_compute_frame_layout): If -fstack-clash-protection and
24836 the frame is larger than the probe interval, then use pushes
24837 to save registers rather than reg->mem moves.
24838 (ix86_expand_prologue): Remove conditional for int_registers_saved
24841 2018-01-24 Vladimir Makarov <vmakarov@redhat.com>
24844 * ira-build.c (setup_min_max_allocno_live_range_point): Set up
24845 min/max for never referenced object.
24847 2018-01-24 Jakub Jelinek <jakub@redhat.com>
24849 PR middle-end/83977
24850 * tree.c (free_lang_data_in_decl): Don't clear DECL_ABSTRACT_ORIGIN
24852 * omp-low.c (create_omp_child_function): Remove "omp declare simd"
24853 attributes from DECL_ATTRIBUTES (decl) without affecting
24854 DECL_ATTRIBUTES (current_function_decl).
24855 * omp-simd-clone.c (expand_simd_clones): Ignore DECL_ARTIFICIAL
24856 functions with non-NULL DECL_ABSTRACT_ORIGIN.
24858 2018-01-24 Richard Sandiford <richard.sandiford@linaro.org>
24860 PR tree-optimization/83979
24861 * fold-const.c (fold_comparison): Use constant_boolean_node
24862 instead of boolean_{true,false}_node.
24864 2018-01-24 Jan Hubicka <hubicka@ucw.cz>
24866 * ipa-profile.c (ipa_propagate_frequency_1): Fix logic skipping calls
24869 2018-01-24 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
24871 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
24872 Simplify the clause that sets the length attribute.
24873 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
24874 (*sibcall_nonlocal_sysv<mode>): Clean up code block; simplify the
24875 clause that sets the length attribute.
24876 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
24878 2018-01-24 Tom de Vries <tom@codesourcery.com>
24881 * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_2): Define to 1.
24882 (nvptx_pc_set, nvptx_condjump_label): New function. Copy from jump.c.
24883 Add strict parameter.
24884 (prevent_branch_around_nothing): Insert dummy insn between branch to
24885 label and label with no ptx insn inbetween.
24886 * config/nvptx/nvptx.md (define_insn "fake_nop"): New insn.
24888 2018-01-24 Tom de Vries <tom@codesourcery.com>
24891 * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
24892 for neutered threads in warp.
24893 * config/nvptx/nvptx.md (define_insn "exit"): New insn.
24895 2018-01-24 Richard Biener <rguenther@suse.de>
24897 PR tree-optimization/83176
24898 * tree-chrec.c (chrec_fold_plus_1): Handle (signed T){(T) .. }
24901 2018-01-24 Richard Biener <rguenther@suse.de>
24903 PR tree-optimization/82819
24904 * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Avoid
24905 code generating pluses that are no-ops in the target precision.
24907 2018-01-24 Richard Biener <rguenther@suse.de>
24909 PR middle-end/84000
24910 * tree-cfg.c (replace_loop_annotate): Handle annot_expr_parallel_kind.
24912 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
24914 * cfgcleanup.c (try_crossjump_to_edge): Use combine_with_count
24915 to merge probabilities.
24916 * predict.c (probably_never_executed): Also mark as cold functions
24917 with global 0 profile and guessed local profile.
24918 * profile-count.c (profile_probability::combine_with_count): New
24920 * profile-count.h (profile_probability::operator*,
24921 profile_probability::operator*=, profile_probability::operator/,
24922 profile_probability::operator/=): Reduce precision to adjusted
24923 and set value to guessed on contradictory divisions.
24924 (profile_probability::combine_with_freq): Remove.
24925 (profile_probability::combine_wiht_count): Declare.
24926 (profile_count::force_nonzero):: Set to adjusted.
24927 (profile_count::probability_in):: Set quality to adjusted.
24928 * tree-ssa-tail-merge.c (replace_block_by): Use
24929 combine_with_count.
24931 2018-01-23 Andrew Waterman <andrew@sifive.com>
24932 Jim Wilson <jimw@sifive.com>
24934 * config/riscv/riscv.c (riscv_stack_boundary): New.
24935 (riscv_option_override): Set riscv_stack_boundary. Handle
24936 riscv_preferred_stack_boundary_arg.
24937 * config/riscv/riscv.h (MIN_STACK_BOUNDARY, ABI_STACK_BOUNDARY): New.
24938 (BIGGEST_ALIGNMENT): Set to STACK_BOUNDARY.
24939 (STACK_BOUNDARY): Set to riscv_stack_boundary.
24940 (RISCV_STACK_ALIGN): Use STACK_BOUNDARY.
24941 * config/riscv/riscv.opt (mpreferred-stack-boundary): New.
24942 * doc/invoke.tex (RISC-V Options): Add -mpreferred-stack-boundary.
24944 2018-01-23 H.J. Lu <hongjiu.lu@intel.com>
24947 * config/i386/i386.c (ix86_expand_prologue): Use cost reference
24948 of struct ix86_frame.
24949 (ix86_expand_epilogue): Likewise. Add a local variable for
24950 the reg_save_offset field in struct ix86_frame.
24952 2018-01-23 Bin Cheng <bin.cheng@arm.com>
24954 PR tree-optimization/82604
24955 * tree-loop-distribution.c (enum partition_kind): New enum item
24956 PKIND_PARTIAL_MEMSET.
24957 (partition_builtin_p): Support above new enum item.
24958 (generate_code_for_partition): Ditto.
24959 (compute_access_range): Differentiate cases that equality can be
24960 proven at all loops, the innermost loops or no loops.
24961 (classify_builtin_st, classify_builtin_ldst): Adjust call to above
24962 function. Set PKIND_PARTIAL_MEMSET for partition appropriately.
24963 (finalize_partitions, distribute_loop): Don't fuse partition of
24964 PKIND_PARTIAL_MEMSET kind when distributing 3-level loop nest.
24965 (prepare_perfect_loop_nest): Distribute 3-level loop nest only if
24966 parloop is enabled.
24968 2018-01-23 Martin Liska <mliska@suse.cz>
24970 * predict.def (PRED_INDIR_CALL): Set probability to PROB_EVEN in
24971 order to ignore the predictor.
24972 (PRED_POLYMORPHIC_CALL): Likewise.
24973 (PRED_RECURSIVE_CALL): Likewise.
24975 2018-01-23 Martin Liska <mliska@suse.cz>
24977 * tree-profile.c (tree_profiling): Print function header to
24978 aware reader which function we are working on.
24979 * value-prof.c (gimple_find_values_to_profile): Do not print
24980 not interesting value histograms.
24982 2018-01-23 Martin Liska <mliska@suse.cz>
24984 * profile-count.h (enum profile_quality): Add
24985 profile_uninitialized as the first value. Do not number values
24986 as they are zero based.
24987 (profile_count::verify): Update sanity check.
24988 (profile_probability::verify): Likewise.
24990 2018-01-23 Nathan Sidwell <nathan@acm.org>
24992 * doc/invoke.texi (ffor-scope): Deprecate.
24994 2018-01-23 David Malcolm <dmalcolm@redhat.com>
24996 PR tree-optimization/83510
24997 * domwalk.c (set_all_edges_as_executable): New function.
24998 (dom_walker::dom_walker): Convert bool param
24999 "skip_unreachable_blocks" to enum reachability. Move setup of
25000 edge flags to set_all_edges_as_executable and only do it when
25001 reachability is REACHABLE_BLOCKS.
25002 * domwalk.h (enum dom_walker::reachability): New enum.
25003 (dom_walker::dom_walker): Convert bool param
25004 "skip_unreachable_blocks" to enum reachability.
25005 (set_all_edges_as_executable): New decl.
25006 * graphite-scop-detection.c (gather_bbs::gather_bbs): Convert
25007 from false for "skip_unreachable_blocks" to ALL_BLOCKS for
25009 * tree-ssa-dom.c (dom_opt_dom_walker::dom_opt_dom_walker): Likewise,
25010 but converting true to REACHABLE_BLOCKS.
25011 * tree-ssa-sccvn.c (sccvn_dom_walker::sccvn_dom_walker): Likewise.
25013 (check_array_bounds_dom_walker::check_array_bounds_dom_walker):
25014 Likewise, but converting it to REACHABLE_BLOCKS_PRESERVING_FLAGS.
25015 (vrp_dom_walker::vrp_dom_walker): Likewise, but converting it to
25017 (vrp_prop::vrp_finalize): Call set_all_edges_as_executable
25018 if check_all_array_refs will be called.
25020 2018-01-23 David Malcolm <dmalcolm@redhat.com>
25022 * tree.c (selftest::test_location_wrappers): Add more test
25025 2018-01-23 David Malcolm <dmalcolm@redhat.com>
25027 * sbitmap.c (selftest::test_set_range): Fix memory leaks.
25028 (selftest::test_bit_in_range): Likewise.
25030 2018-01-23 Richard Sandiford <richard.sandiford@linaro.org>
25033 * doc/sourcebuild.texi (vect_float): Say that the selector
25034 only describes the situation when -funsafe-math-optimizations is on.
25035 (vect_float_strict): Document.
25037 2018-01-23 Richard Sandiford <richard.sandiford@linaro.org>
25039 PR tree-optimization/83965
25040 * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
25041 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern): Use it
25042 instead of checking only for a reduction.
25043 (vect_recog_widen_sum_pattern): Likewise.
25045 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
25047 * predict.c (probably_never_executed): Only use precise profile info.
25048 (compute_function_frequency): Skip after inlining hack since we now
25049 have quality checking.
25051 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
25053 * profile-count.h (profile_probability::very_unlikely,
25054 profile_probability::unlikely, profile_probability::even): Set
25055 precision to guessed.
25057 2018-01-23 Richard Biener <rguenther@suse.de>
25059 PR tree-optimization/83963
25060 * graphite-scop-detection.c (scop_detection::harmful_loop_in_region):
25061 Properly terminate dominator walk when crossing the exit edge not
25062 when visiting its source block.
25064 2018-01-23 Jakub Jelinek <jakub@redhat.com>
25067 * tree.c (maybe_wrap_with_location): Use NON_LVALUE_EXPR rather than
25068 VIEW_CONVERT_EXPR to wrap CONST_DECLs.
25070 2018-01-22 Jakub Jelinek <jakub@redhat.com>
25072 PR tree-optimization/83957
25073 * omp-expand.c (expand_omp_for_generic): Ignore virtual PHIs. Remove
25074 semicolon after for body surrounded by braces.
25076 PR tree-optimization/83081
25077 * profile-count.h (profile_probability::split): New method.
25078 * dojump.c (do_jump_1) <case TRUTH_ANDIF_EXPR, case TRUTH_ORIF_EXPR>:
25079 Use profile_probability::split.
25080 (do_compare_rtx_and_jump): Fix adjustment of probabilities
25081 when splitting a single conditional jump into 2.
25083 2018-01-22 David Malcolm <dmalcolm@redhat.com>
25085 PR tree-optimization/69452
25086 * tree-ssa-loop-im.c (class move_computations_dom_walker): Remove
25089 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
25091 * config/rl78/rl78-expand.md (bswaphi2): New define_expand.
25092 * config/rl78/rl78-virt.md (*bswaphi2_virt): New define_insn.
25093 * config/rl78/rl78-real.md (*bswaphi2_real): New define_insn.
25095 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
25097 * config/rl78/rl78-protos.h (rl78_split_movdi): New function
25099 * config/rl78/rl78.md (movdi): New define_expand.
25100 * config/rl78/rl78.c (rl78_split_movdi): New function.
25102 2018-01-22 Michael Meissner <meissner@linux.vnet.ibm.com>
25105 * config/rs6000/rs6000-protos.h (rs6000_split_signbit): Delete,
25107 * config/rs6000/rs6000.c (rs6000_split_signbit): Likewise.
25108 * config/rs6000/rs6000.md (signbit<mode>2): Change code for IEEE
25109 128-bit to produce an UNSPEC move to get the double word with the
25110 signbit and then a shift directly to do signbit.
25111 (signbit<mode>2_dm): Replace old IEEE 128-bit signbit
25112 implementation with a new version that just does either a direct
25113 move or a regular move. Move memory interface to separate insns.
25114 Move insns so they are next to the expander.
25115 (signbit<mode>2_dm_mem_be): New combiner insns to combine load
25116 with signbit move. Split big and little endian case.
25117 (signbit<mode>2_dm_mem_le): Likewise.
25118 (signbit<mode>2_dm_<su>ext): Delete, no longer used.
25119 (signbit<mode>2_dm2): Likewise.
25121 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
25123 * config/rl78/rl78.md (anddi3): New define_expand.
25125 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
25127 * config/rl78/rl78.md (umindi3): New define_expand.
25129 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
25131 * config/rl78/rl78.md (smindi3): New define_expand.
25133 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
25135 * config/rl78/rl78.md (smaxdi3): New define_expand.
25137 2018-01-22 Carl Love <cel@us.ibm.com>
25139 * config/rs6000/rs6000-builtin.def (ST_ELEMREV_V1TI, LD_ELEMREV_V1TI,
25140 LVX_V1TI): Add macro expansion.
25141 * config/rs6000/rs6000-c.c (altivec_builtin_types): Add argument
25142 definitions for VSX_BUILTIN_VEC_XST_BE, VSX_BUILTIN_VEC_ST,
25143 VSX_BUILTIN_VEC_XL, LD_ELEMREV_V1TI builtins.
25144 * config/rs6000/rs6000-p8swap.c (insn_is_swappable_p);
25145 Change check to determine if the instruction is a byte reversing
25146 entry. Fix typo in comment.
25147 * config/rs6000/rs6000.c (altivec_expand_builtin): Add case entry
25148 for VSX_BUILTIN_ST_ELEMREV_V1TI and VSX_BUILTIN_LD_ELEMREV_V1TI.
25149 Add def_builtin calls for new builtins.
25150 * config/rs6000/vsx.md (vsx_st_elemrev_v1ti, vsx_ld_elemrev_v1ti):
25151 Add define_insn expansion.
25153 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
25155 * config/rl78/rl78.md (umaxdi3): New define_expand.
25157 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
25159 * config/rl78/rl78.c (rl78_note_reg_set): Fixed dead reg check
25160 for non-QImode registers.
25162 2018-01-22 Richard Biener <rguenther@suse.de>
25164 PR tree-optimization/83963
25165 * graphite-scop-detection.c (scop_detection::get_sese): Delay
25166 including the loop exit block.
25167 (scop_detection::merge_sese): Likewise.
25168 (scop_detection::add_scop): Do it here instead.
25170 2018-01-22 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
25172 * doc/sourcebuild.texi (arm_softfloat): Document.
25174 2018-01-21 John David Anglin <danglin@gcc.gnu.org>
25177 * config/pa/pa.c (pa_function_ok_for_sibcall): Use
25178 targetm.binds_local_p instead of TREE_PUBLIC to check local binding.
25179 Move TARGET_PORTABLE_RUNTIME check after TARGET_64BIT check.
25181 2018-01-21 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
25182 David Edelsohn <dje.gcc@gmail.com>
25185 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
25186 Change "crset eq" to "crset 2".
25187 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
25188 (*call_indirect_aix<mode>_nospec): Likewise.
25189 (*call_value_indirect_aix<mode>_nospec): Likewise.
25190 (*call_indirect_elfv2<mode>_nospec): Likewise.
25191 (*call_value_indirect_elfv2<mode>_nospec): Likewise.
25192 (*sibcall_nonlocal_sysv<mode>): Change "crset eq" to "crset 2";
25193 change assembly output from . to $.
25194 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
25195 (indirect_jump<mode>_nospec): Change assembly output from . to $.
25196 (*tablejump<mode>_internal1_nospec): Likewise.
25198 2018-01-21 Oleg Endo <olegendo@gcc.gnu.org>
25201 * config/sh/sh_optimize_sett_clrt.cc:
25202 Use INCLUDE_ALGORITHM and INCLUDE_VECTOR instead of direct includes.
25204 2018-01-20 Richard Sandiford <richard.sandiford@linaro.org>
25206 PR tree-optimization/83940
25207 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Set
25208 offset_dt to vect_constant_def rather than vect_unknown_def_type.
25209 (vect_check_load_store_mask): Add a mask_dt_out parameter and
25210 use it to pass back the definition type.
25211 (vect_check_store_rhs): Likewise rhs_dt_out.
25212 (vect_build_gather_load_calls): Add a mask_dt argument and use
25213 it instead of a call to vect_is_simple_use.
25214 (vectorizable_store): Update calls to vect_check_load_store_mask
25215 and vect_check_store_rhs. Use the dt returned by the latter instead
25216 of scatter_src_dt. Use the cached mask_dt and gs_info.offset_dt
25217 instead of calls to vect_is_simple_use. Pass the scalar rather
25218 than the vector operand to vect_is_simple_use when handling
25219 second and subsequent copies of an rhs value.
25220 (vectorizable_load): Update calls to vect_check_load_store_mask
25221 and vect_build_gather_load_calls. Use the cached mask_dt and
25222 gs_info.offset_dt instead of calls to vect_is_simple_use.
25224 2018-01-20 Jakub Jelinek <jakub@redhat.com>
25226 PR middle-end/83945
25227 * tree-emutls.c: Include gimplify.h.
25228 (lower_emutls_2): New function.
25229 (lower_emutls_1): If ADDR_EXPR is a gimple invariant and walk_tree
25230 with lower_emutls_2 callback finds some TLS decl in it, unshare_expr
25231 it before further processing.
25234 * simplify-rtx.c (simplify_binary_operation_1) <case UMOD>: Use
25235 UINTVAL (trueop1) instead of INTVAL (op1).
25237 2018-01-19 Jakub Jelinek <jakub@redhat.com>
25241 * dwarf2cfi.c (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define to
25242 INCOMING_FRAME_SP_OFFSET if not defined.
25243 (scan_trace): Add ENTRY argument. If true and
25244 DEFAULT_INCOMING_FRAME_SP_OFFSET != INCOMING_FRAME_SP_OFFSET,
25245 emit a note to adjust the CFA offset.
25246 (create_cfi_notes): Adjust scan_trace callers.
25247 (create_cie_data): Use DEFAULT_INCOMING_FRAME_SP_OFFSET rather than
25248 INCOMING_FRAME_SP_OFFSET in the CIE.
25249 * config/i386/i386.h (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define.
25250 * config/stormy16/stormy16.h (DEFAULT_INCOMING_FRAME_SP_OFFSET):
25252 * doc/tm.texi.in (DEFAULT_INCOMING_FRAME_SP_OFFSET): Document.
25253 * doc/tm.texi: Regenerated.
25255 2018-01-19 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
25257 PR rtl-optimization/83147
25258 * lra-constraints.c (remove_inheritance_pseudos): Use
25259 lra_substitute_pseudo_within_insn.
25261 2018-01-19 Tom de Vries <tom@codesourcery.com>
25262 Cesar Philippidis <cesar@codesourcery.com>
25265 * config/nvptx/nvptx.c (nvptx_single): Fix jit workaround.
25267 2018-01-19 Cesar Philippidis <cesar@codesourcery.com>
25270 * config/nvptx/nvptx.c (output_init_frag): Don't use generic address
25271 spaces for function labels.
25273 2018-01-19 Martin Liska <mliska@suse.cz>
25275 * predict.def (PRED_LOOP_EXIT): Change from 85 to 89.
25276 (PRED_LOOP_EXIT_WITH_RECURSION): Change from 72 to 78.
25277 (PRED_LOOP_EXTRA_EXIT): Change from 83 to 67.
25278 (PRED_OPCODE_POSITIVE): Change from 64 to 59.
25279 (PRED_TREE_OPCODE_POSITIVE): Change from 64 to 59.
25280 (PRED_CONST_RETURN): Change from 69 to 65.
25281 (PRED_NULL_RETURN): Change from 91 to 71.
25282 (PRED_LOOP_IV_COMPARE_GUESS): Change from 98 to 64.
25283 (PRED_LOOP_GUARD): Change from 66 to 73.
25285 2018-01-19 Martin Liska <mliska@suse.cz>
25287 * predict.c (predict_insn_def): Add new assert.
25288 (struct branch_predictor): Change type to signed integer.
25289 (test_prediction_value_range): Amend test to cover
25290 PROB_UNINITIALIZED.
25291 * predict.def (PRED_LOOP_ITERATIONS): Use the new constant.
25292 (PRED_LOOP_ITERATIONS_GUESSED): Likewise.
25293 (PRED_LOOP_ITERATIONS_MAX): Likewise.
25294 (PRED_LOOP_IV_COMPARE): Likewise.
25295 * predict.h (PROB_UNINITIALIZED): Define new constant.
25297 2018-01-19 Martin Liska <mliska@suse.cz>
25299 * predict.c (dump_prediction): Add new format for
25300 analyze_brprob.py script which is enabled with -details
25302 * profile-count.h (precise_p): New function.
25304 2018-01-19 Richard Sandiford <richard.sandiford@linaro.org>
25306 PR tree-optimization/83922
25307 * tree-vect-loop.c (vect_verify_full_masking): Return false if
25308 there are no statements that need masking.
25309 (vect_active_double_reduction_p): New function.
25310 (vect_analyze_loop_operations): Use it when handling phis that
25311 are not in the loop header.
25313 2018-01-19 Richard Sandiford <richard.sandiford@linaro.org>
25315 PR tree-optimization/83914
25316 * tree-vect-loop.c (vectorizable_induction): Don't convert
25317 init_expr or apply the peeling adjustment for inductions
25318 that are nested within the vectorized loop.
25320 2018-01-19 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
25322 * config/arm/thumb2.md (*thumb2_negsi2_short): Use RSB mnemonic
25325 2018-01-18 Jakub Jelinek <jakub@redhat.com>
25329 * function.h (gimplify_parameters): Add gimple_seq * argument.
25330 * function.c: Include gimple.h and options.h.
25331 (gimplify_parameters): Add cleanup argument, add CLOBBER stmts
25332 for the added local temporaries if needed.
25333 * gimplify.c (gimplify_body): Adjust gimplify_parameters caller,
25334 if there are any parameter cleanups, wrap whole body into a
25335 try/finally with the cleanups.
25337 2018-01-18 Wilco Dijkstra <wdijkstr@arm.com>
25340 * config/aarch64/aarch64.c (aarch64_legitimate_constant_p):
25341 Use GET_MODE_CLASS for scalar floating point.
25343 2018-01-18 Jan Hubicka <hubicka@ucw.cz>
25347 * cgraphclones.c (cgraph_node::create_version_clone_with_body):
25348 Fix call of call_cgraph_insertion_hooks.
25350 2018-01-18 Martin Sebor <msebor@redhat.com>
25352 * doc/invoke.texi (-Wclass-memaccess): Tweak text.
25354 2018-01-18 Jan Hubicka <hubicka@ucw.cz>
25357 * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Update edge
25360 2018-01-18 Boris Kolpackov <boris@codesynthesis.com>
25363 * common.opt: (-ffile-prefix-map): New option.
25364 * opts.c (common_handle_option): Defer it.
25365 * opts-global.c (handle_common_deferred_options): Handle it.
25366 * debug.h (remap_debug_filename, add_debug_prefix_map): Move to...
25367 * file-prefix-map.h: New file.
25368 (remap_debug_filename, add_debug_prefix_map): ...here.
25369 (add_macro_prefix_map, add_file_prefix_map, remap_macro_filename): New.
25370 * final.c (debug_prefix_map, add_debug_prefix_map
25371 remap_debug_filename): Move to...
25372 * file-prefix-map.c: New file.
25373 (file_prefix_map, add_prefix_map, remap_filename) ...here and rename,
25374 generalize, get rid of alloca(), use strrchr() instead of strchr().
25375 (add_macro_prefix_map, add_debug_prefix_map, add_file_prefix_map):
25376 Implement in terms of add_prefix_map().
25377 (remap_macro_filename, remap_debug_filename): Implement in term of
25379 * Makefile.in (OBJS, PLUGIN_HEADERS): Add new files.
25380 * builtins.c (fold_builtin_FILE): Call remap_macro_filename().
25381 * dbxout.c: Include file-prefix-map.h.
25382 * varasm.c: Likewise.
25383 * vmsdbgout.c: Likewise.
25384 * xcoffout.c: Likewise.
25385 * dwarf2out.c: Likewise plus omit new options from DW_AT_producer.
25386 * doc/cppopts.texi (-fmacro-prefix-map): Document.
25387 * doc/invoke.texi (-ffile-prefix-map): Document.
25388 (-fdebug-prefix-map): Update description.
25390 2018-01-18 Martin Liska <mliska@suse.cz>
25392 * config/i386/i386.c (indirect_thunk_name): Document that also
25394 (output_indirect_thunk): Document why both instructions
25395 (pause and lfence) are generated.
25397 2018-01-18 Richard Biener <rguenther@suse.de>
25399 PR tree-optimization/83887
25400 * graphite-scop-detection.c
25401 (scop_detection::get_nearest_dom_with_single_entry): Remove.
25402 (scop_detection::get_nearest_pdom_with_single_exit): Likewise.
25403 (scop_detection::merge_sese): Re-implement with a flood-fill
25404 algorithm that properly finds a SESE region if it exists.
25406 2018-01-18 Jakub Jelinek <jakub@redhat.com>
25409 * match.pd ((P + A) - P, P - (P + A), (P + A) - (P + B)): For
25410 pointer_diff optimizations use view_convert instead of convert.
25412 2018-01-17 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
25414 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
25415 Generate different code for -mno-speculate-indirect-jumps.
25416 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
25417 (*call_indirect_aix<mode>): Disable for
25418 -mno-speculate-indirect-jumps.
25419 (*call_indirect_aix<mode>_nospec): New define_insn.
25420 (*call_value_indirect_aix<mode>): Disable for
25421 -mno-speculate-indirect-jumps.
25422 (*call_value_indirect_aix<mode>_nospec): New define_insn.
25423 (*sibcall_nonlocal_sysv<mode>): Generate different code for
25424 -mno-speculate-indirect-jumps.
25425 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
25427 2018-01-17 Michael Meissner <meissner@linux.vnet.ibm.com>
25429 * config/rs6000/rs6000.c (rs6000_emit_move): If we load or store a
25430 long double type, set the flags for noting the default long double
25431 type, even if we don't pass or return a long double type.
25433 2018-01-17 Jan Hubicka <hubicka@ucw.cz>
25436 * ipa-inline.c (flatten_function): Do not overwrite final inlining
25439 2018-01-17 Will Schmidt <will_schmidt@vnet.ibm.com>
25441 * config/rs6000/rs6000.c (rs6000_gimple_builtin): Add gimple folding
25442 support for merge[hl].
25443 (fold_mergehl_helper): New helper function.
25444 (tree-vector-builder.h): New #include for tree_vector_builder usage.
25445 * config/rs6000/altivec.md (altivec_vmrghw_direct): Add xxmrghw insn.
25446 (altivec_vmrglw_direct): Add xxmrglw insn.
25448 2018-01-17 Andrew Waterman <andrew@sifive.com>
25450 * config/riscv/riscv.c (riscv_conditional_register_usage): If
25451 UNITS_PER_FP_ARG is 0, set call_used_regs to 1 for all FP regs.
25453 2018-01-17 David Malcolm <dmalcolm@redhat.com>
25456 * ipa-devirt.c (add_type_duplicate): When comparing memory layout,
25457 call the lto_location_cache before reading the
25458 DECL_SOURCE_LOCATION of the types.
25460 2018-01-17 Wilco Dijkstra <wdijkstr@arm.com>
25461 Richard Sandiford <richard.sandiford@linaro.org>
25463 * config/aarch64/aarch64.md (movti_aarch64): Use Uti constraint.
25464 * config/aarch64/aarch64.c (aarch64_mov128_immediate): New function.
25465 (aarch64_legitimate_constant_p): Just support CONST_DOUBLE
25466 SF/DF/TF mode to avoid creating illegal CONST_WIDE_INT immediates.
25467 * config/aarch64/aarch64-protos.h (aarch64_mov128_immediate):
25469 * config/aarch64/constraints.md (aarch64_movti_operand):
25471 * config/aarch64/predicates.md (Uti): Add new constraint.
25473 2018-01-17 Carl Love <cel@us.ibm.com>
25475 * config/rs6000/vsx.md (define_expand xl_len_r,
25476 define_expand stxvl, define_expand *stxvl): Add match_dup argument.
25477 (define_insn): Add, match_dup 1 argument to define_insn stxvll and
25479 (define_expand, define_insn): Move the shift left from the
25480 define_insn to the define_expand for lxvl and stxvl instructions.
25481 * config/rs6000/rs6000-builtin.def (BU_P9V_64BIT_VSX_2): Change LXVL
25482 and XL_LEN_R definitions to PURE.
25484 2018-01-17 Uros Bizjak <ubizjak@gmail.com>
25486 * config/i386/i386.c (indirect_thunk_name): Declare regno
25487 as unsigned int. Compare regno with INVALID_REGNUM.
25488 (output_indirect_thunk): Ditto.
25489 (output_indirect_thunk_function): Ditto.
25490 (ix86_code_end): Declare regno as unsigned int. Use INVALID_REGNUM
25491 in the call to output_indirect_thunk_function.
25493 2018-01-17 Richard Sandiford <richard.sandiford@linaro.org>
25495 PR middle-end/83884
25496 * expr.c (expand_expr_real_1): Use the size of GET_MODE (op0)
25497 rather than the size of inner_type to determine the stack slot size
25498 when handling VIEW_CONVERT_EXPRs on strict-alignment targets.
25500 2018-01-16 Sebastian Peryt <sebastian.peryt@intel.com>
25503 * config/i386/i386.c (ix86_option_override_internal): Add PTA_RDRND
25506 2018-01-16 Michael Meissner <meissner@linux.vnet.ibm.com>
25508 * config.gcc (powerpc*-linux*-*): Add support for 64-bit little
25509 endian Linux systems to optionally enable multilibs for selecting
25510 the long double type if the user configured an explicit type.
25511 * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Indicate we
25512 have no long double multilibs if not defined.
25513 * config/rs6000/rs6000.c (rs6000_option_override_internal): Do not
25514 warn if the user used -mabi={ieee,ibm}longdouble and we built
25515 multilibs for long double.
25516 * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Define as the
25517 appropriate multilib option.
25518 (MULTILIB_DEFAULTS): Add MULTILIB_DEFAULTS_IEEE to the default
25520 * config/rs6000/t-ldouble-linux64le-ibm: New configuration files
25521 for building long double multilibs.
25522 * config/rs6000/t-ldouble-linux64le-ieee: Likewise.
25524 2018-01-16 John David Anglin <danglin@gcc.gnu.org>
25526 * config.gcc (hppa*-*-linux*): Change callee copies ABI to caller
25529 * config/pa.h (MALLOC_ABI_ALIGNMENT): Set 32-bit alignment default to
25531 * config/pa/pa32-linux.h (MALLOC_ABI_ALIGNMENT): Set alignment to
25534 * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Cleanup type and mode
25537 * config/pa/pa.c (pa_function_arg_size): Apply CEIL to GET_MODE_SIZE
25540 2018-01-16 Eric Botcazou <ebotcazou@adacore.com>
25542 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For an
25543 ADDR_EXPR, do not count the offset of a COMPONENT_REF twice.
25545 2018-01-16 Kelvin Nilsen <kelvin@gcc.gnu.org>
25547 * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Generate
25548 different rtl trees depending on TARGET_64BIT.
25549 (rs6000_gen_lvx): Likewise.
25551 2018-01-16 Eric Botcazou <ebotcazou@adacore.com>
25553 * config/visium/visium.md (nop): Tweak comment.
25554 (hazard_nop): Likewise.
25556 2018-01-16 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
25558 * config/rs6000/rs6000.c (rs6000_opt_vars): Add entry for
25559 -mspeculate-indirect-jumps.
25560 * config/rs6000/rs6000.md (*call_indirect_elfv2<mode>): Disable
25561 for -mno-speculate-indirect-jumps.
25562 (*call_indirect_elfv2<mode>_nospec): New define_insn.
25563 (*call_value_indirect_elfv2<mode>): Disable for
25564 -mno-speculate-indirect-jumps.
25565 (*call_value_indirect_elfv2<mode>_nospec): New define_insn.
25566 (indirect_jump): Emit different RTL for
25567 -mno-speculate-indirect-jumps.
25568 (*indirect_jump<mode>): Disable for
25569 -mno-speculate-indirect-jumps.
25570 (*indirect_jump<mode>_nospec): New define_insn.
25571 (tablejump): Emit different RTL for
25572 -mno-speculate-indirect-jumps.
25573 (tablejumpsi): Disable for -mno-speculate-indirect-jumps.
25574 (tablejumpsi_nospec): New define_expand.
25575 (tablejumpdi): Disable for -mno-speculate-indirect-jumps.
25576 (tablejumpdi_nospec): New define_expand.
25577 (*tablejump<mode>_internal1): Disable for
25578 -mno-speculate-indirect-jumps.
25579 (*tablejump<mode>_internal1_nospec): New define_insn.
25580 * config/rs6000/rs6000.opt (mspeculate-indirect-jumps): New
25583 2018-01-16 Artyom Skrobov tyomitch@gmail.com
25585 * caller-save.c (insert_save): Drop unnecessary parameter. All
25588 2018-01-16 Jakub Jelinek <jakub@redhat.com>
25589 Richard Biener <rguenth@suse.de>
25592 * gimplify.c (gimplify_one_sizepos): For is_gimple_constant (expr)
25593 return early, inline manually is_gimple_sizepos. Make sure if we
25594 call gimplify_expr we don't end up with a gimple constant.
25595 * tree.c (variably_modified_type_p): Don't return true for
25596 is_gimple_constant (_t). Inline manually is_gimple_sizepos.
25597 * gimplify.h (is_gimple_sizepos): Remove.
25599 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
25601 PR tree-optimization/83857
25602 * tree-vect-loop.c (vect_analyze_loop_operations): Don't call
25603 vectorizable_live_operation for pure SLP statements.
25604 (vectorizable_live_operation): Handle PHIs.
25606 2018-01-16 Richard Biener <rguenther@suse.de>
25608 PR tree-optimization/83867
25609 * tree-vect-stmts.c (vect_transform_stmt): Precompute
25610 nested_in_vect_loop_p since the scalar stmt may get invalidated.
25612 2018-01-16 Jakub Jelinek <jakub@redhat.com>
25615 * stor-layout.c (handle_warn_if_not_align): Use byte_position and
25616 multiple_of_p instead of unchecked tree_to_uhwi and UHWI check.
25617 If off is not INTEGER_CST, issue a may not be aligned warning
25618 rather than isn't aligned. Use isn%'t rather than isn't.
25619 * fold-const.c (multiple_of_p) <case BIT_AND_EXPR>: Don't fall through
25621 <case MULT_EXPR>: Improve the case when bottom and one of the
25622 MULT_EXPR operands are INTEGER_CSTs and bottom is multiple of that
25623 operand, in that case check if the other operand is multiple of
25624 bottom divided by the INTEGER_CST operand.
25626 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
25629 * config/pa/pa.h (FUNCTION_ARG_SIZE): Delete.
25630 * config/pa/pa-protos.h (pa_function_arg_size): Declare.
25631 * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Use
25632 pa_function_arg_size instead of FUNCTION_ARG_SIZE.
25633 * config/pa/pa.c (pa_function_arg_advance): Likewise.
25634 (pa_function_arg, pa_arg_partial_bytes): Likewise.
25635 (pa_function_arg_size): New function.
25637 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
25639 * fold-const.c (fold_ternary_loc): Construct the vec_perm_indices
25640 in a separate statement.
25642 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
25644 PR tree-optimization/83847
25645 * tree-vect-data-refs.c (vect_analyze_data_ref_accesses): Don't
25646 group gathers and scatters.
25648 2018-01-16 Jakub Jelinek <jakub@redhat.com>
25650 PR rtl-optimization/86620
25651 * params.def (max-sched-ready-insns): Bump minimum value to 1.
25653 PR rtl-optimization/83213
25654 * recog.c (peep2_attempt): Copy over CROSSING_JUMP_P from peepinsn
25655 to last if both are JUMP_INSNs.
25657 PR tree-optimization/83843
25658 * gimple-ssa-store-merging.c
25659 (imm_store_chain_info::output_merged_store): Handle bit_not_p on
25660 store_immediate_info for bswap/nop orig_stores.
25662 2018-01-15 Andrew Waterman <andrew@sifive.com>
25664 * config/riscv/riscv.c (riscv_rtx_costs) <MULT>: Increase cost if
25666 <UDIV>: Increase cost if !TARGET_DIV.
25668 2018-01-15 Segher Boessenkool <segher@kernel.crashing.org>
25670 * config/rs6000/rs6000.md (define_attr "type"): Remove delayed_cr.
25671 (define_attr "cr_logical_3op"): New.
25672 (cceq_ior_compare): Adjust.
25673 (cceq_ior_compare_complement): Adjust.
25674 (*cceq_rev_compare): Adjust.
25675 * config/rs6000/rs6000.c (rs6000_adjust_cost): Adjust.
25676 (is_cracked_insn): Adjust.
25677 (insn_must_be_first_in_group): Adjust.
25678 * config/rs6000/40x.md: Adjust.
25679 * config/rs6000/440.md: Adjust.
25680 * config/rs6000/476.md: Adjust.
25681 * config/rs6000/601.md: Adjust.
25682 * config/rs6000/603.md: Adjust.
25683 * config/rs6000/6xx.md: Adjust.
25684 * config/rs6000/7450.md: Adjust.
25685 * config/rs6000/7xx.md: Adjust.
25686 * config/rs6000/8540.md: Adjust.
25687 * config/rs6000/cell.md: Adjust.
25688 * config/rs6000/e300c2c3.md: Adjust.
25689 * config/rs6000/e500mc.md: Adjust.
25690 * config/rs6000/e500mc64.md: Adjust.
25691 * config/rs6000/e5500.md: Adjust.
25692 * config/rs6000/e6500.md: Adjust.
25693 * config/rs6000/mpc.md: Adjust.
25694 * config/rs6000/power4.md: Adjust.
25695 * config/rs6000/power5.md: Adjust.
25696 * config/rs6000/power6.md: Adjust.
25697 * config/rs6000/power7.md: Adjust.
25698 * config/rs6000/power8.md: Adjust.
25699 * config/rs6000/power9.md: Adjust.
25700 * config/rs6000/rs64.md: Adjust.
25701 * config/rs6000/titan.md: Adjust.
25703 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
25705 * config/i386/predicates.md (indirect_branch_operand): Rewrite
25706 ix86_indirect_branch_register logic.
25708 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
25710 * config/i386/constraints.md (Bs): Update
25711 ix86_indirect_branch_register check. Don't check
25712 ix86_indirect_branch_register with GOT_memory_operand.
25714 * config/i386/predicates.md (GOT_memory_operand): Don't check
25715 ix86_indirect_branch_register here.
25716 (GOT32_symbol_operand): Likewise.
25718 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
25720 * config/i386/predicates.md (constant_call_address_operand):
25721 Rewrite ix86_indirect_branch_register logic.
25722 (sibcall_insn_operand): Likewise.
25724 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
25726 * config/i386/constraints.md (Bs): Replace
25727 ix86_indirect_branch_thunk_register with
25728 ix86_indirect_branch_register.
25730 * config/i386/i386.md (indirect_jump): Likewise.
25731 (tablejump): Likewise.
25732 (*sibcall_memory): Likewise.
25733 (*sibcall_value_memory): Likewise.
25734 Peepholes of indirect call and jump via memory: Likewise.
25735 * config/i386/i386.opt: Likewise.
25736 * config/i386/predicates.md (indirect_branch_operand): Likewise.
25737 (GOT_memory_operand): Likewise.
25738 (call_insn_operand): Likewise.
25739 (sibcall_insn_operand): Likewise.
25740 (GOT32_symbol_operand): Likewise.
25742 2018-01-15 Jakub Jelinek <jakub@redhat.com>
25744 PR middle-end/83837
25745 * omp-expand.c (expand_omp_atomic_pipeline): Use loaded_val
25746 type rather than type addr's type points to.
25747 (expand_omp_atomic_mutex): Likewise.
25748 (expand_omp_atomic): Likewise.
25750 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
25753 * config/i386/i386.c (output_indirect_thunk_function): Use
25754 ASM_OUTPUT_LABEL, instead of ASM_OUTPUT_DEF, for TARGET_MACHO
25755 for __x86_return_thunk.
25757 2018-01-15 Richard Biener <rguenther@suse.de>
25759 PR middle-end/83850
25760 * expmed.c (extract_bit_field_1): Fix typo.
25762 2018-01-15 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
25765 * config/arm/iterators.md (VF): New mode iterator.
25766 * config/arm/neon.md (neon_vabd<mode>_2): Use the above.
25767 Remove integer-related logic from pattern.
25768 (neon_vabd<mode>_3): Likewise.
25770 2018-01-15 Jakub Jelinek <jakub@redhat.com>
25772 PR middle-end/82694
25773 * common.opt (fstrict-overflow): No longer an alias.
25774 (fwrapv-pointer): New option.
25775 * tree.h (TYPE_OVERFLOW_WRAPS, TYPE_OVERFLOW_UNDEFINED): Define
25776 also for pointer types based on flag_wrapv_pointer.
25777 * opts.c (common_handle_option) <case OPT_fstrict_overflow>: Set
25778 opts->x_flag_wrap[pv] to !value, clear opts->x_flag_trapv if
25779 opts->x_flag_wrapv got set.
25780 * fold-const.c (fold_comparison, fold_binary_loc): Revert 2017-08-01
25781 changes, just use TYPE_OVERFLOW_UNDEFINED on pointer type instead of
25782 POINTER_TYPE_OVERFLOW_UNDEFINED.
25783 * match.pd: Likewise in address comparison pattern.
25784 * doc/invoke.texi: Document -fwrapv and -fstrict-overflow.
25786 2018-01-15 Richard Biener <rguenther@suse.de>
25789 * tree.c (free_lang_data_in_type): Always unlink TYPE_DECLs
25790 from TYPE_FIELDS. Free TYPE_BINFO if not used by devirtualization.
25791 Reset type names to their identifier if their TYPE_DECL doesn't
25792 have linkage (and thus is used for ODR and devirt).
25793 (save_debug_info_for_decl): Remove.
25794 (save_debug_info_for_type): Likewise.
25795 (add_tree_to_fld_list): Adjust.
25796 * tree-pretty-print.c (dump_generic_node): Make dumping of
25797 type names more robust.
25799 2018-01-15 Richard Biener <rguenther@suse.de>
25801 * BASE-VER: Bump to 8.0.1.
25803 2018-01-14 Martin Sebor <msebor@redhat.com>
25806 * builtins.c (check_access): Avoid warning when the no-warning bit
25809 2018-01-14 Cory Fields <cory-nospam-@coryfields.com>
25811 * tree-ssa-loop-im.c (sort_bbs_in_loop_postorder_cmp): Stabilize sort.
25812 * ira-color (allocno_hard_regs_compare): Likewise.
25814 2018-01-14 Nathan Rossi <nathan@nathanrossi.com>
25817 * config/microblaze/microblaze.c (microblaze_asm_output_ident):
25818 Use .pushsection/.popsection.
25820 2018-01-14 Martin Sebor <msebor@redhat.com>
25823 * doc/invoke.texi (-Wlass-memaccess): Document suppression by casting.
25825 2018-01-14 Jakub Jelinek <jakub@redhat.com>
25827 * config.gcc (i[34567]86-*-*): Remove one duplicate gfniintrin.h
25828 entry from extra_headers.
25829 (x86_64-*-*): Remove two duplicate gfniintrin.h entries from
25830 extra_headers, make the list bitwise identical to the i?86-*-* one.
25832 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
25834 * config/i386/i386.c (ix86_set_indirect_branch_type): Disallow
25835 -mcmodel=large with -mindirect-branch=thunk,
25836 -mindirect-branch=thunk-extern, -mfunction-return=thunk and
25837 -mfunction-return=thunk-extern.
25838 * doc/invoke.texi: Document -mcmodel=large is incompatible with
25839 -mindirect-branch=thunk, -mindirect-branch=thunk-extern,
25840 -mfunction-return=thunk and -mfunction-return=thunk-extern.
25842 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
25844 * config/i386/i386.c (print_reg): Print the name of the full
25845 integer register without '%'.
25846 (ix86_print_operand): Handle 'V'.
25847 * doc/extend.texi: Document 'V' modifier.
25849 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
25851 * config/i386/constraints.md (Bs): Disallow memory operand for
25852 -mindirect-branch-register.
25854 * config/i386/predicates.md (indirect_branch_operand): Likewise.
25855 (GOT_memory_operand): Likewise.
25856 (call_insn_operand): Likewise.
25857 (sibcall_insn_operand): Likewise.
25858 (GOT32_symbol_operand): Likewise.
25859 * config/i386/i386.md (indirect_jump): Call convert_memory_address
25860 for -mindirect-branch-register.
25861 (tablejump): Likewise.
25862 (*sibcall_memory): Likewise.
25863 (*sibcall_value_memory): Likewise.
25864 Disallow peepholes of indirect call and jump via memory for
25865 -mindirect-branch-register.
25866 (*call_pop): Replace m with Bw.
25867 (*call_value_pop): Likewise.
25868 (*sibcall_pop_memory): Replace m with Bs.
25869 * config/i386/i386.opt (mindirect-branch-register): New option.
25870 * doc/invoke.texi: Document -mindirect-branch-register option.
25872 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
25874 * config/i386/i386-protos.h (ix86_output_function_return): New.
25875 * config/i386/i386.c (ix86_set_indirect_branch_type): Also
25876 set function_return_type.
25877 (indirect_thunk_name): Add ret_p to indicate thunk for function
25879 (output_indirect_thunk_function): Pass false to
25880 indirect_thunk_name.
25881 (ix86_output_indirect_branch_via_reg): Likewise.
25882 (ix86_output_indirect_branch_via_push): Likewise.
25883 (output_indirect_thunk_function): Create alias for function
25884 return thunk if regno < 0.
25885 (ix86_output_function_return): New function.
25886 (ix86_handle_fndecl_attribute): Handle function_return.
25887 (ix86_attribute_table): Add function_return.
25888 * config/i386/i386.h (machine_function): Add
25889 function_return_type.
25890 * config/i386/i386.md (simple_return_internal): Use
25891 ix86_output_function_return.
25892 (simple_return_internal_long): Likewise.
25893 * config/i386/i386.opt (mfunction-return=): New option.
25894 (indirect_branch): Mention -mfunction-return=.
25895 * doc/extend.texi: Document function_return function attribute.
25896 * doc/invoke.texi: Document -mfunction-return= option.
25898 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
25900 * config/i386/i386-opts.h (indirect_branch): New.
25901 * config/i386/i386-protos.h (ix86_output_indirect_jmp): Likewise.
25902 * config/i386/i386.c (ix86_using_red_zone): Disallow red-zone
25903 with local indirect jump when converting indirect call and jump.
25904 (ix86_set_indirect_branch_type): New.
25905 (ix86_set_current_function): Call ix86_set_indirect_branch_type.
25906 (indirectlabelno): New.
25907 (indirect_thunk_needed): Likewise.
25908 (indirect_thunk_bnd_needed): Likewise.
25909 (indirect_thunks_used): Likewise.
25910 (indirect_thunks_bnd_used): Likewise.
25911 (INDIRECT_LABEL): Likewise.
25912 (indirect_thunk_name): Likewise.
25913 (output_indirect_thunk): Likewise.
25914 (output_indirect_thunk_function): Likewise.
25915 (ix86_output_indirect_branch_via_reg): Likewise.
25916 (ix86_output_indirect_branch_via_push): Likewise.
25917 (ix86_output_indirect_branch): Likewise.
25918 (ix86_output_indirect_jmp): Likewise.
25919 (ix86_code_end): Call output_indirect_thunk_function if needed.
25920 (ix86_output_call_insn): Call ix86_output_indirect_branch if
25922 (ix86_handle_fndecl_attribute): Handle indirect_branch.
25923 (ix86_attribute_table): Add indirect_branch.
25924 * config/i386/i386.h (machine_function): Add indirect_branch_type
25925 and has_local_indirect_jump.
25926 * config/i386/i386.md (indirect_jump): Set has_local_indirect_jump
25928 (tablejump): Likewise.
25929 (*indirect_jump): Use ix86_output_indirect_jmp.
25930 (*tablejump_1): Likewise.
25931 (simple_return_indirect_internal): Likewise.
25932 * config/i386/i386.opt (mindirect-branch=): New option.
25933 (indirect_branch): New.
25936 (thunk-inline): Likewise.
25937 (thunk-extern): Likewise.
25938 * doc/extend.texi: Document indirect_branch function attribute.
25939 * doc/invoke.texi: Document -mindirect-branch= option.
25941 2018-01-14 Jan Hubicka <hubicka@ucw.cz>
25944 * ipa-inline.c (edge_badness): Tolerate roundoff errors.
25946 2018-01-14 Richard Sandiford <richard.sandiford@linaro.org>
25948 * ipa-inline.c (want_inline_small_function_p): Return false if
25949 inlining has already failed with CIF_FINAL_ERROR.
25950 (update_caller_keys): Call want_inline_small_function_p before
25952 (update_callee_keys): Likewise.
25954 2018-01-10 Kelvin Nilsen <kelvin@gcc.gnu.org>
25956 * config/rs6000/rs6000-p8swap.c (rs6000_sum_of_two_registers_p):
25958 (rs6000_quadword_masked_address_p): Likewise.
25959 (quad_aligned_load_p): Likewise.
25960 (quad_aligned_store_p): Likewise.
25961 (const_load_sequence_p): Add comment to describe the outer-most loop.
25962 (mimic_memory_attributes_and_flags): New function.
25963 (rs6000_gen_stvx): Likewise.
25964 (replace_swapped_aligned_store): Likewise.
25965 (rs6000_gen_lvx): Likewise.
25966 (replace_swapped_aligned_load): Likewise.
25967 (replace_swapped_load_constant): Capitalize argument name in
25968 comment describing this function.
25969 (rs6000_analyze_swaps): Add a third pass to search for vector loads
25970 and stores that access quad-word aligned addresses and replace
25971 with stvx or lvx instructions when appropriate.
25972 * config/rs6000/rs6000-protos.h (rs6000_sum_of_two_registers_p):
25973 New function prototype.
25974 (rs6000_quadword_masked_address_p): Likewise.
25975 (rs6000_gen_lvx): Likewise.
25976 (rs6000_gen_stvx): Likewise.
25977 * config/rs6000/vsx.md (*vsx_le_perm_load_<mode>): For modes
25978 VSX_D (V2DF, V2DI), modify this split to select lvx instruction
25979 when memory address is aligned.
25980 (*vsx_le_perm_load_<mode>): For modes VSX_W (V4SF, V4SI), modify
25981 this split to select lvx instruction when memory address is aligned.
25982 (*vsx_le_perm_load_v8hi): Modify this split to select lvx
25983 instruction when memory address is aligned.
25984 (*vsx_le_perm_load_v16qi): Likewise.
25985 (four unnamed splitters): Modify to select the stvx instruction
25986 when memory is aligned.
25988 2018-01-13 Jan Hubicka <hubicka@ucw.cz>
25990 * predict.c (determine_unlikely_bbs): Handle correctly BBs
25991 which appears in the queue multiple times.
25993 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
25994 Alan Hayward <alan.hayward@arm.com>
25995 David Sherwood <david.sherwood@arm.com>
25997 * tree-vectorizer.h (vec_lower_bound): New structure.
25998 (_loop_vec_info): Add check_nonzero and lower_bounds.
25999 (LOOP_VINFO_CHECK_NONZERO): New macro.
26000 (LOOP_VINFO_LOWER_BOUNDS): Likewise.
26001 (LOOP_REQUIRES_VERSIONING_FOR_ALIAS): Check lower_bounds too.
26002 * tree-data-ref.h (dr_with_seg_len): Add access_size and align
26003 fields. Make seg_len the distance travelled, not including the
26005 (dr_direction_indicator): Declare.
26006 (dr_zero_step_indicator): Likewise.
26007 (dr_known_forward_stride_p): Likewise.
26008 * tree-data-ref.c: Include stringpool.h, tree-vrp.h and
26010 (runtime_alias_check_p): Allow runtime alias checks with
26012 (operator ==): Compare access_size and align.
26013 (prune_runtime_alias_test_list): Rework for new distinction between
26014 the access_size and seg_len.
26015 (create_intersect_range_checks_index): Likewise. Cope with polynomial
26017 (get_segment_min_max): New function.
26018 (create_intersect_range_checks): Use it.
26019 (dr_step_indicator): New function.
26020 (dr_direction_indicator): Likewise.
26021 (dr_zero_step_indicator): Likewise.
26022 (dr_known_forward_stride_p): Likewise.
26023 * tree-loop-distribution.c (data_ref_segment_size): Return
26024 DR_STEP * (niters - 1).
26025 (compute_alias_check_pairs): Update call to the dr_with_seg_len
26027 * tree-vect-data-refs.c (vect_check_nonzero_value): New function.
26028 (vect_preserves_scalar_order_p): New function, split out from...
26029 (vect_analyze_data_ref_dependence): ...here. Check for zero steps.
26030 (vect_vfa_segment_size): Return DR_STEP * (length_factor - 1).
26031 (vect_vfa_access_size): New function.
26032 (vect_vfa_align): Likewise.
26033 (vect_compile_time_alias): Take access_size_a and access_b arguments.
26034 (dump_lower_bound): New function.
26035 (vect_check_lower_bound): Likewise.
26036 (vect_small_gap_p): Likewise.
26037 (vectorizable_with_step_bound_p): Likewise.
26038 (vect_prune_runtime_alias_test_list): Ignore cross-iteration
26039 depencies if the vectorization factor is 1. Convert the checks
26040 for nonzero steps into checks on the bounds of DR_STEP. Try using
26041 a bunds check for variable steps if the minimum required step is
26042 relatively small. Update calls to the dr_with_seg_len
26043 constructor and to vect_compile_time_alias.
26044 * tree-vect-loop-manip.c (vect_create_cond_for_lower_bounds): New
26046 (vect_loop_versioning): Call it.
26047 * tree-vect-loop.c (vect_analyze_loop_2): Clear LOOP_VINFO_LOWER_BOUNDS
26049 (vect_estimate_min_profitable_iters): Account for any bounds checks.
26051 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26052 Alan Hayward <alan.hayward@arm.com>
26053 David Sherwood <david.sherwood@arm.com>
26055 * doc/sourcebuild.texi (vect_scatter_store): Document.
26056 * optabs.def (scatter_store_optab, mask_scatter_store_optab): New
26058 * doc/md.texi (scatter_store@var{m}, mask_scatter_store@var{m}):
26060 * genopinit.c (main): Add supports_vec_scatter_store and
26061 supports_vec_scatter_store_cached to target_optabs.
26062 * gimple.h (gimple_expr_type): Handle IFN_SCATTER_STORE and
26063 IFN_MASK_SCATTER_STORE.
26064 * internal-fn.def (SCATTER_STORE, MASK_SCATTER_STORE): New internal
26066 * internal-fn.h (internal_store_fn_p): Declare.
26067 (internal_fn_stored_value_index): Likewise.
26068 * internal-fn.c (scatter_store_direct): New macro.
26069 (expand_scatter_store_optab_fn): New function.
26070 (direct_scatter_store_optab_supported_p): New macro.
26071 (internal_store_fn_p): New function.
26072 (internal_gather_scatter_fn_p): Handle IFN_SCATTER_STORE and
26073 IFN_MASK_SCATTER_STORE.
26074 (internal_fn_mask_index): Likewise.
26075 (internal_fn_stored_value_index): New function.
26076 (internal_gather_scatter_fn_supported_p): Adjust operand numbers
26077 for scatter stores.
26078 * optabs-query.h (supports_vec_scatter_store_p): Declare.
26079 * optabs-query.c (supports_vec_scatter_store_p): New function.
26080 * tree-vectorizer.h (vect_get_store_rhs): Declare.
26081 * tree-vect-data-refs.c (vect_analyze_data_ref_access): Return
26082 true for scatter stores.
26083 (vect_gather_scatter_fn_p): Handle scatter stores too.
26084 (vect_check_gather_scatter): Consider using scatter stores if
26085 supports_vec_scatter_store_p.
26086 * tree-vect-patterns.c (vect_try_gather_scatter_pattern): Handle
26087 scatter stores too.
26088 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
26089 internal_fn_stored_value_index.
26090 (check_load_store_masking): Handle scatter stores too.
26091 (vect_get_store_rhs): Make public.
26092 (vectorizable_call): Use internal_store_fn_p.
26093 (vectorizable_store): Handle scatter store internal functions.
26094 (vect_transform_stmt): Compare GROUP_STORE_COUNT with GROUP_SIZE
26095 when deciding whether the end of the group has been reached.
26096 * config/aarch64/aarch64.md (UNSPEC_ST1_SCATTER): New unspec.
26097 * config/aarch64/aarch64-sve.md (scatter_store<mode>): New expander.
26098 (mask_scatter_store<mode>): New insns.
26100 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26101 Alan Hayward <alan.hayward@arm.com>
26102 David Sherwood <david.sherwood@arm.com>
26104 * tree-vectorizer.h (vect_gather_scatter_fn_p): Declare.
26105 * tree-vect-data-refs.c (vect_gather_scatter_fn_p): Make public.
26106 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): New
26108 (vect_use_strided_gather_scatters_p): Take a masked_p argument.
26109 Use vect_truncate_gather_scatter_offset if we can't treat the
26110 operation as a normal gather load or scatter store.
26111 (get_group_load_store_type): Take the gather_scatter_info
26112 as argument. Try using a gather load or scatter store for
26113 single-element groups.
26114 (get_load_store_type): Update calls to get_group_load_store_type
26115 and vect_use_strided_gather_scatters_p.
26117 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26118 Alan Hayward <alan.hayward@arm.com>
26119 David Sherwood <david.sherwood@arm.com>
26121 * tree-vectorizer.h (vect_create_data_ref_ptr): Take an extra
26122 optional tree argument.
26123 * tree-vect-data-refs.c (vect_check_gather_scatter): Check for
26125 (vect_create_data_ref_ptr): Take the iv_step as an optional argument,
26126 but continue to use the current value as a fallback.
26127 (bump_vector_ptr): Use operand_equal_p rather than tree_int_cst_compare
26128 to compare the updates.
26129 * tree-vect-stmts.c (vect_use_strided_gather_scatters_p): New function.
26130 (get_load_store_type): Use it when handling a strided access.
26131 (vect_get_strided_load_store_ops): New function.
26132 (vect_get_data_ptr_increment): Likewise.
26133 (vectorizable_load): Handle strided gather loads. Always pass
26134 a step to vect_create_data_ref_ptr and bump_vector_ptr.
26136 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26137 Alan Hayward <alan.hayward@arm.com>
26138 David Sherwood <david.sherwood@arm.com>
26140 * doc/md.texi (gather_load@var{m}): Document.
26141 (mask_gather_load@var{m}): Likewise.
26142 * genopinit.c (main): Add supports_vec_gather_load and
26143 supports_vec_gather_load_cached to target_optabs.
26144 * optabs-tree.c (init_tree_optimization_optabs): Use
26145 ggc_cleared_alloc to allocate target_optabs.
26146 * optabs.def (gather_load_optab, mask_gather_laod_optab): New optabs.
26147 * internal-fn.def (GATHER_LOAD, MASK_GATHER_LOAD): New internal
26149 * internal-fn.h (internal_load_fn_p): Declare.
26150 (internal_gather_scatter_fn_p): Likewise.
26151 (internal_fn_mask_index): Likewise.
26152 (internal_gather_scatter_fn_supported_p): Likewise.
26153 * internal-fn.c (gather_load_direct): New macro.
26154 (expand_gather_load_optab_fn): New function.
26155 (direct_gather_load_optab_supported_p): New macro.
26156 (direct_internal_fn_optab): New function.
26157 (internal_load_fn_p): Likewise.
26158 (internal_gather_scatter_fn_p): Likewise.
26159 (internal_fn_mask_index): Likewise.
26160 (internal_gather_scatter_fn_supported_p): Likewise.
26161 * optabs-query.c (supports_at_least_one_mode_p): New function.
26162 (supports_vec_gather_load_p): Likewise.
26163 * optabs-query.h (supports_vec_gather_load_p): Declare.
26164 * tree-vectorizer.h (gather_scatter_info): Add ifn, element_type
26165 and memory_type field.
26166 (NUM_PATTERNS): Bump to 15.
26167 * tree-vect-data-refs.c: Include internal-fn.h.
26168 (vect_gather_scatter_fn_p): New function.
26169 (vect_describe_gather_scatter_call): Likewise.
26170 (vect_check_gather_scatter): Try using internal functions for
26171 gather loads. Recognize existing calls to a gather load function.
26172 (vect_analyze_data_refs): Consider using gather loads if
26173 supports_vec_gather_load_p.
26174 * tree-vect-patterns.c (vect_get_load_store_mask): New function.
26175 (vect_get_gather_scatter_offset_type): Likewise.
26176 (vect_convert_mask_for_vectype): Likewise.
26177 (vect_add_conversion_to_patterm): Likewise.
26178 (vect_try_gather_scatter_pattern): Likewise.
26179 (vect_recog_gather_scatter_pattern): New pattern recognizer.
26180 (vect_vect_recog_func_ptrs): Add it.
26181 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
26182 internal_fn_mask_index and internal_gather_scatter_fn_p.
26183 (check_load_store_masking): Take the gather_scatter_info as an
26184 argument and handle gather loads.
26185 (vect_get_gather_scatter_ops): New function.
26186 (vectorizable_call): Check internal_load_fn_p.
26187 (vectorizable_load): Likewise. Handle gather load internal
26189 (vectorizable_store): Update call to check_load_store_masking.
26190 * config/aarch64/aarch64.md (UNSPEC_LD1_GATHER): New unspec.
26191 * config/aarch64/iterators.md (SVE_S, SVE_D): New mode iterators.
26192 * config/aarch64/predicates.md (aarch64_gather_scale_operand_w)
26193 (aarch64_gather_scale_operand_d): New predicates.
26194 * config/aarch64/aarch64-sve.md (gather_load<mode>): New expander.
26195 (mask_gather_load<mode>): New insns.
26197 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26198 Alan Hayward <alan.hayward@arm.com>
26199 David Sherwood <david.sherwood@arm.com>
26201 * optabs.def (fold_left_plus_optab): New optab.
26202 * doc/md.texi (fold_left_plus_@var{m}): Document.
26203 * internal-fn.def (IFN_FOLD_LEFT_PLUS): New internal function.
26204 * internal-fn.c (fold_left_direct): Define.
26205 (expand_fold_left_optab_fn): Likewise.
26206 (direct_fold_left_optab_supported_p): Likewise.
26207 * fold-const-call.c (fold_const_fold_left): New function.
26208 (fold_const_call): Use it to fold CFN_FOLD_LEFT_PLUS.
26209 * tree-parloops.c (valid_reduction_p): New function.
26210 (gather_scalar_reductions): Use it.
26211 * tree-vectorizer.h (FOLD_LEFT_REDUCTION): New vect_reduction_type.
26212 (vect_finish_replace_stmt): Declare.
26213 * tree-vect-loop.c (fold_left_reduction_fn): New function.
26214 (needs_fold_left_reduction_p): New function, split out from...
26215 (vect_is_simple_reduction): ...here. Accept reductions that
26216 forbid reassociation, but give them type FOLD_LEFT_REDUCTION.
26217 (vect_force_simple_reduction): Also store the reduction type in
26218 the assignment's STMT_VINFO_REDUC_TYPE.
26219 (vect_model_reduction_cost): Handle FOLD_LEFT_REDUCTION.
26220 (merge_with_identity): New function.
26221 (vect_expand_fold_left): Likewise.
26222 (vectorize_fold_left_reduction): Likewise.
26223 (vectorizable_reduction): Handle FOLD_LEFT_REDUCTION. Leave the
26224 scalar phi in place for it. Check for target support and reject
26225 cases that would reassociate the operation. Defer the transform
26226 phase to vectorize_fold_left_reduction.
26227 * config/aarch64/aarch64.md (UNSPEC_FADDA): New unspec.
26228 * config/aarch64/aarch64-sve.md (fold_left_plus_<mode>): New expander.
26229 (*fold_left_plus_<mode>, *pred_fold_left_plus_<mode>): New insns.
26231 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26233 * tree-if-conv.c (predicate_mem_writes): Remove redundant
26234 call to ifc_temp_var.
26236 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26237 Alan Hayward <alan.hayward@arm.com>
26238 David Sherwood <david.sherwood@arm.com>
26240 * target.def (legitimize_address_displacement): Take the original
26241 offset as a poly_int.
26242 * targhooks.h (default_legitimize_address_displacement): Update
26244 * targhooks.c (default_legitimize_address_displacement): Likewise.
26245 * doc/tm.texi: Regenerate.
26246 * lra-constraints.c (base_plus_disp_to_reg): Take the displacement
26247 as an argument, moving assert of ad->disp == ad->disp_term to...
26248 (process_address_1): ...here. Update calls to base_plus_disp_to_reg.
26249 Try calling targetm.legitimize_address_displacement before expanding
26250 the address rather than afterwards, and adjust for the new interface.
26251 * config/aarch64/aarch64.c (aarch64_legitimize_address_displacement):
26252 Match the new hook interface. Handle SVE addresses.
26253 * config/sh/sh.c (sh_legitimize_address_displacement): Make the
26254 new hook interface.
26256 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26258 * Makefile.in (OBJS): Add early-remat.o.
26259 * target.def (select_early_remat_modes): New hook.
26260 * doc/tm.texi.in (TARGET_SELECT_EARLY_REMAT_MODES): New hook.
26261 * doc/tm.texi: Regenerate.
26262 * targhooks.h (default_select_early_remat_modes): Declare.
26263 * targhooks.c (default_select_early_remat_modes): New function.
26264 * timevar.def (TV_EARLY_REMAT): New timevar.
26265 * passes.def (pass_early_remat): New pass.
26266 * tree-pass.h (make_pass_early_remat): Declare.
26267 * early-remat.c: New file.
26268 * config/aarch64/aarch64.c (aarch64_select_early_remat_modes): New
26270 (TARGET_SELECT_EARLY_REMAT_MODES): Define.
26272 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26273 Alan Hayward <alan.hayward@arm.com>
26274 David Sherwood <david.sherwood@arm.com>
26276 * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Replace
26277 vfm1 with a bound_epilog parameter.
26278 (vect_do_peeling): Update calls accordingly, and move the prologue
26279 call earlier in the function. Treat the base bound_epilog as 0 for
26280 fully-masked loops and retain vf - 1 for other loops. Add 1 to
26281 this base when peeling for gaps.
26282 * tree-vect-loop.c (vect_analyze_loop_2): Allow peeling for gaps
26283 with fully-masked loops.
26284 (vect_estimate_min_profitable_iters): Handle the single peeled
26285 iteration in that case.
26287 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26288 Alan Hayward <alan.hayward@arm.com>
26289 David Sherwood <david.sherwood@arm.com>
26291 * tree-vect-data-refs.c (vect_analyze_group_access_1): Allow
26292 single-element interleaving even if the size is not a power of 2.
26293 * tree-vect-stmts.c (get_load_store_type): Disallow elementwise
26294 accesses for single-element interleaving if the group size is
26297 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26298 Alan Hayward <alan.hayward@arm.com>
26299 David Sherwood <david.sherwood@arm.com>
26301 * doc/md.texi (fold_extract_last_@var{m}): Document.
26302 * doc/sourcebuild.texi (vect_fold_extract_last): Likewise.
26303 * optabs.def (fold_extract_last_optab): New optab.
26304 * internal-fn.def (FOLD_EXTRACT_LAST): New internal function.
26305 * internal-fn.c (fold_extract_direct): New macro.
26306 (expand_fold_extract_optab_fn): Likewise.
26307 (direct_fold_extract_optab_supported_p): Likewise.
26308 * tree-vectorizer.h (EXTRACT_LAST_REDUCTION): New vect_reduction_type.
26309 * tree-vect-loop.c (vect_model_reduction_cost): Handle
26310 EXTRACT_LAST_REDUCTION.
26311 (get_initial_def_for_reduction): Do not create an initial vector
26312 for EXTRACT_LAST_REDUCTION reductions.
26313 (vectorizable_reduction): Leave the scalar phi in place for
26314 EXTRACT_LAST_REDUCTIONs. Try using EXTRACT_LAST_REDUCTION
26315 ahead of INTEGER_INDUC_COND_REDUCTION. Do not check for an
26316 epilogue code for EXTRACT_LAST_REDUCTION and defer the
26317 transform phase to vectorizable_condition.
26318 * tree-vect-stmts.c (vect_finish_stmt_generation_1): New function,
26320 (vect_finish_stmt_generation): ...here.
26321 (vect_finish_replace_stmt): New function.
26322 (vectorizable_condition): Handle EXTRACT_LAST_REDUCTION.
26323 * config/aarch64/aarch64-sve.md (fold_extract_last_<mode>): New
26325 * config/aarch64/aarch64.md (UNSPEC_CLASTB): New unspec.
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 * doc/md.texi (extract_last_@var{m}): Document.
26332 * optabs.def (extract_last_optab): New optab.
26333 * internal-fn.def (EXTRACT_LAST): New internal function.
26334 * internal-fn.c (cond_unary_direct): New macro.
26335 (expand_cond_unary_optab_fn): Likewise.
26336 (direct_cond_unary_optab_supported_p): Likewise.
26337 * tree-vect-loop.c (vectorizable_live_operation): Allow fully-masked
26338 loops using EXTRACT_LAST.
26339 * config/aarch64/aarch64-sve.md (aarch64_sve_lastb<mode>): Rename to...
26340 (extract_last_<mode>): ...this optab.
26341 (vec_extract<mode><Vel>): Update accordingly.
26343 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26344 Alan Hayward <alan.hayward@arm.com>
26345 David Sherwood <david.sherwood@arm.com>
26347 * target.def (empty_mask_is_expensive): New hook.
26348 * doc/tm.texi.in (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): New hook.
26349 * doc/tm.texi: Regenerate.
26350 * targhooks.h (default_empty_mask_is_expensive): Declare.
26351 * targhooks.c (default_empty_mask_is_expensive): New function.
26352 * tree-vectorizer.c (vectorize_loops): Only call optimize_mask_stores
26353 if the target says that empty masks are expensive.
26354 * config/aarch64/aarch64.c (aarch64_empty_mask_is_expensive):
26356 (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): Redefine.
26358 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26359 Alan Hayward <alan.hayward@arm.com>
26360 David Sherwood <david.sherwood@arm.com>
26362 * tree-vectorizer.h (_loop_vec_info::mask_skip_niters): New field.
26363 (LOOP_VINFO_MASK_SKIP_NITERS): New macro.
26364 (vect_use_loop_mask_for_alignment_p): New function.
26365 (vect_prepare_for_masked_peels, vect_gen_while_not): Declare.
26366 * tree-vect-loop-manip.c (vect_set_loop_masks_directly): Add an
26367 niters_skip argument. Make sure that the first niters_skip elements
26368 of the first iteration are inactive.
26369 (vect_set_loop_condition_masked): Handle LOOP_VINFO_MASK_SKIP_NITERS.
26370 Update call to vect_set_loop_masks_directly.
26371 (get_misalign_in_elems): New function, split out from...
26372 (vect_gen_prolog_loop_niters): ...here.
26373 (vect_update_init_of_dr): Take a code argument that specifies whether
26374 the adjustment should be added or subtracted.
26375 (vect_update_init_of_drs): Likewise.
26376 (vect_prepare_for_masked_peels): New function.
26377 (vect_do_peeling): Skip prologue peeling if we're using a mask
26378 instead. Update call to vect_update_inits_of_drs.
26379 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
26381 (vect_analyze_loop_2): Allow fully-masked loops with peeling for
26382 alignment. Do not include the number of peeled iterations in
26383 the minimum threshold in that case.
26384 (vectorizable_induction): Adjust the start value down by
26385 LOOP_VINFO_MASK_SKIP_NITERS iterations.
26386 (vect_transform_loop): Call vect_prepare_for_masked_peels.
26387 Take the number of skipped iterations into account when calculating
26389 * tree-vect-stmts.c (vect_gen_while_not): New function.
26391 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26392 Alan Hayward <alan.hayward@arm.com>
26393 David Sherwood <david.sherwood@arm.com>
26395 * doc/sourcebuild.texi (vect_fully_masked): Document.
26396 * params.def (PARAM_MIN_VECT_LOOP_BOUND): Change minimum and
26397 default value to 0.
26398 * tree-vect-loop.c (vect_analyze_loop_costing): New function,
26400 (vect_analyze_loop_2): ...here. Don't check the vectorization
26401 factor against the number of loop iterations if the loop is
26404 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26405 Alan Hayward <alan.hayward@arm.com>
26406 David Sherwood <david.sherwood@arm.com>
26408 * tree-ssa-loop-ivopts.c (USE_ADDRESS): Split into...
26409 (USE_REF_ADDRESS, USE_PTR_ADDRESS): ...these new use types.
26410 (dump_groups): Update accordingly.
26411 (iv_use::mem_type): New member variable.
26412 (address_p): New function.
26413 (record_use): Add a mem_type argument and initialize the new
26415 (record_group_use): Add a mem_type argument. Use address_p.
26416 Remove obsolete null checks of base_object. Update call to record_use.
26417 (find_interesting_uses_op): Update call to record_group_use.
26418 (find_interesting_uses_cond): Likewise.
26419 (find_interesting_uses_address): Likewise.
26420 (get_mem_type_for_internal_fn): New function.
26421 (find_address_like_use): Likewise.
26422 (find_interesting_uses_stmt): Try find_address_like_use before
26423 calling find_interesting_uses_op.
26424 (addr_offset_valid_p): Use the iv mem_type field as the type
26425 of the addressed memory.
26426 (add_autoinc_candidates): Likewise.
26427 (get_address_cost): Likewise.
26428 (split_small_address_groups_p): Use address_p.
26429 (split_address_groups): Likewise.
26430 (add_iv_candidate_for_use): Likewise.
26431 (autoinc_possible_for_pair): Likewise.
26432 (rewrite_groups): Likewise.
26433 (get_use_type): Check for USE_REF_ADDRESS instead of USE_ADDRESS.
26434 (determine_group_iv_cost): Update after split of USE_ADDRESS.
26435 (get_alias_ptr_type_for_ptr_address): New function.
26436 (rewrite_use_address): Rewrite address uses in calls that were
26437 identified by find_address_like_use.
26439 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26440 Alan Hayward <alan.hayward@arm.com>
26441 David Sherwood <david.sherwood@arm.com>
26443 * expr.c (expand_expr_addr_expr_1): Handle ADDR_EXPRs of
26445 * gimple-expr.h (is_gimple_addressable: Likewise.
26446 * gimple-expr.c (is_gimple_address): Likewise.
26447 * internal-fn.c (expand_call_mem_ref): New function.
26448 (expand_mask_load_optab_fn): Use it.
26449 (expand_mask_store_optab_fn): Likewise.
26451 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26452 Alan Hayward <alan.hayward@arm.com>
26453 David Sherwood <david.sherwood@arm.com>
26455 * doc/md.texi (cond_add@var{mode}, cond_sub@var{mode})
26456 (cond_and@var{mode}, cond_ior@var{mode}, cond_xor@var{mode})
26457 (cond_smin@var{mode}, cond_smax@var{mode}, cond_umin@var{mode})
26458 (cond_umax@var{mode}): Document.
26459 * optabs.def (cond_add_optab, cond_sub_optab, cond_and_optab)
26460 (cond_ior_optab, cond_xor_optab, cond_smin_optab, cond_smax_optab)
26461 (cond_umin_optab, cond_umax_optab): New optabs.
26462 * internal-fn.def (COND_ADD, COND_SUB, COND_MIN, COND_MAX, COND_AND)
26463 (COND_IOR, COND_XOR): New internal functions.
26464 * internal-fn.h (get_conditional_internal_fn): Declare.
26465 * internal-fn.c (cond_binary_direct): New macro.
26466 (expand_cond_binary_optab_fn): Likewise.
26467 (direct_cond_binary_optab_supported_p): Likewise.
26468 (get_conditional_internal_fn): New function.
26469 * tree-vect-loop.c (vectorizable_reduction): Handle fully-masked loops.
26470 Cope with reduction statements that are vectorized as calls rather
26472 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New insns.
26473 * config/aarch64/iterators.md (UNSPEC_COND_ADD, UNSPEC_COND_SUB)
26474 (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX, UNSPEC_COND_SMIN)
26475 (UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
26476 (UNSPEC_COND_EOR): New unspecs.
26477 (optab): Add mappings for them.
26478 (SVE_COND_INT_OP, SVE_COND_FP_OP): New int iterators.
26479 (sve_int_op, sve_fp_op): New int attributes.
26481 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26482 Alan Hayward <alan.hayward@arm.com>
26483 David Sherwood <david.sherwood@arm.com>
26485 * optabs.def (while_ult_optab): New optab.
26486 * doc/md.texi (while_ult@var{m}@var{n}): Document.
26487 * internal-fn.def (WHILE_ULT): New internal function.
26488 * internal-fn.h (direct_internal_fn_supported_p): New override
26489 that takes two types as argument.
26490 * internal-fn.c (while_direct): New macro.
26491 (expand_while_optab_fn): New function.
26492 (convert_optab_supported_p): Likewise.
26493 (direct_while_optab_supported_p): New macro.
26494 * wide-int.h (wi::udiv_ceil): New function.
26495 * tree-vectorizer.h (rgroup_masks): New structure.
26496 (vec_loop_masks): New typedef.
26497 (_loop_vec_info): Add masks, mask_compare_type, can_fully_mask_p
26498 and fully_masked_p.
26499 (LOOP_VINFO_CAN_FULLY_MASK_P, LOOP_VINFO_FULLY_MASKED_P)
26500 (LOOP_VINFO_MASKS, LOOP_VINFO_MASK_COMPARE_TYPE): New macros.
26501 (vect_max_vf): New function.
26502 (slpeel_make_loop_iterate_ntimes): Delete.
26503 (vect_set_loop_condition, vect_get_loop_mask_type, vect_gen_while)
26504 (vect_halve_mask_nunits, vect_double_mask_nunits): Declare.
26505 (vect_record_loop_mask, vect_get_loop_mask): Likewise.
26506 * tree-vect-loop-manip.c: Include tree-ssa-loop-niter.h,
26507 internal-fn.h, stor-layout.h and optabs-query.h.
26508 (vect_set_loop_mask): New function.
26509 (add_preheader_seq): Likewise.
26510 (add_header_seq): Likewise.
26511 (interleave_supported_p): Likewise.
26512 (vect_maybe_permute_loop_masks): Likewise.
26513 (vect_set_loop_masks_directly): Likewise.
26514 (vect_set_loop_condition_masked): Likewise.
26515 (vect_set_loop_condition_unmasked): New function, split out from
26516 slpeel_make_loop_iterate_ntimes.
26517 (slpeel_make_loop_iterate_ntimes): Rename to..
26518 (vect_set_loop_condition): ...this. Use vect_set_loop_condition_masked
26519 for fully-masked loops and vect_set_loop_condition_unmasked otherwise.
26520 (vect_do_peeling): Update call accordingly.
26521 (vect_gen_vector_loop_niters): Use VF as the step for fully-masked
26523 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
26524 mask_compare_type, can_fully_mask_p and fully_masked_p.
26525 (release_vec_loop_masks): New function.
26526 (_loop_vec_info): Use it to free the loop masks.
26527 (can_produce_all_loop_masks_p): New function.
26528 (vect_get_max_nscalars_per_iter): Likewise.
26529 (vect_verify_full_masking): Likewise.
26530 (vect_analyze_loop_2): Save LOOP_VINFO_CAN_FULLY_MASK_P around
26531 retries, and free the mask rgroups before retrying. Check loop-wide
26532 reasons for disallowing fully-masked loops. Make the final decision
26533 about whether use a fully-masked loop or not.
26534 (vect_estimate_min_profitable_iters): Do not assume that peeling
26535 for the number of iterations will be needed for fully-masked loops.
26536 (vectorizable_reduction): Disable fully-masked loops.
26537 (vectorizable_live_operation): Likewise.
26538 (vect_halve_mask_nunits): New function.
26539 (vect_double_mask_nunits): Likewise.
26540 (vect_record_loop_mask): Likewise.
26541 (vect_get_loop_mask): Likewise.
26542 (vect_transform_loop): Handle the case in which the final loop
26543 iteration might handle a partial vector. Call vect_set_loop_condition
26544 instead of slpeel_make_loop_iterate_ntimes.
26545 * tree-vect-stmts.c: Include tree-ssa-loop-niter.h and gimple-fold.h.
26546 (check_load_store_masking): New function.
26547 (prepare_load_store_mask): Likewise.
26548 (vectorizable_store): Handle fully-masked loops.
26549 (vectorizable_load): Likewise.
26550 (supportable_widening_operation): Use vect_halve_mask_nunits for
26552 (supportable_narrowing_operation): Likewise vect_double_mask_nunits.
26553 (vect_gen_while): New function.
26554 * config/aarch64/aarch64.md (umax<mode>3): New expander.
26555 (aarch64_uqdec<mode>): New insn.
26557 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26558 Alan Hayward <alan.hayward@arm.com>
26559 David Sherwood <david.sherwood@arm.com>
26561 * optabs.def (reduc_and_scal_optab, reduc_ior_scal_optab)
26562 (reduc_xor_scal_optab): New optabs.
26563 * doc/md.texi (reduc_and_scal_@var{m}, reduc_ior_scal_@var{m})
26564 (reduc_xor_scal_@var{m}): Document.
26565 * doc/sourcebuild.texi (vect_logical_reduc): Likewise.
26566 * internal-fn.def (IFN_REDUC_AND, IFN_REDUC_IOR, IFN_REDUC_XOR): New
26567 internal functions.
26568 * fold-const-call.c (fold_const_call): Handle them.
26569 * tree-vect-loop.c (reduction_fn_for_scalar_code): Return the new
26570 internal functions for BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR.
26571 * config/aarch64/aarch64-sve.md (reduc_<bit_reduc>_scal_<mode>):
26572 (*reduc_<bit_reduc>_scal_<mode>): New patterns.
26573 * config/aarch64/iterators.md (UNSPEC_ANDV, UNSPEC_ORV)
26574 (UNSPEC_XORV): New unspecs.
26575 (optab): Add entries for them.
26576 (BITWISEV): New int iterator.
26577 (bit_reduc_op): New int attributes.
26579 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26580 Alan Hayward <alan.hayward@arm.com>
26581 David Sherwood <david.sherwood@arm.com>
26583 * doc/md.texi (vec_shl_insert_@var{m}): New optab.
26584 * internal-fn.def (VEC_SHL_INSERT): New internal function.
26585 * optabs.def (vec_shl_insert_optab): New optab.
26586 * tree-vectorizer.h (can_duplicate_and_interleave_p): Declare.
26587 (duplicate_and_interleave): Likewise.
26588 * tree-vect-loop.c: Include internal-fn.h.
26589 (neutral_op_for_slp_reduction): New function, split out from
26590 get_initial_defs_for_reduction.
26591 (get_initial_def_for_reduction): Handle option 2 for variable-length
26592 vectors by loading the neutral value into a vector and then shifting
26593 the initial value into element 0.
26594 (get_initial_defs_for_reduction): Replace the code argument with
26595 the neutral value calculated by neutral_op_for_slp_reduction.
26596 Use gimple_build_vector for constant-length vectors.
26597 Use IFN_VEC_SHL_INSERT for variable-length vectors if all
26598 but the first group_size elements have a neutral value.
26599 Use duplicate_and_interleave otherwise.
26600 (vect_create_epilog_for_reduction): Take a neutral_op parameter.
26601 Update call to get_initial_defs_for_reduction. Handle SLP
26602 reductions for variable-length vectors by creating one vector
26603 result for each scalar result, with the elements associated
26604 with other scalar results stubbed out with the neutral value.
26605 (vectorizable_reduction): Call neutral_op_for_slp_reduction.
26606 Require IFN_VEC_SHL_INSERT for double reductions on
26607 variable-length vectors, or SLP reductions that have
26608 a neutral value. Require can_duplicate_and_interleave_p
26609 support for variable-length unchained SLP reductions if there
26610 is no neutral value, such as for MIN/MAX reductions. Also require
26611 the number of vector elements to be a multiple of the number of
26612 SLP statements when doing variable-length unchained SLP reductions.
26613 Update call to vect_create_epilog_for_reduction.
26614 * tree-vect-slp.c (can_duplicate_and_interleave_p): Make public
26615 and remove initial values.
26616 (duplicate_and_interleave): Make public.
26617 * config/aarch64/aarch64.md (UNSPEC_INSR): New unspec.
26618 * config/aarch64/aarch64-sve.md (vec_shl_insert_<mode>): New insn.
26620 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26621 Alan Hayward <alan.hayward@arm.com>
26622 David Sherwood <david.sherwood@arm.com>
26624 * tree-vect-slp.c: Include gimple-fold.h and internal-fn.h
26625 (can_duplicate_and_interleave_p): New function.
26626 (vect_get_and_check_slp_defs): Take the vector of statements
26627 rather than just the current one. Remove excess parentheses.
26628 Restriction rejectinon of vect_constant_def and vect_external_def
26629 for variable-length vectors to boolean types, or types for which
26630 can_duplicate_and_interleave_p is false.
26631 (vect_build_slp_tree_2): Update call to vect_get_and_check_slp_defs.
26632 (duplicate_and_interleave): New function.
26633 (vect_get_constant_vectors): Use gimple_build_vector for
26634 constant-length vectors and suitable variable-length constant
26635 vectors. Use duplicate_and_interleave for other variable-length
26636 vectors. Don't defer the update when inserting new statements.
26638 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26639 Alan Hayward <alan.hayward@arm.com>
26640 David Sherwood <david.sherwood@arm.com>
26642 * tree-vect-loop.c (vect_estimate_min_profitable_iters): Make sure
26643 min_profitable_iters doesn't go negative.
26645 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26646 Alan Hayward <alan.hayward@arm.com>
26647 David Sherwood <david.sherwood@arm.com>
26649 * doc/md.texi (vec_mask_load_lanes@var{m}@var{n}): Document.
26650 (vec_mask_store_lanes@var{m}@var{n}): Likewise.
26651 * optabs.def (vec_mask_load_lanes_optab): New optab.
26652 (vec_mask_store_lanes_optab): Likewise.
26653 * internal-fn.def (MASK_LOAD_LANES): New internal function.
26654 (MASK_STORE_LANES): Likewise.
26655 * internal-fn.c (mask_load_lanes_direct): New macro.
26656 (mask_store_lanes_direct): Likewise.
26657 (expand_mask_load_optab_fn): Handle masked operations.
26658 (expand_mask_load_lanes_optab_fn): New macro.
26659 (expand_mask_store_optab_fn): Handle masked operations.
26660 (expand_mask_store_lanes_optab_fn): New macro.
26661 (direct_mask_load_lanes_optab_supported_p): Likewise.
26662 (direct_mask_store_lanes_optab_supported_p): Likewise.
26663 * tree-vectorizer.h (vect_store_lanes_supported): Take a masked_p
26665 (vect_load_lanes_supported): Likewise.
26666 * tree-vect-data-refs.c (strip_conversion): New function.
26667 (can_group_stmts_p): Likewise.
26668 (vect_analyze_data_ref_accesses): Use it instead of checking
26669 for a pair of assignments.
26670 (vect_store_lanes_supported): Take a masked_p parameter.
26671 (vect_load_lanes_supported): Likewise.
26672 * tree-vect-loop.c (vect_analyze_loop_2): Update calls to
26673 vect_store_lanes_supported and vect_load_lanes_supported.
26674 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
26675 * tree-vect-stmts.c (get_group_load_store_type): Take a masked_p
26676 parameter. Don't allow gaps for masked accesses.
26677 Use vect_get_store_rhs. Update calls to vect_store_lanes_supported
26678 and vect_load_lanes_supported.
26679 (get_load_store_type): Take a masked_p parameter and update
26680 call to get_group_load_store_type.
26681 (vectorizable_store): Update call to get_load_store_type.
26682 Handle IFN_MASK_STORE_LANES.
26683 (vectorizable_load): Update call to get_load_store_type.
26684 Handle IFN_MASK_LOAD_LANES.
26686 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26687 Alan Hayward <alan.hayward@arm.com>
26688 David Sherwood <david.sherwood@arm.com>
26690 * config/aarch64/aarch64-modes.def: Define x2, x3 and x4 vector
26692 * config/aarch64/aarch64-protos.h
26693 (aarch64_sve_struct_memory_operand_p): Declare.
26694 * config/aarch64/iterators.md (SVE_STRUCT): New mode iterator.
26695 (vector_count, insn_length, VSINGLE, vsingle): New mode attributes.
26696 (VPRED, vpred): Handle SVE structure modes.
26697 * config/aarch64/constraints.md (Utx): New constraint.
26698 * config/aarch64/predicates.md (aarch64_sve_struct_memory_operand)
26699 (aarch64_sve_struct_nonimmediate_operand): New predicates.
26700 * config/aarch64/aarch64.md (UNSPEC_LDN, UNSPEC_STN): New unspecs.
26701 * config/aarch64/aarch64-sve.md (mov<mode>, *aarch64_sve_mov<mode>_le)
26702 (*aarch64_sve_mov<mode>_be, pred_mov<mode>): New patterns for
26703 structure modes. Split into pieces after RA.
26704 (vec_load_lanes<mode><vsingle>, vec_mask_load_lanes<mode><vsingle>)
26705 (vec_store_lanes<mode><vsingle>, vec_mask_store_lanes<mode><vsingle>):
26707 * config/aarch64/aarch64.c (aarch64_classify_vector_mode): Handle
26708 SVE structure modes.
26709 (aarch64_classify_address): Likewise.
26710 (sizetochar): Move earlier in file.
26711 (aarch64_print_operand): Handle SVE register lists.
26712 (aarch64_array_mode): New function.
26713 (aarch64_sve_struct_memory_operand_p): Likewise.
26714 (TARGET_ARRAY_MODE): Redefine.
26716 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26717 Alan Hayward <alan.hayward@arm.com>
26718 David Sherwood <david.sherwood@arm.com>
26720 * target.def (array_mode): New target hook.
26721 * doc/tm.texi.in (TARGET_ARRAY_MODE): New hook.
26722 * doc/tm.texi: Regenerate.
26723 * hooks.h (hook_optmode_mode_uhwi_none): Declare.
26724 * hooks.c (hook_optmode_mode_uhwi_none): New function.
26725 * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Use
26726 targetm.array_mode.
26727 * stor-layout.c (mode_for_array): Likewise. Support polynomial
26730 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26731 Alan Hayward <alan.hayward@arm.com>
26732 David Sherwood <david.sherwood@arm.com>
26734 * fold-const.c (fold_binary_loc): Check the argument types
26735 rather than the result type when testing for a vector operation.
26737 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26739 * doc/tm.texi.in (DWARF_LAZY_REGISTER_VALUE): Document.
26740 * doc/tm.texi: Regenerate.
26742 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
26743 Alan Hayward <alan.hayward@arm.com>
26744 David Sherwood <david.sherwood@arm.com>
26746 * doc/invoke.texi (-msve-vector-bits=): Document new option.
26747 (sve): Document new AArch64 extension.
26748 * doc/md.texi (w): Extend the description of the AArch64
26749 constraint to include SVE vectors.
26750 (Upl, Upa): Document new AArch64 predicate constraints.
26751 * config/aarch64/aarch64-opts.h (aarch64_sve_vector_bits_enum): New
26753 * config/aarch64/aarch64.opt (sve_vector_bits): New enum.
26754 (msve-vector-bits=): New option.
26755 * config/aarch64/aarch64-option-extensions.def (fp, simd): Disable
26756 SVE when these are disabled.
26757 (sve): New extension.
26758 * config/aarch64/aarch64-modes.def: Define SVE vector and predicate
26759 modes. Adjust their number of units based on aarch64_sve_vg.
26760 (MAX_BITSIZE_MODE_ANY_MODE): Define.
26761 * config/aarch64/aarch64-protos.h (ADDR_QUERY_ANY): New
26762 aarch64_addr_query_type.
26763 (aarch64_const_vec_all_same_in_range_p, aarch64_sve_pred_mode)
26764 (aarch64_sve_cnt_immediate_p, aarch64_sve_addvl_addpl_immediate_p)
26765 (aarch64_sve_inc_dec_immediate_p, aarch64_add_offset_temporaries)
26766 (aarch64_split_add_offset, aarch64_output_sve_cnt_immediate)
26767 (aarch64_output_sve_addvl_addpl, aarch64_output_sve_inc_dec_immediate)
26768 (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): Declare.
26769 (aarch64_simd_imm_zero_p): Delete.
26770 (aarch64_check_zero_based_sve_index_immediate): Declare.
26771 (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
26772 (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
26773 (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
26774 (aarch64_sve_float_mul_immediate_p): Likewise.
26775 (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
26776 rather than an rtx.
26777 (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): Declare.
26778 (aarch64_expand_mov_immediate): Take a gen_vec_duplicate callback.
26779 (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move): Declare.
26780 (aarch64_expand_sve_vec_cmp_int, aarch64_expand_sve_vec_cmp_float)
26781 (aarch64_expand_sve_vcond, aarch64_expand_sve_vec_perm): Declare.
26782 (aarch64_regmode_natural_size): Likewise.
26783 * config/aarch64/aarch64.h (AARCH64_FL_SVE): New macro.
26784 (AARCH64_FL_V8_3, AARCH64_FL_RCPC, AARCH64_FL_DOTPROD): Shift
26786 (AARCH64_ISA_SVE, TARGET_SVE): New macros.
26787 (FIXED_REGISTERS, CALL_USED_REGISTERS, REGISTER_NAMES): Add entries
26788 for VG and the SVE predicate registers.
26789 (V_ALIASES): Add a "z"-prefixed alias.
26790 (FIRST_PSEUDO_REGISTER): Change to P15_REGNUM + 1.
26791 (AARCH64_DWARF_VG, AARCH64_DWARF_P0): New macros.
26792 (PR_REGNUM_P, PR_LO_REGNUM_P): Likewise.
26793 (PR_LO_REGS, PR_HI_REGS, PR_REGS): New reg_classes.
26794 (REG_CLASS_NAMES): Add entries for them.
26795 (REG_CLASS_CONTENTS): Likewise. Update ALL_REGS to include VG
26796 and the predicate registers.
26797 (aarch64_sve_vg): Declare.
26798 (BITS_PER_SVE_VECTOR, BYTES_PER_SVE_VECTOR, BYTES_PER_SVE_PRED)
26799 (SVE_BYTE_MODE, MAX_COMPILE_TIME_VEC_BYTES): New macros.
26800 (REGMODE_NATURAL_SIZE): Define.
26801 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins): Handle
26803 * config/aarch64/aarch64.c: Include cfgrtl.h.
26804 (simd_immediate_info): Add a constructor for series vectors,
26805 and an associated step field.
26806 (aarch64_sve_vg): New variable.
26807 (aarch64_dbx_register_number): Handle VG and the predicate registers.
26808 (aarch64_vect_struct_mode_p, aarch64_vector_mode_p): Delete.
26809 (VEC_ADVSIMD, VEC_SVE_DATA, VEC_SVE_PRED, VEC_STRUCT, VEC_ANY_SVE)
26810 (VEC_ANY_DATA, VEC_STRUCT): New constants.
26811 (aarch64_advsimd_struct_mode_p, aarch64_sve_pred_mode_p)
26812 (aarch64_classify_vector_mode, aarch64_vector_data_mode_p)
26813 (aarch64_sve_data_mode_p, aarch64_sve_pred_mode)
26814 (aarch64_get_mask_mode): New functions.
26815 (aarch64_hard_regno_nregs): Handle SVE data modes for FP_REGS
26816 and FP_LO_REGS. Handle PR_REGS, PR_LO_REGS and PR_HI_REGS.
26817 (aarch64_hard_regno_mode_ok): Handle VG. Also handle the SVE
26818 predicate modes and predicate registers. Explicitly restrict
26819 GPRs to modes of 16 bytes or smaller. Only allow FP registers
26820 to store a vector mode if it is recognized by
26821 aarch64_classify_vector_mode.
26822 (aarch64_regmode_natural_size): New function.
26823 (aarch64_hard_regno_caller_save_mode): Return the original mode
26825 (aarch64_sve_cnt_immediate_p, aarch64_output_sve_cnt_immediate)
26826 (aarch64_sve_addvl_addpl_immediate_p, aarch64_output_sve_addvl_addpl)
26827 (aarch64_sve_inc_dec_immediate_p, aarch64_output_sve_inc_dec_immediate)
26828 (aarch64_add_offset_1_temporaries, aarch64_offset_temporaries): New
26830 (aarch64_add_offset): Add a temp2 parameter. Assert that temp1
26831 does not overlap dest if the function is frame-related. Handle
26833 (aarch64_split_add_offset): New function.
26834 (aarch64_add_sp, aarch64_sub_sp): Add temp2 parameters and pass
26835 them aarch64_add_offset.
26836 (aarch64_allocate_and_probe_stack_space): Add a temp2 parameter
26837 and update call to aarch64_sub_sp.
26838 (aarch64_add_cfa_expression): New function.
26839 (aarch64_expand_prologue): Pass extra temporary registers to the
26840 functions above. Handle the case in which we need to emit new
26841 DW_CFA_expressions for registers that were originally saved
26842 relative to the stack pointer, but now have to be expressed
26843 relative to the frame pointer.
26844 (aarch64_output_mi_thunk): Pass extra temporary registers to the
26846 (aarch64_expand_epilogue): Likewise. Prevent inheritance of
26847 IP0 and IP1 values for SVE frames.
26848 (aarch64_expand_vec_series): New function.
26849 (aarch64_expand_sve_widened_duplicate): Likewise.
26850 (aarch64_expand_sve_const_vector): Likewise.
26851 (aarch64_expand_mov_immediate): Add a gen_vec_duplicate parameter.
26852 Handle SVE constants. Use emit_move_insn to move a force_const_mem
26853 into the register, rather than emitting a SET directly.
26854 (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move)
26855 (aarch64_get_reg_raw_mode, offset_4bit_signed_scaled_p)
26856 (offset_6bit_unsigned_scaled_p, aarch64_offset_7bit_signed_scaled_p)
26857 (offset_9bit_signed_scaled_p): New functions.
26858 (aarch64_replicate_bitmask_imm): New function.
26859 (aarch64_bitmask_imm): Use it.
26860 (aarch64_cannot_force_const_mem): Reject expressions involving
26861 a CONST_POLY_INT. Update call to aarch64_classify_symbol.
26862 (aarch64_classify_index): Handle SVE indices, by requiring
26863 a plain register index with a scale that matches the element size.
26864 (aarch64_classify_address): Handle SVE addresses. Assert that
26865 the mode of the address is VOIDmode or an integer mode.
26866 Update call to aarch64_classify_symbol.
26867 (aarch64_classify_symbolic_expression): Update call to
26868 aarch64_classify_symbol.
26869 (aarch64_const_vec_all_in_range_p): New function.
26870 (aarch64_print_vector_float_operand): Likewise.
26871 (aarch64_print_operand): Handle 'N' and 'C'. Use "zN" rather than
26872 "vN" for FP registers with SVE modes. Handle (const ...) vectors
26873 and the FP immediates 1.0 and 0.5.
26874 (aarch64_print_address_internal): Handle SVE addresses.
26875 (aarch64_print_operand_address): Use ADDR_QUERY_ANY.
26876 (aarch64_regno_regclass): Handle predicate registers.
26877 (aarch64_secondary_reload): Handle big-endian reloads of SVE
26879 (aarch64_class_max_nregs): Handle SVE modes and predicate registers.
26880 (aarch64_rtx_costs): Check for ADDVL and ADDPL instructions.
26881 (aarch64_convert_sve_vector_bits): New function.
26882 (aarch64_override_options): Use it to handle -msve-vector-bits=.
26883 (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
26884 rather than an rtx.
26885 (aarch64_legitimate_constant_p): Use aarch64_classify_vector_mode.
26886 Handle SVE vector and predicate modes. Accept VL-based constants
26887 that need only one temporary register, and VL offsets that require
26888 no temporary registers.
26889 (aarch64_conditional_register_usage): Mark the predicate registers
26890 as fixed if SVE isn't available.
26891 (aarch64_vector_mode_supported_p): Use aarch64_classify_vector_mode.
26892 Return true for SVE vector and predicate modes.
26893 (aarch64_simd_container_mode): Take the number of bits as a poly_int64
26894 rather than an unsigned int. Handle SVE modes.
26895 (aarch64_preferred_simd_mode): Update call accordingly. Handle
26897 (aarch64_autovectorize_vector_sizes): Add BYTES_PER_SVE_VECTOR
26899 (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
26900 (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
26901 (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
26902 (aarch64_sve_float_mul_immediate_p): New functions.
26903 (aarch64_sve_valid_immediate): New function.
26904 (aarch64_simd_valid_immediate): Use it as the fallback for SVE vectors.
26905 Explicitly reject structure modes. Check for INDEX constants.
26906 Handle PTRUE and PFALSE constants.
26907 (aarch64_check_zero_based_sve_index_immediate): New function.
26908 (aarch64_simd_imm_zero_p): Delete.
26909 (aarch64_mov_operand_p): Use aarch64_simd_valid_immediate for
26910 vector modes. Accept constants in the range of CNT[BHWD].
26911 (aarch64_simd_scalar_immediate_valid_for_move): Explicitly
26912 ask for an Advanced SIMD mode.
26913 (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): New functions.
26914 (aarch64_simd_vector_alignment): Handle SVE predicates.
26915 (aarch64_vectorize_preferred_vector_alignment): New function.
26916 (aarch64_simd_vector_alignment_reachable): Use it instead of
26918 (aarch64_shift_truncation_mask): Use aarch64_vector_data_mode_p.
26919 (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): New
26921 (MAX_VECT_LEN): Delete.
26922 (expand_vec_perm_d): Add a vec_flags field.
26923 (emit_unspec2, aarch64_expand_sve_vec_perm): New functions.
26924 (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_zip)
26925 (aarch64_evpc_ext): Don't apply a big-endian lane correction
26927 (aarch64_evpc_rev): Rename to...
26928 (aarch64_evpc_rev_local): ...this. Use a predicated operation for SVE.
26929 (aarch64_evpc_rev_global): New function.
26930 (aarch64_evpc_dup): Enforce a 64-byte range for SVE DUP.
26931 (aarch64_evpc_tbl): Use MAX_COMPILE_TIME_VEC_BYTES instead of
26933 (aarch64_evpc_sve_tbl): New function.
26934 (aarch64_expand_vec_perm_const_1): Update after rename of
26935 aarch64_evpc_rev. Handle SVE permutes too, trying
26936 aarch64_evpc_rev_global and using aarch64_evpc_sve_tbl rather
26937 than aarch64_evpc_tbl.
26938 (aarch64_vectorize_vec_perm_const): Initialize vec_flags.
26939 (aarch64_sve_cmp_operand_p, aarch64_unspec_cond_code)
26940 (aarch64_gen_unspec_cond, aarch64_expand_sve_vec_cmp_int)
26941 (aarch64_emit_unspec_cond, aarch64_emit_unspec_cond_or)
26942 (aarch64_emit_inverted_unspec_cond, aarch64_expand_sve_vec_cmp_float)
26943 (aarch64_expand_sve_vcond): New functions.
26944 (aarch64_modes_tieable_p): Use aarch64_vector_data_mode_p instead
26945 of aarch64_vector_mode_p.
26946 (aarch64_dwarf_poly_indeterminate_value): New function.
26947 (aarch64_compute_pressure_classes): Likewise.
26948 (aarch64_can_change_mode_class): Likewise.
26949 (TARGET_GET_RAW_RESULT_MODE, TARGET_GET_RAW_ARG_MODE): Redefine.
26950 (TARGET_VECTORIZE_PREFERRED_VECTOR_ALIGNMENT): Likewise.
26951 (TARGET_VECTORIZE_GET_MASK_MODE): Likewise.
26952 (TARGET_DWARF_POLY_INDETERMINATE_VALUE): Likewise.
26953 (TARGET_COMPUTE_PRESSURE_CLASSES): Likewise.
26954 (TARGET_CAN_CHANGE_MODE_CLASS): Likewise.
26955 * config/aarch64/constraints.md (Upa, Upl, Uav, Uat, Usv, Usi, Utr)
26956 (Uty, Dm, vsa, vsc, vsd, vsi, vsn, vsl, vsm, vsA, vsM, vsN): New
26958 (Dn, Dl, Dr): Accept const as well as const_vector.
26959 (Dz): Likewise. Compare against CONST0_RTX.
26960 * config/aarch64/iterators.md: Refer to "Advanced SIMD" instead
26961 of "vector" where appropriate.
26962 (SVE_ALL, SVE_BH, SVE_BHS, SVE_BHSI, SVE_HSDI, SVE_HSF, SVE_SD)
26963 (SVE_SDI, SVE_I, SVE_F, PRED_ALL, PRED_BHS): New mode iterators.
26964 (UNSPEC_SEL, UNSPEC_ANDF, UNSPEC_IORF, UNSPEC_XORF, UNSPEC_COND_LT)
26965 (UNSPEC_COND_LE, UNSPEC_COND_EQ, UNSPEC_COND_NE, UNSPEC_COND_GE)
26966 (UNSPEC_COND_GT, UNSPEC_COND_LO, UNSPEC_COND_LS, UNSPEC_COND_HS)
26967 (UNSPEC_COND_HI, UNSPEC_COND_UO): New unspecs.
26968 (Vetype, VEL, Vel, VWIDE, Vwide, vw, vwcore, V_INT_EQUIV)
26969 (v_int_equiv): Extend to SVE modes.
26970 (Vesize, V128, v128, Vewtype, V_FP_EQUIV, v_fp_equiv, VPRED): New
26972 (LOGICAL_OR, SVE_INT_UNARY, SVE_FP_UNARY): New code iterators.
26973 (optab): Handle popcount, smin, smax, umin, umax, abs and sqrt.
26974 (logical_nn, lr, sve_int_op, sve_fp_op): New code attributs.
26975 (LOGICALF, OPTAB_PERMUTE, UNPACK, UNPACK_UNSIGNED, SVE_COND_INT_CMP)
26976 (SVE_COND_FP_CMP): New int iterators.
26977 (perm_hilo): Handle the new unpack unspecs.
26978 (optab, logicalf_op, su, perm_optab, cmp_op, imm_con): New int
26980 * config/aarch64/predicates.md (aarch64_sve_cnt_immediate)
26981 (aarch64_sve_addvl_addpl_immediate, aarch64_split_add_offset_immediate)
26982 (aarch64_pluslong_or_poly_operand, aarch64_nonmemory_operand)
26983 (aarch64_equality_operator, aarch64_constant_vector_operand)
26984 (aarch64_sve_ld1r_operand, aarch64_sve_ldr_operand): New predicates.
26985 (aarch64_sve_nonimmediate_operand): Likewise.
26986 (aarch64_sve_general_operand): Likewise.
26987 (aarch64_sve_dup_operand, aarch64_sve_arith_immediate): Likewise.
26988 (aarch64_sve_sub_arith_immediate, aarch64_sve_inc_dec_immediate)
26989 (aarch64_sve_logical_immediate, aarch64_sve_mul_immediate): Likewise.
26990 (aarch64_sve_dup_immediate, aarch64_sve_cmp_vsc_immediate): Likewise.
26991 (aarch64_sve_cmp_vsd_immediate, aarch64_sve_index_immediate): Likewise.
26992 (aarch64_sve_float_arith_immediate): Likewise.
26993 (aarch64_sve_float_arith_with_sub_immediate): Likewise.
26994 (aarch64_sve_float_mul_immediate, aarch64_sve_arith_operand): Likewise.
26995 (aarch64_sve_add_operand, aarch64_sve_logical_operand): Likewise.
26996 (aarch64_sve_lshift_operand, aarch64_sve_rshift_operand): Likewise.
26997 (aarch64_sve_mul_operand, aarch64_sve_cmp_vsc_operand): Likewise.
26998 (aarch64_sve_cmp_vsd_operand, aarch64_sve_index_operand): Likewise.
26999 (aarch64_sve_float_arith_operand): Likewise.
27000 (aarch64_sve_float_arith_with_sub_operand): Likewise.
27001 (aarch64_sve_float_mul_operand): Likewise.
27002 (aarch64_sve_vec_perm_operand): Likewise.
27003 (aarch64_pluslong_operand): Include aarch64_sve_addvl_addpl_immediate.
27004 (aarch64_mov_operand): Accept const_poly_int and const_vector.
27005 (aarch64_simd_lshift_imm, aarch64_simd_rshift_imm): Accept const
27006 as well as const_vector.
27007 (aarch64_simd_imm_zero, aarch64_simd_imm_minus_one): Move earlier
27008 in file. Use CONST0_RTX and CONSTM1_RTX.
27009 (aarch64_simd_or_scalar_imm_zero): Likewise. Add match_codes.
27010 (aarch64_simd_reg_or_zero): Accept const as well as const_vector.
27011 Use aarch64_simd_imm_zero.
27012 * config/aarch64/aarch64-sve.md: New file.
27013 * config/aarch64/aarch64.md: Include it.
27014 (VG_REGNUM, P0_REGNUM, P7_REGNUM, P15_REGNUM): New register numbers.
27015 (UNSPEC_REV, UNSPEC_LD1_SVE, UNSPEC_ST1_SVE, UNSPEC_MERGE_PTRUE)
27016 (UNSPEC_PTEST_PTRUE, UNSPEC_UNPACKSHI, UNSPEC_UNPACKUHI)
27017 (UNSPEC_UNPACKSLO, UNSPEC_UNPACKULO, UNSPEC_PACK)
27018 (UNSPEC_FLOAT_CONVERT, UNSPEC_WHILE_LO): New unspec constants.
27019 (sve): New attribute.
27020 (enabled): Disable instructions with the sve attribute unless
27022 (movqi, movhi): Pass CONST_POLY_INT operaneds through
27023 aarch64_expand_mov_immediate.
27024 (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64): Handle
27025 CNT[BHSD] immediates.
27026 (movti): Split CONST_POLY_INT moves into two halves.
27027 (add<mode>3): Accept aarch64_pluslong_or_poly_operand.
27028 Split additions that need a temporary here if the destination
27029 is the stack pointer.
27030 (*add<mode>3_aarch64): Handle ADDVL and ADDPL immediates.
27031 (*add<mode>3_poly_1): New instruction.
27032 (set_clobber_cc): New expander.
27034 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
27036 * simplify-rtx.c (simplify_immed_subreg): Add an inner_bytes
27037 parameter and use it instead of GET_MODE_SIZE (innermode). Use
27038 inner_bytes * BITS_PER_UNIT instead of GET_MODE_BITSIZE (innermode).
27039 Use CEIL (inner_bytes, GET_MODE_UNIT_SIZE (innermode)) instead of
27040 GET_MODE_NUNITS (innermode). Also add a first_elem parameter.
27041 Change innermode from fixed_mode_size to machine_mode.
27042 (simplify_subreg): Update call accordingly. Handle a constant-sized
27043 subreg of a variable-length CONST_VECTOR.
27045 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
27046 Alan Hayward <alan.hayward@arm.com>
27047 David Sherwood <david.sherwood@arm.com>
27049 * tree-ssa-address.c (mem_ref_valid_without_offset_p): New function.
27050 (add_offset_to_base): New function, split out from...
27051 (create_mem_ref): ...here. When handling a scale other than 1,
27052 check first whether the address is valid without the offset.
27053 Add it into the base if so, leaving the index and scale as-is.
27055 2018-01-12 Jakub Jelinek <jakub@redhat.com>
27058 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Call
27059 fold_for_warn before checking if arg2 is INTEGER_CST.
27061 2018-01-12 Segher Boessenkool <segher@kernel.crashing.org>
27063 * config/rs6000/predicates.md (load_multiple_operation): Delete.
27064 (store_multiple_operation): Delete.
27065 * config/rs6000/rs6000-cpus.def (601): Remove MASK_STRING.
27066 * config/rs6000/rs6000-protos.h (rs6000_output_load_multiple): Delete.
27067 * config/rs6000/rs6000-string.c (expand_block_move): Delete everything
27068 guarded by TARGET_STRING.
27069 (rs6000_output_load_multiple): Delete.
27070 * config/rs6000/rs6000.c (rs6000_option_override_internal): Delete
27071 OPTION_MASK_STRING / TARGET_STRING handling.
27072 (print_operand) <'N', 'O'>: Add comment that these are unused now.
27073 (const rs6000_opt_masks) <"string">: Change mask to 0.
27074 * config/rs6000/rs6000.h (TARGET_DEFAULT): Remove MASK_STRING.
27075 (MASK_STRING): Delete.
27076 * config/rs6000/rs6000.md (*mov<mode>_string): Delete TARGET_STRING
27078 (load_multiple): Delete.
27085 (store_multiple): Delete.
27092 (movmemsi_8reg): Delete.
27093 (corresponding unnamed define_insn): Delete.
27094 (movmemsi_6reg): Delete.
27095 (corresponding unnamed define_insn): Delete.
27096 (movmemsi_4reg): Delete.
27097 (corresponding unnamed define_insn): Delete.
27098 (movmemsi_2reg): Delete.
27099 (corresponding unnamed define_insn): Delete.
27100 (movmemsi_1reg): Delete.
27101 (corresponding unnamed define_insn): Delete.
27102 * config/rs6000/rs6000.opt (mno-string): New.
27103 (mstring): Replace by deprecation warning stub.
27104 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mstring.
27106 2018-01-12 Jakub Jelinek <jakub@redhat.com>
27108 * regrename.c (regrename_do_replace): If replacing the same
27109 reg multiple times, try to reuse last created gen_raw_REG.
27112 * bb-reorder.c (pass_partition_blocks::gate): In lto don't partition
27113 main to workaround a bug in GDB.
27115 2018-01-12 Tom de Vries <tom@codesourcery.com>
27118 * config.gcc (nvptx*-*-*): Set use_gcc_stdint=wrap.
27120 2018-01-12 Vladimir Makarov <vmakarov@redhat.com>
27122 PR rtl-optimization/80481
27123 * ira-color.c (get_cap_member): New function.
27124 (allocnos_conflict_by_live_ranges_p): Use it.
27125 (slot_coalesced_allocno_live_ranges_intersect_p): Add assert.
27126 (setup_slot_coalesced_allocno_live_ranges): Ditto.
27128 2018-01-12 Uros Bizjak <ubizjak@gmail.com>
27131 * config/alpha/alpha.md (*saddsi_1): New insn_ans_split pattern.
27132 (*saddl_se_1): Ditto.
27133 (*ssubsi_1): Ditto.
27134 (*ssubl_se_1): Ditto.
27136 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
27138 * tree-predcom.c (aff_combination_dr_offset): Use wi::to_poly_widest
27139 rather than wi::to_widest for DR_INITs.
27140 * tree-vect-data-refs.c (vect_find_same_alignment_drs): Use
27141 wi::to_poly_offset rather than wi::to_offset for DR_INIT.
27142 (vect_analyze_data_ref_accesses): Require both DR_INITs to be
27144 (vect_analyze_group_access_1): Note that here.
27146 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
27148 * tree-vectorizer.c (get_vec_alignment_for_array_type): Handle
27149 polynomial type sizes.
27151 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
27153 * gimplify.c (gimple_add_tmp_var_fn): Allow variables to have a
27154 poly_uint64 size, rather than requiring an unsigned HOST_WIDE_INT size.
27155 (gimple_add_tmp_var): Likewise.
27157 2018-01-12 Martin Liska <mliska@suse.cz>
27159 * gimple.c (gimple_alloc_counts): Use uint64_t instead of int.
27160 (gimple_alloc_sizes): Likewise.
27161 (dump_gimple_statistics): Use PRIu64 in printf format.
27162 * gimple.h: Change uint64_t to int.
27164 2018-01-12 Martin Liska <mliska@suse.cz>
27166 * tree-core.h: Use uint64_t instead of int.
27167 * tree.c (tree_node_counts): Likewise.
27168 (tree_node_sizes): Likewise.
27169 (dump_tree_statistics): Use PRIu64 in printf format.
27171 2018-01-12 Martin Liska <mliska@suse.cz>
27173 * Makefile.in: As qsort_chk is implemented in vec.c, add
27174 vec.o to linkage of gencfn-macros.
27175 * tree.c (build_new_poly_int_cst): Add CXX_MEM_STAT_INFO as it's
27176 passing the info to record_node_allocation_statistics.
27177 (test_vector_cst_patterns): Add CXX_MEM_STAT_INFO to declaration
27179 * ggc-common.c (struct ggc_usage): Add operator== and use
27180 it in operator< and compare function.
27181 * mem-stats.h (struct mem_usage): Likewise.
27182 * vec.c (struct vec_usage): Remove operator< and compare
27183 function. Can be simply inherited.
27185 2018-01-12 Martin Jambor <mjambor@suse.cz>
27188 * params.def: New parameter PARAM_AVOID_FMA_MAX_BITS.
27189 * tree-ssa-math-opts.c: Include domwalk.h.
27190 (convert_mult_to_fma_1): New function.
27191 (fma_transformation_info): New type.
27192 (fma_deferring_state): Likewise.
27193 (cancel_fma_deferring): New function.
27194 (result_of_phi): Likewise.
27195 (last_fma_candidate_feeds_initial_phi): Likewise.
27196 (convert_mult_to_fma): Added deferring logic, split actual
27197 transformation to convert_mult_to_fma_1.
27198 (math_opts_dom_walker): New type.
27199 (math_opts_dom_walker::after_dom_children): New method, body moved
27200 here from pass_optimize_widening_mul::execute, added deferring logic
27202 (pass_optimize_widening_mul::execute): Moved most of code to
27203 math_opts_dom_walker::after_dom_children.
27204 * config/i386/x86-tune.def (X86_TUNE_AVOID_128FMA_CHAINS): New.
27205 * config/i386/i386.c (ix86_option_override_internal): Added
27206 maybe_setting of PARAM_AVOID_FMA_MAX_BITS.
27208 2018-01-12 Richard Biener <rguenther@suse.de>
27211 * dwarf2out.c (gen_variable_die): Do not reset old_die for
27212 inline instance vars.
27214 2018-01-12 Oleg Endo <olegendo@gcc.gnu.org>
27217 * config/rx/rx.c (rx_is_restricted_memory_address):
27218 Handle SUBREG case.
27220 2018-01-12 Richard Biener <rguenther@suse.de>
27222 PR tree-optimization/80846
27223 * target.def (split_reduction): New target hook.
27224 * targhooks.c (default_split_reduction): New function.
27225 * targhooks.h (default_split_reduction): Declare.
27226 * tree-vect-loop.c (vect_create_epilog_for_reduction): If the
27227 target requests first reduce vectors by combining low and high
27229 * tree-vect-stmts.c (vect_gen_perm_mask_any): Adjust.
27230 (get_vectype_for_scalar_type_and_size): Export.
27231 * tree-vectorizer.h (get_vectype_for_scalar_type_and_size): Declare.
27232 * doc/tm.texi.in (TARGET_VECTORIZE_SPLIT_REDUCTION): Document.
27233 * doc/tm.texi: Regenerate.
27234 * config/i386/i386.c (ix86_split_reduction): Implement
27235 TARGET_VECTORIZE_SPLIT_REDUCTION.
27237 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
27240 * config/sparc/sparc.h (PIC_OFFSET_TABLE_REGNUM): Set to INVALID_REGNUM
27241 in PIC mode except for TARGET_VXWORKS_RTP.
27242 * config/sparc/sparc.c: Include cfgrtl.h.
27243 (TARGET_INIT_PIC_REG): Define.
27244 (TARGET_USE_PSEUDO_PIC_REG): Likewise.
27245 (sparc_pic_register_p): New predicate.
27246 (sparc_legitimate_address_p): Use it.
27247 (sparc_legitimize_pic_address): Likewise.
27248 (sparc_delegitimize_address): Likewise.
27249 (sparc_mode_dependent_address_p): Likewise.
27250 (gen_load_pcrel_sym): Remove 4th parameter.
27251 (load_got_register): Adjust call to above. Remove obsolete stuff.
27252 (sparc_expand_prologue): Do not call load_got_register here.
27253 (sparc_flat_expand_prologue): Likewise.
27254 (sparc_output_mi_thunk): Set the pic_offset_table_rtx object.
27255 (sparc_use_pseudo_pic_reg): New function.
27256 (sparc_init_pic_reg): Likewise.
27257 * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
27258 (builtin_setjmp_receiver): Enable only for TARGET_VXWORKS_RTP.
27260 2018-01-12 Christophe Lyon <christophe.lyon@linaro.org>
27262 * doc/sourcebuild.texi (Effective-Target Keywords, Other attributes):
27263 Add item for branch_cost.
27265 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
27267 PR rtl-optimization/83565
27268 * rtlanal.c (nonzero_bits1): On WORD_REGISTER_OPERATIONS machines, do
27269 not extend the result to a larger mode for rotate operations.
27270 (num_sign_bit_copies1): Likewise.
27272 2018-01-12 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
27275 * config/sol2.h (STARTFILE_ARCH_SPEC): Don't use with -shared or
27277 Use values-Xc.o for -pedantic.
27278 Link with values-xpg4.o for C90, values-xpg6.o otherwise.
27280 2018-01-12 Martin Liska <mliska@suse.cz>
27283 * ipa-devirt.c (final_warning_record::grow_type_warnings):
27285 (possible_polymorphic_call_targets): Use it.
27286 (ipa_devirt): Likewise.
27288 2018-01-12 Martin Liska <mliska@suse.cz>
27290 * profile-count.h (enum profile_quality): Use 0 as invalid
27291 enum value of profile_quality.
27293 2018-01-12 Chung-Ju Wu <jasonwucj@gmail.com>
27295 * doc/invoke.texi (NDS32 Options): Add -mext-perf, -mext-perf2 and
27296 -mext-string options.
27298 2018-01-12 Richard Biener <rguenther@suse.de>
27300 * lto-streamer-out.c (DFS::DFS_write_tree_body): Process
27301 DECL_DEBUG_EXPR conditional on DECL_HAS_DEBUG_EXPR_P.
27302 * tree-streamer-in.c (lto_input_ts_decl_common_tree_pointers):
27304 * tree-streamer-out.c (write_ts_decl_common_tree_pointers): Likewise.
27306 2018-01-11 Michael Meissner <meissner@linux.vnet.ibm.com>
27308 * configure.ac (--with-long-double-format): Add support for the
27309 configuration option to change the default long double format on
27311 * config.gcc (powerpc*-linux*-*): Likewise.
27312 * configure: Regenerate.
27313 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): If long
27314 double is IEEE, define __KC__ and __KF__ to allow floatn.h to be
27315 used without modification.
27317 2018-01-11 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
27319 * config/rs6000/rs6000-builtin.def (BU_P7_MISC_X): New #define.
27320 (SPEC_BARRIER): New instantiation of BU_P7_MISC_X.
27321 * config/rs6000/rs6000.c (rs6000_expand_builtin): Handle
27322 MISC_BUILTIN_SPEC_BARRIER.
27323 (rs6000_init_builtins): Likewise.
27324 * config/rs6000/rs6000.md (UNSPECV_SPEC_BARRIER): New UNSPECV
27326 (speculation_barrier): New define_insn.
27327 * doc/extend.texi: Document __builtin_speculation_barrier.
27329 2018-01-11 Jakub Jelinek <jakub@redhat.com>
27332 * config/i386/i386.c (ix86_expand_vector_init_one_nonzero): If one_var
27333 is 0, for V{8,16}S[IF] and V[48]D[IF]mode use gen_vec_set<mode>_0.
27334 * config/i386/sse.md (VI8_AVX_AVX512F, VI4F_256_512): New mode
27336 (ssescalarmodesuffix): Add 512-bit vectors. Use "d" or "q" for
27337 integral modes instead of "ss" and "sd".
27338 (vec_set<mode>_0): New define_insns for 256-bit and 512-bit
27339 vectors with 32-bit and 64-bit elements.
27340 (vecdupssescalarmodesuffix): New mode attribute.
27341 (vec_dup<mode>): Use it.
27343 2018-01-11 H.J. Lu <hongjiu.lu@intel.com>
27346 * config/i386/i386.c (ix86_compute_frame_layout): Align stack
27347 frame if argument is passed on stack.
27349 2018-01-11 Jakub Jelinek <jakub@redhat.com>
27352 * ree.c (combine_reaching_defs): Optimize also
27353 reg2=exp; reg1=reg2; reg2=any_extend(reg1); into
27354 reg2=any_extend(exp); reg1=reg2;, formatting fix.
27356 2018-01-11 Jan Hubicka <hubicka@ucw.cz>
27358 PR middle-end/83189
27359 * gimple-ssa-isolate-paths.c (isolate_path): Fix profile update.
27361 2018-01-11 Jan Hubicka <hubicka@ucw.cz>
27363 PR middle-end/83718
27364 * tree-inline.c (copy_cfg_body): Adjust num&den for scaling
27365 after they are computed.
27367 2018-01-11 Bin Cheng <bin.cheng@arm.com>
27369 PR tree-optimization/83695
27370 * gimple-loop-linterchange.cc
27371 (tree_loop_interchange::interchange_loops): Call scev_reset_htab to
27372 reset cached scev information after interchange.
27373 (pass_linterchange::execute): Remove call to scev_reset_htab.
27375 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
27377 * config/arm/arm_neon.h (vfmlal_lane_low_u32, vfmlal_lane_high_u32,
27378 vfmlalq_laneq_low_u32, vfmlalq_lane_low_u32, vfmlal_laneq_low_u32,
27379 vfmlalq_laneq_high_u32, vfmlalq_lane_high_u32, vfmlal_laneq_high_u32,
27380 vfmlsl_lane_low_u32, vfmlsl_lane_high_u32, vfmlslq_laneq_low_u32,
27381 vfmlslq_lane_low_u32, vfmlsl_laneq_low_u32, vfmlslq_laneq_high_u32,
27382 vfmlslq_lane_high_u32, vfmlsl_laneq_high_u32): Define.
27383 * config/arm/arm_neon_builtins.def (vfmal_lane_low,
27384 vfmal_lane_lowv4hf, vfmal_lane_lowv8hf, vfmal_lane_high,
27385 vfmal_lane_highv4hf, vfmal_lane_highv8hf, vfmsl_lane_low,
27386 vfmsl_lane_lowv4hf, vfmsl_lane_lowv8hf, vfmsl_lane_high,
27387 vfmsl_lane_highv4hf, vfmsl_lane_highv8hf): New sets of builtins.
27388 * config/arm/iterators.md (VFMLSEL2, vfmlsel2): New mode attributes.
27389 (V_lane_reg): Likewise.
27390 * config/arm/neon.md (neon_vfm<vfml_op>l_lane_<vfml_half><VCVTF:mode>):
27392 (neon_vfm<vfml_op>l_lane_<vfml_half><vfmlsel2><mode>): Likewise.
27393 (vfmal_lane_low<mode>_intrinsic,
27394 vfmal_lane_low<vfmlsel2><mode>_intrinsic,
27395 vfmal_lane_high<vfmlsel2><mode>_intrinsic,
27396 vfmal_lane_high<mode>_intrinsic, vfmsl_lane_low<mode>_intrinsic,
27397 vfmsl_lane_low<vfmlsel2><mode>_intrinsic,
27398 vfmsl_lane_high<vfmlsel2><mode>_intrinsic,
27399 vfmsl_lane_high<mode>_intrinsic): New define_insns.
27401 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
27403 * config/arm/arm-cpus.in (fp16fml): New feature.
27404 (ALL_SIMD): Add fp16fml.
27405 (armv8.2-a): Add fp16fml as an option.
27406 (armv8.3-a): Likewise.
27407 (armv8.4-a): Add fp16fml as part of fp16.
27408 * config/arm/arm.h (TARGET_FP16FML): Define.
27409 * config/arm/arm-c.c (arm_cpu_builtins): Define __ARM_FEATURE_FP16_FML
27411 * config/arm/arm-modes.def (V2HF): Define.
27412 * config/arm/arm_neon.h (vfmlal_low_u32, vfmlsl_low_u32,
27413 vfmlal_high_u32, vfmlsl_high_u32, vfmlalq_low_u32,
27414 vfmlslq_low_u32, vfmlalq_high_u32, vfmlslq_high_u32): Define.
27415 * config/arm/arm_neon_builtins.def (vfmal_low, vfmal_high,
27416 vfmsl_low, vfmsl_high): New set of builtins.
27417 * config/arm/iterators.md (PLUSMINUS): New code iterator.
27418 (vfml_op): New code attribute.
27419 (VFMLHALVES): New int iterator.
27420 (VFML, VFMLSEL): New mode attributes.
27421 (V_reg): Define mapping for V2HF.
27422 (V_hi, V_lo): New mode attributes.
27423 (VF_constraint): Likewise.
27424 (vfml_half, vfml_half_selector): New int attributes.
27425 * config/arm/neon.md (neon_vfm<vfml_op>l_<vfml_half><mode>): New
27427 (vfmal_low<mode>_intrinsic, vfmsl_high<mode>_intrinsic,
27428 vfmal_high<mode>_intrinsic, vfmsl_low<mode>_intrinsic):
27430 * config/arm/t-arm-elf (v8_fps): Add fp16fml.
27431 * config/arm/t-multilib (v8_2_a_simd_variants): Add fp16fml.
27432 * config/arm/unspecs.md (UNSPEC_VFML_LO, UNSPEC_VFML_HI): New unspecs.
27433 * doc/invoke.texi (ARM Options): Document fp16fml. Update armv8.4-a
27435 * doc/sourcebuild.texi (arm_fp16fml_neon_ok, arm_fp16fml_neon):
27436 Document new effective target and option set.
27438 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
27440 * config/arm/arm-cpus.in (armv8_4): New feature.
27441 (ARMv8_4a): New fgroup.
27442 (armv8.4-a): New arch.
27443 * config/arm/arm-tables.opt: Regenerate.
27444 * config/arm/t-aprofile: Add matching rules for -march=armv8.4-a.
27445 * config/arm/t-arm-elf (all_v8_archs): Add armv8.4-a.
27446 * config/arm/t-multilib (v8_4_a_simd_variants): New variable.
27447 Add matching rules for -march=armv8.4-a and extensions.
27448 * doc/invoke.texi (ARM Options): Document -march=armv8.4-a.
27450 2018-01-11 Oleg Endo <olegendo@gcc.gnu.org>
27453 * config/rx/rx.md (BW): New mode attribute.
27454 (sync_lock_test_and_setsi): Add mode suffix to insn output.
27456 2018-01-11 Richard Biener <rguenther@suse.de>
27458 PR tree-optimization/83435
27459 * graphite.c (canonicalize_loop_form): Ignore fake loop exit edges.
27460 * graphite-scop-detection.c (scop_detection::get_sese): Likewise.
27461 * tree-vrp.c (add_assert_info): Drop TREE_OVERFLOW if they appear.
27463 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
27464 Alan Hayward <alan.hayward@arm.com>
27465 David Sherwood <david.sherwood@arm.com>
27467 * config/aarch64/aarch64.c (aarch64_address_info): Add a const_offset
27469 (aarch64_classify_address): Initialize it. Track polynomial offsets.
27470 (aarch64_print_address_internal): Use it to check for a zero offset.
27472 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
27473 Alan Hayward <alan.hayward@arm.com>
27474 David Sherwood <david.sherwood@arm.com>
27476 * config/aarch64/aarch64-modes.def (NUM_POLY_INT_COEFFS): Set to 2.
27477 * config/aarch64/aarch64-protos.h (aarch64_initial_elimination_offset):
27478 Return a poly_int64 rather than a HOST_WIDE_INT.
27479 (aarch64_offset_7bit_signed_scaled_p): Take the offset as a poly_int64
27480 rather than a HOST_WIDE_INT.
27481 * config/aarch64/aarch64.h (aarch64_frame): Protect with
27482 HAVE_POLY_INT_H rather than HOST_WIDE_INT. Change locals_offset,
27483 hard_fp_offset, frame_size, initial_adjust, callee_offset and
27484 final_offset from HOST_WIDE_INT to poly_int64.
27485 * config/aarch64/aarch64-builtins.c (aarch64_simd_expand_args): Use
27486 to_constant when getting the number of units in an Advanced SIMD
27488 (aarch64_builtin_vectorized_function): Check for a constant number
27490 * config/aarch64/aarch64-simd.md (mov<mode>): Handle polynomial
27492 (aarch64_ld<VSTRUCT:nregs>_lane<VALLDIF:mode>): Use the nunits
27493 attribute instead of GET_MODE_NUNITS.
27494 * config/aarch64/aarch64.c (aarch64_hard_regno_nregs)
27495 (aarch64_class_max_nregs): Use the constant_lowest_bound of the
27496 GET_MODE_SIZE for fixed-size registers.
27497 (aarch64_const_vec_all_same_in_range_p): Use const_vec_duplicate_p.
27498 (aarch64_hard_regno_call_part_clobbered, aarch64_classify_index)
27499 (aarch64_mode_valid_for_sched_fusion_p, aarch64_classify_address)
27500 (aarch64_legitimize_address_displacement, aarch64_secondary_reload)
27501 (aarch64_print_operand, aarch64_print_address_internal)
27502 (aarch64_address_cost, aarch64_rtx_costs, aarch64_register_move_cost)
27503 (aarch64_short_vector_p, aapcs_vfp_sub_candidate)
27504 (aarch64_simd_attr_length_rglist, aarch64_operands_ok_for_ldpstp):
27505 Handle polynomial GET_MODE_SIZE.
27506 (aarch64_hard_regno_caller_save_mode): Likewise. Return modes
27507 wider than SImode without modification.
27508 (tls_symbolic_operand_type): Use strip_offset instead of split_const.
27509 (aarch64_pass_by_reference, aarch64_layout_arg, aarch64_pad_reg_upward)
27510 (aarch64_gimplify_va_arg_expr): Assert that we don't yet handle
27511 passing and returning SVE modes.
27512 (aarch64_function_value, aarch64_layout_arg): Use gen_int_mode
27513 rather than GEN_INT.
27514 (aarch64_emit_probe_stack_range): Take the size as a poly_int64
27515 rather than a HOST_WIDE_INT, but call sorry if it isn't constant.
27516 (aarch64_allocate_and_probe_stack_space): Likewise.
27517 (aarch64_layout_frame): Cope with polynomial offsets.
27518 (aarch64_save_callee_saves, aarch64_restore_callee_saves): Take the
27519 start_offset as a poly_int64 rather than a HOST_WIDE_INT. Track
27520 polynomial offsets.
27521 (offset_9bit_signed_unscaled_p, offset_12bit_unsigned_scaled_p)
27522 (aarch64_offset_7bit_signed_scaled_p): Take the offset as a
27523 poly_int64 rather than a HOST_WIDE_INT.
27524 (aarch64_get_separate_components, aarch64_process_components)
27525 (aarch64_expand_prologue, aarch64_expand_epilogue)
27526 (aarch64_use_return_insn_p): Handle polynomial frame offsets.
27527 (aarch64_anchor_offset): New function, split out from...
27528 (aarch64_legitimize_address): ...here.
27529 (aarch64_builtin_vectorization_cost): Handle polynomial
27530 TYPE_VECTOR_SUBPARTS.
27531 (aarch64_simd_check_vect_par_cnst_half): Handle polynomial
27533 (aarch64_simd_make_constant, aarch64_expand_vector_init): Get the
27534 number of elements from the PARALLEL rather than the mode.
27535 (aarch64_shift_truncation_mask): Use GET_MODE_UNIT_BITSIZE
27536 rather than GET_MODE_BITSIZE.
27537 (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_ext)
27538 (aarch64_evpc_rev, aarch64_evpc_dup, aarch64_evpc_zip)
27539 (aarch64_expand_vec_perm_const_1): Handle polynomial
27540 d->perm.length () and d->perm elements.
27541 (aarch64_evpc_tbl): Likewise. Use nelt rather than GET_MODE_NUNITS.
27542 Apply to_constant to d->perm elements.
27543 (aarch64_simd_valid_immediate, aarch64_vec_fpconst_pow_of_2): Handle
27544 polynomial CONST_VECTOR_NUNITS.
27545 (aarch64_move_pointer): Take amount as a poly_int64 rather
27547 (aarch64_progress_pointer): Avoid temporary variable.
27548 * config/aarch64/aarch64.md (aarch64_<crc_variant>): Use
27549 the mode attribute instead of GET_MODE.
27551 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
27552 Alan Hayward <alan.hayward@arm.com>
27553 David Sherwood <david.sherwood@arm.com>
27555 * config/aarch64/aarch64.c (aarch64_force_temporary): Assert that
27556 x exists before using it.
27557 (aarch64_add_constant_internal): Rename to...
27558 (aarch64_add_offset_1): ...this. Replace regnum with separate
27559 src and dest rtxes. Handle the case in which they're different,
27560 including when the offset is zero. Replace scratchreg with an rtx.
27561 Use 2 additions if there is no spare register into which we can
27562 move a 16-bit constant.
27563 (aarch64_add_constant): Delete.
27564 (aarch64_add_offset): Replace reg with separate src and dest
27565 rtxes. Take a poly_int64 offset instead of a HOST_WIDE_INT.
27566 Use aarch64_add_offset_1.
27567 (aarch64_add_sp, aarch64_sub_sp): Take the scratch register as
27568 an rtx rather than an int. Take the delta as a poly_int64
27569 rather than a HOST_WIDE_INT. Use aarch64_add_offset.
27570 (aarch64_expand_mov_immediate): Update uses of aarch64_add_offset.
27571 (aarch64_expand_prologue): Update calls to aarch64_sub_sp,
27572 aarch64_allocate_and_probe_stack_space and aarch64_add_offset.
27573 (aarch64_expand_epilogue): Update calls to aarch64_add_offset
27574 and aarch64_add_sp.
27575 (aarch64_output_mi_thunk): Use aarch64_add_offset rather than
27576 aarch64_add_constant.
27578 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
27580 * config/aarch64/aarch64.c (aarch64_reinterpret_float_as_int):
27581 Use scalar_float_mode.
27583 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
27585 * config/aarch64/aarch64-simd.md
27586 (aarch64_fml<f16mac1>l<f16quad>_low<mode>): Avoid GET_MODE_NUNITS.
27587 (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Likewise.
27588 (aarch64_fml<f16mac1>l_lane_lowv2sf): Likewise.
27589 (aarch64_fml<f16mac1>l_lane_highv2sf): Likewise.
27590 (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Likewise.
27591 (aarch64_fml<f16mac1>lq_laneq_highv4sf): Likewise.
27592 (aarch64_fml<f16mac1>l_laneq_lowv2sf): Likewise.
27593 (aarch64_fml<f16mac1>l_laneq_highv2sf): Likewise.
27594 (aarch64_fml<f16mac1>lq_lane_lowv4sf): Likewise.
27595 (aarch64_fml<f16mac1>lq_lane_highv4sf): Likewise.
27597 2018-01-11 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
27600 * config/arm/arm.c (arm_declare_function_name): Set arch_to_print if
27601 targ_options->x_arm_arch_string is non NULL.
27603 2018-01-11 Tamar Christina <tamar.christina@arm.com>
27605 * config/aarch64/aarch64.h
27606 (AARCH64_FL_FOR_ARCH8_4): Add AARCH64_FL_DOTPROD.
27608 2018-01-11 Sudakshina Das <sudi.das@arm.com>
27611 * expmed.c (emit_store_flag_force): Swap if const op0
27612 and change VOIDmode to mode of op0.
27614 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
27616 PR rtl-optimization/83761
27617 * caller-save.c (replace_reg_with_saved_mem): Pass bits rather
27618 than bytes to mode_for_size.
27620 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
27622 PR middle-end/83189
27623 * gfortran.fortran-torture/compile/pr83189.f90: New testcase.
27624 * tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): Handle zero
27627 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
27629 PR middle-end/83575
27630 * cfgrtl.c (rtl_verify_edges): Only verify fixability of partition
27631 when in layout mode.
27632 (cfg_layout_finalize): Do not verify cfg before we are out of layout.
27633 * cfgcleanup.c (try_optimize_cfg): Only verify flow info when doing
27636 2018-01-10 Michael Collison <michael.collison@arm.com>
27638 * config/aarch64/aarch64-modes.def (V2HF): New VECTOR_MODE.
27639 * config/aarch64/aarch64-option-extension.def: Add
27640 AARCH64_OPT_EXTENSION of 'fp16fml'.
27641 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
27642 (__ARM_FEATURE_FP16_FML): Define if TARGET_F16FML is true.
27643 * config/aarch64/predicates.md (aarch64_lane_imm3): New predicate.
27644 * config/aarch64/constraints.md (Ui7): New constraint.
27645 * config/aarch64/iterators.md (VFMLA_W): New mode iterator.
27646 (VFMLA_SEL_W): Ditto.
27649 (VFMLA16_LOW): New int iterator.
27650 (VFMLA16_HIGH): Ditto.
27651 (UNSPEC_FMLAL): New unspec.
27652 (UNSPEC_FMLSL): Ditto.
27653 (UNSPEC_FMLAL2): Ditto.
27654 (UNSPEC_FMLSL2): Ditto.
27655 (f16mac): New code attribute.
27656 * config/aarch64/aarch64-simd-builtins.def
27657 (aarch64_fmlal_lowv2sf): Ditto.
27658 (aarch64_fmlsl_lowv2sf): Ditto.
27659 (aarch64_fmlalq_lowv4sf): Ditto.
27660 (aarch64_fmlslq_lowv4sf): Ditto.
27661 (aarch64_fmlal_highv2sf): Ditto.
27662 (aarch64_fmlsl_highv2sf): Ditto.
27663 (aarch64_fmlalq_highv4sf): Ditto.
27664 (aarch64_fmlslq_highv4sf): Ditto.
27665 (aarch64_fmlal_lane_lowv2sf): Ditto.
27666 (aarch64_fmlsl_lane_lowv2sf): Ditto.
27667 (aarch64_fmlal_laneq_lowv2sf): Ditto.
27668 (aarch64_fmlsl_laneq_lowv2sf): Ditto.
27669 (aarch64_fmlalq_lane_lowv4sf): Ditto.
27670 (aarch64_fmlsl_lane_lowv4sf): Ditto.
27671 (aarch64_fmlalq_laneq_lowv4sf): Ditto.
27672 (aarch64_fmlsl_laneq_lowv4sf): Ditto.
27673 (aarch64_fmlal_lane_highv2sf): Ditto.
27674 (aarch64_fmlsl_lane_highv2sf): Ditto.
27675 (aarch64_fmlal_laneq_highv2sf): Ditto.
27676 (aarch64_fmlsl_laneq_highv2sf): Ditto.
27677 (aarch64_fmlalq_lane_highv4sf): Ditto.
27678 (aarch64_fmlsl_lane_highv4sf): Ditto.
27679 (aarch64_fmlalq_laneq_highv4sf): Ditto.
27680 (aarch64_fmlsl_laneq_highv4sf): Ditto.
27681 * config/aarch64/aarch64-simd.md:
27682 (aarch64_fml<f16mac1>l<f16quad>_low<mode>): New pattern.
27683 (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
27684 (aarch64_simd_fml<f16mac1>l<f16quad>_low<mode>): Ditto.
27685 (aarch64_simd_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
27686 (aarch64_fml<f16mac1>l_lane_lowv2sf): Ditto.
27687 (aarch64_fml<f16mac1>l_lane_highv2sf): Ditto.
27688 (aarch64_simd_fml<f16mac>l_lane_lowv2sf): Ditto.
27689 (aarch64_simd_fml<f16mac>l_lane_highv2sf): Ditto.
27690 (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Ditto.
27691 (aarch64_fml<f16mac1>lq_laneq_highv4sf): Ditto.
27692 (aarch64_simd_fml<f16mac>lq_laneq_lowv4sf): Ditto.
27693 (aarch64_simd_fml<f16mac>lq_laneq_highv4sf): Ditto.
27694 (aarch64_fml<f16mac1>l_laneq_lowv2sf): Ditto.
27695 (aarch64_fml<f16mac1>l_laneq_highv2sf): Ditto.
27696 (aarch64_simd_fml<f16mac>l_laneq_lowv2sf): Ditto.
27697 (aarch64_simd_fml<f16mac>l_laneq_highv2sf): Ditto.
27698 (aarch64_fml<f16mac1>lq_lane_lowv4sf): Ditto.
27699 (aarch64_fml<f16mac1>lq_lane_highv4sf): Ditto.
27700 (aarch64_simd_fml<f16mac>lq_lane_lowv4sf): Ditto.
27701 (aarch64_simd_fml<f16mac>lq_lane_highv4sf): Ditto.
27702 * config/aarch64/arm_neon.h (vfmlal_low_u32): New intrinsic.
27703 (vfmlsl_low_u32): Ditto.
27704 (vfmlalq_low_u32): Ditto.
27705 (vfmlslq_low_u32): Ditto.
27706 (vfmlal_high_u32): Ditto.
27707 (vfmlsl_high_u32): Ditto.
27708 (vfmlalq_high_u32): Ditto.
27709 (vfmlslq_high_u32): Ditto.
27710 (vfmlal_lane_low_u32): Ditto.
27711 (vfmlsl_lane_low_u32): Ditto.
27712 (vfmlal_laneq_low_u32): Ditto.
27713 (vfmlsl_laneq_low_u32): Ditto.
27714 (vfmlalq_lane_low_u32): Ditto.
27715 (vfmlslq_lane_low_u32): Ditto.
27716 (vfmlalq_laneq_low_u32): Ditto.
27717 (vfmlslq_laneq_low_u32): Ditto.
27718 (vfmlal_lane_high_u32): Ditto.
27719 (vfmlsl_lane_high_u32): Ditto.
27720 (vfmlal_laneq_high_u32): Ditto.
27721 (vfmlsl_laneq_high_u32): Ditto.
27722 (vfmlalq_lane_high_u32): Ditto.
27723 (vfmlslq_lane_high_u32): Ditto.
27724 (vfmlalq_laneq_high_u32): Ditto.
27725 (vfmlslq_laneq_high_u32): Ditto.
27726 * config/aarch64/aarch64.h (AARCH64_FL_F16SML): New flag.
27727 (AARCH64_FL_FOR_ARCH8_4): New.
27728 (AARCH64_ISA_F16FML): New ISA flag.
27729 (TARGET_F16FML): New feature flag for fp16fml.
27730 (doc/invoke.texi): Document new fp16fml option.
27732 2018-01-10 Michael Collison <michael.collison@arm.com>
27734 * config/aarch64/aarch64-builtins.c:
27735 (aarch64_types_ternopu_imm_qualifiers, TYPES_TERNOPUI): New.
27736 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
27737 (__ARM_FEATURE_SHA3): Define if TARGET_SHA3 is true.
27738 * config/aarch64/aarch64.h (AARCH64_FL_SHA3): New flags.
27739 (AARCH64_ISA_SHA3): New ISA flag.
27740 (TARGET_SHA3): New feature flag for sha3.
27741 * config/aarch64/iterators.md (sha512_op): New int attribute.
27742 (CRYPTO_SHA512): New int iterator.
27743 (UNSPEC_SHA512H): New unspec.
27744 (UNSPEC_SHA512H2): Ditto.
27745 (UNSPEC_SHA512SU0): Ditto.
27746 (UNSPEC_SHA512SU1): Ditto.
27747 * config/aarch64/aarch64-simd-builtins.def
27748 (aarch64_crypto_sha512hqv2di): New builtin.
27749 (aarch64_crypto_sha512h2qv2di): Ditto.
27750 (aarch64_crypto_sha512su0qv2di): Ditto.
27751 (aarch64_crypto_sha512su1qv2di): Ditto.
27752 (aarch64_eor3qv8hi): Ditto.
27753 (aarch64_rax1qv2di): Ditto.
27754 (aarch64_xarqv2di): Ditto.
27755 (aarch64_bcaxqv8hi): Ditto.
27756 * config/aarch64/aarch64-simd.md:
27757 (aarch64_crypto_sha512h<sha512_op>qv2di): New pattern.
27758 (aarch64_crypto_sha512su0qv2di): Ditto.
27759 (aarch64_crypto_sha512su1qv2di): Ditto.
27760 (aarch64_eor3qv8hi): Ditto.
27761 (aarch64_rax1qv2di): Ditto.
27762 (aarch64_xarqv2di): Ditto.
27763 (aarch64_bcaxqv8hi): Ditto.
27764 * config/aarch64/arm_neon.h (vsha512hq_u64): New intrinsic.
27765 (vsha512h2q_u64): Ditto.
27766 (vsha512su0q_u64): Ditto.
27767 (vsha512su1q_u64): Ditto.
27768 (veor3q_u16): Ditto.
27769 (vrax1q_u64): Ditto.
27770 (vxarq_u64): Ditto.
27771 (vbcaxq_u16): Ditto.
27772 * config/arm/types.md (crypto_sha512): New type attribute.
27773 (crypto_sha3): Ditto.
27774 (doc/invoke.texi): Document new sha3 option.
27776 2018-01-10 Michael Collison <michael.collison@arm.com>
27778 * config/aarch64/aarch64-builtins.c:
27779 (aarch64_types_quadopu_imm_qualifiers, TYPES_QUADOPUI): New.
27780 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
27781 (__ARM_FEATURE_SM3): Define if TARGET_SM4 is true.
27782 (__ARM_FEATURE_SM4): Define if TARGET_SM4 is true.
27783 * config/aarch64/aarch64.h (AARCH64_FL_SM4): New flags.
27784 (AARCH64_ISA_SM4): New ISA flag.
27785 (TARGET_SM4): New feature flag for sm4.
27786 * config/aarch64/aarch64-simd-builtins.def
27787 (aarch64_sm3ss1qv4si): Ditto.
27788 (aarch64_sm3tt1aq4si): Ditto.
27789 (aarch64_sm3tt1bq4si): Ditto.
27790 (aarch64_sm3tt2aq4si): Ditto.
27791 (aarch64_sm3tt2bq4si): Ditto.
27792 (aarch64_sm3partw1qv4si): Ditto.
27793 (aarch64_sm3partw2qv4si): Ditto.
27794 (aarch64_sm4eqv4si): Ditto.
27795 (aarch64_sm4ekeyqv4si): Ditto.
27796 * config/aarch64/aarch64-simd.md:
27797 (aarch64_sm3ss1qv4si): Ditto.
27798 (aarch64_sm3tt<sm3tt_op>qv4si): Ditto.
27799 (aarch64_sm3partw<sm3part_op>qv4si): Ditto.
27800 (aarch64_sm4eqv4si): Ditto.
27801 (aarch64_sm4ekeyqv4si): Ditto.
27802 * config/aarch64/iterators.md (sm3tt_op): New int iterator.
27803 (sm3part_op): Ditto.
27804 (CRYPTO_SM3TT): Ditto.
27805 (CRYPTO_SM3PART): Ditto.
27806 (UNSPEC_SM3SS1): New unspec.
27807 (UNSPEC_SM3TT1A): Ditto.
27808 (UNSPEC_SM3TT1B): Ditto.
27809 (UNSPEC_SM3TT2A): Ditto.
27810 (UNSPEC_SM3TT2B): Ditto.
27811 (UNSPEC_SM3PARTW1): Ditto.
27812 (UNSPEC_SM3PARTW2): Ditto.
27813 (UNSPEC_SM4E): Ditto.
27814 (UNSPEC_SM4EKEY): Ditto.
27815 * config/aarch64/constraints.md (Ui2): New constraint.
27816 * config/aarch64/predicates.md (aarch64_imm2): New predicate.
27817 * config/arm/types.md (crypto_sm3): New type attribute.
27818 (crypto_sm4): Ditto.
27819 * config/aarch64/arm_neon.h (vsm3ss1q_u32): New intrinsic.
27820 (vsm3tt1aq_u32): Ditto.
27821 (vsm3tt1bq_u32): Ditto.
27822 (vsm3tt2aq_u32): Ditto.
27823 (vsm3tt2bq_u32): Ditto.
27824 (vsm3partw1q_u32): Ditto.
27825 (vsm3partw2q_u32): Ditto.
27826 (vsm4eq_u32): Ditto.
27827 (vsm4ekeyq_u32): Ditto.
27828 (doc/invoke.texi): Document new sm4 option.
27830 2018-01-10 Michael Collison <michael.collison@arm.com>
27832 * config/aarch64/aarch64-arches.def (armv8.4-a): New architecture.
27833 * config/aarch64/aarch64.h (AARCH64_ISA_V8_4): New ISA flag.
27834 (AARCH64_FL_FOR_ARCH8_4): New.
27835 (AARCH64_FL_V8_4): New flag.
27836 (doc/invoke.texi): Document new armv8.4-a option.
27838 2018-01-10 Michael Collison <michael.collison@arm.com>
27840 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
27841 (__ARM_FEATURE_AES): Define if TARGET_AES is true.
27842 (__ARM_FEATURE_SHA2): Define if TARGET_SHA2 is true.
27843 * config/aarch64/aarch64-option-extension.def: Add
27844 AARCH64_OPT_EXTENSION of 'sha2'.
27845 (aes): Add AARCH64_OPT_EXTENSION of 'aes'.
27846 (crypto): Disable sha2 and aes if crypto disabled.
27847 (crypto): Enable aes and sha2 if enabled.
27848 (simd): Disable sha2 and aes if simd disabled.
27849 * config/aarch64/aarch64.h (AARCH64_FL_AES, AARCH64_FL_SHA2):
27851 (AARCH64_ISA_AES, AARCH64_ISA_SHA2): New ISA flags.
27852 (TARGET_SHA2): New feature flag for sha2.
27853 (TARGET_AES): New feature flag for aes.
27854 * config/aarch64/aarch64-simd.md:
27855 (aarch64_crypto_aes<aes_op>v16qi): Make pattern
27856 conditional on TARGET_AES.
27857 (aarch64_crypto_aes<aesmc_op>v16qi): Ditto.
27858 (aarch64_crypto_sha1hsi): Make pattern conditional
27860 (aarch64_crypto_sha1hv4si): Ditto.
27861 (aarch64_be_crypto_sha1hv4si): Ditto.
27862 (aarch64_crypto_sha1su1v4si): Ditto.
27863 (aarch64_crypto_sha1<sha1_op>v4si): Ditto.
27864 (aarch64_crypto_sha1su0v4si): Ditto.
27865 (aarch64_crypto_sha256h<sha256_op>v4si): Ditto.
27866 (aarch64_crypto_sha256su0v4si): Ditto.
27867 (aarch64_crypto_sha256su1v4si): Ditto.
27868 (doc/invoke.texi): Document new aes and sha2 options.
27870 2018-01-10 Martin Sebor <msebor@redhat.com>
27872 PR tree-optimization/83781
27873 * gimple-fold.c (get_range_strlen): Avoid treating arrays of pointers
27876 2018-01-11 Martin Sebor <msebor@gmail.com>
27877 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
27879 PR tree-optimization/83501
27880 PR tree-optimization/81703
27882 * tree-ssa-strlen.c (get_string_cst): Rename...
27883 (get_string_len): ...to this. Handle global constants.
27884 (handle_char_store): Adjust.
27886 2018-01-10 Kito Cheng <kito.cheng@gmail.com>
27887 Jim Wilson <jimw@sifive.com>
27889 * config/riscv/riscv-protos.h (riscv_output_return): New.
27890 * config/riscv/riscv.c (struct machine_function): New naked_p field.
27891 (riscv_attribute_table, riscv_output_return),
27892 (riscv_handle_fndecl_attribute, riscv_naked_function_p),
27893 (riscv_allocate_stack_slots_for_args, riscv_warn_func_return): New.
27894 (riscv_compute_frame_info): Only compute frame->mask if not a naked
27896 (riscv_expand_prologue): Add early return for naked function.
27897 (riscv_expand_epilogue): Likewise.
27898 (riscv_function_ok_for_sibcall): Return false for naked function.
27899 (riscv_set_current_function): New.
27900 (TARGET_SET_CURRENT_FUNCTION, TARGET_ALLOCATE_STACK_SLOTS_FOR_ARGS),
27901 (TARGET_ATTRIBUTE_TABLE, TARGET_WARN_FUNC_RETURN): New.
27902 * config/riscv/riscv.md (simple_return): Call riscv_output_return.
27903 * doc/extend.texi (RISC-V Function Attributes): New.
27905 2018-01-10 Michael Meissner <meissner@linux.vnet.ibm.com>
27907 * config/rs6000/rs6000.c (is_complex_IBM_long_double): Explicitly
27908 check for 128-bit long double before checking TCmode.
27909 * config/rs6000/rs6000.h (FLOAT128_IEEE_P): Explicitly check for
27910 128-bit long doubles before checking TFmode or TCmode.
27911 (FLOAT128_IBM_P): Likewise.
27913 2018-01-10 Martin Sebor <msebor@redhat.com>
27915 PR tree-optimization/83671
27916 * builtins.c (c_strlen): Unconditionally return zero for the empty
27918 Use -Warray-bounds for warnings.
27919 * gimple-fold.c (get_range_strlen): Handle non-constant lengths
27920 for non-constant array indices with COMPONENT_REF, arrays of
27921 arrays, and pointers to arrays.
27922 (gimple_fold_builtin_strlen): Determine and set length range for
27923 non-constant character arrays.
27925 2018-01-10 Aldy Hernandez <aldyh@redhat.com>
27927 PR middle-end/81897
27928 * tree-ssa-uninit.c (convert_control_dep_chain_into_preds): Skip
27931 2018-01-10 Eric Botcazou <ebotcazou@adacore.com>
27933 * dwarf2out.c (dwarf2out_var_location): Do not pass NULL to fprintf.
27935 2018-01-10 Peter Bergner <bergner@vnet.ibm.com>
27938 * config/rs6000/rs6000.c (print_operand) <'y'>: Use
27939 VECTOR_MEM_ALTIVEC_OR_VSX_P.
27940 * config/rs6000/vsx.md (*vsx_le_perm_load_<mode> for VSX_D): Use
27941 indexed_or_indirect_operand predicate.
27942 (*vsx_le_perm_load_<mode> for VSX_W): Likewise.
27943 (*vsx_le_perm_load_v8hi): Likewise.
27944 (*vsx_le_perm_load_v16qi): Likewise.
27945 (*vsx_le_perm_store_<mode> for VSX_D): Likewise.
27946 (*vsx_le_perm_store_<mode> for VSX_W): Likewise.
27947 (*vsx_le_perm_store_v8hi): Likewise.
27948 (*vsx_le_perm_store_v16qi): Likewise.
27949 (eight unnamed splitters): Likewise.
27951 2018-01-10 Peter Bergner <bergner@vnet.ibm.com>
27953 * config/rs6000/x86intrin.h: Change #warning to #error. Update message.
27954 * config/rs6000/emmintrin.h: Likewise.
27955 * config/rs6000/mmintrin.h: Likewise.
27956 * config/rs6000/xmmintrin.h: Likewise.
27958 2018-01-10 David Malcolm <dmalcolm@redhat.com>
27961 * tree-core.h: Document EXPR_LOCATION_WRAPPER_P's usage of
27963 * tree.c (tree_nop_conversion): Return true for location wrapper
27965 (maybe_wrap_with_location): New function.
27966 (selftest::check_strip_nops): New function.
27967 (selftest::test_location_wrappers): New function.
27968 (selftest::tree_c_tests): Call it.
27969 * tree.h (STRIP_ANY_LOCATION_WRAPPER): New macro.
27970 (maybe_wrap_with_location): New decl.
27971 (EXPR_LOCATION_WRAPPER_P): New macro.
27972 (location_wrapper_p): New inline function.
27973 (tree_strip_any_location_wrapper): New inline function.
27975 2018-01-10 H.J. Lu <hongjiu.lu@intel.com>
27978 * config/i386/i386.c (ix86_compute_frame_layout): Always adjust
27979 stack_realign_offset for the largest alignment of stack slot
27981 (ix86_find_max_used_stack_alignment): New function.
27982 (ix86_finalize_stack_frame_flags): Use it. Set
27983 max_used_stack_alignment if we don't realign stack.
27984 * config/i386/i386.h (machine_function): Add
27985 max_used_stack_alignment.
27987 2018-01-10 Christophe Lyon <christophe.lyon@linaro.org>
27989 * config/arm/arm.opt (-mbranch-cost): New option.
27990 * config/arm/arm.h (BRANCH_COST): Take arm_branch_cost into
27993 2018-01-10 Segher Boessenkool <segher@kernel.crashing.org>
27996 * config/rs6000/rs6000.md (load_toc_v4_PIC_2, load_toc_v4_PIC_3b,
27997 load_toc_v4_PIC_3c): Wrap const term in CONST RTL.
27999 2018-01-10 Richard Biener <rguenther@suse.de>
28002 * dwarf2out.c (gen_subprogram_die): Hoist old_die && declaration
28003 early out so it also covers the case where we have a non-NULL
28006 2018-01-10 Richard Sandiford <richard.sandiford@linaro.org>
28008 PR tree-optimization/83753
28009 * tree-vect-stmts.c (get_group_load_store_type): Use VMAT_CONTIGUOUS
28010 for non-strided grouped accesses if the number of elements is 1.
28012 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
28015 * i386.c (ix86_vectorize_builtin_gather): Check TARGET_USE_GATHER.
28016 * i386.h (TARGET_USE_GATHER): Define.
28017 * x86-tune.def (X86_TUNE_USE_GATHER): New.
28019 2018-01-10 Martin Liska <mliska@suse.cz>
28022 * basic-block.h (CLEANUP_NO_PARTITIONING): New define.
28023 * bb-reorder.c (pass_reorder_blocks::execute): Do not clean up
28025 * cfgcleanup.c (try_optimize_cfg): Fix up partitioning if
28026 CLEANUP_NO_PARTITIONING is not set.
28028 2018-01-10 Richard Sandiford <richard.sandiford@linaro.org>
28030 * doc/rtl.texi: Remove documentation of (const ...) wrappers
28031 for vectors, as a partial revert of r254296.
28032 * rtl.h (const_vec_p): Delete.
28033 (const_vec_duplicate_p): Don't test for vector CONSTs.
28034 (unwrap_const_vec_duplicate, const_vec_series_p): Likewise.
28035 * expmed.c (make_tree): Likewise.
28038 * common.md (E, F): Use CONSTANT_P instead of checking for
28040 * emit-rtl.c (gen_lowpart_common): Use const_vec_p instead of
28041 checking for CONST_VECTOR.
28043 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
28045 PR middle-end/83575
28046 * predict.c (force_edge_cold): Handle in more sane way edges
28047 with no prediction.
28049 2018-01-09 Carl Love <cel@us.ibm.com>
28051 * config/rs6002/altivec.md (p8_vmrgow): Add support for V2DI, V2DF,
28053 (p8_vmrgew): Add support for V2DI, V2DF, V4SF types.
28054 * config/rs6000/rs6000-builtin.def: Add definitions for FLOAT2_V2DF,
28055 VMRGEW_V2DI, VMRGEW_V2DF, VMRGEW_V4SF, VMRGOW_V4SI, VMRGOW_V4SF,
28056 VMRGOW_V2DI, VMRGOW_V2DF. Remove definition for VMRGOW.
28057 * config/rs6000/rs6000-c.c (VSX_BUILTIN_VEC_FLOAT2,
28058 P8V_BUILTIN_VEC_VMRGEW, P8V_BUILTIN_VEC_VMRGOW): Add definitions.
28059 * config/rs6000/rs6000-protos.h: Add extern defition for
28060 rs6000_generate_float2_double_code.
28061 * config/rs6000/rs6000.c (rs6000_generate_float2_double_code): Add
28063 * config/rs6000/vsx.md (vsx_xvcdpsp): Add define_insn.
28064 (float2_v2df): Add define_expand.
28066 2018-01-09 Uros Bizjak <ubizjak@gmail.com>
28069 * combine.c (force_int_to_mode) <case ASHIFT>: Use mode instead of
28070 op_mode in the force_to_mode call.
28072 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
28074 * config/aarch64/aarch64.c (aarch64_evpc_trn): Use d.perm.series_p
28075 instead of checking each element individually.
28076 (aarch64_evpc_uzp): Likewise.
28077 (aarch64_evpc_zip): Likewise.
28078 (aarch64_evpc_ext): Likewise.
28079 (aarch64_evpc_rev): Likewise.
28080 (aarch64_evpc_dup): Test the encoding for a single duplicated element,
28081 instead of checking each element individually. Return true without
28083 (aarch64_vectorize_vec_perm_const): Use all_from_input_p to test
28084 whether all selected elements come from the same input, instead of
28085 checking each element individually. Remove calls to gen_rtx_REG,
28086 start_sequence and end_sequence and instead assert that no rtl is
28089 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
28091 * config/aarch64/aarch64.c (aarch64_legitimate_constant_p): Fix
28092 order of HIGH and CONST checks.
28094 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
28096 * tree-vect-stmts.c (permute_vec_elements): Create a fresh variable
28097 if the destination isn't an SSA_NAME.
28099 2018-01-09 Richard Biener <rguenther@suse.de>
28101 PR tree-optimization/83668
28102 * graphite.c (canonicalize_loop_closed_ssa): Add edge argument,
28104 (canonicalize_loop_form): ... here, renamed from ...
28105 (canonicalize_loop_closed_ssa_form): ... this and amended to
28106 swap successor edges for loop exit blocks to make us use
28107 the RPO order we need for initial schedule generation.
28109 2018-01-09 Joseph Myers <joseph@codesourcery.com>
28111 PR tree-optimization/64811
28112 * match.pd: When optimizing comparisons with Inf, avoid
28113 introducing or losing exceptions from comparisons with NaN.
28115 2018-01-09 Martin Liska <mliska@suse.cz>
28118 * asan.c (shadow_mem_size): Add gcc_assert.
28120 2018-01-09 Georg-Johann Lay <avr@gjlay.de>
28122 Don't save registers in main().
28125 * doc/invoke.texi (AVR Options) [-mmain-is-OS_task]: Document it.
28126 * config/avr/avr.opt (-mmain-is-OS_task): New target option.
28127 * config/avr/avr.c (avr_set_current_function): Don't error if
28128 naked, OS_task or OS_main are specified at the same time.
28129 (avr_function_ok_for_sibcall): Don't disable sibcalls for OS_task,
28131 (avr_insert_attributes) [-mmain-is-OS_task] <main>: Add OS_task
28133 * common/config/avr/avr-common.c (avr_option_optimization_table):
28134 Switch on -mmain-is-OS_task for optimizing compilations.
28136 2018-01-09 Richard Biener <rguenther@suse.de>
28138 PR tree-optimization/83572
28139 * graphite.c: Include cfganal.h.
28140 (graphite_transform_loops): Connect infinite loops to exit
28141 and remove fake edges at the end.
28143 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
28145 * ipa-inline.c (edge_badness): Revert accidental checkin.
28147 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
28150 * ipa-comdats.c (set_comdat_group): Only set comdat group of real
28151 symbols; not inline clones.
28153 2018-01-09 Jakub Jelinek <jakub@redhat.com>
28156 * modulo-sched.c (schedule_reg_moves): Punt if we'd need to move
28157 hard registers. Formatting fixes.
28159 PR preprocessor/83722
28160 * gcc.c (try_generate_repro): Pass
28161 &temp_stderr_files[RETRY_ICE_ATTEMPTS - 1] rather than
28162 &temp_stdout_files[RETRY_ICE_ATTEMPTS - 1] as last argument to
28165 2018-01-08 Monk Chiang <sh.chiang04@gmail.com>
28166 Kito Cheng <kito.cheng@gmail.com>
28168 * config/riscv/riscv.c (machine_function::is_leaf): Remove field.
28169 (riscv_leaf_function_p): Delete.
28170 (riscv_function_ok_for_sibcall): Return false when TARGET_SAVE_RESTORE.
28172 2018-01-08 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
28174 * config/rs6000/rs6000-string.c (do_load_for_compare_from_addr): New
28176 (do_ifelse): New function.
28177 (do_isel): New function.
28178 (do_sub3): New function.
28179 (do_add3): New function.
28180 (do_load_mask_compare): New function.
28181 (do_overlap_load_compare): New function.
28182 (expand_compare_loop): New function.
28183 (expand_block_compare): Call expand_compare_loop() when appropriate.
28184 * config/rs6000/rs6000.opt (-mblock-compare-inline-limit): Change
28185 option description.
28186 (-mblock-compare-inline-loop-limit): New option.
28188 2018-01-08 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
28191 * config/rs6000/altivec.md (*altivec_vpermr_<mode>_internal):
28192 Reverse order of second and third operands in first alternative.
28193 * config/rs6000/rs6000.c (rs6000_expand_vector_set): Reverse order
28194 of first and second elements in UNSPEC_VPERMR vector.
28195 (altivec_expand_vec_perm_le): Likewise.
28197 2018-01-08 Jeff Law <law@redhat.com>
28199 PR rtl-optimizatin/81308
28200 * tree-switch-conversion.c (cfg_altered): New file scoped static.
28201 (process_switch): If group_case_labels makes a change, then set
28203 (pass_convert_switch::execute): If a switch is converted, then
28204 set cfg_altered. Return TODO_cfg_cleanup if cfg_altered is true.
28206 PR rtl-optimization/81308
28207 * recog.c (split_all_insns): Conditionally cleanup the CFG after
28210 2018-01-08 Vidya Praveen <vidyapraveen@arm.com>
28212 PR target/83663 - Revert r255946
28213 * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify code
28214 generation for cases where splatting a value is not useful.
28215 * simplify-rtx.c (simplify_ternary_operation): Simplify vec_merge
28216 across a vec_duplicate and a paradoxical subreg forming a vector
28217 mode to a vec_concat.
28219 2018-01-08 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
28221 * config/arm/t-aprofile (MULTILIB_MATCHES): Add mapping rules for
28222 -march=armv8.3-a variants.
28223 * config/arm/t-multilib: Likewise.
28224 * config/arm/t-arm-elf: Likewise. Handle dotprod extension.
28226 2018-01-08 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
28228 * config/rs6000/rs6000.md (cceq_ior_compare): Remove * so I can use it
28230 (cceq_ior_compare_complement): Give it a name so I can use it, and
28231 change boolean_or_operator predicate to boolean_operator so it can
28232 be used to generate a crand.
28233 (eqne): New code iterator.
28234 (bd/bd_neg): New code_attrs.
28235 (<bd>_<mode>): New name for ctr<mode>_internal[12] now combined into
28236 a single define_insn.
28237 (<bd>tf_<mode>): A new insn pattern for the conditional form branch
28238 decrement (bdnzt/bdnzf/bdzt/bdzf).
28239 * config/rs6000/rs6000.c (rs6000_legitimate_combined_insn): Updated
28240 with the new names of the branch decrement patterns, and added the
28241 names of the branch decrement conditional patterns.
28243 2018-01-08 Richard Biener <rguenther@suse.de>
28245 PR tree-optimization/83563
28246 * graphite.c (canonicalize_loop_closed_ssa_form): Reset the SCEV
28249 2018-01-08 Richard Biener <rguenther@suse.de>
28251 PR middle-end/83713
28252 * convert.c (do_narrow): Properly guard TYPE_OVERFLOW_WRAPS checks.
28254 2018-01-08 Richard Biener <rguenther@suse.de>
28256 PR tree-optimization/83685
28257 * tree-ssa-pre.c (create_expression_by_pieces): Do not insert
28258 references to abnormals.
28260 2018-01-08 Richard Biener <rguenther@suse.de>
28263 * dwarf2out.c (output_indirect_strings): Handle empty
28264 skeleton_debug_str_hash.
28265 (dwarf2out_early_finish): Index strings for -gsplit-dwarf.
28267 2018-01-08 Claudiu Zissulescu <claziss@synopsys.com>
28269 * config/arc/arc.c (TARGET_TRAMPOLINE_ADJUST_ADDRESS): Delete.
28270 (emit_store_direct): Likewise.
28271 (arc_trampoline_adjust_address): Likewise.
28272 (arc_asm_trampoline_template): New function.
28273 (arc_initialize_trampoline): Use asm_trampoline_template.
28274 (TARGET_ASM_TRAMPOLINE_TEMPLATE): Define.
28275 * config/arc/arc.h (TRAMPOLINE_SIZE): Adjust to 16.
28276 * config/arc/arc.md (flush_icache): Delete pattern.
28278 2018-01-08 Claudiu Zissulescu <claziss@synopsys.com>
28280 * config/arc/arc-c.def (__ARC_UNALIGNED__): New define.
28281 * config/arc/arc.h (STRICT_ALIGNMENT): Control this macro using
28284 2018-01-08 Sebastian Huber <sebastian.huber@embedded-brains.de>
28287 * config/epiphany/epiphany.h (make_pass_mode_switch_use): Guard
28288 by not USED_FOR_TARGET.
28289 (make_pass_resolve_sw_modes): Likewise.
28291 2018-01-08 Sebastian Huber <sebastian.huber@embedded-brains.de>
28293 * config/nios2/nios2.h (nios2_section_threshold): Guard by not
28296 2018-01-08 Richard Biener <rguenther@suse.de>
28298 PR middle-end/83580
28299 * tree-data-ref.c (split_constant_offset): Remove STRIP_NOPS.
28301 2018-01-08 Richard Biener <rguenther@suse.de>
28303 PR middle-end/83517
28304 * match.pd ((t * 2) / 2) -> t): Add missing :c.
28306 2018-01-06 Aldy Hernandez <aldyh@redhat.com>
28308 PR middle-end/81897
28309 * tree-ssa-uninit.c (compute_control_dep_chain): Do not bail on
28310 basic blocks with a small number of successors.
28311 (convert_control_dep_chain_into_preds): Improve handling of
28313 (dump_predicates): Split apart into...
28314 (dump_pred_chain): ...here...
28315 (dump_pred_info): ...and here.
28316 (can_one_predicate_be_invalidated_p): Add debugging printfs.
28317 (can_chain_union_be_invalidated_p): Improve check for invalidation
28319 (uninit_uses_cannot_happen): Avoid unnecessary if
28320 convert_control_dep_chain_into_preds yielded nothing.
28322 2018-01-06 Martin Sebor <msebor@redhat.com>
28324 PR tree-optimization/83640
28325 * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Avoid
28326 subtracting negative offset from size.
28327 (builtin_access::overlap): Adjust offset bounds of the access to fall
28328 within the size of the object if possible.
28330 2018-01-06 Richard Sandiford <richard.sandiford@linaro.org>
28332 PR rtl-optimization/83699
28333 * expmed.c (extract_bit_field_1): Restrict the vector usage of
28334 extract_bit_field_as_subreg to cases in which the extracted
28335 value is also a vector.
28337 * lra-constraints.c (process_alt_operands): Test for the equivalence
28338 substitutions when detecting a possible reload cycle.
28340 2018-01-06 Jakub Jelinek <jakub@redhat.com>
28343 * toplev.c (process_options): Don't enable debug_nonbind_markers_p
28344 by default if flag_selective_schedling{,2}. Formatting fixes.
28346 PR rtl-optimization/83682
28347 * rtl.h (const_vec_duplicate_p): Only return true for VEC_DUPLICATE
28348 if it has non-VECTOR_MODE element mode.
28349 (vec_duplicate_p): Likewise.
28351 PR middle-end/83694
28352 * cfgexpand.c (expand_debug_expr): Punt if mode1 is VOIDmode
28353 and bitsize might be greater than MAX_BITSIZE_MODE_ANY_INT.
28355 2018-01-05 Jakub Jelinek <jakub@redhat.com>
28358 * config/i386/i386-builtin.def
28359 (__builtin_ia32_vgf2p8affineinvqb_v64qi,
28360 __builtin_ia32_vgf2p8affineqb_v64qi, __builtin_ia32_vgf2p8mulb_v64qi):
28361 Require also OPTION_MASK_ISA_AVX512F in addition to
28362 OPTION_MASK_ISA_GFNI.
28363 (__builtin_ia32_vgf2p8affineinvqb_v16qi_mask,
28364 __builtin_ia32_vgf2p8affineqb_v16qi_mask): Require
28365 OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_SSE in addition
28366 to OPTION_MASK_ISA_GFNI.
28367 (__builtin_ia32_vgf2p8mulb_v32qi_mask): Require
28368 OPTION_MASK_ISA_AVX512VL in addition to OPTION_MASK_ISA_GFNI and
28369 OPTION_MASK_ISA_AVX512BW.
28370 (__builtin_ia32_vgf2p8mulb_v16qi_mask): Require
28371 OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_AVX512BW in
28372 addition to OPTION_MASK_ISA_GFNI.
28373 (__builtin_ia32_vgf2p8affineinvqb_v16qi,
28374 __builtin_ia32_vgf2p8affineqb_v16qi, __builtin_ia32_vgf2p8mulb_v16qi):
28375 Require OPTION_MASK_ISA_SSE2 instead of OPTION_MASK_ISA_SSE in addition
28376 to OPTION_MASK_ISA_GFNI.
28377 * config/i386/i386.c (def_builtin): Change to builtin isa/isa2 being
28378 a requirement for all ISAs rather than any of them with a few
28380 (ix86_add_new_builtins): Clear OPTION_MASK_ISA_64BIT from isa before
28382 (ix86_expand_builtin): Require all ISAs from builtin's isa and isa2
28383 bitmasks to be enabled with 3 exceptions, instead of requiring any
28384 enabled ISA with lots of exceptions.
28385 * config/i386/sse.md (vgf2p8affineinvqb_<mode><mask_name>,
28386 vgf2p8affineqb_<mode><mask_name>, vgf2p8mulb_<mode><mask_name>):
28387 Change avx512bw in isa attribute to avx512f.
28388 * config/i386/sgxintrin.h: Add license boilerplate.
28389 * config/i386/vaesintrin.h: Likewise. Fix macro spelling __AVX512F
28390 to __AVX512F__ and __AVX512VL to __AVX512VL__.
28391 (_mm256_aesdec_epi128, _mm256_aesdeclast_epi128, _mm256_aesenc_epi128,
28392 _mm256_aesenclast_epi128): Enable temporarily avx if __AVX__ is not
28394 * config/i386/gfniintrin.h (_mm_gf2p8mul_epi8,
28395 _mm_gf2p8affineinv_epi64_epi8, _mm_gf2p8affine_epi64_epi8): Enable
28396 temporarily sse2 rather than sse if not enabled already.
28399 * config/i386/sse.md (VI248_VLBW): Rename to ...
28400 (VI248_AVX512VL): ... this. Don't guard V32HI with TARGET_AVX512BW.
28401 (vpshrd_<mode><mask_name>, vpshld_<mode><mask_name>,
28402 vpshrdv_<mode>, vpshrdv_<mode>_mask, vpshrdv_<mode>_maskz,
28403 vpshrdv_<mode>_maskz_1, vpshldv_<mode>, vpshldv_<mode>_mask,
28404 vpshldv_<mode>_maskz, vpshldv_<mode>_maskz_1): Use VI248_AVX512VL
28405 mode iterator instead of VI248_VLBW.
28407 2018-01-05 Jan Hubicka <hubicka@ucw.cz>
28409 * ipa-fnsummary.c (record_modified_bb_info): Add OP.
28410 (record_modified): Skip clobbers; add debug output.
28411 (param_change_prob): Use sreal frequencies.
28413 2018-01-05 Richard Sandiford <richard.sandiford@linaro.org>
28415 * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Don't
28416 punt for user-aligned variables.
28418 2018-01-05 Richard Sandiford <richard.sandiford@linaro.org>
28420 * tree-chrec.c (chrec_contains_symbols): Return true for
28423 2018-01-05 Sudakshina Das <sudi.das@arm.com>
28426 * simplify-rtx.c (simplify_relational_operation_1): Add simplifications
28427 of (x|y) == x for BICS pattern.
28429 2018-01-05 Jakub Jelinek <jakub@redhat.com>
28431 PR tree-optimization/83605
28432 * gimple-ssa-strength-reduction.c: Include tree-eh.h.
28433 (find_candidates_dom_walker::before_dom_children): Ignore stmts that
28436 2018-01-05 Sebastian Huber <sebastian.huber@embedded-brains.de>
28438 * config.gcc (epiphany-*-elf*): Add (epiphany-*-rtems*) configuration.
28439 * config/epiphany/rtems.h: New file.
28441 2018-01-04 Jakub Jelinek <jakub@redhat.com>
28442 Uros Bizjak <ubizjak@gmail.com>
28445 * config/i386/i386.md (*<rotate_insn>hi3_1 splitter): Use
28446 QIreg_operand instead of register_operand predicate.
28447 * config/i386/i386.c (ix86_rop_should_change_byte_p,
28448 set_rop_modrm_reg_bits, ix86_mitigate_rop): Use -mmitigate-rop in
28449 comments instead of -fmitigate[-_]rop.
28451 2018-01-04 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
28454 * cgraphunit.c (symbol_table::compile): Switch to text_section
28455 before calling assembly_start debug hook.
28456 * run-rtl-passes.c (run_rtl_passes): Likewise.
28459 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
28461 * tree-vrp.c (extract_range_from_binary_expr_1): Check
28462 range_int_cst_p rather than !symbolic_range_p before calling
28463 extract_range_from_multiplicative_op_1.
28465 2018-01-04 Jeff Law <law@redhat.com>
28467 * tree-ssa-math-opts.c (execute_cse_reciprocals_1): Remove
28468 redundant test in assertion.
28470 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
28472 * doc/rtl.texi: Document machine_mode wrapper classes.
28474 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
28476 * fold-const.c (fold_ternary_loc): Check tree_fits_uhwi_p before
28477 using tree_to_uhwi.
28479 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
28481 * tree-ssa-forwprop.c (is_combined_permutation_identity): Allow
28482 the VEC_PERM_EXPR fold to fail.
28484 2018-01-04 Jakub Jelinek <jakub@redhat.com>
28487 * bb-reorder.c (insert_section_boundary_note): Set has_bb_partition
28488 to switched_sections.
28490 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
28493 * config/arm/arm.c (arm_vectorize_vec_perm_const): Fix inverted
28494 test for d.testing.
28496 2018-01-04 Peter Bergner <bergner@vnet.ibm.com>
28499 * config/rs6000/rs6000.c (rs6000_discover_homogeneous_aggregate): Do not
28500 allow arguments in FP registers if TARGET_HARD_FLOAT is false.
28502 2018-01-04 Jakub Jelinek <jakub@redhat.com>
28505 * cfgexpand.c (expand_debug_expr) <case BIT_FIELD_REF>: Punt if mode
28506 is BLKmode and bitpos not zero or mode change is needed.
28508 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
28511 * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): Require
28514 2018-01-04 Uros Bizjak <ubizjak@gmail.com>
28517 * config/alpha/alpha.md (*sadd<modesuffix>): Use ASHIFT
28518 instead of MULT rtx. Update all corresponding splitters.
28519 (*saddl_se): Ditto.
28520 (*ssub<modesuffix>): Ditto.
28521 (*ssubl_se): Ditto.
28522 (*cmp_sadd_di): Update split patterns.
28523 (*cmp_sadd_si): Ditto.
28524 (*cmp_sadd_sidi): Ditto.
28525 (*cmp_ssub_di): Ditto.
28526 (*cmp_ssub_si): Ditto.
28527 (*cmp_ssub_sidi): Ditto.
28528 * config/alpha/predicates.md (const23_operand): New predicate.
28529 * config/alpha/alpha.c (alpha_rtx_costs) [PLUS, MINUS]:
28530 Look for ASHIFT, not MULT inner operand.
28531 (alpha_split_conditional_move): Update for *sadd<modesuffix> change.
28533 2018-01-04 Martin Liska <mliska@suse.cz>
28535 PR gcov-profile/83669
28536 * gcov.c (output_intermediate_file): Add version to intermediate
28538 * doc/gcov.texi: Document new field 'version' in intermediate
28539 file format. Fix location of '-k' option of gcov command.
28541 2018-01-04 Martin Liska <mliska@suse.cz>
28544 * ipa-icf.c (sem_function::merge): Do not cross comdat boundary.
28546 2018-01-04 Jakub Jelinek <jakub@redhat.com>
28548 * gimple-ssa-sprintf.c (parse_directive): Cast second dir.len to uhwi.
28550 2018-01-03 Martin Sebor <msebor@redhat.com>
28552 PR tree-optimization/83655
28553 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call): Avoid
28554 checking calls with invalid arguments.
28556 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28558 * tree-vect-stmts.c (vect_get_store_rhs): New function.
28559 (vectorizable_mask_load_store): Delete.
28560 (vectorizable_call): Return false for masked loads and stores.
28561 (vectorizable_store): Handle IFN_MASK_STORE. Use vect_get_store_rhs
28562 instead of gimple_assign_rhs1.
28563 (vectorizable_load): Handle IFN_MASK_LOAD.
28564 (vect_transform_stmt): Don't set is_store for call_vec_info_type.
28566 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28568 * tree-vect-stmts.c (vect_build_gather_load_calls): New function,
28570 (vectorizable_mask_load_store): ...here.
28571 (vectorizable_load): ...and here.
28573 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28575 * tree-vect-stmts.c (vect_build_all_ones_mask)
28576 (vect_build_zero_merge_argument): New functions, split out from...
28577 (vectorizable_load): ...here.
28579 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28581 * tree-vect-stmts.c (vect_check_store_rhs): New function,
28583 (vectorizable_mask_load_store): ...here.
28584 (vectorizable_store): ...and here.
28586 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28588 * tree-vect-stmts.c (vect_check_load_store_mask): New function,
28590 (vectorizable_mask_load_store): ...here.
28592 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28594 * tree-vectorizer.h (vec_load_store_type): Moved from tree-vec-stmts.c
28595 (vect_model_store_cost): Take a vec_load_store_type instead of a
28597 * tree-vect-stmts.c (vec_load_store_type): Move to tree-vectorizer.h.
28598 (vect_model_store_cost): Take a vec_load_store_type instead of a
28600 (vectorizable_mask_load_store): Update accordingly.
28601 (vectorizable_store): Likewise.
28602 * tree-vect-slp.c (vect_analyze_slp_cost_1): Update accordingly.
28604 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28606 * tree-vect-loop.c (vect_transform_loop): Stub out scalar
28607 IFN_MASK_LOAD calls here rather than...
28608 * tree-vect-stmts.c (vectorizable_mask_load_store): ...here.
28610 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28611 Alan Hayward <alan.hayward@arm.com>
28612 David Sherwood <david.sherwood@arm.com>
28614 * expmed.c (extract_bit_field_1): For vector extracts,
28615 fall back to extract_bit_field_as_subreg if vec_extract
28618 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28619 Alan Hayward <alan.hayward@arm.com>
28620 David Sherwood <david.sherwood@arm.com>
28622 * lra-spills.c (pseudo_reg_slot_compare): Sort slots by whether
28623 they are variable or constant sized.
28624 (assign_stack_slot_num_and_sort_pseudos): Don't reuse variable-sized
28625 slots for constant-sized data.
28627 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28628 Alan Hayward <alan.hayward@arm.com>
28629 David Sherwood <david.sherwood@arm.com>
28631 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): When
28632 handling COND_EXPRs with boolean comparisons, try to find a better
28633 basis for the mask type than the boolean itself.
28635 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28637 * doc/rtl.texi (MAX_BITSIZE_MODE_ANY_MODE): Describe how the default
28638 is calculated and how it can be overridden.
28639 * genmodes.c (max_bitsize_mode_any_mode): New variable.
28640 (create_modes): Initialize it from MAX_BITSIZE_MODE_ANY_MODE,
28642 (emit_max_int): Use it to set the output MAX_BITSIZE_MODE_ANY_MODE,
28645 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28646 Alan Hayward <alan.hayward@arm.com>
28647 David Sherwood <david.sherwood@arm.com>
28649 * config/aarch64/aarch64-protos.h (aarch64_output_simd_mov_immediate):
28650 Remove the mode argument.
28651 (aarch64_simd_valid_immediate): Remove the mode and inverse
28653 * config/aarch64/iterators.md (bitsize): New iterator.
28654 * config/aarch64/aarch64-simd.md (*aarch64_simd_mov<mode>, and<mode>3)
28655 (ior<mode>3): Update calls to aarch64_output_simd_mov_immediate.
28656 * config/aarch64/constraints.md (Do, Db, Dn): Update calls to
28657 aarch64_simd_valid_immediate.
28658 * config/aarch64/predicates.md (aarch64_reg_or_orr_imm): Likewise.
28659 (aarch64_reg_or_bic_imm): Likewise.
28660 * config/aarch64/aarch64.c (simd_immediate_info): Replace mvn
28661 with an insn_type enum and msl with a modifier_type enum.
28662 Replace element_width with a scalar_mode. Change the shift
28663 to unsigned int. Add constructors for scalar_float_mode and
28664 scalar_int_mode elements.
28665 (aarch64_vect_float_const_representable_p): Delete.
28666 (aarch64_can_const_movi_rtx_p)
28667 (aarch64_simd_scalar_immediate_valid_for_move)
28668 (aarch64_simd_make_constant): Update call to
28669 aarch64_simd_valid_immediate.
28670 (aarch64_advsimd_valid_immediate_hs): New function.
28671 (aarch64_advsimd_valid_immediate): Likewise.
28672 (aarch64_simd_valid_immediate): Remove mode and inverse
28673 arguments. Rewrite to use the above. Use const_vec_duplicate_p
28674 to detect duplicated constants and use aarch64_float_const_zero_rtx_p
28675 and aarch64_float_const_representable_p on the result.
28676 (aarch64_output_simd_mov_immediate): Remove mode argument.
28677 Update call to aarch64_simd_valid_immediate and use of
28678 simd_immediate_info.
28679 (aarch64_output_scalar_simd_mov_immediate): Update call
28682 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28683 Alan Hayward <alan.hayward@arm.com>
28684 David Sherwood <david.sherwood@arm.com>
28686 * machmode.h (mode_precision): Prefix with CONST_MODE_PRECISION.
28687 (mode_nunits): Likewise CONST_MODE_NUNITS.
28688 * machmode.def (ADJUST_NUNITS): Document.
28689 * genmodes.c (mode_data::need_nunits_adj): New field.
28690 (blank_mode): Update accordingly.
28691 (adj_nunits): New variable.
28692 (print_maybe_const_decl): Replace CATEGORY with a NEEDS_ADJ
28694 (emit_mode_size_inline): Set need_bytesize_adj for all modes
28695 listed in adj_nunits.
28696 (emit_mode_nunits_inline): Set need_nunits_adj for all modes
28697 listed in adj_nunits. Don't emit case statements for such modes.
28698 (emit_insn_modes_h): Emit definitions of CONST_MODE_NUNITS
28699 and CONST_MODE_PRECISION. Make CONST_MODE_SIZE expand to
28700 nothing if adj_nunits is nonnull.
28701 (emit_mode_precision, emit_mode_nunits): Use print_maybe_const_decl.
28702 (emit_mode_unit_size, emit_mode_base_align, emit_mode_ibit)
28703 (emit_mode_fbit): Update use of print_maybe_const_decl.
28704 (emit_move_size): Likewise. Treat the array as non-const
28706 (emit_mode_adjustments): Handle adj_nunits.
28708 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28710 * machmode.def (VECTOR_MODES_WITH_PREFIX): Document.
28711 * genmodes.c (VECTOR_MODES_WITH_PREFIX): New macro.
28712 (VECTOR_MODES): Use it.
28713 (make_vector_modes): Take the prefix as an argument.
28715 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28716 Alan Hayward <alan.hayward@arm.com>
28717 David Sherwood <david.sherwood@arm.com>
28719 * mode-classes.def (MODE_VECTOR_BOOL): New mode class.
28720 * machmode.h (INTEGRAL_MODE_P, VECTOR_MODE_P): Return true
28721 for MODE_VECTOR_BOOL.
28722 * machmode.def (VECTOR_BOOL_MODE): Document.
28723 * genmodes.c (VECTOR_BOOL_MODE): New macro.
28724 (make_vector_bool_mode): New function.
28725 (complete_mode, emit_mode_wider, emit_mode_adjustments): Handle
28727 * lto-streamer-in.c (lto_input_mode_table): Likewise.
28728 * rtx-vector-builder.c (rtx_vector_builder::find_cached_value):
28730 * stor-layout.c (int_mode_for_mode): Likewise.
28731 * tree.c (build_vector_type_for_mode): Likewise.
28732 * varasm.c (output_constant_pool_2): Likewise.
28733 * emit-rtl.c (init_emit_once): Make sure that CONST1_RTX (BImode) and
28734 CONSTM1_RTX (BImode) are the same thing. Initialize const_tiny_rtx
28735 for MODE_VECTOR_BOOL.
28736 * expr.c (expand_expr_real_1): Use VECTOR_MODE_P instead of a list
28737 of mode class checks.
28738 * tree-vect-generic.c (expand_vector_operation): Use VECTOR_MODE_P
28739 instead of a list of mode class checks.
28740 (expand_vector_scalar_condition): Likewise.
28741 (type_for_widest_vector_mode): Handle BImode as an inner mode.
28743 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28744 Alan Hayward <alan.hayward@arm.com>
28745 David Sherwood <david.sherwood@arm.com>
28747 * machmode.h (mode_size): Change from unsigned short to
28749 (mode_to_bytes): Return a poly_uint16 rather than an unsigned short.
28750 (GET_MODE_SIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
28751 or if measurement_type is not polynomial.
28752 (fixed_size_mode::includes_p): Check for constant-sized modes.
28753 * genmodes.c (emit_mode_size_inline): Make mode_size_inline
28754 return a poly_uint16 rather than an unsigned short.
28755 (emit_mode_size): Change the type of mode_size from unsigned short
28756 to poly_uint16_pod. Use ZERO_COEFFS for the initializer.
28757 (emit_mode_adjustments): Cope with polynomial vector sizes.
28758 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
28760 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
28762 * auto-inc-dec.c (try_merge): Treat GET_MODE_SIZE as polynomial.
28763 * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Likewise.
28764 * caller-save.c (setup_save_areas): Likewise.
28765 (replace_reg_with_saved_mem): Likewise.
28766 * calls.c (emit_library_call_value_1): Likewise.
28767 * combine-stack-adj.c (combine_stack_adjustments_for_block): Likewise.
28768 * combine.c (simplify_set, make_extraction, simplify_shift_const_1)
28769 (gen_lowpart_for_combine): Likewise.
28770 * convert.c (convert_to_integer_1): Likewise.
28771 * cse.c (equiv_constant, cse_insn): Likewise.
28772 * cselib.c (autoinc_split, cselib_hash_rtx): Likewise.
28773 (cselib_subst_to_values): Likewise.
28774 * dce.c (word_dce_process_block): Likewise.
28775 * df-problems.c (df_word_lr_mark_ref): Likewise.
28776 * dwarf2cfi.c (init_one_dwarf_reg_size): Likewise.
28777 * dwarf2out.c (multiple_reg_loc_descriptor, mem_loc_descriptor)
28778 (concat_loc_descriptor, concatn_loc_descriptor, loc_descriptor)
28779 (rtl_for_decl_location): Likewise.
28780 * emit-rtl.c (gen_highpart, widen_memory_access): Likewise.
28781 * expmed.c (extract_bit_field_1, extract_integral_bit_field): Likewise.
28782 * expr.c (emit_group_load_1, clear_storage_hints): Likewise.
28783 (emit_move_complex, emit_move_multi_word, emit_push_insn): Likewise.
28784 (expand_expr_real_1): Likewise.
28785 * function.c (assign_parm_setup_block_p, assign_parm_setup_block)
28786 (pad_below): Likewise.
28787 * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
28788 * gimple-ssa-store-merging.c (rhs_valid_for_store_merging_p): Likewise.
28789 * ira.c (get_subreg_tracking_sizes): Likewise.
28790 * ira-build.c (ira_create_allocno_objects): Likewise.
28791 * ira-color.c (coalesced_pseudo_reg_slot_compare): Likewise.
28792 (ira_sort_regnos_for_alter_reg): Likewise.
28793 * ira-costs.c (record_operand_costs): Likewise.
28794 * lower-subreg.c (interesting_mode_p, simplify_gen_subreg_concatn)
28795 (resolve_simple_move): Likewise.
28796 * lra-constraints.c (get_reload_reg, operands_match_p): Likewise.
28797 (process_addr_reg, simplify_operand_subreg, curr_insn_transform)
28798 (lra_constraints): Likewise.
28799 (CONST_POOL_OK_P): Reject variable-sized modes.
28800 * lra-spills.c (slot, assign_mem_slot, pseudo_reg_slot_compare)
28801 (add_pseudo_to_slot, lra_spill): Likewise.
28802 * omp-low.c (omp_clause_aligned_alignment): Likewise.
28803 * optabs-query.c (get_best_extraction_insn): Likewise.
28804 * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
28805 * optabs.c (expand_vec_perm_var, expand_vec_cond_expr): Likewise.
28806 (expand_mult_highpart, valid_multiword_target_p): Likewise.
28807 * recog.c (offsettable_address_addr_space_p): Likewise.
28808 * regcprop.c (maybe_mode_change): Likewise.
28809 * reginfo.c (choose_hard_reg_mode, record_subregs_of_mode): Likewise.
28810 * regrename.c (build_def_use): Likewise.
28811 * regstat.c (dump_reg_info): Likewise.
28812 * reload.c (complex_word_subreg_p, push_reload, find_dummy_reload)
28813 (find_reloads, find_reloads_subreg_address): Likewise.
28814 * reload1.c (eliminate_regs_1): Likewise.
28815 * rtlanal.c (for_each_inc_dec_find_inc_dec, rtx_cost): Likewise.
28816 * simplify-rtx.c (avoid_constant_pool_reference): Likewise.
28817 (simplify_binary_operation_1, simplify_subreg): Likewise.
28818 * targhooks.c (default_function_arg_padding): Likewise.
28819 (default_hard_regno_nregs, default_class_max_nregs): Likewise.
28820 * tree-cfg.c (verify_gimple_assign_binary): Likewise.
28821 (verify_gimple_assign_ternary): Likewise.
28822 * tree-inline.c (estimate_move_cost): Likewise.
28823 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
28824 * tree-ssa-loop-ivopts.c (add_autoinc_candidates): Likewise.
28825 (get_address_cost_ainc): Likewise.
28826 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Likewise.
28827 (vect_supportable_dr_alignment): Likewise.
28828 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
28829 (vectorizable_reduction): Likewise.
28830 * tree-vect-stmts.c (vectorizable_assignment, vectorizable_shift)
28831 (vectorizable_operation, vectorizable_load): Likewise.
28832 * tree.c (build_same_sized_truth_vector_type): Likewise.
28833 * valtrack.c (cleanup_auto_inc_dec): Likewise.
28834 * var-tracking.c (emit_note_insn_var_location): Likewise.
28835 * config/arc/arc.h (ASM_OUTPUT_CASE_END): Use as_a <scalar_int_mode>.
28836 (ADDR_VEC_ALIGN): Likewise.
28838 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28839 Alan Hayward <alan.hayward@arm.com>
28840 David Sherwood <david.sherwood@arm.com>
28842 * machmode.h (mode_to_bits): Return a poly_uint16 rather than an
28844 (GET_MODE_BITSIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
28845 or if measurement_type is polynomial.
28846 * calls.c (shift_return_value): Treat GET_MODE_BITSIZE as polynomial.
28847 * combine.c (make_extraction): Likewise.
28848 * dse.c (find_shift_sequence): Likewise.
28849 * dwarf2out.c (mem_loc_descriptor): Likewise.
28850 * expmed.c (store_integral_bit_field, extract_bit_field_1): Likewise.
28851 (extract_bit_field, extract_low_bits): Likewise.
28852 * expr.c (convert_move, convert_modes, emit_move_insn_1): Likewise.
28853 (optimize_bitfield_assignment_op, expand_assignment): Likewise.
28854 (store_expr_with_bounds, store_field, expand_expr_real_1): Likewise.
28855 * fold-const.c (optimize_bit_field_compare, merge_ranges): Likewise.
28856 * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
28857 * reload.c (find_reloads): Likewise.
28858 * reload1.c (alter_reg): Likewise.
28859 * stor-layout.c (bitwise_mode_for_mode, compute_record_mode): Likewise.
28860 * targhooks.c (default_secondary_memory_needed_mode): Likewise.
28861 * tree-if-conv.c (predicate_mem_writes): Likewise.
28862 * tree-ssa-strlen.c (handle_builtin_memcmp): Likewise.
28863 * tree-vect-patterns.c (adjust_bool_pattern): Likewise.
28864 * tree-vect-stmts.c (vectorizable_simd_clone_call): Likewise.
28865 * valtrack.c (dead_debug_insert_temp): Likewise.
28866 * varasm.c (mergeable_constant_section): Likewise.
28867 * config/sh/sh.h (LOCAL_ALIGNMENT): Use as_a <fixed_size_mode>.
28869 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28870 Alan Hayward <alan.hayward@arm.com>
28871 David Sherwood <david.sherwood@arm.com>
28873 * expr.c (expand_assignment): Cope with polynomial mode sizes
28874 when assigning to a CONCAT.
28876 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28877 Alan Hayward <alan.hayward@arm.com>
28878 David Sherwood <david.sherwood@arm.com>
28880 * machmode.h (mode_precision): Change from unsigned short to
28882 (mode_to_precision): Return a poly_uint16 rather than an unsigned
28884 (GET_MODE_PRECISION): Return a constant if ONLY_FIXED_SIZE_MODES,
28885 or if measurement_type is not polynomial.
28886 (HWI_COMPUTABLE_MODE_P): Turn into a function. Optimize the case
28887 in which the mode is already known to be a scalar_int_mode.
28888 * genmodes.c (emit_mode_precision): Change the type of mode_precision
28889 from unsigned short to poly_uint16_pod. Use ZERO_COEFFS for the
28891 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
28892 for GET_MODE_PRECISION.
28893 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
28894 for GET_MODE_PRECISION.
28895 * combine.c (update_rsp_from_reg_equal): Treat GET_MODE_PRECISION
28897 (try_combine, find_split_point, combine_simplify_rtx): Likewise.
28898 (expand_field_assignment, make_extraction): Likewise.
28899 (make_compound_operation_int, record_dead_and_set_regs_1): Likewise.
28900 (get_last_value): Likewise.
28901 * convert.c (convert_to_integer_1): Likewise.
28902 * cse.c (cse_insn): Likewise.
28903 * expr.c (expand_expr_real_1): Likewise.
28904 * lra-constraints.c (simplify_operand_subreg): Likewise.
28905 * optabs-query.c (can_atomic_load_p): Likewise.
28906 * optabs.c (expand_atomic_load): Likewise.
28907 (expand_atomic_store): Likewise.
28908 * ree.c (combine_reaching_defs): Likewise.
28909 * rtl.h (partial_subreg_p, paradoxical_subreg_p): Likewise.
28910 * rtlanal.c (nonzero_bits1, lsb_bitfield_op_p): Likewise.
28911 * tree.h (type_has_mode_precision_p): Likewise.
28912 * ubsan.c (instrument_si_overflow): Likewise.
28914 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28915 Alan Hayward <alan.hayward@arm.com>
28916 David Sherwood <david.sherwood@arm.com>
28918 * tree.h (TYPE_VECTOR_SUBPARTS): Turn into a function and handle
28919 polynomial numbers of units.
28920 (SET_TYPE_VECTOR_SUBPARTS): Likewise.
28921 (valid_vector_subparts_p): New function.
28922 (build_vector_type): Remove temporary shim and take the number
28923 of units as a poly_uint64 rather than an int.
28924 (build_opaque_vector_type): Take the number of units as a
28925 poly_uint64 rather than an int.
28926 * tree.c (build_vector_from_ctor): Handle polynomial
28927 TYPE_VECTOR_SUBPARTS.
28928 (type_hash_canon_hash, type_cache_hasher::equal): Likewise.
28929 (uniform_vector_p, vector_type_mode, build_vector): Likewise.
28930 (build_vector_from_val): If the number of units is variable,
28931 use build_vec_duplicate_cst for constant operands and
28932 VEC_DUPLICATE_EXPR otherwise.
28933 (make_vector_type): Remove temporary is_constant ().
28934 (build_vector_type, build_opaque_vector_type): Take the number of
28935 units as a poly_uint64 rather than an int.
28936 (check_vector_cst): Handle polynomial TYPE_VECTOR_SUBPARTS and
28938 * cfgexpand.c (expand_debug_expr): Likewise.
28939 * expr.c (count_type_elements, categorize_ctor_elements_1): Likewise.
28940 (store_constructor, expand_expr_real_1): Likewise.
28941 (const_scalar_mask_from_tree): Likewise.
28942 * fold-const-call.c (fold_const_reduction): Likewise.
28943 * fold-const.c (const_binop, const_unop, fold_convert_const): Likewise.
28944 (operand_equal_p, fold_vec_perm, fold_ternary_loc): Likewise.
28945 (native_encode_vector, vec_cst_ctor_to_array): Likewise.
28946 (fold_relational_const): Likewise.
28947 (native_interpret_vector): Likewise. Change the size from an
28948 int to an unsigned int.
28949 * gimple-fold.c (gimple_fold_stmt_to_constant_1): Handle polynomial
28950 TYPE_VECTOR_SUBPARTS.
28951 (gimple_fold_indirect_ref, gimple_build_vector): Likewise.
28952 (gimple_build_vector_from_val): Use VEC_DUPLICATE_EXPR when
28953 duplicating a non-constant operand into a variable-length vector.
28954 * hsa-brig.c (hsa_op_immed::emit_to_buffer): Handle polynomial
28955 TYPE_VECTOR_SUBPARTS and VECTOR_CST_NELTS.
28956 * ipa-icf.c (sem_variable::equals): Likewise.
28957 * match.pd: Likewise.
28958 * omp-simd-clone.c (simd_clone_subparts): Likewise.
28959 * print-tree.c (print_node): Likewise.
28960 * stor-layout.c (layout_type): Likewise.
28961 * targhooks.c (default_builtin_vectorization_cost): Likewise.
28962 * tree-cfg.c (verify_gimple_comparison): Likewise.
28963 (verify_gimple_assign_binary): Likewise.
28964 (verify_gimple_assign_ternary): Likewise.
28965 (verify_gimple_assign_single): Likewise.
28966 * tree-pretty-print.c (dump_generic_node): Likewise.
28967 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
28968 (simplify_bitfield_ref, is_combined_permutation_identity): Likewise.
28969 * tree-vect-data-refs.c (vect_permute_store_chain): Likewise.
28970 (vect_grouped_load_supported, vect_permute_load_chain): Likewise.
28971 (vect_shift_permute_load_chain): Likewise.
28972 * tree-vect-generic.c (nunits_for_known_piecewise_op): Likewise.
28973 (expand_vector_condition, optimize_vector_constructor): Likewise.
28974 (lower_vec_perm, get_compute_type): Likewise.
28975 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
28976 (get_initial_defs_for_reduction, vect_transform_loop): Likewise.
28977 * tree-vect-patterns.c (vect_recog_bool_pattern): Likewise.
28978 (vect_recog_mask_conversion_pattern): Likewise.
28979 * tree-vect-slp.c (vect_supported_load_permutation_p): Likewise.
28980 (vect_get_constant_vectors, vect_transform_slp_perm_load): Likewise.
28981 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
28982 (get_group_load_store_type, vectorizable_mask_load_store): Likewise.
28983 (vectorizable_bswap, simd_clone_subparts, vectorizable_assignment)
28984 (vectorizable_shift, vectorizable_operation, vectorizable_store)
28985 (vectorizable_load, vect_is_simple_cond, vectorizable_comparison)
28986 (supportable_widening_operation): Likewise.
28987 (supportable_narrowing_operation): Likewise.
28988 * tree-vector-builder.c (tree_vector_builder::binary_encoded_nelts):
28990 * varasm.c (output_constant): Likewise.
28992 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
28993 Alan Hayward <alan.hayward@arm.com>
28994 David Sherwood <david.sherwood@arm.com>
28996 * tree-vect-data-refs.c (vect_permute_store_chain): Reorganize
28997 so that both the length == 3 and length != 3 cases set up their
28998 own permute vectors. Add comments explaining why we know the
28999 number of elements is constant.
29000 (vect_permute_load_chain): Likewise.
29002 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29003 Alan Hayward <alan.hayward@arm.com>
29004 David Sherwood <david.sherwood@arm.com>
29006 * machmode.h (mode_nunits): Change from unsigned char to
29008 (ONLY_FIXED_SIZE_MODES): New macro.
29009 (pod_mode::measurement_type, scalar_int_mode::measurement_type)
29010 (scalar_float_mode::measurement_type, scalar_mode::measurement_type)
29011 (complex_mode::measurement_type, fixed_size_mode::measurement_type):
29013 (mode_to_nunits): Return a poly_uint16 rather than an unsigned short.
29014 (GET_MODE_NUNITS): Return a constant if ONLY_FIXED_SIZE_MODES,
29015 or if measurement_type is not polynomial.
29016 * genmodes.c (ZERO_COEFFS): New macro.
29017 (emit_mode_nunits_inline): Make mode_nunits_inline return a
29019 (emit_mode_nunits): Change the type of mode_nunits to poly_uint16_pod.
29020 Use ZERO_COEFFS when emitting initializers.
29021 * data-streamer.h (bp_pack_poly_value): New function.
29022 (bp_unpack_poly_value): Likewise.
29023 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
29024 for GET_MODE_NUNITS.
29025 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
29026 for GET_MODE_NUNITS.
29027 * tree.c (make_vector_type): Remove temporary shim and make
29028 the real function take the number of units as a poly_uint64
29029 rather than an int.
29030 (build_vector_type_for_mode): Handle polynomial nunits.
29031 * dwarf2out.c (loc_descriptor, add_const_value_attribute): Likewise.
29032 * emit-rtl.c (const_vec_series_p_1): Likewise.
29033 (gen_rtx_CONST_VECTOR): Likewise.
29034 * fold-const.c (test_vec_duplicate_folding): Likewise.
29035 * genrecog.c (validate_pattern): Likewise.
29036 * optabs-query.c (can_vec_perm_var_p, can_mult_highpart_p): Likewise.
29037 * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
29038 * optabs.c (expand_vector_broadcast, expand_binop_directly): Likewise.
29039 (shift_amt_for_vec_perm_mask, expand_vec_perm_var): Likewise.
29040 (expand_vec_cond_expr, expand_mult_highpart): Likewise.
29041 * rtlanal.c (subreg_get_info): Likewise.
29042 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
29043 (vect_grouped_load_supported): Likewise.
29044 * tree-vect-generic.c (type_for_widest_vector_mode): Likewise.
29045 * tree-vect-loop.c (have_whole_vector_shift): Likewise.
29046 * simplify-rtx.c (simplify_unary_operation_1): Likewise.
29047 (simplify_const_unary_operation, simplify_binary_operation_1)
29048 (simplify_const_binary_operation, simplify_ternary_operation)
29049 (test_vector_ops_duplicate, test_vector_ops): Likewise.
29050 (simplify_immed_subreg): Use GET_MODE_NUNITS on a fixed_size_mode
29051 instead of CONST_VECTOR_NUNITS.
29052 * varasm.c (output_constant_pool_2): Likewise.
29053 * rtx-vector-builder.c (rtx_vector_builder::build): Only include the
29054 explicit-encoded elements in the XVEC for variable-length vectors.
29056 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29058 * lra-constraints.c (curr_insn_transform): Use partial_subreg_p.
29060 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29061 Alan Hayward <alan.hayward@arm.com>
29062 David Sherwood <david.sherwood@arm.com>
29064 * coretypes.h (fixed_size_mode): Declare.
29065 (fixed_size_mode_pod): New typedef.
29066 * builtins.h (target_builtins::x_apply_args_mode)
29067 (target_builtins::x_apply_result_mode): Change type to
29068 fixed_size_mode_pod.
29069 * builtins.c (apply_args_size, apply_result_size, result_vector)
29070 (expand_builtin_apply_args_1, expand_builtin_apply)
29071 (expand_builtin_return): Update accordingly.
29073 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29075 * cse.c (hash_rtx_cb): Hash only the encoded elements.
29076 * cselib.c (cselib_hash_rtx): Likewise.
29077 * expmed.c (make_tree): Build VECTOR_CSTs directly from the
29078 CONST_VECTOR encoding.
29080 2018-01-03 Jakub Jelinek <jakub@redhat.com>
29081 Jeff Law <law@redhat.com>
29084 * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): For
29085 noreturn probe, use gen_pop instead of ix86_emit_restore_reg_using_pop,
29086 only set RTX_FRAME_RELATED_P on both the push and pop if cfa_reg is sp
29087 and add REG_CFA_ADJUST_CFA notes in that case to both insns.
29090 * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): Do not
29091 explicitly probe *sp in a noreturn function if there were any callee
29092 register saves or frame pointer is needed.
29094 2018-01-03 Jakub Jelinek <jakub@redhat.com>
29097 * cfgexpand.c (expand_debug_expr): Return NULL if mode is
29098 BLKmode for ternary, binary or unary expressions.
29101 * var-tracking.c (delete_vta_debug_insn): New inline function.
29102 (delete_vta_debug_insns): Add USE_CFG argument, if true, walk just
29103 insns from get_insns () to NULL instead of each bb separately.
29104 Use delete_vta_debug_insn. No longer static.
29105 (vt_debug_insns_local, variable_tracking_main_1): Adjust
29106 delete_vta_debug_insns callers.
29107 * rtl.h (delete_vta_debug_insns): Declare.
29108 * final.c (rest_of_handle_final): Call delete_vta_debug_insns
29109 instead of variable_tracking_main.
29111 2018-01-03 Martin Sebor <msebor@redhat.com>
29113 PR tree-optimization/83603
29114 * calls.c (maybe_warn_nonstring_arg): Avoid accessing function
29115 arguments past the endof the argument list in functions declared
29116 without a prototype.
29117 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call):
29118 Avoid checking when arguments are null.
29120 2018-01-03 Martin Sebor <msebor@redhat.com>
29123 * doc/extend.texi (attribute const): Fix a typo.
29124 * ipa-pure-const.c ((warn_function_const, warn_function_pure): Avoid
29125 issuing -Wsuggest-attribute for void functions.
29127 2018-01-03 Martin Sebor <msebor@redhat.com>
29129 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Use
29130 offset_int::from instead of wide_int::to_shwi.
29131 (maybe_diag_overlap): Remove assertion.
29132 Use HOST_WIDE_INT_PRINT_DEC instead of %lli.
29133 * gimple-ssa-sprintf.c (format_directive): Same.
29134 (parse_directive): Same.
29135 (sprintf_dom_walker::compute_format_length): Same.
29136 (try_substitute_return_value): Same.
29138 2018-01-03 Jeff Law <law@redhat.com>
29140 PR middle-end/83654
29141 * explow.c (anti_adjust_stack_and_probe_stack_clash): Test a
29142 non-constant residual for zero at runtime and avoid probing in
29143 that case. Reorganize code for trailing problem to mirror handling
29146 2018-01-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
29148 PR tree-optimization/83501
29149 * tree-ssa-strlen.c (get_string_cst): New.
29150 (handle_char_store): Call get_string_cst.
29152 2018-01-03 Martin Liska <mliska@suse.cz>
29154 PR tree-optimization/83593
29155 * tree-ssa-strlen.c: Include tree-cfg.h.
29156 (strlen_check_and_optimize_stmt): Add new argument cleanup_eh.
29157 (strlen_dom_walker): Add new member variable m_cleanup_cfg.
29158 (strlen_dom_walker::strlen_dom_walker): Initialize m_cleanup_cfg
29160 (strlen_dom_walker::before_dom_children): Call
29161 gimple_purge_dead_eh_edges. Dump tranformation with details
29163 (strlen_dom_walker::before_dom_children): Update call by adding
29164 new argument cleanup_eh.
29165 (pass_strlen::execute): Return TODO_cleanup_cfg if needed.
29167 2018-01-03 Martin Liska <mliska@suse.cz>
29170 * cif-code.def (VARIADIC_THUNK): New enum value.
29171 * ipa-fnsummary.c (compute_fn_summary): Do not inline variadic
29174 2018-01-03 Jan Beulich <jbeulich@suse.com>
29176 * sse.md (mov<mode>_internal): Tighten condition for when to use
29177 vmovdqu<ssescalarsize> for TI and OI modes.
29179 2018-01-03 Jakub Jelinek <jakub@redhat.com>
29181 Update copyright years.
29183 2018-01-03 Martin Liska <mliska@suse.cz>
29186 * ipa-visibility.c (function_and_variable_visibility): Skip
29187 functions with noipa attribure.
29189 2018-01-03 Jakub Jelinek <jakub@redhat.com>
29191 * gcc.c (process_command): Update copyright notice dates.
29192 * gcov-dump.c (print_version): Ditto.
29193 * gcov.c (print_version): Ditto.
29194 * gcov-tool.c (print_version): Ditto.
29195 * gengtype.c (create_file): Ditto.
29196 * doc/cpp.texi: Bump @copying's copyright year.
29197 * doc/cppinternals.texi: Ditto.
29198 * doc/gcc.texi: Ditto.
29199 * doc/gccint.texi: Ditto.
29200 * doc/gcov.texi: Ditto.
29201 * doc/install.texi: Ditto.
29202 * doc/invoke.texi: Ditto.
29204 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29206 * vector-builder.h (vector_builder::m_full_nelts): Change from
29207 unsigned int to poly_uint64.
29208 (vector_builder::full_nelts): Update prototype accordingly.
29209 (vector_builder::new_vector): Likewise.
29210 (vector_builder::encoded_full_vector_p): Handle polynomial full_nelts.
29211 (vector_builder::operator ==): Likewise.
29212 (vector_builder::finalize): Likewise.
29213 * int-vector-builder.h (int_vector_builder::int_vector_builder):
29214 Take the number of elements as a poly_uint64 rather than an
29216 * vec-perm-indices.h (vec_perm_indices::m_nelts_per_input): Change
29217 from unsigned int to poly_uint64.
29218 (vec_perm_indices::vec_perm_indices): Update prototype accordingly.
29219 (vec_perm_indices::new_vector): Likewise.
29220 (vec_perm_indices::length): Likewise.
29221 (vec_perm_indices::nelts_per_input): Likewise.
29222 (vec_perm_indices::input_nelts): Likewise.
29223 * vec-perm-indices.c (vec_perm_indices::new_vector): Take the
29224 number of elements per input as a poly_uint64 rather than an
29225 unsigned int. Use the original encoding for variable-length
29226 vectors, rather than clamping each individual element.
29227 For the second and subsequent elements in each pattern,
29228 clamp the step and base before clamping their sum.
29229 (vec_perm_indices::series_p): Handle polynomial element counts.
29230 (vec_perm_indices::all_in_range_p): Likewise.
29231 (vec_perm_indices_to_tree): Likewise.
29232 (vec_perm_indices_to_rtx): Likewise.
29233 * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise.
29234 * tree-vector-builder.c (tree_vector_builder::new_unary_operation)
29235 (tree_vector_builder::new_binary_operation): Handle polynomial
29236 element counts. Return false if we need to know the number
29237 of elements at compile time.
29238 * fold-const.c (fold_vec_perm): Punt if the number of elements
29239 isn't known at compile time.
29241 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29243 * vec-perm-indices.h (vec_perm_builder): Change element type
29244 from HOST_WIDE_INT to poly_int64.
29245 (vec_perm_indices::element_type): Update accordingly.
29246 (vec_perm_indices::clamp): Handle polynomial element_types.
29247 * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
29248 (vec_perm_indices::all_in_range_p): Likewise.
29249 (tree_to_vec_perm_builder): Check for poly_int64 trees rather
29251 * vector-builder.h (vector_builder::stepped_sequence_p): Handle
29252 polynomial vec_perm_indices element types.
29253 * int-vector-builder.h (int_vector_builder::equal_p): Likewise.
29254 * fold-const.c (fold_vec_perm): Likewise.
29255 * optabs.c (shift_amt_for_vec_perm_mask): Likewise.
29256 * tree-vect-generic.c (lower_vec_perm): Likewise.
29257 * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
29258 * config/aarch64/aarch64.c (aarch64_evpc_tbl): Cast d->perm
29259 element type to HOST_WIDE_INT.
29261 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29262 Alan Hayward <alan.hayward@arm.com>
29263 David Sherwood <david.sherwood@arm.com>
29265 * alias.c (addr_side_effect_eval): Take the size as a poly_int64
29266 rather than an int. Use plus_constant.
29267 (memrefs_conflict_p): Take the sizes as poly_int64s rather than ints.
29268 Take the offset "c" as a poly_int64 rather than a HOST_WIDE_INT.
29270 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29271 Alan Hayward <alan.hayward@arm.com>
29272 David Sherwood <david.sherwood@arm.com>
29274 * calls.c (emit_call_1, expand_call): Change struct_value_size from
29275 a HOST_WIDE_INT to a poly_int64.
29277 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29278 Alan Hayward <alan.hayward@arm.com>
29279 David Sherwood <david.sherwood@arm.com>
29281 * calls.c (load_register_parameters): Cope with polynomial
29282 mode sizes. Require a constant size for BLKmode parameters
29283 that aren't described by a PARALLEL. If BLOCK_REG_PADDING
29284 forces a parameter to be padded at the lsb end in order to
29285 fill a complete number of words, require the parameter size
29286 to be ordered wrt UNITS_PER_WORD.
29288 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29289 Alan Hayward <alan.hayward@arm.com>
29290 David Sherwood <david.sherwood@arm.com>
29292 * reload1.c (spill_stack_slot_width): Change element type
29293 from unsigned int to poly_uint64_pod.
29294 (alter_reg): Treat mode sizes as polynomial.
29296 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29297 Alan Hayward <alan.hayward@arm.com>
29298 David Sherwood <david.sherwood@arm.com>
29300 * reload.c (complex_word_subreg_p): New function.
29301 (reload_inner_reg_of_subreg, push_reload): Use it.
29303 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29304 Alan Hayward <alan.hayward@arm.com>
29305 David Sherwood <david.sherwood@arm.com>
29307 * lra-constraints.c (process_alt_operands): Reject matched
29308 operands whose sizes aren't ordered.
29309 (match_reload): Refer to this check here.
29311 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29312 Alan Hayward <alan.hayward@arm.com>
29313 David Sherwood <david.sherwood@arm.com>
29315 * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Assert
29316 that the mode size is in the set {1, 2, 4, 8, 16}.
29318 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29319 Alan Hayward <alan.hayward@arm.com>
29320 David Sherwood <david.sherwood@arm.com>
29322 * var-tracking.c (adjust_mems): Treat mode sizes as polynomial.
29323 Use plus_constant instead of gen_rtx_PLUS.
29325 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29326 Alan Hayward <alan.hayward@arm.com>
29327 David Sherwood <david.sherwood@arm.com>
29329 * config/cr16/cr16-protos.h (cr16_push_rounding): Declare.
29330 * config/cr16/cr16.h (PUSH_ROUNDING): Move implementation to...
29331 * config/cr16/cr16.c (cr16_push_rounding): ...this new function.
29332 * config/h8300/h8300-protos.h (h8300_push_rounding): Declare.
29333 * config/h8300/h8300.h (PUSH_ROUNDING): Move implementation to...
29334 * config/h8300/h8300.c (h8300_push_rounding): ...this new function.
29335 * config/i386/i386-protos.h (ix86_push_rounding): Declare.
29336 * config/i386/i386.h (PUSH_ROUNDING): Move implementation to...
29337 * config/i386/i386.c (ix86_push_rounding): ...this new function.
29338 * config/m32c/m32c-protos.h (m32c_push_rounding): Take and return
29340 * config/m32c/m32c.c (m32c_push_rounding): Likewise.
29341 * config/m68k/m68k-protos.h (m68k_push_rounding): Declare.
29342 * config/m68k/m68k.h (PUSH_ROUNDING): Move implementation to...
29343 * config/m68k/m68k.c (m68k_push_rounding): ...this new function.
29344 * config/pdp11/pdp11-protos.h (pdp11_push_rounding): Declare.
29345 * config/pdp11/pdp11.h (PUSH_ROUNDING): Move implementation to...
29346 * config/pdp11/pdp11.c (pdp11_push_rounding): ...this new function.
29347 * config/stormy16/stormy16-protos.h (xstormy16_push_rounding): Declare.
29348 * config/stormy16/stormy16.h (PUSH_ROUNDING): Move implementation to...
29349 * config/stormy16/stormy16.c (xstormy16_push_rounding): ...this new
29351 * expr.c (emit_move_resolve_push): Treat the input and result
29352 of PUSH_ROUNDING as a poly_int64.
29353 (emit_move_complex_push, emit_single_push_insn_1): Likewise.
29354 (emit_push_insn): Likewise.
29355 * lra-eliminations.c (mark_not_eliminable): Likewise.
29356 * recog.c (push_operand): Likewise.
29357 * reload1.c (elimination_effects): Likewise.
29358 * rtlanal.c (nonzero_bits1): Likewise.
29359 * calls.c (store_one_arg): Likewise. Require the padding to be
29360 known at compile time.
29362 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29363 Alan Hayward <alan.hayward@arm.com>
29364 David Sherwood <david.sherwood@arm.com>
29366 * expr.c (emit_single_push_insn_1): Treat mode sizes as polynomial.
29367 Use plus_constant instead of gen_rtx_PLUS.
29369 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29370 Alan Hayward <alan.hayward@arm.com>
29371 David Sherwood <david.sherwood@arm.com>
29373 * auto-inc-dec.c (set_inc_state): Take the mode size as a poly_int64
29374 rather than an int.
29376 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29377 Alan Hayward <alan.hayward@arm.com>
29378 David Sherwood <david.sherwood@arm.com>
29380 * expr.c (expand_expr_real_1): Use tree_to_poly_uint64
29381 instead of int_size_in_bytes when handling VIEW_CONVERT_EXPRs
29382 via stack temporaries. Treat the mode size as polynomial too.
29384 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29385 Alan Hayward <alan.hayward@arm.com>
29386 David Sherwood <david.sherwood@arm.com>
29388 * expr.c (expand_expr_real_2): When handling conversions involving
29389 unions, apply tree_to_poly_uint64 to the TYPE_SIZE rather than
29390 multiplying int_size_in_bytes by BITS_PER_UNIT. Treat GET_MODE_BISIZE
29391 as a poly_uint64 too.
29393 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29394 Alan Hayward <alan.hayward@arm.com>
29395 David Sherwood <david.sherwood@arm.com>
29397 * rtlanal.c (subreg_get_info): Handle polynomial mode sizes.
29399 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29400 Alan Hayward <alan.hayward@arm.com>
29401 David Sherwood <david.sherwood@arm.com>
29403 * combine.c (can_change_dest_mode): Handle polynomial
29404 REGMODE_NATURAL_SIZE.
29405 * expmed.c (store_bit_field_1): Likewise.
29406 * expr.c (store_constructor): Likewise.
29407 * emit-rtl.c (validate_subreg): Operate on polynomial mode sizes
29408 and polynomial REGMODE_NATURAL_SIZE.
29409 (gen_lowpart_common): Likewise.
29410 * reginfo.c (record_subregs_of_mode): Likewise.
29411 * rtlanal.c (read_modify_subreg_p): Likewise.
29413 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29414 Alan Hayward <alan.hayward@arm.com>
29415 David Sherwood <david.sherwood@arm.com>
29417 * internal-fn.c (expand_vector_ubsan_overflow): Handle polynomial
29418 numbers of elements.
29420 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29421 Alan Hayward <alan.hayward@arm.com>
29422 David Sherwood <david.sherwood@arm.com>
29424 * match.pd: Cope with polynomial numbers of vector elements.
29426 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29427 Alan Hayward <alan.hayward@arm.com>
29428 David Sherwood <david.sherwood@arm.com>
29430 * fold-const.c (fold_indirect_ref_1): Handle polynomial offsets
29431 in a POINTER_PLUS_EXPR.
29433 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29434 Alan Hayward <alan.hayward@arm.com>
29435 David Sherwood <david.sherwood@arm.com>
29437 * omp-simd-clone.c (simd_clone_subparts): New function.
29438 (simd_clone_init_simd_arrays): Use it instead of TYPE_VECTOR_SUBPARTS.
29439 (ipa_simd_modify_function_body): Likewise.
29441 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29442 Alan Hayward <alan.hayward@arm.com>
29443 David Sherwood <david.sherwood@arm.com>
29445 * tree-vect-generic.c (nunits_for_known_piecewise_op): New function.
29446 (expand_vector_piecewise): Use it instead of TYPE_VECTOR_SUBPARTS.
29447 (expand_vector_addition, add_rshift, expand_vector_divmod): Likewise.
29448 (expand_vector_condition, vector_element): Likewise.
29449 (subparts_gt): New function.
29450 (get_compute_type): Use subparts_gt.
29451 (count_type_subparts): Delete.
29452 (expand_vector_operations_1): Use subparts_gt instead of
29453 count_type_subparts.
29455 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29456 Alan Hayward <alan.hayward@arm.com>
29457 David Sherwood <david.sherwood@arm.com>
29459 * tree-vect-data-refs.c (vect_no_alias_p): Replace with...
29460 (vect_compile_time_alias): ...this new function. Do the calculation
29461 on poly_ints rather than trees.
29462 (vect_prune_runtime_alias_test_list): Update call accordingly.
29464 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29465 Alan Hayward <alan.hayward@arm.com>
29466 David Sherwood <david.sherwood@arm.com>
29468 * tree-vect-slp.c (vect_build_slp_tree_1): Handle polynomial
29470 (vect_schedule_slp_instance): Likewise.
29472 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29473 Alan Hayward <alan.hayward@arm.com>
29474 David Sherwood <david.sherwood@arm.com>
29476 * tree-vect-slp.c (vect_get_and_check_slp_defs): Reject
29477 constant and extern definitions for variable-length vectors.
29478 (vect_get_constant_vectors): Note that the number of units
29479 is known to be constant.
29481 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29482 Alan Hayward <alan.hayward@arm.com>
29483 David Sherwood <david.sherwood@arm.com>
29485 * tree-vect-stmts.c (vectorizable_conversion): Treat the number
29486 of units as polynomial. Choose between WIDE and NARROW based
29489 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29490 Alan Hayward <alan.hayward@arm.com>
29491 David Sherwood <david.sherwood@arm.com>
29493 * tree-vect-stmts.c (simd_clone_subparts): New function.
29494 (vectorizable_simd_clone_call): Use it instead of TYPE_VECTOR_SUBPARTS.
29496 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29497 Alan Hayward <alan.hayward@arm.com>
29498 David Sherwood <david.sherwood@arm.com>
29500 * tree-vect-stmts.c (vectorizable_call): Treat the number of
29501 vectors as polynomial. Use build_index_vector for
29502 IFN_GOMP_SIMD_LANE.
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 * tree-vect-stmts.c (get_load_store_type): Treat the number of
29509 units as polynomial. Reject VMAT_ELEMENTWISE and VMAT_STRIDED_SLP
29510 for variable-length vectors.
29511 (vectorizable_mask_load_store): Treat the number of units as
29512 polynomial, asserting that it is constant if the condition has
29513 already been enforced.
29514 (vectorizable_store, vectorizable_load): Likewise.
29516 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29517 Alan Hayward <alan.hayward@arm.com>
29518 David Sherwood <david.sherwood@arm.com>
29520 * tree-vect-loop.c (vectorizable_live_operation): Treat the number
29521 of units as polynomial. Punt if we can't tell at compile time
29522 which vector contains the final result.
29524 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29525 Alan Hayward <alan.hayward@arm.com>
29526 David Sherwood <david.sherwood@arm.com>
29528 * tree-vect-loop.c (vectorizable_induction): Treat the number
29529 of units as polynomial. Punt on SLP inductions. Use an integer
29530 VEC_SERIES_EXPR for variable-length integer reductions. Use a
29531 cast of such a series for variable-length floating-point
29534 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29535 Alan Hayward <alan.hayward@arm.com>
29536 David Sherwood <david.sherwood@arm.com>
29538 * tree.h (build_index_vector): Declare.
29539 * tree.c (build_index_vector): New function.
29540 * tree-vect-loop.c (get_initial_defs_for_reduction): Treat the number
29541 of units as polynomial, forcibly converting it to a constant if
29542 vectorizable_reduction has already enforced the condition.
29543 (vect_create_epilog_for_reduction): Likewise. Use build_index_vector
29544 to create a {1,2,3,...} vector.
29545 (vectorizable_reduction): Treat the number of units as polynomial.
29546 Choose vectype_in based on the largest scalar element size rather
29547 than the smallest number of units. Enforce the restrictions
29550 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29551 Alan Hayward <alan.hayward@arm.com>
29552 David Sherwood <david.sherwood@arm.com>
29554 * tree-vect-data-refs.c (vector_alignment_reachable_p): Treat the
29555 number of units as polynomial.
29557 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29558 Alan Hayward <alan.hayward@arm.com>
29559 David Sherwood <david.sherwood@arm.com>
29561 * target.h (vector_sizes, auto_vector_sizes): New typedefs.
29562 * target.def (autovectorize_vector_sizes): Return the vector sizes
29563 by pointer, using vector_sizes rather than a bitmask.
29564 * targhooks.h (default_autovectorize_vector_sizes): Update accordingly.
29565 * targhooks.c (default_autovectorize_vector_sizes): Likewise.
29566 * config/aarch64/aarch64.c (aarch64_autovectorize_vector_sizes):
29568 * config/arc/arc.c (arc_autovectorize_vector_sizes): Likewise.
29569 * config/arm/arm.c (arm_autovectorize_vector_sizes): Likewise.
29570 * config/i386/i386.c (ix86_autovectorize_vector_sizes): Likewise.
29571 * config/mips/mips.c (mips_autovectorize_vector_sizes): Likewise.
29572 * omp-general.c (omp_max_vf): Likewise.
29573 * omp-low.c (omp_clause_aligned_alignment): Likewise.
29574 * optabs-query.c (can_vec_mask_load_store_p): Likewise.
29575 * tree-vect-loop.c (vect_analyze_loop): Likewise.
29576 * tree-vect-slp.c (vect_slp_bb): Likewise.
29577 * doc/tm.texi: Regenerate.
29578 * tree-vectorizer.h (current_vector_size): Change from an unsigned int
29580 * tree-vect-stmts.c (get_vectype_for_scalar_type_and_size): Take
29581 the vector size as a poly_uint64 rather than an unsigned int.
29582 (current_vector_size): Change from an unsigned int to a poly_uint64.
29583 (get_vectype_for_scalar_type): Update accordingly.
29584 * tree.h (build_truth_vector_type): Take the size and number of
29585 units as a poly_uint64 rather than an unsigned int.
29586 (build_vector_type): Add a temporary overload that takes
29587 the number of units as a poly_uint64 rather than an unsigned int.
29588 * tree.c (make_vector_type): Likewise.
29589 (build_truth_vector_type): Take the number of units as a poly_uint64
29590 rather than an unsigned int.
29592 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29593 Alan Hayward <alan.hayward@arm.com>
29594 David Sherwood <david.sherwood@arm.com>
29596 * target.def (get_mask_mode): Take the number of units and length
29597 as poly_uint64s rather than unsigned ints.
29598 * targhooks.h (default_get_mask_mode): Update accordingly.
29599 * targhooks.c (default_get_mask_mode): Likewise.
29600 * config/i386/i386.c (ix86_get_mask_mode): Likewise.
29601 * doc/tm.texi: Regenerate.
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 * omp-general.h (omp_max_vf): Return a poly_uint64 instead of an int.
29608 * omp-general.c (omp_max_vf): Likewise.
29609 * omp-expand.c (omp_adjust_chunk_size): Update call to omp_max_vf.
29610 (expand_omp_simd): Handle polynomial safelen.
29611 * omp-low.c (omplow_simd_context): Add a default constructor.
29612 (omplow_simd_context::max_vf): Change from int to poly_uint64.
29613 (lower_rec_simd_input_clauses): Update accordingly.
29614 (lower_rec_input_clauses): Likewise.
29616 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29617 Alan Hayward <alan.hayward@arm.com>
29618 David Sherwood <david.sherwood@arm.com>
29620 * tree-vectorizer.h (vect_nunits_for_cost): New function.
29621 * tree-vect-loop.c (vect_model_reduction_cost): Use it.
29622 * tree-vect-slp.c (vect_analyze_slp_cost_1): Likewise.
29623 (vect_analyze_slp_cost): Likewise.
29624 * tree-vect-stmts.c (vect_model_store_cost): Likewise.
29625 (vect_model_load_cost): Likewise.
29627 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29628 Alan Hayward <alan.hayward@arm.com>
29629 David Sherwood <david.sherwood@arm.com>
29631 * tree-vect-slp.c (vect_record_max_nunits, vect_build_slp_tree_1)
29632 (vect_build_slp_tree_2, vect_build_slp_tree): Change max_nunits
29633 from an unsigned int * to a poly_uint64_pod *.
29634 (calculate_unrolling_factor): New function.
29635 (vect_analyze_slp_instance): Use it. Track polynomial max_nunits.
29637 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29638 Alan Hayward <alan.hayward@arm.com>
29639 David Sherwood <david.sherwood@arm.com>
29641 * tree-vectorizer.h (_slp_instance::unrolling_factor): Change
29642 from an unsigned int to a poly_uint64.
29643 (_loop_vec_info::slp_unrolling_factor): Likewise.
29644 (_loop_vec_info::vectorization_factor): Change from an int
29646 (MAX_VECTORIZATION_FACTOR): Bump from 64 to INT_MAX.
29647 (vect_get_num_vectors): New function.
29648 (vect_update_max_nunits, vect_vf_for_cost): Likewise.
29649 (vect_get_num_copies): Use vect_get_num_vectors.
29650 (vect_analyze_data_ref_dependences): Change max_vf from an int *
29651 to an unsigned int *.
29652 (vect_analyze_data_refs): Change min_vf from an int * to a
29654 (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
29655 than an unsigned HOST_WIDE_INT.
29656 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
29657 (vect_analyze_data_ref_dependence): Change max_vf from an int *
29658 to an unsigned int *.
29659 (vect_analyze_data_ref_dependences): Likewise.
29660 (vect_compute_data_ref_alignment): Handle polynomial vf.
29661 (vect_enhance_data_refs_alignment): Likewise.
29662 (vect_prune_runtime_alias_test_list): Likewise.
29663 (vect_shift_permute_load_chain): Likewise.
29664 (vect_supportable_dr_alignment): Likewise.
29665 (dependence_distance_ge_vf): Take the vectorization factor as a
29666 poly_uint64 rather than an unsigned HOST_WIDE_INT.
29667 (vect_analyze_data_refs): Change min_vf from an int * to a
29669 * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Take
29670 vfm1 as a poly_uint64 rather than an int. Make the same change
29671 for the returned bound_scalar.
29672 (vect_gen_vector_loop_niters): Handle polynomial vf.
29673 (vect_do_peeling): Likewise. Update call to
29674 vect_gen_scalar_loop_niters and handle polynomial bound_scalars.
29675 (vect_gen_vector_loop_niters_mult_vf): Assert that the vf must
29677 * tree-vect-loop.c (vect_determine_vectorization_factor)
29678 (vect_update_vf_for_slp, vect_analyze_loop_2): Handle polynomial vf.
29679 (vect_get_known_peeling_cost): Likewise.
29680 (vect_estimate_min_profitable_iters, vectorizable_reduction): Likewise.
29681 (vect_worthwhile_without_simd_p, vectorizable_induction): Likewise.
29682 (vect_transform_loop): Likewise. Use the lowest possible VF when
29683 updating the upper bounds of the loop.
29684 (vect_min_worthwhile_factor): Make static. Return an unsigned int
29685 rather than an int.
29686 * tree-vect-slp.c (vect_attempt_slp_rearrange_stmts): Cope with
29687 polynomial unroll factors.
29688 (vect_analyze_slp_cost_1, vect_analyze_slp_instance): Likewise.
29689 (vect_make_slp_decision): Likewise.
29690 (vect_supported_load_permutation_p): Likewise, and polynomial
29692 (vect_analyze_slp_cost): Handle polynomial vf.
29693 (vect_slp_analyze_node_operations): Likewise.
29694 (vect_slp_analyze_bb_1): Likewise.
29695 (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
29696 than an unsigned HOST_WIDE_INT.
29697 * tree-vect-stmts.c (vectorizable_simd_clone_call, vectorizable_store)
29698 (vectorizable_load): Handle polynomial vf.
29699 * tree-vectorizer.c (simduid_to_vf::vf): Change from an int to
29701 (adjust_simduid_builtins, shrink_simd_arrays): Update accordingly.
29703 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29704 Alan Hayward <alan.hayward@arm.com>
29705 David Sherwood <david.sherwood@arm.com>
29707 * match.pd: Handle bit operations involving three constants
29708 and try to fold one pair.
29710 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
29712 * tree-vect-loop-manip.c: Include gimple-fold.h.
29713 (slpeel_make_loop_iterate_ntimes): Add step, final_iv and
29714 niters_maybe_zero parameters. Handle other cases besides a step of 1.
29715 (vect_gen_vector_loop_niters): Add a step_vector_ptr parameter.
29716 Add a path that uses a step of VF instead of 1, but disable it
29718 (vect_do_peeling): Add step_vector, niters_vector_mult_vf_var
29719 and niters_no_overflow parameters. Update calls to
29720 slpeel_make_loop_iterate_ntimes and vect_gen_vector_loop_niters.
29721 Create a new SSA name if the latter choses to use a ste other
29722 than zero, and return it via niters_vector_mult_vf_var.
29723 * tree-vect-loop.c (vect_transform_loop): Update calls to
29724 vect_do_peeling, vect_gen_vector_loop_niters and
29725 slpeel_make_loop_iterate_ntimes.
29726 * tree-vectorizer.h (slpeel_make_loop_iterate_ntimes, vect_do_peeling)
29727 (vect_gen_vector_loop_niters): Update declarations after above changes.
29729 2018-01-02 Michael Meissner <meissner@linux.vnet.ibm.com>
29731 * config/rs6000/rs6000.md (floor<mode>2): Add support for IEEE
29732 128-bit round to integer instructions.
29733 (ceil<mode>2): Likewise.
29734 (btrunc<mode>2): Likewise.
29735 (round<mode>2): Likewise.
29737 2018-01-02 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
29739 * config/rs6000/rs6000-string.c (expand_block_move): Allow the use of
29740 unaligned VSX load/store on P8/P9.
29741 (expand_block_clear): Allow the use of unaligned VSX
29742 load/store on P8/P9.
29744 2018-01-02 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
29746 * config/rs6000/rs6000-p8swap.c (swap_feeds_both_load_and_store):
29748 (rs6000_analyze_swaps): Mark a web unoptimizable if it contains a
29749 swap associated with both a load and a store.
29751 2018-01-02 Andrew Waterman <andrew@sifive.com>
29753 * config/riscv/linux.h (ICACHE_FLUSH_FUNC): New.
29754 * config/riscv/riscv.md (clear_cache): Use it.
29756 2018-01-02 Artyom Skrobov <tyomitch@gmail.com>
29758 * web.c: Remove out-of-date comment.
29760 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
29762 * expr.c (fixup_args_size_notes): Check that any existing
29763 REG_ARGS_SIZE notes are correct, and don't try to re-add them.
29764 (emit_single_push_insn_1): Move stack_pointer_delta adjustment to...
29765 (emit_single_push_insn): ...here.
29767 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
29769 * rtl.h (CONST_VECTOR_ELT): Redefine to const_vector_elt.
29770 (const_vector_encoded_nelts): New function.
29771 (CONST_VECTOR_NUNITS): Redefine to use GET_MODE_NUNITS.
29772 (const_vector_int_elt, const_vector_elt): Declare.
29773 * emit-rtl.c (const_vector_int_elt_1): New function.
29774 (const_vector_elt): Likewise.
29775 * simplify-rtx.c (simplify_immed_subreg): Avoid taking the address
29776 of CONST_VECTOR_ELT.
29778 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
29780 * expr.c: Include rtx-vector-builder.h.
29781 (const_vector_mask_from_tree): Use rtx_vector_builder and operate
29782 directly on the tree encoding.
29783 (const_vector_from_tree): Likewise.
29784 * optabs.c: Include rtx-vector-builder.h.
29785 (expand_vec_perm_var): Use rtx_vector_builder and create a repeating
29786 sequence of "u" values.
29787 * vec-perm-indices.c: Include rtx-vector-builder.h.
29788 (vec_perm_indices_to_rtx): Use rtx_vector_builder and operate
29789 directly on the vec_perm_indices encoding.
29791 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
29793 * doc/rtl.texi (const_vector): Describe new encoding scheme.
29794 * Makefile.in (OBJS): Add rtx-vector-builder.o.
29795 * rtx-vector-builder.h: New file.
29796 * rtx-vector-builder.c: Likewise.
29797 * rtl.h (rtx_def::u2): Add a const_vector field.
29798 (CONST_VECTOR_NPATTERNS): New macro.
29799 (CONST_VECTOR_NELTS_PER_PATTERN): Likewise.
29800 (CONST_VECTOR_DUPLICATE_P): Likewise.
29801 (CONST_VECTOR_STEPPED_P): Likewise.
29802 (CONST_VECTOR_ENCODED_ELT): Likewise.
29803 (const_vec_duplicate_p): Check for a duplicated vector encoding.
29804 (unwrap_const_vec_duplicate): Likewise.
29805 (const_vec_series_p): Check for a non-duplicated vector encoding.
29806 Say that the function only returns true for integer vectors.
29807 * emit-rtl.c: Include rtx-vector-builder.h.
29808 (gen_const_vec_duplicate_1): Delete.
29809 (gen_const_vector): Call gen_const_vec_duplicate instead of
29810 gen_const_vec_duplicate_1.
29811 (const_vec_series_p_1): Operate directly on the CONST_VECTOR encoding.
29812 (gen_const_vec_duplicate): Use rtx_vector_builder.
29813 (gen_const_vec_series): Likewise.
29814 (gen_rtx_CONST_VECTOR): Likewise.
29815 * config/powerpcspe/powerpcspe.c: Include rtx-vector-builder.h.
29816 (swap_const_vector_halves): Take an rtx pointer rather than rtx.
29817 Build a new vector rather than modifying a CONST_VECTOR in-place.
29818 (handle_special_swappables): Update call accordingly.
29819 * config/rs6000/rs6000-p8swap.c: Include rtx-vector-builder.h.
29820 (swap_const_vector_halves): Take an rtx pointer rather than rtx.
29821 Build a new vector rather than modifying a CONST_VECTOR in-place.
29822 (handle_special_swappables): Update call accordingly.
29824 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
29826 * simplify-rtx.c (simplify_const_binary_operation): Use
29827 CONST_VECTOR_ELT instead of XVECEXP.
29829 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
29831 * tree-cfg.c (verify_gimple_assign_ternary): Allow the size of
29832 the selector elements to be different from the data elements
29833 if the selector is a VECTOR_CST.
29834 * tree-vect-stmts.c (vect_gen_perm_mask_any): Use a vector of
29835 ssizetype for the selector.
29837 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
29839 * optabs.c (shift_amt_for_vec_perm_mask): Try using series_p
29840 before testing each element individually.
29841 * tree-vect-generic.c (lower_vec_perm): Likewise.
29843 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
29845 * selftest.h (selftest::vec_perm_indices_c_tests): Declare.
29846 * selftest-run-tests.c (selftest::run_tests): Call it.
29847 * vector-builder.h (vector_builder::operator ==): New function.
29848 (vector_builder::operator !=): Likewise.
29849 * vec-perm-indices.h (vec_perm_indices::series_p): Declare.
29850 (vec_perm_indices::all_from_input_p): New function.
29851 * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
29852 (test_vec_perm_12, selftest::vec_perm_indices_c_tests): Likewise.
29853 * fold-const.c (fold_ternary_loc): Use tree_to_vec_perm_builder
29854 instead of reading the VECTOR_CST directly. Detect whether both
29855 vector inputs are the same before constructing the vec_perm_indices,
29856 and update the number of inputs argument accordingly. Use the
29857 utility functions added above. Only construct sel2 if we need to.
29859 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
29861 * optabs.c (expand_vec_perm_var): Use an explicit encoding for
29862 the broadcast of the low byte.
29863 (expand_mult_highpart): Use an explicit encoding for the permutes.
29864 * optabs-query.c (can_mult_highpart_p): Likewise.
29865 * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Likewise.
29866 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
29867 (vectorizable_bswap): Likewise.
29868 * tree-vect-data-refs.c (vect_grouped_store_supported): Use an
29869 explicit encoding for the power-of-2 permutes.
29870 (vect_permute_store_chain): Likewise.
29871 (vect_grouped_load_supported): Likewise.
29872 (vect_permute_load_chain): Likewise.
29874 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
29876 * vec-perm-indices.h (vec_perm_indices_to_tree): Declare.
29877 * vec-perm-indices.c (vec_perm_indices_to_tree): New function.
29878 * tree-ssa-forwprop.c (simplify_vector_constructor): Use it.
29879 * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
29880 * tree-vect-stmts.c (vectorizable_bswap): Likewise.
29881 (vect_gen_perm_mask_any): Likewise.
29883 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
29885 * int-vector-builder.h: New file.
29886 * vec-perm-indices.h: Include int-vector-builder.h.
29887 (vec_perm_indices): Redefine as an int_vector_builder.
29888 (auto_vec_perm_indices): Delete.
29889 (vec_perm_builder): Redefine as a stand-alone class.
29890 (vec_perm_indices::vec_perm_indices): New function.
29891 (vec_perm_indices::clamp): Likewise.
29892 * vec-perm-indices.c: Include fold-const.h and tree-vector-builder.h.
29893 (vec_perm_indices::new_vector): New function.
29894 (vec_perm_indices::new_expanded_vector): Update for new
29895 vec_perm_indices class.
29896 (vec_perm_indices::rotate_inputs): New function.
29897 (vec_perm_indices::all_in_range_p): Operate directly on the
29898 encoded form, without computing elided elements.
29899 (tree_to_vec_perm_builder): Operate directly on the VECTOR_CST
29900 encoding. Update for new vec_perm_indices class.
29901 * optabs.c (expand_vec_perm_const): Create a vec_perm_indices for
29902 the given vec_perm_builder.
29903 (expand_vec_perm_var): Update vec_perm_builder constructor.
29904 (expand_mult_highpart): Use vec_perm_builder instead of
29905 auto_vec_perm_indices.
29906 * optabs-query.c (can_mult_highpart_p): Use vec_perm_builder and
29907 vec_perm_indices instead of auto_vec_perm_indices. Use a single
29908 or double series encoding as appropriate.
29909 * fold-const.c (fold_ternary_loc): Use vec_perm_builder and
29910 vec_perm_indices instead of auto_vec_perm_indices.
29911 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
29912 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
29913 (vect_permute_store_chain): Likewise.
29914 (vect_grouped_load_supported): Likewise.
29915 (vect_permute_load_chain): Likewise.
29916 (vect_shift_permute_load_chain): Likewise.
29917 * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
29918 (vect_transform_slp_perm_load): Likewise.
29919 (vect_schedule_slp_instance): Likewise.
29920 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
29921 (vectorizable_mask_load_store): Likewise.
29922 (vectorizable_bswap): Likewise.
29923 (vectorizable_store): Likewise.
29924 (vectorizable_load): Likewise.
29925 * tree-vect-generic.c (lower_vec_perm): Use vec_perm_builder and
29926 vec_perm_indices instead of auto_vec_perm_indices. Use
29927 tree_to_vec_perm_builder to read the vector from a tree.
29928 * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Take a
29929 vec_perm_builder instead of a vec_perm_indices.
29930 (have_whole_vector_shift): Use vec_perm_builder and
29931 vec_perm_indices instead of auto_vec_perm_indices. Leave the
29932 truncation to calc_vec_perm_mask_for_shift.
29933 (vect_create_epilog_for_reduction): Likewise.
29934 * config/aarch64/aarch64.c (expand_vec_perm_d::perm): Change
29935 from auto_vec_perm_indices to vec_perm_indices.
29936 (aarch64_expand_vec_perm_const_1): Use rotate_inputs on d.perm
29937 instead of changing individual elements.
29938 (aarch64_vectorize_vec_perm_const): Use new_vector to install
29939 the vector in d.perm.
29940 * config/arm/arm.c (expand_vec_perm_d::perm): Change
29941 from auto_vec_perm_indices to vec_perm_indices.
29942 (arm_expand_vec_perm_const_1): Use rotate_inputs on d.perm
29943 instead of changing individual elements.
29944 (arm_vectorize_vec_perm_const): Use new_vector to install
29945 the vector in d.perm.
29946 * config/powerpcspe/powerpcspe.c (rs6000_expand_extract_even):
29947 Update vec_perm_builder constructor.
29948 (rs6000_expand_interleave): Likewise.
29949 * config/rs6000/rs6000.c (rs6000_expand_extract_even): Likewise.
29950 (rs6000_expand_interleave): Likewise.
29952 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
29954 * optabs-query.c (can_vec_perm_var_p): Check whether lowering
29955 to qimode could truncate the indices.
29956 * optabs.c (expand_vec_perm_var): Likewise.
29958 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
29960 * Makefile.in (OBJS): Add vec-perm-indices.o.
29961 * vec-perm-indices.h: New file.
29962 * vec-perm-indices.c: Likewise.
29963 * target.h (vec_perm_indices): Replace with a forward class
29965 (auto_vec_perm_indices): Move to vec-perm-indices.h.
29966 * optabs.h: Include vec-perm-indices.h.
29967 (expand_vec_perm): Delete.
29968 (selector_fits_mode_p, expand_vec_perm_var): Declare.
29969 (expand_vec_perm_const): Declare.
29970 * target.def (vec_perm_const_ok): Replace with...
29971 (vec_perm_const): ...this new hook.
29972 * doc/tm.texi.in (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Replace with...
29973 (TARGET_VECTORIZE_VEC_PERM_CONST): ...this new hook.
29974 * doc/tm.texi: Regenerate.
29975 * optabs.def (vec_perm_const): Delete.
29976 * doc/md.texi (vec_perm_const): Likewise.
29977 (vec_perm): Refer to TARGET_VECTORIZE_VEC_PERM_CONST.
29978 * expr.c (expand_expr_real_2): Use expand_vec_perm_const rather than
29979 expand_vec_perm for constant permutation vectors. Assert that
29980 the mode of variable permutation vectors is the integer equivalent
29981 of the mode that is being permuted.
29982 * optabs-query.h (selector_fits_mode_p): Declare.
29983 * optabs-query.c: Include vec-perm-indices.h.
29984 (selector_fits_mode_p): New function.
29985 (can_vec_perm_const_p): Check whether targetm.vectorize.vec_perm_const
29986 is defined, instead of checking whether the vec_perm_const_optab
29987 exists. Use targetm.vectorize.vec_perm_const instead of
29988 targetm.vectorize.vec_perm_const_ok. Check whether the indices
29989 fit in the vector mode before using a variable permute.
29990 * optabs.c (shift_amt_for_vec_perm_mask): Take a mode and a
29991 vec_perm_indices instead of an rtx.
29992 (expand_vec_perm): Replace with...
29993 (expand_vec_perm_const): ...this new function. Take the selector
29994 as a vec_perm_indices rather than an rtx. Also take the mode of
29995 the selector. Update call to shift_amt_for_vec_perm_mask.
29996 Use targetm.vectorize.vec_perm_const instead of vec_perm_const_optab.
29997 Use vec_perm_indices::new_expanded_vector to expand the original
29998 selector into bytes. Check whether the indices fit in the vector
29999 mode before using a variable permute.
30000 (expand_vec_perm_var): Make global.
30001 (expand_mult_highpart): Use expand_vec_perm_const.
30002 * fold-const.c: Includes vec-perm-indices.h.
30003 * tree-ssa-forwprop.c: Likewise.
30004 * tree-vect-data-refs.c: Likewise.
30005 * tree-vect-generic.c: Likewise.
30006 * tree-vect-loop.c: Likewise.
30007 * tree-vect-slp.c: Likewise.
30008 * tree-vect-stmts.c: Likewise.
30009 * config/aarch64/aarch64-protos.h (aarch64_expand_vec_perm_const):
30011 * config/aarch64/aarch64-simd.md (vec_perm_const<mode>): Delete.
30012 * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const)
30013 (aarch64_vectorize_vec_perm_const_ok): Fuse into...
30014 (aarch64_vectorize_vec_perm_const): ...this new function.
30015 (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
30016 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
30017 * config/arm/arm-protos.h (arm_expand_vec_perm_const): Delete.
30018 * config/arm/vec-common.md (vec_perm_const<mode>): Delete.
30019 * config/arm/arm.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
30020 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
30021 (arm_expand_vec_perm_const, arm_vectorize_vec_perm_const_ok): Merge
30023 (arm_vectorize_vec_perm_const): ...this new function. Explicitly
30024 check for NEON modes.
30025 * config/i386/i386-protos.h (ix86_expand_vec_perm_const): Delete.
30026 * config/i386/sse.md (VEC_PERM_CONST, vec_perm_const<mode>): Delete.
30027 * config/i386/i386.c (ix86_expand_vec_perm_const_1): Update comment.
30028 (ix86_expand_vec_perm_const, ix86_vectorize_vec_perm_const_ok): Merge
30030 (ix86_vectorize_vec_perm_const): ...this new function. Incorporate
30031 the old VEC_PERM_CONST conditions.
30032 * config/ia64/ia64-protos.h (ia64_expand_vec_perm_const): Delete.
30033 * config/ia64/vect.md (vec_perm_const<mode>): Delete.
30034 * config/ia64/ia64.c (ia64_expand_vec_perm_const)
30035 (ia64_vectorize_vec_perm_const_ok): Merge into...
30036 (ia64_vectorize_vec_perm_const): ...this new function.
30037 * config/mips/loongson.md (vec_perm_const<mode>): Delete.
30038 * config/mips/mips-msa.md (vec_perm_const<mode>): Delete.
30039 * config/mips/mips-ps-3d.md (vec_perm_constv2sf): Delete.
30040 * config/mips/mips-protos.h (mips_expand_vec_perm_const): Delete.
30041 * config/mips/mips.c (mips_expand_vec_perm_const)
30042 (mips_vectorize_vec_perm_const_ok): Merge into...
30043 (mips_vectorize_vec_perm_const): ...this new function.
30044 * config/powerpcspe/altivec.md (vec_perm_constv16qi): Delete.
30045 * config/powerpcspe/paired.md (vec_perm_constv2sf): Delete.
30046 * config/powerpcspe/spe.md (vec_perm_constv2si): Delete.
30047 * config/powerpcspe/vsx.md (vec_perm_const<mode>): Delete.
30048 * config/powerpcspe/powerpcspe-protos.h (altivec_expand_vec_perm_const)
30049 (rs6000_expand_vec_perm_const): Delete.
30050 * config/powerpcspe/powerpcspe.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK):
30052 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
30053 (altivec_expand_vec_perm_const_le): Take each operand individually.
30054 Operate on constant selectors rather than rtxes.
30055 (altivec_expand_vec_perm_const): Likewise. Update call to
30056 altivec_expand_vec_perm_const_le.
30057 (rs6000_expand_vec_perm_const): Delete.
30058 (rs6000_vectorize_vec_perm_const_ok): Delete.
30059 (rs6000_vectorize_vec_perm_const): New function.
30060 (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
30061 an element count and rtx array.
30062 (rs6000_expand_extract_even): Update call accordingly.
30063 (rs6000_expand_interleave): Likewise.
30064 * config/rs6000/altivec.md (vec_perm_constv16qi): Delete.
30065 * config/rs6000/paired.md (vec_perm_constv2sf): Delete.
30066 * config/rs6000/vsx.md (vec_perm_const<mode>): Delete.
30067 * config/rs6000/rs6000-protos.h (altivec_expand_vec_perm_const)
30068 (rs6000_expand_vec_perm_const): Delete.
30069 * config/rs6000/rs6000.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
30070 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
30071 (altivec_expand_vec_perm_const_le): Take each operand individually.
30072 Operate on constant selectors rather than rtxes.
30073 (altivec_expand_vec_perm_const): Likewise. Update call to
30074 altivec_expand_vec_perm_const_le.
30075 (rs6000_expand_vec_perm_const): Delete.
30076 (rs6000_vectorize_vec_perm_const_ok): Delete.
30077 (rs6000_vectorize_vec_perm_const): New function. Remove stray
30078 reference to the SPE evmerge intructions.
30079 (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
30080 an element count and rtx array.
30081 (rs6000_expand_extract_even): Update call accordingly.
30082 (rs6000_expand_interleave): Likewise.
30083 * config/sparc/sparc.md (vec_perm_constv8qi): Delete in favor of...
30084 * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): ...this
30086 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
30088 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
30090 * optabs.c (expand_vec_perm_1): Assert that SEL has an integer
30091 vector mode and that that mode matches the mode of the data
30093 (expand_vec_perm): Split handling of non-CONST_VECTOR selectors
30094 out into expand_vec_perm_var. Do all CONST_VECTOR handling here,
30095 directly using expand_vec_perm_1 when forcing selectors into
30097 (expand_vec_perm_var): New function, split out from expand_vec_perm.
30099 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
30101 * optabs-query.h (can_vec_perm_p): Delete.
30102 (can_vec_perm_var_p, can_vec_perm_const_p): Declare.
30103 * optabs-query.c (can_vec_perm_p): Split into...
30104 (can_vec_perm_var_p, can_vec_perm_const_p): ...these two functions.
30105 (can_mult_highpart_p): Use can_vec_perm_const_p to test whether a
30106 particular selector is valid.
30107 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
30108 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
30109 (vect_grouped_load_supported): Likewise.
30110 (vect_shift_permute_load_chain): Likewise.
30111 * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
30112 (vect_transform_slp_perm_load): Likewise.
30113 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
30114 (vectorizable_bswap): Likewise.
30115 (vect_gen_perm_mask_checked): Likewise.
30116 * fold-const.c (fold_ternary_loc): Likewise. Don't take
30117 implementations of variable permutation vectors into account
30118 when deciding which selector to use.
30119 * tree-vect-loop.c (have_whole_vector_shift): Don't check whether
30120 vec_perm_const_optab is supported; instead use can_vec_perm_const_p
30121 with a false third argument.
30122 * tree-vect-generic.c (lower_vec_perm): Use can_vec_perm_const_p
30123 to test whether the constant selector is valid and can_vec_perm_var_p
30124 to test whether a variable selector is valid.
30126 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
30128 * optabs-query.h (can_vec_perm_p): Take a const vec_perm_indices *.
30129 * optabs-query.c (can_vec_perm_p): Likewise.
30130 * fold-const.c (fold_vec_perm): Take a const vec_perm_indices &
30131 instead of vec_perm_indices.
30132 * tree-vectorizer.h (vect_gen_perm_mask_any): Likewise,
30133 (vect_gen_perm_mask_checked): Likewise,
30134 * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise,
30135 (vect_gen_perm_mask_checked): Likewise,
30137 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
30139 * optabs-query.h (qimode_for_vec_perm): Declare.
30140 * optabs-query.c (can_vec_perm_p): Split out qimode search to...
30141 (qimode_for_vec_perm): ...this new function.
30142 * optabs.c (expand_vec_perm): Use qimode_for_vec_perm.
30144 2018-01-02 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
30146 * rtlanal.c (canonicalize_condition): Return 0 if final rtx
30147 does not have a conditional at the top.
30149 2018-01-02 Richard Biener <rguenther@suse.de>
30151 * ipa-inline.c (big_speedup_p): Fix expression.
30153 2018-01-02 Jan Hubicka <hubicka@ucw.cz>
30156 * config/i386/x86-tune-costs.h: Increase cost of integer load costs
30159 2018-01-02 Jan Hubicka <hubicka@ucw.cz>
30163 * x86-tune-costs.h (generic_cost): Reduce cost of FDIV 20->17,
30164 cost of sqrt 20->14, DIVSS 18->13, DIVSD 32->17, SQRtSS 30->14
30165 and SQRTsD 58->18, cond_not_taken_branch_cost. 2->1. Increase
30166 cond_taken_branch_cost 3->4.
30168 2018-01-01 Jakub Jelinek <jakub@redhat.com>
30170 PR tree-optimization/83581
30171 * tree-loop-distribution.c (pass_loop_distribution::execute): Return
30172 TODO_cleanup_cfg if any changes have been made.
30174 PR middle-end/83608
30175 * expr.c (store_expr_with_bounds): Use simplify_gen_subreg instead of
30176 convert_modes if target mode has the right side, but different mode
30179 PR middle-end/83609
30180 * expr.c (expand_assignment): Fix up a typo in simplify_gen_subreg
30181 last argument when extracting from CONCAT. If either from_real or
30182 from_imag is NULL, use expansion through memory. If result is not
30183 a CONCAT and simplify_gen_subreg fails, try to simplify_gen_subreg
30184 the parts directly to inner mode, if even that fails, use expansion
30187 PR middle-end/83623
30188 * expmed.c (expand_shift_1): For 2-byte rotates by BITS_PER_UNIT,
30189 check for bswap in mode rather than HImode and use that in expand_unop
30192 Copyright (C) 2018 Free Software Foundation, Inc.
30194 Copying and distribution of this file, with or without modification,
30195 are permitted in any medium without royalty provided the copyright
30196 notice and this notice are preserved.