1 2018-10-15 David Malcolm <dmalcolm@redhat.com>
3 * common.opt (fdiagnostics-minimum-margin-width=): New option.
4 * diagnostic-show-locus.c (layout::layout): Apply the minimum
6 (layout::start_annotation_line): Only print up to 3 of the
7 margin character, to avoid touching the left-hand side.
8 (selftest::test_diagnostic_show_locus_fixit_lines): Update for
9 minimum margin width, as set by test_diagnostic_context's ctor.
10 (selftest::test_fixit_insert_containing_newline): Likewise.
11 (selftest::test_fixit_insert_containing_newline_2): Likewise.
12 (selftest::test_line_numbers_multiline_range): Clear
14 * diagnostic.c (diagnostic_initialize): Initialize
16 * diagnostic.h (struct diagnostic_context): Add field
18 * doc/invoke.texi: Add -fdiagnostics-minimum-margin-width=.
19 * opts.c (common_handle_option): Handle
20 OPT_fdiagnostics_minimum_margin_width_.
21 * selftest-diagnostic.c
22 (selftest::test_diagnostic_context::test_diagnostic_context):
23 Initialize min_margin_width to 6.
24 * toplev.c (general_init): Initialize global_dc->min_margin_width.
26 2018-10-15 David Malcolm <dmalcolm@redhat.com>
28 * gcc-rich-location.h (gcc_rich_location::add_location_if_nearby):
29 Fix usage of "error_at_rich_loc" in the comment.
31 2018-10-15 Renlin Li <renlin.li@arm.com>
34 * tree-vectorizer.c (try_vectorize_loop_1): Don't use
35 if-conversioned loop when it contains ifn with types not
37 * internal-fn.c (expand_direct_optab_fn): Add an assert.
38 (direct_internal_fn_supported_p): New helper function.
39 * internal-fn.h (direct_internal_fn_supported_p): Declare.
41 2018-10-15 Jakub Jelinek <jakub@redhat.com>
44 * common/config/i386/i386-common.c (OPTION_MASK_ISA_AVX512F_UNSET):
45 Remove OPTION_MASK_ISA_AVX5124FMAPS_UNSET and
46 OPTION_MASK_ISA_AVX5124VNNIW_UNSET.
48 2018-10-15 Bin Cheng <bin.cheng@linux.alibaba.com>
50 PR tree-optimization/87022
51 * tree-loop-distribution.c (pg_add_dependence_edges): Check all
52 bits in dist vector rather than the first one.
54 2018-10-15 Richard Biener <rguenther@suse.de>
57 * tree-ssa-structalias.c (struct vls_data): Add escaped_p member.
58 (visit_loadstore): When a used restrict tag escaped verify that
59 the points-to solution of "other" pointers do not include
61 (compute_dependence_clique): If a used restrict tag escaped
62 communicated that down to visit_loadstore.
64 2018-10-15 Andreas Krebbel <krebbel@linux.ibm.com>
66 * config/s390/s390.c (s390_expand_vec_init): Force vector element
67 into reg if it isn't a general operand.
69 2018-10-14 H.J. Lu <hongjiu.lu@intel.com>
72 * config/i386/sse.md (*vec_dupv2di): Add register source to
75 2018-10-14 H.J. Lu <hongjiu.lu@intel.com>
78 * common/config/i386/i386-common.c (OPTION_MASK_ISA_AVX512F_UNSET):
79 Add OPTION_MASK_ISA_AVX512IFMA_UNSET,
80 OPTION_MASK_ISA_AVX5124FMAPS_UNSET and
81 OPTION_MASK_ISA_AVX5124VNNIW_UNSET.
83 2018-10-13 Eric Botcazou <ebotcazou@adacore.com>
85 * dwarf2cfi.c (struct dw_trace_info): Add args_size_defined_for_eh.
86 (notice_args_size): Set it in the current trace if no insn that can
87 throw internally has been seen yet.
88 (connect_traces): When connecting args_size between traces, allow the
89 incoming values not to match if there is an insn setting it before the
90 first insn that can throw internally; in that case, force the creation
91 of a CFI note on this latter insn.
93 2018-10-13 Jonathan Wakely <jwakely@redhat.com>
95 * opt-problem.h (opt_wrapper): Use template-argument-list when naming
96 the base class, because using the injected-class-name was not clearly
97 specified until DR 176.
99 2018-10-12 Paul Koning <ni1d@arrl.net>
101 * config/pdp11/pdp11.md (doloop_end): New expander.
102 (doloop_end_insn): renamed from "doloop_end".
103 (addqi3): New pattern.
104 (subqi3): New pattern.
105 * config/pdp11/predicates.md (incdec_operand): New predicate.
107 2018-10-12 Yury Gribov <tetra2005@gmail.com>
110 * real.c (format_helper::can_represent_integral_type_p): New function
111 * real.h (format_helper::can_represent_integral_type_p): Ditto.
112 * match.pd: New pattern.
114 2018-10-12 Alexandre Oliva <oliva@adacore.com>
116 * configure.ac: Introduce --enable-large-address-aware
117 to define MINGW_DEFAULT_LARGE_ADDR_AWARE.
118 * doc/install.texi: Document it.
119 * configure, config.in: Rebuilt.
120 * config/i386/mingw32.h (LINK_SPEC_LARGE_ADDR_AWARE): Define,
121 based on MINGW_DEFAULT_LARGE_ADDR_AWARE.
122 (LINK_SPEC): Insert it.
123 * config/i386/mingw-264.h: Likewise.
125 * cygming.h (HAVE_GAS_ALIGNED_COMM): Fallback-define.
127 2018-10-12 Peter Bergner <bergner@linux.ibm.com>
129 PR rtl-optimization/87600
130 * ira-lives (non_conflicting_reg_copy_p): Disable for non LRA targets.
132 2018-10-12 Paul Koning <ni1d@arrl.net>
134 * doc/md.texi (doloop_end): Document that the pattern code may
135 need to check operand mode.
137 2018-10-12 Wilco Dijkstra <wdijkstr@arm.com>
139 * config/aarch64/aarch64.md (zero_extendsidi2_aarch64): Add alternatives
140 to zero-extend between int and floating-point registers.
141 (load_pair_zero_extendsidi2_aarch64): Add alternative for zero-extended
142 ldp into floating-point registers. Add type and arch attributes.
143 (zero_extend<SHORT:mode><GPI:mode>2_aarch64): Add arch attribute.
144 Use f_loads for type attribute.
146 2018-10-11 Martin Sebor <msebor@redhat.com>
148 * doc/extend.texi (attribute packed): Correct typos.
150 2018-10-11 Martin Sebor <msebor@redhat.com>
152 * doc/extend.texi (attribute flatten): Mention interaction with
155 2018-10-11 Jan Hubicka <hubicka@ucw.cz>
158 * cgraphclones.c (cgraph_node::create_version_clone_with_body):
159 Set new_decl virtual flag to zero.
161 2018-10-11 Martin Sebor <msebor@redhat.com>
164 * doc/extend.texi (attribute format_arg): Discuss using multiple
165 attributes on a single function.
167 2018-10-11 Giuliano Belinassi <giuliano.belinassi@usp.br>
169 PR tree-optimization/86829
170 * match.pd (sin (atan (x))): New simplification rules.
171 (cos (atan (x))): Likewise.
172 * real.c (build_sinatan_real): New function.
173 * real.h (build_sinatan_real): Prototype.
175 2018-10-11 Will Schmidt <will_schmidt@vnet.ibm.com>
177 * config/rs6000/rs6000.c (map_to_integral_tree_type): New helper
179 (fold_mergeeo_helper): New helper function.
180 (rs6000_gimple_fold_builtin): Add hooks for vec_mergee and vec_mergeo
181 intrinsics. Correct some whitespace indentation issues.
183 2018-10-11 Wilco Dijkstra <wdijkstr@arm.com>
186 * config/aarch64/aarch64.c (aarch64_mask_and_shift_for_ubfiz_p):
187 Use HOST_WIDE_INT_1U for shift.
189 2018-10-11 Doug Rupp <rupp@adacore.com>
190 Olivier Hainque <hainque@adacore.com>
192 * config/rs6000/vxworks.h (VXWORKS_RELAX_LINK_SPEC): New macro.
193 Pass --relax to the linker for RTPs.
194 (LINK_SPEC): Append VXWORKS_RELAX_LINK_SPEC.
196 2018-10-11 Andrew Stubbs <ams@codesourcery.com>
197 Jan Hubicka <jh@suse.cz>
198 Martin Jambor <mjambor@suse.cz>
200 * print-rtl.c (print_rtx_operand_codes_E_and_V): Print how many times
201 the same elements are repeated rather than printing all of them.
202 * read-rtl.c (rtx_reader::read_rtx_operand): Recognize and expand
204 * read-rtl-function.c (test_loading_repeat): New function.
205 (read_rtl_function_c_tests): Call test_loading_repeat.
206 * rtl-tests.c (test_dumping_repeat): New function.
207 (rtl_tests_c_tests): Call test_dumping_repeat.
209 2018-10-11 Richard Biener <rguenther@suse.de>
211 * config/i386/x86-tune-costs.h (bdver?_memcpy, bdver?_memset,
212 bdver?_cost): Unify to ...
213 (bdver_memcpy, bdver_memset, bdver_cost): ... this.
214 * config/i386/i386.c (processor_cost_table): Adjust.
216 2018-10-10 Eric Botcazou <ebotcazou@adacore.com>
219 * cgraphunit.c (cgraph_node::expand_thunk): Force DECL_IGNORED_P on
220 the thunk when expanding to GIMPLE.
222 2018-10-10 Bernd Edlinger <bernd.edlinger@hotmail.de>
224 * varasm.c (mergeable_string_section): Don't try to move zero-length
225 strings to the merge section.
227 2018-10-10 Uros Bizjak <ubizjak@gmail.com>
230 * config/i386/mmx.md (const_vector 0 -> mem splitter): New splitter.
232 2018-10-10 Jakub Jelinek <jakub@redhat.com>
235 * config/i386/i386-builtin.def (IX86_BUILTIN_RDPMC): Move from args set
238 2018-10-10 Richard Biener <rguenther@suse.de>
240 * config/i386/sse.md (reduc_plus_scal_v8df, reduc_plus_scal_v4df,
241 reduc_plus_scal_v2df, reduc_plus_scal_v16sf, reduc_plus_scal_v8sf,
242 reduc_plus_scal_v4sf): Merge into pattern reducing to half width
243 and recursing and pattern terminating the recursion on SSE
244 vector width using ix86_expand_reduc.
245 (reduc_sminmax_scal_<mode>): Split into part reducing to half
246 width and recursing and SSE2 vector variant doing the final
247 reduction with ix86_expand_reduc.
248 (reduc_uminmax_scal_<mode>): Likewise for the AVX512 variants
249 with terminating the recursion at AVX level, splitting that
252 2018-10-09 David Malcolm <dmalcolm@redhat.com>
254 * genmatch.c (error_cb): Rename to...
255 (diagnostic_cb): ...this, converting int params to enums.
256 (fatal_at): Update for renaming.
257 (warning_at): Likewise.
259 * input.c (selftest::ebcdic_execution_charset::apply):
260 Update for renaming of...
261 (selftest::ebcdic_execution_charset::on_error): ...this, renaming
263 (selftest::ebcdic_execution_charset::on_diagnostic): ...this,
264 converting level and reason to enums.
265 (class selftest::lexer_error_sink): Rename to...
266 (class selftest::lexer_test_options): ...this, renaming field
267 "m_errors" to "m_diagnostics".
268 (selftest::lexer_test_options::apply): Update for renaming of...
269 (selftest::lexer_test_options::on_error): ...this, renaming to...
270 (selftest::lexer_test_options::on_diagnostic): ...this
271 converting level and reason to enums.
272 (selftest::test_lexer_string_locations_raw_string_unterminated):
273 Update for renamings.
274 * opth-gen.awk (struct cpp_reason_option_codes_t): Use enum for
277 2018-10-09 Paul A. Clarke <pc@us.ibm.com>
279 * config.gcc (powerpc*-*-*): Add pmmintrin.h to extra_headers.
280 * config/rs6000/pmmintrin.h: New file.
282 2018-10-09 Eric Botcazou <ebotcazou@adacore.com>
284 PR tree-optimization/86659
285 * gimple-match.h (gimple_match_op constructors): Initialize reverse.
287 2018-10-09 Richard Biener <rguenther@suse.de>
289 PR tree-optimization/63155
290 * tree-ssa-structalias.c: Include tree-ssa.h.
291 (get_constraint_for_ssa_var): For undefs return nothing_id.
292 (find_func_aliases): Cleanup PHI handling.
294 2018-10-09 Richard Biener <rguenther@suse.de>
296 * tree-vectorizer.c (dump_stmt_cost): Fix cut&paste missing
299 2018-10-09 Martin Liska <mliska@suse.cz>
301 * asan.c (asan_emit_stack_protection): If a stack variable
302 is located in a same file as current function, then emit
303 line info into variable definition string.
305 2018-10-08 Eric Botcazou <ebotcazou@adacore.com>
307 * print-rtl.c (rtx_writer::print_rtx_operand_code_i): Print column
310 2018-10-08 Eric Botcazou <ebotcazou@adacore.com>
312 * cgraphunit.c (cgraph_node::expand_thunk): Do not force DECL_IGNORED_P
315 2018-10-08 Eric Botcazou <ebotcazou@adacore.com>
317 PR tree-optimization/86659
318 * gimple-match.h (struct gimple_match_op): Add reverse field.
319 (gimple_match_op::set_op): New overloaded method.
320 * gimple-match-head.c (maybe_build_generic_op) <BIT_FIELD_REF>: Set
321 the REF_REVERSE_STORAGE_ORDER flag on the value.
322 (gimple_simplify) <GIMPLE_ASSIGN>: For BIT_FIELD_REF, propagate the
323 REF_REVERSE_STORAGE_ORDER flag and avoid simplifying if it is set.
325 2018-10-08 Richard Sandiford <richard.sandiford@arm.com>
328 * gimple-ssa-backprop.c (backprop::intersect_uses): Use
329 FOR_EACH_IMM_USE_FAST instead of FOR_EACH_IMM_USE_STMT.
331 2018-10-08 H.J. Lu <hongjiu.lu@intel.com>
334 * config/i386/avx512fintrin.h (_mm512_mask_fmaddsub_round_pd):
335 Defined with __builtin_ia32_vfmaddsubpd512_mask.
337 2018-10-08 Richard Biener <rguenther@suse.de>
339 * config/i386/x86-tune-costs.h (znver1_cost): Make AVX256 vector loads
340 cost the same as AVX128 ones.
342 2018-10-08 Paul Koning <ni1d@arrl.net>
344 * config/pdp11/pdp11-protos.h (output_block_move): Remove.
345 (expand_block_move): New function.
346 * config/pdp11/pdp11.c (output_block_move): Remove.
347 (expand_block_move): New function.
348 * config/pdp11/pdp11.h (MOVE_RATIO): New definition.
349 * config/pdp11/pdp11.md (movmemhi): Use expand_block_move.
350 (*movmemhi1): Remove.
352 2018-10-08 Robin Dapp <rdapp@linux.ibm.com>
354 * config/s390/2827.md: Increase latencies for some FP instructions.
356 2018-10-08 Richard Biener <rguenther@suse.de>
358 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost):
360 * tree-vectorizer.c (dump_stmt_cost): Add cost param and dump it.
361 * tree-vectorizer.h (dump_stmt_cost): Adjust.
362 (add_stmt_cost): Dump return value of the hook.
364 2018-10-08 Richard Biener <rguenther@suse.de>
366 PR tree-optimization/63155
367 * tree-ssa-propagate.c (add_ssa_edge): Do cheap check first.
368 (ssa_propagation_engine::ssa_propagate): Remove redundant
371 2018-10-05 Peter Bergner <bergner@linux.ibm.com>
373 PR rtl-optimization/86939
374 PR rtl-optimization/87479
375 * ira.h (non_conflicting_reg_copy_p): New prototype.
376 * ira-lives.c (ignore_reg_for_conflicts): New static variable.
377 (make_hard_regno_dead): Don't add conflicts for register
378 ignore_reg_for_conflicts.
379 (make_object_dead): Likewise.
380 (non_conflicting_reg_copy_p): New function.
381 (process_bb_node_lives): Set ignore_reg_for_conflicts for copies.
382 Remove special conflict handling of REAL_PIC_OFFSET_TABLE_REGNUM.
383 * lra-lives.c (ignore_reg_for_conflicts): New static variable.
384 (make_hard_regno_dead): Don't add conflicts for register
385 ignore_reg_for_conflicts. Remove special conflict handling of
386 REAL_PIC_OFFSET_TABLE_REGNUM. Remove now unused argument
387 check_pic_pseudo_p and update callers.
388 (mark_pseudo_dead): Don't add conflicts for register
389 ignore_reg_for_conflicts.
390 (process_bb_lives): Set ignore_reg_for_conflicts for copies.
392 2018-10-05 Andrew Waterman <andrew@sifive.com>
393 Jim Wilson <jimw@sifive.com>
395 * config/riscv/riscv.md (f<quiet_pattern>_quiet<ANYF:mode><X:mode>4):
396 Add define_expand. Add ! HONOR_SNANS check to current pattern. Add
397 new pattern using HONOR_SNANS that emits one extra instruction.
399 2018-10-05 Segher Boessenkool <segher@kernel.crashing.org>
401 * config/rs6000/rs6000.md (unnamed mfcr scc_comparison_operator
402 patterns): Merge SI and DI patterns to a GPR pattern.
403 (unnamed define_insn and define_split for record form of that): Merge
404 to a single define_insn_and_split pattern.
406 2018-10-05 David Malcolm <dmalcolm@redhat.com>
409 * input.c (expand_location_to_spelling_point): Add param "aspect"
410 and use rather than hardcoding LOCATION_ASPECT_CARET.
411 (get_substring_ranges_for_loc): Handle the case of a single token
412 within a macro expansion.
413 * input.h (expand_location_to_spelling_point): Add "aspect" param,
414 defaulting to LOCATION_ASPECT_CARET.
416 2018-10-05 Paul Koning <ni1d@arrl.net>
418 * config/pdp11/pdp11.c (TARGET_CXX_GUARD_TYPE): Define.
419 (TARGET_CXX_CLASS_DATA_ALWAYS_COMDAT): Define.
420 (TARGET_CXX_LIBRARY_RTTI_COMDAT): Define.
421 (pdp11_guard_type): New function.
423 2018-10-05 Paul Koning <ni1d@arrl.net>
425 * config/pdp11/pdp11.h (FLOAT_TYPE_SIZE): Always 32.
426 * config/pdp11/pdp11.opt (mfloat32): Remove.
428 * doc/invoke.texi (pdp11 -mfloat32): Remove:
429 (pdp11 -mfloat64): Remove.
431 2018-10-05 Uros Bizjak <ubizjak@gmail.com>
433 * config/i386/i386.md (*cmpxf_cc_i387): Remove pattern.
434 (*cmp<mode>_cc_i387): Ditto.
435 (*cmpu<mode>_cc_i387): Ditto.
436 (*cmp<X87MODEF:mode>_<SWI24:mode>_cc_i387): Ditto.
437 * config/i386/i386.c (ix86_expand_fp_compare): Remove
439 <case IX86_FPCMP_SAHF>: Do not generate pattern with HImode clobber.
440 Emit x86_sahf_1 pattern.
441 (ix86_expand_compare): Update call to ix86_expand_fp_compare.
442 (ix86_expand_carry_flag_compare): Ditto.
444 2018-10-05 Uros Bizjak <ubizjak@gmail.com>
446 * config/i386/i386.md (*cmpxf_i387): Change operand 2 predicate
447 to reg_or_0_operand. Add "C" constraint.
448 (*cmpxf_cc_i387): Ditto.
449 (*cmp<mode>_i387): Change operand 2 predicate
450 to nonimm_or_0_operand. Add "C" constraint.
451 (*cmp<mode>_cc_i387): Ditto.
452 (*cmp<mode>_0_i387): Remove insn pattern.
453 (*cmp<mode>_0_cc_i387): Ditto.
455 2018-10-05 Uros Bizjak <ubizjak@gmail.com>
457 * config/i386/constraints.md ("C"): Do not depend on TARGET_SSE.
458 * config/i386/predicates.md (nonimm_or_0_operand): Rename
459 from vector_move_operand. Update all uses.
461 2018-10-05 Martin Sebor <msebor@redhat.com>
463 PR tree-optimization/87490
464 * builtins.c (expand_builtin_strnlen): Handle a null data.decl
467 2018-10-05 Richard Biener <rguenther@suse.de>
469 PR tree-optimization/63155
470 * tree-ssa-ccp.c (ccp_propagate::visit_phi): Avoid excess
471 vertical space in dumpfiles.
472 * tree-ssa-propagate.h
473 (ssa_propagation_engine::process_ssa_edge_worklist): Remove.
474 * tree-ssa-propagate.c (cfg_blocks_back): New global.
475 (ssa_edge_worklist_back): Likewise.
476 (curr_order): Likewise.
477 (cfg_blocks_get): Remove abstraction.
478 (cfg_blocks_add): Likewise.
479 (cfg_blocks_empty_p): Likewise.
480 (add_ssa_edge): Add to current or next worklist based on
482 (add_control_edge): Likewise.
483 (ssa_propagation_engine::process_ssa_edge_worklist): Fold
485 (ssa_propagation_engine::ssa_propagate): ... here. Unify
486 iteration from CFG and SSA edge worklist so we process
487 everything in RPO order, prioritizing forward progress
489 (ssa_prop_init): Allocate new worklists, do not dump
491 (ssa_prop_fini): Free new worklists.
493 2018-10-05 Richard Biener <rguenther@suse.de>
495 * tree-core.h (tree_block::abstract_flag): Remove.
496 (tree_block::block_num): Make full 32bits.
497 * tree.def (BLOCK): Remove docs about BLOCK_ABSTRACT.
498 * tree.h (BLOCK_ABSTRACT): Remove.
499 * dwarf2out.c (gen_lexical_block_die): Remove dead code
500 resulting from BLOCK_ABSTRACT being always false.
501 (gen_inlined_subroutine_die): Likewise.
502 (gen_block_die): Likewise.
503 * tree.c (block_ultimate_origin): Likewise.
504 * tree-pretty-print.c (dump_block_node): Remove code dealing
506 * tree-ssa-live.c (dump_scope_block): Likewise.
507 * tree-streamer-in.c (unpack_ts_block_value_fields): Likewise.
508 * tree-streamer-out.c (pack_ts_block_value_fields): Likewise.
510 2018-10-05 Richard Biener <rguenther@suse.de>
512 * config/i386/i386.c (ix86_add_stmt_cost): When scalar cost
513 is asked for initialize mode to the component mode of the
516 2018-10-05 H.J. Lu <hongjiu.lu@intel.com>
519 * config/i386/gnu-user.h (ASM_SPEC): Don't pass -msse2avx to
521 * config/i386/gnu-user64.h (ASM_SPEC): Likewise.
523 2018-10-05 Segher Boessenkool <segher@kernel.crashing.org>
526 * config/rs6000/rs6000-builtin.def (RS6000_BUILTIN_SET_FPSCR_DRN): Use
528 * config/rs6000/rs6000.md (rs6000_set_fpscr_rn): Require the operand
529 to be DImode. When using mffscrn, force the operand to a register.
531 2018-10-04 Uros Bizjak <ubizjak@gmail.com>
533 * config/i386/i386.md (*fop_<X87MODEF:mode>_2_i387): Macroize insn
534 from *fop_<MODEF:mode>_2_i387 and *fop_xf_2_i387 using
535 X87MODEF mode iterator.
536 (*fop_<X87MODEF:mode>_3_i387): Macroize insn from
537 *fop_<MODEF:mode>_3_i387 and *fop_xf_3_i387 using
538 X87MODEF mode iterator.
540 2018-10-04 Vinay Kumar <vinay.kumar@blackfigtech.com>
542 * doc/invoke.texi (-Wno-prio-ctor-dtor): Document new warning
545 2018-10-04 David Malcolm <dmalcolm@redhat.com>
547 * Makefile.in (OBJS): Add opt-problem.o.
548 * dump-context.h: Include "selftest.h.
549 (selftest::temp_dump_context): New forward decl.
550 (class dump_context): Make friend of class
551 selftest::temp_dump_context.
552 (dump_context::dump_loc_immediate): New decl.
553 (class dump_pretty_printer): Move here from dumpfile.c.
554 (class temp_dump_context): Move to namespace selftest.
555 (temp_dump_context::temp_dump_context): Add param
556 "forcibly_enable_dumping".
557 (selftest::verify_dumped_text):
558 (ASSERT_DUMPED_TEXT_EQ): Move here from dumpfile.c.
559 (selftest::verify_item):
560 (ASSERT_IS_TEXT): Move here from dumpfile.c.
561 (ASSERT_IS_TREE): Likewise.
562 (ASSERT_IS_GIMPLE): Likewise.
563 * dumpfile.c (dump_context::dump_loc): Move immediate dumping
565 (dump_context::dump_loc_immediate): ...this new function.
566 (class dump_pretty_printer): Move to dump-context.h.
567 (dump_switch_p_1): Don't enable MSG_PRIORITY_REEMITTED.
568 (opt_info_switch_p_1): Enable MSG_PRIORITY_REEMITTED.
569 (temp_dump_context::temp_dump_context): Move to "selftest"
570 namespace. Add param "forcibly_enable_dumping", and use it to
571 conditionalize the use of m_pp;
572 (selftest::verify_dumped_text): Make non-static.
573 (ASSERT_DUMPED_TEXT_EQ): Move to dump-context.h.
574 (selftest::verify_item): Make non-static.
575 (ASSERT_IS_TEXT): Move to dump-context.h.
576 (ASSERT_IS_TREE): Likewise.
577 (ASSERT_IS_GIMPLE): Likewise.
578 (selftest::test_capture_of_dump_calls): Pass "true" for new
579 param of temp_dump_context.
580 * dumpfile.h (enum dump_flag): Add MSG_PRIORITY_REEMITTED, adding
581 it to MSG_ALL_PRIORITIES. Update values of TDF_COMPARE_DEBUG and
583 * opt-problem.cc: New file.
584 * opt-problem.h: New file.
585 * optinfo-emit-json.cc
586 (selftest::test_building_json_from_dump_calls): Pass "true" for
587 new param of temp_dump_context.
588 * optinfo.cc (optinfo_kind_to_dump_flag): New function.
589 (optinfo::emit_for_opt_problem): New function.
590 (optinfo::emit): Clarity which emit_item is used.
591 * optinfo.h (optinfo::get_dump_location): New accessor.
592 (optinfo::emit_for_opt_problem): New decl.
593 (optinfo::emit): Make const.
594 * selftest-run-tests.c (selftest::run_tests): Call
595 selftest::opt_problem_cc_tests.
596 * selftest.h (selftest::opt_problem_cc_tests): New decl.
597 * tree-data-ref.c (dr_analyze_innermost): Convert return type from
598 bool to opt_result, converting fprintf messages to
599 opt_result::failure_at calls. Add "stmt" param for use by the
601 (create_data_ref): Pass "stmt" to the dr_analyze_innermost call.
602 (runtime_alias_check_p): Convert return type from bool to
603 opt_result, converting dump_printf calls to
604 opt_result::failure_at, using the statement DDR_A for their
606 (find_data_references_in_stmt): Convert return type from bool to
607 opt_result, converting "return false" to opt_result::failure_at
609 * tree-data-ref.h: Include "opt-problem.h".
610 (dr_analyze_innermost): Convert return type from bool to opt_result,
611 and add a const gimple * param.
612 (find_data_references_in_stmt): Convert return type from bool to
614 (runtime_alias_check_p): Likewise.
615 * tree-predcom.c (find_looparound_phi): Pass "init_stmt" to
616 dr_analyze_innermost.
617 * tree-vect-data-refs.c (vect_mark_for_runtime_alias_test):
618 Convert return type from bool to opt_result, adding a message for
619 the PARAM_VECT_MAX_VERSION_FOR_ALIAS_CHECKS zero case.
620 (vect_analyze_data_ref_dependence): Convert return type from bool
621 to opt_result. Change sense of return type from "false"
622 effectively meaning "no problems" to "false" meaning a problem,
623 so that "return false" becomes "return opt_result::success".
624 Convert "return true" calls to opt_result::failure_at, using
625 the location of statement A rather than vect_location.
626 (vect_analyze_data_ref_dependences): Convert return type from bool
628 (verify_data_ref_alignment): Likewise, converting dump_printf_loc
629 calls to opt_result::failure_at, using the stmt location rather
631 (vect_verify_datarefs_alignment): Convert return type from bool
633 (vect_enhance_data_refs_alignment): Likewise. Split local "stat"
634 into multiple more-tightly-scoped copies.
635 (vect_analyze_data_refs_alignment): Convert return type from bool
637 (vect_analyze_data_ref_accesses): Likewise, converting a
638 "return false" to a "return opt_result::failure_at", adding a
640 (vect_prune_runtime_alias_test_list): Convert return type from
641 bool to opt_result, converting dump_printf_loc to
642 opt_result::failure_at. Add a %G to show the pertinent statement,
643 and use the stmt's location rather than vect_location.
644 (vect_find_stmt_data_reference): Convert return type from
645 bool to opt_result, converting dump_printf_loc to
646 opt_result::failure_at, using stmt's location.
647 (vect_analyze_data_refs): Convert return type from bool to
648 opt_result. Convert "return false" to "return
649 opt_result::failure_at", adding messages as needed.
650 * tree-vect-loop.c (vect_determine_vf_for_stmt_1): Convert return
651 type from bool to opt_result.
652 (vect_determine_vf_for_stmt): Likewise.
653 (vect_determine_vectorization_factor): Likewise, converting
654 dump_printf_loc to opt_result::failure_at, using location of phi
655 rather than vect_location.
656 (vect_analyze_loop_form_1): Convert return type from bool to
657 opt_result, converting dump_printf_loc calls, retaining the use of
659 (vect_analyze_loop_form): Convert return type from loop_vec_info
660 to opt_loop_vec_info.
661 (vect_analyze_loop_operations): Convert return type from bool to
662 opt_result, converting dump_printf_loc calls, using the location
663 of phi/stmt rather than vect_location where available. Convert
664 various "return false" to "return opt_result::failure_at" with
665 "unsupported phi" messages.
666 (vect_get_datarefs_in_loop): Convert return type from bool to
667 opt_result. Add a message for the
668 PARAM_LOOP_MAX_DATAREFS_FOR_DATADEPS failure.
669 (vect_analyze_loop_2): Convert return type from bool to
670 opt_result. Ensure "ok" is set to a opt_result::failure_at before
671 each "goto again;", adding new messages where needed.
672 Add "unsupported grouped {store|load}" messages.
673 (vect_analyze_loop): Convert return type from loop_vec_info to
675 * tree-vect-slp.c (vect_analyze_slp): Convert return type from
677 * tree-vect-stmts.c (process_use): Likewise, converting
678 dump_printf_loc call and using stmt location, rather than
680 (vect_mark_stmts_to_be_vectorized): Likeise.
681 (vect_analyze_stmt): Likewise, adding a %G.
682 (vect_get_vector_types_for_stmt): Convert return type from bool to
683 opt_result, converting dump_printf_loc calls and using stmt
684 location, rather than vect_location.
685 (vect_get_mask_type_for_stmt): Convert return type from tree to
686 opt_tree, converting dump_printf_loc calls and using stmt location.
687 * tree-vectorizer.c: Include "opt-problem.h.
688 (try_vectorize_loop_1): Flag "Analyzing loop at" dump message as
689 MSG_PRIORITY_INTERNALS. Convert local "loop_vinfo" from
690 loop_vec_info to opt_loop_vec_info. If if fails, and dumping is
691 enabled, use it to report at the top level "couldn't vectorize
692 loop" followed by the problem.
693 * tree-vectorizer.h (opt_loop_vec_info): New typedef.
694 (vect_mark_stmts_to_be_vectorized): Convert return type from bool
696 (vect_analyze_stmt): Likewise.
697 (vect_get_vector_types_for_stmt): Likewise.
698 (tree vect_get_mask_type_for_stmt): Likewise.
699 (vect_analyze_data_ref_dependences): Likewise.
700 (vect_enhance_data_refs_alignment): Likewise.
701 (vect_analyze_data_refs_alignment): Likewise.
702 (vect_verify_datarefs_alignment): Likewise.
703 (vect_analyze_data_ref_accesses): Likewise.
704 (vect_prune_runtime_alias_test_list): Likewise.
705 (vect_find_stmt_data_reference): Likewise.
706 (vect_analyze_data_refs): Likewise.
707 (vect_analyze_loop): Convert return type from loop_vec_info to
709 (vect_analyze_loop_form): Likewise.
710 (vect_analyze_slp): Convert return type from bool to opt_result.
712 2018-10-04 David Malcolm <dmalcolm@redhat.com>
714 * doc/invoke.texi (-fopt-info): Document new "internals"
716 * dump-context.h (dump_context::apply_dump_filter_p): New decl.
717 * dumpfile.c (dump_options): Update for renaming of MSG_ALL to
719 (optinfo_verbosity_options): Add "internals".
720 (kind_as_string): Update for renaming of MSG_ALL to MSG_ALL_KINDS.
721 (dump_context::apply_dump_filter_p): New member function.
722 (dump_context::dump_loc): Use apply_dump_filter_p rather than
723 explicitly masking the dump_kind.
724 (dump_context::begin_scope): Increment the scope depth first. Use
725 apply_dump_filter_p rather than explicitly masking the dump_kind.
726 (dump_context::emit_item): Use apply_dump_filter_p rather than
727 explicitly masking the dump_kind.
728 (dump_dec): Likewise.
729 (dump_hex): Likewise.
730 (dump_switch_p_1): Default to MSG_ALL_PRIORITIES.
731 (opt_info_switch_p_1): Default to MSG_PRIORITY_USER_FACING.
732 (opt_info_switch_p): Update handling of default
733 MSG_OPTIMIZED_LOCATIONS to cope with default of
734 MSG_PRIORITY_USER_FACING.
735 (dump_basic_block): Use apply_dump_filter_p rather than explicitly
736 masking the dump_kind.
737 (selftest::test_capture_of_dump_calls): Update test_dump_context
738 instances to use MSG_ALL_KINDS | MSG_PRIORITY_USER_FACING rather
739 than MSG_ALL. Generalize scope test to be run at all four
740 combinations of with/without MSG_PRIORITY_USER_FACING and
741 MSG_PRIORITY_INTERNALS, adding examples of explicit priority
742 for each of the two values.
743 * dumpfile.h (enum dump_flag): Add comment about the MSG_* flags.
744 Rename MSG_ALL to MSG_ALL_KINDS. Add MSG_PRIORITY_USER_FACING,
745 MSG_PRIORITY_INTERNALS, and MSG_ALL_PRIORITIES, updating the
746 values for TDF_COMPARE_DEBUG and TDF_ALL_VALUES.
747 (AUTO_DUMP_SCOPE): Add a note to the comment about the interaction
749 * tree-vect-loop-manip.c (vect_loop_versioning): Mark versioning
750 dump messages as MSG_PRIORITY_USER_FACING.
751 * tree-vectorizer.h (DUMP_VECT_SCOPE): Add a note to the comment
752 about the interaction with MSG_PRIORITY_*.
754 2018-10-04 Bernd Edlinger <bernd.edlinger@hotmail.de>
756 * varasm.c (output_constant): Add new parameter merge_strings.
757 Make strings properly zero terminated in merge string sections.
758 (mergeable_string_section): Don't fail if the last char is non-zero.
759 (assemble_variable_contents): Handle merge string sections.
760 (assemble_variable): Likewise.
761 (assemble_constant_contents): Likewise.
762 (output_constant_def_contents): Likewise.
763 (output_constructor_array_range,
764 output_constructor_regular_field): Adjust call to output_constant.
765 (output_object_block): Adjust call to assemble_constant_contents
766 and assemble_variable_contents.
768 2018-10-04 Martin Liska <mliska@suse.cz>
771 * cgraphunit.c (process_function_and_variable_attributes):
772 Warn about a function with alias attribute and a body.
774 2018-10-04 Martin Liska <mliska@suse.cz>
777 * multiple_target.c (redirect_to_specific_clone): New function.
778 (ipa_target_clone): Use it.
779 * tree-inline.c: Fix comment.
781 2018-10-04 David Malcolm <dmalcolm@redhat.com>
783 * dumpfile.c (gcc::dump_manager::dump_manager): Initialize new
785 (gcc::dump_manager::~dump_manager): Free m_optinfo_filename.
786 (gcc::dump_manager::register_pass): New member function, adapted
787 from loop body in gcc::pass_manager::register_pass, adding a
788 call to update_dfi_for_opt_info.
789 (gcc::dump_manager::opt_info_enable_passes): Store the
790 -fopt-info options into the new fields. Move the loop
792 (gcc::dump_manager::update_dfi_for_opt_info): ...this new member
794 * dumpfile.h (struct opt_pass): New forward decl.
795 (gcc::dump_manager::register_pass): New decl.
796 (gcc::dump_manager::update_dfi_for_opt_info): New decl.
797 (class gcc::dump_manager): Add fields "m_optgroup_flags",
798 "m_optinfo_flags", and "m_optinfo_filename".
799 * passes.c (gcc::pass_manager::register_pass): Move all of the
800 dump-handling code to gcc::dump_manager::register_pass.
802 2018-10-04 Peter Bergner <bergner@linux.ibm.com>
804 PR rtl-optimization/87466
805 * target.def (setjmp_preserves_nonvolatile_regs_p): New target hook.
806 * doc/tm.texi.in (TARGET_SETJMP_PRESERVES_NONVOLATILE_REGS_P): New hook.
807 * doc/tm.texi: Regenerate.
808 * ira-lives.c (process_bb_node_lives): Use the new target hook.
809 * lra-lives.c (process_bb_lives): Likewise.
810 * config/rs6000/rs6000.c (TARGET_SETJMP_PRESERVES_NONVOLATILE_REGS_P):
813 2018-10-04 Tamar Christina <tamar.christina@arm.com>
815 * params.c (add_params): Fix initialization.
817 2018-10-04 Martin Liska <mliska@suse.cz>
819 PR gcov-profile/84107
820 * tree-profile.c (init_ic_make_global_vars):
821 Remove ic_void_ptr_var and ic_gcov_type_ptr_var.
822 Come up with new ic_tuple* variables. Emit
823 __gcov_indirect_call{,_topn} variables.
824 (gimple_gen_ic_profiler): Access the variable
826 (gimple_gen_ic_func_profiler): Access
827 __gcov_indirect_call.callee field.
828 (gimple_init_gcov_profiler): Use ptr_type_node.
829 * value-prof.c (gimple_ic): Use ptr_type_node.
831 2018-10-04 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
833 PR tree-optimization/85787
834 * ipa-pure-const.c (malloc_candidate_p_1): Move most of malloc_candidate_p
835 into this function and add support for detecting multiple phis.
836 (DUMP_AND_RETURN): Move from malloc_candidate_p into top-level macro.
838 2018-10-04 Martin Liska <mliska@suse.cz>
841 * ipa-inline.c (inline_to_all_callers_1):
842 Call ultimate_alias_target for node being inlined.
844 2018-10-03 Jeff Law <law@redhat.com>
846 * gimple-ssa-sprintf.c (format_string): Do not hardcode size of
848 * tree.c (get_typenode_from_name): Moved from fortran/trans-types.c.
849 * tree.h (get_typenode_from_name): Prototype.
851 2018-10-03 Uros Bizjak <ubizjak@gmail.com>
853 * config/i386/i386.md (*cmp<X87MODEF:mode>_<SWI24:mode>_i387):
854 Change operand 2 predicate to nonimmediate_operand.
855 (*cmp<X87MODEF:mode>_<SWI24:mode>_cc_i387): Ditto.
857 2018-10-03 Martin Sebor <msebor@redhat.com>
858 Jeff Law <law@redhat.com>
860 * gimple-ssa-sprintf.c (struct fmtresult): Add new member and
862 (get_string_length): Detect unterminated arrays.
863 (format_string): Same.
864 (format_directive): Warn about unterminated arrays.
865 (handle_gimple_call): Mark statements with no_warning as needed.
867 2018-10-03 Jim Wilson <jimw@sifive.com>
869 * config/riscv/riscv-c.c (riscv_cpu_cpp_builtins): For ABI_ILP32E,
870 also define __riscv_abi_rve. Delete trailing white space.
872 2018-10-03 Paul Koning <ni1d@arrl.net>
874 Enable LRA register allocator for PDP11.
875 * config/pdp11/constraints.md (Q): Use define_memory_constraint.
878 * config/pdp11/pdp11.c (pdp11_lra_p): New function.
879 * config/pdp11/pdp11.opt (-mlra): New option.
880 * doc/invoke.texi (PDP-11 Options): Document -mlra.
882 2018-10-03 Uros Bizjak <ubizjak@gmail.com>
884 * config/i386/i386.md (*<absneg:code>extendsfdf2): Remove.
885 (*<absneg:code>extend<mode>xf2): Ditto.
887 2018-10-03 Aldy Hernandez <aldyh@redhat.com>
889 PR tree-optimization/87415
890 * tree-vrp.c (set_value_range_with_overflow): Special case one bit
893 2018-10-02 Jeff Law <law@redhat.com>
895 * gimple-fold.c (get_range_strlen): Only set *nonstr when
896 an unterminated string is discovered. Bubble up range
897 even for unterminated strings.
898 (gimple_fold_builtin_strlen): Do not fold if get_range_strlen
899 indicates the string was not terminated via NONSTR.
901 2018-10-03 Aldy Hernandez <aldyh@redhat.com>
903 * tree-vrp.c (extract_range_from_unary_expr): Special case all
905 Do not do anything special for anti-ranges.
907 2018-10-03 Jérôme Lambourg <lambourg@adacore.com>
909 * config/arm/vxworks.h (ARM_TARGET2_DWARF_FORMAT): Adjust to
910 DW_EH_PE_pcrel | DW_EH_PE_indirect for RTPs.
912 2018-10-03 Martin Liska <mliska@suse.cz>
914 PR gcov-profile/86109
915 * coverage.c (coverage_begin_function): Do not
916 mark lambdas as artificial.
917 * tree-core.h (struct GTY): Remove tm_clone_flag
918 and introduce new lambda_function.
919 * tree.h (DECL_LAMBDA_FUNCTION): New macro.
921 2018-10-02 Aaron Sawdey <acsawdey@linux.ibm.com>
924 * config/rs6000/rs6000-string.c (expand_strn_compare): Check that both
925 P8_VECTOR and VSX are enabled.
927 2018-10-02 Andreas Krebbel <krebbel@linux.ibm.com>
929 * config/s390/driver-native.c (s390_host_detect_local_cpu): Add
930 0x3907 as CPU model number.
932 2018-10-02 Andreas Krebbel <krebbel@linux.ibm.com>
934 * common/config/s390/s390-common.c: Rename PF_ARCH12 to PF_Z14.
935 * config/s390/s390.h (enum processor_flags): Rename PF_ARCH12 to
936 PF_Z14. Rename TARGET_CPU_ARCH12 to TARGET_CPU_Z14,
937 TARGET_CPU_ARCH12_P to TARGET_CPU_Z14_P, TARGET_ARCH12 to
938 TARGET_Z14, and TARGET_ARCH12_P to TARGET_Z14_P.
939 * config/s390/s390.md: Likewise. Rename also the cpu attribute
940 value from arch12 to z14.
942 2018-10-02 Uros Bizjak <ubizjak@gmail.com>
944 * config/i386/i386.md (fxam<mode>2_i387_with_temp): Remove.
946 (isinf<mode>2): Ditto.
948 2018-10-02 Uros Bizjak <ubizjak@gmail.com>
950 * config/i386/i386.c (ix86_emit_i387_round): Extend op1 to XFmode
951 before emitting fxam. Perform calculations in XFmode.
953 2018-10-02 Marc Glisse <marc.glisse@inria.fr>
955 * match.pd (((X /[ex] A) +- B) * A): New transformation.
957 2018-10-02 Marc Glisse <marc.glisse@inria.fr>
960 * fold-const.c (fold_plusminus_mult_expr): Handle complex and vectors.
961 * tree.c (signed_or_unsigned_type_for): Handle complex.
963 2018-10-02 Jeff Law <law@redhat.com>
965 * gimple-fold.c (get_range_strlen): Remove dead code.
967 2018-10-02 Martin Sebor <msebor@redhat.com>
968 Jeff Law <law@redhat.com>
970 * builtins.c (unterminated_array): Add new arguments.
971 If argument is not terminated, bubble up size and exact
973 (expand_builtin_strnlen): Detect, avoid expanding
974 and diagnose unterminated arrays.
975 (c_strlen): Fill in offset of start of unterminated strings.
976 * builtins.h (unterminated_array): Update prototype.
978 2018-10-02 Richard Biener <rguenther@suse.de>
980 * config/i386/sse.md (reduc_plus_scal_v4df): Avoid the use
981 of haddv4df, first reduce to SSE width and exploit the fact
982 that we only need element zero with the reduction result.
983 (reduc_plus_scal_v2df): Likewise.
985 2018-10-02 Eric Botcazou <ebotcazou@adacore.com>
987 * dojump.h (do_jump): Delete.
988 (do_jump_1): Likewise.
989 (split_comparison): Move around.
990 * dojump.c (do_jump): Make static.
991 (do_jump_1): Likewise.
992 (jumpifnot): Move around.
993 (jumpifnot_1): Likewise.
995 (jumpif_1): Likewise.
996 * expr.c (expand_expr_real_1): Call jumpif[not] instead of do_jump.
998 2018-10-02 Eric Botcazou <ebotcazou@adacore.com>
1000 * reorg.c (make_return_insns): Use emit_copy_of_insn_after for the
1001 insns in the delay slot and add_insn_after for the jump insn.
1003 2018-10-02 Richard Biener <rguenther@suse.de>
1005 * tree-inline.c (expand_call_inline): Use the location of
1006 the callee declaration for the inline-entry marker.
1007 * final.c (notice_source_line): Remove special-casing of
1008 NOTE_INSN_INLINE_ENTRY.
1010 2018-10-01 Carl Love <cel@us.ibm.com>
1013 * config/rs6000/rs6000-builtin.def (__builtin_mffsl): New.
1014 (__builtin_mtfsb0): New.
1015 (__builtin_mtfsb1): New.
1016 ( __builtin_set_fpscr_rn): New.
1017 (__builtin_set_fpscr_drn): New.
1018 * config/rs6000/rs6000.c (rs6000_expand_mtfsb_builtin): Add.
1019 (rs6000_expand_set_fpscr_rn_builtin): Add.
1020 (rs6000_expand_set_fpscr_drn_builtin): Add.
1021 (rs6000_expand_builtin): Add case statement entries for
1022 RS6000_BUILTIN_MTFSB0, RS6000_BUILTIN_MTFSB1,
1023 RS6000_BUILTIN_SET_FPSCR_RN, RS6000_BUILTIN_SET_FPSCR_DRN,
1024 RS6000_BUILTIN_MFFSL.
1025 (rs6000_init_builtins): Add ftype initialization and def_builtin
1026 calls for __builtin_mffsl, __builtin_mtfsb0, __builtin_mtfsb1,
1027 __builtin_set_fpscr_rn, __builtin_set_fpscr_drn.
1028 * config/rs6000.md (rs6000_mtfsb0, rs6000_mtfsb1, rs6000_mffscrn,
1029 rs6000_mffscdrn): Add define_insn.
1030 (rs6000_set_fpscr_rn, rs6000_set_fpscr_drn): Add define_expand.
1031 * doc/extend.texi: Add documentation for the builtins.
1033 2018-10-01 Richard Biener <rguenther@suse.de>
1035 PR tree-optimization/87465
1036 * tree-ssa-loop-ivcanon.c (tree_estimate_loop_size): Fix typo
1037 causing branch miscounts.
1039 2018-10-01 Tamar Christina <tamar.christina@arm.com>
1041 * common/config/aarch64/aarch64-common.c (TARGET_OPTION_DEFAULT_PARAM,
1042 aarch64_option_default_param): New.
1043 (params.h): Include.
1044 (TARGET_OPTION_VALIDATE_PARAM, aarch64_option_validate_param): New.
1045 * config/aarch64/aarch64.c (aarch64_override_options_internal): Simplify
1046 stack-clash protection validation code.
1048 2018-10-01 Tamar Christina <tamar.christina@arm.com>
1050 * params.c (validate_param): New.
1051 (add_params): Use it.
1052 (set_param_value): Refactor param validation into validate_param.
1053 (diagnostic.h): Include.
1054 * diagnostic.h (diagnostic_ready_p): New.
1056 2018-10-01 Tamar Christina <tamar.christina@arm.com>
1058 * params.c (set_param_value):
1059 Add index of parameter being validated.
1060 * common/common-target.def (option_validate_param): New.
1061 * common/common-targhooks.h (default_option_validate_param): New.
1062 * common/common-targhooks.c (default_option_validate_param): New.
1063 * doc/tm.texi.in (TARGET_OPTION_VALIDATE_PARAM): New.
1064 * doc/tm.texi: Regenerate.
1066 2018-10-01 Tamar Christina <tamar.christina@arm.com>
1069 * config/aarch64/aarch64.c (aarch64_override_options_internal):
1070 Add validation for stack-clash parameters and set defaults.
1072 2018-10-01 Tamar Christina <tamar.christina@arm.com>
1075 * configure.ac: Add stack-clash-protection-guard-size.
1076 * doc/install.texi: Document it.
1077 * config.in (DEFAULT_STK_CLASH_GUARD_SIZE): New.
1078 * params.def: Update comment for guard-size.
1079 (PARAM_STACK_CLASH_PROTECTION_GUARD_SIZE,
1080 PARAM_STACK_CLASH_PROTECTION_PROBE_INTERVAL): Update description.
1081 * configure: Regenerate.
1083 2018-10-01 Tamar Christina <tamar.christina@arm.com>
1086 * config/aarch64/aarch64.h (STACK_CLASH_MIN_BYTES_OUTGOING_ARGS,
1087 STACK_DYNAMIC_OFFSET): New.
1088 * config/aarch64/aarch64.c (aarch64_layout_frame):
1089 Update outgoing args size.
1090 (aarch64_stack_clash_protection_alloca_probe_range,
1091 TARGET_STACK_CLASH_PROTECTION_ALLOCA_PROBE_RANGE): New.
1093 2018-10-01 Tamar Christina <tamar.christina@arm.com>
1096 * explow.c (anti_adjust_stack_and_probe_stack_clash): Support custom
1098 * target.def (stack_clash_protection_alloca_probe_range): New.
1099 (stack_clash_protection_final_dynamic_probe): Remove.
1100 * targhooks.h (default_stack_clash_protection_alloca_probe_range) New.
1101 (default_stack_clash_protection_final_dynamic_probe): Remove.
1102 * targhooks.c: Likewise.
1103 * doc/tm.texi.in (TARGET_STACK_CLASH_PROTECTION_ALLOCA_PROBE_RANGE): New.
1104 (TARGET_STACK_CLASH_PROTECTION_FINAL_DYNAMIC_PROBE): Remove.
1105 * doc/tm.texi: Regenerate.
1107 2018-10-01 Tamar Christina <tamar.christina@arm.com>
1110 * config/aarch64/aarch64-protos.h (aarch64_output_probe_sve_stack_clash): New.
1111 * config/aarch64/aarch64.c (aarch64_output_probe_sve_stack_clash,
1112 aarch64_clamp_to_uimm12_shift): New.
1113 (aarch64_allocate_and_probe_stack_space): Add SVE specific section.
1114 * config/aarch64/aarch64.md (probe_sve_stack_clash): New.
1116 2018-10-01 Tamar Christina <tamar.christina@arm.com>
1119 * config/aarch64/aarch64.c (aarch64_layout_frame): Add assert.
1121 2018-10-01 Jeff Law <law@redhat.com>
1122 Richard Sandiford <richard.sandiford@linaro.org>
1123 Tamar Christina <tamar.christina@arm.com>
1126 * config/aarch64/aarch64.md
1127 (probe_stack_range): Add k (SP) constraint.
1128 * config/aarch64/aarch64.h (STACK_CLASH_CALLER_GUARD,
1129 STACK_CLASH_MAX_UNROLL_PAGES): New.
1130 * config/aarch64/aarch64.c (aarch64_output_probe_stack_range): Emit
1131 stack probes for stack clash.
1132 (aarch64_allocate_and_probe_stack_space): New.
1133 (aarch64_expand_prologue): Use it.
1134 (aarch64_expand_epilogue): Likewise and update IP regs re-use criteria.
1135 (aarch64_sub_sp): Add emit_move_imm optional param.
1137 2018-10-01 MCC CS <deswurstes@users.noreply.github.com>
1139 PR tree-optimization/87261
1140 * match.pd: Remove trailing whitespace.
1141 Add (x & y) | ~(x | y) -> ~(x ^ y),
1142 (~x | y) ^ (x ^ y) -> x | ~y and (x ^ y) | ~(x | y) -> ~(x & y)
1144 2018-10-01 Claudiu Zissulescu <claziss@synopsys.com>
1146 * config/arc/arc.md (*add_n): Clean up pattern, update instruction
1148 (ashlsi3_insn): Update instruction constraints.
1149 (ashrsi3_insn): Likewise.
1150 (rotrsi3): Likewise.
1151 (add_shift): Likewise.
1152 * config/arc/constraints.md (Csz): New 32 bit constraint. It
1153 avoids placing in the limm field small constants which, otherwise,
1154 could end into a small instruction.
1156 2018-10-01 Claudiu Zissulescu <claziss@synopsys.com>
1158 * config/arc/arc.md (maddsidi4_split): Don't use dmac if the
1159 destination register is not odd-even.
1160 (umaddsidi4_split): Likewise.
1162 2018-10-01 Richard Biener <rguenther@suse.de>
1164 * tree-inline.c (expand_call_inline): Store origin of fn
1165 in BLOCK_ABSTRACT_ORIGIN for the inline BLOCK.
1166 * tree.c (block_ultimate_origin): Simplify and do some
1169 2018-09-30 Uros Bizjak <ubizjak@gmail.com>
1171 * config/i386/mmx.md (EMMS): New int iterator.
1172 (emms): New int attribute.
1173 (mmx_<emms>): Macroize insn from *mmx_emms and *mmx_femms using
1174 EMMS int iterator. Explicitly declare clobbers.
1175 (mmx_emms): Remove expander.
1177 * config/i386/predicates.md (emms_operation): Remove predicate.
1178 (vzeroall_pattern): New predicate.
1179 (vzeroupper_pattern): Rename from vzeroupper_operation.
1180 * config/i386/i386.c (ix86_avx_u128_mode_after): Use
1181 vzeroupper_pattern and vzeroall_pattern predicates.
1183 2018-09-30 Peter Bergner <bergner@linux.ibm.com>
1185 PR rtl-optimization/86939
1186 * ira-lives.c (make_hard_regno_born): Rename from this...
1187 (make_hard_regno_live): ... to this. Remove update to conflict
1188 information. Update function comment.
1189 (make_hard_regno_dead): Add conflict information update. Update
1191 (make_object_born): Rename from this...
1192 (make_object_live): ... to this. Remove update to conflict information.
1193 Update function comment.
1194 (make_object_dead): Add conflict information update. Update function
1196 (mark_pseudo_regno_live): Call make_object_live.
1197 (mark_pseudo_regno_subword_live): Likewise.
1198 (mark_hard_reg_dead): Update function comment.
1199 (mark_hard_reg_live): Call make_hard_regno_live.
1200 (process_bb_node_lives): Likewise.
1201 * lra-lives.c (make_hard_regno_born): Rename from this...
1202 (make_hard_regno_live): ... to this. Remove update to conflict
1203 information. Remove now uneeded check_pic_pseudo_p argument.
1204 Update function comment.
1205 (make_hard_regno_dead): Add check_pic_pseudo_p argument and add update
1206 to conflict information. Update function comment.
1207 (mark_pseudo_live): Remove update to conflict information. Update
1209 (mark_pseudo_dead): Add conflict information update.
1210 (mark_regno_live): Call make_hard_regno_live.
1211 (mark_regno_dead): Call make_hard_regno_dead with new arguement.
1212 (process_bb_lives): Call make_hard_regno_live and make_hard_regno_dead.
1214 2018-09-29 H.J. Lu <hongjiu.lu@intel.com>
1217 * config/i386/i386.c (construct_container): Use TImode for
1218 BLKmode values in 2 integer registers.
1220 2018-09-29 Jeff Law <law@redhat.com>
1222 * builtins.c (unterminated_array): Pass in c_strlen_data * to
1223 c_strlen rather than just a tree *.
1224 (c_strlen): Change NONSTR argument to a c_strlen_data pointer.
1225 Update recursive calls appropriately. If caller did not provide a
1226 suitable data pointer, create a local one. When a non-terminated
1227 string is discovered, bubble up information about the string via the
1228 c_strlen_data object.
1229 * builtins.h (c_strlen): Update prototype.
1230 (c_strlen_data): New structure.
1231 * gimple-fold.c (get_range_strlen): Update calls to c_strlen.
1232 For a type 2 call, if c_strlen indicates a non-terminated string
1233 use the length of the non-terminated string.
1234 (gimple_fold_builtin_stpcpy): Update calls to c_strlen.
1236 2018-09-29 Jakub Jelinek <jakub@redhat.com>
1239 * config/i386/avx512fintrin.h (_mm512_abs_pd, _mm512_mask_abs_pd): Use
1240 __m512d type for __A argument rather than __m512.
1242 2018-09-28 John David Anglin <danglin@gcc.gnu.org>
1244 * match.pd (simple_comparison): Don't optimize if either operand is
1245 a function pointer when target needs function pointer canonicalization.
1247 2018-09-28 Segher Boessenkool <segher@kernel.crashing.org>
1249 * config/rs6000/driver-rs6000.c (asm_names): Adjust the entries for
1250 power5 .. power9 to remove indirection.
1251 * config/rs6000/rs6000.h (ASM_CPU_POWER5_SPEC, ASM_CPU_POWER6_SPEC,
1252 ASM_CPU_POWER7_SPEC, ASM_CPU_POWER8_SPEC, ASM_CPU_POWER9_SPEC,
1253 ASM_CPU_476_SPEC): Delete.
1254 (ASM_CPU_SPEC): Adjust.
1255 (EXTRA_SPECS): Delete asm_cpu_power5, asm_cpu_power6, asm_cpu_power7,
1256 asm_cpu_power8, asm_cpu_power9, asm_cpu_476.
1258 2018-09-28 Segher Boessenkool <segher@kernel.crashing.org>
1260 * config.in: Delete HAVE_AS_DCI.
1261 * config/powerpcspe/powerpcspe.h: Treat HAVE_AS_DCI as always true.
1262 * config/rs6000/rs6000.h: Ditto.
1263 * configure.ac: Delete HAVE_AS_DCI.
1264 * configure: Regenerate.
1266 2018-09-28 Segher Boessenkool <segher@kernel.crashing.org>
1268 * config.in (HAVE_AS_LWSYNC): Delete.
1269 * config/powerpcspe/powerpcspe.h (TARGET_LWSYNC_INSTRUCTION): Delete.
1270 * config/powerpcspe/sync.md (*lwsync): Always generate lwsync, never
1272 * config/rs6000/rs6000.h (TARGET_LWSYNC_INSTRUCTION): Delete.
1273 * config/rs6000/sync.md (*lwsync): Always generate lwsync, never do it
1275 * configure.ac: Delete HAVE_AS_LWSYNC.
1276 * configure: Regenerate.
1278 2018-09-28 Eric Botcazou <ebotcazou@adacore.com>
1279 Pierre-Marie de Rodat <derodat@adacore.com>
1281 * calls.c (expand_call): Try to do a tail call for thunks at -O0 too.
1282 * cgraph.h (struct cgraph_thunk_info): Add indirect_offset.
1283 (cgraph_node::create_thunk): Add indirect_offset parameter.
1284 (thunk_adjust): Likewise.
1285 * cgraph.c (cgraph_node::create_thunk): Add indirect_offset parameter
1286 and initialize the corresponding field with it.
1287 (cgraph_node::dump): Dump indirect_offset field.
1288 * cgraphclones.c (duplicate_thunk_for_node): Deal with indirect_offset.
1289 * cgraphunit.c (cgraph_node::analyze): Be prepared for external thunks.
1290 (thunk_adjust): Add indirect_offset parameter and deal with it.
1291 (cgraph_node::expand_thunk): Deal with the indirect_offset field and
1292 pass it to thunk_adjust. Do not call the target hook if it's non-zero
1293 or if the thunk is external or local. Fix formatting. Do not chain
1294 the RESULT_DECL to BLOCK_VARS. Pass the static chain to the target,
1295 if any, in the GIMPLE representation.
1296 * ipa-icf.c (sem_function::equals_wpa): Deal with indirect_offset.
1297 * lto-cgraph.c (lto_output_node): Write indirect_offset field.
1298 (input_node): Read indirect_offset field.
1299 * tree-inline.c (expand_call_inline): Pass indirect_offset field in the
1300 call to thunk_adjust.
1301 * tree-nested.c (struct nesting_info): Add thunk_p field.
1302 (create_nesting_tree): Set it.
1303 (convert_all_function_calls): Copy static chain from targets to thunks.
1304 (finalize_nesting_tree_1): Return early for thunks.
1305 (unnest_nesting_tree_1): Do not finalize thunks.
1306 (gimplify_all_functions): Do not gimplify thunks.
1308 2018-09-28 David Malcolm <dmalcolm@redhat.com>
1310 * opt-suggestions.c (option_proposer::build_option_suggestions):
1311 Release "option_values".
1313 2018-09-28 David Malcolm <dmalcolm@redhat.com>
1315 * coverage.c (get_coverage_counts): Convert problem-reporting dump
1316 messages from MSG_OPTIMIZED_LOCATIONS to MSG_MISSED_OPTIMIZATION.
1317 * dumpfile.c (kind_as_string): New function.
1318 (dump_loc): Rather than a hardcoded prefix of "note: ", use
1319 kind_as_string to vary the prefix based on dump_kind.
1320 (selftest::test_capture_of_dump_calls): Update for above.
1322 2018-09-28 Uros Bizjak <ubizjak@gmail.com>
1324 * config/i386/i386.h (SSE_REGNO): Fix check for FIRST_REX_SSE_REG.
1325 (GET_SSE_REGNO): Rename from SSE_REGNO. Update all uses for rename.
1327 2018-09-28 Uros Bizjak <ubizjak@gmail.com>
1329 * config/i386/i386.h (CC_REGNO): Remove FPSR_REG.
1330 * config/i386/i386.c (ix86_fixed_condition_code_regs): Use
1331 INVALID_REGNUM instead of FPSR_REG.
1332 (ix86_md_asm_adjust): Do not clobber FPSR_REG.
1333 * config/i386/i386.md: Update comment of FP compares.
1334 (fldenv): Do not clobber FPSR_REG.
1336 2018-09-28 Richard Biener <rguenther@suse.de>
1338 * tree.h (BLOCK_ORIGIN): New.
1339 * omp-expand.c (grid_expand_target_grid_body): Assign
1340 BLOCK_ORIGIN to BLOCK_ABSTRACT_ORIGIN.
1341 * tree-inline.c (remap_block): Likewise.
1342 * auto-profile.c (get_function_decl_from_block): Simplify
1343 by eliding the BLOCK_ABSTRACT_ORIGIN chasing.
1344 * langhooks.c (lhd_print_error_function): Likewise.
1345 * optinfo-emit-json.cc (optrecord_json_writer::inlining_chain_to):
1347 * tree-ssa-live.c (remove_unused_scope_block_p): Likewise.
1348 * tree.c (block_nonartificial_location): Likewise.
1349 (block_ultimate_origin): Likewise.
1350 * tree-pretty-print.c (percent_K_format): Likewise. Remove
1351 no longer needed LTO case.
1353 2018-09-28 Andrew Stubbs <ams@codesourcery.com>
1354 Jan Hubicka <jh@suse.cz>
1355 Martin Jambor <mjambor@suse.cz>
1357 * simplify-rtx.c (simplify_merge_mask): New function.
1358 (simplify_ternary_operation): Use it, also see if VEC_MERGEs with the
1359 same masks are used in op1 or op2.
1360 (test_vec_merge): New function.
1361 (test_vector_ops): Call test_vec_merge.
1363 2018-09-28 Eric Botcazou <ebotcazou@adacore.com>
1365 * config/sparc/sparc-protos.h (sparc_branch_cost): Declare.
1366 * config/sparc/sparc.h (BRANCH_COST): Call sparc_branch_cost.
1367 * config/sparc/sparc.c (struct processor_costs): Add branch_cost field.
1368 (cypress_costs): Set it.
1369 (supersparc_costs): Likewise.
1370 (hypersparc_costs): Likewise.
1371 (leon_cost): Likewise.
1372 (leon3_costs): Likewise.
1373 (sparclet_costs): Likewise.
1374 (ultrasparc_costs): Likewise.
1375 (ultrasparc_costs): Likewise.
1376 (niagara_costs): Likewise.
1377 (niagara2_costs): Likewise.
1378 (niagara3_costs): Likewise.
1379 (niagara4_costs): Likewise.
1380 (niagara7_costs): Likewise.
1381 (m8_costs): Likewise.
1382 (TARGET_CAN_FOLLOW_JUMP): Define.
1383 (pass_work_around_errata::gate): Minor tweak.
1384 (sparc_option_override): Remove MASK_FSMULD mask for V7 processors.
1385 Do not set both MASK_VIS4 and MASK_VIS4B for M8 processor.
1386 Automaitcally clear MASK_FSMULD mask for V7 processors.
1387 (sparc_can_follow_jump): New static function.
1388 (output_ubranch): Deal with CROSSING_JUMP_P.
1389 (sparc_use_sched_lookahead): Rewrite using switch statement.
1390 (sparc_issue_rate): Reorder.
1391 (sparc_branch_cost): New function.
1393 2018-09-27 Martin Sebor <msebor@redhat.com>
1395 * tree.h (tree_to_shwi): Add attribute nonnull and pure.
1396 (tree_to_poly_int64, tree_to_uhwi, tree_to_poly_uint64): Same.
1397 (int_fits_type_p): Same.
1399 2018-09-27 Uros Bizjak <ubizjak@gmail.com>
1401 * config/i386/i386.md (FPCR_REG): Remove.
1402 (UNSPEC_FLDCW): Remove.
1403 (x86_fnstcw_1): Use (const_int 0) instead of FPCR_REG.
1404 (x86_fldcw_1): Remove insn pattern.
1405 (fnstenv): Do not clobber FPCR_REG.
1407 * config/i386/i386.h (FIXED_REGISTERS) Remove fpsr register.
1408 (CALL_USED_REGISTERS): Ditto.
1409 (REG_ALLOC_ORDER): Ditto.
1410 (REG_CLASS_CONTENTS): Ditto.
1411 (HI_REGISTER_NAMES): Ditto.
1412 (ADDITIONAL_REGISTER_NAMES): Use defines instead
1413 of numerical constants.
1414 * config/i386/i386.c (regclass_map): Remove fpsr register.
1415 (dbx_register_map): Ditto.
1416 (dbx64_register_map): Ditto.
1417 (svr4_dbx_register_map): Ditto.
1418 (print_reg): Do not handle FPCR_REG.
1420 2018-09-27 Segher Boessenkool <segher@kernel.crashing.org>
1423 * config.in (HAVE_AS_CMPB, HAVE_AS_DFP, HAVE_AS_FPRND, HAVE_AS_MFPGPR,
1424 HAVE_AS_POPCNTB, HAVE_AS_POPCNTD, HAVE_AS_POWER8, HAVE_AS_POWER9):
1425 Delete, always treat as true.
1426 * config/powerpcspe/powerpcspe.c (rs6000_option_override_internal):
1427 Ditto. Simplify remaining code.
1428 * config/powerpcspe/powerpcspe.h: Ditto.
1429 * config/rs6000/rs6000.c (rs6000_option_override_internal): Ditto.
1430 Simplify remaining code.
1431 (rs6000_expand_builtin): Ditto.
1432 * config/rs6000/rs6000.h: Ditto.
1433 * configure.ac: Ditto.
1434 * configure: Regenerate.
1436 2018-09-27 Martin Liska <mliska@suse.cz>
1438 * coverage.c (get_coverage_counts): Revert the formatting
1439 of missing profile opt info.
1441 2018-09-27 Richard Biener <rguenther@suse.de>
1445 * dwarf2out.c (set_block_origin_self): Do not mark outermost
1446 block as we do not output that.
1447 (gen_inlined_subroutine_die): Elide the originally outermost
1448 block, matching what we do for concrete instances.
1449 (decls_for_scope): Add parameter specifying whether to recurse
1452 2018-09-27 Andrew Stubbs <ams@codesourcery.com>
1453 Tom de Vries <tom@codesourcery.com>
1457 * expmed.c (emit_cstore): Fix handling of result_mode == BImode and
1458 STORE_FLAG_VALUE == 1.
1460 2018-09-27 Andreas Krebbel <krebbel@linux.ibm.com>
1462 * config/s390/s390.md (PPA_TX_ABORT, PPA_OOO_BARRIER): New
1463 constant definitions.
1464 ("tx_assist"): Replace magic number with PPA_TX_ABORT.
1465 ("*ppa"): Enable pattern also for -march=zEC12 -mno-htm.
1466 ("speculation_barrier"): New expander definition.
1468 2018-09-26 Indu Bhagat <indu.bhagat@oracle.com>
1470 PR gcov-profile/86957
1471 * common.opt: New warning option -Wmissing-profile.
1472 * coverage.c (get_coverage_counts): Add warning for missing .gcda file.
1473 * doc/invoke.texi: Document -Wmissing-profile.
1475 2018-09-26 Jim Wilson <jimw@sifive.com>
1477 * config/riscv/riscv.md (subsi3_extended2): Add J constraint.
1478 (negdi2, negsi2, negsi2_extended, negsi2_extended2): New.
1480 2018-09-26 Martin Sebor <msebor@redhat.com>
1482 * tree.c (zerop): Change return type to bool.
1483 (integer_zerop, integer_onep, integer_each_onep): Same.
1484 (integer_all_onesp, integer_minus_onep, integer_pow2p): Same.
1485 (integer_nonzerop, integer_truep, tree_ctz, real_zerop): Same.
1486 (real_onep, real_minus_onep, chain_index): Same.
1487 (print_type_hash_statistics, type_list_equal): Same.
1488 * tree.h (zerop): Same.
1489 (zerop, integer_zerop, integer_onep, integer_each_onep): Same.
1490 (integer_all_onesp, integer_minus_onep, integer_pow2p): Same.
1491 (integer_nonzerop, integer_truep, tree_ctz, real_zerop): Same.
1492 (real_onep, real_minus_onep, chain_index): Same.
1493 (print_type_hash_statistics, type_list_equal): Same.
1495 2018-09-26 Jim Wilson <jimw@sifive.com>
1497 * config/riscv/riscv.h (FUNCTION_ARG_REGNO_P): Fix comment.
1499 2018-09-26 Jakub Jelinek <jakub@redhat.com>
1502 * config/i386/i386.c: Include debug.h and dwarf2out.h.
1503 (output_indirect_thunk): Emit DW_CFA_def_cfa_offset after the
1506 2018-09-25 Andrew Stubbs <ams@codesourcery.com>
1508 * builtins.c (get_builtin_sync_mem): Force address mode conversion.
1510 2018-09-26 Uros Bizjak <ubizjak@gmail.com>
1512 * config/i386/i386.h (enum reg_class): Remove FP_TOP_SSE_REGS
1513 and FP_SECOND_SSE_REGS.
1514 (REG_CLASS_NAMES): Ditto.
1515 (REG_CLASS_CONTENTS): Ditto.
1516 * config/i386/i386.c (ix86_preferred_reload_class) Do not handle
1517 FP_TOP_SSE_REGS and FP_SECOND_SSE_REGS classes.
1518 (ix86_preferred_output_reload_class): Ditto.
1519 * config/i386/i386.md (fix_trunc<mode>_i387_fisttp): Change "=&1f"
1520 clobber constraint to "=&f".
1521 (fix_truncdi_i387): Ditto.
1522 (lrintxfdi2): Ditto.
1523 (fistdi2_<rounding>): Ditto.
1524 (fpremxf4_i387): Change "=u" constraint to "=f".
1525 (fprem1xf4_i387): Ditto.
1527 (fptanxf4_i387): Ditto.
1528 (fxtractxf3_i387): Ditto.
1529 (fscalexf4_i387): Ditto.
1530 (atan2xf3): Change "u" constraint to "f".
1531 (fyl2xxf3_i387): Ditto.
1532 (fyl2xp1xf3_i387): Ditto.
1534 2018-09-26 Uros Bizjak <ubizjak@gmail.com>
1537 * config/i386/i386.h (NUM_MODES_FOR_MODE_SWITCHING): Update
1538 for removed I387_MASK_PM entity.
1541 2018-09-26 Jeff Law <law@redhat.com>
1543 2018-09-26 Alexey Neyman <stilor@att.net>
1545 * graphite.h: Include <isl/id.h> and <isl/space.h>; these
1546 headers are no longer pulled in by <isl/val.h>.
1548 2018-09-26 Richard Biener <rguenther@suse.de>
1551 * dwarf2out.c (gen_lexical_block_die): Do not equate inline
1552 or concrete instance DIE to the tree. Create abstract origin
1553 attributes also for concrete instances.
1555 2018-09-26 Alexey Neyman <stilor@att.net>
1557 * graphite.h: Include <isl/id.h> and <isl/space.h>; these
1558 headers are no longer pulled in by <isl/val.h>.
1560 2018-09-26 Matthew Malcomson <matthew.malcomson@arm.com>
1562 * config/arm/arm.c (arm_split_compare_and_swap, arm_split_atomic_op):
1563 Use new helper functions.
1564 * config/arm/sync.md (atomic_load<mode>, atomic_store<mode>):
1565 Use new helper functions.
1566 * config/arm/aarch-common-protos.h (aarch_mm_needs_acquire,
1567 aarch_mm_needs_release): New declarations.
1568 * config/arm/aarch-common.c (aarch_mm_needs_acquire,
1569 aarch_mm_needs_release): New.
1571 2018-09-26 Eric Botcazou <ebotcazou@adacore.com>
1573 * config/arm/arm.c (arm_reorg): Skip Thumb reorg pass for thunks.
1574 (arm32_output_mi_thunk): Deal with long calls.
1576 2018-09-26 Richard Biener <rguenther@suse.de>
1580 * tree-inline.c (expand_call_inline): When the location
1581 of the call is UNKNOWN_LOCATION use DECL_SOURCE_LOCATION
1582 or BUILTINS_LOCATION for the BLOCK_SOURCE_LOCATION of
1583 the inserted BLOCK to make inlined_function_outer_scope_p
1585 * dwarf2out.c (add_call_src_coords_attributes): Do not add
1586 coords for reserved locations.
1588 2018-09-25 Segher Boessenkool <segher@kernel.crashing.org>
1590 * config/rs6000/rs6000.md (*movcc_internal1): Use set_attr_alternative.
1591 (*call_indirect_nonlocal_sysv<mode>): Ditto.
1592 (*call_value_indirect_nonlocal_sysv<mode>): Ditto.
1593 (*sibcall_nonlocal_sysv<mode>): Ditto.
1594 (*sibcall_value_nonlocal_sysv<mode>): Ditto.
1595 (<bd>_<mode>): Ditto.
1596 (<bd>tf_<mode>): Ditto.
1598 2018-09-25 Segher Boessenkool <segher@kernel.crashing.org>
1600 * config/rs6000/altivec.md (*altivec_mov<mode>): Write the output
1601 control string as a list of templates instead of as C code.
1602 (*altivec_movti): Ditto.
1603 * config/rs6000/darwin.md (movdf_low_di): Ditto.
1605 2018-09-25 Jim Wilson <jimw@sifive.com>
1607 * config/riscv/riscv.c (riscv_split_symbol): Mark auipc label as weak
1608 when target symbol is weak.
1610 2018-09-25 Bernd Edlinger <bernd.edlinger@hotmail.de>
1613 * builtins.c (unterminated_array): Simplify.
1614 * expr.c (string_constant): Handle SSA_NAME. Add more exceptions
1615 where pointer arithmetic is safe.
1617 2018-09-25 Segher Boessenkool <segher@kernel.crashing.org>
1620 * config/rs6000/altivec.md (altivec_vspltb): Use
1621 const_0_to_15_operand instead of u5bit_cint_operand.
1622 (*altivec_vspltb_internal): Ditto.
1623 (altivec_vspltb_direct): Ditto.
1624 (altivec_vsplth): Use const_0_to_7_operand instead of
1626 (*altivec_vsplth_internal): Ditto.
1627 (altivec_vsplth_direct): Ditto.
1628 (altivec_vspltw): Use const_0_to_3_operand instead of
1630 (*altivec_vspltw_internal): Ditto.
1631 (altivec_vspltw_direct): Ditto.
1632 (altivec_vspltsf): Ditto.
1633 (*altivec_vspltsf_internal): Ditto.
1634 * config/rs6000/rs6000.c (rs6000_expand_binop_builtin): Handle the
1635 various splats with the proper size immediate. Reorder the various
1636 cases by ascending size of immediate, and put all such together.
1638 2018-09-25 Richard Biener <rguenther@suse.de>
1641 * dwarf2out.c (add_AT_external_die_ref): Remove now redundant
1643 (maybe_create_die_with_external_ref): Do not create
1644 DW_TAG_imported_unit here.
1645 (add_abstract_origin_attribute): Handle external BLOCK refs.
1646 (dwarf2out_abstract_function): Simplify LTO case.
1647 (dwarf2out_early_finish): Create DW_TAG_imported_unit explicitely
1648 rather than using maybe_create_die_with_external_ref.
1650 2018-09-25 Uros Bizjak <ubizjak@gmail.com>
1653 * config/i386/i386.md (frndintxf2_mask_pm): Remove.
1654 (frndintxf2_mask_pm_i387): Ditto.
1655 (nearbyintxf2): Rewrite expander pattern to match rintxf2.
1656 Enable for !flag_trapping_math.
1657 (nearbyint<mode>2): Enable x87 modes for !flag_trapping_math.
1658 Enable SSE modes for TARGET_SSE4_1 and expand them with round insn.
1659 Change operand 1 predicate to nonimmediate_operand.
1660 (attr "i387_cw"): Remove mask_pm.
1661 * config/i386/i386.h (enum ix86_stack_slot): Remove SLOT_CW_MASK_PM.
1662 (enum ix86_entity): Remove I387_MASK_PM.
1663 * config/i386/i386.c (ix86_i387_mode_needed): Do not
1664 handle I387_MASK_PM.
1665 (ix86_mode_needed): Ditto.
1666 (ix86_mode_after): Ditto.
1667 (ix86_mode_entry): Ditto.
1668 (ix86_mode_exit): Ditto.
1669 (emit_i387_cw_initialization): Do not handle I387_CW_MASK_PM.
1671 2018-09-25 Jakub Jelinek <jakub@redhat.com>
1673 * vr-values.c (vr_values::vr_values): Initialize to_remove_edges and
1674 to_update_switch_stmts to vNULL instead of calling create on them
1677 2018-09-25 Richard Biener <rguenther@suse.de>
1679 PR tree-optimization/87402
1680 * tree-ssa-sccvn.c (SSA_VISITED): Remove unused function.
1681 (visit_phi): Re-instantiate handling of supposed to be VARYING
1682 but non-VARYING backedge value.
1684 2018-09-25 Richard Biener <rguenther@suse.de>
1687 * dwarf2out.c (struct sym_off_pair): New.
1688 (external_die_map): New global.
1689 (lookup_decl_die): When in LTO create DIEs lazily from the
1691 (lookup_block_die): New function, create DIEs lazily in LTO.
1692 (equate_block_to_die): New function.
1693 (dwarf2out_die_ref_for_decl): During WPA get the association
1694 from the external DIE map.
1695 (dwarf2out_register_external_die): Record mapping into the
1697 (maybe_create_die_with_external_ref): New function split out from
1698 DIE generation part of old dwarf2out_register_external_die.
1699 (add_abstract_origin_attribute): Do not return the DIE. When
1700 in LTO reference externals directly.
1701 (dwarf2out_abstract_function): When in LTO ignore calls for
1702 decls with external DIEs (already present abstract instances).
1703 (gen_call_site_die): Adjust.
1704 (add_high_low_attributes): Likewise.
1705 (gen_lexical_block_die): Likewise.
1706 (gen_inlined_subroutine_die): Likewie.
1707 (gen_block_die): Likewise.
1708 (dwarf2out_inline_entry): Likewise.
1709 (dwarf2out_early_finish): In LTRANS phase create DW_TAG_imported_unit
1712 2018-09-25 Martin Liska <mliska@suse.cz>
1714 * ipa-fnsummary.c (estimate_node_size_and_time): Scale by two
1715 integers and not by a float value.
1717 2018-09-25 Martin Liska <mliska@suse.cz>
1720 * dbgcnt.c (dbg_cnt_process_single_pair): Return false
1722 * dumpfile.c (dump_enable_all): Remove extra parenthesis.
1723 * gcov-tool.c: Declare the function with ATTRIBUTE_NORETURN.
1724 * godump.c (go_format_type): Remove extra parenthesis.
1726 2018-09-25 Martin Liska <mliska@suse.cz>
1728 * alias.c (set_dest_equal_p): Remove unused function.
1729 * config/i386/i386.c (def_builtin_pure2): Likewise.
1730 * diagnostic-show-locus.c (class layout): Remove
1732 (layout::layout): Likewise here.
1733 * dump-context.h (class temp_dump_context): Likewise.
1734 * dwarf2out.c (add_AT_fde_ref): Remove unused function.
1735 (add_AT_loclistsptr): Likewise.
1736 (add_AT_offset): Likewise.
1737 (get_AT_hi_pc): Likewise.
1738 (is_comdat_die): Likewise.
1739 (type_is_enum): Likewise.
1740 (ceiling): Likewise.
1741 (add_AT_vms_delta): Likewise.
1742 (is_class_die): Likewise.
1743 * edit-context.c (class line_event): Remove unused field.
1744 * graphite-sese-to-poly.c (tree_int_to_gmp): Remove
1746 * ipa-cp.c (ipa_get_vr_lat): Likewise.
1747 * lra-constraints.c (ok_for_index_p_nonstrict): Likewise.
1748 (ok_for_base_p_nonstrict): Likewise.
1749 * tree-chrec.c (is_not_constant_evolution): Likewise.
1750 (chrec_fold_poly_cst): Likewise.
1751 * tree-if-conv.c (has_pred_critical_p): Likewise.
1752 * tree-ssa-coalesce.c (print_exprs): Likewise.
1753 * tree-ssa-pre.c (bitmap_set_contains_expr): Likewise.
1754 * tree-ssa-uninit.c (is_and_or_or_p): Likewise.
1755 * tree-vrp.c (value_ranges_intersect_p): Likewise.
1756 (value_range_nonnegative_p): Likewise.
1758 2018-09-25 Martin Liska <mliska@suse.cz>
1760 * config/powerpcspe/powerpcspe.c (rs6000_output_function_epilogue):
1761 Do not handle "GNU Pascal".
1762 * config/rs6000/rs6000.c (rs6000_output_function_epilogue):
1764 * config/sparc/sparc.c (sparc_pass_by_reference): Remove Pascal
1765 from documentation. Likewise.
1766 * dbxout.c (dbxout_range_type): Likewise.
1767 * doc/cpp.texi: Likewise.
1768 * doc/extend.texi: Likewise.
1769 * doc/frontends.texi: Likewise.
1770 * doc/invoke.texi: Remove Pascal entry.
1771 * tree.def (CLEANUP_POINT_EXPR): Likewise.
1772 * doc/rtl.texi (MODE_FUNCTION): Remove not used entry.
1774 2018-09-25 Martin Liska <mliska@suse.cz>
1777 * doc/invoke.texi: Document all parameters and remove default
1780 2018-09-25 Ilya Leoshkevich <iii@linux.ibm.com>
1783 * rtl.c (rtx_code_size): Take into account that EQ_ATTR_ALT
1784 contains HOST_WIDE_INTs when computing its size.
1786 2018-09-24 Jim Wilson <jimw@sifive.com>
1789 * config/riscv/riscv.h (STACK_BOUNDARY): Test riscv_abi == ABI_ILP32E
1791 (ABI_STACK_BOUNDARY, MAX_ARGS_IN_REGISTERS): Likewise.
1793 2018-09-24 Andrew Pinski <apinski@marvell.com>
1795 * config/aarch64/aarch64.c (aarch_macro_fusion_pair_p): Don't
1796 access prev before checking it for NULLness in the
1797 AARCH64_FUSE_CMP_BRANCH case.
1799 2018-09-24 H.J. Lu <hongjiu.lu@intel.com>
1802 * config/i386/i386.c (rest_of_insert_endbranch): Set
1803 endbr_queued_at_entrance to true and don't insert ENDBR if
1804 x86_function_profiler will be called.
1805 (x86_function_profiler): Insert ENDBR if endbr_queued_at_entrance
1807 * config/i386/i386.h (machine_function): Add
1808 endbr_queued_at_entrance.
1810 2018-09-24 Ilya Leoshkevich <iii@linux.ibm.com>
1812 * genattrtab.c (mk_attr_alt): Use alternative_mask.
1813 (attr_rtx_1): Adjust caching to match the new EQ_ATTR_ALT field
1815 (check_attr_test): Use alternative_mask.
1816 (get_attr_value): Likewise.
1817 (compute_alternative_mask): Use alternative_mask and XWINT.
1818 (make_alternative_compare): Use alternative_mask.
1819 (attr_alt_subset_p): Use XWINT.
1820 (attr_alt_subset_of_compl_p): Likewise.
1821 (attr_alt_intersection): Use alternative_mask and XWINT.
1822 (attr_alt_union): Likewise.
1823 (attr_alt_complement): Use HOST_WIDE_INT and XWINT.
1824 (mk_attr_alt): Use alternative_mask and HOST_WIDE_INT.
1825 (simplify_test_exp): Use alternative_mask and XWINT.
1826 (write_test_expr): Use alternative_mask and XWINT, adjust bit
1827 number calculation to support 64 bits. Generate code that
1828 checks 64-bit masks.
1829 (main): Use alternative_mask.
1830 * rtl.def (EQ_ATTR_ALT): Change field types from ii to ww.
1832 2018-09-24 Ilya Leoshkevich <iii@linux.ibm.com>
1835 * config/s390/s390.c (s390_emit_epilogue): Do not use PARALLEL
1836 RETURN+USE when returning via %r14.
1838 2018-09-24 Martin Liska <mliska@suse.cz>
1840 * gcov.c (output_lines): Print colorization legend
1841 for both flag_use_colors and flag_use_hotness_colors.
1844 2018-09-24 Martin Liska <mliska@suse.cz>
1846 * coverage.c (get_coverage_counts): Use warning_at
1847 with current_function_decl location. Use %qD in warning
1850 2018-09-24 Martin Liska <mliska@suse.cz>
1852 * memory-block.h (memory_block_pool::release): Annotate with
1853 valgrind that the memory is not accessible.
1855 2018-09-24 Martin Liska <mliska@suse.cz>
1858 * asan.c: Make asan_handled_variables extern.
1860 * cfgexpand.c (expand_stack_vars): Make sure
1861 a representative is unpoison if another
1862 variable in the partition is handled by
1863 use-after-scope sanitization.
1865 2018-09-24 Richard Biener <rguenther@suse.de>
1867 PR tree-optimization/63155
1868 * tree-ssa-propagate.c (add_ssa_edge): Avoid adding PHIs to
1869 the worklist when the edge of the respective argument isn't
1872 2018-09-23 Uros Bizjak <ubizjak@gmail.com>
1874 * config/i386/i386.h (enum reg_class): Rename MASK_REGS to
1875 ALL_MASK_REGS and MASK_EVEX_REGS to MASK_REGS.
1876 (MASK_CLASS_P): Update for rename.
1877 (MAYBE_MASK_CLASS_P): Ditto.
1878 (REG_CLASS_NAMES): Update.
1879 (REG_CLASS_CONTENT): Update.
1880 * config/i386/i386.c (regclass_map): Update for MASK_REG
1881 and ALL_MASK_REGS rename.
1882 * config/i386/constraints.md (Yk): Update for rename.
1885 2018-09-23 Uros Bizjak <ubizjak@gmail.com>
1887 * config/i386/i386.h (enum reg_class): Remove
1888 EVEX_SSE_REGS and MOD4_SSE_REGS.
1889 (REG_CLASS_NAMES): Update.
1890 (REG_CLASS_CONTENT): Update.
1891 * config/i386/i386.c (regclass_map): Declare AVX-512 SSE
1892 registers as ALL_SSE_REGS.
1893 (ix86_additional_allocno_class_p): Remove.
1894 (TARGET_ADDITIONAL_ALLOCNO_CLASS_P): Remove.
1895 (ix86_register_priority): Lower priority of EVEX SSE registers.
1896 Use IN_RANGE macro where appropriate.
1897 (ix86_hard_regno_mode_ok): Merge AVX-5124FMAPS and
1898 AVX-5124VNNIW checks.
1899 (ix86_modes_tieable_p): Tie 512-bit SSE modes.
1900 * config/i386/sse.md (avx5124fmaddps_4fmaddps)
1901 (avx5124fmaddps_4fmaddps_mask, avx5124fmaddps_4fmaddps_maskz)
1902 (avx5124fmaddps_4fmaddss, avx5124fmaddps_4fmaddss_mask)
1903 (avx5124fmaddps_4fmaddss_maskz, avx5124fmaddps_4fnmaddps)
1904 (avx5124fmaddps_4fnmaddps_mask, avx5124fmaddps_4fnmaddps_maskz)
1905 (avx5124fmaddps_4fnmaddss, avx5124fmaddps_4fnmaddss_mask)
1906 (avx5124fmaddps_4fnmaddss_maskz, avx5124vnniw_vp4dpwssd)
1907 (avx5124vnniw_vp4dpwssd_mask, avx5124vnniw_vp4dpwssd_maskz)
1908 (avx5124vnniw_vp4dpwssds, avx5124vnniw_vp4dpwssds_mask)
1909 (avx5124vnniw_vp4dpwssds_maskz): Use "v" instead of "Yh" constraint.
1910 * config/i386/constraints.md (Yh): Remove.
1912 2018-09-23 Uros Bizjak <ubizjak@gmail.com>
1914 * config/i386/i386.c (regclass_map): Declare integer REX registers
1917 2018-09-23 Gerald Pfeifer <gerald@pfeifer.com>
1919 * doc/service.texi (Service): Switch the fsf.org link to https.
1921 2018-09-22 Chung-Ju Wu <jasonwucj@gmail.com>
1924 * config/nds32/nds32.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
1925 Define to speculation_safe_value_not_needed.
1927 2018-09-21 Florian Weimer <fweimer@redhat.com>
1930 * doc/extend.texi (Common Function Attributes): Mention that
1931 noreturn suppresses tail call optimization.
1933 2018-09-21 Jeff Law <law@redhat.com>
1935 * gimple-ssa-evrp.c (evrp_dom_walker::cleanup): Call
1936 vr_values::cleanup_edges_and_switches.
1937 * tree-vrp.c (to_remove_edges, to_update_switch_stmts): Moved into
1939 (identify_jump_threads): Remove EDGE_IGNORE handling.
1940 (execute_vrp): Move handling of to_remove_edges and
1941 to_update_switch_stmts into vr_values class member functions.
1942 * tree-vrp.h (switch_update, to_remove_edges): Remove declarations.
1943 (to_update_switch_stmts): Likewise.
1944 * vr-values.c: Include cfghooks.h.
1945 (vr_values::vr_values): Initialize to_remove_edges and
1946 to_update_switch_stmts.
1947 (vr_values::~vr_values): Verify to_remove_edges and
1948 to_update_switch_stmts are empty.
1949 (vr_values::simplify_switch_using_ranges): Set EDGE_IGNORE as needed.
1950 (vr_values::cleanup_edges_and_switches): New member function.
1951 * vr-values.h (vr_values): Add cleanup_edges_and_switches member
1952 function. Add new data members.
1954 2018-09-21 David Malcolm <dmalcolm@redhat.com>
1956 PR tree-optimization/87309
1957 * dumpfile.c (dump_context::begin_scope): Filter the dump_loc
1958 calls with pflags and alt_flags.
1959 (selftest::test_capture_of_dump_calls): Add test of interaction of
1960 MSG_OPTIMIZED_LOCATIONS with AUTO_DUMP_SCOPE.
1962 2018-09-21 Olivier Hainque <hainque@adacore.com>
1964 * config.gcc: Factorize and comment inclusion of vxworks-dummy.h.
1966 2018-09-21 Olivier Hainque <hainque@adacore.com>
1968 * config/vxworks.h (CLEAR_INSN_CACHE): #define to 1.
1970 2018-09-21 Olivier Hainque <hainque@adacore.com>
1972 * config/vxworks.h (VXWORKS_LIBGCC_SPEC): Remove -lc_internal.
1973 Merge block comment with the one ahead of VXWORKS_LIBS_RTP. Then:
1974 (VXWORKS_LIBS_RTP): Minor reordering.
1976 2018-09-21 Olivier Hainque <hainque@adacore.com>
1978 * config/vxworks.h (STARTFILE_PREFIX_SPEC): Define.
1979 (VXWORKS_LIBS_DIR_RTP): Remove definition and use.
1981 2018-09-21 Olivier Hainque <hainque@adacore.com>
1983 * config/vxworks.h (SIZE_TYPE): Account for TARGET_VXWORKS64.
1984 (PTRDIFF_TYPE): Likewise.
1986 2018-09-21 Olivier Hainque <hainque@adacore.com>
1988 * config.gcc: Enforce def of TARGET_VXWORKS64 to 1 from
1989 triplet, similar to support for VxWorks7.
1990 * config/vxworks-dummy.h: Provide a default definition
1991 of TARGET_VXWORKS64 to 0.
1993 2018-09-21 Olivier Hainque <hainque@adacore.com>
1995 * config/vxworks.h (TARGET_VXWORKS7): Move default definition ...
1996 * config/vxworks-dummy.h: here.
1998 2018-09-21 Olivier Hainque <hainque@adacore.com>
2000 * config.gcc: Prepend vxworks-dummy.h to tm_file for powerpc*
2002 2018-09-21 Shaokun Zhang <zhangshaokun@hisilicon.com>
2003 Bo Zhou <zbo.zhou@hisilicon.com>
2005 * config/aarch64/aarch64-cores.def (tsv110): New CPU.
2006 * config/aarch64/aarch64-tune.md: Regenerated.
2007 * doc/invoke.texi (AArch64 Options/-mtune): Add "tsv110".
2008 * config/aarch64/aarch64.c (tsv110_tunings): New tuning table.
2009 * config/aarch64/aarch64-cost-tables.h: Add "tsv110" extra costs.
2011 2018-09-21 Andrew Stubbs <ams@codesourcery.com>
2012 Julian Brown <julian@codesourcery.com>
2014 * builtins.c (get_builtin_sync_mem): Handle address spaces.
2016 2018-09-21 Eric Botcazou <ebotcazou@adacore.com>
2018 * config/rs6000/rs6000.c (rs6000_function_ok_for_sibcall): Return false
2019 if the call takes a static chain.
2021 2018-09-21 Martin Liska <mliska@suse.cz>
2023 * auto-profile.c (autofdo_source_profile::read): Do not
2025 (read_profile): Do not add working sets.
2026 (read_autofdo_file): Remove sum_all.
2027 (afdo_callsite_hot_enough_for_early_inline): Remove const
2029 * coverage.c (struct counts_entry): Remove gcov_summary.
2030 (read_counts_file): Read new GCOV_TAG_OBJECT_SUMMARY,
2031 do not support GCOV_TAG_PROGRAM_SUMMARY.
2032 (get_coverage_counts): Remove summary and expected
2034 * coverage.h (get_coverage_counts): Likewise.
2035 * doc/gcov-dump.texi: Remove -w option.
2036 * gcov-dump.c (dump_working_sets): Remove.
2037 (main): Do not support '-w' option.
2038 (print_usage): Likewise.
2039 (tag_summary): Likewise.
2040 * gcov-io.c (gcov_write_summary): Do not dump
2042 (gcov_read_summary): Likewise.
2043 (gcov_histo_index): Remove.
2044 (gcov_histogram_merge): Likewise.
2045 (compute_working_sets): Likewise.
2046 * gcov-io.h (GCOV_TAG_OBJECT_SUMMARY): Mark
2048 (GCOV_TAG_PROGRAM_SUMMARY): Mark it obsolete.
2049 (GCOV_TAG_SUMMARY_LENGTH): Adjust.
2050 (GCOV_HISTOGRAM_SIZE): Remove.
2051 (GCOV_HISTOGRAM_BITVECTOR_SIZE): Likewise.
2052 (struct gcov_summary): Simplify rapidly just
2053 to runs and sum_max fields.
2054 (gcov_histo_index): Remove.
2055 (NUM_GCOV_WORKING_SETS): Likewise.
2056 (compute_working_sets): Likewise.
2057 * gcov-tool.c (print_overlap_usage_message): Remove
2058 trailing empty line.
2059 * gcov.c (read_count_file): Read GCOV_TAG_OBJECT_SUMMARY.
2060 (output_lines): Remove program related line.
2061 * ipa-profile.c (ipa_profile): Do not consider GCOV histogram.
2062 * lto-cgraph.c (output_profile_summary): Do not stream GCOV
2064 (input_profile_summary): Do not read it.
2065 (merge_profile_summaries): And do not merge it.
2066 (input_symtab): Do not call removed function.
2067 * modulo-sched.c (sms_schedule): Do not print sum_max.
2068 * params.def (HOT_BB_COUNT_FRACTION): Reincarnate param that was
2069 removed when histogram method was invented.
2070 (HOT_BB_COUNT_WS_PERMILLE): Mention that it's used only in LTO
2072 * postreload-gcse.c (eliminate_partially_redundant_load): Fix
2074 * predict.c (get_hot_bb_threshold): Use HOT_BB_COUNT_FRACTION
2075 and dump selected value.
2076 * profile.c (add_working_set): Remove.
2077 (get_working_sets): Likewise.
2078 (find_working_set): Likewise.
2079 (get_exec_counts): Do not work with working sets.
2080 (read_profile_edge_counts): Do not inform as sum_max is removed.
2081 (compute_branch_probabilities): Likewise.
2082 (compute_value_histograms): Remove argument for call of
2083 get_coverage_counts.
2084 * profile.h: Do not make gcov_summary const.
2086 2018-09-21 Monk Chiang <sh.chiang04@gmail.com>
2088 * config.gcc (nds32*-*-*): Set TARGET_DEFAULT_TLSDESC_TRAMPOLINE=0.
2090 2018-09-21 Eric Botcazou <ebotcazou@adacore.com>
2092 PR tree-optimization/86990
2093 * gimple-ssa-store-merging.c (imm_store_chain_info:coalesce_immediate):
2094 Check that the entire merged store group is made of constants only for
2097 2018-09-20 Allan Sandfeld Jensen <allan.jensen@qt.io>
2099 * gcc.c (LINK_COMMAND_SPEC): Handle -r like -nostdlib.
2100 (VTABLE_VERIFICATION_SPEC): Likewise.
2101 (SANITIZER_EARLY_SPEC): Likewise.
2102 (SANITIZER_SPEC): Likewise.
2103 * config/darwin.h (LINK_COMMAND_SPEC): Likewise.
2104 * doc/invoke.texi (Link Options): Document -r.
2106 2018-09-20 Richard Biener <rguenther@suse.de>
2109 * gimplify.c (gimplify_expr): Retain alignment of
2110 addressable lvalue in dereference.
2112 2018-09-20 Alexandre Oliva <aoliva@redhat.com>
2115 * configure.ac: Check for .loc is_stmt support.
2116 * configure, config.in: Rebuilt.
2117 * dwarf2out.c (dwarf2out_source_line): Skip is_stmt
2120 2018-09-20 Segher Boessenkool <segher@kernel.crashing.org>
2122 * config/rs6000/rs6000.opt (misel=no, misel=yes): Delete.
2123 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -misel=yes and
2126 2018-09-20 Segher Boessenkool <segher@kernel.crashing.org>
2128 * config/rs6000/rs6000-opts.h (enum rs6000_vector): Delete
2130 * config/rs6000/rs6000.c (rs6000_debug_vector_unit): Delete
2133 2018-09-20 Marek Polacek <polacek@redhat.com>
2135 * doc/invoke.texi: Add -Wno-init-list-lifetime to C++ Language Options.
2137 2018-09-20 Richard Sandiford <richard.sandiford@arm.com>
2139 PR tree-optimization/87288
2140 * tree-vect-loop.c (vect_analyze_loop_2): Take PEELING_FOR_GAPS
2141 into account when determining PEELING_FOR_NITERS.
2143 2018-09-20 Richard Sandiford <richard.sandiford@arm.com>
2145 PR tree-optimization/86877
2146 * tree-vect-loop.c (vect_analyze_loop_2): Call
2147 vect_verify_datarefs_alignment.
2149 2018-09-19 Marek Polacek <polacek@redhat.com>
2151 * doc/invoke.texi: Document -Wclass-conversion.
2153 2018-09-19 John David Anglin <danglin@gcc.gnu.org>
2155 * config/pa/pa.c (pa_adjust_priority): Delete.
2156 (TARGET_SCHED_ADJUST_PRIORITY): Delete define.
2158 * config/pa/pa.md (atomic_storeqi): Restore deleted expander.
2159 (atomic_storehi): Likewise.
2160 (atomic_storesi): Likewise.
2161 (atomic_loaddi): Restore compare and swap exchange loop code.
2163 2018-09-19 Segher Boessenkool <segher@kernel.crashing.org>
2165 PR rtl-optimization/86902
2166 * combine.c (try_combine): When changing the CC mode used, don't change
2167 an unrelated mode in other_insn to that new CC mode.
2169 2018-09-19 David Malcolm <dmalcolm@redhat.com>
2171 * tree-data-ref.c (runtime_alias_check_p): Use formatted printing
2172 with %T in place of calls to dump_generic_expr.
2173 (prune_runtime_alias_test_list): Likewise.
2174 (create_runtime_alias_checks): Likewise.
2175 * tree-vect-data-refs.c (vect_check_nonzero_value): Likewise.
2176 (vect_analyze_data_ref_dependence): Likewise.
2177 (vect_slp_analyze_data_ref_dependence): Likewise.
2178 (vect_record_base_alignment): Likewise. Use %G in place of call
2179 to dump_gimple_stmt.
2180 (vect_compute_data_ref_alignment): Likewise.
2181 (verify_data_ref_alignment): Likewise.
2182 (vect_find_same_alignment_drs): Likewise.
2183 (vect_analyze_group_access_1): Likewise.
2184 (vect_analyze_data_ref_accesses): Likewise.
2185 (dependence_distance_ge_vf): Likewise.
2186 (dump_lower_bound): Likewise.
2187 (vect_prune_runtime_alias_test_list): Likewise.
2188 (vect_find_stmt_data_reference): Likewise.
2189 (vect_analyze_data_refs): Likewise.
2190 (vect_create_addr_base_for_vector_ref): Likewise.
2191 (vect_create_data_ref_ptr): Likewise.
2192 * tree-vect-loop-manip.c (vect_set_loop_condition): Likewise.
2193 (vect_can_advance_ivs_p): Likewise.
2194 (vect_update_ivs_after_vectorizer): Likewise.
2195 (vect_gen_prolog_loop_niters): Likewise.
2196 (vect_prepare_for_masked_peels): Likewise.
2197 * tree-vect-loop.c (vect_determine_vf_for_stmt): Likewise.
2198 (vect_determine_vectorization_factor): Likewise.
2199 (vect_is_simple_iv_evolution): Likewise.
2200 (vect_analyze_scalar_cycles_1): Likewise.
2201 (vect_analyze_loop_operations): Likewise.
2202 (report_vect_op): Likewise.
2203 (vect_is_slp_reduction): Likewise.
2204 (check_reduction_path): Likewise.
2205 (vect_is_simple_reduction): Likewise.
2206 (vect_create_epilog_for_reduction): Likewise.
2207 (vect_finalize_reduction:): Likewise.
2208 (vectorizable_induction): Likewise.
2209 (vect_transform_loop_stmt): Likewise.
2210 (vect_transform_loop): Likewise.
2211 (optimize_mask_stores): Likewise.
2212 * tree-vect-patterns.c (vect_pattern_detected): Likewise.
2213 (vect_split_statement): Likewise.
2214 (vect_recog_over_widening_pattern): Likewise.
2215 (vect_recog_average_pattern): Likewise.
2216 (vect_determine_min_output_precision_1): Likewise.
2217 (vect_determine_precisions_from_range): Likewise.
2218 (vect_determine_precisions_from_users): Likewise.
2219 (vect_mark_pattern_stmts): Likewise.
2220 (vect_pattern_recog_1): Likewise.
2221 * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
2222 (vect_record_max_nunits): Likewise.
2223 (vect_build_slp_tree_1): Likewise.
2224 (vect_build_slp_tree_2): Likewise.
2225 (vect_print_slp_tree): Likewise.
2226 (vect_analyze_slp_instance): Likewise.
2227 (vect_detect_hybrid_slp_stmts): Likewise.
2228 (vect_detect_hybrid_slp_1): Likewise.
2229 (vect_slp_analyze_operations): Likewise.
2230 (vect_slp_analyze_bb_1): Likewise.
2231 (vect_transform_slp_perm_load): Likewise.
2232 (vect_schedule_slp_instance): Likewise.
2233 * tree-vect-stmts.c (vect_mark_relevant): Likewise.
2234 (vect_mark_stmts_to_be_vectorized): Likewise.
2235 (vect_init_vector_1): Likewise.
2236 (vect_get_vec_def_for_operand): Likewise.
2237 (vect_finish_stmt_generation_1): Likewise.
2238 (vect_check_load_store_mask): Likewise.
2239 (vectorizable_call): Likewise.
2240 (vectorizable_conversion): Likewise.
2241 (vectorizable_operation): Likewise.
2242 (vectorizable_load): Likewise.
2243 (vect_analyze_stmt): Likewise.
2244 (vect_is_simple_use): Likewise.
2245 (vect_get_vector_types_for_stmt): Likewise.
2246 (vect_get_mask_type_for_stmt): Likewise.
2247 * tree-vectorizer.c (increase_alignment): Likewise.
2249 2018-09-19 Andrew Stubbs <ams@codesourcery.com>
2251 * doc/rtl.texi: Adjust vec_select description.
2252 * simplify-rtx.c (simplify_binary_operation_1): Allow VEC_SELECT to use
2253 non-constant selectors.
2255 2018-09-19 Matthew Malcomson <matthew.malcomson@arm.com>
2257 * config/aarch64/aarch64-protos.h
2258 (aarch64_offset_9bit_signed_unscaled_p): New declaration.
2259 * config/aarch64/aarch64.md (arches): New "rcpc8_4" attribute value.
2260 (arch_enabled): Add check for "rcpc8_4" attribute value of "arch".
2261 * config/aarch64/aarch64.h (AARCH64_FL_RCPC8_4): New bitfield.
2262 (AARCH64_FL_FOR_ARCH8_4): Include AARCH64_FL_RCPC8_4.
2263 (AARCH64_FL_PROFILE): Move index so flags are ordered.
2264 (AARCH64_ISA_RCPC8_4): New flag.
2265 * config/aarch64/aarch64.c (offset_9bit_signed_unscaled_p): Renamed
2266 to aarch64_offset_9bit_signed_unscaled_p.
2267 * config/aarch64/atomics.md (atomic_store<mode>): Allow offset
2269 * config/aarch64/constraints.md (Ust): New constraint.
2270 * config/aarch64/predicates.md.
2271 (aarch64_9bit_offset_memory_operand): New predicate.
2272 (aarch64_rcpc_memory_operand): New predicate.
2274 2018-09-19 Eric Botcazou <ebotcazou@adacore.com>
2276 PR rtl-optimization/87361
2277 * rtlanal.c (nonzero_bits1): Revert accidental change.
2279 2018-09-19 Richard Biener <rguenther@suse.de>
2281 PR tree-optimization/87349
2282 PR tree-optimization/87342
2283 * tree-ssa-sccvn.c (do_rpo_vn): Iterate max_rpo computation.
2285 2018-09-18 Marek Polacek <polacek@redhat.com>
2287 P1064R0 - Allowing Virtual Function Calls in Constant Expressions
2288 * gimple-fold.c (gimple_get_virt_method_for_vtable): Adjust assert.
2290 2018-09-18 Segher Boessenkool <segher@kernel.crashing.org>
2292 * config/rs6000/rs6000.md: Remove old "Cygnus sibcall" comment.
2294 2018-09-18 Segher Boessenkool <segher@kernel.crashing.org>
2296 PR rtl-optimization/86882
2297 * rtlanal.c (reg_overlap_mentioned_p): Handle CLOBBER.
2299 2018-09-18 Uros Bizjak <ubizjak@gmail.com>
2301 * config/i386/i386.md (*<code>extend<mode>xf2): Macroize insn from
2302 *<code>extendsfxf2 and *<code>extenddfxf2 using MODEF mode iterator.
2304 2018-09-18 Jonathan Wakely <jwakely@redhat.com>
2307 * doc/invoke.texi (Link Options): Fix formatting and grammar.
2309 2018-09-18 Richard Biener <rguenther@suse.de>
2312 * tree-ssa-coalesce.c (tree_int_map_hasher): Remove.
2313 (compute_samebase_partition_bases): Likewise.
2314 (coalesce_ssa_name): Always use compute_optimized_partition_bases.
2315 (gimple_can_coalesce_p): Simplify.
2317 2018-09-18 Hans-Peter Nilsson <hp@bitrange.com>
2319 Handle a library implementation of ffs calling __builtin_ffs.
2320 * config/mmix/mmix.c (TARGET_INIT_LIBFUNCS): Override with...
2321 (mmix_init_libfuncs): New function: make __builtin_ffs expand
2324 2018-09-17 David Malcolm <dmalcolm@redhat.com>
2326 * diagnostic-show-locus.c (class layout_range): Add field
2328 (layout_range::layout_range): Add "original_idx" param and use it
2329 to initialize new field.
2330 (make_range): Use 0 for original_idx.
2331 (layout::layout): Pass in index to calls to
2332 maybe_add_location_range.
2333 (layout::maybe_add_location_range): Add param "original_idx" and
2334 pass it on to layout_range.
2335 (layout::print_any_labels): Pass on range->m_original_idx to
2337 (gcc_rich_location::add_location_if_nearby): Use 0 for
2339 * gcc-rich-location.h (text_range_label::get_text): Update for new
2341 (range_label_for_type_mismatch::get_text): Likewise.
2343 2018-09-17 Uros Bizjak <ubizjak@gmail.com>
2345 * config/i386/i386.c (ix86_emit_i387_log1p): Emit fldln2 earlier.
2347 2018-09-17 David Malcolm <dmalcolm@redhat.com>
2349 * gimple-ssa-sprintf.c (fmtwarn): Update for introduction of
2350 format_string_diagnostic_t.
2351 (fmtwarn_n): Likewise.
2352 * substring-locations.c
2353 (format_string_diagnostic_t::format_string_diagnostic_t) New ctor.
2354 (format_warning_n_va): Convert to...
2355 (format_string_diagnostic_t::emit_warning_n_va): ...this.
2356 (format_warning_va): Convert to...
2357 (format_string_diagnostic_t::emit_warning_va): ...this.
2358 (format_warning_at_substring): Convert to...
2359 (format_string_diagnostic_t::emit_warning): ...this.
2360 (format_warning_at_substring_n): Convert to...
2361 (format_string_diagnostic_t::emit_warning_n): ...this.
2362 * substring-locations.h (class format_string_diagnostic_t): New
2364 (format_warning_va): Convert to
2365 format_string_diagnostic_t::emit_warning_va.
2366 (format_warning_n_va): Convert to
2367 format_string_diagnostic_t::emit_warning_n_va.
2368 (format_warning_at_substring): Convert to
2369 format_string_diagnostic_t::emit_warning.
2370 (format_warning_at_substring_n): Convert to
2371 format_string_diagnostic_t::emit_warning_n.
2373 2018-09-17 Cesar Philippidis <cesar@codesourcery.com>
2374 Bernd Schmidt <bernds_cb1@t-online.de>
2376 * config/nvptx/nvptx.md (atomic_fetch_<logic><mode>): Enable with
2379 2018-09-17 Uros Bizjak <ubizjak@gmail.com>
2381 * config/i386/i386.md (truncxf<mode>2_i387_noop_unspec): Change
2382 operand 0 predicate to nonimmediate operand.
2383 (rint<mode>2_frndint): Remove insn pattern.
2384 (rint<mode>2): Change operand 1 predicate to general_operand.
2385 Extend operand 1 to XFmode and generate rintxf2 insn.
2386 (frndintxf2_<rounding>): Rename from frndint<mode>2_<rounding>.
2387 Do not use X87MODEF mode macro.
2388 (frndintxf2_<rounding>_i387): Rename from
2389 frndint<mode>2_<rounding>_i387. Do not use X87MODEF mode macro.
2390 (<rounding_insn><mode>2): For non-SSE modes, extend operand 1
2391 to XFmode and generate significandxf3 insn.
2393 2018-09-17 Richard Biener <rguenther@suse.de>
2395 PR tree-optimization/87328
2396 * tree-ssa-sccvn.c (process_bb): Remove assertion about not
2397 visiting unexecutable backedges when not iterating.
2398 (do_rpo_vn): Mark all edges not executable even when not
2401 2018-09-17 Martin Jambor <mjambor@suse.cz>
2404 * doc/invoke.texi (Warning Options): Likewise.
2406 2018-09-17 Richard Biener <rguenther@suse.de>
2408 PR tree-optimization/87301
2409 * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_cleanup): Properly
2410 clean EH info from leftover copy assignments.
2412 2018-09-17 Martin Liska <mliska@suse.cz>
2414 PR gcov-profile/85871
2415 * gcov.c (output_intermediate_file): Fix out of bounds
2418 2018-09-17 Vineet Gupta <vgupta@synopsys.com>
2420 * config/arc/arc.c: Object attributes for core4 not reflected
2422 * config/arc/arc.h: Don't restrict DBNZ to core3 (core4 includes
2425 2018-09-17 Alexey Brodkin <abrodkin@synopsys.com>
2427 * config/arc/linux.h (LINK_EH_SPEC): Add missing space.
2429 2018-09-17 Martin Liska <mliska@suse.cz>
2431 * doc/gcov.texi: Document new option --use-hotness-colors.
2432 * gcov.c (struct source_info): Declare new field.
2433 (source_info::source_info): Set default for maximum_count.
2434 (print_usage): Add new -q option.
2435 (process_args): Process it.
2436 (accumulate_line_info): Save src->maximum_count.
2437 (output_line_beginning): Make color line number if
2438 flag_use_hotness_colors is set.
2439 (output_line_details): Pass default argument value.
2440 (output_lines): Pass src->maximum_count.
2442 2018-09-17 Martin Liska <mliska@suse.cz>
2444 * common/config/i386/i386-common.c (ix86_get_valid_option_values):
2445 Use processor_names table.
2446 * config/i386/i386.c (ix86_default_align): Use
2447 processor_cost_table for alignment values.
2448 (ix86_option_override_internal): Use processor_names.
2449 (ix86_function_specific_print): Likewise.
2450 * config/i386/i386.h (struct processor_costs):
2451 Add alignment values.
2452 (struct ptt): Remove and replace with const char *.
2453 * config/i386/x86-tune-costs.h (struct processor_costs):
2454 Declare default alignments for all costs.
2456 2018-09-17 Aldy Hernandez <aldyh@redhat.com>
2458 * tree-vrp.c (extract_range_from_unary_expr): Do not special case
2459 symbolics or VR_VARYING ranges for ABS_EXPR.
2460 * wide-int-range.cc (wide_int_range_abs): Return positive numbers
2461 when range will wrap.
2463 2018-09-15 Eric Botcazou <ebotcazou@adacore.com>
2466 * cfgexpand.c (expand_gimple_basic_block): Be prepared for a BARRIER
2467 before and after a JUMP_TABLE_DATA.
2469 2018-09-14 John David Anglin <danglin@gcc.gnu.org>
2472 * dojump.c (do_compare_and_jump): Canonicalize function pointers
2473 when one operand is a function pointer. Use POINTER_TYPE_P and
2474 FUNC_OR_METHOD_TYPE_P.
2475 * expr.c (do_store_flag): Use POINTER_TYPE_P and FUNC_OR_METHOD_TYPE_P.
2476 * fold-const.c (build_range_check): Likewise.
2477 * match.pd (simple_comparison): Likewise.
2479 2018-09-14 David Malcolm <dmalcolm@redhat.com>
2482 * spellcheck.c (get_edit_distance_cutoff): New function.
2483 (selftest::test_edit_distance_unit_test_oneway): Rename to...
2484 (selftest::test_get_edit_distance_one_way): ...this.
2485 (selftest::test_get_edit_distance_unit): Rename to...
2486 (selftest::test_get_edit_distance_both_ways): ...this.
2487 (selftest::test_edit_distances): Move tests to this new function,
2488 and test some more pairs of strings. Update for above renaming.
2489 (selftest::get_old_cutoff): New function.
2490 (selftest::test_get_edit_distance_cutoff): New function.
2491 (selftest::assert_suggested_for): New function.
2492 (ASSERT_SUGGESTED_FOR): New macro.
2493 (selftest::assert_not_suggested_for): New function.
2494 (ASSERT_NOT_SUGGESTED_FOR): New macro.
2495 (selftest::test_suggestions): New function.
2496 (selftest::spellcheck_c_tests): Move test_get_edit_distance_unit
2497 tests to selftest::test_edit_distances and call it. Add calls to
2498 selftest::test_get_edit_distance_cutoff and
2499 selftest::test_suggestions.
2500 * spellcheck.h (get_edit_distance_cutoff): New function declaration.
2501 (best_match::consider): Replace hard-coded cutoff calculation with
2503 (best_match::get_cutoff): New declaration.
2504 (best_match::get_best_meaningful_candidate): Likewise.
2506 2018-09-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
2508 * builtins.c (fold_builtin_strlen): Remove TODO comment.
2510 2018-09-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
2513 2018-07-30 Bernd Edlinger <bernd.edlinger@hotmail.de>
2515 * tree-ssa-forwprop.c (simplify_builtin_call): Don't create a not NUL
2516 terminated string literal.
2518 2018-09-14 Martin Sebor <msebor@redhat.com>
2520 * builtins.c (unterminated_array): Handle ARRAY_REF.
2521 (expand_builtin_stpcpy_1): Detect unterminated char arrays.
2522 * builtins.h (unterminated_array): Declare extern.
2523 * gimple-fold.c (gimple_fold_builtin_stpcpy): Detect unterminated
2525 (gimple_fold_builtin_sprintf): Propagate NO_WARNING to transformed
2528 2018-09-14 Martin Sebor <msebor@redhat.com>
2529 Jeff Law <law@redhat.com>
2531 * builtins.c (unterminated_array): New.
2532 (expand_builtin_strcpy): Adjust.
2533 (expand_builtin_strcpy_args): Detect unterminated arrays.
2534 * gimple-fold.c (get_maxval_strlen): Add argument. Detect
2535 unterminated arrays.
2536 * gimple-fold.h (get_maxval_strlen): Add argument.
2537 (gimple_fold_builtin_strcpy): Detec unterminated arrays.
2539 * gimple-fold.c (get_range_strlen): Add argument.
2540 (get_maxval_strlen): Adjust.
2541 * gimple-fold.h (get_range_strlen): Add argument.
2543 2018-09-14 Wei Xiao <wei3.xiao@intel.com>
2545 * config/i386/movdirintrin.h: Fix copyright year.
2547 2018-09-14 Uros Bizjak <ubizjak@gmail.com>
2549 * reg-stack.c: Include regs.h.
2550 (replace_reg): Assert that mode is MODE_FLOAT or MODE_COMPLEX_FLOAT.
2551 (emit_pop_insn): Default pop insn mode to the reg_raw_mode of
2552 FIRST_STACK_REG, not DFmode.
2553 (emit_swap_insn): Default swap insn mode to the reg_raw_mode of
2554 FIRST_STACK_REG, not XFmode. Explicitly construct swap RTX.
2555 (change stack): Default register mode to the reg_raw_mode of
2556 FIRST_STACK_REG, not DFmode.
2557 * config/i386/i386.md (*swap<mode>): Remove insn pattern.
2558 (*swapxf): Rename from swapxf.
2560 2018-09-14 Carl Love <cel@us.ibm.com>
2562 * config/rs6000/emmintrin.h: Add _MM_SHUFFLE2.
2563 * config/rs6000/xmmintrin.h: Add _MM_SHUFFLE.
2565 2018-09-14 Segher Boessenkool <segher@kernel.crashing.org>
2568 * config/rs6000/rs6000.md (*mov<mode>_hardfloat64): Add Z to the Y
2571 2018-09-14 Sam Tebbs <sam.tebbs@arm.com>
2574 * config/aarch64/aarch64.md (*aarch64_bfxilsi_uxtw): Define.
2576 2018-09-14 Jason Merrill <jason@redhat.com>
2578 Fix --enable-gather-detailed-mem-stats.
2579 * hash-table.c (hash_table_usage): Change from variable to function.
2580 * hash-table.h: Adjust.
2581 * Makefile.in: Add missing dependencies on hash-table.h.
2583 2018-09-14 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
2585 PR tree-optimization/87259
2587 (pass_cse_reciprocals::execute): Run optimize_recip_sqrt after
2588 execute_cse_reciprocals_1 has tried transforming.
2590 2018-09-14 Aldy Hernandez <aldyh@redhat.com>
2592 * tree-vrp.c (extract_range_from_binary_expr_1): Normalize
2593 VR_VARYING for PLUS/MINUS_EXPR.
2595 2018-09-14 Ilya Leoshkevich <iii@linux.ibm.com>
2597 * config/s390/s390-passes.def (INSERT_PASS_BEFORE): Improve
2600 2018-09-14 Richard Biener <rguenther@suse.de>
2603 * tree-ssa-coalesce.c (ssa_conflicts_merge): Remove conflict
2604 bits for the merged partition.
2606 2018-09-13 Martin Sebor <msebor@redhat.com>
2607 Bernd Edlinger <bernd.edlinger@hotmail.de>
2609 * builtins.h (c_srlen): Add argument.
2610 * builtins.c (warn_string_no_nul): New function.
2611 (c_strlen): Add argument and use it. Update recursive calls.
2612 Pass DECL argument to string_constant to get info on non
2613 terminated strings. Update *NONSTR as needed.
2614 (fold_builtin_strlen): Add argument to calls to c_strlen.
2615 Warn for unterminated arrays.
2616 (warn_string_no_null): Add prototype.
2617 * expr.c (string_constant): Update arguments. Update recursive
2618 calls appropriately. Detect missing NUL terminator and outermost
2619 declaration its missing in.
2620 Improve checks for arrays with nonzero lower bound or elements
2621 that are not a single byte. Simplify offset computation.
2622 Simplify checks for non-NUL terminated strings.
2623 * gimple-fold.c (get_range_strlen): Add argument to c_strlen call.
2624 * gimple-ssa-sprintf.c (get_string_length): Remove unnecessary code.
2626 2018-09-13 Bernd Edlinger <bernd.edlinger@hotmail.de>
2628 * builtins.c (c_strlen): Handle not zero terminated STRING_CSTs
2630 * fold-const.c (c_getstr): Fix function comment. Remove unused third
2631 argument. Fix range checks.
2632 * fold-const.h (c_getstr): Adjust protoype.
2633 * gimple-fold.c (gimple_fold_builtin_memory_op): Avoid folding when
2634 string is constant but contains no NUL byte.
2636 * expr.c (string_constant): Adjust function comment.
2637 Remove bogus check for zero termination.
2639 * fold-const.c (c_getstr): Clamp STRING_LENGTH to STRING_SIZE.
2641 * varasm.c (compare_constant): Compare type size of STRING_CSTs.
2642 (get_constant_size): Don't make STRING_CSTs larger than they are.
2643 (check_string_literal): New check function for STRING_CSTs.
2644 (output_constant): Use it.
2646 2018-09-13 Eric Botcazou <ebotcazou@adacore.com>
2649 * config/visium/visium.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define.
2651 2018-09-13 Richard Biener <rguenther@suse.de>
2653 PR tree-optimization/87263
2654 * tree-ssa-sccvn.c (visit_phi): Revert some earlier changes.
2655 (struct unwind_state): Add max_rpo field.
2656 (do_rpo_vn): Allow up-to-date loop state to be used when not iterating.
2657 Compute max_rpo, the max RPO number a block can be backwards reached
2658 from. Re-write non-iterating mode to a RPO ordered worklist approach,
2659 separating it from the iterating mode.
2661 2018-09-13 Vlad Lazar <vlad.lazar@arm.com>
2663 * haifa-sched.c (rank_for_schedule): Schedule by INSN_COST.
2664 (rfs_decision): New scheduling decision.
2666 2018-09-13 Richard Biener <rguenther@suse.de>
2669 * tree-ssa-sccvn.c (vn_nary_op_insert_into): Fix assert.
2670 (vn_nary_op_insert_pieces_predicated): Do not write useless
2671 valid_dominated_by_p entry outside of the allocated storage.
2673 2018-09-13 Omar Sandoval <osandov@osandov.com>
2674 Tom de Vries <tdevries@suse.de>
2677 * dwarf2out.c (is_c): New function.
2678 (add_subscript_info): Add DW_AT_count of 0 for C zero-length arrays.
2680 2018-09-13 Sam Tebbs <sam.tebbs@arm.com>
2683 * config/aarch64/aarch64.md (*aarch64_bfxil):
2685 * config/aarch64/constraints.md (Ulc): Define.
2686 * config/aarch64/aarch64-protos.h (aarch64_high_bits_all_ones_p):
2688 * config/aarch64/aarch64.c (aarch64_high_bits_all_ones_p):
2691 2018-09-13 Vlad Lazar <vlad.lazar@arm.com>
2693 * config/aarch64/aarch64.h (TARGET_COMPUTE_FRAME_LAYOUT): Define.
2694 * config/aarch64/aarch64.c (aarch64_expand_prologue): Remove
2695 aarch64_layout_frame call.
2696 (aarch64_expand_epilogue): Likewise.
2697 (aarch64_initial_elimination_offset): Likewise.
2698 (aarch64_get_separate_components): Likewise.
2699 (aarch64_use_return_insn_p): Likewise.
2700 (aarch64_layout_frame): Remove unneeded check.
2702 2018-09-13 Jakub Jelinek <jakub@redhat.com>
2704 * configure.ac: Only append
2705 " : (reconfigured) $TOPLEVEL_CONFIGURE_ARGUMENTS" to
2706 gcc_config_arguments if it was never reconfigured or last reconfigure
2707 was with different arguments.
2708 * configure: Regenerated.
2710 2018-09-13 Jakub Jelinek <jakub@redhat.com>
2711 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
2714 * expr.c (maybe_optimize_pow2p_mod_cmp): New function.
2715 (maybe_optimize_mod_cmp): Use it if integer_pow2p treeop1.
2717 2018-09-13 Jakub Jelinek <jakub@redhat.com>
2719 PR tree-optimization/87287
2720 * fold-const.c (fold_binary_loc) <case EQ_EXPR>: Move signed modulo
2721 X % C == 0 to X % (unsigned) C == 0 optimization to ...
2722 * match.pd (X % C == 0): ... here. New optimization.
2724 2018-09-12 Jakub Jelinek <jakub@redhat.com>
2727 * expr.h (maybe_optimize_mod_cmp): Declare.
2728 * expr.c (mod_inv): New function.
2729 (maybe_optimize_mod_cmp): New function.
2730 (do_store_flag): Use it.
2731 * cfgexpand.c (expand_gimple_cond): Likewise.
2733 2018-09-09 Cesar Philippidis <cesar@codesourcery.com>
2734 Julian Brown <julian@codesourcery.com>
2737 * gimplify.c (gimplify_scan_omp_clauses): Set
2738 target_firstprivatize_array_bases in OpenACC parallel and kernels
2739 region contexts. Remove GOMP_MAP_FIRSTPRIVATE_REFERENCE clauses from
2740 OpenACC data regions.
2742 2018-09-12 Uros Bizjak <ubizjak@gmail.com>
2744 * config/i386/i386.md (sqrt_extend<mode>xf3_i387): Remove.
2745 (sqrt<mode>2): Extend operand 1 to XFmode and generate sqrtxf3 insn.
2747 2018-09-12 Richard Biener <rguenther@suse.de>
2749 PR tree-optimization/87280
2750 * tree-ssa-sccvn.c (process_bb): Handle the case of executable
2751 edge but unreachable target.
2752 (do_rpo_vn): For conservatively handling a PHI only mark
2753 the backedge executable but not the block reachable.
2755 2018-09-12 Richard Biener <rguenther@suse.de>
2757 PR tree-optimization/87266
2758 * tree-ssa-sccvn.c (do_rpo_vn): Always iterate to not yet
2761 2018-09-12 Andreas Krebbel <krebbel@linux.ibm.com>
2763 * config/s390/s390.md (PFPO_RND_MODE_DFP, PFPO_RND_MODE_BFP): New
2765 ("trunc<BFP:mode><DFP_ALL:mode>2")
2766 ("trunc<DFP_ALL:mode><BFP:mode>2")
2767 ("extend<BFP:mode><DFP_ALL:mode>2")
2768 ("extend<DFP_ALL:mode><BFP:mode>2"): Set proper rounding mode
2769 according to the target operand type.
2771 2018-09-12 Jakub Jelinek <jakub@redhat.com>
2772 Andreas Krebbel <krebbel@linux.ibm.com>
2774 PR tree-optimization/86844
2775 * gimple-ssa-store-merging.c
2776 (imm_store_chain_info::coalesce_immediate): For overlapping stores, if
2777 there are any overlapping stores in between them, make sure they are
2778 also coalesced or we give up completely.
2780 2018-09-12 Jakub Jelinek <jakub@redhat.com>
2783 * fold-const.c (fold_ternary_loc) <case COND_EXPR>: Verify also that
2784 BIT_AND_EXPR's second operand is a power of two. Formatting fix.
2786 2018-09-12 Tom de Vries <tdevries@suse.de>
2788 * common.opt (gdescribe-dies): Add option.
2789 * dwarf2out.c (add_name_and_src_coords_attributes): Add description
2790 attribute for artifical and nameless decls.
2791 (dwarf2out_register_external_die): Add description attribute to
2792 external reference die.
2793 (add_desc_attribute): New functions.
2794 (gen_subprogram_die): Add description attribute to
2795 DW_TAG_call_site_parameter.
2796 * tree-pretty-print.c (print_generic_expr_to_str): New function.
2797 * tree-pretty-print.h (print_generic_expr_to_str): Declare.
2798 * doc/invoke.texi (@item Debugging Options): Add -gdescribe-dies and
2800 (@item -gdescribe-dies): Add.
2802 2018-09-12 Aldy Hernandez <aldyh@redhat.com>
2804 * tree-vrp.c (vrp_shift_undefined_p): Remove.
2805 (extract_range_from_binary_expr_1: Call
2806 wide_int_range_shift_undefined_p instead of vrp_shift_undefined_p.
2807 * wide-int-range.h (wide_int_range_shift_undefined_p): Do not
2810 2018-09-12 Aldy Hernandez <aldyh@redhat.com>
2812 * gimple-ssa-warn-alloca.c
2813 (alloca_type_and_limit::alloca_type_and_limit): Initialize limit
2814 field for ALLOCA_BOUND_*_LARGE.
2816 2018-09-11 Nathan Sidwell <nathan@acm.org>
2818 * gcc.c (load_specs, execute, run_attempt): Use %qs not '%s'.
2820 2018-09-11 Uros Bizjak <ubizjak@gmail.com>
2822 * reg-stack.c (subst_asm_stack_regs): Call replace_reg also
2823 for clobbers. Remove obsolete comment.
2825 2018-09-11 Uros Bizjak <ubizjak@gmail.com>
2827 * config/i386/i386.md (define_attr "type"): Remove mpxmov, mpxmk,
2828 mpxchk, mpxld and mpxst types.
2829 (define_attr length_immediate): Remove all processing of mpx types.
2830 (define_attr prefix_0f): Ditto.
2831 (define_attr memory): Ditto.
2833 2018-09-11 Uros Bizjak <ubizjak@gmail.com>
2835 * config/i386/i386.md (fyl2x_extend<mode>xf3_i387): Remove.
2836 (log<mode>2): Change operand 1 predicate to general_operand.
2837 Extend operand 1 to XFmode and generate logxf3 insn.
2838 (log10<mode>2): Change operand 1 predicate to general_operand.
2839 Extend operand 1 to XFmode and generate log10xf3 insn.
2840 (log2<mode>2): Change operand 1 predicate to general_operand.
2841 Extend operand 1 to XFmode and generate log2xf3 insn.
2842 (fyl2xp1_extend<mode>xf3_i387): Remove.
2843 (log1p<mode>2): Change operand 1 predicate to general_operand.
2844 Extend operand 1 to XFmode and generate log1pxf3 insn.
2845 (fxtract_extend<mode>xf3_i387): Remove.
2846 (logb<mode>2): Change operand 1 predicate to general_operand.
2847 Extend operand 1 to XFmode and generate logbxf3 insn.
2848 (ilogb<mode>2): Change operand 1 predicate to general_operand.
2849 Extend operand 1 to XFmode and generate fxtractxf3_i387 insn.
2850 (significand<mode>2): Change operand 1 predicate to general_operand.
2851 Extend operand 1 to XFmode and generate significandxf3 insn.
2853 2018-09-11 Nathan Sidwell <nathan@acm.org>
2855 * gcc.c (perror_with_name, pfatal_with_name): Delete.
2856 (load_specs): Use fatal_error.
2857 (DELETE_IF_ORDINARY, process_command): Use error.
2858 (execute, run_attempt): Use fatal_error.
2860 2018-09-11 Andrew Stubbs <ams@codesourcery.com>
2862 * diagnostic-core.h (sorry_at): New prototype.
2863 * diagnostic.c (sorry_at): New function.
2865 2018-09-11 Aldy Hernandez <aldyh@redhat.com>
2867 * tree-vrp.c (extract_range_from_binary_expr_1): Treat all divisions
2868 by zero as VR_UNDEFINED.
2870 2018-09-10 Uros Bizjak <ubizjak@gmail.com>
2872 * config/i386/i386.md (<sincos>xf2): Rename from *<sincos>xf2_i387.
2873 (*<sincos>_extend<mode>xf2_i387): Remove insn pattern.
2874 (<sincos>mode2): New expander.
2875 (sincos_extend<mode>xf3_i387): Remove insn pattern.
2876 (sincos -> sin, cos splitters): Remove splitter patterns.
2877 (sincos<mode>3): Change operand 2 predicate to general_operand.
2878 Extend operand 2 to XFmode and generate sincosxf3 insn.
2879 (fptanxf4_i387): Change mode of operands 0 and 3 to SFmode.
2880 Change operand 3 predicate to const1_operand.
2881 (fptan_extend<mode>xf4_i387): Remove insn pattern.
2882 (tanxf2): Update operands in the call to fptanxf4_i387.
2883 (tan<mode>2): Change operand 1 predicate to general_operand.
2884 Extend operand 1 to XFmode and generate tanxf3 insn.
2885 (atan2xf3): Rename from *fpatanxf3_i387.
2886 (fpatan_extend<mode>xf3_i387): Remove insn pattern.
2887 (atan2xf3): Remove expander.
2888 (atan2<mode<3): Change operand 1 and 2 predicates to general_operand.
2889 Extend operands 1 and 2 to XFmode and generate atan2xf3 insn.
2890 (atan<mode>2): Change operand 1 predicate to general_operand.
2891 Extend operand 1 to XFmode and generate atanxf3 insn.
2893 2018-09-10 Uros Bizjak <ubizjak@gmail.com>
2895 * config/i386/i386.md (x87/SSE constant load splitter): Use
2896 memory_operand instead of nonimmediate_operand for input operand
2899 2018-09-09 Uros Bizjak <ubizjak@gmail.com>
2901 * config/i386/i386.md (float partial SSE register stall splitter): Move
2902 splitter near its instruction pattern.
2903 (float_extend partial SSE register stall splitter): Ditto.
2904 (float_truncate partial SSE register stall splitter): Ditto.
2906 2018-09-09 Hans-Peter Nilsson <hp@bitrange.com>
2909 * config/mmix/mmix.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
2910 to speculation_safe_value_not_needed.
2913 * config/mmix/mmix.c (mmix_assemble_integer): Handle byte-size
2914 non-CONST_INT rtx:es using assemble_integer_with_op ".byte".
2915 (MMIX_CFUN_NEEDS_SAVED_EH_RETURN_ADDRESS): Don't call
2916 leaf_function_p, instead use has_hard_reg_initial_val.
2918 2018-09-09 Nathan Sidwell <nathan@acm.org>
2920 * gcc.h (pfatal_with_name): Don't declare here.
2921 * gcc.c (pfatal_with_name): Make static.
2923 2018-09-09 Xianmiao Qu <xianmiao_qu@c-sky.com>
2925 * config/csky/csky.md (*cskyv2_adddi3, *cskyv2_subdi3): Add
2928 2018-09-08 John David Anglin <danglin@gcc.gnu.org>
2930 PR rtl-optimization/85458
2931 * sel-sched.c (sel_target_adjust_priority): Allow backend adjust
2932 priority hook to reduce the priority of EXPR.
2934 2018-09-07 Uros Bizjak <ubizjak@gmail.com>
2936 * config/i386/i386.md (float<SWI48x:mode><MODEF:mode>2) Enable
2937 DImode for x87 on 32bit targets. Conditionally disable x87 modes
2938 with X87_ENABLE_FLOAT. Remove preparation code.
2939 (*float<SWI48:mode><MODEF:mode>2): Rename from
2940 *float<SWI48:mode><MODEF:mode>2_mixed. Handle x87, SSE and mixed
2941 math using "enabled" attribute.
2942 (*floatdi<MODEF:mode>2_i387): Rename from
2943 *float<SWI48x:mode><MODEF:mode>2_i387. Handle only DImode and
2944 enable for 32bit targets only.
2945 (floatdi<X87MODEF:mode>2_i387_with_xmm pre-reload splitter): New
2947 (floatdi<X87MODEF:mode>2_i387_with_xmm): Use register_operand
2948 as operand 1 predicate. Rewrite as define_insn_and_split.
2949 (floatdi<X87MODEF:mode>2_i387_with_xmm memory input splitter): Remove.
2951 2018-09-06 Uros Bizjak <ubizjak@gmail.com>
2953 * reg-stack.c (get_true_reg) <case FLOAT_TRUNCATE>: Reorder
2954 to fallthru to FLOAT case.
2956 2018-09-06 Will Schmidt <will_schmidt@vnet.ibm.com>
2959 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Update logic
2960 around folding of vec_sl to handle out of range shift values.
2962 2018-09-06 Uros Bizjak <ubizjak@gmail.com>
2964 * config/i386/i386.md (fix_trunc<mode>_fisttp_i387_1): Remove.
2965 Update callers to gen_fix_trunc<mode>_i387_fisttp
2966 (fix_trunc<mode>_i387_fisttp): Change operand 0 predicate to
2967 nonimmediate_operand.
2968 (fix_trunc<mode>_i387_fisttp_with_temp): Remove insn pattern
2969 and corresponding splitters.
2970 (*fix_trunc<mode>_i387_1): Always expand with fix_trunc<mode>_i387.
2971 (fix_truncdi_i387): Change operand 0 predicate to nonimmediate_operand.
2972 (fix_truncdi_i387_with_temp): Remove insn pattern
2973 and corresponding splitters.
2974 (fix_trunc<mode>_i387): Change operand 0 predicate to
2975 nonimmediate_operand.
2976 (fix_trunc<mode>_i387_with_temp): Remove insn pattern
2977 and corresponding splitters.
2978 (*fistdi2_1): Remove.
2980 (fistdi2_with_temp): Remove insn pattern and corresponding splitters.
2981 (lrintxfdi2): Remove expander. Reimplement as define_insn.
2982 (*fist<mode>2_1): Remove.
2983 (fist<mode>2): Ditto.
2984 (fist<mode>2_with_temp): Remove insn pattern and corresponding
2986 (lrintxf<mode>2): Remove expander. Reimplement as define_insn.
2987 (*fist<mode>2_<rounding>_1): Always expand with fist<mode>2_<rounding>.
2988 (fistdi2_<rounding>): Change operand 0 predicate to
2989 nonimmediate_operand.
2990 (fistdi2_<rounding>_with_temp): Remove insn pattern
2991 and corresponding splitters.
2992 (fist<mode>2_<rounding>): Change operand 0 predicate to
2993 nonimmediate_operand.
2994 (fist<mode>2_<rounding>_with_temp): Remove insn pattern
2995 and corresponding splitters.
2997 (*fixuns_trunc<mode>si2_avx512f_zext): Depend on TARGET_SSE_MATH.
2999 2018-09-06 Bernd Edlinger <bernd.edlinger@hotmail.de>
3001 * varasm.c (output_constructor_regular_field): Check TYPE_SIZE_UNIT of
3004 2018-09-06 Will Schmidt <will_schmidt@vnet.ibm.com>
3006 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add support for
3007 early gimple folding of vec_splat().
3008 * tree-vect-generic.c: Remove static from tree_vec_extract() definition.
3009 * gimple-fold.h: Add an extern define for tree_vec_extract().
3011 2018-09-06 Will Schmidt <will_schmidt@vnet.ibm.com>
3013 * config/rs6000/rs6000.c (fold_mergehl_helper): Add types_compatible_p
3014 wrappers around TREE_TYPE comparisons.
3016 2018-09-06 Ilya Leoshkevich <iii@linux.ibm.com>
3019 * config/s390/predicates.md: Add nonsym_memory_operand.
3020 * config/s390/s390.c (s390_legitimize_cs_operand): If operand
3021 contains a SYMBOL_REF, load it into an intermediate pseudo.
3022 (s390_emit_compare_and_swap): Legitimize operand.
3023 * config/s390/s390.md: Use the new nonsym_memory_operand
3024 with UNSPECV_CAS patterns.
3026 2018-09-06 Ilya Leoshkevich <iii@linux.ibm.com>
3029 * config/s390/s390-passes.def: New file.
3030 * config/s390/s390-protos.h (class rtl_opt_pass): Add forward
3032 (make_pass_s390_early_mach): Add declaration.
3033 * config/s390/s390.c (make_pass_s390_early_mach):
3034 (s390_option_override): Remove dynamic registration.
3035 * config/s390/t-s390: Add s390-passes.def.
3037 2018-09-06 Ilya Leoshkevich <iii@linux.ibm.com>
3039 * config/s390/s390.c (s390_decompose_constant_pool_ref):
3040 Remove UNSPEC_LTREL_BASE check.
3041 (annotate_constant_pool_refs): Likewise.
3042 (find_constant_pool_ref): Likewise.
3043 (find_ltrel_base): Removed.
3044 (replace_ltrel_base): Removed.
3045 (s390_mainpool_finish): Remove replace_ltrel_base call.
3046 (s390_chunkify_start): Remove pending LTREL_BASE logic.
3047 (s390_chunkify_finish): Remove replace_ltrel_base call.
3048 * config/s390/s390.md: Remove UNSPEC_LTREL_BASE.
3050 2018-09-06 Hans-Peter Nilsson <hp@axis.com>
3053 * config/cris/cris.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
3054 to speculation_safe_value_not_needed.
3056 2018-09-05 Cesar Philippidis <cesar@codesourcery.com>
3057 Bernd Schmidt <bernds_cb1@t-online.de>
3059 * config/nvptx/nvptx-opts.h: New file.
3060 * config/nvptx/nvptx.c (nvptx_file_start): Print the correct .target.
3061 * config/nvptx/nvptx.h: Include "nvptx-opts.h".
3063 (TARGET_SM35): New macro.
3064 * config/nvptx/nvptx.md (atomic_fetch_<logic><mode>): Enable with the
3066 * config/nvptx/nvptx.opt (ptx_isa, sm_30, sm_35): New enum and its
3068 (misa=): New option.
3069 * doc/invoke.texi (Nvidia PTX Options): Document -misa.
3071 2018-09-05 Uros Bizjak <ubizjak@gmail.com>
3073 * config/i386/i386.md (truncdfsf2): Remove expander.
3074 (truncdfsf2_with_temp): Ditto.
3075 (truncxf<mode>2): Ditto.
3076 (*truncdfsf_fast_mixed): Remove insn pattern.
3077 (*truncdfsf_fast_i387): Ditto.
3078 (*truncdfsf_mixed): Ditto.
3079 (*truncdfsf_i387): Ditto.
3080 (*truncdfsf2_i387_1): Ditto.
3081 (*truncxfsf2_mixed): Ditto.
3082 (*truncxfdf2_mixed): Ditto.
3083 (*truncxf<mode>2_i387_noop): Ditto. Update callers
3084 to call gen_truncxf<mode>2 instead.
3085 (*truncxf<mode>2_i387): Remove.
3086 (reg->reg splitters): Remove splitter pattern.
3087 (reg->mem splitters): Ditto.
3089 (truncdfsf2): New insn pattern.
3090 (truncxf<mode>2): Ditto.
3092 2018-09-05 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
3094 * tree-ssa-math-opts.c (is_mult_by): New function.
3095 (is_square_of): Use the above.
3096 (optimize_recip_sqrt): New function.
3097 (pass_cse_reciprocals::execute): Use the above.
3099 2018-09-05 Richard Biener <rguenther@suse.de>
3102 * tree-ssa-sccvn.c (rpo_elim::eliminate_push_avail): Make sure
3103 to zero-init the emplaced vec.
3105 2018-09-05 Martin Liska <mliska@suse.cz>
3107 PR tree-optimization/87205
3108 * tree-switch-conversion.c (pass_lower_switch::execute):
3109 Group cases for switch statements.
3111 2018-09-05 Richard Biener <rguenther@suse.de>
3113 PR tree-optimization/87217
3114 * tree-ssa-sccvn.c (vuse_valueize): New.
3115 (vn_reference_lookup_pieces): Use it.
3116 (vn_reference_lookup): Likewise.
3118 2018-09-05 Nathan Sidwell <nathan@acm.org>
3121 * stor-layout.c (place_field): Scan forwards to check last
3122 bitfield when ms_bitfield_placement is in effect.
3124 2018-09-05 Richard Biener <rguenther@suse.de>
3127 * tree-vect-stmts.c (vectorizable_simd_clone_call): Fix bogus
3130 2018-09-05 Siddhesh Poyarekar <siddhesh@sourceware.org>
3131 Kugan Vivekanandarajah <kugan.vivekanandarajah@linaro.org>
3133 * config/aarch64/falkor-tag-collision-avoidance.c: New file.
3134 * config.gcc (extra_objs): Build it.
3135 * config/aarch64/t-aarch64 (falkor-tag-collision-avoidance.o):
3137 * config/aarch64/aarch64-passes.def
3138 (pass_tag_collision_avoidance): New pass.
3139 * config/aarch64/aarch64.c (qdf24xx_tunings): Add
3140 AARCH64_EXTRA_TUNE_RENAME_LOAD_REGS to tuning_flags.
3141 (aarch64_classify_address): Remove static qualifier.
3142 (aarch64_address_info, aarch64_address_type): Move to...
3143 * config/aarch64/aarch64-protos.h: ... here.
3144 (make_pass_tag_collision_avoidance): New function.
3145 * config/aarch64/aarch64-tuning-flags.def (rename_load_regs):
3148 2018-09-05 Martin Liska <mliska@suse.cz>
3150 * doc/gcov.texi: Update documentation of humar
3152 * gcov.c (format_count): Print one decimal place, it provides
3153 more fine number of situations like '1G' vs. '1.4G'.
3155 2018-09-05 Martin Liska <mliska@suse.cz>
3158 * config/rs6000/rs6000.opt: Mark the option as Deprecated.
3159 * optc-gen.awk: Allow 'Var' for Deprecated options in order
3160 to generate a MASK value.
3162 2018-09-04 H.J. Lu <hongjiu.lu@intel.com>
3165 * dwarf2out.c (based_loc_descr): Allow hard frame pointer even
3166 if frame pointer isn't used.
3167 (compute_frame_pointer_to_fb_displacement): Likewise.
3169 2018-09-04 Jakub Jelinek <jakub@redhat.com>
3172 * common/config/i386/i386-common.c (OPTION_MASK_ISA_XSAVEOPT_SET,
3173 OPTION_MASK_ISA_XSAVES_SET, OPTION_MASK_ISA_XSAVEC_SET): Use
3174 OPTION_MASK_ISA_XSAVE_SET instead of OPTION_MASK_ISA_XSAVE.
3175 (OPTION_MASK_ISA_XSAVE_UNSET): Add OPTION_MASK_ISA_XSAVES_UNSET
3176 and OPTION_MASK_ISA_XSAVEC_UNSET.
3178 2018-09-04 Max Filippov <jcmvbkbc@gmail.com>
3180 * config/xtensa/xtensa.c (xtensa_expand_atomic): Reorder AND and
3181 XOR operations in NAND case.
3183 2018-09-04 Aldy Hernandez <aldyh@redhat.com>
3185 * wide-int-range.cc (wide_int_range_convert): New.
3186 * wide-int-range.h (wide_int_range_convert): New.
3187 * tree-vrp.c (extract_range_from_unary_expr): Abstract wide int
3188 code into wide_int_range_convert.
3189 (extract_range_into_wide_ints): Do not munge anti range constants
3190 into the entire domain. Just return the range back.
3192 2018-09-04 Martin Liska <mliska@suse.cz>
3194 * genmatch.c (output_line_directive): Add new argument
3196 (dt_simplify::gen_1): Encapsulate dump within __builtin_expect.
3198 2018-09-04 Jonathan Wakely <jwakely@redhat.com>
3200 * doc/invoke.texi (Option Summary): Add whitespace.
3202 * doc/invoke.texi (Option Summary): Add -Waligned-new.
3204 2018-09-04 Richard Biener <rguenther@suse.de>
3206 PR tree-optimization/87211
3207 * tree-ssa-sccvn.c (visit_phi): When value-numbering to a
3208 backedge value we're supposed to treat as VARYING also number
3209 the PHI to VARYING in case it got a different value-number already.
3211 2018-09-04 Aldy Hernandez <aldyh@redhat.com>
3213 * tree-vrp.c (vrp_can_optimize_bit_op): Remove.
3214 (extract_range_from_binary_expr_1): Do not call
3215 vrp_can_optimize_bit_op.
3216 * wide-int-range.cc (wide_int_range_can_optimize_bit_op): Make
3218 (wide_int_range_get_mask_and_bounds): New.
3219 (wide_int_range_optimize_bit_op): New.
3220 (wide_int_range_bit_ior): Call wide_int_range_optimize_bit_op.
3221 (wide_int_range_bit_and): Same.
3222 * wide-int-range.h (wide_int_range_can_optimize_bit_op): Remove.
3223 (wide_int_range_optimize_bit_op): New.
3224 (wide_int_range_get_mask_and_bounds): New.
3226 2018-09-04 Richard Biener <rguenther@suse.de>
3228 PR tree-optimization/87176
3229 * tree-ssa-sccvn.c (visit_phi): Remove redundant allsame
3230 variable. When value-numbering a virtual PHI node make sure
3231 to not value-number to the backedge value.
3233 2018-09-04 Jonathan Wakely <jwakely@redhat.com>
3235 * doc/extend.texi (Long Long, Hex Floats): Document support for
3236 long long and hex floats in more recent versions of ISO C++.
3238 2018-09-03 Richard Biener <rguenther@suse.de>
3240 PR tree-optimization/87177
3241 * tree-ssa-sccvn.c (vuse_ssa_val): Revert previous change, keep
3244 2018-09-03 Alexander Monakov <amonakov@ispras.ru>
3246 * bb-reorder.c (edge_order): Convert to C-qsort-style
3247 tri-state comparator.
3248 (reorder_basic_blocks_simple): Change std::stable_sort to
3251 2018-09-03 Alexander Monakov <amonakov@ispras.ru>
3253 * tree-loop-distribution.c (offset_cmp): Convert to C-qsort-style
3254 tri-state comparator.
3255 (fuse_memset_builtins): Change std::stable_sort to gcc_stablesort.
3257 2018-09-03 Alexander Monakov <amonakov@ispras.ru>
3259 * sort.cc (struct sort_ctx): New field 'nlim'. Use it...
3260 (mergesort): ... here as maximum count for using netsort.
3261 (gcc_qsort): Set nlim to 3 if stable sort is requested.
3262 (gcc_stablesort): New.
3263 * system.h (gcc_stablesort): Declare.
3265 2018-09-03 Alexander Monakov <amonakov@ispras.ru>
3267 * sort.cc (gcc_qsort) [CHECKING_P]: Call qsort_chk.
3268 * system.h (qsort): Always redirect to gcc_qsort. Update comment.
3269 * vec.c (qsort_chk): Do not call gcc_qsort. Update comment.
3271 2018-09-03 Segher Boessenkool <segher@kernel.crashing.org>
3273 * config/rs6000/rs6000.md (*mov<mode>_hardfloat32): Remove %U from the
3274 lxsdx and stxsdx alternatives.
3275 (*mov<mode>_hardfloat64): Ditto.
3276 * config/rs6000/vsx.md (*vsx_extract_<mode>_store): Ditto.
3278 2018-09-03 Richard Biener <rguenther@suse.de>
3280 PR tree-optimization/87200
3281 * tree-ssa-sccvn.c (vn_nary_build_or_lookup_1): Valueize a
3284 2018-09-03 Martin Liska <mliska@suse.cz>
3286 PR tree-optimization/87201
3287 * tree-switch-conversion.c (switch_decision_tree::balance_case_nodes):
3288 Fix parenthesis in an expression.
3290 2018-09-03 Richard Biener <rguenther@suse.de>
3292 PR tree-optimization/87197
3293 * tree-ssa-sccvn.c (vn_nary_build_or_lookup_1): Mark the new def
3294 visited. CSE the VN_INFO hashtable lookup.
3296 PR tree-optimization/87169
3297 * tree-ssa-sccvn.c (do_rpo_vn): When marking loops for not
3298 iterating make sure there's no extra backedges from irreducible
3299 regions feeding the header. Mark the destination block
3302 2018-09-03 Martin Liska <mliska@suse.cz>
3305 * common/common-target.def: Add TARGET_GET_VALID_OPTION_VALUES.
3306 * common/common-targhooks.c (default_get_valid_option_values):
3308 * common/common-targhooks.h (default_get_valid_option_values):
3310 * common/config/i386/i386-common.c: Move processor_target_table
3312 (ix86_get_valid_option_values): New function.
3313 (TARGET_GET_VALID_OPTION_VALUES): New macro.
3314 * config/i386/i386.c (struct ptt): Move to i386-common.c.
3315 (PTA_*): Move all defined masks into i386-common.c.
3316 (ix86_function_specific_restore): Use new processor_cost_table.
3317 * config/i386/i386.h (struct ptt): Moved from i386.c.
3318 (struct pta): Likewise.
3319 * doc/tm.texi: Document new TARGET_GET_VALID_OPTION_VALUES.
3320 * doc/tm.texi.in: Likewise.
3321 * opt-suggestions.c (option_proposer::suggest_option):
3322 Pass prefix to build_option_suggestions.
3323 (option_proposer::get_completions): Likewise.
3324 (option_proposer::build_option_suggestions): Use the new target
3326 * opts.c (struct option_help_tuple): New struct.
3327 (print_filtered_help): Use the new target hook.
3329 2018-09-03 Martin Liska <mliska@suse.cz>
3332 * predict.c (set_even_probabilities): Add likely_edges
3333 argument and handle cases where we have precisely one
3335 (combine_predictions_for_bb): Catch also likely_edges.
3336 (tree_predict_by_opcode): Handle gswitch statements.
3337 * tree-cfg.h (find_case_label_for_value): New declaration.
3338 (find_taken_edge_switch_expr): Likewise.
3339 * tree-switch-conversion.c (switch_decision_tree::balance_case_nodes):
3340 Find pivot in decision tree based on probabily, not by number of
3343 2018-09-02 Gerald Pfeifer <gerald@pfeifer.com>
3345 * doc/standards.texi (Standards): Update Objective-C reference.
3347 2018-09-01 Gerald Pfeifer <gerald@pfeifer.com>
3349 * doc/install.texi (Prerequisites): Update link for MPC.
3351 2018-09-01 Michael Matz <matz@suse.de>
3353 PR tree-optimization/87074
3354 * gimple-loop-jam.c (unroll_jam_possible_p): Check loop exit
3355 PHIs for outer-loop uses.
3357 2018-09-01 Gerald Pfeifer <gerald@pfeifer.com>
3359 * doc/generic.texi (OpenMP): Adjust link to openmp.org.
3360 * doc/invoke.texi (C Dialect Options): Ditto.
3362 2018-09-01 Gerald Pfeifer <gerald@pfeifer.com>
3364 * doc/install.texi (Prerequisites): Adjust link mpfr.org.
3366 2018-08-31 Richard Biener <rguenther@suse.de>
3368 PR tree-optimization/87168
3369 * tree-ssa-sccvn.c (SSA_VAL): Add visited output parameter.
3370 (rpo_elim::eliminate_avail): When OP was not visited it must
3373 2018-08-31 David Malcolm <dmalcolm@redhat.com>
3375 * tree-vrp.c (copy_value_range): Convert param "from" from
3376 "value_range *" to "const value_range *".
3377 (range_is_null): Likewise for param "vr".
3378 (range_int_cst_p): Likewise.
3379 (range_int_cst_singleton_p): Likewise.
3380 (symbolic_range_p): Likewise.
3381 (value_ranges_intersect_p): Likewise for both params.
3382 (value_range_nonnegative_p): Likewise for param "vr".
3383 (value_range_constant_singleton): Likewise.
3384 (vrp_set_zero_nonzero_bits): Likewise for param "ar".
3385 (extract_range_into_wide_ints): Likewise for param "vr".
3386 (extract_range_from_multiplicative_op): Likewise for params "vr0"
3388 (vrp_can_optimize_bit_op): Likewise.
3389 (extract_range_from_binary_expr_1): Likewise for params "vr0_" and
3391 (extract_range_from_unary_expr): Likewise.
3392 (debug_value_range): Likewise for param "vr".
3393 (value_range::dump): Add "const" qualifier.
3394 (vrp_prop::check_array_ref): Convert local "vr" from
3395 "value_range *" to "const value_range *".
3396 (vrp_prop::check_mem_ref): Likewise.
3397 (vrp_prop::visit_stmt): Likewise for local "old_vr".
3398 (vrp_intersect_ranges_1): Likewise for param "vr_1".
3399 (vrp_intersect_ranges): Likewise.
3400 (simplify_stmt_for_jump_threading): Likewise for local "vr".
3401 (vrp_prop::vrp_finalize): Likewise.
3402 * tree-vrp.h (value_range::dump): Add "const" qualifier.
3403 (vrp_intersect_ranges): Add "const" qualifier to params as above.
3404 (extract_range_from_unary_expr): Likewise.
3405 (value_range_constant_singleton): Likewise.
3406 (symbolic_range_p): Likewise.
3407 (copy_value_range): Likewise.
3408 (extract_range_from_binary_expr_1): Likewise.
3409 (range_int_cst_p): Likewise.
3410 (vrp_set_zero_nonzero_bits): Likewise.
3411 (range_int_cst_singleton_p): Likewise.
3413 2018-08-31 Vlad Lazar <vlad.lazar@arm.com>
3415 * config/aarch64/arm_neon.h (vabsd_s64): New.
3416 (vnegd_s64): Likewise.
3418 2018-08-31 Martin Jambor <mjambor@suse.cz>
3420 * ipa-cp.c (estimate_local_effects): Replace wrong MAX with MIN.
3422 2018-08-31 Martin Liska <mliska@suse.cz>
3424 * ipa-icf.c (sem_item::add_type): Use
3425 sem_item::m_type_hash_cache.
3426 * ipa-icf.h: Move the cache from sem_item_optimizer
3429 2018-08-31 Nathan Sidwell <nathan@acm.org>
3431 * doc/extend.texi (Backwards Compatibility): Remove implicit
3432 extern C leeway of () being (...).
3434 2018-08-31 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
3436 * ipa-inline.c (can_inline_edge_by_limits_p): Fix typos in comment.
3438 2018-08-31 Segher Boessenkool <segher@kernel.crashing.org>
3442 * config/rs6000/rs6000.md (lround<mode>di2): Gate on TARGET_FPRND.
3444 2018-08-31 Jakub Jelinek <jakub@redhat.com>
3447 * expmed.c (expand_mult_const): Use immed_wide_int_const instead of
3448 gen_int_mode. Formatting fixes.
3450 2018-08-30 Sandra Loosemore <sandra@codesourcery.com>
3452 * target.def (custom_function_descriptors): Improve documentation.
3453 * doc/tm.texi.in (Trampolines): Expand discussion of function
3454 descriptors and move TARGET_CUSTOM_FUNCTION_DESCRIPTORS to the
3455 beginning of the section.
3456 * doc/tm.texi: Regenerated.
3458 2018-08-30 Jose E. Marchesi <jose.marchesi@oracle.com>
3460 * cfg.h (class auto_edge_flag): Spell out the template-id of the
3461 base class in the initializer list. This is a workaround for
3462 building with older GCC.
3463 (class auto_bb_flag): Likewise.
3465 2018-08-30 Aaron Sawdey <acsawdey@linux.ibm.com>
3467 * config/rs6000/altivec.md (altivec_eq<mode>): Remove star.
3468 (altivec_vcmpequ<VI_char>_p): Remove star.
3469 * config/rs6000/rs6000-string.c (do_load_for_compare): Support
3471 (expand_strncmp_vec_sequence): New function.
3472 (emit_final_str_compare_vec): New function.
3473 (expand_strn_compare): Add support for vector strncmp.
3474 * config/rs6000/rs6000.opt (-mstring-compare-inline-limit): Change
3475 length specification to bytes.
3476 * config/rs6000/vsx.md (vsx_ld_elemrev_v16qi_internal): Remove star.
3477 (vcmpnezb_p): New pattern.
3478 * doc/invoke.texi (RS/6000 and PowerPC Options): Update documentation
3479 for option -mstring-compare-inline-limit.
3481 2018-08-30 Thiago Macieira <thiago.macieira@intel.com>
3483 * config/i386/i386.c (PTA_WESTMERE): Remove PTA_AES.
3484 (PTA_SKYLAKE): Add PTA_AES.
3485 (PTA_GOLDMONT): Likewise.
3487 2018-08-29 Jan Hubicka <jh@suse.cz>
3490 * lto-opts.c (lto_write_options): Always stream PIC/PIE mode.
3491 * lto-wrapper.c (merge_and_complain): Fix merging of PIC/PIE.
3493 2018-08-29 Jan Hubicka <jh@suse.cz>
3495 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not follow
3497 (hash_tree): Do not visit TYPE_STUB_DECL.
3498 * tree-streamer-out.c (write_ts_type_common_tree_pointers): Do not
3499 stream TYPE_STUB_DECL.
3500 * tree-streamer-in.c (lto_input_ts_type_common_tree_pointers): Likewise.
3501 * ipa-utils.h (type_with_linkage_p): Do not rely on TYPE_STUB_DECL
3502 after free_lang_data.
3503 (type_in_anonymous_namespace_p): Likewise.
3505 2018-08-29 Jan Hubicka <jh@suse.cz>
3507 * sreal.h (SREAL_PART_BITS): Change to 31; remove seemingly unnecessary
3508 comment that it has to be even number.
3509 (class sreal): Change m_sig type to int32_t.
3510 * sreal.c (sreal::dump, sreal::to_int, opreator+, operator-): Use
3511 int64_t for temporary calculations.
3512 (sreal_verify_basics): Drop one bit from minimum and maximum.
3514 2018-08-30 Richard Biener <rguenther@suse.de>
3516 PR tree-optimization/87147
3517 * tree-ssa-sccvn.c (SSA_VISITED): New function.
3518 (visit_phi): When the degenerate result is from the backedge and
3519 we didn't visit its definition yet drop to VARYING.
3520 (do_rpo_vn): Properly mark blocks with incoming backedges as executable.
3522 2018-08-29 Jan Hubicka <jh@suse.cz>
3524 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not walk
3526 (hash_tree): Likewise.
3528 2018-08-29 Jan Hubicka <jh@suse.cz>
3530 * tree.c (find_decls_types_r): Walk also TYPE_NEXT_PTR_TO
3531 and TYPE_NEXT_REF_TO.
3533 2018-08-29 Jan Hubicka <jh@suse.cz>
3535 * sreal.h (SREAL_PART_BITS): Change to 31; remove seemingly unnecessary
3536 comment that it has to be even number.
3537 (class sreal): Change m_sig type to int32_t.
3538 * sreal.c (sreal::dump, sreal::to_int, opreator+, operator-): Use
3539 int64_t for temporary calculations.
3540 (sreal_verify_basics): Drop one bit from minimum and maximum.
3542 2018-08-30 Tamar Christina <tamar.christina@arm.com>
3544 * config/aarch64/aarch64.c (aarch64_expand_movmem): Set TImode max.
3546 2018-08-30 Vlad Lazar <vlad.lazar@arm.com>
3549 * expmed.c (canonicalize_comparison): Use wi::sub instead of wi::add
3550 if to_add is negative.
3552 2018-08-29 Bernd Edlinger <bernd.edlinger@hotmail.de>
3555 * builtins.c (c_strlen): Improve range checks.
3557 2018-08-29 Martin Sebor <msebor@redhat.com>
3558 Jeff Law <law@redhat.com>
3560 PR tree-optimization/86714
3561 PR tree-optimization/86711
3562 * builtins.c (c_strlen): Add arguments to call to string_constant.
3563 * expr.c (string_constant): Add argument. Detect missing nul
3564 terminator and outermost declaration it's missing in.
3565 * expr.h (string_constant): Add argument.
3566 * fold-const.c (read_from_constant_string): Add arguments to call to
3568 (c_getstr): Likewise.
3569 * tree-ssa-forwprop.c (simplify_builtin_call): Likewise.
3571 * tree-ssa-strlen.c (get_stridx): Likewise.
3573 2018-08-29 Jan Hubicka <jh@suse.cz>
3575 * tree-streamer-in.c (lto_input_ts_function_decl_tree_pointers):
3576 Do not stream DECL_VINDEX.
3577 * tree-streamer-out.c (write_ts_function_decl_tree_pointers): Likewise.
3578 * tree.c (free_lang_data_in_decl): Clear DECL_VINDEX.
3579 (decl_function_context): Use DECL_VIRTUAL_P rather than DECL_VINDEX.
3581 2018-08-29 Richard Biener <rguenther@suse.de>
3583 * tree-ssa-sccvn.c (vuse_ssa_val): Return NULL for unvisited
3584 virtual operands that are not default defs to honor region
3586 (rpo_vn_valueize): Remove ineffective code here.
3588 2018-08-29 Richard Biener <rguenther@suse.de>
3590 PR tree-optimization/87132
3591 * tree-ssa-alias.c (get_continuation_for_phi): Do not translate
3592 when skipping defs reachable over backedges.
3594 2018-08-29 Richard Biener <rguenther@suse.de>
3596 * tree-core.h: Document use of deprecated_flag in SSA_NAME.
3597 * tree.h (SSA_NAME_POINTS_TO_READONLY_MEMORY): Define.
3598 * tree-into-ssa.c (pass_build_ssa::execute): Initialize
3599 function parameters SSA_NAME_POINTS_TO_READONLY_MEMORY from fnspec.
3600 * tree-ssa-sccvn.c (const_parms, init_const_parms): Remove.
3601 (vn_reference_lookup_3): Remove use of const_parms.
3602 (free_rpo_vn): Do not free const_parms.
3603 (do_rpo_vn): Do not call init_const_parms.
3604 * tree-ssa-alias.c (refs_may_alias_p_1): Honor
3605 SSA_NAME_POINTS_TO_READONLY_MEMORY.
3606 (call_may_clobber_ref_p_1): Likewise.
3608 2018-08-29 Alexander Monakov <amonakov@ispras.ru>
3611 * invoke.texi (Optimization Options): List -ftree-scev-cprop.
3613 (-ftree-scev-cprop): Document.
3615 2018-08-29 Jan Hubicka <jh@suse.cz>
3617 * sreal.h (normalize, normalize_up, normalize_down): Add new_sig/new_exp
3619 (sreal constructor): Update.
3620 * sreal.c (sreal:operator+, sreal:operator-, sreal:operator*,
3621 sreal:operator/): Update.
3623 2018-08-29 Martin Liska <mliska@suse.cz>
3625 * tree-switch-conversion.c (switch_conversion::expand):
3626 Strenghten assumption about gswitch statements.
3628 2018-08-29 Richard Biener <rguenther@suse.de>
3630 PR tree-optimization/87117
3631 * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_stmt): Only
3632 re-value-number released SSA VDEFs.
3634 2018-08-29 Richard Biener <rguenther@suse.de>
3636 PR tree-optimization/87126
3637 * tree-ssa-sccvn.c (vn_reference_insert): Remove assert.
3639 2018-08-28 Jim Wilson <jimw@sifive.com>
3641 * config/riscv/pic.md: Rewrite.
3642 * config/riscv/riscv.c (riscv_address_insns): Return cost of 3 for
3644 * config/riscv/riscv.md (ZERO_EXTEND_LOAD): Delete.
3645 (SOFTF, default_load, softload, softstore): New.
3647 2018-08-28 Jeff Law <law@redhat.com>
3649 * fold-const.c (fold_binary_loc): Remove recently added assert.
3651 2018-08-28 Joern Rennecke <joern.rennecke@riscy-ip.com>
3653 * genpreds.c (write_predicate_subfunction): Also add ATTRIBUTE_UNUSED
3654 to OP parmeter of generated function.
3656 2018-08-28 MCC CS <deswurstes@users.noreply.github.com>
3658 PR tree-optimization/87009
3659 * match.pd: Add boolean optimizations.
3661 2018-08-28 Martin Sebor <msebor@redhat.com>
3664 * calls.c (alloc_max_size): Treat HOST_WIDE_INT special.
3665 * gimple-ssa-warn-alloca.c (adjusted_warn_limit): New function.
3666 (pass_walloca::gate): Use it.
3667 (alloca_call_type): Same.
3668 (pass_walloca::execute): Same.
3669 * stor-layout.c (layout_decl): Treat HOST_WIDE_INT special.
3671 2018-08-28 David Malcolm <dmalcolm@redhat.com>
3673 * dumpfile.h (ATTRIBUTE_GCC_DUMP_PRINTF): Change version check on
3674 GCC_VERSION for usage of "__gcc_dump_printf__" format from
3677 2018-08-28 Richard Biener <rguenther@suse.de>
3679 PR tree-optimization/87124
3680 * tree-ssa-sccvn.c (vn_lookup_simplify_result): Guard against
3681 constants before looking up avail.
3683 2018-08-28 Jakub Jelinek <jakub@redhat.com>
3686 * calls.c (maybe_warn_nonstring_arg): Punt early if
3687 warn_stringop_overflow is zero. Don't call get_range_strlen
3688 on 3rd argument, keep iterating until lenrng[1] is INTEGER_CST.
3689 Swap comparison operands to have constants on rhs. Only use
3690 lenrng[1] if non-NULL and INTEGER_CST. Don't uselessly
3691 increment lenrng[0].
3693 2018-08-28 Richard Sandiford <richard.sandiford@arm.com>
3695 * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Fix unguarded
3696 use of tree_to_shwi. Remove duplicated test for the size being
3697 a whole number of bytes.
3699 2018-08-28 Richard Biener <rguenther@suse.de>
3701 PR tree-optimization/87117
3702 * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_cleanup):
3703 Handle removed stmt without LHS (GIMPLE_NOP).
3705 2018-08-28 Richard Biener <rguenther@suse.de>
3707 PR tree-optimization/87117
3708 * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Exclude
3709 void which is is_gimple_reg_type by checking for COMPLETE_TYPE_P.
3711 2018-08-28 Richard Biener <rguenther@suse.de>
3713 PR tree-optimization/87117
3714 * tree-ssa-pre.c (compute_avail): Do not make expressions
3715 with predicated values available.
3716 (get_expr_value_id): Assert we do not run into predicated value
3719 2018-08-28 Richard Biener <rguenther@suse.de>
3721 PR tree-optimization/87117
3722 * tree-ssa-operands.c (add_stmt_operand): STRING_CST may
3723 get virtual operands.
3724 (get_expr_operands): Handle STRING_CST like other decls.
3726 2018-08-28 Martin Liska <mliska@suse.cz>
3728 * tree.h: Update documentation of fndecl_built_in_p
3732 2018-08-27 Jeff Law <law@redhat.com>
3733 PR tree-optimization/87110
3734 * tree-ssa-dse.c (compute_trims): Handle non-constant
3737 2018-08-27 Martin Sebor <msebor@redhat.com>
3739 PR tree-optimization/86914
3740 * tree-ssa-strlen.c (maybe_set_strlen_range): Avoid MEM_REF.
3742 2018-08-27 Martin Sebor <msebor@redhat.com>
3744 PR tree-optimization/87112
3745 * builtins.c (expand_builtin_strnlen): Convert c_strlen result to
3746 the type of the bound argument.
3748 2018-08-27 Jeff Law <law@redhat.com>
3750 * tree-ssa-dse.c (compute_trims): Handle case where the reference's
3751 type does not have a TYPE_SIZE_UNIT.
3753 2018-08-27 Steve Ellcey <sellcey@cavium.com>
3755 * config/aarch64/aarch64-speculation.cc: Replace include of cfg.h
3756 with include of backend.h.
3758 2018-08-27 Richard Biener <rguenther@suse.de>
3760 PR tree-optimization/86927
3761 * tree-vect-loop.c (vect_create_epilog_for_reduction): Properly
3762 use const cond reduction code.
3764 2018-08-27 Alexander Monakov <amonakov@ispras.ru>
3766 PR tree-optimization/85758
3767 * match.pd ((X & Y) ^ Y): Add :s qualifier to inner expression.
3769 2018-08-27 David Malcolm <dmalcolm@redhat.com>
3772 * diagnostic-show-locus.c (class layout_range): Update for
3773 conversion of show_caret_p to a tri-state.
3774 (layout_range::layout_range): Likewise.
3775 (make_range): Likewise.
3776 (layout::maybe_add_location_range): Likewise.
3777 (layout::should_print_annotation_line_p): Don't show annotation
3778 lines for ranges that are SHOW_LINES_WITHOUT_RANGE.
3779 (layout::get_state_at_point): Update for conversion of
3780 show_caret_p to a tri-state. Bail out early for
3781 SHOW_LINES_WITHOUT_RANGE, so that such ranges don't affect
3782 underlining or source colorization.
3783 (gcc_rich_location::add_location_if_nearby): Update for conversion
3784 of show_caret_p to a tri-state.
3785 (selftest::test_one_liner_multiple_carets_and_ranges): Likewise.
3786 (selftest::test_one_liner_fixit_replace_equal_secondary_range):
3788 (selftest::test_one_liner_labels): Likewise.
3789 * gcc-rich-location.c (gcc_rich_location::add_expr): Update for
3790 conversion of show_caret_p to a tri-state.
3791 * pretty-print.c (text_info::set_location): Likewise.
3792 * pretty-print.h (text_info::set_location): Likewise.
3793 * substring-locations.c (format_warning_n_va): Likewise.
3794 * tree-diagnostic.c (default_tree_printer): Likewise.
3795 * tree-pretty-print.c (newline_and_indent): Likewise.
3797 2018-08-27 David Malcolm <dmalcolm@redhat.com>
3800 * diagnostic-show-locus.c (get_line_span_for_fixit_hint): Show the
3801 line above for line-insertion fix-it hints.
3802 (selftest::test_fixit_insert_containing_newline): Update the
3803 expected results, and add a test with line-numbering enabled.
3805 2018-08-27 Martin Liska <mliska@suse.cz>
3808 * sanopt.c (sanitize_rewrite_addressable_params): Ignore
3809 params with DECL_HAS_VALUE_EXPR_P.
3811 2018-08-27 Martin Liska <mliska@suse.cz>
3813 * config/i386/i386.c (ix86_expand_set_or_movmem): Dump
3814 selected expansion strategy.
3816 2018-08-27 Martin Liska <mliska@suse.cz>
3818 * builtins.h (is_builtin_fn): Remove and fndecl_built_in_p.
3819 * builtins.c (is_builtin_fn): Likewise.
3820 * attribs.c (diag_attr_exclusions): Use new function
3821 fndecl_built_in_p and remove check for FUNCTION_DECL if
3823 (builtin_mathfn_code): Likewise.
3824 (fold_builtin_expect): Likewise.
3825 (fold_call_expr): Likewise.
3826 (fold_builtin_call_array): Likewise.
3827 (fold_call_stmt): Likewise.
3828 (set_builtin_user_assembler_name): Likewise.
3829 (is_simple_builtin): Likewise.
3830 * calls.c (gimple_alloca_call_p): Likewise.
3831 (maybe_warn_nonstring_arg): Likewise.
3832 * cfgexpand.c (expand_call_stmt): Likewise.
3833 * cgraph.c (cgraph_update_edges_for_call_stmt_node): Likewise.
3834 (cgraph_edge::verify_corresponds_to_fndecl): Likewise.
3835 (cgraph_node::verify_node): Likewise.
3836 * cgraphclones.c (build_function_decl_skip_args): Likewise.
3837 (cgraph_node::create_clone): Likewise.
3838 * config/arm/arm.c (arm_insert_attributes): Likewise.
3839 * config/i386/i386.c (ix86_gimple_fold_builtin): Likewise.
3840 * dse.c (scan_insn): Likewise.
3841 * expr.c (expand_expr_real_1): Likewise.
3842 * fold-const.c (operand_equal_p): Likewise.
3843 (fold_binary_loc): Likewise.
3844 * gimple-fold.c (gimple_fold_stmt_to_constant_1): Likewise.
3845 * gimple-low.c (lower_stmt): Likewise.
3846 * gimple-pretty-print.c (dump_gimple_call): Likewise.
3847 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call):
3849 * gimple.c (gimple_build_call_from_tree): Likewise.
3850 (gimple_call_builtin_p): Likewise.
3851 (gimple_call_combined_fn): Likewise.
3852 * gimplify.c (gimplify_call_expr): Likewise.
3853 (gimple_boolify): Likewise.
3854 (gimplify_modify_expr): Likewise.
3855 (gimplify_addr_expr): Likewise.
3856 * hsa-gen.c (gen_hsa_insns_for_call): Likewise.
3857 * ipa-cp.c (determine_versionability): Likewise.
3858 * ipa-fnsummary.c (compute_fn_summary): Likewise.
3859 * ipa-param-manipulation.c (ipa_modify_formal_parameters): Likewise.
3860 * ipa-split.c (visit_bb): Likewise.
3861 (split_function): Likewise.
3862 * ipa-visibility.c (cgraph_externally_visible_p): Likewise.
3863 * lto-cgraph.c (input_node): Likewise.
3864 * lto-streamer-out.c (write_symbol): Likewise.
3865 * omp-low.c (setjmp_or_longjmp_p): Likewise.
3866 (lower_omp_1): Likewise.
3867 * predict.c (strip_predict_hints): Likewise.
3868 * print-tree.c (print_node): Likewise.
3869 * symtab.c (symtab_node::output_to_lto_symbol_table_p): Likewise.
3870 * trans-mem.c (is_tm_irrevocable): Likewise.
3871 (is_tm_load): Likewise.
3872 (is_tm_simple_load): Likewise.
3873 (is_tm_store): Likewise.
3874 (is_tm_simple_store): Likewise.
3875 (is_tm_abort): Likewise.
3876 (tm_region_init_1): Likewise.
3877 * tree-call-cdce.c (gen_shrink_wrap_conditions): Likewise.
3878 * tree-cfg.c (verify_gimple_call): Likewise.
3879 (move_stmt_r): Likewise.
3880 (stmt_can_terminate_bb_p): Likewise.
3881 * tree-eh.c (lower_eh_constructs_2): Likewise.
3882 * tree-if-conv.c (if_convertible_stmt_p): Likewise.
3883 * tree-inline.c (remap_gimple_stmt): Likewise.
3884 (copy_bb): Likewise.
3885 (estimate_num_insns): Likewise.
3886 (fold_marked_statements): Likewise.
3887 * tree-sra.c (scan_function): Likewise.
3888 * tree-ssa-ccp.c (surely_varying_stmt_p): Likewise.
3889 (optimize_stack_restore): Likewise.
3890 (pass_fold_builtins::execute): Likewise.
3891 * tree-ssa-dce.c (mark_stmt_if_obviously_necessary): Likewise.
3892 (mark_all_reaching_defs_necessary_1): Likewise.
3893 * tree-ssa-dom.c (dom_opt_dom_walker::optimize_stmt): Likewise.
3894 * tree-ssa-forwprop.c (simplify_builtin_call): Likewise.
3895 (pass_forwprop::execute): Likewise.
3896 * tree-ssa-loop-im.c (stmt_cost): Likewise.
3897 * tree-ssa-math-opts.c (pass_cse_reciprocals::execute): Likewise.
3898 * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Likewise.
3899 * tree-ssa-strlen.c (get_string_length): Likewise.
3900 * tree-ssa-structalias.c (handle_lhs_call): Likewise.
3901 (find_func_aliases_for_call): Likewise.
3902 * tree-ssa-ter.c (find_replaceable_in_bb): Likewise.
3903 * tree-stdarg.c (optimize_va_list_gpr_fpr_size): Likewise.
3904 * tree-tailcall.c (find_tail_calls): Likewise.
3905 * tree.c (need_assembler_name_p): Likewise.
3906 (free_lang_data_in_decl): Likewise.
3907 (get_call_combined_fn): Likewise.
3908 * ubsan.c (is_ubsan_builtin_p): Likewise.
3909 * varasm.c (incorporeal_function_p): Likewise.
3910 * tree.h (DECL_BUILT_IN): Remove and replace with
3912 (DECL_BUILT_IN_P): Transfort to fndecl_built_in_p.
3913 (fndecl_built_in_p): New.
3915 2018-08-27 Martin Liska <mliska@suse.cz>
3917 PR tree-optimization/86847
3918 * tree-switch-conversion.c (switch_decision_tree::dump_case_nodes):
3919 Dump also subtree probability.
3920 (switch_decision_tree::do_jump_if_equal): New function.
3921 (switch_decision_tree::emit_case_nodes): Handle special
3922 situations in balanced tree that can be emitted much simpler.
3923 Fix calculation of probabilities that happen in tree expansion.
3924 * tree-switch-conversion.h (struct cluster): Add
3926 (struct simple_cluster): Likewise.
3927 (struct case_tree_node): Add new function has_child.
3928 (do_jump_if_equal): New.
3930 2018-08-27 Martin Liska <mliska@suse.cz>
3932 * tree-switch-conversion.c (bit_test_cluster::find_bit_tests):
3933 Add new argument to bit_test_cluster constructor.
3934 (bit_test_cluster::emit): Set bits really number of values
3936 (bit_test_cluster::hoist_edge_and_branch_if_true): Add
3937 probability argument.
3938 * tree-switch-conversion.h (struct bit_test_cluster):
3939 Add m_handles_entire_switch.
3941 2018-08-27 Martin Liska <mliska@suse.cz>
3943 PR tree-optimization/86702
3944 * tree-switch-conversion.c (jump_table_cluster::emit):
3945 Make probabilities even for values in jump table
3946 according to number of cases handled.
3947 (switch_decision_tree::compute_cases_per_edge): Pass
3948 argument to reset_out_edges_aux function.
3949 (switch_decision_tree::analyze_switch_statement): Likewise.
3950 * tree-switch-conversion.h (switch_decision_tree::reset_out_edges_aux):
3953 2018-08-27 Martin Liska <mliska@suse.cz>
3955 * cfgexpand.c (expand_asm_stmt): Use label_to_block and pass
3956 cfun argument explicitly.
3957 * gimple-pretty-print.c (dump_gimple_switch): Likewise.
3958 * hsa-gen.c (gen_hsa_insns_for_switch_stmt): Use new
3959 function gimple_switch_default_bb.
3960 (convert_switch_statements):
3962 * ipa-fnsummary.c (set_switch_stmt_execution_predicate):
3963 * stmt.c (label_to_block_fn): Use label_to_block and pass
3964 cfun argument explicitly and use gimple_switch_label_bb.
3965 (expand_case): Likewise.
3966 * tree-cfg.c (lower_phi_internal_fn): Use label_to_block and pass
3967 cfun argument explicitly. Likewise.
3968 (make_edges_bb): Likewise.
3969 (make_cond_expr_edges): Likewise.
3970 (get_cases_for_edge): Likewise.
3971 (make_gimple_switch_edges): Likewise.
3972 (label_to_block_fn): Likewise.
3973 (label_to_block): Likewise.
3974 (make_goto_expr_edges): Likewise.
3975 (make_gimple_asm_edges): Likewise.
3976 (main_block_label): Likewise.
3977 (group_case_labels_stmt): Likewise.
3978 (find_taken_edge_computed_goto): Likewise.
3979 (find_taken_edge_switch_expr): Likewise.
3980 (gimple_verify_flow_info): Likewise.
3981 (gimple_redirect_edge_and_branch): Likewise.
3982 (gimple_switch_label_bb): New function.
3983 (gimple_switch_default_bb): Likewise.
3984 (gimple_switch_edge): Likewise.
3985 (gimple_switch_default_edge): Likewise.
3986 * tree-cfg.h (label_to_block_fn): Remove and replace ...
3987 (label_to_block): ... with this.
3988 (gimple_switch_label_bb): New.
3989 (gimple_switch_default_bb): Likewise.
3990 (gimple_switch_edge): Likewise.
3991 (gimple_switch_default_edge): Likewise.
3992 * tree-cfgcleanup.c (convert_single_case_switch): Use
3993 new gimple functions and pass new argument to label_to_block.
3994 (cleanup_control_flow_bb):
3995 * tree-eh.c (make_eh_dispatch_edges): Use label_to_block and pass
3996 cfun argument explicitly.
3997 (make_eh_edges): Likewise.
3998 (redirect_eh_dispatch_edge): Likewise.
3999 (lower_resx): Likewise.
4000 (lower_eh_dispatch): Likewise.
4001 (maybe_remove_unreachable_handlers): Likewise.
4002 (unsplit_eh): Likewise.
4003 (cleanup_empty_eh): Likewise.
4004 (verify_eh_edges): Likewise.
4005 (verify_eh_dispatch_edge): Likewise.
4006 * tree-ssa-dom.c (record_edge_info): Likewise.
4007 * tree-ssa-forwprop.c (simplify_gimple_switch_label_vec): Likewise.
4008 * tree-ssa-threadedge.c (thread_around_empty_blocks): Likewise.
4009 (thread_through_normal_block): Likewise.
4010 * tree-ssa-uncprop.c (associate_equivalences_with_edges): Likewise.
4011 * tree-ssa-uninit.c (convert_control_dep_chain_into_preds):
4012 * tree-switch-conversion.c (switch_conversion::collect): Use new
4014 (switch_conversion::check_final_bb): Likewise.
4015 (switch_conversion::gather_default_values): Pass new argument
4017 (switch_conversion::build_constructors): Likewise.
4018 (switch_decision_tree::compute_cases_per_edge): Use new
4019 gimple_switch_edge function.
4020 (switch_decision_tree::analyze_switch_statement): Pass new argument
4022 (switch_decision_tree::try_switch_expansion): Use
4023 gimple_switch_default_edge.
4024 * tree-vrp.c (find_switch_asserts): Pass new argument
4026 * vr-values.c (vr_values::vrp_visit_switch_stmt): Likewise.
4027 (vr_values::simplify_switch_using_ranges): Likewise.
4029 2018-08-27 Richard Biener <rguenther@suse.de>
4031 * cfganal.h (rev_post_order_and_mark_dfs_back_seme): Declare.
4032 * cfganal.c (rev_post_order_and_mark_dfs_back_seme): New function.
4034 * tree-ssa-sccvn.h (struct vn_pval): New structure.
4035 (struct vn_nary_op_s): Add unwind_to member. Add
4036 predicated_values flag and put result into a union together
4037 with a linked list of vn_pval.
4038 (struct vn_ssa_aux): Add name member to make maintaining
4039 a map of SSA name to vn_ssa_aux possible. Remove no longer
4040 needed info, dfsnum, low, visited, on_sccstack, use_processed
4041 and range_info_anti_range_p members.
4042 (run_scc_vn, vn_eliminate, free_scc_vn, vn_valueize): Remove.
4043 (do_rpo_vn, run_rpo_vn, eliminate_with_rpo_vn, free_rpo_vn):
4045 (vn_valueize): New global.
4046 (vn_context_bb): Likewise.
4047 (VN_INFO_RANGE_INFO, VN_INFO_ANTI_RANGE_P, VN_INFO_RANGE_TYPE,
4048 VN_INFO_PTR_INFO): Remove.
4049 * tree-ssa-sccvn.c: ... (rewrite)
4050 (pass_fre::execute): For -O2+ initialize loops and run
4051 RPO VN in optimistic mode (iterating). For -O1 and -Og
4052 run RPO VN in non-optimistic mode.
4053 * params.def (PARAM_SCCVN_MAX_SCC_SIZE): Remove.
4054 (PARAM_RPO_VN_MAX_LOOP_DEPTH): Add.
4055 * doc/invoke.texi (sccvn-max-scc-size): Remove.
4056 (rpo-vn-max-loop-depth): Document.
4057 * tree-ssa-alias.c (walk_non_aliased_vuses): Stop walking
4058 when valuezing the VUSE signals we walked out of the region.
4059 * tree-ssa-pre.c (phi_translate_1): Ignore predicated values.
4060 (phi_translate): Set VN context block to use for availability
4062 (compute_avail): Likewise.
4063 (pre_valueize): New function.
4064 (pass_pre::execute): Adjust to the RPO VN API.
4066 * tree-ssa-loop-ivcanon.c: Include tree-ssa-sccvn.h.
4067 (propagate_constants_for_unrolling): Remove.
4068 (tree_unroll_loops_completely): Perform value-numbering
4069 on the unrolled bodies loop parent.
4071 2018-08-27 Richard Biener <rguenther@suse.de>
4073 * tree-ssa-pre.c (compute_antic): Re-use inverted postorder
4074 for partial antic compute.
4076 2018-08-27 Jakub Jelinek <jakub@redhat.com>
4078 PR rtl-optimization/87065
4079 * combine.c (simplify_if_then_else): Formatting fix.
4080 (if_then_else_cond): Guard MULT optimization with SCALAR_INT_MODE_P
4082 (known_cond): Don't return const_true_rtx for vector modes. Use
4083 CONST0_RTX instead of const0_rtx. Formatting fixes.
4085 2018-08-27 Martin Liska <mliska@suse.cz>
4087 PR gcov-profile/87069
4088 * gcov.c (process_file): Record files already processed
4089 and warn about a file being processed multiple times.
4091 2018-08-27 Martin Liska <mliska@suse.cz>
4094 * config/aarch64/aarch64.c (aarch64_override_options_internal):
4095 Set default values for x_aarch64_*_string strings.
4096 * config/aarch64/aarch64.opt: Remove --{march,mcpu,mtune}==
4097 prefix. For -mabi do not print '=ABI' in help and use
4098 <option_value> format for -msve-vector-bits and -moverride
4101 2018-08-26 Jeff Law <law@redhat.com>
4103 * config/mips/frame-header-opt.c: Include "backend.h" rather than
4106 2018-08-26 Marek Polacek <polacek@redhat.com>
4108 PR c++/87029, Implement -Wredundant-move.
4109 * doc/invoke.texi: Document -Wredundant-move.
4111 2018-08-25 Martin Sebor <msebor@redhat.com>
4113 PR tree-optimization/87059
4114 * builtins.c (expand_builtin_strncmp): Convert MIN_EXPR operand
4115 to the same type as the other.
4116 * fold-const.c (fold_binary_loc): Assert expectation.
4118 2018-08-25 Iain Sandoe <iain@sandoe.co.uk>
4120 * config/darwin.c (machopic_legitimize_pic_address): Clean up
4121 extraneous parentheses, dead code section and formatting.
4123 2018-08-24 David Malcolm <dmalcolm@redhat.com>
4126 * diagnostic-show-locus.c (layout::layout): Ensure the margin is
4127 wide enough for jumps in the line-numbering to be visible.
4128 (layout::print_gap_in_line_numbering): New member function.
4129 (layout::calculate_line_spans): When using line numbering, merge
4130 line spans that are only 1 line apart.
4131 (diagnostic_show_locus): When printing line numbers, show gaps in
4132 line numbering directly, rather than printing headers.
4133 (selftest::test_diagnostic_show_locus_fixit_lines): Add test of
4134 line-numbering with multiple line spans.
4135 (selftest::test_fixit_insert_containing_newline_2): Add test of
4136 line-numbering, in which the spans are close enough to be merged.
4138 2018-08-24 Aldy Hernandez <aldyh@redhat.com>
4140 * gimple-ssa-evrp-analyze.c (set_ssa_range_info): Pass value_range
4141 to range_includes_zero_p. Do not special case VR_ANTI_RANGE.
4142 * tree-vrp.c (range_is_nonnull): Remove.
4143 (range_includes_zero_p): Accept value_range instead of min/max.
4144 (extract_range_from_binary_expr_1): Do not early bail on
4146 Use range_includes_zero_p instead of range_is_nonnull.
4147 (extract_range_from_unary_expr): Use range_includes_zero_p instead
4148 of range_is_nonnull.
4149 (vrp_meet_1): Pass value_range to range_includes_zero_p. Do not
4150 special case VR_ANTI_RANGE.
4151 (vrp_finalize): Same.
4152 * tree-vrp.h (range_includes_zero_p): Pass value_range as argument
4154 (range_is_nonnull): Remove.
4155 * vr-values.c (vrp_stmt_computes_nonzero): Use
4156 range_includes_zero_p instead of range_is_nonnull.
4157 (extract_range_basic): Pass value_range to range_includes_zero_p
4158 instead of range_is_nonnull.
4160 2018-08-24 Uros Bizjak <ubizjak@gmail.com>
4162 * emit-rtl.c (init_emit_once): Do not emit MODE_POINTER_BOUNDS RTXes.
4163 * emit-rtl.h (rtl_data): Remove return_bnd.
4164 * explow.c (trunc_int_for_mode): Do not handle POINTER_BOUNDS_MODE_P.
4165 * function.c (diddle_return_value): Do not handle crtl->return_bnd.
4166 * genmodes.c (complete_mode): Do not handle MODE_POINTER_BOUNDS.
4167 (POINTER_BOUNDS_MODE): Remove definition.
4168 (make_pointer_bounds_mode): Remove.
4169 (get_mode_class): Do not handle MODE_POINTER_BOUNDS.
4170 * machmode.h (POINTER_BOUNDS_MODE_P): Remove definition.
4171 (scalare_mode::includes_p): Do not handle MODE_POINTER_BOUNDS.
4172 * mode-classes.def: Do not define MODE_POINTER_BOUNDS.
4173 * stor-layout.c (int_mode_for_mode): Do not handle MODE_POINTER_BOUNDS.
4174 * tree-core.h (enum tree_index): Remove TI_POINTER_BOUNDS_TYPE.
4175 * varasm.c (output_constant_pool_2): Do not handle MODE_POINTER_BOUNDS.
4177 * config/i386/i386-modes.def (BND32, BND64): Remove.
4178 * config/i386/i386.c (dbx_register_map): Remove bound registers.
4179 (dbx64_register_map): Ditto.
4180 (svr4_dbx_register_map): Ditto.
4181 (indirect_thunk_bnd_needed): Remove.
4182 (indirect_thunks_bnd_used): Ditto.
4183 (indirect_return_bnd_needed): Ditto.
4184 (indirect_return_via_cx_bnd): Ditto.
4185 (enum indirect_thunk_prefix): Remove indirect_thunk_prefix_bnd.
4186 (indirect_thunk_name): Remove handling of indirect_thunk_prefix_bnd.
4187 (output_indirect_thunk): Ditto. Remove need_prefix argument.
4188 (output_indirect_thunk_function): Remove handling of
4189 indirect_return_bnd_needed, indirect_return_via_cx_bnd,
4190 indirect_thunk_bnd_needed and indirect_thunks_bnd_used variables.
4191 (ix86_save_reg): Remove handling of crtl->return_bnd.
4192 (ix86_legitimate_constant_p): Remove handling of POINTER_BOUNDS_MODE_P.
4193 (ix86_print_operand_address_as): Remove handling of UNSPEC_BNDMK_ADDR
4194 and UNSPEC_BNDLX_ADDR.
4195 (ix86_output_indirect_branch_via_reg): Remove handling of
4196 indirect_thunk_prefix_bnd.
4197 (ix86_output_indirect_branch_via_push): Ditto.
4198 (ix86_output_function_return): Ditto.
4199 (ix86_output_indirect_function_return): Ditto.
4200 (avoid_func_arg_motion): Do not handle UNSPEC_BNDSTX.
4201 * config/i386/i386.h (FIXED_REGISTERS): Remove bound registers.
4202 (CALL_USED_REGISTERS): Ditto.
4203 (REG_ALLOC_ORDER): Update for removal of bound registers.
4204 (HI_REGISTER_NAMES): Ditto.
4205 * config/i386/i386.md (UNSPEC_BNDMK, UNSPEC_BNDMK_ADDR, UNSPEC_BNDSTX)
4206 (UNSPEC_BNDLDX, UNSPEC_BNDLDX_ADDR, UNSPEC_BNDCL, UNSPEC_BNDCU)
4207 (UNSPEC_BNDCN, UNSPEC_MPX_FENCE): Remove.
4208 (BND0_REG, BND1_REG, BND2_REG, BND3_REG): Remove
4209 (FIRST_PSEUDO_REG): Update.
4210 (BND): Remove mode iterator.
4211 * config/i386/predicates.md (bnd_mem_operator): Remove.
4213 2018-08-24 Richard Sandiford <richard.sandiford@arm.com>
4215 * tree-vect-stmts.c (vectorizable_bswap): Handle variable-length
4218 2018-08-24 Richard Sandiford <richard.sandiford@arm.com>
4220 * tree-vect-slp.c (vect_transform_slp_perm_load): Separate out
4221 the case in which the permute needs only a single element and
4222 repeats for every vector of the result. Extend that case to
4223 handle variable-length vectors.
4224 * tree-vect-stmts.c (vectorizable_load): Update accordingly.
4226 2018-08-24 H.J. Lu <hongjiu.lu@intel.com>
4229 * dwarf2out.c (save_macinfo_strings): Call set_indirect_string
4230 on DW_MACINFO_start_file for -gsplit-dwarf -g3.
4232 2018-08-24 Richard Biener <rguenther@suse.de>
4234 * cfg.h (struct control_flow_graph): Add edge_flags_allocated and
4235 bb_flags_allocated members.
4236 (auto_flag): New RAII class for allocating flags.
4237 (auto_edge_flag): New RAII class for allocating edge flags.
4238 (auto_bb_flag): New RAII class for allocating bb flags.
4239 * cfgloop.c (verify_loop_structure): Allocate temporary edge
4241 * cfganal.c (dfs_enumerate_from): Remove use of visited sbitmap
4242 in favor of temporarily allocated BB flag.
4243 * hsa-brig.c: Re-order includes.
4244 * hsa-dump.c: Likewise.
4245 * hsa-regalloc.c: Likewise.
4246 * print-rtl.c: Likewise.
4247 * profile-count.c: Likewise.
4249 2018-08-24 Segher Boessenkool <segher@kernel.crashing.org>
4252 * config/rs6000/rs6000.c (toc_relative_expr_p): Check that the base is
4255 2018-08-24 Aldy Hernandez <aldyh@redhat.com>
4258 * wide-int-range.cc (wide_int_range_div): Do not ignore result
4259 from wide_int_range_multiplicative_op.
4261 2018-08-23 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
4263 * tree-vect-data-refs.c (vect_grouped_store_supported): Fix typo
4266 2018-08-23 Giuliano Belinassi <giuliano.belinassi@usp.br>
4268 * genmatch.c (parser::parse_operation): Fix typo 'exapnded'
4271 2018-08-23 Alexander Monakov <amonakov@ispras.ru>
4273 * tree-scalar-evolution.c (final_value_replacement_loop): Dump
4274 full GENERIC expression used for replacement.
4276 2018-08-23 Aldy Hernandez <aldyh@redhat.com>
4278 * tree-vrp.c (abs_extent_range): Remove.
4279 (extract_range_into_wide_ints): Pass wide ints by reference.
4280 (extract_range_from_binary_expr_1): Rewrite the *DIV_EXPR code.
4281 Pass wide ints by reference in all calls to
4282 extract_range_into_wide_ints.
4283 * wide-int-range.cc (wide_int_range_div): New.
4284 * wide-int-range.h (wide_int_range_div): New.
4285 (wide_int_range_includes_zero_p): New.
4286 (wide_int_range_zero_p): New.
4288 2018-08-23 Matthew Malcomson <matthew.malcomson@arm.com>
4290 * config/aarch64/aarch64.md (arches): New enum.
4291 (arch): New enum attr.
4292 (arch_enabled): New attr.
4293 (enabled): Now uses arch_enabled only.
4294 (simd, sve, fp16): Removed attribute.
4295 (fp): Attr now defined in terms of 'arch'.
4296 (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64, *movti_aarch64,
4297 *movhf_aarch64, <optab><fcvt_target><GPF:mode>2,
4298 <FCVT_F2FIXED:fcvt_fixed_insn><GPF:mode>3,
4299 <FCVT_FIXED2F:fcvt_fixed_insn><GPI:mode>3): Merge 'fp' and 'simd'
4300 attributes into 'arch'.
4301 (*movsf_aarch64, *movdf_aarch64, *movtf_aarch64, *add<mode>3_aarch64,
4302 subdi3, neg<mode>2, <optab><mode>3, one_cmpl<mode>2,
4303 *<NLOGICAL:optab>_one_cmpl<mode>3, *xor_one_cmpl<mode>3,
4304 *aarch64_ashl_sisd_or_int_<mode>3, *aarch64_lshr_sisd_or_int_<mode>3,
4305 *aarch64_ashr_sisd_or_int_<mode>3, *aarch64_sisd_ushl): Convert use of
4306 'simd' attribute into 'arch'.
4307 (load_pair_sw_<SX:mode><SX2:mode>, load_pair_dw_<DX:mode><DX2:mode>,
4308 store_pair_sw_<SX:mode><SX2:mode>, store_pair_dw_<DX:mode><DX2:mode>):
4309 Convert use of 'fp' attribute to 'arch'.
4310 * config/aarch64/aarch64-simd.md (move_lo_quad_internal_<mode>,
4311 move_lo_quad_internal_<mode>): (different modes) Merge 'fp' and 'simd'
4313 (move_lo_quad_internal_be_<mode>, move_lo_quad_internal_be_<mode>):
4314 (different modes) Merge 'fp' and 'simd' into 'arch'.
4315 (*aarch64_combinez<mode>, *aarch64_combinez_be<mode>): Merge 'fp' and
4318 2018-08-23 Segher Boessenkool <segher@kernel.crashing.org>
4320 PR rtl-optimization/87026
4321 * expmed.c (canonicalize_comparison): If we can no longer create
4322 pseudoregisters, don't.
4324 2018-08-23 Richard Earnshaw <rearnsha@arm.com>
4327 * config/arm/arm-protos.h (arm_emit_speculation_barrier): New
4329 * config/arm/arm.c (speculation_barrier_libfunc): New static
4331 (arm_init_libfuncs): Initialize it.
4332 (arm_emit_speculation_barrier): New function.
4333 * config/arm/arm.md (speculation_barrier): Call
4334 arm_emit_speculation_barrier for architectures that do not have
4336 (speculation_barrier_insn): Only match on Armv7 or later.
4338 2018-08-23 Richard Biener <rguenther@suse.de>
4341 * tree-inline.c (copy_bb): Drop unused __builtin_va_arg_pack_len
4344 2018-08-23 Richard Sandiford <richard.sandiford@arm.com>
4346 * config/aarch64/aarch64.c (aarch64_evpc_sve_tbl): Fix handling
4347 of single-vector TBLs.
4348 (aarch64_vectorize_vec_perm_const): Set one_vector_p when only
4351 2018-08-23 Richard Sandiford <richard.sandiford@arm.com>
4354 * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const_1): Fix
4355 aarch64_evpc_tbl guard.
4357 2018-08-22 Bernd Edlinger <bernd.edlinger@hotmail.de>
4359 * tree-ssa-dse.c (compute_trims): Avoid folding away undefined
4362 2018-08-22 Martin Sebor <msebor@redhat.com>
4365 * tree-pretty-print.c (pretty_print_string): Add argument.
4366 (dump_generic_node): Call to pretty_print_string with string size.
4368 2018-08-22 Segher Boessenkool <segher@kernel.crashing.org>
4370 PR rtl-optimization/86771
4371 * combine.c (try_combine): Do not allow splitting a resulting PARALLEL
4372 of two SETs into those two SETs, one to be placed at i2, if that SETs
4373 destination is modified between i2 and i3.
4375 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
4377 PR tree-optimization/86725
4378 * tree-vect-loop.c (vect_inner_phi_in_double_reduction_p): New
4380 (vect_analyze_scalar_cycles_1): Check it.
4382 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
4384 PR tree-optimization/86725
4385 * tree-vect-loop.c (vect_is_simple_reduction): When treating
4386 an outer loop phi as a double reduction, make sure that the
4387 single user of the phi result is an inner loop phi.
4389 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
4391 * tree-vect-data-refs.c (vect_analyze_group_access_1): Convert
4392 grouped stores with gaps to a strided group.
4394 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
4396 * tree-vect-stmts.c (get_group_load_store_type)
4397 (get_load_store_type): Only test STMT_VINFO_STRIDED_P for the
4398 first statement in a group.
4400 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
4402 * config/darwin.h (LINK_COMMAND_SPEC_A): Sync LTO options with
4403 the sequence used in gcc/gcc.c.
4405 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
4408 * gcc-ar.c (main): Don’t try to invoke the plug-in if we’re not
4411 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
4413 * config/darwin10.h (LINK_GCC_C_SEQUENCE_SPEC): Adjust to use the
4414 Darwin10-specific unwinder-shim.
4415 * config/darwin12.h (LINK_GCC_C_SEQUENCE_SPEC): Remove.
4416 * config/rs6000/darwin.h (DARWIN_CRT1_SPEC, DARWIN_DYLIB1_SPEC):
4417 New to cater for Darwin10 Rosetta.
4419 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
4421 * config/i386/i386.c (ix86_output_addr_diff_elt): Move the MACH-O
4422 specific test before the one for HAVE_AS_GOTOFF_IN_DATA.
4424 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
4429 * gcc/dwarf2out.c (FUNC_SECOND_SECT_LABEL): New.
4430 (dwarf2out_switch_text_section): Generate a local label for the
4431 second function sub-section and apply it as the second FDE start
4433 * gcc/final.c (final_scan_insn_1): Emit second FDE label after the
4434 second sub-section start.
4436 2018-08-22 Richard Biener <rguenther@suse.de>
4438 PR tree-optimization/86988
4439 * tree-vrp.c (vrp_prop::check_mem_ref): Bail out on VLAs.
4441 2018-08-22 Richard Biener <rguenther@suse.de>
4443 PR tree-optimization/86945
4444 * tree-cfg.c (generate_range_test): Use unsigned arithmetic.
4446 2018-08-22 Alexandre Oliva <oliva@adacore.com>
4448 * config/rs6000/rs6000.c (SMALL_DATA_RELOC, SMALL_DATA_REG): Add
4449 a comment about how uses of r2 for .sdata2 come about.
4451 2018-08-22 Alexandre Oliva <aoliva@redhat.com>
4453 * tree-ssa-reassoc.c (is_reassociable_op): Fix cut&pasto.
4455 2018-08-21 Marek Polacek <polacek@redhat.com>
4457 PR c++/86981, Implement -Wpessimizing-move.
4458 * doc/invoke.texi: Document -Wpessimizing-move.
4460 2018-08-21 Jan Hubicka <jh@suse.cz>
4462 * tree.c (find_decls_types_r): Do not check for redundant typedefs.
4463 * tree.h (is_redundant_typedef): Remove.
4464 * dwarf2out.c (is_redundant_typedef): Turn into static function.
4466 2018-08-21 Jan Hubicka <jh@suse.cz>
4468 * tree.c (free_lang_data_in_decl): Remove types from DECL_CONTEXT
4471 2018-08-21 Tamar Christina <tamar.christina@arm.com>
4473 * expmed.c (extract_low_bits): Reject invalid subregs early.
4475 2018-08-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
4478 * tree-ssa-strlen.c (adjust_last_stmt): Avoid folding away undefined
4481 2018-08-21 Rasmus Villemoes <rv@rasmusvillemoes.dk>
4483 * config/vxworks.h: Guard vxworks_asm_out_constructor and
4484 vxworks_asm_out_destructor by !HAVE_INITFINI_ARRAY_SUPPORT
4485 * config/vxworks.c: Likewise.
4487 2018-08-21 Rasmus Villemoes <rv@rasmusvillemoes.dk>
4489 * config/vxworks.c: Set targetm.have_ctors_dtors
4490 if HAVE_INITFINI_ARRAY_SUPPORT.
4491 * config/vxworks.h: Set SUPPORTS_INIT_PRIORITY
4492 if HAVE_INITFINI_ARRAY_SUPPORT.
4494 2018-08-21 Rasmus Villemoes <rv@rasmusvillemoes.dk>
4496 * config/vxworks.h: Add $(WIND_BASE)/target/h/wrn/coreip to
4497 default search path for VxWorks < 7.
4499 2018-08-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
4501 * gimple-ssa-sprintf.c (decl_constant_value): Remove.
4502 (get_format_string): Refer to c_getstr.
4504 2018-08-21 Tom de Vries <tdevries@suse.de>
4506 * cgraph.h (debuginfo_early_init, debuginfo_init, debuginfo_fini)
4507 (debuginfo_start, debuginfo_stop, debuginfo_early_start)
4508 (debuginfo_early_stop): Declare.
4509 * cgraphunit.c (debuginfo_early_init, debuginfo_init, debuginfo_fini)
4510 (debuginfo_start, debuginfo_stop, debuginfo_early_start)
4511 (debuginfo_early_stop): New function.
4512 (symbol_table::finalize_compilation_unit): Call debuginfo_early_start
4513 and debuginfo_early_stop.
4514 * dwarf2out.c (dwarf2out_finish, dwarf2out_early_finish): Dump dwarf.
4515 * toplev.c (compile_file): Call debuginfo_start and debuginfo_stop.
4516 (general_init): Call debuginfo_early_init.
4517 (finalize): Call debuginfo_fini.
4518 (do_compile): Call debuginfo_init.
4519 * doc/invoke.texi (@gccoptlist): Add -fdump-debug and
4521 (@item -fdump-debug, @item -fdump-earlydebug): Add.
4523 2018-08-21 Tom de Vries <tdevries@suse.de>
4525 * dwarf2out.c (print_dw_val, print_loc_descr, print_die): Handle
4526 flag_dump_noaddr and flag_dump_unnumbered.
4528 2018-08-21 Aldy Hernandez <aldyh@redhat.com>
4530 * wide-int-range.cc (wide_int_range_abs): New.
4531 (wide_int_range_order_set): Rename from wide_int_range_min_max.
4532 * wide-int-range.h (wide_int_range_abs): New.
4533 (wide_int_range_min_max): New.
4534 * tree-vrp.c (extract_range_from_unary_expr): Rewrite ABS_EXPR
4535 case to call wide_int_range_abs.
4536 Rewrite MIN/MAX_EXPR to call wide_int_range_min_max.
4537 (extract_range_from_abs_expr): Delete.
4539 2018-08-20 Michael Meissner <meissner@linux.ibm.com>
4542 * config/rs6000/rs6000.md (extendsi<mode>2): Change constraints
4543 from 'Y' to 'YZ' to enable the LWAX instruction to be generated
4546 2018-08-20 Nathan Sidwell <nathan@acm.org>
4547 Jeff Law <law@redhat.com>
4549 * config/s390/s390-c (s390_macro_to_expand): Use cpp_macro_p.
4550 * config/spu/spu-c.c (spu_macro_to_expand): Likewise.
4552 2018-08-20 David Malcolm <dmalcolm@redhat.com>
4555 * attribs.c (diag_attr_exclusions): Add auto_diagnostic_group instance.
4556 (decl_attributes): Likewise.
4557 * calls.c (maybe_warn_nonstring_arg): Add auto_diagnostic_group
4559 * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
4560 * diagnostic-core.h (class auto_diagnostic_group): New class.
4561 * diagnostic.c (diagnostic_initialize): Initialize the new fields.
4562 (diagnostic_report_diagnostic): Handle the first diagnostics within
4564 (emit_diagnostic): Add auto_diagnostic_group instance.
4566 (inform_n): Likewise.
4567 (warning): Likewise.
4568 (warning_at): Likewise.
4569 (warning_n): Likewise.
4570 (pedwarn): Likewise.
4571 (permerror): Likewise.
4573 (error_n): Likewise.
4574 (error_at): Likewise.
4576 (fatal_error): Likewise.
4577 (internal_error): Likewise.
4578 (internal_error_no_backtrace): Likewise.
4579 (auto_diagnostic_group::auto_diagnostic_group): New ctor.
4580 (auto_diagnostic_group::~auto_diagnostic_group): New dtor.
4581 * diagnostic.h (struct diagnostic_context): Add fields
4582 "diagnostic_group_nesting_depth",
4583 "diagnostic_group_emission_count", "begin_group_cb",
4585 * gimple-ssa-isolate-paths.c (find_implicit_erroneous_behavior):
4586 Add auto_diagnostic_group instance(s).
4587 (find_explicit_erroneous_behavior): Likewise.
4588 * gimple-ssa-warn-alloca.c (pass_walloca::execute): Likewise.
4589 * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Likewise.
4590 * gimplify.c (warn_implicit_fallthrough_r): Likewise.
4591 (gimplify_va_arg_expr): Likewise.
4592 * hsa-gen.c (HSA_SORRY_ATV): Likewise.
4593 (HSA_SORRY_AT): Likewise.
4594 * ipa-devirt.c (compare_virtual_tables): Likewise.
4595 (warn_odr): Likewise.
4596 * multiple_target.c (expand_target_clones): Likewise.
4597 * opts-common.c (cmdline_handle_error): Likewise.
4598 * reginfo.c (globalize_reg): Likewise.
4599 * substring-locations.c (format_warning_n_va): Likewise.
4600 * tree-inline.c (expand_call_inline): Likewise.
4601 * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Likewise.
4602 * tree-ssa-loop-niter.c
4603 (do_warn_aggressive_loop_optimizations): Likewise.
4604 * tree-ssa-uninit.c (warn_uninit): Likewise.
4605 * tree.c (warn_deprecated_use): Likewise.
4607 2018-08-20 H.J. Lu <hongjiu.lu@intel.com>
4610 * config/i386/i386.md (eh_return): Always update EH return
4611 address in word_mode.
4613 2018-08-20 Chung-Lin Tang <cltang@codesourcery.com>
4615 * targhooks.c (std_gimplify_va_arg_expr): Properly handle case of when
4616 TARGET_SPLIT_COMPLEX_ARG is defined.
4618 2018-08-20 Bernd Edlinger <bernd.edlinger@hotmail.de>
4620 * expr.c (store_field): Change gcc_assert to gcc_checking_assert.
4622 2018-08-20 Bernd Edlinger <bernd.edlinger@hotmail.de>
4625 * expr.c (expand_assignment): Assert that bitpos is positive.
4626 (store_field): Likewise
4627 (expand_expr_real_1): Make sure that bitpos is positive.
4628 * config/alpha/alpha.h (CONSTANT_ADDRESS_P): Avoid signed
4631 2018-08-20 Nathan Sidwell <nathan@acm.org>
4633 * Makefile.in (CPP_ID_DATA_H): Delete.
4634 (CPP_INTERNAL_H): Don't add it.
4635 (GTFILES): Replace CPP_ID_DATA_H with CPPLIB_H.
4636 * gengtype.c (open_base_files): Replace cpp-id-data.h with cpplib.h
4638 2018-08-20 Richard Biener <rguenther@suse.de>
4640 PR tree-optimization/78655
4641 * tree-vrp.c (extract_range_from_binary_expr_1): Make
4642 pointer + offset nonnull if either operand is nonnull work.
4644 2018-08-20 Tom de Vries <tdevries@suse.de>
4646 * dwarf2out.c (add_scalar_info): Don't add reference to existing die
4647 unless the referenced die describes the added property using
4648 DW_AT_location or DW_AT_const_value. Fall back to exprloc case.
4649 Otherwise, add a DW_AT_location to the referenced die.
4651 2018-08-19 Uros Bizjak <ubizjak@gmail.com>
4654 * config/i386/i386.c (ix86_rtx_costs) [case SET]: Check source for
4655 register_operand when calling ix86_set_reg_reg_cost.
4656 [case CONST_INT, case CONST, case LABEL_REF, case SYMBOL_REF]:
4657 Set *total to 0 for operands that satisfy x86_64_immediate_operand
4658 predicate and to 1 otherwise.
4660 2018-08-18 Iain Sandoe <iain@sandoe.co.uk>
4662 * config/darwin.c (darwin_override_options): If -gsplit-dwarf is set,
4663 emit a diagnostic that it is not supported and reset the option.
4664 * config/darwin.h (DRIVER_SELF_SPECS): Note that gsplit-dwarf is not
4665 supported and consume the option. (ASM_FINAL_SPEC): New.
4667 2018-08-17 Segher Boessenkool <segher@kernel.crashing.org>
4669 * doc/md.texi (Patterns): Use @ref instead of @xref in the middle of
4672 2018-08-17 Sandra Loosemore <sandra@codesourcery.com>
4674 C-SKY port: Documentation
4676 * doc/extend.texi (C-SKY Function Attributes): New section.
4677 * doc/invoke.texi (Option Summary): Add C-SKY options.
4678 (C-SKY Options): New section.
4679 * doc/md.texi (Machine Constraints): Document C-SKY constraints.
4681 2018-08-17 Jojo <jijie_rong@c-sky.com>
4682 Huibin Wang <huibin_wang@c-sky.com>
4683 Sandra Loosemore <sandra@codesourcery.com>
4684 Chung-Lin Tang <cltang@codesourcery.com>
4686 C-SKY port: Backend implementation
4688 * config/csky/*: New.
4689 * common/config/csky/*: New.
4691 2018-08-17 Jojo <jijie_rong@c-sky.com>
4692 Huibin Wang <huibin_wang@c-sky.com>
4693 Sandra Loosemore <sandra@codesourcery.com>
4694 Chung-Lin Tang <cltang@codesourcery.com>
4695 Andrew Jenner <andrew@codesourcery.com>
4697 C-SKY port: Configury
4699 * config.gcc (csky-*-*): New.
4700 * configure.ac: Add csky to targets for dwarf2 debug_line support.
4701 * configure: Regenerated.
4703 2018-08-17 David Malcolm <dmalcolm@redhat.com>
4705 * dump-context.h: Include "dumpfile.h".
4706 (dump_context::dump_printf_va): Convert final param from va_list
4707 to va_list *. Convert from ATTRIBUTE_PRINTF to
4708 ATTRIBUTE_GCC_DUMP_PRINTF.
4709 (dump_context::dump_printf_loc_va): Likewise.
4710 * dumpfile.c: Include "stringpool.h".
4711 (make_item_for_dump_printf_va): Delete.
4712 (make_item_for_dump_printf): Delete.
4713 (class dump_pretty_printer): New class.
4714 (dump_pretty_printer::dump_pretty_printer): New ctor.
4715 (dump_pretty_printer::emit_items): New member function.
4716 (dump_pretty_printer::emit_any_pending_textual_chunks): New member
4718 (dump_pretty_printer::emit_item): New member function.
4719 (dump_pretty_printer::stash_item): New member function.
4720 (dump_pretty_printer::format_decoder_cb): New member function.
4721 (dump_pretty_printer::decode_format): New member function.
4722 (dump_context::dump_printf_va): Reimplement in terms of
4723 dump_pretty_printer.
4724 (dump_context::dump_printf_loc_va): Convert final param from va_list
4726 (dump_context::begin_scope): Reimplement call to
4727 make_item_for_dump_printf.
4728 (dump_printf): Update for change to dump_printf_va.
4729 (dump_printf_loc): Likewise.
4730 (selftest::test_capture_of_dump_calls): Convert "stmt" from
4731 greturn * to gimple *. Add a test_decl. Add tests of dump_printf
4732 with %T, %E, and %G.
4733 * dumpfile.h (ATTRIBUTE_GCC_DUMP_PRINTF): New macro.
4734 (dump_printf): Replace ATTRIBUTE_PRINTF_2 with
4735 ATTRIBUTE_GCC_DUMP_PRINTF (2, 3).
4736 (dump_printf_loc): Replace ATTRIBUTE_PRINTF_3 with
4737 ATTRIBUTE_GCC_DUMP_PRINTF (3, 0).
4738 * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Convert
4739 use of HOST_WIDE_INT_PRINT_DEC on unsigned HOST_WIDE_INT "count"
4740 within a dump_printf_loc call to "%wu".
4741 (vector_alignment_reachable_p): Merge two dump_printf[_loc] calls,
4742 converting a use of HOST_WIDE_INT_PRINT_DEC to "%wd". Add a
4743 missing space after "=".
4744 * tree-vect-loop.c (vect_analyze_loop_2) Within a dump_printf
4745 call, convert use of HOST_WIDE_INT_PRINT_DEC to "%wd".
4746 * tree-vect-slp.c (vect_slp_bb): Within a dump_printf_loc call,
4747 convert use of HOST_WIDE_INT_PRINT_UNSIGNED to "%wu".
4748 * tree-vectorizer.c (try_vectorize_loop_1): Likewise. Remove
4749 duplicate "vectorized" from message.
4751 2018-08-17 Szabolcs Nagy <szabolcs.nagy@arm.com>
4753 * config/arm/arm-builtins.c (arm_init_simd_builtin_types): Clear
4754 polyNxK_t element's TYPE_STRING_FLAG.
4756 2018-08-17 Segher Boessenkool <segher@kernel.crashing.org>
4758 * config/rs6000/rs6000.md (*cbranch, *creturn): Name these patterns
4759 (they were unnamed before). Fix comments.
4761 2018-08-17 Nathan Sidwell <nathan@acm.org>
4763 * cppbuiltin.c: Include "cpplib.h", not "cpp-id-data.h".
4765 2018-08-17 Richard Biener <rguenther@suse.de>
4767 PR tree-optimization/86841
4768 * wide-int-range.cc (wide_int_range_lshift): Use to_uhwi.
4770 2018-08-17 Martin Liska <mliska@suse.cz>
4772 * common.opt: Remove Warn, Init and Report for options with
4773 Ignore/Deprecated flag. Warning is done automatically for
4775 * config/i386/i386.opt: Likewise.
4776 * config/ia64/ia64.opt: Likewise.
4777 * config/rs6000/rs6000.opt: Likewise.
4778 * cppbuiltin.c (define_builtin_macros_for_compilation_flags):
4779 Remove usage of flag_check_pointer_bounds.
4780 * lto-wrapper.c (merge_and_complain): Do not handle
4781 OPT_fcheck_pointer_bounds.
4782 (append_compiler_options): Likewise.
4783 * opt-functions.awk: Do not handle Deprecated.
4784 * optc-gen.awk: Check that Var, Report and Init are not
4785 used for an option with Ignore/Deprecated flag.
4786 * opts-common.c (decode_cmdline_option): Do not report
4788 (read_cmdline_option): Report warning for OPT_SPECIAL_deprecated
4790 * opts.h (struct cl_option): Remove cl_deprecated flag.
4791 (CL_ERR_DEPRECATED): Remove error enum value.
4793 2018-08-17 Richard Biener <rguenther@suse.de>
4796 * tree-inline.c (copy_bb): When inlining __builtin_va_arg_pack_len ()
4797 across a va-arg-pack using call adjust its return value accordingly.
4799 2018-08-16 Martin Sebor <msebor@redhat.com>
4801 PR tree-optimization/86853
4802 * gimple-ssa-sprintf.c (struct format_result): Rename member.
4803 (struct fmtresult): Add member and initialize it in ctors.
4804 (format_character): Handle %C. Extend range to NUL. Set MAYFAIL.
4805 (format_string): Handle %S the same as %ls. Set MAYFAIL.
4806 (format_directive): Set POSUNDER4K when MAYFAIL is set.
4807 (parse_directive): Handle %C same as %c.
4808 (sprintf_dom_walker::compute_format_length): Adjust.
4809 (is_call_safe): Adjust.
4811 2018-08-16 Bernd Edlinger <bernd.edlinger@hotmail.de>
4813 * builtins.c (c_strlen): Add new parameter eltsize. Use it
4814 for determining how to count the elements.
4815 * builtins.h (c_strlen): Adjust prototype.
4816 * expr.c (string_constant): Add new parameter mem_size.
4817 Set *mem_size appropriately.
4818 * expr.h (string_constant): Adjust protoype.
4819 * gimple-fold.c (get_range_strlen): Add new parameter eltsize.
4820 * gimple-fold.h (get_range_strlen): Adjust prototype.
4821 * gimple-ssa-sprintf.c (get_string_length): Add new parameter eltsize.
4822 (format_string): Call get_string_length with eltsize.
4824 2018-08-16 David Malcolm <dmalcolm@redhat.com>
4826 * diagnostic.c (default_diagnostic_start_span_fn): Call pp_string
4827 to emit the span, rather than setting it as the prefix.
4829 2018-08-16 David Malcolm <dmalcolm@redhat.com>
4831 * diagnostic-show-locus.c (layout::start_annotation_line): Add
4832 "margin_char" parameter, defaulting to space. Use it in place
4833 of pp_space for the initial part of the margin.
4834 (layout::print_leading_fixits): Use '+' when filling the margin
4835 of line-insertion fix-it hints.
4837 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
4839 * config/rs6000/rs6000.md (two unnamed define_insn and define_split):
4842 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
4844 * config/rs6000/altivec.md: Don't set length attribute to the default
4846 * config/rs6000/darwin.md: Ditto.
4847 * config/rs6000/dfp.md: Ditto.
4848 * config/rs6000/htm.md: Ditto.
4849 * config/rs6000/rs6000.md: Ditto.
4850 * config/rs6000/sync.md: Ditto.
4851 * config/rs6000/vsx.md: Ditto.
4853 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
4855 * config/rs6000/altivec.md: Don't set length attribute to the default
4856 value, for branch instructions.
4857 * config/rs6000/darwin.md: Ditto.
4858 * config/rs6000/rs6000.md: Ditto.
4860 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
4862 * config/rs6000/rs6000.md (length): Always define as const_int 4.
4863 (unnamed conditional branch define_insn): Set length to 4 or 8
4864 depending on offset.
4865 (<bd>_<mode>): Similar, for alternative 0.
4866 (<bd>tf_<mode>): Ditto.
4868 2018-08-16 Tamar Christina <tamar.christina@arm.com>
4870 * expr.c (copy_blkmode_to_reg): Perform larger copies when safe.
4872 2018-08-16 Matthew Malcomson <matthew.malcomson@arm.com>
4874 * doc/rtl.texi: Replace old RTX class names with new names.
4877 2018-08-16 Vlad Lazar <vlad.lazar@arm.com>
4879 * expmed.h (canonicalize_comparison): New declaration.
4880 * expmed.c (canonicalize_comparison, equivalent_cmp_code): New function.
4881 * expmed.c (emit_store_flag_1): Add call to canonicalize_comparison.
4882 * optabs.c (prepare_cmp_insn): Likewise.
4883 * rtl.h (unsigned_condition_p): New function which checks if a
4884 comparison operator is unsigned.
4886 2018-08-16 Nathan Sidwell <nathan@acm.org>
4888 * config/rs6000/rs6000-c.c (rs6000_macro_to_expend): Use cpp_macro_p.
4889 * config/powerpcspc/powerpcspe-c.c (rs6000_macro_to_expend): Likewise.
4891 2018-08-16 Tamar Christina <tamar.christina@arm.com>
4894 * config/arm/arm.c (arm_can_change_mode_class): Disallow subreg.
4895 * config/arm/neon.md (movv4hf, movv8hf): Refactored to..
4896 (mov<mov>): ..this and enable unconditionally.
4898 2018-08-16 Tamar Christina <tamar.christina@arm.com>
4900 * config/arm/neon.md (*neon_mov<mode>): Remove reg-to-reg alternative.
4902 2018-08-16 Sam Tebbs <sam.tebbs@arm.com>
4904 * config/aarch64/aarch64.opt (mlow-precision-recip-sqrt)
4905 (mlow-precision-sqrt, mlow-precision-div, mverbose-cost-dump): Replace
4906 "Common" with "Target".
4908 2018-08-15 Uros Bizjak <ubizjak@gmail.com>
4910 * config/i386/i386.opt (mmitigate-rop): Mark as deprecated.
4911 * doc/invoke.texi (mmitigate-rop): Remove.
4912 * config/i386/i386.c: Do not include "regrename.h".
4913 (ix86_rop_should_change_byte_p, reg_encoded_number)
4914 (ix86_get_modrm_for_rop, set_rop_modrm_reg_bits, ix86_mitigate_rop):
4916 (ix86_reorg): Remove call to ix86_mitigate_rop.
4917 * config/i386/i386.md (attr "modrm_class"): Remove.
4918 (cmp<mode>_ccno_1, mov<mode>_xor, movstrict<mode>_xor)
4919 (x86_mov<mode>cc_0_m1. x86_mov<mode>cc_0_m1_se)
4920 (x86_mov<mode>cc_0_m1_neg): Remove modrm_class attribute override.
4922 2018-08-15 Will Schmidt <will_schmidt@vnet.ibm.com>
4924 * config/rs6000/rs600.c (rs6000_gimple_fold_builtin): Add entries to
4925 allow folding of mergeh() and mergel() for the float and double types.
4926 (fold_mergehl_helper): Rework to handle building a permute tree
4929 2018-08-15 Uros Bizjak <ubizjak@gmail.com>
4931 * config/i386/i386.c (expand_vec_perm_movs): Enable V4SFmode
4934 2018-08-15 David Malcolm <dmalcolm@redhat.com>
4936 * common.opt (fdiagnostics-show-labels): New option.
4937 * diagnostic-show-locus.c (class layout_range): Add field
4939 (class layout): Add field "m_show_labels_p".
4940 (layout_range::layout_range): Add param "label" and use it to
4942 (make_range): Pass in NULL for new "label" param of layout_range's
4944 (layout::layout): Initialize m_show_labels_p.
4945 (layout::maybe_add_location_range): Pass in loc_range->m_label
4946 when constructing layout_range instances.
4947 (struct line_label): New struct.
4948 (layout::print_any_labels): New member function.
4949 (layout::print_line): Call it if label-printing is enabled.
4950 (selftest::test_one_liner_labels): New test.
4951 (selftest::test_diagnostic_show_locus_one_liner): Call it.
4952 * diagnostic.c (diagnostic_initialize): Initialize
4953 context->show_labels_p.
4954 * diagnostic.h (struct diagnostic_context): Add field
4956 * doc/invoke.texi (Diagnostic Message Formatting Options): Add
4957 -fno-diagnostics-show-labels.
4958 * dwarf2out.c (gen_producer_string): Add
4959 OPT_fdiagnostics_show_labels to the ignored options.
4960 * gcc-rich-location.c (gcc_rich_location::add_expr): Add "label"
4962 (gcc_rich_location::maybe_add_expr): Likewise.
4963 * gcc-rich-location.h (gcc_rich_location::gcc_rich_location): Add
4964 label" param, defaulting to NULL.
4965 (gcc_rich_location::add_expr): Add "label" param.
4966 (gcc_rich_location::maybe_add_expr): Likewise.
4967 (class text_range_label): New class.
4968 (class range_label_for_type_mismatch): New class.
4969 * gimple-ssa-sprintf.c (fmtwarn): Pass NULL for new label params
4970 of format_warning_va.
4971 (fmtwarn_n): Likewise for new params of format_warning_n_va.
4972 * lto-wrapper.c (merge_and_complain): Add
4973 OPT_fdiagnostics_show_labels to the "pick one setting" options.
4974 (append_compiler_options): Likewise to the dropped options.
4975 (append_diag_options): Likewise to the passed-on options.
4976 * opts.c (common_handle_option): Handle the new option.
4977 * selftest-diagnostic.c
4978 (test_diagnostic_context::test_diagnostic_context): Enable
4980 * substring-locations.c: Include "gcc-rich-location.h".
4981 (format_warning_n_va): Add "fmt_label" and "param_label" params
4982 and use them as appropriate.
4983 (format_warning_va): Add "fmt_label" and "param_label" params,
4984 passing them on to format_warning_n_va.
4985 (format_warning_at_substring): Likewise.
4986 (format_warning_at_substring_n): Likewise.
4987 * substring-locations.h (format_warning_va): Add "fmt_label" and
4988 "param_label" params.
4989 (format_warning_n_va): Likewise.
4990 (format_warning_at_substring): Likewise.
4991 (format_warning_at_substring_n): Likewise.
4992 * toplev.c (general_init): Initialize global_dc->show_labels_p.
4994 2018-08-15 Qing Zhao <qing.zhao@oracle.com>
4997 * builtins.c (expand_builtin_memcmp): Do not expand the call
4998 when overflow is detected.
5000 2018-08-15 Martin Sebor <msebor@redhat.com>
5002 PR tree-optimization/71625
5003 * config/aarch64/aarch64-builtins.c
5004 (aarch64_init_simd_builtin_types): Clear Poly8_t's TYPE_STRING_FLAG.
5006 2018-08-15 Ilya Leoshkevich <iii@linux.ibm.com>
5008 * config/s390/s390.c (s390_reorg): Remove loop.
5010 2018-08-15 Iain Sandoe <iain@sandoe.co.uk>
5013 (darwin_function_switched_text_sections): Delete.
5014 * gcc/config/darwin.h
5015 (TARGET_ASM_FUNCTION_SWITCHED_TEXT_SECTIONS): Likewise.
5017 2018-08-15 Iain Sandoe <iain@sandoe.co.uk>
5020 * config/darwin.h: (DEBUG_STR_OFFSETS_SECTION, DEBUG_LOCLISTS_SECTION,
5021 DEBUG_RNGLISTS_SECTION) new macros. (DEBUG_PUBNAMES_SECTION,
5022 DEBUG_PUBTYPES_SECTION) update to include GNU variant.
5024 2018-08-15 Martin Liska <mliska@suse.cz>
5026 PR tree-optimization/86925
5027 * predict.c (expr_expected_value_1): When taking
5028 later predictor, assign also probability.
5029 Use fold_build2_initializer_loc in order to fold
5030 the expression in -frounding-math.
5032 2018-08-14 Allan Sandfeld Jensen <allan.jensen@qt.io>
5034 * config/i386/i386.c (expand_vec_perm_movs): New method matching movs
5036 (expand_vec_perm_1): Try the new method.
5038 2018-08-14 Ilya Leoshkevich <iii@linux.ibm.com>
5041 * lra-lives.c (remove_some_program_points_and_update_live_ranges):
5042 Check whether lra_live_max_point is 0 before dividing.
5044 2018-08-14 Martin Sebor <msebor@redhat.com>
5046 PR tree-optimization/86650
5047 * tree-vrp.c (vrp_prop::check_array_ref): Print an inform message.
5048 (vrp_prop::check_mem_ref): Same.
5050 2018-08-13 Liu Hao <lh_mouse@126.com>
5052 * pretty-print.c (eat_esc_sequence): Swap the foreground and
5053 background colors if the COMMON_LVB_REVERSE_VIDEO flag is set,
5054 and clear it thereafter, as it only works for DBCS.
5056 2018-08-13 Liu Hao <lh_mouse@126.com>
5058 * pretty-print.c (mingw_ansi_fputs): Do not call _close() on the
5059 handle returned by _get_osf_handle().
5061 2018-08-13 Will Schmidt <will_schmidt@vnet.ibm.com>
5063 * gcc/config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add support
5064 for folding vec_perm.
5066 2018-08-13 Will Schmidt <will_schmidt@vnet.ibm.com>
5068 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin):
5069 Add support for gimple-folding of vec_pack() and vec_unpack()
5072 2018-08-13 Will Schmidt <will_schmidt@vnet.ibm.com>
5074 * config/rs6000/rs6000.c (rs6000_builtin_valid_without_lhs): Add
5075 vec_xst variants to the list.
5076 (rs6000_gimple_fold_builtin): Add support for folding unaligned
5077 vector loads and stores.
5079 2018-08-13 David Edelsohn <dje.gcc@gmail.com>
5081 * config.gcc (rs6000-ibm-aix4.x): Delete.
5082 (rs6000-ibm-aix5.1): Delete.
5083 (rs6000-ibm-aix5.2): Delete.
5084 (rs6000-ibm-aix5.3): Delete.
5085 * config/rs6000/aix43.h: Delete.
5086 * config/rs6000/aix51.h: Delete.
5087 * config/rs6000/aix52.h: Delete.
5088 * config/rs6000/t-aix43: Delete.
5090 2018-08-13 Ilya Leoshkevich <iii@linux.ibm.com>
5092 * config/s390/s390.c (s390_decompose_constant_pool_ref):
5094 (s390_decompose_address): Factor out constant pool ref
5097 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
5099 * config/nds32/nds32-predicates.c
5100 (nds32_can_use_bclr_p): Change return type as bool.
5101 (nds32_can_use_bset_p): Ditto.
5102 (nds32_can_use_btgl_p): Ditto.
5103 (nds32_can_use_bitci_p): Ditto.
5104 * config/nds32/nds32-protos.h
5105 (nds32_can_use_bclr_p): Change declaration.
5106 (nds32_can_use_bset_p): Ditto.
5107 (nds32_can_use_btgl_p): Ditto.
5108 (nds32_can_use_bitci_p): Ditto.
5110 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
5112 * config/nds32/nds32.c (nds32_expand_prologue, nds32_expand_epilogue):
5113 Support -msched-prolog-epilog option.
5114 * config/nds32/nds32.opt (msched-prolog-epilog): New option.
5116 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
5118 * common/config/nds32/nds32-common.c
5119 (nds32_option_optimization_table): Enalbe -malways-align.
5121 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
5123 * config.gcc (nds32*): Add nds32_isr.h and nds32_init.inc in
5125 * common/config/nds32/nds32-common.c (nds32_handle_option): Handle
5126 OPT_misr_secure_ case.
5127 * config/nds32/nds32-isr.c: Implementation of backward compatibility.
5128 * config/nds32/nds32-protos.h (nds32_isr_function_critical_p): New.
5129 * config/nds32/nds32.c (nds32_attribute_table): Add critical and
5131 * config/nds32/nds32.h (nds32_isr_nested_type): Add NDS32_CRITICAL.
5132 (nds32_isr_info): New field security_level.
5133 (TARGET_ISR_VECTOR_SIZE_4_BYTE): New macro.
5134 * config/nds32/nds32.md (return_internal): Consider critical attribute.
5135 * config/nds32/nds32.opt (misr-secure): New option.
5136 * config/nds32/nds32_init.inc: New file.
5137 * config/nds32/nds32_isr.h: New file.
5139 2018-08-11 John David Anglin <danglin@gcc.gnu.org>
5141 * config/pa/pa.md (UNSPEC_MEMORY_BARRIER): New unspec enum.
5142 Update comment for atomic instructions.
5143 (atomic_storeqi, atomic_storehi, atomic_storesi, atomic_storesf,
5144 atomic_loaddf, atomic_loaddf_1, atomic_storedf, atomic_storedf_1):
5146 (atomic_loaddi): Revise fence expansion to only emit fence prior to
5147 load for __ATOMIC_SEQ_CST model.
5148 (atomic_loaddi_1): Remove float register target.
5149 (atomic_storedi): Handle CONST_INT values.
5150 (atomic_storedi_1): Remove float register source. Add special case
5152 (memory_barrier): New expander and insn.
5154 2018-08-11 Jakub Jelinek <jakub@redhat.com>
5156 PR tree-optimization/86835
5157 * tree-ssa-math-opts.c (insert_reciprocals): Even when inserting
5158 new_stmt after def_gsi, make sure to insert new_square_stmt after
5159 that stmt, not 2 stmts before it.
5161 2018-08-10 Alexander Monakov <amonakov@ispras.ru>
5164 * config/i386/i386.md (<s>mul<mode>3_highpart): Use DWIH mode iterator
5167 2018-08-10 Martin Liska <mliska@suse.cz>
5170 * builtin-types.def (BT_FN_LONG_LONG_LONG_DOUBLE): Add new
5172 * builtins.c (expand_builtin_expect_with_probability):
5174 (expand_builtin_expect_with_probability): New function.
5175 (build_builtin_expect_predicate): Add new argumnet probability
5176 for BUILT_IN_EXPECT_WITH_PROBABILITY.
5177 (fold_builtin_expect):
5180 * builtins.def (BUILT_IN_EXPECT_WITH_PROBABILITY):
5181 * builtins.h (fold_builtin_expect): Set new argument.
5182 * doc/extend.texi: Document __builtin_expect_with_probability.
5183 * doc/invoke.texi: Likewise.
5184 * gimple-fold.c (gimple_fold_call): Pass new argument.
5185 * ipa-fnsummary.c (find_foldable_builtin_expect): Handle
5186 also BUILT_IN_EXPECT_WITH_PROBABILITY.
5187 * predict.c (get_predictor_value): New function.
5188 (expr_expected_value): Add new argument probability. Assume
5189 that predictor and probability are always non-null.
5190 (expr_expected_value_1): Likewise. For __builtin_expect and
5191 __builtin_expect_with_probability set probability. Handle
5192 combination in binary expressions.
5193 (tree_predict_by_opcode): Simplify code by simply calling
5194 get_predictor_value.
5195 (pass_strip_predict_hints::execute): Add handling of
5196 BUILT_IN_EXPECT_WITH_PROBABILITY.
5197 * predict.def (PRED_BUILTIN_EXPECT_WITH_PROBABILITY): Add
5199 * tree.h (DECL_BUILT_IN_P): New function.
5201 2018-08-10 Martin Liska <mliska@suse.cz>
5203 PR tree-optimization/85799
5204 * passes.def: Add argument for pass_strip_predict_hints.
5205 * predict.c (class pass_strip_predict_hints): Add new argument
5207 (strip_predictor_early): New function.
5208 (pass_strip_predict_hints::execute): Call the function to
5210 (strip_predict_hints): New function.
5211 * predict.def: Fix comment.
5213 2018-08-10 Thomas Preud'homme <thomas.preudhomme@linaro.org>
5215 * Makefile.in: Clarify which tm.texi to copy over to assert the
5216 right to grant a GFDL license for all.
5218 2018-08-09 Jeff Law <law@redhat.com>
5220 * config/m68k/m68k.c (m68k_adjust_decorated_operand): Remove
5223 2018-08-09 Andreas Schwab <schwab@linux-m68k.org>
5225 * config/m68k/m68k-protos.h (m68k_final_prescan_insn): Remove
5228 2018-08-09 Richard Sandiford <richard.sandiford@arm.com>
5230 * tree-vect-loop.c (vectorizable_reduction): Allow inner-loop
5231 reductions for variable-length vectors.
5233 2018-08-09 David Malcolm <dmalcolm@redhat.com>
5236 * common.opt (fdiagnostics-show-line-numbers): New option.
5237 * diagnostic-show-locus.c (class layout): Add fields
5238 "m_show_line_numbers_p" and "m_linenum_width";
5239 (num_digits): New function.
5240 (test_num_digits): New function.
5241 (layout::layout): Initialize new fields. Update m_x_offset
5242 logic to handle any left margin.
5243 (layout::print_source_line): Print line number when requested.
5244 (layout::start_annotation_line): New member function.
5245 (layout::print_annotation_line): Call it.
5246 (layout::print_leading_fixits): Likewise.
5247 (layout::print_trailing_fixits): Likewise. Update calls to
5248 move_to_column for new parameter.
5249 (layout::get_x_bound_for_row): Add "add_left_margin" param and use
5250 it to potentially call start_annotation_line.
5251 (layout::show_ruler): Call start_annotation_line.
5252 (selftest::test_line_numbers_multiline_range): New selftest.
5253 (selftest::diagnostic_show_locus_c_tests): Call test_num_digits
5254 and selftest::test_line_numbers_multiline_range.
5255 * diagnostic.c (diagnostic_initialize): Initialize
5256 show_line_numbers_p.
5257 * diagnostic.h (struct diagnostic_context): Add field
5258 "show_line_numbers_p".
5259 * doc/invoke.texi (Diagnostic Message Formatting Options): Add
5260 -fno-diagnostics-show-line-numbers.
5261 * dwarf2out.c (gen_producer_string): Add
5262 OPT_fdiagnostics_show_line_numbers to the ignored options.
5263 * lto-wrapper.c (merge_and_complain): Likewise to the "pick
5264 one setting" options.
5265 (append_compiler_options): Likewise to the dropped options.
5266 (append_diag_options): Likewise to the passed-on options.
5267 * opts.c (common_handle_option): Handle the new option.
5268 * toplev.c (general_init): Set up global_dc->show_line_numbers_p.
5270 2018-08-09 Kelvin Nilsen <kelvin@gcc.gnu.org>
5272 * doc/extend.texi (PowerPC AltiVec Built-in Functions Available on
5273 ISA 2.07): Correct spelling of bcdsub to be __builtin_bcdsub. Add
5274 third argument of type "const signed char" to descriptions of
5275 __builtin_bcdadd, __builtin_bcdadd_lt, __builtin_bcdadd_eq,
5276 __builtin_bcdadd_gt, __builtin_bcdadd_ov, __builtin_bcdsub,
5277 __builtin_bcdsub_lt, __builtin_bcdsub_eq, __builtin_bcdsub_gt,
5278 __builtin_bcdsub_ov functions.
5280 2018-08-09 Richard Sandiford <richard.sandiford@arm.com>
5282 PR tree-optimization/86858
5283 * tree-vect-loop.c (vect_is_simple_reduction): Restore
5284 flow_bb_inside_loop_p calls.
5286 2018-08-09 Richard Sandiford <richard.sandiford@arm.com>
5288 PR tree-optimization/86871
5289 * tree-vect-stmts.c (vect_transform_stmt): Use gimple_get_lhs
5290 instead of gimple_assign_lhs.
5292 2018-08-09 Richard Earnshaw <rearnsha@arm.com>
5295 * config/aarch64/aarch64.md (add<mode>3_carryinC_zero): Add missing
5296 register constraint to operand 0.
5297 (add<mode>3_carryinC): Likewise.
5298 (add<mode>3_carryinV_zero, add<mode>3_carryinV): Likewise.
5300 2018-08-09 Martin Liska <mliska@suse.cz>
5303 * common.opt: Remove extra line.
5305 2018-08-09 Martin Liska <mliska@suse.cz>
5307 * params.def (PARAM_ALIGN_LOOP_ITERATIONS): Remove double dots
5308 at the end of a line, make first letter capital and end up
5309 a sentence with a dot.
5310 (PARAM_LOOP_INTERCHANGE_STRIDE_RATIO): Likewise.
5311 (PARAM_LOOP_BLOCK_TILE_SIZE): Likewise.
5312 (PARAM_GRAPHITE_MAX_NB_SCOP_PARAMS): Likewise.
5313 (PARAM_GRAPHITE_MAX_ARRAYS_PER_SCOP): Likewise.
5314 (PARAM_MAX_ISL_OPERATIONS): Likewise.
5315 (PARAM_GRAPHITE_ALLOW_CODEGEN_ERRORS): Likewise.
5316 (PARAM_PROFILE_FUNC_INTERNAL_ID): Likewise.
5317 (PARAM_INDIR_CALL_TOPN_PROFILE): Likewise.
5318 (PARAM_SLP_MAX_INSNS_IN_BB): Likewise.
5319 (PARAM_IPA_CP_EVAL_THRESHOLD): Likewise.
5320 (PARAM_IPA_CP_RECURSION_PENALTY): Likewise.
5321 (PARAM_IPA_CP_SINGLE_CALL_PENALTY): Likewise.
5322 (PARAM_IPA_CP_LOOP_HINT_BONUS): Likewise.
5323 (PARAM_IPA_CP_ARRAY_INDEX_HINT_BONUS): Likewise.
5324 (PARAM_TREE_REASSOC_WIDTH): Likewise.
5325 (PARAM_HSA_GEN_DEBUG_STORES): Likewise.
5326 (PARAM_MAX_SPECULATIVE_DEVIRT_MAYDEFS): Likewise.
5327 (PARAM_MAX_VRP_SWITCH_ASSERTIONS): Likewise.
5329 2018-08-09 Andreas Krebbel <krebbel@linux.ibm.com>
5332 * config/s390/s390.c (s390_option_override_internal): Reduce the
5333 stack-clash-protection-probe-interval param if it would be too big
5336 2018-08-08 Andreas Schwab <schwab@linux-m68k.org>
5339 * config/m68k/m68k.h (FINAL_PRESCAN_INSN): Don't define.
5340 * config/m68k/m68k.c (handle_move_double): Don't call
5341 m68k_final_prescan_insn.
5342 (m68k_adjust_decorated_operand): Renamed from
5343 m68k_final_prescan_insn, remove first and third operand and
5345 (print_operand): Call it.
5346 (print_operand_address): Call it.
5348 2018-08-08 Nathan Sidwell <nathan@acm.org>
5350 * diagnostic.c (diagnostic_report_current_module): Use
5351 linemap_included_from & linemap_included_from_linemap.
5353 2018-08-08 Hongbo Zhang <hongbo.zhang@linaro.org>
5355 * config/aarch64/aarch64-cores.def: Add phecda core.
5356 * config/aarch64/aarch64-tune.md: Regenerate.
5357 * doc/invoke.texi: Add phecda core.
5359 2018-08-08 Andreas Krebbel <krebbel@linux.ibm.com>
5362 * config/s390/constraints.md ("NxHD0", "NxSD0"): New constraint
5364 * config/s390/s390.md ("movti"): Add more alternatives for
5365 constant to GPR copies.
5367 2018-08-08 Andreas Krebbel <krebbel@linux.ibm.com>
5369 * config/s390/s390.c: Fix whitespace damage throughout the file.
5370 * config/s390/s390.h: Likewise.
5371 * config/s390/tpf.h: Likewise.
5373 2018-08-08 Ilya Leoshkevich <iii@linux.ibm.com>
5375 * config/s390/s390.c (s390_loadrelative_operand_p):
5376 Remove TARGET_CPU_ZARCH usages.
5377 (s390_rtx_costs): Likewise.
5378 (s390_legitimate_constant_p): Likewise.
5379 (s390_cannot_force_const_mem): Likewise.
5380 (legitimate_reload_constant_p): Likewise.
5381 (s390_preferred_reload_class): Likewise.
5382 (legitimize_pic_address): Likewise.
5383 (legitimize_tls_address): Likewise.
5384 (s390_split_branches): Removed.
5385 (s390_add_execute): Removed.
5386 (s390_dump_pool): Remove TARGET_CPU_ZARCH usages.
5387 (s390_mainpool_start): Likewise.
5388 (s390_mainpool_finish): Likewise.
5389 (s390_mainpool_cancel): Removed.
5390 (s390_chunkify_start): Remove TARGET_CPU_ZARCH usages.
5391 (s390_chunkify_cancel): Likewise.
5392 (s390_return_addr_rtx): Likewise.
5393 (s390_register_info): Remove split_branches_pending_p uages.
5394 (s390_optimize_register_info): Likewise.
5395 (s390_init_frame_layout): Remove TARGET_CPU_ZARCH and
5396 split_branches_pending_p usages.
5397 (s390_can_eliminate): Remove TARGET_CPU_ZARCH usages.
5398 (s390_load_got): Likewise.
5399 (s390_expand_split_stack_prologue): Likewise.
5400 (output_asm_nops): Likewise.
5401 (s390_function_profiler): Likewise.
5402 (s390_emit_call): Likewise.
5403 (s390_conditional_register_usage): Likewise.
5404 (s390_optimize_prologue): Likewise.
5405 (s390_reorg): Remove TARGET_CPU_ZARCH and
5406 split_branches_pending_p usages.
5407 (s390_option_override_internal): Remove TARGET_CPU_ZARCH
5409 (s390_output_indirect_thunk_function): Likewise.
5410 * config/s390/s390.h (TARGET_CPU_ZARCH): Removed.
5411 (TARGET_CPU_ZARCH_P): Removed.
5412 (struct machine_function): Remove split_branches_pending_p.
5413 * config/s390/s390.md: Remove TARGET_CPU_ZARCH usages.
5415 2018-08-08 Ilya Leoshkevich <iii@linux.ibm.com>
5417 * common/config/s390/s390-common.c (processor_flags_table):
5419 * config.gcc: Remove with_arch/with_tune support.
5420 * config/s390/2064.md: Remove cpu attribute comparisons.
5421 * config/s390/driver-native.c (s390_host_detect_local_cpu):
5423 * config/s390/linux.h (ASM_SPEC):
5424 Remove -march support.
5425 * config/s390/s390-c.c (s390_cpu_cpp_builtins_internal):
5426 Use a table to get an arch level.
5427 * config/s390/s390-opts.h (enum processor_type):
5429 * config/s390/s390.c
5430 (processor_table): Remove entries, add arch_level values.
5431 (s390_issue_rate): Remove cases.
5432 (s390_option_override): Adjust
5433 s390_option_override_internal() call.
5434 (s390_option_override_internal): Remove deprecation warning.
5435 (s390_valid_target_attribute_tree): Adjust
5436 s390_option_override_internal() call.
5437 * config/s390/s390.h (struct s390_processor):
5438 Share with s390-c.c, add arch_level field.
5439 * config/s390/s390.md:
5440 Remove occurrences in cpu attribute.
5441 * config/s390/s390.opt: Remove -march/-mtune support.
5442 * config/s390/tpf.h (ASM_SPEC): Remove -march support.
5443 * doc/invoke.texi: Remove deprecation warning.
5445 2018-08-08 Luis Machado <luis.machado@linaro.org>
5447 * config/aarch64/aarch64.c (qdf24xx_vector_cost): New static
5449 (qdf24xx_tunings): Set vector cost structure to
5450 qdf24xx_vector_cost.
5452 * config/aarch64/aarch64.c (qdf24xx_addrcost_table)
5453 <register_sextend>: Set to 3.
5455 2018-08-07 Richard Sandiford <richard.sandiford@arm.com>
5458 * config/aarch64/iterators.md (FRECP, frecp_suffix): Delete.
5459 * config/aarch64/aarch64-simd.md
5460 (aarch64_frecp<FRECP:frecp_suffix><mode>): Fold FRECPE into...
5461 (@aarch64_frecpe<mode>): ...here and the move FRECPX to...
5462 (aarch64_frecpx<mode>): ...this new pattern.
5463 * config/aarch64/aarch64-simd-builtins.def: Remove comment
5464 about aarch64_frecp<FRECP:frecp_suffix><mode>.
5466 2018-08-07 Martin Liska <mliska@suse.cz>
5469 * predict.c (expr_expected_value_1): Handle DECL_IS_MALLOC,
5470 BUILT_IN_REALLOC and DECL_IS_OPERATOR_NEW.
5471 * predict.def (PRED_MALLOC_NONNULL): New predictor.
5472 * doc/extend.texi: Document that malloc attribute adds
5475 2018-08-06 John David Anglin <danglin@gcc.gnu.org>
5478 * config/pa/pa.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
5479 Define to speculation_safe_value_not_needed.
5481 2018-08-06 Jeff Law <law@redhat.com>
5483 * tree-ssa-dom.c (dom_opt_dom_walker::optimize_stmt): Pass down
5484 the vr_values instance to cprop_into_stmt.
5485 (cprop_into_stmt): Pass vr_values instance down to cprop_operand.
5486 (cprop_operand): Also query EVRP to determine if OP is a constant.
5488 2018-08-06 Nathan Sidwell <nathan@acm.org>
5490 * diagnostic.c (diagnostic_report_current_module): Reroll
5491 included-at loop. Translate text.
5493 2018-08-06 David Malcolm <dmalcolm@redhat.com>
5495 * function-tests.c (selftest::test_expansion_to_rtl): Call
5496 free_after_compilation.
5498 2018-08-06 Alan Hayward <alan.hayward@arm.com>
5500 * config/aarch64/aarch64.md: Add clobber highs to tls_desc.
5502 2018-08-06 Andreas Krebbel <krebbel@linux.ibm.com>
5504 * config/s390/s390.c (s390_loop_unroll_adjust): Prevent small
5505 loops with memory block operations from getting unrolled.
5507 2018-08-06 Ulrich Weigand <uweigand@de.ibm.com>
5510 * config/spu/spu.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
5511 Define to speculation_safe_value_not_needed.
5513 2018-08-06 Jeff Law <law@redhat.com>
5515 * reload1.c (forget_old_reloads_1): Adjust CLOBBER_HIGH
5518 2018-08-06 Jozef Lawrynowicz <jozef.l@mittosystems.com>
5521 * gcc/tree.c (build_common_tree_nodes): Initialize integer_types array
5522 with all enabled __intN types.
5524 * gcc/testsuite/gcc.target/msp430/pr86662.c: New test.
5526 2018-08-06 Alan Hayward <alan.hayward@arm.com>
5528 * alias.c (record_set): Check for clobber high.
5529 * cfgexpand.c (expand_gimple_stmt): Likewise.
5530 * combine-stack-adj.c (single_set_for_csa): Likewise.
5531 * combine.c (find_single_use_1): Likewise.
5532 (set_nonzero_bits_and_sign_copies): Likewise.
5533 (get_combine_src_dest): Likewise.
5534 (is_parallel_of_n_reg_sets): Likewise.
5535 (try_combine): Likewise.
5536 (record_dead_and_set_regs_1): Likewise.
5537 (reg_dead_at_p_1): Likewise.
5538 (reg_dead_at_p): Likewise.
5539 * dce.c (deletable_insn_p): Likewise.
5540 (mark_nonreg_stores_1): Likewise.
5541 (mark_nonreg_stores_2): Likewise.
5542 * df-scan.c (df_find_hard_reg_defs): Likewise.
5543 (df_uses_record): Likewise.
5544 (df_get_call_refs): Likewise.
5545 * dwarf2out.c (mem_loc_descriptor): Likewise.
5546 * haifa-sched.c (haifa_classify_rtx): Likewise.
5547 * ira-build.c (create_insn_allocnos): Likewise.
5548 * ira-costs.c (scan_one_insn): Likewise.
5549 * ira.c (equiv_init_movable_p): Likewise.
5550 (rtx_moveable_p): Likewise.
5551 (interesting_dest_for_shprep): Likewise.
5552 * jump.c (mark_jump_label_1): Likewise.
5553 * postreload-gcse.c (record_opr_changes): Likewise.
5554 * postreload.c (reload_cse_simplify): Likewise.
5555 (struct reg_use): Add source expr.
5556 (reload_combine): Check for clobber high.
5557 (reload_combine_note_use): Likewise.
5558 (reload_cse_move2add): Likewise.
5559 (move2add_note_store): Likewise.
5560 * print-rtl.c (print_pattern): Likewise.
5561 * recog.c (decode_asm_operands): Likewise.
5562 (store_data_bypass_p): Likewise.
5563 (if_test_bypass_p): Likewise.
5564 * regcprop.c (kill_clobbered_value): Likewise.
5565 (kill_set_value): Likewise.
5566 * reginfo.c (reg_scan_mark_refs): Likewise.
5567 * reload1.c (maybe_fix_stack_asms): Likewise.
5568 (eliminate_regs_1): Likewise.
5569 (elimination_effects): Likewise.
5570 (mark_not_eliminable): Likewise.
5571 (scan_paradoxical_subregs): Likewise.
5572 (forget_old_reloads_1): Likewise.
5573 * reorg.c (find_end_label): Likewise.
5574 (try_merge_delay_insns): Likewise.
5575 (redundant_insn): Likewise.
5576 (own_thread_p): Likewise.
5577 (fill_simple_delay_slots): Likewise.
5578 (fill_slots_from_thread): Likewise.
5579 (dbr_schedule): Likewise.
5580 * resource.c (update_live_status): Likewise.
5581 (mark_referenced_resources): Likewise.
5582 (mark_set_resources): Likewise.
5583 * rtl.c (copy_rtx): Likewise.
5584 * rtlanal.c (reg_referenced_p): Likewise.
5585 (single_set_2): Likewise.
5586 (noop_move_p): Likewise.
5587 (note_stores): Likewise.
5588 * sched-deps.c (sched_analyze_reg): Likewise.
5589 (sched_analyze_insn): Likewise.
5591 2018-08-06 Alan Hayward <alan.hayward@arm.com>
5593 * cse.c (invalidate_reg): New function extracted from...
5594 (invalidate): ...here.
5595 (canonicalize_insn): Check for clobber high.
5596 (invalidate_from_clobbers): invalidate clobber highs.
5597 (invalidate_from_sets_and_clobbers): Likewise.
5598 (count_reg_usage): Check for clobber high.
5599 (insn_live_p): Likewise.
5600 * cselib.c (cselib_expand_value_rtx_1):Likewise.
5601 (cselib_invalidate_regno): Check for clobber in setter.
5602 (cselib_invalidate_rtx): Pass through setter.
5603 (cselib_invalidate_rtx_note_stores):
5604 (cselib_process_insn): Check for clobber high.
5605 * cselib.h (cselib_invalidate_rtx): Add operand.
5607 2018-08-06 Alan Hayward <alan.hayward@arm.com>
5609 * lra-eliminations.c (lra_eliminate_regs_1): Check for clobber high.
5610 (mark_not_eliminable): Likewise.
5611 * lra-int.h (struct lra_insn_reg): Add clobber high marker.
5612 * lra-lives.c (process_bb_lives): Check for clobber high.
5613 * lra.c (new_insn_reg): Remember clobber highs.
5614 (collect_non_operand_hard_regs): Check for clobber high.
5615 (lra_set_insn_recog_data): Likewise.
5616 (add_regs_to_insn_regno_info): Likewise.
5617 (lra_update_insn_regno_info): Likewise.
5619 2018-08-06 Alan Hayward <alan.hayward@arm.com>
5621 * rtl.h (reg_is_clobbered_by_clobber_high): Add declarations.
5622 * rtlanal.c (reg_is_clobbered_by_clobber_high): Add function.
5624 2018-08-06 Alan Hayward <alan.hayward@arm.com>
5626 * emit-rtl.c (verify_rtx_sharing): Check for CLOBBER_HIGH.
5627 (copy_insn_1): Likewise.
5628 (gen_hard_reg_clobber_high): New gen function.
5629 * genconfig.c (walk_insn_part): Check for CLOBBER_HIGH.
5630 * genemit.c (gen_exp): Likewise.
5631 (gen_emit_seq): Pass through info.
5632 (gen_insn): Check for CLOBBER_HIGH.
5633 (gen_expand): Pass through info.
5634 (gen_split): Likewise.
5635 (output_add_clobbers): Likewise.
5636 * genrecog.c (validate_pattern): Check for CLOBBER_HIGH.
5637 (remove_clobbers): Likewise.
5638 * rtl.h (gen_hard_reg_clobber_high): New declaration.
5640 2018-08-06 Alan Hayward <alan.hayward@arm.com>
5642 * doc/rtl.texi (clobber_high): Add.
5643 (parallel): Add in clobber high
5644 * rtl.c (rtl_check_failed_code3): Add function.
5645 * rtl.def (CLOBBER_HIGH): Add expression.
5646 * rtl.h (RTL_CHECKC3): Add macro.
5647 (rtl_check_failed_code3): Add declaration.
5648 (XC3EXP): Add macro.
5650 2018-08-05 H.J. Lu <hongjiu.lu@intel.com>
5653 * config/i386/i386.c (ix86_finalize_stack_frame_flags): Set
5654 cfun->machine->max_used_stack_alignment if needed.
5656 2018-08-04 Martin Sebor <msebor@redhat.com>
5658 PR tree-optimization/86571
5659 * gimple-ssa-sprintf.c (format_floating): Extend upper bound of
5662 2018-08-03 Sandra Loosemore <sandra@codesourcery.com>
5665 * config/nios2/nios2.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
5668 2018-08-03 Jeff Law <law@redhat.com>
5671 * config/mn10300/mn10300.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
5672 Define to speculation_safe_value_not_needed.
5674 2018-08-03 David Malcolm <dmalcolm@redhat.com>
5676 * doc/gcov.texi (-x): Remove duplicate "to".
5677 * doc/invoke.texi (-Wnoexcept-type): Remove duplicate "calls".
5678 (-Wif-not-aligned): Remove duplicate "is".
5679 (-flto): Remove duplicate "the".
5680 (MicroBlaze Options): In examples of "-mcpu=cpu-type", remove
5681 duplicate "v5.00.b".
5682 (MSP430 Options): Remove duplicate "and" from the description
5683 of "-mgprel-sec=regexp".
5684 (x86 Options): Remove duplicate copies of "vmldLog102" and
5685 vmlsLog104 from description of "-mveclibabi=type".
5687 2018-08-03 Richard Sandiford <richard.sandiford@arm.com>
5689 * internal-fn.h (first_commutative_argument): Declare.
5690 * internal-fn.c (first_commutative_argument): New function.
5691 * tree-vect-slp.c (vect_get_and_check_slp_defs): Remove extra
5692 restrictions for pattern statements. Use first_commutative_argument
5693 to look for commutative operands in calls to internal functions.
5695 2018-08-03 Aldy Hernandez <aldyh@redhat.com>
5697 * Makefile.in (wide-int-range.o): New.
5698 * tree-vrp.c: Move all the wide_int_* functions to...
5699 * wide-int-range.cc: ...here.
5700 * tree-vrp.h: Move all the wide_int_* prototypes to...
5701 * wide-int-range.h: ...here.
5703 2018-08-03 Tom de Vries <tdevries@suse.de>
5705 * common/config/nvptx/nvptx-common.c (nvptx_except_unwind_info): Return
5707 * config/nvptx/nvptx.c (TARGET_ASM_BYTE_OP): Remove define.
5708 * except.c (output_function_exception_table): Do early exit if
5709 targetm_common.except_unwind_info (&global_options) == UI_NONE.
5711 2018-08-03 Martin Liska <mliska@suse.cz>
5713 * predict.c (dump_prediction): Change to 2 digits
5716 2018-08-03 Siddhesh Poyarekar <siddhesh@sourceware.org>
5718 * config/aarch64/falkor.md (falkor_am_1_vxvy_vxvy): Move
5720 (falkor_am_1_gtov_gtov): ... a new insn reservation.
5722 2018-07-19 Ilya Leoshkevich <iii@linux.ibm.com>
5724 * config/nds32/nds32.c (nds32_hard_regno_mode_ok): Replace > with >=.
5725 * df-problems.c (df_remove_dead_eq_notes): Replace > with >=.
5726 * dwarf2out.c (mem_loc_descriptor): Replace > with >=.
5727 * lra-constraints.c (spill_hard_reg_in_range): Replace <= with <.
5728 * lra-remat.c (call_used_input_regno_present_p): Replace <= with <.
5730 2018-08-02 David Malcolm <dmalcolm@redhat.com>
5732 * diagnostic-show-locus.c (diagnostic_show_locus): Use
5733 pp_take_prefix when saving the existing prefix.
5734 * diagnostic.c (diagnostic_append_note): Likewise.
5735 * langhooks.c (lhd_print_error_function): Likewise.
5736 * pretty-print.c (pp_set_prefix): Drop the "const" from "prefix"
5737 param's type. Free the existing prefix.
5738 (pp_take_prefix): New function.
5739 (pretty_printer::pretty_printer): Drop the prefix parameter.
5740 Rename the length parameter to match the comment.
5741 (pretty_printer::~pretty_printer): Free the prefix.
5742 * pretty-print.h (pretty_printer::pretty_printer): Drop the prefix
5744 (struct pretty_printer): Drop the "const" from "prefix" field's
5745 type and clarify memory management.
5746 (pp_set_prefix): Drop the "const" from the 2nd param.
5747 (pp_take_prefix): New decl.
5749 2018-08-02 Aaron Sawdey <acsawdey@linux.ibm.com>
5751 * config/rs6000/rs6000-string.c (select_block_compare_mode): Move test
5752 for word_mode_ok here instead of passing as argument.
5753 (expand_block_compare): Change select_block_compare_mode() call.
5754 (expand_strncmp_gpr_sequence): New function.
5755 (expand_strn_compare): Make use of expand_strncmp_gpr_sequence.
5757 2018-08-02 Jeff Law <law@redhat.com>
5760 * config/m68k/m68k.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
5761 Define to speculation_safe_value_not_needed.
5764 * config/h8300/h8300.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
5765 Define to speculation_safe_value_not_needed.
5767 2018-08-02 Tom de Vries <tdevries@suse.de>
5770 * common/config/nvptx/nvptx-common.c (nvptx_except_unwind_info): New
5771 function. Return UI_TARGET unconditionally.
5772 (TARGET_EXCEPT_UNWIND_INFO): Redefine to nvptx_except_unwind_info.
5773 * config/nvptx/nvptx.c (TARGET_ASM_BYTE_OP): Emit commented out '.byte'.
5775 2018-08-02 Richard Sandiford <richard.sandiford@arm.com>
5777 * genemit.c (print_overload_test): Fix typo.
5779 2018-08-02 Richard Biener <rguenther@suse.de>
5781 PR tree-optimization/86816
5782 * tree-ssa-tail-merge.c (tail_merge_valueize): New function
5783 which checks for value availability before querying it.
5784 (gvn_uses_equal): Use it.
5785 (same_succ_hash): Likewise.
5786 (gimple_equal_p): Likewise.
5788 2018-08-02 Nick Clifton <nickc@redhat.com>
5791 * config/stormy16/stormy16.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
5792 Define to speculation_safe_value_not_needed.
5795 * config/v850/v850.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
5796 Define to speculation_safe_value_not_needed.
5799 * config/v850/v850.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
5800 Define to speculation_safe_value_not_needed.
5803 * config/rx/rx.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
5804 Define to speculation_safe_value_not_needed.
5807 * config/msp430/msp430.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
5808 Define to speculation_safe_value_not_needed.
5811 * config/mcore/mcore.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
5812 Define to speculation_safe_value_not_needed.
5815 * config/m32r/m32r.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
5816 Define to speculation_safe_value_not_needed.
5819 * config/iq2000/iq2000.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
5820 Define to speculation_safe_value_not_needed.
5823 * config/frv/frv.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define to
5824 speculation_safe_value_not_needed.
5827 * config/fr30/fr30.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define
5828 to speculation_safe_value_not_needed.
5830 2018-08-02 Richard Sandiford <richard.sandiford@arm.com>
5832 * doc/md.texi: Expand the documentation of instruction names
5833 to mention port-local uses. Document '@' in pattern names.
5834 * read-md.h (overloaded_instance, overloaded_name): New structs.
5836 (md_reader::handle_overloaded_name): New member function.
5837 (md_reader::get_overloads): Likewise.
5838 (md_reader::m_first_overload): New member variable.
5839 (md_reader::m_next_overload_ptr): Likewise.
5840 (md_reader::m_overloads_htab): Likewise.
5841 * read-md.c (md_reader::md_reader): Initialize m_first_overload,
5842 m_next_overload_ptr and m_overloads_htab.
5843 * read-rtl.c (iterator_group): Add "type" and "get_c_token" fields.
5844 (get_mode_token, get_code_token, get_int_token): New functions.
5845 (map_attr_string): Add an optional argument that passes back
5846 the associated iterator.
5847 (overloaded_name_hash, overloaded_name_eq_p, named_rtx_p):
5848 (md_reader::handle_overloaded_name, add_overload_instance): New
5850 (apply_iterators): Handle '@' names. Report an error if '@'
5851 is used without iterators.
5852 (initialize_iterators): Initialize the new iterator_group fields.
5853 * genopinit.c (handle_overloaded_code_for)
5854 (handle_overloaded_gen): New functions.
5855 (main): Use them to print declarations of maybe_code_for_* and
5856 maybe_gen_* functions, and inline definitions of code_for_* and gen_*.
5857 * genemit.c (print_overload_arguments, print_overload_test)
5858 (handle_overloaded_code_for, handle_overloaded_gen): New functions.
5859 (main): Use it to print definitions of maybe_code_for_* and
5860 maybe_gen_* functions.
5861 * config/aarch64/aarch64.c (aarch64_split_128bit_move): Use
5862 gen_aarch64_mov{low,high}_di and gen_aarch64_movdi_{low,high}
5863 instead of explicit mode checks.
5864 (aarch64_split_simd_combine): Likewise gen_aarch64_simd_combine.
5865 (aarch64_split_simd_move): Likewise gen_aarch64_split_simd_mov.
5866 (aarch64_emit_load_exclusive): Likewise gen_aarch64_load_exclusive.
5867 (aarch64_emit_store_exclusive): Likewise gen_aarch64_store_exclusive.
5868 (aarch64_expand_compare_and_swap): Likewise
5869 gen_aarch64_compare_and_swap and gen_aarch64_compare_and_swap_lse
5870 (aarch64_gen_atomic_cas): Likewise gen_aarch64_atomic_cas.
5871 (aarch64_emit_atomic_swap): Likewise gen_aarch64_atomic_swp.
5872 (aarch64_constant_pool_reload_icode): Delete.
5873 (aarch64_secondary_reload): Use code_for_aarch64_reload_movcp
5874 instead of aarch64_constant_pool_reload_icode. Use
5875 code_for_aarch64_reload_mov instead of explicit mode checks.
5876 (rsqrte_type, get_rsqrte_type, rsqrts_type, get_rsqrts_type): Delete.
5877 (aarch64_emit_approx_sqrt): Use gen_aarch64_rsqrte instead of
5878 get_rsqrte_type and gen_aarch64_rsqrts instead of gen_rqrts_type.
5879 (recpe_type, get_recpe_type, recps_type, get_recps_type): Delete.
5880 (aarch64_emit_approx_div): Use gen_aarch64_frecpe instead of
5881 get_recpe_type and gen_aarch64_frecps instead of get_recps_type.
5882 (aarch64_atomic_load_op_code): Delete.
5883 (aarch64_emit_atomic_load_op): Likewise.
5884 (aarch64_gen_atomic_ldop): Use UNSPECV_ATOMIC_* instead of
5885 aarch64_atomic_load_op_code. Use gen_aarch64_atomic_load
5886 instead of aarch64_emit_atomic_load_op.
5887 * config/aarch64/aarch64.md (aarch64_reload_movcp<GPF_TF:mode><P:mode>)
5888 (aarch64_reload_movcp<VALL:mode><P:mode>, aarch64_reload_mov<mode>)
5889 (aarch64_movdi_<mode>low, aarch64_movdi_<mode>high)
5890 (aarch64_mov<mode>high_di, aarch64_mov<mode>low_di): Add a '@'
5891 character before the pattern name.
5892 * config/aarch64/aarch64-simd.md (aarch64_split_simd_mov<mode>)
5893 (aarch64_rsqrte<mode>, aarch64_rsqrts<mode>)
5894 (aarch64_simd_combine<mode>, aarch64_frecpe<mode>)
5895 (aarch64_frecps<mode>): Likewise.
5896 * config/aarch64/atomics.md (atomic_compare_and_swap<mode>)
5897 (aarch64_compare_and_swap<mode>, aarch64_compare_and_swap<mode>_lse)
5898 (aarch64_load_exclusive<mode>, aarch64_store_exclusive<mode>)
5899 (aarch64_atomic_swp<mode>, aarch64_atomic_cas<mode>)
5900 (aarch64_atomic_load<atomic_ldop><mode>): Likewise.
5902 2018-08-02 Richard Sandiford <richard.sandiford@arm.com>
5904 * config/aarch64/aarch64.c (aarch64_float_const_representable_p):
5905 Allow HFmode constants if TARGET_FP_F16INST.
5907 2018-08-02 Jackson Woodruff <jackson.woodruff@arm.com>
5910 * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp):
5911 No longer check last store for clobber of address register.
5913 2018-08-02 Martin Liska <mliska@suse.cz>
5915 PR gcov-profile/86817
5916 * gcov.c (process_all_functions): New function.
5918 (process_file): Move functions processing to
5919 process_all_functions.
5921 2018-08-02 David Malcolm <dmalcolm@redhat.com>
5923 * dumpfile.c (dump_user_location_t::dump_user_location_t): Add
5924 "const" to the "gimple *" and "rtx_insn *" parameters.
5925 * dumpfile.h (dump_user_location_t::dump_user_location_t):
5927 (dump_location_t::dump_location_t): Likewise.
5929 2018-08-01 Martin Sebor <msebor@redhat.com>
5931 PR tree-optimization/86650
5932 * gimple-pretty-print.c (percent_G_format): Accept a "gimple *"
5933 rather than a "gcall *". Directly pass the data of interest
5934 to percent_K_format, rather than building a temporary CALL_EXPR
5936 * gimple-fold.c (gimple_fold_builtin_strncpy): Adjust.
5937 (gimple_fold_builtin_strncat): Adjust.
5938 * gimple-ssa-warn-restrict.h (check_bounds_or_overlap): Replace
5939 gcall* argument with gimple*.
5940 * gimple-ssa-warn-restrict.c (check_call): Same.
5941 (wrestrict_dom_walker::before_dom_children): Same.
5942 (builtin_access::builtin_access): Same.
5943 (check_bounds_or_overlap): Same
5944 (maybe_diag_overlap): Same.
5945 (maybe_diag_offset_bounds): Same.
5946 * tree-diagnostic.c (default_tree_printer): Move usage of
5947 EXPR_LOCATION (t) and TREE_BLOCK (t) from within percent_K_format
5949 * tree-pretty-print.c (percent_K_format): Add argument.
5950 * tree-pretty-print.h: Add argument.
5951 * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Adjust.
5952 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Adjust.
5953 (maybe_diag_stxncpy_trunc): Same.
5954 (handle_builtin_stxncpy): Same.
5955 (handle_builtin_strcat): Same.
5957 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
5959 * match.pd: Optimise pointer range checks.
5961 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
5963 PR tree-optimization/86758
5964 * tree-vect-stmts.c (vectorizable_simd_clone_call): Don't try
5965 to remove pattern statements.
5967 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
5969 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Use the
5970 result of dfs_enumerate_from when constructing stmt_vec_infos,
5971 instead of additionally calling get_loop_body.
5973 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
5975 * tree-vectorizer.h (vect_create_data_ref_ptr): Remove inv_p
5977 * tree-vect-data-refs.c (vect_create_data_ref_ptr): Likewise.
5978 When creating an iv, assert that the step is not known to be zero.
5979 (vect_setup_realignment): Update call accordingly.
5980 * tree-vect-stmts.c (vectorizable_store): Likewise.
5981 (vectorizable_load): Likewise. Handle VMAT_INVARIANT separately.
5983 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
5985 * tree-vectorizer.h (vect_stmt_to_vectorize): New function.
5986 * tree-vect-loop.c (vect_update_vf_for_slp): Use it.
5987 (vectorizable_reduction): Likewise.
5988 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
5989 (vect_detect_hybrid_slp_stmts): Likewise.
5990 * tree-vect-stmts.c (vect_is_simple_use): Likewise.
5992 2018-08-01 Aldy Hernandez <aldyh@redhat.com>
5994 * tree-vrp (zero_nonzero_bits_from_bounds): Rename to...
5995 (wide_int_set_zero_nonzero_bits): ...this.
5996 (zero_nonzero_bits_from_vr): Rename to...
5997 (vrp_set_zero_nonzero_bits): ...this.
5998 (extract_range_from_multiplicative_op_1): Abstract wide int
6000 (wide_int_range_multiplicative_op): ...here.
6001 (extract_range_from_binary_expr_1): Extract wide int binary
6002 operations into their own functions.
6003 (wide_int_range_lshift): New.
6004 (wide_int_range_can_optimize_bit_op): New.
6005 (wide_int_range_shift_undefined_p): New.
6006 (wide_int_range_bit_xor): New.
6007 (wide_int_range_bit_ior): New.
6008 (wide_int_range_bit_and): New.
6009 (wide_int_range_trunc_mod): New.
6010 (extract_range_into_wide_ints): New.
6011 (vrp_shift_undefined_p): New.
6012 (extract_range_from_multiplicative_op): New.
6013 (vrp_can_optimize_bit_op): New.
6014 * tree-vrp.h (value_range::dump): New.
6015 (wide_int_range_multiplicative_op): New.
6016 (wide_int_range_lshift):New.
6017 (wide_int_range_shift_undefined_p): New.
6018 (wide_int_range_bit_xor): New.
6019 (wide_int_range_bit_ior): New.
6020 (wide_int_range_bit_and): New.
6021 (wide_int_range_trunc_mod): New.
6022 (zero_nonzero_bits_from_bounds): Rename to...
6023 (wide_int_set_zero_nonzero_bits): ...this.
6024 (zero_nonzero_bits_from_vr): Rename to...
6025 (vrp_set_zero_nonzero_bits): ...this.
6026 (range_easy_mask_min_max): Rename to...
6027 (wide_int_range_can_optimize_bit_op): this.
6028 * vr-values.c (simplify_bit_ops_using_ranges): Rename
6029 zero_nonzero_bits_from_vr into vrp_set_zero_nonzero_bits.
6031 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
6033 * tree-vectorizer.h (vect_orig_stmt): New function.
6034 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Use it.
6035 * tree-vect-loop.c (vect_model_reduction_cost): Likewise.
6036 (vect_create_epilog_for_reduction): Likewise.
6037 (vectorizable_live_operation): Likewise.
6038 * tree-vect-slp.c (vect_find_last_scalar_stmt_in_slp): Likewise.
6039 (vect_detect_hybrid_slp_stmts, vect_schedule_slp): Likewise.
6040 * tree-vect-stmts.c (vectorizable_call): Likewise.
6041 (vectorizable_simd_clone_call, vect_remove_stores): Likewise.
6043 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
6045 * tree-vectorizer.h (vect_transform_stmt): Remove grouped_store
6047 * tree-vect-stmts.c (vect_transform_stmt): Likewise.
6048 * tree-vect-loop.c (vect_transform_loop_stmt): Update call accordingly.
6049 (vect_transform_loop): Likewise.
6050 * tree-vect-slp.c (vect_schedule_slp_instance): Likewise.
6052 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
6054 * tree-vectorizer.h (vect_schedule_slp): Return void.
6055 * tree-vect-slp.c (vect_schedule_slp_instance): Likewise.
6056 (vect_schedule_slp): Likewise.
6058 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
6060 * tree-vect-loop.c (vect_transform_loop_stmt): Remove slp_scheduled
6062 (vect_transform_loop): Update calls accordingly. Schedule SLP
6063 instances before the main loop, if any exist.
6065 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
6067 PR tree-optimization/86749
6068 * tree-vect-patterns.c (vect_determine_min_output_precision_1):
6069 If the lhs is used in a COND_EXPR, check that it is being used
6070 as the "then" or "else" value.
6072 2018-08-01 Tom de Vries <tdevries@suse.de>
6075 * config/nvptx/nvptx.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define to
6076 speculation_safe_value_not_needed.
6078 2018-08-01 Richard Biener <rguenther@suse.de>
6080 * tree-ssa-sccvn.c (visit_phi): Compare invariant addresses
6083 2018-08-01 Martin Liska <mliska@suse.cz>
6085 * value-prof.c (gimple_divmod_fixed_value_transform): Unify
6086 format how successful transformation is dumped.
6087 (gimple_mod_pow2_value_transform): Likewise.
6088 (gimple_mod_subtract_transform): Likewise.
6089 (gimple_stringops_transform): Likewise.
6091 2018-08-01 Martin Liska <mliska@suse.cz>
6094 * value-prof.c (interesting_stringop_to_profile_p):
6095 Simplify the code and add BUILT_IN_MEMMOVE.
6096 (gimple_stringops_transform): Likewise.
6098 2018-08-01 Sam Tebbs <sam.tebbs@arm.com>
6100 * config/aarch64/aarch64-simd.md
6101 (*aarch64_get_lane_zero_extendsi<mode>): Rename to...
6102 (*aarch64_get_lane_zero_extend<GPI:mode><VDQQH:mode>): ... This and
6103 use GPI iterator instead of SI mode.
6105 2018-08-01 Richard Earnshaw <rearnsha@arm.com>
6107 * config/rs6000/rs6000.md (speculation_barrier): Renamed from
6108 rs6000_speculation_barrier.
6109 * config/rs6000/rs6000.c (rs6000_expand_builtin): Adjust for
6110 new barrier pattern name.
6112 2018-08-01 Richard Earnshaw <rearnsha@arm.com>
6114 * config/i386/i386.md (unspecv): Add UNSPECV_SPECULATION_BARRIER.
6115 (speculation_barrier): New insn.
6117 2018-08-01 Richard Biener <rguenther@suse.de>
6120 * graphite.h: Include isl/id.h and isl/space.h to allow build
6123 2018-08-01 Jan Willem Jagersma <jwjagersma@gmail.com>
6126 * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
6127 mode for COFF targets.
6128 * defaults.h (TARGET_COFF): Define.
6129 * config/i386/djgpp.h (TARGET_ASM_LTO_START, TARGET_ASM_LTO_END,
6130 TARGET_COFF): Define.
6131 (i386_djgpp_asm_lto_start, i386_djgpp_asm_lto_end): Declare.
6132 * config/i386/djgpp.c (saved_debug_info_level): New static variable.
6133 (i386_djgpp_asm_lto_start, i386_djgpp_asm_lto_end): New functions.
6135 2018-07-31 Alexandre Oliva <oliva@adacore.com>
6137 * gimple-streamer-in.c (input_bb): Restore BB discriminator.
6138 * gimple-streamer-out.c (output_bb): Save it.
6139 * lto-streamer-in.c (input_struct_function_base): Restore
6140 instance discriminator if available. Create map on demand.
6141 * lto-streamer-out.c (output_struct_function_base): Save it if
6143 * final.c (decl_to_instance_map): Document LTO strategy.
6145 2018-07-31 Alexandre Oliva <oliva@adacore.com>
6146 Olivier Hainque <hainque@adacore.com>
6148 * debug.h (decl_to_instance_map_t): New type.
6149 (decl_to_instance_map): Declare.
6150 (maybe_create_decl_to_instance_map): New inline function.
6151 * final.c (bb_discriminator, last_bb_discriminator): New statics,
6152 to track basic block discriminators.
6153 (final_start_function_1): Initialize them.
6154 (final_scan_insn_1): On NOTE_INSN_BASIC_BLOCK, track
6156 (decl_to_instance_map): New variable.
6157 (map_decl_to_instance, maybe_set_discriminator): New functions.
6158 (notice_source_line): Set discriminator.
6160 2018-07-31 Ian Lance Taylor <iant@golang.org>
6162 * targhooks.c (default_have_speculation_safe_value): Add
6165 2018-07-31 David Malcolm <dmalcolm@redhat.com>
6167 * dump-context.h: Include "pretty-print.h".
6168 (dump_context::refresh_dumps_are_enabled): New decl.
6169 (dump_context::emit_item): New decl.
6170 (class dump_context): Add fields "m_test_pp" and
6172 (temp_dump_context::temp_dump_context): Add param "test_pp_flags".
6173 (temp_dump_context::get_dumped_text): New decl.
6174 (class temp_dump_context): Add field "m_pp".
6175 * dumpfile.c (refresh_dumps_are_enabled): Convert to...
6176 (dump_context::refresh_dumps_are_enabled): ...and add a test for
6178 (set_dump_file): Update for above change.
6179 (set_alt_dump_file): Likewise.
6180 (dump_loc): New overload, taking a pretty_printer *.
6181 (dump_context::dump_loc): Call end_any_optinfo. Dump the location
6182 to any test pretty-printer.
6183 (make_item_for_dump_gimple_stmt): New function, adapted from
6184 optinfo::add_gimple_stmt.
6185 (dump_context::dump_gimple_stmt): Call it, and use the result,
6186 eliminating the direct usage of dump_file and alt_dump_file in
6187 favor of indirectly using them via emit_item.
6188 (make_item_for_dump_gimple_expr): New function, adapted from
6189 optinfo::add_gimple_expr.
6190 (dump_context::dump_gimple_expr): Call it, and use the result,
6191 eliminating the direct usage of dump_file and alt_dump_file in
6192 favor of indirectly using them via emit_item.
6193 (make_item_for_dump_generic_expr): New function, adapted from
6195 (dump_context::dump_generic_expr): Call it, and use the result,
6196 eliminating the direct usage of dump_file and alt_dump_file in
6197 favor of indirectly using them via emit_item.
6198 (make_item_for_dump_printf_va): New function, adapted from
6199 optinfo::add_printf_va.
6200 (make_item_for_dump_printf): New function.
6201 (dump_context::dump_printf_va): Call make_item_for_dump_printf_va,
6202 and use the result, eliminating the direct usage of dump_file and
6203 alt_dump_file in favor of indirectly using them via emit_item.
6204 (make_item_for_dump_dec): New function.
6205 (dump_context::dump_dec): Call it, and use the result,
6206 eliminating the direct usage of dump_file and alt_dump_file in
6207 favor of indirectly using them via emit_item.
6208 (make_item_for_dump_symtab_node): New function, adapted from
6209 optinfo::add_symtab_node.
6210 (dump_context::dump_symtab_node): Call it, and use the result,
6211 eliminating the direct usage of dump_file and alt_dump_file in
6212 favor of indirectly using them via emit_item.
6213 (dump_context::begin_scope): Reimplement, avoiding direct usage
6214 of dump_file and alt_dump_file in favor of indirectly using them
6216 (dump_context::emit_item): New member function.
6217 (temp_dump_context::temp_dump_context): Add param "test_pp_flags".
6218 Set up test pretty-printer on the underlying context. Call
6219 refresh_dumps_are_enabled.
6220 (temp_dump_context::~temp_dump_context): Call
6221 refresh_dumps_are_enabled.
6222 (temp_dump_context::get_dumped_text): New member function.
6223 (selftest::verify_dumped_text): New function.
6224 (ASSERT_DUMPED_TEXT_EQ): New macro.
6225 (selftest::test_capture_of_dump_calls): Run all tests twice, with
6226 and then without optinfo enabled. Add uses of
6227 ASSERT_DUMPED_TEXT_EQ to all tests. Add test of nested scopes.
6228 * dumpfile.h: Update comment for the dump_* API.
6229 * optinfo-emit-json.cc
6230 (selftest::test_building_json_from_dump_calls): Update for new
6231 param for temp_dump_context ctor.
6232 * optinfo.cc (optinfo_item::optinfo_item): Remove "owned" param
6233 and "m_owned" field.
6234 (optinfo_item::~optinfo_item): Likewise.
6235 (optinfo::add_item): New member function.
6236 (optinfo::emit): Update comment.
6237 (optinfo::add_string): Delete.
6238 (optinfo::add_printf): Delete.
6239 (optinfo::add_printf_va): Delete.
6240 (optinfo::add_gimple_stmt): Delete.
6241 (optinfo::add_gimple_expr): Delete.
6242 (optinfo::add_tree): Delete.
6243 (optinfo::add_symtab_node): Delete.
6244 (optinfo::add_dec): Delete.
6245 * optinfo.h (class dump_context): New forward decl.
6246 (optinfo::add_item): New decl.
6247 (optinfo::add_string): Delete.
6248 (optinfo::add_printf): Delete.
6249 (optinfo::add_printf_va): Delete.
6250 (optinfo::add_gimple_stmt): Delete.
6251 (optinfo::add_gimple_expr): Delete.
6252 (optinfo::add_tree): Delete.
6253 (optinfo::add_symtab_node): Delete.
6254 (optinfo::add_dec): Delete.
6255 (optinfo::add_poly_int): Delete.
6256 (optinfo_item::optinfo_item): Remove "owned" param.
6257 (class optinfo_item): Remove field "m_owned".
6259 2018-07-31 Jozef Lawrynowicz <jozef.l@mittosystems.com>
6262 * gcc/cfgexpand.c (set_parm_rtl): Use the alignment of Pmode when
6263 MAX_SUPPORTED_STACK_ALIGNMENT would otherwise be exceeded by the
6264 requested variable alignment.
6265 (expand_one_ssa_partition): Likewise.
6266 (expand_one_var): Likewise.
6268 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
6270 * config/pdp11/pdp11.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
6271 to speculation_safe_value_not_needed.
6273 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
6275 * targhooks.h (speculation_safe_value_not_needed): New prototype.
6276 * targhooks.c (speculation_safe_value_not_needed): New function.
6277 * target.def (have_speculation_safe_value): Update documentation.
6278 * doc/tm.texi: Regenerated.
6280 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
6282 * config/aarch64/iterators.md (ALLI_TI): New iterator.
6283 * config/aarch64/aarch64.md (despeculate_copy<ALLI_TI:mode>): New
6285 (despeculate_copy<ALLI:mode>_insn): New insn.
6286 (despeculate_copyti_insn): New insn.
6287 (despeculate_simple<ALLI:mode>): New insn
6288 (despeculate_simpleti): New insn.
6289 * config/aarch64/aarch64.c (aarch64_speculation_safe_value): New
6291 (TARGET_SPECULATION_SAFE_VALUE): Redefine to
6292 aarch64_speculation_safe_value.
6293 (aarch64_print_operand): Handle const0_rtx in modifier 'H'.
6295 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
6297 * config/aarch64/aarch64-speculation.cc: New file.
6298 * config/aarch64/aarch64-passes.def (pass_track_speculation): Add
6299 before pass_reorder_blocks.
6300 * config/aarch64/aarch64-protos.h (make_pass_track_speculation): Add
6302 * config/aarch64/aarch64.c (aarch64_conditional_register_usage): Fix
6303 X14 and X15 when tracking speculation.
6304 * config/aarch64/aarch64.md (register name constants): Add
6305 SPECULATION_TRACKER_REGNUM and SPECULATION_SCRATCH_REGNUM.
6306 (unspec): Add UNSPEC_SPECULATION_TRACKER.
6307 (speculation_barrier): New insn attribute.
6308 (cmp<mode>): Allow SP in comparisons.
6309 (speculation_tracker): New insn.
6310 (speculation_barrier): Add speculation_barrier attribute.
6311 * config/aarch64/t-aarch64: Add make rule for aarch64-speculation.o.
6312 * config.gcc (aarch64*-*-*): Add aarch64-speculation.o to extra_objs.
6313 * doc/invoke.texi (AArch64 Options): Document -mtrack-speculation.
6315 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
6317 * config/aarch64/aarch64.md (cb<optab><mode>1): Disable when
6318 aarch64_track_speculation is true.
6319 (tb<optab><mode>1): Likewise.
6320 * config/aarch64/aarch64.c (aarch64_split_compare_regs): Do not
6321 generate CB[N]Z when tracking speculation.
6322 (aarch64_split_compare_and_swap): Likewise.
6323 (aarch64_split_atomic_op): Likewise.
6325 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
6327 * config/aarch64/aarch64.opt (mtrack-speculation): New target option.
6329 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
6331 * config/aarch64.md (unspecv): Add UNSPECV_SPECULAION_BARRIER.
6332 (speculation_barrier): New insn.
6334 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
6336 * config/arm/unspecs.md (unspecv): Add VUNSPEC_SPECULATION_BARRIER.
6337 * config/arm/arm.md (speculation_barrier): New expand.
6338 (speculation_barrier_insn): New pattern.
6340 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
6342 * builtin-types.def (BT_FN_PTR_PTR_VAR): New function type.
6343 (BT_FN_I1_I1_VAR, BT_FN_I2_I2_VAR, BT_FN_I4_I4_VAR): Likewise.
6344 (BT_FN_I8_I8_VAR, BT_FN_I16_I16_VAR): Likewise.
6345 * builtin-attrs.def (ATTR_NOVOPS_NOTHROW_LEAF_LIST): New attribute
6347 * builtins.def (BUILT_IN_SPECULATION_SAFE_VALUE_N): New builtin.
6348 (BUILT_IN_SPECULATION_SAFE_VALUE_PTR): New internal builtin.
6349 (BUILT_IN_SPECULATION_SAFE_VALUE_1): Likewise.
6350 (BUILT_IN_SPECULATION_SAFE_VALUE_2): Likewise.
6351 (BUILT_IN_SPECULATION_SAFE_VALUE_4): Likewise.
6352 (BUILT_IN_SPECULATION_SAFE_VALUE_8): Likewise.
6353 (BUILT_IN_SPECULATION_SAFE_VALUE_16): Likewise.
6354 * builtins.c (expand_speculation_safe_value): New function.
6355 (expand_builtin): Call it.
6356 * doc/cpp.texi: Document predefine __HAVE_SPECULATION_SAFE_VALUE.
6357 * doc/extend.texi: Document __builtin_speculation_safe_value.
6358 * doc/md.texi: Document "speculation_barrier" pattern.
6359 * doc/tm.texi.in: Pull in TARGET_SPECULATION_SAFE_VALUE and
6360 TARGET_HAVE_SPECULATION_SAFE_VALUE.
6361 * doc/tm.texi: Regenerated.
6362 * target.def (have_speculation_safe_value, speculation_safe_value): New
6364 * targhooks.c (default_have_speculation_safe_value): New function.
6365 (default_speculation_safe_value): New function.
6366 * targhooks.h (default_have_speculation_safe_value): Add prototype.
6367 (default_speculation_safe_value): Add prototype.
6369 2018-07-31 David Malcolm <dmalcolm@redhat.com>
6371 * dump-context.h (dump_context::dump_loc): New decl.
6372 * dumpfile.c (dump_context::dump_loc): New member function.
6373 (dump_context::dump_gimple_stmt_loc): Reimplement using dump_loc
6374 and dump_gimple_stmt.
6375 (dump_context::dump_gimple_expr_loc): Likewise, using
6377 (dump_context::dump_generic_expr_loc): Likewise, using
6379 (dump_context::dump_printf_loc_va): Likewise, using
6381 (dump_context::begin_scope): Explicitly using the global function
6382 "dump_loc", rather than the member function.
6384 2018-07-31 Martin Sebor <msebor@redhat.com>
6386 PR tree-optimization/86741
6387 * tree-vrp.c (vrp_prop::check_mem_ref): Avoid incomplete types.
6389 2018-07-31 Andreas Krebbel <krebbel@linux.ibm.com>
6391 * config/s390/s390.c (s390_expand_setmem): Make the unrolling to
6392 depend on whether prefetch instructions will be emitted or not.
6393 Use TARGET_SETMEM_PFD for checking whether prefetch instructions
6394 will be emitted or not.
6395 * config/s390/s390.h (TARGET_SETMEM_PREFETCH_DISTANCE)
6396 (TARGET_SETMEM_PFD): New macros.
6398 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
6400 * tree-vectorizer.h (stmt_vec_info): Turn back into a typedef.
6401 (NULL_STMT_VEC_INFO): Delete.
6402 (stmt_vec_info::operator*): Likewise.
6403 (stmt_vec_info::operator gimple *): Likewise.
6404 * tree-vect-loop.c (vectorizable_reduction): Use NULL instead
6405 of NULL_STMT_VEC_INFO.
6406 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
6407 (vect_reassociating_reduction_p): Likewise.
6408 * tree-vect-stmts.c (vect_build_gather_load_calls): Likewise.
6409 (vectorizable_store): Likewise.
6410 * tree-vectorizer.c (vec_info::set_vinfo_for_stmt): Likewise.
6411 (vec_info::free_stmt_vec_infos): Likewise.
6413 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
6415 * tree-vectorizer.h (vect_stmt_in_region_p): Delete.
6416 * tree-vectorizer.c (vect_stmt_in_region_p): Likewise.
6418 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
6420 * tree-vectorizer.h (vec_info::new_vinfo_for_stmt)
6421 (vec_info::set_vinfo_for_stmt, vec_info::free_stmt_vec_infos)
6422 (vec_info::free_stmt_vec_info): New private member functions.
6423 (set_stmt_vec_info_vec, free_stmt_vec_infos, vinfo_for_stmt)
6424 (set_vinfo_for_stmt, new_stmt_vec_info, free_stmt_vec_info): Delete.
6425 * tree-parloops.c (gather_scalar_reductions): Remove calls to
6426 set_stmt_vec_info_vec and free_stmt_vec_infos.
6427 * tree-vect-loop.c (_loop_vec_info): Remove call to
6428 set_stmt_vec_info_vec.
6429 * tree-vect-stmts.c (new_stmt_vec_info, set_stmt_vec_info_vec)
6430 (free_stmt_vec_infos, free_stmt_vec_info): Delete in favor of...
6431 * tree-vectorizer.c (vec_info::new_stmt_vec_info)
6432 (vec_info::set_vinfo_for_stmt, vec_info::free_stmt_vec_infos)
6433 (vec_info::free_stmt_vec_info): ...these new functions. Remove
6434 assignments in {vec_info::,}new_stmt_vec_info that are redundant
6435 with the clearing in the xcalloc.
6436 (stmt_vec_info_vec): Delete.
6437 (vec_info::vec_info): Don't call set_stmt_vec_info_vec.
6438 (vectorize_loops): Likewise.
6439 (vec_info::~vec_info): Remove argument from call to
6440 free_stmt_vec_infos.
6441 (vec_info::add_stmt): Remove vinfo argument from call to
6444 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
6446 * tree-vectorizer.h (free_stmt_vec_info): Take a stmt_vec_info
6447 rather than a gimple stmt.
6448 * tree-vect-stmts.c (free_stmt_vec_info): Likewise. Don't free
6449 information for pattern statements when passed the original
6450 statement; instead wait to be passed the pattern statement itself.
6451 Don't call set_vinfo_for_stmt here.
6452 (free_stmt_vec_infos): Update call to free_stmt_vec_info.
6453 * tree-vect-loop.c (_loop_vec_info::~loop_vec_info): Don't free
6454 stmt_vec_infos here.
6455 * tree-vect-slp.c (_bb_vec_info::~bb_vec_info): Likewise.
6456 * tree-vectorizer.c (vec_info::remove_stmt): Nullify the statement's
6457 stmt_vec_infos entry.
6459 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
6461 * tree-vectorizer.h (vec_info::replace_stmt): Declare.
6462 * tree-vectorizer.c (vec_info::replace_stmt): New function.
6463 * tree-vect-slp.c (vect_remove_slp_scalar_calls): Use it.
6464 * tree-vect-stmts.c (vectorizable_call): Likewise.
6465 (vectorizable_simd_clone_call): Likewise.
6467 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
6469 * tree-vectorizer.h (vec_info::remove_stmt): Declare.
6470 * tree-vectorizer.c (vec_info::remove_stmt): New function.
6471 * tree-vect-loop-manip.c (vect_set_loop_condition): Use it.
6472 * tree-vect-loop.c (vect_transform_loop): Likewise.
6473 * tree-vect-slp.c (vect_schedule_slp): Likewise.
6474 * tree-vect-stmts.c (vect_remove_stores): Likewise.
6476 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
6478 * tree-vectorizer.h (vec_info::lookup_dr): New member function.
6479 (vect_dr_stmt): Delete.
6480 * tree-vectorizer.c (vec_info::lookup_dr): New function.
6481 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Use it instead
6483 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
6484 (vect_analyze_data_ref_dependence, vect_record_base_alignments)
6485 (vect_verify_datarefs_alignment, vect_peeling_supportable)
6486 (vect_analyze_data_ref_accesses, vect_prune_runtime_alias_test_list)
6487 (vect_analyze_data_refs): Likewise.
6488 (vect_slp_analyze_data_ref_dependence): Likewise. Take a vec_info
6490 (vect_find_same_alignment_drs): Likewise.
6491 (vect_slp_analyze_node_dependences): Update calls accordingly.
6492 (vect_analyze_data_refs_alignment): Likewise. Use vec_info::lookup_dr
6493 instead of DR_VECT_AUX.
6494 (vect_get_peeling_costs_all_drs): Take a loop_vec_info instead
6495 of a vector data references. Use vec_info::lookup_dr instead of
6497 (vect_peeling_hash_get_lowest_cost): Update calls accordingly.
6498 (vect_enhance_data_refs_alignment): Likewise. Use vec_info::lookup_dr
6499 instead of DR_VECT_AUX.
6501 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
6503 * tree-vectorizer.h (_loop_vec_info::unaligned_dr): Change to
6505 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Update
6507 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
6508 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
6509 (vect_gen_prolog_loop_niters): Likewise.
6511 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
6513 * tree-vectorizer.h (set_dr_misalignment, dr_misalignment)
6514 (DR_TARGET_ALIGNMENT, aligned_access_p, known_alignment_for_access_p)
6515 (vect_known_alignment_in_bytes, vect_dr_behavior)
6516 (vect_get_scalar_dr_size): Take references as dr_vec_infos
6517 instead of data_references. Update calls to other routines for
6518 which the same change has been made.
6519 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Take
6520 dr_vec_infos instead of stmt_vec_infos.
6521 (vect_analyze_data_ref_dependence): Update call accordingly.
6522 (vect_slp_analyze_data_ref_dependence)
6523 (vect_record_base_alignments): Use DR_VECT_AUX.
6524 (vect_calculate_target_alignment, vect_compute_data_ref_alignment)
6525 (vect_update_misalignment_for_peel, verify_data_ref_alignment)
6526 (vector_alignment_reachable_p, vect_get_data_access_cost)
6527 (vect_peeling_supportable, vect_analyze_group_access_1)
6528 (vect_analyze_group_access, vect_analyze_data_ref_access)
6529 (vect_vfa_segment_size, vect_vfa_access_size, vect_vfa_align)
6530 (vect_compile_time_alias, vect_small_gap_p)
6531 (vectorizable_with_step_bound_p, vect_duplicate_ssa_name_ptr_info):
6532 (vect_supportable_dr_alignment): Take references as dr_vec_infos
6533 instead of data_references. Update calls to other routines for
6534 which the same change has been made.
6535 (vect_verify_datarefs_alignment, vect_get_peeling_costs_all_drs)
6536 (vect_find_same_alignment_drs, vect_analyze_data_refs_alignment)
6537 (vect_slp_analyze_and_verify_node_alignment)
6538 (vect_analyze_data_ref_accesses, vect_prune_runtime_alias_test_list)
6539 (vect_create_addr_base_for_vector_ref, vect_create_data_ref_ptr)
6540 (vect_setup_realignment): Use dr_vec_infos. Update calls after
6542 (_vect_peel_info::dr): Replace with...
6543 (_vect_peel_info::dr_info): ...this new field.
6544 (vect_peeling_hash_get_most_frequent)
6545 (vect_peeling_hash_choose_best_peeling): Update accordingly.
6546 (vect_peeling_hash_get_lowest_cost):
6547 (vect_enhance_data_refs_alignment): Likewise. Update calls to other
6548 routines for which the same change has been made.
6549 (vect_peeling_hash_insert): Likewise. Take a dr_vec_info instead of a
6551 * tree-vect-loop-manip.c (get_misalign_in_elems)
6552 (vect_gen_prolog_loop_niters): Use dr_vec_infos. Update calls after
6554 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
6555 * tree-vect-stmts.c (vect_get_store_cost, vect_get_load_cost)
6556 (vect_truncate_gather_scatter_offset, compare_step_with_zero)
6557 (get_group_load_store_type, get_negative_load_store_type)
6558 (vect_get_data_ptr_increment, vectorizable_store)
6559 (vectorizable_load): Likewise.
6560 (ensure_base_align): Take a dr_vec_info instead of a data_reference.
6561 Update calls to other routines for which the same change has been made.
6563 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
6565 * tree-vectorizer.h (vec_info::move_dr): New member function.
6566 (dataref_aux): Rename to...
6567 (dr_vec_info): ...this and add "dr" and "stmt" fields.
6568 (_stmt_vec_info::dr_aux): Update accordingly.
6569 (_stmt_vec_info::data_ref_info): Delete.
6570 (STMT_VINFO_GROUPED_ACCESS, DR_GROUP_FIRST_ELEMENT)
6571 (DR_GROUP_NEXT_ELEMENT, DR_GROUP_SIZE, DR_GROUP_STORE_COUNT)
6572 (DR_GROUP_GAP, DR_GROUP_SAME_DR_STMT, REDUC_GROUP_FIRST_ELEMENT):
6573 (REDUC_GROUP_NEXT_ELEMENT, REDUC_GROUP_SIZE): Use dr_aux.dr instead
6575 (STMT_VINFO_DATA_REF): Likewise. Turn into an lvalue.
6576 (STMT_VINFO_DR_INFO): New macro.
6577 (DR_VECT_AUX): Use STMT_VINFO_DR_INKFO and vect_dr_stmt.
6578 (set_dr_misalignment): Update after rename of dataref_aux.
6579 (vect_dr_stmt): Move earlier in file. Return dr_aux.stmt.
6580 * tree-vect-stmts.c (new_stmt_vec_info): Remove redundant
6581 initialization of STMT_VINFO_DATA_REF.
6582 * tree-vectorizer.c (vec_info::move_dr): New function.
6583 * tree-vect-patterns.c (vect_recog_bool_pattern)
6584 (vect_recog_mask_conversion_pattern)
6585 (vect_recog_gather_scatter_pattern): Use it.
6586 * tree-vect-data-refs.c (vect_analyze_data_refs): Initialize
6587 the "dr" and "stmt" fields of dr_vec_info instead of
6588 STMT_VINFO_DATA_REF.
6590 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
6592 * tree-vectorizer.h (_stmt_vec_info::pattern_stmt_p): New field.
6593 (is_pattern_stmt_p): Use it.
6594 * tree-vect-patterns.c (vect_init_pattern_stmt): Set pattern_stmt_p
6595 on pattern statements.
6597 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
6599 * tree-vect-patterns.c (vect_mark_pattern_stmts): Take the
6600 original stmt as a stmt_vec_info rather than a gimple stmt.
6601 (vect_pattern_recog_1): Take the statement directly as a
6602 stmt_vec_info, rather than via a gimple_stmt_iterator.
6603 Update call to vect_mark_pattern_stmts.
6604 (vect_pattern_recog): Update calls accordingly.
6606 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
6608 * tree-vectorizer.h (vect_get_vec_defs_for_stmt_copy)
6609 (vect_get_vec_def_for_stmt_copy): Take a vec_info rather than
6610 a vect_def_type for the first argument.
6611 * tree-vect-stmts.c (vect_get_vec_defs_for_stmt_copy): Likewise.
6612 (vect_get_vec_def_for_stmt_copy): Likewise. Return the original
6613 operand if it isn't defined by a vectorized statement.
6614 (vect_build_gather_load_calls): Remove the mask_dt argument and
6615 update calls to vect_get_vec_def_for_stmt_copy.
6616 (vectorizable_bswap): Likewise the dt argument.
6617 (vectorizable_call): Update calls to vectorizable_bswap and
6618 vect_get_vec_def_for_stmt_copy.
6619 (vectorizable_simd_clone_call, vectorizable_assignment)
6620 (vectorizable_shift, vectorizable_operation, vectorizable_condition)
6621 (vectorizable_comparison): Update calls to
6622 vect_get_vec_def_for_stmt_copy.
6623 (vectorizable_store): Likewise. Remove now-unnecessary calls to
6625 (vect_get_loop_based_defs): Remove dt argument and update call
6626 to vect_get_vec_def_for_stmt_copy.
6627 (vectorizable_conversion): Update calls to vect_get_loop_based_defs
6628 and vect_get_vec_def_for_stmt_copy.
6629 (vectorizable_load): Update calls to vect_build_gather_load_calls
6630 and vect_get_vec_def_for_stmt_copy.
6631 * tree-vect-loop.c (vect_create_epilog_for_reduction)
6632 (vectorizable_reduction, vectorizable_live_operation): Update calls
6633 to vect_get_vec_def_for_stmt_copy.
6635 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
6637 * tree-vect-data-refs.c (vect_record_base_alignment): Replace vec_info
6638 and gimple stmt arguments with a stmt_vec_info.
6639 (vect_record_base_alignments): Update calls accordingly.
6640 * tree-vect-slp.c (vect_record_max_nunits): Replace vec_info
6641 and gimple stmt arguments with a stmt_vec_info.
6642 (vect_build_slp_tree_1): Remove vinfo argument and update call
6643 to vect_record_max_nunits.
6644 (vect_build_slp_tree_2): Update calls to vect_build_slp_tree_1
6645 and vect_record_max_nunits.
6647 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
6649 * tree-vectorizer.h (nested_in_vect_loop_p): Move further down
6650 file and take a stmt_vec_info instead of a gimple stmt.
6651 (supportable_widening_operation, vect_finish_replace_stmt)
6652 (vect_finish_stmt_generation, vect_get_store_rhs)
6653 (vect_get_vec_def_for_operand_1, vect_get_vec_def_for_operand)
6654 (vect_get_vec_defs, vect_init_vector, vect_transform_stmt)
6655 (vect_remove_stores, vect_analyze_stmt, vectorizable_condition)
6656 (vect_get_smallest_scalar_type, vect_check_gather_scatter)
6657 (vect_create_data_ref_ptr, bump_vector_ptr)
6658 (vect_permute_store_chain, vect_setup_realignment)
6659 (vect_transform_grouped_load, vect_record_grouped_load_vectors)
6660 (vect_create_addr_base_for_vector_ref, vectorizable_live_operation)
6661 (vectorizable_reduction, vectorizable_induction)
6662 (get_initial_def_for_reduction, is_simple_and_all_uses_invariant)
6663 (vect_get_place_in_interleaving_chain): Take stmt_vec_infos rather
6664 than gimple stmts as arguments.
6665 * tree-vect-data-refs.c (vect_get_smallest_scalar_type)
6666 (vect_preserves_scalar_order_p, vect_slp_analyze_node_dependences)
6667 (can_group_stmts_p, vect_check_gather_scatter)
6668 (vect_create_addr_base_for_vector_ref, vect_create_data_ref_ptr)
6669 (bump_vector_ptr, vect_permute_store_chain, vect_setup_realignment)
6670 (vect_permute_load_chain, vect_shift_permute_load_chain)
6671 (vect_transform_grouped_load)
6672 (vect_record_grouped_load_vectors): Likewise.
6673 * tree-vect-loop.c (vect_fixup_reduc_chain)
6674 (get_initial_def_for_reduction, vect_create_epilog_for_reduction)
6675 (vectorize_fold_left_reduction, is_nonwrapping_integer_induction)
6676 (vectorizable_reduction, vectorizable_induction)
6677 (vectorizable_live_operation, vect_loop_kill_debug_uses): Likewise.
6678 * tree-vect-patterns.c (type_conversion_p, adjust_bool_stmts)
6679 (vect_get_load_store_mask): Likewise.
6680 * tree-vect-slp.c (vect_get_place_in_interleaving_chain)
6681 (vect_analyze_slp_instance, vect_mask_constant_operand_p): Likewise.
6682 * tree-vect-stmts.c (vect_mark_relevant)
6683 (is_simple_and_all_uses_invariant)
6684 (exist_non_indexing_operands_for_use_p, process_use)
6685 (vect_init_vector_1, vect_init_vector, vect_get_vec_def_for_operand_1)
6686 (vect_get_vec_def_for_operand, vect_get_vec_defs)
6687 (vect_finish_stmt_generation_1, vect_finish_replace_stmt)
6688 (vect_finish_stmt_generation, vect_truncate_gather_scatter_offset)
6689 (compare_step_with_zero, vect_get_store_rhs, get_group_load_store_type)
6690 (get_negative_load_store_type, get_load_store_type)
6691 (vect_check_load_store_mask, vect_check_store_rhs)
6692 (vect_build_gather_load_calls, vect_get_strided_load_store_ops)
6693 (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
6694 (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
6695 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
6696 (get_group_alias_ptr_type, vectorizable_store, hoist_defs_of_uses)
6697 (vectorizable_load, vectorizable_condition, vectorizable_comparison)
6698 (vect_analyze_stmt, vect_transform_stmt, vect_remove_stores)
6699 (supportable_widening_operation): Likewise.
6701 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
6703 * tree-vect-data-refs.c (vect_describe_gather_scatter_call): Take
6704 a stmt_vec_info instead of a gcall.
6705 (vect_check_gather_scatter): Update call accordingly.
6706 * tree-vect-loop-manip.c (iv_phi_p): Take a stmt_vec_info instead
6708 (vect_can_advance_ivs_p, vect_update_ivs_after_vectorizer)
6709 (slpeel_update_phi_nodes_for_loops):): Update calls accordingly.
6710 * tree-vect-loop.c (vect_transform_loop_stmt): Take a stmt_vec_info
6711 instead of a gimple stmt.
6712 (vect_transform_loop): Update calls accordingly.
6713 * tree-vect-slp.c (vect_split_slp_store_group): Take and return
6714 stmt_vec_infos instead of gimple stmts.
6715 (vect_analyze_slp_instance): Update use accordingly.
6716 * tree-vect-stmts.c (read_vector_array, write_vector_array)
6717 (vect_clobber_variable, vect_stmt_relevant_p, permute_vec_elements)
6718 (vect_use_strided_gather_scatters_p, vect_build_all_ones_mask)
6719 (vect_build_zero_merge_argument, vect_get_gather_scatter_ops)
6720 (vect_gen_widened_results_half, vect_get_loop_based_defs)
6721 (vect_create_vectorized_promotion_stmts, can_vectorize_live_stmts):
6722 Take a stmt_vec_info instead of a gimple stmt and pass stmt_vec_infos
6723 down to subroutines.
6725 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
6727 * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Change the type
6728 of the worklist from a vector of gimple stmts to a vector of
6730 * tree-vect-stmts.c (vect_mark_relevant, process_use)
6731 (vect_mark_stmts_to_be_vectorized): Likewise
6733 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
6735 * tree-vect-loop.c (vect_analyze_loop_operations): Look up the
6736 statement before passing it to vect_analyze_stmt.
6737 (vect_create_epilog_for_reduction): Use a stmt_vec_info to walk
6738 the chain of phi vector definitions. Track the exit phi via its
6740 (vectorizable_reduction): Set cond_stmt_vinfo directly from the
6741 STMT_VINFO_REDUC_DEF.
6742 * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Use
6743 stmt_vec_infos to handle the statement chains.
6744 (vect_get_slp_defs): Record the first statement in the node
6745 using a stmt_vec_info.
6746 * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Look up
6747 statements here and pass their stmt_vec_info down to subroutines.
6748 (vect_init_vector_1): Hoist call to vinfo_for_stmt and pass it
6749 down to vect_finish_stmt_generation.
6750 (vect_init_vector, vect_get_vec_defs, vect_finish_replace_stmt)
6751 (vect_finish_stmt_generation): Call vinfo_for_stmt and pass
6752 stmt_vec_infos to subroutines.
6753 (vect_remove_stores): Use stmt_vec_infos to handle the statement
6756 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
6758 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences):
6759 (vect_check_gather_scatter, vect_create_data_ref_ptr, bump_vector_ptr)
6760 (vect_permute_store_chain, vect_setup_realignment)
6761 (vect_permute_load_chain, vect_shift_permute_load_chain)
6762 (vect_transform_grouped_load): Use stmt_vec_info rather than gimple
6763 stmts internally, and when passing values to other vectorizer routines.
6764 * tree-vect-loop-manip.c (vect_can_advance_ivs_p): Likewise.
6765 * tree-vect-loop.c (vect_analyze_scalar_cycles_1)
6766 (vect_analyze_loop_operations, get_initial_def_for_reduction)
6767 (vect_create_epilog_for_reduction, vectorize_fold_left_reduction)
6768 (vectorizable_reduction, vectorizable_induction)
6769 (vectorizable_live_operation, vect_transform_loop_stmt)
6770 (vect_transform_loop): Likewise.
6771 * tree-vect-patterns.c (vect_reassociating_reduction_p)
6772 (vect_recog_widen_op_pattern, vect_recog_mixed_size_cond_pattern)
6773 (vect_recog_bool_pattern, vect_recog_gather_scatter_pattern): Likewise.
6774 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
6775 (vect_slp_analyze_node_operations_1): Likewise.
6776 * tree-vect-stmts.c (vect_mark_relevant, process_use)
6777 (exist_non_indexing_operands_for_use_p, vect_init_vector_1)
6778 (vect_mark_stmts_to_be_vectorized, vect_get_vec_def_for_operand)
6779 (vect_finish_stmt_generation_1, get_group_load_store_type)
6780 (get_load_store_type, vect_build_gather_load_calls)
6781 (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
6782 (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
6783 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
6784 (vectorizable_store, vectorizable_load, vectorizable_condition)
6785 (vectorizable_comparison, vect_analyze_stmt, vect_transform_stmt)
6786 (supportable_widening_operation): Likewise.
6787 (vect_get_vector_types_for_stmt): Likewise.
6788 * tree-vectorizer.h (vect_dr_behavior): Likewise.
6790 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
6792 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
6793 (vect_slp_analyze_node_dependences, vect_analyze_data_ref_accesses)
6794 (vect_permute_store_chain, vect_permute_load_chain)
6795 (vect_shift_permute_load_chain, vect_transform_grouped_load): Avoid
6796 repeated stmt_vec_info lookups.
6797 * tree-vect-loop-manip.c (vect_can_advance_ivs_p): Likewise.
6798 (vect_update_ivs_after_vectorizer): Likewise.
6799 * tree-vect-loop.c (vect_is_simple_reduction): Likewise.
6800 (vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
6801 * tree-vect-patterns.c (adjust_bool_stmts): Likewise.
6802 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
6803 (vect_bb_slp_scalar_cost): Likewise.
6804 * tree-vect-stmts.c (get_group_alias_ptr_type): Likewise.
6806 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
6808 * tree-vect-data-refs.c (vect_check_gather_scatter): Pass the
6809 gcall rather than the generic gimple stmt to gimple_call_internal_fn.
6810 (vect_get_smallest_scalar_type, can_group_stmts_p): Use dyn_cast
6811 to get gassigns and gcalls, rather than operating on generc gimple
6813 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p)
6814 (vect_mark_stmts_to_be_vectorized, vectorizable_store)
6815 (vectorizable_load, vect_analyze_stmt): Likewise.
6816 * tree-vect-loop.c (vectorizable_reduction): Likewise gphi.
6818 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
6820 * tree-vectorizer.h (get_earlier_stmt, get_later_stmt): Take and
6821 return stmt_vec_infos rather than gimple stmts. Do not accept
6823 (vect_find_last_scalar_stmt_in_slp): Return a stmt_vec_info instead
6825 * tree-vect-slp.c (vect_find_last_scalar_stmt_in_slp): Likewise.
6826 Update use of get_later_stmt.
6827 (vect_get_constant_vectors): Update call accordingly.
6828 (vect_schedule_slp_instance): Likewise
6829 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Likewise.
6830 (vect_slp_analyze_instance_dependence): Likewise.
6831 (vect_preserves_scalar_order_p): Update use of get_earlier_stmt.
6833 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
6835 * tree-vectorizer.h (stmt_info_for_cost::stmt): Replace with...
6836 (stmt_info_for_cost::stmt_info): ...this new field.
6837 (add_stmt_costs): Update accordingly.
6838 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
6839 (vect_get_known_peeling_cost): Likewise.
6840 (vect_estimate_min_profitable_iters): Likewise.
6841 * tree-vect-stmts.c (record_stmt_cost): Likewise.
6843 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
6845 * tree-vectorizer.h (_loop_vec_info::may_misalign_stmts): Change
6846 from an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
6847 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Update
6849 * tree-vect-loop-manip.c (vect_create_cond_for_align_checks): Likewise.
6851 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
6853 * tree-vectorizer.h (_stmt_vec_info::same_dr_stmt): Change from
6854 a gimple stmt to a stmt_vec_info.
6855 * tree-vect-stmts.c (vectorizable_load): Update accordingly.
6857 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
6859 * tree-vectorizer.h (vec_info::grouped_stores): Change from
6860 an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
6861 (_loop_vec_info::reduction_chains): Likewise.
6862 * tree-vect-loop.c (vect_fixup_scalar_cycles_with_patterns): Update
6864 * tree-vect-slp.c (vect_analyze_slp): Likewise.
6866 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
6868 * tree-vectorizer.h (_stmt_vec_info::first_element): Change from
6869 a gimple stmt to a stmt_vec_info.
6870 (_stmt_vec_info::next_element): Likewise.
6871 * tree-vect-data-refs.c (vect_update_misalignment_for_peel)
6872 (vect_slp_analyze_and_verify_node_alignment)
6873 (vect_analyze_group_access_1, vect_analyze_group_access)
6874 (vect_small_gap_p, vect_prune_runtime_alias_test_list)
6875 (vect_create_data_ref_ptr, vect_record_grouped_load_vectors)
6876 (vect_supportable_dr_alignment): Update accordingly.
6877 * tree-vect-loop.c (vect_fixup_reduc_chain): Likewise.
6878 (vect_fixup_scalar_cycles_with_patterns, vect_is_slp_reduction)
6879 (vect_is_simple_reduction, vectorizable_reduction): Likewise.
6880 * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
6881 * tree-vect-slp.c (vect_build_slp_tree_1)
6882 (vect_attempt_slp_rearrange_stmts, vect_supported_load_permutation_p)
6883 (vect_split_slp_store_group, vect_analyze_slp_instance)
6884 (vect_analyze_slp, vect_transform_slp_perm_load): Likewise.
6885 * tree-vect-stmts.c (vect_model_store_cost, vect_model_load_cost)
6886 (get_group_load_store_type, get_load_store_type)
6887 (get_group_alias_ptr_type, vectorizable_store, vectorizable_load)
6888 (vect_transform_stmt, vect_remove_stores): Likewise.
6890 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
6892 * tree-vectorizer.h (vect_dr_stmt): Return a stmt_vec_info rather
6894 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
6895 (vect_slp_analyze_data_ref_dependence, vect_record_base_alignments)
6896 (vect_calculate_target_alignmentm, vect_compute_data_ref_alignment)
6897 (vect_update_misalignment_for_peel, vect_verify_datarefs_alignment)
6898 (vector_alignment_reachable_p, vect_get_data_access_cost)
6899 (vect_get_peeling_costs_all_drs, vect_peeling_hash_get_lowest_cost)
6900 (vect_peeling_supportable, vect_enhance_data_refs_alignment)
6901 (vect_find_same_alignment_drs, vect_analyze_data_refs_alignment)
6902 (vect_analyze_group_access_1, vect_analyze_group_access)
6903 (vect_analyze_data_ref_access, vect_analyze_data_ref_accesses)
6904 (vect_vfa_access_size, vect_small_gap_p, vect_analyze_data_refs)
6905 (vect_supportable_dr_alignment): Remove vinfo_for_stmt from the
6906 result of vect_dr_stmt and use the stmt_vec_info instead of
6907 the associated gimple stmt.
6908 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
6909 (vect_gen_prolog_loop_niters): Likewise.
6910 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
6912 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
6914 * tree-vectorizer.h (_slp_tree::stmts): Change from a vec<gimple *>
6915 to a vec<stmt_vec_info>.
6916 * tree-vect-slp.c (vect_free_slp_tree): Update accordingly.
6917 (vect_create_new_slp_node): Take a vec<gimple *> instead of a
6919 (_slp_oprnd_info::def_stmts): Change from a vec<gimple *>
6920 to a vec<stmt_vec_info>.
6921 (bst_traits::value_type, bst_traits::value_type): Likewise.
6922 (bst_traits::hash): Update accordingly.
6923 (vect_get_and_check_slp_defs): Change the stmts parameter from
6924 a vec<gimple *> to a vec<stmt_vec_info>.
6925 (vect_two_operations_perm_ok_p, vect_build_slp_tree_1): Likewise.
6926 (vect_build_slp_tree): Likewise.
6927 (vect_build_slp_tree_2): Likewise. Update uses of
6928 SLP_TREE_SCALAR_STMTS.
6929 (vect_print_slp_tree): Update uses of SLP_TREE_SCALAR_STMTS.
6930 (vect_mark_slp_stmts, vect_mark_slp_stmts_relevant)
6931 (vect_slp_rearrange_stmts, vect_attempt_slp_rearrange_stmts)
6932 (vect_supported_load_permutation_p, vect_find_last_scalar_stmt_in_slp)
6933 (vect_detect_hybrid_slp_stmts, vect_slp_analyze_node_operations_1)
6934 (vect_slp_analyze_node_operations, vect_slp_analyze_operations)
6935 (vect_bb_slp_scalar_cost, vect_slp_analyze_bb_1)
6936 (vect_get_constant_vectors, vect_get_slp_defs)
6937 (vect_transform_slp_perm_load, vect_schedule_slp_instance)
6938 (vect_remove_slp_scalar_calls, vect_schedule_slp): Likewise.
6939 (vect_analyze_slp_instance): Build up a vec of stmt_vec_infos
6940 instead of gimple stmts.
6941 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Change
6942 the stores parameter for a vec<gimple *> to a vec<stmt_vec_info>.
6943 (vect_slp_analyze_instance_dependence): Update uses of
6944 SLP_TREE_SCALAR_STMTS.
6945 (vect_slp_analyze_and_verify_node_alignment): Likewise.
6946 (vect_slp_analyze_and_verify_instance_alignment): Likewise.
6947 * tree-vect-loop.c (neutral_op_for_slp_reduction): Likewise.
6948 (get_initial_defs_for_reduction): Likewise.
6949 (vect_create_epilog_for_reduction): Likewise.
6950 (vectorize_fold_left_reduction): Likewise.
6951 * tree-vect-stmts.c (vect_prologue_cost_for_slp_op): Likewise.
6952 (vect_model_simple_cost, vectorizable_shift, vectorizable_load)
6953 (can_vectorize_live_stmts): Likewise.
6955 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
6957 * tree-vectorizer.h (_loop_vec_info::reductions): Change from an
6958 auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
6959 (vect_force_simple_reduction): Take and return stmt_vec_infos rather
6961 * tree-parloops.c (valid_reduction_p): Take a stmt_vec_info instead
6963 (gather_scalar_reductions): Update after above interface changes.
6964 * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Likewise.
6965 (vect_is_simple_reduction): Take and return stmt_vec_infos rather
6967 (vect_force_simple_reduction): Likewise.
6968 * tree-vect-patterns.c (vect_pattern_recog_1): Update use of
6969 LOOP_VINFO_REDUCTIONS.
6970 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
6972 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
6974 * tree-vectorizer.h (_stmt_vec_info::reduc_def): Change from
6975 a gimple stmt to a stmt_vec_info.
6976 * tree-vect-loop.c (vect_active_double_reduction_p)
6977 (vect_force_simple_reduction, vectorizable_reduction): Update
6980 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
6982 * tree-vectorizer.h (_slp_tree::vec_stmts): Change from a
6983 vec<gimple *> to a vec<stmt_vec_info>.
6984 * tree-vect-loop.c (vect_create_epilog_for_reduction): Change
6985 the reduction_phis argument from a vec<gimple *> to a
6987 (vectorizable_reduction): Likewise the phis local variable that
6988 is passed to vect_create_epilog_for_reduction. Update for new type
6989 of SLP_TREE_VEC_STMTS.
6990 (vectorizable_induction): Update for new type of SLP_TREE_VEC_STMTS.
6991 (vectorizable_live_operation): Likewise.
6992 * tree-vect-slp.c (vect_get_slp_vect_defs): Likewise.
6993 (vect_transform_slp_perm_load, vect_schedule_slp_instance): Likewise.
6995 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
6997 * tree-vectorizer.h (_stmt_vec_info::vectorized_stmt): Change from
6998 a gimple stmt to a stmt_vec_info.
6999 (vectorizable_condition, vectorizable_live_operation)
7000 (vectorizable_reduction, vectorizable_induction): Pass back the
7001 vectorized statement as a stmt_vec_info.
7002 * tree-vect-data-refs.c (vect_record_grouped_load_vectors): Update
7003 use of STMT_VINFO_VEC_STMT.
7004 * tree-vect-loop.c (vect_create_epilog_for_reduction): Likewise,
7005 accumulating the inner phis that feed the STMT_VINFO_VEC_STMT
7006 as stmt_vec_infos rather than gimple stmts.
7007 (vectorize_fold_left_reduction): Change vec_stmt from a gimple stmt
7009 (vectorizable_live_operation): Likewise.
7010 (vectorizable_reduction, vectorizable_induction): Likewise,
7011 updating use of STMT_VINFO_VEC_STMT.
7012 * tree-vect-stmts.c (vect_get_vec_def_for_operand_1): Update use
7013 of STMT_VINFO_VEC_STMT.
7014 (vect_build_gather_load_calls, vectorizable_bswap, vectorizable_call)
7015 (vectorizable_simd_clone_call, vectorizable_conversion)
7016 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
7017 (vectorizable_store, vectorizable_load, vectorizable_condition)
7018 (vectorizable_comparison, can_vectorize_live_stmts): Change vec_stmt
7019 from a gimple stmt to a stmt_vec_info.
7020 (vect_transform_stmt): Update use of STMT_VINFO_VEC_STMT. Pass a
7021 pointer to a stmt_vec_info to the vectorizable_* routines.
7023 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
7025 * tree-vectorizer.h (_stmt_vec_info::related_stmt): Change from
7026 a gimple stmt to a stmt_vec_info.
7027 (is_pattern_stmt_p): Update accordingly.
7028 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Likewise.
7029 (vect_record_grouped_load_vectors): Likewise.
7030 * tree-vect-loop.c (vect_determine_vf_for_stmt): Likewise.
7031 (vect_fixup_reduc_chain, vect_update_vf_for_slp): Likewise.
7032 (vect_model_reduction_cost): Likewise.
7033 (vect_create_epilog_for_reduction): Likewise.
7034 (vectorizable_reduction, vectorizable_induction): Likewise.
7035 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
7036 Return the stmt_vec_info for the pattern statement.
7037 (vect_set_pattern_stmt): Update use of STMT_VINFO_RELATED_STMT.
7038 (vect_split_statement, vect_mark_pattern_stmts): Likewise.
7039 * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
7040 (vect_detect_hybrid_slp, vect_get_slp_defs): Likewise.
7041 * tree-vect-stmts.c (vect_mark_relevant): Likewise.
7042 (vect_get_vec_def_for_operand_1, vectorizable_call): Likewise.
7043 (vectorizable_simd_clone_call, vect_analyze_stmt, new_stmt_vec_info)
7044 (free_stmt_vec_info, vect_is_simple_use): Likewise.
7046 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
7048 * tree-vectorizer.h (vect_finish_replace_stmt): Return a stmt_vec_info
7049 (vect_finish_stmt_generation): Likewise.
7050 * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
7051 (vect_finish_replace_stmt, vect_finish_stmt_generation): Likewise.
7052 (vect_build_gather_load_calls): Use the return value of the above
7053 functions instead of a separate call to vinfo_for_stmt. Use narrow
7054 scopes for the input gimple stmt and wider scopes for the associated
7055 stmt_vec_info. Use vec_info::lookup_def when setting these
7056 stmt_vec_infos from an SSA_NAME definition.
7057 (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
7058 (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
7059 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
7060 (vectorizable_store, vectorizable_load, vectorizable_condition)
7061 (vectorizable_comparison): Likewise.
7062 * tree-vect-loop.c (vectorize_fold_left_reduction): Likewise.
7063 (vectorizable_reduction): Likewise.
7065 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
7067 * tree-vectorizer.h (vect_is_simple_use): Add an optional
7068 stmt_vec_info * parameter before the optional gimple **.
7069 * tree-vect-stmts.c (vect_is_simple_use): Likewise.
7070 (process_use, vect_get_vec_def_for_operand_1): Update callers.
7071 (vect_get_vec_def_for_operand, vectorizable_shift): Likewise.
7072 * tree-vect-loop.c (vectorizable_reduction): Likewise.
7073 (vectorizable_live_operation): Likewise.
7074 * tree-vect-patterns.c (type_conversion_p): Likewise.
7075 (vect_look_through_possible_promotion): Likewise.
7076 (vect_recog_rotate_pattern): Likewise.
7077 * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
7079 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
7081 * tree-vectorizer.h (stmt_vec_info): Temporarily change from
7082 a typedef to a wrapper class.
7083 (NULL_STMT_VEC_INFO): New macro.
7084 (vec_info::stmt_infos): Change to vec<stmt_vec_info>.
7085 (stmt_vec_info::operator*): New function.
7086 (stmt_vec_info::operator gimple *): Likewise.
7087 (set_vinfo_for_stmt): Use NULL_STMT_VEC_INFO.
7088 (add_stmt_costs): Likewise.
7089 * tree-vect-loop-manip.c (iv_phi_p): Likewise.
7090 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
7091 (vect_get_known_peeling_cost): Likewise.
7092 (vect_estimate_min_profitable_iters): Likewise.
7093 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
7094 * tree-vect-slp.c (vect_remove_slp_scalar_calls): Likewise.
7095 * tree-vect-stmts.c (vect_build_gather_load_calls): Likewise.
7096 (vectorizable_store, free_stmt_vec_infos): Likewise.
7097 (new_stmt_vec_info): Change return type of xcalloc to
7100 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
7102 * tree-vectorizer.h (vec_info::lookup_single_use): Declare.
7103 * tree-vectorizer.c (vec_info::lookup_single_use): New function.
7104 * tree-vect-loop.c (vectorizable_reduction): Use it instead of
7105 a single_imm_use-based sequence.
7106 * tree-vect-stmts.c (supportable_widening_operation): Likewise.
7108 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
7110 * tree-vectorizer.h (vec_info::lookup_def): Declare.
7111 * tree-vectorizer.c (vec_info::lookup_def): New function.
7112 * tree-vect-patterns.c (vect_get_internal_def): Use it.
7113 (vect_widened_op_tree): Likewise.
7114 * tree-vect-stmts.c (vect_is_simple_use): Likewise.
7115 * tree-vect-loop.c (vect_analyze_loop_operations): Likewise.
7116 (vectorizable_reduction): Likewise.
7117 (vect_valid_reduction_input_p): Take a stmt_vec_info instead
7119 (vect_is_slp_reduction): Update calls accordingly. Use
7120 vec_info::lookup_def.
7121 (vect_is_simple_reduction): Likewise
7122 * tree-vect-slp.c (vect_detect_hybrid_slp_1): Use vec_info::lookup_def.
7124 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
7126 * tree-vectorizer.h (vec_info::lookup_stmt): Declare.
7127 * tree-vectorizer.c (vec_info::lookup_stmt): New function.
7128 * tree-vect-loop.c (vect_determine_vf_for_stmt): Use it instead
7130 (vect_determine_vectorization_factor, vect_analyze_scalar_cycles_1)
7131 (vect_compute_single_scalar_iteration_cost, vect_analyze_loop_form)
7132 (vect_update_vf_for_slp, vect_analyze_loop_operations)
7133 (vect_is_slp_reduction, vectorizable_induction)
7134 (vect_transform_loop_stmt, vect_transform_loop): Likewise.
7135 * tree-vect-patterns.c (vect_init_pattern_stmt):
7136 (vect_determine_min_output_precision_1, vect_determine_precisions)
7137 (vect_pattern_recog): Likewise.
7138 * tree-vect-stmts.c (vect_analyze_stmt, vect_transform_stmt): Likewise.
7139 * config/powerpcspe/powerpcspe.c (rs6000_density_test): Likewise.
7140 * config/rs6000/rs6000.c (rs6000_density_test): Likewise.
7141 * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
7142 (vect_detect_hybrid_slp_1, vect_detect_hybrid_slp_2)
7143 (vect_detect_hybrid_slp): Likewise. Change the walk_stmt_info
7144 info field from a loop to a loop_vec_info.
7146 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
7148 * tree-vectorizer.h (stmt_vec_info): Move typedef earlier in file.
7149 (vec_info::add_stmt): Declare.
7150 * tree-vectorizer.c (vec_info::add_stmt): New function.
7151 * tree-vect-data-refs.c (vect_create_data_ref_ptr): Use it.
7152 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Likewise.
7153 (vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
7154 (vectorizable_induction): Likewise.
7155 * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Likewise.
7156 * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
7157 (vectorizable_simd_clone_call, vectorizable_store): Likewise.
7158 (vectorizable_load): Likewise.
7159 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
7160 (vect_recog_bool_pattern, vect_recog_mask_conversion_pattern)
7161 (vect_recog_gather_scatter_pattern): Likewise.
7162 (append_pattern_def_seq): Likewise. Remove a check that is
7163 performed by add_stmt itself.
7165 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
7167 * tree-vect-loop.c (vectorizable_reduction): Fix an instance in
7168 which make_ssa_name was called with new_stmt before new_stmt
7171 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
7173 * tree-vect-loop.c (vect_valid_reduction_input_p): New function,
7175 (vect_is_slp_reduction): ...here...
7176 (vect_is_simple_reduction): ...and here. Remove repetition of tests
7177 that are already known to be false.
7179 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
7181 * tree-vectorizer.h (vect_free_slp_instance): Add a final_p parameter.
7182 * tree-vect-slp.c (vect_free_slp_tree): Likewise. Don't update
7183 STMT_VINFO_NUM_SLP_USES when it's true.
7184 (vect_free_slp_instance): Add a final_p parameter and pass it to
7186 (vect_build_slp_tree_2): Update call to vect_free_slp_instance.
7187 (vect_analyze_slp_instance): Likewise.
7188 (vect_slp_analyze_operations): Likewise.
7189 (vect_slp_analyze_bb_1): Likewise.
7190 * tree-vectorizer.c (vec_info): Likewise.
7191 * tree-vect-loop.c (vect_transform_loop): Likewise.
7193 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
7195 * tree-vect-loop.c (vectorizable_reduction): Assert that the
7196 function is not called for second and subsequent members of
7199 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
7201 * tree-vect-loop.c (get_initial_def_for_reduction): Move special
7202 cases for nested loops from here to ...
7203 (vect_create_epilog_for_reduction): ...here. Only call
7204 vect_is_simple_use for inner-loop reductions.
7206 2018-07-31 Martin Liska <mliska@suse.cz>
7208 PR gcov-profile/85338
7209 PR gcov-profile/85350
7210 PR gcov-profile/85372
7211 * profile.c (struct location_triplet): New.
7212 (struct location_triplet_hash): Likewise.
7213 (output_location): Do not output a BB that
7214 is already recorded for a line.
7215 (branch_prob): Use streamed_locations.
7217 2018-07-31 Martin Liska <mliska@suse.cz>
7219 PR gcov-profile/85370
7220 * coverage.c (coverage_begin_function): Do not mark target
7221 clones as artificial functions.
7223 2018-07-31 Martin Liska <mliska@suse.cz>
7225 PR gcov-profile/83813
7226 PR gcov-profile/84758
7227 PR gcov-profile/85217
7228 PR gcov-profile/85332
7229 * profile.c (branch_prob): Do not record GOTO expressions
7230 for GIMPLE statements which locations are already streamed.
7232 2018-07-31 Olivier Hainque <hainque@adacore.com>
7234 * gcc.c (handle_spec_function): Accept a soft_matched_part
7235 argument, as do_spec_1. Pass it down to ...
7236 (eval_spec_function): Accept a soft_matched_part argument,
7237 and pass it down to ...
7238 (do_spec_2): Accept a soft_matched_part argument, and pass
7239 it down to do_spec_1.
7240 (do_spec_1): Pass soft_matched_part to handle_spec_function.
7241 (handle_braces): Update call to handle_spec_function.
7242 (driver::set_up_specs): Update calls to do_spec_2.
7243 (compare_debug_dump_opt_spec_function): Likewise.
7244 (compare_debug_self_opt_spec_function): Likewise.
7246 2018-07-31 Olivier Hainque <hainque@adacore.com>
7248 * common.opt (nolibc): New option.
7249 * doc/invoke.texi (Link Options): Document it.
7250 * gcc.c (LINK_GCC_C_SEQUENCE_SPEC): Honor nolibc.
7251 * config/alpha/linux.h: Likewise.
7252 * config/arc/elf.h: Likewise.
7253 * config/arm/uclinux-elf.h: Likewise.
7254 * config/arm/unknown-elf.h: Likewise.
7255 * config/avr/avrlibc.h: Likewise.
7256 * config/bfin/bfin.h: Likewise.
7257 * config/bfin/linux.h: Likewise.
7258 * config/bfin/uclinux.h: Likewise.
7259 * config/darwin.h: Likewise.
7260 * config/darwin10.h: Likewise.
7261 * config/darwin12.h: Likewise.
7262 * config/gnu-user.h: Likewise.
7263 * config/lm32/uclinux-elf.h: Likewise.
7264 * config/pa/pa-hpux11.h: Likewise.
7265 * config/pa/pa64-hpux.h: Likewise.
7266 * config/sparc/sparc.h: Likewise.
7268 2018-07-31 Olivier Hainque <hainque@adacore.com>
7270 * gcc.c (getenv_spec_function): Prepend '/' to value for allowed
7271 undefined variables.
7273 2018-07-30 Segher Boessenkool <segher@kernel.crashing.org>
7276 * config/arm/arm.c (arm_block_set_aligned_vect): Use gen_int_mode
7279 2018-07-30 Bernd Edlinger <bernd.edlinger@hotmail.de>
7281 * tree-ssa-forwprop.c (simplify_builtin_call): Don't create a not NUL
7282 terminated string literal.
7284 2018-07-30 Segher Boessenkool <segher@kernel.crashing.org>
7286 PR rtl-optimization/85160
7287 * combine.c (is_just_move): New function.
7288 (try_combine): Allow combining two instructions into two if neither of
7289 the original instructions was a move.
7291 2018-07-30 Alexander Monakov <amonakov@ispras.ru>
7294 * doc/extend.texi (Global Register Variables): Discourage use of type
7296 (Local Register Variables): Likewise.
7298 2018-07-30 Richard Sandiford <richard.sandiford@arm.com>
7300 PR tree-optimization/86506
7301 * hwint.h (ceil_log2): Resync with hwint.c implementation.
7303 2018-07-30 Ilya Leoshkevich <iii@linux.ibm.com>
7306 * lra-constraints.c (spill_hard_reg_in_range): When selecting the
7307 hard_regno, make sure no insn between `from` and `to` clobbers it.
7309 2018-07-30 Cesar Philippidis <cesar@codesourcery.com>
7310 Tom de Vries <tdevries@suse.de>
7312 * config/nvptx/nvptx.c (PTX_GANG_DEFAULT): Rename to ...
7313 (PTX_DEFAULT_RUNTIME_DIM): ... this.
7314 (nvptx_goacc_validate_dims): Set default worker and gang dims to
7315 PTX_DEFAULT_RUNTIME_DIM.
7316 (nvptx_dim_limit): Ignore GOMP_DIM_WORKER.
7318 2018-07-29 John David Anglin <danglin@gcc.gnu.org>
7320 * config/pa/pa.c (pa_output_addr_vec): Align address table.
7321 * config/pa/pa.h (JUMP_TABLES_IN_TEXT_SECTION): Revise comment.
7322 * config/pa/pa32-linux.h (JUMP_TABLES_IN_TEXT_SECTION): Define.
7324 2018-07-27 Michael Meissner <meissner@linux.ibm.com>
7326 * config/rs6000/constraints.md (wG constraint): Delete, no longer
7328 * config/rs6000/predicates.md (p9_fusion_reg_operand): Rename
7329 predicate to reflect toc fusion has been deleted.
7330 (toc_fusion_mem_raw): Delete, no longer used.
7331 (toc_fusion_mem_wrapped): Likewise.
7332 * config/rs6000/rs6000-cpus.def (POWERPC_MASKS): Delete toc
7334 * config/rs6000/rs6000-protos.h (fusion_wrap_memory_address):
7335 Delete, no longer used.
7336 * config/rs6000/rs6000.c (struct rs6000_reg_addr): Delete fields
7337 meant to be used for toc fusion.
7338 (rs6000_debug_print_mode): Delete toc fusion debugging.
7339 (rs6000_debug_reg_global): Likewise.
7340 (rs6000_init_hard_regno_mode_ok): Delete setting up fields for toc
7341 fusion and secondary reload support that were never used.
7342 (rs6000_option_override_internal): Delete TOC fusion, that was only
7343 partially defined, and it did not work unless you also used the
7345 (rs6000_legitimate_address_p): Delete TOC fusion support.
7346 (rs6000_opt_masks): Likewise.
7347 (fusion_wrap_memory_address): Delete function, no longer used.
7348 (fusion_split_address); Delete TOC fusion support.
7349 * config/rs6000/rs6000.h (TARGET_TOC_FUSION_INT): Delete, no
7350 longer used with toc fusion being deleted.
7351 (TARGET_TOC_FUSION_FP): Likewise.
7352 * config/rs6000/rs6000.md (UNSPEC_FUSION_ADDIS): Delete TOC fusion
7354 (toc fusion spliter): Delete TOC fusion support.
7355 (toc_fusionload_<mode>): Likewise.
7356 (toc_fusionload_di): Likewise.
7357 (fusion_gpr_load_<mode>): Delete generator function, this insn no
7358 longer needs to be named. Rename predicate to delete TOC fusion.
7359 (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
7360 (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
7361 (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
7362 (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
7363 (p9 fusion peephole2s): Rename predicate to delete TOC fusion.
7365 2018-07-27 Kelvin Nilsen <kelvin@gcc.gnu.org>
7367 * doc/extend.texi (Basic PowerPC Built-in Functions Available on
7368 ISA 2.05): Replace __uint128_t with __uint128 and __int128_t with
7369 __int128 in built-in function prototypes.
7370 (PowerPC AltiVec Built-in Functions on ISA 2.07): Likewise.
7371 (PowerPC AltiVec Built-in Functions on ISA 3.0): Likewise.
7373 2018-07-27 Martin Sebor <msebor@redhat.com>
7375 PR tree-optimization/86696
7376 * tree-ssa-strlen.c (get_min_string_length): Handle all integer
7377 types, including enums.
7378 (handle_char_store): Be prepared for the above function to fail.
7380 2018-07-26 Qing Zhao <qing.zhao@oracle.com>
7382 * builtins.c (inline_expand_builtin_string_cmp): Disable inlining
7383 when optimization level is lower than 2 or optimize for size.
7385 2018-07-26 Martin Sebor <msebor@redhat.com>
7387 PR tree-optimization/86043
7388 PR tree-optimization/86042
7389 * tree-ssa-strlen.c (handle_builtin_memcpy): Handle strict overlaps.
7390 (get_string_cst_length): Rename...
7391 (get_min_string_length): ...to this. Add argument.
7392 (handle_char_store): Extend to handle multi-character stores by
7394 * tree.c (initializer_zerop): Use new argument. Handle MEM_REF.
7395 * tree.h (initializer_zerop): Add argument.
7397 2018-07-26 Jakub Jelinek <jakub@redhat.com>
7400 * omp-low.c (scan_sharing_clauses): Don't ignore map clauses for
7401 declare target to variables if they have always,{to,from,tofrom} map
7404 2018-07-26 Martin Liska <mliska@suse.cz>
7407 * lto-wrapper.c: Add linker_output as prefix
7408 for ltrans_output_file.
7410 2018-07-26 Segher Boessenkool <segher@kernel.crashing.org>
7412 PR rtl-optimization/85805
7413 * combine.c (reg_nonzero_bits_for_combine): Only use the last set
7414 value for hard registers if that was written in the same mode.
7416 2018-07-26 Martin Liska <mliska@suse.cz>
7418 PR gcov-profile/86536
7419 * gcov.c (format_gcov): Use printf format %.*f directly
7420 and do not handle special values.
7422 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
7424 * common/config/arc/arc-common.c (arc_option_optimization_table):
7425 Update default optimizations for size.
7427 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
7429 * config/arc/arc.md (movsf_insn): Add short instruction selection.
7430 * config/arc/constraints.md (CfZ): New constraint.
7431 * config/arc/fpu.md (addssf3_fpu): Use CfZ constraint.
7432 (subsf3_fpu): Likewise.
7433 (cmpsf_fpu): Likewise.
7434 (cmpsf_fpu_uneq): Likewise.
7436 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
7438 * config/arc/arc.c (compact_memory_operand_p): Check for uncached
7440 (arc_is_uncached_mem_p): uncached applies to both the variable and
7443 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
7445 * config/arc/arc.h (ADDITIONAL_REGISTER_NAMES): Add additional
7448 2018-07-25 David Malcolm <dmalcolm@redhat.com>
7450 * optinfo-emit-json.cc (class optrecord_json_writer): Convert
7451 field "m_scopes" from vec to auto_vec.
7453 2018-07-25 Martin Liska <mliska@suse.cz>
7455 * config/powerpcspe/powerpcspe-protos.h (rs6000_loop_align): Fix
7458 2018-07-25 Richard Biener <rguenther@suse.de>
7461 * dwarf2out.c (dwarf2out_decl): Do not handle nested functions
7462 special wrt context_die late.
7463 (gen_subprogram_die): Re-use DIEs in local scope.
7465 2018-07-25 Richard Sandiford <richard.sandiford@arm.com>
7467 PR tree-optimization/86644
7468 * hwint.c (ceil_log2): Fix comment. Return 0 for 0.
7470 2018-07-25 Martin Liska <mliska@suse.cz>
7473 * dumpfile.c: And excluded values with TDF_ALL_VALUES.
7474 * dumpfile.h (enum dump_flag): Defince TDF_ALL_VALUES.
7476 2018-07-25 Martin Liska <mliska@suse.cz>
7479 * params.def: Explain ASan abbreviation and provide
7480 a documentation link.
7482 2018-07-24 Martin Sebor <msebor@redhat.com>
7484 PR tree-optimization/86622
7485 PR tree-optimization/86532
7486 * builtins.h (string_length): Declare.
7487 * builtins.c (c_strlen): Correct handling of non-constant offsets.
7488 (check_access): Be prepared for non-constant length ranges.
7489 (string_length): Make extern.
7490 * expr.c (string_constant): Only handle the minor non-constant
7491 array index. Use string_constant to compute the length of
7492 a generic string constant.
7494 2018-07-24 Richard Sandiford <richard.sandiford@arm.com>
7496 PR tree-optimization/86618
7497 * tree-vect-stmts.c (vectorizable_call): Don't take the address
7498 of LOOP_VINFO_MASKS (loop_vinfo) when loop_vinfo is null.
7500 2018-07-24 David Malcolm <dmalcolm@redhat.com>
7502 PR tree-optimization/86636
7503 * json.cc (json::object::set): Fix comment. Add assertions.
7504 (json::array::append): Move here from json.h. Add comment and an
7506 (json::string::string): Likewise.
7507 * json.h (json::array::append): Move to json.cc.
7508 (json::string::string): Likewise.
7509 * optinfo-emit-json.cc
7510 (optrecord_json_writer::impl_location_to_json): Assert that we
7511 aren't attempting to write out UNKNOWN_LOCATION, or an ad-hoc
7512 wrapper around it. Expand the location once, rather than three
7514 (optrecord_json_writer::inlining_chain_to_json): Fix the check for
7515 UNKNOWN_LOCATION, to use LOCATION_LOCUS to look through ad-hoc
7517 (optrecord_json_writer::optinfo_to_json): Likewise, in four
7518 places. Fix some overlong lines.
7520 2018-07-24 Matthew Malcomson <matthew.malcomson@arm.com>
7522 * config/aarch64/aarch64-simd.md
7523 (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>): Split into...
7524 (aarch64_<ANY_EXTEND:su>subw<mode>): ... This...
7525 (aarch64_<ANY_EXTEND:su>addw<mode>): ... And this.
7526 (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>_internal): Split into...
7527 (aarch64_<ANY_EXTEND:su>subw<mode>_internal): ... This...
7528 (aarch64_<ANY_EXTEND:su>addw<mode>_internal): ... And this.
7529 (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w2<mode>_internal): Split into...
7530 (aarch64_<ANY_EXTEND:su>subw2<mode>_internal): ... This...
7531 (aarch64_<ANY_EXTEND:su>addw2<mode>_internal): ... And this.
7533 2018-07-24 Jakub Jelinek <jakub@redhat.com>
7536 * expmed.c (expand_divmod): Punt if d == HOST_WIDE_INT_MIN
7537 and size > HOST_BITS_PER_WIDE_INT. For size > HOST_BITS_PER_WIDE_INT
7538 and abs_d == d, do the power of two handling if profitable.
7540 2018-07-24 Richard Biener <rguenther@suse.de>
7542 * match.pd: Add BIT_FIELD_REF canonicalizations.
7544 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
7547 * genmatch.c (dt_operand::gen_match_op): Avoid folding volatile values.
7549 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
7551 * gimple-fold.c (gimple_fold_builtin_printf): Don't create a not NUL
7552 terminated STRING_CST object.
7554 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
7556 hsa-dump.c (dump_hsa_symbol): Avoid out of scope access to buf.
7558 2018-07-23 Segher Boessenkool <segher@kernel.crashing.org>
7560 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Adjust.
7561 * config/rs6000/rs6000-protos.h (rs6000_split_v4si_init): Delete.
7562 * config/rs6000/rs6000.c (rs6000_expand_vector_init): Always force
7563 the elements into a register.
7564 (rs6000_split_v4si_init_di_reg): Delete.
7565 (rs6000_split_v4si_init): Delete.
7566 * config/rs6000/vsx.md (unspec): Delete UNSPEC_VSX_VEC_INIT.
7567 (vsx_init_v4si): Rewrite as a define_expand.
7569 2018-07-23 Segher Boessenkool <segher@kernel.crashing.org>
7571 * config/rs6000/rs6000.md (splitters for rldimi and rlwimi with the
7572 zero_extend argument from memory): New.
7574 2018-07-22 Martin Sebor <msebor@redhat.com>
7577 * gimple-ssa-warn-alloca.c (alloca_call_type_by_arg): Avoid
7578 diagnosing calls with unknown arguments unless -Walloca-larger-than
7579 is restricted to less than PTRDIFF_MAX bytes.
7581 2018-07-22 Gerald Pfeifer <gerald@pfeifer.com>
7583 * doc/gcov.texi (Invoking Gcov): Editorial changes.
7585 2018-07-20 David Malcolm <dmalcolm@redhat.com>
7587 * pretty-print.c (text_info::set_location): Remove redundant
7588 "line_table" parameter from call to rich_location::set_range.
7590 2018-07-20 Martin Sebor <msebor@redhat.com>
7593 * builtins.c (expand_builtin_alloca): Adjust.
7594 * calls.c (alloc_max_size): Simplify.
7595 * cgraphunit.c (cgraph_node::expand): Adjust.
7596 * common.opt (larger_than_size, warn_frame_larger_than): Remove
7598 (frame_larger_than_size): Same.
7599 (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Change options
7600 to take a HOST_WIDE_INT argument and accept a byte-size suffix.
7602 * doc/invoke.texi (GCC Command Options): Document option arguments.
7603 Explain byte-size arguments and suffixes.
7604 (-Wvla-larger-than, -Wno-alloc-size-larger-than): Update.
7605 (-Wno-alloca-larger-than, -Wno-vla-larger-than): Same.
7606 (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Same.
7607 * doc/options.texi (UInteger): Expand.
7608 (Host_Wide_Int, ByteSize): Document new properties.
7609 * final.c (final_start_function_1): Include sizes in an error message.
7610 * function.c (frame_offset_overflow): Same.
7611 * gimple-ssa-warn-alloca.c (pass_walloca::gate): Adjust.
7612 (alloca_call_type_by_arg): Change function argument to HOST_WIDE_INT.
7613 Diagnose unbounded alloca calls only for limits of less than
7615 (alloca_call_type): Adjust. Diagnose possibly out-of-bounds alloca
7616 calls and VLA size only for limits of less than PTRDIFF_MAX. Same
7618 (pass_walloca::execute): Adjust. Diagnose alloca calls in loops
7619 only for limits of less than PTRDIFF_MAX.
7620 * langhooks-def.h (lhd_handle_option): Change function argument
7622 * langhooks.c (lhd_handle_option): Same.
7623 * langhooks.h (handle_option): Same.
7624 * opt-functions.awk (switch_bit_fields): Handle Host_Wide_Int and
7626 (var_type, var_type_struct): Same.
7627 (var_set): Handle ByteSize flag.
7628 * optc-gen.awk: Add comments to output to ease debugging. Make
7629 use of HOST_WIDE_INT where appropriate.
7630 * opts-gen-save.awk: Use %lx to format unsigned long.
7631 * opth-gen.awk: Change function argument to HOST_WIDE_INT.
7632 * opts-common.c (integral_argument): Return HOST_WIDE_INT and add
7633 arguments. Parse bytes-size suffixes.
7634 (enum_arg_to_value): Change function argument to HOST_WIDE_INT.
7635 (enum_value_to_arg): Same.
7636 (decode_cmdline_option): Handle cl_host_wide_int. Adjust.
7637 (handle_option): Adjust.
7638 (generate_option): Change function argument to HOST_WIDE_INT.
7639 (cmdline_handle_error): Adjust.
7640 (read_cmdline_option): Change function argument to HOST_WIDE_INT.
7641 (set_option): Change function argument to HOST_WIDE_INT.
7642 (option_enabled): Handle cl_host_wide_int.
7643 (get_option_state): Handle CLVC_SIZE.
7644 (control_warning_option): Same.
7645 * opts.c (common_handle_option): Change function argument to
7646 HOST_WIDE_INT. Remove handling of OPT_Walloca_larger_than_ and
7647 OPT_Wvla_larger_than_.
7648 * opts.h (enum cl_var_type): Add an enumerator.
7649 * stor-layout.c (layout_decl): Print a more meaningful warning.
7650 * toplev.c (output_stack_usage): Adjust.
7652 2018-07-20 Qing Zhao <qing.zhao@oracle.com>
7654 * builtins.c (expand_builtin_memcmp): Delete the last parameter for
7655 call to inline_expand_builtin_string_cmp.
7656 (expand_builtin_strcmp): Likewise.
7657 (expand_builtin_strncmp): Likewise.
7658 (inline_string_cmp): Delete the last parameter, change char_type_node
7659 to unsigned_char_type_node for strcmp/strncmp, add conversions to the
7661 (inline_expand_builtin_string_cmp): Delete the last parameter, give up
7662 the inlining expansion on target where the type of the call has same or
7663 narrower precision than unsigned char.
7665 2018-07-20 David Malcolm <dmalcolm@redhat.com>
7667 * Makefile.in (OBJS): Add json.o and optinfo-emit-json.o.
7668 (CFLAGS-optinfo-emit-json.o): Define TARGET_NAME.
7669 * common.opt (fsave-optimization-record): New option.
7670 * coretypes.h (struct kv_pair): Move here from dumpfile.c.
7671 * doc/invoke.texi (-fsave-optimization-record): New option.
7672 * dumpfile.c: Include "optinfo-emit-json.h".
7673 (struct kv_pair): Move to coretypes.h.
7674 (optgroup_options): Make non-static.
7675 (dump_context::end_scope): Call
7676 optimization_records_maybe_pop_dump_scope.
7677 * dumpfile.h (optgroup_options): New decl.
7678 * json.cc: New file.
7680 * optinfo-emit-json.cc: New file.
7681 * optinfo-emit-json.h: New file.
7682 * optinfo.cc: Include "optinfo-emit-json.h".
7683 (optinfo::emit): Call optimization_records_maybe_record_optinfo.
7684 (optinfo_enabled_p): Check optimization_records_enabled_p.
7685 (optinfo_wants_inlining_info_p): Likewise.
7686 * optinfo.h: Update comment.
7687 * profile-count.c (profile_quality_as_string): New function.
7688 * profile-count.h (profile_quality_as_string): New decl.
7689 (profile_count::quality): New accessor.
7690 * selftest-run-tests.c (selftest::run_tests): Call json_cc_tests
7691 and optinfo_emit_json_cc_tests.
7692 * selftest.h (selftest::json_cc_tests): New decl.
7693 (selftest::optinfo_emit_json_cc_tests): New decl.
7694 * toplev.c: Include "optinfo-emit-json.h".
7695 (compile_file): Call optimization_records_finish.
7696 (do_compile): Call optimization_records_start.
7697 * tree-ssa-live.c: Include optinfo.h.
7698 (remove_unused_scope_block_p): Retain inlining information if
7699 optinfo_wants_inlining_info_p returns true.
7701 2018-07-20 Richard Biener <rguenther@suse.de>
7704 * dwarf2out.c (dwarf2out_die_ref_for_decl): Test in_lto_p
7705 to cover -flto-partition=none.
7707 2018-07-20 Martin Liska <mliska@suse.cz>
7709 * tree.h (DECL_LOCATION_RANGE): Remove unused macro.
7710 (get_decl_source_range): Remove unused function.
7712 2018-07-20 Richard Biener <rguenther@suse.de>
7714 * tree-ssa-sccvn.h (struct vn_nary_op_s): Add next member.
7715 (struct vn_phi_s): Likewise.
7716 (struct vn_reference_s): Likewise.
7717 * tree-ssa-sccvn.c (vn_nary_op_hasher::equal): Add shortcut
7718 for searching the slot of an entry known to be in the hash itself.
7719 (vn_phi_hasher::equal): Likewise.
7720 (vn_reference_hasher::equal): Likewise.
7721 (last_inserted_ref, last_inserted_phi, last_inserted_nary): New
7723 (optimistic_info, current_info): Remove, keeping only valid_info.
7724 (vn_reference_lookup_1): Remove fallback lookup.
7725 (vn_reference_lookup_2): Likewise.
7726 (vn_nary_op_lookup_1): Likewise.
7727 (vn_phi_lookup): Likewise.
7728 (vn_nary_build_or_lookup_1): Make sure to not chain the built
7730 (vn_reference_insert): Adjust, chain the inserted hash element
7731 at last_inserted_ref.
7732 (vn_reference_insert_pieces): Likewise.
7733 (visit_reference_op_call): Likewise.
7734 (vn_nary_op_insert_into): Chain the inserted hash element at
7736 (vn_nary_op_insert_pieces): Adjust.
7737 (vn_nary_op_insert): Likewise.
7738 (vn_nary_op_insert_stmt): Likewise.
7739 (vn_phi_insert): Adjust, chain the inserted hash element at
7741 (process_scc): Remove clearing and copying the optimistic
7742 table. Instead remove elements inserted during an optimistic
7743 iteration from the single table we maintain.
7744 (init_scc_vn): Adjust.
7745 (free_scc_vn): Likewise.
7746 (sccvn_dom_walker::record_cond): Likewise.
7747 (sccvn_dom_walker::after_dom_children): Likewise.
7749 2018-07-19 Martin Sebor <msebor@redhat.com>
7751 PR tree-optimization/84047
7752 PR tree-optimization/83776
7753 * tree-vrp.c (vrp_prop::check_mem_ref): New function.
7754 (check_array_bounds): Call it.
7756 2018-07-19 Martin Sebor <msebor@redhat.com>
7758 * align.h (align_flags): Use member initialization.
7760 2018-07-19 David Malcolm <dmalcolm@redhat.com>
7762 * Makefile.in (OBJS): Add optinfo.o.
7763 * coretypes.h (class symtab_node): New forward decl.
7764 (struct cgraph_node): New forward decl.
7765 (class varpool_node): New forward decl.
7766 * dump-context.h: New file.
7767 * dumpfile.c: Include "optinfo.h", "dump-context.h", "cgraph.h",
7769 (refresh_dumps_are_enabled): Use optinfo_enabled_p.
7770 (set_dump_file): Call dumpfile_ensure_any_optinfo_are_flushed.
7771 (set_alt_dump_file): Likewise.
7772 (dump_context::~dump_context): New dtor.
7773 (dump_gimple_stmt): Move implementation to...
7774 (dump_context::dump_gimple_stmt): ...this new member function.
7775 Add the stmt to any pending optinfo, creating one if need be.
7776 (dump_gimple_stmt_loc): Move implementation to...
7777 (dump_context::dump_gimple_stmt_loc): ...this new member function.
7778 Start a new optinfo and add the stmt to it.
7779 (dump_gimple_expr): Move implementation to...
7780 (dump_context::dump_gimple_expr): ...this new member function.
7781 Add the stmt to any pending optinfo, creating one if need be.
7782 (dump_gimple_expr_loc): Move implementation to...
7783 (dump_context::dump_gimple_expr_loc): ...this new member function.
7784 Start a new optinfo and add the stmt to it.
7785 (dump_generic_expr): Move implementation to...
7786 (dump_context::dump_generic_expr): ...this new member function.
7787 Add the tree to any pending optinfo, creating one if need be.
7788 (dump_generic_expr_loc): Move implementation to...
7789 (dump_context::dump_generic_expr_loc): ...this new member
7790 function. Add the tree to any pending optinfo, creating one if
7792 (dump_printf): Move implementation to...
7793 (dump_context::dump_printf_va): ...this new member function. Add
7794 the text to any pending optinfo, creating one if need be.
7795 (dump_printf_loc): Move implementation to...
7796 (dump_context::dump_printf_loc_va): ...this new member function.
7797 Start a new optinfo and add the stmt to it.
7798 (dump_dec): Move implementation to...
7799 (dump_context::dump_dec): ...this new member function. Add the
7800 value to any pending optinfo, creating one if need be.
7801 (dump_context::dump_symtab_node): New member function.
7802 (dump_context::get_scope_depth): New member function.
7803 (dump_context::begin_scope): New member function.
7804 (dump_context::end_scope): New member function.
7805 (dump_context::ensure_pending_optinfo): New member function.
7806 (dump_context::begin_next_optinfo): New member function.
7807 (dump_context::end_any_optinfo): New member function.
7808 (dump_context::s_current): New global.
7809 (dump_context::s_default): New global.
7810 (dump_scope_depth): Delete global.
7811 (dumpfile_ensure_any_optinfo_are_flushed): New function.
7812 (dump_symtab_node): New function.
7813 (get_dump_scope_depth): Reimplement in terms of dump_context.
7814 (dump_begin_scope): Likewise.
7815 (dump_end_scope): Likewise.
7816 (selftest::temp_dump_context::temp_dump_context): New ctor.
7817 (selftest::temp_dump_context::~temp_dump_context): New dtor.
7818 (selftest::verify_item): New function.
7819 (ASSERT_IS_TEXT): New macro.
7820 (ASSERT_IS_TREE): New macro.
7821 (ASSERT_IS_GIMPLE): New macro.
7822 (selftest::test_capture_of_dump_calls): New test.
7823 (selftest::dumpfile_c_tests): Call it.
7824 * dumpfile.h (dump_printf, dump_printf_loc, dump_basic_block)
7825 (dump_generic_expr_loc, dump_generic_expr, dump_gimple_stmt_loc)
7826 (dump_gimple_stmt, dump_dec): Gather these related decls and add a
7827 descriptive comment.
7828 (dump_function, print_combine_total_stats, enable_rtl_dump_file)
7829 (dump_node, dump_bb): Move these unrelated decls.
7830 (class dump_manager): Add leading comment.
7831 * optinfo.cc: New file.
7832 * optinfo.h: New file.
7834 2018-07-19 Michael Collison <michael.collison@arm.com>
7835 Richard Henderson <rth@redhat.com>
7837 * config/aarch64/aarch64.md (subv<GPI>4, usubv<GPI>4): New patterns.
7838 (subti): Handle op1 zero.
7839 (subvti4, usub4ti4): New.
7840 (*sub<GPI>3_compare1_imm): New.
7841 (sub<GPI>3_carryinCV): New.
7842 (*sub<GPI>3_carryinCV_z1_z2, *sub<GPI>3_carryinCV_z1): New.
7843 (*sub<GPI>3_carryinCV_z2, *sub<GPI>3_carryinCV): New.
7845 2018-07-19 Michael Collison <michael.collison@arm.com>
7846 Richard Henderson <rth@redhat.com>
7848 * config/aarch64/aarch64.md: (addv<GPI>4, uaddv<GPI>4): New.
7849 (addti3): Create simpler code if low part is already known to be 0.
7850 (addvti4, uaddvti4): New.
7851 (*add<GPI>3_compareC_cconly_imm): New.
7852 (*add<GPI>3_compareC_cconly): New.
7853 (*add<GPI>3_compareC_imm): New.
7854 (*add<GPI>3_compareC): Rename from add<GPI>3_compare1; do not
7855 handle constants within this pattern..
7856 (*add<GPI>3_compareV_cconly_imm): New.
7857 (*add<GPI>3_compareV_cconly): New.
7858 (*add<GPI>3_compareV_imm): New.
7859 (add<GPI>3_compareV): New.
7860 (add<GPI>3_carryinC, add<GPI>3_carryinV): New.
7861 (*add<GPI>3_carryinC_zero, *add<GPI>3_carryinV_zero): New.
7862 (*add<GPI>3_carryinC, *add<GPI>3_carryinV): New.
7863 ((*add<GPI>3_compareC_cconly_imm): Replace 'ne' operator
7864 with 'comparison' operator.
7865 (*add<GPI>3_compareV_cconly_imm): Ditto.
7866 (*add<GPI>3_compareV_cconly): Ditto.
7867 (*add<GPI>3_compareV_imm): Ditto.
7868 (add<GPI>3_compareV): Ditto.
7869 (add<mode>3_carryinC): Ditto.
7870 (*add<mode>3_carryinC_zero): Ditto.
7871 (*add<mode>3_carryinC): Ditto.
7872 (add<mode>3_carryinV): Ditto.
7873 (*add<mode>3_carryinV_zero): Ditto.
7874 (*add<mode>3_carryinV): Ditto.
7876 2018-07-19 Michael Collison <michael.collison@arm.com>
7877 Richard Henderson <rth@redhat.com>
7879 * config/aarch64/aarch64-modes.def (CC_V): New.
7880 * config/aarch64/aarch64-protos.h
7881 (aarch64_addti_scratch_regs): Declare
7882 (aarch64_subvti_scratch_regs): Declare.
7883 (aarch64_expand_subvti): Declare.
7884 (aarch64_gen_unlikely_cbranch): Declare
7885 * config/aarch64/aarch64.c (aarch64_select_cc_mode): Test
7886 for signed overflow using CC_Vmode.
7887 (aarch64_get_condition_code_1): Handle CC_Vmode.
7888 (aarch64_gen_unlikely_cbranch): New function.
7889 (aarch64_addti_scratch_regs): New function.
7890 (aarch64_subvti_scratch_regs): New function.
7891 (aarch64_expand_subvti): New function.
7893 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
7895 * config/aarch64/aarch64-option-extensions.def: New entry for profile
7897 * config/aarch64/aarch64.h (AARCH64_FL_PROFILE): New.
7898 * doc/invoke.texi (aarch64-feature-modifiers): New entry for profile
7901 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
7904 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
7905 address check not strict.
7907 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
7909 * config/aarch64/aarch64-simd.md (aarch64_simd_mov<VQ:mode>): Replace
7911 (store_pair_lanes<mode>): Likewise.
7912 * config/aarch64/aarch64-protos.h (aarch64_addr_query_type): Add new
7913 enum value 'ADDR_QUERY_LDP_STP_N'.
7914 * config/aarch64/aarch64.c (aarch64_addr_query_type): Likewise.
7915 (aarch64_print_address_internal): Add declaration.
7916 (aarch64_print_ldpstp_address): Remove.
7917 (aarch64_classify_address): Adapt mode for 'ADDR_QUERY_LDP_STP_N'.
7918 (aarch64_print_operand): Change printing of 'y'.
7919 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Use
7920 new enum value 'ADDR_QUERY_LDP_STP_N', don't hardcode mode and use
7921 'true' rather than '1'.
7922 * config/aarch64/constraints.md (Uml): Likewise.
7923 (Uml): Rename to Umn.
7926 2018-07-19 Richard Biener <rguenther@suse.de>
7928 * tree-ssa-sccvn.h (struct vn_phi_s): Make phiargs member
7930 * tree-ssa-sccvn.c: Remove alloc-pool.h use.
7931 (vn_phi_hasher): Derive from nofree_ptr_hash and remove remove method.
7932 (vn_reference_hasher): Likewise.
7933 (struct vn_tables_s): Remove obstack and alloc-pool members.
7934 (vn_tables_obstack, vn_tables_insert_obstack): New global obstacks.
7935 (vn_nary_build_or_lookup_1): Manually build in vn_tables_insert_obstack.
7936 (vn_reference_insert): Allocate from obstack instead of from alloc-pool.
7937 (vn_reference_insert_pieces): Likewise.
7938 (alloc_vn_nary_op_noinit): Adjust.
7939 (vn_nary_op_insert_stmt): Allocate phiargs in-place.
7940 (vn_phi_eq): Adjust.
7941 (shared_lookup_phiargs): Remove.
7942 (vn_phi_lookup): Allocate temporary vn_phi_s on the stack.
7943 (vn_phi_insert): Allocate from obstack instead of from alloc-pool.
7944 (visit_reference_op_call): Likewise.
7945 (copy_nary, copy_phi, copy_reference): Remove.
7946 (process_scc): Rewind the obstack when iterating. Do not
7947 copy the elements to valid_info but just move them from one
7948 hashtable to the other.
7949 (allocate_vn_table): Adjust.
7950 (free_vn_table): Likewise.
7951 (init_scc_vn): Likewise.
7952 (free_scc_vn): Likewise.
7954 2018-07-19 H.J. Lu <hongjiu.lu@intel.com>
7957 * config/i386/i386.c (rest_of_insert_endbranch): Lookup
7958 indirect_return as function type attribute.
7959 (ix86_attribute_table): Change indirect_return to function
7961 * doc/extend.texi: Update indirect_return attribute.
7963 2018-07-19 Aldy Hernandez <aldyh@redhat.com>
7965 * wide-int.h (widest2_int): New.
7966 * gimple-fold.c (arith_overflowed_p): Use it.
7967 * tree.h (widest2_int_cst): New.
7968 * tree-vrp.c (wide_int_binop_overflow): Rename from
7969 vrp_int_const_binop.
7970 Rewrite to work on trees.
7971 (extract_range_from_multiplicative_op_1): Abstract code to...
7972 (wide_int_range_min_max): ...here.
7973 (wide_int_range_cross_product): ...and here.
7974 (extract_range_from_binary_expr_1): Abstract overflow code to...
7975 (wide_int_range_mult_wrapping): ...here.
7976 * tree-vrp.h (wide_int_range_cross_product): New.
7977 (wide_int_range_mult_wrapping): New.
7979 2018-07-19 Andrew Senkevich <andrew.senkevich@intel.com>
7980 Julia Koval <julia.koval@intel.com>
7982 * config/i386/x86-tune-costs.h (skylake_memcpy,
7983 skylake_memset): Replace rep_prefix with unrolling for size 512.
7985 2018-07-18 Kugan Vivekanandarajah <kuganv@linaro.org>
7988 * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): Handle
7989 comparision with EQ_EXPR in last stmt.
7991 2018-07-18 Kelvin Nilsen <kelvin@gcc.gnu.org>
7993 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Rename
7994 this subsection to "PowerPC AltiVec/VSX Built-in Functions".
7995 (PowerPC AltiVec/VSX Built-in Functions): New name for subsection
7996 previously known as "PowerPC AltiVec Built-in Functions". Move
7997 some material to new subsubsections "PowerPC AltiVec Built-in
7998 Functions on ISA 2.06" and "PowerPC AltiVec Built-in Functions on
8000 (PowerPC Altivec Built-in Functions on ISA 2.05): New subsubsection.
8001 (PowerPC Altivec Built-in Functions on ISA 2.06): Likewise.
8002 (PowerPC Altivec Built-in Functions on ISA 2.07): Likewise.
8003 (PowerPC Altivec Built-in Functions on ISA 3.0): Likewise.
8005 2018-07-18 Richard Biener <rguenther@suse.de>
8007 PR tree-optimization/86557
8008 * tree-vect-patterns.c (vect_recog_divmod_pattern): Also handle
8011 2018-07-18 Ilya Leoshkevich <iii@linux.ibm.com>
8013 * config/s390/s390.c (s390_function_profiler): Generate CFI.
8015 2018-07-17 Jeff Law <law@redhat.com>
8017 * config/arm/arm.c (get_label_padding): Update for recent
8018 changes to label_to_alignment.
8020 PR tree-optimization/86010
8021 * tree-ssa-dse.c (compute_trims): Fix typo/thinko.
8023 * config/mips/mips.c (vr4130_align_insns): Update for recent
8024 changes to label_to_alignment.
8026 * config/frv/frv.c (frv_label_align): Update for recent changes
8027 to label_to_alignment.
8029 * config/nios2/nios2.c (nios2_label_align): Update for recent
8030 changes which dropped ALIGN_LABELS_LOG.
8032 2018-07-17 Andreas Schwab <schwab@linux-m68k.org>
8034 * config/m68k/m68k.md (umulsi3_highpart+1, const_umulsi3_highpart)
8035 (smulsi3_highpart+1, const_smulsi3_highpart): Add CC_STATUS_INIT.
8037 2018-07-17 Claudiu Zissulescu <claziss@synopsys.com>
8039 * config/arc/arc.c (arc_label_align): Use align_labels instead of
8040 deprecated align_labels_log.
8042 2018-07-17 Richard Biener <rguenther@suse.de>
8045 * dwarf2out.c (init_sections_and_labels): Always generate
8046 a debug_line_str_section for early LTO debug.
8047 (dwarf2out_finish): Reset debug_line_str_hash output early.
8048 Bump counter for extra dwarf5 .debug_loc labels to not conflict
8050 (dwarf2out_early_finish): Output debug_line_str.
8052 2018-07-17 Robin Dapp <rdapp@linux.ibm.com>
8054 * config/s390/s390.c (preferred_la_operand_p): Do not use LA with
8055 index register on z196 or later.
8057 2018-07-17 Robin Dapp <rdapp@linux.ibm.com>
8059 * config/s390/s390.c (s390_default_align): Set default function
8061 (s390_override_options_after_change): Call s390_default align.
8062 (s390_option_override_internal): Call s390_default_align.
8063 (TARGET_OVERRIDE_OPTIONS_AFTER_CHANGE): Define.
8065 2018-07-17 Jakub Jelinek <jakub@redhat.com>
8068 * omp-low.c (create_task_copyfn): Copy over also fields corresponding
8069 to _looptemp_ clauses, other than the first two.
8071 2018-07-17 Martin Liska <mliska@suse.cz>
8073 * opts.c: Do not enable OPT_falign_* for -Os.
8075 2018-07-17 Martin Liska <mliska@suse.cz>
8077 * align.h (MAX_CODE_ALIGN): New.
8078 (MAX_CODE_ALIGN_VALUE): New.
8079 * common/config/i386/i386-common.c (ix86_handle_option):
8080 (MAX_CODE_ALIGN): Moved to align.h.
8081 * final.c (MAX_CODE_ALIGN): Likewise.
8082 * opts.c (parse_and_check_align_values):
8083 (MAX_CODE_ALIGN): Likewise.
8084 (MAX_CODE_ALIGN_VALUE): Likewise.
8086 2018-07-17 Martin Liska <mliska@suse.cz>
8088 * config/i386/att.h (ASM_OUTPUT_ALIGN): Fix spacing
8089 in order to fulfil coding style.
8090 * config/i386/cygming.h (ASM_OUTPUT_ALIGN): Likewise.
8091 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
8092 * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
8093 * config/iq2000/iq2000.h (ASM_OUTPUT_ALIGN): Likewise.
8094 * config/pa/pa.h (ASM_OUTPUT_ALIGN): Likewise.
8095 * config/sparc/sol2.h (ASM_OUTPUT_ALIGN_WITH_NOP): Likewise.
8096 * config/sparc/sparc.h (ASM_OUTPUT_ALIGN): Likewise.
8097 * config/visium/visium.h (ASM_OUTPUT_ALIGN): Likewise.
8098 (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
8100 2018-07-17 Martin Liska <mliska@suse.cz>
8102 * align.h: New file.
8103 * config/alpha/alpha.c (alpha_align_insns_1): Use align_functions
8105 * config/i386/i386.c (ix86_avoid_jump_mispredicts): Use new return type
8106 align_flags of label_to_alignment.
8107 * config/m32r/m32r.h (LOOP_ALIGN): Wrap returned values into
8109 * config/m68k/m68k.c: Do not use removed align_labels_value and
8111 * config/nds32/nds32.h (JUMP_ALIGN): Wrap result into align_flags class.
8112 (LOOP_ALIGN): Likewise.
8113 (LABEL_ALIGN): Likewise.
8114 * config/powerpcspe/powerpcspe.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
8115 Remove not used macro.
8116 (rs6000_loop_align): Change return type to align_flags.
8117 (rs6000_loop_align_max_skip): Remove.
8118 * config/rs6000/rs6000-protos.h (rs6000_loop_align):
8119 Change return type to align_flags.
8120 * config/rs6000/rs6000.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
8121 Remove not used macro.
8122 (rs6000_loop_align): Change return type to align_flags.
8123 (rs6000_loop_align_max_skip): Remove.
8124 * config/rx/rx.h (JUMP_ALIGN): Wrap integer values
8125 * config/rx/rx-protos.h (rx_align_for_label): Make it
8127 * config/rx/rx.c (rx_align_for_label): Change return type
8129 (rx_max_skip_for_label): Remove TARGET_ASM_*_ALIGN_MAX_SKIP
8131 into align_flags class.
8132 (LABEL_ALIGN): Likewise.
8133 (LOOP_ALIGN): Likewise.
8134 * config/s390/s390.c (s390_label_align): Use align_flags
8136 (s390_asm_output_function_label): Likewise.
8137 * config/sh/sh.c (sh_override_options_after_change):
8138 Use align_flags class directly without macros.
8139 (find_barrier): Likewise.
8140 (barrier_align): Likewise.
8141 (sh_loop_align): Likewise.
8142 * config/spu/spu.c (spu_option_override):
8143 Use align_flags_tuple::get_value instead of removed macros.
8144 (spu_sched_init): Likewise.
8145 * config/spu/spu.h (GTY): Likewise.
8146 * config/visium/visium.c (visium_option_override):
8147 Set "8" as default secondary alignment.
8148 * config/visium/visium.h (SUBALIGN_LOG): Define to 3
8149 in order to guarantee secondary alignment of 8.
8150 * coretypes.h: Include align.h header file.
8151 * doc/tm.texi: Remove TARGET_ASM_JUMP_ALIGN_MAX_SKIP,
8152 TARGET_ASM_LOOP_ALIGN_MAX_SKIP, TARGET_ASM_LABEL_ALIGN_MAX_SKIP
8153 and TARGET_ASM_LABEL_ALIGN_AFTER_BARRIER_MAX_SKIP macros.
8154 * doc/tm.texi.in: Likewise.
8155 * final.c (struct label_alignment): Remove not used structure.
8156 (LABEL_ALIGN): Change type to align_flags.
8157 (LOOP_ALIGN): Likewise.
8158 (JUMP_ALIGN): Likewise.
8159 (default_loop_align_max_skip): Remove.
8160 (default_label_align_max_skip): Likewise.
8161 (default_jump_align_max_skip): Likewise.
8162 (default_label_align_after_barrier_max_skip):
8163 (LABEL_TO_ALIGNMENT): Change to access label_align vector.
8164 (LABEL_TO_MAX_SKIP): Remove.
8165 (label_to_alignment): Return align_flags type instead of integer.
8166 (label_to_max_skip): Remove.
8167 (align_fuzz): Use align_flags type.
8168 (compute_alignments): Use align_flags type and use align_flags::max
8169 to combine multiple alignments.
8170 (grow_label_align): Grow vec instead of C array.
8171 (update_alignments): Assign just LABEL_TO_ALIGNMENT.
8172 (shorten_branches): Use align_flags type and use align_flags::max
8173 to combine multiple alignments.
8174 (final_scan_insn_1): Remove usage of secondary alignment that comes
8175 from label alignment, but instead use proper secondary alignment
8176 which is computed in grow_label_align.
8177 * flags.h (struct align_flags_tuple): Move to align.h.
8178 (struct align_flags): Likewise.
8179 (state_align_loops): Rename to align_loops.
8180 (state_align_jumps): Rename to align_jumps.
8181 (state_align_labels): Rename to align_labels.
8182 (state_align_functions): Rename to align_functions.
8183 (align_loops_log): Remove.
8184 (align_jumps_log): Remove.
8185 (align_labels_log): Remove.
8186 (align_functions_log): Remove.
8187 (align_loops_max_skip): Remove.
8188 (align_jumps_max_skip): Remove.
8189 (align_labels_max_skip): Remove.
8190 (align_functions_max_skip): Remove.
8191 (align_loops_value): Remove.
8192 (align_jumps_value): Remove.
8193 (align_labels_value): Remove.
8194 (align_functions_value): Remove.
8195 * output.h (label_to_alignment): Change return type to align_flags.
8196 (label_to_max_skip): Remove.
8197 * target.def: Remove loop_align_max_skip, label_align_max_skip,
8198 jump_align_max_skip macros.
8199 * targhooks.h (default_loop_align_max_skip): Remove.
8200 (default_label_align_max_skip): Likewise.
8201 (default_jump_align_max_skip): Likewise.
8202 (default_label_align_after_barrier_max_skip): Remove.
8203 * toplev.c (read_log_maxskip): Use ::normalize function.
8204 (parse_N_M): Remove not used argument and also call ::normalize.
8205 (parse_alignment_opts): Do not pass unused arguments.
8206 * varasm.c (assemble_start_function): Use directly align_functions
8207 instead of removed macros.
8208 * system.h: Do not poison removed macros.
8210 2018-07-17 Jakub Jelinek <jakub@redhat.com>
8213 * gimplify.c (gimplify_omp_for): Ensure taskloop firstprivatized init
8214 and cond temporaries don't have reference type if iterator has
8215 pointer type. For init use &for_pre_body instead of pre_p if
8216 for_pre_body is non-empty.
8218 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
8220 * config/rs6000/rs6000.md (trunc<mode>sf2): Expand truncates of
8221 double-double modes to SFmode directly directly.
8222 (trunc<mode>sf2_fprs): Delete.
8224 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
8226 * config/rs6000/rs6000.c (init_float128_ibm): Use the correct names
8227 for conversions between IFmode and the decimal floating point modes.
8228 (init_float128_ieee): Use the correct names for conversions between
8229 KFmode and the decimal floating point modes.
8231 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
8233 * config/rs6000/rs6000.c (init_float128_ibm): Use more correct names
8234 for the conversions between TDmode and IFmode.
8235 (init_float128_ieee): Use more correct names for the conversions
8236 between TDmode and KFmode.
8238 2018-07-16 Jakub Jelinek <jakub@redhat.com>
8240 PR tree-optimization/86526
8241 * builtins.c (expand_builtin_memcmp): Formatting fixes.
8242 (inline_expand_builtin_string_cmp): Likewise.
8243 (inline_string_cmp): Likewise. Use c_readstr instead of
8244 builtin_memcpy_read_str. Add unit_mode temporary.
8246 2018-07-16 Bernd Edlinger <bernd.edlinger@hotmail.de>
8249 * builtins.c (check_access): Bail out if range[0] is no INTEGER_CST.
8250 * expr.c (string_constant): Fix the element size of ARRAY_TYPE.
8252 2018-07-16 Kelvin Nilsen <kelvin@gcc.gnu.org>
8254 * doc/extend.texi (PowerPC AltiVec Built-in Functions):
8255 Alphabetize prototypes of built-in functions, separating out
8256 built-in functions that are listed in this section but should be
8257 described elsewhere.
8259 2018-07-16 Uros Bizjak <ubizjak@gmail.com>
8262 * expmed.c (emit_store_flag): Do not emit setcc followed by a
8263 conditional move when trapping comparison was split to a
8264 non-trapping one (and vice versa).
8266 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
8268 * config/s390/s390.c (s390_function_profiler): Generate nops
8269 instead of profiler call sequences.
8270 * config/s390/s390.opt: Add the new option.
8272 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
8274 * config/s390/s390.c (s390_function_profiler): Generate
8275 __mcount_loc section.
8276 * config/s390/s390.opt: Add the new option.
8278 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
8280 * common.opt: Add the new warning.
8281 * config/s390/s390.c (s390_function_profiler): Emit "brasl
8282 %r0,__fentry__" when -mfentry is specified.
8283 (s390_option_override_internal): Disallow -mfentry for 31-bit
8285 * config/s390/s390.opt: Add the new option.
8287 2018-07-16 Richard Biener <rguenther@suse.de>
8290 * dwarf2out.c (dwarf2out_register_external_die): Assign DIE parents
8291 for function-local FUNCTION_DECL and RESULT_DECL immediately.
8293 2018-07-16 Martin Liska <mliska@suse.cz>
8296 * ipa-pure-const.c (malloc_candidate_p): Revert ::get
8299 2017-07-16 Claudiu Zissulescu <claziss@synopsys.com>
8301 * config/arc/arcHS.md: Update ARCHS scheduling rules.
8303 2017-07-16 Claudiu Zissulescu <claziss@synopsys.com>
8305 * config/arc/arc-arch.h (arc_tune_attr): Add new tune parameters
8307 * config/arc/arc-cpus.def (hs4x): New cpu.
8309 * config/arc/arc-tables.opt: Regenerate.
8310 * config/arc/arc.c (arc_sched_issue_rate): New function.
8311 (TARGET_SCHED_ISSUE_RATE): Define.
8312 (TARGET_SCHED_EXPOSED_PIPELINE): Likewise.
8313 * config/arc/arc.md (attr type): Add fpu_fuse, fpu_sdiv, fpu_ddiv,
8315 (attr tune): Add ARCHS4x tune values.
8316 (attr tune_dspmpy): Define.
8317 (*tst): Correct instruction type.
8318 * config/arc/arcHS.md: Don't use this automaton for ARCHS4x cpus.
8319 * config/arc/arcHS4x.md: New file.
8320 * config/arc/fpu.md: Update instruction type attributes.
8321 * config/arc/t-multilib: Regenerate.
8323 2018-07-16 Tom de Vries <tdevries@suse.de>
8326 * var-tracking.c (vt_initialize): Fix pre_dec handling.
8328 2018-07-16 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
8330 * config/aarch64/atomics.md (aarch64_store_execlusive<mode>): Add
8333 2018-07-16 Eric Botcazou <ebotcazou@adacore.com>
8335 PR tree-optimization/86514
8336 * tree-ssa-reassoc.c (init_range_entry) <CASE_CONVERT>: Return for a
8337 conversion to a boolean type from a type with greater precision.
8339 2018-07-16 Tom de Vries <tdevries@suse.de>
8341 * var-tracking.c (vt_initialize): Print adjusted insn slim if
8342 dump_flags request TDF_SLIM.
8344 2018-07-16 Aldy Hernandez <aldyh@redhat.com>
8346 * fold-const.c (int_const_binop_1): Abstract...
8347 (wide_int_binop): ...wide int code here.
8348 (poly_int_binop): ...poly int code here.
8349 Abstract the rest of int_const_binop_1 into int_const_binop.
8350 * fold-const.h (wide_int_binop): New.
8351 * tree-vrp.c (vrp_int_const_binop): Call wide_int_binop.
8352 Remove useless PLUS/MINUS_EXPR case.
8353 (zero_nonzero_bits_from_vr): Move wide int code...
8354 (zero_nonzero_bits_from_bounds): ...here.
8355 (extract_range_from_binary_expr_1): Move mask optimization code...
8356 (range_easy_mask_min_max): ...here.
8357 * tree-vrp.h (zero_nonzero_bits_from_bounds): New.
8358 (range_easy_mask_min_max): New.
8360 2018-07-15 Jeff Law <law@redhat.com>
8363 * config/sh/sh.c (output_mi_thunk): Remove dead conditional
8366 2018-07-14 Jim Wilson <jimw@sifive.com>
8368 * config/riscv/linux.h (TARGET_ASM_FILE_END): New.
8370 2018-07-14 Paul Koning <ni1d@arrl.net>
8372 * config/pdp11/pdp11.c (pdp11_rtx_costs): Bugfixes.
8374 2018-07-13 Jan Hubicka <hubicka@ucw.cz>
8376 * lto-streamer-out.c (copy_function_or_variable): Dump info about
8379 2018-07-13 Bill Schmidt <wschmidt@linux.ibm.com>
8380 Steve Munroe <munroesj52@gmail.com>
8382 * config/rs6000/emmintrin.h (_mm_and_si128): New function.
8383 (_mm_andnot_si128): Likewise.
8384 (_mm_or_si128): Likewise.
8385 (_mm_xor_si128): Likewise.
8387 2018-07-13 Qing Zhao <qing.zhao@oracle.com>
8390 * builtins.c (expand_builtin_memcmp): Inline the calls first
8391 when result_eq is false.
8392 (expand_builtin_strcmp): Inline the calls first.
8393 (expand_builtin_strncmp): Likewise.
8394 (inline_string_cmp): New routine. Expand a string compare
8395 call by using a sequence of char comparison.
8396 (inline_expand_builtin_string_cmp): New routine. Inline expansion
8397 a call to str(n)cmp/memcmp.
8398 * doc/invoke.texi (--param builtin-string-cmp-inline-length):
8400 * params.def (BUILTIN_STRING_CMP_INLINE_LENGTH): New.
8402 2018-07-13 Richard Earnshaw <rearnsha@arm.com>
8404 * config/arm/driver-arm.c: Include arm-native.h.
8405 (host_detect_local_cpu): Use auto-generated data tables.
8406 (vendors, arm_cpu_table): Delete. Move part information to ...
8407 * config/arm/arm-cpus.in: ... here.
8408 * config/arm/parsecpu.awk (gen_native): New function.
8409 (vendor, part): New CPU fields.
8410 (END): Add support for building the native CPU detection tables.
8411 * config/arm/t-arm (arm-native.h): Add build rule.
8412 (driver-arm.o): Add dependency on arm-native.h.
8414 2018-07-13 Richard Biener <rguenther@suse.de>
8417 * match.pd (addr1 - addr2): Allow either of the operand to
8420 2018-07-13 Tom de Vries <tdevries@suse.de>
8422 * tree-inline.c (remap_ssa_name): Save and reuse debug exprs generated
8425 2018-07-13 Jackson Woodruff <jackson.woodruff@arm.com>
8427 * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp): Use
8428 arrays instead of numbered variables.
8430 2018-07-13 Eric Botcazou <ebotcazou@adacore.com>
8432 * config/sparc/sparc-protos.h (sparc_compute_frame_size): Delete.
8433 * config/sparc/sparc.c (sparc_compute_frame_size): Make static.
8435 2018-07-13 Richard Biener <rguenther@suse.de>
8438 * dwarf2out.c (gen_type_die_with_usage): Use scope_die_for
8439 instead of get_context_die.
8441 2018-07-13 Kugan Vivekanandarajah <kuganv@linaro.org>
8442 Richard Biener <rguenther@suse.de>
8445 * tree-ssa-loop-niter.c (number_of_iterations_popcount): Check
8446 that the loop latch destination where phi is defined.
8448 2018-07-12 Kito Cheng <kito.cheng@gmail.com>
8450 * config/riscv/riscv.c (enum riscv_privilege_levels): Add UNKNOWN_MODE.
8451 (riscv_expand_epilogue): Add assertion to check interrupt mode.
8452 (riscv_set_current_function): Extract getting interrupt type to new
8454 (riscv_get_interrupt_type): New function.
8455 (riscv_merge_decl_attributes): New function, checking interrupt type is
8457 (TARGET_MERGE_DECL_ATTRIBUTES): Define.
8459 2018-07-12 Paul Koning <ni1d@arrl.net>
8461 * config/pdp11/pdp11.c (pdp11_output_def): Fix typo in .set
8464 2018-07-12 Paul Koning <ni1d@arrl.net>
8466 * doc/rtl.texi (REG_NONNEG): Remove decrement and branch until
8467 zero reference, add doloop_end instead.
8468 * doc/md.texi (decrement_and_branch_until_zero): Remove.
8469 (Looping patterns): Remove decrement_and_branch_until_zero. Add
8470 detail for doloop_end.
8472 2018-07-12 Martin Sebor <msebor@redhat.com>
8475 * attribs.c (decl_attributes): Reject conflicting attributes before
8476 calling attribute handlers.
8478 2018-07-12 Jan Hubicka <hubicka@ucw.cz>
8480 * dumpfile.c (gcc::dump_manager::get_dump_file_name): Add PART
8482 (gcc::dump_manager::get_dump_file_name): likewise.
8483 (dump_begin): Likewise.
8484 * dumpfile.h (dump_begin): Update prototype.
8485 (gcc::dump_manager::get_dump_file_name,
8486 gcc::dump_manager::get_dump_file_name): Update prototype.
8488 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
8490 * internal-fn.h (vectorizable_internal_fn_p): New function.
8491 * tree-vect-slp.c (compatible_calls_p): Likewise.
8492 (vect_build_slp_tree_1): Remove nops argument. Handle calls
8493 to internal functions.
8494 (vect_build_slp_tree_2): Update call to vect_build_slp_tree_1.
8496 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
8498 * fold-const.h (inverse_conditions_p): Declare.
8499 * fold-const.c (inverse_conditions_p): New function.
8500 * match.pd: Use inverse_conditions_p. Add folds of view_converts
8501 that test the inverse condition of a conditional internal function.
8502 * internal-fn.h (vectorized_internal_fn_supported_p): Declare.
8503 * internal-fn.c (internal_fn_mask_index): Handle conditional
8505 (vectorized_internal_fn_supported_p): New function.
8506 * tree-if-conv.c: Include internal-fn.h and fold-const.h.
8507 (any_pred_load_store): Replace with...
8508 (need_to_predicate): ...this new variable.
8509 (redundant_ssa_names): New variable.
8510 (ifcvt_can_use_mask_load_store): Move initial checks to...
8511 (ifcvt_can_predicate): ...this new function. Handle tree codes
8512 for which a conditional internal function exists.
8513 (if_convertible_gimple_assign_stmt_p): Use ifcvt_can_predicate
8514 instead of ifcvt_can_use_mask_load_store. Update after variable
8516 (predicate_load_or_store): New function, split out from
8517 predicate_mem_writes.
8518 (check_redundant_cond_expr): New function.
8519 (value_available_p): Likewise.
8520 (predicate_rhs_code): Likewise.
8521 (predicate_mem_writes): Rename to...
8522 (predicate_statements): ...this. Use predicate_load_or_store
8523 and predicate_rhs_code.
8524 (combine_blocks, tree_if_conversion): Update after above name changes.
8525 (ifcvt_local_dce): Handle redundant_ssa_names.
8526 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): Handle
8527 general conditional functions.
8528 * tree-vect-stmts.c (vectorizable_call): Likewise.
8530 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
8531 Alan Hayward <alan.hayward@arm.com>
8532 David Sherwood <david.sherwood@arm.com>
8534 * internal-fn.h (can_interpret_as_conditional_op_p): Declare.
8535 * internal-fn.c (can_interpret_as_conditional_op_p): New function.
8536 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Handle conditional
8537 plus and minus and convert them into IFN_COND_FMA-based sequences.
8538 (convert_mult_to_fma): Handle conditional plus and minus.
8540 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
8542 * doc/md.texi (cond_fma, cond_fms, cond_fnma, cond_fnms): Document.
8543 * optabs.def (cond_fma_optab, cond_fms_optab, cond_fnma_optab)
8544 (cond_fnms_optab): New optabs.
8545 * internal-fn.def (COND_FMA, COND_FMS, COND_FNMA, COND_FNMS): New
8547 (FMA): Use DEF_INTERNAL_FLT_FN rather than DEF_INTERNAL_FLT_FLOATN_FN.
8548 * internal-fn.h (get_conditional_internal_fn): Declare.
8549 (get_unconditional_internal_fn): Likewise.
8550 * internal-fn.c (cond_ternary_direct): New macro.
8551 (expand_cond_ternary_optab_fn): Likewise.
8552 (direct_cond_ternary_optab_supported_p): Likewise.
8553 (FOR_EACH_COND_FN_PAIR): Likewise.
8554 (get_conditional_internal_fn): New function.
8555 (get_unconditional_internal_fn): Likewise.
8556 * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 5.
8557 (gimple_match_op::gimple_match_op): Add a new overload for 5
8559 (gimple_match_op::set_op): Likewise.
8560 (gimple_resimplify5): Declare.
8561 * genmatch.c (decision_tree::gen): Generate simplifications for
8563 * gimple-match-head.c (gimple_simplify): Define an overload for
8564 5 operands. Handle calls with 5 arguments in the top-level overload.
8565 (convert_conditional_op): Handle conversions from unconditional
8566 internal functions to conditional ones.
8567 (gimple_resimplify5): New function.
8568 (build_call_internal): Pass a fifth operand.
8569 (maybe_push_res_to_seq): Likewise.
8570 (try_conditional_simplification): Try converting conditional
8571 internal functions to unconditional internal functions.
8572 Handle 3-operand unconditional forms.
8573 * match.pd (UNCOND_TERNARY, COND_TERNARY): Operator lists.
8574 Define ternary equivalents of the current rules for binary conditional
8576 * config/aarch64/aarch64.c (aarch64_preferred_else_value): Handle
8578 * config/aarch64/iterators.md (UNSPEC_COND_FMLA, UNSPEC_COND_FMLS)
8579 (UNSPEC_COND_FNMLA, UNSPEC_COND_FNMLS): New unspecs.
8580 (optab): Handle them.
8581 (SVE_COND_FP_TERNARY): New int iterator.
8582 (sve_fmla_op, sve_fmad_op): New int attributes.
8583 * config/aarch64/aarch64-sve.md (cond_<optab><mode>)
8584 (*cond_<optab><mode>_2, *cond_<optab><mode_4)
8585 (*cond_<optab><mode>_any): New SVE_COND_FP_TERNARY patterns.
8587 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
8589 * target.def (preferred_else_value): New target hook.
8590 * doc/tm.texi.in (TARGET_PREFERRED_ELSE_VALUE): New hook.
8591 * doc/tm.texi: Regenerate.
8592 * targhooks.h (default_preferred_else_value): Declare.
8593 * targhooks.c (default_preferred_else_value): New function.
8594 * internal-fn.h (conditional_internal_fn_code): Declare.
8595 * internal-fn.c (FOR_EACH_CODE_MAPPING): New macro.
8596 (get_conditional_internal_fn): Use it.
8597 (conditional_internal_fn_code): New function.
8598 * gimple-match.h (gimple_match_cond): New struct.
8599 (gimple_match_op): Add a cond member function.
8600 (gimple_match_op::gimple_match_op): Update all forms to take a
8602 * genmatch.c (expr::gen_transform): Use the same condition as res_op
8603 for the suboperation, but don't specify a particular else_value.
8604 * tree-ssa-sccvn.c (vn_nary_simplify, vn_reference_lookup_3)
8605 (visit_nary_op, visit_reference_op_load): Pass
8606 gimple_match_cond::UNCOND to the gimple_match_op constructor.
8607 * gimple-match-head.c: Include tree-eh.h
8608 (convert_conditional_op): New function.
8609 (maybe_resimplify_conditional_op): Likewise.
8610 (gimple_resimplify1): Call maybe_resimplify_conditional_op.
8611 (gimple_resimplify2): Likewise.
8612 (gimple_resimplify3): Likewise.
8613 (gimple_resimplify4): Likewise.
8614 (maybe_push_res_to_seq): Return null for conditional operations.
8615 (try_conditional_simplification): New function.
8616 (gimple_simplify): Call it. Pass conditions to the gimple_match_op
8618 * match.pd: Fold VEC_COND_EXPRs of an IFN_COND_* call to a new
8620 * config/aarch64/aarch64.c (aarch64_preferred_else_value): New
8622 (TARGET_PREFERRED_ELSE_VALUE): Redefine.
8624 2018-07-12 Jan Hubicka <hubicka@ucw.cz>
8626 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
8628 (hash_tree): Do not hash DECL_FCONTEXT
8629 * tree-streamer-in.c (lto_input_ts_field_decl_tree_pointers):
8630 Do not stream DECL_FCONTEXT.
8631 * tree-streamer-out.c (write_ts_field_decl_tree_pointers): Likewise.
8632 * tree.c (free_lang_data_in_decl): Free DECL_FCONTEXT.
8634 2018-07-12 Richard Biener <rguenther@suse.de>
8637 * dwarf2out.c (gen_block_die): Only output blocks when they have
8638 at least one !DECL_IGNORED_P variable.
8640 2018-07-12 Richard Biener <rguenther@suse.de>
8643 * config/gnu-user.h (GNU_USER_TARGET_NO_PTHREADS_LIB_SPEC):
8644 Remove -mieee-fp handling.
8646 2018-07-12 Richard Biener <rguenther@suse.de>
8648 * tree-ssa-sccvn.c (vn_lookup_simplify_result): Remove bogus
8649 left-over from last patch.
8651 2018-07-12 Jakub Jelinek <jakub@redhat.com>
8653 PR tree-optimization/86492
8654 * gimple-ssa-store-merging.c
8655 (imm_store_chain_info::coalesce_immediate_stores): Call
8656 check_no_overlap even for the merge_overlapping case. Formatting fix.
8658 2018-07-12 Richard Biener <rguenther@suse.de>
8661 * fold-const.c (fold_binary_op_with_conditional_arg): Do not
8662 move possibly trapping operations into the conditional.
8664 2018-07-12 Richard Biener <rguenther@suse.de>
8666 * tree-ssa-sccvn.c (mprts_hook_cnt): Remove.
8667 (vn_lookup_simplify_result): Remove recursion limit applied
8669 (vn_nary_build_or_lookup_1): Adjust.
8670 (try_to_simplify): Likewise.
8671 * gimple-match-head.c (gimple_resimplify1): Instead apply one
8673 (gimple_resimplify2): Likewise.
8674 (gimple_resimplify3): Likewise.
8675 (gimple_resimplify4): Likewise.
8677 2018-07-11 Jakub Jelinek <jakub@redhat.com>
8679 * config/i386/avx512bitalgintrin.h (_mm512_mask_bitshuffle_epi64_mask):
8680 Use __mmask64 type instead of __mmask8 for __M argument.
8681 * config/i386/avx512fintrin.h (_mm512_mask_xor_epi64,
8682 _mm512_maskz_xor_epi64): Use __mmask8 type instead of __mmask16 for
8684 (_mm512_mask_cmpneq_epi64_mask): Use __mmask8 type instead of
8685 __mmask16 for __M argument.
8686 (_mm512_maskz_insertf32x4, _mm512_maskz_inserti32x4,
8687 _mm512_mask_insertf32x4, _mm512_mask_inserti32x4): Cast last argument
8688 to __mmask16 instead of __mmask8.
8689 * config/i386/avx512vlintrin.h (_mm_mask_add_ps, _mm_maskz_add_ps,
8690 _mm256_mask_add_ps, _mm256_maskz_add_ps, _mm_mask_sub_ps,
8691 _mm_maskz_sub_ps, _mm256_mask_sub_ps, _mm256_maskz_sub_ps,
8692 _mm256_maskz_cvtepi32_ps, _mm_maskz_cvtepi32_ps): Use __mmask8 type
8693 instead of __mmask16 for __U argument.
8694 * config/i386/avx512vlbwintrin.h (_mm_mask_cmp_epi8_mask): Use
8695 __mmask16 instead of __mmask8 for __U argument.
8696 (_mm256_mask_cmp_epi8_mask): Use __mmask32 instead of __mmask16 for
8698 (_mm256_cmp_epi8_mask): Use __mmask32 return type instead of
8700 (_mm_mask_cmp_epu8_mask): Use __mmask16 instead of __mmask8 for __U
8702 (_mm256_mask_cmp_epu8_mask): Use __mmask32 instead of __mmask16 for
8704 (_mm256_cmp_epu8_mask): Use __mmask32 return type instead of
8706 (_mm_mask_cmp_epi16_mask): Cast last argument to __mmask8 instead
8708 (_mm256_mask_cvtepi8_epi16): Use __mmask16 instead of __mmask32 for
8710 (_mm_mask_cvtepi8_epi16): Use __mmask8 instead of __mmask32 for
8712 (_mm256_mask_cvtepu8_epi16): Use __mmask16 instead of __mmask32 for
8714 (_mm_mask_cvtepu8_epi16): Use __mmask8 instead of __mmask32 for
8716 (_mm256_mask_cmpneq_epu8_mask, _mm256_mask_cmplt_epu8_mask,
8717 _mm256_mask_cmpge_epu8_mask, _mm256_mask_cmple_epu8_mask): Change
8718 return type as well as __M argument type and all casts from __mmask8
8720 (_mm256_mask_cmpneq_epu16_mask, _mm256_mask_cmplt_epu16_mask,
8721 _mm256_mask_cmpge_epu16_mask, _mm256_mask_cmple_epu16_mask): Change
8722 return type as well as __M argument type and all casts from __mmask8
8724 (_mm256_mask_cmpneq_epi8_mask, _mm256_mask_cmplt_epi8_mask,
8725 _mm256_mask_cmpge_epi8_mask, _mm256_mask_cmple_epi8_mask): Change
8726 return type as well as __M argument type and all casts from __mmask8
8728 (_mm256_mask_cmpneq_epi16_mask, _mm256_mask_cmplt_epi16_mask,
8729 _mm256_mask_cmpge_epi16_mask, _mm256_mask_cmple_epi16_mask): Change
8730 return type as well as __M argument type and all casts from __mmask8
8732 * config/i386/avx512vbmi2vlintrin.h (_mm_mask_shrdi_epi32,
8733 _mm_mask_shldi_epi32): Cast last argument to __mmask8 instead of
8736 2018-07-11 Grazvydas Ignotas <notasas@gmail.com>
8738 * config/i386/avx512bwintrin.h: (_mm512_mask_cmp_epi8_mask,
8739 _mm512_mask_cmp_epu8_mask): Use __mmask64 type instead of __mmask32
8742 2018-07-11 Paul Koning <ni1d@arrl.net>
8744 * doc/md.texi (define_subst): Document how multiple occurrences of
8745 the same argument in the replacement pattern are handled.
8747 2018-07-11 Paul Koning <ni1d@arrl.net>
8749 * doc/extend.texi (Common Variable Attributes): Move "mode" into
8751 (Common Type Attributes): Add "mode" attribute.
8753 2018-07-11 Jan Hubicka <hubicka@ucw.cz>
8755 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not
8756 stream DECL_ORIGINAL_TYPE.
8757 (DFS::DFS_write_tree_body): Drop hack handling local external decls.
8758 (hash_tree): Do not walk DECL_ORIGINAL_TYPE.
8759 * tree-streamer-in.c (lto_input_ts_decl_non_common_tree_pointers):
8760 Do not walk original type.
8761 * tree-streamer-out.c (streamer_write_chain): Drop hack handling
8763 (write_ts_decl_non_common_tree_pointers): Do not stream
8765 * tree.c (free_lang_data_in_decl): Clear DECL_ORIGINAL_TYPE.
8766 (find_decls_types_r): Do not walk DEC_ORIGINAL_TYPE.
8768 2018-07-11 Aldy Hernandez <aldyh@redhat.com>
8770 * tree-ssa-threadupdate.c (thread_through_all_blocks): Do not jump
8771 thread twice from the same starting edge.
8773 2018-07-11 Aldy Hernandez <aldyh@redhat.com>
8775 * vr-values.c (gimple_stmt_nonzero_p): Abstract common code to...
8776 * gimple.c (gimple_call_nonnull_result_p): ...here...
8777 (gimple_call_nonnull_arg): ...and here.
8778 * gimple.h (gimple_call_nonnull_result_p): New.
8779 (gimple_call_nonnull_arg): New.
8781 2018-07-11 Richard Earnshaw <rearnsha@arm.com>
8783 * config/arm/arm-cpus.in: Move information from fpu field of each
8784 cpu definition to the isa field.
8785 * config/arm/parsecpu.awk (fpu): Delete match rule.
8786 (gen_comm_data): Don't add bits from the CPU's FPU entry.
8788 2018-07-11 Richard Biener <rguenther@suse.de>
8791 * dwarf2out.c (init_sections_and_labels): Use
8792 output_asm_line_debug_info consistently.
8793 (dwarf2out_early_finish): Likewise.
8794 (dwarf2out_finish): Remove DW_AT_stmt_list from early generated
8797 2018-07-11 Richard Biener <rguenther@suse.de>
8799 * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1):
8800 Rework father_bb setting in a way to avoid propagating constants
8801 multiple times on a loop body.
8803 2018-07-10 Mark Wielaard <mark@klomp.org>
8806 * dwarf2out.c (output_macinfo_op): Fix dwarf_FORM typo in gcc_assert.
8808 2018-07-10 Richard Biener <rguenther@suse.de>
8810 * hash-map.h (hash_map::iterator::operator*): Return
8811 references to key and value.
8813 2018-07-10 Jakub Jelinek <jakub@redhat.com>
8816 * gimplify.c (find_combined_omp_for): Add DATA argument, in addition
8817 to finding the inner OMP_FOR/OMP_SIMD stmt find non-trivial wrappers,
8818 BLOCKs with BLOCK_VARs, OMP_PARALLEL in between, OMP_FOR in between.
8819 (gimplify_omp_for): For composite loops, move outer
8820 OMP_{DISTRIBUTE,TASKLOOP,FOR,PARALLEL} right around innermost
8821 OMP_FOR/OMP_SIMD if there are any non-trivial wrappers. For class
8822 iterators add any needed clauses. Allow OMP_FOR_ORIG_DECLS to contain
8823 TREE_LIST for both the original class iterator and the "last" helper
8824 var. Gimplify OMP_FOR_PRE_BODY before the outermost composite
8825 loop, remember has_decl_expr from outer composite loops for the
8826 innermost OMP_SIMD in TREE_PRIVATE bit on OMP_FOR_INIT.
8828 2018-07-09 Martin Sebor <msebor@redhat.com>
8832 * builtins.c (c_strlen): Avoid out-of-bounds warnings when
8833 accessing implicitly initialized array elements.
8834 * expr.c (string_constant): Handle string initializers of
8835 character arrays within aggregates.
8836 * gimple-fold.c (fold_array_ctor_reference): Add argument.
8837 Store element offset. As a special case, handle zero size.
8838 (fold_nonarray_ctor_reference): Same.
8839 (fold_ctor_reference): Add argument. Store subobject offset.
8840 * gimple-fold.h (fold_ctor_reference): Add argument.
8842 2018-07-09 Paul Koning <ni1d@arrl.net>
8844 * config/pdp11/pdp11.c (pdp11_addr_cost): New function.
8845 (pdp11_insn_cost): New function.
8846 (pdp11_md_asm_adjust): New function.
8847 (TARGET_INVALID_WITHIN_DOLOOP): Define.
8848 (pdp11_rtx_costs): Update to match machine better.
8849 (output_addr_const_pdp11): Correct format mismatch warnings.
8850 * config/pdp11/pdp11.h (SLOW_BYTE_ACCESS): Correct definition.
8851 * config/pdp11/pdp11.md: General change to add base_cost and/or
8852 length attributes for use by new pdp11_insn_cost function.
8853 (MIN_BRANCH): Correct definition.
8855 (doloop_end): Use standard pattern name for looping pattern.
8856 (doloop_end_nocc): New.
8857 (movsf): Add another constraint alternative.
8858 (zero_extendqihi2): Add constraint alternatives for not in place
8860 (zero_extendhisi2): Remove.
8861 (shift patterns): Add CC handling variants.
8865 (define_peephole2): New peephole to recognize mov that sets CC for
8868 2018-07-09 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
8870 * config/sparc/sparc.c (sparc_fold_builtin) <SPARC_BUILTIN_PDIST,
8871 SPARC_BUILTIN_PDISTN>: Adapt for signature change of wi::neg,
8874 2018-07-09 Jakub Jelinek <jakub@redhat.com>
8877 * real.c (real_nextafter): Return true if result is denormal.
8879 2018-07-09 Martin Liska <mliska@suse.cz>
8881 * common.opt: Add back wrongly removed attribute.
8883 2018-07-09 Richard Biener <rguenther@suse.de>
8886 * dwarf2out.c (gen_block_die): For an early generated DIE
8887 always output high/low PC attributes.
8889 2018-07-09 Tom de Vries <tdevries@suse.de>
8891 * cfgexpand.c (expand_debug_source_expr): Handle VAR_DECL.
8892 * tree-inline.c (remap_ssa_name): Handle default def ssa_name mapping
8893 onto VAR_DECL with abstract origin.
8895 2018-07-07 Jim Wilson <jimw@sifive.com>
8897 * config/riscv/riscv.c (TARGET_CUSTOM_FUNCTION_DESCRIPTORS): New.
8899 2018-07-07 Tom de Vries <tdevries@suse.de>
8901 * tree-dfa.c (dump_enumerated_decls): Handle cfun->cfg == NULL.
8903 2018-07-07 Aldy Hernandez <aldyh@redhat.com>
8905 * tree-vrp.c (vrp_int_const_binop): Change overflow type to
8907 (combine_bound): Use wide-int overflow calculation instead of
8909 * calls.c (maybe_warn_alloc_args_overflow): Change overflow type to
8911 * fold-const.c (int_const_binop_2): Same.
8912 (extract_muldiv_1): Same.
8913 (fold_div_compare): Same.
8914 (fold_abs_const): Same.
8916 * poly-int.h (add): Same.
8920 * predict.c (predict_iv_comparison): Same.
8921 * profile-count.c (slow_safe_scale_64bit): Same.
8922 * simplify-rtx.c (simplify_const_binary_operation): Same.
8923 * tree-chrec.c (tree_fold_binomial): Same.
8924 * tree-data-ref.c (split_constant_offset_1): Same.
8925 * tree-if-conv.c (idx_within_array_bound): Same.
8926 * tree-scalar-evolution.c (iv_can_overflow_p): Same.
8927 * tree-ssa-phiopt.c (minmax_replacement): Same.
8928 * tree-vect-loop.c (is_nonwrapping_integer_induction): Same.
8929 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Same.
8930 * vr-values.c (vr_values::adjust_range_with_scev): Same.
8931 * wide-int.cc (wi::add_large): Same.
8932 (wi::mul_internal): Same.
8933 (wi::sub_large): Same.
8934 (wi::divmod_internal): Same.
8935 * wide-int.h: Change overflow type to overflow_type for neg, add,
8936 mul, smul, umul, div_trunc, div_floor, div_ceil, div_round,
8937 mod_trunc, mod_ceil, mod_round, add_large, sub_large,
8938 mul_internal, divmod_internal.
8939 (overflow_type): New enum.
8940 (accumulate_overflow): New.
8942 2018-07-06 Kugan Vivekanandarajah <kugan.vivekanandarajah@linaro.org>
8944 * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): New.
8945 (tree_ssa_phiopt_worker): Call cond_removal_in_popcount_pattern.
8947 2018-07-06 Kugan Vivekanandarajah <kuganv@linaro.org>
8949 * tree-ssa-loop-niter.c (number_of_iterations_popcount): If popcount
8950 argument is checked for zero before entering loop, avoid checking again.
8952 2018-07-06 Kugan Vivekanandarajah <kuganv@linaro.org>
8954 * gimplify.h (generic_expr_could_trap_p): Set as global function.
8955 * gimplify.h (generic_expr_could_trap_p): Likwise.
8956 * tree-scalar-evolution.c (expression_expensive_p): Handle COND_EXPR.
8958 2018-07-06 Jakub Jelinek <jakub@redhat.com>
8960 PR tree-optimization/86401
8961 * fold-const.c (fold_binary_loc) <case BIT_AND_EXPR>: Move the
8962 ((A & N) + B) & M -> (A + B) & M etc. optimization into ...
8963 (fold_bit_and_mask): ... here. New helper function for match.pd.
8964 * fold-const.h (fold_bit_and_mask): Declare.
8965 * match.pd (((A & N) + B) & M -> (A + B) & M): New optimization.
8967 2018-07-06 Peter Bergner <bergner@linux.ibm.com>
8970 * target.def (translate_mode_attribute): New hook.
8971 * targhooks.h (default_translate_mode_attribute): Declare.
8972 * targhooks.c (default_translate_mode_attribute): New function.
8973 * doc/tm.texi.in (TARGET_TRANSLATE_MODE_ATTRIBUTE): New hook.
8974 * doc/tm.texi: Regenerate.
8975 * config/rs6000/rs6000.c (TARGET_TRANSLATE_MODE_ATTRIBUTE): Define.
8976 (rs6000_translate_mode_attribute): New function.
8978 2018-07-06 Paul Koning <ni1d@arrl.net>
8980 * doc/md.texi (define_split): Document DONE and FAIL.
8981 (define_peephole2): Ditto.
8983 2018-07-05 Jeff Law <law@redhat.com>
8985 PR tree-optimization/86010
8986 * tree-ssa-dse.c (compute_trims): More aggressively trim at
8987 both the head and tail of mem* and str* calls.
8989 2018-07-05 Jim Wilson <jimw@sifive.com>
8991 * config.gcc (riscv*-*-*): When setting xlen, handle riscv-*.
8993 2018-07-05 Indu Bhagat <indu.bhagat@oracle.com>
8995 * config/aarch64/aarch64-simd.md: correct flags text for
8996 MIN_EXPR replacement.
8998 2018-07-05 James Clarke <jrtc27@jrtc27.com>
9000 * configure: Regenerated.
9002 2018-07-05 Carl Love <cel@us.ibm.com>
9004 * config/rs6000/rs6000-c.c: Map ALTIVEC_BUILTIN_VEC_UNPACKH for
9005 float argument to VSX_BUILTIN_DOUBLEH_V4SF.
9006 Map ALTIVEC_BUILTIN_VEC_UNPACKL for float argument to
9007 VSX_BUILTIN_DOUBLEL_V4SF.
9009 2018-07-05 Martin Sebor <msebor@redhat.com>
9012 * tree-ssa-strlen.c (maybe_set_strlen_range): Use type size rather
9013 than its domain to compute its the upper bound of a char array.
9015 2018-07-05 Nathan Sidwell <nathan@acm.org>
9017 Replace NO_IMPLICIT_EXTERN_C with SYSTEM_IMPLICIT_EXTERN_C.
9018 * doc/cpp.texi: Update comment.
9019 * doc/tm.texi: Rebuilt.
9020 * doc/tm.texi.in (NO_IMPLICIT_EXTERN_C): Replace with ...
9021 (SYSTEM_IMPLICIT_EXTERN_C): ... this, opposite sense.
9022 * doc/extend.texi (Backwards Compatibility): Clarify it is system
9023 headers affected by extern "C".
9024 * system.h: Poison NO_IMPLICIT_EXTERN_C.
9025 * config/alpha/alpha.h, config/arm/uclinux-elf.h,
9026 config/bfin/elf.h, config/cris/cris.h, config/darwin.h,
9027 config/dragonfly.h, config/freebsd.h, config/gnu-user.h,
9028 config/i386/cygming.h, config/i386/djgpp.h, config/i386/nto.h,
9029 config/ia64/hpux.h, config/lm32/lm32.h, config/lm32/uclinux-elf.h,
9030 config/lynx.h, config/mips/elf.h, config/mmix/mmix.h,
9031 config/netbsd.h, config/pa/pa-hpux.h, config/powerpcspe/sysv4.h,
9032 config/riscv/elf.h, config/rs6000/sysv4.h, config/rtems.h,
9033 config/s390/tpf.h, config/sh/newlib.h, config/sol2.h,
9034 config/sparc/openbsd64.h, config/sparc/sp-elf.h,
9035 config/sparc/sp64-elf.h, config/spu/spu.h,
9036 config/stormy16/stormy16.h, config/v850/v850.h,
9037 config/visium/visium.h, config/vx-common.h, config/xtensa/elf.h: Don't
9038 define NO_IMPLICIT_EXTERN_C.
9039 * config/rs6000/aix.h: Set SYSTEM_IMPLICIT_EXTERN_C.
9041 2018-07-05 Tamar Christina <tamar.christina@arm.com>
9044 * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
9045 instead of GET_MODE_SIZE when comparing Units.
9047 2018-07-05 Tamar Christina <tamar.christina@arm.com>
9050 * rtlanal.c (set_noop_p): Constrain on mode change,
9051 include hard-reg-set.h
9053 2018-07-05 Tamar Christina <tamar.christina@arm.com>
9055 * config/aarch64/aarch64.c (aarch64_expand_movmem): Fix mode size.
9057 2018-07-05 Jakub Jelinek <jakub@redhat.com>
9060 2018-07-04 Maxim Ostapenko <m.ostapenko@samsung.com>
9063 * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
9065 * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
9067 2018-07-04 Maxim Ostapenko <m.ostapenko@samsung.com>
9070 * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
9072 * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
9074 2018-07-04 Eric Botcazou <ebotcazou@adacore.com>
9077 * expmed.c (choose_multiplier): Fix incorrect comparison with mask.
9079 2018-07-04 Aldy Hernandez <aldyh@redhat.com>
9081 * tree-vrp.c (extract_range_from_binary_expr_1): Initialize
9082 neg_*_op* variables.
9084 2018-07-04 Martin Liska <mliska@suse.cz>
9086 * tree-switch-conversion.c: Define
9087 max_ratio_for_speed and max_ratio_for_size constants.
9089 2018-07-04 Denys Vlasenko <dvlasenk@redhat.com>
9090 Martin Liska <mliska@suse.cz>
9095 * common.opt: Rename align options with 'str_' prefix.
9096 * common/config/i386/i386-common.c (set_malign_value): New
9098 (ix86_handle_option): Use it to set -falign-* options/
9099 * config/aarch64/aarch64-protos.h (struct tune_params): Change
9100 type from int to string.
9101 * config/aarch64/aarch64.c: Update default values from int
9103 * config/alpha/alpha.c (alpha_override_options_after_change):
9105 * config/arm/arm.c (arm_override_options_after_change_1): Likewise.
9106 * config/i386/dragonfly.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
9107 max skip conditionally.
9108 * config/i386/freebsd.h (SUBALIGN_LOG): New.
9109 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
9110 max skip conditionally.
9111 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
9112 max skip conditionally.
9113 * config/i386/gnu-user.h (SUBALIGN_LOG): New.
9114 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
9115 max skip conditionally.
9116 * config/i386/i386.c (struct ptt): Change type from int to
9118 (ix86_default_align): Set default values.
9119 * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Print
9120 max skip conditionally.
9121 * config/i386/iamcu.h (SUBALIGN_LOG): New.
9122 (ASM_OUTPUT_MAX_SKIP_ALIGN):
9123 * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN):
9124 * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
9125 max skip conditionally.
9126 * config/i386/openbsdelf.h (SUBALIGN_LOG): New.
9127 (ASM_OUTPUT_MAX_SKIP_ALIGN) Print max skip conditionally.:
9128 * config/i386/x86-64.h (SUBALIGN_LOG): New.
9129 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
9130 max skip conditionally.
9131 (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
9132 * config/ia64/ia64.c (ia64_option_override): Set default values
9133 for alignment options.
9134 * config/m68k/m68k.c: Handle new str_align_* options.
9135 * config/mips/mips.c (mips_set_compression_mode): Change
9137 (mips_option_override): Set default values for options.
9138 * config/powerpcspe/powerpcspe.c (rs6000_option_override_internal):
9140 * config/rs6000/rs6000.c (rs6000_option_override_internal):
9142 * config/rx/rx.c (rx_option_override): Likewise.
9143 * config/rx/rx.h (JUMP_ALIGN): Use align_jumps_log.
9144 (LABEL_ALIGN): Use align_labels_log.
9145 (LOOP_ALIGN): Use align_loops_align.
9146 * config/s390/s390.c (s390_asm_output_function_label): Use new
9148 * config/sh/sh.c (sh_override_options_after_change):
9149 Change type of constants.
9150 * config/spu/spu.c (spu_sched_init): Likewise.
9151 * config/sparc/sparc.c (sparc_option_override): Set default
9153 * config/visium/visium.c (visium_option_override): Likewise.
9154 * config/visium/visium.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Do not
9155 emit p2align format with last argument if it's not needed.
9156 * doc/invoke.texi: Document extended format of -falign-*.
9157 * final.c: Use align_labels alignment.
9158 * flags.h (struct target_flag_state): Change type to use
9160 (struct align_flags_tuple): New.
9161 (struct align_flags): Likewise.
9162 (align_loops_log): Redefine macro to use new types.
9163 (align_loops_max_skip): Redefine macro to use new types.
9164 (align_jumps_log): Redefine macro to use new types.
9165 (align_jumps_max_skip): Redefine macro to use new types.
9166 (align_labels_log): Redefine macro to use new types.
9167 (align_labels_max_skip): Redefine macro to use new types.
9168 (align_functions_log): Redefine macro to use new types.
9169 (align_loops): Redefine macro to use new types.
9170 (align_jumps): Redefine macro to use new types.
9171 (align_labels): Redefine macro to use new types.
9172 (align_functions): Redefine macro to use new types.
9173 (align_functions_max_skip): Redefine macro to use new types.
9174 (align_loops_value): New macro.
9175 (align_jumps_value): New macro.
9176 (align_labels_value): New macro.
9177 (align_functions_value): New macro.
9178 * function.c (invoke_set_current_function_hook): Propagate
9179 alignment values from flags to global variables default in
9181 * ipa-icf.c (sem_function::equals_wpa): Use
9182 cl_optimization_option_eq instead of memcmp.
9183 * lto-streamer.h (cl_optimization_stream_out): Support streaming
9185 (cl_optimization_stream_in): Likewise.
9186 * optc-save-gen.awk: Support strings in cl_optimization.
9187 * opth-gen.awk: Likewise.
9188 * opts.c (finish_options): Remove error checking of invalid
9190 (MAX_CODE_ALIGN): Remove.
9191 (MAX_CODE_ALIGN_VALUE): Likewise.
9192 (parse_and_check_align_values): New function.
9193 (check_alignment_argument): Likewise.
9194 (common_handle_option): Use check_alignment_argument.
9195 * opts.h (parse_and_check_align_values): Declare.
9196 * toplev.c (init_alignments): Remove.
9197 (read_log_maxskip): New.
9198 (parse_N_M): Likewise.
9199 (parse_alignment_opts): Likewise.
9200 (backend_init_target): Remove usage of init_alignments.
9201 * toplev.h (parse_alignment_opts): Declare.
9202 * tree-streamer-in.c (streamer_read_tree_bitfields): Add new
9204 * tree-streamer-out.c (streamer_write_tree_bitfields): Likewise.
9205 * tree.c (cl_option_hasher::equal): New.
9206 * varasm.c: Use new global macros.
9208 2018-07-04 Denys Vlasenko <dvlasenk@redhat.com>
9210 * config/i386/dragonfly.h: (ASM_OUTPUT_MAX_SKIP_ALIGN):
9211 Use a simpler align directive also if MAXSKIP = ALIGN-1.
9212 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
9213 * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
9214 * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
9215 * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
9216 * config/i386/freebsd.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Remove "If N
9217 is large, do at least 8 byte alignment" code. Add SUBALIGN_LOG
9218 define. Use a simpler align directive also if MAXSKIP = ALIGN-1.
9219 * config/i386/gnu-user.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
9220 * config/i386/iamcu.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
9221 * config/i386/openbsdelf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
9222 * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
9224 2018-07-04 Martin Liska <mliska@suse.cz>
9225 Jonathan Wakely <jwakely@redhat.com>
9227 * coverage.c: Use correct type.
9228 * doc/invoke.texi: Language correction.
9230 2018-07-03 H.J. Lu <hongjiu.lu@intel.com>
9233 * config/i386/i386.c (rest_of_insert_endbranch): Also generate
9234 ENDBRANCH for non-tail call which may return via indirect branch.
9235 * doc/extend.texi: Document indirect_return attribute.
9237 2018-07-03 Martin Sebor <msebor@redhat.com>
9239 PR tree-optimization/86274
9240 * gimple-ssa-sprintf.c (fmtresult::type_max_digits): Verify
9242 (format_floating): Correct handling of infinities and NaNs.
9244 2018-07-03 Martin Sebor <msebor@redhat.com>
9246 * print-tree.c (print_real_cst): New function.
9247 (print_node_brief): Call it.
9248 (print_node): Ditto.
9250 2018-07-03 Jeff Law <law@redhat.com>
9252 * config/h8300/h8300.md (logical<mode>3_sn, logical<mode>3): Merge
9253 into a single pattern.
9255 * config/h8300/h8300.md (ors code_iterator): New.
9256 (bsetqi_msx, bnotqi_msx patterns and splitters): Consolidate into
9257 a single pattern and single splitter.
9258 (bsethi_msx, bnothi_msx patterns): Consolidate into a single pattern.
9259 (iorqi3_1, xorqi3_1): Likewise.
9260 (iorqi3, xorqi3 expanders): Similarly.
9262 * config/h8300/h8300.md (movmd_internal_normal): Consolidated with
9263 (movmd_internal) into a single pattern using the P mode iterator.
9264 (movmd splitters): Similarly.
9265 (stpcpy_internal_normal, stpcpy_internal): Similarly for thes patterns.
9266 (movsd splitters): Similarly.
9268 * config/h8300/h8300.c (h8300_insn_length_from_table): Consolidate
9269 ADDB, ADDW and ADDL into a single ADD attribute which selects the
9270 right table based on the size of the operand.
9271 * config/h8300/h8300.md (length_table): Corresponding changes. All
9272 references to "addb", "addw" and "addl" changed to "add".
9273 (btst patterns): Merge two variants into a single pattern.
9274 (tstqi, tsthi): Likewise.
9275 (addhi3_incdec, addsi3_incdec): Likewise.
9276 (subhi3_h8300hs, subsi3_h8300hs): Likewise.
9277 (mulhi3, mulsi3): Likewise.
9278 (udivhi3, udivsi3): Likewise.
9279 (divhi3, divsi3): Likewise.
9280 (andorqi3, andorhi3, andorsi3): Likewise.
9282 2018-07-03 Uros Bizjak <ubizjak@gmail.com>
9285 * config/i386/sse.md (uavg<mode>3_ceil): New expander.
9286 (<sse2_avx2>_uavg<mode>3<mask_name>): Simplify expander.
9288 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
9290 PR tree-optimization/85694
9291 * config/aarch64/iterators.md (HADD, RHADD): New int iterators.
9292 (u): Handle UNSPEC_SHADD, UNSPEC_UHADD, UNSPEC_SRHADD and
9294 * config/aarch64/aarch64-simd.md (<u>avg<mode>3_floor)
9295 (<u>avg<mode>3_ceil): New patterns.
9297 2018-07-03 David Malcolm <dmalcolm@redhat.com>
9299 * gcc.dg/vect/slp-perm-1.c: Remove "note: " prefix from
9300 scan-tree-dump directive.
9301 * gcc.dg/vect/slp-perm-2.c: Likewise.
9302 * gcc.dg/vect/slp-perm-3.c: Likewise.
9303 * gcc.dg/vect/slp-perm-5.c: Likewise.
9304 * gcc.dg/vect/slp-perm-6.c: Likewise.
9305 * gcc.dg/vect/slp-perm-7.c: Likewise.
9306 * gcc.dg/vect/slp-perm-8.c: Likewise.
9308 2018-07-03 Marek Polacek <polacek@redhat.com>
9311 * gimple-fold.c (size_must_be_zero_p): Check the type of the size.
9313 2018-07-03 Richard Biener <rguenther@suse.de>
9316 * tree-ssa-structalias.c (find_func_clobbers): Properly
9317 handle indirect calls.
9319 2018-07-03 Jeff Law <law@redhat.com>
9321 * config/h8300/h8300.md (HSI, QHSI, QHSIF): New mode iterators.
9322 (shifts): New code iterator.
9323 (movqi, movhi, movsi, movsf expanders): Consolidate into a single
9324 expander. Fix HImode handling on H8/SX.
9325 (addqi3, addhi3, addsi3 expanders): Consolidate into a single expander.
9326 (subqi3, subhi3, subsi3 expanders): Likewise.
9327 (andqi3, andhi3, andsi3 expanders): Likewise.
9328 (iorqi3, iorhi3, iorsi3 expanders): Likewise.
9329 (xorqi3, xorhi3, xorsi3 expanders): Likewise.
9330 (negqi2, neghi2, negsi2, negsf2 expanders): Likewise.
9331 (one_cmplqi2, one_cmplhi2, one_cmplsi2): Likewise.
9332 (zero_extendqihi2, zero_extendqisi2): Likewise.
9333 (extendqihi2, extendqisi2): Likewise.
9334 (rotlqi3, rotlhi3, rotlsi3): Likewise.
9335 (neghi2_h8300, negsi2_h8300): Likewise for these patterns.
9336 (rotlqi3_1, rotlhi3_1): Likewise.
9337 (logicalhi3_sn, logicalsi3_sn): Likewise.
9338 (logicalhi3, logicalsi3): Likewise.
9340 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
9342 * tree-vect-patterns.c (vect_recog_rotate_pattern)
9343 (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
9344 (vect_recog_mixed_size_cond_pattern, adjust_bool_pattern_cast)
9345 (adjust_bool_pattern, vect_recog_bool_pattern): Pass the vector
9346 type to append_pattern_def_seq instead of creating a stmt_vec_info
9348 (build_mask_conversion): Likewise. Remove vinfo argument.
9349 (vect_add_conversion_to_patterm): Likewise, renaming to...
9350 (vect_add_conversion_to_pattern): ...this.
9351 (vect_recog_mask_conversion_pattern): Update call to
9352 build_mask_conversion. Pass the vector type to
9353 append_pattern_def_seq here too.
9354 (vect_recog_gather_scatter_pattern): Update call to
9355 vect_add_conversion_to_pattern.
9357 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
9359 * tree-vect-patterns.c (new_pattern_def_seq): Delete.
9360 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
9361 (vect_recog_widen_op_pattern, vect_recog_over_widening_pattern)
9362 (vect_recog_rotate_pattern, vect_synth_mult_by_constant): Don't set
9363 STMT_VINFO_PATTERN_DEF_SEQ to null here.
9364 (vect_recog_pow_pattern, vect_recog_vector_vector_shift_pattern)
9365 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern): Use
9366 append_pattern_def_seq instead of new_pattern_def_seq.
9367 (vect_recog_divmod_pattern): Do both of the above.
9368 (vect_pattern_recog_1): Assert that STMT_VINO_PATTERN_DEF_SEQ
9371 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
9373 * tree-vect-patterns.c (vect_recog_dot_prod_pattern):
9374 (vect_recog_sad_pattern, vect_recog_widen_op_pattern)
9375 (vect_recog_widen_mult_pattern, vect_recog_pow_pattern):
9376 (vect_recog_widen_sum_pattern, vect_recog_over_widening_pattern)
9377 (vect_recog_average_pattern, vect_recog_cast_forwprop_pattern)
9378 (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
9379 (vect_recog_vector_vector_shift_pattern, vect_synth_mult_by_constant)
9380 (vect_recog_mult_pattern, vect_recog_divmod_pattern)
9381 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
9382 (vect_recog_mask_conversion_pattern): Replace vec<gimple *>
9383 parameter with a single stmt_vec_info.
9384 (vect_recog_func_ptr): Likewise.
9385 (vect_recog_gather_scatter_pattern): Likewise, folding in...
9386 (vect_try_gather_scatter_pattern): ...this.
9387 (vect_pattern_recog_1): Remove stmts_to_replace and just pass
9388 the stmt_vec_info of the statement to be matched. Don't clear
9389 STMT_VINFO_RELATED_STMT.
9390 (vect_pattern_recog): Update call accordingly.
9392 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
9394 PR tree-optimization/85694
9395 * doc/md.texi (avgM3_floor, uavgM3_floor, avgM3_ceil)
9396 (uavgM3_ceil): Document new optabs.
9397 * doc/sourcebuild.texi (vect_avg_qi): Document new target selector.
9398 * internal-fn.def (IFN_AVG_FLOOR, IFN_AVG_CEIL): New internal
9400 * optabs.def (savg_floor_optab, uavg_floor_optab, savg_ceil_optab)
9401 (savg_ceil_optab): New optabs.
9402 * tree-vect-patterns.c (vect_recog_average_pattern): New function.
9403 (vect_vect_recog_func_ptrs): Add it.
9404 * tree-vect-stmts.c (vectorizable_call): Get the type of the zero
9405 constant directly from the associated lhs.
9407 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
9409 * tree-vect-patterns.c (vect_split_statement): New function.
9410 (vect_convert_input): Use it to try to split an existing cast.
9412 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
9414 * poly-int.h (print_hex): New function.
9415 * dumpfile.h (dump_dec, dump_hex): Declare.
9416 * dumpfile.c (dump_dec, dump_hex): New poly_wide_int functions.
9417 * tree-vectorizer.h (_stmt_vec_info): Add min_output_precision,
9418 min_input_precision, operation_precision and operation_sign.
9419 * tree-vect-patterns.c (vect_get_range_info): New function.
9420 (vect_same_loop_or_bb_p, vect_single_imm_use)
9421 (vect_operation_fits_smaller_type): Delete.
9422 (vect_look_through_possible_promotion): Add an optional
9423 single_use_p parameter.
9424 (vect_recog_over_widening_pattern): Rewrite to use new
9425 stmt_vec_info infomration. Handle one operation at a time.
9426 (vect_recog_cast_forwprop_pattern, vect_narrowable_type_p)
9427 (vect_truncatable_operation_p, vect_set_operation_type)
9428 (vect_set_min_input_precision): New functions.
9429 (vect_determine_min_output_precision_1): Likewise.
9430 (vect_determine_min_output_precision): Likewise.
9431 (vect_determine_precisions_from_range): Likewise.
9432 (vect_determine_precisions_from_users): Likewise.
9433 (vect_determine_stmt_precisions, vect_determine_precisions): Likewise.
9434 (vect_vect_recog_func_ptrs): Put over_widening first.
9436 (vect_pattern_recog): Call vect_determine_precisions.
9438 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
9440 * tree-vect-patterns.c (vect_mark_pattern_stmts): Remove pattern
9441 statements that have been replaced by further pattern statements.
9442 (vect_pattern_recog_1): Clear STMT_VINFO_PATTERN_DEF_SEQ on failure.
9444 2018-07-03 Richard Biener <rguenther@suse.de>
9446 * tree-vect-stmts.c (vect_is_simple_use): Consolidate dumping,
9447 always set *dt. Dump vectype in vectype overload.
9448 * dumpfile.h (dump_gimple_expr): New function.
9449 (dump_gimple_expr_loc): Likewise.
9450 * dumpfile.c (dump_gimple_expr): New function.
9451 (dump_gimple_expr_loc): Likewise.
9453 2018-07-02 Jeff Law <law@redhat.com>
9455 * config/h8300/h8300.md (movqi_h8300, movqi_h8300hs): Consolidate
9456 the H8/300, H8/300H and H8/S variants into a single pattern.
9457 (movhi_h8300, movqi_h8300hs): Similarly.
9458 (pushqi_h8300hs, pushhi_h8300hs): Consolidate into a single pattern.
9459 (QHI mode iterator): New.
9461 * config/h8300/h8300.md: Remove trailing whitespace.
9463 2018-07-02 Jim Wilson <jimw@sifive.com>
9465 * config/riscv/riscv.c (riscv_expand_epilogue): Use emit_jump_insn
9466 instead of emit_insn for interrupt returns.
9467 * config/riscv/riscv.md (riscv_met): Add (return) to rtl.
9468 (riscv_sret, riscv_uret): Likewise.
9470 2018-07-02 David Malcolm <dmalcolm@redhat.com>
9472 * pretty-print.c (selftest::test_pp_format): Move save and restore
9473 of quotes to class auto_fix_quotes, and add an instance.
9474 * selftest.c: Include "intl.h".
9475 (selftest::auto_fix_quotes::auto_fix_quotes): New ctor.
9476 (selftest::auto_fix_quotes::~auto_fix_quotes): New dtor.
9477 * selftest.h (selftest::auto_fix_quotes): New class.
9479 2018-07-02 Richard Henderson <richard.henderson@linaro.org>
9481 * config/aarch64/aarch64-protos.h, config/aarch64/aarch64.c
9482 (aarch64_sve_prepare_conditional_op): Remove.
9483 * config/aarch64/aarch64-sve.md (cond_<SVE_INT_BINARY><SVE_I>):
9484 Allow aarch64_simd_reg_or_zero as select operand; remove
9485 the aarch64_sve_prepare_conditional_op call.
9486 (cond_<SVE_INT_BINARY_SD><SVE_SDI>): Likewise.
9487 (cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
9488 (*cond_<SVE_INT_BINARY><SVE_I>_z): New pattern.
9489 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_z): New pattern.
9490 (*cond_<SVE_COND_FP_BINARY><SVE_F>_z): New pattern.
9491 (*cond_<SVE_INT_BINARY><SVE_I>_any): New pattern.
9492 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_any): New pattern.
9493 (*cond_<SVE_COND_FP_BINARY><SVE_F>_any): New pattern
9494 and a splitters to match all of the *_any patterns.
9495 * config/aarch64/predicates.md (aarch64_sve_any_binary_operator): New.
9497 * config/aarch64/iterators.md (SVE_INT_BINARY_REV): Remove.
9498 (SVE_COND_FP_BINARY_REV): Remove.
9499 (sve_int_op_rev, sve_fp_op_rev): New.
9500 * config/aarch64/aarch64-sve.md (*cond_<SVE_INT_BINARY><SVE_I>_0): New.
9501 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_0): New.
9502 (*cond_<SVE_COND_FP_BINARY><SVE_F>_0): New.
9503 (*cond_<SVE_INT_BINARY><SVE_I>_2): Rename, add movprfx alternative.
9504 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_2): Similarly.
9505 (*cond_<SVE_COND_FP_BINARY><SVE_F>_2): Similarly.
9506 (*cond_<SVE_INT_BINARY><SVE_I>_3): Similarly; use sve_int_op_rev.
9507 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_3): Similarly.
9508 (*cond_<SVE_COND_FP_BINARY><SVE_F>_3): Similarly; use sve_fp_op_rev.
9510 * config/aarch64/aarch64-sve.md (cond_<SVE_COND_FP_BINARY><SVE_F>):
9511 Remove match_dup 1 from the inner unspec.
9512 (*cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
9514 * config/aarch64/aarch64.md (movprfx): New attr.
9515 (length): Default movprfx to 8.
9516 * config/aarch64/aarch64-sve.md (*mul<SVE_I>3): Add movprfx alt.
9517 (*madd<SVE_I>, *msub<SVE_I): Likewise.
9518 (*<su>mul<SVE_I>3_highpart): Likewise.
9519 (*<SVE_INT_BINARY_SD><SVE_SDI>3): Likewise.
9520 (*v<ASHIFT><SVE_I>3): Likewise.
9521 (*<su><MAXMIN><SVE_I>3): Likewise.
9522 (*<su><MAXMIN><SVE_F>3): Likewise.
9523 (*fma<SVE_F>4, *fnma<SVE_F>4): Likewise.
9524 (*fms<SVE_F>4, *fnms<SVE_F>4): Likewise.
9525 (*div<SVE_F>4): Likewise.
9527 2018-07-02 Richard Sandiford <richard.sandiford@arm.com>
9529 * tree-vect-patterns.c (vect_recog_widen_shift_pattern): Fix typo
9532 2018-07-02 Richard Biener <rguenther@suse.de>
9534 PR tree-optimization/86363
9535 * tree-ssa-sccvn.c (vn_reference_lookup_3): Check the
9536 memset argument refers to a non-variable address.
9538 2018-07-02 Aldy Hernandez <aldyh@redhat.com>
9540 * tree-vrp.c (extract_range_from_binary_expr_1): Abstract a lot of the
9541 {PLUS,MINUS}_EXPR code to...
9542 (adjust_symbolic_bound): ...here,
9543 (combine_bound): ...here,
9544 (set_value_range_with_overflow): ...and here.
9546 2018-07-02 Aldy Hernandez <aldyh@redhat.com>
9548 * tree-vrp.c (extract_range_from_unary_expr): Abstract ABS_EXPR
9550 (extract_range_from_abs_expr): ...here.
9552 2018-07-02 Eric Botcazou <ebotcazou@adacore.com>
9554 * config/i386/i386.c (ix86_finalize_stack_frame_flags): Do not overrule
9555 -fno-omit-frame-pointer when not optimizing.
9557 2018-07-02 Martin Liska <mliska@suse.cz>
9560 * ipa-pure-const.c (malloc_candidate_p): Revert usage of ::get.
9561 (propagate_nothrow): Likewise.
9563 2018-07-02 Martin Liska <mliska@suse.cz>
9566 * ipa-inline.c (early_inliner): Revert wrongly added ::get call.
9568 2018-07-02 David Malcolm <dmalcolm@redhat.com>
9570 * dumpfile.c (dump_generic_expr_loc): Undo removal of this
9571 function in r262149, changing "loc" param from source_location to
9572 const dump_location_t &.
9573 * dumpfile.h (dump_generic_expr_loc): Undo removal of this
9574 declaration, as above.
9576 2018-07-01 Paul Koning <ni1d@arrl.net>
9578 * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
9579 -munit-asm, -mgnu-asm, -mdec-asm.
9580 * config/pdp11/pdp11-protos.h (pdp11_gen_int_label): New.
9581 (pdp11_output_labelref): New.
9582 (pdp11_output_def): New.
9583 (pdp11_output_addr_vec_elt): New.
9584 * config/pdp11/pdp11.c: Use tab between opcode and operands. Use
9585 %# and %@ format codes.
9586 (pdp11_option_override): New.
9587 (TARGET_ASM_FILE_START_FILE_DIRECTIVE): Define.
9588 (pdp11_output_ident): New.
9589 (pdp11_asm_named_section): New.
9590 (pdp11_asm_init_sections): New.
9591 (pdp11_file_start): New.
9592 (pdp11_file_end): New.
9593 (output_ascii): Use .ascii/.asciz for -mdec-asm.
9594 (pdp11_asm_print_operand): Update %# and %$ for -mdec-asm. Add
9595 %o, like %c but octal.
9596 (pdp11_option_override): New.
9597 * config/pdp11/pdp11.h (TEXT_SECTION_ASM_OP): Update for
9599 (DATA_SECTION_ASM_OP): Ditto.
9600 (READONLY_DATA_SECTION_ASM_OP): New.
9601 (IS_ASM_LOGICAL_LINE_SEPARATOR): New.
9602 (ASM_GENERATE_INTERNAL_LABEL): Use new function.
9603 (ASM_OUTPUT_LABELREF): Ditto.
9604 (ASM_OUTPUT_DEF): Ditto.
9605 (ASM_OUTPUT_EXTERNAL): New.
9606 (ASM_OUTPUT_SOURCE_FILENAME): New.
9607 (ASM_OUTPUT_ADDR_VEC_ELT): Use new function.
9608 (ASM_OUTPUT_SKIP): Update for -mdec-asm.
9609 * config/pdp11/pdp11.md: Use tab between opcode and operands. Use
9610 %# and %@ format codes.
9611 * config/pdp11/pdp11.opt (mgnu-asm): New.
9612 (mdec-asm): Conflicts with -mgnu-asm and -munix-asm.
9613 (munix-asm): Conflicts with -mdec-asm and -mgnu-asm.
9614 * doc/invoke.txt (PDP-11 Options): Add -mgnu-asm.
9616 2018-07-01 Aldy Hernandez <aldyh@redhat.com>
9618 * tree-ssa-threadupdate.c (mark_threaded_blocks): Avoid
9619 dereferencing path[] beyond its length.
9621 (debug_all_paths): New.
9622 (rewire_first_differing_edge): New.
9623 (adjust_paths_after_duplication): New.
9624 (duplicate_thread_path): Call adjust_paths_after_duplication.
9626 (thread_through_all_blocks): Add new argument to
9627 duplicate_thread_path.
9629 2018-06-30 Jim Wilson <jimw@sifive.com>
9631 * config/riscv/predicates.md (p2m1_shift_operand): New.
9632 (high_mask_shift_operand): New.
9633 * config/riscv/riscv.md (lshrsi3_zero_extend_3+1): New combiner
9634 pattern using p2m1_shift_operand.
9635 (lshsi3_zero_extend_3+2): New combiner pattern using
9636 high_mask_shift_operand.
9638 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
9640 * tree-vect-patterns.c (vect_get_external_def_edge): New function,
9642 (vect_recog_rotate_pattern): ...here.
9643 (vect_convert_input): Try to insert casts of invariants in the
9645 * tree-vect-loop-manip.c (vect_loop_versioning): Don't require the
9646 preheader to be empty.
9648 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
9650 * tree-vect-patterns.c (append_pattern_def_seq): Take an optional
9651 vector type. If given, install it in the new statement's
9653 (vect_element_precision): New function.
9654 (vect_unpromoted_value): New struct.
9655 (vect_unpromoted_value::vect_unpromoted_value): New function.
9656 (vect_unpromoted_value::set_op): Likewise.
9657 (vect_look_through_possible_promotion): Likewise.
9658 (vect_joust_widened_integer, vect_joust_widened_type): Likewise.
9659 (vect_widened_op_tree, vect_convert_input): Likewise.
9660 (vect_convert_inputs, vect_convert_output): Likewise.
9661 (vect_recog_dot_prod_pattern): Use vect_look_through_possible_promotion
9662 to handle the optional cast of the multiplication result and
9663 vect_widened_op_tree to detect the widened multiplication itself.
9664 Do not require the input and output of promotion casts to have
9665 the same sign, but base the signedness of the operation on the
9666 input rather than the result. If the pattern includes two
9667 promotions, check that those promotions have the same sign.
9668 Do not restrict the MULT_EXPR handling to a double-width result;
9669 handle quadruple-width results and wider. Use vect_convert_inputs
9670 to convert the inputs to the common type.
9671 (vect_recog_sad_pattern): Use vect_look_through_possible_promotion
9672 to handle the optional cast of the ABS result. Also allow a sign
9673 change or a sign extension between the ABS and MINUS.
9674 Use vect_widened_op_tree to detect the widened subtraction and use
9675 vect_convert_inputs to convert the inputs to the common type.
9676 (vect_handle_widen_op_by_const): Delete.
9677 (vect_recog_widen_op_pattern): New function.
9678 (vect_recog_widen_mult_pattern): Use it.
9679 (vect_recog_widen_shift_pattern): Likewise.
9680 (vect_recog_widen_sum_pattern): Use
9681 vect_look_through_possible_promotion to handle the promoted
9684 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
9686 * gimple-iterator.c (gsi_for_stmt): Add a new overload that takes
9687 the containing gimple_seq *.
9688 * gimple-iterator.h (gsi_for_stmt): Declare it.
9689 * tree-vect-patterns.c (vect_recog_dot_prod_pattern)
9690 (vect_recog_sad_pattern, vect_recog_widen_sum_pattern)
9691 (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
9692 (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
9693 (vect_recog_mask_conversion_pattern): Remove STMT_VINFO_IN_PATTERN_P
9695 (vect_init_pattern_stmt, vect_set_pattern_stmt): New functions,
9697 (vect_mark_pattern_stmts): ...here. Handle cases in which the
9698 statement being replaced is part of an existing pattern
9699 definition sequence, inserting the new pattern statements before
9701 (vect_pattern_recog_1): Don't return a bool. If the statement
9702 is already part of a pattern, instead apply pattern matching
9703 to the pattern definition statements. Don't clear the
9704 STMT_VINFO_RELATED_STMT if is_pattern_stmt_p.
9705 (vect_pattern_recog): Don't break after the first match;
9706 continue processing the pattern definition statements instead.
9707 Don't bail out for STMT_VINFO_IN_PATTERN_P here.
9709 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
9711 * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
9712 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
9713 (vect_recog_widen_sum_pattern): Use it.
9715 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
9717 * tree-vect-loop.c (vectorizable_reduction): Assert that the
9718 phi is not a pattern statement and has not been replaced by
9719 a pattern statement.
9720 * tree-vect-patterns.c (type_conversion_p): Don't check
9721 STMT_VINFO_IN_PATTERN_P.
9722 (vect_recog_vector_vector_shift_pattern): Likewise.
9723 (vect_recog_dot_prod_pattern): Expect vect_is_simple_use to return
9724 the pattern statement rather than the original statement; check
9725 directly for a WIDEN_MULT_EXPR here.
9726 * tree-vect-slp.c (vect_get_and_check_slp_defs): Expect
9727 vect_is_simple_use to return the pattern statement rather
9728 than the original statement; use is_pattern_stmt_p to check
9729 for such a pattern statement.
9730 * tree-vect-stmts.c (process_use): Expect vect_is_simple_use
9731 to return the pattern statement rather than the original statement;
9732 don't do the same transformation here.
9733 (vect_is_simple_use): If the defining statement has been replaced
9734 by a pattern statement, return the pattern statement instead.
9735 Remove the corresponding (local) transformation from the vectype
9738 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
9740 * tree-vectorizer.h (vect_is_simple_use): Move the gimple ** to the
9741 end and default to null.
9742 * tree-vect-loop.c (vect_create_epilog_for_reduction)
9743 (vectorizable_reduction): Update calls accordingly, dropping the
9744 gimple ** argument if the passed-back statement isn't needed.
9745 * tree-vect-patterns.c (vect_get_internal_def, type_conversion_p)
9746 (vect_recog_rotate_pattern): Likewise.
9747 (vect_recog_mask_conversion_pattern): Likewise.
9748 * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
9749 (vect_mask_constant_operand_p): Likewise.
9750 * tree-vect-stmts.c (is_simple_and_all_uses_invariant, process_use):
9751 (vect_model_simple_cost, vect_get_vec_def_for_operand): Likewise.
9752 (get_group_load_store_type, get_load_store_type): Likewise.
9753 (vect_check_load_store_mask, vect_check_store_rhs): Likewise.
9754 (vectorizable_call, vectorizable_simd_clone_call): Likewise.
9755 (vectorizable_conversion, vectorizable_assignment): Likewise.
9756 (vectorizable_shift, vectorizable_operation): Likewise.
9757 (vectorizable_store, vect_is_simple_cond): Likewise.
9758 (vectorizable_condition, vectorizable_comparison): Likewise.
9759 (get_same_sized_vectype, vect_get_mask_type_for_stmt): Likewise.
9760 (vect_is_simple_use): Rename the def_stmt argument to def_stmt_out
9761 and move it to the end. Cope with null def_stmt_outs.
9763 2018-06-30 Bernd Edlinger <bernd.edlinger@hotmail.de>
9765 * Makefile.in (FLAGS_TO_PASS): Add RANLIB_FOR_TARGET.
9767 2018-06-29 Jeff Law <law@redhat.com>
9769 * config/v850/v850.c (v850_legitimate_address_p): Handle large
9770 displacements for TARGET_V850E2V3 and newer.
9771 (TARGET_LRA_P): Remove. Defaults to LRA now.
9772 * config/v850/v850.md (sign23byte_load): Remove.
9773 (unsign23byte_load, sign23hword_load, unsign23hword_load): Likewise.
9774 (23word_load, 23byte_store, 23hword_store, 23word_store): Likewise.
9776 2018-06-29 Martin Liska <mliska@suse.cz>
9779 * coverage.c (coverage_init): Mangle full path name.
9780 * doc/invoke.texi: Document the change.
9781 * gcov-io.c (mangle_path): New.
9782 * gcov-io.h (mangle_path): Likewise.
9783 * gcov.c (mangle_name): Use mangle_path for path mangling.
9785 2018-06-29 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
9787 * config/arm/arm.c (output_move_double): Don't allow STRD instructions
9788 if starting source register is not even.
9790 2018-06-29 Martin Liska <mliska@suse.cz>
9792 PR tree-optimization/86263
9793 * tree-switch-conversion.c (switch_decision_tree::try_switch_expansion):
9794 Make edge redirection.
9796 2018-06-29 David Malcolm <dmalcolm@redhat.com>
9798 * dumpfile.c (dump_loc): Add indentation based on scope depth.
9799 (dump_scope_depth): New variable.
9800 (get_dump_scope_depth): New function.
9801 (dump_begin_scope): New function.
9802 (dump_end_scope): New function.
9803 * dumpfile.h (get_dump_scope_depth): New declaration.
9804 (dump_begin_scope): New declaration.
9805 (dump_end_scope): New declaration.
9806 (class auto_dump_scope): New class.
9807 (AUTO_DUMP_SCOPE): New macro.
9808 * tree-vectorizer.h (DUMP_VECT_SCOPE): Reimplement in terms of
9811 2018-06-29 Richard Biener <rguenther@suse.de>
9813 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences): Assert
9814 compute_all_dependences succeeds.
9815 * tree-vect-loop.c (vect_get_datarefs_in_loop): Fail early if we
9816 exceed --param loop-max-datarefs-for-datadeps.
9818 2018-06-29 Jakub Jelinek <jakub@redhat.com>
9820 * config/rs6000/t-rs6000: Append rs6000-modes.h to TM_H.
9822 2018-06-28 Uros Bizjak <ubizjak@gmail.com>
9825 * config/i386/sse.md (*vec_extractv4si_0_zext_sse4): Use
9826 alternative 0 in preferred_for_speed attribute.
9828 2018-06-28 Paul Koning <ni1d@arrl.net>
9830 * config/pdp11/pdp11-protos.h (pdp11_shift_length): New function.
9831 * config/pdp11/pdp11.c (pdp11_shift_length): New function.
9832 * config/pdp11/pdp11.h (ADJUST_INSN_LENGTH): Remove.
9833 * config/pdp11/pdp11.md: Correct "length" attribute calculation
9834 for shift insn patterns.
9836 2018-06-28 David Malcolm <dmalcolm@redhat.com>
9838 * cgraph.c (cgraph_node::get_body): Replace assignments to
9839 "dump_file" with calls to set_dump_file.
9840 * dumpfile.c (alt_dump_file): Make static, and group with...
9841 (alt_flags): ...this definition.
9842 (dumps_are_enabled): New variable.
9843 (refresh_dumps_are_enabled): New function.
9844 (set_dump_file): New function.
9845 (set_alt_dump_file): New function.
9846 (gcc::dump_manager::dump_start): Replace assignments to
9847 "dump_file" and "alt_dump_file" with calls to set_dump_file and
9849 (gcc::dump_manager::dump_finish): Likewise.
9850 * dumpfile.h (alt_dump_file): Delete decl.
9851 (dumps_are_enabled): New variable decl.
9852 (set_dump_file): New function decl.
9853 (dump_enabled_p): Rewrite in terms of new "dumps_are_enabled"
9855 * tree-nested.c (lower_nested_functions): Replace assignments to
9856 "dump_file" with calls to set_dump_file.
9858 2018-06-28 Eric Botcazou <ebotcazou@adacore.com>
9860 * tree-cfg.c (verify_gimple_in_cfg): Call verify_location on the
9861 goto_locus of each outgoing edge of each basic block.
9863 2018-06-28 Richard Biener <rguenther@suse.de>
9865 * dwarf2out.c (decl_scope_table): Remove.
9866 (push_decl_scope): Likewise.
9867 (pop_decl_scope): Likewise.
9868 (gen_type_die_for_member): Do not call push/pop_decl_scope.
9869 (gen_struct_or_union_type_die): Likewise.
9870 (gen_tagged_type_die): Likewise.
9871 (dwarf2out_init): Do not initialize decl_scope_table.
9872 (dwarf2out_c_finalize): Do not free it.
9874 2018-06-28 Richard Biener <rguenther@suse.de>
9876 * dwarf2out.c (gen_subprogram_die): Use is_unit_die when
9877 deciding whether to not re-use a DIE.
9879 2018-06-28 Richard Biener <rguenther@suse.de>
9881 * dwarf2out.c (gen_subprogram_die): Always re-use DIEs with an
9882 DW_AT_abstract_origin attribute.
9884 2018-06-28 Martin Liska <mliska@suse.cz>
9886 * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
9887 Use newly introduced constants.
9888 * tree-switch-conversion.h (struct jump_table_cluster):
9889 Define max_ratio_for_size and max_ratio_for_speed.
9891 2018-06-28 Martin Liska <mliska@suse.cz>
9893 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
9894 Add new checking assert to catch invalid state.
9895 (jump_table_cluster::can_be_handled): Handle single case
9897 (jump_table_cluster::is_beneficial): Bail out for such case.
9898 (bit_test_cluster::find_bit_tests):
9899 Add new checking assert to catch invalid state.
9900 (bit_test_cluster::can_be_handled): Handle single case
9902 (bit_test_cluster::is_beneficial): Bail out for such case.
9903 (switch_decision_tree::analyze_switch_statement):
9906 2018-06-28 Martin Liska <mliska@suse.cz>
9908 * common.opt: Introduce -completion option.
9909 * gcc.c (driver_handle_option): Handle it.
9910 (driver::main): Print completions if completion
9912 * opt-suggestions.c (option_proposer::get_completions):
9914 (option_proposer::suggest_completion): Likewise.
9915 (option_proposer::find_param_completions): Likewise.
9916 (verify_autocompletions): Likewise.
9917 (test_completion_valid_options): Likewise.
9918 (test_completion_valid_params): Likewise.
9919 (in_completion_p): Likewise.
9920 (empty_completion_p): Likewise.
9921 (test_completion_partial_match): Likewise.
9922 (test_completion_garbage): Likewise.
9923 (opt_proposer_c_tests): Likewise.
9924 * opt-suggestions.h: Declare new functions.
9925 * opts.c (common_handle_option): Handle OPT__completion_.
9926 * selftest-run-tests.c (selftest::run_tests): Add
9927 opt_proposer_c_tests.
9928 * selftest.c (assert_str_startswith): New.
9929 * selftest.h (assert_str_startswith): Likewise.
9930 (opt_proposer_c_tests): New.
9931 (ASSERT_STR_STARTSWITH): Likewise.
9933 2018-06-28 Martin Liska <mliska@suse.cz>
9935 * Makefile.in: Add opt-suggestions.o.
9936 * gcc-main.c: Include opt-suggestions.h.
9937 * gcc.c (driver::driver): Likewise.
9938 (driver::~driver): Remove m_option_suggestions.
9939 (driver::build_option_suggestions): Moved to option_proposer.
9940 (driver::suggest_option): Likewise.
9941 (driver::handle_unrecognized_options): Use option_proposer.
9942 * gcc.h (class driver): Add new memver m_option_proposer.
9943 * opt-suggestions.c: New file.
9944 * opt-suggestions.h: New file.
9946 2018-06-28 Martin Liska <mliska@suse.cz>
9948 * vec.h (class auto_string_vec): New (moved from auto_argvec).
9949 (auto_string_vec::~auto_string_vec): Likewise.
9951 2018-06-28 Eric Botcazou <ebotcazou@adacore.com>
9953 * tree-inline.h (struct copy_body_data): Move remapping_type_depth and
9954 prevent_decl_creation_for_types fields up and add reset_location field.
9955 * tree-inline.c (remap_gimple_stmt): Force input_location on the new
9956 statement if id->reset_location is true.
9957 (copy_edges_for_bb): Do not set goto_locus on the new edges if
9958 id->reset_location is true.
9959 (copy_phis_for_bb): Force input_location on the arguments if
9960 id->reset_location is true.
9961 (expand_call_inline): Set id->reset_location if DECL_IGNORED_P
9962 is set on the function to be inlined.
9964 2018-06-27 Stephan Bergmann <sbergman@redhat.com>
9966 * doc/invoke.texi (Debugging Options): Add -gsplit-dwarf.
9968 2018-06-27 Dimitar Dimitrov <dimitar@dinux.eu>
9970 * lra-eliminations.c (update_reg_eliminate): Mark all spanning hard
9971 registers for Pmode.
9972 * lra-lives.c (check_pseudos_live_through_calls): Mark all spanning
9973 hard registers for the clobbered pseudo.
9975 2018-06-27 Paul Koning <ni1d@arrl.net>
9977 * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
9978 mutually exclusive options.
9979 * config/pdp11/constraints.md (h): New constraint.
9980 (O): Update definition to match shift code generation.
9981 (D): New constraint.
9982 * config/pdp11/pdp11-modes.def (CCNZ): Define mode.
9984 * config/pdp11/pdp11-protos.h (int_no_side_effect_operand): New
9986 (output_jump): Change arguments.
9987 (pdp11_fixed_cc_regs): New function.
9988 (pdp11_cc_mode): Ditto.
9989 (pdp11_expand_shift): Ditto.
9990 (pdp11_assemble_shift): Ditto.
9991 (pdp11_small_shift): Ditto.
9992 (pdp11_branch_cost): Remove.
9993 * config/pdp11/pdp11.c (pdp11_assemble_integer): Remove comments
9995 (pdp11_register_move_cost): Update for CC registers.
9996 (pdp11_rtx_costs): Add case for LSHIFTRT.
9997 (pdp11_output_jump): Add CCNZ mode conditional branches.
9998 (notice_update_cc_on_set): Remove.
9999 (pdp11_cc_mode): New function.
10000 (simple_memory_operand): Correct pre/post decrement case.
10001 (no_side_effect_operand): New function.
10002 (pdp11_regno_reg_class): Add CC_REGS class.
10003 (pdp11_fixed_cc_regs): New function.
10004 (pdp11_small_shift): New function.
10005 (pdp11_expand_shift): New function to expand shift insns.
10006 (pdp11_assemble_shift): New function to output shifts.
10007 (pdp11_branch_cost): Remove.
10008 (pdp11_modes_tieable_p): Make QI/HI modes tieable.
10009 * config/pdp11/pdp11.h (SIZE_TYPE): Ensure 16-bit type.
10010 (WCHAR_TYPE): Ditto.
10011 (PTRDIFF_TYPE): Ditto.
10012 (ADJUST_INSN_LENGTH): New macro.
10013 (FIXED_REGISTERS): Add CC registers.
10014 (CALL_USED_REGISTERS): Ditto.
10015 (reg_class): Ditto.
10016 (REG_CLASS_NAMES): Ditto.
10017 (REG_CLASS_CONTENTS): Ditto.
10018 (SELECT_CC_MODE): Use new function.
10019 (TARGET_FLAGS_REGNUM): New macro.
10020 (TARGET_FIXED_CONDITION_CODE_REGS): Ditto.
10021 (cc0_reg_rtx): Remove.
10022 (CC_STATUS_MDEP): Remove.
10023 (CC_STATUS_MDEFP_INIT): Remove.
10024 (CC_IN_FPU): Remove.
10025 (NOTICE_UPDATE_CC): Remove.
10026 (REGISTER_NAMES): Add CC registers.
10027 (BRANCH_COST): Change to constant 1.
10028 * config/pdp11/pdp11.md: Rewrite for CCmode condition code
10030 * config/pdp11/pdp11.opt (mbcopy): Remove.
10031 (mbcopy-builtin): Remove.
10032 (mbranch-cheap): Remove.
10033 (mbranch-expensive): Remove.
10034 * config/pdp11/predicates.md (expand_shift_operand): Update to
10035 match shift code generation.
10036 (ccnz_operator): New predicate.
10037 * doc/invoke.texi (PDP-11 Options): Remove deleted options
10038 -mbcopy, -mbcopy-builtin, -mbranch-cheap, -mbranch-expensive.
10039 Remove non-existent option -mabshi, -mno-abshi. Document mutually
10041 * doc/md.texi (PDP-11): Document new D and h constraints. Update
10042 description of O constraint.
10044 2018-06-27 Jeff Law <law@redhat.com>
10045 Austin Law <austinklaw@gmail.com>
10047 * config/v850/v850.md (addsi3_set_flags): New pattern.
10048 (subsi3_set_flags, negsi2_set_flags, andsi3_set_flags): Likewise.
10049 (iorsi3_set_flags, xorsi3_set_flags, one_cmplsi2_set_flags): Likewise.
10050 (zero_extendhisi2_v850_set_flags): Likewise.
10051 (zero_extendqisi2_v850_set_flags): Likewise.
10052 (ashlsi3_set_flags, ashlsi3_v850e2_set_flags): Likewise.
10053 (lshrsi3_set_flags, lshrsi3_v850e2_set_flags): Likewise.
10054 (ashrsi3_set_flags, ashrsi3_v850e2_set_flags): Likewise.
10056 * config/v850/v850-protos.h (notice_update_cc): Remove.
10057 * config/v850/v850.c (v850_compare_op0, v850_compare_op1): Remove.
10058 (v850_print_operand): Handle 'D' and "d".
10059 (v850_select_cc_mode): Remove ATTRIBUTE_UNUSED for last argument.
10060 Add handling of arithmetic/logical operations compared against zero.
10061 (v850_gen_float_compare): Remove ATTRIBUTE_UNUSED for last argument.
10062 Do not look at v850_compare_op, instead get mode from last argument.
10063 (v850_gen_compare): Remove
10064 (increment_stack): Use addsi3_clobber_flags to avoid splitting failure
10065 after reload for prologue insns.
10066 (expand_prologue): Account for CLOBBER of CC_REGNUM in various
10068 (construct_save_jarl): Likewise.
10069 (TARGET_FLAGS_REGNUM): Define.
10070 * config/v850/v850.h (v850_compare_op0, v850_compare_op1): Remove.
10071 (NOTICE_UPDATE_CC): Remove.
10072 * config/v850/v850.md (v850_tst1): Use (reg:CCZ CC_REGNUM) rather
10073 than cc0. Conditionalize on reload_completed.
10074 (cmpsi_insn, setfcc_insn): Likewise.
10075 (tst1 splitter): Turn into define_and_split which sets the flags
10077 (cstoresi4, cbranchsf4, cbranchdf4, cbranchsi4_insn): Likewise.
10078 (cbranchsi4, branch_normal, branch_invert): Do not expose cc0 here.
10079 (cstoresf4, cstoredf4): Clobber the flags.
10080 (cmpsi, cmpsf, cmpdf): Remove expanders.
10081 (setf_insn): Remove pattern.
10082 (addsi3): Turn into define_and_split which clobbers the flags after
10083 reload and a suitable pattern (addsi3_clobber_flags) for use after
10085 (subsi3, negsi2, andsi3, iorsi3, xorsi3, one_cmplsi2) Likewise.
10086 (ashlsi3, ashlsi3_v850e2, lshrsi3, lsh4si3_v850e2): Likewise.
10087 (ashrsi3, ashrsi3_v850e2): Likewise.
10088 (bins): Clobber the flags.
10089 (movsicc_normal_cc, movsicc_normal, movsicc_tst1): Likewise.
10090 (movsicc_tst1_revesed, sasf, swap and rotate patterns): Likewise.
10091 (fix_loop_counter, call_internal_short, call_internal_long): Likewise.
10092 (call_value_internal_short, call_value_internal_long): Likewise.
10093 (callt_save_interrupt, callt_return_interrupt): Likewise.
10094 (save_interrupt, return_interrupt): Likewise.
10095 (callt_save_all_interrupt, save_all_interrupt): Likewise.
10096 (_save_all_interrupt, callt_restore_all_interrupt): Likewise.
10097 (restore_all_interrupt, _restore_all_interrupt): Likewise.
10098 (All FP comparisons): Only allow after reload has completed.
10100 (divh, divhu): Tweak output template.
10101 (branch_z_normal, branch_z_invert): Remove
10102 (branch_nz_normal, branch_nz_invert): Likewise.
10103 (extendhisi_insn, extendqisi_insn): Do not clobber flags.
10105 * config/v850/v850-modes.def (CCZ, CCNZ): Add new modes.
10106 * config/v850/v850.c (notice_update_cc): Remove.
10107 * config/v850/v850.h (CC_OVERFLOW_UNUSABLE): Remove
10108 (CC_NO_CARRY): Likewise.
10109 (NOTICE_UPDATE_CC): Define to nothing.
10110 * config/v850/v850.md: Remove block comment on cc0 handling
10111 Remove "cc" attribute from all patterns. Remove cc_status handling
10112 from all patterns. Minor formatting fixes.
10114 2018-06-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
10116 * config/aarch64/aarch64-cores.def (cortex-a76): New entry.
10117 (cortex-a76.cortex-a55): Likewise.
10118 * config/aarch64/aarch64-tune.md: Regenerate.
10119 * doc/invoke.texi (AArch64 Options): Document cortex-a76 and
10120 cortex-a76.cortex-a55.
10122 2018-06-27 Jeff Law <law@redhat.com>
10124 * config/v850/t-v850 (MULTILIB_OPTIONS): Remove 8byte-align.
10125 (MULTILIB_DIRNAMES): Similarly.
10127 2018-06-27 Eric Botcazou <ebotcazou@adacore.com>
10129 * gimple.h (gimple_return_retbnd): Delete.
10130 (gimple_return_set_retbnd): Likewise.
10131 * cgraphunit.c (cgraph_node::expand_thunk): Remove call to
10132 gimple_return_set_retbnd.
10133 * gimple-pretty-print.c (dump_gimple_return): Remove call to
10134 gimple_return_retbnd and adjust.
10135 * tree-inline.h (struct copy_body_data): Remove retbnd field.
10136 * tree-inline.c (remap_gimple_stmt): Remove handling of retbnd.
10137 Explicitly return NULL in a couple more cases. Move assertion
10138 on debug statements and remove unreachable code.
10139 (reset_debug_binding): Do not test id->retbnd.
10140 (expand_call_inline): Do not set it.
10142 2018-06-27 Rasmus Villemoes <rv@rasmusvillemoes.dk>
10144 * configure.ac: Add --disable-gcov option.
10145 * configure: Regenerate.
10146 * Makefile.in: Honour @enable_gcov@.
10147 * doc/install.texi: Document --disable-gcov.
10149 2018-06-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
10151 * config/arm/arm-cpus.in (cortex-a76): New entry.
10152 (cortex-a76.cortex-a55): Likewise.
10153 * config/arm/arm-tables.opt: Regenerate.
10154 * config/arm/arm-tune.md: Likewise.
10155 * config/arm/driver-arm.c (arm_cpu_table): Add Cortex-A76 entry.
10156 * doc/invoke.texi (ARM Options): Document cortex-a76 and
10157 cortex-a76.cortex-a55.
10159 2018-06-27 Tamar Christina <tamar.christina@arm.com>
10162 * config/aarch64/aarch64.md (*movhf_aarch64): Add dup v0.4h pattern.
10164 2018-06-27 Siddhesh Poyarekar <siddhesh@sourceware.org>
10166 * config/aarch64/aarch64.h (CALL_USE_REGISTERS): Fix obsolete
10168 (EPILOGUE_USES): Likewise.
10170 2018-06-26 Eric Botcazou <ebotcazou@adacore.com>
10172 * tree-inline.c (remap_location): New function extracted from...
10173 (copy_edges_for_bb): Add ID parameter. Remap goto_locus.
10174 (copy_phis_for_bb): ...here. Call remap_location.
10175 (copy_cfg_body): Adjust call to copy_edges_for_bb.
10177 2018-06-26 Aaron Sawdey <acsawdey@linux.ibm.com>
10179 * config/rs6000/rs6000-string.c (expand_block_clear): Don't use
10180 unaligned vsx for 16B memset.
10182 2018-06-26 Segher Boessenkool <segher@kernel.crashing.org>
10185 * config/rs6000/rs6000.c (rs6000_init_builtins): Do not set
10186 ieee128_float_type_node to long_double_type_node unless
10187 TARGET_LONG_DOUBLE_128 is set.
10189 2018-06-26 David Malcolm <dmalcolm@redhat.com>
10191 * cfgloop.c (get_loop_location): Convert return type from
10192 location_t to dump_user_location_t, replacing INSN_LOCATION lookups
10193 by implicit construction from rtx_insn *, and using
10194 dump_user_location_t::from_function_decl for the fallback case.
10195 * cfgloop.h (get_loop_location): Convert return type from
10196 location_t to dump_user_location_t.
10197 * cgraphunit.c (walk_polymorphic_call_targets): Update call to
10198 dump_printf_loc to pass in a dump_location_t rather than a
10199 location_t, via the gimple stmt.
10200 * coverage.c (get_coverage_counts): Update calls to
10201 dump_printf_loc to pass in dump_location_t rather than a
10203 * doc/optinfo.texi (Dump types): Convert example of
10204 dump_printf_loc from taking "locus" to taking "insn". Update
10205 description of the "_loc" calls to cover dump_location_t.
10206 * dumpfile.c: Include "backend.h", "gimple.h", "rtl.h", and
10208 (dump_user_location_t::dump_user_location_t): New constructors,
10209 from gimple *stmt and rtx_insn *.
10210 (dump_user_location_t::from_function_decl): New function.
10211 (dump_loc): Make static.
10212 (dump_gimple_stmt_loc): Convert param "loc" from location_t to
10213 const dump_location_t &.
10214 (dump_generic_expr_loc): Delete.
10215 (dump_printf_loc): Convert param "loc" from location_t to
10216 const dump_location_t &.
10217 (selftest::test_impl_location): New function.
10218 (selftest::dumpfile_c_tests): New function.
10219 * dumpfile.h: Include "profile-count.h".
10220 (class dump_user_location_t): New class.
10221 (struct dump_impl_location_t): New struct.
10222 (class dump_location_t): New class.
10223 (dump_printf_loc): Convert 2nd param from source_location to
10224 const dump_location_t &.
10225 (dump_generic_expr_loc): Delete.
10226 (dump_gimple_stmt_loc): Convert 2nd param from source_location to
10227 const dump_location_t &.
10228 * gimple-fold.c (fold_gimple_assign): Update call to
10229 dump_printf_loc to pass in a dump_location_t rather than a
10230 location_t, via the gimple stmt.
10231 (gimple_fold_call): Likewise.
10232 * gimple-loop-interchange.cc
10233 (loop_cand::analyze_iloop_reduction_var): Update for change to
10234 check_reduction_path.
10235 (tree_loop_interchange::interchange): Update for change to
10236 find_loop_location.
10237 * graphite-isl-ast-to-gimple.c (scop_to_isl_ast): Update for
10238 change in return-type of find_loop_location.
10239 (graphite_regenerate_ast_isl): Likewise.
10240 * graphite-optimize-isl.c (optimize_isl): Likewise.
10241 * graphite.c (graphite_transform_loops): Likewise.
10242 * ipa-devirt.c (ipa_devirt): Update call to dump_printf_loc to
10243 pass in a dump_location_t rather than a location_t, via the
10245 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
10246 * ipa.c (walk_polymorphic_call_targets): Likewise.
10247 * loop-unroll.c (report_unroll): Convert "locus" param from
10248 location_t to dump_location_t.
10249 (decide_unrolling): Update for change to get_loop_location's
10251 * omp-grid.c (struct grid_prop): Convert field "target_loc" from
10252 location_t to dump_user_location_t.
10253 (grid_find_single_omp_among_assignments_1): Updates calls to
10254 dump_printf_loc to pass in a dump_location_t rather than a
10255 location_t, via the gimple stmt.
10256 (grid_parallel_clauses_gridifiable): Convert "tloc" from
10257 location_t to dump_location_t. Updates calls to dump_printf_loc
10258 to pass in a dump_location_t rather than a location_t, via the
10260 (grid_inner_loop_gridifiable_p): Likewise.
10261 (grid_dist_follows_simple_pattern): Likewise.
10262 (grid_gfor_follows_tiling_pattern): Likewise.
10263 (grid_target_follows_gridifiable_pattern): Likewise.
10264 (grid_attempt_target_gridification): Convert initialization
10265 of local "grid" from memset to zero-initialization; FIXME: does
10266 this require C++11? Update call to dump_printf_loc to pass in a
10267 optinfo_location rather than a location_t, via the gimple stmt.
10268 * profile.c (read_profile_edge_counts): Updates call to
10269 dump_printf_loc to pass in a dump_location_t rather than a
10271 (compute_branch_probabilities): Likewise.
10272 * selftest-run-tests.c (selftest::run_tests): Call
10274 * selftest.h (dumpfile_c_tests): New decl.
10275 * tree-loop-distribution.c (pass_loop_distribution::execute):
10276 Update for change in return type of find_loop_location.
10277 * tree-parloops.c (parallelize_loops): Likewise.
10278 * tree-ssa-loop-ivcanon.c (try_unroll_loop_completely): Convert
10279 "locus" from location_t to dump_user_location_t.
10280 (canonicalize_loop_induction_variables): Likewise.
10281 * tree-ssa-loop-ivopts.c (tree_ssa_iv_optimize_loop): Update
10282 for change in return type of find_loop_location.
10283 * tree-ssa-loop-niter.c (number_of_iterations_exit): Update call
10284 to dump_printf_loc to pass in a dump_location_t rather than a
10285 location_t, via the stmt.
10286 * tree-ssa-sccvn.c (eliminate_dom_walker::before_dom_children):
10288 * tree-vect-loop-manip.c (find_loop_location): Convert return
10289 type from source_location to dump_user_location_t.
10290 (vect_do_peeling): Update for above change.
10291 (vect_loop_versioning): Update for change in type of
10293 * tree-vect-loop.c (check_reduction_path): Convert "loc" param
10294 from location_t to dump_user_location_t.
10295 (vect_estimate_min_profitable_iters): Update for change in type
10297 * tree-vect-slp.c (vect_print_slp_tree): Convert param "loc" from
10298 location_t to dump_location_t.
10299 (vect_slp_bb): Update for change in type of vect_location.
10300 * tree-vectorizer.c (vect_location): Convert from source_location
10301 to dump_user_location_t.
10302 (try_vectorize_loop_1): Update for change in vect_location's type.
10303 (vectorize_loops): Likewise.
10304 (increase_alignment): Likewise.
10305 * tree-vectorizer.h (vect_location): Convert from source_location
10306 to dump_user_location_t.
10307 (find_loop_location): Convert return type from source_location to
10308 dump_user_location_t.
10309 (check_reduction_path): Convert 1st param from location_t to
10310 dump_user_location_t.
10311 * value-prof.c (check_counter): Update call to dump_printf_loc to
10312 pass in a dump_user_location_t rather than a location_t; update
10313 call to error_at for change in type of "locus".
10314 (check_ic_target): Update call to dump_printf_loc to
10315 pass in a dump_user_location_t rather than a location_t, via the
10318 2018-06-26 Robin Dapp <rdapp@linux.vnet.ibm.com>
10320 * config/s390/s390.h (enum processor_flags): Do not use
10321 default tune parameter when -march was specified.
10323 2018-06-26 Jakub Jelinek <jakub@redhat.com>
10326 * config/i386/i386.md (setcc + movzbl to xor + setcc peephole2s):
10327 Check reg_overlap_mentioned_p in addition to reg_set_p with the same
10330 2018-06-26 Richard Biener <rguenther@suse.de>
10332 PR tree-optimization/86287
10334 * tree-vect-loop.c (vect_transform_loop_stmt): Fix read-after-free.
10335 (vect_analyze_loop): Initialize n_stmts.
10337 2018-06-26 Richard Biener <rguenther@suse.de>
10339 PR middle-end/86271
10340 * fold-const.c (fold_convertible_p): Pointer extension
10343 2018-06-26 Alexandre Oliva <aoliva@redhat.com>
10346 * dwarf2out.c (loc_list_has_views): Adjust comments.
10347 (dw_loc_list): Split single cross-partition range with
10350 2018-06-25 Jeff Law <law@redhat.com>
10352 * common/config/v850/v850-common.c (TARGET_DEFAULT_TARGET_FLAGS): Turn
10353 on -mbig-switch by default.
10355 * config/v850/predicates.md (const_float_1_operand): Fix match_code
10357 (const_float_0_operand): Remove unused predicate.
10358 * config/v850/v850.md (define_constants): Remove UNSPEC_LOOP.
10359 (define_c_enum unspec): Add LOOP, RCP and RSQRT constants.
10360 (recipsf2): New expander. Original pattern now called
10362 (recipdf2, recipdf2_insn): Similarly.
10363 (rsqrtsf2, rsqrtsf2_insn): Similarly
10364 (rsqrtdf2, rsqrtdf2_insn): Similarly
10366 2018-06-26 Gerald Pfeifer <gerald@pfeifer.com>
10368 * ginclude/stddef.h: Remove an obsolete comment on FreeBSD 5.
10369 Simplify logic for FreeBSD (twice).
10371 2018-06-25 Martin Sebor <msebor@redhat.com>
10373 PR tree-optimization/86204
10374 * tree-ssa-strlen.c (handle_builtin_strlen): Avoid storing
10375 a strnlen result if it's less than the length of the string.
10377 2018-06-25 Martin Sebor <msebor@redhat.com>
10379 PR tree-optimization/85700
10380 * gimple-fold.c (gimple_fold_builtin_strncat): Adjust comment.
10381 * tree-ssa-strlen.c (is_strlen_related_p): Handle integer subtraction.
10382 (maybe_diag_stxncpy_trunc): Distinguish strncat from strncpy.
10384 2018-06-25 Martin Sebor <msebor@redhat.com>
10386 * doc/extend.texi (Zero-length arrays): Update and clarify.
10388 2018-06-25 Michael Meissner <meissner@linux.ibm.com>
10390 * config.gcc (powerpc64le*): Revert January 16th, 2018 patch that
10391 added IEEE/IBM long double multilib support on PowerPC little
10392 endian Linux systems.
10393 * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Likewise.
10394 (MULTILIB_DEFAULTS): Likewise.
10395 * config/rs6000/rs6000.c (rs6000_option_override_internal):
10397 * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Likewise.
10398 * config/rs6000/t-ldouble-linux64le-ibm: Delete, no longer used.
10399 * config/rs6000/t-ldouble-linux64le-ieee: Delete, no longer used.
10401 2018-06-25 Alexander Monakov <amonakov@ispras.ru>
10403 PR middle-end/86311
10404 * sort.cc (REORDER_23): Avoid memcpy with same destination and source.
10405 (REORDER_45): Likewise.
10407 2018-06-25 Jeff Law <law@redhat.com>
10409 * config/v850/v850.md (divmodhi4): Make sure to sign extend the
10410 dividend to 32 bits. Adjust length.
10411 (udivmodhi4): Cleanup output template. Fix length.
10413 2018-06-25 Carl Love <cel@us.ibm.com>
10415 * config/rs6000/vsx.md: Change word selector to prefered location.
10417 2018-06-25 Richard Biener <rguenther@suse.de>
10419 PR tree-optimization/86304
10420 * tree-vectorizer.c (vectorize_loops): Walk over new possibly
10421 epilogue-if-converted loops as well.
10423 2018-06-25 Jan Hubicka <hubicka@ucw.cz>
10425 * lto-section-out.c (lto_begin_section): Do not print section
10426 name for noaddr and unnumbered dumps.
10428 2018-06-25 Richard Biener <rguenther@suse.de>
10430 * tree-vectorizer.h (struct vec_info_shared): New structure
10431 with parts split out from struct vec_info and loop_nest from
10432 struct _loop_vec_info.
10433 (struct vec_info): Adjust accordingly.
10434 (struct _loop_vec_info): Likewise.
10435 (LOOP_VINFO_LOOP_NEST): Adjust.
10436 (LOOP_VINFO_DATAREFS): Likewise.
10437 (LOOP_VINFO_DDRS): Likewise.
10438 (struct _bb_vec_info): Likewise.
10439 (BB_VINFO_DATAREFS): Likewise.
10440 (BB_VINFO_DDRS): Likewise.
10441 (struct _stmt_vec_info): Add dr_aux member.
10442 (DR_VECT_AUX): Adjust to refer to member of DR_STMTs vinfo.
10443 (DR_MISALIGNMENT_UNINITIALIZED): New.
10444 (set_dr_misalignment): Adjust.
10445 (dr_misalignment): Assert misalign isn't DR_MISALIGNMENT_UNINITIALIZED.
10446 (vect_analyze_loop): Adjust prototype.
10447 (vect_analyze_loop_form): Likewise.
10448 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
10449 Compute dependences lazily.
10450 (vect_record_base_alignments): Use shared datarefs/ddrs.
10451 (vect_verify_datarefs_alignment): Likewise.
10452 (vect_analyze_data_refs_alignment): Likewise.
10453 (vect_analyze_data_ref_accesses): Likewise.
10454 (vect_analyze_data_refs): Likewise.
10455 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Add
10456 constructor parameter for shared part.
10457 (vect_analyze_loop_form): Pass in shared part and adjust.
10458 (vect_analyze_loop_2): Pass in storage for the number of
10459 stmts. Move loop nest finding to the caller. Compute
10461 (vect_analyze_loop): Pass in shared part.
10462 (vect_transform_loop): Verify shared datarefs are unchanged.
10463 * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Add
10464 constructor parameter for shared part.
10465 (vect_slp_analyze_bb_1): Pass in shared part and adjust.
10466 (vect_slp_bb): Verify shared datarefs are unchanged before
10468 * tree-vect-stmts.c (ensure_base_align): Adjust for DR_AUX
10470 (new_stmt_vec_info): Initialize DR_AUX misalignment to
10471 DR_MISALIGNMENT_UNINITIALIZED.
10472 * tree-vectorizer.c (vec_info::vec_info): Add constructor
10473 parameter for shared part.
10474 (vec_info::~vec_info): Adjust.
10475 (vec_info_shared::vec_info_shared): New.
10476 (vec_info_shared::~vec_info_shared): Likewise.
10477 (vec_info_shared::save_datarefs): Likewise.
10478 (vec_info_shared::check_datarefs): Likewise.
10479 (try_vectorize_loop_1): Construct shared part live for analyses
10480 of a single loop for multiple vector sizes.
10481 * tree-parloops.c (gather_scalar_reductions): Adjust.
10483 2018-06-25 Richard Biener <rguenther@suse.de>
10485 * tree-vect-data-refs.c (vect_find_stmt_data_reference): Modify
10486 DR for SIMD lane accesses here and mark DR with (void *)-1 aux.
10487 (vect_analyze_data_refs): Remove similar code from here and
10488 simplify accordingly.
10490 2018-06-25 Richard Biener <rguenther@suse.de>
10492 * tree-vect-data-refs.c (vect_check_gather_scatter): Fail
10493 for reverse storage order accesses rather than asserting
10494 they cannot happen here.
10496 2018-06-25 Tom de Vries <tdevries@suse.de>
10499 * config/i386/i386.md (define_insn "*tls_global_dynamic_64_<mode>"):
10500 Use data16 instead of .byte for insn prefix.
10502 2018-06-25 Andreas Krebbel <krebbel@linux.ibm.com>
10505 * parser.c (make_char_string_pack): Pass this literal chars
10506 through cpp_interpret_string.
10507 (cp_parser_userdef_numeric_literal): Check the result of
10508 make_char_string_pack.
10510 2018-06-24 Maya Rashish <coypu@sdf.org>
10512 * ginclude/stddef.h: Simplify conditions around avoiding
10513 re-definition of __size_t.
10515 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
10517 * lto-streamer-out.c (tree_is_indexable): Make LABEL_DECL nonindexable
10518 unless it is forced or nonlocal; assert that we stream no IMPORTED_DECL.
10520 2018-06-22 Maya Rashish <coypu@sdf.org>
10522 * doc/invoke.texi (mno-fancy-math-387): Update for changes
10523 made to OpenBSD and NetBSD through the years.
10525 2018-06-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
10527 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
10528 behavior of vec_pack (vector double, vector double) to match
10529 behavior of vec_float2 (vector double, vector double).
10531 2018-06-22 Olivier Hainque <hainque@adacore.com>
10533 * gimplify.c (gimplify_function_tree): Prevent creation
10534 of a trampoline for the address of the current function
10535 passed to entry/exit instrumentation hooks.
10537 2018-06-22 Aaron Sawdey <acsawdey@linux.ibm.com>
10540 * config/rs6000/rs6000-string.c (expand_strn_compare): Handle -m32
10543 2018-06-22 Martin Liska <mliska@suse.cz>
10545 PR tree-optimization/86263
10546 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
10547 Bail out if is_enabled is false.
10548 * tree-switch-conversion.h (jump_table_cluster::is_enabled):
10550 (jump_table_cluster::is_enabled): New function.
10552 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
10554 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
10555 BINFO_BASE_ACCESSES and BINFO_VPTR_FIELD.
10556 * tree-streamer-in.c (streamer_read_tree_bitfields): Likewise.
10557 (lto_input_ts_binfo_tree_pointers): Likewise.
10558 * tree-streamer-out.c (streamer_write_tree_bitfields,
10559 write_ts_binfo_tree_pointers): Likewise.
10560 * tree.c (free_lang_data_in_binfo): Clear BINFO_VPTR_FIELD.
10562 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
10564 * tree.c (free_lang_data_in_type): Free all TYPE_VFIELDs.
10566 2018-06-22 Martin Liska <mliska@suse.cz>
10568 * symbol-summary.h (get): Make it pure and inline move
10569 functionality from ::get function.
10570 (get): Remove and inline into ::get and ::get_create.
10571 (get_create): Move code from ::get function.
10573 2018-06-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
10576 * config/i386/sol2.h (CPP_SPEC): Don't pass -P for
10577 -x assembler-with-cpp.
10579 2018-06-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
10581 * config/sol2.h (TARGET_OS_CPP_BUILTINS): Define
10582 _FILE_OFFSET_BITS=64 for C++.
10584 2018-06-21 Michael Meissner <meissner@linux.ibm.com>
10586 * config/rs6000/rs6000.md (extendtfif2): Add missing 128-bit
10587 conversion insn that shows up when pr85657-3.c is compiled using
10588 IEEE 128-bit long double.
10589 (neg<mode>2_internal): Use the correct mode to check whether the
10590 mode is IBM extended.
10591 * config/rs6000/rs6000.c (init_float128_ieee): Prevent complex
10592 multiply and divide external functions from being created more
10595 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
10597 * cfgrtl.c (fixup_reorder_chain): Do not emit NOPs in DECL_IGNORED_P
10599 (rtl_merge_blocks): Likewise. Do not emit a NOP if the location of
10600 the edge can be forwarded.
10601 (cfg_layout_merge_blocks): Likewise.
10603 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
10605 * except.c (finish_eh_generation): Commit edge insertions only after
10606 the EH edges have been redirected from post-landing to landing pads.
10608 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
10610 * tree-nested.c (get_frame_type): Use create_tmp_var_raw instead of
10611 create_tmp_var_for to create the FRAME decl.
10612 (finalize_nesting_tree_1): Do not unchain the FRAME decl.
10614 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
10616 * tree-inline.c (copy_edges_for_bb): Minor tweak.
10617 (maybe_move_debug_stmts_to_successors): Also reset the locus of the
10618 debug statement when resetting its value.
10619 (expand_call_inline): Copy the locus of the call onto the assignment
10620 of the return value, if any. Use local variable in more cases.
10622 2018-06-21 Martin Liska <mliska@suse.cz>
10624 * ipa-pure-const.c (propagate_nothrow): Use
10625 funct_state_summaries->get.
10626 (dump_malloc_lattice): Likewise.
10627 (propagate_malloc): Likewise.
10629 2018-06-21 Richard Biener <rguenther@suse.de>
10631 * lto-streamer-out.c (DFS::DFS_write_tree_body): Update outdated
10632 comment. Follow BLOCK_ABSTRACT_ORIGIN unconditionally.
10633 * tree-streamer-in.c (lto_input_ts_block_tree_pointers): Update
10635 * tree-streamer-out.c (write_ts_block_tree_pointers): Stream
10636 BLOCK_ABSTRACT_ORIGIN unconditionally.
10638 2018-06-21 David Malcolm <dmalcolm@redhat.com>
10640 * ipa-cp.c (ipcp_driver): Set edge_clone_summaries to NULL after
10642 * ipa-reference.c (ipa_reference_c_finalize): Delete
10643 ipa_ref_opt_sum_summaries and set it to NULL.
10645 2018-06-21 Tom de Vries <tdevries@suse.de>
10647 PR tree-optimization/85859
10648 * tree-ssa-tail-merge.c (stmt_local_def): Copy gimple_is_call
10649 test with comment from bb_no_side_effects_p.
10651 2018-06-21 Richard Biener <rguenther@suse.de>
10653 PR tree-optimization/86232
10654 * tree-ssa-loop-niter.c (number_of_iterations_popcount): Adjust
10655 max for constant niter.
10657 2018-06-21 Andre Vieira <andre.simoesdiasvieira@arm.com>
10659 * config/aarch64/aarch64-simd.md
10660 (*aarch64_crypto_aes<aes_op>v16qi_xor_combine): New.
10662 2018-06-21 Andre Vieira <andre.simoesdiasvieira@arm.com>
10664 * config/aarch64/aarch64-simd.md (aarch64_crypto_aes<aes_op>v16qi):
10665 Make opernads of the unspec commutative.
10667 2018-06-21 Richard Biener <rguenther@suse.de>
10669 * tree-data-ref.c (dr_step_indicator): Handle NULL DR_STEP.
10670 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr):
10671 Avoid calling vect_mark_for_runtime_alias_test with gathers or scatters.
10672 (vect_analyze_data_ref_dependence): Re-order checks to deal with
10674 (vect_record_base_alignments): Do not record base alignment
10675 for gathers or scatters.
10676 (vect_compute_data_ref_alignment): Drop return value that is always
10677 true. Bail out early for gathers or scatters.
10678 (vect_enhance_data_refs_alignment): Bail out early for gathers
10680 (vect_find_same_alignment_drs): Likewise.
10681 (vect_analyze_data_refs_alignment): Remove dead code.
10682 (vect_slp_analyze_and_verify_node_alignment): Likewise.
10683 (vect_analyze_data_refs): For possible gathers or scatters do
10684 not create an alternate DR, just check their possible validity
10685 and mark them. Adjust DECL_NONALIASED handling to not rely
10686 on DR_BASE_ADDRESS.
10687 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Do not
10688 update inits of gathers or scatters.
10689 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern):
10690 Also copy gather/scatter flag to pattern vinfo.
10692 2018-06-20 Kelvin Nilsen <kelvin@gcc.gnu.org>
10694 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
10695 behavior of vec_packsu (vector unsigned long long, vector unsigned
10696 long long) to match behavior of vec_packs with same signature.
10698 2018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
10699 Thomas Schwinge <thomas@codesourcery.com>
10700 Cesar Philippidis <cesar@codesourcery.com>
10702 * gimplify.c (gimplify_scan_omp_clauses): Add support for
10703 OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
10704 (gimplify_adjust_omp_clauses): Likewise.
10705 (gimplify_oacc_declare_1): Add support for GOMP_MAP_RELEASE, remove
10706 support for GOMP_MAP_FORCE_{ALLOC,TO,FROM,TOFROM}.
10707 (gimplify_omp_target_update): Update handling of acc update and
10709 * omp-low.c (install_var_field): Remove unused parameter
10710 base_pointers_restrict.
10711 (scan_sharing_clauses): Remove base_pointers_restrict parameter.
10712 Update call to install_var_field. Handle OMP_CLAUSE_{IF_PRESENT,
10714 (omp_target_base_pointers_restrict_p): Delete.
10715 (scan_omp_target): Update call to scan_sharing_clauses.
10716 * tree-core.h (enum omp_clause_code): Add OMP_CLAUSE_{IF_PRESENT,
10718 * tree-nested.c (convert_nonlocal_omp_clauses): Handle
10719 OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
10720 (convert_local_omp_clauses): Likewise.
10721 * tree-pretty-print.c (dump_omp_clause): Likewise.
10722 * tree.c (omp_clause_num_ops): Add entries for OMP_CLAUSE_{IF_PRESENT,
10724 (omp_clause_code_name): Likewise.
10726 2018-06-20 Jakub Jelinek <jakub@redhat.com>
10729 * var-tracking.c (use_narrower_mode_test): Check if shift amount can
10732 PR tree-optimization/86231
10733 * tree-vrp.c (union_ranges): For ( [ ) ] or ( )[ ] range and
10734 anti-range don't overwrite *vr0min before using it to compute *vr0max.
10736 2018-06-20 Tom de Vries <tdevries@suse.de>
10738 PR tree-optimization/86097
10739 * tree-ssa-loop-manip.c (canonicalize_loop_ivs): Also convert *nit to
10740 iv type if signedness of iv type is not the same as that of *nit.
10742 2018-06-20 Jakub Jelinek <jakub@redhat.com>
10744 * cfgrtl.c (rtl_verify_edges): Formatting fix. If bb->preds has any
10745 EDGE_EH edges, verify they are all EDGE_EH.
10747 2018-06-20 Maya Rashish <coypu@sdf.org>
10749 * ginclude/stddef.h: Limit #include <machine/ansi.h> to NetBSD.
10751 2018-06-20 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
10753 * config/aarch64/aarch64-tuning-flags.def (no_ldp_stp_qregs): New.
10754 * config/aarch64/aarch64.c (xgene1_tunings): Add
10755 AARCH64_EXTRA_TUNE_NO_LDP_STP_QREGS to tune_flags.
10756 (aarch64_mode_valid_for_sched_fusion_p):
10757 Allow 16-byte modes.
10758 (aarch64_classify_address): Allow 16-byte modes for load_store_pair_p.
10759 * config/aarch64/aarch64-ldpstp.md: Add peepholes for LDP STP of
10761 * config/aarch64/aarch64-simd.md (load_pair<VQ:mode><VQ2:mode>):
10763 (vec_store_pair<VQ:mode><VQ2:mode>): Likewise.
10764 * config/aarch64/iterators.md (VQ2): New mode iterator.
10766 2018-06-20 Martin Liska <mliska@suse.cz>
10768 * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
10769 Change default ratio from 10 to 8.
10771 2018-06-20 Martin Liska <mliska@suse.cz>
10773 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
10775 (bit_test_cluster::find_bit_tests): Likewise.
10776 (switch_decision_tree::analyze_switch_statement): Find clusters.
10777 * tree-switch-conversion.h (struct jump_table_cluster): Document
10780 2018-06-20 Martin Liska <mliska@suse.cz>
10782 * tree-switch-conversion.c (switch_conversion::collect):
10783 Record m_uniq property.
10784 (switch_conversion::expand): Bail out for special conditions.
10785 (group_cluster::~group_cluster): New.
10786 (group_cluster::group_cluster): Likewise.
10787 (group_cluster::dump): Likewise.
10788 (jump_table_cluster::emit): New.
10789 (switch_decision_tree::fix_phi_operands_for_edges): New.
10790 (struct case_node): Remove struct.
10791 (jump_table_cluster::can_be_handled): New.
10792 (case_values_threshold): Moved to header.
10793 (reset_out_edges_aux): Likewise.
10794 (jump_table_cluster::is_beneficial): New.
10795 (bit_test_cluster::can_be_handled): Likewise.
10796 (add_case_node): Remove.
10797 (bit_test_cluster::is_beneficial): New.
10798 (case_bit_test::cmp): New.
10799 (bit_test_cluster::emit): New.
10800 (expand_switch_as_decision_tree_p): Remove.
10801 (bit_test_cluster::hoist_edge_and_branch_if_true): New.
10802 (fix_phi_operands_for_edge): Likewise.
10803 (switch_decision_tree::analyze_switch_statement): New.
10804 (compute_cases_per_edge): Move ...
10805 (switch_decision_tree::compute_cases_per_edge): ... here.
10806 (try_switch_expansion): Likewise.
10807 (switch_decision_tree::try_switch_expansion): Likewise.
10808 (record_phi_operand_mapping): Likewise.
10809 (switch_decision_tree::record_phi_operand_mapping): Likewise.
10810 (emit_case_decision_tree): Likewise.
10811 (switch_decision_tree::emit): Likewise.
10812 (balance_case_nodes): Likewise.
10813 (switch_decision_tree::balance_case_nodes): Likewise.
10814 (dump_case_nodes): Likewise.
10815 (switch_decision_tree::dump_case_nodes): Likewise.
10816 (emit_jump): Likewise.
10817 (switch_decision_tree::emit_jump): Likewise.
10818 (emit_cmp_and_jump_insns): Likewise.
10819 (switch_decision_tree::emit_cmp_and_jump_insns): Likewise.
10820 (emit_case_nodes): Likewise.
10821 (switch_decision_tree::emit_case_nodes): Likewise.
10822 (conditional_probability): Remove.
10823 * tree-switch-conversion.h (enum cluster_type): New.
10825 (struct cluster): Likewise.
10826 (cluster::cluster): Likewise.
10827 (struct simple_cluster): Likewise.
10828 (simple_cluster::simple_cluster): Likewise.
10829 (struct group_cluster): Likewise.
10830 (struct jump_table_cluster): Likewise.
10831 (struct bit_test_cluster): Likewise.
10832 (struct min_cluster_item): Likewise.
10833 (struct case_tree_node): Likewise.
10834 (case_tree_node::case_tree_node): Likewise.
10835 (jump_table_cluster::case_values_threshold): Likewise.
10836 (struct case_bit_test): Likewise.
10837 (struct switch_decision_tree): Likewise.
10838 (struct switch_conversion): Likewise.
10839 (switch_decision_tree::reset_out_edges_aux): Likewise.
10841 2018-06-20 Martin Liska <mliska@suse.cz>
10843 * tree-switch-conversion.c (MAX_CASE_BIT_TESTS): Remove.
10844 (hoist_edge_and_branch_if_true): Likewise.
10845 (expand_switch_using_bit_tests_p): Likewise.
10846 (struct case_bit_test): Likewise.
10847 (case_bit_test_cmp): Likewise.
10848 (emit_case_bit_tests): Likewise.
10849 (switch_conversion::switch_conversion): New class.
10850 (struct switch_conv_info): Remove old struct.
10851 (collect_switch_conv_info): More to ...
10852 (switch_conversion::collect): ... this.
10853 (check_range): Likewise.
10854 (switch_conversion::check_range): Likewise.
10855 (check_all_empty_except_final): Likewise.
10856 (switch_conversion::check_all_empty_except_final): Likewise.
10857 (check_final_bb): Likewise.
10858 (switch_conversion::check_final_bb): Likewise.
10859 (create_temp_arrays): Likewise.
10860 (switch_conversion::create_temp_arrays): Likewise.
10861 (free_temp_arrays): Likewise.
10862 (gather_default_values): Likewise.
10863 (switch_conversion::gather_default_values): Likewise.
10864 (build_constructors): Likewise.
10865 (switch_conversion::build_constructors): Likewise.
10866 (constructor_contains_same_values_p): Likewise.
10867 (switch_conversion::contains_same_values_p): Likewise.
10868 (array_value_type): Likewise.
10869 (switch_conversion::array_value_type): Likewise.
10870 (build_one_array): Likewise.
10871 (switch_conversion::build_one_array): Likewise.
10872 (build_arrays): Likewise.
10873 (switch_conversion::build_arrays): Likewise.
10874 (gen_def_assigns): Likewise.
10875 (switch_conversion::gen_def_assigns): Likewise.
10876 (prune_bbs): Likewise.
10877 (switch_conversion::prune_bbs): Likewise.
10878 (fix_phi_nodes): Likewise.
10879 (switch_conversion::fix_phi_nodes): Likewise.
10880 (gen_inbound_check): Likewise.
10881 (switch_conversion::gen_inbound_check): Likewise.
10882 (process_switch): Use the newly created class.
10883 (switch_conversion::expand): New.
10884 (switch_conversion::~switch_conversion): New.
10885 * tree-switch-conversion.h: New file.
10887 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
10889 * tree-vectorizer.h (NUM_PATTERNS, vect_recog_func_ptr): Move to
10890 tree-vect-patterns.c.
10891 * tree-vect-patterns.c (vect_supportable_direct_optab_p): New function.
10892 (vect_recog_dot_prod_pattern): Use it. Remove the type_in argument.
10893 (vect_recog_sad_pattern): Likewise.
10894 (vect_recog_widen_sum_pattern): Likewise.
10895 (vect_recog_pow_pattern): Likewise. Check for a null vectype.
10896 (vect_recog_widen_shift_pattern): Remove the type_in argument.
10897 (vect_recog_rotate_pattern): Likewise.
10898 (vect_recog_mult_pattern): Likewise.
10899 (vect_recog_vector_vector_shift_pattern): Likewise.
10900 (vect_recog_divmod_pattern): Likewise.
10901 (vect_recog_mixed_size_cond_pattern): Likewise.
10902 (vect_recog_bool_pattern): Likewise.
10903 (vect_recog_mask_conversion_pattern): Likewise.
10904 (vect_try_gather_scatter_pattern): Likewise.
10905 (vect_recog_widen_mult_pattern): Likewise. Check for a null vectype.
10906 (vect_recog_over_widening_pattern): Likewise.
10907 (vect_recog_gather_scatter_pattern): Likewise.
10908 (vect_recog_func_ptr): Move from tree-vectorizer.h
10909 (vect_vect_recog_func_ptrs): Move further down the file.
10910 (vect_recog_func): Likewise. Remove the third argument.
10911 (NUM_PATTERNS): Define based on vect_vect_recog_func_ptrs.
10912 (vect_pattern_recog_1): Expect the pattern function to do any
10913 necessary target tests. Also expect it to provide a vector type.
10914 Remove the type_in handling.
10916 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
10918 * tree-vect-patterns.c (vect_pattern_detected): New function.
10919 (vect_recog_dot_prod_patternm, vect_recog_sad_pattern)
10920 (vect_recog_widen_mult_pattern, vect_recog_widen_sum_pattern)
10921 (vect_recog_over_widening_pattern, vect_recog_widen_shift_pattern
10922 (vect_recog_rotate_pattern, vect_recog_vector_vector_shift_pattern)
10923 (vect_recog_mult_pattern, vect_recog_divmod_pattern)
10924 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
10925 (vect_recog_mask_conversion_pattern)
10926 (vect_try_gather_scatter_pattern): Likewise.
10928 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
10930 * tree-vect-patterns.c (vect_get_internal_def): New function.
10931 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
10932 (vect_recog_vector_vector_shift_pattern, check_bool_pattern)
10933 (search_type_for_mask_1): Use it.
10935 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
10937 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
10938 redundant WIDEN_SUM_EXPR handling.
10939 (vect_recog_sad_pattern): Likewise.
10941 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
10943 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
10944 redundant check that the types of a PLUS_EXPR or MULT_EXPR agree.
10945 (vect_recog_sad_pattern): Likewise PLUS_EXPR, ABS_EXPR and MINUS_EXPR.
10946 (vect_recog_widen_mult_pattern): Likewise MULT_EXPR.
10947 (vect_recog_widen_sum_pattern): Likewise PLUS_EXPR.
10949 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
10951 * tree-vect-stmts.c (vectorizable_call): Make sure that we
10952 use the stmt_vec_info of the original bb statement for the
10953 new zero assignment, even if the call is part of a pattern.
10955 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
10957 * tree-vectorizer.h (_stmt_vec_info): Note above pattern_def_seq
10958 that the sequence is attached to the original statement rather
10959 than the pattern statement.
10960 * tree-vect-loop.c (vect_determine_vf_for_stmt): Take the
10961 PATTERN_DEF_SEQ from the original statement rather than
10962 the main pattern statement.
10963 * tree-vect-stmts.c (free_stmt_vec_info): Likewise.
10964 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Likewise.
10965 (vect_mark_pattern_stmts): Don't copy the PATTERN_DEF_SEQ.
10967 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
10969 * tree-vect-stmts.c (vect_analyze_stmt): Move the handling of pattern
10970 definition statements before the early exit for statements that aren't
10972 * tree-vect-loop.c (vect_transform_loop_stmt): New function,
10974 (vect_transform_loop): ...here. Process pattern definition
10975 statements without first checking whether the main pattern
10976 statement is live or relevant.
10978 2018-06-19 Eric Botcazou <ebotcazou@adacore.com>
10980 * tree-cfgcleanup.c (tree_forwarder_block_p): Do not return false at
10981 -O0 if the locus represent UNKNOWN_LOCATION but have different values.
10983 2018-06-19 Aaron Sawdey <acsawdey@linux.ibm.com>
10985 * config/rs6000/rs6000-string.c (select_block_compare_mode): Check
10986 TARGET_EFFICIENT_OVERLAPPING_UNALIGNED here instead of in caller.
10987 (do_and3, do_and3_mask, do_compb3, do_rotl3): New functions.
10988 (expand_block_compare): Change select_block_compare_mode call.
10989 (expand_strncmp_align_check): Use new functions, fix comment.
10990 (emit_final_str_compare_gpr): New function.
10991 (expand_strn_compare): Refactor and clean up code.
10992 * config/rs6000/vsx.md (vsx_mov<mode>_64bit): Remove *.
10994 2018-06-19 Tony Reix <tony.reix@atos.com>
10995 Damien Bergamini <damien.bergamini@atos.com>
10996 David Edelsohn <dje.gcc@gmail.com>
10998 * collect2.c (static_obj): New variable.
10999 (static_libs): New variable.
11000 (is_in_list): Uncomment declaration.
11001 (main): Track AIX libraries linked statically.
11002 (is_in_list): Uncomment definition.
11003 (scan_prog_file): Don't add AIX shared libraries initializer
11004 to constructor list if linking statically.
11006 2018-06-19 Max Filippov <jcmvbkbc@gmail.com>
11008 * config/xtensa/xtensa.md (UNSPEC_FRAME_BLOCKAGE): New unspec
11010 (allocate_stack, frame_blockage, *frame_blockage): New patterns.
11012 2018-06-19 Jan Hubicka <hubicka@ucw.cz>
11014 * tree.c (find_decls_types_r): Remove all non-VAR_DECLs from
11017 2018-06-19 Martin Liska <mliska@suse.cz>
11019 * config/i386/i386.c (ix86_can_inline_p): Do not use
11020 ipa_fn_summaries::get_create.
11021 * ipa-cp.c (ipcp_cloning_candidate_p): Replace get_create with
11023 (devirtualization_time_bonus): Likewise.
11024 (ipcp_propagate_stage): Likewise.
11025 * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
11026 (edge_set_predicate): Likewise.
11027 (evaluate_conditions_for_known_args): Likewise.
11028 (evaluate_properties_for_edge): Likewise.
11029 (ipa_call_summary::reset): Tranform to ...
11030 (ipa_call_summary::~ipa_call_summary): ... this.
11031 (ipa_fn_summary::reset): Transform to ...
11032 (ipa_fn_summary::~ipa_fn_summary): ... this.
11033 (ipa_fn_summary_t::remove): Rename to ...
11034 (ipa_fn_summary_t::remove_callees): ... this.
11035 (ipa_fn_summary_t::duplicate): Use placement new
11036 instead of memory copy.
11037 (ipa_call_summary_t::duplicate): Likewise.
11038 (ipa_call_summary_t::remove): Remove.
11039 (dump_ipa_call_summary): Change get_create to get.
11040 (ipa_dump_fn_summary): Dump only when summary exists.
11041 (analyze_function_body): Use symbol_summary::get instead
11043 (compute_fn_summary): Likewise.
11044 (estimate_edge_devirt_benefit): Likewise.
11045 (estimate_edge_size_and_time): Likewise.
11046 (inline_update_callee_summaries): Likewise.
11047 (remap_edge_change_prob): Likewise.
11048 (remap_edge_summaries): Likewise.
11049 (ipa_merge_fn_summary_after_inlining): Likewise.
11050 (write_ipa_call_summary): Likewise.
11051 (ipa_fn_summary_write): Likewise.
11052 (ipa_free_fn_summary): Likewise.
11053 * ipa-fnsummary.h (struct GTY): Add new ctor and copy ctor.
11054 (struct ipa_call_summary): Likewise.
11055 * ipa-icf.c (sem_function::merge): Use symbol_summary::get instead
11057 * ipa-inline-analysis.c (do_estimate_edge_time): Likewise.
11058 (estimate_size_after_inlining): Likewise.
11059 (estimate_growth): Likewise.
11060 (growth_likely_positive): Likewise.
11061 * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
11062 (inline_call): Likewise.
11063 * ipa-inline.c (caller_growth_limits): Likewise.
11064 (can_inline_edge_p): Likewise.
11065 (can_inline_edge_by_limits_p): Likewise.
11066 (compute_uninlined_call_time): Likewise.
11067 (compute_inlined_call_time): Likewise.
11068 (want_inline_small_function_p): Likewise.
11069 (edge_badness): Likewise.
11070 (update_caller_keys): Likewise.
11071 (update_callee_keys): Likewise.
11072 (inline_small_functions): Likewise.
11073 (inline_to_all_callers_1): Likewise.
11074 (dump_overall_stats): Likewise.
11075 (early_inline_small_functions): Likewise.
11076 (early_inliner): Likewise.
11077 * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
11078 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
11079 * ipa-pure-const.c (malloc_candidate_p): Likewise.
11080 * ipa-split.c (execute_split_functions): Likewise.
11081 * symbol-summary.h: Likewise.
11082 * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
11084 2018-06-19 Richard Biener <rguenther@suse.de>
11086 * tree-vectorizer.c (try_vectorize_loop_1): Split out of ...
11087 (vectorize_loops): ... here. Fix dbgcnt handling.
11088 (try_vectorize_loop): Wrap try_vectorize_loop_1.
11090 2018-06-19 Segher Boessenkool <segher@kernel.crashing.org>
11093 * config/rs6000/rs6000.md (rs6000_discover_homogeneous_aggregate): An
11094 ieee128 argument takes up only one (vector) register, not two (floating
11097 2018-06-19 Eric Botcazou <ebotcazou@adacore.com>
11099 * gimplify.c (gimplify_init_constructor): Really never clear for an
11100 incomplete constructor if CONSTRUCTOR_NO_CLEARING is set.
11102 2018-06-19 Richard Biener <rguenther@suse.de>
11104 PR tree-optimization/86179
11105 * tree-vect-patterns.c (vect_pattern_recog_1): Clean up
11106 after failed recognition.
11108 2018-06-18 Martin Sebor <msebor@redhat.com>
11110 PR middle-end/85602
11111 * calls.c (maybe_warn_nonstring_arg): Handle strncat.
11112 * tree-ssa-strlen.c (is_strlen_related_p): Make extern.
11113 Handle integer subtraction.
11114 (maybe_diag_stxncpy_trunc): Handle nonstring source arguments.
11115 * tree-ssa-strlen.h (is_strlen_related_p): Declare.
11117 2018-06-18 David Malcolm <dmalcolm@redhat.com>
11119 * config/frv/frv-protos.h (frv_ifcvt_modify_insn): Strengthen 3rd
11120 param from rtx to rtx_insn *.
11121 * config/frv/frv.c (frv_ifcvt_add_insn): Likewise for "insn"
11123 (frv_ifcvt_modify_insn): Likwise.
11124 (frv_ifcvt_modify_final): Likwise for local "existing_insn",
11125 adding an as_a <rtx_insn *> cast. Likewise for local "insn".
11126 * config/mips/mips.c (r10k_insert_cache_barriers): Add an
11127 as_a <rtx_insn *> cast to local "unprotected_region" once
11128 it's been established that it's not NULL or pc_rtx.
11129 * config/nds32/nds32-relax-opt.c (nds32_group_insns): Strengthen
11130 param "sethi" from rtx to rtx_insn *.
11131 (nds32_group_float_insns): Likewise for param "insn".
11132 * config/vax/vax-protos.h (vax_output_int_add): Likewise for 1st
11134 (vax_output_int_subtract): Likewise.
11135 * config/vax/vax.c (vax_output_int_add): Likewise for param
11137 (vax_output_int_subtract): Likewise.
11138 * emit-rtl.c (set_insn_deleted): Likewise, removing cast.
11139 (emit_pattern_after): Likewise for param "after".
11140 (emit_insn_after): Likewise.
11141 (emit_jump_insn_after): Likewise.
11142 (emit_call_insn_after): Likewise.
11143 (emit_debug_insn_after): Likewise.
11144 (emit_pattern_before): Likewise for param "before".
11145 (emit_insn_before): Likewise.
11146 (emit_jump_insn_before): Likewise.
11147 * final.c (get_insn_template): Likewise for param "insn", removing
11149 * output.h (get_insn_template): Likewise for 2nd param.
11150 * rtl.h (emit_insn_before): Likewise.
11151 (emit_jump_insn_before): Likewise.
11152 (emit_debug_insn_before_noloc): Likewise.
11153 (emit_insn_after): Likewise.
11154 (emit_jump_insn_after): Likewise.
11155 (emit_call_insn_after): Likewise.
11156 (emit_debug_insn_after): Likewise.
11157 (set_insn_deleted): Likewise for param.
11159 2018-06-18 Michael Meissner <meissner@linux.ibm.com>
11162 * config/rs6000/rs6000-modes.def (toplevel): Rework the 128-bit
11163 floating point modes, so that IFmode is numerically greater than
11164 TFmode, which is greater than KFmode using FRACTIONAL_FLOAT_MODE
11165 to declare the ordering. This prevents IFmode from being
11166 converted to TFmode when long double is IEEE 128-bit on an ISA 3.0
11167 machine. Include rs6000-modes.h to share the fractional values
11168 between genmodes* and the rest of the compiler.
11169 (IFmode): Likewise.
11170 (KFmode): Likewise.
11171 (TFmode): Likewise.
11172 * config/rs6000/rs6000-modes.h: New file.
11173 * config/rs6000/rs6000.c (rs6000_debug_reg_global): Change the
11174 meaning of rs6000_long_double_size so that 126..128 selects an
11175 appropriate 128-bit floating point type.
11176 (rs6000_option_override_internal): Likewise.
11177 * config/rs6000/rs6000.h (toplevel): Include rs6000-modes.h.
11178 (TARGET_LONG_DOUBLE_128): Change the meaning of
11179 rs6000_long_double_size so that 126..128 selects an appropriate
11180 128-bit floating point type.
11181 (LONG_DOUBLE_TYPE_SIZE): Update comment.
11182 * config/rs6000/rs6000.md (trunciftf2): Correct the modes of the
11183 source and destination to match the standard usage.
11184 (truncifkf2): Likewise.
11185 (copysign<mode>3, IEEE iterator): Rework copysign of float128 on
11186 ISA 2.07 to use an explicit clobber, instead of passing in a
11188 (copysign<mode>3_soft): Likewise.
11190 2018-06-18 David Malcolm <dmalcolm@redhat.com>
11192 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
11193 Replace dump_printf_loc call with DUMP_VECT_SCOPE.
11194 (vect_slp_analyze_instance_dependence): Likewise.
11195 (vect_enhance_data_refs_alignment): Likewise.
11196 (vect_analyze_data_refs_alignment): Likewise.
11197 (vect_slp_analyze_and_verify_instance_alignment
11198 (vect_analyze_data_ref_accesses): Likewise.
11199 (vect_prune_runtime_alias_test_list): Likewise.
11200 (vect_analyze_data_refs): Likewise.
11201 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Likewise.
11202 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
11203 (vect_analyze_scalar_cycles_1): Likewise.
11204 (vect_get_loop_niters): Likewise.
11205 (vect_analyze_loop_form_1): Likewise.
11206 (vect_update_vf_for_slp): Likewise.
11207 (vect_analyze_loop_operations): Likewise.
11208 (vect_analyze_loop): Likewise.
11209 (vectorizable_induction): Likewise.
11210 (vect_transform_loop): Likewise.
11211 * tree-vect-patterns.c (vect_pattern_recog): Likewise.
11212 * tree-vect-slp.c (vect_analyze_slp): Likewise.
11213 (vect_make_slp_decision): Likewise.
11214 (vect_detect_hybrid_slp): Likewise.
11215 (vect_slp_analyze_operations): Likewise.
11216 (vect_slp_bb): Likewise.
11217 * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Likewise.
11218 (vectorizable_bswap): Likewise.
11219 (vectorizable_call): Likewise.
11220 (vectorizable_simd_clone_call): Likewise.
11221 (vectorizable_conversion): Likewise.
11222 (vectorizable_assignment): Likewise.
11223 (vectorizable_shift): Likewise.
11224 (vectorizable_operation): Likewise.
11225 * tree-vectorizer.h (DUMP_VECT_SCOPE): New macro.
11227 2018-06-18 Martin Sebor <msebor@redhat.com>
11229 PR tree-optimization/81384
11230 * builtin-types.def (BT_FN_SIZE_CONST_STRING_SIZE): New.
11231 * builtins.c (expand_builtin_strnlen): New function.
11232 (expand_builtin): Call it.
11233 (fold_builtin_n): Avoid setting TREE_NO_WARNING.
11234 * builtins.def (BUILT_IN_STRNLEN): New.
11235 * calls.c (maybe_warn_nonstring_arg): Handle BUILT_IN_STRNLEN.
11236 Warn for bounds in excess of maximum object size.
11237 * tree-ssa-strlen.c (maybe_set_strlen_range): Return tree representing
11238 single-value ranges. Handle strnlen.
11239 (handle_builtin_strlen): Handle strnlen.
11240 (strlen_check_and_optimize_stmt): Same.
11241 * doc/extend.texi (Other Builtins): Document strnlen.
11243 2018-06-18 Maya Rashish <coypu@sdf.org>
11245 * config/alpha/openbsd.h (TARGET_DEFAULT): Define.
11246 (LINK_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): Likewise.
11247 (INTMAX_TYPE, UINTMAX_TYPE, WINT_TYPE): Likewise.
11249 * config/alpha/elf.h (STARTFILE_SPEC, ENDFILE_SPEC): Move from
11251 * config/alpha/linux.h (STARTFILE_SPEC, ENDFILE_SPEC): Here.
11253 2018-06-18 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
11255 * tree.c (escaped_string::escape): Replace cast to char * by
11256 const_cast<char *> (unescaped).
11258 2018-06-18 Nick Clifton <nickc@redhat.com>
11261 * tree.c (escaped_string): New class. Converts an unescaped
11262 string into its escaped equivalent.
11263 (warn_deprecated_use): Use the new class to convert the
11264 deprecation message, if present.
11265 (test_escaped_strings): New self test.
11266 (test_c_tests): Add test_escaped_strings.
11267 * doc/extend.texi (deprecated): Add a note that the
11268 deprecation message is affected by the -fmessage-length
11269 option, and that control characters will be escaped.
11270 (#pragma GCC error): Document this pragma.
11271 (#pragma GCC warning): Likewise.
11272 * doc/invoke.texi (-fmessage-length): Document this option's
11273 effect on the #warning and #error preprocessor directives and
11274 the deprecated attribute.
11276 2018-06-18 Eric Botcazou <ebotcazou@adacore.com>
11278 * tree.c (decl_value_expr_lookup): Revert latest change.
11279 (decl_value_expr_insert): Likewise.
11281 2018-06-17 Eric Botcazou <ebotcazou@adacore.com>
11283 * gimplify.c (nonlocal_vlas): Delete.
11284 (nonlocal_vla_vars): Likewise.
11285 (gimplify_var_or_parm_decl): Do not add debug VAR_DECLs for non-local
11287 (gimplify_body): Do not create and destroy nonlocal_vlas.
11288 * tree-nested.c: Include diagnostic.h.
11289 (use_pointer_in_frame): Tweak.
11290 (lookup_field_for_decl): Add assertion and declare the transformation.
11291 (convert_nonlocal_reference_op) <PARM_DECL>: Rework and issue an
11292 internal error when the reference is in a wrong context. Do not
11293 create a debug decl by default.
11294 (note_nonlocal_block_vlas): Delete.
11295 (convert_nonlocal_reference_stmt) <GIMPLE_BIND>: Do not call it.
11296 (convert_local_reference_op) <PARM_DECL>: Skip the frame decl. Do not
11297 create a debug decl by default.
11298 (convert_gimple_call) <GIMPLE_CALL>: Issue an internal error when the
11299 call is in a wrong context.
11300 (fixup_vla_decls): New function.
11301 (finalize_nesting_tree_1): Adjust comment. Call fixup_vla_decls if no
11302 debug variables were created.
11303 * tree.c (decl_value_expr_lookup): Add checking assertion.
11304 (decl_value_expr_insert): Likewise.
11306 2018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
11308 PR middle-end/82479
11309 * ipa-fnsummary.c (will_be_nonconstant_expr_predicate): Handle CALL_EXPR.
11310 * tree-scalar-evolution.c (interpret_expr): Likewise.
11311 (expression_expensive_p): Likewise.
11312 * tree-ssa-loop-ivopts.c (contains_abnormal_ssa_name_p): Likewise.
11313 * tree-ssa-loop-niter.c (number_of_iterations_popcount): New.
11314 (number_of_iterations_exit_assumptions): Use number_of_iterations_popcount.
11315 (ssa_defined_by_minus_one_stmt_p): New.
11317 2018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
11319 PR middle-end/64946
11320 * cfgexpand.c (expand_debug_expr): Hande ABSU_EXPR.
11321 * config/i386/i386.c (ix86_add_stmt_cost): Likewise.
11322 * dojump.c (do_jump): Likewise.
11323 * expr.c (expand_expr_real_2): Check operand type's sign.
11324 * fold-const.c (const_unop): Handle ABSU_EXPR.
11325 (fold_abs_const): Likewise.
11326 * gimple-pretty-print.c (dump_unary_rhs): Likewise.
11327 * gimple-ssa-backprop.c (backprop::process_assign_use): Likesie.
11328 (strip_sign_op_1): Likesise.
11329 * match.pd: Add new pattern to generate ABSU_EXPR.
11330 * optabs-tree.c (optab_for_tree_code): Handle ABSU_EXPR.
11331 * tree-cfg.c (verify_gimple_assign_unary): Likewise.
11332 * tree-eh.c (operation_could_trap_helper_p): Likewise.
11333 * tree-inline.c (estimate_operator_cost): Likewise.
11334 * tree-pretty-print.c (dump_generic_node): Likewise.
11335 * tree-vect-patterns.c (vect_recog_sad_pattern): Likewise.
11336 * tree.def (ABSU_EXPR): New.
11338 2018-06-16 Jakub Jelinek <jakub@redhat.com>
11340 PR middle-end/86095
11341 * common.opt (Wunsafe-loop-optimizations): Add Ignore, remove Var,
11342 documented as preserved for backward compatibility only.
11343 * doc/invoke.texi: Remove -Wunsafe-loop-optimizations documentation.
11345 PR rtl-optimization/86108
11346 * bb-reorder.c (create_forwarder_block): Renamed to ...
11347 (create_eh_forwarder_block): ... this. Split OLD_BB after labels and
11348 jump from new landing pad to the second part.
11349 (sjlj_fix_up_crossing_landing_pad, dw2_fix_up_crossing_landing_pad):
11352 2018-06-15 Jakub Jelinek <jakub@redhat.com>
11354 PR middle-end/85878
11355 * expr.c (expand_assignment): Remove now redundant COMPLEX_MODE_P
11356 check from first store_expr, use to_mode instead of GET_MODE (to_rtx).
11357 Only call store_expr for halves if the mode is the same.
11359 PR middle-end/86123
11360 * match.pd ((X / Y) == 0 -> X < Y): Don't transform complex divisions.
11361 Fix up comment formatting.
11363 2018-06-15 Bernd Edlinger <bernd.edlinger@hotmail.de>
11365 * typed-splay-tree.h (typed_splay_tree::remove): New function.
11366 (typed_splay_tree::closure,
11367 typed_splay_tree::inner_foreach_fn, typed_splay_tree::m_inner): Deleted.
11368 (typed_splay_tree::typed_splay_tree,
11369 typed_splay_tree::operator =): Declared private.
11370 (typed_splay_tree::splay_tree_key, typed_splay_tree::splay_tree_value,
11371 typed_splay_tree::splay_tree_node_s, typed_splay_tree::KDEL,
11372 typed_splay_tree::VDEL, typed_splay_tree::splay_tree_delete_helper,
11373 typed_splay_tree::rotate_left, typed_splay_tree::rotate_right,
11374 typed_splay_tree::splay_tree_splay,
11375 typed_splay_tree::splay_tree_foreach_helper,
11376 typed_splay_tree::splay_tree_insert,
11377 typed_splay_tree::splay_tree_remove,
11378 typed_splay_tree::splay_tree_lookup,
11379 typed_splay_tree::splay_tree_predecessor,
11380 typed_splay_tree::splay_tree_successor,
11381 typed_splay_tree::splay_tree_min,
11382 typed_splay_tree::splay_tree_max): Took over from splay-tree.c/.h.
11383 (typed_splay_tree::root, typed_splay_tree::comp,
11384 typed_splay_tree::delete_key,
11385 typed_splay_tree::delete_value): New data members.
11386 * typed-splay-tree.c (selftest::test_str_to_int): Add a test for
11387 typed_splay_tree::remove.
11389 2018-06-15 Matthew Fortune <matthew.fortune@mips.com>
11391 * config/mips/mips.h (ASM_SPEC): Pass through -mcrc, -mno-crc,
11392 -mginv and -mno-ginv to the assembler.
11393 * config/mips/mips.opt (-mcrc): New option.
11394 (-mginv): Likewise.
11395 * doc/invoke.text (-mcrc): Document.
11396 (-mginv): Likewise.
11398 2018-06-15 Nick Clifton <nickc@redhat.com>
11401 * tree.c (escaped_string): New class. Converts an unescaped
11402 string into its escaped equivalent.
11403 (warn_deprecated_use): Use the new class to convert the
11404 deprecation message, if present.
11405 (test_escaped_strings): New self test.
11406 (test_c_tests): Add test_escaped_strings.
11407 * doc/extend.texi (deprecated): Add a note that the
11408 deprecation message is affected by the -fmessage-length
11409 option, and that control characters will be escaped.
11410 (#pragma GCC error): Document this pragma.
11411 (#pragma GCC warning): Likewise.
11412 * doc/invoke.texi (-fmessage-length): Document this option's
11413 effect on the #warning and #error preprocessor directives and
11414 the deprecated attribute.
11416 2018-06-15 Richard Biener <rguenther@suse.de>
11418 * tree-vect-slp.c (vect_slp_bb): Dump MSG_OPTIMIZED_LOCATIONS
11419 here, also noting vector size used.
11420 * tree-vectorizer.c (vectorize_loops): Adjust. Note vector
11421 size used in MSG_OPTIMIZED_LOCATIONS dump.
11422 (pass_slp_vectorize::execute): Adjust.
11424 2018-06-15 Claudiu Zissulescu <claziss@synopsys.com>
11427 * config/arc/arc.c (arc_return_address_register): Fix
11430 2018-06-15 Richard Biener <rguenther@suse.de>
11432 PR middle-end/86159
11433 * tree-cfg.c (gimplify_build3): Do not strip sign conversions,
11434 leave useless conversion stripping to force_gimple_operand_gsi.
11435 (gimplify_build2): Likewise.
11436 (gimplify_build1): Likewise.
11438 2018-06-15 Richard Biener <rguenther@suse.de>
11440 PR middle-end/86076
11441 * tree-cfg.c (move_stmt_op): unshare invariant addresses
11442 before adjusting their block.
11444 2018-06-15 Sebastian Huber <sebastian.huber@embedded-brains.de>
11446 * config.gcc (riscv*-*-elf* | riscv*-*-rtems*): Use custom
11447 multilibs for *-*-rtems*.
11448 * config/riscv/t-rtems: New file.
11450 2018-06-14 Jakub Jelinek <jakub@redhat.com>
11452 PR middle-end/86122
11453 * match.pd ((A +- CST1) +- CST2): Punt if last resort
11454 unsigned_type_for returns NULL.
11457 * lower-subreg.c (find_decomposable_subregs): Don't decompose float
11458 subregs of multi-word pseudos unless the float mode has word size.
11460 2018-06-14 Richard Biener <rguenther@suse.de>
11462 PR middle-end/86139
11463 * tree-vect-generic.c (build_word_mode_vector_type): Remove
11464 duplicate and harmful type_hash_canon.
11465 * tree.c (type_hash_canon): Assert we didn't find ourselves.
11467 2018-06-14 Richard Biener <rguenther@suse.de>
11470 * tree-ssa-struct-alias.c (create_variable_info_for): Handle
11473 2018-06-14 Sebastian Huber <sebastian.huber@embedded-brains.de>
11475 * config/rtems.h (STDINT_LONG32): Define.
11477 2018-06-13 Matthew Fortune <matthew.fortune@mips.com>
11478 Prachi Godbole <prachi.godbole@imgtec.com>
11480 * config/mips/mips-cpus.def: Define P6600.
11481 * config/mips/mips-tables.opt: Regenerate.
11482 * config/mips/mips.c (mips_ucbranch_type): New enum.
11483 (mips_rtx_cost_data): Add support for P6600.
11484 (mips_issue_rate): Likewise.
11485 (mips_multipass_dfa_lookahead): Likewise.
11486 (mips_avoid_hazard): Likewise.
11487 (mips_reorg_process_insns): Likewise.
11488 (mips_classify_branch_p6600): New function.
11489 * config/mips/mips.h (TUNE_P6600): New define.
11490 (MIPS_ISA_LEVEL_SPEC): Infer mips64r6 from p6600.
11491 (ENABLE_LD_ST_PAIRS): Enable load/store bonding for p6600.
11492 * config/mips/mips.md: Include p6600.md.
11493 (processor): Add p6600.
11494 * config/mips/p6600.md: New file.
11495 * doc/invoke.texi: Add p6600 to supported architectures.
11497 2018-06-13 Martin Sebor <msebor@redhat.com>
11499 PR tree-optimization/86114
11500 * gimple-fold.c (gimple_fold_builtin_strlen): Only handle LHS
11502 * tree-ssa-strlen.c (maybe_set_strlen_range): Same.
11504 2018-06-13 Richard Biener <rguenther@suse.de>
11506 * tree-vect-patterns.c (vect_recog_vector_vector_shift_pattern):
11507 Properly set vector type of the intermediate stmt.
11508 * tree-vect-stmts.c (vectorizable_operation): The destination
11509 var always has vectype_out type.
11511 2018-06-13 Jeff Law <law@redhat.com>
11513 * config/rl78/rl78.c (move_elim_pass): Use TDF_NONE rather than
11514 integer 0 for argument to print_rtl_with_bb.
11515 (rl78_reorg): Likewise.
11517 2018-06-13 David Malcolm <dmalcolm@redhat.com>
11519 * config/arc/arc.c (hwloop_optimize): Strengthen local "end_label"
11520 from rtx to rtx_insn *.
11521 * config/bfin/bfin.c (hwloop_optimize): Likewise for local
11523 (add_sched_insns_for_speculation): Likewise for local "target",
11524 converting usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
11525 * config/c6x/c6x.c (reorg_split_calls): Strengthen param "call_labels"
11526 from rtx_insn ** to rtx_code_label **.
11527 (reorg_emit_nops): Likewise.
11528 (c6x_reorg): Likewise for local "call_labels".
11529 * config/sh/sh-protos.h (get_dest_uid): Strengthen 1st param from
11531 * config/sh/sh.c (dump_table): Strengthen local "lab" from rtx to
11532 rtx_code_label *, adding safe_as_a <rtx_code_label *> casts to
11533 the loops over LABEL_REFS.
11534 (fixup_addr_diff_vecs): Add as_a <rtx_insn *> to usage of
11536 (barrier_align): Convert usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
11537 (get_dest_uid): Strengthen param "label" from rtx to rtx_insn *.
11538 (split_branches): Strengthen local "olabel" from rtx to
11539 rtx_insn *, adding a safe_as_a cast.
11540 * emit-rtl.c (next_real_insn): Strengthen param from "rtx"
11542 (add_insn_after): Likewise for first two params.
11543 (add_insn_before): Likewise.
11544 (remove_insn): Likewise for param.
11545 (emit_pattern_before_noloc): Likewise for second and third params.
11546 (emit_jump_insn_before_noloc): Convert NULL_RTX to NULL.
11547 (emit_call_insn_before_noloc): Likewise.
11548 (emit_debug_insn_before_noloc): Strengthen "before" param from "rtx"
11550 (emit_barrier_before): Likewise.
11551 (emit_label_before): Strengthen "label" param from "rtx" to
11552 "rtx_code_label *". Strengthen "before" param from "rtx" to
11554 (emit_insn_after_1): Strengthen "after" param from "rtx" to
11556 (emit_pattern_after_noloc): Likewise.
11557 (emit_insn_after_noloc): Likewise.
11558 (emit_jump_insn_after_noloc): Likewise.
11559 (emit_call_insn_after_noloc): Likewise.
11560 (emit_debug_insn_after_noloc): Likewise.
11561 (emit_barrier_after): Likewise.
11562 (emit_label_after): Likewise for both params.
11563 (emit_pattern_after_setloc): Likewise for "after" param. Convert
11564 "loc" param from "int" to "location_t".
11565 (emit_insn_after_setloc): Likewise.
11566 (emit_jump_insn_after_setloc): Likewise.
11567 (emit_call_insn_after_setloc): Likewise.
11568 (emit_debug_insn_after_setloc): Likewise.
11569 (emit_pattern_before_setloc): Likewise for "before" param. Convert
11570 "loc" param from "int" to "location_t".
11571 (emit_pattern_before): Convert NULL_RTX to NULL.
11572 (emit_insn_before_setloc): Convert "loc" param from "int" to
11574 (emit_jump_insn_before_setloc): Likewise.
11575 (emit_call_insn_before_setloc): Likewise.
11576 (emit_debug_insn_before_setloc): Strengthen "before" param from rtx to
11577 rtx_insn *. Convert "loc" param from "int" to "location_t".
11578 * rtl.h (emit_insn_before_setloc, emit_jump_insn_before_setloc,
11579 emit_call_insn_before_setloc, emit_debug_insn_before_setloc):
11580 Convert 3rd param from "int" to "location_t".
11581 (emit_barrier_before, emit_barrier_after, next_real_insn):
11582 Strengthen param from rtx to rtx_insn *.
11583 (emit_label_before): Strengthen 1st param from "rtx" to
11584 "rtx_code_label *". Strengthen 2nd param from "rtx" to
11586 (emit_insn_after_noloc, emit_jump_insn_after_noloc,
11587 emit_call_insn_after_noloc, emit_debug_insn_after_noloc):
11588 Strengthen 2nd param from "rtx" to "rtx_insn *".
11589 (emit_insn_after_setloc, emit_jump_insn_after_setloc)
11590 emit_call_insn_after_setloc, emit_debug_insn_after_setloc):
11591 Likewise. Convert 3rd param from "int" to "location_t".
11592 (emit_label_after): Strengthen 1st param from "rtx" to
11593 "rtx_code_label *".
11594 (next_real_insn, remove_insn): Strengthen param from "rtx" to
11596 (add_insn_before, add_insn_after): Strengthen 1st and 2nd params
11597 from "rtx" to "rtx_insn *".
11599 2018-06-13 Jan Hubicka <hubicka@gcc.gnu.org>
11601 * cgraph.c (cgraph_node::get_untransformed_body): Dump function
11602 bodies streamed in with -Q.
11603 * dumpfile.c (dump_files): Add lto-stream-out dump file.
11604 * dumpfile.h (tree_dump_index): Add lto_stream_out.
11605 * gimple-streamer-out.c: Include gimple-pretty-print.h
11606 (output_bb): Dump stmts streamed.
11607 * lto-section-out.c: Include print-tree.h
11608 (lto_begin_section): Dump sections created.
11609 (lto_output_decl_index): Dump decl encoded.
11610 * lto-streamer-out.c: Include print-tree.h
11611 (create_output_block): Dump output block created.
11612 (DFS::DFS_write_tree_body): Dump DFS SCCs streamed.
11613 (output_function): Dump function output.
11614 (output_constructor): Dump constructor streamed.
11615 (write_global_stream): Output indexes encoded.
11616 (produce_asm_for_decls): Dump streams encoded.
11617 * lto-streamer.c (streamer_dump_file): New global var.
11618 * lto-streamer.h (streamer_dump_file): Declare.
11619 * passes.c (ipa_write_summaries): Initialize streamer dump.
11620 * varpool.c (varpool_node::get_constructor): Dump constructors streamed
11623 2018-06-13 Eric Botcazou <ebotcazou@adacore.com>
11626 * config/i386/winnt.c (i386_pe_seh_cold_init): Do not emit negative
11627 offsets for register save directives. Emit a second batch of save
11628 directives, if need be, when the function accesses prior frames.
11630 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
11632 * config/arc/fpu.md (fmasf4): Force operand to register.
11633 (fnmasf4): Likewise.
11635 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
11637 * config/arc/arc-protos.h (arc_pad_return): Remove.
11638 * config/arc/arc.c (machine_function): Remove force_short_suffix
11640 (arc_print_operand): Adjust printing of '&'.
11641 (arc_verify_short): Remove conditional printing of short suffix.
11642 (arc_final_prescan_insn): Remove reference to size_reason.
11643 (pad_return): New function.
11644 (arc_reorg): Call pad_return.
11645 (arc_pad_return): Remove.
11646 (arc_init_machine_status): Remove reference to force_short_suffix.
11647 * config/arc/arc.md (vunspec): Add VUNSPEC_ARC_BLOCKAGE.
11648 (attr length): When attribute iscompact is true force to 2
11649 regardless; in the case of maybe check if we want to force the
11650 instruction to have 4 bytes length.
11651 (nopv): Change it to generate 4 byte long nop as well.
11652 (blockage): New pattern.
11653 (simple_return): Remove call to arc_pad_return.
11654 (p_return_i): Likewise.
11656 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
11658 * config/arc/elf.h (LINK_GCC_C_SEQUENCE_SPEC): Define.
11660 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
11662 * config/arc/builtins.def (SYNC): SYNC instruction is valid on all
11665 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
11667 * config/arc/arc.c (atomic_exchangesi): EX instruction is default
11668 for ARC700 and ARCv2.
11670 2018-06-13 Chenghua Xu <paul.hua.gm@gmail.com>
11673 * config/mips/loongson.md (vec_setv4hi): Gen_lowpart for
11674 operands[2] instead of operands[1].
11677 2018-06-12 Richard Sandiford <richard.sandiford@linaro.org>
11679 * lra-constraints.c (simplify_operand_subreg): In the paradoxical
11680 case, check whether the outer register overlaps an unallocatable
11681 register, not just whether it fits the required class.
11683 2018-06-12 Richard Sandiford <richard.sandiford@linaro.org>
11685 * poly-int.h (can_div_trunc_p): Add new overload in which all values
11687 * alias.c (get_addr): Extend CONST_INT handling to poly_int_rtx_p.
11688 (memrefs_conflict_p): Likewise.
11689 (init_alias_analysis): Likewise.
11690 * cfgexpand.c (expand_debug_expr): Likewise.
11691 * combine.c (combine_simplify_rtx, force_int_to_mode): Likewise.
11692 * cse.c (fold_rtx): Likewise.
11693 * explow.c (adjust_stack, anti_adjust_stack): Likewise.
11694 * expr.c (emit_block_move_hints): Likewise.
11695 (clear_storage_hints, push_block, emit_push_insn): Likewise.
11696 (store_expr_with_bounds, reduce_to_bit_field_precision): Likewise.
11697 (emit_group_load_1): Use rtx_to_poly_int64 for group offsets.
11698 (emit_group_store): Likewise.
11699 (find_args_size_adjust): Use strip_offset. Use rtx_to_poly_int64
11700 to read the PRE/POST_MODIFY increment.
11701 * calls.c (store_one_arg): Use strip_offset.
11702 * rtlanal.c (rtx_addr_can_trap_p_1): Extend CONST_INT handling to
11704 (set_noop_p): Use rtx_to_poly_int64 for the elements selected
11706 * simplify-rtx.c (avoid_constant_pool_reference): Use strip_offset.
11707 (simplify_binary_operation_1): Extend CONST_INT handling to
11709 * var-tracking.c (compute_cfa_pointer): Take a poly_int64 rather
11710 than a HOST_WIDE_INT.
11711 (hard_frame_pointer_adjustment): Change from HOST_WIDE_INT to
11713 (adjust_mems, add_stores): Update accodingly.
11714 (vt_canonicalize_addr): Track polynomial offsets.
11715 (emit_note_insn_var_location): Likewise.
11716 (vt_add_function_parameter): Likewise.
11717 (vt_initialize): Likewise.
11719 2018-06-12 Jeff Law <law@redhat.com>
11721 * config.gcc (alpha*-*-freebsd*): Remove.
11722 * config/alpha/freebsd.h: Remove.
11724 2018-06-12 David Malcolm <dmalcolm@redhat.com>
11727 * spellcheck-tree.c (levenshtein_distance): Rename to...
11728 (get_edit_distance): ...this, and update for underlying renaming.
11729 * spellcheck-tree.h (levenshtein_distance): Rename to...
11730 (get_edit_distance): ...this.
11731 * spellcheck.c (levenshtein_distance): Rename to...
11732 (get_edit_distance): ...this. Convert from Levenshtein distance
11733 to Damerau-Levenshtein distance by supporting transpositions of
11734 adjacent characters. Rename "v1" to "v_next" and "v0" to
11736 (selftest::levenshtein_distance_unit_test_oneway): Rename to...
11737 (selftest::test_edit_distance_unit_test_oneway): ...this, and
11738 update for underlying renaming.
11739 (selftest::levenshtein_distance_unit_test): Rename to...
11740 (selftest::test_get_edit_distance_unit): ...this, and update for
11741 underlying renaming.
11742 (selftest::test_find_closest_string): Add example from PR 69968
11743 where transposition helps
11744 (selftest::test_metric_conditions): Update for renaming.
11745 (selftest::test_metric_conditions): Likewise.
11746 (selftest::spellcheck_c_tests): Likewise.
11747 * spellcheck.h (levenshtein_distance): Rename both overloads to...
11748 (get_edit_distance): ...this.
11749 (best_match::consider): Update for renaming.
11751 2018-06-12 Martin Sebor <msebor@redhat.com>
11753 PR tree-optimization/85259
11754 * builtins.c (compute_objsize): Handle constant offsets.
11755 * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Return
11756 true iff a warning has been issued.
11757 * gimple.h (gimple_nonartificial_location): New function.
11758 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Call
11759 gimple_nonartificial_location and handle -Wno-system-headers.
11760 (handle_builtin_stxncpy): Same.
11762 2018-06-12 Martin Sebor <msebor@redhat.com>
11765 * fold-const.c (operand_equal_p): Handle SAVE_EXPR.
11767 2018-06-12 Will Schmidt <will_schmidt@vnet.ibm.com>
11769 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add
11770 BUILTIN_VEC_XST entries for pointer to double and long long.
11772 2018-06-12 H.J. Lu <hongjiu.lu@intel.com>
11775 * config/i386/gnu-user.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
11777 * config/i386/gnu-user64.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
11780 2018-06-12 Martin Liska <mliska@suse.cz>
11782 * doc/options.texi: Document IntegerRange.
11784 2018-06-12 Martin Liska <mliska@suse.cz>
11786 * config/i386/i386.opt: Make MPX-related options as Deprecated.
11787 * opt-functions.awk: Handle Deprecated flag.
11788 * opts-common.c (decode_cmdline_option): Handle cl_deprecated
11790 (read_cmdline_option): Report warning for a deprecated option.
11791 * opts.h (struct cl_option): Add new field cl_deprecated.
11792 (CL_ERR_DEPRECATED): New.
11794 2018-06-12 Martin Liska <mliska@suse.cz>
11796 * doc/options.texi: Document Deprecated option flag.
11798 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
11800 * config/arc/arc-arch.h (arc_extras): New enum.
11801 (arc_cpu_t):Add field extra.
11802 (arc_cpu_types): Consider the extras.
11803 * config/arc/arc-cpus.def: Add extras info.
11804 * config/arc/arc-opts.h (processor_type): Consider extra field.
11805 * config/arc/arc.c (arc_override_options): Handle extra field.
11807 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
11809 * config/arc/arc-arch.h: Update ARC_OPTX macro.
11810 * config/arc/arc-options.def (ARC_OPTX): Introduce a new doc
11812 * config/arc/arc.c (arc_init): Update pic warning.
11813 (irq_range): Update irq range parsing warnings.
11814 (arc_override_options): Update various warning messages.
11815 (arc_handle_aux_attribute): Likewise.
11817 2018-06-12 Robert Suchanek <robert.suchanek@mips.com>
11819 * config/mips/i6400.md (i6400_fpu_fadd): Remove frint.
11821 2018-06-12 Jozef Lawrynowicz <jozef.l@mittosystems.com>
11823 * doc/sourcebuild.texi: Document usage of line number 0 in verify
11824 compiler messages directives.
11826 2018-06-12 Matthew Fortune <mfortune@gmail.com>
11828 * config/mips/mips-cpus.def: New MIPS_CPU for i6500.
11829 * config/mips/mips-tables.opt: Regenerate.
11830 * config/mips/mips.h (MIPS_ISA_LEVEL_SPEC): Mark i6500 as
11832 * doc/invoke.texi: Document -march=i6500.
11834 2018-06-12 Prachi Godbole <prachi.godbole@imgtec.com>
11836 * config/mips/i6400.md (i6400_gpmuldiv): Remove cpu_unit.
11837 (i6400_gpmul): Add cpu_unit.
11838 (i6400_gpdiv): Likewise.
11839 (i6400_msa_add_d): Update reservations.
11840 (i6400_msa_int_add) Likewise.
11841 (i6400_msa_short_logic3) Likewise.
11842 (i6400_msa_short_logic2) Likewise.
11843 (i6400_msa_short_logic) Likewise.
11844 (i6400_msa_move) Likewise.
11845 (i6400_msa_cmp) Likewise.
11846 (i6400_msa_short_float2) Likewise.
11847 (i6400_msa_div_d) Likewise.
11848 (i6400_msa_long_logic1) Likewise.
11849 (i6400_msa_long_logic2) Likewise.
11850 (i6400_msa_mult) Likewise.
11851 (i6400_msa_long_float2) Likewise.
11852 (i6400_msa_long_float4) Likewise.
11853 (i6400_msa_long_float5) Likewise.
11854 (i6400_msa_long_float8) Likewise.
11855 (i6400_fpu_fadd): Include frint type.
11856 (i6400_fpu_store): New define_insn_reservation.
11857 (i6400_fpu_load): Likewise.
11858 (i6400_fpu_move): Likewise.
11859 (i6400_fpu_fcmp): Likewise.
11860 (i6400_fpu_fmadd): Likewise.
11861 (i6400_int_mult): Include imul3nc type and update reservation.
11862 (i6400_int_div): Include idiv3 type and update reservation.
11863 (i6400_int_load): Update to check type not move_type.
11864 (i6400_int_store): Likewise.
11865 (i6400_int_prefetch): Set zero latency.
11867 2018-06-12 Eric Botcazou <ebotcazou@adacore.com>
11869 * gcc.c: Document new %@{...} sequence.
11870 (LINK_COMMAND_SPEC): Use it for the -L switches.
11871 (cpp_unique_options): Use it for the -I switches.
11872 (at_file_argbuf): New global variable.
11873 (in_at_file): Likewise.
11874 (alloc_args): Create at_file_argbuf.
11875 (clear_args): Truncate at_file_argbuf.
11876 (store_arg): If in_at_file, push the argument onto at_file_argbuf.
11877 (open_at_file): New function.
11878 (close_at_file): Likewise.
11879 (create_at_file): Delete.
11880 (do_spec_1) <'i'>: Use open_at_file/close_at_file.
11883 (validate_switches_from_spec): Deal with %@{...} sequence.
11884 (validate_switches): Likewise.
11885 (driver::finalize): Call clear_args.
11887 2018-06-11 Rasmus Villemoes <rasmus.villemoes@prevas.dk>
11889 * config/vx-common.h (USE_TM_CLONE_REGISTRY): #define to 0.
11891 2018-06-11 Martin Sebor <msebor@redhat.com>
11893 * doc/invoke.texi (-Wall): List -Wc++17-compat.
11894 (Wno-class-memaccess): Add @opindex.
11895 (Wno-templates, Wno-multiple-inheritance): Same.
11896 (Wno-virtual-inheritance, Wno-namespaces): Same.
11897 (Wno-pedantic, Wno-chkp, Wcoverage-mismatch): Same.
11898 (Wno-format-overflow, Wno-format-truncation): Same.
11899 (Wno-unused-local-typedefs, Walloc-size-larger-than): Same.
11900 (Wno-alloc-size-larger-than, Wframe-larger-than): Same
11901 (Wno-stack-usage, Wno-c++-compat, Wno-c++11-compat): Same.
11902 (Wno-c++14-compat, Wno-c++17-compat, Wno-openmp-simd): Same.
11903 (Wno-unsuffixed-float-constants, Wno-addr-space-convert): Same.
11904 (Wno-misspelled-isr): Same.
11906 2018-06-11 Martin Sebor <msebor@redhat.com>
11908 * PR tree-optimization/86083
11909 * tree-ssa-strlen.c (handle_char_store): Use tree_expr_nonzero_p.
11911 2018-06-11 Zhouyi Zhou <zhouzhouyi@gmail.com>
11913 * tree-eh.c (lower_eh_constructs_2): Add a comma to comment.
11915 2018-06-11 Segher Boessenkool <segher@kernel.crashing.org>
11918 * config/rs6000/rs6000.md (*movdi_internal32): Put constraint modifiers
11919 on the correct operand.
11920 (*movdi_internal64): Ditto.
11922 2018-06-11 Martin Liska <mliska@suse.cz>
11924 PR tree-optimization/86089
11925 * tree-ssa-strlen.c (get_string_length): Move back removed hunk.
11927 2018-06-11 Julia Koval <julia.koval@intel.com>
11929 * config/i386/vaesintrin.h (_mm_aesdec_epi128, _mm_aesdeclast_epi128)
11930 _mm_aesenc_epi128, _mm_aesenclast_epi128: Remove.
11931 * config/i386/vpclmulqdqintrin.h (_mm_clmulepi64_epi128): Remove.
11933 2018-06-11 Olivier Hainque <hainque@adacore.com>
11935 * dwarf2out.c (gen_compile_unit_die): Fallout to DW_LANG_Ada83
11936 for Ada with strict dwarf2.
11938 2018-06-08 Peter Bergner <bergner@vnet.ibm.com>
11941 * config/rs6000/rs6000.c (mem_operand_gpr): Enable PRE_INC and PRE_DEC
11944 2018-06-08 Jan Hubicka <hubicka@ucw.cz>
11946 * dumpfile.c (FIRST_ME_AUTO_NUMBERED_DUMP): Bump to 4.
11948 2018-06-08 David Edelsohn <dje.gcc@gmail.com>
11950 * config/rs6000/rs6000.c (rs6000_passes_ieee128): Protect with #if
11953 2018-06-08 Martin Liska <mliska@suse.cz>
11955 * tree-cfg.h (debug_function): Fix argument type to match
11958 2018-06-08 Martin Liska <mliska@suse.cz>
11960 * config/powerpcspe/powerpcspe.c (rs6000_xcoff_visibility):
11961 Remove usage of MPX-related (and removed) fields.
11962 * config/rs6000/rs6000.c (rs6000_xcoff_visibility): Likewise.
11964 2018-06-08 David Malcolm <dmalcolm@redhat.com>
11966 * cfg.c (debug): Use TDF_NONE rather than 0.
11967 * cfghooks.c (debug): Likewise.
11968 * dumpfile.c (DUMP_FILE_INFO): Likewise; also for OPTGROUP.
11969 (struct dump_option_value_info): Convert to...
11970 (struct kv_pair): ...this template type.
11971 (dump_options): Convert to kv_pair<dump_flags_t>; use TDF_NONE
11973 (optinfo_verbosity_options): Likewise.
11974 (optgroup_options): Convert to kv_pair<optgroup_flags_t>; use
11976 (gcc::dump_manager::dump_register): Use optgroup_flags_t rather
11977 than int for "optgroup_flags" param.
11978 (dump_generic_expr_loc): Use dump_flags_t rather than int for
11980 (dump_dec): Likewise.
11981 (dump_finish): Use TDF_NONE rather than 0.
11982 (gcc::dump_manager::opt_info_enable_passes): Use optgroup_flags_t
11983 rather than int for "optgroup_flags" param. Use TDF_NONE rather
11984 than 0. Update for change to option_ptr.
11985 (opt_info_switch_p_1): Convert "optgroup_flags" param from int *
11986 to optgroup_flags_t *. Use TDF_NONE and OPTGROUP_NONE rather than
11987 0. Update for changes to optinfo_verbosity_options and
11989 (opt_info_switch_p): Convert optgroup_flags from int to
11991 (dump_basic_block): Use dump_flags_t rather than int
11992 for "dump_kind" param.
11993 * dumpfile.h (TDF_ADDRESS, TDF_SLIM, TDF_RAW, TDF_DETAILS,
11994 TDF_STATS, TDF_BLOCKS, TDF_VOPS, TDF_LINENO, TDF_UID)
11995 TDF_STMTADDR, TDF_GRAPH, TDF_MEMSYMS, TDF_RHS_ONLY, TDF_ASMNAME,
11996 TDF_EH, TDF_NOUID, TDF_ALIAS, TDF_ENUMERATE_LOCALS, TDF_CSELIB,
11997 TDF_SCEV, TDF_GIMPLE, TDF_FOLDING, MSG_OPTIMIZED_LOCATIONS,
11998 MSG_MISSED_OPTIMIZATION, MSG_NOTE, MSG_ALL, TDF_COMPARE_DEBUG,
11999 TDF_NONE): Convert from macros to...
12000 (enum dump_flag): ...this new enum.
12001 (dump_flags_t): Update to use enum.
12002 (operator|, operator&, operator~, operator|=, operator&=):
12003 Implement for dump_flags_t.
12004 (OPTGROUP_NONE, OPTGROUP_IPA, OPTGROUP_LOOP, OPTGROUP_INLINE,
12005 OPTGROUP_OMP, OPTGROUP_VEC, OPTGROUP_OTHER, OPTGROUP_ALL):
12006 Convert from macros to...
12007 (enum optgroup_flag): ...this new enum.
12008 (optgroup_flags_t): New typedef.
12009 (operator|, operator|=): Implement for optgroup_flags_t.
12010 (struct dump_file_info): Convert field "alt_flags" to
12011 dump_flags_t. Convert field "optgroup_flags" to
12013 (dump_basic_block): Use dump_flags_t rather than int for param.
12014 (dump_generic_expr_loc): Likewise.
12015 (dump_dec): Likewise.
12016 (dump_register): Convert param "optgroup_flags" to
12018 (opt_info_enable_passes): Likewise.
12019 * early-remat.c (early_remat::dump_edge_list): Use TDF_NONE rather
12021 * gimple-pretty-print.c (debug): Likewise.
12022 * gimple-ssa-store-merging.c (bswap_replace): Likewise.
12023 (merged_store_group::apply_stores): Likewise.
12024 * gimple-ssa-strength-reduction.c (insert_initializers): Likewise.
12025 * gimple.c (verify_gimple_pp): Likewise.
12026 * graphite-poly.c (print_pbb_body): Likewise.
12027 * passes.c (pass_manager::register_one_dump_file): Convert
12028 local "optgroup_flags" to optgroup_flags_t.
12029 * print-tree.c (print_node): Use TDF_NONE rather than 0.
12031 (debug_body): Likewise.
12032 * tree-pass.h (struct pass_data): Convert field "optgroup_flags"
12033 to optgroup_flags_t.
12034 * tree-pretty-print.c (print_struct_decl): Use TDF_NONE rather
12036 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Likewise.
12037 (convert_mult_to_fma): Likewise.
12038 * tree-ssa-reassoc.c (undistribute_ops_list): Likewise.
12039 * tree-ssa-sccvn.c (vn_eliminate): Likewise.
12040 * tree-vect-data-refs.c (dump_lower_bound): Convert param
12041 "dump_kind" to dump_flags_t.
12043 2018-06-08 Segher Boessenkool <segher@kernel.crashing.org>
12045 * config/rs6000/rs6000.c (min, max): Delete.
12047 2018-06-08 Segher Boessenkool <segher@kernel.crashing.org>
12049 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete mention of
12050 -mabi=spe and -mabi=no-spe.
12052 2018-06-08 Martin Liska <mliska@suse.cz>
12054 * ipa-pure-const.c (propagate_pure_const): Use ::get at places
12055 where we expect an existing summary.
12057 2018-06-08 Martin Liska <mliska@suse.cz>
12059 * ipa-inline-analysis.c (simple_edge_hints): Use ::get method.
12060 * ipa-inline.h (estimate_edge_growth): Likewise.
12062 2018-06-08 Martin Liska <mliska@suse.cz>
12064 * cgraph.c (function_version_hasher::hash): Use
12065 cgraph_node::get_uid ().
12066 (function_version_hasher::equal):
12067 * cgraph.h (cgraph_node::get_uid): New method.
12068 * ipa-inline.c (update_caller_keys): Use
12069 cgraph_node::get_uid ().
12070 (update_callee_keys): Likewise.
12071 * ipa-utils.c (searchc): Likewise.
12072 (ipa_reduced_postorder): Likewise.
12073 * lto-cgraph.c (input_node): Likewise.
12074 * passes.c (is_pass_explicitly_enabled_or_disabled): Likewise.
12075 * symbol-summary.h (symtab_insertion): Likewise.
12076 (symtab_removal): Likewise.
12077 (symtab_duplication): Likewise.
12078 * tree-pretty-print.c (dump_function_header): Likewise.
12079 * tree-sra.c (convert_callers_for_node): Likewise.
12081 2018-06-08 Martin Liska <mliska@suse.cz>
12083 * cgraph.c (symbol_table::create_edge): Always assign a new
12085 (symbol_table::free_edge): Do not recycle numbers.
12086 * cgraph.h (cgraph_edge::get): New method.
12087 * symbol-summary.h (symtab_removal): Use it.
12088 (symtab_duplication): Likewise.
12089 (call_summary::hashable_uid): Remove.
12091 2018-06-08 Martin Liska <mliska@suse.cz>
12093 * ipa-inline-analysis.c (inline_edge_removal_hook): Remove.
12094 (initialize_growth_caches): Remove.
12095 (free_growth_caches): Likewise.
12096 (do_estimate_edge_time): Use edge_growth_cache.
12097 (do_estimate_edge_size): Likewise.
12098 (do_estimate_edge_hints): Likewise.
12099 * ipa-inline.c (reset_edge_caches): Likewise.
12100 (recursive_inlining): Likewise.
12101 (inline_small_functions): Likewise.
12102 * ipa-inline.h (initialize_growth_caches): Remove.
12103 (estimate_edge_size): Likewise.
12104 (estimate_edge_time): Likewise.
12105 (estimate_edge_hints): Likewise.
12106 (reset_edge_growth_cache): Likewise.
12107 * symbol-summary.h (call_summary::remove): New method.
12109 2018-06-08 Martin Liska <mliska@suse.cz>
12111 * ipa-cp.c (class edge_clone_summary): New summary.
12112 (grow_edge_clone_vectors): Remove.
12113 (ipcp_edge_duplication_hook): Remove.
12114 (class edge_clone_summary_t): New call_summary class.
12115 (ipcp_edge_removal_hook): Remove.
12116 (edge_clone_summary_t::duplicate): New function.
12117 (get_next_cgraph_edge_clone): Use edge_clone_summaries.
12118 (create_specialized_node): Likewise.
12119 (ipcp_driver): Initialize edge_clone_summaries and do not
12122 2018-06-08 Martin Liska <mliska@suse.cz>
12124 * symbol-summary.h (get): New function.
12125 (call_summary::m_initialize_when_cloning): New class member.
12127 2018-06-08 Martin Liska <mliska@suse.cz>
12129 * cgraph.c (cgraph_node::remove): Do not recycle uid.
12130 * cgraph.h (symbol_table::release_symbol): Do not pass uid.
12131 (symbol_table::allocate_cgraph_symbol): Do not set uid.
12132 * passes.c (uid_hash_t): Record removed_nodes by their uids.
12133 (remove_cgraph_node_from_order): Use the removed_nodes set.
12134 (do_per_function_toporder): Likwise.
12135 * symbol-summary.h (symtab_insertion): Use cgraph_node::uid
12136 instead of summary_uid.
12137 (symtab_removal): Likewise.
12138 (symtab_duplication): Likewise.
12140 2018-06-08 Martin Liska <mliska@suse.cz>
12142 * ipa-cp.c (ipcp_store_bits_results): Use
12143 ipcp_transformation_sum.
12144 (ipcp_store_vr_results): Likewise.
12145 * ipa-prop.c (ipcp_grow_transformations_if_necessary): Renamed
12147 (ipcp_transformation_initialize): ... this.
12148 (ipa_set_node_agg_value_chain):
12149 (ipa_node_params_t::duplicate): Use ipcp_transformation_sum.
12150 (write_ipcp_transformation_info): Likewise.
12151 (read_ipcp_transformation_info): Likewise.
12152 (ipcp_update_bits): Likewise.
12153 (ipcp_update_vr): Likewise.
12154 (ipcp_transform_function): Likewise.
12155 * ipa-prop.h: Rename ipcp_transformation_summary to
12156 ipcp_transformation.
12157 (class ipcp_transformation_t): New function summary.
12158 (ipcp_get_transformation_summary): Use ipcp_transformation_sum.
12159 (ipa_get_agg_replacements_for_node): Likewise.
12161 2018-06-08 Martin Liska <mliska@suse.cz>
12163 * ipa-pure-const.c (struct funct_state_d): Do it class instead
12165 (class funct_state_summary_t): New function_summary class.
12166 (has_function_state): Remove.
12167 (get_function_state): Likewise.
12168 (set_function_state): Likewise.
12169 (add_new_function): Likewise.
12170 (funct_state_summary_t::insert): New function.
12171 (duplicate_node_data): Remove.
12172 (remove_node_data): Remove.
12173 (funct_state_summary_t::duplicate): New function.
12174 (register_hooks): Create new funct_state_summaries.
12175 (pure_const_generate_summary): Use it.
12176 (pure_const_write_summary): Likewise.
12177 (pure_const_read_summary): Likewise.
12178 (propagate_pure_const): Likewise.
12179 (propagate_nothrow): Likewise.
12180 (dump_malloc_lattice): Likewise.
12181 (propagate_malloc): Likewise.
12182 (execute): Do not register hooks, just remove summary
12184 (pass_ipa_pure_const::pass_ipa_pure_const): Simplify
12187 2018-06-08 Martin Liska <mliska@suse.cz>
12189 * ipa-reference.c (remove_node_data): Remove.
12190 (duplicate_node_data): Likewise.
12191 (class ipa_ref_var_info_summary_t): New class.
12192 (class ipa_ref_opt_summary_t): Likewise.
12193 (get_reference_vars_info): Use ipa_ref_var_info_summaries.
12194 (get_reference_optimization_summary): Use
12195 ipa_ref_opt_sum_summaries.
12196 (set_reference_vars_info): Remove.
12197 (set_reference_optimization_summary): Likewise.
12198 (ipa_init): Create summaries.
12199 (init_function_info): Use function summary.
12200 (ipa_ref_opt_summary_t::duplicate): New function.
12201 (ipa_ref_opt_summary_t::remove): New function.
12202 (get_read_write_all_from_node): Fix GNU coding style.
12203 (propagate): Use function summary.
12204 (write_node_summary_p): Fix GNU coding style.
12205 (stream_out_bitmap): Likewise.
12206 (ipa_reference_read_optimization_summary): Use function summary.
12207 (ipa_reference_c_finalize): Do not release hooks.
12209 2018-06-08 Martin Liska <mliska@suse.cz>
12211 * ipa-fnsummary.c (dump_ipa_call_summary): Use ::get method.
12212 (analyze_function_body): Extract multiple calls of get_create.
12213 * ipa-inline-analysis.c (simple_edge_hints): Likewise.
12214 * ipa-inline.c (recursive_inlining): Use ::get method.
12215 * ipa-inline.h (estimate_edge_growth): Likewise.
12217 2018-06-08 Martin Liska <mliska@suse.cz>
12219 * hsa-common.h (enum hsa_function_kind): Rename HSA_NONE to
12221 (hsa_function_summary::hsa_function_summary): Use the new enum
12223 (hsa_gpu_implementation_p): Use hsa_summaries::get.
12224 * hsa-gen.c (hsa_get_host_function): Likewise.
12225 (get_brig_function_name): Likewise.
12226 * ipa-hsa.c (process_hsa_functions): Likewise.
12227 (ipa_hsa_write_summary): Likewise.
12228 * symbol-summary.h (symtab_duplication): Use ::get function/
12229 (get): New function.
12231 2018-06-08 Martin Liska <mliska@suse.cz>
12233 * config/i386/i386.c (ix86_can_inline_p): Use get_create instead
12235 * hsa-common.c (hsa_summary_t::link_functions): Likewise.
12236 (hsa_register_kernel): Likewise.
12237 * hsa-common.h (hsa_gpu_implementation_p): Likewise.
12238 * hsa-gen.c (hsa_get_host_function): Likewise.
12239 (get_brig_function_name): Likewise.
12240 (generate_hsa): Likewise.
12241 (pass_gen_hsail::execute): Likewise.
12242 * ipa-cp.c (ipcp_cloning_candidate_p): Likewise.
12243 (devirtualization_time_bonus): Likewise.
12244 (ipcp_propagate_stage): Likewise.
12245 * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
12246 (edge_set_predicate): Likewise.
12247 (evaluate_conditions_for_known_args): Likewise.
12248 (evaluate_properties_for_edge): Likewise.
12249 (ipa_fn_summary::reset): Likewise.
12250 (ipa_fn_summary_t::duplicate): Likewise.
12251 (dump_ipa_call_summary): Likewise.
12252 (ipa_dump_fn_summary): Likewise.
12253 (analyze_function_body): Likewise.
12254 (compute_fn_summary): Likewise.
12255 (estimate_edge_devirt_benefit): Likewise.
12256 (estimate_edge_size_and_time): Likewise.
12257 (estimate_calls_size_and_time): Likewise.
12258 (estimate_node_size_and_time): Likewise.
12259 (inline_update_callee_summaries): Likewise.
12260 (remap_edge_change_prob): Likewise.
12261 (remap_edge_summaries): Likewise.
12262 (ipa_merge_fn_summary_after_inlining): Likewise.
12263 (ipa_update_overall_fn_summary): Likewise.
12264 (read_ipa_call_summary): Likewise.
12265 (inline_read_section): Likewise.
12266 (write_ipa_call_summary): Likewise.
12267 (ipa_fn_summary_write): Likewise.
12268 (ipa_free_fn_summary): Likewise.
12269 * ipa-hsa.c (process_hsa_functions): Likewise.
12270 (ipa_hsa_write_summary): Likewise.
12271 (ipa_hsa_read_section): Likewise.
12272 * ipa-icf.c (sem_function::merge): Likewise.
12273 * ipa-inline-analysis.c (simple_edge_hints): Likewise.
12274 (do_estimate_edge_time): Likewise.
12275 (estimate_size_after_inlining): Likewise.
12276 (estimate_growth): Likewise.
12277 (growth_likely_positive): Likewise.
12278 * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
12279 (inline_call): Likewise.
12280 * ipa-inline.c (caller_growth_limits): Likewise.
12281 (can_inline_edge_p): Likewise.
12282 (can_inline_edge_by_limits_p): Likewise.
12283 (compute_uninlined_call_time): Likewise.
12284 (compute_inlined_call_time): Likewise.
12285 (want_inline_small_function_p): Likewise.
12286 (edge_badness): Likewise.
12287 (update_caller_keys): Likewise.
12288 (update_callee_keys): Likewise.
12289 (recursive_inlining): Likewise.
12290 (inline_small_functions): Likewise.
12291 (inline_to_all_callers_1): Likewise.
12292 (dump_overall_stats): Likewise.
12293 (early_inline_small_functions): Likewise.
12294 (early_inliner): Likewise.
12295 * ipa-inline.h (estimate_edge_growth): Likewise.
12296 * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
12297 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
12298 * ipa-prop.h (IPA_NODE_REF): Likewise.
12299 (IPA_EDGE_REF): Likewise.
12300 * ipa-pure-const.c (malloc_candidate_p): Likewise.
12301 (propagate_malloc): Likewise.
12302 * ipa-split.c (execute_split_functions): Likewise.
12303 * symbol-summary.h: Rename get to get_create.
12305 (get_create): Likewise.
12306 * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
12308 2018-06-08 Martin Liska <mliska@suse.cz>
12310 * symbol-summary.h (release): Move definition out of class
12312 (symtab_removal): Likewise.
12313 (symtab_duplication): Likewise.
12315 2018-06-08 Martin Liska <mliska@suse.cz>
12317 * symbol-summary.h (function_summary): Move constructor
12318 implementation out of class declaration.
12319 (release): Likewise.
12320 (symtab_insertion): Likewise.
12321 (symtab_removal): Likewise.
12322 (symtab_duplication): Likewise.
12325 2018-06-08 Martin Liska <mliska@suse.cz>
12327 * Makefile.in: Remove support for MPX (macros, related functions,
12328 fields in cgraph_node, ...).
12329 * builtin-types.def (BT_BND): Likewise.
12330 (BT_FN_BND_CONST_PTR): Likewise.
12331 (BT_FN_CONST_PTR_BND): Likewise.
12332 (BT_FN_VOID_PTR_BND): Likewise.
12333 (BT_FN_BND_CONST_PTR_SIZE): Likewise.
12334 (BT_FN_VOID_CONST_PTR_BND_CONST_PTR): Likewise.
12335 * builtins.c (expand_builtin_memcpy_with_bounds): Likewise.
12336 (expand_builtin_mempcpy_with_bounds): Likewise.
12337 (expand_builtin_memset_with_bounds): Likewise.
12338 (expand_builtin_memset_args): Likewise.
12339 (std_expand_builtin_va_start): Likewise.
12340 (expand_builtin): Likewise.
12341 (expand_builtin_with_bounds): Likewise.
12342 * builtins.def (DEF_BUILTIN_CHKP): Likewise.
12343 (DEF_LIB_BUILTIN_CHKP): Likewise.
12344 (DEF_EXT_LIB_BUILTIN_CHKP): Likewise.
12345 (DEF_CHKP_BUILTIN): Likewise.
12346 (BUILT_IN_MEMCPY): Likewise.
12347 (BUILT_IN_MEMMOVE): Likewise.
12348 (BUILT_IN_MEMPCPY): Likewise.
12349 (BUILT_IN_MEMSET): Likewise.
12350 (BUILT_IN_STPCPY): Likewise.
12351 (BUILT_IN_STRCAT): Likewise.
12352 (BUILT_IN_STRCHR): Likewise.
12353 (BUILT_IN_STRCPY): Likewise.
12354 (BUILT_IN_STRLEN): Likewise.
12355 (BUILT_IN_MEMCPY_CHK): Likewise.
12356 (BUILT_IN_MEMMOVE_CHK): Likewise.
12357 (BUILT_IN_MEMPCPY_CHK): Likewise.
12358 (BUILT_IN_MEMSET_CHK): Likewise.
12359 (BUILT_IN_STPCPY_CHK): Likewise.
12360 (BUILT_IN_STRCAT_CHK): Likewise.
12361 (BUILT_IN_STRCPY_CHK): Likewise.
12362 * calls.c (store_bounds): Likewise.
12363 (emit_call_1): Likewise.
12364 (special_function_p): Likewise.
12365 (maybe_warn_nonstring_arg): Likewise.
12366 (initialize_argument_information): Likewise.
12367 (finalize_must_preallocate): Likewise.
12368 (compute_argument_addresses): Likewise.
12369 (expand_call): Likewise.
12370 * cfgexpand.c (expand_call_stmt): Likewise.
12371 (expand_return): Likewise.
12372 (expand_gimple_stmt_1): Likewise.
12373 (pass_expand::execute): Likewise.
12374 * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Likewise.
12375 (cgraph_node::remove): Likewise.
12376 (cgraph_node::dump): Likewise.
12377 (cgraph_node::verify_node): Likewise.
12378 * cgraph.h (chkp_function_instrumented_p): Likewise.
12379 (symtab_node::get_alias_target): Likewise.
12380 (cgraph_node::can_remove_if_no_direct_calls_and_refs_p): Likewise.
12381 (cgraph_local_p): Likewise.
12382 * cgraphbuild.c (cgraph_edge::rebuild_edges): Likewise.
12383 (cgraph_edge::rebuild_references): Likewise.
12384 * cgraphunit.c (varpool_node::finalize_decl): Likewise.
12385 (walk_polymorphic_call_targets): Likewise.
12386 (cgraph_node::expand_thunk): Likewise.
12387 (symbol_table::output_weakrefs): Likewise.
12388 * common/config/i386/i386-common.c (OPTION_MASK_ISA2_GENERAL_REGS_ONLY_UNSET): Likewise.
12389 (ix86_handle_option): Likewise.
12390 * config/i386/constraints.md: Likewise.
12391 * config/i386/i386-builtin-types.def (BND): Likewise.
12395 * config/i386/i386-builtin.def (BDESC_END): Likewise.
12396 (BDESC_FIRST): Likewise.
12398 * config/i386/i386-c.c (ix86_target_macros_internal): Likewise.
12399 * config/i386/i386-protos.h (ix86_bnd_prefixed_insn_p): Likewise.
12400 * config/i386/i386.c (enum reg_class): Likewise.
12401 (ix86_target_string): Likewise.
12402 (ix86_option_override_internal): Likewise.
12403 (ix86_conditional_register_usage): Likewise.
12404 (ix86_valid_target_attribute_inner_p): Likewise.
12405 (ix86_set_indirect_branch_type): Likewise.
12406 (ix86_set_current_function): Likewise.
12407 (ix86_function_arg_regno_p): Likewise.
12408 (init_cumulative_args): Likewise.
12409 (ix86_function_arg_advance): Likewise.
12410 (ix86_function_arg): Likewise.
12411 (ix86_pass_by_reference): Likewise.
12412 (ix86_function_value_regno_p): Likewise.
12413 (ix86_function_value_1): Likewise.
12414 (ix86_function_value_bounds): Likewise.
12415 (ix86_return_in_memory): Likewise.
12416 (ix86_setup_incoming_vararg_bounds): Likewise.
12417 (ix86_va_start): Likewise.
12418 (indirect_thunk_need_prefix): Likewise.
12419 (print_reg): Likewise.
12420 (ix86_print_operand): Likewise.
12421 (ix86_expand_call): Likewise.
12422 (ix86_output_function_return): Likewise.
12423 (reg_encoded_number): Likewise.
12424 (BDESC_VERIFYS): Likewise.
12425 (ix86_init_mpx_builtins): Likewise.
12426 (ix86_init_builtins): Likewise.
12427 (ix86_emit_cmove): Likewise.
12428 (ix86_emit_move_max): Likewise.
12429 (ix86_expand_builtin): Likewise.
12430 (ix86_builtin_mpx_function): Likewise.
12431 (ix86_get_arg_address_for_bt): Likewise.
12432 (ix86_load_bounds): Likewise.
12433 (ix86_store_bounds): Likewise.
12434 (ix86_load_returned_bounds): Likewise.
12435 (ix86_store_returned_bounds): Likewise.
12436 (ix86_class_likely_spilled_p): Likewise.
12437 (ix86_hard_regno_mode_ok): Likewise.
12438 (x86_order_regs_for_local_alloc): Likewise.
12439 (ix86_mitigate_rop): Likewise.
12440 (ix86_bnd_prefixed_insn_p): Likewise.
12441 (ix86_mpx_bound_mode): Likewise.
12442 (ix86_make_bounds_constant): Likewise.
12443 (ix86_initialize_bounds): Likewise.
12444 (TARGET_LOAD_BOUNDS_FOR_ARG): Likewise.
12445 (TARGET_STORE_BOUNDS_FOR_ARG): Likewise.
12446 (TARGET_LOAD_RETURNED_BOUNDS): Likewise.
12447 (TARGET_STORE_RETURNED_BOUNDS): Likewise.
12448 (TARGET_CHKP_BOUND_MODE): Likewise.
12449 (TARGET_BUILTIN_CHKP_FUNCTION): Likewise.
12450 (TARGET_CHKP_FUNCTION_VALUE_BOUNDS): Likewise.
12451 (TARGET_CHKP_MAKE_BOUNDS_CONSTANT): Likewise.
12452 (TARGET_CHKP_INITIALIZE_BOUNDS): Likewise.
12453 * config/i386/i386.h (TARGET_MPX): Likewise.
12454 (TARGET_MPX_P): Likewise.
12455 (VALID_BND_REG_MODE): Likewise.
12456 (FIRST_BND_REG): Likewise.
12457 (LAST_BND_REG): Likewise.
12458 (enum reg_class): Likewise.
12459 (BND_REG_P): Likewise.
12460 (BND_REGNO_P): Likewise.
12461 (BNDmode): Likewise.
12462 (ADJUST_INSN_LENGTH): Likewise.
12463 * config/i386/i386.md: Likewise.
12464 * config/i386/i386.opt: Likewise.
12465 * config/i386/linux-common.h (LIBMPX_LIBS): Likewise.
12466 (defined): Likewise.
12467 (LINK_MPX): Likewise.
12468 (MPX_SPEC): Likewise.
12469 (LIBMPX_SPEC): Likewise.
12470 (LIBMPXWRAPPERS_SPEC): Likewise.
12471 (CHKP_SPEC): Likewise.
12472 * config/i386/predicates.md: Likewise.
12473 * dbxout.c (dbxout_type): Likewise.
12474 * doc/extend.texi: Likewise.
12475 * doc/invoke.texi: Likewise.
12476 * doc/md.texi: Likewise.
12477 * doc/tm.texi: Likewise.
12478 * doc/tm.texi.in: Likewise.
12479 * dwarf2out.c (is_base_type): Likewise.
12480 (gen_formal_types_die): Likewise.
12481 (gen_subprogram_die): Likewise.
12482 (gen_type_die_with_usage): Likewise.
12483 (gen_decl_die): Likewise.
12484 (dwarf2out_late_global_decl): Likewise.
12485 * expr.c (expand_assignment): Likewise.
12486 (emit_storent_insn): Likewise.
12487 (store_expr_with_bounds): Likewise.
12488 (store_expr): Likewise.
12489 (expand_expr_real_1): Likewise.
12490 * expr.h (store_expr_with_bounds): Likewise.
12491 * function.c (use_register_for_decl): Likewise.
12492 (struct bounds_parm_data): Likewise.
12493 (assign_parms_augmented_arg_list): Likewise.
12494 (assign_parm_find_entry_rtl): Likewise.
12495 (assign_parm_is_stack_parm): Likewise.
12496 (assign_parm_load_bounds): Likewise.
12497 (assign_bounds): Likewise.
12498 (assign_parms): Likewise.
12499 (expand_function_start): Likewise.
12500 * gcc.c (CHKP_SPEC): Likewise.
12501 * gimple-fold.c (gimple_fold_builtin_memory_op): Likewise.
12502 * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Likewise.
12503 (wrestrict_dom_walker::check_call): Likewise.
12504 * gimple.c (gimple_build_call_from_tree): Likewise.
12505 * gimple.h (enum gf_mask): Likewise.
12506 (gimple_call_with_bounds_p): Likewise.
12507 (gimple_call_set_with_bounds): Likewise.
12508 * gimplify.c (gimplify_init_constructor): Likewise.
12509 * ipa-cp.c (initialize_node_lattices): Likewise.
12510 (propagate_constants_across_call): Likewise.
12511 (find_more_scalar_values_for_callers_subset): Likewise.
12512 * ipa-hsa.c (process_hsa_functions): Likewise.
12513 * ipa-icf-gimple.c (func_checker::compare_gimple_call): Likewise.
12514 * ipa-icf.c (sem_function::merge): Likewise.
12515 * ipa-inline.c (early_inliner): Likewise.
12516 * ipa-pure-const.c (warn_function_noreturn): Likewise.
12517 (warn_function_cold): Likewise.
12518 (propagate_pure_const): Likewise.
12519 * ipa-ref.h (enum GTY): Likewise.
12520 * ipa-split.c (find_retbnd): Likewise.
12521 (consider_split): Likewise.
12522 (split_function): Likewise.
12523 * ipa-visibility.c (cgraph_externally_visible_p): Likewise.
12524 * ipa.c (walk_polymorphic_call_targets): Likewise.
12525 (symbol_table::remove_unreachable_nodes): Likewise.
12526 (process_references): Likewise.
12527 (cgraph_build_static_cdtor_1): Likewise.
12528 * lto-cgraph.c (lto_output_node): Likewise.
12529 (output_refs): Likewise.
12530 (compute_ltrans_boundary): Likewise.
12531 (input_overwrite_node): Likewise.
12532 (input_node): Likewise.
12533 (input_cgraph_1): Likewise.
12534 * params.def (PARAM_CHKP_MAX_CTOR_SIZE): Likewise.
12535 * passes.c (pass_manager::execute_early_local_passes): Likewise.
12536 (class pass_chkp_instrumentation_passes): Likewise.
12537 (make_pass_chkp_instrumentation_passes): Likewise.
12538 * passes.def: Likewise.
12539 * rtl.h (struct GTY): Likewise.
12540 (CALL_EXPR_WITH_BOUNDS_P): Likewise.
12541 * stor-layout.c (layout_type): Likewise.
12542 * symtab.c: Likewise.
12543 * target.def: Likewise.
12544 * targhooks.c (default_chkp_bound_type): Likewise.
12545 (default_chkp_bound_mode): Likewise.
12546 (default_builtin_chkp_function): Likewise.
12547 (default_chkp_function_value_bounds): Likewise.
12548 (default_chkp_make_bounds_constant): Likewise.
12549 (default_chkp_initialize_bounds): Likewise.
12550 * targhooks.h (default_chkp_bound_type): Likewise.
12551 (default_chkp_bound_mode): Likewise.
12552 (default_builtin_chkp_function): Likewise.
12553 (default_chkp_function_value_bounds): Likewise.
12554 (default_chkp_make_bounds_constant): Likewise.
12555 (default_chkp_initialize_bounds): Likewise.
12556 * toplev.c (compile_file): Likewise.
12557 (process_options): Likewise.
12558 * tree-core.h (DEF_BUILTIN): Likewise.
12559 (DEF_BUILTIN_CHKP): Likewise.
12560 * tree-inline.c (declare_return_variable): Likewise.
12561 (remap_gimple_stmt): Likewise.
12562 (copy_bb): Likewise.
12563 (initialize_inlined_parameters): Likewise.
12564 (expand_call_inline): Likewise.
12565 * tree-pass.h (make_pass_ipa_chkp_versioning): Likewise.
12566 (make_pass_ipa_chkp_early_produce_thunks): Likewise.
12567 (make_pass_ipa_chkp_produce_thunks): Likewise.
12568 (make_pass_chkp): Likewise.
12569 (make_pass_chkp_opt): Likewise.
12570 (make_pass_chkp_instrumentation_passes): Likewise.
12571 * tree-pretty-print.c (dump_generic_node): Likewise.
12572 * tree-ssa-ccp.c (insert_clobber_before_stack_restore): Likewise.
12573 * tree-ssa-dce.c (propagate_necessity): Likewise.
12574 (eliminate_unnecessary_stmts): Likewise.
12575 * tree-ssa-pre.c (create_expression_by_pieces): Likewise.
12576 * tree-ssa-sccvn.c (copy_reference_ops_from_call): Likewise.
12577 * tree-ssa-sccvn.h: Likewise.
12578 * tree-ssa-strlen.c (get_string_length): Likewise.
12579 (valid_builtin_call): Likewise.
12580 (adjust_last_stmt): Likewise.
12581 (handle_builtin_strchr): Likewise.
12582 (handle_builtin_strcpy): Likewise.
12583 (handle_builtin_stxncpy): Likewise.
12584 (handle_builtin_memcpy): Likewise.
12585 (handle_builtin_strcat): Likewise.
12586 (strlen_check_and_optimize_stmt): Likewise.
12587 * tree-stdarg.c (expand_ifn_va_arg_1): Likewise.
12588 * tree-streamer-in.c: Likewise.
12589 * tree-streamer.c (record_common_node): Likewise.
12590 * tree.c (tree_code_size): Likewise.
12591 (wide_int_to_tree_1): Likewise.
12592 (type_contains_placeholder_1): Likewise.
12593 (build_common_tree_nodes): Likewise.
12594 * tree.def (POINTER_BOUNDS_TYPE): Likewise.
12595 * tree.h (POINTER_BOUNDS_TYPE_P): Likewise.
12596 (POINTER_BOUNDS_P): Likewise.
12597 (BOUNDED_TYPE_P): Likewise.
12598 (BOUNDED_P): Likewise.
12599 (CALL_WITH_BOUNDS_P): Likewise.
12600 (pointer_bounds_type_node): Likewise.
12601 * value-prof.c (gimple_ic): Likewise.
12602 * var-tracking.c (vt_add_function_parameters): Likewise.
12603 * varasm.c (make_decl_rtl): Likewise.
12604 (assemble_start_function): Likewise.
12605 (output_constant): Likewise.
12606 (maybe_assemble_visibility): Likewise.
12607 * varpool.c (ctor_for_folding): Likewise.
12608 * chkp-builtins.def: Remove.
12609 * ipa-chkp.c: Remove.
12610 * ipa-chkp.h: Remove.
12611 * rtl-chkp.c: Remove.
12612 * rtl-chkp.h: Remove.
12613 * tree-chkp-opt.c: Remove.
12614 * tree-chkp.c: Remove.
12615 * tree-chkp.h: Remove.
12617 2018-06-07 Carl Love <cel@us.ibm.com>
12619 * config/rs6000/vsx.md (vextract_fp_from_shorth,
12620 vextract_fp_from_shortl): Add BE support.
12622 2018-06-07 Paul Koning <ni1d@arrl.net>
12624 * compare-elim.c (try_merge_compare): Don't merge compare if
12625 address contains a side effect.
12626 (try_eliminate_compare): Likewise.
12628 2018-06-07 Olga Makhotina <olga.makhotina@intel.com>
12630 * config.gcc: Support "tremont".
12631 * config/i386/driver-i386.c (host_detect_local_cpu): Detect "tremont".
12632 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
12634 * config/i386/i386.c (m_TREMONT): Define.
12635 (processor_target_table): Add "tremont".
12636 (PTA_TREMONT): Define.
12637 (ix86_lea_outperforms): Add TARGET_TREMONT.
12638 (get_builtin_code_for_version): Handle PROCESSOR_TREMONT.
12639 (fold_builtin_cpu): Add M_INTEL_TREMONT, replace M_INTEL_GOLDMONT
12640 and M_INTEL_GOLDMONT_PLUS.
12641 (fold_builtin_cpu): Add "tremont".
12642 (ix86_add_stmt_cost): Add TARGET_TREMONT.
12643 (ix86_option_override_internal): Add "tremont".
12644 * config/i386/i386.h (processor_costs): Define TARGET_TREMONT.
12645 (processor_type): Add PROCESSOR_TREMONT.
12646 * config/i386/x86-tune.def: Add m_TREMONT.
12647 * doc/invoke.texi: Add tremont as x86 -march=/-mtune= CPU type.
12649 2018-06-07 Jozef Lawrynowicz <jozef.l@mittosystems.com>
12651 * config/msp430/msp430.c (msp430_mcu_name): Set the "i" in the
12652 symbol defined for msp430i* devices to be lower case.
12654 2018-06-07 Richard Biener <rguenther@suse.de>
12656 * graphite-sese-to-poly.c (extract_affine): Avoid unneded
12657 wrapping. Properly wrap the result of a BIT_NOT_EXPR.
12658 Properly wrap signed arithmetic if overflow wraps.
12660 2018-06-07 Jakub Jelinek <jakub@redhat.com>
12662 PR tree-optimization/69615
12663 * tree-ssa-reassoc.c (optimize_range_tests_var_bound): If rhs2 is lhs
12664 of a cast from a same precision integral SSA_NAME in a bb dominated
12665 by first_bb, retry with rhs2 set to the rhs1 of the cast. Don't emit
12666 cast to utype if rhs2 has already a compatible type.
12668 2018-06-07 Richard Biener <rguenther@suse.de>
12670 PR tree-optimization/85935
12671 * graphite-scop-detection.c (find_params_in_bb): Analyze
12672 condition operands with respect to the correct loop. Assert
12673 the analysis doesn't fail.
12675 2018-06-04 Carl Love <cel@us.ibm.com>
12677 * config/rs6000/vsx.md (first_match_index_<mode>): Calculate index
12678 using natural element order. Use gen_lshrsi3 instead of gen_ashrsi3
12679 as it is slightly cheaper.
12680 (first_match_or_eos_index_<mode>):
12681 Calculate index using natural element order.
12682 (first_match_index_<mode>):
12683 Calculate index using natural element order.
12684 (first_match_or_eos_index_<mode>):
12685 Calculate index using natural order.
12686 (define_insn vclzlsbb): Change to define_insn vclzlsbb_<mode>.
12687 for BE and LE modes.
12688 * config/rs6000/rs6000-c.c: Rename P9V_BUILTIN_VCLZLSBB,
12689 P9V_BUILTIN_VCLZLSBB_V16QI.
12690 * config/rs6000/rs6000-builtin.def: Make VCLZLSBB mode
12693 2018-06-06 Kelvin Nilsen <kelvin@gcc.gnu.org>
12695 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Adjust
12696 indentation and line wrap for many prototypes. Add missing
12697 @smallexample directives around block of prototypes for vec_xl and
12700 2018-06-05 Michael Meissner <meissner@linux.ibm.com>
12702 * config/rs6000/rs6000.c (rs6000_passes_ieee128): New boolean to
12703 track if we pass or return IEEE 128-bit floating point.
12704 (ieee128_mangling_gcc_8_1): New boolean to say whether to generate
12705 C++ mangling that is compatible with GCC 8.1.
12706 (TARGET_ASM_GLOBALIZE_DECL_NAME): Override target hook.
12707 (init_cumulative_args): Note if we pass or return IEEE 128-bit
12708 floating point types.
12709 (rs6000_function_arg_advance_1): Likewise.
12710 (rs6000_mangle_type): Optionally generate mangled names that match
12711 what GCC 8.1 generated for IEEE 128-bit floating point types.
12712 (rs6000_globalize_decl_name): If we have an external function that
12713 passes or returns IEEE 128-bit types, generate a weak reference
12714 from the mangled name used in GCC 8.1 to the current mangled
12716 (rs6000_init_builtins): Make __ibm128 use the long double type if
12717 long double is IBM extended double. Make __float128 use the long
12718 double type if long double is IEEE 128-bit.
12721 * config/rs6000/rs6000-builtin.def (BU_IBM128_2): New helper
12722 macro for __ibm128 built-in functions.
12723 (PACK_IF): Add __ibm128 pack/unpack functions.
12724 (UNPACK_IF): Likewise.
12725 * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Do not
12726 enable long double built-in functions if long double is IEEE
12727 128-bit floating point.
12728 (rs6000_invalid_builtin): Update long double built-in function
12730 (rs6000_expand_builtin): For PACK_IF and UNPACK_IF built-in
12731 functions, adjust the built-in function to use the long double
12732 built-in function if __ibm128 and long double are the same type.
12733 * doc/extend.texi (PowerPC builtins): Update documention for
12734 __builtin_{,un}pack_longdouble. Add documentation for
12735 __builtin_{,un}pack_ibm128.
12737 2018-06-06 Jim Wilson <jimw@sifive.com>
12739 * config/riscv/riscv.c (enum riscv_privilege_levels): New.
12740 (struct machine_function): New field interrupt_mode.
12741 (riscv_handle_type_attribute): New function. Add forward declaration.
12742 (riscv_attribute_table) <interrupt>: Use riscv_handle_type_attribute.
12743 (riscv_expand_epilogue): Check interrupt_mode field.
12744 (riscv_set_current_function): Check interrupt attribute args and
12745 set interrupt_mode field.
12746 * config/riscv/riscv.md (UNSPECV_SRET, UNSPECV_URET): New.
12747 (riscv_sret, riscv_uret): New.
12748 * doc/extend.texi (RISC-V Function Attributes) <interrupt>: Document
12749 new arguments to interrupt attribute.
12751 2018-06-06 Peter Bergner <bergner@vnet.ibm.com>
12754 * /config/rs6000/rs6000.h (ASM_CPU_SPEC): Add support for -mpower9.
12755 Don't handle -mcpu=power8 if -mpower9-vector is also used.
12757 2018-06-06 Kelvin Nilsen <kelvin@gcc.gnu.org>
12759 * config/rs6000/rs6000-builtin.def (VSX_BUILTIN_VEC_LD,
12760 VSX_BUILTIN_VEC_ST): Add comment to explain non-traditional uses.
12761 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
12762 several redundant entries.
12764 2018-06-06 David Malcolm <dmalcolm@redhat.com>
12766 * config/i386/i386-protos.h (ix86_expand_call): Strengthen return
12767 type from "rtx" to "rtx_insn *".
12768 * config/i386/i386.c (ix86_expand_split_stack_prologue): Likewise
12769 for local "call_insn", removing cast.
12770 (ix86_expand_call): Likewise, introducing a "call_insn" local.
12772 2018-06-06 Eric Botcazou <ebotcazou@adacore.com>
12774 PR tree-optimization/86066
12775 * gimple-ssa-store-merging.c (process_store): Do not bypass BIT_NOT_EXPR
12776 for BIT_INSERT_EXPR stores.
12778 2018-06-06 Richard Biener <rguenther@suse.de>
12780 PR tree-optimization/86062
12781 * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
12782 component refs ontop
12783 of to be offsetted base.
12785 2018-06-06 Jozef Lawrynowicz <jozef.l@mittosystems.com>
12787 * config/msp430/msp430.c (msp430_attr): Allow interrupt handlers
12788 to be static and remove check on interrupt attribute name.
12790 2018-06-05 Kelvin Nilsen <kelvin@gcc.gnu.org>
12792 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
12793 volatile qualifier from vec_lvsl and vec_lvsr argument prototypes.
12795 2018-06-05 Steve Ellcey <sellcey@cavium.com>
12798 * config/aarch64/aarch64-protos.h (aarch64_err_no_fpadvsimd): Remove
12800 * config/aarch64/aarch64-protos..c (aarch64_err_no_fpadvsimd):
12801 Remove second argument, change how error is called.
12802 (aarch64_layout_arg): Remove second argument from
12803 aarch64_err_no_fpadvsimd call.
12804 (aarch64_init_cumulative_args): Ditto.
12805 (aarch64_gimplify_va_arg_expr): Ditto.
12806 * config/aarch64/aarch64.md (mov<mode>): Ditto.
12808 2018-06-05 Uros Bizjak <ubizjak@gmail.com>
12810 * config/i386/i386.md (simple_return_indirect_internal): New expander.
12811 (*simple_return_indirect_internal<mode>): Rename from
12812 simple_return_indirect_internal. Use W mode iterator.
12813 (rstorssp): New expander.
12814 (*rstorssp<mode>): Rename from rstorssp. Use P mode iterator.
12815 (clrssbsy): New expander.
12816 (*clrssbsy<mode>): Rename from clrssbsy. Use P mode iterator.
12818 2018-06-05 Andre Vieira <andre.simoesdiasvieira@arm.com>
12820 * config/arm/arm_cmse.h (cmse_nsfptr_create): Change typeof to
12822 (cmse_check_pointed_object): Likewise.
12824 2018-06-05 Martin Liska <mliska@suse.cz>
12826 PR gcov-profile/47618
12827 * doc/invoke.texi: Document how -fprofile-dir format
12830 2018-06-05 Richard Biener <rguenther@suse.de>
12832 * tree-cfgcleanup.c (cleanup_control_flow_pre): For edge
12833 removal pretend DOM info isn't available so we do not update
12834 it and only remove edges, not dominated blocks. Actually free
12835 DOM info in case we removed something. Remove unreachable blocks.
12836 (mfb_keep_latches): Work with either DOM info or marked backedges.
12837 (cleanup_tree_cfg_noloop): Do not remove unreachable blocks
12838 first. Mark backedges if DOM info isn't available.
12839 (Re-)compute DOM info after cleanup_control_flow_pre.
12841 2018-06-05 Richard Biener <rguenther@suse.de>
12843 * tree-cfg.c (struct locus_discrim_map): Store line, not location.
12844 (locus_discrim_hasher::hash): Adjust.
12845 (locus_discrim_hasher::equal): Likewise.
12846 (next_discriminator_for_locus): Work on line directly.
12847 (same_line_p): Pass in expanded locus1 as well.
12848 (assign_discriminators): Avoid redundant location expansions.
12850 2018-06-05 Richard Biener <rguenther@suse.de>
12852 PR tree-optimization/86046
12853 * tree-ssa.c (maybe_optimize_var): Clear DECL_GIMPLE_REG_P
12854 if required after clearing TREE_ADDRESSABLE.
12856 2018-06-05 Richard Biener <rguenther@suse.de>
12858 PR tree-optimization/86047
12859 * tree-ssa-loop.c (for_each_index): Glob handling of all
12860 decls and constants and really handle all of them.
12862 2018-06-05 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
12865 * config/arm/arm-builtins.c (arm_type_qualifiers): Add
12866 qualifier_void_pointer and qualifier_const_void_pointer.
12867 (arm_ldc_qualifiers, arm_stc_qualifiers): Use the above.
12868 (arm_init_builtins): Handle the above.
12869 * config/arm/arm_acle.h (__arm_cdp, __arm_ldc, __arm_ldcl, __arm_stc,
12870 __arm_stcl, __arm_mcr, __arm_cdp2, __arm_ldc2, __arm_ldcl2, __arm_stc2,
12871 __arm_stcl2,__arm_mcr2, __arm_mcrr, __arm_mcrr2): Remove return for
12874 2018-06-05 Martin Liska <mliska@suse.cz>
12876 * auto-profile.c (read_autofdo_file): Do not use
12877 gcov_ctr_summary struct.
12878 (afdo_callsite_hot_enough_for_early_inline): Likewise.
12879 * coverage.c (struct counts_entry): Likewise.
12880 (read_counts_file): Read just single summary entry.
12881 (get_coverage_counts): Use gcov_summary struct.
12882 * coverage.h (get_coverage_counts): Likewise.
12883 * gcov-dump.c (dump_working_sets): Likewise.
12884 (tag_summary): Dump just single summary.
12885 * gcov-io.c (gcov_write_summary): Write just histogram
12887 (gcov_read_summary): Read just single summary.
12888 (compute_working_sets): Use gcov_summary struct.
12889 * gcov-io.h (GCOV_TAG_SUMMARY_LENGTH): Remove usage
12890 of GCOV_COUNTERS_SUMMABLE.
12891 (GCOV_COUNTERS_SUMMABLE): Remove.
12892 (GCOV_FIRST_VALUE_COUNTER): Replace with
12893 GCOV_COUNTER_V_INTERVAL.
12894 (struct gcov_ctr_summary): Remove.
12895 (struct gcov_summary): Directly use fields of former
12897 (compute_working_sets): Use gcov_summary struct.
12898 * gcov.c (read_count_file): Do not use ctrs fields.
12899 * lto-cgraph.c (merge_profile_summaries): Use gcov_summary
12901 * lto-streamer.h (struct GTY): Make profile_info gcov_summary
12903 * profile.c: Likewise.
12904 * profile.h: Likewise.
12906 2018-06-05 Martin Liska <mliska@suse.cz>
12908 PR gcov-profile/84846
12909 * gcov.c (output_lines): Print working directory only
12910 in intermediate format.
12912 2018-06-05 Andreas Krebbel <krebbel@linux.ibm.com>
12914 * config/s390/s390-builtin-types.def: Add void function type.
12915 * config/s390/s390-builtins.def: Use the function type for the
12918 2018-06-04 Jim Wilson <jimw@sifive.com>
12920 * config/riscv/riscv-protos.h (riscv_expand_epilogue): Change bool arg
12922 * config/riscv/riscv.c (riscv_for_each_saved_reg): New args epilogue
12923 and maybe_eh_return. Change regno to unsigned int. Use new args to
12924 handle EH_RETURN_DATA_REGNO registers properly.
12925 (riscv_expand_prologue): Pass new args to riscv_for_each_saved_reg.
12926 (riscv_expand_epilogue): Update comment. Change argument name and
12927 type. Update code to use new name and type. Pass new args to
12928 riscv_for_each_saved_reg. Only use EH_RETURN_STACKADJ_RTX when
12930 * config/riscv/riscv.md (NORMAL_RETURN): New.
12931 (SIBCALL_RETURN, EXCEPTION_RETURN): New.
12932 (epilogue, sibcall_epilogue): Update riscv_expand_epilogue arg.
12933 (eh_return): Call gen_eh_return_internal and emit barrier.
12934 (eh_return_internal): Call riscv_expand_epilogue.
12936 2018-06-04 Eric Botcazou <ebotcazou@adacore.com>
12938 * gimple-ssa-store-merging.c (struct merged_store_group): Move up
12939 bit_insertion field and declare can_be_merged_into method.
12940 (merged_store_group::can_be_merged_into): New method.
12941 (imm_store_chain_info::coalesce_immediate): Call it to decide whether
12942 consecutive non-overlapping stores can be merged. Turn MEM_REF stores
12943 into BIT_INSERT_EXPR stores if the group contains a non-MEM_REF store.
12945 2018-06-04 Richard Biener <rguenther@suse.de>
12947 PR tree-optimization/85955
12948 * builtins.c (fold_builtin_sincos): Convert pointers to
12949 destination to appropriate type before dereferencing.
12951 2018-06-04 Segher Boessenkool <segher@kernel.crashing.org>
12953 * config/rs6000/rs6000.md (abs<mode>2 for FLOAT128): Handle IFmode.
12955 2018-06-04 Richard Sandiford <richard.sandiford@linaro.org>
12957 * expr.c (expand_expr_real_1): Force the operand into memory if
12958 its TYPE_MODE is BLKmode and if there is no integer mode for
12959 the number of bits being extracted.
12961 2018-06-04 Jakub Jelinek <jakub@redhat.com>
12965 * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
12966 Use vptestnm rather than vptestm in (=Yc,v,C) variant.
12968 2018-06-04 Richard Biener <rguenther@suse.de>
12970 * tree-cfgcleanup.c (cleanup_tree_cfg_1): Fold into...
12971 (cleanup_tree_cfg_noloop): ... single caller. Do
12972 start_recording_case_labels later.
12974 2018-06-04 Sebastian Peryt <sebastian.peryt@intel.com>
12976 * config/i386/cldemoteintrin.h: Change define from _X86INTRIN_H_INCLUDED
12977 to _IMMINTRIN_H_INCLUDED.
12978 * config/i386/pconfigintrin.h: Ditto.
12979 * config/i386/waitpkgintrin.h: Ditto.
12980 * config/i386/immintrin.h: Add includes for sgxintrin.h,
12981 pconfigintrin.h, waitpkgintrin.h and cldemoteintrin.h.
12982 * config/i386/x86intrin.h: Remove includes for mintrin.h, xmmintrin.h,
12983 emmintrin.h, pmmintrin.h, tmmintrin.h, smmintrin.h, wmmintrin.h,
12984 bmiintrin.h, bmi2intrin.h, lzcntintrin.h, sgxintrin.h, pconfigintrin.h,
12985 waitpkgintrin.h and cldemoteintrin.h.
12987 2018-06-04 Richard Biener <rguenther@suse.de>
12989 PR tree-optimization/86038
12990 * tracer.c (find_best_successor): Check probability for
12991 being initialized, bail out if not.
12993 2018-06-04 Richard Earnshaw <rearnsha@arm.com>
12996 * config/arm/arm-cpus.in (ALL_QUIRKS): Add xscale feature to the list
12997 of bits to ignore when comparing architectures.
12999 2018-06-04 Jakub Jelinek <jakub@redhat.com>
13001 PR tree-optimization/69615
13002 * fold-const.c (merge_ranges): If range1 is - [x, x] and x is the
13003 maximum or minimum of the type, try to merge it also as if
13004 range1 is + [-, x - 1] or + [x + 1, -].
13007 * tree.c (inchash::add_expr): Handle IDENTIFIER_NODE.
13009 2018-06-03 Eric Botcazou <ebotcazou@adacore.com>
13011 PR tree-optimization/86034
13012 * gimple-ssa-store-merging.c (output_merged_store): Convert the RHS to
13013 the unsigned bitfield type in a bit insertion sequence if it does not
13014 have a larger precision than the bitfield size.
13015 (process_store): Also bypass widening conversions for BIT_INSERT_EXPR.
13017 2018-06-03 Kito Cheng <kito.cheng@gmail.com>
13019 * config/nds32/nds32-peephole2.md: Add new patterns for code size.
13021 2018-06-03 Chung-Ju Wu <jasonwucj@gmail.com>
13023 * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3J.
13024 * config/nds32/nds32.c (nds32_option_override): Consider ARCH_V3J.
13025 * config/nds32/nds32.h (TARGET_ISA_V3): Add ARCH_V3J checking.
13026 * config/nds32/nds32.opt (march): Add enum value Value(ARCH_V3J).
13028 2018-06-03 Chung-Ju Wu <jasonwucj@gmail.com>
13030 * common/config/nds32/nds32-common.c (nds32_option_optimization_table):
13031 Disable -fdelete-null-pointer-checks for ELF toolchain.
13033 2018-06-02 Chung-Ju Wu <jasonwucj@gmail.com>
13034 Kito Cheng <kito.cheng@gmail.com>
13036 * config.gcc (nds32*): Use nds32-linux.opt and nds32-elf.opt.
13037 (nds32le-*-*, nds32be-*-*): Integrate checking process.
13038 (nds32*-*-*): Add glibc and uclibc conditions.
13039 * common/config/nds32/nds32-common.c (nds32_except_unwind_info): New.
13040 (TARGET_EXCEPT_UNWIND_INFO): Define.
13041 * config/nds32/elf.h: New file.
13042 * config/nds32/linux.h: New file.
13043 * config/nds32/nds32-elf.opt: New file.
13044 * config/nds32/nds32-linux.opt: New file.
13045 * config/nds32/nds32-fp-as-gp.c
13046 (pass_nds32_fp_as_gp::gate): Consider TARGET_LINUX_ABI.
13047 * config/nds32/nds32.c (nds32_conditional_register_usage): Consider
13049 (nds32_asm_file_end): Ditto.
13050 (nds32_print_operand): Ditto.
13051 (nds32_insert_attributes): Ditto.
13052 (nds32_init_libfuncs): New function.
13053 (TARGET_HAVE_TLS): Define.
13054 (TARGET_INIT_LIBFUNCS): Define.
13055 * config/nds32/nds32.h (TARGET_DEFAULT_RELAX): Apply different relax
13057 (TARGET_ELF): Apply different mcmodel setting.
13058 (LINK_SPEC, LIB_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): The content has
13059 been migrated into elf.h and linux.h files.
13060 * config/nds32/nds32.md (add_pc): Consider TARGET_LINUX_ABI.
13061 * config/nds32/nds32.opt (mvh): Consider TARGET_LINUX_ABI.
13062 (mcmodel): The content has been migrated into nds32-elf.opt and
13063 nds32-linux.opt files.
13064 * config/nds32/t-elf: New file.
13065 * config/nds32/t-linux: New file.
13067 2018-06-02 Chung-Ju Wu <jasonwucj@gmail.com>
13068 Shiva Chen <shiva0217@gmail.com>
13070 * config/nds32/constants.md (unspec_volatile_element): Add
13071 UNSPEC_VOLATILE_OMIT_FP_BEGIN and UNSPEC_VOLATILE_OMIT_FP_END.
13072 * config/nds32/nds32-fp-as-gp.c: New implementation of fp_as_gp
13074 * config/nds32/nds32-protos.h (nds32_naked_function_p): Declare.
13075 (make_pass_nds32_fp_as_gp): Declare.
13076 * config/nds32/nds32.c (nds32_register_passes): Add fp_as_gp as one
13078 (nds32_asm_function_end_prologue): Remove unused asm output.
13079 (nds32_asm_function_begin_epilogue): Remove unused asm output.
13080 (nds32_asm_file_start): Output necessary fp_as_gp information.
13081 (nds32_option_override): Adjust register usage.
13082 (nds32_expand_prologue): Consider fp_as_gp situation.
13083 (nds32_expand_prologue_v3push): Consider fp_as_gp situation.
13084 * config/nds32/nds32.md (prologue): Check fp_as_gp_p and naked_p.
13087 (simple_return): Ditto.
13088 (omit_fp_begin): Output special directive for fp_as_gp.
13089 (omit_fp_end): Output special directive for fp_as_gp.
13090 * config/nds32/nds32.opt (mfp-as-gp, mno-fp-as-gp, mforce-fp-as-gp,
13091 mforbid-fp-as-gp): New options.
13093 2018-06-01 Mark Wielaard <mark@klomp.org>
13095 * dwarf2out.c (dwarf2out_finish): Remove generation of
13096 DW_AT_loclists_base.
13098 2018-06-01 Eric Botcazou <ebotcazou@adacore.com>
13100 * gimple-ssa-store-merging.c: Include gimple-fold.h.
13101 (struct store_immediate_info): Document BIT_INSERT_EXPR stores.
13102 (struct merged_store_group): Add bit_insertion field.
13103 (dump_char_array): Use standard hexadecimal format.
13104 (merged_store_group::merged_store_group): Set bit_insertion to false.
13105 (merged_store_group::apply_stores): Use optimal buffer size. Deal
13106 with BIT_INSERT_EXPR stores. Move up code updating the mask and
13107 also print the mask in the dump file.
13108 (pass_store_merging::gate): Minor tweak.
13109 (imm_store_chain_info::coalesce_immediate): Fix wrong association
13110 of stores with groups in dump. Allow coalescing of BIT_INSERT_EXPR
13111 stores with INTEGER_CST stores.
13112 (count_multiple_uses) <BIT_INSERT_EXPR>: New case.
13113 (imm_store_chain_info::output_merged_store): Add try_bitpos variable
13114 and use it throughout. Generate bit insertion sequences if need be.
13115 (pass_store_merging::process_store): Remove redundant condition.
13116 Record stores from a SSA name to a bit-field with BIT_INSERT_EXPR.
13118 2018-06-01 Segher Boessenkool <segher@kernel.crashing.org>
13120 * config/rs6000/rs6000.c (rs6000_mangle_type): Change the mangling of
13121 the 128-bit floating point types. Fix function comment.
13123 2018-06-01 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
13125 * config/aarch64/aarch64-simd.md
13126 (aarch64_simd_vec_unpack<su>_lo_<mode>): Use UXTL and SXTL assembler
13128 (aarch64_simd_vec_unpack<su>_hi_<mode>): Use UXTL2 and SXTL2 assembler
13131 2018-06-01 Richard Sandiford <richard.sandiford@linaro.org>
13133 PR tree-optimization/85989
13134 * gimple-ssa-backprop.c (backprop::m_visited_phis): New member
13136 (backprop::intersect_uses): Check it when deciding whether this
13137 is a backedge reference.
13138 (backprop::process_block): Add each phi to m_visited_phis
13139 after visiting it, then clear it at the end.
13141 2018-06-01 Richard Biener <rguenther@suse.de>
13143 * tree-vectorizer.h (vect_dr_stmt): New function.
13144 (vect_get_load_cost): Adjust.
13145 (vect_get_store_cost): Likewise.
13146 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence):
13147 Use vect_dr_stmt instead of DR_SMTT.
13148 (vect_record_base_alignments): Likewise.
13149 (vect_calculate_target_alignment): Likewise.
13150 (vect_compute_data_ref_alignment): Likewise and make static.
13151 (vect_update_misalignment_for_peel): Likewise.
13152 (vect_verify_datarefs_alignment): Likewise.
13153 (vector_alignment_reachable_p): Likewise.
13154 (vect_get_data_access_cost): Likewise. Pass down
13155 vinfo to vect_get_load_cost/vect_get_store_cost instead of DR.
13156 (vect_get_peeling_costs_all_drs): Likewise.
13157 (vect_peeling_hash_get_lowest_cost): Likewise.
13158 (vect_enhance_data_refs_alignment): Likewise.
13159 (vect_find_same_alignment_drs): Likewise.
13160 (vect_analyze_data_refs_alignment): Likewise.
13161 (vect_analyze_group_access_1): Likewise.
13162 (vect_analyze_group_access): Likewise.
13163 (vect_analyze_data_ref_access): Likewise.
13164 (vect_analyze_data_ref_accesses): Likewise.
13165 (vect_vfa_segment_size): Likewise.
13166 (vect_small_gap_p): Likewise.
13167 (vectorizable_with_step_bound_p): Likewise.
13168 (vect_prune_runtime_alias_test_list): Likewise.
13169 (vect_analyze_data_refs): Likewise.
13170 (vect_supportable_dr_alignment): Likewise.
13171 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
13172 (vect_gen_prolog_loop_niters): Likewise.
13173 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
13174 * tree-vect-patterns.c (vect_recog_bool_pattern): Do not
13176 (vect_recog_mask_conversion_pattern): Likewise.
13177 (vect_try_gather_scatter_pattern): Likewise.
13178 * tree-vect-stmts.c (vect_model_store_cost): Pass stmt_info
13179 to vect_get_store_cost.
13180 (vect_get_store_cost): Get stmt_info instead of DR.
13181 (vect_model_load_cost): Pass stmt_info to vect_get_load_cost.
13182 (vect_get_load_cost): Get stmt_info instead of DR.
13184 2018-06-01 Richard Biener <rguenther@suse.de>
13186 PR middle-end/86017
13187 * gimple-fold.c (var_decl_component_p): Also allow offsetted
13188 vars wrapped in MEM_REFs.
13190 2018-06-01 Richard Sandiford <richard.sandiford@linaro.org>
13192 * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
13193 Fix subreg tests so that we only return a choice between
13194 GENERAL_REGS and FP_REGS if the original classes included both.
13196 2018-06-01 Richard Biener <rguenther@suse.de>
13199 * tree-ssa-structalias.c (get_function_part_constraint):
13200 Handle NULL fi->decl.
13201 (find_func_aliases_for_call): Properly handle indirect
13202 fi from direct call.
13203 (find_func_clobbers): Likewise.
13204 (ipa_pta_execute): Likewise.
13205 (create_variable_info_for): For functions that are ifunc_resolver
13206 resolve to a varinfo that contains the result of the resolver call.
13207 (associate_varinfo_to_alias): Do not treat ifunc resolvers as
13210 2018-05-31 Michael Collison <michael.collison@arm.com>
13212 * config/aarch64/aarch64.md:
13213 (*fix_to_zero_extenddfdi2): New pattern.
13214 * gcc.target/aarch64/fix_extend1.c: New testcase.
13216 2018-05-31 Qing Zhao <qing.zhao@oracle.com>
13218 PR middle-end/78809
13219 PR middle-end/83026
13220 * builtins.c (expand_builtin): Add the handling of BUILT_IN_STRCMP_EQ
13221 and BUILT_IN_STRNCMP_EQ.
13222 * builtins.def: Add new builtins BUILT_IN_STRCMP_EQ and
13223 BUILT_IN_STRNCMP_EQ.
13224 * gimple-fold.c (gimple_fold_builtin_string_compare): Add the
13225 handling of BUILTIN_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
13226 (gimple_fold_builtin): Likewise.
13227 * tree-ssa-strlen.c (compute_string_length): New function.
13228 (determine_min_obsize): New function.
13229 (handle_builtin_string_cmp): New function to handle calls to
13230 string compare functions.
13231 (strlen_optimize_stmt): Add handling to builtin string compare
13233 * tree-ssa-structalias.c (find_func_aliases_for_builtin_call):
13234 Add the handling of BUILT_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
13235 * tree.c (build_common_builtin_nodes): Add new defines of
13236 BUILT_IN_STRNCMP_EQ and BUILT_IN_STRCMP_EQ.
13238 2018-05-31 Jakub Jelinek <jakub@redhat.com>
13241 * bb-reorder.c (pass_partition_blocks::gate): Return false for
13242 functions with naked attribute.
13244 2018-05-31 Uros Bizjak <ubizjak@gmail.com>
13246 * config/i386/sse.md (avx_vec_concat<mode>):
13247 Substitute concat_tg_mode mode attribute with xtg_mode.
13248 (<mask_codefor>avx512dq_broadcast<mode><mask_name>_1): Ditto.
13249 (concat_tg_mode): Remove mode attribute.
13251 2018-05-31 Martin Sebor <msebor@redhat.com>
13254 * calls.c (alloc_max_size): Correct a logic error/typo.
13255 Treat excessive arguments as infinite. Warn for invalid arguments.
13256 * doc/invoke.texi (-Walloc-size-larger-than): Update.
13258 2018-05-31 H.J. Lu <hongjiu.lu@intel.com>
13261 * config/i386/x86-tune.def: Re-enable partial_reg_dependency
13262 and movx for Haswell.
13264 2018-05-31 Chung-Lin Tang <cltang@codesourcery.com>
13265 Cesar Philippidis <cesar@codesourcery.com>
13267 PR middle-end/85879
13268 * gimplify.c (gimplify_adjust_omp_clauses): Add 'remove = true'
13269 when emitting error on private/firstprivate reductions.
13270 * omp-low.c (lower_omp_target): Avoid reference-type processing
13271 on pointers for firstprivate clause.
13273 2018-05-31 Sameera Deshpande <sameera.deshpande@linaro.org>
13275 * config/aarch64/aarch64-simd-builtins.def (ld1x3): New.
13278 * config/aarch64/aarch64-simd.md
13279 (aarch64_ld1x3<VALLDIF:mode>): New pattern.
13280 (aarch64_ld1_x3_<mode>): Likewise
13281 (aarch64_st1x2<VALLDIF:mode>): Likewise
13282 (aarch64_st1_x2_<mode>): Likewise
13283 (aarch64_st1x3<VALLDIF:mode>): Likewise
13284 (aarch64_st1_x3_<mode>): Likewise
13285 * config/aarch64/arm_neon.h (vld1_u8_x3): New function.
13286 (vld1_s8_x3): Likewise.
13287 (vld1_u16_x3): Likewise.
13288 (vld1_s16_x3): Likewise.
13289 (vld1_u32_x3): Likewise.
13290 (vld1_s32_x3): Likewise.
13291 (vld1_u64_x3): Likewise.
13292 (vld1_s64_x3): Likewise.
13293 (vld1_f16_x3): Likewise.
13294 (vld1_f32_x3): Likewise.
13295 (vld1_f64_x3): Likewise.
13296 (vld1_p8_x3): Likewise.
13297 (vld1_p16_x3): Likewise.
13298 (vld1_p64_x3): Likewise.
13299 (vld1q_u8_x3): Likewise.
13300 (vld1q_s8_x3): Likewise.
13301 (vld1q_u16_x3): Likewise.
13302 (vld1q_s16_x3): Likewise.
13303 (vld1q_u32_x3): Likewise.
13304 (vld1q_s32_x3): Likewise.
13305 (vld1q_u64_x3): Likewise.
13306 (vld1q_s64_x3): Likewise.
13307 (vld1q_f16_x3): Likewise.
13308 (vld1q_f32_x3): Likewise.
13309 (vld1q_f64_x3): Likewise.
13310 (vld1q_p8_x3): Likewise.
13311 (vld1q_p16_x3): Likewise.
13312 (vld1q_p64_x3): Likewise.
13313 (vst1_s64_x2): Likewise.
13314 (vst1_u64_x2): Likewise.
13315 (vst1_f64_x2): Likewise.
13316 (vst1_s8_x2): Likewise.
13317 (vst1_p8_x2): Likewise.
13318 (vst1_s16_x2): Likewise.
13319 (vst1_p16_x2): Likewise.
13320 (vst1_s32_x2): Likewise.
13321 (vst1_u8_x2): Likewise.
13322 (vst1_u16_x2): Likewise.
13323 (vst1_u32_x2): Likewise.
13324 (vst1_f16_x2): Likewise.
13325 (vst1_f32_x2): Likewise.
13326 (vst1_p64_x2): Likewise.
13327 (vst1q_s8_x2): Likewise.
13328 (vst1q_p8_x2): Likewise.
13329 (vst1q_s16_x2): Likewise.
13330 (vst1q_p16_x2): Likewise.
13331 (vst1q_s32_x2): Likewise.
13332 (vst1q_s64_x2): Likewise.
13333 (vst1q_u8_x2): Likewise.
13334 (vst1q_u16_x2): Likewise.
13335 (vst1q_u32_x2): Likewise.
13336 (vst1q_u64_x2): Likewise.
13337 (vst1q_f16_x2): Likewise.
13338 (vst1q_f32_x2): Likewise.
13339 (vst1q_f64_x2): Likewise.
13340 (vst1q_p64_x2): Likewise.
13341 (vst1_s64_x3): Likewise.
13342 (vst1_u64_x3): Likewise.
13343 (vst1_f64_x3): Likewise.
13344 (vst1_s8_x3): Likewise.
13345 (vst1_p8_x3): Likewise.
13346 (vst1_s16_x3): Likewise.
13347 (vst1_p16_x3): Likewise.
13348 (vst1_s32_x3): Likewise.
13349 (vst1_u8_x3): Likewise.
13350 (vst1_u16_x3): Likewise.
13351 (vst1_u32_x3): Likewise.
13352 (vst1_f16_x3): Likewise.
13353 (vst1_f32_x3): Likewise.
13354 (vst1_p64_x3): Likewise.
13355 (vst1q_s8_x3): Likewise.
13356 (vst1q_p8_x3): Likewise.
13357 (vst1q_s16_x3): Likewise.
13358 (vst1q_p16_x3): Likewise.
13359 (vst1q_s32_x3): Likewise.
13360 (vst1q_s64_x3): Likewise.
13361 (vst1q_u8_x3): Likewise.
13362 (vst1q_u16_x3): Likewise.
13363 (vst1q_u32_x3): Likewise.
13364 (vst1q_u64_x3): Likewise.
13365 (vst1q_f16_x3): Likewise.
13366 (vst1q_f32_x3): Likewise.
13367 (vst1q_f64_x3): Likewise.
13368 (vst1q_p64_x3): Likewise.
13370 2018-05-30 Jozef Lawrynowicz <jozef.l@mittosystems.com>
13372 * config/msp430/msp430.c (msp430_output_labelref): Prepend
13373 user_label_prefix to name.
13375 * tree-core.h: Update comment about the format of NAME string
13376 passed to handler in attribute_spec.
13378 * config/msp430/msp430.md: Remove erroneous subreg expression from
13379 zero_extendqisi2 insn pattern. Remove msp430x ISA restriction on
13380 zero_extend{q,h}isi2.
13382 2018-05-30 Borislav Petkov <bp@suse.de>
13384 * doc/extend.texi: Document some architecture specific
13385 constraints and sort entries.
13387 2018-05-30 Martin Sebor <msebor@redhat.com>
13389 PR middle-end/85369
13390 * builtins.c (expand_builtin_stpcpy_1): New function.
13391 (expand_builtin_stpcpy): Call it, and call maybe_warn_nonstring_arg
13392 only if the former succeeds.
13394 2018-05-31 Sameera Deshpande <sameera.deshpande@linaro.org>
13396 * config/aarch64/aarch64-cores.def (saphira) : Add support for ARMv8.4
13399 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
13401 * doc/invoke.texi (-flinker-output): Document
13403 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
13405 * passes.c (ipa_write_summaries): Only modify statements if body
13407 * cgraphunit.c (ipa_passes): Also produce intermeidate code when
13408 incrementally linking.
13409 (ipa_passes): Likewise.
13410 * lto-cgraph.c (lto_output_node): When incrementally linking do not
13411 pass down resolution info.
13412 * common.opt (flag_incremental_link): Update info.
13413 * gcc.c (plugin specs): Turn flinker-output=* to
13414 -plugin-opt=-linker-output-known
13415 * toplev.c (compile_file): Also cut compilation when doing incremental
13417 * flag-types. (enum lto_partition_model): Add
13418 LTO_LINKER_OUTPUT_NOLTOREL.
13419 (invoke.texi): Add -flinker-output docs.
13420 * ipa.c (symbol_table::remove_unreachable_nodes): Handle LTO incremental
13421 link same way as WPA; do not stream in dead initializers.
13423 * dwarf2out.c (dwarf2out_die_ref_for_decl,
13424 darf2out_register_external_decl): Support incremental link.
13426 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
13428 * lto-opts.c (lto_write_options): Skip OPT_dumpdir, OPT_fresolution_.
13430 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
13432 * lto-wrapper.c (debug_objcopy): Add rename parameter; pass
13433 it down to simple_object_copy_lto_debug_sections.
13434 (run_gcc): Determine incremental LTO link time and configure
13435 lto1 into non-wpa mode, disable renaming of debug sections.
13437 2018-05-30 Kelvin Nilsen <kelvin@gcc.gnu.org>
13439 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
13440 descriptions of various incorrectly documented functions.
13442 2018-05-30 Andre Vieira <andre.simoesdiasvieira@arm.com>
13445 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
13446 address check not strict.
13448 2018-05-30 Richard Biener <rguenther@suse.de>
13450 PR tree-optimization/85964
13451 * tracer.c (better_p): Drop initialized count check, we only
13452 call the function with initialized counts now.
13453 (find_best_successor): Do find a best edge if one
13454 has uninitialized count.
13455 (find_best_predecessor): Likewise. Do BB frequency check only
13456 if count is initialized.
13458 2017-05-30 Jackson Woodruff <jackson.woodruff@arm.com>
13460 * config/aarch64/aarch64.c (aarch64_host_wide_int_compare): New.
13461 (aarch64_ldrstr_offset_compare): New.
13462 (aarch64_operands_adjust_ok_for_ldpstp): Update to consider all
13463 load/store orderings.
13464 (aarch64_gen_adjusted_ldpstp): Likewise.
13466 2018-05-30 Wilco Dijkstra <wdijkstr@arm.com>
13468 * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
13469 Check for subset of GENERAL_REGS and FP_REGS.
13470 * config/aarch64/aarch64-simd.md (aarch64_get_lane): Increase cost of
13473 2018-05-30 Richard Sandiford <richard.sandiford@linaro.org>
13475 * alias.c (adjust_offset_for_component_ref): Use poly_int_tree_p
13476 and wi::to_poly_offset. Add the current offset and then check
13477 whether the sum fits, rather than using an unchecked addition of
13478 a checked term. Check for a shwi rather than a uhwi.
13479 * expr.c (get_bit_range): Use tree_to_poly_uint64.
13480 (store_constructor): Use poly_int_tree_p.
13481 (expand_expr_real_1): Likewise.
13482 * function.c (assign_temp): Likewise.
13483 * fold-const.c (const_binop): Use poly_int_tree_p and
13484 wi::to_poly_offset.
13485 (fold_indirect_ref_1): Likewise. Use multiple_p to attempt an exact
13487 * ipa-icf-gimple.c (func_checker::compare_operand): Use
13488 to_poly_offset for MEM offsets.
13489 * ipa-icf.c (sem_variable::equals): Likewise.
13490 * stor-layout.c (compute_record_mode): Use poly_int_tree_p.
13491 * tree-ssa-sccvn.c (ao_ref_init_from_vn_reference): Use
13492 wi::to_poly_offset for BIT_FIELD_REF offsets.
13493 (vn_reference_maybe_forwprop_address): Use poly_int_tree_p and
13494 wi::to_poly_offset.
13495 * var-tracking.c (emit_note_insn_var_location): Use
13496 tree_to_poly_uint64.
13498 2018-05-29 Jim Wilson <jimw@sifive.com>
13500 * config/riscv/riscv.c (riscv_interrupt_type): Fix comment typo.
13502 2018-05-29 Uros Bizjak <ubizjak@gmail.com>
13505 * config/i386/i386.md (l<rounding_insn><MODEF:mode><SWI48:mode>2):
13506 Enable for TARGET_SSE4_1 and generate rounds{s,d} and cvtts{s,d}2si{,q}
13508 (sse4_1_round<mode>2): Use nonimmediate_operand
13509 for operand 1 predicate.
13511 2018-05-29 Martin Sebor <msebor@redhat.com>
13512 Richard Biener <rguenther@suse.de>
13515 * calls.c (get_size_range): Call determine_value_range instead
13516 of get_value_range..
13517 * tree-vrp.h (determine_value_range): Declared new function.
13518 * tree-vrp.c (determine_value_range_1, determine_value_range): New.
13520 2018-05-29 Richard Biener <rguenther@suse.de>
13522 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Make
13523 sure to use non-pattern stmts for get_earlier_stmt arguments.
13524 * tree-vectorizer.h (get_earlier_stmt): Assert we do not get
13525 called on pattern stmts.
13526 (get_later_stmt): Likewise.
13528 2018-05-29 Martin Liska <mliska@suse.cz>
13530 PR gcov-profile/85759
13531 * doc/gcov.texi: Document GCOV_ERROR_FILE and GCOV_EXIT_AT_ERROR
13534 2018-05-29 Jakub Jelinek <jakub@redhat.com>
13536 * tree-cfg.c (verify_gimple_assign_unary): Add checking for
13538 (verify_gimple_assign_binary): Check TYPE_VECTOR_SUBPARTS for
13542 * tree.def (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
13543 VEC_PACK_FLOAT_EXPR): New tree codes.
13544 * tree-pretty-print.c (op_code_prio): Handle
13545 VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR.
13546 (dump_generic_node): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
13547 VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
13548 * tree-inline.c (estimate_operator_cost): Likewise.
13549 * gimple-pretty-print.c (dump_binary_rhs): Handle VEC_PACK_FLOAT_EXPR.
13550 * fold-const.c (const_binop): Likewise.
13551 (const_unop): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR and
13552 VEC_UNPACK_FIX_TRUNC_LO_EXPR.
13553 * tree-cfg.c (verify_gimple_assign_unary): Likewise.
13554 (verify_gimple_assign_binary): Handle VEC_PACK_FLOAT_EXPR.
13555 * cfgexpand.c (expand_debug_expr): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
13556 VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
13557 * expr.c (expand_expr_real_2): Likewise.
13558 * optabs.def (vec_packs_float_optab, vec_packu_float_optab,
13559 vec_unpack_sfix_trunc_hi_optab, vec_unpack_sfix_trunc_lo_optab,
13560 vec_unpack_ufix_trunc_hi_optab, vec_unpack_ufix_trunc_lo_optab): New
13562 * optabs.c (expand_widen_pattern_expr): For
13563 VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR use
13564 sign from result type rather than operand's type.
13565 (expand_binop_directly): For vec_packu_float_optab and
13566 vec_packs_float_optab allow result type to be different from operand's
13568 * optabs-tree.c (optab_for_tree_code): Handle
13569 VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
13570 VEC_PACK_FLOAT_EXPR. Formatting fixes.
13571 * tree-vect-generic.c (expand_vector_operations_1): Handle
13572 VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
13573 VEC_PACK_FLOAT_EXPR.
13574 * tree-vect-stmts.c (supportable_widening_operation): Handle
13576 (supportable_narrowing_operation): Handle FLOAT_EXPR.
13577 * config/i386/i386.md (fixprefix, floatprefix): New code attributes.
13578 * config/i386/sse.md (*float<floatunssuffix>v2div2sf2): Rename to ...
13579 (float<floatunssuffix>v2div2sf2): ... this. Formatting fix.
13580 (vpckfloat_concat_mode, vpckfloat_temp_mode, vpckfloat_op_mode): New
13582 (vec_pack<floatprefix>_float_<mode>): New expander.
13583 (vunpckfixt_mode, vunpckfixt_model, vunpckfixt_extract_mode): New mode
13585 (vec_unpack_<fixprefix>fix_trunc_lo_<mode>,
13586 vec_unpack_<fixprefix>fix_trunc_hi_<mode>): New expanders.
13587 * doc/md.texi (vec_packs_float_@var{m}, vec_packu_float_@var{m},
13588 vec_unpack_sfix_trunc_hi_@var{m}, vec_unpack_sfix_trunc_lo_@var{m},
13589 vec_unpack_ufix_trunc_hi_@var{m}, vec_unpack_ufix_trunc_lo_@var{m}):
13591 * doc/generic.texi (VEC_UNPACK_FLOAT_HI_EXPR,
13592 VEC_UNPACK_FLOAT_LO_EXPR): Fix pasto in description.
13593 (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
13594 VEC_PACK_FLOAT_EXPR): Document.
13596 2018-05-29 Richard Biener <rguenther@suse.de>
13598 * tree-vectorizer.h (struct vec_info): Add stmt_vec_infos
13600 (stmt_vec_info_vec): Make pointer.
13601 (init_stmt_vec_info_vec): Remove.
13602 (free_stmt_vec_info_vec): Likewise.
13603 (set_stmt_vec_info_vec): New function.
13604 (free_stmt_vec_infos): Likewise.
13605 (vinfo_for_stmt): Adjust for stmt_vec_info_vec indirection.
13606 (set_vinfo_for_stmt): Likewise.
13607 (get_earlier_stmt): Likewise.
13608 (get_later_stmt): Likewise.
13609 * tree-vectorizer.c (stmt_vec_info_vec): Make pointer.
13610 (vec_info::vec_info): Allocate stmt_vec_infos and set the global.
13611 (vec_info::~vec_info): Free stmt_vec_infos.
13612 (vectorize_loops): Set the global stmt_vec_info_vec to NULL.
13613 Remove old init_stmt_vec_info_vec/free_stmt_vec_info_vec calls.
13614 (pass_slp_vectorize::execute): Likewise.
13615 * tree-vect-stmts.c (init_stmt_vec_info_vec): Remove.
13616 (free_stmt_vec_info_vec): Likewise.
13617 (set_stmt_vec_info_vec): New function.
13618 (free_stmt_vec_infos): Likewise.
13619 * tree-vect-loop.c (_loop_vec_info::~_loop_vec_info): Set
13620 the global stmt_vec_info_vec.
13621 * tree-parloops.c (gather_scalar_reductions): Use
13622 set_stmt_vec_info_vec/free_stmt_vec_infos and maintain a local
13625 2018-05-29 Richard Biener <rguenther@suse.de>
13627 * dominance.c (iterate_fix_dominators): Push/pop TV_DOMINANCE.
13629 2018-05-29 Martin Liska <mliska@suse.cz>
13630 David Malcolm <dmalcolm@redhat.com>
13632 * vec.c (test_reverse): New.
13633 (vec_c_tests): Add new test.
13634 * vec.h (vl_ptr>::reverse): New function.
13636 2018-05-29 Gerald Pfeifer <gerald@pfeifer.com>
13638 * config.gcc: Identify FreeBSD 3.x and 4.x as unsupported.
13640 * config/freebsd-spec.h (FBSD_LIB_SPEC): Only consider FreeBSD 5
13643 2018-05-28 Bernd Edlinger <bernd.edlinger@hotmail.de>
13645 * tree-dump.c (dump_node): Use splay_tree_delete_pointers.
13647 2018-05-28 Richard Biener <rguenther@suse.de>
13649 PR tree-optimization/85933
13650 * tree-vect-data-refs.c (vect_record_base_alignments): Only
13651 look at stmts marked as vectorizable.
13653 2018-05-28 Richard Biener <rguenther@suse.de>
13655 PR tree-optimization/85934
13656 * tree-vect-generic.c (expand_vector_operations_1): Hoist
13657 vector boolean check before scalar optimization.
13659 2018-05-28 Jakub Jelinek <jakub@redhat.com>
13661 * doc/invoke.texi (ARM Options): Use @item instead of @itemx
13664 2018-05-28 Mark Wielaard <mark@klomp.org>
13666 * dwarf2asm.c (dw2_asm_output_delta_uleb128): Add brackets around lab2
13667 if it is an expression containing a minus sign.
13669 2018-05-27 John David Anglin <danglin@gcc.gnu.org>
13671 * config/pa/pa-linux.h (NEED_INDICATE_EXEC_STACK): Define to 0.
13673 2018-05-27 Paul Koning <ni1d@arrl.net>
13675 * config/pdp11/pdp11.md (truncsihi2): Remove.
13677 2018-05-27 Monk Chiang <sh.chiang04@gmail.com>
13678 Chung-Ju Wu <jasonwucj@gmail.com>
13680 * config/nds32/nds32-intrinsic.md (unaligned_storedi): Modify patterns
13682 (unaligned_store_dw): Ditto.
13683 * config/nds32/nds32-memory-manipulation.c
13684 (nds32_expand_movmemsi_loop_known_size): Refactoring implementation.
13685 (nds32_gen_dup_4_byte_to_word_value): Rename to ...
13686 (nds32_gen_dup_4_byte_to_word_value_aux): ... this.
13687 (emit_setmem_word_loop): Rename to ...
13688 (emit_setmem_doubleword_loop): ... this.
13689 (nds32_gen_dup_4_byte_to_word_value): New function.
13690 (nds32_gen_dup_8_byte_to_double_word_value): New function.
13691 (nds32_expand_setmem_loop): Refine implementation.
13692 (nds32_expand_setmem_loop_v3m): Ditto.
13693 * config/nds32/nds32-multiple.md (unaligned_store_update_base_dw): New
13696 2018-05-27 Chung-Ju Wu <jasonwucj@gmail.com>
13698 * config/nds32/nds32.md (bswapsi2, bswaphi2): New patterns.
13700 2018-05-27 Chung-Ju Wu <jasonwucj@gmail.com>
13702 * config/nds32/nds32.c (nds32_attribute_table): Add "no_prologue".
13703 (nds32_init_machine_status): Initialize machine->attr_naked_p and
13704 machine->attr_no_prologue_p.
13705 (nds32_compute_stack_frame): Check "naked" and "no_prologue" attributes.
13706 (nds32_naked_function_p): Handle "naked" and "no_prologue" attributes.
13707 (nds32_expand_epilogue): Consider attr_naked_p.
13708 (nds32_expand_epilogue_v3pop): Likewise.
13709 (nds32_can_use_return_insn): Likewise.
13710 * config/nds32/nds32.h (machine_function): Add attr_naked_p and
13711 attr_no_prologue_p fields.
13712 * config/nds32/nds32.opt (mret-in-naked-func): New option.
13714 2018-05-27 Jakub Jelinek <jakub@redhat.com>
13717 * config/i386/i386.md (fixunssuffix, floatunssuffix): New code
13719 * config/i386/sse.md
13720 (<floatsuffix>float<sseintvecmodelower><mode>2<mask_name><round_name>):
13722 (float<floatunssuffix><sseintvecmodelower><mode>2<mask_name><round_name>):
13724 (<floatsuffix>float<sselongvecmodelower><mode>2<mask_name><round_name>):
13726 (float<floatunssuffix><sselongvecmodelower><mode>2<mask_name><round_name>):
13728 (*<floatsuffix>floatv2div2sf2): Rename to ...
13729 (*float<floatunssuffix>v2div2sf2): ... this.
13730 (<floatsuffix>floatv2div2sf2_mask): Rename to ...
13731 (float<floatunssuffix>v2div2sf2_mask): ... this.
13732 (*<floatsuffix>floatv2div2sf2_mask_1): Rename to ...
13733 (*float<floatunssuffix>v2div2sf2_mask_1): ... this.
13734 (<fixsuffix>fix_truncv8dfv8si2<mask_name><round_saeonly_name>): Rename
13736 (fix<fixunssuffix>_truncv8dfv8si2<mask_name><round_saeonly_name>):
13738 (<fixsuffix>fix_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
13740 (fix<fixunssuffix>_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
13742 (<fixsuffix>fix_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
13744 (fix<fixunssuffix>_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
13746 (<fixsuffix>fix_truncv2sfv2di2<mask_name>): Rename to ...
13747 (fix<fixunssuffix>_truncv2sfv2di2<mask_name>): ... this.
13748 (vec_pack_ufix_trunc_<mode>): Use gen_fixuns_truncv8dfv8si2 instead of
13749 gen_ufix_truncv8dfv8si2.
13750 * config/i386/i386-builtin.def (__builtin_ia32_cvttpd2uqq256_mask,
13751 __builtin_ia32_cvttpd2uqq128_mask, __builtin_ia32_cvttps2uqq256_mask,
13752 __builtin_ia32_cvttps2uqq128_mask, __builtin_ia32_cvtuqq2ps256_mask,
13753 __builtin_ia32_cvtuqq2ps128_mask, __builtin_ia32_cvtuqq2pd256_mask,
13754 __builtin_ia32_cvtuqq2pd128_mask, __builtin_ia32_cvttpd2udq512_mask,
13755 __builtin_ia32_cvtuqq2ps512_mask, __builtin_ia32_cvtuqq2pd512_mask,
13756 __builtin_ia32_cvttps2uqq512_mask, __builtin_ia32_cvttpd2uqq512_mask):
13757 Use fixuns instead ufix or floatuns instead ufloat in CODE_FOR_ names.
13759 2018-05-24 H.J. Lu <hongjiu.lu@intel.com>
13763 * varasm.c (assemble_alias): Lookup ifunc attribute on error.
13765 2018-05-25 Jim Wilson <jimw@sifive.com>
13767 * config/riscv/riscv-protos.h (riscv_epilogue_uses): New.
13768 * config/riscv/riscv.c (struct machine_function): Add
13769 interrupt_handler_p and attribute_checked_p fields.
13770 (riscv_attribute_table): Add interrupt.
13771 (riscv_interrupt_type_p): New.
13772 (riscv_save_reg_p): Save extra regs for interrupt handler.
13773 (riscv_use_save_libcall): Return false for interrupt handler.
13774 (riscv_first_stack_step): Add forward declaration.
13775 (riscv_compute_frame_info): New local interrupt_save_t1. Set it
13776 for interrupt handler with large frame. Use it for saved reg list.
13777 (riscv_expand_prologue): Move flag_stack_usage_info support to
13778 eliminate duplication.
13779 (riscv_expand_epilogue): Generate mret for interrupt handler.
13780 (riscv_epilogue_uses): New.
13781 (riscv_can_use_return_insn): Return false for interrupt handler.
13782 (riscv_function_ok_for_sibcall): Likewise.
13783 (riscv_set_current_function): Add interrupt handler support.
13784 * config/riscv/riscv.h (EPILOGUE_USES): Call riscv_epilogue_uses.
13785 * config/riscv/riscv.md (UNSPECV_MRET): New.
13787 (riscv_frflags, riscv_fsflags): Use tab after opcode.
13789 * doc/extend.texi (RISC-V Function Attributes) <interrupt>: New.
13791 2018-05-25 Bill Schmidt <wschmidt@linux.ibm.com>
13793 PR tree-optimization/85712
13794 * gimple-ssa-strength-reduction.c (replace_one_candidate): Skip if
13795 this candidate has already been replaced in-situ by a copy.
13797 2018-05-25 Jason Merrill <jason@redhat.com>
13799 PR c++/80485 - inline function non-zero address.
13800 * symtab.c (nonzero_address): Check DECL_COMDAT.
13802 2018-05-25 Uros Bizjak <ubizjak@gmail.com>
13805 * config/alpha/alpha.md (ashlsi3): New insn pattern.
13806 (*ashlsi_se): Rename from *ashldi_se. Define as sign
13807 extension of SImode operation. Use const123_operand predicate.
13808 (*saddsi_1): Remove.
13809 (*saddl_se_1): Ditto.
13810 (*ssubsi_1): Ditto.
13811 (*ssubl_se_1): Ditto.
13812 * config/alpha/predicates.md (const123_operand): New predicate.
13813 * config/alpha/constraints.md (P): Use IN_RANGE.
13815 2018-05-25 Richard Biener <rguenther@suse.de>
13817 * tree-ssa-alias.h (refs_may_alias_p): Add tbaa_p bool parameter,
13819 (ref_maybe_used_by_stmt_p): Likewise.
13820 (stmt_may_clobber_ref_p): Likewise.
13821 (stmt_may_clobber_ref_p_1): Likewise.
13822 * tree-ssa-alias.c (refs_may_alias_p): Add tbaa_p bool parameter
13824 (ref_maybe_used_by_stmt_p): Likewise.
13825 (stmt_may_clobber_ref_p): Likewise.
13826 (stmt_may_clobber_ref_p_1): Likewise.
13827 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Use
13828 the alias oracle to disambiguate DRs with stmts DR analysis
13830 (vect_analyze_data_refs): Do not give up on not analyzable
13831 DRs for BB vectorization. Remove code truncating the dataref
13834 2018-05-25 Jakub Jelinek <jakub@redhat.com>
13837 * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
13838 Add (=Yk,v,C) variant using vptestm insn. Use TARGET_AVX512BW
13839 in test instead of TARGET_AVX512F for VI12_AVX512VL iterator.
13841 2018-05-25 Richard Biener <rguenther@suse.de>
13843 * tree-vect-data-refs.c (vect_find_stmt_data_reference): New
13844 function, combining stmt data ref gathering and fatal analysis
13846 (vect_analyze_data_refs): Remove now redudnant code and simplify.
13847 * tree-vect-loop.c (vect_get_datarefs_in_loop): Factor out from
13848 vect_analyze_loop_2 and use vect_find_stmt_data_reference.
13849 * tree-vect-slp.c (vect_slp_bb): Use vect_find_stmt_data_reference.
13850 * tree-vectorizer.h (vect_find_stmt_data_reference): Declare.
13852 2018-05-25 Bin Cheng <bin.cheng@arm.com>
13854 PR tree-optimization/85720
13855 * tree-loop-distribution.c (break_alias_scc_partitions): Don't merge
13856 SCC if all partitions are builtins.
13857 (version_loop_by_alias_check): New parameter. Generate cancelable
13858 runtime alias check if all partitions are builtins.
13859 (distribute_loop): Update call to above function.
13861 2018-05-25 Bin Cheng <bin.cheng@arm.com>
13863 * tree-outof-ssa.c (tree-ssa.h, tree-dfa.h): Include header files.
13864 (create_default_def, for_all_parms): Moved from tree-ssa-coalesce.c.
13865 (parm_default_def_partition_arg): Ditto.
13866 (set_parm_default_def_partition): Ditto.
13867 (get_parm_default_def_partitions): Ditto and make it static.
13868 (get_undefined_value_partitions): Ditto and make it static.
13869 (remove_ssa_form): Refactor call to init_var_map here.
13870 * tree-ssa-coalesce.c (build_ssa_conflict_graph): Support live range
13871 computation for loop region.
13872 (coalesce_partitions, compute_optimized_partition_bases): Ditto.
13873 (register_default_def): Delete.
13874 (for_all_parms, create_default_def): Move to tree-outof-ssa.c.
13875 (parm_default_def_partition_arg): Ditto.
13876 (set_parm_default_def_partition): Ditto.
13877 (get_parm_default_def_partitions): Ditto and make it static.
13878 (get_undefined_value_partitions): Ditto and make it static.
13879 (coalesce_with_default, coalesce_with_default): Update comment.
13880 (create_coalesce_list_for_region): New func factored out from
13881 create_outofssa_var_map.
13882 (populate_coalesce_list_for_outofssa): New func factored out from
13883 create_outofssa_var_map and coalesce_ssa_name.
13884 (create_outofssa_var_map): Delete.
13885 (coalesce_ssa_name): Refactor to support live range computation.
13886 * tree-ssa-coalesce.h (coalesce_ssa_name): Change decl.
13887 (get_parm_default_def_partitions): Delete.
13888 (get_undefined_value_partitions): Ditto.
13889 * tree-ssa-live.c (init_var_map, delete_var_map): Support live range
13890 computation for loop region.
13891 (new_tree_live_info, loe_visit_block): Ditto.
13892 (live_worklist, set_var_live_on_entry): Ditto.
13893 (calculate_live_on_exit, verify_live_on_entry): Ditto.
13894 * tree-ssa-live.h (struct _var_map): New fields.
13895 (init_var_map): Change decl.
13896 (region_contains_p): New.
13898 2018-05-25 Bin Cheng <bin.cheng@arm.com>
13900 * tree-ssa-live.h (live_merge_and_clear): Delete.
13902 2018-05-25 Richard Biener <rguenther@suse.de>
13905 * tree-dump.c (dequeue_and_dump): Remove access to removed
13906 operand 2 of a SWITCH_EXPR.
13908 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
13910 * doc/sourcebuild.texi (vect_double_cond_arith): Include
13911 multiplication and division.
13912 * doc/md.texi (cond_mul@var{m}, cond_div@var{m}, cond_mod@var{m})
13913 (cond_udiv@var{m}, cond_umod@var{m}): Document.
13914 * optabs.def (cond_smul_optab, cond_sdiv_optab, cond_smod_optab)
13915 (cond_udiv_optab, cond_umod_optab): New optabs.
13916 * internal-fn.def (IFN_COND_MUL, IFN_COND_DIV, IFN_COND_MOD)
13917 (IFN_COND_RDIV): New internal functions.
13918 * internal-fn.c (get_conditional_internal_fn): Handle TRUNC_DIV_EXPR,
13919 TRUNC_MOD_EXPR and RDIV_EXPR.
13920 * match.pd (UNCOND_BINARY, COND_BINARY): Handle them.
13921 * config/aarch64/iterators.md (UNSPEC_COND_MUL, UNSPEC_COND_DIV):
13923 (SVE_INT_BINARY): Include mult.
13924 (SVE_COND_FP_BINARY): Include UNSPEC_MUL and UNSPEC_DIV.
13925 (optab, sve_int_op): Handle mult.
13926 (optab, sve_fp_op, commutative): Handle UNSPEC_COND_MUL and
13928 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New pattern
13929 for SVE_INT_BINARY_SD.
13931 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
13933 * config/aarch64/iterators.md (SVE_INT_BINARY_SD): New code iterator.
13934 (optab, sve_int_op): Handle div and udiv.
13935 * config/aarch64/aarch64-sve.md (<optab><mode>3): New expander
13936 for SVE_INT_BINARY_SD.
13937 (*<optab><mode>3): New insn for the same.
13939 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
13941 * tree-vect-patterns.c: Include predict.h.
13942 (vect_recog_divmod_pattern): Restrict check for division support
13943 to when optimizing for size.
13945 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
13947 * doc/sourcebuild.texi (vect_double_cond_arith: Document.
13948 * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 4.
13949 (gimple_match_op::gimple_match_op): Add an overload for 4 operands.
13950 (gimple_match_op::set_op): Likewise.
13951 (gimple_resimplify4): Declare.
13952 * genmatch.c (get_operand_type): Handle CFN_COND_* functions.
13953 (expr::gen_transform): Likewise.
13954 (decision_tree::gen): Generate a simplification routine for 4 operands.
13955 * gimple-match-head.c (gimple_simplify): Add an overload for
13956 4 operands. In the top-level function, handle up to 4 call
13957 arguments and call gimple_resimplify4.
13958 (gimple_resimplify4): New function.
13959 (build_call_internal): Pass a fourth operand.
13960 (maybe_push_to_seq): Likewise.
13961 * match.pd (UNCOND_BINARY, COND_BINARY): New operator lists.
13962 Fold VEC_COND_EXPRs of an operation and a default value into
13963 an IFN_COND_* function if possible.
13964 * config/aarch64/iterators.md (UNSPEC_COND_MAX, UNSPEC_COND_MIN):
13966 (SVE_COND_FP_BINARY): Include them.
13967 (optab, sve_fp_op): Handle them.
13968 (SVE_INT_BINARY_REV): New code iterator.
13969 (SVE_COND_FP_BINARY_REV): New int iterator.
13970 (commutative): New int attribute.
13971 * config/aarch64/aarch64-protos.h (aarch64_sve_prepare_conditional_op):
13973 * config/aarch64/aarch64.c (aarch64_sve_prepare_conditional_op): New
13975 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Use it.
13976 (*cond_<optab><mode>): New patterns for reversed operands.
13978 2018-05-25 Richard Biener <rguenther@suse.de>
13980 * tree-vectorizer.h (STMT_VINFO_GROUP_*, GROUP_*): Remove.
13981 (DR_GROUP_*): New, assert we have non-NULL ->data_ref_info.
13982 (REDUC_GROUP_*): New, assert we have NULL ->data_ref_info.
13983 (STMT_VINFO_GROUPED_ACCESS): Adjust.
13984 * tree-vect-data-refs.c (everywhere): Adjust users.
13985 * tree-vect-loop.c (everywhere): Likewise.
13986 * tree-vect-slp.c (everywhere): Likewise.
13987 * tree-vect-stmts.c (everywhere): Likewise.
13988 * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
13990 2018-05-25 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
13992 * configure.ac (gcc_cv_as_section_has_e): Move to common section.
13994 (gcc_cv_as_section_exclude): ... this.
13995 Try Solaris as #exclude syntax.
13996 * configure: Regenerate.
13997 * config.in: Regenerate.
13998 * config/i386/i386.c (i386_solaris_elf_named_section): Handle
14000 * config/sparc/sparc.c (sparc_solaris_elf_asm_named_section)
14001 [HAVE_GAS_SECTION_EXCLUDE]: Handle SECTION_EXCLUDE.
14003 * varasm.c (default_elf_asm_named_section): Don't check if
14004 HAVE_GAS_SECTION_EXCLUDE is defined.
14006 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
14008 * doc/md.texi: Update the documentation of the cond_* optabs
14009 to mention the new final operand. Fix GET_MODE_NUNITS call.
14010 Describe the scalar case too.
14011 * internal-fn.def (IFN_EXTRACT_LAST): Change type to fold_left.
14012 * internal-fn.c (expand_cond_unary_optab_fn): Expect 3 operands
14014 (expand_cond_binary_optab_fn): Expect 4 operands instead of 3.
14015 (get_conditional_internal_fn): Update comment.
14016 * tree-vect-loop.c (vectorizable_reduction): Pass the original
14017 accumulator value as a final argument to conditional functions.
14018 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Turn into
14019 a define_expand and add an "else" operand. Assert for now that
14020 the else operand is equal to operand 2. Use SVE_INT_BINARY and
14021 SVE_COND_FP_BINARY instead of SVE_COND_INT_OP and SVE_COND_FP_OP.
14022 (*cond_<optab><mode>): New patterns.
14023 * config/aarch64/iterators.md (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX)
14024 (UNSPEC_COND_SMIN, UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
14025 (UNSPEC_COND_EOR): Delete.
14026 (optab): Remove associated mappings.
14027 (SVE_INT_BINARY): New code iterator.
14028 (sve_int_op): Remove int attribute and add "minus" to the code
14030 (SVE_COND_INT_OP): Delete.
14031 (SVE_COND_FP_OP): Rename to...
14032 (SVE_COND_FP_BINARY): ...this.
14034 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
14036 * optabs.c (can_reuse_operands_p): New function.
14037 (maybe_legitimize_operands): Try to reuse the results for
14040 2018-05-24 Uros Bizjak <ubizjak@gmail.com>
14042 * config/i386/sse.md (cvtusi2<ssescalarmodesuffix>64<round_name>):
14043 Add {q} suffix to insn mnemonic.
14045 2018-05-23 Jozef Lawrynowicz <jozef.l@mittosystems.com>
14047 * config/msp430/msp430.c (TARGET_WARN_FUNC_RETURN): Define.
14048 (msp430_warn_func_return): New.
14050 2018-05-24 Roger Sayle <roger@nextmovesoftware.com>
14052 * fold-const.c (tree_nonzero_bits): New function.
14053 * fold-const.h (tree_nonzero_bits): Likewise.
14054 * match.pd (POPCOUNT): New patterns to fold BUILTIN_POPCOUNT and
14055 friends. POPCOUNT(x&1) => x&1, POPCOUNT(x)==0 => x==0, etc.
14057 2018-05-24 H.J. Lu <hongjiu.lu@intel.com>
14061 * varasm.c (assemble_alias): Check ifunc_resolver only on
14064 2018-05-24 Uros Bizjak <ubizjak@gmail.com>
14067 * config/i386/sse.md (movdi_to_sse): Do not generate pseudo
14068 when memory input operand is handled.
14070 2018-05-24 Luis Machado <luis.machado@linaro.org>
14072 * config/aarch64/aarch64.c (qdf24xx_addrcost_table): New static
14074 (qdf24xx_tunings) <addr_costs>: Set to qdf24xx_addrcost_table.
14076 2018-05-24 Richard Sandiford <richard.sandiford@linaro.org>
14078 * match.pd: Delay FMA folds until after vectorization.
14080 2018-05-24 Andre Vieira <andre.simoesdiasvieira@arm.com>
14083 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
14084 address check not strict.
14086 2018-05-24 Richard Sandiford <richard.sandiford@linaro.org>
14088 * gimple-match.h (gimple_match_op): New class.
14089 (mprts_hook): Replace parameters with a gimple_match_op *.
14090 (maybe_build_generic_op): Likewise.
14091 (gimple_simplified_result_is_gimple_val): Replace parameters with
14092 a const gimple_match_op *.
14093 (gimple_simplify): Replace code_helper * and tree * parameters with
14094 a gimple_match_op * parameter.
14095 (gimple_resimplify1): Replace code_helper *, tree and tree *
14096 parameters with a gimple_match_op * parameter.
14097 (gimple_resimplify2): Likewise.
14098 (gimple_resimplify3): Likewise.
14099 (maybe_push_res_to_seq): Replace code_helper, tree and tree *
14100 parameters with a gimple_match_op * parameter.
14101 * gimple-match-head.c (gimple_simplify): Change prototypes of
14102 auto-generated functions to take a gimple_match_op * instead of
14103 separate code_helper * and tree * parameters. Make the same
14104 change in the top-level overload and update calls to the
14105 gimple_resimplify routines. Update calls to the auto-generated
14106 functions and to maybe_push_res_to_seq in the publicly-facing
14107 operation-specific gimple_simplify overloads.
14108 (gimple_match_op::MAX_NUM_OPS): Define.
14109 (gimple_resimplify1): Replace rcode and ops with a single res_op
14110 parameter. Update call to gimple_simplify.
14111 (gimple_resimplify2): Likewise.
14112 (gimple_resimplify3): Likewise.
14113 (mprts_hook): Replace parameters with a gimple_match_op *.
14114 (maybe_build_generic_op): Likewise.
14115 (build_call_internal): Replace type, nargs and ops with
14116 a gimple_match_op *.
14117 (maybe_push_res_to_seq): Replace res_code, type and ops parameters
14118 with a single gimple_match_op *. Update calls to mprts_hook,
14119 build_call_internal and gimple_simplified_result_is_gimple_val.
14120 Factor out code that is common to the tree_code and combined_fn cases.
14121 * genmatch.c (expr::gen_transform): Replace tem_code and
14122 tem_ops with a gimple_match_op called tem_op. Update calls
14123 to the gimple_resimplify functions and maybe_push_res_to_seq.
14124 (dt_simplify::gen_1): Manipulate res_op instead of res_code and
14125 res_ops. Update call to the gimple_resimplify functions.
14126 (dt_simplify::gen): Pass res_op instead of res_code and res_ops.
14127 (decision_tree::gen): Make the functions take a gimple_match_op *
14128 called res_op instead of separate res_code and res_ops parameters.
14129 Update call accordingly.
14130 * gimple-fold.c (replace_stmt_with_simplification): Replace rcode
14131 and ops with a single res_op parameter. Update calls to
14132 maybe_build_generic_op and maybe_push_res_to_seq.
14133 (fold_stmt_1): Update calls to gimple_simplify and
14134 replace_stmt_with_simplification.
14135 (gimple_fold_stmt_to_constant_1): Update calls to gimple_simplify
14136 and gimple_simplified_result_is_gimple_val.
14137 * tree-cfgcleanup.c (cleanup_control_expr_graph): Update call to
14139 * tree-ssa-sccvn.c (vn_lookup_simplify_result): Replace parameters
14140 with a gimple_match_op *.
14141 (vn_nary_build_or_lookup): Likewise. Update call to
14142 vn_nary_build_or_lookup_1.
14143 (vn_nary_build_or_lookup_1): Replace rcode, type and ops with a
14144 gimple_match_op *. Update calls to the gimple_resimplify routines
14145 and to gimple_simplified_result_is_gimple_val.
14146 (vn_nary_simplify): Update call to vn_nary_build_or_lookup_1.
14147 Use gimple_match_op::MAX_NUM_OPS instead of a hard-coded 3.
14148 (vn_reference_lookup_3): Update call to vn_nary_build_or_lookup.
14149 (visit_nary_op): Likewise.
14150 (visit_reference_op_load): Likewise.
14152 2018-05-23 Luis Machado <luis.machado@linaro.org>
14154 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Use correct type
14155 modifier for printing the step amount.
14157 2018-05-23 Jozef Lawrynowicz <jozef.l@somniumtech.com>
14160 * tree.c (build_common_tree_nodes): Dont set TYPE_SIZE for __intN
14163 2018-05-23 Segher Boessenkool <segher@kernel.crashing.org>
14165 * doc/sourcebuild.texi (Endianness): New subsubsection.
14167 2018-05-23 Luis Machado <luis.machado@linaro.org>
14169 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
14170 <prefetch_dynamic_strides>: New const bool field.
14171 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
14172 prefetch_dynamic_strides.
14173 (exynosm1_prefetch_tune): Likewise.
14174 (thunderxt88_prefetch_tune): Likewise.
14175 (thunderx_prefetch_tune): Likewise.
14176 (thunderx2t99_prefetch_tune): Likewise.
14177 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides to
14179 (aarch64_override_options_internal): Update to set
14180 PARAM_PREFETCH_DYNAMIC_STRIDES.
14181 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
14182 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
14183 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
14184 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
14185 prefetch-dynamic-strides setting.
14187 2018-05-23 Luis Machado <luis.machado@linaro.org>
14189 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
14190 <minimum_stride>: New const int field.
14191 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
14192 minimum_stride field defaulting to -1.
14193 (exynosm1_prefetch_tune): Likewise.
14194 (thunderxt88_prefetch_tune): Likewise.
14195 (thunderx_prefetch_tune): Likewise.
14196 (thunderx2t99_prefetch_tune): Likewise.
14197 (qdf24xx_prefetch_tune) <minimum_stride>: Set to 2048.
14198 <default_opt_level>: Set to 3.
14199 (aarch64_override_options_internal): Update to set
14200 PARAM_PREFETCH_MINIMUM_STRIDE.
14201 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
14202 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
14203 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
14204 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
14205 stride is constant and is below the minimum stride threshold.
14207 2018-05-23 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
14209 * config/arm/arm-cpus.in (mode26): Delete.
14210 (armv4): Delete mode26 reference.
14211 * config/arm/arm.c (arm_configure_build_target): Delete use of
14214 2018-05-23 Uros Bizjak <ubizjak@gmail.com>
14216 * config/i386/i386.md (*floatuns<SWI48:mode><MODEF:mode>2_avx512):
14218 (floatunssi<mode>2): Also enable for AVX512F and TARGET_SSE_MATH.
14219 Rewrite expander pattern. Emit gen_floatunssi<mode>2_i387_with_xmm
14221 (floatunsdisf2): Rewrite expander pattern. Hanlde TARGET_AVX512F.
14222 (floatunsdidf2): Ditto.
14224 2018-05-23 Uros Bizjak <ubizjak@gmail.com>
14226 * config/i386/i386.md (fixuns_trunc<mode>di2): New insn pattern.
14227 (fixuns_trunc<mode>si2_avx512f): Ditto.
14228 (*fixuns_trunc<mode>si2_avx512f_zext): Ditto.
14229 (fixuns_trunc<mode>si2): Also enable for AVX512F and TARGET_SSE_MATH.
14230 Emit fixuns_trunc<mode>si2_avx512f for AVX512F targets.
14232 2018-05-23 Alexander Monakov <amonakov@ispras.ru>
14234 PR rtl-optimization/79985
14235 * df-scan.c (df_insn_refs_collect): Remove special case for
14236 global registers and asm statements.
14238 2018-05-23 Alexander Monakov <amonakov@ispras.ru>
14240 * extend.texi (Global Register Variables): Rewrite the bullet list.
14241 Note that the register is available for allocation. Note that access
14242 via inline asm must use constraints. Add note about async-signal
14243 handlers. Remove paragraph about automagic register selection.
14245 2018-05-23 Richard Biener <rguenther@suse.de>
14247 * tree-ssa-sccvn.c (vn_reference_lookup_3): Remove restriction
14248 of fixed offset from memset VN.
14250 2018-05-23 Bill Schmidt <wschmidt@linux.ibm.com>
14252 * gimple-ssa-strength-reduction.c (struct slsr_cand_d): Add
14253 first_interp field.
14254 (alloc_cand_and_find_basis): Initialize first_interp field.
14255 (slsr_process_mul): Modify first_interp field.
14256 (slsr_process_add): Likewise.
14257 (slsr_process_cast): Modify first_interp field for each new
14259 (slsr_process_copy): Likewise.
14260 (dump_candidate): Dump first_interp field.
14261 (replace_mult_candidate): Process all interpretations, not just
14263 (replace_rhs_if_not_dup): Likewise.
14264 (replace_one_candidate): Likewise.
14266 2018-05-23 Wilco Dijkstra <wdijkstr@arm.com>
14268 * config/aarch64/aarch64.c (aarch64_use_frame_pointer):
14270 (aarch64_needs_frame_chain): New function.
14271 (aarch64_parse_override_string): Set aarch64_use_frame_pointer.
14273 2018-05-23 Sudakshina Das <sudi.das@arm.com>
14276 * common/config/aarch64/aarch64-common.c (aarch64_handle_option):
14277 Check val before adding MASK_STRICT_ALIGN to opts->x_target_flags.
14278 * config/aarch64/aarch64.opt (mstrict-align): Remove RejectNegative.
14279 * config/aarch64/aarch64.c (aarch64_attributes): Mark allow_neg
14280 as true for strict-align.
14281 (aarch64_can_inline_p): Perform checks even when callee has no
14282 attributes to check for strict alignment.
14283 * doc/extend.texi (AArch64 Function Attributes): Document
14285 * doc/invoke.texi: (AArch64 Options): Likewise.
14287 2018-05-23 Richard Sandiford <richard.sandiford@linaro.org>
14289 PR tree-optimization/85853
14290 * tree-vect-slp.c (vect_slp_analyze_node_operations): Split out
14291 the handling of the root of the node to...
14292 (vect_slp_analyze_node_operations_1): ...this new function,
14293 and run the whole thing with the child nodes' def types
14294 set according to their SLP node's def type.
14296 2018-05-23 Richard Biener <rguenther@suse.de>
14298 PR middle-end/85874
14299 * tree-data-ref.c (create_runtime_alias_checks): Defer
14300 and ignore overflow warnings.
14302 2018-05-23 Yury Gribov <tetra2005@gmail.com>
14304 PR tree-optimization/85822
14305 * tree-vrp.c (is_masked_range_test): Fix handling of negative
14308 2018-05-23 Richard Biener <rguenther@suse.de>
14310 * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
14311 memset constants via native_interpret_expr.
14313 2018-05-22 H.J. Lu <hongjiu.lu@intel.com>
14316 * cgraph.h (cgraph_node::create): Set ifunc_resolver for ifunc
14318 (cgraph_node::create_alias): Likewise.
14319 (cgraph_node::get_availability): Check ifunc_resolver instead
14320 of looking up ifunc attribute.
14321 * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
14322 * varasm.c (do_assemble_alias): Likewise.
14323 (assemble_alias): Likewise.
14324 (default_binds_local_p_3): Likewise.
14325 * cgraph.h (cgraph_node): Add ifunc_resolver.
14326 (cgraph_node::only_called_directly_or_aliased_p): Return false
14327 for IFUNC resolver.
14328 * lto-cgraph.c (input_node): Set ifunc_resolver for ifunc
14330 * symtab.c (symtab_node::verify_base): Verify that ifunc_resolver
14331 is equivalent to lookup_attribute ("ifunc", DECL_ATTRIBUTES (decl)).
14332 (symtab_node::binds_to_current_def_p): Check ifunc_resolver
14333 instead of looking up ifunc attribute.
14335 2018-05-22 Luis Machado <luis.machado@linaro.org>
14337 * config/aarch64/aarch64.md (*ashift<mode>_extv_bfiz): New pattern.
14339 2018-05-22 Martin Sebor <msebor@redhat.com>
14341 PR middle-end/85359
14342 * builtins.c (expand_builtin_strcpy): Call maybe_warn_nonstring_arg
14343 only when expasion succeeds.
14344 (expand_builtin_strcmp): Same.
14345 (expand_builtin_strncmp): Same.
14347 2018-05-22 Martin Sebor <msebor@redhat.com>
14349 * calls.c (maybe_warn_nonstring_arg): Fix a typo in a comment.
14351 2018-05-22 Jackson Woodruff <jackson.woodruff@arm.com>
14352 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
14354 * config/aarch64/aarch64-ldpstp.md: Replace uses of
14355 aarch64_mem_pair_operand with memory_operand and delete operand swapping
14357 * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
14358 Add check for legitimate_address.
14359 (aarch64_gen_adjusted_ldpstp): Swap operands where appropriate.
14360 (aarch64_swap_ldrstr_operands): New.
14361 * config/aarch64/aarch64-protos.h (aarch64_swap_ldrstr_operands):
14364 2018-05-22 Jackson Woodruff <jackson.woodruff@arm.com>
14365 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
14367 * config/aarch64/aarch64.md: New patterns to generate stp
14369 (store_pair_sw, store_pair_dw): New patterns to generate stp for
14370 single words and double words.
14371 (load_pair_sw, load_pair_dw): Likewise.
14372 (store_pair_sf, store_pair_df, store_pair_si, store_pair_di):
14374 (load_pair_sf, load_pair_df, load_pair_si, load_pair_di):
14376 * config/aarch64/aarch64-ldpstp.md: Modify peephole
14377 for different mode ldpstp and add peephole for merged zero stores.
14378 Likewise for loads.
14379 * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
14381 (aarch64_gen_store_pair): Rename calls to match new patterns.
14382 (aarch64_gen_load_pair): Rename calls to match new patterns.
14383 * config/aarch64/aarch64-simd.md (load_pair<mode>): Rename to...
14384 (load_pair<DREG:mode><DREG2:mode>): ... This.
14385 (store_pair<mode>): Rename to...
14386 (vec_store_pair<DREG:mode><DREG2:mode>): ... This.
14387 * config/aarch64/iterators.md (DREG, DREG2, DX2, SX, SX2, DSX):
14388 New mode iterators.
14389 (V_INT_EQUIV): Handle SImode.
14390 * config/aarch64/predicates.md (aarch64_reg_zero_or_fp_zero):
14393 2018-05-22 Martin Sebor <msebor@redhat.com>
14396 * calls.c (maybe_warn_nonstring_arg): Use string length to set
14397 or ajust the presumed bound on an operation to avoid unnecessary
14400 2018-05-22 Martin Sebor <msebor@redhat.com>
14402 PR tree-optimization/85826
14403 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Avoid
14404 assuming that a DECL necesarily has a constant size.
14406 2018-05-22 Richard Sandiford <richard.sandiford@linaro.org>
14408 PR middle-end/85862
14409 * internal-fn.c (expand_direct_optab_fn): Cope with a null lhs.
14411 2018-05-22 Richard Biener <rguenther@suse.de>
14413 PR tree-optimization/85834
14414 * tree-ssa-sccvn.c (vn_reference_lookup_3): Properly handle
14415 non-constant and non-zero memset arguments.
14417 2018-05-22 Martin Liska <mliska@suse.cz>
14420 * ipa-icf.c (sem_item::add_type): Do not ICE for incomplete types.
14422 2018-05-22 Richard Biener <rguenther@suse.de>
14424 PR tree-optimization/85863
14425 * tree-vect-stmts.c (vect_is_simple_cond): Only widen invariant
14426 comparisons when vectype is specified.
14427 (vectorizable_condition): Do not specify vectype for
14428 vect_is_simple_cond when SLP vectorizing.
14430 2018-05-21 Michael Meissner <meissner@linux.ibm.com>
14433 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Do not
14434 define __ibm128 as long double.
14435 * config/rs6000/rs6000.c (rs6000_init_builtins): Create __ibm128
14436 as a distinct type when IEEE 128-bit support is enabled.
14437 (init_float128_ieee): Fix up conversions between IFmode and IEEE
14438 128-bit types to use the correct functions.
14439 (rs6000_expand_float128_convert): Use explicit FLOAT_EXTEND to
14440 convert between 128-bit floating point types that have different
14441 modes but the same representation, instead of using gen_lowpart to
14443 * config/rs6000/rs6000.md (IFKF): New iterator for IFmode and
14445 (IFKF_reg): New attributes to give the register constraints for
14447 (extend<mode>tf2_internal): New insns to mark an explicit
14448 conversion between 128-bit floating point types that have a
14449 different mode but share the same representation.
14451 2018-05-21 Richard Sandiford <richard.sandiford@linaro.org>
14453 PR tree-optimization/85814
14454 * tree-ssa-strlen.c (get_stridx_plus_constant): Cope with
14455 a null return from get_strinfo when unsharing the next
14456 strinfo in the chain.
14458 2018-05-21 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
14461 * varasm.c (weak_finish): Clean up weak_decls.
14463 2018-05-21 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
14465 * config/aarch64/aarch64.md ("unspec"): Define UNSPEC_SABAL,
14466 UNSPEC_SABDL2, UNSPEC_SADALP, UNSPEC_UABAL, UNSPEC_UABDL2,
14467 UNSPEC_UADALP values.
14468 * config/aarch64/iterators.md (ABAL): New int iterator.
14471 (sur): Add mappings for the above.
14472 * config/aarch64/aarch64-simd.md (aarch64_<sur>abdl2<mode>_3):
14474 (aarch64_<sur>abal<mode>_4): Likewise.
14475 (aarch64_<sur>adalp<mode>_3): Likewise.
14476 (<sur>sadv16qi): New define_expand.
14478 2018-05-21 Alexander Nesterovskiy <alexander.nesterovskiy@intel.com>
14480 * config/i386/i386.md (*movsf_internal): AVX falsedep fix.
14481 (*movdf_internal): Ditto.
14482 (*rcpsf2_sse): Ditto.
14483 (*rsqrtsf2_sse): Ditto.
14484 (*sqrt<mode>2_sse): Ditto.
14486 2018-05-21 Tamar Christina <tamar.christina@arm.com>
14488 * config/aarch64/aarch64-simd.md (aarch64_eor3qv8hi): Change to
14490 (aarch64_bcaxqv8hi): Change to bcaxq<mode>4.
14491 * config/aarch64/aarch64-simd-builtins.def (veor3q_u8, veor3q_u32,
14492 veor3q_u64, veor3q_s8, veor3q_s16, veor3q_s32, veor3q_s64, vbcaxq_u8,
14493 vbcaxq_u32, vbcaxq_u64, vbcaxq_s8, vbcaxq_s16, vbcaxq_s32,
14495 * config/aarch64/arm_neon.h: Likewise.
14496 * config/aarch64/iterators.md (VQ_I): New.
14498 2018-05-21 Alexey Brodkin <abrodkin@synopsys.com>
14500 * config.gcc: Add arc/t-multilib-linux to tmake_file for
14502 * config/arc/t-multilib-linux: Specify MULTILIB_OPTIONS and
14505 2018-05-20 Chung-Ju Wu <jasonwucj@gmail.com>
14507 * config/nds32/constraints.md (S): New constraint.
14508 * config/nds32/nds32.md (call_internal): Use constraint S.
14509 (call_value_internal): Likewise.
14510 (sibcall_internal): Likewise.
14511 (sibcall_value_internal): Likewise.
14513 2018-05-20 Kito Cheng <kito.cheng@gmail.com>
14514 Chung-Ju Wu <jasonwucj@gmail.com>
14516 * config/nds32/nds32.c (nds32_register_move_cost): Take garywolf cpu
14517 into consideration.
14519 2018-05-20 Kito Cheng <kito.cheng@gmail.com>
14520 Chung-Ju Wu <jasonwucj@gmail.com>
14522 * config/nds32/nds32-cost.c (rtx_cost_model_t): New structure.
14523 (insn_size_16bit, insn_size_32bit): New variables for cost evaluation.
14524 (nds32_rtx_costs_impl): Simplify.
14525 (nds32_address_cost_impl): Simplify.
14526 (nds32_init_rtx_costs): New function.
14527 (nds32_rtx_costs_speed_prefer): Likewise.
14528 (nds32_rtx_costs_size_prefer): Likewise.
14529 (nds32_address_cost_speed_prefer): Likewise.
14530 (nds32_address_cost_speed_fwprop): Likewise.
14531 (nds32_address_cost_size_prefer): Likewise.
14532 * config/nds32/nds32-protos.h (nds32_init_rtx_costs): Declare.
14533 * config/nds32/nds32.c (nds32_option_override): Use
14534 nds32_init_rtx_costs function.
14536 2018-05-20 Chung-Ju Wu <jasonwucj@gmail.com>
14538 * config/nds32/nds32.c (nds32_asm_file_start): Output pipeline model.
14539 * config/nds32/nds32.h (TARGET_PIPELINE_N7): Define.
14540 (TARGET_PIPELINE_N8): Likewise.
14541 (TARGET_PIPELINE_N10): Likewise.
14542 (TARGET_PIPELINE_N13): Likewise.
14543 (TARGET_PIPELINE_GRAYWOLF): Likewise.
14545 2018-05-19 Monk Chiang <sh.chiang04@gmail.com>
14547 * config/nds32/nds32-fpu.md: Update copyright year.
14549 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
14551 * config/nds32/nds32.h (ASM_SPEC): Adjust spec rule.
14553 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
14555 * config/nds32/nds32.c
14556 (nds32_md_asm_adjust): Consider flag_inline_asm_r15 variable.
14557 * config/nds32/nds32.opt (minline-asm-r15): New option.
14559 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
14561 * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS): Add
14563 * config/nds32/nds32.md (abssi2): New pattern.
14565 2018-05-19 Uros Bizjak <ubizjak@gmail.com>
14567 * config/i386/i386.md (rex64namesuffix): New mode attribute.
14568 * config/i386/sse.md (sse_cvtsi2ss<rex64namesuffix><round_name>):
14569 Merge insn pattern from sse_cvtsi2ss<round_name> and
14570 sse_cvtsi2ssq<round_name> using SWI48 mode iterator.
14571 (sse_cvtss2si<rex64namesuffix><round_name>): Merge insn pattern
14572 from sse_cvtss2si<round_name> and sse_cvtss2siq<round_name>
14573 using SWI48 mode iterator.
14574 (sse_cvtss2si<rex64namesuffix>_2): Merge insn pattern from
14575 sse_cvtss2si_2 and sse_cvtss2siq_2 using SWI48 mode iterator.
14576 (sse_cvttss2si<rex64namesuffix><round_saeonly_name>): Merge insn
14577 pattern from sse_cvttss2si<round_saeonly_name>
14578 and sse_cvttss2siq<round_saeonly_name> using SWI48 mode iterator.
14579 (avx512f_vcvtss2usi<rex64namesuffix><round_name>): Merge insn pattern
14580 from avx512f_vcvtss2usi<round_name> and avx512f_vcvtss2usiq<round_name>
14581 using SWI48 mode iterator.
14582 (avx512f_vcvttss2usi<rex64namesuffix><round_saeonly_name>): Merge
14583 insn pattern from avx512f_vcvttss2usi<round_saeonly_name> and
14584 avx512f_vcvttss2usiq<round_saeonly_name> using SWI48 mode iterator.
14585 (avx512f_vcvtsd2usi<rex64namesuffix><round_name>): Merge insn pattern
14586 from avx512f_vcvtsd2usi<round_name> and avx512f_vcvtsd2usiq<round_name>
14587 using SWI48 mode iterator.
14588 (avx512f_vcvttsd2usi<rex64namesuffix><round_saeonly_name>): Merge
14589 insn pattern from avx512f_vcvttsd2usi<round_saeonly_name> and
14590 avx512f_vcvttsd2usiq<round_saeonly_name> using SWI48 mode iterator.
14591 (sse2_cvtsd2si<rex64namesuffix><round_name>): Merge insn pattern from
14592 sse2_cvtsd2si<round_name> and sse2_cvtsd2siq<round_name> using
14593 SWI48 mode iterator.
14594 (sse2_cvtsd2si<rex64namesuffix>_2): Merge insn pattern from
14595 sse2_cvtsd2si_2 and sse2_cvtsd2siq_2 using SWI48 mode iterator.
14596 (sse_cvttsd2si<rex64namesuffix><round_saeonly_name>): Merge insn
14597 pattern from sse_cvttsd2si<round_saeonly_name>
14598 and sse_cvttsd2siq<round_saeonly_name> using SWI48 mode iterator.
14600 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
14602 * config/nds32/nds32-md-auxiliary.c
14603 (nds32_valid_smw_lwm_base_p): Refine.
14604 (nds32_output_smw_single_word): Refine.
14605 (nds32_output_smw_double_word): New.
14606 * config/nds32/nds32-protos.h (nds32_output_smw_double_word): New.
14608 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
14610 * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push): Refine.
14611 (nds32_output_stack_pop): Refine.
14612 (nds32_expand_unaligned_load): Refine.
14613 (nds32_expand_unaligned_store): Refine.
14615 2018-05-19 Kuan-Lin Chen <kuanlinchentw@gmail.com>
14616 Chung-Ju Wu <jasonwucj@gmail.com>
14618 * config/nds32/constants.md: Add TP_REGNUM constant.
14619 (unspec_element): Add UNSPEC_GOTINIT, UNSPEC_GOT, UNSPEC_GOTOFF,
14620 UNSPEC_PLT, UNSPEC_TLSGD, UNSPEC_TLSLD, UNSPEC_TLSIE, UNSPEC_TLSLE and
14622 * config/nds32/nds32-doubleword.md: Consider flag_pic.
14623 * config/nds32/nds32-dspext.md (mov<mode>): Expand TLS and PIC cases.
14624 * config/nds32/nds32-predicates.c (nds32_const_unspec_p): New.
14625 * config/nds32/nds32-md-auxiliary.c: Implementation that support TLS
14626 and PIC code generation.
14627 * config/nds32/nds32-protos.h: Declarations that support TLS and PIC
14629 * config/nds32/nds32-relax-opt.c: Consider TLS and PIC for relax
14631 * config/nds32/nds32.md: Support TLS and PIC.
14632 * config/nds32/nds32.c: Support TLS and PIC.
14633 * config/nds32/nds32.h (nds32_relax_insn_type): New enum type.
14634 * config/nds32/predicates.md (nds32_nonunspec_symbolic_operand): New
14637 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
14639 * config/nds32/nds32-predicates.c (const_vector_to_hwint): Use machine
14640 mode with E_ prefix.
14642 2018-05-19 Kuan-Lin Chen <kuanlinchentw@gmail.com>
14643 Chung-Ju Wu <jasonwucj@gmail.com>
14645 * config/nds32/constants.md (unspec_element): Add UNSPEC_ICT.
14646 * config/nds32/nds32-md-auxiliary.c
14647 (symbolic_reference_mentioned_p): New.
14648 (nds32_legitimize_ict_address): New.
14649 (nds32_expand_ict_move): New.
14650 (nds32_indirect_call_referenced_p): New.
14651 (nds32_symbol_binds_local_p): Delete.
14652 (nds32_long_call_p): Modify.
14653 * config/nds32/nds32-opts.h (nds32_ict_model_type): New enum type.
14654 * config/nds32/nds32-protos.h
14655 (symbolic_reference_mentioned_p): Declare.
14656 (nds32_legitimize_ict_address): Declare.
14657 (nds32_expand_ict_move): Declare.
14658 (nds32_indirect_call_referenced_p): Declare.
14659 * config/nds32/nds32-relax-opt.c (nds32_ict_const_p): New.
14660 (nds32_relax_group): Use nds32_ict_const_p as condition.
14661 * config/nds32/nds32.c (nds32_attribute_table): Add "indirect_call".
14662 (nds32_asm_file_start): Output ict_model directive in asm code.
14663 (nds32_legitimate_address_p): Consider indirect call.
14664 (nds32_print_operand): Consider indirect call.
14665 (nds32_print_operand_address): Consider indirect call.
14666 (nds32_insert_attributes): Handle "indirect_call" attribute.
14667 (TARGET_LEGITIMATE_ADDRESS_P): Define.
14668 (TARGET_LEGITIMATE_CONSTANT_P): Define.
14669 (TARGET_CANNOT_FORCE_CONST_MEM): Define.
14670 (TARGET_DELEGITIMIZE_ADDRESS): Define.
14671 (TARGET_ASM_OUTPUT_ADDR_CONST_EXTRA): Define.
14672 * config/nds32/nds32.h (SYMBOLIC_CONST_P): Define.
14673 (TARGET_ICT_MODEL_SMALL): Define.
14674 (TARGET_ICT_MODEL_LARGE): Define.
14675 * config/nds32/nds32.md (movsi): Consider ict model.
14676 (call, call_value): Consider ict model.
14677 (sibcall, sibcall_value): Consider ict model.
14678 * config/nds32/nds32.opt (mict-model): New option.
14679 * config/nds32/predicates.md (nds32_symbolic_operand): Consider ict
14682 2018-05-18 Kito Cheng <kito.cheng@gmail.com>
14683 Monk Chiang <sh.chiang04@gmail.com>
14684 Jim Wilson <jimw@sifive.com>
14686 * common/config/riscv/riscv-common.c (riscv_parse_arch_string):
14687 Add support to parse rv32e*. Clear MASK_RVE for rv32i and rv64i.
14688 * config.gcc (riscv*-*-*): Add support for rv32e* and ilp32e.
14689 * config/riscv/riscv-c.c (riscv_cpu_cpp_builtins): Define
14690 __riscv_32e when TARGET_RVE. Handle ABI_ILP32E as soft-float ABI.
14691 * config/riscv/riscv-opts.h (riscv_abi_type): Add ABI_ILP32E.
14692 * config/riscv/riscv.c (riscv_compute_frame_info): When TARGET_RVE,
14693 compute save_libcall_adjustment properly.
14694 (riscv_option_override): Call error if TARGET_RVE and not ABI_ILP32E.
14695 (riscv_conditional_register_usage): Handle TARGET_RVE and ABI_ILP32E.
14696 * config/riscv/riscv.h (UNITS_PER_FP_ARG): Handle ABI_ILP32E.
14697 (STACK_BOUNDARY, ABI_STACK_BOUNDARY): Handle TARGET_RVE.
14698 (GP_REG_LAST, MAX_ARGS_IN_REGISTERS): Likewise.
14699 (ABI_SPEC): Handle mabi=ilp32e.
14700 * config/riscv/riscv.opt (abi_type): Add ABI_ILP32E.
14701 (RVE): Add RVE mask.
14702 * doc/invoke.texi (RISC-V options) <-mabi>: Add ilp32e info.
14703 <-march>: Add rv32e as an example.
14705 2018-05-18 Marc Glisse <marc.glisse@inria.fr>
14708 * tree-ssa-structalias.c (create_variable_info_for_1): Extra argument.
14709 (intra_create_variable_infos): Handle C++ constructors.
14711 2018-05-18 Martin Liska <mliska@suse.cz>
14713 * passes.def: Remove a redundant pass.
14715 2018-05-18 Eric Botcazou <ebotcazou@adacore.com>
14718 * config/sparc/sparc.c (sparc_expand_builtin): Always initialize op[0].
14720 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
14722 * config/arm/arm-cpus.in (armv3m, mode32): Delete features.
14724 (ARMv2, ARMv3, ARMv3m): Delete fgroups.
14726 (armv2, armv2a, armv3, armv3m): Delete architectures.
14727 (arm2, arm250, arm3, arm6, arm60, arm600, arm610, arm620,
14728 arm7, arm7d, arm7di, arm70, arm700, arm700i, arm710, arm720,
14729 arm710c, arm7100, arm7500, arm7500fe, arm7m, arm7dm, arm7dmi):
14731 * config/arm/arm.md (maddsidi4): Remove check for arm_arch3m.
14732 (*mulsidi3adddi): Likewise.
14733 (mulsidi3): Likewise.
14734 (*mulsidi3_nov6): Likewise.
14735 (umulsidi3): Likewise.
14736 (umulsidi3_nov6): Likewise.
14737 (umaddsidi4): Likewise.
14738 (*umulsidi3adddi): Likewise.
14739 (smulsi3_highpart): Likewise.
14740 (*smulsi3_highpart_nov6): Likewise.
14741 (umulsi3_highpart): Likewise.
14742 (*umulsi3_highpart_nov6): Likewise.
14743 * config/arm/arm.h (arm_arch3m): Delete.
14744 * config/arm/arm.c (arm_arch3m): Delete.
14745 (arm_option_override_internal): Update armv3-related comment.
14746 (arm_configure_build_target): Delete use of isa_bit_mode32.
14747 (arm_option_reconfigure_globals): Delete set of arm_ach3m.
14748 (arm_rtx_costs_internal): Delete check of arm_arch3m.
14749 * config/arm/arm-fixed.md (mulsq3): Delete check for arm_arch3m.
14750 (mulsa3): Likewise.
14751 (mulusa3): Likewise.
14752 * config/arm/arm-protos.h (arm_arch3m): Delete.
14753 * config/arm/arm-tables.opt: Regenerate.
14754 * config/arm/arm-tune.md: Likewise.
14755 * config/arm/t-arm-elf (all_early_nofp): Delete mentions of
14756 deleted architectures.
14758 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
14760 * config/arm/arm-cpus.in (armv5, armv5e): Delete features.
14761 (armv5t, armv5te): New features.
14762 (ARMv5, ARMv5e): Delete fgroups.
14763 (ARMv5t, ARMv5te): Adjust for above changes.
14764 (ARMv6m): Likewise.
14765 (armv5, armv5e): Delete arches.
14766 * config/arm/arm.md (*call_reg_armv5): Use arm_arch5t instead of
14768 (*call_reg_arm): Likewise.
14769 (*call_value_reg_armv5): Likewise.
14770 (*call_value_reg_arm): Likewise.
14771 (*call_symbol): Likewise.
14772 (*call_value_symbol): Likewise.
14773 (*sibcall_insn): Likewise.
14774 (*sibcall_value_insn): Likewise.
14775 (clzsi2): Likewise.
14776 (prefetch): Likewise.
14777 (define_split and define_peephole2 dependent on arm_arch5):
14779 * config/arm/arm.h (TARGET_LDRD): Use arm_arch5te instead of
14781 (TARGET_ARM_QBIT): Likewise.
14782 (TARGET_DSP_MULTIPLY): Likewise.
14783 (enum base_architecture): Delete BASE_ARCH_5, BASE_ARCH_5E.
14784 (arm_arch5, arm_arch5e): Delete.
14785 (arm_arch5t, arm_arch5te): Declare.
14786 * config/arm/arm.c (arm_arch5, arm_arch5e): Delete.
14787 (arm_arch5t): Declare.
14788 (arm_option_reconfigure_globals): Update for the above.
14789 (arm_options_perform_arch_sanity_checks): Update comment, replace
14790 use of arm_arch5 with arm_arch5t.
14791 (use_return_insn): Likewise.
14792 (arm_emit_call_insn): Likewise.
14793 (output_return_instruction): Likewise.
14794 (arm_final_prescan_insn): Likewise.
14795 (arm_coproc_builtin_available): Likewise.
14796 * config/arm/arm-c.c (arm_cpu_builtins): Replace arm_arch5 and
14797 arm_arch5e with arm_arch5t and arm_arch5te.
14798 * config/arm/arm-protos.h (arm_arch5, arm_arch5e): Delete.
14799 (arm_arch5t, arm_arch5te): Declare.
14800 * config/arm/arm-tables.opt: Regenerate.
14801 * config/arm/t-arm-elf: Remove references to armv5, armv5e.
14802 * config/arm/t-multilib: Likewise.
14803 * config/arm/thumb1.md (*call_reg_thumb1_v5): Check arm_arch5t
14804 instead of arm_arch5.
14805 (*call_reg_thumb1): Likewise.
14806 (*call_value_reg_thumb1_v5): Likewise.
14807 (*call_value_reg_thumb1): Likewise.
14808 * config/arm/vxworks.h (TARGET_OS_CPP_BUILTINS): Remove now
14810 * doc/invoke.texi (ARM Options): Remove references to armv5, armv5e.
14812 2018-05-18 Martin Liska <mliska@suse.cz>
14814 PR gcov-profile/84846
14815 * doc/gcov.texi: Document -t option of gcov tool.
14817 2018-05-18 Martin Liska <mliska@suse.cz>
14819 PR gcov-profile/84846
14820 * gcov.c (print_usage): Add new -t option.
14821 (process_args): Handle the option.
14822 (generate_results): Use stdout as output when requested by
14825 2018-05-18 Martin Liska <mliska@suse.cz>
14827 PR gcov-profile/84846
14828 * coverage.c (coverage_init): Write PWD to .gcno file.
14829 * doc/gcov.texi: Document how working directory is printed.
14830 * gcov-dump.c (dump_gcov_file): Print PWD.
14831 * gcov.c (output_intermediate_file): Likewise.
14832 (read_graph_file): Read PWD string.
14833 (output_lines): Print PWD.
14835 2018-05-18 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
14837 PR middle-end/85817
14838 * ipa-pure-const.c (malloc_candidate_p): Remove the check integer_zerop
14839 for retval and return false if all args to phi are zero.
14841 2018-05-18 Richard Biener <rguenther@suse.de>
14843 * gimple-ssa-evrp.c (class evrp_folder): Add simplify_stmt_using_ranges
14845 (evrp_dom_walker::before_dom_children): Call it.
14847 2018-05-18 Richard Biener <rguenther@suse.de>
14849 * tree-dfa.c (get_ref_base_and_extent): Use range-info to refine
14850 results when processing array refs with variable index.
14852 2018-05-18 Toon Moene <toon@moene.org>
14854 * doc/invoke.texi: Move -floop-unroll-and-jam documentation
14855 directly after that of -floop-interchange. Indicate that both
14856 options are enabled by default when specifying -O3.
14858 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
14860 * config/aarch64/aarch64-simd.md (vec_set<mode>): Use VALL_F16 mode
14861 iterator. Delete separate integer-mode vec_set<mode> expander.
14862 (aarch64_simd_vec_setv2di): Delete.
14863 (vec_setv2di): Delete.
14864 (aarch64_simd_vec_set<mode>): Delete all other patterns with that name.
14865 Use VALL_F16 mode iterator. Add LD1 alternative and use vwcore for
14866 the "w, r" alternative.
14868 2018-05-18 Martin Liska <mliska@suse.cz>
14870 * passes.def: Add pass_lower_switch and pass_lower_switch_O0.
14871 * tree-pass.h (make_pass_lower_switch_O0): New function.
14872 * tree-switch-conversion.c (node_has_low_bound): Remove.
14873 (node_has_high_bound): Likewise.
14874 (node_is_bounded): Likewise.
14875 (class pass_lower_switch): Make it a template type and create
14877 (pass_lower_switch::execute): Add template argument.
14878 (make_pass_lower_switch): New function.
14879 (make_pass_lower_switch_O0): New function.
14880 (do_jump_if_equal): Remove.
14881 (emit_case_nodes): Simplify to just handle all 3 cases and leave
14882 all the hard work to tree optimization passes.
14884 2018-05-18 Martin Liska <mliska@suse.cz>
14886 * dbgcnt.c (limit_low): Renamed from limit.
14887 (limit_high): New variable.
14888 (dbg_cnt_is_enabled): Check for upper limit.
14889 (dbg_cnt): Adjust dumping.
14890 (dbg_cnt_set_limit_by_index): Add new argument for high
14892 (dbg_cnt_set_limit_by_name): Likewise.
14893 (dbg_cnt_process_single_pair): Parse new format.
14894 (dbg_cnt_process_opt): Use strtok.
14895 (dbg_cnt_list_all_counters): Remove 'value' and add
14897 * doc/invoke.texi: Document changes.
14899 2018-05-18 Richard Sandiford <richard.sandiford@linaro.org>
14901 * doc/sourcebuild.texi (scalar_all_fma): Document.
14902 * tree.def (FMA_EXPR): Delete.
14903 * internal-fn.def (FMA, FMS, FNMA, FNMS): New internal functions.
14904 * internal-fn.c (ternary_direct): New macro.
14905 (expand_ternary_optab_fn): Likewise.
14906 (direct_ternary_optab_supported_p): Likewise.
14907 * Makefile.in (build/genmatch.o): Depend on case-fn-macros.h.
14908 * builtins.c (fold_builtin_fma): Delete.
14909 (fold_builtin_3): Don't call it.
14910 * cfgexpand.c (expand_debug_expr): Remove FMA_EXPR handling.
14911 * expr.c (expand_expr_real_2): Likewise.
14912 * fold-const.c (operand_equal_p): Likewise.
14913 (fold_ternary_loc): Likewise.
14914 * gimple-pretty-print.c (dump_ternary_rhs): Likewise.
14915 * gimple.c (DEFTREECODE): Likewise.
14916 * gimplify.c (gimplify_expr): Likewise.
14917 * optabs-tree.c (optab_for_tree_code): Likewise.
14918 * tree-cfg.c (verify_gimple_assign_ternary): Likewise.
14919 * tree-eh.c (operation_could_trap_p): Likewise.
14920 (stmt_could_throw_1_p): Likewise.
14921 * tree-inline.c (estimate_operator_cost): Likewise.
14922 * tree-pretty-print.c (dump_generic_node): Likewise.
14923 (op_code_prio): Likewise.
14924 * tree-ssa-loop-im.c (stmt_cost): Likewise.
14925 * tree-ssa-operands.c (get_expr_operands): Likewise.
14926 * tree.c (commutative_ternary_tree_code, add_expr): Likewise.
14927 * fold-const-call.h (fold_fma): Delete.
14928 * fold-const-call.c (fold_const_call_ssss): Handle CFN_FMS,
14929 CFN_FNMA and CFN_FNMS.
14930 (fold_fma): Delete.
14931 * genmatch.c (combined_fn): New enum.
14932 (commutative_ternary_tree_code): Remove FMA_EXPR handling.
14933 (commutative_op): New function.
14934 (commutate): Use it. Handle more than 2 operands.
14935 (dt_operand::gen_gimple_expr): Use commutative_op.
14936 (parser::parse_expr): Allow :c to be used with non-binary
14937 operators if the commutative operand is known.
14938 * gimple-ssa-backprop.c (backprop::process_builtin_call_use): Handle
14939 CFN_FMS, CFN_FNMA and CFN_FNMS.
14940 (backprop::process_assign_use): Remove FMA_EXPR handling.
14941 * hsa-gen.c (gen_hsa_insns_for_operation_assignment): Likewise.
14942 (gen_hsa_fma): New function.
14943 (gen_hsa_insn_for_internal_fn_call): Use it for IFN_FMA, IFN_FMS,
14944 IFN_FNMA and IFN_FNMS.
14945 * match.pd: Add folds for IFN_FMS, IFN_FNMA and IFN_FNMS.
14946 * gimple-fold.h (follow_all_ssa_edges): Declare.
14947 * gimple-fold.c (follow_all_ssa_edges): New function.
14948 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Use the
14949 gimple_build interface and use follow_all_ssa_edges to fold the result.
14950 (convert_mult_to_fma): Use direct_internal_fn_suppoerted_p
14951 instead of checking for optabs directly.
14952 * config/i386/i386.c (ix86_add_stmt_cost): Recognize FMAs as calls
14953 rather than FMA_EXPRs.
14954 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Create a
14955 call to IFN_FMA instead of an FMA_EXPR.
14957 2018-05-17 Jim Wilson <jimw@sifive.com>
14959 * expr.c (do_tablejump): When converting index to Pmode, if we have a
14960 sign extended promoted subreg, and the range does not have the sign bit
14961 set, then do a sign extend.
14963 * config/riscv/riscv.c (riscv_extend_comparands): In unsigned QImode
14964 test, check for sign extended subreg and/or constant operands, and
14965 do a sign extend in that case.
14967 2018-05-17 Steve Ellcey <sellcey@cavium.com>
14969 * config/aarch64/thunderx2t99.md (thunderx2t99_ls_both): Delete.
14970 (thunderx2t99_multiple): Delete psuedo-units from used cpus.
14972 (thunderx2t99_alu_shift): Remove alu_shift_reg, alus_shift_reg.
14973 Change logics_shift_reg to logics_shift_imm.
14974 (thunderx2t99_fp_loadpair_basic): Delete.
14975 (thunderx2t99_fp_storepair_basic): Delete.
14976 (thunderx2t99_asimd_int): Add neon_sub and neon_sub_q types.
14977 (thunderx2t99_asimd_polynomial): Delete.
14978 (thunderx2t99_asimd_fp_simple): Add neon_fp_mul_s_scalar_q
14979 and neon_fp_mul_d_scalar_q.
14980 (thunderx2t99_asimd_fp_conv): Add *int_to_fp* types.
14981 (thunderx2t99_asimd_misc): Delete neon_dup and neon_dup_q.
14982 (thunderx2t99_asimd_recip_step): Add missing *sqrt* types.
14983 (thunderx2t99_asimd_lut): Add missing tbl types.
14984 (thunderx2t99_asimd_ext): Delete.
14985 (thunderx2t99_asimd_load1_1_mult): Delete.
14986 (thunderx2t99_asimd_load1_2_mult): Delete.
14987 (thunderx2t99_asimd_load1_ldp): New.
14988 (thunderx2t99_asimd_load1): New.
14989 (thunderx2t99_asimd_load2): Add missing *load2* types.
14990 (thunderx2t99_asimd_load3): New.
14991 (thunderx2t99_asimd_load4): New.
14992 (thunderx2t99_asimd_store1_1_mult): Delete.
14993 (thunderx2t99_asimd_store1_2_mult): Delete.
14994 (thunderx2t99_asimd_store2_mult): Delete.
14995 (thunderx2t99_asimd_store2_onelane): Delete.
14996 (thunderx2t99_asimd_store_stp): New.
14997 (thunderx2t99_asimd_store1): New.
14998 (thunderx2t99_asimd_store2): New.
14999 (thunderx2t99_asimd_store3): New.
15000 (thunderx2t99_asimd_store4): New.
15002 2018-05-17 Jerome Lambourg <lambourg@adacore.com>
15004 * config/arm/arm_cmse.h (cmse_nsfptr_create, cmse_is_nsfptr): Remove
15005 #include <stdint.h>. Replace intptr_t with __INTPTR_TYPE__.
15007 2018-05-17 Pat Haugen <pthaugen@us.ibm.com>
15008 Segher Boessenkool <segher@kernel.crashing.org>
15011 * config/rs6000/rs6000.c (rs6000_output_move_128bit): Check dest
15014 2018-05-17 Richard Biener <rguenther@suse.de>
15016 * tree-ssa-dse.c (dse_classify_store): Fix iterator increment
15017 for pruning loop and prune defs feeding only already visited PHIs.
15019 2018-05-17 Richard Biener <rguenther@suse.de>
15021 * tree-ssa-sccvn.c (vn_reference_lookup_3): Improve memset handling.
15023 2018-05-17 Bin Cheng <bin.cheng@arm.com>
15024 Richard Biener <rguenther@suse.de>
15026 PR tree-optimization/85793
15027 * tree-vect-stmts.c (vectorizable_load): Handle 1 element-wise load
15028 for VMAT_ELEMENTWISE.
15030 2018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
15032 * internal-fn.h (lookup_internal_fn): Declare
15033 * internal-fn.c (lookup_internal_fn): New function.
15034 * gimple.c (gimple_build_call_from_tree): Handle calls to
15035 internal functions.
15036 * gimple-pretty-print.c (dump_gimple_call): Print "." before
15037 internal function names.
15038 * tree-pretty-print.c (dump_generic_node): Likewise.
15039 * tree-ssa-scopedtables.c (expr_hash_elt::print): Likewise.
15041 2018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
15043 * gimple-fold.h (gimple_build): Make the function forms take
15044 combined_fn rather than built_in_function.
15045 (gimple_simplify): Likewise.
15046 * gimple-match-head.c (gimple_simplify): Likewise.
15047 * gimple-fold.c (gimple_build): Likewise.
15048 * tree-vect-loop.c (get_initial_def_for_reduction): Use gimple_build
15049 rather than gimple_build_call_internal.
15050 (get_initial_defs_for_reduction): Likewise.
15051 (vect_create_epilog_for_reduction): Likewise.
15052 (vectorizable_live_operation): Likewise.
15054 2018-05-17 Martin Liska <mliska@suse.cz>
15056 * gimple-ssa-sprintf.c (format_directive): Do not use
15057 space in between 'G_' and '('.
15059 2018-05-17 Jakub Jelinek <jakub@redhat.com>
15062 * config/i386/i386.c (ix86_fold_builtin): Handle masked shifts
15063 even if the mask is not all ones.
15066 * config/i386/i386.c (ix86_fold_builtin): Fold shift builtins by
15068 (ix86_gimple_fold_builtin): Likewise.
15071 * config/i386/i386.c: Include tree-vector-builder.h.
15072 (ix86_vector_shift_count): New function.
15073 (ix86_fold_builtin): Fold shift builtins by scalar count.
15074 (ix86_gimple_fold_builtin): Likewise.
15076 * config/i386/avx512fintrin.h (_mm512_set_epi16, _mm512_set_epi8,
15077 _mm512_setzero): New intrinsics.
15079 2018-05-17 James Greenhalgh <james.greenhalgh@arm.com>
15080 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
15082 * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify
15083 code generation for cases where splatting a value is not useful.
15084 * simplify-rtx.c (simplify_ternary_operation): Simplify
15085 vec_merge across a vec_duplicate and a paradoxical subreg forming
15086 a vector mode to a vec_concat.
15088 2018-05-17 Olga Makhotina <olga.makhotina@intel.com>
15090 * config.gcc: Support "goldmont-plus".
15091 * config/i386/driver-i386.c (host_detect_local_cpu): Detect
15093 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
15094 PROCESSOR_GOLDMONT_PLUS.
15095 * config/i386/i386.c (m_GOLDMONT_PLUS): Define.
15096 (processor_target_table): Add "goldmont-plus".
15097 (PTA_GOLDMONT_PLUS): Define.
15098 (ix86_lea_outperforms): Add TARGET_GOLDMONT_PLUS.
15099 (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT_PLUS.
15100 (fold_builtin_cpu): Add M_INTEL_GOLDMONT_PLUS.
15101 (fold_builtin_cpu): Add "goldmont-plus".
15102 (ix86_add_stmt_cost): Add TARGET_GOLDMONT_PLUS.
15103 (ix86_option_override_internal): Add "goldmont-plus".
15104 * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT_PLUS.
15105 (processor_type): Add PROCESSOR_GOLDMONT_PLUS.
15106 * config/i386/x86-tune.def: Add m_GOLDMONT_PLUS.
15107 * doc/invoke.texi: Add goldmont-plus as x86 -march=/-mtune= CPU type.
15109 2018-05-17 Richard Biener <rguenther@suse.de>
15111 PR tree-optimization/85757
15112 * tree-ssa-dse.c (dse_classify_store): Record a PHI def and
15113 remove defs that only feed that PHI from further processing.
15115 2018-05-16 Jim Wilson <jimw@sifive.com>
15117 * config/riscv/riscv.md (<optab>si3_mask, <optab>si3_mask_1): Prepend
15119 (<optab>di3_mask, <optab>di3_mask_1): Likewise.
15121 2018-05-16 Mark Wielaard <mark@klomp.org>
15123 * dwarf2out.c (count_index_strings): New function.
15124 (output_indirect_strings): Call count_index_strings and generate
15125 header for dwarf_version >= 5.
15127 2018-05-16 Mark Wielaard <mark@klomp.org>
15129 * dwarf2out.c (dwarf_FORM): New function.
15130 (set_indirect_string): Use dwarf_FORM.
15131 (reset_indirect_string): Likewise.
15132 (size_of_die): Likewise.
15133 (value_format): Likewise.
15134 (output_die): Likewise.
15135 (add_skeleton_AT_string): Likewise.
15136 (output_macinfo_op): Likewise.
15137 (index_string): Likewise.
15138 (output_index_string_offset): Likewise.
15139 (output_index_string): Likewise.
15140 (count_index_strings): Likewise.
15142 2018-05-16 Carl Love <cel@us.ibm.com>
15144 * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
15145 dcbt and dcbtstt with TH=16 if operands[2] is 0 and Power 8 or newer.
15147 2018-05-16 Martin Jambor <mjambor@suse.cz>
15149 * ipa-prop.c (ipa_free_all_edge_args): Remove.
15150 * ipa-prop.h (ipa_free_all_edge_args): Likewise.
15152 2018-05-16 Wilco Dijkstra <wdijkstr@arm.com>
15154 * config/aarch64/aarch64.md (fma<mode>4): Change into expand pattern.
15155 (fnma<mode>4): Likewise.
15156 (fms<mode>4): Likewise.
15157 (fnms<mode>4): Likewise.
15158 (aarch64_fma<mode>4): Rename insn, reorder accumulator operand.
15159 (aarch64_fnma<mode>4): Likewise.
15160 (aarch64_fms<mode>4): Likewise.
15161 (aarch64_fnms<mode>4): Likewise.
15162 (aarch64_fnmadd<mode>4): Likewise.
15164 2018-05-16 Jason Merrill <jason@redhat.com>
15166 * tree.c (warn_deprecated_use): Return bool. Simplify logic.
15168 2018-05-16 Richard Biener <rguenther@suse.de>
15170 * tree-vectorizer.h (struct stmt_info_for_cost): Add where member.
15171 (dump_stmt_cost): Declare.
15172 (add_stmt_cost): Dump cost we add.
15173 (add_stmt_costs): New function.
15174 (vect_model_simple_cost, vect_model_store_cost, vect_model_load_cost):
15175 No longer exported.
15176 (vect_analyze_stmt): Adjust prototype.
15177 (vectorizable_condition): Likewise.
15178 (vectorizable_live_operation): Likewise.
15179 (vectorizable_reduction): Likewise.
15180 (vectorizable_induction): Likewise.
15181 * tree-vect-loop.c (vect_analyze_loop_operations): Create local
15182 cost vector to pass to vectorizable_ and record afterwards.
15183 (vect_model_reduction_cost): Take cost vector argument and adjust.
15184 (vect_model_induction_cost): Likewise.
15185 (vectorizable_reduction): Likewise.
15186 (vectorizable_induction): Likewise.
15187 (vectorizable_live_operation): Likewise.
15188 * tree-vect-slp.c (vect_create_new_slp_node): Initialize
15189 SLP_TREE_NUMBER_OF_VEC_STMTS.
15190 (vect_analyze_slp_cost_1): Remove.
15191 (vect_analyze_slp_cost): Likewise.
15192 (vect_slp_analyze_node_operations): Take visited args and
15193 a target cost vector. Avoid processing already visited stmt sets.
15194 (vect_slp_analyze_operations): Use a local cost vector to gather
15195 costs and register those of non-discarded instances.
15196 (vect_bb_vectorization_profitable_p): Use add_stmt_costs.
15197 (vect_schedule_slp_instance): Remove copying of
15198 SLP_TREE_NUMBER_OF_VEC_STMTS. Instead assert that it is not
15200 * tree-vect-stmts.c (record_stmt_cost): Remove path directly
15201 adding cost. Record cost entry location.
15202 (vect_prologue_cost_for_slp_op): Function to compute cost of
15203 a constant or invariant generated for SLP vect in the prologue,
15204 split out from vect_analyze_slp_cost_1.
15205 (vect_model_simple_cost): Make static. Adjust for SLP costing.
15206 (vect_model_promotion_demotion_cost): Likewise.
15207 (vect_model_store_cost): Likewise, make static.
15208 (vect_model_load_cost): Likewise.
15209 (vectorizable_bswap): Add cost vector arg and adjust.
15210 (vectorizable_call): Likewise.
15211 (vectorizable_simd_clone_call): Likewise.
15212 (vectorizable_conversion): Likewise.
15213 (vectorizable_assignment): Likewise.
15214 (vectorizable_shift): Likewise.
15215 (vectorizable_operation): Likewise.
15216 (vectorizable_store): Likewise.
15217 (vectorizable_load): Likewise.
15218 (vectorizable_condition): Likewise.
15219 (vectorizable_comparison): Likewise.
15220 (can_vectorize_live_stmts): Likewise.
15221 (vect_analyze_stmt): Likewise.
15222 (vect_transform_stmt): Adjust calls to vectorizable_*.
15223 * tree-vectorizer.c: Include gimple-pretty-print.h.
15224 (dump_stmt_cost): New function.
15226 2018-05-16 Richard Biener <rguenther@suse.de>
15228 * params.def (PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE): New param.
15229 * doc/invoke.texi (dse-max-alias-queries-per-store): Document.
15230 * tree-ssa-dse.c: Include tree-ssa-loop.h.
15231 (check_name): New callback.
15232 (dse_classify_store): Track cycles via a visited bitmap of PHI
15233 defs and simplify handling of in-loop and across loop dead stores
15234 and properly fail for loop-variant refs. Handle byte-tracking with
15235 multiple defs. Use PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE for
15238 2018-05-16 Richard Sandiford <richard.sandiford@linaro.org>
15240 * tree-vectorizer.h (vect_get_vector_types_for_stmt): Declare.
15241 (vect_get_mask_type_for_stmt): Likewise.
15242 * tree-vect-slp.c (vect_two_operations_perm_ok_p): New function,
15244 (vect_build_slp_tree_1): ...here. Use vect_get_vector_types_for_stmt
15245 to determine the statement's vector type and the vector type that
15246 should be used for calculating nunits. Deal with cases in which
15247 the type has to be deferred.
15248 (vect_slp_analyze_node_operations): Use vect_get_vector_types_for_stmt
15249 and vect_get_mask_type_for_stmt to calculate STMT_VINFO_VECTYPE.
15250 * tree-vect-loop.c (vect_determine_vf_for_stmt_1)
15251 (vect_determine_vf_for_stmt): New functions, split out from...
15252 (vect_determine_vectorization_factor): ...here.
15253 * tree-vect-stmts.c (vect_get_vector_types_for_stmt)
15254 (vect_get_mask_type_for_stmt): New functions, split out from
15255 vect_determine_vectorization_factor.
15257 2018-05-16 Richard Biener <rguenther@suse.de>
15259 * tree-cfg.c (verify_gimple_assign_ternary): Properly
15260 verify the [VEC_]COND_EXPR embedded comparison.
15262 2018-05-15 Martin Sebor <msebor@redhat.com>
15264 PR tree-optimization/85753
15265 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Handle
15266 RECORD_TYPE in addition to ARRAY_TYPE.
15268 2018-05-15 Martin Sebor <msebor@redhat.com>
15270 PR middle-end/85643
15271 * calls.c (get_attr_nonstring_decl): Handle MEM_REF.
15273 2018-05-15 Richard Biener <rguenther@suse.de>
15275 * tree-ssa-dse.c (dse_classify_store): Remove use_stmt parameter,
15276 add by_clobber_p one. Change algorithm to collect all defs
15277 representing uses we need to walk and try reducing them to
15278 a single one before failing.
15279 (dse_dom_walker::dse_optimize_stmt): Adjust.
15281 2018-05-13 Mark Wielaard <mark@klomp.org>
15283 * dwarf2out.c (dwarf_OP): Handle DW_OP_addrx and DW_OP_constx.
15284 (size_of_loc_descr): Likewise.
15285 (output_loc_operands): Likewise.
15286 (output_loc_operands_raw): Likewise.
15287 (dw_addr_op): Use dwarf_OP () for DW_OP_constx and DW_OP_addrx.
15288 (resolve_addr_in_expr): Handle DW_OP_addrx and DW_OP_constx.
15289 (hash_loc_operands): Likewise.
15290 (compare_loc_operands): Likewise.
15292 2018-05-14 Mark Wielaard <mark@klomp.org>
15294 * dwarf2out.c (count_index_addrs): New function.
15295 (dwarf2out_finish): Use count_index_addrs to calculate addrs_length.
15297 2018-05-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
15299 PR tree-optimization/83648
15300 * ipa-pure-const.c (malloc_candidate_p): Allow function with NULL
15301 return value as malloc candidate.
15303 2018-05-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
15306 * ipa-pure-const.c (warn_function_malloc): Pass value of known_finite
15307 param as true in call to suggest_attribute.
15309 2018-05-14 Segher Boessenkool <segher@kernel.crashing.org>
15311 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete @itemx for
15312 -mreadonly-in-sdata.
15314 2018-05-14 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
15316 * config/aarch64/aarch64-simd.md (*aarch64_crypto_aese_fused):
15318 (aarch64_crypto_aesd_fused): Likewise.
15320 2018-05-14 Wilco Dijkstra <wdijkstr@arm.com>
15322 * config/aarch64/aarch64.md (mov<mode>): Remove '*' in alternatives.
15323 (movsi_aarch64): Likewise.
15324 (load_pairsi): Likewise.
15325 (load_pairdi): Likewise.
15326 (store_pairsi): Likewise.
15327 (store_pairdi): Likewise.
15328 (load_pairsf): Likewise.
15329 (load_pairdf): Likewise.
15330 (store_pairsf): Likewise.
15331 (store_pairdf): Likewise.
15332 (zero_extend): Likewise.
15333 (trunc): Swap alternatives.
15334 (fcvt_target): Add '?' to prefer w over r.
15336 2018-05-14 Jakub Jelinek <jakub@redhat.com>
15339 * config/i386/i386.md: Disallow non-commutative arithmetics in
15340 last twpeephole for mem {+,-,&,|,^}= x; mem != 0 after cmpelim
15341 optimization. Use COMMUTATIVE_ARITH_P test rather than != MINUS
15342 in the peephole2 before it.
15344 2018-05-14 Sebastian Peryt <sebastian.peryt@intel.com>
15346 * common/config/i386/i386-common.c (OPTION_MASK_ISA_CLDEMOTE_SET,
15347 OPTION_MASK_ISA_CLDEMOTE_UNSET): New defines.
15348 (ix86_handle_option): Handle -mcldemote.
15349 * config.gcc: New header.
15350 * config/i386/cldemoteintrin.h: New file.
15351 * config/i386/cpuid.h (bit_CLDEMOTE): New bit.
15352 * config/i386/driver-i386.c (host_detect_local_cpu): Detect
15354 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
15355 OPTION_MASK_ISA_CLDEMOTE.
15356 * config/i386/i386.c (ix86_target_string): Add -mcldemote.
15357 (ix86_valid_target_attribute_inner_p): Ditto.
15358 (enum ix86_builtins): Add IX86_BUILTIN_CLDEMOTE.
15359 (ix86_init_mmx_sse_builtins): Define __builtin_ia32_cldemote.
15360 (ix86_expand_builtin): Expand IX86_BUILTIN_CLDEMOTE.
15361 * config/i386/i386.h (TARGET_CLDEMOTE, TARGET_CLDEMOTE_P): New.
15362 * config/i386/i386.md (UNSPECV_CLDEMOTE): New.
15364 * config/i386/i386.opt: Add -mcldemote.
15365 * config/i386/x86intrin.h: New header.
15366 * doc/invoke.texi: Add -mcldemote.
15368 2018-05-14 Richard Biener <rguenther@suse.de>
15370 * doc/match-and-simplify.texi: Adjust :s documentation.
15372 2018-05-14 Alexander Monakov <amonakov@ispras.ru>
15374 * sort.cc (REORDER_23): Pass the type for the temporaries instead of
15375 intended memcpy size.
15376 (REORDER_45): Likewise.
15378 2018-05-13 Alexander Monakov <amonakov@ispras.ru>
15380 * sort.cc: New file.
15381 * system.h [!CHECKING_P] (qsort): Redirect to gcc_qsort.
15382 * vec.c (qsort_chk): Use gcc_qsort.
15383 * Makefile.in (OBJS-libcommon): Add sort.o.
15384 (build/sort.o): New target. Use it...
15385 (BUILD_RTL): ... here, and...
15386 (build/gencfn-macros): ... here, and...
15387 (build/genmatch): ... here.
15389 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
15390 Chung-Ju Wu <jasonwucj@gmail.com>
15392 * config.gcc (nds32*-*-*): Check that n15 is valid to --with-cpu.
15393 * config/nds32/nds32-graywolf.md: New file.
15394 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_GRAYWOLF.
15395 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n15
15397 * config/nds32/nds32-protos.h: More declarations for n15 pipeline.
15398 * config/nds32/nds32-utils.c: More implementations for n15 pipeline.
15399 * config/nds32/nds32.md (pipeline_model): Add graywolf.
15400 * config/nds32/nds32.opt (mcpu): Support n15 pipeline cpus.
15401 * config/nds32/pipelines.md: Include n15 settings.
15403 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
15404 Chung-Ju Wu <jasonwucj@gmail.com>
15406 * config.gcc (nds32*-*-*): Check that n12/n13 are valid to --with-cpu.
15407 * config/nds32/nds32-n13.md: New file.
15408 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N12 and CPU_N13.
15409 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n12/n13
15411 * config/nds32/nds32-protos.h: More declarations for n12/n13 pipeline.
15412 * config/nds32/nds32.md (pipeline_model): Add n13.
15413 * config/nds32/nds32.opt (mcpu): Support n12/n13 pipeline cpus.
15414 * config/nds32/pipelines.md: Include n13 settings.
15416 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
15417 Chung-Ju Wu <jasonwucj@gmail.com>
15419 * config.gcc (nds32*-*-*): Check that n10/d10 are valid to --with-cpu.
15420 * config/nds32/nds32-n10.md: New file.
15421 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N10.
15422 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n10
15424 * config/nds32/nds32-protos.h: More declarations for n10 pipeline.
15425 * config/nds32/nds32-utils.c: More implementations for n10 pipeline.
15426 * config/nds32/nds32.md (pipeline_model): Add n10.
15427 * config/nds32/nds32.opt (mcpu): Support n10 pipeline cpus.
15428 * config/nds32/pipelines.md: Include n10 settings.
15430 2018-05-13 Monk Chiang <sh.chiang04@gmail.com>
15431 Kito Cheng <kito.cheng@gmail.com>
15432 Chung-Ju Wu <jasonwucj@gmail.com>
15434 * config.gcc (nds32be-*-*): Handle --with-ext-dsp.
15435 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
15436 Add enum values for DSP extension instructions.
15437 * config/nds32/constraints.md (Iu06, IU06, CVp5, CVs5, CVs2, CVhi):
15439 * config/nds32/iterators.md (shifts, shiftrt, sat_plus, all_plus,
15440 sat_minus, all_minus, plus_minus, extend, sumax, sumin, sumin_max):
15441 New code iterators.
15442 (su, zs, uk, opcode, add_rsub, add_sub): New code attributes.
15443 * config/nds32/nds32-dspext.md: New file for DSP implementation.
15444 * config/nds32/nds32-intrinsic.c: Implementation of DSP extension.
15445 * config/nds32/nds32-intrinsic.md: Likewise.
15446 * config/nds32/nds32_intrinsic.h: Likewise.
15447 * config/nds32/nds32-md-auxiliary.c: Likewise.
15448 * config/nds32/nds32-memory-manipulation.c: Consider DSP extension.
15449 * config/nds32/nds32-predicates.c (const_vector_to_hwint): New.
15450 (nds32_valid_CVp5_p, nds32_valid_CVs5_p): New.
15451 (nds32_valid_CVs2_p, nds32_valid_CVhi_p): New.
15452 * config/nds32/nds32-protos.h: New declarations for DSP extension.
15453 * config/nds32/nds32-utils.c (extract_mac_non_acc_rtx): New case
15454 TYPE_DMAC in switch statement.
15455 * config/nds32/nds32.c: New checking and implementation for DSP
15456 extension instructions.
15457 * config/nds32/nds32.h: Likewise.
15458 * config/nds32/nds32.md: Likewise.
15459 * config/nds32/nds32.opt (mhw-abs, mext-dsp): New options.
15460 * config/nds32/predicates.md: Implement new predicates for DSP
15463 2018-05-11 Michael Meissner <meissner@linux.vnet.ibm.com>
15465 * config/rs6000/rs6000.md (mov<mode>_softfloat, FMOVE32):
15466 Reformat alternatives and attributes so it is easier to identify
15467 which constraints/attributes go with which instruction.
15468 (mov<mode>_hardfloat32, FMOVE64): Likewise.
15469 (mov<mode>_softfloat32, FMOVE64): Likewise.
15470 (mov<mode>_hardfloat64, FMOVE64): Likewise.
15471 (mov<mode>_softfloat64, FMOVE64): Likewise.
15473 2018-05-11 Kelvin Nilsen <kelvin@gcc.gnu.org>
15475 * doc/extend.texi (PowerPC Built-in Functions): Rename this
15477 (Basic PowerPC Built-in Functions): The new name of the
15478 subsection previously known as "PowerPC Built-in Functions".
15479 (Basic PowerPC Built-in Functions Available on all Configurations):
15481 (Basic PowerPC Built-in Functions Available on ISA 2.05): Likewise.
15482 (Basic PowerPC Built-in Functions Available on ISA 2.06): Likewise.
15483 (Basic PowerPC Built-in Functions Available on ISA 2.07): Likewise.
15484 (Basic PowerPC Built-in Functions Available on ISA 3.0): Likewise.
15486 2018-05-11 Martin Jambor <mjambor@suse.cz>
15489 * ipa-cp.c (intersect_with_plats): Check that the lattice contains
15492 2018-05-11 Richard Earnshaw <rearnsha@arm.com>
15495 * config/arm/arm-cpus.in (fgroup ARMv6m): Add be8 feature.
15497 2018-05-11 Sebastian Peryt <sebastian.peryt@intel.com>
15499 * common/config/i386/i386-common.c (OPTION_MASK_ISA_WAITPKG_SET,
15500 OPTION_MASK_ISA_WAITPKG_UNSET): New defines.
15501 (ix86_handle_option): Handle -mwaitpkg.
15502 * config.gcc: New header.
15503 * config/i386/cpuid.h (bit_WAITPKG): New bit.
15504 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mwaitpkg.
15505 * config/i386/i386-builtin-types.def ((UINT8, UNSIGNED, UINT64)): New
15507 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
15508 OPTION_MASK_ISA_WAITPKG.
15509 * config/i386/i386.c (ix86_target_string): Add -mwaitpkg.
15510 (ix86_option_override_internal): Add PTA_WAITPKG.
15511 (ix86_valid_target_attribute_inner_p): Add -mwaitpkg.
15512 (enum ix86_builtins): Add IX86_BUILTIN_UMONITOR, IX86_BUILTIN_UMWAIT,
15513 IX86_BUILTIN_TPAUSE.
15514 (ix86_init_mmx_sse_builtins): Define __builtin_ia32_umonitor,
15515 __builtin_ia32_umwait and __builtin_ia32_tpause.
15516 (ix86_expand_builtin): Expand IX86_BUILTIN_UMONITOR,
15517 IX86_BUILTIN_UMWAIT, IX86_BUILTIN_TPAUSE.
15518 * config/i386/i386.h (TARGET_WAITPKG, TARGET_WAITPKG_P): New.
15519 * config/i386/i386.md (UNSPECV_UMWAIT, UNSPECV_UMONITOR,
15520 UNSPECV_TPAUSE): New.
15521 (umwait, umwait_rex64, umonitor_<mode>, tpause, tpause_rex64): New.
15522 * config/i386/i386.opt: Add -mwaitpkg.
15523 * config/i386/waitpkgintrin.h: New file.
15524 * config/i386/x86intrin.h: New header.
15525 * doc/invoke.texi: Add -mwaitpkg.
15527 2018-05-11 Richard Earnshaw <rearnsha@arm.com>
15530 * config/arm/arm-cpus.in: Add comment that ARMv6-m and ARMv6S-m are now
15532 (cortex-m0): Use armv6s-m isa.
15533 (cortex-m0plus): Likewise.
15534 (cortex-m1): Likewise.
15535 (cortex-m0.small-multiply): Likewise.
15536 (cortex-m0plus.small-multiply): Likewise.
15537 (cortex-m1.small-multiply): Likewise.
15539 2018-05-11 Allan Sandfeld Jensen <allan.jensen@qt.io>
15540 Jakub Jelinek <jakub@redhat.com>
15542 PR tree-optimization/85692
15543 * tree-ssa-forwprop.c (simplify_vector_constructor): Try two
15544 source permute as well.
15546 2018-05-11 Martin Liska <mliska@suse.cz>
15549 * doc/extend.texi: Document LLVM style format for no_sanitize
15552 2018-05-10 Michael Meissner <meissner@linux.vnet.ibm.com>
15554 * config/rs6000/rs6000.c (mode_supports_dq_form): Rename
15555 mode_supports_vsx_dform_quad to mode_supports_dq_form.
15556 (mode_supports_vsx_dform_quad): Likewise.
15557 (mode_supports_vmx_dform): Move these functions to be next to the
15558 other mode_supports functions.
15559 (mode_supports_dq_form): Likewise.
15560 (quad_address_p): Change calls of mode_supports_vsx_dform_quad to
15561 mode_supports_dq_form.
15562 (reg_offset_addressing_ok_p): Likewise.
15563 (offsettable_ok_by_alignment): Likewise.
15564 (rs6000_legitimate_offset_address_p): Likewise.
15565 (legitimate_lo_sum_address_p): Likewise.
15566 (rs6000_legitimize_address): Likewise.
15567 (rs6000_legitimize_reload_address): Likewise.
15568 (rs6000_secondary_reload_inner): Likewise.
15569 (rs6000_preferred_reload_class): Likewise.
15570 (rs6000_output_move_128bit): Likewise.
15572 2018-05-10 Uros Bizjak <ubizjak@gmail.com>
15574 * config/i386/i386.c (ix86_expand_builtin) <case IX86_BUILTIN_RDPID>:
15575 Generate SImode target register for null target.
15576 <case IX86_BUILTIN_XGETBV>: Ditto.
15577 <case IX86_BUILTIN_XSETBV>: Optimize LSHIFTRT generation.
15578 * config/i386/xsaveintrin.h (_xgetbv): Add missing return.
15580 2018-05-10 Carl Love <cel@us.ibm.com>
15582 * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
15583 dcbtt and dcbtstt if operands[2] is 0.
15585 2018-05-10 Uros Bizjak <ubizjak@gmail.com>
15588 * config/i386/sse.md (usadv64qi): New expander.
15590 2018-05-10 Segher Boessenkool <segher@kernel.crashing.org>
15592 * config/rs6000/altivec.md (altivec_vmrghb, altivec_vmrghh,
15593 altivec_vmrghw, altivec_vmrglb, altivec_vmrglh, altivec_vmrglw): Remove
15594 -maltivec=be support.
15595 (vec_widen_umult_even_v16qi, vec_widen_smult_even_v16qi,
15596 vec_widen_umult_even_v8hi, vec_widen_smult_even_v8hi,
15597 vec_widen_umult_even_v4si, vec_widen_smult_even_v4si,
15598 vec_widen_umult_odd_v16qi, vec_widen_smult_odd_v16qi,
15599 vec_widen_umult_odd_v8hi, vec_widen_smult_odd_v8hi,
15600 vec_widen_umult_odd_v4si, vec_widen_smult_odd_v4si, altivec_vpkpx,
15601 altivec_vpks<VI_char>ss, altivec_vpks<VI_char>us,
15602 altivec_vpku<VI_char>us, altivec_vpku<VI_char>um, altivec_vsum2sws,
15603 altivec_vsumsws): Adjust.
15604 (altivec_vspltb *altivec_vspltb_internal, altivec_vsplth,
15605 *altivec_vsplth_internal, altivec_vspltw, *altivec_vspltw_internal,
15606 altivec_vspltsf, *altivec_vspltsf_internal): Remove -maltivec=be
15608 (altivec_vperm_<mode>, altivec_vperm_<mode>_uns,
15609 altivec_vupkhs<VU_char>, altivec_vupkls<VU_char>, altivec_vupkhpx,
15610 altivec_vupklpx, altivec_lvsl, altivec_lvsr): Adjust.
15611 (altivec_lve<VI_char>x): Delete expand.
15612 (*altivec_lve<VI_char>x_internal): Rename to...
15613 (altivec_lve<VI_char>x): ... this.
15614 (altivec_lvxl_<mode>): Delete expand.
15615 (*altivec_lvxl_<mode>_internal): Rename to ...
15616 (altivec_lvxl_<mode>): ... this.
15617 (altivec_stvxl_<mode>): Delete expand.
15618 (*altivec_stvxl_<mode>_internal): Rename to ...
15619 (altivec_stvxl_<mode>): ... this.
15620 (altivec_stve<VI_char>x): Delete expand.
15621 (*altivec_stve<VI_char>x_internal): Rename to ...
15622 (altivec_stve<VI_char>x): ... this.
15623 (doublee<mode>2, unsdoubleev4si2, doubleo<mode>2, unsdoubleov4si2,
15624 doubleh<mode>2, unsdoublehv4si2, doublel<mode>2, unsdoublelv4si2,
15625 reduc_plus_scal_<mode>): Adjust.
15626 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Adjust
15628 (rs6000_cpu_cpp_builtins): Adjust.
15629 (altivec_resolve_overloaded_builtin): Remove -maltivec=be support.
15630 * config/rs6000/rs6000-protos.h (altivec_expand_lvx_be,
15631 altivec_expand_stvx_be, altivec_expand_stvex_be): Delete.
15632 * config/rs6000/rs6000.c (rs6000_option_override_internal): Remove
15633 -maltivec=be support.
15634 (rs6000_split_vec_extract_var): Adjust.
15635 (rs6000_split_v4si_init): Adjust.
15636 (swap_selector_for_mode): Delete.
15637 (altivec_expand_lvx_be, altivec_expand_stvx_be,
15638 altivec_expand_stvex_be): Delete.
15639 (altivec_expand_lv_builtin, altivec_expand_stv_builtin): Remove
15640 -maltivec=be support.
15641 (rs6000_gimple_fold_builtin): Ditto.
15642 (rs6000_generate_float2_double_code, rs6000_generate_float2_code):
15644 * config/rs6000/rs6000.h (VECTOR_ELT_ORDER_BIG): Delete.
15645 (TARGET_DIRECT_MOVE_64BIT): Adjust.
15646 * config/rs6000/rs6000.md (split for extendsidi2 for vectors): Adjust.
15647 * config/rs6000/rs6000.opt (maltivec=le, maltivec=be): Delete.
15648 * config/rs6000/vsx.md (floate<mode>, unsfloatev2di, floato<mode>,
15649 unsfloatov2di, vsignedo_v2df, vsignede_v2df, vunsignedo_v2df,
15650 vunsignede_v2df, vsx_extract_<mode>_p9, *vsx_extract_si,
15651 *vsx_extract_<mode>_p8, *vsx_extract_si_<uns>float_df,
15652 *vsx_extract_si_<uns>float_<mode>, vsx_set_<mode>_p9, vsx_set_v4sf_p9,
15653 *vsx_insert_extract_v4sf_p9, *vsx_insert_extract_v4sf_p9_2, and an
15654 anonymous split): Adjust.
15655 (vsx_mergel_<mode>, vsx_mergeh_<mode>): Remove -maltivec=be support.
15656 (vsx_xxspltd_<mode>, extract4b, insert4b): Adjust.
15658 2018-05-10 Eric Botcazou <ebotcazou@adacore.com>
15660 * configure.ac (gcc_gxx_include_dir_add_sysroot): Set it to 1 only
15661 when --with-gxx-include-dir is also specified.
15662 * configure: Regenerate.
15664 2018-05-09 Jim Wilson <jimw@sifive.com>
15667 * config.gcc (riscv*-*-*): Handle --with-multilib-list.
15668 * config/riscv/t-withmultilib: New.
15669 * config/riscv/withmultilib.h: New.
15670 * doc/install.texi: Document RISC-V --with-multilib-list support.
15672 2018-05-09 Richard Biener <rguenther@suse.de>
15674 * tree-vect-slp.c (vect_bb_slp_scalar_cost): Fill a cost
15676 (vect_bb_vectorization_profitable_p): Adjust. Compute
15677 actual scalar cost using the cost vector and the add_stmt_cost
15680 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
15682 PR rtl-optimization/85645
15683 * config/rs6000/rs6000.c (rs6000_emit_prologue_components): Put a SET
15684 in the REG_CFA_REGISTER note for LR, don't leave it empty.
15686 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
15688 PR rtl-optimization/85645
15689 * shrink-wrap.c (spread_components): Return a boolean saying if
15690 anything was changed.
15691 (try_shrink_wrapping_separate): Iterate spread_components until
15692 nothing changes anymore.
15694 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
15696 PR rtl-optimization/85645
15697 * regrename.c (build_def_use): Also kill the chains that include the
15698 destination of a REG_CFA_REGISTER note.
15700 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
15702 PR rtl-optimization/85645
15703 * regcprop.c (copyprop_hardreg_forward_1): Don't propagate into an
15704 insn that has a REG_CFA_REGISTER note.
15706 2018-05-09 Richard Sandiford <richard.sandiford@linaro.org>
15708 * cfgexpand.c (expand_clobber): New function.
15709 (expand_gimple_stmt_1): Use it.
15710 * tree-vect-stmts.c (vect_clobber_variable): New function,
15712 (vectorizable_simd_clone_call): ...here.
15713 (vectorizable_store): Emit a clobber either side of an
15714 IFN_STORE_LANES sequence.
15715 (vectorizable_load): Emit a clobber after an IFN_LOAD_LANES sequence.
15717 2018-05-09 Tom de Vries <tom@codesourcery.com>
15720 * config/nvptx/nvptx.md (define_insn "trap", define_insn "trap_if_true")
15721 (define_insn "trap_if_false"): Add exit after trap.
15723 2018-05-09 Eric Botcazou <ebotcazou@adacore.com>
15725 PR rtl-optimization/85638
15726 * bb-reorder.c: Include common/common-target.h.
15727 (create_forwarder_block): New function extracted from...
15728 (fix_up_crossing_landing_pad): ...here. Rename into...
15729 (dw2_fix_up_crossing_landing_pad): ...this.
15730 (sjlj_fix_up_crossing_landing_pad): New function.
15731 (find_rarely_executed_basic_blocks_and_crossing_edges): In SJLJ mode,
15732 call sjlj_fix_up_crossing_landing_pad if there are incoming EH edges
15733 from both partitions and exit the loop after one iteration.
15735 2018-05-08 Kelvin Nilsen <kelvin@gcc.gnu.org>
15738 * doc/extend.texi (PowerPC Built-in Functions): Rename this
15740 (Basic PowerPC Built-in Functions): The new name of the
15741 subsection previously known as "PowerPC Built-in Functions".
15742 (Basic PowerPC Built-in Functions Available on all Configurations):
15744 (Basic PowerPC Built-in Functions Available on ISA 2.05): New
15746 (Basic PowerPC Built-in Functions Available on ISA 2.06): New
15748 (Basic PowerPC Built-in Functions Available on ISA 2.07): New
15750 (Basic PowerPC Built-in Functions Available on ISA 3.0): New
15753 2018-05-08 Jim Wilson <jimw@sifive.com>
15755 * config/riscv/linux.h (MUSL_ABI_SUFFIX): Delete unnecessary backslash.
15756 (LD_EMUL_SUFFIX): New.
15757 (LINK_SPEC): Use it.
15759 2018-05-08 Kelvin Nilsen <kelvin@gcc.gnu.org>
15761 * doc/extend.texi (PowerPC Built-in Functions): Rename this
15763 (Basic PowerPC Built-in Functions): The new name of the
15764 subsection previously known as "PowerPC Built-in Functions".
15765 (Basic PowerPC Built-in Functions Available on all Configurations):
15767 (Basic PowerPC Built-in Functions Available on ISA 2.05): New
15769 (Basic PowerPC Built-in Functions Available on ISA 2.06): New
15771 (Basic PowerPC Built-in Functions Available on ISA 2.07): New
15773 (Basic PowerPC Built-in Functions Available on ISA 3.0): New
15776 2018-05-08 Jakub Jelinek <jakub@redhat.com>
15779 * config/i386/i386.md: Add peepholes for mem {+,-,&,|,^}= x; mem != 0
15780 after cmpelim optimization.
15782 2018-05-08 Olga Makhotina <olga.makhotina@intel.com>
15784 * config.gcc: Support "goldmont".
15785 * config/i386/driver-i386.c (host_detect_local_cpu): Detect "goldmont".
15786 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
15787 PROCESSOR_GOLDMONT.
15788 * config/i386/i386.c (m_GOLDMONT): Define.
15789 (processor_target_table): Add "goldmont".
15790 (PTA_GOLDMONT): Define.
15791 (ix86_lea_outperforms): Add TARGET_GOLDMONT.
15792 (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT.
15793 (fold_builtin_cpu): Add M_INTEL_GOLDMONT.
15794 (fold_builtin_cpu): Add "goldmont".
15795 (ix86_add_stmt_cost): Add TARGET_GOLDMONT.
15796 (ix86_option_override_internal): Add "goldmont".
15797 * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT.
15798 (processor_type): Add PROCESSOR_GOLDMONT.
15799 * config/i386/i386.md: Add CPU "glm".
15800 * config/i386/glm.md: New file.
15801 * config/i386/x86-tune.def: Add m_GOLDMONT.
15802 * doc/invoke.texi: Add goldmont as x86 -march=/-mtune= CPU type.
15804 2018-05-08 Jakub Jelinek <jakub@redhat.com>
15807 * config/i386/i386.c (ix86_expand_sse2_abs): Handle E_V2DImode and
15809 * config/i386/sse.md (abs<mode>2): Use VI_AVX2 iterator instead of
15810 VI1248_AVX512VL_AVX512BW. Handle V2DImode and V4DImode if not
15811 TARGET_AVX512VL using ix86_expand_sse2_abs. Formatting fixes.
15814 * config/i386/i386.c (ix86_fold_builtin): Handle
15815 IX86_BUILTIN_{,P}MOVMSK{PS,PD,B}{,128,256}.
15818 * config/i386/sse.md (ssequaterinsnmode): New mode attribute.
15819 (*<extract_type>_vinsert<shuffletype><extract_suf>_0): New pattern.
15821 2018-05-08 Richard Earnshaw <rearnsha@arm.com>
15824 * config/arm/parsecpu.awk (check_cpu): Fix operator precedence.
15825 (check_arch): Likewise.
15826 (check_fpu): Return the result rather than printing it.
15827 (end arch): Fix operator precedence.
15828 (end cpu): Likewise.
15829 (END): Print the result from check_fpu.
15831 2018-05-08 Richard Sandiford <richard.sandiford@linaro.org>
15832 Alan Hayward <alan.hayward@arm.com>
15833 David Sherwood <david.sherwood@arm.com>
15835 * config/aarch64/aarch64-sve.md (*pred_cmp<cmp_op><mode>_combine)
15836 (*pred_cmp<cmp_op><mode>, *fcm<cmp_op><mode>_and_combine)
15837 (*fcmuo<mode>_and_combine, *fcm<cmp_op><mode>_and)
15838 (*fcmuo<mode>_and): New patterns.
15840 2018-05-08 Richard Sandiford <richard.sandiford@linaro.org>
15842 * config/aarch64/iterators.md (UNSPEC_COND_LO, UNSPEC_COND_LS)
15843 (UNSPEC_COND_HI, UNSPEC_COND_HS, UNSPEC_COND_UO): Delete.
15844 (SVE_INT_CMP, SVE_FP_CMP): New code iterators.
15845 (cmp_op, sve_imm_con): New code attributes.
15846 (SVE_COND_INT_CMP, imm_con): Delete.
15847 (cmp_op): Remove above unspecs from int attribute.
15848 * config/aarch64/aarch64-sve.md (*vec_cmp<cmp_op>_<mode>): Rename
15850 (*cmp<cmp_op><mode>): ...this. Use UNSPEC_MERGE_PTRUE instead of
15851 comparison-specific unspecs.
15852 (*vec_cmp<cmp_op>_<mode>_ptest): Rename to...
15853 (*cmp<cmp_op><mode>_ptest): ...this and adjust likewise.
15854 (*vec_cmp<cmp_op>_<mode>_cc): Rename to...
15855 (*cmp<cmp_op><mode>_cc): ...this and adjust likewise.
15856 (*vec_fcm<cmp_op><mode>): Rename to...
15857 (*fcm<cmp_op><mode>): ...this and adjust likewise.
15858 (*vec_fcmuo<mode>): Rename to...
15859 (*fcmuo<mode>): ...this and adjust likewise.
15860 (*pred_fcm<cmp_op><mode>): New pattern.
15861 * config/aarch64/aarch64.c (aarch64_emit_unop, aarch64_emit_binop)
15862 (aarch64_emit_sve_ptrue_op, aarch64_emit_sve_ptrue_op_cc): New
15864 (aarch64_unspec_cond_code): Remove handling of LTU, GTU, LEU, GEU
15866 (aarch64_gen_unspec_cond, aarch64_emit_unspec_cond): Delete.
15867 (aarch64_emit_sve_predicated_cond): New function.
15868 (aarch64_expand_sve_vec_cmp_int): Use aarch64_emit_sve_ptrue_op_cc.
15869 (aarch64_emit_unspec_cond_or): Replace with...
15870 (aarch64_emit_sve_or_conds): ...this new function. Use
15871 aarch64_emit_sve_ptrue_op for the individual comparisons and
15872 aarch64_emit_binop to OR them together.
15873 (aarch64_emit_inverted_unspec_cond): Replace with...
15874 (aarch64_emit_sve_inverted_cond): ...this new function. Use
15875 aarch64_emit_sve_ptrue_op for the comparison and
15876 aarch64_emit_unop to invert the result.
15877 (aarch64_expand_sve_vec_cmp_float): Update after the above
15878 changes. Use aarch64_emit_sve_ptrue_op for native comparisons.
15880 2018-05-07 Nathan Sidwell <nathan@acm.org>
15882 * doc/invoke.texi (C++ Dialect Options): Remove -ffor-scope.
15883 * doc/extend.texi (Deprecated Features): Remove -fno-for-scope
15884 (Backwards Compatibility): Likewise.
15886 2018-05-07 Luis Machado <luis.machado@linaro.org>
15890 2018-05-07 Luis Machado <luis.machado@linaro.org>
15892 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
15893 <prefetch_dynamic_strides>: New const bool field.
15894 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
15895 prefetch_dynamic_strides.
15896 (exynosm1_prefetch_tune): Likewise.
15897 (thunderxt88_prefetch_tune): Likewise.
15898 (thunderx_prefetch_tune): Likewise.
15899 (thunderx2t99_prefetch_tune): Likewise.
15900 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
15902 (aarch64_override_options_internal): Update to set
15903 PARAM_PREFETCH_DYNAMIC_STRIDES.
15904 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
15905 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
15906 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
15907 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
15908 prefetch-dynamic-strides setting.
15910 2018-05-07 Luis Machado <luis.machado@linaro.org>
15912 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
15913 <minimum_stride>: New const int field.
15914 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
15915 minimum_stride field.
15916 (exynosm1_prefetch_tune): Likewise.
15917 (thunderxt88_prefetch_tune): Likewise.
15918 (thunderx_prefetch_tune): Likewise.
15919 (thunderx2t99_prefetch_tune): Likewise.
15920 (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
15921 (aarch64_override_options_internal): Update to set
15922 PARAM_PREFETCH_MINIMUM_STRIDE.
15923 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
15924 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
15925 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
15926 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
15927 stride is constant and is below the minimum stride threshold.
15929 2018-05-07 Luis Machado <luis.machado@linaro.org>
15931 * config/aarch64/aarch64.c (qdf24xx_prefetch_tune) <l2_cache_size>: Set
15934 2018-05-07 Luis Machado <luis.machado@linaro.org>
15936 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
15937 <prefetch_dynamic_strides>: New const bool field.
15938 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
15939 prefetch_dynamic_strides.
15940 (exynosm1_prefetch_tune): Likewise.
15941 (thunderxt88_prefetch_tune): Likewise.
15942 (thunderx_prefetch_tune): Likewise.
15943 (thunderx2t99_prefetch_tune): Likewise.
15944 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
15946 (aarch64_override_options_internal): Update to set
15947 PARAM_PREFETCH_DYNAMIC_STRIDES.
15948 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
15949 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
15950 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
15951 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
15952 prefetch-dynamic-strides setting.
15954 2018-05-07 Luis Machado <luis.machado@linaro.org>
15956 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
15957 <minimum_stride>: New const int field.
15958 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
15959 minimum_stride field.
15960 (exynosm1_prefetch_tune): Likewise.
15961 (thunderxt88_prefetch_tune): Likewise.
15962 (thunderx_prefetch_tune): Likewise.
15963 (thunderx2t99_prefetch_tune): Likewise.
15964 (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
15965 (aarch64_override_options_internal): Update to set
15966 PARAM_PREFETCH_MINIMUM_STRIDE.
15967 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
15968 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
15969 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
15970 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
15971 stride is constant and is below the minimum stride threshold.
15973 2018-05-06 Jakub Jelinek <jakub@redhat.com>
15976 * cfgexpand.c (expand_asm_stmt): Don't create a temporary if
15977 the type is addressable. Don't force op into register if it has
15980 2018-05-05 Roland McGrath <mcgrathr@google.com>
15983 * varasm.c (default_section_type_flags): Set SECTION_NOTYPE for
15984 any section for which we don't know a specific type it should have,
15985 regardless of name. Previously this was done only for the exact
15986 names ".init_array", ".fini_array", and ".preinit_array".
15987 (default_elf_asm_named_section): Add comment about
15988 relationship with default_section_type_flags and SECTION_NOTYPE.
15989 (get_section): Don't consider it a type conflict if one side has
15990 SECTION_NOTYPE and the other doesn't, as long as neither has the
15991 SECTION_BSS et al used in the default_section_type_flags logic.
15993 2018-05-05 Tom de Vries <tom@codesourcery.com>
15996 * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_3): Define.
15997 (workaround_barsyncs): New function.
15998 (nvptx_reorg): Use workaround_barsyncs.
15999 * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
16000 (define_expand "nvptx_membar_cta"): New define_expand.
16001 (define_insn "*nvptx_membar_cta"): New insn.
16003 2018-05-04 Pekka Jääskeläinen <pekka.jaaskelainen@parmance.com>
16005 * brig-builtins.def: Add consts to ptrs etc. in BRIG builtin defs.
16006 To improve optimization opportunities.
16007 * builtin-types.def: The new needed builtin types for the above.
16009 2018-05-04 Richard Biener <rguenther@suse.de>
16011 * bb-reorder.c (sanitize_hot_paths): Release hot_bbs_to_check.
16012 * gimple-ssa-store-merging.c
16013 (imm_store_chain_info::output_merged_store): Remove redundant create,
16014 release split_store vector contents on failure.
16015 * tree-vect-slp.c (vect_schedule_slp_instance): Avoid leaking
16016 scalar stmt vector on cache hit.
16018 2018-05-04 Segher Boessenkool <segher@kernel.crashing.org>
16020 * common/config/rs6000/rs6000-common.c (rs6000_handle_option): Remove
16022 * config.gcc (powerpc-xilinx-eabi*): Remove.
16023 * config/rs6000/predicates.md (easy_fp_constant): Remove Xilinx FP
16025 (fusion_addis_mem_combo_load): Ditto.
16026 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Remove Xilinx
16028 (rs6000_cpu_cpp_builtins): Ditto.
16029 * config/rs6000/rs6000-linux.c
16030 (rs6000_linux_float_exceptions_rounding_supported_p): Ditto.
16031 * config/rs6000/rs6000-opts.h (enum fpu_type_t): Delete.
16032 * config/rs6000/rs6000.c (rs6000_debug_reg_global): Remove Xilinx FP
16034 (rs6000_setup_reg_addr_masks): Ditto.
16035 (rs6000_init_hard_regno_mode_ok): Ditto.
16036 (rs6000_option_override_internal): Ditto.
16037 (legitimate_lo_sum_address_p): Ditto.
16038 (rs6000_legitimize_address): Ditto.
16039 (rs6000_legitimize_reload_address): Ditto.
16040 (rs6000_legitimate_address_p): Ditto.
16041 (abi_v4_pass_in_fpr): Ditto.
16042 (setup_incoming_varargs): Ditto.
16043 (rs6000_gimplify_va_arg): Ditto.
16044 (rs6000_split_multireg_move): Ditto.
16045 (rs6000_savres_strategy): Ditto.
16046 (rs6000_emit_prologue_components): Ditto.
16047 (rs6000_emit_epilogue_components): Ditto.
16048 (rs6000_emit_prologue): Ditto.
16049 (rs6000_emit_epilogue): Ditto.
16050 (rs6000_elf_file_end): Ditto.
16051 (rs6000_function_value): Ditto.
16052 (rs6000_libcall_value): Ditto.
16053 * config/rs6000/rs6000.h: Ditto.
16054 (TARGET_MINMAX_SF, TARGET_MINMAX_DF): Delete, merge to ...
16055 (TARGET_MINMAX): ... this. New.
16056 (TARGET_SF_FPR, TARGET_DF_FPR, TARGET_SF_INSN, TARGET_DF_INSN): Delete.
16057 * config/rs6000/rs6000.md: Remove Xilinx FP support.
16058 (*movsi_internal1_single): Delete.
16059 * config/rs6000/rs6000.opt (msingle-float, mdouble-float, msimple-fpu,
16060 mfpu=, mxilinx-fpu): Delete.
16061 * config/rs6000/singlefp.h: Delete.
16062 * config/rs6000/sysv4.h: Remove Xilinx FP support.
16063 * config/rs6000/t-rs6000: Ditto.
16064 * config/rs6000/t-xilinx: Delete.
16065 * config/rs6000/titan.md: Adjust for fp_type removal.
16066 * config/rs6000/vsx.md: Remove Xilinx FP support.
16067 (VStype_simple): Delete.
16068 (VSfptype_simple, VSfptype_mul, VSfptype_div, VSfptype_sqrt): Delete.
16069 * config/rs6000/xfpu.h: Delete.
16070 * config/rs6000/xfpu.md: Delete.
16071 * config/rs6000/xilinx.h: Delete.
16072 * config/rs6000/xilinx.opt: Delete.
16073 * doc/invoke.texi (RS/6000 and PowerPC Options): Remove
16074 -msingle-float, -mdouble-float, -msimple-fpu, -mfpu=, and -mxilinx-fpu.
16076 2018-05-04 Tom de Vries <tom@codesourcery.com>
16079 * builtins.c (expand_builtin_goacc_parlevel_id_size): Handle null target
16082 2018-05-04 Richard Biener <rguenther@suse.de>
16084 PR middle-end/85627
16085 * tree-complex.c (update_complex_assignment): We are always in SSA form.
16086 (expand_complex_div_wide): Likewise.
16087 (expand_complex_operations_1): Likewise.
16088 (expand_complex_libcall): Preserve EH info of the original stmt.
16089 (tree_lower_complex): Handle removed blocks.
16090 * tree.c (build_common_builtin_nodes): Do not set ECF_NOTRHOW
16091 on complex multiplication and division libcall builtins.
16093 2018-05-04 Richard Biener <rguenther@suse.de>
16095 PR middle-end/85574
16096 * fold-const.c (negate_expr_p): Restrict negation of operand
16097 zero of a division to when we know that can happen without
16099 (fold_negate_expr_1): Likewise.
16101 2018-05-04 Jakub Jelinek <jakub@redhat.com>
16104 * real.h (real_nextafter): Declare.
16105 * real.c (real_nextafter): New function.
16106 * fold-const-call.c (fold_const_nextafter): New function.
16107 (fold_const_call_sss): Call it for CASE_CFN_NEXTAFTER and
16108 CASE_CFN_NEXTTOWARD.
16109 (fold_const_call_1): For CASE_CFN_NEXTTOWARD call fold_const_call_sss
16110 even when arg1_mode is different from arg0_mode.
16112 2018-05-03 Nathan Sidwell <nathan@acm.org>
16114 * doc/extend.texi (Deprecated Features): Remove
16115 -ffriend-injection.
16116 (Backwards Compatibility): Likewise.
16117 * doc/invoke.texi (C++ Language Options): Likewise.
16118 (C++ Dialect Options): Likewise.
16120 2018-05-03 Jakub Jelinek <jakub@redhat.com>
16123 * config/i386/avx512fintrin.h (_mm512_mullox_epi64,
16124 _mm512_mask_mullox_epi64): New intrinsics.
16126 2018-05-03 Tom de Vries <tom@codesourcery.com>
16129 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
16130 dump files): Add offload-tree.
16132 2018-05-03 Richard Biener <rguenther@suse.de>
16134 PR tree-optimization/85615
16135 * tree-ssa-threadupdate.c (thread_block_1): Only allow exits
16136 to loops not nested in BBs loop father to avoid creating multi-entry
16139 2018-05-03 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
16141 PR tree-optimization/70291
16142 * tree-complex.c (expand_complex_libcall): Add type, inplace_p
16143 arguments. Change return type to tree. Emit libcall as a new
16144 statement rather than replacing existing one when inplace_p is true.
16145 (expand_complex_multiplication_components): New function.
16146 (expand_complex_multiplication): Expand floating-point complex
16147 multiplication using the above.
16148 (expand_complex_division): Rename inner_type parameter to type.
16149 Update expand_complex_libcall call-site.
16150 (expand_complex_operations_1): Update expand_complex_multiplication
16151 and expand_complex_division call-sites.
16153 2018-05-02 Jakub Jelinek <jakub@redhat.com>
16156 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
16157 *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
16158 *<shift_insn><dwi>3_doubleword_mask_1): In condition require that
16159 the highest significant bit of the shift count mask is clear. In
16160 check whether and[sq]i3 is needed verify that all significant bits
16161 of the shift count other than the highest are set.
16163 2018-05-02 Tom de Vries <tom@codesourcery.com>
16166 * builtins.def (DEF_GOACC_BUILTIN_ONLY): Define.
16167 * omp-builtins.def (BUILT_IN_GOACC_PARLEVEL_ID)
16168 (BUILT_IN_GOACC_PARLEVEL_SIZE): New builtin.
16169 * builtins.c (expand_builtin_goacc_parlevel_id_size): New function.
16170 (expand_builtin): Call expand_builtin_goacc_parlevel_id_size.
16171 * doc/extend.texi (Other Builtins): Add __builtin_goacc_parlevel_id and
16172 __builtin_goacc_parlevel_size.
16174 2018-05-02 Richard Biener <rguenther@suse.de>
16176 PR tree-optimization/85597
16177 * tree-vect-stmts.c (vectorizable_operation): For ternary SLP
16178 do not use split vect_get_vec_defs call but call vect_get_slp_defs
16181 2018-05-02 Tom de Vries <tom@codesourcery.com>
16184 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
16185 dump files): Add ltrans-tree.
16187 2018-05-02 Tom de Vries <tom@codesourcery.com>
16190 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
16191 dump files): Add wpa-ipa.
16193 2018-05-02 Segher Boessenkool <segher@kernel.crashing.org>
16195 * config.gcc (powerpc*-*-*): Remove paired.h. Unsupport the
16196 powerpc*-*-linux*paired* target.
16197 * config/rs6000/750cl.h: Delete.
16198 * config/rs6000/paired.h: Delete.
16199 * config/rs6000/paired.md: Delete.
16200 * config/rs6000/predicates.md (easy_vector_constant): Remove paired
16202 * config/rs6000/rs6000-builtin.def: Remove paired float support.
16203 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Update
16204 comment. Remove paired float support.
16205 * config/rs6000/rs6000-modes.def: Remove V2SF and V2SI.
16206 * config/rs6000/rs6000-opts.h (enum rs6000_vector): Delete
16208 * config/rs6000/rs6000-protos.h (paired_expand_vector_init,
16209 paired_emit_vector_cond_expr, paired_expand_vector_move): Delete
16211 * config/rs6000/rs6000.c: Remove paired float support.
16212 (paired_expand_vector_init, paired_expand_vector_move,
16213 paired_emit_vector_compare, paired_emit_vector_cond_expr,
16214 (paired_expand_lv_builtin, paired_expand_stv_builtin,
16215 paired_expand_builtin, paired_expand_predicate_builtin,
16216 paired_init_builtins): Delete.
16217 * config/rs6000/rs6000.h: Remove paired float support.
16218 * config/rs6000/rs6000.md: Remove paired float support.
16219 (move_from_CR_ov_bit): Delete.
16220 * config/rs6000/rs6000.opt (mpaired): Delete.
16221 * config/rs6000/t-rs6000: Remove paired.md from MD_INCLUDES.
16222 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mpaired.
16224 2018-05-02 Richard Biener <rguenther@suse.de>
16226 PR middle-end/85567
16227 * gimplify.c (gimplify_save_expr): When in SSA form allow
16228 SAVE_EXPRs to compute to SSA vars.
16230 2018-05-02 Jakub Jelinek <jakub@redhat.com>
16233 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
16234 *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
16235 *<shift_insn><dwi>3_doubleword_mask_1): If and[sq]i3 is needed, don't
16236 clobber operands[2], instead use a new pseudo. Formatting fixes.
16238 2018-05-02 Richard Sandiford <richard.sandiford@linaro.org>
16240 PR tree-optimization/85586
16241 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence): Only
16242 exit early for statements in the same group if the accesses are
16245 2018-05-02 Tom de Vries <tom@codesourcery.com>
16248 * lto-wrapper.c (compile_offload_image): Add "could not find mkoffload"
16251 2018-05-01 Marc Glisse <marc.glisse@inria.fr>
16253 PR tree-optimization/85143
16254 * match.pd (A<B&A<C): Extend to BIT_IOR_EXPR.
16256 2018-05-01 Tom de Vries <tom@codesourcery.com>
16259 * config/nvptx/mkoffload.c (main): Suggest using -B in "offload compiler
16260 not found" error message.
16262 2018-05-01 Tom de Vries <tom@codesourcery.com>
16265 * vec.h (VEC_ORDERED_REMOVE_IF, VEC_ORDERED_REMOVE_IF_FROM_TO): Define.
16266 * vec.c (test_ordered_remove_if): New function.
16267 (vec_c_tests): Call test_ordered_remove_if.
16268 * dwarf2cfi.c (connect_traces): Use VEC_ORDERED_REMOVE_IF_FROM_TO.
16269 * lto-streamer-out.c (prune_offload_funcs): Use VEC_ORDERED_REMOVE_IF.
16270 * tree-vect-patterns.c (vect_pattern_recog_1): Use
16271 VEC_ORDERED_REMOVE_IF.
16273 2018-05-01 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
16275 PR tree-optimization/82665
16276 * vr-values.c (vr_values::extract_range_from_binary_expr): Handle
16277 pointer subtraction where arguments come from a memchr call.
16279 2018-05-01 Jakub Jelinek <jakub@redhat.com>
16281 * configure.ac (LD_AS_NEEDED_OPTION, LD_NO_AS_NEEDED_OPTION): Use
16282 --push-state --as-needed and --pop-state instead of --as-needed and
16283 --no-as-needed if ld supports it.
16284 * configure: Regenerated.
16287 * doc/install.texi2html: Replace _002d with - and _002a with * in
16288 generated html files using sed.
16290 2018-04-30 David Malcolm <dmalcolm@redhat.com>
16293 * gcc-rich-location.c (blank_line_before_p): New function.
16294 (use_new_line): New function.
16295 (gcc_rich_location::add_fixit_insert_formatted): New function.
16296 * gcc-rich-location.h
16297 (gcc_rich_location::add_fixit_insert_formatted): New function.
16299 2018-04-30 David Malcolm <dmalcolm@redhat.com>
16301 * selftest.c (assert_streq): Rename "expected" and "actual" to
16302 "val1" and "val2". Extend NULL-handling to cover both inputs
16303 symmetrically, while still requiring both to be non-NULL for a pass.
16304 * selftest.h (assert_streq): Rename "expected" and "actual" to
16306 (ASSERT_EQ): Likewise.
16307 (ASSERT_EQ_AT): Likewise.
16308 (ASSERT_KNOWN_EQ): Likewise.
16309 (ASSERT_KNOWN_EQ_AT): Likewise.
16310 (ASSERT_NE): Likewise.
16311 (ASSERT_MAYBE_NE): Likewise.
16312 (ASSERT_MAYBE_NE_AT): Likewise.
16313 (ASSERT_STREQ): Likewise. Clarify that both must be non-NULL for
16314 the assertion to pass.
16315 (ASSERT_STREQ_AT): Likewise.
16317 2018-04-30 Jonathan Wakely <jwakely@redhat.com>
16319 * doc/invoke.texi (-fpie, -fPIE): Fix grammar and clarify
16320 interaction with -pie.
16322 2018-04-30 David Malcolm <dmalcolm@redhat.com>
16324 * selftest.h: Fix alphabetization of per-source-file selftest
16327 2018-04-30 Jason Merrill <jason@redhat.com>
16329 PR c++/61982 - dead stores to destroyed objects.
16330 * gimplify.c (gimplify_modify_expr): Simplify complex lvalue on LHS
16333 2018-04-30 Jason Merrill <jason@redhat.com>
16335 * tree.c (build_clobber): New.
16336 * tree.h: Declare it.
16337 * gimplify.c (gimplify_bind_expr, gimplify_target_expr): Use it.
16339 2018-04-30 David Malcolm <dmalcolm@redhat.com>
16341 * diagnostic-show-locus.c (layout::layout): Update for
16342 location_get_source_line returning a char_span.
16343 (struct char_span): Move to input.h.
16344 (struct correction): Update for fields in char_span becoming
16346 (struct source_line): Update for location_get_source_line
16347 returning a char_span.
16348 (layout::print_line): Likewise.
16349 * edit-context.c (edited_file::print_content): Likewise.
16350 (edited_file::print_diff_hunk): Likewise.
16351 (edited_file::print_run_of_changed_lines): Likewise.
16352 (edited_file::get_num_lines): Likewise.
16353 (edited_line::edited_line): Likewise.
16354 * final.c (asm_show_source): Likewise.
16355 * input.c (location_get_source_line): Convert return type
16356 from const char * to char_span, losing the final "line_len"
16358 (dump_location_info): Update for the above.
16359 (get_substring_ranges_for_loc): Likewise. Use a char_span
16360 when handling the literal within the line.
16361 (test_reading_source_line): Update for location_get_source_line
16362 returning a char_span.
16363 * input.h (class char_span): Move here from
16364 diagnostic-show-locus.c, converting from a struct to a class.
16365 Make data members private.
16366 (char_span::operator bool): New.
16367 (char_span::length): New.
16368 (char_span::get_buffer): New.
16369 (char_span::operator[]): New.
16370 (char_span::subspan): Make const.
16371 (char_span::xstrdup): New.
16372 (location_get_source_line): Convert return type from const char *
16373 to char_span, losing the final "line_size" param.
16375 2018-04-30 Jan Hubicka <jh@suse.cz>
16377 * lto-wrapper.c (ltrans_priorities): New static var.
16378 (cmp_priority): New.
16379 (run_gcc): Read priorities and if doing parallel build order
16380 the Makefile by them.
16382 2018-04-30 David Malcolm <dmalcolm@redhat.com>
16384 * input.h (builtins_location_check): Convert to a STATIC_ASSERT.
16386 2018-04-30 Richard Biener <rguenther@suse.de>
16388 * tree-cfg.c (verify_address): Remove base argument, add
16389 flag whether to check TREE_ADDRESSABLE and do that.
16390 (verify_expr): Remove.
16391 (verify_types_in_gimple_reference): Add pieces from verify_expr.
16392 (verify_gimple_assign_single): Likewise.
16393 (verify_gimple_switch): Likewise.
16394 (verify_expr_location_1): Dereference tp once. Add (disabled)
16395 piece from verify_expr.
16396 (verify_gimple_in_cfg): Do not call verify_expr on all ops.
16398 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
16400 * config/arc/linux.h (CLEAR_INSN_CACHE): Define.
16402 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
16404 * config/arc/arc-protos.h (prepare_extend_operands): Remove.
16405 (small_data_pattern): Likewise.
16406 (arc_rewrite_small_data): Likewise.
16407 * config/arc/arc.c (LEGITIMATE_SMALL_DATA_OFFSET_P): Remove.
16408 (LEGITIMATE_SMALL_DATA_ADDRESS_P): Likewise.
16409 (get_symbol_alignment): New function.
16410 (legitimate_small_data_address_p): Likewise.
16411 (legitimate_scaled_address): Update, call
16412 legitimate_small_data_address_p.
16413 (output_sdata): New static variable.
16414 (arc_print_operand): Update how we handle small data operands.
16415 (arc_print_operand_address): Likewise.
16416 (arc_legitimate_address_p): Update, use
16417 legitimate_small_data_address_p.
16418 (arc_rewrite_small_data_p): Remove.
16419 (arc_rewrite_small_data_1): Likewise.
16420 (arc_rewrite_small_data): Likewise.
16421 (small_data_pattern): Likewise.
16422 (compact_sda_memory_operand): Update to use
16423 legitimate_small_data_address_p and get_symbol_alignment.
16424 (prepare_move_operands): Don't rewite sdata pattern.
16425 (prepare_extend_operands): Remove.
16426 * config/arc/arc.md (zero_extendqihi2): Don't rewrite sdata
16428 (zero_extendqisi2): Likewise.
16429 (zero_extendhisi2): Likewise.
16430 (extendqihi2): Likewise.
16431 (extendqisi2): Likewise.
16432 (extendhisi2): Likewise.
16433 (addsi3): Likewise.
16434 (subsi3): Likewise.
16435 (andsi3): Likewise.
16436 * config/arc/constraints.md (Usd): Change it to memory constraint.
16438 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
16440 * config/arc/arc.c (arc_split_move): Allow signed 6-bit constants
16441 as source of std instructions.
16442 * config/arc/arc.md (movsi_insn): Update pattern predicate to
16443 allow 6-bit constants as source for store instructions.
16444 (movdi_insn): Update instruction pattern to allow 6-bit constants
16445 as source for store instructions.
16447 2018-04-30 Jonathan Wakely <jwakely@redhat.com>
16449 * doc/invoke.texi (-fdebug-types-section): Fix grammar.
16451 2018-04-30 Nathan Sidwell <nathan@acm.org>
16452 Sandra Loosemore <sandra@codesourcery.com>
16454 * dumpfile.c (dump_open): Allow '-' for stdout.
16455 * doc/invoke.texi (Developer Options): Document dump filename
16456 determination early. Document stdin/stdout selection.
16458 2018-04-30 Andrew Sadek <andrew.sadek.se@gmail.com>
16460 Microblaze Target: PIC data text relative
16462 * config/microblaze/microblaze.opt: add new option -mpic-data-text-rel.
16463 * config/microblaze/microblaze-protos.h (microblaze_constant_address_p):
16465 * config/microblaze/microblaze.h (microblaze_constant_address_p):
16466 CONSTANT_ADDRESS_P definition to microblaze_constant_address_p.
16467 * config/microblaze/microblaze.c (TARGET_PIC_DATA_TEXT_REL):
16468 New addressing mode for data-text relative position indepenedent code.
16469 (microblaze_classify_unspec): add 'UNSPEC_TEXT' case ->
16470 'ADDRESS_SYMBOLIC_TXT_REL'.
16471 (microblaze_classify_address): Add handling for UNSPEC + CONST_INT.
16472 (microblaze_legitimate_pic_operand): Exclude function calls from
16473 pic operands in case of TARGET_PIC_DATA_TEXT_REL option.
16474 (microblaze_legitimize_address): Generate 'UNSPEC_TEXT' for all possible
16476 (microblaze_address_insns): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
16477 (print_operand): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
16478 (print_operand_address): Add 'ADDRESS_SYMBOLIC_TXT_REL' case + handling
16479 for 'address + offset'.
16480 (microblaze_expand_prologue): Add new function prologue call for
16482 (microblaze_asm_generate_pic_addr_dif_vec): Override new target hook
16483 'TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC' to disable address diff vector
16484 table in case of TARGET_PIC_DATA_TEXT_REL.
16485 (expand_pic_symbol_ref): Add handling for 'UNSPEC_TEXT'.
16486 * config/microblaze/microblaze.md (TARGET_PIC_DATA_TEXT_REL):
16487 Add new macros 'UNSPEC_TEXT',
16488 'UNSPEC_SET_TEXT' + add rule for setting r20 in function prologue
16489 + exclude function calls from 'UNSPEC_PLT' in case of data text
16491 * doc/tm.texi.in (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
16492 new target hook for generating address diff vector tables in case of
16494 * doc/tm.texi : Regenerate.
16495 * stmt.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Append new condition
16496 'targetm.asm_out.generate_pic_addr_diff_vec' to flag_pic in case
16497 of addr diff vector generation.
16498 * target.def (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
16499 target hook definition.
16500 * targhooks.h, targhooks.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC):
16501 Add default function for generate_pic_addr_diff_vec -> flag_pic.
16502 * doc/invoke.texi (Add new pic option): Add new microblaze pic
16503 option for data text relative.
16505 2018-04-30 Richard Biener <rguenther@suse.de>
16507 * tree-chrec.h (evolution_function_is_constant_p): Remove
16509 * tree-cfg.c (tree_node_can_be_shared): Re-order checks.
16511 2018-04-30 Richard Biener <rguenther@suse.de>
16514 * dwarf2out.c (gen_producer_string): Ignore -fchecking[=].
16516 2018-04-30 Richard Biener <rguenther@suse.de>
16518 PR tree-optimization/28364
16519 PR tree-optimization/85275
16520 * tree-ssa-loop-ch.c (ch_base::copy_headers): Stop after
16521 copying first exit test.
16523 2018-04-28 Mark Wielaard <mark@klomp.org>
16525 * dwarf2out.c (dwarf2out_finish): Add .debug_addr table header for
16526 dwarf_version >= 5.
16527 (dwarf_AT): Handle DW_AT_addr_base.
16528 (add_top_level_skeleton_die_attrs): Use dwarf_AT for DW_AT_addr_base.
16530 2018-04-28 Uros Bizjak <ubizjak@gmail.com>
16533 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask): New pattern.
16534 (*ashl<dwi>3_doubleword_mask_1): Ditto.
16535 (*<shift_insn><dwi>3_doubleword_mask): Ditto.
16536 (*<shift_insn><dwi>3_doubleword_mask_1): Ditto.
16538 2018-04-28 Richard Biener <rguenther@suse.de>
16540 * tree-cfg.c (verify_gimple_phi): Take a gphi * argument.
16541 (verify_gimple_in_cfg): Rename visited_stmts to visited_throwing_stmts
16542 to reflect use. Only add interesting stmts.
16544 2018-04-27 Martin Jambor <mjambor@suse.cz>
16547 * ipa-cp.c (find_aggregate_values_for_callers_subset): Make sure
16548 the jump function allows for passing through aggregate values.
16550 2018-04-27 David Malcolm <dmalcolm@redhat.com>
16552 * input.h (in_system_header_at): Convert from macro to inline
16554 (from_macro_expansion_at): Likewise.
16555 (from_macro_definition_at): Likewise.
16557 2018-04-27 Jeff Law <law@redhat.com>
16559 * config.gcc: Mark tile* targets as deprecated/obsolete.
16561 2018-04-27 Richard Biener <rguenther@suse.de>
16563 * config/aarch64/aarch64.c: Simplify ap.__stack advance and
16566 2018-04-27 Richard Biener <rguenther@suse.de>
16568 * tree-cfg.c (verify_expr): Make dead code hit gcc_unreachable.
16570 2018-04-27 Uros Bizjak <ubizjak@gmail.com>
16572 * config/i386/i386.md (*movti_internal): Substitute Ye constraint
16573 with Yd constraint. Set "preferred_for_speed" attribute from
16574 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for alternatives
16575 with Yd constraint.
16576 (*movdi_internal): Ditto.
16577 (movti_interunit splitters): Remove
16578 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC from insn condition.
16579 (movdi_interunit splitters): Ditto.
16580 * config/i386/constraints.md (Ye): Remove.
16581 (Yd): Do not depend on TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC.
16583 2018-04-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
16586 * config/aarch64/constraints.md (Usg): Limit to 31.
16587 (Usj): Limit to 63.
16589 2018-04-27 Jakub Jelinek <jakub@redhat.com>
16591 PR tree-optimization/85529
16592 * tree-ssa-reassoc.c (optimize_range_tests_var_bound): Add FIRST_BB
16593 argument. Don't call get_nonzero_bits if opcode is ERROR_MARK_NODE,
16594 rhs2 def stmt's bb is dominated by first_bb and it isn't an obvious
16595 zero extension or masking of the MSB bit.
16596 (optimize_range_tests): Add FIRST_BB argument, pass it through
16597 to optimize_range_tests_var_bound.
16598 (maybe_optimize_range_tests, reassociate_bb): Adjust
16599 optimize_range_tests callers.
16601 2018-04-26 Richard Biener <rguenther@suse.de>
16602 Jakub Jelinek <jakub@redhat.com>
16604 * cgraph.h (symbol_table): Just declare debug method here.
16605 * symtab.c (symbol_table::debug): Define.
16607 2018-04-26 Eric Botcazou <ebotcazou@adacore.com>
16609 * loop-invariant.c (may_assign_reg_p): Return false for frame pointer.
16611 2018-04-26 Uros Bizjak <ubizjak@gmail.com>
16613 * config/i386/i386.md ("isa" attribute): Add x64_sse2.
16614 ("enabled" attribute): Handle x64_sse2 "isa" attribute.
16615 (*movdi_internal): Substitute Yi and Yj constraint with x
16616 and Ym and Yn constraint with y constraint. Update "isa"
16617 attribute and set "preferred_for_speed" attribute from
16618 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for updated alternatives.
16619 (*movsi_internal): Ditto.
16620 (*movdf_internal): Ditto.
16621 (*movsf_internal): Ditto.
16622 (*zero_extendsidi2): Ditto.
16623 * config/i386/sse.md (vec_set<mode>_0): Ditto.
16624 (sse2_loadld): Ditto.
16625 (*vec_extract<ssevecmodelower>_0): Ditto.
16626 (*vec_extractv4si_0_zext_sse4): Ditto.
16627 (vec_concatv2di): Ditto.
16628 (*vec_dup<mode>): Ditto.
16629 * config/i386/mmx.md (*mov<mode>_internal): Ditto.
16630 * config/i386/constraints.md (Yi): Remove.
16635 2018-04-26 Nathan Sidwell <nathan@acm.org>
16637 * dumpfile.c (dump_open): New.
16638 (dump_open_alternate_stream, dump_start, dump_begin): Call it.
16639 (dump_finish): Detect stdio/stderr by value not name.
16641 2018-04-26 Jonathan Wakely <jwakely@redhat.com>
16643 * doc/invoke.texi (-Wreturn-type): Document default status for C++.
16645 2018-04-26 Tom de Vries <tom@codesourcery.com>
16648 * config/nvptx/nvptx.c (verify_neutering_jumps)
16649 (verify_neutering_labels): New function
16650 (nvptx_single): Use verify_neutering_jumps and verify_neutering_labels.
16652 2018-04-26 Tom de Vries <tom@codesourcery.com>
16655 * config/nvptx/nvptx.c (needs_neutering_p): New function.
16656 (nvptx_single): Use needs_neutering_p to skip over insns that do not
16659 2018-04-26 Richard Biener <rguenther@suse.de>
16660 Tom de Vries <tom@codesourcery.com>
16663 * lto-streamer-out.c (output_function): Fixup loops if required to match
16664 discovery done in the reader.
16666 2018-04-26 Richard Biener <rguenther@suse.de>
16668 PR tree-optimization/85116
16669 * tree-ssa-loop-ch.c (do_while_loop_p): A do-while loop should
16670 have a loop exit from the single latch predecessor. Remove
16671 case of header with just condition.
16672 (ch_base::copy_headers): Exclude infinite loops from any
16674 (pass_ch::execute): Record exits.
16676 2018-04-26 Richard Biener <rguenther@suse.de>
16678 * tree-vect-data-refs.c (vect_get_data_access_cost): Get
16679 prologue cost vector and pass it to vect_get_load_cost.
16680 (vect_get_peeling_costs_all_drs): Likewise.
16681 (vect_peeling_hash_get_lowest_cost): Likewise.
16682 (vect_enhance_data_refs_alignment): Likewise.
16684 2018-04-26 Richard Biener <rguenther@suse.de>
16686 PR middle-end/85450
16687 * tree-cfg.c (verify_gimple_assign_unary): Restore proper
16688 checking of integer<->pointer conversions.
16689 * omp-expand.c (expand_omp_for_static_nochunk): Avoid
16690 sign-/zero-extending pointer types.
16691 (expand_omp_for_static_chunk): Likewise.
16693 2018-03-22 Hans-Peter Nilsson <hp@axis.com>
16694 Jean Lee <xiaoyur347@gmail.com>
16696 * config/mips/mips.c (mips_asan_shadow_offset): New function.
16697 (TARGET_ASAN_SHADOW_OFFSET): Define.
16698 * config/mips/mips.h (FRAME_GROWS_DOWNWARD): Augment to also be
16699 true for -fsanitize=address.
16701 2018-04-25 Mark Wielaard <mark@klomp.org>
16703 * dwarf2out.c (file_info_cmp): Sort longer dir prefixes before
16706 2018-04-25 Jakub Jelinek <jakub@redhat.com>
16708 * config/i386/i386.md (*x86_mov<mode>cc_0_m1): Use type "alu1" rather
16709 than "alu", remove explicit "memory" and "imm_disp" attributes.
16710 (*x86_mov<mode>cc_0_m1_se, *x86_mov<mode>cc_0_m1_neg): Likewise.
16712 PR middle-end/85414
16713 * simplify-rtx.c (simplify_unary_operation_1) <case SIGN_EXTEND,
16714 case ZERO_EXTEND>: Pass SUBREG_REG (op) rather than op to
16715 gen_lowpart_no_emit.
16717 2018-04-25 Sebastian Peryt <sebastian.peryt@intel.com>
16720 * config/i386/i386.c (ix86_expand_builtin): Change memory
16721 operand to XI, extend p0 to Pmode.
16722 * config/i386/i386.md: Change unspec volatile and operand
16723 1 mode to XI, change operand 0 mode to P.
16725 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
16727 * config/nds32/nds32-predicates.c (nds32_can_use_bclr_p): Mask with
16728 GET_MODE_MASK before any checking.
16729 (nds32_can_use_bset_p): Likewise.
16730 (nds32_can_use_btgl_p): Likewise.
16732 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
16734 * config/nds32/nds32-doubleword.md: New define_split pattern for
16735 illegal register number.
16737 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
16739 * config/nds32/nds32.c (nds32_print_operand): Set op_value ealier.
16741 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
16743 * config/nds32/nds32.h (ASM_APP_ON): Add missing newline character.
16745 2018-04-25 Richard Biener <rguenther@suse.de>
16747 * lto-streamer.h (LTO_major_version): Bump to 8.
16749 2018-04-25 Jakub Jelinek <jakub@redhat.com>
16751 * BASE-VER: Set to 9.0.0.
16753 2018-04-24 Segher Boessenkool <segher@kernel.crashing.org>
16755 * config/rs6000/rs6000.c (init_float128_ieee): Fix spelling mistakes
16756 in __abskf2 and __powikf2.
16758 2018-04-24 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
16761 * config/aarch64/constraints.md (Usg, Usj): New constraints.
16762 * config/aarch64/iterators.md (cmode_simd): New mode attribute.
16763 * config/aarch64/aarch64.md (*aarch64_ashr_sisd_or_int_<mode>3):
16764 Use the above on operand 2. Reindent.
16765 (*aarch64_lshr_sisd_or_int_<mode>3): Likewise.
16767 2018-04-24 H.J. Lu <hongjiu.lu@intel.com>
16770 * common/config/i386/i386-common.c (ix86_handle_option): Don't
16772 * config/i386/i386.opt (mcet): Removed.
16773 * doc/install.texi: Remove -mcet documentation.
16774 * doc/invoke.texi: Likewise.
16776 2018-04-24 H.J. Lu <hongjiu.lu@intel.com>
16779 * doc/install.texi: Remove -mcet from bootstrap-cet.
16781 2018-04-24 Jakub Jelinek <jakub@redhat.com>
16784 * config/i386/i386.c (ix86_init_mmx_sse_builtins): Don't define
16785 __builtin_ia32_readeflags_u32 and __builtin_ia32_writeeflags_u32
16789 * config/rs6000/rs6000-p8swap.c (const_load_sequence_p): Punt if
16790 const_vector is not CONST_VECTOR or SYMBOL_REF for a constant pool
16791 containing a CONST_VECTOR.
16793 2018-04-24 Cesar Philippidis <cesar@codesourcery.com>
16795 * doc/install.texi: Update newlib dependency for nvptx.
16797 2018-04-24 Jakub Jelinek <jakub@redhat.com>
16800 * config/i386/i386.c (ix86_expand_vector_init_one_var): Use UINTVAL
16801 instead of INTVAL when shifting x left.
16803 2018-04-24 Andreas Krebbel <krebbel@linux.ibm.com>
16805 PR tree-optimization/85478
16806 * tree-vect-loop.c (vect_analyze_loop_2): Do not call
16807 vect_grouped_store_supported for single element vectors.
16809 2018-04-24 Richard Biener <rguenther@suse.de>
16812 * config/i386/i386.c (ix86_add_stmt_cost): Restrict strided
16813 load cost increase to the case of non-constant step.
16815 2018-04-24 Jakub Jelinek <jakub@redhat.com>
16818 * reg-stack.c (move_for_stack_reg): Don't fail assertion about dead
16819 destination if any_malformed_asm.
16821 2018-04-23 Eric Botcazou <ebotcazou@adacore.com>
16823 PR middle-end/85496
16824 * expr.c (store_field): In the bitfield case, if the value comes from
16825 a function call and is returned in registers by means of a PARALLEL,
16826 do not change the mode of the temporary unless BLKmode and VOIDmode.
16828 2018-04-23 Andrey Belevantsev <abel@ispras.ru>
16830 PR rtl-optimization/85423
16831 * sel-sched-ir.c (has_dependence_note_mem_dep): Only discard
16832 dependencies to debug insns when the previous insn is non-debug.
16834 2018-04-23 Claudiu Zissulescu <claziss@synopsys.com>
16836 * config/arc/arc.md ("vunspec"): Delete it, unify all the unspec
16837 enums into a single definition.
16838 (fls): Fix predicates and printing.
16841 2018-04-23 Claudiu Zissulescu <claziss@synopsys.com>
16843 * config/arc/arc-protos.h (check_if_valid_sleep_operand): Remove.
16844 * config/arc/arc.c (arc_expand_builtin): Sleep accepts registers
16845 and short u6 immediate.
16846 (check_if_valid_sleep_operand): Remove.
16847 * config/arc/arc.md (Sleep): Accepts registers and u6 immediates.
16849 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
16851 * config/nds32/nds32.c (nds32_compute_stack_frame): Consider
16852 flag_always_save_lp condition.
16853 * config/nds32/nds32.opt (malways-save-lp): New option.
16855 2018-04-22 Shiva Chen <shiva0217@gmail.com>
16857 * config/nds32/nds32-protos.h (nds32_use_load_post_increment): Declare.
16858 * config/nds32/nds32.c (nds32_use_load_post_increment): New.
16859 * config/nds32/nds32.h
16860 (USE_LOAD_POST_INCREMENT, USE_LOAD_POST_DECREMENT): Define.
16861 (USE_STORE_POST_INCREMENT, USE_STORE_POST_DECREMENT): Define.
16863 2018-04-22 Shiva Chen <shiva0217@gmail.com>
16865 * config/nds32/nds32-protos.h (nds32_ls_333_p): Remove.
16866 * config/nds32/nds32.c (nds32_ls_333_p): Remove.
16868 2018-04-22 Shiva Chen <shiva0217@gmail.com>
16869 Chung-Ju Wu <jasonwucj@gmail.com>
16871 * config/nds32/nds32-protos.h (nds32_case_vector_shorten_mode):
16873 * config/nds32/nds32.c (nds32_case_vector_shorten_mode): New function.
16874 * config/nds32/nds32.h (CASE_VECTOR_SHORTEN_MODE): Modify.
16876 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
16878 * config/nds32/nds32.c (nds32_compute_stack_frame): Fix wrong value.
16880 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
16882 * config/nds32/nds32-protos.h (nds32_data_alignment,
16883 nds32_local_alignment): Declare.
16884 * config/nds32/nds32.c (nds32_data_alignment, nds32_constant_alignment,
16885 nds32_local_alignment): New functions.
16886 (TARGET_CONSTANT_ALIGNMENT): Define.
16887 * config/nds32/nds32.h (DATA_ALIGNMENT, LOCAL_ALIGNMENT): Define.
16889 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
16891 * config/nds32/nds32.c
16892 (TARGET_HARD_REGNO_MODE_OK): Move to the bottom of file.
16893 (TARGET_MODES_TIEABLE_P): Likewise.
16895 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
16897 * config/nds32/nds32.c (nds32_asm_file_start): Display optimization
16898 level Ofast and Og.
16900 2018-04-22 Monk Chiang <sh.chiang04@gmail.com>
16901 Chung-Ju Wu <jasonwucj@gmail.com>
16903 * config/nds32/constants.md (unspec_volatile_element): Add enum values
16904 for unaligned access.
16905 * config/nds32/nds32-intrinsic.c: Implementation of expanding
16907 * config/nds32/nds32-intrinsic.md: Likewise.
16908 * config/nds32/nds32_intrinsic.h: Likewise.
16909 * config/nds32/nds32.h (nds32_builtins): Likewise.
16910 * config/nds32/nds32.opt (munaligned-access): New option.
16911 * config/nds32/nds32.c (nds32_asm_file_start): Display
16912 flag_unaligned_access status.
16914 2018-04-20 Kito Cheng <kito.cheng@gmail.com>
16916 * config/riscv/elf.h (LINK_SPEC): Pass --no-relax if
16917 -mno-relax is present.
16918 * config/riscv/linux.h (LINK_SPEC): Ditto.
16920 2018-04-20 Martin Sebor <msebor@redhat.com>
16923 * gimple-fold.c (gimple_fold_builtin_strcpy): Suppress -Wrestrict
16925 (gimple_fold_builtin_stxcpy_chk): Same.
16926 * gimple-ssa-warn-restrict.c (check_bounds_or_overlap): Same.
16928 2018-04-20 Michael Meissner <meissner@linux.ibm.com>
16931 * config/rs6000/rs6000.c (init_float128_ieee): Add support to call
16932 __powikf2 when long double is IEEE 128-bit.
16934 2018-04-20 Kito Cheng <kito.cheng@gmail.com>
16936 * config/riscv/riscv.c (riscv_first_stack_step): Round up min
16937 step to make sure stack always aligned.
16939 2018-04-20 Carl Love <cel@us.ibm.com>
16942 * config/rs6000/rs6000-c.c (rs6000_gimple_fold_builtin): Add
16943 size check for arg0.
16945 2018-04-20 Nathan Sidwell <nathan@codesourcery.com>
16946 Tom de Vries <tom@codesourcery.com>
16949 * config/nvptx/nvptx.c (nvptx_emit_forking, nvptx_emit_joining):
16950 Emit insns for calls too.
16951 (nvptx_find_par): Always look for worker-level predecessor insn.
16952 (nvptx_propagate): Add is_call parm, return bool. Copy frame for
16954 (nvptx_vpropagate, nvptx_wpropagate): Adjust.
16955 (nvptx_process_pars): Propagate frames for calls.
16957 2018-04-20 H.J. Lu <hongjiu.lu@intel.com>
16960 * common/config/i386/i386-common.c (OPTION_MASK_ISA_IBT_SET):
16962 (OPTION_MASK_ISA_IBT_UNSET): Likewise.
16963 (ix86_handle_option): Don't handle OPT_mibt.
16964 * config/i386/cet.h: Check __CET__ instead of __IBT__ and
16966 * config/i386/driver-i386.c (host_detect_local_cpu): Remove
16968 * config/i386/i386-c.c (ix86_target_macros_internal): Don't
16969 check OPTION_MASK_ISA_IBT nor flag_cf_protection.
16970 (ix86_target_macros): Define __CET__ with flag_cf_protection
16971 for -fcf-protection.
16972 * config/i386/i386.c (isa2_opts): Remove -mibt.
16973 * config/i386/i386.h (TARGET_IBT): Removed.
16974 (TARGET_IBT_P): Likewise.
16975 (ix86_valid_target_attribute_inner_p): Don't check OPT_mibt.
16976 * config/i386/i386.md (nop_endbr): Don't check TARGET_IBT.
16977 * config/i386/i386.opt (mcet): Update help message.
16978 (mshstk): Likewise.
16980 * doc/invoke.texi: Remove -mibt. Document __CET__. Document
16981 -mcet as an alias for -mshstk.
16983 2018-04-20 Richard Biener <rguenther@suse.de>
16985 PR middle-end/85475
16986 * match.pd ((X * CST) * Y -> (X * Y) * CST): Avoid exponential
16987 complexity by forcing a single use of the multiply operand.
16989 2018-04-20 Martin Jambor <mjambor@suse.cz>
16992 * ipa-cp.c (cgraph_edge_brings_value_p): Move check for self-feeding
16993 recursion dependency to only apply to non-clones.
16995 2018-04-20 Martin Jambor <mjambor@suse.cz>
16998 * ipa-cp.c (create_specialized_node): Check that clones of
16999 self-recursive edges exist during IPA-CP.
17001 2018-04-19 Toon Moene <toon@moene.org>
17003 * doc/invoke.texi: Add -floop-unroll-and-jam to options enabled
17006 2018-04-19 Jakub Jelinek <jakub@redhat.com>
17008 PR tree-optimization/85467
17009 * fold-const.c (fold_ternary_loc) <case BIT_FIELD_REF>: Use
17010 VECTOR_TYPE_P macro. If type is vector type, VIEW_CONVERT_EXPR the
17011 VECTOR_CST element to type.
17013 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
17016 * config/i386/i386.h (STACK_SAVEAREA_MODE): New.
17017 * config/i386/i386.md (builtin_setjmp_setup): Removed.
17018 (builtin_longjmp): Likewise.
17019 (save_stack_nonlocal): New pattern.
17020 (restore_stack_nonlocal): Likewise.
17022 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
17025 * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
17026 Replace ASM_OUTPUT_LABEL with fprintf.
17028 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
17031 * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
17032 Check flag_cf_protection instead of TARGET_IBT and TARGET_SHSTK.
17033 * config/i386/i386-c.c (ix86_target_macros_internal): Also
17034 define __IBT__ and __SHSTK__ for -fcf-protection.
17035 * config/i386/i386.c (pass_insert_endbranch::gate): Don't check
17037 (ix86_trampoline_init): Likewise.
17038 (x86_output_mi_thunk): Likewise.
17039 (ix86_notrack_prefixed_insn_p): Likewise.
17040 (ix86_option_override_internal): Don't disallow -fcf-protection.
17041 * config/i386/i386.md (rdssp<mode>): Also enable for
17043 (incssp<mode>): Likewise.
17044 (nop_endbr): Likewise.
17045 * config/i386/i386.opt (mcet): Change help message to built-in
17048 (mshstk): Likewise.
17049 * doc/invoke.texi: Remove -mcet, -mibt and -mshstk condition
17050 on -fcf-protection. Change -mcet, -mibt and -mshstk to only
17051 enable CET built-in functions.
17053 2018-04-19 Sebastian Peryt <sebastian.peryt@intel.com>
17055 * common/config/i386/i386-common.c
17056 (OPTION_MASK_ISA_MOVDIRI_SET, OPTION_MASK_ISA_MOVDIR64B_SET,
17057 OPTION_MASK_ISA_MOVDIRI_UNSET,
17058 OPTION_MASK_ISA_MOVDIR64B_UNSET): New defines.
17059 (ix86_handle_option): Handle -mmovdiri and -mmovdir64b.
17060 * config.gcc (movdirintrin.h): New header.
17061 * config/i386/cpuid.h (bit_MOVDIRI,
17062 bit_MOVDIR64B): New bits.
17063 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mmovdiri
17065 * config/i386/i386-builtin-types.def ((VOID, PUNSIGNED, UNSIGNED),
17066 (VOID, PVOID, PCVOID)): New function types.
17067 * config/i386/i386-builtin.def (__builtin_ia32_directstoreu_u32,
17068 __builtin_ia32_directstoreu_u64,
17069 __builtin_ia32_movdir64b): New builtins.
17070 * config/i386/i386-c.c (__MOVDIRI__, __MOVDIR64B__): New.
17071 * config/i386/i386.c (ix86_target_string): Added -mmovdir64b
17073 (ix86_valid_target_attribute_inner_p): Ditto.
17074 (ix86_expand_special_args_builtin): Added VOID_FTYPE_PUNSIGNED_UNSIGNED
17075 and VOID_FTYPE_PUNSIGNED_UNSIGNED.
17076 (ix86_expand_builtin): Expand IX86_BUILTIN_MOVDIR64B.
17077 * config/i386/i386.h (TARGET_MOVDIRI, TARGET_MOVDIRI_P,
17078 TARGET_MOVDIR64B, TARGET_MOVDIR64B_P): New.
17079 * config/i386/i386.md (UNSPECV_MOVDIRI, UNSPECV_MOVDIR64B): New.
17080 (movdiri<mode>, movdir64b_<mode>): New.
17081 * config/i386/i386.opt: Add -mmovdiri and -mmovdir64b.
17082 * config/i386/immintrin.h: Include movdirintrin.h.
17083 * config/i386/movdirintrin.h: New file.
17084 * doc/invoke.texi: Added -mmovdiri and -mmovdir64b.
17086 2018-04-19 Richard Biener <rguenther@suse.de>
17088 PR middle-end/85455
17089 * cfg.c (clear_bb_flags): When loop state says we have
17090 marked irreducible regions also preserve BB_IRREDUCIBLE_LOOP.
17092 2018-04-19 Richard Biener <rguenther@suse.de>
17094 PR tree-optimization/84737
17095 * tree-vect-data-refs.c (vect_copy_ref_info): New function
17096 copying restrict info.
17097 (vect_setup_realignment): Use it.
17098 * tree-vectorizer.h (vect_copy_ref_info): Declare.
17099 * tree-vect-stmts.c (vectorizable_store): Copy ref info from
17100 the first DR to all generated stores.
17101 (vectorizable_load): Likewise for loads.
17103 2018-04-19 Jakub Jelinek <jakub@redhat.com>
17105 PR tree-optimization/85446
17106 * match.pd ((intptr_t) x eq/ne CST to x eq/ne (typeof x) cst): Require
17107 the integral and pointer types to have the same precision.
17109 * doc/install.texi: Document --disable-cet being the default and
17112 2018-04-18 Martin Liska <mliska@suse.cz>
17114 * ipa-devirt.c (odr_subtypes_equivalent_p): Fix GNU coding
17117 2018-04-18 Martin Liska <mliska@suse.cz>
17120 2018-03-02 Eric Botcazou <ebotcazou@adacore.com>
17123 * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
17124 arguments if they are comparable.
17126 2018-04-18 Martin Liska <mliska@suse.cz>
17129 2018-03-13 Eric Botcazou <ebotcazou@adacore.com>
17132 * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
17135 2018-04-18 H.J. Lu <hongjiu.lu@intel.com>
17138 * config/i386/i386.c (ix86_expand_split_stack_prologue): Insert
17139 ENDBR after calling __morestack.
17141 2018-04-18 David Malcolm <dmalcolm@redhat.com>
17144 * configure.ac (gcc-driver-name.h): Honor --with-gcc-major-version
17145 by using gcc_base_ver to generate a gcc_driver_version, and use
17146 it when generating GCC_DRIVER_NAME.
17147 * configure: Regenerate.
17149 2018-04-18 Jakub Jelinek <jakub@redhat.com>
17152 * config.gcc: Obsolete powerpc*-*-*spe*.
17154 2018-04-17 Jakub Jelinek <jakub@redhat.com>
17157 * dbxout.c (dbxout_int): Perform negation in unsigned int type.
17158 (stabstr_D): Change type of unum from unsigned int to
17159 unsigned HOST_WIDE_INT. Perform negation in unsigned HOST_WIDE_INT
17162 2018-04-17 Jim Wilson <jimw@sifive.com>
17165 * config/riscv/riscv.c (riscv_compute_frame_info): Add calls to
17166 RISCV_STACK_ALIGN when using outgoing_args_size and pretend_args_size.
17167 Set arg_pointer_offset after using pretend_args_size.
17169 2018-04-17 Jakub Jelinek <jakub@redhat.com>
17171 PR rtl-optimization/85431
17172 * dse.c (record_store): Ignore zero width stores.
17175 * asan.c (handle_builtin_stack_restore): Adjust comment. Emit
17176 __asan_allocas_unpoison call and last_alloca_addr = new_sp before
17177 __builtin_stack_restore rather than after it.
17178 * builtins.c (expand_asan_emit_allocas_unpoison): Pass
17179 arg1 + (virtual_dynamic_stack_rtx - stack_pointer_rtx) as second
17180 argument instead of virtual_dynamic_stack_rtx.
17182 2018-04-17 Kelvin Nilsen <kelvin@gcc.gnu.org>
17184 * config/rs6000/rs6000-protos.h (rs6000_builtin_is_supported_p):
17186 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
17187 Add note to error message to explain internal mapping of overloaded
17188 built-in function name to non-overloaded built-in function name.
17189 * config/rs6000/rs6000.c (rs6000_builtin_is_supported_p): New
17192 2018-04-17 Michael Meissner <meissner@linux.vnet.ibm.com>
17195 * config/rs6000/rs6000.md (pack<mode>): Do not try handle a pack
17196 where the inputs overlap with the output.
17198 2018-04-17 Jakub Jelinek <jakub@redhat.com>
17200 * config/i386/sse.md (vec_extract_lo_<mode><mask_name>): Add
17201 (=v, v) alternative and explicit "memory" attribute.
17202 (vec_extract_lo_<mode><mask_name>): Likewise. Also add
17203 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
17205 (vec_extract_lo_<mode><mask_name>): Add (=v, v) alternative and use
17206 "sselog1" type instead of "sselog".
17207 (vec_extract_hi_<mode><mask_name>): Use "sselog1" type instead of
17208 "sselog". Remove explicit "memory" attribute.
17209 (vec_extract_lo_v32hi): Add (=v, v) alternative and explicit "memory",
17210 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
17212 (vec_extract_hi_v32hi): Merge all alternatives into one, use
17213 "sselog1" type instead of "sselog". Remove explicit "memory"
17215 (vec_extract_hi_v16hi): Merge each pair of alternatives into one,
17216 use "sselog1" type instead of "sselog". Remove explicit "memory"
17218 (vec_extract_lo_v64qi): Add (=v, v) alternative and explicit "memory",
17219 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
17221 (vec_extract_hi_v64qi): Merge all alternatives into one, use
17222 "sselog1" type instead of "sselog". Remove explicit "memory"
17224 (vec_extract_hi_v32qi): Merge each pair of alternatives into one,
17225 use "sselog1" type instead of "sselog". Remove explicit "memory"
17229 * config/i386/i386.md (*ashlqi3_1_slp): Use alu1 type instead of alu.
17231 PR middle-end/85414
17232 * rtlhooks.c (gen_lowpart_if_possible): Don't call gen_lowpart_SUBREG
17235 2018-04-17 Martin Jambor <mjambor@suse.cz>
17238 * ipa-cp.c (create_specialized_node): Call
17239 expand_all_artificial_thunks if necessary.
17241 2018-04-17 Martin Liska <mliska@suse.cz>
17244 * ipa-devirt.c (odr_types_equivalent_p): Remove trailing
17245 in message, remote space in between '_G' and '('.
17247 2018-04-17 Jakub Jelinek <jakub@redhat.com>
17250 * config/i386/sse.md (reduces<mode><mask_scalar_name>,
17251 avx512f_vmcmp<mode>3<round_saeonly_name>,
17252 avx512f_vmcmp<mode>3_mask<round_saeonly_name>,
17253 avx512f_sgetexp<mode><mask_scalar_name><round_saeonly_scalar_name>,
17254 avx512f_rndscale<mode><round_saeonly_name>,
17255 avx512dq_ranges<mode><mask_scalar_name><round_saeonly_scalar_name>,
17256 avx512f_vgetmant<mode><mask_scalar_name><round_saeonly_scalar_name>):
17257 Use %<iptr>2 instead of %2 for -masm=intel.
17258 (avx512f_vcvtss2usi<round_name>, avx512f_vcvtss2usiq<round_name>,
17259 avx512f_vcvttss2usi<round_saeonly_name>,
17260 avx512f_vcvttss2usiq<round_saeonly_name>): Use %k1 instead of %1 for
17262 (avx512f_vcvtsd2usi<round_name>, avx512f_vcvtsd2usiq<round_name>,
17263 avx512f_vcvttsd2usi<round_saeonly_name>,
17264 avx512f_vcvttsd2usiq<round_saeonly_name>, ufloatv2siv2df2<mask_name>):
17265 Use %q1 instead of %1 for -masm=intel.
17266 (avx512f_sfixupimm<mode><sd_maskz_name><round_saeonly_name>,
17267 avx512f_sfixupimm<mode>_mask<round_saeonly_name>): Use %<iptr>3 instead
17268 of %3 for -masm=intel.
17269 (sse2_shufpd_v2df_mask): Fix a typo, change %{6%} to %{%6%} for
17271 (*avx512vl_<code>v2div2qi2_store): Use %w0 instead of %0 for
17273 (*avx512vl_<code><mode>v4qi2_store): Use %k0 instead of %0 for
17275 (avx512vl_<code><mode>v4qi2_mask_store): Use a single pattern with
17276 %k0 and %1 for -masm=intel rather than two patterns, one with %0 and
17278 (*avx512vl_<code><mode>v8qi2_store): Use %q0 instead of %0 for
17280 (avx512vl_<code><mode>v8qi2_mask_store): Use a single pattern with
17281 %q0 and %1 for -masm=intel rather than two patterns, one with %0 and
17282 %g1 and one with %0 and %1.
17283 (avx512er_vmrcp28<mode><round_saeonly_name>,
17284 avx512er_vmrsqrt28<mode><round_saeonly_name>): Use %<iptr>1 instead of
17285 %1 for -masm=intel.
17286 (avx5124fmaddps_4fmaddps_mask, avx5124fmaddps_4fmaddss_mask,
17287 avx5124fmaddps_4fnmaddps_mask, avx5124fmaddps_4fnmaddss_mask,
17288 avx5124vnniw_vp4dpwssd_mask, avx5124vnniw_vp4dpwssds_mask): Swap order
17289 of %0 and %{%4%} for -masm=intel.
17290 (avx5124fmaddps_4fmaddps_maskz, avx5124fmaddps_4fmaddss_maskz,
17291 avx5124fmaddps_4fnmaddps_maskz, avx5124fmaddps_4fnmaddss_maskz,
17292 avx5124vnniw_vp4dpwssd_maskz, avx5124vnniw_vp4dpwssds_maskz): Swap
17293 order of %0 and %{%5%}%{z%} for -masm=intel.
17295 2018-04-17 Jan Hubicka <jh@suse.cz>
17298 * ipa-devirt.c (odr_types_equivalent_p): Handle bit fields.
17300 2018-04-17 Martin Liska <mliska@suse.cz>
17303 * multiple_target.c (create_dispatcher_calls): Set apostrophes
17304 for target_clone error message. Make default implementation
17305 clone to be a local declaration.
17306 (separate_attrs): Add new argument and check for an empty
17308 (expand_target_clones): Handle it.
17309 (ipa_target_clone): Make redirection just for target_clones
17312 2018-04-16 Cesar Philippidis <cesar@codesourcery.com>
17313 Tom de Vries <tom@codesourcery.com>
17315 PR middle-end/84955
17316 * omp-expand.c (expand_oacc_for): Add dummy false branch for
17317 tiled basic blocks without omp continue statements.
17319 2018-04-16 Aaron Sawdey <acsawdey@linux.ibm.com>
17322 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Mark
17323 vec_extract expression as having side effects to make sure it gets
17326 2018-04-16 H.J. Lu <hongjiu.lu@intel.com>
17329 * config/i386/i386.c (get_builtin_code_for_version): Check
17332 2018-04-16 Olga Makhotina <olga.makhotina@intel.com>
17335 * config.gcc: Support "skylake".
17336 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
17338 * config/i386/i386.c (m_SKYLAKE): Define.
17339 (processor_target_table): Add "skylake".
17340 (ix86_option_override_internal): Add "skylake".
17341 (get_builtin_code_for_version): Handle PROCESSOR_SKYLAKE,
17342 PROCESSOR_CANNONLAKE.
17343 (get_builtin_code_for_version): Fix priority for
17344 PROCESSOR_ICELAKE_CLIENT, PROCESSOR_ICELAKE_SERVER,
17345 PROCESSOR_SKYLAKE-AVX512.
17346 * config/i386/i386.h (processor_costs): Define TARGET_SKYLAKE.
17347 (processor_type): Add PROCESSOR_SKYLAKE.
17349 2018-04-16 Paolo Carlini <paolo.carlini@oracle.com>
17350 Jason Merrill <jason@redhat.com>
17353 * convert.c (convert_to_integer_1): Use direct recursion for
17354 enumeral types and types with a precision less than the number
17355 of bits in their mode.
17357 2018-04-16 Julia Koval <julia.koval@intel.com>
17360 * config/i386/x86-tune.def (X86_TUNE_SSE_UNALIGNED_LOAD_OPTIMAL,
17361 X86_TUNE_SSE_UNALIGNED_STORE_OPTIMAL): Add m_SKYLAKE_AVX512
17363 2018-04-14 Segher Boessenkool <segher@kernel.crashing.org>
17366 * config/rs6000/rs6000.opt (mdirect-move): Make deprecated.
17367 * doc/invoke.texi (RS/6000 and PowerPC Options): Remove -mdirect-move
17368 and -mno-direct-move.
17370 2018-04-13 Paul A. Clarke <pc@us.ibm.com>
17373 * config/rs6000/emmintrin.h (_mm_slli_epi{16,32,64}):
17374 Ensure that vec_splat_s32 is only called with 0 <= shift < 16.
17375 Ensure negative shifts result in {0}.
17377 2018-04-13 Vladimir Makarov <vmakarov@redhat.com>
17379 PR rtl-optimization/79916
17380 * config/rs6000/rs6000.c (rs6000_emit_move): Use assigned hard
17381 regs (if any) to define how to gnerate SD moves when LRA is in
17384 2018-04-13 Jakub Jelinek <jakub@redhat.com>
17386 PR rtl-optimization/85393
17387 * except.h (expand_dw2_landing_pad_for_region): Remove declaration.
17388 * except.c (expand_dw2_landing_pad_for_region): Make static.
17389 * bb-reorder.c (fix_up_crossing_landing_pad): In new_bb emit just
17390 a label and unconditional jump to old_bb, rather than
17391 expand_dw2_landing_pad_for_region insn(s) and jump to single_succ
17394 PR rtl-optimization/85376
17395 * simplify-rtx.c (simplify_const_unary_operation): For CLZ and CTZ and
17396 zero op0, if C?Z_DEFINED_VALUE_AT_ZERO is false, return NULL_RTX
17397 instead of a specific value.
17399 2018-04-13 Jan Hubicka <hubicka@ucw.cz>
17400 Bin Cheng <bin.cheng@arm.com>
17402 PR tree-optimization/82965
17403 PR tree-optimization/83991
17404 * cfgloopanal.c (expected_loop_iterations_unbounded): Add
17405 by_profile_only parameter.
17406 * cfgloopmanip.c (scale_loop_profile): Further scale loop's profile
17407 information if the loop was predicted to iterate too many times.
17408 * cfgloop.h (expected_loop_iterations_unbounded): Update prototype
17410 2018-04-13 Jan Hubicka <hubicka@ucw.cz>
17413 * config/i386/i386.c (ix86_can_inline_p): Allow safe transitions for
17416 2018-04-13 Martin Liska <mliska@suse.cz>
17417 Jakub Jelinek <jakub@redhat.com>
17419 PR middle-end/81657
17420 * expr.h (enum block_op_methods): Add BLOCK_OP_NO_LIBCALL_RET.
17421 * expr.c (emit_block_move_hints): Handle BLOCK_OP_NO_LIBCALL_RET.
17422 * builtins.c (expand_builtin_memory_copy_args): Use
17423 BLOCK_OP_NO_LIBCALL_RET method for mempcpy with non-ignored target,
17424 handle dest_addr == pc_rtx.
17426 2018-04-12 Segher Boessenkool <segher@kernel.crashing.org>
17429 * config/rs6000/rs6000.md (fix_trunc<mode>si2): Use legacy code if
17430 asked to not generate direct moves.
17431 (fix_trunc<mode>si2_stfiwx): Similar.
17432 (fix_trunc<mode>si2_internal): Similar.
17434 2018-04-12 Jakub Jelinek <jakub@redhat.com>
17437 * var-tracking.c (add_stores): Handle STRICT_LOW_PART SET_DEST.
17438 * cselib.c (cselib_record_sets): For STRICT_LOW_PART dest,
17439 lookup if dest in some wider mode is known to be const0_rtx and
17440 if so, record permanent equivalence for it to be ZERO_EXTEND of
17441 the narrower mode destination.
17443 2018-04-12 Cesar Philippidis <cesar@codesourcery.com>
17445 * lto-streamer-out.c (output_function): Revert 259346.
17446 * omp-expand.c (expand_oacc_for): Likewise.
17448 2018-04-12 Alexander Monakov <amonakov@ispras.ru>
17450 PR rtl-optimization/85354
17451 * sel-sched-ir.c (sel_init_pipelining): Move cfg_cleanup call...
17452 * sel-sched.c (sel_global_init): ... here.
17454 2018-04-12 Eric Botcazou <ebotcazou@adacore.com>
17457 * lto-wrapper.c (debug_objcopy): Open the files in binary mode.
17458 * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
17459 mode for PE-COFF targets.
17460 * config/i386/i386-protos.h (i386_pe_asm_lto_start): Declare.
17461 (i386_pe_asm_lto_end): Likewise.
17462 * config/i386/cygming.h (TARGET_ASM_LTO_START): Define.
17463 (TARGET_ASM_LTO_END): Likewise.
17464 * config/i386/winnt.c (saved_debug_info_level): New static variable.
17465 (i386_pe_asm_lto_start): New function.
17466 (i386_pe_asm_lto_end): Likewise.
17468 2018-04-12 Cesar Philippidis <cesar@codesourcery.com>
17469 Richard Biener <rguenther@suse.de>
17471 PR middle-end/84955
17472 * lto-streamer-out.c (output_function): Fix CFG loop state before
17474 * omp-expand.c (expand_oacc_for): Handle calls to internal
17475 functions like regular functions.
17477 2018-04-12 Richard Biener <rguenther@suse.de>
17480 * dwarf2out.c (init_sections_and_labels): Use debug_line_section[_label]
17481 for the early LTO debug to properly generate references to it
17482 during DIE emission. Do not re-use that for the skeleton for
17484 (dwarf2out_early_finish): Likewise.
17486 2018-04-12 Jakub Jelinek <jakub@redhat.com>
17489 * config/i386/sse.md
17490 (<mask_codefor>avx512dq_vextract<shuffletype>64x2_1<mask_name> split,
17491 <mask_codefor>avx512f_vextract<shuffletype>32x4_1<mask_name> split,
17492 vec_extract_lo_<mode><mask_name> split, vec_extract_lo_v32hi,
17493 vec_extract_lo_v64qi): For non-AVX512VL if input is xmm16+ reg
17494 and output is a reg, avoid creating invalid lowpart subreg, but
17495 instead split into a 512-bit move. Don't split if not AVX512VL,
17496 input is xmm16+ reg and output is a mem.
17497 (vec_extract_lo_<mode><mask_name>, vec_extract_lo_v32hi,
17498 vec_extract_lo_v64qi): Don't require split if not AVX512VL, input is
17499 xmm16+ reg and output is a mem.
17501 2018-04-12 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
17503 * config/s390/s390.c (s390_output_indirect_thunk_function): Check
17504 also for flag_dwarf2_cfi_asm.
17506 2018-04-12 Jakub Jelinek <jakub@redhat.com>
17508 PR rtl-optimization/85342
17509 * regcprop.c (copyprop_hardreg_forward_1): Remove replaced array, use
17510 a bool scalar var inside of the loop instead. Don't try to update
17511 recog_data.operand after failed apply_change_group.
17513 2018-04-12 Tom de Vries <tom@codesourcery.com>
17516 * config/nvptx/nvptx.c (flexible_array_member_type_p): New function.
17517 (nvptx_assemble_decl_begin): Add undefined param. Declare undefined
17518 array with flexible array member as array without given dimension.
17519 (nvptx_assemble_undefined_decl): Set nvptx_assemble_decl_begin call
17520 argument for undefined param to true.
17522 2018-04-11 Aaron Sawdey <acsawdey@linux.ibm.com>
17525 * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
17526 -mcall- and -mtraceback=. Remove options -mabi=spe and -mabi=no-spe
17527 from PowerPC section.
17528 * config/rs6000/sysv4.opt (mcall-): Improve help text.
17529 * config/rs6000/rs6000.opt (mblock-compare-inline-limit=): Trim
17530 help text that is too long.
17531 * config/rs6000/rs6000.opt (mblock-compare-inline-loop-limit=): Trim
17532 help text that is too long.
17533 * config/rs6000/rs6000.opt (mstring-compare-inline-limit=): Trim
17534 help text that is too long.
17536 2018-04-11 Uros Bizjak <ubizjak@gmail.com>
17538 * config/alpha/alpha.md (stack_probe_internal): Rename
17539 from "probe_stack". Update all callers.
17541 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
17543 PR rtl-optimization/84566
17544 * sched-deps.c (sched_analyze_insn): Check deps->readonly when invoking
17545 sched_macro_fuse_insns.
17547 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
17550 * sched-rgn.c (add_branch_dependences): Move sel_sched_p check here...
17551 (compute_block_dependences): ... from here.
17553 2018-04-11 Jakub Jelinek <jakub@redhat.com>
17555 PR tree-optimization/85331
17556 * vec-perm-indices.h (vec_perm_indices::clamp): Change input type
17557 from int to HOST_WIDE_INT.
17559 2018-04-11 Martin Jambor <mjambor@suse.cz>
17562 * ipa-cp.c (propagate_vals_across_pass_through): Expand comment.
17563 (cgraph_edge_brings_value_p): New parameter dest_val, check if it is
17564 not the same as the source val.
17565 (cgraph_edge_brings_value_p): New parameter.
17566 (gather_edges_for_value): Pass destination value to
17567 cgraph_edge_brings_value_p.
17568 (perhaps_add_new_callers): Likewise.
17569 (get_info_about_necessary_edges): Likewise and exclude values brought
17570 only by self-recursive edges.
17571 (create_specialized_node): Redirect only clones of self-calling edges.
17572 (+self_recursive_pass_through_p): New function.
17573 (find_more_scalar_values_for_callers_subset): Use it.
17574 (find_aggregate_values_for_callers_subset): Likewise.
17575 (known_aggs_to_agg_replacement_list): Removed.
17576 (decide_whether_version_node): Re-calculate known constants for all
17577 remaining context clones.
17579 2018-04-11 Richard Biener <rguenther@suse.de>
17582 * dwarf2out.c (dwarf2out_finish): Remove DW_AT_stmt_list attribute
17583 from early DWARF output.
17584 (dwarf2out_early_finish): Output line info unconditionally into
17585 early DWARF and add reference to it.
17587 2018-04-11 Jakub Jelinek <jakub@redhat.com>
17590 * config/i386/sse.md (iptr): Add V16SFmode and V8DFmode cases.
17591 (<avx512>_vec_dup<mode><mask_name>): Use a single pattern for modes
17592 other than V2DFmode using iptr mode attribute.
17593 (<avx512>_vec_dup<mode><mask_name>): Use iptr mode attribute.
17595 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
17597 PR rtl-optimization/84659
17598 * sel-sched-ir.c (sel_init_pipelining): Invoke cleanup_cfg.
17600 2018-04-11 Jakub Jelinek <jakub@redhat.com>
17603 * dwarf2out.c (skip_loc_list_entry): Don't call size_of_locs if
17605 (output_loc_list): Pass address of a dummy size variable even in the
17606 locview handling loop.
17607 (index_location_lists): Add comment on why skip_loc_list_entry can't
17610 2018-04-11 Thomas Preud'homme <thomas.preudhomme@arm.com>
17613 * config/arm/arm-builtins.c (arm_expand_builtin): Force input operand
17616 2018-04-10 Aaron Sawdey <acsawdey@linux.ibm.com>
17619 * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
17620 -mblock-compare-inline-limit, -mblock-compare-inline-loop-limit,
17621 and -mstring-compare-inline-limit.
17623 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
17626 * config/rs6000/rs6000.md (allocate_stack): Put the residual size
17627 for stack clash protection in a register whenever we need it to be in
17630 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
17632 * common/config/rs6000/rs6000-common.c (rs6000_option_init_struct):
17633 Enable -fasynchronous-unwind-tables by default if OBJECT_FORMAT_ELF.
17635 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
17638 * config/rs6000/rs6000.opt (mtraceback=): Show the allowed values in
17640 (mlong-double-): Ditto.
17641 * config/rs6000/sysv4.opt (msdata=): Ditto.
17642 (mtls-size=): Ditto.
17644 2018-04-10 Kelvin Nilsen <kelvin@gcc.gnu.org>
17646 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
17647 erroneous entries for
17648 "vector int vec_ldl (int, long int *)", and
17649 "vector unsigned int vec_ldl (int, unsigned long int *)".
17650 Add comments and entries for
17651 "vector bool char vec_ldl (int, bool char *)",
17652 "vector bool short vec_ldl (int, bool short *)",
17653 "vector bool int vec_ldl (int, bool int *)",
17654 "vector bool long long vec_ldl (int, bool long long *)",
17655 "vector pixel vec_ldl (int, pixel *)",
17656 "vector long long vec_ldl (int, long long *)",
17657 "vector unsigned long long vec_ldl (int, unsigned long long *)".
17658 * config/rs6000/rs6000.c (rs6000_init_builtins): Initialize new
17659 type tree bool_long_long_type_node and correct definition of
17660 bool_V2DI_type_node to make reference to this new type tree.
17661 (rs6000_mangle_type): Replace erroneous reference to
17662 bool_long_type_node with bool_long_long_type_node.
17663 * config/rs6000/rs6000.h (enum rs6000_builtin_type_index): Add
17664 comments to emphasize sign distinctions for char and int types and
17665 replace RS6000_BTI_bool_long constant with
17666 RS6000_BTI_bool_long_long constant. Also add comment to restrict
17667 use of RS6000_BTI_pixel.
17668 (bool_long_type_node): Remove this macro definition.
17669 (bool_long_long_type_node): New macro definition
17671 2018-04-10 Jakub Jelinek <jakub@redhat.com>
17673 PR rtl-optimization/85300
17674 * combine.c (subst): Handle subst of CONST_SCALAR_INT_P new_rtx also
17675 into FLOAT and UNSIGNED_FLOAT like ZERO_EXTEND, return a CLOBBER if
17676 simplify_unary_operation fails.
17678 2018-04-10 Martin Liska <mliska@suse.cz>
17680 * gdbhooks.py: Add pretty-printers for varpool_node, symtab_node,
17681 cgraph_edge and ipa_ref.
17683 2018-04-10 Jakub Jelinek <jakub@redhat.com>
17687 * config/i386/sse.md
17688 (<extract_type>_vinsert<shuffletype><extract_suf>_mask): Fix
17689 computation of the VEC_MERGE selector from mask.
17690 (<extract_type>_vinsert<shuffletype><extract_suf>_1<mask_name>):
17691 Fix decoding of the VEC_MERGE selector into mask.
17693 2018-04-10 Richard Sandiford <richard.sandiford@linaro.org>
17695 PR tree-optimization/85286
17696 * tree-vect-data-refs.c (vect_get_smallest_scalar_type):
17698 2018-04-10 Richard Sandiford <richard.sandiford@linaro.org>
17700 * final.c (final_1): Set insn_last_address as well as
17701 insn_current_address.
17703 2018-04-10 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
17706 * explow.c (emit_stack_probe): Call validize_mem on memory location
17707 before passing it to gen_probe_stack. Create address operand and
17708 legitimize it for the probe_stack_address case.
17710 2018-04-09 Jan Hubicka <jh@suse.cz>
17713 * ipa-devirt.c (rebuild_type_inheritance-hash): New.
17714 * ipa-utils.h (rebuild_type_inheritance-hash): Declare.
17715 * tree.c (free_lang_data_in_type): Fix handling of binfos;
17717 (free_lang_data): Rebuild type inheritance graph.
17719 2018-04-09 Martin Sebor <msebor@redhat.com>
17721 * invoke.texi (-finline-small-functions): Mention other optimization
17723 (-findirect-inlining, -fpartial-inlining): Same.
17724 (-finline-functions-called-once): Same.
17725 (-freorder-blocks-and-partition): Same.
17727 2018-04-09 Jan Hubicka <jh@suse.cz>
17730 * cfgcleanup.c (try_forward_edges): Do not give up on crossing
17731 jumps; choose last target that matches the criteria (i.e.
17732 no partition changes for non-crossing jumps).
17733 * cfgrtl.c (cfg_layout_redirect_edge_and_branch): Add basic
17734 support for redirecting crossing jumps to non-crossing.
17736 2018-04-09 Alexey Brodkin <abrodkin@synopsys.com>
17738 * config/arc/arc.c (arc_expand_prologue): Set stack usage info
17739 also for naked functions.
17741 2018-04-09 Claudiu Zissulescu <claziss@synopsys.com>
17743 * config/arc/arc.md (add_shift): New pattern.
17744 (add_shift2): Likewise.
17745 (sub_shift): Likewise.
17746 (sub_shift_cmp0_noout): Likewise.
17747 (compare_si_ashiftsi): Likewise.
17748 (xbfu_cmp0_noout): New combine pattern.
17749 (xbfu_cmp0"): Likewise.
17750 (movsi_set_cc_insn): Place the predicable variant first.
17751 (commutative_binary_cmp0_noout): Remove clobber.
17752 (commutative_binary_cmp0): New pattern.
17753 (noncommutative_binary_cmp0): Likewise.
17754 (noncommutative_binary_cmp0_noout): Likewise.
17755 (noncommutative_binary_comparison_result_used): Removed.
17756 (rsub_cmp0): New pattern.
17757 (rsub_cmp0_noout): Likewise.
17758 (extzvsi): Changed, keep only meaningful variants.
17759 (SQH, SEZ): New iterators.
17760 (SQH_postfix): New mode attribute.
17761 (SEZ_prefix): New code attribute.
17762 (<SEZ_prefix>xt<SQH_postfix>_cmp0_noout): New instruction pattern.
17763 (<SEZ_prefix>xt<SQH_postfix>_cmp0): Likewise.
17764 * config/arc/predicates.md (cc_set_register): Use CC_REG instead
17765 of numerical value.
17766 (noncommutative_operator): Check the availability of barrel
17769 2018-04-09 Richard Biener <rguenther@suse.de>
17771 PR tree-optimization/85284
17772 * tree-ssa-loop-niter.c (number_of_iterations_exit_assumptions):
17773 Only use the niter constraining form of simple_iv when the exit
17774 is always executed.
17776 2018-04-09 Tom de Vries <tom@codesourcery.com>
17779 * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
17780 (define_expand "*memory_barrier"): New define_expand.
17781 (define_insn "memory_barrier"): New insn.
17783 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
17785 PR rtl-optimization/80463
17786 PR rtl-optimization/83972
17787 PR rtl-optimization/83480
17789 * sel-sched-ir.c (has_dependence_note_mem_dep): Take into account the
17790 correct producer for the insn.
17791 (tidy_control_flow): Fixup seqnos in case of debug insns.
17793 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
17795 PR rtl-optimization/83913
17797 * sel-sched-ir.c (merge_expr_data): Choose the middle between two
17798 different sched-times when merging exprs.
17800 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
17802 PR rtl-optimization/83962
17804 * sel-sched-ir.c (tidy_control_flow): Correct the order in which we call
17805 tidy_fallthru_edge and tidy_control_flow.
17807 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
17809 PR rtl-optimization/83530
17811 * sel-sched.c (force_next_insn): New global variable.
17812 (remove_insn_for_debug): When force_next_insn is true, also leave only
17813 next insn in the ready list.
17814 (sel_sched_region): When the region wasn't scheduled, make another pass
17815 over it with force_next_insn set to 1.
17817 2018-04-08 Monk Chiang <sh.chiang04@gmail.com>
17819 * config.gcc (nds32le-*-*, nds32be-*-*): Add nds32/nds32_intrinsic.h
17821 * config/nds32/constants.md (unspec_volatile_element): Add enum values
17822 for interrupt control.
17823 * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
17824 functions for interrupt control.
17825 * config/nds32/nds32-intrinsic.md: Likewise.
17826 * config/nds32/nds32_intrinsic.h: Likewise.
17827 * config/nds32/nds32.h (nds32_builtins): Likewise.
17829 2018-04-08 Chung-Ju Wu <jasonwucj@gmail.com>
17831 * config/nds32/nds32.c (nds32_init_machine_status,
17832 nds32_legitimate_index_p, nds32_legitimate_address_p): Consider
17833 strict_aligned_p field.
17834 (nds32_expand_to_rtl_hook): New function.
17835 (TARGET_EXPAND_TO_RTL_HOOK): Define.
17836 * config/nds32/nds32.h (machine_function): Add strict_aligned_p field.
17838 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
17839 Chung-Ju Wu <jasonwucj@gmail.com>
17841 * config.gcc (nds32*-*-*): Check that n7 is valid to --with-cpu.
17842 * config/nds32/nds32-n7.md: New file.
17843 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N7.
17844 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n7
17846 * config/nds32/nds32-protos.h: More declarations for n7 pipeline.
17847 * config/nds32/nds32.md (pipeline_model): Add n7.
17848 * config/nds32/nds32.opt (mcpu): Support n7 pipeline cpus.
17849 * config/nds32/pipelines.md: Include n7 settings.
17851 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
17852 Chung-Ju Wu <jasonwucj@gmail.com>
17854 * config.gcc (nds32*-*-*): Check that e8 is valid to --with-cpu.
17855 * config/nds32/nds32-e8.md: New file.
17856 * config/nds32/nds32-opts.h (nds32-cpu_type): Add CPU_E8.
17857 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for e8
17859 * config/nds32/nds32-protos.h: More declarations for e8 pipeline.
17860 * config/nds32/nds32.md (pipeline_model): Add e8.
17861 * config/nds32/nds32.opt (mcpu): Support e8 pipeline cpus.
17862 * config/nds32/pipelines.md: Include e8 settings.
17864 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
17865 Chung-Ju Wu <jasonwucj@gmail.com>
17867 * config.gcc (nds32*-*-*): Check that n6/n8/s8 are valid to --with-cpu.
17868 * config/nds32/nds32-n8.md: New file.
17869 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N6 and CPU_N8.
17870 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n8
17872 * config/nds32/nds32-protos.h: More declarations for n8 pipeline.
17873 * config/nds32/nds32-utils.c: More implementations for n8 pipeline.
17874 * config/nds32/nds32.md (pipeline_model): Add n8.
17875 * config/nds32/nds32.opt (mcpu): Support n8 pipeline cpus.
17876 * config/nds32/pipelines.md: Include n8 settings.
17878 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
17879 Chung-Ju Wu <jasonwucj@gmail.com>
17881 * config.gcc (nds32*): Add nds32-utils.o into extra_objs.
17882 * config/nds32/nds32-n9-2r1w.md: New file.
17883 * config/nds32/nds32-n9-3r2w.md: New file.
17884 * config/nds32/nds32-opts.h (nds32_cpu_type, nds32_mul_type,
17885 nds32_register_ports): New or modify for cpu n9.
17886 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n9
17888 * config/nds32/nds32-protos.h: More declarations for n9 pipeline.
17889 * config/nds32/nds32-utils.c: New file.
17890 * config/nds32/nds32.h (TARGET_PIPELINE_N9, TARGET_PIPELINE_SIMPLE,
17891 TARGET_MUL_SLOW): Define.
17892 * config/nds32/nds32.md (pipeline_model): New attribute.
17893 * config/nds32/nds32.opt (mcpu, mconfig-mul, mconfig-register-ports):
17894 New options that support cpu n9.
17895 * config/nds32/pipelines.md: Include n9 settings.
17896 * config/nds32/t-nds32 (nds32-utils.o): Add dependency.
17898 2018-04-08 Chung-Ju Wu <jasonwucj@gmail.com>
17900 * config/nds32/nds32-md-auxiliary.c (output_cond_branch): Output align
17901 information if necessary.
17902 (output_cond_branch_compare_zero): Likewise.
17903 * config/nds32/nds32.c (nds32_adjust_insn_length): Consider align case.
17904 (nds32_target_alignment): Refine for alignment.
17905 * config/nds32/nds32.h (NDS32_ALIGN_P): Define.
17906 (FUNCTION_BOUNDARY): Modify.
17907 * config/nds32/nds32.md (call_internal, call_value_internal): Consider
17909 * config/nds32/nds32.opt (malways-align, malign-functions): New.
17911 2018-04-08 Monk Chiang <sh.chiang04@gmail.com>
17913 * config/nds32/constants.md (unspec_volatile_element): Add values for
17914 TLB operation and data prefetch.
17915 * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
17916 functions for TLB operation and data prefetch.
17917 * config/nds32/nds32-intrinsic.md: Likewise.
17918 * config/nds32/nds32_intrinsic.h: Likewise.
17919 * config/nds32/nds32.c (nds32_dpref_names): Likewise.
17920 (nds32_print_operand): Likewise.
17921 * config/nds32/nds32.h (nds32_builtins): Likewise.
17923 2018-04-07 Thomas Koenig <tkoenig@gcc.gnu.org>
17924 Andrew Pinski <pinsika@gcc.gnu.org>
17926 PR middle-end/82976
17927 * match.pd: Use constant_boolean_node of correct type instead of
17928 boolean_true_node or boolean_false_node for simplifying
17929 pointer comparisons to zero.
17931 2018-04-07 Jakub Jelinek <jakub@redhat.com>
17933 PR tree-optimization/80021
17934 * tree.c (verify_type_variant): Make error call in verify_variant_match
17935 translatable and remove final full stop.
17937 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
17939 * config/nds32/constants.md (unspec_volatile_element): Add
17940 UNSPEC_VOLATILE_EH_RETURN.
17941 * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push,
17942 nds32_output_stack_pop): Support dwarf exception handling process.
17943 * config/nds32/nds32-protos.h (nds32_dynamic_chain_address): Declare.
17944 * config/nds32/nds32.c (nds32_init_machine_status): Support dwarf
17945 exception handling process.
17946 (nds32_compute_stack_frame): Likewise.
17947 (nds32_return_addr_rtx): Likewise.
17948 (nds32_initial_elimination_offset): Likewise.
17949 (nds32_expand_prologue): Likewise.
17950 (nds32_expand_epilogue): Likewise.
17951 (nds32_dynamic_chain_address): New function.
17952 * config/nds32/nds32.h (machine_function): Add fields for dwarf
17953 exception handling.
17954 (DYNAMIC_CHAIN_ADDRESS): Define.
17955 (EH_RETURN_DATA_REGNO): Define.
17956 (EH_RETURN_STACKADJ_RTX): Define.
17957 * config/nds32/nds32.md (eh_return, nds32_eh_return): Implement
17958 patterns for dwarf exception handling.
17960 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
17962 * config/nds32/nds32.h: Clean up obsolete macros.
17964 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
17966 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
17967 Add enum values for particular instructions.
17968 * config/nds32/nds32-intrinsic.c: Implementation of expanding
17969 particular intrinsic functions.
17970 * config/nds32/nds32-intrinsic.md: Likewise.
17971 * config/nds32/nds32_intrinsic.h: Likewise.
17972 * config/nds32/nds32.h (nds32_builtins): Likewise.
17973 * config/nds32/nds32.md (type): Add pbsad and pbsada.
17974 (btst, ave): New patterns for particular instructions.
17976 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
17978 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
17979 Add enum values for atomic load/store and memory sync.
17980 * config/nds32/nds32-intrinsic.c: Implementation for atomic load/store
17982 * config/nds32/nds32-intrinsic.md: Likewise.
17983 * config/nds32/nds32_intrinsic.h: Likewise.
17984 * config/nds32/nds32.h (nds32_builtins): Likewise.
17986 2018-04-07 Jakub Jelinek <jakub@redhat.com>
17988 PR tree-optimization/85257
17989 * fold-const.c (native_encode_vector): If not all elts could fit
17990 and off is -1, return 0 rather than offset.
17991 * tree-ssa-sccvn.c (vn_reference_lookup_3): Pass
17992 (offseti - offset2) / BITS_PER_UNIT as 4th argument to
17993 native_encode_expr. Verify len * BITS_PER_UNIT >= maxsizei. Don't
17994 adjust buffer in native_interpret_expr call.
17996 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
17998 * config/nds32/constants.md (unspec_volatile_element): Add cache
17999 control enum values.
18000 * config/nds32/nds32-intrinsic.c: Add cache control expand functions.
18001 * config/nds32/nds32-intrinsic.md: Add cache control patterns.
18002 * config/nds32/nds32.c (nds32_cctl_names): New.
18003 (nds32_print_operand): Handle cache control register names.
18004 * config/nds32/nds32.h (nds32_builtins): New enum values.
18005 * config/nds32/nds32_intrinsic.h: Add cache control enum types and
18007 * config/nds32/nds32.md (type): Add mmu.
18008 * config/nds32/pipelines.md (simple_insn): Add mmu.
18010 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
18012 * config/nds32/nds32.md (type): Remove call.
18013 * config/nds32/pipelines.md (simple_insn): Likewise.
18015 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
18017 * config/nds32/constants.md (unspec_volatile_element): Add
18018 UNSPEC_VOLATILE_FMFCSR, UNSPEC_VOLATILE_FMTCSR and
18019 UNSPEC_VOLATILE_FMFCFG.
18020 * config/nds32/nds32-intrinsic.c (bdesc_noarg): New builtin
18021 description for fmfcfg and fmfcsr.
18022 (bdesc_1arg): Add fmtcsr.
18023 (bdesc_2arg): Add fcpynss, fcpyss, fcpynsd and fcpysd.
18024 (nds32_expand_builtin_impl): Deal with FPU intrinsic functions.
18025 * config/nds32/nds32-intrinsic.md (unspec_fcpynsd, unspec_fcpysd,
18026 unspec_fcpynss, unspec_fcpysd, unspec_fcpyss, unspec_fmfcsr,
18027 unspec_fmfcfg): New patterns.
18028 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FMFCFG,
18029 NDS32_BUILTIN_FMFCSR, NDS32_BUILTIN_FMTCSR, NDS32_BUILTIN_FCPYNSS,
18030 NDS32_BUILTIN_FCPYSS,NDS32_BUILTIN_FCPYNSD and NDS32_BUILTIN_FCPYSD.
18031 * config/nds32/nds32_intrinsic.h (__nds32__fcpynsd, __nds32__fcpynss,
18032 __nds32__fcpysd, __nds32__fcpyss, __nds32__fmfcsr, __nds32__fmtcsr,
18033 __nds32__fmfcfg): Define.
18035 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
18037 * config/nds32/nds32.c (nds32_intrinsic_register_names): Add more
18038 intrinsic register names.
18039 * config/nds32/nds32_intrinsic.h (nds32_intrinsic_registers): Add more
18040 intrinsic register enum values and macros.
18042 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
18044 * config/nds32/nds32.c (nds32_legitimate_index_p): Modify condition
18045 for load/store addressing form.
18046 (nds32_print_operand_address): Likewise.
18048 2018-04-06 Eric Botcazou <ebotcazou@adacore.com>
18051 * config/sparc/sparc.c (sparc_expand_move): Deal with symbolic operands
18052 based on LABEL_REF. Remove useless assertion.
18053 (pic_address_needs_scratch): Fix formatting.
18054 (sparc_legitimize_pic_address): Minor tweaks.
18055 (sparc_delegitimize_address): Adjust assertion accordingly.
18056 * config/sparc/sparc.md (movsi_pic_label_ref): Change label_ref_operand
18057 into symbolic_operand.
18058 (movsi_high_pic_label_ref): Likewise.
18059 (movsi_lo_sum_pic_label_ref): Likewise.
18060 (movdi_pic_label_ref): Likewise.
18061 (movdi_high_pic_label_ref): Likewise.
18062 (movdi_lo_sum_pic_label_ref): Likewise.
18064 2018-04-06 Amaan Cheval <amaan.cheval@gmail.com>
18066 * config.gcc (x86_64-*-rtems*): Add rtems.h to tm_file for
18067 custom LIB_SPEC setup.
18069 2018-04-06 Ruslan Bukin <br@bsdpad.com>
18070 Kito Cheng <kito.cheng@gmail.com>
18072 * config.gcc (riscv*-*-freebsd*): Add RISC-V FreeBSD support.
18073 * config/riscv/freebsd.h: New.
18075 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
18077 * config/nds32/nds32.c (nds32_adjust_insn_length): Refine.
18078 * config/nds32/nds32.h (ADJUST_INSN_LENGTH): Change the location in
18081 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
18082 Kito Cheng <kito.cheng@gmail.com>
18084 * config/nds32/nds32-md-auxiliary.c (nds32_output_return,
18085 nds32_output_call, nds32_symbol_binds_local_p): New functions.
18086 * config/nds32/nds32-protos.h (nds32_output_call,
18087 nds32_output_return): Declare.
18088 * config/nds32/nds32.md: Refine all the call and return patterns.
18090 2018-04-06 Jakub Jelinek <jakub@redhat.com>
18093 * dwarf2out.c (rtl_for_decl_init): For STRING_CST initializer only
18094 build CONST_STRING if TYPE_MAX_VALUE is non-NULL and is INTEGER_CST.
18096 PR rtl-optimization/84872
18097 * cfgloopmanip.c (create_preheader): Use make_forwarder_block even if
18098 nentry == 1 when CP_FALLTHRU_PREHEADERS and single_entry is
18099 EDGE_CROSSING edge.
18101 2018-04-06 Tamar Christina <tamar.christina@arm.com>
18103 * expr.c (copy_blkmode_to_reg): Revert 254862.
18104 * doc/sourcebuild.texi (word_mode_no_slow_unalign): Likewise.
18106 2018-04-06 Richard Biener <rguenther@suse.de>
18108 PR middle-end/85244
18109 * tree-dfa.c (get_ref_base_and_extent): Reset seen_variable_array_ref
18110 after seeing a component reference with an adjacent field. Treat
18111 refs to arrays at struct end of external decls similar to
18112 refs to unconstrained commons.
18114 2018-04-06 Jakub Jelinek <jakub@redhat.com>
18117 * fold-const.c (twoval_comparison_p): Remove SAVE_P argument and don't
18118 look through SAVE_EXPRs with non-side-effects argument. Adjust
18120 (fold_comparison): Adjust twoval_comparison_p caller, don't handle
18123 2018-04-06 Richard Biener <rguenther@suse.de>
18125 PR middle-end/85180
18126 * alias.c (find_base_term): New wrapper around find_base_term
18127 unwinding CSELIB_VAL_PTR changes.
18128 (find_base_term): Do not restore CSELIB_VAL_PTR during the
18131 2018-04-06 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
18133 * config/s390/s390.c (s390_z10_optimize_cmp): Expand dedicated NOP
18135 * config/s390/s390.md (UNSPECV_NOP_LR_0, UNSPECV_NOP_LR_1): New
18136 constant definitions.
18137 ("nop"): lr 0,0 -> nopr r0
18138 ("nop_lr0", "nop_lr1"): New insn definitions.
18140 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
18142 * config/nds32/nds32.md (*stack_push, *stack_pop): Use
18143 NDS32_V3PUSH_AVAILABLE_P macro.
18145 2018-04-06 Monk Chiang <sh.chiang04@gmail.com>
18146 Chung-Ju Wu <jasonwucj@gmail.com>
18148 * config.gcc (nds32*-*-*): Add v2j v3f v3s checking.
18149 (nds32*-*-*): Add float and fpu_config into supported_defaults.
18150 * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS):
18151 Include TARGET_DEFAULT_FPU_ISA and TARGET_DEFAULT_FPU_FMA.
18152 * config/nds32/constants.md (unspec_element): Add UNSPEC_COPYSIGN,
18153 UNSPEC_FCPYNSD, UNSPEC_FCPYNSS, UNSPEC_FCPYSD and UNSPEC_FCPYSS.
18154 * config/nds32/constraints.md: New constraints and checking for hard
18155 float configuration.
18156 * config/nds32/iterators.md: New mode iterator and attribute for hard
18157 float configuration.
18158 * config/nds32/nds32-doubleword.md: Use hard float alternatives and
18160 * config/nds32/nds32-fpu.md: New file.
18161 * config/nds32/nds32-md-auxiliary.c: New functions and checkings to
18162 deal with hard float code generation.
18163 * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3F and
18165 (abi_type, float_reg_number): New enum type.
18166 * config/nds32/nds32-predicates.c: New predicates for hard float.
18167 * config/nds32/nds32-protos.h: Declare functions for hard float.
18168 * config/nds32/nds32.c: Implementation for hard float configuration.
18169 * config/nds32/nds32.h: Definitions for hard float configuration.
18170 * config/nds32/nds32.md: Include hard float machine description and
18171 modify patterns for hard float configuration.
18172 * config/nds32/nds32.opt: New options for hard float configuration.
18173 * config/nds32/predicates.md: New predicates for hard float
18176 2018-04-06 Kuan-Lin Chen <kuanlinchentw@gmail.com>
18178 * common/config/nds32/nds32-common.c
18179 (nds32_option_optimization_table): Enable -mreleax-hint by default.
18181 2018-04-05 Jakub Jelinek <jakub@redhat.com>
18183 PR middle-end/85195
18184 * match.pd (BIT_FIELD_REF CONSTRUCTOR@0 @1 @2): Use view_convert around
18185 CONSTRUCTOR_ELT (ctor, ...)->value.
18187 2018-04-05 Uros Bizjak <ubizjak@gmail.com>
18190 * config/i386/i386.md (define_attr "memory"): Handle rotate1 type.
18192 2018-04-05 Tom de Vries <tom@codesourcery.com>
18195 * config/nvptx/nvptx.c (nvptx_single): Fix neutering of bb with only
18198 2018-04-05 Shiva Chen <shiva0217@gmail.com>
18199 Kito Cheng <kito.cheng@gmail.com>
18201 * config/nds32/constraints.md (U33): Fine-tune checking condition.
18202 * config/nds32/nds32-md-auxiliary.c (nds32_mem_format): Ditto.
18203 * config/nds32/nds32.h (nds32_16bit_address_type): Add
18204 ADDRESS_POST_MODIFY_LO_REG_IMM3U.
18206 2018-04-05 Shiva Chen <shiva0217@gmail.com>
18207 Kito Cheng <kito.cheng@gmail.com>
18209 * config/nds32/constraints.md (Ufe): New memory constraint.
18210 * config/nds32/nds32-md-auxiliary.c (nds32_mem_format,
18211 nds32_output_16bit_load): Consider r8 register for lwi45.fe format.
18212 * config/nds32/nds32.c (nds32_print_operand): Output lwi45.fe
18214 * config/nds32/nds32.h (nds32_16bit_address_type): Add ADDRESS_R8_IMM7U.
18215 * config/nds32/nds32.md (*mov<mode>): Adjust pattern.
18217 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
18219 * config/nds32/nds32.md: Use optimize_size in the condition for
18220 alu-shift instructions.
18222 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
18224 * config/nds32/nds32.md (divsi4, udivsi4): New patterns.
18226 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
18228 * config/nds32/nds32.md (negsi2): Refine pattern.
18230 2018-04-05 Kito Cheng <kito.cheng@gmail.com>
18231 Chung-Ju Wu <jasonwucj@gmail.com>
18233 * config/nds32/iterators.md (shift_rotate): New code iterator.
18234 (shift): New code attribute.
18235 * config/nds32/nds32-md-auxiliary.c (nds32_expand_constant): New.
18236 * config/nds32/nds32-protos.h (nds32_expand_constant): Declare.
18237 * config/nds32/nds32.c (nds32_print_operand): Deal with more cases.
18238 * config/nds32/nds32.md (addsi3, *add_srli): Refine implementation for
18239 bit-wise operations.
18240 (andsi3, *andsi3): Ditto.
18241 (iorsi3, *iorsi3, *or_slli, *or_srli): Ditto.
18242 (xorsi3, *xorsi3, *xor_slli, *xor_srli): Ditto.
18243 (<shift>si3, *ashlsi3, *ashrsi3, *lshrsi3, *rotrsi3): Ditto.
18244 * config/nds32/predicates.md (nds32_rimm5u_operand, nds32_and_operand,
18245 nds32_ior_operand, nds32_xor_operand): New predicates.
18247 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
18249 * config/nds32/nds32.md (add<mode>3, sub<mode>3): Rename to ...
18250 (addsi3, subsi3): ... this.
18252 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
18254 * config/nds32/nds32.md (*sub_srli, *and_slli): Fine-tune predicator.
18256 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
18258 * config/nds32/nds32.md: Adjust indention.
18260 2018-04-05 Kito Cheng <kito.cheng@gmail.com>
18262 * config/nds32/nds32.md (feature): New attribute.
18264 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
18266 * config/nds32/nds32.md (subtype): New attribute.
18268 2018-04-04 Thomas Preud'homme <thomas.preudhomme@arm.com>
18271 * config/arm/arm-builtins.c (arm_expand_builtin): Change
18272 expansion to perform a bitwise AND of the argument followed by a
18273 boolean negation of the result.
18275 2018-04-04 Peter Bergner <bergner@vnet.ibm.com>
18277 PR rtl-optimization/84878
18278 * ddg.c (add_cross_iteration_register_deps): Use DF_REF_BB to determine
18279 the basic block. Assert the use reference is not artificial and that
18280 it has an associated insn.
18282 2018-04-04 Michael Matz <matz@suse.de>
18284 * builtins.c (compute_objsize): Pass correct operand
18285 to array_at_struct_end_p.
18287 2018-04-04 Richard Biener <rguenther@suse.de>
18290 * dwarf2out.c (dwarf2out_register_external_die): Peel namespaces
18291 from contexts for DINFO_LEVEL_TERSE and below.
18293 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
18295 * config/nds32/nds32-doubleword.md (move_<mode>): Require
18296 resiter_operand condition.
18297 * config/nds32/nds32.md (*move<mode>): Ditto.
18299 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
18300 Monk Chiang <sh.chiang04@gmail.com>
18302 * config/nds32/nds32.md (movmisalign<mode>): New pattern.
18304 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
18306 * config/nds32/nds32.md (movqi, movhi): Merge into mov<mode>.
18308 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
18309 Kito Cheng <kito.cheng@gmail.com>
18311 * config/nds32/nds32-md-auxiliary.c (nds32_inverse_cond_code,
18312 nds32_cond_code_str, output_cond_branch,
18313 output_cond_branch_compare_zero, nds32_expand_cbranch,
18314 nds32_expand_cstore, nds32_expand_movcc,
18315 nds32_output_cbranchsi4_equality_zero,
18316 nds32_output_cbranchsi4_equality_reg,
18317 nds32_output_cbranchsi4_equality_reg_or_const_int,
18318 nds32_output_cbranchsi4_greater_less_zero: New functions.
18319 * config/nds32/nds32-protos.h (nds32_expand_cbranch,
18320 nds32_expand_cstore, nds32_expand_movcc,
18321 nds32_output_cbranchsi4_equality_zero,
18322 nds32_output_cbranchsi4_equality_reg,
18323 nds32_output_cbranchsi4_equality_reg_or_const_int,
18324 nds32_output_cbranchsi4_greater_less_zero): Declare.
18325 * config/nds32/predicates.md (nds32_movecc_comparison_operator,
18326 nds32_rimm11s_operand): New predicates.
18327 * config/nds32/nds32.h (nds32_expand_result_type): New enum type.
18328 * config/nds32/nds32.md: Rewrite all the branch and conditional move
18331 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
18333 * config/nds32/nds32-doubleword.md: Refine all the instruction type.
18334 * config/nds32/nds32.md: Ditto.
18335 * config/nds32/pipelines.md: Ditto.
18337 2018-04-04 Richard Biener <rguenther@suse.de>
18339 PR tree-optimization/85168
18340 * tree-ssa-sccvn.c (vn_reference_maybe_forwprop_address): Avoid
18341 propagating abnormals.
18343 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
18345 * config/nds32/nds32.md (enabled): Use yes/no for this attribute.
18347 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
18348 Kito Cheng <kito.cheng@gmail.com>
18350 * config/nds32/nds32-md-auxiliary.c (nds32_long_call_p): New function.
18351 * config/nds32/nds32-protos.h (nds32_long_call_p): Declare.
18352 * config/nds32/nds32.c (nds32_function_ok_for_sibcall): New function.
18353 (TARGET_FUNCTION_OK_FOR_SIBCALL): Define.
18354 * config/nds32/nds32.md (sibcall_internal): New.
18355 (sibcall_register): Remove.
18356 (sibcall_immediate): Remove.
18357 (sibcall_value_internal): New.
18358 (sibcall_value_register): Remove.
18359 (sibcall_value_immediate): Remove.
18360 * config/nds32/predicates.md (nds32_general_register_operand): New.
18361 (nds32_call_address_operand): New.
18363 2018-04-03 Jakub Jelinek <jakub@redhat.com>
18365 PR rtl-optimization/85167
18366 * shrink-wrap.c (move_insn_for_shrink_wrap): Don't set bb_uses and
18367 bb_defs if *split_p, instead preinitialize it to NULL.
18369 PR tree-optimization/85156
18370 * builtins.c (fold_builtin_expect): Use save_expr on arg1 to avoid
18371 evaluating the argument multiple times.
18373 2018-04-03 Bill Schmidt <wschmidt@linux.ibm.com>
18375 * config/rs6000/emmintrin.h (_mm_cvtpd_epi32): Use __vector rather
18377 (_mm_cvtpd_ps): Likewise.
18378 (_mm_cvttpd_epi32): Likewise.
18379 * config/rs6000/mmintrin.h (_mm_unpacklo_pi8): Likewise.
18380 * config/rs6000/xmmintrin.h: For strict-ANSI C++ or C11, undefine
18381 vector, pixel, and bool following altivec.h include.
18383 2018-04-03 Martin Sebor <msebor@redhat.com>
18385 * doc/extend.texi (Common Function Attributes): Clarify.
18386 (const attribute): Likewise.
18387 (pure attribute): Likewise.
18389 2018-04-03 Jakub Jelinek <jakub@redhat.com>
18392 * config/i386/i386.c (ix86_expand_vector_set): Use
18393 HOST_WIDE_INT_1U << elt instead of 1 << elt. Formatting fix.
18395 2018-04-03 Uros Bizjak <ubizjak@gmail.com>
18397 * config/i386/i386.c (emit_i387_cw_initialization): Always use logic
18398 instructions when changing rounding bits to preserve precision bits
18399 in the x87 control word.
18401 2018-04-03 Martin Liska <mliska@suse.cz>
18403 PR tree-optimization/82491
18404 * rtl.h (strip_offset_and_add): Replace += suboffset with
18405 poly_uint64 () + suboffset.
18407 2018-03-29 Martin Liska <mliska@suse.cz>
18408 Martin Jambor <mjambor@suse.cz>
18411 * ipa-cp.c (propagate_bits_across_jump_function): Bail out if
18412 param_type is not an integral or pointer type.
18414 2018-04-03 Richard Biener <rguenther@suse.de>
18416 * sese.h (recompute_all_dominators): Remove.
18418 2018-04-02 Martin Sebor <msebor@redhat.com>
18420 * doc/invoke.texi (-Wrestrict): Fix typos.
18422 2018-04-02 Jim Wilson <jimw@sifive.com>
18424 * config/riscv/riscv.h (SHIFT_COUNT_TRUNCATED): Set to zero.
18425 * config/riscv/riscv.md (<optab>si3): Use QImode shift count.
18426 (<optab>di3, <optab>si3_extend): Likewise.
18427 (<optab>si3_mask, <optab>si3_mask_1): New.
18428 (<optab>di3_mask, <optab>di3_mask_1): New.
18429 (<optab>si3_extend_mask, <optab>si3_extend_mask_1): New.
18430 (lshrsi3_zero_extend_1): Use VOIDmode shift count.
18431 * config/riscv/sync.md (atomic_test_and_set): Emit QImode shift count.
18433 2018-04-02 Gerald Pfeifer <gerald@pfeifer.com>
18435 * doc/cpp.texi (Variadic Macros): Fix line continuation in an
18438 2018-04-02 Chung-Ju Wu <jasonwucj@gmail.com>
18440 * config/nds32/nds32.c (TARGET_CANONICALIZE_COMPARISON): Define.
18441 (nds32_canonicalize_comparison): New function.
18443 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
18444 Kito Cheng <kito.cheng@gmail.com>
18445 Kuan-Lin Chen <kuanlinchentw@gmail.com>
18447 * config.gcc (nds32): Add nds32-relax-opt.o into extra_objs.
18448 * config/nds32/constants.md (unspec_volatile_element): Add
18449 UNSPEC_VOLATILE_RELAX_GROUP.
18450 * config/nds32/nds32-relax-opt.c: New file.
18451 * config/nds32/nds32-predicates.c
18452 (nds32_symbol_load_store_p): New function.
18453 * config/nds32/nds32-protos.h
18454 (nds32_symbol_load_store_p): Declare function.
18455 (make_pass_nds32_relax_opt): Declare new rtl pass function.
18456 * config/nds32/nds32.c
18457 (nds32_register_pass): New function to register pass.
18458 (nds32_register_passes): New function to register passes.
18459 * config/nds32/nds32.md (relax_group): New pattern.
18460 * config/nds32/nds32.opt (mrelax-hint): New option.
18461 * config/nds32/t-nds32 (nds32-relax-opt.o): New dependency.
18463 2018-04-01 Kito Cheng <kito.cheng@gmail.com>
18465 * config/nds32/t-nds32: Modify files dependency.
18467 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
18469 * config/nds32/nds32.h (FUNCTION_PROFILER): Output newline character.
18470 (PROFILE_HOOK): Define its implementation.
18472 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
18474 * config/nds32/nds32.h (WCHAR_TYPE, WCHAR_TYPE_SIZE): Use unsigned int
18475 type and 32-bit size.
18477 2018-04-01 Jakub Jelinek <jakub@redhat.com>
18479 PR middle-end/85090
18480 * config/i386/sse.md (V): Add V64QI and V32HI for TARGET_AVX512F.
18481 (V_128_256): New mode iterator.
18482 (*avx512dq_vextract<shuffletype>64x2_1 splitter): New define_split.
18483 (*avx512f_vextract<shuffletype>32x4_1 splitter): Likewise.
18484 (xop_pcmov_<mode><avxsizesuffix>): Use V_128_256 mode iterator instead
18486 * config/i386/i386.c (ix86_expand_vector_set): Improve V32HImode and
18487 V64QImode expansion for !TARGET_AVX512BW && TARGET_AVX512F.
18489 2018-03-31 Segher Boessenkool <segher@kernel.crashing.org>
18492 * config/rs6000/xmmintrin.h (_mm_set_ps, _mm_max_ps): Handle (quiet)
18493 NaN inputs correctly.
18495 2018-03-30 Peter Bergner <bergner@vnet.ibm.com>
18498 * config/rs6000/vsx.md (??r): New mode attribute.
18499 (*vsx_mov<mode>_64bit): Use it.
18500 (*vsx_mov<mode>_32bit): Likewise.
18502 2018-03-30 Martin Sebor <msebor@redhat.com>
18504 PR tree-optimization/84818
18505 * builtins.c (check_access): Use warning_n.
18507 2018-03-30 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
18510 * config/rs6000/rs6000-string.c (expand_compare_loop): Fix redundant
18512 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Fix redundant
18515 2018-03-30 Julia Koval <julia.koval@intel.com>
18518 * x86-tune.def (movx, partial_reg_dependency): Enable for
18521 2018-03-29 Vladimir Makarov <vmakarov@redhat.com>
18523 PR inline-asm/84985
18524 * lra-constraints.c (process_alt_operands): Move setting
18525 this_alternative_matches below.
18527 2018-03-29 Martin Liska <mliska@suse.cz>
18530 * doc/invoke.texi: Document how LTO works with debug info.
18531 Describe auto-load support of binutils. Mention 'x86-64'
18532 as valid option value of -march option.
18534 2018-03-29 Jakub Jelinek <jakub@redhat.com>
18536 * config/i386/sse.md (<avx512>_blendm<mode>): Use <sseintprefix>.
18539 * fold-const.c (operand_equal_p): Handle DEBUG_BEGIN_STMT.
18540 For STATEMENT_LIST, pass down OEP_LEXICOGRAPHIC and maybe
18541 OEP_NO_HASH_CHECK for recursive call, to avoid exponential
18544 2018-03-28 Peter Bergner <bergner@vnet.ibm.com>
18547 * config/rs6000/rs6000.h (RS6000_BTM_POWERPC64): New define.
18548 (RS6000_BTM_COMMON): Add RS6000_BTM_POWERPC64.
18549 * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Add support
18550 for RS6000_BTM_POWERPC64.
18551 (rs6000_invalid_builtin): Add handling for RS6000_BTM_POWERPC64
18552 (rs6000_builtin_mask_names): Add RS6000_BTM_POWERPC64.
18553 * config/rs6000/rs6000-builtin.def (BU_P7_POWERPC64_MISC_2): New macro
18556 (DIVDEU): Likewise.
18558 2018-03-28 Carl Love <cel@us.ibm.com>
18561 2017-09-27 Carl Love <cel@us.ibm.com>
18563 * config/rs6000/rs6000-builtin.def (BU_FP_1MISC_1): Add define macro.
18564 (FCTID, FCTIW): Add BU_FP_MISC_1 macro expansion for builtins.
18565 * config/rs6000/rs6000.md (lrintsfsi2): Add define_insn for the
18568 2018-03-28 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
18570 * config/rs6000/xmmintrin.h (_mm_max_pi16): Use __vector __bool
18571 instead of __vector bool.
18572 (_mm_max_pu8): Likewise.
18573 (_mm_min_pi16): Likewise.
18575 2018-03-28 Peter Bergner <bergner@vnet.ibm.com>
18578 * config/rs6000/rs6000-builtin.def (DIVWEO): Delete macro expansion.
18579 (DIVWEUO): Likewise.
18580 (DIVDEO): Likewise.
18581 (DIVDEUO): Likewise.
18582 * config/rs6000/rs6000.c (builtin_function_type): Remove support for
18583 DIVWEUO and DIVDEUO.
18584 * config/rs6000/rs6000.md (UNSPEC_DIVEO, UNSPEC_DIVEUO): Delete unspecs.
18585 (UNSPEC_DIV_EXTEND): Remove deleted unspecs.
18586 (div_extend): Likewise.
18587 * doc/extend.texi (__builtin_divweo): Remove documentation for deleted
18589 (__builtin_divweuo): Likewise.
18590 (__builtin_divdeo): Likewise.
18591 (__builtin_divdeuo): Likewise.
18593 2018-03-28 Jakub Jelinek <jakub@redhat.com>
18596 * config/i386/i386.md (*add<mode>3_carry_0, *addsi3_carry_zext_0,
18597 *sub<mode>3_carry_0, *subsi3_carry_zext_0): New patterns.
18599 PR tree-optimization/82004
18600 * gimple-match-head.c (optimize_pow_to_exp): New function.
18601 * match.pd (pow(C,x) -> exp(log(C)*x)): Wrap with #if GIMPLE.
18602 Don't fold to exp if optimize_pow_to_exp is false.
18604 2018-03-28 Martin Liska <mliska@suse.cz>
18607 * calls.c (initialize_argument_information): Fix trailing space.
18608 * common.opt: Fix typo and provide better explanation for
18609 -fsanitize-coverage option.
18610 * config/i386/i386.opt: Fix typo.
18612 2018-03-28 Jakub Jelinek <jakub@redhat.com>
18613 Martin Liska <mliska@suse.cz>
18616 * gimplify.c (asan_poison_variable): Don't do the check for
18617 gimplify_omp_ctxp here.
18618 (gimplify_decl_expr): Do it here.
18619 (gimplify_target_expr): Likewise.
18621 2018-03-28 Martin Liska <mliska@suse.cz>
18624 * config/i386/i386.c (ix86_function_arg_advance): Do not call
18625 chkp_type_bounds_count if MPX is not enabled.
18627 2018-03-27 Chung-Ju Wu <jasonwucj@gmail.com>
18629 * config/nds32/nds32.h (BRANCH_COST): Adjust cost.
18631 2018-03-27 Michael Meissner <meissner@linux.vnet.ibm.com>
18634 * config/rs6000/rs6000.c (create_complex_muldiv): New helper
18635 function to create the function decl for complex long double
18636 multiply and divide for -mabi=ieeelongdouble.
18637 (init_float128_ieee): Call it.
18639 2018-03-27 H.J. Lu <hongjiu.lu@intel.com>
18642 * config/i386/i386.c (ix86_trampoline_init): Insert ENDBR for
18643 -fcf-protection=branch -mibt.
18644 * config/i386/i386.h (TRAMPOLINE_SIZE): Increased by 4 bytes.
18646 2018-03-27 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
18649 * config/arm/arm.c (arm_valid_symbolic_address): Handle
18650 arm_word_relocations.
18652 2018-03-27 Cesar Philippidis <cesar@codesourcery.com>
18655 * config/nvptx/nvptx.c (nvptx_assemble_decl_begin): Add '[]' to
18656 extern array declarations.
18658 2018-03-27 Richard Biener <rguenther@suse.de>
18660 PR middle-end/84067
18661 * match.pd ((A * C) +- (B * C) -> (A+-B) * C): Guard with
18662 explicit single_use checks.
18664 2018-03-27 Richard Biener <rguenther@suse.de>
18666 PR tree-optimization/85082
18667 * tree-ssa-sccvn.c (vn_reference_lookup_or_insert_for_pieces):
18670 2018-03-27 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
18672 * config.gcc (aarch64*-*-linux*): New TARGET_DEFAULT_ASYNC_UNWIND_TABLES
18673 * common/config/aarch64/aarch64-common.c (aarch64_optimization_table[]):
18674 Turn on fasynchronous-unwind-tables and funwind-tables.
18676 2018-03-26 Uros Bizjak <ubizjak@gmail.com>
18679 * config/i386/i386.md (*bmi_blsr_<mode>_cmp): New insn pattern.
18680 (*bmi_blsr_<mode>_ccz): Ditto.
18682 2018-03-26 Tom de Vries <tom@codesourcery.com>
18684 PR tree-optimization/85063
18685 * omp-general.c (offloading_function_p): New function. Factor out
18687 * omp-offload.c (pass_omp_target_link::gate): ... here.
18688 * omp-general.h (offloading_function_p): Declare.
18689 * tree-switch-conversion.c (build_one_array): Mark CSWTCH.x variable
18690 with attribute omp declare target for offloading functions.
18692 2018-03-24 Richard Sandiford <richard.sandiford@linaro.org>
18694 PR tree-optimization/84005
18695 * tree-data-ref.h (get_base_for_alignment): Declare.
18696 * tree-data-ref.c (get_base_for_alignment_1): New function.
18697 (get_base_for_alignment): Likewise.
18698 * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Use
18699 get_base_for_alignment to find a suitable base object, instead
18700 of always using drb->base_address.
18702 2018-03-23 Jakub Jelinek <jakub@redhat.com>
18704 PR inline-asm/85022
18705 * emit-rtl.c (init_emit_regs): Indicate that VOIDmode MEMs don't have
18706 known size by default.
18708 2018-03-23 Vladimir Makarov <vmakarov@redhat.com>
18710 PR inline-asm/85030
18711 * lra-constraints.c (process_alt_operands): Don't match BLKmode
18712 and non BLKmode operands.
18714 2018-03-23 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
18717 * config/arm/arm.md (unaligned_loadhis): Remove first alternative.
18718 Clean up attributes.
18720 2018-03-23 Richard Biener <rguenther@suse.de>
18723 * dwarf2out.c (rtl_for_decl_location): Do not generate RTL early when
18724 we are going to emit early debug for LTO.
18726 2018-03-23 Jakub Jelinek <jakub@redhat.com>
18728 PR inline-asm/85034
18729 * function.c (match_asm_constraints_1): Don't optimize if input
18730 doesn't satisfy general_operand predicate for output's mode.
18732 PR inline-asm/85022
18733 * alias.c (write_dependence_p): Don't require for x_canonicalized
18734 non-VOIDmode if x has VOIDmode.
18737 * sanopt.c (maybe_optimize_ubsan_ptr_ifn): If DECL_REGISTER (base),
18738 just don't try to optimize it rather than assert it never happens.
18740 2018-03-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
18742 * config/rs6000/rs6000-builtin.def: Remove various BU_ALTIVEC_X
18743 macro expansions for definition of ST_INTERNAL_<mode> and
18744 LD_INTERNAL_<mode> builtins.
18745 * config/rs6000/rs6000-protos.h (rs6000_address_for_altivec):
18747 * config/rs6000/rs6000.c (altivec_expand_ld_builtin): Delete this
18749 (altivec_expand_st_builtin): Likewise.
18750 (altivec_expand_builtin): Remove calls to deleted functions.
18751 (rs6000_address_for_altivec): Delete this function.
18752 * config/rs6000/vector.md: Remove expands for
18753 vector_altivec_load_<mode> and vector_altivec_store_<mode>.
18755 2018-03-22 Sudakshina Das <sudi.das@arm.com>
18758 * config/arm/arm.h (machine_function): Add static_chain_stack_bytes.
18759 * config/arm/arm.c (arm_compute_static_chain_stack_bytes): Avoid
18760 re-computing once computed.
18761 (arm_expand_prologue): Compute machine->static_chain_stack_bytes.
18762 (arm_init_machine_status): Initialize
18763 machine->static_chain_stack_bytes.
18765 2018-03-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
18768 * doc/extend.texi: Add four new prototypes for vec_ld.
18769 * config/rs6000/rs6000-builtin.def (LVX_V1TI): Reorder symbol
18770 definitions for more logical presentation.
18771 * config/rs6000/rs6000-c.c: (altivec_overloaded_builtins): Add
18772 entries for V1TI variants of __builtin_altivec_ld builtin.
18773 * config/rs6000/rs6000.c: (altivec_expand_lv_builtin): Add test and
18774 handling of V1TI variant of LVX icode pattern.
18775 (altivec_expand_builtin): Add case for ALTIVEC_BUILTIN_LVX_V1TI.
18776 (rs6000_gimple_fold_builtin): Likewise.
18777 (altivec_init_builtins): Add code to define
18778 __builtin_altivec_lvx_v1ti function.
18780 2018-03-22 Jakub Jelinek <jakub@redhat.com>
18782 PR inline-asm/84941
18783 * function.c (match_asm_constraints_1): Don't do the optimization
18784 if input isn't a REG, SUBREG, MEM or constant.
18786 2018-03-22 Tom de Vries <tom@codesourcery.com>
18788 PR tree-optimization/84956
18789 * tree-ssa-tail-merge.c (find_clusters_1): Skip bbs with
18790 bb_has_abnormal_pred.
18792 2018-03-22 Jakub Jelinek <jakub@redhat.com>
18795 * dwarf2asm.c (dw2_output_indirect_constant_1): Set
18796 DECL_INITIAL (decl) to decl at the end.
18797 * varasm.c (use_blocks_for_decl_p): Revert the 2018-03-20 change,
18798 adjust the comment.
18800 2018-03-21 Joseph Myers <joseph@codesourcery.com>
18802 * doc/extend.texi (__builtin_tgmath): Document when complex
18803 integer types are treated as _Complex _Float64.
18805 2018-03-21 Tom de Vries <tom@codesourcery.com>
18807 * doc/extend.texi (__builtin_extend_pointer): Remove pasto.
18809 2018-03-21 Jakub Jelinek <jakub@redhat.com>
18811 PR tree-optimization/84960
18812 * tree-cfg.c (remove_bb): Don't move forced labels into bb->prev_bb
18813 if it is ENTRY block, move them into single succ of ENTRY in that case.
18815 2018-03-21 Richard Sandiford <richard.sandiford@linaro.org>
18817 PR tree-optimization/84811
18818 * poly-int.h (poly_span_traits): Remove the T3 parameter and
18819 promote HOST_WIDE_INT T2 - T1 results to unsigned HOST_WIDE_INT.
18820 (maybe_in_range_p, known_in_range_p, ranges_known_overlap_p):
18821 (known_subrange_p): Update accordingly. Cast each value involved
18822 in the size comparison, rather than casting the result of the
18825 2018-03-21 Jakub Jelinek <jakub@redhat.com>
18827 PR tree-optimization/84982
18828 * gimple-ssa-store-merging.c (invert_op): Handle boolean inversion
18829 by flipping the least significant bit rather than all bits from
18830 bitpos to bitpos + bitsize - 1.
18832 2018-03-21 Nathan Sidwell <nathan@acm.org>
18834 * doc/extend.texi (Deprecated Features): Remove mention of
18835 long-deleted deprecations.
18837 2018-03-21 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
18840 * configure.ac (gcc_cv_ld_soname) <*-*-solaris2*>: Set.
18841 * configure: Regenerate.
18843 2018-03-21 Tom de Vries <tom@codesourcery.com>
18845 PR tree-optimization/83126
18846 * tree-parloops.c (num_phis): New function.
18847 (gen_parallel_loop): Detect and handle canonicalize_loop_ivs failure.
18849 2018-03-21 Nathan Sidwell <nathan@acm.org>
18851 * doc/extend.texi (Deprecated Features): Update deprecated flags,
18852 mention anon-struct/union members and trailing attributes.
18854 2018-03-21 Bin Cheng <bin.cheng@arm.com>
18856 PR tree-optimization/84969
18857 * tree-loop-distribution.c (fuse_memset_builtins): Don't reorder
18858 builtin memset partitions if they set different rhs values.
18860 2018-03-21 Jakub Jelinek <jakub@redhat.com>
18862 PR rtl-optimization/84989
18863 * simplify-rtx.c (simplify_unary_operation_1): Don't try to simplify
18864 VEC_DUPLICATE with scalar result mode.
18866 2018-03-21 Martin Liska <mliska@suse.cz>
18869 * ipa-icf.c (sem_item_optimizer::fixup_points_to_sets): Remove
18870 not intended return statement.
18872 2018-03-21 Martin Liska <mliska@suse.cz>
18875 * tree-chkp.c (CHKP_ARRAY_MAX_CHECK_STEPS): Define a new macro.
18876 (chkp_find_bound_slots_1): Limit number of iterations.
18878 2018-03-20 David H. Gutteridge <dhgutteridge@sympatico.ca>
18881 * Minor grammar fixes for x86 options.
18883 2018-03-20 Jakub Jelinek <jakub@redhat.com>
18886 * dce.c (delete_unmarked_insns): Don't remove frame related noop moves
18887 holding REG_CFA_RESTORE notes, instead turn them into a USE.
18889 2018-03-20 Peter Bergner <bergner@vnet.ibm.com>
18892 * config/rs6000/altivec.md (altivec_lvx_<mode>_2op): Delete define_insn.
18893 (altivec_lvx_<mode>_1op): Likewise.
18894 (altivec_stvx_<mode>_2op): Likewise.
18895 (altivec_stvx_<mode>_1op): Likewise.
18896 (altivec_lvx_<VM2:mode>): New define_expand.
18897 (altivec_stvx_<VM2:mode>): Likewise.
18898 (altivec_lvx_<VM2:mode>_2op_<P:mptrsize>): New define_insn.
18899 (altivec_lvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
18900 (altivec_stvx_<VM2:mode>_2op_<P:mptrsize>): Likewise.
18901 (altivec_stvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
18902 * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Use new expanders.
18903 (rs6000_gen_lvx): Likewise.
18904 * config/rs6000/rs6000.c (altivec_expand_lv_builtin): Likewise.
18905 (altivec_expand_stv_builtin): Likewise.
18906 (altivec_expand_builtin): Likewise.
18907 * config/rs6000/vector.md: Likewise.
18909 2018-03-20 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
18912 * config/arm/arm.c (arm_array_mode_supported_p): Return false for
18915 2018-03-20 Richard Biener <rguenther@suse.de>
18918 * config/i386/i386.c (ix86_add_stmt_cost): Only cost
18919 sign-conversions as zero, fall back to standard scalar_stmt
18922 2018-03-20 Martin Liska <mliska@suse.cz>
18925 * predict.c (rebuild_frequencies): Handle case when we have
18926 PROFILE_ABSENT, but flag_guess_branch_prob is false.
18928 2018-03-20 Jakub Jelinek <jakub@redhat.com>
18931 * dwarf2asm.c (dw2_output_indirect_constant_1): Temporarily turn off
18932 flag_section_anchors.
18933 * varasm.c (use_blocks_for_decl_p): Remove hack for
18934 dw2_force_const_mem.
18937 * config/aarch64/aarch64.md (*aarch64_reg_<mode>3_neg_mask2): Rename
18939 (*aarch64_<optab>_reg_<mode>3_neg_mask2): ... this. If pseudos can't
18940 be created, use lowpart_subreg of operands[0] rather than operands[0]
18942 (*aarch64_reg_<mode>3_minus_mask): Rename to ...
18943 (*aarch64_ashl_reg_<mode>3_minus_mask): ... this.
18944 (*aarch64_<optab>_reg_di3_mask2): Use const_int_operand predicate
18945 and n constraint instead of aarch64_shift_imm_di and Usd.
18946 (*aarch64_reg_<optab>_minus<mode>3): Rename to ...
18947 (*aarch64_<optab>_reg_minus<mode>3): ... this.
18949 2018-03-20 Sudakshina Das <sudi.das@arm.com>
18952 * config/arm/neon.md (ashldi3_neon): Update ?s for constraints
18953 to favor GPR over NEON registers.
18954 (<shift>di3_neon): Likewise.
18956 2018-03-20 Tom de Vries <tom@codesourcery.com>
18959 * config/nvptx/nvptx.c (nvptx_single): Don't neuter bar.sync.
18960 (nvptx_process_pars): Emit bar.sync asap and alap.
18962 2018-03-20 Tom de Vries <tom@codesourcery.com>
18965 * config/nvptx/nvptx.c (prevent_branch_around_nothing): Also update
18966 seen_label if seen_label is already set.
18968 2018-03-20 Jakub Jelinek <jakub@redhat.com>
18971 * config/i386/i386.c (fold_builtin_cpu): For features above 31
18972 use __cpu_features2 variable instead of __cpu_model.__cpu_features[0].
18973 Use 1U instead of 1. Formatting fixes.
18976 * builtins.c (fold_builtin_strpbrk): For strpbrk(x, "") use type
18977 instead of TREE_TYPE (s1) for the return value.
18979 2018-03-19 Jakub Jelinek <jakub@redhat.com>
18981 PR tree-optimization/84946
18982 * gimple-ssa-store-merging.c (mem_valid_for_store_merging): Compute
18983 bitsize + bitsize in poly_uint64 rather than poly_int64.
18986 * dwarf2asm.c: Include fold-const.c.
18987 (dw2_output_indirect_constant_1): Set DECL_INITIAL (decl) to ADDR_EXPR
18988 of decl rather than decl itself.
18990 PR rtl-optimization/84643
18991 * memmodel.h (enum memmodel): Add MEMMODEL_MAX enumerator.
18993 2018-03-19 Maxim Ostapenko <m.ostapenko@samsung.com>
18996 * dwarf2asm.c (dw2_output_indirect_constant_1): Disable ASan before
18997 calling assemble_variable.
18999 2018-03-19 Sudakshina Das <sudi.das@arm.com>
19002 * config/aarch64/aarch64-simd.md (vec_cmp<mode><v_int_equiv>): Modify
19003 instructions for UNLT, UNLE, UNGT, UNGE, UNEQ, UNORDERED and ORDERED.
19005 2018-03-19 Jim Wilson <jimw@sifive.com>
19008 * config/riscv/riscv.c (riscv_function_arg_boundary): Use
19009 PREFERRED_STACK_BOUNDARY instead of STACK_BOUNDARY.
19010 (riscv_first_stack_step): Likewise.
19011 (riscv_option_override): Use STACK_BOUNDARY instead of
19012 MIN_STACK_BOUNDARY.
19013 * config/riscv/riscv.h (STACK_BOUNDARY): Renamed from
19014 MIN_STACK_BOUNDARY.
19015 (BIGGEST_ALIGNMENT): Set to 128.
19016 (PREFERRED_STACK_BOUNDARY): Renamed from STACK_BOUNDARY.
19017 (RISCV_STACK_ALIGN): Use PREFERRED_STACK_BOUNDARY instead of
19020 2018-03-19 Richard Biener <rguenther@suse.de>
19022 PR tree-optimization/84933
19023 * tree-vrp.c (set_and_canonicalize_value_range): Treat out-of-bound
19024 values as -INF/INF when canonicalizing an ANTI_RANGE to a RANGE.
19026 2018-03-19 Richard Biener <rguenther@suse.de>
19028 PR tree-optimization/84859
19029 * tree-ssa-phiopt.c (single_trailing_store_in_bb): New function.
19030 (cond_if_else_store_replacement): Perform sinking operation on
19031 single-store BBs regardless of MAX_STORES_TO_SINK setting.
19032 Generalize what a BB with a single eligible store is.
19034 2018-03-19 Richard Biener <rguenther@suse.de>
19036 PR tree-optimization/84929
19037 * tree-data-ref.c (analyze_siv_subscript_cst_affine): Guard
19038 chrec_is_positive against non-chrec arg.
19040 2018-03-19 Tamar Christina <tamar.christina@arm.com>
19043 * config/arm/arm.c (arm_can_change_mode_class): revert r258554.
19045 2018-03-18 Martin Liska <mliska@suse.cz>
19047 PR rtl-optimization/84635
19048 * regrename.c (build_def_use): Use matches_mode only when
19051 2018-03-18 Richard Sandiford <richard.sandiford@linaro.org>
19053 PR tree-optimization/84913
19054 * tree-vect-loop.c (vectorizable_reduction): Don't try to
19055 vectorize chains of COND_EXPRs.
19057 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
19059 * config/nds32/nds32.h (MAX_REGS_PER_ADDRESS): Fix the value.
19061 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
19063 * config/nds32/nds32.h (LOGICAL_OP_NON_SHORT_CIRCUIT): Define.
19065 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
19067 * config/nds32/nds32.h (CLZ_DEFINED_VALUE_AT_ZERO): Define.
19069 2018-03-17 Chung-Ju Wu <jasonwucj@gmail.com>
19070 Kito Cheng <kito.cheng@gmail.com>
19072 * config/nds32/nds32-protos.h (nds32_adjust_reg_alloc_order): Declare.
19073 * config/nds32/nds32.c (nds32_reg_alloc_order_for_speed): New array.
19074 (nds32_adjust_reg_alloc_order): New function.
19075 * config/nds32/nds32.h (ADJUST_REG_ALLOC_ORDER): Define.
19077 2018-03-17 Kito Cheng <kito.cheng@gmail.com>
19079 * config/nds32/nds32.c (nds32_asm_output_mi_thunk,
19080 nds32_print_operand, nds32_print_operand_address): Use
19081 HOST_WIDE_INT_PRINT_DEC instead.
19083 2018-03-17 Chung-Ju Wu <jasonwucj@gmail.com>
19085 * config/nds32/nds32.c (nds32_register_priority): Modify cost.
19087 2018-03-17 Jakub Jelinek <jakub@redhat.com>
19090 * config/i386/i386.c (initial_ix86_tune_features,
19091 initial_ix86_arch_features): Use unsigned HOST_WIDE_INT rather than
19092 unsigned long long.
19093 (set_ix86_tune_features): Change ix86_tune_mask from unsigned int
19094 to unsigned HOST_WIDE_INT, initialize to HOST_WIDE_INT_1U << ix86_tune
19095 rather than 1u << ix86_tune. Formatting fix.
19096 (ix86_option_override_internal): Change ix86_arch_mask from
19097 unsigned int to unsigned HOST_WIDE_INT, initialize to
19098 HOST_WIDE_INT_1U << ix86_arch rather than 1u << ix86_arch.
19099 (ix86_function_specific_restore): Likewise.
19101 2018-03-16 Jakub Jelinek <jakub@redhat.com>
19104 * postreload.c (reload_combine_recognize_pattern): Perform
19105 INTVAL addition in unsigned HOST_WIDE_INT type to avoid UB and
19106 truncate_int_for_mode the result for the destination's mode.
19109 * hsa-gen.c (mem_type_for_type): Fix comment typo.
19110 * tree-vect-loop-manip.c (vect_create_cond_for_niters_checks):
19112 * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
19115 2018-03-16 Vladimir Makarov <vmakarov@redhat.com>
19118 * lra-assigns.c (lra_split_hard_reg_for): Don't use
19119 regno_allocno_class_array and sorted_pseudos.
19120 * lra-constraints.c (spill_hard_reg_in_range): Ignore hard regs in
19121 insns where regno is used.
19123 2018-03-16 Martin Liska <mliska@suse.cz>
19126 * multiple_target.c (create_dispatcher_calls): Redirect
19127 reference in the symbol table.
19129 2018-03-16 Martin Liska <mliska@suse.cz>
19132 * multiple_target.c (create_dispatcher_calls): Redirect also
19135 2018-03-16 Jakub Jelinek <jakub@redhat.com>
19139 * tree.h (TARGET_EXPR_NO_ELIDE): Define.
19140 * gimplify.c (gimplify_modify_expr_rhs): Don't elide TARGET_EXPRs with
19141 TARGET_EXPR_NO_ELIDE flag set unless *expr_p is INIT_EXPR.
19143 2018-03-16 Julia Koval <julia.koval@intel.com>
19145 * doc/invoke.texi (Skylake Server): Add CLWB.
19146 Cannonlake): Remove CLWB.
19148 2018-03-16 Jakub Jelinek <jakub@redhat.com>
19150 PR tree-optimization/84841
19151 * tree-ssa-reassoc.c (INTEGER_CONST_TYPE): Change to 1 << 4 from
19153 (FLOAT_ONE_CONST_TYPE): Define.
19154 (constant_type): Return FLOAT_ONE_CONST_TYPE for -1.0 and 1.0.
19155 (sort_by_operand_rank): Put entries with higher constant_type last
19156 rather than first to match comments.
19158 2018-03-15 Sandra Loosemore <sandra@codesourcery.com>
19160 * config/nios2/nios2.md (movsi_internal): Fix thinko in
19163 2018-03-15 Jakub Jelinek <jakub@redhat.com>
19166 * calls.c (expand_call): For TREE_ADDRESSABLE rettype ignore alignment
19167 check and use address of target always.
19169 2018-03-15 H.J. Lu <hongjiu.lu@intel.com>
19172 * config/i386/i386.c (indirect_thunk_needed): Update comments.
19173 (indirect_thunk_bnd_needed): Likewise.
19174 (indirect_thunks_used): Likewise.
19175 (indirect_thunks_bnd_used): Likewise.
19176 (indirect_return_needed): New.
19177 (indirect_return_bnd_needed): Likewise.
19178 (output_indirect_thunk_function): Add a bool argument for
19180 (output_indirect_thunk_function): Don't generate alias for
19181 function return thunk.
19182 (ix86_code_end): Call output_indirect_thunk_function to generate
19183 function return thunks.
19184 (ix86_output_function_return): Set indirect_return_bnd_needed
19185 and indirect_return_needed instead of indirect_thunk_bnd_needed
19186 and indirect_thunk_needed.
19188 2018-03-15 Olga Makhotina <olga.makhotina@intel.com>
19190 * config/i386/sgxintrin.h (_enclv_u32): New intrinsic.
19191 (__enclv_bc, __enclv_cd, __enclv_generic): New definitions.
19192 (ERDINFO, ETRACKC, ELDBC, ELDUC): New leaves.
19194 2018-03-15 David Malcolm <dmalcolm@redhat.com>
19195 Paul Hua <paul.hua.gm@gmail.com>
19198 * gcc.dg/fixits-pr84852-1.c: Fix filename in dg-regexp.
19200 2018-03-15 Segher Boessenkool <segher@kernel.crashing.org>
19202 * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add back the
19203 TARGET_DOUBLE_FLOAT and TARGET_SINGLE_FLOAT conditions on the DFmode
19204 resp. SFmode cases.
19206 2018-03-15 Tamar Christina <tamar.christina@arm.com>
19209 * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
19210 instead of GET_MODE_SIZE when comparing Units.
19212 2018-03-15 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
19215 * varasm.c (hash_section): Return an unchangeble hash value
19216 * config/aarch64/aarch64.c (aarch64_use_blocks_for_constant_p):
19217 Return !aarch64_can_use_per_function_literal_pools_p ().
19219 2018-03-15 Jakub Jelinek <jakub@redhat.com>
19222 * optabs.c (emit_conditional_move): Pass address of cmode's copy
19223 rather than address of cmode as last argument to prepare_cmp_insn.
19225 2018-03-15 Julia Koval <julia.koval@intel.com>
19227 * config/i386/i386.c (F_AVX512VBMI2, F_GFNI, F_VPCLMULQDQ,
19228 F_AVX512VNNI, F_AVX512BITALG): New.
19230 2018-03-14 John David Anglin <danglin@gcc.gnu.org>
19233 * config/pa/pa.c (pa_emit_move_sequence): Always emit secondary reload
19234 insn for floating-point loads and stores.
19236 2018-03-14 Carl Love <cel@us.ibm.com>
19238 * config/rs6000/rs6000-c.c: Add macro definitions for
19239 ALTIVEC_BUILTIN_VEC_PERMXOR.
19240 * config/rs6000/rs6000.h: Add #define for vec_permxor builtin.
19241 * config/rs6000/rs6000-builtin.def: Add macro expansions for VPERMXOR.
19242 * config/rs6000/altivec.md (altivec_vpermxor): New define expand.
19243 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Add case
19245 * config/doc/extend.texi: Add prototypes for vec_permxor.
19247 2018-03-14 David Malcolm <dmalcolm@redhat.com>
19250 * diagnostic-show-locus.c (class layout_point): Convert m_line
19251 from int to linenum_type.
19252 (line_span::comparator): Use linenum "compare" function when
19253 comparing line numbers.
19254 (test_line_span): New function.
19255 (layout_range::contains_point): Convert param "row" from int to
19257 (layout_range::intersects_line_p): Likewise.
19258 (layout::will_show_line_p): Likewise.
19259 (layout::print_source_line): Likewise.
19260 (layout::should_print_annotation_line_p): Likewise.
19261 (layout::print_annotation_line): Likewise.
19262 (layout::print_leading_fixits): Likewise.
19263 (layout::annotation_line_showed_range_p): Likewise.
19264 (struct line_corrections): Likewise for field m_row.
19265 (line_corrections::line_corrections): Likewise for param "row".
19266 (layout::print_trailing_fixits): Likewise.
19267 (layout::get_state_at_point): Likewise.
19268 (layout::get_x_bound_for_row): Likewise.
19269 (layout::print_line): Likewise.
19270 (diagnostic_show_locus): Likewise for locals "last_line" and "row".
19271 (selftest::diagnostic_show_locus_c_tests): Call test_line_span.
19272 * input.c (selftest::test_linenum_comparisons): New function.
19273 (selftest::input_c_tests): Call it.
19274 * selftest.c (selftest::test_assertions): Test ASSERT_GT,
19275 ASSERT_GT_AT, ASSERT_LT, and ASSERT_LT_AT.
19276 * selftest.h (ASSERT_GT): New macro.
19277 (ASSERT_GT_AT): New macro.
19278 (ASSERT_LT): New macro.
19279 (ASSERT_LT_AT): New macro.
19281 2018-03-14 Segher Boessenkool <segher@kernel.crashing.org>
19283 PR rtl-optimization/84780
19284 * combine.c (distribute_links): Don't make a link based on pc_rtx.
19286 2018-03-14 Martin Liska <mliska@suse.cz>
19288 * tree.c (record_node_allocation_statistics): Use
19289 get_stats_node_kind.
19290 (get_stats_node_kind): New function extracted from
19291 record_node_allocation_statistics.
19292 (free_node): Use get_stats_node_kind.
19294 2018-03-14 Richard Biener <rguenther@suse.de>
19296 * tree-ssa-pre.c (compute_antic_aux): Remove code that asserts
19297 that the value-set of ANTIC_IN doesn't grow.
19300 * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
19302 (BB_VISITED_WITH_VISITED_SUCCS): New define.
19303 (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
19305 2018-03-14 Julia Koval <julia.koval@intel.com>
19307 * config.gcc (icelake-client, icelake-server): New.
19309 * config/i386/i386.c (initial_ix86_tune_features): Extend to 64 bit.
19310 (initial_ix86_arch_features): Ditto.
19311 (PTA_SKYLAKE): Add SGX.
19312 (PTA_ICELAKE): Remove.
19313 (PTA_ICELAKE_CLIENT): New.
19314 (PTA_ICELAKE_SERVER): New.
19315 (ix86_option_override_internal): Split up icelake on icelake client and
19317 (get_builtin_code_for_version): Ditto.
19318 (fold_builtin_cpu): Ditto.
19319 * config/i386/driver-i386.c (config/i386/driver-i386.c): Ditto.
19320 * config/i386/i386-c.c (ix86_target_macros_internal): Ditto
19321 * config/i386/i386.h (processor_type): Ditto.
19322 * doc/invoke.texi: Ditto.
19324 2018-03-14 Jakub Jelinek <jakub@redhat.com>
19327 * sanopt.c (maybe_optimize_ubsan_ptr_ifn): Handle also
19328 INTEGER_CST offset, add it together with bitpos / 8 and
19329 sign extend based on POINTER_SIZE.
19333 2017-04-20 Uros Bizjak <ubizjak@gmail.com>
19336 * config/i386/constraints.md (Yc): New register constraint.
19337 * config/i386/i386.md (*float<SWI48:mode><MODEF:mode>2_mixed):
19338 Use Yc constraint for alternative 2 of operand 0. Remove
19339 preferred_for_speed attribute.
19341 2018-03-14 Richard Biener <rguenther@suse.de>
19343 PR tree-optimization/84830
19344 * tree-ssa-pre.c (compute_antic_aux): Intersect the new ANTIC_IN
19345 with the old one to avoid oscillations.
19347 2018-03-13 Vladimir Makarov <vmakarov@redhat.com>
19350 * lra-assigns.c (find_all_spills_for): Ignore uninteresting
19352 (assign_by_spills): Return a flag of reload assignment failure.
19353 Do not process the reload assignment failures. Do not spill other
19354 reload pseudos if they has the same reg class. Update n if
19356 (lra_assign): Add a return arg. Set up from the result of
19357 assign_by_spills call.
19358 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
19359 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
19360 usage_insns if it is not NULL.
19361 (spill_hard_reg_in_range): New function.
19362 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
19363 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
19364 function prototypes.
19365 (lra_assign): Change prototype.
19366 * lra.c (lra): Add code to deal with fails by splitting hard reg
19369 2018-03-01 Palmer Dabbelt <palmer@sifive.com>
19371 * config/riscv/riscv.opt (mrelax): New option.
19372 * config/riscv/riscv.c (riscv_file_start): Emit ".option
19373 "norelax" when riscv_mrelax is disabled.
19374 * doc/invoke.texi (RISC-V): Document "-mrelax" and "-mno-relax".
19376 2018-03-13 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
19379 * config/rs6000/rs6000.c (rs6000_reassociation_width): Disable parallel
19380 reassociation for int modes.
19382 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
19384 * tree-vect-loop-manip.c (vect_maybe_permute_loop_masks):
19385 Reverse the choice between VEC_UNPACK_LO_EXPR and VEC_UNPACK_HI_EXPR
19387 * config/aarch64/iterators.md (hi_lanes_optab): New int attribute.
19388 * config/aarch64/aarch64-sve.md
19389 (*aarch64_sve_<perm_insn><perm_hilo><mode>): Rename to...
19390 (aarch64_sve_<perm_insn><perm_hilo><mode>): ...this.
19391 (*extend<mode><Vwide>2): Rename to...
19392 (aarch64_sve_extend<mode><Vwide>2): ...this.
19393 (vec_unpack<su>_<perm_hilo>_<mode>): Turn into a define_expand,
19394 renaming the old pattern to...
19395 (aarch64_sve_punpk<perm_hilo>_<mode>): ...this. Only define
19397 (vec_unpack<su>_<perm_hilo>_<SVE_BHSI:mode>): Turn into a
19398 define_expand, renaming the old pattern to...
19399 (aarch64_sve_<su>unpk<perm_hilo>_<SVE_BHSI:mode>): ...this.
19400 (*vec_unpacku_<perm_hilo>_<mode>_no_convert): Delete.
19401 (vec_unpacks_<perm_hilo>_<mode>): Take BYTES_BIG_ENDIAN into
19402 account when deciding which SVE instruction the optab should use.
19403 (vec_unpack<su_optab>_float_<perm_hilo>_vnx4si): Likewise.
19405 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
19407 * config/aarch64/aarch64.md (V4_REGNUM, V8_REGNUM, V12_REGNUM)
19408 (V20_REGNUM, V24_REGNUM, V28_REGNUM, P1_REGNUM, P2_REGNUM, P3_REGNUM)
19409 (P4_REGNUM, P5_REGNUM, P6_REGNUM, P8_REGNUM, P9_REGNUM, P10_REGNUM)
19410 (P11_REGNUM, P12_REGNUM, P13_REGNUM, P14_REGNUM): New define_constants.
19411 (tlsdesc_small_<mode>): Turn a define_expand and use
19412 tlsdesc_small_sve_<mode> for SVE. Rename original define_insn to...
19413 (tlsdesc_small_advsimd_<mode>): ...this.
19414 (tlsdesc_small_sve_<mode>): New pattern.
19416 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
19418 * config/aarch64/iterators.md (UNSPEC_SMUL_HIGHPART)
19419 (UNSPEC_UMUL_HIGHPART): New constants.
19420 (MUL_HIGHPART): New int iteraor.
19421 (su): Handle UNSPEC_SMUL_HIGHPART and UNSPEC_UMUL_HIGHPART.
19422 * config/aarch64/aarch64-sve.md (<su>mul<mode>3_highpart): New
19424 (*<su>mul<mode>3_highpart): New define_insn.
19426 2018-03-13 Eric Botcazou <ebotcazou@adacore.com>
19429 * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
19432 2018-03-13 Martin Liska <mliska@suse.cz>
19435 * (sem_item_optimizer::sem_item_optimizer): Initialize new
19437 (sem_item_optimizer::~sem_item_optimizer): Release it.
19438 (sem_item_optimizer::merge_classes): Register variable aliases.
19439 (sem_item_optimizer::fixup_pt_set): New function.
19440 (sem_item_optimizer::fixup_points_to_sets): Likewise.
19441 * ipa-icf.h: Declare new variables and functions.
19443 2018-03-13 Jakub Jelinek <jakub@redhat.com>
19445 PR middle-end/84834
19446 * match.pd ((A & C) != 0 ? D : 0): Use INTEGER_CST@2 instead of
19447 integer_pow2p@2 and test integer_pow2p in condition.
19448 (A < 0 ? C : 0): Similarly for @1.
19450 PR middle-end/84831
19451 * stmt.c (parse_output_constraint): If the CONSTRAINT_LEN (*p, p)
19452 characters starting at p contain '\0' character, don't look beyond
19456 * config/i386/i386.md (round<mode>2): For 387 fancy math, disable
19457 pattern if -ftrapping-math -fno-fp-int-builtin-inexact.
19460 * reg-stack.c (change_stack): Change update_end var from int to
19461 rtx_insn *, if non-NULL don't update just BB_END (current_block), but
19462 also call set_block_for_insn on the newly added insns and rescan.
19465 * config/i386/sse.md (sse2_loadhpd): Use Yv constraint rather than v
19466 on the last operand.
19469 * tree.c (stabilize_reference_1): Return save_expr (e) for
19470 STATEMENT_LIST even if it doesn't have side-effects.
19472 2018-03-12 Jonathan Wakely <jwakely@redhat.com>
19474 * doc/invoke.texi (-mclflushopt): Fix spelling of option.
19476 2018-03-12 Renlin Li <renlin.li@arm.com>
19478 * config/aarch64/aarch64.md (movhf_aarch64): Fix mode argument to
19479 aarch64_output_scalar_simd_mov_immediate.
19481 2018-03-12 Martin Sebor <msebor@redhat.com>
19483 PR tree-optimization/83456
19484 * gimple-fold.c (gimple_fold_builtin_memory_op): Avoid warning
19485 for perfectly overlapping calls to memcpy.
19486 (gimple_fold_builtin_memory_chk): Same.
19487 (gimple_fold_builtin_strcpy): Handle no-warning.
19488 (gimple_fold_builtin_stxcpy_chk): Same.
19489 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Handle no-warning.
19491 2018-03-12 Segher Boessenkool <segher@kernel.crashing.org>
19493 * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add bool "named"
19494 parameter. Use it for SFmode.
19495 (rs6000_function_arg_advance_1): Adjust.
19496 (rs6000_function_arg): Adjust.
19497 (rs6000_gimplify_va_arg): Pass false for that new parameter.
19499 2018-03-12 Segher Boessenkool <segher@kernel.crashing.org>
19501 PR rtl-optimization/84169
19502 PR rtl-optimization/84780
19503 * combine.c (can_combine_p): Check for a 2-insn combination whether
19504 the destination register is used between the two insns, too.
19506 2018-03-12 Richard Biener <rguenther@suse.de>
19508 PR tree-optimization/84803
19509 * tree-if-conv.c (ifcvt_memrefs_wont_trap): Don't do anything
19510 for refs DR analysis didn't process.
19512 2018-03-12 Richard Biener <rguenther@suse.de>
19514 PR tree-optimization/84777
19515 * tree-ssa-loop-ch.c (should_duplicate_loop_header_p): For
19516 force-vectorize loops ignore whether we are optimizing for size.
19518 2018-03-12 Chung-Ju Wu <jasonwucj@gmail.com>
19520 * config/nds32/nds32.c (nds32_md_asm_adjust): New function.
19521 (TARGET_MD_ASM_ADJUST): Define.
19523 2018-03-12 Monk Chiang <sh.chiang04@gmail.com>
19524 Kito Cheng <kito.cheng@gmail.com>
19525 Chung-Ju Wu <jasonwucj@gmail.com>
19527 * config/nds32/nds32.c (nds32_compute_stack_frame,
19528 nds32_emit_stack_push_multiple, nds32_emit_stack_pop_multiple,
19529 nds32_emit_stack_v3push, nds32_emit_stack_v3pop,
19530 nds32_emit_adjust_frame, nds32_expand_prologue, nds32_expand_epilogue,
19531 nds32_expand_prologue_v3push, nds32_expand_epilogue_v3pop): Refine.
19532 * config/nds32/nds32.h (NDS32_FIRST_CALLEE_SAVE_GPR_REGNUM,
19533 NDS32_LAST_CALLEE_SAVE_GPR_REGNUM, NDS32_V3PUSH_AVAILABLE_P): New.
19534 * config/nds32/nds32.md (prologue, epilogue): Use macro
19535 NDS32_V3PUSH_AVAILABLE_P to do checking.
19537 2018-03-11 Jakub Jelinek <jakub@redhat.com>
19540 * dwarf2out.c (gen_enumeration_type_die): Don't guard adding
19541 DW_AT_declaration for ENUM_IS_OPAQUE on -gdwarf-4 or -gno-strict-dwarf,
19542 but on TYPE_SIZE. Don't do anything for ENUM_IS_OPAQUE if not creating
19543 a new die. Don't set TREE_ASM_WRITTEN if ENUM_IS_OPAQUE. Guard
19544 addition of most attributes on !orig_type_die or the attribute not
19545 being present already. Assert TYPE_VALUES is NULL for ENUM_IS_OPAQUE.
19547 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
19548 Chung-Ju Wu <jasonwucj@gmail.com>
19550 * config/nds32/nds32.c (nds32_cpu_cpp_builtins): Modify to define
19551 __NDS32_VH__ macro.
19552 * config/nds32/nds32.opt (mvh): New option.
19554 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
19555 Chung-Ju Wu <jasonwucj@gmail.com>
19557 * config/nds32/nds32-protos.h (nds32_cpu_cpp_builtins): Declare
19559 * config/nds32/nds32.c (nds32_cpu_cpp_builtins): New function.
19560 * config/nds32/nds32.h (TARGET_CPU_CPP_BUILTINS): Modify its
19563 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
19564 Chung-Ju Wu <jasonwucj@gmail.com>
19566 * config/nds32/nds32-memory-manipulation.c (nds32_expand_strlen): New
19568 * config/nds32/nds32-multiple.md (strlensi): New pattern.
19569 * config/nds32/nds32-protos.h (nds32_expand_strlen): Declare function.
19571 2018-03-11 Monk Chiang <sh.chiang04@gmail.com>
19572 Kito Cheng <kito.cheng@gmail.com>
19573 Chung-Ju Wu <jasonwucj@gmail.com>
19575 * config/nds32/constants.md (unspec_element): Add UNSPEC_FFB,
19576 UNSPEC_FFMISM and UNSPEC_FLMISM.
19577 * config/nds32/nds32-intrinsic.c (bdesc_2arg): Add builtin description
19578 for ffb, ffmism and flmism.
19579 * config/nds32/nds32-intrinsic.md (unspec_ffb): Define new pattern.
19580 (unspec_ffmism): Ditto.
19581 (unspec_flmism): Ditto.
19582 (nds32_expand_builtin_impl): Check if string extension is available.
19583 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FFB,
19584 NDS32_BUILTIN_FFMISM and NDS32_BUILTIN_FLMISM.
19586 2018-03-10 Vladimir Makarov <vmakarov@redhat.com>
19589 2018-03-09 Vladimir Makarov <vmakarov@redhat.com>
19592 * lra-assigns.c (assign_by_spills): Return a flag of reload
19593 assignment failure. Do not process the reload assignment
19594 failures. Do not spill other reload pseudos if they has the same
19596 (lra_assign): Add a return arg. Set up from the result of
19597 assign_by_spills call.
19598 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
19599 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
19600 usage_insns if it is not NULL.
19601 (spill_hard_reg_in_range): New function.
19602 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
19603 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
19604 function prototypes.
19605 (lra_assign): Change prototype.
19606 * lra.c (lra): Add code to deal with fails by splitting hard reg
19609 2018-03-10 H.J. Lu <hongjiu.lu@intel.com>
19612 * config/i386/i386.opt: Replace Enforcment with Enforcement.
19614 2018-03-10 Alexandre Oliva <aoliva@redhat.com>
19617 * dwarf2out.h (dw_val_class): Add dw_val_class_symview.
19618 (dw_val_node): Add val_symbolic_view.
19619 * dwarf2out.c (dw_line_info_table): Add symviews_since_reset.
19620 (symview_upper_bound): New.
19621 (new_line_info_table): Initialize symviews_since_reset.
19622 (dwarf2out_source_line): Count symviews_since_reset and set
19623 symview_upper_bound.
19624 (dw_val_equal_p): Handle symview.
19625 (add_AT_symview): New.
19626 (print_dw_val): Handle symview.
19627 (attr_checksum, attr_checksum_ordered): Likewise.
19628 (same_dw_val_p, size_of_die): Likewise.
19629 (value_format, output_die): Likewise.
19630 (add_high_low_attributes): Use add_AT_symview for entry_view.
19631 (dwarf2out_finish): Reset symview_upper_bound, clear
19634 2018-03-09 Peter Bergner <bergner@vnet.ibm.com>
19637 * config/rs6000/rs6000.c (rs6000_offsettable_memref_p): New prototype.
19638 Add strict argument and use it.
19639 (rs6000_split_multireg_move): Update for new strict argument.
19640 (mem_operand_gpr): Disallow all non-offsettable addresses.
19641 * config/rs6000/rs6000.md (*movdi_internal64): Use YZ constraint.
19643 2018-03-09 Jakub Jelinek <jakub@redhat.com>
19646 * config/rs6000/rs6000.c (rs6000_gimplify_va_arg): Mark va_arg_tmp
19647 temporary TREE_ADDRESSABLE before gimplification of BUILT_IN_MEMCPY.
19648 * config/powerpcspe/powerpcspe.c (rs6000_gimplify_va_arg): Likewise.
19651 * tree-inline.c (copy_tree_body_r): For INDIRECT_REF of a remapped
19652 decl, use remap_type if we want to use the type.
19654 2018-03-09 Martin Sebor <msebor@redhat.com>
19656 PR tree-optimization/84526
19657 * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
19659 (builtin_access::generic_overlap): Be prepared to handle non-array
19662 2018-03-09 Alexandre Oliva <aoliva@redhat.com>
19664 PR rtl-optimization/84682
19665 * lra-constraints.c (process_address_1): Check is_address flag
19666 for address constraints.
19667 (process_alt_operands): Likewise.
19668 * lra.c (lra_set_insn_recog_data): Pass asm operand locs to
19669 preprocess_constraints.
19670 * recog.h (preprocess_constraints): Add oploc parameter.
19672 * recog.c (preprocess_constraints): Test address_operand for
19673 CT_ADDRESS constraints.
19675 2018-03-09 Vladimir Makarov <vmakarov@redhat.com>
19678 * lra-assigns.c (assign_by_spills): Return a flag of reload
19679 assignment failure. Do not process the reload assignment
19680 failures. Do not spill other reload pseudos if they has the same
19682 (lra_assign): Add a return arg. Set up from the result of
19683 assign_by_spills call.
19684 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
19685 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
19686 usage_insns if it is not NULL.
19687 (spill_hard_reg_in_range): New function.
19688 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
19689 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
19690 function prototypes.
19691 (lra_assign): Change prototype.
19692 * lra.c (lra): Add code to deal with fails by splitting hard reg
19695 2018-03-09 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
19698 * common/config/arm/arm-common.c (arm_parse_arch_option_name):
19699 Accept complain bool parameter. Only emit errors if it is true.
19700 (arm_parse_cpu_option_name): Likewise.
19701 (arm_target_thumb_only): Adjust callers of the above.
19702 * config/arm/arm-protos.h (arm_parse_cpu_option_name): Adjust
19703 prototype to take a default true bool parameter.
19704 (arm_parse_arch_option_name): Likewise.
19706 2018-03-09 David Malcolm <dmalcolm@redhat.com>
19707 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
19711 * Makefile.in (LD_VERSION_SCRIPT_OPTION, LD_SONAME_OPTION): New.
19712 * configure: Regenerate.
19713 * configure.ac ("linker --version-script option"): New.
19714 ("linker soname option"): New.
19716 2018-03-09 Richard Biener <rguenther@suse.de>
19718 PR tree-optimization/84775
19719 * tree-if-conv.c (add_bb_predicate_gimplified_stmts): Delink
19720 immediate uses of predicate stmts and mark them modified.
19723 PR tree-optimization/84178
19724 * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
19726 (version_loop_for_if_conversion): Delay update_ssa call.
19727 (tree_if_conversion): Delay update_ssa until after predicate
19730 2018-03-09 Eric Botcazou <ebotcazou@adacore.com>
19733 * config/i386/winnt.c (i386_pe_seh_cold_init): Use small pre-allocation
19734 when the function accesses prior frames.
19736 2018-03-08 Jakub Jelinek <jakub@redhat.com>
19739 * dwarf2out.c (dw_loc_list): If list && loc_list->first->next, call
19740 gen_llsym, otherwise call maybe_gen_llsym.
19742 PR inline-asm/84742
19743 * recog.c (asm_operand_ok): Return 0 if multi-character constraint
19744 has ',' character inside of it.
19746 2018-03-08 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
19749 * config/aarch64/aarch64.md (*compare_cstore<mode>_insn): Mark pattern
19750 as clobbering CC_REGNUM.
19752 2018-03-08 Richard Biener <rguenther@suse.de>
19754 PR middle-end/84552
19755 * tree-scalar-evolution.c: Include tree-into-ssa.h.
19756 (follow_copies_to_constant): Do not follow SSA names registered
19759 2018-03-08 Richard Biener <rguenther@suse.de>
19761 PR tree-optimization/84178
19762 * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
19764 (version_loop_for_if_conversion): Delay update_ssa call.
19765 (tree_if_conversion): Delay update_ssa until after predicate
19768 2018-03-08 David Malcolm <dmalcolm@redhat.com>
19770 PR tree-optimization/84178
19771 * tree-if-conv.c (release_bb_predicate): Remove the
19772 the assertion that the stmts have NULL use_ops.
19773 Discard the statements, asserting that they haven't
19774 yet been added to a BB.
19776 2018-03-08 Richard Biener <rguenther@suse.de>
19778 PR tree-optimization/84746
19779 * tree-ssa-pre.c (find_leader_in_sets): Deal with SET1 being NULL.
19780 (phi_translate): Pass in destination ANTIC_OUT set.
19781 (phi_translate_1): Likewise. For a simplified result lookup
19782 a leader in ANTIC_OUT and AVAIL_OUT, not the ANTIC_IN sets.
19783 (phi_translate_set): Adjust.
19784 (do_pre_regular_insertion): Likewise.
19785 (do_pre_partial_partial_insertion): Likewise.
19787 2018-03-08 Martin Liska <mliska@suse.cz>
19789 PR gcov-profile/84735
19790 * doc/gcov.texi: Document usage of profile files.
19791 * gcov-io.h: Document changes in the format.
19793 2018-03-08 Alexandre Oliva <aoliva@redhat.com>
19797 * dwarf2out.c (struct dw_line_info_table): Update comments for
19799 (FORCE_RESET_NEXT_VIEW): New.
19800 (FORCE_RESETTING_VIEW_P): New.
19801 (RESETTING_VIEW_P): Check for -1 too.
19802 (ZERO_VIEW_P): Likewise.
19803 (new_line_info_table): Force-reset next view.
19804 (dwarf2out_begin_function): Likewise.
19805 (dwarf2out_source_line): Simplify zero_view_p initialization.
19806 Test FORCE_RESETTING_VIEW_P and RESETTING_VIEW_P instead of
19807 view directly. Omit view when omitting .loc at line 0.
19809 2018-03-08 Jakub Jelinek <jakub@redhat.com>
19811 PR tree-optimization/84740
19812 * tree-switch-conversion.c (process_switch): Call build_constructors
19813 only if info.phi_count is non-zero.
19815 PR tree-optimization/84739
19816 * tree-tailcall.c (find_tail_calls): Check call arguments against
19817 DECL_ARGUMENTS (current_function_decl) rather than
19818 DECL_ARGUMENTS (func) when checking for tail recursion.
19820 2018-03-07 Jakub Jelinek <jakub@redhat.com>
19822 * doc/contrib.texi: Add entries for Martin Liska, David Malcolm,
19823 Marek Polacek, extend Vladimir Makarov's, Jonathan Wakely's and
19824 Volker Reichelt's entry and add entries for people that perform
19825 GCC fuzzy testing and report numerous bugs.
19827 2018-03-07 Segher Boessenkool <segher@kernel.crashing.org>
19830 * config/rs6000/rs6000.c (rs6000_elf_in_small_data_p): Don't put
19831 readonly data in sdata, if that is disabled.
19832 * config/rs6000/sysv4.opt (mreadonly-in-sdata): New option.
19833 * doc/invoke.texi (RS/6000 and PowerPC Options): Document
19834 -mreadonly-in-sdata option.
19836 2018-03-07 Martin Sebor <msebor@redhat.com>
19838 PR tree-optimization/84468
19839 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Consider successor
19840 basic block when looking for nul assignment.
19842 2018-03-07 Eric Botcazou <ebotcazou@adacore.com>
19845 * except.h (output_function_exception_table): Adjust prototype.
19846 * except.c (output_function_exception_table): Remove FNNAME parameter
19847 and add SECTION parameter. Ouput one part of the table at a time.
19848 * final.c (final_scan_insn_1) <NOTE_INSN_SWITCH_TEXT_SECTIONS>: Output
19849 the first part of the exception table and emit unwind directives.
19850 * config/i386/i386-protos.h (i386_pe_end_cold_function): Declare.
19851 (i386_pe_seh_cold_init): Likewise.
19852 * config/i386/cygming.h (ASM_DECLARE_COLD_FUNCTION_NAME): New macro.
19853 (ASM_DECLARE_COLD_FUNCTION_SIZE): Likewise.
19854 * config/i386/i386.c (x86_expand_epilogue): Fix wording in comment.
19855 (ix86_output_call_insn): Emit a nop in one more case for SEH.
19856 * config/i386/winnt.c: Include except.h.
19857 (struct seh_frame_state): Add reg_offset, after_prologue and
19858 in_cold_section fields.
19859 (i386_pe_seh_end_prologue): Set seh->after_prologue.
19860 (i386_pe_seh_cold_init): New function.
19861 (i386_pe_seh_fini): Add COLD parameter and bail out if it is not equal
19862 to seh->in_cold_section.
19863 (seh_emit_push): Record the offset of the push.
19864 (seh_emit_save): Record the offet of the save.
19865 (i386_pe_seh_unwind_emit): Deal with NOTE_INSN_SWITCH_TEXT_SECTIONS.
19866 Test seh->after_prologue to disregard the epilogue.
19867 (i386_pe_end_function): Pass FALSE to i386_pe_seh_fini.
19868 (i386_pe_end_cold_function): New function.
19870 2018-03-07 Jakub Jelinek <jakub@redhat.com>
19873 * config/aarch64/predicates.md (aarch64_simd_reg_or_zero): Use
19874 aarch64_simd_or_scalar_imm_zero rather than aarch64_simd_imm_zero.
19877 * gimple-expr.c (create_tmp_var_raw): Set DECL_NAMELESS flag
19879 * tree-pretty-print.c (dump_decl_name): For TDF_COMPARE_DEBUG,
19880 don't print names of DECL_NAMELESS DECL_IGNORED_P decls.
19882 PR middle-end/84723
19883 * multiple_target.c: Include tree-inline.h and intl.h.
19884 (expand_target_clones): Diagnose and fail if node->definition and
19885 !tree_versionable_function_p (node->decl).
19887 2018-03-06 John David Anglin <danglin@gcc.gnu.org>
19889 * config/pa/pa.h (ASM_GENERATE_INTERNAL_LABEL): Revise to use
19891 (ASM_OUTPUT_ADDR_VEC_ELT): Revise for above change.
19892 (ASM_OUTPUT_ADDR_DIFF_ELT): Likewise.
19893 * config/pa/pa64-hpux.h (ASM_GENERATE_INTERNAL_LABEL): Revise as above.
19895 2018-03-06 Jakub Jelinek <jakub@redhat.com>
19898 * combine.c (try_combine): Use reg_or_subregno instead of handling
19899 just paradoxical SUBREGs and REGs.
19901 2018-03-06 Claudiu Zissulescu <claziss@synopsys.com>
19903 * config/arc/arc.c (arc_finalize_pic): Remove function.
19904 (arc_must_save_register): We use single base PIC register, remove
19905 checks to save/restore the PIC register.
19906 (arc_expand_prologue): Likewise.
19907 * config/arc/arc-protos.h (arc_set_default_type_attributes):
19909 (arc_verify_short): Likewise.
19910 (arc_attr_type): Likewise.
19911 * config/arc/arc.c (arc_set_default_type_attributes): Remove.
19912 (walk_stores): Likewise.
19913 (arc_address_cost): Make it static.
19914 (arc_verify_short): Likewise.
19915 (branch_dest): Likewise.
19916 (arc_attr_type): Likewise.
19917 * config/arc/arc.c (TARGET_ADJUST_INSN_LENGTH): Remove.
19918 (TARGET_INSN_LENGTH_PARAMETERS): Likewise.
19919 (arc_final_prescan_insn): Remove inserting the nops due to
19920 hardware hazards. It is done in reorg step.
19921 (insn_length_variant_t): Remove.
19922 (insn_length_parameters_t): Likewise.
19923 (arc_insn_length_parameters): Likewise.
19924 (arc_get_insn_variants): Likewise.
19925 * config/arc/arc.h (TARGET_UPSIZE_DBR): Remove.
19927 2018-03-06 Jakub Jelinek <jakub@redhat.com>
19929 PR inline-asm/84683
19930 * reg-stack.c (move_for_stack_reg): If any_malformed_asm, avoid
19933 PR tree-optimization/84687
19934 * omp-simd-clone.c (simd_clone_create): Clear DECL_BUILT_IN_CLASS
19936 * match.pd (pow(C,x)*expN(y) -> expN(logN(C)*x+y)): New optimization.
19938 2018-03-05 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
19940 * config/rs6000/rs6000-builtin.def (rs6000_speculation_barrier):
19941 Rename to ppc_speculation_barrier.
19942 * config/rs6000/rs6000.c (rs6000_init_builtins): Rename builtin to
19943 __builtin_ppc_speculation_barrier.
19945 2018-03-05 Jakub Jelinek <jakub@redhat.com>
19948 * combine.c (combine_simplify_rtx): Don't try to simplify if
19949 if_then_else_cond returned non-NULL, but either true_rtx or false_rtx
19952 2018-03-05 Segher Boessenkool <segher@kernel.crashing.org>
19954 * config/rs6000/rs6000.c (rs6000_loop_align): Don't align tiny loops
19955 to 32 bytes when compiling for POWER9.
19957 2018-03-05 Jakub Jelinek <jakub@redhat.com>
19960 * config/i386/i386.c (ix86_function_ok_for_sibcall): Check for
19961 regparm >= 3 with no arg reg available also for calls with
19962 flag_force_indirect_call. Pass decl to ix86_function_regparm.
19965 * config/i386/sse.md (*<code><mode>3): Replace <mask_prefix3> with
19967 (*<plusminus_insn><mode>3): Likewise. Remove <mask_operand3> uses.
19969 2018-03-05 Peter Bergner <bergner@vnet.ibm.com>
19972 * config/rs6000/vector.md (mov<mode>): Disallow altivec memory operands.
19974 2018-03-05 Richard Biener <rguenther@suse.de>
19976 PR tree-optimization/84486
19977 * tree-ssa-pre.c (create_expression_by_pieces): Remove dead code.
19978 When inserting a __builtin_assume_aligned call set the LHS
19979 SSA name alignment info accordingly.
19981 2018-03-05 Wilco Dijkstra <wdijkstr@arm.com>
19983 PR tree-optimization/84114
19984 * config/aarch64/aarch64.c (aarch64_reassociation_width)
19985 Avoid reassociation of FLOAT_MODE addition.
19987 2018-03-05 Olga Makhotina <olga.makhotina@intel.com>
19989 * common/config/i386/i386-common.c (OPTION_MASK_ISA_PCONFIG_SET,
19990 OPTION_MASK_ISA_PCONFIG_UNSET, OPTION_MASK_ISA_WBNOINVD_SET,
19991 OPTION_MASK_ISA_WBNOINVD_UNSET): New definitions.
19992 (ix86_handle_option): Handle -mpconfig and -mwbnoinvd.
19993 * config.gcc (pconfigintrin.h, wbnoinvdintrin.h) : Add headers.
19994 * config/i386/cpuid.h (bit_PCONFIG, bit_WBNOINVD): New.
19995 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mpconfig
19997 * config/i386/i386-builtin.def (__builtin_ia32_wbnoinvd,
19998 __builtin_ia32_wbinvd): New builtins.
19999 (SPECIAL_ARGS2): New.
20000 * config/i386/i386-c.c (__WBNOINVD__, __PCONFIG__): New.
20001 (SPECIAL_ARGS2): New.
20002 * config/i386/i386.c (ix86_target_string): Add -mpconfig and -mwbnoinvd.
20003 (ix86_valid_target_attribute_inner_p): Ditto.
20004 (ix86_init_mmx_sse_builtins): Add special_args2.
20005 * config/i386/i386.h (TARGET_PCONFIG, TARGET_PCONFIG_P, TARGET_WBNOINVD,
20006 TARGET_WBNOINVD_P): New.
20007 * config/i386/i386.md (UNSPECV_WBINVD, UNSPECV_WBNOINVD): New.
20008 (define_insn "wbinvd", define_insn "wbnoinvd"): New.
20009 * config/i386/i386.opt: Add -mpconfig and -mwbnoinvd.
20010 * config/i386/immintrin.h (_wbinvd): New intrinsic.
20011 * config/i386/pconfigintrin.h: New file.
20012 * config/i386/wbnoinvdintrin.h: Ditto.
20013 * config/i386/x86intrin.h: Add headers pconfigintrin.h and
20015 * doc/invoke.texi (-mpconfig, -mwbnoinvd): New.
20017 2018-03-05 Richard Biener <rguenther@suse.de>
20019 PR tree-optimization/84670
20020 * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
20022 (BB_VISITED_WITH_VISITED_SUCCS): New define.
20023 (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
20024 (compute_antic_aux): Only assert the number of values in ANTIC_IN
20025 doesn't grow if all successors (recursively) were visited at least
20028 2018-03-05 Richard Biener <rguenther@suse.de>
20030 PR tree-optimization/84650
20031 * tree-ssa-loop-im.c (pass_lim::execute): Reset the SCEV cache
20032 if executed in the loop pipeline.
20034 2018-03-05 Sandra Loosemore <sandra@codesourcery.com>
20036 * doc/configfiles.texi (Configuration Files): Move info about
20037 conditionalizing $target-protos.h to...
20038 * doc/sourcebuild.texi (Back End): Here. Explain how $target.h
20039 differs from $target-protos.h.
20041 2018-03-05 Kito Cheng <kito.cheng@gmail.com>
20042 Chung-Ju Wu <jasonwucj@gmail.com>
20044 * config/nds32/nds32-protos.h (nds32_expand_setmem): Declare.
20045 * config/nds32/nds32-multiple.md (setmemsi): Define.
20046 * config/nds32/nds32-memory-manipulation.c
20047 (nds32_gen_dup_4_byte_to_word_value): New.
20048 (emit_setmem_word_loop): New.
20049 (emit_setmem_byte_loop): New.
20050 (nds32_expand_setmem_loop): New.
20051 (nds32_expand_setmem_loop_v3m): New.
20052 (nds32_expand_setmem_unroll): New.
20053 (nds32_expand_setmem): New.
20055 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
20056 Chung-Ju Wu <jasonwucj@gmail.com>
20058 * config/nds32/nds32-memory-manipulation.c
20059 (nds32_emit_load_store): New.
20060 (nds32_emit_post_inc_load_store): New.
20061 (nds32_emit_mem_move): New.
20062 (nds32_emit_mem_move_block): New.
20063 (nds32_expand_movmemsi_loop_unknown_size): New.
20064 (nds32_expand_movmemsi_loop_known_size): New.
20065 (nds32_expand_movmemsi_loop): New.
20066 (nds32_expand_movmemsi_unroll): New.
20067 (nds32_expand_movmemqi): Rename ...
20068 (nds32_expand_movmemsi): ... to this.
20069 * config/nds32/nds32-multiple.md (movmemqi): Rename ...
20070 (movmemsi): ... to this.
20071 * config/nds32/nds32-protos.h (nds32_expand_movmemqi): Rename ...
20072 (nds32_expand_movmemsi): ... to this.
20074 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
20075 Monk Chiang <sh.chiang04@gmail.com>
20076 Chung-Ju Wu <jasonwucj@gmail.com>
20078 * config/nds32/nds32-protos.h
20079 (nds32_expand_load_multiple): New arguments.
20080 (nds32_expand_store_multiple): Ditto.
20081 (nds32_valid_multiple_load_store): Rename ...
20082 (nds32_valid_multiple_load_store_p): ... to this.
20083 * config/nds32/nds32-memory-manipulation.c
20084 (nds32_expand_load_multiple): Refine implementation.
20085 (nds32_expand_store_multiple): Ditto.
20086 * config/nds32/nds32-multiple.md
20087 (load_multiple): Update nds32_expand_load_multiple interface.
20088 (store_multiple): Update nds32_expand_store_multiple interface.
20089 * config/nds32/nds32-predicates.c
20090 (nds32_valid_multiple_load_store): Rename ...
20091 (nds32_valid_multiple_load_store_p): ... to this and refine
20093 * config/nds32/predicates.md
20094 (nds32_load_multiple_and_update_address_operation): New predicate.
20095 (nds32_store_multiple_and_update_address_operation): New predicate.
20097 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
20098 Chung-Ju Wu <jasonwucj@gmail.com>
20100 * config/nds32/nds32.md (type): Add load_multiple and store_multiple.
20101 (combo): New attribute.
20102 * config/nds32/nds32-multiple.md: Refine patterns with new attributes.
20104 2018-03-03 Chung-Ju Wu <jasonwucj@gmail.com>
20106 * config/nds32/nds32.opt: Change -mcmodel= default value.
20108 2018-03-03 Kito Cheng <kito.cheng@gmail.com>
20109 Monk Chiang <sh.chiang04@gmail.com>
20110 Chung-Ju Wu <jasonwucj@gmail.com>
20112 * config/nds32/constants.md (unspec_element): New enum.
20113 * config/nds32/constraints.md (Umw): New constraint.
20114 * config/nds32/nds32-intrinsic.c: Add more builtin functions.
20115 * config/nds32/nds32-intrinsic.md: Likewise.
20116 * config/nds32/nds32-md-auxiliary.c (nds32_regno_to_enable4): New.
20117 (nds32_valid_smw_lwm_base_p): New.
20118 (nds32_output_smw_single_word): New.
20119 (nds32_output_lmw_single_word): New.
20120 (nds32_expand_unaligned_load): New.
20121 (nds32_expand_unaligned_store): New.
20122 * config/nds32/nds32-protos.h (nds32_valid_smw_lwm_base_p): Declare.
20123 (nds32_output_smw_single_word): Declare.
20124 (nds32_output_lmw_single_word): Declare.
20125 (nds32_expand_unaligned_load): Declare.
20126 (nds32_expand_unaligned_store): Declare.
20127 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_UALOAD_HW,
20128 NDS32_BUILTIN_UALOAD_W, NDS32_BUILTIN_UALOAD_DW,
20129 NDS32_BUILTIN_UASTORE_HW, NDS32_BUILTIN_UASTORE_W,
20130 NDS32_BUILTIN_UASTORE_DW.
20131 * config/nds32/predicates.md (nds32_lmw_smw_base_operand): New
20134 2018-03-03 Monk Chiang <sh.chiang04@gmail.com>
20135 Kito Cheng <kito.cheng@gmail.com>
20136 Chung-Ju Wu <jasonwucj@gmail.com>
20138 * config/nds32/nds32-intrinsic.c
20139 (nds32_expand_builtin_null_ftype_reg): Delete.
20140 (nds32_expand_builtin_reg_ftype_imm): Ditto.
20141 (nds32_expand_builtin_null_ftype_reg_imm): Ditto.
20142 (nds32_read_argument): New.
20143 (nds32_legitimize_target): Ditto.
20144 (nds32_legitimize_argument): Ditto.
20145 (nds32_check_constant_argument): Ditto.
20146 (nds32_expand_unop_builtin): Ditto.
20147 (nds32_expand_unopimm_builtin): Ditto.
20148 (nds32_expand_binop_builtin): Ditto.
20149 (nds32_builtin_decl_impl): Ditto.
20150 (builtin_description): Ditto.
20151 (nds32_expand_builtin_impl): Rewrite with new infrastructure.
20152 (nds32_init_builtins_impl): Ditto.
20153 * config/nds32/nds32.c (TARGET_BUILTIN_DECL): Define.
20154 (nds32_builtin_decl): New.
20155 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_COUNT.
20156 * config/nds32/nds32-protos.h (nds32_builtin_decl_impl): Declare.
20158 2018-03-02 Jeff Law <law@redhat.com>
20160 * reorg.c (stop_search_p): Handle DEBUG_INSN.
20161 (redundant_insn, fill_simple_delay_slots): Likewise.
20162 (fill_slots_from_thread): Likewise.
20163 * resource.c (mark_referenced_resources): Likewise.
20164 (mark_set_resources, find_dead_or_set_registers): Likewise.
20166 2018-03-02 Jakub Jelinek <jakub@redhat.com>
20168 * substring-locations.h (format_warning_va): Formatting fix for
20169 ATTRIBUTE_GCC_DIAG.
20170 (format_warning_at_substring): Fix up ATTRIBUTE_GCC_DIAG second
20172 (format_warning_n_va, format_warning_at_substring_n): New prototypes.
20173 * substring-locations.c: Include intl.h.
20174 (format_warning_va): Turned into small wrapper around
20175 format_warning_n_va, renamed to ...
20176 (format_warning_n_va): ... this, add N and PLURAL_GMSGID arguments,
20177 rename GMSGID to SINGULAR_GMSGID, if SINGULAR_GMSGID != PLURAL_GMSGID,
20179 (format_warning_at_substring_n): New function.
20180 * gimple-ssa-sprintf.c: Remove GCC diagnostic ignored pragma.
20181 (fmtwarn): Add ATTRIBUTE_GCC_DIAG. Turn into a copy of
20182 format_warning_at_substring with just a shorter name instead of
20183 const function pointer.
20184 (fmtwarn_n): New function.
20185 (maybe_warn, format_directive, parse_directive): Use fmtwarn_n where
20186 appropriate, get rid of all the fmtstr temporaries, move conditionals
20187 with G_() wrapped string literals directly into fmtwarn arguments,
20188 cast dir.len to (int), formatting fixes.
20190 2018-03-02 Thomas Schwinge <thomas@codesourcery.com>
20192 * doc/invoke.texi: Remove "Cilk Plus" references.
20194 2018-03-02 Jakub Jelinek <jakub@redhat.com>
20195 Richard Biener <rguenther@suse.de>
20198 * expr.c (expand_expr_real_1) <case CALL_EXPR>: Don't emit diagnostics
20199 for error or warning attributes if CALL_FROM_THUNK_P is set.
20202 2018-03-02 Jakub Jelinek <jakub@redhat.com>
20205 * config/pa/pa.h (TARGET_CPU_CPP_BUILTINS): Predefine
20206 __SIZEOF_128__ macro if HPUX_LONG_DOUBLE_LIBRARY.
20209 * config/ia64/ia64.h (TARGET_CPU_CPP_BUILTINS): Predefine
20210 __SIZEOF_{FPREG,FLOAT{80,128}}__ macros.
20212 * predict.c (test_prediction_value_range): Use PROB_UNINITIALIZED
20213 instead of -1U in last predictors element's probability member.
20215 2018-03-02 Eric Botcazou <ebotcazou@adacore.com>
20218 * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
20219 arguments if they are comparable.
20221 2018-03-02 Richard Sandiford <richard.sandiford@linaro.org>
20223 PR tree-optimization/84634
20224 * tree-vect-stmts.c (vectorizable_store, vectorizable_load): Replace
20225 masks and masked_loop_p with a single loop_masks, making sure it's
20226 null for bb vectorization.
20228 2018-03-02 Richard Sandiford <richard.sandiford@linaro.org>
20230 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
20231 (vect_analyze_data_ref_access): Use loop->safe_len rather than
20232 loop->force_vectorize to check whether there is no alias.
20234 2018-03-02 Jakub Jelinek <jakub@redhat.com>
20237 * rtl.h (prev_real_nondebug_insn, next_real_nondebug_insn): New
20239 * emit-rtl.c (next_real_insn, prev_real_insn): Fix up function
20241 (next_real_nondebug_insn, prev_real_nondebug_insn): New functions.
20242 * cfgcleanup.c (try_head_merge_bb): Use prev_real_nondebug_insn
20243 instead of a loop around prev_real_insn.
20244 * combine.c (move_deaths): Use prev_real_nondebug_insn instead of
20247 PR inline-asm/84625
20248 * config/i386/i386.c (ix86_print_operand): Use conditional
20249 output_operand_lossage instead of gcc_assert if CONST_VECTOR is not
20252 2018-03-02 Richard Biener <rguenther@suse.de>
20254 PR tree-optimization/84427
20255 * tree-ssa-pre.c (bitmap_remove_expr_from_set): Remove.
20256 (bitmap_set_subtract_values): Rewrite to handle multiple
20259 (prune_clobbered_mems): Likewise.
20260 (phi_translate): Take edge instead of pred/phiblock.
20261 (phi_translate_1): Likewise.
20262 (phi_translate_set): Likewise. Insert all translated
20263 exprs for a value into the set, keeping possibly multiple
20264 expressions per value.
20265 (compute_antic_aux): Adjust for phi_translate changes.
20266 When intersecting union the expressions and prune those
20267 not in the final value set, keeping possibly multiple
20268 expressions per value. Do not use value-insertion
20269 for unioning ANTIC_OUT U EXP_GEN - TMP_GEN but merge
20270 all expressions. Add verification that the value-sets
20271 only shrink during iteration.
20272 (compute_partial_antic_aux): Adjust for the phi_translate changes.
20273 (do_pre_regular_insertion): Likewise.
20274 (do_pre_partial_partial_insertion): Likewise.
20276 2018-03-02 Richard Biener <rguenther@suse.de>
20279 * config/darwin.c (saved_debug_info_level): New static global.
20280 (darwin_asm_lto_start): Disable debug info generation for LTO out.
20281 (darwin_asm_lto_end): Restore debug info generation settings.
20283 2018-03-01 Martin Liska <mliska@suse.cz>
20286 * sanopt.c (sanitize_rewrite_addressable_params): Do not handle
20287 volatile arguments.
20289 2018-03-01 Richard Biener <rguenther@suse.de>
20292 * dwarf2out.c (gen_variable_die): Properly handle late VLA
20293 type annotation with LTO when debug was disabled at compile-time.
20295 2018-03-01 Matthew Fortune <mfortune@gmail.com>
20297 * config/mips/mips.c (mips_final_prescan_insn): Fix incorrect
20299 (mips_final_postscan_insn): Likewise.
20301 2018-03-01 Richard Sandiford <richard.sandiford@linaro.org>
20303 PR rtl-optimization/84528
20304 * alias.c (init_alias_target): Add commentary.
20305 (init_alias_analysis): Only give HARD_FRAME_POINTER_REGNUM
20306 a unique base value if the frame pointer is not eliminated
20307 to the stack pointer.
20309 2018-03-01 Tom de Vries <tom@codesourcery.com>
20311 PR rtl-optimization/83327
20312 * lra-int.h (hard_regs_spilled_into): Declare.
20313 * lra.c (hard_regs_spilled_into): Define.
20314 (init_reg_info): Init hard_regs_spilled_into.
20315 * lra-spills.c (assign_spill_hard_regs): Update hard_regs_spilled_into.
20316 * lra-lives.c (make_hard_regno_born, make_hard_regno_dead)
20317 (process_bb_lives): Handle hard_regs_spilled_into.
20318 (lra_create_live_ranges_1): Before doing liveness propagation, clear
20319 regs in all_hard_regs_bitmap if set in hard_regs_spilled_into.
20321 2018-02-28 David Edelsohn <dje.gcc@gmail.com>
20323 * config.gcc (powerpc-ibm-aix7.1.*): New stanza.
20324 (powerpc-ibm-aix[789]*): Default to AIX 7.2.
20325 * config/rs6000/aix71.h (TARGET_DEFAULT): Revert to Power4 ISA.
20326 * config/rs6000/aix72.h: New file.
20328 2018-02-28 Jakub Jelinek <jakub@redhat.com>
20330 * gimple-ssa-warn-restrict.c (maybe_diag_overlap): Use warning_n
20331 instead of warning_at with conditional singular and plural messages
20335 * stor-layout.c (update_alignment_for_field): For
20336 targetm.ms_bitfield_layout_p (rli->t), if !is_bitfield
20337 && !DECL_PACKED (field), do the alignment update, just use
20338 only desired_align instead of MAX (type_align, desired_align)
20340 (place_field): Don't do known_align < desired_align handling
20341 early if targetm.ms_bitfield_layout_p (rli->t) and rli->prev_field
20342 is non-NULL, instead do it after rli->prev_field handling and
20343 only if not within a bitfield word. For DECL_PACKED (field)
20344 use type_align of BITS_PER_UNIT.
20346 2018-02-28 Eric Botcazou <ebotcazou@adacore.com>
20348 * config/aarch64/aarch64.c (aarch64_emit_probe_stack_range): Remove
20349 superfluous parentheses and trailing spaces.
20351 2018-02-28 Richard Biener <rguenther@suse.de>
20353 PR tree-optimization/84584
20354 * graphite-scop-detection.c (scop_detection::add_scop): Discard
20355 SCoPs with fake exit edge.
20357 2018-02-28 Martin Liska <mliska@suse.cz>
20360 * timevar.c (timer::print): Fix format to properly print 100%
20363 2018-02-28 Richard Biener <rguenther@suse.de>
20365 PR middle-end/84607
20366 * genmatch.c (capture_info::walk_match): Do not mark
20367 captured expressions without operands as expr_p given
20368 they act more like predicates and should be subject to
20369 "lost tail" side-effect preserving.
20371 2018-02-28 Alexandre Oliva <aoliva@redhat.com>
20373 PR rtl-optimization/81611
20374 * auto-inc-dec.c (attempt_change): Move dead note from
20375 mem_insn if it's the next use of regno
20376 (find_address): Take address use of reg holding
20377 non-incremented value. Add parm to limit search to the named
20379 (merge_in_block): Attempt to use a mem insn that is the next
20380 use of the original regno.
20382 2018-02-27 Martin Sebor <msebor@redhat.com>
20385 * doc/invoke.texi (-Wmissing-attributes): New option.
20386 * print-tree.c (print_node): Handle DECL_UNINLINABLE.
20388 2018-02-27 Martin Sebor <msebor@redhat.com>
20390 PR translation/84207
20391 * diagnostic-core.h (warning_n, error_n, inform_n): Change
20392 n argument to unsigned HOST_WIDE_INT.
20393 * diagnostic.c (warning_n, error_n, inform_n): Ditto.
20394 (diagnostic_n_impl): Ditto. Handle arguments in excess of LONG_MAX.
20395 * gimple-ssa-sprintf.c (format_directive): Simplify inform_n call.
20396 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Use warning_n.
20398 2018-02-27 Richard Biener <rguenther@suse.de>
20400 PR tree-optimization/84512
20401 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost):
20402 Do not use the estimate returned from record_stmt_cost for
20403 the scalar iteration cost but sum properly using add_stmt_cost.
20405 2018-02-27 Richard Biener <rguenther@suse.de>
20407 PR tree-optimization/84466
20408 * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
20409 Adjust last change to less strictly validate use operands.
20411 2018-02-27 Martin Liska <mliska@suse.cz>
20413 PR gcov-profile/84548
20414 * gcov.c (process_file): Allow partial overlap and consider it
20415 also as group functions.
20416 (output_lines): Properly calculate range of lines for a group.
20418 2018-02-27 Martin Liska <mliska@suse.cz>
20420 * timevar.c (timer::print_row): Remove 'usr', 'sys', 'wall' and
20421 'ggc' suffixes. Change first column width.
20422 (timer::print): Fix formatting of the column.
20424 2018-02-27 Alexandre Oliva <aoliva@redhat.com>
20426 * tree-ssa-live.c (remove_unused_scope_block_p): Do not
20427 preserve inline entry blocks for the sake of debug inline
20428 entry point markers alone.
20429 (remove_unused_locals): Suggest in comments a better place to
20430 force the preservation of inline entry blocks that are
20431 otherwise unused, but do not preserve them.
20433 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
20435 * config/i386/i386.c (ix86_output_indirect_jmp): Update comments.
20437 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
20440 * config/i386/constraints.md (Bs): Replace
20441 ix86_indirect_branch_register with
20442 TARGET_INDIRECT_BRANCH_REGISTER.
20444 * config/i386/i386.md (indirect_jump): Likewise.
20445 (tablejump): Likewise.
20446 (*sibcall_memory): Likewise.
20447 (*sibcall_value_memory): Likewise.
20448 Peepholes of indirect call and jump via memory: Likewise.
20449 (*sibcall_GOT_32): Disallowed for TARGET_INDIRECT_BRANCH_REGISTER.
20450 (*sibcall_value_GOT_32): Likewise.
20451 * config/i386/predicates.md (indirect_branch_operand): Likewise.
20452 (GOT_memory_operand): Likewise.
20453 (call_insn_operand): Likewise.
20454 (sibcall_insn_operand): Likewise.
20455 (GOT32_symbol_operand): Likewise.
20456 * config/i386/i386.h (TARGET_INDIRECT_BRANCH_REGISTER): New.
20458 2018-02-26 Eric Botcazou <ebotcazou@adacore.com>
20460 PR rtl-optimization/83496
20461 * reorg.c (steal_delay_list_from_target): Change REDUNDANT array from
20462 booleans to RTXes. Call fix_reg_dead_note on every non-null element.
20463 (steal_delay_list_from_fallthrough): Call fix_reg_dead_note on a
20464 redundant insn, if any.
20465 (relax_delay_slots): Likewise.
20466 (update_reg_unused_notes): Rename REDUNDANT_INSN to OTHER_INSN.
20468 2018-02-26 Richard Sandiford <richard.sandiford@linaro.org>
20470 PR tree-optimization/83965
20471 * tree-vect-patterns.c (vect_reassociating_reduction_p): Assume
20472 that grouped statements are part of a reduction chain. Return
20473 true if the statement is not marked as a reduction itself but
20474 is part of a group.
20475 (vect_recog_dot_prod_pattern): Don't check whether the statement
20476 is part of a group here.
20477 (vect_recog_sad_pattern): Likewise.
20478 (vect_recog_widen_sum_pattern): Likewise.
20480 2018-02-26 Eric Botcazou <ebotcazou@adacore.com>
20483 * final.c (rest_of_clean_state): Also look for calls inside sequences.
20485 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
20488 * config/i386/i386-protos.h (ix86_output_indirect_jmp): Remove
20490 (ix86_output_indirect_function_return): New prototype.
20491 (ix86_split_simple_return_pop_internal): Likewise.
20492 * config/i386/i386.c (indirect_return_via_cx): New.
20493 (indirect_return_via_cx_bnd): Likewise.
20494 (indirect_thunk_name): Handle return va CX_REG.
20495 (output_indirect_thunk_function): Create alias for
20496 __x86_return_thunk_[re]cx and __x86_return_thunk_[re]cx_bnd.
20497 (ix86_output_indirect_jmp): Remove the bool argument.
20498 (ix86_output_indirect_function_return): New function.
20499 (ix86_split_simple_return_pop_internal): Likewise.
20500 * config/i386/i386.md (*indirect_jump): Don't pass false
20501 to ix86_output_indirect_jmp.
20502 (*tablejump_1): Likewise.
20503 (simple_return_pop_internal): Change it to define_insn_and_split.
20504 Call ix86_split_simple_return_pop_internal to split it for
20505 -mfunction-return=.
20506 (simple_return_indirect_internal): Call
20507 ix86_output_indirect_function_return instead of
20508 ix86_output_indirect_jmp.
20510 2018-02-26 Jakub Jelinek <jakub@redhat.com>
20513 * vec.h (vec_default_construct): For BROKEN_VALUE_INITIALIZATION use
20514 memset and value initialization afterwards.
20516 2018-02-26 Christophe Lyon <christophe.lyon@linaro.org>
20518 * Makefile.in (lto-wrapper): Use ALL_LINKERFLAGS.
20520 2018-02-26 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
20523 * common/config/aarch64/aarch64-common.c
20524 (aarch_option_optimization_table[]): Switch
20525 off fomit-frame-pointer
20527 2018-02-26 Kito Cheng <kito.cheng@gmail.com>
20528 Chung-Ju Wu <jasonwucj@gmail.com>
20530 * config/nds32/nds32-multiple.md (load_multiple): Disallow
20532 (store_multiple): Ditto.
20534 2018-02-26 Kito Cheng <kito.cheng@gmail.com>
20536 * config.gcc: Add --with-cpu support for nds32 target.
20537 * config/nds32/nds32-opts.h (nds32_cpu_type): New.
20538 * config/nds32/nds32.opt: Add -mcpu= option.
20540 2018-02-25 Segher Boessenkool <segher@kernel.crashing.org>
20542 * config/rs6000/rs6000.opt (mvrsave=no, mvrsave=yes, isel=no,
20543 isel=yes): Warn for these deprecated options.
20545 2018-02-23 David Edelsohn <dje.gcc@gmail.com>
20547 * config/rs6000/aix71.h (TARGET_DEFAULT): Change to
20548 ISA_2_5_MASKS_EMBEDDED.
20550 2018-02-23 Jakub Jelinek <jakub@redhat.com>
20552 * ipa-prop.c (ipa_vr_ggc_hash_traits::hash): Hash p->min and
20553 p->max as pointers rather than using iterative_hash_expr.
20555 2018-02-23 Carl Love <cel@us.ibm.com>
20557 * config/rs6000/rs6000-builtin.def: Change VSIGNED2 and VUNSIGNED2
20558 macro expansions from BU_VSX_2 to BU_P8V_VSX_2 and BU_VSX_OVERLOAD_2 to
20560 * config/rs6000/rs6000-c.c: Change VSX_BUILTIN_VEC_VSIGNED2 to
20561 P8V_BUILTIN_VEC_VSIGNED2. Change VSX_BUILTIN_VEC_VUNSIGNED2 to
20562 P8V_BUILTIN_VEC_VUNSIGNED2.
20564 2018-02-22 Vladimir Makarov <vmakarov@redhat.com>
20567 * lra-int.h (LRA_UNKNOWN_ALT, LRA_NON_CLOBBERED_ALT): New macros.
20568 * lra.c (lra_set_insn_recog_data, lra_update_insn_recog_data): Use
20570 * lra-constraints.c (curr_insn_transform): Set up
20571 LRA_NON_CLOBBERED_ALT for moves processed on the fast path. Use
20573 (remove_inheritance_pseudos): Use LRA_UNKNOWN_ALT.
20574 * lra-eliminations.c (spill_pseudos): Ditto.
20575 (process_insn_for_elimination): Ditto.
20576 * lra-lives.c (reg_early_clobber_p): Use the new macros.
20577 * lra-spills.c (spill_pseudos): Use LRA_UNKNOWN_ALT and
20578 LRA_NON_CLOBBERED_ALT.
20580 2018-02-22 Martin Sebor <msebor@redhat.com>
20582 PR tree-optimization/84480
20583 * gimple-fold.c (gimple_fold_builtin_strcpy): Move warnings
20584 to maybe_diag_stxncpy_trunc. Call it.
20585 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Integrate warnings
20586 from gimple_fold_builtin_strcpy. Print inlining stack.
20587 (handle_builtin_stxncpy): Print inlining stack.
20588 * tree-ssa-strlen.h (maybe_diag_stxncpy_trunc): Declare.
20590 2018-02-22 H.J. Lu <hongjiu.lu@intel.com>
20593 * config/i386/i386.c (ix86_set_indirect_branch_type): Issue an
20594 error when -mindirect-branch=thunk-extern, -fcf-protection=branch
20595 and -fcheck-pointer-bounds are used together.
20596 (indirect_thunk_prefix): New enum.
20597 (indirect_thunk_need_prefix): New function.
20598 (indirect_thunk_name): Replace need_bnd_p with need_prefix. Use
20599 "_nt" instead of "_bnd" for NOTRACK prefix.
20600 (output_indirect_thunk): Replace need_bnd_p with need_prefix.
20601 (output_indirect_thunk_function): Likewise.
20603 (ix86_code_end): Update output_indirect_thunk_function calls.
20604 (ix86_output_indirect_branch_via_reg): Replace
20605 ix86_bnd_prefixed_insn_p with indirect_thunk_need_prefix.
20606 (ix86_output_indirect_branch_via_push): Likewise.
20607 (ix86_output_function_return): Likewise.
20608 * doc/invoke.texi: Document -mindirect-branch=thunk-extern is
20609 incompatible with -fcf-protection=branch and
20610 -fcheck-pointer-bounds.
20612 2018-02-22 Steve Ellcey <sellcey@cavium.com>
20615 * config/aarch64/aarch64.c (aarch64_print_address_internal):
20616 Change gcc_assert call to output_operand_lossage.
20618 2018-02-22 Steve Ellcey <sellcey@cavium.com>
20620 * doc/extend.texi (__builtin_extend_pointer): Document builtin.
20622 2018-02-22 DJ Delorie <dj@redhat.com>
20623 Sebastian Perta <sebastian.perta@renesas.com>
20624 Oleg Endo <olegendo@gcc.gnu.org>
20626 * config/rx/rx.c (rx_rtx_costs): New function.
20627 (TARGET_RTX_COSTS): Override to use rx_rtx_costs.
20629 2018-02-22 Thomas Preud'homme <thomas.preudhomme@arm.com>
20631 * config/arm/t-multilib: Map Armv8-R to Armv7 multilibs.
20633 2018-02-22 Martin Liska <mliska@suse.cz>
20636 * common/config/arm/arm-common.c (arm_print_hint_for_cpu_option):
20637 Add "native" as a possible value.
20639 2018-02-22 Martin Liska <mliska@suse.cz>
20642 * config/i386/i386.c (ix86_option_override_internal):
20643 Add "native" as a possible value for -march and -mtune.
20645 2018-02-22 Jakub Jelinek <jakub@redhat.com>
20648 * stor-layout.c (finalize_type_size): Propagate TYPE_EMPTY_P flag
20649 to all type variants.
20651 PR tree-optimization/84503
20652 * gimple-ssa-store-merging.c (merged_store_group::merge_into): Compute
20653 width as info->bitpos + info->bitsize - start.
20654 (merged_store_group::merge_overlapping): Simplify width computation.
20655 (check_no_overlap): New function.
20656 (imm_store_chain_info::try_coalesce_bswap): Compute expected
20657 start + width and last_order of the group, fail if check_no_overlap
20659 (imm_store_chain_info::coalesce_immediate_stores): Don't merge info
20660 to group if check_no_overlap fails.
20662 2018-02-21 Segher Boessenkool <segher@kernel.crashing.org>
20664 * config/rs6000/altivec.md: Delete contraint arguments to
20665 define_expand, define_split, and define_peephole2, and in
20666 define_insn_and_split if always unused.
20667 * config/rs6000/darwin.md: Ditto.
20668 * config/rs6000/dfp.md: Ditto.
20669 * config/rs6000/rs6000.md: Ditto.
20670 * config/rs6000/sync.md: Ditto.
20671 * config/rs6000/vector.md: Ditto.
20672 * config/rs6000/vsx.md: Ditto.
20674 2018-02-21 Segher Boessenkool <segher@kernel.crashing.org>
20676 * config/rs6000/altivec.md: Write output control strings as braced
20677 blocks instead of double-quoted strings.
20678 * config/rs6000/darwin.md: Ditto.
20679 * config/rs6000/rs6000.md: Ditto.
20680 * config/rs6000/vector.md: Ditto.
20681 * config/rs6000/vsx.md: Ditto.
20683 2018-02-21 Jason Merrill <jason@redhat.com>
20685 PR c++/84314 - ICE with templates and fastcall attribute.
20686 * attribs.c (build_type_attribute_qual_variant): Remove assert.
20688 2018-02-21 Jan Hubicka <hubicka@ucw.cz>
20690 * ipa-cp.c (determine_versionability): Fix comment typos.
20692 2018-02-21 Jan Hubicka <hubicka@ucw.cz>
20695 * ipa-cp.c (determine_versionability): Do not version functions caling
20698 2018-02-21 Martin Liska <mliska@suse.cz>
20701 * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch):
20702 Add "native" as a possible value.
20703 * config/aarch64/aarch64.h (HAVE_LOCAL_CPU_DETECT): Define
20704 the macro when native cpu detection is available.
20706 2018-02-21 Martin Liska <mliska@suse.cz>
20709 * common/config/arm/arm-common.c (arm_print_hint_for_arch_option):
20710 Add "native" as a possible value.
20711 * config/arm/arm.h (HAVE_LOCAL_CPU_DETECT): Define the macro
20712 when native cpu detection is available.
20714 2018-02-21 Jakub Jelinek <jakub@redhat.com>
20715 Martin Sebor <msebor@redhat.com>
20717 PR tree-optimization/84478
20718 * gimple-fold.h (get_range_strlen): Add a bool argument defaulted to
20720 * gimple-fold.c (get_range_strlen): Make minlen const and assume it
20721 can't be NULL. Change FUZZY from bool to int, for 1 add PHI/COND_EXPR
20722 support which is conservatively correct, for 2 only stay conservative
20723 for maxlen. Formatting and comment capitalization fixes. Add STRICT
20724 argument to the 2 argument get_range_strlen, adjust 6 arg
20725 get_range_strlen caller and clear minmaxlen[0] and [1] if it returned
20727 (get_maxval_strlen): Adjust 6 arg get_range_strlen caller.
20728 (gimple_fold_builtin_strlen): Pass true as last argument to
20731 2018-02-20 Martin Sebor <msebor@redhat.com>
20733 PR middle-end/84095
20734 * gimple-ssa-warn-restrict.c (builtin_memref::extend_offset_range): New.
20735 (builtin_memref::set_base_and_offset): Same. Handle inner references.
20736 (builtin_memref::builtin_memref): Factor out parts into
20737 set_base_and_offset and call it.
20739 2018-02-20 Richard Sandiford <richard.sandiford@linaro.org>
20741 PR middle-end/84406
20742 * optabs-query.c (find_widening_optab_handler_and_mode): If from_mode
20743 is a scalar_int_mode, assert that to_mode is a scalar_int_mode with
20744 greater precision. If to_mode is a MODE_PARTIAL_INT, stop the
20745 search at the associated MODE_INT.
20747 2018-02-20 Jeff Law <law@redhat.com>
20749 PR middle-end/82123
20750 PR tree-optimization/81592
20751 PR middle-end/79257
20752 * gimple-ssa-sprintf.c (format_integer): Query EVRP range analyzer
20753 for range data rather than using global data.
20754 * gimple-ssa-sprintf.c (get_int_range): Query EVRP range analyzer for
20755 range data rather than using global data.
20756 * gimple-ssa-sprintf.c (get_int_range): Accept vr_values parameter
20757 pass it to children as needed.
20758 (struct directive::fmtresult): Similarly.
20759 (struct directive::set_width): Similarly.
20760 (struct directive::set_precision): Similarly.
20761 (format_integer, format_directive, parse_directive): Similarly.
20762 (format_none): Accept unnamed vr_values parameter.
20763 (format_percent, format_floating, format_character): Similarly.
20764 (format_string, format_plain): Similarly.
20765 * gimple-ssa-sprintf.c (sprintf_dom_walker::handle_gimple_call): Query
20766 the EVRP range analyzer for range data rather than using global data.
20767 * gimple-ssa-sprintf.c: Include alloc-pool.h, vr-values.h and
20768 gimple-ssa-evrp-analyze.h
20769 (class sprintf_dom_walker): Add after_dom_children member function.
20770 Add evrp_range_analyzer member.
20771 (sprintf_dom_walker::before_dom_children): Call into the EVRP
20772 range analyzer as needed.
20773 (sprintf_dom_walker::after_dom_children): New member function.
20774 * gimple-ssa-evrp-analyze.c (evrp_range_analyzer::enter): Do nothing
20776 (evrp_range_analyzer::record_ranges_from_stmt): Likewise.
20777 (evrp_range_analyzer::pop_to_marker): Likewise.
20779 2018-02-20 Richard Sandiford <richard.sandiford@linaro.org>
20781 PR tree-optimization/84419
20782 * internal-fn.c (expand_call_mem_ref): Create a TARGET_MEM_REF
20783 with the required type if its current type is compatible but
20786 2018-02-20 Jakub Jelinek <jakub@redhat.com>
20788 PR middle-end/82004
20789 * match.pd (pow(C,x) -> exp(log(C)*x)): Delay all folding until
20790 after vectorization.
20792 2018-02-20 Martin Liska <mliska@suse.cz>
20795 * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch): Print
20796 possible values if we don't have a hint.
20798 2018-02-20 Martin Liska <mliska@suse.cz>
20802 * final.c (shorten_branches): Build align_tab array with one
20804 * opts.c (finish_options): Add alignment option limit check.
20805 (MAX_CODE_ALIGN): Likewise.
20806 (MAX_CODE_ALIGN_VALUE): Likewise.
20807 * doc/invoke.texi: Document maximum allowed option value for
20808 all -falign-* options.
20810 2018-02-19 Jakub Jelinek <jakub@redhat.com>
20813 * reg-notes.def (REG_CALL_ARG_LOCATION): New reg note.
20814 * insn-notes.def (NOTE_INSN_CALL_ARG_LOCATION): Remove.
20815 * var-tracking.c (emit_note_insn_var_location): Remove all references
20816 to NOTE_INSN_CALL_ARG_LOCATION.
20817 (emit_notes_in_bb): Emit arguments as REG_CALL_ARG_LOCATION note on
20818 the CALL_INSN rather than separate NOTE_INSN_CALL_ARG_LOCATION note.
20819 Use copy_rtx_if_shared.
20820 * dwarf2out.c (gen_subprogram_die): Use XEXP with 0 instead of
20821 NOTE_VAR_LOCATION on ca_loc->call_arg_loc_note.
20822 (dwarf2out_var_location): Remove handling of
20823 NOTE_INSN_CALL_ARG_LOCATION, instead handle REG_CALL_ARG_LOCATION note
20825 * final.c (final_scan_insn): Remove all references to
20826 NOTE_INSN_CALL_ARG_LOCATION.
20827 (rest_of_clean_state): Likewise. Remove REG_CALL_ARG_LOCATION notes
20828 before dumping final insns.
20829 * except.c (emit_note_eh_region_end): Remove all references to
20830 NOTE_INSN_CALL_ARG_LOCATION.
20831 * config/alpha/alpha.c (alpha_pad_function_end): Likewise.
20832 * config/c6x/c6x.c (c6x_gen_bundles): Likewise.
20833 * config/arc/arc.c (hwloop_optimize): Likewise.
20834 * config/arm/arm.c (create_fix_barrier): Likewise.
20835 * config/s390/s390.c (s390_chunkify_start): Likewise.
20836 * config/sh/sh.c (find_barrier): Likewise.
20837 * config/i386/i386.c (rest_of_insert_endbranch,
20838 ix86_seh_fixup_eh_fallthru): Likewise.
20839 * config/xtensa/xtensa.c (hwloop_optimize): Likewise.
20840 * config/iq2000/iq2000.c (final_prescan_insn): Likewise.
20841 * config/frv/frv.c (frv_function_prologue): Likewise.
20842 * emit-rtl.c (try_split): Likewise. Copy over REG_CALL_ARG_LOCATION
20844 (note_outside_basic_block_p): Remove all references to
20845 NOTE_INSN_CALL_ARG_LOCATION.
20846 * gengtype.c (adjust_field_rtx_def): Likewise.
20847 * print-rtl.c (rtx_writer::print_rtx_operand_code_0, print_insn):
20849 * jump.c (cleanup_barriers, delete_related_insns): Likewise.
20850 * cfgrtl.c (force_nonfallthru_and_redirect): Likewise.
20853 * builtins.c (builtin_mathfn_code): Don't check if CALL_EXPR_FN (t)
20856 PR tree-optimization/84452
20857 * tree-vect-patterns.c (vect_recog_pow_pattern): Don't call
20858 expand_simd_clones if targetm.simd_clone.compute_vecsize_and_simdlen
20861 2018-02-19 Martin Liska <mliska@suse.cz>
20864 * passes.def: Put pass_sancov_O0 before pass_lower_switch with -O0.
20866 2018-02-19 Martin Liska <mliska@suse.cz>
20867 Richard Sandiford <richard.sandiford@linaro.org>
20869 PR tree-optimization/82491
20870 * gimple-fold.c (get_base_constructor): Make earlier bail out
20873 2018-02-19 Carl Love <cel@us.ibm.com>
20875 * config/rs6000/rs6000-builtin.def: Change NEG macro expansions from
20876 BU_ALTIVEC_A to BU_P8V_AV_1 and BU_ALTIVEC_OVERLOAD_1 to
20878 * config/rs6000/rs6000-c.c: Change ALTIVEC_BUILTIN_VEC_NEG to
20879 P8V_BUILTIN_VEC_NEG.
20881 2018-02-19 Sebastian Perta <sebastian.perta@renesas.com>
20883 * config/rl78/rl78.md (movdf): New define expand.
20885 2018-02-19 Martin Liska <mliska@suse.cz>
20888 * doc/invoke.texi: Fix typo.
20889 * params.def (PARAM_MAX_LOOP_HEADER_INSNS): Likewise.
20891 2018-02-18 Segher Boessenkool <segher@kernel.crashing.org>
20893 * config/rs6000/rs6000.c (rs6000_option_override_internal): Don't
20894 handle rs6000_single_float and rs6000_double_float specially for
20897 2018-02-16 Jeff Law <law@redhat.com>
20899 * config/rx/rx.c (add_pop_cfi_notes): New function.;
20900 (pop_regs): Use it.
20902 2018-02-16 Jakub Jelinek <jakub@redhat.com>
20905 * ipa-inline.c (inline_small_functions): Fix a typo.
20907 2018-02-16 Nathan Sidwell <nathan@acm.org>
20909 * doc/extend.texi (Backwards Compatibility): Americanize 'behaviour'.
20911 2018-02-16 Carl Love <cel@us.ibm.com>
20913 * config/rs6000/rs6000-builtin.def: Add BU_P8V_VSX_2 macro definition.
20914 Change FLOAT2 expansions from BU_VSX_2 to BU_P8V_VSX_2 and
20915 from BU_VSX_OVERLOAD_2 to BU_P8V_OVERLOAD_2.
20916 * config/rs6000/rs6000-c.c: Changed macro VSX_BUILTIN_VEC_FLOAT2
20917 expansion to P8V_BUILTIN_VEC_FLOAT2.
20919 2018-02-16 Vladimir Makarov <vmakarov@redhat.com>
20921 PR rtl-optimization/70023
20922 * lra-constraints.c (inherit_in_ebb): Take hard reg mode of
20923 src_regno into account.
20925 2018-02-16 Carl Love <cel@us.ibm.com>
20927 * config/rs6000/altivec.h: Remove vec_vextract4b and vec_vinsert4b.
20928 * config/rs6000/rs6000-builtin.def: Remove macro expansion for
20929 VEXTRACT4B, VINSERT4B, VINSERT4B_DI and VEXTRACT4B.
20930 * config/rs6000/rs6000.c: Remove case statements for
20931 P9V_BUILTIN_VEXTRACT4B, P9V_BUILTIN_VEC_VEXTRACT4B,
20932 P9V_BUILTIN_VINSERT4B, P9V_BUILTIN_VINSERT4B_DI,
20933 and P9V_BUILTIN_VEC_VINSERT4B.
20934 * config/rs6000/rs6000-c.c (altivec_expand_builtin): Remove entries for
20935 P9V_BUILTIN_VEC_VEXTRACT4B and P9V_BUILTIN_VEC_VINSERT4B.
20936 * config/rs6000/vsx.md:
20937 * doc/extend.texi: Remove vec_vextract4b, non ABI definitions for
20940 2018-02-16 Carl Love <cel@us.ibm.com>
20942 * config/rs6000/altivec.h: Add builtin names vec_extract4b
20944 * config/rs6000/rs6000-builtin.def: Add INSERT4B and EXTRACT4B
20946 * config/rs6000/rs6000-c.c: Add the definitions for
20947 P9V_BUILTIN_VEC_EXTRACT4B and P9V_BUILTIN_VEC_INSERT4B.
20948 * config/rs6000/rs6000.c (altivec_expand_builtin): Add
20949 P9V_BUILTIN_EXTRACT4B and P9V_BUILTIN_INSERT4B case statements.
20950 * config/rs6000/vsx.md: Add define_insn extract4b. Add define_expand
20951 definition for insert4b and define insn *insert3b_internal.
20952 * doc/extend.texi: Add documentation for vec_extract4b.
20954 2018-02-16 Nathan Sidwell <nathan@acm.org>
20956 * doc/extend.texi (Backwards Compatibility): Mention friend
20957 injection. Note for-scope is deprecated.
20958 * doc/invoke.texi (-ffriend-injection): Deprecate.
20960 2018-02-16 Segher Boessenkool <segher@kernel.crashing.org>
20962 * combine.c (try_combine): When adjusting LOG_LINKS for the destination
20963 that moved to I2, also allow destinations that are a paradoxical
20964 subreg (instead of a normal reg).
20966 2018-02-16 Oleg Endo <olegendo@gcc.gnu.org>
20969 * config/rx/rx.c (rx_fuse_in_memory_bitop): Convert shift operand
20972 2018-02-16 Richard Biener <rguenther@suse.de>
20974 PR tree-optimization/84037
20975 PR tree-optimization/84016
20977 * config/i386/i386.c (ix86_builtin_vectorization_cost):
20978 Adjust vec_construct for the fact we need additional higher latency
20979 128bit inserts for AVX256 and AVX512 vector builds.
20980 (ix86_add_stmt_cost): Scale vector construction cost for
20983 2018-02-16 Richard Biener <rguenther@suse.de>
20985 PR tree-optimization/84417
20986 * tree-ssa.c (non_rewritable_mem_ref_base): Properly constrain
20987 the MEM_REF offset when conversion to BIT_FIELD_REF is desired.
20988 (non_rewritable_lvalue_p): Likewise, use poly-ints.
20990 2018-02-16 Martin Liska <mliska@suse.cz>
20993 * internal-fn.def (ASAN_CHECK): Set proper flags.
20994 (ASAN_MARK): Likewise.
20996 2018-02-16 Julia Koval <julia.koval@intel.com>
20998 * config/i386/i386.c (ix86_option_override_internal): Remove PTA_CLWB
20999 from PTA_CANNONLAKE.
21001 2018-02-16 Jakub Jelinek <jakub@redhat.com>
21004 * config/aarch64/cortex-a57-fma-steering.c (fma_forest::merge_forest):
21005 Use ++iter rather than iter++ for std::list iterators.
21006 (func_fma_steering::dfs): Likewise. Don't delete nodes right away,
21007 defer deleting them until all nodes in the forest are processed. Do
21008 free even leaf nodes. Change to_process into auto_vec.
21011 * system.h (BROKEN_VALUE_INITIALIZATION): Define for GCC < 4.3.
21012 * vec.h (vec_default_construct): Use memset instead of placement new
21013 if BROKEN_VALUE_INITIALIZATION is defined.
21014 * hash-table.h (hash_table<Descriptor, Allocator>::empty_slow): Use
21015 memset instead of value initialization if BROKEN_VALUE_INITIALIZATION
21018 PR rtl-optimization/83723
21019 * lra-int.h (lra_substitute_pseudo): Add DEBUG_P argument.
21020 * lra.c (lra_substitute_pseudo): Likewise. If true, use
21021 gen_rtx_raw_SUBREG instead of gen_rtx_SUBREG. Pass DEBUG_P to
21023 (lra_substitute_pseudo_within_insn): Adjust lra_substitute_pseudo
21025 * lra-constraints.c (inherit_reload_reg, split_reg): Likewise.
21027 2018-02-16 Eric Botcazou <ebotcazou@adacore.com>
21029 PR rtl-optimization/81443
21030 * rtlanal.c (num_sign_bit_copies1) <SUBREG>: Do not propagate results
21031 from inner REGs to paradoxical SUBREGs.
21033 2018-02-16 Richard Biener <rguenther@suse.de>
21035 PR tree-optimization/84399
21036 * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
21037 For operands we can analyze at their definition make sure we can
21038 analyze them at each use as well.
21040 2018-02-16 Richard Biener <rguenther@suse.de>
21042 PR tree-optimization/84190
21043 * tree-ssa.c (non_rewritable_mem_ref_base): Do not touch
21044 volatile accesses if the decl isn't volatile.
21046 2018-02-15 Jason Merrill <jason@redhat.com>
21048 PR c++/84314 - ICE with templates and fastcall attribute.
21049 * attribs.c (build_type_attribute_qual_variant): Don't clobber
21050 TYPE_CANONICAL on an existing type.
21052 2018-02-15 Jakub Jelinek <jakub@redhat.com>
21054 PR tree-optimization/84383
21055 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Don't look at
21056 dstoff nor call operand_equal_p if dstbase is NULL.
21058 PR tree-optimization/84334
21059 * match.pd ((A +- CST1) +- CST2 -> A + CST3): If A is
21060 also a CONSTANT_CLASS_P, punt.
21062 2018-02-14 Jim Wilson <jimw@sifive.com>
21064 * config/riscv/riscv.c (riscv_first_stack_step): Move locals after
21065 first SMALL_OPERAND check. New local min_second_step. Move assert
21066 to where locals are set. Add TARGET_RVC support.
21067 * config/riscv/riscv.h (C_SxSP_BITS, SWSP_REACH, SDSP_REACH): New.
21069 2018-02-14 Indu Bhagat <indu.bhagat@oracle.com>
21071 * doc/invoke.texi: Correct -Wformat-overflow code sample.
21073 2018-02-14 Martin Sebor <msebor@redhat.com>
21075 PR tree-optimization/83698
21076 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For
21077 arrays constrain the offset range to their bounds.
21078 (builtin_access::strcat_overlap): Adjust the bounds of overlap offset.
21079 (builtin_access::overlap): Avoid setting the size of overlap if it's
21081 (maybe_diag_overlap): Also consider arrays when deciding what values
21082 of offsets to include in diagnostics.
21084 2018-02-14 Martin Sebor <msebor@redhat.com>
21087 * attribs.c (diag_attr_exclusions): Consider the exclusion(s)
21088 that correspond to the kind of a declaration.
21090 2018-02-14 John David Anglin <danglin@gcc.gnu.org>
21093 * config/pa/pa.md: Load address of PIC label using the linkage table
21094 if the label is nonlocal.
21096 2018-02-14 Kelvin Nilsen <kelvin@gcc.gnu.org>
21098 * config/rs6000/rs6000.c (rs6000_option_override_internal): Issue
21099 warning message if user requests -maltivec=be.
21100 * doc/invoke.texi: Document deprecation of -maltivec=be.
21102 2018-02-14 Will Schmidt <will_schmidt@vnet.ibm.com>
21105 * config/rs6000/rs6000-c.c: Update definitions for
21106 ALTIVEC_BUILTIN_VEC_SLD, ALTIVEC_BUILTIN_VEC_SLDW,
21107 VEC_XXSLDWI and ALTIVEC_BUILTIN_VEC_XXPERMDI builtins.
21109 2018-02-14 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
21112 * config/i386/cetintrin.h: Remove _rdssp[d|q] and
21113 add _get_ssp intrinsics. Remove argument from
21114 __builtin_ia32_rdssp[d|q].
21115 * config/i386/i386-builtin-types.def: Add UINT_FTYPE_VOID.
21116 * config/i386/i386-builtin.def: Remove argument from
21117 __builtin_ia32_rdssp[d|q].
21118 * config/i386/i386.c: Use UINT_FTYPE_VOID. Use
21119 ix86_expand_special_args_builtin for _rdssp[d|q].
21120 * config/i386/i386.md: Remove argument from rdssp[si|di] insn.
21121 Clear register before usage.
21122 * doc/extend.texi: Remove argument from __builtin_ia32_rdssp[d|q].
21123 Add documentation for new _get_ssp and _inc_ssp intrinsics.
21125 2018-02-14 Richard Sandiford <richard.sandiford@linaro.org>
21127 PR tree-optimization/84357
21128 * tree-data-ref.c (object_address_invariant_in_loop_p): Check
21129 operand 1 of an ARRAY_REF too.
21131 2018-02-14 Oleg Endo <olegendo@gcc.gnu.org>
21134 * config/rx/rx-protos.h (rx_reg_dead_or_unused_after_insn,
21135 rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
21137 (set_of_reg): New struct.
21138 (rx_find_set_of_reg, rx_find_use_of_reg): New functions.
21139 * config/rx/rx.c (rx_reg_dead_or_unused_after_insn,
21140 rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
21142 * config/rx/rx.md (andsi3, iorsi3, xorsi3): Convert to insn_and_split.
21143 Split into bitclr, bitset, bitinvert patterns if appropriate.
21144 (*bitset, *bitinvert, *bitclr): Convert to named insn_and_split and
21145 use rx_fuse_in_memory_bitop.
21146 (*bitset_in_memory, *bitinvert_in_memory, *bitclr_in_memory): Convert
21147 to named insn, correct maximum insn length.
21149 2018-02-14 Jozef Lawrynowicz <jozefl.gcc@gmail.com>
21152 * machmode.def: Define a complex mode for PARTIAL_INT.
21153 * genmodes.c (complex_class): Return MODE_COMPLEX_INT for
21155 * doc/rtl.texi: Document CSPImode.
21156 * config/msp430/msp430.c (msp430_hard_regno_nregs): Add CPSImode
21158 (msp430_hard_regno_nregs_with_padding): Likewise.
21160 2018-02-13 Peter Bergner <bergner@vnet.ibm.com>
21163 * config/rs6000/rs6000.c (mem_operand_gpr): Disallow altivec addresses.
21165 2018-02-13 Segher Boessenkool <segher@kernel.crashing.org>
21167 PR rtl-optimization/84169
21168 * combine.c (try_combine): New variable split_i2i3. Set it to true if
21169 we generated a parallel as new i3 and we split that to new i2 and i3
21170 instructions. Handle split_i2i3 similar to swap_i2i3: scan the
21171 LOG_LINKs of i3 to see which of those need to link to i2 now. Link
21172 those to i2, not i1. Partially rewrite this scan code.
21174 2018-02-13 Jakub Jelinek <jakub@redhat.com>
21177 * stor-layout.c (place_field): For variable length fields, adjust
21178 offset_align afterwards not just based on the field's alignment,
21179 but also on the size.
21181 PR middle-end/84309
21182 * match.pd (pow(C,x) -> exp(log(C)*x)): Use exp2s and log2s instead
21183 of exps and logs in the use_exp2 case.
21185 2018-02-13 Jeff Law <law@redhat.com>
21187 * config/rl/rl78.c (rl78_attribute_table): Fix terminator and
21188 entry for "vector".
21190 * config/rl78/rl78.c (rl78_handle_func_attribute): Mark
21193 2018-02-13 Alexandre Oliva <aoliva@redhat.com>
21197 * common.opt (gas-loc-support, gas-locview-support): New.
21198 (ginline-points, ginternal-reset-location-views): New.
21199 * doc/invoke.texi: Document them. Use @itemx where intended.
21200 (gvariable-location-views): Adjust.
21201 * target.def (reset_location_view): New.
21202 * doc/tm.texi.in (DWARF2_ASM_VIEW_DEBUG_INFO): New.
21203 (TARGET_RESET_LOCATION_VIEW): New.
21204 * doc/tm.texi: Rebuilt.
21205 * dwarf2out.c (dwarf2out_default_as_loc_support): New.
21206 (dwarf2out_default_as_locview_support): New.
21207 (output_asm_line_debug_info): Use option variables.
21208 (dwarf2out_maybe_output_loclist_view_pair): Likewise.
21209 (output_loc_list): Likewise.
21210 (add_high_low_attributes): Check option variables.
21211 Don't output entry view attribute in strict mode.
21212 (gen_inlined_subroutine_die): Check option variables.
21213 (dwarf2out_inline_entry): Likewise.
21214 (init_sections_and_labels): Likewise.
21215 (dwarf2out_early_finish): Likewise.
21216 (maybe_reset_location_view): New, from...
21217 (dwarf2out_var_location): ... here. Call it.
21218 * debug.h (dwarf2out_default_as_loc_support): Declare.
21219 (dwarf2out_default_as_locview_support): Declare.
21220 * hooks.c (hook_int_rtx_insn_0): New.
21221 * hooks.h (hook_int_rtx_insn_0): Declare.
21222 * toplev.c (process_options): Take -gas-loc-support and
21223 -gas-locview-support from dwarf2out. Enable
21224 -gvariable-location-views by default only with locview
21225 assembler support. Enable -ginternal-reset-location-views by
21226 default only if the target defines the corresponding hook.
21227 Enable -ginline-points by default if location views are
21228 enabled; force it disabled if statement frontiers are
21230 * tree-inline.c (expand_call_inline): Check option variables.
21231 * tree-ssa-live.c (remove_unused_scope_block_p): Likewise.
21233 2018-02-13 Richard Sandiford <richard.sandiford@linaro.org>
21235 PR tree-optimization/84321
21236 * tree-vrp.c (intersect_range_with_nonzero_bits): Fix VR_ANTI_RANGE
21237 handling. Also check whether the anti-range contains any values
21238 that satisfy the mask; switch to a VR_RANGE if not.
21240 2018-02-13 Paolo Bonzini <bonzini@gnu.org>
21243 * internal-fn.def (ASAN_CHECK, ASAN_MARK): Revert changes to fnspec.
21245 2018-02-13 Martin Jambor <mjambor@suse.cz>
21248 * ipa-param-manipulation.c (ipa_modify_call_arguments): Use location
21249 of call statements, also set location of a load to a temporary.
21251 2018-02-13 Sebastian Perta <sebastian.perta@renesas.com>
21253 * config/rl78/rl78.c (add_vector_labels): New function.
21254 * config/rl78/rl78.c (rl78_handle_vector_attribute): New function.
21255 * config/rl78/rl78.c (rl78_start_function): Call add_vector_labels.
21256 * config/rl78/rl78.c (rl78_handle_func_attribute): Removed the assert
21257 which checks that no arguments are passed.
21258 * config/rl78/rl78.c (rl78_attribute_table): Add "vector" attribute.
21259 * doc/extend.texi: Documentation for the new attribute.
21261 2018-02-13 Andreas Schwab <schwab@suse.de>
21263 * config/riscv/linux.h (CPP_SPEC): Define.
21265 2018-02-13 Jakub Jelinek <jakub@redhat.com>
21268 * config/i386/i386.c (ix86_init_mmx_sse_builtins): Pass
21269 OPTION_MASK_ISA_AES | OPTION_MASK_ISA_SSE2 instead of
21270 OPTION_MASK_ISA_AES as first argument to def_builtin_const
21271 for AES builtins. Pass OPTION_MASK_ISA_PCLMUL | OPTION_MASK_ISA_SSE2
21272 instead of OPTION_MASK_ISA_PCLMUL as first argument to
21273 def_builtin_const for __builtin_ia32_pclmulqdq128 builtin.
21274 * config/i386/wmmintrin.h: If __SSE2__ is not defined, enable it
21275 temporarily for AES and PCLMUL builtins.
21277 PR tree-optimization/84339
21278 * gimple-fold.c (get_range_strlen): Set *FLEXP to true when handling
21279 ARRAY_REF where first operand is array_at_struct_end_p COMPONENT_REF.
21282 PR middle-end/84309
21283 * match.pd (pow(C,x) -> exp(log(C)*x)): Optimize instead into
21284 exp2(log2(C)*x) if C is a power of 2 and c99 runtime is available.
21285 * generic-match-head.c (canonicalize_math_after_vectorization_p): New
21287 * gimple-match-head.c (canonicalize_math_after_vectorization_p): New
21289 * omp-simd-clone.h: New file.
21290 * omp-simd-clone.c: Include omp-simd-clone.h.
21291 (expand_simd_clones): No longer static.
21292 * tree-vect-patterns.c: Include fold-const-call.h, attribs.h,
21293 cgraph.h and omp-simd-clone.h.
21294 (vect_recog_pow_pattern): Optimize pow(C,x) to exp(log(C)*x).
21295 (vect_recog_widen_shift_pattern): Formatting fix.
21296 (vect_pattern_recog_1): Don't check optab for calls.
21299 * config/i386/sse.md (<avx512>_vpermi2var<mode>3_mask): Force
21300 operands[2] into a REG before using gen_lowpart on it.
21302 2018-02-12 Jeff Law <law@redhat.com>
21305 * config/sh/sh.c (find_barrier): Consider a sibling call
21308 * cse.c (try_back_substitute_reg): Move any REG_ARGS_SIZE note when
21309 successfully back substituting a reg.
21311 2018-02-12 Richard Biener <rguenther@suse.de>
21313 PR tree-optimization/84037
21314 * tree-vect-slp.c (vect_analyze_slp_cost): Add visited
21315 parameter, move visited init to caller.
21316 (vect_slp_analyze_operations): Separate cost from validity
21317 check, initialize visited once for all instances.
21318 (vect_schedule_slp): Analyze map to CSE vectorized nodes once
21320 * tree-vect-stmts.c (vect_model_simple_cost): Make early
21322 (vect_model_promotion_demotion_cost): Likewise.
21323 (vectorizable_bswap): Guard cost modeling with !slp_node
21324 instead of !PURE_SLP_STMT to avoid double-counting on hybrid
21326 (vectorizable_call): Likewise.
21327 (vectorizable_conversion): Likewise.
21328 (vectorizable_assignment): Likewise.
21329 (vectorizable_shift): Likewise.
21330 (vectorizable_operation): Likewise.
21331 (vectorizable_store): Likewise.
21332 (vectorizable_load): Likewise.
21333 (vectorizable_condition): Likewise.
21334 (vectorizable_comparison): Likewise.
21336 2018-02-12 Paolo Bonzini <bonzini@gnu.org>
21339 * internal-fn.def (ASAN_CHECK): Fix fnspec to account for return value.
21340 (ASAN_MARK): Fix fnspec to account for return value, change pointer
21341 argument from 'R' to 'W' so that the pointed-to datum is clobbered.
21343 2018-02-08 Jan Hubicka <hubicka@ucw.cz>
21345 PR middle-end/83665
21346 * params.def (inline-min-speedup): Increase from 8 to 15.
21347 (max-inline-insns-auto): Decrease from 40 to 30.
21348 * ipa-split.c (consider_split): Add some buffer for function to
21349 be considered inlining candidate.
21350 * invoke.texi (max-inline-insns-auto, inline-min-speedup): UPdate
21353 2018-02-12 Richard Biener <rguenther@suse.de>
21355 PR tree-optimization/84037
21356 * tree-vect-slp.c (vect_build_slp_tree_2): Try swapping the
21357 matched stmts if we cannot swap the non-matched ones.
21359 2018-02-12 Olga Makhotina <olga.makhotina@intel.com>
21361 * config/i386/avx512fintrin.h (_mm_mask_scalef_round_sd,
21362 _mm_maskz_scalef_round_sd, _mm_mask_scalef_round_ss,
21363 _mm_maskz_scalef_round_ss): New intrinsics.
21364 (__builtin_ia32_scalefsd_round, __builtin_ia32_scalefss_round): Fix.
21365 * config/i386/i386-builtin.def (__builtin_ia32_scalefsd_round,
21366 __builtin_ia32_scalefss_round): Remove.
21367 (__builtin_ia32_scalefsd_mask_round,
21368 __builtin_ia32_scalefss_mask_round): New intrinsics.
21369 * config/i386/sse.md (vmscalef<mode><round_name>): Renamed to ...
21370 (vmscalef<mode><mask_scalar_name><round_scalar_name>): ... this.
21371 ((match_operand:VF_128 2 "<round_nimm_predicate>"
21372 "<round_constraint>")): Changed to ...
21373 ((match_operand:VF_128 2 "<round_scalar_nimm_predicate>"
21374 "<round_scalar_constraint>")): ... this.
21375 ("vscalef<ssescalarmodesuffix>\t{<round_op3>%2, %1, %0|
21376 %0, %1, %2<round_op3>}"): Changed to ...
21377 ("vscalef<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%2, %1,
21378 %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %1,
21379 %2<round_scalar_mask_op3>}"): ... this.
21380 * config/i386/subst.md (round_scalar_nimm_predicate): New.
21382 2018-02-12 Olga Makhotina <olga.makhotina@intel.com>
21384 * config/i386/avx512fintrin.h (_mm_mask_sqrt_round_sd)
21385 (_mm_maskz_sqrt_round_sd, _mm_mask_sqrt_round_ss)
21386 (_mm_maskz_sqrt_round_ss): New intrinsics.
21387 (__builtin_ia32_sqrtsd_round, __builtin_ia32_sqrtss_round): Remove.
21388 (__builtin_ia32_sqrtsd_mask_round)
21389 (__builtin_ia32_sqrtss_mask_round): New builtins.
21390 * config/i386/i386-builtin.def (__builtin_ia32_sqrtsd_round)
21391 (__builtin_ia32_sqrtss_round): Remove.
21392 (__builtin_ia32_sqrtsd_mask_round)
21393 (__builtin_ia32_sqrtss_mask_round): New builtins.
21394 * config/i386/sse.md (vmsqrt<mode>2<round_name>): Renamed to ...
21395 (vmsqrt<mode>2<mask_scalar_name><round_scalar_name>): ... this.
21396 ((match_operand:VF_128 1 "vector_operand"
21397 "xBm,<round_constraint>")): Changed to ...
21398 ((match_operand:VF_128 1 "vector_operand"
21399 "xBm,<round_scalar_constraint>")): ... this.
21400 (vsqrt<ssescalarmodesuffix>\t{<round_op3>%1, %2, %0|
21401 %0, %2, %<iptr>1<round_op3>}): Changed to ...
21402 (vsqrt<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%1, %2,
21403 %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %2,
21404 %<iptr>1<round_scalar_mask_op3>}): ... this.
21405 ((set_attr "prefix" "<round_prefix>")): Changed to ...
21406 ((set_attr "prefix" "<round_scalar_prefix>")): ... this.
21408 2018-02-11 Steven Munroe <munroesj@gcc.gnu.org>
21411 * config/rs6000/mmintrin.h (_mm_cmpeq_pi32 [_ARCH_PWR9]):
21412 Cast vec_cmpeq result to correct type.
21413 * config/rs6000/mmintrin.h (_mm_cmpgt_pi32 [_ARCH_PWR9]):
21414 Cast vec_cmpgt result to correct type.
21416 2018-02-11 Alexandre Oliva <aoliva@redhat.com>
21418 * final.c (final_scan_insn_1): Renamed from...
21419 (final_scan_insn): ... this. New wrapper, to recover
21420 seen from the outermost call in recursive ones.
21421 * config/sparc/sparc.c (output_return): Drop seen from call.
21422 (output_sibcall): Likewise.
21423 * config/visium/visium.c (output_branch): Likewise.
21425 2018-02-10 John David Anglin <danglin@gcc.gnu.org>
21427 * config/pa/pa.c (hppa_profile_hook): Mark SYMBOL_REF for _mcount as
21430 2018-02-10 Alan Modra <amodra@gmail.com>
21433 * config/rs6000/rs6000.md (split_stack_return): Remove (use ..).
21434 Specify LR as an input.
21436 2018-02-10 Jakub Jelinek <jakub@redhat.com>
21439 * omp-low.c (maybe_remove_omp_member_access_dummy_vars,
21440 remove_member_access_dummy_vars): New functions.
21441 (lower_omp_for, lower_omp_taskreg, lower_omp_target,
21442 lower_omp_1, execute_lower_omp): Use them.
21444 PR rtl-optimization/84308
21445 * shrink-wrap.c (spread_components): Release todo vector.
21447 2018-02-09 Vladimir Makarov <vmakarov@redhat.com>
21449 PR rtl-optimization/57193
21450 * ira-color.c (struct allocno_color_data): Add member
21451 conflict_allocno_hard_prefs.
21452 (update_conflict_allocno_hard_prefs): New.
21453 (bucket_allocno_compare_func): Add a preference based on
21454 conflict_allocno_hard_prefs.
21455 (push_allocno_to_stack): Update conflict_allocno_hard_prefs.
21456 (color_allocnos): Remove a dead code. Initiate
21457 conflict_allocno_hard_prefs. Call update_costs_from_prefs.
21459 2018-02-09 Jakub Jelinek <jakub@redhat.com>
21462 * config/rs6000/vsx.md (p9_xxbrq_v16qi): Change input operand
21463 constraint from =wa to wa. Avoid a subreg on the output operand,
21464 instead use a pseudo and subreg it in a move.
21465 (p9_xxbrd_<mode>): Changed to ...
21466 (p9_xxbrd_v2di): ... this insn, without VSX_D iterator.
21467 (p9_xxbrd_v2df): New expander.
21468 (p9_xxbrw_<mode>): Changed to ...
21469 (p9_xxbrw_v4si): ... this insn, without VSX_W iterator.
21470 (p9_xxbrw_v4sf): New expander.
21472 2018-02-09 Sebastian Perta <sebastian.perta@renesas.com>
21474 * config/rx/rx.md (movsicc): Update expander to be matched by GCC.
21476 2018-02-09 Peter Bergner <bergner@vnet.ibm.com>
21479 * config/rs6000/vsx.md (vsx_mul_v2di): Handle generating a 64-bit
21480 multiply in 32-bit mode.
21481 (vsx_div_v2di): Handle generating a 64-bit signed divide in 32-bit mode.
21482 (vsx_udiv_v2di): Handle generating a 64-bit unsigned divide in 32-bit
21485 2018-02-09 Sebastian Perta <sebastian.perta@renesas.com>
21487 * config/rx/constraints.md (CALL_OP_SYMBOL_REF): Added new constraint
21488 to allow or block "symbol_ref" depending on the value of TARGET_JSR.
21489 * config/rx/rx.md (call_internal): Use CALL_OP_SYMBOL_REF.
21490 * config/rx/rx.md (call_value_internal): Use CALL_OP_SYMBOL_REF.
21492 2018-02-09 Pierre-Marie de Rodat <derodat@adacore.com>
21495 * dwarf2out.c (is_trivial_indirect_ref): New function.
21496 (dwarf2out_late_global_decl): Do not generate a location
21497 attribute for variables that have a non-trivial DECL_VALUE_EXPR
21498 and that are not defined in the current unit.
21500 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
21502 * optabs.c (prepare_cmp_insn): Try harder to emit a direct comparison
21503 instead of a libcall for UNORDERED.
21505 2018-02-09 Tamar Christina <tamar.christina@arm.com>
21508 * config/arm/arm-c.c (arm_cpu_builtins): Un-define __ARM_FEATURE_LDREX,
21509 __ARM_ARCH_PROFILE, __ARM_ARCH_ISA_THUMB, __ARM_FP and __ARM_NEON_FP.
21511 2018-02-09 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
21514 * config/s390/s390.c (s390_set_current_function): Invoke
21515 s390_indirect_branch_settings also if fndecl didn't change.
21517 2018-02-09 Alexandre Oliva <aoliva@redhat.com>
21519 * config/rs6000/rs6000.md (blockage): Set length to zero.
21521 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
21523 * expr.c (optimize_bitfield_assignment_op): Remove obsolete assertion.
21525 2018-02-09 Jakub Jelinek <jakub@redhat.com>
21528 * gcc.c (STATIC_LIBASAN_LIBS, STATIC_LIBTSAN_LIBS,
21529 STATIC_LIBLSAN_LIBS, STATIC_LIBUBSAN_LIBS): Handle -static like
21533 * var-tracking.c (vt_add_function_parameter): Punt for non-onepart
21534 PARALLEL incoming that failed vt_get_decl_and_offset check.
21536 PR middle-end/84237
21537 * output.h (bss_initializer_p): Add NAMED argument, defaulted to false.
21538 * varasm.c (bss_initializer_p): Add NAMED argument, if true, ignore
21540 (get_variable_section): For decls in named .bss* sections pass true as
21541 second argument to bss_initializer_p.
21543 2018-02-09 Marek Polacek <polacek@redhat.com>
21544 Jakub Jelinek <jakub@redhat.com>
21547 * fold-const.c (fold_indirect_ref_1): Use VECTOR_TYPE_P macro.
21548 Formatting fixes. Verify first that tree_fits_poly_int64_p (op01).
21549 Sync some changes from cxx_fold_indirect_ref.
21551 2018-02-09 Alexandre Oliva <aoliva@redhat.com>
21553 * cfgexpand.c (expand_gimple_basic_block): Handle inline entry
21555 * dwarf2out.c (dwarf2_debug_hooks): Enable inline_entry hook.
21556 (BLOCK_INLINE_ENTRY_LABEL): New.
21557 (dwarf2out_var_location): Disregard inline entry markers.
21558 (inline_entry_data): New struct.
21559 (inline_entry_data_hasher): New hashtable type.
21560 (inline_entry_data_hasher::hash): New.
21561 (inline_entry_data_hasher::equal): New.
21562 (inline_entry_data_table): New variable.
21563 (add_high_low_attributes): Add DW_AT_entry_pc and
21564 DW_AT_GNU_entry_view attributes if a pending entry is found
21565 in inline_entry_data_table. Add old entry_pc attribute only
21566 if debug nonbinding markers are disabled.
21567 (gen_inlined_subroutine_die): Set BLOCK_DIE if nonbinding
21568 markers are enabled.
21569 (block_within_block_p, dwarf2out_inline_entry): New.
21570 (dwarf2out_finish): Check that no entries remained in
21571 inline_entry_data_table.
21572 * final.c (reemit_insn_block_notes): Handle inline entry notes.
21573 (final_scan_insn, notice_source_line): Likewise.
21574 (rest_of_clean_state): Skip inline entry markers.
21575 * gimple-pretty-print.c (dump_gimple_debug): Handle inline entry
21577 * gimple.c (gimple_build_debug_inline_entry): New.
21578 * gimple.h (enum gimple_debug_subcode): Add
21579 GIMPLE_DEBUG_INLINE_ENTRY.
21580 (gimple_build_debug_inline_entry): Declare.
21581 (gimple_debug_inline_entry_p): New.
21582 (gimple_debug_nonbind_marker_p): Adjust.
21583 * insn-notes.def (INLINE_ENTRY): New.
21584 * print-rtl.c (rtx_writer::print_rtx_operand_code_0): Handle
21585 inline entry marker notes.
21586 (print_insn): Likewise.
21587 * rtl.h (NOTE_MARKER_P): Add INLINE_ENTRY support.
21588 (INSN_DEBUG_MARKER_KIND): Likewise.
21589 (GEN_RTX_DEBUG_MARKER_INLINE_ENTRY_PAT): New.
21590 * tree-inline.c (expand_call_inline): Build and insert
21591 debug_inline_entry stmt.
21592 * tree-ssa-live.c (remove_unused_scope_block_p): Preserve
21593 inline entry blocks early, if nonbind markers are enabled.
21594 (dump_scope_block): Dump fragment info.
21595 * var-tracking.c (reemit_marker_as_note): Handle inline entry note.
21596 * doc/gimple.texi (gimple_debug_inline_entry_p): New.
21597 (gimple_build_debug_inline_entry): New.
21598 * doc/invoke.texi (gstatement-frontiers, gno-statement-frontiers):
21599 Enable/disable inline entry points too.
21600 * doc/rtl.texi (NOTE_INSN_INLINE_ENTRY): New.
21601 (DEBUG_INSN): Describe inline entry markers.
21603 * common.opt (gvariable-location-views): New.
21604 (gvariable-location-views=incompat5): New.
21605 * config.in: Rebuilt.
21606 * configure: Rebuilt.
21607 * configure.ac: Test assembler for view support.
21608 * dwarf2asm.c (dw2_asm_output_symname_uleb128): New.
21609 * dwarf2asm.h (dw2_asm_output_symname_uleb128): Declare.
21610 * dwarf2out.c (var_loc_view): New typedef.
21611 (struct dw_loc_list_struct): Add vl_symbol, vbegin, vend.
21612 (dwarf2out_locviews_in_attribute): New.
21613 (dwarf2out_locviews_in_loclist): New.
21614 (dw_val_equal_p): Compare val_view_list of dw_val_class_view_lists.
21615 (enum dw_line_info_opcode): Add LI_adv_address.
21616 (struct dw_line_info_table): Add view.
21617 (RESET_NEXT_VIEW, RESETTING_VIEW_P): New macros.
21618 (DWARF2_ASM_VIEW_DEBUG_INFO): Define default.
21619 (zero_view_p): New variable.
21620 (ZERO_VIEW_P): New macro.
21621 (output_asm_line_debug_info): New.
21622 (struct var_loc_node): Add view.
21623 (add_AT_view_list, AT_loc_list): New.
21624 (add_var_loc_to_decl): Add view param. Test it against last.
21625 (new_loc_list): Add view params. Record them.
21626 (AT_loc_list_ptr): Handle loc and view lists.
21627 (view_list_to_loc_list_val_node): New.
21628 (print_dw_val): Handle dw_val_class_view_list.
21629 (size_of_die): Likewise.
21630 (value_format): Likewise.
21631 (loc_list_has_views): New.
21632 (gen_llsym): Set vl_symbol too.
21633 (maybe_gen_llsym, skip_loc_list_entry): New.
21634 (dwarf2out_maybe_output_loclist_view_pair): New.
21635 (output_loc_list): Output view list or entries too.
21636 (output_view_list_offset): New.
21637 (output_die): Handle dw_val_class_view_list.
21638 (output_dwarf_version): New.
21639 (output_compilation_unit_header): Use it.
21640 (output_skeleton_debug_sections): Likewise.
21641 (output_rnglists, output_line_info): Likewise.
21642 (output_pubnames, output_aranges): Update version comments.
21643 (output_one_line_info_table): Output view numbers in asm comments.
21644 (dw_loc_list): Determine current endview, pass it to new_loc_list.
21645 Call maybe_gen_llsym.
21646 (loc_list_from_tree_1): Adjust.
21647 (add_AT_location_description): Create view list attribute if
21648 needed, check it's absent otherwise.
21649 (convert_cfa_to_fb_loc_list): Adjust.
21650 (maybe_emit_file): Call output_asm_line_debug_info for test.
21651 (dwarf2out_var_location): Reset views as needed. Precompute
21652 add_var_loc_to_decl args. Call get_attr_min_length only if we have the
21653 attribute. Set view.
21654 (new_line_info_table): Reset next view.
21655 (set_cur_line_info_table): Call output_asm_line_debug_info for test.
21656 (dwarf2out_source_line): Likewise. Output view resets and labels to
21657 the assembler, or select appropriate line info opcodes.
21658 (prune_unused_types_walk_attribs): Handle dw_val_class_view_list.
21659 (optimize_string_length): Catch it. Adjust.
21660 (resolve_addr): Copy vl_symbol along with ll_symbol. Handle
21661 dw_val_class_view_list, and remove it if no longer needed.
21662 (hash_loc_list): Hash view numbers.
21663 (loc_list_hasher::equal): Compare them.
21664 (optimize_location_lists): Check whether a view list symbol is
21665 needed, and whether the locview attribute is present, and
21666 whether they match. Remove the locview attribute if no longer
21668 (index_location_lists): Call skip_loc_list_entry for test.
21669 (dwarf2out_finish): Call output_asm_line_debug_info for test.
21670 Use output_dwarf_version.
21671 * dwarf2out.h (enum dw_val_class): Add dw_val_class_view_list.
21672 (struct dw_val_node): Add val_view_list.
21673 * final.c (SEEN_NEXT_VIEW): New.
21674 (set_next_view_needed): New.
21675 (clear_next_view_needed): New.
21676 (maybe_output_next_view): New.
21677 (final_start_function): Rename to...
21678 (final_start_function_1): ... this. Take pointer to FIRST,
21679 add SEEN parameter. Emit param bindings in the initial view.
21680 (final_start_function): Reintroduce SEEN-less interface.
21681 (final): Rename to...
21682 (final_1): ... this. Take SEEN parameter. Output final pending
21683 next view at the end.
21684 (final): Reintroduce seen-less interface.
21685 (final_scan_insn): Output pending next view before switching
21686 sections or ending a block. Mark the next view as needed when
21687 outputting variable locations. Notify debug backend of section
21688 changes, and of location view changes.
21689 (rest_of_handle_final): Adjust.
21690 * toplev.c (process_options): Autodetect value for debug variable
21691 location views option. Warn on incompat5 without -gdwarf-5.
21692 * doc/invoke.texi (gvariable-location-views): New.
21693 (gvariable-location-views=incompat5): New.
21694 (gno-variable-location-views): New.
21696 2018-02-08 David Malcolm <dmalcolm@redhat.com>
21698 PR tree-optimization/84136
21699 * tree-cfg.c (find_taken_edge_computed_goto): Remove assertion
21700 that the result of find_edge is non-NULL.
21702 2018-02-08 Sergey Shalnov <sergey.shalnov@intel.com>
21705 * config/i386/x86-tune-costs.h (skylake_cost): Fix cost of
21706 storing integer register in SImode. Fix cost of 256 and 512
21707 byte aligned SSE register store.
21709 2018-02-08 Sergey Shalnov <sergey.shalnov@intel.com>
21711 * config/i386/i386.c (ix86_multiplication_cost): Fix
21712 multiplication cost for TARGET_AVX512DQ.
21714 2018-02-08 Marek Polacek <polacek@redhat.com>
21716 PR tree-optimization/84238
21717 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Verify the result of
21720 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
21722 PR tree-optimization/84265
21723 * tree-vect-stmts.c (vectorizable_store): Don't treat
21724 VMAT_CONTIGUOUS accesses as grouped.
21725 (vectorizable_load): Likewise.
21727 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
21729 PR tree-optimization/81635
21730 * wide-int.h (wi::round_down_for_mask, wi::round_up_for_mask): Declare.
21731 * wide-int.cc (wi::round_down_for_mask, wi::round_up_for_mask)
21732 (test_round_for_mask): New functions.
21733 (wide_int_cc_tests): Call test_round_for_mask.
21734 * tree-vrp.h (intersect_range_with_nonzero_bits): Declare.
21735 * tree-vrp.c (intersect_range_with_nonzero_bits): New function.
21736 * tree-data-ref.c (split_constant_offset_1): Use it to refine the
21737 range returned by get_range_info.
21739 2018-02-08 Jan Hubicka <hubicka@ucw.cz>
21742 * cgraph.h (symtab_node::output_to_lto_symbol_table_p): Declare
21743 * symtab.c: Include builtins.h
21744 (symtab_node::output_to_lto_symbol_table_p): Move here
21745 from lto-streamer-out.c:output_symbol_p.
21746 * lto-streamer-out.c (write_symbol): Turn early exit to assert.
21747 (output_symbol_p): Move all logic to symtab.c
21748 (produce_symtab): Update.
21750 2018-02-08 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
21752 * config/s390/s390-opts.h (enum indirect_branch): Define.
21753 * config/s390/s390-protos.h (s390_return_addr_from_memory)
21754 (s390_indirect_branch_via_thunk)
21755 (s390_indirect_branch_via_inline_thunk): Add function prototypes.
21756 (enum s390_indirect_branch_type): Define.
21757 * config/s390/s390.c (struct s390_frame_layout, struct
21758 machine_function): Remove.
21759 (indirect_branch_prez10thunk_mask, indirect_branch_z10thunk_mask)
21760 (indirect_branch_table_label_no, indirect_branch_table_name):
21762 (INDIRECT_BRANCH_NUM_OPTIONS): Define macro.
21763 (enum s390_indirect_branch_option): Define.
21764 (s390_return_addr_from_memory): New function.
21765 (s390_handle_string_attribute): New function.
21766 (s390_attribute_table): Add new attribute handler.
21767 (s390_execute_label): Handle UNSPEC_EXECUTE_JUMP patterns.
21768 (s390_indirect_branch_via_thunk): New function.
21769 (s390_indirect_branch_via_inline_thunk): New function.
21770 (s390_function_ok_for_sibcall): When jumping via thunk disallow
21771 sibling call optimization for non z10 compiles.
21772 (s390_emit_call): Force indirect branch target to be a single
21773 register. Add r1 clobber for non-z10 compiles.
21774 (s390_emit_epilogue): Emit return jump via return_use expander.
21775 (s390_reorg): Handle JUMP_INSNs as execute targets.
21776 (s390_option_override_internal): Perform validity checks for the
21777 new command line options.
21778 (s390_indirect_branch_attrvalue): New function.
21779 (s390_indirect_branch_settings): New function.
21780 (s390_set_current_function): Invoke s390_indirect_branch_settings.
21781 (s390_output_indirect_thunk_function): New function.
21782 (s390_code_end): Implement target hook.
21783 (s390_case_values_threshold): Implement target hook.
21784 (TARGET_ASM_CODE_END, TARGET_CASE_VALUES_THRESHOLD): Define target
21786 * config/s390/s390.h (struct s390_frame_layout)
21787 (struct machine_function): Move here from s390.c.
21788 (TARGET_INDIRECT_BRANCH_NOBP_RET)
21789 (TARGET_INDIRECT_BRANCH_NOBP_JUMP)
21790 (TARGET_INDIRECT_BRANCH_NOBP_JUMP_THUNK)
21791 (TARGET_INDIRECT_BRANCH_NOBP_JUMP_INLINE_THUNK)
21792 (TARGET_INDIRECT_BRANCH_NOBP_CALL)
21793 (TARGET_DEFAULT_INDIRECT_BRANCH_TABLE)
21794 (TARGET_INDIRECT_BRANCH_THUNK_NAME_EXRL)
21795 (TARGET_INDIRECT_BRANCH_THUNK_NAME_EX)
21796 (TARGET_INDIRECT_BRANCH_TABLE): Define macros.
21797 * config/s390/s390.md (UNSPEC_EXECUTE_JUMP)
21798 (INDIRECT_BRANCH_THUNK_REGNUM): Define constants.
21799 (mnemonic attribute): Add values which aren't recognized
21801 ("*cjump_long", "*icjump_long", "*basr", "*basr_r"): Disable
21802 pattern for branch conversion. Fix mnemonic attribute.
21803 ("*c<code>", "*sibcall_br", "*sibcall_value_br", "*return"): Emit
21804 indirect branch via thunk if requested.
21805 ("indirect_jump", "<code>"): Expand patterns for branch conversion.
21806 ("*indirect_jump"): Disable for branch conversion using out of
21808 ("indirect_jump_via_thunk<mode>_z10")
21809 ("indirect_jump_via_thunk<mode>")
21810 ("indirect_jump_via_inlinethunk<mode>_z10")
21811 ("indirect_jump_via_inlinethunk<mode>", "*casesi_jump")
21812 ("casesi_jump_via_thunk<mode>_z10", "casesi_jump_via_thunk<mode>")
21813 ("casesi_jump_via_inlinethunk<mode>_z10")
21814 ("casesi_jump_via_inlinethunk<mode>", "*basr_via_thunk<mode>_z10")
21815 ("*basr_via_thunk<mode>", "*basr_r_via_thunk_z10")
21816 ("*basr_r_via_thunk", "return<mode>_prez10"): New pattern.
21817 ("*indirect2_jump"): Disable for branch conversion.
21818 ("casesi_jump"): Turn into expander and expand patterns for branch
21820 ("return_use"): New expander.
21821 ("*return"): Emit return via thunk and rename it to ...
21822 ("*return<mode>"): ... this one.
21823 * config/s390/s390.opt: Add new options and and enum for the
21826 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
21828 * lra-constraints.c (match_reload): Unconditionally use
21829 gen_lowpart_SUBREG, rather than selecting between that
21830 and equivalent gen_rtx_SUBREG code.
21832 2018-02-08 Richard Biener <rguenther@suse.de>
21834 PR tree-optimization/84233
21835 * tree-ssa-phiprop.c (propagate_with_phi): Use separate
21836 changed flag instead of boguously re-using phi_inserted.
21838 2018-02-08 Martin Jambor <mjambor@suse.cz>
21840 * hsa-gen.c (get_symbol_for_decl): Set program allocation for
21841 static local variables.
21843 2018-02-08 Richard Biener <rguenther@suse.de>
21845 PR tree-optimization/84278
21846 * tree-vect-stmts.c (vectorizable_store): When looking for
21847 smaller vector types to perform grouped strided loads/stores
21848 make sure the mode is supported by the target.
21849 (vectorizable_load): Likewise.
21851 2018-02-08 Wilco Dijkstra <wdijkstr@arm.com>
21853 * config/aarch64/aarch64.c (aarch64_components_for_bb):
21854 Increase LDP/STP opportunities by adding adjacent callee-saves.
21856 2018-02-08 Wilco Dijkstra <wdijkstr@arm.com>
21858 PR rtl-optimization/84068
21859 PR rtl-optimization/83459
21860 * haifa-sched.c (rank_for_schedule): Fix SCHED_PRESSURE_MODEL sorting.
21862 2018-02-08 Aldy Hernandez <aldyh@redhat.com>
21864 PR tree-optimization/84224
21865 * gimple-ssa-warn-alloca.c (pass_walloca::execute): Remove assert.
21866 * calls.c (gimple_alloca_call_p): Only return TRUE when we have
21867 non-zero arguments.
21869 2018-02-07 Iain Sandoe <iain@codesourcery.com>
21872 * config/rs6000/altivec.md (*restore_world): Remove LR use.
21873 * config/rs6000/predicates.md (restore_world_operation): Adjust op
21874 count, remove one USE.
21876 2018-02-07 Michael Meissner <meissner@linux.vnet.ibm.com>
21878 * doc/install.texi (Configuration): Document the
21879 --with-long-double-format={ibm,ieee} PowerPC configuration
21883 * config/rs6000/rs6000.md (fix_trunc<SFDF:mode><QHI:mode>2):
21884 Convert from define_expand to be define_insn_and_split. Rework
21885 float/double/_Float128 conversions to QI/HI/SImode to work with
21886 both ISA 2.07 (power8) or ISA 3.0 (power9). Fix regression where
21887 conversions to QI/HImode types did a store and then a load to
21888 truncate the value. For conversions to VSX registers, don't split
21889 the insn, instead emit the code directly. Use the code iterator
21890 any_fix to combine signed and unsigned conversions.
21891 (fix<uns>_trunc<SFDF:mode>si2_p8): Likewise.
21892 (fixuns_trunc<SFDF:mode><QHI:mode>2): Likewise.
21893 (fix_trunc<IEEE128:mode><QHI:mode>2): Likewise.
21894 (fix<uns>_trunc<SFDF:mode><QHI:mode>2): Likewise.
21895 (fix_<mode>di2_hw): Likewise.
21896 (fixuns_<mode>di2_hw): Likewise.
21897 (fix_<mode>si2_hw): Likewise.
21898 (fixuns_<mode>si2_hw): Likewise.
21899 (fix<uns>_<IEEE128:mode><SDI:mode>2_hw): Likewise.
21900 (fix<uns>_trunc<IEEE128:mode><QHI:mode>2): Likewise.
21901 (fctiw<u>z_<mode>_smallint): Rename fctiw<u>z_<mode>_smallint to
21902 fix<uns>_trunc<SFDF:mode>si2_p8.
21903 (fix_trunc<SFDF:mode><QHI:mode>2_internal): Delete, no longer used.
21904 (fixuns_trunc<SFDF:mode><QHI:mode>2_internal): Likewise.
21905 (fix<uns>_<mode>_mem): Likewise.
21906 (fctiw<u>z_<mode>_mem): Likewise.
21907 (fix<uns>_<mode>_mem): Likewise.
21908 (fix<uns>_trunc<SFDF:mode><QHSI:mode>2_mem): On ISA 3.0, prevent
21909 the register allocator from doing a direct move to the GPRs to do
21910 a store, and instead use the ISA 3.0 store byte/half-word from
21911 vector register instruction. For IEEE 128-bit floating point,
21912 also optimize stores of 32-bit ints.
21913 (fix<uns>_trunc<IEEE128:mode><QHSI:mode>2_mem): Likewise.
21915 2018-02-07 Alan Hayward <alan.hayward@arm.com>
21917 * genextract.c (push_pathstr_operand): New function to support
21919 (walk_rtx): Call push_pathstr_operand.
21920 (print_path): Support [a-zA-Z].
21922 2018-02-07 Richard Biener <rguenther@suse.de>
21924 PR tree-optimization/84037
21925 * tree-vectorizer.h (struct _loop_vec_info): Add ivexpr_map member.
21926 (cse_and_gimplify_to_preheader): Declare.
21927 (vect_get_place_in_interleaving_chain): Likewise.
21928 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
21930 (_loop_vec_info::~_loop_vec_info): Delete it.
21931 (cse_and_gimplify_to_preheader): New function.
21932 * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Export.
21933 * tree-vect-stmts.c (vectorizable_store): CSE base and steps.
21934 (vectorizable_load): Likewise. For grouped stores always base
21935 the IV on the first element.
21936 * tree-vect-loop-manip.c (vect_loop_versioning): Unshare versioning
21937 condition before gimplifying.
21939 2018-02-07 Jakub Jelinek <jakub@redhat.com>
21941 * tree-eh.c (operation_could_trap_helper_p): Ignore honor_trapv for
21942 *DIV_EXPR and *MOD_EXPR.
21944 2018-02-07 H.J. Lu <hongjiu.lu@intel.com>
21947 * config/i386/i386.c (ix86_option_override_internal): Mask out
21948 the CF_SET bit when checking -fcf-protection.
21950 2018-02-07 Tom de Vries <tom@codesourcery.com>
21953 * omp-expand.c (expand_oacc_collapse_init): Ensure diff_type is large
21956 2018-02-07 Richard Biener <rguenther@suse.de>
21958 PR tree-optimization/84204
21959 * tree-chrec.c (chrec_fold_plus_1): Remove size limiting in
21962 PR tree-optimization/84205
21963 * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Also
21964 special-case isl_ast_op_zdiv_r.
21966 PR tree-optimization/84223
21967 * graphite-scop-detection.c (gather_bbs::before_dom_children):
21968 Only add conditions from within the region.
21969 (gather_bbs::after_dom_children): Adjust.
21971 2018-02-07 Georg-Johann Lay <avr@gjlay.de>
21974 * config/avr/avr.h (GENERAL_REGNO_P, GENERAL_REG_P): New macros.
21975 * config/avr/avr.md: Only post-reload split REG-REG moves if
21976 either register is GENERAL_REG_P.
21978 2018-02-07 Jakub Jelinek <jakub@redhat.com>
21980 PR tree-optimization/84235
21981 * tree-ssa-scopedtables.c
21982 (avail_exprs_stack::simplify_binary_operation): Fir MINUS_EXPR, punt
21983 if the subtraction is performed in floating point type where NaNs are
21984 honored. For *DIV_EXPR, punt for ALL_FRACT_MODE_Ps where we can't
21985 build 1. Formatting fix.
21987 2018-02-06 Jakub Jelinek <jakub@redhat.com>
21990 * config/i386/i386.c (rest_of_insert_endbranch): Only skip
21991 NOTE_INSN_CALL_ARG_LOCATION after a call, not anything else,
21992 and skip it regardless of bb boundaries. Use CALL_P macro,
21993 don't test INSN_P (insn) together with CALL_P or JUMP_P check
21994 unnecessarily, formatting fix.
21996 2018-02-06 Michael Collison <michael.collison@arm.com>
21998 * config/arm/thumb2.md:
21999 (*thumb2_mov_negscc): Split only if TARGET_THUMB2 && !arm_restrict_it.
22000 (*thumb_mov_notscc): Ditto.
22002 2018-02-06 Michael Meissner <meissner@linux.vnet.ibm.com>
22005 * config/rs6000/rs6000.md (su code attribute): Use "u" for
22006 unsigned_fix, not "s".
22008 2018-02-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
22010 * configure.ac (gcc_fn_eh_frame_ro): New function.
22011 (gcc_cv_as_cfi_directive): Check both 32 and 64-bit assembler for
22012 correct .eh_frame permissions.
22013 * configure: Regenerate.
22015 2018-02-06 Andrew Jenner <andrew@codeourcery.com>
22017 * doc/invoke.texi: Add section for the PowerPC SPE backend. Remove
22018 irrelevant options.
22020 2018-02-06 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
22022 * config/rs6000/rs6000.c (rs6000_option_override_internal):
22023 Display warning message for -mno-speculate-indirect-jumps.
22025 2018-02-06 Andrew Jenner <andrew@codesourcery.com>
22027 * config/powerpcspe/powerpcspe.opt: (msimple-fpu, mfpu) Add
22029 * config/powerpcspe/sysv4.opt (mbit-align): Likewise.
22031 2018-02-06 Aldy Hernandez <aldyh@redhat.com>
22033 PR tree-optimization/84225
22034 * tree-eh.c (find_trapping_overflow): Only call
22035 operation_no_trapping_overflow when ANY_INTEGRAL_TYPE_P.
22037 2018-02-06 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
22040 * config/i386/i386.c: Reimplement the check of possible options
22041 -mibt/-mshstk conbination. Change error messages.
22042 * doc/invoke.texi: Fix a typo: remove extra '='.
22044 2018-02-06 Marek Polacek <polacek@redhat.com>
22046 PR tree-optimization/84228
22047 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Skip debug statements.
22049 2018-02-06 Tamar Christina <tamar.christina@arm.com>
22052 * config/arm/arm.c (arm_print_asm_arch_directives): Record already
22053 emitted arch directives.
22054 * config/arm/arm-c.c (arm_cpu_builtins): Undefine __ARM_ARCH and
22055 __ARM_FEATURE_COPROC before changing architectures.
22057 2018-02-06 Richard Biener <rguenther@suse.de>
22059 * config/i386/i386.c (print_reg): Fix typo.
22060 (ix86_loop_unroll_adjust): Do not unroll beyond the original nunroll.
22062 2018-02-06 Eric Botcazou <ebotcazou@adacore.com>
22064 * configure: Regenerate.
22066 2018-02-05 Martin Sebor <msebor@redhat.com>
22068 PR tree-optimization/83369
22069 * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Use %G to print
22072 2018-02-05 Martin Liska <mliska@suse.cz>
22074 * doc/invoke.texi: Cherry-pick upstream r323995.
22076 2018-02-05 Richard Sandiford <richard.sandiford@linaro.org>
22078 * ira.c (ira_init_register_move_cost): Adjust comment.
22080 2018-02-05 Martin Liska <mliska@suse.cz>
22082 PR gcov-profile/84137
22083 * doc/gcov.texi: Fix typo in documentation.
22085 2018-02-05 Martin Liska <mliska@suse.cz>
22087 PR gcov-profile/83879
22088 * doc/gcov.texi: Document necessity of --dynamic-list-data when
22089 using dlopen functionality.
22091 2018-02-05 Olga Makhotina <olga.makhotina@intel.com>
22093 * config/i386/avx512dqintrin.h (_mm_mask_range_sd, _mm_maskz_range_sd,
22094 _mm_mask_range_round_sd, _mm_maskz_range_round_sd, _mm_mask_range_ss,
22095 _mm_maskz_range_ss, _mm_mask_range_round_ss,
22096 _mm_maskz_range_round_ss): New intrinsics.
22097 (__builtin_ia32_rangesd128_round)
22098 (__builtin_ia32_rangess128_round): Remove.
22099 (__builtin_ia32_rangesd128_mask_round,
22100 __builtin_ia32_rangess128_mask_round): New builtins.
22101 * config/i386/i386-builtin.def (__builtin_ia32_rangesd128_round,
22102 __builtin_ia32_rangess128_round): Remove.
22103 (__builtin_ia32_rangesd128_mask_round,
22104 __builtin_ia32_rangess128_mask_round): New builtins.
22105 * config/i386/sse.md (ranges<mode><round_saeonly_name>): Renamed to ...
22106 (ranges<mode><mask_scalar_name><round_saeonly_scalar_name>): ... this.
22107 ((match_operand:VF_128 2 "<round_saeonly_nimm_predicate>"
22108 "<round_saeonly_constraint>")): Changed to ...
22109 ((match_operand:VF_128 2 "<round_saeonly_scalar_nimm_predicate>"
22110 "<round_saeonly_scalar_constraint>")): ... this.
22111 ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_op4>%2, %1, %0|
22112 %0, %1, %2<round_saeonly_op4>, %3}"): Changed to ...
22113 ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_scalar_mask_op4>%2,
22114 %1, %0<mask_scalar_operand4>|%0<mask_scalar_operand4>, %1,
22115 %2<round_saeonly_scalar_mask_op4>, %3}"): ... this.
22117 2018-02-02 Andrew Jenner <andrew@codesourcery.com>
22119 * config/powerpcspe/powerpcspe.opt: Add Undocumented to irrelevant
22121 * config/powerpcspe/powerpcspe-tables.opt (rs6000_cpu_opt_value):
22122 Remove all values except native, 8540 and 8548.
22124 2018-02-02 H.J. Lu <hongjiu.lu@intel.com>
22126 * config/i386/i386.c (ix86_output_function_return): Pass
22127 INVALID_REGNUM, instead of -1, as invalid register number to
22128 indirect_thunk_name and output_indirect_thunk.
22130 2018-02-02 Julia Koval <julia.koval@intel.com>
22132 * config.gcc: Add -march=icelake.
22133 * config/i386/driver-i386.c (host_detect_local_cpu): Detect icelake.
22134 * config/i386/i386-c.c (ix86_target_macros_internal): Handle icelake.
22135 * config/i386/i386.c (processor_costs): Add m_ICELAKE.
22136 (PTA_ICELAKE, PTA_AVX512VNNI, PTA_GFNI, PTA_VAES, PTA_AVX512VBMI2,
22137 PTA_VPCLMULQDQ, PTA_RDPID, PTA_AVX512BITALG): New.
22138 (processor_target_table): Add icelake.
22139 (ix86_option_override_internal): Handle new PTAs.
22140 (get_builtin_code_for_version): Handle icelake.
22141 (M_INTEL_COREI7_ICELAKE): New.
22142 (fold_builtin_cpu): Handle icelake.
22143 * config/i386/i386.h (TARGET_ICELAKE, PROCESSOR_ICELAKE): New.
22144 * doc/invoke.texi: Add -march=icelake.
22146 2018-02-02 Julia Koval <julia.koval@intel.com>
22148 * config/i386/i386.c (ix86_option_override_internal): Change flags type
22149 to wide_int_bitmask.
22150 * wide-int-bitmask.h: New.
22152 2018-02-02 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
22155 * config/i386/i386.md: Replace Pmode with word_mode in
22156 builtin_setjmp_setup and builtin_longjmp to support x32.
22158 2018-02-01 Peter Bergner <bergner@vnet.ibm.com>
22162 * config/rs6000/driver-rs6000.c: #include "diagnostic.h".
22164 (rs6000_supported_cpu_names): New static variable.
22165 (linux_cpu_translation_table): Likewise.
22166 (elf_platform) <cpu>: Define new static variable and use it.
22167 Translate kernel AT_PLATFORM name to canonical name if needed.
22168 Error if platform name is unknown.
22170 2018-02-01 Aldy Hernandez <aldyh@redhat.com>
22173 * config/pa/predicates.md (base14_operand): Handle E_VOIDmode.
22175 2018-02-01 Jeff Law <law@redhat.com>
22178 * config/i386/i386.c (release_scratch_register_on_entry): Add new
22179 OFFSET and RELEASE_VIA_POP arguments. Use SP+OFFSET to restore
22180 the scratch if RELEASE_VIA_POP is false.
22181 (ix86_adjust_stack_and_probe_stack_clash): Un-constify SIZE.
22182 If we have to save a temporary register, decrement SIZE appropriately.
22183 Pass new arguments to release_scratch_register_on_entry.
22184 (ix86_adjust_stack_and_probe): Likewise.
22185 (ix86_emit_probe_stack_range): Pass new arguments to
22186 release_scratch_register_on_entry.
22188 2018-02-01 Uros Bizjak <ubizjak@gmail.com>
22190 PR rtl-optimization/84157
22191 * combine.c (change_zero_ext): Use REG_P predicate in
22192 front of HARD_REGISTER_P predicate.
22194 2018-02-01 Georg-Johann Lay <avr@gjlay.de>
22196 * config/avr/avr.c (avr_option_override): Move disabling of
22197 -fdelete-null-pointer-checks to...
22198 * common/config/avr/avr-common.c (avr_option_optimization_table):
22201 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
22203 PR tree-optimization/81635
22204 * tree-data-ref.c (split_constant_offset_1): For types that
22205 wrap on overflow, try to use range info to prove that wrapping
22208 2018-02-01 Renlin Li <renlin.li@arm.com>
22211 * config/aarch64/aarch64.c (aarch64_class_max_nregs): Handle
22212 TAILCALL_ADDR_REGS.
22213 (aarch64_register_move_cost): Likewise.
22214 * config/aarch64/aarch64.h (reg_class): Rename CALLER_SAVE_REGS to
22215 TAILCALL_ADDR_REGS.
22216 (REG_CLASS_NAMES): Likewise.
22217 (REG_CLASS_CONTENTS): Rename CALLER_SAVE_REGS to
22218 TAILCALL_ADDR_REGS. Remove IP registers.
22219 * config/aarch64/aarch64.md (Ucs): Update register constraint.
22221 2018-02-01 Richard Biener <rguenther@suse.de>
22223 * domwalk.h (dom_walker::dom_walker): Add additional constructor
22224 for specifying RPO order and allow NULL for that.
22225 * domwalk.c (dom_walker::dom_walker): Likewise.
22226 (dom_walker::walk): Handle NULL RPO order.
22227 * tree-into-ssa.c (rewrite_dom_walker): Do not walk dom children
22229 (rewrite_update_dom_walker): Likewise.
22230 (mark_def_dom_walker): Likewise.
22232 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
22234 * config/aarch64/aarch64-protos.h (aarch64_split_sve_subreg_move)
22235 (aarch64_maybe_expand_sve_subreg_move): Declare.
22236 * config/aarch64/aarch64.md (UNSPEC_REV_SUBREG): New unspec.
22237 * config/aarch64/predicates.md (aarch64_any_register_operand): New
22239 * config/aarch64/aarch64-sve.md (mov<mode>): Optimize subreg moves
22240 that are semantically a reverse operation.
22241 (*aarch64_sve_mov<mode>_subreg_be): New pattern.
22242 * config/aarch64/aarch64.c (aarch64_maybe_expand_sve_subreg_move):
22243 (aarch64_replace_reg_mode, aarch64_split_sve_subreg_move): New
22245 (aarch64_can_change_mode_class): For big-endian, forbid changes
22246 between two SVE modes if they have different element sizes.
22248 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
22250 * config/aarch64/aarch64.c (aarch64_expand_sve_const_vector): Prefer
22251 the TImode handling for big-endian targets.
22253 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
22255 * config/aarch64/aarch64-sve.md (sve_ld1rq): Replace with...
22256 (*sve_ld1rq<Vesize>): ... this new pattern. Handle all element sizes,
22258 * config/aarch64/aarch64.c (aarch64_expand_sve_widened_duplicate):
22259 Remove BSWAP handing for big-endian targets and use the form of
22260 LD1RQ appropariate for the mode.
22262 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
22264 * config/aarch64/aarch64.c (aarch64_simd_valid_immediate): Handle
22265 all CONST_VECTOR_DUPLICATE_P vectors, not just those with a single
22266 duplicated element.
22268 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
22271 * config/aarch64/aarch64.c (aarch64_secondary_reload): Tighten
22272 check for operands that need to go through aarch64_sve_reload_be.
22274 2018-02-01 Jakub Jelinek <jakub@redhat.com>
22276 PR tree-optimization/81661
22277 PR tree-optimization/84117
22278 * tree-eh.h (rewrite_to_non_trapping_overflow): Declare.
22279 * tree-eh.c: Include gimplify.h.
22280 (find_trapping_overflow, replace_trapping_overflow,
22281 rewrite_to_non_trapping_overflow): New functions.
22282 * tree-vect-loop.c: Include tree-eh.h.
22283 (vect_get_loop_niters): Use rewrite_to_non_trapping_overflow.
22284 * tree-data-ref.c: Include tree-eh.h.
22285 (get_segment_min_max): Use rewrite_to_non_trapping_overflow.
22287 2018-01-31 Uros Bizjak <ubizjak@gmail.com>
22289 PR rtl-optimization/84123
22290 * combine.c (change_zero_ext): Check if hard register satisfies
22291 can_change_dest_mode before calling gen_lowpart_SUBREG.
22293 2018-01-31 Vladimir Makarov <vmakarov@redhat.com>
22296 * ira.c (ira_init_register_move_cost): Remove assert.
22298 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
22300 PR rtl-optimization/84071
22301 * doc/tm.texi.in (WORD_REGISTER_OPERATIONS): Add explicit case.
22302 * doc/tm.texi: Regenerate.
22304 2018-01-31 Richard Biener <rguenther@suse.de>
22306 PR tree-optimization/84132
22307 * tree-data-ref.c (analyze_miv_subscript): Properly
22308 check whether evolution_function_is_affine_multivariate_p
22309 before calling gcd_of_steps_may_divide_p.
22311 2018-01-31 Julia Koval <julia.koval@intel.com>
22314 * config/i386/i386.c (ix86_expand_builtin): Handle IX86_BUILTIN_RDPID.
22315 * config/i386/i386.md (rdpid_rex64) New.
22316 (rdpid): Make 32bit only.
22318 2018-01-29 Aldy Hernandez <aldyh@redhat.com>
22321 * tree-pretty-print.c (dump_generic_node): Handle a TYPE_NAME with
22322 an IDENTIFIER_NODE for FUNCTION_TYPE's.
22324 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
22327 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
22329 * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
22331 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
22333 PR rtl-optimization/84071
22334 * combine.c (record_dead_and_set_regs_1): Record the source unmodified
22335 for a paradoxical SUBREG on a WORD_REGISTER_OPERATIONS target.
22337 2018-01-31 Claudiu Zissulescu <claziss@synopsys.com>
22339 * config/arc/arc.c (arc_handle_aux_attribute): New function.
22340 (arc_attribute_table): Add 'aux' attribute.
22341 (arc_in_small_data_p): Consider aux like variables.
22342 (arc_is_aux_reg_p): New function.
22343 (arc_asm_output_aligned_decl_local): Ignore 'aux' like variables.
22344 (arc_get_aux_arg): New function.
22345 (prepare_move_operands): Handle aux-register access.
22346 (arc_handle_aux_attribute): New function.
22347 * doc/extend.texi (ARC Variable attributes): Add subsection.
22349 2018-01-31 Claudiu Zissulescu <claziss@synopsys.com>
22351 * config/arc/arc-protos.h (arc_is_uncached_mem_p): Function proto.
22352 * config/arc/arc.c (arc_handle_uncached_attribute): New function.
22353 (arc_attribute_table): Add 'uncached' attribute.
22354 (arc_print_operand): Print '.di' flag for uncached memory
22356 (arc_in_small_data_p): Do not consider for small data the uncached
22358 (arc_is_uncached_mem_p): New function.
22359 * config/arc/predicates.md (compact_store_memory_operand): Check
22360 for uncached memory accesses.
22361 (nonvol_nonimm_operand): Likewise.
22362 * doc/extend.texi (ARC Type Attribute): New subsection.
22364 2018-01-31 Jakub Jelinek <jakub@redhat.com>
22367 * common.opt (falign-functions=, falign-jumps=, falign-labels=,
22368 falign-loops=): Add Optimization flag.
22370 2018-01-30 Jeff Law <law@redhat.com>
22373 * i386.c (ix86_adjust_stack_and_probe_stack_clash): New argument
22374 INT_REGISTERS_SAVED. Check it prior to calling
22375 get_scratch_register_on_entry.
22376 (ix86_adjust_stack_and_probe): Similarly.
22377 (ix86_emit_probe_stack_range): Similarly.
22378 (ix86_expand_prologue): Corresponding changes.
22380 2018-01-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
22383 * config/sol2.h (STARTFILE_ARCH_SPEC): Use -std=c*,
22384 -std=iso9899:199409 instead of -pedantic to select values-Xc.o.
22386 2018-01-30 Vladimir Makarov <vmakarov@redhat.com>
22389 * lra-constraints.c (curr_insn_transform): Process AND in the
22392 2018-01-30 Jakub Jelinek <jakub@redhat.com>
22394 PR rtl-optimization/83986
22395 * sched-deps.c (sched_analyze_insn): For frame related insns, add anti
22396 dependence against last_pending_memory_flush in addition to
22397 pending_jump_insns.
22399 2018-01-30 Alexandre Oliva <aoliva@redhat.com>
22401 PR tree-optimization/81611
22402 * tree-ssa-dom.c (simple_iv_increment_p): Skip intervening
22405 2018-01-30 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
22408 * config/rs6000/rs6000.c (rs6000_internal_arg_pointer): Only return
22411 2018-01-30 Richard Biener <rguenther@suse.de>
22412 Jakub Jelinek <jakub@redhat.com>
22414 PR tree-optimization/84111
22415 * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1): Skip
22416 inner loops added during recursion, as they don't have up-to-date
22419 2018-01-30 Jan Hubicka <hubicka@ucw.cz>
22422 * ipa-inline.c (can_inline_edge_p): Break out late tests to...
22423 (can_inline_edge_by_limits_p): ... here.
22424 (can_early_inline_edge_p, check_callers,
22425 update_caller_keys, update_callee_keys, recursive_inlining,
22426 add_new_edges_to_heap, speculation_useful_p,
22427 inline_small_functions,
22428 inline_small_functions, flatten_function,
22429 inline_to_all_callers_1): Update.
22431 2018-01-30 Jan Hubicka <hubicka@ucw.cz>
22433 * profile-count.c (profile_count::combine_with_ipa_count): Handle
22436 2018-01-30 Richard Biener <rguenther@suse.de>
22438 PR tree-optimization/83008
22439 * tree-vect-slp.c (vect_analyze_slp_cost_1): Properly cost
22440 invariant and constant vector uses in stmts when they need
22441 more than one stmt.
22443 2018-01-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
22446 * configure.ac (gcc_cv_as_shf_merge): Disable on Solaris 10/x86.
22447 * configure: Regenerate.
22449 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
22451 * config/aarch64/aarch64-sve.md (*vec_extract<mode><Vel>_0): New
22453 (*vec_extract<mode><Vel>_v128): Require a nonzero lane number.
22454 Use gen_rtx_REG rather than gen_lowpart.
22456 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
22458 * lra-constraints.c (match_reload): Use subreg_lowpart_offset
22459 rather than 0 when creating partial subregs.
22461 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
22463 * vec-perm-indices.c (vec_perm_indices::series_p): Give examples
22466 2018-01-29 Michael Meissner <meissner@linux.vnet.ibm.com>
22469 * config/rs6000/rs6000.c (rs6000_setup_reg_addr_masks): If DFmode
22470 and SFmode can go in Altivec registers (-mcpu=power7 for DFmode,
22471 -mcpu=power8 for SFmode) don't set the PRE_INCDEC or PRE_MODIFY
22472 flags. This restores the settings used before the 2017-07-24.
22473 Turning off pre increment/decrement/modify allows IVOPTS to
22474 optimize DF/SF loops where the index is an int.
22476 2018-01-29 Richard Biener <rguenther@suse.de>
22477 Kelvin Nilsen <kelvin@gcc.gnu.org>
22480 * tree-vect-stmts.c (vectorizable_call): Don't call
22481 targetm.vectorize_builtin_md_vectorized_function if callee is
22484 2018-01-22 Carl Love <cel@us.ibm.com>
22486 * doc/extend.tex: Fix typo in second arg in
22487 __builtin_bcdadd_{lt|eq|gt|ov} and __builtin_bcdsub_{lt|eq|gt|ov}.
22489 2018-01-29 Richard Biener <rguenther@suse.de>
22491 PR tree-optimization/84086
22492 * tree-ssanames.c: Include cfgloop.h and tree-scalar-evolution.h.
22493 (flush_ssaname_freelist): When SSA names were released reset
22494 the SCEV hash table.
22496 2018-01-29 Richard Biener <rguenther@suse.de>
22498 PR tree-optimization/84057
22499 * tree-ssa-loop-ivcanon.c (unloop_loops): Deal with already
22500 removed paths when removing edges.
22502 2018-01-27 H.J. Lu <hongjiu.lu@intel.com>
22504 * doc/invoke.texi: Replace -mfunction-return==@var{choice} with
22505 -mfunction-return=@var{choice}.
22507 2018-01-27 Bernd Edlinger <bernd.edlinger@hotmail.de>
22509 PR diagnostic/84034
22510 * diagnostic-show-locus.c (get_line_width_without_trailing_whitespace):
22511 Handle CR like TAB.
22512 (layout::print_source_line): Likewise.
22513 (test_get_line_width_without_trailing_whitespace): Add test cases.
22515 2018-01-27 Jakub Jelinek <jakub@redhat.com>
22517 PR middle-end/84040
22518 * sched-deps.c (sched_macro_fuse_insns): Return immediately for
22521 2018-01-26 Jim Wilson <jimw@sifive.com>
22523 * config/riscv/riscv.h (MAX_FIXED_MODE_SIZE): New.
22525 * config/riscv/elf.h (LIB_SPEC): Don't include -lgloss when nosys.specs
22528 2018-01-26 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
22530 * config/aarch64/aarch64.md: Add peepholes for CMP + SUB -> SUBS
22531 and CMP + SUB-immediate -> SUBS.
22533 2018-01-26 Martin Sebor <msebor@redhat.com>
22535 PR tree-optimization/83896
22536 * tree-ssa-strlen.c (get_string_len): Rename...
22537 (get_string_cst_length): ...to this. Return HOST_WIDE_INT.
22538 Avoid assuming length is constant.
22539 (handle_char_store): Use HOST_WIDE_INT for string length.
22541 2018-01-26 Uros Bizjak <ubizjak@gmail.com>
22544 * config/i386/i386.md (*andndi3_doubleword): Add earlyclobber
22545 to (=&r,r,rm) alternative. Add (=r,0,rm) and (=r,r,0) alternatives.
22547 2018-01-26 Richard Biener <rguenther@suse.de>
22549 PR rtl-optimization/84003
22550 * dse.c (record_store): Only record redundant stores when
22551 the earlier store aliases at least all accesses the later one does.
22553 2018-01-26 Jakub Jelinek <jakub@redhat.com>
22555 PR rtl-optimization/83985
22556 * dce.c (deletable_insn_p): Return false for separate shrink wrapping
22557 REG_CFA_RESTORE insns.
22558 (delete_unmarked_insns): Don't ignore separate shrink wrapping
22559 REG_CFA_RESTORE insns here.
22562 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Don't
22563 use SSA_NAME_VAR as base for SSA_NAMEs with non-NULL SSA_NAME_VAR.
22565 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
22567 * config/arc/arc-arch.h (arc_tune_attr): Add ARC_TUNE_CORE_3.
22568 * config/arc/arc.c (arc_sched_issue_rate): Use ARC_TUNE_... .
22569 (arc_init): Likewise.
22570 (arc_override_options): Likewise.
22571 (arc_file_start): Choose Tag_ARC_CPU_variation based on arc_tune
22573 (hwloop_fail): Use TARGET_DBNZ when we want to check for dbnz insn
22575 * config/arc/arc.h (TARGET_DBNZ): Define.
22576 * config/arc/arc.md (attr tune): Add core_3, use ARC_TUNE_... to
22577 properly set the tune attribute.
22578 (dbnz): Use TARGET_DBNZ guard.
22579 * config/arc/arc.opt (mtune): Add core3 option.
22581 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
22583 * config/arc/arc.c (arc_delegitimize_address_0): Refactored to
22584 recognize new pic like addresses.
22585 (arc_delegitimize_address): Clean up.
22587 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
22589 * config/arc/arc-arches.def: Option mrf16 valid for all
22591 * config/arc/arc-c.def (__ARC_RF16__): New predefined macro.
22592 * config/arc/arc-cpus.def (em_mini): New cpu with rf16 on.
22593 * config/arc/arc-options.def (FL_RF16): Add mrf16 option.
22594 * config/arc/arc-tables.opt: Regenerate.
22595 * config/arc/arc.c (arc_conditional_register_usage): Handle
22596 reduced register file case.
22597 (arc_file_start): Set must have build attributes.
22598 * config/arc/arc.h (MAX_ARC_PARM_REGS): Conditional define using
22599 mrf16 option value.
22600 * config/arc/arc.opt (mrf16): Add new option.
22601 * config/arc/elf.h (ATTRIBUTE_PCS): Define.
22602 * config/arc/genmultilib.awk: Handle new mrf16 option.
22603 * config/arc/linux.h (ATTRIBUTE_PCS): Define.
22604 * config/arc/t-multilib: Regenerate.
22605 * doc/invoke.texi (ARC Options): Document mrf16 option.
22607 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
22609 * config/arc/arc-protos.h: Add arc_is_secure_call_p proto.
22610 * config/arc/arc.c (arc_handle_secure_attribute): New function.
22611 (arc_attribute_table): Add 'secure_call' attribute.
22612 (arc_print_operand): Print secure call operand.
22613 (arc_function_ok_for_sibcall): Don't optimize tail calls when
22615 (arc_is_secure_call_p): New function. * config/arc/arc.md
22616 (call_i): Add support for sjli instruction.
22617 (call_value_i): Likewise.
22618 * config/arc/constraints.md (Csc): New constraint.
22620 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
22621 John Eric Martin <John.Martin@emmicro-us.com>
22623 * config/arc/arc-protos.h: Add arc_is_jli_call_p proto.
22624 * config/arc/arc.c (_arc_jli_section): New struct.
22625 (arc_jli_section): New type.
22626 (rc_jli_sections): New static variable.
22627 (arc_handle_jli_attribute): New function.
22628 (arc_attribute_table): Add jli_always and jli_fixed attribute.
22629 (arc_file_end): New function.
22630 (TARGET_ASM_FILE_END): Define.
22631 (arc_print_operand): Reuse 'S' letter for JLI output instruction.
22632 (arc_add_jli_section): New function.
22633 (jli_call_scan): Likewise.
22634 (arc_reorg): Call jli_call_scan.
22635 (arc_output_addsi): Remove 'S' from printing asm operand.
22636 (arc_is_jli_call_p): New function.
22637 * config/arc/arc.md (movqi_insn): Remove 'S' from printing asm
22639 (movhi_insn): Likewise.
22640 (movsi_insn): Likewise.
22641 (movsi_set_cc_insn): Likewise.
22642 (loadqi_update): Likewise.
22643 (load_zeroextendqisi_update): Likewise.
22644 (load_signextendqisi_update): Likewise.
22645 (loadhi_update): Likewise.
22646 (load_zeroextendhisi_update): Likewise.
22647 (load_signextendhisi_update): Likewise.
22648 (loadsi_update): Likewise.
22649 (loadsf_update): Likewise.
22650 (movsicc_insn): Likewise.
22651 (bset_insn): Likewise.
22652 (bxor_insn): Likewise.
22653 (bclr_insn): Likewise.
22654 (bmsk_insn): Likewise.
22655 (bicsi3_insn): Likewise.
22656 (cmpsi_cc_c_insn): Likewise.
22657 (movsi_ne): Likewise.
22658 (movsi_cond_exec): Likewise.
22659 (clrsbsi2): Likewise.
22660 (norm_f): Likewise.
22670 (call_i): Remove 'S' asm letter, add jli instruction.
22671 (call_value_i): Likewise.
22672 * config/arc/arc.op (mjli-always): New option.
22673 * config/arc/constraints.md (Cji): New constraint.
22674 * config/arc/fpx.md (addsf3_fpx): Remove 'S' from printing asm
22676 (subsf3_fpx): Likewise.
22677 (mulsf3_fpx): Likewise.
22678 * config/arc/simdext.md (vendrec_insn): Remove 'S' from printing
22680 * doc/extend.texi (ARC): Document 'jli-always' and 'jli-fixed'
22681 function attrbutes.
22682 * doc/invoke.texi (ARC): Document mjli-always option.
22684 2018-01-26 Sebastian Perta <sebastian.perta@renesas.com>
22686 * config/rl78/rl78.c (rl78_addsi3_internal): If operand 2 is const
22687 avoid addition with 0 and use incw and decw where possible.
22689 2018-01-26 Richard Biener <rguenther@suse.de>
22691 PR tree-optimization/81082
22692 * fold-const.c (fold_plusminus_mult_expr): Do not perform the
22693 association if it requires casting to unsigned.
22694 * match.pd ((A * C) +- (B * C) -> (A+-B)): New patterns derived
22695 from fold_plusminus_mult_expr to catch important cases late when
22696 range info is available.
22698 2018-01-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
22700 * config/i386/sol2.h (USE_HIDDEN_LINKONCE): Remove.
22701 * configure.ac (hidden_linkonce): New test.
22702 * configure: Regenerate.
22703 * config.in: Regenerate.
22705 2018-01-26 Julia Koval <julia.koval@intel.com>
22707 * config/i386/avx512bitalgintrin.h (_mm512_bitshuffle_epi64_mask,
22708 _mm512_mask_bitshuffle_epi64_mask, _mm256_bitshuffle_epi64_mask,
22709 _mm256_mask_bitshuffle_epi64_mask, _mm_bitshuffle_epi64_mask,
22710 _mm_mask_bitshuffle_epi64_mask): Fix type.
22711 * config/i386/i386-builtin-types.def (UHI_FTYPE_V2DI_V2DI_UHI,
22712 USI_FTYPE_V4DI_V4DI_USI): Remove.
22713 * config/i386/i386-builtin.def (__builtin_ia32_vpshufbitqmb512_mask,
22714 __builtin_ia32_vpshufbitqmb256_mask,
22715 __builtin_ia32_vpshufbitqmb128_mask): Fix types.
22716 * config/i386/i386.c (ix86_expand_args_builtin): Remove old types.
22717 * config/i386/sse.md (VI1_AVX512VLBW): Change types.
22719 2018-01-26 Alan Modra <amodra@gmail.com>
22722 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Exclude
22723 UNSPEC_VBPERMQ. Sort other unspecs.
22725 2018-01-25 David Edelsohn <dje.gcc@gmail.com>
22727 * doc/invoke.texi (PowerPC Options): Document 'native' cpu type.
22729 2018-01-25 Jan Hubicka <hubicka@ucw.cz>
22731 PR middle-end/83055
22732 * predict.c (drop_profile): Do not push/pop cfun; update also
22734 (handle_missing_profiles): Fix logic looking for zero profiles.
22736 2018-01-25 Jakub Jelinek <jakub@redhat.com>
22738 PR middle-end/83977
22739 * ipa-fnsummary.c (compute_fn_summary): Clear can_change_signature
22740 on functions with #pragma omp declare simd or functions with simd
22742 * omp-simd-clone.c (expand_simd_clones): Revert 2018-01-24 change.
22743 * config/i386/i386.c (ix86_simd_clone_compute_vecsize_and_simdlen):
22744 Remove trailing \n from warning_at calls.
22746 2018-01-25 Tom de Vries <tom@codesourcery.com>
22749 * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
22750 for neutered workers.
22752 2018-01-24 Joseph Myers <joseph@codesourcery.com>
22755 * config/m68k/m68k.c (m68k_promote_function_mode): New function.
22756 (TARGET_PROMOTE_FUNCTION_MODE): New macro.
22758 2018-01-24 Jeff Law <law@redhat.com>
22761 * i386.c (get_probe_interval): Move to earlier point.
22762 (ix86_compute_frame_layout): If -fstack-clash-protection and
22763 the frame is larger than the probe interval, then use pushes
22764 to save registers rather than reg->mem moves.
22765 (ix86_expand_prologue): Remove conditional for int_registers_saved
22768 2018-01-24 Vladimir Makarov <vmakarov@redhat.com>
22771 * ira-build.c (setup_min_max_allocno_live_range_point): Set up
22772 min/max for never referenced object.
22774 2018-01-24 Jakub Jelinek <jakub@redhat.com>
22776 PR middle-end/83977
22777 * tree.c (free_lang_data_in_decl): Don't clear DECL_ABSTRACT_ORIGIN
22779 * omp-low.c (create_omp_child_function): Remove "omp declare simd"
22780 attributes from DECL_ATTRIBUTES (decl) without affecting
22781 DECL_ATTRIBUTES (current_function_decl).
22782 * omp-simd-clone.c (expand_simd_clones): Ignore DECL_ARTIFICIAL
22783 functions with non-NULL DECL_ABSTRACT_ORIGIN.
22785 2018-01-24 Richard Sandiford <richard.sandiford@linaro.org>
22787 PR tree-optimization/83979
22788 * fold-const.c (fold_comparison): Use constant_boolean_node
22789 instead of boolean_{true,false}_node.
22791 2018-01-24 Jan Hubicka <hubicka@ucw.cz>
22793 * ipa-profile.c (ipa_propagate_frequency_1): Fix logic skipping calls
22796 2018-01-24 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
22798 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
22799 Simplify the clause that sets the length attribute.
22800 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
22801 (*sibcall_nonlocal_sysv<mode>): Clean up code block; simplify the
22802 clause that sets the length attribute.
22803 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
22805 2018-01-24 Tom de Vries <tom@codesourcery.com>
22808 * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_2): Define to 1.
22809 (nvptx_pc_set, nvptx_condjump_label): New function. Copy from jump.c.
22810 Add strict parameter.
22811 (prevent_branch_around_nothing): Insert dummy insn between branch to
22812 label and label with no ptx insn inbetween.
22813 * config/nvptx/nvptx.md (define_insn "fake_nop"): New insn.
22815 2018-01-24 Tom de Vries <tom@codesourcery.com>
22818 * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
22819 for neutered threads in warp.
22820 * config/nvptx/nvptx.md (define_insn "exit"): New insn.
22822 2018-01-24 Richard Biener <rguenther@suse.de>
22824 PR tree-optimization/83176
22825 * tree-chrec.c (chrec_fold_plus_1): Handle (signed T){(T) .. }
22828 2018-01-24 Richard Biener <rguenther@suse.de>
22830 PR tree-optimization/82819
22831 * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Avoid
22832 code generating pluses that are no-ops in the target precision.
22834 2018-01-24 Richard Biener <rguenther@suse.de>
22836 PR middle-end/84000
22837 * tree-cfg.c (replace_loop_annotate): Handle annot_expr_parallel_kind.
22839 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
22841 * cfgcleanup.c (try_crossjump_to_edge): Use combine_with_count
22842 to merge probabilities.
22843 * predict.c (probably_never_executed): Also mark as cold functions
22844 with global 0 profile and guessed local profile.
22845 * profile-count.c (profile_probability::combine_with_count): New
22847 * profile-count.h (profile_probability::operator*,
22848 profile_probability::operator*=, profile_probability::operator/,
22849 profile_probability::operator/=): Reduce precision to adjusted
22850 and set value to guessed on contradictory divisions.
22851 (profile_probability::combine_with_freq): Remove.
22852 (profile_probability::combine_wiht_count): Declare.
22853 (profile_count::force_nonzero):: Set to adjusted.
22854 (profile_count::probability_in):: Set quality to adjusted.
22855 * tree-ssa-tail-merge.c (replace_block_by): Use
22856 combine_with_count.
22858 2018-01-23 Andrew Waterman <andrew@sifive.com>
22859 Jim Wilson <jimw@sifive.com>
22861 * config/riscv/riscv.c (riscv_stack_boundary): New.
22862 (riscv_option_override): Set riscv_stack_boundary. Handle
22863 riscv_preferred_stack_boundary_arg.
22864 * config/riscv/riscv.h (MIN_STACK_BOUNDARY, ABI_STACK_BOUNDARY): New.
22865 (BIGGEST_ALIGNMENT): Set to STACK_BOUNDARY.
22866 (STACK_BOUNDARY): Set to riscv_stack_boundary.
22867 (RISCV_STACK_ALIGN): Use STACK_BOUNDARY.
22868 * config/riscv/riscv.opt (mpreferred-stack-boundary): New.
22869 * doc/invoke.tex (RISC-V Options): Add -mpreferred-stack-boundary.
22871 2018-01-23 H.J. Lu <hongjiu.lu@intel.com>
22874 * config/i386/i386.c (ix86_expand_prologue): Use cost reference
22875 of struct ix86_frame.
22876 (ix86_expand_epilogue): Likewise. Add a local variable for
22877 the reg_save_offset field in struct ix86_frame.
22879 2018-01-23 Bin Cheng <bin.cheng@arm.com>
22881 PR tree-optimization/82604
22882 * tree-loop-distribution.c (enum partition_kind): New enum item
22883 PKIND_PARTIAL_MEMSET.
22884 (partition_builtin_p): Support above new enum item.
22885 (generate_code_for_partition): Ditto.
22886 (compute_access_range): Differentiate cases that equality can be
22887 proven at all loops, the innermost loops or no loops.
22888 (classify_builtin_st, classify_builtin_ldst): Adjust call to above
22889 function. Set PKIND_PARTIAL_MEMSET for partition appropriately.
22890 (finalize_partitions, distribute_loop): Don't fuse partition of
22891 PKIND_PARTIAL_MEMSET kind when distributing 3-level loop nest.
22892 (prepare_perfect_loop_nest): Distribute 3-level loop nest only if
22893 parloop is enabled.
22895 2018-01-23 Martin Liska <mliska@suse.cz>
22897 * predict.def (PRED_INDIR_CALL): Set probability to PROB_EVEN in
22898 order to ignore the predictor.
22899 (PRED_POLYMORPHIC_CALL): Likewise.
22900 (PRED_RECURSIVE_CALL): Likewise.
22902 2018-01-23 Martin Liska <mliska@suse.cz>
22904 * tree-profile.c (tree_profiling): Print function header to
22905 aware reader which function we are working on.
22906 * value-prof.c (gimple_find_values_to_profile): Do not print
22907 not interesting value histograms.
22909 2018-01-23 Martin Liska <mliska@suse.cz>
22911 * profile-count.h (enum profile_quality): Add
22912 profile_uninitialized as the first value. Do not number values
22913 as they are zero based.
22914 (profile_count::verify): Update sanity check.
22915 (profile_probability::verify): Likewise.
22917 2018-01-23 Nathan Sidwell <nathan@acm.org>
22919 * doc/invoke.texi (ffor-scope): Deprecate.
22921 2018-01-23 David Malcolm <dmalcolm@redhat.com>
22923 PR tree-optimization/83510
22924 * domwalk.c (set_all_edges_as_executable): New function.
22925 (dom_walker::dom_walker): Convert bool param
22926 "skip_unreachable_blocks" to enum reachability. Move setup of
22927 edge flags to set_all_edges_as_executable and only do it when
22928 reachability is REACHABLE_BLOCKS.
22929 * domwalk.h (enum dom_walker::reachability): New enum.
22930 (dom_walker::dom_walker): Convert bool param
22931 "skip_unreachable_blocks" to enum reachability.
22932 (set_all_edges_as_executable): New decl.
22933 * graphite-scop-detection.c (gather_bbs::gather_bbs): Convert
22934 from false for "skip_unreachable_blocks" to ALL_BLOCKS for
22936 * tree-ssa-dom.c (dom_opt_dom_walker::dom_opt_dom_walker): Likewise,
22937 but converting true to REACHABLE_BLOCKS.
22938 * tree-ssa-sccvn.c (sccvn_dom_walker::sccvn_dom_walker): Likewise.
22940 (check_array_bounds_dom_walker::check_array_bounds_dom_walker):
22941 Likewise, but converting it to REACHABLE_BLOCKS_PRESERVING_FLAGS.
22942 (vrp_dom_walker::vrp_dom_walker): Likewise, but converting it to
22944 (vrp_prop::vrp_finalize): Call set_all_edges_as_executable
22945 if check_all_array_refs will be called.
22947 2018-01-23 David Malcolm <dmalcolm@redhat.com>
22949 * tree.c (selftest::test_location_wrappers): Add more test
22952 2018-01-23 David Malcolm <dmalcolm@redhat.com>
22954 * sbitmap.c (selftest::test_set_range): Fix memory leaks.
22955 (selftest::test_bit_in_range): Likewise.
22957 2018-01-23 Richard Sandiford <richard.sandiford@linaro.org>
22960 * doc/sourcebuild.texi (vect_float): Say that the selector
22961 only describes the situation when -funsafe-math-optimizations is on.
22962 (vect_float_strict): Document.
22964 2018-01-23 Richard Sandiford <richard.sandiford@linaro.org>
22966 PR tree-optimization/83965
22967 * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
22968 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern): Use it
22969 instead of checking only for a reduction.
22970 (vect_recog_widen_sum_pattern): Likewise.
22972 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
22974 * predict.c (probably_never_executed): Only use precise profile info.
22975 (compute_function_frequency): Skip after inlining hack since we now
22976 have quality checking.
22978 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
22980 * profile-count.h (profile_probability::very_unlikely,
22981 profile_probability::unlikely, profile_probability::even): Set
22982 precision to guessed.
22984 2018-01-23 Richard Biener <rguenther@suse.de>
22986 PR tree-optimization/83963
22987 * graphite-scop-detection.c (scop_detection::harmful_loop_in_region):
22988 Properly terminate dominator walk when crossing the exit edge not
22989 when visiting its source block.
22991 2018-01-23 Jakub Jelinek <jakub@redhat.com>
22994 * tree.c (maybe_wrap_with_location): Use NON_LVALUE_EXPR rather than
22995 VIEW_CONVERT_EXPR to wrap CONST_DECLs.
22997 2018-01-22 Jakub Jelinek <jakub@redhat.com>
22999 PR tree-optimization/83957
23000 * omp-expand.c (expand_omp_for_generic): Ignore virtual PHIs. Remove
23001 semicolon after for body surrounded by braces.
23003 PR tree-optimization/83081
23004 * profile-count.h (profile_probability::split): New method.
23005 * dojump.c (do_jump_1) <case TRUTH_ANDIF_EXPR, case TRUTH_ORIF_EXPR>:
23006 Use profile_probability::split.
23007 (do_compare_rtx_and_jump): Fix adjustment of probabilities
23008 when splitting a single conditional jump into 2.
23010 2018-01-22 David Malcolm <dmalcolm@redhat.com>
23012 PR tree-optimization/69452
23013 * tree-ssa-loop-im.c (class move_computations_dom_walker): Remove
23016 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
23018 * config/rl78/rl78-expand.md (bswaphi2): New define_expand.
23019 * config/rl78/rl78-virt.md (*bswaphi2_virt): New define_insn.
23020 * config/rl78/rl78-real.md (*bswaphi2_real): New define_insn.
23022 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
23024 * config/rl78/rl78-protos.h (rl78_split_movdi): New function
23026 * config/rl78/rl78.md (movdi): New define_expand.
23027 * config/rl78/rl78.c (rl78_split_movdi): New function.
23029 2018-01-22 Michael Meissner <meissner@linux.vnet.ibm.com>
23032 * config/rs6000/rs6000-protos.h (rs6000_split_signbit): Delete,
23034 * config/rs6000/rs6000.c (rs6000_split_signbit): Likewise.
23035 * config/rs6000/rs6000.md (signbit<mode>2): Change code for IEEE
23036 128-bit to produce an UNSPEC move to get the double word with the
23037 signbit and then a shift directly to do signbit.
23038 (signbit<mode>2_dm): Replace old IEEE 128-bit signbit
23039 implementation with a new version that just does either a direct
23040 move or a regular move. Move memory interface to separate insns.
23041 Move insns so they are next to the expander.
23042 (signbit<mode>2_dm_mem_be): New combiner insns to combine load
23043 with signbit move. Split big and little endian case.
23044 (signbit<mode>2_dm_mem_le): Likewise.
23045 (signbit<mode>2_dm_<su>ext): Delete, no longer used.
23046 (signbit<mode>2_dm2): Likewise.
23048 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
23050 * config/rl78/rl78.md (anddi3): New define_expand.
23052 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
23054 * config/rl78/rl78.md (umindi3): New define_expand.
23056 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
23058 * config/rl78/rl78.md (smindi3): New define_expand.
23060 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
23062 * config/rl78/rl78.md (smaxdi3): New define_expand.
23064 2018-01-22 Carl Love <cel@us.ibm.com>
23066 * config/rs6000/rs6000-builtin.def (ST_ELEMREV_V1TI, LD_ELEMREV_V1TI,
23067 LVX_V1TI): Add macro expansion.
23068 * config/rs6000/rs6000-c.c (altivec_builtin_types): Add argument
23069 definitions for VSX_BUILTIN_VEC_XST_BE, VSX_BUILTIN_VEC_ST,
23070 VSX_BUILTIN_VEC_XL, LD_ELEMREV_V1TI builtins.
23071 * config/rs6000/rs6000-p8swap.c (insn_is_swappable_p);
23072 Change check to determine if the instruction is a byte reversing
23073 entry. Fix typo in comment.
23074 * config/rs6000/rs6000.c (altivec_expand_builtin): Add case entry
23075 for VSX_BUILTIN_ST_ELEMREV_V1TI and VSX_BUILTIN_LD_ELEMREV_V1TI.
23076 Add def_builtin calls for new builtins.
23077 * config/rs6000/vsx.md (vsx_st_elemrev_v1ti, vsx_ld_elemrev_v1ti):
23078 Add define_insn expansion.
23080 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
23082 * config/rl78/rl78.md (umaxdi3): New define_expand.
23084 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
23086 * config/rl78/rl78.c (rl78_note_reg_set): Fixed dead reg check
23087 for non-QImode registers.
23089 2018-01-22 Richard Biener <rguenther@suse.de>
23091 PR tree-optimization/83963
23092 * graphite-scop-detection.c (scop_detection::get_sese): Delay
23093 including the loop exit block.
23094 (scop_detection::merge_sese): Likewise.
23095 (scop_detection::add_scop): Do it here instead.
23097 2018-01-22 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
23099 * doc/sourcebuild.texi (arm_softfloat): Document.
23101 2018-01-21 John David Anglin <danglin@gcc.gnu.org>
23104 * config/pa/pa.c (pa_function_ok_for_sibcall): Use
23105 targetm.binds_local_p instead of TREE_PUBLIC to check local binding.
23106 Move TARGET_PORTABLE_RUNTIME check after TARGET_64BIT check.
23108 2018-01-21 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
23109 David Edelsohn <dje.gcc@gmail.com>
23112 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
23113 Change "crset eq" to "crset 2".
23114 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
23115 (*call_indirect_aix<mode>_nospec): Likewise.
23116 (*call_value_indirect_aix<mode>_nospec): Likewise.
23117 (*call_indirect_elfv2<mode>_nospec): Likewise.
23118 (*call_value_indirect_elfv2<mode>_nospec): Likewise.
23119 (*sibcall_nonlocal_sysv<mode>): Change "crset eq" to "crset 2";
23120 change assembly output from . to $.
23121 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
23122 (indirect_jump<mode>_nospec): Change assembly output from . to $.
23123 (*tablejump<mode>_internal1_nospec): Likewise.
23125 2018-01-21 Oleg Endo <olegendo@gcc.gnu.org>
23128 * config/sh/sh_optimize_sett_clrt.cc:
23129 Use INCLUDE_ALGORITHM and INCLUDE_VECTOR instead of direct includes.
23131 2018-01-20 Richard Sandiford <richard.sandiford@linaro.org>
23133 PR tree-optimization/83940
23134 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Set
23135 offset_dt to vect_constant_def rather than vect_unknown_def_type.
23136 (vect_check_load_store_mask): Add a mask_dt_out parameter and
23137 use it to pass back the definition type.
23138 (vect_check_store_rhs): Likewise rhs_dt_out.
23139 (vect_build_gather_load_calls): Add a mask_dt argument and use
23140 it instead of a call to vect_is_simple_use.
23141 (vectorizable_store): Update calls to vect_check_load_store_mask
23142 and vect_check_store_rhs. Use the dt returned by the latter instead
23143 of scatter_src_dt. Use the cached mask_dt and gs_info.offset_dt
23144 instead of calls to vect_is_simple_use. Pass the scalar rather
23145 than the vector operand to vect_is_simple_use when handling
23146 second and subsequent copies of an rhs value.
23147 (vectorizable_load): Update calls to vect_check_load_store_mask
23148 and vect_build_gather_load_calls. Use the cached mask_dt and
23149 gs_info.offset_dt instead of calls to vect_is_simple_use.
23151 2018-01-20 Jakub Jelinek <jakub@redhat.com>
23153 PR middle-end/83945
23154 * tree-emutls.c: Include gimplify.h.
23155 (lower_emutls_2): New function.
23156 (lower_emutls_1): If ADDR_EXPR is a gimple invariant and walk_tree
23157 with lower_emutls_2 callback finds some TLS decl in it, unshare_expr
23158 it before further processing.
23161 * simplify-rtx.c (simplify_binary_operation_1) <case UMOD>: Use
23162 UINTVAL (trueop1) instead of INTVAL (op1).
23164 2018-01-19 Jakub Jelinek <jakub@redhat.com>
23168 * dwarf2cfi.c (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define to
23169 INCOMING_FRAME_SP_OFFSET if not defined.
23170 (scan_trace): Add ENTRY argument. If true and
23171 DEFAULT_INCOMING_FRAME_SP_OFFSET != INCOMING_FRAME_SP_OFFSET,
23172 emit a note to adjust the CFA offset.
23173 (create_cfi_notes): Adjust scan_trace callers.
23174 (create_cie_data): Use DEFAULT_INCOMING_FRAME_SP_OFFSET rather than
23175 INCOMING_FRAME_SP_OFFSET in the CIE.
23176 * config/i386/i386.h (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define.
23177 * config/stormy16/stormy16.h (DEFAULT_INCOMING_FRAME_SP_OFFSET):
23179 * doc/tm.texi.in (DEFAULT_INCOMING_FRAME_SP_OFFSET): Document.
23180 * doc/tm.texi: Regenerated.
23182 2018-01-19 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
23184 PR rtl-optimization/83147
23185 * lra-constraints.c (remove_inheritance_pseudos): Use
23186 lra_substitute_pseudo_within_insn.
23188 2018-01-19 Tom de Vries <tom@codesourcery.com>
23189 Cesar Philippidis <cesar@codesourcery.com>
23192 * config/nvptx/nvptx.c (nvptx_single): Fix jit workaround.
23194 2018-01-19 Cesar Philippidis <cesar@codesourcery.com>
23197 * config/nvptx/nvptx.c (output_init_frag): Don't use generic address
23198 spaces for function labels.
23200 2018-01-19 Martin Liska <mliska@suse.cz>
23202 * predict.def (PRED_LOOP_EXIT): Change from 85 to 89.
23203 (PRED_LOOP_EXIT_WITH_RECURSION): Change from 72 to 78.
23204 (PRED_LOOP_EXTRA_EXIT): Change from 83 to 67.
23205 (PRED_OPCODE_POSITIVE): Change from 64 to 59.
23206 (PRED_TREE_OPCODE_POSITIVE): Change from 64 to 59.
23207 (PRED_CONST_RETURN): Change from 69 to 65.
23208 (PRED_NULL_RETURN): Change from 91 to 71.
23209 (PRED_LOOP_IV_COMPARE_GUESS): Change from 98 to 64.
23210 (PRED_LOOP_GUARD): Change from 66 to 73.
23212 2018-01-19 Martin Liska <mliska@suse.cz>
23214 * predict.c (predict_insn_def): Add new assert.
23215 (struct branch_predictor): Change type to signed integer.
23216 (test_prediction_value_range): Amend test to cover
23217 PROB_UNINITIALIZED.
23218 * predict.def (PRED_LOOP_ITERATIONS): Use the new constant.
23219 (PRED_LOOP_ITERATIONS_GUESSED): Likewise.
23220 (PRED_LOOP_ITERATIONS_MAX): Likewise.
23221 (PRED_LOOP_IV_COMPARE): Likewise.
23222 * predict.h (PROB_UNINITIALIZED): Define new constant.
23224 2018-01-19 Martin Liska <mliska@suse.cz>
23226 * predict.c (dump_prediction): Add new format for
23227 analyze_brprob.py script which is enabled with -details
23229 * profile-count.h (precise_p): New function.
23231 2018-01-19 Richard Sandiford <richard.sandiford@linaro.org>
23233 PR tree-optimization/83922
23234 * tree-vect-loop.c (vect_verify_full_masking): Return false if
23235 there are no statements that need masking.
23236 (vect_active_double_reduction_p): New function.
23237 (vect_analyze_loop_operations): Use it when handling phis that
23238 are not in the loop header.
23240 2018-01-19 Richard Sandiford <richard.sandiford@linaro.org>
23242 PR tree-optimization/83914
23243 * tree-vect-loop.c (vectorizable_induction): Don't convert
23244 init_expr or apply the peeling adjustment for inductions
23245 that are nested within the vectorized loop.
23247 2018-01-19 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
23249 * config/arm/thumb2.md (*thumb2_negsi2_short): Use RSB mnemonic
23252 2018-01-18 Jakub Jelinek <jakub@redhat.com>
23256 * function.h (gimplify_parameters): Add gimple_seq * argument.
23257 * function.c: Include gimple.h and options.h.
23258 (gimplify_parameters): Add cleanup argument, add CLOBBER stmts
23259 for the added local temporaries if needed.
23260 * gimplify.c (gimplify_body): Adjust gimplify_parameters caller,
23261 if there are any parameter cleanups, wrap whole body into a
23262 try/finally with the cleanups.
23264 2018-01-18 Wilco Dijkstra <wdijkstr@arm.com>
23267 * config/aarch64/aarch64.c (aarch64_legitimate_constant_p):
23268 Use GET_MODE_CLASS for scalar floating point.
23270 2018-01-18 Jan Hubicka <hubicka@ucw.cz>
23274 * cgraphclones.c (cgraph_node::create_version_clone_with_body):
23275 Fix call of call_cgraph_insertion_hooks.
23277 2018-01-18 Martin Sebor <msebor@redhat.com>
23279 * doc/invoke.texi (-Wclass-memaccess): Tweak text.
23281 2018-01-18 Jan Hubicka <hubicka@ucw.cz>
23284 * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Update edge
23287 2018-01-18 Boris Kolpackov <boris@codesynthesis.com>
23290 * common.opt: (-ffile-prefix-map): New option.
23291 * opts.c (common_handle_option): Defer it.
23292 * opts-global.c (handle_common_deferred_options): Handle it.
23293 * debug.h (remap_debug_filename, add_debug_prefix_map): Move to...
23294 * file-prefix-map.h: New file.
23295 (remap_debug_filename, add_debug_prefix_map): ...here.
23296 (add_macro_prefix_map, add_file_prefix_map, remap_macro_filename): New.
23297 * final.c (debug_prefix_map, add_debug_prefix_map
23298 remap_debug_filename): Move to...
23299 * file-prefix-map.c: New file.
23300 (file_prefix_map, add_prefix_map, remap_filename) ...here and rename,
23301 generalize, get rid of alloca(), use strrchr() instead of strchr().
23302 (add_macro_prefix_map, add_debug_prefix_map, add_file_prefix_map):
23303 Implement in terms of add_prefix_map().
23304 (remap_macro_filename, remap_debug_filename): Implement in term of
23306 * Makefile.in (OBJS, PLUGIN_HEADERS): Add new files.
23307 * builtins.c (fold_builtin_FILE): Call remap_macro_filename().
23308 * dbxout.c: Include file-prefix-map.h.
23309 * varasm.c: Likewise.
23310 * vmsdbgout.c: Likewise.
23311 * xcoffout.c: Likewise.
23312 * dwarf2out.c: Likewise plus omit new options from DW_AT_producer.
23313 * doc/cppopts.texi (-fmacro-prefix-map): Document.
23314 * doc/invoke.texi (-ffile-prefix-map): Document.
23315 (-fdebug-prefix-map): Update description.
23317 2018-01-18 Martin Liska <mliska@suse.cz>
23319 * config/i386/i386.c (indirect_thunk_name): Document that also
23321 (output_indirect_thunk): Document why both instructions
23322 (pause and lfence) are generated.
23324 2018-01-18 Richard Biener <rguenther@suse.de>
23326 PR tree-optimization/83887
23327 * graphite-scop-detection.c
23328 (scop_detection::get_nearest_dom_with_single_entry): Remove.
23329 (scop_detection::get_nearest_pdom_with_single_exit): Likewise.
23330 (scop_detection::merge_sese): Re-implement with a flood-fill
23331 algorithm that properly finds a SESE region if it exists.
23333 2018-01-18 Jakub Jelinek <jakub@redhat.com>
23336 * match.pd ((P + A) - P, P - (P + A), (P + A) - (P + B)): For
23337 pointer_diff optimizations use view_convert instead of convert.
23339 2018-01-17 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
23341 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
23342 Generate different code for -mno-speculate-indirect-jumps.
23343 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
23344 (*call_indirect_aix<mode>): Disable for
23345 -mno-speculate-indirect-jumps.
23346 (*call_indirect_aix<mode>_nospec): New define_insn.
23347 (*call_value_indirect_aix<mode>): Disable for
23348 -mno-speculate-indirect-jumps.
23349 (*call_value_indirect_aix<mode>_nospec): New define_insn.
23350 (*sibcall_nonlocal_sysv<mode>): Generate different code for
23351 -mno-speculate-indirect-jumps.
23352 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
23354 2018-01-17 Michael Meissner <meissner@linux.vnet.ibm.com>
23356 * config/rs6000/rs6000.c (rs6000_emit_move): If we load or store a
23357 long double type, set the flags for noting the default long double
23358 type, even if we don't pass or return a long double type.
23360 2018-01-17 Jan Hubicka <hubicka@ucw.cz>
23363 * ipa-inline.c (flatten_function): Do not overwrite final inlining
23366 2018-01-17 Will Schmidt <will_schmidt@vnet.ibm.com>
23368 * config/rs6000/rs6000.c (rs6000_gimple_builtin): Add gimple folding
23369 support for merge[hl].
23370 (fold_mergehl_helper): New helper function.
23371 (tree-vector-builder.h): New #include for tree_vector_builder usage.
23372 * config/rs6000/altivec.md (altivec_vmrghw_direct): Add xxmrghw insn.
23373 (altivec_vmrglw_direct): Add xxmrglw insn.
23375 2018-01-17 Andrew Waterman <andrew@sifive.com>
23377 * config/riscv/riscv.c (riscv_conditional_register_usage): If
23378 UNITS_PER_FP_ARG is 0, set call_used_regs to 1 for all FP regs.
23380 2018-01-17 David Malcolm <dmalcolm@redhat.com>
23383 * ipa-devirt.c (add_type_duplicate): When comparing memory layout,
23384 call the lto_location_cache before reading the
23385 DECL_SOURCE_LOCATION of the types.
23387 2018-01-17 Wilco Dijkstra <wdijkstr@arm.com>
23388 Richard Sandiford <richard.sandiford@linaro.org>
23390 * config/aarch64/aarch64.md (movti_aarch64): Use Uti constraint.
23391 * config/aarch64/aarch64.c (aarch64_mov128_immediate): New function.
23392 (aarch64_legitimate_constant_p): Just support CONST_DOUBLE
23393 SF/DF/TF mode to avoid creating illegal CONST_WIDE_INT immediates.
23394 * config/aarch64/aarch64-protos.h (aarch64_mov128_immediate):
23396 * config/aarch64/constraints.md (aarch64_movti_operand):
23398 * config/aarch64/predicates.md (Uti): Add new constraint.
23400 2018-01-17 Carl Love <cel@us.ibm.com>
23402 * config/rs6000/vsx.md (define_expand xl_len_r,
23403 define_expand stxvl, define_expand *stxvl): Add match_dup argument.
23404 (define_insn): Add, match_dup 1 argument to define_insn stxvll and
23406 (define_expand, define_insn): Move the shift left from the
23407 define_insn to the define_expand for lxvl and stxvl instructions.
23408 * config/rs6000/rs6000-builtin.def (BU_P9V_64BIT_VSX_2): Change LXVL
23409 and XL_LEN_R definitions to PURE.
23411 2018-01-17 Uros Bizjak <ubizjak@gmail.com>
23413 * config/i386/i386.c (indirect_thunk_name): Declare regno
23414 as unsigned int. Compare regno with INVALID_REGNUM.
23415 (output_indirect_thunk): Ditto.
23416 (output_indirect_thunk_function): Ditto.
23417 (ix86_code_end): Declare regno as unsigned int. Use INVALID_REGNUM
23418 in the call to output_indirect_thunk_function.
23420 2018-01-17 Richard Sandiford <richard.sandiford@linaro.org>
23422 PR middle-end/83884
23423 * expr.c (expand_expr_real_1): Use the size of GET_MODE (op0)
23424 rather than the size of inner_type to determine the stack slot size
23425 when handling VIEW_CONVERT_EXPRs on strict-alignment targets.
23427 2018-01-16 Sebastian Peryt <sebastian.peryt@intel.com>
23430 * config/i386/i386.c (ix86_option_override_internal): Add PTA_RDRND
23433 2018-01-16 Michael Meissner <meissner@linux.vnet.ibm.com>
23435 * config.gcc (powerpc*-linux*-*): Add support for 64-bit little
23436 endian Linux systems to optionally enable multilibs for selecting
23437 the long double type if the user configured an explicit type.
23438 * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Indicate we
23439 have no long double multilibs if not defined.
23440 * config/rs6000/rs6000.c (rs6000_option_override_internal): Do not
23441 warn if the user used -mabi={ieee,ibm}longdouble and we built
23442 multilibs for long double.
23443 * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Define as the
23444 appropriate multilib option.
23445 (MULTILIB_DEFAULTS): Add MULTILIB_DEFAULTS_IEEE to the default
23447 * config/rs6000/t-ldouble-linux64le-ibm: New configuration files
23448 for building long double multilibs.
23449 * config/rs6000/t-ldouble-linux64le-ieee: Likewise.
23451 2018-01-16 John David Anglin <danglin@gcc.gnu.org>
23453 * config.gcc (hppa*-*-linux*): Change callee copies ABI to caller
23456 * config/pa.h (MALLOC_ABI_ALIGNMENT): Set 32-bit alignment default to
23458 * config/pa/pa32-linux.h (MALLOC_ABI_ALIGNMENT): Set alignment to
23461 * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Cleanup type and mode
23464 * config/pa/pa.c (pa_function_arg_size): Apply CEIL to GET_MODE_SIZE
23467 2018-01-16 Eric Botcazou <ebotcazou@adacore.com>
23469 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For an
23470 ADDR_EXPR, do not count the offset of a COMPONENT_REF twice.
23472 2018-01-16 Kelvin Nilsen <kelvin@gcc.gnu.org>
23474 * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Generate
23475 different rtl trees depending on TARGET_64BIT.
23476 (rs6000_gen_lvx): Likewise.
23478 2018-01-16 Eric Botcazou <ebotcazou@adacore.com>
23480 * config/visium/visium.md (nop): Tweak comment.
23481 (hazard_nop): Likewise.
23483 2018-01-16 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
23485 * config/rs6000/rs6000.c (rs6000_opt_vars): Add entry for
23486 -mspeculate-indirect-jumps.
23487 * config/rs6000/rs6000.md (*call_indirect_elfv2<mode>): Disable
23488 for -mno-speculate-indirect-jumps.
23489 (*call_indirect_elfv2<mode>_nospec): New define_insn.
23490 (*call_value_indirect_elfv2<mode>): Disable for
23491 -mno-speculate-indirect-jumps.
23492 (*call_value_indirect_elfv2<mode>_nospec): New define_insn.
23493 (indirect_jump): Emit different RTL for
23494 -mno-speculate-indirect-jumps.
23495 (*indirect_jump<mode>): Disable for
23496 -mno-speculate-indirect-jumps.
23497 (*indirect_jump<mode>_nospec): New define_insn.
23498 (tablejump): Emit different RTL for
23499 -mno-speculate-indirect-jumps.
23500 (tablejumpsi): Disable for -mno-speculate-indirect-jumps.
23501 (tablejumpsi_nospec): New define_expand.
23502 (tablejumpdi): Disable for -mno-speculate-indirect-jumps.
23503 (tablejumpdi_nospec): New define_expand.
23504 (*tablejump<mode>_internal1): Disable for
23505 -mno-speculate-indirect-jumps.
23506 (*tablejump<mode>_internal1_nospec): New define_insn.
23507 * config/rs6000/rs6000.opt (mspeculate-indirect-jumps): New
23510 2018-01-16 Artyom Skrobov tyomitch@gmail.com
23512 * caller-save.c (insert_save): Drop unnecessary parameter. All
23515 2018-01-16 Jakub Jelinek <jakub@redhat.com>
23516 Richard Biener <rguenth@suse.de>
23519 * gimplify.c (gimplify_one_sizepos): For is_gimple_constant (expr)
23520 return early, inline manually is_gimple_sizepos. Make sure if we
23521 call gimplify_expr we don't end up with a gimple constant.
23522 * tree.c (variably_modified_type_p): Don't return true for
23523 is_gimple_constant (_t). Inline manually is_gimple_sizepos.
23524 * gimplify.h (is_gimple_sizepos): Remove.
23526 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
23528 PR tree-optimization/83857
23529 * tree-vect-loop.c (vect_analyze_loop_operations): Don't call
23530 vectorizable_live_operation for pure SLP statements.
23531 (vectorizable_live_operation): Handle PHIs.
23533 2018-01-16 Richard Biener <rguenther@suse.de>
23535 PR tree-optimization/83867
23536 * tree-vect-stmts.c (vect_transform_stmt): Precompute
23537 nested_in_vect_loop_p since the scalar stmt may get invalidated.
23539 2018-01-16 Jakub Jelinek <jakub@redhat.com>
23542 * stor-layout.c (handle_warn_if_not_align): Use byte_position and
23543 multiple_of_p instead of unchecked tree_to_uhwi and UHWI check.
23544 If off is not INTEGER_CST, issue a may not be aligned warning
23545 rather than isn't aligned. Use isn%'t rather than isn't.
23546 * fold-const.c (multiple_of_p) <case BIT_AND_EXPR>: Don't fall through
23548 <case MULT_EXPR>: Improve the case when bottom and one of the
23549 MULT_EXPR operands are INTEGER_CSTs and bottom is multiple of that
23550 operand, in that case check if the other operand is multiple of
23551 bottom divided by the INTEGER_CST operand.
23553 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
23556 * config/pa/pa.h (FUNCTION_ARG_SIZE): Delete.
23557 * config/pa/pa-protos.h (pa_function_arg_size): Declare.
23558 * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Use
23559 pa_function_arg_size instead of FUNCTION_ARG_SIZE.
23560 * config/pa/pa.c (pa_function_arg_advance): Likewise.
23561 (pa_function_arg, pa_arg_partial_bytes): Likewise.
23562 (pa_function_arg_size): New function.
23564 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
23566 * fold-const.c (fold_ternary_loc): Construct the vec_perm_indices
23567 in a separate statement.
23569 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
23571 PR tree-optimization/83847
23572 * tree-vect-data-refs.c (vect_analyze_data_ref_accesses): Don't
23573 group gathers and scatters.
23575 2018-01-16 Jakub Jelinek <jakub@redhat.com>
23577 PR rtl-optimization/86620
23578 * params.def (max-sched-ready-insns): Bump minimum value to 1.
23580 PR rtl-optimization/83213
23581 * recog.c (peep2_attempt): Copy over CROSSING_JUMP_P from peepinsn
23582 to last if both are JUMP_INSNs.
23584 PR tree-optimization/83843
23585 * gimple-ssa-store-merging.c
23586 (imm_store_chain_info::output_merged_store): Handle bit_not_p on
23587 store_immediate_info for bswap/nop orig_stores.
23589 2018-01-15 Andrew Waterman <andrew@sifive.com>
23591 * config/riscv/riscv.c (riscv_rtx_costs) <MULT>: Increase cost if
23593 <UDIV>: Increase cost if !TARGET_DIV.
23595 2018-01-15 Segher Boessenkool <segher@kernel.crashing.org>
23597 * config/rs6000/rs6000.md (define_attr "type"): Remove delayed_cr.
23598 (define_attr "cr_logical_3op"): New.
23599 (cceq_ior_compare): Adjust.
23600 (cceq_ior_compare_complement): Adjust.
23601 (*cceq_rev_compare): Adjust.
23602 * config/rs6000/rs6000.c (rs6000_adjust_cost): Adjust.
23603 (is_cracked_insn): Adjust.
23604 (insn_must_be_first_in_group): Adjust.
23605 * config/rs6000/40x.md: Adjust.
23606 * config/rs6000/440.md: Adjust.
23607 * config/rs6000/476.md: Adjust.
23608 * config/rs6000/601.md: Adjust.
23609 * config/rs6000/603.md: Adjust.
23610 * config/rs6000/6xx.md: Adjust.
23611 * config/rs6000/7450.md: Adjust.
23612 * config/rs6000/7xx.md: Adjust.
23613 * config/rs6000/8540.md: Adjust.
23614 * config/rs6000/cell.md: Adjust.
23615 * config/rs6000/e300c2c3.md: Adjust.
23616 * config/rs6000/e500mc.md: Adjust.
23617 * config/rs6000/e500mc64.md: Adjust.
23618 * config/rs6000/e5500.md: Adjust.
23619 * config/rs6000/e6500.md: Adjust.
23620 * config/rs6000/mpc.md: Adjust.
23621 * config/rs6000/power4.md: Adjust.
23622 * config/rs6000/power5.md: Adjust.
23623 * config/rs6000/power6.md: Adjust.
23624 * config/rs6000/power7.md: Adjust.
23625 * config/rs6000/power8.md: Adjust.
23626 * config/rs6000/power9.md: Adjust.
23627 * config/rs6000/rs64.md: Adjust.
23628 * config/rs6000/titan.md: Adjust.
23630 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
23632 * config/i386/predicates.md (indirect_branch_operand): Rewrite
23633 ix86_indirect_branch_register logic.
23635 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
23637 * config/i386/constraints.md (Bs): Update
23638 ix86_indirect_branch_register check. Don't check
23639 ix86_indirect_branch_register with GOT_memory_operand.
23641 * config/i386/predicates.md (GOT_memory_operand): Don't check
23642 ix86_indirect_branch_register here.
23643 (GOT32_symbol_operand): Likewise.
23645 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
23647 * config/i386/predicates.md (constant_call_address_operand):
23648 Rewrite ix86_indirect_branch_register logic.
23649 (sibcall_insn_operand): Likewise.
23651 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
23653 * config/i386/constraints.md (Bs): Replace
23654 ix86_indirect_branch_thunk_register with
23655 ix86_indirect_branch_register.
23657 * config/i386/i386.md (indirect_jump): Likewise.
23658 (tablejump): Likewise.
23659 (*sibcall_memory): Likewise.
23660 (*sibcall_value_memory): Likewise.
23661 Peepholes of indirect call and jump via memory: Likewise.
23662 * config/i386/i386.opt: Likewise.
23663 * config/i386/predicates.md (indirect_branch_operand): Likewise.
23664 (GOT_memory_operand): Likewise.
23665 (call_insn_operand): Likewise.
23666 (sibcall_insn_operand): Likewise.
23667 (GOT32_symbol_operand): Likewise.
23669 2018-01-15 Jakub Jelinek <jakub@redhat.com>
23671 PR middle-end/83837
23672 * omp-expand.c (expand_omp_atomic_pipeline): Use loaded_val
23673 type rather than type addr's type points to.
23674 (expand_omp_atomic_mutex): Likewise.
23675 (expand_omp_atomic): Likewise.
23677 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
23680 * config/i386/i386.c (output_indirect_thunk_function): Use
23681 ASM_OUTPUT_LABEL, instead of ASM_OUTPUT_DEF, for TARGET_MACHO
23682 for __x86_return_thunk.
23684 2018-01-15 Richard Biener <rguenther@suse.de>
23686 PR middle-end/83850
23687 * expmed.c (extract_bit_field_1): Fix typo.
23689 2018-01-15 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
23692 * config/arm/iterators.md (VF): New mode iterator.
23693 * config/arm/neon.md (neon_vabd<mode>_2): Use the above.
23694 Remove integer-related logic from pattern.
23695 (neon_vabd<mode>_3): Likewise.
23697 2018-01-15 Jakub Jelinek <jakub@redhat.com>
23699 PR middle-end/82694
23700 * common.opt (fstrict-overflow): No longer an alias.
23701 (fwrapv-pointer): New option.
23702 * tree.h (TYPE_OVERFLOW_WRAPS, TYPE_OVERFLOW_UNDEFINED): Define
23703 also for pointer types based on flag_wrapv_pointer.
23704 * opts.c (common_handle_option) <case OPT_fstrict_overflow>: Set
23705 opts->x_flag_wrap[pv] to !value, clear opts->x_flag_trapv if
23706 opts->x_flag_wrapv got set.
23707 * fold-const.c (fold_comparison, fold_binary_loc): Revert 2017-08-01
23708 changes, just use TYPE_OVERFLOW_UNDEFINED on pointer type instead of
23709 POINTER_TYPE_OVERFLOW_UNDEFINED.
23710 * match.pd: Likewise in address comparison pattern.
23711 * doc/invoke.texi: Document -fwrapv and -fstrict-overflow.
23713 2018-01-15 Richard Biener <rguenther@suse.de>
23716 * tree.c (free_lang_data_in_type): Always unlink TYPE_DECLs
23717 from TYPE_FIELDS. Free TYPE_BINFO if not used by devirtualization.
23718 Reset type names to their identifier if their TYPE_DECL doesn't
23719 have linkage (and thus is used for ODR and devirt).
23720 (save_debug_info_for_decl): Remove.
23721 (save_debug_info_for_type): Likewise.
23722 (add_tree_to_fld_list): Adjust.
23723 * tree-pretty-print.c (dump_generic_node): Make dumping of
23724 type names more robust.
23726 2018-01-15 Richard Biener <rguenther@suse.de>
23728 * BASE-VER: Bump to 8.0.1.
23730 2018-01-14 Martin Sebor <msebor@redhat.com>
23733 * builtins.c (check_access): Avoid warning when the no-warning bit
23736 2018-01-14 Cory Fields <cory-nospam-@coryfields.com>
23738 * tree-ssa-loop-im.c (sort_bbs_in_loop_postorder_cmp): Stabilize sort.
23739 * ira-color (allocno_hard_regs_compare): Likewise.
23741 2018-01-14 Nathan Rossi <nathan@nathanrossi.com>
23744 * config/microblaze/microblaze.c (microblaze_asm_output_ident):
23745 Use .pushsection/.popsection.
23747 2018-01-14 Martin Sebor <msebor@redhat.com>
23750 * doc/invoke.texi (-Wlass-memaccess): Document suppression by casting.
23752 2018-01-14 Jakub Jelinek <jakub@redhat.com>
23754 * config.gcc (i[34567]86-*-*): Remove one duplicate gfniintrin.h
23755 entry from extra_headers.
23756 (x86_64-*-*): Remove two duplicate gfniintrin.h entries from
23757 extra_headers, make the list bitwise identical to the i?86-*-* one.
23759 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
23761 * config/i386/i386.c (ix86_set_indirect_branch_type): Disallow
23762 -mcmodel=large with -mindirect-branch=thunk,
23763 -mindirect-branch=thunk-extern, -mfunction-return=thunk and
23764 -mfunction-return=thunk-extern.
23765 * doc/invoke.texi: Document -mcmodel=large is incompatible with
23766 -mindirect-branch=thunk, -mindirect-branch=thunk-extern,
23767 -mfunction-return=thunk and -mfunction-return=thunk-extern.
23769 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
23771 * config/i386/i386.c (print_reg): Print the name of the full
23772 integer register without '%'.
23773 (ix86_print_operand): Handle 'V'.
23774 * doc/extend.texi: Document 'V' modifier.
23776 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
23778 * config/i386/constraints.md (Bs): Disallow memory operand for
23779 -mindirect-branch-register.
23781 * config/i386/predicates.md (indirect_branch_operand): Likewise.
23782 (GOT_memory_operand): Likewise.
23783 (call_insn_operand): Likewise.
23784 (sibcall_insn_operand): Likewise.
23785 (GOT32_symbol_operand): Likewise.
23786 * config/i386/i386.md (indirect_jump): Call convert_memory_address
23787 for -mindirect-branch-register.
23788 (tablejump): Likewise.
23789 (*sibcall_memory): Likewise.
23790 (*sibcall_value_memory): Likewise.
23791 Disallow peepholes of indirect call and jump via memory for
23792 -mindirect-branch-register.
23793 (*call_pop): Replace m with Bw.
23794 (*call_value_pop): Likewise.
23795 (*sibcall_pop_memory): Replace m with Bs.
23796 * config/i386/i386.opt (mindirect-branch-register): New option.
23797 * doc/invoke.texi: Document -mindirect-branch-register option.
23799 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
23801 * config/i386/i386-protos.h (ix86_output_function_return): New.
23802 * config/i386/i386.c (ix86_set_indirect_branch_type): Also
23803 set function_return_type.
23804 (indirect_thunk_name): Add ret_p to indicate thunk for function
23806 (output_indirect_thunk_function): Pass false to
23807 indirect_thunk_name.
23808 (ix86_output_indirect_branch_via_reg): Likewise.
23809 (ix86_output_indirect_branch_via_push): Likewise.
23810 (output_indirect_thunk_function): Create alias for function
23811 return thunk if regno < 0.
23812 (ix86_output_function_return): New function.
23813 (ix86_handle_fndecl_attribute): Handle function_return.
23814 (ix86_attribute_table): Add function_return.
23815 * config/i386/i386.h (machine_function): Add
23816 function_return_type.
23817 * config/i386/i386.md (simple_return_internal): Use
23818 ix86_output_function_return.
23819 (simple_return_internal_long): Likewise.
23820 * config/i386/i386.opt (mfunction-return=): New option.
23821 (indirect_branch): Mention -mfunction-return=.
23822 * doc/extend.texi: Document function_return function attribute.
23823 * doc/invoke.texi: Document -mfunction-return= option.
23825 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
23827 * config/i386/i386-opts.h (indirect_branch): New.
23828 * config/i386/i386-protos.h (ix86_output_indirect_jmp): Likewise.
23829 * config/i386/i386.c (ix86_using_red_zone): Disallow red-zone
23830 with local indirect jump when converting indirect call and jump.
23831 (ix86_set_indirect_branch_type): New.
23832 (ix86_set_current_function): Call ix86_set_indirect_branch_type.
23833 (indirectlabelno): New.
23834 (indirect_thunk_needed): Likewise.
23835 (indirect_thunk_bnd_needed): Likewise.
23836 (indirect_thunks_used): Likewise.
23837 (indirect_thunks_bnd_used): Likewise.
23838 (INDIRECT_LABEL): Likewise.
23839 (indirect_thunk_name): Likewise.
23840 (output_indirect_thunk): Likewise.
23841 (output_indirect_thunk_function): Likewise.
23842 (ix86_output_indirect_branch_via_reg): Likewise.
23843 (ix86_output_indirect_branch_via_push): Likewise.
23844 (ix86_output_indirect_branch): Likewise.
23845 (ix86_output_indirect_jmp): Likewise.
23846 (ix86_code_end): Call output_indirect_thunk_function if needed.
23847 (ix86_output_call_insn): Call ix86_output_indirect_branch if
23849 (ix86_handle_fndecl_attribute): Handle indirect_branch.
23850 (ix86_attribute_table): Add indirect_branch.
23851 * config/i386/i386.h (machine_function): Add indirect_branch_type
23852 and has_local_indirect_jump.
23853 * config/i386/i386.md (indirect_jump): Set has_local_indirect_jump
23855 (tablejump): Likewise.
23856 (*indirect_jump): Use ix86_output_indirect_jmp.
23857 (*tablejump_1): Likewise.
23858 (simple_return_indirect_internal): Likewise.
23859 * config/i386/i386.opt (mindirect-branch=): New option.
23860 (indirect_branch): New.
23863 (thunk-inline): Likewise.
23864 (thunk-extern): Likewise.
23865 * doc/extend.texi: Document indirect_branch function attribute.
23866 * doc/invoke.texi: Document -mindirect-branch= option.
23868 2018-01-14 Jan Hubicka <hubicka@ucw.cz>
23871 * ipa-inline.c (edge_badness): Tolerate roundoff errors.
23873 2018-01-14 Richard Sandiford <richard.sandiford@linaro.org>
23875 * ipa-inline.c (want_inline_small_function_p): Return false if
23876 inlining has already failed with CIF_FINAL_ERROR.
23877 (update_caller_keys): Call want_inline_small_function_p before
23879 (update_callee_keys): Likewise.
23881 2018-01-10 Kelvin Nilsen <kelvin@gcc.gnu.org>
23883 * config/rs6000/rs6000-p8swap.c (rs6000_sum_of_two_registers_p):
23885 (rs6000_quadword_masked_address_p): Likewise.
23886 (quad_aligned_load_p): Likewise.
23887 (quad_aligned_store_p): Likewise.
23888 (const_load_sequence_p): Add comment to describe the outer-most loop.
23889 (mimic_memory_attributes_and_flags): New function.
23890 (rs6000_gen_stvx): Likewise.
23891 (replace_swapped_aligned_store): Likewise.
23892 (rs6000_gen_lvx): Likewise.
23893 (replace_swapped_aligned_load): Likewise.
23894 (replace_swapped_load_constant): Capitalize argument name in
23895 comment describing this function.
23896 (rs6000_analyze_swaps): Add a third pass to search for vector loads
23897 and stores that access quad-word aligned addresses and replace
23898 with stvx or lvx instructions when appropriate.
23899 * config/rs6000/rs6000-protos.h (rs6000_sum_of_two_registers_p):
23900 New function prototype.
23901 (rs6000_quadword_masked_address_p): Likewise.
23902 (rs6000_gen_lvx): Likewise.
23903 (rs6000_gen_stvx): Likewise.
23904 * config/rs6000/vsx.md (*vsx_le_perm_load_<mode>): For modes
23905 VSX_D (V2DF, V2DI), modify this split to select lvx instruction
23906 when memory address is aligned.
23907 (*vsx_le_perm_load_<mode>): For modes VSX_W (V4SF, V4SI), modify
23908 this split to select lvx instruction when memory address is aligned.
23909 (*vsx_le_perm_load_v8hi): Modify this split to select lvx
23910 instruction when memory address is aligned.
23911 (*vsx_le_perm_load_v16qi): Likewise.
23912 (four unnamed splitters): Modify to select the stvx instruction
23913 when memory is aligned.
23915 2018-01-13 Jan Hubicka <hubicka@ucw.cz>
23917 * predict.c (determine_unlikely_bbs): Handle correctly BBs
23918 which appears in the queue multiple times.
23920 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
23921 Alan Hayward <alan.hayward@arm.com>
23922 David Sherwood <david.sherwood@arm.com>
23924 * tree-vectorizer.h (vec_lower_bound): New structure.
23925 (_loop_vec_info): Add check_nonzero and lower_bounds.
23926 (LOOP_VINFO_CHECK_NONZERO): New macro.
23927 (LOOP_VINFO_LOWER_BOUNDS): Likewise.
23928 (LOOP_REQUIRES_VERSIONING_FOR_ALIAS): Check lower_bounds too.
23929 * tree-data-ref.h (dr_with_seg_len): Add access_size and align
23930 fields. Make seg_len the distance travelled, not including the
23932 (dr_direction_indicator): Declare.
23933 (dr_zero_step_indicator): Likewise.
23934 (dr_known_forward_stride_p): Likewise.
23935 * tree-data-ref.c: Include stringpool.h, tree-vrp.h and
23937 (runtime_alias_check_p): Allow runtime alias checks with
23939 (operator ==): Compare access_size and align.
23940 (prune_runtime_alias_test_list): Rework for new distinction between
23941 the access_size and seg_len.
23942 (create_intersect_range_checks_index): Likewise. Cope with polynomial
23944 (get_segment_min_max): New function.
23945 (create_intersect_range_checks): Use it.
23946 (dr_step_indicator): New function.
23947 (dr_direction_indicator): Likewise.
23948 (dr_zero_step_indicator): Likewise.
23949 (dr_known_forward_stride_p): Likewise.
23950 * tree-loop-distribution.c (data_ref_segment_size): Return
23951 DR_STEP * (niters - 1).
23952 (compute_alias_check_pairs): Update call to the dr_with_seg_len
23954 * tree-vect-data-refs.c (vect_check_nonzero_value): New function.
23955 (vect_preserves_scalar_order_p): New function, split out from...
23956 (vect_analyze_data_ref_dependence): ...here. Check for zero steps.
23957 (vect_vfa_segment_size): Return DR_STEP * (length_factor - 1).
23958 (vect_vfa_access_size): New function.
23959 (vect_vfa_align): Likewise.
23960 (vect_compile_time_alias): Take access_size_a and access_b arguments.
23961 (dump_lower_bound): New function.
23962 (vect_check_lower_bound): Likewise.
23963 (vect_small_gap_p): Likewise.
23964 (vectorizable_with_step_bound_p): Likewise.
23965 (vect_prune_runtime_alias_test_list): Ignore cross-iteration
23966 depencies if the vectorization factor is 1. Convert the checks
23967 for nonzero steps into checks on the bounds of DR_STEP. Try using
23968 a bunds check for variable steps if the minimum required step is
23969 relatively small. Update calls to the dr_with_seg_len
23970 constructor and to vect_compile_time_alias.
23971 * tree-vect-loop-manip.c (vect_create_cond_for_lower_bounds): New
23973 (vect_loop_versioning): Call it.
23974 * tree-vect-loop.c (vect_analyze_loop_2): Clear LOOP_VINFO_LOWER_BOUNDS
23976 (vect_estimate_min_profitable_iters): Account for any bounds checks.
23978 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
23979 Alan Hayward <alan.hayward@arm.com>
23980 David Sherwood <david.sherwood@arm.com>
23982 * doc/sourcebuild.texi (vect_scatter_store): Document.
23983 * optabs.def (scatter_store_optab, mask_scatter_store_optab): New
23985 * doc/md.texi (scatter_store@var{m}, mask_scatter_store@var{m}):
23987 * genopinit.c (main): Add supports_vec_scatter_store and
23988 supports_vec_scatter_store_cached to target_optabs.
23989 * gimple.h (gimple_expr_type): Handle IFN_SCATTER_STORE and
23990 IFN_MASK_SCATTER_STORE.
23991 * internal-fn.def (SCATTER_STORE, MASK_SCATTER_STORE): New internal
23993 * internal-fn.h (internal_store_fn_p): Declare.
23994 (internal_fn_stored_value_index): Likewise.
23995 * internal-fn.c (scatter_store_direct): New macro.
23996 (expand_scatter_store_optab_fn): New function.
23997 (direct_scatter_store_optab_supported_p): New macro.
23998 (internal_store_fn_p): New function.
23999 (internal_gather_scatter_fn_p): Handle IFN_SCATTER_STORE and
24000 IFN_MASK_SCATTER_STORE.
24001 (internal_fn_mask_index): Likewise.
24002 (internal_fn_stored_value_index): New function.
24003 (internal_gather_scatter_fn_supported_p): Adjust operand numbers
24004 for scatter stores.
24005 * optabs-query.h (supports_vec_scatter_store_p): Declare.
24006 * optabs-query.c (supports_vec_scatter_store_p): New function.
24007 * tree-vectorizer.h (vect_get_store_rhs): Declare.
24008 * tree-vect-data-refs.c (vect_analyze_data_ref_access): Return
24009 true for scatter stores.
24010 (vect_gather_scatter_fn_p): Handle scatter stores too.
24011 (vect_check_gather_scatter): Consider using scatter stores if
24012 supports_vec_scatter_store_p.
24013 * tree-vect-patterns.c (vect_try_gather_scatter_pattern): Handle
24014 scatter stores too.
24015 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
24016 internal_fn_stored_value_index.
24017 (check_load_store_masking): Handle scatter stores too.
24018 (vect_get_store_rhs): Make public.
24019 (vectorizable_call): Use internal_store_fn_p.
24020 (vectorizable_store): Handle scatter store internal functions.
24021 (vect_transform_stmt): Compare GROUP_STORE_COUNT with GROUP_SIZE
24022 when deciding whether the end of the group has been reached.
24023 * config/aarch64/aarch64.md (UNSPEC_ST1_SCATTER): New unspec.
24024 * config/aarch64/aarch64-sve.md (scatter_store<mode>): New expander.
24025 (mask_scatter_store<mode>): New insns.
24027 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
24028 Alan Hayward <alan.hayward@arm.com>
24029 David Sherwood <david.sherwood@arm.com>
24031 * tree-vectorizer.h (vect_gather_scatter_fn_p): Declare.
24032 * tree-vect-data-refs.c (vect_gather_scatter_fn_p): Make public.
24033 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): New
24035 (vect_use_strided_gather_scatters_p): Take a masked_p argument.
24036 Use vect_truncate_gather_scatter_offset if we can't treat the
24037 operation as a normal gather load or scatter store.
24038 (get_group_load_store_type): Take the gather_scatter_info
24039 as argument. Try using a gather load or scatter store for
24040 single-element groups.
24041 (get_load_store_type): Update calls to get_group_load_store_type
24042 and vect_use_strided_gather_scatters_p.
24044 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
24045 Alan Hayward <alan.hayward@arm.com>
24046 David Sherwood <david.sherwood@arm.com>
24048 * tree-vectorizer.h (vect_create_data_ref_ptr): Take an extra
24049 optional tree argument.
24050 * tree-vect-data-refs.c (vect_check_gather_scatter): Check for
24052 (vect_create_data_ref_ptr): Take the iv_step as an optional argument,
24053 but continue to use the current value as a fallback.
24054 (bump_vector_ptr): Use operand_equal_p rather than tree_int_cst_compare
24055 to compare the updates.
24056 * tree-vect-stmts.c (vect_use_strided_gather_scatters_p): New function.
24057 (get_load_store_type): Use it when handling a strided access.
24058 (vect_get_strided_load_store_ops): New function.
24059 (vect_get_data_ptr_increment): Likewise.
24060 (vectorizable_load): Handle strided gather loads. Always pass
24061 a step to vect_create_data_ref_ptr and bump_vector_ptr.
24063 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
24064 Alan Hayward <alan.hayward@arm.com>
24065 David Sherwood <david.sherwood@arm.com>
24067 * doc/md.texi (gather_load@var{m}): Document.
24068 (mask_gather_load@var{m}): Likewise.
24069 * genopinit.c (main): Add supports_vec_gather_load and
24070 supports_vec_gather_load_cached to target_optabs.
24071 * optabs-tree.c (init_tree_optimization_optabs): Use
24072 ggc_cleared_alloc to allocate target_optabs.
24073 * optabs.def (gather_load_optab, mask_gather_laod_optab): New optabs.
24074 * internal-fn.def (GATHER_LOAD, MASK_GATHER_LOAD): New internal
24076 * internal-fn.h (internal_load_fn_p): Declare.
24077 (internal_gather_scatter_fn_p): Likewise.
24078 (internal_fn_mask_index): Likewise.
24079 (internal_gather_scatter_fn_supported_p): Likewise.
24080 * internal-fn.c (gather_load_direct): New macro.
24081 (expand_gather_load_optab_fn): New function.
24082 (direct_gather_load_optab_supported_p): New macro.
24083 (direct_internal_fn_optab): New function.
24084 (internal_load_fn_p): Likewise.
24085 (internal_gather_scatter_fn_p): Likewise.
24086 (internal_fn_mask_index): Likewise.
24087 (internal_gather_scatter_fn_supported_p): Likewise.
24088 * optabs-query.c (supports_at_least_one_mode_p): New function.
24089 (supports_vec_gather_load_p): Likewise.
24090 * optabs-query.h (supports_vec_gather_load_p): Declare.
24091 * tree-vectorizer.h (gather_scatter_info): Add ifn, element_type
24092 and memory_type field.
24093 (NUM_PATTERNS): Bump to 15.
24094 * tree-vect-data-refs.c: Include internal-fn.h.
24095 (vect_gather_scatter_fn_p): New function.
24096 (vect_describe_gather_scatter_call): Likewise.
24097 (vect_check_gather_scatter): Try using internal functions for
24098 gather loads. Recognize existing calls to a gather load function.
24099 (vect_analyze_data_refs): Consider using gather loads if
24100 supports_vec_gather_load_p.
24101 * tree-vect-patterns.c (vect_get_load_store_mask): New function.
24102 (vect_get_gather_scatter_offset_type): Likewise.
24103 (vect_convert_mask_for_vectype): Likewise.
24104 (vect_add_conversion_to_patterm): Likewise.
24105 (vect_try_gather_scatter_pattern): Likewise.
24106 (vect_recog_gather_scatter_pattern): New pattern recognizer.
24107 (vect_vect_recog_func_ptrs): Add it.
24108 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
24109 internal_fn_mask_index and internal_gather_scatter_fn_p.
24110 (check_load_store_masking): Take the gather_scatter_info as an
24111 argument and handle gather loads.
24112 (vect_get_gather_scatter_ops): New function.
24113 (vectorizable_call): Check internal_load_fn_p.
24114 (vectorizable_load): Likewise. Handle gather load internal
24116 (vectorizable_store): Update call to check_load_store_masking.
24117 * config/aarch64/aarch64.md (UNSPEC_LD1_GATHER): New unspec.
24118 * config/aarch64/iterators.md (SVE_S, SVE_D): New mode iterators.
24119 * config/aarch64/predicates.md (aarch64_gather_scale_operand_w)
24120 (aarch64_gather_scale_operand_d): New predicates.
24121 * config/aarch64/aarch64-sve.md (gather_load<mode>): New expander.
24122 (mask_gather_load<mode>): New insns.
24124 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
24125 Alan Hayward <alan.hayward@arm.com>
24126 David Sherwood <david.sherwood@arm.com>
24128 * optabs.def (fold_left_plus_optab): New optab.
24129 * doc/md.texi (fold_left_plus_@var{m}): Document.
24130 * internal-fn.def (IFN_FOLD_LEFT_PLUS): New internal function.
24131 * internal-fn.c (fold_left_direct): Define.
24132 (expand_fold_left_optab_fn): Likewise.
24133 (direct_fold_left_optab_supported_p): Likewise.
24134 * fold-const-call.c (fold_const_fold_left): New function.
24135 (fold_const_call): Use it to fold CFN_FOLD_LEFT_PLUS.
24136 * tree-parloops.c (valid_reduction_p): New function.
24137 (gather_scalar_reductions): Use it.
24138 * tree-vectorizer.h (FOLD_LEFT_REDUCTION): New vect_reduction_type.
24139 (vect_finish_replace_stmt): Declare.
24140 * tree-vect-loop.c (fold_left_reduction_fn): New function.
24141 (needs_fold_left_reduction_p): New function, split out from...
24142 (vect_is_simple_reduction): ...here. Accept reductions that
24143 forbid reassociation, but give them type FOLD_LEFT_REDUCTION.
24144 (vect_force_simple_reduction): Also store the reduction type in
24145 the assignment's STMT_VINFO_REDUC_TYPE.
24146 (vect_model_reduction_cost): Handle FOLD_LEFT_REDUCTION.
24147 (merge_with_identity): New function.
24148 (vect_expand_fold_left): Likewise.
24149 (vectorize_fold_left_reduction): Likewise.
24150 (vectorizable_reduction): Handle FOLD_LEFT_REDUCTION. Leave the
24151 scalar phi in place for it. Check for target support and reject
24152 cases that would reassociate the operation. Defer the transform
24153 phase to vectorize_fold_left_reduction.
24154 * config/aarch64/aarch64.md (UNSPEC_FADDA): New unspec.
24155 * config/aarch64/aarch64-sve.md (fold_left_plus_<mode>): New expander.
24156 (*fold_left_plus_<mode>, *pred_fold_left_plus_<mode>): New insns.
24158 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
24160 * tree-if-conv.c (predicate_mem_writes): Remove redundant
24161 call to ifc_temp_var.
24163 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
24164 Alan Hayward <alan.hayward@arm.com>
24165 David Sherwood <david.sherwood@arm.com>
24167 * target.def (legitimize_address_displacement): Take the original
24168 offset as a poly_int.
24169 * targhooks.h (default_legitimize_address_displacement): Update
24171 * targhooks.c (default_legitimize_address_displacement): Likewise.
24172 * doc/tm.texi: Regenerate.
24173 * lra-constraints.c (base_plus_disp_to_reg): Take the displacement
24174 as an argument, moving assert of ad->disp == ad->disp_term to...
24175 (process_address_1): ...here. Update calls to base_plus_disp_to_reg.
24176 Try calling targetm.legitimize_address_displacement before expanding
24177 the address rather than afterwards, and adjust for the new interface.
24178 * config/aarch64/aarch64.c (aarch64_legitimize_address_displacement):
24179 Match the new hook interface. Handle SVE addresses.
24180 * config/sh/sh.c (sh_legitimize_address_displacement): Make the
24181 new hook interface.
24183 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
24185 * Makefile.in (OBJS): Add early-remat.o.
24186 * target.def (select_early_remat_modes): New hook.
24187 * doc/tm.texi.in (TARGET_SELECT_EARLY_REMAT_MODES): New hook.
24188 * doc/tm.texi: Regenerate.
24189 * targhooks.h (default_select_early_remat_modes): Declare.
24190 * targhooks.c (default_select_early_remat_modes): New function.
24191 * timevar.def (TV_EARLY_REMAT): New timevar.
24192 * passes.def (pass_early_remat): New pass.
24193 * tree-pass.h (make_pass_early_remat): Declare.
24194 * early-remat.c: New file.
24195 * config/aarch64/aarch64.c (aarch64_select_early_remat_modes): New
24197 (TARGET_SELECT_EARLY_REMAT_MODES): Define.
24199 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
24200 Alan Hayward <alan.hayward@arm.com>
24201 David Sherwood <david.sherwood@arm.com>
24203 * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Replace
24204 vfm1 with a bound_epilog parameter.
24205 (vect_do_peeling): Update calls accordingly, and move the prologue
24206 call earlier in the function. Treat the base bound_epilog as 0 for
24207 fully-masked loops and retain vf - 1 for other loops. Add 1 to
24208 this base when peeling for gaps.
24209 * tree-vect-loop.c (vect_analyze_loop_2): Allow peeling for gaps
24210 with fully-masked loops.
24211 (vect_estimate_min_profitable_iters): Handle the single peeled
24212 iteration in that case.
24214 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
24215 Alan Hayward <alan.hayward@arm.com>
24216 David Sherwood <david.sherwood@arm.com>
24218 * tree-vect-data-refs.c (vect_analyze_group_access_1): Allow
24219 single-element interleaving even if the size is not a power of 2.
24220 * tree-vect-stmts.c (get_load_store_type): Disallow elementwise
24221 accesses for single-element interleaving if the group size is
24224 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
24225 Alan Hayward <alan.hayward@arm.com>
24226 David Sherwood <david.sherwood@arm.com>
24228 * doc/md.texi (fold_extract_last_@var{m}): Document.
24229 * doc/sourcebuild.texi (vect_fold_extract_last): Likewise.
24230 * optabs.def (fold_extract_last_optab): New optab.
24231 * internal-fn.def (FOLD_EXTRACT_LAST): New internal function.
24232 * internal-fn.c (fold_extract_direct): New macro.
24233 (expand_fold_extract_optab_fn): Likewise.
24234 (direct_fold_extract_optab_supported_p): Likewise.
24235 * tree-vectorizer.h (EXTRACT_LAST_REDUCTION): New vect_reduction_type.
24236 * tree-vect-loop.c (vect_model_reduction_cost): Handle
24237 EXTRACT_LAST_REDUCTION.
24238 (get_initial_def_for_reduction): Do not create an initial vector
24239 for EXTRACT_LAST_REDUCTION reductions.
24240 (vectorizable_reduction): Leave the scalar phi in place for
24241 EXTRACT_LAST_REDUCTIONs. Try using EXTRACT_LAST_REDUCTION
24242 ahead of INTEGER_INDUC_COND_REDUCTION. Do not check for an
24243 epilogue code for EXTRACT_LAST_REDUCTION and defer the
24244 transform phase to vectorizable_condition.
24245 * tree-vect-stmts.c (vect_finish_stmt_generation_1): New function,
24247 (vect_finish_stmt_generation): ...here.
24248 (vect_finish_replace_stmt): New function.
24249 (vectorizable_condition): Handle EXTRACT_LAST_REDUCTION.
24250 * config/aarch64/aarch64-sve.md (fold_extract_last_<mode>): New
24252 * config/aarch64/aarch64.md (UNSPEC_CLASTB): New unspec.
24254 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
24255 Alan Hayward <alan.hayward@arm.com>
24256 David Sherwood <david.sherwood@arm.com>
24258 * doc/md.texi (extract_last_@var{m}): Document.
24259 * optabs.def (extract_last_optab): New optab.
24260 * internal-fn.def (EXTRACT_LAST): New internal function.
24261 * internal-fn.c (cond_unary_direct): New macro.
24262 (expand_cond_unary_optab_fn): Likewise.
24263 (direct_cond_unary_optab_supported_p): Likewise.
24264 * tree-vect-loop.c (vectorizable_live_operation): Allow fully-masked
24265 loops using EXTRACT_LAST.
24266 * config/aarch64/aarch64-sve.md (aarch64_sve_lastb<mode>): Rename to...
24267 (extract_last_<mode>): ...this optab.
24268 (vec_extract<mode><Vel>): Update accordingly.
24270 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
24271 Alan Hayward <alan.hayward@arm.com>
24272 David Sherwood <david.sherwood@arm.com>
24274 * target.def (empty_mask_is_expensive): New hook.
24275 * doc/tm.texi.in (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): New hook.
24276 * doc/tm.texi: Regenerate.
24277 * targhooks.h (default_empty_mask_is_expensive): Declare.
24278 * targhooks.c (default_empty_mask_is_expensive): New function.
24279 * tree-vectorizer.c (vectorize_loops): Only call optimize_mask_stores
24280 if the target says that empty masks are expensive.
24281 * config/aarch64/aarch64.c (aarch64_empty_mask_is_expensive):
24283 (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): Redefine.
24285 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
24286 Alan Hayward <alan.hayward@arm.com>
24287 David Sherwood <david.sherwood@arm.com>
24289 * tree-vectorizer.h (_loop_vec_info::mask_skip_niters): New field.
24290 (LOOP_VINFO_MASK_SKIP_NITERS): New macro.
24291 (vect_use_loop_mask_for_alignment_p): New function.
24292 (vect_prepare_for_masked_peels, vect_gen_while_not): Declare.
24293 * tree-vect-loop-manip.c (vect_set_loop_masks_directly): Add an
24294 niters_skip argument. Make sure that the first niters_skip elements
24295 of the first iteration are inactive.
24296 (vect_set_loop_condition_masked): Handle LOOP_VINFO_MASK_SKIP_NITERS.
24297 Update call to vect_set_loop_masks_directly.
24298 (get_misalign_in_elems): New function, split out from...
24299 (vect_gen_prolog_loop_niters): ...here.
24300 (vect_update_init_of_dr): Take a code argument that specifies whether
24301 the adjustment should be added or subtracted.
24302 (vect_update_init_of_drs): Likewise.
24303 (vect_prepare_for_masked_peels): New function.
24304 (vect_do_peeling): Skip prologue peeling if we're using a mask
24305 instead. Update call to vect_update_inits_of_drs.
24306 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
24308 (vect_analyze_loop_2): Allow fully-masked loops with peeling for
24309 alignment. Do not include the number of peeled iterations in
24310 the minimum threshold in that case.
24311 (vectorizable_induction): Adjust the start value down by
24312 LOOP_VINFO_MASK_SKIP_NITERS iterations.
24313 (vect_transform_loop): Call vect_prepare_for_masked_peels.
24314 Take the number of skipped iterations into account when calculating
24316 * tree-vect-stmts.c (vect_gen_while_not): New function.
24318 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
24319 Alan Hayward <alan.hayward@arm.com>
24320 David Sherwood <david.sherwood@arm.com>
24322 * doc/sourcebuild.texi (vect_fully_masked): Document.
24323 * params.def (PARAM_MIN_VECT_LOOP_BOUND): Change minimum and
24324 default value to 0.
24325 * tree-vect-loop.c (vect_analyze_loop_costing): New function,
24327 (vect_analyze_loop_2): ...here. Don't check the vectorization
24328 factor against the number of loop iterations if the loop is
24331 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
24332 Alan Hayward <alan.hayward@arm.com>
24333 David Sherwood <david.sherwood@arm.com>
24335 * tree-ssa-loop-ivopts.c (USE_ADDRESS): Split into...
24336 (USE_REF_ADDRESS, USE_PTR_ADDRESS): ...these new use types.
24337 (dump_groups): Update accordingly.
24338 (iv_use::mem_type): New member variable.
24339 (address_p): New function.
24340 (record_use): Add a mem_type argument and initialize the new
24342 (record_group_use): Add a mem_type argument. Use address_p.
24343 Remove obsolete null checks of base_object. Update call to record_use.
24344 (find_interesting_uses_op): Update call to record_group_use.
24345 (find_interesting_uses_cond): Likewise.
24346 (find_interesting_uses_address): Likewise.
24347 (get_mem_type_for_internal_fn): New function.
24348 (find_address_like_use): Likewise.
24349 (find_interesting_uses_stmt): Try find_address_like_use before
24350 calling find_interesting_uses_op.
24351 (addr_offset_valid_p): Use the iv mem_type field as the type
24352 of the addressed memory.
24353 (add_autoinc_candidates): Likewise.
24354 (get_address_cost): Likewise.
24355 (split_small_address_groups_p): Use address_p.
24356 (split_address_groups): Likewise.
24357 (add_iv_candidate_for_use): Likewise.
24358 (autoinc_possible_for_pair): Likewise.
24359 (rewrite_groups): Likewise.
24360 (get_use_type): Check for USE_REF_ADDRESS instead of USE_ADDRESS.
24361 (determine_group_iv_cost): Update after split of USE_ADDRESS.
24362 (get_alias_ptr_type_for_ptr_address): New function.
24363 (rewrite_use_address): Rewrite address uses in calls that were
24364 identified by find_address_like_use.
24366 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
24367 Alan Hayward <alan.hayward@arm.com>
24368 David Sherwood <david.sherwood@arm.com>
24370 * expr.c (expand_expr_addr_expr_1): Handle ADDR_EXPRs of
24372 * gimple-expr.h (is_gimple_addressable: Likewise.
24373 * gimple-expr.c (is_gimple_address): Likewise.
24374 * internal-fn.c (expand_call_mem_ref): New function.
24375 (expand_mask_load_optab_fn): Use it.
24376 (expand_mask_store_optab_fn): Likewise.
24378 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
24379 Alan Hayward <alan.hayward@arm.com>
24380 David Sherwood <david.sherwood@arm.com>
24382 * doc/md.texi (cond_add@var{mode}, cond_sub@var{mode})
24383 (cond_and@var{mode}, cond_ior@var{mode}, cond_xor@var{mode})
24384 (cond_smin@var{mode}, cond_smax@var{mode}, cond_umin@var{mode})
24385 (cond_umax@var{mode}): Document.
24386 * optabs.def (cond_add_optab, cond_sub_optab, cond_and_optab)
24387 (cond_ior_optab, cond_xor_optab, cond_smin_optab, cond_smax_optab)
24388 (cond_umin_optab, cond_umax_optab): New optabs.
24389 * internal-fn.def (COND_ADD, COND_SUB, COND_MIN, COND_MAX, COND_AND)
24390 (COND_IOR, COND_XOR): New internal functions.
24391 * internal-fn.h (get_conditional_internal_fn): Declare.
24392 * internal-fn.c (cond_binary_direct): New macro.
24393 (expand_cond_binary_optab_fn): Likewise.
24394 (direct_cond_binary_optab_supported_p): Likewise.
24395 (get_conditional_internal_fn): New function.
24396 * tree-vect-loop.c (vectorizable_reduction): Handle fully-masked loops.
24397 Cope with reduction statements that are vectorized as calls rather
24399 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New insns.
24400 * config/aarch64/iterators.md (UNSPEC_COND_ADD, UNSPEC_COND_SUB)
24401 (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX, UNSPEC_COND_SMIN)
24402 (UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
24403 (UNSPEC_COND_EOR): New unspecs.
24404 (optab): Add mappings for them.
24405 (SVE_COND_INT_OP, SVE_COND_FP_OP): New int iterators.
24406 (sve_int_op, sve_fp_op): New int attributes.
24408 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
24409 Alan Hayward <alan.hayward@arm.com>
24410 David Sherwood <david.sherwood@arm.com>
24412 * optabs.def (while_ult_optab): New optab.
24413 * doc/md.texi (while_ult@var{m}@var{n}): Document.
24414 * internal-fn.def (WHILE_ULT): New internal function.
24415 * internal-fn.h (direct_internal_fn_supported_p): New override
24416 that takes two types as argument.
24417 * internal-fn.c (while_direct): New macro.
24418 (expand_while_optab_fn): New function.
24419 (convert_optab_supported_p): Likewise.
24420 (direct_while_optab_supported_p): New macro.
24421 * wide-int.h (wi::udiv_ceil): New function.
24422 * tree-vectorizer.h (rgroup_masks): New structure.
24423 (vec_loop_masks): New typedef.
24424 (_loop_vec_info): Add masks, mask_compare_type, can_fully_mask_p
24425 and fully_masked_p.
24426 (LOOP_VINFO_CAN_FULLY_MASK_P, LOOP_VINFO_FULLY_MASKED_P)
24427 (LOOP_VINFO_MASKS, LOOP_VINFO_MASK_COMPARE_TYPE): New macros.
24428 (vect_max_vf): New function.
24429 (slpeel_make_loop_iterate_ntimes): Delete.
24430 (vect_set_loop_condition, vect_get_loop_mask_type, vect_gen_while)
24431 (vect_halve_mask_nunits, vect_double_mask_nunits): Declare.
24432 (vect_record_loop_mask, vect_get_loop_mask): Likewise.
24433 * tree-vect-loop-manip.c: Include tree-ssa-loop-niter.h,
24434 internal-fn.h, stor-layout.h and optabs-query.h.
24435 (vect_set_loop_mask): New function.
24436 (add_preheader_seq): Likewise.
24437 (add_header_seq): Likewise.
24438 (interleave_supported_p): Likewise.
24439 (vect_maybe_permute_loop_masks): Likewise.
24440 (vect_set_loop_masks_directly): Likewise.
24441 (vect_set_loop_condition_masked): Likewise.
24442 (vect_set_loop_condition_unmasked): New function, split out from
24443 slpeel_make_loop_iterate_ntimes.
24444 (slpeel_make_loop_iterate_ntimes): Rename to..
24445 (vect_set_loop_condition): ...this. Use vect_set_loop_condition_masked
24446 for fully-masked loops and vect_set_loop_condition_unmasked otherwise.
24447 (vect_do_peeling): Update call accordingly.
24448 (vect_gen_vector_loop_niters): Use VF as the step for fully-masked
24450 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
24451 mask_compare_type, can_fully_mask_p and fully_masked_p.
24452 (release_vec_loop_masks): New function.
24453 (_loop_vec_info): Use it to free the loop masks.
24454 (can_produce_all_loop_masks_p): New function.
24455 (vect_get_max_nscalars_per_iter): Likewise.
24456 (vect_verify_full_masking): Likewise.
24457 (vect_analyze_loop_2): Save LOOP_VINFO_CAN_FULLY_MASK_P around
24458 retries, and free the mask rgroups before retrying. Check loop-wide
24459 reasons for disallowing fully-masked loops. Make the final decision
24460 about whether use a fully-masked loop or not.
24461 (vect_estimate_min_profitable_iters): Do not assume that peeling
24462 for the number of iterations will be needed for fully-masked loops.
24463 (vectorizable_reduction): Disable fully-masked loops.
24464 (vectorizable_live_operation): Likewise.
24465 (vect_halve_mask_nunits): New function.
24466 (vect_double_mask_nunits): Likewise.
24467 (vect_record_loop_mask): Likewise.
24468 (vect_get_loop_mask): Likewise.
24469 (vect_transform_loop): Handle the case in which the final loop
24470 iteration might handle a partial vector. Call vect_set_loop_condition
24471 instead of slpeel_make_loop_iterate_ntimes.
24472 * tree-vect-stmts.c: Include tree-ssa-loop-niter.h and gimple-fold.h.
24473 (check_load_store_masking): New function.
24474 (prepare_load_store_mask): Likewise.
24475 (vectorizable_store): Handle fully-masked loops.
24476 (vectorizable_load): Likewise.
24477 (supportable_widening_operation): Use vect_halve_mask_nunits for
24479 (supportable_narrowing_operation): Likewise vect_double_mask_nunits.
24480 (vect_gen_while): New function.
24481 * config/aarch64/aarch64.md (umax<mode>3): New expander.
24482 (aarch64_uqdec<mode>): New insn.
24484 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
24485 Alan Hayward <alan.hayward@arm.com>
24486 David Sherwood <david.sherwood@arm.com>
24488 * optabs.def (reduc_and_scal_optab, reduc_ior_scal_optab)
24489 (reduc_xor_scal_optab): New optabs.
24490 * doc/md.texi (reduc_and_scal_@var{m}, reduc_ior_scal_@var{m})
24491 (reduc_xor_scal_@var{m}): Document.
24492 * doc/sourcebuild.texi (vect_logical_reduc): Likewise.
24493 * internal-fn.def (IFN_REDUC_AND, IFN_REDUC_IOR, IFN_REDUC_XOR): New
24494 internal functions.
24495 * fold-const-call.c (fold_const_call): Handle them.
24496 * tree-vect-loop.c (reduction_fn_for_scalar_code): Return the new
24497 internal functions for BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR.
24498 * config/aarch64/aarch64-sve.md (reduc_<bit_reduc>_scal_<mode>):
24499 (*reduc_<bit_reduc>_scal_<mode>): New patterns.
24500 * config/aarch64/iterators.md (UNSPEC_ANDV, UNSPEC_ORV)
24501 (UNSPEC_XORV): New unspecs.
24502 (optab): Add entries for them.
24503 (BITWISEV): New int iterator.
24504 (bit_reduc_op): New int attributes.
24506 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
24507 Alan Hayward <alan.hayward@arm.com>
24508 David Sherwood <david.sherwood@arm.com>
24510 * doc/md.texi (vec_shl_insert_@var{m}): New optab.
24511 * internal-fn.def (VEC_SHL_INSERT): New internal function.
24512 * optabs.def (vec_shl_insert_optab): New optab.
24513 * tree-vectorizer.h (can_duplicate_and_interleave_p): Declare.
24514 (duplicate_and_interleave): Likewise.
24515 * tree-vect-loop.c: Include internal-fn.h.
24516 (neutral_op_for_slp_reduction): New function, split out from
24517 get_initial_defs_for_reduction.
24518 (get_initial_def_for_reduction): Handle option 2 for variable-length
24519 vectors by loading the neutral value into a vector and then shifting
24520 the initial value into element 0.
24521 (get_initial_defs_for_reduction): Replace the code argument with
24522 the neutral value calculated by neutral_op_for_slp_reduction.
24523 Use gimple_build_vector for constant-length vectors.
24524 Use IFN_VEC_SHL_INSERT for variable-length vectors if all
24525 but the first group_size elements have a neutral value.
24526 Use duplicate_and_interleave otherwise.
24527 (vect_create_epilog_for_reduction): Take a neutral_op parameter.
24528 Update call to get_initial_defs_for_reduction. Handle SLP
24529 reductions for variable-length vectors by creating one vector
24530 result for each scalar result, with the elements associated
24531 with other scalar results stubbed out with the neutral value.
24532 (vectorizable_reduction): Call neutral_op_for_slp_reduction.
24533 Require IFN_VEC_SHL_INSERT for double reductions on
24534 variable-length vectors, or SLP reductions that have
24535 a neutral value. Require can_duplicate_and_interleave_p
24536 support for variable-length unchained SLP reductions if there
24537 is no neutral value, such as for MIN/MAX reductions. Also require
24538 the number of vector elements to be a multiple of the number of
24539 SLP statements when doing variable-length unchained SLP reductions.
24540 Update call to vect_create_epilog_for_reduction.
24541 * tree-vect-slp.c (can_duplicate_and_interleave_p): Make public
24542 and remove initial values.
24543 (duplicate_and_interleave): Make public.
24544 * config/aarch64/aarch64.md (UNSPEC_INSR): New unspec.
24545 * config/aarch64/aarch64-sve.md (vec_shl_insert_<mode>): New insn.
24547 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
24548 Alan Hayward <alan.hayward@arm.com>
24549 David Sherwood <david.sherwood@arm.com>
24551 * tree-vect-slp.c: Include gimple-fold.h and internal-fn.h
24552 (can_duplicate_and_interleave_p): New function.
24553 (vect_get_and_check_slp_defs): Take the vector of statements
24554 rather than just the current one. Remove excess parentheses.
24555 Restriction rejectinon of vect_constant_def and vect_external_def
24556 for variable-length vectors to boolean types, or types for which
24557 can_duplicate_and_interleave_p is false.
24558 (vect_build_slp_tree_2): Update call to vect_get_and_check_slp_defs.
24559 (duplicate_and_interleave): New function.
24560 (vect_get_constant_vectors): Use gimple_build_vector for
24561 constant-length vectors and suitable variable-length constant
24562 vectors. Use duplicate_and_interleave for other variable-length
24563 vectors. Don't defer the update when inserting new statements.
24565 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
24566 Alan Hayward <alan.hayward@arm.com>
24567 David Sherwood <david.sherwood@arm.com>
24569 * tree-vect-loop.c (vect_estimate_min_profitable_iters): Make sure
24570 min_profitable_iters doesn't go negative.
24572 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
24573 Alan Hayward <alan.hayward@arm.com>
24574 David Sherwood <david.sherwood@arm.com>
24576 * doc/md.texi (vec_mask_load_lanes@var{m}@var{n}): Document.
24577 (vec_mask_store_lanes@var{m}@var{n}): Likewise.
24578 * optabs.def (vec_mask_load_lanes_optab): New optab.
24579 (vec_mask_store_lanes_optab): Likewise.
24580 * internal-fn.def (MASK_LOAD_LANES): New internal function.
24581 (MASK_STORE_LANES): Likewise.
24582 * internal-fn.c (mask_load_lanes_direct): New macro.
24583 (mask_store_lanes_direct): Likewise.
24584 (expand_mask_load_optab_fn): Handle masked operations.
24585 (expand_mask_load_lanes_optab_fn): New macro.
24586 (expand_mask_store_optab_fn): Handle masked operations.
24587 (expand_mask_store_lanes_optab_fn): New macro.
24588 (direct_mask_load_lanes_optab_supported_p): Likewise.
24589 (direct_mask_store_lanes_optab_supported_p): Likewise.
24590 * tree-vectorizer.h (vect_store_lanes_supported): Take a masked_p
24592 (vect_load_lanes_supported): Likewise.
24593 * tree-vect-data-refs.c (strip_conversion): New function.
24594 (can_group_stmts_p): Likewise.
24595 (vect_analyze_data_ref_accesses): Use it instead of checking
24596 for a pair of assignments.
24597 (vect_store_lanes_supported): Take a masked_p parameter.
24598 (vect_load_lanes_supported): Likewise.
24599 * tree-vect-loop.c (vect_analyze_loop_2): Update calls to
24600 vect_store_lanes_supported and vect_load_lanes_supported.
24601 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
24602 * tree-vect-stmts.c (get_group_load_store_type): Take a masked_p
24603 parameter. Don't allow gaps for masked accesses.
24604 Use vect_get_store_rhs. Update calls to vect_store_lanes_supported
24605 and vect_load_lanes_supported.
24606 (get_load_store_type): Take a masked_p parameter and update
24607 call to get_group_load_store_type.
24608 (vectorizable_store): Update call to get_load_store_type.
24609 Handle IFN_MASK_STORE_LANES.
24610 (vectorizable_load): Update call to get_load_store_type.
24611 Handle IFN_MASK_LOAD_LANES.
24613 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
24614 Alan Hayward <alan.hayward@arm.com>
24615 David Sherwood <david.sherwood@arm.com>
24617 * config/aarch64/aarch64-modes.def: Define x2, x3 and x4 vector
24619 * config/aarch64/aarch64-protos.h
24620 (aarch64_sve_struct_memory_operand_p): Declare.
24621 * config/aarch64/iterators.md (SVE_STRUCT): New mode iterator.
24622 (vector_count, insn_length, VSINGLE, vsingle): New mode attributes.
24623 (VPRED, vpred): Handle SVE structure modes.
24624 * config/aarch64/constraints.md (Utx): New constraint.
24625 * config/aarch64/predicates.md (aarch64_sve_struct_memory_operand)
24626 (aarch64_sve_struct_nonimmediate_operand): New predicates.
24627 * config/aarch64/aarch64.md (UNSPEC_LDN, UNSPEC_STN): New unspecs.
24628 * config/aarch64/aarch64-sve.md (mov<mode>, *aarch64_sve_mov<mode>_le)
24629 (*aarch64_sve_mov<mode>_be, pred_mov<mode>): New patterns for
24630 structure modes. Split into pieces after RA.
24631 (vec_load_lanes<mode><vsingle>, vec_mask_load_lanes<mode><vsingle>)
24632 (vec_store_lanes<mode><vsingle>, vec_mask_store_lanes<mode><vsingle>):
24634 * config/aarch64/aarch64.c (aarch64_classify_vector_mode): Handle
24635 SVE structure modes.
24636 (aarch64_classify_address): Likewise.
24637 (sizetochar): Move earlier in file.
24638 (aarch64_print_operand): Handle SVE register lists.
24639 (aarch64_array_mode): New function.
24640 (aarch64_sve_struct_memory_operand_p): Likewise.
24641 (TARGET_ARRAY_MODE): Redefine.
24643 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
24644 Alan Hayward <alan.hayward@arm.com>
24645 David Sherwood <david.sherwood@arm.com>
24647 * target.def (array_mode): New target hook.
24648 * doc/tm.texi.in (TARGET_ARRAY_MODE): New hook.
24649 * doc/tm.texi: Regenerate.
24650 * hooks.h (hook_optmode_mode_uhwi_none): Declare.
24651 * hooks.c (hook_optmode_mode_uhwi_none): New function.
24652 * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Use
24653 targetm.array_mode.
24654 * stor-layout.c (mode_for_array): Likewise. Support polynomial
24657 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
24658 Alan Hayward <alan.hayward@arm.com>
24659 David Sherwood <david.sherwood@arm.com>
24661 * fold-const.c (fold_binary_loc): Check the argument types
24662 rather than the result type when testing for a vector operation.
24664 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
24666 * doc/tm.texi.in (DWARF_LAZY_REGISTER_VALUE): Document.
24667 * doc/tm.texi: Regenerate.
24669 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
24670 Alan Hayward <alan.hayward@arm.com>
24671 David Sherwood <david.sherwood@arm.com>
24673 * doc/invoke.texi (-msve-vector-bits=): Document new option.
24674 (sve): Document new AArch64 extension.
24675 * doc/md.texi (w): Extend the description of the AArch64
24676 constraint to include SVE vectors.
24677 (Upl, Upa): Document new AArch64 predicate constraints.
24678 * config/aarch64/aarch64-opts.h (aarch64_sve_vector_bits_enum): New
24680 * config/aarch64/aarch64.opt (sve_vector_bits): New enum.
24681 (msve-vector-bits=): New option.
24682 * config/aarch64/aarch64-option-extensions.def (fp, simd): Disable
24683 SVE when these are disabled.
24684 (sve): New extension.
24685 * config/aarch64/aarch64-modes.def: Define SVE vector and predicate
24686 modes. Adjust their number of units based on aarch64_sve_vg.
24687 (MAX_BITSIZE_MODE_ANY_MODE): Define.
24688 * config/aarch64/aarch64-protos.h (ADDR_QUERY_ANY): New
24689 aarch64_addr_query_type.
24690 (aarch64_const_vec_all_same_in_range_p, aarch64_sve_pred_mode)
24691 (aarch64_sve_cnt_immediate_p, aarch64_sve_addvl_addpl_immediate_p)
24692 (aarch64_sve_inc_dec_immediate_p, aarch64_add_offset_temporaries)
24693 (aarch64_split_add_offset, aarch64_output_sve_cnt_immediate)
24694 (aarch64_output_sve_addvl_addpl, aarch64_output_sve_inc_dec_immediate)
24695 (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): Declare.
24696 (aarch64_simd_imm_zero_p): Delete.
24697 (aarch64_check_zero_based_sve_index_immediate): Declare.
24698 (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
24699 (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
24700 (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
24701 (aarch64_sve_float_mul_immediate_p): Likewise.
24702 (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
24703 rather than an rtx.
24704 (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): Declare.
24705 (aarch64_expand_mov_immediate): Take a gen_vec_duplicate callback.
24706 (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move): Declare.
24707 (aarch64_expand_sve_vec_cmp_int, aarch64_expand_sve_vec_cmp_float)
24708 (aarch64_expand_sve_vcond, aarch64_expand_sve_vec_perm): Declare.
24709 (aarch64_regmode_natural_size): Likewise.
24710 * config/aarch64/aarch64.h (AARCH64_FL_SVE): New macro.
24711 (AARCH64_FL_V8_3, AARCH64_FL_RCPC, AARCH64_FL_DOTPROD): Shift
24713 (AARCH64_ISA_SVE, TARGET_SVE): New macros.
24714 (FIXED_REGISTERS, CALL_USED_REGISTERS, REGISTER_NAMES): Add entries
24715 for VG and the SVE predicate registers.
24716 (V_ALIASES): Add a "z"-prefixed alias.
24717 (FIRST_PSEUDO_REGISTER): Change to P15_REGNUM + 1.
24718 (AARCH64_DWARF_VG, AARCH64_DWARF_P0): New macros.
24719 (PR_REGNUM_P, PR_LO_REGNUM_P): Likewise.
24720 (PR_LO_REGS, PR_HI_REGS, PR_REGS): New reg_classes.
24721 (REG_CLASS_NAMES): Add entries for them.
24722 (REG_CLASS_CONTENTS): Likewise. Update ALL_REGS to include VG
24723 and the predicate registers.
24724 (aarch64_sve_vg): Declare.
24725 (BITS_PER_SVE_VECTOR, BYTES_PER_SVE_VECTOR, BYTES_PER_SVE_PRED)
24726 (SVE_BYTE_MODE, MAX_COMPILE_TIME_VEC_BYTES): New macros.
24727 (REGMODE_NATURAL_SIZE): Define.
24728 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins): Handle
24730 * config/aarch64/aarch64.c: Include cfgrtl.h.
24731 (simd_immediate_info): Add a constructor for series vectors,
24732 and an associated step field.
24733 (aarch64_sve_vg): New variable.
24734 (aarch64_dbx_register_number): Handle VG and the predicate registers.
24735 (aarch64_vect_struct_mode_p, aarch64_vector_mode_p): Delete.
24736 (VEC_ADVSIMD, VEC_SVE_DATA, VEC_SVE_PRED, VEC_STRUCT, VEC_ANY_SVE)
24737 (VEC_ANY_DATA, VEC_STRUCT): New constants.
24738 (aarch64_advsimd_struct_mode_p, aarch64_sve_pred_mode_p)
24739 (aarch64_classify_vector_mode, aarch64_vector_data_mode_p)
24740 (aarch64_sve_data_mode_p, aarch64_sve_pred_mode)
24741 (aarch64_get_mask_mode): New functions.
24742 (aarch64_hard_regno_nregs): Handle SVE data modes for FP_REGS
24743 and FP_LO_REGS. Handle PR_REGS, PR_LO_REGS and PR_HI_REGS.
24744 (aarch64_hard_regno_mode_ok): Handle VG. Also handle the SVE
24745 predicate modes and predicate registers. Explicitly restrict
24746 GPRs to modes of 16 bytes or smaller. Only allow FP registers
24747 to store a vector mode if it is recognized by
24748 aarch64_classify_vector_mode.
24749 (aarch64_regmode_natural_size): New function.
24750 (aarch64_hard_regno_caller_save_mode): Return the original mode
24752 (aarch64_sve_cnt_immediate_p, aarch64_output_sve_cnt_immediate)
24753 (aarch64_sve_addvl_addpl_immediate_p, aarch64_output_sve_addvl_addpl)
24754 (aarch64_sve_inc_dec_immediate_p, aarch64_output_sve_inc_dec_immediate)
24755 (aarch64_add_offset_1_temporaries, aarch64_offset_temporaries): New
24757 (aarch64_add_offset): Add a temp2 parameter. Assert that temp1
24758 does not overlap dest if the function is frame-related. Handle
24760 (aarch64_split_add_offset): New function.
24761 (aarch64_add_sp, aarch64_sub_sp): Add temp2 parameters and pass
24762 them aarch64_add_offset.
24763 (aarch64_allocate_and_probe_stack_space): Add a temp2 parameter
24764 and update call to aarch64_sub_sp.
24765 (aarch64_add_cfa_expression): New function.
24766 (aarch64_expand_prologue): Pass extra temporary registers to the
24767 functions above. Handle the case in which we need to emit new
24768 DW_CFA_expressions for registers that were originally saved
24769 relative to the stack pointer, but now have to be expressed
24770 relative to the frame pointer.
24771 (aarch64_output_mi_thunk): Pass extra temporary registers to the
24773 (aarch64_expand_epilogue): Likewise. Prevent inheritance of
24774 IP0 and IP1 values for SVE frames.
24775 (aarch64_expand_vec_series): New function.
24776 (aarch64_expand_sve_widened_duplicate): Likewise.
24777 (aarch64_expand_sve_const_vector): Likewise.
24778 (aarch64_expand_mov_immediate): Add a gen_vec_duplicate parameter.
24779 Handle SVE constants. Use emit_move_insn to move a force_const_mem
24780 into the register, rather than emitting a SET directly.
24781 (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move)
24782 (aarch64_get_reg_raw_mode, offset_4bit_signed_scaled_p)
24783 (offset_6bit_unsigned_scaled_p, aarch64_offset_7bit_signed_scaled_p)
24784 (offset_9bit_signed_scaled_p): New functions.
24785 (aarch64_replicate_bitmask_imm): New function.
24786 (aarch64_bitmask_imm): Use it.
24787 (aarch64_cannot_force_const_mem): Reject expressions involving
24788 a CONST_POLY_INT. Update call to aarch64_classify_symbol.
24789 (aarch64_classify_index): Handle SVE indices, by requiring
24790 a plain register index with a scale that matches the element size.
24791 (aarch64_classify_address): Handle SVE addresses. Assert that
24792 the mode of the address is VOIDmode or an integer mode.
24793 Update call to aarch64_classify_symbol.
24794 (aarch64_classify_symbolic_expression): Update call to
24795 aarch64_classify_symbol.
24796 (aarch64_const_vec_all_in_range_p): New function.
24797 (aarch64_print_vector_float_operand): Likewise.
24798 (aarch64_print_operand): Handle 'N' and 'C'. Use "zN" rather than
24799 "vN" for FP registers with SVE modes. Handle (const ...) vectors
24800 and the FP immediates 1.0 and 0.5.
24801 (aarch64_print_address_internal): Handle SVE addresses.
24802 (aarch64_print_operand_address): Use ADDR_QUERY_ANY.
24803 (aarch64_regno_regclass): Handle predicate registers.
24804 (aarch64_secondary_reload): Handle big-endian reloads of SVE
24806 (aarch64_class_max_nregs): Handle SVE modes and predicate registers.
24807 (aarch64_rtx_costs): Check for ADDVL and ADDPL instructions.
24808 (aarch64_convert_sve_vector_bits): New function.
24809 (aarch64_override_options): Use it to handle -msve-vector-bits=.
24810 (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
24811 rather than an rtx.
24812 (aarch64_legitimate_constant_p): Use aarch64_classify_vector_mode.
24813 Handle SVE vector and predicate modes. Accept VL-based constants
24814 that need only one temporary register, and VL offsets that require
24815 no temporary registers.
24816 (aarch64_conditional_register_usage): Mark the predicate registers
24817 as fixed if SVE isn't available.
24818 (aarch64_vector_mode_supported_p): Use aarch64_classify_vector_mode.
24819 Return true for SVE vector and predicate modes.
24820 (aarch64_simd_container_mode): Take the number of bits as a poly_int64
24821 rather than an unsigned int. Handle SVE modes.
24822 (aarch64_preferred_simd_mode): Update call accordingly. Handle
24824 (aarch64_autovectorize_vector_sizes): Add BYTES_PER_SVE_VECTOR
24826 (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
24827 (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
24828 (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
24829 (aarch64_sve_float_mul_immediate_p): New functions.
24830 (aarch64_sve_valid_immediate): New function.
24831 (aarch64_simd_valid_immediate): Use it as the fallback for SVE vectors.
24832 Explicitly reject structure modes. Check for INDEX constants.
24833 Handle PTRUE and PFALSE constants.
24834 (aarch64_check_zero_based_sve_index_immediate): New function.
24835 (aarch64_simd_imm_zero_p): Delete.
24836 (aarch64_mov_operand_p): Use aarch64_simd_valid_immediate for
24837 vector modes. Accept constants in the range of CNT[BHWD].
24838 (aarch64_simd_scalar_immediate_valid_for_move): Explicitly
24839 ask for an Advanced SIMD mode.
24840 (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): New functions.
24841 (aarch64_simd_vector_alignment): Handle SVE predicates.
24842 (aarch64_vectorize_preferred_vector_alignment): New function.
24843 (aarch64_simd_vector_alignment_reachable): Use it instead of
24845 (aarch64_shift_truncation_mask): Use aarch64_vector_data_mode_p.
24846 (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): New
24848 (MAX_VECT_LEN): Delete.
24849 (expand_vec_perm_d): Add a vec_flags field.
24850 (emit_unspec2, aarch64_expand_sve_vec_perm): New functions.
24851 (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_zip)
24852 (aarch64_evpc_ext): Don't apply a big-endian lane correction
24854 (aarch64_evpc_rev): Rename to...
24855 (aarch64_evpc_rev_local): ...this. Use a predicated operation for SVE.
24856 (aarch64_evpc_rev_global): New function.
24857 (aarch64_evpc_dup): Enforce a 64-byte range for SVE DUP.
24858 (aarch64_evpc_tbl): Use MAX_COMPILE_TIME_VEC_BYTES instead of
24860 (aarch64_evpc_sve_tbl): New function.
24861 (aarch64_expand_vec_perm_const_1): Update after rename of
24862 aarch64_evpc_rev. Handle SVE permutes too, trying
24863 aarch64_evpc_rev_global and using aarch64_evpc_sve_tbl rather
24864 than aarch64_evpc_tbl.
24865 (aarch64_vectorize_vec_perm_const): Initialize vec_flags.
24866 (aarch64_sve_cmp_operand_p, aarch64_unspec_cond_code)
24867 (aarch64_gen_unspec_cond, aarch64_expand_sve_vec_cmp_int)
24868 (aarch64_emit_unspec_cond, aarch64_emit_unspec_cond_or)
24869 (aarch64_emit_inverted_unspec_cond, aarch64_expand_sve_vec_cmp_float)
24870 (aarch64_expand_sve_vcond): New functions.
24871 (aarch64_modes_tieable_p): Use aarch64_vector_data_mode_p instead
24872 of aarch64_vector_mode_p.
24873 (aarch64_dwarf_poly_indeterminate_value): New function.
24874 (aarch64_compute_pressure_classes): Likewise.
24875 (aarch64_can_change_mode_class): Likewise.
24876 (TARGET_GET_RAW_RESULT_MODE, TARGET_GET_RAW_ARG_MODE): Redefine.
24877 (TARGET_VECTORIZE_PREFERRED_VECTOR_ALIGNMENT): Likewise.
24878 (TARGET_VECTORIZE_GET_MASK_MODE): Likewise.
24879 (TARGET_DWARF_POLY_INDETERMINATE_VALUE): Likewise.
24880 (TARGET_COMPUTE_PRESSURE_CLASSES): Likewise.
24881 (TARGET_CAN_CHANGE_MODE_CLASS): Likewise.
24882 * config/aarch64/constraints.md (Upa, Upl, Uav, Uat, Usv, Usi, Utr)
24883 (Uty, Dm, vsa, vsc, vsd, vsi, vsn, vsl, vsm, vsA, vsM, vsN): New
24885 (Dn, Dl, Dr): Accept const as well as const_vector.
24886 (Dz): Likewise. Compare against CONST0_RTX.
24887 * config/aarch64/iterators.md: Refer to "Advanced SIMD" instead
24888 of "vector" where appropriate.
24889 (SVE_ALL, SVE_BH, SVE_BHS, SVE_BHSI, SVE_HSDI, SVE_HSF, SVE_SD)
24890 (SVE_SDI, SVE_I, SVE_F, PRED_ALL, PRED_BHS): New mode iterators.
24891 (UNSPEC_SEL, UNSPEC_ANDF, UNSPEC_IORF, UNSPEC_XORF, UNSPEC_COND_LT)
24892 (UNSPEC_COND_LE, UNSPEC_COND_EQ, UNSPEC_COND_NE, UNSPEC_COND_GE)
24893 (UNSPEC_COND_GT, UNSPEC_COND_LO, UNSPEC_COND_LS, UNSPEC_COND_HS)
24894 (UNSPEC_COND_HI, UNSPEC_COND_UO): New unspecs.
24895 (Vetype, VEL, Vel, VWIDE, Vwide, vw, vwcore, V_INT_EQUIV)
24896 (v_int_equiv): Extend to SVE modes.
24897 (Vesize, V128, v128, Vewtype, V_FP_EQUIV, v_fp_equiv, VPRED): New
24899 (LOGICAL_OR, SVE_INT_UNARY, SVE_FP_UNARY): New code iterators.
24900 (optab): Handle popcount, smin, smax, umin, umax, abs and sqrt.
24901 (logical_nn, lr, sve_int_op, sve_fp_op): New code attributs.
24902 (LOGICALF, OPTAB_PERMUTE, UNPACK, UNPACK_UNSIGNED, SVE_COND_INT_CMP)
24903 (SVE_COND_FP_CMP): New int iterators.
24904 (perm_hilo): Handle the new unpack unspecs.
24905 (optab, logicalf_op, su, perm_optab, cmp_op, imm_con): New int
24907 * config/aarch64/predicates.md (aarch64_sve_cnt_immediate)
24908 (aarch64_sve_addvl_addpl_immediate, aarch64_split_add_offset_immediate)
24909 (aarch64_pluslong_or_poly_operand, aarch64_nonmemory_operand)
24910 (aarch64_equality_operator, aarch64_constant_vector_operand)
24911 (aarch64_sve_ld1r_operand, aarch64_sve_ldr_operand): New predicates.
24912 (aarch64_sve_nonimmediate_operand): Likewise.
24913 (aarch64_sve_general_operand): Likewise.
24914 (aarch64_sve_dup_operand, aarch64_sve_arith_immediate): Likewise.
24915 (aarch64_sve_sub_arith_immediate, aarch64_sve_inc_dec_immediate)
24916 (aarch64_sve_logical_immediate, aarch64_sve_mul_immediate): Likewise.
24917 (aarch64_sve_dup_immediate, aarch64_sve_cmp_vsc_immediate): Likewise.
24918 (aarch64_sve_cmp_vsd_immediate, aarch64_sve_index_immediate): Likewise.
24919 (aarch64_sve_float_arith_immediate): Likewise.
24920 (aarch64_sve_float_arith_with_sub_immediate): Likewise.
24921 (aarch64_sve_float_mul_immediate, aarch64_sve_arith_operand): Likewise.
24922 (aarch64_sve_add_operand, aarch64_sve_logical_operand): Likewise.
24923 (aarch64_sve_lshift_operand, aarch64_sve_rshift_operand): Likewise.
24924 (aarch64_sve_mul_operand, aarch64_sve_cmp_vsc_operand): Likewise.
24925 (aarch64_sve_cmp_vsd_operand, aarch64_sve_index_operand): Likewise.
24926 (aarch64_sve_float_arith_operand): Likewise.
24927 (aarch64_sve_float_arith_with_sub_operand): Likewise.
24928 (aarch64_sve_float_mul_operand): Likewise.
24929 (aarch64_sve_vec_perm_operand): Likewise.
24930 (aarch64_pluslong_operand): Include aarch64_sve_addvl_addpl_immediate.
24931 (aarch64_mov_operand): Accept const_poly_int and const_vector.
24932 (aarch64_simd_lshift_imm, aarch64_simd_rshift_imm): Accept const
24933 as well as const_vector.
24934 (aarch64_simd_imm_zero, aarch64_simd_imm_minus_one): Move earlier
24935 in file. Use CONST0_RTX and CONSTM1_RTX.
24936 (aarch64_simd_or_scalar_imm_zero): Likewise. Add match_codes.
24937 (aarch64_simd_reg_or_zero): Accept const as well as const_vector.
24938 Use aarch64_simd_imm_zero.
24939 * config/aarch64/aarch64-sve.md: New file.
24940 * config/aarch64/aarch64.md: Include it.
24941 (VG_REGNUM, P0_REGNUM, P7_REGNUM, P15_REGNUM): New register numbers.
24942 (UNSPEC_REV, UNSPEC_LD1_SVE, UNSPEC_ST1_SVE, UNSPEC_MERGE_PTRUE)
24943 (UNSPEC_PTEST_PTRUE, UNSPEC_UNPACKSHI, UNSPEC_UNPACKUHI)
24944 (UNSPEC_UNPACKSLO, UNSPEC_UNPACKULO, UNSPEC_PACK)
24945 (UNSPEC_FLOAT_CONVERT, UNSPEC_WHILE_LO): New unspec constants.
24946 (sve): New attribute.
24947 (enabled): Disable instructions with the sve attribute unless
24949 (movqi, movhi): Pass CONST_POLY_INT operaneds through
24950 aarch64_expand_mov_immediate.
24951 (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64): Handle
24952 CNT[BHSD] immediates.
24953 (movti): Split CONST_POLY_INT moves into two halves.
24954 (add<mode>3): Accept aarch64_pluslong_or_poly_operand.
24955 Split additions that need a temporary here if the destination
24956 is the stack pointer.
24957 (*add<mode>3_aarch64): Handle ADDVL and ADDPL immediates.
24958 (*add<mode>3_poly_1): New instruction.
24959 (set_clobber_cc): New expander.
24961 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
24963 * simplify-rtx.c (simplify_immed_subreg): Add an inner_bytes
24964 parameter and use it instead of GET_MODE_SIZE (innermode). Use
24965 inner_bytes * BITS_PER_UNIT instead of GET_MODE_BITSIZE (innermode).
24966 Use CEIL (inner_bytes, GET_MODE_UNIT_SIZE (innermode)) instead of
24967 GET_MODE_NUNITS (innermode). Also add a first_elem parameter.
24968 Change innermode from fixed_mode_size to machine_mode.
24969 (simplify_subreg): Update call accordingly. Handle a constant-sized
24970 subreg of a variable-length CONST_VECTOR.
24972 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
24973 Alan Hayward <alan.hayward@arm.com>
24974 David Sherwood <david.sherwood@arm.com>
24976 * tree-ssa-address.c (mem_ref_valid_without_offset_p): New function.
24977 (add_offset_to_base): New function, split out from...
24978 (create_mem_ref): ...here. When handling a scale other than 1,
24979 check first whether the address is valid without the offset.
24980 Add it into the base if so, leaving the index and scale as-is.
24982 2018-01-12 Jakub Jelinek <jakub@redhat.com>
24985 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Call
24986 fold_for_warn before checking if arg2 is INTEGER_CST.
24988 2018-01-12 Segher Boessenkool <segher@kernel.crashing.org>
24990 * config/rs6000/predicates.md (load_multiple_operation): Delete.
24991 (store_multiple_operation): Delete.
24992 * config/rs6000/rs6000-cpus.def (601): Remove MASK_STRING.
24993 * config/rs6000/rs6000-protos.h (rs6000_output_load_multiple): Delete.
24994 * config/rs6000/rs6000-string.c (expand_block_move): Delete everything
24995 guarded by TARGET_STRING.
24996 (rs6000_output_load_multiple): Delete.
24997 * config/rs6000/rs6000.c (rs6000_option_override_internal): Delete
24998 OPTION_MASK_STRING / TARGET_STRING handling.
24999 (print_operand) <'N', 'O'>: Add comment that these are unused now.
25000 (const rs6000_opt_masks) <"string">: Change mask to 0.
25001 * config/rs6000/rs6000.h (TARGET_DEFAULT): Remove MASK_STRING.
25002 (MASK_STRING): Delete.
25003 * config/rs6000/rs6000.md (*mov<mode>_string): Delete TARGET_STRING
25005 (load_multiple): Delete.
25012 (store_multiple): Delete.
25019 (movmemsi_8reg): Delete.
25020 (corresponding unnamed define_insn): Delete.
25021 (movmemsi_6reg): Delete.
25022 (corresponding unnamed define_insn): Delete.
25023 (movmemsi_4reg): Delete.
25024 (corresponding unnamed define_insn): Delete.
25025 (movmemsi_2reg): Delete.
25026 (corresponding unnamed define_insn): Delete.
25027 (movmemsi_1reg): Delete.
25028 (corresponding unnamed define_insn): Delete.
25029 * config/rs6000/rs6000.opt (mno-string): New.
25030 (mstring): Replace by deprecation warning stub.
25031 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mstring.
25033 2018-01-12 Jakub Jelinek <jakub@redhat.com>
25035 * regrename.c (regrename_do_replace): If replacing the same
25036 reg multiple times, try to reuse last created gen_raw_REG.
25039 * bb-reorder.c (pass_partition_blocks::gate): In lto don't partition
25040 main to workaround a bug in GDB.
25042 2018-01-12 Tom de Vries <tom@codesourcery.com>
25045 * config.gcc (nvptx*-*-*): Set use_gcc_stdint=wrap.
25047 2018-01-12 Vladimir Makarov <vmakarov@redhat.com>
25049 PR rtl-optimization/80481
25050 * ira-color.c (get_cap_member): New function.
25051 (allocnos_conflict_by_live_ranges_p): Use it.
25052 (slot_coalesced_allocno_live_ranges_intersect_p): Add assert.
25053 (setup_slot_coalesced_allocno_live_ranges): Ditto.
25055 2018-01-12 Uros Bizjak <ubizjak@gmail.com>
25058 * config/alpha/alpha.md (*saddsi_1): New insn_ans_split pattern.
25059 (*saddl_se_1): Ditto.
25060 (*ssubsi_1): Ditto.
25061 (*ssubl_se_1): Ditto.
25063 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
25065 * tree-predcom.c (aff_combination_dr_offset): Use wi::to_poly_widest
25066 rather than wi::to_widest for DR_INITs.
25067 * tree-vect-data-refs.c (vect_find_same_alignment_drs): Use
25068 wi::to_poly_offset rather than wi::to_offset for DR_INIT.
25069 (vect_analyze_data_ref_accesses): Require both DR_INITs to be
25071 (vect_analyze_group_access_1): Note that here.
25073 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
25075 * tree-vectorizer.c (get_vec_alignment_for_array_type): Handle
25076 polynomial type sizes.
25078 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
25080 * gimplify.c (gimple_add_tmp_var_fn): Allow variables to have a
25081 poly_uint64 size, rather than requiring an unsigned HOST_WIDE_INT size.
25082 (gimple_add_tmp_var): Likewise.
25084 2018-01-12 Martin Liska <mliska@suse.cz>
25086 * gimple.c (gimple_alloc_counts): Use uint64_t instead of int.
25087 (gimple_alloc_sizes): Likewise.
25088 (dump_gimple_statistics): Use PRIu64 in printf format.
25089 * gimple.h: Change uint64_t to int.
25091 2018-01-12 Martin Liska <mliska@suse.cz>
25093 * tree-core.h: Use uint64_t instead of int.
25094 * tree.c (tree_node_counts): Likewise.
25095 (tree_node_sizes): Likewise.
25096 (dump_tree_statistics): Use PRIu64 in printf format.
25098 2018-01-12 Martin Liska <mliska@suse.cz>
25100 * Makefile.in: As qsort_chk is implemented in vec.c, add
25101 vec.o to linkage of gencfn-macros.
25102 * tree.c (build_new_poly_int_cst): Add CXX_MEM_STAT_INFO as it's
25103 passing the info to record_node_allocation_statistics.
25104 (test_vector_cst_patterns): Add CXX_MEM_STAT_INFO to declaration
25106 * ggc-common.c (struct ggc_usage): Add operator== and use
25107 it in operator< and compare function.
25108 * mem-stats.h (struct mem_usage): Likewise.
25109 * vec.c (struct vec_usage): Remove operator< and compare
25110 function. Can be simply inherited.
25112 2018-01-12 Martin Jambor <mjambor@suse.cz>
25115 * params.def: New parameter PARAM_AVOID_FMA_MAX_BITS.
25116 * tree-ssa-math-opts.c: Include domwalk.h.
25117 (convert_mult_to_fma_1): New function.
25118 (fma_transformation_info): New type.
25119 (fma_deferring_state): Likewise.
25120 (cancel_fma_deferring): New function.
25121 (result_of_phi): Likewise.
25122 (last_fma_candidate_feeds_initial_phi): Likewise.
25123 (convert_mult_to_fma): Added deferring logic, split actual
25124 transformation to convert_mult_to_fma_1.
25125 (math_opts_dom_walker): New type.
25126 (math_opts_dom_walker::after_dom_children): New method, body moved
25127 here from pass_optimize_widening_mul::execute, added deferring logic
25129 (pass_optimize_widening_mul::execute): Moved most of code to
25130 math_opts_dom_walker::after_dom_children.
25131 * config/i386/x86-tune.def (X86_TUNE_AVOID_128FMA_CHAINS): New.
25132 * config/i386/i386.c (ix86_option_override_internal): Added
25133 maybe_setting of PARAM_AVOID_FMA_MAX_BITS.
25135 2018-01-12 Richard Biener <rguenther@suse.de>
25138 * dwarf2out.c (gen_variable_die): Do not reset old_die for
25139 inline instance vars.
25141 2018-01-12 Oleg Endo <olegendo@gcc.gnu.org>
25144 * config/rx/rx.c (rx_is_restricted_memory_address):
25145 Handle SUBREG case.
25147 2018-01-12 Richard Biener <rguenther@suse.de>
25149 PR tree-optimization/80846
25150 * target.def (split_reduction): New target hook.
25151 * targhooks.c (default_split_reduction): New function.
25152 * targhooks.h (default_split_reduction): Declare.
25153 * tree-vect-loop.c (vect_create_epilog_for_reduction): If the
25154 target requests first reduce vectors by combining low and high
25156 * tree-vect-stmts.c (vect_gen_perm_mask_any): Adjust.
25157 (get_vectype_for_scalar_type_and_size): Export.
25158 * tree-vectorizer.h (get_vectype_for_scalar_type_and_size): Declare.
25159 * doc/tm.texi.in (TARGET_VECTORIZE_SPLIT_REDUCTION): Document.
25160 * doc/tm.texi: Regenerate.
25161 * config/i386/i386.c (ix86_split_reduction): Implement
25162 TARGET_VECTORIZE_SPLIT_REDUCTION.
25164 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
25167 * config/sparc/sparc.h (PIC_OFFSET_TABLE_REGNUM): Set to INVALID_REGNUM
25168 in PIC mode except for TARGET_VXWORKS_RTP.
25169 * config/sparc/sparc.c: Include cfgrtl.h.
25170 (TARGET_INIT_PIC_REG): Define.
25171 (TARGET_USE_PSEUDO_PIC_REG): Likewise.
25172 (sparc_pic_register_p): New predicate.
25173 (sparc_legitimate_address_p): Use it.
25174 (sparc_legitimize_pic_address): Likewise.
25175 (sparc_delegitimize_address): Likewise.
25176 (sparc_mode_dependent_address_p): Likewise.
25177 (gen_load_pcrel_sym): Remove 4th parameter.
25178 (load_got_register): Adjust call to above. Remove obsolete stuff.
25179 (sparc_expand_prologue): Do not call load_got_register here.
25180 (sparc_flat_expand_prologue): Likewise.
25181 (sparc_output_mi_thunk): Set the pic_offset_table_rtx object.
25182 (sparc_use_pseudo_pic_reg): New function.
25183 (sparc_init_pic_reg): Likewise.
25184 * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
25185 (builtin_setjmp_receiver): Enable only for TARGET_VXWORKS_RTP.
25187 2018-01-12 Christophe Lyon <christophe.lyon@linaro.org>
25189 * doc/sourcebuild.texi (Effective-Target Keywords, Other attributes):
25190 Add item for branch_cost.
25192 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
25194 PR rtl-optimization/83565
25195 * rtlanal.c (nonzero_bits1): On WORD_REGISTER_OPERATIONS machines, do
25196 not extend the result to a larger mode for rotate operations.
25197 (num_sign_bit_copies1): Likewise.
25199 2018-01-12 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
25202 * config/sol2.h (STARTFILE_ARCH_SPEC): Don't use with -shared or
25204 Use values-Xc.o for -pedantic.
25205 Link with values-xpg4.o for C90, values-xpg6.o otherwise.
25207 2018-01-12 Martin Liska <mliska@suse.cz>
25210 * ipa-devirt.c (final_warning_record::grow_type_warnings):
25212 (possible_polymorphic_call_targets): Use it.
25213 (ipa_devirt): Likewise.
25215 2018-01-12 Martin Liska <mliska@suse.cz>
25217 * profile-count.h (enum profile_quality): Use 0 as invalid
25218 enum value of profile_quality.
25220 2018-01-12 Chung-Ju Wu <jasonwucj@gmail.com>
25222 * doc/invoke.texi (NDS32 Options): Add -mext-perf, -mext-perf2 and
25223 -mext-string options.
25225 2018-01-12 Richard Biener <rguenther@suse.de>
25227 * lto-streamer-out.c (DFS::DFS_write_tree_body): Process
25228 DECL_DEBUG_EXPR conditional on DECL_HAS_DEBUG_EXPR_P.
25229 * tree-streamer-in.c (lto_input_ts_decl_common_tree_pointers):
25231 * tree-streamer-out.c (write_ts_decl_common_tree_pointers): Likewise.
25233 2018-01-11 Michael Meissner <meissner@linux.vnet.ibm.com>
25235 * configure.ac (--with-long-double-format): Add support for the
25236 configuration option to change the default long double format on
25238 * config.gcc (powerpc*-linux*-*): Likewise.
25239 * configure: Regenerate.
25240 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): If long
25241 double is IEEE, define __KC__ and __KF__ to allow floatn.h to be
25242 used without modification.
25244 2018-01-11 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
25246 * config/rs6000/rs6000-builtin.def (BU_P7_MISC_X): New #define.
25247 (SPEC_BARRIER): New instantiation of BU_P7_MISC_X.
25248 * config/rs6000/rs6000.c (rs6000_expand_builtin): Handle
25249 MISC_BUILTIN_SPEC_BARRIER.
25250 (rs6000_init_builtins): Likewise.
25251 * config/rs6000/rs6000.md (UNSPECV_SPEC_BARRIER): New UNSPECV
25253 (speculation_barrier): New define_insn.
25254 * doc/extend.texi: Document __builtin_speculation_barrier.
25256 2018-01-11 Jakub Jelinek <jakub@redhat.com>
25259 * config/i386/i386.c (ix86_expand_vector_init_one_nonzero): If one_var
25260 is 0, for V{8,16}S[IF] and V[48]D[IF]mode use gen_vec_set<mode>_0.
25261 * config/i386/sse.md (VI8_AVX_AVX512F, VI4F_256_512): New mode
25263 (ssescalarmodesuffix): Add 512-bit vectors. Use "d" or "q" for
25264 integral modes instead of "ss" and "sd".
25265 (vec_set<mode>_0): New define_insns for 256-bit and 512-bit
25266 vectors with 32-bit and 64-bit elements.
25267 (vecdupssescalarmodesuffix): New mode attribute.
25268 (vec_dup<mode>): Use it.
25270 2018-01-11 H.J. Lu <hongjiu.lu@intel.com>
25273 * config/i386/i386.c (ix86_compute_frame_layout): Align stack
25274 frame if argument is passed on stack.
25276 2018-01-11 Jakub Jelinek <jakub@redhat.com>
25279 * ree.c (combine_reaching_defs): Optimize also
25280 reg2=exp; reg1=reg2; reg2=any_extend(reg1); into
25281 reg2=any_extend(exp); reg1=reg2;, formatting fix.
25283 2018-01-11 Jan Hubicka <hubicka@ucw.cz>
25285 PR middle-end/83189
25286 * gimple-ssa-isolate-paths.c (isolate_path): Fix profile update.
25288 2018-01-11 Jan Hubicka <hubicka@ucw.cz>
25290 PR middle-end/83718
25291 * tree-inline.c (copy_cfg_body): Adjust num&den for scaling
25292 after they are computed.
25294 2018-01-11 Bin Cheng <bin.cheng@arm.com>
25296 PR tree-optimization/83695
25297 * gimple-loop-linterchange.cc
25298 (tree_loop_interchange::interchange_loops): Call scev_reset_htab to
25299 reset cached scev information after interchange.
25300 (pass_linterchange::execute): Remove call to scev_reset_htab.
25302 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
25304 * config/arm/arm_neon.h (vfmlal_lane_low_u32, vfmlal_lane_high_u32,
25305 vfmlalq_laneq_low_u32, vfmlalq_lane_low_u32, vfmlal_laneq_low_u32,
25306 vfmlalq_laneq_high_u32, vfmlalq_lane_high_u32, vfmlal_laneq_high_u32,
25307 vfmlsl_lane_low_u32, vfmlsl_lane_high_u32, vfmlslq_laneq_low_u32,
25308 vfmlslq_lane_low_u32, vfmlsl_laneq_low_u32, vfmlslq_laneq_high_u32,
25309 vfmlslq_lane_high_u32, vfmlsl_laneq_high_u32): Define.
25310 * config/arm/arm_neon_builtins.def (vfmal_lane_low,
25311 vfmal_lane_lowv4hf, vfmal_lane_lowv8hf, vfmal_lane_high,
25312 vfmal_lane_highv4hf, vfmal_lane_highv8hf, vfmsl_lane_low,
25313 vfmsl_lane_lowv4hf, vfmsl_lane_lowv8hf, vfmsl_lane_high,
25314 vfmsl_lane_highv4hf, vfmsl_lane_highv8hf): New sets of builtins.
25315 * config/arm/iterators.md (VFMLSEL2, vfmlsel2): New mode attributes.
25316 (V_lane_reg): Likewise.
25317 * config/arm/neon.md (neon_vfm<vfml_op>l_lane_<vfml_half><VCVTF:mode>):
25319 (neon_vfm<vfml_op>l_lane_<vfml_half><vfmlsel2><mode>): Likewise.
25320 (vfmal_lane_low<mode>_intrinsic,
25321 vfmal_lane_low<vfmlsel2><mode>_intrinsic,
25322 vfmal_lane_high<vfmlsel2><mode>_intrinsic,
25323 vfmal_lane_high<mode>_intrinsic, vfmsl_lane_low<mode>_intrinsic,
25324 vfmsl_lane_low<vfmlsel2><mode>_intrinsic,
25325 vfmsl_lane_high<vfmlsel2><mode>_intrinsic,
25326 vfmsl_lane_high<mode>_intrinsic): New define_insns.
25328 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
25330 * config/arm/arm-cpus.in (fp16fml): New feature.
25331 (ALL_SIMD): Add fp16fml.
25332 (armv8.2-a): Add fp16fml as an option.
25333 (armv8.3-a): Likewise.
25334 (armv8.4-a): Add fp16fml as part of fp16.
25335 * config/arm/arm.h (TARGET_FP16FML): Define.
25336 * config/arm/arm-c.c (arm_cpu_builtins): Define __ARM_FEATURE_FP16_FML
25338 * config/arm/arm-modes.def (V2HF): Define.
25339 * config/arm/arm_neon.h (vfmlal_low_u32, vfmlsl_low_u32,
25340 vfmlal_high_u32, vfmlsl_high_u32, vfmlalq_low_u32,
25341 vfmlslq_low_u32, vfmlalq_high_u32, vfmlslq_high_u32): Define.
25342 * config/arm/arm_neon_builtins.def (vfmal_low, vfmal_high,
25343 vfmsl_low, vfmsl_high): New set of builtins.
25344 * config/arm/iterators.md (PLUSMINUS): New code iterator.
25345 (vfml_op): New code attribute.
25346 (VFMLHALVES): New int iterator.
25347 (VFML, VFMLSEL): New mode attributes.
25348 (V_reg): Define mapping for V2HF.
25349 (V_hi, V_lo): New mode attributes.
25350 (VF_constraint): Likewise.
25351 (vfml_half, vfml_half_selector): New int attributes.
25352 * config/arm/neon.md (neon_vfm<vfml_op>l_<vfml_half><mode>): New
25354 (vfmal_low<mode>_intrinsic, vfmsl_high<mode>_intrinsic,
25355 vfmal_high<mode>_intrinsic, vfmsl_low<mode>_intrinsic):
25357 * config/arm/t-arm-elf (v8_fps): Add fp16fml.
25358 * config/arm/t-multilib (v8_2_a_simd_variants): Add fp16fml.
25359 * config/arm/unspecs.md (UNSPEC_VFML_LO, UNSPEC_VFML_HI): New unspecs.
25360 * doc/invoke.texi (ARM Options): Document fp16fml. Update armv8.4-a
25362 * doc/sourcebuild.texi (arm_fp16fml_neon_ok, arm_fp16fml_neon):
25363 Document new effective target and option set.
25365 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
25367 * config/arm/arm-cpus.in (armv8_4): New feature.
25368 (ARMv8_4a): New fgroup.
25369 (armv8.4-a): New arch.
25370 * config/arm/arm-tables.opt: Regenerate.
25371 * config/arm/t-aprofile: Add matching rules for -march=armv8.4-a.
25372 * config/arm/t-arm-elf (all_v8_archs): Add armv8.4-a.
25373 * config/arm/t-multilib (v8_4_a_simd_variants): New variable.
25374 Add matching rules for -march=armv8.4-a and extensions.
25375 * doc/invoke.texi (ARM Options): Document -march=armv8.4-a.
25377 2018-01-11 Oleg Endo <olegendo@gcc.gnu.org>
25380 * config/rx/rx.md (BW): New mode attribute.
25381 (sync_lock_test_and_setsi): Add mode suffix to insn output.
25383 2018-01-11 Richard Biener <rguenther@suse.de>
25385 PR tree-optimization/83435
25386 * graphite.c (canonicalize_loop_form): Ignore fake loop exit edges.
25387 * graphite-scop-detection.c (scop_detection::get_sese): Likewise.
25388 * tree-vrp.c (add_assert_info): Drop TREE_OVERFLOW if they appear.
25390 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
25391 Alan Hayward <alan.hayward@arm.com>
25392 David Sherwood <david.sherwood@arm.com>
25394 * config/aarch64/aarch64.c (aarch64_address_info): Add a const_offset
25396 (aarch64_classify_address): Initialize it. Track polynomial offsets.
25397 (aarch64_print_address_internal): Use it to check for a zero offset.
25399 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
25400 Alan Hayward <alan.hayward@arm.com>
25401 David Sherwood <david.sherwood@arm.com>
25403 * config/aarch64/aarch64-modes.def (NUM_POLY_INT_COEFFS): Set to 2.
25404 * config/aarch64/aarch64-protos.h (aarch64_initial_elimination_offset):
25405 Return a poly_int64 rather than a HOST_WIDE_INT.
25406 (aarch64_offset_7bit_signed_scaled_p): Take the offset as a poly_int64
25407 rather than a HOST_WIDE_INT.
25408 * config/aarch64/aarch64.h (aarch64_frame): Protect with
25409 HAVE_POLY_INT_H rather than HOST_WIDE_INT. Change locals_offset,
25410 hard_fp_offset, frame_size, initial_adjust, callee_offset and
25411 final_offset from HOST_WIDE_INT to poly_int64.
25412 * config/aarch64/aarch64-builtins.c (aarch64_simd_expand_args): Use
25413 to_constant when getting the number of units in an Advanced SIMD
25415 (aarch64_builtin_vectorized_function): Check for a constant number
25417 * config/aarch64/aarch64-simd.md (mov<mode>): Handle polynomial
25419 (aarch64_ld<VSTRUCT:nregs>_lane<VALLDIF:mode>): Use the nunits
25420 attribute instead of GET_MODE_NUNITS.
25421 * config/aarch64/aarch64.c (aarch64_hard_regno_nregs)
25422 (aarch64_class_max_nregs): Use the constant_lowest_bound of the
25423 GET_MODE_SIZE for fixed-size registers.
25424 (aarch64_const_vec_all_same_in_range_p): Use const_vec_duplicate_p.
25425 (aarch64_hard_regno_call_part_clobbered, aarch64_classify_index)
25426 (aarch64_mode_valid_for_sched_fusion_p, aarch64_classify_address)
25427 (aarch64_legitimize_address_displacement, aarch64_secondary_reload)
25428 (aarch64_print_operand, aarch64_print_address_internal)
25429 (aarch64_address_cost, aarch64_rtx_costs, aarch64_register_move_cost)
25430 (aarch64_short_vector_p, aapcs_vfp_sub_candidate)
25431 (aarch64_simd_attr_length_rglist, aarch64_operands_ok_for_ldpstp):
25432 Handle polynomial GET_MODE_SIZE.
25433 (aarch64_hard_regno_caller_save_mode): Likewise. Return modes
25434 wider than SImode without modification.
25435 (tls_symbolic_operand_type): Use strip_offset instead of split_const.
25436 (aarch64_pass_by_reference, aarch64_layout_arg, aarch64_pad_reg_upward)
25437 (aarch64_gimplify_va_arg_expr): Assert that we don't yet handle
25438 passing and returning SVE modes.
25439 (aarch64_function_value, aarch64_layout_arg): Use gen_int_mode
25440 rather than GEN_INT.
25441 (aarch64_emit_probe_stack_range): Take the size as a poly_int64
25442 rather than a HOST_WIDE_INT, but call sorry if it isn't constant.
25443 (aarch64_allocate_and_probe_stack_space): Likewise.
25444 (aarch64_layout_frame): Cope with polynomial offsets.
25445 (aarch64_save_callee_saves, aarch64_restore_callee_saves): Take the
25446 start_offset as a poly_int64 rather than a HOST_WIDE_INT. Track
25447 polynomial offsets.
25448 (offset_9bit_signed_unscaled_p, offset_12bit_unsigned_scaled_p)
25449 (aarch64_offset_7bit_signed_scaled_p): Take the offset as a
25450 poly_int64 rather than a HOST_WIDE_INT.
25451 (aarch64_get_separate_components, aarch64_process_components)
25452 (aarch64_expand_prologue, aarch64_expand_epilogue)
25453 (aarch64_use_return_insn_p): Handle polynomial frame offsets.
25454 (aarch64_anchor_offset): New function, split out from...
25455 (aarch64_legitimize_address): ...here.
25456 (aarch64_builtin_vectorization_cost): Handle polynomial
25457 TYPE_VECTOR_SUBPARTS.
25458 (aarch64_simd_check_vect_par_cnst_half): Handle polynomial
25460 (aarch64_simd_make_constant, aarch64_expand_vector_init): Get the
25461 number of elements from the PARALLEL rather than the mode.
25462 (aarch64_shift_truncation_mask): Use GET_MODE_UNIT_BITSIZE
25463 rather than GET_MODE_BITSIZE.
25464 (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_ext)
25465 (aarch64_evpc_rev, aarch64_evpc_dup, aarch64_evpc_zip)
25466 (aarch64_expand_vec_perm_const_1): Handle polynomial
25467 d->perm.length () and d->perm elements.
25468 (aarch64_evpc_tbl): Likewise. Use nelt rather than GET_MODE_NUNITS.
25469 Apply to_constant to d->perm elements.
25470 (aarch64_simd_valid_immediate, aarch64_vec_fpconst_pow_of_2): Handle
25471 polynomial CONST_VECTOR_NUNITS.
25472 (aarch64_move_pointer): Take amount as a poly_int64 rather
25474 (aarch64_progress_pointer): Avoid temporary variable.
25475 * config/aarch64/aarch64.md (aarch64_<crc_variant>): Use
25476 the mode attribute instead of GET_MODE.
25478 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
25479 Alan Hayward <alan.hayward@arm.com>
25480 David Sherwood <david.sherwood@arm.com>
25482 * config/aarch64/aarch64.c (aarch64_force_temporary): Assert that
25483 x exists before using it.
25484 (aarch64_add_constant_internal): Rename to...
25485 (aarch64_add_offset_1): ...this. Replace regnum with separate
25486 src and dest rtxes. Handle the case in which they're different,
25487 including when the offset is zero. Replace scratchreg with an rtx.
25488 Use 2 additions if there is no spare register into which we can
25489 move a 16-bit constant.
25490 (aarch64_add_constant): Delete.
25491 (aarch64_add_offset): Replace reg with separate src and dest
25492 rtxes. Take a poly_int64 offset instead of a HOST_WIDE_INT.
25493 Use aarch64_add_offset_1.
25494 (aarch64_add_sp, aarch64_sub_sp): Take the scratch register as
25495 an rtx rather than an int. Take the delta as a poly_int64
25496 rather than a HOST_WIDE_INT. Use aarch64_add_offset.
25497 (aarch64_expand_mov_immediate): Update uses of aarch64_add_offset.
25498 (aarch64_expand_prologue): Update calls to aarch64_sub_sp,
25499 aarch64_allocate_and_probe_stack_space and aarch64_add_offset.
25500 (aarch64_expand_epilogue): Update calls to aarch64_add_offset
25501 and aarch64_add_sp.
25502 (aarch64_output_mi_thunk): Use aarch64_add_offset rather than
25503 aarch64_add_constant.
25505 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
25507 * config/aarch64/aarch64.c (aarch64_reinterpret_float_as_int):
25508 Use scalar_float_mode.
25510 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
25512 * config/aarch64/aarch64-simd.md
25513 (aarch64_fml<f16mac1>l<f16quad>_low<mode>): Avoid GET_MODE_NUNITS.
25514 (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Likewise.
25515 (aarch64_fml<f16mac1>l_lane_lowv2sf): Likewise.
25516 (aarch64_fml<f16mac1>l_lane_highv2sf): Likewise.
25517 (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Likewise.
25518 (aarch64_fml<f16mac1>lq_laneq_highv4sf): Likewise.
25519 (aarch64_fml<f16mac1>l_laneq_lowv2sf): Likewise.
25520 (aarch64_fml<f16mac1>l_laneq_highv2sf): Likewise.
25521 (aarch64_fml<f16mac1>lq_lane_lowv4sf): Likewise.
25522 (aarch64_fml<f16mac1>lq_lane_highv4sf): Likewise.
25524 2018-01-11 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
25527 * config/arm/arm.c (arm_declare_function_name): Set arch_to_print if
25528 targ_options->x_arm_arch_string is non NULL.
25530 2018-01-11 Tamar Christina <tamar.christina@arm.com>
25532 * config/aarch64/aarch64.h
25533 (AARCH64_FL_FOR_ARCH8_4): Add AARCH64_FL_DOTPROD.
25535 2018-01-11 Sudakshina Das <sudi.das@arm.com>
25538 * expmed.c (emit_store_flag_force): Swap if const op0
25539 and change VOIDmode to mode of op0.
25541 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
25543 PR rtl-optimization/83761
25544 * caller-save.c (replace_reg_with_saved_mem): Pass bits rather
25545 than bytes to mode_for_size.
25547 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
25549 PR middle-end/83189
25550 * gfortran.fortran-torture/compile/pr83189.f90: New testcase.
25551 * tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): Handle zero
25554 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
25556 PR middle-end/83575
25557 * cfgrtl.c (rtl_verify_edges): Only verify fixability of partition
25558 when in layout mode.
25559 (cfg_layout_finalize): Do not verify cfg before we are out of layout.
25560 * cfgcleanup.c (try_optimize_cfg): Only verify flow info when doing
25563 2018-01-10 Michael Collison <michael.collison@arm.com>
25565 * config/aarch64/aarch64-modes.def (V2HF): New VECTOR_MODE.
25566 * config/aarch64/aarch64-option-extension.def: Add
25567 AARCH64_OPT_EXTENSION of 'fp16fml'.
25568 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
25569 (__ARM_FEATURE_FP16_FML): Define if TARGET_F16FML is true.
25570 * config/aarch64/predicates.md (aarch64_lane_imm3): New predicate.
25571 * config/aarch64/constraints.md (Ui7): New constraint.
25572 * config/aarch64/iterators.md (VFMLA_W): New mode iterator.
25573 (VFMLA_SEL_W): Ditto.
25576 (VFMLA16_LOW): New int iterator.
25577 (VFMLA16_HIGH): Ditto.
25578 (UNSPEC_FMLAL): New unspec.
25579 (UNSPEC_FMLSL): Ditto.
25580 (UNSPEC_FMLAL2): Ditto.
25581 (UNSPEC_FMLSL2): Ditto.
25582 (f16mac): New code attribute.
25583 * config/aarch64/aarch64-simd-builtins.def
25584 (aarch64_fmlal_lowv2sf): Ditto.
25585 (aarch64_fmlsl_lowv2sf): Ditto.
25586 (aarch64_fmlalq_lowv4sf): Ditto.
25587 (aarch64_fmlslq_lowv4sf): Ditto.
25588 (aarch64_fmlal_highv2sf): Ditto.
25589 (aarch64_fmlsl_highv2sf): Ditto.
25590 (aarch64_fmlalq_highv4sf): Ditto.
25591 (aarch64_fmlslq_highv4sf): Ditto.
25592 (aarch64_fmlal_lane_lowv2sf): Ditto.
25593 (aarch64_fmlsl_lane_lowv2sf): Ditto.
25594 (aarch64_fmlal_laneq_lowv2sf): Ditto.
25595 (aarch64_fmlsl_laneq_lowv2sf): Ditto.
25596 (aarch64_fmlalq_lane_lowv4sf): Ditto.
25597 (aarch64_fmlsl_lane_lowv4sf): Ditto.
25598 (aarch64_fmlalq_laneq_lowv4sf): Ditto.
25599 (aarch64_fmlsl_laneq_lowv4sf): Ditto.
25600 (aarch64_fmlal_lane_highv2sf): Ditto.
25601 (aarch64_fmlsl_lane_highv2sf): Ditto.
25602 (aarch64_fmlal_laneq_highv2sf): Ditto.
25603 (aarch64_fmlsl_laneq_highv2sf): Ditto.
25604 (aarch64_fmlalq_lane_highv4sf): Ditto.
25605 (aarch64_fmlsl_lane_highv4sf): Ditto.
25606 (aarch64_fmlalq_laneq_highv4sf): Ditto.
25607 (aarch64_fmlsl_laneq_highv4sf): Ditto.
25608 * config/aarch64/aarch64-simd.md:
25609 (aarch64_fml<f16mac1>l<f16quad>_low<mode>): New pattern.
25610 (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
25611 (aarch64_simd_fml<f16mac1>l<f16quad>_low<mode>): Ditto.
25612 (aarch64_simd_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
25613 (aarch64_fml<f16mac1>l_lane_lowv2sf): Ditto.
25614 (aarch64_fml<f16mac1>l_lane_highv2sf): Ditto.
25615 (aarch64_simd_fml<f16mac>l_lane_lowv2sf): Ditto.
25616 (aarch64_simd_fml<f16mac>l_lane_highv2sf): Ditto.
25617 (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Ditto.
25618 (aarch64_fml<f16mac1>lq_laneq_highv4sf): Ditto.
25619 (aarch64_simd_fml<f16mac>lq_laneq_lowv4sf): Ditto.
25620 (aarch64_simd_fml<f16mac>lq_laneq_highv4sf): Ditto.
25621 (aarch64_fml<f16mac1>l_laneq_lowv2sf): Ditto.
25622 (aarch64_fml<f16mac1>l_laneq_highv2sf): Ditto.
25623 (aarch64_simd_fml<f16mac>l_laneq_lowv2sf): Ditto.
25624 (aarch64_simd_fml<f16mac>l_laneq_highv2sf): Ditto.
25625 (aarch64_fml<f16mac1>lq_lane_lowv4sf): Ditto.
25626 (aarch64_fml<f16mac1>lq_lane_highv4sf): Ditto.
25627 (aarch64_simd_fml<f16mac>lq_lane_lowv4sf): Ditto.
25628 (aarch64_simd_fml<f16mac>lq_lane_highv4sf): Ditto.
25629 * config/aarch64/arm_neon.h (vfmlal_low_u32): New intrinsic.
25630 (vfmlsl_low_u32): Ditto.
25631 (vfmlalq_low_u32): Ditto.
25632 (vfmlslq_low_u32): Ditto.
25633 (vfmlal_high_u32): Ditto.
25634 (vfmlsl_high_u32): Ditto.
25635 (vfmlalq_high_u32): Ditto.
25636 (vfmlslq_high_u32): Ditto.
25637 (vfmlal_lane_low_u32): Ditto.
25638 (vfmlsl_lane_low_u32): Ditto.
25639 (vfmlal_laneq_low_u32): Ditto.
25640 (vfmlsl_laneq_low_u32): Ditto.
25641 (vfmlalq_lane_low_u32): Ditto.
25642 (vfmlslq_lane_low_u32): Ditto.
25643 (vfmlalq_laneq_low_u32): Ditto.
25644 (vfmlslq_laneq_low_u32): Ditto.
25645 (vfmlal_lane_high_u32): Ditto.
25646 (vfmlsl_lane_high_u32): Ditto.
25647 (vfmlal_laneq_high_u32): Ditto.
25648 (vfmlsl_laneq_high_u32): Ditto.
25649 (vfmlalq_lane_high_u32): Ditto.
25650 (vfmlslq_lane_high_u32): Ditto.
25651 (vfmlalq_laneq_high_u32): Ditto.
25652 (vfmlslq_laneq_high_u32): Ditto.
25653 * config/aarch64/aarch64.h (AARCH64_FL_F16SML): New flag.
25654 (AARCH64_FL_FOR_ARCH8_4): New.
25655 (AARCH64_ISA_F16FML): New ISA flag.
25656 (TARGET_F16FML): New feature flag for fp16fml.
25657 (doc/invoke.texi): Document new fp16fml option.
25659 2018-01-10 Michael Collison <michael.collison@arm.com>
25661 * config/aarch64/aarch64-builtins.c:
25662 (aarch64_types_ternopu_imm_qualifiers, TYPES_TERNOPUI): New.
25663 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
25664 (__ARM_FEATURE_SHA3): Define if TARGET_SHA3 is true.
25665 * config/aarch64/aarch64.h (AARCH64_FL_SHA3): New flags.
25666 (AARCH64_ISA_SHA3): New ISA flag.
25667 (TARGET_SHA3): New feature flag for sha3.
25668 * config/aarch64/iterators.md (sha512_op): New int attribute.
25669 (CRYPTO_SHA512): New int iterator.
25670 (UNSPEC_SHA512H): New unspec.
25671 (UNSPEC_SHA512H2): Ditto.
25672 (UNSPEC_SHA512SU0): Ditto.
25673 (UNSPEC_SHA512SU1): Ditto.
25674 * config/aarch64/aarch64-simd-builtins.def
25675 (aarch64_crypto_sha512hqv2di): New builtin.
25676 (aarch64_crypto_sha512h2qv2di): Ditto.
25677 (aarch64_crypto_sha512su0qv2di): Ditto.
25678 (aarch64_crypto_sha512su1qv2di): Ditto.
25679 (aarch64_eor3qv8hi): Ditto.
25680 (aarch64_rax1qv2di): Ditto.
25681 (aarch64_xarqv2di): Ditto.
25682 (aarch64_bcaxqv8hi): Ditto.
25683 * config/aarch64/aarch64-simd.md:
25684 (aarch64_crypto_sha512h<sha512_op>qv2di): New pattern.
25685 (aarch64_crypto_sha512su0qv2di): Ditto.
25686 (aarch64_crypto_sha512su1qv2di): Ditto.
25687 (aarch64_eor3qv8hi): Ditto.
25688 (aarch64_rax1qv2di): Ditto.
25689 (aarch64_xarqv2di): Ditto.
25690 (aarch64_bcaxqv8hi): Ditto.
25691 * config/aarch64/arm_neon.h (vsha512hq_u64): New intrinsic.
25692 (vsha512h2q_u64): Ditto.
25693 (vsha512su0q_u64): Ditto.
25694 (vsha512su1q_u64): Ditto.
25695 (veor3q_u16): Ditto.
25696 (vrax1q_u64): Ditto.
25697 (vxarq_u64): Ditto.
25698 (vbcaxq_u16): Ditto.
25699 * config/arm/types.md (crypto_sha512): New type attribute.
25700 (crypto_sha3): Ditto.
25701 (doc/invoke.texi): Document new sha3 option.
25703 2018-01-10 Michael Collison <michael.collison@arm.com>
25705 * config/aarch64/aarch64-builtins.c:
25706 (aarch64_types_quadopu_imm_qualifiers, TYPES_QUADOPUI): New.
25707 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
25708 (__ARM_FEATURE_SM3): Define if TARGET_SM4 is true.
25709 (__ARM_FEATURE_SM4): Define if TARGET_SM4 is true.
25710 * config/aarch64/aarch64.h (AARCH64_FL_SM4): New flags.
25711 (AARCH64_ISA_SM4): New ISA flag.
25712 (TARGET_SM4): New feature flag for sm4.
25713 * config/aarch64/aarch64-simd-builtins.def
25714 (aarch64_sm3ss1qv4si): Ditto.
25715 (aarch64_sm3tt1aq4si): Ditto.
25716 (aarch64_sm3tt1bq4si): Ditto.
25717 (aarch64_sm3tt2aq4si): Ditto.
25718 (aarch64_sm3tt2bq4si): Ditto.
25719 (aarch64_sm3partw1qv4si): Ditto.
25720 (aarch64_sm3partw2qv4si): Ditto.
25721 (aarch64_sm4eqv4si): Ditto.
25722 (aarch64_sm4ekeyqv4si): Ditto.
25723 * config/aarch64/aarch64-simd.md:
25724 (aarch64_sm3ss1qv4si): Ditto.
25725 (aarch64_sm3tt<sm3tt_op>qv4si): Ditto.
25726 (aarch64_sm3partw<sm3part_op>qv4si): Ditto.
25727 (aarch64_sm4eqv4si): Ditto.
25728 (aarch64_sm4ekeyqv4si): Ditto.
25729 * config/aarch64/iterators.md (sm3tt_op): New int iterator.
25730 (sm3part_op): Ditto.
25731 (CRYPTO_SM3TT): Ditto.
25732 (CRYPTO_SM3PART): Ditto.
25733 (UNSPEC_SM3SS1): New unspec.
25734 (UNSPEC_SM3TT1A): Ditto.
25735 (UNSPEC_SM3TT1B): Ditto.
25736 (UNSPEC_SM3TT2A): Ditto.
25737 (UNSPEC_SM3TT2B): Ditto.
25738 (UNSPEC_SM3PARTW1): Ditto.
25739 (UNSPEC_SM3PARTW2): Ditto.
25740 (UNSPEC_SM4E): Ditto.
25741 (UNSPEC_SM4EKEY): Ditto.
25742 * config/aarch64/constraints.md (Ui2): New constraint.
25743 * config/aarch64/predicates.md (aarch64_imm2): New predicate.
25744 * config/arm/types.md (crypto_sm3): New type attribute.
25745 (crypto_sm4): Ditto.
25746 * config/aarch64/arm_neon.h (vsm3ss1q_u32): New intrinsic.
25747 (vsm3tt1aq_u32): Ditto.
25748 (vsm3tt1bq_u32): Ditto.
25749 (vsm3tt2aq_u32): Ditto.
25750 (vsm3tt2bq_u32): Ditto.
25751 (vsm3partw1q_u32): Ditto.
25752 (vsm3partw2q_u32): Ditto.
25753 (vsm4eq_u32): Ditto.
25754 (vsm4ekeyq_u32): Ditto.
25755 (doc/invoke.texi): Document new sm4 option.
25757 2018-01-10 Michael Collison <michael.collison@arm.com>
25759 * config/aarch64/aarch64-arches.def (armv8.4-a): New architecture.
25760 * config/aarch64/aarch64.h (AARCH64_ISA_V8_4): New ISA flag.
25761 (AARCH64_FL_FOR_ARCH8_4): New.
25762 (AARCH64_FL_V8_4): New flag.
25763 (doc/invoke.texi): Document new armv8.4-a option.
25765 2018-01-10 Michael Collison <michael.collison@arm.com>
25767 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
25768 (__ARM_FEATURE_AES): Define if TARGET_AES is true.
25769 (__ARM_FEATURE_SHA2): Define if TARGET_SHA2 is true.
25770 * config/aarch64/aarch64-option-extension.def: Add
25771 AARCH64_OPT_EXTENSION of 'sha2'.
25772 (aes): Add AARCH64_OPT_EXTENSION of 'aes'.
25773 (crypto): Disable sha2 and aes if crypto disabled.
25774 (crypto): Enable aes and sha2 if enabled.
25775 (simd): Disable sha2 and aes if simd disabled.
25776 * config/aarch64/aarch64.h (AARCH64_FL_AES, AARCH64_FL_SHA2):
25778 (AARCH64_ISA_AES, AARCH64_ISA_SHA2): New ISA flags.
25779 (TARGET_SHA2): New feature flag for sha2.
25780 (TARGET_AES): New feature flag for aes.
25781 * config/aarch64/aarch64-simd.md:
25782 (aarch64_crypto_aes<aes_op>v16qi): Make pattern
25783 conditional on TARGET_AES.
25784 (aarch64_crypto_aes<aesmc_op>v16qi): Ditto.
25785 (aarch64_crypto_sha1hsi): Make pattern conditional
25787 (aarch64_crypto_sha1hv4si): Ditto.
25788 (aarch64_be_crypto_sha1hv4si): Ditto.
25789 (aarch64_crypto_sha1su1v4si): Ditto.
25790 (aarch64_crypto_sha1<sha1_op>v4si): Ditto.
25791 (aarch64_crypto_sha1su0v4si): Ditto.
25792 (aarch64_crypto_sha256h<sha256_op>v4si): Ditto.
25793 (aarch64_crypto_sha256su0v4si): Ditto.
25794 (aarch64_crypto_sha256su1v4si): Ditto.
25795 (doc/invoke.texi): Document new aes and sha2 options.
25797 2018-01-10 Martin Sebor <msebor@redhat.com>
25799 PR tree-optimization/83781
25800 * gimple-fold.c (get_range_strlen): Avoid treating arrays of pointers
25803 2018-01-11 Martin Sebor <msebor@gmail.com>
25804 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
25806 PR tree-optimization/83501
25807 PR tree-optimization/81703
25809 * tree-ssa-strlen.c (get_string_cst): Rename...
25810 (get_string_len): ...to this. Handle global constants.
25811 (handle_char_store): Adjust.
25813 2018-01-10 Kito Cheng <kito.cheng@gmail.com>
25814 Jim Wilson <jimw@sifive.com>
25816 * config/riscv/riscv-protos.h (riscv_output_return): New.
25817 * config/riscv/riscv.c (struct machine_function): New naked_p field.
25818 (riscv_attribute_table, riscv_output_return),
25819 (riscv_handle_fndecl_attribute, riscv_naked_function_p),
25820 (riscv_allocate_stack_slots_for_args, riscv_warn_func_return): New.
25821 (riscv_compute_frame_info): Only compute frame->mask if not a naked
25823 (riscv_expand_prologue): Add early return for naked function.
25824 (riscv_expand_epilogue): Likewise.
25825 (riscv_function_ok_for_sibcall): Return false for naked function.
25826 (riscv_set_current_function): New.
25827 (TARGET_SET_CURRENT_FUNCTION, TARGET_ALLOCATE_STACK_SLOTS_FOR_ARGS),
25828 (TARGET_ATTRIBUTE_TABLE, TARGET_WARN_FUNC_RETURN): New.
25829 * config/riscv/riscv.md (simple_return): Call riscv_output_return.
25830 * doc/extend.texi (RISC-V Function Attributes): New.
25832 2018-01-10 Michael Meissner <meissner@linux.vnet.ibm.com>
25834 * config/rs6000/rs6000.c (is_complex_IBM_long_double): Explicitly
25835 check for 128-bit long double before checking TCmode.
25836 * config/rs6000/rs6000.h (FLOAT128_IEEE_P): Explicitly check for
25837 128-bit long doubles before checking TFmode or TCmode.
25838 (FLOAT128_IBM_P): Likewise.
25840 2018-01-10 Martin Sebor <msebor@redhat.com>
25842 PR tree-optimization/83671
25843 * builtins.c (c_strlen): Unconditionally return zero for the empty
25845 Use -Warray-bounds for warnings.
25846 * gimple-fold.c (get_range_strlen): Handle non-constant lengths
25847 for non-constant array indices with COMPONENT_REF, arrays of
25848 arrays, and pointers to arrays.
25849 (gimple_fold_builtin_strlen): Determine and set length range for
25850 non-constant character arrays.
25852 2018-01-10 Aldy Hernandez <aldyh@redhat.com>
25854 PR middle-end/81897
25855 * tree-ssa-uninit.c (convert_control_dep_chain_into_preds): Skip
25858 2018-01-10 Eric Botcazou <ebotcazou@adacore.com>
25860 * dwarf2out.c (dwarf2out_var_location): Do not pass NULL to fprintf.
25862 2018-01-10 Peter Bergner <bergner@vnet.ibm.com>
25865 * config/rs6000/rs6000.c (print_operand) <'y'>: Use
25866 VECTOR_MEM_ALTIVEC_OR_VSX_P.
25867 * config/rs6000/vsx.md (*vsx_le_perm_load_<mode> for VSX_D): Use
25868 indexed_or_indirect_operand predicate.
25869 (*vsx_le_perm_load_<mode> for VSX_W): Likewise.
25870 (*vsx_le_perm_load_v8hi): Likewise.
25871 (*vsx_le_perm_load_v16qi): Likewise.
25872 (*vsx_le_perm_store_<mode> for VSX_D): Likewise.
25873 (*vsx_le_perm_store_<mode> for VSX_W): Likewise.
25874 (*vsx_le_perm_store_v8hi): Likewise.
25875 (*vsx_le_perm_store_v16qi): Likewise.
25876 (eight unnamed splitters): Likewise.
25878 2018-01-10 Peter Bergner <bergner@vnet.ibm.com>
25880 * config/rs6000/x86intrin.h: Change #warning to #error. Update message.
25881 * config/rs6000/emmintrin.h: Likewise.
25882 * config/rs6000/mmintrin.h: Likewise.
25883 * config/rs6000/xmmintrin.h: Likewise.
25885 2018-01-10 David Malcolm <dmalcolm@redhat.com>
25888 * tree-core.h: Document EXPR_LOCATION_WRAPPER_P's usage of
25890 * tree.c (tree_nop_conversion): Return true for location wrapper
25892 (maybe_wrap_with_location): New function.
25893 (selftest::check_strip_nops): New function.
25894 (selftest::test_location_wrappers): New function.
25895 (selftest::tree_c_tests): Call it.
25896 * tree.h (STRIP_ANY_LOCATION_WRAPPER): New macro.
25897 (maybe_wrap_with_location): New decl.
25898 (EXPR_LOCATION_WRAPPER_P): New macro.
25899 (location_wrapper_p): New inline function.
25900 (tree_strip_any_location_wrapper): New inline function.
25902 2018-01-10 H.J. Lu <hongjiu.lu@intel.com>
25905 * config/i386/i386.c (ix86_compute_frame_layout): Always adjust
25906 stack_realign_offset for the largest alignment of stack slot
25908 (ix86_find_max_used_stack_alignment): New function.
25909 (ix86_finalize_stack_frame_flags): Use it. Set
25910 max_used_stack_alignment if we don't realign stack.
25911 * config/i386/i386.h (machine_function): Add
25912 max_used_stack_alignment.
25914 2018-01-10 Christophe Lyon <christophe.lyon@linaro.org>
25916 * config/arm/arm.opt (-mbranch-cost): New option.
25917 * config/arm/arm.h (BRANCH_COST): Take arm_branch_cost into
25920 2018-01-10 Segher Boessenkool <segher@kernel.crashing.org>
25923 * config/rs6000/rs6000.md (load_toc_v4_PIC_2, load_toc_v4_PIC_3b,
25924 load_toc_v4_PIC_3c): Wrap const term in CONST RTL.
25926 2018-01-10 Richard Biener <rguenther@suse.de>
25929 * dwarf2out.c (gen_subprogram_die): Hoist old_die && declaration
25930 early out so it also covers the case where we have a non-NULL
25933 2018-01-10 Richard Sandiford <richard.sandiford@linaro.org>
25935 PR tree-optimization/83753
25936 * tree-vect-stmts.c (get_group_load_store_type): Use VMAT_CONTIGUOUS
25937 for non-strided grouped accesses if the number of elements is 1.
25939 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
25942 * i386.c (ix86_vectorize_builtin_gather): Check TARGET_USE_GATHER.
25943 * i386.h (TARGET_USE_GATHER): Define.
25944 * x86-tune.def (X86_TUNE_USE_GATHER): New.
25946 2018-01-10 Martin Liska <mliska@suse.cz>
25949 * basic-block.h (CLEANUP_NO_PARTITIONING): New define.
25950 * bb-reorder.c (pass_reorder_blocks::execute): Do not clean up
25952 * cfgcleanup.c (try_optimize_cfg): Fix up partitioning if
25953 CLEANUP_NO_PARTITIONING is not set.
25955 2018-01-10 Richard Sandiford <richard.sandiford@linaro.org>
25957 * doc/rtl.texi: Remove documentation of (const ...) wrappers
25958 for vectors, as a partial revert of r254296.
25959 * rtl.h (const_vec_p): Delete.
25960 (const_vec_duplicate_p): Don't test for vector CONSTs.
25961 (unwrap_const_vec_duplicate, const_vec_series_p): Likewise.
25962 * expmed.c (make_tree): Likewise.
25965 * common.md (E, F): Use CONSTANT_P instead of checking for
25967 * emit-rtl.c (gen_lowpart_common): Use const_vec_p instead of
25968 checking for CONST_VECTOR.
25970 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
25972 PR middle-end/83575
25973 * predict.c (force_edge_cold): Handle in more sane way edges
25974 with no prediction.
25976 2018-01-09 Carl Love <cel@us.ibm.com>
25978 * config/rs6002/altivec.md (p8_vmrgow): Add support for V2DI, V2DF,
25980 (p8_vmrgew): Add support for V2DI, V2DF, V4SF types.
25981 * config/rs6000/rs6000-builtin.def: Add definitions for FLOAT2_V2DF,
25982 VMRGEW_V2DI, VMRGEW_V2DF, VMRGEW_V4SF, VMRGOW_V4SI, VMRGOW_V4SF,
25983 VMRGOW_V2DI, VMRGOW_V2DF. Remove definition for VMRGOW.
25984 * config/rs6000/rs6000-c.c (VSX_BUILTIN_VEC_FLOAT2,
25985 P8V_BUILTIN_VEC_VMRGEW, P8V_BUILTIN_VEC_VMRGOW): Add definitions.
25986 * config/rs6000/rs6000-protos.h: Add extern defition for
25987 rs6000_generate_float2_double_code.
25988 * config/rs6000/rs6000.c (rs6000_generate_float2_double_code): Add
25990 * config/rs6000/vsx.md (vsx_xvcdpsp): Add define_insn.
25991 (float2_v2df): Add define_expand.
25993 2018-01-09 Uros Bizjak <ubizjak@gmail.com>
25996 * combine.c (force_int_to_mode) <case ASHIFT>: Use mode instead of
25997 op_mode in the force_to_mode call.
25999 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
26001 * config/aarch64/aarch64.c (aarch64_evpc_trn): Use d.perm.series_p
26002 instead of checking each element individually.
26003 (aarch64_evpc_uzp): Likewise.
26004 (aarch64_evpc_zip): Likewise.
26005 (aarch64_evpc_ext): Likewise.
26006 (aarch64_evpc_rev): Likewise.
26007 (aarch64_evpc_dup): Test the encoding for a single duplicated element,
26008 instead of checking each element individually. Return true without
26010 (aarch64_vectorize_vec_perm_const): Use all_from_input_p to test
26011 whether all selected elements come from the same input, instead of
26012 checking each element individually. Remove calls to gen_rtx_REG,
26013 start_sequence and end_sequence and instead assert that no rtl is
26016 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
26018 * config/aarch64/aarch64.c (aarch64_legitimate_constant_p): Fix
26019 order of HIGH and CONST checks.
26021 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
26023 * tree-vect-stmts.c (permute_vec_elements): Create a fresh variable
26024 if the destination isn't an SSA_NAME.
26026 2018-01-09 Richard Biener <rguenther@suse.de>
26028 PR tree-optimization/83668
26029 * graphite.c (canonicalize_loop_closed_ssa): Add edge argument,
26031 (canonicalize_loop_form): ... here, renamed from ...
26032 (canonicalize_loop_closed_ssa_form): ... this and amended to
26033 swap successor edges for loop exit blocks to make us use
26034 the RPO order we need for initial schedule generation.
26036 2018-01-09 Joseph Myers <joseph@codesourcery.com>
26038 PR tree-optimization/64811
26039 * match.pd: When optimizing comparisons with Inf, avoid
26040 introducing or losing exceptions from comparisons with NaN.
26042 2018-01-09 Martin Liska <mliska@suse.cz>
26045 * asan.c (shadow_mem_size): Add gcc_assert.
26047 2018-01-09 Georg-Johann Lay <avr@gjlay.de>
26049 Don't save registers in main().
26052 * doc/invoke.texi (AVR Options) [-mmain-is-OS_task]: Document it.
26053 * config/avr/avr.opt (-mmain-is-OS_task): New target option.
26054 * config/avr/avr.c (avr_set_current_function): Don't error if
26055 naked, OS_task or OS_main are specified at the same time.
26056 (avr_function_ok_for_sibcall): Don't disable sibcalls for OS_task,
26058 (avr_insert_attributes) [-mmain-is-OS_task] <main>: Add OS_task
26060 * common/config/avr/avr-common.c (avr_option_optimization_table):
26061 Switch on -mmain-is-OS_task for optimizing compilations.
26063 2018-01-09 Richard Biener <rguenther@suse.de>
26065 PR tree-optimization/83572
26066 * graphite.c: Include cfganal.h.
26067 (graphite_transform_loops): Connect infinite loops to exit
26068 and remove fake edges at the end.
26070 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
26072 * ipa-inline.c (edge_badness): Revert accidental checkin.
26074 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
26077 * ipa-comdats.c (set_comdat_group): Only set comdat group of real
26078 symbols; not inline clones.
26080 2018-01-09 Jakub Jelinek <jakub@redhat.com>
26083 * modulo-sched.c (schedule_reg_moves): Punt if we'd need to move
26084 hard registers. Formatting fixes.
26086 PR preprocessor/83722
26087 * gcc.c (try_generate_repro): Pass
26088 &temp_stderr_files[RETRY_ICE_ATTEMPTS - 1] rather than
26089 &temp_stdout_files[RETRY_ICE_ATTEMPTS - 1] as last argument to
26092 2018-01-08 Monk Chiang <sh.chiang04@gmail.com>
26093 Kito Cheng <kito.cheng@gmail.com>
26095 * config/riscv/riscv.c (machine_function::is_leaf): Remove field.
26096 (riscv_leaf_function_p): Delete.
26097 (riscv_function_ok_for_sibcall): Return false when TARGET_SAVE_RESTORE.
26099 2018-01-08 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
26101 * config/rs6000/rs6000-string.c (do_load_for_compare_from_addr): New
26103 (do_ifelse): New function.
26104 (do_isel): New function.
26105 (do_sub3): New function.
26106 (do_add3): New function.
26107 (do_load_mask_compare): New function.
26108 (do_overlap_load_compare): New function.
26109 (expand_compare_loop): New function.
26110 (expand_block_compare): Call expand_compare_loop() when appropriate.
26111 * config/rs6000/rs6000.opt (-mblock-compare-inline-limit): Change
26112 option description.
26113 (-mblock-compare-inline-loop-limit): New option.
26115 2018-01-08 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
26118 * config/rs6000/altivec.md (*altivec_vpermr_<mode>_internal):
26119 Reverse order of second and third operands in first alternative.
26120 * config/rs6000/rs6000.c (rs6000_expand_vector_set): Reverse order
26121 of first and second elements in UNSPEC_VPERMR vector.
26122 (altivec_expand_vec_perm_le): Likewise.
26124 2018-01-08 Jeff Law <law@redhat.com>
26126 PR rtl-optimizatin/81308
26127 * tree-switch-conversion.c (cfg_altered): New file scoped static.
26128 (process_switch): If group_case_labels makes a change, then set
26130 (pass_convert_switch::execute): If a switch is converted, then
26131 set cfg_altered. Return TODO_cfg_cleanup if cfg_altered is true.
26133 PR rtl-optimization/81308
26134 * recog.c (split_all_insns): Conditionally cleanup the CFG after
26137 2018-01-08 Vidya Praveen <vidyapraveen@arm.com>
26139 PR target/83663 - Revert r255946
26140 * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify code
26141 generation for cases where splatting a value is not useful.
26142 * simplify-rtx.c (simplify_ternary_operation): Simplify vec_merge
26143 across a vec_duplicate and a paradoxical subreg forming a vector
26144 mode to a vec_concat.
26146 2018-01-08 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
26148 * config/arm/t-aprofile (MULTILIB_MATCHES): Add mapping rules for
26149 -march=armv8.3-a variants.
26150 * config/arm/t-multilib: Likewise.
26151 * config/arm/t-arm-elf: Likewise. Handle dotprod extension.
26153 2018-01-08 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
26155 * config/rs6000/rs6000.md (cceq_ior_compare): Remove * so I can use it
26157 (cceq_ior_compare_complement): Give it a name so I can use it, and
26158 change boolean_or_operator predicate to boolean_operator so it can
26159 be used to generate a crand.
26160 (eqne): New code iterator.
26161 (bd/bd_neg): New code_attrs.
26162 (<bd>_<mode>): New name for ctr<mode>_internal[12] now combined into
26163 a single define_insn.
26164 (<bd>tf_<mode>): A new insn pattern for the conditional form branch
26165 decrement (bdnzt/bdnzf/bdzt/bdzf).
26166 * config/rs6000/rs6000.c (rs6000_legitimate_combined_insn): Updated
26167 with the new names of the branch decrement patterns, and added the
26168 names of the branch decrement conditional patterns.
26170 2018-01-08 Richard Biener <rguenther@suse.de>
26172 PR tree-optimization/83563
26173 * graphite.c (canonicalize_loop_closed_ssa_form): Reset the SCEV
26176 2018-01-08 Richard Biener <rguenther@suse.de>
26178 PR middle-end/83713
26179 * convert.c (do_narrow): Properly guard TYPE_OVERFLOW_WRAPS checks.
26181 2018-01-08 Richard Biener <rguenther@suse.de>
26183 PR tree-optimization/83685
26184 * tree-ssa-pre.c (create_expression_by_pieces): Do not insert
26185 references to abnormals.
26187 2018-01-08 Richard Biener <rguenther@suse.de>
26190 * dwarf2out.c (output_indirect_strings): Handle empty
26191 skeleton_debug_str_hash.
26192 (dwarf2out_early_finish): Index strings for -gsplit-dwarf.
26194 2018-01-08 Claudiu Zissulescu <claziss@synopsys.com>
26196 * config/arc/arc.c (TARGET_TRAMPOLINE_ADJUST_ADDRESS): Delete.
26197 (emit_store_direct): Likewise.
26198 (arc_trampoline_adjust_address): Likewise.
26199 (arc_asm_trampoline_template): New function.
26200 (arc_initialize_trampoline): Use asm_trampoline_template.
26201 (TARGET_ASM_TRAMPOLINE_TEMPLATE): Define.
26202 * config/arc/arc.h (TRAMPOLINE_SIZE): Adjust to 16.
26203 * config/arc/arc.md (flush_icache): Delete pattern.
26205 2018-01-08 Claudiu Zissulescu <claziss@synopsys.com>
26207 * config/arc/arc-c.def (__ARC_UNALIGNED__): New define.
26208 * config/arc/arc.h (STRICT_ALIGNMENT): Control this macro using
26211 2018-01-08 Sebastian Huber <sebastian.huber@embedded-brains.de>
26214 * config/epiphany/epiphany.h (make_pass_mode_switch_use): Guard
26215 by not USED_FOR_TARGET.
26216 (make_pass_resolve_sw_modes): Likewise.
26218 2018-01-08 Sebastian Huber <sebastian.huber@embedded-brains.de>
26220 * config/nios2/nios2.h (nios2_section_threshold): Guard by not
26223 2018-01-08 Richard Biener <rguenther@suse.de>
26225 PR middle-end/83580
26226 * tree-data-ref.c (split_constant_offset): Remove STRIP_NOPS.
26228 2018-01-08 Richard Biener <rguenther@suse.de>
26230 PR middle-end/83517
26231 * match.pd ((t * 2) / 2) -> t): Add missing :c.
26233 2018-01-06 Aldy Hernandez <aldyh@redhat.com>
26235 PR middle-end/81897
26236 * tree-ssa-uninit.c (compute_control_dep_chain): Do not bail on
26237 basic blocks with a small number of successors.
26238 (convert_control_dep_chain_into_preds): Improve handling of
26240 (dump_predicates): Split apart into...
26241 (dump_pred_chain): ...here...
26242 (dump_pred_info): ...and here.
26243 (can_one_predicate_be_invalidated_p): Add debugging printfs.
26244 (can_chain_union_be_invalidated_p): Improve check for invalidation
26246 (uninit_uses_cannot_happen): Avoid unnecessary if
26247 convert_control_dep_chain_into_preds yielded nothing.
26249 2018-01-06 Martin Sebor <msebor@redhat.com>
26251 PR tree-optimization/83640
26252 * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Avoid
26253 subtracting negative offset from size.
26254 (builtin_access::overlap): Adjust offset bounds of the access to fall
26255 within the size of the object if possible.
26257 2018-01-06 Richard Sandiford <richard.sandiford@linaro.org>
26259 PR rtl-optimization/83699
26260 * expmed.c (extract_bit_field_1): Restrict the vector usage of
26261 extract_bit_field_as_subreg to cases in which the extracted
26262 value is also a vector.
26264 * lra-constraints.c (process_alt_operands): Test for the equivalence
26265 substitutions when detecting a possible reload cycle.
26267 2018-01-06 Jakub Jelinek <jakub@redhat.com>
26270 * toplev.c (process_options): Don't enable debug_nonbind_markers_p
26271 by default if flag_selective_schedling{,2}. Formatting fixes.
26273 PR rtl-optimization/83682
26274 * rtl.h (const_vec_duplicate_p): Only return true for VEC_DUPLICATE
26275 if it has non-VECTOR_MODE element mode.
26276 (vec_duplicate_p): Likewise.
26278 PR middle-end/83694
26279 * cfgexpand.c (expand_debug_expr): Punt if mode1 is VOIDmode
26280 and bitsize might be greater than MAX_BITSIZE_MODE_ANY_INT.
26282 2018-01-05 Jakub Jelinek <jakub@redhat.com>
26285 * config/i386/i386-builtin.def
26286 (__builtin_ia32_vgf2p8affineinvqb_v64qi,
26287 __builtin_ia32_vgf2p8affineqb_v64qi, __builtin_ia32_vgf2p8mulb_v64qi):
26288 Require also OPTION_MASK_ISA_AVX512F in addition to
26289 OPTION_MASK_ISA_GFNI.
26290 (__builtin_ia32_vgf2p8affineinvqb_v16qi_mask,
26291 __builtin_ia32_vgf2p8affineqb_v16qi_mask): Require
26292 OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_SSE in addition
26293 to OPTION_MASK_ISA_GFNI.
26294 (__builtin_ia32_vgf2p8mulb_v32qi_mask): Require
26295 OPTION_MASK_ISA_AVX512VL in addition to OPTION_MASK_ISA_GFNI and
26296 OPTION_MASK_ISA_AVX512BW.
26297 (__builtin_ia32_vgf2p8mulb_v16qi_mask): Require
26298 OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_AVX512BW in
26299 addition to OPTION_MASK_ISA_GFNI.
26300 (__builtin_ia32_vgf2p8affineinvqb_v16qi,
26301 __builtin_ia32_vgf2p8affineqb_v16qi, __builtin_ia32_vgf2p8mulb_v16qi):
26302 Require OPTION_MASK_ISA_SSE2 instead of OPTION_MASK_ISA_SSE in addition
26303 to OPTION_MASK_ISA_GFNI.
26304 * config/i386/i386.c (def_builtin): Change to builtin isa/isa2 being
26305 a requirement for all ISAs rather than any of them with a few
26307 (ix86_add_new_builtins): Clear OPTION_MASK_ISA_64BIT from isa before
26309 (ix86_expand_builtin): Require all ISAs from builtin's isa and isa2
26310 bitmasks to be enabled with 3 exceptions, instead of requiring any
26311 enabled ISA with lots of exceptions.
26312 * config/i386/sse.md (vgf2p8affineinvqb_<mode><mask_name>,
26313 vgf2p8affineqb_<mode><mask_name>, vgf2p8mulb_<mode><mask_name>):
26314 Change avx512bw in isa attribute to avx512f.
26315 * config/i386/sgxintrin.h: Add license boilerplate.
26316 * config/i386/vaesintrin.h: Likewise. Fix macro spelling __AVX512F
26317 to __AVX512F__ and __AVX512VL to __AVX512VL__.
26318 (_mm256_aesdec_epi128, _mm256_aesdeclast_epi128, _mm256_aesenc_epi128,
26319 _mm256_aesenclast_epi128): Enable temporarily avx if __AVX__ is not
26321 * config/i386/gfniintrin.h (_mm_gf2p8mul_epi8,
26322 _mm_gf2p8affineinv_epi64_epi8, _mm_gf2p8affine_epi64_epi8): Enable
26323 temporarily sse2 rather than sse if not enabled already.
26326 * config/i386/sse.md (VI248_VLBW): Rename to ...
26327 (VI248_AVX512VL): ... this. Don't guard V32HI with TARGET_AVX512BW.
26328 (vpshrd_<mode><mask_name>, vpshld_<mode><mask_name>,
26329 vpshrdv_<mode>, vpshrdv_<mode>_mask, vpshrdv_<mode>_maskz,
26330 vpshrdv_<mode>_maskz_1, vpshldv_<mode>, vpshldv_<mode>_mask,
26331 vpshldv_<mode>_maskz, vpshldv_<mode>_maskz_1): Use VI248_AVX512VL
26332 mode iterator instead of VI248_VLBW.
26334 2018-01-05 Jan Hubicka <hubicka@ucw.cz>
26336 * ipa-fnsummary.c (record_modified_bb_info): Add OP.
26337 (record_modified): Skip clobbers; add debug output.
26338 (param_change_prob): Use sreal frequencies.
26340 2018-01-05 Richard Sandiford <richard.sandiford@linaro.org>
26342 * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Don't
26343 punt for user-aligned variables.
26345 2018-01-05 Richard Sandiford <richard.sandiford@linaro.org>
26347 * tree-chrec.c (chrec_contains_symbols): Return true for
26350 2018-01-05 Sudakshina Das <sudi.das@arm.com>
26353 * simplify-rtx.c (simplify_relational_operation_1): Add simplifications
26354 of (x|y) == x for BICS pattern.
26356 2018-01-05 Jakub Jelinek <jakub@redhat.com>
26358 PR tree-optimization/83605
26359 * gimple-ssa-strength-reduction.c: Include tree-eh.h.
26360 (find_candidates_dom_walker::before_dom_children): Ignore stmts that
26363 2018-01-05 Sebastian Huber <sebastian.huber@embedded-brains.de>
26365 * config.gcc (epiphany-*-elf*): Add (epiphany-*-rtems*) configuration.
26366 * config/epiphany/rtems.h: New file.
26368 2018-01-04 Jakub Jelinek <jakub@redhat.com>
26369 Uros Bizjak <ubizjak@gmail.com>
26372 * config/i386/i386.md (*<rotate_insn>hi3_1 splitter): Use
26373 QIreg_operand instead of register_operand predicate.
26374 * config/i386/i386.c (ix86_rop_should_change_byte_p,
26375 set_rop_modrm_reg_bits, ix86_mitigate_rop): Use -mmitigate-rop in
26376 comments instead of -fmitigate[-_]rop.
26378 2018-01-04 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
26381 * cgraphunit.c (symbol_table::compile): Switch to text_section
26382 before calling assembly_start debug hook.
26383 * run-rtl-passes.c (run_rtl_passes): Likewise.
26386 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
26388 * tree-vrp.c (extract_range_from_binary_expr_1): Check
26389 range_int_cst_p rather than !symbolic_range_p before calling
26390 extract_range_from_multiplicative_op_1.
26392 2018-01-04 Jeff Law <law@redhat.com>
26394 * tree-ssa-math-opts.c (execute_cse_reciprocals_1): Remove
26395 redundant test in assertion.
26397 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
26399 * doc/rtl.texi: Document machine_mode wrapper classes.
26401 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
26403 * fold-const.c (fold_ternary_loc): Check tree_fits_uhwi_p before
26404 using tree_to_uhwi.
26406 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
26408 * tree-ssa-forwprop.c (is_combined_permutation_identity): Allow
26409 the VEC_PERM_EXPR fold to fail.
26411 2018-01-04 Jakub Jelinek <jakub@redhat.com>
26414 * bb-reorder.c (insert_section_boundary_note): Set has_bb_partition
26415 to switched_sections.
26417 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
26420 * config/arm/arm.c (arm_vectorize_vec_perm_const): Fix inverted
26421 test for d.testing.
26423 2018-01-04 Peter Bergner <bergner@vnet.ibm.com>
26426 * config/rs6000/rs6000.c (rs6000_discover_homogeneous_aggregate): Do not
26427 allow arguments in FP registers if TARGET_HARD_FLOAT is false.
26429 2018-01-04 Jakub Jelinek <jakub@redhat.com>
26432 * cfgexpand.c (expand_debug_expr) <case BIT_FIELD_REF>: Punt if mode
26433 is BLKmode and bitpos not zero or mode change is needed.
26435 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
26438 * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): Require
26441 2018-01-04 Uros Bizjak <ubizjak@gmail.com>
26444 * config/alpha/alpha.md (*sadd<modesuffix>): Use ASHIFT
26445 instead of MULT rtx. Update all corresponding splitters.
26446 (*saddl_se): Ditto.
26447 (*ssub<modesuffix>): Ditto.
26448 (*ssubl_se): Ditto.
26449 (*cmp_sadd_di): Update split patterns.
26450 (*cmp_sadd_si): Ditto.
26451 (*cmp_sadd_sidi): Ditto.
26452 (*cmp_ssub_di): Ditto.
26453 (*cmp_ssub_si): Ditto.
26454 (*cmp_ssub_sidi): Ditto.
26455 * config/alpha/predicates.md (const23_operand): New predicate.
26456 * config/alpha/alpha.c (alpha_rtx_costs) [PLUS, MINUS]:
26457 Look for ASHIFT, not MULT inner operand.
26458 (alpha_split_conditional_move): Update for *sadd<modesuffix> change.
26460 2018-01-04 Martin Liska <mliska@suse.cz>
26462 PR gcov-profile/83669
26463 * gcov.c (output_intermediate_file): Add version to intermediate
26465 * doc/gcov.texi: Document new field 'version' in intermediate
26466 file format. Fix location of '-k' option of gcov command.
26468 2018-01-04 Martin Liska <mliska@suse.cz>
26471 * ipa-icf.c (sem_function::merge): Do not cross comdat boundary.
26473 2018-01-04 Jakub Jelinek <jakub@redhat.com>
26475 * gimple-ssa-sprintf.c (parse_directive): Cast second dir.len to uhwi.
26477 2018-01-03 Martin Sebor <msebor@redhat.com>
26479 PR tree-optimization/83655
26480 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call): Avoid
26481 checking calls with invalid arguments.
26483 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
26485 * tree-vect-stmts.c (vect_get_store_rhs): New function.
26486 (vectorizable_mask_load_store): Delete.
26487 (vectorizable_call): Return false for masked loads and stores.
26488 (vectorizable_store): Handle IFN_MASK_STORE. Use vect_get_store_rhs
26489 instead of gimple_assign_rhs1.
26490 (vectorizable_load): Handle IFN_MASK_LOAD.
26491 (vect_transform_stmt): Don't set is_store for call_vec_info_type.
26493 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
26495 * tree-vect-stmts.c (vect_build_gather_load_calls): New function,
26497 (vectorizable_mask_load_store): ...here.
26498 (vectorizable_load): ...and here.
26500 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
26502 * tree-vect-stmts.c (vect_build_all_ones_mask)
26503 (vect_build_zero_merge_argument): New functions, split out from...
26504 (vectorizable_load): ...here.
26506 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
26508 * tree-vect-stmts.c (vect_check_store_rhs): New function,
26510 (vectorizable_mask_load_store): ...here.
26511 (vectorizable_store): ...and here.
26513 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
26515 * tree-vect-stmts.c (vect_check_load_store_mask): New function,
26517 (vectorizable_mask_load_store): ...here.
26519 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
26521 * tree-vectorizer.h (vec_load_store_type): Moved from tree-vec-stmts.c
26522 (vect_model_store_cost): Take a vec_load_store_type instead of a
26524 * tree-vect-stmts.c (vec_load_store_type): Move to tree-vectorizer.h.
26525 (vect_model_store_cost): Take a vec_load_store_type instead of a
26527 (vectorizable_mask_load_store): Update accordingly.
26528 (vectorizable_store): Likewise.
26529 * tree-vect-slp.c (vect_analyze_slp_cost_1): Update accordingly.
26531 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
26533 * tree-vect-loop.c (vect_transform_loop): Stub out scalar
26534 IFN_MASK_LOAD calls here rather than...
26535 * tree-vect-stmts.c (vectorizable_mask_load_store): ...here.
26537 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
26538 Alan Hayward <alan.hayward@arm.com>
26539 David Sherwood <david.sherwood@arm.com>
26541 * expmed.c (extract_bit_field_1): For vector extracts,
26542 fall back to extract_bit_field_as_subreg if vec_extract
26545 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
26546 Alan Hayward <alan.hayward@arm.com>
26547 David Sherwood <david.sherwood@arm.com>
26549 * lra-spills.c (pseudo_reg_slot_compare): Sort slots by whether
26550 they are variable or constant sized.
26551 (assign_stack_slot_num_and_sort_pseudos): Don't reuse variable-sized
26552 slots for constant-sized data.
26554 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
26555 Alan Hayward <alan.hayward@arm.com>
26556 David Sherwood <david.sherwood@arm.com>
26558 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): When
26559 handling COND_EXPRs with boolean comparisons, try to find a better
26560 basis for the mask type than the boolean itself.
26562 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
26564 * doc/rtl.texi (MAX_BITSIZE_MODE_ANY_MODE): Describe how the default
26565 is calculated and how it can be overridden.
26566 * genmodes.c (max_bitsize_mode_any_mode): New variable.
26567 (create_modes): Initialize it from MAX_BITSIZE_MODE_ANY_MODE,
26569 (emit_max_int): Use it to set the output MAX_BITSIZE_MODE_ANY_MODE,
26572 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
26573 Alan Hayward <alan.hayward@arm.com>
26574 David Sherwood <david.sherwood@arm.com>
26576 * config/aarch64/aarch64-protos.h (aarch64_output_simd_mov_immediate):
26577 Remove the mode argument.
26578 (aarch64_simd_valid_immediate): Remove the mode and inverse
26580 * config/aarch64/iterators.md (bitsize): New iterator.
26581 * config/aarch64/aarch64-simd.md (*aarch64_simd_mov<mode>, and<mode>3)
26582 (ior<mode>3): Update calls to aarch64_output_simd_mov_immediate.
26583 * config/aarch64/constraints.md (Do, Db, Dn): Update calls to
26584 aarch64_simd_valid_immediate.
26585 * config/aarch64/predicates.md (aarch64_reg_or_orr_imm): Likewise.
26586 (aarch64_reg_or_bic_imm): Likewise.
26587 * config/aarch64/aarch64.c (simd_immediate_info): Replace mvn
26588 with an insn_type enum and msl with a modifier_type enum.
26589 Replace element_width with a scalar_mode. Change the shift
26590 to unsigned int. Add constructors for scalar_float_mode and
26591 scalar_int_mode elements.
26592 (aarch64_vect_float_const_representable_p): Delete.
26593 (aarch64_can_const_movi_rtx_p)
26594 (aarch64_simd_scalar_immediate_valid_for_move)
26595 (aarch64_simd_make_constant): Update call to
26596 aarch64_simd_valid_immediate.
26597 (aarch64_advsimd_valid_immediate_hs): New function.
26598 (aarch64_advsimd_valid_immediate): Likewise.
26599 (aarch64_simd_valid_immediate): Remove mode and inverse
26600 arguments. Rewrite to use the above. Use const_vec_duplicate_p
26601 to detect duplicated constants and use aarch64_float_const_zero_rtx_p
26602 and aarch64_float_const_representable_p on the result.
26603 (aarch64_output_simd_mov_immediate): Remove mode argument.
26604 Update call to aarch64_simd_valid_immediate and use of
26605 simd_immediate_info.
26606 (aarch64_output_scalar_simd_mov_immediate): Update call
26609 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
26610 Alan Hayward <alan.hayward@arm.com>
26611 David Sherwood <david.sherwood@arm.com>
26613 * machmode.h (mode_precision): Prefix with CONST_MODE_PRECISION.
26614 (mode_nunits): Likewise CONST_MODE_NUNITS.
26615 * machmode.def (ADJUST_NUNITS): Document.
26616 * genmodes.c (mode_data::need_nunits_adj): New field.
26617 (blank_mode): Update accordingly.
26618 (adj_nunits): New variable.
26619 (print_maybe_const_decl): Replace CATEGORY with a NEEDS_ADJ
26621 (emit_mode_size_inline): Set need_bytesize_adj for all modes
26622 listed in adj_nunits.
26623 (emit_mode_nunits_inline): Set need_nunits_adj for all modes
26624 listed in adj_nunits. Don't emit case statements for such modes.
26625 (emit_insn_modes_h): Emit definitions of CONST_MODE_NUNITS
26626 and CONST_MODE_PRECISION. Make CONST_MODE_SIZE expand to
26627 nothing if adj_nunits is nonnull.
26628 (emit_mode_precision, emit_mode_nunits): Use print_maybe_const_decl.
26629 (emit_mode_unit_size, emit_mode_base_align, emit_mode_ibit)
26630 (emit_mode_fbit): Update use of print_maybe_const_decl.
26631 (emit_move_size): Likewise. Treat the array as non-const
26633 (emit_mode_adjustments): Handle adj_nunits.
26635 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
26637 * machmode.def (VECTOR_MODES_WITH_PREFIX): Document.
26638 * genmodes.c (VECTOR_MODES_WITH_PREFIX): New macro.
26639 (VECTOR_MODES): Use it.
26640 (make_vector_modes): Take the prefix as an argument.
26642 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
26643 Alan Hayward <alan.hayward@arm.com>
26644 David Sherwood <david.sherwood@arm.com>
26646 * mode-classes.def (MODE_VECTOR_BOOL): New mode class.
26647 * machmode.h (INTEGRAL_MODE_P, VECTOR_MODE_P): Return true
26648 for MODE_VECTOR_BOOL.
26649 * machmode.def (VECTOR_BOOL_MODE): Document.
26650 * genmodes.c (VECTOR_BOOL_MODE): New macro.
26651 (make_vector_bool_mode): New function.
26652 (complete_mode, emit_mode_wider, emit_mode_adjustments): Handle
26654 * lto-streamer-in.c (lto_input_mode_table): Likewise.
26655 * rtx-vector-builder.c (rtx_vector_builder::find_cached_value):
26657 * stor-layout.c (int_mode_for_mode): Likewise.
26658 * tree.c (build_vector_type_for_mode): Likewise.
26659 * varasm.c (output_constant_pool_2): Likewise.
26660 * emit-rtl.c (init_emit_once): Make sure that CONST1_RTX (BImode) and
26661 CONSTM1_RTX (BImode) are the same thing. Initialize const_tiny_rtx
26662 for MODE_VECTOR_BOOL.
26663 * expr.c (expand_expr_real_1): Use VECTOR_MODE_P instead of a list
26664 of mode class checks.
26665 * tree-vect-generic.c (expand_vector_operation): Use VECTOR_MODE_P
26666 instead of a list of mode class checks.
26667 (expand_vector_scalar_condition): Likewise.
26668 (type_for_widest_vector_mode): Handle BImode as an inner mode.
26670 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
26671 Alan Hayward <alan.hayward@arm.com>
26672 David Sherwood <david.sherwood@arm.com>
26674 * machmode.h (mode_size): Change from unsigned short to
26676 (mode_to_bytes): Return a poly_uint16 rather than an unsigned short.
26677 (GET_MODE_SIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
26678 or if measurement_type is not polynomial.
26679 (fixed_size_mode::includes_p): Check for constant-sized modes.
26680 * genmodes.c (emit_mode_size_inline): Make mode_size_inline
26681 return a poly_uint16 rather than an unsigned short.
26682 (emit_mode_size): Change the type of mode_size from unsigned short
26683 to poly_uint16_pod. Use ZERO_COEFFS for the initializer.
26684 (emit_mode_adjustments): Cope with polynomial vector sizes.
26685 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
26687 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
26689 * auto-inc-dec.c (try_merge): Treat GET_MODE_SIZE as polynomial.
26690 * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Likewise.
26691 * caller-save.c (setup_save_areas): Likewise.
26692 (replace_reg_with_saved_mem): Likewise.
26693 * calls.c (emit_library_call_value_1): Likewise.
26694 * combine-stack-adj.c (combine_stack_adjustments_for_block): Likewise.
26695 * combine.c (simplify_set, make_extraction, simplify_shift_const_1)
26696 (gen_lowpart_for_combine): Likewise.
26697 * convert.c (convert_to_integer_1): Likewise.
26698 * cse.c (equiv_constant, cse_insn): Likewise.
26699 * cselib.c (autoinc_split, cselib_hash_rtx): Likewise.
26700 (cselib_subst_to_values): Likewise.
26701 * dce.c (word_dce_process_block): Likewise.
26702 * df-problems.c (df_word_lr_mark_ref): Likewise.
26703 * dwarf2cfi.c (init_one_dwarf_reg_size): Likewise.
26704 * dwarf2out.c (multiple_reg_loc_descriptor, mem_loc_descriptor)
26705 (concat_loc_descriptor, concatn_loc_descriptor, loc_descriptor)
26706 (rtl_for_decl_location): Likewise.
26707 * emit-rtl.c (gen_highpart, widen_memory_access): Likewise.
26708 * expmed.c (extract_bit_field_1, extract_integral_bit_field): Likewise.
26709 * expr.c (emit_group_load_1, clear_storage_hints): Likewise.
26710 (emit_move_complex, emit_move_multi_word, emit_push_insn): Likewise.
26711 (expand_expr_real_1): Likewise.
26712 * function.c (assign_parm_setup_block_p, assign_parm_setup_block)
26713 (pad_below): Likewise.
26714 * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
26715 * gimple-ssa-store-merging.c (rhs_valid_for_store_merging_p): Likewise.
26716 * ira.c (get_subreg_tracking_sizes): Likewise.
26717 * ira-build.c (ira_create_allocno_objects): Likewise.
26718 * ira-color.c (coalesced_pseudo_reg_slot_compare): Likewise.
26719 (ira_sort_regnos_for_alter_reg): Likewise.
26720 * ira-costs.c (record_operand_costs): Likewise.
26721 * lower-subreg.c (interesting_mode_p, simplify_gen_subreg_concatn)
26722 (resolve_simple_move): Likewise.
26723 * lra-constraints.c (get_reload_reg, operands_match_p): Likewise.
26724 (process_addr_reg, simplify_operand_subreg, curr_insn_transform)
26725 (lra_constraints): Likewise.
26726 (CONST_POOL_OK_P): Reject variable-sized modes.
26727 * lra-spills.c (slot, assign_mem_slot, pseudo_reg_slot_compare)
26728 (add_pseudo_to_slot, lra_spill): Likewise.
26729 * omp-low.c (omp_clause_aligned_alignment): Likewise.
26730 * optabs-query.c (get_best_extraction_insn): Likewise.
26731 * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
26732 * optabs.c (expand_vec_perm_var, expand_vec_cond_expr): Likewise.
26733 (expand_mult_highpart, valid_multiword_target_p): Likewise.
26734 * recog.c (offsettable_address_addr_space_p): Likewise.
26735 * regcprop.c (maybe_mode_change): Likewise.
26736 * reginfo.c (choose_hard_reg_mode, record_subregs_of_mode): Likewise.
26737 * regrename.c (build_def_use): Likewise.
26738 * regstat.c (dump_reg_info): Likewise.
26739 * reload.c (complex_word_subreg_p, push_reload, find_dummy_reload)
26740 (find_reloads, find_reloads_subreg_address): Likewise.
26741 * reload1.c (eliminate_regs_1): Likewise.
26742 * rtlanal.c (for_each_inc_dec_find_inc_dec, rtx_cost): Likewise.
26743 * simplify-rtx.c (avoid_constant_pool_reference): Likewise.
26744 (simplify_binary_operation_1, simplify_subreg): Likewise.
26745 * targhooks.c (default_function_arg_padding): Likewise.
26746 (default_hard_regno_nregs, default_class_max_nregs): Likewise.
26747 * tree-cfg.c (verify_gimple_assign_binary): Likewise.
26748 (verify_gimple_assign_ternary): Likewise.
26749 * tree-inline.c (estimate_move_cost): Likewise.
26750 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
26751 * tree-ssa-loop-ivopts.c (add_autoinc_candidates): Likewise.
26752 (get_address_cost_ainc): Likewise.
26753 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Likewise.
26754 (vect_supportable_dr_alignment): Likewise.
26755 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
26756 (vectorizable_reduction): Likewise.
26757 * tree-vect-stmts.c (vectorizable_assignment, vectorizable_shift)
26758 (vectorizable_operation, vectorizable_load): Likewise.
26759 * tree.c (build_same_sized_truth_vector_type): Likewise.
26760 * valtrack.c (cleanup_auto_inc_dec): Likewise.
26761 * var-tracking.c (emit_note_insn_var_location): Likewise.
26762 * config/arc/arc.h (ASM_OUTPUT_CASE_END): Use as_a <scalar_int_mode>.
26763 (ADDR_VEC_ALIGN): Likewise.
26765 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
26766 Alan Hayward <alan.hayward@arm.com>
26767 David Sherwood <david.sherwood@arm.com>
26769 * machmode.h (mode_to_bits): Return a poly_uint16 rather than an
26771 (GET_MODE_BITSIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
26772 or if measurement_type is polynomial.
26773 * calls.c (shift_return_value): Treat GET_MODE_BITSIZE as polynomial.
26774 * combine.c (make_extraction): Likewise.
26775 * dse.c (find_shift_sequence): Likewise.
26776 * dwarf2out.c (mem_loc_descriptor): Likewise.
26777 * expmed.c (store_integral_bit_field, extract_bit_field_1): Likewise.
26778 (extract_bit_field, extract_low_bits): Likewise.
26779 * expr.c (convert_move, convert_modes, emit_move_insn_1): Likewise.
26780 (optimize_bitfield_assignment_op, expand_assignment): Likewise.
26781 (store_expr_with_bounds, store_field, expand_expr_real_1): Likewise.
26782 * fold-const.c (optimize_bit_field_compare, merge_ranges): Likewise.
26783 * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
26784 * reload.c (find_reloads): Likewise.
26785 * reload1.c (alter_reg): Likewise.
26786 * stor-layout.c (bitwise_mode_for_mode, compute_record_mode): Likewise.
26787 * targhooks.c (default_secondary_memory_needed_mode): Likewise.
26788 * tree-if-conv.c (predicate_mem_writes): Likewise.
26789 * tree-ssa-strlen.c (handle_builtin_memcmp): Likewise.
26790 * tree-vect-patterns.c (adjust_bool_pattern): Likewise.
26791 * tree-vect-stmts.c (vectorizable_simd_clone_call): Likewise.
26792 * valtrack.c (dead_debug_insert_temp): Likewise.
26793 * varasm.c (mergeable_constant_section): Likewise.
26794 * config/sh/sh.h (LOCAL_ALIGNMENT): Use as_a <fixed_size_mode>.
26796 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
26797 Alan Hayward <alan.hayward@arm.com>
26798 David Sherwood <david.sherwood@arm.com>
26800 * expr.c (expand_assignment): Cope with polynomial mode sizes
26801 when assigning to a CONCAT.
26803 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
26804 Alan Hayward <alan.hayward@arm.com>
26805 David Sherwood <david.sherwood@arm.com>
26807 * machmode.h (mode_precision): Change from unsigned short to
26809 (mode_to_precision): Return a poly_uint16 rather than an unsigned
26811 (GET_MODE_PRECISION): Return a constant if ONLY_FIXED_SIZE_MODES,
26812 or if measurement_type is not polynomial.
26813 (HWI_COMPUTABLE_MODE_P): Turn into a function. Optimize the case
26814 in which the mode is already known to be a scalar_int_mode.
26815 * genmodes.c (emit_mode_precision): Change the type of mode_precision
26816 from unsigned short to poly_uint16_pod. Use ZERO_COEFFS for the
26818 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
26819 for GET_MODE_PRECISION.
26820 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
26821 for GET_MODE_PRECISION.
26822 * combine.c (update_rsp_from_reg_equal): Treat GET_MODE_PRECISION
26824 (try_combine, find_split_point, combine_simplify_rtx): Likewise.
26825 (expand_field_assignment, make_extraction): Likewise.
26826 (make_compound_operation_int, record_dead_and_set_regs_1): Likewise.
26827 (get_last_value): Likewise.
26828 * convert.c (convert_to_integer_1): Likewise.
26829 * cse.c (cse_insn): Likewise.
26830 * expr.c (expand_expr_real_1): Likewise.
26831 * lra-constraints.c (simplify_operand_subreg): Likewise.
26832 * optabs-query.c (can_atomic_load_p): Likewise.
26833 * optabs.c (expand_atomic_load): Likewise.
26834 (expand_atomic_store): Likewise.
26835 * ree.c (combine_reaching_defs): Likewise.
26836 * rtl.h (partial_subreg_p, paradoxical_subreg_p): Likewise.
26837 * rtlanal.c (nonzero_bits1, lsb_bitfield_op_p): Likewise.
26838 * tree.h (type_has_mode_precision_p): Likewise.
26839 * ubsan.c (instrument_si_overflow): Likewise.
26841 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
26842 Alan Hayward <alan.hayward@arm.com>
26843 David Sherwood <david.sherwood@arm.com>
26845 * tree.h (TYPE_VECTOR_SUBPARTS): Turn into a function and handle
26846 polynomial numbers of units.
26847 (SET_TYPE_VECTOR_SUBPARTS): Likewise.
26848 (valid_vector_subparts_p): New function.
26849 (build_vector_type): Remove temporary shim and take the number
26850 of units as a poly_uint64 rather than an int.
26851 (build_opaque_vector_type): Take the number of units as a
26852 poly_uint64 rather than an int.
26853 * tree.c (build_vector_from_ctor): Handle polynomial
26854 TYPE_VECTOR_SUBPARTS.
26855 (type_hash_canon_hash, type_cache_hasher::equal): Likewise.
26856 (uniform_vector_p, vector_type_mode, build_vector): Likewise.
26857 (build_vector_from_val): If the number of units is variable,
26858 use build_vec_duplicate_cst for constant operands and
26859 VEC_DUPLICATE_EXPR otherwise.
26860 (make_vector_type): Remove temporary is_constant ().
26861 (build_vector_type, build_opaque_vector_type): Take the number of
26862 units as a poly_uint64 rather than an int.
26863 (check_vector_cst): Handle polynomial TYPE_VECTOR_SUBPARTS and
26865 * cfgexpand.c (expand_debug_expr): Likewise.
26866 * expr.c (count_type_elements, categorize_ctor_elements_1): Likewise.
26867 (store_constructor, expand_expr_real_1): Likewise.
26868 (const_scalar_mask_from_tree): Likewise.
26869 * fold-const-call.c (fold_const_reduction): Likewise.
26870 * fold-const.c (const_binop, const_unop, fold_convert_const): Likewise.
26871 (operand_equal_p, fold_vec_perm, fold_ternary_loc): Likewise.
26872 (native_encode_vector, vec_cst_ctor_to_array): Likewise.
26873 (fold_relational_const): Likewise.
26874 (native_interpret_vector): Likewise. Change the size from an
26875 int to an unsigned int.
26876 * gimple-fold.c (gimple_fold_stmt_to_constant_1): Handle polynomial
26877 TYPE_VECTOR_SUBPARTS.
26878 (gimple_fold_indirect_ref, gimple_build_vector): Likewise.
26879 (gimple_build_vector_from_val): Use VEC_DUPLICATE_EXPR when
26880 duplicating a non-constant operand into a variable-length vector.
26881 * hsa-brig.c (hsa_op_immed::emit_to_buffer): Handle polynomial
26882 TYPE_VECTOR_SUBPARTS and VECTOR_CST_NELTS.
26883 * ipa-icf.c (sem_variable::equals): Likewise.
26884 * match.pd: Likewise.
26885 * omp-simd-clone.c (simd_clone_subparts): Likewise.
26886 * print-tree.c (print_node): Likewise.
26887 * stor-layout.c (layout_type): Likewise.
26888 * targhooks.c (default_builtin_vectorization_cost): Likewise.
26889 * tree-cfg.c (verify_gimple_comparison): Likewise.
26890 (verify_gimple_assign_binary): Likewise.
26891 (verify_gimple_assign_ternary): Likewise.
26892 (verify_gimple_assign_single): Likewise.
26893 * tree-pretty-print.c (dump_generic_node): Likewise.
26894 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
26895 (simplify_bitfield_ref, is_combined_permutation_identity): Likewise.
26896 * tree-vect-data-refs.c (vect_permute_store_chain): Likewise.
26897 (vect_grouped_load_supported, vect_permute_load_chain): Likewise.
26898 (vect_shift_permute_load_chain): Likewise.
26899 * tree-vect-generic.c (nunits_for_known_piecewise_op): Likewise.
26900 (expand_vector_condition, optimize_vector_constructor): Likewise.
26901 (lower_vec_perm, get_compute_type): Likewise.
26902 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
26903 (get_initial_defs_for_reduction, vect_transform_loop): Likewise.
26904 * tree-vect-patterns.c (vect_recog_bool_pattern): Likewise.
26905 (vect_recog_mask_conversion_pattern): Likewise.
26906 * tree-vect-slp.c (vect_supported_load_permutation_p): Likewise.
26907 (vect_get_constant_vectors, vect_transform_slp_perm_load): Likewise.
26908 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
26909 (get_group_load_store_type, vectorizable_mask_load_store): Likewise.
26910 (vectorizable_bswap, simd_clone_subparts, vectorizable_assignment)
26911 (vectorizable_shift, vectorizable_operation, vectorizable_store)
26912 (vectorizable_load, vect_is_simple_cond, vectorizable_comparison)
26913 (supportable_widening_operation): Likewise.
26914 (supportable_narrowing_operation): Likewise.
26915 * tree-vector-builder.c (tree_vector_builder::binary_encoded_nelts):
26917 * varasm.c (output_constant): Likewise.
26919 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
26920 Alan Hayward <alan.hayward@arm.com>
26921 David Sherwood <david.sherwood@arm.com>
26923 * tree-vect-data-refs.c (vect_permute_store_chain): Reorganize
26924 so that both the length == 3 and length != 3 cases set up their
26925 own permute vectors. Add comments explaining why we know the
26926 number of elements is constant.
26927 (vect_permute_load_chain): Likewise.
26929 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
26930 Alan Hayward <alan.hayward@arm.com>
26931 David Sherwood <david.sherwood@arm.com>
26933 * machmode.h (mode_nunits): Change from unsigned char to
26935 (ONLY_FIXED_SIZE_MODES): New macro.
26936 (pod_mode::measurement_type, scalar_int_mode::measurement_type)
26937 (scalar_float_mode::measurement_type, scalar_mode::measurement_type)
26938 (complex_mode::measurement_type, fixed_size_mode::measurement_type):
26940 (mode_to_nunits): Return a poly_uint16 rather than an unsigned short.
26941 (GET_MODE_NUNITS): Return a constant if ONLY_FIXED_SIZE_MODES,
26942 or if measurement_type is not polynomial.
26943 * genmodes.c (ZERO_COEFFS): New macro.
26944 (emit_mode_nunits_inline): Make mode_nunits_inline return a
26946 (emit_mode_nunits): Change the type of mode_nunits to poly_uint16_pod.
26947 Use ZERO_COEFFS when emitting initializers.
26948 * data-streamer.h (bp_pack_poly_value): New function.
26949 (bp_unpack_poly_value): Likewise.
26950 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
26951 for GET_MODE_NUNITS.
26952 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
26953 for GET_MODE_NUNITS.
26954 * tree.c (make_vector_type): Remove temporary shim and make
26955 the real function take the number of units as a poly_uint64
26956 rather than an int.
26957 (build_vector_type_for_mode): Handle polynomial nunits.
26958 * dwarf2out.c (loc_descriptor, add_const_value_attribute): Likewise.
26959 * emit-rtl.c (const_vec_series_p_1): Likewise.
26960 (gen_rtx_CONST_VECTOR): Likewise.
26961 * fold-const.c (test_vec_duplicate_folding): Likewise.
26962 * genrecog.c (validate_pattern): Likewise.
26963 * optabs-query.c (can_vec_perm_var_p, can_mult_highpart_p): Likewise.
26964 * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
26965 * optabs.c (expand_vector_broadcast, expand_binop_directly): Likewise.
26966 (shift_amt_for_vec_perm_mask, expand_vec_perm_var): Likewise.
26967 (expand_vec_cond_expr, expand_mult_highpart): Likewise.
26968 * rtlanal.c (subreg_get_info): Likewise.
26969 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
26970 (vect_grouped_load_supported): Likewise.
26971 * tree-vect-generic.c (type_for_widest_vector_mode): Likewise.
26972 * tree-vect-loop.c (have_whole_vector_shift): Likewise.
26973 * simplify-rtx.c (simplify_unary_operation_1): Likewise.
26974 (simplify_const_unary_operation, simplify_binary_operation_1)
26975 (simplify_const_binary_operation, simplify_ternary_operation)
26976 (test_vector_ops_duplicate, test_vector_ops): Likewise.
26977 (simplify_immed_subreg): Use GET_MODE_NUNITS on a fixed_size_mode
26978 instead of CONST_VECTOR_NUNITS.
26979 * varasm.c (output_constant_pool_2): Likewise.
26980 * rtx-vector-builder.c (rtx_vector_builder::build): Only include the
26981 explicit-encoded elements in the XVEC for variable-length vectors.
26983 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
26985 * lra-constraints.c (curr_insn_transform): Use partial_subreg_p.
26987 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
26988 Alan Hayward <alan.hayward@arm.com>
26989 David Sherwood <david.sherwood@arm.com>
26991 * coretypes.h (fixed_size_mode): Declare.
26992 (fixed_size_mode_pod): New typedef.
26993 * builtins.h (target_builtins::x_apply_args_mode)
26994 (target_builtins::x_apply_result_mode): Change type to
26995 fixed_size_mode_pod.
26996 * builtins.c (apply_args_size, apply_result_size, result_vector)
26997 (expand_builtin_apply_args_1, expand_builtin_apply)
26998 (expand_builtin_return): Update accordingly.
27000 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27002 * cse.c (hash_rtx_cb): Hash only the encoded elements.
27003 * cselib.c (cselib_hash_rtx): Likewise.
27004 * expmed.c (make_tree): Build VECTOR_CSTs directly from the
27005 CONST_VECTOR encoding.
27007 2018-01-03 Jakub Jelinek <jakub@redhat.com>
27008 Jeff Law <law@redhat.com>
27011 * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): For
27012 noreturn probe, use gen_pop instead of ix86_emit_restore_reg_using_pop,
27013 only set RTX_FRAME_RELATED_P on both the push and pop if cfa_reg is sp
27014 and add REG_CFA_ADJUST_CFA notes in that case to both insns.
27017 * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): Do not
27018 explicitly probe *sp in a noreturn function if there were any callee
27019 register saves or frame pointer is needed.
27021 2018-01-03 Jakub Jelinek <jakub@redhat.com>
27024 * cfgexpand.c (expand_debug_expr): Return NULL if mode is
27025 BLKmode for ternary, binary or unary expressions.
27028 * var-tracking.c (delete_vta_debug_insn): New inline function.
27029 (delete_vta_debug_insns): Add USE_CFG argument, if true, walk just
27030 insns from get_insns () to NULL instead of each bb separately.
27031 Use delete_vta_debug_insn. No longer static.
27032 (vt_debug_insns_local, variable_tracking_main_1): Adjust
27033 delete_vta_debug_insns callers.
27034 * rtl.h (delete_vta_debug_insns): Declare.
27035 * final.c (rest_of_handle_final): Call delete_vta_debug_insns
27036 instead of variable_tracking_main.
27038 2018-01-03 Martin Sebor <msebor@redhat.com>
27040 PR tree-optimization/83603
27041 * calls.c (maybe_warn_nonstring_arg): Avoid accessing function
27042 arguments past the endof the argument list in functions declared
27043 without a prototype.
27044 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call):
27045 Avoid checking when arguments are null.
27047 2018-01-03 Martin Sebor <msebor@redhat.com>
27050 * doc/extend.texi (attribute const): Fix a typo.
27051 * ipa-pure-const.c ((warn_function_const, warn_function_pure): Avoid
27052 issuing -Wsuggest-attribute for void functions.
27054 2018-01-03 Martin Sebor <msebor@redhat.com>
27056 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Use
27057 offset_int::from instead of wide_int::to_shwi.
27058 (maybe_diag_overlap): Remove assertion.
27059 Use HOST_WIDE_INT_PRINT_DEC instead of %lli.
27060 * gimple-ssa-sprintf.c (format_directive): Same.
27061 (parse_directive): Same.
27062 (sprintf_dom_walker::compute_format_length): Same.
27063 (try_substitute_return_value): Same.
27065 2018-01-03 Jeff Law <law@redhat.com>
27067 PR middle-end/83654
27068 * explow.c (anti_adjust_stack_and_probe_stack_clash): Test a
27069 non-constant residual for zero at runtime and avoid probing in
27070 that case. Reorganize code for trailing problem to mirror handling
27073 2018-01-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
27075 PR tree-optimization/83501
27076 * tree-ssa-strlen.c (get_string_cst): New.
27077 (handle_char_store): Call get_string_cst.
27079 2018-01-03 Martin Liska <mliska@suse.cz>
27081 PR tree-optimization/83593
27082 * tree-ssa-strlen.c: Include tree-cfg.h.
27083 (strlen_check_and_optimize_stmt): Add new argument cleanup_eh.
27084 (strlen_dom_walker): Add new member variable m_cleanup_cfg.
27085 (strlen_dom_walker::strlen_dom_walker): Initialize m_cleanup_cfg
27087 (strlen_dom_walker::before_dom_children): Call
27088 gimple_purge_dead_eh_edges. Dump tranformation with details
27090 (strlen_dom_walker::before_dom_children): Update call by adding
27091 new argument cleanup_eh.
27092 (pass_strlen::execute): Return TODO_cleanup_cfg if needed.
27094 2018-01-03 Martin Liska <mliska@suse.cz>
27097 * cif-code.def (VARIADIC_THUNK): New enum value.
27098 * ipa-fnsummary.c (compute_fn_summary): Do not inline variadic
27101 2018-01-03 Jan Beulich <jbeulich@suse.com>
27103 * sse.md (mov<mode>_internal): Tighten condition for when to use
27104 vmovdqu<ssescalarsize> for TI and OI modes.
27106 2018-01-03 Jakub Jelinek <jakub@redhat.com>
27108 Update copyright years.
27110 2018-01-03 Martin Liska <mliska@suse.cz>
27113 * ipa-visibility.c (function_and_variable_visibility): Skip
27114 functions with noipa attribure.
27116 2018-01-03 Jakub Jelinek <jakub@redhat.com>
27118 * gcc.c (process_command): Update copyright notice dates.
27119 * gcov-dump.c (print_version): Ditto.
27120 * gcov.c (print_version): Ditto.
27121 * gcov-tool.c (print_version): Ditto.
27122 * gengtype.c (create_file): Ditto.
27123 * doc/cpp.texi: Bump @copying's copyright year.
27124 * doc/cppinternals.texi: Ditto.
27125 * doc/gcc.texi: Ditto.
27126 * doc/gccint.texi: Ditto.
27127 * doc/gcov.texi: Ditto.
27128 * doc/install.texi: Ditto.
27129 * doc/invoke.texi: Ditto.
27131 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27133 * vector-builder.h (vector_builder::m_full_nelts): Change from
27134 unsigned int to poly_uint64.
27135 (vector_builder::full_nelts): Update prototype accordingly.
27136 (vector_builder::new_vector): Likewise.
27137 (vector_builder::encoded_full_vector_p): Handle polynomial full_nelts.
27138 (vector_builder::operator ==): Likewise.
27139 (vector_builder::finalize): Likewise.
27140 * int-vector-builder.h (int_vector_builder::int_vector_builder):
27141 Take the number of elements as a poly_uint64 rather than an
27143 * vec-perm-indices.h (vec_perm_indices::m_nelts_per_input): Change
27144 from unsigned int to poly_uint64.
27145 (vec_perm_indices::vec_perm_indices): Update prototype accordingly.
27146 (vec_perm_indices::new_vector): Likewise.
27147 (vec_perm_indices::length): Likewise.
27148 (vec_perm_indices::nelts_per_input): Likewise.
27149 (vec_perm_indices::input_nelts): Likewise.
27150 * vec-perm-indices.c (vec_perm_indices::new_vector): Take the
27151 number of elements per input as a poly_uint64 rather than an
27152 unsigned int. Use the original encoding for variable-length
27153 vectors, rather than clamping each individual element.
27154 For the second and subsequent elements in each pattern,
27155 clamp the step and base before clamping their sum.
27156 (vec_perm_indices::series_p): Handle polynomial element counts.
27157 (vec_perm_indices::all_in_range_p): Likewise.
27158 (vec_perm_indices_to_tree): Likewise.
27159 (vec_perm_indices_to_rtx): Likewise.
27160 * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise.
27161 * tree-vector-builder.c (tree_vector_builder::new_unary_operation)
27162 (tree_vector_builder::new_binary_operation): Handle polynomial
27163 element counts. Return false if we need to know the number
27164 of elements at compile time.
27165 * fold-const.c (fold_vec_perm): Punt if the number of elements
27166 isn't known at compile time.
27168 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27170 * vec-perm-indices.h (vec_perm_builder): Change element type
27171 from HOST_WIDE_INT to poly_int64.
27172 (vec_perm_indices::element_type): Update accordingly.
27173 (vec_perm_indices::clamp): Handle polynomial element_types.
27174 * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
27175 (vec_perm_indices::all_in_range_p): Likewise.
27176 (tree_to_vec_perm_builder): Check for poly_int64 trees rather
27178 * vector-builder.h (vector_builder::stepped_sequence_p): Handle
27179 polynomial vec_perm_indices element types.
27180 * int-vector-builder.h (int_vector_builder::equal_p): Likewise.
27181 * fold-const.c (fold_vec_perm): Likewise.
27182 * optabs.c (shift_amt_for_vec_perm_mask): Likewise.
27183 * tree-vect-generic.c (lower_vec_perm): Likewise.
27184 * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
27185 * config/aarch64/aarch64.c (aarch64_evpc_tbl): Cast d->perm
27186 element type to HOST_WIDE_INT.
27188 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27189 Alan Hayward <alan.hayward@arm.com>
27190 David Sherwood <david.sherwood@arm.com>
27192 * alias.c (addr_side_effect_eval): Take the size as a poly_int64
27193 rather than an int. Use plus_constant.
27194 (memrefs_conflict_p): Take the sizes as poly_int64s rather than ints.
27195 Take the offset "c" as a poly_int64 rather than a HOST_WIDE_INT.
27197 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27198 Alan Hayward <alan.hayward@arm.com>
27199 David Sherwood <david.sherwood@arm.com>
27201 * calls.c (emit_call_1, expand_call): Change struct_value_size from
27202 a HOST_WIDE_INT to a poly_int64.
27204 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27205 Alan Hayward <alan.hayward@arm.com>
27206 David Sherwood <david.sherwood@arm.com>
27208 * calls.c (load_register_parameters): Cope with polynomial
27209 mode sizes. Require a constant size for BLKmode parameters
27210 that aren't described by a PARALLEL. If BLOCK_REG_PADDING
27211 forces a parameter to be padded at the lsb end in order to
27212 fill a complete number of words, require the parameter size
27213 to be ordered wrt UNITS_PER_WORD.
27215 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27216 Alan Hayward <alan.hayward@arm.com>
27217 David Sherwood <david.sherwood@arm.com>
27219 * reload1.c (spill_stack_slot_width): Change element type
27220 from unsigned int to poly_uint64_pod.
27221 (alter_reg): Treat mode sizes as polynomial.
27223 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27224 Alan Hayward <alan.hayward@arm.com>
27225 David Sherwood <david.sherwood@arm.com>
27227 * reload.c (complex_word_subreg_p): New function.
27228 (reload_inner_reg_of_subreg, push_reload): Use it.
27230 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27231 Alan Hayward <alan.hayward@arm.com>
27232 David Sherwood <david.sherwood@arm.com>
27234 * lra-constraints.c (process_alt_operands): Reject matched
27235 operands whose sizes aren't ordered.
27236 (match_reload): Refer to this check here.
27238 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27239 Alan Hayward <alan.hayward@arm.com>
27240 David Sherwood <david.sherwood@arm.com>
27242 * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Assert
27243 that the mode size is in the set {1, 2, 4, 8, 16}.
27245 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27246 Alan Hayward <alan.hayward@arm.com>
27247 David Sherwood <david.sherwood@arm.com>
27249 * var-tracking.c (adjust_mems): Treat mode sizes as polynomial.
27250 Use plus_constant instead of gen_rtx_PLUS.
27252 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27253 Alan Hayward <alan.hayward@arm.com>
27254 David Sherwood <david.sherwood@arm.com>
27256 * config/cr16/cr16-protos.h (cr16_push_rounding): Declare.
27257 * config/cr16/cr16.h (PUSH_ROUNDING): Move implementation to...
27258 * config/cr16/cr16.c (cr16_push_rounding): ...this new function.
27259 * config/h8300/h8300-protos.h (h8300_push_rounding): Declare.
27260 * config/h8300/h8300.h (PUSH_ROUNDING): Move implementation to...
27261 * config/h8300/h8300.c (h8300_push_rounding): ...this new function.
27262 * config/i386/i386-protos.h (ix86_push_rounding): Declare.
27263 * config/i386/i386.h (PUSH_ROUNDING): Move implementation to...
27264 * config/i386/i386.c (ix86_push_rounding): ...this new function.
27265 * config/m32c/m32c-protos.h (m32c_push_rounding): Take and return
27267 * config/m32c/m32c.c (m32c_push_rounding): Likewise.
27268 * config/m68k/m68k-protos.h (m68k_push_rounding): Declare.
27269 * config/m68k/m68k.h (PUSH_ROUNDING): Move implementation to...
27270 * config/m68k/m68k.c (m68k_push_rounding): ...this new function.
27271 * config/pdp11/pdp11-protos.h (pdp11_push_rounding): Declare.
27272 * config/pdp11/pdp11.h (PUSH_ROUNDING): Move implementation to...
27273 * config/pdp11/pdp11.c (pdp11_push_rounding): ...this new function.
27274 * config/stormy16/stormy16-protos.h (xstormy16_push_rounding): Declare.
27275 * config/stormy16/stormy16.h (PUSH_ROUNDING): Move implementation to...
27276 * config/stormy16/stormy16.c (xstormy16_push_rounding): ...this new
27278 * expr.c (emit_move_resolve_push): Treat the input and result
27279 of PUSH_ROUNDING as a poly_int64.
27280 (emit_move_complex_push, emit_single_push_insn_1): Likewise.
27281 (emit_push_insn): Likewise.
27282 * lra-eliminations.c (mark_not_eliminable): Likewise.
27283 * recog.c (push_operand): Likewise.
27284 * reload1.c (elimination_effects): Likewise.
27285 * rtlanal.c (nonzero_bits1): Likewise.
27286 * calls.c (store_one_arg): Likewise. Require the padding to be
27287 known at compile time.
27289 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27290 Alan Hayward <alan.hayward@arm.com>
27291 David Sherwood <david.sherwood@arm.com>
27293 * expr.c (emit_single_push_insn_1): Treat mode sizes as polynomial.
27294 Use plus_constant instead of gen_rtx_PLUS.
27296 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27297 Alan Hayward <alan.hayward@arm.com>
27298 David Sherwood <david.sherwood@arm.com>
27300 * auto-inc-dec.c (set_inc_state): Take the mode size as a poly_int64
27301 rather than an int.
27303 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27304 Alan Hayward <alan.hayward@arm.com>
27305 David Sherwood <david.sherwood@arm.com>
27307 * expr.c (expand_expr_real_1): Use tree_to_poly_uint64
27308 instead of int_size_in_bytes when handling VIEW_CONVERT_EXPRs
27309 via stack temporaries. Treat the mode size as polynomial too.
27311 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27312 Alan Hayward <alan.hayward@arm.com>
27313 David Sherwood <david.sherwood@arm.com>
27315 * expr.c (expand_expr_real_2): When handling conversions involving
27316 unions, apply tree_to_poly_uint64 to the TYPE_SIZE rather than
27317 multiplying int_size_in_bytes by BITS_PER_UNIT. Treat GET_MODE_BISIZE
27318 as a poly_uint64 too.
27320 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27321 Alan Hayward <alan.hayward@arm.com>
27322 David Sherwood <david.sherwood@arm.com>
27324 * rtlanal.c (subreg_get_info): Handle polynomial mode sizes.
27326 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27327 Alan Hayward <alan.hayward@arm.com>
27328 David Sherwood <david.sherwood@arm.com>
27330 * combine.c (can_change_dest_mode): Handle polynomial
27331 REGMODE_NATURAL_SIZE.
27332 * expmed.c (store_bit_field_1): Likewise.
27333 * expr.c (store_constructor): Likewise.
27334 * emit-rtl.c (validate_subreg): Operate on polynomial mode sizes
27335 and polynomial REGMODE_NATURAL_SIZE.
27336 (gen_lowpart_common): Likewise.
27337 * reginfo.c (record_subregs_of_mode): Likewise.
27338 * rtlanal.c (read_modify_subreg_p): Likewise.
27340 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27341 Alan Hayward <alan.hayward@arm.com>
27342 David Sherwood <david.sherwood@arm.com>
27344 * internal-fn.c (expand_vector_ubsan_overflow): Handle polynomial
27345 numbers of elements.
27347 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27348 Alan Hayward <alan.hayward@arm.com>
27349 David Sherwood <david.sherwood@arm.com>
27351 * match.pd: Cope with polynomial numbers of vector elements.
27353 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27354 Alan Hayward <alan.hayward@arm.com>
27355 David Sherwood <david.sherwood@arm.com>
27357 * fold-const.c (fold_indirect_ref_1): Handle polynomial offsets
27358 in a POINTER_PLUS_EXPR.
27360 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27361 Alan Hayward <alan.hayward@arm.com>
27362 David Sherwood <david.sherwood@arm.com>
27364 * omp-simd-clone.c (simd_clone_subparts): New function.
27365 (simd_clone_init_simd_arrays): Use it instead of TYPE_VECTOR_SUBPARTS.
27366 (ipa_simd_modify_function_body): Likewise.
27368 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27369 Alan Hayward <alan.hayward@arm.com>
27370 David Sherwood <david.sherwood@arm.com>
27372 * tree-vect-generic.c (nunits_for_known_piecewise_op): New function.
27373 (expand_vector_piecewise): Use it instead of TYPE_VECTOR_SUBPARTS.
27374 (expand_vector_addition, add_rshift, expand_vector_divmod): Likewise.
27375 (expand_vector_condition, vector_element): Likewise.
27376 (subparts_gt): New function.
27377 (get_compute_type): Use subparts_gt.
27378 (count_type_subparts): Delete.
27379 (expand_vector_operations_1): Use subparts_gt instead of
27380 count_type_subparts.
27382 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27383 Alan Hayward <alan.hayward@arm.com>
27384 David Sherwood <david.sherwood@arm.com>
27386 * tree-vect-data-refs.c (vect_no_alias_p): Replace with...
27387 (vect_compile_time_alias): ...this new function. Do the calculation
27388 on poly_ints rather than trees.
27389 (vect_prune_runtime_alias_test_list): Update call accordingly.
27391 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27392 Alan Hayward <alan.hayward@arm.com>
27393 David Sherwood <david.sherwood@arm.com>
27395 * tree-vect-slp.c (vect_build_slp_tree_1): Handle polynomial
27397 (vect_schedule_slp_instance): Likewise.
27399 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27400 Alan Hayward <alan.hayward@arm.com>
27401 David Sherwood <david.sherwood@arm.com>
27403 * tree-vect-slp.c (vect_get_and_check_slp_defs): Reject
27404 constant and extern definitions for variable-length vectors.
27405 (vect_get_constant_vectors): Note that the number of units
27406 is known to be constant.
27408 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27409 Alan Hayward <alan.hayward@arm.com>
27410 David Sherwood <david.sherwood@arm.com>
27412 * tree-vect-stmts.c (vectorizable_conversion): Treat the number
27413 of units as polynomial. Choose between WIDE and NARROW based
27416 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27417 Alan Hayward <alan.hayward@arm.com>
27418 David Sherwood <david.sherwood@arm.com>
27420 * tree-vect-stmts.c (simd_clone_subparts): New function.
27421 (vectorizable_simd_clone_call): Use it instead of TYPE_VECTOR_SUBPARTS.
27423 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27424 Alan Hayward <alan.hayward@arm.com>
27425 David Sherwood <david.sherwood@arm.com>
27427 * tree-vect-stmts.c (vectorizable_call): Treat the number of
27428 vectors as polynomial. Use build_index_vector for
27429 IFN_GOMP_SIMD_LANE.
27431 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27432 Alan Hayward <alan.hayward@arm.com>
27433 David Sherwood <david.sherwood@arm.com>
27435 * tree-vect-stmts.c (get_load_store_type): Treat the number of
27436 units as polynomial. Reject VMAT_ELEMENTWISE and VMAT_STRIDED_SLP
27437 for variable-length vectors.
27438 (vectorizable_mask_load_store): Treat the number of units as
27439 polynomial, asserting that it is constant if the condition has
27440 already been enforced.
27441 (vectorizable_store, vectorizable_load): Likewise.
27443 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27444 Alan Hayward <alan.hayward@arm.com>
27445 David Sherwood <david.sherwood@arm.com>
27447 * tree-vect-loop.c (vectorizable_live_operation): Treat the number
27448 of units as polynomial. Punt if we can't tell at compile time
27449 which vector contains the final result.
27451 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27452 Alan Hayward <alan.hayward@arm.com>
27453 David Sherwood <david.sherwood@arm.com>
27455 * tree-vect-loop.c (vectorizable_induction): Treat the number
27456 of units as polynomial. Punt on SLP inductions. Use an integer
27457 VEC_SERIES_EXPR for variable-length integer reductions. Use a
27458 cast of such a series for variable-length floating-point
27461 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27462 Alan Hayward <alan.hayward@arm.com>
27463 David Sherwood <david.sherwood@arm.com>
27465 * tree.h (build_index_vector): Declare.
27466 * tree.c (build_index_vector): New function.
27467 * tree-vect-loop.c (get_initial_defs_for_reduction): Treat the number
27468 of units as polynomial, forcibly converting it to a constant if
27469 vectorizable_reduction has already enforced the condition.
27470 (vect_create_epilog_for_reduction): Likewise. Use build_index_vector
27471 to create a {1,2,3,...} vector.
27472 (vectorizable_reduction): Treat the number of units as polynomial.
27473 Choose vectype_in based on the largest scalar element size rather
27474 than the smallest number of units. Enforce the restrictions
27477 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27478 Alan Hayward <alan.hayward@arm.com>
27479 David Sherwood <david.sherwood@arm.com>
27481 * tree-vect-data-refs.c (vector_alignment_reachable_p): Treat the
27482 number of units as polynomial.
27484 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27485 Alan Hayward <alan.hayward@arm.com>
27486 David Sherwood <david.sherwood@arm.com>
27488 * target.h (vector_sizes, auto_vector_sizes): New typedefs.
27489 * target.def (autovectorize_vector_sizes): Return the vector sizes
27490 by pointer, using vector_sizes rather than a bitmask.
27491 * targhooks.h (default_autovectorize_vector_sizes): Update accordingly.
27492 * targhooks.c (default_autovectorize_vector_sizes): Likewise.
27493 * config/aarch64/aarch64.c (aarch64_autovectorize_vector_sizes):
27495 * config/arc/arc.c (arc_autovectorize_vector_sizes): Likewise.
27496 * config/arm/arm.c (arm_autovectorize_vector_sizes): Likewise.
27497 * config/i386/i386.c (ix86_autovectorize_vector_sizes): Likewise.
27498 * config/mips/mips.c (mips_autovectorize_vector_sizes): Likewise.
27499 * omp-general.c (omp_max_vf): Likewise.
27500 * omp-low.c (omp_clause_aligned_alignment): Likewise.
27501 * optabs-query.c (can_vec_mask_load_store_p): Likewise.
27502 * tree-vect-loop.c (vect_analyze_loop): Likewise.
27503 * tree-vect-slp.c (vect_slp_bb): Likewise.
27504 * doc/tm.texi: Regenerate.
27505 * tree-vectorizer.h (current_vector_size): Change from an unsigned int
27507 * tree-vect-stmts.c (get_vectype_for_scalar_type_and_size): Take
27508 the vector size as a poly_uint64 rather than an unsigned int.
27509 (current_vector_size): Change from an unsigned int to a poly_uint64.
27510 (get_vectype_for_scalar_type): Update accordingly.
27511 * tree.h (build_truth_vector_type): Take the size and number of
27512 units as a poly_uint64 rather than an unsigned int.
27513 (build_vector_type): Add a temporary overload that takes
27514 the number of units as a poly_uint64 rather than an unsigned int.
27515 * tree.c (make_vector_type): Likewise.
27516 (build_truth_vector_type): Take the number of units as a poly_uint64
27517 rather than an unsigned int.
27519 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27520 Alan Hayward <alan.hayward@arm.com>
27521 David Sherwood <david.sherwood@arm.com>
27523 * target.def (get_mask_mode): Take the number of units and length
27524 as poly_uint64s rather than unsigned ints.
27525 * targhooks.h (default_get_mask_mode): Update accordingly.
27526 * targhooks.c (default_get_mask_mode): Likewise.
27527 * config/i386/i386.c (ix86_get_mask_mode): Likewise.
27528 * doc/tm.texi: Regenerate.
27530 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27531 Alan Hayward <alan.hayward@arm.com>
27532 David Sherwood <david.sherwood@arm.com>
27534 * omp-general.h (omp_max_vf): Return a poly_uint64 instead of an int.
27535 * omp-general.c (omp_max_vf): Likewise.
27536 * omp-expand.c (omp_adjust_chunk_size): Update call to omp_max_vf.
27537 (expand_omp_simd): Handle polynomial safelen.
27538 * omp-low.c (omplow_simd_context): Add a default constructor.
27539 (omplow_simd_context::max_vf): Change from int to poly_uint64.
27540 (lower_rec_simd_input_clauses): Update accordingly.
27541 (lower_rec_input_clauses): Likewise.
27543 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27544 Alan Hayward <alan.hayward@arm.com>
27545 David Sherwood <david.sherwood@arm.com>
27547 * tree-vectorizer.h (vect_nunits_for_cost): New function.
27548 * tree-vect-loop.c (vect_model_reduction_cost): Use it.
27549 * tree-vect-slp.c (vect_analyze_slp_cost_1): Likewise.
27550 (vect_analyze_slp_cost): Likewise.
27551 * tree-vect-stmts.c (vect_model_store_cost): Likewise.
27552 (vect_model_load_cost): Likewise.
27554 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27555 Alan Hayward <alan.hayward@arm.com>
27556 David Sherwood <david.sherwood@arm.com>
27558 * tree-vect-slp.c (vect_record_max_nunits, vect_build_slp_tree_1)
27559 (vect_build_slp_tree_2, vect_build_slp_tree): Change max_nunits
27560 from an unsigned int * to a poly_uint64_pod *.
27561 (calculate_unrolling_factor): New function.
27562 (vect_analyze_slp_instance): Use it. Track polynomial max_nunits.
27564 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27565 Alan Hayward <alan.hayward@arm.com>
27566 David Sherwood <david.sherwood@arm.com>
27568 * tree-vectorizer.h (_slp_instance::unrolling_factor): Change
27569 from an unsigned int to a poly_uint64.
27570 (_loop_vec_info::slp_unrolling_factor): Likewise.
27571 (_loop_vec_info::vectorization_factor): Change from an int
27573 (MAX_VECTORIZATION_FACTOR): Bump from 64 to INT_MAX.
27574 (vect_get_num_vectors): New function.
27575 (vect_update_max_nunits, vect_vf_for_cost): Likewise.
27576 (vect_get_num_copies): Use vect_get_num_vectors.
27577 (vect_analyze_data_ref_dependences): Change max_vf from an int *
27578 to an unsigned int *.
27579 (vect_analyze_data_refs): Change min_vf from an int * to a
27581 (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
27582 than an unsigned HOST_WIDE_INT.
27583 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
27584 (vect_analyze_data_ref_dependence): Change max_vf from an int *
27585 to an unsigned int *.
27586 (vect_analyze_data_ref_dependences): Likewise.
27587 (vect_compute_data_ref_alignment): Handle polynomial vf.
27588 (vect_enhance_data_refs_alignment): Likewise.
27589 (vect_prune_runtime_alias_test_list): Likewise.
27590 (vect_shift_permute_load_chain): Likewise.
27591 (vect_supportable_dr_alignment): Likewise.
27592 (dependence_distance_ge_vf): Take the vectorization factor as a
27593 poly_uint64 rather than an unsigned HOST_WIDE_INT.
27594 (vect_analyze_data_refs): Change min_vf from an int * to a
27596 * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Take
27597 vfm1 as a poly_uint64 rather than an int. Make the same change
27598 for the returned bound_scalar.
27599 (vect_gen_vector_loop_niters): Handle polynomial vf.
27600 (vect_do_peeling): Likewise. Update call to
27601 vect_gen_scalar_loop_niters and handle polynomial bound_scalars.
27602 (vect_gen_vector_loop_niters_mult_vf): Assert that the vf must
27604 * tree-vect-loop.c (vect_determine_vectorization_factor)
27605 (vect_update_vf_for_slp, vect_analyze_loop_2): Handle polynomial vf.
27606 (vect_get_known_peeling_cost): Likewise.
27607 (vect_estimate_min_profitable_iters, vectorizable_reduction): Likewise.
27608 (vect_worthwhile_without_simd_p, vectorizable_induction): Likewise.
27609 (vect_transform_loop): Likewise. Use the lowest possible VF when
27610 updating the upper bounds of the loop.
27611 (vect_min_worthwhile_factor): Make static. Return an unsigned int
27612 rather than an int.
27613 * tree-vect-slp.c (vect_attempt_slp_rearrange_stmts): Cope with
27614 polynomial unroll factors.
27615 (vect_analyze_slp_cost_1, vect_analyze_slp_instance): Likewise.
27616 (vect_make_slp_decision): Likewise.
27617 (vect_supported_load_permutation_p): Likewise, and polynomial
27619 (vect_analyze_slp_cost): Handle polynomial vf.
27620 (vect_slp_analyze_node_operations): Likewise.
27621 (vect_slp_analyze_bb_1): Likewise.
27622 (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
27623 than an unsigned HOST_WIDE_INT.
27624 * tree-vect-stmts.c (vectorizable_simd_clone_call, vectorizable_store)
27625 (vectorizable_load): Handle polynomial vf.
27626 * tree-vectorizer.c (simduid_to_vf::vf): Change from an int to
27628 (adjust_simduid_builtins, shrink_simd_arrays): Update accordingly.
27630 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27631 Alan Hayward <alan.hayward@arm.com>
27632 David Sherwood <david.sherwood@arm.com>
27634 * match.pd: Handle bit operations involving three constants
27635 and try to fold one pair.
27637 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27639 * tree-vect-loop-manip.c: Include gimple-fold.h.
27640 (slpeel_make_loop_iterate_ntimes): Add step, final_iv and
27641 niters_maybe_zero parameters. Handle other cases besides a step of 1.
27642 (vect_gen_vector_loop_niters): Add a step_vector_ptr parameter.
27643 Add a path that uses a step of VF instead of 1, but disable it
27645 (vect_do_peeling): Add step_vector, niters_vector_mult_vf_var
27646 and niters_no_overflow parameters. Update calls to
27647 slpeel_make_loop_iterate_ntimes and vect_gen_vector_loop_niters.
27648 Create a new SSA name if the latter choses to use a ste other
27649 than zero, and return it via niters_vector_mult_vf_var.
27650 * tree-vect-loop.c (vect_transform_loop): Update calls to
27651 vect_do_peeling, vect_gen_vector_loop_niters and
27652 slpeel_make_loop_iterate_ntimes.
27653 * tree-vectorizer.h (slpeel_make_loop_iterate_ntimes, vect_do_peeling)
27654 (vect_gen_vector_loop_niters): Update declarations after above changes.
27656 2018-01-02 Michael Meissner <meissner@linux.vnet.ibm.com>
27658 * config/rs6000/rs6000.md (floor<mode>2): Add support for IEEE
27659 128-bit round to integer instructions.
27660 (ceil<mode>2): Likewise.
27661 (btrunc<mode>2): Likewise.
27662 (round<mode>2): Likewise.
27664 2018-01-02 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
27666 * config/rs6000/rs6000-string.c (expand_block_move): Allow the use of
27667 unaligned VSX load/store on P8/P9.
27668 (expand_block_clear): Allow the use of unaligned VSX
27669 load/store on P8/P9.
27671 2018-01-02 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
27673 * config/rs6000/rs6000-p8swap.c (swap_feeds_both_load_and_store):
27675 (rs6000_analyze_swaps): Mark a web unoptimizable if it contains a
27676 swap associated with both a load and a store.
27678 2018-01-02 Andrew Waterman <andrew@sifive.com>
27680 * config/riscv/linux.h (ICACHE_FLUSH_FUNC): New.
27681 * config/riscv/riscv.md (clear_cache): Use it.
27683 2018-01-02 Artyom Skrobov <tyomitch@gmail.com>
27685 * web.c: Remove out-of-date comment.
27687 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
27689 * expr.c (fixup_args_size_notes): Check that any existing
27690 REG_ARGS_SIZE notes are correct, and don't try to re-add them.
27691 (emit_single_push_insn_1): Move stack_pointer_delta adjustment to...
27692 (emit_single_push_insn): ...here.
27694 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
27696 * rtl.h (CONST_VECTOR_ELT): Redefine to const_vector_elt.
27697 (const_vector_encoded_nelts): New function.
27698 (CONST_VECTOR_NUNITS): Redefine to use GET_MODE_NUNITS.
27699 (const_vector_int_elt, const_vector_elt): Declare.
27700 * emit-rtl.c (const_vector_int_elt_1): New function.
27701 (const_vector_elt): Likewise.
27702 * simplify-rtx.c (simplify_immed_subreg): Avoid taking the address
27703 of CONST_VECTOR_ELT.
27705 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
27707 * expr.c: Include rtx-vector-builder.h.
27708 (const_vector_mask_from_tree): Use rtx_vector_builder and operate
27709 directly on the tree encoding.
27710 (const_vector_from_tree): Likewise.
27711 * optabs.c: Include rtx-vector-builder.h.
27712 (expand_vec_perm_var): Use rtx_vector_builder and create a repeating
27713 sequence of "u" values.
27714 * vec-perm-indices.c: Include rtx-vector-builder.h.
27715 (vec_perm_indices_to_rtx): Use rtx_vector_builder and operate
27716 directly on the vec_perm_indices encoding.
27718 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
27720 * doc/rtl.texi (const_vector): Describe new encoding scheme.
27721 * Makefile.in (OBJS): Add rtx-vector-builder.o.
27722 * rtx-vector-builder.h: New file.
27723 * rtx-vector-builder.c: Likewise.
27724 * rtl.h (rtx_def::u2): Add a const_vector field.
27725 (CONST_VECTOR_NPATTERNS): New macro.
27726 (CONST_VECTOR_NELTS_PER_PATTERN): Likewise.
27727 (CONST_VECTOR_DUPLICATE_P): Likewise.
27728 (CONST_VECTOR_STEPPED_P): Likewise.
27729 (CONST_VECTOR_ENCODED_ELT): Likewise.
27730 (const_vec_duplicate_p): Check for a duplicated vector encoding.
27731 (unwrap_const_vec_duplicate): Likewise.
27732 (const_vec_series_p): Check for a non-duplicated vector encoding.
27733 Say that the function only returns true for integer vectors.
27734 * emit-rtl.c: Include rtx-vector-builder.h.
27735 (gen_const_vec_duplicate_1): Delete.
27736 (gen_const_vector): Call gen_const_vec_duplicate instead of
27737 gen_const_vec_duplicate_1.
27738 (const_vec_series_p_1): Operate directly on the CONST_VECTOR encoding.
27739 (gen_const_vec_duplicate): Use rtx_vector_builder.
27740 (gen_const_vec_series): Likewise.
27741 (gen_rtx_CONST_VECTOR): Likewise.
27742 * config/powerpcspe/powerpcspe.c: Include rtx-vector-builder.h.
27743 (swap_const_vector_halves): Take an rtx pointer rather than rtx.
27744 Build a new vector rather than modifying a CONST_VECTOR in-place.
27745 (handle_special_swappables): Update call accordingly.
27746 * config/rs6000/rs6000-p8swap.c: Include rtx-vector-builder.h.
27747 (swap_const_vector_halves): Take an rtx pointer rather than rtx.
27748 Build a new vector rather than modifying a CONST_VECTOR in-place.
27749 (handle_special_swappables): Update call accordingly.
27751 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
27753 * simplify-rtx.c (simplify_const_binary_operation): Use
27754 CONST_VECTOR_ELT instead of XVECEXP.
27756 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
27758 * tree-cfg.c (verify_gimple_assign_ternary): Allow the size of
27759 the selector elements to be different from the data elements
27760 if the selector is a VECTOR_CST.
27761 * tree-vect-stmts.c (vect_gen_perm_mask_any): Use a vector of
27762 ssizetype for the selector.
27764 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
27766 * optabs.c (shift_amt_for_vec_perm_mask): Try using series_p
27767 before testing each element individually.
27768 * tree-vect-generic.c (lower_vec_perm): Likewise.
27770 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
27772 * selftest.h (selftest::vec_perm_indices_c_tests): Declare.
27773 * selftest-run-tests.c (selftest::run_tests): Call it.
27774 * vector-builder.h (vector_builder::operator ==): New function.
27775 (vector_builder::operator !=): Likewise.
27776 * vec-perm-indices.h (vec_perm_indices::series_p): Declare.
27777 (vec_perm_indices::all_from_input_p): New function.
27778 * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
27779 (test_vec_perm_12, selftest::vec_perm_indices_c_tests): Likewise.
27780 * fold-const.c (fold_ternary_loc): Use tree_to_vec_perm_builder
27781 instead of reading the VECTOR_CST directly. Detect whether both
27782 vector inputs are the same before constructing the vec_perm_indices,
27783 and update the number of inputs argument accordingly. Use the
27784 utility functions added above. Only construct sel2 if we need to.
27786 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
27788 * optabs.c (expand_vec_perm_var): Use an explicit encoding for
27789 the broadcast of the low byte.
27790 (expand_mult_highpart): Use an explicit encoding for the permutes.
27791 * optabs-query.c (can_mult_highpart_p): Likewise.
27792 * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Likewise.
27793 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
27794 (vectorizable_bswap): Likewise.
27795 * tree-vect-data-refs.c (vect_grouped_store_supported): Use an
27796 explicit encoding for the power-of-2 permutes.
27797 (vect_permute_store_chain): Likewise.
27798 (vect_grouped_load_supported): Likewise.
27799 (vect_permute_load_chain): Likewise.
27801 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
27803 * vec-perm-indices.h (vec_perm_indices_to_tree): Declare.
27804 * vec-perm-indices.c (vec_perm_indices_to_tree): New function.
27805 * tree-ssa-forwprop.c (simplify_vector_constructor): Use it.
27806 * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
27807 * tree-vect-stmts.c (vectorizable_bswap): Likewise.
27808 (vect_gen_perm_mask_any): Likewise.
27810 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
27812 * int-vector-builder.h: New file.
27813 * vec-perm-indices.h: Include int-vector-builder.h.
27814 (vec_perm_indices): Redefine as an int_vector_builder.
27815 (auto_vec_perm_indices): Delete.
27816 (vec_perm_builder): Redefine as a stand-alone class.
27817 (vec_perm_indices::vec_perm_indices): New function.
27818 (vec_perm_indices::clamp): Likewise.
27819 * vec-perm-indices.c: Include fold-const.h and tree-vector-builder.h.
27820 (vec_perm_indices::new_vector): New function.
27821 (vec_perm_indices::new_expanded_vector): Update for new
27822 vec_perm_indices class.
27823 (vec_perm_indices::rotate_inputs): New function.
27824 (vec_perm_indices::all_in_range_p): Operate directly on the
27825 encoded form, without computing elided elements.
27826 (tree_to_vec_perm_builder): Operate directly on the VECTOR_CST
27827 encoding. Update for new vec_perm_indices class.
27828 * optabs.c (expand_vec_perm_const): Create a vec_perm_indices for
27829 the given vec_perm_builder.
27830 (expand_vec_perm_var): Update vec_perm_builder constructor.
27831 (expand_mult_highpart): Use vec_perm_builder instead of
27832 auto_vec_perm_indices.
27833 * optabs-query.c (can_mult_highpart_p): Use vec_perm_builder and
27834 vec_perm_indices instead of auto_vec_perm_indices. Use a single
27835 or double series encoding as appropriate.
27836 * fold-const.c (fold_ternary_loc): Use vec_perm_builder and
27837 vec_perm_indices instead of auto_vec_perm_indices.
27838 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
27839 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
27840 (vect_permute_store_chain): Likewise.
27841 (vect_grouped_load_supported): Likewise.
27842 (vect_permute_load_chain): Likewise.
27843 (vect_shift_permute_load_chain): Likewise.
27844 * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
27845 (vect_transform_slp_perm_load): Likewise.
27846 (vect_schedule_slp_instance): Likewise.
27847 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
27848 (vectorizable_mask_load_store): Likewise.
27849 (vectorizable_bswap): Likewise.
27850 (vectorizable_store): Likewise.
27851 (vectorizable_load): Likewise.
27852 * tree-vect-generic.c (lower_vec_perm): Use vec_perm_builder and
27853 vec_perm_indices instead of auto_vec_perm_indices. Use
27854 tree_to_vec_perm_builder to read the vector from a tree.
27855 * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Take a
27856 vec_perm_builder instead of a vec_perm_indices.
27857 (have_whole_vector_shift): Use vec_perm_builder and
27858 vec_perm_indices instead of auto_vec_perm_indices. Leave the
27859 truncation to calc_vec_perm_mask_for_shift.
27860 (vect_create_epilog_for_reduction): Likewise.
27861 * config/aarch64/aarch64.c (expand_vec_perm_d::perm): Change
27862 from auto_vec_perm_indices to vec_perm_indices.
27863 (aarch64_expand_vec_perm_const_1): Use rotate_inputs on d.perm
27864 instead of changing individual elements.
27865 (aarch64_vectorize_vec_perm_const): Use new_vector to install
27866 the vector in d.perm.
27867 * config/arm/arm.c (expand_vec_perm_d::perm): Change
27868 from auto_vec_perm_indices to vec_perm_indices.
27869 (arm_expand_vec_perm_const_1): Use rotate_inputs on d.perm
27870 instead of changing individual elements.
27871 (arm_vectorize_vec_perm_const): Use new_vector to install
27872 the vector in d.perm.
27873 * config/powerpcspe/powerpcspe.c (rs6000_expand_extract_even):
27874 Update vec_perm_builder constructor.
27875 (rs6000_expand_interleave): Likewise.
27876 * config/rs6000/rs6000.c (rs6000_expand_extract_even): Likewise.
27877 (rs6000_expand_interleave): Likewise.
27879 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
27881 * optabs-query.c (can_vec_perm_var_p): Check whether lowering
27882 to qimode could truncate the indices.
27883 * optabs.c (expand_vec_perm_var): Likewise.
27885 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
27887 * Makefile.in (OBJS): Add vec-perm-indices.o.
27888 * vec-perm-indices.h: New file.
27889 * vec-perm-indices.c: Likewise.
27890 * target.h (vec_perm_indices): Replace with a forward class
27892 (auto_vec_perm_indices): Move to vec-perm-indices.h.
27893 * optabs.h: Include vec-perm-indices.h.
27894 (expand_vec_perm): Delete.
27895 (selector_fits_mode_p, expand_vec_perm_var): Declare.
27896 (expand_vec_perm_const): Declare.
27897 * target.def (vec_perm_const_ok): Replace with...
27898 (vec_perm_const): ...this new hook.
27899 * doc/tm.texi.in (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Replace with...
27900 (TARGET_VECTORIZE_VEC_PERM_CONST): ...this new hook.
27901 * doc/tm.texi: Regenerate.
27902 * optabs.def (vec_perm_const): Delete.
27903 * doc/md.texi (vec_perm_const): Likewise.
27904 (vec_perm): Refer to TARGET_VECTORIZE_VEC_PERM_CONST.
27905 * expr.c (expand_expr_real_2): Use expand_vec_perm_const rather than
27906 expand_vec_perm for constant permutation vectors. Assert that
27907 the mode of variable permutation vectors is the integer equivalent
27908 of the mode that is being permuted.
27909 * optabs-query.h (selector_fits_mode_p): Declare.
27910 * optabs-query.c: Include vec-perm-indices.h.
27911 (selector_fits_mode_p): New function.
27912 (can_vec_perm_const_p): Check whether targetm.vectorize.vec_perm_const
27913 is defined, instead of checking whether the vec_perm_const_optab
27914 exists. Use targetm.vectorize.vec_perm_const instead of
27915 targetm.vectorize.vec_perm_const_ok. Check whether the indices
27916 fit in the vector mode before using a variable permute.
27917 * optabs.c (shift_amt_for_vec_perm_mask): Take a mode and a
27918 vec_perm_indices instead of an rtx.
27919 (expand_vec_perm): Replace with...
27920 (expand_vec_perm_const): ...this new function. Take the selector
27921 as a vec_perm_indices rather than an rtx. Also take the mode of
27922 the selector. Update call to shift_amt_for_vec_perm_mask.
27923 Use targetm.vectorize.vec_perm_const instead of vec_perm_const_optab.
27924 Use vec_perm_indices::new_expanded_vector to expand the original
27925 selector into bytes. Check whether the indices fit in the vector
27926 mode before using a variable permute.
27927 (expand_vec_perm_var): Make global.
27928 (expand_mult_highpart): Use expand_vec_perm_const.
27929 * fold-const.c: Includes vec-perm-indices.h.
27930 * tree-ssa-forwprop.c: Likewise.
27931 * tree-vect-data-refs.c: Likewise.
27932 * tree-vect-generic.c: Likewise.
27933 * tree-vect-loop.c: Likewise.
27934 * tree-vect-slp.c: Likewise.
27935 * tree-vect-stmts.c: Likewise.
27936 * config/aarch64/aarch64-protos.h (aarch64_expand_vec_perm_const):
27938 * config/aarch64/aarch64-simd.md (vec_perm_const<mode>): Delete.
27939 * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const)
27940 (aarch64_vectorize_vec_perm_const_ok): Fuse into...
27941 (aarch64_vectorize_vec_perm_const): ...this new function.
27942 (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
27943 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
27944 * config/arm/arm-protos.h (arm_expand_vec_perm_const): Delete.
27945 * config/arm/vec-common.md (vec_perm_const<mode>): Delete.
27946 * config/arm/arm.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
27947 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
27948 (arm_expand_vec_perm_const, arm_vectorize_vec_perm_const_ok): Merge
27950 (arm_vectorize_vec_perm_const): ...this new function. Explicitly
27951 check for NEON modes.
27952 * config/i386/i386-protos.h (ix86_expand_vec_perm_const): Delete.
27953 * config/i386/sse.md (VEC_PERM_CONST, vec_perm_const<mode>): Delete.
27954 * config/i386/i386.c (ix86_expand_vec_perm_const_1): Update comment.
27955 (ix86_expand_vec_perm_const, ix86_vectorize_vec_perm_const_ok): Merge
27957 (ix86_vectorize_vec_perm_const): ...this new function. Incorporate
27958 the old VEC_PERM_CONST conditions.
27959 * config/ia64/ia64-protos.h (ia64_expand_vec_perm_const): Delete.
27960 * config/ia64/vect.md (vec_perm_const<mode>): Delete.
27961 * config/ia64/ia64.c (ia64_expand_vec_perm_const)
27962 (ia64_vectorize_vec_perm_const_ok): Merge into...
27963 (ia64_vectorize_vec_perm_const): ...this new function.
27964 * config/mips/loongson.md (vec_perm_const<mode>): Delete.
27965 * config/mips/mips-msa.md (vec_perm_const<mode>): Delete.
27966 * config/mips/mips-ps-3d.md (vec_perm_constv2sf): Delete.
27967 * config/mips/mips-protos.h (mips_expand_vec_perm_const): Delete.
27968 * config/mips/mips.c (mips_expand_vec_perm_const)
27969 (mips_vectorize_vec_perm_const_ok): Merge into...
27970 (mips_vectorize_vec_perm_const): ...this new function.
27971 * config/powerpcspe/altivec.md (vec_perm_constv16qi): Delete.
27972 * config/powerpcspe/paired.md (vec_perm_constv2sf): Delete.
27973 * config/powerpcspe/spe.md (vec_perm_constv2si): Delete.
27974 * config/powerpcspe/vsx.md (vec_perm_const<mode>): Delete.
27975 * config/powerpcspe/powerpcspe-protos.h (altivec_expand_vec_perm_const)
27976 (rs6000_expand_vec_perm_const): Delete.
27977 * config/powerpcspe/powerpcspe.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK):
27979 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
27980 (altivec_expand_vec_perm_const_le): Take each operand individually.
27981 Operate on constant selectors rather than rtxes.
27982 (altivec_expand_vec_perm_const): Likewise. Update call to
27983 altivec_expand_vec_perm_const_le.
27984 (rs6000_expand_vec_perm_const): Delete.
27985 (rs6000_vectorize_vec_perm_const_ok): Delete.
27986 (rs6000_vectorize_vec_perm_const): New function.
27987 (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
27988 an element count and rtx array.
27989 (rs6000_expand_extract_even): Update call accordingly.
27990 (rs6000_expand_interleave): Likewise.
27991 * config/rs6000/altivec.md (vec_perm_constv16qi): Delete.
27992 * config/rs6000/paired.md (vec_perm_constv2sf): Delete.
27993 * config/rs6000/vsx.md (vec_perm_const<mode>): Delete.
27994 * config/rs6000/rs6000-protos.h (altivec_expand_vec_perm_const)
27995 (rs6000_expand_vec_perm_const): Delete.
27996 * config/rs6000/rs6000.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
27997 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
27998 (altivec_expand_vec_perm_const_le): Take each operand individually.
27999 Operate on constant selectors rather than rtxes.
28000 (altivec_expand_vec_perm_const): Likewise. Update call to
28001 altivec_expand_vec_perm_const_le.
28002 (rs6000_expand_vec_perm_const): Delete.
28003 (rs6000_vectorize_vec_perm_const_ok): Delete.
28004 (rs6000_vectorize_vec_perm_const): New function. Remove stray
28005 reference to the SPE evmerge intructions.
28006 (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
28007 an element count and rtx array.
28008 (rs6000_expand_extract_even): Update call accordingly.
28009 (rs6000_expand_interleave): Likewise.
28010 * config/sparc/sparc.md (vec_perm_constv8qi): Delete in favor of...
28011 * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): ...this
28013 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
28015 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
28017 * optabs.c (expand_vec_perm_1): Assert that SEL has an integer
28018 vector mode and that that mode matches the mode of the data
28020 (expand_vec_perm): Split handling of non-CONST_VECTOR selectors
28021 out into expand_vec_perm_var. Do all CONST_VECTOR handling here,
28022 directly using expand_vec_perm_1 when forcing selectors into
28024 (expand_vec_perm_var): New function, split out from expand_vec_perm.
28026 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
28028 * optabs-query.h (can_vec_perm_p): Delete.
28029 (can_vec_perm_var_p, can_vec_perm_const_p): Declare.
28030 * optabs-query.c (can_vec_perm_p): Split into...
28031 (can_vec_perm_var_p, can_vec_perm_const_p): ...these two functions.
28032 (can_mult_highpart_p): Use can_vec_perm_const_p to test whether a
28033 particular selector is valid.
28034 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
28035 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
28036 (vect_grouped_load_supported): Likewise.
28037 (vect_shift_permute_load_chain): Likewise.
28038 * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
28039 (vect_transform_slp_perm_load): Likewise.
28040 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
28041 (vectorizable_bswap): Likewise.
28042 (vect_gen_perm_mask_checked): Likewise.
28043 * fold-const.c (fold_ternary_loc): Likewise. Don't take
28044 implementations of variable permutation vectors into account
28045 when deciding which selector to use.
28046 * tree-vect-loop.c (have_whole_vector_shift): Don't check whether
28047 vec_perm_const_optab is supported; instead use can_vec_perm_const_p
28048 with a false third argument.
28049 * tree-vect-generic.c (lower_vec_perm): Use can_vec_perm_const_p
28050 to test whether the constant selector is valid and can_vec_perm_var_p
28051 to test whether a variable selector is valid.
28053 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
28055 * optabs-query.h (can_vec_perm_p): Take a const vec_perm_indices *.
28056 * optabs-query.c (can_vec_perm_p): Likewise.
28057 * fold-const.c (fold_vec_perm): Take a const vec_perm_indices &
28058 instead of vec_perm_indices.
28059 * tree-vectorizer.h (vect_gen_perm_mask_any): Likewise,
28060 (vect_gen_perm_mask_checked): Likewise,
28061 * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise,
28062 (vect_gen_perm_mask_checked): Likewise,
28064 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
28066 * optabs-query.h (qimode_for_vec_perm): Declare.
28067 * optabs-query.c (can_vec_perm_p): Split out qimode search to...
28068 (qimode_for_vec_perm): ...this new function.
28069 * optabs.c (expand_vec_perm): Use qimode_for_vec_perm.
28071 2018-01-02 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
28073 * rtlanal.c (canonicalize_condition): Return 0 if final rtx
28074 does not have a conditional at the top.
28076 2018-01-02 Richard Biener <rguenther@suse.de>
28078 * ipa-inline.c (big_speedup_p): Fix expression.
28080 2018-01-02 Jan Hubicka <hubicka@ucw.cz>
28083 * config/i386/x86-tune-costs.h: Increase cost of integer load costs
28086 2018-01-02 Jan Hubicka <hubicka@ucw.cz>
28090 * x86-tune-costs.h (generic_cost): Reduce cost of FDIV 20->17,
28091 cost of sqrt 20->14, DIVSS 18->13, DIVSD 32->17, SQRtSS 30->14
28092 and SQRTsD 58->18, cond_not_taken_branch_cost. 2->1. Increase
28093 cond_taken_branch_cost 3->4.
28095 2018-01-01 Jakub Jelinek <jakub@redhat.com>
28097 PR tree-optimization/83581
28098 * tree-loop-distribution.c (pass_loop_distribution::execute): Return
28099 TODO_cleanup_cfg if any changes have been made.
28101 PR middle-end/83608
28102 * expr.c (store_expr_with_bounds): Use simplify_gen_subreg instead of
28103 convert_modes if target mode has the right side, but different mode
28106 PR middle-end/83609
28107 * expr.c (expand_assignment): Fix up a typo in simplify_gen_subreg
28108 last argument when extracting from CONCAT. If either from_real or
28109 from_imag is NULL, use expansion through memory. If result is not
28110 a CONCAT and simplify_gen_subreg fails, try to simplify_gen_subreg
28111 the parts directly to inner mode, if even that fails, use expansion
28114 PR middle-end/83623
28115 * expmed.c (expand_shift_1): For 2-byte rotates by BITS_PER_UNIT,
28116 check for bswap in mode rather than HImode and use that in expand_unop
28119 Copyright (C) 2018 Free Software Foundation, Inc.
28121 Copying and distribution of this file, with or without modification,
28122 are permitted in any medium without royalty provided the copyright
28123 notice and this notice are preserved.