1 2018-10-11 Jan Hubicka <hubicka@ucw.cz>
4 * cgraphclones.c (cgraph_node::create_version_clone_with_body):
5 Set new_decl virtual flag to zero.
7 2018-10-11 Martin Sebor <msebor@redhat.com>
10 * doc/extend.texi (attribute format_arg): Discuss using multiple
11 attributes on a single function.
13 2018-10-11 Giuliano Belinassi <giuliano.belinassi@usp.br>
15 PR tree-optimization/86829
16 * match.pd (sin (atan (x))): New simplification rules.
17 (cos (atan (x))): Likewise.
18 * real.c (build_sinatan_real): New function.
19 * real.h (build_sinatan_real): Prototype.
21 2018-10-11 Will Schmidt <will_schmidt@vnet.ibm.com>
23 * config/rs6000/rs6000.c (map_to_integral_tree_type): New helper
25 (fold_mergeeo_helper): New helper function.
26 (rs6000_gimple_fold_builtin): Add hooks for vec_mergee and vec_mergeo
27 intrinsics. Correct some whitespace indentation issues.
29 2018-10-11 Wilco Dijkstra <wdijkstr@arm.com>
32 * config/aarch64/aarch64.c (aarch64_mask_and_shift_for_ubfiz_p):
33 Use HOST_WIDE_INT_1U for shift.
35 2018-10-11 Doug Rupp <rupp@adacore.com>
36 Olivier Hainque <hainque@adacore.com>
38 * config/rs6000/vxworks.h (VXWORKS_RELAX_LINK_SPEC): New macro.
39 Pass --relax to the linker for RTPs.
40 (LINK_SPEC): Append VXWORKS_RELAX_LINK_SPEC.
42 2018-10-11 Andrew Stubbs <ams@codesourcery.com>
43 Jan Hubicka <jh@suse.cz>
44 Martin Jambor <mjambor@suse.cz>
46 * print-rtl.c (print_rtx_operand_codes_E_and_V): Print how many times
47 the same elements are repeated rather than printing all of them.
48 * read-rtl.c (rtx_reader::read_rtx_operand): Recognize and expand
50 * read-rtl-function.c (test_loading_repeat): New function.
51 (read_rtl_function_c_tests): Call test_loading_repeat.
52 * rtl-tests.c (test_dumping_repeat): New function.
53 (rtl_tests_c_tests): Call test_dumping_repeat.
55 2018-10-11 Richard Biener <rguenther@suse.de>
57 * config/i386/x86-tune-costs.h (bdver?_memcpy, bdver?_memset,
58 bdver?_cost): Unify to ...
59 (bdver_memcpy, bdver_memset, bdver_cost): ... this.
60 * config/i386/i386.c (processor_cost_table): Adjust.
62 2018-10-10 Eric Botcazou <ebotcazou@adacore.com>
65 * cgraphunit.c (cgraph_node::expand_thunk): Force DECL_IGNORED_P on
66 the thunk when expanding to GIMPLE.
68 2018-10-10 Bernd Edlinger <bernd.edlinger@hotmail.de>
70 * varasm.c (mergeable_string_section): Don't try to move zero-length
71 strings to the merge section.
73 2018-10-10 Uros Bizjak <ubizjak@gmail.com>
76 * config/i386/mmx.md (const_vector 0 -> mem splitter): New splitter.
78 2018-10-10 Jakub Jelinek <jakub@redhat.com>
81 * config/i386/i386-builtin.def (IX86_BUILTIN_RDPMC): Move from args set
84 2018-10-10 Richard Biener <rguenther@suse.de>
86 * config/i386/sse.md (reduc_plus_scal_v8df, reduc_plus_scal_v4df,
87 reduc_plus_scal_v2df, reduc_plus_scal_v16sf, reduc_plus_scal_v8sf,
88 reduc_plus_scal_v4sf): Merge into pattern reducing to half width
89 and recursing and pattern terminating the recursion on SSE
90 vector width using ix86_expand_reduc.
91 (reduc_sminmax_scal_<mode>): Split into part reducing to half
92 width and recursing and SSE2 vector variant doing the final
93 reduction with ix86_expand_reduc.
94 (reduc_uminmax_scal_<mode>): Likewise for the AVX512 variants
95 with terminating the recursion at AVX level, splitting that
98 2018-10-09 David Malcolm <dmalcolm@redhat.com>
100 * genmatch.c (error_cb): Rename to...
101 (diagnostic_cb): ...this, converting int params to enums.
102 (fatal_at): Update for renaming.
103 (warning_at): Likewise.
105 * input.c (selftest::ebcdic_execution_charset::apply):
106 Update for renaming of...
107 (selftest::ebcdic_execution_charset::on_error): ...this, renaming
109 (selftest::ebcdic_execution_charset::on_diagnostic): ...this,
110 converting level and reason to enums.
111 (class selftest::lexer_error_sink): Rename to...
112 (class selftest::lexer_test_options): ...this, renaming field
113 "m_errors" to "m_diagnostics".
114 (selftest::lexer_test_options::apply): Update for renaming of...
115 (selftest::lexer_test_options::on_error): ...this, renaming to...
116 (selftest::lexer_test_options::on_diagnostic): ...this
117 converting level and reason to enums.
118 (selftest::test_lexer_string_locations_raw_string_unterminated):
119 Update for renamings.
120 * opth-gen.awk (struct cpp_reason_option_codes_t): Use enum for
123 2018-10-09 Paul A. Clarke <pc@us.ibm.com>
125 * config.gcc (powerpc*-*-*): Add pmmintrin.h to extra_headers.
126 * config/rs6000/pmmintrin.h: New file.
128 2018-10-09 Eric Botcazou <ebotcazou@adacore.com>
130 PR tree-optimization/86659
131 * gimple-match.h (gimple_match_op constructors): Initialize reverse.
133 2018-10-09 Richard Biener <rguenther@suse.de>
135 PR tree-optimization/63155
136 * tree-ssa-structalias.c: Include tree-ssa.h.
137 (get_constraint_for_ssa_var): For undefs return nothing_id.
138 (find_func_aliases): Cleanup PHI handling.
140 2018-10-09 Richard Biener <rguenther@suse.de>
142 * tree-vectorizer.c (dump_stmt_cost): Fix cut&paste missing
145 2018-10-09 Martin Liska <mliska@suse.cz>
147 * asan.c (asan_emit_stack_protection): If a stack variable
148 is located in a same file as current function, then emit
149 line info into variable definition string.
151 2018-10-08 Eric Botcazou <ebotcazou@adacore.com>
153 * print-rtl.c (rtx_writer::print_rtx_operand_code_i): Print column
156 2018-10-08 Eric Botcazou <ebotcazou@adacore.com>
158 * cgraphunit.c (cgraph_node::expand_thunk): Do not force DECL_IGNORED_P
161 2018-10-08 Eric Botcazou <ebotcazou@adacore.com>
163 PR tree-optimization/86659
164 * gimple-match.h (struct gimple_match_op): Add reverse field.
165 (gimple_match_op::set_op): New overloaded method.
166 * gimple-match-head.c (maybe_build_generic_op) <BIT_FIELD_REF>: Set
167 the REF_REVERSE_STORAGE_ORDER flag on the value.
168 (gimple_simplify) <GIMPLE_ASSIGN>: For BIT_FIELD_REF, propagate the
169 REF_REVERSE_STORAGE_ORDER flag and avoid simplifying if it is set.
171 2018-10-08 Richard Sandiford <richard.sandiford@arm.com>
174 * gimple-ssa-backprop.c (backprop::intersect_uses): Use
175 FOR_EACH_IMM_USE_FAST instead of FOR_EACH_IMM_USE_STMT.
177 2018-10-08 H.J. Lu <hongjiu.lu@intel.com>
180 * config/i386/avx512fintrin.h (_mm512_mask_fmaddsub_round_pd):
181 Defined with __builtin_ia32_vfmaddsubpd512_mask.
183 2018-10-08 Richard Biener <rguenther@suse.de>
185 * config/i386/x86-tune-costs.h (znver1_cost): Make AVX256 vector loads
186 cost the same as AVX128 ones.
188 2018-10-08 Paul Koning <ni1d@arrl.net>
190 * config/pdp11/pdp11-protos.h (output_block_move): Remove.
191 (expand_block_move): New function.
192 * config/pdp11/pdp11.c (output_block_move): Remove.
193 (expand_block_move): New function.
194 * config/pdp11/pdp11.h (MOVE_RATIO): New definition.
195 * config/pdp11/pdp11.md (movmemhi): Use expand_block_move.
196 (*movmemhi1): Remove.
198 2018-10-08 Robin Dapp <rdapp@linux.ibm.com>
200 * config/s390/2827.md: Increase latencies for some FP instructions.
202 2018-10-08 Richard Biener <rguenther@suse.de>
204 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost):
206 * tree-vectorizer.c (dump_stmt_cost): Add cost param and dump it.
207 * tree-vectorizer.h (dump_stmt_cost): Adjust.
208 (add_stmt_cost): Dump return value of the hook.
210 2018-10-08 Richard Biener <rguenther@suse.de>
212 PR tree-optimization/63155
213 * tree-ssa-propagate.c (add_ssa_edge): Do cheap check first.
214 (ssa_propagation_engine::ssa_propagate): Remove redundant
217 2018-10-05 Peter Bergner <bergner@linux.ibm.com>
219 PR rtl-optimization/86939
220 PR rtl-optimization/87479
221 * ira.h (non_conflicting_reg_copy_p): New prototype.
222 * ira-lives.c (ignore_reg_for_conflicts): New static variable.
223 (make_hard_regno_dead): Don't add conflicts for register
224 ignore_reg_for_conflicts.
225 (make_object_dead): Likewise.
226 (non_conflicting_reg_copy_p): New function.
227 (process_bb_node_lives): Set ignore_reg_for_conflicts for copies.
228 Remove special conflict handling of REAL_PIC_OFFSET_TABLE_REGNUM.
229 * lra-lives.c (ignore_reg_for_conflicts): New static variable.
230 (make_hard_regno_dead): Don't add conflicts for register
231 ignore_reg_for_conflicts. Remove special conflict handling of
232 REAL_PIC_OFFSET_TABLE_REGNUM. Remove now unused argument
233 check_pic_pseudo_p and update callers.
234 (mark_pseudo_dead): Don't add conflicts for register
235 ignore_reg_for_conflicts.
236 (process_bb_lives): Set ignore_reg_for_conflicts for copies.
238 2018-10-05 Andrew Waterman <andrew@sifive.com>
239 Jim Wilson <jimw@sifive.com>
241 * config/riscv/riscv.md (f<quiet_pattern>_quiet<ANYF:mode><X:mode>4):
242 Add define_expand. Add ! HONOR_SNANS check to current pattern. Add
243 new pattern using HONOR_SNANS that emits one extra instruction.
245 2018-10-05 Segher Boessenkool <segher@kernel.crashing.org>
247 * config/rs6000/rs6000.md (unnamed mfcr scc_comparison_operator
248 patterns): Merge SI and DI patterns to a GPR pattern.
249 (unnamed define_insn and define_split for record form of that): Merge
250 to a single define_insn_and_split pattern.
252 2018-10-05 David Malcolm <dmalcolm@redhat.com>
255 * input.c (expand_location_to_spelling_point): Add param "aspect"
256 and use rather than hardcoding LOCATION_ASPECT_CARET.
257 (get_substring_ranges_for_loc): Handle the case of a single token
258 within a macro expansion.
259 * input.h (expand_location_to_spelling_point): Add "aspect" param,
260 defaulting to LOCATION_ASPECT_CARET.
262 2018-10-05 Paul Koning <ni1d@arrl.net>
264 * config/pdp11/pdp11.c (TARGET_CXX_GUARD_TYPE): Define.
265 (TARGET_CXX_CLASS_DATA_ALWAYS_COMDAT): Define.
266 (TARGET_CXX_LIBRARY_RTTI_COMDAT): Define.
267 (pdp11_guard_type): New function.
269 2018-10-05 Paul Koning <ni1d@arrl.net>
271 * config/pdp11/pdp11.h (FLOAT_TYPE_SIZE): Always 32.
272 * config/pdp11/pdp11.opt (mfloat32): Remove.
274 * doc/invoke.texi (pdp11 -mfloat32): Remove:
275 (pdp11 -mfloat64): Remove.
277 2018-10-05 Uros Bizjak <ubizjak@gmail.com>
279 * config/i386/i386.md (*cmpxf_cc_i387): Remove pattern.
280 (*cmp<mode>_cc_i387): Ditto.
281 (*cmpu<mode>_cc_i387): Ditto.
282 (*cmp<X87MODEF:mode>_<SWI24:mode>_cc_i387): Ditto.
283 * config/i386/i386.c (ix86_expand_fp_compare): Remove
285 <case IX86_FPCMP_SAHF>: Do not generate pattern with HImode clobber.
286 Emit x86_sahf_1 pattern.
287 (ix86_expand_compare): Update call to ix86_expand_fp_compare.
288 (ix86_expand_carry_flag_compare): Ditto.
290 2018-10-05 Uros Bizjak <ubizjak@gmail.com>
292 * config/i386/i386.md (*cmpxf_i387): Change operand 2 predicate
293 to reg_or_0_operand. Add "C" constraint.
294 (*cmpxf_cc_i387): Ditto.
295 (*cmp<mode>_i387): Change operand 2 predicate
296 to nonimm_or_0_operand. Add "C" constraint.
297 (*cmp<mode>_cc_i387): Ditto.
298 (*cmp<mode>_0_i387): Remove insn pattern.
299 (*cmp<mode>_0_cc_i387): Ditto.
301 2018-10-05 Uros Bizjak <ubizjak@gmail.com>
303 * config/i386/constraints.md ("C"): Do not depend on TARGET_SSE.
304 * config/i386/predicates.md (nonimm_or_0_operand): Rename
305 from vector_move_operand. Update all uses.
307 2018-10-05 Martin Sebor <msebor@redhat.com>
309 PR tree-optimization/87490
310 * builtins.c (expand_builtin_strnlen): Handle a null data.decl
313 2018-10-05 Richard Biener <rguenther@suse.de>
315 PR tree-optimization/63155
316 * tree-ssa-ccp.c (ccp_propagate::visit_phi): Avoid excess
317 vertical space in dumpfiles.
318 * tree-ssa-propagate.h
319 (ssa_propagation_engine::process_ssa_edge_worklist): Remove.
320 * tree-ssa-propagate.c (cfg_blocks_back): New global.
321 (ssa_edge_worklist_back): Likewise.
322 (curr_order): Likewise.
323 (cfg_blocks_get): Remove abstraction.
324 (cfg_blocks_add): Likewise.
325 (cfg_blocks_empty_p): Likewise.
326 (add_ssa_edge): Add to current or next worklist based on
328 (add_control_edge): Likewise.
329 (ssa_propagation_engine::process_ssa_edge_worklist): Fold
331 (ssa_propagation_engine::ssa_propagate): ... here. Unify
332 iteration from CFG and SSA edge worklist so we process
333 everything in RPO order, prioritizing forward progress
335 (ssa_prop_init): Allocate new worklists, do not dump
337 (ssa_prop_fini): Free new worklists.
339 2018-10-05 Richard Biener <rguenther@suse.de>
341 * tree-core.h (tree_block::abstract_flag): Remove.
342 (tree_block::block_num): Make full 32bits.
343 * tree.def (BLOCK): Remove docs about BLOCK_ABSTRACT.
344 * tree.h (BLOCK_ABSTRACT): Remove.
345 * dwarf2out.c (gen_lexical_block_die): Remove dead code
346 resulting from BLOCK_ABSTRACT being always false.
347 (gen_inlined_subroutine_die): Likewise.
348 (gen_block_die): Likewise.
349 * tree.c (block_ultimate_origin): Likewise.
350 * tree-pretty-print.c (dump_block_node): Remove code dealing
352 * tree-ssa-live.c (dump_scope_block): Likewise.
353 * tree-streamer-in.c (unpack_ts_block_value_fields): Likewise.
354 * tree-streamer-out.c (pack_ts_block_value_fields): Likewise.
356 2018-10-05 Richard Biener <rguenther@suse.de>
358 * config/i386/i386.c (ix86_add_stmt_cost): When scalar cost
359 is asked for initialize mode to the component mode of the
362 2018-10-05 H.J. Lu <hongjiu.lu@intel.com>
365 * config/i386/gnu-user.h (ASM_SPEC): Don't pass -msse2avx to
367 * config/i386/gnu-user64.h (ASM_SPEC): Likewise.
369 2018-10-05 Segher Boessenkool <segher@kernel.crashing.org>
372 * config/rs6000/rs6000-builtin.def (RS6000_BUILTIN_SET_FPSCR_DRN): Use
374 * config/rs6000/rs6000.md (rs6000_set_fpscr_rn): Require the operand
375 to be DImode. When using mffscrn, force the operand to a register.
377 2018-10-04 Uros Bizjak <ubizjak@gmail.com>
379 * config/i386/i386.md (*fop_<X87MODEF:mode>_2_i387): Macroize insn
380 from *fop_<MODEF:mode>_2_i387 and *fop_xf_2_i387 using
381 X87MODEF mode iterator.
382 (*fop_<X87MODEF:mode>_3_i387): Macroize insn from
383 *fop_<MODEF:mode>_3_i387 and *fop_xf_3_i387 using
384 X87MODEF mode iterator.
386 2018-10-04 Vinay Kumar <vinay.kumar@blackfigtech.com>
388 * doc/invoke.texi (-Wno-prio-ctor-dtor): Document new warning
391 2018-10-04 David Malcolm <dmalcolm@redhat.com>
393 * Makefile.in (OBJS): Add opt-problem.o.
394 * dump-context.h: Include "selftest.h.
395 (selftest::temp_dump_context): New forward decl.
396 (class dump_context): Make friend of class
397 selftest::temp_dump_context.
398 (dump_context::dump_loc_immediate): New decl.
399 (class dump_pretty_printer): Move here from dumpfile.c.
400 (class temp_dump_context): Move to namespace selftest.
401 (temp_dump_context::temp_dump_context): Add param
402 "forcibly_enable_dumping".
403 (selftest::verify_dumped_text):
404 (ASSERT_DUMPED_TEXT_EQ): Move here from dumpfile.c.
405 (selftest::verify_item):
406 (ASSERT_IS_TEXT): Move here from dumpfile.c.
407 (ASSERT_IS_TREE): Likewise.
408 (ASSERT_IS_GIMPLE): Likewise.
409 * dumpfile.c (dump_context::dump_loc): Move immediate dumping
411 (dump_context::dump_loc_immediate): ...this new function.
412 (class dump_pretty_printer): Move to dump-context.h.
413 (dump_switch_p_1): Don't enable MSG_PRIORITY_REEMITTED.
414 (opt_info_switch_p_1): Enable MSG_PRIORITY_REEMITTED.
415 (temp_dump_context::temp_dump_context): Move to "selftest"
416 namespace. Add param "forcibly_enable_dumping", and use it to
417 conditionalize the use of m_pp;
418 (selftest::verify_dumped_text): Make non-static.
419 (ASSERT_DUMPED_TEXT_EQ): Move to dump-context.h.
420 (selftest::verify_item): Make non-static.
421 (ASSERT_IS_TEXT): Move to dump-context.h.
422 (ASSERT_IS_TREE): Likewise.
423 (ASSERT_IS_GIMPLE): Likewise.
424 (selftest::test_capture_of_dump_calls): Pass "true" for new
425 param of temp_dump_context.
426 * dumpfile.h (enum dump_flag): Add MSG_PRIORITY_REEMITTED, adding
427 it to MSG_ALL_PRIORITIES. Update values of TDF_COMPARE_DEBUG and
429 * opt-problem.cc: New file.
430 * opt-problem.h: New file.
431 * optinfo-emit-json.cc
432 (selftest::test_building_json_from_dump_calls): Pass "true" for
433 new param of temp_dump_context.
434 * optinfo.cc (optinfo_kind_to_dump_flag): New function.
435 (optinfo::emit_for_opt_problem): New function.
436 (optinfo::emit): Clarity which emit_item is used.
437 * optinfo.h (optinfo::get_dump_location): New accessor.
438 (optinfo::emit_for_opt_problem): New decl.
439 (optinfo::emit): Make const.
440 * selftest-run-tests.c (selftest::run_tests): Call
441 selftest::opt_problem_cc_tests.
442 * selftest.h (selftest::opt_problem_cc_tests): New decl.
443 * tree-data-ref.c (dr_analyze_innermost): Convert return type from
444 bool to opt_result, converting fprintf messages to
445 opt_result::failure_at calls. Add "stmt" param for use by the
447 (create_data_ref): Pass "stmt" to the dr_analyze_innermost call.
448 (runtime_alias_check_p): Convert return type from bool to
449 opt_result, converting dump_printf calls to
450 opt_result::failure_at, using the statement DDR_A for their
452 (find_data_references_in_stmt): Convert return type from bool to
453 opt_result, converting "return false" to opt_result::failure_at
455 * tree-data-ref.h: Include "opt-problem.h".
456 (dr_analyze_innermost): Convert return type from bool to opt_result,
457 and add a const gimple * param.
458 (find_data_references_in_stmt): Convert return type from bool to
460 (runtime_alias_check_p): Likewise.
461 * tree-predcom.c (find_looparound_phi): Pass "init_stmt" to
462 dr_analyze_innermost.
463 * tree-vect-data-refs.c (vect_mark_for_runtime_alias_test):
464 Convert return type from bool to opt_result, adding a message for
465 the PARAM_VECT_MAX_VERSION_FOR_ALIAS_CHECKS zero case.
466 (vect_analyze_data_ref_dependence): Convert return type from bool
467 to opt_result. Change sense of return type from "false"
468 effectively meaning "no problems" to "false" meaning a problem,
469 so that "return false" becomes "return opt_result::success".
470 Convert "return true" calls to opt_result::failure_at, using
471 the location of statement A rather than vect_location.
472 (vect_analyze_data_ref_dependences): Convert return type from bool
474 (verify_data_ref_alignment): Likewise, converting dump_printf_loc
475 calls to opt_result::failure_at, using the stmt location rather
477 (vect_verify_datarefs_alignment): Convert return type from bool
479 (vect_enhance_data_refs_alignment): Likewise. Split local "stat"
480 into multiple more-tightly-scoped copies.
481 (vect_analyze_data_refs_alignment): Convert return type from bool
483 (vect_analyze_data_ref_accesses): Likewise, converting a
484 "return false" to a "return opt_result::failure_at", adding a
486 (vect_prune_runtime_alias_test_list): Convert return type from
487 bool to opt_result, converting dump_printf_loc to
488 opt_result::failure_at. Add a %G to show the pertinent statement,
489 and use the stmt's location rather than vect_location.
490 (vect_find_stmt_data_reference): Convert return type from
491 bool to opt_result, converting dump_printf_loc to
492 opt_result::failure_at, using stmt's location.
493 (vect_analyze_data_refs): Convert return type from bool to
494 opt_result. Convert "return false" to "return
495 opt_result::failure_at", adding messages as needed.
496 * tree-vect-loop.c (vect_determine_vf_for_stmt_1): Convert return
497 type from bool to opt_result.
498 (vect_determine_vf_for_stmt): Likewise.
499 (vect_determine_vectorization_factor): Likewise, converting
500 dump_printf_loc to opt_result::failure_at, using location of phi
501 rather than vect_location.
502 (vect_analyze_loop_form_1): Convert return type from bool to
503 opt_result, converting dump_printf_loc calls, retaining the use of
505 (vect_analyze_loop_form): Convert return type from loop_vec_info
506 to opt_loop_vec_info.
507 (vect_analyze_loop_operations): Convert return type from bool to
508 opt_result, converting dump_printf_loc calls, using the location
509 of phi/stmt rather than vect_location where available. Convert
510 various "return false" to "return opt_result::failure_at" with
511 "unsupported phi" messages.
512 (vect_get_datarefs_in_loop): Convert return type from bool to
513 opt_result. Add a message for the
514 PARAM_LOOP_MAX_DATAREFS_FOR_DATADEPS failure.
515 (vect_analyze_loop_2): Convert return type from bool to
516 opt_result. Ensure "ok" is set to a opt_result::failure_at before
517 each "goto again;", adding new messages where needed.
518 Add "unsupported grouped {store|load}" messages.
519 (vect_analyze_loop): Convert return type from loop_vec_info to
521 * tree-vect-slp.c (vect_analyze_slp): Convert return type from
523 * tree-vect-stmts.c (process_use): Likewise, converting
524 dump_printf_loc call and using stmt location, rather than
526 (vect_mark_stmts_to_be_vectorized): Likeise.
527 (vect_analyze_stmt): Likewise, adding a %G.
528 (vect_get_vector_types_for_stmt): Convert return type from bool to
529 opt_result, converting dump_printf_loc calls and using stmt
530 location, rather than vect_location.
531 (vect_get_mask_type_for_stmt): Convert return type from tree to
532 opt_tree, converting dump_printf_loc calls and using stmt location.
533 * tree-vectorizer.c: Include "opt-problem.h.
534 (try_vectorize_loop_1): Flag "Analyzing loop at" dump message as
535 MSG_PRIORITY_INTERNALS. Convert local "loop_vinfo" from
536 loop_vec_info to opt_loop_vec_info. If if fails, and dumping is
537 enabled, use it to report at the top level "couldn't vectorize
538 loop" followed by the problem.
539 * tree-vectorizer.h (opt_loop_vec_info): New typedef.
540 (vect_mark_stmts_to_be_vectorized): Convert return type from bool
542 (vect_analyze_stmt): Likewise.
543 (vect_get_vector_types_for_stmt): Likewise.
544 (tree vect_get_mask_type_for_stmt): Likewise.
545 (vect_analyze_data_ref_dependences): Likewise.
546 (vect_enhance_data_refs_alignment): Likewise.
547 (vect_analyze_data_refs_alignment): Likewise.
548 (vect_verify_datarefs_alignment): Likewise.
549 (vect_analyze_data_ref_accesses): Likewise.
550 (vect_prune_runtime_alias_test_list): Likewise.
551 (vect_find_stmt_data_reference): Likewise.
552 (vect_analyze_data_refs): Likewise.
553 (vect_analyze_loop): Convert return type from loop_vec_info to
555 (vect_analyze_loop_form): Likewise.
556 (vect_analyze_slp): Convert return type from bool to opt_result.
558 2018-10-04 David Malcolm <dmalcolm@redhat.com>
560 * doc/invoke.texi (-fopt-info): Document new "internals"
562 * dump-context.h (dump_context::apply_dump_filter_p): New decl.
563 * dumpfile.c (dump_options): Update for renaming of MSG_ALL to
565 (optinfo_verbosity_options): Add "internals".
566 (kind_as_string): Update for renaming of MSG_ALL to MSG_ALL_KINDS.
567 (dump_context::apply_dump_filter_p): New member function.
568 (dump_context::dump_loc): Use apply_dump_filter_p rather than
569 explicitly masking the dump_kind.
570 (dump_context::begin_scope): Increment the scope depth first. Use
571 apply_dump_filter_p rather than explicitly masking the dump_kind.
572 (dump_context::emit_item): Use apply_dump_filter_p rather than
573 explicitly masking the dump_kind.
574 (dump_dec): Likewise.
575 (dump_hex): Likewise.
576 (dump_switch_p_1): Default to MSG_ALL_PRIORITIES.
577 (opt_info_switch_p_1): Default to MSG_PRIORITY_USER_FACING.
578 (opt_info_switch_p): Update handling of default
579 MSG_OPTIMIZED_LOCATIONS to cope with default of
580 MSG_PRIORITY_USER_FACING.
581 (dump_basic_block): Use apply_dump_filter_p rather than explicitly
582 masking the dump_kind.
583 (selftest::test_capture_of_dump_calls): Update test_dump_context
584 instances to use MSG_ALL_KINDS | MSG_PRIORITY_USER_FACING rather
585 than MSG_ALL. Generalize scope test to be run at all four
586 combinations of with/without MSG_PRIORITY_USER_FACING and
587 MSG_PRIORITY_INTERNALS, adding examples of explicit priority
588 for each of the two values.
589 * dumpfile.h (enum dump_flag): Add comment about the MSG_* flags.
590 Rename MSG_ALL to MSG_ALL_KINDS. Add MSG_PRIORITY_USER_FACING,
591 MSG_PRIORITY_INTERNALS, and MSG_ALL_PRIORITIES, updating the
592 values for TDF_COMPARE_DEBUG and TDF_ALL_VALUES.
593 (AUTO_DUMP_SCOPE): Add a note to the comment about the interaction
595 * tree-vect-loop-manip.c (vect_loop_versioning): Mark versioning
596 dump messages as MSG_PRIORITY_USER_FACING.
597 * tree-vectorizer.h (DUMP_VECT_SCOPE): Add a note to the comment
598 about the interaction with MSG_PRIORITY_*.
600 2018-10-04 Bernd Edlinger <bernd.edlinger@hotmail.de>
602 * varasm.c (output_constant): Add new parameter merge_strings.
603 Make strings properly zero terminated in merge string sections.
604 (mergeable_string_section): Don't fail if the last char is non-zero.
605 (assemble_variable_contents): Handle merge string sections.
606 (assemble_variable): Likewise.
607 (assemble_constant_contents): Likewise.
608 (output_constant_def_contents): Likewise.
609 (output_constructor_array_range,
610 output_constructor_regular_field): Adjust call to output_constant.
611 (output_object_block): Adjust call to assemble_constant_contents
612 and assemble_variable_contents.
614 2018-10-04 Martin Liska <mliska@suse.cz>
617 * cgraphunit.c (process_function_and_variable_attributes):
618 Warn about a function with alias attribute and a body.
620 2018-10-04 Martin Liska <mliska@suse.cz>
623 * multiple_target.c (redirect_to_specific_clone): New function.
624 (ipa_target_clone): Use it.
625 * tree-inline.c: Fix comment.
627 2018-10-04 David Malcolm <dmalcolm@redhat.com>
629 * dumpfile.c (gcc::dump_manager::dump_manager): Initialize new
631 (gcc::dump_manager::~dump_manager): Free m_optinfo_filename.
632 (gcc::dump_manager::register_pass): New member function, adapted
633 from loop body in gcc::pass_manager::register_pass, adding a
634 call to update_dfi_for_opt_info.
635 (gcc::dump_manager::opt_info_enable_passes): Store the
636 -fopt-info options into the new fields. Move the loop
638 (gcc::dump_manager::update_dfi_for_opt_info): ...this new member
640 * dumpfile.h (struct opt_pass): New forward decl.
641 (gcc::dump_manager::register_pass): New decl.
642 (gcc::dump_manager::update_dfi_for_opt_info): New decl.
643 (class gcc::dump_manager): Add fields "m_optgroup_flags",
644 "m_optinfo_flags", and "m_optinfo_filename".
645 * passes.c (gcc::pass_manager::register_pass): Move all of the
646 dump-handling code to gcc::dump_manager::register_pass.
648 2018-10-04 Peter Bergner <bergner@linux.ibm.com>
650 PR rtl-optimization/87466
651 * target.def (setjmp_preserves_nonvolatile_regs_p): New target hook.
652 * doc/tm.texi.in (TARGET_SETJMP_PRESERVES_NONVOLATILE_REGS_P): New hook.
653 * doc/tm.texi: Regenerate.
654 * ira-lives.c (process_bb_node_lives): Use the new target hook.
655 * lra-lives.c (process_bb_lives): Likewise.
656 * config/rs6000/rs6000.c (TARGET_SETJMP_PRESERVES_NONVOLATILE_REGS_P):
659 2018-10-04 Tamar Christina <tamar.christina@arm.com>
661 * params.c (add_params): Fix initialization.
663 2018-10-04 Martin Liska <mliska@suse.cz>
665 PR gcov-profile/84107
666 * tree-profile.c (init_ic_make_global_vars):
667 Remove ic_void_ptr_var and ic_gcov_type_ptr_var.
668 Come up with new ic_tuple* variables. Emit
669 __gcov_indirect_call{,_topn} variables.
670 (gimple_gen_ic_profiler): Access the variable
672 (gimple_gen_ic_func_profiler): Access
673 __gcov_indirect_call.callee field.
674 (gimple_init_gcov_profiler): Use ptr_type_node.
675 * value-prof.c (gimple_ic): Use ptr_type_node.
677 2018-10-04 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
679 PR tree-optimization/85787
680 * ipa-pure-const.c (malloc_candidate_p_1): Move most of malloc_candidate_p
681 into this function and add support for detecting multiple phis.
682 (DUMP_AND_RETURN): Move from malloc_candidate_p into top-level macro.
684 2018-10-04 Martin Liska <mliska@suse.cz>
687 * ipa-inline.c (inline_to_all_callers_1):
688 Call ultimate_alias_target for node being inlined.
690 2018-10-03 Jeff Law <law@redhat.com>
692 * gimple-ssa-sprintf.c (format_string): Do not hardcode size of
694 * tree.c (get_typenode_from_name): Moved from fortran/trans-types.c.
695 * tree.h (get_typenode_from_name): Prototype.
697 2018-10-03 Uros Bizjak <ubizjak@gmail.com>
699 * config/i386/i386.md (*cmp<X87MODEF:mode>_<SWI24:mode>_i387):
700 Change operand 2 predicate to nonimmediate_operand.
701 (*cmp<X87MODEF:mode>_<SWI24:mode>_cc_i387): Ditto.
703 2018-10-03 Martin Sebor <msebor@redhat.com>
704 Jeff Law <law@redhat.com>
706 * gimple-ssa-sprintf.c (struct fmtresult): Add new member and
708 (get_string_length): Detect unterminated arrays.
709 (format_string): Same.
710 (format_directive): Warn about unterminated arrays.
711 (handle_gimple_call): Mark statements with no_warning as needed.
713 2018-10-03 Jim Wilson <jimw@sifive.com>
715 * config/riscv/riscv-c.c (riscv_cpu_cpp_builtins): For ABI_ILP32E,
716 also define __riscv_abi_rve. Delete trailing white space.
718 2018-10-03 Paul Koning <ni1d@arrl.net>
720 Enable LRA register allocator for PDP11.
721 * config/pdp11/constraints.md (Q): Use define_memory_constraint.
724 * config/pdp11/pdp11.c (pdp11_lra_p): New function.
725 * config/pdp11/pdp11.opt (-mlra): New option.
726 * doc/invoke.texi (PDP-11 Options): Document -mlra.
728 2018-10-03 Uros Bizjak <ubizjak@gmail.com>
730 * config/i386/i386.md (*<absneg:code>extendsfdf2): Remove.
731 (*<absneg:code>extend<mode>xf2): Ditto.
733 2018-10-03 Aldy Hernandez <aldyh@redhat.com>
735 PR tree-optimization/87415
736 * tree-vrp.c (set_value_range_with_overflow): Special case one bit
739 2018-10-02 Jeff Law <law@redhat.com>
741 * gimple-fold.c (get_range_strlen): Only set *nonstr when
742 an unterminated string is discovered. Bubble up range
743 even for unterminated strings.
744 (gimple_fold_builtin_strlen): Do not fold if get_range_strlen
745 indicates the string was not terminated via NONSTR.
747 2018-10-03 Aldy Hernandez <aldyh@redhat.com>
749 * tree-vrp.c (extract_range_from_unary_expr): Special case all
751 Do not do anything special for anti-ranges.
753 2018-10-03 Jérôme Lambourg <lambourg@adacore.com>
755 * config/arm/vxworks.h (ARM_TARGET2_DWARF_FORMAT): Adjust to
756 DW_EH_PE_pcrel | DW_EH_PE_indirect for RTPs.
758 2018-10-03 Martin Liska <mliska@suse.cz>
760 PR gcov-profile/86109
761 * coverage.c (coverage_begin_function): Do not
762 mark lambdas as artificial.
763 * tree-core.h (struct GTY): Remove tm_clone_flag
764 and introduce new lambda_function.
765 * tree.h (DECL_LAMBDA_FUNCTION): New macro.
767 2018-10-02 Aaron Sawdey <acsawdey@linux.ibm.com>
770 * config/rs6000/rs6000-string.c (expand_strn_compare): Check that both
771 P8_VECTOR and VSX are enabled.
773 2018-10-02 Andreas Krebbel <krebbel@linux.ibm.com>
775 * config/s390/driver-native.c (s390_host_detect_local_cpu): Add
776 0x3907 as CPU model number.
778 2018-10-02 Andreas Krebbel <krebbel@linux.ibm.com>
780 * common/config/s390/s390-common.c: Rename PF_ARCH12 to PF_Z14.
781 * config/s390/s390.h (enum processor_flags): Rename PF_ARCH12 to
782 PF_Z14. Rename TARGET_CPU_ARCH12 to TARGET_CPU_Z14,
783 TARGET_CPU_ARCH12_P to TARGET_CPU_Z14_P, TARGET_ARCH12 to
784 TARGET_Z14, and TARGET_ARCH12_P to TARGET_Z14_P.
785 * config/s390/s390.md: Likewise. Rename also the cpu attribute
786 value from arch12 to z14.
788 2018-10-02 Uros Bizjak <ubizjak@gmail.com>
790 * config/i386/i386.md (fxam<mode>2_i387_with_temp): Remove.
792 (isinf<mode>2): Ditto.
794 2018-10-02 Uros Bizjak <ubizjak@gmail.com>
796 * config/i386/i386.c (ix86_emit_i387_round): Extend op1 to XFmode
797 before emitting fxam. Perform calculations in XFmode.
799 2018-10-02 Marc Glisse <marc.glisse@inria.fr>
801 * match.pd (((X /[ex] A) +- B) * A): New transformation.
803 2018-10-02 Marc Glisse <marc.glisse@inria.fr>
806 * fold-const.c (fold_plusminus_mult_expr): Handle complex and vectors.
807 * tree.c (signed_or_unsigned_type_for): Handle complex.
809 2018-10-02 Jeff Law <law@redhat.com>
811 * gimple-fold.c (get_range_strlen): Remove dead code.
813 2018-10-02 Martin Sebor <msebor@redhat.com>
814 Jeff Law <law@redhat.com>
816 * builtins.c (unterminated_array): Add new arguments.
817 If argument is not terminated, bubble up size and exact
819 (expand_builtin_strnlen): Detect, avoid expanding
820 and diagnose unterminated arrays.
821 (c_strlen): Fill in offset of start of unterminated strings.
822 * builtins.h (unterminated_array): Update prototype.
824 2018-10-02 Richard Biener <rguenther@suse.de>
826 * config/i386/sse.md (reduc_plus_scal_v4df): Avoid the use
827 of haddv4df, first reduce to SSE width and exploit the fact
828 that we only need element zero with the reduction result.
829 (reduc_plus_scal_v2df): Likewise.
831 2018-10-02 Eric Botcazou <ebotcazou@adacore.com>
833 * dojump.h (do_jump): Delete.
834 (do_jump_1): Likewise.
835 (split_comparison): Move around.
836 * dojump.c (do_jump): Make static.
837 (do_jump_1): Likewise.
838 (jumpifnot): Move around.
839 (jumpifnot_1): Likewise.
841 (jumpif_1): Likewise.
842 * expr.c (expand_expr_real_1): Call jumpif[not] instead of do_jump.
844 2018-10-02 Eric Botcazou <ebotcazou@adacore.com>
846 * reorg.c (make_return_insns): Use emit_copy_of_insn_after for the
847 insns in the delay slot and add_insn_after for the jump insn.
849 2018-10-02 Richard Biener <rguenther@suse.de>
851 * tree-inline.c (expand_call_inline): Use the location of
852 the callee declaration for the inline-entry marker.
853 * final.c (notice_source_line): Remove special-casing of
854 NOTE_INSN_INLINE_ENTRY.
856 2018-10-01 Carl Love <cel@us.ibm.com>
859 * config/rs6000/rs6000-builtin.def (__builtin_mffsl): New.
860 (__builtin_mtfsb0): New.
861 (__builtin_mtfsb1): New.
862 ( __builtin_set_fpscr_rn): New.
863 (__builtin_set_fpscr_drn): New.
864 * config/rs6000/rs6000.c (rs6000_expand_mtfsb_builtin): Add.
865 (rs6000_expand_set_fpscr_rn_builtin): Add.
866 (rs6000_expand_set_fpscr_drn_builtin): Add.
867 (rs6000_expand_builtin): Add case statement entries for
868 RS6000_BUILTIN_MTFSB0, RS6000_BUILTIN_MTFSB1,
869 RS6000_BUILTIN_SET_FPSCR_RN, RS6000_BUILTIN_SET_FPSCR_DRN,
870 RS6000_BUILTIN_MFFSL.
871 (rs6000_init_builtins): Add ftype initialization and def_builtin
872 calls for __builtin_mffsl, __builtin_mtfsb0, __builtin_mtfsb1,
873 __builtin_set_fpscr_rn, __builtin_set_fpscr_drn.
874 * config/rs6000.md (rs6000_mtfsb0, rs6000_mtfsb1, rs6000_mffscrn,
875 rs6000_mffscdrn): Add define_insn.
876 (rs6000_set_fpscr_rn, rs6000_set_fpscr_drn): Add define_expand.
877 * doc/extend.texi: Add documentation for the builtins.
879 2018-10-01 Richard Biener <rguenther@suse.de>
881 PR tree-optimization/87465
882 * tree-ssa-loop-ivcanon.c (tree_estimate_loop_size): Fix typo
883 causing branch miscounts.
885 2018-10-01 Tamar Christina <tamar.christina@arm.com>
887 * common/config/aarch64/aarch64-common.c (TARGET_OPTION_DEFAULT_PARAM,
888 aarch64_option_default_param): New.
890 (TARGET_OPTION_VALIDATE_PARAM, aarch64_option_validate_param): New.
891 * config/aarch64/aarch64.c (aarch64_override_options_internal): Simplify
892 stack-clash protection validation code.
894 2018-10-01 Tamar Christina <tamar.christina@arm.com>
896 * params.c (validate_param): New.
897 (add_params): Use it.
898 (set_param_value): Refactor param validation into validate_param.
899 (diagnostic.h): Include.
900 * diagnostic.h (diagnostic_ready_p): New.
902 2018-10-01 Tamar Christina <tamar.christina@arm.com>
904 * params.c (set_param_value):
905 Add index of parameter being validated.
906 * common/common-target.def (option_validate_param): New.
907 * common/common-targhooks.h (default_option_validate_param): New.
908 * common/common-targhooks.c (default_option_validate_param): New.
909 * doc/tm.texi.in (TARGET_OPTION_VALIDATE_PARAM): New.
910 * doc/tm.texi: Regenerate.
912 2018-10-01 Tamar Christina <tamar.christina@arm.com>
915 * config/aarch64/aarch64.c (aarch64_override_options_internal):
916 Add validation for stack-clash parameters and set defaults.
918 2018-10-01 Tamar Christina <tamar.christina@arm.com>
921 * configure.ac: Add stack-clash-protection-guard-size.
922 * doc/install.texi: Document it.
923 * config.in (DEFAULT_STK_CLASH_GUARD_SIZE): New.
924 * params.def: Update comment for guard-size.
925 (PARAM_STACK_CLASH_PROTECTION_GUARD_SIZE,
926 PARAM_STACK_CLASH_PROTECTION_PROBE_INTERVAL): Update description.
927 * configure: Regenerate.
929 2018-10-01 Tamar Christina <tamar.christina@arm.com>
932 * config/aarch64/aarch64.h (STACK_CLASH_MIN_BYTES_OUTGOING_ARGS,
933 STACK_DYNAMIC_OFFSET): New.
934 * config/aarch64/aarch64.c (aarch64_layout_frame):
935 Update outgoing args size.
936 (aarch64_stack_clash_protection_alloca_probe_range,
937 TARGET_STACK_CLASH_PROTECTION_ALLOCA_PROBE_RANGE): New.
939 2018-10-01 Tamar Christina <tamar.christina@arm.com>
942 * explow.c (anti_adjust_stack_and_probe_stack_clash): Support custom
944 * target.def (stack_clash_protection_alloca_probe_range): New.
945 (stack_clash_protection_final_dynamic_probe): Remove.
946 * targhooks.h (default_stack_clash_protection_alloca_probe_range) New.
947 (default_stack_clash_protection_final_dynamic_probe): Remove.
948 * targhooks.c: Likewise.
949 * doc/tm.texi.in (TARGET_STACK_CLASH_PROTECTION_ALLOCA_PROBE_RANGE): New.
950 (TARGET_STACK_CLASH_PROTECTION_FINAL_DYNAMIC_PROBE): Remove.
951 * doc/tm.texi: Regenerate.
953 2018-10-01 Tamar Christina <tamar.christina@arm.com>
956 * config/aarch64/aarch64-protos.h (aarch64_output_probe_sve_stack_clash): New.
957 * config/aarch64/aarch64.c (aarch64_output_probe_sve_stack_clash,
958 aarch64_clamp_to_uimm12_shift): New.
959 (aarch64_allocate_and_probe_stack_space): Add SVE specific section.
960 * config/aarch64/aarch64.md (probe_sve_stack_clash): New.
962 2018-10-01 Tamar Christina <tamar.christina@arm.com>
965 * config/aarch64/aarch64.c (aarch64_layout_frame): Add assert.
967 2018-10-01 Jeff Law <law@redhat.com>
968 Richard Sandiford <richard.sandiford@linaro.org>
969 Tamar Christina <tamar.christina@arm.com>
972 * config/aarch64/aarch64.md
973 (probe_stack_range): Add k (SP) constraint.
974 * config/aarch64/aarch64.h (STACK_CLASH_CALLER_GUARD,
975 STACK_CLASH_MAX_UNROLL_PAGES): New.
976 * config/aarch64/aarch64.c (aarch64_output_probe_stack_range): Emit
977 stack probes for stack clash.
978 (aarch64_allocate_and_probe_stack_space): New.
979 (aarch64_expand_prologue): Use it.
980 (aarch64_expand_epilogue): Likewise and update IP regs re-use criteria.
981 (aarch64_sub_sp): Add emit_move_imm optional param.
983 2018-10-01 MCC CS <deswurstes@users.noreply.github.com>
985 PR tree-optimization/87261
986 * match.pd: Remove trailing whitespace.
987 Add (x & y) | ~(x | y) -> ~(x ^ y),
988 (~x | y) ^ (x ^ y) -> x | ~y and (x ^ y) | ~(x | y) -> ~(x & y)
990 2018-10-01 Claudiu Zissulescu <claziss@synopsys.com>
992 * config/arc/arc.md (*add_n): Clean up pattern, update instruction
994 (ashlsi3_insn): Update instruction constraints.
995 (ashrsi3_insn): Likewise.
997 (add_shift): Likewise.
998 * config/arc/constraints.md (Csz): New 32 bit constraint. It
999 avoids placing in the limm field small constants which, otherwise,
1000 could end into a small instruction.
1002 2018-10-01 Claudiu Zissulescu <claziss@synopsys.com>
1004 * config/arc/arc.md (maddsidi4_split): Don't use dmac if the
1005 destination register is not odd-even.
1006 (umaddsidi4_split): Likewise.
1008 2018-10-01 Richard Biener <rguenther@suse.de>
1010 * tree-inline.c (expand_call_inline): Store origin of fn
1011 in BLOCK_ABSTRACT_ORIGIN for the inline BLOCK.
1012 * tree.c (block_ultimate_origin): Simplify and do some
1015 2018-09-30 Uros Bizjak <ubizjak@gmail.com>
1017 * config/i386/mmx.md (EMMS): New int iterator.
1018 (emms): New int attribute.
1019 (mmx_<emms>): Macroize insn from *mmx_emms and *mmx_femms using
1020 EMMS int iterator. Explicitly declare clobbers.
1021 (mmx_emms): Remove expander.
1023 * config/i386/predicates.md (emms_operation): Remove predicate.
1024 (vzeroall_pattern): New predicate.
1025 (vzeroupper_pattern): Rename from vzeroupper_operation.
1026 * config/i386/i386.c (ix86_avx_u128_mode_after): Use
1027 vzeroupper_pattern and vzeroall_pattern predicates.
1029 2018-09-30 Peter Bergner <bergner@linux.ibm.com>
1031 PR rtl-optimization/86939
1032 * ira-lives.c (make_hard_regno_born): Rename from this...
1033 (make_hard_regno_live): ... to this. Remove update to conflict
1034 information. Update function comment.
1035 (make_hard_regno_dead): Add conflict information update. Update
1037 (make_object_born): Rename from this...
1038 (make_object_live): ... to this. Remove update to conflict information.
1039 Update function comment.
1040 (make_object_dead): Add conflict information update. Update function
1042 (mark_pseudo_regno_live): Call make_object_live.
1043 (mark_pseudo_regno_subword_live): Likewise.
1044 (mark_hard_reg_dead): Update function comment.
1045 (mark_hard_reg_live): Call make_hard_regno_live.
1046 (process_bb_node_lives): Likewise.
1047 * lra-lives.c (make_hard_regno_born): Rename from this...
1048 (make_hard_regno_live): ... to this. Remove update to conflict
1049 information. Remove now uneeded check_pic_pseudo_p argument.
1050 Update function comment.
1051 (make_hard_regno_dead): Add check_pic_pseudo_p argument and add update
1052 to conflict information. Update function comment.
1053 (mark_pseudo_live): Remove update to conflict information. Update
1055 (mark_pseudo_dead): Add conflict information update.
1056 (mark_regno_live): Call make_hard_regno_live.
1057 (mark_regno_dead): Call make_hard_regno_dead with new arguement.
1058 (process_bb_lives): Call make_hard_regno_live and make_hard_regno_dead.
1060 2018-09-29 H.J. Lu <hongjiu.lu@intel.com>
1063 * config/i386/i386.c (construct_container): Use TImode for
1064 BLKmode values in 2 integer registers.
1066 2018-09-29 Jeff Law <law@redhat.com>
1068 * builtins.c (unterminated_array): Pass in c_strlen_data * to
1069 c_strlen rather than just a tree *.
1070 (c_strlen): Change NONSTR argument to a c_strlen_data pointer.
1071 Update recursive calls appropriately. If caller did not provide a
1072 suitable data pointer, create a local one. When a non-terminated
1073 string is discovered, bubble up information about the string via the
1074 c_strlen_data object.
1075 * builtins.h (c_strlen): Update prototype.
1076 (c_strlen_data): New structure.
1077 * gimple-fold.c (get_range_strlen): Update calls to c_strlen.
1078 For a type 2 call, if c_strlen indicates a non-terminated string
1079 use the length of the non-terminated string.
1080 (gimple_fold_builtin_stpcpy): Update calls to c_strlen.
1082 2018-09-29 Jakub Jelinek <jakub@redhat.com>
1085 * config/i386/avx512fintrin.h (_mm512_abs_pd, _mm512_mask_abs_pd): Use
1086 __m512d type for __A argument rather than __m512.
1088 2018-09-28 John David Anglin <danglin@gcc.gnu.org>
1090 * match.pd (simple_comparison): Don't optimize if either operand is
1091 a function pointer when target needs function pointer canonicalization.
1093 2018-09-28 Segher Boessenkool <segher@kernel.crashing.org>
1095 * config/rs6000/driver-rs6000.c (asm_names): Adjust the entries for
1096 power5 .. power9 to remove indirection.
1097 * config/rs6000/rs6000.h (ASM_CPU_POWER5_SPEC, ASM_CPU_POWER6_SPEC,
1098 ASM_CPU_POWER7_SPEC, ASM_CPU_POWER8_SPEC, ASM_CPU_POWER9_SPEC,
1099 ASM_CPU_476_SPEC): Delete.
1100 (ASM_CPU_SPEC): Adjust.
1101 (EXTRA_SPECS): Delete asm_cpu_power5, asm_cpu_power6, asm_cpu_power7,
1102 asm_cpu_power8, asm_cpu_power9, asm_cpu_476.
1104 2018-09-28 Segher Boessenkool <segher@kernel.crashing.org>
1106 * config.in: Delete HAVE_AS_DCI.
1107 * config/powerpcspe/powerpcspe.h: Treat HAVE_AS_DCI as always true.
1108 * config/rs6000/rs6000.h: Ditto.
1109 * configure.ac: Delete HAVE_AS_DCI.
1110 * configure: Regenerate.
1112 2018-09-28 Segher Boessenkool <segher@kernel.crashing.org>
1114 * config.in (HAVE_AS_LWSYNC): Delete.
1115 * config/powerpcspe/powerpcspe.h (TARGET_LWSYNC_INSTRUCTION): Delete.
1116 * config/powerpcspe/sync.md (*lwsync): Always generate lwsync, never
1118 * config/rs6000/rs6000.h (TARGET_LWSYNC_INSTRUCTION): Delete.
1119 * config/rs6000/sync.md (*lwsync): Always generate lwsync, never do it
1121 * configure.ac: Delete HAVE_AS_LWSYNC.
1122 * configure: Regenerate.
1124 2018-09-28 Eric Botcazou <ebotcazou@adacore.com>
1125 Pierre-Marie de Rodat <derodat@adacore.com>
1127 * calls.c (expand_call): Try to do a tail call for thunks at -O0 too.
1128 * cgraph.h (struct cgraph_thunk_info): Add indirect_offset.
1129 (cgraph_node::create_thunk): Add indirect_offset parameter.
1130 (thunk_adjust): Likewise.
1131 * cgraph.c (cgraph_node::create_thunk): Add indirect_offset parameter
1132 and initialize the corresponding field with it.
1133 (cgraph_node::dump): Dump indirect_offset field.
1134 * cgraphclones.c (duplicate_thunk_for_node): Deal with indirect_offset.
1135 * cgraphunit.c (cgraph_node::analyze): Be prepared for external thunks.
1136 (thunk_adjust): Add indirect_offset parameter and deal with it.
1137 (cgraph_node::expand_thunk): Deal with the indirect_offset field and
1138 pass it to thunk_adjust. Do not call the target hook if it's non-zero
1139 or if the thunk is external or local. Fix formatting. Do not chain
1140 the RESULT_DECL to BLOCK_VARS. Pass the static chain to the target,
1141 if any, in the GIMPLE representation.
1142 * ipa-icf.c (sem_function::equals_wpa): Deal with indirect_offset.
1143 * lto-cgraph.c (lto_output_node): Write indirect_offset field.
1144 (input_node): Read indirect_offset field.
1145 * tree-inline.c (expand_call_inline): Pass indirect_offset field in the
1146 call to thunk_adjust.
1147 * tree-nested.c (struct nesting_info): Add thunk_p field.
1148 (create_nesting_tree): Set it.
1149 (convert_all_function_calls): Copy static chain from targets to thunks.
1150 (finalize_nesting_tree_1): Return early for thunks.
1151 (unnest_nesting_tree_1): Do not finalize thunks.
1152 (gimplify_all_functions): Do not gimplify thunks.
1154 2018-09-28 David Malcolm <dmalcolm@redhat.com>
1156 * opt-suggestions.c (option_proposer::build_option_suggestions):
1157 Release "option_values".
1159 2018-09-28 David Malcolm <dmalcolm@redhat.com>
1161 * coverage.c (get_coverage_counts): Convert problem-reporting dump
1162 messages from MSG_OPTIMIZED_LOCATIONS to MSG_MISSED_OPTIMIZATION.
1163 * dumpfile.c (kind_as_string): New function.
1164 (dump_loc): Rather than a hardcoded prefix of "note: ", use
1165 kind_as_string to vary the prefix based on dump_kind.
1166 (selftest::test_capture_of_dump_calls): Update for above.
1168 2018-09-28 Uros Bizjak <ubizjak@gmail.com>
1170 * config/i386/i386.h (SSE_REGNO): Fix check for FIRST_REX_SSE_REG.
1171 (GET_SSE_REGNO): Rename from SSE_REGNO. Update all uses for rename.
1173 2018-09-28 Uros Bizjak <ubizjak@gmail.com>
1175 * config/i386/i386.h (CC_REGNO): Remove FPSR_REG.
1176 * config/i386/i386.c (ix86_fixed_condition_code_regs): Use
1177 INVALID_REGNUM instead of FPSR_REG.
1178 (ix86_md_asm_adjust): Do not clobber FPSR_REG.
1179 * config/i386/i386.md: Update comment of FP compares.
1180 (fldenv): Do not clobber FPSR_REG.
1182 2018-09-28 Richard Biener <rguenther@suse.de>
1184 * tree.h (BLOCK_ORIGIN): New.
1185 * omp-expand.c (grid_expand_target_grid_body): Assign
1186 BLOCK_ORIGIN to BLOCK_ABSTRACT_ORIGIN.
1187 * tree-inline.c (remap_block): Likewise.
1188 * auto-profile.c (get_function_decl_from_block): Simplify
1189 by eliding the BLOCK_ABSTRACT_ORIGIN chasing.
1190 * langhooks.c (lhd_print_error_function): Likewise.
1191 * optinfo-emit-json.cc (optrecord_json_writer::inlining_chain_to):
1193 * tree-ssa-live.c (remove_unused_scope_block_p): Likewise.
1194 * tree.c (block_nonartificial_location): Likewise.
1195 (block_ultimate_origin): Likewise.
1196 * tree-pretty-print.c (percent_K_format): Likewise. Remove
1197 no longer needed LTO case.
1199 2018-09-28 Andrew Stubbs <ams@codesourcery.com>
1200 Jan Hubicka <jh@suse.cz>
1201 Martin Jambor <mjambor@suse.cz>
1203 * simplify-rtx.c (simplify_merge_mask): New function.
1204 (simplify_ternary_operation): Use it, also see if VEC_MERGEs with the
1205 same masks are used in op1 or op2.
1206 (test_vec_merge): New function.
1207 (test_vector_ops): Call test_vec_merge.
1209 2018-09-28 Eric Botcazou <ebotcazou@adacore.com>
1211 * config/sparc/sparc-protos.h (sparc_branch_cost): Declare.
1212 * config/sparc/sparc.h (BRANCH_COST): Call sparc_branch_cost.
1213 * config/sparc/sparc.c (struct processor_costs): Add branch_cost field.
1214 (cypress_costs): Set it.
1215 (supersparc_costs): Likewise.
1216 (hypersparc_costs): Likewise.
1217 (leon_cost): Likewise.
1218 (leon3_costs): Likewise.
1219 (sparclet_costs): Likewise.
1220 (ultrasparc_costs): Likewise.
1221 (ultrasparc_costs): Likewise.
1222 (niagara_costs): Likewise.
1223 (niagara2_costs): Likewise.
1224 (niagara3_costs): Likewise.
1225 (niagara4_costs): Likewise.
1226 (niagara7_costs): Likewise.
1227 (m8_costs): Likewise.
1228 (TARGET_CAN_FOLLOW_JUMP): Define.
1229 (pass_work_around_errata::gate): Minor tweak.
1230 (sparc_option_override): Remove MASK_FSMULD mask for V7 processors.
1231 Do not set both MASK_VIS4 and MASK_VIS4B for M8 processor.
1232 Automaitcally clear MASK_FSMULD mask for V7 processors.
1233 (sparc_can_follow_jump): New static function.
1234 (output_ubranch): Deal with CROSSING_JUMP_P.
1235 (sparc_use_sched_lookahead): Rewrite using switch statement.
1236 (sparc_issue_rate): Reorder.
1237 (sparc_branch_cost): New function.
1239 2018-09-27 Martin Sebor <msebor@redhat.com>
1241 * tree.h (tree_to_shwi): Add attribute nonnull and pure.
1242 (tree_to_poly_int64, tree_to_uhwi, tree_to_poly_uint64): Same.
1243 (int_fits_type_p): Same.
1245 2018-09-27 Uros Bizjak <ubizjak@gmail.com>
1247 * config/i386/i386.md (FPCR_REG): Remove.
1248 (UNSPEC_FLDCW): Remove.
1249 (x86_fnstcw_1): Use (const_int 0) instead of FPCR_REG.
1250 (x86_fldcw_1): Remove insn pattern.
1251 (fnstenv): Do not clobber FPCR_REG.
1253 * config/i386/i386.h (FIXED_REGISTERS) Remove fpsr register.
1254 (CALL_USED_REGISTERS): Ditto.
1255 (REG_ALLOC_ORDER): Ditto.
1256 (REG_CLASS_CONTENTS): Ditto.
1257 (HI_REGISTER_NAMES): Ditto.
1258 (ADDITIONAL_REGISTER_NAMES): Use defines instead
1259 of numerical constants.
1260 * config/i386/i386.c (regclass_map): Remove fpsr register.
1261 (dbx_register_map): Ditto.
1262 (dbx64_register_map): Ditto.
1263 (svr4_dbx_register_map): Ditto.
1264 (print_reg): Do not handle FPCR_REG.
1266 2018-09-27 Segher Boessenkool <segher@kernel.crashing.org>
1269 * config.in (HAVE_AS_CMPB, HAVE_AS_DFP, HAVE_AS_FPRND, HAVE_AS_MFPGPR,
1270 HAVE_AS_POPCNTB, HAVE_AS_POPCNTD, HAVE_AS_POWER8, HAVE_AS_POWER9):
1271 Delete, always treat as true.
1272 * config/powerpcspe/powerpcspe.c (rs6000_option_override_internal):
1273 Ditto. Simplify remaining code.
1274 * config/powerpcspe/powerpcspe.h: Ditto.
1275 * config/rs6000/rs6000.c (rs6000_option_override_internal): Ditto.
1276 Simplify remaining code.
1277 (rs6000_expand_builtin): Ditto.
1278 * config/rs6000/rs6000.h: Ditto.
1279 * configure.ac: Ditto.
1280 * configure: Regenerate.
1282 2018-09-27 Martin Liska <mliska@suse.cz>
1284 * coverage.c (get_coverage_counts): Revert the formatting
1285 of missing profile opt info.
1287 2018-09-27 Richard Biener <rguenther@suse.de>
1291 * dwarf2out.c (set_block_origin_self): Do not mark outermost
1292 block as we do not output that.
1293 (gen_inlined_subroutine_die): Elide the originally outermost
1294 block, matching what we do for concrete instances.
1295 (decls_for_scope): Add parameter specifying whether to recurse
1298 2018-09-27 Andrew Stubbs <ams@codesourcery.com>
1299 Tom de Vries <tom@codesourcery.com>
1303 * expmed.c (emit_cstore): Fix handling of result_mode == BImode and
1304 STORE_FLAG_VALUE == 1.
1306 2018-09-27 Andreas Krebbel <krebbel@linux.ibm.com>
1308 * config/s390/s390.md (PPA_TX_ABORT, PPA_OOO_BARRIER): New
1309 constant definitions.
1310 ("tx_assist"): Replace magic number with PPA_TX_ABORT.
1311 ("*ppa"): Enable pattern also for -march=zEC12 -mno-htm.
1312 ("speculation_barrier"): New expander definition.
1314 2018-09-26 Indu Bhagat <indu.bhagat@oracle.com>
1316 PR gcov-profile/86957
1317 * common.opt: New warning option -Wmissing-profile.
1318 * coverage.c (get_coverage_counts): Add warning for missing .gcda file.
1319 * doc/invoke.texi: Document -Wmissing-profile.
1321 2018-09-26 Jim Wilson <jimw@sifive.com>
1323 * config/riscv/riscv.md (subsi3_extended2): Add J constraint.
1324 (negdi2, negsi2, negsi2_extended, negsi2_extended2): New.
1326 2018-09-26 Martin Sebor <msebor@redhat.com>
1328 * tree.c (zerop): Change return type to bool.
1329 (integer_zerop, integer_onep, integer_each_onep): Same.
1330 (integer_all_onesp, integer_minus_onep, integer_pow2p): Same.
1331 (integer_nonzerop, integer_truep, tree_ctz, real_zerop): Same.
1332 (real_onep, real_minus_onep, chain_index): Same.
1333 (print_type_hash_statistics, type_list_equal): Same.
1334 * tree.h (zerop): Same.
1335 (zerop, integer_zerop, integer_onep, integer_each_onep): Same.
1336 (integer_all_onesp, integer_minus_onep, integer_pow2p): Same.
1337 (integer_nonzerop, integer_truep, tree_ctz, real_zerop): Same.
1338 (real_onep, real_minus_onep, chain_index): Same.
1339 (print_type_hash_statistics, type_list_equal): Same.
1341 2018-09-26 Jim Wilson <jimw@sifive.com>
1343 * config/riscv/riscv.h (FUNCTION_ARG_REGNO_P): Fix comment.
1345 2018-09-26 Jakub Jelinek <jakub@redhat.com>
1348 * config/i386/i386.c: Include debug.h and dwarf2out.h.
1349 (output_indirect_thunk): Emit DW_CFA_def_cfa_offset after the
1352 2018-09-25 Andrew Stubbs <ams@codesourcery.com>
1354 * builtins.c (get_builtin_sync_mem): Force address mode conversion.
1356 2018-09-26 Uros Bizjak <ubizjak@gmail.com>
1358 * config/i386/i386.h (enum reg_class): Remove FP_TOP_SSE_REGS
1359 and FP_SECOND_SSE_REGS.
1360 (REG_CLASS_NAMES): Ditto.
1361 (REG_CLASS_CONTENTS): Ditto.
1362 * config/i386/i386.c (ix86_preferred_reload_class) Do not handle
1363 FP_TOP_SSE_REGS and FP_SECOND_SSE_REGS classes.
1364 (ix86_preferred_output_reload_class): Ditto.
1365 * config/i386/i386.md (fix_trunc<mode>_i387_fisttp): Change "=&1f"
1366 clobber constraint to "=&f".
1367 (fix_truncdi_i387): Ditto.
1368 (lrintxfdi2): Ditto.
1369 (fistdi2_<rounding>): Ditto.
1370 (fpremxf4_i387): Change "=u" constraint to "=f".
1371 (fprem1xf4_i387): Ditto.
1373 (fptanxf4_i387): Ditto.
1374 (fxtractxf3_i387): Ditto.
1375 (fscalexf4_i387): Ditto.
1376 (atan2xf3): Change "u" constraint to "f".
1377 (fyl2xxf3_i387): Ditto.
1378 (fyl2xp1xf3_i387): Ditto.
1380 2018-09-26 Uros Bizjak <ubizjak@gmail.com>
1383 * config/i386/i386.h (NUM_MODES_FOR_MODE_SWITCHING): Update
1384 for removed I387_MASK_PM entity.
1387 2018-09-26 Jeff Law <law@redhat.com>
1389 2018-09-26 Alexey Neyman <stilor@att.net>
1391 * graphite.h: Include <isl/id.h> and <isl/space.h>; these
1392 headers are no longer pulled in by <isl/val.h>.
1394 2018-09-26 Richard Biener <rguenther@suse.de>
1397 * dwarf2out.c (gen_lexical_block_die): Do not equate inline
1398 or concrete instance DIE to the tree. Create abstract origin
1399 attributes also for concrete instances.
1401 2018-09-26 Alexey Neyman <stilor@att.net>
1403 * graphite.h: Include <isl/id.h> and <isl/space.h>; these
1404 headers are no longer pulled in by <isl/val.h>.
1406 2018-09-26 Matthew Malcomson <matthew.malcomson@arm.com>
1408 * config/arm/arm.c (arm_split_compare_and_swap, arm_split_atomic_op):
1409 Use new helper functions.
1410 * config/arm/sync.md (atomic_load<mode>, atomic_store<mode>):
1411 Use new helper functions.
1412 * config/arm/aarch-common-protos.h (aarch_mm_needs_acquire,
1413 aarch_mm_needs_release): New declarations.
1414 * config/arm/aarch-common.c (aarch_mm_needs_acquire,
1415 aarch_mm_needs_release): New.
1417 2018-09-26 Eric Botcazou <ebotcazou@adacore.com>
1419 * config/arm/arm.c (arm_reorg): Skip Thumb reorg pass for thunks.
1420 (arm32_output_mi_thunk): Deal with long calls.
1422 2018-09-26 Richard Biener <rguenther@suse.de>
1426 * tree-inline.c (expand_call_inline): When the location
1427 of the call is UNKNOWN_LOCATION use DECL_SOURCE_LOCATION
1428 or BUILTINS_LOCATION for the BLOCK_SOURCE_LOCATION of
1429 the inserted BLOCK to make inlined_function_outer_scope_p
1431 * dwarf2out.c (add_call_src_coords_attributes): Do not add
1432 coords for reserved locations.
1434 2018-09-25 Segher Boessenkool <segher@kernel.crashing.org>
1436 * config/rs6000/rs6000.md (*movcc_internal1): Use set_attr_alternative.
1437 (*call_indirect_nonlocal_sysv<mode>): Ditto.
1438 (*call_value_indirect_nonlocal_sysv<mode>): Ditto.
1439 (*sibcall_nonlocal_sysv<mode>): Ditto.
1440 (*sibcall_value_nonlocal_sysv<mode>): Ditto.
1441 (<bd>_<mode>): Ditto.
1442 (<bd>tf_<mode>): Ditto.
1444 2018-09-25 Segher Boessenkool <segher@kernel.crashing.org>
1446 * config/rs6000/altivec.md (*altivec_mov<mode>): Write the output
1447 control string as a list of templates instead of as C code.
1448 (*altivec_movti): Ditto.
1449 * config/rs6000/darwin.md (movdf_low_di): Ditto.
1451 2018-09-25 Jim Wilson <jimw@sifive.com>
1453 * config/riscv/riscv.c (riscv_split_symbol): Mark auipc label as weak
1454 when target symbol is weak.
1456 2018-09-25 Bernd Edlinger <bernd.edlinger@hotmail.de>
1459 * builtins.c (unterminated_array): Simplify.
1460 * expr.c (string_constant): Handle SSA_NAME. Add more exceptions
1461 where pointer arithmetic is safe.
1463 2018-09-25 Segher Boessenkool <segher@kernel.crashing.org>
1466 * config/rs6000/altivec.md (altivec_vspltb): Use
1467 const_0_to_15_operand instead of u5bit_cint_operand.
1468 (*altivec_vspltb_internal): Ditto.
1469 (altivec_vspltb_direct): Ditto.
1470 (altivec_vsplth): Use const_0_to_7_operand instead of
1472 (*altivec_vsplth_internal): Ditto.
1473 (altivec_vsplth_direct): Ditto.
1474 (altivec_vspltw): Use const_0_to_3_operand instead of
1476 (*altivec_vspltw_internal): Ditto.
1477 (altivec_vspltw_direct): Ditto.
1478 (altivec_vspltsf): Ditto.
1479 (*altivec_vspltsf_internal): Ditto.
1480 * config/rs6000/rs6000.c (rs6000_expand_binop_builtin): Handle the
1481 various splats with the proper size immediate. Reorder the various
1482 cases by ascending size of immediate, and put all such together.
1484 2018-09-25 Richard Biener <rguenther@suse.de>
1487 * dwarf2out.c (add_AT_external_die_ref): Remove now redundant
1489 (maybe_create_die_with_external_ref): Do not create
1490 DW_TAG_imported_unit here.
1491 (add_abstract_origin_attribute): Handle external BLOCK refs.
1492 (dwarf2out_abstract_function): Simplify LTO case.
1493 (dwarf2out_early_finish): Create DW_TAG_imported_unit explicitely
1494 rather than using maybe_create_die_with_external_ref.
1496 2018-09-25 Uros Bizjak <ubizjak@gmail.com>
1499 * config/i386/i386.md (frndintxf2_mask_pm): Remove.
1500 (frndintxf2_mask_pm_i387): Ditto.
1501 (nearbyintxf2): Rewrite expander pattern to match rintxf2.
1502 Enable for !flag_trapping_math.
1503 (nearbyint<mode>2): Enable x87 modes for !flag_trapping_math.
1504 Enable SSE modes for TARGET_SSE4_1 and expand them with round insn.
1505 Change operand 1 predicate to nonimmediate_operand.
1506 (attr "i387_cw"): Remove mask_pm.
1507 * config/i386/i386.h (enum ix86_stack_slot): Remove SLOT_CW_MASK_PM.
1508 (enum ix86_entity): Remove I387_MASK_PM.
1509 * config/i386/i386.c (ix86_i387_mode_needed): Do not
1510 handle I387_MASK_PM.
1511 (ix86_mode_needed): Ditto.
1512 (ix86_mode_after): Ditto.
1513 (ix86_mode_entry): Ditto.
1514 (ix86_mode_exit): Ditto.
1515 (emit_i387_cw_initialization): Do not handle I387_CW_MASK_PM.
1517 2018-09-25 Jakub Jelinek <jakub@redhat.com>
1519 * vr-values.c (vr_values::vr_values): Initialize to_remove_edges and
1520 to_update_switch_stmts to vNULL instead of calling create on them
1523 2018-09-25 Richard Biener <rguenther@suse.de>
1525 PR tree-optimization/87402
1526 * tree-ssa-sccvn.c (SSA_VISITED): Remove unused function.
1527 (visit_phi): Re-instantiate handling of supposed to be VARYING
1528 but non-VARYING backedge value.
1530 2018-09-25 Richard Biener <rguenther@suse.de>
1533 * dwarf2out.c (struct sym_off_pair): New.
1534 (external_die_map): New global.
1535 (lookup_decl_die): When in LTO create DIEs lazily from the
1537 (lookup_block_die): New function, create DIEs lazily in LTO.
1538 (equate_block_to_die): New function.
1539 (dwarf2out_die_ref_for_decl): During WPA get the association
1540 from the external DIE map.
1541 (dwarf2out_register_external_die): Record mapping into the
1543 (maybe_create_die_with_external_ref): New function split out from
1544 DIE generation part of old dwarf2out_register_external_die.
1545 (add_abstract_origin_attribute): Do not return the DIE. When
1546 in LTO reference externals directly.
1547 (dwarf2out_abstract_function): When in LTO ignore calls for
1548 decls with external DIEs (already present abstract instances).
1549 (gen_call_site_die): Adjust.
1550 (add_high_low_attributes): Likewise.
1551 (gen_lexical_block_die): Likewise.
1552 (gen_inlined_subroutine_die): Likewie.
1553 (gen_block_die): Likewise.
1554 (dwarf2out_inline_entry): Likewise.
1555 (dwarf2out_early_finish): In LTRANS phase create DW_TAG_imported_unit
1558 2018-09-25 Martin Liska <mliska@suse.cz>
1560 * ipa-fnsummary.c (estimate_node_size_and_time): Scale by two
1561 integers and not by a float value.
1563 2018-09-25 Martin Liska <mliska@suse.cz>
1566 * dbgcnt.c (dbg_cnt_process_single_pair): Return false
1568 * dumpfile.c (dump_enable_all): Remove extra parenthesis.
1569 * gcov-tool.c: Declare the function with ATTRIBUTE_NORETURN.
1570 * godump.c (go_format_type): Remove extra parenthesis.
1572 2018-09-25 Martin Liska <mliska@suse.cz>
1574 * alias.c (set_dest_equal_p): Remove unused function.
1575 * config/i386/i386.c (def_builtin_pure2): Likewise.
1576 * diagnostic-show-locus.c (class layout): Remove
1578 (layout::layout): Likewise here.
1579 * dump-context.h (class temp_dump_context): Likewise.
1580 * dwarf2out.c (add_AT_fde_ref): Remove unused function.
1581 (add_AT_loclistsptr): Likewise.
1582 (add_AT_offset): Likewise.
1583 (get_AT_hi_pc): Likewise.
1584 (is_comdat_die): Likewise.
1585 (type_is_enum): Likewise.
1586 (ceiling): Likewise.
1587 (add_AT_vms_delta): Likewise.
1588 (is_class_die): Likewise.
1589 * edit-context.c (class line_event): Remove unused field.
1590 * graphite-sese-to-poly.c (tree_int_to_gmp): Remove
1592 * ipa-cp.c (ipa_get_vr_lat): Likewise.
1593 * lra-constraints.c (ok_for_index_p_nonstrict): Likewise.
1594 (ok_for_base_p_nonstrict): Likewise.
1595 * tree-chrec.c (is_not_constant_evolution): Likewise.
1596 (chrec_fold_poly_cst): Likewise.
1597 * tree-if-conv.c (has_pred_critical_p): Likewise.
1598 * tree-ssa-coalesce.c (print_exprs): Likewise.
1599 * tree-ssa-pre.c (bitmap_set_contains_expr): Likewise.
1600 * tree-ssa-uninit.c (is_and_or_or_p): Likewise.
1601 * tree-vrp.c (value_ranges_intersect_p): Likewise.
1602 (value_range_nonnegative_p): Likewise.
1604 2018-09-25 Martin Liska <mliska@suse.cz>
1606 * config/powerpcspe/powerpcspe.c (rs6000_output_function_epilogue):
1607 Do not handle "GNU Pascal".
1608 * config/rs6000/rs6000.c (rs6000_output_function_epilogue):
1610 * config/sparc/sparc.c (sparc_pass_by_reference): Remove Pascal
1611 from documentation. Likewise.
1612 * dbxout.c (dbxout_range_type): Likewise.
1613 * doc/cpp.texi: Likewise.
1614 * doc/extend.texi: Likewise.
1615 * doc/frontends.texi: Likewise.
1616 * doc/invoke.texi: Remove Pascal entry.
1617 * tree.def (CLEANUP_POINT_EXPR): Likewise.
1618 * doc/rtl.texi (MODE_FUNCTION): Remove not used entry.
1620 2018-09-25 Martin Liska <mliska@suse.cz>
1623 * doc/invoke.texi: Document all parameters and remove default
1626 2018-09-25 Ilya Leoshkevich <iii@linux.ibm.com>
1629 * rtl.c (rtx_code_size): Take into account that EQ_ATTR_ALT
1630 contains HOST_WIDE_INTs when computing its size.
1632 2018-09-24 Jim Wilson <jimw@sifive.com>
1635 * config/riscv/riscv.h (STACK_BOUNDARY): Test riscv_abi == ABI_ILP32E
1637 (ABI_STACK_BOUNDARY, MAX_ARGS_IN_REGISTERS): Likewise.
1639 2018-09-24 Andrew Pinski <apinski@marvell.com>
1641 * config/aarch64/aarch64.c (aarch_macro_fusion_pair_p): Don't
1642 access prev before checking it for NULLness in the
1643 AARCH64_FUSE_CMP_BRANCH case.
1645 2018-09-24 H.J. Lu <hongjiu.lu@intel.com>
1648 * config/i386/i386.c (rest_of_insert_endbranch): Set
1649 endbr_queued_at_entrance to true and don't insert ENDBR if
1650 x86_function_profiler will be called.
1651 (x86_function_profiler): Insert ENDBR if endbr_queued_at_entrance
1653 * config/i386/i386.h (machine_function): Add
1654 endbr_queued_at_entrance.
1656 2018-09-24 Ilya Leoshkevich <iii@linux.ibm.com>
1658 * genattrtab.c (mk_attr_alt): Use alternative_mask.
1659 (attr_rtx_1): Adjust caching to match the new EQ_ATTR_ALT field
1661 (check_attr_test): Use alternative_mask.
1662 (get_attr_value): Likewise.
1663 (compute_alternative_mask): Use alternative_mask and XWINT.
1664 (make_alternative_compare): Use alternative_mask.
1665 (attr_alt_subset_p): Use XWINT.
1666 (attr_alt_subset_of_compl_p): Likewise.
1667 (attr_alt_intersection): Use alternative_mask and XWINT.
1668 (attr_alt_union): Likewise.
1669 (attr_alt_complement): Use HOST_WIDE_INT and XWINT.
1670 (mk_attr_alt): Use alternative_mask and HOST_WIDE_INT.
1671 (simplify_test_exp): Use alternative_mask and XWINT.
1672 (write_test_expr): Use alternative_mask and XWINT, adjust bit
1673 number calculation to support 64 bits. Generate code that
1674 checks 64-bit masks.
1675 (main): Use alternative_mask.
1676 * rtl.def (EQ_ATTR_ALT): Change field types from ii to ww.
1678 2018-09-24 Ilya Leoshkevich <iii@linux.ibm.com>
1681 * config/s390/s390.c (s390_emit_epilogue): Do not use PARALLEL
1682 RETURN+USE when returning via %r14.
1684 2018-09-24 Martin Liska <mliska@suse.cz>
1686 * gcov.c (output_lines): Print colorization legend
1687 for both flag_use_colors and flag_use_hotness_colors.
1690 2018-09-24 Martin Liska <mliska@suse.cz>
1692 * coverage.c (get_coverage_counts): Use warning_at
1693 with current_function_decl location. Use %qD in warning
1696 2018-09-24 Martin Liska <mliska@suse.cz>
1698 * memory-block.h (memory_block_pool::release): Annotate with
1699 valgrind that the memory is not accessible.
1701 2018-09-24 Martin Liska <mliska@suse.cz>
1704 * asan.c: Make asan_handled_variables extern.
1706 * cfgexpand.c (expand_stack_vars): Make sure
1707 a representative is unpoison if another
1708 variable in the partition is handled by
1709 use-after-scope sanitization.
1711 2018-09-24 Richard Biener <rguenther@suse.de>
1713 PR tree-optimization/63155
1714 * tree-ssa-propagate.c (add_ssa_edge): Avoid adding PHIs to
1715 the worklist when the edge of the respective argument isn't
1718 2018-09-23 Uros Bizjak <ubizjak@gmail.com>
1720 * config/i386/i386.h (enum reg_class): Rename MASK_REGS to
1721 ALL_MASK_REGS and MASK_EVEX_REGS to MASK_REGS.
1722 (MASK_CLASS_P): Update for rename.
1723 (MAYBE_MASK_CLASS_P): Ditto.
1724 (REG_CLASS_NAMES): Update.
1725 (REG_CLASS_CONTENT): Update.
1726 * config/i386/i386.c (regclass_map): Update for MASK_REG
1727 and ALL_MASK_REGS rename.
1728 * config/i386/constraints.md (Yk): Update for rename.
1731 2018-09-23 Uros Bizjak <ubizjak@gmail.com>
1733 * config/i386/i386.h (enum reg_class): Remove
1734 EVEX_SSE_REGS and MOD4_SSE_REGS.
1735 (REG_CLASS_NAMES): Update.
1736 (REG_CLASS_CONTENT): Update.
1737 * config/i386/i386.c (regclass_map): Declare AVX-512 SSE
1738 registers as ALL_SSE_REGS.
1739 (ix86_additional_allocno_class_p): Remove.
1740 (TARGET_ADDITIONAL_ALLOCNO_CLASS_P): Remove.
1741 (ix86_register_priority): Lower priority of EVEX SSE registers.
1742 Use IN_RANGE macro where appropriate.
1743 (ix86_hard_regno_mode_ok): Merge AVX-5124FMAPS and
1744 AVX-5124VNNIW checks.
1745 (ix86_modes_tieable_p): Tie 512-bit SSE modes.
1746 * config/i386/sse.md (avx5124fmaddps_4fmaddps)
1747 (avx5124fmaddps_4fmaddps_mask, avx5124fmaddps_4fmaddps_maskz)
1748 (avx5124fmaddps_4fmaddss, avx5124fmaddps_4fmaddss_mask)
1749 (avx5124fmaddps_4fmaddss_maskz, avx5124fmaddps_4fnmaddps)
1750 (avx5124fmaddps_4fnmaddps_mask, avx5124fmaddps_4fnmaddps_maskz)
1751 (avx5124fmaddps_4fnmaddss, avx5124fmaddps_4fnmaddss_mask)
1752 (avx5124fmaddps_4fnmaddss_maskz, avx5124vnniw_vp4dpwssd)
1753 (avx5124vnniw_vp4dpwssd_mask, avx5124vnniw_vp4dpwssd_maskz)
1754 (avx5124vnniw_vp4dpwssds, avx5124vnniw_vp4dpwssds_mask)
1755 (avx5124vnniw_vp4dpwssds_maskz): Use "v" instead of "Yh" constraint.
1756 * config/i386/constraints.md (Yh): Remove.
1758 2018-09-23 Uros Bizjak <ubizjak@gmail.com>
1760 * config/i386/i386.c (regclass_map): Declare integer REX registers
1763 2018-09-23 Gerald Pfeifer <gerald@pfeifer.com>
1765 * doc/service.texi (Service): Switch the fsf.org link to https.
1767 2018-09-22 Chung-Ju Wu <jasonwucj@gmail.com>
1770 * config/nds32/nds32.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
1771 Define to speculation_safe_value_not_needed.
1773 2018-09-21 Florian Weimer <fweimer@redhat.com>
1776 * doc/extend.texi (Common Function Attributes): Mention that
1777 noreturn suppresses tail call optimization.
1779 2018-09-21 Jeff Law <law@redhat.com>
1781 * gimple-ssa-evrp.c (evrp_dom_walker::cleanup): Call
1782 vr_values::cleanup_edges_and_switches.
1783 * tree-vrp.c (to_remove_edges, to_update_switch_stmts): Moved into
1785 (identify_jump_threads): Remove EDGE_IGNORE handling.
1786 (execute_vrp): Move handling of to_remove_edges and
1787 to_update_switch_stmts into vr_values class member functions.
1788 * tree-vrp.h (switch_update, to_remove_edges): Remove declarations.
1789 (to_update_switch_stmts): Likewise.
1790 * vr-values.c: Include cfghooks.h.
1791 (vr_values::vr_values): Initialize to_remove_edges and
1792 to_update_switch_stmts.
1793 (vr_values::~vr_values): Verify to_remove_edges and
1794 to_update_switch_stmts are empty.
1795 (vr_values::simplify_switch_using_ranges): Set EDGE_IGNORE as needed.
1796 (vr_values::cleanup_edges_and_switches): New member function.
1797 * vr-values.h (vr_values): Add cleanup_edges_and_switches member
1798 function. Add new data members.
1800 2018-09-21 David Malcolm <dmalcolm@redhat.com>
1802 PR tree-optimization/87309
1803 * dumpfile.c (dump_context::begin_scope): Filter the dump_loc
1804 calls with pflags and alt_flags.
1805 (selftest::test_capture_of_dump_calls): Add test of interaction of
1806 MSG_OPTIMIZED_LOCATIONS with AUTO_DUMP_SCOPE.
1808 2018-09-21 Olivier Hainque <hainque@adacore.com>
1810 * config.gcc: Factorize and comment inclusion of vxworks-dummy.h.
1812 2018-09-21 Olivier Hainque <hainque@adacore.com>
1814 * config/vxworks.h (CLEAR_INSN_CACHE): #define to 1.
1816 2018-09-21 Olivier Hainque <hainque@adacore.com>
1818 * config/vxworks.h (VXWORKS_LIBGCC_SPEC): Remove -lc_internal.
1819 Merge block comment with the one ahead of VXWORKS_LIBS_RTP. Then:
1820 (VXWORKS_LIBS_RTP): Minor reordering.
1822 2018-09-21 Olivier Hainque <hainque@adacore.com>
1824 * config/vxworks.h (STARTFILE_PREFIX_SPEC): Define.
1825 (VXWORKS_LIBS_DIR_RTP): Remove definition and use.
1827 2018-09-21 Olivier Hainque <hainque@adacore.com>
1829 * config/vxworks.h (SIZE_TYPE): Account for TARGET_VXWORKS64.
1830 (PTRDIFF_TYPE): Likewise.
1832 2018-09-21 Olivier Hainque <hainque@adacore.com>
1834 * config.gcc: Enforce def of TARGET_VXWORKS64 to 1 from
1835 triplet, similar to support for VxWorks7.
1836 * config/vxworks-dummy.h: Provide a default definition
1837 of TARGET_VXWORKS64 to 0.
1839 2018-09-21 Olivier Hainque <hainque@adacore.com>
1841 * config/vxworks.h (TARGET_VXWORKS7): Move default definition ...
1842 * config/vxworks-dummy.h: here.
1844 2018-09-21 Olivier Hainque <hainque@adacore.com>
1846 * config.gcc: Prepend vxworks-dummy.h to tm_file for powerpc*
1848 2018-09-21 Shaokun Zhang <zhangshaokun@hisilicon.com>
1849 Bo Zhou <zbo.zhou@hisilicon.com>
1851 * config/aarch64/aarch64-cores.def (tsv110): New CPU.
1852 * config/aarch64/aarch64-tune.md: Regenerated.
1853 * doc/invoke.texi (AArch64 Options/-mtune): Add "tsv110".
1854 * config/aarch64/aarch64.c (tsv110_tunings): New tuning table.
1855 * config/aarch64/aarch64-cost-tables.h: Add "tsv110" extra costs.
1857 2018-09-21 Andrew Stubbs <ams@codesourcery.com>
1858 Julian Brown <julian@codesourcery.com>
1860 * builtins.c (get_builtin_sync_mem): Handle address spaces.
1862 2018-09-21 Eric Botcazou <ebotcazou@adacore.com>
1864 * config/rs6000/rs6000.c (rs6000_function_ok_for_sibcall): Return false
1865 if the call takes a static chain.
1867 2018-09-21 Martin Liska <mliska@suse.cz>
1869 * auto-profile.c (autofdo_source_profile::read): Do not
1871 (read_profile): Do not add working sets.
1872 (read_autofdo_file): Remove sum_all.
1873 (afdo_callsite_hot_enough_for_early_inline): Remove const
1875 * coverage.c (struct counts_entry): Remove gcov_summary.
1876 (read_counts_file): Read new GCOV_TAG_OBJECT_SUMMARY,
1877 do not support GCOV_TAG_PROGRAM_SUMMARY.
1878 (get_coverage_counts): Remove summary and expected
1880 * coverage.h (get_coverage_counts): Likewise.
1881 * doc/gcov-dump.texi: Remove -w option.
1882 * gcov-dump.c (dump_working_sets): Remove.
1883 (main): Do not support '-w' option.
1884 (print_usage): Likewise.
1885 (tag_summary): Likewise.
1886 * gcov-io.c (gcov_write_summary): Do not dump
1888 (gcov_read_summary): Likewise.
1889 (gcov_histo_index): Remove.
1890 (gcov_histogram_merge): Likewise.
1891 (compute_working_sets): Likewise.
1892 * gcov-io.h (GCOV_TAG_OBJECT_SUMMARY): Mark
1894 (GCOV_TAG_PROGRAM_SUMMARY): Mark it obsolete.
1895 (GCOV_TAG_SUMMARY_LENGTH): Adjust.
1896 (GCOV_HISTOGRAM_SIZE): Remove.
1897 (GCOV_HISTOGRAM_BITVECTOR_SIZE): Likewise.
1898 (struct gcov_summary): Simplify rapidly just
1899 to runs and sum_max fields.
1900 (gcov_histo_index): Remove.
1901 (NUM_GCOV_WORKING_SETS): Likewise.
1902 (compute_working_sets): Likewise.
1903 * gcov-tool.c (print_overlap_usage_message): Remove
1904 trailing empty line.
1905 * gcov.c (read_count_file): Read GCOV_TAG_OBJECT_SUMMARY.
1906 (output_lines): Remove program related line.
1907 * ipa-profile.c (ipa_profile): Do not consider GCOV histogram.
1908 * lto-cgraph.c (output_profile_summary): Do not stream GCOV
1910 (input_profile_summary): Do not read it.
1911 (merge_profile_summaries): And do not merge it.
1912 (input_symtab): Do not call removed function.
1913 * modulo-sched.c (sms_schedule): Do not print sum_max.
1914 * params.def (HOT_BB_COUNT_FRACTION): Reincarnate param that was
1915 removed when histogram method was invented.
1916 (HOT_BB_COUNT_WS_PERMILLE): Mention that it's used only in LTO
1918 * postreload-gcse.c (eliminate_partially_redundant_load): Fix
1920 * predict.c (get_hot_bb_threshold): Use HOT_BB_COUNT_FRACTION
1921 and dump selected value.
1922 * profile.c (add_working_set): Remove.
1923 (get_working_sets): Likewise.
1924 (find_working_set): Likewise.
1925 (get_exec_counts): Do not work with working sets.
1926 (read_profile_edge_counts): Do not inform as sum_max is removed.
1927 (compute_branch_probabilities): Likewise.
1928 (compute_value_histograms): Remove argument for call of
1929 get_coverage_counts.
1930 * profile.h: Do not make gcov_summary const.
1932 2018-09-21 Monk Chiang <sh.chiang04@gmail.com>
1934 * config.gcc (nds32*-*-*): Set TARGET_DEFAULT_TLSDESC_TRAMPOLINE=0.
1936 2018-09-21 Eric Botcazou <ebotcazou@adacore.com>
1938 PR tree-optimization/86990
1939 * gimple-ssa-store-merging.c (imm_store_chain_info:coalesce_immediate):
1940 Check that the entire merged store group is made of constants only for
1943 2018-09-20 Allan Sandfeld Jensen <allan.jensen@qt.io>
1945 * gcc.c (LINK_COMMAND_SPEC): Handle -r like -nostdlib.
1946 (VTABLE_VERIFICATION_SPEC): Likewise.
1947 (SANITIZER_EARLY_SPEC): Likewise.
1948 (SANITIZER_SPEC): Likewise.
1949 * config/darwin.h (LINK_COMMAND_SPEC): Likewise.
1950 * doc/invoke.texi (Link Options): Document -r.
1952 2018-09-20 Richard Biener <rguenther@suse.de>
1955 * gimplify.c (gimplify_expr): Retain alignment of
1956 addressable lvalue in dereference.
1958 2018-09-20 Alexandre Oliva <aoliva@redhat.com>
1961 * configure.ac: Check for .loc is_stmt support.
1962 * configure, config.in: Rebuilt.
1963 * dwarf2out.c (dwarf2out_source_line): Skip is_stmt
1966 2018-09-20 Segher Boessenkool <segher@kernel.crashing.org>
1968 * config/rs6000/rs6000.opt (misel=no, misel=yes): Delete.
1969 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -misel=yes and
1972 2018-09-20 Segher Boessenkool <segher@kernel.crashing.org>
1974 * config/rs6000/rs6000-opts.h (enum rs6000_vector): Delete
1976 * config/rs6000/rs6000.c (rs6000_debug_vector_unit): Delete
1979 2018-09-20 Marek Polacek <polacek@redhat.com>
1981 * doc/invoke.texi: Add -Wno-init-list-lifetime to C++ Language Options.
1983 2018-09-20 Richard Sandiford <richard.sandiford@arm.com>
1985 PR tree-optimization/87288
1986 * tree-vect-loop.c (vect_analyze_loop_2): Take PEELING_FOR_GAPS
1987 into account when determining PEELING_FOR_NITERS.
1989 2018-09-20 Richard Sandiford <richard.sandiford@arm.com>
1991 PR tree-optimization/86877
1992 * tree-vect-loop.c (vect_analyze_loop_2): Call
1993 vect_verify_datarefs_alignment.
1995 2018-09-19 Marek Polacek <polacek@redhat.com>
1997 * doc/invoke.texi: Document -Wclass-conversion.
1999 2018-09-19 John David Anglin <danglin@gcc.gnu.org>
2001 * config/pa/pa.c (pa_adjust_priority): Delete.
2002 (TARGET_SCHED_ADJUST_PRIORITY): Delete define.
2004 * config/pa/pa.md (atomic_storeqi): Restore deleted expander.
2005 (atomic_storehi): Likewise.
2006 (atomic_storesi): Likewise.
2007 (atomic_loaddi): Restore compare and swap exchange loop code.
2009 2018-09-19 Segher Boessenkool <segher@kernel.crashing.org>
2011 PR rtl-optimization/86902
2012 * combine.c (try_combine): When changing the CC mode used, don't change
2013 an unrelated mode in other_insn to that new CC mode.
2015 2018-09-19 David Malcolm <dmalcolm@redhat.com>
2017 * tree-data-ref.c (runtime_alias_check_p): Use formatted printing
2018 with %T in place of calls to dump_generic_expr.
2019 (prune_runtime_alias_test_list): Likewise.
2020 (create_runtime_alias_checks): Likewise.
2021 * tree-vect-data-refs.c (vect_check_nonzero_value): Likewise.
2022 (vect_analyze_data_ref_dependence): Likewise.
2023 (vect_slp_analyze_data_ref_dependence): Likewise.
2024 (vect_record_base_alignment): Likewise. Use %G in place of call
2025 to dump_gimple_stmt.
2026 (vect_compute_data_ref_alignment): Likewise.
2027 (verify_data_ref_alignment): Likewise.
2028 (vect_find_same_alignment_drs): Likewise.
2029 (vect_analyze_group_access_1): Likewise.
2030 (vect_analyze_data_ref_accesses): Likewise.
2031 (dependence_distance_ge_vf): Likewise.
2032 (dump_lower_bound): Likewise.
2033 (vect_prune_runtime_alias_test_list): Likewise.
2034 (vect_find_stmt_data_reference): Likewise.
2035 (vect_analyze_data_refs): Likewise.
2036 (vect_create_addr_base_for_vector_ref): Likewise.
2037 (vect_create_data_ref_ptr): Likewise.
2038 * tree-vect-loop-manip.c (vect_set_loop_condition): Likewise.
2039 (vect_can_advance_ivs_p): Likewise.
2040 (vect_update_ivs_after_vectorizer): Likewise.
2041 (vect_gen_prolog_loop_niters): Likewise.
2042 (vect_prepare_for_masked_peels): Likewise.
2043 * tree-vect-loop.c (vect_determine_vf_for_stmt): Likewise.
2044 (vect_determine_vectorization_factor): Likewise.
2045 (vect_is_simple_iv_evolution): Likewise.
2046 (vect_analyze_scalar_cycles_1): Likewise.
2047 (vect_analyze_loop_operations): Likewise.
2048 (report_vect_op): Likewise.
2049 (vect_is_slp_reduction): Likewise.
2050 (check_reduction_path): Likewise.
2051 (vect_is_simple_reduction): Likewise.
2052 (vect_create_epilog_for_reduction): Likewise.
2053 (vect_finalize_reduction:): Likewise.
2054 (vectorizable_induction): Likewise.
2055 (vect_transform_loop_stmt): Likewise.
2056 (vect_transform_loop): Likewise.
2057 (optimize_mask_stores): Likewise.
2058 * tree-vect-patterns.c (vect_pattern_detected): Likewise.
2059 (vect_split_statement): Likewise.
2060 (vect_recog_over_widening_pattern): Likewise.
2061 (vect_recog_average_pattern): Likewise.
2062 (vect_determine_min_output_precision_1): Likewise.
2063 (vect_determine_precisions_from_range): Likewise.
2064 (vect_determine_precisions_from_users): Likewise.
2065 (vect_mark_pattern_stmts): Likewise.
2066 (vect_pattern_recog_1): Likewise.
2067 * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
2068 (vect_record_max_nunits): Likewise.
2069 (vect_build_slp_tree_1): Likewise.
2070 (vect_build_slp_tree_2): Likewise.
2071 (vect_print_slp_tree): Likewise.
2072 (vect_analyze_slp_instance): Likewise.
2073 (vect_detect_hybrid_slp_stmts): Likewise.
2074 (vect_detect_hybrid_slp_1): Likewise.
2075 (vect_slp_analyze_operations): Likewise.
2076 (vect_slp_analyze_bb_1): Likewise.
2077 (vect_transform_slp_perm_load): Likewise.
2078 (vect_schedule_slp_instance): Likewise.
2079 * tree-vect-stmts.c (vect_mark_relevant): Likewise.
2080 (vect_mark_stmts_to_be_vectorized): Likewise.
2081 (vect_init_vector_1): Likewise.
2082 (vect_get_vec_def_for_operand): Likewise.
2083 (vect_finish_stmt_generation_1): Likewise.
2084 (vect_check_load_store_mask): Likewise.
2085 (vectorizable_call): Likewise.
2086 (vectorizable_conversion): Likewise.
2087 (vectorizable_operation): Likewise.
2088 (vectorizable_load): Likewise.
2089 (vect_analyze_stmt): Likewise.
2090 (vect_is_simple_use): Likewise.
2091 (vect_get_vector_types_for_stmt): Likewise.
2092 (vect_get_mask_type_for_stmt): Likewise.
2093 * tree-vectorizer.c (increase_alignment): Likewise.
2095 2018-09-19 Andrew Stubbs <ams@codesourcery.com>
2097 * doc/rtl.texi: Adjust vec_select description.
2098 * simplify-rtx.c (simplify_binary_operation_1): Allow VEC_SELECT to use
2099 non-constant selectors.
2101 2018-09-19 Matthew Malcomson <matthew.malcomson@arm.com>
2103 * config/aarch64/aarch64-protos.h
2104 (aarch64_offset_9bit_signed_unscaled_p): New declaration.
2105 * config/aarch64/aarch64.md (arches): New "rcpc8_4" attribute value.
2106 (arch_enabled): Add check for "rcpc8_4" attribute value of "arch".
2107 * config/aarch64/aarch64.h (AARCH64_FL_RCPC8_4): New bitfield.
2108 (AARCH64_FL_FOR_ARCH8_4): Include AARCH64_FL_RCPC8_4.
2109 (AARCH64_FL_PROFILE): Move index so flags are ordered.
2110 (AARCH64_ISA_RCPC8_4): New flag.
2111 * config/aarch64/aarch64.c (offset_9bit_signed_unscaled_p): Renamed
2112 to aarch64_offset_9bit_signed_unscaled_p.
2113 * config/aarch64/atomics.md (atomic_store<mode>): Allow offset
2115 * config/aarch64/constraints.md (Ust): New constraint.
2116 * config/aarch64/predicates.md.
2117 (aarch64_9bit_offset_memory_operand): New predicate.
2118 (aarch64_rcpc_memory_operand): New predicate.
2120 2018-09-19 Eric Botcazou <ebotcazou@adacore.com>
2122 PR rtl-optimization/87361
2123 * rtlanal.c (nonzero_bits1): Revert accidental change.
2125 2018-09-19 Richard Biener <rguenther@suse.de>
2127 PR tree-optimization/87349
2128 PR tree-optimization/87342
2129 * tree-ssa-sccvn.c (do_rpo_vn): Iterate max_rpo computation.
2131 2018-09-18 Marek Polacek <polacek@redhat.com>
2133 P1064R0 - Allowing Virtual Function Calls in Constant Expressions
2134 * gimple-fold.c (gimple_get_virt_method_for_vtable): Adjust assert.
2136 2018-09-18 Segher Boessenkool <segher@kernel.crashing.org>
2138 * config/rs6000/rs6000.md: Remove old "Cygnus sibcall" comment.
2140 2018-09-18 Segher Boessenkool <segher@kernel.crashing.org>
2142 PR rtl-optimization/86882
2143 * rtlanal.c (reg_overlap_mentioned_p): Handle CLOBBER.
2145 2018-09-18 Uros Bizjak <ubizjak@gmail.com>
2147 * config/i386/i386.md (*<code>extend<mode>xf2): Macroize insn from
2148 *<code>extendsfxf2 and *<code>extenddfxf2 using MODEF mode iterator.
2150 2018-09-18 Jonathan Wakely <jwakely@redhat.com>
2153 * doc/invoke.texi (Link Options): Fix formatting and grammar.
2155 2018-09-18 Richard Biener <rguenther@suse.de>
2158 * tree-ssa-coalesce.c (tree_int_map_hasher): Remove.
2159 (compute_samebase_partition_bases): Likewise.
2160 (coalesce_ssa_name): Always use compute_optimized_partition_bases.
2161 (gimple_can_coalesce_p): Simplify.
2163 2018-09-18 Hans-Peter Nilsson <hp@bitrange.com>
2165 Handle a library implementation of ffs calling __builtin_ffs.
2166 * config/mmix/mmix.c (TARGET_INIT_LIBFUNCS): Override with...
2167 (mmix_init_libfuncs): New function: make __builtin_ffs expand
2170 2018-09-17 David Malcolm <dmalcolm@redhat.com>
2172 * diagnostic-show-locus.c (class layout_range): Add field
2174 (layout_range::layout_range): Add "original_idx" param and use it
2175 to initialize new field.
2176 (make_range): Use 0 for original_idx.
2177 (layout::layout): Pass in index to calls to
2178 maybe_add_location_range.
2179 (layout::maybe_add_location_range): Add param "original_idx" and
2180 pass it on to layout_range.
2181 (layout::print_any_labels): Pass on range->m_original_idx to
2183 (gcc_rich_location::add_location_if_nearby): Use 0 for
2185 * gcc-rich-location.h (text_range_label::get_text): Update for new
2187 (range_label_for_type_mismatch::get_text): Likewise.
2189 2018-09-17 Uros Bizjak <ubizjak@gmail.com>
2191 * config/i386/i386.c (ix86_emit_i387_log1p): Emit fldln2 earlier.
2193 2018-09-17 David Malcolm <dmalcolm@redhat.com>
2195 * gimple-ssa-sprintf.c (fmtwarn): Update for introduction of
2196 format_string_diagnostic_t.
2197 (fmtwarn_n): Likewise.
2198 * substring-locations.c
2199 (format_string_diagnostic_t::format_string_diagnostic_t) New ctor.
2200 (format_warning_n_va): Convert to...
2201 (format_string_diagnostic_t::emit_warning_n_va): ...this.
2202 (format_warning_va): Convert to...
2203 (format_string_diagnostic_t::emit_warning_va): ...this.
2204 (format_warning_at_substring): Convert to...
2205 (format_string_diagnostic_t::emit_warning): ...this.
2206 (format_warning_at_substring_n): Convert to...
2207 (format_string_diagnostic_t::emit_warning_n): ...this.
2208 * substring-locations.h (class format_string_diagnostic_t): New
2210 (format_warning_va): Convert to
2211 format_string_diagnostic_t::emit_warning_va.
2212 (format_warning_n_va): Convert to
2213 format_string_diagnostic_t::emit_warning_n_va.
2214 (format_warning_at_substring): Convert to
2215 format_string_diagnostic_t::emit_warning.
2216 (format_warning_at_substring_n): Convert to
2217 format_string_diagnostic_t::emit_warning_n.
2219 2018-09-17 Cesar Philippidis <cesar@codesourcery.com>
2220 Bernd Schmidt <bernds_cb1@t-online.de>
2222 * config/nvptx/nvptx.md (atomic_fetch_<logic><mode>): Enable with
2225 2018-09-17 Uros Bizjak <ubizjak@gmail.com>
2227 * config/i386/i386.md (truncxf<mode>2_i387_noop_unspec): Change
2228 operand 0 predicate to nonimmediate operand.
2229 (rint<mode>2_frndint): Remove insn pattern.
2230 (rint<mode>2): Change operand 1 predicate to general_operand.
2231 Extend operand 1 to XFmode and generate rintxf2 insn.
2232 (frndintxf2_<rounding>): Rename from frndint<mode>2_<rounding>.
2233 Do not use X87MODEF mode macro.
2234 (frndintxf2_<rounding>_i387): Rename from
2235 frndint<mode>2_<rounding>_i387. Do not use X87MODEF mode macro.
2236 (<rounding_insn><mode>2): For non-SSE modes, extend operand 1
2237 to XFmode and generate significandxf3 insn.
2239 2018-09-17 Richard Biener <rguenther@suse.de>
2241 PR tree-optimization/87328
2242 * tree-ssa-sccvn.c (process_bb): Remove assertion about not
2243 visiting unexecutable backedges when not iterating.
2244 (do_rpo_vn): Mark all edges not executable even when not
2247 2018-09-17 Martin Jambor <mjambor@suse.cz>
2250 * doc/invoke.texi (Warning Options): Likewise.
2252 2018-09-17 Richard Biener <rguenther@suse.de>
2254 PR tree-optimization/87301
2255 * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_cleanup): Properly
2256 clean EH info from leftover copy assignments.
2258 2018-09-17 Martin Liska <mliska@suse.cz>
2260 PR gcov-profile/85871
2261 * gcov.c (output_intermediate_file): Fix out of bounds
2264 2018-09-17 Vineet Gupta <vgupta@synopsys.com>
2266 * config/arc/arc.c: Object attributes for core4 not reflected
2268 * config/arc/arc.h: Don't restrict DBNZ to core3 (core4 includes
2271 2018-09-17 Alexey Brodkin <abrodkin@synopsys.com>
2273 * config/arc/linux.h (LINK_EH_SPEC): Add missing space.
2275 2018-09-17 Martin Liska <mliska@suse.cz>
2277 * doc/gcov.texi: Document new option --use-hotness-colors.
2278 * gcov.c (struct source_info): Declare new field.
2279 (source_info::source_info): Set default for maximum_count.
2280 (print_usage): Add new -q option.
2281 (process_args): Process it.
2282 (accumulate_line_info): Save src->maximum_count.
2283 (output_line_beginning): Make color line number if
2284 flag_use_hotness_colors is set.
2285 (output_line_details): Pass default argument value.
2286 (output_lines): Pass src->maximum_count.
2288 2018-09-17 Martin Liska <mliska@suse.cz>
2290 * common/config/i386/i386-common.c (ix86_get_valid_option_values):
2291 Use processor_names table.
2292 * config/i386/i386.c (ix86_default_align): Use
2293 processor_cost_table for alignment values.
2294 (ix86_option_override_internal): Use processor_names.
2295 (ix86_function_specific_print): Likewise.
2296 * config/i386/i386.h (struct processor_costs):
2297 Add alignment values.
2298 (struct ptt): Remove and replace with const char *.
2299 * config/i386/x86-tune-costs.h (struct processor_costs):
2300 Declare default alignments for all costs.
2302 2018-09-17 Aldy Hernandez <aldyh@redhat.com>
2304 * tree-vrp.c (extract_range_from_unary_expr): Do not special case
2305 symbolics or VR_VARYING ranges for ABS_EXPR.
2306 * wide-int-range.cc (wide_int_range_abs): Return positive numbers
2307 when range will wrap.
2309 2018-09-15 Eric Botcazou <ebotcazou@adacore.com>
2312 * cfgexpand.c (expand_gimple_basic_block): Be prepared for a BARRIER
2313 before and after a JUMP_TABLE_DATA.
2315 2018-09-14 John David Anglin <danglin@gcc.gnu.org>
2318 * dojump.c (do_compare_and_jump): Canonicalize function pointers
2319 when one operand is a function pointer. Use POINTER_TYPE_P and
2320 FUNC_OR_METHOD_TYPE_P.
2321 * expr.c (do_store_flag): Use POINTER_TYPE_P and FUNC_OR_METHOD_TYPE_P.
2322 * fold-const.c (build_range_check): Likewise.
2323 * match.pd (simple_comparison): Likewise.
2325 2018-09-14 David Malcolm <dmalcolm@redhat.com>
2328 * spellcheck.c (get_edit_distance_cutoff): New function.
2329 (selftest::test_edit_distance_unit_test_oneway): Rename to...
2330 (selftest::test_get_edit_distance_one_way): ...this.
2331 (selftest::test_get_edit_distance_unit): Rename to...
2332 (selftest::test_get_edit_distance_both_ways): ...this.
2333 (selftest::test_edit_distances): Move tests to this new function,
2334 and test some more pairs of strings. Update for above renaming.
2335 (selftest::get_old_cutoff): New function.
2336 (selftest::test_get_edit_distance_cutoff): New function.
2337 (selftest::assert_suggested_for): New function.
2338 (ASSERT_SUGGESTED_FOR): New macro.
2339 (selftest::assert_not_suggested_for): New function.
2340 (ASSERT_NOT_SUGGESTED_FOR): New macro.
2341 (selftest::test_suggestions): New function.
2342 (selftest::spellcheck_c_tests): Move test_get_edit_distance_unit
2343 tests to selftest::test_edit_distances and call it. Add calls to
2344 selftest::test_get_edit_distance_cutoff and
2345 selftest::test_suggestions.
2346 * spellcheck.h (get_edit_distance_cutoff): New function declaration.
2347 (best_match::consider): Replace hard-coded cutoff calculation with
2349 (best_match::get_cutoff): New declaration.
2350 (best_match::get_best_meaningful_candidate): Likewise.
2352 2018-09-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
2354 * builtins.c (fold_builtin_strlen): Remove TODO comment.
2356 2018-09-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
2359 2018-07-30 Bernd Edlinger <bernd.edlinger@hotmail.de>
2361 * tree-ssa-forwprop.c (simplify_builtin_call): Don't create a not NUL
2362 terminated string literal.
2364 2018-09-14 Martin Sebor <msebor@redhat.com>
2366 * builtins.c (unterminated_array): Handle ARRAY_REF.
2367 (expand_builtin_stpcpy_1): Detect unterminated char arrays.
2368 * builtins.h (unterminated_array): Declare extern.
2369 * gimple-fold.c (gimple_fold_builtin_stpcpy): Detect unterminated
2371 (gimple_fold_builtin_sprintf): Propagate NO_WARNING to transformed
2374 2018-09-14 Martin Sebor <msebor@redhat.com>
2375 Jeff Law <law@redhat.com>
2377 * builtins.c (unterminated_array): New.
2378 (expand_builtin_strcpy): Adjust.
2379 (expand_builtin_strcpy_args): Detect unterminated arrays.
2380 * gimple-fold.c (get_maxval_strlen): Add argument. Detect
2381 unterminated arrays.
2382 * gimple-fold.h (get_maxval_strlen): Add argument.
2383 (gimple_fold_builtin_strcpy): Detec unterminated arrays.
2385 * gimple-fold.c (get_range_strlen): Add argument.
2386 (get_maxval_strlen): Adjust.
2387 * gimple-fold.h (get_range_strlen): Add argument.
2389 2018-09-14 Wei Xiao <wei3.xiao@intel.com>
2391 * config/i386/movdirintrin.h: Fix copyright year.
2393 2018-09-14 Uros Bizjak <ubizjak@gmail.com>
2395 * reg-stack.c: Include regs.h.
2396 (replace_reg): Assert that mode is MODE_FLOAT or MODE_COMPLEX_FLOAT.
2397 (emit_pop_insn): Default pop insn mode to the reg_raw_mode of
2398 FIRST_STACK_REG, not DFmode.
2399 (emit_swap_insn): Default swap insn mode to the reg_raw_mode of
2400 FIRST_STACK_REG, not XFmode. Explicitly construct swap RTX.
2401 (change stack): Default register mode to the reg_raw_mode of
2402 FIRST_STACK_REG, not DFmode.
2403 * config/i386/i386.md (*swap<mode>): Remove insn pattern.
2404 (*swapxf): Rename from swapxf.
2406 2018-09-14 Carl Love <cel@us.ibm.com>
2408 * config/rs6000/emmintrin.h: Add _MM_SHUFFLE2.
2409 * config/rs6000/xmmintrin.h: Add _MM_SHUFFLE.
2411 2018-09-14 Segher Boessenkool <segher@kernel.crashing.org>
2414 * config/rs6000/rs6000.md (*mov<mode>_hardfloat64): Add Z to the Y
2417 2018-09-14 Sam Tebbs <sam.tebbs@arm.com>
2420 * config/aarch64/aarch64.md (*aarch64_bfxilsi_uxtw): Define.
2422 2018-09-14 Jason Merrill <jason@redhat.com>
2424 Fix --enable-gather-detailed-mem-stats.
2425 * hash-table.c (hash_table_usage): Change from variable to function.
2426 * hash-table.h: Adjust.
2427 * Makefile.in: Add missing dependencies on hash-table.h.
2429 2018-09-14 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
2431 PR tree-optimization/87259
2433 (pass_cse_reciprocals::execute): Run optimize_recip_sqrt after
2434 execute_cse_reciprocals_1 has tried transforming.
2436 2018-09-14 Aldy Hernandez <aldyh@redhat.com>
2438 * tree-vrp.c (extract_range_from_binary_expr_1): Normalize
2439 VR_VARYING for PLUS/MINUS_EXPR.
2441 2018-09-14 Ilya Leoshkevich <iii@linux.ibm.com>
2443 * config/s390/s390-passes.def (INSERT_PASS_BEFORE): Improve
2446 2018-09-14 Richard Biener <rguenther@suse.de>
2449 * tree-ssa-coalesce.c (ssa_conflicts_merge): Remove conflict
2450 bits for the merged partition.
2452 2018-09-13 Martin Sebor <msebor@redhat.com>
2453 Bernd Edlinger <bernd.edlinger@hotmail.de>
2455 * builtins.h (c_srlen): Add argument.
2456 * builtins.c (warn_string_no_nul): New function.
2457 (c_strlen): Add argument and use it. Update recursive calls.
2458 Pass DECL argument to string_constant to get info on non
2459 terminated strings. Update *NONSTR as needed.
2460 (fold_builtin_strlen): Add argument to calls to c_strlen.
2461 Warn for unterminated arrays.
2462 (warn_string_no_null): Add prototype.
2463 * expr.c (string_constant): Update arguments. Update recursive
2464 calls appropriately. Detect missing NUL terminator and outermost
2465 declaration its missing in.
2466 Improve checks for arrays with nonzero lower bound or elements
2467 that are not a single byte. Simplify offset computation.
2468 Simplify checks for non-NUL terminated strings.
2469 * gimple-fold.c (get_range_strlen): Add argument to c_strlen call.
2470 * gimple-ssa-sprintf.c (get_string_length): Remove unnecessary code.
2472 2018-09-13 Bernd Edlinger <bernd.edlinger@hotmail.de>
2474 * builtins.c (c_strlen): Handle not zero terminated STRING_CSTs
2476 * fold-const.c (c_getstr): Fix function comment. Remove unused third
2477 argument. Fix range checks.
2478 * fold-const.h (c_getstr): Adjust protoype.
2479 * gimple-fold.c (gimple_fold_builtin_memory_op): Avoid folding when
2480 string is constant but contains no NUL byte.
2482 * expr.c (string_constant): Adjust function comment.
2483 Remove bogus check for zero termination.
2485 * fold-const.c (c_getstr): Clamp STRING_LENGTH to STRING_SIZE.
2487 * varasm.c (compare_constant): Compare type size of STRING_CSTs.
2488 (get_constant_size): Don't make STRING_CSTs larger than they are.
2489 (check_string_literal): New check function for STRING_CSTs.
2490 (output_constant): Use it.
2492 2018-09-13 Eric Botcazou <ebotcazou@adacore.com>
2495 * config/visium/visium.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define.
2497 2018-09-13 Richard Biener <rguenther@suse.de>
2499 PR tree-optimization/87263
2500 * tree-ssa-sccvn.c (visit_phi): Revert some earlier changes.
2501 (struct unwind_state): Add max_rpo field.
2502 (do_rpo_vn): Allow up-to-date loop state to be used when not iterating.
2503 Compute max_rpo, the max RPO number a block can be backwards reached
2504 from. Re-write non-iterating mode to a RPO ordered worklist approach,
2505 separating it from the iterating mode.
2507 2018-09-13 Vlad Lazar <vlad.lazar@arm.com>
2509 * haifa-sched.c (rank_for_schedule): Schedule by INSN_COST.
2510 (rfs_decision): New scheduling decision.
2512 2018-09-13 Richard Biener <rguenther@suse.de>
2515 * tree-ssa-sccvn.c (vn_nary_op_insert_into): Fix assert.
2516 (vn_nary_op_insert_pieces_predicated): Do not write useless
2517 valid_dominated_by_p entry outside of the allocated storage.
2519 2018-09-13 Omar Sandoval <osandov@osandov.com>
2520 Tom de Vries <tdevries@suse.de>
2523 * dwarf2out.c (is_c): New function.
2524 (add_subscript_info): Add DW_AT_count of 0 for C zero-length arrays.
2526 2018-09-13 Sam Tebbs <sam.tebbs@arm.com>
2529 * config/aarch64/aarch64.md (*aarch64_bfxil):
2531 * config/aarch64/constraints.md (Ulc): Define.
2532 * config/aarch64/aarch64-protos.h (aarch64_high_bits_all_ones_p):
2534 * config/aarch64/aarch64.c (aarch64_high_bits_all_ones_p):
2537 2018-09-13 Vlad Lazar <vlad.lazar@arm.com>
2539 * config/aarch64/aarch64.h (TARGET_COMPUTE_FRAME_LAYOUT): Define.
2540 * config/aarch64/aarch64.c (aarch64_expand_prologue): Remove
2541 aarch64_layout_frame call.
2542 (aarch64_expand_epilogue): Likewise.
2543 (aarch64_initial_elimination_offset): Likewise.
2544 (aarch64_get_separate_components): Likewise.
2545 (aarch64_use_return_insn_p): Likewise.
2546 (aarch64_layout_frame): Remove unneeded check.
2548 2018-09-13 Jakub Jelinek <jakub@redhat.com>
2550 * configure.ac: Only append
2551 " : (reconfigured) $TOPLEVEL_CONFIGURE_ARGUMENTS" to
2552 gcc_config_arguments if it was never reconfigured or last reconfigure
2553 was with different arguments.
2554 * configure: Regenerated.
2556 2018-09-13 Jakub Jelinek <jakub@redhat.com>
2557 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
2560 * expr.c (maybe_optimize_pow2p_mod_cmp): New function.
2561 (maybe_optimize_mod_cmp): Use it if integer_pow2p treeop1.
2563 2018-09-13 Jakub Jelinek <jakub@redhat.com>
2565 PR tree-optimization/87287
2566 * fold-const.c (fold_binary_loc) <case EQ_EXPR>: Move signed modulo
2567 X % C == 0 to X % (unsigned) C == 0 optimization to ...
2568 * match.pd (X % C == 0): ... here. New optimization.
2570 2018-09-12 Jakub Jelinek <jakub@redhat.com>
2573 * expr.h (maybe_optimize_mod_cmp): Declare.
2574 * expr.c (mod_inv): New function.
2575 (maybe_optimize_mod_cmp): New function.
2576 (do_store_flag): Use it.
2577 * cfgexpand.c (expand_gimple_cond): Likewise.
2579 2018-09-09 Cesar Philippidis <cesar@codesourcery.com>
2580 Julian Brown <julian@codesourcery.com>
2583 * gimplify.c (gimplify_scan_omp_clauses): Set
2584 target_firstprivatize_array_bases in OpenACC parallel and kernels
2585 region contexts. Remove GOMP_MAP_FIRSTPRIVATE_REFERENCE clauses from
2586 OpenACC data regions.
2588 2018-09-12 Uros Bizjak <ubizjak@gmail.com>
2590 * config/i386/i386.md (sqrt_extend<mode>xf3_i387): Remove.
2591 (sqrt<mode>2): Extend operand 1 to XFmode and generate sqrtxf3 insn.
2593 2018-09-12 Richard Biener <rguenther@suse.de>
2595 PR tree-optimization/87280
2596 * tree-ssa-sccvn.c (process_bb): Handle the case of executable
2597 edge but unreachable target.
2598 (do_rpo_vn): For conservatively handling a PHI only mark
2599 the backedge executable but not the block reachable.
2601 2018-09-12 Richard Biener <rguenther@suse.de>
2603 PR tree-optimization/87266
2604 * tree-ssa-sccvn.c (do_rpo_vn): Always iterate to not yet
2607 2018-09-12 Andreas Krebbel <krebbel@linux.ibm.com>
2609 * config/s390/s390.md (PFPO_RND_MODE_DFP, PFPO_RND_MODE_BFP): New
2611 ("trunc<BFP:mode><DFP_ALL:mode>2")
2612 ("trunc<DFP_ALL:mode><BFP:mode>2")
2613 ("extend<BFP:mode><DFP_ALL:mode>2")
2614 ("extend<DFP_ALL:mode><BFP:mode>2"): Set proper rounding mode
2615 according to the target operand type.
2617 2018-09-12 Jakub Jelinek <jakub@redhat.com>
2618 Andreas Krebbel <krebbel@linux.ibm.com>
2620 PR tree-optimization/86844
2621 * gimple-ssa-store-merging.c
2622 (imm_store_chain_info::coalesce_immediate): For overlapping stores, if
2623 there are any overlapping stores in between them, make sure they are
2624 also coalesced or we give up completely.
2626 2018-09-12 Jakub Jelinek <jakub@redhat.com>
2629 * fold-const.c (fold_ternary_loc) <case COND_EXPR>: Verify also that
2630 BIT_AND_EXPR's second operand is a power of two. Formatting fix.
2632 2018-09-12 Tom de Vries <tdevries@suse.de>
2634 * common.opt (gdescribe-dies): Add option.
2635 * dwarf2out.c (add_name_and_src_coords_attributes): Add description
2636 attribute for artifical and nameless decls.
2637 (dwarf2out_register_external_die): Add description attribute to
2638 external reference die.
2639 (add_desc_attribute): New functions.
2640 (gen_subprogram_die): Add description attribute to
2641 DW_TAG_call_site_parameter.
2642 * tree-pretty-print.c (print_generic_expr_to_str): New function.
2643 * tree-pretty-print.h (print_generic_expr_to_str): Declare.
2644 * doc/invoke.texi (@item Debugging Options): Add -gdescribe-dies and
2646 (@item -gdescribe-dies): Add.
2648 2018-09-12 Aldy Hernandez <aldyh@redhat.com>
2650 * tree-vrp.c (vrp_shift_undefined_p): Remove.
2651 (extract_range_from_binary_expr_1: Call
2652 wide_int_range_shift_undefined_p instead of vrp_shift_undefined_p.
2653 * wide-int-range.h (wide_int_range_shift_undefined_p): Do not
2656 2018-09-12 Aldy Hernandez <aldyh@redhat.com>
2658 * gimple-ssa-warn-alloca.c
2659 (alloca_type_and_limit::alloca_type_and_limit): Initialize limit
2660 field for ALLOCA_BOUND_*_LARGE.
2662 2018-09-11 Nathan Sidwell <nathan@acm.org>
2664 * gcc.c (load_specs, execute, run_attempt): Use %qs not '%s'.
2666 2018-09-11 Uros Bizjak <ubizjak@gmail.com>
2668 * reg-stack.c (subst_asm_stack_regs): Call replace_reg also
2669 for clobbers. Remove obsolete comment.
2671 2018-09-11 Uros Bizjak <ubizjak@gmail.com>
2673 * config/i386/i386.md (define_attr "type"): Remove mpxmov, mpxmk,
2674 mpxchk, mpxld and mpxst types.
2675 (define_attr length_immediate): Remove all processing of mpx types.
2676 (define_attr prefix_0f): Ditto.
2677 (define_attr memory): Ditto.
2679 2018-09-11 Uros Bizjak <ubizjak@gmail.com>
2681 * config/i386/i386.md (fyl2x_extend<mode>xf3_i387): Remove.
2682 (log<mode>2): Change operand 1 predicate to general_operand.
2683 Extend operand 1 to XFmode and generate logxf3 insn.
2684 (log10<mode>2): Change operand 1 predicate to general_operand.
2685 Extend operand 1 to XFmode and generate log10xf3 insn.
2686 (log2<mode>2): Change operand 1 predicate to general_operand.
2687 Extend operand 1 to XFmode and generate log2xf3 insn.
2688 (fyl2xp1_extend<mode>xf3_i387): Remove.
2689 (log1p<mode>2): Change operand 1 predicate to general_operand.
2690 Extend operand 1 to XFmode and generate log1pxf3 insn.
2691 (fxtract_extend<mode>xf3_i387): Remove.
2692 (logb<mode>2): Change operand 1 predicate to general_operand.
2693 Extend operand 1 to XFmode and generate logbxf3 insn.
2694 (ilogb<mode>2): Change operand 1 predicate to general_operand.
2695 Extend operand 1 to XFmode and generate fxtractxf3_i387 insn.
2696 (significand<mode>2): Change operand 1 predicate to general_operand.
2697 Extend operand 1 to XFmode and generate significandxf3 insn.
2699 2018-09-11 Nathan Sidwell <nathan@acm.org>
2701 * gcc.c (perror_with_name, pfatal_with_name): Delete.
2702 (load_specs): Use fatal_error.
2703 (DELETE_IF_ORDINARY, process_command): Use error.
2704 (execute, run_attempt): Use fatal_error.
2706 2018-09-11 Andrew Stubbs <ams@codesourcery.com>
2708 * diagnostic-core.h (sorry_at): New prototype.
2709 * diagnostic.c (sorry_at): New function.
2711 2018-09-11 Aldy Hernandez <aldyh@redhat.com>
2713 * tree-vrp.c (extract_range_from_binary_expr_1): Treat all divisions
2714 by zero as VR_UNDEFINED.
2716 2018-09-10 Uros Bizjak <ubizjak@gmail.com>
2718 * config/i386/i386.md (<sincos>xf2): Rename from *<sincos>xf2_i387.
2719 (*<sincos>_extend<mode>xf2_i387): Remove insn pattern.
2720 (<sincos>mode2): New expander.
2721 (sincos_extend<mode>xf3_i387): Remove insn pattern.
2722 (sincos -> sin, cos splitters): Remove splitter patterns.
2723 (sincos<mode>3): Change operand 2 predicate to general_operand.
2724 Extend operand 2 to XFmode and generate sincosxf3 insn.
2725 (fptanxf4_i387): Change mode of operands 0 and 3 to SFmode.
2726 Change operand 3 predicate to const1_operand.
2727 (fptan_extend<mode>xf4_i387): Remove insn pattern.
2728 (tanxf2): Update operands in the call to fptanxf4_i387.
2729 (tan<mode>2): Change operand 1 predicate to general_operand.
2730 Extend operand 1 to XFmode and generate tanxf3 insn.
2731 (atan2xf3): Rename from *fpatanxf3_i387.
2732 (fpatan_extend<mode>xf3_i387): Remove insn pattern.
2733 (atan2xf3): Remove expander.
2734 (atan2<mode<3): Change operand 1 and 2 predicates to general_operand.
2735 Extend operands 1 and 2 to XFmode and generate atan2xf3 insn.
2736 (atan<mode>2): Change operand 1 predicate to general_operand.
2737 Extend operand 1 to XFmode and generate atanxf3 insn.
2739 2018-09-10 Uros Bizjak <ubizjak@gmail.com>
2741 * config/i386/i386.md (x87/SSE constant load splitter): Use
2742 memory_operand instead of nonimmediate_operand for input operand
2745 2018-09-09 Uros Bizjak <ubizjak@gmail.com>
2747 * config/i386/i386.md (float partial SSE register stall splitter): Move
2748 splitter near its instruction pattern.
2749 (float_extend partial SSE register stall splitter): Ditto.
2750 (float_truncate partial SSE register stall splitter): Ditto.
2752 2018-09-09 Hans-Peter Nilsson <hp@bitrange.com>
2755 * config/mmix/mmix.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
2756 to speculation_safe_value_not_needed.
2759 * config/mmix/mmix.c (mmix_assemble_integer): Handle byte-size
2760 non-CONST_INT rtx:es using assemble_integer_with_op ".byte".
2761 (MMIX_CFUN_NEEDS_SAVED_EH_RETURN_ADDRESS): Don't call
2762 leaf_function_p, instead use has_hard_reg_initial_val.
2764 2018-09-09 Nathan Sidwell <nathan@acm.org>
2766 * gcc.h (pfatal_with_name): Don't declare here.
2767 * gcc.c (pfatal_with_name): Make static.
2769 2018-09-09 Xianmiao Qu <xianmiao_qu@c-sky.com>
2771 * config/csky/csky.md (*cskyv2_adddi3, *cskyv2_subdi3): Add
2774 2018-09-08 John David Anglin <danglin@gcc.gnu.org>
2776 PR rtl-optimization/85458
2777 * sel-sched.c (sel_target_adjust_priority): Allow backend adjust
2778 priority hook to reduce the priority of EXPR.
2780 2018-09-07 Uros Bizjak <ubizjak@gmail.com>
2782 * config/i386/i386.md (float<SWI48x:mode><MODEF:mode>2) Enable
2783 DImode for x87 on 32bit targets. Conditionally disable x87 modes
2784 with X87_ENABLE_FLOAT. Remove preparation code.
2785 (*float<SWI48:mode><MODEF:mode>2): Rename from
2786 *float<SWI48:mode><MODEF:mode>2_mixed. Handle x87, SSE and mixed
2787 math using "enabled" attribute.
2788 (*floatdi<MODEF:mode>2_i387): Rename from
2789 *float<SWI48x:mode><MODEF:mode>2_i387. Handle only DImode and
2790 enable for 32bit targets only.
2791 (floatdi<X87MODEF:mode>2_i387_with_xmm pre-reload splitter): New
2793 (floatdi<X87MODEF:mode>2_i387_with_xmm): Use register_operand
2794 as operand 1 predicate. Rewrite as define_insn_and_split.
2795 (floatdi<X87MODEF:mode>2_i387_with_xmm memory input splitter): Remove.
2797 2018-09-06 Uros Bizjak <ubizjak@gmail.com>
2799 * reg-stack.c (get_true_reg) <case FLOAT_TRUNCATE>: Reorder
2800 to fallthru to FLOAT case.
2802 2018-09-06 Will Schmidt <will_schmidt@vnet.ibm.com>
2805 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Update logic
2806 around folding of vec_sl to handle out of range shift values.
2808 2018-09-06 Uros Bizjak <ubizjak@gmail.com>
2810 * config/i386/i386.md (fix_trunc<mode>_fisttp_i387_1): Remove.
2811 Update callers to gen_fix_trunc<mode>_i387_fisttp
2812 (fix_trunc<mode>_i387_fisttp): Change operand 0 predicate to
2813 nonimmediate_operand.
2814 (fix_trunc<mode>_i387_fisttp_with_temp): Remove insn pattern
2815 and corresponding splitters.
2816 (*fix_trunc<mode>_i387_1): Always expand with fix_trunc<mode>_i387.
2817 (fix_truncdi_i387): Change operand 0 predicate to nonimmediate_operand.
2818 (fix_truncdi_i387_with_temp): Remove insn pattern
2819 and corresponding splitters.
2820 (fix_trunc<mode>_i387): Change operand 0 predicate to
2821 nonimmediate_operand.
2822 (fix_trunc<mode>_i387_with_temp): Remove insn pattern
2823 and corresponding splitters.
2824 (*fistdi2_1): Remove.
2826 (fistdi2_with_temp): Remove insn pattern and corresponding splitters.
2827 (lrintxfdi2): Remove expander. Reimplement as define_insn.
2828 (*fist<mode>2_1): Remove.
2829 (fist<mode>2): Ditto.
2830 (fist<mode>2_with_temp): Remove insn pattern and corresponding
2832 (lrintxf<mode>2): Remove expander. Reimplement as define_insn.
2833 (*fist<mode>2_<rounding>_1): Always expand with fist<mode>2_<rounding>.
2834 (fistdi2_<rounding>): Change operand 0 predicate to
2835 nonimmediate_operand.
2836 (fistdi2_<rounding>_with_temp): Remove insn pattern
2837 and corresponding splitters.
2838 (fist<mode>2_<rounding>): Change operand 0 predicate to
2839 nonimmediate_operand.
2840 (fist<mode>2_<rounding>_with_temp): Remove insn pattern
2841 and corresponding splitters.
2843 (*fixuns_trunc<mode>si2_avx512f_zext): Depend on TARGET_SSE_MATH.
2845 2018-09-06 Bernd Edlinger <bernd.edlinger@hotmail.de>
2847 * varasm.c (output_constructor_regular_field): Check TYPE_SIZE_UNIT of
2850 2018-09-06 Will Schmidt <will_schmidt@vnet.ibm.com>
2852 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add support for
2853 early gimple folding of vec_splat().
2854 * tree-vect-generic.c: Remove static from tree_vec_extract() definition.
2855 * gimple-fold.h: Add an extern define for tree_vec_extract().
2857 2018-09-06 Will Schmidt <will_schmidt@vnet.ibm.com>
2859 * config/rs6000/rs6000.c (fold_mergehl_helper): Add types_compatible_p
2860 wrappers around TREE_TYPE comparisons.
2862 2018-09-06 Ilya Leoshkevich <iii@linux.ibm.com>
2865 * config/s390/predicates.md: Add nonsym_memory_operand.
2866 * config/s390/s390.c (s390_legitimize_cs_operand): If operand
2867 contains a SYMBOL_REF, load it into an intermediate pseudo.
2868 (s390_emit_compare_and_swap): Legitimize operand.
2869 * config/s390/s390.md: Use the new nonsym_memory_operand
2870 with UNSPECV_CAS patterns.
2872 2018-09-06 Ilya Leoshkevich <iii@linux.ibm.com>
2875 * config/s390/s390-passes.def: New file.
2876 * config/s390/s390-protos.h (class rtl_opt_pass): Add forward
2878 (make_pass_s390_early_mach): Add declaration.
2879 * config/s390/s390.c (make_pass_s390_early_mach):
2880 (s390_option_override): Remove dynamic registration.
2881 * config/s390/t-s390: Add s390-passes.def.
2883 2018-09-06 Ilya Leoshkevich <iii@linux.ibm.com>
2885 * config/s390/s390.c (s390_decompose_constant_pool_ref):
2886 Remove UNSPEC_LTREL_BASE check.
2887 (annotate_constant_pool_refs): Likewise.
2888 (find_constant_pool_ref): Likewise.
2889 (find_ltrel_base): Removed.
2890 (replace_ltrel_base): Removed.
2891 (s390_mainpool_finish): Remove replace_ltrel_base call.
2892 (s390_chunkify_start): Remove pending LTREL_BASE logic.
2893 (s390_chunkify_finish): Remove replace_ltrel_base call.
2894 * config/s390/s390.md: Remove UNSPEC_LTREL_BASE.
2896 2018-09-06 Hans-Peter Nilsson <hp@axis.com>
2899 * config/cris/cris.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
2900 to speculation_safe_value_not_needed.
2902 2018-09-05 Cesar Philippidis <cesar@codesourcery.com>
2903 Bernd Schmidt <bernds_cb1@t-online.de>
2905 * config/nvptx/nvptx-opts.h: New file.
2906 * config/nvptx/nvptx.c (nvptx_file_start): Print the correct .target.
2907 * config/nvptx/nvptx.h: Include "nvptx-opts.h".
2909 (TARGET_SM35): New macro.
2910 * config/nvptx/nvptx.md (atomic_fetch_<logic><mode>): Enable with the
2912 * config/nvptx/nvptx.opt (ptx_isa, sm_30, sm_35): New enum and its
2914 (misa=): New option.
2915 * doc/invoke.texi (Nvidia PTX Options): Document -misa.
2917 2018-09-05 Uros Bizjak <ubizjak@gmail.com>
2919 * config/i386/i386.md (truncdfsf2): Remove expander.
2920 (truncdfsf2_with_temp): Ditto.
2921 (truncxf<mode>2): Ditto.
2922 (*truncdfsf_fast_mixed): Remove insn pattern.
2923 (*truncdfsf_fast_i387): Ditto.
2924 (*truncdfsf_mixed): Ditto.
2925 (*truncdfsf_i387): Ditto.
2926 (*truncdfsf2_i387_1): Ditto.
2927 (*truncxfsf2_mixed): Ditto.
2928 (*truncxfdf2_mixed): Ditto.
2929 (*truncxf<mode>2_i387_noop): Ditto. Update callers
2930 to call gen_truncxf<mode>2 instead.
2931 (*truncxf<mode>2_i387): Remove.
2932 (reg->reg splitters): Remove splitter pattern.
2933 (reg->mem splitters): Ditto.
2935 (truncdfsf2): New insn pattern.
2936 (truncxf<mode>2): Ditto.
2938 2018-09-05 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
2940 * tree-ssa-math-opts.c (is_mult_by): New function.
2941 (is_square_of): Use the above.
2942 (optimize_recip_sqrt): New function.
2943 (pass_cse_reciprocals::execute): Use the above.
2945 2018-09-05 Richard Biener <rguenther@suse.de>
2948 * tree-ssa-sccvn.c (rpo_elim::eliminate_push_avail): Make sure
2949 to zero-init the emplaced vec.
2951 2018-09-05 Martin Liska <mliska@suse.cz>
2953 PR tree-optimization/87205
2954 * tree-switch-conversion.c (pass_lower_switch::execute):
2955 Group cases for switch statements.
2957 2018-09-05 Richard Biener <rguenther@suse.de>
2959 PR tree-optimization/87217
2960 * tree-ssa-sccvn.c (vuse_valueize): New.
2961 (vn_reference_lookup_pieces): Use it.
2962 (vn_reference_lookup): Likewise.
2964 2018-09-05 Nathan Sidwell <nathan@acm.org>
2967 * stor-layout.c (place_field): Scan forwards to check last
2968 bitfield when ms_bitfield_placement is in effect.
2970 2018-09-05 Richard Biener <rguenther@suse.de>
2973 * tree-vect-stmts.c (vectorizable_simd_clone_call): Fix bogus
2976 2018-09-05 Siddhesh Poyarekar <siddhesh@sourceware.org>
2977 Kugan Vivekanandarajah <kugan.vivekanandarajah@linaro.org>
2979 * config/aarch64/falkor-tag-collision-avoidance.c: New file.
2980 * config.gcc (extra_objs): Build it.
2981 * config/aarch64/t-aarch64 (falkor-tag-collision-avoidance.o):
2983 * config/aarch64/aarch64-passes.def
2984 (pass_tag_collision_avoidance): New pass.
2985 * config/aarch64/aarch64.c (qdf24xx_tunings): Add
2986 AARCH64_EXTRA_TUNE_RENAME_LOAD_REGS to tuning_flags.
2987 (aarch64_classify_address): Remove static qualifier.
2988 (aarch64_address_info, aarch64_address_type): Move to...
2989 * config/aarch64/aarch64-protos.h: ... here.
2990 (make_pass_tag_collision_avoidance): New function.
2991 * config/aarch64/aarch64-tuning-flags.def (rename_load_regs):
2994 2018-09-05 Martin Liska <mliska@suse.cz>
2996 * doc/gcov.texi: Update documentation of humar
2998 * gcov.c (format_count): Print one decimal place, it provides
2999 more fine number of situations like '1G' vs. '1.4G'.
3001 2018-09-05 Martin Liska <mliska@suse.cz>
3004 * config/rs6000/rs6000.opt: Mark the option as Deprecated.
3005 * optc-gen.awk: Allow 'Var' for Deprecated options in order
3006 to generate a MASK value.
3008 2018-09-04 H.J. Lu <hongjiu.lu@intel.com>
3011 * dwarf2out.c (based_loc_descr): Allow hard frame pointer even
3012 if frame pointer isn't used.
3013 (compute_frame_pointer_to_fb_displacement): Likewise.
3015 2018-09-04 Jakub Jelinek <jakub@redhat.com>
3018 * common/config/i386/i386-common.c (OPTION_MASK_ISA_XSAVEOPT_SET,
3019 OPTION_MASK_ISA_XSAVES_SET, OPTION_MASK_ISA_XSAVEC_SET): Use
3020 OPTION_MASK_ISA_XSAVE_SET instead of OPTION_MASK_ISA_XSAVE.
3021 (OPTION_MASK_ISA_XSAVE_UNSET): Add OPTION_MASK_ISA_XSAVES_UNSET
3022 and OPTION_MASK_ISA_XSAVEC_UNSET.
3024 2018-09-04 Max Filippov <jcmvbkbc@gmail.com>
3026 * config/xtensa/xtensa.c (xtensa_expand_atomic): Reorder AND and
3027 XOR operations in NAND case.
3029 2018-09-04 Aldy Hernandez <aldyh@redhat.com>
3031 * wide-int-range.cc (wide_int_range_convert): New.
3032 * wide-int-range.h (wide_int_range_convert): New.
3033 * tree-vrp.c (extract_range_from_unary_expr): Abstract wide int
3034 code into wide_int_range_convert.
3035 (extract_range_into_wide_ints): Do not munge anti range constants
3036 into the entire domain. Just return the range back.
3038 2018-09-04 Martin Liska <mliska@suse.cz>
3040 * genmatch.c (output_line_directive): Add new argument
3042 (dt_simplify::gen_1): Encapsulate dump within __builtin_expect.
3044 2018-09-04 Jonathan Wakely <jwakely@redhat.com>
3046 * doc/invoke.texi (Option Summary): Add whitespace.
3048 * doc/invoke.texi (Option Summary): Add -Waligned-new.
3050 2018-09-04 Richard Biener <rguenther@suse.de>
3052 PR tree-optimization/87211
3053 * tree-ssa-sccvn.c (visit_phi): When value-numbering to a
3054 backedge value we're supposed to treat as VARYING also number
3055 the PHI to VARYING in case it got a different value-number already.
3057 2018-09-04 Aldy Hernandez <aldyh@redhat.com>
3059 * tree-vrp.c (vrp_can_optimize_bit_op): Remove.
3060 (extract_range_from_binary_expr_1): Do not call
3061 vrp_can_optimize_bit_op.
3062 * wide-int-range.cc (wide_int_range_can_optimize_bit_op): Make
3064 (wide_int_range_get_mask_and_bounds): New.
3065 (wide_int_range_optimize_bit_op): New.
3066 (wide_int_range_bit_ior): Call wide_int_range_optimize_bit_op.
3067 (wide_int_range_bit_and): Same.
3068 * wide-int-range.h (wide_int_range_can_optimize_bit_op): Remove.
3069 (wide_int_range_optimize_bit_op): New.
3070 (wide_int_range_get_mask_and_bounds): New.
3072 2018-09-04 Richard Biener <rguenther@suse.de>
3074 PR tree-optimization/87176
3075 * tree-ssa-sccvn.c (visit_phi): Remove redundant allsame
3076 variable. When value-numbering a virtual PHI node make sure
3077 to not value-number to the backedge value.
3079 2018-09-04 Jonathan Wakely <jwakely@redhat.com>
3081 * doc/extend.texi (Long Long, Hex Floats): Document support for
3082 long long and hex floats in more recent versions of ISO C++.
3084 2018-09-03 Richard Biener <rguenther@suse.de>
3086 PR tree-optimization/87177
3087 * tree-ssa-sccvn.c (vuse_ssa_val): Revert previous change, keep
3090 2018-09-03 Alexander Monakov <amonakov@ispras.ru>
3092 * bb-reorder.c (edge_order): Convert to C-qsort-style
3093 tri-state comparator.
3094 (reorder_basic_blocks_simple): Change std::stable_sort to
3097 2018-09-03 Alexander Monakov <amonakov@ispras.ru>
3099 * tree-loop-distribution.c (offset_cmp): Convert to C-qsort-style
3100 tri-state comparator.
3101 (fuse_memset_builtins): Change std::stable_sort to gcc_stablesort.
3103 2018-09-03 Alexander Monakov <amonakov@ispras.ru>
3105 * sort.cc (struct sort_ctx): New field 'nlim'. Use it...
3106 (mergesort): ... here as maximum count for using netsort.
3107 (gcc_qsort): Set nlim to 3 if stable sort is requested.
3108 (gcc_stablesort): New.
3109 * system.h (gcc_stablesort): Declare.
3111 2018-09-03 Alexander Monakov <amonakov@ispras.ru>
3113 * sort.cc (gcc_qsort) [CHECKING_P]: Call qsort_chk.
3114 * system.h (qsort): Always redirect to gcc_qsort. Update comment.
3115 * vec.c (qsort_chk): Do not call gcc_qsort. Update comment.
3117 2018-09-03 Segher Boessenkool <segher@kernel.crashing.org>
3119 * config/rs6000/rs6000.md (*mov<mode>_hardfloat32): Remove %U from the
3120 lxsdx and stxsdx alternatives.
3121 (*mov<mode>_hardfloat64): Ditto.
3122 * config/rs6000/vsx.md (*vsx_extract_<mode>_store): Ditto.
3124 2018-09-03 Richard Biener <rguenther@suse.de>
3126 PR tree-optimization/87200
3127 * tree-ssa-sccvn.c (vn_nary_build_or_lookup_1): Valueize a
3130 2018-09-03 Martin Liska <mliska@suse.cz>
3132 PR tree-optimization/87201
3133 * tree-switch-conversion.c (switch_decision_tree::balance_case_nodes):
3134 Fix parenthesis in an expression.
3136 2018-09-03 Richard Biener <rguenther@suse.de>
3138 PR tree-optimization/87197
3139 * tree-ssa-sccvn.c (vn_nary_build_or_lookup_1): Mark the new def
3140 visited. CSE the VN_INFO hashtable lookup.
3142 PR tree-optimization/87169
3143 * tree-ssa-sccvn.c (do_rpo_vn): When marking loops for not
3144 iterating make sure there's no extra backedges from irreducible
3145 regions feeding the header. Mark the destination block
3148 2018-09-03 Martin Liska <mliska@suse.cz>
3151 * common/common-target.def: Add TARGET_GET_VALID_OPTION_VALUES.
3152 * common/common-targhooks.c (default_get_valid_option_values):
3154 * common/common-targhooks.h (default_get_valid_option_values):
3156 * common/config/i386/i386-common.c: Move processor_target_table
3158 (ix86_get_valid_option_values): New function.
3159 (TARGET_GET_VALID_OPTION_VALUES): New macro.
3160 * config/i386/i386.c (struct ptt): Move to i386-common.c.
3161 (PTA_*): Move all defined masks into i386-common.c.
3162 (ix86_function_specific_restore): Use new processor_cost_table.
3163 * config/i386/i386.h (struct ptt): Moved from i386.c.
3164 (struct pta): Likewise.
3165 * doc/tm.texi: Document new TARGET_GET_VALID_OPTION_VALUES.
3166 * doc/tm.texi.in: Likewise.
3167 * opt-suggestions.c (option_proposer::suggest_option):
3168 Pass prefix to build_option_suggestions.
3169 (option_proposer::get_completions): Likewise.
3170 (option_proposer::build_option_suggestions): Use the new target
3172 * opts.c (struct option_help_tuple): New struct.
3173 (print_filtered_help): Use the new target hook.
3175 2018-09-03 Martin Liska <mliska@suse.cz>
3178 * predict.c (set_even_probabilities): Add likely_edges
3179 argument and handle cases where we have precisely one
3181 (combine_predictions_for_bb): Catch also likely_edges.
3182 (tree_predict_by_opcode): Handle gswitch statements.
3183 * tree-cfg.h (find_case_label_for_value): New declaration.
3184 (find_taken_edge_switch_expr): Likewise.
3185 * tree-switch-conversion.c (switch_decision_tree::balance_case_nodes):
3186 Find pivot in decision tree based on probabily, not by number of
3189 2018-09-02 Gerald Pfeifer <gerald@pfeifer.com>
3191 * doc/standards.texi (Standards): Update Objective-C reference.
3193 2018-09-01 Gerald Pfeifer <gerald@pfeifer.com>
3195 * doc/install.texi (Prerequisites): Update link for MPC.
3197 2018-09-01 Michael Matz <matz@suse.de>
3199 PR tree-optimization/87074
3200 * gimple-loop-jam.c (unroll_jam_possible_p): Check loop exit
3201 PHIs for outer-loop uses.
3203 2018-09-01 Gerald Pfeifer <gerald@pfeifer.com>
3205 * doc/generic.texi (OpenMP): Adjust link to openmp.org.
3206 * doc/invoke.texi (C Dialect Options): Ditto.
3208 2018-09-01 Gerald Pfeifer <gerald@pfeifer.com>
3210 * doc/install.texi (Prerequisites): Adjust link mpfr.org.
3212 2018-08-31 Richard Biener <rguenther@suse.de>
3214 PR tree-optimization/87168
3215 * tree-ssa-sccvn.c (SSA_VAL): Add visited output parameter.
3216 (rpo_elim::eliminate_avail): When OP was not visited it must
3219 2018-08-31 David Malcolm <dmalcolm@redhat.com>
3221 * tree-vrp.c (copy_value_range): Convert param "from" from
3222 "value_range *" to "const value_range *".
3223 (range_is_null): Likewise for param "vr".
3224 (range_int_cst_p): Likewise.
3225 (range_int_cst_singleton_p): Likewise.
3226 (symbolic_range_p): Likewise.
3227 (value_ranges_intersect_p): Likewise for both params.
3228 (value_range_nonnegative_p): Likewise for param "vr".
3229 (value_range_constant_singleton): Likewise.
3230 (vrp_set_zero_nonzero_bits): Likewise for param "ar".
3231 (extract_range_into_wide_ints): Likewise for param "vr".
3232 (extract_range_from_multiplicative_op): Likewise for params "vr0"
3234 (vrp_can_optimize_bit_op): Likewise.
3235 (extract_range_from_binary_expr_1): Likewise for params "vr0_" and
3237 (extract_range_from_unary_expr): Likewise.
3238 (debug_value_range): Likewise for param "vr".
3239 (value_range::dump): Add "const" qualifier.
3240 (vrp_prop::check_array_ref): Convert local "vr" from
3241 "value_range *" to "const value_range *".
3242 (vrp_prop::check_mem_ref): Likewise.
3243 (vrp_prop::visit_stmt): Likewise for local "old_vr".
3244 (vrp_intersect_ranges_1): Likewise for param "vr_1".
3245 (vrp_intersect_ranges): Likewise.
3246 (simplify_stmt_for_jump_threading): Likewise for local "vr".
3247 (vrp_prop::vrp_finalize): Likewise.
3248 * tree-vrp.h (value_range::dump): Add "const" qualifier.
3249 (vrp_intersect_ranges): Add "const" qualifier to params as above.
3250 (extract_range_from_unary_expr): Likewise.
3251 (value_range_constant_singleton): Likewise.
3252 (symbolic_range_p): Likewise.
3253 (copy_value_range): Likewise.
3254 (extract_range_from_binary_expr_1): Likewise.
3255 (range_int_cst_p): Likewise.
3256 (vrp_set_zero_nonzero_bits): Likewise.
3257 (range_int_cst_singleton_p): Likewise.
3259 2018-08-31 Vlad Lazar <vlad.lazar@arm.com>
3261 * config/aarch64/arm_neon.h (vabsd_s64): New.
3262 (vnegd_s64): Likewise.
3264 2018-08-31 Martin Jambor <mjambor@suse.cz>
3266 * ipa-cp.c (estimate_local_effects): Replace wrong MAX with MIN.
3268 2018-08-31 Martin Liska <mliska@suse.cz>
3270 * ipa-icf.c (sem_item::add_type): Use
3271 sem_item::m_type_hash_cache.
3272 * ipa-icf.h: Move the cache from sem_item_optimizer
3275 2018-08-31 Nathan Sidwell <nathan@acm.org>
3277 * doc/extend.texi (Backwards Compatibility): Remove implicit
3278 extern C leeway of () being (...).
3280 2018-08-31 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
3282 * ipa-inline.c (can_inline_edge_by_limits_p): Fix typos in comment.
3284 2018-08-31 Segher Boessenkool <segher@kernel.crashing.org>
3288 * config/rs6000/rs6000.md (lround<mode>di2): Gate on TARGET_FPRND.
3290 2018-08-31 Jakub Jelinek <jakub@redhat.com>
3293 * expmed.c (expand_mult_const): Use immed_wide_int_const instead of
3294 gen_int_mode. Formatting fixes.
3296 2018-08-30 Sandra Loosemore <sandra@codesourcery.com>
3298 * target.def (custom_function_descriptors): Improve documentation.
3299 * doc/tm.texi.in (Trampolines): Expand discussion of function
3300 descriptors and move TARGET_CUSTOM_FUNCTION_DESCRIPTORS to the
3301 beginning of the section.
3302 * doc/tm.texi: Regenerated.
3304 2018-08-30 Jose E. Marchesi <jose.marchesi@oracle.com>
3306 * cfg.h (class auto_edge_flag): Spell out the template-id of the
3307 base class in the initializer list. This is a workaround for
3308 building with older GCC.
3309 (class auto_bb_flag): Likewise.
3311 2018-08-30 Aaron Sawdey <acsawdey@linux.ibm.com>
3313 * config/rs6000/altivec.md (altivec_eq<mode>): Remove star.
3314 (altivec_vcmpequ<VI_char>_p): Remove star.
3315 * config/rs6000/rs6000-string.c (do_load_for_compare): Support
3317 (expand_strncmp_vec_sequence): New function.
3318 (emit_final_str_compare_vec): New function.
3319 (expand_strn_compare): Add support for vector strncmp.
3320 * config/rs6000/rs6000.opt (-mstring-compare-inline-limit): Change
3321 length specification to bytes.
3322 * config/rs6000/vsx.md (vsx_ld_elemrev_v16qi_internal): Remove star.
3323 (vcmpnezb_p): New pattern.
3324 * doc/invoke.texi (RS/6000 and PowerPC Options): Update documentation
3325 for option -mstring-compare-inline-limit.
3327 2018-08-30 Thiago Macieira <thiago.macieira@intel.com>
3329 * config/i386/i386.c (PTA_WESTMERE): Remove PTA_AES.
3330 (PTA_SKYLAKE): Add PTA_AES.
3331 (PTA_GOLDMONT): Likewise.
3333 2018-08-29 Jan Hubicka <jh@suse.cz>
3336 * lto-opts.c (lto_write_options): Always stream PIC/PIE mode.
3337 * lto-wrapper.c (merge_and_complain): Fix merging of PIC/PIE.
3339 2018-08-29 Jan Hubicka <jh@suse.cz>
3341 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not follow
3343 (hash_tree): Do not visit TYPE_STUB_DECL.
3344 * tree-streamer-out.c (write_ts_type_common_tree_pointers): Do not
3345 stream TYPE_STUB_DECL.
3346 * tree-streamer-in.c (lto_input_ts_type_common_tree_pointers): Likewise.
3347 * ipa-utils.h (type_with_linkage_p): Do not rely on TYPE_STUB_DECL
3348 after free_lang_data.
3349 (type_in_anonymous_namespace_p): Likewise.
3351 2018-08-29 Jan Hubicka <jh@suse.cz>
3353 * sreal.h (SREAL_PART_BITS): Change to 31; remove seemingly unnecessary
3354 comment that it has to be even number.
3355 (class sreal): Change m_sig type to int32_t.
3356 * sreal.c (sreal::dump, sreal::to_int, opreator+, operator-): Use
3357 int64_t for temporary calculations.
3358 (sreal_verify_basics): Drop one bit from minimum and maximum.
3360 2018-08-30 Richard Biener <rguenther@suse.de>
3362 PR tree-optimization/87147
3363 * tree-ssa-sccvn.c (SSA_VISITED): New function.
3364 (visit_phi): When the degenerate result is from the backedge and
3365 we didn't visit its definition yet drop to VARYING.
3366 (do_rpo_vn): Properly mark blocks with incoming backedges as executable.
3368 2018-08-29 Jan Hubicka <jh@suse.cz>
3370 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not walk
3372 (hash_tree): Likewise.
3374 2018-08-29 Jan Hubicka <jh@suse.cz>
3376 * tree.c (find_decls_types_r): Walk also TYPE_NEXT_PTR_TO
3377 and TYPE_NEXT_REF_TO.
3379 2018-08-29 Jan Hubicka <jh@suse.cz>
3381 * sreal.h (SREAL_PART_BITS): Change to 31; remove seemingly unnecessary
3382 comment that it has to be even number.
3383 (class sreal): Change m_sig type to int32_t.
3384 * sreal.c (sreal::dump, sreal::to_int, opreator+, operator-): Use
3385 int64_t for temporary calculations.
3386 (sreal_verify_basics): Drop one bit from minimum and maximum.
3388 2018-08-30 Tamar Christina <tamar.christina@arm.com>
3390 * config/aarch64/aarch64.c (aarch64_expand_movmem): Set TImode max.
3392 2018-08-30 Vlad Lazar <vlad.lazar@arm.com>
3395 * expmed.c (canonicalize_comparison): Use wi::sub instead of wi::add
3396 if to_add is negative.
3398 2018-08-29 Bernd Edlinger <bernd.edlinger@hotmail.de>
3401 * builtins.c (c_strlen): Improve range checks.
3403 2018-08-29 Martin Sebor <msebor@redhat.com>
3404 Jeff Law <law@redhat.com>
3406 PR tree-optimization/86714
3407 PR tree-optimization/86711
3408 * builtins.c (c_strlen): Add arguments to call to string_constant.
3409 * expr.c (string_constant): Add argument. Detect missing nul
3410 terminator and outermost declaration it's missing in.
3411 * expr.h (string_constant): Add argument.
3412 * fold-const.c (read_from_constant_string): Add arguments to call to
3414 (c_getstr): Likewise.
3415 * tree-ssa-forwprop.c (simplify_builtin_call): Likewise.
3417 * tree-ssa-strlen.c (get_stridx): Likewise.
3419 2018-08-29 Jan Hubicka <jh@suse.cz>
3421 * tree-streamer-in.c (lto_input_ts_function_decl_tree_pointers):
3422 Do not stream DECL_VINDEX.
3423 * tree-streamer-out.c (write_ts_function_decl_tree_pointers): Likewise.
3424 * tree.c (free_lang_data_in_decl): Clear DECL_VINDEX.
3425 (decl_function_context): Use DECL_VIRTUAL_P rather than DECL_VINDEX.
3427 2018-08-29 Richard Biener <rguenther@suse.de>
3429 * tree-ssa-sccvn.c (vuse_ssa_val): Return NULL for unvisited
3430 virtual operands that are not default defs to honor region
3432 (rpo_vn_valueize): Remove ineffective code here.
3434 2018-08-29 Richard Biener <rguenther@suse.de>
3436 PR tree-optimization/87132
3437 * tree-ssa-alias.c (get_continuation_for_phi): Do not translate
3438 when skipping defs reachable over backedges.
3440 2018-08-29 Richard Biener <rguenther@suse.de>
3442 * tree-core.h: Document use of deprecated_flag in SSA_NAME.
3443 * tree.h (SSA_NAME_POINTS_TO_READONLY_MEMORY): Define.
3444 * tree-into-ssa.c (pass_build_ssa::execute): Initialize
3445 function parameters SSA_NAME_POINTS_TO_READONLY_MEMORY from fnspec.
3446 * tree-ssa-sccvn.c (const_parms, init_const_parms): Remove.
3447 (vn_reference_lookup_3): Remove use of const_parms.
3448 (free_rpo_vn): Do not free const_parms.
3449 (do_rpo_vn): Do not call init_const_parms.
3450 * tree-ssa-alias.c (refs_may_alias_p_1): Honor
3451 SSA_NAME_POINTS_TO_READONLY_MEMORY.
3452 (call_may_clobber_ref_p_1): Likewise.
3454 2018-08-29 Alexander Monakov <amonakov@ispras.ru>
3457 * invoke.texi (Optimization Options): List -ftree-scev-cprop.
3459 (-ftree-scev-cprop): Document.
3461 2018-08-29 Jan Hubicka <jh@suse.cz>
3463 * sreal.h (normalize, normalize_up, normalize_down): Add new_sig/new_exp
3465 (sreal constructor): Update.
3466 * sreal.c (sreal:operator+, sreal:operator-, sreal:operator*,
3467 sreal:operator/): Update.
3469 2018-08-29 Martin Liska <mliska@suse.cz>
3471 * tree-switch-conversion.c (switch_conversion::expand):
3472 Strenghten assumption about gswitch statements.
3474 2018-08-29 Richard Biener <rguenther@suse.de>
3476 PR tree-optimization/87117
3477 * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_stmt): Only
3478 re-value-number released SSA VDEFs.
3480 2018-08-29 Richard Biener <rguenther@suse.de>
3482 PR tree-optimization/87126
3483 * tree-ssa-sccvn.c (vn_reference_insert): Remove assert.
3485 2018-08-28 Jim Wilson <jimw@sifive.com>
3487 * config/riscv/pic.md: Rewrite.
3488 * config/riscv/riscv.c (riscv_address_insns): Return cost of 3 for
3490 * config/riscv/riscv.md (ZERO_EXTEND_LOAD): Delete.
3491 (SOFTF, default_load, softload, softstore): New.
3493 2018-08-28 Jeff Law <law@redhat.com>
3495 * fold-const.c (fold_binary_loc): Remove recently added assert.
3497 2018-08-28 Joern Rennecke <joern.rennecke@riscy-ip.com>
3499 * genpreds.c (write_predicate_subfunction): Also add ATTRIBUTE_UNUSED
3500 to OP parmeter of generated function.
3502 2018-08-28 MCC CS <deswurstes@users.noreply.github.com>
3504 PR tree-optimization/87009
3505 * match.pd: Add boolean optimizations.
3507 2018-08-28 Martin Sebor <msebor@redhat.com>
3510 * calls.c (alloc_max_size): Treat HOST_WIDE_INT special.
3511 * gimple-ssa-warn-alloca.c (adjusted_warn_limit): New function.
3512 (pass_walloca::gate): Use it.
3513 (alloca_call_type): Same.
3514 (pass_walloca::execute): Same.
3515 * stor-layout.c (layout_decl): Treat HOST_WIDE_INT special.
3517 2018-08-28 David Malcolm <dmalcolm@redhat.com>
3519 * dumpfile.h (ATTRIBUTE_GCC_DUMP_PRINTF): Change version check on
3520 GCC_VERSION for usage of "__gcc_dump_printf__" format from
3523 2018-08-28 Richard Biener <rguenther@suse.de>
3525 PR tree-optimization/87124
3526 * tree-ssa-sccvn.c (vn_lookup_simplify_result): Guard against
3527 constants before looking up avail.
3529 2018-08-28 Jakub Jelinek <jakub@redhat.com>
3532 * calls.c (maybe_warn_nonstring_arg): Punt early if
3533 warn_stringop_overflow is zero. Don't call get_range_strlen
3534 on 3rd argument, keep iterating until lenrng[1] is INTEGER_CST.
3535 Swap comparison operands to have constants on rhs. Only use
3536 lenrng[1] if non-NULL and INTEGER_CST. Don't uselessly
3537 increment lenrng[0].
3539 2018-08-28 Richard Sandiford <richard.sandiford@arm.com>
3541 * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Fix unguarded
3542 use of tree_to_shwi. Remove duplicated test for the size being
3543 a whole number of bytes.
3545 2018-08-28 Richard Biener <rguenther@suse.de>
3547 PR tree-optimization/87117
3548 * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_cleanup):
3549 Handle removed stmt without LHS (GIMPLE_NOP).
3551 2018-08-28 Richard Biener <rguenther@suse.de>
3553 PR tree-optimization/87117
3554 * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Exclude
3555 void which is is_gimple_reg_type by checking for COMPLETE_TYPE_P.
3557 2018-08-28 Richard Biener <rguenther@suse.de>
3559 PR tree-optimization/87117
3560 * tree-ssa-pre.c (compute_avail): Do not make expressions
3561 with predicated values available.
3562 (get_expr_value_id): Assert we do not run into predicated value
3565 2018-08-28 Richard Biener <rguenther@suse.de>
3567 PR tree-optimization/87117
3568 * tree-ssa-operands.c (add_stmt_operand): STRING_CST may
3569 get virtual operands.
3570 (get_expr_operands): Handle STRING_CST like other decls.
3572 2018-08-28 Martin Liska <mliska@suse.cz>
3574 * tree.h: Update documentation of fndecl_built_in_p
3578 2018-08-27 Jeff Law <law@redhat.com>
3579 PR tree-optimization/87110
3580 * tree-ssa-dse.c (compute_trims): Handle non-constant
3583 2018-08-27 Martin Sebor <msebor@redhat.com>
3585 PR tree-optimization/86914
3586 * tree-ssa-strlen.c (maybe_set_strlen_range): Avoid MEM_REF.
3588 2018-08-27 Martin Sebor <msebor@redhat.com>
3590 PR tree-optimization/87112
3591 * builtins.c (expand_builtin_strnlen): Convert c_strlen result to
3592 the type of the bound argument.
3594 2018-08-27 Jeff Law <law@redhat.com>
3596 * tree-ssa-dse.c (compute_trims): Handle case where the reference's
3597 type does not have a TYPE_SIZE_UNIT.
3599 2018-08-27 Steve Ellcey <sellcey@cavium.com>
3601 * config/aarch64/aarch64-speculation.cc: Replace include of cfg.h
3602 with include of backend.h.
3604 2018-08-27 Richard Biener <rguenther@suse.de>
3606 PR tree-optimization/86927
3607 * tree-vect-loop.c (vect_create_epilog_for_reduction): Properly
3608 use const cond reduction code.
3610 2018-08-27 Alexander Monakov <amonakov@ispras.ru>
3612 PR tree-optimization/85758
3613 * match.pd ((X & Y) ^ Y): Add :s qualifier to inner expression.
3615 2018-08-27 David Malcolm <dmalcolm@redhat.com>
3618 * diagnostic-show-locus.c (class layout_range): Update for
3619 conversion of show_caret_p to a tri-state.
3620 (layout_range::layout_range): Likewise.
3621 (make_range): Likewise.
3622 (layout::maybe_add_location_range): Likewise.
3623 (layout::should_print_annotation_line_p): Don't show annotation
3624 lines for ranges that are SHOW_LINES_WITHOUT_RANGE.
3625 (layout::get_state_at_point): Update for conversion of
3626 show_caret_p to a tri-state. Bail out early for
3627 SHOW_LINES_WITHOUT_RANGE, so that such ranges don't affect
3628 underlining or source colorization.
3629 (gcc_rich_location::add_location_if_nearby): Update for conversion
3630 of show_caret_p to a tri-state.
3631 (selftest::test_one_liner_multiple_carets_and_ranges): Likewise.
3632 (selftest::test_one_liner_fixit_replace_equal_secondary_range):
3634 (selftest::test_one_liner_labels): Likewise.
3635 * gcc-rich-location.c (gcc_rich_location::add_expr): Update for
3636 conversion of show_caret_p to a tri-state.
3637 * pretty-print.c (text_info::set_location): Likewise.
3638 * pretty-print.h (text_info::set_location): Likewise.
3639 * substring-locations.c (format_warning_n_va): Likewise.
3640 * tree-diagnostic.c (default_tree_printer): Likewise.
3641 * tree-pretty-print.c (newline_and_indent): Likewise.
3643 2018-08-27 David Malcolm <dmalcolm@redhat.com>
3646 * diagnostic-show-locus.c (get_line_span_for_fixit_hint): Show the
3647 line above for line-insertion fix-it hints.
3648 (selftest::test_fixit_insert_containing_newline): Update the
3649 expected results, and add a test with line-numbering enabled.
3651 2018-08-27 Martin Liska <mliska@suse.cz>
3654 * sanopt.c (sanitize_rewrite_addressable_params): Ignore
3655 params with DECL_HAS_VALUE_EXPR_P.
3657 2018-08-27 Martin Liska <mliska@suse.cz>
3659 * config/i386/i386.c (ix86_expand_set_or_movmem): Dump
3660 selected expansion strategy.
3662 2018-08-27 Martin Liska <mliska@suse.cz>
3664 * builtins.h (is_builtin_fn): Remove and fndecl_built_in_p.
3665 * builtins.c (is_builtin_fn): Likewise.
3666 * attribs.c (diag_attr_exclusions): Use new function
3667 fndecl_built_in_p and remove check for FUNCTION_DECL if
3669 (builtin_mathfn_code): Likewise.
3670 (fold_builtin_expect): Likewise.
3671 (fold_call_expr): Likewise.
3672 (fold_builtin_call_array): Likewise.
3673 (fold_call_stmt): Likewise.
3674 (set_builtin_user_assembler_name): Likewise.
3675 (is_simple_builtin): Likewise.
3676 * calls.c (gimple_alloca_call_p): Likewise.
3677 (maybe_warn_nonstring_arg): Likewise.
3678 * cfgexpand.c (expand_call_stmt): Likewise.
3679 * cgraph.c (cgraph_update_edges_for_call_stmt_node): Likewise.
3680 (cgraph_edge::verify_corresponds_to_fndecl): Likewise.
3681 (cgraph_node::verify_node): Likewise.
3682 * cgraphclones.c (build_function_decl_skip_args): Likewise.
3683 (cgraph_node::create_clone): Likewise.
3684 * config/arm/arm.c (arm_insert_attributes): Likewise.
3685 * config/i386/i386.c (ix86_gimple_fold_builtin): Likewise.
3686 * dse.c (scan_insn): Likewise.
3687 * expr.c (expand_expr_real_1): Likewise.
3688 * fold-const.c (operand_equal_p): Likewise.
3689 (fold_binary_loc): Likewise.
3690 * gimple-fold.c (gimple_fold_stmt_to_constant_1): Likewise.
3691 * gimple-low.c (lower_stmt): Likewise.
3692 * gimple-pretty-print.c (dump_gimple_call): Likewise.
3693 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call):
3695 * gimple.c (gimple_build_call_from_tree): Likewise.
3696 (gimple_call_builtin_p): Likewise.
3697 (gimple_call_combined_fn): Likewise.
3698 * gimplify.c (gimplify_call_expr): Likewise.
3699 (gimple_boolify): Likewise.
3700 (gimplify_modify_expr): Likewise.
3701 (gimplify_addr_expr): Likewise.
3702 * hsa-gen.c (gen_hsa_insns_for_call): Likewise.
3703 * ipa-cp.c (determine_versionability): Likewise.
3704 * ipa-fnsummary.c (compute_fn_summary): Likewise.
3705 * ipa-param-manipulation.c (ipa_modify_formal_parameters): Likewise.
3706 * ipa-split.c (visit_bb): Likewise.
3707 (split_function): Likewise.
3708 * ipa-visibility.c (cgraph_externally_visible_p): Likewise.
3709 * lto-cgraph.c (input_node): Likewise.
3710 * lto-streamer-out.c (write_symbol): Likewise.
3711 * omp-low.c (setjmp_or_longjmp_p): Likewise.
3712 (lower_omp_1): Likewise.
3713 * predict.c (strip_predict_hints): Likewise.
3714 * print-tree.c (print_node): Likewise.
3715 * symtab.c (symtab_node::output_to_lto_symbol_table_p): Likewise.
3716 * trans-mem.c (is_tm_irrevocable): Likewise.
3717 (is_tm_load): Likewise.
3718 (is_tm_simple_load): Likewise.
3719 (is_tm_store): Likewise.
3720 (is_tm_simple_store): Likewise.
3721 (is_tm_abort): Likewise.
3722 (tm_region_init_1): Likewise.
3723 * tree-call-cdce.c (gen_shrink_wrap_conditions): Likewise.
3724 * tree-cfg.c (verify_gimple_call): Likewise.
3725 (move_stmt_r): Likewise.
3726 (stmt_can_terminate_bb_p): Likewise.
3727 * tree-eh.c (lower_eh_constructs_2): Likewise.
3728 * tree-if-conv.c (if_convertible_stmt_p): Likewise.
3729 * tree-inline.c (remap_gimple_stmt): Likewise.
3730 (copy_bb): Likewise.
3731 (estimate_num_insns): Likewise.
3732 (fold_marked_statements): Likewise.
3733 * tree-sra.c (scan_function): Likewise.
3734 * tree-ssa-ccp.c (surely_varying_stmt_p): Likewise.
3735 (optimize_stack_restore): Likewise.
3736 (pass_fold_builtins::execute): Likewise.
3737 * tree-ssa-dce.c (mark_stmt_if_obviously_necessary): Likewise.
3738 (mark_all_reaching_defs_necessary_1): Likewise.
3739 * tree-ssa-dom.c (dom_opt_dom_walker::optimize_stmt): Likewise.
3740 * tree-ssa-forwprop.c (simplify_builtin_call): Likewise.
3741 (pass_forwprop::execute): Likewise.
3742 * tree-ssa-loop-im.c (stmt_cost): Likewise.
3743 * tree-ssa-math-opts.c (pass_cse_reciprocals::execute): Likewise.
3744 * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Likewise.
3745 * tree-ssa-strlen.c (get_string_length): Likewise.
3746 * tree-ssa-structalias.c (handle_lhs_call): Likewise.
3747 (find_func_aliases_for_call): Likewise.
3748 * tree-ssa-ter.c (find_replaceable_in_bb): Likewise.
3749 * tree-stdarg.c (optimize_va_list_gpr_fpr_size): Likewise.
3750 * tree-tailcall.c (find_tail_calls): Likewise.
3751 * tree.c (need_assembler_name_p): Likewise.
3752 (free_lang_data_in_decl): Likewise.
3753 (get_call_combined_fn): Likewise.
3754 * ubsan.c (is_ubsan_builtin_p): Likewise.
3755 * varasm.c (incorporeal_function_p): Likewise.
3756 * tree.h (DECL_BUILT_IN): Remove and replace with
3758 (DECL_BUILT_IN_P): Transfort to fndecl_built_in_p.
3759 (fndecl_built_in_p): New.
3761 2018-08-27 Martin Liska <mliska@suse.cz>
3763 PR tree-optimization/86847
3764 * tree-switch-conversion.c (switch_decision_tree::dump_case_nodes):
3765 Dump also subtree probability.
3766 (switch_decision_tree::do_jump_if_equal): New function.
3767 (switch_decision_tree::emit_case_nodes): Handle special
3768 situations in balanced tree that can be emitted much simpler.
3769 Fix calculation of probabilities that happen in tree expansion.
3770 * tree-switch-conversion.h (struct cluster): Add
3772 (struct simple_cluster): Likewise.
3773 (struct case_tree_node): Add new function has_child.
3774 (do_jump_if_equal): New.
3776 2018-08-27 Martin Liska <mliska@suse.cz>
3778 * tree-switch-conversion.c (bit_test_cluster::find_bit_tests):
3779 Add new argument to bit_test_cluster constructor.
3780 (bit_test_cluster::emit): Set bits really number of values
3782 (bit_test_cluster::hoist_edge_and_branch_if_true): Add
3783 probability argument.
3784 * tree-switch-conversion.h (struct bit_test_cluster):
3785 Add m_handles_entire_switch.
3787 2018-08-27 Martin Liska <mliska@suse.cz>
3789 PR tree-optimization/86702
3790 * tree-switch-conversion.c (jump_table_cluster::emit):
3791 Make probabilities even for values in jump table
3792 according to number of cases handled.
3793 (switch_decision_tree::compute_cases_per_edge): Pass
3794 argument to reset_out_edges_aux function.
3795 (switch_decision_tree::analyze_switch_statement): Likewise.
3796 * tree-switch-conversion.h (switch_decision_tree::reset_out_edges_aux):
3799 2018-08-27 Martin Liska <mliska@suse.cz>
3801 * cfgexpand.c (expand_asm_stmt): Use label_to_block and pass
3802 cfun argument explicitly.
3803 * gimple-pretty-print.c (dump_gimple_switch): Likewise.
3804 * hsa-gen.c (gen_hsa_insns_for_switch_stmt): Use new
3805 function gimple_switch_default_bb.
3806 (convert_switch_statements):
3808 * ipa-fnsummary.c (set_switch_stmt_execution_predicate):
3809 * stmt.c (label_to_block_fn): Use label_to_block and pass
3810 cfun argument explicitly and use gimple_switch_label_bb.
3811 (expand_case): Likewise.
3812 * tree-cfg.c (lower_phi_internal_fn): Use label_to_block and pass
3813 cfun argument explicitly. Likewise.
3814 (make_edges_bb): Likewise.
3815 (make_cond_expr_edges): Likewise.
3816 (get_cases_for_edge): Likewise.
3817 (make_gimple_switch_edges): Likewise.
3818 (label_to_block_fn): Likewise.
3819 (label_to_block): Likewise.
3820 (make_goto_expr_edges): Likewise.
3821 (make_gimple_asm_edges): Likewise.
3822 (main_block_label): Likewise.
3823 (group_case_labels_stmt): Likewise.
3824 (find_taken_edge_computed_goto): Likewise.
3825 (find_taken_edge_switch_expr): Likewise.
3826 (gimple_verify_flow_info): Likewise.
3827 (gimple_redirect_edge_and_branch): Likewise.
3828 (gimple_switch_label_bb): New function.
3829 (gimple_switch_default_bb): Likewise.
3830 (gimple_switch_edge): Likewise.
3831 (gimple_switch_default_edge): Likewise.
3832 * tree-cfg.h (label_to_block_fn): Remove and replace ...
3833 (label_to_block): ... with this.
3834 (gimple_switch_label_bb): New.
3835 (gimple_switch_default_bb): Likewise.
3836 (gimple_switch_edge): Likewise.
3837 (gimple_switch_default_edge): Likewise.
3838 * tree-cfgcleanup.c (convert_single_case_switch): Use
3839 new gimple functions and pass new argument to label_to_block.
3840 (cleanup_control_flow_bb):
3841 * tree-eh.c (make_eh_dispatch_edges): Use label_to_block and pass
3842 cfun argument explicitly.
3843 (make_eh_edges): Likewise.
3844 (redirect_eh_dispatch_edge): Likewise.
3845 (lower_resx): Likewise.
3846 (lower_eh_dispatch): Likewise.
3847 (maybe_remove_unreachable_handlers): Likewise.
3848 (unsplit_eh): Likewise.
3849 (cleanup_empty_eh): Likewise.
3850 (verify_eh_edges): Likewise.
3851 (verify_eh_dispatch_edge): Likewise.
3852 * tree-ssa-dom.c (record_edge_info): Likewise.
3853 * tree-ssa-forwprop.c (simplify_gimple_switch_label_vec): Likewise.
3854 * tree-ssa-threadedge.c (thread_around_empty_blocks): Likewise.
3855 (thread_through_normal_block): Likewise.
3856 * tree-ssa-uncprop.c (associate_equivalences_with_edges): Likewise.
3857 * tree-ssa-uninit.c (convert_control_dep_chain_into_preds):
3858 * tree-switch-conversion.c (switch_conversion::collect): Use new
3860 (switch_conversion::check_final_bb): Likewise.
3861 (switch_conversion::gather_default_values): Pass new argument
3863 (switch_conversion::build_constructors): Likewise.
3864 (switch_decision_tree::compute_cases_per_edge): Use new
3865 gimple_switch_edge function.
3866 (switch_decision_tree::analyze_switch_statement): Pass new argument
3868 (switch_decision_tree::try_switch_expansion): Use
3869 gimple_switch_default_edge.
3870 * tree-vrp.c (find_switch_asserts): Pass new argument
3872 * vr-values.c (vr_values::vrp_visit_switch_stmt): Likewise.
3873 (vr_values::simplify_switch_using_ranges): Likewise.
3875 2018-08-27 Richard Biener <rguenther@suse.de>
3877 * cfganal.h (rev_post_order_and_mark_dfs_back_seme): Declare.
3878 * cfganal.c (rev_post_order_and_mark_dfs_back_seme): New function.
3880 * tree-ssa-sccvn.h (struct vn_pval): New structure.
3881 (struct vn_nary_op_s): Add unwind_to member. Add
3882 predicated_values flag and put result into a union together
3883 with a linked list of vn_pval.
3884 (struct vn_ssa_aux): Add name member to make maintaining
3885 a map of SSA name to vn_ssa_aux possible. Remove no longer
3886 needed info, dfsnum, low, visited, on_sccstack, use_processed
3887 and range_info_anti_range_p members.
3888 (run_scc_vn, vn_eliminate, free_scc_vn, vn_valueize): Remove.
3889 (do_rpo_vn, run_rpo_vn, eliminate_with_rpo_vn, free_rpo_vn):
3891 (vn_valueize): New global.
3892 (vn_context_bb): Likewise.
3893 (VN_INFO_RANGE_INFO, VN_INFO_ANTI_RANGE_P, VN_INFO_RANGE_TYPE,
3894 VN_INFO_PTR_INFO): Remove.
3895 * tree-ssa-sccvn.c: ... (rewrite)
3896 (pass_fre::execute): For -O2+ initialize loops and run
3897 RPO VN in optimistic mode (iterating). For -O1 and -Og
3898 run RPO VN in non-optimistic mode.
3899 * params.def (PARAM_SCCVN_MAX_SCC_SIZE): Remove.
3900 (PARAM_RPO_VN_MAX_LOOP_DEPTH): Add.
3901 * doc/invoke.texi (sccvn-max-scc-size): Remove.
3902 (rpo-vn-max-loop-depth): Document.
3903 * tree-ssa-alias.c (walk_non_aliased_vuses): Stop walking
3904 when valuezing the VUSE signals we walked out of the region.
3905 * tree-ssa-pre.c (phi_translate_1): Ignore predicated values.
3906 (phi_translate): Set VN context block to use for availability
3908 (compute_avail): Likewise.
3909 (pre_valueize): New function.
3910 (pass_pre::execute): Adjust to the RPO VN API.
3912 * tree-ssa-loop-ivcanon.c: Include tree-ssa-sccvn.h.
3913 (propagate_constants_for_unrolling): Remove.
3914 (tree_unroll_loops_completely): Perform value-numbering
3915 on the unrolled bodies loop parent.
3917 2018-08-27 Richard Biener <rguenther@suse.de>
3919 * tree-ssa-pre.c (compute_antic): Re-use inverted postorder
3920 for partial antic compute.
3922 2018-08-27 Jakub Jelinek <jakub@redhat.com>
3924 PR rtl-optimization/87065
3925 * combine.c (simplify_if_then_else): Formatting fix.
3926 (if_then_else_cond): Guard MULT optimization with SCALAR_INT_MODE_P
3928 (known_cond): Don't return const_true_rtx for vector modes. Use
3929 CONST0_RTX instead of const0_rtx. Formatting fixes.
3931 2018-08-27 Martin Liska <mliska@suse.cz>
3933 PR gcov-profile/87069
3934 * gcov.c (process_file): Record files already processed
3935 and warn about a file being processed multiple times.
3937 2018-08-27 Martin Liska <mliska@suse.cz>
3940 * config/aarch64/aarch64.c (aarch64_override_options_internal):
3941 Set default values for x_aarch64_*_string strings.
3942 * config/aarch64/aarch64.opt: Remove --{march,mcpu,mtune}==
3943 prefix. For -mabi do not print '=ABI' in help and use
3944 <option_value> format for -msve-vector-bits and -moverride
3947 2018-08-26 Jeff Law <law@redhat.com>
3949 * config/mips/frame-header-opt.c: Include "backend.h" rather than
3952 2018-08-26 Marek Polacek <polacek@redhat.com>
3954 PR c++/87029, Implement -Wredundant-move.
3955 * doc/invoke.texi: Document -Wredundant-move.
3957 2018-08-25 Martin Sebor <msebor@redhat.com>
3959 PR tree-optimization/87059
3960 * builtins.c (expand_builtin_strncmp): Convert MIN_EXPR operand
3961 to the same type as the other.
3962 * fold-const.c (fold_binary_loc): Assert expectation.
3964 2018-08-25 Iain Sandoe <iain@sandoe.co.uk>
3966 * config/darwin.c (machopic_legitimize_pic_address): Clean up
3967 extraneous parentheses, dead code section and formatting.
3969 2018-08-24 David Malcolm <dmalcolm@redhat.com>
3972 * diagnostic-show-locus.c (layout::layout): Ensure the margin is
3973 wide enough for jumps in the line-numbering to be visible.
3974 (layout::print_gap_in_line_numbering): New member function.
3975 (layout::calculate_line_spans): When using line numbering, merge
3976 line spans that are only 1 line apart.
3977 (diagnostic_show_locus): When printing line numbers, show gaps in
3978 line numbering directly, rather than printing headers.
3979 (selftest::test_diagnostic_show_locus_fixit_lines): Add test of
3980 line-numbering with multiple line spans.
3981 (selftest::test_fixit_insert_containing_newline_2): Add test of
3982 line-numbering, in which the spans are close enough to be merged.
3984 2018-08-24 Aldy Hernandez <aldyh@redhat.com>
3986 * gimple-ssa-evrp-analyze.c (set_ssa_range_info): Pass value_range
3987 to range_includes_zero_p. Do not special case VR_ANTI_RANGE.
3988 * tree-vrp.c (range_is_nonnull): Remove.
3989 (range_includes_zero_p): Accept value_range instead of min/max.
3990 (extract_range_from_binary_expr_1): Do not early bail on
3992 Use range_includes_zero_p instead of range_is_nonnull.
3993 (extract_range_from_unary_expr): Use range_includes_zero_p instead
3994 of range_is_nonnull.
3995 (vrp_meet_1): Pass value_range to range_includes_zero_p. Do not
3996 special case VR_ANTI_RANGE.
3997 (vrp_finalize): Same.
3998 * tree-vrp.h (range_includes_zero_p): Pass value_range as argument
4000 (range_is_nonnull): Remove.
4001 * vr-values.c (vrp_stmt_computes_nonzero): Use
4002 range_includes_zero_p instead of range_is_nonnull.
4003 (extract_range_basic): Pass value_range to range_includes_zero_p
4004 instead of range_is_nonnull.
4006 2018-08-24 Uros Bizjak <ubizjak@gmail.com>
4008 * emit-rtl.c (init_emit_once): Do not emit MODE_POINTER_BOUNDS RTXes.
4009 * emit-rtl.h (rtl_data): Remove return_bnd.
4010 * explow.c (trunc_int_for_mode): Do not handle POINTER_BOUNDS_MODE_P.
4011 * function.c (diddle_return_value): Do not handle crtl->return_bnd.
4012 * genmodes.c (complete_mode): Do not handle MODE_POINTER_BOUNDS.
4013 (POINTER_BOUNDS_MODE): Remove definition.
4014 (make_pointer_bounds_mode): Remove.
4015 (get_mode_class): Do not handle MODE_POINTER_BOUNDS.
4016 * machmode.h (POINTER_BOUNDS_MODE_P): Remove definition.
4017 (scalare_mode::includes_p): Do not handle MODE_POINTER_BOUNDS.
4018 * mode-classes.def: Do not define MODE_POINTER_BOUNDS.
4019 * stor-layout.c (int_mode_for_mode): Do not handle MODE_POINTER_BOUNDS.
4020 * tree-core.h (enum tree_index): Remove TI_POINTER_BOUNDS_TYPE.
4021 * varasm.c (output_constant_pool_2): Do not handle MODE_POINTER_BOUNDS.
4023 * config/i386/i386-modes.def (BND32, BND64): Remove.
4024 * config/i386/i386.c (dbx_register_map): Remove bound registers.
4025 (dbx64_register_map): Ditto.
4026 (svr4_dbx_register_map): Ditto.
4027 (indirect_thunk_bnd_needed): Remove.
4028 (indirect_thunks_bnd_used): Ditto.
4029 (indirect_return_bnd_needed): Ditto.
4030 (indirect_return_via_cx_bnd): Ditto.
4031 (enum indirect_thunk_prefix): Remove indirect_thunk_prefix_bnd.
4032 (indirect_thunk_name): Remove handling of indirect_thunk_prefix_bnd.
4033 (output_indirect_thunk): Ditto. Remove need_prefix argument.
4034 (output_indirect_thunk_function): Remove handling of
4035 indirect_return_bnd_needed, indirect_return_via_cx_bnd,
4036 indirect_thunk_bnd_needed and indirect_thunks_bnd_used variables.
4037 (ix86_save_reg): Remove handling of crtl->return_bnd.
4038 (ix86_legitimate_constant_p): Remove handling of POINTER_BOUNDS_MODE_P.
4039 (ix86_print_operand_address_as): Remove handling of UNSPEC_BNDMK_ADDR
4040 and UNSPEC_BNDLX_ADDR.
4041 (ix86_output_indirect_branch_via_reg): Remove handling of
4042 indirect_thunk_prefix_bnd.
4043 (ix86_output_indirect_branch_via_push): Ditto.
4044 (ix86_output_function_return): Ditto.
4045 (ix86_output_indirect_function_return): Ditto.
4046 (avoid_func_arg_motion): Do not handle UNSPEC_BNDSTX.
4047 * config/i386/i386.h (FIXED_REGISTERS): Remove bound registers.
4048 (CALL_USED_REGISTERS): Ditto.
4049 (REG_ALLOC_ORDER): Update for removal of bound registers.
4050 (HI_REGISTER_NAMES): Ditto.
4051 * config/i386/i386.md (UNSPEC_BNDMK, UNSPEC_BNDMK_ADDR, UNSPEC_BNDSTX)
4052 (UNSPEC_BNDLDX, UNSPEC_BNDLDX_ADDR, UNSPEC_BNDCL, UNSPEC_BNDCU)
4053 (UNSPEC_BNDCN, UNSPEC_MPX_FENCE): Remove.
4054 (BND0_REG, BND1_REG, BND2_REG, BND3_REG): Remove
4055 (FIRST_PSEUDO_REG): Update.
4056 (BND): Remove mode iterator.
4057 * config/i386/predicates.md (bnd_mem_operator): Remove.
4059 2018-08-24 Richard Sandiford <richard.sandiford@arm.com>
4061 * tree-vect-stmts.c (vectorizable_bswap): Handle variable-length
4064 2018-08-24 Richard Sandiford <richard.sandiford@arm.com>
4066 * tree-vect-slp.c (vect_transform_slp_perm_load): Separate out
4067 the case in which the permute needs only a single element and
4068 repeats for every vector of the result. Extend that case to
4069 handle variable-length vectors.
4070 * tree-vect-stmts.c (vectorizable_load): Update accordingly.
4072 2018-08-24 H.J. Lu <hongjiu.lu@intel.com>
4075 * dwarf2out.c (save_macinfo_strings): Call set_indirect_string
4076 on DW_MACINFO_start_file for -gsplit-dwarf -g3.
4078 2018-08-24 Richard Biener <rguenther@suse.de>
4080 * cfg.h (struct control_flow_graph): Add edge_flags_allocated and
4081 bb_flags_allocated members.
4082 (auto_flag): New RAII class for allocating flags.
4083 (auto_edge_flag): New RAII class for allocating edge flags.
4084 (auto_bb_flag): New RAII class for allocating bb flags.
4085 * cfgloop.c (verify_loop_structure): Allocate temporary edge
4087 * cfganal.c (dfs_enumerate_from): Remove use of visited sbitmap
4088 in favor of temporarily allocated BB flag.
4089 * hsa-brig.c: Re-order includes.
4090 * hsa-dump.c: Likewise.
4091 * hsa-regalloc.c: Likewise.
4092 * print-rtl.c: Likewise.
4093 * profile-count.c: Likewise.
4095 2018-08-24 Segher Boessenkool <segher@kernel.crashing.org>
4098 * config/rs6000/rs6000.c (toc_relative_expr_p): Check that the base is
4101 2018-08-24 Aldy Hernandez <aldyh@redhat.com>
4104 * wide-int-range.cc (wide_int_range_div): Do not ignore result
4105 from wide_int_range_multiplicative_op.
4107 2018-08-23 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
4109 * tree-vect-data-refs.c (vect_grouped_store_supported): Fix typo
4112 2018-08-23 Giuliano Belinassi <giuliano.belinassi@usp.br>
4114 * genmatch.c (parser::parse_operation): Fix typo 'exapnded'
4117 2018-08-23 Alexander Monakov <amonakov@ispras.ru>
4119 * tree-scalar-evolution.c (final_value_replacement_loop): Dump
4120 full GENERIC expression used for replacement.
4122 2018-08-23 Aldy Hernandez <aldyh@redhat.com>
4124 * tree-vrp.c (abs_extent_range): Remove.
4125 (extract_range_into_wide_ints): Pass wide ints by reference.
4126 (extract_range_from_binary_expr_1): Rewrite the *DIV_EXPR code.
4127 Pass wide ints by reference in all calls to
4128 extract_range_into_wide_ints.
4129 * wide-int-range.cc (wide_int_range_div): New.
4130 * wide-int-range.h (wide_int_range_div): New.
4131 (wide_int_range_includes_zero_p): New.
4132 (wide_int_range_zero_p): New.
4134 2018-08-23 Matthew Malcomson <matthew.malcomson@arm.com>
4136 * config/aarch64/aarch64.md (arches): New enum.
4137 (arch): New enum attr.
4138 (arch_enabled): New attr.
4139 (enabled): Now uses arch_enabled only.
4140 (simd, sve, fp16): Removed attribute.
4141 (fp): Attr now defined in terms of 'arch'.
4142 (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64, *movti_aarch64,
4143 *movhf_aarch64, <optab><fcvt_target><GPF:mode>2,
4144 <FCVT_F2FIXED:fcvt_fixed_insn><GPF:mode>3,
4145 <FCVT_FIXED2F:fcvt_fixed_insn><GPI:mode>3): Merge 'fp' and 'simd'
4146 attributes into 'arch'.
4147 (*movsf_aarch64, *movdf_aarch64, *movtf_aarch64, *add<mode>3_aarch64,
4148 subdi3, neg<mode>2, <optab><mode>3, one_cmpl<mode>2,
4149 *<NLOGICAL:optab>_one_cmpl<mode>3, *xor_one_cmpl<mode>3,
4150 *aarch64_ashl_sisd_or_int_<mode>3, *aarch64_lshr_sisd_or_int_<mode>3,
4151 *aarch64_ashr_sisd_or_int_<mode>3, *aarch64_sisd_ushl): Convert use of
4152 'simd' attribute into 'arch'.
4153 (load_pair_sw_<SX:mode><SX2:mode>, load_pair_dw_<DX:mode><DX2:mode>,
4154 store_pair_sw_<SX:mode><SX2:mode>, store_pair_dw_<DX:mode><DX2:mode>):
4155 Convert use of 'fp' attribute to 'arch'.
4156 * config/aarch64/aarch64-simd.md (move_lo_quad_internal_<mode>,
4157 move_lo_quad_internal_<mode>): (different modes) Merge 'fp' and 'simd'
4159 (move_lo_quad_internal_be_<mode>, move_lo_quad_internal_be_<mode>):
4160 (different modes) Merge 'fp' and 'simd' into 'arch'.
4161 (*aarch64_combinez<mode>, *aarch64_combinez_be<mode>): Merge 'fp' and
4164 2018-08-23 Segher Boessenkool <segher@kernel.crashing.org>
4166 PR rtl-optimization/87026
4167 * expmed.c (canonicalize_comparison): If we can no longer create
4168 pseudoregisters, don't.
4170 2018-08-23 Richard Earnshaw <rearnsha@arm.com>
4173 * config/arm/arm-protos.h (arm_emit_speculation_barrier): New
4175 * config/arm/arm.c (speculation_barrier_libfunc): New static
4177 (arm_init_libfuncs): Initialize it.
4178 (arm_emit_speculation_barrier): New function.
4179 * config/arm/arm.md (speculation_barrier): Call
4180 arm_emit_speculation_barrier for architectures that do not have
4182 (speculation_barrier_insn): Only match on Armv7 or later.
4184 2018-08-23 Richard Biener <rguenther@suse.de>
4187 * tree-inline.c (copy_bb): Drop unused __builtin_va_arg_pack_len
4190 2018-08-23 Richard Sandiford <richard.sandiford@arm.com>
4192 * config/aarch64/aarch64.c (aarch64_evpc_sve_tbl): Fix handling
4193 of single-vector TBLs.
4194 (aarch64_vectorize_vec_perm_const): Set one_vector_p when only
4197 2018-08-23 Richard Sandiford <richard.sandiford@arm.com>
4200 * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const_1): Fix
4201 aarch64_evpc_tbl guard.
4203 2018-08-22 Bernd Edlinger <bernd.edlinger@hotmail.de>
4205 * tree-ssa-dse.c (compute_trims): Avoid folding away undefined
4208 2018-08-22 Martin Sebor <msebor@redhat.com>
4211 * tree-pretty-print.c (pretty_print_string): Add argument.
4212 (dump_generic_node): Call to pretty_print_string with string size.
4214 2018-08-22 Segher Boessenkool <segher@kernel.crashing.org>
4216 PR rtl-optimization/86771
4217 * combine.c (try_combine): Do not allow splitting a resulting PARALLEL
4218 of two SETs into those two SETs, one to be placed at i2, if that SETs
4219 destination is modified between i2 and i3.
4221 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
4223 PR tree-optimization/86725
4224 * tree-vect-loop.c (vect_inner_phi_in_double_reduction_p): New
4226 (vect_analyze_scalar_cycles_1): Check it.
4228 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
4230 PR tree-optimization/86725
4231 * tree-vect-loop.c (vect_is_simple_reduction): When treating
4232 an outer loop phi as a double reduction, make sure that the
4233 single user of the phi result is an inner loop phi.
4235 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
4237 * tree-vect-data-refs.c (vect_analyze_group_access_1): Convert
4238 grouped stores with gaps to a strided group.
4240 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
4242 * tree-vect-stmts.c (get_group_load_store_type)
4243 (get_load_store_type): Only test STMT_VINFO_STRIDED_P for the
4244 first statement in a group.
4246 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
4248 * config/darwin.h (LINK_COMMAND_SPEC_A): Sync LTO options with
4249 the sequence used in gcc/gcc.c.
4251 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
4254 * gcc-ar.c (main): Don’t try to invoke the plug-in if we’re not
4257 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
4259 * config/darwin10.h (LINK_GCC_C_SEQUENCE_SPEC): Adjust to use the
4260 Darwin10-specific unwinder-shim.
4261 * config/darwin12.h (LINK_GCC_C_SEQUENCE_SPEC): Remove.
4262 * config/rs6000/darwin.h (DARWIN_CRT1_SPEC, DARWIN_DYLIB1_SPEC):
4263 New to cater for Darwin10 Rosetta.
4265 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
4267 * config/i386/i386.c (ix86_output_addr_diff_elt): Move the MACH-O
4268 specific test before the one for HAVE_AS_GOTOFF_IN_DATA.
4270 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
4275 * gcc/dwarf2out.c (FUNC_SECOND_SECT_LABEL): New.
4276 (dwarf2out_switch_text_section): Generate a local label for the
4277 second function sub-section and apply it as the second FDE start
4279 * gcc/final.c (final_scan_insn_1): Emit second FDE label after the
4280 second sub-section start.
4282 2018-08-22 Richard Biener <rguenther@suse.de>
4284 PR tree-optimization/86988
4285 * tree-vrp.c (vrp_prop::check_mem_ref): Bail out on VLAs.
4287 2018-08-22 Richard Biener <rguenther@suse.de>
4289 PR tree-optimization/86945
4290 * tree-cfg.c (generate_range_test): Use unsigned arithmetic.
4292 2018-08-22 Alexandre Oliva <oliva@adacore.com>
4294 * config/rs6000/rs6000.c (SMALL_DATA_RELOC, SMALL_DATA_REG): Add
4295 a comment about how uses of r2 for .sdata2 come about.
4297 2018-08-22 Alexandre Oliva <aoliva@redhat.com>
4299 * tree-ssa-reassoc.c (is_reassociable_op): Fix cut&pasto.
4301 2018-08-21 Marek Polacek <polacek@redhat.com>
4303 PR c++/86981, Implement -Wpessimizing-move.
4304 * doc/invoke.texi: Document -Wpessimizing-move.
4306 2018-08-21 Jan Hubicka <jh@suse.cz>
4308 * tree.c (find_decls_types_r): Do not check for redundant typedefs.
4309 * tree.h (is_redundant_typedef): Remove.
4310 * dwarf2out.c (is_redundant_typedef): Turn into static function.
4312 2018-08-21 Jan Hubicka <jh@suse.cz>
4314 * tree.c (free_lang_data_in_decl): Remove types from DECL_CONTEXT
4317 2018-08-21 Tamar Christina <tamar.christina@arm.com>
4319 * expmed.c (extract_low_bits): Reject invalid subregs early.
4321 2018-08-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
4324 * tree-ssa-strlen.c (adjust_last_stmt): Avoid folding away undefined
4327 2018-08-21 Rasmus Villemoes <rv@rasmusvillemoes.dk>
4329 * config/vxworks.h: Guard vxworks_asm_out_constructor and
4330 vxworks_asm_out_destructor by !HAVE_INITFINI_ARRAY_SUPPORT
4331 * config/vxworks.c: Likewise.
4333 2018-08-21 Rasmus Villemoes <rv@rasmusvillemoes.dk>
4335 * config/vxworks.c: Set targetm.have_ctors_dtors
4336 if HAVE_INITFINI_ARRAY_SUPPORT.
4337 * config/vxworks.h: Set SUPPORTS_INIT_PRIORITY
4338 if HAVE_INITFINI_ARRAY_SUPPORT.
4340 2018-08-21 Rasmus Villemoes <rv@rasmusvillemoes.dk>
4342 * config/vxworks.h: Add $(WIND_BASE)/target/h/wrn/coreip to
4343 default search path for VxWorks < 7.
4345 2018-08-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
4347 * gimple-ssa-sprintf.c (decl_constant_value): Remove.
4348 (get_format_string): Refer to c_getstr.
4350 2018-08-21 Tom de Vries <tdevries@suse.de>
4352 * cgraph.h (debuginfo_early_init, debuginfo_init, debuginfo_fini)
4353 (debuginfo_start, debuginfo_stop, debuginfo_early_start)
4354 (debuginfo_early_stop): Declare.
4355 * cgraphunit.c (debuginfo_early_init, debuginfo_init, debuginfo_fini)
4356 (debuginfo_start, debuginfo_stop, debuginfo_early_start)
4357 (debuginfo_early_stop): New function.
4358 (symbol_table::finalize_compilation_unit): Call debuginfo_early_start
4359 and debuginfo_early_stop.
4360 * dwarf2out.c (dwarf2out_finish, dwarf2out_early_finish): Dump dwarf.
4361 * toplev.c (compile_file): Call debuginfo_start and debuginfo_stop.
4362 (general_init): Call debuginfo_early_init.
4363 (finalize): Call debuginfo_fini.
4364 (do_compile): Call debuginfo_init.
4365 * doc/invoke.texi (@gccoptlist): Add -fdump-debug and
4367 (@item -fdump-debug, @item -fdump-earlydebug): Add.
4369 2018-08-21 Tom de Vries <tdevries@suse.de>
4371 * dwarf2out.c (print_dw_val, print_loc_descr, print_die): Handle
4372 flag_dump_noaddr and flag_dump_unnumbered.
4374 2018-08-21 Aldy Hernandez <aldyh@redhat.com>
4376 * wide-int-range.cc (wide_int_range_abs): New.
4377 (wide_int_range_order_set): Rename from wide_int_range_min_max.
4378 * wide-int-range.h (wide_int_range_abs): New.
4379 (wide_int_range_min_max): New.
4380 * tree-vrp.c (extract_range_from_unary_expr): Rewrite ABS_EXPR
4381 case to call wide_int_range_abs.
4382 Rewrite MIN/MAX_EXPR to call wide_int_range_min_max.
4383 (extract_range_from_abs_expr): Delete.
4385 2018-08-20 Michael Meissner <meissner@linux.ibm.com>
4388 * config/rs6000/rs6000.md (extendsi<mode>2): Change constraints
4389 from 'Y' to 'YZ' to enable the LWAX instruction to be generated
4392 2018-08-20 Nathan Sidwell <nathan@acm.org>
4393 Jeff Law <law@redhat.com>
4395 * config/s390/s390-c (s390_macro_to_expand): Use cpp_macro_p.
4396 * config/spu/spu-c.c (spu_macro_to_expand): Likewise.
4398 2018-08-20 David Malcolm <dmalcolm@redhat.com>
4401 * attribs.c (diag_attr_exclusions): Add auto_diagnostic_group instance.
4402 (decl_attributes): Likewise.
4403 * calls.c (maybe_warn_nonstring_arg): Add auto_diagnostic_group
4405 * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
4406 * diagnostic-core.h (class auto_diagnostic_group): New class.
4407 * diagnostic.c (diagnostic_initialize): Initialize the new fields.
4408 (diagnostic_report_diagnostic): Handle the first diagnostics within
4410 (emit_diagnostic): Add auto_diagnostic_group instance.
4412 (inform_n): Likewise.
4413 (warning): Likewise.
4414 (warning_at): Likewise.
4415 (warning_n): Likewise.
4416 (pedwarn): Likewise.
4417 (permerror): Likewise.
4419 (error_n): Likewise.
4420 (error_at): Likewise.
4422 (fatal_error): Likewise.
4423 (internal_error): Likewise.
4424 (internal_error_no_backtrace): Likewise.
4425 (auto_diagnostic_group::auto_diagnostic_group): New ctor.
4426 (auto_diagnostic_group::~auto_diagnostic_group): New dtor.
4427 * diagnostic.h (struct diagnostic_context): Add fields
4428 "diagnostic_group_nesting_depth",
4429 "diagnostic_group_emission_count", "begin_group_cb",
4431 * gimple-ssa-isolate-paths.c (find_implicit_erroneous_behavior):
4432 Add auto_diagnostic_group instance(s).
4433 (find_explicit_erroneous_behavior): Likewise.
4434 * gimple-ssa-warn-alloca.c (pass_walloca::execute): Likewise.
4435 * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Likewise.
4436 * gimplify.c (warn_implicit_fallthrough_r): Likewise.
4437 (gimplify_va_arg_expr): Likewise.
4438 * hsa-gen.c (HSA_SORRY_ATV): Likewise.
4439 (HSA_SORRY_AT): Likewise.
4440 * ipa-devirt.c (compare_virtual_tables): Likewise.
4441 (warn_odr): Likewise.
4442 * multiple_target.c (expand_target_clones): Likewise.
4443 * opts-common.c (cmdline_handle_error): Likewise.
4444 * reginfo.c (globalize_reg): Likewise.
4445 * substring-locations.c (format_warning_n_va): Likewise.
4446 * tree-inline.c (expand_call_inline): Likewise.
4447 * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Likewise.
4448 * tree-ssa-loop-niter.c
4449 (do_warn_aggressive_loop_optimizations): Likewise.
4450 * tree-ssa-uninit.c (warn_uninit): Likewise.
4451 * tree.c (warn_deprecated_use): Likewise.
4453 2018-08-20 H.J. Lu <hongjiu.lu@intel.com>
4456 * config/i386/i386.md (eh_return): Always update EH return
4457 address in word_mode.
4459 2018-08-20 Chung-Lin Tang <cltang@codesourcery.com>
4461 * targhooks.c (std_gimplify_va_arg_expr): Properly handle case of when
4462 TARGET_SPLIT_COMPLEX_ARG is defined.
4464 2018-08-20 Bernd Edlinger <bernd.edlinger@hotmail.de>
4466 * expr.c (store_field): Change gcc_assert to gcc_checking_assert.
4468 2018-08-20 Bernd Edlinger <bernd.edlinger@hotmail.de>
4471 * expr.c (expand_assignment): Assert that bitpos is positive.
4472 (store_field): Likewise
4473 (expand_expr_real_1): Make sure that bitpos is positive.
4474 * config/alpha/alpha.h (CONSTANT_ADDRESS_P): Avoid signed
4477 2018-08-20 Nathan Sidwell <nathan@acm.org>
4479 * Makefile.in (CPP_ID_DATA_H): Delete.
4480 (CPP_INTERNAL_H): Don't add it.
4481 (GTFILES): Replace CPP_ID_DATA_H with CPPLIB_H.
4482 * gengtype.c (open_base_files): Replace cpp-id-data.h with cpplib.h
4484 2018-08-20 Richard Biener <rguenther@suse.de>
4486 PR tree-optimization/78655
4487 * tree-vrp.c (extract_range_from_binary_expr_1): Make
4488 pointer + offset nonnull if either operand is nonnull work.
4490 2018-08-20 Tom de Vries <tdevries@suse.de>
4492 * dwarf2out.c (add_scalar_info): Don't add reference to existing die
4493 unless the referenced die describes the added property using
4494 DW_AT_location or DW_AT_const_value. Fall back to exprloc case.
4495 Otherwise, add a DW_AT_location to the referenced die.
4497 2018-08-19 Uros Bizjak <ubizjak@gmail.com>
4500 * config/i386/i386.c (ix86_rtx_costs) [case SET]: Check source for
4501 register_operand when calling ix86_set_reg_reg_cost.
4502 [case CONST_INT, case CONST, case LABEL_REF, case SYMBOL_REF]:
4503 Set *total to 0 for operands that satisfy x86_64_immediate_operand
4504 predicate and to 1 otherwise.
4506 2018-08-18 Iain Sandoe <iain@sandoe.co.uk>
4508 * config/darwin.c (darwin_override_options): If -gsplit-dwarf is set,
4509 emit a diagnostic that it is not supported and reset the option.
4510 * config/darwin.h (DRIVER_SELF_SPECS): Note that gsplit-dwarf is not
4511 supported and consume the option. (ASM_FINAL_SPEC): New.
4513 2018-08-17 Segher Boessenkool <segher@kernel.crashing.org>
4515 * doc/md.texi (Patterns): Use @ref instead of @xref in the middle of
4518 2018-08-17 Sandra Loosemore <sandra@codesourcery.com>
4520 C-SKY port: Documentation
4522 * doc/extend.texi (C-SKY Function Attributes): New section.
4523 * doc/invoke.texi (Option Summary): Add C-SKY options.
4524 (C-SKY Options): New section.
4525 * doc/md.texi (Machine Constraints): Document C-SKY constraints.
4527 2018-08-17 Jojo <jijie_rong@c-sky.com>
4528 Huibin Wang <huibin_wang@c-sky.com>
4529 Sandra Loosemore <sandra@codesourcery.com>
4530 Chung-Lin Tang <cltang@codesourcery.com>
4532 C-SKY port: Backend implementation
4534 * config/csky/*: New.
4535 * common/config/csky/*: New.
4537 2018-08-17 Jojo <jijie_rong@c-sky.com>
4538 Huibin Wang <huibin_wang@c-sky.com>
4539 Sandra Loosemore <sandra@codesourcery.com>
4540 Chung-Lin Tang <cltang@codesourcery.com>
4541 Andrew Jenner <andrew@codesourcery.com>
4543 C-SKY port: Configury
4545 * config.gcc (csky-*-*): New.
4546 * configure.ac: Add csky to targets for dwarf2 debug_line support.
4547 * configure: Regenerated.
4549 2018-08-17 David Malcolm <dmalcolm@redhat.com>
4551 * dump-context.h: Include "dumpfile.h".
4552 (dump_context::dump_printf_va): Convert final param from va_list
4553 to va_list *. Convert from ATTRIBUTE_PRINTF to
4554 ATTRIBUTE_GCC_DUMP_PRINTF.
4555 (dump_context::dump_printf_loc_va): Likewise.
4556 * dumpfile.c: Include "stringpool.h".
4557 (make_item_for_dump_printf_va): Delete.
4558 (make_item_for_dump_printf): Delete.
4559 (class dump_pretty_printer): New class.
4560 (dump_pretty_printer::dump_pretty_printer): New ctor.
4561 (dump_pretty_printer::emit_items): New member function.
4562 (dump_pretty_printer::emit_any_pending_textual_chunks): New member
4564 (dump_pretty_printer::emit_item): New member function.
4565 (dump_pretty_printer::stash_item): New member function.
4566 (dump_pretty_printer::format_decoder_cb): New member function.
4567 (dump_pretty_printer::decode_format): New member function.
4568 (dump_context::dump_printf_va): Reimplement in terms of
4569 dump_pretty_printer.
4570 (dump_context::dump_printf_loc_va): Convert final param from va_list
4572 (dump_context::begin_scope): Reimplement call to
4573 make_item_for_dump_printf.
4574 (dump_printf): Update for change to dump_printf_va.
4575 (dump_printf_loc): Likewise.
4576 (selftest::test_capture_of_dump_calls): Convert "stmt" from
4577 greturn * to gimple *. Add a test_decl. Add tests of dump_printf
4578 with %T, %E, and %G.
4579 * dumpfile.h (ATTRIBUTE_GCC_DUMP_PRINTF): New macro.
4580 (dump_printf): Replace ATTRIBUTE_PRINTF_2 with
4581 ATTRIBUTE_GCC_DUMP_PRINTF (2, 3).
4582 (dump_printf_loc): Replace ATTRIBUTE_PRINTF_3 with
4583 ATTRIBUTE_GCC_DUMP_PRINTF (3, 0).
4584 * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Convert
4585 use of HOST_WIDE_INT_PRINT_DEC on unsigned HOST_WIDE_INT "count"
4586 within a dump_printf_loc call to "%wu".
4587 (vector_alignment_reachable_p): Merge two dump_printf[_loc] calls,
4588 converting a use of HOST_WIDE_INT_PRINT_DEC to "%wd". Add a
4589 missing space after "=".
4590 * tree-vect-loop.c (vect_analyze_loop_2) Within a dump_printf
4591 call, convert use of HOST_WIDE_INT_PRINT_DEC to "%wd".
4592 * tree-vect-slp.c (vect_slp_bb): Within a dump_printf_loc call,
4593 convert use of HOST_WIDE_INT_PRINT_UNSIGNED to "%wu".
4594 * tree-vectorizer.c (try_vectorize_loop_1): Likewise. Remove
4595 duplicate "vectorized" from message.
4597 2018-08-17 Szabolcs Nagy <szabolcs.nagy@arm.com>
4599 * config/arm/arm-builtins.c (arm_init_simd_builtin_types): Clear
4600 polyNxK_t element's TYPE_STRING_FLAG.
4602 2018-08-17 Segher Boessenkool <segher@kernel.crashing.org>
4604 * config/rs6000/rs6000.md (*cbranch, *creturn): Name these patterns
4605 (they were unnamed before). Fix comments.
4607 2018-08-17 Nathan Sidwell <nathan@acm.org>
4609 * cppbuiltin.c: Include "cpplib.h", not "cpp-id-data.h".
4611 2018-08-17 Richard Biener <rguenther@suse.de>
4613 PR tree-optimization/86841
4614 * wide-int-range.cc (wide_int_range_lshift): Use to_uhwi.
4616 2018-08-17 Martin Liska <mliska@suse.cz>
4618 * common.opt: Remove Warn, Init and Report for options with
4619 Ignore/Deprecated flag. Warning is done automatically for
4621 * config/i386/i386.opt: Likewise.
4622 * config/ia64/ia64.opt: Likewise.
4623 * config/rs6000/rs6000.opt: Likewise.
4624 * cppbuiltin.c (define_builtin_macros_for_compilation_flags):
4625 Remove usage of flag_check_pointer_bounds.
4626 * lto-wrapper.c (merge_and_complain): Do not handle
4627 OPT_fcheck_pointer_bounds.
4628 (append_compiler_options): Likewise.
4629 * opt-functions.awk: Do not handle Deprecated.
4630 * optc-gen.awk: Check that Var, Report and Init are not
4631 used for an option with Ignore/Deprecated flag.
4632 * opts-common.c (decode_cmdline_option): Do not report
4634 (read_cmdline_option): Report warning for OPT_SPECIAL_deprecated
4636 * opts.h (struct cl_option): Remove cl_deprecated flag.
4637 (CL_ERR_DEPRECATED): Remove error enum value.
4639 2018-08-17 Richard Biener <rguenther@suse.de>
4642 * tree-inline.c (copy_bb): When inlining __builtin_va_arg_pack_len ()
4643 across a va-arg-pack using call adjust its return value accordingly.
4645 2018-08-16 Martin Sebor <msebor@redhat.com>
4647 PR tree-optimization/86853
4648 * gimple-ssa-sprintf.c (struct format_result): Rename member.
4649 (struct fmtresult): Add member and initialize it in ctors.
4650 (format_character): Handle %C. Extend range to NUL. Set MAYFAIL.
4651 (format_string): Handle %S the same as %ls. Set MAYFAIL.
4652 (format_directive): Set POSUNDER4K when MAYFAIL is set.
4653 (parse_directive): Handle %C same as %c.
4654 (sprintf_dom_walker::compute_format_length): Adjust.
4655 (is_call_safe): Adjust.
4657 2018-08-16 Bernd Edlinger <bernd.edlinger@hotmail.de>
4659 * builtins.c (c_strlen): Add new parameter eltsize. Use it
4660 for determining how to count the elements.
4661 * builtins.h (c_strlen): Adjust prototype.
4662 * expr.c (string_constant): Add new parameter mem_size.
4663 Set *mem_size appropriately.
4664 * expr.h (string_constant): Adjust protoype.
4665 * gimple-fold.c (get_range_strlen): Add new parameter eltsize.
4666 * gimple-fold.h (get_range_strlen): Adjust prototype.
4667 * gimple-ssa-sprintf.c (get_string_length): Add new parameter eltsize.
4668 (format_string): Call get_string_length with eltsize.
4670 2018-08-16 David Malcolm <dmalcolm@redhat.com>
4672 * diagnostic.c (default_diagnostic_start_span_fn): Call pp_string
4673 to emit the span, rather than setting it as the prefix.
4675 2018-08-16 David Malcolm <dmalcolm@redhat.com>
4677 * diagnostic-show-locus.c (layout::start_annotation_line): Add
4678 "margin_char" parameter, defaulting to space. Use it in place
4679 of pp_space for the initial part of the margin.
4680 (layout::print_leading_fixits): Use '+' when filling the margin
4681 of line-insertion fix-it hints.
4683 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
4685 * config/rs6000/rs6000.md (two unnamed define_insn and define_split):
4688 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
4690 * config/rs6000/altivec.md: Don't set length attribute to the default
4692 * config/rs6000/darwin.md: Ditto.
4693 * config/rs6000/dfp.md: Ditto.
4694 * config/rs6000/htm.md: Ditto.
4695 * config/rs6000/rs6000.md: Ditto.
4696 * config/rs6000/sync.md: Ditto.
4697 * config/rs6000/vsx.md: Ditto.
4699 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
4701 * config/rs6000/altivec.md: Don't set length attribute to the default
4702 value, for branch instructions.
4703 * config/rs6000/darwin.md: Ditto.
4704 * config/rs6000/rs6000.md: Ditto.
4706 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
4708 * config/rs6000/rs6000.md (length): Always define as const_int 4.
4709 (unnamed conditional branch define_insn): Set length to 4 or 8
4710 depending on offset.
4711 (<bd>_<mode>): Similar, for alternative 0.
4712 (<bd>tf_<mode>): Ditto.
4714 2018-08-16 Tamar Christina <tamar.christina@arm.com>
4716 * expr.c (copy_blkmode_to_reg): Perform larger copies when safe.
4718 2018-08-16 Matthew Malcomson <matthew.malcomson@arm.com>
4720 * doc/rtl.texi: Replace old RTX class names with new names.
4723 2018-08-16 Vlad Lazar <vlad.lazar@arm.com>
4725 * expmed.h (canonicalize_comparison): New declaration.
4726 * expmed.c (canonicalize_comparison, equivalent_cmp_code): New function.
4727 * expmed.c (emit_store_flag_1): Add call to canonicalize_comparison.
4728 * optabs.c (prepare_cmp_insn): Likewise.
4729 * rtl.h (unsigned_condition_p): New function which checks if a
4730 comparison operator is unsigned.
4732 2018-08-16 Nathan Sidwell <nathan@acm.org>
4734 * config/rs6000/rs6000-c.c (rs6000_macro_to_expend): Use cpp_macro_p.
4735 * config/powerpcspc/powerpcspe-c.c (rs6000_macro_to_expend): Likewise.
4737 2018-08-16 Tamar Christina <tamar.christina@arm.com>
4740 * config/arm/arm.c (arm_can_change_mode_class): Disallow subreg.
4741 * config/arm/neon.md (movv4hf, movv8hf): Refactored to..
4742 (mov<mov>): ..this and enable unconditionally.
4744 2018-08-16 Tamar Christina <tamar.christina@arm.com>
4746 * config/arm/neon.md (*neon_mov<mode>): Remove reg-to-reg alternative.
4748 2018-08-16 Sam Tebbs <sam.tebbs@arm.com>
4750 * config/aarch64/aarch64.opt (mlow-precision-recip-sqrt)
4751 (mlow-precision-sqrt, mlow-precision-div, mverbose-cost-dump): Replace
4752 "Common" with "Target".
4754 2018-08-15 Uros Bizjak <ubizjak@gmail.com>
4756 * config/i386/i386.opt (mmitigate-rop): Mark as deprecated.
4757 * doc/invoke.texi (mmitigate-rop): Remove.
4758 * config/i386/i386.c: Do not include "regrename.h".
4759 (ix86_rop_should_change_byte_p, reg_encoded_number)
4760 (ix86_get_modrm_for_rop, set_rop_modrm_reg_bits, ix86_mitigate_rop):
4762 (ix86_reorg): Remove call to ix86_mitigate_rop.
4763 * config/i386/i386.md (attr "modrm_class"): Remove.
4764 (cmp<mode>_ccno_1, mov<mode>_xor, movstrict<mode>_xor)
4765 (x86_mov<mode>cc_0_m1. x86_mov<mode>cc_0_m1_se)
4766 (x86_mov<mode>cc_0_m1_neg): Remove modrm_class attribute override.
4768 2018-08-15 Will Schmidt <will_schmidt@vnet.ibm.com>
4770 * config/rs6000/rs600.c (rs6000_gimple_fold_builtin): Add entries to
4771 allow folding of mergeh() and mergel() for the float and double types.
4772 (fold_mergehl_helper): Rework to handle building a permute tree
4775 2018-08-15 Uros Bizjak <ubizjak@gmail.com>
4777 * config/i386/i386.c (expand_vec_perm_movs): Enable V4SFmode
4780 2018-08-15 David Malcolm <dmalcolm@redhat.com>
4782 * common.opt (fdiagnostics-show-labels): New option.
4783 * diagnostic-show-locus.c (class layout_range): Add field
4785 (class layout): Add field "m_show_labels_p".
4786 (layout_range::layout_range): Add param "label" and use it to
4788 (make_range): Pass in NULL for new "label" param of layout_range's
4790 (layout::layout): Initialize m_show_labels_p.
4791 (layout::maybe_add_location_range): Pass in loc_range->m_label
4792 when constructing layout_range instances.
4793 (struct line_label): New struct.
4794 (layout::print_any_labels): New member function.
4795 (layout::print_line): Call it if label-printing is enabled.
4796 (selftest::test_one_liner_labels): New test.
4797 (selftest::test_diagnostic_show_locus_one_liner): Call it.
4798 * diagnostic.c (diagnostic_initialize): Initialize
4799 context->show_labels_p.
4800 * diagnostic.h (struct diagnostic_context): Add field
4802 * doc/invoke.texi (Diagnostic Message Formatting Options): Add
4803 -fno-diagnostics-show-labels.
4804 * dwarf2out.c (gen_producer_string): Add
4805 OPT_fdiagnostics_show_labels to the ignored options.
4806 * gcc-rich-location.c (gcc_rich_location::add_expr): Add "label"
4808 (gcc_rich_location::maybe_add_expr): Likewise.
4809 * gcc-rich-location.h (gcc_rich_location::gcc_rich_location): Add
4810 label" param, defaulting to NULL.
4811 (gcc_rich_location::add_expr): Add "label" param.
4812 (gcc_rich_location::maybe_add_expr): Likewise.
4813 (class text_range_label): New class.
4814 (class range_label_for_type_mismatch): New class.
4815 * gimple-ssa-sprintf.c (fmtwarn): Pass NULL for new label params
4816 of format_warning_va.
4817 (fmtwarn_n): Likewise for new params of format_warning_n_va.
4818 * lto-wrapper.c (merge_and_complain): Add
4819 OPT_fdiagnostics_show_labels to the "pick one setting" options.
4820 (append_compiler_options): Likewise to the dropped options.
4821 (append_diag_options): Likewise to the passed-on options.
4822 * opts.c (common_handle_option): Handle the new option.
4823 * selftest-diagnostic.c
4824 (test_diagnostic_context::test_diagnostic_context): Enable
4826 * substring-locations.c: Include "gcc-rich-location.h".
4827 (format_warning_n_va): Add "fmt_label" and "param_label" params
4828 and use them as appropriate.
4829 (format_warning_va): Add "fmt_label" and "param_label" params,
4830 passing them on to format_warning_n_va.
4831 (format_warning_at_substring): Likewise.
4832 (format_warning_at_substring_n): Likewise.
4833 * substring-locations.h (format_warning_va): Add "fmt_label" and
4834 "param_label" params.
4835 (format_warning_n_va): Likewise.
4836 (format_warning_at_substring): Likewise.
4837 (format_warning_at_substring_n): Likewise.
4838 * toplev.c (general_init): Initialize global_dc->show_labels_p.
4840 2018-08-15 Qing Zhao <qing.zhao@oracle.com>
4843 * builtins.c (expand_builtin_memcmp): Do not expand the call
4844 when overflow is detected.
4846 2018-08-15 Martin Sebor <msebor@redhat.com>
4848 PR tree-optimization/71625
4849 * config/aarch64/aarch64-builtins.c
4850 (aarch64_init_simd_builtin_types): Clear Poly8_t's TYPE_STRING_FLAG.
4852 2018-08-15 Ilya Leoshkevich <iii@linux.ibm.com>
4854 * config/s390/s390.c (s390_reorg): Remove loop.
4856 2018-08-15 Iain Sandoe <iain@sandoe.co.uk>
4859 (darwin_function_switched_text_sections): Delete.
4860 * gcc/config/darwin.h
4861 (TARGET_ASM_FUNCTION_SWITCHED_TEXT_SECTIONS): Likewise.
4863 2018-08-15 Iain Sandoe <iain@sandoe.co.uk>
4866 * config/darwin.h: (DEBUG_STR_OFFSETS_SECTION, DEBUG_LOCLISTS_SECTION,
4867 DEBUG_RNGLISTS_SECTION) new macros. (DEBUG_PUBNAMES_SECTION,
4868 DEBUG_PUBTYPES_SECTION) update to include GNU variant.
4870 2018-08-15 Martin Liska <mliska@suse.cz>
4872 PR tree-optimization/86925
4873 * predict.c (expr_expected_value_1): When taking
4874 later predictor, assign also probability.
4875 Use fold_build2_initializer_loc in order to fold
4876 the expression in -frounding-math.
4878 2018-08-14 Allan Sandfeld Jensen <allan.jensen@qt.io>
4880 * config/i386/i386.c (expand_vec_perm_movs): New method matching movs
4882 (expand_vec_perm_1): Try the new method.
4884 2018-08-14 Ilya Leoshkevich <iii@linux.ibm.com>
4887 * lra-lives.c (remove_some_program_points_and_update_live_ranges):
4888 Check whether lra_live_max_point is 0 before dividing.
4890 2018-08-14 Martin Sebor <msebor@redhat.com>
4892 PR tree-optimization/86650
4893 * tree-vrp.c (vrp_prop::check_array_ref): Print an inform message.
4894 (vrp_prop::check_mem_ref): Same.
4896 2018-08-13 Liu Hao <lh_mouse@126.com>
4898 * pretty-print.c (eat_esc_sequence): Swap the foreground and
4899 background colors if the COMMON_LVB_REVERSE_VIDEO flag is set,
4900 and clear it thereafter, as it only works for DBCS.
4902 2018-08-13 Liu Hao <lh_mouse@126.com>
4904 * pretty-print.c (mingw_ansi_fputs): Do not call _close() on the
4905 handle returned by _get_osf_handle().
4907 2018-08-13 Will Schmidt <will_schmidt@vnet.ibm.com>
4909 * gcc/config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add support
4910 for folding vec_perm.
4912 2018-08-13 Will Schmidt <will_schmidt@vnet.ibm.com>
4914 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin):
4915 Add support for gimple-folding of vec_pack() and vec_unpack()
4918 2018-08-13 Will Schmidt <will_schmidt@vnet.ibm.com>
4920 * config/rs6000/rs6000.c (rs6000_builtin_valid_without_lhs): Add
4921 vec_xst variants to the list.
4922 (rs6000_gimple_fold_builtin): Add support for folding unaligned
4923 vector loads and stores.
4925 2018-08-13 David Edelsohn <dje.gcc@gmail.com>
4927 * config.gcc (rs6000-ibm-aix4.x): Delete.
4928 (rs6000-ibm-aix5.1): Delete.
4929 (rs6000-ibm-aix5.2): Delete.
4930 (rs6000-ibm-aix5.3): Delete.
4931 * config/rs6000/aix43.h: Delete.
4932 * config/rs6000/aix51.h: Delete.
4933 * config/rs6000/aix52.h: Delete.
4934 * config/rs6000/t-aix43: Delete.
4936 2018-08-13 Ilya Leoshkevich <iii@linux.ibm.com>
4938 * config/s390/s390.c (s390_decompose_constant_pool_ref):
4940 (s390_decompose_address): Factor out constant pool ref
4943 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
4945 * config/nds32/nds32-predicates.c
4946 (nds32_can_use_bclr_p): Change return type as bool.
4947 (nds32_can_use_bset_p): Ditto.
4948 (nds32_can_use_btgl_p): Ditto.
4949 (nds32_can_use_bitci_p): Ditto.
4950 * config/nds32/nds32-protos.h
4951 (nds32_can_use_bclr_p): Change declaration.
4952 (nds32_can_use_bset_p): Ditto.
4953 (nds32_can_use_btgl_p): Ditto.
4954 (nds32_can_use_bitci_p): Ditto.
4956 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
4958 * config/nds32/nds32.c (nds32_expand_prologue, nds32_expand_epilogue):
4959 Support -msched-prolog-epilog option.
4960 * config/nds32/nds32.opt (msched-prolog-epilog): New option.
4962 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
4964 * common/config/nds32/nds32-common.c
4965 (nds32_option_optimization_table): Enalbe -malways-align.
4967 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
4969 * config.gcc (nds32*): Add nds32_isr.h and nds32_init.inc in
4971 * common/config/nds32/nds32-common.c (nds32_handle_option): Handle
4972 OPT_misr_secure_ case.
4973 * config/nds32/nds32-isr.c: Implementation of backward compatibility.
4974 * config/nds32/nds32-protos.h (nds32_isr_function_critical_p): New.
4975 * config/nds32/nds32.c (nds32_attribute_table): Add critical and
4977 * config/nds32/nds32.h (nds32_isr_nested_type): Add NDS32_CRITICAL.
4978 (nds32_isr_info): New field security_level.
4979 (TARGET_ISR_VECTOR_SIZE_4_BYTE): New macro.
4980 * config/nds32/nds32.md (return_internal): Consider critical attribute.
4981 * config/nds32/nds32.opt (misr-secure): New option.
4982 * config/nds32/nds32_init.inc: New file.
4983 * config/nds32/nds32_isr.h: New file.
4985 2018-08-11 John David Anglin <danglin@gcc.gnu.org>
4987 * config/pa/pa.md (UNSPEC_MEMORY_BARRIER): New unspec enum.
4988 Update comment for atomic instructions.
4989 (atomic_storeqi, atomic_storehi, atomic_storesi, atomic_storesf,
4990 atomic_loaddf, atomic_loaddf_1, atomic_storedf, atomic_storedf_1):
4992 (atomic_loaddi): Revise fence expansion to only emit fence prior to
4993 load for __ATOMIC_SEQ_CST model.
4994 (atomic_loaddi_1): Remove float register target.
4995 (atomic_storedi): Handle CONST_INT values.
4996 (atomic_storedi_1): Remove float register source. Add special case
4998 (memory_barrier): New expander and insn.
5000 2018-08-11 Jakub Jelinek <jakub@redhat.com>
5002 PR tree-optimization/86835
5003 * tree-ssa-math-opts.c (insert_reciprocals): Even when inserting
5004 new_stmt after def_gsi, make sure to insert new_square_stmt after
5005 that stmt, not 2 stmts before it.
5007 2018-08-10 Alexander Monakov <amonakov@ispras.ru>
5010 * config/i386/i386.md (<s>mul<mode>3_highpart): Use DWIH mode iterator
5013 2018-08-10 Martin Liska <mliska@suse.cz>
5016 * builtin-types.def (BT_FN_LONG_LONG_LONG_DOUBLE): Add new
5018 * builtins.c (expand_builtin_expect_with_probability):
5020 (expand_builtin_expect_with_probability): New function.
5021 (build_builtin_expect_predicate): Add new argumnet probability
5022 for BUILT_IN_EXPECT_WITH_PROBABILITY.
5023 (fold_builtin_expect):
5026 * builtins.def (BUILT_IN_EXPECT_WITH_PROBABILITY):
5027 * builtins.h (fold_builtin_expect): Set new argument.
5028 * doc/extend.texi: Document __builtin_expect_with_probability.
5029 * doc/invoke.texi: Likewise.
5030 * gimple-fold.c (gimple_fold_call): Pass new argument.
5031 * ipa-fnsummary.c (find_foldable_builtin_expect): Handle
5032 also BUILT_IN_EXPECT_WITH_PROBABILITY.
5033 * predict.c (get_predictor_value): New function.
5034 (expr_expected_value): Add new argument probability. Assume
5035 that predictor and probability are always non-null.
5036 (expr_expected_value_1): Likewise. For __builtin_expect and
5037 __builtin_expect_with_probability set probability. Handle
5038 combination in binary expressions.
5039 (tree_predict_by_opcode): Simplify code by simply calling
5040 get_predictor_value.
5041 (pass_strip_predict_hints::execute): Add handling of
5042 BUILT_IN_EXPECT_WITH_PROBABILITY.
5043 * predict.def (PRED_BUILTIN_EXPECT_WITH_PROBABILITY): Add
5045 * tree.h (DECL_BUILT_IN_P): New function.
5047 2018-08-10 Martin Liska <mliska@suse.cz>
5049 PR tree-optimization/85799
5050 * passes.def: Add argument for pass_strip_predict_hints.
5051 * predict.c (class pass_strip_predict_hints): Add new argument
5053 (strip_predictor_early): New function.
5054 (pass_strip_predict_hints::execute): Call the function to
5056 (strip_predict_hints): New function.
5057 * predict.def: Fix comment.
5059 2018-08-10 Thomas Preud'homme <thomas.preudhomme@linaro.org>
5061 * Makefile.in: Clarify which tm.texi to copy over to assert the
5062 right to grant a GFDL license for all.
5064 2018-08-09 Jeff Law <law@redhat.com>
5066 * config/m68k/m68k.c (m68k_adjust_decorated_operand): Remove
5069 2018-08-09 Andreas Schwab <schwab@linux-m68k.org>
5071 * config/m68k/m68k-protos.h (m68k_final_prescan_insn): Remove
5074 2018-08-09 Richard Sandiford <richard.sandiford@arm.com>
5076 * tree-vect-loop.c (vectorizable_reduction): Allow inner-loop
5077 reductions for variable-length vectors.
5079 2018-08-09 David Malcolm <dmalcolm@redhat.com>
5082 * common.opt (fdiagnostics-show-line-numbers): New option.
5083 * diagnostic-show-locus.c (class layout): Add fields
5084 "m_show_line_numbers_p" and "m_linenum_width";
5085 (num_digits): New function.
5086 (test_num_digits): New function.
5087 (layout::layout): Initialize new fields. Update m_x_offset
5088 logic to handle any left margin.
5089 (layout::print_source_line): Print line number when requested.
5090 (layout::start_annotation_line): New member function.
5091 (layout::print_annotation_line): Call it.
5092 (layout::print_leading_fixits): Likewise.
5093 (layout::print_trailing_fixits): Likewise. Update calls to
5094 move_to_column for new parameter.
5095 (layout::get_x_bound_for_row): Add "add_left_margin" param and use
5096 it to potentially call start_annotation_line.
5097 (layout::show_ruler): Call start_annotation_line.
5098 (selftest::test_line_numbers_multiline_range): New selftest.
5099 (selftest::diagnostic_show_locus_c_tests): Call test_num_digits
5100 and selftest::test_line_numbers_multiline_range.
5101 * diagnostic.c (diagnostic_initialize): Initialize
5102 show_line_numbers_p.
5103 * diagnostic.h (struct diagnostic_context): Add field
5104 "show_line_numbers_p".
5105 * doc/invoke.texi (Diagnostic Message Formatting Options): Add
5106 -fno-diagnostics-show-line-numbers.
5107 * dwarf2out.c (gen_producer_string): Add
5108 OPT_fdiagnostics_show_line_numbers to the ignored options.
5109 * lto-wrapper.c (merge_and_complain): Likewise to the "pick
5110 one setting" options.
5111 (append_compiler_options): Likewise to the dropped options.
5112 (append_diag_options): Likewise to the passed-on options.
5113 * opts.c (common_handle_option): Handle the new option.
5114 * toplev.c (general_init): Set up global_dc->show_line_numbers_p.
5116 2018-08-09 Kelvin Nilsen <kelvin@gcc.gnu.org>
5118 * doc/extend.texi (PowerPC AltiVec Built-in Functions Available on
5119 ISA 2.07): Correct spelling of bcdsub to be __builtin_bcdsub. Add
5120 third argument of type "const signed char" to descriptions of
5121 __builtin_bcdadd, __builtin_bcdadd_lt, __builtin_bcdadd_eq,
5122 __builtin_bcdadd_gt, __builtin_bcdadd_ov, __builtin_bcdsub,
5123 __builtin_bcdsub_lt, __builtin_bcdsub_eq, __builtin_bcdsub_gt,
5124 __builtin_bcdsub_ov functions.
5126 2018-08-09 Richard Sandiford <richard.sandiford@arm.com>
5128 PR tree-optimization/86858
5129 * tree-vect-loop.c (vect_is_simple_reduction): Restore
5130 flow_bb_inside_loop_p calls.
5132 2018-08-09 Richard Sandiford <richard.sandiford@arm.com>
5134 PR tree-optimization/86871
5135 * tree-vect-stmts.c (vect_transform_stmt): Use gimple_get_lhs
5136 instead of gimple_assign_lhs.
5138 2018-08-09 Richard Earnshaw <rearnsha@arm.com>
5141 * config/aarch64/aarch64.md (add<mode>3_carryinC_zero): Add missing
5142 register constraint to operand 0.
5143 (add<mode>3_carryinC): Likewise.
5144 (add<mode>3_carryinV_zero, add<mode>3_carryinV): Likewise.
5146 2018-08-09 Martin Liska <mliska@suse.cz>
5149 * common.opt: Remove extra line.
5151 2018-08-09 Martin Liska <mliska@suse.cz>
5153 * params.def (PARAM_ALIGN_LOOP_ITERATIONS): Remove double dots
5154 at the end of a line, make first letter capital and end up
5155 a sentence with a dot.
5156 (PARAM_LOOP_INTERCHANGE_STRIDE_RATIO): Likewise.
5157 (PARAM_LOOP_BLOCK_TILE_SIZE): Likewise.
5158 (PARAM_GRAPHITE_MAX_NB_SCOP_PARAMS): Likewise.
5159 (PARAM_GRAPHITE_MAX_ARRAYS_PER_SCOP): Likewise.
5160 (PARAM_MAX_ISL_OPERATIONS): Likewise.
5161 (PARAM_GRAPHITE_ALLOW_CODEGEN_ERRORS): Likewise.
5162 (PARAM_PROFILE_FUNC_INTERNAL_ID): Likewise.
5163 (PARAM_INDIR_CALL_TOPN_PROFILE): Likewise.
5164 (PARAM_SLP_MAX_INSNS_IN_BB): Likewise.
5165 (PARAM_IPA_CP_EVAL_THRESHOLD): Likewise.
5166 (PARAM_IPA_CP_RECURSION_PENALTY): Likewise.
5167 (PARAM_IPA_CP_SINGLE_CALL_PENALTY): Likewise.
5168 (PARAM_IPA_CP_LOOP_HINT_BONUS): Likewise.
5169 (PARAM_IPA_CP_ARRAY_INDEX_HINT_BONUS): Likewise.
5170 (PARAM_TREE_REASSOC_WIDTH): Likewise.
5171 (PARAM_HSA_GEN_DEBUG_STORES): Likewise.
5172 (PARAM_MAX_SPECULATIVE_DEVIRT_MAYDEFS): Likewise.
5173 (PARAM_MAX_VRP_SWITCH_ASSERTIONS): Likewise.
5175 2018-08-09 Andreas Krebbel <krebbel@linux.ibm.com>
5178 * config/s390/s390.c (s390_option_override_internal): Reduce the
5179 stack-clash-protection-probe-interval param if it would be too big
5182 2018-08-08 Andreas Schwab <schwab@linux-m68k.org>
5185 * config/m68k/m68k.h (FINAL_PRESCAN_INSN): Don't define.
5186 * config/m68k/m68k.c (handle_move_double): Don't call
5187 m68k_final_prescan_insn.
5188 (m68k_adjust_decorated_operand): Renamed from
5189 m68k_final_prescan_insn, remove first and third operand and
5191 (print_operand): Call it.
5192 (print_operand_address): Call it.
5194 2018-08-08 Nathan Sidwell <nathan@acm.org>
5196 * diagnostic.c (diagnostic_report_current_module): Use
5197 linemap_included_from & linemap_included_from_linemap.
5199 2018-08-08 Hongbo Zhang <hongbo.zhang@linaro.org>
5201 * config/aarch64/aarch64-cores.def: Add phecda core.
5202 * config/aarch64/aarch64-tune.md: Regenerate.
5203 * doc/invoke.texi: Add phecda core.
5205 2018-08-08 Andreas Krebbel <krebbel@linux.ibm.com>
5208 * config/s390/constraints.md ("NxHD0", "NxSD0"): New constraint
5210 * config/s390/s390.md ("movti"): Add more alternatives for
5211 constant to GPR copies.
5213 2018-08-08 Andreas Krebbel <krebbel@linux.ibm.com>
5215 * config/s390/s390.c: Fix whitespace damage throughout the file.
5216 * config/s390/s390.h: Likewise.
5217 * config/s390/tpf.h: Likewise.
5219 2018-08-08 Ilya Leoshkevich <iii@linux.ibm.com>
5221 * config/s390/s390.c (s390_loadrelative_operand_p):
5222 Remove TARGET_CPU_ZARCH usages.
5223 (s390_rtx_costs): Likewise.
5224 (s390_legitimate_constant_p): Likewise.
5225 (s390_cannot_force_const_mem): Likewise.
5226 (legitimate_reload_constant_p): Likewise.
5227 (s390_preferred_reload_class): Likewise.
5228 (legitimize_pic_address): Likewise.
5229 (legitimize_tls_address): Likewise.
5230 (s390_split_branches): Removed.
5231 (s390_add_execute): Removed.
5232 (s390_dump_pool): Remove TARGET_CPU_ZARCH usages.
5233 (s390_mainpool_start): Likewise.
5234 (s390_mainpool_finish): Likewise.
5235 (s390_mainpool_cancel): Removed.
5236 (s390_chunkify_start): Remove TARGET_CPU_ZARCH usages.
5237 (s390_chunkify_cancel): Likewise.
5238 (s390_return_addr_rtx): Likewise.
5239 (s390_register_info): Remove split_branches_pending_p uages.
5240 (s390_optimize_register_info): Likewise.
5241 (s390_init_frame_layout): Remove TARGET_CPU_ZARCH and
5242 split_branches_pending_p usages.
5243 (s390_can_eliminate): Remove TARGET_CPU_ZARCH usages.
5244 (s390_load_got): Likewise.
5245 (s390_expand_split_stack_prologue): Likewise.
5246 (output_asm_nops): Likewise.
5247 (s390_function_profiler): Likewise.
5248 (s390_emit_call): Likewise.
5249 (s390_conditional_register_usage): Likewise.
5250 (s390_optimize_prologue): Likewise.
5251 (s390_reorg): Remove TARGET_CPU_ZARCH and
5252 split_branches_pending_p usages.
5253 (s390_option_override_internal): Remove TARGET_CPU_ZARCH
5255 (s390_output_indirect_thunk_function): Likewise.
5256 * config/s390/s390.h (TARGET_CPU_ZARCH): Removed.
5257 (TARGET_CPU_ZARCH_P): Removed.
5258 (struct machine_function): Remove split_branches_pending_p.
5259 * config/s390/s390.md: Remove TARGET_CPU_ZARCH usages.
5261 2018-08-08 Ilya Leoshkevich <iii@linux.ibm.com>
5263 * common/config/s390/s390-common.c (processor_flags_table):
5265 * config.gcc: Remove with_arch/with_tune support.
5266 * config/s390/2064.md: Remove cpu attribute comparisons.
5267 * config/s390/driver-native.c (s390_host_detect_local_cpu):
5269 * config/s390/linux.h (ASM_SPEC):
5270 Remove -march support.
5271 * config/s390/s390-c.c (s390_cpu_cpp_builtins_internal):
5272 Use a table to get an arch level.
5273 * config/s390/s390-opts.h (enum processor_type):
5275 * config/s390/s390.c
5276 (processor_table): Remove entries, add arch_level values.
5277 (s390_issue_rate): Remove cases.
5278 (s390_option_override): Adjust
5279 s390_option_override_internal() call.
5280 (s390_option_override_internal): Remove deprecation warning.
5281 (s390_valid_target_attribute_tree): Adjust
5282 s390_option_override_internal() call.
5283 * config/s390/s390.h (struct s390_processor):
5284 Share with s390-c.c, add arch_level field.
5285 * config/s390/s390.md:
5286 Remove occurrences in cpu attribute.
5287 * config/s390/s390.opt: Remove -march/-mtune support.
5288 * config/s390/tpf.h (ASM_SPEC): Remove -march support.
5289 * doc/invoke.texi: Remove deprecation warning.
5291 2018-08-08 Luis Machado <luis.machado@linaro.org>
5293 * config/aarch64/aarch64.c (qdf24xx_vector_cost): New static
5295 (qdf24xx_tunings): Set vector cost structure to
5296 qdf24xx_vector_cost.
5298 * config/aarch64/aarch64.c (qdf24xx_addrcost_table)
5299 <register_sextend>: Set to 3.
5301 2018-08-07 Richard Sandiford <richard.sandiford@arm.com>
5304 * config/aarch64/iterators.md (FRECP, frecp_suffix): Delete.
5305 * config/aarch64/aarch64-simd.md
5306 (aarch64_frecp<FRECP:frecp_suffix><mode>): Fold FRECPE into...
5307 (@aarch64_frecpe<mode>): ...here and the move FRECPX to...
5308 (aarch64_frecpx<mode>): ...this new pattern.
5309 * config/aarch64/aarch64-simd-builtins.def: Remove comment
5310 about aarch64_frecp<FRECP:frecp_suffix><mode>.
5312 2018-08-07 Martin Liska <mliska@suse.cz>
5315 * predict.c (expr_expected_value_1): Handle DECL_IS_MALLOC,
5316 BUILT_IN_REALLOC and DECL_IS_OPERATOR_NEW.
5317 * predict.def (PRED_MALLOC_NONNULL): New predictor.
5318 * doc/extend.texi: Document that malloc attribute adds
5321 2018-08-06 John David Anglin <danglin@gcc.gnu.org>
5324 * config/pa/pa.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
5325 Define to speculation_safe_value_not_needed.
5327 2018-08-06 Jeff Law <law@redhat.com>
5329 * tree-ssa-dom.c (dom_opt_dom_walker::optimize_stmt): Pass down
5330 the vr_values instance to cprop_into_stmt.
5331 (cprop_into_stmt): Pass vr_values instance down to cprop_operand.
5332 (cprop_operand): Also query EVRP to determine if OP is a constant.
5334 2018-08-06 Nathan Sidwell <nathan@acm.org>
5336 * diagnostic.c (diagnostic_report_current_module): Reroll
5337 included-at loop. Translate text.
5339 2018-08-06 David Malcolm <dmalcolm@redhat.com>
5341 * function-tests.c (selftest::test_expansion_to_rtl): Call
5342 free_after_compilation.
5344 2018-08-06 Alan Hayward <alan.hayward@arm.com>
5346 * config/aarch64/aarch64.md: Add clobber highs to tls_desc.
5348 2018-08-06 Andreas Krebbel <krebbel@linux.ibm.com>
5350 * config/s390/s390.c (s390_loop_unroll_adjust): Prevent small
5351 loops with memory block operations from getting unrolled.
5353 2018-08-06 Ulrich Weigand <uweigand@de.ibm.com>
5356 * config/spu/spu.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
5357 Define to speculation_safe_value_not_needed.
5359 2018-08-06 Jeff Law <law@redhat.com>
5361 * reload1.c (forget_old_reloads_1): Adjust CLOBBER_HIGH
5364 2018-08-06 Jozef Lawrynowicz <jozef.l@mittosystems.com>
5367 * gcc/tree.c (build_common_tree_nodes): Initialize integer_types array
5368 with all enabled __intN types.
5370 * gcc/testsuite/gcc.target/msp430/pr86662.c: New test.
5372 2018-08-06 Alan Hayward <alan.hayward@arm.com>
5374 * alias.c (record_set): Check for clobber high.
5375 * cfgexpand.c (expand_gimple_stmt): Likewise.
5376 * combine-stack-adj.c (single_set_for_csa): Likewise.
5377 * combine.c (find_single_use_1): Likewise.
5378 (set_nonzero_bits_and_sign_copies): Likewise.
5379 (get_combine_src_dest): Likewise.
5380 (is_parallel_of_n_reg_sets): Likewise.
5381 (try_combine): Likewise.
5382 (record_dead_and_set_regs_1): Likewise.
5383 (reg_dead_at_p_1): Likewise.
5384 (reg_dead_at_p): Likewise.
5385 * dce.c (deletable_insn_p): Likewise.
5386 (mark_nonreg_stores_1): Likewise.
5387 (mark_nonreg_stores_2): Likewise.
5388 * df-scan.c (df_find_hard_reg_defs): Likewise.
5389 (df_uses_record): Likewise.
5390 (df_get_call_refs): Likewise.
5391 * dwarf2out.c (mem_loc_descriptor): Likewise.
5392 * haifa-sched.c (haifa_classify_rtx): Likewise.
5393 * ira-build.c (create_insn_allocnos): Likewise.
5394 * ira-costs.c (scan_one_insn): Likewise.
5395 * ira.c (equiv_init_movable_p): Likewise.
5396 (rtx_moveable_p): Likewise.
5397 (interesting_dest_for_shprep): Likewise.
5398 * jump.c (mark_jump_label_1): Likewise.
5399 * postreload-gcse.c (record_opr_changes): Likewise.
5400 * postreload.c (reload_cse_simplify): Likewise.
5401 (struct reg_use): Add source expr.
5402 (reload_combine): Check for clobber high.
5403 (reload_combine_note_use): Likewise.
5404 (reload_cse_move2add): Likewise.
5405 (move2add_note_store): Likewise.
5406 * print-rtl.c (print_pattern): Likewise.
5407 * recog.c (decode_asm_operands): Likewise.
5408 (store_data_bypass_p): Likewise.
5409 (if_test_bypass_p): Likewise.
5410 * regcprop.c (kill_clobbered_value): Likewise.
5411 (kill_set_value): Likewise.
5412 * reginfo.c (reg_scan_mark_refs): Likewise.
5413 * reload1.c (maybe_fix_stack_asms): Likewise.
5414 (eliminate_regs_1): Likewise.
5415 (elimination_effects): Likewise.
5416 (mark_not_eliminable): Likewise.
5417 (scan_paradoxical_subregs): Likewise.
5418 (forget_old_reloads_1): Likewise.
5419 * reorg.c (find_end_label): Likewise.
5420 (try_merge_delay_insns): Likewise.
5421 (redundant_insn): Likewise.
5422 (own_thread_p): Likewise.
5423 (fill_simple_delay_slots): Likewise.
5424 (fill_slots_from_thread): Likewise.
5425 (dbr_schedule): Likewise.
5426 * resource.c (update_live_status): Likewise.
5427 (mark_referenced_resources): Likewise.
5428 (mark_set_resources): Likewise.
5429 * rtl.c (copy_rtx): Likewise.
5430 * rtlanal.c (reg_referenced_p): Likewise.
5431 (single_set_2): Likewise.
5432 (noop_move_p): Likewise.
5433 (note_stores): Likewise.
5434 * sched-deps.c (sched_analyze_reg): Likewise.
5435 (sched_analyze_insn): Likewise.
5437 2018-08-06 Alan Hayward <alan.hayward@arm.com>
5439 * cse.c (invalidate_reg): New function extracted from...
5440 (invalidate): ...here.
5441 (canonicalize_insn): Check for clobber high.
5442 (invalidate_from_clobbers): invalidate clobber highs.
5443 (invalidate_from_sets_and_clobbers): Likewise.
5444 (count_reg_usage): Check for clobber high.
5445 (insn_live_p): Likewise.
5446 * cselib.c (cselib_expand_value_rtx_1):Likewise.
5447 (cselib_invalidate_regno): Check for clobber in setter.
5448 (cselib_invalidate_rtx): Pass through setter.
5449 (cselib_invalidate_rtx_note_stores):
5450 (cselib_process_insn): Check for clobber high.
5451 * cselib.h (cselib_invalidate_rtx): Add operand.
5453 2018-08-06 Alan Hayward <alan.hayward@arm.com>
5455 * lra-eliminations.c (lra_eliminate_regs_1): Check for clobber high.
5456 (mark_not_eliminable): Likewise.
5457 * lra-int.h (struct lra_insn_reg): Add clobber high marker.
5458 * lra-lives.c (process_bb_lives): Check for clobber high.
5459 * lra.c (new_insn_reg): Remember clobber highs.
5460 (collect_non_operand_hard_regs): Check for clobber high.
5461 (lra_set_insn_recog_data): Likewise.
5462 (add_regs_to_insn_regno_info): Likewise.
5463 (lra_update_insn_regno_info): Likewise.
5465 2018-08-06 Alan Hayward <alan.hayward@arm.com>
5467 * rtl.h (reg_is_clobbered_by_clobber_high): Add declarations.
5468 * rtlanal.c (reg_is_clobbered_by_clobber_high): Add function.
5470 2018-08-06 Alan Hayward <alan.hayward@arm.com>
5472 * emit-rtl.c (verify_rtx_sharing): Check for CLOBBER_HIGH.
5473 (copy_insn_1): Likewise.
5474 (gen_hard_reg_clobber_high): New gen function.
5475 * genconfig.c (walk_insn_part): Check for CLOBBER_HIGH.
5476 * genemit.c (gen_exp): Likewise.
5477 (gen_emit_seq): Pass through info.
5478 (gen_insn): Check for CLOBBER_HIGH.
5479 (gen_expand): Pass through info.
5480 (gen_split): Likewise.
5481 (output_add_clobbers): Likewise.
5482 * genrecog.c (validate_pattern): Check for CLOBBER_HIGH.
5483 (remove_clobbers): Likewise.
5484 * rtl.h (gen_hard_reg_clobber_high): New declaration.
5486 2018-08-06 Alan Hayward <alan.hayward@arm.com>
5488 * doc/rtl.texi (clobber_high): Add.
5489 (parallel): Add in clobber high
5490 * rtl.c (rtl_check_failed_code3): Add function.
5491 * rtl.def (CLOBBER_HIGH): Add expression.
5492 * rtl.h (RTL_CHECKC3): Add macro.
5493 (rtl_check_failed_code3): Add declaration.
5494 (XC3EXP): Add macro.
5496 2018-08-05 H.J. Lu <hongjiu.lu@intel.com>
5499 * config/i386/i386.c (ix86_finalize_stack_frame_flags): Set
5500 cfun->machine->max_used_stack_alignment if needed.
5502 2018-08-04 Martin Sebor <msebor@redhat.com>
5504 PR tree-optimization/86571
5505 * gimple-ssa-sprintf.c (format_floating): Extend upper bound of
5508 2018-08-03 Sandra Loosemore <sandra@codesourcery.com>
5511 * config/nios2/nios2.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
5514 2018-08-03 Jeff Law <law@redhat.com>
5517 * config/mn10300/mn10300.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
5518 Define to speculation_safe_value_not_needed.
5520 2018-08-03 David Malcolm <dmalcolm@redhat.com>
5522 * doc/gcov.texi (-x): Remove duplicate "to".
5523 * doc/invoke.texi (-Wnoexcept-type): Remove duplicate "calls".
5524 (-Wif-not-aligned): Remove duplicate "is".
5525 (-flto): Remove duplicate "the".
5526 (MicroBlaze Options): In examples of "-mcpu=cpu-type", remove
5527 duplicate "v5.00.b".
5528 (MSP430 Options): Remove duplicate "and" from the description
5529 of "-mgprel-sec=regexp".
5530 (x86 Options): Remove duplicate copies of "vmldLog102" and
5531 vmlsLog104 from description of "-mveclibabi=type".
5533 2018-08-03 Richard Sandiford <richard.sandiford@arm.com>
5535 * internal-fn.h (first_commutative_argument): Declare.
5536 * internal-fn.c (first_commutative_argument): New function.
5537 * tree-vect-slp.c (vect_get_and_check_slp_defs): Remove extra
5538 restrictions for pattern statements. Use first_commutative_argument
5539 to look for commutative operands in calls to internal functions.
5541 2018-08-03 Aldy Hernandez <aldyh@redhat.com>
5543 * Makefile.in (wide-int-range.o): New.
5544 * tree-vrp.c: Move all the wide_int_* functions to...
5545 * wide-int-range.cc: ...here.
5546 * tree-vrp.h: Move all the wide_int_* prototypes to...
5547 * wide-int-range.h: ...here.
5549 2018-08-03 Tom de Vries <tdevries@suse.de>
5551 * common/config/nvptx/nvptx-common.c (nvptx_except_unwind_info): Return
5553 * config/nvptx/nvptx.c (TARGET_ASM_BYTE_OP): Remove define.
5554 * except.c (output_function_exception_table): Do early exit if
5555 targetm_common.except_unwind_info (&global_options) == UI_NONE.
5557 2018-08-03 Martin Liska <mliska@suse.cz>
5559 * predict.c (dump_prediction): Change to 2 digits
5562 2018-08-03 Siddhesh Poyarekar <siddhesh@sourceware.org>
5564 * config/aarch64/falkor.md (falkor_am_1_vxvy_vxvy): Move
5566 (falkor_am_1_gtov_gtov): ... a new insn reservation.
5568 2018-07-19 Ilya Leoshkevich <iii@linux.ibm.com>
5570 * config/nds32/nds32.c (nds32_hard_regno_mode_ok): Replace > with >=.
5571 * df-problems.c (df_remove_dead_eq_notes): Replace > with >=.
5572 * dwarf2out.c (mem_loc_descriptor): Replace > with >=.
5573 * lra-constraints.c (spill_hard_reg_in_range): Replace <= with <.
5574 * lra-remat.c (call_used_input_regno_present_p): Replace <= with <.
5576 2018-08-02 David Malcolm <dmalcolm@redhat.com>
5578 * diagnostic-show-locus.c (diagnostic_show_locus): Use
5579 pp_take_prefix when saving the existing prefix.
5580 * diagnostic.c (diagnostic_append_note): Likewise.
5581 * langhooks.c (lhd_print_error_function): Likewise.
5582 * pretty-print.c (pp_set_prefix): Drop the "const" from "prefix"
5583 param's type. Free the existing prefix.
5584 (pp_take_prefix): New function.
5585 (pretty_printer::pretty_printer): Drop the prefix parameter.
5586 Rename the length parameter to match the comment.
5587 (pretty_printer::~pretty_printer): Free the prefix.
5588 * pretty-print.h (pretty_printer::pretty_printer): Drop the prefix
5590 (struct pretty_printer): Drop the "const" from "prefix" field's
5591 type and clarify memory management.
5592 (pp_set_prefix): Drop the "const" from the 2nd param.
5593 (pp_take_prefix): New decl.
5595 2018-08-02 Aaron Sawdey <acsawdey@linux.ibm.com>
5597 * config/rs6000/rs6000-string.c (select_block_compare_mode): Move test
5598 for word_mode_ok here instead of passing as argument.
5599 (expand_block_compare): Change select_block_compare_mode() call.
5600 (expand_strncmp_gpr_sequence): New function.
5601 (expand_strn_compare): Make use of expand_strncmp_gpr_sequence.
5603 2018-08-02 Jeff Law <law@redhat.com>
5606 * config/m68k/m68k.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
5607 Define to speculation_safe_value_not_needed.
5610 * config/h8300/h8300.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
5611 Define to speculation_safe_value_not_needed.
5613 2018-08-02 Tom de Vries <tdevries@suse.de>
5616 * common/config/nvptx/nvptx-common.c (nvptx_except_unwind_info): New
5617 function. Return UI_TARGET unconditionally.
5618 (TARGET_EXCEPT_UNWIND_INFO): Redefine to nvptx_except_unwind_info.
5619 * config/nvptx/nvptx.c (TARGET_ASM_BYTE_OP): Emit commented out '.byte'.
5621 2018-08-02 Richard Sandiford <richard.sandiford@arm.com>
5623 * genemit.c (print_overload_test): Fix typo.
5625 2018-08-02 Richard Biener <rguenther@suse.de>
5627 PR tree-optimization/86816
5628 * tree-ssa-tail-merge.c (tail_merge_valueize): New function
5629 which checks for value availability before querying it.
5630 (gvn_uses_equal): Use it.
5631 (same_succ_hash): Likewise.
5632 (gimple_equal_p): Likewise.
5634 2018-08-02 Nick Clifton <nickc@redhat.com>
5637 * config/stormy16/stormy16.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
5638 Define to speculation_safe_value_not_needed.
5641 * config/v850/v850.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
5642 Define to speculation_safe_value_not_needed.
5645 * config/v850/v850.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
5646 Define to speculation_safe_value_not_needed.
5649 * config/rx/rx.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
5650 Define to speculation_safe_value_not_needed.
5653 * config/msp430/msp430.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
5654 Define to speculation_safe_value_not_needed.
5657 * config/mcore/mcore.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
5658 Define to speculation_safe_value_not_needed.
5661 * config/m32r/m32r.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
5662 Define to speculation_safe_value_not_needed.
5665 * config/iq2000/iq2000.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
5666 Define to speculation_safe_value_not_needed.
5669 * config/frv/frv.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define to
5670 speculation_safe_value_not_needed.
5673 * config/fr30/fr30.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define
5674 to speculation_safe_value_not_needed.
5676 2018-08-02 Richard Sandiford <richard.sandiford@arm.com>
5678 * doc/md.texi: Expand the documentation of instruction names
5679 to mention port-local uses. Document '@' in pattern names.
5680 * read-md.h (overloaded_instance, overloaded_name): New structs.
5682 (md_reader::handle_overloaded_name): New member function.
5683 (md_reader::get_overloads): Likewise.
5684 (md_reader::m_first_overload): New member variable.
5685 (md_reader::m_next_overload_ptr): Likewise.
5686 (md_reader::m_overloads_htab): Likewise.
5687 * read-md.c (md_reader::md_reader): Initialize m_first_overload,
5688 m_next_overload_ptr and m_overloads_htab.
5689 * read-rtl.c (iterator_group): Add "type" and "get_c_token" fields.
5690 (get_mode_token, get_code_token, get_int_token): New functions.
5691 (map_attr_string): Add an optional argument that passes back
5692 the associated iterator.
5693 (overloaded_name_hash, overloaded_name_eq_p, named_rtx_p):
5694 (md_reader::handle_overloaded_name, add_overload_instance): New
5696 (apply_iterators): Handle '@' names. Report an error if '@'
5697 is used without iterators.
5698 (initialize_iterators): Initialize the new iterator_group fields.
5699 * genopinit.c (handle_overloaded_code_for)
5700 (handle_overloaded_gen): New functions.
5701 (main): Use them to print declarations of maybe_code_for_* and
5702 maybe_gen_* functions, and inline definitions of code_for_* and gen_*.
5703 * genemit.c (print_overload_arguments, print_overload_test)
5704 (handle_overloaded_code_for, handle_overloaded_gen): New functions.
5705 (main): Use it to print definitions of maybe_code_for_* and
5706 maybe_gen_* functions.
5707 * config/aarch64/aarch64.c (aarch64_split_128bit_move): Use
5708 gen_aarch64_mov{low,high}_di and gen_aarch64_movdi_{low,high}
5709 instead of explicit mode checks.
5710 (aarch64_split_simd_combine): Likewise gen_aarch64_simd_combine.
5711 (aarch64_split_simd_move): Likewise gen_aarch64_split_simd_mov.
5712 (aarch64_emit_load_exclusive): Likewise gen_aarch64_load_exclusive.
5713 (aarch64_emit_store_exclusive): Likewise gen_aarch64_store_exclusive.
5714 (aarch64_expand_compare_and_swap): Likewise
5715 gen_aarch64_compare_and_swap and gen_aarch64_compare_and_swap_lse
5716 (aarch64_gen_atomic_cas): Likewise gen_aarch64_atomic_cas.
5717 (aarch64_emit_atomic_swap): Likewise gen_aarch64_atomic_swp.
5718 (aarch64_constant_pool_reload_icode): Delete.
5719 (aarch64_secondary_reload): Use code_for_aarch64_reload_movcp
5720 instead of aarch64_constant_pool_reload_icode. Use
5721 code_for_aarch64_reload_mov instead of explicit mode checks.
5722 (rsqrte_type, get_rsqrte_type, rsqrts_type, get_rsqrts_type): Delete.
5723 (aarch64_emit_approx_sqrt): Use gen_aarch64_rsqrte instead of
5724 get_rsqrte_type and gen_aarch64_rsqrts instead of gen_rqrts_type.
5725 (recpe_type, get_recpe_type, recps_type, get_recps_type): Delete.
5726 (aarch64_emit_approx_div): Use gen_aarch64_frecpe instead of
5727 get_recpe_type and gen_aarch64_frecps instead of get_recps_type.
5728 (aarch64_atomic_load_op_code): Delete.
5729 (aarch64_emit_atomic_load_op): Likewise.
5730 (aarch64_gen_atomic_ldop): Use UNSPECV_ATOMIC_* instead of
5731 aarch64_atomic_load_op_code. Use gen_aarch64_atomic_load
5732 instead of aarch64_emit_atomic_load_op.
5733 * config/aarch64/aarch64.md (aarch64_reload_movcp<GPF_TF:mode><P:mode>)
5734 (aarch64_reload_movcp<VALL:mode><P:mode>, aarch64_reload_mov<mode>)
5735 (aarch64_movdi_<mode>low, aarch64_movdi_<mode>high)
5736 (aarch64_mov<mode>high_di, aarch64_mov<mode>low_di): Add a '@'
5737 character before the pattern name.
5738 * config/aarch64/aarch64-simd.md (aarch64_split_simd_mov<mode>)
5739 (aarch64_rsqrte<mode>, aarch64_rsqrts<mode>)
5740 (aarch64_simd_combine<mode>, aarch64_frecpe<mode>)
5741 (aarch64_frecps<mode>): Likewise.
5742 * config/aarch64/atomics.md (atomic_compare_and_swap<mode>)
5743 (aarch64_compare_and_swap<mode>, aarch64_compare_and_swap<mode>_lse)
5744 (aarch64_load_exclusive<mode>, aarch64_store_exclusive<mode>)
5745 (aarch64_atomic_swp<mode>, aarch64_atomic_cas<mode>)
5746 (aarch64_atomic_load<atomic_ldop><mode>): Likewise.
5748 2018-08-02 Richard Sandiford <richard.sandiford@arm.com>
5750 * config/aarch64/aarch64.c (aarch64_float_const_representable_p):
5751 Allow HFmode constants if TARGET_FP_F16INST.
5753 2018-08-02 Jackson Woodruff <jackson.woodruff@arm.com>
5756 * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp):
5757 No longer check last store for clobber of address register.
5759 2018-08-02 Martin Liska <mliska@suse.cz>
5761 PR gcov-profile/86817
5762 * gcov.c (process_all_functions): New function.
5764 (process_file): Move functions processing to
5765 process_all_functions.
5767 2018-08-02 David Malcolm <dmalcolm@redhat.com>
5769 * dumpfile.c (dump_user_location_t::dump_user_location_t): Add
5770 "const" to the "gimple *" and "rtx_insn *" parameters.
5771 * dumpfile.h (dump_user_location_t::dump_user_location_t):
5773 (dump_location_t::dump_location_t): Likewise.
5775 2018-08-01 Martin Sebor <msebor@redhat.com>
5777 PR tree-optimization/86650
5778 * gimple-pretty-print.c (percent_G_format): Accept a "gimple *"
5779 rather than a "gcall *". Directly pass the data of interest
5780 to percent_K_format, rather than building a temporary CALL_EXPR
5782 * gimple-fold.c (gimple_fold_builtin_strncpy): Adjust.
5783 (gimple_fold_builtin_strncat): Adjust.
5784 * gimple-ssa-warn-restrict.h (check_bounds_or_overlap): Replace
5785 gcall* argument with gimple*.
5786 * gimple-ssa-warn-restrict.c (check_call): Same.
5787 (wrestrict_dom_walker::before_dom_children): Same.
5788 (builtin_access::builtin_access): Same.
5789 (check_bounds_or_overlap): Same
5790 (maybe_diag_overlap): Same.
5791 (maybe_diag_offset_bounds): Same.
5792 * tree-diagnostic.c (default_tree_printer): Move usage of
5793 EXPR_LOCATION (t) and TREE_BLOCK (t) from within percent_K_format
5795 * tree-pretty-print.c (percent_K_format): Add argument.
5796 * tree-pretty-print.h: Add argument.
5797 * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Adjust.
5798 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Adjust.
5799 (maybe_diag_stxncpy_trunc): Same.
5800 (handle_builtin_stxncpy): Same.
5801 (handle_builtin_strcat): Same.
5803 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
5805 * match.pd: Optimise pointer range checks.
5807 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
5809 PR tree-optimization/86758
5810 * tree-vect-stmts.c (vectorizable_simd_clone_call): Don't try
5811 to remove pattern statements.
5813 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
5815 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Use the
5816 result of dfs_enumerate_from when constructing stmt_vec_infos,
5817 instead of additionally calling get_loop_body.
5819 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
5821 * tree-vectorizer.h (vect_create_data_ref_ptr): Remove inv_p
5823 * tree-vect-data-refs.c (vect_create_data_ref_ptr): Likewise.
5824 When creating an iv, assert that the step is not known to be zero.
5825 (vect_setup_realignment): Update call accordingly.
5826 * tree-vect-stmts.c (vectorizable_store): Likewise.
5827 (vectorizable_load): Likewise. Handle VMAT_INVARIANT separately.
5829 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
5831 * tree-vectorizer.h (vect_stmt_to_vectorize): New function.
5832 * tree-vect-loop.c (vect_update_vf_for_slp): Use it.
5833 (vectorizable_reduction): Likewise.
5834 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
5835 (vect_detect_hybrid_slp_stmts): Likewise.
5836 * tree-vect-stmts.c (vect_is_simple_use): Likewise.
5838 2018-08-01 Aldy Hernandez <aldyh@redhat.com>
5840 * tree-vrp (zero_nonzero_bits_from_bounds): Rename to...
5841 (wide_int_set_zero_nonzero_bits): ...this.
5842 (zero_nonzero_bits_from_vr): Rename to...
5843 (vrp_set_zero_nonzero_bits): ...this.
5844 (extract_range_from_multiplicative_op_1): Abstract wide int
5846 (wide_int_range_multiplicative_op): ...here.
5847 (extract_range_from_binary_expr_1): Extract wide int binary
5848 operations into their own functions.
5849 (wide_int_range_lshift): New.
5850 (wide_int_range_can_optimize_bit_op): New.
5851 (wide_int_range_shift_undefined_p): New.
5852 (wide_int_range_bit_xor): New.
5853 (wide_int_range_bit_ior): New.
5854 (wide_int_range_bit_and): New.
5855 (wide_int_range_trunc_mod): New.
5856 (extract_range_into_wide_ints): New.
5857 (vrp_shift_undefined_p): New.
5858 (extract_range_from_multiplicative_op): New.
5859 (vrp_can_optimize_bit_op): New.
5860 * tree-vrp.h (value_range::dump): New.
5861 (wide_int_range_multiplicative_op): New.
5862 (wide_int_range_lshift):New.
5863 (wide_int_range_shift_undefined_p): New.
5864 (wide_int_range_bit_xor): New.
5865 (wide_int_range_bit_ior): New.
5866 (wide_int_range_bit_and): New.
5867 (wide_int_range_trunc_mod): New.
5868 (zero_nonzero_bits_from_bounds): Rename to...
5869 (wide_int_set_zero_nonzero_bits): ...this.
5870 (zero_nonzero_bits_from_vr): Rename to...
5871 (vrp_set_zero_nonzero_bits): ...this.
5872 (range_easy_mask_min_max): Rename to...
5873 (wide_int_range_can_optimize_bit_op): this.
5874 * vr-values.c (simplify_bit_ops_using_ranges): Rename
5875 zero_nonzero_bits_from_vr into vrp_set_zero_nonzero_bits.
5877 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
5879 * tree-vectorizer.h (vect_orig_stmt): New function.
5880 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Use it.
5881 * tree-vect-loop.c (vect_model_reduction_cost): Likewise.
5882 (vect_create_epilog_for_reduction): Likewise.
5883 (vectorizable_live_operation): Likewise.
5884 * tree-vect-slp.c (vect_find_last_scalar_stmt_in_slp): Likewise.
5885 (vect_detect_hybrid_slp_stmts, vect_schedule_slp): Likewise.
5886 * tree-vect-stmts.c (vectorizable_call): Likewise.
5887 (vectorizable_simd_clone_call, vect_remove_stores): Likewise.
5889 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
5891 * tree-vectorizer.h (vect_transform_stmt): Remove grouped_store
5893 * tree-vect-stmts.c (vect_transform_stmt): Likewise.
5894 * tree-vect-loop.c (vect_transform_loop_stmt): Update call accordingly.
5895 (vect_transform_loop): Likewise.
5896 * tree-vect-slp.c (vect_schedule_slp_instance): Likewise.
5898 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
5900 * tree-vectorizer.h (vect_schedule_slp): Return void.
5901 * tree-vect-slp.c (vect_schedule_slp_instance): Likewise.
5902 (vect_schedule_slp): Likewise.
5904 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
5906 * tree-vect-loop.c (vect_transform_loop_stmt): Remove slp_scheduled
5908 (vect_transform_loop): Update calls accordingly. Schedule SLP
5909 instances before the main loop, if any exist.
5911 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
5913 PR tree-optimization/86749
5914 * tree-vect-patterns.c (vect_determine_min_output_precision_1):
5915 If the lhs is used in a COND_EXPR, check that it is being used
5916 as the "then" or "else" value.
5918 2018-08-01 Tom de Vries <tdevries@suse.de>
5921 * config/nvptx/nvptx.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define to
5922 speculation_safe_value_not_needed.
5924 2018-08-01 Richard Biener <rguenther@suse.de>
5926 * tree-ssa-sccvn.c (visit_phi): Compare invariant addresses
5929 2018-08-01 Martin Liska <mliska@suse.cz>
5931 * value-prof.c (gimple_divmod_fixed_value_transform): Unify
5932 format how successful transformation is dumped.
5933 (gimple_mod_pow2_value_transform): Likewise.
5934 (gimple_mod_subtract_transform): Likewise.
5935 (gimple_stringops_transform): Likewise.
5937 2018-08-01 Martin Liska <mliska@suse.cz>
5940 * value-prof.c (interesting_stringop_to_profile_p):
5941 Simplify the code and add BUILT_IN_MEMMOVE.
5942 (gimple_stringops_transform): Likewise.
5944 2018-08-01 Sam Tebbs <sam.tebbs@arm.com>
5946 * config/aarch64/aarch64-simd.md
5947 (*aarch64_get_lane_zero_extendsi<mode>): Rename to...
5948 (*aarch64_get_lane_zero_extend<GPI:mode><VDQQH:mode>): ... This and
5949 use GPI iterator instead of SI mode.
5951 2018-08-01 Richard Earnshaw <rearnsha@arm.com>
5953 * config/rs6000/rs6000.md (speculation_barrier): Renamed from
5954 rs6000_speculation_barrier.
5955 * config/rs6000/rs6000.c (rs6000_expand_builtin): Adjust for
5956 new barrier pattern name.
5958 2018-08-01 Richard Earnshaw <rearnsha@arm.com>
5960 * config/i386/i386.md (unspecv): Add UNSPECV_SPECULATION_BARRIER.
5961 (speculation_barrier): New insn.
5963 2018-08-01 Richard Biener <rguenther@suse.de>
5966 * graphite.h: Include isl/id.h and isl/space.h to allow build
5969 2018-08-01 Jan Willem Jagersma <jwjagersma@gmail.com>
5972 * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
5973 mode for COFF targets.
5974 * defaults.h (TARGET_COFF): Define.
5975 * config/i386/djgpp.h (TARGET_ASM_LTO_START, TARGET_ASM_LTO_END,
5976 TARGET_COFF): Define.
5977 (i386_djgpp_asm_lto_start, i386_djgpp_asm_lto_end): Declare.
5978 * config/i386/djgpp.c (saved_debug_info_level): New static variable.
5979 (i386_djgpp_asm_lto_start, i386_djgpp_asm_lto_end): New functions.
5981 2018-07-31 Alexandre Oliva <oliva@adacore.com>
5983 * gimple-streamer-in.c (input_bb): Restore BB discriminator.
5984 * gimple-streamer-out.c (output_bb): Save it.
5985 * lto-streamer-in.c (input_struct_function_base): Restore
5986 instance discriminator if available. Create map on demand.
5987 * lto-streamer-out.c (output_struct_function_base): Save it if
5989 * final.c (decl_to_instance_map): Document LTO strategy.
5991 2018-07-31 Alexandre Oliva <oliva@adacore.com>
5992 Olivier Hainque <hainque@adacore.com>
5994 * debug.h (decl_to_instance_map_t): New type.
5995 (decl_to_instance_map): Declare.
5996 (maybe_create_decl_to_instance_map): New inline function.
5997 * final.c (bb_discriminator, last_bb_discriminator): New statics,
5998 to track basic block discriminators.
5999 (final_start_function_1): Initialize them.
6000 (final_scan_insn_1): On NOTE_INSN_BASIC_BLOCK, track
6002 (decl_to_instance_map): New variable.
6003 (map_decl_to_instance, maybe_set_discriminator): New functions.
6004 (notice_source_line): Set discriminator.
6006 2018-07-31 Ian Lance Taylor <iant@golang.org>
6008 * targhooks.c (default_have_speculation_safe_value): Add
6011 2018-07-31 David Malcolm <dmalcolm@redhat.com>
6013 * dump-context.h: Include "pretty-print.h".
6014 (dump_context::refresh_dumps_are_enabled): New decl.
6015 (dump_context::emit_item): New decl.
6016 (class dump_context): Add fields "m_test_pp" and
6018 (temp_dump_context::temp_dump_context): Add param "test_pp_flags".
6019 (temp_dump_context::get_dumped_text): New decl.
6020 (class temp_dump_context): Add field "m_pp".
6021 * dumpfile.c (refresh_dumps_are_enabled): Convert to...
6022 (dump_context::refresh_dumps_are_enabled): ...and add a test for
6024 (set_dump_file): Update for above change.
6025 (set_alt_dump_file): Likewise.
6026 (dump_loc): New overload, taking a pretty_printer *.
6027 (dump_context::dump_loc): Call end_any_optinfo. Dump the location
6028 to any test pretty-printer.
6029 (make_item_for_dump_gimple_stmt): New function, adapted from
6030 optinfo::add_gimple_stmt.
6031 (dump_context::dump_gimple_stmt): Call it, and use the result,
6032 eliminating the direct usage of dump_file and alt_dump_file in
6033 favor of indirectly using them via emit_item.
6034 (make_item_for_dump_gimple_expr): New function, adapted from
6035 optinfo::add_gimple_expr.
6036 (dump_context::dump_gimple_expr): Call it, and use the result,
6037 eliminating the direct usage of dump_file and alt_dump_file in
6038 favor of indirectly using them via emit_item.
6039 (make_item_for_dump_generic_expr): New function, adapted from
6041 (dump_context::dump_generic_expr): Call it, and use the result,
6042 eliminating the direct usage of dump_file and alt_dump_file in
6043 favor of indirectly using them via emit_item.
6044 (make_item_for_dump_printf_va): New function, adapted from
6045 optinfo::add_printf_va.
6046 (make_item_for_dump_printf): New function.
6047 (dump_context::dump_printf_va): Call make_item_for_dump_printf_va,
6048 and use the result, eliminating the direct usage of dump_file and
6049 alt_dump_file in favor of indirectly using them via emit_item.
6050 (make_item_for_dump_dec): New function.
6051 (dump_context::dump_dec): Call it, and use the result,
6052 eliminating the direct usage of dump_file and alt_dump_file in
6053 favor of indirectly using them via emit_item.
6054 (make_item_for_dump_symtab_node): New function, adapted from
6055 optinfo::add_symtab_node.
6056 (dump_context::dump_symtab_node): Call it, and use the result,
6057 eliminating the direct usage of dump_file and alt_dump_file in
6058 favor of indirectly using them via emit_item.
6059 (dump_context::begin_scope): Reimplement, avoiding direct usage
6060 of dump_file and alt_dump_file in favor of indirectly using them
6062 (dump_context::emit_item): New member function.
6063 (temp_dump_context::temp_dump_context): Add param "test_pp_flags".
6064 Set up test pretty-printer on the underlying context. Call
6065 refresh_dumps_are_enabled.
6066 (temp_dump_context::~temp_dump_context): Call
6067 refresh_dumps_are_enabled.
6068 (temp_dump_context::get_dumped_text): New member function.
6069 (selftest::verify_dumped_text): New function.
6070 (ASSERT_DUMPED_TEXT_EQ): New macro.
6071 (selftest::test_capture_of_dump_calls): Run all tests twice, with
6072 and then without optinfo enabled. Add uses of
6073 ASSERT_DUMPED_TEXT_EQ to all tests. Add test of nested scopes.
6074 * dumpfile.h: Update comment for the dump_* API.
6075 * optinfo-emit-json.cc
6076 (selftest::test_building_json_from_dump_calls): Update for new
6077 param for temp_dump_context ctor.
6078 * optinfo.cc (optinfo_item::optinfo_item): Remove "owned" param
6079 and "m_owned" field.
6080 (optinfo_item::~optinfo_item): Likewise.
6081 (optinfo::add_item): New member function.
6082 (optinfo::emit): Update comment.
6083 (optinfo::add_string): Delete.
6084 (optinfo::add_printf): Delete.
6085 (optinfo::add_printf_va): Delete.
6086 (optinfo::add_gimple_stmt): Delete.
6087 (optinfo::add_gimple_expr): Delete.
6088 (optinfo::add_tree): Delete.
6089 (optinfo::add_symtab_node): Delete.
6090 (optinfo::add_dec): Delete.
6091 * optinfo.h (class dump_context): New forward decl.
6092 (optinfo::add_item): New decl.
6093 (optinfo::add_string): Delete.
6094 (optinfo::add_printf): Delete.
6095 (optinfo::add_printf_va): Delete.
6096 (optinfo::add_gimple_stmt): Delete.
6097 (optinfo::add_gimple_expr): Delete.
6098 (optinfo::add_tree): Delete.
6099 (optinfo::add_symtab_node): Delete.
6100 (optinfo::add_dec): Delete.
6101 (optinfo::add_poly_int): Delete.
6102 (optinfo_item::optinfo_item): Remove "owned" param.
6103 (class optinfo_item): Remove field "m_owned".
6105 2018-07-31 Jozef Lawrynowicz <jozef.l@mittosystems.com>
6108 * gcc/cfgexpand.c (set_parm_rtl): Use the alignment of Pmode when
6109 MAX_SUPPORTED_STACK_ALIGNMENT would otherwise be exceeded by the
6110 requested variable alignment.
6111 (expand_one_ssa_partition): Likewise.
6112 (expand_one_var): Likewise.
6114 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
6116 * config/pdp11/pdp11.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
6117 to speculation_safe_value_not_needed.
6119 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
6121 * targhooks.h (speculation_safe_value_not_needed): New prototype.
6122 * targhooks.c (speculation_safe_value_not_needed): New function.
6123 * target.def (have_speculation_safe_value): Update documentation.
6124 * doc/tm.texi: Regenerated.
6126 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
6128 * config/aarch64/iterators.md (ALLI_TI): New iterator.
6129 * config/aarch64/aarch64.md (despeculate_copy<ALLI_TI:mode>): New
6131 (despeculate_copy<ALLI:mode>_insn): New insn.
6132 (despeculate_copyti_insn): New insn.
6133 (despeculate_simple<ALLI:mode>): New insn
6134 (despeculate_simpleti): New insn.
6135 * config/aarch64/aarch64.c (aarch64_speculation_safe_value): New
6137 (TARGET_SPECULATION_SAFE_VALUE): Redefine to
6138 aarch64_speculation_safe_value.
6139 (aarch64_print_operand): Handle const0_rtx in modifier 'H'.
6141 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
6143 * config/aarch64/aarch64-speculation.cc: New file.
6144 * config/aarch64/aarch64-passes.def (pass_track_speculation): Add
6145 before pass_reorder_blocks.
6146 * config/aarch64/aarch64-protos.h (make_pass_track_speculation): Add
6148 * config/aarch64/aarch64.c (aarch64_conditional_register_usage): Fix
6149 X14 and X15 when tracking speculation.
6150 * config/aarch64/aarch64.md (register name constants): Add
6151 SPECULATION_TRACKER_REGNUM and SPECULATION_SCRATCH_REGNUM.
6152 (unspec): Add UNSPEC_SPECULATION_TRACKER.
6153 (speculation_barrier): New insn attribute.
6154 (cmp<mode>): Allow SP in comparisons.
6155 (speculation_tracker): New insn.
6156 (speculation_barrier): Add speculation_barrier attribute.
6157 * config/aarch64/t-aarch64: Add make rule for aarch64-speculation.o.
6158 * config.gcc (aarch64*-*-*): Add aarch64-speculation.o to extra_objs.
6159 * doc/invoke.texi (AArch64 Options): Document -mtrack-speculation.
6161 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
6163 * config/aarch64/aarch64.md (cb<optab><mode>1): Disable when
6164 aarch64_track_speculation is true.
6165 (tb<optab><mode>1): Likewise.
6166 * config/aarch64/aarch64.c (aarch64_split_compare_regs): Do not
6167 generate CB[N]Z when tracking speculation.
6168 (aarch64_split_compare_and_swap): Likewise.
6169 (aarch64_split_atomic_op): Likewise.
6171 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
6173 * config/aarch64/aarch64.opt (mtrack-speculation): New target option.
6175 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
6177 * config/aarch64.md (unspecv): Add UNSPECV_SPECULAION_BARRIER.
6178 (speculation_barrier): New insn.
6180 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
6182 * config/arm/unspecs.md (unspecv): Add VUNSPEC_SPECULATION_BARRIER.
6183 * config/arm/arm.md (speculation_barrier): New expand.
6184 (speculation_barrier_insn): New pattern.
6186 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
6188 * builtin-types.def (BT_FN_PTR_PTR_VAR): New function type.
6189 (BT_FN_I1_I1_VAR, BT_FN_I2_I2_VAR, BT_FN_I4_I4_VAR): Likewise.
6190 (BT_FN_I8_I8_VAR, BT_FN_I16_I16_VAR): Likewise.
6191 * builtin-attrs.def (ATTR_NOVOPS_NOTHROW_LEAF_LIST): New attribute
6193 * builtins.def (BUILT_IN_SPECULATION_SAFE_VALUE_N): New builtin.
6194 (BUILT_IN_SPECULATION_SAFE_VALUE_PTR): New internal builtin.
6195 (BUILT_IN_SPECULATION_SAFE_VALUE_1): Likewise.
6196 (BUILT_IN_SPECULATION_SAFE_VALUE_2): Likewise.
6197 (BUILT_IN_SPECULATION_SAFE_VALUE_4): Likewise.
6198 (BUILT_IN_SPECULATION_SAFE_VALUE_8): Likewise.
6199 (BUILT_IN_SPECULATION_SAFE_VALUE_16): Likewise.
6200 * builtins.c (expand_speculation_safe_value): New function.
6201 (expand_builtin): Call it.
6202 * doc/cpp.texi: Document predefine __HAVE_SPECULATION_SAFE_VALUE.
6203 * doc/extend.texi: Document __builtin_speculation_safe_value.
6204 * doc/md.texi: Document "speculation_barrier" pattern.
6205 * doc/tm.texi.in: Pull in TARGET_SPECULATION_SAFE_VALUE and
6206 TARGET_HAVE_SPECULATION_SAFE_VALUE.
6207 * doc/tm.texi: Regenerated.
6208 * target.def (have_speculation_safe_value, speculation_safe_value): New
6210 * targhooks.c (default_have_speculation_safe_value): New function.
6211 (default_speculation_safe_value): New function.
6212 * targhooks.h (default_have_speculation_safe_value): Add prototype.
6213 (default_speculation_safe_value): Add prototype.
6215 2018-07-31 David Malcolm <dmalcolm@redhat.com>
6217 * dump-context.h (dump_context::dump_loc): New decl.
6218 * dumpfile.c (dump_context::dump_loc): New member function.
6219 (dump_context::dump_gimple_stmt_loc): Reimplement using dump_loc
6220 and dump_gimple_stmt.
6221 (dump_context::dump_gimple_expr_loc): Likewise, using
6223 (dump_context::dump_generic_expr_loc): Likewise, using
6225 (dump_context::dump_printf_loc_va): Likewise, using
6227 (dump_context::begin_scope): Explicitly using the global function
6228 "dump_loc", rather than the member function.
6230 2018-07-31 Martin Sebor <msebor@redhat.com>
6232 PR tree-optimization/86741
6233 * tree-vrp.c (vrp_prop::check_mem_ref): Avoid incomplete types.
6235 2018-07-31 Andreas Krebbel <krebbel@linux.ibm.com>
6237 * config/s390/s390.c (s390_expand_setmem): Make the unrolling to
6238 depend on whether prefetch instructions will be emitted or not.
6239 Use TARGET_SETMEM_PFD for checking whether prefetch instructions
6240 will be emitted or not.
6241 * config/s390/s390.h (TARGET_SETMEM_PREFETCH_DISTANCE)
6242 (TARGET_SETMEM_PFD): New macros.
6244 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
6246 * tree-vectorizer.h (stmt_vec_info): Turn back into a typedef.
6247 (NULL_STMT_VEC_INFO): Delete.
6248 (stmt_vec_info::operator*): Likewise.
6249 (stmt_vec_info::operator gimple *): Likewise.
6250 * tree-vect-loop.c (vectorizable_reduction): Use NULL instead
6251 of NULL_STMT_VEC_INFO.
6252 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
6253 (vect_reassociating_reduction_p): Likewise.
6254 * tree-vect-stmts.c (vect_build_gather_load_calls): Likewise.
6255 (vectorizable_store): Likewise.
6256 * tree-vectorizer.c (vec_info::set_vinfo_for_stmt): Likewise.
6257 (vec_info::free_stmt_vec_infos): Likewise.
6259 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
6261 * tree-vectorizer.h (vect_stmt_in_region_p): Delete.
6262 * tree-vectorizer.c (vect_stmt_in_region_p): Likewise.
6264 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
6266 * tree-vectorizer.h (vec_info::new_vinfo_for_stmt)
6267 (vec_info::set_vinfo_for_stmt, vec_info::free_stmt_vec_infos)
6268 (vec_info::free_stmt_vec_info): New private member functions.
6269 (set_stmt_vec_info_vec, free_stmt_vec_infos, vinfo_for_stmt)
6270 (set_vinfo_for_stmt, new_stmt_vec_info, free_stmt_vec_info): Delete.
6271 * tree-parloops.c (gather_scalar_reductions): Remove calls to
6272 set_stmt_vec_info_vec and free_stmt_vec_infos.
6273 * tree-vect-loop.c (_loop_vec_info): Remove call to
6274 set_stmt_vec_info_vec.
6275 * tree-vect-stmts.c (new_stmt_vec_info, set_stmt_vec_info_vec)
6276 (free_stmt_vec_infos, free_stmt_vec_info): Delete in favor of...
6277 * tree-vectorizer.c (vec_info::new_stmt_vec_info)
6278 (vec_info::set_vinfo_for_stmt, vec_info::free_stmt_vec_infos)
6279 (vec_info::free_stmt_vec_info): ...these new functions. Remove
6280 assignments in {vec_info::,}new_stmt_vec_info that are redundant
6281 with the clearing in the xcalloc.
6282 (stmt_vec_info_vec): Delete.
6283 (vec_info::vec_info): Don't call set_stmt_vec_info_vec.
6284 (vectorize_loops): Likewise.
6285 (vec_info::~vec_info): Remove argument from call to
6286 free_stmt_vec_infos.
6287 (vec_info::add_stmt): Remove vinfo argument from call to
6290 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
6292 * tree-vectorizer.h (free_stmt_vec_info): Take a stmt_vec_info
6293 rather than a gimple stmt.
6294 * tree-vect-stmts.c (free_stmt_vec_info): Likewise. Don't free
6295 information for pattern statements when passed the original
6296 statement; instead wait to be passed the pattern statement itself.
6297 Don't call set_vinfo_for_stmt here.
6298 (free_stmt_vec_infos): Update call to free_stmt_vec_info.
6299 * tree-vect-loop.c (_loop_vec_info::~loop_vec_info): Don't free
6300 stmt_vec_infos here.
6301 * tree-vect-slp.c (_bb_vec_info::~bb_vec_info): Likewise.
6302 * tree-vectorizer.c (vec_info::remove_stmt): Nullify the statement's
6303 stmt_vec_infos entry.
6305 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
6307 * tree-vectorizer.h (vec_info::replace_stmt): Declare.
6308 * tree-vectorizer.c (vec_info::replace_stmt): New function.
6309 * tree-vect-slp.c (vect_remove_slp_scalar_calls): Use it.
6310 * tree-vect-stmts.c (vectorizable_call): Likewise.
6311 (vectorizable_simd_clone_call): Likewise.
6313 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
6315 * tree-vectorizer.h (vec_info::remove_stmt): Declare.
6316 * tree-vectorizer.c (vec_info::remove_stmt): New function.
6317 * tree-vect-loop-manip.c (vect_set_loop_condition): Use it.
6318 * tree-vect-loop.c (vect_transform_loop): Likewise.
6319 * tree-vect-slp.c (vect_schedule_slp): Likewise.
6320 * tree-vect-stmts.c (vect_remove_stores): Likewise.
6322 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
6324 * tree-vectorizer.h (vec_info::lookup_dr): New member function.
6325 (vect_dr_stmt): Delete.
6326 * tree-vectorizer.c (vec_info::lookup_dr): New function.
6327 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Use it instead
6329 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
6330 (vect_analyze_data_ref_dependence, vect_record_base_alignments)
6331 (vect_verify_datarefs_alignment, vect_peeling_supportable)
6332 (vect_analyze_data_ref_accesses, vect_prune_runtime_alias_test_list)
6333 (vect_analyze_data_refs): Likewise.
6334 (vect_slp_analyze_data_ref_dependence): Likewise. Take a vec_info
6336 (vect_find_same_alignment_drs): Likewise.
6337 (vect_slp_analyze_node_dependences): Update calls accordingly.
6338 (vect_analyze_data_refs_alignment): Likewise. Use vec_info::lookup_dr
6339 instead of DR_VECT_AUX.
6340 (vect_get_peeling_costs_all_drs): Take a loop_vec_info instead
6341 of a vector data references. Use vec_info::lookup_dr instead of
6343 (vect_peeling_hash_get_lowest_cost): Update calls accordingly.
6344 (vect_enhance_data_refs_alignment): Likewise. Use vec_info::lookup_dr
6345 instead of DR_VECT_AUX.
6347 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
6349 * tree-vectorizer.h (_loop_vec_info::unaligned_dr): Change to
6351 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Update
6353 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
6354 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
6355 (vect_gen_prolog_loop_niters): Likewise.
6357 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
6359 * tree-vectorizer.h (set_dr_misalignment, dr_misalignment)
6360 (DR_TARGET_ALIGNMENT, aligned_access_p, known_alignment_for_access_p)
6361 (vect_known_alignment_in_bytes, vect_dr_behavior)
6362 (vect_get_scalar_dr_size): Take references as dr_vec_infos
6363 instead of data_references. Update calls to other routines for
6364 which the same change has been made.
6365 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Take
6366 dr_vec_infos instead of stmt_vec_infos.
6367 (vect_analyze_data_ref_dependence): Update call accordingly.
6368 (vect_slp_analyze_data_ref_dependence)
6369 (vect_record_base_alignments): Use DR_VECT_AUX.
6370 (vect_calculate_target_alignment, vect_compute_data_ref_alignment)
6371 (vect_update_misalignment_for_peel, verify_data_ref_alignment)
6372 (vector_alignment_reachable_p, vect_get_data_access_cost)
6373 (vect_peeling_supportable, vect_analyze_group_access_1)
6374 (vect_analyze_group_access, vect_analyze_data_ref_access)
6375 (vect_vfa_segment_size, vect_vfa_access_size, vect_vfa_align)
6376 (vect_compile_time_alias, vect_small_gap_p)
6377 (vectorizable_with_step_bound_p, vect_duplicate_ssa_name_ptr_info):
6378 (vect_supportable_dr_alignment): Take references as dr_vec_infos
6379 instead of data_references. Update calls to other routines for
6380 which the same change has been made.
6381 (vect_verify_datarefs_alignment, vect_get_peeling_costs_all_drs)
6382 (vect_find_same_alignment_drs, vect_analyze_data_refs_alignment)
6383 (vect_slp_analyze_and_verify_node_alignment)
6384 (vect_analyze_data_ref_accesses, vect_prune_runtime_alias_test_list)
6385 (vect_create_addr_base_for_vector_ref, vect_create_data_ref_ptr)
6386 (vect_setup_realignment): Use dr_vec_infos. Update calls after
6388 (_vect_peel_info::dr): Replace with...
6389 (_vect_peel_info::dr_info): ...this new field.
6390 (vect_peeling_hash_get_most_frequent)
6391 (vect_peeling_hash_choose_best_peeling): Update accordingly.
6392 (vect_peeling_hash_get_lowest_cost):
6393 (vect_enhance_data_refs_alignment): Likewise. Update calls to other
6394 routines for which the same change has been made.
6395 (vect_peeling_hash_insert): Likewise. Take a dr_vec_info instead of a
6397 * tree-vect-loop-manip.c (get_misalign_in_elems)
6398 (vect_gen_prolog_loop_niters): Use dr_vec_infos. Update calls after
6400 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
6401 * tree-vect-stmts.c (vect_get_store_cost, vect_get_load_cost)
6402 (vect_truncate_gather_scatter_offset, compare_step_with_zero)
6403 (get_group_load_store_type, get_negative_load_store_type)
6404 (vect_get_data_ptr_increment, vectorizable_store)
6405 (vectorizable_load): Likewise.
6406 (ensure_base_align): Take a dr_vec_info instead of a data_reference.
6407 Update calls to other routines for which the same change has been made.
6409 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
6411 * tree-vectorizer.h (vec_info::move_dr): New member function.
6412 (dataref_aux): Rename to...
6413 (dr_vec_info): ...this and add "dr" and "stmt" fields.
6414 (_stmt_vec_info::dr_aux): Update accordingly.
6415 (_stmt_vec_info::data_ref_info): Delete.
6416 (STMT_VINFO_GROUPED_ACCESS, DR_GROUP_FIRST_ELEMENT)
6417 (DR_GROUP_NEXT_ELEMENT, DR_GROUP_SIZE, DR_GROUP_STORE_COUNT)
6418 (DR_GROUP_GAP, DR_GROUP_SAME_DR_STMT, REDUC_GROUP_FIRST_ELEMENT):
6419 (REDUC_GROUP_NEXT_ELEMENT, REDUC_GROUP_SIZE): Use dr_aux.dr instead
6421 (STMT_VINFO_DATA_REF): Likewise. Turn into an lvalue.
6422 (STMT_VINFO_DR_INFO): New macro.
6423 (DR_VECT_AUX): Use STMT_VINFO_DR_INKFO and vect_dr_stmt.
6424 (set_dr_misalignment): Update after rename of dataref_aux.
6425 (vect_dr_stmt): Move earlier in file. Return dr_aux.stmt.
6426 * tree-vect-stmts.c (new_stmt_vec_info): Remove redundant
6427 initialization of STMT_VINFO_DATA_REF.
6428 * tree-vectorizer.c (vec_info::move_dr): New function.
6429 * tree-vect-patterns.c (vect_recog_bool_pattern)
6430 (vect_recog_mask_conversion_pattern)
6431 (vect_recog_gather_scatter_pattern): Use it.
6432 * tree-vect-data-refs.c (vect_analyze_data_refs): Initialize
6433 the "dr" and "stmt" fields of dr_vec_info instead of
6434 STMT_VINFO_DATA_REF.
6436 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
6438 * tree-vectorizer.h (_stmt_vec_info::pattern_stmt_p): New field.
6439 (is_pattern_stmt_p): Use it.
6440 * tree-vect-patterns.c (vect_init_pattern_stmt): Set pattern_stmt_p
6441 on pattern statements.
6443 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
6445 * tree-vect-patterns.c (vect_mark_pattern_stmts): Take the
6446 original stmt as a stmt_vec_info rather than a gimple stmt.
6447 (vect_pattern_recog_1): Take the statement directly as a
6448 stmt_vec_info, rather than via a gimple_stmt_iterator.
6449 Update call to vect_mark_pattern_stmts.
6450 (vect_pattern_recog): Update calls accordingly.
6452 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
6454 * tree-vectorizer.h (vect_get_vec_defs_for_stmt_copy)
6455 (vect_get_vec_def_for_stmt_copy): Take a vec_info rather than
6456 a vect_def_type for the first argument.
6457 * tree-vect-stmts.c (vect_get_vec_defs_for_stmt_copy): Likewise.
6458 (vect_get_vec_def_for_stmt_copy): Likewise. Return the original
6459 operand if it isn't defined by a vectorized statement.
6460 (vect_build_gather_load_calls): Remove the mask_dt argument and
6461 update calls to vect_get_vec_def_for_stmt_copy.
6462 (vectorizable_bswap): Likewise the dt argument.
6463 (vectorizable_call): Update calls to vectorizable_bswap and
6464 vect_get_vec_def_for_stmt_copy.
6465 (vectorizable_simd_clone_call, vectorizable_assignment)
6466 (vectorizable_shift, vectorizable_operation, vectorizable_condition)
6467 (vectorizable_comparison): Update calls to
6468 vect_get_vec_def_for_stmt_copy.
6469 (vectorizable_store): Likewise. Remove now-unnecessary calls to
6471 (vect_get_loop_based_defs): Remove dt argument and update call
6472 to vect_get_vec_def_for_stmt_copy.
6473 (vectorizable_conversion): Update calls to vect_get_loop_based_defs
6474 and vect_get_vec_def_for_stmt_copy.
6475 (vectorizable_load): Update calls to vect_build_gather_load_calls
6476 and vect_get_vec_def_for_stmt_copy.
6477 * tree-vect-loop.c (vect_create_epilog_for_reduction)
6478 (vectorizable_reduction, vectorizable_live_operation): Update calls
6479 to vect_get_vec_def_for_stmt_copy.
6481 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
6483 * tree-vect-data-refs.c (vect_record_base_alignment): Replace vec_info
6484 and gimple stmt arguments with a stmt_vec_info.
6485 (vect_record_base_alignments): Update calls accordingly.
6486 * tree-vect-slp.c (vect_record_max_nunits): Replace vec_info
6487 and gimple stmt arguments with a stmt_vec_info.
6488 (vect_build_slp_tree_1): Remove vinfo argument and update call
6489 to vect_record_max_nunits.
6490 (vect_build_slp_tree_2): Update calls to vect_build_slp_tree_1
6491 and vect_record_max_nunits.
6493 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
6495 * tree-vectorizer.h (nested_in_vect_loop_p): Move further down
6496 file and take a stmt_vec_info instead of a gimple stmt.
6497 (supportable_widening_operation, vect_finish_replace_stmt)
6498 (vect_finish_stmt_generation, vect_get_store_rhs)
6499 (vect_get_vec_def_for_operand_1, vect_get_vec_def_for_operand)
6500 (vect_get_vec_defs, vect_init_vector, vect_transform_stmt)
6501 (vect_remove_stores, vect_analyze_stmt, vectorizable_condition)
6502 (vect_get_smallest_scalar_type, vect_check_gather_scatter)
6503 (vect_create_data_ref_ptr, bump_vector_ptr)
6504 (vect_permute_store_chain, vect_setup_realignment)
6505 (vect_transform_grouped_load, vect_record_grouped_load_vectors)
6506 (vect_create_addr_base_for_vector_ref, vectorizable_live_operation)
6507 (vectorizable_reduction, vectorizable_induction)
6508 (get_initial_def_for_reduction, is_simple_and_all_uses_invariant)
6509 (vect_get_place_in_interleaving_chain): Take stmt_vec_infos rather
6510 than gimple stmts as arguments.
6511 * tree-vect-data-refs.c (vect_get_smallest_scalar_type)
6512 (vect_preserves_scalar_order_p, vect_slp_analyze_node_dependences)
6513 (can_group_stmts_p, vect_check_gather_scatter)
6514 (vect_create_addr_base_for_vector_ref, vect_create_data_ref_ptr)
6515 (bump_vector_ptr, vect_permute_store_chain, vect_setup_realignment)
6516 (vect_permute_load_chain, vect_shift_permute_load_chain)
6517 (vect_transform_grouped_load)
6518 (vect_record_grouped_load_vectors): Likewise.
6519 * tree-vect-loop.c (vect_fixup_reduc_chain)
6520 (get_initial_def_for_reduction, vect_create_epilog_for_reduction)
6521 (vectorize_fold_left_reduction, is_nonwrapping_integer_induction)
6522 (vectorizable_reduction, vectorizable_induction)
6523 (vectorizable_live_operation, vect_loop_kill_debug_uses): Likewise.
6524 * tree-vect-patterns.c (type_conversion_p, adjust_bool_stmts)
6525 (vect_get_load_store_mask): Likewise.
6526 * tree-vect-slp.c (vect_get_place_in_interleaving_chain)
6527 (vect_analyze_slp_instance, vect_mask_constant_operand_p): Likewise.
6528 * tree-vect-stmts.c (vect_mark_relevant)
6529 (is_simple_and_all_uses_invariant)
6530 (exist_non_indexing_operands_for_use_p, process_use)
6531 (vect_init_vector_1, vect_init_vector, vect_get_vec_def_for_operand_1)
6532 (vect_get_vec_def_for_operand, vect_get_vec_defs)
6533 (vect_finish_stmt_generation_1, vect_finish_replace_stmt)
6534 (vect_finish_stmt_generation, vect_truncate_gather_scatter_offset)
6535 (compare_step_with_zero, vect_get_store_rhs, get_group_load_store_type)
6536 (get_negative_load_store_type, get_load_store_type)
6537 (vect_check_load_store_mask, vect_check_store_rhs)
6538 (vect_build_gather_load_calls, vect_get_strided_load_store_ops)
6539 (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
6540 (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
6541 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
6542 (get_group_alias_ptr_type, vectorizable_store, hoist_defs_of_uses)
6543 (vectorizable_load, vectorizable_condition, vectorizable_comparison)
6544 (vect_analyze_stmt, vect_transform_stmt, vect_remove_stores)
6545 (supportable_widening_operation): Likewise.
6547 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
6549 * tree-vect-data-refs.c (vect_describe_gather_scatter_call): Take
6550 a stmt_vec_info instead of a gcall.
6551 (vect_check_gather_scatter): Update call accordingly.
6552 * tree-vect-loop-manip.c (iv_phi_p): Take a stmt_vec_info instead
6554 (vect_can_advance_ivs_p, vect_update_ivs_after_vectorizer)
6555 (slpeel_update_phi_nodes_for_loops):): Update calls accordingly.
6556 * tree-vect-loop.c (vect_transform_loop_stmt): Take a stmt_vec_info
6557 instead of a gimple stmt.
6558 (vect_transform_loop): Update calls accordingly.
6559 * tree-vect-slp.c (vect_split_slp_store_group): Take and return
6560 stmt_vec_infos instead of gimple stmts.
6561 (vect_analyze_slp_instance): Update use accordingly.
6562 * tree-vect-stmts.c (read_vector_array, write_vector_array)
6563 (vect_clobber_variable, vect_stmt_relevant_p, permute_vec_elements)
6564 (vect_use_strided_gather_scatters_p, vect_build_all_ones_mask)
6565 (vect_build_zero_merge_argument, vect_get_gather_scatter_ops)
6566 (vect_gen_widened_results_half, vect_get_loop_based_defs)
6567 (vect_create_vectorized_promotion_stmts, can_vectorize_live_stmts):
6568 Take a stmt_vec_info instead of a gimple stmt and pass stmt_vec_infos
6569 down to subroutines.
6571 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
6573 * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Change the type
6574 of the worklist from a vector of gimple stmts to a vector of
6576 * tree-vect-stmts.c (vect_mark_relevant, process_use)
6577 (vect_mark_stmts_to_be_vectorized): Likewise
6579 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
6581 * tree-vect-loop.c (vect_analyze_loop_operations): Look up the
6582 statement before passing it to vect_analyze_stmt.
6583 (vect_create_epilog_for_reduction): Use a stmt_vec_info to walk
6584 the chain of phi vector definitions. Track the exit phi via its
6586 (vectorizable_reduction): Set cond_stmt_vinfo directly from the
6587 STMT_VINFO_REDUC_DEF.
6588 * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Use
6589 stmt_vec_infos to handle the statement chains.
6590 (vect_get_slp_defs): Record the first statement in the node
6591 using a stmt_vec_info.
6592 * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Look up
6593 statements here and pass their stmt_vec_info down to subroutines.
6594 (vect_init_vector_1): Hoist call to vinfo_for_stmt and pass it
6595 down to vect_finish_stmt_generation.
6596 (vect_init_vector, vect_get_vec_defs, vect_finish_replace_stmt)
6597 (vect_finish_stmt_generation): Call vinfo_for_stmt and pass
6598 stmt_vec_infos to subroutines.
6599 (vect_remove_stores): Use stmt_vec_infos to handle the statement
6602 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
6604 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences):
6605 (vect_check_gather_scatter, vect_create_data_ref_ptr, bump_vector_ptr)
6606 (vect_permute_store_chain, vect_setup_realignment)
6607 (vect_permute_load_chain, vect_shift_permute_load_chain)
6608 (vect_transform_grouped_load): Use stmt_vec_info rather than gimple
6609 stmts internally, and when passing values to other vectorizer routines.
6610 * tree-vect-loop-manip.c (vect_can_advance_ivs_p): Likewise.
6611 * tree-vect-loop.c (vect_analyze_scalar_cycles_1)
6612 (vect_analyze_loop_operations, get_initial_def_for_reduction)
6613 (vect_create_epilog_for_reduction, vectorize_fold_left_reduction)
6614 (vectorizable_reduction, vectorizable_induction)
6615 (vectorizable_live_operation, vect_transform_loop_stmt)
6616 (vect_transform_loop): Likewise.
6617 * tree-vect-patterns.c (vect_reassociating_reduction_p)
6618 (vect_recog_widen_op_pattern, vect_recog_mixed_size_cond_pattern)
6619 (vect_recog_bool_pattern, vect_recog_gather_scatter_pattern): Likewise.
6620 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
6621 (vect_slp_analyze_node_operations_1): Likewise.
6622 * tree-vect-stmts.c (vect_mark_relevant, process_use)
6623 (exist_non_indexing_operands_for_use_p, vect_init_vector_1)
6624 (vect_mark_stmts_to_be_vectorized, vect_get_vec_def_for_operand)
6625 (vect_finish_stmt_generation_1, get_group_load_store_type)
6626 (get_load_store_type, vect_build_gather_load_calls)
6627 (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
6628 (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
6629 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
6630 (vectorizable_store, vectorizable_load, vectorizable_condition)
6631 (vectorizable_comparison, vect_analyze_stmt, vect_transform_stmt)
6632 (supportable_widening_operation): Likewise.
6633 (vect_get_vector_types_for_stmt): Likewise.
6634 * tree-vectorizer.h (vect_dr_behavior): Likewise.
6636 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
6638 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
6639 (vect_slp_analyze_node_dependences, vect_analyze_data_ref_accesses)
6640 (vect_permute_store_chain, vect_permute_load_chain)
6641 (vect_shift_permute_load_chain, vect_transform_grouped_load): Avoid
6642 repeated stmt_vec_info lookups.
6643 * tree-vect-loop-manip.c (vect_can_advance_ivs_p): Likewise.
6644 (vect_update_ivs_after_vectorizer): Likewise.
6645 * tree-vect-loop.c (vect_is_simple_reduction): Likewise.
6646 (vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
6647 * tree-vect-patterns.c (adjust_bool_stmts): Likewise.
6648 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
6649 (vect_bb_slp_scalar_cost): Likewise.
6650 * tree-vect-stmts.c (get_group_alias_ptr_type): Likewise.
6652 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
6654 * tree-vect-data-refs.c (vect_check_gather_scatter): Pass the
6655 gcall rather than the generic gimple stmt to gimple_call_internal_fn.
6656 (vect_get_smallest_scalar_type, can_group_stmts_p): Use dyn_cast
6657 to get gassigns and gcalls, rather than operating on generc gimple
6659 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p)
6660 (vect_mark_stmts_to_be_vectorized, vectorizable_store)
6661 (vectorizable_load, vect_analyze_stmt): Likewise.
6662 * tree-vect-loop.c (vectorizable_reduction): Likewise gphi.
6664 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
6666 * tree-vectorizer.h (get_earlier_stmt, get_later_stmt): Take and
6667 return stmt_vec_infos rather than gimple stmts. Do not accept
6669 (vect_find_last_scalar_stmt_in_slp): Return a stmt_vec_info instead
6671 * tree-vect-slp.c (vect_find_last_scalar_stmt_in_slp): Likewise.
6672 Update use of get_later_stmt.
6673 (vect_get_constant_vectors): Update call accordingly.
6674 (vect_schedule_slp_instance): Likewise
6675 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Likewise.
6676 (vect_slp_analyze_instance_dependence): Likewise.
6677 (vect_preserves_scalar_order_p): Update use of get_earlier_stmt.
6679 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
6681 * tree-vectorizer.h (stmt_info_for_cost::stmt): Replace with...
6682 (stmt_info_for_cost::stmt_info): ...this new field.
6683 (add_stmt_costs): Update accordingly.
6684 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
6685 (vect_get_known_peeling_cost): Likewise.
6686 (vect_estimate_min_profitable_iters): Likewise.
6687 * tree-vect-stmts.c (record_stmt_cost): Likewise.
6689 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
6691 * tree-vectorizer.h (_loop_vec_info::may_misalign_stmts): Change
6692 from an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
6693 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Update
6695 * tree-vect-loop-manip.c (vect_create_cond_for_align_checks): Likewise.
6697 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
6699 * tree-vectorizer.h (_stmt_vec_info::same_dr_stmt): Change from
6700 a gimple stmt to a stmt_vec_info.
6701 * tree-vect-stmts.c (vectorizable_load): Update accordingly.
6703 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
6705 * tree-vectorizer.h (vec_info::grouped_stores): Change from
6706 an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
6707 (_loop_vec_info::reduction_chains): Likewise.
6708 * tree-vect-loop.c (vect_fixup_scalar_cycles_with_patterns): Update
6710 * tree-vect-slp.c (vect_analyze_slp): Likewise.
6712 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
6714 * tree-vectorizer.h (_stmt_vec_info::first_element): Change from
6715 a gimple stmt to a stmt_vec_info.
6716 (_stmt_vec_info::next_element): Likewise.
6717 * tree-vect-data-refs.c (vect_update_misalignment_for_peel)
6718 (vect_slp_analyze_and_verify_node_alignment)
6719 (vect_analyze_group_access_1, vect_analyze_group_access)
6720 (vect_small_gap_p, vect_prune_runtime_alias_test_list)
6721 (vect_create_data_ref_ptr, vect_record_grouped_load_vectors)
6722 (vect_supportable_dr_alignment): Update accordingly.
6723 * tree-vect-loop.c (vect_fixup_reduc_chain): Likewise.
6724 (vect_fixup_scalar_cycles_with_patterns, vect_is_slp_reduction)
6725 (vect_is_simple_reduction, vectorizable_reduction): Likewise.
6726 * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
6727 * tree-vect-slp.c (vect_build_slp_tree_1)
6728 (vect_attempt_slp_rearrange_stmts, vect_supported_load_permutation_p)
6729 (vect_split_slp_store_group, vect_analyze_slp_instance)
6730 (vect_analyze_slp, vect_transform_slp_perm_load): Likewise.
6731 * tree-vect-stmts.c (vect_model_store_cost, vect_model_load_cost)
6732 (get_group_load_store_type, get_load_store_type)
6733 (get_group_alias_ptr_type, vectorizable_store, vectorizable_load)
6734 (vect_transform_stmt, vect_remove_stores): Likewise.
6736 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
6738 * tree-vectorizer.h (vect_dr_stmt): Return a stmt_vec_info rather
6740 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
6741 (vect_slp_analyze_data_ref_dependence, vect_record_base_alignments)
6742 (vect_calculate_target_alignmentm, vect_compute_data_ref_alignment)
6743 (vect_update_misalignment_for_peel, vect_verify_datarefs_alignment)
6744 (vector_alignment_reachable_p, vect_get_data_access_cost)
6745 (vect_get_peeling_costs_all_drs, vect_peeling_hash_get_lowest_cost)
6746 (vect_peeling_supportable, vect_enhance_data_refs_alignment)
6747 (vect_find_same_alignment_drs, vect_analyze_data_refs_alignment)
6748 (vect_analyze_group_access_1, vect_analyze_group_access)
6749 (vect_analyze_data_ref_access, vect_analyze_data_ref_accesses)
6750 (vect_vfa_access_size, vect_small_gap_p, vect_analyze_data_refs)
6751 (vect_supportable_dr_alignment): Remove vinfo_for_stmt from the
6752 result of vect_dr_stmt and use the stmt_vec_info instead of
6753 the associated gimple stmt.
6754 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
6755 (vect_gen_prolog_loop_niters): Likewise.
6756 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
6758 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
6760 * tree-vectorizer.h (_slp_tree::stmts): Change from a vec<gimple *>
6761 to a vec<stmt_vec_info>.
6762 * tree-vect-slp.c (vect_free_slp_tree): Update accordingly.
6763 (vect_create_new_slp_node): Take a vec<gimple *> instead of a
6765 (_slp_oprnd_info::def_stmts): Change from a vec<gimple *>
6766 to a vec<stmt_vec_info>.
6767 (bst_traits::value_type, bst_traits::value_type): Likewise.
6768 (bst_traits::hash): Update accordingly.
6769 (vect_get_and_check_slp_defs): Change the stmts parameter from
6770 a vec<gimple *> to a vec<stmt_vec_info>.
6771 (vect_two_operations_perm_ok_p, vect_build_slp_tree_1): Likewise.
6772 (vect_build_slp_tree): Likewise.
6773 (vect_build_slp_tree_2): Likewise. Update uses of
6774 SLP_TREE_SCALAR_STMTS.
6775 (vect_print_slp_tree): Update uses of SLP_TREE_SCALAR_STMTS.
6776 (vect_mark_slp_stmts, vect_mark_slp_stmts_relevant)
6777 (vect_slp_rearrange_stmts, vect_attempt_slp_rearrange_stmts)
6778 (vect_supported_load_permutation_p, vect_find_last_scalar_stmt_in_slp)
6779 (vect_detect_hybrid_slp_stmts, vect_slp_analyze_node_operations_1)
6780 (vect_slp_analyze_node_operations, vect_slp_analyze_operations)
6781 (vect_bb_slp_scalar_cost, vect_slp_analyze_bb_1)
6782 (vect_get_constant_vectors, vect_get_slp_defs)
6783 (vect_transform_slp_perm_load, vect_schedule_slp_instance)
6784 (vect_remove_slp_scalar_calls, vect_schedule_slp): Likewise.
6785 (vect_analyze_slp_instance): Build up a vec of stmt_vec_infos
6786 instead of gimple stmts.
6787 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Change
6788 the stores parameter for a vec<gimple *> to a vec<stmt_vec_info>.
6789 (vect_slp_analyze_instance_dependence): Update uses of
6790 SLP_TREE_SCALAR_STMTS.
6791 (vect_slp_analyze_and_verify_node_alignment): Likewise.
6792 (vect_slp_analyze_and_verify_instance_alignment): Likewise.
6793 * tree-vect-loop.c (neutral_op_for_slp_reduction): Likewise.
6794 (get_initial_defs_for_reduction): Likewise.
6795 (vect_create_epilog_for_reduction): Likewise.
6796 (vectorize_fold_left_reduction): Likewise.
6797 * tree-vect-stmts.c (vect_prologue_cost_for_slp_op): Likewise.
6798 (vect_model_simple_cost, vectorizable_shift, vectorizable_load)
6799 (can_vectorize_live_stmts): Likewise.
6801 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
6803 * tree-vectorizer.h (_loop_vec_info::reductions): Change from an
6804 auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
6805 (vect_force_simple_reduction): Take and return stmt_vec_infos rather
6807 * tree-parloops.c (valid_reduction_p): Take a stmt_vec_info instead
6809 (gather_scalar_reductions): Update after above interface changes.
6810 * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Likewise.
6811 (vect_is_simple_reduction): Take and return stmt_vec_infos rather
6813 (vect_force_simple_reduction): Likewise.
6814 * tree-vect-patterns.c (vect_pattern_recog_1): Update use of
6815 LOOP_VINFO_REDUCTIONS.
6816 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
6818 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
6820 * tree-vectorizer.h (_stmt_vec_info::reduc_def): Change from
6821 a gimple stmt to a stmt_vec_info.
6822 * tree-vect-loop.c (vect_active_double_reduction_p)
6823 (vect_force_simple_reduction, vectorizable_reduction): Update
6826 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
6828 * tree-vectorizer.h (_slp_tree::vec_stmts): Change from a
6829 vec<gimple *> to a vec<stmt_vec_info>.
6830 * tree-vect-loop.c (vect_create_epilog_for_reduction): Change
6831 the reduction_phis argument from a vec<gimple *> to a
6833 (vectorizable_reduction): Likewise the phis local variable that
6834 is passed to vect_create_epilog_for_reduction. Update for new type
6835 of SLP_TREE_VEC_STMTS.
6836 (vectorizable_induction): Update for new type of SLP_TREE_VEC_STMTS.
6837 (vectorizable_live_operation): Likewise.
6838 * tree-vect-slp.c (vect_get_slp_vect_defs): Likewise.
6839 (vect_transform_slp_perm_load, vect_schedule_slp_instance): Likewise.
6841 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
6843 * tree-vectorizer.h (_stmt_vec_info::vectorized_stmt): Change from
6844 a gimple stmt to a stmt_vec_info.
6845 (vectorizable_condition, vectorizable_live_operation)
6846 (vectorizable_reduction, vectorizable_induction): Pass back the
6847 vectorized statement as a stmt_vec_info.
6848 * tree-vect-data-refs.c (vect_record_grouped_load_vectors): Update
6849 use of STMT_VINFO_VEC_STMT.
6850 * tree-vect-loop.c (vect_create_epilog_for_reduction): Likewise,
6851 accumulating the inner phis that feed the STMT_VINFO_VEC_STMT
6852 as stmt_vec_infos rather than gimple stmts.
6853 (vectorize_fold_left_reduction): Change vec_stmt from a gimple stmt
6855 (vectorizable_live_operation): Likewise.
6856 (vectorizable_reduction, vectorizable_induction): Likewise,
6857 updating use of STMT_VINFO_VEC_STMT.
6858 * tree-vect-stmts.c (vect_get_vec_def_for_operand_1): Update use
6859 of STMT_VINFO_VEC_STMT.
6860 (vect_build_gather_load_calls, vectorizable_bswap, vectorizable_call)
6861 (vectorizable_simd_clone_call, vectorizable_conversion)
6862 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
6863 (vectorizable_store, vectorizable_load, vectorizable_condition)
6864 (vectorizable_comparison, can_vectorize_live_stmts): Change vec_stmt
6865 from a gimple stmt to a stmt_vec_info.
6866 (vect_transform_stmt): Update use of STMT_VINFO_VEC_STMT. Pass a
6867 pointer to a stmt_vec_info to the vectorizable_* routines.
6869 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
6871 * tree-vectorizer.h (_stmt_vec_info::related_stmt): Change from
6872 a gimple stmt to a stmt_vec_info.
6873 (is_pattern_stmt_p): Update accordingly.
6874 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Likewise.
6875 (vect_record_grouped_load_vectors): Likewise.
6876 * tree-vect-loop.c (vect_determine_vf_for_stmt): Likewise.
6877 (vect_fixup_reduc_chain, vect_update_vf_for_slp): Likewise.
6878 (vect_model_reduction_cost): Likewise.
6879 (vect_create_epilog_for_reduction): Likewise.
6880 (vectorizable_reduction, vectorizable_induction): Likewise.
6881 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
6882 Return the stmt_vec_info for the pattern statement.
6883 (vect_set_pattern_stmt): Update use of STMT_VINFO_RELATED_STMT.
6884 (vect_split_statement, vect_mark_pattern_stmts): Likewise.
6885 * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
6886 (vect_detect_hybrid_slp, vect_get_slp_defs): Likewise.
6887 * tree-vect-stmts.c (vect_mark_relevant): Likewise.
6888 (vect_get_vec_def_for_operand_1, vectorizable_call): Likewise.
6889 (vectorizable_simd_clone_call, vect_analyze_stmt, new_stmt_vec_info)
6890 (free_stmt_vec_info, vect_is_simple_use): Likewise.
6892 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
6894 * tree-vectorizer.h (vect_finish_replace_stmt): Return a stmt_vec_info
6895 (vect_finish_stmt_generation): Likewise.
6896 * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
6897 (vect_finish_replace_stmt, vect_finish_stmt_generation): Likewise.
6898 (vect_build_gather_load_calls): Use the return value of the above
6899 functions instead of a separate call to vinfo_for_stmt. Use narrow
6900 scopes for the input gimple stmt and wider scopes for the associated
6901 stmt_vec_info. Use vec_info::lookup_def when setting these
6902 stmt_vec_infos from an SSA_NAME definition.
6903 (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
6904 (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
6905 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
6906 (vectorizable_store, vectorizable_load, vectorizable_condition)
6907 (vectorizable_comparison): Likewise.
6908 * tree-vect-loop.c (vectorize_fold_left_reduction): Likewise.
6909 (vectorizable_reduction): Likewise.
6911 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
6913 * tree-vectorizer.h (vect_is_simple_use): Add an optional
6914 stmt_vec_info * parameter before the optional gimple **.
6915 * tree-vect-stmts.c (vect_is_simple_use): Likewise.
6916 (process_use, vect_get_vec_def_for_operand_1): Update callers.
6917 (vect_get_vec_def_for_operand, vectorizable_shift): Likewise.
6918 * tree-vect-loop.c (vectorizable_reduction): Likewise.
6919 (vectorizable_live_operation): Likewise.
6920 * tree-vect-patterns.c (type_conversion_p): Likewise.
6921 (vect_look_through_possible_promotion): Likewise.
6922 (vect_recog_rotate_pattern): Likewise.
6923 * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
6925 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
6927 * tree-vectorizer.h (stmt_vec_info): Temporarily change from
6928 a typedef to a wrapper class.
6929 (NULL_STMT_VEC_INFO): New macro.
6930 (vec_info::stmt_infos): Change to vec<stmt_vec_info>.
6931 (stmt_vec_info::operator*): New function.
6932 (stmt_vec_info::operator gimple *): Likewise.
6933 (set_vinfo_for_stmt): Use NULL_STMT_VEC_INFO.
6934 (add_stmt_costs): Likewise.
6935 * tree-vect-loop-manip.c (iv_phi_p): Likewise.
6936 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
6937 (vect_get_known_peeling_cost): Likewise.
6938 (vect_estimate_min_profitable_iters): Likewise.
6939 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
6940 * tree-vect-slp.c (vect_remove_slp_scalar_calls): Likewise.
6941 * tree-vect-stmts.c (vect_build_gather_load_calls): Likewise.
6942 (vectorizable_store, free_stmt_vec_infos): Likewise.
6943 (new_stmt_vec_info): Change return type of xcalloc to
6946 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
6948 * tree-vectorizer.h (vec_info::lookup_single_use): Declare.
6949 * tree-vectorizer.c (vec_info::lookup_single_use): New function.
6950 * tree-vect-loop.c (vectorizable_reduction): Use it instead of
6951 a single_imm_use-based sequence.
6952 * tree-vect-stmts.c (supportable_widening_operation): Likewise.
6954 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
6956 * tree-vectorizer.h (vec_info::lookup_def): Declare.
6957 * tree-vectorizer.c (vec_info::lookup_def): New function.
6958 * tree-vect-patterns.c (vect_get_internal_def): Use it.
6959 (vect_widened_op_tree): Likewise.
6960 * tree-vect-stmts.c (vect_is_simple_use): Likewise.
6961 * tree-vect-loop.c (vect_analyze_loop_operations): Likewise.
6962 (vectorizable_reduction): Likewise.
6963 (vect_valid_reduction_input_p): Take a stmt_vec_info instead
6965 (vect_is_slp_reduction): Update calls accordingly. Use
6966 vec_info::lookup_def.
6967 (vect_is_simple_reduction): Likewise
6968 * tree-vect-slp.c (vect_detect_hybrid_slp_1): Use vec_info::lookup_def.
6970 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
6972 * tree-vectorizer.h (vec_info::lookup_stmt): Declare.
6973 * tree-vectorizer.c (vec_info::lookup_stmt): New function.
6974 * tree-vect-loop.c (vect_determine_vf_for_stmt): Use it instead
6976 (vect_determine_vectorization_factor, vect_analyze_scalar_cycles_1)
6977 (vect_compute_single_scalar_iteration_cost, vect_analyze_loop_form)
6978 (vect_update_vf_for_slp, vect_analyze_loop_operations)
6979 (vect_is_slp_reduction, vectorizable_induction)
6980 (vect_transform_loop_stmt, vect_transform_loop): Likewise.
6981 * tree-vect-patterns.c (vect_init_pattern_stmt):
6982 (vect_determine_min_output_precision_1, vect_determine_precisions)
6983 (vect_pattern_recog): Likewise.
6984 * tree-vect-stmts.c (vect_analyze_stmt, vect_transform_stmt): Likewise.
6985 * config/powerpcspe/powerpcspe.c (rs6000_density_test): Likewise.
6986 * config/rs6000/rs6000.c (rs6000_density_test): Likewise.
6987 * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
6988 (vect_detect_hybrid_slp_1, vect_detect_hybrid_slp_2)
6989 (vect_detect_hybrid_slp): Likewise. Change the walk_stmt_info
6990 info field from a loop to a loop_vec_info.
6992 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
6994 * tree-vectorizer.h (stmt_vec_info): Move typedef earlier in file.
6995 (vec_info::add_stmt): Declare.
6996 * tree-vectorizer.c (vec_info::add_stmt): New function.
6997 * tree-vect-data-refs.c (vect_create_data_ref_ptr): Use it.
6998 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Likewise.
6999 (vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
7000 (vectorizable_induction): Likewise.
7001 * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Likewise.
7002 * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
7003 (vectorizable_simd_clone_call, vectorizable_store): Likewise.
7004 (vectorizable_load): Likewise.
7005 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
7006 (vect_recog_bool_pattern, vect_recog_mask_conversion_pattern)
7007 (vect_recog_gather_scatter_pattern): Likewise.
7008 (append_pattern_def_seq): Likewise. Remove a check that is
7009 performed by add_stmt itself.
7011 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
7013 * tree-vect-loop.c (vectorizable_reduction): Fix an instance in
7014 which make_ssa_name was called with new_stmt before new_stmt
7017 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
7019 * tree-vect-loop.c (vect_valid_reduction_input_p): New function,
7021 (vect_is_slp_reduction): ...here...
7022 (vect_is_simple_reduction): ...and here. Remove repetition of tests
7023 that are already known to be false.
7025 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
7027 * tree-vectorizer.h (vect_free_slp_instance): Add a final_p parameter.
7028 * tree-vect-slp.c (vect_free_slp_tree): Likewise. Don't update
7029 STMT_VINFO_NUM_SLP_USES when it's true.
7030 (vect_free_slp_instance): Add a final_p parameter and pass it to
7032 (vect_build_slp_tree_2): Update call to vect_free_slp_instance.
7033 (vect_analyze_slp_instance): Likewise.
7034 (vect_slp_analyze_operations): Likewise.
7035 (vect_slp_analyze_bb_1): Likewise.
7036 * tree-vectorizer.c (vec_info): Likewise.
7037 * tree-vect-loop.c (vect_transform_loop): Likewise.
7039 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
7041 * tree-vect-loop.c (vectorizable_reduction): Assert that the
7042 function is not called for second and subsequent members of
7045 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
7047 * tree-vect-loop.c (get_initial_def_for_reduction): Move special
7048 cases for nested loops from here to ...
7049 (vect_create_epilog_for_reduction): ...here. Only call
7050 vect_is_simple_use for inner-loop reductions.
7052 2018-07-31 Martin Liska <mliska@suse.cz>
7054 PR gcov-profile/85338
7055 PR gcov-profile/85350
7056 PR gcov-profile/85372
7057 * profile.c (struct location_triplet): New.
7058 (struct location_triplet_hash): Likewise.
7059 (output_location): Do not output a BB that
7060 is already recorded for a line.
7061 (branch_prob): Use streamed_locations.
7063 2018-07-31 Martin Liska <mliska@suse.cz>
7065 PR gcov-profile/85370
7066 * coverage.c (coverage_begin_function): Do not mark target
7067 clones as artificial functions.
7069 2018-07-31 Martin Liska <mliska@suse.cz>
7071 PR gcov-profile/83813
7072 PR gcov-profile/84758
7073 PR gcov-profile/85217
7074 PR gcov-profile/85332
7075 * profile.c (branch_prob): Do not record GOTO expressions
7076 for GIMPLE statements which locations are already streamed.
7078 2018-07-31 Olivier Hainque <hainque@adacore.com>
7080 * gcc.c (handle_spec_function): Accept a soft_matched_part
7081 argument, as do_spec_1. Pass it down to ...
7082 (eval_spec_function): Accept a soft_matched_part argument,
7083 and pass it down to ...
7084 (do_spec_2): Accept a soft_matched_part argument, and pass
7085 it down to do_spec_1.
7086 (do_spec_1): Pass soft_matched_part to handle_spec_function.
7087 (handle_braces): Update call to handle_spec_function.
7088 (driver::set_up_specs): Update calls to do_spec_2.
7089 (compare_debug_dump_opt_spec_function): Likewise.
7090 (compare_debug_self_opt_spec_function): Likewise.
7092 2018-07-31 Olivier Hainque <hainque@adacore.com>
7094 * common.opt (nolibc): New option.
7095 * doc/invoke.texi (Link Options): Document it.
7096 * gcc.c (LINK_GCC_C_SEQUENCE_SPEC): Honor nolibc.
7097 * config/alpha/linux.h: Likewise.
7098 * config/arc/elf.h: Likewise.
7099 * config/arm/uclinux-elf.h: Likewise.
7100 * config/arm/unknown-elf.h: Likewise.
7101 * config/avr/avrlibc.h: Likewise.
7102 * config/bfin/bfin.h: Likewise.
7103 * config/bfin/linux.h: Likewise.
7104 * config/bfin/uclinux.h: Likewise.
7105 * config/darwin.h: Likewise.
7106 * config/darwin10.h: Likewise.
7107 * config/darwin12.h: Likewise.
7108 * config/gnu-user.h: Likewise.
7109 * config/lm32/uclinux-elf.h: Likewise.
7110 * config/pa/pa-hpux11.h: Likewise.
7111 * config/pa/pa64-hpux.h: Likewise.
7112 * config/sparc/sparc.h: Likewise.
7114 2018-07-31 Olivier Hainque <hainque@adacore.com>
7116 * gcc.c (getenv_spec_function): Prepend '/' to value for allowed
7117 undefined variables.
7119 2018-07-30 Segher Boessenkool <segher@kernel.crashing.org>
7122 * config/arm/arm.c (arm_block_set_aligned_vect): Use gen_int_mode
7125 2018-07-30 Bernd Edlinger <bernd.edlinger@hotmail.de>
7127 * tree-ssa-forwprop.c (simplify_builtin_call): Don't create a not NUL
7128 terminated string literal.
7130 2018-07-30 Segher Boessenkool <segher@kernel.crashing.org>
7132 PR rtl-optimization/85160
7133 * combine.c (is_just_move): New function.
7134 (try_combine): Allow combining two instructions into two if neither of
7135 the original instructions was a move.
7137 2018-07-30 Alexander Monakov <amonakov@ispras.ru>
7140 * doc/extend.texi (Global Register Variables): Discourage use of type
7142 (Local Register Variables): Likewise.
7144 2018-07-30 Richard Sandiford <richard.sandiford@arm.com>
7146 PR tree-optimization/86506
7147 * hwint.h (ceil_log2): Resync with hwint.c implementation.
7149 2018-07-30 Ilya Leoshkevich <iii@linux.ibm.com>
7152 * lra-constraints.c (spill_hard_reg_in_range): When selecting the
7153 hard_regno, make sure no insn between `from` and `to` clobbers it.
7155 2018-07-30 Cesar Philippidis <cesar@codesourcery.com>
7156 Tom de Vries <tdevries@suse.de>
7158 * config/nvptx/nvptx.c (PTX_GANG_DEFAULT): Rename to ...
7159 (PTX_DEFAULT_RUNTIME_DIM): ... this.
7160 (nvptx_goacc_validate_dims): Set default worker and gang dims to
7161 PTX_DEFAULT_RUNTIME_DIM.
7162 (nvptx_dim_limit): Ignore GOMP_DIM_WORKER.
7164 2018-07-29 John David Anglin <danglin@gcc.gnu.org>
7166 * config/pa/pa.c (pa_output_addr_vec): Align address table.
7167 * config/pa/pa.h (JUMP_TABLES_IN_TEXT_SECTION): Revise comment.
7168 * config/pa/pa32-linux.h (JUMP_TABLES_IN_TEXT_SECTION): Define.
7170 2018-07-27 Michael Meissner <meissner@linux.ibm.com>
7172 * config/rs6000/constraints.md (wG constraint): Delete, no longer
7174 * config/rs6000/predicates.md (p9_fusion_reg_operand): Rename
7175 predicate to reflect toc fusion has been deleted.
7176 (toc_fusion_mem_raw): Delete, no longer used.
7177 (toc_fusion_mem_wrapped): Likewise.
7178 * config/rs6000/rs6000-cpus.def (POWERPC_MASKS): Delete toc
7180 * config/rs6000/rs6000-protos.h (fusion_wrap_memory_address):
7181 Delete, no longer used.
7182 * config/rs6000/rs6000.c (struct rs6000_reg_addr): Delete fields
7183 meant to be used for toc fusion.
7184 (rs6000_debug_print_mode): Delete toc fusion debugging.
7185 (rs6000_debug_reg_global): Likewise.
7186 (rs6000_init_hard_regno_mode_ok): Delete setting up fields for toc
7187 fusion and secondary reload support that were never used.
7188 (rs6000_option_override_internal): Delete TOC fusion, that was only
7189 partially defined, and it did not work unless you also used the
7191 (rs6000_legitimate_address_p): Delete TOC fusion support.
7192 (rs6000_opt_masks): Likewise.
7193 (fusion_wrap_memory_address): Delete function, no longer used.
7194 (fusion_split_address); Delete TOC fusion support.
7195 * config/rs6000/rs6000.h (TARGET_TOC_FUSION_INT): Delete, no
7196 longer used with toc fusion being deleted.
7197 (TARGET_TOC_FUSION_FP): Likewise.
7198 * config/rs6000/rs6000.md (UNSPEC_FUSION_ADDIS): Delete TOC fusion
7200 (toc fusion spliter): Delete TOC fusion support.
7201 (toc_fusionload_<mode>): Likewise.
7202 (toc_fusionload_di): Likewise.
7203 (fusion_gpr_load_<mode>): Delete generator function, this insn no
7204 longer needs to be named. Rename predicate to delete TOC fusion.
7205 (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
7206 (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
7207 (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
7208 (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
7209 (p9 fusion peephole2s): Rename predicate to delete TOC fusion.
7211 2018-07-27 Kelvin Nilsen <kelvin@gcc.gnu.org>
7213 * doc/extend.texi (Basic PowerPC Built-in Functions Available on
7214 ISA 2.05): Replace __uint128_t with __uint128 and __int128_t with
7215 __int128 in built-in function prototypes.
7216 (PowerPC AltiVec Built-in Functions on ISA 2.07): Likewise.
7217 (PowerPC AltiVec Built-in Functions on ISA 3.0): Likewise.
7219 2018-07-27 Martin Sebor <msebor@redhat.com>
7221 PR tree-optimization/86696
7222 * tree-ssa-strlen.c (get_min_string_length): Handle all integer
7223 types, including enums.
7224 (handle_char_store): Be prepared for the above function to fail.
7226 2018-07-26 Qing Zhao <qing.zhao@oracle.com>
7228 * builtins.c (inline_expand_builtin_string_cmp): Disable inlining
7229 when optimization level is lower than 2 or optimize for size.
7231 2018-07-26 Martin Sebor <msebor@redhat.com>
7233 PR tree-optimization/86043
7234 PR tree-optimization/86042
7235 * tree-ssa-strlen.c (handle_builtin_memcpy): Handle strict overlaps.
7236 (get_string_cst_length): Rename...
7237 (get_min_string_length): ...to this. Add argument.
7238 (handle_char_store): Extend to handle multi-character stores by
7240 * tree.c (initializer_zerop): Use new argument. Handle MEM_REF.
7241 * tree.h (initializer_zerop): Add argument.
7243 2018-07-26 Jakub Jelinek <jakub@redhat.com>
7246 * omp-low.c (scan_sharing_clauses): Don't ignore map clauses for
7247 declare target to variables if they have always,{to,from,tofrom} map
7250 2018-07-26 Martin Liska <mliska@suse.cz>
7253 * lto-wrapper.c: Add linker_output as prefix
7254 for ltrans_output_file.
7256 2018-07-26 Segher Boessenkool <segher@kernel.crashing.org>
7258 PR rtl-optimization/85805
7259 * combine.c (reg_nonzero_bits_for_combine): Only use the last set
7260 value for hard registers if that was written in the same mode.
7262 2018-07-26 Martin Liska <mliska@suse.cz>
7264 PR gcov-profile/86536
7265 * gcov.c (format_gcov): Use printf format %.*f directly
7266 and do not handle special values.
7268 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
7270 * common/config/arc/arc-common.c (arc_option_optimization_table):
7271 Update default optimizations for size.
7273 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
7275 * config/arc/arc.md (movsf_insn): Add short instruction selection.
7276 * config/arc/constraints.md (CfZ): New constraint.
7277 * config/arc/fpu.md (addssf3_fpu): Use CfZ constraint.
7278 (subsf3_fpu): Likewise.
7279 (cmpsf_fpu): Likewise.
7280 (cmpsf_fpu_uneq): Likewise.
7282 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
7284 * config/arc/arc.c (compact_memory_operand_p): Check for uncached
7286 (arc_is_uncached_mem_p): uncached applies to both the variable and
7289 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
7291 * config/arc/arc.h (ADDITIONAL_REGISTER_NAMES): Add additional
7294 2018-07-25 David Malcolm <dmalcolm@redhat.com>
7296 * optinfo-emit-json.cc (class optrecord_json_writer): Convert
7297 field "m_scopes" from vec to auto_vec.
7299 2018-07-25 Martin Liska <mliska@suse.cz>
7301 * config/powerpcspe/powerpcspe-protos.h (rs6000_loop_align): Fix
7304 2018-07-25 Richard Biener <rguenther@suse.de>
7307 * dwarf2out.c (dwarf2out_decl): Do not handle nested functions
7308 special wrt context_die late.
7309 (gen_subprogram_die): Re-use DIEs in local scope.
7311 2018-07-25 Richard Sandiford <richard.sandiford@arm.com>
7313 PR tree-optimization/86644
7314 * hwint.c (ceil_log2): Fix comment. Return 0 for 0.
7316 2018-07-25 Martin Liska <mliska@suse.cz>
7319 * dumpfile.c: And excluded values with TDF_ALL_VALUES.
7320 * dumpfile.h (enum dump_flag): Defince TDF_ALL_VALUES.
7322 2018-07-25 Martin Liska <mliska@suse.cz>
7325 * params.def: Explain ASan abbreviation and provide
7326 a documentation link.
7328 2018-07-24 Martin Sebor <msebor@redhat.com>
7330 PR tree-optimization/86622
7331 PR tree-optimization/86532
7332 * builtins.h (string_length): Declare.
7333 * builtins.c (c_strlen): Correct handling of non-constant offsets.
7334 (check_access): Be prepared for non-constant length ranges.
7335 (string_length): Make extern.
7336 * expr.c (string_constant): Only handle the minor non-constant
7337 array index. Use string_constant to compute the length of
7338 a generic string constant.
7340 2018-07-24 Richard Sandiford <richard.sandiford@arm.com>
7342 PR tree-optimization/86618
7343 * tree-vect-stmts.c (vectorizable_call): Don't take the address
7344 of LOOP_VINFO_MASKS (loop_vinfo) when loop_vinfo is null.
7346 2018-07-24 David Malcolm <dmalcolm@redhat.com>
7348 PR tree-optimization/86636
7349 * json.cc (json::object::set): Fix comment. Add assertions.
7350 (json::array::append): Move here from json.h. Add comment and an
7352 (json::string::string): Likewise.
7353 * json.h (json::array::append): Move to json.cc.
7354 (json::string::string): Likewise.
7355 * optinfo-emit-json.cc
7356 (optrecord_json_writer::impl_location_to_json): Assert that we
7357 aren't attempting to write out UNKNOWN_LOCATION, or an ad-hoc
7358 wrapper around it. Expand the location once, rather than three
7360 (optrecord_json_writer::inlining_chain_to_json): Fix the check for
7361 UNKNOWN_LOCATION, to use LOCATION_LOCUS to look through ad-hoc
7363 (optrecord_json_writer::optinfo_to_json): Likewise, in four
7364 places. Fix some overlong lines.
7366 2018-07-24 Matthew Malcomson <matthew.malcomson@arm.com>
7368 * config/aarch64/aarch64-simd.md
7369 (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>): Split into...
7370 (aarch64_<ANY_EXTEND:su>subw<mode>): ... This...
7371 (aarch64_<ANY_EXTEND:su>addw<mode>): ... And this.
7372 (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>_internal): Split into...
7373 (aarch64_<ANY_EXTEND:su>subw<mode>_internal): ... This...
7374 (aarch64_<ANY_EXTEND:su>addw<mode>_internal): ... And this.
7375 (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w2<mode>_internal): Split into...
7376 (aarch64_<ANY_EXTEND:su>subw2<mode>_internal): ... This...
7377 (aarch64_<ANY_EXTEND:su>addw2<mode>_internal): ... And this.
7379 2018-07-24 Jakub Jelinek <jakub@redhat.com>
7382 * expmed.c (expand_divmod): Punt if d == HOST_WIDE_INT_MIN
7383 and size > HOST_BITS_PER_WIDE_INT. For size > HOST_BITS_PER_WIDE_INT
7384 and abs_d == d, do the power of two handling if profitable.
7386 2018-07-24 Richard Biener <rguenther@suse.de>
7388 * match.pd: Add BIT_FIELD_REF canonicalizations.
7390 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
7393 * genmatch.c (dt_operand::gen_match_op): Avoid folding volatile values.
7395 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
7397 * gimple-fold.c (gimple_fold_builtin_printf): Don't create a not NUL
7398 terminated STRING_CST object.
7400 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
7402 hsa-dump.c (dump_hsa_symbol): Avoid out of scope access to buf.
7404 2018-07-23 Segher Boessenkool <segher@kernel.crashing.org>
7406 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Adjust.
7407 * config/rs6000/rs6000-protos.h (rs6000_split_v4si_init): Delete.
7408 * config/rs6000/rs6000.c (rs6000_expand_vector_init): Always force
7409 the elements into a register.
7410 (rs6000_split_v4si_init_di_reg): Delete.
7411 (rs6000_split_v4si_init): Delete.
7412 * config/rs6000/vsx.md (unspec): Delete UNSPEC_VSX_VEC_INIT.
7413 (vsx_init_v4si): Rewrite as a define_expand.
7415 2018-07-23 Segher Boessenkool <segher@kernel.crashing.org>
7417 * config/rs6000/rs6000.md (splitters for rldimi and rlwimi with the
7418 zero_extend argument from memory): New.
7420 2018-07-22 Martin Sebor <msebor@redhat.com>
7423 * gimple-ssa-warn-alloca.c (alloca_call_type_by_arg): Avoid
7424 diagnosing calls with unknown arguments unless -Walloca-larger-than
7425 is restricted to less than PTRDIFF_MAX bytes.
7427 2018-07-22 Gerald Pfeifer <gerald@pfeifer.com>
7429 * doc/gcov.texi (Invoking Gcov): Editorial changes.
7431 2018-07-20 David Malcolm <dmalcolm@redhat.com>
7433 * pretty-print.c (text_info::set_location): Remove redundant
7434 "line_table" parameter from call to rich_location::set_range.
7436 2018-07-20 Martin Sebor <msebor@redhat.com>
7439 * builtins.c (expand_builtin_alloca): Adjust.
7440 * calls.c (alloc_max_size): Simplify.
7441 * cgraphunit.c (cgraph_node::expand): Adjust.
7442 * common.opt (larger_than_size, warn_frame_larger_than): Remove
7444 (frame_larger_than_size): Same.
7445 (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Change options
7446 to take a HOST_WIDE_INT argument and accept a byte-size suffix.
7448 * doc/invoke.texi (GCC Command Options): Document option arguments.
7449 Explain byte-size arguments and suffixes.
7450 (-Wvla-larger-than, -Wno-alloc-size-larger-than): Update.
7451 (-Wno-alloca-larger-than, -Wno-vla-larger-than): Same.
7452 (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Same.
7453 * doc/options.texi (UInteger): Expand.
7454 (Host_Wide_Int, ByteSize): Document new properties.
7455 * final.c (final_start_function_1): Include sizes in an error message.
7456 * function.c (frame_offset_overflow): Same.
7457 * gimple-ssa-warn-alloca.c (pass_walloca::gate): Adjust.
7458 (alloca_call_type_by_arg): Change function argument to HOST_WIDE_INT.
7459 Diagnose unbounded alloca calls only for limits of less than
7461 (alloca_call_type): Adjust. Diagnose possibly out-of-bounds alloca
7462 calls and VLA size only for limits of less than PTRDIFF_MAX. Same
7464 (pass_walloca::execute): Adjust. Diagnose alloca calls in loops
7465 only for limits of less than PTRDIFF_MAX.
7466 * langhooks-def.h (lhd_handle_option): Change function argument
7468 * langhooks.c (lhd_handle_option): Same.
7469 * langhooks.h (handle_option): Same.
7470 * opt-functions.awk (switch_bit_fields): Handle Host_Wide_Int and
7472 (var_type, var_type_struct): Same.
7473 (var_set): Handle ByteSize flag.
7474 * optc-gen.awk: Add comments to output to ease debugging. Make
7475 use of HOST_WIDE_INT where appropriate.
7476 * opts-gen-save.awk: Use %lx to format unsigned long.
7477 * opth-gen.awk: Change function argument to HOST_WIDE_INT.
7478 * opts-common.c (integral_argument): Return HOST_WIDE_INT and add
7479 arguments. Parse bytes-size suffixes.
7480 (enum_arg_to_value): Change function argument to HOST_WIDE_INT.
7481 (enum_value_to_arg): Same.
7482 (decode_cmdline_option): Handle cl_host_wide_int. Adjust.
7483 (handle_option): Adjust.
7484 (generate_option): Change function argument to HOST_WIDE_INT.
7485 (cmdline_handle_error): Adjust.
7486 (read_cmdline_option): Change function argument to HOST_WIDE_INT.
7487 (set_option): Change function argument to HOST_WIDE_INT.
7488 (option_enabled): Handle cl_host_wide_int.
7489 (get_option_state): Handle CLVC_SIZE.
7490 (control_warning_option): Same.
7491 * opts.c (common_handle_option): Change function argument to
7492 HOST_WIDE_INT. Remove handling of OPT_Walloca_larger_than_ and
7493 OPT_Wvla_larger_than_.
7494 * opts.h (enum cl_var_type): Add an enumerator.
7495 * stor-layout.c (layout_decl): Print a more meaningful warning.
7496 * toplev.c (output_stack_usage): Adjust.
7498 2018-07-20 Qing Zhao <qing.zhao@oracle.com>
7500 * builtins.c (expand_builtin_memcmp): Delete the last parameter for
7501 call to inline_expand_builtin_string_cmp.
7502 (expand_builtin_strcmp): Likewise.
7503 (expand_builtin_strncmp): Likewise.
7504 (inline_string_cmp): Delete the last parameter, change char_type_node
7505 to unsigned_char_type_node for strcmp/strncmp, add conversions to the
7507 (inline_expand_builtin_string_cmp): Delete the last parameter, give up
7508 the inlining expansion on target where the type of the call has same or
7509 narrower precision than unsigned char.
7511 2018-07-20 David Malcolm <dmalcolm@redhat.com>
7513 * Makefile.in (OBJS): Add json.o and optinfo-emit-json.o.
7514 (CFLAGS-optinfo-emit-json.o): Define TARGET_NAME.
7515 * common.opt (fsave-optimization-record): New option.
7516 * coretypes.h (struct kv_pair): Move here from dumpfile.c.
7517 * doc/invoke.texi (-fsave-optimization-record): New option.
7518 * dumpfile.c: Include "optinfo-emit-json.h".
7519 (struct kv_pair): Move to coretypes.h.
7520 (optgroup_options): Make non-static.
7521 (dump_context::end_scope): Call
7522 optimization_records_maybe_pop_dump_scope.
7523 * dumpfile.h (optgroup_options): New decl.
7524 * json.cc: New file.
7526 * optinfo-emit-json.cc: New file.
7527 * optinfo-emit-json.h: New file.
7528 * optinfo.cc: Include "optinfo-emit-json.h".
7529 (optinfo::emit): Call optimization_records_maybe_record_optinfo.
7530 (optinfo_enabled_p): Check optimization_records_enabled_p.
7531 (optinfo_wants_inlining_info_p): Likewise.
7532 * optinfo.h: Update comment.
7533 * profile-count.c (profile_quality_as_string): New function.
7534 * profile-count.h (profile_quality_as_string): New decl.
7535 (profile_count::quality): New accessor.
7536 * selftest-run-tests.c (selftest::run_tests): Call json_cc_tests
7537 and optinfo_emit_json_cc_tests.
7538 * selftest.h (selftest::json_cc_tests): New decl.
7539 (selftest::optinfo_emit_json_cc_tests): New decl.
7540 * toplev.c: Include "optinfo-emit-json.h".
7541 (compile_file): Call optimization_records_finish.
7542 (do_compile): Call optimization_records_start.
7543 * tree-ssa-live.c: Include optinfo.h.
7544 (remove_unused_scope_block_p): Retain inlining information if
7545 optinfo_wants_inlining_info_p returns true.
7547 2018-07-20 Richard Biener <rguenther@suse.de>
7550 * dwarf2out.c (dwarf2out_die_ref_for_decl): Test in_lto_p
7551 to cover -flto-partition=none.
7553 2018-07-20 Martin Liska <mliska@suse.cz>
7555 * tree.h (DECL_LOCATION_RANGE): Remove unused macro.
7556 (get_decl_source_range): Remove unused function.
7558 2018-07-20 Richard Biener <rguenther@suse.de>
7560 * tree-ssa-sccvn.h (struct vn_nary_op_s): Add next member.
7561 (struct vn_phi_s): Likewise.
7562 (struct vn_reference_s): Likewise.
7563 * tree-ssa-sccvn.c (vn_nary_op_hasher::equal): Add shortcut
7564 for searching the slot of an entry known to be in the hash itself.
7565 (vn_phi_hasher::equal): Likewise.
7566 (vn_reference_hasher::equal): Likewise.
7567 (last_inserted_ref, last_inserted_phi, last_inserted_nary): New
7569 (optimistic_info, current_info): Remove, keeping only valid_info.
7570 (vn_reference_lookup_1): Remove fallback lookup.
7571 (vn_reference_lookup_2): Likewise.
7572 (vn_nary_op_lookup_1): Likewise.
7573 (vn_phi_lookup): Likewise.
7574 (vn_nary_build_or_lookup_1): Make sure to not chain the built
7576 (vn_reference_insert): Adjust, chain the inserted hash element
7577 at last_inserted_ref.
7578 (vn_reference_insert_pieces): Likewise.
7579 (visit_reference_op_call): Likewise.
7580 (vn_nary_op_insert_into): Chain the inserted hash element at
7582 (vn_nary_op_insert_pieces): Adjust.
7583 (vn_nary_op_insert): Likewise.
7584 (vn_nary_op_insert_stmt): Likewise.
7585 (vn_phi_insert): Adjust, chain the inserted hash element at
7587 (process_scc): Remove clearing and copying the optimistic
7588 table. Instead remove elements inserted during an optimistic
7589 iteration from the single table we maintain.
7590 (init_scc_vn): Adjust.
7591 (free_scc_vn): Likewise.
7592 (sccvn_dom_walker::record_cond): Likewise.
7593 (sccvn_dom_walker::after_dom_children): Likewise.
7595 2018-07-19 Martin Sebor <msebor@redhat.com>
7597 PR tree-optimization/84047
7598 PR tree-optimization/83776
7599 * tree-vrp.c (vrp_prop::check_mem_ref): New function.
7600 (check_array_bounds): Call it.
7602 2018-07-19 Martin Sebor <msebor@redhat.com>
7604 * align.h (align_flags): Use member initialization.
7606 2018-07-19 David Malcolm <dmalcolm@redhat.com>
7608 * Makefile.in (OBJS): Add optinfo.o.
7609 * coretypes.h (class symtab_node): New forward decl.
7610 (struct cgraph_node): New forward decl.
7611 (class varpool_node): New forward decl.
7612 * dump-context.h: New file.
7613 * dumpfile.c: Include "optinfo.h", "dump-context.h", "cgraph.h",
7615 (refresh_dumps_are_enabled): Use optinfo_enabled_p.
7616 (set_dump_file): Call dumpfile_ensure_any_optinfo_are_flushed.
7617 (set_alt_dump_file): Likewise.
7618 (dump_context::~dump_context): New dtor.
7619 (dump_gimple_stmt): Move implementation to...
7620 (dump_context::dump_gimple_stmt): ...this new member function.
7621 Add the stmt to any pending optinfo, creating one if need be.
7622 (dump_gimple_stmt_loc): Move implementation to...
7623 (dump_context::dump_gimple_stmt_loc): ...this new member function.
7624 Start a new optinfo and add the stmt to it.
7625 (dump_gimple_expr): Move implementation to...
7626 (dump_context::dump_gimple_expr): ...this new member function.
7627 Add the stmt to any pending optinfo, creating one if need be.
7628 (dump_gimple_expr_loc): Move implementation to...
7629 (dump_context::dump_gimple_expr_loc): ...this new member function.
7630 Start a new optinfo and add the stmt to it.
7631 (dump_generic_expr): Move implementation to...
7632 (dump_context::dump_generic_expr): ...this new member function.
7633 Add the tree to any pending optinfo, creating one if need be.
7634 (dump_generic_expr_loc): Move implementation to...
7635 (dump_context::dump_generic_expr_loc): ...this new member
7636 function. Add the tree to any pending optinfo, creating one if
7638 (dump_printf): Move implementation to...
7639 (dump_context::dump_printf_va): ...this new member function. Add
7640 the text to any pending optinfo, creating one if need be.
7641 (dump_printf_loc): Move implementation to...
7642 (dump_context::dump_printf_loc_va): ...this new member function.
7643 Start a new optinfo and add the stmt to it.
7644 (dump_dec): Move implementation to...
7645 (dump_context::dump_dec): ...this new member function. Add the
7646 value to any pending optinfo, creating one if need be.
7647 (dump_context::dump_symtab_node): New member function.
7648 (dump_context::get_scope_depth): New member function.
7649 (dump_context::begin_scope): New member function.
7650 (dump_context::end_scope): New member function.
7651 (dump_context::ensure_pending_optinfo): New member function.
7652 (dump_context::begin_next_optinfo): New member function.
7653 (dump_context::end_any_optinfo): New member function.
7654 (dump_context::s_current): New global.
7655 (dump_context::s_default): New global.
7656 (dump_scope_depth): Delete global.
7657 (dumpfile_ensure_any_optinfo_are_flushed): New function.
7658 (dump_symtab_node): New function.
7659 (get_dump_scope_depth): Reimplement in terms of dump_context.
7660 (dump_begin_scope): Likewise.
7661 (dump_end_scope): Likewise.
7662 (selftest::temp_dump_context::temp_dump_context): New ctor.
7663 (selftest::temp_dump_context::~temp_dump_context): New dtor.
7664 (selftest::verify_item): New function.
7665 (ASSERT_IS_TEXT): New macro.
7666 (ASSERT_IS_TREE): New macro.
7667 (ASSERT_IS_GIMPLE): New macro.
7668 (selftest::test_capture_of_dump_calls): New test.
7669 (selftest::dumpfile_c_tests): Call it.
7670 * dumpfile.h (dump_printf, dump_printf_loc, dump_basic_block)
7671 (dump_generic_expr_loc, dump_generic_expr, dump_gimple_stmt_loc)
7672 (dump_gimple_stmt, dump_dec): Gather these related decls and add a
7673 descriptive comment.
7674 (dump_function, print_combine_total_stats, enable_rtl_dump_file)
7675 (dump_node, dump_bb): Move these unrelated decls.
7676 (class dump_manager): Add leading comment.
7677 * optinfo.cc: New file.
7678 * optinfo.h: New file.
7680 2018-07-19 Michael Collison <michael.collison@arm.com>
7681 Richard Henderson <rth@redhat.com>
7683 * config/aarch64/aarch64.md (subv<GPI>4, usubv<GPI>4): New patterns.
7684 (subti): Handle op1 zero.
7685 (subvti4, usub4ti4): New.
7686 (*sub<GPI>3_compare1_imm): New.
7687 (sub<GPI>3_carryinCV): New.
7688 (*sub<GPI>3_carryinCV_z1_z2, *sub<GPI>3_carryinCV_z1): New.
7689 (*sub<GPI>3_carryinCV_z2, *sub<GPI>3_carryinCV): New.
7691 2018-07-19 Michael Collison <michael.collison@arm.com>
7692 Richard Henderson <rth@redhat.com>
7694 * config/aarch64/aarch64.md: (addv<GPI>4, uaddv<GPI>4): New.
7695 (addti3): Create simpler code if low part is already known to be 0.
7696 (addvti4, uaddvti4): New.
7697 (*add<GPI>3_compareC_cconly_imm): New.
7698 (*add<GPI>3_compareC_cconly): New.
7699 (*add<GPI>3_compareC_imm): New.
7700 (*add<GPI>3_compareC): Rename from add<GPI>3_compare1; do not
7701 handle constants within this pattern..
7702 (*add<GPI>3_compareV_cconly_imm): New.
7703 (*add<GPI>3_compareV_cconly): New.
7704 (*add<GPI>3_compareV_imm): New.
7705 (add<GPI>3_compareV): New.
7706 (add<GPI>3_carryinC, add<GPI>3_carryinV): New.
7707 (*add<GPI>3_carryinC_zero, *add<GPI>3_carryinV_zero): New.
7708 (*add<GPI>3_carryinC, *add<GPI>3_carryinV): New.
7709 ((*add<GPI>3_compareC_cconly_imm): Replace 'ne' operator
7710 with 'comparison' operator.
7711 (*add<GPI>3_compareV_cconly_imm): Ditto.
7712 (*add<GPI>3_compareV_cconly): Ditto.
7713 (*add<GPI>3_compareV_imm): Ditto.
7714 (add<GPI>3_compareV): Ditto.
7715 (add<mode>3_carryinC): Ditto.
7716 (*add<mode>3_carryinC_zero): Ditto.
7717 (*add<mode>3_carryinC): Ditto.
7718 (add<mode>3_carryinV): Ditto.
7719 (*add<mode>3_carryinV_zero): Ditto.
7720 (*add<mode>3_carryinV): Ditto.
7722 2018-07-19 Michael Collison <michael.collison@arm.com>
7723 Richard Henderson <rth@redhat.com>
7725 * config/aarch64/aarch64-modes.def (CC_V): New.
7726 * config/aarch64/aarch64-protos.h
7727 (aarch64_addti_scratch_regs): Declare
7728 (aarch64_subvti_scratch_regs): Declare.
7729 (aarch64_expand_subvti): Declare.
7730 (aarch64_gen_unlikely_cbranch): Declare
7731 * config/aarch64/aarch64.c (aarch64_select_cc_mode): Test
7732 for signed overflow using CC_Vmode.
7733 (aarch64_get_condition_code_1): Handle CC_Vmode.
7734 (aarch64_gen_unlikely_cbranch): New function.
7735 (aarch64_addti_scratch_regs): New function.
7736 (aarch64_subvti_scratch_regs): New function.
7737 (aarch64_expand_subvti): New function.
7739 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
7741 * config/aarch64/aarch64-option-extensions.def: New entry for profile
7743 * config/aarch64/aarch64.h (AARCH64_FL_PROFILE): New.
7744 * doc/invoke.texi (aarch64-feature-modifiers): New entry for profile
7747 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
7750 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
7751 address check not strict.
7753 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
7755 * config/aarch64/aarch64-simd.md (aarch64_simd_mov<VQ:mode>): Replace
7757 (store_pair_lanes<mode>): Likewise.
7758 * config/aarch64/aarch64-protos.h (aarch64_addr_query_type): Add new
7759 enum value 'ADDR_QUERY_LDP_STP_N'.
7760 * config/aarch64/aarch64.c (aarch64_addr_query_type): Likewise.
7761 (aarch64_print_address_internal): Add declaration.
7762 (aarch64_print_ldpstp_address): Remove.
7763 (aarch64_classify_address): Adapt mode for 'ADDR_QUERY_LDP_STP_N'.
7764 (aarch64_print_operand): Change printing of 'y'.
7765 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Use
7766 new enum value 'ADDR_QUERY_LDP_STP_N', don't hardcode mode and use
7767 'true' rather than '1'.
7768 * config/aarch64/constraints.md (Uml): Likewise.
7769 (Uml): Rename to Umn.
7772 2018-07-19 Richard Biener <rguenther@suse.de>
7774 * tree-ssa-sccvn.h (struct vn_phi_s): Make phiargs member
7776 * tree-ssa-sccvn.c: Remove alloc-pool.h use.
7777 (vn_phi_hasher): Derive from nofree_ptr_hash and remove remove method.
7778 (vn_reference_hasher): Likewise.
7779 (struct vn_tables_s): Remove obstack and alloc-pool members.
7780 (vn_tables_obstack, vn_tables_insert_obstack): New global obstacks.
7781 (vn_nary_build_or_lookup_1): Manually build in vn_tables_insert_obstack.
7782 (vn_reference_insert): Allocate from obstack instead of from alloc-pool.
7783 (vn_reference_insert_pieces): Likewise.
7784 (alloc_vn_nary_op_noinit): Adjust.
7785 (vn_nary_op_insert_stmt): Allocate phiargs in-place.
7786 (vn_phi_eq): Adjust.
7787 (shared_lookup_phiargs): Remove.
7788 (vn_phi_lookup): Allocate temporary vn_phi_s on the stack.
7789 (vn_phi_insert): Allocate from obstack instead of from alloc-pool.
7790 (visit_reference_op_call): Likewise.
7791 (copy_nary, copy_phi, copy_reference): Remove.
7792 (process_scc): Rewind the obstack when iterating. Do not
7793 copy the elements to valid_info but just move them from one
7794 hashtable to the other.
7795 (allocate_vn_table): Adjust.
7796 (free_vn_table): Likewise.
7797 (init_scc_vn): Likewise.
7798 (free_scc_vn): Likewise.
7800 2018-07-19 H.J. Lu <hongjiu.lu@intel.com>
7803 * config/i386/i386.c (rest_of_insert_endbranch): Lookup
7804 indirect_return as function type attribute.
7805 (ix86_attribute_table): Change indirect_return to function
7807 * doc/extend.texi: Update indirect_return attribute.
7809 2018-07-19 Aldy Hernandez <aldyh@redhat.com>
7811 * wide-int.h (widest2_int): New.
7812 * gimple-fold.c (arith_overflowed_p): Use it.
7813 * tree.h (widest2_int_cst): New.
7814 * tree-vrp.c (wide_int_binop_overflow): Rename from
7815 vrp_int_const_binop.
7816 Rewrite to work on trees.
7817 (extract_range_from_multiplicative_op_1): Abstract code to...
7818 (wide_int_range_min_max): ...here.
7819 (wide_int_range_cross_product): ...and here.
7820 (extract_range_from_binary_expr_1): Abstract overflow code to...
7821 (wide_int_range_mult_wrapping): ...here.
7822 * tree-vrp.h (wide_int_range_cross_product): New.
7823 (wide_int_range_mult_wrapping): New.
7825 2018-07-19 Andrew Senkevich <andrew.senkevich@intel.com>
7826 Julia Koval <julia.koval@intel.com>
7828 * config/i386/x86-tune-costs.h (skylake_memcpy,
7829 skylake_memset): Replace rep_prefix with unrolling for size 512.
7831 2018-07-18 Kugan Vivekanandarajah <kuganv@linaro.org>
7834 * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): Handle
7835 comparision with EQ_EXPR in last stmt.
7837 2018-07-18 Kelvin Nilsen <kelvin@gcc.gnu.org>
7839 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Rename
7840 this subsection to "PowerPC AltiVec/VSX Built-in Functions".
7841 (PowerPC AltiVec/VSX Built-in Functions): New name for subsection
7842 previously known as "PowerPC AltiVec Built-in Functions". Move
7843 some material to new subsubsections "PowerPC AltiVec Built-in
7844 Functions on ISA 2.06" and "PowerPC AltiVec Built-in Functions on
7846 (PowerPC Altivec Built-in Functions on ISA 2.05): New subsubsection.
7847 (PowerPC Altivec Built-in Functions on ISA 2.06): Likewise.
7848 (PowerPC Altivec Built-in Functions on ISA 2.07): Likewise.
7849 (PowerPC Altivec Built-in Functions on ISA 3.0): Likewise.
7851 2018-07-18 Richard Biener <rguenther@suse.de>
7853 PR tree-optimization/86557
7854 * tree-vect-patterns.c (vect_recog_divmod_pattern): Also handle
7857 2018-07-18 Ilya Leoshkevich <iii@linux.ibm.com>
7859 * config/s390/s390.c (s390_function_profiler): Generate CFI.
7861 2018-07-17 Jeff Law <law@redhat.com>
7863 * config/arm/arm.c (get_label_padding): Update for recent
7864 changes to label_to_alignment.
7866 PR tree-optimization/86010
7867 * tree-ssa-dse.c (compute_trims): Fix typo/thinko.
7869 * config/mips/mips.c (vr4130_align_insns): Update for recent
7870 changes to label_to_alignment.
7872 * config/frv/frv.c (frv_label_align): Update for recent changes
7873 to label_to_alignment.
7875 * config/nios2/nios2.c (nios2_label_align): Update for recent
7876 changes which dropped ALIGN_LABELS_LOG.
7878 2018-07-17 Andreas Schwab <schwab@linux-m68k.org>
7880 * config/m68k/m68k.md (umulsi3_highpart+1, const_umulsi3_highpart)
7881 (smulsi3_highpart+1, const_smulsi3_highpart): Add CC_STATUS_INIT.
7883 2018-07-17 Claudiu Zissulescu <claziss@synopsys.com>
7885 * config/arc/arc.c (arc_label_align): Use align_labels instead of
7886 deprecated align_labels_log.
7888 2018-07-17 Richard Biener <rguenther@suse.de>
7891 * dwarf2out.c (init_sections_and_labels): Always generate
7892 a debug_line_str_section for early LTO debug.
7893 (dwarf2out_finish): Reset debug_line_str_hash output early.
7894 Bump counter for extra dwarf5 .debug_loc labels to not conflict
7896 (dwarf2out_early_finish): Output debug_line_str.
7898 2018-07-17 Robin Dapp <rdapp@linux.ibm.com>
7900 * config/s390/s390.c (preferred_la_operand_p): Do not use LA with
7901 index register on z196 or later.
7903 2018-07-17 Robin Dapp <rdapp@linux.ibm.com>
7905 * config/s390/s390.c (s390_default_align): Set default function
7907 (s390_override_options_after_change): Call s390_default align.
7908 (s390_option_override_internal): Call s390_default_align.
7909 (TARGET_OVERRIDE_OPTIONS_AFTER_CHANGE): Define.
7911 2018-07-17 Jakub Jelinek <jakub@redhat.com>
7914 * omp-low.c (create_task_copyfn): Copy over also fields corresponding
7915 to _looptemp_ clauses, other than the first two.
7917 2018-07-17 Martin Liska <mliska@suse.cz>
7919 * opts.c: Do not enable OPT_falign_* for -Os.
7921 2018-07-17 Martin Liska <mliska@suse.cz>
7923 * align.h (MAX_CODE_ALIGN): New.
7924 (MAX_CODE_ALIGN_VALUE): New.
7925 * common/config/i386/i386-common.c (ix86_handle_option):
7926 (MAX_CODE_ALIGN): Moved to align.h.
7927 * final.c (MAX_CODE_ALIGN): Likewise.
7928 * opts.c (parse_and_check_align_values):
7929 (MAX_CODE_ALIGN): Likewise.
7930 (MAX_CODE_ALIGN_VALUE): Likewise.
7932 2018-07-17 Martin Liska <mliska@suse.cz>
7934 * config/i386/att.h (ASM_OUTPUT_ALIGN): Fix spacing
7935 in order to fulfil coding style.
7936 * config/i386/cygming.h (ASM_OUTPUT_ALIGN): Likewise.
7937 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
7938 * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
7939 * config/iq2000/iq2000.h (ASM_OUTPUT_ALIGN): Likewise.
7940 * config/pa/pa.h (ASM_OUTPUT_ALIGN): Likewise.
7941 * config/sparc/sol2.h (ASM_OUTPUT_ALIGN_WITH_NOP): Likewise.
7942 * config/sparc/sparc.h (ASM_OUTPUT_ALIGN): Likewise.
7943 * config/visium/visium.h (ASM_OUTPUT_ALIGN): Likewise.
7944 (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
7946 2018-07-17 Martin Liska <mliska@suse.cz>
7948 * align.h: New file.
7949 * config/alpha/alpha.c (alpha_align_insns_1): Use align_functions
7951 * config/i386/i386.c (ix86_avoid_jump_mispredicts): Use new return type
7952 align_flags of label_to_alignment.
7953 * config/m32r/m32r.h (LOOP_ALIGN): Wrap returned values into
7955 * config/m68k/m68k.c: Do not use removed align_labels_value and
7957 * config/nds32/nds32.h (JUMP_ALIGN): Wrap result into align_flags class.
7958 (LOOP_ALIGN): Likewise.
7959 (LABEL_ALIGN): Likewise.
7960 * config/powerpcspe/powerpcspe.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
7961 Remove not used macro.
7962 (rs6000_loop_align): Change return type to align_flags.
7963 (rs6000_loop_align_max_skip): Remove.
7964 * config/rs6000/rs6000-protos.h (rs6000_loop_align):
7965 Change return type to align_flags.
7966 * config/rs6000/rs6000.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
7967 Remove not used macro.
7968 (rs6000_loop_align): Change return type to align_flags.
7969 (rs6000_loop_align_max_skip): Remove.
7970 * config/rx/rx.h (JUMP_ALIGN): Wrap integer values
7971 * config/rx/rx-protos.h (rx_align_for_label): Make it
7973 * config/rx/rx.c (rx_align_for_label): Change return type
7975 (rx_max_skip_for_label): Remove TARGET_ASM_*_ALIGN_MAX_SKIP
7977 into align_flags class.
7978 (LABEL_ALIGN): Likewise.
7979 (LOOP_ALIGN): Likewise.
7980 * config/s390/s390.c (s390_label_align): Use align_flags
7982 (s390_asm_output_function_label): Likewise.
7983 * config/sh/sh.c (sh_override_options_after_change):
7984 Use align_flags class directly without macros.
7985 (find_barrier): Likewise.
7986 (barrier_align): Likewise.
7987 (sh_loop_align): Likewise.
7988 * config/spu/spu.c (spu_option_override):
7989 Use align_flags_tuple::get_value instead of removed macros.
7990 (spu_sched_init): Likewise.
7991 * config/spu/spu.h (GTY): Likewise.
7992 * config/visium/visium.c (visium_option_override):
7993 Set "8" as default secondary alignment.
7994 * config/visium/visium.h (SUBALIGN_LOG): Define to 3
7995 in order to guarantee secondary alignment of 8.
7996 * coretypes.h: Include align.h header file.
7997 * doc/tm.texi: Remove TARGET_ASM_JUMP_ALIGN_MAX_SKIP,
7998 TARGET_ASM_LOOP_ALIGN_MAX_SKIP, TARGET_ASM_LABEL_ALIGN_MAX_SKIP
7999 and TARGET_ASM_LABEL_ALIGN_AFTER_BARRIER_MAX_SKIP macros.
8000 * doc/tm.texi.in: Likewise.
8001 * final.c (struct label_alignment): Remove not used structure.
8002 (LABEL_ALIGN): Change type to align_flags.
8003 (LOOP_ALIGN): Likewise.
8004 (JUMP_ALIGN): Likewise.
8005 (default_loop_align_max_skip): Remove.
8006 (default_label_align_max_skip): Likewise.
8007 (default_jump_align_max_skip): Likewise.
8008 (default_label_align_after_barrier_max_skip):
8009 (LABEL_TO_ALIGNMENT): Change to access label_align vector.
8010 (LABEL_TO_MAX_SKIP): Remove.
8011 (label_to_alignment): Return align_flags type instead of integer.
8012 (label_to_max_skip): Remove.
8013 (align_fuzz): Use align_flags type.
8014 (compute_alignments): Use align_flags type and use align_flags::max
8015 to combine multiple alignments.
8016 (grow_label_align): Grow vec instead of C array.
8017 (update_alignments): Assign just LABEL_TO_ALIGNMENT.
8018 (shorten_branches): Use align_flags type and use align_flags::max
8019 to combine multiple alignments.
8020 (final_scan_insn_1): Remove usage of secondary alignment that comes
8021 from label alignment, but instead use proper secondary alignment
8022 which is computed in grow_label_align.
8023 * flags.h (struct align_flags_tuple): Move to align.h.
8024 (struct align_flags): Likewise.
8025 (state_align_loops): Rename to align_loops.
8026 (state_align_jumps): Rename to align_jumps.
8027 (state_align_labels): Rename to align_labels.
8028 (state_align_functions): Rename to align_functions.
8029 (align_loops_log): Remove.
8030 (align_jumps_log): Remove.
8031 (align_labels_log): Remove.
8032 (align_functions_log): Remove.
8033 (align_loops_max_skip): Remove.
8034 (align_jumps_max_skip): Remove.
8035 (align_labels_max_skip): Remove.
8036 (align_functions_max_skip): Remove.
8037 (align_loops_value): Remove.
8038 (align_jumps_value): Remove.
8039 (align_labels_value): Remove.
8040 (align_functions_value): Remove.
8041 * output.h (label_to_alignment): Change return type to align_flags.
8042 (label_to_max_skip): Remove.
8043 * target.def: Remove loop_align_max_skip, label_align_max_skip,
8044 jump_align_max_skip macros.
8045 * targhooks.h (default_loop_align_max_skip): Remove.
8046 (default_label_align_max_skip): Likewise.
8047 (default_jump_align_max_skip): Likewise.
8048 (default_label_align_after_barrier_max_skip): Remove.
8049 * toplev.c (read_log_maxskip): Use ::normalize function.
8050 (parse_N_M): Remove not used argument and also call ::normalize.
8051 (parse_alignment_opts): Do not pass unused arguments.
8052 * varasm.c (assemble_start_function): Use directly align_functions
8053 instead of removed macros.
8054 * system.h: Do not poison removed macros.
8056 2018-07-17 Jakub Jelinek <jakub@redhat.com>
8059 * gimplify.c (gimplify_omp_for): Ensure taskloop firstprivatized init
8060 and cond temporaries don't have reference type if iterator has
8061 pointer type. For init use &for_pre_body instead of pre_p if
8062 for_pre_body is non-empty.
8064 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
8066 * config/rs6000/rs6000.md (trunc<mode>sf2): Expand truncates of
8067 double-double modes to SFmode directly directly.
8068 (trunc<mode>sf2_fprs): Delete.
8070 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
8072 * config/rs6000/rs6000.c (init_float128_ibm): Use the correct names
8073 for conversions between IFmode and the decimal floating point modes.
8074 (init_float128_ieee): Use the correct names for conversions between
8075 KFmode and the decimal floating point modes.
8077 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
8079 * config/rs6000/rs6000.c (init_float128_ibm): Use more correct names
8080 for the conversions between TDmode and IFmode.
8081 (init_float128_ieee): Use more correct names for the conversions
8082 between TDmode and KFmode.
8084 2018-07-16 Jakub Jelinek <jakub@redhat.com>
8086 PR tree-optimization/86526
8087 * builtins.c (expand_builtin_memcmp): Formatting fixes.
8088 (inline_expand_builtin_string_cmp): Likewise.
8089 (inline_string_cmp): Likewise. Use c_readstr instead of
8090 builtin_memcpy_read_str. Add unit_mode temporary.
8092 2018-07-16 Bernd Edlinger <bernd.edlinger@hotmail.de>
8095 * builtins.c (check_access): Bail out if range[0] is no INTEGER_CST.
8096 * expr.c (string_constant): Fix the element size of ARRAY_TYPE.
8098 2018-07-16 Kelvin Nilsen <kelvin@gcc.gnu.org>
8100 * doc/extend.texi (PowerPC AltiVec Built-in Functions):
8101 Alphabetize prototypes of built-in functions, separating out
8102 built-in functions that are listed in this section but should be
8103 described elsewhere.
8105 2018-07-16 Uros Bizjak <ubizjak@gmail.com>
8108 * expmed.c (emit_store_flag): Do not emit setcc followed by a
8109 conditional move when trapping comparison was split to a
8110 non-trapping one (and vice versa).
8112 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
8114 * config/s390/s390.c (s390_function_profiler): Generate nops
8115 instead of profiler call sequences.
8116 * config/s390/s390.opt: Add the new option.
8118 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
8120 * config/s390/s390.c (s390_function_profiler): Generate
8121 __mcount_loc section.
8122 * config/s390/s390.opt: Add the new option.
8124 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
8126 * common.opt: Add the new warning.
8127 * config/s390/s390.c (s390_function_profiler): Emit "brasl
8128 %r0,__fentry__" when -mfentry is specified.
8129 (s390_option_override_internal): Disallow -mfentry for 31-bit
8131 * config/s390/s390.opt: Add the new option.
8133 2018-07-16 Richard Biener <rguenther@suse.de>
8136 * dwarf2out.c (dwarf2out_register_external_die): Assign DIE parents
8137 for function-local FUNCTION_DECL and RESULT_DECL immediately.
8139 2018-07-16 Martin Liska <mliska@suse.cz>
8142 * ipa-pure-const.c (malloc_candidate_p): Revert ::get
8145 2017-07-16 Claudiu Zissulescu <claziss@synopsys.com>
8147 * config/arc/arcHS.md: Update ARCHS scheduling rules.
8149 2017-07-16 Claudiu Zissulescu <claziss@synopsys.com>
8151 * config/arc/arc-arch.h (arc_tune_attr): Add new tune parameters
8153 * config/arc/arc-cpus.def (hs4x): New cpu.
8155 * config/arc/arc-tables.opt: Regenerate.
8156 * config/arc/arc.c (arc_sched_issue_rate): New function.
8157 (TARGET_SCHED_ISSUE_RATE): Define.
8158 (TARGET_SCHED_EXPOSED_PIPELINE): Likewise.
8159 * config/arc/arc.md (attr type): Add fpu_fuse, fpu_sdiv, fpu_ddiv,
8161 (attr tune): Add ARCHS4x tune values.
8162 (attr tune_dspmpy): Define.
8163 (*tst): Correct instruction type.
8164 * config/arc/arcHS.md: Don't use this automaton for ARCHS4x cpus.
8165 * config/arc/arcHS4x.md: New file.
8166 * config/arc/fpu.md: Update instruction type attributes.
8167 * config/arc/t-multilib: Regenerate.
8169 2018-07-16 Tom de Vries <tdevries@suse.de>
8172 * var-tracking.c (vt_initialize): Fix pre_dec handling.
8174 2018-07-16 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
8176 * config/aarch64/atomics.md (aarch64_store_execlusive<mode>): Add
8179 2018-07-16 Eric Botcazou <ebotcazou@adacore.com>
8181 PR tree-optimization/86514
8182 * tree-ssa-reassoc.c (init_range_entry) <CASE_CONVERT>: Return for a
8183 conversion to a boolean type from a type with greater precision.
8185 2018-07-16 Tom de Vries <tdevries@suse.de>
8187 * var-tracking.c (vt_initialize): Print adjusted insn slim if
8188 dump_flags request TDF_SLIM.
8190 2018-07-16 Aldy Hernandez <aldyh@redhat.com>
8192 * fold-const.c (int_const_binop_1): Abstract...
8193 (wide_int_binop): ...wide int code here.
8194 (poly_int_binop): ...poly int code here.
8195 Abstract the rest of int_const_binop_1 into int_const_binop.
8196 * fold-const.h (wide_int_binop): New.
8197 * tree-vrp.c (vrp_int_const_binop): Call wide_int_binop.
8198 Remove useless PLUS/MINUS_EXPR case.
8199 (zero_nonzero_bits_from_vr): Move wide int code...
8200 (zero_nonzero_bits_from_bounds): ...here.
8201 (extract_range_from_binary_expr_1): Move mask optimization code...
8202 (range_easy_mask_min_max): ...here.
8203 * tree-vrp.h (zero_nonzero_bits_from_bounds): New.
8204 (range_easy_mask_min_max): New.
8206 2018-07-15 Jeff Law <law@redhat.com>
8209 * config/sh/sh.c (output_mi_thunk): Remove dead conditional
8212 2018-07-14 Jim Wilson <jimw@sifive.com>
8214 * config/riscv/linux.h (TARGET_ASM_FILE_END): New.
8216 2018-07-14 Paul Koning <ni1d@arrl.net>
8218 * config/pdp11/pdp11.c (pdp11_rtx_costs): Bugfixes.
8220 2018-07-13 Jan Hubicka <hubicka@ucw.cz>
8222 * lto-streamer-out.c (copy_function_or_variable): Dump info about
8225 2018-07-13 Bill Schmidt <wschmidt@linux.ibm.com>
8226 Steve Munroe <munroesj52@gmail.com>
8228 * config/rs6000/emmintrin.h (_mm_and_si128): New function.
8229 (_mm_andnot_si128): Likewise.
8230 (_mm_or_si128): Likewise.
8231 (_mm_xor_si128): Likewise.
8233 2018-07-13 Qing Zhao <qing.zhao@oracle.com>
8236 * builtins.c (expand_builtin_memcmp): Inline the calls first
8237 when result_eq is false.
8238 (expand_builtin_strcmp): Inline the calls first.
8239 (expand_builtin_strncmp): Likewise.
8240 (inline_string_cmp): New routine. Expand a string compare
8241 call by using a sequence of char comparison.
8242 (inline_expand_builtin_string_cmp): New routine. Inline expansion
8243 a call to str(n)cmp/memcmp.
8244 * doc/invoke.texi (--param builtin-string-cmp-inline-length):
8246 * params.def (BUILTIN_STRING_CMP_INLINE_LENGTH): New.
8248 2018-07-13 Richard Earnshaw <rearnsha@arm.com>
8250 * config/arm/driver-arm.c: Include arm-native.h.
8251 (host_detect_local_cpu): Use auto-generated data tables.
8252 (vendors, arm_cpu_table): Delete. Move part information to ...
8253 * config/arm/arm-cpus.in: ... here.
8254 * config/arm/parsecpu.awk (gen_native): New function.
8255 (vendor, part): New CPU fields.
8256 (END): Add support for building the native CPU detection tables.
8257 * config/arm/t-arm (arm-native.h): Add build rule.
8258 (driver-arm.o): Add dependency on arm-native.h.
8260 2018-07-13 Richard Biener <rguenther@suse.de>
8263 * match.pd (addr1 - addr2): Allow either of the operand to
8266 2018-07-13 Tom de Vries <tdevries@suse.de>
8268 * tree-inline.c (remap_ssa_name): Save and reuse debug exprs generated
8271 2018-07-13 Jackson Woodruff <jackson.woodruff@arm.com>
8273 * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp): Use
8274 arrays instead of numbered variables.
8276 2018-07-13 Eric Botcazou <ebotcazou@adacore.com>
8278 * config/sparc/sparc-protos.h (sparc_compute_frame_size): Delete.
8279 * config/sparc/sparc.c (sparc_compute_frame_size): Make static.
8281 2018-07-13 Richard Biener <rguenther@suse.de>
8284 * dwarf2out.c (gen_type_die_with_usage): Use scope_die_for
8285 instead of get_context_die.
8287 2018-07-13 Kugan Vivekanandarajah <kuganv@linaro.org>
8288 Richard Biener <rguenther@suse.de>
8291 * tree-ssa-loop-niter.c (number_of_iterations_popcount): Check
8292 that the loop latch destination where phi is defined.
8294 2018-07-12 Kito Cheng <kito.cheng@gmail.com>
8296 * config/riscv/riscv.c (enum riscv_privilege_levels): Add UNKNOWN_MODE.
8297 (riscv_expand_epilogue): Add assertion to check interrupt mode.
8298 (riscv_set_current_function): Extract getting interrupt type to new
8300 (riscv_get_interrupt_type): New function.
8301 (riscv_merge_decl_attributes): New function, checking interrupt type is
8303 (TARGET_MERGE_DECL_ATTRIBUTES): Define.
8305 2018-07-12 Paul Koning <ni1d@arrl.net>
8307 * config/pdp11/pdp11.c (pdp11_output_def): Fix typo in .set
8310 2018-07-12 Paul Koning <ni1d@arrl.net>
8312 * doc/rtl.texi (REG_NONNEG): Remove decrement and branch until
8313 zero reference, add doloop_end instead.
8314 * doc/md.texi (decrement_and_branch_until_zero): Remove.
8315 (Looping patterns): Remove decrement_and_branch_until_zero. Add
8316 detail for doloop_end.
8318 2018-07-12 Martin Sebor <msebor@redhat.com>
8321 * attribs.c (decl_attributes): Reject conflicting attributes before
8322 calling attribute handlers.
8324 2018-07-12 Jan Hubicka <hubicka@ucw.cz>
8326 * dumpfile.c (gcc::dump_manager::get_dump_file_name): Add PART
8328 (gcc::dump_manager::get_dump_file_name): likewise.
8329 (dump_begin): Likewise.
8330 * dumpfile.h (dump_begin): Update prototype.
8331 (gcc::dump_manager::get_dump_file_name,
8332 gcc::dump_manager::get_dump_file_name): Update prototype.
8334 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
8336 * internal-fn.h (vectorizable_internal_fn_p): New function.
8337 * tree-vect-slp.c (compatible_calls_p): Likewise.
8338 (vect_build_slp_tree_1): Remove nops argument. Handle calls
8339 to internal functions.
8340 (vect_build_slp_tree_2): Update call to vect_build_slp_tree_1.
8342 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
8344 * fold-const.h (inverse_conditions_p): Declare.
8345 * fold-const.c (inverse_conditions_p): New function.
8346 * match.pd: Use inverse_conditions_p. Add folds of view_converts
8347 that test the inverse condition of a conditional internal function.
8348 * internal-fn.h (vectorized_internal_fn_supported_p): Declare.
8349 * internal-fn.c (internal_fn_mask_index): Handle conditional
8351 (vectorized_internal_fn_supported_p): New function.
8352 * tree-if-conv.c: Include internal-fn.h and fold-const.h.
8353 (any_pred_load_store): Replace with...
8354 (need_to_predicate): ...this new variable.
8355 (redundant_ssa_names): New variable.
8356 (ifcvt_can_use_mask_load_store): Move initial checks to...
8357 (ifcvt_can_predicate): ...this new function. Handle tree codes
8358 for which a conditional internal function exists.
8359 (if_convertible_gimple_assign_stmt_p): Use ifcvt_can_predicate
8360 instead of ifcvt_can_use_mask_load_store. Update after variable
8362 (predicate_load_or_store): New function, split out from
8363 predicate_mem_writes.
8364 (check_redundant_cond_expr): New function.
8365 (value_available_p): Likewise.
8366 (predicate_rhs_code): Likewise.
8367 (predicate_mem_writes): Rename to...
8368 (predicate_statements): ...this. Use predicate_load_or_store
8369 and predicate_rhs_code.
8370 (combine_blocks, tree_if_conversion): Update after above name changes.
8371 (ifcvt_local_dce): Handle redundant_ssa_names.
8372 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): Handle
8373 general conditional functions.
8374 * tree-vect-stmts.c (vectorizable_call): Likewise.
8376 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
8377 Alan Hayward <alan.hayward@arm.com>
8378 David Sherwood <david.sherwood@arm.com>
8380 * internal-fn.h (can_interpret_as_conditional_op_p): Declare.
8381 * internal-fn.c (can_interpret_as_conditional_op_p): New function.
8382 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Handle conditional
8383 plus and minus and convert them into IFN_COND_FMA-based sequences.
8384 (convert_mult_to_fma): Handle conditional plus and minus.
8386 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
8388 * doc/md.texi (cond_fma, cond_fms, cond_fnma, cond_fnms): Document.
8389 * optabs.def (cond_fma_optab, cond_fms_optab, cond_fnma_optab)
8390 (cond_fnms_optab): New optabs.
8391 * internal-fn.def (COND_FMA, COND_FMS, COND_FNMA, COND_FNMS): New
8393 (FMA): Use DEF_INTERNAL_FLT_FN rather than DEF_INTERNAL_FLT_FLOATN_FN.
8394 * internal-fn.h (get_conditional_internal_fn): Declare.
8395 (get_unconditional_internal_fn): Likewise.
8396 * internal-fn.c (cond_ternary_direct): New macro.
8397 (expand_cond_ternary_optab_fn): Likewise.
8398 (direct_cond_ternary_optab_supported_p): Likewise.
8399 (FOR_EACH_COND_FN_PAIR): Likewise.
8400 (get_conditional_internal_fn): New function.
8401 (get_unconditional_internal_fn): Likewise.
8402 * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 5.
8403 (gimple_match_op::gimple_match_op): Add a new overload for 5
8405 (gimple_match_op::set_op): Likewise.
8406 (gimple_resimplify5): Declare.
8407 * genmatch.c (decision_tree::gen): Generate simplifications for
8409 * gimple-match-head.c (gimple_simplify): Define an overload for
8410 5 operands. Handle calls with 5 arguments in the top-level overload.
8411 (convert_conditional_op): Handle conversions from unconditional
8412 internal functions to conditional ones.
8413 (gimple_resimplify5): New function.
8414 (build_call_internal): Pass a fifth operand.
8415 (maybe_push_res_to_seq): Likewise.
8416 (try_conditional_simplification): Try converting conditional
8417 internal functions to unconditional internal functions.
8418 Handle 3-operand unconditional forms.
8419 * match.pd (UNCOND_TERNARY, COND_TERNARY): Operator lists.
8420 Define ternary equivalents of the current rules for binary conditional
8422 * config/aarch64/aarch64.c (aarch64_preferred_else_value): Handle
8424 * config/aarch64/iterators.md (UNSPEC_COND_FMLA, UNSPEC_COND_FMLS)
8425 (UNSPEC_COND_FNMLA, UNSPEC_COND_FNMLS): New unspecs.
8426 (optab): Handle them.
8427 (SVE_COND_FP_TERNARY): New int iterator.
8428 (sve_fmla_op, sve_fmad_op): New int attributes.
8429 * config/aarch64/aarch64-sve.md (cond_<optab><mode>)
8430 (*cond_<optab><mode>_2, *cond_<optab><mode_4)
8431 (*cond_<optab><mode>_any): New SVE_COND_FP_TERNARY patterns.
8433 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
8435 * target.def (preferred_else_value): New target hook.
8436 * doc/tm.texi.in (TARGET_PREFERRED_ELSE_VALUE): New hook.
8437 * doc/tm.texi: Regenerate.
8438 * targhooks.h (default_preferred_else_value): Declare.
8439 * targhooks.c (default_preferred_else_value): New function.
8440 * internal-fn.h (conditional_internal_fn_code): Declare.
8441 * internal-fn.c (FOR_EACH_CODE_MAPPING): New macro.
8442 (get_conditional_internal_fn): Use it.
8443 (conditional_internal_fn_code): New function.
8444 * gimple-match.h (gimple_match_cond): New struct.
8445 (gimple_match_op): Add a cond member function.
8446 (gimple_match_op::gimple_match_op): Update all forms to take a
8448 * genmatch.c (expr::gen_transform): Use the same condition as res_op
8449 for the suboperation, but don't specify a particular else_value.
8450 * tree-ssa-sccvn.c (vn_nary_simplify, vn_reference_lookup_3)
8451 (visit_nary_op, visit_reference_op_load): Pass
8452 gimple_match_cond::UNCOND to the gimple_match_op constructor.
8453 * gimple-match-head.c: Include tree-eh.h
8454 (convert_conditional_op): New function.
8455 (maybe_resimplify_conditional_op): Likewise.
8456 (gimple_resimplify1): Call maybe_resimplify_conditional_op.
8457 (gimple_resimplify2): Likewise.
8458 (gimple_resimplify3): Likewise.
8459 (gimple_resimplify4): Likewise.
8460 (maybe_push_res_to_seq): Return null for conditional operations.
8461 (try_conditional_simplification): New function.
8462 (gimple_simplify): Call it. Pass conditions to the gimple_match_op
8464 * match.pd: Fold VEC_COND_EXPRs of an IFN_COND_* call to a new
8466 * config/aarch64/aarch64.c (aarch64_preferred_else_value): New
8468 (TARGET_PREFERRED_ELSE_VALUE): Redefine.
8470 2018-07-12 Jan Hubicka <hubicka@ucw.cz>
8472 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
8474 (hash_tree): Do not hash DECL_FCONTEXT
8475 * tree-streamer-in.c (lto_input_ts_field_decl_tree_pointers):
8476 Do not stream DECL_FCONTEXT.
8477 * tree-streamer-out.c (write_ts_field_decl_tree_pointers): Likewise.
8478 * tree.c (free_lang_data_in_decl): Free DECL_FCONTEXT.
8480 2018-07-12 Richard Biener <rguenther@suse.de>
8483 * dwarf2out.c (gen_block_die): Only output blocks when they have
8484 at least one !DECL_IGNORED_P variable.
8486 2018-07-12 Richard Biener <rguenther@suse.de>
8489 * config/gnu-user.h (GNU_USER_TARGET_NO_PTHREADS_LIB_SPEC):
8490 Remove -mieee-fp handling.
8492 2018-07-12 Richard Biener <rguenther@suse.de>
8494 * tree-ssa-sccvn.c (vn_lookup_simplify_result): Remove bogus
8495 left-over from last patch.
8497 2018-07-12 Jakub Jelinek <jakub@redhat.com>
8499 PR tree-optimization/86492
8500 * gimple-ssa-store-merging.c
8501 (imm_store_chain_info::coalesce_immediate_stores): Call
8502 check_no_overlap even for the merge_overlapping case. Formatting fix.
8504 2018-07-12 Richard Biener <rguenther@suse.de>
8507 * fold-const.c (fold_binary_op_with_conditional_arg): Do not
8508 move possibly trapping operations into the conditional.
8510 2018-07-12 Richard Biener <rguenther@suse.de>
8512 * tree-ssa-sccvn.c (mprts_hook_cnt): Remove.
8513 (vn_lookup_simplify_result): Remove recursion limit applied
8515 (vn_nary_build_or_lookup_1): Adjust.
8516 (try_to_simplify): Likewise.
8517 * gimple-match-head.c (gimple_resimplify1): Instead apply one
8519 (gimple_resimplify2): Likewise.
8520 (gimple_resimplify3): Likewise.
8521 (gimple_resimplify4): Likewise.
8523 2018-07-11 Jakub Jelinek <jakub@redhat.com>
8525 * config/i386/avx512bitalgintrin.h (_mm512_mask_bitshuffle_epi64_mask):
8526 Use __mmask64 type instead of __mmask8 for __M argument.
8527 * config/i386/avx512fintrin.h (_mm512_mask_xor_epi64,
8528 _mm512_maskz_xor_epi64): Use __mmask8 type instead of __mmask16 for
8530 (_mm512_mask_cmpneq_epi64_mask): Use __mmask8 type instead of
8531 __mmask16 for __M argument.
8532 (_mm512_maskz_insertf32x4, _mm512_maskz_inserti32x4,
8533 _mm512_mask_insertf32x4, _mm512_mask_inserti32x4): Cast last argument
8534 to __mmask16 instead of __mmask8.
8535 * config/i386/avx512vlintrin.h (_mm_mask_add_ps, _mm_maskz_add_ps,
8536 _mm256_mask_add_ps, _mm256_maskz_add_ps, _mm_mask_sub_ps,
8537 _mm_maskz_sub_ps, _mm256_mask_sub_ps, _mm256_maskz_sub_ps,
8538 _mm256_maskz_cvtepi32_ps, _mm_maskz_cvtepi32_ps): Use __mmask8 type
8539 instead of __mmask16 for __U argument.
8540 * config/i386/avx512vlbwintrin.h (_mm_mask_cmp_epi8_mask): Use
8541 __mmask16 instead of __mmask8 for __U argument.
8542 (_mm256_mask_cmp_epi8_mask): Use __mmask32 instead of __mmask16 for
8544 (_mm256_cmp_epi8_mask): Use __mmask32 return type instead of
8546 (_mm_mask_cmp_epu8_mask): Use __mmask16 instead of __mmask8 for __U
8548 (_mm256_mask_cmp_epu8_mask): Use __mmask32 instead of __mmask16 for
8550 (_mm256_cmp_epu8_mask): Use __mmask32 return type instead of
8552 (_mm_mask_cmp_epi16_mask): Cast last argument to __mmask8 instead
8554 (_mm256_mask_cvtepi8_epi16): Use __mmask16 instead of __mmask32 for
8556 (_mm_mask_cvtepi8_epi16): Use __mmask8 instead of __mmask32 for
8558 (_mm256_mask_cvtepu8_epi16): Use __mmask16 instead of __mmask32 for
8560 (_mm_mask_cvtepu8_epi16): Use __mmask8 instead of __mmask32 for
8562 (_mm256_mask_cmpneq_epu8_mask, _mm256_mask_cmplt_epu8_mask,
8563 _mm256_mask_cmpge_epu8_mask, _mm256_mask_cmple_epu8_mask): Change
8564 return type as well as __M argument type and all casts from __mmask8
8566 (_mm256_mask_cmpneq_epu16_mask, _mm256_mask_cmplt_epu16_mask,
8567 _mm256_mask_cmpge_epu16_mask, _mm256_mask_cmple_epu16_mask): Change
8568 return type as well as __M argument type and all casts from __mmask8
8570 (_mm256_mask_cmpneq_epi8_mask, _mm256_mask_cmplt_epi8_mask,
8571 _mm256_mask_cmpge_epi8_mask, _mm256_mask_cmple_epi8_mask): Change
8572 return type as well as __M argument type and all casts from __mmask8
8574 (_mm256_mask_cmpneq_epi16_mask, _mm256_mask_cmplt_epi16_mask,
8575 _mm256_mask_cmpge_epi16_mask, _mm256_mask_cmple_epi16_mask): Change
8576 return type as well as __M argument type and all casts from __mmask8
8578 * config/i386/avx512vbmi2vlintrin.h (_mm_mask_shrdi_epi32,
8579 _mm_mask_shldi_epi32): Cast last argument to __mmask8 instead of
8582 2018-07-11 Grazvydas Ignotas <notasas@gmail.com>
8584 * config/i386/avx512bwintrin.h: (_mm512_mask_cmp_epi8_mask,
8585 _mm512_mask_cmp_epu8_mask): Use __mmask64 type instead of __mmask32
8588 2018-07-11 Paul Koning <ni1d@arrl.net>
8590 * doc/md.texi (define_subst): Document how multiple occurrences of
8591 the same argument in the replacement pattern are handled.
8593 2018-07-11 Paul Koning <ni1d@arrl.net>
8595 * doc/extend.texi (Common Variable Attributes): Move "mode" into
8597 (Common Type Attributes): Add "mode" attribute.
8599 2018-07-11 Jan Hubicka <hubicka@ucw.cz>
8601 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not
8602 stream DECL_ORIGINAL_TYPE.
8603 (DFS::DFS_write_tree_body): Drop hack handling local external decls.
8604 (hash_tree): Do not walk DECL_ORIGINAL_TYPE.
8605 * tree-streamer-in.c (lto_input_ts_decl_non_common_tree_pointers):
8606 Do not walk original type.
8607 * tree-streamer-out.c (streamer_write_chain): Drop hack handling
8609 (write_ts_decl_non_common_tree_pointers): Do not stream
8611 * tree.c (free_lang_data_in_decl): Clear DECL_ORIGINAL_TYPE.
8612 (find_decls_types_r): Do not walk DEC_ORIGINAL_TYPE.
8614 2018-07-11 Aldy Hernandez <aldyh@redhat.com>
8616 * tree-ssa-threadupdate.c (thread_through_all_blocks): Do not jump
8617 thread twice from the same starting edge.
8619 2018-07-11 Aldy Hernandez <aldyh@redhat.com>
8621 * vr-values.c (gimple_stmt_nonzero_p): Abstract common code to...
8622 * gimple.c (gimple_call_nonnull_result_p): ...here...
8623 (gimple_call_nonnull_arg): ...and here.
8624 * gimple.h (gimple_call_nonnull_result_p): New.
8625 (gimple_call_nonnull_arg): New.
8627 2018-07-11 Richard Earnshaw <rearnsha@arm.com>
8629 * config/arm/arm-cpus.in: Move information from fpu field of each
8630 cpu definition to the isa field.
8631 * config/arm/parsecpu.awk (fpu): Delete match rule.
8632 (gen_comm_data): Don't add bits from the CPU's FPU entry.
8634 2018-07-11 Richard Biener <rguenther@suse.de>
8637 * dwarf2out.c (init_sections_and_labels): Use
8638 output_asm_line_debug_info consistently.
8639 (dwarf2out_early_finish): Likewise.
8640 (dwarf2out_finish): Remove DW_AT_stmt_list from early generated
8643 2018-07-11 Richard Biener <rguenther@suse.de>
8645 * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1):
8646 Rework father_bb setting in a way to avoid propagating constants
8647 multiple times on a loop body.
8649 2018-07-10 Mark Wielaard <mark@klomp.org>
8652 * dwarf2out.c (output_macinfo_op): Fix dwarf_FORM typo in gcc_assert.
8654 2018-07-10 Richard Biener <rguenther@suse.de>
8656 * hash-map.h (hash_map::iterator::operator*): Return
8657 references to key and value.
8659 2018-07-10 Jakub Jelinek <jakub@redhat.com>
8662 * gimplify.c (find_combined_omp_for): Add DATA argument, in addition
8663 to finding the inner OMP_FOR/OMP_SIMD stmt find non-trivial wrappers,
8664 BLOCKs with BLOCK_VARs, OMP_PARALLEL in between, OMP_FOR in between.
8665 (gimplify_omp_for): For composite loops, move outer
8666 OMP_{DISTRIBUTE,TASKLOOP,FOR,PARALLEL} right around innermost
8667 OMP_FOR/OMP_SIMD if there are any non-trivial wrappers. For class
8668 iterators add any needed clauses. Allow OMP_FOR_ORIG_DECLS to contain
8669 TREE_LIST for both the original class iterator and the "last" helper
8670 var. Gimplify OMP_FOR_PRE_BODY before the outermost composite
8671 loop, remember has_decl_expr from outer composite loops for the
8672 innermost OMP_SIMD in TREE_PRIVATE bit on OMP_FOR_INIT.
8674 2018-07-09 Martin Sebor <msebor@redhat.com>
8678 * builtins.c (c_strlen): Avoid out-of-bounds warnings when
8679 accessing implicitly initialized array elements.
8680 * expr.c (string_constant): Handle string initializers of
8681 character arrays within aggregates.
8682 * gimple-fold.c (fold_array_ctor_reference): Add argument.
8683 Store element offset. As a special case, handle zero size.
8684 (fold_nonarray_ctor_reference): Same.
8685 (fold_ctor_reference): Add argument. Store subobject offset.
8686 * gimple-fold.h (fold_ctor_reference): Add argument.
8688 2018-07-09 Paul Koning <ni1d@arrl.net>
8690 * config/pdp11/pdp11.c (pdp11_addr_cost): New function.
8691 (pdp11_insn_cost): New function.
8692 (pdp11_md_asm_adjust): New function.
8693 (TARGET_INVALID_WITHIN_DOLOOP): Define.
8694 (pdp11_rtx_costs): Update to match machine better.
8695 (output_addr_const_pdp11): Correct format mismatch warnings.
8696 * config/pdp11/pdp11.h (SLOW_BYTE_ACCESS): Correct definition.
8697 * config/pdp11/pdp11.md: General change to add base_cost and/or
8698 length attributes for use by new pdp11_insn_cost function.
8699 (MIN_BRANCH): Correct definition.
8701 (doloop_end): Use standard pattern name for looping pattern.
8702 (doloop_end_nocc): New.
8703 (movsf): Add another constraint alternative.
8704 (zero_extendqihi2): Add constraint alternatives for not in place
8706 (zero_extendhisi2): Remove.
8707 (shift patterns): Add CC handling variants.
8711 (define_peephole2): New peephole to recognize mov that sets CC for
8714 2018-07-09 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
8716 * config/sparc/sparc.c (sparc_fold_builtin) <SPARC_BUILTIN_PDIST,
8717 SPARC_BUILTIN_PDISTN>: Adapt for signature change of wi::neg,
8720 2018-07-09 Jakub Jelinek <jakub@redhat.com>
8723 * real.c (real_nextafter): Return true if result is denormal.
8725 2018-07-09 Martin Liska <mliska@suse.cz>
8727 * common.opt: Add back wrongly removed attribute.
8729 2018-07-09 Richard Biener <rguenther@suse.de>
8732 * dwarf2out.c (gen_block_die): For an early generated DIE
8733 always output high/low PC attributes.
8735 2018-07-09 Tom de Vries <tdevries@suse.de>
8737 * cfgexpand.c (expand_debug_source_expr): Handle VAR_DECL.
8738 * tree-inline.c (remap_ssa_name): Handle default def ssa_name mapping
8739 onto VAR_DECL with abstract origin.
8741 2018-07-07 Jim Wilson <jimw@sifive.com>
8743 * config/riscv/riscv.c (TARGET_CUSTOM_FUNCTION_DESCRIPTORS): New.
8745 2018-07-07 Tom de Vries <tdevries@suse.de>
8747 * tree-dfa.c (dump_enumerated_decls): Handle cfun->cfg == NULL.
8749 2018-07-07 Aldy Hernandez <aldyh@redhat.com>
8751 * tree-vrp.c (vrp_int_const_binop): Change overflow type to
8753 (combine_bound): Use wide-int overflow calculation instead of
8755 * calls.c (maybe_warn_alloc_args_overflow): Change overflow type to
8757 * fold-const.c (int_const_binop_2): Same.
8758 (extract_muldiv_1): Same.
8759 (fold_div_compare): Same.
8760 (fold_abs_const): Same.
8762 * poly-int.h (add): Same.
8766 * predict.c (predict_iv_comparison): Same.
8767 * profile-count.c (slow_safe_scale_64bit): Same.
8768 * simplify-rtx.c (simplify_const_binary_operation): Same.
8769 * tree-chrec.c (tree_fold_binomial): Same.
8770 * tree-data-ref.c (split_constant_offset_1): Same.
8771 * tree-if-conv.c (idx_within_array_bound): Same.
8772 * tree-scalar-evolution.c (iv_can_overflow_p): Same.
8773 * tree-ssa-phiopt.c (minmax_replacement): Same.
8774 * tree-vect-loop.c (is_nonwrapping_integer_induction): Same.
8775 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Same.
8776 * vr-values.c (vr_values::adjust_range_with_scev): Same.
8777 * wide-int.cc (wi::add_large): Same.
8778 (wi::mul_internal): Same.
8779 (wi::sub_large): Same.
8780 (wi::divmod_internal): Same.
8781 * wide-int.h: Change overflow type to overflow_type for neg, add,
8782 mul, smul, umul, div_trunc, div_floor, div_ceil, div_round,
8783 mod_trunc, mod_ceil, mod_round, add_large, sub_large,
8784 mul_internal, divmod_internal.
8785 (overflow_type): New enum.
8786 (accumulate_overflow): New.
8788 2018-07-06 Kugan Vivekanandarajah <kugan.vivekanandarajah@linaro.org>
8790 * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): New.
8791 (tree_ssa_phiopt_worker): Call cond_removal_in_popcount_pattern.
8793 2018-07-06 Kugan Vivekanandarajah <kuganv@linaro.org>
8795 * tree-ssa-loop-niter.c (number_of_iterations_popcount): If popcount
8796 argument is checked for zero before entering loop, avoid checking again.
8798 2018-07-06 Kugan Vivekanandarajah <kuganv@linaro.org>
8800 * gimplify.h (generic_expr_could_trap_p): Set as global function.
8801 * gimplify.h (generic_expr_could_trap_p): Likwise.
8802 * tree-scalar-evolution.c (expression_expensive_p): Handle COND_EXPR.
8804 2018-07-06 Jakub Jelinek <jakub@redhat.com>
8806 PR tree-optimization/86401
8807 * fold-const.c (fold_binary_loc) <case BIT_AND_EXPR>: Move the
8808 ((A & N) + B) & M -> (A + B) & M etc. optimization into ...
8809 (fold_bit_and_mask): ... here. New helper function for match.pd.
8810 * fold-const.h (fold_bit_and_mask): Declare.
8811 * match.pd (((A & N) + B) & M -> (A + B) & M): New optimization.
8813 2018-07-06 Peter Bergner <bergner@linux.ibm.com>
8816 * target.def (translate_mode_attribute): New hook.
8817 * targhooks.h (default_translate_mode_attribute): Declare.
8818 * targhooks.c (default_translate_mode_attribute): New function.
8819 * doc/tm.texi.in (TARGET_TRANSLATE_MODE_ATTRIBUTE): New hook.
8820 * doc/tm.texi: Regenerate.
8821 * config/rs6000/rs6000.c (TARGET_TRANSLATE_MODE_ATTRIBUTE): Define.
8822 (rs6000_translate_mode_attribute): New function.
8824 2018-07-06 Paul Koning <ni1d@arrl.net>
8826 * doc/md.texi (define_split): Document DONE and FAIL.
8827 (define_peephole2): Ditto.
8829 2018-07-05 Jeff Law <law@redhat.com>
8831 PR tree-optimization/86010
8832 * tree-ssa-dse.c (compute_trims): More aggressively trim at
8833 both the head and tail of mem* and str* calls.
8835 2018-07-05 Jim Wilson <jimw@sifive.com>
8837 * config.gcc (riscv*-*-*): When setting xlen, handle riscv-*.
8839 2018-07-05 Indu Bhagat <indu.bhagat@oracle.com>
8841 * config/aarch64/aarch64-simd.md: correct flags text for
8842 MIN_EXPR replacement.
8844 2018-07-05 James Clarke <jrtc27@jrtc27.com>
8846 * configure: Regenerated.
8848 2018-07-05 Carl Love <cel@us.ibm.com>
8850 * config/rs6000/rs6000-c.c: Map ALTIVEC_BUILTIN_VEC_UNPACKH for
8851 float argument to VSX_BUILTIN_DOUBLEH_V4SF.
8852 Map ALTIVEC_BUILTIN_VEC_UNPACKL for float argument to
8853 VSX_BUILTIN_DOUBLEL_V4SF.
8855 2018-07-05 Martin Sebor <msebor@redhat.com>
8858 * tree-ssa-strlen.c (maybe_set_strlen_range): Use type size rather
8859 than its domain to compute its the upper bound of a char array.
8861 2018-07-05 Nathan Sidwell <nathan@acm.org>
8863 Replace NO_IMPLICIT_EXTERN_C with SYSTEM_IMPLICIT_EXTERN_C.
8864 * doc/cpp.texi: Update comment.
8865 * doc/tm.texi: Rebuilt.
8866 * doc/tm.texi.in (NO_IMPLICIT_EXTERN_C): Replace with ...
8867 (SYSTEM_IMPLICIT_EXTERN_C): ... this, opposite sense.
8868 * doc/extend.texi (Backwards Compatibility): Clarify it is system
8869 headers affected by extern "C".
8870 * system.h: Poison NO_IMPLICIT_EXTERN_C.
8871 * config/alpha/alpha.h, config/arm/uclinux-elf.h,
8872 config/bfin/elf.h, config/cris/cris.h, config/darwin.h,
8873 config/dragonfly.h, config/freebsd.h, config/gnu-user.h,
8874 config/i386/cygming.h, config/i386/djgpp.h, config/i386/nto.h,
8875 config/ia64/hpux.h, config/lm32/lm32.h, config/lm32/uclinux-elf.h,
8876 config/lynx.h, config/mips/elf.h, config/mmix/mmix.h,
8877 config/netbsd.h, config/pa/pa-hpux.h, config/powerpcspe/sysv4.h,
8878 config/riscv/elf.h, config/rs6000/sysv4.h, config/rtems.h,
8879 config/s390/tpf.h, config/sh/newlib.h, config/sol2.h,
8880 config/sparc/openbsd64.h, config/sparc/sp-elf.h,
8881 config/sparc/sp64-elf.h, config/spu/spu.h,
8882 config/stormy16/stormy16.h, config/v850/v850.h,
8883 config/visium/visium.h, config/vx-common.h, config/xtensa/elf.h: Don't
8884 define NO_IMPLICIT_EXTERN_C.
8885 * config/rs6000/aix.h: Set SYSTEM_IMPLICIT_EXTERN_C.
8887 2018-07-05 Tamar Christina <tamar.christina@arm.com>
8890 * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
8891 instead of GET_MODE_SIZE when comparing Units.
8893 2018-07-05 Tamar Christina <tamar.christina@arm.com>
8896 * rtlanal.c (set_noop_p): Constrain on mode change,
8897 include hard-reg-set.h
8899 2018-07-05 Tamar Christina <tamar.christina@arm.com>
8901 * config/aarch64/aarch64.c (aarch64_expand_movmem): Fix mode size.
8903 2018-07-05 Jakub Jelinek <jakub@redhat.com>
8906 2018-07-04 Maxim Ostapenko <m.ostapenko@samsung.com>
8909 * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
8911 * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
8913 2018-07-04 Maxim Ostapenko <m.ostapenko@samsung.com>
8916 * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
8918 * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
8920 2018-07-04 Eric Botcazou <ebotcazou@adacore.com>
8923 * expmed.c (choose_multiplier): Fix incorrect comparison with mask.
8925 2018-07-04 Aldy Hernandez <aldyh@redhat.com>
8927 * tree-vrp.c (extract_range_from_binary_expr_1): Initialize
8928 neg_*_op* variables.
8930 2018-07-04 Martin Liska <mliska@suse.cz>
8932 * tree-switch-conversion.c: Define
8933 max_ratio_for_speed and max_ratio_for_size constants.
8935 2018-07-04 Denys Vlasenko <dvlasenk@redhat.com>
8936 Martin Liska <mliska@suse.cz>
8941 * common.opt: Rename align options with 'str_' prefix.
8942 * common/config/i386/i386-common.c (set_malign_value): New
8944 (ix86_handle_option): Use it to set -falign-* options/
8945 * config/aarch64/aarch64-protos.h (struct tune_params): Change
8946 type from int to string.
8947 * config/aarch64/aarch64.c: Update default values from int
8949 * config/alpha/alpha.c (alpha_override_options_after_change):
8951 * config/arm/arm.c (arm_override_options_after_change_1): Likewise.
8952 * config/i386/dragonfly.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
8953 max skip conditionally.
8954 * config/i386/freebsd.h (SUBALIGN_LOG): New.
8955 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
8956 max skip conditionally.
8957 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
8958 max skip conditionally.
8959 * config/i386/gnu-user.h (SUBALIGN_LOG): New.
8960 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
8961 max skip conditionally.
8962 * config/i386/i386.c (struct ptt): Change type from int to
8964 (ix86_default_align): Set default values.
8965 * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Print
8966 max skip conditionally.
8967 * config/i386/iamcu.h (SUBALIGN_LOG): New.
8968 (ASM_OUTPUT_MAX_SKIP_ALIGN):
8969 * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN):
8970 * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
8971 max skip conditionally.
8972 * config/i386/openbsdelf.h (SUBALIGN_LOG): New.
8973 (ASM_OUTPUT_MAX_SKIP_ALIGN) Print max skip conditionally.:
8974 * config/i386/x86-64.h (SUBALIGN_LOG): New.
8975 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
8976 max skip conditionally.
8977 (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
8978 * config/ia64/ia64.c (ia64_option_override): Set default values
8979 for alignment options.
8980 * config/m68k/m68k.c: Handle new str_align_* options.
8981 * config/mips/mips.c (mips_set_compression_mode): Change
8983 (mips_option_override): Set default values for options.
8984 * config/powerpcspe/powerpcspe.c (rs6000_option_override_internal):
8986 * config/rs6000/rs6000.c (rs6000_option_override_internal):
8988 * config/rx/rx.c (rx_option_override): Likewise.
8989 * config/rx/rx.h (JUMP_ALIGN): Use align_jumps_log.
8990 (LABEL_ALIGN): Use align_labels_log.
8991 (LOOP_ALIGN): Use align_loops_align.
8992 * config/s390/s390.c (s390_asm_output_function_label): Use new
8994 * config/sh/sh.c (sh_override_options_after_change):
8995 Change type of constants.
8996 * config/spu/spu.c (spu_sched_init): Likewise.
8997 * config/sparc/sparc.c (sparc_option_override): Set default
8999 * config/visium/visium.c (visium_option_override): Likewise.
9000 * config/visium/visium.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Do not
9001 emit p2align format with last argument if it's not needed.
9002 * doc/invoke.texi: Document extended format of -falign-*.
9003 * final.c: Use align_labels alignment.
9004 * flags.h (struct target_flag_state): Change type to use
9006 (struct align_flags_tuple): New.
9007 (struct align_flags): Likewise.
9008 (align_loops_log): Redefine macro to use new types.
9009 (align_loops_max_skip): Redefine macro to use new types.
9010 (align_jumps_log): Redefine macro to use new types.
9011 (align_jumps_max_skip): Redefine macro to use new types.
9012 (align_labels_log): Redefine macro to use new types.
9013 (align_labels_max_skip): Redefine macro to use new types.
9014 (align_functions_log): Redefine macro to use new types.
9015 (align_loops): Redefine macro to use new types.
9016 (align_jumps): Redefine macro to use new types.
9017 (align_labels): Redefine macro to use new types.
9018 (align_functions): Redefine macro to use new types.
9019 (align_functions_max_skip): Redefine macro to use new types.
9020 (align_loops_value): New macro.
9021 (align_jumps_value): New macro.
9022 (align_labels_value): New macro.
9023 (align_functions_value): New macro.
9024 * function.c (invoke_set_current_function_hook): Propagate
9025 alignment values from flags to global variables default in
9027 * ipa-icf.c (sem_function::equals_wpa): Use
9028 cl_optimization_option_eq instead of memcmp.
9029 * lto-streamer.h (cl_optimization_stream_out): Support streaming
9031 (cl_optimization_stream_in): Likewise.
9032 * optc-save-gen.awk: Support strings in cl_optimization.
9033 * opth-gen.awk: Likewise.
9034 * opts.c (finish_options): Remove error checking of invalid
9036 (MAX_CODE_ALIGN): Remove.
9037 (MAX_CODE_ALIGN_VALUE): Likewise.
9038 (parse_and_check_align_values): New function.
9039 (check_alignment_argument): Likewise.
9040 (common_handle_option): Use check_alignment_argument.
9041 * opts.h (parse_and_check_align_values): Declare.
9042 * toplev.c (init_alignments): Remove.
9043 (read_log_maxskip): New.
9044 (parse_N_M): Likewise.
9045 (parse_alignment_opts): Likewise.
9046 (backend_init_target): Remove usage of init_alignments.
9047 * toplev.h (parse_alignment_opts): Declare.
9048 * tree-streamer-in.c (streamer_read_tree_bitfields): Add new
9050 * tree-streamer-out.c (streamer_write_tree_bitfields): Likewise.
9051 * tree.c (cl_option_hasher::equal): New.
9052 * varasm.c: Use new global macros.
9054 2018-07-04 Denys Vlasenko <dvlasenk@redhat.com>
9056 * config/i386/dragonfly.h: (ASM_OUTPUT_MAX_SKIP_ALIGN):
9057 Use a simpler align directive also if MAXSKIP = ALIGN-1.
9058 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
9059 * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
9060 * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
9061 * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
9062 * config/i386/freebsd.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Remove "If N
9063 is large, do at least 8 byte alignment" code. Add SUBALIGN_LOG
9064 define. Use a simpler align directive also if MAXSKIP = ALIGN-1.
9065 * config/i386/gnu-user.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
9066 * config/i386/iamcu.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
9067 * config/i386/openbsdelf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
9068 * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
9070 2018-07-04 Martin Liska <mliska@suse.cz>
9071 Jonathan Wakely <jwakely@redhat.com>
9073 * coverage.c: Use correct type.
9074 * doc/invoke.texi: Language correction.
9076 2018-07-03 H.J. Lu <hongjiu.lu@intel.com>
9079 * config/i386/i386.c (rest_of_insert_endbranch): Also generate
9080 ENDBRANCH for non-tail call which may return via indirect branch.
9081 * doc/extend.texi: Document indirect_return attribute.
9083 2018-07-03 Martin Sebor <msebor@redhat.com>
9085 PR tree-optimization/86274
9086 * gimple-ssa-sprintf.c (fmtresult::type_max_digits): Verify
9088 (format_floating): Correct handling of infinities and NaNs.
9090 2018-07-03 Martin Sebor <msebor@redhat.com>
9092 * print-tree.c (print_real_cst): New function.
9093 (print_node_brief): Call it.
9094 (print_node): Ditto.
9096 2018-07-03 Jeff Law <law@redhat.com>
9098 * config/h8300/h8300.md (logical<mode>3_sn, logical<mode>3): Merge
9099 into a single pattern.
9101 * config/h8300/h8300.md (ors code_iterator): New.
9102 (bsetqi_msx, bnotqi_msx patterns and splitters): Consolidate into
9103 a single pattern and single splitter.
9104 (bsethi_msx, bnothi_msx patterns): Consolidate into a single pattern.
9105 (iorqi3_1, xorqi3_1): Likewise.
9106 (iorqi3, xorqi3 expanders): Similarly.
9108 * config/h8300/h8300.md (movmd_internal_normal): Consolidated with
9109 (movmd_internal) into a single pattern using the P mode iterator.
9110 (movmd splitters): Similarly.
9111 (stpcpy_internal_normal, stpcpy_internal): Similarly for thes patterns.
9112 (movsd splitters): Similarly.
9114 * config/h8300/h8300.c (h8300_insn_length_from_table): Consolidate
9115 ADDB, ADDW and ADDL into a single ADD attribute which selects the
9116 right table based on the size of the operand.
9117 * config/h8300/h8300.md (length_table): Corresponding changes. All
9118 references to "addb", "addw" and "addl" changed to "add".
9119 (btst patterns): Merge two variants into a single pattern.
9120 (tstqi, tsthi): Likewise.
9121 (addhi3_incdec, addsi3_incdec): Likewise.
9122 (subhi3_h8300hs, subsi3_h8300hs): Likewise.
9123 (mulhi3, mulsi3): Likewise.
9124 (udivhi3, udivsi3): Likewise.
9125 (divhi3, divsi3): Likewise.
9126 (andorqi3, andorhi3, andorsi3): Likewise.
9128 2018-07-03 Uros Bizjak <ubizjak@gmail.com>
9131 * config/i386/sse.md (uavg<mode>3_ceil): New expander.
9132 (<sse2_avx2>_uavg<mode>3<mask_name>): Simplify expander.
9134 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
9136 PR tree-optimization/85694
9137 * config/aarch64/iterators.md (HADD, RHADD): New int iterators.
9138 (u): Handle UNSPEC_SHADD, UNSPEC_UHADD, UNSPEC_SRHADD and
9140 * config/aarch64/aarch64-simd.md (<u>avg<mode>3_floor)
9141 (<u>avg<mode>3_ceil): New patterns.
9143 2018-07-03 David Malcolm <dmalcolm@redhat.com>
9145 * gcc.dg/vect/slp-perm-1.c: Remove "note: " prefix from
9146 scan-tree-dump directive.
9147 * gcc.dg/vect/slp-perm-2.c: Likewise.
9148 * gcc.dg/vect/slp-perm-3.c: Likewise.
9149 * gcc.dg/vect/slp-perm-5.c: Likewise.
9150 * gcc.dg/vect/slp-perm-6.c: Likewise.
9151 * gcc.dg/vect/slp-perm-7.c: Likewise.
9152 * gcc.dg/vect/slp-perm-8.c: Likewise.
9154 2018-07-03 Marek Polacek <polacek@redhat.com>
9157 * gimple-fold.c (size_must_be_zero_p): Check the type of the size.
9159 2018-07-03 Richard Biener <rguenther@suse.de>
9162 * tree-ssa-structalias.c (find_func_clobbers): Properly
9163 handle indirect calls.
9165 2018-07-03 Jeff Law <law@redhat.com>
9167 * config/h8300/h8300.md (HSI, QHSI, QHSIF): New mode iterators.
9168 (shifts): New code iterator.
9169 (movqi, movhi, movsi, movsf expanders): Consolidate into a single
9170 expander. Fix HImode handling on H8/SX.
9171 (addqi3, addhi3, addsi3 expanders): Consolidate into a single expander.
9172 (subqi3, subhi3, subsi3 expanders): Likewise.
9173 (andqi3, andhi3, andsi3 expanders): Likewise.
9174 (iorqi3, iorhi3, iorsi3 expanders): Likewise.
9175 (xorqi3, xorhi3, xorsi3 expanders): Likewise.
9176 (negqi2, neghi2, negsi2, negsf2 expanders): Likewise.
9177 (one_cmplqi2, one_cmplhi2, one_cmplsi2): Likewise.
9178 (zero_extendqihi2, zero_extendqisi2): Likewise.
9179 (extendqihi2, extendqisi2): Likewise.
9180 (rotlqi3, rotlhi3, rotlsi3): Likewise.
9181 (neghi2_h8300, negsi2_h8300): Likewise for these patterns.
9182 (rotlqi3_1, rotlhi3_1): Likewise.
9183 (logicalhi3_sn, logicalsi3_sn): Likewise.
9184 (logicalhi3, logicalsi3): Likewise.
9186 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
9188 * tree-vect-patterns.c (vect_recog_rotate_pattern)
9189 (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
9190 (vect_recog_mixed_size_cond_pattern, adjust_bool_pattern_cast)
9191 (adjust_bool_pattern, vect_recog_bool_pattern): Pass the vector
9192 type to append_pattern_def_seq instead of creating a stmt_vec_info
9194 (build_mask_conversion): Likewise. Remove vinfo argument.
9195 (vect_add_conversion_to_patterm): Likewise, renaming to...
9196 (vect_add_conversion_to_pattern): ...this.
9197 (vect_recog_mask_conversion_pattern): Update call to
9198 build_mask_conversion. Pass the vector type to
9199 append_pattern_def_seq here too.
9200 (vect_recog_gather_scatter_pattern): Update call to
9201 vect_add_conversion_to_pattern.
9203 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
9205 * tree-vect-patterns.c (new_pattern_def_seq): Delete.
9206 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
9207 (vect_recog_widen_op_pattern, vect_recog_over_widening_pattern)
9208 (vect_recog_rotate_pattern, vect_synth_mult_by_constant): Don't set
9209 STMT_VINFO_PATTERN_DEF_SEQ to null here.
9210 (vect_recog_pow_pattern, vect_recog_vector_vector_shift_pattern)
9211 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern): Use
9212 append_pattern_def_seq instead of new_pattern_def_seq.
9213 (vect_recog_divmod_pattern): Do both of the above.
9214 (vect_pattern_recog_1): Assert that STMT_VINO_PATTERN_DEF_SEQ
9217 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
9219 * tree-vect-patterns.c (vect_recog_dot_prod_pattern):
9220 (vect_recog_sad_pattern, vect_recog_widen_op_pattern)
9221 (vect_recog_widen_mult_pattern, vect_recog_pow_pattern):
9222 (vect_recog_widen_sum_pattern, vect_recog_over_widening_pattern)
9223 (vect_recog_average_pattern, vect_recog_cast_forwprop_pattern)
9224 (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
9225 (vect_recog_vector_vector_shift_pattern, vect_synth_mult_by_constant)
9226 (vect_recog_mult_pattern, vect_recog_divmod_pattern)
9227 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
9228 (vect_recog_mask_conversion_pattern): Replace vec<gimple *>
9229 parameter with a single stmt_vec_info.
9230 (vect_recog_func_ptr): Likewise.
9231 (vect_recog_gather_scatter_pattern): Likewise, folding in...
9232 (vect_try_gather_scatter_pattern): ...this.
9233 (vect_pattern_recog_1): Remove stmts_to_replace and just pass
9234 the stmt_vec_info of the statement to be matched. Don't clear
9235 STMT_VINFO_RELATED_STMT.
9236 (vect_pattern_recog): Update call accordingly.
9238 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
9240 PR tree-optimization/85694
9241 * doc/md.texi (avgM3_floor, uavgM3_floor, avgM3_ceil)
9242 (uavgM3_ceil): Document new optabs.
9243 * doc/sourcebuild.texi (vect_avg_qi): Document new target selector.
9244 * internal-fn.def (IFN_AVG_FLOOR, IFN_AVG_CEIL): New internal
9246 * optabs.def (savg_floor_optab, uavg_floor_optab, savg_ceil_optab)
9247 (savg_ceil_optab): New optabs.
9248 * tree-vect-patterns.c (vect_recog_average_pattern): New function.
9249 (vect_vect_recog_func_ptrs): Add it.
9250 * tree-vect-stmts.c (vectorizable_call): Get the type of the zero
9251 constant directly from the associated lhs.
9253 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
9255 * tree-vect-patterns.c (vect_split_statement): New function.
9256 (vect_convert_input): Use it to try to split an existing cast.
9258 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
9260 * poly-int.h (print_hex): New function.
9261 * dumpfile.h (dump_dec, dump_hex): Declare.
9262 * dumpfile.c (dump_dec, dump_hex): New poly_wide_int functions.
9263 * tree-vectorizer.h (_stmt_vec_info): Add min_output_precision,
9264 min_input_precision, operation_precision and operation_sign.
9265 * tree-vect-patterns.c (vect_get_range_info): New function.
9266 (vect_same_loop_or_bb_p, vect_single_imm_use)
9267 (vect_operation_fits_smaller_type): Delete.
9268 (vect_look_through_possible_promotion): Add an optional
9269 single_use_p parameter.
9270 (vect_recog_over_widening_pattern): Rewrite to use new
9271 stmt_vec_info infomration. Handle one operation at a time.
9272 (vect_recog_cast_forwprop_pattern, vect_narrowable_type_p)
9273 (vect_truncatable_operation_p, vect_set_operation_type)
9274 (vect_set_min_input_precision): New functions.
9275 (vect_determine_min_output_precision_1): Likewise.
9276 (vect_determine_min_output_precision): Likewise.
9277 (vect_determine_precisions_from_range): Likewise.
9278 (vect_determine_precisions_from_users): Likewise.
9279 (vect_determine_stmt_precisions, vect_determine_precisions): Likewise.
9280 (vect_vect_recog_func_ptrs): Put over_widening first.
9282 (vect_pattern_recog): Call vect_determine_precisions.
9284 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
9286 * tree-vect-patterns.c (vect_mark_pattern_stmts): Remove pattern
9287 statements that have been replaced by further pattern statements.
9288 (vect_pattern_recog_1): Clear STMT_VINFO_PATTERN_DEF_SEQ on failure.
9290 2018-07-03 Richard Biener <rguenther@suse.de>
9292 * tree-vect-stmts.c (vect_is_simple_use): Consolidate dumping,
9293 always set *dt. Dump vectype in vectype overload.
9294 * dumpfile.h (dump_gimple_expr): New function.
9295 (dump_gimple_expr_loc): Likewise.
9296 * dumpfile.c (dump_gimple_expr): New function.
9297 (dump_gimple_expr_loc): Likewise.
9299 2018-07-02 Jeff Law <law@redhat.com>
9301 * config/h8300/h8300.md (movqi_h8300, movqi_h8300hs): Consolidate
9302 the H8/300, H8/300H and H8/S variants into a single pattern.
9303 (movhi_h8300, movqi_h8300hs): Similarly.
9304 (pushqi_h8300hs, pushhi_h8300hs): Consolidate into a single pattern.
9305 (QHI mode iterator): New.
9307 * config/h8300/h8300.md: Remove trailing whitespace.
9309 2018-07-02 Jim Wilson <jimw@sifive.com>
9311 * config/riscv/riscv.c (riscv_expand_epilogue): Use emit_jump_insn
9312 instead of emit_insn for interrupt returns.
9313 * config/riscv/riscv.md (riscv_met): Add (return) to rtl.
9314 (riscv_sret, riscv_uret): Likewise.
9316 2018-07-02 David Malcolm <dmalcolm@redhat.com>
9318 * pretty-print.c (selftest::test_pp_format): Move save and restore
9319 of quotes to class auto_fix_quotes, and add an instance.
9320 * selftest.c: Include "intl.h".
9321 (selftest::auto_fix_quotes::auto_fix_quotes): New ctor.
9322 (selftest::auto_fix_quotes::~auto_fix_quotes): New dtor.
9323 * selftest.h (selftest::auto_fix_quotes): New class.
9325 2018-07-02 Richard Henderson <richard.henderson@linaro.org>
9327 * config/aarch64/aarch64-protos.h, config/aarch64/aarch64.c
9328 (aarch64_sve_prepare_conditional_op): Remove.
9329 * config/aarch64/aarch64-sve.md (cond_<SVE_INT_BINARY><SVE_I>):
9330 Allow aarch64_simd_reg_or_zero as select operand; remove
9331 the aarch64_sve_prepare_conditional_op call.
9332 (cond_<SVE_INT_BINARY_SD><SVE_SDI>): Likewise.
9333 (cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
9334 (*cond_<SVE_INT_BINARY><SVE_I>_z): New pattern.
9335 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_z): New pattern.
9336 (*cond_<SVE_COND_FP_BINARY><SVE_F>_z): New pattern.
9337 (*cond_<SVE_INT_BINARY><SVE_I>_any): New pattern.
9338 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_any): New pattern.
9339 (*cond_<SVE_COND_FP_BINARY><SVE_F>_any): New pattern
9340 and a splitters to match all of the *_any patterns.
9341 * config/aarch64/predicates.md (aarch64_sve_any_binary_operator): New.
9343 * config/aarch64/iterators.md (SVE_INT_BINARY_REV): Remove.
9344 (SVE_COND_FP_BINARY_REV): Remove.
9345 (sve_int_op_rev, sve_fp_op_rev): New.
9346 * config/aarch64/aarch64-sve.md (*cond_<SVE_INT_BINARY><SVE_I>_0): New.
9347 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_0): New.
9348 (*cond_<SVE_COND_FP_BINARY><SVE_F>_0): New.
9349 (*cond_<SVE_INT_BINARY><SVE_I>_2): Rename, add movprfx alternative.
9350 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_2): Similarly.
9351 (*cond_<SVE_COND_FP_BINARY><SVE_F>_2): Similarly.
9352 (*cond_<SVE_INT_BINARY><SVE_I>_3): Similarly; use sve_int_op_rev.
9353 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_3): Similarly.
9354 (*cond_<SVE_COND_FP_BINARY><SVE_F>_3): Similarly; use sve_fp_op_rev.
9356 * config/aarch64/aarch64-sve.md (cond_<SVE_COND_FP_BINARY><SVE_F>):
9357 Remove match_dup 1 from the inner unspec.
9358 (*cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
9360 * config/aarch64/aarch64.md (movprfx): New attr.
9361 (length): Default movprfx to 8.
9362 * config/aarch64/aarch64-sve.md (*mul<SVE_I>3): Add movprfx alt.
9363 (*madd<SVE_I>, *msub<SVE_I): Likewise.
9364 (*<su>mul<SVE_I>3_highpart): Likewise.
9365 (*<SVE_INT_BINARY_SD><SVE_SDI>3): Likewise.
9366 (*v<ASHIFT><SVE_I>3): Likewise.
9367 (*<su><MAXMIN><SVE_I>3): Likewise.
9368 (*<su><MAXMIN><SVE_F>3): Likewise.
9369 (*fma<SVE_F>4, *fnma<SVE_F>4): Likewise.
9370 (*fms<SVE_F>4, *fnms<SVE_F>4): Likewise.
9371 (*div<SVE_F>4): Likewise.
9373 2018-07-02 Richard Sandiford <richard.sandiford@arm.com>
9375 * tree-vect-patterns.c (vect_recog_widen_shift_pattern): Fix typo
9378 2018-07-02 Richard Biener <rguenther@suse.de>
9380 PR tree-optimization/86363
9381 * tree-ssa-sccvn.c (vn_reference_lookup_3): Check the
9382 memset argument refers to a non-variable address.
9384 2018-07-02 Aldy Hernandez <aldyh@redhat.com>
9386 * tree-vrp.c (extract_range_from_binary_expr_1): Abstract a lot of the
9387 {PLUS,MINUS}_EXPR code to...
9388 (adjust_symbolic_bound): ...here,
9389 (combine_bound): ...here,
9390 (set_value_range_with_overflow): ...and here.
9392 2018-07-02 Aldy Hernandez <aldyh@redhat.com>
9394 * tree-vrp.c (extract_range_from_unary_expr): Abstract ABS_EXPR
9396 (extract_range_from_abs_expr): ...here.
9398 2018-07-02 Eric Botcazou <ebotcazou@adacore.com>
9400 * config/i386/i386.c (ix86_finalize_stack_frame_flags): Do not overrule
9401 -fno-omit-frame-pointer when not optimizing.
9403 2018-07-02 Martin Liska <mliska@suse.cz>
9406 * ipa-pure-const.c (malloc_candidate_p): Revert usage of ::get.
9407 (propagate_nothrow): Likewise.
9409 2018-07-02 Martin Liska <mliska@suse.cz>
9412 * ipa-inline.c (early_inliner): Revert wrongly added ::get call.
9414 2018-07-02 David Malcolm <dmalcolm@redhat.com>
9416 * dumpfile.c (dump_generic_expr_loc): Undo removal of this
9417 function in r262149, changing "loc" param from source_location to
9418 const dump_location_t &.
9419 * dumpfile.h (dump_generic_expr_loc): Undo removal of this
9420 declaration, as above.
9422 2018-07-01 Paul Koning <ni1d@arrl.net>
9424 * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
9425 -munit-asm, -mgnu-asm, -mdec-asm.
9426 * config/pdp11/pdp11-protos.h (pdp11_gen_int_label): New.
9427 (pdp11_output_labelref): New.
9428 (pdp11_output_def): New.
9429 (pdp11_output_addr_vec_elt): New.
9430 * config/pdp11/pdp11.c: Use tab between opcode and operands. Use
9431 %# and %@ format codes.
9432 (pdp11_option_override): New.
9433 (TARGET_ASM_FILE_START_FILE_DIRECTIVE): Define.
9434 (pdp11_output_ident): New.
9435 (pdp11_asm_named_section): New.
9436 (pdp11_asm_init_sections): New.
9437 (pdp11_file_start): New.
9438 (pdp11_file_end): New.
9439 (output_ascii): Use .ascii/.asciz for -mdec-asm.
9440 (pdp11_asm_print_operand): Update %# and %$ for -mdec-asm. Add
9441 %o, like %c but octal.
9442 (pdp11_option_override): New.
9443 * config/pdp11/pdp11.h (TEXT_SECTION_ASM_OP): Update for
9445 (DATA_SECTION_ASM_OP): Ditto.
9446 (READONLY_DATA_SECTION_ASM_OP): New.
9447 (IS_ASM_LOGICAL_LINE_SEPARATOR): New.
9448 (ASM_GENERATE_INTERNAL_LABEL): Use new function.
9449 (ASM_OUTPUT_LABELREF): Ditto.
9450 (ASM_OUTPUT_DEF): Ditto.
9451 (ASM_OUTPUT_EXTERNAL): New.
9452 (ASM_OUTPUT_SOURCE_FILENAME): New.
9453 (ASM_OUTPUT_ADDR_VEC_ELT): Use new function.
9454 (ASM_OUTPUT_SKIP): Update for -mdec-asm.
9455 * config/pdp11/pdp11.md: Use tab between opcode and operands. Use
9456 %# and %@ format codes.
9457 * config/pdp11/pdp11.opt (mgnu-asm): New.
9458 (mdec-asm): Conflicts with -mgnu-asm and -munix-asm.
9459 (munix-asm): Conflicts with -mdec-asm and -mgnu-asm.
9460 * doc/invoke.txt (PDP-11 Options): Add -mgnu-asm.
9462 2018-07-01 Aldy Hernandez <aldyh@redhat.com>
9464 * tree-ssa-threadupdate.c (mark_threaded_blocks): Avoid
9465 dereferencing path[] beyond its length.
9467 (debug_all_paths): New.
9468 (rewire_first_differing_edge): New.
9469 (adjust_paths_after_duplication): New.
9470 (duplicate_thread_path): Call adjust_paths_after_duplication.
9472 (thread_through_all_blocks): Add new argument to
9473 duplicate_thread_path.
9475 2018-06-30 Jim Wilson <jimw@sifive.com>
9477 * config/riscv/predicates.md (p2m1_shift_operand): New.
9478 (high_mask_shift_operand): New.
9479 * config/riscv/riscv.md (lshrsi3_zero_extend_3+1): New combiner
9480 pattern using p2m1_shift_operand.
9481 (lshsi3_zero_extend_3+2): New combiner pattern using
9482 high_mask_shift_operand.
9484 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
9486 * tree-vect-patterns.c (vect_get_external_def_edge): New function,
9488 (vect_recog_rotate_pattern): ...here.
9489 (vect_convert_input): Try to insert casts of invariants in the
9491 * tree-vect-loop-manip.c (vect_loop_versioning): Don't require the
9492 preheader to be empty.
9494 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
9496 * tree-vect-patterns.c (append_pattern_def_seq): Take an optional
9497 vector type. If given, install it in the new statement's
9499 (vect_element_precision): New function.
9500 (vect_unpromoted_value): New struct.
9501 (vect_unpromoted_value::vect_unpromoted_value): New function.
9502 (vect_unpromoted_value::set_op): Likewise.
9503 (vect_look_through_possible_promotion): Likewise.
9504 (vect_joust_widened_integer, vect_joust_widened_type): Likewise.
9505 (vect_widened_op_tree, vect_convert_input): Likewise.
9506 (vect_convert_inputs, vect_convert_output): Likewise.
9507 (vect_recog_dot_prod_pattern): Use vect_look_through_possible_promotion
9508 to handle the optional cast of the multiplication result and
9509 vect_widened_op_tree to detect the widened multiplication itself.
9510 Do not require the input and output of promotion casts to have
9511 the same sign, but base the signedness of the operation on the
9512 input rather than the result. If the pattern includes two
9513 promotions, check that those promotions have the same sign.
9514 Do not restrict the MULT_EXPR handling to a double-width result;
9515 handle quadruple-width results and wider. Use vect_convert_inputs
9516 to convert the inputs to the common type.
9517 (vect_recog_sad_pattern): Use vect_look_through_possible_promotion
9518 to handle the optional cast of the ABS result. Also allow a sign
9519 change or a sign extension between the ABS and MINUS.
9520 Use vect_widened_op_tree to detect the widened subtraction and use
9521 vect_convert_inputs to convert the inputs to the common type.
9522 (vect_handle_widen_op_by_const): Delete.
9523 (vect_recog_widen_op_pattern): New function.
9524 (vect_recog_widen_mult_pattern): Use it.
9525 (vect_recog_widen_shift_pattern): Likewise.
9526 (vect_recog_widen_sum_pattern): Use
9527 vect_look_through_possible_promotion to handle the promoted
9530 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
9532 * gimple-iterator.c (gsi_for_stmt): Add a new overload that takes
9533 the containing gimple_seq *.
9534 * gimple-iterator.h (gsi_for_stmt): Declare it.
9535 * tree-vect-patterns.c (vect_recog_dot_prod_pattern)
9536 (vect_recog_sad_pattern, vect_recog_widen_sum_pattern)
9537 (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
9538 (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
9539 (vect_recog_mask_conversion_pattern): Remove STMT_VINFO_IN_PATTERN_P
9541 (vect_init_pattern_stmt, vect_set_pattern_stmt): New functions,
9543 (vect_mark_pattern_stmts): ...here. Handle cases in which the
9544 statement being replaced is part of an existing pattern
9545 definition sequence, inserting the new pattern statements before
9547 (vect_pattern_recog_1): Don't return a bool. If the statement
9548 is already part of a pattern, instead apply pattern matching
9549 to the pattern definition statements. Don't clear the
9550 STMT_VINFO_RELATED_STMT if is_pattern_stmt_p.
9551 (vect_pattern_recog): Don't break after the first match;
9552 continue processing the pattern definition statements instead.
9553 Don't bail out for STMT_VINFO_IN_PATTERN_P here.
9555 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
9557 * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
9558 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
9559 (vect_recog_widen_sum_pattern): Use it.
9561 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
9563 * tree-vect-loop.c (vectorizable_reduction): Assert that the
9564 phi is not a pattern statement and has not been replaced by
9565 a pattern statement.
9566 * tree-vect-patterns.c (type_conversion_p): Don't check
9567 STMT_VINFO_IN_PATTERN_P.
9568 (vect_recog_vector_vector_shift_pattern): Likewise.
9569 (vect_recog_dot_prod_pattern): Expect vect_is_simple_use to return
9570 the pattern statement rather than the original statement; check
9571 directly for a WIDEN_MULT_EXPR here.
9572 * tree-vect-slp.c (vect_get_and_check_slp_defs): Expect
9573 vect_is_simple_use to return the pattern statement rather
9574 than the original statement; use is_pattern_stmt_p to check
9575 for such a pattern statement.
9576 * tree-vect-stmts.c (process_use): Expect vect_is_simple_use
9577 to return the pattern statement rather than the original statement;
9578 don't do the same transformation here.
9579 (vect_is_simple_use): If the defining statement has been replaced
9580 by a pattern statement, return the pattern statement instead.
9581 Remove the corresponding (local) transformation from the vectype
9584 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
9586 * tree-vectorizer.h (vect_is_simple_use): Move the gimple ** to the
9587 end and default to null.
9588 * tree-vect-loop.c (vect_create_epilog_for_reduction)
9589 (vectorizable_reduction): Update calls accordingly, dropping the
9590 gimple ** argument if the passed-back statement isn't needed.
9591 * tree-vect-patterns.c (vect_get_internal_def, type_conversion_p)
9592 (vect_recog_rotate_pattern): Likewise.
9593 (vect_recog_mask_conversion_pattern): Likewise.
9594 * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
9595 (vect_mask_constant_operand_p): Likewise.
9596 * tree-vect-stmts.c (is_simple_and_all_uses_invariant, process_use):
9597 (vect_model_simple_cost, vect_get_vec_def_for_operand): Likewise.
9598 (get_group_load_store_type, get_load_store_type): Likewise.
9599 (vect_check_load_store_mask, vect_check_store_rhs): Likewise.
9600 (vectorizable_call, vectorizable_simd_clone_call): Likewise.
9601 (vectorizable_conversion, vectorizable_assignment): Likewise.
9602 (vectorizable_shift, vectorizable_operation): Likewise.
9603 (vectorizable_store, vect_is_simple_cond): Likewise.
9604 (vectorizable_condition, vectorizable_comparison): Likewise.
9605 (get_same_sized_vectype, vect_get_mask_type_for_stmt): Likewise.
9606 (vect_is_simple_use): Rename the def_stmt argument to def_stmt_out
9607 and move it to the end. Cope with null def_stmt_outs.
9609 2018-06-30 Bernd Edlinger <bernd.edlinger@hotmail.de>
9611 * Makefile.in (FLAGS_TO_PASS): Add RANLIB_FOR_TARGET.
9613 2018-06-29 Jeff Law <law@redhat.com>
9615 * config/v850/v850.c (v850_legitimate_address_p): Handle large
9616 displacements for TARGET_V850E2V3 and newer.
9617 (TARGET_LRA_P): Remove. Defaults to LRA now.
9618 * config/v850/v850.md (sign23byte_load): Remove.
9619 (unsign23byte_load, sign23hword_load, unsign23hword_load): Likewise.
9620 (23word_load, 23byte_store, 23hword_store, 23word_store): Likewise.
9622 2018-06-29 Martin Liska <mliska@suse.cz>
9625 * coverage.c (coverage_init): Mangle full path name.
9626 * doc/invoke.texi: Document the change.
9627 * gcov-io.c (mangle_path): New.
9628 * gcov-io.h (mangle_path): Likewise.
9629 * gcov.c (mangle_name): Use mangle_path for path mangling.
9631 2018-06-29 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
9633 * config/arm/arm.c (output_move_double): Don't allow STRD instructions
9634 if starting source register is not even.
9636 2018-06-29 Martin Liska <mliska@suse.cz>
9638 PR tree-optimization/86263
9639 * tree-switch-conversion.c (switch_decision_tree::try_switch_expansion):
9640 Make edge redirection.
9642 2018-06-29 David Malcolm <dmalcolm@redhat.com>
9644 * dumpfile.c (dump_loc): Add indentation based on scope depth.
9645 (dump_scope_depth): New variable.
9646 (get_dump_scope_depth): New function.
9647 (dump_begin_scope): New function.
9648 (dump_end_scope): New function.
9649 * dumpfile.h (get_dump_scope_depth): New declaration.
9650 (dump_begin_scope): New declaration.
9651 (dump_end_scope): New declaration.
9652 (class auto_dump_scope): New class.
9653 (AUTO_DUMP_SCOPE): New macro.
9654 * tree-vectorizer.h (DUMP_VECT_SCOPE): Reimplement in terms of
9657 2018-06-29 Richard Biener <rguenther@suse.de>
9659 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences): Assert
9660 compute_all_dependences succeeds.
9661 * tree-vect-loop.c (vect_get_datarefs_in_loop): Fail early if we
9662 exceed --param loop-max-datarefs-for-datadeps.
9664 2018-06-29 Jakub Jelinek <jakub@redhat.com>
9666 * config/rs6000/t-rs6000: Append rs6000-modes.h to TM_H.
9668 2018-06-28 Uros Bizjak <ubizjak@gmail.com>
9671 * config/i386/sse.md (*vec_extractv4si_0_zext_sse4): Use
9672 alternative 0 in preferred_for_speed attribute.
9674 2018-06-28 Paul Koning <ni1d@arrl.net>
9676 * config/pdp11/pdp11-protos.h (pdp11_shift_length): New function.
9677 * config/pdp11/pdp11.c (pdp11_shift_length): New function.
9678 * config/pdp11/pdp11.h (ADJUST_INSN_LENGTH): Remove.
9679 * config/pdp11/pdp11.md: Correct "length" attribute calculation
9680 for shift insn patterns.
9682 2018-06-28 David Malcolm <dmalcolm@redhat.com>
9684 * cgraph.c (cgraph_node::get_body): Replace assignments to
9685 "dump_file" with calls to set_dump_file.
9686 * dumpfile.c (alt_dump_file): Make static, and group with...
9687 (alt_flags): ...this definition.
9688 (dumps_are_enabled): New variable.
9689 (refresh_dumps_are_enabled): New function.
9690 (set_dump_file): New function.
9691 (set_alt_dump_file): New function.
9692 (gcc::dump_manager::dump_start): Replace assignments to
9693 "dump_file" and "alt_dump_file" with calls to set_dump_file and
9695 (gcc::dump_manager::dump_finish): Likewise.
9696 * dumpfile.h (alt_dump_file): Delete decl.
9697 (dumps_are_enabled): New variable decl.
9698 (set_dump_file): New function decl.
9699 (dump_enabled_p): Rewrite in terms of new "dumps_are_enabled"
9701 * tree-nested.c (lower_nested_functions): Replace assignments to
9702 "dump_file" with calls to set_dump_file.
9704 2018-06-28 Eric Botcazou <ebotcazou@adacore.com>
9706 * tree-cfg.c (verify_gimple_in_cfg): Call verify_location on the
9707 goto_locus of each outgoing edge of each basic block.
9709 2018-06-28 Richard Biener <rguenther@suse.de>
9711 * dwarf2out.c (decl_scope_table): Remove.
9712 (push_decl_scope): Likewise.
9713 (pop_decl_scope): Likewise.
9714 (gen_type_die_for_member): Do not call push/pop_decl_scope.
9715 (gen_struct_or_union_type_die): Likewise.
9716 (gen_tagged_type_die): Likewise.
9717 (dwarf2out_init): Do not initialize decl_scope_table.
9718 (dwarf2out_c_finalize): Do not free it.
9720 2018-06-28 Richard Biener <rguenther@suse.de>
9722 * dwarf2out.c (gen_subprogram_die): Use is_unit_die when
9723 deciding whether to not re-use a DIE.
9725 2018-06-28 Richard Biener <rguenther@suse.de>
9727 * dwarf2out.c (gen_subprogram_die): Always re-use DIEs with an
9728 DW_AT_abstract_origin attribute.
9730 2018-06-28 Martin Liska <mliska@suse.cz>
9732 * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
9733 Use newly introduced constants.
9734 * tree-switch-conversion.h (struct jump_table_cluster):
9735 Define max_ratio_for_size and max_ratio_for_speed.
9737 2018-06-28 Martin Liska <mliska@suse.cz>
9739 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
9740 Add new checking assert to catch invalid state.
9741 (jump_table_cluster::can_be_handled): Handle single case
9743 (jump_table_cluster::is_beneficial): Bail out for such case.
9744 (bit_test_cluster::find_bit_tests):
9745 Add new checking assert to catch invalid state.
9746 (bit_test_cluster::can_be_handled): Handle single case
9748 (bit_test_cluster::is_beneficial): Bail out for such case.
9749 (switch_decision_tree::analyze_switch_statement):
9752 2018-06-28 Martin Liska <mliska@suse.cz>
9754 * common.opt: Introduce -completion option.
9755 * gcc.c (driver_handle_option): Handle it.
9756 (driver::main): Print completions if completion
9758 * opt-suggestions.c (option_proposer::get_completions):
9760 (option_proposer::suggest_completion): Likewise.
9761 (option_proposer::find_param_completions): Likewise.
9762 (verify_autocompletions): Likewise.
9763 (test_completion_valid_options): Likewise.
9764 (test_completion_valid_params): Likewise.
9765 (in_completion_p): Likewise.
9766 (empty_completion_p): Likewise.
9767 (test_completion_partial_match): Likewise.
9768 (test_completion_garbage): Likewise.
9769 (opt_proposer_c_tests): Likewise.
9770 * opt-suggestions.h: Declare new functions.
9771 * opts.c (common_handle_option): Handle OPT__completion_.
9772 * selftest-run-tests.c (selftest::run_tests): Add
9773 opt_proposer_c_tests.
9774 * selftest.c (assert_str_startswith): New.
9775 * selftest.h (assert_str_startswith): Likewise.
9776 (opt_proposer_c_tests): New.
9777 (ASSERT_STR_STARTSWITH): Likewise.
9779 2018-06-28 Martin Liska <mliska@suse.cz>
9781 * Makefile.in: Add opt-suggestions.o.
9782 * gcc-main.c: Include opt-suggestions.h.
9783 * gcc.c (driver::driver): Likewise.
9784 (driver::~driver): Remove m_option_suggestions.
9785 (driver::build_option_suggestions): Moved to option_proposer.
9786 (driver::suggest_option): Likewise.
9787 (driver::handle_unrecognized_options): Use option_proposer.
9788 * gcc.h (class driver): Add new memver m_option_proposer.
9789 * opt-suggestions.c: New file.
9790 * opt-suggestions.h: New file.
9792 2018-06-28 Martin Liska <mliska@suse.cz>
9794 * vec.h (class auto_string_vec): New (moved from auto_argvec).
9795 (auto_string_vec::~auto_string_vec): Likewise.
9797 2018-06-28 Eric Botcazou <ebotcazou@adacore.com>
9799 * tree-inline.h (struct copy_body_data): Move remapping_type_depth and
9800 prevent_decl_creation_for_types fields up and add reset_location field.
9801 * tree-inline.c (remap_gimple_stmt): Force input_location on the new
9802 statement if id->reset_location is true.
9803 (copy_edges_for_bb): Do not set goto_locus on the new edges if
9804 id->reset_location is true.
9805 (copy_phis_for_bb): Force input_location on the arguments if
9806 id->reset_location is true.
9807 (expand_call_inline): Set id->reset_location if DECL_IGNORED_P
9808 is set on the function to be inlined.
9810 2018-06-27 Stephan Bergmann <sbergman@redhat.com>
9812 * doc/invoke.texi (Debugging Options): Add -gsplit-dwarf.
9814 2018-06-27 Dimitar Dimitrov <dimitar@dinux.eu>
9816 * lra-eliminations.c (update_reg_eliminate): Mark all spanning hard
9817 registers for Pmode.
9818 * lra-lives.c (check_pseudos_live_through_calls): Mark all spanning
9819 hard registers for the clobbered pseudo.
9821 2018-06-27 Paul Koning <ni1d@arrl.net>
9823 * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
9824 mutually exclusive options.
9825 * config/pdp11/constraints.md (h): New constraint.
9826 (O): Update definition to match shift code generation.
9827 (D): New constraint.
9828 * config/pdp11/pdp11-modes.def (CCNZ): Define mode.
9830 * config/pdp11/pdp11-protos.h (int_no_side_effect_operand): New
9832 (output_jump): Change arguments.
9833 (pdp11_fixed_cc_regs): New function.
9834 (pdp11_cc_mode): Ditto.
9835 (pdp11_expand_shift): Ditto.
9836 (pdp11_assemble_shift): Ditto.
9837 (pdp11_small_shift): Ditto.
9838 (pdp11_branch_cost): Remove.
9839 * config/pdp11/pdp11.c (pdp11_assemble_integer): Remove comments
9841 (pdp11_register_move_cost): Update for CC registers.
9842 (pdp11_rtx_costs): Add case for LSHIFTRT.
9843 (pdp11_output_jump): Add CCNZ mode conditional branches.
9844 (notice_update_cc_on_set): Remove.
9845 (pdp11_cc_mode): New function.
9846 (simple_memory_operand): Correct pre/post decrement case.
9847 (no_side_effect_operand): New function.
9848 (pdp11_regno_reg_class): Add CC_REGS class.
9849 (pdp11_fixed_cc_regs): New function.
9850 (pdp11_small_shift): New function.
9851 (pdp11_expand_shift): New function to expand shift insns.
9852 (pdp11_assemble_shift): New function to output shifts.
9853 (pdp11_branch_cost): Remove.
9854 (pdp11_modes_tieable_p): Make QI/HI modes tieable.
9855 * config/pdp11/pdp11.h (SIZE_TYPE): Ensure 16-bit type.
9856 (WCHAR_TYPE): Ditto.
9857 (PTRDIFF_TYPE): Ditto.
9858 (ADJUST_INSN_LENGTH): New macro.
9859 (FIXED_REGISTERS): Add CC registers.
9860 (CALL_USED_REGISTERS): Ditto.
9862 (REG_CLASS_NAMES): Ditto.
9863 (REG_CLASS_CONTENTS): Ditto.
9864 (SELECT_CC_MODE): Use new function.
9865 (TARGET_FLAGS_REGNUM): New macro.
9866 (TARGET_FIXED_CONDITION_CODE_REGS): Ditto.
9867 (cc0_reg_rtx): Remove.
9868 (CC_STATUS_MDEP): Remove.
9869 (CC_STATUS_MDEFP_INIT): Remove.
9870 (CC_IN_FPU): Remove.
9871 (NOTICE_UPDATE_CC): Remove.
9872 (REGISTER_NAMES): Add CC registers.
9873 (BRANCH_COST): Change to constant 1.
9874 * config/pdp11/pdp11.md: Rewrite for CCmode condition code
9876 * config/pdp11/pdp11.opt (mbcopy): Remove.
9877 (mbcopy-builtin): Remove.
9878 (mbranch-cheap): Remove.
9879 (mbranch-expensive): Remove.
9880 * config/pdp11/predicates.md (expand_shift_operand): Update to
9881 match shift code generation.
9882 (ccnz_operator): New predicate.
9883 * doc/invoke.texi (PDP-11 Options): Remove deleted options
9884 -mbcopy, -mbcopy-builtin, -mbranch-cheap, -mbranch-expensive.
9885 Remove non-existent option -mabshi, -mno-abshi. Document mutually
9887 * doc/md.texi (PDP-11): Document new D and h constraints. Update
9888 description of O constraint.
9890 2018-06-27 Jeff Law <law@redhat.com>
9891 Austin Law <austinklaw@gmail.com>
9893 * config/v850/v850.md (addsi3_set_flags): New pattern.
9894 (subsi3_set_flags, negsi2_set_flags, andsi3_set_flags): Likewise.
9895 (iorsi3_set_flags, xorsi3_set_flags, one_cmplsi2_set_flags): Likewise.
9896 (zero_extendhisi2_v850_set_flags): Likewise.
9897 (zero_extendqisi2_v850_set_flags): Likewise.
9898 (ashlsi3_set_flags, ashlsi3_v850e2_set_flags): Likewise.
9899 (lshrsi3_set_flags, lshrsi3_v850e2_set_flags): Likewise.
9900 (ashrsi3_set_flags, ashrsi3_v850e2_set_flags): Likewise.
9902 * config/v850/v850-protos.h (notice_update_cc): Remove.
9903 * config/v850/v850.c (v850_compare_op0, v850_compare_op1): Remove.
9904 (v850_print_operand): Handle 'D' and "d".
9905 (v850_select_cc_mode): Remove ATTRIBUTE_UNUSED for last argument.
9906 Add handling of arithmetic/logical operations compared against zero.
9907 (v850_gen_float_compare): Remove ATTRIBUTE_UNUSED for last argument.
9908 Do not look at v850_compare_op, instead get mode from last argument.
9909 (v850_gen_compare): Remove
9910 (increment_stack): Use addsi3_clobber_flags to avoid splitting failure
9911 after reload for prologue insns.
9912 (expand_prologue): Account for CLOBBER of CC_REGNUM in various
9914 (construct_save_jarl): Likewise.
9915 (TARGET_FLAGS_REGNUM): Define.
9916 * config/v850/v850.h (v850_compare_op0, v850_compare_op1): Remove.
9917 (NOTICE_UPDATE_CC): Remove.
9918 * config/v850/v850.md (v850_tst1): Use (reg:CCZ CC_REGNUM) rather
9919 than cc0. Conditionalize on reload_completed.
9920 (cmpsi_insn, setfcc_insn): Likewise.
9921 (tst1 splitter): Turn into define_and_split which sets the flags
9923 (cstoresi4, cbranchsf4, cbranchdf4, cbranchsi4_insn): Likewise.
9924 (cbranchsi4, branch_normal, branch_invert): Do not expose cc0 here.
9925 (cstoresf4, cstoredf4): Clobber the flags.
9926 (cmpsi, cmpsf, cmpdf): Remove expanders.
9927 (setf_insn): Remove pattern.
9928 (addsi3): Turn into define_and_split which clobbers the flags after
9929 reload and a suitable pattern (addsi3_clobber_flags) for use after
9931 (subsi3, negsi2, andsi3, iorsi3, xorsi3, one_cmplsi2) Likewise.
9932 (ashlsi3, ashlsi3_v850e2, lshrsi3, lsh4si3_v850e2): Likewise.
9933 (ashrsi3, ashrsi3_v850e2): Likewise.
9934 (bins): Clobber the flags.
9935 (movsicc_normal_cc, movsicc_normal, movsicc_tst1): Likewise.
9936 (movsicc_tst1_revesed, sasf, swap and rotate patterns): Likewise.
9937 (fix_loop_counter, call_internal_short, call_internal_long): Likewise.
9938 (call_value_internal_short, call_value_internal_long): Likewise.
9939 (callt_save_interrupt, callt_return_interrupt): Likewise.
9940 (save_interrupt, return_interrupt): Likewise.
9941 (callt_save_all_interrupt, save_all_interrupt): Likewise.
9942 (_save_all_interrupt, callt_restore_all_interrupt): Likewise.
9943 (restore_all_interrupt, _restore_all_interrupt): Likewise.
9944 (All FP comparisons): Only allow after reload has completed.
9946 (divh, divhu): Tweak output template.
9947 (branch_z_normal, branch_z_invert): Remove
9948 (branch_nz_normal, branch_nz_invert): Likewise.
9949 (extendhisi_insn, extendqisi_insn): Do not clobber flags.
9951 * config/v850/v850-modes.def (CCZ, CCNZ): Add new modes.
9952 * config/v850/v850.c (notice_update_cc): Remove.
9953 * config/v850/v850.h (CC_OVERFLOW_UNUSABLE): Remove
9954 (CC_NO_CARRY): Likewise.
9955 (NOTICE_UPDATE_CC): Define to nothing.
9956 * config/v850/v850.md: Remove block comment on cc0 handling
9957 Remove "cc" attribute from all patterns. Remove cc_status handling
9958 from all patterns. Minor formatting fixes.
9960 2018-06-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
9962 * config/aarch64/aarch64-cores.def (cortex-a76): New entry.
9963 (cortex-a76.cortex-a55): Likewise.
9964 * config/aarch64/aarch64-tune.md: Regenerate.
9965 * doc/invoke.texi (AArch64 Options): Document cortex-a76 and
9966 cortex-a76.cortex-a55.
9968 2018-06-27 Jeff Law <law@redhat.com>
9970 * config/v850/t-v850 (MULTILIB_OPTIONS): Remove 8byte-align.
9971 (MULTILIB_DIRNAMES): Similarly.
9973 2018-06-27 Eric Botcazou <ebotcazou@adacore.com>
9975 * gimple.h (gimple_return_retbnd): Delete.
9976 (gimple_return_set_retbnd): Likewise.
9977 * cgraphunit.c (cgraph_node::expand_thunk): Remove call to
9978 gimple_return_set_retbnd.
9979 * gimple-pretty-print.c (dump_gimple_return): Remove call to
9980 gimple_return_retbnd and adjust.
9981 * tree-inline.h (struct copy_body_data): Remove retbnd field.
9982 * tree-inline.c (remap_gimple_stmt): Remove handling of retbnd.
9983 Explicitly return NULL in a couple more cases. Move assertion
9984 on debug statements and remove unreachable code.
9985 (reset_debug_binding): Do not test id->retbnd.
9986 (expand_call_inline): Do not set it.
9988 2018-06-27 Rasmus Villemoes <rv@rasmusvillemoes.dk>
9990 * configure.ac: Add --disable-gcov option.
9991 * configure: Regenerate.
9992 * Makefile.in: Honour @enable_gcov@.
9993 * doc/install.texi: Document --disable-gcov.
9995 2018-06-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
9997 * config/arm/arm-cpus.in (cortex-a76): New entry.
9998 (cortex-a76.cortex-a55): Likewise.
9999 * config/arm/arm-tables.opt: Regenerate.
10000 * config/arm/arm-tune.md: Likewise.
10001 * config/arm/driver-arm.c (arm_cpu_table): Add Cortex-A76 entry.
10002 * doc/invoke.texi (ARM Options): Document cortex-a76 and
10003 cortex-a76.cortex-a55.
10005 2018-06-27 Tamar Christina <tamar.christina@arm.com>
10008 * config/aarch64/aarch64.md (*movhf_aarch64): Add dup v0.4h pattern.
10010 2018-06-27 Siddhesh Poyarekar <siddhesh@sourceware.org>
10012 * config/aarch64/aarch64.h (CALL_USE_REGISTERS): Fix obsolete
10014 (EPILOGUE_USES): Likewise.
10016 2018-06-26 Eric Botcazou <ebotcazou@adacore.com>
10018 * tree-inline.c (remap_location): New function extracted from...
10019 (copy_edges_for_bb): Add ID parameter. Remap goto_locus.
10020 (copy_phis_for_bb): ...here. Call remap_location.
10021 (copy_cfg_body): Adjust call to copy_edges_for_bb.
10023 2018-06-26 Aaron Sawdey <acsawdey@linux.ibm.com>
10025 * config/rs6000/rs6000-string.c (expand_block_clear): Don't use
10026 unaligned vsx for 16B memset.
10028 2018-06-26 Segher Boessenkool <segher@kernel.crashing.org>
10031 * config/rs6000/rs6000.c (rs6000_init_builtins): Do not set
10032 ieee128_float_type_node to long_double_type_node unless
10033 TARGET_LONG_DOUBLE_128 is set.
10035 2018-06-26 David Malcolm <dmalcolm@redhat.com>
10037 * cfgloop.c (get_loop_location): Convert return type from
10038 location_t to dump_user_location_t, replacing INSN_LOCATION lookups
10039 by implicit construction from rtx_insn *, and using
10040 dump_user_location_t::from_function_decl for the fallback case.
10041 * cfgloop.h (get_loop_location): Convert return type from
10042 location_t to dump_user_location_t.
10043 * cgraphunit.c (walk_polymorphic_call_targets): Update call to
10044 dump_printf_loc to pass in a dump_location_t rather than a
10045 location_t, via the gimple stmt.
10046 * coverage.c (get_coverage_counts): Update calls to
10047 dump_printf_loc to pass in dump_location_t rather than a
10049 * doc/optinfo.texi (Dump types): Convert example of
10050 dump_printf_loc from taking "locus" to taking "insn". Update
10051 description of the "_loc" calls to cover dump_location_t.
10052 * dumpfile.c: Include "backend.h", "gimple.h", "rtl.h", and
10054 (dump_user_location_t::dump_user_location_t): New constructors,
10055 from gimple *stmt and rtx_insn *.
10056 (dump_user_location_t::from_function_decl): New function.
10057 (dump_loc): Make static.
10058 (dump_gimple_stmt_loc): Convert param "loc" from location_t to
10059 const dump_location_t &.
10060 (dump_generic_expr_loc): Delete.
10061 (dump_printf_loc): Convert param "loc" from location_t to
10062 const dump_location_t &.
10063 (selftest::test_impl_location): New function.
10064 (selftest::dumpfile_c_tests): New function.
10065 * dumpfile.h: Include "profile-count.h".
10066 (class dump_user_location_t): New class.
10067 (struct dump_impl_location_t): New struct.
10068 (class dump_location_t): New class.
10069 (dump_printf_loc): Convert 2nd param from source_location to
10070 const dump_location_t &.
10071 (dump_generic_expr_loc): Delete.
10072 (dump_gimple_stmt_loc): Convert 2nd param from source_location to
10073 const dump_location_t &.
10074 * gimple-fold.c (fold_gimple_assign): Update call to
10075 dump_printf_loc to pass in a dump_location_t rather than a
10076 location_t, via the gimple stmt.
10077 (gimple_fold_call): Likewise.
10078 * gimple-loop-interchange.cc
10079 (loop_cand::analyze_iloop_reduction_var): Update for change to
10080 check_reduction_path.
10081 (tree_loop_interchange::interchange): Update for change to
10082 find_loop_location.
10083 * graphite-isl-ast-to-gimple.c (scop_to_isl_ast): Update for
10084 change in return-type of find_loop_location.
10085 (graphite_regenerate_ast_isl): Likewise.
10086 * graphite-optimize-isl.c (optimize_isl): Likewise.
10087 * graphite.c (graphite_transform_loops): Likewise.
10088 * ipa-devirt.c (ipa_devirt): Update call to dump_printf_loc to
10089 pass in a dump_location_t rather than a location_t, via the
10091 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
10092 * ipa.c (walk_polymorphic_call_targets): Likewise.
10093 * loop-unroll.c (report_unroll): Convert "locus" param from
10094 location_t to dump_location_t.
10095 (decide_unrolling): Update for change to get_loop_location's
10097 * omp-grid.c (struct grid_prop): Convert field "target_loc" from
10098 location_t to dump_user_location_t.
10099 (grid_find_single_omp_among_assignments_1): Updates calls to
10100 dump_printf_loc to pass in a dump_location_t rather than a
10101 location_t, via the gimple stmt.
10102 (grid_parallel_clauses_gridifiable): Convert "tloc" from
10103 location_t to dump_location_t. Updates calls to dump_printf_loc
10104 to pass in a dump_location_t rather than a location_t, via the
10106 (grid_inner_loop_gridifiable_p): Likewise.
10107 (grid_dist_follows_simple_pattern): Likewise.
10108 (grid_gfor_follows_tiling_pattern): Likewise.
10109 (grid_target_follows_gridifiable_pattern): Likewise.
10110 (grid_attempt_target_gridification): Convert initialization
10111 of local "grid" from memset to zero-initialization; FIXME: does
10112 this require C++11? Update call to dump_printf_loc to pass in a
10113 optinfo_location rather than a location_t, via the gimple stmt.
10114 * profile.c (read_profile_edge_counts): Updates call to
10115 dump_printf_loc to pass in a dump_location_t rather than a
10117 (compute_branch_probabilities): Likewise.
10118 * selftest-run-tests.c (selftest::run_tests): Call
10120 * selftest.h (dumpfile_c_tests): New decl.
10121 * tree-loop-distribution.c (pass_loop_distribution::execute):
10122 Update for change in return type of find_loop_location.
10123 * tree-parloops.c (parallelize_loops): Likewise.
10124 * tree-ssa-loop-ivcanon.c (try_unroll_loop_completely): Convert
10125 "locus" from location_t to dump_user_location_t.
10126 (canonicalize_loop_induction_variables): Likewise.
10127 * tree-ssa-loop-ivopts.c (tree_ssa_iv_optimize_loop): Update
10128 for change in return type of find_loop_location.
10129 * tree-ssa-loop-niter.c (number_of_iterations_exit): Update call
10130 to dump_printf_loc to pass in a dump_location_t rather than a
10131 location_t, via the stmt.
10132 * tree-ssa-sccvn.c (eliminate_dom_walker::before_dom_children):
10134 * tree-vect-loop-manip.c (find_loop_location): Convert return
10135 type from source_location to dump_user_location_t.
10136 (vect_do_peeling): Update for above change.
10137 (vect_loop_versioning): Update for change in type of
10139 * tree-vect-loop.c (check_reduction_path): Convert "loc" param
10140 from location_t to dump_user_location_t.
10141 (vect_estimate_min_profitable_iters): Update for change in type
10143 * tree-vect-slp.c (vect_print_slp_tree): Convert param "loc" from
10144 location_t to dump_location_t.
10145 (vect_slp_bb): Update for change in type of vect_location.
10146 * tree-vectorizer.c (vect_location): Convert from source_location
10147 to dump_user_location_t.
10148 (try_vectorize_loop_1): Update for change in vect_location's type.
10149 (vectorize_loops): Likewise.
10150 (increase_alignment): Likewise.
10151 * tree-vectorizer.h (vect_location): Convert from source_location
10152 to dump_user_location_t.
10153 (find_loop_location): Convert return type from source_location to
10154 dump_user_location_t.
10155 (check_reduction_path): Convert 1st param from location_t to
10156 dump_user_location_t.
10157 * value-prof.c (check_counter): Update call to dump_printf_loc to
10158 pass in a dump_user_location_t rather than a location_t; update
10159 call to error_at for change in type of "locus".
10160 (check_ic_target): Update call to dump_printf_loc to
10161 pass in a dump_user_location_t rather than a location_t, via the
10164 2018-06-26 Robin Dapp <rdapp@linux.vnet.ibm.com>
10166 * config/s390/s390.h (enum processor_flags): Do not use
10167 default tune parameter when -march was specified.
10169 2018-06-26 Jakub Jelinek <jakub@redhat.com>
10172 * config/i386/i386.md (setcc + movzbl to xor + setcc peephole2s):
10173 Check reg_overlap_mentioned_p in addition to reg_set_p with the same
10176 2018-06-26 Richard Biener <rguenther@suse.de>
10178 PR tree-optimization/86287
10180 * tree-vect-loop.c (vect_transform_loop_stmt): Fix read-after-free.
10181 (vect_analyze_loop): Initialize n_stmts.
10183 2018-06-26 Richard Biener <rguenther@suse.de>
10185 PR middle-end/86271
10186 * fold-const.c (fold_convertible_p): Pointer extension
10189 2018-06-26 Alexandre Oliva <aoliva@redhat.com>
10192 * dwarf2out.c (loc_list_has_views): Adjust comments.
10193 (dw_loc_list): Split single cross-partition range with
10196 2018-06-25 Jeff Law <law@redhat.com>
10198 * common/config/v850/v850-common.c (TARGET_DEFAULT_TARGET_FLAGS): Turn
10199 on -mbig-switch by default.
10201 * config/v850/predicates.md (const_float_1_operand): Fix match_code
10203 (const_float_0_operand): Remove unused predicate.
10204 * config/v850/v850.md (define_constants): Remove UNSPEC_LOOP.
10205 (define_c_enum unspec): Add LOOP, RCP and RSQRT constants.
10206 (recipsf2): New expander. Original pattern now called
10208 (recipdf2, recipdf2_insn): Similarly.
10209 (rsqrtsf2, rsqrtsf2_insn): Similarly
10210 (rsqrtdf2, rsqrtdf2_insn): Similarly
10212 2018-06-26 Gerald Pfeifer <gerald@pfeifer.com>
10214 * ginclude/stddef.h: Remove an obsolete comment on FreeBSD 5.
10215 Simplify logic for FreeBSD (twice).
10217 2018-06-25 Martin Sebor <msebor@redhat.com>
10219 PR tree-optimization/86204
10220 * tree-ssa-strlen.c (handle_builtin_strlen): Avoid storing
10221 a strnlen result if it's less than the length of the string.
10223 2018-06-25 Martin Sebor <msebor@redhat.com>
10225 PR tree-optimization/85700
10226 * gimple-fold.c (gimple_fold_builtin_strncat): Adjust comment.
10227 * tree-ssa-strlen.c (is_strlen_related_p): Handle integer subtraction.
10228 (maybe_diag_stxncpy_trunc): Distinguish strncat from strncpy.
10230 2018-06-25 Martin Sebor <msebor@redhat.com>
10232 * doc/extend.texi (Zero-length arrays): Update and clarify.
10234 2018-06-25 Michael Meissner <meissner@linux.ibm.com>
10236 * config.gcc (powerpc64le*): Revert January 16th, 2018 patch that
10237 added IEEE/IBM long double multilib support on PowerPC little
10238 endian Linux systems.
10239 * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Likewise.
10240 (MULTILIB_DEFAULTS): Likewise.
10241 * config/rs6000/rs6000.c (rs6000_option_override_internal):
10243 * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Likewise.
10244 * config/rs6000/t-ldouble-linux64le-ibm: Delete, no longer used.
10245 * config/rs6000/t-ldouble-linux64le-ieee: Delete, no longer used.
10247 2018-06-25 Alexander Monakov <amonakov@ispras.ru>
10249 PR middle-end/86311
10250 * sort.cc (REORDER_23): Avoid memcpy with same destination and source.
10251 (REORDER_45): Likewise.
10253 2018-06-25 Jeff Law <law@redhat.com>
10255 * config/v850/v850.md (divmodhi4): Make sure to sign extend the
10256 dividend to 32 bits. Adjust length.
10257 (udivmodhi4): Cleanup output template. Fix length.
10259 2018-06-25 Carl Love <cel@us.ibm.com>
10261 * config/rs6000/vsx.md: Change word selector to prefered location.
10263 2018-06-25 Richard Biener <rguenther@suse.de>
10265 PR tree-optimization/86304
10266 * tree-vectorizer.c (vectorize_loops): Walk over new possibly
10267 epilogue-if-converted loops as well.
10269 2018-06-25 Jan Hubicka <hubicka@ucw.cz>
10271 * lto-section-out.c (lto_begin_section): Do not print section
10272 name for noaddr and unnumbered dumps.
10274 2018-06-25 Richard Biener <rguenther@suse.de>
10276 * tree-vectorizer.h (struct vec_info_shared): New structure
10277 with parts split out from struct vec_info and loop_nest from
10278 struct _loop_vec_info.
10279 (struct vec_info): Adjust accordingly.
10280 (struct _loop_vec_info): Likewise.
10281 (LOOP_VINFO_LOOP_NEST): Adjust.
10282 (LOOP_VINFO_DATAREFS): Likewise.
10283 (LOOP_VINFO_DDRS): Likewise.
10284 (struct _bb_vec_info): Likewise.
10285 (BB_VINFO_DATAREFS): Likewise.
10286 (BB_VINFO_DDRS): Likewise.
10287 (struct _stmt_vec_info): Add dr_aux member.
10288 (DR_VECT_AUX): Adjust to refer to member of DR_STMTs vinfo.
10289 (DR_MISALIGNMENT_UNINITIALIZED): New.
10290 (set_dr_misalignment): Adjust.
10291 (dr_misalignment): Assert misalign isn't DR_MISALIGNMENT_UNINITIALIZED.
10292 (vect_analyze_loop): Adjust prototype.
10293 (vect_analyze_loop_form): Likewise.
10294 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
10295 Compute dependences lazily.
10296 (vect_record_base_alignments): Use shared datarefs/ddrs.
10297 (vect_verify_datarefs_alignment): Likewise.
10298 (vect_analyze_data_refs_alignment): Likewise.
10299 (vect_analyze_data_ref_accesses): Likewise.
10300 (vect_analyze_data_refs): Likewise.
10301 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Add
10302 constructor parameter for shared part.
10303 (vect_analyze_loop_form): Pass in shared part and adjust.
10304 (vect_analyze_loop_2): Pass in storage for the number of
10305 stmts. Move loop nest finding to the caller. Compute
10307 (vect_analyze_loop): Pass in shared part.
10308 (vect_transform_loop): Verify shared datarefs are unchanged.
10309 * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Add
10310 constructor parameter for shared part.
10311 (vect_slp_analyze_bb_1): Pass in shared part and adjust.
10312 (vect_slp_bb): Verify shared datarefs are unchanged before
10314 * tree-vect-stmts.c (ensure_base_align): Adjust for DR_AUX
10316 (new_stmt_vec_info): Initialize DR_AUX misalignment to
10317 DR_MISALIGNMENT_UNINITIALIZED.
10318 * tree-vectorizer.c (vec_info::vec_info): Add constructor
10319 parameter for shared part.
10320 (vec_info::~vec_info): Adjust.
10321 (vec_info_shared::vec_info_shared): New.
10322 (vec_info_shared::~vec_info_shared): Likewise.
10323 (vec_info_shared::save_datarefs): Likewise.
10324 (vec_info_shared::check_datarefs): Likewise.
10325 (try_vectorize_loop_1): Construct shared part live for analyses
10326 of a single loop for multiple vector sizes.
10327 * tree-parloops.c (gather_scalar_reductions): Adjust.
10329 2018-06-25 Richard Biener <rguenther@suse.de>
10331 * tree-vect-data-refs.c (vect_find_stmt_data_reference): Modify
10332 DR for SIMD lane accesses here and mark DR with (void *)-1 aux.
10333 (vect_analyze_data_refs): Remove similar code from here and
10334 simplify accordingly.
10336 2018-06-25 Richard Biener <rguenther@suse.de>
10338 * tree-vect-data-refs.c (vect_check_gather_scatter): Fail
10339 for reverse storage order accesses rather than asserting
10340 they cannot happen here.
10342 2018-06-25 Tom de Vries <tdevries@suse.de>
10345 * config/i386/i386.md (define_insn "*tls_global_dynamic_64_<mode>"):
10346 Use data16 instead of .byte for insn prefix.
10348 2018-06-25 Andreas Krebbel <krebbel@linux.ibm.com>
10351 * parser.c (make_char_string_pack): Pass this literal chars
10352 through cpp_interpret_string.
10353 (cp_parser_userdef_numeric_literal): Check the result of
10354 make_char_string_pack.
10356 2018-06-24 Maya Rashish <coypu@sdf.org>
10358 * ginclude/stddef.h: Simplify conditions around avoiding
10359 re-definition of __size_t.
10361 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
10363 * lto-streamer-out.c (tree_is_indexable): Make LABEL_DECL nonindexable
10364 unless it is forced or nonlocal; assert that we stream no IMPORTED_DECL.
10366 2018-06-22 Maya Rashish <coypu@sdf.org>
10368 * doc/invoke.texi (mno-fancy-math-387): Update for changes
10369 made to OpenBSD and NetBSD through the years.
10371 2018-06-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
10373 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
10374 behavior of vec_pack (vector double, vector double) to match
10375 behavior of vec_float2 (vector double, vector double).
10377 2018-06-22 Olivier Hainque <hainque@adacore.com>
10379 * gimplify.c (gimplify_function_tree): Prevent creation
10380 of a trampoline for the address of the current function
10381 passed to entry/exit instrumentation hooks.
10383 2018-06-22 Aaron Sawdey <acsawdey@linux.ibm.com>
10386 * config/rs6000/rs6000-string.c (expand_strn_compare): Handle -m32
10389 2018-06-22 Martin Liska <mliska@suse.cz>
10391 PR tree-optimization/86263
10392 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
10393 Bail out if is_enabled is false.
10394 * tree-switch-conversion.h (jump_table_cluster::is_enabled):
10396 (jump_table_cluster::is_enabled): New function.
10398 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
10400 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
10401 BINFO_BASE_ACCESSES and BINFO_VPTR_FIELD.
10402 * tree-streamer-in.c (streamer_read_tree_bitfields): Likewise.
10403 (lto_input_ts_binfo_tree_pointers): Likewise.
10404 * tree-streamer-out.c (streamer_write_tree_bitfields,
10405 write_ts_binfo_tree_pointers): Likewise.
10406 * tree.c (free_lang_data_in_binfo): Clear BINFO_VPTR_FIELD.
10408 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
10410 * tree.c (free_lang_data_in_type): Free all TYPE_VFIELDs.
10412 2018-06-22 Martin Liska <mliska@suse.cz>
10414 * symbol-summary.h (get): Make it pure and inline move
10415 functionality from ::get function.
10416 (get): Remove and inline into ::get and ::get_create.
10417 (get_create): Move code from ::get function.
10419 2018-06-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
10422 * config/i386/sol2.h (CPP_SPEC): Don't pass -P for
10423 -x assembler-with-cpp.
10425 2018-06-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
10427 * config/sol2.h (TARGET_OS_CPP_BUILTINS): Define
10428 _FILE_OFFSET_BITS=64 for C++.
10430 2018-06-21 Michael Meissner <meissner@linux.ibm.com>
10432 * config/rs6000/rs6000.md (extendtfif2): Add missing 128-bit
10433 conversion insn that shows up when pr85657-3.c is compiled using
10434 IEEE 128-bit long double.
10435 (neg<mode>2_internal): Use the correct mode to check whether the
10436 mode is IBM extended.
10437 * config/rs6000/rs6000.c (init_float128_ieee): Prevent complex
10438 multiply and divide external functions from being created more
10441 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
10443 * cfgrtl.c (fixup_reorder_chain): Do not emit NOPs in DECL_IGNORED_P
10445 (rtl_merge_blocks): Likewise. Do not emit a NOP if the location of
10446 the edge can be forwarded.
10447 (cfg_layout_merge_blocks): Likewise.
10449 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
10451 * except.c (finish_eh_generation): Commit edge insertions only after
10452 the EH edges have been redirected from post-landing to landing pads.
10454 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
10456 * tree-nested.c (get_frame_type): Use create_tmp_var_raw instead of
10457 create_tmp_var_for to create the FRAME decl.
10458 (finalize_nesting_tree_1): Do not unchain the FRAME decl.
10460 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
10462 * tree-inline.c (copy_edges_for_bb): Minor tweak.
10463 (maybe_move_debug_stmts_to_successors): Also reset the locus of the
10464 debug statement when resetting its value.
10465 (expand_call_inline): Copy the locus of the call onto the assignment
10466 of the return value, if any. Use local variable in more cases.
10468 2018-06-21 Martin Liska <mliska@suse.cz>
10470 * ipa-pure-const.c (propagate_nothrow): Use
10471 funct_state_summaries->get.
10472 (dump_malloc_lattice): Likewise.
10473 (propagate_malloc): Likewise.
10475 2018-06-21 Richard Biener <rguenther@suse.de>
10477 * lto-streamer-out.c (DFS::DFS_write_tree_body): Update outdated
10478 comment. Follow BLOCK_ABSTRACT_ORIGIN unconditionally.
10479 * tree-streamer-in.c (lto_input_ts_block_tree_pointers): Update
10481 * tree-streamer-out.c (write_ts_block_tree_pointers): Stream
10482 BLOCK_ABSTRACT_ORIGIN unconditionally.
10484 2018-06-21 David Malcolm <dmalcolm@redhat.com>
10486 * ipa-cp.c (ipcp_driver): Set edge_clone_summaries to NULL after
10488 * ipa-reference.c (ipa_reference_c_finalize): Delete
10489 ipa_ref_opt_sum_summaries and set it to NULL.
10491 2018-06-21 Tom de Vries <tdevries@suse.de>
10493 PR tree-optimization/85859
10494 * tree-ssa-tail-merge.c (stmt_local_def): Copy gimple_is_call
10495 test with comment from bb_no_side_effects_p.
10497 2018-06-21 Richard Biener <rguenther@suse.de>
10499 PR tree-optimization/86232
10500 * tree-ssa-loop-niter.c (number_of_iterations_popcount): Adjust
10501 max for constant niter.
10503 2018-06-21 Andre Vieira <andre.simoesdiasvieira@arm.com>
10505 * config/aarch64/aarch64-simd.md
10506 (*aarch64_crypto_aes<aes_op>v16qi_xor_combine): New.
10508 2018-06-21 Andre Vieira <andre.simoesdiasvieira@arm.com>
10510 * config/aarch64/aarch64-simd.md (aarch64_crypto_aes<aes_op>v16qi):
10511 Make opernads of the unspec commutative.
10513 2018-06-21 Richard Biener <rguenther@suse.de>
10515 * tree-data-ref.c (dr_step_indicator): Handle NULL DR_STEP.
10516 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr):
10517 Avoid calling vect_mark_for_runtime_alias_test with gathers or scatters.
10518 (vect_analyze_data_ref_dependence): Re-order checks to deal with
10520 (vect_record_base_alignments): Do not record base alignment
10521 for gathers or scatters.
10522 (vect_compute_data_ref_alignment): Drop return value that is always
10523 true. Bail out early for gathers or scatters.
10524 (vect_enhance_data_refs_alignment): Bail out early for gathers
10526 (vect_find_same_alignment_drs): Likewise.
10527 (vect_analyze_data_refs_alignment): Remove dead code.
10528 (vect_slp_analyze_and_verify_node_alignment): Likewise.
10529 (vect_analyze_data_refs): For possible gathers or scatters do
10530 not create an alternate DR, just check their possible validity
10531 and mark them. Adjust DECL_NONALIASED handling to not rely
10532 on DR_BASE_ADDRESS.
10533 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Do not
10534 update inits of gathers or scatters.
10535 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern):
10536 Also copy gather/scatter flag to pattern vinfo.
10538 2018-06-20 Kelvin Nilsen <kelvin@gcc.gnu.org>
10540 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
10541 behavior of vec_packsu (vector unsigned long long, vector unsigned
10542 long long) to match behavior of vec_packs with same signature.
10544 2018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
10545 Thomas Schwinge <thomas@codesourcery.com>
10546 Cesar Philippidis <cesar@codesourcery.com>
10548 * gimplify.c (gimplify_scan_omp_clauses): Add support for
10549 OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
10550 (gimplify_adjust_omp_clauses): Likewise.
10551 (gimplify_oacc_declare_1): Add support for GOMP_MAP_RELEASE, remove
10552 support for GOMP_MAP_FORCE_{ALLOC,TO,FROM,TOFROM}.
10553 (gimplify_omp_target_update): Update handling of acc update and
10555 * omp-low.c (install_var_field): Remove unused parameter
10556 base_pointers_restrict.
10557 (scan_sharing_clauses): Remove base_pointers_restrict parameter.
10558 Update call to install_var_field. Handle OMP_CLAUSE_{IF_PRESENT,
10560 (omp_target_base_pointers_restrict_p): Delete.
10561 (scan_omp_target): Update call to scan_sharing_clauses.
10562 * tree-core.h (enum omp_clause_code): Add OMP_CLAUSE_{IF_PRESENT,
10564 * tree-nested.c (convert_nonlocal_omp_clauses): Handle
10565 OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
10566 (convert_local_omp_clauses): Likewise.
10567 * tree-pretty-print.c (dump_omp_clause): Likewise.
10568 * tree.c (omp_clause_num_ops): Add entries for OMP_CLAUSE_{IF_PRESENT,
10570 (omp_clause_code_name): Likewise.
10572 2018-06-20 Jakub Jelinek <jakub@redhat.com>
10575 * var-tracking.c (use_narrower_mode_test): Check if shift amount can
10578 PR tree-optimization/86231
10579 * tree-vrp.c (union_ranges): For ( [ ) ] or ( )[ ] range and
10580 anti-range don't overwrite *vr0min before using it to compute *vr0max.
10582 2018-06-20 Tom de Vries <tdevries@suse.de>
10584 PR tree-optimization/86097
10585 * tree-ssa-loop-manip.c (canonicalize_loop_ivs): Also convert *nit to
10586 iv type if signedness of iv type is not the same as that of *nit.
10588 2018-06-20 Jakub Jelinek <jakub@redhat.com>
10590 * cfgrtl.c (rtl_verify_edges): Formatting fix. If bb->preds has any
10591 EDGE_EH edges, verify they are all EDGE_EH.
10593 2018-06-20 Maya Rashish <coypu@sdf.org>
10595 * ginclude/stddef.h: Limit #include <machine/ansi.h> to NetBSD.
10597 2018-06-20 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
10599 * config/aarch64/aarch64-tuning-flags.def (no_ldp_stp_qregs): New.
10600 * config/aarch64/aarch64.c (xgene1_tunings): Add
10601 AARCH64_EXTRA_TUNE_NO_LDP_STP_QREGS to tune_flags.
10602 (aarch64_mode_valid_for_sched_fusion_p):
10603 Allow 16-byte modes.
10604 (aarch64_classify_address): Allow 16-byte modes for load_store_pair_p.
10605 * config/aarch64/aarch64-ldpstp.md: Add peepholes for LDP STP of
10607 * config/aarch64/aarch64-simd.md (load_pair<VQ:mode><VQ2:mode>):
10609 (vec_store_pair<VQ:mode><VQ2:mode>): Likewise.
10610 * config/aarch64/iterators.md (VQ2): New mode iterator.
10612 2018-06-20 Martin Liska <mliska@suse.cz>
10614 * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
10615 Change default ratio from 10 to 8.
10617 2018-06-20 Martin Liska <mliska@suse.cz>
10619 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
10621 (bit_test_cluster::find_bit_tests): Likewise.
10622 (switch_decision_tree::analyze_switch_statement): Find clusters.
10623 * tree-switch-conversion.h (struct jump_table_cluster): Document
10626 2018-06-20 Martin Liska <mliska@suse.cz>
10628 * tree-switch-conversion.c (switch_conversion::collect):
10629 Record m_uniq property.
10630 (switch_conversion::expand): Bail out for special conditions.
10631 (group_cluster::~group_cluster): New.
10632 (group_cluster::group_cluster): Likewise.
10633 (group_cluster::dump): Likewise.
10634 (jump_table_cluster::emit): New.
10635 (switch_decision_tree::fix_phi_operands_for_edges): New.
10636 (struct case_node): Remove struct.
10637 (jump_table_cluster::can_be_handled): New.
10638 (case_values_threshold): Moved to header.
10639 (reset_out_edges_aux): Likewise.
10640 (jump_table_cluster::is_beneficial): New.
10641 (bit_test_cluster::can_be_handled): Likewise.
10642 (add_case_node): Remove.
10643 (bit_test_cluster::is_beneficial): New.
10644 (case_bit_test::cmp): New.
10645 (bit_test_cluster::emit): New.
10646 (expand_switch_as_decision_tree_p): Remove.
10647 (bit_test_cluster::hoist_edge_and_branch_if_true): New.
10648 (fix_phi_operands_for_edge): Likewise.
10649 (switch_decision_tree::analyze_switch_statement): New.
10650 (compute_cases_per_edge): Move ...
10651 (switch_decision_tree::compute_cases_per_edge): ... here.
10652 (try_switch_expansion): Likewise.
10653 (switch_decision_tree::try_switch_expansion): Likewise.
10654 (record_phi_operand_mapping): Likewise.
10655 (switch_decision_tree::record_phi_operand_mapping): Likewise.
10656 (emit_case_decision_tree): Likewise.
10657 (switch_decision_tree::emit): Likewise.
10658 (balance_case_nodes): Likewise.
10659 (switch_decision_tree::balance_case_nodes): Likewise.
10660 (dump_case_nodes): Likewise.
10661 (switch_decision_tree::dump_case_nodes): Likewise.
10662 (emit_jump): Likewise.
10663 (switch_decision_tree::emit_jump): Likewise.
10664 (emit_cmp_and_jump_insns): Likewise.
10665 (switch_decision_tree::emit_cmp_and_jump_insns): Likewise.
10666 (emit_case_nodes): Likewise.
10667 (switch_decision_tree::emit_case_nodes): Likewise.
10668 (conditional_probability): Remove.
10669 * tree-switch-conversion.h (enum cluster_type): New.
10671 (struct cluster): Likewise.
10672 (cluster::cluster): Likewise.
10673 (struct simple_cluster): Likewise.
10674 (simple_cluster::simple_cluster): Likewise.
10675 (struct group_cluster): Likewise.
10676 (struct jump_table_cluster): Likewise.
10677 (struct bit_test_cluster): Likewise.
10678 (struct min_cluster_item): Likewise.
10679 (struct case_tree_node): Likewise.
10680 (case_tree_node::case_tree_node): Likewise.
10681 (jump_table_cluster::case_values_threshold): Likewise.
10682 (struct case_bit_test): Likewise.
10683 (struct switch_decision_tree): Likewise.
10684 (struct switch_conversion): Likewise.
10685 (switch_decision_tree::reset_out_edges_aux): Likewise.
10687 2018-06-20 Martin Liska <mliska@suse.cz>
10689 * tree-switch-conversion.c (MAX_CASE_BIT_TESTS): Remove.
10690 (hoist_edge_and_branch_if_true): Likewise.
10691 (expand_switch_using_bit_tests_p): Likewise.
10692 (struct case_bit_test): Likewise.
10693 (case_bit_test_cmp): Likewise.
10694 (emit_case_bit_tests): Likewise.
10695 (switch_conversion::switch_conversion): New class.
10696 (struct switch_conv_info): Remove old struct.
10697 (collect_switch_conv_info): More to ...
10698 (switch_conversion::collect): ... this.
10699 (check_range): Likewise.
10700 (switch_conversion::check_range): Likewise.
10701 (check_all_empty_except_final): Likewise.
10702 (switch_conversion::check_all_empty_except_final): Likewise.
10703 (check_final_bb): Likewise.
10704 (switch_conversion::check_final_bb): Likewise.
10705 (create_temp_arrays): Likewise.
10706 (switch_conversion::create_temp_arrays): Likewise.
10707 (free_temp_arrays): Likewise.
10708 (gather_default_values): Likewise.
10709 (switch_conversion::gather_default_values): Likewise.
10710 (build_constructors): Likewise.
10711 (switch_conversion::build_constructors): Likewise.
10712 (constructor_contains_same_values_p): Likewise.
10713 (switch_conversion::contains_same_values_p): Likewise.
10714 (array_value_type): Likewise.
10715 (switch_conversion::array_value_type): Likewise.
10716 (build_one_array): Likewise.
10717 (switch_conversion::build_one_array): Likewise.
10718 (build_arrays): Likewise.
10719 (switch_conversion::build_arrays): Likewise.
10720 (gen_def_assigns): Likewise.
10721 (switch_conversion::gen_def_assigns): Likewise.
10722 (prune_bbs): Likewise.
10723 (switch_conversion::prune_bbs): Likewise.
10724 (fix_phi_nodes): Likewise.
10725 (switch_conversion::fix_phi_nodes): Likewise.
10726 (gen_inbound_check): Likewise.
10727 (switch_conversion::gen_inbound_check): Likewise.
10728 (process_switch): Use the newly created class.
10729 (switch_conversion::expand): New.
10730 (switch_conversion::~switch_conversion): New.
10731 * tree-switch-conversion.h: New file.
10733 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
10735 * tree-vectorizer.h (NUM_PATTERNS, vect_recog_func_ptr): Move to
10736 tree-vect-patterns.c.
10737 * tree-vect-patterns.c (vect_supportable_direct_optab_p): New function.
10738 (vect_recog_dot_prod_pattern): Use it. Remove the type_in argument.
10739 (vect_recog_sad_pattern): Likewise.
10740 (vect_recog_widen_sum_pattern): Likewise.
10741 (vect_recog_pow_pattern): Likewise. Check for a null vectype.
10742 (vect_recog_widen_shift_pattern): Remove the type_in argument.
10743 (vect_recog_rotate_pattern): Likewise.
10744 (vect_recog_mult_pattern): Likewise.
10745 (vect_recog_vector_vector_shift_pattern): Likewise.
10746 (vect_recog_divmod_pattern): Likewise.
10747 (vect_recog_mixed_size_cond_pattern): Likewise.
10748 (vect_recog_bool_pattern): Likewise.
10749 (vect_recog_mask_conversion_pattern): Likewise.
10750 (vect_try_gather_scatter_pattern): Likewise.
10751 (vect_recog_widen_mult_pattern): Likewise. Check for a null vectype.
10752 (vect_recog_over_widening_pattern): Likewise.
10753 (vect_recog_gather_scatter_pattern): Likewise.
10754 (vect_recog_func_ptr): Move from tree-vectorizer.h
10755 (vect_vect_recog_func_ptrs): Move further down the file.
10756 (vect_recog_func): Likewise. Remove the third argument.
10757 (NUM_PATTERNS): Define based on vect_vect_recog_func_ptrs.
10758 (vect_pattern_recog_1): Expect the pattern function to do any
10759 necessary target tests. Also expect it to provide a vector type.
10760 Remove the type_in handling.
10762 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
10764 * tree-vect-patterns.c (vect_pattern_detected): New function.
10765 (vect_recog_dot_prod_patternm, vect_recog_sad_pattern)
10766 (vect_recog_widen_mult_pattern, vect_recog_widen_sum_pattern)
10767 (vect_recog_over_widening_pattern, vect_recog_widen_shift_pattern
10768 (vect_recog_rotate_pattern, vect_recog_vector_vector_shift_pattern)
10769 (vect_recog_mult_pattern, vect_recog_divmod_pattern)
10770 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
10771 (vect_recog_mask_conversion_pattern)
10772 (vect_try_gather_scatter_pattern): Likewise.
10774 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
10776 * tree-vect-patterns.c (vect_get_internal_def): New function.
10777 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
10778 (vect_recog_vector_vector_shift_pattern, check_bool_pattern)
10779 (search_type_for_mask_1): Use it.
10781 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
10783 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
10784 redundant WIDEN_SUM_EXPR handling.
10785 (vect_recog_sad_pattern): Likewise.
10787 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
10789 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
10790 redundant check that the types of a PLUS_EXPR or MULT_EXPR agree.
10791 (vect_recog_sad_pattern): Likewise PLUS_EXPR, ABS_EXPR and MINUS_EXPR.
10792 (vect_recog_widen_mult_pattern): Likewise MULT_EXPR.
10793 (vect_recog_widen_sum_pattern): Likewise PLUS_EXPR.
10795 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
10797 * tree-vect-stmts.c (vectorizable_call): Make sure that we
10798 use the stmt_vec_info of the original bb statement for the
10799 new zero assignment, even if the call is part of a pattern.
10801 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
10803 * tree-vectorizer.h (_stmt_vec_info): Note above pattern_def_seq
10804 that the sequence is attached to the original statement rather
10805 than the pattern statement.
10806 * tree-vect-loop.c (vect_determine_vf_for_stmt): Take the
10807 PATTERN_DEF_SEQ from the original statement rather than
10808 the main pattern statement.
10809 * tree-vect-stmts.c (free_stmt_vec_info): Likewise.
10810 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Likewise.
10811 (vect_mark_pattern_stmts): Don't copy the PATTERN_DEF_SEQ.
10813 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
10815 * tree-vect-stmts.c (vect_analyze_stmt): Move the handling of pattern
10816 definition statements before the early exit for statements that aren't
10818 * tree-vect-loop.c (vect_transform_loop_stmt): New function,
10820 (vect_transform_loop): ...here. Process pattern definition
10821 statements without first checking whether the main pattern
10822 statement is live or relevant.
10824 2018-06-19 Eric Botcazou <ebotcazou@adacore.com>
10826 * tree-cfgcleanup.c (tree_forwarder_block_p): Do not return false at
10827 -O0 if the locus represent UNKNOWN_LOCATION but have different values.
10829 2018-06-19 Aaron Sawdey <acsawdey@linux.ibm.com>
10831 * config/rs6000/rs6000-string.c (select_block_compare_mode): Check
10832 TARGET_EFFICIENT_OVERLAPPING_UNALIGNED here instead of in caller.
10833 (do_and3, do_and3_mask, do_compb3, do_rotl3): New functions.
10834 (expand_block_compare): Change select_block_compare_mode call.
10835 (expand_strncmp_align_check): Use new functions, fix comment.
10836 (emit_final_str_compare_gpr): New function.
10837 (expand_strn_compare): Refactor and clean up code.
10838 * config/rs6000/vsx.md (vsx_mov<mode>_64bit): Remove *.
10840 2018-06-19 Tony Reix <tony.reix@atos.com>
10841 Damien Bergamini <damien.bergamini@atos.com>
10842 David Edelsohn <dje.gcc@gmail.com>
10844 * collect2.c (static_obj): New variable.
10845 (static_libs): New variable.
10846 (is_in_list): Uncomment declaration.
10847 (main): Track AIX libraries linked statically.
10848 (is_in_list): Uncomment definition.
10849 (scan_prog_file): Don't add AIX shared libraries initializer
10850 to constructor list if linking statically.
10852 2018-06-19 Max Filippov <jcmvbkbc@gmail.com>
10854 * config/xtensa/xtensa.md (UNSPEC_FRAME_BLOCKAGE): New unspec
10856 (allocate_stack, frame_blockage, *frame_blockage): New patterns.
10858 2018-06-19 Jan Hubicka <hubicka@ucw.cz>
10860 * tree.c (find_decls_types_r): Remove all non-VAR_DECLs from
10863 2018-06-19 Martin Liska <mliska@suse.cz>
10865 * config/i386/i386.c (ix86_can_inline_p): Do not use
10866 ipa_fn_summaries::get_create.
10867 * ipa-cp.c (ipcp_cloning_candidate_p): Replace get_create with
10869 (devirtualization_time_bonus): Likewise.
10870 (ipcp_propagate_stage): Likewise.
10871 * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
10872 (edge_set_predicate): Likewise.
10873 (evaluate_conditions_for_known_args): Likewise.
10874 (evaluate_properties_for_edge): Likewise.
10875 (ipa_call_summary::reset): Tranform to ...
10876 (ipa_call_summary::~ipa_call_summary): ... this.
10877 (ipa_fn_summary::reset): Transform to ...
10878 (ipa_fn_summary::~ipa_fn_summary): ... this.
10879 (ipa_fn_summary_t::remove): Rename to ...
10880 (ipa_fn_summary_t::remove_callees): ... this.
10881 (ipa_fn_summary_t::duplicate): Use placement new
10882 instead of memory copy.
10883 (ipa_call_summary_t::duplicate): Likewise.
10884 (ipa_call_summary_t::remove): Remove.
10885 (dump_ipa_call_summary): Change get_create to get.
10886 (ipa_dump_fn_summary): Dump only when summary exists.
10887 (analyze_function_body): Use symbol_summary::get instead
10889 (compute_fn_summary): Likewise.
10890 (estimate_edge_devirt_benefit): Likewise.
10891 (estimate_edge_size_and_time): Likewise.
10892 (inline_update_callee_summaries): Likewise.
10893 (remap_edge_change_prob): Likewise.
10894 (remap_edge_summaries): Likewise.
10895 (ipa_merge_fn_summary_after_inlining): Likewise.
10896 (write_ipa_call_summary): Likewise.
10897 (ipa_fn_summary_write): Likewise.
10898 (ipa_free_fn_summary): Likewise.
10899 * ipa-fnsummary.h (struct GTY): Add new ctor and copy ctor.
10900 (struct ipa_call_summary): Likewise.
10901 * ipa-icf.c (sem_function::merge): Use symbol_summary::get instead
10903 * ipa-inline-analysis.c (do_estimate_edge_time): Likewise.
10904 (estimate_size_after_inlining): Likewise.
10905 (estimate_growth): Likewise.
10906 (growth_likely_positive): Likewise.
10907 * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
10908 (inline_call): Likewise.
10909 * ipa-inline.c (caller_growth_limits): Likewise.
10910 (can_inline_edge_p): Likewise.
10911 (can_inline_edge_by_limits_p): Likewise.
10912 (compute_uninlined_call_time): Likewise.
10913 (compute_inlined_call_time): Likewise.
10914 (want_inline_small_function_p): Likewise.
10915 (edge_badness): Likewise.
10916 (update_caller_keys): Likewise.
10917 (update_callee_keys): Likewise.
10918 (inline_small_functions): Likewise.
10919 (inline_to_all_callers_1): Likewise.
10920 (dump_overall_stats): Likewise.
10921 (early_inline_small_functions): Likewise.
10922 (early_inliner): Likewise.
10923 * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
10924 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
10925 * ipa-pure-const.c (malloc_candidate_p): Likewise.
10926 * ipa-split.c (execute_split_functions): Likewise.
10927 * symbol-summary.h: Likewise.
10928 * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
10930 2018-06-19 Richard Biener <rguenther@suse.de>
10932 * tree-vectorizer.c (try_vectorize_loop_1): Split out of ...
10933 (vectorize_loops): ... here. Fix dbgcnt handling.
10934 (try_vectorize_loop): Wrap try_vectorize_loop_1.
10936 2018-06-19 Segher Boessenkool <segher@kernel.crashing.org>
10939 * config/rs6000/rs6000.md (rs6000_discover_homogeneous_aggregate): An
10940 ieee128 argument takes up only one (vector) register, not two (floating
10943 2018-06-19 Eric Botcazou <ebotcazou@adacore.com>
10945 * gimplify.c (gimplify_init_constructor): Really never clear for an
10946 incomplete constructor if CONSTRUCTOR_NO_CLEARING is set.
10948 2018-06-19 Richard Biener <rguenther@suse.de>
10950 PR tree-optimization/86179
10951 * tree-vect-patterns.c (vect_pattern_recog_1): Clean up
10952 after failed recognition.
10954 2018-06-18 Martin Sebor <msebor@redhat.com>
10956 PR middle-end/85602
10957 * calls.c (maybe_warn_nonstring_arg): Handle strncat.
10958 * tree-ssa-strlen.c (is_strlen_related_p): Make extern.
10959 Handle integer subtraction.
10960 (maybe_diag_stxncpy_trunc): Handle nonstring source arguments.
10961 * tree-ssa-strlen.h (is_strlen_related_p): Declare.
10963 2018-06-18 David Malcolm <dmalcolm@redhat.com>
10965 * config/frv/frv-protos.h (frv_ifcvt_modify_insn): Strengthen 3rd
10966 param from rtx to rtx_insn *.
10967 * config/frv/frv.c (frv_ifcvt_add_insn): Likewise for "insn"
10969 (frv_ifcvt_modify_insn): Likwise.
10970 (frv_ifcvt_modify_final): Likwise for local "existing_insn",
10971 adding an as_a <rtx_insn *> cast. Likewise for local "insn".
10972 * config/mips/mips.c (r10k_insert_cache_barriers): Add an
10973 as_a <rtx_insn *> cast to local "unprotected_region" once
10974 it's been established that it's not NULL or pc_rtx.
10975 * config/nds32/nds32-relax-opt.c (nds32_group_insns): Strengthen
10976 param "sethi" from rtx to rtx_insn *.
10977 (nds32_group_float_insns): Likewise for param "insn".
10978 * config/vax/vax-protos.h (vax_output_int_add): Likewise for 1st
10980 (vax_output_int_subtract): Likewise.
10981 * config/vax/vax.c (vax_output_int_add): Likewise for param
10983 (vax_output_int_subtract): Likewise.
10984 * emit-rtl.c (set_insn_deleted): Likewise, removing cast.
10985 (emit_pattern_after): Likewise for param "after".
10986 (emit_insn_after): Likewise.
10987 (emit_jump_insn_after): Likewise.
10988 (emit_call_insn_after): Likewise.
10989 (emit_debug_insn_after): Likewise.
10990 (emit_pattern_before): Likewise for param "before".
10991 (emit_insn_before): Likewise.
10992 (emit_jump_insn_before): Likewise.
10993 * final.c (get_insn_template): Likewise for param "insn", removing
10995 * output.h (get_insn_template): Likewise for 2nd param.
10996 * rtl.h (emit_insn_before): Likewise.
10997 (emit_jump_insn_before): Likewise.
10998 (emit_debug_insn_before_noloc): Likewise.
10999 (emit_insn_after): Likewise.
11000 (emit_jump_insn_after): Likewise.
11001 (emit_call_insn_after): Likewise.
11002 (emit_debug_insn_after): Likewise.
11003 (set_insn_deleted): Likewise for param.
11005 2018-06-18 Michael Meissner <meissner@linux.ibm.com>
11008 * config/rs6000/rs6000-modes.def (toplevel): Rework the 128-bit
11009 floating point modes, so that IFmode is numerically greater than
11010 TFmode, which is greater than KFmode using FRACTIONAL_FLOAT_MODE
11011 to declare the ordering. This prevents IFmode from being
11012 converted to TFmode when long double is IEEE 128-bit on an ISA 3.0
11013 machine. Include rs6000-modes.h to share the fractional values
11014 between genmodes* and the rest of the compiler.
11015 (IFmode): Likewise.
11016 (KFmode): Likewise.
11017 (TFmode): Likewise.
11018 * config/rs6000/rs6000-modes.h: New file.
11019 * config/rs6000/rs6000.c (rs6000_debug_reg_global): Change the
11020 meaning of rs6000_long_double_size so that 126..128 selects an
11021 appropriate 128-bit floating point type.
11022 (rs6000_option_override_internal): Likewise.
11023 * config/rs6000/rs6000.h (toplevel): Include rs6000-modes.h.
11024 (TARGET_LONG_DOUBLE_128): Change the meaning of
11025 rs6000_long_double_size so that 126..128 selects an appropriate
11026 128-bit floating point type.
11027 (LONG_DOUBLE_TYPE_SIZE): Update comment.
11028 * config/rs6000/rs6000.md (trunciftf2): Correct the modes of the
11029 source and destination to match the standard usage.
11030 (truncifkf2): Likewise.
11031 (copysign<mode>3, IEEE iterator): Rework copysign of float128 on
11032 ISA 2.07 to use an explicit clobber, instead of passing in a
11034 (copysign<mode>3_soft): Likewise.
11036 2018-06-18 David Malcolm <dmalcolm@redhat.com>
11038 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
11039 Replace dump_printf_loc call with DUMP_VECT_SCOPE.
11040 (vect_slp_analyze_instance_dependence): Likewise.
11041 (vect_enhance_data_refs_alignment): Likewise.
11042 (vect_analyze_data_refs_alignment): Likewise.
11043 (vect_slp_analyze_and_verify_instance_alignment
11044 (vect_analyze_data_ref_accesses): Likewise.
11045 (vect_prune_runtime_alias_test_list): Likewise.
11046 (vect_analyze_data_refs): Likewise.
11047 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Likewise.
11048 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
11049 (vect_analyze_scalar_cycles_1): Likewise.
11050 (vect_get_loop_niters): Likewise.
11051 (vect_analyze_loop_form_1): Likewise.
11052 (vect_update_vf_for_slp): Likewise.
11053 (vect_analyze_loop_operations): Likewise.
11054 (vect_analyze_loop): Likewise.
11055 (vectorizable_induction): Likewise.
11056 (vect_transform_loop): Likewise.
11057 * tree-vect-patterns.c (vect_pattern_recog): Likewise.
11058 * tree-vect-slp.c (vect_analyze_slp): Likewise.
11059 (vect_make_slp_decision): Likewise.
11060 (vect_detect_hybrid_slp): Likewise.
11061 (vect_slp_analyze_operations): Likewise.
11062 (vect_slp_bb): Likewise.
11063 * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Likewise.
11064 (vectorizable_bswap): Likewise.
11065 (vectorizable_call): Likewise.
11066 (vectorizable_simd_clone_call): Likewise.
11067 (vectorizable_conversion): Likewise.
11068 (vectorizable_assignment): Likewise.
11069 (vectorizable_shift): Likewise.
11070 (vectorizable_operation): Likewise.
11071 * tree-vectorizer.h (DUMP_VECT_SCOPE): New macro.
11073 2018-06-18 Martin Sebor <msebor@redhat.com>
11075 PR tree-optimization/81384
11076 * builtin-types.def (BT_FN_SIZE_CONST_STRING_SIZE): New.
11077 * builtins.c (expand_builtin_strnlen): New function.
11078 (expand_builtin): Call it.
11079 (fold_builtin_n): Avoid setting TREE_NO_WARNING.
11080 * builtins.def (BUILT_IN_STRNLEN): New.
11081 * calls.c (maybe_warn_nonstring_arg): Handle BUILT_IN_STRNLEN.
11082 Warn for bounds in excess of maximum object size.
11083 * tree-ssa-strlen.c (maybe_set_strlen_range): Return tree representing
11084 single-value ranges. Handle strnlen.
11085 (handle_builtin_strlen): Handle strnlen.
11086 (strlen_check_and_optimize_stmt): Same.
11087 * doc/extend.texi (Other Builtins): Document strnlen.
11089 2018-06-18 Maya Rashish <coypu@sdf.org>
11091 * config/alpha/openbsd.h (TARGET_DEFAULT): Define.
11092 (LINK_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): Likewise.
11093 (INTMAX_TYPE, UINTMAX_TYPE, WINT_TYPE): Likewise.
11095 * config/alpha/elf.h (STARTFILE_SPEC, ENDFILE_SPEC): Move from
11097 * config/alpha/linux.h (STARTFILE_SPEC, ENDFILE_SPEC): Here.
11099 2018-06-18 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
11101 * tree.c (escaped_string::escape): Replace cast to char * by
11102 const_cast<char *> (unescaped).
11104 2018-06-18 Nick Clifton <nickc@redhat.com>
11107 * tree.c (escaped_string): New class. Converts an unescaped
11108 string into its escaped equivalent.
11109 (warn_deprecated_use): Use the new class to convert the
11110 deprecation message, if present.
11111 (test_escaped_strings): New self test.
11112 (test_c_tests): Add test_escaped_strings.
11113 * doc/extend.texi (deprecated): Add a note that the
11114 deprecation message is affected by the -fmessage-length
11115 option, and that control characters will be escaped.
11116 (#pragma GCC error): Document this pragma.
11117 (#pragma GCC warning): Likewise.
11118 * doc/invoke.texi (-fmessage-length): Document this option's
11119 effect on the #warning and #error preprocessor directives and
11120 the deprecated attribute.
11122 2018-06-18 Eric Botcazou <ebotcazou@adacore.com>
11124 * tree.c (decl_value_expr_lookup): Revert latest change.
11125 (decl_value_expr_insert): Likewise.
11127 2018-06-17 Eric Botcazou <ebotcazou@adacore.com>
11129 * gimplify.c (nonlocal_vlas): Delete.
11130 (nonlocal_vla_vars): Likewise.
11131 (gimplify_var_or_parm_decl): Do not add debug VAR_DECLs for non-local
11133 (gimplify_body): Do not create and destroy nonlocal_vlas.
11134 * tree-nested.c: Include diagnostic.h.
11135 (use_pointer_in_frame): Tweak.
11136 (lookup_field_for_decl): Add assertion and declare the transformation.
11137 (convert_nonlocal_reference_op) <PARM_DECL>: Rework and issue an
11138 internal error when the reference is in a wrong context. Do not
11139 create a debug decl by default.
11140 (note_nonlocal_block_vlas): Delete.
11141 (convert_nonlocal_reference_stmt) <GIMPLE_BIND>: Do not call it.
11142 (convert_local_reference_op) <PARM_DECL>: Skip the frame decl. Do not
11143 create a debug decl by default.
11144 (convert_gimple_call) <GIMPLE_CALL>: Issue an internal error when the
11145 call is in a wrong context.
11146 (fixup_vla_decls): New function.
11147 (finalize_nesting_tree_1): Adjust comment. Call fixup_vla_decls if no
11148 debug variables were created.
11149 * tree.c (decl_value_expr_lookup): Add checking assertion.
11150 (decl_value_expr_insert): Likewise.
11152 2018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
11154 PR middle-end/82479
11155 * ipa-fnsummary.c (will_be_nonconstant_expr_predicate): Handle CALL_EXPR.
11156 * tree-scalar-evolution.c (interpret_expr): Likewise.
11157 (expression_expensive_p): Likewise.
11158 * tree-ssa-loop-ivopts.c (contains_abnormal_ssa_name_p): Likewise.
11159 * tree-ssa-loop-niter.c (number_of_iterations_popcount): New.
11160 (number_of_iterations_exit_assumptions): Use number_of_iterations_popcount.
11161 (ssa_defined_by_minus_one_stmt_p): New.
11163 2018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
11165 PR middle-end/64946
11166 * cfgexpand.c (expand_debug_expr): Hande ABSU_EXPR.
11167 * config/i386/i386.c (ix86_add_stmt_cost): Likewise.
11168 * dojump.c (do_jump): Likewise.
11169 * expr.c (expand_expr_real_2): Check operand type's sign.
11170 * fold-const.c (const_unop): Handle ABSU_EXPR.
11171 (fold_abs_const): Likewise.
11172 * gimple-pretty-print.c (dump_unary_rhs): Likewise.
11173 * gimple-ssa-backprop.c (backprop::process_assign_use): Likesie.
11174 (strip_sign_op_1): Likesise.
11175 * match.pd: Add new pattern to generate ABSU_EXPR.
11176 * optabs-tree.c (optab_for_tree_code): Handle ABSU_EXPR.
11177 * tree-cfg.c (verify_gimple_assign_unary): Likewise.
11178 * tree-eh.c (operation_could_trap_helper_p): Likewise.
11179 * tree-inline.c (estimate_operator_cost): Likewise.
11180 * tree-pretty-print.c (dump_generic_node): Likewise.
11181 * tree-vect-patterns.c (vect_recog_sad_pattern): Likewise.
11182 * tree.def (ABSU_EXPR): New.
11184 2018-06-16 Jakub Jelinek <jakub@redhat.com>
11186 PR middle-end/86095
11187 * common.opt (Wunsafe-loop-optimizations): Add Ignore, remove Var,
11188 documented as preserved for backward compatibility only.
11189 * doc/invoke.texi: Remove -Wunsafe-loop-optimizations documentation.
11191 PR rtl-optimization/86108
11192 * bb-reorder.c (create_forwarder_block): Renamed to ...
11193 (create_eh_forwarder_block): ... this. Split OLD_BB after labels and
11194 jump from new landing pad to the second part.
11195 (sjlj_fix_up_crossing_landing_pad, dw2_fix_up_crossing_landing_pad):
11198 2018-06-15 Jakub Jelinek <jakub@redhat.com>
11200 PR middle-end/85878
11201 * expr.c (expand_assignment): Remove now redundant COMPLEX_MODE_P
11202 check from first store_expr, use to_mode instead of GET_MODE (to_rtx).
11203 Only call store_expr for halves if the mode is the same.
11205 PR middle-end/86123
11206 * match.pd ((X / Y) == 0 -> X < Y): Don't transform complex divisions.
11207 Fix up comment formatting.
11209 2018-06-15 Bernd Edlinger <bernd.edlinger@hotmail.de>
11211 * typed-splay-tree.h (typed_splay_tree::remove): New function.
11212 (typed_splay_tree::closure,
11213 typed_splay_tree::inner_foreach_fn, typed_splay_tree::m_inner): Deleted.
11214 (typed_splay_tree::typed_splay_tree,
11215 typed_splay_tree::operator =): Declared private.
11216 (typed_splay_tree::splay_tree_key, typed_splay_tree::splay_tree_value,
11217 typed_splay_tree::splay_tree_node_s, typed_splay_tree::KDEL,
11218 typed_splay_tree::VDEL, typed_splay_tree::splay_tree_delete_helper,
11219 typed_splay_tree::rotate_left, typed_splay_tree::rotate_right,
11220 typed_splay_tree::splay_tree_splay,
11221 typed_splay_tree::splay_tree_foreach_helper,
11222 typed_splay_tree::splay_tree_insert,
11223 typed_splay_tree::splay_tree_remove,
11224 typed_splay_tree::splay_tree_lookup,
11225 typed_splay_tree::splay_tree_predecessor,
11226 typed_splay_tree::splay_tree_successor,
11227 typed_splay_tree::splay_tree_min,
11228 typed_splay_tree::splay_tree_max): Took over from splay-tree.c/.h.
11229 (typed_splay_tree::root, typed_splay_tree::comp,
11230 typed_splay_tree::delete_key,
11231 typed_splay_tree::delete_value): New data members.
11232 * typed-splay-tree.c (selftest::test_str_to_int): Add a test for
11233 typed_splay_tree::remove.
11235 2018-06-15 Matthew Fortune <matthew.fortune@mips.com>
11237 * config/mips/mips.h (ASM_SPEC): Pass through -mcrc, -mno-crc,
11238 -mginv and -mno-ginv to the assembler.
11239 * config/mips/mips.opt (-mcrc): New option.
11240 (-mginv): Likewise.
11241 * doc/invoke.text (-mcrc): Document.
11242 (-mginv): Likewise.
11244 2018-06-15 Nick Clifton <nickc@redhat.com>
11247 * tree.c (escaped_string): New class. Converts an unescaped
11248 string into its escaped equivalent.
11249 (warn_deprecated_use): Use the new class to convert the
11250 deprecation message, if present.
11251 (test_escaped_strings): New self test.
11252 (test_c_tests): Add test_escaped_strings.
11253 * doc/extend.texi (deprecated): Add a note that the
11254 deprecation message is affected by the -fmessage-length
11255 option, and that control characters will be escaped.
11256 (#pragma GCC error): Document this pragma.
11257 (#pragma GCC warning): Likewise.
11258 * doc/invoke.texi (-fmessage-length): Document this option's
11259 effect on the #warning and #error preprocessor directives and
11260 the deprecated attribute.
11262 2018-06-15 Richard Biener <rguenther@suse.de>
11264 * tree-vect-slp.c (vect_slp_bb): Dump MSG_OPTIMIZED_LOCATIONS
11265 here, also noting vector size used.
11266 * tree-vectorizer.c (vectorize_loops): Adjust. Note vector
11267 size used in MSG_OPTIMIZED_LOCATIONS dump.
11268 (pass_slp_vectorize::execute): Adjust.
11270 2018-06-15 Claudiu Zissulescu <claziss@synopsys.com>
11273 * config/arc/arc.c (arc_return_address_register): Fix
11276 2018-06-15 Richard Biener <rguenther@suse.de>
11278 PR middle-end/86159
11279 * tree-cfg.c (gimplify_build3): Do not strip sign conversions,
11280 leave useless conversion stripping to force_gimple_operand_gsi.
11281 (gimplify_build2): Likewise.
11282 (gimplify_build1): Likewise.
11284 2018-06-15 Richard Biener <rguenther@suse.de>
11286 PR middle-end/86076
11287 * tree-cfg.c (move_stmt_op): unshare invariant addresses
11288 before adjusting their block.
11290 2018-06-15 Sebastian Huber <sebastian.huber@embedded-brains.de>
11292 * config.gcc (riscv*-*-elf* | riscv*-*-rtems*): Use custom
11293 multilibs for *-*-rtems*.
11294 * config/riscv/t-rtems: New file.
11296 2018-06-14 Jakub Jelinek <jakub@redhat.com>
11298 PR middle-end/86122
11299 * match.pd ((A +- CST1) +- CST2): Punt if last resort
11300 unsigned_type_for returns NULL.
11303 * lower-subreg.c (find_decomposable_subregs): Don't decompose float
11304 subregs of multi-word pseudos unless the float mode has word size.
11306 2018-06-14 Richard Biener <rguenther@suse.de>
11308 PR middle-end/86139
11309 * tree-vect-generic.c (build_word_mode_vector_type): Remove
11310 duplicate and harmful type_hash_canon.
11311 * tree.c (type_hash_canon): Assert we didn't find ourselves.
11313 2018-06-14 Richard Biener <rguenther@suse.de>
11316 * tree-ssa-struct-alias.c (create_variable_info_for): Handle
11319 2018-06-14 Sebastian Huber <sebastian.huber@embedded-brains.de>
11321 * config/rtems.h (STDINT_LONG32): Define.
11323 2018-06-13 Matthew Fortune <matthew.fortune@mips.com>
11324 Prachi Godbole <prachi.godbole@imgtec.com>
11326 * config/mips/mips-cpus.def: Define P6600.
11327 * config/mips/mips-tables.opt: Regenerate.
11328 * config/mips/mips.c (mips_ucbranch_type): New enum.
11329 (mips_rtx_cost_data): Add support for P6600.
11330 (mips_issue_rate): Likewise.
11331 (mips_multipass_dfa_lookahead): Likewise.
11332 (mips_avoid_hazard): Likewise.
11333 (mips_reorg_process_insns): Likewise.
11334 (mips_classify_branch_p6600): New function.
11335 * config/mips/mips.h (TUNE_P6600): New define.
11336 (MIPS_ISA_LEVEL_SPEC): Infer mips64r6 from p6600.
11337 (ENABLE_LD_ST_PAIRS): Enable load/store bonding for p6600.
11338 * config/mips/mips.md: Include p6600.md.
11339 (processor): Add p6600.
11340 * config/mips/p6600.md: New file.
11341 * doc/invoke.texi: Add p6600 to supported architectures.
11343 2018-06-13 Martin Sebor <msebor@redhat.com>
11345 PR tree-optimization/86114
11346 * gimple-fold.c (gimple_fold_builtin_strlen): Only handle LHS
11348 * tree-ssa-strlen.c (maybe_set_strlen_range): Same.
11350 2018-06-13 Richard Biener <rguenther@suse.de>
11352 * tree-vect-patterns.c (vect_recog_vector_vector_shift_pattern):
11353 Properly set vector type of the intermediate stmt.
11354 * tree-vect-stmts.c (vectorizable_operation): The destination
11355 var always has vectype_out type.
11357 2018-06-13 Jeff Law <law@redhat.com>
11359 * config/rl78/rl78.c (move_elim_pass): Use TDF_NONE rather than
11360 integer 0 for argument to print_rtl_with_bb.
11361 (rl78_reorg): Likewise.
11363 2018-06-13 David Malcolm <dmalcolm@redhat.com>
11365 * config/arc/arc.c (hwloop_optimize): Strengthen local "end_label"
11366 from rtx to rtx_insn *.
11367 * config/bfin/bfin.c (hwloop_optimize): Likewise for local
11369 (add_sched_insns_for_speculation): Likewise for local "target",
11370 converting usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
11371 * config/c6x/c6x.c (reorg_split_calls): Strengthen param "call_labels"
11372 from rtx_insn ** to rtx_code_label **.
11373 (reorg_emit_nops): Likewise.
11374 (c6x_reorg): Likewise for local "call_labels".
11375 * config/sh/sh-protos.h (get_dest_uid): Strengthen 1st param from
11377 * config/sh/sh.c (dump_table): Strengthen local "lab" from rtx to
11378 rtx_code_label *, adding safe_as_a <rtx_code_label *> casts to
11379 the loops over LABEL_REFS.
11380 (fixup_addr_diff_vecs): Add as_a <rtx_insn *> to usage of
11382 (barrier_align): Convert usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
11383 (get_dest_uid): Strengthen param "label" from rtx to rtx_insn *.
11384 (split_branches): Strengthen local "olabel" from rtx to
11385 rtx_insn *, adding a safe_as_a cast.
11386 * emit-rtl.c (next_real_insn): Strengthen param from "rtx"
11388 (add_insn_after): Likewise for first two params.
11389 (add_insn_before): Likewise.
11390 (remove_insn): Likewise for param.
11391 (emit_pattern_before_noloc): Likewise for second and third params.
11392 (emit_jump_insn_before_noloc): Convert NULL_RTX to NULL.
11393 (emit_call_insn_before_noloc): Likewise.
11394 (emit_debug_insn_before_noloc): Strengthen "before" param from "rtx"
11396 (emit_barrier_before): Likewise.
11397 (emit_label_before): Strengthen "label" param from "rtx" to
11398 "rtx_code_label *". Strengthen "before" param from "rtx" to
11400 (emit_insn_after_1): Strengthen "after" param from "rtx" to
11402 (emit_pattern_after_noloc): Likewise.
11403 (emit_insn_after_noloc): Likewise.
11404 (emit_jump_insn_after_noloc): Likewise.
11405 (emit_call_insn_after_noloc): Likewise.
11406 (emit_debug_insn_after_noloc): Likewise.
11407 (emit_barrier_after): Likewise.
11408 (emit_label_after): Likewise for both params.
11409 (emit_pattern_after_setloc): Likewise for "after" param. Convert
11410 "loc" param from "int" to "location_t".
11411 (emit_insn_after_setloc): Likewise.
11412 (emit_jump_insn_after_setloc): Likewise.
11413 (emit_call_insn_after_setloc): Likewise.
11414 (emit_debug_insn_after_setloc): Likewise.
11415 (emit_pattern_before_setloc): Likewise for "before" param. Convert
11416 "loc" param from "int" to "location_t".
11417 (emit_pattern_before): Convert NULL_RTX to NULL.
11418 (emit_insn_before_setloc): Convert "loc" param from "int" to
11420 (emit_jump_insn_before_setloc): Likewise.
11421 (emit_call_insn_before_setloc): Likewise.
11422 (emit_debug_insn_before_setloc): Strengthen "before" param from rtx to
11423 rtx_insn *. Convert "loc" param from "int" to "location_t".
11424 * rtl.h (emit_insn_before_setloc, emit_jump_insn_before_setloc,
11425 emit_call_insn_before_setloc, emit_debug_insn_before_setloc):
11426 Convert 3rd param from "int" to "location_t".
11427 (emit_barrier_before, emit_barrier_after, next_real_insn):
11428 Strengthen param from rtx to rtx_insn *.
11429 (emit_label_before): Strengthen 1st param from "rtx" to
11430 "rtx_code_label *". Strengthen 2nd param from "rtx" to
11432 (emit_insn_after_noloc, emit_jump_insn_after_noloc,
11433 emit_call_insn_after_noloc, emit_debug_insn_after_noloc):
11434 Strengthen 2nd param from "rtx" to "rtx_insn *".
11435 (emit_insn_after_setloc, emit_jump_insn_after_setloc)
11436 emit_call_insn_after_setloc, emit_debug_insn_after_setloc):
11437 Likewise. Convert 3rd param from "int" to "location_t".
11438 (emit_label_after): Strengthen 1st param from "rtx" to
11439 "rtx_code_label *".
11440 (next_real_insn, remove_insn): Strengthen param from "rtx" to
11442 (add_insn_before, add_insn_after): Strengthen 1st and 2nd params
11443 from "rtx" to "rtx_insn *".
11445 2018-06-13 Jan Hubicka <hubicka@gcc.gnu.org>
11447 * cgraph.c (cgraph_node::get_untransformed_body): Dump function
11448 bodies streamed in with -Q.
11449 * dumpfile.c (dump_files): Add lto-stream-out dump file.
11450 * dumpfile.h (tree_dump_index): Add lto_stream_out.
11451 * gimple-streamer-out.c: Include gimple-pretty-print.h
11452 (output_bb): Dump stmts streamed.
11453 * lto-section-out.c: Include print-tree.h
11454 (lto_begin_section): Dump sections created.
11455 (lto_output_decl_index): Dump decl encoded.
11456 * lto-streamer-out.c: Include print-tree.h
11457 (create_output_block): Dump output block created.
11458 (DFS::DFS_write_tree_body): Dump DFS SCCs streamed.
11459 (output_function): Dump function output.
11460 (output_constructor): Dump constructor streamed.
11461 (write_global_stream): Output indexes encoded.
11462 (produce_asm_for_decls): Dump streams encoded.
11463 * lto-streamer.c (streamer_dump_file): New global var.
11464 * lto-streamer.h (streamer_dump_file): Declare.
11465 * passes.c (ipa_write_summaries): Initialize streamer dump.
11466 * varpool.c (varpool_node::get_constructor): Dump constructors streamed
11469 2018-06-13 Eric Botcazou <ebotcazou@adacore.com>
11472 * config/i386/winnt.c (i386_pe_seh_cold_init): Do not emit negative
11473 offsets for register save directives. Emit a second batch of save
11474 directives, if need be, when the function accesses prior frames.
11476 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
11478 * config/arc/fpu.md (fmasf4): Force operand to register.
11479 (fnmasf4): Likewise.
11481 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
11483 * config/arc/arc-protos.h (arc_pad_return): Remove.
11484 * config/arc/arc.c (machine_function): Remove force_short_suffix
11486 (arc_print_operand): Adjust printing of '&'.
11487 (arc_verify_short): Remove conditional printing of short suffix.
11488 (arc_final_prescan_insn): Remove reference to size_reason.
11489 (pad_return): New function.
11490 (arc_reorg): Call pad_return.
11491 (arc_pad_return): Remove.
11492 (arc_init_machine_status): Remove reference to force_short_suffix.
11493 * config/arc/arc.md (vunspec): Add VUNSPEC_ARC_BLOCKAGE.
11494 (attr length): When attribute iscompact is true force to 2
11495 regardless; in the case of maybe check if we want to force the
11496 instruction to have 4 bytes length.
11497 (nopv): Change it to generate 4 byte long nop as well.
11498 (blockage): New pattern.
11499 (simple_return): Remove call to arc_pad_return.
11500 (p_return_i): Likewise.
11502 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
11504 * config/arc/elf.h (LINK_GCC_C_SEQUENCE_SPEC): Define.
11506 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
11508 * config/arc/builtins.def (SYNC): SYNC instruction is valid on all
11511 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
11513 * config/arc/arc.c (atomic_exchangesi): EX instruction is default
11514 for ARC700 and ARCv2.
11516 2018-06-13 Chenghua Xu <paul.hua.gm@gmail.com>
11519 * config/mips/loongson.md (vec_setv4hi): Gen_lowpart for
11520 operands[2] instead of operands[1].
11523 2018-06-12 Richard Sandiford <richard.sandiford@linaro.org>
11525 * lra-constraints.c (simplify_operand_subreg): In the paradoxical
11526 case, check whether the outer register overlaps an unallocatable
11527 register, not just whether it fits the required class.
11529 2018-06-12 Richard Sandiford <richard.sandiford@linaro.org>
11531 * poly-int.h (can_div_trunc_p): Add new overload in which all values
11533 * alias.c (get_addr): Extend CONST_INT handling to poly_int_rtx_p.
11534 (memrefs_conflict_p): Likewise.
11535 (init_alias_analysis): Likewise.
11536 * cfgexpand.c (expand_debug_expr): Likewise.
11537 * combine.c (combine_simplify_rtx, force_int_to_mode): Likewise.
11538 * cse.c (fold_rtx): Likewise.
11539 * explow.c (adjust_stack, anti_adjust_stack): Likewise.
11540 * expr.c (emit_block_move_hints): Likewise.
11541 (clear_storage_hints, push_block, emit_push_insn): Likewise.
11542 (store_expr_with_bounds, reduce_to_bit_field_precision): Likewise.
11543 (emit_group_load_1): Use rtx_to_poly_int64 for group offsets.
11544 (emit_group_store): Likewise.
11545 (find_args_size_adjust): Use strip_offset. Use rtx_to_poly_int64
11546 to read the PRE/POST_MODIFY increment.
11547 * calls.c (store_one_arg): Use strip_offset.
11548 * rtlanal.c (rtx_addr_can_trap_p_1): Extend CONST_INT handling to
11550 (set_noop_p): Use rtx_to_poly_int64 for the elements selected
11552 * simplify-rtx.c (avoid_constant_pool_reference): Use strip_offset.
11553 (simplify_binary_operation_1): Extend CONST_INT handling to
11555 * var-tracking.c (compute_cfa_pointer): Take a poly_int64 rather
11556 than a HOST_WIDE_INT.
11557 (hard_frame_pointer_adjustment): Change from HOST_WIDE_INT to
11559 (adjust_mems, add_stores): Update accodingly.
11560 (vt_canonicalize_addr): Track polynomial offsets.
11561 (emit_note_insn_var_location): Likewise.
11562 (vt_add_function_parameter): Likewise.
11563 (vt_initialize): Likewise.
11565 2018-06-12 Jeff Law <law@redhat.com>
11567 * config.gcc (alpha*-*-freebsd*): Remove.
11568 * config/alpha/freebsd.h: Remove.
11570 2018-06-12 David Malcolm <dmalcolm@redhat.com>
11573 * spellcheck-tree.c (levenshtein_distance): Rename to...
11574 (get_edit_distance): ...this, and update for underlying renaming.
11575 * spellcheck-tree.h (levenshtein_distance): Rename to...
11576 (get_edit_distance): ...this.
11577 * spellcheck.c (levenshtein_distance): Rename to...
11578 (get_edit_distance): ...this. Convert from Levenshtein distance
11579 to Damerau-Levenshtein distance by supporting transpositions of
11580 adjacent characters. Rename "v1" to "v_next" and "v0" to
11582 (selftest::levenshtein_distance_unit_test_oneway): Rename to...
11583 (selftest::test_edit_distance_unit_test_oneway): ...this, and
11584 update for underlying renaming.
11585 (selftest::levenshtein_distance_unit_test): Rename to...
11586 (selftest::test_get_edit_distance_unit): ...this, and update for
11587 underlying renaming.
11588 (selftest::test_find_closest_string): Add example from PR 69968
11589 where transposition helps
11590 (selftest::test_metric_conditions): Update for renaming.
11591 (selftest::test_metric_conditions): Likewise.
11592 (selftest::spellcheck_c_tests): Likewise.
11593 * spellcheck.h (levenshtein_distance): Rename both overloads to...
11594 (get_edit_distance): ...this.
11595 (best_match::consider): Update for renaming.
11597 2018-06-12 Martin Sebor <msebor@redhat.com>
11599 PR tree-optimization/85259
11600 * builtins.c (compute_objsize): Handle constant offsets.
11601 * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Return
11602 true iff a warning has been issued.
11603 * gimple.h (gimple_nonartificial_location): New function.
11604 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Call
11605 gimple_nonartificial_location and handle -Wno-system-headers.
11606 (handle_builtin_stxncpy): Same.
11608 2018-06-12 Martin Sebor <msebor@redhat.com>
11611 * fold-const.c (operand_equal_p): Handle SAVE_EXPR.
11613 2018-06-12 Will Schmidt <will_schmidt@vnet.ibm.com>
11615 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add
11616 BUILTIN_VEC_XST entries for pointer to double and long long.
11618 2018-06-12 H.J. Lu <hongjiu.lu@intel.com>
11621 * config/i386/gnu-user.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
11623 * config/i386/gnu-user64.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
11626 2018-06-12 Martin Liska <mliska@suse.cz>
11628 * doc/options.texi: Document IntegerRange.
11630 2018-06-12 Martin Liska <mliska@suse.cz>
11632 * config/i386/i386.opt: Make MPX-related options as Deprecated.
11633 * opt-functions.awk: Handle Deprecated flag.
11634 * opts-common.c (decode_cmdline_option): Handle cl_deprecated
11636 (read_cmdline_option): Report warning for a deprecated option.
11637 * opts.h (struct cl_option): Add new field cl_deprecated.
11638 (CL_ERR_DEPRECATED): New.
11640 2018-06-12 Martin Liska <mliska@suse.cz>
11642 * doc/options.texi: Document Deprecated option flag.
11644 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
11646 * config/arc/arc-arch.h (arc_extras): New enum.
11647 (arc_cpu_t):Add field extra.
11648 (arc_cpu_types): Consider the extras.
11649 * config/arc/arc-cpus.def: Add extras info.
11650 * config/arc/arc-opts.h (processor_type): Consider extra field.
11651 * config/arc/arc.c (arc_override_options): Handle extra field.
11653 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
11655 * config/arc/arc-arch.h: Update ARC_OPTX macro.
11656 * config/arc/arc-options.def (ARC_OPTX): Introduce a new doc
11658 * config/arc/arc.c (arc_init): Update pic warning.
11659 (irq_range): Update irq range parsing warnings.
11660 (arc_override_options): Update various warning messages.
11661 (arc_handle_aux_attribute): Likewise.
11663 2018-06-12 Robert Suchanek <robert.suchanek@mips.com>
11665 * config/mips/i6400.md (i6400_fpu_fadd): Remove frint.
11667 2018-06-12 Jozef Lawrynowicz <jozef.l@mittosystems.com>
11669 * doc/sourcebuild.texi: Document usage of line number 0 in verify
11670 compiler messages directives.
11672 2018-06-12 Matthew Fortune <mfortune@gmail.com>
11674 * config/mips/mips-cpus.def: New MIPS_CPU for i6500.
11675 * config/mips/mips-tables.opt: Regenerate.
11676 * config/mips/mips.h (MIPS_ISA_LEVEL_SPEC): Mark i6500 as
11678 * doc/invoke.texi: Document -march=i6500.
11680 2018-06-12 Prachi Godbole <prachi.godbole@imgtec.com>
11682 * config/mips/i6400.md (i6400_gpmuldiv): Remove cpu_unit.
11683 (i6400_gpmul): Add cpu_unit.
11684 (i6400_gpdiv): Likewise.
11685 (i6400_msa_add_d): Update reservations.
11686 (i6400_msa_int_add) Likewise.
11687 (i6400_msa_short_logic3) Likewise.
11688 (i6400_msa_short_logic2) Likewise.
11689 (i6400_msa_short_logic) Likewise.
11690 (i6400_msa_move) Likewise.
11691 (i6400_msa_cmp) Likewise.
11692 (i6400_msa_short_float2) Likewise.
11693 (i6400_msa_div_d) Likewise.
11694 (i6400_msa_long_logic1) Likewise.
11695 (i6400_msa_long_logic2) Likewise.
11696 (i6400_msa_mult) Likewise.
11697 (i6400_msa_long_float2) Likewise.
11698 (i6400_msa_long_float4) Likewise.
11699 (i6400_msa_long_float5) Likewise.
11700 (i6400_msa_long_float8) Likewise.
11701 (i6400_fpu_fadd): Include frint type.
11702 (i6400_fpu_store): New define_insn_reservation.
11703 (i6400_fpu_load): Likewise.
11704 (i6400_fpu_move): Likewise.
11705 (i6400_fpu_fcmp): Likewise.
11706 (i6400_fpu_fmadd): Likewise.
11707 (i6400_int_mult): Include imul3nc type and update reservation.
11708 (i6400_int_div): Include idiv3 type and update reservation.
11709 (i6400_int_load): Update to check type not move_type.
11710 (i6400_int_store): Likewise.
11711 (i6400_int_prefetch): Set zero latency.
11713 2018-06-12 Eric Botcazou <ebotcazou@adacore.com>
11715 * gcc.c: Document new %@{...} sequence.
11716 (LINK_COMMAND_SPEC): Use it for the -L switches.
11717 (cpp_unique_options): Use it for the -I switches.
11718 (at_file_argbuf): New global variable.
11719 (in_at_file): Likewise.
11720 (alloc_args): Create at_file_argbuf.
11721 (clear_args): Truncate at_file_argbuf.
11722 (store_arg): If in_at_file, push the argument onto at_file_argbuf.
11723 (open_at_file): New function.
11724 (close_at_file): Likewise.
11725 (create_at_file): Delete.
11726 (do_spec_1) <'i'>: Use open_at_file/close_at_file.
11729 (validate_switches_from_spec): Deal with %@{...} sequence.
11730 (validate_switches): Likewise.
11731 (driver::finalize): Call clear_args.
11733 2018-06-11 Rasmus Villemoes <rasmus.villemoes@prevas.dk>
11735 * config/vx-common.h (USE_TM_CLONE_REGISTRY): #define to 0.
11737 2018-06-11 Martin Sebor <msebor@redhat.com>
11739 * doc/invoke.texi (-Wall): List -Wc++17-compat.
11740 (Wno-class-memaccess): Add @opindex.
11741 (Wno-templates, Wno-multiple-inheritance): Same.
11742 (Wno-virtual-inheritance, Wno-namespaces): Same.
11743 (Wno-pedantic, Wno-chkp, Wcoverage-mismatch): Same.
11744 (Wno-format-overflow, Wno-format-truncation): Same.
11745 (Wno-unused-local-typedefs, Walloc-size-larger-than): Same.
11746 (Wno-alloc-size-larger-than, Wframe-larger-than): Same
11747 (Wno-stack-usage, Wno-c++-compat, Wno-c++11-compat): Same.
11748 (Wno-c++14-compat, Wno-c++17-compat, Wno-openmp-simd): Same.
11749 (Wno-unsuffixed-float-constants, Wno-addr-space-convert): Same.
11750 (Wno-misspelled-isr): Same.
11752 2018-06-11 Martin Sebor <msebor@redhat.com>
11754 * PR tree-optimization/86083
11755 * tree-ssa-strlen.c (handle_char_store): Use tree_expr_nonzero_p.
11757 2018-06-11 Zhouyi Zhou <zhouzhouyi@gmail.com>
11759 * tree-eh.c (lower_eh_constructs_2): Add a comma to comment.
11761 2018-06-11 Segher Boessenkool <segher@kernel.crashing.org>
11764 * config/rs6000/rs6000.md (*movdi_internal32): Put constraint modifiers
11765 on the correct operand.
11766 (*movdi_internal64): Ditto.
11768 2018-06-11 Martin Liska <mliska@suse.cz>
11770 PR tree-optimization/86089
11771 * tree-ssa-strlen.c (get_string_length): Move back removed hunk.
11773 2018-06-11 Julia Koval <julia.koval@intel.com>
11775 * config/i386/vaesintrin.h (_mm_aesdec_epi128, _mm_aesdeclast_epi128)
11776 _mm_aesenc_epi128, _mm_aesenclast_epi128: Remove.
11777 * config/i386/vpclmulqdqintrin.h (_mm_clmulepi64_epi128): Remove.
11779 2018-06-11 Olivier Hainque <hainque@adacore.com>
11781 * dwarf2out.c (gen_compile_unit_die): Fallout to DW_LANG_Ada83
11782 for Ada with strict dwarf2.
11784 2018-06-08 Peter Bergner <bergner@vnet.ibm.com>
11787 * config/rs6000/rs6000.c (mem_operand_gpr): Enable PRE_INC and PRE_DEC
11790 2018-06-08 Jan Hubicka <hubicka@ucw.cz>
11792 * dumpfile.c (FIRST_ME_AUTO_NUMBERED_DUMP): Bump to 4.
11794 2018-06-08 David Edelsohn <dje.gcc@gmail.com>
11796 * config/rs6000/rs6000.c (rs6000_passes_ieee128): Protect with #if
11799 2018-06-08 Martin Liska <mliska@suse.cz>
11801 * tree-cfg.h (debug_function): Fix argument type to match
11804 2018-06-08 Martin Liska <mliska@suse.cz>
11806 * config/powerpcspe/powerpcspe.c (rs6000_xcoff_visibility):
11807 Remove usage of MPX-related (and removed) fields.
11808 * config/rs6000/rs6000.c (rs6000_xcoff_visibility): Likewise.
11810 2018-06-08 David Malcolm <dmalcolm@redhat.com>
11812 * cfg.c (debug): Use TDF_NONE rather than 0.
11813 * cfghooks.c (debug): Likewise.
11814 * dumpfile.c (DUMP_FILE_INFO): Likewise; also for OPTGROUP.
11815 (struct dump_option_value_info): Convert to...
11816 (struct kv_pair): ...this template type.
11817 (dump_options): Convert to kv_pair<dump_flags_t>; use TDF_NONE
11819 (optinfo_verbosity_options): Likewise.
11820 (optgroup_options): Convert to kv_pair<optgroup_flags_t>; use
11822 (gcc::dump_manager::dump_register): Use optgroup_flags_t rather
11823 than int for "optgroup_flags" param.
11824 (dump_generic_expr_loc): Use dump_flags_t rather than int for
11826 (dump_dec): Likewise.
11827 (dump_finish): Use TDF_NONE rather than 0.
11828 (gcc::dump_manager::opt_info_enable_passes): Use optgroup_flags_t
11829 rather than int for "optgroup_flags" param. Use TDF_NONE rather
11830 than 0. Update for change to option_ptr.
11831 (opt_info_switch_p_1): Convert "optgroup_flags" param from int *
11832 to optgroup_flags_t *. Use TDF_NONE and OPTGROUP_NONE rather than
11833 0. Update for changes to optinfo_verbosity_options and
11835 (opt_info_switch_p): Convert optgroup_flags from int to
11837 (dump_basic_block): Use dump_flags_t rather than int
11838 for "dump_kind" param.
11839 * dumpfile.h (TDF_ADDRESS, TDF_SLIM, TDF_RAW, TDF_DETAILS,
11840 TDF_STATS, TDF_BLOCKS, TDF_VOPS, TDF_LINENO, TDF_UID)
11841 TDF_STMTADDR, TDF_GRAPH, TDF_MEMSYMS, TDF_RHS_ONLY, TDF_ASMNAME,
11842 TDF_EH, TDF_NOUID, TDF_ALIAS, TDF_ENUMERATE_LOCALS, TDF_CSELIB,
11843 TDF_SCEV, TDF_GIMPLE, TDF_FOLDING, MSG_OPTIMIZED_LOCATIONS,
11844 MSG_MISSED_OPTIMIZATION, MSG_NOTE, MSG_ALL, TDF_COMPARE_DEBUG,
11845 TDF_NONE): Convert from macros to...
11846 (enum dump_flag): ...this new enum.
11847 (dump_flags_t): Update to use enum.
11848 (operator|, operator&, operator~, operator|=, operator&=):
11849 Implement for dump_flags_t.
11850 (OPTGROUP_NONE, OPTGROUP_IPA, OPTGROUP_LOOP, OPTGROUP_INLINE,
11851 OPTGROUP_OMP, OPTGROUP_VEC, OPTGROUP_OTHER, OPTGROUP_ALL):
11852 Convert from macros to...
11853 (enum optgroup_flag): ...this new enum.
11854 (optgroup_flags_t): New typedef.
11855 (operator|, operator|=): Implement for optgroup_flags_t.
11856 (struct dump_file_info): Convert field "alt_flags" to
11857 dump_flags_t. Convert field "optgroup_flags" to
11859 (dump_basic_block): Use dump_flags_t rather than int for param.
11860 (dump_generic_expr_loc): Likewise.
11861 (dump_dec): Likewise.
11862 (dump_register): Convert param "optgroup_flags" to
11864 (opt_info_enable_passes): Likewise.
11865 * early-remat.c (early_remat::dump_edge_list): Use TDF_NONE rather
11867 * gimple-pretty-print.c (debug): Likewise.
11868 * gimple-ssa-store-merging.c (bswap_replace): Likewise.
11869 (merged_store_group::apply_stores): Likewise.
11870 * gimple-ssa-strength-reduction.c (insert_initializers): Likewise.
11871 * gimple.c (verify_gimple_pp): Likewise.
11872 * graphite-poly.c (print_pbb_body): Likewise.
11873 * passes.c (pass_manager::register_one_dump_file): Convert
11874 local "optgroup_flags" to optgroup_flags_t.
11875 * print-tree.c (print_node): Use TDF_NONE rather than 0.
11877 (debug_body): Likewise.
11878 * tree-pass.h (struct pass_data): Convert field "optgroup_flags"
11879 to optgroup_flags_t.
11880 * tree-pretty-print.c (print_struct_decl): Use TDF_NONE rather
11882 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Likewise.
11883 (convert_mult_to_fma): Likewise.
11884 * tree-ssa-reassoc.c (undistribute_ops_list): Likewise.
11885 * tree-ssa-sccvn.c (vn_eliminate): Likewise.
11886 * tree-vect-data-refs.c (dump_lower_bound): Convert param
11887 "dump_kind" to dump_flags_t.
11889 2018-06-08 Segher Boessenkool <segher@kernel.crashing.org>
11891 * config/rs6000/rs6000.c (min, max): Delete.
11893 2018-06-08 Segher Boessenkool <segher@kernel.crashing.org>
11895 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete mention of
11896 -mabi=spe and -mabi=no-spe.
11898 2018-06-08 Martin Liska <mliska@suse.cz>
11900 * ipa-pure-const.c (propagate_pure_const): Use ::get at places
11901 where we expect an existing summary.
11903 2018-06-08 Martin Liska <mliska@suse.cz>
11905 * ipa-inline-analysis.c (simple_edge_hints): Use ::get method.
11906 * ipa-inline.h (estimate_edge_growth): Likewise.
11908 2018-06-08 Martin Liska <mliska@suse.cz>
11910 * cgraph.c (function_version_hasher::hash): Use
11911 cgraph_node::get_uid ().
11912 (function_version_hasher::equal):
11913 * cgraph.h (cgraph_node::get_uid): New method.
11914 * ipa-inline.c (update_caller_keys): Use
11915 cgraph_node::get_uid ().
11916 (update_callee_keys): Likewise.
11917 * ipa-utils.c (searchc): Likewise.
11918 (ipa_reduced_postorder): Likewise.
11919 * lto-cgraph.c (input_node): Likewise.
11920 * passes.c (is_pass_explicitly_enabled_or_disabled): Likewise.
11921 * symbol-summary.h (symtab_insertion): Likewise.
11922 (symtab_removal): Likewise.
11923 (symtab_duplication): Likewise.
11924 * tree-pretty-print.c (dump_function_header): Likewise.
11925 * tree-sra.c (convert_callers_for_node): Likewise.
11927 2018-06-08 Martin Liska <mliska@suse.cz>
11929 * cgraph.c (symbol_table::create_edge): Always assign a new
11931 (symbol_table::free_edge): Do not recycle numbers.
11932 * cgraph.h (cgraph_edge::get): New method.
11933 * symbol-summary.h (symtab_removal): Use it.
11934 (symtab_duplication): Likewise.
11935 (call_summary::hashable_uid): Remove.
11937 2018-06-08 Martin Liska <mliska@suse.cz>
11939 * ipa-inline-analysis.c (inline_edge_removal_hook): Remove.
11940 (initialize_growth_caches): Remove.
11941 (free_growth_caches): Likewise.
11942 (do_estimate_edge_time): Use edge_growth_cache.
11943 (do_estimate_edge_size): Likewise.
11944 (do_estimate_edge_hints): Likewise.
11945 * ipa-inline.c (reset_edge_caches): Likewise.
11946 (recursive_inlining): Likewise.
11947 (inline_small_functions): Likewise.
11948 * ipa-inline.h (initialize_growth_caches): Remove.
11949 (estimate_edge_size): Likewise.
11950 (estimate_edge_time): Likewise.
11951 (estimate_edge_hints): Likewise.
11952 (reset_edge_growth_cache): Likewise.
11953 * symbol-summary.h (call_summary::remove): New method.
11955 2018-06-08 Martin Liska <mliska@suse.cz>
11957 * ipa-cp.c (class edge_clone_summary): New summary.
11958 (grow_edge_clone_vectors): Remove.
11959 (ipcp_edge_duplication_hook): Remove.
11960 (class edge_clone_summary_t): New call_summary class.
11961 (ipcp_edge_removal_hook): Remove.
11962 (edge_clone_summary_t::duplicate): New function.
11963 (get_next_cgraph_edge_clone): Use edge_clone_summaries.
11964 (create_specialized_node): Likewise.
11965 (ipcp_driver): Initialize edge_clone_summaries and do not
11968 2018-06-08 Martin Liska <mliska@suse.cz>
11970 * symbol-summary.h (get): New function.
11971 (call_summary::m_initialize_when_cloning): New class member.
11973 2018-06-08 Martin Liska <mliska@suse.cz>
11975 * cgraph.c (cgraph_node::remove): Do not recycle uid.
11976 * cgraph.h (symbol_table::release_symbol): Do not pass uid.
11977 (symbol_table::allocate_cgraph_symbol): Do not set uid.
11978 * passes.c (uid_hash_t): Record removed_nodes by their uids.
11979 (remove_cgraph_node_from_order): Use the removed_nodes set.
11980 (do_per_function_toporder): Likwise.
11981 * symbol-summary.h (symtab_insertion): Use cgraph_node::uid
11982 instead of summary_uid.
11983 (symtab_removal): Likewise.
11984 (symtab_duplication): Likewise.
11986 2018-06-08 Martin Liska <mliska@suse.cz>
11988 * ipa-cp.c (ipcp_store_bits_results): Use
11989 ipcp_transformation_sum.
11990 (ipcp_store_vr_results): Likewise.
11991 * ipa-prop.c (ipcp_grow_transformations_if_necessary): Renamed
11993 (ipcp_transformation_initialize): ... this.
11994 (ipa_set_node_agg_value_chain):
11995 (ipa_node_params_t::duplicate): Use ipcp_transformation_sum.
11996 (write_ipcp_transformation_info): Likewise.
11997 (read_ipcp_transformation_info): Likewise.
11998 (ipcp_update_bits): Likewise.
11999 (ipcp_update_vr): Likewise.
12000 (ipcp_transform_function): Likewise.
12001 * ipa-prop.h: Rename ipcp_transformation_summary to
12002 ipcp_transformation.
12003 (class ipcp_transformation_t): New function summary.
12004 (ipcp_get_transformation_summary): Use ipcp_transformation_sum.
12005 (ipa_get_agg_replacements_for_node): Likewise.
12007 2018-06-08 Martin Liska <mliska@suse.cz>
12009 * ipa-pure-const.c (struct funct_state_d): Do it class instead
12011 (class funct_state_summary_t): New function_summary class.
12012 (has_function_state): Remove.
12013 (get_function_state): Likewise.
12014 (set_function_state): Likewise.
12015 (add_new_function): Likewise.
12016 (funct_state_summary_t::insert): New function.
12017 (duplicate_node_data): Remove.
12018 (remove_node_data): Remove.
12019 (funct_state_summary_t::duplicate): New function.
12020 (register_hooks): Create new funct_state_summaries.
12021 (pure_const_generate_summary): Use it.
12022 (pure_const_write_summary): Likewise.
12023 (pure_const_read_summary): Likewise.
12024 (propagate_pure_const): Likewise.
12025 (propagate_nothrow): Likewise.
12026 (dump_malloc_lattice): Likewise.
12027 (propagate_malloc): Likewise.
12028 (execute): Do not register hooks, just remove summary
12030 (pass_ipa_pure_const::pass_ipa_pure_const): Simplify
12033 2018-06-08 Martin Liska <mliska@suse.cz>
12035 * ipa-reference.c (remove_node_data): Remove.
12036 (duplicate_node_data): Likewise.
12037 (class ipa_ref_var_info_summary_t): New class.
12038 (class ipa_ref_opt_summary_t): Likewise.
12039 (get_reference_vars_info): Use ipa_ref_var_info_summaries.
12040 (get_reference_optimization_summary): Use
12041 ipa_ref_opt_sum_summaries.
12042 (set_reference_vars_info): Remove.
12043 (set_reference_optimization_summary): Likewise.
12044 (ipa_init): Create summaries.
12045 (init_function_info): Use function summary.
12046 (ipa_ref_opt_summary_t::duplicate): New function.
12047 (ipa_ref_opt_summary_t::remove): New function.
12048 (get_read_write_all_from_node): Fix GNU coding style.
12049 (propagate): Use function summary.
12050 (write_node_summary_p): Fix GNU coding style.
12051 (stream_out_bitmap): Likewise.
12052 (ipa_reference_read_optimization_summary): Use function summary.
12053 (ipa_reference_c_finalize): Do not release hooks.
12055 2018-06-08 Martin Liska <mliska@suse.cz>
12057 * ipa-fnsummary.c (dump_ipa_call_summary): Use ::get method.
12058 (analyze_function_body): Extract multiple calls of get_create.
12059 * ipa-inline-analysis.c (simple_edge_hints): Likewise.
12060 * ipa-inline.c (recursive_inlining): Use ::get method.
12061 * ipa-inline.h (estimate_edge_growth): Likewise.
12063 2018-06-08 Martin Liska <mliska@suse.cz>
12065 * hsa-common.h (enum hsa_function_kind): Rename HSA_NONE to
12067 (hsa_function_summary::hsa_function_summary): Use the new enum
12069 (hsa_gpu_implementation_p): Use hsa_summaries::get.
12070 * hsa-gen.c (hsa_get_host_function): Likewise.
12071 (get_brig_function_name): Likewise.
12072 * ipa-hsa.c (process_hsa_functions): Likewise.
12073 (ipa_hsa_write_summary): Likewise.
12074 * symbol-summary.h (symtab_duplication): Use ::get function/
12075 (get): New function.
12077 2018-06-08 Martin Liska <mliska@suse.cz>
12079 * config/i386/i386.c (ix86_can_inline_p): Use get_create instead
12081 * hsa-common.c (hsa_summary_t::link_functions): Likewise.
12082 (hsa_register_kernel): Likewise.
12083 * hsa-common.h (hsa_gpu_implementation_p): Likewise.
12084 * hsa-gen.c (hsa_get_host_function): Likewise.
12085 (get_brig_function_name): Likewise.
12086 (generate_hsa): Likewise.
12087 (pass_gen_hsail::execute): Likewise.
12088 * ipa-cp.c (ipcp_cloning_candidate_p): Likewise.
12089 (devirtualization_time_bonus): Likewise.
12090 (ipcp_propagate_stage): Likewise.
12091 * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
12092 (edge_set_predicate): Likewise.
12093 (evaluate_conditions_for_known_args): Likewise.
12094 (evaluate_properties_for_edge): Likewise.
12095 (ipa_fn_summary::reset): Likewise.
12096 (ipa_fn_summary_t::duplicate): Likewise.
12097 (dump_ipa_call_summary): Likewise.
12098 (ipa_dump_fn_summary): Likewise.
12099 (analyze_function_body): Likewise.
12100 (compute_fn_summary): Likewise.
12101 (estimate_edge_devirt_benefit): Likewise.
12102 (estimate_edge_size_and_time): Likewise.
12103 (estimate_calls_size_and_time): Likewise.
12104 (estimate_node_size_and_time): Likewise.
12105 (inline_update_callee_summaries): Likewise.
12106 (remap_edge_change_prob): Likewise.
12107 (remap_edge_summaries): Likewise.
12108 (ipa_merge_fn_summary_after_inlining): Likewise.
12109 (ipa_update_overall_fn_summary): Likewise.
12110 (read_ipa_call_summary): Likewise.
12111 (inline_read_section): Likewise.
12112 (write_ipa_call_summary): Likewise.
12113 (ipa_fn_summary_write): Likewise.
12114 (ipa_free_fn_summary): Likewise.
12115 * ipa-hsa.c (process_hsa_functions): Likewise.
12116 (ipa_hsa_write_summary): Likewise.
12117 (ipa_hsa_read_section): Likewise.
12118 * ipa-icf.c (sem_function::merge): Likewise.
12119 * ipa-inline-analysis.c (simple_edge_hints): Likewise.
12120 (do_estimate_edge_time): Likewise.
12121 (estimate_size_after_inlining): Likewise.
12122 (estimate_growth): Likewise.
12123 (growth_likely_positive): Likewise.
12124 * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
12125 (inline_call): Likewise.
12126 * ipa-inline.c (caller_growth_limits): Likewise.
12127 (can_inline_edge_p): Likewise.
12128 (can_inline_edge_by_limits_p): Likewise.
12129 (compute_uninlined_call_time): Likewise.
12130 (compute_inlined_call_time): Likewise.
12131 (want_inline_small_function_p): Likewise.
12132 (edge_badness): Likewise.
12133 (update_caller_keys): Likewise.
12134 (update_callee_keys): Likewise.
12135 (recursive_inlining): Likewise.
12136 (inline_small_functions): Likewise.
12137 (inline_to_all_callers_1): Likewise.
12138 (dump_overall_stats): Likewise.
12139 (early_inline_small_functions): Likewise.
12140 (early_inliner): Likewise.
12141 * ipa-inline.h (estimate_edge_growth): Likewise.
12142 * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
12143 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
12144 * ipa-prop.h (IPA_NODE_REF): Likewise.
12145 (IPA_EDGE_REF): Likewise.
12146 * ipa-pure-const.c (malloc_candidate_p): Likewise.
12147 (propagate_malloc): Likewise.
12148 * ipa-split.c (execute_split_functions): Likewise.
12149 * symbol-summary.h: Rename get to get_create.
12151 (get_create): Likewise.
12152 * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
12154 2018-06-08 Martin Liska <mliska@suse.cz>
12156 * symbol-summary.h (release): Move definition out of class
12158 (symtab_removal): Likewise.
12159 (symtab_duplication): Likewise.
12161 2018-06-08 Martin Liska <mliska@suse.cz>
12163 * symbol-summary.h (function_summary): Move constructor
12164 implementation out of class declaration.
12165 (release): Likewise.
12166 (symtab_insertion): Likewise.
12167 (symtab_removal): Likewise.
12168 (symtab_duplication): Likewise.
12171 2018-06-08 Martin Liska <mliska@suse.cz>
12173 * Makefile.in: Remove support for MPX (macros, related functions,
12174 fields in cgraph_node, ...).
12175 * builtin-types.def (BT_BND): Likewise.
12176 (BT_FN_BND_CONST_PTR): Likewise.
12177 (BT_FN_CONST_PTR_BND): Likewise.
12178 (BT_FN_VOID_PTR_BND): Likewise.
12179 (BT_FN_BND_CONST_PTR_SIZE): Likewise.
12180 (BT_FN_VOID_CONST_PTR_BND_CONST_PTR): Likewise.
12181 * builtins.c (expand_builtin_memcpy_with_bounds): Likewise.
12182 (expand_builtin_mempcpy_with_bounds): Likewise.
12183 (expand_builtin_memset_with_bounds): Likewise.
12184 (expand_builtin_memset_args): Likewise.
12185 (std_expand_builtin_va_start): Likewise.
12186 (expand_builtin): Likewise.
12187 (expand_builtin_with_bounds): Likewise.
12188 * builtins.def (DEF_BUILTIN_CHKP): Likewise.
12189 (DEF_LIB_BUILTIN_CHKP): Likewise.
12190 (DEF_EXT_LIB_BUILTIN_CHKP): Likewise.
12191 (DEF_CHKP_BUILTIN): Likewise.
12192 (BUILT_IN_MEMCPY): Likewise.
12193 (BUILT_IN_MEMMOVE): Likewise.
12194 (BUILT_IN_MEMPCPY): Likewise.
12195 (BUILT_IN_MEMSET): Likewise.
12196 (BUILT_IN_STPCPY): Likewise.
12197 (BUILT_IN_STRCAT): Likewise.
12198 (BUILT_IN_STRCHR): Likewise.
12199 (BUILT_IN_STRCPY): Likewise.
12200 (BUILT_IN_STRLEN): Likewise.
12201 (BUILT_IN_MEMCPY_CHK): Likewise.
12202 (BUILT_IN_MEMMOVE_CHK): Likewise.
12203 (BUILT_IN_MEMPCPY_CHK): Likewise.
12204 (BUILT_IN_MEMSET_CHK): Likewise.
12205 (BUILT_IN_STPCPY_CHK): Likewise.
12206 (BUILT_IN_STRCAT_CHK): Likewise.
12207 (BUILT_IN_STRCPY_CHK): Likewise.
12208 * calls.c (store_bounds): Likewise.
12209 (emit_call_1): Likewise.
12210 (special_function_p): Likewise.
12211 (maybe_warn_nonstring_arg): Likewise.
12212 (initialize_argument_information): Likewise.
12213 (finalize_must_preallocate): Likewise.
12214 (compute_argument_addresses): Likewise.
12215 (expand_call): Likewise.
12216 * cfgexpand.c (expand_call_stmt): Likewise.
12217 (expand_return): Likewise.
12218 (expand_gimple_stmt_1): Likewise.
12219 (pass_expand::execute): Likewise.
12220 * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Likewise.
12221 (cgraph_node::remove): Likewise.
12222 (cgraph_node::dump): Likewise.
12223 (cgraph_node::verify_node): Likewise.
12224 * cgraph.h (chkp_function_instrumented_p): Likewise.
12225 (symtab_node::get_alias_target): Likewise.
12226 (cgraph_node::can_remove_if_no_direct_calls_and_refs_p): Likewise.
12227 (cgraph_local_p): Likewise.
12228 * cgraphbuild.c (cgraph_edge::rebuild_edges): Likewise.
12229 (cgraph_edge::rebuild_references): Likewise.
12230 * cgraphunit.c (varpool_node::finalize_decl): Likewise.
12231 (walk_polymorphic_call_targets): Likewise.
12232 (cgraph_node::expand_thunk): Likewise.
12233 (symbol_table::output_weakrefs): Likewise.
12234 * common/config/i386/i386-common.c (OPTION_MASK_ISA2_GENERAL_REGS_ONLY_UNSET): Likewise.
12235 (ix86_handle_option): Likewise.
12236 * config/i386/constraints.md: Likewise.
12237 * config/i386/i386-builtin-types.def (BND): Likewise.
12241 * config/i386/i386-builtin.def (BDESC_END): Likewise.
12242 (BDESC_FIRST): Likewise.
12244 * config/i386/i386-c.c (ix86_target_macros_internal): Likewise.
12245 * config/i386/i386-protos.h (ix86_bnd_prefixed_insn_p): Likewise.
12246 * config/i386/i386.c (enum reg_class): Likewise.
12247 (ix86_target_string): Likewise.
12248 (ix86_option_override_internal): Likewise.
12249 (ix86_conditional_register_usage): Likewise.
12250 (ix86_valid_target_attribute_inner_p): Likewise.
12251 (ix86_set_indirect_branch_type): Likewise.
12252 (ix86_set_current_function): Likewise.
12253 (ix86_function_arg_regno_p): Likewise.
12254 (init_cumulative_args): Likewise.
12255 (ix86_function_arg_advance): Likewise.
12256 (ix86_function_arg): Likewise.
12257 (ix86_pass_by_reference): Likewise.
12258 (ix86_function_value_regno_p): Likewise.
12259 (ix86_function_value_1): Likewise.
12260 (ix86_function_value_bounds): Likewise.
12261 (ix86_return_in_memory): Likewise.
12262 (ix86_setup_incoming_vararg_bounds): Likewise.
12263 (ix86_va_start): Likewise.
12264 (indirect_thunk_need_prefix): Likewise.
12265 (print_reg): Likewise.
12266 (ix86_print_operand): Likewise.
12267 (ix86_expand_call): Likewise.
12268 (ix86_output_function_return): Likewise.
12269 (reg_encoded_number): Likewise.
12270 (BDESC_VERIFYS): Likewise.
12271 (ix86_init_mpx_builtins): Likewise.
12272 (ix86_init_builtins): Likewise.
12273 (ix86_emit_cmove): Likewise.
12274 (ix86_emit_move_max): Likewise.
12275 (ix86_expand_builtin): Likewise.
12276 (ix86_builtin_mpx_function): Likewise.
12277 (ix86_get_arg_address_for_bt): Likewise.
12278 (ix86_load_bounds): Likewise.
12279 (ix86_store_bounds): Likewise.
12280 (ix86_load_returned_bounds): Likewise.
12281 (ix86_store_returned_bounds): Likewise.
12282 (ix86_class_likely_spilled_p): Likewise.
12283 (ix86_hard_regno_mode_ok): Likewise.
12284 (x86_order_regs_for_local_alloc): Likewise.
12285 (ix86_mitigate_rop): Likewise.
12286 (ix86_bnd_prefixed_insn_p): Likewise.
12287 (ix86_mpx_bound_mode): Likewise.
12288 (ix86_make_bounds_constant): Likewise.
12289 (ix86_initialize_bounds): Likewise.
12290 (TARGET_LOAD_BOUNDS_FOR_ARG): Likewise.
12291 (TARGET_STORE_BOUNDS_FOR_ARG): Likewise.
12292 (TARGET_LOAD_RETURNED_BOUNDS): Likewise.
12293 (TARGET_STORE_RETURNED_BOUNDS): Likewise.
12294 (TARGET_CHKP_BOUND_MODE): Likewise.
12295 (TARGET_BUILTIN_CHKP_FUNCTION): Likewise.
12296 (TARGET_CHKP_FUNCTION_VALUE_BOUNDS): Likewise.
12297 (TARGET_CHKP_MAKE_BOUNDS_CONSTANT): Likewise.
12298 (TARGET_CHKP_INITIALIZE_BOUNDS): Likewise.
12299 * config/i386/i386.h (TARGET_MPX): Likewise.
12300 (TARGET_MPX_P): Likewise.
12301 (VALID_BND_REG_MODE): Likewise.
12302 (FIRST_BND_REG): Likewise.
12303 (LAST_BND_REG): Likewise.
12304 (enum reg_class): Likewise.
12305 (BND_REG_P): Likewise.
12306 (BND_REGNO_P): Likewise.
12307 (BNDmode): Likewise.
12308 (ADJUST_INSN_LENGTH): Likewise.
12309 * config/i386/i386.md: Likewise.
12310 * config/i386/i386.opt: Likewise.
12311 * config/i386/linux-common.h (LIBMPX_LIBS): Likewise.
12312 (defined): Likewise.
12313 (LINK_MPX): Likewise.
12314 (MPX_SPEC): Likewise.
12315 (LIBMPX_SPEC): Likewise.
12316 (LIBMPXWRAPPERS_SPEC): Likewise.
12317 (CHKP_SPEC): Likewise.
12318 * config/i386/predicates.md: Likewise.
12319 * dbxout.c (dbxout_type): Likewise.
12320 * doc/extend.texi: Likewise.
12321 * doc/invoke.texi: Likewise.
12322 * doc/md.texi: Likewise.
12323 * doc/tm.texi: Likewise.
12324 * doc/tm.texi.in: Likewise.
12325 * dwarf2out.c (is_base_type): Likewise.
12326 (gen_formal_types_die): Likewise.
12327 (gen_subprogram_die): Likewise.
12328 (gen_type_die_with_usage): Likewise.
12329 (gen_decl_die): Likewise.
12330 (dwarf2out_late_global_decl): Likewise.
12331 * expr.c (expand_assignment): Likewise.
12332 (emit_storent_insn): Likewise.
12333 (store_expr_with_bounds): Likewise.
12334 (store_expr): Likewise.
12335 (expand_expr_real_1): Likewise.
12336 * expr.h (store_expr_with_bounds): Likewise.
12337 * function.c (use_register_for_decl): Likewise.
12338 (struct bounds_parm_data): Likewise.
12339 (assign_parms_augmented_arg_list): Likewise.
12340 (assign_parm_find_entry_rtl): Likewise.
12341 (assign_parm_is_stack_parm): Likewise.
12342 (assign_parm_load_bounds): Likewise.
12343 (assign_bounds): Likewise.
12344 (assign_parms): Likewise.
12345 (expand_function_start): Likewise.
12346 * gcc.c (CHKP_SPEC): Likewise.
12347 * gimple-fold.c (gimple_fold_builtin_memory_op): Likewise.
12348 * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Likewise.
12349 (wrestrict_dom_walker::check_call): Likewise.
12350 * gimple.c (gimple_build_call_from_tree): Likewise.
12351 * gimple.h (enum gf_mask): Likewise.
12352 (gimple_call_with_bounds_p): Likewise.
12353 (gimple_call_set_with_bounds): Likewise.
12354 * gimplify.c (gimplify_init_constructor): Likewise.
12355 * ipa-cp.c (initialize_node_lattices): Likewise.
12356 (propagate_constants_across_call): Likewise.
12357 (find_more_scalar_values_for_callers_subset): Likewise.
12358 * ipa-hsa.c (process_hsa_functions): Likewise.
12359 * ipa-icf-gimple.c (func_checker::compare_gimple_call): Likewise.
12360 * ipa-icf.c (sem_function::merge): Likewise.
12361 * ipa-inline.c (early_inliner): Likewise.
12362 * ipa-pure-const.c (warn_function_noreturn): Likewise.
12363 (warn_function_cold): Likewise.
12364 (propagate_pure_const): Likewise.
12365 * ipa-ref.h (enum GTY): Likewise.
12366 * ipa-split.c (find_retbnd): Likewise.
12367 (consider_split): Likewise.
12368 (split_function): Likewise.
12369 * ipa-visibility.c (cgraph_externally_visible_p): Likewise.
12370 * ipa.c (walk_polymorphic_call_targets): Likewise.
12371 (symbol_table::remove_unreachable_nodes): Likewise.
12372 (process_references): Likewise.
12373 (cgraph_build_static_cdtor_1): Likewise.
12374 * lto-cgraph.c (lto_output_node): Likewise.
12375 (output_refs): Likewise.
12376 (compute_ltrans_boundary): Likewise.
12377 (input_overwrite_node): Likewise.
12378 (input_node): Likewise.
12379 (input_cgraph_1): Likewise.
12380 * params.def (PARAM_CHKP_MAX_CTOR_SIZE): Likewise.
12381 * passes.c (pass_manager::execute_early_local_passes): Likewise.
12382 (class pass_chkp_instrumentation_passes): Likewise.
12383 (make_pass_chkp_instrumentation_passes): Likewise.
12384 * passes.def: Likewise.
12385 * rtl.h (struct GTY): Likewise.
12386 (CALL_EXPR_WITH_BOUNDS_P): Likewise.
12387 * stor-layout.c (layout_type): Likewise.
12388 * symtab.c: Likewise.
12389 * target.def: Likewise.
12390 * targhooks.c (default_chkp_bound_type): Likewise.
12391 (default_chkp_bound_mode): Likewise.
12392 (default_builtin_chkp_function): Likewise.
12393 (default_chkp_function_value_bounds): Likewise.
12394 (default_chkp_make_bounds_constant): Likewise.
12395 (default_chkp_initialize_bounds): Likewise.
12396 * targhooks.h (default_chkp_bound_type): Likewise.
12397 (default_chkp_bound_mode): Likewise.
12398 (default_builtin_chkp_function): Likewise.
12399 (default_chkp_function_value_bounds): Likewise.
12400 (default_chkp_make_bounds_constant): Likewise.
12401 (default_chkp_initialize_bounds): Likewise.
12402 * toplev.c (compile_file): Likewise.
12403 (process_options): Likewise.
12404 * tree-core.h (DEF_BUILTIN): Likewise.
12405 (DEF_BUILTIN_CHKP): Likewise.
12406 * tree-inline.c (declare_return_variable): Likewise.
12407 (remap_gimple_stmt): Likewise.
12408 (copy_bb): Likewise.
12409 (initialize_inlined_parameters): Likewise.
12410 (expand_call_inline): Likewise.
12411 * tree-pass.h (make_pass_ipa_chkp_versioning): Likewise.
12412 (make_pass_ipa_chkp_early_produce_thunks): Likewise.
12413 (make_pass_ipa_chkp_produce_thunks): Likewise.
12414 (make_pass_chkp): Likewise.
12415 (make_pass_chkp_opt): Likewise.
12416 (make_pass_chkp_instrumentation_passes): Likewise.
12417 * tree-pretty-print.c (dump_generic_node): Likewise.
12418 * tree-ssa-ccp.c (insert_clobber_before_stack_restore): Likewise.
12419 * tree-ssa-dce.c (propagate_necessity): Likewise.
12420 (eliminate_unnecessary_stmts): Likewise.
12421 * tree-ssa-pre.c (create_expression_by_pieces): Likewise.
12422 * tree-ssa-sccvn.c (copy_reference_ops_from_call): Likewise.
12423 * tree-ssa-sccvn.h: Likewise.
12424 * tree-ssa-strlen.c (get_string_length): Likewise.
12425 (valid_builtin_call): Likewise.
12426 (adjust_last_stmt): Likewise.
12427 (handle_builtin_strchr): Likewise.
12428 (handle_builtin_strcpy): Likewise.
12429 (handle_builtin_stxncpy): Likewise.
12430 (handle_builtin_memcpy): Likewise.
12431 (handle_builtin_strcat): Likewise.
12432 (strlen_check_and_optimize_stmt): Likewise.
12433 * tree-stdarg.c (expand_ifn_va_arg_1): Likewise.
12434 * tree-streamer-in.c: Likewise.
12435 * tree-streamer.c (record_common_node): Likewise.
12436 * tree.c (tree_code_size): Likewise.
12437 (wide_int_to_tree_1): Likewise.
12438 (type_contains_placeholder_1): Likewise.
12439 (build_common_tree_nodes): Likewise.
12440 * tree.def (POINTER_BOUNDS_TYPE): Likewise.
12441 * tree.h (POINTER_BOUNDS_TYPE_P): Likewise.
12442 (POINTER_BOUNDS_P): Likewise.
12443 (BOUNDED_TYPE_P): Likewise.
12444 (BOUNDED_P): Likewise.
12445 (CALL_WITH_BOUNDS_P): Likewise.
12446 (pointer_bounds_type_node): Likewise.
12447 * value-prof.c (gimple_ic): Likewise.
12448 * var-tracking.c (vt_add_function_parameters): Likewise.
12449 * varasm.c (make_decl_rtl): Likewise.
12450 (assemble_start_function): Likewise.
12451 (output_constant): Likewise.
12452 (maybe_assemble_visibility): Likewise.
12453 * varpool.c (ctor_for_folding): Likewise.
12454 * chkp-builtins.def: Remove.
12455 * ipa-chkp.c: Remove.
12456 * ipa-chkp.h: Remove.
12457 * rtl-chkp.c: Remove.
12458 * rtl-chkp.h: Remove.
12459 * tree-chkp-opt.c: Remove.
12460 * tree-chkp.c: Remove.
12461 * tree-chkp.h: Remove.
12463 2018-06-07 Carl Love <cel@us.ibm.com>
12465 * config/rs6000/vsx.md (vextract_fp_from_shorth,
12466 vextract_fp_from_shortl): Add BE support.
12468 2018-06-07 Paul Koning <ni1d@arrl.net>
12470 * compare-elim.c (try_merge_compare): Don't merge compare if
12471 address contains a side effect.
12472 (try_eliminate_compare): Likewise.
12474 2018-06-07 Olga Makhotina <olga.makhotina@intel.com>
12476 * config.gcc: Support "tremont".
12477 * config/i386/driver-i386.c (host_detect_local_cpu): Detect "tremont".
12478 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
12480 * config/i386/i386.c (m_TREMONT): Define.
12481 (processor_target_table): Add "tremont".
12482 (PTA_TREMONT): Define.
12483 (ix86_lea_outperforms): Add TARGET_TREMONT.
12484 (get_builtin_code_for_version): Handle PROCESSOR_TREMONT.
12485 (fold_builtin_cpu): Add M_INTEL_TREMONT, replace M_INTEL_GOLDMONT
12486 and M_INTEL_GOLDMONT_PLUS.
12487 (fold_builtin_cpu): Add "tremont".
12488 (ix86_add_stmt_cost): Add TARGET_TREMONT.
12489 (ix86_option_override_internal): Add "tremont".
12490 * config/i386/i386.h (processor_costs): Define TARGET_TREMONT.
12491 (processor_type): Add PROCESSOR_TREMONT.
12492 * config/i386/x86-tune.def: Add m_TREMONT.
12493 * doc/invoke.texi: Add tremont as x86 -march=/-mtune= CPU type.
12495 2018-06-07 Jozef Lawrynowicz <jozef.l@mittosystems.com>
12497 * config/msp430/msp430.c (msp430_mcu_name): Set the "i" in the
12498 symbol defined for msp430i* devices to be lower case.
12500 2018-06-07 Richard Biener <rguenther@suse.de>
12502 * graphite-sese-to-poly.c (extract_affine): Avoid unneded
12503 wrapping. Properly wrap the result of a BIT_NOT_EXPR.
12504 Properly wrap signed arithmetic if overflow wraps.
12506 2018-06-07 Jakub Jelinek <jakub@redhat.com>
12508 PR tree-optimization/69615
12509 * tree-ssa-reassoc.c (optimize_range_tests_var_bound): If rhs2 is lhs
12510 of a cast from a same precision integral SSA_NAME in a bb dominated
12511 by first_bb, retry with rhs2 set to the rhs1 of the cast. Don't emit
12512 cast to utype if rhs2 has already a compatible type.
12514 2018-06-07 Richard Biener <rguenther@suse.de>
12516 PR tree-optimization/85935
12517 * graphite-scop-detection.c (find_params_in_bb): Analyze
12518 condition operands with respect to the correct loop. Assert
12519 the analysis doesn't fail.
12521 2018-06-04 Carl Love <cel@us.ibm.com>
12523 * config/rs6000/vsx.md (first_match_index_<mode>): Calculate index
12524 using natural element order. Use gen_lshrsi3 instead of gen_ashrsi3
12525 as it is slightly cheaper.
12526 (first_match_or_eos_index_<mode>):
12527 Calculate index using natural element order.
12528 (first_match_index_<mode>):
12529 Calculate index using natural element order.
12530 (first_match_or_eos_index_<mode>):
12531 Calculate index using natural order.
12532 (define_insn vclzlsbb): Change to define_insn vclzlsbb_<mode>.
12533 for BE and LE modes.
12534 * config/rs6000/rs6000-c.c: Rename P9V_BUILTIN_VCLZLSBB,
12535 P9V_BUILTIN_VCLZLSBB_V16QI.
12536 * config/rs6000/rs6000-builtin.def: Make VCLZLSBB mode
12539 2018-06-06 Kelvin Nilsen <kelvin@gcc.gnu.org>
12541 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Adjust
12542 indentation and line wrap for many prototypes. Add missing
12543 @smallexample directives around block of prototypes for vec_xl and
12546 2018-06-05 Michael Meissner <meissner@linux.ibm.com>
12548 * config/rs6000/rs6000.c (rs6000_passes_ieee128): New boolean to
12549 track if we pass or return IEEE 128-bit floating point.
12550 (ieee128_mangling_gcc_8_1): New boolean to say whether to generate
12551 C++ mangling that is compatible with GCC 8.1.
12552 (TARGET_ASM_GLOBALIZE_DECL_NAME): Override target hook.
12553 (init_cumulative_args): Note if we pass or return IEEE 128-bit
12554 floating point types.
12555 (rs6000_function_arg_advance_1): Likewise.
12556 (rs6000_mangle_type): Optionally generate mangled names that match
12557 what GCC 8.1 generated for IEEE 128-bit floating point types.
12558 (rs6000_globalize_decl_name): If we have an external function that
12559 passes or returns IEEE 128-bit types, generate a weak reference
12560 from the mangled name used in GCC 8.1 to the current mangled
12562 (rs6000_init_builtins): Make __ibm128 use the long double type if
12563 long double is IBM extended double. Make __float128 use the long
12564 double type if long double is IEEE 128-bit.
12567 * config/rs6000/rs6000-builtin.def (BU_IBM128_2): New helper
12568 macro for __ibm128 built-in functions.
12569 (PACK_IF): Add __ibm128 pack/unpack functions.
12570 (UNPACK_IF): Likewise.
12571 * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Do not
12572 enable long double built-in functions if long double is IEEE
12573 128-bit floating point.
12574 (rs6000_invalid_builtin): Update long double built-in function
12576 (rs6000_expand_builtin): For PACK_IF and UNPACK_IF built-in
12577 functions, adjust the built-in function to use the long double
12578 built-in function if __ibm128 and long double are the same type.
12579 * doc/extend.texi (PowerPC builtins): Update documention for
12580 __builtin_{,un}pack_longdouble. Add documentation for
12581 __builtin_{,un}pack_ibm128.
12583 2018-06-06 Jim Wilson <jimw@sifive.com>
12585 * config/riscv/riscv.c (enum riscv_privilege_levels): New.
12586 (struct machine_function): New field interrupt_mode.
12587 (riscv_handle_type_attribute): New function. Add forward declaration.
12588 (riscv_attribute_table) <interrupt>: Use riscv_handle_type_attribute.
12589 (riscv_expand_epilogue): Check interrupt_mode field.
12590 (riscv_set_current_function): Check interrupt attribute args and
12591 set interrupt_mode field.
12592 * config/riscv/riscv.md (UNSPECV_SRET, UNSPECV_URET): New.
12593 (riscv_sret, riscv_uret): New.
12594 * doc/extend.texi (RISC-V Function Attributes) <interrupt>: Document
12595 new arguments to interrupt attribute.
12597 2018-06-06 Peter Bergner <bergner@vnet.ibm.com>
12600 * /config/rs6000/rs6000.h (ASM_CPU_SPEC): Add support for -mpower9.
12601 Don't handle -mcpu=power8 if -mpower9-vector is also used.
12603 2018-06-06 Kelvin Nilsen <kelvin@gcc.gnu.org>
12605 * config/rs6000/rs6000-builtin.def (VSX_BUILTIN_VEC_LD,
12606 VSX_BUILTIN_VEC_ST): Add comment to explain non-traditional uses.
12607 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
12608 several redundant entries.
12610 2018-06-06 David Malcolm <dmalcolm@redhat.com>
12612 * config/i386/i386-protos.h (ix86_expand_call): Strengthen return
12613 type from "rtx" to "rtx_insn *".
12614 * config/i386/i386.c (ix86_expand_split_stack_prologue): Likewise
12615 for local "call_insn", removing cast.
12616 (ix86_expand_call): Likewise, introducing a "call_insn" local.
12618 2018-06-06 Eric Botcazou <ebotcazou@adacore.com>
12620 PR tree-optimization/86066
12621 * gimple-ssa-store-merging.c (process_store): Do not bypass BIT_NOT_EXPR
12622 for BIT_INSERT_EXPR stores.
12624 2018-06-06 Richard Biener <rguenther@suse.de>
12626 PR tree-optimization/86062
12627 * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
12628 component refs ontop
12629 of to be offsetted base.
12631 2018-06-06 Jozef Lawrynowicz <jozef.l@mittosystems.com>
12633 * config/msp430/msp430.c (msp430_attr): Allow interrupt handlers
12634 to be static and remove check on interrupt attribute name.
12636 2018-06-05 Kelvin Nilsen <kelvin@gcc.gnu.org>
12638 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
12639 volatile qualifier from vec_lvsl and vec_lvsr argument prototypes.
12641 2018-06-05 Steve Ellcey <sellcey@cavium.com>
12644 * config/aarch64/aarch64-protos.h (aarch64_err_no_fpadvsimd): Remove
12646 * config/aarch64/aarch64-protos..c (aarch64_err_no_fpadvsimd):
12647 Remove second argument, change how error is called.
12648 (aarch64_layout_arg): Remove second argument from
12649 aarch64_err_no_fpadvsimd call.
12650 (aarch64_init_cumulative_args): Ditto.
12651 (aarch64_gimplify_va_arg_expr): Ditto.
12652 * config/aarch64/aarch64.md (mov<mode>): Ditto.
12654 2018-06-05 Uros Bizjak <ubizjak@gmail.com>
12656 * config/i386/i386.md (simple_return_indirect_internal): New expander.
12657 (*simple_return_indirect_internal<mode>): Rename from
12658 simple_return_indirect_internal. Use W mode iterator.
12659 (rstorssp): New expander.
12660 (*rstorssp<mode>): Rename from rstorssp. Use P mode iterator.
12661 (clrssbsy): New expander.
12662 (*clrssbsy<mode>): Rename from clrssbsy. Use P mode iterator.
12664 2018-06-05 Andre Vieira <andre.simoesdiasvieira@arm.com>
12666 * config/arm/arm_cmse.h (cmse_nsfptr_create): Change typeof to
12668 (cmse_check_pointed_object): Likewise.
12670 2018-06-05 Martin Liska <mliska@suse.cz>
12672 PR gcov-profile/47618
12673 * doc/invoke.texi: Document how -fprofile-dir format
12676 2018-06-05 Richard Biener <rguenther@suse.de>
12678 * tree-cfgcleanup.c (cleanup_control_flow_pre): For edge
12679 removal pretend DOM info isn't available so we do not update
12680 it and only remove edges, not dominated blocks. Actually free
12681 DOM info in case we removed something. Remove unreachable blocks.
12682 (mfb_keep_latches): Work with either DOM info or marked backedges.
12683 (cleanup_tree_cfg_noloop): Do not remove unreachable blocks
12684 first. Mark backedges if DOM info isn't available.
12685 (Re-)compute DOM info after cleanup_control_flow_pre.
12687 2018-06-05 Richard Biener <rguenther@suse.de>
12689 * tree-cfg.c (struct locus_discrim_map): Store line, not location.
12690 (locus_discrim_hasher::hash): Adjust.
12691 (locus_discrim_hasher::equal): Likewise.
12692 (next_discriminator_for_locus): Work on line directly.
12693 (same_line_p): Pass in expanded locus1 as well.
12694 (assign_discriminators): Avoid redundant location expansions.
12696 2018-06-05 Richard Biener <rguenther@suse.de>
12698 PR tree-optimization/86046
12699 * tree-ssa.c (maybe_optimize_var): Clear DECL_GIMPLE_REG_P
12700 if required after clearing TREE_ADDRESSABLE.
12702 2018-06-05 Richard Biener <rguenther@suse.de>
12704 PR tree-optimization/86047
12705 * tree-ssa-loop.c (for_each_index): Glob handling of all
12706 decls and constants and really handle all of them.
12708 2018-06-05 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
12711 * config/arm/arm-builtins.c (arm_type_qualifiers): Add
12712 qualifier_void_pointer and qualifier_const_void_pointer.
12713 (arm_ldc_qualifiers, arm_stc_qualifiers): Use the above.
12714 (arm_init_builtins): Handle the above.
12715 * config/arm/arm_acle.h (__arm_cdp, __arm_ldc, __arm_ldcl, __arm_stc,
12716 __arm_stcl, __arm_mcr, __arm_cdp2, __arm_ldc2, __arm_ldcl2, __arm_stc2,
12717 __arm_stcl2,__arm_mcr2, __arm_mcrr, __arm_mcrr2): Remove return for
12720 2018-06-05 Martin Liska <mliska@suse.cz>
12722 * auto-profile.c (read_autofdo_file): Do not use
12723 gcov_ctr_summary struct.
12724 (afdo_callsite_hot_enough_for_early_inline): Likewise.
12725 * coverage.c (struct counts_entry): Likewise.
12726 (read_counts_file): Read just single summary entry.
12727 (get_coverage_counts): Use gcov_summary struct.
12728 * coverage.h (get_coverage_counts): Likewise.
12729 * gcov-dump.c (dump_working_sets): Likewise.
12730 (tag_summary): Dump just single summary.
12731 * gcov-io.c (gcov_write_summary): Write just histogram
12733 (gcov_read_summary): Read just single summary.
12734 (compute_working_sets): Use gcov_summary struct.
12735 * gcov-io.h (GCOV_TAG_SUMMARY_LENGTH): Remove usage
12736 of GCOV_COUNTERS_SUMMABLE.
12737 (GCOV_COUNTERS_SUMMABLE): Remove.
12738 (GCOV_FIRST_VALUE_COUNTER): Replace with
12739 GCOV_COUNTER_V_INTERVAL.
12740 (struct gcov_ctr_summary): Remove.
12741 (struct gcov_summary): Directly use fields of former
12743 (compute_working_sets): Use gcov_summary struct.
12744 * gcov.c (read_count_file): Do not use ctrs fields.
12745 * lto-cgraph.c (merge_profile_summaries): Use gcov_summary
12747 * lto-streamer.h (struct GTY): Make profile_info gcov_summary
12749 * profile.c: Likewise.
12750 * profile.h: Likewise.
12752 2018-06-05 Martin Liska <mliska@suse.cz>
12754 PR gcov-profile/84846
12755 * gcov.c (output_lines): Print working directory only
12756 in intermediate format.
12758 2018-06-05 Andreas Krebbel <krebbel@linux.ibm.com>
12760 * config/s390/s390-builtin-types.def: Add void function type.
12761 * config/s390/s390-builtins.def: Use the function type for the
12764 2018-06-04 Jim Wilson <jimw@sifive.com>
12766 * config/riscv/riscv-protos.h (riscv_expand_epilogue): Change bool arg
12768 * config/riscv/riscv.c (riscv_for_each_saved_reg): New args epilogue
12769 and maybe_eh_return. Change regno to unsigned int. Use new args to
12770 handle EH_RETURN_DATA_REGNO registers properly.
12771 (riscv_expand_prologue): Pass new args to riscv_for_each_saved_reg.
12772 (riscv_expand_epilogue): Update comment. Change argument name and
12773 type. Update code to use new name and type. Pass new args to
12774 riscv_for_each_saved_reg. Only use EH_RETURN_STACKADJ_RTX when
12776 * config/riscv/riscv.md (NORMAL_RETURN): New.
12777 (SIBCALL_RETURN, EXCEPTION_RETURN): New.
12778 (epilogue, sibcall_epilogue): Update riscv_expand_epilogue arg.
12779 (eh_return): Call gen_eh_return_internal and emit barrier.
12780 (eh_return_internal): Call riscv_expand_epilogue.
12782 2018-06-04 Eric Botcazou <ebotcazou@adacore.com>
12784 * gimple-ssa-store-merging.c (struct merged_store_group): Move up
12785 bit_insertion field and declare can_be_merged_into method.
12786 (merged_store_group::can_be_merged_into): New method.
12787 (imm_store_chain_info::coalesce_immediate): Call it to decide whether
12788 consecutive non-overlapping stores can be merged. Turn MEM_REF stores
12789 into BIT_INSERT_EXPR stores if the group contains a non-MEM_REF store.
12791 2018-06-04 Richard Biener <rguenther@suse.de>
12793 PR tree-optimization/85955
12794 * builtins.c (fold_builtin_sincos): Convert pointers to
12795 destination to appropriate type before dereferencing.
12797 2018-06-04 Segher Boessenkool <segher@kernel.crashing.org>
12799 * config/rs6000/rs6000.md (abs<mode>2 for FLOAT128): Handle IFmode.
12801 2018-06-04 Richard Sandiford <richard.sandiford@linaro.org>
12803 * expr.c (expand_expr_real_1): Force the operand into memory if
12804 its TYPE_MODE is BLKmode and if there is no integer mode for
12805 the number of bits being extracted.
12807 2018-06-04 Jakub Jelinek <jakub@redhat.com>
12811 * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
12812 Use vptestnm rather than vptestm in (=Yc,v,C) variant.
12814 2018-06-04 Richard Biener <rguenther@suse.de>
12816 * tree-cfgcleanup.c (cleanup_tree_cfg_1): Fold into...
12817 (cleanup_tree_cfg_noloop): ... single caller. Do
12818 start_recording_case_labels later.
12820 2018-06-04 Sebastian Peryt <sebastian.peryt@intel.com>
12822 * config/i386/cldemoteintrin.h: Change define from _X86INTRIN_H_INCLUDED
12823 to _IMMINTRIN_H_INCLUDED.
12824 * config/i386/pconfigintrin.h: Ditto.
12825 * config/i386/waitpkgintrin.h: Ditto.
12826 * config/i386/immintrin.h: Add includes for sgxintrin.h,
12827 pconfigintrin.h, waitpkgintrin.h and cldemoteintrin.h.
12828 * config/i386/x86intrin.h: Remove includes for mintrin.h, xmmintrin.h,
12829 emmintrin.h, pmmintrin.h, tmmintrin.h, smmintrin.h, wmmintrin.h,
12830 bmiintrin.h, bmi2intrin.h, lzcntintrin.h, sgxintrin.h, pconfigintrin.h,
12831 waitpkgintrin.h and cldemoteintrin.h.
12833 2018-06-04 Richard Biener <rguenther@suse.de>
12835 PR tree-optimization/86038
12836 * tracer.c (find_best_successor): Check probability for
12837 being initialized, bail out if not.
12839 2018-06-04 Richard Earnshaw <rearnsha@arm.com>
12842 * config/arm/arm-cpus.in (ALL_QUIRKS): Add xscale feature to the list
12843 of bits to ignore when comparing architectures.
12845 2018-06-04 Jakub Jelinek <jakub@redhat.com>
12847 PR tree-optimization/69615
12848 * fold-const.c (merge_ranges): If range1 is - [x, x] and x is the
12849 maximum or minimum of the type, try to merge it also as if
12850 range1 is + [-, x - 1] or + [x + 1, -].
12853 * tree.c (inchash::add_expr): Handle IDENTIFIER_NODE.
12855 2018-06-03 Eric Botcazou <ebotcazou@adacore.com>
12857 PR tree-optimization/86034
12858 * gimple-ssa-store-merging.c (output_merged_store): Convert the RHS to
12859 the unsigned bitfield type in a bit insertion sequence if it does not
12860 have a larger precision than the bitfield size.
12861 (process_store): Also bypass widening conversions for BIT_INSERT_EXPR.
12863 2018-06-03 Kito Cheng <kito.cheng@gmail.com>
12865 * config/nds32/nds32-peephole2.md: Add new patterns for code size.
12867 2018-06-03 Chung-Ju Wu <jasonwucj@gmail.com>
12869 * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3J.
12870 * config/nds32/nds32.c (nds32_option_override): Consider ARCH_V3J.
12871 * config/nds32/nds32.h (TARGET_ISA_V3): Add ARCH_V3J checking.
12872 * config/nds32/nds32.opt (march): Add enum value Value(ARCH_V3J).
12874 2018-06-03 Chung-Ju Wu <jasonwucj@gmail.com>
12876 * common/config/nds32/nds32-common.c (nds32_option_optimization_table):
12877 Disable -fdelete-null-pointer-checks for ELF toolchain.
12879 2018-06-02 Chung-Ju Wu <jasonwucj@gmail.com>
12880 Kito Cheng <kito.cheng@gmail.com>
12882 * config.gcc (nds32*): Use nds32-linux.opt and nds32-elf.opt.
12883 (nds32le-*-*, nds32be-*-*): Integrate checking process.
12884 (nds32*-*-*): Add glibc and uclibc conditions.
12885 * common/config/nds32/nds32-common.c (nds32_except_unwind_info): New.
12886 (TARGET_EXCEPT_UNWIND_INFO): Define.
12887 * config/nds32/elf.h: New file.
12888 * config/nds32/linux.h: New file.
12889 * config/nds32/nds32-elf.opt: New file.
12890 * config/nds32/nds32-linux.opt: New file.
12891 * config/nds32/nds32-fp-as-gp.c
12892 (pass_nds32_fp_as_gp::gate): Consider TARGET_LINUX_ABI.
12893 * config/nds32/nds32.c (nds32_conditional_register_usage): Consider
12895 (nds32_asm_file_end): Ditto.
12896 (nds32_print_operand): Ditto.
12897 (nds32_insert_attributes): Ditto.
12898 (nds32_init_libfuncs): New function.
12899 (TARGET_HAVE_TLS): Define.
12900 (TARGET_INIT_LIBFUNCS): Define.
12901 * config/nds32/nds32.h (TARGET_DEFAULT_RELAX): Apply different relax
12903 (TARGET_ELF): Apply different mcmodel setting.
12904 (LINK_SPEC, LIB_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): The content has
12905 been migrated into elf.h and linux.h files.
12906 * config/nds32/nds32.md (add_pc): Consider TARGET_LINUX_ABI.
12907 * config/nds32/nds32.opt (mvh): Consider TARGET_LINUX_ABI.
12908 (mcmodel): The content has been migrated into nds32-elf.opt and
12909 nds32-linux.opt files.
12910 * config/nds32/t-elf: New file.
12911 * config/nds32/t-linux: New file.
12913 2018-06-02 Chung-Ju Wu <jasonwucj@gmail.com>
12914 Shiva Chen <shiva0217@gmail.com>
12916 * config/nds32/constants.md (unspec_volatile_element): Add
12917 UNSPEC_VOLATILE_OMIT_FP_BEGIN and UNSPEC_VOLATILE_OMIT_FP_END.
12918 * config/nds32/nds32-fp-as-gp.c: New implementation of fp_as_gp
12920 * config/nds32/nds32-protos.h (nds32_naked_function_p): Declare.
12921 (make_pass_nds32_fp_as_gp): Declare.
12922 * config/nds32/nds32.c (nds32_register_passes): Add fp_as_gp as one
12924 (nds32_asm_function_end_prologue): Remove unused asm output.
12925 (nds32_asm_function_begin_epilogue): Remove unused asm output.
12926 (nds32_asm_file_start): Output necessary fp_as_gp information.
12927 (nds32_option_override): Adjust register usage.
12928 (nds32_expand_prologue): Consider fp_as_gp situation.
12929 (nds32_expand_prologue_v3push): Consider fp_as_gp situation.
12930 * config/nds32/nds32.md (prologue): Check fp_as_gp_p and naked_p.
12933 (simple_return): Ditto.
12934 (omit_fp_begin): Output special directive for fp_as_gp.
12935 (omit_fp_end): Output special directive for fp_as_gp.
12936 * config/nds32/nds32.opt (mfp-as-gp, mno-fp-as-gp, mforce-fp-as-gp,
12937 mforbid-fp-as-gp): New options.
12939 2018-06-01 Mark Wielaard <mark@klomp.org>
12941 * dwarf2out.c (dwarf2out_finish): Remove generation of
12942 DW_AT_loclists_base.
12944 2018-06-01 Eric Botcazou <ebotcazou@adacore.com>
12946 * gimple-ssa-store-merging.c: Include gimple-fold.h.
12947 (struct store_immediate_info): Document BIT_INSERT_EXPR stores.
12948 (struct merged_store_group): Add bit_insertion field.
12949 (dump_char_array): Use standard hexadecimal format.
12950 (merged_store_group::merged_store_group): Set bit_insertion to false.
12951 (merged_store_group::apply_stores): Use optimal buffer size. Deal
12952 with BIT_INSERT_EXPR stores. Move up code updating the mask and
12953 also print the mask in the dump file.
12954 (pass_store_merging::gate): Minor tweak.
12955 (imm_store_chain_info::coalesce_immediate): Fix wrong association
12956 of stores with groups in dump. Allow coalescing of BIT_INSERT_EXPR
12957 stores with INTEGER_CST stores.
12958 (count_multiple_uses) <BIT_INSERT_EXPR>: New case.
12959 (imm_store_chain_info::output_merged_store): Add try_bitpos variable
12960 and use it throughout. Generate bit insertion sequences if need be.
12961 (pass_store_merging::process_store): Remove redundant condition.
12962 Record stores from a SSA name to a bit-field with BIT_INSERT_EXPR.
12964 2018-06-01 Segher Boessenkool <segher@kernel.crashing.org>
12966 * config/rs6000/rs6000.c (rs6000_mangle_type): Change the mangling of
12967 the 128-bit floating point types. Fix function comment.
12969 2018-06-01 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
12971 * config/aarch64/aarch64-simd.md
12972 (aarch64_simd_vec_unpack<su>_lo_<mode>): Use UXTL and SXTL assembler
12974 (aarch64_simd_vec_unpack<su>_hi_<mode>): Use UXTL2 and SXTL2 assembler
12977 2018-06-01 Richard Sandiford <richard.sandiford@linaro.org>
12979 PR tree-optimization/85989
12980 * gimple-ssa-backprop.c (backprop::m_visited_phis): New member
12982 (backprop::intersect_uses): Check it when deciding whether this
12983 is a backedge reference.
12984 (backprop::process_block): Add each phi to m_visited_phis
12985 after visiting it, then clear it at the end.
12987 2018-06-01 Richard Biener <rguenther@suse.de>
12989 * tree-vectorizer.h (vect_dr_stmt): New function.
12990 (vect_get_load_cost): Adjust.
12991 (vect_get_store_cost): Likewise.
12992 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence):
12993 Use vect_dr_stmt instead of DR_SMTT.
12994 (vect_record_base_alignments): Likewise.
12995 (vect_calculate_target_alignment): Likewise.
12996 (vect_compute_data_ref_alignment): Likewise and make static.
12997 (vect_update_misalignment_for_peel): Likewise.
12998 (vect_verify_datarefs_alignment): Likewise.
12999 (vector_alignment_reachable_p): Likewise.
13000 (vect_get_data_access_cost): Likewise. Pass down
13001 vinfo to vect_get_load_cost/vect_get_store_cost instead of DR.
13002 (vect_get_peeling_costs_all_drs): Likewise.
13003 (vect_peeling_hash_get_lowest_cost): Likewise.
13004 (vect_enhance_data_refs_alignment): Likewise.
13005 (vect_find_same_alignment_drs): Likewise.
13006 (vect_analyze_data_refs_alignment): Likewise.
13007 (vect_analyze_group_access_1): Likewise.
13008 (vect_analyze_group_access): Likewise.
13009 (vect_analyze_data_ref_access): Likewise.
13010 (vect_analyze_data_ref_accesses): Likewise.
13011 (vect_vfa_segment_size): Likewise.
13012 (vect_small_gap_p): Likewise.
13013 (vectorizable_with_step_bound_p): Likewise.
13014 (vect_prune_runtime_alias_test_list): Likewise.
13015 (vect_analyze_data_refs): Likewise.
13016 (vect_supportable_dr_alignment): Likewise.
13017 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
13018 (vect_gen_prolog_loop_niters): Likewise.
13019 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
13020 * tree-vect-patterns.c (vect_recog_bool_pattern): Do not
13022 (vect_recog_mask_conversion_pattern): Likewise.
13023 (vect_try_gather_scatter_pattern): Likewise.
13024 * tree-vect-stmts.c (vect_model_store_cost): Pass stmt_info
13025 to vect_get_store_cost.
13026 (vect_get_store_cost): Get stmt_info instead of DR.
13027 (vect_model_load_cost): Pass stmt_info to vect_get_load_cost.
13028 (vect_get_load_cost): Get stmt_info instead of DR.
13030 2018-06-01 Richard Biener <rguenther@suse.de>
13032 PR middle-end/86017
13033 * gimple-fold.c (var_decl_component_p): Also allow offsetted
13034 vars wrapped in MEM_REFs.
13036 2018-06-01 Richard Sandiford <richard.sandiford@linaro.org>
13038 * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
13039 Fix subreg tests so that we only return a choice between
13040 GENERAL_REGS and FP_REGS if the original classes included both.
13042 2018-06-01 Richard Biener <rguenther@suse.de>
13045 * tree-ssa-structalias.c (get_function_part_constraint):
13046 Handle NULL fi->decl.
13047 (find_func_aliases_for_call): Properly handle indirect
13048 fi from direct call.
13049 (find_func_clobbers): Likewise.
13050 (ipa_pta_execute): Likewise.
13051 (create_variable_info_for): For functions that are ifunc_resolver
13052 resolve to a varinfo that contains the result of the resolver call.
13053 (associate_varinfo_to_alias): Do not treat ifunc resolvers as
13056 2018-05-31 Michael Collison <michael.collison@arm.com>
13058 * config/aarch64/aarch64.md:
13059 (*fix_to_zero_extenddfdi2): New pattern.
13060 * gcc.target/aarch64/fix_extend1.c: New testcase.
13062 2018-05-31 Qing Zhao <qing.zhao@oracle.com>
13064 PR middle-end/78809
13065 PR middle-end/83026
13066 * builtins.c (expand_builtin): Add the handling of BUILT_IN_STRCMP_EQ
13067 and BUILT_IN_STRNCMP_EQ.
13068 * builtins.def: Add new builtins BUILT_IN_STRCMP_EQ and
13069 BUILT_IN_STRNCMP_EQ.
13070 * gimple-fold.c (gimple_fold_builtin_string_compare): Add the
13071 handling of BUILTIN_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
13072 (gimple_fold_builtin): Likewise.
13073 * tree-ssa-strlen.c (compute_string_length): New function.
13074 (determine_min_obsize): New function.
13075 (handle_builtin_string_cmp): New function to handle calls to
13076 string compare functions.
13077 (strlen_optimize_stmt): Add handling to builtin string compare
13079 * tree-ssa-structalias.c (find_func_aliases_for_builtin_call):
13080 Add the handling of BUILT_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
13081 * tree.c (build_common_builtin_nodes): Add new defines of
13082 BUILT_IN_STRNCMP_EQ and BUILT_IN_STRCMP_EQ.
13084 2018-05-31 Jakub Jelinek <jakub@redhat.com>
13087 * bb-reorder.c (pass_partition_blocks::gate): Return false for
13088 functions with naked attribute.
13090 2018-05-31 Uros Bizjak <ubizjak@gmail.com>
13092 * config/i386/sse.md (avx_vec_concat<mode>):
13093 Substitute concat_tg_mode mode attribute with xtg_mode.
13094 (<mask_codefor>avx512dq_broadcast<mode><mask_name>_1): Ditto.
13095 (concat_tg_mode): Remove mode attribute.
13097 2018-05-31 Martin Sebor <msebor@redhat.com>
13100 * calls.c (alloc_max_size): Correct a logic error/typo.
13101 Treat excessive arguments as infinite. Warn for invalid arguments.
13102 * doc/invoke.texi (-Walloc-size-larger-than): Update.
13104 2018-05-31 H.J. Lu <hongjiu.lu@intel.com>
13107 * config/i386/x86-tune.def: Re-enable partial_reg_dependency
13108 and movx for Haswell.
13110 2018-05-31 Chung-Lin Tang <cltang@codesourcery.com>
13111 Cesar Philippidis <cesar@codesourcery.com>
13113 PR middle-end/85879
13114 * gimplify.c (gimplify_adjust_omp_clauses): Add 'remove = true'
13115 when emitting error on private/firstprivate reductions.
13116 * omp-low.c (lower_omp_target): Avoid reference-type processing
13117 on pointers for firstprivate clause.
13119 2018-05-31 Sameera Deshpande <sameera.deshpande@linaro.org>
13121 * config/aarch64/aarch64-simd-builtins.def (ld1x3): New.
13124 * config/aarch64/aarch64-simd.md
13125 (aarch64_ld1x3<VALLDIF:mode>): New pattern.
13126 (aarch64_ld1_x3_<mode>): Likewise
13127 (aarch64_st1x2<VALLDIF:mode>): Likewise
13128 (aarch64_st1_x2_<mode>): Likewise
13129 (aarch64_st1x3<VALLDIF:mode>): Likewise
13130 (aarch64_st1_x3_<mode>): Likewise
13131 * config/aarch64/arm_neon.h (vld1_u8_x3): New function.
13132 (vld1_s8_x3): Likewise.
13133 (vld1_u16_x3): Likewise.
13134 (vld1_s16_x3): Likewise.
13135 (vld1_u32_x3): Likewise.
13136 (vld1_s32_x3): Likewise.
13137 (vld1_u64_x3): Likewise.
13138 (vld1_s64_x3): Likewise.
13139 (vld1_f16_x3): Likewise.
13140 (vld1_f32_x3): Likewise.
13141 (vld1_f64_x3): Likewise.
13142 (vld1_p8_x3): Likewise.
13143 (vld1_p16_x3): Likewise.
13144 (vld1_p64_x3): Likewise.
13145 (vld1q_u8_x3): Likewise.
13146 (vld1q_s8_x3): Likewise.
13147 (vld1q_u16_x3): Likewise.
13148 (vld1q_s16_x3): Likewise.
13149 (vld1q_u32_x3): Likewise.
13150 (vld1q_s32_x3): Likewise.
13151 (vld1q_u64_x3): Likewise.
13152 (vld1q_s64_x3): Likewise.
13153 (vld1q_f16_x3): Likewise.
13154 (vld1q_f32_x3): Likewise.
13155 (vld1q_f64_x3): Likewise.
13156 (vld1q_p8_x3): Likewise.
13157 (vld1q_p16_x3): Likewise.
13158 (vld1q_p64_x3): Likewise.
13159 (vst1_s64_x2): Likewise.
13160 (vst1_u64_x2): Likewise.
13161 (vst1_f64_x2): Likewise.
13162 (vst1_s8_x2): Likewise.
13163 (vst1_p8_x2): Likewise.
13164 (vst1_s16_x2): Likewise.
13165 (vst1_p16_x2): Likewise.
13166 (vst1_s32_x2): Likewise.
13167 (vst1_u8_x2): Likewise.
13168 (vst1_u16_x2): Likewise.
13169 (vst1_u32_x2): Likewise.
13170 (vst1_f16_x2): Likewise.
13171 (vst1_f32_x2): Likewise.
13172 (vst1_p64_x2): Likewise.
13173 (vst1q_s8_x2): Likewise.
13174 (vst1q_p8_x2): Likewise.
13175 (vst1q_s16_x2): Likewise.
13176 (vst1q_p16_x2): Likewise.
13177 (vst1q_s32_x2): Likewise.
13178 (vst1q_s64_x2): Likewise.
13179 (vst1q_u8_x2): Likewise.
13180 (vst1q_u16_x2): Likewise.
13181 (vst1q_u32_x2): Likewise.
13182 (vst1q_u64_x2): Likewise.
13183 (vst1q_f16_x2): Likewise.
13184 (vst1q_f32_x2): Likewise.
13185 (vst1q_f64_x2): Likewise.
13186 (vst1q_p64_x2): Likewise.
13187 (vst1_s64_x3): Likewise.
13188 (vst1_u64_x3): Likewise.
13189 (vst1_f64_x3): Likewise.
13190 (vst1_s8_x3): Likewise.
13191 (vst1_p8_x3): Likewise.
13192 (vst1_s16_x3): Likewise.
13193 (vst1_p16_x3): Likewise.
13194 (vst1_s32_x3): Likewise.
13195 (vst1_u8_x3): Likewise.
13196 (vst1_u16_x3): Likewise.
13197 (vst1_u32_x3): Likewise.
13198 (vst1_f16_x3): Likewise.
13199 (vst1_f32_x3): Likewise.
13200 (vst1_p64_x3): Likewise.
13201 (vst1q_s8_x3): Likewise.
13202 (vst1q_p8_x3): Likewise.
13203 (vst1q_s16_x3): Likewise.
13204 (vst1q_p16_x3): Likewise.
13205 (vst1q_s32_x3): Likewise.
13206 (vst1q_s64_x3): Likewise.
13207 (vst1q_u8_x3): Likewise.
13208 (vst1q_u16_x3): Likewise.
13209 (vst1q_u32_x3): Likewise.
13210 (vst1q_u64_x3): Likewise.
13211 (vst1q_f16_x3): Likewise.
13212 (vst1q_f32_x3): Likewise.
13213 (vst1q_f64_x3): Likewise.
13214 (vst1q_p64_x3): Likewise.
13216 2018-05-30 Jozef Lawrynowicz <jozef.l@mittosystems.com>
13218 * config/msp430/msp430.c (msp430_output_labelref): Prepend
13219 user_label_prefix to name.
13221 * tree-core.h: Update comment about the format of NAME string
13222 passed to handler in attribute_spec.
13224 * config/msp430/msp430.md: Remove erroneous subreg expression from
13225 zero_extendqisi2 insn pattern. Remove msp430x ISA restriction on
13226 zero_extend{q,h}isi2.
13228 2018-05-30 Borislav Petkov <bp@suse.de>
13230 * doc/extend.texi: Document some architecture specific
13231 constraints and sort entries.
13233 2018-05-30 Martin Sebor <msebor@redhat.com>
13235 PR middle-end/85369
13236 * builtins.c (expand_builtin_stpcpy_1): New function.
13237 (expand_builtin_stpcpy): Call it, and call maybe_warn_nonstring_arg
13238 only if the former succeeds.
13240 2018-05-31 Sameera Deshpande <sameera.deshpande@linaro.org>
13242 * config/aarch64/aarch64-cores.def (saphira) : Add support for ARMv8.4
13245 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
13247 * doc/invoke.texi (-flinker-output): Document
13249 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
13251 * passes.c (ipa_write_summaries): Only modify statements if body
13253 * cgraphunit.c (ipa_passes): Also produce intermeidate code when
13254 incrementally linking.
13255 (ipa_passes): Likewise.
13256 * lto-cgraph.c (lto_output_node): When incrementally linking do not
13257 pass down resolution info.
13258 * common.opt (flag_incremental_link): Update info.
13259 * gcc.c (plugin specs): Turn flinker-output=* to
13260 -plugin-opt=-linker-output-known
13261 * toplev.c (compile_file): Also cut compilation when doing incremental
13263 * flag-types. (enum lto_partition_model): Add
13264 LTO_LINKER_OUTPUT_NOLTOREL.
13265 (invoke.texi): Add -flinker-output docs.
13266 * ipa.c (symbol_table::remove_unreachable_nodes): Handle LTO incremental
13267 link same way as WPA; do not stream in dead initializers.
13269 * dwarf2out.c (dwarf2out_die_ref_for_decl,
13270 darf2out_register_external_decl): Support incremental link.
13272 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
13274 * lto-opts.c (lto_write_options): Skip OPT_dumpdir, OPT_fresolution_.
13276 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
13278 * lto-wrapper.c (debug_objcopy): Add rename parameter; pass
13279 it down to simple_object_copy_lto_debug_sections.
13280 (run_gcc): Determine incremental LTO link time and configure
13281 lto1 into non-wpa mode, disable renaming of debug sections.
13283 2018-05-30 Kelvin Nilsen <kelvin@gcc.gnu.org>
13285 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
13286 descriptions of various incorrectly documented functions.
13288 2018-05-30 Andre Vieira <andre.simoesdiasvieira@arm.com>
13291 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
13292 address check not strict.
13294 2018-05-30 Richard Biener <rguenther@suse.de>
13296 PR tree-optimization/85964
13297 * tracer.c (better_p): Drop initialized count check, we only
13298 call the function with initialized counts now.
13299 (find_best_successor): Do find a best edge if one
13300 has uninitialized count.
13301 (find_best_predecessor): Likewise. Do BB frequency check only
13302 if count is initialized.
13304 2017-05-30 Jackson Woodruff <jackson.woodruff@arm.com>
13306 * config/aarch64/aarch64.c (aarch64_host_wide_int_compare): New.
13307 (aarch64_ldrstr_offset_compare): New.
13308 (aarch64_operands_adjust_ok_for_ldpstp): Update to consider all
13309 load/store orderings.
13310 (aarch64_gen_adjusted_ldpstp): Likewise.
13312 2018-05-30 Wilco Dijkstra <wdijkstr@arm.com>
13314 * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
13315 Check for subset of GENERAL_REGS and FP_REGS.
13316 * config/aarch64/aarch64-simd.md (aarch64_get_lane): Increase cost of
13319 2018-05-30 Richard Sandiford <richard.sandiford@linaro.org>
13321 * alias.c (adjust_offset_for_component_ref): Use poly_int_tree_p
13322 and wi::to_poly_offset. Add the current offset and then check
13323 whether the sum fits, rather than using an unchecked addition of
13324 a checked term. Check for a shwi rather than a uhwi.
13325 * expr.c (get_bit_range): Use tree_to_poly_uint64.
13326 (store_constructor): Use poly_int_tree_p.
13327 (expand_expr_real_1): Likewise.
13328 * function.c (assign_temp): Likewise.
13329 * fold-const.c (const_binop): Use poly_int_tree_p and
13330 wi::to_poly_offset.
13331 (fold_indirect_ref_1): Likewise. Use multiple_p to attempt an exact
13333 * ipa-icf-gimple.c (func_checker::compare_operand): Use
13334 to_poly_offset for MEM offsets.
13335 * ipa-icf.c (sem_variable::equals): Likewise.
13336 * stor-layout.c (compute_record_mode): Use poly_int_tree_p.
13337 * tree-ssa-sccvn.c (ao_ref_init_from_vn_reference): Use
13338 wi::to_poly_offset for BIT_FIELD_REF offsets.
13339 (vn_reference_maybe_forwprop_address): Use poly_int_tree_p and
13340 wi::to_poly_offset.
13341 * var-tracking.c (emit_note_insn_var_location): Use
13342 tree_to_poly_uint64.
13344 2018-05-29 Jim Wilson <jimw@sifive.com>
13346 * config/riscv/riscv.c (riscv_interrupt_type): Fix comment typo.
13348 2018-05-29 Uros Bizjak <ubizjak@gmail.com>
13351 * config/i386/i386.md (l<rounding_insn><MODEF:mode><SWI48:mode>2):
13352 Enable for TARGET_SSE4_1 and generate rounds{s,d} and cvtts{s,d}2si{,q}
13354 (sse4_1_round<mode>2): Use nonimmediate_operand
13355 for operand 1 predicate.
13357 2018-05-29 Martin Sebor <msebor@redhat.com>
13358 Richard Biener <rguenther@suse.de>
13361 * calls.c (get_size_range): Call determine_value_range instead
13362 of get_value_range..
13363 * tree-vrp.h (determine_value_range): Declared new function.
13364 * tree-vrp.c (determine_value_range_1, determine_value_range): New.
13366 2018-05-29 Richard Biener <rguenther@suse.de>
13368 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Make
13369 sure to use non-pattern stmts for get_earlier_stmt arguments.
13370 * tree-vectorizer.h (get_earlier_stmt): Assert we do not get
13371 called on pattern stmts.
13372 (get_later_stmt): Likewise.
13374 2018-05-29 Martin Liska <mliska@suse.cz>
13376 PR gcov-profile/85759
13377 * doc/gcov.texi: Document GCOV_ERROR_FILE and GCOV_EXIT_AT_ERROR
13380 2018-05-29 Jakub Jelinek <jakub@redhat.com>
13382 * tree-cfg.c (verify_gimple_assign_unary): Add checking for
13384 (verify_gimple_assign_binary): Check TYPE_VECTOR_SUBPARTS for
13388 * tree.def (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
13389 VEC_PACK_FLOAT_EXPR): New tree codes.
13390 * tree-pretty-print.c (op_code_prio): Handle
13391 VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR.
13392 (dump_generic_node): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
13393 VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
13394 * tree-inline.c (estimate_operator_cost): Likewise.
13395 * gimple-pretty-print.c (dump_binary_rhs): Handle VEC_PACK_FLOAT_EXPR.
13396 * fold-const.c (const_binop): Likewise.
13397 (const_unop): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR and
13398 VEC_UNPACK_FIX_TRUNC_LO_EXPR.
13399 * tree-cfg.c (verify_gimple_assign_unary): Likewise.
13400 (verify_gimple_assign_binary): Handle VEC_PACK_FLOAT_EXPR.
13401 * cfgexpand.c (expand_debug_expr): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
13402 VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
13403 * expr.c (expand_expr_real_2): Likewise.
13404 * optabs.def (vec_packs_float_optab, vec_packu_float_optab,
13405 vec_unpack_sfix_trunc_hi_optab, vec_unpack_sfix_trunc_lo_optab,
13406 vec_unpack_ufix_trunc_hi_optab, vec_unpack_ufix_trunc_lo_optab): New
13408 * optabs.c (expand_widen_pattern_expr): For
13409 VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR use
13410 sign from result type rather than operand's type.
13411 (expand_binop_directly): For vec_packu_float_optab and
13412 vec_packs_float_optab allow result type to be different from operand's
13414 * optabs-tree.c (optab_for_tree_code): Handle
13415 VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
13416 VEC_PACK_FLOAT_EXPR. Formatting fixes.
13417 * tree-vect-generic.c (expand_vector_operations_1): Handle
13418 VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
13419 VEC_PACK_FLOAT_EXPR.
13420 * tree-vect-stmts.c (supportable_widening_operation): Handle
13422 (supportable_narrowing_operation): Handle FLOAT_EXPR.
13423 * config/i386/i386.md (fixprefix, floatprefix): New code attributes.
13424 * config/i386/sse.md (*float<floatunssuffix>v2div2sf2): Rename to ...
13425 (float<floatunssuffix>v2div2sf2): ... this. Formatting fix.
13426 (vpckfloat_concat_mode, vpckfloat_temp_mode, vpckfloat_op_mode): New
13428 (vec_pack<floatprefix>_float_<mode>): New expander.
13429 (vunpckfixt_mode, vunpckfixt_model, vunpckfixt_extract_mode): New mode
13431 (vec_unpack_<fixprefix>fix_trunc_lo_<mode>,
13432 vec_unpack_<fixprefix>fix_trunc_hi_<mode>): New expanders.
13433 * doc/md.texi (vec_packs_float_@var{m}, vec_packu_float_@var{m},
13434 vec_unpack_sfix_trunc_hi_@var{m}, vec_unpack_sfix_trunc_lo_@var{m},
13435 vec_unpack_ufix_trunc_hi_@var{m}, vec_unpack_ufix_trunc_lo_@var{m}):
13437 * doc/generic.texi (VEC_UNPACK_FLOAT_HI_EXPR,
13438 VEC_UNPACK_FLOAT_LO_EXPR): Fix pasto in description.
13439 (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
13440 VEC_PACK_FLOAT_EXPR): Document.
13442 2018-05-29 Richard Biener <rguenther@suse.de>
13444 * tree-vectorizer.h (struct vec_info): Add stmt_vec_infos
13446 (stmt_vec_info_vec): Make pointer.
13447 (init_stmt_vec_info_vec): Remove.
13448 (free_stmt_vec_info_vec): Likewise.
13449 (set_stmt_vec_info_vec): New function.
13450 (free_stmt_vec_infos): Likewise.
13451 (vinfo_for_stmt): Adjust for stmt_vec_info_vec indirection.
13452 (set_vinfo_for_stmt): Likewise.
13453 (get_earlier_stmt): Likewise.
13454 (get_later_stmt): Likewise.
13455 * tree-vectorizer.c (stmt_vec_info_vec): Make pointer.
13456 (vec_info::vec_info): Allocate stmt_vec_infos and set the global.
13457 (vec_info::~vec_info): Free stmt_vec_infos.
13458 (vectorize_loops): Set the global stmt_vec_info_vec to NULL.
13459 Remove old init_stmt_vec_info_vec/free_stmt_vec_info_vec calls.
13460 (pass_slp_vectorize::execute): Likewise.
13461 * tree-vect-stmts.c (init_stmt_vec_info_vec): Remove.
13462 (free_stmt_vec_info_vec): Likewise.
13463 (set_stmt_vec_info_vec): New function.
13464 (free_stmt_vec_infos): Likewise.
13465 * tree-vect-loop.c (_loop_vec_info::~_loop_vec_info): Set
13466 the global stmt_vec_info_vec.
13467 * tree-parloops.c (gather_scalar_reductions): Use
13468 set_stmt_vec_info_vec/free_stmt_vec_infos and maintain a local
13471 2018-05-29 Richard Biener <rguenther@suse.de>
13473 * dominance.c (iterate_fix_dominators): Push/pop TV_DOMINANCE.
13475 2018-05-29 Martin Liska <mliska@suse.cz>
13476 David Malcolm <dmalcolm@redhat.com>
13478 * vec.c (test_reverse): New.
13479 (vec_c_tests): Add new test.
13480 * vec.h (vl_ptr>::reverse): New function.
13482 2018-05-29 Gerald Pfeifer <gerald@pfeifer.com>
13484 * config.gcc: Identify FreeBSD 3.x and 4.x as unsupported.
13486 * config/freebsd-spec.h (FBSD_LIB_SPEC): Only consider FreeBSD 5
13489 2018-05-28 Bernd Edlinger <bernd.edlinger@hotmail.de>
13491 * tree-dump.c (dump_node): Use splay_tree_delete_pointers.
13493 2018-05-28 Richard Biener <rguenther@suse.de>
13495 PR tree-optimization/85933
13496 * tree-vect-data-refs.c (vect_record_base_alignments): Only
13497 look at stmts marked as vectorizable.
13499 2018-05-28 Richard Biener <rguenther@suse.de>
13501 PR tree-optimization/85934
13502 * tree-vect-generic.c (expand_vector_operations_1): Hoist
13503 vector boolean check before scalar optimization.
13505 2018-05-28 Jakub Jelinek <jakub@redhat.com>
13507 * doc/invoke.texi (ARM Options): Use @item instead of @itemx
13510 2018-05-28 Mark Wielaard <mark@klomp.org>
13512 * dwarf2asm.c (dw2_asm_output_delta_uleb128): Add brackets around lab2
13513 if it is an expression containing a minus sign.
13515 2018-05-27 John David Anglin <danglin@gcc.gnu.org>
13517 * config/pa/pa-linux.h (NEED_INDICATE_EXEC_STACK): Define to 0.
13519 2018-05-27 Paul Koning <ni1d@arrl.net>
13521 * config/pdp11/pdp11.md (truncsihi2): Remove.
13523 2018-05-27 Monk Chiang <sh.chiang04@gmail.com>
13524 Chung-Ju Wu <jasonwucj@gmail.com>
13526 * config/nds32/nds32-intrinsic.md (unaligned_storedi): Modify patterns
13528 (unaligned_store_dw): Ditto.
13529 * config/nds32/nds32-memory-manipulation.c
13530 (nds32_expand_movmemsi_loop_known_size): Refactoring implementation.
13531 (nds32_gen_dup_4_byte_to_word_value): Rename to ...
13532 (nds32_gen_dup_4_byte_to_word_value_aux): ... this.
13533 (emit_setmem_word_loop): Rename to ...
13534 (emit_setmem_doubleword_loop): ... this.
13535 (nds32_gen_dup_4_byte_to_word_value): New function.
13536 (nds32_gen_dup_8_byte_to_double_word_value): New function.
13537 (nds32_expand_setmem_loop): Refine implementation.
13538 (nds32_expand_setmem_loop_v3m): Ditto.
13539 * config/nds32/nds32-multiple.md (unaligned_store_update_base_dw): New
13542 2018-05-27 Chung-Ju Wu <jasonwucj@gmail.com>
13544 * config/nds32/nds32.md (bswapsi2, bswaphi2): New patterns.
13546 2018-05-27 Chung-Ju Wu <jasonwucj@gmail.com>
13548 * config/nds32/nds32.c (nds32_attribute_table): Add "no_prologue".
13549 (nds32_init_machine_status): Initialize machine->attr_naked_p and
13550 machine->attr_no_prologue_p.
13551 (nds32_compute_stack_frame): Check "naked" and "no_prologue" attributes.
13552 (nds32_naked_function_p): Handle "naked" and "no_prologue" attributes.
13553 (nds32_expand_epilogue): Consider attr_naked_p.
13554 (nds32_expand_epilogue_v3pop): Likewise.
13555 (nds32_can_use_return_insn): Likewise.
13556 * config/nds32/nds32.h (machine_function): Add attr_naked_p and
13557 attr_no_prologue_p fields.
13558 * config/nds32/nds32.opt (mret-in-naked-func): New option.
13560 2018-05-27 Jakub Jelinek <jakub@redhat.com>
13563 * config/i386/i386.md (fixunssuffix, floatunssuffix): New code
13565 * config/i386/sse.md
13566 (<floatsuffix>float<sseintvecmodelower><mode>2<mask_name><round_name>):
13568 (float<floatunssuffix><sseintvecmodelower><mode>2<mask_name><round_name>):
13570 (<floatsuffix>float<sselongvecmodelower><mode>2<mask_name><round_name>):
13572 (float<floatunssuffix><sselongvecmodelower><mode>2<mask_name><round_name>):
13574 (*<floatsuffix>floatv2div2sf2): Rename to ...
13575 (*float<floatunssuffix>v2div2sf2): ... this.
13576 (<floatsuffix>floatv2div2sf2_mask): Rename to ...
13577 (float<floatunssuffix>v2div2sf2_mask): ... this.
13578 (*<floatsuffix>floatv2div2sf2_mask_1): Rename to ...
13579 (*float<floatunssuffix>v2div2sf2_mask_1): ... this.
13580 (<fixsuffix>fix_truncv8dfv8si2<mask_name><round_saeonly_name>): Rename
13582 (fix<fixunssuffix>_truncv8dfv8si2<mask_name><round_saeonly_name>):
13584 (<fixsuffix>fix_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
13586 (fix<fixunssuffix>_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
13588 (<fixsuffix>fix_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
13590 (fix<fixunssuffix>_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
13592 (<fixsuffix>fix_truncv2sfv2di2<mask_name>): Rename to ...
13593 (fix<fixunssuffix>_truncv2sfv2di2<mask_name>): ... this.
13594 (vec_pack_ufix_trunc_<mode>): Use gen_fixuns_truncv8dfv8si2 instead of
13595 gen_ufix_truncv8dfv8si2.
13596 * config/i386/i386-builtin.def (__builtin_ia32_cvttpd2uqq256_mask,
13597 __builtin_ia32_cvttpd2uqq128_mask, __builtin_ia32_cvttps2uqq256_mask,
13598 __builtin_ia32_cvttps2uqq128_mask, __builtin_ia32_cvtuqq2ps256_mask,
13599 __builtin_ia32_cvtuqq2ps128_mask, __builtin_ia32_cvtuqq2pd256_mask,
13600 __builtin_ia32_cvtuqq2pd128_mask, __builtin_ia32_cvttpd2udq512_mask,
13601 __builtin_ia32_cvtuqq2ps512_mask, __builtin_ia32_cvtuqq2pd512_mask,
13602 __builtin_ia32_cvttps2uqq512_mask, __builtin_ia32_cvttpd2uqq512_mask):
13603 Use fixuns instead ufix or floatuns instead ufloat in CODE_FOR_ names.
13605 2018-05-24 H.J. Lu <hongjiu.lu@intel.com>
13609 * varasm.c (assemble_alias): Lookup ifunc attribute on error.
13611 2018-05-25 Jim Wilson <jimw@sifive.com>
13613 * config/riscv/riscv-protos.h (riscv_epilogue_uses): New.
13614 * config/riscv/riscv.c (struct machine_function): Add
13615 interrupt_handler_p and attribute_checked_p fields.
13616 (riscv_attribute_table): Add interrupt.
13617 (riscv_interrupt_type_p): New.
13618 (riscv_save_reg_p): Save extra regs for interrupt handler.
13619 (riscv_use_save_libcall): Return false for interrupt handler.
13620 (riscv_first_stack_step): Add forward declaration.
13621 (riscv_compute_frame_info): New local interrupt_save_t1. Set it
13622 for interrupt handler with large frame. Use it for saved reg list.
13623 (riscv_expand_prologue): Move flag_stack_usage_info support to
13624 eliminate duplication.
13625 (riscv_expand_epilogue): Generate mret for interrupt handler.
13626 (riscv_epilogue_uses): New.
13627 (riscv_can_use_return_insn): Return false for interrupt handler.
13628 (riscv_function_ok_for_sibcall): Likewise.
13629 (riscv_set_current_function): Add interrupt handler support.
13630 * config/riscv/riscv.h (EPILOGUE_USES): Call riscv_epilogue_uses.
13631 * config/riscv/riscv.md (UNSPECV_MRET): New.
13633 (riscv_frflags, riscv_fsflags): Use tab after opcode.
13635 * doc/extend.texi (RISC-V Function Attributes) <interrupt>: New.
13637 2018-05-25 Bill Schmidt <wschmidt@linux.ibm.com>
13639 PR tree-optimization/85712
13640 * gimple-ssa-strength-reduction.c (replace_one_candidate): Skip if
13641 this candidate has already been replaced in-situ by a copy.
13643 2018-05-25 Jason Merrill <jason@redhat.com>
13645 PR c++/80485 - inline function non-zero address.
13646 * symtab.c (nonzero_address): Check DECL_COMDAT.
13648 2018-05-25 Uros Bizjak <ubizjak@gmail.com>
13651 * config/alpha/alpha.md (ashlsi3): New insn pattern.
13652 (*ashlsi_se): Rename from *ashldi_se. Define as sign
13653 extension of SImode operation. Use const123_operand predicate.
13654 (*saddsi_1): Remove.
13655 (*saddl_se_1): Ditto.
13656 (*ssubsi_1): Ditto.
13657 (*ssubl_se_1): Ditto.
13658 * config/alpha/predicates.md (const123_operand): New predicate.
13659 * config/alpha/constraints.md (P): Use IN_RANGE.
13661 2018-05-25 Richard Biener <rguenther@suse.de>
13663 * tree-ssa-alias.h (refs_may_alias_p): Add tbaa_p bool parameter,
13665 (ref_maybe_used_by_stmt_p): Likewise.
13666 (stmt_may_clobber_ref_p): Likewise.
13667 (stmt_may_clobber_ref_p_1): Likewise.
13668 * tree-ssa-alias.c (refs_may_alias_p): Add tbaa_p bool parameter
13670 (ref_maybe_used_by_stmt_p): Likewise.
13671 (stmt_may_clobber_ref_p): Likewise.
13672 (stmt_may_clobber_ref_p_1): Likewise.
13673 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Use
13674 the alias oracle to disambiguate DRs with stmts DR analysis
13676 (vect_analyze_data_refs): Do not give up on not analyzable
13677 DRs for BB vectorization. Remove code truncating the dataref
13680 2018-05-25 Jakub Jelinek <jakub@redhat.com>
13683 * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
13684 Add (=Yk,v,C) variant using vptestm insn. Use TARGET_AVX512BW
13685 in test instead of TARGET_AVX512F for VI12_AVX512VL iterator.
13687 2018-05-25 Richard Biener <rguenther@suse.de>
13689 * tree-vect-data-refs.c (vect_find_stmt_data_reference): New
13690 function, combining stmt data ref gathering and fatal analysis
13692 (vect_analyze_data_refs): Remove now redudnant code and simplify.
13693 * tree-vect-loop.c (vect_get_datarefs_in_loop): Factor out from
13694 vect_analyze_loop_2 and use vect_find_stmt_data_reference.
13695 * tree-vect-slp.c (vect_slp_bb): Use vect_find_stmt_data_reference.
13696 * tree-vectorizer.h (vect_find_stmt_data_reference): Declare.
13698 2018-05-25 Bin Cheng <bin.cheng@arm.com>
13700 PR tree-optimization/85720
13701 * tree-loop-distribution.c (break_alias_scc_partitions): Don't merge
13702 SCC if all partitions are builtins.
13703 (version_loop_by_alias_check): New parameter. Generate cancelable
13704 runtime alias check if all partitions are builtins.
13705 (distribute_loop): Update call to above function.
13707 2018-05-25 Bin Cheng <bin.cheng@arm.com>
13709 * tree-outof-ssa.c (tree-ssa.h, tree-dfa.h): Include header files.
13710 (create_default_def, for_all_parms): Moved from tree-ssa-coalesce.c.
13711 (parm_default_def_partition_arg): Ditto.
13712 (set_parm_default_def_partition): Ditto.
13713 (get_parm_default_def_partitions): Ditto and make it static.
13714 (get_undefined_value_partitions): Ditto and make it static.
13715 (remove_ssa_form): Refactor call to init_var_map here.
13716 * tree-ssa-coalesce.c (build_ssa_conflict_graph): Support live range
13717 computation for loop region.
13718 (coalesce_partitions, compute_optimized_partition_bases): Ditto.
13719 (register_default_def): Delete.
13720 (for_all_parms, create_default_def): Move to tree-outof-ssa.c.
13721 (parm_default_def_partition_arg): Ditto.
13722 (set_parm_default_def_partition): Ditto.
13723 (get_parm_default_def_partitions): Ditto and make it static.
13724 (get_undefined_value_partitions): Ditto and make it static.
13725 (coalesce_with_default, coalesce_with_default): Update comment.
13726 (create_coalesce_list_for_region): New func factored out from
13727 create_outofssa_var_map.
13728 (populate_coalesce_list_for_outofssa): New func factored out from
13729 create_outofssa_var_map and coalesce_ssa_name.
13730 (create_outofssa_var_map): Delete.
13731 (coalesce_ssa_name): Refactor to support live range computation.
13732 * tree-ssa-coalesce.h (coalesce_ssa_name): Change decl.
13733 (get_parm_default_def_partitions): Delete.
13734 (get_undefined_value_partitions): Ditto.
13735 * tree-ssa-live.c (init_var_map, delete_var_map): Support live range
13736 computation for loop region.
13737 (new_tree_live_info, loe_visit_block): Ditto.
13738 (live_worklist, set_var_live_on_entry): Ditto.
13739 (calculate_live_on_exit, verify_live_on_entry): Ditto.
13740 * tree-ssa-live.h (struct _var_map): New fields.
13741 (init_var_map): Change decl.
13742 (region_contains_p): New.
13744 2018-05-25 Bin Cheng <bin.cheng@arm.com>
13746 * tree-ssa-live.h (live_merge_and_clear): Delete.
13748 2018-05-25 Richard Biener <rguenther@suse.de>
13751 * tree-dump.c (dequeue_and_dump): Remove access to removed
13752 operand 2 of a SWITCH_EXPR.
13754 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
13756 * doc/sourcebuild.texi (vect_double_cond_arith): Include
13757 multiplication and division.
13758 * doc/md.texi (cond_mul@var{m}, cond_div@var{m}, cond_mod@var{m})
13759 (cond_udiv@var{m}, cond_umod@var{m}): Document.
13760 * optabs.def (cond_smul_optab, cond_sdiv_optab, cond_smod_optab)
13761 (cond_udiv_optab, cond_umod_optab): New optabs.
13762 * internal-fn.def (IFN_COND_MUL, IFN_COND_DIV, IFN_COND_MOD)
13763 (IFN_COND_RDIV): New internal functions.
13764 * internal-fn.c (get_conditional_internal_fn): Handle TRUNC_DIV_EXPR,
13765 TRUNC_MOD_EXPR and RDIV_EXPR.
13766 * match.pd (UNCOND_BINARY, COND_BINARY): Handle them.
13767 * config/aarch64/iterators.md (UNSPEC_COND_MUL, UNSPEC_COND_DIV):
13769 (SVE_INT_BINARY): Include mult.
13770 (SVE_COND_FP_BINARY): Include UNSPEC_MUL and UNSPEC_DIV.
13771 (optab, sve_int_op): Handle mult.
13772 (optab, sve_fp_op, commutative): Handle UNSPEC_COND_MUL and
13774 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New pattern
13775 for SVE_INT_BINARY_SD.
13777 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
13779 * config/aarch64/iterators.md (SVE_INT_BINARY_SD): New code iterator.
13780 (optab, sve_int_op): Handle div and udiv.
13781 * config/aarch64/aarch64-sve.md (<optab><mode>3): New expander
13782 for SVE_INT_BINARY_SD.
13783 (*<optab><mode>3): New insn for the same.
13785 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
13787 * tree-vect-patterns.c: Include predict.h.
13788 (vect_recog_divmod_pattern): Restrict check for division support
13789 to when optimizing for size.
13791 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
13793 * doc/sourcebuild.texi (vect_double_cond_arith: Document.
13794 * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 4.
13795 (gimple_match_op::gimple_match_op): Add an overload for 4 operands.
13796 (gimple_match_op::set_op): Likewise.
13797 (gimple_resimplify4): Declare.
13798 * genmatch.c (get_operand_type): Handle CFN_COND_* functions.
13799 (expr::gen_transform): Likewise.
13800 (decision_tree::gen): Generate a simplification routine for 4 operands.
13801 * gimple-match-head.c (gimple_simplify): Add an overload for
13802 4 operands. In the top-level function, handle up to 4 call
13803 arguments and call gimple_resimplify4.
13804 (gimple_resimplify4): New function.
13805 (build_call_internal): Pass a fourth operand.
13806 (maybe_push_to_seq): Likewise.
13807 * match.pd (UNCOND_BINARY, COND_BINARY): New operator lists.
13808 Fold VEC_COND_EXPRs of an operation and a default value into
13809 an IFN_COND_* function if possible.
13810 * config/aarch64/iterators.md (UNSPEC_COND_MAX, UNSPEC_COND_MIN):
13812 (SVE_COND_FP_BINARY): Include them.
13813 (optab, sve_fp_op): Handle them.
13814 (SVE_INT_BINARY_REV): New code iterator.
13815 (SVE_COND_FP_BINARY_REV): New int iterator.
13816 (commutative): New int attribute.
13817 * config/aarch64/aarch64-protos.h (aarch64_sve_prepare_conditional_op):
13819 * config/aarch64/aarch64.c (aarch64_sve_prepare_conditional_op): New
13821 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Use it.
13822 (*cond_<optab><mode>): New patterns for reversed operands.
13824 2018-05-25 Richard Biener <rguenther@suse.de>
13826 * tree-vectorizer.h (STMT_VINFO_GROUP_*, GROUP_*): Remove.
13827 (DR_GROUP_*): New, assert we have non-NULL ->data_ref_info.
13828 (REDUC_GROUP_*): New, assert we have NULL ->data_ref_info.
13829 (STMT_VINFO_GROUPED_ACCESS): Adjust.
13830 * tree-vect-data-refs.c (everywhere): Adjust users.
13831 * tree-vect-loop.c (everywhere): Likewise.
13832 * tree-vect-slp.c (everywhere): Likewise.
13833 * tree-vect-stmts.c (everywhere): Likewise.
13834 * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
13836 2018-05-25 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
13838 * configure.ac (gcc_cv_as_section_has_e): Move to common section.
13840 (gcc_cv_as_section_exclude): ... this.
13841 Try Solaris as #exclude syntax.
13842 * configure: Regenerate.
13843 * config.in: Regenerate.
13844 * config/i386/i386.c (i386_solaris_elf_named_section): Handle
13846 * config/sparc/sparc.c (sparc_solaris_elf_asm_named_section)
13847 [HAVE_GAS_SECTION_EXCLUDE]: Handle SECTION_EXCLUDE.
13849 * varasm.c (default_elf_asm_named_section): Don't check if
13850 HAVE_GAS_SECTION_EXCLUDE is defined.
13852 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
13854 * doc/md.texi: Update the documentation of the cond_* optabs
13855 to mention the new final operand. Fix GET_MODE_NUNITS call.
13856 Describe the scalar case too.
13857 * internal-fn.def (IFN_EXTRACT_LAST): Change type to fold_left.
13858 * internal-fn.c (expand_cond_unary_optab_fn): Expect 3 operands
13860 (expand_cond_binary_optab_fn): Expect 4 operands instead of 3.
13861 (get_conditional_internal_fn): Update comment.
13862 * tree-vect-loop.c (vectorizable_reduction): Pass the original
13863 accumulator value as a final argument to conditional functions.
13864 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Turn into
13865 a define_expand and add an "else" operand. Assert for now that
13866 the else operand is equal to operand 2. Use SVE_INT_BINARY and
13867 SVE_COND_FP_BINARY instead of SVE_COND_INT_OP and SVE_COND_FP_OP.
13868 (*cond_<optab><mode>): New patterns.
13869 * config/aarch64/iterators.md (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX)
13870 (UNSPEC_COND_SMIN, UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
13871 (UNSPEC_COND_EOR): Delete.
13872 (optab): Remove associated mappings.
13873 (SVE_INT_BINARY): New code iterator.
13874 (sve_int_op): Remove int attribute and add "minus" to the code
13876 (SVE_COND_INT_OP): Delete.
13877 (SVE_COND_FP_OP): Rename to...
13878 (SVE_COND_FP_BINARY): ...this.
13880 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
13882 * optabs.c (can_reuse_operands_p): New function.
13883 (maybe_legitimize_operands): Try to reuse the results for
13886 2018-05-24 Uros Bizjak <ubizjak@gmail.com>
13888 * config/i386/sse.md (cvtusi2<ssescalarmodesuffix>64<round_name>):
13889 Add {q} suffix to insn mnemonic.
13891 2018-05-23 Jozef Lawrynowicz <jozef.l@mittosystems.com>
13893 * config/msp430/msp430.c (TARGET_WARN_FUNC_RETURN): Define.
13894 (msp430_warn_func_return): New.
13896 2018-05-24 Roger Sayle <roger@nextmovesoftware.com>
13898 * fold-const.c (tree_nonzero_bits): New function.
13899 * fold-const.h (tree_nonzero_bits): Likewise.
13900 * match.pd (POPCOUNT): New patterns to fold BUILTIN_POPCOUNT and
13901 friends. POPCOUNT(x&1) => x&1, POPCOUNT(x)==0 => x==0, etc.
13903 2018-05-24 H.J. Lu <hongjiu.lu@intel.com>
13907 * varasm.c (assemble_alias): Check ifunc_resolver only on
13910 2018-05-24 Uros Bizjak <ubizjak@gmail.com>
13913 * config/i386/sse.md (movdi_to_sse): Do not generate pseudo
13914 when memory input operand is handled.
13916 2018-05-24 Luis Machado <luis.machado@linaro.org>
13918 * config/aarch64/aarch64.c (qdf24xx_addrcost_table): New static
13920 (qdf24xx_tunings) <addr_costs>: Set to qdf24xx_addrcost_table.
13922 2018-05-24 Richard Sandiford <richard.sandiford@linaro.org>
13924 * match.pd: Delay FMA folds until after vectorization.
13926 2018-05-24 Andre Vieira <andre.simoesdiasvieira@arm.com>
13929 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
13930 address check not strict.
13932 2018-05-24 Richard Sandiford <richard.sandiford@linaro.org>
13934 * gimple-match.h (gimple_match_op): New class.
13935 (mprts_hook): Replace parameters with a gimple_match_op *.
13936 (maybe_build_generic_op): Likewise.
13937 (gimple_simplified_result_is_gimple_val): Replace parameters with
13938 a const gimple_match_op *.
13939 (gimple_simplify): Replace code_helper * and tree * parameters with
13940 a gimple_match_op * parameter.
13941 (gimple_resimplify1): Replace code_helper *, tree and tree *
13942 parameters with a gimple_match_op * parameter.
13943 (gimple_resimplify2): Likewise.
13944 (gimple_resimplify3): Likewise.
13945 (maybe_push_res_to_seq): Replace code_helper, tree and tree *
13946 parameters with a gimple_match_op * parameter.
13947 * gimple-match-head.c (gimple_simplify): Change prototypes of
13948 auto-generated functions to take a gimple_match_op * instead of
13949 separate code_helper * and tree * parameters. Make the same
13950 change in the top-level overload and update calls to the
13951 gimple_resimplify routines. Update calls to the auto-generated
13952 functions and to maybe_push_res_to_seq in the publicly-facing
13953 operation-specific gimple_simplify overloads.
13954 (gimple_match_op::MAX_NUM_OPS): Define.
13955 (gimple_resimplify1): Replace rcode and ops with a single res_op
13956 parameter. Update call to gimple_simplify.
13957 (gimple_resimplify2): Likewise.
13958 (gimple_resimplify3): Likewise.
13959 (mprts_hook): Replace parameters with a gimple_match_op *.
13960 (maybe_build_generic_op): Likewise.
13961 (build_call_internal): Replace type, nargs and ops with
13962 a gimple_match_op *.
13963 (maybe_push_res_to_seq): Replace res_code, type and ops parameters
13964 with a single gimple_match_op *. Update calls to mprts_hook,
13965 build_call_internal and gimple_simplified_result_is_gimple_val.
13966 Factor out code that is common to the tree_code and combined_fn cases.
13967 * genmatch.c (expr::gen_transform): Replace tem_code and
13968 tem_ops with a gimple_match_op called tem_op. Update calls
13969 to the gimple_resimplify functions and maybe_push_res_to_seq.
13970 (dt_simplify::gen_1): Manipulate res_op instead of res_code and
13971 res_ops. Update call to the gimple_resimplify functions.
13972 (dt_simplify::gen): Pass res_op instead of res_code and res_ops.
13973 (decision_tree::gen): Make the functions take a gimple_match_op *
13974 called res_op instead of separate res_code and res_ops parameters.
13975 Update call accordingly.
13976 * gimple-fold.c (replace_stmt_with_simplification): Replace rcode
13977 and ops with a single res_op parameter. Update calls to
13978 maybe_build_generic_op and maybe_push_res_to_seq.
13979 (fold_stmt_1): Update calls to gimple_simplify and
13980 replace_stmt_with_simplification.
13981 (gimple_fold_stmt_to_constant_1): Update calls to gimple_simplify
13982 and gimple_simplified_result_is_gimple_val.
13983 * tree-cfgcleanup.c (cleanup_control_expr_graph): Update call to
13985 * tree-ssa-sccvn.c (vn_lookup_simplify_result): Replace parameters
13986 with a gimple_match_op *.
13987 (vn_nary_build_or_lookup): Likewise. Update call to
13988 vn_nary_build_or_lookup_1.
13989 (vn_nary_build_or_lookup_1): Replace rcode, type and ops with a
13990 gimple_match_op *. Update calls to the gimple_resimplify routines
13991 and to gimple_simplified_result_is_gimple_val.
13992 (vn_nary_simplify): Update call to vn_nary_build_or_lookup_1.
13993 Use gimple_match_op::MAX_NUM_OPS instead of a hard-coded 3.
13994 (vn_reference_lookup_3): Update call to vn_nary_build_or_lookup.
13995 (visit_nary_op): Likewise.
13996 (visit_reference_op_load): Likewise.
13998 2018-05-23 Luis Machado <luis.machado@linaro.org>
14000 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Use correct type
14001 modifier for printing the step amount.
14003 2018-05-23 Jozef Lawrynowicz <jozef.l@somniumtech.com>
14006 * tree.c (build_common_tree_nodes): Dont set TYPE_SIZE for __intN
14009 2018-05-23 Segher Boessenkool <segher@kernel.crashing.org>
14011 * doc/sourcebuild.texi (Endianness): New subsubsection.
14013 2018-05-23 Luis Machado <luis.machado@linaro.org>
14015 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
14016 <prefetch_dynamic_strides>: New const bool field.
14017 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
14018 prefetch_dynamic_strides.
14019 (exynosm1_prefetch_tune): Likewise.
14020 (thunderxt88_prefetch_tune): Likewise.
14021 (thunderx_prefetch_tune): Likewise.
14022 (thunderx2t99_prefetch_tune): Likewise.
14023 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides to
14025 (aarch64_override_options_internal): Update to set
14026 PARAM_PREFETCH_DYNAMIC_STRIDES.
14027 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
14028 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
14029 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
14030 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
14031 prefetch-dynamic-strides setting.
14033 2018-05-23 Luis Machado <luis.machado@linaro.org>
14035 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
14036 <minimum_stride>: New const int field.
14037 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
14038 minimum_stride field defaulting to -1.
14039 (exynosm1_prefetch_tune): Likewise.
14040 (thunderxt88_prefetch_tune): Likewise.
14041 (thunderx_prefetch_tune): Likewise.
14042 (thunderx2t99_prefetch_tune): Likewise.
14043 (qdf24xx_prefetch_tune) <minimum_stride>: Set to 2048.
14044 <default_opt_level>: Set to 3.
14045 (aarch64_override_options_internal): Update to set
14046 PARAM_PREFETCH_MINIMUM_STRIDE.
14047 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
14048 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
14049 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
14050 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
14051 stride is constant and is below the minimum stride threshold.
14053 2018-05-23 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
14055 * config/arm/arm-cpus.in (mode26): Delete.
14056 (armv4): Delete mode26 reference.
14057 * config/arm/arm.c (arm_configure_build_target): Delete use of
14060 2018-05-23 Uros Bizjak <ubizjak@gmail.com>
14062 * config/i386/i386.md (*floatuns<SWI48:mode><MODEF:mode>2_avx512):
14064 (floatunssi<mode>2): Also enable for AVX512F and TARGET_SSE_MATH.
14065 Rewrite expander pattern. Emit gen_floatunssi<mode>2_i387_with_xmm
14067 (floatunsdisf2): Rewrite expander pattern. Hanlde TARGET_AVX512F.
14068 (floatunsdidf2): Ditto.
14070 2018-05-23 Uros Bizjak <ubizjak@gmail.com>
14072 * config/i386/i386.md (fixuns_trunc<mode>di2): New insn pattern.
14073 (fixuns_trunc<mode>si2_avx512f): Ditto.
14074 (*fixuns_trunc<mode>si2_avx512f_zext): Ditto.
14075 (fixuns_trunc<mode>si2): Also enable for AVX512F and TARGET_SSE_MATH.
14076 Emit fixuns_trunc<mode>si2_avx512f for AVX512F targets.
14078 2018-05-23 Alexander Monakov <amonakov@ispras.ru>
14080 PR rtl-optimization/79985
14081 * df-scan.c (df_insn_refs_collect): Remove special case for
14082 global registers and asm statements.
14084 2018-05-23 Alexander Monakov <amonakov@ispras.ru>
14086 * extend.texi (Global Register Variables): Rewrite the bullet list.
14087 Note that the register is available for allocation. Note that access
14088 via inline asm must use constraints. Add note about async-signal
14089 handlers. Remove paragraph about automagic register selection.
14091 2018-05-23 Richard Biener <rguenther@suse.de>
14093 * tree-ssa-sccvn.c (vn_reference_lookup_3): Remove restriction
14094 of fixed offset from memset VN.
14096 2018-05-23 Bill Schmidt <wschmidt@linux.ibm.com>
14098 * gimple-ssa-strength-reduction.c (struct slsr_cand_d): Add
14099 first_interp field.
14100 (alloc_cand_and_find_basis): Initialize first_interp field.
14101 (slsr_process_mul): Modify first_interp field.
14102 (slsr_process_add): Likewise.
14103 (slsr_process_cast): Modify first_interp field for each new
14105 (slsr_process_copy): Likewise.
14106 (dump_candidate): Dump first_interp field.
14107 (replace_mult_candidate): Process all interpretations, not just
14109 (replace_rhs_if_not_dup): Likewise.
14110 (replace_one_candidate): Likewise.
14112 2018-05-23 Wilco Dijkstra <wdijkstr@arm.com>
14114 * config/aarch64/aarch64.c (aarch64_use_frame_pointer):
14116 (aarch64_needs_frame_chain): New function.
14117 (aarch64_parse_override_string): Set aarch64_use_frame_pointer.
14119 2018-05-23 Sudakshina Das <sudi.das@arm.com>
14122 * common/config/aarch64/aarch64-common.c (aarch64_handle_option):
14123 Check val before adding MASK_STRICT_ALIGN to opts->x_target_flags.
14124 * config/aarch64/aarch64.opt (mstrict-align): Remove RejectNegative.
14125 * config/aarch64/aarch64.c (aarch64_attributes): Mark allow_neg
14126 as true for strict-align.
14127 (aarch64_can_inline_p): Perform checks even when callee has no
14128 attributes to check for strict alignment.
14129 * doc/extend.texi (AArch64 Function Attributes): Document
14131 * doc/invoke.texi: (AArch64 Options): Likewise.
14133 2018-05-23 Richard Sandiford <richard.sandiford@linaro.org>
14135 PR tree-optimization/85853
14136 * tree-vect-slp.c (vect_slp_analyze_node_operations): Split out
14137 the handling of the root of the node to...
14138 (vect_slp_analyze_node_operations_1): ...this new function,
14139 and run the whole thing with the child nodes' def types
14140 set according to their SLP node's def type.
14142 2018-05-23 Richard Biener <rguenther@suse.de>
14144 PR middle-end/85874
14145 * tree-data-ref.c (create_runtime_alias_checks): Defer
14146 and ignore overflow warnings.
14148 2018-05-23 Yury Gribov <tetra2005@gmail.com>
14150 PR tree-optimization/85822
14151 * tree-vrp.c (is_masked_range_test): Fix handling of negative
14154 2018-05-23 Richard Biener <rguenther@suse.de>
14156 * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
14157 memset constants via native_interpret_expr.
14159 2018-05-22 H.J. Lu <hongjiu.lu@intel.com>
14162 * cgraph.h (cgraph_node::create): Set ifunc_resolver for ifunc
14164 (cgraph_node::create_alias): Likewise.
14165 (cgraph_node::get_availability): Check ifunc_resolver instead
14166 of looking up ifunc attribute.
14167 * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
14168 * varasm.c (do_assemble_alias): Likewise.
14169 (assemble_alias): Likewise.
14170 (default_binds_local_p_3): Likewise.
14171 * cgraph.h (cgraph_node): Add ifunc_resolver.
14172 (cgraph_node::only_called_directly_or_aliased_p): Return false
14173 for IFUNC resolver.
14174 * lto-cgraph.c (input_node): Set ifunc_resolver for ifunc
14176 * symtab.c (symtab_node::verify_base): Verify that ifunc_resolver
14177 is equivalent to lookup_attribute ("ifunc", DECL_ATTRIBUTES (decl)).
14178 (symtab_node::binds_to_current_def_p): Check ifunc_resolver
14179 instead of looking up ifunc attribute.
14181 2018-05-22 Luis Machado <luis.machado@linaro.org>
14183 * config/aarch64/aarch64.md (*ashift<mode>_extv_bfiz): New pattern.
14185 2018-05-22 Martin Sebor <msebor@redhat.com>
14187 PR middle-end/85359
14188 * builtins.c (expand_builtin_strcpy): Call maybe_warn_nonstring_arg
14189 only when expasion succeeds.
14190 (expand_builtin_strcmp): Same.
14191 (expand_builtin_strncmp): Same.
14193 2018-05-22 Martin Sebor <msebor@redhat.com>
14195 * calls.c (maybe_warn_nonstring_arg): Fix a typo in a comment.
14197 2018-05-22 Jackson Woodruff <jackson.woodruff@arm.com>
14198 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
14200 * config/aarch64/aarch64-ldpstp.md: Replace uses of
14201 aarch64_mem_pair_operand with memory_operand and delete operand swapping
14203 * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
14204 Add check for legitimate_address.
14205 (aarch64_gen_adjusted_ldpstp): Swap operands where appropriate.
14206 (aarch64_swap_ldrstr_operands): New.
14207 * config/aarch64/aarch64-protos.h (aarch64_swap_ldrstr_operands):
14210 2018-05-22 Jackson Woodruff <jackson.woodruff@arm.com>
14211 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
14213 * config/aarch64/aarch64.md: New patterns to generate stp
14215 (store_pair_sw, store_pair_dw): New patterns to generate stp for
14216 single words and double words.
14217 (load_pair_sw, load_pair_dw): Likewise.
14218 (store_pair_sf, store_pair_df, store_pair_si, store_pair_di):
14220 (load_pair_sf, load_pair_df, load_pair_si, load_pair_di):
14222 * config/aarch64/aarch64-ldpstp.md: Modify peephole
14223 for different mode ldpstp and add peephole for merged zero stores.
14224 Likewise for loads.
14225 * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
14227 (aarch64_gen_store_pair): Rename calls to match new patterns.
14228 (aarch64_gen_load_pair): Rename calls to match new patterns.
14229 * config/aarch64/aarch64-simd.md (load_pair<mode>): Rename to...
14230 (load_pair<DREG:mode><DREG2:mode>): ... This.
14231 (store_pair<mode>): Rename to...
14232 (vec_store_pair<DREG:mode><DREG2:mode>): ... This.
14233 * config/aarch64/iterators.md (DREG, DREG2, DX2, SX, SX2, DSX):
14234 New mode iterators.
14235 (V_INT_EQUIV): Handle SImode.
14236 * config/aarch64/predicates.md (aarch64_reg_zero_or_fp_zero):
14239 2018-05-22 Martin Sebor <msebor@redhat.com>
14242 * calls.c (maybe_warn_nonstring_arg): Use string length to set
14243 or ajust the presumed bound on an operation to avoid unnecessary
14246 2018-05-22 Martin Sebor <msebor@redhat.com>
14248 PR tree-optimization/85826
14249 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Avoid
14250 assuming that a DECL necesarily has a constant size.
14252 2018-05-22 Richard Sandiford <richard.sandiford@linaro.org>
14254 PR middle-end/85862
14255 * internal-fn.c (expand_direct_optab_fn): Cope with a null lhs.
14257 2018-05-22 Richard Biener <rguenther@suse.de>
14259 PR tree-optimization/85834
14260 * tree-ssa-sccvn.c (vn_reference_lookup_3): Properly handle
14261 non-constant and non-zero memset arguments.
14263 2018-05-22 Martin Liska <mliska@suse.cz>
14266 * ipa-icf.c (sem_item::add_type): Do not ICE for incomplete types.
14268 2018-05-22 Richard Biener <rguenther@suse.de>
14270 PR tree-optimization/85863
14271 * tree-vect-stmts.c (vect_is_simple_cond): Only widen invariant
14272 comparisons when vectype is specified.
14273 (vectorizable_condition): Do not specify vectype for
14274 vect_is_simple_cond when SLP vectorizing.
14276 2018-05-21 Michael Meissner <meissner@linux.ibm.com>
14279 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Do not
14280 define __ibm128 as long double.
14281 * config/rs6000/rs6000.c (rs6000_init_builtins): Create __ibm128
14282 as a distinct type when IEEE 128-bit support is enabled.
14283 (init_float128_ieee): Fix up conversions between IFmode and IEEE
14284 128-bit types to use the correct functions.
14285 (rs6000_expand_float128_convert): Use explicit FLOAT_EXTEND to
14286 convert between 128-bit floating point types that have different
14287 modes but the same representation, instead of using gen_lowpart to
14289 * config/rs6000/rs6000.md (IFKF): New iterator for IFmode and
14291 (IFKF_reg): New attributes to give the register constraints for
14293 (extend<mode>tf2_internal): New insns to mark an explicit
14294 conversion between 128-bit floating point types that have a
14295 different mode but share the same representation.
14297 2018-05-21 Richard Sandiford <richard.sandiford@linaro.org>
14299 PR tree-optimization/85814
14300 * tree-ssa-strlen.c (get_stridx_plus_constant): Cope with
14301 a null return from get_strinfo when unsharing the next
14302 strinfo in the chain.
14304 2018-05-21 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
14307 * varasm.c (weak_finish): Clean up weak_decls.
14309 2018-05-21 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
14311 * config/aarch64/aarch64.md ("unspec"): Define UNSPEC_SABAL,
14312 UNSPEC_SABDL2, UNSPEC_SADALP, UNSPEC_UABAL, UNSPEC_UABDL2,
14313 UNSPEC_UADALP values.
14314 * config/aarch64/iterators.md (ABAL): New int iterator.
14317 (sur): Add mappings for the above.
14318 * config/aarch64/aarch64-simd.md (aarch64_<sur>abdl2<mode>_3):
14320 (aarch64_<sur>abal<mode>_4): Likewise.
14321 (aarch64_<sur>adalp<mode>_3): Likewise.
14322 (<sur>sadv16qi): New define_expand.
14324 2018-05-21 Alexander Nesterovskiy <alexander.nesterovskiy@intel.com>
14326 * config/i386/i386.md (*movsf_internal): AVX falsedep fix.
14327 (*movdf_internal): Ditto.
14328 (*rcpsf2_sse): Ditto.
14329 (*rsqrtsf2_sse): Ditto.
14330 (*sqrt<mode>2_sse): Ditto.
14332 2018-05-21 Tamar Christina <tamar.christina@arm.com>
14334 * config/aarch64/aarch64-simd.md (aarch64_eor3qv8hi): Change to
14336 (aarch64_bcaxqv8hi): Change to bcaxq<mode>4.
14337 * config/aarch64/aarch64-simd-builtins.def (veor3q_u8, veor3q_u32,
14338 veor3q_u64, veor3q_s8, veor3q_s16, veor3q_s32, veor3q_s64, vbcaxq_u8,
14339 vbcaxq_u32, vbcaxq_u64, vbcaxq_s8, vbcaxq_s16, vbcaxq_s32,
14341 * config/aarch64/arm_neon.h: Likewise.
14342 * config/aarch64/iterators.md (VQ_I): New.
14344 2018-05-21 Alexey Brodkin <abrodkin@synopsys.com>
14346 * config.gcc: Add arc/t-multilib-linux to tmake_file for
14348 * config/arc/t-multilib-linux: Specify MULTILIB_OPTIONS and
14351 2018-05-20 Chung-Ju Wu <jasonwucj@gmail.com>
14353 * config/nds32/constraints.md (S): New constraint.
14354 * config/nds32/nds32.md (call_internal): Use constraint S.
14355 (call_value_internal): Likewise.
14356 (sibcall_internal): Likewise.
14357 (sibcall_value_internal): Likewise.
14359 2018-05-20 Kito Cheng <kito.cheng@gmail.com>
14360 Chung-Ju Wu <jasonwucj@gmail.com>
14362 * config/nds32/nds32.c (nds32_register_move_cost): Take garywolf cpu
14363 into consideration.
14365 2018-05-20 Kito Cheng <kito.cheng@gmail.com>
14366 Chung-Ju Wu <jasonwucj@gmail.com>
14368 * config/nds32/nds32-cost.c (rtx_cost_model_t): New structure.
14369 (insn_size_16bit, insn_size_32bit): New variables for cost evaluation.
14370 (nds32_rtx_costs_impl): Simplify.
14371 (nds32_address_cost_impl): Simplify.
14372 (nds32_init_rtx_costs): New function.
14373 (nds32_rtx_costs_speed_prefer): Likewise.
14374 (nds32_rtx_costs_size_prefer): Likewise.
14375 (nds32_address_cost_speed_prefer): Likewise.
14376 (nds32_address_cost_speed_fwprop): Likewise.
14377 (nds32_address_cost_size_prefer): Likewise.
14378 * config/nds32/nds32-protos.h (nds32_init_rtx_costs): Declare.
14379 * config/nds32/nds32.c (nds32_option_override): Use
14380 nds32_init_rtx_costs function.
14382 2018-05-20 Chung-Ju Wu <jasonwucj@gmail.com>
14384 * config/nds32/nds32.c (nds32_asm_file_start): Output pipeline model.
14385 * config/nds32/nds32.h (TARGET_PIPELINE_N7): Define.
14386 (TARGET_PIPELINE_N8): Likewise.
14387 (TARGET_PIPELINE_N10): Likewise.
14388 (TARGET_PIPELINE_N13): Likewise.
14389 (TARGET_PIPELINE_GRAYWOLF): Likewise.
14391 2018-05-19 Monk Chiang <sh.chiang04@gmail.com>
14393 * config/nds32/nds32-fpu.md: Update copyright year.
14395 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
14397 * config/nds32/nds32.h (ASM_SPEC): Adjust spec rule.
14399 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
14401 * config/nds32/nds32.c
14402 (nds32_md_asm_adjust): Consider flag_inline_asm_r15 variable.
14403 * config/nds32/nds32.opt (minline-asm-r15): New option.
14405 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
14407 * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS): Add
14409 * config/nds32/nds32.md (abssi2): New pattern.
14411 2018-05-19 Uros Bizjak <ubizjak@gmail.com>
14413 * config/i386/i386.md (rex64namesuffix): New mode attribute.
14414 * config/i386/sse.md (sse_cvtsi2ss<rex64namesuffix><round_name>):
14415 Merge insn pattern from sse_cvtsi2ss<round_name> and
14416 sse_cvtsi2ssq<round_name> using SWI48 mode iterator.
14417 (sse_cvtss2si<rex64namesuffix><round_name>): Merge insn pattern
14418 from sse_cvtss2si<round_name> and sse_cvtss2siq<round_name>
14419 using SWI48 mode iterator.
14420 (sse_cvtss2si<rex64namesuffix>_2): Merge insn pattern from
14421 sse_cvtss2si_2 and sse_cvtss2siq_2 using SWI48 mode iterator.
14422 (sse_cvttss2si<rex64namesuffix><round_saeonly_name>): Merge insn
14423 pattern from sse_cvttss2si<round_saeonly_name>
14424 and sse_cvttss2siq<round_saeonly_name> using SWI48 mode iterator.
14425 (avx512f_vcvtss2usi<rex64namesuffix><round_name>): Merge insn pattern
14426 from avx512f_vcvtss2usi<round_name> and avx512f_vcvtss2usiq<round_name>
14427 using SWI48 mode iterator.
14428 (avx512f_vcvttss2usi<rex64namesuffix><round_saeonly_name>): Merge
14429 insn pattern from avx512f_vcvttss2usi<round_saeonly_name> and
14430 avx512f_vcvttss2usiq<round_saeonly_name> using SWI48 mode iterator.
14431 (avx512f_vcvtsd2usi<rex64namesuffix><round_name>): Merge insn pattern
14432 from avx512f_vcvtsd2usi<round_name> and avx512f_vcvtsd2usiq<round_name>
14433 using SWI48 mode iterator.
14434 (avx512f_vcvttsd2usi<rex64namesuffix><round_saeonly_name>): Merge
14435 insn pattern from avx512f_vcvttsd2usi<round_saeonly_name> and
14436 avx512f_vcvttsd2usiq<round_saeonly_name> using SWI48 mode iterator.
14437 (sse2_cvtsd2si<rex64namesuffix><round_name>): Merge insn pattern from
14438 sse2_cvtsd2si<round_name> and sse2_cvtsd2siq<round_name> using
14439 SWI48 mode iterator.
14440 (sse2_cvtsd2si<rex64namesuffix>_2): Merge insn pattern from
14441 sse2_cvtsd2si_2 and sse2_cvtsd2siq_2 using SWI48 mode iterator.
14442 (sse_cvttsd2si<rex64namesuffix><round_saeonly_name>): Merge insn
14443 pattern from sse_cvttsd2si<round_saeonly_name>
14444 and sse_cvttsd2siq<round_saeonly_name> using SWI48 mode iterator.
14446 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
14448 * config/nds32/nds32-md-auxiliary.c
14449 (nds32_valid_smw_lwm_base_p): Refine.
14450 (nds32_output_smw_single_word): Refine.
14451 (nds32_output_smw_double_word): New.
14452 * config/nds32/nds32-protos.h (nds32_output_smw_double_word): New.
14454 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
14456 * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push): Refine.
14457 (nds32_output_stack_pop): Refine.
14458 (nds32_expand_unaligned_load): Refine.
14459 (nds32_expand_unaligned_store): Refine.
14461 2018-05-19 Kuan-Lin Chen <kuanlinchentw@gmail.com>
14462 Chung-Ju Wu <jasonwucj@gmail.com>
14464 * config/nds32/constants.md: Add TP_REGNUM constant.
14465 (unspec_element): Add UNSPEC_GOTINIT, UNSPEC_GOT, UNSPEC_GOTOFF,
14466 UNSPEC_PLT, UNSPEC_TLSGD, UNSPEC_TLSLD, UNSPEC_TLSIE, UNSPEC_TLSLE and
14468 * config/nds32/nds32-doubleword.md: Consider flag_pic.
14469 * config/nds32/nds32-dspext.md (mov<mode>): Expand TLS and PIC cases.
14470 * config/nds32/nds32-predicates.c (nds32_const_unspec_p): New.
14471 * config/nds32/nds32-md-auxiliary.c: Implementation that support TLS
14472 and PIC code generation.
14473 * config/nds32/nds32-protos.h: Declarations that support TLS and PIC
14475 * config/nds32/nds32-relax-opt.c: Consider TLS and PIC for relax
14477 * config/nds32/nds32.md: Support TLS and PIC.
14478 * config/nds32/nds32.c: Support TLS and PIC.
14479 * config/nds32/nds32.h (nds32_relax_insn_type): New enum type.
14480 * config/nds32/predicates.md (nds32_nonunspec_symbolic_operand): New
14483 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
14485 * config/nds32/nds32-predicates.c (const_vector_to_hwint): Use machine
14486 mode with E_ prefix.
14488 2018-05-19 Kuan-Lin Chen <kuanlinchentw@gmail.com>
14489 Chung-Ju Wu <jasonwucj@gmail.com>
14491 * config/nds32/constants.md (unspec_element): Add UNSPEC_ICT.
14492 * config/nds32/nds32-md-auxiliary.c
14493 (symbolic_reference_mentioned_p): New.
14494 (nds32_legitimize_ict_address): New.
14495 (nds32_expand_ict_move): New.
14496 (nds32_indirect_call_referenced_p): New.
14497 (nds32_symbol_binds_local_p): Delete.
14498 (nds32_long_call_p): Modify.
14499 * config/nds32/nds32-opts.h (nds32_ict_model_type): New enum type.
14500 * config/nds32/nds32-protos.h
14501 (symbolic_reference_mentioned_p): Declare.
14502 (nds32_legitimize_ict_address): Declare.
14503 (nds32_expand_ict_move): Declare.
14504 (nds32_indirect_call_referenced_p): Declare.
14505 * config/nds32/nds32-relax-opt.c (nds32_ict_const_p): New.
14506 (nds32_relax_group): Use nds32_ict_const_p as condition.
14507 * config/nds32/nds32.c (nds32_attribute_table): Add "indirect_call".
14508 (nds32_asm_file_start): Output ict_model directive in asm code.
14509 (nds32_legitimate_address_p): Consider indirect call.
14510 (nds32_print_operand): Consider indirect call.
14511 (nds32_print_operand_address): Consider indirect call.
14512 (nds32_insert_attributes): Handle "indirect_call" attribute.
14513 (TARGET_LEGITIMATE_ADDRESS_P): Define.
14514 (TARGET_LEGITIMATE_CONSTANT_P): Define.
14515 (TARGET_CANNOT_FORCE_CONST_MEM): Define.
14516 (TARGET_DELEGITIMIZE_ADDRESS): Define.
14517 (TARGET_ASM_OUTPUT_ADDR_CONST_EXTRA): Define.
14518 * config/nds32/nds32.h (SYMBOLIC_CONST_P): Define.
14519 (TARGET_ICT_MODEL_SMALL): Define.
14520 (TARGET_ICT_MODEL_LARGE): Define.
14521 * config/nds32/nds32.md (movsi): Consider ict model.
14522 (call, call_value): Consider ict model.
14523 (sibcall, sibcall_value): Consider ict model.
14524 * config/nds32/nds32.opt (mict-model): New option.
14525 * config/nds32/predicates.md (nds32_symbolic_operand): Consider ict
14528 2018-05-18 Kito Cheng <kito.cheng@gmail.com>
14529 Monk Chiang <sh.chiang04@gmail.com>
14530 Jim Wilson <jimw@sifive.com>
14532 * common/config/riscv/riscv-common.c (riscv_parse_arch_string):
14533 Add support to parse rv32e*. Clear MASK_RVE for rv32i and rv64i.
14534 * config.gcc (riscv*-*-*): Add support for rv32e* and ilp32e.
14535 * config/riscv/riscv-c.c (riscv_cpu_cpp_builtins): Define
14536 __riscv_32e when TARGET_RVE. Handle ABI_ILP32E as soft-float ABI.
14537 * config/riscv/riscv-opts.h (riscv_abi_type): Add ABI_ILP32E.
14538 * config/riscv/riscv.c (riscv_compute_frame_info): When TARGET_RVE,
14539 compute save_libcall_adjustment properly.
14540 (riscv_option_override): Call error if TARGET_RVE and not ABI_ILP32E.
14541 (riscv_conditional_register_usage): Handle TARGET_RVE and ABI_ILP32E.
14542 * config/riscv/riscv.h (UNITS_PER_FP_ARG): Handle ABI_ILP32E.
14543 (STACK_BOUNDARY, ABI_STACK_BOUNDARY): Handle TARGET_RVE.
14544 (GP_REG_LAST, MAX_ARGS_IN_REGISTERS): Likewise.
14545 (ABI_SPEC): Handle mabi=ilp32e.
14546 * config/riscv/riscv.opt (abi_type): Add ABI_ILP32E.
14547 (RVE): Add RVE mask.
14548 * doc/invoke.texi (RISC-V options) <-mabi>: Add ilp32e info.
14549 <-march>: Add rv32e as an example.
14551 2018-05-18 Marc Glisse <marc.glisse@inria.fr>
14554 * tree-ssa-structalias.c (create_variable_info_for_1): Extra argument.
14555 (intra_create_variable_infos): Handle C++ constructors.
14557 2018-05-18 Martin Liska <mliska@suse.cz>
14559 * passes.def: Remove a redundant pass.
14561 2018-05-18 Eric Botcazou <ebotcazou@adacore.com>
14564 * config/sparc/sparc.c (sparc_expand_builtin): Always initialize op[0].
14566 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
14568 * config/arm/arm-cpus.in (armv3m, mode32): Delete features.
14570 (ARMv2, ARMv3, ARMv3m): Delete fgroups.
14572 (armv2, armv2a, armv3, armv3m): Delete architectures.
14573 (arm2, arm250, arm3, arm6, arm60, arm600, arm610, arm620,
14574 arm7, arm7d, arm7di, arm70, arm700, arm700i, arm710, arm720,
14575 arm710c, arm7100, arm7500, arm7500fe, arm7m, arm7dm, arm7dmi):
14577 * config/arm/arm.md (maddsidi4): Remove check for arm_arch3m.
14578 (*mulsidi3adddi): Likewise.
14579 (mulsidi3): Likewise.
14580 (*mulsidi3_nov6): Likewise.
14581 (umulsidi3): Likewise.
14582 (umulsidi3_nov6): Likewise.
14583 (umaddsidi4): Likewise.
14584 (*umulsidi3adddi): Likewise.
14585 (smulsi3_highpart): Likewise.
14586 (*smulsi3_highpart_nov6): Likewise.
14587 (umulsi3_highpart): Likewise.
14588 (*umulsi3_highpart_nov6): Likewise.
14589 * config/arm/arm.h (arm_arch3m): Delete.
14590 * config/arm/arm.c (arm_arch3m): Delete.
14591 (arm_option_override_internal): Update armv3-related comment.
14592 (arm_configure_build_target): Delete use of isa_bit_mode32.
14593 (arm_option_reconfigure_globals): Delete set of arm_ach3m.
14594 (arm_rtx_costs_internal): Delete check of arm_arch3m.
14595 * config/arm/arm-fixed.md (mulsq3): Delete check for arm_arch3m.
14596 (mulsa3): Likewise.
14597 (mulusa3): Likewise.
14598 * config/arm/arm-protos.h (arm_arch3m): Delete.
14599 * config/arm/arm-tables.opt: Regenerate.
14600 * config/arm/arm-tune.md: Likewise.
14601 * config/arm/t-arm-elf (all_early_nofp): Delete mentions of
14602 deleted architectures.
14604 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
14606 * config/arm/arm-cpus.in (armv5, armv5e): Delete features.
14607 (armv5t, armv5te): New features.
14608 (ARMv5, ARMv5e): Delete fgroups.
14609 (ARMv5t, ARMv5te): Adjust for above changes.
14610 (ARMv6m): Likewise.
14611 (armv5, armv5e): Delete arches.
14612 * config/arm/arm.md (*call_reg_armv5): Use arm_arch5t instead of
14614 (*call_reg_arm): Likewise.
14615 (*call_value_reg_armv5): Likewise.
14616 (*call_value_reg_arm): Likewise.
14617 (*call_symbol): Likewise.
14618 (*call_value_symbol): Likewise.
14619 (*sibcall_insn): Likewise.
14620 (*sibcall_value_insn): Likewise.
14621 (clzsi2): Likewise.
14622 (prefetch): Likewise.
14623 (define_split and define_peephole2 dependent on arm_arch5):
14625 * config/arm/arm.h (TARGET_LDRD): Use arm_arch5te instead of
14627 (TARGET_ARM_QBIT): Likewise.
14628 (TARGET_DSP_MULTIPLY): Likewise.
14629 (enum base_architecture): Delete BASE_ARCH_5, BASE_ARCH_5E.
14630 (arm_arch5, arm_arch5e): Delete.
14631 (arm_arch5t, arm_arch5te): Declare.
14632 * config/arm/arm.c (arm_arch5, arm_arch5e): Delete.
14633 (arm_arch5t): Declare.
14634 (arm_option_reconfigure_globals): Update for the above.
14635 (arm_options_perform_arch_sanity_checks): Update comment, replace
14636 use of arm_arch5 with arm_arch5t.
14637 (use_return_insn): Likewise.
14638 (arm_emit_call_insn): Likewise.
14639 (output_return_instruction): Likewise.
14640 (arm_final_prescan_insn): Likewise.
14641 (arm_coproc_builtin_available): Likewise.
14642 * config/arm/arm-c.c (arm_cpu_builtins): Replace arm_arch5 and
14643 arm_arch5e with arm_arch5t and arm_arch5te.
14644 * config/arm/arm-protos.h (arm_arch5, arm_arch5e): Delete.
14645 (arm_arch5t, arm_arch5te): Declare.
14646 * config/arm/arm-tables.opt: Regenerate.
14647 * config/arm/t-arm-elf: Remove references to armv5, armv5e.
14648 * config/arm/t-multilib: Likewise.
14649 * config/arm/thumb1.md (*call_reg_thumb1_v5): Check arm_arch5t
14650 instead of arm_arch5.
14651 (*call_reg_thumb1): Likewise.
14652 (*call_value_reg_thumb1_v5): Likewise.
14653 (*call_value_reg_thumb1): Likewise.
14654 * config/arm/vxworks.h (TARGET_OS_CPP_BUILTINS): Remove now
14656 * doc/invoke.texi (ARM Options): Remove references to armv5, armv5e.
14658 2018-05-18 Martin Liska <mliska@suse.cz>
14660 PR gcov-profile/84846
14661 * doc/gcov.texi: Document -t option of gcov tool.
14663 2018-05-18 Martin Liska <mliska@suse.cz>
14665 PR gcov-profile/84846
14666 * gcov.c (print_usage): Add new -t option.
14667 (process_args): Handle the option.
14668 (generate_results): Use stdout as output when requested by
14671 2018-05-18 Martin Liska <mliska@suse.cz>
14673 PR gcov-profile/84846
14674 * coverage.c (coverage_init): Write PWD to .gcno file.
14675 * doc/gcov.texi: Document how working directory is printed.
14676 * gcov-dump.c (dump_gcov_file): Print PWD.
14677 * gcov.c (output_intermediate_file): Likewise.
14678 (read_graph_file): Read PWD string.
14679 (output_lines): Print PWD.
14681 2018-05-18 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
14683 PR middle-end/85817
14684 * ipa-pure-const.c (malloc_candidate_p): Remove the check integer_zerop
14685 for retval and return false if all args to phi are zero.
14687 2018-05-18 Richard Biener <rguenther@suse.de>
14689 * gimple-ssa-evrp.c (class evrp_folder): Add simplify_stmt_using_ranges
14691 (evrp_dom_walker::before_dom_children): Call it.
14693 2018-05-18 Richard Biener <rguenther@suse.de>
14695 * tree-dfa.c (get_ref_base_and_extent): Use range-info to refine
14696 results when processing array refs with variable index.
14698 2018-05-18 Toon Moene <toon@moene.org>
14700 * doc/invoke.texi: Move -floop-unroll-and-jam documentation
14701 directly after that of -floop-interchange. Indicate that both
14702 options are enabled by default when specifying -O3.
14704 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
14706 * config/aarch64/aarch64-simd.md (vec_set<mode>): Use VALL_F16 mode
14707 iterator. Delete separate integer-mode vec_set<mode> expander.
14708 (aarch64_simd_vec_setv2di): Delete.
14709 (vec_setv2di): Delete.
14710 (aarch64_simd_vec_set<mode>): Delete all other patterns with that name.
14711 Use VALL_F16 mode iterator. Add LD1 alternative and use vwcore for
14712 the "w, r" alternative.
14714 2018-05-18 Martin Liska <mliska@suse.cz>
14716 * passes.def: Add pass_lower_switch and pass_lower_switch_O0.
14717 * tree-pass.h (make_pass_lower_switch_O0): New function.
14718 * tree-switch-conversion.c (node_has_low_bound): Remove.
14719 (node_has_high_bound): Likewise.
14720 (node_is_bounded): Likewise.
14721 (class pass_lower_switch): Make it a template type and create
14723 (pass_lower_switch::execute): Add template argument.
14724 (make_pass_lower_switch): New function.
14725 (make_pass_lower_switch_O0): New function.
14726 (do_jump_if_equal): Remove.
14727 (emit_case_nodes): Simplify to just handle all 3 cases and leave
14728 all the hard work to tree optimization passes.
14730 2018-05-18 Martin Liska <mliska@suse.cz>
14732 * dbgcnt.c (limit_low): Renamed from limit.
14733 (limit_high): New variable.
14734 (dbg_cnt_is_enabled): Check for upper limit.
14735 (dbg_cnt): Adjust dumping.
14736 (dbg_cnt_set_limit_by_index): Add new argument for high
14738 (dbg_cnt_set_limit_by_name): Likewise.
14739 (dbg_cnt_process_single_pair): Parse new format.
14740 (dbg_cnt_process_opt): Use strtok.
14741 (dbg_cnt_list_all_counters): Remove 'value' and add
14743 * doc/invoke.texi: Document changes.
14745 2018-05-18 Richard Sandiford <richard.sandiford@linaro.org>
14747 * doc/sourcebuild.texi (scalar_all_fma): Document.
14748 * tree.def (FMA_EXPR): Delete.
14749 * internal-fn.def (FMA, FMS, FNMA, FNMS): New internal functions.
14750 * internal-fn.c (ternary_direct): New macro.
14751 (expand_ternary_optab_fn): Likewise.
14752 (direct_ternary_optab_supported_p): Likewise.
14753 * Makefile.in (build/genmatch.o): Depend on case-fn-macros.h.
14754 * builtins.c (fold_builtin_fma): Delete.
14755 (fold_builtin_3): Don't call it.
14756 * cfgexpand.c (expand_debug_expr): Remove FMA_EXPR handling.
14757 * expr.c (expand_expr_real_2): Likewise.
14758 * fold-const.c (operand_equal_p): Likewise.
14759 (fold_ternary_loc): Likewise.
14760 * gimple-pretty-print.c (dump_ternary_rhs): Likewise.
14761 * gimple.c (DEFTREECODE): Likewise.
14762 * gimplify.c (gimplify_expr): Likewise.
14763 * optabs-tree.c (optab_for_tree_code): Likewise.
14764 * tree-cfg.c (verify_gimple_assign_ternary): Likewise.
14765 * tree-eh.c (operation_could_trap_p): Likewise.
14766 (stmt_could_throw_1_p): Likewise.
14767 * tree-inline.c (estimate_operator_cost): Likewise.
14768 * tree-pretty-print.c (dump_generic_node): Likewise.
14769 (op_code_prio): Likewise.
14770 * tree-ssa-loop-im.c (stmt_cost): Likewise.
14771 * tree-ssa-operands.c (get_expr_operands): Likewise.
14772 * tree.c (commutative_ternary_tree_code, add_expr): Likewise.
14773 * fold-const-call.h (fold_fma): Delete.
14774 * fold-const-call.c (fold_const_call_ssss): Handle CFN_FMS,
14775 CFN_FNMA and CFN_FNMS.
14776 (fold_fma): Delete.
14777 * genmatch.c (combined_fn): New enum.
14778 (commutative_ternary_tree_code): Remove FMA_EXPR handling.
14779 (commutative_op): New function.
14780 (commutate): Use it. Handle more than 2 operands.
14781 (dt_operand::gen_gimple_expr): Use commutative_op.
14782 (parser::parse_expr): Allow :c to be used with non-binary
14783 operators if the commutative operand is known.
14784 * gimple-ssa-backprop.c (backprop::process_builtin_call_use): Handle
14785 CFN_FMS, CFN_FNMA and CFN_FNMS.
14786 (backprop::process_assign_use): Remove FMA_EXPR handling.
14787 * hsa-gen.c (gen_hsa_insns_for_operation_assignment): Likewise.
14788 (gen_hsa_fma): New function.
14789 (gen_hsa_insn_for_internal_fn_call): Use it for IFN_FMA, IFN_FMS,
14790 IFN_FNMA and IFN_FNMS.
14791 * match.pd: Add folds for IFN_FMS, IFN_FNMA and IFN_FNMS.
14792 * gimple-fold.h (follow_all_ssa_edges): Declare.
14793 * gimple-fold.c (follow_all_ssa_edges): New function.
14794 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Use the
14795 gimple_build interface and use follow_all_ssa_edges to fold the result.
14796 (convert_mult_to_fma): Use direct_internal_fn_suppoerted_p
14797 instead of checking for optabs directly.
14798 * config/i386/i386.c (ix86_add_stmt_cost): Recognize FMAs as calls
14799 rather than FMA_EXPRs.
14800 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Create a
14801 call to IFN_FMA instead of an FMA_EXPR.
14803 2018-05-17 Jim Wilson <jimw@sifive.com>
14805 * expr.c (do_tablejump): When converting index to Pmode, if we have a
14806 sign extended promoted subreg, and the range does not have the sign bit
14807 set, then do a sign extend.
14809 * config/riscv/riscv.c (riscv_extend_comparands): In unsigned QImode
14810 test, check for sign extended subreg and/or constant operands, and
14811 do a sign extend in that case.
14813 2018-05-17 Steve Ellcey <sellcey@cavium.com>
14815 * config/aarch64/thunderx2t99.md (thunderx2t99_ls_both): Delete.
14816 (thunderx2t99_multiple): Delete psuedo-units from used cpus.
14818 (thunderx2t99_alu_shift): Remove alu_shift_reg, alus_shift_reg.
14819 Change logics_shift_reg to logics_shift_imm.
14820 (thunderx2t99_fp_loadpair_basic): Delete.
14821 (thunderx2t99_fp_storepair_basic): Delete.
14822 (thunderx2t99_asimd_int): Add neon_sub and neon_sub_q types.
14823 (thunderx2t99_asimd_polynomial): Delete.
14824 (thunderx2t99_asimd_fp_simple): Add neon_fp_mul_s_scalar_q
14825 and neon_fp_mul_d_scalar_q.
14826 (thunderx2t99_asimd_fp_conv): Add *int_to_fp* types.
14827 (thunderx2t99_asimd_misc): Delete neon_dup and neon_dup_q.
14828 (thunderx2t99_asimd_recip_step): Add missing *sqrt* types.
14829 (thunderx2t99_asimd_lut): Add missing tbl types.
14830 (thunderx2t99_asimd_ext): Delete.
14831 (thunderx2t99_asimd_load1_1_mult): Delete.
14832 (thunderx2t99_asimd_load1_2_mult): Delete.
14833 (thunderx2t99_asimd_load1_ldp): New.
14834 (thunderx2t99_asimd_load1): New.
14835 (thunderx2t99_asimd_load2): Add missing *load2* types.
14836 (thunderx2t99_asimd_load3): New.
14837 (thunderx2t99_asimd_load4): New.
14838 (thunderx2t99_asimd_store1_1_mult): Delete.
14839 (thunderx2t99_asimd_store1_2_mult): Delete.
14840 (thunderx2t99_asimd_store2_mult): Delete.
14841 (thunderx2t99_asimd_store2_onelane): Delete.
14842 (thunderx2t99_asimd_store_stp): New.
14843 (thunderx2t99_asimd_store1): New.
14844 (thunderx2t99_asimd_store2): New.
14845 (thunderx2t99_asimd_store3): New.
14846 (thunderx2t99_asimd_store4): New.
14848 2018-05-17 Jerome Lambourg <lambourg@adacore.com>
14850 * config/arm/arm_cmse.h (cmse_nsfptr_create, cmse_is_nsfptr): Remove
14851 #include <stdint.h>. Replace intptr_t with __INTPTR_TYPE__.
14853 2018-05-17 Pat Haugen <pthaugen@us.ibm.com>
14854 Segher Boessenkool <segher@kernel.crashing.org>
14857 * config/rs6000/rs6000.c (rs6000_output_move_128bit): Check dest
14860 2018-05-17 Richard Biener <rguenther@suse.de>
14862 * tree-ssa-dse.c (dse_classify_store): Fix iterator increment
14863 for pruning loop and prune defs feeding only already visited PHIs.
14865 2018-05-17 Richard Biener <rguenther@suse.de>
14867 * tree-ssa-sccvn.c (vn_reference_lookup_3): Improve memset handling.
14869 2018-05-17 Bin Cheng <bin.cheng@arm.com>
14870 Richard Biener <rguenther@suse.de>
14872 PR tree-optimization/85793
14873 * tree-vect-stmts.c (vectorizable_load): Handle 1 element-wise load
14874 for VMAT_ELEMENTWISE.
14876 2018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
14878 * internal-fn.h (lookup_internal_fn): Declare
14879 * internal-fn.c (lookup_internal_fn): New function.
14880 * gimple.c (gimple_build_call_from_tree): Handle calls to
14881 internal functions.
14882 * gimple-pretty-print.c (dump_gimple_call): Print "." before
14883 internal function names.
14884 * tree-pretty-print.c (dump_generic_node): Likewise.
14885 * tree-ssa-scopedtables.c (expr_hash_elt::print): Likewise.
14887 2018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
14889 * gimple-fold.h (gimple_build): Make the function forms take
14890 combined_fn rather than built_in_function.
14891 (gimple_simplify): Likewise.
14892 * gimple-match-head.c (gimple_simplify): Likewise.
14893 * gimple-fold.c (gimple_build): Likewise.
14894 * tree-vect-loop.c (get_initial_def_for_reduction): Use gimple_build
14895 rather than gimple_build_call_internal.
14896 (get_initial_defs_for_reduction): Likewise.
14897 (vect_create_epilog_for_reduction): Likewise.
14898 (vectorizable_live_operation): Likewise.
14900 2018-05-17 Martin Liska <mliska@suse.cz>
14902 * gimple-ssa-sprintf.c (format_directive): Do not use
14903 space in between 'G_' and '('.
14905 2018-05-17 Jakub Jelinek <jakub@redhat.com>
14908 * config/i386/i386.c (ix86_fold_builtin): Handle masked shifts
14909 even if the mask is not all ones.
14912 * config/i386/i386.c (ix86_fold_builtin): Fold shift builtins by
14914 (ix86_gimple_fold_builtin): Likewise.
14917 * config/i386/i386.c: Include tree-vector-builder.h.
14918 (ix86_vector_shift_count): New function.
14919 (ix86_fold_builtin): Fold shift builtins by scalar count.
14920 (ix86_gimple_fold_builtin): Likewise.
14922 * config/i386/avx512fintrin.h (_mm512_set_epi16, _mm512_set_epi8,
14923 _mm512_setzero): New intrinsics.
14925 2018-05-17 James Greenhalgh <james.greenhalgh@arm.com>
14926 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
14928 * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify
14929 code generation for cases where splatting a value is not useful.
14930 * simplify-rtx.c (simplify_ternary_operation): Simplify
14931 vec_merge across a vec_duplicate and a paradoxical subreg forming
14932 a vector mode to a vec_concat.
14934 2018-05-17 Olga Makhotina <olga.makhotina@intel.com>
14936 * config.gcc: Support "goldmont-plus".
14937 * config/i386/driver-i386.c (host_detect_local_cpu): Detect
14939 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
14940 PROCESSOR_GOLDMONT_PLUS.
14941 * config/i386/i386.c (m_GOLDMONT_PLUS): Define.
14942 (processor_target_table): Add "goldmont-plus".
14943 (PTA_GOLDMONT_PLUS): Define.
14944 (ix86_lea_outperforms): Add TARGET_GOLDMONT_PLUS.
14945 (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT_PLUS.
14946 (fold_builtin_cpu): Add M_INTEL_GOLDMONT_PLUS.
14947 (fold_builtin_cpu): Add "goldmont-plus".
14948 (ix86_add_stmt_cost): Add TARGET_GOLDMONT_PLUS.
14949 (ix86_option_override_internal): Add "goldmont-plus".
14950 * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT_PLUS.
14951 (processor_type): Add PROCESSOR_GOLDMONT_PLUS.
14952 * config/i386/x86-tune.def: Add m_GOLDMONT_PLUS.
14953 * doc/invoke.texi: Add goldmont-plus as x86 -march=/-mtune= CPU type.
14955 2018-05-17 Richard Biener <rguenther@suse.de>
14957 PR tree-optimization/85757
14958 * tree-ssa-dse.c (dse_classify_store): Record a PHI def and
14959 remove defs that only feed that PHI from further processing.
14961 2018-05-16 Jim Wilson <jimw@sifive.com>
14963 * config/riscv/riscv.md (<optab>si3_mask, <optab>si3_mask_1): Prepend
14965 (<optab>di3_mask, <optab>di3_mask_1): Likewise.
14967 2018-05-16 Mark Wielaard <mark@klomp.org>
14969 * dwarf2out.c (count_index_strings): New function.
14970 (output_indirect_strings): Call count_index_strings and generate
14971 header for dwarf_version >= 5.
14973 2018-05-16 Mark Wielaard <mark@klomp.org>
14975 * dwarf2out.c (dwarf_FORM): New function.
14976 (set_indirect_string): Use dwarf_FORM.
14977 (reset_indirect_string): Likewise.
14978 (size_of_die): Likewise.
14979 (value_format): Likewise.
14980 (output_die): Likewise.
14981 (add_skeleton_AT_string): Likewise.
14982 (output_macinfo_op): Likewise.
14983 (index_string): Likewise.
14984 (output_index_string_offset): Likewise.
14985 (output_index_string): Likewise.
14986 (count_index_strings): Likewise.
14988 2018-05-16 Carl Love <cel@us.ibm.com>
14990 * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
14991 dcbt and dcbtstt with TH=16 if operands[2] is 0 and Power 8 or newer.
14993 2018-05-16 Martin Jambor <mjambor@suse.cz>
14995 * ipa-prop.c (ipa_free_all_edge_args): Remove.
14996 * ipa-prop.h (ipa_free_all_edge_args): Likewise.
14998 2018-05-16 Wilco Dijkstra <wdijkstr@arm.com>
15000 * config/aarch64/aarch64.md (fma<mode>4): Change into expand pattern.
15001 (fnma<mode>4): Likewise.
15002 (fms<mode>4): Likewise.
15003 (fnms<mode>4): Likewise.
15004 (aarch64_fma<mode>4): Rename insn, reorder accumulator operand.
15005 (aarch64_fnma<mode>4): Likewise.
15006 (aarch64_fms<mode>4): Likewise.
15007 (aarch64_fnms<mode>4): Likewise.
15008 (aarch64_fnmadd<mode>4): Likewise.
15010 2018-05-16 Jason Merrill <jason@redhat.com>
15012 * tree.c (warn_deprecated_use): Return bool. Simplify logic.
15014 2018-05-16 Richard Biener <rguenther@suse.de>
15016 * tree-vectorizer.h (struct stmt_info_for_cost): Add where member.
15017 (dump_stmt_cost): Declare.
15018 (add_stmt_cost): Dump cost we add.
15019 (add_stmt_costs): New function.
15020 (vect_model_simple_cost, vect_model_store_cost, vect_model_load_cost):
15021 No longer exported.
15022 (vect_analyze_stmt): Adjust prototype.
15023 (vectorizable_condition): Likewise.
15024 (vectorizable_live_operation): Likewise.
15025 (vectorizable_reduction): Likewise.
15026 (vectorizable_induction): Likewise.
15027 * tree-vect-loop.c (vect_analyze_loop_operations): Create local
15028 cost vector to pass to vectorizable_ and record afterwards.
15029 (vect_model_reduction_cost): Take cost vector argument and adjust.
15030 (vect_model_induction_cost): Likewise.
15031 (vectorizable_reduction): Likewise.
15032 (vectorizable_induction): Likewise.
15033 (vectorizable_live_operation): Likewise.
15034 * tree-vect-slp.c (vect_create_new_slp_node): Initialize
15035 SLP_TREE_NUMBER_OF_VEC_STMTS.
15036 (vect_analyze_slp_cost_1): Remove.
15037 (vect_analyze_slp_cost): Likewise.
15038 (vect_slp_analyze_node_operations): Take visited args and
15039 a target cost vector. Avoid processing already visited stmt sets.
15040 (vect_slp_analyze_operations): Use a local cost vector to gather
15041 costs and register those of non-discarded instances.
15042 (vect_bb_vectorization_profitable_p): Use add_stmt_costs.
15043 (vect_schedule_slp_instance): Remove copying of
15044 SLP_TREE_NUMBER_OF_VEC_STMTS. Instead assert that it is not
15046 * tree-vect-stmts.c (record_stmt_cost): Remove path directly
15047 adding cost. Record cost entry location.
15048 (vect_prologue_cost_for_slp_op): Function to compute cost of
15049 a constant or invariant generated for SLP vect in the prologue,
15050 split out from vect_analyze_slp_cost_1.
15051 (vect_model_simple_cost): Make static. Adjust for SLP costing.
15052 (vect_model_promotion_demotion_cost): Likewise.
15053 (vect_model_store_cost): Likewise, make static.
15054 (vect_model_load_cost): Likewise.
15055 (vectorizable_bswap): Add cost vector arg and adjust.
15056 (vectorizable_call): Likewise.
15057 (vectorizable_simd_clone_call): Likewise.
15058 (vectorizable_conversion): Likewise.
15059 (vectorizable_assignment): Likewise.
15060 (vectorizable_shift): Likewise.
15061 (vectorizable_operation): Likewise.
15062 (vectorizable_store): Likewise.
15063 (vectorizable_load): Likewise.
15064 (vectorizable_condition): Likewise.
15065 (vectorizable_comparison): Likewise.
15066 (can_vectorize_live_stmts): Likewise.
15067 (vect_analyze_stmt): Likewise.
15068 (vect_transform_stmt): Adjust calls to vectorizable_*.
15069 * tree-vectorizer.c: Include gimple-pretty-print.h.
15070 (dump_stmt_cost): New function.
15072 2018-05-16 Richard Biener <rguenther@suse.de>
15074 * params.def (PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE): New param.
15075 * doc/invoke.texi (dse-max-alias-queries-per-store): Document.
15076 * tree-ssa-dse.c: Include tree-ssa-loop.h.
15077 (check_name): New callback.
15078 (dse_classify_store): Track cycles via a visited bitmap of PHI
15079 defs and simplify handling of in-loop and across loop dead stores
15080 and properly fail for loop-variant refs. Handle byte-tracking with
15081 multiple defs. Use PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE for
15084 2018-05-16 Richard Sandiford <richard.sandiford@linaro.org>
15086 * tree-vectorizer.h (vect_get_vector_types_for_stmt): Declare.
15087 (vect_get_mask_type_for_stmt): Likewise.
15088 * tree-vect-slp.c (vect_two_operations_perm_ok_p): New function,
15090 (vect_build_slp_tree_1): ...here. Use vect_get_vector_types_for_stmt
15091 to determine the statement's vector type and the vector type that
15092 should be used for calculating nunits. Deal with cases in which
15093 the type has to be deferred.
15094 (vect_slp_analyze_node_operations): Use vect_get_vector_types_for_stmt
15095 and vect_get_mask_type_for_stmt to calculate STMT_VINFO_VECTYPE.
15096 * tree-vect-loop.c (vect_determine_vf_for_stmt_1)
15097 (vect_determine_vf_for_stmt): New functions, split out from...
15098 (vect_determine_vectorization_factor): ...here.
15099 * tree-vect-stmts.c (vect_get_vector_types_for_stmt)
15100 (vect_get_mask_type_for_stmt): New functions, split out from
15101 vect_determine_vectorization_factor.
15103 2018-05-16 Richard Biener <rguenther@suse.de>
15105 * tree-cfg.c (verify_gimple_assign_ternary): Properly
15106 verify the [VEC_]COND_EXPR embedded comparison.
15108 2018-05-15 Martin Sebor <msebor@redhat.com>
15110 PR tree-optimization/85753
15111 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Handle
15112 RECORD_TYPE in addition to ARRAY_TYPE.
15114 2018-05-15 Martin Sebor <msebor@redhat.com>
15116 PR middle-end/85643
15117 * calls.c (get_attr_nonstring_decl): Handle MEM_REF.
15119 2018-05-15 Richard Biener <rguenther@suse.de>
15121 * tree-ssa-dse.c (dse_classify_store): Remove use_stmt parameter,
15122 add by_clobber_p one. Change algorithm to collect all defs
15123 representing uses we need to walk and try reducing them to
15124 a single one before failing.
15125 (dse_dom_walker::dse_optimize_stmt): Adjust.
15127 2018-05-13 Mark Wielaard <mark@klomp.org>
15129 * dwarf2out.c (dwarf_OP): Handle DW_OP_addrx and DW_OP_constx.
15130 (size_of_loc_descr): Likewise.
15131 (output_loc_operands): Likewise.
15132 (output_loc_operands_raw): Likewise.
15133 (dw_addr_op): Use dwarf_OP () for DW_OP_constx and DW_OP_addrx.
15134 (resolve_addr_in_expr): Handle DW_OP_addrx and DW_OP_constx.
15135 (hash_loc_operands): Likewise.
15136 (compare_loc_operands): Likewise.
15138 2018-05-14 Mark Wielaard <mark@klomp.org>
15140 * dwarf2out.c (count_index_addrs): New function.
15141 (dwarf2out_finish): Use count_index_addrs to calculate addrs_length.
15143 2018-05-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
15145 PR tree-optimization/83648
15146 * ipa-pure-const.c (malloc_candidate_p): Allow function with NULL
15147 return value as malloc candidate.
15149 2018-05-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
15152 * ipa-pure-const.c (warn_function_malloc): Pass value of known_finite
15153 param as true in call to suggest_attribute.
15155 2018-05-14 Segher Boessenkool <segher@kernel.crashing.org>
15157 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete @itemx for
15158 -mreadonly-in-sdata.
15160 2018-05-14 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
15162 * config/aarch64/aarch64-simd.md (*aarch64_crypto_aese_fused):
15164 (aarch64_crypto_aesd_fused): Likewise.
15166 2018-05-14 Wilco Dijkstra <wdijkstr@arm.com>
15168 * config/aarch64/aarch64.md (mov<mode>): Remove '*' in alternatives.
15169 (movsi_aarch64): Likewise.
15170 (load_pairsi): Likewise.
15171 (load_pairdi): Likewise.
15172 (store_pairsi): Likewise.
15173 (store_pairdi): Likewise.
15174 (load_pairsf): Likewise.
15175 (load_pairdf): Likewise.
15176 (store_pairsf): Likewise.
15177 (store_pairdf): Likewise.
15178 (zero_extend): Likewise.
15179 (trunc): Swap alternatives.
15180 (fcvt_target): Add '?' to prefer w over r.
15182 2018-05-14 Jakub Jelinek <jakub@redhat.com>
15185 * config/i386/i386.md: Disallow non-commutative arithmetics in
15186 last twpeephole for mem {+,-,&,|,^}= x; mem != 0 after cmpelim
15187 optimization. Use COMMUTATIVE_ARITH_P test rather than != MINUS
15188 in the peephole2 before it.
15190 2018-05-14 Sebastian Peryt <sebastian.peryt@intel.com>
15192 * common/config/i386/i386-common.c (OPTION_MASK_ISA_CLDEMOTE_SET,
15193 OPTION_MASK_ISA_CLDEMOTE_UNSET): New defines.
15194 (ix86_handle_option): Handle -mcldemote.
15195 * config.gcc: New header.
15196 * config/i386/cldemoteintrin.h: New file.
15197 * config/i386/cpuid.h (bit_CLDEMOTE): New bit.
15198 * config/i386/driver-i386.c (host_detect_local_cpu): Detect
15200 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
15201 OPTION_MASK_ISA_CLDEMOTE.
15202 * config/i386/i386.c (ix86_target_string): Add -mcldemote.
15203 (ix86_valid_target_attribute_inner_p): Ditto.
15204 (enum ix86_builtins): Add IX86_BUILTIN_CLDEMOTE.
15205 (ix86_init_mmx_sse_builtins): Define __builtin_ia32_cldemote.
15206 (ix86_expand_builtin): Expand IX86_BUILTIN_CLDEMOTE.
15207 * config/i386/i386.h (TARGET_CLDEMOTE, TARGET_CLDEMOTE_P): New.
15208 * config/i386/i386.md (UNSPECV_CLDEMOTE): New.
15210 * config/i386/i386.opt: Add -mcldemote.
15211 * config/i386/x86intrin.h: New header.
15212 * doc/invoke.texi: Add -mcldemote.
15214 2018-05-14 Richard Biener <rguenther@suse.de>
15216 * doc/match-and-simplify.texi: Adjust :s documentation.
15218 2018-05-14 Alexander Monakov <amonakov@ispras.ru>
15220 * sort.cc (REORDER_23): Pass the type for the temporaries instead of
15221 intended memcpy size.
15222 (REORDER_45): Likewise.
15224 2018-05-13 Alexander Monakov <amonakov@ispras.ru>
15226 * sort.cc: New file.
15227 * system.h [!CHECKING_P] (qsort): Redirect to gcc_qsort.
15228 * vec.c (qsort_chk): Use gcc_qsort.
15229 * Makefile.in (OBJS-libcommon): Add sort.o.
15230 (build/sort.o): New target. Use it...
15231 (BUILD_RTL): ... here, and...
15232 (build/gencfn-macros): ... here, and...
15233 (build/genmatch): ... here.
15235 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
15236 Chung-Ju Wu <jasonwucj@gmail.com>
15238 * config.gcc (nds32*-*-*): Check that n15 is valid to --with-cpu.
15239 * config/nds32/nds32-graywolf.md: New file.
15240 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_GRAYWOLF.
15241 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n15
15243 * config/nds32/nds32-protos.h: More declarations for n15 pipeline.
15244 * config/nds32/nds32-utils.c: More implementations for n15 pipeline.
15245 * config/nds32/nds32.md (pipeline_model): Add graywolf.
15246 * config/nds32/nds32.opt (mcpu): Support n15 pipeline cpus.
15247 * config/nds32/pipelines.md: Include n15 settings.
15249 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
15250 Chung-Ju Wu <jasonwucj@gmail.com>
15252 * config.gcc (nds32*-*-*): Check that n12/n13 are valid to --with-cpu.
15253 * config/nds32/nds32-n13.md: New file.
15254 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N12 and CPU_N13.
15255 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n12/n13
15257 * config/nds32/nds32-protos.h: More declarations for n12/n13 pipeline.
15258 * config/nds32/nds32.md (pipeline_model): Add n13.
15259 * config/nds32/nds32.opt (mcpu): Support n12/n13 pipeline cpus.
15260 * config/nds32/pipelines.md: Include n13 settings.
15262 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
15263 Chung-Ju Wu <jasonwucj@gmail.com>
15265 * config.gcc (nds32*-*-*): Check that n10/d10 are valid to --with-cpu.
15266 * config/nds32/nds32-n10.md: New file.
15267 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N10.
15268 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n10
15270 * config/nds32/nds32-protos.h: More declarations for n10 pipeline.
15271 * config/nds32/nds32-utils.c: More implementations for n10 pipeline.
15272 * config/nds32/nds32.md (pipeline_model): Add n10.
15273 * config/nds32/nds32.opt (mcpu): Support n10 pipeline cpus.
15274 * config/nds32/pipelines.md: Include n10 settings.
15276 2018-05-13 Monk Chiang <sh.chiang04@gmail.com>
15277 Kito Cheng <kito.cheng@gmail.com>
15278 Chung-Ju Wu <jasonwucj@gmail.com>
15280 * config.gcc (nds32be-*-*): Handle --with-ext-dsp.
15281 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
15282 Add enum values for DSP extension instructions.
15283 * config/nds32/constraints.md (Iu06, IU06, CVp5, CVs5, CVs2, CVhi):
15285 * config/nds32/iterators.md (shifts, shiftrt, sat_plus, all_plus,
15286 sat_minus, all_minus, plus_minus, extend, sumax, sumin, sumin_max):
15287 New code iterators.
15288 (su, zs, uk, opcode, add_rsub, add_sub): New code attributes.
15289 * config/nds32/nds32-dspext.md: New file for DSP implementation.
15290 * config/nds32/nds32-intrinsic.c: Implementation of DSP extension.
15291 * config/nds32/nds32-intrinsic.md: Likewise.
15292 * config/nds32/nds32_intrinsic.h: Likewise.
15293 * config/nds32/nds32-md-auxiliary.c: Likewise.
15294 * config/nds32/nds32-memory-manipulation.c: Consider DSP extension.
15295 * config/nds32/nds32-predicates.c (const_vector_to_hwint): New.
15296 (nds32_valid_CVp5_p, nds32_valid_CVs5_p): New.
15297 (nds32_valid_CVs2_p, nds32_valid_CVhi_p): New.
15298 * config/nds32/nds32-protos.h: New declarations for DSP extension.
15299 * config/nds32/nds32-utils.c (extract_mac_non_acc_rtx): New case
15300 TYPE_DMAC in switch statement.
15301 * config/nds32/nds32.c: New checking and implementation for DSP
15302 extension instructions.
15303 * config/nds32/nds32.h: Likewise.
15304 * config/nds32/nds32.md: Likewise.
15305 * config/nds32/nds32.opt (mhw-abs, mext-dsp): New options.
15306 * config/nds32/predicates.md: Implement new predicates for DSP
15309 2018-05-11 Michael Meissner <meissner@linux.vnet.ibm.com>
15311 * config/rs6000/rs6000.md (mov<mode>_softfloat, FMOVE32):
15312 Reformat alternatives and attributes so it is easier to identify
15313 which constraints/attributes go with which instruction.
15314 (mov<mode>_hardfloat32, FMOVE64): Likewise.
15315 (mov<mode>_softfloat32, FMOVE64): Likewise.
15316 (mov<mode>_hardfloat64, FMOVE64): Likewise.
15317 (mov<mode>_softfloat64, FMOVE64): Likewise.
15319 2018-05-11 Kelvin Nilsen <kelvin@gcc.gnu.org>
15321 * doc/extend.texi (PowerPC Built-in Functions): Rename this
15323 (Basic PowerPC Built-in Functions): The new name of the
15324 subsection previously known as "PowerPC Built-in Functions".
15325 (Basic PowerPC Built-in Functions Available on all Configurations):
15327 (Basic PowerPC Built-in Functions Available on ISA 2.05): Likewise.
15328 (Basic PowerPC Built-in Functions Available on ISA 2.06): Likewise.
15329 (Basic PowerPC Built-in Functions Available on ISA 2.07): Likewise.
15330 (Basic PowerPC Built-in Functions Available on ISA 3.0): Likewise.
15332 2018-05-11 Martin Jambor <mjambor@suse.cz>
15335 * ipa-cp.c (intersect_with_plats): Check that the lattice contains
15338 2018-05-11 Richard Earnshaw <rearnsha@arm.com>
15341 * config/arm/arm-cpus.in (fgroup ARMv6m): Add be8 feature.
15343 2018-05-11 Sebastian Peryt <sebastian.peryt@intel.com>
15345 * common/config/i386/i386-common.c (OPTION_MASK_ISA_WAITPKG_SET,
15346 OPTION_MASK_ISA_WAITPKG_UNSET): New defines.
15347 (ix86_handle_option): Handle -mwaitpkg.
15348 * config.gcc: New header.
15349 * config/i386/cpuid.h (bit_WAITPKG): New bit.
15350 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mwaitpkg.
15351 * config/i386/i386-builtin-types.def ((UINT8, UNSIGNED, UINT64)): New
15353 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
15354 OPTION_MASK_ISA_WAITPKG.
15355 * config/i386/i386.c (ix86_target_string): Add -mwaitpkg.
15356 (ix86_option_override_internal): Add PTA_WAITPKG.
15357 (ix86_valid_target_attribute_inner_p): Add -mwaitpkg.
15358 (enum ix86_builtins): Add IX86_BUILTIN_UMONITOR, IX86_BUILTIN_UMWAIT,
15359 IX86_BUILTIN_TPAUSE.
15360 (ix86_init_mmx_sse_builtins): Define __builtin_ia32_umonitor,
15361 __builtin_ia32_umwait and __builtin_ia32_tpause.
15362 (ix86_expand_builtin): Expand IX86_BUILTIN_UMONITOR,
15363 IX86_BUILTIN_UMWAIT, IX86_BUILTIN_TPAUSE.
15364 * config/i386/i386.h (TARGET_WAITPKG, TARGET_WAITPKG_P): New.
15365 * config/i386/i386.md (UNSPECV_UMWAIT, UNSPECV_UMONITOR,
15366 UNSPECV_TPAUSE): New.
15367 (umwait, umwait_rex64, umonitor_<mode>, tpause, tpause_rex64): New.
15368 * config/i386/i386.opt: Add -mwaitpkg.
15369 * config/i386/waitpkgintrin.h: New file.
15370 * config/i386/x86intrin.h: New header.
15371 * doc/invoke.texi: Add -mwaitpkg.
15373 2018-05-11 Richard Earnshaw <rearnsha@arm.com>
15376 * config/arm/arm-cpus.in: Add comment that ARMv6-m and ARMv6S-m are now
15378 (cortex-m0): Use armv6s-m isa.
15379 (cortex-m0plus): Likewise.
15380 (cortex-m1): Likewise.
15381 (cortex-m0.small-multiply): Likewise.
15382 (cortex-m0plus.small-multiply): Likewise.
15383 (cortex-m1.small-multiply): Likewise.
15385 2018-05-11 Allan Sandfeld Jensen <allan.jensen@qt.io>
15386 Jakub Jelinek <jakub@redhat.com>
15388 PR tree-optimization/85692
15389 * tree-ssa-forwprop.c (simplify_vector_constructor): Try two
15390 source permute as well.
15392 2018-05-11 Martin Liska <mliska@suse.cz>
15395 * doc/extend.texi: Document LLVM style format for no_sanitize
15398 2018-05-10 Michael Meissner <meissner@linux.vnet.ibm.com>
15400 * config/rs6000/rs6000.c (mode_supports_dq_form): Rename
15401 mode_supports_vsx_dform_quad to mode_supports_dq_form.
15402 (mode_supports_vsx_dform_quad): Likewise.
15403 (mode_supports_vmx_dform): Move these functions to be next to the
15404 other mode_supports functions.
15405 (mode_supports_dq_form): Likewise.
15406 (quad_address_p): Change calls of mode_supports_vsx_dform_quad to
15407 mode_supports_dq_form.
15408 (reg_offset_addressing_ok_p): Likewise.
15409 (offsettable_ok_by_alignment): Likewise.
15410 (rs6000_legitimate_offset_address_p): Likewise.
15411 (legitimate_lo_sum_address_p): Likewise.
15412 (rs6000_legitimize_address): Likewise.
15413 (rs6000_legitimize_reload_address): Likewise.
15414 (rs6000_secondary_reload_inner): Likewise.
15415 (rs6000_preferred_reload_class): Likewise.
15416 (rs6000_output_move_128bit): Likewise.
15418 2018-05-10 Uros Bizjak <ubizjak@gmail.com>
15420 * config/i386/i386.c (ix86_expand_builtin) <case IX86_BUILTIN_RDPID>:
15421 Generate SImode target register for null target.
15422 <case IX86_BUILTIN_XGETBV>: Ditto.
15423 <case IX86_BUILTIN_XSETBV>: Optimize LSHIFTRT generation.
15424 * config/i386/xsaveintrin.h (_xgetbv): Add missing return.
15426 2018-05-10 Carl Love <cel@us.ibm.com>
15428 * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
15429 dcbtt and dcbtstt if operands[2] is 0.
15431 2018-05-10 Uros Bizjak <ubizjak@gmail.com>
15434 * config/i386/sse.md (usadv64qi): New expander.
15436 2018-05-10 Segher Boessenkool <segher@kernel.crashing.org>
15438 * config/rs6000/altivec.md (altivec_vmrghb, altivec_vmrghh,
15439 altivec_vmrghw, altivec_vmrglb, altivec_vmrglh, altivec_vmrglw): Remove
15440 -maltivec=be support.
15441 (vec_widen_umult_even_v16qi, vec_widen_smult_even_v16qi,
15442 vec_widen_umult_even_v8hi, vec_widen_smult_even_v8hi,
15443 vec_widen_umult_even_v4si, vec_widen_smult_even_v4si,
15444 vec_widen_umult_odd_v16qi, vec_widen_smult_odd_v16qi,
15445 vec_widen_umult_odd_v8hi, vec_widen_smult_odd_v8hi,
15446 vec_widen_umult_odd_v4si, vec_widen_smult_odd_v4si, altivec_vpkpx,
15447 altivec_vpks<VI_char>ss, altivec_vpks<VI_char>us,
15448 altivec_vpku<VI_char>us, altivec_vpku<VI_char>um, altivec_vsum2sws,
15449 altivec_vsumsws): Adjust.
15450 (altivec_vspltb *altivec_vspltb_internal, altivec_vsplth,
15451 *altivec_vsplth_internal, altivec_vspltw, *altivec_vspltw_internal,
15452 altivec_vspltsf, *altivec_vspltsf_internal): Remove -maltivec=be
15454 (altivec_vperm_<mode>, altivec_vperm_<mode>_uns,
15455 altivec_vupkhs<VU_char>, altivec_vupkls<VU_char>, altivec_vupkhpx,
15456 altivec_vupklpx, altivec_lvsl, altivec_lvsr): Adjust.
15457 (altivec_lve<VI_char>x): Delete expand.
15458 (*altivec_lve<VI_char>x_internal): Rename to...
15459 (altivec_lve<VI_char>x): ... this.
15460 (altivec_lvxl_<mode>): Delete expand.
15461 (*altivec_lvxl_<mode>_internal): Rename to ...
15462 (altivec_lvxl_<mode>): ... this.
15463 (altivec_stvxl_<mode>): Delete expand.
15464 (*altivec_stvxl_<mode>_internal): Rename to ...
15465 (altivec_stvxl_<mode>): ... this.
15466 (altivec_stve<VI_char>x): Delete expand.
15467 (*altivec_stve<VI_char>x_internal): Rename to ...
15468 (altivec_stve<VI_char>x): ... this.
15469 (doublee<mode>2, unsdoubleev4si2, doubleo<mode>2, unsdoubleov4si2,
15470 doubleh<mode>2, unsdoublehv4si2, doublel<mode>2, unsdoublelv4si2,
15471 reduc_plus_scal_<mode>): Adjust.
15472 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Adjust
15474 (rs6000_cpu_cpp_builtins): Adjust.
15475 (altivec_resolve_overloaded_builtin): Remove -maltivec=be support.
15476 * config/rs6000/rs6000-protos.h (altivec_expand_lvx_be,
15477 altivec_expand_stvx_be, altivec_expand_stvex_be): Delete.
15478 * config/rs6000/rs6000.c (rs6000_option_override_internal): Remove
15479 -maltivec=be support.
15480 (rs6000_split_vec_extract_var): Adjust.
15481 (rs6000_split_v4si_init): Adjust.
15482 (swap_selector_for_mode): Delete.
15483 (altivec_expand_lvx_be, altivec_expand_stvx_be,
15484 altivec_expand_stvex_be): Delete.
15485 (altivec_expand_lv_builtin, altivec_expand_stv_builtin): Remove
15486 -maltivec=be support.
15487 (rs6000_gimple_fold_builtin): Ditto.
15488 (rs6000_generate_float2_double_code, rs6000_generate_float2_code):
15490 * config/rs6000/rs6000.h (VECTOR_ELT_ORDER_BIG): Delete.
15491 (TARGET_DIRECT_MOVE_64BIT): Adjust.
15492 * config/rs6000/rs6000.md (split for extendsidi2 for vectors): Adjust.
15493 * config/rs6000/rs6000.opt (maltivec=le, maltivec=be): Delete.
15494 * config/rs6000/vsx.md (floate<mode>, unsfloatev2di, floato<mode>,
15495 unsfloatov2di, vsignedo_v2df, vsignede_v2df, vunsignedo_v2df,
15496 vunsignede_v2df, vsx_extract_<mode>_p9, *vsx_extract_si,
15497 *vsx_extract_<mode>_p8, *vsx_extract_si_<uns>float_df,
15498 *vsx_extract_si_<uns>float_<mode>, vsx_set_<mode>_p9, vsx_set_v4sf_p9,
15499 *vsx_insert_extract_v4sf_p9, *vsx_insert_extract_v4sf_p9_2, and an
15500 anonymous split): Adjust.
15501 (vsx_mergel_<mode>, vsx_mergeh_<mode>): Remove -maltivec=be support.
15502 (vsx_xxspltd_<mode>, extract4b, insert4b): Adjust.
15504 2018-05-10 Eric Botcazou <ebotcazou@adacore.com>
15506 * configure.ac (gcc_gxx_include_dir_add_sysroot): Set it to 1 only
15507 when --with-gxx-include-dir is also specified.
15508 * configure: Regenerate.
15510 2018-05-09 Jim Wilson <jimw@sifive.com>
15513 * config.gcc (riscv*-*-*): Handle --with-multilib-list.
15514 * config/riscv/t-withmultilib: New.
15515 * config/riscv/withmultilib.h: New.
15516 * doc/install.texi: Document RISC-V --with-multilib-list support.
15518 2018-05-09 Richard Biener <rguenther@suse.de>
15520 * tree-vect-slp.c (vect_bb_slp_scalar_cost): Fill a cost
15522 (vect_bb_vectorization_profitable_p): Adjust. Compute
15523 actual scalar cost using the cost vector and the add_stmt_cost
15526 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
15528 PR rtl-optimization/85645
15529 * config/rs6000/rs6000.c (rs6000_emit_prologue_components): Put a SET
15530 in the REG_CFA_REGISTER note for LR, don't leave it empty.
15532 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
15534 PR rtl-optimization/85645
15535 * shrink-wrap.c (spread_components): Return a boolean saying if
15536 anything was changed.
15537 (try_shrink_wrapping_separate): Iterate spread_components until
15538 nothing changes anymore.
15540 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
15542 PR rtl-optimization/85645
15543 * regrename.c (build_def_use): Also kill the chains that include the
15544 destination of a REG_CFA_REGISTER note.
15546 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
15548 PR rtl-optimization/85645
15549 * regcprop.c (copyprop_hardreg_forward_1): Don't propagate into an
15550 insn that has a REG_CFA_REGISTER note.
15552 2018-05-09 Richard Sandiford <richard.sandiford@linaro.org>
15554 * cfgexpand.c (expand_clobber): New function.
15555 (expand_gimple_stmt_1): Use it.
15556 * tree-vect-stmts.c (vect_clobber_variable): New function,
15558 (vectorizable_simd_clone_call): ...here.
15559 (vectorizable_store): Emit a clobber either side of an
15560 IFN_STORE_LANES sequence.
15561 (vectorizable_load): Emit a clobber after an IFN_LOAD_LANES sequence.
15563 2018-05-09 Tom de Vries <tom@codesourcery.com>
15566 * config/nvptx/nvptx.md (define_insn "trap", define_insn "trap_if_true")
15567 (define_insn "trap_if_false"): Add exit after trap.
15569 2018-05-09 Eric Botcazou <ebotcazou@adacore.com>
15571 PR rtl-optimization/85638
15572 * bb-reorder.c: Include common/common-target.h.
15573 (create_forwarder_block): New function extracted from...
15574 (fix_up_crossing_landing_pad): ...here. Rename into...
15575 (dw2_fix_up_crossing_landing_pad): ...this.
15576 (sjlj_fix_up_crossing_landing_pad): New function.
15577 (find_rarely_executed_basic_blocks_and_crossing_edges): In SJLJ mode,
15578 call sjlj_fix_up_crossing_landing_pad if there are incoming EH edges
15579 from both partitions and exit the loop after one iteration.
15581 2018-05-08 Kelvin Nilsen <kelvin@gcc.gnu.org>
15584 * doc/extend.texi (PowerPC Built-in Functions): Rename this
15586 (Basic PowerPC Built-in Functions): The new name of the
15587 subsection previously known as "PowerPC Built-in Functions".
15588 (Basic PowerPC Built-in Functions Available on all Configurations):
15590 (Basic PowerPC Built-in Functions Available on ISA 2.05): New
15592 (Basic PowerPC Built-in Functions Available on ISA 2.06): New
15594 (Basic PowerPC Built-in Functions Available on ISA 2.07): New
15596 (Basic PowerPC Built-in Functions Available on ISA 3.0): New
15599 2018-05-08 Jim Wilson <jimw@sifive.com>
15601 * config/riscv/linux.h (MUSL_ABI_SUFFIX): Delete unnecessary backslash.
15602 (LD_EMUL_SUFFIX): New.
15603 (LINK_SPEC): Use it.
15605 2018-05-08 Kelvin Nilsen <kelvin@gcc.gnu.org>
15607 * doc/extend.texi (PowerPC Built-in Functions): Rename this
15609 (Basic PowerPC Built-in Functions): The new name of the
15610 subsection previously known as "PowerPC Built-in Functions".
15611 (Basic PowerPC Built-in Functions Available on all Configurations):
15613 (Basic PowerPC Built-in Functions Available on ISA 2.05): New
15615 (Basic PowerPC Built-in Functions Available on ISA 2.06): New
15617 (Basic PowerPC Built-in Functions Available on ISA 2.07): New
15619 (Basic PowerPC Built-in Functions Available on ISA 3.0): New
15622 2018-05-08 Jakub Jelinek <jakub@redhat.com>
15625 * config/i386/i386.md: Add peepholes for mem {+,-,&,|,^}= x; mem != 0
15626 after cmpelim optimization.
15628 2018-05-08 Olga Makhotina <olga.makhotina@intel.com>
15630 * config.gcc: Support "goldmont".
15631 * config/i386/driver-i386.c (host_detect_local_cpu): Detect "goldmont".
15632 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
15633 PROCESSOR_GOLDMONT.
15634 * config/i386/i386.c (m_GOLDMONT): Define.
15635 (processor_target_table): Add "goldmont".
15636 (PTA_GOLDMONT): Define.
15637 (ix86_lea_outperforms): Add TARGET_GOLDMONT.
15638 (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT.
15639 (fold_builtin_cpu): Add M_INTEL_GOLDMONT.
15640 (fold_builtin_cpu): Add "goldmont".
15641 (ix86_add_stmt_cost): Add TARGET_GOLDMONT.
15642 (ix86_option_override_internal): Add "goldmont".
15643 * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT.
15644 (processor_type): Add PROCESSOR_GOLDMONT.
15645 * config/i386/i386.md: Add CPU "glm".
15646 * config/i386/glm.md: New file.
15647 * config/i386/x86-tune.def: Add m_GOLDMONT.
15648 * doc/invoke.texi: Add goldmont as x86 -march=/-mtune= CPU type.
15650 2018-05-08 Jakub Jelinek <jakub@redhat.com>
15653 * config/i386/i386.c (ix86_expand_sse2_abs): Handle E_V2DImode and
15655 * config/i386/sse.md (abs<mode>2): Use VI_AVX2 iterator instead of
15656 VI1248_AVX512VL_AVX512BW. Handle V2DImode and V4DImode if not
15657 TARGET_AVX512VL using ix86_expand_sse2_abs. Formatting fixes.
15660 * config/i386/i386.c (ix86_fold_builtin): Handle
15661 IX86_BUILTIN_{,P}MOVMSK{PS,PD,B}{,128,256}.
15664 * config/i386/sse.md (ssequaterinsnmode): New mode attribute.
15665 (*<extract_type>_vinsert<shuffletype><extract_suf>_0): New pattern.
15667 2018-05-08 Richard Earnshaw <rearnsha@arm.com>
15670 * config/arm/parsecpu.awk (check_cpu): Fix operator precedence.
15671 (check_arch): Likewise.
15672 (check_fpu): Return the result rather than printing it.
15673 (end arch): Fix operator precedence.
15674 (end cpu): Likewise.
15675 (END): Print the result from check_fpu.
15677 2018-05-08 Richard Sandiford <richard.sandiford@linaro.org>
15678 Alan Hayward <alan.hayward@arm.com>
15679 David Sherwood <david.sherwood@arm.com>
15681 * config/aarch64/aarch64-sve.md (*pred_cmp<cmp_op><mode>_combine)
15682 (*pred_cmp<cmp_op><mode>, *fcm<cmp_op><mode>_and_combine)
15683 (*fcmuo<mode>_and_combine, *fcm<cmp_op><mode>_and)
15684 (*fcmuo<mode>_and): New patterns.
15686 2018-05-08 Richard Sandiford <richard.sandiford@linaro.org>
15688 * config/aarch64/iterators.md (UNSPEC_COND_LO, UNSPEC_COND_LS)
15689 (UNSPEC_COND_HI, UNSPEC_COND_HS, UNSPEC_COND_UO): Delete.
15690 (SVE_INT_CMP, SVE_FP_CMP): New code iterators.
15691 (cmp_op, sve_imm_con): New code attributes.
15692 (SVE_COND_INT_CMP, imm_con): Delete.
15693 (cmp_op): Remove above unspecs from int attribute.
15694 * config/aarch64/aarch64-sve.md (*vec_cmp<cmp_op>_<mode>): Rename
15696 (*cmp<cmp_op><mode>): ...this. Use UNSPEC_MERGE_PTRUE instead of
15697 comparison-specific unspecs.
15698 (*vec_cmp<cmp_op>_<mode>_ptest): Rename to...
15699 (*cmp<cmp_op><mode>_ptest): ...this and adjust likewise.
15700 (*vec_cmp<cmp_op>_<mode>_cc): Rename to...
15701 (*cmp<cmp_op><mode>_cc): ...this and adjust likewise.
15702 (*vec_fcm<cmp_op><mode>): Rename to...
15703 (*fcm<cmp_op><mode>): ...this and adjust likewise.
15704 (*vec_fcmuo<mode>): Rename to...
15705 (*fcmuo<mode>): ...this and adjust likewise.
15706 (*pred_fcm<cmp_op><mode>): New pattern.
15707 * config/aarch64/aarch64.c (aarch64_emit_unop, aarch64_emit_binop)
15708 (aarch64_emit_sve_ptrue_op, aarch64_emit_sve_ptrue_op_cc): New
15710 (aarch64_unspec_cond_code): Remove handling of LTU, GTU, LEU, GEU
15712 (aarch64_gen_unspec_cond, aarch64_emit_unspec_cond): Delete.
15713 (aarch64_emit_sve_predicated_cond): New function.
15714 (aarch64_expand_sve_vec_cmp_int): Use aarch64_emit_sve_ptrue_op_cc.
15715 (aarch64_emit_unspec_cond_or): Replace with...
15716 (aarch64_emit_sve_or_conds): ...this new function. Use
15717 aarch64_emit_sve_ptrue_op for the individual comparisons and
15718 aarch64_emit_binop to OR them together.
15719 (aarch64_emit_inverted_unspec_cond): Replace with...
15720 (aarch64_emit_sve_inverted_cond): ...this new function. Use
15721 aarch64_emit_sve_ptrue_op for the comparison and
15722 aarch64_emit_unop to invert the result.
15723 (aarch64_expand_sve_vec_cmp_float): Update after the above
15724 changes. Use aarch64_emit_sve_ptrue_op for native comparisons.
15726 2018-05-07 Nathan Sidwell <nathan@acm.org>
15728 * doc/invoke.texi (C++ Dialect Options): Remove -ffor-scope.
15729 * doc/extend.texi (Deprecated Features): Remove -fno-for-scope
15730 (Backwards Compatibility): Likewise.
15732 2018-05-07 Luis Machado <luis.machado@linaro.org>
15736 2018-05-07 Luis Machado <luis.machado@linaro.org>
15738 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
15739 <prefetch_dynamic_strides>: New const bool field.
15740 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
15741 prefetch_dynamic_strides.
15742 (exynosm1_prefetch_tune): Likewise.
15743 (thunderxt88_prefetch_tune): Likewise.
15744 (thunderx_prefetch_tune): Likewise.
15745 (thunderx2t99_prefetch_tune): Likewise.
15746 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
15748 (aarch64_override_options_internal): Update to set
15749 PARAM_PREFETCH_DYNAMIC_STRIDES.
15750 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
15751 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
15752 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
15753 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
15754 prefetch-dynamic-strides setting.
15756 2018-05-07 Luis Machado <luis.machado@linaro.org>
15758 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
15759 <minimum_stride>: New const int field.
15760 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
15761 minimum_stride field.
15762 (exynosm1_prefetch_tune): Likewise.
15763 (thunderxt88_prefetch_tune): Likewise.
15764 (thunderx_prefetch_tune): Likewise.
15765 (thunderx2t99_prefetch_tune): Likewise.
15766 (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
15767 (aarch64_override_options_internal): Update to set
15768 PARAM_PREFETCH_MINIMUM_STRIDE.
15769 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
15770 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
15771 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
15772 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
15773 stride is constant and is below the minimum stride threshold.
15775 2018-05-07 Luis Machado <luis.machado@linaro.org>
15777 * config/aarch64/aarch64.c (qdf24xx_prefetch_tune) <l2_cache_size>: Set
15780 2018-05-07 Luis Machado <luis.machado@linaro.org>
15782 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
15783 <prefetch_dynamic_strides>: New const bool field.
15784 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
15785 prefetch_dynamic_strides.
15786 (exynosm1_prefetch_tune): Likewise.
15787 (thunderxt88_prefetch_tune): Likewise.
15788 (thunderx_prefetch_tune): Likewise.
15789 (thunderx2t99_prefetch_tune): Likewise.
15790 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
15792 (aarch64_override_options_internal): Update to set
15793 PARAM_PREFETCH_DYNAMIC_STRIDES.
15794 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
15795 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
15796 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
15797 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
15798 prefetch-dynamic-strides setting.
15800 2018-05-07 Luis Machado <luis.machado@linaro.org>
15802 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
15803 <minimum_stride>: New const int field.
15804 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
15805 minimum_stride field.
15806 (exynosm1_prefetch_tune): Likewise.
15807 (thunderxt88_prefetch_tune): Likewise.
15808 (thunderx_prefetch_tune): Likewise.
15809 (thunderx2t99_prefetch_tune): Likewise.
15810 (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
15811 (aarch64_override_options_internal): Update to set
15812 PARAM_PREFETCH_MINIMUM_STRIDE.
15813 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
15814 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
15815 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
15816 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
15817 stride is constant and is below the minimum stride threshold.
15819 2018-05-06 Jakub Jelinek <jakub@redhat.com>
15822 * cfgexpand.c (expand_asm_stmt): Don't create a temporary if
15823 the type is addressable. Don't force op into register if it has
15826 2018-05-05 Roland McGrath <mcgrathr@google.com>
15829 * varasm.c (default_section_type_flags): Set SECTION_NOTYPE for
15830 any section for which we don't know a specific type it should have,
15831 regardless of name. Previously this was done only for the exact
15832 names ".init_array", ".fini_array", and ".preinit_array".
15833 (default_elf_asm_named_section): Add comment about
15834 relationship with default_section_type_flags and SECTION_NOTYPE.
15835 (get_section): Don't consider it a type conflict if one side has
15836 SECTION_NOTYPE and the other doesn't, as long as neither has the
15837 SECTION_BSS et al used in the default_section_type_flags logic.
15839 2018-05-05 Tom de Vries <tom@codesourcery.com>
15842 * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_3): Define.
15843 (workaround_barsyncs): New function.
15844 (nvptx_reorg): Use workaround_barsyncs.
15845 * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
15846 (define_expand "nvptx_membar_cta"): New define_expand.
15847 (define_insn "*nvptx_membar_cta"): New insn.
15849 2018-05-04 Pekka Jääskeläinen <pekka.jaaskelainen@parmance.com>
15851 * brig-builtins.def: Add consts to ptrs etc. in BRIG builtin defs.
15852 To improve optimization opportunities.
15853 * builtin-types.def: The new needed builtin types for the above.
15855 2018-05-04 Richard Biener <rguenther@suse.de>
15857 * bb-reorder.c (sanitize_hot_paths): Release hot_bbs_to_check.
15858 * gimple-ssa-store-merging.c
15859 (imm_store_chain_info::output_merged_store): Remove redundant create,
15860 release split_store vector contents on failure.
15861 * tree-vect-slp.c (vect_schedule_slp_instance): Avoid leaking
15862 scalar stmt vector on cache hit.
15864 2018-05-04 Segher Boessenkool <segher@kernel.crashing.org>
15866 * common/config/rs6000/rs6000-common.c (rs6000_handle_option): Remove
15868 * config.gcc (powerpc-xilinx-eabi*): Remove.
15869 * config/rs6000/predicates.md (easy_fp_constant): Remove Xilinx FP
15871 (fusion_addis_mem_combo_load): Ditto.
15872 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Remove Xilinx
15874 (rs6000_cpu_cpp_builtins): Ditto.
15875 * config/rs6000/rs6000-linux.c
15876 (rs6000_linux_float_exceptions_rounding_supported_p): Ditto.
15877 * config/rs6000/rs6000-opts.h (enum fpu_type_t): Delete.
15878 * config/rs6000/rs6000.c (rs6000_debug_reg_global): Remove Xilinx FP
15880 (rs6000_setup_reg_addr_masks): Ditto.
15881 (rs6000_init_hard_regno_mode_ok): Ditto.
15882 (rs6000_option_override_internal): Ditto.
15883 (legitimate_lo_sum_address_p): Ditto.
15884 (rs6000_legitimize_address): Ditto.
15885 (rs6000_legitimize_reload_address): Ditto.
15886 (rs6000_legitimate_address_p): Ditto.
15887 (abi_v4_pass_in_fpr): Ditto.
15888 (setup_incoming_varargs): Ditto.
15889 (rs6000_gimplify_va_arg): Ditto.
15890 (rs6000_split_multireg_move): Ditto.
15891 (rs6000_savres_strategy): Ditto.
15892 (rs6000_emit_prologue_components): Ditto.
15893 (rs6000_emit_epilogue_components): Ditto.
15894 (rs6000_emit_prologue): Ditto.
15895 (rs6000_emit_epilogue): Ditto.
15896 (rs6000_elf_file_end): Ditto.
15897 (rs6000_function_value): Ditto.
15898 (rs6000_libcall_value): Ditto.
15899 * config/rs6000/rs6000.h: Ditto.
15900 (TARGET_MINMAX_SF, TARGET_MINMAX_DF): Delete, merge to ...
15901 (TARGET_MINMAX): ... this. New.
15902 (TARGET_SF_FPR, TARGET_DF_FPR, TARGET_SF_INSN, TARGET_DF_INSN): Delete.
15903 * config/rs6000/rs6000.md: Remove Xilinx FP support.
15904 (*movsi_internal1_single): Delete.
15905 * config/rs6000/rs6000.opt (msingle-float, mdouble-float, msimple-fpu,
15906 mfpu=, mxilinx-fpu): Delete.
15907 * config/rs6000/singlefp.h: Delete.
15908 * config/rs6000/sysv4.h: Remove Xilinx FP support.
15909 * config/rs6000/t-rs6000: Ditto.
15910 * config/rs6000/t-xilinx: Delete.
15911 * config/rs6000/titan.md: Adjust for fp_type removal.
15912 * config/rs6000/vsx.md: Remove Xilinx FP support.
15913 (VStype_simple): Delete.
15914 (VSfptype_simple, VSfptype_mul, VSfptype_div, VSfptype_sqrt): Delete.
15915 * config/rs6000/xfpu.h: Delete.
15916 * config/rs6000/xfpu.md: Delete.
15917 * config/rs6000/xilinx.h: Delete.
15918 * config/rs6000/xilinx.opt: Delete.
15919 * doc/invoke.texi (RS/6000 and PowerPC Options): Remove
15920 -msingle-float, -mdouble-float, -msimple-fpu, -mfpu=, and -mxilinx-fpu.
15922 2018-05-04 Tom de Vries <tom@codesourcery.com>
15925 * builtins.c (expand_builtin_goacc_parlevel_id_size): Handle null target
15928 2018-05-04 Richard Biener <rguenther@suse.de>
15930 PR middle-end/85627
15931 * tree-complex.c (update_complex_assignment): We are always in SSA form.
15932 (expand_complex_div_wide): Likewise.
15933 (expand_complex_operations_1): Likewise.
15934 (expand_complex_libcall): Preserve EH info of the original stmt.
15935 (tree_lower_complex): Handle removed blocks.
15936 * tree.c (build_common_builtin_nodes): Do not set ECF_NOTRHOW
15937 on complex multiplication and division libcall builtins.
15939 2018-05-04 Richard Biener <rguenther@suse.de>
15941 PR middle-end/85574
15942 * fold-const.c (negate_expr_p): Restrict negation of operand
15943 zero of a division to when we know that can happen without
15945 (fold_negate_expr_1): Likewise.
15947 2018-05-04 Jakub Jelinek <jakub@redhat.com>
15950 * real.h (real_nextafter): Declare.
15951 * real.c (real_nextafter): New function.
15952 * fold-const-call.c (fold_const_nextafter): New function.
15953 (fold_const_call_sss): Call it for CASE_CFN_NEXTAFTER and
15954 CASE_CFN_NEXTTOWARD.
15955 (fold_const_call_1): For CASE_CFN_NEXTTOWARD call fold_const_call_sss
15956 even when arg1_mode is different from arg0_mode.
15958 2018-05-03 Nathan Sidwell <nathan@acm.org>
15960 * doc/extend.texi (Deprecated Features): Remove
15961 -ffriend-injection.
15962 (Backwards Compatibility): Likewise.
15963 * doc/invoke.texi (C++ Language Options): Likewise.
15964 (C++ Dialect Options): Likewise.
15966 2018-05-03 Jakub Jelinek <jakub@redhat.com>
15969 * config/i386/avx512fintrin.h (_mm512_mullox_epi64,
15970 _mm512_mask_mullox_epi64): New intrinsics.
15972 2018-05-03 Tom de Vries <tom@codesourcery.com>
15975 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
15976 dump files): Add offload-tree.
15978 2018-05-03 Richard Biener <rguenther@suse.de>
15980 PR tree-optimization/85615
15981 * tree-ssa-threadupdate.c (thread_block_1): Only allow exits
15982 to loops not nested in BBs loop father to avoid creating multi-entry
15985 2018-05-03 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
15987 PR tree-optimization/70291
15988 * tree-complex.c (expand_complex_libcall): Add type, inplace_p
15989 arguments. Change return type to tree. Emit libcall as a new
15990 statement rather than replacing existing one when inplace_p is true.
15991 (expand_complex_multiplication_components): New function.
15992 (expand_complex_multiplication): Expand floating-point complex
15993 multiplication using the above.
15994 (expand_complex_division): Rename inner_type parameter to type.
15995 Update expand_complex_libcall call-site.
15996 (expand_complex_operations_1): Update expand_complex_multiplication
15997 and expand_complex_division call-sites.
15999 2018-05-02 Jakub Jelinek <jakub@redhat.com>
16002 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
16003 *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
16004 *<shift_insn><dwi>3_doubleword_mask_1): In condition require that
16005 the highest significant bit of the shift count mask is clear. In
16006 check whether and[sq]i3 is needed verify that all significant bits
16007 of the shift count other than the highest are set.
16009 2018-05-02 Tom de Vries <tom@codesourcery.com>
16012 * builtins.def (DEF_GOACC_BUILTIN_ONLY): Define.
16013 * omp-builtins.def (BUILT_IN_GOACC_PARLEVEL_ID)
16014 (BUILT_IN_GOACC_PARLEVEL_SIZE): New builtin.
16015 * builtins.c (expand_builtin_goacc_parlevel_id_size): New function.
16016 (expand_builtin): Call expand_builtin_goacc_parlevel_id_size.
16017 * doc/extend.texi (Other Builtins): Add __builtin_goacc_parlevel_id and
16018 __builtin_goacc_parlevel_size.
16020 2018-05-02 Richard Biener <rguenther@suse.de>
16022 PR tree-optimization/85597
16023 * tree-vect-stmts.c (vectorizable_operation): For ternary SLP
16024 do not use split vect_get_vec_defs call but call vect_get_slp_defs
16027 2018-05-02 Tom de Vries <tom@codesourcery.com>
16030 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
16031 dump files): Add ltrans-tree.
16033 2018-05-02 Tom de Vries <tom@codesourcery.com>
16036 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
16037 dump files): Add wpa-ipa.
16039 2018-05-02 Segher Boessenkool <segher@kernel.crashing.org>
16041 * config.gcc (powerpc*-*-*): Remove paired.h. Unsupport the
16042 powerpc*-*-linux*paired* target.
16043 * config/rs6000/750cl.h: Delete.
16044 * config/rs6000/paired.h: Delete.
16045 * config/rs6000/paired.md: Delete.
16046 * config/rs6000/predicates.md (easy_vector_constant): Remove paired
16048 * config/rs6000/rs6000-builtin.def: Remove paired float support.
16049 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Update
16050 comment. Remove paired float support.
16051 * config/rs6000/rs6000-modes.def: Remove V2SF and V2SI.
16052 * config/rs6000/rs6000-opts.h (enum rs6000_vector): Delete
16054 * config/rs6000/rs6000-protos.h (paired_expand_vector_init,
16055 paired_emit_vector_cond_expr, paired_expand_vector_move): Delete
16057 * config/rs6000/rs6000.c: Remove paired float support.
16058 (paired_expand_vector_init, paired_expand_vector_move,
16059 paired_emit_vector_compare, paired_emit_vector_cond_expr,
16060 (paired_expand_lv_builtin, paired_expand_stv_builtin,
16061 paired_expand_builtin, paired_expand_predicate_builtin,
16062 paired_init_builtins): Delete.
16063 * config/rs6000/rs6000.h: Remove paired float support.
16064 * config/rs6000/rs6000.md: Remove paired float support.
16065 (move_from_CR_ov_bit): Delete.
16066 * config/rs6000/rs6000.opt (mpaired): Delete.
16067 * config/rs6000/t-rs6000: Remove paired.md from MD_INCLUDES.
16068 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mpaired.
16070 2018-05-02 Richard Biener <rguenther@suse.de>
16072 PR middle-end/85567
16073 * gimplify.c (gimplify_save_expr): When in SSA form allow
16074 SAVE_EXPRs to compute to SSA vars.
16076 2018-05-02 Jakub Jelinek <jakub@redhat.com>
16079 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
16080 *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
16081 *<shift_insn><dwi>3_doubleword_mask_1): If and[sq]i3 is needed, don't
16082 clobber operands[2], instead use a new pseudo. Formatting fixes.
16084 2018-05-02 Richard Sandiford <richard.sandiford@linaro.org>
16086 PR tree-optimization/85586
16087 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence): Only
16088 exit early for statements in the same group if the accesses are
16091 2018-05-02 Tom de Vries <tom@codesourcery.com>
16094 * lto-wrapper.c (compile_offload_image): Add "could not find mkoffload"
16097 2018-05-01 Marc Glisse <marc.glisse@inria.fr>
16099 PR tree-optimization/85143
16100 * match.pd (A<B&A<C): Extend to BIT_IOR_EXPR.
16102 2018-05-01 Tom de Vries <tom@codesourcery.com>
16105 * config/nvptx/mkoffload.c (main): Suggest using -B in "offload compiler
16106 not found" error message.
16108 2018-05-01 Tom de Vries <tom@codesourcery.com>
16111 * vec.h (VEC_ORDERED_REMOVE_IF, VEC_ORDERED_REMOVE_IF_FROM_TO): Define.
16112 * vec.c (test_ordered_remove_if): New function.
16113 (vec_c_tests): Call test_ordered_remove_if.
16114 * dwarf2cfi.c (connect_traces): Use VEC_ORDERED_REMOVE_IF_FROM_TO.
16115 * lto-streamer-out.c (prune_offload_funcs): Use VEC_ORDERED_REMOVE_IF.
16116 * tree-vect-patterns.c (vect_pattern_recog_1): Use
16117 VEC_ORDERED_REMOVE_IF.
16119 2018-05-01 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
16121 PR tree-optimization/82665
16122 * vr-values.c (vr_values::extract_range_from_binary_expr): Handle
16123 pointer subtraction where arguments come from a memchr call.
16125 2018-05-01 Jakub Jelinek <jakub@redhat.com>
16127 * configure.ac (LD_AS_NEEDED_OPTION, LD_NO_AS_NEEDED_OPTION): Use
16128 --push-state --as-needed and --pop-state instead of --as-needed and
16129 --no-as-needed if ld supports it.
16130 * configure: Regenerated.
16133 * doc/install.texi2html: Replace _002d with - and _002a with * in
16134 generated html files using sed.
16136 2018-04-30 David Malcolm <dmalcolm@redhat.com>
16139 * gcc-rich-location.c (blank_line_before_p): New function.
16140 (use_new_line): New function.
16141 (gcc_rich_location::add_fixit_insert_formatted): New function.
16142 * gcc-rich-location.h
16143 (gcc_rich_location::add_fixit_insert_formatted): New function.
16145 2018-04-30 David Malcolm <dmalcolm@redhat.com>
16147 * selftest.c (assert_streq): Rename "expected" and "actual" to
16148 "val1" and "val2". Extend NULL-handling to cover both inputs
16149 symmetrically, while still requiring both to be non-NULL for a pass.
16150 * selftest.h (assert_streq): Rename "expected" and "actual" to
16152 (ASSERT_EQ): Likewise.
16153 (ASSERT_EQ_AT): Likewise.
16154 (ASSERT_KNOWN_EQ): Likewise.
16155 (ASSERT_KNOWN_EQ_AT): Likewise.
16156 (ASSERT_NE): Likewise.
16157 (ASSERT_MAYBE_NE): Likewise.
16158 (ASSERT_MAYBE_NE_AT): Likewise.
16159 (ASSERT_STREQ): Likewise. Clarify that both must be non-NULL for
16160 the assertion to pass.
16161 (ASSERT_STREQ_AT): Likewise.
16163 2018-04-30 Jonathan Wakely <jwakely@redhat.com>
16165 * doc/invoke.texi (-fpie, -fPIE): Fix grammar and clarify
16166 interaction with -pie.
16168 2018-04-30 David Malcolm <dmalcolm@redhat.com>
16170 * selftest.h: Fix alphabetization of per-source-file selftest
16173 2018-04-30 Jason Merrill <jason@redhat.com>
16175 PR c++/61982 - dead stores to destroyed objects.
16176 * gimplify.c (gimplify_modify_expr): Simplify complex lvalue on LHS
16179 2018-04-30 Jason Merrill <jason@redhat.com>
16181 * tree.c (build_clobber): New.
16182 * tree.h: Declare it.
16183 * gimplify.c (gimplify_bind_expr, gimplify_target_expr): Use it.
16185 2018-04-30 David Malcolm <dmalcolm@redhat.com>
16187 * diagnostic-show-locus.c (layout::layout): Update for
16188 location_get_source_line returning a char_span.
16189 (struct char_span): Move to input.h.
16190 (struct correction): Update for fields in char_span becoming
16192 (struct source_line): Update for location_get_source_line
16193 returning a char_span.
16194 (layout::print_line): Likewise.
16195 * edit-context.c (edited_file::print_content): Likewise.
16196 (edited_file::print_diff_hunk): Likewise.
16197 (edited_file::print_run_of_changed_lines): Likewise.
16198 (edited_file::get_num_lines): Likewise.
16199 (edited_line::edited_line): Likewise.
16200 * final.c (asm_show_source): Likewise.
16201 * input.c (location_get_source_line): Convert return type
16202 from const char * to char_span, losing the final "line_len"
16204 (dump_location_info): Update for the above.
16205 (get_substring_ranges_for_loc): Likewise. Use a char_span
16206 when handling the literal within the line.
16207 (test_reading_source_line): Update for location_get_source_line
16208 returning a char_span.
16209 * input.h (class char_span): Move here from
16210 diagnostic-show-locus.c, converting from a struct to a class.
16211 Make data members private.
16212 (char_span::operator bool): New.
16213 (char_span::length): New.
16214 (char_span::get_buffer): New.
16215 (char_span::operator[]): New.
16216 (char_span::subspan): Make const.
16217 (char_span::xstrdup): New.
16218 (location_get_source_line): Convert return type from const char *
16219 to char_span, losing the final "line_size" param.
16221 2018-04-30 Jan Hubicka <jh@suse.cz>
16223 * lto-wrapper.c (ltrans_priorities): New static var.
16224 (cmp_priority): New.
16225 (run_gcc): Read priorities and if doing parallel build order
16226 the Makefile by them.
16228 2018-04-30 David Malcolm <dmalcolm@redhat.com>
16230 * input.h (builtins_location_check): Convert to a STATIC_ASSERT.
16232 2018-04-30 Richard Biener <rguenther@suse.de>
16234 * tree-cfg.c (verify_address): Remove base argument, add
16235 flag whether to check TREE_ADDRESSABLE and do that.
16236 (verify_expr): Remove.
16237 (verify_types_in_gimple_reference): Add pieces from verify_expr.
16238 (verify_gimple_assign_single): Likewise.
16239 (verify_gimple_switch): Likewise.
16240 (verify_expr_location_1): Dereference tp once. Add (disabled)
16241 piece from verify_expr.
16242 (verify_gimple_in_cfg): Do not call verify_expr on all ops.
16244 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
16246 * config/arc/linux.h (CLEAR_INSN_CACHE): Define.
16248 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
16250 * config/arc/arc-protos.h (prepare_extend_operands): Remove.
16251 (small_data_pattern): Likewise.
16252 (arc_rewrite_small_data): Likewise.
16253 * config/arc/arc.c (LEGITIMATE_SMALL_DATA_OFFSET_P): Remove.
16254 (LEGITIMATE_SMALL_DATA_ADDRESS_P): Likewise.
16255 (get_symbol_alignment): New function.
16256 (legitimate_small_data_address_p): Likewise.
16257 (legitimate_scaled_address): Update, call
16258 legitimate_small_data_address_p.
16259 (output_sdata): New static variable.
16260 (arc_print_operand): Update how we handle small data operands.
16261 (arc_print_operand_address): Likewise.
16262 (arc_legitimate_address_p): Update, use
16263 legitimate_small_data_address_p.
16264 (arc_rewrite_small_data_p): Remove.
16265 (arc_rewrite_small_data_1): Likewise.
16266 (arc_rewrite_small_data): Likewise.
16267 (small_data_pattern): Likewise.
16268 (compact_sda_memory_operand): Update to use
16269 legitimate_small_data_address_p and get_symbol_alignment.
16270 (prepare_move_operands): Don't rewite sdata pattern.
16271 (prepare_extend_operands): Remove.
16272 * config/arc/arc.md (zero_extendqihi2): Don't rewrite sdata
16274 (zero_extendqisi2): Likewise.
16275 (zero_extendhisi2): Likewise.
16276 (extendqihi2): Likewise.
16277 (extendqisi2): Likewise.
16278 (extendhisi2): Likewise.
16279 (addsi3): Likewise.
16280 (subsi3): Likewise.
16281 (andsi3): Likewise.
16282 * config/arc/constraints.md (Usd): Change it to memory constraint.
16284 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
16286 * config/arc/arc.c (arc_split_move): Allow signed 6-bit constants
16287 as source of std instructions.
16288 * config/arc/arc.md (movsi_insn): Update pattern predicate to
16289 allow 6-bit constants as source for store instructions.
16290 (movdi_insn): Update instruction pattern to allow 6-bit constants
16291 as source for store instructions.
16293 2018-04-30 Jonathan Wakely <jwakely@redhat.com>
16295 * doc/invoke.texi (-fdebug-types-section): Fix grammar.
16297 2018-04-30 Nathan Sidwell <nathan@acm.org>
16298 Sandra Loosemore <sandra@codesourcery.com>
16300 * dumpfile.c (dump_open): Allow '-' for stdout.
16301 * doc/invoke.texi (Developer Options): Document dump filename
16302 determination early. Document stdin/stdout selection.
16304 2018-04-30 Andrew Sadek <andrew.sadek.se@gmail.com>
16306 Microblaze Target: PIC data text relative
16308 * config/microblaze/microblaze.opt: add new option -mpic-data-text-rel.
16309 * config/microblaze/microblaze-protos.h (microblaze_constant_address_p):
16311 * config/microblaze/microblaze.h (microblaze_constant_address_p):
16312 CONSTANT_ADDRESS_P definition to microblaze_constant_address_p.
16313 * config/microblaze/microblaze.c (TARGET_PIC_DATA_TEXT_REL):
16314 New addressing mode for data-text relative position indepenedent code.
16315 (microblaze_classify_unspec): add 'UNSPEC_TEXT' case ->
16316 'ADDRESS_SYMBOLIC_TXT_REL'.
16317 (microblaze_classify_address): Add handling for UNSPEC + CONST_INT.
16318 (microblaze_legitimate_pic_operand): Exclude function calls from
16319 pic operands in case of TARGET_PIC_DATA_TEXT_REL option.
16320 (microblaze_legitimize_address): Generate 'UNSPEC_TEXT' for all possible
16322 (microblaze_address_insns): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
16323 (print_operand): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
16324 (print_operand_address): Add 'ADDRESS_SYMBOLIC_TXT_REL' case + handling
16325 for 'address + offset'.
16326 (microblaze_expand_prologue): Add new function prologue call for
16328 (microblaze_asm_generate_pic_addr_dif_vec): Override new target hook
16329 'TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC' to disable address diff vector
16330 table in case of TARGET_PIC_DATA_TEXT_REL.
16331 (expand_pic_symbol_ref): Add handling for 'UNSPEC_TEXT'.
16332 * config/microblaze/microblaze.md (TARGET_PIC_DATA_TEXT_REL):
16333 Add new macros 'UNSPEC_TEXT',
16334 'UNSPEC_SET_TEXT' + add rule for setting r20 in function prologue
16335 + exclude function calls from 'UNSPEC_PLT' in case of data text
16337 * doc/tm.texi.in (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
16338 new target hook for generating address diff vector tables in case of
16340 * doc/tm.texi : Regenerate.
16341 * stmt.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Append new condition
16342 'targetm.asm_out.generate_pic_addr_diff_vec' to flag_pic in case
16343 of addr diff vector generation.
16344 * target.def (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
16345 target hook definition.
16346 * targhooks.h, targhooks.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC):
16347 Add default function for generate_pic_addr_diff_vec -> flag_pic.
16348 * doc/invoke.texi (Add new pic option): Add new microblaze pic
16349 option for data text relative.
16351 2018-04-30 Richard Biener <rguenther@suse.de>
16353 * tree-chrec.h (evolution_function_is_constant_p): Remove
16355 * tree-cfg.c (tree_node_can_be_shared): Re-order checks.
16357 2018-04-30 Richard Biener <rguenther@suse.de>
16360 * dwarf2out.c (gen_producer_string): Ignore -fchecking[=].
16362 2018-04-30 Richard Biener <rguenther@suse.de>
16364 PR tree-optimization/28364
16365 PR tree-optimization/85275
16366 * tree-ssa-loop-ch.c (ch_base::copy_headers): Stop after
16367 copying first exit test.
16369 2018-04-28 Mark Wielaard <mark@klomp.org>
16371 * dwarf2out.c (dwarf2out_finish): Add .debug_addr table header for
16372 dwarf_version >= 5.
16373 (dwarf_AT): Handle DW_AT_addr_base.
16374 (add_top_level_skeleton_die_attrs): Use dwarf_AT for DW_AT_addr_base.
16376 2018-04-28 Uros Bizjak <ubizjak@gmail.com>
16379 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask): New pattern.
16380 (*ashl<dwi>3_doubleword_mask_1): Ditto.
16381 (*<shift_insn><dwi>3_doubleword_mask): Ditto.
16382 (*<shift_insn><dwi>3_doubleword_mask_1): Ditto.
16384 2018-04-28 Richard Biener <rguenther@suse.de>
16386 * tree-cfg.c (verify_gimple_phi): Take a gphi * argument.
16387 (verify_gimple_in_cfg): Rename visited_stmts to visited_throwing_stmts
16388 to reflect use. Only add interesting stmts.
16390 2018-04-27 Martin Jambor <mjambor@suse.cz>
16393 * ipa-cp.c (find_aggregate_values_for_callers_subset): Make sure
16394 the jump function allows for passing through aggregate values.
16396 2018-04-27 David Malcolm <dmalcolm@redhat.com>
16398 * input.h (in_system_header_at): Convert from macro to inline
16400 (from_macro_expansion_at): Likewise.
16401 (from_macro_definition_at): Likewise.
16403 2018-04-27 Jeff Law <law@redhat.com>
16405 * config.gcc: Mark tile* targets as deprecated/obsolete.
16407 2018-04-27 Richard Biener <rguenther@suse.de>
16409 * config/aarch64/aarch64.c: Simplify ap.__stack advance and
16412 2018-04-27 Richard Biener <rguenther@suse.de>
16414 * tree-cfg.c (verify_expr): Make dead code hit gcc_unreachable.
16416 2018-04-27 Uros Bizjak <ubizjak@gmail.com>
16418 * config/i386/i386.md (*movti_internal): Substitute Ye constraint
16419 with Yd constraint. Set "preferred_for_speed" attribute from
16420 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for alternatives
16421 with Yd constraint.
16422 (*movdi_internal): Ditto.
16423 (movti_interunit splitters): Remove
16424 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC from insn condition.
16425 (movdi_interunit splitters): Ditto.
16426 * config/i386/constraints.md (Ye): Remove.
16427 (Yd): Do not depend on TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC.
16429 2018-04-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
16432 * config/aarch64/constraints.md (Usg): Limit to 31.
16433 (Usj): Limit to 63.
16435 2018-04-27 Jakub Jelinek <jakub@redhat.com>
16437 PR tree-optimization/85529
16438 * tree-ssa-reassoc.c (optimize_range_tests_var_bound): Add FIRST_BB
16439 argument. Don't call get_nonzero_bits if opcode is ERROR_MARK_NODE,
16440 rhs2 def stmt's bb is dominated by first_bb and it isn't an obvious
16441 zero extension or masking of the MSB bit.
16442 (optimize_range_tests): Add FIRST_BB argument, pass it through
16443 to optimize_range_tests_var_bound.
16444 (maybe_optimize_range_tests, reassociate_bb): Adjust
16445 optimize_range_tests callers.
16447 2018-04-26 Richard Biener <rguenther@suse.de>
16448 Jakub Jelinek <jakub@redhat.com>
16450 * cgraph.h (symbol_table): Just declare debug method here.
16451 * symtab.c (symbol_table::debug): Define.
16453 2018-04-26 Eric Botcazou <ebotcazou@adacore.com>
16455 * loop-invariant.c (may_assign_reg_p): Return false for frame pointer.
16457 2018-04-26 Uros Bizjak <ubizjak@gmail.com>
16459 * config/i386/i386.md ("isa" attribute): Add x64_sse2.
16460 ("enabled" attribute): Handle x64_sse2 "isa" attribute.
16461 (*movdi_internal): Substitute Yi and Yj constraint with x
16462 and Ym and Yn constraint with y constraint. Update "isa"
16463 attribute and set "preferred_for_speed" attribute from
16464 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for updated alternatives.
16465 (*movsi_internal): Ditto.
16466 (*movdf_internal): Ditto.
16467 (*movsf_internal): Ditto.
16468 (*zero_extendsidi2): Ditto.
16469 * config/i386/sse.md (vec_set<mode>_0): Ditto.
16470 (sse2_loadld): Ditto.
16471 (*vec_extract<ssevecmodelower>_0): Ditto.
16472 (*vec_extractv4si_0_zext_sse4): Ditto.
16473 (vec_concatv2di): Ditto.
16474 (*vec_dup<mode>): Ditto.
16475 * config/i386/mmx.md (*mov<mode>_internal): Ditto.
16476 * config/i386/constraints.md (Yi): Remove.
16481 2018-04-26 Nathan Sidwell <nathan@acm.org>
16483 * dumpfile.c (dump_open): New.
16484 (dump_open_alternate_stream, dump_start, dump_begin): Call it.
16485 (dump_finish): Detect stdio/stderr by value not name.
16487 2018-04-26 Jonathan Wakely <jwakely@redhat.com>
16489 * doc/invoke.texi (-Wreturn-type): Document default status for C++.
16491 2018-04-26 Tom de Vries <tom@codesourcery.com>
16494 * config/nvptx/nvptx.c (verify_neutering_jumps)
16495 (verify_neutering_labels): New function
16496 (nvptx_single): Use verify_neutering_jumps and verify_neutering_labels.
16498 2018-04-26 Tom de Vries <tom@codesourcery.com>
16501 * config/nvptx/nvptx.c (needs_neutering_p): New function.
16502 (nvptx_single): Use needs_neutering_p to skip over insns that do not
16505 2018-04-26 Richard Biener <rguenther@suse.de>
16506 Tom de Vries <tom@codesourcery.com>
16509 * lto-streamer-out.c (output_function): Fixup loops if required to match
16510 discovery done in the reader.
16512 2018-04-26 Richard Biener <rguenther@suse.de>
16514 PR tree-optimization/85116
16515 * tree-ssa-loop-ch.c (do_while_loop_p): A do-while loop should
16516 have a loop exit from the single latch predecessor. Remove
16517 case of header with just condition.
16518 (ch_base::copy_headers): Exclude infinite loops from any
16520 (pass_ch::execute): Record exits.
16522 2018-04-26 Richard Biener <rguenther@suse.de>
16524 * tree-vect-data-refs.c (vect_get_data_access_cost): Get
16525 prologue cost vector and pass it to vect_get_load_cost.
16526 (vect_get_peeling_costs_all_drs): Likewise.
16527 (vect_peeling_hash_get_lowest_cost): Likewise.
16528 (vect_enhance_data_refs_alignment): Likewise.
16530 2018-04-26 Richard Biener <rguenther@suse.de>
16532 PR middle-end/85450
16533 * tree-cfg.c (verify_gimple_assign_unary): Restore proper
16534 checking of integer<->pointer conversions.
16535 * omp-expand.c (expand_omp_for_static_nochunk): Avoid
16536 sign-/zero-extending pointer types.
16537 (expand_omp_for_static_chunk): Likewise.
16539 2018-03-22 Hans-Peter Nilsson <hp@axis.com>
16540 Jean Lee <xiaoyur347@gmail.com>
16542 * config/mips/mips.c (mips_asan_shadow_offset): New function.
16543 (TARGET_ASAN_SHADOW_OFFSET): Define.
16544 * config/mips/mips.h (FRAME_GROWS_DOWNWARD): Augment to also be
16545 true for -fsanitize=address.
16547 2018-04-25 Mark Wielaard <mark@klomp.org>
16549 * dwarf2out.c (file_info_cmp): Sort longer dir prefixes before
16552 2018-04-25 Jakub Jelinek <jakub@redhat.com>
16554 * config/i386/i386.md (*x86_mov<mode>cc_0_m1): Use type "alu1" rather
16555 than "alu", remove explicit "memory" and "imm_disp" attributes.
16556 (*x86_mov<mode>cc_0_m1_se, *x86_mov<mode>cc_0_m1_neg): Likewise.
16558 PR middle-end/85414
16559 * simplify-rtx.c (simplify_unary_operation_1) <case SIGN_EXTEND,
16560 case ZERO_EXTEND>: Pass SUBREG_REG (op) rather than op to
16561 gen_lowpart_no_emit.
16563 2018-04-25 Sebastian Peryt <sebastian.peryt@intel.com>
16566 * config/i386/i386.c (ix86_expand_builtin): Change memory
16567 operand to XI, extend p0 to Pmode.
16568 * config/i386/i386.md: Change unspec volatile and operand
16569 1 mode to XI, change operand 0 mode to P.
16571 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
16573 * config/nds32/nds32-predicates.c (nds32_can_use_bclr_p): Mask with
16574 GET_MODE_MASK before any checking.
16575 (nds32_can_use_bset_p): Likewise.
16576 (nds32_can_use_btgl_p): Likewise.
16578 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
16580 * config/nds32/nds32-doubleword.md: New define_split pattern for
16581 illegal register number.
16583 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
16585 * config/nds32/nds32.c (nds32_print_operand): Set op_value ealier.
16587 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
16589 * config/nds32/nds32.h (ASM_APP_ON): Add missing newline character.
16591 2018-04-25 Richard Biener <rguenther@suse.de>
16593 * lto-streamer.h (LTO_major_version): Bump to 8.
16595 2018-04-25 Jakub Jelinek <jakub@redhat.com>
16597 * BASE-VER: Set to 9.0.0.
16599 2018-04-24 Segher Boessenkool <segher@kernel.crashing.org>
16601 * config/rs6000/rs6000.c (init_float128_ieee): Fix spelling mistakes
16602 in __abskf2 and __powikf2.
16604 2018-04-24 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
16607 * config/aarch64/constraints.md (Usg, Usj): New constraints.
16608 * config/aarch64/iterators.md (cmode_simd): New mode attribute.
16609 * config/aarch64/aarch64.md (*aarch64_ashr_sisd_or_int_<mode>3):
16610 Use the above on operand 2. Reindent.
16611 (*aarch64_lshr_sisd_or_int_<mode>3): Likewise.
16613 2018-04-24 H.J. Lu <hongjiu.lu@intel.com>
16616 * common/config/i386/i386-common.c (ix86_handle_option): Don't
16618 * config/i386/i386.opt (mcet): Removed.
16619 * doc/install.texi: Remove -mcet documentation.
16620 * doc/invoke.texi: Likewise.
16622 2018-04-24 H.J. Lu <hongjiu.lu@intel.com>
16625 * doc/install.texi: Remove -mcet from bootstrap-cet.
16627 2018-04-24 Jakub Jelinek <jakub@redhat.com>
16630 * config/i386/i386.c (ix86_init_mmx_sse_builtins): Don't define
16631 __builtin_ia32_readeflags_u32 and __builtin_ia32_writeeflags_u32
16635 * config/rs6000/rs6000-p8swap.c (const_load_sequence_p): Punt if
16636 const_vector is not CONST_VECTOR or SYMBOL_REF for a constant pool
16637 containing a CONST_VECTOR.
16639 2018-04-24 Cesar Philippidis <cesar@codesourcery.com>
16641 * doc/install.texi: Update newlib dependency for nvptx.
16643 2018-04-24 Jakub Jelinek <jakub@redhat.com>
16646 * config/i386/i386.c (ix86_expand_vector_init_one_var): Use UINTVAL
16647 instead of INTVAL when shifting x left.
16649 2018-04-24 Andreas Krebbel <krebbel@linux.ibm.com>
16651 PR tree-optimization/85478
16652 * tree-vect-loop.c (vect_analyze_loop_2): Do not call
16653 vect_grouped_store_supported for single element vectors.
16655 2018-04-24 Richard Biener <rguenther@suse.de>
16658 * config/i386/i386.c (ix86_add_stmt_cost): Restrict strided
16659 load cost increase to the case of non-constant step.
16661 2018-04-24 Jakub Jelinek <jakub@redhat.com>
16664 * reg-stack.c (move_for_stack_reg): Don't fail assertion about dead
16665 destination if any_malformed_asm.
16667 2018-04-23 Eric Botcazou <ebotcazou@adacore.com>
16669 PR middle-end/85496
16670 * expr.c (store_field): In the bitfield case, if the value comes from
16671 a function call and is returned in registers by means of a PARALLEL,
16672 do not change the mode of the temporary unless BLKmode and VOIDmode.
16674 2018-04-23 Andrey Belevantsev <abel@ispras.ru>
16676 PR rtl-optimization/85423
16677 * sel-sched-ir.c (has_dependence_note_mem_dep): Only discard
16678 dependencies to debug insns when the previous insn is non-debug.
16680 2018-04-23 Claudiu Zissulescu <claziss@synopsys.com>
16682 * config/arc/arc.md ("vunspec"): Delete it, unify all the unspec
16683 enums into a single definition.
16684 (fls): Fix predicates and printing.
16687 2018-04-23 Claudiu Zissulescu <claziss@synopsys.com>
16689 * config/arc/arc-protos.h (check_if_valid_sleep_operand): Remove.
16690 * config/arc/arc.c (arc_expand_builtin): Sleep accepts registers
16691 and short u6 immediate.
16692 (check_if_valid_sleep_operand): Remove.
16693 * config/arc/arc.md (Sleep): Accepts registers and u6 immediates.
16695 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
16697 * config/nds32/nds32.c (nds32_compute_stack_frame): Consider
16698 flag_always_save_lp condition.
16699 * config/nds32/nds32.opt (malways-save-lp): New option.
16701 2018-04-22 Shiva Chen <shiva0217@gmail.com>
16703 * config/nds32/nds32-protos.h (nds32_use_load_post_increment): Declare.
16704 * config/nds32/nds32.c (nds32_use_load_post_increment): New.
16705 * config/nds32/nds32.h
16706 (USE_LOAD_POST_INCREMENT, USE_LOAD_POST_DECREMENT): Define.
16707 (USE_STORE_POST_INCREMENT, USE_STORE_POST_DECREMENT): Define.
16709 2018-04-22 Shiva Chen <shiva0217@gmail.com>
16711 * config/nds32/nds32-protos.h (nds32_ls_333_p): Remove.
16712 * config/nds32/nds32.c (nds32_ls_333_p): Remove.
16714 2018-04-22 Shiva Chen <shiva0217@gmail.com>
16715 Chung-Ju Wu <jasonwucj@gmail.com>
16717 * config/nds32/nds32-protos.h (nds32_case_vector_shorten_mode):
16719 * config/nds32/nds32.c (nds32_case_vector_shorten_mode): New function.
16720 * config/nds32/nds32.h (CASE_VECTOR_SHORTEN_MODE): Modify.
16722 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
16724 * config/nds32/nds32.c (nds32_compute_stack_frame): Fix wrong value.
16726 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
16728 * config/nds32/nds32-protos.h (nds32_data_alignment,
16729 nds32_local_alignment): Declare.
16730 * config/nds32/nds32.c (nds32_data_alignment, nds32_constant_alignment,
16731 nds32_local_alignment): New functions.
16732 (TARGET_CONSTANT_ALIGNMENT): Define.
16733 * config/nds32/nds32.h (DATA_ALIGNMENT, LOCAL_ALIGNMENT): Define.
16735 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
16737 * config/nds32/nds32.c
16738 (TARGET_HARD_REGNO_MODE_OK): Move to the bottom of file.
16739 (TARGET_MODES_TIEABLE_P): Likewise.
16741 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
16743 * config/nds32/nds32.c (nds32_asm_file_start): Display optimization
16744 level Ofast and Og.
16746 2018-04-22 Monk Chiang <sh.chiang04@gmail.com>
16747 Chung-Ju Wu <jasonwucj@gmail.com>
16749 * config/nds32/constants.md (unspec_volatile_element): Add enum values
16750 for unaligned access.
16751 * config/nds32/nds32-intrinsic.c: Implementation of expanding
16753 * config/nds32/nds32-intrinsic.md: Likewise.
16754 * config/nds32/nds32_intrinsic.h: Likewise.
16755 * config/nds32/nds32.h (nds32_builtins): Likewise.
16756 * config/nds32/nds32.opt (munaligned-access): New option.
16757 * config/nds32/nds32.c (nds32_asm_file_start): Display
16758 flag_unaligned_access status.
16760 2018-04-20 Kito Cheng <kito.cheng@gmail.com>
16762 * config/riscv/elf.h (LINK_SPEC): Pass --no-relax if
16763 -mno-relax is present.
16764 * config/riscv/linux.h (LINK_SPEC): Ditto.
16766 2018-04-20 Martin Sebor <msebor@redhat.com>
16769 * gimple-fold.c (gimple_fold_builtin_strcpy): Suppress -Wrestrict
16771 (gimple_fold_builtin_stxcpy_chk): Same.
16772 * gimple-ssa-warn-restrict.c (check_bounds_or_overlap): Same.
16774 2018-04-20 Michael Meissner <meissner@linux.ibm.com>
16777 * config/rs6000/rs6000.c (init_float128_ieee): Add support to call
16778 __powikf2 when long double is IEEE 128-bit.
16780 2018-04-20 Kito Cheng <kito.cheng@gmail.com>
16782 * config/riscv/riscv.c (riscv_first_stack_step): Round up min
16783 step to make sure stack always aligned.
16785 2018-04-20 Carl Love <cel@us.ibm.com>
16788 * config/rs6000/rs6000-c.c (rs6000_gimple_fold_builtin): Add
16789 size check for arg0.
16791 2018-04-20 Nathan Sidwell <nathan@codesourcery.com>
16792 Tom de Vries <tom@codesourcery.com>
16795 * config/nvptx/nvptx.c (nvptx_emit_forking, nvptx_emit_joining):
16796 Emit insns for calls too.
16797 (nvptx_find_par): Always look for worker-level predecessor insn.
16798 (nvptx_propagate): Add is_call parm, return bool. Copy frame for
16800 (nvptx_vpropagate, nvptx_wpropagate): Adjust.
16801 (nvptx_process_pars): Propagate frames for calls.
16803 2018-04-20 H.J. Lu <hongjiu.lu@intel.com>
16806 * common/config/i386/i386-common.c (OPTION_MASK_ISA_IBT_SET):
16808 (OPTION_MASK_ISA_IBT_UNSET): Likewise.
16809 (ix86_handle_option): Don't handle OPT_mibt.
16810 * config/i386/cet.h: Check __CET__ instead of __IBT__ and
16812 * config/i386/driver-i386.c (host_detect_local_cpu): Remove
16814 * config/i386/i386-c.c (ix86_target_macros_internal): Don't
16815 check OPTION_MASK_ISA_IBT nor flag_cf_protection.
16816 (ix86_target_macros): Define __CET__ with flag_cf_protection
16817 for -fcf-protection.
16818 * config/i386/i386.c (isa2_opts): Remove -mibt.
16819 * config/i386/i386.h (TARGET_IBT): Removed.
16820 (TARGET_IBT_P): Likewise.
16821 (ix86_valid_target_attribute_inner_p): Don't check OPT_mibt.
16822 * config/i386/i386.md (nop_endbr): Don't check TARGET_IBT.
16823 * config/i386/i386.opt (mcet): Update help message.
16824 (mshstk): Likewise.
16826 * doc/invoke.texi: Remove -mibt. Document __CET__. Document
16827 -mcet as an alias for -mshstk.
16829 2018-04-20 Richard Biener <rguenther@suse.de>
16831 PR middle-end/85475
16832 * match.pd ((X * CST) * Y -> (X * Y) * CST): Avoid exponential
16833 complexity by forcing a single use of the multiply operand.
16835 2018-04-20 Martin Jambor <mjambor@suse.cz>
16838 * ipa-cp.c (cgraph_edge_brings_value_p): Move check for self-feeding
16839 recursion dependency to only apply to non-clones.
16841 2018-04-20 Martin Jambor <mjambor@suse.cz>
16844 * ipa-cp.c (create_specialized_node): Check that clones of
16845 self-recursive edges exist during IPA-CP.
16847 2018-04-19 Toon Moene <toon@moene.org>
16849 * doc/invoke.texi: Add -floop-unroll-and-jam to options enabled
16852 2018-04-19 Jakub Jelinek <jakub@redhat.com>
16854 PR tree-optimization/85467
16855 * fold-const.c (fold_ternary_loc) <case BIT_FIELD_REF>: Use
16856 VECTOR_TYPE_P macro. If type is vector type, VIEW_CONVERT_EXPR the
16857 VECTOR_CST element to type.
16859 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
16862 * config/i386/i386.h (STACK_SAVEAREA_MODE): New.
16863 * config/i386/i386.md (builtin_setjmp_setup): Removed.
16864 (builtin_longjmp): Likewise.
16865 (save_stack_nonlocal): New pattern.
16866 (restore_stack_nonlocal): Likewise.
16868 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
16871 * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
16872 Replace ASM_OUTPUT_LABEL with fprintf.
16874 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
16877 * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
16878 Check flag_cf_protection instead of TARGET_IBT and TARGET_SHSTK.
16879 * config/i386/i386-c.c (ix86_target_macros_internal): Also
16880 define __IBT__ and __SHSTK__ for -fcf-protection.
16881 * config/i386/i386.c (pass_insert_endbranch::gate): Don't check
16883 (ix86_trampoline_init): Likewise.
16884 (x86_output_mi_thunk): Likewise.
16885 (ix86_notrack_prefixed_insn_p): Likewise.
16886 (ix86_option_override_internal): Don't disallow -fcf-protection.
16887 * config/i386/i386.md (rdssp<mode>): Also enable for
16889 (incssp<mode>): Likewise.
16890 (nop_endbr): Likewise.
16891 * config/i386/i386.opt (mcet): Change help message to built-in
16894 (mshstk): Likewise.
16895 * doc/invoke.texi: Remove -mcet, -mibt and -mshstk condition
16896 on -fcf-protection. Change -mcet, -mibt and -mshstk to only
16897 enable CET built-in functions.
16899 2018-04-19 Sebastian Peryt <sebastian.peryt@intel.com>
16901 * common/config/i386/i386-common.c
16902 (OPTION_MASK_ISA_MOVDIRI_SET, OPTION_MASK_ISA_MOVDIR64B_SET,
16903 OPTION_MASK_ISA_MOVDIRI_UNSET,
16904 OPTION_MASK_ISA_MOVDIR64B_UNSET): New defines.
16905 (ix86_handle_option): Handle -mmovdiri and -mmovdir64b.
16906 * config.gcc (movdirintrin.h): New header.
16907 * config/i386/cpuid.h (bit_MOVDIRI,
16908 bit_MOVDIR64B): New bits.
16909 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mmovdiri
16911 * config/i386/i386-builtin-types.def ((VOID, PUNSIGNED, UNSIGNED),
16912 (VOID, PVOID, PCVOID)): New function types.
16913 * config/i386/i386-builtin.def (__builtin_ia32_directstoreu_u32,
16914 __builtin_ia32_directstoreu_u64,
16915 __builtin_ia32_movdir64b): New builtins.
16916 * config/i386/i386-c.c (__MOVDIRI__, __MOVDIR64B__): New.
16917 * config/i386/i386.c (ix86_target_string): Added -mmovdir64b
16919 (ix86_valid_target_attribute_inner_p): Ditto.
16920 (ix86_expand_special_args_builtin): Added VOID_FTYPE_PUNSIGNED_UNSIGNED
16921 and VOID_FTYPE_PUNSIGNED_UNSIGNED.
16922 (ix86_expand_builtin): Expand IX86_BUILTIN_MOVDIR64B.
16923 * config/i386/i386.h (TARGET_MOVDIRI, TARGET_MOVDIRI_P,
16924 TARGET_MOVDIR64B, TARGET_MOVDIR64B_P): New.
16925 * config/i386/i386.md (UNSPECV_MOVDIRI, UNSPECV_MOVDIR64B): New.
16926 (movdiri<mode>, movdir64b_<mode>): New.
16927 * config/i386/i386.opt: Add -mmovdiri and -mmovdir64b.
16928 * config/i386/immintrin.h: Include movdirintrin.h.
16929 * config/i386/movdirintrin.h: New file.
16930 * doc/invoke.texi: Added -mmovdiri and -mmovdir64b.
16932 2018-04-19 Richard Biener <rguenther@suse.de>
16934 PR middle-end/85455
16935 * cfg.c (clear_bb_flags): When loop state says we have
16936 marked irreducible regions also preserve BB_IRREDUCIBLE_LOOP.
16938 2018-04-19 Richard Biener <rguenther@suse.de>
16940 PR tree-optimization/84737
16941 * tree-vect-data-refs.c (vect_copy_ref_info): New function
16942 copying restrict info.
16943 (vect_setup_realignment): Use it.
16944 * tree-vectorizer.h (vect_copy_ref_info): Declare.
16945 * tree-vect-stmts.c (vectorizable_store): Copy ref info from
16946 the first DR to all generated stores.
16947 (vectorizable_load): Likewise for loads.
16949 2018-04-19 Jakub Jelinek <jakub@redhat.com>
16951 PR tree-optimization/85446
16952 * match.pd ((intptr_t) x eq/ne CST to x eq/ne (typeof x) cst): Require
16953 the integral and pointer types to have the same precision.
16955 * doc/install.texi: Document --disable-cet being the default and
16958 2018-04-18 Martin Liska <mliska@suse.cz>
16960 * ipa-devirt.c (odr_subtypes_equivalent_p): Fix GNU coding
16963 2018-04-18 Martin Liska <mliska@suse.cz>
16966 2018-03-02 Eric Botcazou <ebotcazou@adacore.com>
16969 * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
16970 arguments if they are comparable.
16972 2018-04-18 Martin Liska <mliska@suse.cz>
16975 2018-03-13 Eric Botcazou <ebotcazou@adacore.com>
16978 * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
16981 2018-04-18 H.J. Lu <hongjiu.lu@intel.com>
16984 * config/i386/i386.c (ix86_expand_split_stack_prologue): Insert
16985 ENDBR after calling __morestack.
16987 2018-04-18 David Malcolm <dmalcolm@redhat.com>
16990 * configure.ac (gcc-driver-name.h): Honor --with-gcc-major-version
16991 by using gcc_base_ver to generate a gcc_driver_version, and use
16992 it when generating GCC_DRIVER_NAME.
16993 * configure: Regenerate.
16995 2018-04-18 Jakub Jelinek <jakub@redhat.com>
16998 * config.gcc: Obsolete powerpc*-*-*spe*.
17000 2018-04-17 Jakub Jelinek <jakub@redhat.com>
17003 * dbxout.c (dbxout_int): Perform negation in unsigned int type.
17004 (stabstr_D): Change type of unum from unsigned int to
17005 unsigned HOST_WIDE_INT. Perform negation in unsigned HOST_WIDE_INT
17008 2018-04-17 Jim Wilson <jimw@sifive.com>
17011 * config/riscv/riscv.c (riscv_compute_frame_info): Add calls to
17012 RISCV_STACK_ALIGN when using outgoing_args_size and pretend_args_size.
17013 Set arg_pointer_offset after using pretend_args_size.
17015 2018-04-17 Jakub Jelinek <jakub@redhat.com>
17017 PR rtl-optimization/85431
17018 * dse.c (record_store): Ignore zero width stores.
17021 * asan.c (handle_builtin_stack_restore): Adjust comment. Emit
17022 __asan_allocas_unpoison call and last_alloca_addr = new_sp before
17023 __builtin_stack_restore rather than after it.
17024 * builtins.c (expand_asan_emit_allocas_unpoison): Pass
17025 arg1 + (virtual_dynamic_stack_rtx - stack_pointer_rtx) as second
17026 argument instead of virtual_dynamic_stack_rtx.
17028 2018-04-17 Kelvin Nilsen <kelvin@gcc.gnu.org>
17030 * config/rs6000/rs6000-protos.h (rs6000_builtin_is_supported_p):
17032 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
17033 Add note to error message to explain internal mapping of overloaded
17034 built-in function name to non-overloaded built-in function name.
17035 * config/rs6000/rs6000.c (rs6000_builtin_is_supported_p): New
17038 2018-04-17 Michael Meissner <meissner@linux.vnet.ibm.com>
17041 * config/rs6000/rs6000.md (pack<mode>): Do not try handle a pack
17042 where the inputs overlap with the output.
17044 2018-04-17 Jakub Jelinek <jakub@redhat.com>
17046 * config/i386/sse.md (vec_extract_lo_<mode><mask_name>): Add
17047 (=v, v) alternative and explicit "memory" attribute.
17048 (vec_extract_lo_<mode><mask_name>): Likewise. Also add
17049 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
17051 (vec_extract_lo_<mode><mask_name>): Add (=v, v) alternative and use
17052 "sselog1" type instead of "sselog".
17053 (vec_extract_hi_<mode><mask_name>): Use "sselog1" type instead of
17054 "sselog". Remove explicit "memory" attribute.
17055 (vec_extract_lo_v32hi): Add (=v, v) alternative and explicit "memory",
17056 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
17058 (vec_extract_hi_v32hi): Merge all alternatives into one, use
17059 "sselog1" type instead of "sselog". Remove explicit "memory"
17061 (vec_extract_hi_v16hi): Merge each pair of alternatives into one,
17062 use "sselog1" type instead of "sselog". Remove explicit "memory"
17064 (vec_extract_lo_v64qi): Add (=v, v) alternative and explicit "memory",
17065 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
17067 (vec_extract_hi_v64qi): Merge all alternatives into one, use
17068 "sselog1" type instead of "sselog". Remove explicit "memory"
17070 (vec_extract_hi_v32qi): Merge each pair of alternatives into one,
17071 use "sselog1" type instead of "sselog". Remove explicit "memory"
17075 * config/i386/i386.md (*ashlqi3_1_slp): Use alu1 type instead of alu.
17077 PR middle-end/85414
17078 * rtlhooks.c (gen_lowpart_if_possible): Don't call gen_lowpart_SUBREG
17081 2018-04-17 Martin Jambor <mjambor@suse.cz>
17084 * ipa-cp.c (create_specialized_node): Call
17085 expand_all_artificial_thunks if necessary.
17087 2018-04-17 Martin Liska <mliska@suse.cz>
17090 * ipa-devirt.c (odr_types_equivalent_p): Remove trailing
17091 in message, remote space in between '_G' and '('.
17093 2018-04-17 Jakub Jelinek <jakub@redhat.com>
17096 * config/i386/sse.md (reduces<mode><mask_scalar_name>,
17097 avx512f_vmcmp<mode>3<round_saeonly_name>,
17098 avx512f_vmcmp<mode>3_mask<round_saeonly_name>,
17099 avx512f_sgetexp<mode><mask_scalar_name><round_saeonly_scalar_name>,
17100 avx512f_rndscale<mode><round_saeonly_name>,
17101 avx512dq_ranges<mode><mask_scalar_name><round_saeonly_scalar_name>,
17102 avx512f_vgetmant<mode><mask_scalar_name><round_saeonly_scalar_name>):
17103 Use %<iptr>2 instead of %2 for -masm=intel.
17104 (avx512f_vcvtss2usi<round_name>, avx512f_vcvtss2usiq<round_name>,
17105 avx512f_vcvttss2usi<round_saeonly_name>,
17106 avx512f_vcvttss2usiq<round_saeonly_name>): Use %k1 instead of %1 for
17108 (avx512f_vcvtsd2usi<round_name>, avx512f_vcvtsd2usiq<round_name>,
17109 avx512f_vcvttsd2usi<round_saeonly_name>,
17110 avx512f_vcvttsd2usiq<round_saeonly_name>, ufloatv2siv2df2<mask_name>):
17111 Use %q1 instead of %1 for -masm=intel.
17112 (avx512f_sfixupimm<mode><sd_maskz_name><round_saeonly_name>,
17113 avx512f_sfixupimm<mode>_mask<round_saeonly_name>): Use %<iptr>3 instead
17114 of %3 for -masm=intel.
17115 (sse2_shufpd_v2df_mask): Fix a typo, change %{6%} to %{%6%} for
17117 (*avx512vl_<code>v2div2qi2_store): Use %w0 instead of %0 for
17119 (*avx512vl_<code><mode>v4qi2_store): Use %k0 instead of %0 for
17121 (avx512vl_<code><mode>v4qi2_mask_store): Use a single pattern with
17122 %k0 and %1 for -masm=intel rather than two patterns, one with %0 and
17124 (*avx512vl_<code><mode>v8qi2_store): Use %q0 instead of %0 for
17126 (avx512vl_<code><mode>v8qi2_mask_store): Use a single pattern with
17127 %q0 and %1 for -masm=intel rather than two patterns, one with %0 and
17128 %g1 and one with %0 and %1.
17129 (avx512er_vmrcp28<mode><round_saeonly_name>,
17130 avx512er_vmrsqrt28<mode><round_saeonly_name>): Use %<iptr>1 instead of
17131 %1 for -masm=intel.
17132 (avx5124fmaddps_4fmaddps_mask, avx5124fmaddps_4fmaddss_mask,
17133 avx5124fmaddps_4fnmaddps_mask, avx5124fmaddps_4fnmaddss_mask,
17134 avx5124vnniw_vp4dpwssd_mask, avx5124vnniw_vp4dpwssds_mask): Swap order
17135 of %0 and %{%4%} for -masm=intel.
17136 (avx5124fmaddps_4fmaddps_maskz, avx5124fmaddps_4fmaddss_maskz,
17137 avx5124fmaddps_4fnmaddps_maskz, avx5124fmaddps_4fnmaddss_maskz,
17138 avx5124vnniw_vp4dpwssd_maskz, avx5124vnniw_vp4dpwssds_maskz): Swap
17139 order of %0 and %{%5%}%{z%} for -masm=intel.
17141 2018-04-17 Jan Hubicka <jh@suse.cz>
17144 * ipa-devirt.c (odr_types_equivalent_p): Handle bit fields.
17146 2018-04-17 Martin Liska <mliska@suse.cz>
17149 * multiple_target.c (create_dispatcher_calls): Set apostrophes
17150 for target_clone error message. Make default implementation
17151 clone to be a local declaration.
17152 (separate_attrs): Add new argument and check for an empty
17154 (expand_target_clones): Handle it.
17155 (ipa_target_clone): Make redirection just for target_clones
17158 2018-04-16 Cesar Philippidis <cesar@codesourcery.com>
17159 Tom de Vries <tom@codesourcery.com>
17161 PR middle-end/84955
17162 * omp-expand.c (expand_oacc_for): Add dummy false branch for
17163 tiled basic blocks without omp continue statements.
17165 2018-04-16 Aaron Sawdey <acsawdey@linux.ibm.com>
17168 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Mark
17169 vec_extract expression as having side effects to make sure it gets
17172 2018-04-16 H.J. Lu <hongjiu.lu@intel.com>
17175 * config/i386/i386.c (get_builtin_code_for_version): Check
17178 2018-04-16 Olga Makhotina <olga.makhotina@intel.com>
17181 * config.gcc: Support "skylake".
17182 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
17184 * config/i386/i386.c (m_SKYLAKE): Define.
17185 (processor_target_table): Add "skylake".
17186 (ix86_option_override_internal): Add "skylake".
17187 (get_builtin_code_for_version): Handle PROCESSOR_SKYLAKE,
17188 PROCESSOR_CANNONLAKE.
17189 (get_builtin_code_for_version): Fix priority for
17190 PROCESSOR_ICELAKE_CLIENT, PROCESSOR_ICELAKE_SERVER,
17191 PROCESSOR_SKYLAKE-AVX512.
17192 * config/i386/i386.h (processor_costs): Define TARGET_SKYLAKE.
17193 (processor_type): Add PROCESSOR_SKYLAKE.
17195 2018-04-16 Paolo Carlini <paolo.carlini@oracle.com>
17196 Jason Merrill <jason@redhat.com>
17199 * convert.c (convert_to_integer_1): Use direct recursion for
17200 enumeral types and types with a precision less than the number
17201 of bits in their mode.
17203 2018-04-16 Julia Koval <julia.koval@intel.com>
17206 * config/i386/x86-tune.def (X86_TUNE_SSE_UNALIGNED_LOAD_OPTIMAL,
17207 X86_TUNE_SSE_UNALIGNED_STORE_OPTIMAL): Add m_SKYLAKE_AVX512
17209 2018-04-14 Segher Boessenkool <segher@kernel.crashing.org>
17212 * config/rs6000/rs6000.opt (mdirect-move): Make deprecated.
17213 * doc/invoke.texi (RS/6000 and PowerPC Options): Remove -mdirect-move
17214 and -mno-direct-move.
17216 2018-04-13 Paul A. Clarke <pc@us.ibm.com>
17219 * config/rs6000/emmintrin.h (_mm_slli_epi{16,32,64}):
17220 Ensure that vec_splat_s32 is only called with 0 <= shift < 16.
17221 Ensure negative shifts result in {0}.
17223 2018-04-13 Vladimir Makarov <vmakarov@redhat.com>
17225 PR rtl-optimization/79916
17226 * config/rs6000/rs6000.c (rs6000_emit_move): Use assigned hard
17227 regs (if any) to define how to gnerate SD moves when LRA is in
17230 2018-04-13 Jakub Jelinek <jakub@redhat.com>
17232 PR rtl-optimization/85393
17233 * except.h (expand_dw2_landing_pad_for_region): Remove declaration.
17234 * except.c (expand_dw2_landing_pad_for_region): Make static.
17235 * bb-reorder.c (fix_up_crossing_landing_pad): In new_bb emit just
17236 a label and unconditional jump to old_bb, rather than
17237 expand_dw2_landing_pad_for_region insn(s) and jump to single_succ
17240 PR rtl-optimization/85376
17241 * simplify-rtx.c (simplify_const_unary_operation): For CLZ and CTZ and
17242 zero op0, if C?Z_DEFINED_VALUE_AT_ZERO is false, return NULL_RTX
17243 instead of a specific value.
17245 2018-04-13 Jan Hubicka <hubicka@ucw.cz>
17246 Bin Cheng <bin.cheng@arm.com>
17248 PR tree-optimization/82965
17249 PR tree-optimization/83991
17250 * cfgloopanal.c (expected_loop_iterations_unbounded): Add
17251 by_profile_only parameter.
17252 * cfgloopmanip.c (scale_loop_profile): Further scale loop's profile
17253 information if the loop was predicted to iterate too many times.
17254 * cfgloop.h (expected_loop_iterations_unbounded): Update prototype
17256 2018-04-13 Jan Hubicka <hubicka@ucw.cz>
17259 * config/i386/i386.c (ix86_can_inline_p): Allow safe transitions for
17262 2018-04-13 Martin Liska <mliska@suse.cz>
17263 Jakub Jelinek <jakub@redhat.com>
17265 PR middle-end/81657
17266 * expr.h (enum block_op_methods): Add BLOCK_OP_NO_LIBCALL_RET.
17267 * expr.c (emit_block_move_hints): Handle BLOCK_OP_NO_LIBCALL_RET.
17268 * builtins.c (expand_builtin_memory_copy_args): Use
17269 BLOCK_OP_NO_LIBCALL_RET method for mempcpy with non-ignored target,
17270 handle dest_addr == pc_rtx.
17272 2018-04-12 Segher Boessenkool <segher@kernel.crashing.org>
17275 * config/rs6000/rs6000.md (fix_trunc<mode>si2): Use legacy code if
17276 asked to not generate direct moves.
17277 (fix_trunc<mode>si2_stfiwx): Similar.
17278 (fix_trunc<mode>si2_internal): Similar.
17280 2018-04-12 Jakub Jelinek <jakub@redhat.com>
17283 * var-tracking.c (add_stores): Handle STRICT_LOW_PART SET_DEST.
17284 * cselib.c (cselib_record_sets): For STRICT_LOW_PART dest,
17285 lookup if dest in some wider mode is known to be const0_rtx and
17286 if so, record permanent equivalence for it to be ZERO_EXTEND of
17287 the narrower mode destination.
17289 2018-04-12 Cesar Philippidis <cesar@codesourcery.com>
17291 * lto-streamer-out.c (output_function): Revert 259346.
17292 * omp-expand.c (expand_oacc_for): Likewise.
17294 2018-04-12 Alexander Monakov <amonakov@ispras.ru>
17296 PR rtl-optimization/85354
17297 * sel-sched-ir.c (sel_init_pipelining): Move cfg_cleanup call...
17298 * sel-sched.c (sel_global_init): ... here.
17300 2018-04-12 Eric Botcazou <ebotcazou@adacore.com>
17303 * lto-wrapper.c (debug_objcopy): Open the files in binary mode.
17304 * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
17305 mode for PE-COFF targets.
17306 * config/i386/i386-protos.h (i386_pe_asm_lto_start): Declare.
17307 (i386_pe_asm_lto_end): Likewise.
17308 * config/i386/cygming.h (TARGET_ASM_LTO_START): Define.
17309 (TARGET_ASM_LTO_END): Likewise.
17310 * config/i386/winnt.c (saved_debug_info_level): New static variable.
17311 (i386_pe_asm_lto_start): New function.
17312 (i386_pe_asm_lto_end): Likewise.
17314 2018-04-12 Cesar Philippidis <cesar@codesourcery.com>
17315 Richard Biener <rguenther@suse.de>
17317 PR middle-end/84955
17318 * lto-streamer-out.c (output_function): Fix CFG loop state before
17320 * omp-expand.c (expand_oacc_for): Handle calls to internal
17321 functions like regular functions.
17323 2018-04-12 Richard Biener <rguenther@suse.de>
17326 * dwarf2out.c (init_sections_and_labels): Use debug_line_section[_label]
17327 for the early LTO debug to properly generate references to it
17328 during DIE emission. Do not re-use that for the skeleton for
17330 (dwarf2out_early_finish): Likewise.
17332 2018-04-12 Jakub Jelinek <jakub@redhat.com>
17335 * config/i386/sse.md
17336 (<mask_codefor>avx512dq_vextract<shuffletype>64x2_1<mask_name> split,
17337 <mask_codefor>avx512f_vextract<shuffletype>32x4_1<mask_name> split,
17338 vec_extract_lo_<mode><mask_name> split, vec_extract_lo_v32hi,
17339 vec_extract_lo_v64qi): For non-AVX512VL if input is xmm16+ reg
17340 and output is a reg, avoid creating invalid lowpart subreg, but
17341 instead split into a 512-bit move. Don't split if not AVX512VL,
17342 input is xmm16+ reg and output is a mem.
17343 (vec_extract_lo_<mode><mask_name>, vec_extract_lo_v32hi,
17344 vec_extract_lo_v64qi): Don't require split if not AVX512VL, input is
17345 xmm16+ reg and output is a mem.
17347 2018-04-12 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
17349 * config/s390/s390.c (s390_output_indirect_thunk_function): Check
17350 also for flag_dwarf2_cfi_asm.
17352 2018-04-12 Jakub Jelinek <jakub@redhat.com>
17354 PR rtl-optimization/85342
17355 * regcprop.c (copyprop_hardreg_forward_1): Remove replaced array, use
17356 a bool scalar var inside of the loop instead. Don't try to update
17357 recog_data.operand after failed apply_change_group.
17359 2018-04-12 Tom de Vries <tom@codesourcery.com>
17362 * config/nvptx/nvptx.c (flexible_array_member_type_p): New function.
17363 (nvptx_assemble_decl_begin): Add undefined param. Declare undefined
17364 array with flexible array member as array without given dimension.
17365 (nvptx_assemble_undefined_decl): Set nvptx_assemble_decl_begin call
17366 argument for undefined param to true.
17368 2018-04-11 Aaron Sawdey <acsawdey@linux.ibm.com>
17371 * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
17372 -mcall- and -mtraceback=. Remove options -mabi=spe and -mabi=no-spe
17373 from PowerPC section.
17374 * config/rs6000/sysv4.opt (mcall-): Improve help text.
17375 * config/rs6000/rs6000.opt (mblock-compare-inline-limit=): Trim
17376 help text that is too long.
17377 * config/rs6000/rs6000.opt (mblock-compare-inline-loop-limit=): Trim
17378 help text that is too long.
17379 * config/rs6000/rs6000.opt (mstring-compare-inline-limit=): Trim
17380 help text that is too long.
17382 2018-04-11 Uros Bizjak <ubizjak@gmail.com>
17384 * config/alpha/alpha.md (stack_probe_internal): Rename
17385 from "probe_stack". Update all callers.
17387 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
17389 PR rtl-optimization/84566
17390 * sched-deps.c (sched_analyze_insn): Check deps->readonly when invoking
17391 sched_macro_fuse_insns.
17393 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
17396 * sched-rgn.c (add_branch_dependences): Move sel_sched_p check here...
17397 (compute_block_dependences): ... from here.
17399 2018-04-11 Jakub Jelinek <jakub@redhat.com>
17401 PR tree-optimization/85331
17402 * vec-perm-indices.h (vec_perm_indices::clamp): Change input type
17403 from int to HOST_WIDE_INT.
17405 2018-04-11 Martin Jambor <mjambor@suse.cz>
17408 * ipa-cp.c (propagate_vals_across_pass_through): Expand comment.
17409 (cgraph_edge_brings_value_p): New parameter dest_val, check if it is
17410 not the same as the source val.
17411 (cgraph_edge_brings_value_p): New parameter.
17412 (gather_edges_for_value): Pass destination value to
17413 cgraph_edge_brings_value_p.
17414 (perhaps_add_new_callers): Likewise.
17415 (get_info_about_necessary_edges): Likewise and exclude values brought
17416 only by self-recursive edges.
17417 (create_specialized_node): Redirect only clones of self-calling edges.
17418 (+self_recursive_pass_through_p): New function.
17419 (find_more_scalar_values_for_callers_subset): Use it.
17420 (find_aggregate_values_for_callers_subset): Likewise.
17421 (known_aggs_to_agg_replacement_list): Removed.
17422 (decide_whether_version_node): Re-calculate known constants for all
17423 remaining context clones.
17425 2018-04-11 Richard Biener <rguenther@suse.de>
17428 * dwarf2out.c (dwarf2out_finish): Remove DW_AT_stmt_list attribute
17429 from early DWARF output.
17430 (dwarf2out_early_finish): Output line info unconditionally into
17431 early DWARF and add reference to it.
17433 2018-04-11 Jakub Jelinek <jakub@redhat.com>
17436 * config/i386/sse.md (iptr): Add V16SFmode and V8DFmode cases.
17437 (<avx512>_vec_dup<mode><mask_name>): Use a single pattern for modes
17438 other than V2DFmode using iptr mode attribute.
17439 (<avx512>_vec_dup<mode><mask_name>): Use iptr mode attribute.
17441 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
17443 PR rtl-optimization/84659
17444 * sel-sched-ir.c (sel_init_pipelining): Invoke cleanup_cfg.
17446 2018-04-11 Jakub Jelinek <jakub@redhat.com>
17449 * dwarf2out.c (skip_loc_list_entry): Don't call size_of_locs if
17451 (output_loc_list): Pass address of a dummy size variable even in the
17452 locview handling loop.
17453 (index_location_lists): Add comment on why skip_loc_list_entry can't
17456 2018-04-11 Thomas Preud'homme <thomas.preudhomme@arm.com>
17459 * config/arm/arm-builtins.c (arm_expand_builtin): Force input operand
17462 2018-04-10 Aaron Sawdey <acsawdey@linux.ibm.com>
17465 * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
17466 -mblock-compare-inline-limit, -mblock-compare-inline-loop-limit,
17467 and -mstring-compare-inline-limit.
17469 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
17472 * config/rs6000/rs6000.md (allocate_stack): Put the residual size
17473 for stack clash protection in a register whenever we need it to be in
17476 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
17478 * common/config/rs6000/rs6000-common.c (rs6000_option_init_struct):
17479 Enable -fasynchronous-unwind-tables by default if OBJECT_FORMAT_ELF.
17481 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
17484 * config/rs6000/rs6000.opt (mtraceback=): Show the allowed values in
17486 (mlong-double-): Ditto.
17487 * config/rs6000/sysv4.opt (msdata=): Ditto.
17488 (mtls-size=): Ditto.
17490 2018-04-10 Kelvin Nilsen <kelvin@gcc.gnu.org>
17492 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
17493 erroneous entries for
17494 "vector int vec_ldl (int, long int *)", and
17495 "vector unsigned int vec_ldl (int, unsigned long int *)".
17496 Add comments and entries for
17497 "vector bool char vec_ldl (int, bool char *)",
17498 "vector bool short vec_ldl (int, bool short *)",
17499 "vector bool int vec_ldl (int, bool int *)",
17500 "vector bool long long vec_ldl (int, bool long long *)",
17501 "vector pixel vec_ldl (int, pixel *)",
17502 "vector long long vec_ldl (int, long long *)",
17503 "vector unsigned long long vec_ldl (int, unsigned long long *)".
17504 * config/rs6000/rs6000.c (rs6000_init_builtins): Initialize new
17505 type tree bool_long_long_type_node and correct definition of
17506 bool_V2DI_type_node to make reference to this new type tree.
17507 (rs6000_mangle_type): Replace erroneous reference to
17508 bool_long_type_node with bool_long_long_type_node.
17509 * config/rs6000/rs6000.h (enum rs6000_builtin_type_index): Add
17510 comments to emphasize sign distinctions for char and int types and
17511 replace RS6000_BTI_bool_long constant with
17512 RS6000_BTI_bool_long_long constant. Also add comment to restrict
17513 use of RS6000_BTI_pixel.
17514 (bool_long_type_node): Remove this macro definition.
17515 (bool_long_long_type_node): New macro definition
17517 2018-04-10 Jakub Jelinek <jakub@redhat.com>
17519 PR rtl-optimization/85300
17520 * combine.c (subst): Handle subst of CONST_SCALAR_INT_P new_rtx also
17521 into FLOAT and UNSIGNED_FLOAT like ZERO_EXTEND, return a CLOBBER if
17522 simplify_unary_operation fails.
17524 2018-04-10 Martin Liska <mliska@suse.cz>
17526 * gdbhooks.py: Add pretty-printers for varpool_node, symtab_node,
17527 cgraph_edge and ipa_ref.
17529 2018-04-10 Jakub Jelinek <jakub@redhat.com>
17533 * config/i386/sse.md
17534 (<extract_type>_vinsert<shuffletype><extract_suf>_mask): Fix
17535 computation of the VEC_MERGE selector from mask.
17536 (<extract_type>_vinsert<shuffletype><extract_suf>_1<mask_name>):
17537 Fix decoding of the VEC_MERGE selector into mask.
17539 2018-04-10 Richard Sandiford <richard.sandiford@linaro.org>
17541 PR tree-optimization/85286
17542 * tree-vect-data-refs.c (vect_get_smallest_scalar_type):
17544 2018-04-10 Richard Sandiford <richard.sandiford@linaro.org>
17546 * final.c (final_1): Set insn_last_address as well as
17547 insn_current_address.
17549 2018-04-10 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
17552 * explow.c (emit_stack_probe): Call validize_mem on memory location
17553 before passing it to gen_probe_stack. Create address operand and
17554 legitimize it for the probe_stack_address case.
17556 2018-04-09 Jan Hubicka <jh@suse.cz>
17559 * ipa-devirt.c (rebuild_type_inheritance-hash): New.
17560 * ipa-utils.h (rebuild_type_inheritance-hash): Declare.
17561 * tree.c (free_lang_data_in_type): Fix handling of binfos;
17563 (free_lang_data): Rebuild type inheritance graph.
17565 2018-04-09 Martin Sebor <msebor@redhat.com>
17567 * invoke.texi (-finline-small-functions): Mention other optimization
17569 (-findirect-inlining, -fpartial-inlining): Same.
17570 (-finline-functions-called-once): Same.
17571 (-freorder-blocks-and-partition): Same.
17573 2018-04-09 Jan Hubicka <jh@suse.cz>
17576 * cfgcleanup.c (try_forward_edges): Do not give up on crossing
17577 jumps; choose last target that matches the criteria (i.e.
17578 no partition changes for non-crossing jumps).
17579 * cfgrtl.c (cfg_layout_redirect_edge_and_branch): Add basic
17580 support for redirecting crossing jumps to non-crossing.
17582 2018-04-09 Alexey Brodkin <abrodkin@synopsys.com>
17584 * config/arc/arc.c (arc_expand_prologue): Set stack usage info
17585 also for naked functions.
17587 2018-04-09 Claudiu Zissulescu <claziss@synopsys.com>
17589 * config/arc/arc.md (add_shift): New pattern.
17590 (add_shift2): Likewise.
17591 (sub_shift): Likewise.
17592 (sub_shift_cmp0_noout): Likewise.
17593 (compare_si_ashiftsi): Likewise.
17594 (xbfu_cmp0_noout): New combine pattern.
17595 (xbfu_cmp0"): Likewise.
17596 (movsi_set_cc_insn): Place the predicable variant first.
17597 (commutative_binary_cmp0_noout): Remove clobber.
17598 (commutative_binary_cmp0): New pattern.
17599 (noncommutative_binary_cmp0): Likewise.
17600 (noncommutative_binary_cmp0_noout): Likewise.
17601 (noncommutative_binary_comparison_result_used): Removed.
17602 (rsub_cmp0): New pattern.
17603 (rsub_cmp0_noout): Likewise.
17604 (extzvsi): Changed, keep only meaningful variants.
17605 (SQH, SEZ): New iterators.
17606 (SQH_postfix): New mode attribute.
17607 (SEZ_prefix): New code attribute.
17608 (<SEZ_prefix>xt<SQH_postfix>_cmp0_noout): New instruction pattern.
17609 (<SEZ_prefix>xt<SQH_postfix>_cmp0): Likewise.
17610 * config/arc/predicates.md (cc_set_register): Use CC_REG instead
17611 of numerical value.
17612 (noncommutative_operator): Check the availability of barrel
17615 2018-04-09 Richard Biener <rguenther@suse.de>
17617 PR tree-optimization/85284
17618 * tree-ssa-loop-niter.c (number_of_iterations_exit_assumptions):
17619 Only use the niter constraining form of simple_iv when the exit
17620 is always executed.
17622 2018-04-09 Tom de Vries <tom@codesourcery.com>
17625 * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
17626 (define_expand "*memory_barrier"): New define_expand.
17627 (define_insn "memory_barrier"): New insn.
17629 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
17631 PR rtl-optimization/80463
17632 PR rtl-optimization/83972
17633 PR rtl-optimization/83480
17635 * sel-sched-ir.c (has_dependence_note_mem_dep): Take into account the
17636 correct producer for the insn.
17637 (tidy_control_flow): Fixup seqnos in case of debug insns.
17639 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
17641 PR rtl-optimization/83913
17643 * sel-sched-ir.c (merge_expr_data): Choose the middle between two
17644 different sched-times when merging exprs.
17646 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
17648 PR rtl-optimization/83962
17650 * sel-sched-ir.c (tidy_control_flow): Correct the order in which we call
17651 tidy_fallthru_edge and tidy_control_flow.
17653 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
17655 PR rtl-optimization/83530
17657 * sel-sched.c (force_next_insn): New global variable.
17658 (remove_insn_for_debug): When force_next_insn is true, also leave only
17659 next insn in the ready list.
17660 (sel_sched_region): When the region wasn't scheduled, make another pass
17661 over it with force_next_insn set to 1.
17663 2018-04-08 Monk Chiang <sh.chiang04@gmail.com>
17665 * config.gcc (nds32le-*-*, nds32be-*-*): Add nds32/nds32_intrinsic.h
17667 * config/nds32/constants.md (unspec_volatile_element): Add enum values
17668 for interrupt control.
17669 * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
17670 functions for interrupt control.
17671 * config/nds32/nds32-intrinsic.md: Likewise.
17672 * config/nds32/nds32_intrinsic.h: Likewise.
17673 * config/nds32/nds32.h (nds32_builtins): Likewise.
17675 2018-04-08 Chung-Ju Wu <jasonwucj@gmail.com>
17677 * config/nds32/nds32.c (nds32_init_machine_status,
17678 nds32_legitimate_index_p, nds32_legitimate_address_p): Consider
17679 strict_aligned_p field.
17680 (nds32_expand_to_rtl_hook): New function.
17681 (TARGET_EXPAND_TO_RTL_HOOK): Define.
17682 * config/nds32/nds32.h (machine_function): Add strict_aligned_p field.
17684 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
17685 Chung-Ju Wu <jasonwucj@gmail.com>
17687 * config.gcc (nds32*-*-*): Check that n7 is valid to --with-cpu.
17688 * config/nds32/nds32-n7.md: New file.
17689 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N7.
17690 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n7
17692 * config/nds32/nds32-protos.h: More declarations for n7 pipeline.
17693 * config/nds32/nds32.md (pipeline_model): Add n7.
17694 * config/nds32/nds32.opt (mcpu): Support n7 pipeline cpus.
17695 * config/nds32/pipelines.md: Include n7 settings.
17697 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
17698 Chung-Ju Wu <jasonwucj@gmail.com>
17700 * config.gcc (nds32*-*-*): Check that e8 is valid to --with-cpu.
17701 * config/nds32/nds32-e8.md: New file.
17702 * config/nds32/nds32-opts.h (nds32-cpu_type): Add CPU_E8.
17703 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for e8
17705 * config/nds32/nds32-protos.h: More declarations for e8 pipeline.
17706 * config/nds32/nds32.md (pipeline_model): Add e8.
17707 * config/nds32/nds32.opt (mcpu): Support e8 pipeline cpus.
17708 * config/nds32/pipelines.md: Include e8 settings.
17710 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
17711 Chung-Ju Wu <jasonwucj@gmail.com>
17713 * config.gcc (nds32*-*-*): Check that n6/n8/s8 are valid to --with-cpu.
17714 * config/nds32/nds32-n8.md: New file.
17715 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N6 and CPU_N8.
17716 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n8
17718 * config/nds32/nds32-protos.h: More declarations for n8 pipeline.
17719 * config/nds32/nds32-utils.c: More implementations for n8 pipeline.
17720 * config/nds32/nds32.md (pipeline_model): Add n8.
17721 * config/nds32/nds32.opt (mcpu): Support n8 pipeline cpus.
17722 * config/nds32/pipelines.md: Include n8 settings.
17724 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
17725 Chung-Ju Wu <jasonwucj@gmail.com>
17727 * config.gcc (nds32*): Add nds32-utils.o into extra_objs.
17728 * config/nds32/nds32-n9-2r1w.md: New file.
17729 * config/nds32/nds32-n9-3r2w.md: New file.
17730 * config/nds32/nds32-opts.h (nds32_cpu_type, nds32_mul_type,
17731 nds32_register_ports): New or modify for cpu n9.
17732 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n9
17734 * config/nds32/nds32-protos.h: More declarations for n9 pipeline.
17735 * config/nds32/nds32-utils.c: New file.
17736 * config/nds32/nds32.h (TARGET_PIPELINE_N9, TARGET_PIPELINE_SIMPLE,
17737 TARGET_MUL_SLOW): Define.
17738 * config/nds32/nds32.md (pipeline_model): New attribute.
17739 * config/nds32/nds32.opt (mcpu, mconfig-mul, mconfig-register-ports):
17740 New options that support cpu n9.
17741 * config/nds32/pipelines.md: Include n9 settings.
17742 * config/nds32/t-nds32 (nds32-utils.o): Add dependency.
17744 2018-04-08 Chung-Ju Wu <jasonwucj@gmail.com>
17746 * config/nds32/nds32-md-auxiliary.c (output_cond_branch): Output align
17747 information if necessary.
17748 (output_cond_branch_compare_zero): Likewise.
17749 * config/nds32/nds32.c (nds32_adjust_insn_length): Consider align case.
17750 (nds32_target_alignment): Refine for alignment.
17751 * config/nds32/nds32.h (NDS32_ALIGN_P): Define.
17752 (FUNCTION_BOUNDARY): Modify.
17753 * config/nds32/nds32.md (call_internal, call_value_internal): Consider
17755 * config/nds32/nds32.opt (malways-align, malign-functions): New.
17757 2018-04-08 Monk Chiang <sh.chiang04@gmail.com>
17759 * config/nds32/constants.md (unspec_volatile_element): Add values for
17760 TLB operation and data prefetch.
17761 * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
17762 functions for TLB operation and data prefetch.
17763 * config/nds32/nds32-intrinsic.md: Likewise.
17764 * config/nds32/nds32_intrinsic.h: Likewise.
17765 * config/nds32/nds32.c (nds32_dpref_names): Likewise.
17766 (nds32_print_operand): Likewise.
17767 * config/nds32/nds32.h (nds32_builtins): Likewise.
17769 2018-04-07 Thomas Koenig <tkoenig@gcc.gnu.org>
17770 Andrew Pinski <pinsika@gcc.gnu.org>
17772 PR middle-end/82976
17773 * match.pd: Use constant_boolean_node of correct type instead of
17774 boolean_true_node or boolean_false_node for simplifying
17775 pointer comparisons to zero.
17777 2018-04-07 Jakub Jelinek <jakub@redhat.com>
17779 PR tree-optimization/80021
17780 * tree.c (verify_type_variant): Make error call in verify_variant_match
17781 translatable and remove final full stop.
17783 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
17785 * config/nds32/constants.md (unspec_volatile_element): Add
17786 UNSPEC_VOLATILE_EH_RETURN.
17787 * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push,
17788 nds32_output_stack_pop): Support dwarf exception handling process.
17789 * config/nds32/nds32-protos.h (nds32_dynamic_chain_address): Declare.
17790 * config/nds32/nds32.c (nds32_init_machine_status): Support dwarf
17791 exception handling process.
17792 (nds32_compute_stack_frame): Likewise.
17793 (nds32_return_addr_rtx): Likewise.
17794 (nds32_initial_elimination_offset): Likewise.
17795 (nds32_expand_prologue): Likewise.
17796 (nds32_expand_epilogue): Likewise.
17797 (nds32_dynamic_chain_address): New function.
17798 * config/nds32/nds32.h (machine_function): Add fields for dwarf
17799 exception handling.
17800 (DYNAMIC_CHAIN_ADDRESS): Define.
17801 (EH_RETURN_DATA_REGNO): Define.
17802 (EH_RETURN_STACKADJ_RTX): Define.
17803 * config/nds32/nds32.md (eh_return, nds32_eh_return): Implement
17804 patterns for dwarf exception handling.
17806 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
17808 * config/nds32/nds32.h: Clean up obsolete macros.
17810 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
17812 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
17813 Add enum values for particular instructions.
17814 * config/nds32/nds32-intrinsic.c: Implementation of expanding
17815 particular intrinsic functions.
17816 * config/nds32/nds32-intrinsic.md: Likewise.
17817 * config/nds32/nds32_intrinsic.h: Likewise.
17818 * config/nds32/nds32.h (nds32_builtins): Likewise.
17819 * config/nds32/nds32.md (type): Add pbsad and pbsada.
17820 (btst, ave): New patterns for particular instructions.
17822 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
17824 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
17825 Add enum values for atomic load/store and memory sync.
17826 * config/nds32/nds32-intrinsic.c: Implementation for atomic load/store
17828 * config/nds32/nds32-intrinsic.md: Likewise.
17829 * config/nds32/nds32_intrinsic.h: Likewise.
17830 * config/nds32/nds32.h (nds32_builtins): Likewise.
17832 2018-04-07 Jakub Jelinek <jakub@redhat.com>
17834 PR tree-optimization/85257
17835 * fold-const.c (native_encode_vector): If not all elts could fit
17836 and off is -1, return 0 rather than offset.
17837 * tree-ssa-sccvn.c (vn_reference_lookup_3): Pass
17838 (offseti - offset2) / BITS_PER_UNIT as 4th argument to
17839 native_encode_expr. Verify len * BITS_PER_UNIT >= maxsizei. Don't
17840 adjust buffer in native_interpret_expr call.
17842 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
17844 * config/nds32/constants.md (unspec_volatile_element): Add cache
17845 control enum values.
17846 * config/nds32/nds32-intrinsic.c: Add cache control expand functions.
17847 * config/nds32/nds32-intrinsic.md: Add cache control patterns.
17848 * config/nds32/nds32.c (nds32_cctl_names): New.
17849 (nds32_print_operand): Handle cache control register names.
17850 * config/nds32/nds32.h (nds32_builtins): New enum values.
17851 * config/nds32/nds32_intrinsic.h: Add cache control enum types and
17853 * config/nds32/nds32.md (type): Add mmu.
17854 * config/nds32/pipelines.md (simple_insn): Add mmu.
17856 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
17858 * config/nds32/nds32.md (type): Remove call.
17859 * config/nds32/pipelines.md (simple_insn): Likewise.
17861 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
17863 * config/nds32/constants.md (unspec_volatile_element): Add
17864 UNSPEC_VOLATILE_FMFCSR, UNSPEC_VOLATILE_FMTCSR and
17865 UNSPEC_VOLATILE_FMFCFG.
17866 * config/nds32/nds32-intrinsic.c (bdesc_noarg): New builtin
17867 description for fmfcfg and fmfcsr.
17868 (bdesc_1arg): Add fmtcsr.
17869 (bdesc_2arg): Add fcpynss, fcpyss, fcpynsd and fcpysd.
17870 (nds32_expand_builtin_impl): Deal with FPU intrinsic functions.
17871 * config/nds32/nds32-intrinsic.md (unspec_fcpynsd, unspec_fcpysd,
17872 unspec_fcpynss, unspec_fcpysd, unspec_fcpyss, unspec_fmfcsr,
17873 unspec_fmfcfg): New patterns.
17874 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FMFCFG,
17875 NDS32_BUILTIN_FMFCSR, NDS32_BUILTIN_FMTCSR, NDS32_BUILTIN_FCPYNSS,
17876 NDS32_BUILTIN_FCPYSS,NDS32_BUILTIN_FCPYNSD and NDS32_BUILTIN_FCPYSD.
17877 * config/nds32/nds32_intrinsic.h (__nds32__fcpynsd, __nds32__fcpynss,
17878 __nds32__fcpysd, __nds32__fcpyss, __nds32__fmfcsr, __nds32__fmtcsr,
17879 __nds32__fmfcfg): Define.
17881 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
17883 * config/nds32/nds32.c (nds32_intrinsic_register_names): Add more
17884 intrinsic register names.
17885 * config/nds32/nds32_intrinsic.h (nds32_intrinsic_registers): Add more
17886 intrinsic register enum values and macros.
17888 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
17890 * config/nds32/nds32.c (nds32_legitimate_index_p): Modify condition
17891 for load/store addressing form.
17892 (nds32_print_operand_address): Likewise.
17894 2018-04-06 Eric Botcazou <ebotcazou@adacore.com>
17897 * config/sparc/sparc.c (sparc_expand_move): Deal with symbolic operands
17898 based on LABEL_REF. Remove useless assertion.
17899 (pic_address_needs_scratch): Fix formatting.
17900 (sparc_legitimize_pic_address): Minor tweaks.
17901 (sparc_delegitimize_address): Adjust assertion accordingly.
17902 * config/sparc/sparc.md (movsi_pic_label_ref): Change label_ref_operand
17903 into symbolic_operand.
17904 (movsi_high_pic_label_ref): Likewise.
17905 (movsi_lo_sum_pic_label_ref): Likewise.
17906 (movdi_pic_label_ref): Likewise.
17907 (movdi_high_pic_label_ref): Likewise.
17908 (movdi_lo_sum_pic_label_ref): Likewise.
17910 2018-04-06 Amaan Cheval <amaan.cheval@gmail.com>
17912 * config.gcc (x86_64-*-rtems*): Add rtems.h to tm_file for
17913 custom LIB_SPEC setup.
17915 2018-04-06 Ruslan Bukin <br@bsdpad.com>
17916 Kito Cheng <kito.cheng@gmail.com>
17918 * config.gcc (riscv*-*-freebsd*): Add RISC-V FreeBSD support.
17919 * config/riscv/freebsd.h: New.
17921 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
17923 * config/nds32/nds32.c (nds32_adjust_insn_length): Refine.
17924 * config/nds32/nds32.h (ADJUST_INSN_LENGTH): Change the location in
17927 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
17928 Kito Cheng <kito.cheng@gmail.com>
17930 * config/nds32/nds32-md-auxiliary.c (nds32_output_return,
17931 nds32_output_call, nds32_symbol_binds_local_p): New functions.
17932 * config/nds32/nds32-protos.h (nds32_output_call,
17933 nds32_output_return): Declare.
17934 * config/nds32/nds32.md: Refine all the call and return patterns.
17936 2018-04-06 Jakub Jelinek <jakub@redhat.com>
17939 * dwarf2out.c (rtl_for_decl_init): For STRING_CST initializer only
17940 build CONST_STRING if TYPE_MAX_VALUE is non-NULL and is INTEGER_CST.
17942 PR rtl-optimization/84872
17943 * cfgloopmanip.c (create_preheader): Use make_forwarder_block even if
17944 nentry == 1 when CP_FALLTHRU_PREHEADERS and single_entry is
17945 EDGE_CROSSING edge.
17947 2018-04-06 Tamar Christina <tamar.christina@arm.com>
17949 * expr.c (copy_blkmode_to_reg): Revert 254862.
17950 * doc/sourcebuild.texi (word_mode_no_slow_unalign): Likewise.
17952 2018-04-06 Richard Biener <rguenther@suse.de>
17954 PR middle-end/85244
17955 * tree-dfa.c (get_ref_base_and_extent): Reset seen_variable_array_ref
17956 after seeing a component reference with an adjacent field. Treat
17957 refs to arrays at struct end of external decls similar to
17958 refs to unconstrained commons.
17960 2018-04-06 Jakub Jelinek <jakub@redhat.com>
17963 * fold-const.c (twoval_comparison_p): Remove SAVE_P argument and don't
17964 look through SAVE_EXPRs with non-side-effects argument. Adjust
17966 (fold_comparison): Adjust twoval_comparison_p caller, don't handle
17969 2018-04-06 Richard Biener <rguenther@suse.de>
17971 PR middle-end/85180
17972 * alias.c (find_base_term): New wrapper around find_base_term
17973 unwinding CSELIB_VAL_PTR changes.
17974 (find_base_term): Do not restore CSELIB_VAL_PTR during the
17977 2018-04-06 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
17979 * config/s390/s390.c (s390_z10_optimize_cmp): Expand dedicated NOP
17981 * config/s390/s390.md (UNSPECV_NOP_LR_0, UNSPECV_NOP_LR_1): New
17982 constant definitions.
17983 ("nop"): lr 0,0 -> nopr r0
17984 ("nop_lr0", "nop_lr1"): New insn definitions.
17986 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
17988 * config/nds32/nds32.md (*stack_push, *stack_pop): Use
17989 NDS32_V3PUSH_AVAILABLE_P macro.
17991 2018-04-06 Monk Chiang <sh.chiang04@gmail.com>
17992 Chung-Ju Wu <jasonwucj@gmail.com>
17994 * config.gcc (nds32*-*-*): Add v2j v3f v3s checking.
17995 (nds32*-*-*): Add float and fpu_config into supported_defaults.
17996 * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS):
17997 Include TARGET_DEFAULT_FPU_ISA and TARGET_DEFAULT_FPU_FMA.
17998 * config/nds32/constants.md (unspec_element): Add UNSPEC_COPYSIGN,
17999 UNSPEC_FCPYNSD, UNSPEC_FCPYNSS, UNSPEC_FCPYSD and UNSPEC_FCPYSS.
18000 * config/nds32/constraints.md: New constraints and checking for hard
18001 float configuration.
18002 * config/nds32/iterators.md: New mode iterator and attribute for hard
18003 float configuration.
18004 * config/nds32/nds32-doubleword.md: Use hard float alternatives and
18006 * config/nds32/nds32-fpu.md: New file.
18007 * config/nds32/nds32-md-auxiliary.c: New functions and checkings to
18008 deal with hard float code generation.
18009 * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3F and
18011 (abi_type, float_reg_number): New enum type.
18012 * config/nds32/nds32-predicates.c: New predicates for hard float.
18013 * config/nds32/nds32-protos.h: Declare functions for hard float.
18014 * config/nds32/nds32.c: Implementation for hard float configuration.
18015 * config/nds32/nds32.h: Definitions for hard float configuration.
18016 * config/nds32/nds32.md: Include hard float machine description and
18017 modify patterns for hard float configuration.
18018 * config/nds32/nds32.opt: New options for hard float configuration.
18019 * config/nds32/predicates.md: New predicates for hard float
18022 2018-04-06 Kuan-Lin Chen <kuanlinchentw@gmail.com>
18024 * common/config/nds32/nds32-common.c
18025 (nds32_option_optimization_table): Enable -mreleax-hint by default.
18027 2018-04-05 Jakub Jelinek <jakub@redhat.com>
18029 PR middle-end/85195
18030 * match.pd (BIT_FIELD_REF CONSTRUCTOR@0 @1 @2): Use view_convert around
18031 CONSTRUCTOR_ELT (ctor, ...)->value.
18033 2018-04-05 Uros Bizjak <ubizjak@gmail.com>
18036 * config/i386/i386.md (define_attr "memory"): Handle rotate1 type.
18038 2018-04-05 Tom de Vries <tom@codesourcery.com>
18041 * config/nvptx/nvptx.c (nvptx_single): Fix neutering of bb with only
18044 2018-04-05 Shiva Chen <shiva0217@gmail.com>
18045 Kito Cheng <kito.cheng@gmail.com>
18047 * config/nds32/constraints.md (U33): Fine-tune checking condition.
18048 * config/nds32/nds32-md-auxiliary.c (nds32_mem_format): Ditto.
18049 * config/nds32/nds32.h (nds32_16bit_address_type): Add
18050 ADDRESS_POST_MODIFY_LO_REG_IMM3U.
18052 2018-04-05 Shiva Chen <shiva0217@gmail.com>
18053 Kito Cheng <kito.cheng@gmail.com>
18055 * config/nds32/constraints.md (Ufe): New memory constraint.
18056 * config/nds32/nds32-md-auxiliary.c (nds32_mem_format,
18057 nds32_output_16bit_load): Consider r8 register for lwi45.fe format.
18058 * config/nds32/nds32.c (nds32_print_operand): Output lwi45.fe
18060 * config/nds32/nds32.h (nds32_16bit_address_type): Add ADDRESS_R8_IMM7U.
18061 * config/nds32/nds32.md (*mov<mode>): Adjust pattern.
18063 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
18065 * config/nds32/nds32.md: Use optimize_size in the condition for
18066 alu-shift instructions.
18068 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
18070 * config/nds32/nds32.md (divsi4, udivsi4): New patterns.
18072 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
18074 * config/nds32/nds32.md (negsi2): Refine pattern.
18076 2018-04-05 Kito Cheng <kito.cheng@gmail.com>
18077 Chung-Ju Wu <jasonwucj@gmail.com>
18079 * config/nds32/iterators.md (shift_rotate): New code iterator.
18080 (shift): New code attribute.
18081 * config/nds32/nds32-md-auxiliary.c (nds32_expand_constant): New.
18082 * config/nds32/nds32-protos.h (nds32_expand_constant): Declare.
18083 * config/nds32/nds32.c (nds32_print_operand): Deal with more cases.
18084 * config/nds32/nds32.md (addsi3, *add_srli): Refine implementation for
18085 bit-wise operations.
18086 (andsi3, *andsi3): Ditto.
18087 (iorsi3, *iorsi3, *or_slli, *or_srli): Ditto.
18088 (xorsi3, *xorsi3, *xor_slli, *xor_srli): Ditto.
18089 (<shift>si3, *ashlsi3, *ashrsi3, *lshrsi3, *rotrsi3): Ditto.
18090 * config/nds32/predicates.md (nds32_rimm5u_operand, nds32_and_operand,
18091 nds32_ior_operand, nds32_xor_operand): New predicates.
18093 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
18095 * config/nds32/nds32.md (add<mode>3, sub<mode>3): Rename to ...
18096 (addsi3, subsi3): ... this.
18098 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
18100 * config/nds32/nds32.md (*sub_srli, *and_slli): Fine-tune predicator.
18102 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
18104 * config/nds32/nds32.md: Adjust indention.
18106 2018-04-05 Kito Cheng <kito.cheng@gmail.com>
18108 * config/nds32/nds32.md (feature): New attribute.
18110 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
18112 * config/nds32/nds32.md (subtype): New attribute.
18114 2018-04-04 Thomas Preud'homme <thomas.preudhomme@arm.com>
18117 * config/arm/arm-builtins.c (arm_expand_builtin): Change
18118 expansion to perform a bitwise AND of the argument followed by a
18119 boolean negation of the result.
18121 2018-04-04 Peter Bergner <bergner@vnet.ibm.com>
18123 PR rtl-optimization/84878
18124 * ddg.c (add_cross_iteration_register_deps): Use DF_REF_BB to determine
18125 the basic block. Assert the use reference is not artificial and that
18126 it has an associated insn.
18128 2018-04-04 Michael Matz <matz@suse.de>
18130 * builtins.c (compute_objsize): Pass correct operand
18131 to array_at_struct_end_p.
18133 2018-04-04 Richard Biener <rguenther@suse.de>
18136 * dwarf2out.c (dwarf2out_register_external_die): Peel namespaces
18137 from contexts for DINFO_LEVEL_TERSE and below.
18139 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
18141 * config/nds32/nds32-doubleword.md (move_<mode>): Require
18142 resiter_operand condition.
18143 * config/nds32/nds32.md (*move<mode>): Ditto.
18145 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
18146 Monk Chiang <sh.chiang04@gmail.com>
18148 * config/nds32/nds32.md (movmisalign<mode>): New pattern.
18150 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
18152 * config/nds32/nds32.md (movqi, movhi): Merge into mov<mode>.
18154 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
18155 Kito Cheng <kito.cheng@gmail.com>
18157 * config/nds32/nds32-md-auxiliary.c (nds32_inverse_cond_code,
18158 nds32_cond_code_str, output_cond_branch,
18159 output_cond_branch_compare_zero, nds32_expand_cbranch,
18160 nds32_expand_cstore, nds32_expand_movcc,
18161 nds32_output_cbranchsi4_equality_zero,
18162 nds32_output_cbranchsi4_equality_reg,
18163 nds32_output_cbranchsi4_equality_reg_or_const_int,
18164 nds32_output_cbranchsi4_greater_less_zero: New functions.
18165 * config/nds32/nds32-protos.h (nds32_expand_cbranch,
18166 nds32_expand_cstore, nds32_expand_movcc,
18167 nds32_output_cbranchsi4_equality_zero,
18168 nds32_output_cbranchsi4_equality_reg,
18169 nds32_output_cbranchsi4_equality_reg_or_const_int,
18170 nds32_output_cbranchsi4_greater_less_zero): Declare.
18171 * config/nds32/predicates.md (nds32_movecc_comparison_operator,
18172 nds32_rimm11s_operand): New predicates.
18173 * config/nds32/nds32.h (nds32_expand_result_type): New enum type.
18174 * config/nds32/nds32.md: Rewrite all the branch and conditional move
18177 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
18179 * config/nds32/nds32-doubleword.md: Refine all the instruction type.
18180 * config/nds32/nds32.md: Ditto.
18181 * config/nds32/pipelines.md: Ditto.
18183 2018-04-04 Richard Biener <rguenther@suse.de>
18185 PR tree-optimization/85168
18186 * tree-ssa-sccvn.c (vn_reference_maybe_forwprop_address): Avoid
18187 propagating abnormals.
18189 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
18191 * config/nds32/nds32.md (enabled): Use yes/no for this attribute.
18193 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
18194 Kito Cheng <kito.cheng@gmail.com>
18196 * config/nds32/nds32-md-auxiliary.c (nds32_long_call_p): New function.
18197 * config/nds32/nds32-protos.h (nds32_long_call_p): Declare.
18198 * config/nds32/nds32.c (nds32_function_ok_for_sibcall): New function.
18199 (TARGET_FUNCTION_OK_FOR_SIBCALL): Define.
18200 * config/nds32/nds32.md (sibcall_internal): New.
18201 (sibcall_register): Remove.
18202 (sibcall_immediate): Remove.
18203 (sibcall_value_internal): New.
18204 (sibcall_value_register): Remove.
18205 (sibcall_value_immediate): Remove.
18206 * config/nds32/predicates.md (nds32_general_register_operand): New.
18207 (nds32_call_address_operand): New.
18209 2018-04-03 Jakub Jelinek <jakub@redhat.com>
18211 PR rtl-optimization/85167
18212 * shrink-wrap.c (move_insn_for_shrink_wrap): Don't set bb_uses and
18213 bb_defs if *split_p, instead preinitialize it to NULL.
18215 PR tree-optimization/85156
18216 * builtins.c (fold_builtin_expect): Use save_expr on arg1 to avoid
18217 evaluating the argument multiple times.
18219 2018-04-03 Bill Schmidt <wschmidt@linux.ibm.com>
18221 * config/rs6000/emmintrin.h (_mm_cvtpd_epi32): Use __vector rather
18223 (_mm_cvtpd_ps): Likewise.
18224 (_mm_cvttpd_epi32): Likewise.
18225 * config/rs6000/mmintrin.h (_mm_unpacklo_pi8): Likewise.
18226 * config/rs6000/xmmintrin.h: For strict-ANSI C++ or C11, undefine
18227 vector, pixel, and bool following altivec.h include.
18229 2018-04-03 Martin Sebor <msebor@redhat.com>
18231 * doc/extend.texi (Common Function Attributes): Clarify.
18232 (const attribute): Likewise.
18233 (pure attribute): Likewise.
18235 2018-04-03 Jakub Jelinek <jakub@redhat.com>
18238 * config/i386/i386.c (ix86_expand_vector_set): Use
18239 HOST_WIDE_INT_1U << elt instead of 1 << elt. Formatting fix.
18241 2018-04-03 Uros Bizjak <ubizjak@gmail.com>
18243 * config/i386/i386.c (emit_i387_cw_initialization): Always use logic
18244 instructions when changing rounding bits to preserve precision bits
18245 in the x87 control word.
18247 2018-04-03 Martin Liska <mliska@suse.cz>
18249 PR tree-optimization/82491
18250 * rtl.h (strip_offset_and_add): Replace += suboffset with
18251 poly_uint64 () + suboffset.
18253 2018-03-29 Martin Liska <mliska@suse.cz>
18254 Martin Jambor <mjambor@suse.cz>
18257 * ipa-cp.c (propagate_bits_across_jump_function): Bail out if
18258 param_type is not an integral or pointer type.
18260 2018-04-03 Richard Biener <rguenther@suse.de>
18262 * sese.h (recompute_all_dominators): Remove.
18264 2018-04-02 Martin Sebor <msebor@redhat.com>
18266 * doc/invoke.texi (-Wrestrict): Fix typos.
18268 2018-04-02 Jim Wilson <jimw@sifive.com>
18270 * config/riscv/riscv.h (SHIFT_COUNT_TRUNCATED): Set to zero.
18271 * config/riscv/riscv.md (<optab>si3): Use QImode shift count.
18272 (<optab>di3, <optab>si3_extend): Likewise.
18273 (<optab>si3_mask, <optab>si3_mask_1): New.
18274 (<optab>di3_mask, <optab>di3_mask_1): New.
18275 (<optab>si3_extend_mask, <optab>si3_extend_mask_1): New.
18276 (lshrsi3_zero_extend_1): Use VOIDmode shift count.
18277 * config/riscv/sync.md (atomic_test_and_set): Emit QImode shift count.
18279 2018-04-02 Gerald Pfeifer <gerald@pfeifer.com>
18281 * doc/cpp.texi (Variadic Macros): Fix line continuation in an
18284 2018-04-02 Chung-Ju Wu <jasonwucj@gmail.com>
18286 * config/nds32/nds32.c (TARGET_CANONICALIZE_COMPARISON): Define.
18287 (nds32_canonicalize_comparison): New function.
18289 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
18290 Kito Cheng <kito.cheng@gmail.com>
18291 Kuan-Lin Chen <kuanlinchentw@gmail.com>
18293 * config.gcc (nds32): Add nds32-relax-opt.o into extra_objs.
18294 * config/nds32/constants.md (unspec_volatile_element): Add
18295 UNSPEC_VOLATILE_RELAX_GROUP.
18296 * config/nds32/nds32-relax-opt.c: New file.
18297 * config/nds32/nds32-predicates.c
18298 (nds32_symbol_load_store_p): New function.
18299 * config/nds32/nds32-protos.h
18300 (nds32_symbol_load_store_p): Declare function.
18301 (make_pass_nds32_relax_opt): Declare new rtl pass function.
18302 * config/nds32/nds32.c
18303 (nds32_register_pass): New function to register pass.
18304 (nds32_register_passes): New function to register passes.
18305 * config/nds32/nds32.md (relax_group): New pattern.
18306 * config/nds32/nds32.opt (mrelax-hint): New option.
18307 * config/nds32/t-nds32 (nds32-relax-opt.o): New dependency.
18309 2018-04-01 Kito Cheng <kito.cheng@gmail.com>
18311 * config/nds32/t-nds32: Modify files dependency.
18313 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
18315 * config/nds32/nds32.h (FUNCTION_PROFILER): Output newline character.
18316 (PROFILE_HOOK): Define its implementation.
18318 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
18320 * config/nds32/nds32.h (WCHAR_TYPE, WCHAR_TYPE_SIZE): Use unsigned int
18321 type and 32-bit size.
18323 2018-04-01 Jakub Jelinek <jakub@redhat.com>
18325 PR middle-end/85090
18326 * config/i386/sse.md (V): Add V64QI and V32HI for TARGET_AVX512F.
18327 (V_128_256): New mode iterator.
18328 (*avx512dq_vextract<shuffletype>64x2_1 splitter): New define_split.
18329 (*avx512f_vextract<shuffletype>32x4_1 splitter): Likewise.
18330 (xop_pcmov_<mode><avxsizesuffix>): Use V_128_256 mode iterator instead
18332 * config/i386/i386.c (ix86_expand_vector_set): Improve V32HImode and
18333 V64QImode expansion for !TARGET_AVX512BW && TARGET_AVX512F.
18335 2018-03-31 Segher Boessenkool <segher@kernel.crashing.org>
18338 * config/rs6000/xmmintrin.h (_mm_set_ps, _mm_max_ps): Handle (quiet)
18339 NaN inputs correctly.
18341 2018-03-30 Peter Bergner <bergner@vnet.ibm.com>
18344 * config/rs6000/vsx.md (??r): New mode attribute.
18345 (*vsx_mov<mode>_64bit): Use it.
18346 (*vsx_mov<mode>_32bit): Likewise.
18348 2018-03-30 Martin Sebor <msebor@redhat.com>
18350 PR tree-optimization/84818
18351 * builtins.c (check_access): Use warning_n.
18353 2018-03-30 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
18356 * config/rs6000/rs6000-string.c (expand_compare_loop): Fix redundant
18358 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Fix redundant
18361 2018-03-30 Julia Koval <julia.koval@intel.com>
18364 * x86-tune.def (movx, partial_reg_dependency): Enable for
18367 2018-03-29 Vladimir Makarov <vmakarov@redhat.com>
18369 PR inline-asm/84985
18370 * lra-constraints.c (process_alt_operands): Move setting
18371 this_alternative_matches below.
18373 2018-03-29 Martin Liska <mliska@suse.cz>
18376 * doc/invoke.texi: Document how LTO works with debug info.
18377 Describe auto-load support of binutils. Mention 'x86-64'
18378 as valid option value of -march option.
18380 2018-03-29 Jakub Jelinek <jakub@redhat.com>
18382 * config/i386/sse.md (<avx512>_blendm<mode>): Use <sseintprefix>.
18385 * fold-const.c (operand_equal_p): Handle DEBUG_BEGIN_STMT.
18386 For STATEMENT_LIST, pass down OEP_LEXICOGRAPHIC and maybe
18387 OEP_NO_HASH_CHECK for recursive call, to avoid exponential
18390 2018-03-28 Peter Bergner <bergner@vnet.ibm.com>
18393 * config/rs6000/rs6000.h (RS6000_BTM_POWERPC64): New define.
18394 (RS6000_BTM_COMMON): Add RS6000_BTM_POWERPC64.
18395 * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Add support
18396 for RS6000_BTM_POWERPC64.
18397 (rs6000_invalid_builtin): Add handling for RS6000_BTM_POWERPC64
18398 (rs6000_builtin_mask_names): Add RS6000_BTM_POWERPC64.
18399 * config/rs6000/rs6000-builtin.def (BU_P7_POWERPC64_MISC_2): New macro
18402 (DIVDEU): Likewise.
18404 2018-03-28 Carl Love <cel@us.ibm.com>
18407 2017-09-27 Carl Love <cel@us.ibm.com>
18409 * config/rs6000/rs6000-builtin.def (BU_FP_1MISC_1): Add define macro.
18410 (FCTID, FCTIW): Add BU_FP_MISC_1 macro expansion for builtins.
18411 * config/rs6000/rs6000.md (lrintsfsi2): Add define_insn for the
18414 2018-03-28 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
18416 * config/rs6000/xmmintrin.h (_mm_max_pi16): Use __vector __bool
18417 instead of __vector bool.
18418 (_mm_max_pu8): Likewise.
18419 (_mm_min_pi16): Likewise.
18421 2018-03-28 Peter Bergner <bergner@vnet.ibm.com>
18424 * config/rs6000/rs6000-builtin.def (DIVWEO): Delete macro expansion.
18425 (DIVWEUO): Likewise.
18426 (DIVDEO): Likewise.
18427 (DIVDEUO): Likewise.
18428 * config/rs6000/rs6000.c (builtin_function_type): Remove support for
18429 DIVWEUO and DIVDEUO.
18430 * config/rs6000/rs6000.md (UNSPEC_DIVEO, UNSPEC_DIVEUO): Delete unspecs.
18431 (UNSPEC_DIV_EXTEND): Remove deleted unspecs.
18432 (div_extend): Likewise.
18433 * doc/extend.texi (__builtin_divweo): Remove documentation for deleted
18435 (__builtin_divweuo): Likewise.
18436 (__builtin_divdeo): Likewise.
18437 (__builtin_divdeuo): Likewise.
18439 2018-03-28 Jakub Jelinek <jakub@redhat.com>
18442 * config/i386/i386.md (*add<mode>3_carry_0, *addsi3_carry_zext_0,
18443 *sub<mode>3_carry_0, *subsi3_carry_zext_0): New patterns.
18445 PR tree-optimization/82004
18446 * gimple-match-head.c (optimize_pow_to_exp): New function.
18447 * match.pd (pow(C,x) -> exp(log(C)*x)): Wrap with #if GIMPLE.
18448 Don't fold to exp if optimize_pow_to_exp is false.
18450 2018-03-28 Martin Liska <mliska@suse.cz>
18453 * calls.c (initialize_argument_information): Fix trailing space.
18454 * common.opt: Fix typo and provide better explanation for
18455 -fsanitize-coverage option.
18456 * config/i386/i386.opt: Fix typo.
18458 2018-03-28 Jakub Jelinek <jakub@redhat.com>
18459 Martin Liska <mliska@suse.cz>
18462 * gimplify.c (asan_poison_variable): Don't do the check for
18463 gimplify_omp_ctxp here.
18464 (gimplify_decl_expr): Do it here.
18465 (gimplify_target_expr): Likewise.
18467 2018-03-28 Martin Liska <mliska@suse.cz>
18470 * config/i386/i386.c (ix86_function_arg_advance): Do not call
18471 chkp_type_bounds_count if MPX is not enabled.
18473 2018-03-27 Chung-Ju Wu <jasonwucj@gmail.com>
18475 * config/nds32/nds32.h (BRANCH_COST): Adjust cost.
18477 2018-03-27 Michael Meissner <meissner@linux.vnet.ibm.com>
18480 * config/rs6000/rs6000.c (create_complex_muldiv): New helper
18481 function to create the function decl for complex long double
18482 multiply and divide for -mabi=ieeelongdouble.
18483 (init_float128_ieee): Call it.
18485 2018-03-27 H.J. Lu <hongjiu.lu@intel.com>
18488 * config/i386/i386.c (ix86_trampoline_init): Insert ENDBR for
18489 -fcf-protection=branch -mibt.
18490 * config/i386/i386.h (TRAMPOLINE_SIZE): Increased by 4 bytes.
18492 2018-03-27 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
18495 * config/arm/arm.c (arm_valid_symbolic_address): Handle
18496 arm_word_relocations.
18498 2018-03-27 Cesar Philippidis <cesar@codesourcery.com>
18501 * config/nvptx/nvptx.c (nvptx_assemble_decl_begin): Add '[]' to
18502 extern array declarations.
18504 2018-03-27 Richard Biener <rguenther@suse.de>
18506 PR middle-end/84067
18507 * match.pd ((A * C) +- (B * C) -> (A+-B) * C): Guard with
18508 explicit single_use checks.
18510 2018-03-27 Richard Biener <rguenther@suse.de>
18512 PR tree-optimization/85082
18513 * tree-ssa-sccvn.c (vn_reference_lookup_or_insert_for_pieces):
18516 2018-03-27 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
18518 * config.gcc (aarch64*-*-linux*): New TARGET_DEFAULT_ASYNC_UNWIND_TABLES
18519 * common/config/aarch64/aarch64-common.c (aarch64_optimization_table[]):
18520 Turn on fasynchronous-unwind-tables and funwind-tables.
18522 2018-03-26 Uros Bizjak <ubizjak@gmail.com>
18525 * config/i386/i386.md (*bmi_blsr_<mode>_cmp): New insn pattern.
18526 (*bmi_blsr_<mode>_ccz): Ditto.
18528 2018-03-26 Tom de Vries <tom@codesourcery.com>
18530 PR tree-optimization/85063
18531 * omp-general.c (offloading_function_p): New function. Factor out
18533 * omp-offload.c (pass_omp_target_link::gate): ... here.
18534 * omp-general.h (offloading_function_p): Declare.
18535 * tree-switch-conversion.c (build_one_array): Mark CSWTCH.x variable
18536 with attribute omp declare target for offloading functions.
18538 2018-03-24 Richard Sandiford <richard.sandiford@linaro.org>
18540 PR tree-optimization/84005
18541 * tree-data-ref.h (get_base_for_alignment): Declare.
18542 * tree-data-ref.c (get_base_for_alignment_1): New function.
18543 (get_base_for_alignment): Likewise.
18544 * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Use
18545 get_base_for_alignment to find a suitable base object, instead
18546 of always using drb->base_address.
18548 2018-03-23 Jakub Jelinek <jakub@redhat.com>
18550 PR inline-asm/85022
18551 * emit-rtl.c (init_emit_regs): Indicate that VOIDmode MEMs don't have
18552 known size by default.
18554 2018-03-23 Vladimir Makarov <vmakarov@redhat.com>
18556 PR inline-asm/85030
18557 * lra-constraints.c (process_alt_operands): Don't match BLKmode
18558 and non BLKmode operands.
18560 2018-03-23 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
18563 * config/arm/arm.md (unaligned_loadhis): Remove first alternative.
18564 Clean up attributes.
18566 2018-03-23 Richard Biener <rguenther@suse.de>
18569 * dwarf2out.c (rtl_for_decl_location): Do not generate RTL early when
18570 we are going to emit early debug for LTO.
18572 2018-03-23 Jakub Jelinek <jakub@redhat.com>
18574 PR inline-asm/85034
18575 * function.c (match_asm_constraints_1): Don't optimize if input
18576 doesn't satisfy general_operand predicate for output's mode.
18578 PR inline-asm/85022
18579 * alias.c (write_dependence_p): Don't require for x_canonicalized
18580 non-VOIDmode if x has VOIDmode.
18583 * sanopt.c (maybe_optimize_ubsan_ptr_ifn): If DECL_REGISTER (base),
18584 just don't try to optimize it rather than assert it never happens.
18586 2018-03-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
18588 * config/rs6000/rs6000-builtin.def: Remove various BU_ALTIVEC_X
18589 macro expansions for definition of ST_INTERNAL_<mode> and
18590 LD_INTERNAL_<mode> builtins.
18591 * config/rs6000/rs6000-protos.h (rs6000_address_for_altivec):
18593 * config/rs6000/rs6000.c (altivec_expand_ld_builtin): Delete this
18595 (altivec_expand_st_builtin): Likewise.
18596 (altivec_expand_builtin): Remove calls to deleted functions.
18597 (rs6000_address_for_altivec): Delete this function.
18598 * config/rs6000/vector.md: Remove expands for
18599 vector_altivec_load_<mode> and vector_altivec_store_<mode>.
18601 2018-03-22 Sudakshina Das <sudi.das@arm.com>
18604 * config/arm/arm.h (machine_function): Add static_chain_stack_bytes.
18605 * config/arm/arm.c (arm_compute_static_chain_stack_bytes): Avoid
18606 re-computing once computed.
18607 (arm_expand_prologue): Compute machine->static_chain_stack_bytes.
18608 (arm_init_machine_status): Initialize
18609 machine->static_chain_stack_bytes.
18611 2018-03-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
18614 * doc/extend.texi: Add four new prototypes for vec_ld.
18615 * config/rs6000/rs6000-builtin.def (LVX_V1TI): Reorder symbol
18616 definitions for more logical presentation.
18617 * config/rs6000/rs6000-c.c: (altivec_overloaded_builtins): Add
18618 entries for V1TI variants of __builtin_altivec_ld builtin.
18619 * config/rs6000/rs6000.c: (altivec_expand_lv_builtin): Add test and
18620 handling of V1TI variant of LVX icode pattern.
18621 (altivec_expand_builtin): Add case for ALTIVEC_BUILTIN_LVX_V1TI.
18622 (rs6000_gimple_fold_builtin): Likewise.
18623 (altivec_init_builtins): Add code to define
18624 __builtin_altivec_lvx_v1ti function.
18626 2018-03-22 Jakub Jelinek <jakub@redhat.com>
18628 PR inline-asm/84941
18629 * function.c (match_asm_constraints_1): Don't do the optimization
18630 if input isn't a REG, SUBREG, MEM or constant.
18632 2018-03-22 Tom de Vries <tom@codesourcery.com>
18634 PR tree-optimization/84956
18635 * tree-ssa-tail-merge.c (find_clusters_1): Skip bbs with
18636 bb_has_abnormal_pred.
18638 2018-03-22 Jakub Jelinek <jakub@redhat.com>
18641 * dwarf2asm.c (dw2_output_indirect_constant_1): Set
18642 DECL_INITIAL (decl) to decl at the end.
18643 * varasm.c (use_blocks_for_decl_p): Revert the 2018-03-20 change,
18644 adjust the comment.
18646 2018-03-21 Joseph Myers <joseph@codesourcery.com>
18648 * doc/extend.texi (__builtin_tgmath): Document when complex
18649 integer types are treated as _Complex _Float64.
18651 2018-03-21 Tom de Vries <tom@codesourcery.com>
18653 * doc/extend.texi (__builtin_extend_pointer): Remove pasto.
18655 2018-03-21 Jakub Jelinek <jakub@redhat.com>
18657 PR tree-optimization/84960
18658 * tree-cfg.c (remove_bb): Don't move forced labels into bb->prev_bb
18659 if it is ENTRY block, move them into single succ of ENTRY in that case.
18661 2018-03-21 Richard Sandiford <richard.sandiford@linaro.org>
18663 PR tree-optimization/84811
18664 * poly-int.h (poly_span_traits): Remove the T3 parameter and
18665 promote HOST_WIDE_INT T2 - T1 results to unsigned HOST_WIDE_INT.
18666 (maybe_in_range_p, known_in_range_p, ranges_known_overlap_p):
18667 (known_subrange_p): Update accordingly. Cast each value involved
18668 in the size comparison, rather than casting the result of the
18671 2018-03-21 Jakub Jelinek <jakub@redhat.com>
18673 PR tree-optimization/84982
18674 * gimple-ssa-store-merging.c (invert_op): Handle boolean inversion
18675 by flipping the least significant bit rather than all bits from
18676 bitpos to bitpos + bitsize - 1.
18678 2018-03-21 Nathan Sidwell <nathan@acm.org>
18680 * doc/extend.texi (Deprecated Features): Remove mention of
18681 long-deleted deprecations.
18683 2018-03-21 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
18686 * configure.ac (gcc_cv_ld_soname) <*-*-solaris2*>: Set.
18687 * configure: Regenerate.
18689 2018-03-21 Tom de Vries <tom@codesourcery.com>
18691 PR tree-optimization/83126
18692 * tree-parloops.c (num_phis): New function.
18693 (gen_parallel_loop): Detect and handle canonicalize_loop_ivs failure.
18695 2018-03-21 Nathan Sidwell <nathan@acm.org>
18697 * doc/extend.texi (Deprecated Features): Update deprecated flags,
18698 mention anon-struct/union members and trailing attributes.
18700 2018-03-21 Bin Cheng <bin.cheng@arm.com>
18702 PR tree-optimization/84969
18703 * tree-loop-distribution.c (fuse_memset_builtins): Don't reorder
18704 builtin memset partitions if they set different rhs values.
18706 2018-03-21 Jakub Jelinek <jakub@redhat.com>
18708 PR rtl-optimization/84989
18709 * simplify-rtx.c (simplify_unary_operation_1): Don't try to simplify
18710 VEC_DUPLICATE with scalar result mode.
18712 2018-03-21 Martin Liska <mliska@suse.cz>
18715 * ipa-icf.c (sem_item_optimizer::fixup_points_to_sets): Remove
18716 not intended return statement.
18718 2018-03-21 Martin Liska <mliska@suse.cz>
18721 * tree-chkp.c (CHKP_ARRAY_MAX_CHECK_STEPS): Define a new macro.
18722 (chkp_find_bound_slots_1): Limit number of iterations.
18724 2018-03-20 David H. Gutteridge <dhgutteridge@sympatico.ca>
18727 * Minor grammar fixes for x86 options.
18729 2018-03-20 Jakub Jelinek <jakub@redhat.com>
18732 * dce.c (delete_unmarked_insns): Don't remove frame related noop moves
18733 holding REG_CFA_RESTORE notes, instead turn them into a USE.
18735 2018-03-20 Peter Bergner <bergner@vnet.ibm.com>
18738 * config/rs6000/altivec.md (altivec_lvx_<mode>_2op): Delete define_insn.
18739 (altivec_lvx_<mode>_1op): Likewise.
18740 (altivec_stvx_<mode>_2op): Likewise.
18741 (altivec_stvx_<mode>_1op): Likewise.
18742 (altivec_lvx_<VM2:mode>): New define_expand.
18743 (altivec_stvx_<VM2:mode>): Likewise.
18744 (altivec_lvx_<VM2:mode>_2op_<P:mptrsize>): New define_insn.
18745 (altivec_lvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
18746 (altivec_stvx_<VM2:mode>_2op_<P:mptrsize>): Likewise.
18747 (altivec_stvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
18748 * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Use new expanders.
18749 (rs6000_gen_lvx): Likewise.
18750 * config/rs6000/rs6000.c (altivec_expand_lv_builtin): Likewise.
18751 (altivec_expand_stv_builtin): Likewise.
18752 (altivec_expand_builtin): Likewise.
18753 * config/rs6000/vector.md: Likewise.
18755 2018-03-20 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
18758 * config/arm/arm.c (arm_array_mode_supported_p): Return false for
18761 2018-03-20 Richard Biener <rguenther@suse.de>
18764 * config/i386/i386.c (ix86_add_stmt_cost): Only cost
18765 sign-conversions as zero, fall back to standard scalar_stmt
18768 2018-03-20 Martin Liska <mliska@suse.cz>
18771 * predict.c (rebuild_frequencies): Handle case when we have
18772 PROFILE_ABSENT, but flag_guess_branch_prob is false.
18774 2018-03-20 Jakub Jelinek <jakub@redhat.com>
18777 * dwarf2asm.c (dw2_output_indirect_constant_1): Temporarily turn off
18778 flag_section_anchors.
18779 * varasm.c (use_blocks_for_decl_p): Remove hack for
18780 dw2_force_const_mem.
18783 * config/aarch64/aarch64.md (*aarch64_reg_<mode>3_neg_mask2): Rename
18785 (*aarch64_<optab>_reg_<mode>3_neg_mask2): ... this. If pseudos can't
18786 be created, use lowpart_subreg of operands[0] rather than operands[0]
18788 (*aarch64_reg_<mode>3_minus_mask): Rename to ...
18789 (*aarch64_ashl_reg_<mode>3_minus_mask): ... this.
18790 (*aarch64_<optab>_reg_di3_mask2): Use const_int_operand predicate
18791 and n constraint instead of aarch64_shift_imm_di and Usd.
18792 (*aarch64_reg_<optab>_minus<mode>3): Rename to ...
18793 (*aarch64_<optab>_reg_minus<mode>3): ... this.
18795 2018-03-20 Sudakshina Das <sudi.das@arm.com>
18798 * config/arm/neon.md (ashldi3_neon): Update ?s for constraints
18799 to favor GPR over NEON registers.
18800 (<shift>di3_neon): Likewise.
18802 2018-03-20 Tom de Vries <tom@codesourcery.com>
18805 * config/nvptx/nvptx.c (nvptx_single): Don't neuter bar.sync.
18806 (nvptx_process_pars): Emit bar.sync asap and alap.
18808 2018-03-20 Tom de Vries <tom@codesourcery.com>
18811 * config/nvptx/nvptx.c (prevent_branch_around_nothing): Also update
18812 seen_label if seen_label is already set.
18814 2018-03-20 Jakub Jelinek <jakub@redhat.com>
18817 * config/i386/i386.c (fold_builtin_cpu): For features above 31
18818 use __cpu_features2 variable instead of __cpu_model.__cpu_features[0].
18819 Use 1U instead of 1. Formatting fixes.
18822 * builtins.c (fold_builtin_strpbrk): For strpbrk(x, "") use type
18823 instead of TREE_TYPE (s1) for the return value.
18825 2018-03-19 Jakub Jelinek <jakub@redhat.com>
18827 PR tree-optimization/84946
18828 * gimple-ssa-store-merging.c (mem_valid_for_store_merging): Compute
18829 bitsize + bitsize in poly_uint64 rather than poly_int64.
18832 * dwarf2asm.c: Include fold-const.c.
18833 (dw2_output_indirect_constant_1): Set DECL_INITIAL (decl) to ADDR_EXPR
18834 of decl rather than decl itself.
18836 PR rtl-optimization/84643
18837 * memmodel.h (enum memmodel): Add MEMMODEL_MAX enumerator.
18839 2018-03-19 Maxim Ostapenko <m.ostapenko@samsung.com>
18842 * dwarf2asm.c (dw2_output_indirect_constant_1): Disable ASan before
18843 calling assemble_variable.
18845 2018-03-19 Sudakshina Das <sudi.das@arm.com>
18848 * config/aarch64/aarch64-simd.md (vec_cmp<mode><v_int_equiv>): Modify
18849 instructions for UNLT, UNLE, UNGT, UNGE, UNEQ, UNORDERED and ORDERED.
18851 2018-03-19 Jim Wilson <jimw@sifive.com>
18854 * config/riscv/riscv.c (riscv_function_arg_boundary): Use
18855 PREFERRED_STACK_BOUNDARY instead of STACK_BOUNDARY.
18856 (riscv_first_stack_step): Likewise.
18857 (riscv_option_override): Use STACK_BOUNDARY instead of
18858 MIN_STACK_BOUNDARY.
18859 * config/riscv/riscv.h (STACK_BOUNDARY): Renamed from
18860 MIN_STACK_BOUNDARY.
18861 (BIGGEST_ALIGNMENT): Set to 128.
18862 (PREFERRED_STACK_BOUNDARY): Renamed from STACK_BOUNDARY.
18863 (RISCV_STACK_ALIGN): Use PREFERRED_STACK_BOUNDARY instead of
18866 2018-03-19 Richard Biener <rguenther@suse.de>
18868 PR tree-optimization/84933
18869 * tree-vrp.c (set_and_canonicalize_value_range): Treat out-of-bound
18870 values as -INF/INF when canonicalizing an ANTI_RANGE to a RANGE.
18872 2018-03-19 Richard Biener <rguenther@suse.de>
18874 PR tree-optimization/84859
18875 * tree-ssa-phiopt.c (single_trailing_store_in_bb): New function.
18876 (cond_if_else_store_replacement): Perform sinking operation on
18877 single-store BBs regardless of MAX_STORES_TO_SINK setting.
18878 Generalize what a BB with a single eligible store is.
18880 2018-03-19 Richard Biener <rguenther@suse.de>
18882 PR tree-optimization/84929
18883 * tree-data-ref.c (analyze_siv_subscript_cst_affine): Guard
18884 chrec_is_positive against non-chrec arg.
18886 2018-03-19 Tamar Christina <tamar.christina@arm.com>
18889 * config/arm/arm.c (arm_can_change_mode_class): revert r258554.
18891 2018-03-18 Martin Liska <mliska@suse.cz>
18893 PR rtl-optimization/84635
18894 * regrename.c (build_def_use): Use matches_mode only when
18897 2018-03-18 Richard Sandiford <richard.sandiford@linaro.org>
18899 PR tree-optimization/84913
18900 * tree-vect-loop.c (vectorizable_reduction): Don't try to
18901 vectorize chains of COND_EXPRs.
18903 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
18905 * config/nds32/nds32.h (MAX_REGS_PER_ADDRESS): Fix the value.
18907 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
18909 * config/nds32/nds32.h (LOGICAL_OP_NON_SHORT_CIRCUIT): Define.
18911 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
18913 * config/nds32/nds32.h (CLZ_DEFINED_VALUE_AT_ZERO): Define.
18915 2018-03-17 Chung-Ju Wu <jasonwucj@gmail.com>
18916 Kito Cheng <kito.cheng@gmail.com>
18918 * config/nds32/nds32-protos.h (nds32_adjust_reg_alloc_order): Declare.
18919 * config/nds32/nds32.c (nds32_reg_alloc_order_for_speed): New array.
18920 (nds32_adjust_reg_alloc_order): New function.
18921 * config/nds32/nds32.h (ADJUST_REG_ALLOC_ORDER): Define.
18923 2018-03-17 Kito Cheng <kito.cheng@gmail.com>
18925 * config/nds32/nds32.c (nds32_asm_output_mi_thunk,
18926 nds32_print_operand, nds32_print_operand_address): Use
18927 HOST_WIDE_INT_PRINT_DEC instead.
18929 2018-03-17 Chung-Ju Wu <jasonwucj@gmail.com>
18931 * config/nds32/nds32.c (nds32_register_priority): Modify cost.
18933 2018-03-17 Jakub Jelinek <jakub@redhat.com>
18936 * config/i386/i386.c (initial_ix86_tune_features,
18937 initial_ix86_arch_features): Use unsigned HOST_WIDE_INT rather than
18938 unsigned long long.
18939 (set_ix86_tune_features): Change ix86_tune_mask from unsigned int
18940 to unsigned HOST_WIDE_INT, initialize to HOST_WIDE_INT_1U << ix86_tune
18941 rather than 1u << ix86_tune. Formatting fix.
18942 (ix86_option_override_internal): Change ix86_arch_mask from
18943 unsigned int to unsigned HOST_WIDE_INT, initialize to
18944 HOST_WIDE_INT_1U << ix86_arch rather than 1u << ix86_arch.
18945 (ix86_function_specific_restore): Likewise.
18947 2018-03-16 Jakub Jelinek <jakub@redhat.com>
18950 * postreload.c (reload_combine_recognize_pattern): Perform
18951 INTVAL addition in unsigned HOST_WIDE_INT type to avoid UB and
18952 truncate_int_for_mode the result for the destination's mode.
18955 * hsa-gen.c (mem_type_for_type): Fix comment typo.
18956 * tree-vect-loop-manip.c (vect_create_cond_for_niters_checks):
18958 * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
18961 2018-03-16 Vladimir Makarov <vmakarov@redhat.com>
18964 * lra-assigns.c (lra_split_hard_reg_for): Don't use
18965 regno_allocno_class_array and sorted_pseudos.
18966 * lra-constraints.c (spill_hard_reg_in_range): Ignore hard regs in
18967 insns where regno is used.
18969 2018-03-16 Martin Liska <mliska@suse.cz>
18972 * multiple_target.c (create_dispatcher_calls): Redirect
18973 reference in the symbol table.
18975 2018-03-16 Martin Liska <mliska@suse.cz>
18978 * multiple_target.c (create_dispatcher_calls): Redirect also
18981 2018-03-16 Jakub Jelinek <jakub@redhat.com>
18985 * tree.h (TARGET_EXPR_NO_ELIDE): Define.
18986 * gimplify.c (gimplify_modify_expr_rhs): Don't elide TARGET_EXPRs with
18987 TARGET_EXPR_NO_ELIDE flag set unless *expr_p is INIT_EXPR.
18989 2018-03-16 Julia Koval <julia.koval@intel.com>
18991 * doc/invoke.texi (Skylake Server): Add CLWB.
18992 Cannonlake): Remove CLWB.
18994 2018-03-16 Jakub Jelinek <jakub@redhat.com>
18996 PR tree-optimization/84841
18997 * tree-ssa-reassoc.c (INTEGER_CONST_TYPE): Change to 1 << 4 from
18999 (FLOAT_ONE_CONST_TYPE): Define.
19000 (constant_type): Return FLOAT_ONE_CONST_TYPE for -1.0 and 1.0.
19001 (sort_by_operand_rank): Put entries with higher constant_type last
19002 rather than first to match comments.
19004 2018-03-15 Sandra Loosemore <sandra@codesourcery.com>
19006 * config/nios2/nios2.md (movsi_internal): Fix thinko in
19009 2018-03-15 Jakub Jelinek <jakub@redhat.com>
19012 * calls.c (expand_call): For TREE_ADDRESSABLE rettype ignore alignment
19013 check and use address of target always.
19015 2018-03-15 H.J. Lu <hongjiu.lu@intel.com>
19018 * config/i386/i386.c (indirect_thunk_needed): Update comments.
19019 (indirect_thunk_bnd_needed): Likewise.
19020 (indirect_thunks_used): Likewise.
19021 (indirect_thunks_bnd_used): Likewise.
19022 (indirect_return_needed): New.
19023 (indirect_return_bnd_needed): Likewise.
19024 (output_indirect_thunk_function): Add a bool argument for
19026 (output_indirect_thunk_function): Don't generate alias for
19027 function return thunk.
19028 (ix86_code_end): Call output_indirect_thunk_function to generate
19029 function return thunks.
19030 (ix86_output_function_return): Set indirect_return_bnd_needed
19031 and indirect_return_needed instead of indirect_thunk_bnd_needed
19032 and indirect_thunk_needed.
19034 2018-03-15 Olga Makhotina <olga.makhotina@intel.com>
19036 * config/i386/sgxintrin.h (_enclv_u32): New intrinsic.
19037 (__enclv_bc, __enclv_cd, __enclv_generic): New definitions.
19038 (ERDINFO, ETRACKC, ELDBC, ELDUC): New leaves.
19040 2018-03-15 David Malcolm <dmalcolm@redhat.com>
19041 Paul Hua <paul.hua.gm@gmail.com>
19044 * gcc.dg/fixits-pr84852-1.c: Fix filename in dg-regexp.
19046 2018-03-15 Segher Boessenkool <segher@kernel.crashing.org>
19048 * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add back the
19049 TARGET_DOUBLE_FLOAT and TARGET_SINGLE_FLOAT conditions on the DFmode
19050 resp. SFmode cases.
19052 2018-03-15 Tamar Christina <tamar.christina@arm.com>
19055 * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
19056 instead of GET_MODE_SIZE when comparing Units.
19058 2018-03-15 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
19061 * varasm.c (hash_section): Return an unchangeble hash value
19062 * config/aarch64/aarch64.c (aarch64_use_blocks_for_constant_p):
19063 Return !aarch64_can_use_per_function_literal_pools_p ().
19065 2018-03-15 Jakub Jelinek <jakub@redhat.com>
19068 * optabs.c (emit_conditional_move): Pass address of cmode's copy
19069 rather than address of cmode as last argument to prepare_cmp_insn.
19071 2018-03-15 Julia Koval <julia.koval@intel.com>
19073 * config/i386/i386.c (F_AVX512VBMI2, F_GFNI, F_VPCLMULQDQ,
19074 F_AVX512VNNI, F_AVX512BITALG): New.
19076 2018-03-14 John David Anglin <danglin@gcc.gnu.org>
19079 * config/pa/pa.c (pa_emit_move_sequence): Always emit secondary reload
19080 insn for floating-point loads and stores.
19082 2018-03-14 Carl Love <cel@us.ibm.com>
19084 * config/rs6000/rs6000-c.c: Add macro definitions for
19085 ALTIVEC_BUILTIN_VEC_PERMXOR.
19086 * config/rs6000/rs6000.h: Add #define for vec_permxor builtin.
19087 * config/rs6000/rs6000-builtin.def: Add macro expansions for VPERMXOR.
19088 * config/rs6000/altivec.md (altivec_vpermxor): New define expand.
19089 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Add case
19091 * config/doc/extend.texi: Add prototypes for vec_permxor.
19093 2018-03-14 David Malcolm <dmalcolm@redhat.com>
19096 * diagnostic-show-locus.c (class layout_point): Convert m_line
19097 from int to linenum_type.
19098 (line_span::comparator): Use linenum "compare" function when
19099 comparing line numbers.
19100 (test_line_span): New function.
19101 (layout_range::contains_point): Convert param "row" from int to
19103 (layout_range::intersects_line_p): Likewise.
19104 (layout::will_show_line_p): Likewise.
19105 (layout::print_source_line): Likewise.
19106 (layout::should_print_annotation_line_p): Likewise.
19107 (layout::print_annotation_line): Likewise.
19108 (layout::print_leading_fixits): Likewise.
19109 (layout::annotation_line_showed_range_p): Likewise.
19110 (struct line_corrections): Likewise for field m_row.
19111 (line_corrections::line_corrections): Likewise for param "row".
19112 (layout::print_trailing_fixits): Likewise.
19113 (layout::get_state_at_point): Likewise.
19114 (layout::get_x_bound_for_row): Likewise.
19115 (layout::print_line): Likewise.
19116 (diagnostic_show_locus): Likewise for locals "last_line" and "row".
19117 (selftest::diagnostic_show_locus_c_tests): Call test_line_span.
19118 * input.c (selftest::test_linenum_comparisons): New function.
19119 (selftest::input_c_tests): Call it.
19120 * selftest.c (selftest::test_assertions): Test ASSERT_GT,
19121 ASSERT_GT_AT, ASSERT_LT, and ASSERT_LT_AT.
19122 * selftest.h (ASSERT_GT): New macro.
19123 (ASSERT_GT_AT): New macro.
19124 (ASSERT_LT): New macro.
19125 (ASSERT_LT_AT): New macro.
19127 2018-03-14 Segher Boessenkool <segher@kernel.crashing.org>
19129 PR rtl-optimization/84780
19130 * combine.c (distribute_links): Don't make a link based on pc_rtx.
19132 2018-03-14 Martin Liska <mliska@suse.cz>
19134 * tree.c (record_node_allocation_statistics): Use
19135 get_stats_node_kind.
19136 (get_stats_node_kind): New function extracted from
19137 record_node_allocation_statistics.
19138 (free_node): Use get_stats_node_kind.
19140 2018-03-14 Richard Biener <rguenther@suse.de>
19142 * tree-ssa-pre.c (compute_antic_aux): Remove code that asserts
19143 that the value-set of ANTIC_IN doesn't grow.
19146 * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
19148 (BB_VISITED_WITH_VISITED_SUCCS): New define.
19149 (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
19151 2018-03-14 Julia Koval <julia.koval@intel.com>
19153 * config.gcc (icelake-client, icelake-server): New.
19155 * config/i386/i386.c (initial_ix86_tune_features): Extend to 64 bit.
19156 (initial_ix86_arch_features): Ditto.
19157 (PTA_SKYLAKE): Add SGX.
19158 (PTA_ICELAKE): Remove.
19159 (PTA_ICELAKE_CLIENT): New.
19160 (PTA_ICELAKE_SERVER): New.
19161 (ix86_option_override_internal): Split up icelake on icelake client and
19163 (get_builtin_code_for_version): Ditto.
19164 (fold_builtin_cpu): Ditto.
19165 * config/i386/driver-i386.c (config/i386/driver-i386.c): Ditto.
19166 * config/i386/i386-c.c (ix86_target_macros_internal): Ditto
19167 * config/i386/i386.h (processor_type): Ditto.
19168 * doc/invoke.texi: Ditto.
19170 2018-03-14 Jakub Jelinek <jakub@redhat.com>
19173 * sanopt.c (maybe_optimize_ubsan_ptr_ifn): Handle also
19174 INTEGER_CST offset, add it together with bitpos / 8 and
19175 sign extend based on POINTER_SIZE.
19179 2017-04-20 Uros Bizjak <ubizjak@gmail.com>
19182 * config/i386/constraints.md (Yc): New register constraint.
19183 * config/i386/i386.md (*float<SWI48:mode><MODEF:mode>2_mixed):
19184 Use Yc constraint for alternative 2 of operand 0. Remove
19185 preferred_for_speed attribute.
19187 2018-03-14 Richard Biener <rguenther@suse.de>
19189 PR tree-optimization/84830
19190 * tree-ssa-pre.c (compute_antic_aux): Intersect the new ANTIC_IN
19191 with the old one to avoid oscillations.
19193 2018-03-13 Vladimir Makarov <vmakarov@redhat.com>
19196 * lra-assigns.c (find_all_spills_for): Ignore uninteresting
19198 (assign_by_spills): Return a flag of reload assignment failure.
19199 Do not process the reload assignment failures. Do not spill other
19200 reload pseudos if they has the same reg class. Update n if
19202 (lra_assign): Add a return arg. Set up from the result of
19203 assign_by_spills call.
19204 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
19205 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
19206 usage_insns if it is not NULL.
19207 (spill_hard_reg_in_range): New function.
19208 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
19209 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
19210 function prototypes.
19211 (lra_assign): Change prototype.
19212 * lra.c (lra): Add code to deal with fails by splitting hard reg
19215 2018-03-01 Palmer Dabbelt <palmer@sifive.com>
19217 * config/riscv/riscv.opt (mrelax): New option.
19218 * config/riscv/riscv.c (riscv_file_start): Emit ".option
19219 "norelax" when riscv_mrelax is disabled.
19220 * doc/invoke.texi (RISC-V): Document "-mrelax" and "-mno-relax".
19222 2018-03-13 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
19225 * config/rs6000/rs6000.c (rs6000_reassociation_width): Disable parallel
19226 reassociation for int modes.
19228 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
19230 * tree-vect-loop-manip.c (vect_maybe_permute_loop_masks):
19231 Reverse the choice between VEC_UNPACK_LO_EXPR and VEC_UNPACK_HI_EXPR
19233 * config/aarch64/iterators.md (hi_lanes_optab): New int attribute.
19234 * config/aarch64/aarch64-sve.md
19235 (*aarch64_sve_<perm_insn><perm_hilo><mode>): Rename to...
19236 (aarch64_sve_<perm_insn><perm_hilo><mode>): ...this.
19237 (*extend<mode><Vwide>2): Rename to...
19238 (aarch64_sve_extend<mode><Vwide>2): ...this.
19239 (vec_unpack<su>_<perm_hilo>_<mode>): Turn into a define_expand,
19240 renaming the old pattern to...
19241 (aarch64_sve_punpk<perm_hilo>_<mode>): ...this. Only define
19243 (vec_unpack<su>_<perm_hilo>_<SVE_BHSI:mode>): Turn into a
19244 define_expand, renaming the old pattern to...
19245 (aarch64_sve_<su>unpk<perm_hilo>_<SVE_BHSI:mode>): ...this.
19246 (*vec_unpacku_<perm_hilo>_<mode>_no_convert): Delete.
19247 (vec_unpacks_<perm_hilo>_<mode>): Take BYTES_BIG_ENDIAN into
19248 account when deciding which SVE instruction the optab should use.
19249 (vec_unpack<su_optab>_float_<perm_hilo>_vnx4si): Likewise.
19251 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
19253 * config/aarch64/aarch64.md (V4_REGNUM, V8_REGNUM, V12_REGNUM)
19254 (V20_REGNUM, V24_REGNUM, V28_REGNUM, P1_REGNUM, P2_REGNUM, P3_REGNUM)
19255 (P4_REGNUM, P5_REGNUM, P6_REGNUM, P8_REGNUM, P9_REGNUM, P10_REGNUM)
19256 (P11_REGNUM, P12_REGNUM, P13_REGNUM, P14_REGNUM): New define_constants.
19257 (tlsdesc_small_<mode>): Turn a define_expand and use
19258 tlsdesc_small_sve_<mode> for SVE. Rename original define_insn to...
19259 (tlsdesc_small_advsimd_<mode>): ...this.
19260 (tlsdesc_small_sve_<mode>): New pattern.
19262 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
19264 * config/aarch64/iterators.md (UNSPEC_SMUL_HIGHPART)
19265 (UNSPEC_UMUL_HIGHPART): New constants.
19266 (MUL_HIGHPART): New int iteraor.
19267 (su): Handle UNSPEC_SMUL_HIGHPART and UNSPEC_UMUL_HIGHPART.
19268 * config/aarch64/aarch64-sve.md (<su>mul<mode>3_highpart): New
19270 (*<su>mul<mode>3_highpart): New define_insn.
19272 2018-03-13 Eric Botcazou <ebotcazou@adacore.com>
19275 * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
19278 2018-03-13 Martin Liska <mliska@suse.cz>
19281 * (sem_item_optimizer::sem_item_optimizer): Initialize new
19283 (sem_item_optimizer::~sem_item_optimizer): Release it.
19284 (sem_item_optimizer::merge_classes): Register variable aliases.
19285 (sem_item_optimizer::fixup_pt_set): New function.
19286 (sem_item_optimizer::fixup_points_to_sets): Likewise.
19287 * ipa-icf.h: Declare new variables and functions.
19289 2018-03-13 Jakub Jelinek <jakub@redhat.com>
19291 PR middle-end/84834
19292 * match.pd ((A & C) != 0 ? D : 0): Use INTEGER_CST@2 instead of
19293 integer_pow2p@2 and test integer_pow2p in condition.
19294 (A < 0 ? C : 0): Similarly for @1.
19296 PR middle-end/84831
19297 * stmt.c (parse_output_constraint): If the CONSTRAINT_LEN (*p, p)
19298 characters starting at p contain '\0' character, don't look beyond
19302 * config/i386/i386.md (round<mode>2): For 387 fancy math, disable
19303 pattern if -ftrapping-math -fno-fp-int-builtin-inexact.
19306 * reg-stack.c (change_stack): Change update_end var from int to
19307 rtx_insn *, if non-NULL don't update just BB_END (current_block), but
19308 also call set_block_for_insn on the newly added insns and rescan.
19311 * config/i386/sse.md (sse2_loadhpd): Use Yv constraint rather than v
19312 on the last operand.
19315 * tree.c (stabilize_reference_1): Return save_expr (e) for
19316 STATEMENT_LIST even if it doesn't have side-effects.
19318 2018-03-12 Jonathan Wakely <jwakely@redhat.com>
19320 * doc/invoke.texi (-mclflushopt): Fix spelling of option.
19322 2018-03-12 Renlin Li <renlin.li@arm.com>
19324 * config/aarch64/aarch64.md (movhf_aarch64): Fix mode argument to
19325 aarch64_output_scalar_simd_mov_immediate.
19327 2018-03-12 Martin Sebor <msebor@redhat.com>
19329 PR tree-optimization/83456
19330 * gimple-fold.c (gimple_fold_builtin_memory_op): Avoid warning
19331 for perfectly overlapping calls to memcpy.
19332 (gimple_fold_builtin_memory_chk): Same.
19333 (gimple_fold_builtin_strcpy): Handle no-warning.
19334 (gimple_fold_builtin_stxcpy_chk): Same.
19335 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Handle no-warning.
19337 2018-03-12 Segher Boessenkool <segher@kernel.crashing.org>
19339 * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add bool "named"
19340 parameter. Use it for SFmode.
19341 (rs6000_function_arg_advance_1): Adjust.
19342 (rs6000_function_arg): Adjust.
19343 (rs6000_gimplify_va_arg): Pass false for that new parameter.
19345 2018-03-12 Segher Boessenkool <segher@kernel.crashing.org>
19347 PR rtl-optimization/84169
19348 PR rtl-optimization/84780
19349 * combine.c (can_combine_p): Check for a 2-insn combination whether
19350 the destination register is used between the two insns, too.
19352 2018-03-12 Richard Biener <rguenther@suse.de>
19354 PR tree-optimization/84803
19355 * tree-if-conv.c (ifcvt_memrefs_wont_trap): Don't do anything
19356 for refs DR analysis didn't process.
19358 2018-03-12 Richard Biener <rguenther@suse.de>
19360 PR tree-optimization/84777
19361 * tree-ssa-loop-ch.c (should_duplicate_loop_header_p): For
19362 force-vectorize loops ignore whether we are optimizing for size.
19364 2018-03-12 Chung-Ju Wu <jasonwucj@gmail.com>
19366 * config/nds32/nds32.c (nds32_md_asm_adjust): New function.
19367 (TARGET_MD_ASM_ADJUST): Define.
19369 2018-03-12 Monk Chiang <sh.chiang04@gmail.com>
19370 Kito Cheng <kito.cheng@gmail.com>
19371 Chung-Ju Wu <jasonwucj@gmail.com>
19373 * config/nds32/nds32.c (nds32_compute_stack_frame,
19374 nds32_emit_stack_push_multiple, nds32_emit_stack_pop_multiple,
19375 nds32_emit_stack_v3push, nds32_emit_stack_v3pop,
19376 nds32_emit_adjust_frame, nds32_expand_prologue, nds32_expand_epilogue,
19377 nds32_expand_prologue_v3push, nds32_expand_epilogue_v3pop): Refine.
19378 * config/nds32/nds32.h (NDS32_FIRST_CALLEE_SAVE_GPR_REGNUM,
19379 NDS32_LAST_CALLEE_SAVE_GPR_REGNUM, NDS32_V3PUSH_AVAILABLE_P): New.
19380 * config/nds32/nds32.md (prologue, epilogue): Use macro
19381 NDS32_V3PUSH_AVAILABLE_P to do checking.
19383 2018-03-11 Jakub Jelinek <jakub@redhat.com>
19386 * dwarf2out.c (gen_enumeration_type_die): Don't guard adding
19387 DW_AT_declaration for ENUM_IS_OPAQUE on -gdwarf-4 or -gno-strict-dwarf,
19388 but on TYPE_SIZE. Don't do anything for ENUM_IS_OPAQUE if not creating
19389 a new die. Don't set TREE_ASM_WRITTEN if ENUM_IS_OPAQUE. Guard
19390 addition of most attributes on !orig_type_die or the attribute not
19391 being present already. Assert TYPE_VALUES is NULL for ENUM_IS_OPAQUE.
19393 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
19394 Chung-Ju Wu <jasonwucj@gmail.com>
19396 * config/nds32/nds32.c (nds32_cpu_cpp_builtins): Modify to define
19397 __NDS32_VH__ macro.
19398 * config/nds32/nds32.opt (mvh): New option.
19400 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
19401 Chung-Ju Wu <jasonwucj@gmail.com>
19403 * config/nds32/nds32-protos.h (nds32_cpu_cpp_builtins): Declare
19405 * config/nds32/nds32.c (nds32_cpu_cpp_builtins): New function.
19406 * config/nds32/nds32.h (TARGET_CPU_CPP_BUILTINS): Modify its
19409 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
19410 Chung-Ju Wu <jasonwucj@gmail.com>
19412 * config/nds32/nds32-memory-manipulation.c (nds32_expand_strlen): New
19414 * config/nds32/nds32-multiple.md (strlensi): New pattern.
19415 * config/nds32/nds32-protos.h (nds32_expand_strlen): Declare function.
19417 2018-03-11 Monk Chiang <sh.chiang04@gmail.com>
19418 Kito Cheng <kito.cheng@gmail.com>
19419 Chung-Ju Wu <jasonwucj@gmail.com>
19421 * config/nds32/constants.md (unspec_element): Add UNSPEC_FFB,
19422 UNSPEC_FFMISM and UNSPEC_FLMISM.
19423 * config/nds32/nds32-intrinsic.c (bdesc_2arg): Add builtin description
19424 for ffb, ffmism and flmism.
19425 * config/nds32/nds32-intrinsic.md (unspec_ffb): Define new pattern.
19426 (unspec_ffmism): Ditto.
19427 (unspec_flmism): Ditto.
19428 (nds32_expand_builtin_impl): Check if string extension is available.
19429 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FFB,
19430 NDS32_BUILTIN_FFMISM and NDS32_BUILTIN_FLMISM.
19432 2018-03-10 Vladimir Makarov <vmakarov@redhat.com>
19435 2018-03-09 Vladimir Makarov <vmakarov@redhat.com>
19438 * lra-assigns.c (assign_by_spills): Return a flag of reload
19439 assignment failure. Do not process the reload assignment
19440 failures. Do not spill other reload pseudos if they has the same
19442 (lra_assign): Add a return arg. Set up from the result of
19443 assign_by_spills call.
19444 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
19445 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
19446 usage_insns if it is not NULL.
19447 (spill_hard_reg_in_range): New function.
19448 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
19449 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
19450 function prototypes.
19451 (lra_assign): Change prototype.
19452 * lra.c (lra): Add code to deal with fails by splitting hard reg
19455 2018-03-10 H.J. Lu <hongjiu.lu@intel.com>
19458 * config/i386/i386.opt: Replace Enforcment with Enforcement.
19460 2018-03-10 Alexandre Oliva <aoliva@redhat.com>
19463 * dwarf2out.h (dw_val_class): Add dw_val_class_symview.
19464 (dw_val_node): Add val_symbolic_view.
19465 * dwarf2out.c (dw_line_info_table): Add symviews_since_reset.
19466 (symview_upper_bound): New.
19467 (new_line_info_table): Initialize symviews_since_reset.
19468 (dwarf2out_source_line): Count symviews_since_reset and set
19469 symview_upper_bound.
19470 (dw_val_equal_p): Handle symview.
19471 (add_AT_symview): New.
19472 (print_dw_val): Handle symview.
19473 (attr_checksum, attr_checksum_ordered): Likewise.
19474 (same_dw_val_p, size_of_die): Likewise.
19475 (value_format, output_die): Likewise.
19476 (add_high_low_attributes): Use add_AT_symview for entry_view.
19477 (dwarf2out_finish): Reset symview_upper_bound, clear
19480 2018-03-09 Peter Bergner <bergner@vnet.ibm.com>
19483 * config/rs6000/rs6000.c (rs6000_offsettable_memref_p): New prototype.
19484 Add strict argument and use it.
19485 (rs6000_split_multireg_move): Update for new strict argument.
19486 (mem_operand_gpr): Disallow all non-offsettable addresses.
19487 * config/rs6000/rs6000.md (*movdi_internal64): Use YZ constraint.
19489 2018-03-09 Jakub Jelinek <jakub@redhat.com>
19492 * config/rs6000/rs6000.c (rs6000_gimplify_va_arg): Mark va_arg_tmp
19493 temporary TREE_ADDRESSABLE before gimplification of BUILT_IN_MEMCPY.
19494 * config/powerpcspe/powerpcspe.c (rs6000_gimplify_va_arg): Likewise.
19497 * tree-inline.c (copy_tree_body_r): For INDIRECT_REF of a remapped
19498 decl, use remap_type if we want to use the type.
19500 2018-03-09 Martin Sebor <msebor@redhat.com>
19502 PR tree-optimization/84526
19503 * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
19505 (builtin_access::generic_overlap): Be prepared to handle non-array
19508 2018-03-09 Alexandre Oliva <aoliva@redhat.com>
19510 PR rtl-optimization/84682
19511 * lra-constraints.c (process_address_1): Check is_address flag
19512 for address constraints.
19513 (process_alt_operands): Likewise.
19514 * lra.c (lra_set_insn_recog_data): Pass asm operand locs to
19515 preprocess_constraints.
19516 * recog.h (preprocess_constraints): Add oploc parameter.
19518 * recog.c (preprocess_constraints): Test address_operand for
19519 CT_ADDRESS constraints.
19521 2018-03-09 Vladimir Makarov <vmakarov@redhat.com>
19524 * lra-assigns.c (assign_by_spills): Return a flag of reload
19525 assignment failure. Do not process the reload assignment
19526 failures. Do not spill other reload pseudos if they has the same
19528 (lra_assign): Add a return arg. Set up from the result of
19529 assign_by_spills call.
19530 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
19531 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
19532 usage_insns if it is not NULL.
19533 (spill_hard_reg_in_range): New function.
19534 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
19535 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
19536 function prototypes.
19537 (lra_assign): Change prototype.
19538 * lra.c (lra): Add code to deal with fails by splitting hard reg
19541 2018-03-09 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
19544 * common/config/arm/arm-common.c (arm_parse_arch_option_name):
19545 Accept complain bool parameter. Only emit errors if it is true.
19546 (arm_parse_cpu_option_name): Likewise.
19547 (arm_target_thumb_only): Adjust callers of the above.
19548 * config/arm/arm-protos.h (arm_parse_cpu_option_name): Adjust
19549 prototype to take a default true bool parameter.
19550 (arm_parse_arch_option_name): Likewise.
19552 2018-03-09 David Malcolm <dmalcolm@redhat.com>
19553 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
19557 * Makefile.in (LD_VERSION_SCRIPT_OPTION, LD_SONAME_OPTION): New.
19558 * configure: Regenerate.
19559 * configure.ac ("linker --version-script option"): New.
19560 ("linker soname option"): New.
19562 2018-03-09 Richard Biener <rguenther@suse.de>
19564 PR tree-optimization/84775
19565 * tree-if-conv.c (add_bb_predicate_gimplified_stmts): Delink
19566 immediate uses of predicate stmts and mark them modified.
19569 PR tree-optimization/84178
19570 * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
19572 (version_loop_for_if_conversion): Delay update_ssa call.
19573 (tree_if_conversion): Delay update_ssa until after predicate
19576 2018-03-09 Eric Botcazou <ebotcazou@adacore.com>
19579 * config/i386/winnt.c (i386_pe_seh_cold_init): Use small pre-allocation
19580 when the function accesses prior frames.
19582 2018-03-08 Jakub Jelinek <jakub@redhat.com>
19585 * dwarf2out.c (dw_loc_list): If list && loc_list->first->next, call
19586 gen_llsym, otherwise call maybe_gen_llsym.
19588 PR inline-asm/84742
19589 * recog.c (asm_operand_ok): Return 0 if multi-character constraint
19590 has ',' character inside of it.
19592 2018-03-08 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
19595 * config/aarch64/aarch64.md (*compare_cstore<mode>_insn): Mark pattern
19596 as clobbering CC_REGNUM.
19598 2018-03-08 Richard Biener <rguenther@suse.de>
19600 PR middle-end/84552
19601 * tree-scalar-evolution.c: Include tree-into-ssa.h.
19602 (follow_copies_to_constant): Do not follow SSA names registered
19605 2018-03-08 Richard Biener <rguenther@suse.de>
19607 PR tree-optimization/84178
19608 * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
19610 (version_loop_for_if_conversion): Delay update_ssa call.
19611 (tree_if_conversion): Delay update_ssa until after predicate
19614 2018-03-08 David Malcolm <dmalcolm@redhat.com>
19616 PR tree-optimization/84178
19617 * tree-if-conv.c (release_bb_predicate): Remove the
19618 the assertion that the stmts have NULL use_ops.
19619 Discard the statements, asserting that they haven't
19620 yet been added to a BB.
19622 2018-03-08 Richard Biener <rguenther@suse.de>
19624 PR tree-optimization/84746
19625 * tree-ssa-pre.c (find_leader_in_sets): Deal with SET1 being NULL.
19626 (phi_translate): Pass in destination ANTIC_OUT set.
19627 (phi_translate_1): Likewise. For a simplified result lookup
19628 a leader in ANTIC_OUT and AVAIL_OUT, not the ANTIC_IN sets.
19629 (phi_translate_set): Adjust.
19630 (do_pre_regular_insertion): Likewise.
19631 (do_pre_partial_partial_insertion): Likewise.
19633 2018-03-08 Martin Liska <mliska@suse.cz>
19635 PR gcov-profile/84735
19636 * doc/gcov.texi: Document usage of profile files.
19637 * gcov-io.h: Document changes in the format.
19639 2018-03-08 Alexandre Oliva <aoliva@redhat.com>
19643 * dwarf2out.c (struct dw_line_info_table): Update comments for
19645 (FORCE_RESET_NEXT_VIEW): New.
19646 (FORCE_RESETTING_VIEW_P): New.
19647 (RESETTING_VIEW_P): Check for -1 too.
19648 (ZERO_VIEW_P): Likewise.
19649 (new_line_info_table): Force-reset next view.
19650 (dwarf2out_begin_function): Likewise.
19651 (dwarf2out_source_line): Simplify zero_view_p initialization.
19652 Test FORCE_RESETTING_VIEW_P and RESETTING_VIEW_P instead of
19653 view directly. Omit view when omitting .loc at line 0.
19655 2018-03-08 Jakub Jelinek <jakub@redhat.com>
19657 PR tree-optimization/84740
19658 * tree-switch-conversion.c (process_switch): Call build_constructors
19659 only if info.phi_count is non-zero.
19661 PR tree-optimization/84739
19662 * tree-tailcall.c (find_tail_calls): Check call arguments against
19663 DECL_ARGUMENTS (current_function_decl) rather than
19664 DECL_ARGUMENTS (func) when checking for tail recursion.
19666 2018-03-07 Jakub Jelinek <jakub@redhat.com>
19668 * doc/contrib.texi: Add entries for Martin Liska, David Malcolm,
19669 Marek Polacek, extend Vladimir Makarov's, Jonathan Wakely's and
19670 Volker Reichelt's entry and add entries for people that perform
19671 GCC fuzzy testing and report numerous bugs.
19673 2018-03-07 Segher Boessenkool <segher@kernel.crashing.org>
19676 * config/rs6000/rs6000.c (rs6000_elf_in_small_data_p): Don't put
19677 readonly data in sdata, if that is disabled.
19678 * config/rs6000/sysv4.opt (mreadonly-in-sdata): New option.
19679 * doc/invoke.texi (RS/6000 and PowerPC Options): Document
19680 -mreadonly-in-sdata option.
19682 2018-03-07 Martin Sebor <msebor@redhat.com>
19684 PR tree-optimization/84468
19685 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Consider successor
19686 basic block when looking for nul assignment.
19688 2018-03-07 Eric Botcazou <ebotcazou@adacore.com>
19691 * except.h (output_function_exception_table): Adjust prototype.
19692 * except.c (output_function_exception_table): Remove FNNAME parameter
19693 and add SECTION parameter. Ouput one part of the table at a time.
19694 * final.c (final_scan_insn_1) <NOTE_INSN_SWITCH_TEXT_SECTIONS>: Output
19695 the first part of the exception table and emit unwind directives.
19696 * config/i386/i386-protos.h (i386_pe_end_cold_function): Declare.
19697 (i386_pe_seh_cold_init): Likewise.
19698 * config/i386/cygming.h (ASM_DECLARE_COLD_FUNCTION_NAME): New macro.
19699 (ASM_DECLARE_COLD_FUNCTION_SIZE): Likewise.
19700 * config/i386/i386.c (x86_expand_epilogue): Fix wording in comment.
19701 (ix86_output_call_insn): Emit a nop in one more case for SEH.
19702 * config/i386/winnt.c: Include except.h.
19703 (struct seh_frame_state): Add reg_offset, after_prologue and
19704 in_cold_section fields.
19705 (i386_pe_seh_end_prologue): Set seh->after_prologue.
19706 (i386_pe_seh_cold_init): New function.
19707 (i386_pe_seh_fini): Add COLD parameter and bail out if it is not equal
19708 to seh->in_cold_section.
19709 (seh_emit_push): Record the offset of the push.
19710 (seh_emit_save): Record the offet of the save.
19711 (i386_pe_seh_unwind_emit): Deal with NOTE_INSN_SWITCH_TEXT_SECTIONS.
19712 Test seh->after_prologue to disregard the epilogue.
19713 (i386_pe_end_function): Pass FALSE to i386_pe_seh_fini.
19714 (i386_pe_end_cold_function): New function.
19716 2018-03-07 Jakub Jelinek <jakub@redhat.com>
19719 * config/aarch64/predicates.md (aarch64_simd_reg_or_zero): Use
19720 aarch64_simd_or_scalar_imm_zero rather than aarch64_simd_imm_zero.
19723 * gimple-expr.c (create_tmp_var_raw): Set DECL_NAMELESS flag
19725 * tree-pretty-print.c (dump_decl_name): For TDF_COMPARE_DEBUG,
19726 don't print names of DECL_NAMELESS DECL_IGNORED_P decls.
19728 PR middle-end/84723
19729 * multiple_target.c: Include tree-inline.h and intl.h.
19730 (expand_target_clones): Diagnose and fail if node->definition and
19731 !tree_versionable_function_p (node->decl).
19733 2018-03-06 John David Anglin <danglin@gcc.gnu.org>
19735 * config/pa/pa.h (ASM_GENERATE_INTERNAL_LABEL): Revise to use
19737 (ASM_OUTPUT_ADDR_VEC_ELT): Revise for above change.
19738 (ASM_OUTPUT_ADDR_DIFF_ELT): Likewise.
19739 * config/pa/pa64-hpux.h (ASM_GENERATE_INTERNAL_LABEL): Revise as above.
19741 2018-03-06 Jakub Jelinek <jakub@redhat.com>
19744 * combine.c (try_combine): Use reg_or_subregno instead of handling
19745 just paradoxical SUBREGs and REGs.
19747 2018-03-06 Claudiu Zissulescu <claziss@synopsys.com>
19749 * config/arc/arc.c (arc_finalize_pic): Remove function.
19750 (arc_must_save_register): We use single base PIC register, remove
19751 checks to save/restore the PIC register.
19752 (arc_expand_prologue): Likewise.
19753 * config/arc/arc-protos.h (arc_set_default_type_attributes):
19755 (arc_verify_short): Likewise.
19756 (arc_attr_type): Likewise.
19757 * config/arc/arc.c (arc_set_default_type_attributes): Remove.
19758 (walk_stores): Likewise.
19759 (arc_address_cost): Make it static.
19760 (arc_verify_short): Likewise.
19761 (branch_dest): Likewise.
19762 (arc_attr_type): Likewise.
19763 * config/arc/arc.c (TARGET_ADJUST_INSN_LENGTH): Remove.
19764 (TARGET_INSN_LENGTH_PARAMETERS): Likewise.
19765 (arc_final_prescan_insn): Remove inserting the nops due to
19766 hardware hazards. It is done in reorg step.
19767 (insn_length_variant_t): Remove.
19768 (insn_length_parameters_t): Likewise.
19769 (arc_insn_length_parameters): Likewise.
19770 (arc_get_insn_variants): Likewise.
19771 * config/arc/arc.h (TARGET_UPSIZE_DBR): Remove.
19773 2018-03-06 Jakub Jelinek <jakub@redhat.com>
19775 PR inline-asm/84683
19776 * reg-stack.c (move_for_stack_reg): If any_malformed_asm, avoid
19779 PR tree-optimization/84687
19780 * omp-simd-clone.c (simd_clone_create): Clear DECL_BUILT_IN_CLASS
19782 * match.pd (pow(C,x)*expN(y) -> expN(logN(C)*x+y)): New optimization.
19784 2018-03-05 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
19786 * config/rs6000/rs6000-builtin.def (rs6000_speculation_barrier):
19787 Rename to ppc_speculation_barrier.
19788 * config/rs6000/rs6000.c (rs6000_init_builtins): Rename builtin to
19789 __builtin_ppc_speculation_barrier.
19791 2018-03-05 Jakub Jelinek <jakub@redhat.com>
19794 * combine.c (combine_simplify_rtx): Don't try to simplify if
19795 if_then_else_cond returned non-NULL, but either true_rtx or false_rtx
19798 2018-03-05 Segher Boessenkool <segher@kernel.crashing.org>
19800 * config/rs6000/rs6000.c (rs6000_loop_align): Don't align tiny loops
19801 to 32 bytes when compiling for POWER9.
19803 2018-03-05 Jakub Jelinek <jakub@redhat.com>
19806 * config/i386/i386.c (ix86_function_ok_for_sibcall): Check for
19807 regparm >= 3 with no arg reg available also for calls with
19808 flag_force_indirect_call. Pass decl to ix86_function_regparm.
19811 * config/i386/sse.md (*<code><mode>3): Replace <mask_prefix3> with
19813 (*<plusminus_insn><mode>3): Likewise. Remove <mask_operand3> uses.
19815 2018-03-05 Peter Bergner <bergner@vnet.ibm.com>
19818 * config/rs6000/vector.md (mov<mode>): Disallow altivec memory operands.
19820 2018-03-05 Richard Biener <rguenther@suse.de>
19822 PR tree-optimization/84486
19823 * tree-ssa-pre.c (create_expression_by_pieces): Remove dead code.
19824 When inserting a __builtin_assume_aligned call set the LHS
19825 SSA name alignment info accordingly.
19827 2018-03-05 Wilco Dijkstra <wdijkstr@arm.com>
19829 PR tree-optimization/84114
19830 * config/aarch64/aarch64.c (aarch64_reassociation_width)
19831 Avoid reassociation of FLOAT_MODE addition.
19833 2018-03-05 Olga Makhotina <olga.makhotina@intel.com>
19835 * common/config/i386/i386-common.c (OPTION_MASK_ISA_PCONFIG_SET,
19836 OPTION_MASK_ISA_PCONFIG_UNSET, OPTION_MASK_ISA_WBNOINVD_SET,
19837 OPTION_MASK_ISA_WBNOINVD_UNSET): New definitions.
19838 (ix86_handle_option): Handle -mpconfig and -mwbnoinvd.
19839 * config.gcc (pconfigintrin.h, wbnoinvdintrin.h) : Add headers.
19840 * config/i386/cpuid.h (bit_PCONFIG, bit_WBNOINVD): New.
19841 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mpconfig
19843 * config/i386/i386-builtin.def (__builtin_ia32_wbnoinvd,
19844 __builtin_ia32_wbinvd): New builtins.
19845 (SPECIAL_ARGS2): New.
19846 * config/i386/i386-c.c (__WBNOINVD__, __PCONFIG__): New.
19847 (SPECIAL_ARGS2): New.
19848 * config/i386/i386.c (ix86_target_string): Add -mpconfig and -mwbnoinvd.
19849 (ix86_valid_target_attribute_inner_p): Ditto.
19850 (ix86_init_mmx_sse_builtins): Add special_args2.
19851 * config/i386/i386.h (TARGET_PCONFIG, TARGET_PCONFIG_P, TARGET_WBNOINVD,
19852 TARGET_WBNOINVD_P): New.
19853 * config/i386/i386.md (UNSPECV_WBINVD, UNSPECV_WBNOINVD): New.
19854 (define_insn "wbinvd", define_insn "wbnoinvd"): New.
19855 * config/i386/i386.opt: Add -mpconfig and -mwbnoinvd.
19856 * config/i386/immintrin.h (_wbinvd): New intrinsic.
19857 * config/i386/pconfigintrin.h: New file.
19858 * config/i386/wbnoinvdintrin.h: Ditto.
19859 * config/i386/x86intrin.h: Add headers pconfigintrin.h and
19861 * doc/invoke.texi (-mpconfig, -mwbnoinvd): New.
19863 2018-03-05 Richard Biener <rguenther@suse.de>
19865 PR tree-optimization/84670
19866 * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
19868 (BB_VISITED_WITH_VISITED_SUCCS): New define.
19869 (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
19870 (compute_antic_aux): Only assert the number of values in ANTIC_IN
19871 doesn't grow if all successors (recursively) were visited at least
19874 2018-03-05 Richard Biener <rguenther@suse.de>
19876 PR tree-optimization/84650
19877 * tree-ssa-loop-im.c (pass_lim::execute): Reset the SCEV cache
19878 if executed in the loop pipeline.
19880 2018-03-05 Sandra Loosemore <sandra@codesourcery.com>
19882 * doc/configfiles.texi (Configuration Files): Move info about
19883 conditionalizing $target-protos.h to...
19884 * doc/sourcebuild.texi (Back End): Here. Explain how $target.h
19885 differs from $target-protos.h.
19887 2018-03-05 Kito Cheng <kito.cheng@gmail.com>
19888 Chung-Ju Wu <jasonwucj@gmail.com>
19890 * config/nds32/nds32-protos.h (nds32_expand_setmem): Declare.
19891 * config/nds32/nds32-multiple.md (setmemsi): Define.
19892 * config/nds32/nds32-memory-manipulation.c
19893 (nds32_gen_dup_4_byte_to_word_value): New.
19894 (emit_setmem_word_loop): New.
19895 (emit_setmem_byte_loop): New.
19896 (nds32_expand_setmem_loop): New.
19897 (nds32_expand_setmem_loop_v3m): New.
19898 (nds32_expand_setmem_unroll): New.
19899 (nds32_expand_setmem): New.
19901 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
19902 Chung-Ju Wu <jasonwucj@gmail.com>
19904 * config/nds32/nds32-memory-manipulation.c
19905 (nds32_emit_load_store): New.
19906 (nds32_emit_post_inc_load_store): New.
19907 (nds32_emit_mem_move): New.
19908 (nds32_emit_mem_move_block): New.
19909 (nds32_expand_movmemsi_loop_unknown_size): New.
19910 (nds32_expand_movmemsi_loop_known_size): New.
19911 (nds32_expand_movmemsi_loop): New.
19912 (nds32_expand_movmemsi_unroll): New.
19913 (nds32_expand_movmemqi): Rename ...
19914 (nds32_expand_movmemsi): ... to this.
19915 * config/nds32/nds32-multiple.md (movmemqi): Rename ...
19916 (movmemsi): ... to this.
19917 * config/nds32/nds32-protos.h (nds32_expand_movmemqi): Rename ...
19918 (nds32_expand_movmemsi): ... to this.
19920 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
19921 Monk Chiang <sh.chiang04@gmail.com>
19922 Chung-Ju Wu <jasonwucj@gmail.com>
19924 * config/nds32/nds32-protos.h
19925 (nds32_expand_load_multiple): New arguments.
19926 (nds32_expand_store_multiple): Ditto.
19927 (nds32_valid_multiple_load_store): Rename ...
19928 (nds32_valid_multiple_load_store_p): ... to this.
19929 * config/nds32/nds32-memory-manipulation.c
19930 (nds32_expand_load_multiple): Refine implementation.
19931 (nds32_expand_store_multiple): Ditto.
19932 * config/nds32/nds32-multiple.md
19933 (load_multiple): Update nds32_expand_load_multiple interface.
19934 (store_multiple): Update nds32_expand_store_multiple interface.
19935 * config/nds32/nds32-predicates.c
19936 (nds32_valid_multiple_load_store): Rename ...
19937 (nds32_valid_multiple_load_store_p): ... to this and refine
19939 * config/nds32/predicates.md
19940 (nds32_load_multiple_and_update_address_operation): New predicate.
19941 (nds32_store_multiple_and_update_address_operation): New predicate.
19943 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
19944 Chung-Ju Wu <jasonwucj@gmail.com>
19946 * config/nds32/nds32.md (type): Add load_multiple and store_multiple.
19947 (combo): New attribute.
19948 * config/nds32/nds32-multiple.md: Refine patterns with new attributes.
19950 2018-03-03 Chung-Ju Wu <jasonwucj@gmail.com>
19952 * config/nds32/nds32.opt: Change -mcmodel= default value.
19954 2018-03-03 Kito Cheng <kito.cheng@gmail.com>
19955 Monk Chiang <sh.chiang04@gmail.com>
19956 Chung-Ju Wu <jasonwucj@gmail.com>
19958 * config/nds32/constants.md (unspec_element): New enum.
19959 * config/nds32/constraints.md (Umw): New constraint.
19960 * config/nds32/nds32-intrinsic.c: Add more builtin functions.
19961 * config/nds32/nds32-intrinsic.md: Likewise.
19962 * config/nds32/nds32-md-auxiliary.c (nds32_regno_to_enable4): New.
19963 (nds32_valid_smw_lwm_base_p): New.
19964 (nds32_output_smw_single_word): New.
19965 (nds32_output_lmw_single_word): New.
19966 (nds32_expand_unaligned_load): New.
19967 (nds32_expand_unaligned_store): New.
19968 * config/nds32/nds32-protos.h (nds32_valid_smw_lwm_base_p): Declare.
19969 (nds32_output_smw_single_word): Declare.
19970 (nds32_output_lmw_single_word): Declare.
19971 (nds32_expand_unaligned_load): Declare.
19972 (nds32_expand_unaligned_store): Declare.
19973 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_UALOAD_HW,
19974 NDS32_BUILTIN_UALOAD_W, NDS32_BUILTIN_UALOAD_DW,
19975 NDS32_BUILTIN_UASTORE_HW, NDS32_BUILTIN_UASTORE_W,
19976 NDS32_BUILTIN_UASTORE_DW.
19977 * config/nds32/predicates.md (nds32_lmw_smw_base_operand): New
19980 2018-03-03 Monk Chiang <sh.chiang04@gmail.com>
19981 Kito Cheng <kito.cheng@gmail.com>
19982 Chung-Ju Wu <jasonwucj@gmail.com>
19984 * config/nds32/nds32-intrinsic.c
19985 (nds32_expand_builtin_null_ftype_reg): Delete.
19986 (nds32_expand_builtin_reg_ftype_imm): Ditto.
19987 (nds32_expand_builtin_null_ftype_reg_imm): Ditto.
19988 (nds32_read_argument): New.
19989 (nds32_legitimize_target): Ditto.
19990 (nds32_legitimize_argument): Ditto.
19991 (nds32_check_constant_argument): Ditto.
19992 (nds32_expand_unop_builtin): Ditto.
19993 (nds32_expand_unopimm_builtin): Ditto.
19994 (nds32_expand_binop_builtin): Ditto.
19995 (nds32_builtin_decl_impl): Ditto.
19996 (builtin_description): Ditto.
19997 (nds32_expand_builtin_impl): Rewrite with new infrastructure.
19998 (nds32_init_builtins_impl): Ditto.
19999 * config/nds32/nds32.c (TARGET_BUILTIN_DECL): Define.
20000 (nds32_builtin_decl): New.
20001 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_COUNT.
20002 * config/nds32/nds32-protos.h (nds32_builtin_decl_impl): Declare.
20004 2018-03-02 Jeff Law <law@redhat.com>
20006 * reorg.c (stop_search_p): Handle DEBUG_INSN.
20007 (redundant_insn, fill_simple_delay_slots): Likewise.
20008 (fill_slots_from_thread): Likewise.
20009 * resource.c (mark_referenced_resources): Likewise.
20010 (mark_set_resources, find_dead_or_set_registers): Likewise.
20012 2018-03-02 Jakub Jelinek <jakub@redhat.com>
20014 * substring-locations.h (format_warning_va): Formatting fix for
20015 ATTRIBUTE_GCC_DIAG.
20016 (format_warning_at_substring): Fix up ATTRIBUTE_GCC_DIAG second
20018 (format_warning_n_va, format_warning_at_substring_n): New prototypes.
20019 * substring-locations.c: Include intl.h.
20020 (format_warning_va): Turned into small wrapper around
20021 format_warning_n_va, renamed to ...
20022 (format_warning_n_va): ... this, add N and PLURAL_GMSGID arguments,
20023 rename GMSGID to SINGULAR_GMSGID, if SINGULAR_GMSGID != PLURAL_GMSGID,
20025 (format_warning_at_substring_n): New function.
20026 * gimple-ssa-sprintf.c: Remove GCC diagnostic ignored pragma.
20027 (fmtwarn): Add ATTRIBUTE_GCC_DIAG. Turn into a copy of
20028 format_warning_at_substring with just a shorter name instead of
20029 const function pointer.
20030 (fmtwarn_n): New function.
20031 (maybe_warn, format_directive, parse_directive): Use fmtwarn_n where
20032 appropriate, get rid of all the fmtstr temporaries, move conditionals
20033 with G_() wrapped string literals directly into fmtwarn arguments,
20034 cast dir.len to (int), formatting fixes.
20036 2018-03-02 Thomas Schwinge <thomas@codesourcery.com>
20038 * doc/invoke.texi: Remove "Cilk Plus" references.
20040 2018-03-02 Jakub Jelinek <jakub@redhat.com>
20041 Richard Biener <rguenther@suse.de>
20044 * expr.c (expand_expr_real_1) <case CALL_EXPR>: Don't emit diagnostics
20045 for error or warning attributes if CALL_FROM_THUNK_P is set.
20048 2018-03-02 Jakub Jelinek <jakub@redhat.com>
20051 * config/pa/pa.h (TARGET_CPU_CPP_BUILTINS): Predefine
20052 __SIZEOF_128__ macro if HPUX_LONG_DOUBLE_LIBRARY.
20055 * config/ia64/ia64.h (TARGET_CPU_CPP_BUILTINS): Predefine
20056 __SIZEOF_{FPREG,FLOAT{80,128}}__ macros.
20058 * predict.c (test_prediction_value_range): Use PROB_UNINITIALIZED
20059 instead of -1U in last predictors element's probability member.
20061 2018-03-02 Eric Botcazou <ebotcazou@adacore.com>
20064 * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
20065 arguments if they are comparable.
20067 2018-03-02 Richard Sandiford <richard.sandiford@linaro.org>
20069 PR tree-optimization/84634
20070 * tree-vect-stmts.c (vectorizable_store, vectorizable_load): Replace
20071 masks and masked_loop_p with a single loop_masks, making sure it's
20072 null for bb vectorization.
20074 2018-03-02 Richard Sandiford <richard.sandiford@linaro.org>
20076 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
20077 (vect_analyze_data_ref_access): Use loop->safe_len rather than
20078 loop->force_vectorize to check whether there is no alias.
20080 2018-03-02 Jakub Jelinek <jakub@redhat.com>
20083 * rtl.h (prev_real_nondebug_insn, next_real_nondebug_insn): New
20085 * emit-rtl.c (next_real_insn, prev_real_insn): Fix up function
20087 (next_real_nondebug_insn, prev_real_nondebug_insn): New functions.
20088 * cfgcleanup.c (try_head_merge_bb): Use prev_real_nondebug_insn
20089 instead of a loop around prev_real_insn.
20090 * combine.c (move_deaths): Use prev_real_nondebug_insn instead of
20093 PR inline-asm/84625
20094 * config/i386/i386.c (ix86_print_operand): Use conditional
20095 output_operand_lossage instead of gcc_assert if CONST_VECTOR is not
20098 2018-03-02 Richard Biener <rguenther@suse.de>
20100 PR tree-optimization/84427
20101 * tree-ssa-pre.c (bitmap_remove_expr_from_set): Remove.
20102 (bitmap_set_subtract_values): Rewrite to handle multiple
20105 (prune_clobbered_mems): Likewise.
20106 (phi_translate): Take edge instead of pred/phiblock.
20107 (phi_translate_1): Likewise.
20108 (phi_translate_set): Likewise. Insert all translated
20109 exprs for a value into the set, keeping possibly multiple
20110 expressions per value.
20111 (compute_antic_aux): Adjust for phi_translate changes.
20112 When intersecting union the expressions and prune those
20113 not in the final value set, keeping possibly multiple
20114 expressions per value. Do not use value-insertion
20115 for unioning ANTIC_OUT U EXP_GEN - TMP_GEN but merge
20116 all expressions. Add verification that the value-sets
20117 only shrink during iteration.
20118 (compute_partial_antic_aux): Adjust for the phi_translate changes.
20119 (do_pre_regular_insertion): Likewise.
20120 (do_pre_partial_partial_insertion): Likewise.
20122 2018-03-02 Richard Biener <rguenther@suse.de>
20125 * config/darwin.c (saved_debug_info_level): New static global.
20126 (darwin_asm_lto_start): Disable debug info generation for LTO out.
20127 (darwin_asm_lto_end): Restore debug info generation settings.
20129 2018-03-01 Martin Liska <mliska@suse.cz>
20132 * sanopt.c (sanitize_rewrite_addressable_params): Do not handle
20133 volatile arguments.
20135 2018-03-01 Richard Biener <rguenther@suse.de>
20138 * dwarf2out.c (gen_variable_die): Properly handle late VLA
20139 type annotation with LTO when debug was disabled at compile-time.
20141 2018-03-01 Matthew Fortune <mfortune@gmail.com>
20143 * config/mips/mips.c (mips_final_prescan_insn): Fix incorrect
20145 (mips_final_postscan_insn): Likewise.
20147 2018-03-01 Richard Sandiford <richard.sandiford@linaro.org>
20149 PR rtl-optimization/84528
20150 * alias.c (init_alias_target): Add commentary.
20151 (init_alias_analysis): Only give HARD_FRAME_POINTER_REGNUM
20152 a unique base value if the frame pointer is not eliminated
20153 to the stack pointer.
20155 2018-03-01 Tom de Vries <tom@codesourcery.com>
20157 PR rtl-optimization/83327
20158 * lra-int.h (hard_regs_spilled_into): Declare.
20159 * lra.c (hard_regs_spilled_into): Define.
20160 (init_reg_info): Init hard_regs_spilled_into.
20161 * lra-spills.c (assign_spill_hard_regs): Update hard_regs_spilled_into.
20162 * lra-lives.c (make_hard_regno_born, make_hard_regno_dead)
20163 (process_bb_lives): Handle hard_regs_spilled_into.
20164 (lra_create_live_ranges_1): Before doing liveness propagation, clear
20165 regs in all_hard_regs_bitmap if set in hard_regs_spilled_into.
20167 2018-02-28 David Edelsohn <dje.gcc@gmail.com>
20169 * config.gcc (powerpc-ibm-aix7.1.*): New stanza.
20170 (powerpc-ibm-aix[789]*): Default to AIX 7.2.
20171 * config/rs6000/aix71.h (TARGET_DEFAULT): Revert to Power4 ISA.
20172 * config/rs6000/aix72.h: New file.
20174 2018-02-28 Jakub Jelinek <jakub@redhat.com>
20176 * gimple-ssa-warn-restrict.c (maybe_diag_overlap): Use warning_n
20177 instead of warning_at with conditional singular and plural messages
20181 * stor-layout.c (update_alignment_for_field): For
20182 targetm.ms_bitfield_layout_p (rli->t), if !is_bitfield
20183 && !DECL_PACKED (field), do the alignment update, just use
20184 only desired_align instead of MAX (type_align, desired_align)
20186 (place_field): Don't do known_align < desired_align handling
20187 early if targetm.ms_bitfield_layout_p (rli->t) and rli->prev_field
20188 is non-NULL, instead do it after rli->prev_field handling and
20189 only if not within a bitfield word. For DECL_PACKED (field)
20190 use type_align of BITS_PER_UNIT.
20192 2018-02-28 Eric Botcazou <ebotcazou@adacore.com>
20194 * config/aarch64/aarch64.c (aarch64_emit_probe_stack_range): Remove
20195 superfluous parentheses and trailing spaces.
20197 2018-02-28 Richard Biener <rguenther@suse.de>
20199 PR tree-optimization/84584
20200 * graphite-scop-detection.c (scop_detection::add_scop): Discard
20201 SCoPs with fake exit edge.
20203 2018-02-28 Martin Liska <mliska@suse.cz>
20206 * timevar.c (timer::print): Fix format to properly print 100%
20209 2018-02-28 Richard Biener <rguenther@suse.de>
20211 PR middle-end/84607
20212 * genmatch.c (capture_info::walk_match): Do not mark
20213 captured expressions without operands as expr_p given
20214 they act more like predicates and should be subject to
20215 "lost tail" side-effect preserving.
20217 2018-02-28 Alexandre Oliva <aoliva@redhat.com>
20219 PR rtl-optimization/81611
20220 * auto-inc-dec.c (attempt_change): Move dead note from
20221 mem_insn if it's the next use of regno
20222 (find_address): Take address use of reg holding
20223 non-incremented value. Add parm to limit search to the named
20225 (merge_in_block): Attempt to use a mem insn that is the next
20226 use of the original regno.
20228 2018-02-27 Martin Sebor <msebor@redhat.com>
20231 * doc/invoke.texi (-Wmissing-attributes): New option.
20232 * print-tree.c (print_node): Handle DECL_UNINLINABLE.
20234 2018-02-27 Martin Sebor <msebor@redhat.com>
20236 PR translation/84207
20237 * diagnostic-core.h (warning_n, error_n, inform_n): Change
20238 n argument to unsigned HOST_WIDE_INT.
20239 * diagnostic.c (warning_n, error_n, inform_n): Ditto.
20240 (diagnostic_n_impl): Ditto. Handle arguments in excess of LONG_MAX.
20241 * gimple-ssa-sprintf.c (format_directive): Simplify inform_n call.
20242 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Use warning_n.
20244 2018-02-27 Richard Biener <rguenther@suse.de>
20246 PR tree-optimization/84512
20247 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost):
20248 Do not use the estimate returned from record_stmt_cost for
20249 the scalar iteration cost but sum properly using add_stmt_cost.
20251 2018-02-27 Richard Biener <rguenther@suse.de>
20253 PR tree-optimization/84466
20254 * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
20255 Adjust last change to less strictly validate use operands.
20257 2018-02-27 Martin Liska <mliska@suse.cz>
20259 PR gcov-profile/84548
20260 * gcov.c (process_file): Allow partial overlap and consider it
20261 also as group functions.
20262 (output_lines): Properly calculate range of lines for a group.
20264 2018-02-27 Martin Liska <mliska@suse.cz>
20266 * timevar.c (timer::print_row): Remove 'usr', 'sys', 'wall' and
20267 'ggc' suffixes. Change first column width.
20268 (timer::print): Fix formatting of the column.
20270 2018-02-27 Alexandre Oliva <aoliva@redhat.com>
20272 * tree-ssa-live.c (remove_unused_scope_block_p): Do not
20273 preserve inline entry blocks for the sake of debug inline
20274 entry point markers alone.
20275 (remove_unused_locals): Suggest in comments a better place to
20276 force the preservation of inline entry blocks that are
20277 otherwise unused, but do not preserve them.
20279 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
20281 * config/i386/i386.c (ix86_output_indirect_jmp): Update comments.
20283 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
20286 * config/i386/constraints.md (Bs): Replace
20287 ix86_indirect_branch_register with
20288 TARGET_INDIRECT_BRANCH_REGISTER.
20290 * config/i386/i386.md (indirect_jump): Likewise.
20291 (tablejump): Likewise.
20292 (*sibcall_memory): Likewise.
20293 (*sibcall_value_memory): Likewise.
20294 Peepholes of indirect call and jump via memory: Likewise.
20295 (*sibcall_GOT_32): Disallowed for TARGET_INDIRECT_BRANCH_REGISTER.
20296 (*sibcall_value_GOT_32): Likewise.
20297 * config/i386/predicates.md (indirect_branch_operand): Likewise.
20298 (GOT_memory_operand): Likewise.
20299 (call_insn_operand): Likewise.
20300 (sibcall_insn_operand): Likewise.
20301 (GOT32_symbol_operand): Likewise.
20302 * config/i386/i386.h (TARGET_INDIRECT_BRANCH_REGISTER): New.
20304 2018-02-26 Eric Botcazou <ebotcazou@adacore.com>
20306 PR rtl-optimization/83496
20307 * reorg.c (steal_delay_list_from_target): Change REDUNDANT array from
20308 booleans to RTXes. Call fix_reg_dead_note on every non-null element.
20309 (steal_delay_list_from_fallthrough): Call fix_reg_dead_note on a
20310 redundant insn, if any.
20311 (relax_delay_slots): Likewise.
20312 (update_reg_unused_notes): Rename REDUNDANT_INSN to OTHER_INSN.
20314 2018-02-26 Richard Sandiford <richard.sandiford@linaro.org>
20316 PR tree-optimization/83965
20317 * tree-vect-patterns.c (vect_reassociating_reduction_p): Assume
20318 that grouped statements are part of a reduction chain. Return
20319 true if the statement is not marked as a reduction itself but
20320 is part of a group.
20321 (vect_recog_dot_prod_pattern): Don't check whether the statement
20322 is part of a group here.
20323 (vect_recog_sad_pattern): Likewise.
20324 (vect_recog_widen_sum_pattern): Likewise.
20326 2018-02-26 Eric Botcazou <ebotcazou@adacore.com>
20329 * final.c (rest_of_clean_state): Also look for calls inside sequences.
20331 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
20334 * config/i386/i386-protos.h (ix86_output_indirect_jmp): Remove
20336 (ix86_output_indirect_function_return): New prototype.
20337 (ix86_split_simple_return_pop_internal): Likewise.
20338 * config/i386/i386.c (indirect_return_via_cx): New.
20339 (indirect_return_via_cx_bnd): Likewise.
20340 (indirect_thunk_name): Handle return va CX_REG.
20341 (output_indirect_thunk_function): Create alias for
20342 __x86_return_thunk_[re]cx and __x86_return_thunk_[re]cx_bnd.
20343 (ix86_output_indirect_jmp): Remove the bool argument.
20344 (ix86_output_indirect_function_return): New function.
20345 (ix86_split_simple_return_pop_internal): Likewise.
20346 * config/i386/i386.md (*indirect_jump): Don't pass false
20347 to ix86_output_indirect_jmp.
20348 (*tablejump_1): Likewise.
20349 (simple_return_pop_internal): Change it to define_insn_and_split.
20350 Call ix86_split_simple_return_pop_internal to split it for
20351 -mfunction-return=.
20352 (simple_return_indirect_internal): Call
20353 ix86_output_indirect_function_return instead of
20354 ix86_output_indirect_jmp.
20356 2018-02-26 Jakub Jelinek <jakub@redhat.com>
20359 * vec.h (vec_default_construct): For BROKEN_VALUE_INITIALIZATION use
20360 memset and value initialization afterwards.
20362 2018-02-26 Christophe Lyon <christophe.lyon@linaro.org>
20364 * Makefile.in (lto-wrapper): Use ALL_LINKERFLAGS.
20366 2018-02-26 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
20369 * common/config/aarch64/aarch64-common.c
20370 (aarch_option_optimization_table[]): Switch
20371 off fomit-frame-pointer
20373 2018-02-26 Kito Cheng <kito.cheng@gmail.com>
20374 Chung-Ju Wu <jasonwucj@gmail.com>
20376 * config/nds32/nds32-multiple.md (load_multiple): Disallow
20378 (store_multiple): Ditto.
20380 2018-02-26 Kito Cheng <kito.cheng@gmail.com>
20382 * config.gcc: Add --with-cpu support for nds32 target.
20383 * config/nds32/nds32-opts.h (nds32_cpu_type): New.
20384 * config/nds32/nds32.opt: Add -mcpu= option.
20386 2018-02-25 Segher Boessenkool <segher@kernel.crashing.org>
20388 * config/rs6000/rs6000.opt (mvrsave=no, mvrsave=yes, isel=no,
20389 isel=yes): Warn for these deprecated options.
20391 2018-02-23 David Edelsohn <dje.gcc@gmail.com>
20393 * config/rs6000/aix71.h (TARGET_DEFAULT): Change to
20394 ISA_2_5_MASKS_EMBEDDED.
20396 2018-02-23 Jakub Jelinek <jakub@redhat.com>
20398 * ipa-prop.c (ipa_vr_ggc_hash_traits::hash): Hash p->min and
20399 p->max as pointers rather than using iterative_hash_expr.
20401 2018-02-23 Carl Love <cel@us.ibm.com>
20403 * config/rs6000/rs6000-builtin.def: Change VSIGNED2 and VUNSIGNED2
20404 macro expansions from BU_VSX_2 to BU_P8V_VSX_2 and BU_VSX_OVERLOAD_2 to
20406 * config/rs6000/rs6000-c.c: Change VSX_BUILTIN_VEC_VSIGNED2 to
20407 P8V_BUILTIN_VEC_VSIGNED2. Change VSX_BUILTIN_VEC_VUNSIGNED2 to
20408 P8V_BUILTIN_VEC_VUNSIGNED2.
20410 2018-02-22 Vladimir Makarov <vmakarov@redhat.com>
20413 * lra-int.h (LRA_UNKNOWN_ALT, LRA_NON_CLOBBERED_ALT): New macros.
20414 * lra.c (lra_set_insn_recog_data, lra_update_insn_recog_data): Use
20416 * lra-constraints.c (curr_insn_transform): Set up
20417 LRA_NON_CLOBBERED_ALT for moves processed on the fast path. Use
20419 (remove_inheritance_pseudos): Use LRA_UNKNOWN_ALT.
20420 * lra-eliminations.c (spill_pseudos): Ditto.
20421 (process_insn_for_elimination): Ditto.
20422 * lra-lives.c (reg_early_clobber_p): Use the new macros.
20423 * lra-spills.c (spill_pseudos): Use LRA_UNKNOWN_ALT and
20424 LRA_NON_CLOBBERED_ALT.
20426 2018-02-22 Martin Sebor <msebor@redhat.com>
20428 PR tree-optimization/84480
20429 * gimple-fold.c (gimple_fold_builtin_strcpy): Move warnings
20430 to maybe_diag_stxncpy_trunc. Call it.
20431 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Integrate warnings
20432 from gimple_fold_builtin_strcpy. Print inlining stack.
20433 (handle_builtin_stxncpy): Print inlining stack.
20434 * tree-ssa-strlen.h (maybe_diag_stxncpy_trunc): Declare.
20436 2018-02-22 H.J. Lu <hongjiu.lu@intel.com>
20439 * config/i386/i386.c (ix86_set_indirect_branch_type): Issue an
20440 error when -mindirect-branch=thunk-extern, -fcf-protection=branch
20441 and -fcheck-pointer-bounds are used together.
20442 (indirect_thunk_prefix): New enum.
20443 (indirect_thunk_need_prefix): New function.
20444 (indirect_thunk_name): Replace need_bnd_p with need_prefix. Use
20445 "_nt" instead of "_bnd" for NOTRACK prefix.
20446 (output_indirect_thunk): Replace need_bnd_p with need_prefix.
20447 (output_indirect_thunk_function): Likewise.
20449 (ix86_code_end): Update output_indirect_thunk_function calls.
20450 (ix86_output_indirect_branch_via_reg): Replace
20451 ix86_bnd_prefixed_insn_p with indirect_thunk_need_prefix.
20452 (ix86_output_indirect_branch_via_push): Likewise.
20453 (ix86_output_function_return): Likewise.
20454 * doc/invoke.texi: Document -mindirect-branch=thunk-extern is
20455 incompatible with -fcf-protection=branch and
20456 -fcheck-pointer-bounds.
20458 2018-02-22 Steve Ellcey <sellcey@cavium.com>
20461 * config/aarch64/aarch64.c (aarch64_print_address_internal):
20462 Change gcc_assert call to output_operand_lossage.
20464 2018-02-22 Steve Ellcey <sellcey@cavium.com>
20466 * doc/extend.texi (__builtin_extend_pointer): Document builtin.
20468 2018-02-22 DJ Delorie <dj@redhat.com>
20469 Sebastian Perta <sebastian.perta@renesas.com>
20470 Oleg Endo <olegendo@gcc.gnu.org>
20472 * config/rx/rx.c (rx_rtx_costs): New function.
20473 (TARGET_RTX_COSTS): Override to use rx_rtx_costs.
20475 2018-02-22 Thomas Preud'homme <thomas.preudhomme@arm.com>
20477 * config/arm/t-multilib: Map Armv8-R to Armv7 multilibs.
20479 2018-02-22 Martin Liska <mliska@suse.cz>
20482 * common/config/arm/arm-common.c (arm_print_hint_for_cpu_option):
20483 Add "native" as a possible value.
20485 2018-02-22 Martin Liska <mliska@suse.cz>
20488 * config/i386/i386.c (ix86_option_override_internal):
20489 Add "native" as a possible value for -march and -mtune.
20491 2018-02-22 Jakub Jelinek <jakub@redhat.com>
20494 * stor-layout.c (finalize_type_size): Propagate TYPE_EMPTY_P flag
20495 to all type variants.
20497 PR tree-optimization/84503
20498 * gimple-ssa-store-merging.c (merged_store_group::merge_into): Compute
20499 width as info->bitpos + info->bitsize - start.
20500 (merged_store_group::merge_overlapping): Simplify width computation.
20501 (check_no_overlap): New function.
20502 (imm_store_chain_info::try_coalesce_bswap): Compute expected
20503 start + width and last_order of the group, fail if check_no_overlap
20505 (imm_store_chain_info::coalesce_immediate_stores): Don't merge info
20506 to group if check_no_overlap fails.
20508 2018-02-21 Segher Boessenkool <segher@kernel.crashing.org>
20510 * config/rs6000/altivec.md: Delete contraint arguments to
20511 define_expand, define_split, and define_peephole2, and in
20512 define_insn_and_split if always unused.
20513 * config/rs6000/darwin.md: Ditto.
20514 * config/rs6000/dfp.md: Ditto.
20515 * config/rs6000/rs6000.md: Ditto.
20516 * config/rs6000/sync.md: Ditto.
20517 * config/rs6000/vector.md: Ditto.
20518 * config/rs6000/vsx.md: Ditto.
20520 2018-02-21 Segher Boessenkool <segher@kernel.crashing.org>
20522 * config/rs6000/altivec.md: Write output control strings as braced
20523 blocks instead of double-quoted strings.
20524 * config/rs6000/darwin.md: Ditto.
20525 * config/rs6000/rs6000.md: Ditto.
20526 * config/rs6000/vector.md: Ditto.
20527 * config/rs6000/vsx.md: Ditto.
20529 2018-02-21 Jason Merrill <jason@redhat.com>
20531 PR c++/84314 - ICE with templates and fastcall attribute.
20532 * attribs.c (build_type_attribute_qual_variant): Remove assert.
20534 2018-02-21 Jan Hubicka <hubicka@ucw.cz>
20536 * ipa-cp.c (determine_versionability): Fix comment typos.
20538 2018-02-21 Jan Hubicka <hubicka@ucw.cz>
20541 * ipa-cp.c (determine_versionability): Do not version functions caling
20544 2018-02-21 Martin Liska <mliska@suse.cz>
20547 * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch):
20548 Add "native" as a possible value.
20549 * config/aarch64/aarch64.h (HAVE_LOCAL_CPU_DETECT): Define
20550 the macro when native cpu detection is available.
20552 2018-02-21 Martin Liska <mliska@suse.cz>
20555 * common/config/arm/arm-common.c (arm_print_hint_for_arch_option):
20556 Add "native" as a possible value.
20557 * config/arm/arm.h (HAVE_LOCAL_CPU_DETECT): Define the macro
20558 when native cpu detection is available.
20560 2018-02-21 Jakub Jelinek <jakub@redhat.com>
20561 Martin Sebor <msebor@redhat.com>
20563 PR tree-optimization/84478
20564 * gimple-fold.h (get_range_strlen): Add a bool argument defaulted to
20566 * gimple-fold.c (get_range_strlen): Make minlen const and assume it
20567 can't be NULL. Change FUZZY from bool to int, for 1 add PHI/COND_EXPR
20568 support which is conservatively correct, for 2 only stay conservative
20569 for maxlen. Formatting and comment capitalization fixes. Add STRICT
20570 argument to the 2 argument get_range_strlen, adjust 6 arg
20571 get_range_strlen caller and clear minmaxlen[0] and [1] if it returned
20573 (get_maxval_strlen): Adjust 6 arg get_range_strlen caller.
20574 (gimple_fold_builtin_strlen): Pass true as last argument to
20577 2018-02-20 Martin Sebor <msebor@redhat.com>
20579 PR middle-end/84095
20580 * gimple-ssa-warn-restrict.c (builtin_memref::extend_offset_range): New.
20581 (builtin_memref::set_base_and_offset): Same. Handle inner references.
20582 (builtin_memref::builtin_memref): Factor out parts into
20583 set_base_and_offset and call it.
20585 2018-02-20 Richard Sandiford <richard.sandiford@linaro.org>
20587 PR middle-end/84406
20588 * optabs-query.c (find_widening_optab_handler_and_mode): If from_mode
20589 is a scalar_int_mode, assert that to_mode is a scalar_int_mode with
20590 greater precision. If to_mode is a MODE_PARTIAL_INT, stop the
20591 search at the associated MODE_INT.
20593 2018-02-20 Jeff Law <law@redhat.com>
20595 PR middle-end/82123
20596 PR tree-optimization/81592
20597 PR middle-end/79257
20598 * gimple-ssa-sprintf.c (format_integer): Query EVRP range analyzer
20599 for range data rather than using global data.
20600 * gimple-ssa-sprintf.c (get_int_range): Query EVRP range analyzer for
20601 range data rather than using global data.
20602 * gimple-ssa-sprintf.c (get_int_range): Accept vr_values parameter
20603 pass it to children as needed.
20604 (struct directive::fmtresult): Similarly.
20605 (struct directive::set_width): Similarly.
20606 (struct directive::set_precision): Similarly.
20607 (format_integer, format_directive, parse_directive): Similarly.
20608 (format_none): Accept unnamed vr_values parameter.
20609 (format_percent, format_floating, format_character): Similarly.
20610 (format_string, format_plain): Similarly.
20611 * gimple-ssa-sprintf.c (sprintf_dom_walker::handle_gimple_call): Query
20612 the EVRP range analyzer for range data rather than using global data.
20613 * gimple-ssa-sprintf.c: Include alloc-pool.h, vr-values.h and
20614 gimple-ssa-evrp-analyze.h
20615 (class sprintf_dom_walker): Add after_dom_children member function.
20616 Add evrp_range_analyzer member.
20617 (sprintf_dom_walker::before_dom_children): Call into the EVRP
20618 range analyzer as needed.
20619 (sprintf_dom_walker::after_dom_children): New member function.
20620 * gimple-ssa-evrp-analyze.c (evrp_range_analyzer::enter): Do nothing
20622 (evrp_range_analyzer::record_ranges_from_stmt): Likewise.
20623 (evrp_range_analyzer::pop_to_marker): Likewise.
20625 2018-02-20 Richard Sandiford <richard.sandiford@linaro.org>
20627 PR tree-optimization/84419
20628 * internal-fn.c (expand_call_mem_ref): Create a TARGET_MEM_REF
20629 with the required type if its current type is compatible but
20632 2018-02-20 Jakub Jelinek <jakub@redhat.com>
20634 PR middle-end/82004
20635 * match.pd (pow(C,x) -> exp(log(C)*x)): Delay all folding until
20636 after vectorization.
20638 2018-02-20 Martin Liska <mliska@suse.cz>
20641 * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch): Print
20642 possible values if we don't have a hint.
20644 2018-02-20 Martin Liska <mliska@suse.cz>
20648 * final.c (shorten_branches): Build align_tab array with one
20650 * opts.c (finish_options): Add alignment option limit check.
20651 (MAX_CODE_ALIGN): Likewise.
20652 (MAX_CODE_ALIGN_VALUE): Likewise.
20653 * doc/invoke.texi: Document maximum allowed option value for
20654 all -falign-* options.
20656 2018-02-19 Jakub Jelinek <jakub@redhat.com>
20659 * reg-notes.def (REG_CALL_ARG_LOCATION): New reg note.
20660 * insn-notes.def (NOTE_INSN_CALL_ARG_LOCATION): Remove.
20661 * var-tracking.c (emit_note_insn_var_location): Remove all references
20662 to NOTE_INSN_CALL_ARG_LOCATION.
20663 (emit_notes_in_bb): Emit arguments as REG_CALL_ARG_LOCATION note on
20664 the CALL_INSN rather than separate NOTE_INSN_CALL_ARG_LOCATION note.
20665 Use copy_rtx_if_shared.
20666 * dwarf2out.c (gen_subprogram_die): Use XEXP with 0 instead of
20667 NOTE_VAR_LOCATION on ca_loc->call_arg_loc_note.
20668 (dwarf2out_var_location): Remove handling of
20669 NOTE_INSN_CALL_ARG_LOCATION, instead handle REG_CALL_ARG_LOCATION note
20671 * final.c (final_scan_insn): Remove all references to
20672 NOTE_INSN_CALL_ARG_LOCATION.
20673 (rest_of_clean_state): Likewise. Remove REG_CALL_ARG_LOCATION notes
20674 before dumping final insns.
20675 * except.c (emit_note_eh_region_end): Remove all references to
20676 NOTE_INSN_CALL_ARG_LOCATION.
20677 * config/alpha/alpha.c (alpha_pad_function_end): Likewise.
20678 * config/c6x/c6x.c (c6x_gen_bundles): Likewise.
20679 * config/arc/arc.c (hwloop_optimize): Likewise.
20680 * config/arm/arm.c (create_fix_barrier): Likewise.
20681 * config/s390/s390.c (s390_chunkify_start): Likewise.
20682 * config/sh/sh.c (find_barrier): Likewise.
20683 * config/i386/i386.c (rest_of_insert_endbranch,
20684 ix86_seh_fixup_eh_fallthru): Likewise.
20685 * config/xtensa/xtensa.c (hwloop_optimize): Likewise.
20686 * config/iq2000/iq2000.c (final_prescan_insn): Likewise.
20687 * config/frv/frv.c (frv_function_prologue): Likewise.
20688 * emit-rtl.c (try_split): Likewise. Copy over REG_CALL_ARG_LOCATION
20690 (note_outside_basic_block_p): Remove all references to
20691 NOTE_INSN_CALL_ARG_LOCATION.
20692 * gengtype.c (adjust_field_rtx_def): Likewise.
20693 * print-rtl.c (rtx_writer::print_rtx_operand_code_0, print_insn):
20695 * jump.c (cleanup_barriers, delete_related_insns): Likewise.
20696 * cfgrtl.c (force_nonfallthru_and_redirect): Likewise.
20699 * builtins.c (builtin_mathfn_code): Don't check if CALL_EXPR_FN (t)
20702 PR tree-optimization/84452
20703 * tree-vect-patterns.c (vect_recog_pow_pattern): Don't call
20704 expand_simd_clones if targetm.simd_clone.compute_vecsize_and_simdlen
20707 2018-02-19 Martin Liska <mliska@suse.cz>
20710 * passes.def: Put pass_sancov_O0 before pass_lower_switch with -O0.
20712 2018-02-19 Martin Liska <mliska@suse.cz>
20713 Richard Sandiford <richard.sandiford@linaro.org>
20715 PR tree-optimization/82491
20716 * gimple-fold.c (get_base_constructor): Make earlier bail out
20719 2018-02-19 Carl Love <cel@us.ibm.com>
20721 * config/rs6000/rs6000-builtin.def: Change NEG macro expansions from
20722 BU_ALTIVEC_A to BU_P8V_AV_1 and BU_ALTIVEC_OVERLOAD_1 to
20724 * config/rs6000/rs6000-c.c: Change ALTIVEC_BUILTIN_VEC_NEG to
20725 P8V_BUILTIN_VEC_NEG.
20727 2018-02-19 Sebastian Perta <sebastian.perta@renesas.com>
20729 * config/rl78/rl78.md (movdf): New define expand.
20731 2018-02-19 Martin Liska <mliska@suse.cz>
20734 * doc/invoke.texi: Fix typo.
20735 * params.def (PARAM_MAX_LOOP_HEADER_INSNS): Likewise.
20737 2018-02-18 Segher Boessenkool <segher@kernel.crashing.org>
20739 * config/rs6000/rs6000.c (rs6000_option_override_internal): Don't
20740 handle rs6000_single_float and rs6000_double_float specially for
20743 2018-02-16 Jeff Law <law@redhat.com>
20745 * config/rx/rx.c (add_pop_cfi_notes): New function.;
20746 (pop_regs): Use it.
20748 2018-02-16 Jakub Jelinek <jakub@redhat.com>
20751 * ipa-inline.c (inline_small_functions): Fix a typo.
20753 2018-02-16 Nathan Sidwell <nathan@acm.org>
20755 * doc/extend.texi (Backwards Compatibility): Americanize 'behaviour'.
20757 2018-02-16 Carl Love <cel@us.ibm.com>
20759 * config/rs6000/rs6000-builtin.def: Add BU_P8V_VSX_2 macro definition.
20760 Change FLOAT2 expansions from BU_VSX_2 to BU_P8V_VSX_2 and
20761 from BU_VSX_OVERLOAD_2 to BU_P8V_OVERLOAD_2.
20762 * config/rs6000/rs6000-c.c: Changed macro VSX_BUILTIN_VEC_FLOAT2
20763 expansion to P8V_BUILTIN_VEC_FLOAT2.
20765 2018-02-16 Vladimir Makarov <vmakarov@redhat.com>
20767 PR rtl-optimization/70023
20768 * lra-constraints.c (inherit_in_ebb): Take hard reg mode of
20769 src_regno into account.
20771 2018-02-16 Carl Love <cel@us.ibm.com>
20773 * config/rs6000/altivec.h: Remove vec_vextract4b and vec_vinsert4b.
20774 * config/rs6000/rs6000-builtin.def: Remove macro expansion for
20775 VEXTRACT4B, VINSERT4B, VINSERT4B_DI and VEXTRACT4B.
20776 * config/rs6000/rs6000.c: Remove case statements for
20777 P9V_BUILTIN_VEXTRACT4B, P9V_BUILTIN_VEC_VEXTRACT4B,
20778 P9V_BUILTIN_VINSERT4B, P9V_BUILTIN_VINSERT4B_DI,
20779 and P9V_BUILTIN_VEC_VINSERT4B.
20780 * config/rs6000/rs6000-c.c (altivec_expand_builtin): Remove entries for
20781 P9V_BUILTIN_VEC_VEXTRACT4B and P9V_BUILTIN_VEC_VINSERT4B.
20782 * config/rs6000/vsx.md:
20783 * doc/extend.texi: Remove vec_vextract4b, non ABI definitions for
20786 2018-02-16 Carl Love <cel@us.ibm.com>
20788 * config/rs6000/altivec.h: Add builtin names vec_extract4b
20790 * config/rs6000/rs6000-builtin.def: Add INSERT4B and EXTRACT4B
20792 * config/rs6000/rs6000-c.c: Add the definitions for
20793 P9V_BUILTIN_VEC_EXTRACT4B and P9V_BUILTIN_VEC_INSERT4B.
20794 * config/rs6000/rs6000.c (altivec_expand_builtin): Add
20795 P9V_BUILTIN_EXTRACT4B and P9V_BUILTIN_INSERT4B case statements.
20796 * config/rs6000/vsx.md: Add define_insn extract4b. Add define_expand
20797 definition for insert4b and define insn *insert3b_internal.
20798 * doc/extend.texi: Add documentation for vec_extract4b.
20800 2018-02-16 Nathan Sidwell <nathan@acm.org>
20802 * doc/extend.texi (Backwards Compatibility): Mention friend
20803 injection. Note for-scope is deprecated.
20804 * doc/invoke.texi (-ffriend-injection): Deprecate.
20806 2018-02-16 Segher Boessenkool <segher@kernel.crashing.org>
20808 * combine.c (try_combine): When adjusting LOG_LINKS for the destination
20809 that moved to I2, also allow destinations that are a paradoxical
20810 subreg (instead of a normal reg).
20812 2018-02-16 Oleg Endo <olegendo@gcc.gnu.org>
20815 * config/rx/rx.c (rx_fuse_in_memory_bitop): Convert shift operand
20818 2018-02-16 Richard Biener <rguenther@suse.de>
20820 PR tree-optimization/84037
20821 PR tree-optimization/84016
20823 * config/i386/i386.c (ix86_builtin_vectorization_cost):
20824 Adjust vec_construct for the fact we need additional higher latency
20825 128bit inserts for AVX256 and AVX512 vector builds.
20826 (ix86_add_stmt_cost): Scale vector construction cost for
20829 2018-02-16 Richard Biener <rguenther@suse.de>
20831 PR tree-optimization/84417
20832 * tree-ssa.c (non_rewritable_mem_ref_base): Properly constrain
20833 the MEM_REF offset when conversion to BIT_FIELD_REF is desired.
20834 (non_rewritable_lvalue_p): Likewise, use poly-ints.
20836 2018-02-16 Martin Liska <mliska@suse.cz>
20839 * internal-fn.def (ASAN_CHECK): Set proper flags.
20840 (ASAN_MARK): Likewise.
20842 2018-02-16 Julia Koval <julia.koval@intel.com>
20844 * config/i386/i386.c (ix86_option_override_internal): Remove PTA_CLWB
20845 from PTA_CANNONLAKE.
20847 2018-02-16 Jakub Jelinek <jakub@redhat.com>
20850 * config/aarch64/cortex-a57-fma-steering.c (fma_forest::merge_forest):
20851 Use ++iter rather than iter++ for std::list iterators.
20852 (func_fma_steering::dfs): Likewise. Don't delete nodes right away,
20853 defer deleting them until all nodes in the forest are processed. Do
20854 free even leaf nodes. Change to_process into auto_vec.
20857 * system.h (BROKEN_VALUE_INITIALIZATION): Define for GCC < 4.3.
20858 * vec.h (vec_default_construct): Use memset instead of placement new
20859 if BROKEN_VALUE_INITIALIZATION is defined.
20860 * hash-table.h (hash_table<Descriptor, Allocator>::empty_slow): Use
20861 memset instead of value initialization if BROKEN_VALUE_INITIALIZATION
20864 PR rtl-optimization/83723
20865 * lra-int.h (lra_substitute_pseudo): Add DEBUG_P argument.
20866 * lra.c (lra_substitute_pseudo): Likewise. If true, use
20867 gen_rtx_raw_SUBREG instead of gen_rtx_SUBREG. Pass DEBUG_P to
20869 (lra_substitute_pseudo_within_insn): Adjust lra_substitute_pseudo
20871 * lra-constraints.c (inherit_reload_reg, split_reg): Likewise.
20873 2018-02-16 Eric Botcazou <ebotcazou@adacore.com>
20875 PR rtl-optimization/81443
20876 * rtlanal.c (num_sign_bit_copies1) <SUBREG>: Do not propagate results
20877 from inner REGs to paradoxical SUBREGs.
20879 2018-02-16 Richard Biener <rguenther@suse.de>
20881 PR tree-optimization/84399
20882 * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
20883 For operands we can analyze at their definition make sure we can
20884 analyze them at each use as well.
20886 2018-02-16 Richard Biener <rguenther@suse.de>
20888 PR tree-optimization/84190
20889 * tree-ssa.c (non_rewritable_mem_ref_base): Do not touch
20890 volatile accesses if the decl isn't volatile.
20892 2018-02-15 Jason Merrill <jason@redhat.com>
20894 PR c++/84314 - ICE with templates and fastcall attribute.
20895 * attribs.c (build_type_attribute_qual_variant): Don't clobber
20896 TYPE_CANONICAL on an existing type.
20898 2018-02-15 Jakub Jelinek <jakub@redhat.com>
20900 PR tree-optimization/84383
20901 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Don't look at
20902 dstoff nor call operand_equal_p if dstbase is NULL.
20904 PR tree-optimization/84334
20905 * match.pd ((A +- CST1) +- CST2 -> A + CST3): If A is
20906 also a CONSTANT_CLASS_P, punt.
20908 2018-02-14 Jim Wilson <jimw@sifive.com>
20910 * config/riscv/riscv.c (riscv_first_stack_step): Move locals after
20911 first SMALL_OPERAND check. New local min_second_step. Move assert
20912 to where locals are set. Add TARGET_RVC support.
20913 * config/riscv/riscv.h (C_SxSP_BITS, SWSP_REACH, SDSP_REACH): New.
20915 2018-02-14 Indu Bhagat <indu.bhagat@oracle.com>
20917 * doc/invoke.texi: Correct -Wformat-overflow code sample.
20919 2018-02-14 Martin Sebor <msebor@redhat.com>
20921 PR tree-optimization/83698
20922 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For
20923 arrays constrain the offset range to their bounds.
20924 (builtin_access::strcat_overlap): Adjust the bounds of overlap offset.
20925 (builtin_access::overlap): Avoid setting the size of overlap if it's
20927 (maybe_diag_overlap): Also consider arrays when deciding what values
20928 of offsets to include in diagnostics.
20930 2018-02-14 Martin Sebor <msebor@redhat.com>
20933 * attribs.c (diag_attr_exclusions): Consider the exclusion(s)
20934 that correspond to the kind of a declaration.
20936 2018-02-14 John David Anglin <danglin@gcc.gnu.org>
20939 * config/pa/pa.md: Load address of PIC label using the linkage table
20940 if the label is nonlocal.
20942 2018-02-14 Kelvin Nilsen <kelvin@gcc.gnu.org>
20944 * config/rs6000/rs6000.c (rs6000_option_override_internal): Issue
20945 warning message if user requests -maltivec=be.
20946 * doc/invoke.texi: Document deprecation of -maltivec=be.
20948 2018-02-14 Will Schmidt <will_schmidt@vnet.ibm.com>
20951 * config/rs6000/rs6000-c.c: Update definitions for
20952 ALTIVEC_BUILTIN_VEC_SLD, ALTIVEC_BUILTIN_VEC_SLDW,
20953 VEC_XXSLDWI and ALTIVEC_BUILTIN_VEC_XXPERMDI builtins.
20955 2018-02-14 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
20958 * config/i386/cetintrin.h: Remove _rdssp[d|q] and
20959 add _get_ssp intrinsics. Remove argument from
20960 __builtin_ia32_rdssp[d|q].
20961 * config/i386/i386-builtin-types.def: Add UINT_FTYPE_VOID.
20962 * config/i386/i386-builtin.def: Remove argument from
20963 __builtin_ia32_rdssp[d|q].
20964 * config/i386/i386.c: Use UINT_FTYPE_VOID. Use
20965 ix86_expand_special_args_builtin for _rdssp[d|q].
20966 * config/i386/i386.md: Remove argument from rdssp[si|di] insn.
20967 Clear register before usage.
20968 * doc/extend.texi: Remove argument from __builtin_ia32_rdssp[d|q].
20969 Add documentation for new _get_ssp and _inc_ssp intrinsics.
20971 2018-02-14 Richard Sandiford <richard.sandiford@linaro.org>
20973 PR tree-optimization/84357
20974 * tree-data-ref.c (object_address_invariant_in_loop_p): Check
20975 operand 1 of an ARRAY_REF too.
20977 2018-02-14 Oleg Endo <olegendo@gcc.gnu.org>
20980 * config/rx/rx-protos.h (rx_reg_dead_or_unused_after_insn,
20981 rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
20983 (set_of_reg): New struct.
20984 (rx_find_set_of_reg, rx_find_use_of_reg): New functions.
20985 * config/rx/rx.c (rx_reg_dead_or_unused_after_insn,
20986 rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
20988 * config/rx/rx.md (andsi3, iorsi3, xorsi3): Convert to insn_and_split.
20989 Split into bitclr, bitset, bitinvert patterns if appropriate.
20990 (*bitset, *bitinvert, *bitclr): Convert to named insn_and_split and
20991 use rx_fuse_in_memory_bitop.
20992 (*bitset_in_memory, *bitinvert_in_memory, *bitclr_in_memory): Convert
20993 to named insn, correct maximum insn length.
20995 2018-02-14 Jozef Lawrynowicz <jozefl.gcc@gmail.com>
20998 * machmode.def: Define a complex mode for PARTIAL_INT.
20999 * genmodes.c (complex_class): Return MODE_COMPLEX_INT for
21001 * doc/rtl.texi: Document CSPImode.
21002 * config/msp430/msp430.c (msp430_hard_regno_nregs): Add CPSImode
21004 (msp430_hard_regno_nregs_with_padding): Likewise.
21006 2018-02-13 Peter Bergner <bergner@vnet.ibm.com>
21009 * config/rs6000/rs6000.c (mem_operand_gpr): Disallow altivec addresses.
21011 2018-02-13 Segher Boessenkool <segher@kernel.crashing.org>
21013 PR rtl-optimization/84169
21014 * combine.c (try_combine): New variable split_i2i3. Set it to true if
21015 we generated a parallel as new i3 and we split that to new i2 and i3
21016 instructions. Handle split_i2i3 similar to swap_i2i3: scan the
21017 LOG_LINKs of i3 to see which of those need to link to i2 now. Link
21018 those to i2, not i1. Partially rewrite this scan code.
21020 2018-02-13 Jakub Jelinek <jakub@redhat.com>
21023 * stor-layout.c (place_field): For variable length fields, adjust
21024 offset_align afterwards not just based on the field's alignment,
21025 but also on the size.
21027 PR middle-end/84309
21028 * match.pd (pow(C,x) -> exp(log(C)*x)): Use exp2s and log2s instead
21029 of exps and logs in the use_exp2 case.
21031 2018-02-13 Jeff Law <law@redhat.com>
21033 * config/rl/rl78.c (rl78_attribute_table): Fix terminator and
21034 entry for "vector".
21036 * config/rl78/rl78.c (rl78_handle_func_attribute): Mark
21039 2018-02-13 Alexandre Oliva <aoliva@redhat.com>
21043 * common.opt (gas-loc-support, gas-locview-support): New.
21044 (ginline-points, ginternal-reset-location-views): New.
21045 * doc/invoke.texi: Document them. Use @itemx where intended.
21046 (gvariable-location-views): Adjust.
21047 * target.def (reset_location_view): New.
21048 * doc/tm.texi.in (DWARF2_ASM_VIEW_DEBUG_INFO): New.
21049 (TARGET_RESET_LOCATION_VIEW): New.
21050 * doc/tm.texi: Rebuilt.
21051 * dwarf2out.c (dwarf2out_default_as_loc_support): New.
21052 (dwarf2out_default_as_locview_support): New.
21053 (output_asm_line_debug_info): Use option variables.
21054 (dwarf2out_maybe_output_loclist_view_pair): Likewise.
21055 (output_loc_list): Likewise.
21056 (add_high_low_attributes): Check option variables.
21057 Don't output entry view attribute in strict mode.
21058 (gen_inlined_subroutine_die): Check option variables.
21059 (dwarf2out_inline_entry): Likewise.
21060 (init_sections_and_labels): Likewise.
21061 (dwarf2out_early_finish): Likewise.
21062 (maybe_reset_location_view): New, from...
21063 (dwarf2out_var_location): ... here. Call it.
21064 * debug.h (dwarf2out_default_as_loc_support): Declare.
21065 (dwarf2out_default_as_locview_support): Declare.
21066 * hooks.c (hook_int_rtx_insn_0): New.
21067 * hooks.h (hook_int_rtx_insn_0): Declare.
21068 * toplev.c (process_options): Take -gas-loc-support and
21069 -gas-locview-support from dwarf2out. Enable
21070 -gvariable-location-views by default only with locview
21071 assembler support. Enable -ginternal-reset-location-views by
21072 default only if the target defines the corresponding hook.
21073 Enable -ginline-points by default if location views are
21074 enabled; force it disabled if statement frontiers are
21076 * tree-inline.c (expand_call_inline): Check option variables.
21077 * tree-ssa-live.c (remove_unused_scope_block_p): Likewise.
21079 2018-02-13 Richard Sandiford <richard.sandiford@linaro.org>
21081 PR tree-optimization/84321
21082 * tree-vrp.c (intersect_range_with_nonzero_bits): Fix VR_ANTI_RANGE
21083 handling. Also check whether the anti-range contains any values
21084 that satisfy the mask; switch to a VR_RANGE if not.
21086 2018-02-13 Paolo Bonzini <bonzini@gnu.org>
21089 * internal-fn.def (ASAN_CHECK, ASAN_MARK): Revert changes to fnspec.
21091 2018-02-13 Martin Jambor <mjambor@suse.cz>
21094 * ipa-param-manipulation.c (ipa_modify_call_arguments): Use location
21095 of call statements, also set location of a load to a temporary.
21097 2018-02-13 Sebastian Perta <sebastian.perta@renesas.com>
21099 * config/rl78/rl78.c (add_vector_labels): New function.
21100 * config/rl78/rl78.c (rl78_handle_vector_attribute): New function.
21101 * config/rl78/rl78.c (rl78_start_function): Call add_vector_labels.
21102 * config/rl78/rl78.c (rl78_handle_func_attribute): Removed the assert
21103 which checks that no arguments are passed.
21104 * config/rl78/rl78.c (rl78_attribute_table): Add "vector" attribute.
21105 * doc/extend.texi: Documentation for the new attribute.
21107 2018-02-13 Andreas Schwab <schwab@suse.de>
21109 * config/riscv/linux.h (CPP_SPEC): Define.
21111 2018-02-13 Jakub Jelinek <jakub@redhat.com>
21114 * config/i386/i386.c (ix86_init_mmx_sse_builtins): Pass
21115 OPTION_MASK_ISA_AES | OPTION_MASK_ISA_SSE2 instead of
21116 OPTION_MASK_ISA_AES as first argument to def_builtin_const
21117 for AES builtins. Pass OPTION_MASK_ISA_PCLMUL | OPTION_MASK_ISA_SSE2
21118 instead of OPTION_MASK_ISA_PCLMUL as first argument to
21119 def_builtin_const for __builtin_ia32_pclmulqdq128 builtin.
21120 * config/i386/wmmintrin.h: If __SSE2__ is not defined, enable it
21121 temporarily for AES and PCLMUL builtins.
21123 PR tree-optimization/84339
21124 * gimple-fold.c (get_range_strlen): Set *FLEXP to true when handling
21125 ARRAY_REF where first operand is array_at_struct_end_p COMPONENT_REF.
21128 PR middle-end/84309
21129 * match.pd (pow(C,x) -> exp(log(C)*x)): Optimize instead into
21130 exp2(log2(C)*x) if C is a power of 2 and c99 runtime is available.
21131 * generic-match-head.c (canonicalize_math_after_vectorization_p): New
21133 * gimple-match-head.c (canonicalize_math_after_vectorization_p): New
21135 * omp-simd-clone.h: New file.
21136 * omp-simd-clone.c: Include omp-simd-clone.h.
21137 (expand_simd_clones): No longer static.
21138 * tree-vect-patterns.c: Include fold-const-call.h, attribs.h,
21139 cgraph.h and omp-simd-clone.h.
21140 (vect_recog_pow_pattern): Optimize pow(C,x) to exp(log(C)*x).
21141 (vect_recog_widen_shift_pattern): Formatting fix.
21142 (vect_pattern_recog_1): Don't check optab for calls.
21145 * config/i386/sse.md (<avx512>_vpermi2var<mode>3_mask): Force
21146 operands[2] into a REG before using gen_lowpart on it.
21148 2018-02-12 Jeff Law <law@redhat.com>
21151 * config/sh/sh.c (find_barrier): Consider a sibling call
21154 * cse.c (try_back_substitute_reg): Move any REG_ARGS_SIZE note when
21155 successfully back substituting a reg.
21157 2018-02-12 Richard Biener <rguenther@suse.de>
21159 PR tree-optimization/84037
21160 * tree-vect-slp.c (vect_analyze_slp_cost): Add visited
21161 parameter, move visited init to caller.
21162 (vect_slp_analyze_operations): Separate cost from validity
21163 check, initialize visited once for all instances.
21164 (vect_schedule_slp): Analyze map to CSE vectorized nodes once
21166 * tree-vect-stmts.c (vect_model_simple_cost): Make early
21168 (vect_model_promotion_demotion_cost): Likewise.
21169 (vectorizable_bswap): Guard cost modeling with !slp_node
21170 instead of !PURE_SLP_STMT to avoid double-counting on hybrid
21172 (vectorizable_call): Likewise.
21173 (vectorizable_conversion): Likewise.
21174 (vectorizable_assignment): Likewise.
21175 (vectorizable_shift): Likewise.
21176 (vectorizable_operation): Likewise.
21177 (vectorizable_store): Likewise.
21178 (vectorizable_load): Likewise.
21179 (vectorizable_condition): Likewise.
21180 (vectorizable_comparison): Likewise.
21182 2018-02-12 Paolo Bonzini <bonzini@gnu.org>
21185 * internal-fn.def (ASAN_CHECK): Fix fnspec to account for return value.
21186 (ASAN_MARK): Fix fnspec to account for return value, change pointer
21187 argument from 'R' to 'W' so that the pointed-to datum is clobbered.
21189 2018-02-08 Jan Hubicka <hubicka@ucw.cz>
21191 PR middle-end/83665
21192 * params.def (inline-min-speedup): Increase from 8 to 15.
21193 (max-inline-insns-auto): Decrease from 40 to 30.
21194 * ipa-split.c (consider_split): Add some buffer for function to
21195 be considered inlining candidate.
21196 * invoke.texi (max-inline-insns-auto, inline-min-speedup): UPdate
21199 2018-02-12 Richard Biener <rguenther@suse.de>
21201 PR tree-optimization/84037
21202 * tree-vect-slp.c (vect_build_slp_tree_2): Try swapping the
21203 matched stmts if we cannot swap the non-matched ones.
21205 2018-02-12 Olga Makhotina <olga.makhotina@intel.com>
21207 * config/i386/avx512fintrin.h (_mm_mask_scalef_round_sd,
21208 _mm_maskz_scalef_round_sd, _mm_mask_scalef_round_ss,
21209 _mm_maskz_scalef_round_ss): New intrinsics.
21210 (__builtin_ia32_scalefsd_round, __builtin_ia32_scalefss_round): Fix.
21211 * config/i386/i386-builtin.def (__builtin_ia32_scalefsd_round,
21212 __builtin_ia32_scalefss_round): Remove.
21213 (__builtin_ia32_scalefsd_mask_round,
21214 __builtin_ia32_scalefss_mask_round): New intrinsics.
21215 * config/i386/sse.md (vmscalef<mode><round_name>): Renamed to ...
21216 (vmscalef<mode><mask_scalar_name><round_scalar_name>): ... this.
21217 ((match_operand:VF_128 2 "<round_nimm_predicate>"
21218 "<round_constraint>")): Changed to ...
21219 ((match_operand:VF_128 2 "<round_scalar_nimm_predicate>"
21220 "<round_scalar_constraint>")): ... this.
21221 ("vscalef<ssescalarmodesuffix>\t{<round_op3>%2, %1, %0|
21222 %0, %1, %2<round_op3>}"): Changed to ...
21223 ("vscalef<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%2, %1,
21224 %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %1,
21225 %2<round_scalar_mask_op3>}"): ... this.
21226 * config/i386/subst.md (round_scalar_nimm_predicate): New.
21228 2018-02-12 Olga Makhotina <olga.makhotina@intel.com>
21230 * config/i386/avx512fintrin.h (_mm_mask_sqrt_round_sd)
21231 (_mm_maskz_sqrt_round_sd, _mm_mask_sqrt_round_ss)
21232 (_mm_maskz_sqrt_round_ss): New intrinsics.
21233 (__builtin_ia32_sqrtsd_round, __builtin_ia32_sqrtss_round): Remove.
21234 (__builtin_ia32_sqrtsd_mask_round)
21235 (__builtin_ia32_sqrtss_mask_round): New builtins.
21236 * config/i386/i386-builtin.def (__builtin_ia32_sqrtsd_round)
21237 (__builtin_ia32_sqrtss_round): Remove.
21238 (__builtin_ia32_sqrtsd_mask_round)
21239 (__builtin_ia32_sqrtss_mask_round): New builtins.
21240 * config/i386/sse.md (vmsqrt<mode>2<round_name>): Renamed to ...
21241 (vmsqrt<mode>2<mask_scalar_name><round_scalar_name>): ... this.
21242 ((match_operand:VF_128 1 "vector_operand"
21243 "xBm,<round_constraint>")): Changed to ...
21244 ((match_operand:VF_128 1 "vector_operand"
21245 "xBm,<round_scalar_constraint>")): ... this.
21246 (vsqrt<ssescalarmodesuffix>\t{<round_op3>%1, %2, %0|
21247 %0, %2, %<iptr>1<round_op3>}): Changed to ...
21248 (vsqrt<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%1, %2,
21249 %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %2,
21250 %<iptr>1<round_scalar_mask_op3>}): ... this.
21251 ((set_attr "prefix" "<round_prefix>")): Changed to ...
21252 ((set_attr "prefix" "<round_scalar_prefix>")): ... this.
21254 2018-02-11 Steven Munroe <munroesj@gcc.gnu.org>
21257 * config/rs6000/mmintrin.h (_mm_cmpeq_pi32 [_ARCH_PWR9]):
21258 Cast vec_cmpeq result to correct type.
21259 * config/rs6000/mmintrin.h (_mm_cmpgt_pi32 [_ARCH_PWR9]):
21260 Cast vec_cmpgt result to correct type.
21262 2018-02-11 Alexandre Oliva <aoliva@redhat.com>
21264 * final.c (final_scan_insn_1): Renamed from...
21265 (final_scan_insn): ... this. New wrapper, to recover
21266 seen from the outermost call in recursive ones.
21267 * config/sparc/sparc.c (output_return): Drop seen from call.
21268 (output_sibcall): Likewise.
21269 * config/visium/visium.c (output_branch): Likewise.
21271 2018-02-10 John David Anglin <danglin@gcc.gnu.org>
21273 * config/pa/pa.c (hppa_profile_hook): Mark SYMBOL_REF for _mcount as
21276 2018-02-10 Alan Modra <amodra@gmail.com>
21279 * config/rs6000/rs6000.md (split_stack_return): Remove (use ..).
21280 Specify LR as an input.
21282 2018-02-10 Jakub Jelinek <jakub@redhat.com>
21285 * omp-low.c (maybe_remove_omp_member_access_dummy_vars,
21286 remove_member_access_dummy_vars): New functions.
21287 (lower_omp_for, lower_omp_taskreg, lower_omp_target,
21288 lower_omp_1, execute_lower_omp): Use them.
21290 PR rtl-optimization/84308
21291 * shrink-wrap.c (spread_components): Release todo vector.
21293 2018-02-09 Vladimir Makarov <vmakarov@redhat.com>
21295 PR rtl-optimization/57193
21296 * ira-color.c (struct allocno_color_data): Add member
21297 conflict_allocno_hard_prefs.
21298 (update_conflict_allocno_hard_prefs): New.
21299 (bucket_allocno_compare_func): Add a preference based on
21300 conflict_allocno_hard_prefs.
21301 (push_allocno_to_stack): Update conflict_allocno_hard_prefs.
21302 (color_allocnos): Remove a dead code. Initiate
21303 conflict_allocno_hard_prefs. Call update_costs_from_prefs.
21305 2018-02-09 Jakub Jelinek <jakub@redhat.com>
21308 * config/rs6000/vsx.md (p9_xxbrq_v16qi): Change input operand
21309 constraint from =wa to wa. Avoid a subreg on the output operand,
21310 instead use a pseudo and subreg it in a move.
21311 (p9_xxbrd_<mode>): Changed to ...
21312 (p9_xxbrd_v2di): ... this insn, without VSX_D iterator.
21313 (p9_xxbrd_v2df): New expander.
21314 (p9_xxbrw_<mode>): Changed to ...
21315 (p9_xxbrw_v4si): ... this insn, without VSX_W iterator.
21316 (p9_xxbrw_v4sf): New expander.
21318 2018-02-09 Sebastian Perta <sebastian.perta@renesas.com>
21320 * config/rx/rx.md (movsicc): Update expander to be matched by GCC.
21322 2018-02-09 Peter Bergner <bergner@vnet.ibm.com>
21325 * config/rs6000/vsx.md (vsx_mul_v2di): Handle generating a 64-bit
21326 multiply in 32-bit mode.
21327 (vsx_div_v2di): Handle generating a 64-bit signed divide in 32-bit mode.
21328 (vsx_udiv_v2di): Handle generating a 64-bit unsigned divide in 32-bit
21331 2018-02-09 Sebastian Perta <sebastian.perta@renesas.com>
21333 * config/rx/constraints.md (CALL_OP_SYMBOL_REF): Added new constraint
21334 to allow or block "symbol_ref" depending on the value of TARGET_JSR.
21335 * config/rx/rx.md (call_internal): Use CALL_OP_SYMBOL_REF.
21336 * config/rx/rx.md (call_value_internal): Use CALL_OP_SYMBOL_REF.
21338 2018-02-09 Pierre-Marie de Rodat <derodat@adacore.com>
21341 * dwarf2out.c (is_trivial_indirect_ref): New function.
21342 (dwarf2out_late_global_decl): Do not generate a location
21343 attribute for variables that have a non-trivial DECL_VALUE_EXPR
21344 and that are not defined in the current unit.
21346 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
21348 * optabs.c (prepare_cmp_insn): Try harder to emit a direct comparison
21349 instead of a libcall for UNORDERED.
21351 2018-02-09 Tamar Christina <tamar.christina@arm.com>
21354 * config/arm/arm-c.c (arm_cpu_builtins): Un-define __ARM_FEATURE_LDREX,
21355 __ARM_ARCH_PROFILE, __ARM_ARCH_ISA_THUMB, __ARM_FP and __ARM_NEON_FP.
21357 2018-02-09 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
21360 * config/s390/s390.c (s390_set_current_function): Invoke
21361 s390_indirect_branch_settings also if fndecl didn't change.
21363 2018-02-09 Alexandre Oliva <aoliva@redhat.com>
21365 * config/rs6000/rs6000.md (blockage): Set length to zero.
21367 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
21369 * expr.c (optimize_bitfield_assignment_op): Remove obsolete assertion.
21371 2018-02-09 Jakub Jelinek <jakub@redhat.com>
21374 * gcc.c (STATIC_LIBASAN_LIBS, STATIC_LIBTSAN_LIBS,
21375 STATIC_LIBLSAN_LIBS, STATIC_LIBUBSAN_LIBS): Handle -static like
21379 * var-tracking.c (vt_add_function_parameter): Punt for non-onepart
21380 PARALLEL incoming that failed vt_get_decl_and_offset check.
21382 PR middle-end/84237
21383 * output.h (bss_initializer_p): Add NAMED argument, defaulted to false.
21384 * varasm.c (bss_initializer_p): Add NAMED argument, if true, ignore
21386 (get_variable_section): For decls in named .bss* sections pass true as
21387 second argument to bss_initializer_p.
21389 2018-02-09 Marek Polacek <polacek@redhat.com>
21390 Jakub Jelinek <jakub@redhat.com>
21393 * fold-const.c (fold_indirect_ref_1): Use VECTOR_TYPE_P macro.
21394 Formatting fixes. Verify first that tree_fits_poly_int64_p (op01).
21395 Sync some changes from cxx_fold_indirect_ref.
21397 2018-02-09 Alexandre Oliva <aoliva@redhat.com>
21399 * cfgexpand.c (expand_gimple_basic_block): Handle inline entry
21401 * dwarf2out.c (dwarf2_debug_hooks): Enable inline_entry hook.
21402 (BLOCK_INLINE_ENTRY_LABEL): New.
21403 (dwarf2out_var_location): Disregard inline entry markers.
21404 (inline_entry_data): New struct.
21405 (inline_entry_data_hasher): New hashtable type.
21406 (inline_entry_data_hasher::hash): New.
21407 (inline_entry_data_hasher::equal): New.
21408 (inline_entry_data_table): New variable.
21409 (add_high_low_attributes): Add DW_AT_entry_pc and
21410 DW_AT_GNU_entry_view attributes if a pending entry is found
21411 in inline_entry_data_table. Add old entry_pc attribute only
21412 if debug nonbinding markers are disabled.
21413 (gen_inlined_subroutine_die): Set BLOCK_DIE if nonbinding
21414 markers are enabled.
21415 (block_within_block_p, dwarf2out_inline_entry): New.
21416 (dwarf2out_finish): Check that no entries remained in
21417 inline_entry_data_table.
21418 * final.c (reemit_insn_block_notes): Handle inline entry notes.
21419 (final_scan_insn, notice_source_line): Likewise.
21420 (rest_of_clean_state): Skip inline entry markers.
21421 * gimple-pretty-print.c (dump_gimple_debug): Handle inline entry
21423 * gimple.c (gimple_build_debug_inline_entry): New.
21424 * gimple.h (enum gimple_debug_subcode): Add
21425 GIMPLE_DEBUG_INLINE_ENTRY.
21426 (gimple_build_debug_inline_entry): Declare.
21427 (gimple_debug_inline_entry_p): New.
21428 (gimple_debug_nonbind_marker_p): Adjust.
21429 * insn-notes.def (INLINE_ENTRY): New.
21430 * print-rtl.c (rtx_writer::print_rtx_operand_code_0): Handle
21431 inline entry marker notes.
21432 (print_insn): Likewise.
21433 * rtl.h (NOTE_MARKER_P): Add INLINE_ENTRY support.
21434 (INSN_DEBUG_MARKER_KIND): Likewise.
21435 (GEN_RTX_DEBUG_MARKER_INLINE_ENTRY_PAT): New.
21436 * tree-inline.c (expand_call_inline): Build and insert
21437 debug_inline_entry stmt.
21438 * tree-ssa-live.c (remove_unused_scope_block_p): Preserve
21439 inline entry blocks early, if nonbind markers are enabled.
21440 (dump_scope_block): Dump fragment info.
21441 * var-tracking.c (reemit_marker_as_note): Handle inline entry note.
21442 * doc/gimple.texi (gimple_debug_inline_entry_p): New.
21443 (gimple_build_debug_inline_entry): New.
21444 * doc/invoke.texi (gstatement-frontiers, gno-statement-frontiers):
21445 Enable/disable inline entry points too.
21446 * doc/rtl.texi (NOTE_INSN_INLINE_ENTRY): New.
21447 (DEBUG_INSN): Describe inline entry markers.
21449 * common.opt (gvariable-location-views): New.
21450 (gvariable-location-views=incompat5): New.
21451 * config.in: Rebuilt.
21452 * configure: Rebuilt.
21453 * configure.ac: Test assembler for view support.
21454 * dwarf2asm.c (dw2_asm_output_symname_uleb128): New.
21455 * dwarf2asm.h (dw2_asm_output_symname_uleb128): Declare.
21456 * dwarf2out.c (var_loc_view): New typedef.
21457 (struct dw_loc_list_struct): Add vl_symbol, vbegin, vend.
21458 (dwarf2out_locviews_in_attribute): New.
21459 (dwarf2out_locviews_in_loclist): New.
21460 (dw_val_equal_p): Compare val_view_list of dw_val_class_view_lists.
21461 (enum dw_line_info_opcode): Add LI_adv_address.
21462 (struct dw_line_info_table): Add view.
21463 (RESET_NEXT_VIEW, RESETTING_VIEW_P): New macros.
21464 (DWARF2_ASM_VIEW_DEBUG_INFO): Define default.
21465 (zero_view_p): New variable.
21466 (ZERO_VIEW_P): New macro.
21467 (output_asm_line_debug_info): New.
21468 (struct var_loc_node): Add view.
21469 (add_AT_view_list, AT_loc_list): New.
21470 (add_var_loc_to_decl): Add view param. Test it against last.
21471 (new_loc_list): Add view params. Record them.
21472 (AT_loc_list_ptr): Handle loc and view lists.
21473 (view_list_to_loc_list_val_node): New.
21474 (print_dw_val): Handle dw_val_class_view_list.
21475 (size_of_die): Likewise.
21476 (value_format): Likewise.
21477 (loc_list_has_views): New.
21478 (gen_llsym): Set vl_symbol too.
21479 (maybe_gen_llsym, skip_loc_list_entry): New.
21480 (dwarf2out_maybe_output_loclist_view_pair): New.
21481 (output_loc_list): Output view list or entries too.
21482 (output_view_list_offset): New.
21483 (output_die): Handle dw_val_class_view_list.
21484 (output_dwarf_version): New.
21485 (output_compilation_unit_header): Use it.
21486 (output_skeleton_debug_sections): Likewise.
21487 (output_rnglists, output_line_info): Likewise.
21488 (output_pubnames, output_aranges): Update version comments.
21489 (output_one_line_info_table): Output view numbers in asm comments.
21490 (dw_loc_list): Determine current endview, pass it to new_loc_list.
21491 Call maybe_gen_llsym.
21492 (loc_list_from_tree_1): Adjust.
21493 (add_AT_location_description): Create view list attribute if
21494 needed, check it's absent otherwise.
21495 (convert_cfa_to_fb_loc_list): Adjust.
21496 (maybe_emit_file): Call output_asm_line_debug_info for test.
21497 (dwarf2out_var_location): Reset views as needed. Precompute
21498 add_var_loc_to_decl args. Call get_attr_min_length only if we have the
21499 attribute. Set view.
21500 (new_line_info_table): Reset next view.
21501 (set_cur_line_info_table): Call output_asm_line_debug_info for test.
21502 (dwarf2out_source_line): Likewise. Output view resets and labels to
21503 the assembler, or select appropriate line info opcodes.
21504 (prune_unused_types_walk_attribs): Handle dw_val_class_view_list.
21505 (optimize_string_length): Catch it. Adjust.
21506 (resolve_addr): Copy vl_symbol along with ll_symbol. Handle
21507 dw_val_class_view_list, and remove it if no longer needed.
21508 (hash_loc_list): Hash view numbers.
21509 (loc_list_hasher::equal): Compare them.
21510 (optimize_location_lists): Check whether a view list symbol is
21511 needed, and whether the locview attribute is present, and
21512 whether they match. Remove the locview attribute if no longer
21514 (index_location_lists): Call skip_loc_list_entry for test.
21515 (dwarf2out_finish): Call output_asm_line_debug_info for test.
21516 Use output_dwarf_version.
21517 * dwarf2out.h (enum dw_val_class): Add dw_val_class_view_list.
21518 (struct dw_val_node): Add val_view_list.
21519 * final.c (SEEN_NEXT_VIEW): New.
21520 (set_next_view_needed): New.
21521 (clear_next_view_needed): New.
21522 (maybe_output_next_view): New.
21523 (final_start_function): Rename to...
21524 (final_start_function_1): ... this. Take pointer to FIRST,
21525 add SEEN parameter. Emit param bindings in the initial view.
21526 (final_start_function): Reintroduce SEEN-less interface.
21527 (final): Rename to...
21528 (final_1): ... this. Take SEEN parameter. Output final pending
21529 next view at the end.
21530 (final): Reintroduce seen-less interface.
21531 (final_scan_insn): Output pending next view before switching
21532 sections or ending a block. Mark the next view as needed when
21533 outputting variable locations. Notify debug backend of section
21534 changes, and of location view changes.
21535 (rest_of_handle_final): Adjust.
21536 * toplev.c (process_options): Autodetect value for debug variable
21537 location views option. Warn on incompat5 without -gdwarf-5.
21538 * doc/invoke.texi (gvariable-location-views): New.
21539 (gvariable-location-views=incompat5): New.
21540 (gno-variable-location-views): New.
21542 2018-02-08 David Malcolm <dmalcolm@redhat.com>
21544 PR tree-optimization/84136
21545 * tree-cfg.c (find_taken_edge_computed_goto): Remove assertion
21546 that the result of find_edge is non-NULL.
21548 2018-02-08 Sergey Shalnov <sergey.shalnov@intel.com>
21551 * config/i386/x86-tune-costs.h (skylake_cost): Fix cost of
21552 storing integer register in SImode. Fix cost of 256 and 512
21553 byte aligned SSE register store.
21555 2018-02-08 Sergey Shalnov <sergey.shalnov@intel.com>
21557 * config/i386/i386.c (ix86_multiplication_cost): Fix
21558 multiplication cost for TARGET_AVX512DQ.
21560 2018-02-08 Marek Polacek <polacek@redhat.com>
21562 PR tree-optimization/84238
21563 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Verify the result of
21566 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
21568 PR tree-optimization/84265
21569 * tree-vect-stmts.c (vectorizable_store): Don't treat
21570 VMAT_CONTIGUOUS accesses as grouped.
21571 (vectorizable_load): Likewise.
21573 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
21575 PR tree-optimization/81635
21576 * wide-int.h (wi::round_down_for_mask, wi::round_up_for_mask): Declare.
21577 * wide-int.cc (wi::round_down_for_mask, wi::round_up_for_mask)
21578 (test_round_for_mask): New functions.
21579 (wide_int_cc_tests): Call test_round_for_mask.
21580 * tree-vrp.h (intersect_range_with_nonzero_bits): Declare.
21581 * tree-vrp.c (intersect_range_with_nonzero_bits): New function.
21582 * tree-data-ref.c (split_constant_offset_1): Use it to refine the
21583 range returned by get_range_info.
21585 2018-02-08 Jan Hubicka <hubicka@ucw.cz>
21588 * cgraph.h (symtab_node::output_to_lto_symbol_table_p): Declare
21589 * symtab.c: Include builtins.h
21590 (symtab_node::output_to_lto_symbol_table_p): Move here
21591 from lto-streamer-out.c:output_symbol_p.
21592 * lto-streamer-out.c (write_symbol): Turn early exit to assert.
21593 (output_symbol_p): Move all logic to symtab.c
21594 (produce_symtab): Update.
21596 2018-02-08 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
21598 * config/s390/s390-opts.h (enum indirect_branch): Define.
21599 * config/s390/s390-protos.h (s390_return_addr_from_memory)
21600 (s390_indirect_branch_via_thunk)
21601 (s390_indirect_branch_via_inline_thunk): Add function prototypes.
21602 (enum s390_indirect_branch_type): Define.
21603 * config/s390/s390.c (struct s390_frame_layout, struct
21604 machine_function): Remove.
21605 (indirect_branch_prez10thunk_mask, indirect_branch_z10thunk_mask)
21606 (indirect_branch_table_label_no, indirect_branch_table_name):
21608 (INDIRECT_BRANCH_NUM_OPTIONS): Define macro.
21609 (enum s390_indirect_branch_option): Define.
21610 (s390_return_addr_from_memory): New function.
21611 (s390_handle_string_attribute): New function.
21612 (s390_attribute_table): Add new attribute handler.
21613 (s390_execute_label): Handle UNSPEC_EXECUTE_JUMP patterns.
21614 (s390_indirect_branch_via_thunk): New function.
21615 (s390_indirect_branch_via_inline_thunk): New function.
21616 (s390_function_ok_for_sibcall): When jumping via thunk disallow
21617 sibling call optimization for non z10 compiles.
21618 (s390_emit_call): Force indirect branch target to be a single
21619 register. Add r1 clobber for non-z10 compiles.
21620 (s390_emit_epilogue): Emit return jump via return_use expander.
21621 (s390_reorg): Handle JUMP_INSNs as execute targets.
21622 (s390_option_override_internal): Perform validity checks for the
21623 new command line options.
21624 (s390_indirect_branch_attrvalue): New function.
21625 (s390_indirect_branch_settings): New function.
21626 (s390_set_current_function): Invoke s390_indirect_branch_settings.
21627 (s390_output_indirect_thunk_function): New function.
21628 (s390_code_end): Implement target hook.
21629 (s390_case_values_threshold): Implement target hook.
21630 (TARGET_ASM_CODE_END, TARGET_CASE_VALUES_THRESHOLD): Define target
21632 * config/s390/s390.h (struct s390_frame_layout)
21633 (struct machine_function): Move here from s390.c.
21634 (TARGET_INDIRECT_BRANCH_NOBP_RET)
21635 (TARGET_INDIRECT_BRANCH_NOBP_JUMP)
21636 (TARGET_INDIRECT_BRANCH_NOBP_JUMP_THUNK)
21637 (TARGET_INDIRECT_BRANCH_NOBP_JUMP_INLINE_THUNK)
21638 (TARGET_INDIRECT_BRANCH_NOBP_CALL)
21639 (TARGET_DEFAULT_INDIRECT_BRANCH_TABLE)
21640 (TARGET_INDIRECT_BRANCH_THUNK_NAME_EXRL)
21641 (TARGET_INDIRECT_BRANCH_THUNK_NAME_EX)
21642 (TARGET_INDIRECT_BRANCH_TABLE): Define macros.
21643 * config/s390/s390.md (UNSPEC_EXECUTE_JUMP)
21644 (INDIRECT_BRANCH_THUNK_REGNUM): Define constants.
21645 (mnemonic attribute): Add values which aren't recognized
21647 ("*cjump_long", "*icjump_long", "*basr", "*basr_r"): Disable
21648 pattern for branch conversion. Fix mnemonic attribute.
21649 ("*c<code>", "*sibcall_br", "*sibcall_value_br", "*return"): Emit
21650 indirect branch via thunk if requested.
21651 ("indirect_jump", "<code>"): Expand patterns for branch conversion.
21652 ("*indirect_jump"): Disable for branch conversion using out of
21654 ("indirect_jump_via_thunk<mode>_z10")
21655 ("indirect_jump_via_thunk<mode>")
21656 ("indirect_jump_via_inlinethunk<mode>_z10")
21657 ("indirect_jump_via_inlinethunk<mode>", "*casesi_jump")
21658 ("casesi_jump_via_thunk<mode>_z10", "casesi_jump_via_thunk<mode>")
21659 ("casesi_jump_via_inlinethunk<mode>_z10")
21660 ("casesi_jump_via_inlinethunk<mode>", "*basr_via_thunk<mode>_z10")
21661 ("*basr_via_thunk<mode>", "*basr_r_via_thunk_z10")
21662 ("*basr_r_via_thunk", "return<mode>_prez10"): New pattern.
21663 ("*indirect2_jump"): Disable for branch conversion.
21664 ("casesi_jump"): Turn into expander and expand patterns for branch
21666 ("return_use"): New expander.
21667 ("*return"): Emit return via thunk and rename it to ...
21668 ("*return<mode>"): ... this one.
21669 * config/s390/s390.opt: Add new options and and enum for the
21672 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
21674 * lra-constraints.c (match_reload): Unconditionally use
21675 gen_lowpart_SUBREG, rather than selecting between that
21676 and equivalent gen_rtx_SUBREG code.
21678 2018-02-08 Richard Biener <rguenther@suse.de>
21680 PR tree-optimization/84233
21681 * tree-ssa-phiprop.c (propagate_with_phi): Use separate
21682 changed flag instead of boguously re-using phi_inserted.
21684 2018-02-08 Martin Jambor <mjambor@suse.cz>
21686 * hsa-gen.c (get_symbol_for_decl): Set program allocation for
21687 static local variables.
21689 2018-02-08 Richard Biener <rguenther@suse.de>
21691 PR tree-optimization/84278
21692 * tree-vect-stmts.c (vectorizable_store): When looking for
21693 smaller vector types to perform grouped strided loads/stores
21694 make sure the mode is supported by the target.
21695 (vectorizable_load): Likewise.
21697 2018-02-08 Wilco Dijkstra <wdijkstr@arm.com>
21699 * config/aarch64/aarch64.c (aarch64_components_for_bb):
21700 Increase LDP/STP opportunities by adding adjacent callee-saves.
21702 2018-02-08 Wilco Dijkstra <wdijkstr@arm.com>
21704 PR rtl-optimization/84068
21705 PR rtl-optimization/83459
21706 * haifa-sched.c (rank_for_schedule): Fix SCHED_PRESSURE_MODEL sorting.
21708 2018-02-08 Aldy Hernandez <aldyh@redhat.com>
21710 PR tree-optimization/84224
21711 * gimple-ssa-warn-alloca.c (pass_walloca::execute): Remove assert.
21712 * calls.c (gimple_alloca_call_p): Only return TRUE when we have
21713 non-zero arguments.
21715 2018-02-07 Iain Sandoe <iain@codesourcery.com>
21718 * config/rs6000/altivec.md (*restore_world): Remove LR use.
21719 * config/rs6000/predicates.md (restore_world_operation): Adjust op
21720 count, remove one USE.
21722 2018-02-07 Michael Meissner <meissner@linux.vnet.ibm.com>
21724 * doc/install.texi (Configuration): Document the
21725 --with-long-double-format={ibm,ieee} PowerPC configuration
21729 * config/rs6000/rs6000.md (fix_trunc<SFDF:mode><QHI:mode>2):
21730 Convert from define_expand to be define_insn_and_split. Rework
21731 float/double/_Float128 conversions to QI/HI/SImode to work with
21732 both ISA 2.07 (power8) or ISA 3.0 (power9). Fix regression where
21733 conversions to QI/HImode types did a store and then a load to
21734 truncate the value. For conversions to VSX registers, don't split
21735 the insn, instead emit the code directly. Use the code iterator
21736 any_fix to combine signed and unsigned conversions.
21737 (fix<uns>_trunc<SFDF:mode>si2_p8): Likewise.
21738 (fixuns_trunc<SFDF:mode><QHI:mode>2): Likewise.
21739 (fix_trunc<IEEE128:mode><QHI:mode>2): Likewise.
21740 (fix<uns>_trunc<SFDF:mode><QHI:mode>2): Likewise.
21741 (fix_<mode>di2_hw): Likewise.
21742 (fixuns_<mode>di2_hw): Likewise.
21743 (fix_<mode>si2_hw): Likewise.
21744 (fixuns_<mode>si2_hw): Likewise.
21745 (fix<uns>_<IEEE128:mode><SDI:mode>2_hw): Likewise.
21746 (fix<uns>_trunc<IEEE128:mode><QHI:mode>2): Likewise.
21747 (fctiw<u>z_<mode>_smallint): Rename fctiw<u>z_<mode>_smallint to
21748 fix<uns>_trunc<SFDF:mode>si2_p8.
21749 (fix_trunc<SFDF:mode><QHI:mode>2_internal): Delete, no longer used.
21750 (fixuns_trunc<SFDF:mode><QHI:mode>2_internal): Likewise.
21751 (fix<uns>_<mode>_mem): Likewise.
21752 (fctiw<u>z_<mode>_mem): Likewise.
21753 (fix<uns>_<mode>_mem): Likewise.
21754 (fix<uns>_trunc<SFDF:mode><QHSI:mode>2_mem): On ISA 3.0, prevent
21755 the register allocator from doing a direct move to the GPRs to do
21756 a store, and instead use the ISA 3.0 store byte/half-word from
21757 vector register instruction. For IEEE 128-bit floating point,
21758 also optimize stores of 32-bit ints.
21759 (fix<uns>_trunc<IEEE128:mode><QHSI:mode>2_mem): Likewise.
21761 2018-02-07 Alan Hayward <alan.hayward@arm.com>
21763 * genextract.c (push_pathstr_operand): New function to support
21765 (walk_rtx): Call push_pathstr_operand.
21766 (print_path): Support [a-zA-Z].
21768 2018-02-07 Richard Biener <rguenther@suse.de>
21770 PR tree-optimization/84037
21771 * tree-vectorizer.h (struct _loop_vec_info): Add ivexpr_map member.
21772 (cse_and_gimplify_to_preheader): Declare.
21773 (vect_get_place_in_interleaving_chain): Likewise.
21774 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
21776 (_loop_vec_info::~_loop_vec_info): Delete it.
21777 (cse_and_gimplify_to_preheader): New function.
21778 * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Export.
21779 * tree-vect-stmts.c (vectorizable_store): CSE base and steps.
21780 (vectorizable_load): Likewise. For grouped stores always base
21781 the IV on the first element.
21782 * tree-vect-loop-manip.c (vect_loop_versioning): Unshare versioning
21783 condition before gimplifying.
21785 2018-02-07 Jakub Jelinek <jakub@redhat.com>
21787 * tree-eh.c (operation_could_trap_helper_p): Ignore honor_trapv for
21788 *DIV_EXPR and *MOD_EXPR.
21790 2018-02-07 H.J. Lu <hongjiu.lu@intel.com>
21793 * config/i386/i386.c (ix86_option_override_internal): Mask out
21794 the CF_SET bit when checking -fcf-protection.
21796 2018-02-07 Tom de Vries <tom@codesourcery.com>
21799 * omp-expand.c (expand_oacc_collapse_init): Ensure diff_type is large
21802 2018-02-07 Richard Biener <rguenther@suse.de>
21804 PR tree-optimization/84204
21805 * tree-chrec.c (chrec_fold_plus_1): Remove size limiting in
21808 PR tree-optimization/84205
21809 * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Also
21810 special-case isl_ast_op_zdiv_r.
21812 PR tree-optimization/84223
21813 * graphite-scop-detection.c (gather_bbs::before_dom_children):
21814 Only add conditions from within the region.
21815 (gather_bbs::after_dom_children): Adjust.
21817 2018-02-07 Georg-Johann Lay <avr@gjlay.de>
21820 * config/avr/avr.h (GENERAL_REGNO_P, GENERAL_REG_P): New macros.
21821 * config/avr/avr.md: Only post-reload split REG-REG moves if
21822 either register is GENERAL_REG_P.
21824 2018-02-07 Jakub Jelinek <jakub@redhat.com>
21826 PR tree-optimization/84235
21827 * tree-ssa-scopedtables.c
21828 (avail_exprs_stack::simplify_binary_operation): Fir MINUS_EXPR, punt
21829 if the subtraction is performed in floating point type where NaNs are
21830 honored. For *DIV_EXPR, punt for ALL_FRACT_MODE_Ps where we can't
21831 build 1. Formatting fix.
21833 2018-02-06 Jakub Jelinek <jakub@redhat.com>
21836 * config/i386/i386.c (rest_of_insert_endbranch): Only skip
21837 NOTE_INSN_CALL_ARG_LOCATION after a call, not anything else,
21838 and skip it regardless of bb boundaries. Use CALL_P macro,
21839 don't test INSN_P (insn) together with CALL_P or JUMP_P check
21840 unnecessarily, formatting fix.
21842 2018-02-06 Michael Collison <michael.collison@arm.com>
21844 * config/arm/thumb2.md:
21845 (*thumb2_mov_negscc): Split only if TARGET_THUMB2 && !arm_restrict_it.
21846 (*thumb_mov_notscc): Ditto.
21848 2018-02-06 Michael Meissner <meissner@linux.vnet.ibm.com>
21851 * config/rs6000/rs6000.md (su code attribute): Use "u" for
21852 unsigned_fix, not "s".
21854 2018-02-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
21856 * configure.ac (gcc_fn_eh_frame_ro): New function.
21857 (gcc_cv_as_cfi_directive): Check both 32 and 64-bit assembler for
21858 correct .eh_frame permissions.
21859 * configure: Regenerate.
21861 2018-02-06 Andrew Jenner <andrew@codeourcery.com>
21863 * doc/invoke.texi: Add section for the PowerPC SPE backend. Remove
21864 irrelevant options.
21866 2018-02-06 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
21868 * config/rs6000/rs6000.c (rs6000_option_override_internal):
21869 Display warning message for -mno-speculate-indirect-jumps.
21871 2018-02-06 Andrew Jenner <andrew@codesourcery.com>
21873 * config/powerpcspe/powerpcspe.opt: (msimple-fpu, mfpu) Add
21875 * config/powerpcspe/sysv4.opt (mbit-align): Likewise.
21877 2018-02-06 Aldy Hernandez <aldyh@redhat.com>
21879 PR tree-optimization/84225
21880 * tree-eh.c (find_trapping_overflow): Only call
21881 operation_no_trapping_overflow when ANY_INTEGRAL_TYPE_P.
21883 2018-02-06 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
21886 * config/i386/i386.c: Reimplement the check of possible options
21887 -mibt/-mshstk conbination. Change error messages.
21888 * doc/invoke.texi: Fix a typo: remove extra '='.
21890 2018-02-06 Marek Polacek <polacek@redhat.com>
21892 PR tree-optimization/84228
21893 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Skip debug statements.
21895 2018-02-06 Tamar Christina <tamar.christina@arm.com>
21898 * config/arm/arm.c (arm_print_asm_arch_directives): Record already
21899 emitted arch directives.
21900 * config/arm/arm-c.c (arm_cpu_builtins): Undefine __ARM_ARCH and
21901 __ARM_FEATURE_COPROC before changing architectures.
21903 2018-02-06 Richard Biener <rguenther@suse.de>
21905 * config/i386/i386.c (print_reg): Fix typo.
21906 (ix86_loop_unroll_adjust): Do not unroll beyond the original nunroll.
21908 2018-02-06 Eric Botcazou <ebotcazou@adacore.com>
21910 * configure: Regenerate.
21912 2018-02-05 Martin Sebor <msebor@redhat.com>
21914 PR tree-optimization/83369
21915 * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Use %G to print
21918 2018-02-05 Martin Liska <mliska@suse.cz>
21920 * doc/invoke.texi: Cherry-pick upstream r323995.
21922 2018-02-05 Richard Sandiford <richard.sandiford@linaro.org>
21924 * ira.c (ira_init_register_move_cost): Adjust comment.
21926 2018-02-05 Martin Liska <mliska@suse.cz>
21928 PR gcov-profile/84137
21929 * doc/gcov.texi: Fix typo in documentation.
21931 2018-02-05 Martin Liska <mliska@suse.cz>
21933 PR gcov-profile/83879
21934 * doc/gcov.texi: Document necessity of --dynamic-list-data when
21935 using dlopen functionality.
21937 2018-02-05 Olga Makhotina <olga.makhotina@intel.com>
21939 * config/i386/avx512dqintrin.h (_mm_mask_range_sd, _mm_maskz_range_sd,
21940 _mm_mask_range_round_sd, _mm_maskz_range_round_sd, _mm_mask_range_ss,
21941 _mm_maskz_range_ss, _mm_mask_range_round_ss,
21942 _mm_maskz_range_round_ss): New intrinsics.
21943 (__builtin_ia32_rangesd128_round)
21944 (__builtin_ia32_rangess128_round): Remove.
21945 (__builtin_ia32_rangesd128_mask_round,
21946 __builtin_ia32_rangess128_mask_round): New builtins.
21947 * config/i386/i386-builtin.def (__builtin_ia32_rangesd128_round,
21948 __builtin_ia32_rangess128_round): Remove.
21949 (__builtin_ia32_rangesd128_mask_round,
21950 __builtin_ia32_rangess128_mask_round): New builtins.
21951 * config/i386/sse.md (ranges<mode><round_saeonly_name>): Renamed to ...
21952 (ranges<mode><mask_scalar_name><round_saeonly_scalar_name>): ... this.
21953 ((match_operand:VF_128 2 "<round_saeonly_nimm_predicate>"
21954 "<round_saeonly_constraint>")): Changed to ...
21955 ((match_operand:VF_128 2 "<round_saeonly_scalar_nimm_predicate>"
21956 "<round_saeonly_scalar_constraint>")): ... this.
21957 ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_op4>%2, %1, %0|
21958 %0, %1, %2<round_saeonly_op4>, %3}"): Changed to ...
21959 ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_scalar_mask_op4>%2,
21960 %1, %0<mask_scalar_operand4>|%0<mask_scalar_operand4>, %1,
21961 %2<round_saeonly_scalar_mask_op4>, %3}"): ... this.
21963 2018-02-02 Andrew Jenner <andrew@codesourcery.com>
21965 * config/powerpcspe/powerpcspe.opt: Add Undocumented to irrelevant
21967 * config/powerpcspe/powerpcspe-tables.opt (rs6000_cpu_opt_value):
21968 Remove all values except native, 8540 and 8548.
21970 2018-02-02 H.J. Lu <hongjiu.lu@intel.com>
21972 * config/i386/i386.c (ix86_output_function_return): Pass
21973 INVALID_REGNUM, instead of -1, as invalid register number to
21974 indirect_thunk_name and output_indirect_thunk.
21976 2018-02-02 Julia Koval <julia.koval@intel.com>
21978 * config.gcc: Add -march=icelake.
21979 * config/i386/driver-i386.c (host_detect_local_cpu): Detect icelake.
21980 * config/i386/i386-c.c (ix86_target_macros_internal): Handle icelake.
21981 * config/i386/i386.c (processor_costs): Add m_ICELAKE.
21982 (PTA_ICELAKE, PTA_AVX512VNNI, PTA_GFNI, PTA_VAES, PTA_AVX512VBMI2,
21983 PTA_VPCLMULQDQ, PTA_RDPID, PTA_AVX512BITALG): New.
21984 (processor_target_table): Add icelake.
21985 (ix86_option_override_internal): Handle new PTAs.
21986 (get_builtin_code_for_version): Handle icelake.
21987 (M_INTEL_COREI7_ICELAKE): New.
21988 (fold_builtin_cpu): Handle icelake.
21989 * config/i386/i386.h (TARGET_ICELAKE, PROCESSOR_ICELAKE): New.
21990 * doc/invoke.texi: Add -march=icelake.
21992 2018-02-02 Julia Koval <julia.koval@intel.com>
21994 * config/i386/i386.c (ix86_option_override_internal): Change flags type
21995 to wide_int_bitmask.
21996 * wide-int-bitmask.h: New.
21998 2018-02-02 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
22001 * config/i386/i386.md: Replace Pmode with word_mode in
22002 builtin_setjmp_setup and builtin_longjmp to support x32.
22004 2018-02-01 Peter Bergner <bergner@vnet.ibm.com>
22008 * config/rs6000/driver-rs6000.c: #include "diagnostic.h".
22010 (rs6000_supported_cpu_names): New static variable.
22011 (linux_cpu_translation_table): Likewise.
22012 (elf_platform) <cpu>: Define new static variable and use it.
22013 Translate kernel AT_PLATFORM name to canonical name if needed.
22014 Error if platform name is unknown.
22016 2018-02-01 Aldy Hernandez <aldyh@redhat.com>
22019 * config/pa/predicates.md (base14_operand): Handle E_VOIDmode.
22021 2018-02-01 Jeff Law <law@redhat.com>
22024 * config/i386/i386.c (release_scratch_register_on_entry): Add new
22025 OFFSET and RELEASE_VIA_POP arguments. Use SP+OFFSET to restore
22026 the scratch if RELEASE_VIA_POP is false.
22027 (ix86_adjust_stack_and_probe_stack_clash): Un-constify SIZE.
22028 If we have to save a temporary register, decrement SIZE appropriately.
22029 Pass new arguments to release_scratch_register_on_entry.
22030 (ix86_adjust_stack_and_probe): Likewise.
22031 (ix86_emit_probe_stack_range): Pass new arguments to
22032 release_scratch_register_on_entry.
22034 2018-02-01 Uros Bizjak <ubizjak@gmail.com>
22036 PR rtl-optimization/84157
22037 * combine.c (change_zero_ext): Use REG_P predicate in
22038 front of HARD_REGISTER_P predicate.
22040 2018-02-01 Georg-Johann Lay <avr@gjlay.de>
22042 * config/avr/avr.c (avr_option_override): Move disabling of
22043 -fdelete-null-pointer-checks to...
22044 * common/config/avr/avr-common.c (avr_option_optimization_table):
22047 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
22049 PR tree-optimization/81635
22050 * tree-data-ref.c (split_constant_offset_1): For types that
22051 wrap on overflow, try to use range info to prove that wrapping
22054 2018-02-01 Renlin Li <renlin.li@arm.com>
22057 * config/aarch64/aarch64.c (aarch64_class_max_nregs): Handle
22058 TAILCALL_ADDR_REGS.
22059 (aarch64_register_move_cost): Likewise.
22060 * config/aarch64/aarch64.h (reg_class): Rename CALLER_SAVE_REGS to
22061 TAILCALL_ADDR_REGS.
22062 (REG_CLASS_NAMES): Likewise.
22063 (REG_CLASS_CONTENTS): Rename CALLER_SAVE_REGS to
22064 TAILCALL_ADDR_REGS. Remove IP registers.
22065 * config/aarch64/aarch64.md (Ucs): Update register constraint.
22067 2018-02-01 Richard Biener <rguenther@suse.de>
22069 * domwalk.h (dom_walker::dom_walker): Add additional constructor
22070 for specifying RPO order and allow NULL for that.
22071 * domwalk.c (dom_walker::dom_walker): Likewise.
22072 (dom_walker::walk): Handle NULL RPO order.
22073 * tree-into-ssa.c (rewrite_dom_walker): Do not walk dom children
22075 (rewrite_update_dom_walker): Likewise.
22076 (mark_def_dom_walker): Likewise.
22078 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
22080 * config/aarch64/aarch64-protos.h (aarch64_split_sve_subreg_move)
22081 (aarch64_maybe_expand_sve_subreg_move): Declare.
22082 * config/aarch64/aarch64.md (UNSPEC_REV_SUBREG): New unspec.
22083 * config/aarch64/predicates.md (aarch64_any_register_operand): New
22085 * config/aarch64/aarch64-sve.md (mov<mode>): Optimize subreg moves
22086 that are semantically a reverse operation.
22087 (*aarch64_sve_mov<mode>_subreg_be): New pattern.
22088 * config/aarch64/aarch64.c (aarch64_maybe_expand_sve_subreg_move):
22089 (aarch64_replace_reg_mode, aarch64_split_sve_subreg_move): New
22091 (aarch64_can_change_mode_class): For big-endian, forbid changes
22092 between two SVE modes if they have different element sizes.
22094 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
22096 * config/aarch64/aarch64.c (aarch64_expand_sve_const_vector): Prefer
22097 the TImode handling for big-endian targets.
22099 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
22101 * config/aarch64/aarch64-sve.md (sve_ld1rq): Replace with...
22102 (*sve_ld1rq<Vesize>): ... this new pattern. Handle all element sizes,
22104 * config/aarch64/aarch64.c (aarch64_expand_sve_widened_duplicate):
22105 Remove BSWAP handing for big-endian targets and use the form of
22106 LD1RQ appropariate for the mode.
22108 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
22110 * config/aarch64/aarch64.c (aarch64_simd_valid_immediate): Handle
22111 all CONST_VECTOR_DUPLICATE_P vectors, not just those with a single
22112 duplicated element.
22114 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
22117 * config/aarch64/aarch64.c (aarch64_secondary_reload): Tighten
22118 check for operands that need to go through aarch64_sve_reload_be.
22120 2018-02-01 Jakub Jelinek <jakub@redhat.com>
22122 PR tree-optimization/81661
22123 PR tree-optimization/84117
22124 * tree-eh.h (rewrite_to_non_trapping_overflow): Declare.
22125 * tree-eh.c: Include gimplify.h.
22126 (find_trapping_overflow, replace_trapping_overflow,
22127 rewrite_to_non_trapping_overflow): New functions.
22128 * tree-vect-loop.c: Include tree-eh.h.
22129 (vect_get_loop_niters): Use rewrite_to_non_trapping_overflow.
22130 * tree-data-ref.c: Include tree-eh.h.
22131 (get_segment_min_max): Use rewrite_to_non_trapping_overflow.
22133 2018-01-31 Uros Bizjak <ubizjak@gmail.com>
22135 PR rtl-optimization/84123
22136 * combine.c (change_zero_ext): Check if hard register satisfies
22137 can_change_dest_mode before calling gen_lowpart_SUBREG.
22139 2018-01-31 Vladimir Makarov <vmakarov@redhat.com>
22142 * ira.c (ira_init_register_move_cost): Remove assert.
22144 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
22146 PR rtl-optimization/84071
22147 * doc/tm.texi.in (WORD_REGISTER_OPERATIONS): Add explicit case.
22148 * doc/tm.texi: Regenerate.
22150 2018-01-31 Richard Biener <rguenther@suse.de>
22152 PR tree-optimization/84132
22153 * tree-data-ref.c (analyze_miv_subscript): Properly
22154 check whether evolution_function_is_affine_multivariate_p
22155 before calling gcd_of_steps_may_divide_p.
22157 2018-01-31 Julia Koval <julia.koval@intel.com>
22160 * config/i386/i386.c (ix86_expand_builtin): Handle IX86_BUILTIN_RDPID.
22161 * config/i386/i386.md (rdpid_rex64) New.
22162 (rdpid): Make 32bit only.
22164 2018-01-29 Aldy Hernandez <aldyh@redhat.com>
22167 * tree-pretty-print.c (dump_generic_node): Handle a TYPE_NAME with
22168 an IDENTIFIER_NODE for FUNCTION_TYPE's.
22170 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
22173 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
22175 * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
22177 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
22179 PR rtl-optimization/84071
22180 * combine.c (record_dead_and_set_regs_1): Record the source unmodified
22181 for a paradoxical SUBREG on a WORD_REGISTER_OPERATIONS target.
22183 2018-01-31 Claudiu Zissulescu <claziss@synopsys.com>
22185 * config/arc/arc.c (arc_handle_aux_attribute): New function.
22186 (arc_attribute_table): Add 'aux' attribute.
22187 (arc_in_small_data_p): Consider aux like variables.
22188 (arc_is_aux_reg_p): New function.
22189 (arc_asm_output_aligned_decl_local): Ignore 'aux' like variables.
22190 (arc_get_aux_arg): New function.
22191 (prepare_move_operands): Handle aux-register access.
22192 (arc_handle_aux_attribute): New function.
22193 * doc/extend.texi (ARC Variable attributes): Add subsection.
22195 2018-01-31 Claudiu Zissulescu <claziss@synopsys.com>
22197 * config/arc/arc-protos.h (arc_is_uncached_mem_p): Function proto.
22198 * config/arc/arc.c (arc_handle_uncached_attribute): New function.
22199 (arc_attribute_table): Add 'uncached' attribute.
22200 (arc_print_operand): Print '.di' flag for uncached memory
22202 (arc_in_small_data_p): Do not consider for small data the uncached
22204 (arc_is_uncached_mem_p): New function.
22205 * config/arc/predicates.md (compact_store_memory_operand): Check
22206 for uncached memory accesses.
22207 (nonvol_nonimm_operand): Likewise.
22208 * doc/extend.texi (ARC Type Attribute): New subsection.
22210 2018-01-31 Jakub Jelinek <jakub@redhat.com>
22213 * common.opt (falign-functions=, falign-jumps=, falign-labels=,
22214 falign-loops=): Add Optimization flag.
22216 2018-01-30 Jeff Law <law@redhat.com>
22219 * i386.c (ix86_adjust_stack_and_probe_stack_clash): New argument
22220 INT_REGISTERS_SAVED. Check it prior to calling
22221 get_scratch_register_on_entry.
22222 (ix86_adjust_stack_and_probe): Similarly.
22223 (ix86_emit_probe_stack_range): Similarly.
22224 (ix86_expand_prologue): Corresponding changes.
22226 2018-01-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
22229 * config/sol2.h (STARTFILE_ARCH_SPEC): Use -std=c*,
22230 -std=iso9899:199409 instead of -pedantic to select values-Xc.o.
22232 2018-01-30 Vladimir Makarov <vmakarov@redhat.com>
22235 * lra-constraints.c (curr_insn_transform): Process AND in the
22238 2018-01-30 Jakub Jelinek <jakub@redhat.com>
22240 PR rtl-optimization/83986
22241 * sched-deps.c (sched_analyze_insn): For frame related insns, add anti
22242 dependence against last_pending_memory_flush in addition to
22243 pending_jump_insns.
22245 2018-01-30 Alexandre Oliva <aoliva@redhat.com>
22247 PR tree-optimization/81611
22248 * tree-ssa-dom.c (simple_iv_increment_p): Skip intervening
22251 2018-01-30 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
22254 * config/rs6000/rs6000.c (rs6000_internal_arg_pointer): Only return
22257 2018-01-30 Richard Biener <rguenther@suse.de>
22258 Jakub Jelinek <jakub@redhat.com>
22260 PR tree-optimization/84111
22261 * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1): Skip
22262 inner loops added during recursion, as they don't have up-to-date
22265 2018-01-30 Jan Hubicka <hubicka@ucw.cz>
22268 * ipa-inline.c (can_inline_edge_p): Break out late tests to...
22269 (can_inline_edge_by_limits_p): ... here.
22270 (can_early_inline_edge_p, check_callers,
22271 update_caller_keys, update_callee_keys, recursive_inlining,
22272 add_new_edges_to_heap, speculation_useful_p,
22273 inline_small_functions,
22274 inline_small_functions, flatten_function,
22275 inline_to_all_callers_1): Update.
22277 2018-01-30 Jan Hubicka <hubicka@ucw.cz>
22279 * profile-count.c (profile_count::combine_with_ipa_count): Handle
22282 2018-01-30 Richard Biener <rguenther@suse.de>
22284 PR tree-optimization/83008
22285 * tree-vect-slp.c (vect_analyze_slp_cost_1): Properly cost
22286 invariant and constant vector uses in stmts when they need
22287 more than one stmt.
22289 2018-01-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
22292 * configure.ac (gcc_cv_as_shf_merge): Disable on Solaris 10/x86.
22293 * configure: Regenerate.
22295 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
22297 * config/aarch64/aarch64-sve.md (*vec_extract<mode><Vel>_0): New
22299 (*vec_extract<mode><Vel>_v128): Require a nonzero lane number.
22300 Use gen_rtx_REG rather than gen_lowpart.
22302 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
22304 * lra-constraints.c (match_reload): Use subreg_lowpart_offset
22305 rather than 0 when creating partial subregs.
22307 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
22309 * vec-perm-indices.c (vec_perm_indices::series_p): Give examples
22312 2018-01-29 Michael Meissner <meissner@linux.vnet.ibm.com>
22315 * config/rs6000/rs6000.c (rs6000_setup_reg_addr_masks): If DFmode
22316 and SFmode can go in Altivec registers (-mcpu=power7 for DFmode,
22317 -mcpu=power8 for SFmode) don't set the PRE_INCDEC or PRE_MODIFY
22318 flags. This restores the settings used before the 2017-07-24.
22319 Turning off pre increment/decrement/modify allows IVOPTS to
22320 optimize DF/SF loops where the index is an int.
22322 2018-01-29 Richard Biener <rguenther@suse.de>
22323 Kelvin Nilsen <kelvin@gcc.gnu.org>
22326 * tree-vect-stmts.c (vectorizable_call): Don't call
22327 targetm.vectorize_builtin_md_vectorized_function if callee is
22330 2018-01-22 Carl Love <cel@us.ibm.com>
22332 * doc/extend.tex: Fix typo in second arg in
22333 __builtin_bcdadd_{lt|eq|gt|ov} and __builtin_bcdsub_{lt|eq|gt|ov}.
22335 2018-01-29 Richard Biener <rguenther@suse.de>
22337 PR tree-optimization/84086
22338 * tree-ssanames.c: Include cfgloop.h and tree-scalar-evolution.h.
22339 (flush_ssaname_freelist): When SSA names were released reset
22340 the SCEV hash table.
22342 2018-01-29 Richard Biener <rguenther@suse.de>
22344 PR tree-optimization/84057
22345 * tree-ssa-loop-ivcanon.c (unloop_loops): Deal with already
22346 removed paths when removing edges.
22348 2018-01-27 H.J. Lu <hongjiu.lu@intel.com>
22350 * doc/invoke.texi: Replace -mfunction-return==@var{choice} with
22351 -mfunction-return=@var{choice}.
22353 2018-01-27 Bernd Edlinger <bernd.edlinger@hotmail.de>
22355 PR diagnostic/84034
22356 * diagnostic-show-locus.c (get_line_width_without_trailing_whitespace):
22357 Handle CR like TAB.
22358 (layout::print_source_line): Likewise.
22359 (test_get_line_width_without_trailing_whitespace): Add test cases.
22361 2018-01-27 Jakub Jelinek <jakub@redhat.com>
22363 PR middle-end/84040
22364 * sched-deps.c (sched_macro_fuse_insns): Return immediately for
22367 2018-01-26 Jim Wilson <jimw@sifive.com>
22369 * config/riscv/riscv.h (MAX_FIXED_MODE_SIZE): New.
22371 * config/riscv/elf.h (LIB_SPEC): Don't include -lgloss when nosys.specs
22374 2018-01-26 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
22376 * config/aarch64/aarch64.md: Add peepholes for CMP + SUB -> SUBS
22377 and CMP + SUB-immediate -> SUBS.
22379 2018-01-26 Martin Sebor <msebor@redhat.com>
22381 PR tree-optimization/83896
22382 * tree-ssa-strlen.c (get_string_len): Rename...
22383 (get_string_cst_length): ...to this. Return HOST_WIDE_INT.
22384 Avoid assuming length is constant.
22385 (handle_char_store): Use HOST_WIDE_INT for string length.
22387 2018-01-26 Uros Bizjak <ubizjak@gmail.com>
22390 * config/i386/i386.md (*andndi3_doubleword): Add earlyclobber
22391 to (=&r,r,rm) alternative. Add (=r,0,rm) and (=r,r,0) alternatives.
22393 2018-01-26 Richard Biener <rguenther@suse.de>
22395 PR rtl-optimization/84003
22396 * dse.c (record_store): Only record redundant stores when
22397 the earlier store aliases at least all accesses the later one does.
22399 2018-01-26 Jakub Jelinek <jakub@redhat.com>
22401 PR rtl-optimization/83985
22402 * dce.c (deletable_insn_p): Return false for separate shrink wrapping
22403 REG_CFA_RESTORE insns.
22404 (delete_unmarked_insns): Don't ignore separate shrink wrapping
22405 REG_CFA_RESTORE insns here.
22408 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Don't
22409 use SSA_NAME_VAR as base for SSA_NAMEs with non-NULL SSA_NAME_VAR.
22411 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
22413 * config/arc/arc-arch.h (arc_tune_attr): Add ARC_TUNE_CORE_3.
22414 * config/arc/arc.c (arc_sched_issue_rate): Use ARC_TUNE_... .
22415 (arc_init): Likewise.
22416 (arc_override_options): Likewise.
22417 (arc_file_start): Choose Tag_ARC_CPU_variation based on arc_tune
22419 (hwloop_fail): Use TARGET_DBNZ when we want to check for dbnz insn
22421 * config/arc/arc.h (TARGET_DBNZ): Define.
22422 * config/arc/arc.md (attr tune): Add core_3, use ARC_TUNE_... to
22423 properly set the tune attribute.
22424 (dbnz): Use TARGET_DBNZ guard.
22425 * config/arc/arc.opt (mtune): Add core3 option.
22427 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
22429 * config/arc/arc.c (arc_delegitimize_address_0): Refactored to
22430 recognize new pic like addresses.
22431 (arc_delegitimize_address): Clean up.
22433 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
22435 * config/arc/arc-arches.def: Option mrf16 valid for all
22437 * config/arc/arc-c.def (__ARC_RF16__): New predefined macro.
22438 * config/arc/arc-cpus.def (em_mini): New cpu with rf16 on.
22439 * config/arc/arc-options.def (FL_RF16): Add mrf16 option.
22440 * config/arc/arc-tables.opt: Regenerate.
22441 * config/arc/arc.c (arc_conditional_register_usage): Handle
22442 reduced register file case.
22443 (arc_file_start): Set must have build attributes.
22444 * config/arc/arc.h (MAX_ARC_PARM_REGS): Conditional define using
22445 mrf16 option value.
22446 * config/arc/arc.opt (mrf16): Add new option.
22447 * config/arc/elf.h (ATTRIBUTE_PCS): Define.
22448 * config/arc/genmultilib.awk: Handle new mrf16 option.
22449 * config/arc/linux.h (ATTRIBUTE_PCS): Define.
22450 * config/arc/t-multilib: Regenerate.
22451 * doc/invoke.texi (ARC Options): Document mrf16 option.
22453 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
22455 * config/arc/arc-protos.h: Add arc_is_secure_call_p proto.
22456 * config/arc/arc.c (arc_handle_secure_attribute): New function.
22457 (arc_attribute_table): Add 'secure_call' attribute.
22458 (arc_print_operand): Print secure call operand.
22459 (arc_function_ok_for_sibcall): Don't optimize tail calls when
22461 (arc_is_secure_call_p): New function. * config/arc/arc.md
22462 (call_i): Add support for sjli instruction.
22463 (call_value_i): Likewise.
22464 * config/arc/constraints.md (Csc): New constraint.
22466 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
22467 John Eric Martin <John.Martin@emmicro-us.com>
22469 * config/arc/arc-protos.h: Add arc_is_jli_call_p proto.
22470 * config/arc/arc.c (_arc_jli_section): New struct.
22471 (arc_jli_section): New type.
22472 (rc_jli_sections): New static variable.
22473 (arc_handle_jli_attribute): New function.
22474 (arc_attribute_table): Add jli_always and jli_fixed attribute.
22475 (arc_file_end): New function.
22476 (TARGET_ASM_FILE_END): Define.
22477 (arc_print_operand): Reuse 'S' letter for JLI output instruction.
22478 (arc_add_jli_section): New function.
22479 (jli_call_scan): Likewise.
22480 (arc_reorg): Call jli_call_scan.
22481 (arc_output_addsi): Remove 'S' from printing asm operand.
22482 (arc_is_jli_call_p): New function.
22483 * config/arc/arc.md (movqi_insn): Remove 'S' from printing asm
22485 (movhi_insn): Likewise.
22486 (movsi_insn): Likewise.
22487 (movsi_set_cc_insn): Likewise.
22488 (loadqi_update): Likewise.
22489 (load_zeroextendqisi_update): Likewise.
22490 (load_signextendqisi_update): Likewise.
22491 (loadhi_update): Likewise.
22492 (load_zeroextendhisi_update): Likewise.
22493 (load_signextendhisi_update): Likewise.
22494 (loadsi_update): Likewise.
22495 (loadsf_update): Likewise.
22496 (movsicc_insn): Likewise.
22497 (bset_insn): Likewise.
22498 (bxor_insn): Likewise.
22499 (bclr_insn): Likewise.
22500 (bmsk_insn): Likewise.
22501 (bicsi3_insn): Likewise.
22502 (cmpsi_cc_c_insn): Likewise.
22503 (movsi_ne): Likewise.
22504 (movsi_cond_exec): Likewise.
22505 (clrsbsi2): Likewise.
22506 (norm_f): Likewise.
22516 (call_i): Remove 'S' asm letter, add jli instruction.
22517 (call_value_i): Likewise.
22518 * config/arc/arc.op (mjli-always): New option.
22519 * config/arc/constraints.md (Cji): New constraint.
22520 * config/arc/fpx.md (addsf3_fpx): Remove 'S' from printing asm
22522 (subsf3_fpx): Likewise.
22523 (mulsf3_fpx): Likewise.
22524 * config/arc/simdext.md (vendrec_insn): Remove 'S' from printing
22526 * doc/extend.texi (ARC): Document 'jli-always' and 'jli-fixed'
22527 function attrbutes.
22528 * doc/invoke.texi (ARC): Document mjli-always option.
22530 2018-01-26 Sebastian Perta <sebastian.perta@renesas.com>
22532 * config/rl78/rl78.c (rl78_addsi3_internal): If operand 2 is const
22533 avoid addition with 0 and use incw and decw where possible.
22535 2018-01-26 Richard Biener <rguenther@suse.de>
22537 PR tree-optimization/81082
22538 * fold-const.c (fold_plusminus_mult_expr): Do not perform the
22539 association if it requires casting to unsigned.
22540 * match.pd ((A * C) +- (B * C) -> (A+-B)): New patterns derived
22541 from fold_plusminus_mult_expr to catch important cases late when
22542 range info is available.
22544 2018-01-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
22546 * config/i386/sol2.h (USE_HIDDEN_LINKONCE): Remove.
22547 * configure.ac (hidden_linkonce): New test.
22548 * configure: Regenerate.
22549 * config.in: Regenerate.
22551 2018-01-26 Julia Koval <julia.koval@intel.com>
22553 * config/i386/avx512bitalgintrin.h (_mm512_bitshuffle_epi64_mask,
22554 _mm512_mask_bitshuffle_epi64_mask, _mm256_bitshuffle_epi64_mask,
22555 _mm256_mask_bitshuffle_epi64_mask, _mm_bitshuffle_epi64_mask,
22556 _mm_mask_bitshuffle_epi64_mask): Fix type.
22557 * config/i386/i386-builtin-types.def (UHI_FTYPE_V2DI_V2DI_UHI,
22558 USI_FTYPE_V4DI_V4DI_USI): Remove.
22559 * config/i386/i386-builtin.def (__builtin_ia32_vpshufbitqmb512_mask,
22560 __builtin_ia32_vpshufbitqmb256_mask,
22561 __builtin_ia32_vpshufbitqmb128_mask): Fix types.
22562 * config/i386/i386.c (ix86_expand_args_builtin): Remove old types.
22563 * config/i386/sse.md (VI1_AVX512VLBW): Change types.
22565 2018-01-26 Alan Modra <amodra@gmail.com>
22568 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Exclude
22569 UNSPEC_VBPERMQ. Sort other unspecs.
22571 2018-01-25 David Edelsohn <dje.gcc@gmail.com>
22573 * doc/invoke.texi (PowerPC Options): Document 'native' cpu type.
22575 2018-01-25 Jan Hubicka <hubicka@ucw.cz>
22577 PR middle-end/83055
22578 * predict.c (drop_profile): Do not push/pop cfun; update also
22580 (handle_missing_profiles): Fix logic looking for zero profiles.
22582 2018-01-25 Jakub Jelinek <jakub@redhat.com>
22584 PR middle-end/83977
22585 * ipa-fnsummary.c (compute_fn_summary): Clear can_change_signature
22586 on functions with #pragma omp declare simd or functions with simd
22588 * omp-simd-clone.c (expand_simd_clones): Revert 2018-01-24 change.
22589 * config/i386/i386.c (ix86_simd_clone_compute_vecsize_and_simdlen):
22590 Remove trailing \n from warning_at calls.
22592 2018-01-25 Tom de Vries <tom@codesourcery.com>
22595 * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
22596 for neutered workers.
22598 2018-01-24 Joseph Myers <joseph@codesourcery.com>
22601 * config/m68k/m68k.c (m68k_promote_function_mode): New function.
22602 (TARGET_PROMOTE_FUNCTION_MODE): New macro.
22604 2018-01-24 Jeff Law <law@redhat.com>
22607 * i386.c (get_probe_interval): Move to earlier point.
22608 (ix86_compute_frame_layout): If -fstack-clash-protection and
22609 the frame is larger than the probe interval, then use pushes
22610 to save registers rather than reg->mem moves.
22611 (ix86_expand_prologue): Remove conditional for int_registers_saved
22614 2018-01-24 Vladimir Makarov <vmakarov@redhat.com>
22617 * ira-build.c (setup_min_max_allocno_live_range_point): Set up
22618 min/max for never referenced object.
22620 2018-01-24 Jakub Jelinek <jakub@redhat.com>
22622 PR middle-end/83977
22623 * tree.c (free_lang_data_in_decl): Don't clear DECL_ABSTRACT_ORIGIN
22625 * omp-low.c (create_omp_child_function): Remove "omp declare simd"
22626 attributes from DECL_ATTRIBUTES (decl) without affecting
22627 DECL_ATTRIBUTES (current_function_decl).
22628 * omp-simd-clone.c (expand_simd_clones): Ignore DECL_ARTIFICIAL
22629 functions with non-NULL DECL_ABSTRACT_ORIGIN.
22631 2018-01-24 Richard Sandiford <richard.sandiford@linaro.org>
22633 PR tree-optimization/83979
22634 * fold-const.c (fold_comparison): Use constant_boolean_node
22635 instead of boolean_{true,false}_node.
22637 2018-01-24 Jan Hubicka <hubicka@ucw.cz>
22639 * ipa-profile.c (ipa_propagate_frequency_1): Fix logic skipping calls
22642 2018-01-24 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
22644 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
22645 Simplify the clause that sets the length attribute.
22646 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
22647 (*sibcall_nonlocal_sysv<mode>): Clean up code block; simplify the
22648 clause that sets the length attribute.
22649 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
22651 2018-01-24 Tom de Vries <tom@codesourcery.com>
22654 * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_2): Define to 1.
22655 (nvptx_pc_set, nvptx_condjump_label): New function. Copy from jump.c.
22656 Add strict parameter.
22657 (prevent_branch_around_nothing): Insert dummy insn between branch to
22658 label and label with no ptx insn inbetween.
22659 * config/nvptx/nvptx.md (define_insn "fake_nop"): New insn.
22661 2018-01-24 Tom de Vries <tom@codesourcery.com>
22664 * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
22665 for neutered threads in warp.
22666 * config/nvptx/nvptx.md (define_insn "exit"): New insn.
22668 2018-01-24 Richard Biener <rguenther@suse.de>
22670 PR tree-optimization/83176
22671 * tree-chrec.c (chrec_fold_plus_1): Handle (signed T){(T) .. }
22674 2018-01-24 Richard Biener <rguenther@suse.de>
22676 PR tree-optimization/82819
22677 * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Avoid
22678 code generating pluses that are no-ops in the target precision.
22680 2018-01-24 Richard Biener <rguenther@suse.de>
22682 PR middle-end/84000
22683 * tree-cfg.c (replace_loop_annotate): Handle annot_expr_parallel_kind.
22685 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
22687 * cfgcleanup.c (try_crossjump_to_edge): Use combine_with_count
22688 to merge probabilities.
22689 * predict.c (probably_never_executed): Also mark as cold functions
22690 with global 0 profile and guessed local profile.
22691 * profile-count.c (profile_probability::combine_with_count): New
22693 * profile-count.h (profile_probability::operator*,
22694 profile_probability::operator*=, profile_probability::operator/,
22695 profile_probability::operator/=): Reduce precision to adjusted
22696 and set value to guessed on contradictory divisions.
22697 (profile_probability::combine_with_freq): Remove.
22698 (profile_probability::combine_wiht_count): Declare.
22699 (profile_count::force_nonzero):: Set to adjusted.
22700 (profile_count::probability_in):: Set quality to adjusted.
22701 * tree-ssa-tail-merge.c (replace_block_by): Use
22702 combine_with_count.
22704 2018-01-23 Andrew Waterman <andrew@sifive.com>
22705 Jim Wilson <jimw@sifive.com>
22707 * config/riscv/riscv.c (riscv_stack_boundary): New.
22708 (riscv_option_override): Set riscv_stack_boundary. Handle
22709 riscv_preferred_stack_boundary_arg.
22710 * config/riscv/riscv.h (MIN_STACK_BOUNDARY, ABI_STACK_BOUNDARY): New.
22711 (BIGGEST_ALIGNMENT): Set to STACK_BOUNDARY.
22712 (STACK_BOUNDARY): Set to riscv_stack_boundary.
22713 (RISCV_STACK_ALIGN): Use STACK_BOUNDARY.
22714 * config/riscv/riscv.opt (mpreferred-stack-boundary): New.
22715 * doc/invoke.tex (RISC-V Options): Add -mpreferred-stack-boundary.
22717 2018-01-23 H.J. Lu <hongjiu.lu@intel.com>
22720 * config/i386/i386.c (ix86_expand_prologue): Use cost reference
22721 of struct ix86_frame.
22722 (ix86_expand_epilogue): Likewise. Add a local variable for
22723 the reg_save_offset field in struct ix86_frame.
22725 2018-01-23 Bin Cheng <bin.cheng@arm.com>
22727 PR tree-optimization/82604
22728 * tree-loop-distribution.c (enum partition_kind): New enum item
22729 PKIND_PARTIAL_MEMSET.
22730 (partition_builtin_p): Support above new enum item.
22731 (generate_code_for_partition): Ditto.
22732 (compute_access_range): Differentiate cases that equality can be
22733 proven at all loops, the innermost loops or no loops.
22734 (classify_builtin_st, classify_builtin_ldst): Adjust call to above
22735 function. Set PKIND_PARTIAL_MEMSET for partition appropriately.
22736 (finalize_partitions, distribute_loop): Don't fuse partition of
22737 PKIND_PARTIAL_MEMSET kind when distributing 3-level loop nest.
22738 (prepare_perfect_loop_nest): Distribute 3-level loop nest only if
22739 parloop is enabled.
22741 2018-01-23 Martin Liska <mliska@suse.cz>
22743 * predict.def (PRED_INDIR_CALL): Set probability to PROB_EVEN in
22744 order to ignore the predictor.
22745 (PRED_POLYMORPHIC_CALL): Likewise.
22746 (PRED_RECURSIVE_CALL): Likewise.
22748 2018-01-23 Martin Liska <mliska@suse.cz>
22750 * tree-profile.c (tree_profiling): Print function header to
22751 aware reader which function we are working on.
22752 * value-prof.c (gimple_find_values_to_profile): Do not print
22753 not interesting value histograms.
22755 2018-01-23 Martin Liska <mliska@suse.cz>
22757 * profile-count.h (enum profile_quality): Add
22758 profile_uninitialized as the first value. Do not number values
22759 as they are zero based.
22760 (profile_count::verify): Update sanity check.
22761 (profile_probability::verify): Likewise.
22763 2018-01-23 Nathan Sidwell <nathan@acm.org>
22765 * doc/invoke.texi (ffor-scope): Deprecate.
22767 2018-01-23 David Malcolm <dmalcolm@redhat.com>
22769 PR tree-optimization/83510
22770 * domwalk.c (set_all_edges_as_executable): New function.
22771 (dom_walker::dom_walker): Convert bool param
22772 "skip_unreachable_blocks" to enum reachability. Move setup of
22773 edge flags to set_all_edges_as_executable and only do it when
22774 reachability is REACHABLE_BLOCKS.
22775 * domwalk.h (enum dom_walker::reachability): New enum.
22776 (dom_walker::dom_walker): Convert bool param
22777 "skip_unreachable_blocks" to enum reachability.
22778 (set_all_edges_as_executable): New decl.
22779 * graphite-scop-detection.c (gather_bbs::gather_bbs): Convert
22780 from false for "skip_unreachable_blocks" to ALL_BLOCKS for
22782 * tree-ssa-dom.c (dom_opt_dom_walker::dom_opt_dom_walker): Likewise,
22783 but converting true to REACHABLE_BLOCKS.
22784 * tree-ssa-sccvn.c (sccvn_dom_walker::sccvn_dom_walker): Likewise.
22786 (check_array_bounds_dom_walker::check_array_bounds_dom_walker):
22787 Likewise, but converting it to REACHABLE_BLOCKS_PRESERVING_FLAGS.
22788 (vrp_dom_walker::vrp_dom_walker): Likewise, but converting it to
22790 (vrp_prop::vrp_finalize): Call set_all_edges_as_executable
22791 if check_all_array_refs will be called.
22793 2018-01-23 David Malcolm <dmalcolm@redhat.com>
22795 * tree.c (selftest::test_location_wrappers): Add more test
22798 2018-01-23 David Malcolm <dmalcolm@redhat.com>
22800 * sbitmap.c (selftest::test_set_range): Fix memory leaks.
22801 (selftest::test_bit_in_range): Likewise.
22803 2018-01-23 Richard Sandiford <richard.sandiford@linaro.org>
22806 * doc/sourcebuild.texi (vect_float): Say that the selector
22807 only describes the situation when -funsafe-math-optimizations is on.
22808 (vect_float_strict): Document.
22810 2018-01-23 Richard Sandiford <richard.sandiford@linaro.org>
22812 PR tree-optimization/83965
22813 * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
22814 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern): Use it
22815 instead of checking only for a reduction.
22816 (vect_recog_widen_sum_pattern): Likewise.
22818 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
22820 * predict.c (probably_never_executed): Only use precise profile info.
22821 (compute_function_frequency): Skip after inlining hack since we now
22822 have quality checking.
22824 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
22826 * profile-count.h (profile_probability::very_unlikely,
22827 profile_probability::unlikely, profile_probability::even): Set
22828 precision to guessed.
22830 2018-01-23 Richard Biener <rguenther@suse.de>
22832 PR tree-optimization/83963
22833 * graphite-scop-detection.c (scop_detection::harmful_loop_in_region):
22834 Properly terminate dominator walk when crossing the exit edge not
22835 when visiting its source block.
22837 2018-01-23 Jakub Jelinek <jakub@redhat.com>
22840 * tree.c (maybe_wrap_with_location): Use NON_LVALUE_EXPR rather than
22841 VIEW_CONVERT_EXPR to wrap CONST_DECLs.
22843 2018-01-22 Jakub Jelinek <jakub@redhat.com>
22845 PR tree-optimization/83957
22846 * omp-expand.c (expand_omp_for_generic): Ignore virtual PHIs. Remove
22847 semicolon after for body surrounded by braces.
22849 PR tree-optimization/83081
22850 * profile-count.h (profile_probability::split): New method.
22851 * dojump.c (do_jump_1) <case TRUTH_ANDIF_EXPR, case TRUTH_ORIF_EXPR>:
22852 Use profile_probability::split.
22853 (do_compare_rtx_and_jump): Fix adjustment of probabilities
22854 when splitting a single conditional jump into 2.
22856 2018-01-22 David Malcolm <dmalcolm@redhat.com>
22858 PR tree-optimization/69452
22859 * tree-ssa-loop-im.c (class move_computations_dom_walker): Remove
22862 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
22864 * config/rl78/rl78-expand.md (bswaphi2): New define_expand.
22865 * config/rl78/rl78-virt.md (*bswaphi2_virt): New define_insn.
22866 * config/rl78/rl78-real.md (*bswaphi2_real): New define_insn.
22868 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
22870 * config/rl78/rl78-protos.h (rl78_split_movdi): New function
22872 * config/rl78/rl78.md (movdi): New define_expand.
22873 * config/rl78/rl78.c (rl78_split_movdi): New function.
22875 2018-01-22 Michael Meissner <meissner@linux.vnet.ibm.com>
22878 * config/rs6000/rs6000-protos.h (rs6000_split_signbit): Delete,
22880 * config/rs6000/rs6000.c (rs6000_split_signbit): Likewise.
22881 * config/rs6000/rs6000.md (signbit<mode>2): Change code for IEEE
22882 128-bit to produce an UNSPEC move to get the double word with the
22883 signbit and then a shift directly to do signbit.
22884 (signbit<mode>2_dm): Replace old IEEE 128-bit signbit
22885 implementation with a new version that just does either a direct
22886 move or a regular move. Move memory interface to separate insns.
22887 Move insns so they are next to the expander.
22888 (signbit<mode>2_dm_mem_be): New combiner insns to combine load
22889 with signbit move. Split big and little endian case.
22890 (signbit<mode>2_dm_mem_le): Likewise.
22891 (signbit<mode>2_dm_<su>ext): Delete, no longer used.
22892 (signbit<mode>2_dm2): Likewise.
22894 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
22896 * config/rl78/rl78.md (anddi3): New define_expand.
22898 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
22900 * config/rl78/rl78.md (umindi3): New define_expand.
22902 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
22904 * config/rl78/rl78.md (smindi3): New define_expand.
22906 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
22908 * config/rl78/rl78.md (smaxdi3): New define_expand.
22910 2018-01-22 Carl Love <cel@us.ibm.com>
22912 * config/rs6000/rs6000-builtin.def (ST_ELEMREV_V1TI, LD_ELEMREV_V1TI,
22913 LVX_V1TI): Add macro expansion.
22914 * config/rs6000/rs6000-c.c (altivec_builtin_types): Add argument
22915 definitions for VSX_BUILTIN_VEC_XST_BE, VSX_BUILTIN_VEC_ST,
22916 VSX_BUILTIN_VEC_XL, LD_ELEMREV_V1TI builtins.
22917 * config/rs6000/rs6000-p8swap.c (insn_is_swappable_p);
22918 Change check to determine if the instruction is a byte reversing
22919 entry. Fix typo in comment.
22920 * config/rs6000/rs6000.c (altivec_expand_builtin): Add case entry
22921 for VSX_BUILTIN_ST_ELEMREV_V1TI and VSX_BUILTIN_LD_ELEMREV_V1TI.
22922 Add def_builtin calls for new builtins.
22923 * config/rs6000/vsx.md (vsx_st_elemrev_v1ti, vsx_ld_elemrev_v1ti):
22924 Add define_insn expansion.
22926 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
22928 * config/rl78/rl78.md (umaxdi3): New define_expand.
22930 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
22932 * config/rl78/rl78.c (rl78_note_reg_set): Fixed dead reg check
22933 for non-QImode registers.
22935 2018-01-22 Richard Biener <rguenther@suse.de>
22937 PR tree-optimization/83963
22938 * graphite-scop-detection.c (scop_detection::get_sese): Delay
22939 including the loop exit block.
22940 (scop_detection::merge_sese): Likewise.
22941 (scop_detection::add_scop): Do it here instead.
22943 2018-01-22 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
22945 * doc/sourcebuild.texi (arm_softfloat): Document.
22947 2018-01-21 John David Anglin <danglin@gcc.gnu.org>
22950 * config/pa/pa.c (pa_function_ok_for_sibcall): Use
22951 targetm.binds_local_p instead of TREE_PUBLIC to check local binding.
22952 Move TARGET_PORTABLE_RUNTIME check after TARGET_64BIT check.
22954 2018-01-21 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
22955 David Edelsohn <dje.gcc@gmail.com>
22958 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
22959 Change "crset eq" to "crset 2".
22960 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
22961 (*call_indirect_aix<mode>_nospec): Likewise.
22962 (*call_value_indirect_aix<mode>_nospec): Likewise.
22963 (*call_indirect_elfv2<mode>_nospec): Likewise.
22964 (*call_value_indirect_elfv2<mode>_nospec): Likewise.
22965 (*sibcall_nonlocal_sysv<mode>): Change "crset eq" to "crset 2";
22966 change assembly output from . to $.
22967 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
22968 (indirect_jump<mode>_nospec): Change assembly output from . to $.
22969 (*tablejump<mode>_internal1_nospec): Likewise.
22971 2018-01-21 Oleg Endo <olegendo@gcc.gnu.org>
22974 * config/sh/sh_optimize_sett_clrt.cc:
22975 Use INCLUDE_ALGORITHM and INCLUDE_VECTOR instead of direct includes.
22977 2018-01-20 Richard Sandiford <richard.sandiford@linaro.org>
22979 PR tree-optimization/83940
22980 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Set
22981 offset_dt to vect_constant_def rather than vect_unknown_def_type.
22982 (vect_check_load_store_mask): Add a mask_dt_out parameter and
22983 use it to pass back the definition type.
22984 (vect_check_store_rhs): Likewise rhs_dt_out.
22985 (vect_build_gather_load_calls): Add a mask_dt argument and use
22986 it instead of a call to vect_is_simple_use.
22987 (vectorizable_store): Update calls to vect_check_load_store_mask
22988 and vect_check_store_rhs. Use the dt returned by the latter instead
22989 of scatter_src_dt. Use the cached mask_dt and gs_info.offset_dt
22990 instead of calls to vect_is_simple_use. Pass the scalar rather
22991 than the vector operand to vect_is_simple_use when handling
22992 second and subsequent copies of an rhs value.
22993 (vectorizable_load): Update calls to vect_check_load_store_mask
22994 and vect_build_gather_load_calls. Use the cached mask_dt and
22995 gs_info.offset_dt instead of calls to vect_is_simple_use.
22997 2018-01-20 Jakub Jelinek <jakub@redhat.com>
22999 PR middle-end/83945
23000 * tree-emutls.c: Include gimplify.h.
23001 (lower_emutls_2): New function.
23002 (lower_emutls_1): If ADDR_EXPR is a gimple invariant and walk_tree
23003 with lower_emutls_2 callback finds some TLS decl in it, unshare_expr
23004 it before further processing.
23007 * simplify-rtx.c (simplify_binary_operation_1) <case UMOD>: Use
23008 UINTVAL (trueop1) instead of INTVAL (op1).
23010 2018-01-19 Jakub Jelinek <jakub@redhat.com>
23014 * dwarf2cfi.c (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define to
23015 INCOMING_FRAME_SP_OFFSET if not defined.
23016 (scan_trace): Add ENTRY argument. If true and
23017 DEFAULT_INCOMING_FRAME_SP_OFFSET != INCOMING_FRAME_SP_OFFSET,
23018 emit a note to adjust the CFA offset.
23019 (create_cfi_notes): Adjust scan_trace callers.
23020 (create_cie_data): Use DEFAULT_INCOMING_FRAME_SP_OFFSET rather than
23021 INCOMING_FRAME_SP_OFFSET in the CIE.
23022 * config/i386/i386.h (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define.
23023 * config/stormy16/stormy16.h (DEFAULT_INCOMING_FRAME_SP_OFFSET):
23025 * doc/tm.texi.in (DEFAULT_INCOMING_FRAME_SP_OFFSET): Document.
23026 * doc/tm.texi: Regenerated.
23028 2018-01-19 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
23030 PR rtl-optimization/83147
23031 * lra-constraints.c (remove_inheritance_pseudos): Use
23032 lra_substitute_pseudo_within_insn.
23034 2018-01-19 Tom de Vries <tom@codesourcery.com>
23035 Cesar Philippidis <cesar@codesourcery.com>
23038 * config/nvptx/nvptx.c (nvptx_single): Fix jit workaround.
23040 2018-01-19 Cesar Philippidis <cesar@codesourcery.com>
23043 * config/nvptx/nvptx.c (output_init_frag): Don't use generic address
23044 spaces for function labels.
23046 2018-01-19 Martin Liska <mliska@suse.cz>
23048 * predict.def (PRED_LOOP_EXIT): Change from 85 to 89.
23049 (PRED_LOOP_EXIT_WITH_RECURSION): Change from 72 to 78.
23050 (PRED_LOOP_EXTRA_EXIT): Change from 83 to 67.
23051 (PRED_OPCODE_POSITIVE): Change from 64 to 59.
23052 (PRED_TREE_OPCODE_POSITIVE): Change from 64 to 59.
23053 (PRED_CONST_RETURN): Change from 69 to 65.
23054 (PRED_NULL_RETURN): Change from 91 to 71.
23055 (PRED_LOOP_IV_COMPARE_GUESS): Change from 98 to 64.
23056 (PRED_LOOP_GUARD): Change from 66 to 73.
23058 2018-01-19 Martin Liska <mliska@suse.cz>
23060 * predict.c (predict_insn_def): Add new assert.
23061 (struct branch_predictor): Change type to signed integer.
23062 (test_prediction_value_range): Amend test to cover
23063 PROB_UNINITIALIZED.
23064 * predict.def (PRED_LOOP_ITERATIONS): Use the new constant.
23065 (PRED_LOOP_ITERATIONS_GUESSED): Likewise.
23066 (PRED_LOOP_ITERATIONS_MAX): Likewise.
23067 (PRED_LOOP_IV_COMPARE): Likewise.
23068 * predict.h (PROB_UNINITIALIZED): Define new constant.
23070 2018-01-19 Martin Liska <mliska@suse.cz>
23072 * predict.c (dump_prediction): Add new format for
23073 analyze_brprob.py script which is enabled with -details
23075 * profile-count.h (precise_p): New function.
23077 2018-01-19 Richard Sandiford <richard.sandiford@linaro.org>
23079 PR tree-optimization/83922
23080 * tree-vect-loop.c (vect_verify_full_masking): Return false if
23081 there are no statements that need masking.
23082 (vect_active_double_reduction_p): New function.
23083 (vect_analyze_loop_operations): Use it when handling phis that
23084 are not in the loop header.
23086 2018-01-19 Richard Sandiford <richard.sandiford@linaro.org>
23088 PR tree-optimization/83914
23089 * tree-vect-loop.c (vectorizable_induction): Don't convert
23090 init_expr or apply the peeling adjustment for inductions
23091 that are nested within the vectorized loop.
23093 2018-01-19 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
23095 * config/arm/thumb2.md (*thumb2_negsi2_short): Use RSB mnemonic
23098 2018-01-18 Jakub Jelinek <jakub@redhat.com>
23102 * function.h (gimplify_parameters): Add gimple_seq * argument.
23103 * function.c: Include gimple.h and options.h.
23104 (gimplify_parameters): Add cleanup argument, add CLOBBER stmts
23105 for the added local temporaries if needed.
23106 * gimplify.c (gimplify_body): Adjust gimplify_parameters caller,
23107 if there are any parameter cleanups, wrap whole body into a
23108 try/finally with the cleanups.
23110 2018-01-18 Wilco Dijkstra <wdijkstr@arm.com>
23113 * config/aarch64/aarch64.c (aarch64_legitimate_constant_p):
23114 Use GET_MODE_CLASS for scalar floating point.
23116 2018-01-18 Jan Hubicka <hubicka@ucw.cz>
23120 * cgraphclones.c (cgraph_node::create_version_clone_with_body):
23121 Fix call of call_cgraph_insertion_hooks.
23123 2018-01-18 Martin Sebor <msebor@redhat.com>
23125 * doc/invoke.texi (-Wclass-memaccess): Tweak text.
23127 2018-01-18 Jan Hubicka <hubicka@ucw.cz>
23130 * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Update edge
23133 2018-01-18 Boris Kolpackov <boris@codesynthesis.com>
23136 * common.opt: (-ffile-prefix-map): New option.
23137 * opts.c (common_handle_option): Defer it.
23138 * opts-global.c (handle_common_deferred_options): Handle it.
23139 * debug.h (remap_debug_filename, add_debug_prefix_map): Move to...
23140 * file-prefix-map.h: New file.
23141 (remap_debug_filename, add_debug_prefix_map): ...here.
23142 (add_macro_prefix_map, add_file_prefix_map, remap_macro_filename): New.
23143 * final.c (debug_prefix_map, add_debug_prefix_map
23144 remap_debug_filename): Move to...
23145 * file-prefix-map.c: New file.
23146 (file_prefix_map, add_prefix_map, remap_filename) ...here and rename,
23147 generalize, get rid of alloca(), use strrchr() instead of strchr().
23148 (add_macro_prefix_map, add_debug_prefix_map, add_file_prefix_map):
23149 Implement in terms of add_prefix_map().
23150 (remap_macro_filename, remap_debug_filename): Implement in term of
23152 * Makefile.in (OBJS, PLUGIN_HEADERS): Add new files.
23153 * builtins.c (fold_builtin_FILE): Call remap_macro_filename().
23154 * dbxout.c: Include file-prefix-map.h.
23155 * varasm.c: Likewise.
23156 * vmsdbgout.c: Likewise.
23157 * xcoffout.c: Likewise.
23158 * dwarf2out.c: Likewise plus omit new options from DW_AT_producer.
23159 * doc/cppopts.texi (-fmacro-prefix-map): Document.
23160 * doc/invoke.texi (-ffile-prefix-map): Document.
23161 (-fdebug-prefix-map): Update description.
23163 2018-01-18 Martin Liska <mliska@suse.cz>
23165 * config/i386/i386.c (indirect_thunk_name): Document that also
23167 (output_indirect_thunk): Document why both instructions
23168 (pause and lfence) are generated.
23170 2018-01-18 Richard Biener <rguenther@suse.de>
23172 PR tree-optimization/83887
23173 * graphite-scop-detection.c
23174 (scop_detection::get_nearest_dom_with_single_entry): Remove.
23175 (scop_detection::get_nearest_pdom_with_single_exit): Likewise.
23176 (scop_detection::merge_sese): Re-implement with a flood-fill
23177 algorithm that properly finds a SESE region if it exists.
23179 2018-01-18 Jakub Jelinek <jakub@redhat.com>
23182 * match.pd ((P + A) - P, P - (P + A), (P + A) - (P + B)): For
23183 pointer_diff optimizations use view_convert instead of convert.
23185 2018-01-17 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
23187 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
23188 Generate different code for -mno-speculate-indirect-jumps.
23189 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
23190 (*call_indirect_aix<mode>): Disable for
23191 -mno-speculate-indirect-jumps.
23192 (*call_indirect_aix<mode>_nospec): New define_insn.
23193 (*call_value_indirect_aix<mode>): Disable for
23194 -mno-speculate-indirect-jumps.
23195 (*call_value_indirect_aix<mode>_nospec): New define_insn.
23196 (*sibcall_nonlocal_sysv<mode>): Generate different code for
23197 -mno-speculate-indirect-jumps.
23198 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
23200 2018-01-17 Michael Meissner <meissner@linux.vnet.ibm.com>
23202 * config/rs6000/rs6000.c (rs6000_emit_move): If we load or store a
23203 long double type, set the flags for noting the default long double
23204 type, even if we don't pass or return a long double type.
23206 2018-01-17 Jan Hubicka <hubicka@ucw.cz>
23209 * ipa-inline.c (flatten_function): Do not overwrite final inlining
23212 2018-01-17 Will Schmidt <will_schmidt@vnet.ibm.com>
23214 * config/rs6000/rs6000.c (rs6000_gimple_builtin): Add gimple folding
23215 support for merge[hl].
23216 (fold_mergehl_helper): New helper function.
23217 (tree-vector-builder.h): New #include for tree_vector_builder usage.
23218 * config/rs6000/altivec.md (altivec_vmrghw_direct): Add xxmrghw insn.
23219 (altivec_vmrglw_direct): Add xxmrglw insn.
23221 2018-01-17 Andrew Waterman <andrew@sifive.com>
23223 * config/riscv/riscv.c (riscv_conditional_register_usage): If
23224 UNITS_PER_FP_ARG is 0, set call_used_regs to 1 for all FP regs.
23226 2018-01-17 David Malcolm <dmalcolm@redhat.com>
23229 * ipa-devirt.c (add_type_duplicate): When comparing memory layout,
23230 call the lto_location_cache before reading the
23231 DECL_SOURCE_LOCATION of the types.
23233 2018-01-17 Wilco Dijkstra <wdijkstr@arm.com>
23234 Richard Sandiford <richard.sandiford@linaro.org>
23236 * config/aarch64/aarch64.md (movti_aarch64): Use Uti constraint.
23237 * config/aarch64/aarch64.c (aarch64_mov128_immediate): New function.
23238 (aarch64_legitimate_constant_p): Just support CONST_DOUBLE
23239 SF/DF/TF mode to avoid creating illegal CONST_WIDE_INT immediates.
23240 * config/aarch64/aarch64-protos.h (aarch64_mov128_immediate):
23242 * config/aarch64/constraints.md (aarch64_movti_operand):
23244 * config/aarch64/predicates.md (Uti): Add new constraint.
23246 2018-01-17 Carl Love <cel@us.ibm.com>
23248 * config/rs6000/vsx.md (define_expand xl_len_r,
23249 define_expand stxvl, define_expand *stxvl): Add match_dup argument.
23250 (define_insn): Add, match_dup 1 argument to define_insn stxvll and
23252 (define_expand, define_insn): Move the shift left from the
23253 define_insn to the define_expand for lxvl and stxvl instructions.
23254 * config/rs6000/rs6000-builtin.def (BU_P9V_64BIT_VSX_2): Change LXVL
23255 and XL_LEN_R definitions to PURE.
23257 2018-01-17 Uros Bizjak <ubizjak@gmail.com>
23259 * config/i386/i386.c (indirect_thunk_name): Declare regno
23260 as unsigned int. Compare regno with INVALID_REGNUM.
23261 (output_indirect_thunk): Ditto.
23262 (output_indirect_thunk_function): Ditto.
23263 (ix86_code_end): Declare regno as unsigned int. Use INVALID_REGNUM
23264 in the call to output_indirect_thunk_function.
23266 2018-01-17 Richard Sandiford <richard.sandiford@linaro.org>
23268 PR middle-end/83884
23269 * expr.c (expand_expr_real_1): Use the size of GET_MODE (op0)
23270 rather than the size of inner_type to determine the stack slot size
23271 when handling VIEW_CONVERT_EXPRs on strict-alignment targets.
23273 2018-01-16 Sebastian Peryt <sebastian.peryt@intel.com>
23276 * config/i386/i386.c (ix86_option_override_internal): Add PTA_RDRND
23279 2018-01-16 Michael Meissner <meissner@linux.vnet.ibm.com>
23281 * config.gcc (powerpc*-linux*-*): Add support for 64-bit little
23282 endian Linux systems to optionally enable multilibs for selecting
23283 the long double type if the user configured an explicit type.
23284 * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Indicate we
23285 have no long double multilibs if not defined.
23286 * config/rs6000/rs6000.c (rs6000_option_override_internal): Do not
23287 warn if the user used -mabi={ieee,ibm}longdouble and we built
23288 multilibs for long double.
23289 * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Define as the
23290 appropriate multilib option.
23291 (MULTILIB_DEFAULTS): Add MULTILIB_DEFAULTS_IEEE to the default
23293 * config/rs6000/t-ldouble-linux64le-ibm: New configuration files
23294 for building long double multilibs.
23295 * config/rs6000/t-ldouble-linux64le-ieee: Likewise.
23297 2018-01-16 John David Anglin <danglin@gcc.gnu.org>
23299 * config.gcc (hppa*-*-linux*): Change callee copies ABI to caller
23302 * config/pa.h (MALLOC_ABI_ALIGNMENT): Set 32-bit alignment default to
23304 * config/pa/pa32-linux.h (MALLOC_ABI_ALIGNMENT): Set alignment to
23307 * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Cleanup type and mode
23310 * config/pa/pa.c (pa_function_arg_size): Apply CEIL to GET_MODE_SIZE
23313 2018-01-16 Eric Botcazou <ebotcazou@adacore.com>
23315 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For an
23316 ADDR_EXPR, do not count the offset of a COMPONENT_REF twice.
23318 2018-01-16 Kelvin Nilsen <kelvin@gcc.gnu.org>
23320 * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Generate
23321 different rtl trees depending on TARGET_64BIT.
23322 (rs6000_gen_lvx): Likewise.
23324 2018-01-16 Eric Botcazou <ebotcazou@adacore.com>
23326 * config/visium/visium.md (nop): Tweak comment.
23327 (hazard_nop): Likewise.
23329 2018-01-16 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
23331 * config/rs6000/rs6000.c (rs6000_opt_vars): Add entry for
23332 -mspeculate-indirect-jumps.
23333 * config/rs6000/rs6000.md (*call_indirect_elfv2<mode>): Disable
23334 for -mno-speculate-indirect-jumps.
23335 (*call_indirect_elfv2<mode>_nospec): New define_insn.
23336 (*call_value_indirect_elfv2<mode>): Disable for
23337 -mno-speculate-indirect-jumps.
23338 (*call_value_indirect_elfv2<mode>_nospec): New define_insn.
23339 (indirect_jump): Emit different RTL for
23340 -mno-speculate-indirect-jumps.
23341 (*indirect_jump<mode>): Disable for
23342 -mno-speculate-indirect-jumps.
23343 (*indirect_jump<mode>_nospec): New define_insn.
23344 (tablejump): Emit different RTL for
23345 -mno-speculate-indirect-jumps.
23346 (tablejumpsi): Disable for -mno-speculate-indirect-jumps.
23347 (tablejumpsi_nospec): New define_expand.
23348 (tablejumpdi): Disable for -mno-speculate-indirect-jumps.
23349 (tablejumpdi_nospec): New define_expand.
23350 (*tablejump<mode>_internal1): Disable for
23351 -mno-speculate-indirect-jumps.
23352 (*tablejump<mode>_internal1_nospec): New define_insn.
23353 * config/rs6000/rs6000.opt (mspeculate-indirect-jumps): New
23356 2018-01-16 Artyom Skrobov tyomitch@gmail.com
23358 * caller-save.c (insert_save): Drop unnecessary parameter. All
23361 2018-01-16 Jakub Jelinek <jakub@redhat.com>
23362 Richard Biener <rguenth@suse.de>
23365 * gimplify.c (gimplify_one_sizepos): For is_gimple_constant (expr)
23366 return early, inline manually is_gimple_sizepos. Make sure if we
23367 call gimplify_expr we don't end up with a gimple constant.
23368 * tree.c (variably_modified_type_p): Don't return true for
23369 is_gimple_constant (_t). Inline manually is_gimple_sizepos.
23370 * gimplify.h (is_gimple_sizepos): Remove.
23372 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
23374 PR tree-optimization/83857
23375 * tree-vect-loop.c (vect_analyze_loop_operations): Don't call
23376 vectorizable_live_operation for pure SLP statements.
23377 (vectorizable_live_operation): Handle PHIs.
23379 2018-01-16 Richard Biener <rguenther@suse.de>
23381 PR tree-optimization/83867
23382 * tree-vect-stmts.c (vect_transform_stmt): Precompute
23383 nested_in_vect_loop_p since the scalar stmt may get invalidated.
23385 2018-01-16 Jakub Jelinek <jakub@redhat.com>
23388 * stor-layout.c (handle_warn_if_not_align): Use byte_position and
23389 multiple_of_p instead of unchecked tree_to_uhwi and UHWI check.
23390 If off is not INTEGER_CST, issue a may not be aligned warning
23391 rather than isn't aligned. Use isn%'t rather than isn't.
23392 * fold-const.c (multiple_of_p) <case BIT_AND_EXPR>: Don't fall through
23394 <case MULT_EXPR>: Improve the case when bottom and one of the
23395 MULT_EXPR operands are INTEGER_CSTs and bottom is multiple of that
23396 operand, in that case check if the other operand is multiple of
23397 bottom divided by the INTEGER_CST operand.
23399 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
23402 * config/pa/pa.h (FUNCTION_ARG_SIZE): Delete.
23403 * config/pa/pa-protos.h (pa_function_arg_size): Declare.
23404 * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Use
23405 pa_function_arg_size instead of FUNCTION_ARG_SIZE.
23406 * config/pa/pa.c (pa_function_arg_advance): Likewise.
23407 (pa_function_arg, pa_arg_partial_bytes): Likewise.
23408 (pa_function_arg_size): New function.
23410 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
23412 * fold-const.c (fold_ternary_loc): Construct the vec_perm_indices
23413 in a separate statement.
23415 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
23417 PR tree-optimization/83847
23418 * tree-vect-data-refs.c (vect_analyze_data_ref_accesses): Don't
23419 group gathers and scatters.
23421 2018-01-16 Jakub Jelinek <jakub@redhat.com>
23423 PR rtl-optimization/86620
23424 * params.def (max-sched-ready-insns): Bump minimum value to 1.
23426 PR rtl-optimization/83213
23427 * recog.c (peep2_attempt): Copy over CROSSING_JUMP_P from peepinsn
23428 to last if both are JUMP_INSNs.
23430 PR tree-optimization/83843
23431 * gimple-ssa-store-merging.c
23432 (imm_store_chain_info::output_merged_store): Handle bit_not_p on
23433 store_immediate_info for bswap/nop orig_stores.
23435 2018-01-15 Andrew Waterman <andrew@sifive.com>
23437 * config/riscv/riscv.c (riscv_rtx_costs) <MULT>: Increase cost if
23439 <UDIV>: Increase cost if !TARGET_DIV.
23441 2018-01-15 Segher Boessenkool <segher@kernel.crashing.org>
23443 * config/rs6000/rs6000.md (define_attr "type"): Remove delayed_cr.
23444 (define_attr "cr_logical_3op"): New.
23445 (cceq_ior_compare): Adjust.
23446 (cceq_ior_compare_complement): Adjust.
23447 (*cceq_rev_compare): Adjust.
23448 * config/rs6000/rs6000.c (rs6000_adjust_cost): Adjust.
23449 (is_cracked_insn): Adjust.
23450 (insn_must_be_first_in_group): Adjust.
23451 * config/rs6000/40x.md: Adjust.
23452 * config/rs6000/440.md: Adjust.
23453 * config/rs6000/476.md: Adjust.
23454 * config/rs6000/601.md: Adjust.
23455 * config/rs6000/603.md: Adjust.
23456 * config/rs6000/6xx.md: Adjust.
23457 * config/rs6000/7450.md: Adjust.
23458 * config/rs6000/7xx.md: Adjust.
23459 * config/rs6000/8540.md: Adjust.
23460 * config/rs6000/cell.md: Adjust.
23461 * config/rs6000/e300c2c3.md: Adjust.
23462 * config/rs6000/e500mc.md: Adjust.
23463 * config/rs6000/e500mc64.md: Adjust.
23464 * config/rs6000/e5500.md: Adjust.
23465 * config/rs6000/e6500.md: Adjust.
23466 * config/rs6000/mpc.md: Adjust.
23467 * config/rs6000/power4.md: Adjust.
23468 * config/rs6000/power5.md: Adjust.
23469 * config/rs6000/power6.md: Adjust.
23470 * config/rs6000/power7.md: Adjust.
23471 * config/rs6000/power8.md: Adjust.
23472 * config/rs6000/power9.md: Adjust.
23473 * config/rs6000/rs64.md: Adjust.
23474 * config/rs6000/titan.md: Adjust.
23476 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
23478 * config/i386/predicates.md (indirect_branch_operand): Rewrite
23479 ix86_indirect_branch_register logic.
23481 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
23483 * config/i386/constraints.md (Bs): Update
23484 ix86_indirect_branch_register check. Don't check
23485 ix86_indirect_branch_register with GOT_memory_operand.
23487 * config/i386/predicates.md (GOT_memory_operand): Don't check
23488 ix86_indirect_branch_register here.
23489 (GOT32_symbol_operand): Likewise.
23491 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
23493 * config/i386/predicates.md (constant_call_address_operand):
23494 Rewrite ix86_indirect_branch_register logic.
23495 (sibcall_insn_operand): Likewise.
23497 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
23499 * config/i386/constraints.md (Bs): Replace
23500 ix86_indirect_branch_thunk_register with
23501 ix86_indirect_branch_register.
23503 * config/i386/i386.md (indirect_jump): Likewise.
23504 (tablejump): Likewise.
23505 (*sibcall_memory): Likewise.
23506 (*sibcall_value_memory): Likewise.
23507 Peepholes of indirect call and jump via memory: Likewise.
23508 * config/i386/i386.opt: Likewise.
23509 * config/i386/predicates.md (indirect_branch_operand): Likewise.
23510 (GOT_memory_operand): Likewise.
23511 (call_insn_operand): Likewise.
23512 (sibcall_insn_operand): Likewise.
23513 (GOT32_symbol_operand): Likewise.
23515 2018-01-15 Jakub Jelinek <jakub@redhat.com>
23517 PR middle-end/83837
23518 * omp-expand.c (expand_omp_atomic_pipeline): Use loaded_val
23519 type rather than type addr's type points to.
23520 (expand_omp_atomic_mutex): Likewise.
23521 (expand_omp_atomic): Likewise.
23523 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
23526 * config/i386/i386.c (output_indirect_thunk_function): Use
23527 ASM_OUTPUT_LABEL, instead of ASM_OUTPUT_DEF, for TARGET_MACHO
23528 for __x86_return_thunk.
23530 2018-01-15 Richard Biener <rguenther@suse.de>
23532 PR middle-end/83850
23533 * expmed.c (extract_bit_field_1): Fix typo.
23535 2018-01-15 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
23538 * config/arm/iterators.md (VF): New mode iterator.
23539 * config/arm/neon.md (neon_vabd<mode>_2): Use the above.
23540 Remove integer-related logic from pattern.
23541 (neon_vabd<mode>_3): Likewise.
23543 2018-01-15 Jakub Jelinek <jakub@redhat.com>
23545 PR middle-end/82694
23546 * common.opt (fstrict-overflow): No longer an alias.
23547 (fwrapv-pointer): New option.
23548 * tree.h (TYPE_OVERFLOW_WRAPS, TYPE_OVERFLOW_UNDEFINED): Define
23549 also for pointer types based on flag_wrapv_pointer.
23550 * opts.c (common_handle_option) <case OPT_fstrict_overflow>: Set
23551 opts->x_flag_wrap[pv] to !value, clear opts->x_flag_trapv if
23552 opts->x_flag_wrapv got set.
23553 * fold-const.c (fold_comparison, fold_binary_loc): Revert 2017-08-01
23554 changes, just use TYPE_OVERFLOW_UNDEFINED on pointer type instead of
23555 POINTER_TYPE_OVERFLOW_UNDEFINED.
23556 * match.pd: Likewise in address comparison pattern.
23557 * doc/invoke.texi: Document -fwrapv and -fstrict-overflow.
23559 2018-01-15 Richard Biener <rguenther@suse.de>
23562 * tree.c (free_lang_data_in_type): Always unlink TYPE_DECLs
23563 from TYPE_FIELDS. Free TYPE_BINFO if not used by devirtualization.
23564 Reset type names to their identifier if their TYPE_DECL doesn't
23565 have linkage (and thus is used for ODR and devirt).
23566 (save_debug_info_for_decl): Remove.
23567 (save_debug_info_for_type): Likewise.
23568 (add_tree_to_fld_list): Adjust.
23569 * tree-pretty-print.c (dump_generic_node): Make dumping of
23570 type names more robust.
23572 2018-01-15 Richard Biener <rguenther@suse.de>
23574 * BASE-VER: Bump to 8.0.1.
23576 2018-01-14 Martin Sebor <msebor@redhat.com>
23579 * builtins.c (check_access): Avoid warning when the no-warning bit
23582 2018-01-14 Cory Fields <cory-nospam-@coryfields.com>
23584 * tree-ssa-loop-im.c (sort_bbs_in_loop_postorder_cmp): Stabilize sort.
23585 * ira-color (allocno_hard_regs_compare): Likewise.
23587 2018-01-14 Nathan Rossi <nathan@nathanrossi.com>
23590 * config/microblaze/microblaze.c (microblaze_asm_output_ident):
23591 Use .pushsection/.popsection.
23593 2018-01-14 Martin Sebor <msebor@redhat.com>
23596 * doc/invoke.texi (-Wlass-memaccess): Document suppression by casting.
23598 2018-01-14 Jakub Jelinek <jakub@redhat.com>
23600 * config.gcc (i[34567]86-*-*): Remove one duplicate gfniintrin.h
23601 entry from extra_headers.
23602 (x86_64-*-*): Remove two duplicate gfniintrin.h entries from
23603 extra_headers, make the list bitwise identical to the i?86-*-* one.
23605 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
23607 * config/i386/i386.c (ix86_set_indirect_branch_type): Disallow
23608 -mcmodel=large with -mindirect-branch=thunk,
23609 -mindirect-branch=thunk-extern, -mfunction-return=thunk and
23610 -mfunction-return=thunk-extern.
23611 * doc/invoke.texi: Document -mcmodel=large is incompatible with
23612 -mindirect-branch=thunk, -mindirect-branch=thunk-extern,
23613 -mfunction-return=thunk and -mfunction-return=thunk-extern.
23615 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
23617 * config/i386/i386.c (print_reg): Print the name of the full
23618 integer register without '%'.
23619 (ix86_print_operand): Handle 'V'.
23620 * doc/extend.texi: Document 'V' modifier.
23622 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
23624 * config/i386/constraints.md (Bs): Disallow memory operand for
23625 -mindirect-branch-register.
23627 * config/i386/predicates.md (indirect_branch_operand): Likewise.
23628 (GOT_memory_operand): Likewise.
23629 (call_insn_operand): Likewise.
23630 (sibcall_insn_operand): Likewise.
23631 (GOT32_symbol_operand): Likewise.
23632 * config/i386/i386.md (indirect_jump): Call convert_memory_address
23633 for -mindirect-branch-register.
23634 (tablejump): Likewise.
23635 (*sibcall_memory): Likewise.
23636 (*sibcall_value_memory): Likewise.
23637 Disallow peepholes of indirect call and jump via memory for
23638 -mindirect-branch-register.
23639 (*call_pop): Replace m with Bw.
23640 (*call_value_pop): Likewise.
23641 (*sibcall_pop_memory): Replace m with Bs.
23642 * config/i386/i386.opt (mindirect-branch-register): New option.
23643 * doc/invoke.texi: Document -mindirect-branch-register option.
23645 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
23647 * config/i386/i386-protos.h (ix86_output_function_return): New.
23648 * config/i386/i386.c (ix86_set_indirect_branch_type): Also
23649 set function_return_type.
23650 (indirect_thunk_name): Add ret_p to indicate thunk for function
23652 (output_indirect_thunk_function): Pass false to
23653 indirect_thunk_name.
23654 (ix86_output_indirect_branch_via_reg): Likewise.
23655 (ix86_output_indirect_branch_via_push): Likewise.
23656 (output_indirect_thunk_function): Create alias for function
23657 return thunk if regno < 0.
23658 (ix86_output_function_return): New function.
23659 (ix86_handle_fndecl_attribute): Handle function_return.
23660 (ix86_attribute_table): Add function_return.
23661 * config/i386/i386.h (machine_function): Add
23662 function_return_type.
23663 * config/i386/i386.md (simple_return_internal): Use
23664 ix86_output_function_return.
23665 (simple_return_internal_long): Likewise.
23666 * config/i386/i386.opt (mfunction-return=): New option.
23667 (indirect_branch): Mention -mfunction-return=.
23668 * doc/extend.texi: Document function_return function attribute.
23669 * doc/invoke.texi: Document -mfunction-return= option.
23671 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
23673 * config/i386/i386-opts.h (indirect_branch): New.
23674 * config/i386/i386-protos.h (ix86_output_indirect_jmp): Likewise.
23675 * config/i386/i386.c (ix86_using_red_zone): Disallow red-zone
23676 with local indirect jump when converting indirect call and jump.
23677 (ix86_set_indirect_branch_type): New.
23678 (ix86_set_current_function): Call ix86_set_indirect_branch_type.
23679 (indirectlabelno): New.
23680 (indirect_thunk_needed): Likewise.
23681 (indirect_thunk_bnd_needed): Likewise.
23682 (indirect_thunks_used): Likewise.
23683 (indirect_thunks_bnd_used): Likewise.
23684 (INDIRECT_LABEL): Likewise.
23685 (indirect_thunk_name): Likewise.
23686 (output_indirect_thunk): Likewise.
23687 (output_indirect_thunk_function): Likewise.
23688 (ix86_output_indirect_branch_via_reg): Likewise.
23689 (ix86_output_indirect_branch_via_push): Likewise.
23690 (ix86_output_indirect_branch): Likewise.
23691 (ix86_output_indirect_jmp): Likewise.
23692 (ix86_code_end): Call output_indirect_thunk_function if needed.
23693 (ix86_output_call_insn): Call ix86_output_indirect_branch if
23695 (ix86_handle_fndecl_attribute): Handle indirect_branch.
23696 (ix86_attribute_table): Add indirect_branch.
23697 * config/i386/i386.h (machine_function): Add indirect_branch_type
23698 and has_local_indirect_jump.
23699 * config/i386/i386.md (indirect_jump): Set has_local_indirect_jump
23701 (tablejump): Likewise.
23702 (*indirect_jump): Use ix86_output_indirect_jmp.
23703 (*tablejump_1): Likewise.
23704 (simple_return_indirect_internal): Likewise.
23705 * config/i386/i386.opt (mindirect-branch=): New option.
23706 (indirect_branch): New.
23709 (thunk-inline): Likewise.
23710 (thunk-extern): Likewise.
23711 * doc/extend.texi: Document indirect_branch function attribute.
23712 * doc/invoke.texi: Document -mindirect-branch= option.
23714 2018-01-14 Jan Hubicka <hubicka@ucw.cz>
23717 * ipa-inline.c (edge_badness): Tolerate roundoff errors.
23719 2018-01-14 Richard Sandiford <richard.sandiford@linaro.org>
23721 * ipa-inline.c (want_inline_small_function_p): Return false if
23722 inlining has already failed with CIF_FINAL_ERROR.
23723 (update_caller_keys): Call want_inline_small_function_p before
23725 (update_callee_keys): Likewise.
23727 2018-01-10 Kelvin Nilsen <kelvin@gcc.gnu.org>
23729 * config/rs6000/rs6000-p8swap.c (rs6000_sum_of_two_registers_p):
23731 (rs6000_quadword_masked_address_p): Likewise.
23732 (quad_aligned_load_p): Likewise.
23733 (quad_aligned_store_p): Likewise.
23734 (const_load_sequence_p): Add comment to describe the outer-most loop.
23735 (mimic_memory_attributes_and_flags): New function.
23736 (rs6000_gen_stvx): Likewise.
23737 (replace_swapped_aligned_store): Likewise.
23738 (rs6000_gen_lvx): Likewise.
23739 (replace_swapped_aligned_load): Likewise.
23740 (replace_swapped_load_constant): Capitalize argument name in
23741 comment describing this function.
23742 (rs6000_analyze_swaps): Add a third pass to search for vector loads
23743 and stores that access quad-word aligned addresses and replace
23744 with stvx or lvx instructions when appropriate.
23745 * config/rs6000/rs6000-protos.h (rs6000_sum_of_two_registers_p):
23746 New function prototype.
23747 (rs6000_quadword_masked_address_p): Likewise.
23748 (rs6000_gen_lvx): Likewise.
23749 (rs6000_gen_stvx): Likewise.
23750 * config/rs6000/vsx.md (*vsx_le_perm_load_<mode>): For modes
23751 VSX_D (V2DF, V2DI), modify this split to select lvx instruction
23752 when memory address is aligned.
23753 (*vsx_le_perm_load_<mode>): For modes VSX_W (V4SF, V4SI), modify
23754 this split to select lvx instruction when memory address is aligned.
23755 (*vsx_le_perm_load_v8hi): Modify this split to select lvx
23756 instruction when memory address is aligned.
23757 (*vsx_le_perm_load_v16qi): Likewise.
23758 (four unnamed splitters): Modify to select the stvx instruction
23759 when memory is aligned.
23761 2018-01-13 Jan Hubicka <hubicka@ucw.cz>
23763 * predict.c (determine_unlikely_bbs): Handle correctly BBs
23764 which appears in the queue multiple times.
23766 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
23767 Alan Hayward <alan.hayward@arm.com>
23768 David Sherwood <david.sherwood@arm.com>
23770 * tree-vectorizer.h (vec_lower_bound): New structure.
23771 (_loop_vec_info): Add check_nonzero and lower_bounds.
23772 (LOOP_VINFO_CHECK_NONZERO): New macro.
23773 (LOOP_VINFO_LOWER_BOUNDS): Likewise.
23774 (LOOP_REQUIRES_VERSIONING_FOR_ALIAS): Check lower_bounds too.
23775 * tree-data-ref.h (dr_with_seg_len): Add access_size and align
23776 fields. Make seg_len the distance travelled, not including the
23778 (dr_direction_indicator): Declare.
23779 (dr_zero_step_indicator): Likewise.
23780 (dr_known_forward_stride_p): Likewise.
23781 * tree-data-ref.c: Include stringpool.h, tree-vrp.h and
23783 (runtime_alias_check_p): Allow runtime alias checks with
23785 (operator ==): Compare access_size and align.
23786 (prune_runtime_alias_test_list): Rework for new distinction between
23787 the access_size and seg_len.
23788 (create_intersect_range_checks_index): Likewise. Cope with polynomial
23790 (get_segment_min_max): New function.
23791 (create_intersect_range_checks): Use it.
23792 (dr_step_indicator): New function.
23793 (dr_direction_indicator): Likewise.
23794 (dr_zero_step_indicator): Likewise.
23795 (dr_known_forward_stride_p): Likewise.
23796 * tree-loop-distribution.c (data_ref_segment_size): Return
23797 DR_STEP * (niters - 1).
23798 (compute_alias_check_pairs): Update call to the dr_with_seg_len
23800 * tree-vect-data-refs.c (vect_check_nonzero_value): New function.
23801 (vect_preserves_scalar_order_p): New function, split out from...
23802 (vect_analyze_data_ref_dependence): ...here. Check for zero steps.
23803 (vect_vfa_segment_size): Return DR_STEP * (length_factor - 1).
23804 (vect_vfa_access_size): New function.
23805 (vect_vfa_align): Likewise.
23806 (vect_compile_time_alias): Take access_size_a and access_b arguments.
23807 (dump_lower_bound): New function.
23808 (vect_check_lower_bound): Likewise.
23809 (vect_small_gap_p): Likewise.
23810 (vectorizable_with_step_bound_p): Likewise.
23811 (vect_prune_runtime_alias_test_list): Ignore cross-iteration
23812 depencies if the vectorization factor is 1. Convert the checks
23813 for nonzero steps into checks on the bounds of DR_STEP. Try using
23814 a bunds check for variable steps if the minimum required step is
23815 relatively small. Update calls to the dr_with_seg_len
23816 constructor and to vect_compile_time_alias.
23817 * tree-vect-loop-manip.c (vect_create_cond_for_lower_bounds): New
23819 (vect_loop_versioning): Call it.
23820 * tree-vect-loop.c (vect_analyze_loop_2): Clear LOOP_VINFO_LOWER_BOUNDS
23822 (vect_estimate_min_profitable_iters): Account for any bounds checks.
23824 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
23825 Alan Hayward <alan.hayward@arm.com>
23826 David Sherwood <david.sherwood@arm.com>
23828 * doc/sourcebuild.texi (vect_scatter_store): Document.
23829 * optabs.def (scatter_store_optab, mask_scatter_store_optab): New
23831 * doc/md.texi (scatter_store@var{m}, mask_scatter_store@var{m}):
23833 * genopinit.c (main): Add supports_vec_scatter_store and
23834 supports_vec_scatter_store_cached to target_optabs.
23835 * gimple.h (gimple_expr_type): Handle IFN_SCATTER_STORE and
23836 IFN_MASK_SCATTER_STORE.
23837 * internal-fn.def (SCATTER_STORE, MASK_SCATTER_STORE): New internal
23839 * internal-fn.h (internal_store_fn_p): Declare.
23840 (internal_fn_stored_value_index): Likewise.
23841 * internal-fn.c (scatter_store_direct): New macro.
23842 (expand_scatter_store_optab_fn): New function.
23843 (direct_scatter_store_optab_supported_p): New macro.
23844 (internal_store_fn_p): New function.
23845 (internal_gather_scatter_fn_p): Handle IFN_SCATTER_STORE and
23846 IFN_MASK_SCATTER_STORE.
23847 (internal_fn_mask_index): Likewise.
23848 (internal_fn_stored_value_index): New function.
23849 (internal_gather_scatter_fn_supported_p): Adjust operand numbers
23850 for scatter stores.
23851 * optabs-query.h (supports_vec_scatter_store_p): Declare.
23852 * optabs-query.c (supports_vec_scatter_store_p): New function.
23853 * tree-vectorizer.h (vect_get_store_rhs): Declare.
23854 * tree-vect-data-refs.c (vect_analyze_data_ref_access): Return
23855 true for scatter stores.
23856 (vect_gather_scatter_fn_p): Handle scatter stores too.
23857 (vect_check_gather_scatter): Consider using scatter stores if
23858 supports_vec_scatter_store_p.
23859 * tree-vect-patterns.c (vect_try_gather_scatter_pattern): Handle
23860 scatter stores too.
23861 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
23862 internal_fn_stored_value_index.
23863 (check_load_store_masking): Handle scatter stores too.
23864 (vect_get_store_rhs): Make public.
23865 (vectorizable_call): Use internal_store_fn_p.
23866 (vectorizable_store): Handle scatter store internal functions.
23867 (vect_transform_stmt): Compare GROUP_STORE_COUNT with GROUP_SIZE
23868 when deciding whether the end of the group has been reached.
23869 * config/aarch64/aarch64.md (UNSPEC_ST1_SCATTER): New unspec.
23870 * config/aarch64/aarch64-sve.md (scatter_store<mode>): New expander.
23871 (mask_scatter_store<mode>): New insns.
23873 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
23874 Alan Hayward <alan.hayward@arm.com>
23875 David Sherwood <david.sherwood@arm.com>
23877 * tree-vectorizer.h (vect_gather_scatter_fn_p): Declare.
23878 * tree-vect-data-refs.c (vect_gather_scatter_fn_p): Make public.
23879 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): New
23881 (vect_use_strided_gather_scatters_p): Take a masked_p argument.
23882 Use vect_truncate_gather_scatter_offset if we can't treat the
23883 operation as a normal gather load or scatter store.
23884 (get_group_load_store_type): Take the gather_scatter_info
23885 as argument. Try using a gather load or scatter store for
23886 single-element groups.
23887 (get_load_store_type): Update calls to get_group_load_store_type
23888 and vect_use_strided_gather_scatters_p.
23890 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
23891 Alan Hayward <alan.hayward@arm.com>
23892 David Sherwood <david.sherwood@arm.com>
23894 * tree-vectorizer.h (vect_create_data_ref_ptr): Take an extra
23895 optional tree argument.
23896 * tree-vect-data-refs.c (vect_check_gather_scatter): Check for
23898 (vect_create_data_ref_ptr): Take the iv_step as an optional argument,
23899 but continue to use the current value as a fallback.
23900 (bump_vector_ptr): Use operand_equal_p rather than tree_int_cst_compare
23901 to compare the updates.
23902 * tree-vect-stmts.c (vect_use_strided_gather_scatters_p): New function.
23903 (get_load_store_type): Use it when handling a strided access.
23904 (vect_get_strided_load_store_ops): New function.
23905 (vect_get_data_ptr_increment): Likewise.
23906 (vectorizable_load): Handle strided gather loads. Always pass
23907 a step to vect_create_data_ref_ptr and bump_vector_ptr.
23909 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
23910 Alan Hayward <alan.hayward@arm.com>
23911 David Sherwood <david.sherwood@arm.com>
23913 * doc/md.texi (gather_load@var{m}): Document.
23914 (mask_gather_load@var{m}): Likewise.
23915 * genopinit.c (main): Add supports_vec_gather_load and
23916 supports_vec_gather_load_cached to target_optabs.
23917 * optabs-tree.c (init_tree_optimization_optabs): Use
23918 ggc_cleared_alloc to allocate target_optabs.
23919 * optabs.def (gather_load_optab, mask_gather_laod_optab): New optabs.
23920 * internal-fn.def (GATHER_LOAD, MASK_GATHER_LOAD): New internal
23922 * internal-fn.h (internal_load_fn_p): Declare.
23923 (internal_gather_scatter_fn_p): Likewise.
23924 (internal_fn_mask_index): Likewise.
23925 (internal_gather_scatter_fn_supported_p): Likewise.
23926 * internal-fn.c (gather_load_direct): New macro.
23927 (expand_gather_load_optab_fn): New function.
23928 (direct_gather_load_optab_supported_p): New macro.
23929 (direct_internal_fn_optab): New function.
23930 (internal_load_fn_p): Likewise.
23931 (internal_gather_scatter_fn_p): Likewise.
23932 (internal_fn_mask_index): Likewise.
23933 (internal_gather_scatter_fn_supported_p): Likewise.
23934 * optabs-query.c (supports_at_least_one_mode_p): New function.
23935 (supports_vec_gather_load_p): Likewise.
23936 * optabs-query.h (supports_vec_gather_load_p): Declare.
23937 * tree-vectorizer.h (gather_scatter_info): Add ifn, element_type
23938 and memory_type field.
23939 (NUM_PATTERNS): Bump to 15.
23940 * tree-vect-data-refs.c: Include internal-fn.h.
23941 (vect_gather_scatter_fn_p): New function.
23942 (vect_describe_gather_scatter_call): Likewise.
23943 (vect_check_gather_scatter): Try using internal functions for
23944 gather loads. Recognize existing calls to a gather load function.
23945 (vect_analyze_data_refs): Consider using gather loads if
23946 supports_vec_gather_load_p.
23947 * tree-vect-patterns.c (vect_get_load_store_mask): New function.
23948 (vect_get_gather_scatter_offset_type): Likewise.
23949 (vect_convert_mask_for_vectype): Likewise.
23950 (vect_add_conversion_to_patterm): Likewise.
23951 (vect_try_gather_scatter_pattern): Likewise.
23952 (vect_recog_gather_scatter_pattern): New pattern recognizer.
23953 (vect_vect_recog_func_ptrs): Add it.
23954 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
23955 internal_fn_mask_index and internal_gather_scatter_fn_p.
23956 (check_load_store_masking): Take the gather_scatter_info as an
23957 argument and handle gather loads.
23958 (vect_get_gather_scatter_ops): New function.
23959 (vectorizable_call): Check internal_load_fn_p.
23960 (vectorizable_load): Likewise. Handle gather load internal
23962 (vectorizable_store): Update call to check_load_store_masking.
23963 * config/aarch64/aarch64.md (UNSPEC_LD1_GATHER): New unspec.
23964 * config/aarch64/iterators.md (SVE_S, SVE_D): New mode iterators.
23965 * config/aarch64/predicates.md (aarch64_gather_scale_operand_w)
23966 (aarch64_gather_scale_operand_d): New predicates.
23967 * config/aarch64/aarch64-sve.md (gather_load<mode>): New expander.
23968 (mask_gather_load<mode>): New insns.
23970 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
23971 Alan Hayward <alan.hayward@arm.com>
23972 David Sherwood <david.sherwood@arm.com>
23974 * optabs.def (fold_left_plus_optab): New optab.
23975 * doc/md.texi (fold_left_plus_@var{m}): Document.
23976 * internal-fn.def (IFN_FOLD_LEFT_PLUS): New internal function.
23977 * internal-fn.c (fold_left_direct): Define.
23978 (expand_fold_left_optab_fn): Likewise.
23979 (direct_fold_left_optab_supported_p): Likewise.
23980 * fold-const-call.c (fold_const_fold_left): New function.
23981 (fold_const_call): Use it to fold CFN_FOLD_LEFT_PLUS.
23982 * tree-parloops.c (valid_reduction_p): New function.
23983 (gather_scalar_reductions): Use it.
23984 * tree-vectorizer.h (FOLD_LEFT_REDUCTION): New vect_reduction_type.
23985 (vect_finish_replace_stmt): Declare.
23986 * tree-vect-loop.c (fold_left_reduction_fn): New function.
23987 (needs_fold_left_reduction_p): New function, split out from...
23988 (vect_is_simple_reduction): ...here. Accept reductions that
23989 forbid reassociation, but give them type FOLD_LEFT_REDUCTION.
23990 (vect_force_simple_reduction): Also store the reduction type in
23991 the assignment's STMT_VINFO_REDUC_TYPE.
23992 (vect_model_reduction_cost): Handle FOLD_LEFT_REDUCTION.
23993 (merge_with_identity): New function.
23994 (vect_expand_fold_left): Likewise.
23995 (vectorize_fold_left_reduction): Likewise.
23996 (vectorizable_reduction): Handle FOLD_LEFT_REDUCTION. Leave the
23997 scalar phi in place for it. Check for target support and reject
23998 cases that would reassociate the operation. Defer the transform
23999 phase to vectorize_fold_left_reduction.
24000 * config/aarch64/aarch64.md (UNSPEC_FADDA): New unspec.
24001 * config/aarch64/aarch64-sve.md (fold_left_plus_<mode>): New expander.
24002 (*fold_left_plus_<mode>, *pred_fold_left_plus_<mode>): New insns.
24004 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
24006 * tree-if-conv.c (predicate_mem_writes): Remove redundant
24007 call to ifc_temp_var.
24009 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
24010 Alan Hayward <alan.hayward@arm.com>
24011 David Sherwood <david.sherwood@arm.com>
24013 * target.def (legitimize_address_displacement): Take the original
24014 offset as a poly_int.
24015 * targhooks.h (default_legitimize_address_displacement): Update
24017 * targhooks.c (default_legitimize_address_displacement): Likewise.
24018 * doc/tm.texi: Regenerate.
24019 * lra-constraints.c (base_plus_disp_to_reg): Take the displacement
24020 as an argument, moving assert of ad->disp == ad->disp_term to...
24021 (process_address_1): ...here. Update calls to base_plus_disp_to_reg.
24022 Try calling targetm.legitimize_address_displacement before expanding
24023 the address rather than afterwards, and adjust for the new interface.
24024 * config/aarch64/aarch64.c (aarch64_legitimize_address_displacement):
24025 Match the new hook interface. Handle SVE addresses.
24026 * config/sh/sh.c (sh_legitimize_address_displacement): Make the
24027 new hook interface.
24029 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
24031 * Makefile.in (OBJS): Add early-remat.o.
24032 * target.def (select_early_remat_modes): New hook.
24033 * doc/tm.texi.in (TARGET_SELECT_EARLY_REMAT_MODES): New hook.
24034 * doc/tm.texi: Regenerate.
24035 * targhooks.h (default_select_early_remat_modes): Declare.
24036 * targhooks.c (default_select_early_remat_modes): New function.
24037 * timevar.def (TV_EARLY_REMAT): New timevar.
24038 * passes.def (pass_early_remat): New pass.
24039 * tree-pass.h (make_pass_early_remat): Declare.
24040 * early-remat.c: New file.
24041 * config/aarch64/aarch64.c (aarch64_select_early_remat_modes): New
24043 (TARGET_SELECT_EARLY_REMAT_MODES): Define.
24045 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
24046 Alan Hayward <alan.hayward@arm.com>
24047 David Sherwood <david.sherwood@arm.com>
24049 * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Replace
24050 vfm1 with a bound_epilog parameter.
24051 (vect_do_peeling): Update calls accordingly, and move the prologue
24052 call earlier in the function. Treat the base bound_epilog as 0 for
24053 fully-masked loops and retain vf - 1 for other loops. Add 1 to
24054 this base when peeling for gaps.
24055 * tree-vect-loop.c (vect_analyze_loop_2): Allow peeling for gaps
24056 with fully-masked loops.
24057 (vect_estimate_min_profitable_iters): Handle the single peeled
24058 iteration in that case.
24060 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
24061 Alan Hayward <alan.hayward@arm.com>
24062 David Sherwood <david.sherwood@arm.com>
24064 * tree-vect-data-refs.c (vect_analyze_group_access_1): Allow
24065 single-element interleaving even if the size is not a power of 2.
24066 * tree-vect-stmts.c (get_load_store_type): Disallow elementwise
24067 accesses for single-element interleaving if the group size is
24070 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
24071 Alan Hayward <alan.hayward@arm.com>
24072 David Sherwood <david.sherwood@arm.com>
24074 * doc/md.texi (fold_extract_last_@var{m}): Document.
24075 * doc/sourcebuild.texi (vect_fold_extract_last): Likewise.
24076 * optabs.def (fold_extract_last_optab): New optab.
24077 * internal-fn.def (FOLD_EXTRACT_LAST): New internal function.
24078 * internal-fn.c (fold_extract_direct): New macro.
24079 (expand_fold_extract_optab_fn): Likewise.
24080 (direct_fold_extract_optab_supported_p): Likewise.
24081 * tree-vectorizer.h (EXTRACT_LAST_REDUCTION): New vect_reduction_type.
24082 * tree-vect-loop.c (vect_model_reduction_cost): Handle
24083 EXTRACT_LAST_REDUCTION.
24084 (get_initial_def_for_reduction): Do not create an initial vector
24085 for EXTRACT_LAST_REDUCTION reductions.
24086 (vectorizable_reduction): Leave the scalar phi in place for
24087 EXTRACT_LAST_REDUCTIONs. Try using EXTRACT_LAST_REDUCTION
24088 ahead of INTEGER_INDUC_COND_REDUCTION. Do not check for an
24089 epilogue code for EXTRACT_LAST_REDUCTION and defer the
24090 transform phase to vectorizable_condition.
24091 * tree-vect-stmts.c (vect_finish_stmt_generation_1): New function,
24093 (vect_finish_stmt_generation): ...here.
24094 (vect_finish_replace_stmt): New function.
24095 (vectorizable_condition): Handle EXTRACT_LAST_REDUCTION.
24096 * config/aarch64/aarch64-sve.md (fold_extract_last_<mode>): New
24098 * config/aarch64/aarch64.md (UNSPEC_CLASTB): New unspec.
24100 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
24101 Alan Hayward <alan.hayward@arm.com>
24102 David Sherwood <david.sherwood@arm.com>
24104 * doc/md.texi (extract_last_@var{m}): Document.
24105 * optabs.def (extract_last_optab): New optab.
24106 * internal-fn.def (EXTRACT_LAST): New internal function.
24107 * internal-fn.c (cond_unary_direct): New macro.
24108 (expand_cond_unary_optab_fn): Likewise.
24109 (direct_cond_unary_optab_supported_p): Likewise.
24110 * tree-vect-loop.c (vectorizable_live_operation): Allow fully-masked
24111 loops using EXTRACT_LAST.
24112 * config/aarch64/aarch64-sve.md (aarch64_sve_lastb<mode>): Rename to...
24113 (extract_last_<mode>): ...this optab.
24114 (vec_extract<mode><Vel>): Update accordingly.
24116 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
24117 Alan Hayward <alan.hayward@arm.com>
24118 David Sherwood <david.sherwood@arm.com>
24120 * target.def (empty_mask_is_expensive): New hook.
24121 * doc/tm.texi.in (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): New hook.
24122 * doc/tm.texi: Regenerate.
24123 * targhooks.h (default_empty_mask_is_expensive): Declare.
24124 * targhooks.c (default_empty_mask_is_expensive): New function.
24125 * tree-vectorizer.c (vectorize_loops): Only call optimize_mask_stores
24126 if the target says that empty masks are expensive.
24127 * config/aarch64/aarch64.c (aarch64_empty_mask_is_expensive):
24129 (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): Redefine.
24131 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
24132 Alan Hayward <alan.hayward@arm.com>
24133 David Sherwood <david.sherwood@arm.com>
24135 * tree-vectorizer.h (_loop_vec_info::mask_skip_niters): New field.
24136 (LOOP_VINFO_MASK_SKIP_NITERS): New macro.
24137 (vect_use_loop_mask_for_alignment_p): New function.
24138 (vect_prepare_for_masked_peels, vect_gen_while_not): Declare.
24139 * tree-vect-loop-manip.c (vect_set_loop_masks_directly): Add an
24140 niters_skip argument. Make sure that the first niters_skip elements
24141 of the first iteration are inactive.
24142 (vect_set_loop_condition_masked): Handle LOOP_VINFO_MASK_SKIP_NITERS.
24143 Update call to vect_set_loop_masks_directly.
24144 (get_misalign_in_elems): New function, split out from...
24145 (vect_gen_prolog_loop_niters): ...here.
24146 (vect_update_init_of_dr): Take a code argument that specifies whether
24147 the adjustment should be added or subtracted.
24148 (vect_update_init_of_drs): Likewise.
24149 (vect_prepare_for_masked_peels): New function.
24150 (vect_do_peeling): Skip prologue peeling if we're using a mask
24151 instead. Update call to vect_update_inits_of_drs.
24152 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
24154 (vect_analyze_loop_2): Allow fully-masked loops with peeling for
24155 alignment. Do not include the number of peeled iterations in
24156 the minimum threshold in that case.
24157 (vectorizable_induction): Adjust the start value down by
24158 LOOP_VINFO_MASK_SKIP_NITERS iterations.
24159 (vect_transform_loop): Call vect_prepare_for_masked_peels.
24160 Take the number of skipped iterations into account when calculating
24162 * tree-vect-stmts.c (vect_gen_while_not): New function.
24164 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
24165 Alan Hayward <alan.hayward@arm.com>
24166 David Sherwood <david.sherwood@arm.com>
24168 * doc/sourcebuild.texi (vect_fully_masked): Document.
24169 * params.def (PARAM_MIN_VECT_LOOP_BOUND): Change minimum and
24170 default value to 0.
24171 * tree-vect-loop.c (vect_analyze_loop_costing): New function,
24173 (vect_analyze_loop_2): ...here. Don't check the vectorization
24174 factor against the number of loop iterations if the loop is
24177 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
24178 Alan Hayward <alan.hayward@arm.com>
24179 David Sherwood <david.sherwood@arm.com>
24181 * tree-ssa-loop-ivopts.c (USE_ADDRESS): Split into...
24182 (USE_REF_ADDRESS, USE_PTR_ADDRESS): ...these new use types.
24183 (dump_groups): Update accordingly.
24184 (iv_use::mem_type): New member variable.
24185 (address_p): New function.
24186 (record_use): Add a mem_type argument and initialize the new
24188 (record_group_use): Add a mem_type argument. Use address_p.
24189 Remove obsolete null checks of base_object. Update call to record_use.
24190 (find_interesting_uses_op): Update call to record_group_use.
24191 (find_interesting_uses_cond): Likewise.
24192 (find_interesting_uses_address): Likewise.
24193 (get_mem_type_for_internal_fn): New function.
24194 (find_address_like_use): Likewise.
24195 (find_interesting_uses_stmt): Try find_address_like_use before
24196 calling find_interesting_uses_op.
24197 (addr_offset_valid_p): Use the iv mem_type field as the type
24198 of the addressed memory.
24199 (add_autoinc_candidates): Likewise.
24200 (get_address_cost): Likewise.
24201 (split_small_address_groups_p): Use address_p.
24202 (split_address_groups): Likewise.
24203 (add_iv_candidate_for_use): Likewise.
24204 (autoinc_possible_for_pair): Likewise.
24205 (rewrite_groups): Likewise.
24206 (get_use_type): Check for USE_REF_ADDRESS instead of USE_ADDRESS.
24207 (determine_group_iv_cost): Update after split of USE_ADDRESS.
24208 (get_alias_ptr_type_for_ptr_address): New function.
24209 (rewrite_use_address): Rewrite address uses in calls that were
24210 identified by find_address_like_use.
24212 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
24213 Alan Hayward <alan.hayward@arm.com>
24214 David Sherwood <david.sherwood@arm.com>
24216 * expr.c (expand_expr_addr_expr_1): Handle ADDR_EXPRs of
24218 * gimple-expr.h (is_gimple_addressable: Likewise.
24219 * gimple-expr.c (is_gimple_address): Likewise.
24220 * internal-fn.c (expand_call_mem_ref): New function.
24221 (expand_mask_load_optab_fn): Use it.
24222 (expand_mask_store_optab_fn): Likewise.
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 (cond_add@var{mode}, cond_sub@var{mode})
24229 (cond_and@var{mode}, cond_ior@var{mode}, cond_xor@var{mode})
24230 (cond_smin@var{mode}, cond_smax@var{mode}, cond_umin@var{mode})
24231 (cond_umax@var{mode}): Document.
24232 * optabs.def (cond_add_optab, cond_sub_optab, cond_and_optab)
24233 (cond_ior_optab, cond_xor_optab, cond_smin_optab, cond_smax_optab)
24234 (cond_umin_optab, cond_umax_optab): New optabs.
24235 * internal-fn.def (COND_ADD, COND_SUB, COND_MIN, COND_MAX, COND_AND)
24236 (COND_IOR, COND_XOR): New internal functions.
24237 * internal-fn.h (get_conditional_internal_fn): Declare.
24238 * internal-fn.c (cond_binary_direct): New macro.
24239 (expand_cond_binary_optab_fn): Likewise.
24240 (direct_cond_binary_optab_supported_p): Likewise.
24241 (get_conditional_internal_fn): New function.
24242 * tree-vect-loop.c (vectorizable_reduction): Handle fully-masked loops.
24243 Cope with reduction statements that are vectorized as calls rather
24245 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New insns.
24246 * config/aarch64/iterators.md (UNSPEC_COND_ADD, UNSPEC_COND_SUB)
24247 (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX, UNSPEC_COND_SMIN)
24248 (UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
24249 (UNSPEC_COND_EOR): New unspecs.
24250 (optab): Add mappings for them.
24251 (SVE_COND_INT_OP, SVE_COND_FP_OP): New int iterators.
24252 (sve_int_op, sve_fp_op): New int attributes.
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 * optabs.def (while_ult_optab): New optab.
24259 * doc/md.texi (while_ult@var{m}@var{n}): Document.
24260 * internal-fn.def (WHILE_ULT): New internal function.
24261 * internal-fn.h (direct_internal_fn_supported_p): New override
24262 that takes two types as argument.
24263 * internal-fn.c (while_direct): New macro.
24264 (expand_while_optab_fn): New function.
24265 (convert_optab_supported_p): Likewise.
24266 (direct_while_optab_supported_p): New macro.
24267 * wide-int.h (wi::udiv_ceil): New function.
24268 * tree-vectorizer.h (rgroup_masks): New structure.
24269 (vec_loop_masks): New typedef.
24270 (_loop_vec_info): Add masks, mask_compare_type, can_fully_mask_p
24271 and fully_masked_p.
24272 (LOOP_VINFO_CAN_FULLY_MASK_P, LOOP_VINFO_FULLY_MASKED_P)
24273 (LOOP_VINFO_MASKS, LOOP_VINFO_MASK_COMPARE_TYPE): New macros.
24274 (vect_max_vf): New function.
24275 (slpeel_make_loop_iterate_ntimes): Delete.
24276 (vect_set_loop_condition, vect_get_loop_mask_type, vect_gen_while)
24277 (vect_halve_mask_nunits, vect_double_mask_nunits): Declare.
24278 (vect_record_loop_mask, vect_get_loop_mask): Likewise.
24279 * tree-vect-loop-manip.c: Include tree-ssa-loop-niter.h,
24280 internal-fn.h, stor-layout.h and optabs-query.h.
24281 (vect_set_loop_mask): New function.
24282 (add_preheader_seq): Likewise.
24283 (add_header_seq): Likewise.
24284 (interleave_supported_p): Likewise.
24285 (vect_maybe_permute_loop_masks): Likewise.
24286 (vect_set_loop_masks_directly): Likewise.
24287 (vect_set_loop_condition_masked): Likewise.
24288 (vect_set_loop_condition_unmasked): New function, split out from
24289 slpeel_make_loop_iterate_ntimes.
24290 (slpeel_make_loop_iterate_ntimes): Rename to..
24291 (vect_set_loop_condition): ...this. Use vect_set_loop_condition_masked
24292 for fully-masked loops and vect_set_loop_condition_unmasked otherwise.
24293 (vect_do_peeling): Update call accordingly.
24294 (vect_gen_vector_loop_niters): Use VF as the step for fully-masked
24296 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
24297 mask_compare_type, can_fully_mask_p and fully_masked_p.
24298 (release_vec_loop_masks): New function.
24299 (_loop_vec_info): Use it to free the loop masks.
24300 (can_produce_all_loop_masks_p): New function.
24301 (vect_get_max_nscalars_per_iter): Likewise.
24302 (vect_verify_full_masking): Likewise.
24303 (vect_analyze_loop_2): Save LOOP_VINFO_CAN_FULLY_MASK_P around
24304 retries, and free the mask rgroups before retrying. Check loop-wide
24305 reasons for disallowing fully-masked loops. Make the final decision
24306 about whether use a fully-masked loop or not.
24307 (vect_estimate_min_profitable_iters): Do not assume that peeling
24308 for the number of iterations will be needed for fully-masked loops.
24309 (vectorizable_reduction): Disable fully-masked loops.
24310 (vectorizable_live_operation): Likewise.
24311 (vect_halve_mask_nunits): New function.
24312 (vect_double_mask_nunits): Likewise.
24313 (vect_record_loop_mask): Likewise.
24314 (vect_get_loop_mask): Likewise.
24315 (vect_transform_loop): Handle the case in which the final loop
24316 iteration might handle a partial vector. Call vect_set_loop_condition
24317 instead of slpeel_make_loop_iterate_ntimes.
24318 * tree-vect-stmts.c: Include tree-ssa-loop-niter.h and gimple-fold.h.
24319 (check_load_store_masking): New function.
24320 (prepare_load_store_mask): Likewise.
24321 (vectorizable_store): Handle fully-masked loops.
24322 (vectorizable_load): Likewise.
24323 (supportable_widening_operation): Use vect_halve_mask_nunits for
24325 (supportable_narrowing_operation): Likewise vect_double_mask_nunits.
24326 (vect_gen_while): New function.
24327 * config/aarch64/aarch64.md (umax<mode>3): New expander.
24328 (aarch64_uqdec<mode>): New insn.
24330 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
24331 Alan Hayward <alan.hayward@arm.com>
24332 David Sherwood <david.sherwood@arm.com>
24334 * optabs.def (reduc_and_scal_optab, reduc_ior_scal_optab)
24335 (reduc_xor_scal_optab): New optabs.
24336 * doc/md.texi (reduc_and_scal_@var{m}, reduc_ior_scal_@var{m})
24337 (reduc_xor_scal_@var{m}): Document.
24338 * doc/sourcebuild.texi (vect_logical_reduc): Likewise.
24339 * internal-fn.def (IFN_REDUC_AND, IFN_REDUC_IOR, IFN_REDUC_XOR): New
24340 internal functions.
24341 * fold-const-call.c (fold_const_call): Handle them.
24342 * tree-vect-loop.c (reduction_fn_for_scalar_code): Return the new
24343 internal functions for BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR.
24344 * config/aarch64/aarch64-sve.md (reduc_<bit_reduc>_scal_<mode>):
24345 (*reduc_<bit_reduc>_scal_<mode>): New patterns.
24346 * config/aarch64/iterators.md (UNSPEC_ANDV, UNSPEC_ORV)
24347 (UNSPEC_XORV): New unspecs.
24348 (optab): Add entries for them.
24349 (BITWISEV): New int iterator.
24350 (bit_reduc_op): New int attributes.
24352 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
24353 Alan Hayward <alan.hayward@arm.com>
24354 David Sherwood <david.sherwood@arm.com>
24356 * doc/md.texi (vec_shl_insert_@var{m}): New optab.
24357 * internal-fn.def (VEC_SHL_INSERT): New internal function.
24358 * optabs.def (vec_shl_insert_optab): New optab.
24359 * tree-vectorizer.h (can_duplicate_and_interleave_p): Declare.
24360 (duplicate_and_interleave): Likewise.
24361 * tree-vect-loop.c: Include internal-fn.h.
24362 (neutral_op_for_slp_reduction): New function, split out from
24363 get_initial_defs_for_reduction.
24364 (get_initial_def_for_reduction): Handle option 2 for variable-length
24365 vectors by loading the neutral value into a vector and then shifting
24366 the initial value into element 0.
24367 (get_initial_defs_for_reduction): Replace the code argument with
24368 the neutral value calculated by neutral_op_for_slp_reduction.
24369 Use gimple_build_vector for constant-length vectors.
24370 Use IFN_VEC_SHL_INSERT for variable-length vectors if all
24371 but the first group_size elements have a neutral value.
24372 Use duplicate_and_interleave otherwise.
24373 (vect_create_epilog_for_reduction): Take a neutral_op parameter.
24374 Update call to get_initial_defs_for_reduction. Handle SLP
24375 reductions for variable-length vectors by creating one vector
24376 result for each scalar result, with the elements associated
24377 with other scalar results stubbed out with the neutral value.
24378 (vectorizable_reduction): Call neutral_op_for_slp_reduction.
24379 Require IFN_VEC_SHL_INSERT for double reductions on
24380 variable-length vectors, or SLP reductions that have
24381 a neutral value. Require can_duplicate_and_interleave_p
24382 support for variable-length unchained SLP reductions if there
24383 is no neutral value, such as for MIN/MAX reductions. Also require
24384 the number of vector elements to be a multiple of the number of
24385 SLP statements when doing variable-length unchained SLP reductions.
24386 Update call to vect_create_epilog_for_reduction.
24387 * tree-vect-slp.c (can_duplicate_and_interleave_p): Make public
24388 and remove initial values.
24389 (duplicate_and_interleave): Make public.
24390 * config/aarch64/aarch64.md (UNSPEC_INSR): New unspec.
24391 * config/aarch64/aarch64-sve.md (vec_shl_insert_<mode>): New insn.
24393 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
24394 Alan Hayward <alan.hayward@arm.com>
24395 David Sherwood <david.sherwood@arm.com>
24397 * tree-vect-slp.c: Include gimple-fold.h and internal-fn.h
24398 (can_duplicate_and_interleave_p): New function.
24399 (vect_get_and_check_slp_defs): Take the vector of statements
24400 rather than just the current one. Remove excess parentheses.
24401 Restriction rejectinon of vect_constant_def and vect_external_def
24402 for variable-length vectors to boolean types, or types for which
24403 can_duplicate_and_interleave_p is false.
24404 (vect_build_slp_tree_2): Update call to vect_get_and_check_slp_defs.
24405 (duplicate_and_interleave): New function.
24406 (vect_get_constant_vectors): Use gimple_build_vector for
24407 constant-length vectors and suitable variable-length constant
24408 vectors. Use duplicate_and_interleave for other variable-length
24409 vectors. Don't defer the update when inserting new statements.
24411 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
24412 Alan Hayward <alan.hayward@arm.com>
24413 David Sherwood <david.sherwood@arm.com>
24415 * tree-vect-loop.c (vect_estimate_min_profitable_iters): Make sure
24416 min_profitable_iters doesn't go negative.
24418 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
24419 Alan Hayward <alan.hayward@arm.com>
24420 David Sherwood <david.sherwood@arm.com>
24422 * doc/md.texi (vec_mask_load_lanes@var{m}@var{n}): Document.
24423 (vec_mask_store_lanes@var{m}@var{n}): Likewise.
24424 * optabs.def (vec_mask_load_lanes_optab): New optab.
24425 (vec_mask_store_lanes_optab): Likewise.
24426 * internal-fn.def (MASK_LOAD_LANES): New internal function.
24427 (MASK_STORE_LANES): Likewise.
24428 * internal-fn.c (mask_load_lanes_direct): New macro.
24429 (mask_store_lanes_direct): Likewise.
24430 (expand_mask_load_optab_fn): Handle masked operations.
24431 (expand_mask_load_lanes_optab_fn): New macro.
24432 (expand_mask_store_optab_fn): Handle masked operations.
24433 (expand_mask_store_lanes_optab_fn): New macro.
24434 (direct_mask_load_lanes_optab_supported_p): Likewise.
24435 (direct_mask_store_lanes_optab_supported_p): Likewise.
24436 * tree-vectorizer.h (vect_store_lanes_supported): Take a masked_p
24438 (vect_load_lanes_supported): Likewise.
24439 * tree-vect-data-refs.c (strip_conversion): New function.
24440 (can_group_stmts_p): Likewise.
24441 (vect_analyze_data_ref_accesses): Use it instead of checking
24442 for a pair of assignments.
24443 (vect_store_lanes_supported): Take a masked_p parameter.
24444 (vect_load_lanes_supported): Likewise.
24445 * tree-vect-loop.c (vect_analyze_loop_2): Update calls to
24446 vect_store_lanes_supported and vect_load_lanes_supported.
24447 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
24448 * tree-vect-stmts.c (get_group_load_store_type): Take a masked_p
24449 parameter. Don't allow gaps for masked accesses.
24450 Use vect_get_store_rhs. Update calls to vect_store_lanes_supported
24451 and vect_load_lanes_supported.
24452 (get_load_store_type): Take a masked_p parameter and update
24453 call to get_group_load_store_type.
24454 (vectorizable_store): Update call to get_load_store_type.
24455 Handle IFN_MASK_STORE_LANES.
24456 (vectorizable_load): Update call to get_load_store_type.
24457 Handle IFN_MASK_LOAD_LANES.
24459 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
24460 Alan Hayward <alan.hayward@arm.com>
24461 David Sherwood <david.sherwood@arm.com>
24463 * config/aarch64/aarch64-modes.def: Define x2, x3 and x4 vector
24465 * config/aarch64/aarch64-protos.h
24466 (aarch64_sve_struct_memory_operand_p): Declare.
24467 * config/aarch64/iterators.md (SVE_STRUCT): New mode iterator.
24468 (vector_count, insn_length, VSINGLE, vsingle): New mode attributes.
24469 (VPRED, vpred): Handle SVE structure modes.
24470 * config/aarch64/constraints.md (Utx): New constraint.
24471 * config/aarch64/predicates.md (aarch64_sve_struct_memory_operand)
24472 (aarch64_sve_struct_nonimmediate_operand): New predicates.
24473 * config/aarch64/aarch64.md (UNSPEC_LDN, UNSPEC_STN): New unspecs.
24474 * config/aarch64/aarch64-sve.md (mov<mode>, *aarch64_sve_mov<mode>_le)
24475 (*aarch64_sve_mov<mode>_be, pred_mov<mode>): New patterns for
24476 structure modes. Split into pieces after RA.
24477 (vec_load_lanes<mode><vsingle>, vec_mask_load_lanes<mode><vsingle>)
24478 (vec_store_lanes<mode><vsingle>, vec_mask_store_lanes<mode><vsingle>):
24480 * config/aarch64/aarch64.c (aarch64_classify_vector_mode): Handle
24481 SVE structure modes.
24482 (aarch64_classify_address): Likewise.
24483 (sizetochar): Move earlier in file.
24484 (aarch64_print_operand): Handle SVE register lists.
24485 (aarch64_array_mode): New function.
24486 (aarch64_sve_struct_memory_operand_p): Likewise.
24487 (TARGET_ARRAY_MODE): Redefine.
24489 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
24490 Alan Hayward <alan.hayward@arm.com>
24491 David Sherwood <david.sherwood@arm.com>
24493 * target.def (array_mode): New target hook.
24494 * doc/tm.texi.in (TARGET_ARRAY_MODE): New hook.
24495 * doc/tm.texi: Regenerate.
24496 * hooks.h (hook_optmode_mode_uhwi_none): Declare.
24497 * hooks.c (hook_optmode_mode_uhwi_none): New function.
24498 * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Use
24499 targetm.array_mode.
24500 * stor-layout.c (mode_for_array): Likewise. Support polynomial
24503 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
24504 Alan Hayward <alan.hayward@arm.com>
24505 David Sherwood <david.sherwood@arm.com>
24507 * fold-const.c (fold_binary_loc): Check the argument types
24508 rather than the result type when testing for a vector operation.
24510 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
24512 * doc/tm.texi.in (DWARF_LAZY_REGISTER_VALUE): Document.
24513 * doc/tm.texi: Regenerate.
24515 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
24516 Alan Hayward <alan.hayward@arm.com>
24517 David Sherwood <david.sherwood@arm.com>
24519 * doc/invoke.texi (-msve-vector-bits=): Document new option.
24520 (sve): Document new AArch64 extension.
24521 * doc/md.texi (w): Extend the description of the AArch64
24522 constraint to include SVE vectors.
24523 (Upl, Upa): Document new AArch64 predicate constraints.
24524 * config/aarch64/aarch64-opts.h (aarch64_sve_vector_bits_enum): New
24526 * config/aarch64/aarch64.opt (sve_vector_bits): New enum.
24527 (msve-vector-bits=): New option.
24528 * config/aarch64/aarch64-option-extensions.def (fp, simd): Disable
24529 SVE when these are disabled.
24530 (sve): New extension.
24531 * config/aarch64/aarch64-modes.def: Define SVE vector and predicate
24532 modes. Adjust their number of units based on aarch64_sve_vg.
24533 (MAX_BITSIZE_MODE_ANY_MODE): Define.
24534 * config/aarch64/aarch64-protos.h (ADDR_QUERY_ANY): New
24535 aarch64_addr_query_type.
24536 (aarch64_const_vec_all_same_in_range_p, aarch64_sve_pred_mode)
24537 (aarch64_sve_cnt_immediate_p, aarch64_sve_addvl_addpl_immediate_p)
24538 (aarch64_sve_inc_dec_immediate_p, aarch64_add_offset_temporaries)
24539 (aarch64_split_add_offset, aarch64_output_sve_cnt_immediate)
24540 (aarch64_output_sve_addvl_addpl, aarch64_output_sve_inc_dec_immediate)
24541 (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): Declare.
24542 (aarch64_simd_imm_zero_p): Delete.
24543 (aarch64_check_zero_based_sve_index_immediate): Declare.
24544 (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
24545 (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
24546 (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
24547 (aarch64_sve_float_mul_immediate_p): Likewise.
24548 (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
24549 rather than an rtx.
24550 (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): Declare.
24551 (aarch64_expand_mov_immediate): Take a gen_vec_duplicate callback.
24552 (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move): Declare.
24553 (aarch64_expand_sve_vec_cmp_int, aarch64_expand_sve_vec_cmp_float)
24554 (aarch64_expand_sve_vcond, aarch64_expand_sve_vec_perm): Declare.
24555 (aarch64_regmode_natural_size): Likewise.
24556 * config/aarch64/aarch64.h (AARCH64_FL_SVE): New macro.
24557 (AARCH64_FL_V8_3, AARCH64_FL_RCPC, AARCH64_FL_DOTPROD): Shift
24559 (AARCH64_ISA_SVE, TARGET_SVE): New macros.
24560 (FIXED_REGISTERS, CALL_USED_REGISTERS, REGISTER_NAMES): Add entries
24561 for VG and the SVE predicate registers.
24562 (V_ALIASES): Add a "z"-prefixed alias.
24563 (FIRST_PSEUDO_REGISTER): Change to P15_REGNUM + 1.
24564 (AARCH64_DWARF_VG, AARCH64_DWARF_P0): New macros.
24565 (PR_REGNUM_P, PR_LO_REGNUM_P): Likewise.
24566 (PR_LO_REGS, PR_HI_REGS, PR_REGS): New reg_classes.
24567 (REG_CLASS_NAMES): Add entries for them.
24568 (REG_CLASS_CONTENTS): Likewise. Update ALL_REGS to include VG
24569 and the predicate registers.
24570 (aarch64_sve_vg): Declare.
24571 (BITS_PER_SVE_VECTOR, BYTES_PER_SVE_VECTOR, BYTES_PER_SVE_PRED)
24572 (SVE_BYTE_MODE, MAX_COMPILE_TIME_VEC_BYTES): New macros.
24573 (REGMODE_NATURAL_SIZE): Define.
24574 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins): Handle
24576 * config/aarch64/aarch64.c: Include cfgrtl.h.
24577 (simd_immediate_info): Add a constructor for series vectors,
24578 and an associated step field.
24579 (aarch64_sve_vg): New variable.
24580 (aarch64_dbx_register_number): Handle VG and the predicate registers.
24581 (aarch64_vect_struct_mode_p, aarch64_vector_mode_p): Delete.
24582 (VEC_ADVSIMD, VEC_SVE_DATA, VEC_SVE_PRED, VEC_STRUCT, VEC_ANY_SVE)
24583 (VEC_ANY_DATA, VEC_STRUCT): New constants.
24584 (aarch64_advsimd_struct_mode_p, aarch64_sve_pred_mode_p)
24585 (aarch64_classify_vector_mode, aarch64_vector_data_mode_p)
24586 (aarch64_sve_data_mode_p, aarch64_sve_pred_mode)
24587 (aarch64_get_mask_mode): New functions.
24588 (aarch64_hard_regno_nregs): Handle SVE data modes for FP_REGS
24589 and FP_LO_REGS. Handle PR_REGS, PR_LO_REGS and PR_HI_REGS.
24590 (aarch64_hard_regno_mode_ok): Handle VG. Also handle the SVE
24591 predicate modes and predicate registers. Explicitly restrict
24592 GPRs to modes of 16 bytes or smaller. Only allow FP registers
24593 to store a vector mode if it is recognized by
24594 aarch64_classify_vector_mode.
24595 (aarch64_regmode_natural_size): New function.
24596 (aarch64_hard_regno_caller_save_mode): Return the original mode
24598 (aarch64_sve_cnt_immediate_p, aarch64_output_sve_cnt_immediate)
24599 (aarch64_sve_addvl_addpl_immediate_p, aarch64_output_sve_addvl_addpl)
24600 (aarch64_sve_inc_dec_immediate_p, aarch64_output_sve_inc_dec_immediate)
24601 (aarch64_add_offset_1_temporaries, aarch64_offset_temporaries): New
24603 (aarch64_add_offset): Add a temp2 parameter. Assert that temp1
24604 does not overlap dest if the function is frame-related. Handle
24606 (aarch64_split_add_offset): New function.
24607 (aarch64_add_sp, aarch64_sub_sp): Add temp2 parameters and pass
24608 them aarch64_add_offset.
24609 (aarch64_allocate_and_probe_stack_space): Add a temp2 parameter
24610 and update call to aarch64_sub_sp.
24611 (aarch64_add_cfa_expression): New function.
24612 (aarch64_expand_prologue): Pass extra temporary registers to the
24613 functions above. Handle the case in which we need to emit new
24614 DW_CFA_expressions for registers that were originally saved
24615 relative to the stack pointer, but now have to be expressed
24616 relative to the frame pointer.
24617 (aarch64_output_mi_thunk): Pass extra temporary registers to the
24619 (aarch64_expand_epilogue): Likewise. Prevent inheritance of
24620 IP0 and IP1 values for SVE frames.
24621 (aarch64_expand_vec_series): New function.
24622 (aarch64_expand_sve_widened_duplicate): Likewise.
24623 (aarch64_expand_sve_const_vector): Likewise.
24624 (aarch64_expand_mov_immediate): Add a gen_vec_duplicate parameter.
24625 Handle SVE constants. Use emit_move_insn to move a force_const_mem
24626 into the register, rather than emitting a SET directly.
24627 (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move)
24628 (aarch64_get_reg_raw_mode, offset_4bit_signed_scaled_p)
24629 (offset_6bit_unsigned_scaled_p, aarch64_offset_7bit_signed_scaled_p)
24630 (offset_9bit_signed_scaled_p): New functions.
24631 (aarch64_replicate_bitmask_imm): New function.
24632 (aarch64_bitmask_imm): Use it.
24633 (aarch64_cannot_force_const_mem): Reject expressions involving
24634 a CONST_POLY_INT. Update call to aarch64_classify_symbol.
24635 (aarch64_classify_index): Handle SVE indices, by requiring
24636 a plain register index with a scale that matches the element size.
24637 (aarch64_classify_address): Handle SVE addresses. Assert that
24638 the mode of the address is VOIDmode or an integer mode.
24639 Update call to aarch64_classify_symbol.
24640 (aarch64_classify_symbolic_expression): Update call to
24641 aarch64_classify_symbol.
24642 (aarch64_const_vec_all_in_range_p): New function.
24643 (aarch64_print_vector_float_operand): Likewise.
24644 (aarch64_print_operand): Handle 'N' and 'C'. Use "zN" rather than
24645 "vN" for FP registers with SVE modes. Handle (const ...) vectors
24646 and the FP immediates 1.0 and 0.5.
24647 (aarch64_print_address_internal): Handle SVE addresses.
24648 (aarch64_print_operand_address): Use ADDR_QUERY_ANY.
24649 (aarch64_regno_regclass): Handle predicate registers.
24650 (aarch64_secondary_reload): Handle big-endian reloads of SVE
24652 (aarch64_class_max_nregs): Handle SVE modes and predicate registers.
24653 (aarch64_rtx_costs): Check for ADDVL and ADDPL instructions.
24654 (aarch64_convert_sve_vector_bits): New function.
24655 (aarch64_override_options): Use it to handle -msve-vector-bits=.
24656 (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
24657 rather than an rtx.
24658 (aarch64_legitimate_constant_p): Use aarch64_classify_vector_mode.
24659 Handle SVE vector and predicate modes. Accept VL-based constants
24660 that need only one temporary register, and VL offsets that require
24661 no temporary registers.
24662 (aarch64_conditional_register_usage): Mark the predicate registers
24663 as fixed if SVE isn't available.
24664 (aarch64_vector_mode_supported_p): Use aarch64_classify_vector_mode.
24665 Return true for SVE vector and predicate modes.
24666 (aarch64_simd_container_mode): Take the number of bits as a poly_int64
24667 rather than an unsigned int. Handle SVE modes.
24668 (aarch64_preferred_simd_mode): Update call accordingly. Handle
24670 (aarch64_autovectorize_vector_sizes): Add BYTES_PER_SVE_VECTOR
24672 (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
24673 (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
24674 (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
24675 (aarch64_sve_float_mul_immediate_p): New functions.
24676 (aarch64_sve_valid_immediate): New function.
24677 (aarch64_simd_valid_immediate): Use it as the fallback for SVE vectors.
24678 Explicitly reject structure modes. Check for INDEX constants.
24679 Handle PTRUE and PFALSE constants.
24680 (aarch64_check_zero_based_sve_index_immediate): New function.
24681 (aarch64_simd_imm_zero_p): Delete.
24682 (aarch64_mov_operand_p): Use aarch64_simd_valid_immediate for
24683 vector modes. Accept constants in the range of CNT[BHWD].
24684 (aarch64_simd_scalar_immediate_valid_for_move): Explicitly
24685 ask for an Advanced SIMD mode.
24686 (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): New functions.
24687 (aarch64_simd_vector_alignment): Handle SVE predicates.
24688 (aarch64_vectorize_preferred_vector_alignment): New function.
24689 (aarch64_simd_vector_alignment_reachable): Use it instead of
24691 (aarch64_shift_truncation_mask): Use aarch64_vector_data_mode_p.
24692 (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): New
24694 (MAX_VECT_LEN): Delete.
24695 (expand_vec_perm_d): Add a vec_flags field.
24696 (emit_unspec2, aarch64_expand_sve_vec_perm): New functions.
24697 (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_zip)
24698 (aarch64_evpc_ext): Don't apply a big-endian lane correction
24700 (aarch64_evpc_rev): Rename to...
24701 (aarch64_evpc_rev_local): ...this. Use a predicated operation for SVE.
24702 (aarch64_evpc_rev_global): New function.
24703 (aarch64_evpc_dup): Enforce a 64-byte range for SVE DUP.
24704 (aarch64_evpc_tbl): Use MAX_COMPILE_TIME_VEC_BYTES instead of
24706 (aarch64_evpc_sve_tbl): New function.
24707 (aarch64_expand_vec_perm_const_1): Update after rename of
24708 aarch64_evpc_rev. Handle SVE permutes too, trying
24709 aarch64_evpc_rev_global and using aarch64_evpc_sve_tbl rather
24710 than aarch64_evpc_tbl.
24711 (aarch64_vectorize_vec_perm_const): Initialize vec_flags.
24712 (aarch64_sve_cmp_operand_p, aarch64_unspec_cond_code)
24713 (aarch64_gen_unspec_cond, aarch64_expand_sve_vec_cmp_int)
24714 (aarch64_emit_unspec_cond, aarch64_emit_unspec_cond_or)
24715 (aarch64_emit_inverted_unspec_cond, aarch64_expand_sve_vec_cmp_float)
24716 (aarch64_expand_sve_vcond): New functions.
24717 (aarch64_modes_tieable_p): Use aarch64_vector_data_mode_p instead
24718 of aarch64_vector_mode_p.
24719 (aarch64_dwarf_poly_indeterminate_value): New function.
24720 (aarch64_compute_pressure_classes): Likewise.
24721 (aarch64_can_change_mode_class): Likewise.
24722 (TARGET_GET_RAW_RESULT_MODE, TARGET_GET_RAW_ARG_MODE): Redefine.
24723 (TARGET_VECTORIZE_PREFERRED_VECTOR_ALIGNMENT): Likewise.
24724 (TARGET_VECTORIZE_GET_MASK_MODE): Likewise.
24725 (TARGET_DWARF_POLY_INDETERMINATE_VALUE): Likewise.
24726 (TARGET_COMPUTE_PRESSURE_CLASSES): Likewise.
24727 (TARGET_CAN_CHANGE_MODE_CLASS): Likewise.
24728 * config/aarch64/constraints.md (Upa, Upl, Uav, Uat, Usv, Usi, Utr)
24729 (Uty, Dm, vsa, vsc, vsd, vsi, vsn, vsl, vsm, vsA, vsM, vsN): New
24731 (Dn, Dl, Dr): Accept const as well as const_vector.
24732 (Dz): Likewise. Compare against CONST0_RTX.
24733 * config/aarch64/iterators.md: Refer to "Advanced SIMD" instead
24734 of "vector" where appropriate.
24735 (SVE_ALL, SVE_BH, SVE_BHS, SVE_BHSI, SVE_HSDI, SVE_HSF, SVE_SD)
24736 (SVE_SDI, SVE_I, SVE_F, PRED_ALL, PRED_BHS): New mode iterators.
24737 (UNSPEC_SEL, UNSPEC_ANDF, UNSPEC_IORF, UNSPEC_XORF, UNSPEC_COND_LT)
24738 (UNSPEC_COND_LE, UNSPEC_COND_EQ, UNSPEC_COND_NE, UNSPEC_COND_GE)
24739 (UNSPEC_COND_GT, UNSPEC_COND_LO, UNSPEC_COND_LS, UNSPEC_COND_HS)
24740 (UNSPEC_COND_HI, UNSPEC_COND_UO): New unspecs.
24741 (Vetype, VEL, Vel, VWIDE, Vwide, vw, vwcore, V_INT_EQUIV)
24742 (v_int_equiv): Extend to SVE modes.
24743 (Vesize, V128, v128, Vewtype, V_FP_EQUIV, v_fp_equiv, VPRED): New
24745 (LOGICAL_OR, SVE_INT_UNARY, SVE_FP_UNARY): New code iterators.
24746 (optab): Handle popcount, smin, smax, umin, umax, abs and sqrt.
24747 (logical_nn, lr, sve_int_op, sve_fp_op): New code attributs.
24748 (LOGICALF, OPTAB_PERMUTE, UNPACK, UNPACK_UNSIGNED, SVE_COND_INT_CMP)
24749 (SVE_COND_FP_CMP): New int iterators.
24750 (perm_hilo): Handle the new unpack unspecs.
24751 (optab, logicalf_op, su, perm_optab, cmp_op, imm_con): New int
24753 * config/aarch64/predicates.md (aarch64_sve_cnt_immediate)
24754 (aarch64_sve_addvl_addpl_immediate, aarch64_split_add_offset_immediate)
24755 (aarch64_pluslong_or_poly_operand, aarch64_nonmemory_operand)
24756 (aarch64_equality_operator, aarch64_constant_vector_operand)
24757 (aarch64_sve_ld1r_operand, aarch64_sve_ldr_operand): New predicates.
24758 (aarch64_sve_nonimmediate_operand): Likewise.
24759 (aarch64_sve_general_operand): Likewise.
24760 (aarch64_sve_dup_operand, aarch64_sve_arith_immediate): Likewise.
24761 (aarch64_sve_sub_arith_immediate, aarch64_sve_inc_dec_immediate)
24762 (aarch64_sve_logical_immediate, aarch64_sve_mul_immediate): Likewise.
24763 (aarch64_sve_dup_immediate, aarch64_sve_cmp_vsc_immediate): Likewise.
24764 (aarch64_sve_cmp_vsd_immediate, aarch64_sve_index_immediate): Likewise.
24765 (aarch64_sve_float_arith_immediate): Likewise.
24766 (aarch64_sve_float_arith_with_sub_immediate): Likewise.
24767 (aarch64_sve_float_mul_immediate, aarch64_sve_arith_operand): Likewise.
24768 (aarch64_sve_add_operand, aarch64_sve_logical_operand): Likewise.
24769 (aarch64_sve_lshift_operand, aarch64_sve_rshift_operand): Likewise.
24770 (aarch64_sve_mul_operand, aarch64_sve_cmp_vsc_operand): Likewise.
24771 (aarch64_sve_cmp_vsd_operand, aarch64_sve_index_operand): Likewise.
24772 (aarch64_sve_float_arith_operand): Likewise.
24773 (aarch64_sve_float_arith_with_sub_operand): Likewise.
24774 (aarch64_sve_float_mul_operand): Likewise.
24775 (aarch64_sve_vec_perm_operand): Likewise.
24776 (aarch64_pluslong_operand): Include aarch64_sve_addvl_addpl_immediate.
24777 (aarch64_mov_operand): Accept const_poly_int and const_vector.
24778 (aarch64_simd_lshift_imm, aarch64_simd_rshift_imm): Accept const
24779 as well as const_vector.
24780 (aarch64_simd_imm_zero, aarch64_simd_imm_minus_one): Move earlier
24781 in file. Use CONST0_RTX and CONSTM1_RTX.
24782 (aarch64_simd_or_scalar_imm_zero): Likewise. Add match_codes.
24783 (aarch64_simd_reg_or_zero): Accept const as well as const_vector.
24784 Use aarch64_simd_imm_zero.
24785 * config/aarch64/aarch64-sve.md: New file.
24786 * config/aarch64/aarch64.md: Include it.
24787 (VG_REGNUM, P0_REGNUM, P7_REGNUM, P15_REGNUM): New register numbers.
24788 (UNSPEC_REV, UNSPEC_LD1_SVE, UNSPEC_ST1_SVE, UNSPEC_MERGE_PTRUE)
24789 (UNSPEC_PTEST_PTRUE, UNSPEC_UNPACKSHI, UNSPEC_UNPACKUHI)
24790 (UNSPEC_UNPACKSLO, UNSPEC_UNPACKULO, UNSPEC_PACK)
24791 (UNSPEC_FLOAT_CONVERT, UNSPEC_WHILE_LO): New unspec constants.
24792 (sve): New attribute.
24793 (enabled): Disable instructions with the sve attribute unless
24795 (movqi, movhi): Pass CONST_POLY_INT operaneds through
24796 aarch64_expand_mov_immediate.
24797 (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64): Handle
24798 CNT[BHSD] immediates.
24799 (movti): Split CONST_POLY_INT moves into two halves.
24800 (add<mode>3): Accept aarch64_pluslong_or_poly_operand.
24801 Split additions that need a temporary here if the destination
24802 is the stack pointer.
24803 (*add<mode>3_aarch64): Handle ADDVL and ADDPL immediates.
24804 (*add<mode>3_poly_1): New instruction.
24805 (set_clobber_cc): New expander.
24807 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
24809 * simplify-rtx.c (simplify_immed_subreg): Add an inner_bytes
24810 parameter and use it instead of GET_MODE_SIZE (innermode). Use
24811 inner_bytes * BITS_PER_UNIT instead of GET_MODE_BITSIZE (innermode).
24812 Use CEIL (inner_bytes, GET_MODE_UNIT_SIZE (innermode)) instead of
24813 GET_MODE_NUNITS (innermode). Also add a first_elem parameter.
24814 Change innermode from fixed_mode_size to machine_mode.
24815 (simplify_subreg): Update call accordingly. Handle a constant-sized
24816 subreg of a variable-length CONST_VECTOR.
24818 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
24819 Alan Hayward <alan.hayward@arm.com>
24820 David Sherwood <david.sherwood@arm.com>
24822 * tree-ssa-address.c (mem_ref_valid_without_offset_p): New function.
24823 (add_offset_to_base): New function, split out from...
24824 (create_mem_ref): ...here. When handling a scale other than 1,
24825 check first whether the address is valid without the offset.
24826 Add it into the base if so, leaving the index and scale as-is.
24828 2018-01-12 Jakub Jelinek <jakub@redhat.com>
24831 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Call
24832 fold_for_warn before checking if arg2 is INTEGER_CST.
24834 2018-01-12 Segher Boessenkool <segher@kernel.crashing.org>
24836 * config/rs6000/predicates.md (load_multiple_operation): Delete.
24837 (store_multiple_operation): Delete.
24838 * config/rs6000/rs6000-cpus.def (601): Remove MASK_STRING.
24839 * config/rs6000/rs6000-protos.h (rs6000_output_load_multiple): Delete.
24840 * config/rs6000/rs6000-string.c (expand_block_move): Delete everything
24841 guarded by TARGET_STRING.
24842 (rs6000_output_load_multiple): Delete.
24843 * config/rs6000/rs6000.c (rs6000_option_override_internal): Delete
24844 OPTION_MASK_STRING / TARGET_STRING handling.
24845 (print_operand) <'N', 'O'>: Add comment that these are unused now.
24846 (const rs6000_opt_masks) <"string">: Change mask to 0.
24847 * config/rs6000/rs6000.h (TARGET_DEFAULT): Remove MASK_STRING.
24848 (MASK_STRING): Delete.
24849 * config/rs6000/rs6000.md (*mov<mode>_string): Delete TARGET_STRING
24851 (load_multiple): Delete.
24858 (store_multiple): Delete.
24865 (movmemsi_8reg): Delete.
24866 (corresponding unnamed define_insn): Delete.
24867 (movmemsi_6reg): Delete.
24868 (corresponding unnamed define_insn): Delete.
24869 (movmemsi_4reg): Delete.
24870 (corresponding unnamed define_insn): Delete.
24871 (movmemsi_2reg): Delete.
24872 (corresponding unnamed define_insn): Delete.
24873 (movmemsi_1reg): Delete.
24874 (corresponding unnamed define_insn): Delete.
24875 * config/rs6000/rs6000.opt (mno-string): New.
24876 (mstring): Replace by deprecation warning stub.
24877 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mstring.
24879 2018-01-12 Jakub Jelinek <jakub@redhat.com>
24881 * regrename.c (regrename_do_replace): If replacing the same
24882 reg multiple times, try to reuse last created gen_raw_REG.
24885 * bb-reorder.c (pass_partition_blocks::gate): In lto don't partition
24886 main to workaround a bug in GDB.
24888 2018-01-12 Tom de Vries <tom@codesourcery.com>
24891 * config.gcc (nvptx*-*-*): Set use_gcc_stdint=wrap.
24893 2018-01-12 Vladimir Makarov <vmakarov@redhat.com>
24895 PR rtl-optimization/80481
24896 * ira-color.c (get_cap_member): New function.
24897 (allocnos_conflict_by_live_ranges_p): Use it.
24898 (slot_coalesced_allocno_live_ranges_intersect_p): Add assert.
24899 (setup_slot_coalesced_allocno_live_ranges): Ditto.
24901 2018-01-12 Uros Bizjak <ubizjak@gmail.com>
24904 * config/alpha/alpha.md (*saddsi_1): New insn_ans_split pattern.
24905 (*saddl_se_1): Ditto.
24906 (*ssubsi_1): Ditto.
24907 (*ssubl_se_1): Ditto.
24909 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
24911 * tree-predcom.c (aff_combination_dr_offset): Use wi::to_poly_widest
24912 rather than wi::to_widest for DR_INITs.
24913 * tree-vect-data-refs.c (vect_find_same_alignment_drs): Use
24914 wi::to_poly_offset rather than wi::to_offset for DR_INIT.
24915 (vect_analyze_data_ref_accesses): Require both DR_INITs to be
24917 (vect_analyze_group_access_1): Note that here.
24919 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
24921 * tree-vectorizer.c (get_vec_alignment_for_array_type): Handle
24922 polynomial type sizes.
24924 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
24926 * gimplify.c (gimple_add_tmp_var_fn): Allow variables to have a
24927 poly_uint64 size, rather than requiring an unsigned HOST_WIDE_INT size.
24928 (gimple_add_tmp_var): Likewise.
24930 2018-01-12 Martin Liska <mliska@suse.cz>
24932 * gimple.c (gimple_alloc_counts): Use uint64_t instead of int.
24933 (gimple_alloc_sizes): Likewise.
24934 (dump_gimple_statistics): Use PRIu64 in printf format.
24935 * gimple.h: Change uint64_t to int.
24937 2018-01-12 Martin Liska <mliska@suse.cz>
24939 * tree-core.h: Use uint64_t instead of int.
24940 * tree.c (tree_node_counts): Likewise.
24941 (tree_node_sizes): Likewise.
24942 (dump_tree_statistics): Use PRIu64 in printf format.
24944 2018-01-12 Martin Liska <mliska@suse.cz>
24946 * Makefile.in: As qsort_chk is implemented in vec.c, add
24947 vec.o to linkage of gencfn-macros.
24948 * tree.c (build_new_poly_int_cst): Add CXX_MEM_STAT_INFO as it's
24949 passing the info to record_node_allocation_statistics.
24950 (test_vector_cst_patterns): Add CXX_MEM_STAT_INFO to declaration
24952 * ggc-common.c (struct ggc_usage): Add operator== and use
24953 it in operator< and compare function.
24954 * mem-stats.h (struct mem_usage): Likewise.
24955 * vec.c (struct vec_usage): Remove operator< and compare
24956 function. Can be simply inherited.
24958 2018-01-12 Martin Jambor <mjambor@suse.cz>
24961 * params.def: New parameter PARAM_AVOID_FMA_MAX_BITS.
24962 * tree-ssa-math-opts.c: Include domwalk.h.
24963 (convert_mult_to_fma_1): New function.
24964 (fma_transformation_info): New type.
24965 (fma_deferring_state): Likewise.
24966 (cancel_fma_deferring): New function.
24967 (result_of_phi): Likewise.
24968 (last_fma_candidate_feeds_initial_phi): Likewise.
24969 (convert_mult_to_fma): Added deferring logic, split actual
24970 transformation to convert_mult_to_fma_1.
24971 (math_opts_dom_walker): New type.
24972 (math_opts_dom_walker::after_dom_children): New method, body moved
24973 here from pass_optimize_widening_mul::execute, added deferring logic
24975 (pass_optimize_widening_mul::execute): Moved most of code to
24976 math_opts_dom_walker::after_dom_children.
24977 * config/i386/x86-tune.def (X86_TUNE_AVOID_128FMA_CHAINS): New.
24978 * config/i386/i386.c (ix86_option_override_internal): Added
24979 maybe_setting of PARAM_AVOID_FMA_MAX_BITS.
24981 2018-01-12 Richard Biener <rguenther@suse.de>
24984 * dwarf2out.c (gen_variable_die): Do not reset old_die for
24985 inline instance vars.
24987 2018-01-12 Oleg Endo <olegendo@gcc.gnu.org>
24990 * config/rx/rx.c (rx_is_restricted_memory_address):
24991 Handle SUBREG case.
24993 2018-01-12 Richard Biener <rguenther@suse.de>
24995 PR tree-optimization/80846
24996 * target.def (split_reduction): New target hook.
24997 * targhooks.c (default_split_reduction): New function.
24998 * targhooks.h (default_split_reduction): Declare.
24999 * tree-vect-loop.c (vect_create_epilog_for_reduction): If the
25000 target requests first reduce vectors by combining low and high
25002 * tree-vect-stmts.c (vect_gen_perm_mask_any): Adjust.
25003 (get_vectype_for_scalar_type_and_size): Export.
25004 * tree-vectorizer.h (get_vectype_for_scalar_type_and_size): Declare.
25005 * doc/tm.texi.in (TARGET_VECTORIZE_SPLIT_REDUCTION): Document.
25006 * doc/tm.texi: Regenerate.
25007 * config/i386/i386.c (ix86_split_reduction): Implement
25008 TARGET_VECTORIZE_SPLIT_REDUCTION.
25010 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
25013 * config/sparc/sparc.h (PIC_OFFSET_TABLE_REGNUM): Set to INVALID_REGNUM
25014 in PIC mode except for TARGET_VXWORKS_RTP.
25015 * config/sparc/sparc.c: Include cfgrtl.h.
25016 (TARGET_INIT_PIC_REG): Define.
25017 (TARGET_USE_PSEUDO_PIC_REG): Likewise.
25018 (sparc_pic_register_p): New predicate.
25019 (sparc_legitimate_address_p): Use it.
25020 (sparc_legitimize_pic_address): Likewise.
25021 (sparc_delegitimize_address): Likewise.
25022 (sparc_mode_dependent_address_p): Likewise.
25023 (gen_load_pcrel_sym): Remove 4th parameter.
25024 (load_got_register): Adjust call to above. Remove obsolete stuff.
25025 (sparc_expand_prologue): Do not call load_got_register here.
25026 (sparc_flat_expand_prologue): Likewise.
25027 (sparc_output_mi_thunk): Set the pic_offset_table_rtx object.
25028 (sparc_use_pseudo_pic_reg): New function.
25029 (sparc_init_pic_reg): Likewise.
25030 * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
25031 (builtin_setjmp_receiver): Enable only for TARGET_VXWORKS_RTP.
25033 2018-01-12 Christophe Lyon <christophe.lyon@linaro.org>
25035 * doc/sourcebuild.texi (Effective-Target Keywords, Other attributes):
25036 Add item for branch_cost.
25038 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
25040 PR rtl-optimization/83565
25041 * rtlanal.c (nonzero_bits1): On WORD_REGISTER_OPERATIONS machines, do
25042 not extend the result to a larger mode for rotate operations.
25043 (num_sign_bit_copies1): Likewise.
25045 2018-01-12 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
25048 * config/sol2.h (STARTFILE_ARCH_SPEC): Don't use with -shared or
25050 Use values-Xc.o for -pedantic.
25051 Link with values-xpg4.o for C90, values-xpg6.o otherwise.
25053 2018-01-12 Martin Liska <mliska@suse.cz>
25056 * ipa-devirt.c (final_warning_record::grow_type_warnings):
25058 (possible_polymorphic_call_targets): Use it.
25059 (ipa_devirt): Likewise.
25061 2018-01-12 Martin Liska <mliska@suse.cz>
25063 * profile-count.h (enum profile_quality): Use 0 as invalid
25064 enum value of profile_quality.
25066 2018-01-12 Chung-Ju Wu <jasonwucj@gmail.com>
25068 * doc/invoke.texi (NDS32 Options): Add -mext-perf, -mext-perf2 and
25069 -mext-string options.
25071 2018-01-12 Richard Biener <rguenther@suse.de>
25073 * lto-streamer-out.c (DFS::DFS_write_tree_body): Process
25074 DECL_DEBUG_EXPR conditional on DECL_HAS_DEBUG_EXPR_P.
25075 * tree-streamer-in.c (lto_input_ts_decl_common_tree_pointers):
25077 * tree-streamer-out.c (write_ts_decl_common_tree_pointers): Likewise.
25079 2018-01-11 Michael Meissner <meissner@linux.vnet.ibm.com>
25081 * configure.ac (--with-long-double-format): Add support for the
25082 configuration option to change the default long double format on
25084 * config.gcc (powerpc*-linux*-*): Likewise.
25085 * configure: Regenerate.
25086 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): If long
25087 double is IEEE, define __KC__ and __KF__ to allow floatn.h to be
25088 used without modification.
25090 2018-01-11 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
25092 * config/rs6000/rs6000-builtin.def (BU_P7_MISC_X): New #define.
25093 (SPEC_BARRIER): New instantiation of BU_P7_MISC_X.
25094 * config/rs6000/rs6000.c (rs6000_expand_builtin): Handle
25095 MISC_BUILTIN_SPEC_BARRIER.
25096 (rs6000_init_builtins): Likewise.
25097 * config/rs6000/rs6000.md (UNSPECV_SPEC_BARRIER): New UNSPECV
25099 (speculation_barrier): New define_insn.
25100 * doc/extend.texi: Document __builtin_speculation_barrier.
25102 2018-01-11 Jakub Jelinek <jakub@redhat.com>
25105 * config/i386/i386.c (ix86_expand_vector_init_one_nonzero): If one_var
25106 is 0, for V{8,16}S[IF] and V[48]D[IF]mode use gen_vec_set<mode>_0.
25107 * config/i386/sse.md (VI8_AVX_AVX512F, VI4F_256_512): New mode
25109 (ssescalarmodesuffix): Add 512-bit vectors. Use "d" or "q" for
25110 integral modes instead of "ss" and "sd".
25111 (vec_set<mode>_0): New define_insns for 256-bit and 512-bit
25112 vectors with 32-bit and 64-bit elements.
25113 (vecdupssescalarmodesuffix): New mode attribute.
25114 (vec_dup<mode>): Use it.
25116 2018-01-11 H.J. Lu <hongjiu.lu@intel.com>
25119 * config/i386/i386.c (ix86_compute_frame_layout): Align stack
25120 frame if argument is passed on stack.
25122 2018-01-11 Jakub Jelinek <jakub@redhat.com>
25125 * ree.c (combine_reaching_defs): Optimize also
25126 reg2=exp; reg1=reg2; reg2=any_extend(reg1); into
25127 reg2=any_extend(exp); reg1=reg2;, formatting fix.
25129 2018-01-11 Jan Hubicka <hubicka@ucw.cz>
25131 PR middle-end/83189
25132 * gimple-ssa-isolate-paths.c (isolate_path): Fix profile update.
25134 2018-01-11 Jan Hubicka <hubicka@ucw.cz>
25136 PR middle-end/83718
25137 * tree-inline.c (copy_cfg_body): Adjust num&den for scaling
25138 after they are computed.
25140 2018-01-11 Bin Cheng <bin.cheng@arm.com>
25142 PR tree-optimization/83695
25143 * gimple-loop-linterchange.cc
25144 (tree_loop_interchange::interchange_loops): Call scev_reset_htab to
25145 reset cached scev information after interchange.
25146 (pass_linterchange::execute): Remove call to scev_reset_htab.
25148 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
25150 * config/arm/arm_neon.h (vfmlal_lane_low_u32, vfmlal_lane_high_u32,
25151 vfmlalq_laneq_low_u32, vfmlalq_lane_low_u32, vfmlal_laneq_low_u32,
25152 vfmlalq_laneq_high_u32, vfmlalq_lane_high_u32, vfmlal_laneq_high_u32,
25153 vfmlsl_lane_low_u32, vfmlsl_lane_high_u32, vfmlslq_laneq_low_u32,
25154 vfmlslq_lane_low_u32, vfmlsl_laneq_low_u32, vfmlslq_laneq_high_u32,
25155 vfmlslq_lane_high_u32, vfmlsl_laneq_high_u32): Define.
25156 * config/arm/arm_neon_builtins.def (vfmal_lane_low,
25157 vfmal_lane_lowv4hf, vfmal_lane_lowv8hf, vfmal_lane_high,
25158 vfmal_lane_highv4hf, vfmal_lane_highv8hf, vfmsl_lane_low,
25159 vfmsl_lane_lowv4hf, vfmsl_lane_lowv8hf, vfmsl_lane_high,
25160 vfmsl_lane_highv4hf, vfmsl_lane_highv8hf): New sets of builtins.
25161 * config/arm/iterators.md (VFMLSEL2, vfmlsel2): New mode attributes.
25162 (V_lane_reg): Likewise.
25163 * config/arm/neon.md (neon_vfm<vfml_op>l_lane_<vfml_half><VCVTF:mode>):
25165 (neon_vfm<vfml_op>l_lane_<vfml_half><vfmlsel2><mode>): Likewise.
25166 (vfmal_lane_low<mode>_intrinsic,
25167 vfmal_lane_low<vfmlsel2><mode>_intrinsic,
25168 vfmal_lane_high<vfmlsel2><mode>_intrinsic,
25169 vfmal_lane_high<mode>_intrinsic, vfmsl_lane_low<mode>_intrinsic,
25170 vfmsl_lane_low<vfmlsel2><mode>_intrinsic,
25171 vfmsl_lane_high<vfmlsel2><mode>_intrinsic,
25172 vfmsl_lane_high<mode>_intrinsic): New define_insns.
25174 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
25176 * config/arm/arm-cpus.in (fp16fml): New feature.
25177 (ALL_SIMD): Add fp16fml.
25178 (armv8.2-a): Add fp16fml as an option.
25179 (armv8.3-a): Likewise.
25180 (armv8.4-a): Add fp16fml as part of fp16.
25181 * config/arm/arm.h (TARGET_FP16FML): Define.
25182 * config/arm/arm-c.c (arm_cpu_builtins): Define __ARM_FEATURE_FP16_FML
25184 * config/arm/arm-modes.def (V2HF): Define.
25185 * config/arm/arm_neon.h (vfmlal_low_u32, vfmlsl_low_u32,
25186 vfmlal_high_u32, vfmlsl_high_u32, vfmlalq_low_u32,
25187 vfmlslq_low_u32, vfmlalq_high_u32, vfmlslq_high_u32): Define.
25188 * config/arm/arm_neon_builtins.def (vfmal_low, vfmal_high,
25189 vfmsl_low, vfmsl_high): New set of builtins.
25190 * config/arm/iterators.md (PLUSMINUS): New code iterator.
25191 (vfml_op): New code attribute.
25192 (VFMLHALVES): New int iterator.
25193 (VFML, VFMLSEL): New mode attributes.
25194 (V_reg): Define mapping for V2HF.
25195 (V_hi, V_lo): New mode attributes.
25196 (VF_constraint): Likewise.
25197 (vfml_half, vfml_half_selector): New int attributes.
25198 * config/arm/neon.md (neon_vfm<vfml_op>l_<vfml_half><mode>): New
25200 (vfmal_low<mode>_intrinsic, vfmsl_high<mode>_intrinsic,
25201 vfmal_high<mode>_intrinsic, vfmsl_low<mode>_intrinsic):
25203 * config/arm/t-arm-elf (v8_fps): Add fp16fml.
25204 * config/arm/t-multilib (v8_2_a_simd_variants): Add fp16fml.
25205 * config/arm/unspecs.md (UNSPEC_VFML_LO, UNSPEC_VFML_HI): New unspecs.
25206 * doc/invoke.texi (ARM Options): Document fp16fml. Update armv8.4-a
25208 * doc/sourcebuild.texi (arm_fp16fml_neon_ok, arm_fp16fml_neon):
25209 Document new effective target and option set.
25211 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
25213 * config/arm/arm-cpus.in (armv8_4): New feature.
25214 (ARMv8_4a): New fgroup.
25215 (armv8.4-a): New arch.
25216 * config/arm/arm-tables.opt: Regenerate.
25217 * config/arm/t-aprofile: Add matching rules for -march=armv8.4-a.
25218 * config/arm/t-arm-elf (all_v8_archs): Add armv8.4-a.
25219 * config/arm/t-multilib (v8_4_a_simd_variants): New variable.
25220 Add matching rules for -march=armv8.4-a and extensions.
25221 * doc/invoke.texi (ARM Options): Document -march=armv8.4-a.
25223 2018-01-11 Oleg Endo <olegendo@gcc.gnu.org>
25226 * config/rx/rx.md (BW): New mode attribute.
25227 (sync_lock_test_and_setsi): Add mode suffix to insn output.
25229 2018-01-11 Richard Biener <rguenther@suse.de>
25231 PR tree-optimization/83435
25232 * graphite.c (canonicalize_loop_form): Ignore fake loop exit edges.
25233 * graphite-scop-detection.c (scop_detection::get_sese): Likewise.
25234 * tree-vrp.c (add_assert_info): Drop TREE_OVERFLOW if they appear.
25236 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
25237 Alan Hayward <alan.hayward@arm.com>
25238 David Sherwood <david.sherwood@arm.com>
25240 * config/aarch64/aarch64.c (aarch64_address_info): Add a const_offset
25242 (aarch64_classify_address): Initialize it. Track polynomial offsets.
25243 (aarch64_print_address_internal): Use it to check for a zero offset.
25245 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
25246 Alan Hayward <alan.hayward@arm.com>
25247 David Sherwood <david.sherwood@arm.com>
25249 * config/aarch64/aarch64-modes.def (NUM_POLY_INT_COEFFS): Set to 2.
25250 * config/aarch64/aarch64-protos.h (aarch64_initial_elimination_offset):
25251 Return a poly_int64 rather than a HOST_WIDE_INT.
25252 (aarch64_offset_7bit_signed_scaled_p): Take the offset as a poly_int64
25253 rather than a HOST_WIDE_INT.
25254 * config/aarch64/aarch64.h (aarch64_frame): Protect with
25255 HAVE_POLY_INT_H rather than HOST_WIDE_INT. Change locals_offset,
25256 hard_fp_offset, frame_size, initial_adjust, callee_offset and
25257 final_offset from HOST_WIDE_INT to poly_int64.
25258 * config/aarch64/aarch64-builtins.c (aarch64_simd_expand_args): Use
25259 to_constant when getting the number of units in an Advanced SIMD
25261 (aarch64_builtin_vectorized_function): Check for a constant number
25263 * config/aarch64/aarch64-simd.md (mov<mode>): Handle polynomial
25265 (aarch64_ld<VSTRUCT:nregs>_lane<VALLDIF:mode>): Use the nunits
25266 attribute instead of GET_MODE_NUNITS.
25267 * config/aarch64/aarch64.c (aarch64_hard_regno_nregs)
25268 (aarch64_class_max_nregs): Use the constant_lowest_bound of the
25269 GET_MODE_SIZE for fixed-size registers.
25270 (aarch64_const_vec_all_same_in_range_p): Use const_vec_duplicate_p.
25271 (aarch64_hard_regno_call_part_clobbered, aarch64_classify_index)
25272 (aarch64_mode_valid_for_sched_fusion_p, aarch64_classify_address)
25273 (aarch64_legitimize_address_displacement, aarch64_secondary_reload)
25274 (aarch64_print_operand, aarch64_print_address_internal)
25275 (aarch64_address_cost, aarch64_rtx_costs, aarch64_register_move_cost)
25276 (aarch64_short_vector_p, aapcs_vfp_sub_candidate)
25277 (aarch64_simd_attr_length_rglist, aarch64_operands_ok_for_ldpstp):
25278 Handle polynomial GET_MODE_SIZE.
25279 (aarch64_hard_regno_caller_save_mode): Likewise. Return modes
25280 wider than SImode without modification.
25281 (tls_symbolic_operand_type): Use strip_offset instead of split_const.
25282 (aarch64_pass_by_reference, aarch64_layout_arg, aarch64_pad_reg_upward)
25283 (aarch64_gimplify_va_arg_expr): Assert that we don't yet handle
25284 passing and returning SVE modes.
25285 (aarch64_function_value, aarch64_layout_arg): Use gen_int_mode
25286 rather than GEN_INT.
25287 (aarch64_emit_probe_stack_range): Take the size as a poly_int64
25288 rather than a HOST_WIDE_INT, but call sorry if it isn't constant.
25289 (aarch64_allocate_and_probe_stack_space): Likewise.
25290 (aarch64_layout_frame): Cope with polynomial offsets.
25291 (aarch64_save_callee_saves, aarch64_restore_callee_saves): Take the
25292 start_offset as a poly_int64 rather than a HOST_WIDE_INT. Track
25293 polynomial offsets.
25294 (offset_9bit_signed_unscaled_p, offset_12bit_unsigned_scaled_p)
25295 (aarch64_offset_7bit_signed_scaled_p): Take the offset as a
25296 poly_int64 rather than a HOST_WIDE_INT.
25297 (aarch64_get_separate_components, aarch64_process_components)
25298 (aarch64_expand_prologue, aarch64_expand_epilogue)
25299 (aarch64_use_return_insn_p): Handle polynomial frame offsets.
25300 (aarch64_anchor_offset): New function, split out from...
25301 (aarch64_legitimize_address): ...here.
25302 (aarch64_builtin_vectorization_cost): Handle polynomial
25303 TYPE_VECTOR_SUBPARTS.
25304 (aarch64_simd_check_vect_par_cnst_half): Handle polynomial
25306 (aarch64_simd_make_constant, aarch64_expand_vector_init): Get the
25307 number of elements from the PARALLEL rather than the mode.
25308 (aarch64_shift_truncation_mask): Use GET_MODE_UNIT_BITSIZE
25309 rather than GET_MODE_BITSIZE.
25310 (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_ext)
25311 (aarch64_evpc_rev, aarch64_evpc_dup, aarch64_evpc_zip)
25312 (aarch64_expand_vec_perm_const_1): Handle polynomial
25313 d->perm.length () and d->perm elements.
25314 (aarch64_evpc_tbl): Likewise. Use nelt rather than GET_MODE_NUNITS.
25315 Apply to_constant to d->perm elements.
25316 (aarch64_simd_valid_immediate, aarch64_vec_fpconst_pow_of_2): Handle
25317 polynomial CONST_VECTOR_NUNITS.
25318 (aarch64_move_pointer): Take amount as a poly_int64 rather
25320 (aarch64_progress_pointer): Avoid temporary variable.
25321 * config/aarch64/aarch64.md (aarch64_<crc_variant>): Use
25322 the mode attribute instead of GET_MODE.
25324 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
25325 Alan Hayward <alan.hayward@arm.com>
25326 David Sherwood <david.sherwood@arm.com>
25328 * config/aarch64/aarch64.c (aarch64_force_temporary): Assert that
25329 x exists before using it.
25330 (aarch64_add_constant_internal): Rename to...
25331 (aarch64_add_offset_1): ...this. Replace regnum with separate
25332 src and dest rtxes. Handle the case in which they're different,
25333 including when the offset is zero. Replace scratchreg with an rtx.
25334 Use 2 additions if there is no spare register into which we can
25335 move a 16-bit constant.
25336 (aarch64_add_constant): Delete.
25337 (aarch64_add_offset): Replace reg with separate src and dest
25338 rtxes. Take a poly_int64 offset instead of a HOST_WIDE_INT.
25339 Use aarch64_add_offset_1.
25340 (aarch64_add_sp, aarch64_sub_sp): Take the scratch register as
25341 an rtx rather than an int. Take the delta as a poly_int64
25342 rather than a HOST_WIDE_INT. Use aarch64_add_offset.
25343 (aarch64_expand_mov_immediate): Update uses of aarch64_add_offset.
25344 (aarch64_expand_prologue): Update calls to aarch64_sub_sp,
25345 aarch64_allocate_and_probe_stack_space and aarch64_add_offset.
25346 (aarch64_expand_epilogue): Update calls to aarch64_add_offset
25347 and aarch64_add_sp.
25348 (aarch64_output_mi_thunk): Use aarch64_add_offset rather than
25349 aarch64_add_constant.
25351 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
25353 * config/aarch64/aarch64.c (aarch64_reinterpret_float_as_int):
25354 Use scalar_float_mode.
25356 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
25358 * config/aarch64/aarch64-simd.md
25359 (aarch64_fml<f16mac1>l<f16quad>_low<mode>): Avoid GET_MODE_NUNITS.
25360 (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Likewise.
25361 (aarch64_fml<f16mac1>l_lane_lowv2sf): Likewise.
25362 (aarch64_fml<f16mac1>l_lane_highv2sf): Likewise.
25363 (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Likewise.
25364 (aarch64_fml<f16mac1>lq_laneq_highv4sf): Likewise.
25365 (aarch64_fml<f16mac1>l_laneq_lowv2sf): Likewise.
25366 (aarch64_fml<f16mac1>l_laneq_highv2sf): Likewise.
25367 (aarch64_fml<f16mac1>lq_lane_lowv4sf): Likewise.
25368 (aarch64_fml<f16mac1>lq_lane_highv4sf): Likewise.
25370 2018-01-11 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
25373 * config/arm/arm.c (arm_declare_function_name): Set arch_to_print if
25374 targ_options->x_arm_arch_string is non NULL.
25376 2018-01-11 Tamar Christina <tamar.christina@arm.com>
25378 * config/aarch64/aarch64.h
25379 (AARCH64_FL_FOR_ARCH8_4): Add AARCH64_FL_DOTPROD.
25381 2018-01-11 Sudakshina Das <sudi.das@arm.com>
25384 * expmed.c (emit_store_flag_force): Swap if const op0
25385 and change VOIDmode to mode of op0.
25387 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
25389 PR rtl-optimization/83761
25390 * caller-save.c (replace_reg_with_saved_mem): Pass bits rather
25391 than bytes to mode_for_size.
25393 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
25395 PR middle-end/83189
25396 * gfortran.fortran-torture/compile/pr83189.f90: New testcase.
25397 * tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): Handle zero
25400 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
25402 PR middle-end/83575
25403 * cfgrtl.c (rtl_verify_edges): Only verify fixability of partition
25404 when in layout mode.
25405 (cfg_layout_finalize): Do not verify cfg before we are out of layout.
25406 * cfgcleanup.c (try_optimize_cfg): Only verify flow info when doing
25409 2018-01-10 Michael Collison <michael.collison@arm.com>
25411 * config/aarch64/aarch64-modes.def (V2HF): New VECTOR_MODE.
25412 * config/aarch64/aarch64-option-extension.def: Add
25413 AARCH64_OPT_EXTENSION of 'fp16fml'.
25414 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
25415 (__ARM_FEATURE_FP16_FML): Define if TARGET_F16FML is true.
25416 * config/aarch64/predicates.md (aarch64_lane_imm3): New predicate.
25417 * config/aarch64/constraints.md (Ui7): New constraint.
25418 * config/aarch64/iterators.md (VFMLA_W): New mode iterator.
25419 (VFMLA_SEL_W): Ditto.
25422 (VFMLA16_LOW): New int iterator.
25423 (VFMLA16_HIGH): Ditto.
25424 (UNSPEC_FMLAL): New unspec.
25425 (UNSPEC_FMLSL): Ditto.
25426 (UNSPEC_FMLAL2): Ditto.
25427 (UNSPEC_FMLSL2): Ditto.
25428 (f16mac): New code attribute.
25429 * config/aarch64/aarch64-simd-builtins.def
25430 (aarch64_fmlal_lowv2sf): Ditto.
25431 (aarch64_fmlsl_lowv2sf): Ditto.
25432 (aarch64_fmlalq_lowv4sf): Ditto.
25433 (aarch64_fmlslq_lowv4sf): Ditto.
25434 (aarch64_fmlal_highv2sf): Ditto.
25435 (aarch64_fmlsl_highv2sf): Ditto.
25436 (aarch64_fmlalq_highv4sf): Ditto.
25437 (aarch64_fmlslq_highv4sf): Ditto.
25438 (aarch64_fmlal_lane_lowv2sf): Ditto.
25439 (aarch64_fmlsl_lane_lowv2sf): Ditto.
25440 (aarch64_fmlal_laneq_lowv2sf): Ditto.
25441 (aarch64_fmlsl_laneq_lowv2sf): Ditto.
25442 (aarch64_fmlalq_lane_lowv4sf): Ditto.
25443 (aarch64_fmlsl_lane_lowv4sf): Ditto.
25444 (aarch64_fmlalq_laneq_lowv4sf): Ditto.
25445 (aarch64_fmlsl_laneq_lowv4sf): Ditto.
25446 (aarch64_fmlal_lane_highv2sf): Ditto.
25447 (aarch64_fmlsl_lane_highv2sf): Ditto.
25448 (aarch64_fmlal_laneq_highv2sf): Ditto.
25449 (aarch64_fmlsl_laneq_highv2sf): Ditto.
25450 (aarch64_fmlalq_lane_highv4sf): Ditto.
25451 (aarch64_fmlsl_lane_highv4sf): Ditto.
25452 (aarch64_fmlalq_laneq_highv4sf): Ditto.
25453 (aarch64_fmlsl_laneq_highv4sf): Ditto.
25454 * config/aarch64/aarch64-simd.md:
25455 (aarch64_fml<f16mac1>l<f16quad>_low<mode>): New pattern.
25456 (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
25457 (aarch64_simd_fml<f16mac1>l<f16quad>_low<mode>): Ditto.
25458 (aarch64_simd_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
25459 (aarch64_fml<f16mac1>l_lane_lowv2sf): Ditto.
25460 (aarch64_fml<f16mac1>l_lane_highv2sf): Ditto.
25461 (aarch64_simd_fml<f16mac>l_lane_lowv2sf): Ditto.
25462 (aarch64_simd_fml<f16mac>l_lane_highv2sf): Ditto.
25463 (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Ditto.
25464 (aarch64_fml<f16mac1>lq_laneq_highv4sf): Ditto.
25465 (aarch64_simd_fml<f16mac>lq_laneq_lowv4sf): Ditto.
25466 (aarch64_simd_fml<f16mac>lq_laneq_highv4sf): Ditto.
25467 (aarch64_fml<f16mac1>l_laneq_lowv2sf): Ditto.
25468 (aarch64_fml<f16mac1>l_laneq_highv2sf): Ditto.
25469 (aarch64_simd_fml<f16mac>l_laneq_lowv2sf): Ditto.
25470 (aarch64_simd_fml<f16mac>l_laneq_highv2sf): Ditto.
25471 (aarch64_fml<f16mac1>lq_lane_lowv4sf): Ditto.
25472 (aarch64_fml<f16mac1>lq_lane_highv4sf): Ditto.
25473 (aarch64_simd_fml<f16mac>lq_lane_lowv4sf): Ditto.
25474 (aarch64_simd_fml<f16mac>lq_lane_highv4sf): Ditto.
25475 * config/aarch64/arm_neon.h (vfmlal_low_u32): New intrinsic.
25476 (vfmlsl_low_u32): Ditto.
25477 (vfmlalq_low_u32): Ditto.
25478 (vfmlslq_low_u32): Ditto.
25479 (vfmlal_high_u32): Ditto.
25480 (vfmlsl_high_u32): Ditto.
25481 (vfmlalq_high_u32): Ditto.
25482 (vfmlslq_high_u32): Ditto.
25483 (vfmlal_lane_low_u32): Ditto.
25484 (vfmlsl_lane_low_u32): Ditto.
25485 (vfmlal_laneq_low_u32): Ditto.
25486 (vfmlsl_laneq_low_u32): Ditto.
25487 (vfmlalq_lane_low_u32): Ditto.
25488 (vfmlslq_lane_low_u32): Ditto.
25489 (vfmlalq_laneq_low_u32): Ditto.
25490 (vfmlslq_laneq_low_u32): Ditto.
25491 (vfmlal_lane_high_u32): Ditto.
25492 (vfmlsl_lane_high_u32): Ditto.
25493 (vfmlal_laneq_high_u32): Ditto.
25494 (vfmlsl_laneq_high_u32): Ditto.
25495 (vfmlalq_lane_high_u32): Ditto.
25496 (vfmlslq_lane_high_u32): Ditto.
25497 (vfmlalq_laneq_high_u32): Ditto.
25498 (vfmlslq_laneq_high_u32): Ditto.
25499 * config/aarch64/aarch64.h (AARCH64_FL_F16SML): New flag.
25500 (AARCH64_FL_FOR_ARCH8_4): New.
25501 (AARCH64_ISA_F16FML): New ISA flag.
25502 (TARGET_F16FML): New feature flag for fp16fml.
25503 (doc/invoke.texi): Document new fp16fml option.
25505 2018-01-10 Michael Collison <michael.collison@arm.com>
25507 * config/aarch64/aarch64-builtins.c:
25508 (aarch64_types_ternopu_imm_qualifiers, TYPES_TERNOPUI): New.
25509 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
25510 (__ARM_FEATURE_SHA3): Define if TARGET_SHA3 is true.
25511 * config/aarch64/aarch64.h (AARCH64_FL_SHA3): New flags.
25512 (AARCH64_ISA_SHA3): New ISA flag.
25513 (TARGET_SHA3): New feature flag for sha3.
25514 * config/aarch64/iterators.md (sha512_op): New int attribute.
25515 (CRYPTO_SHA512): New int iterator.
25516 (UNSPEC_SHA512H): New unspec.
25517 (UNSPEC_SHA512H2): Ditto.
25518 (UNSPEC_SHA512SU0): Ditto.
25519 (UNSPEC_SHA512SU1): Ditto.
25520 * config/aarch64/aarch64-simd-builtins.def
25521 (aarch64_crypto_sha512hqv2di): New builtin.
25522 (aarch64_crypto_sha512h2qv2di): Ditto.
25523 (aarch64_crypto_sha512su0qv2di): Ditto.
25524 (aarch64_crypto_sha512su1qv2di): Ditto.
25525 (aarch64_eor3qv8hi): Ditto.
25526 (aarch64_rax1qv2di): Ditto.
25527 (aarch64_xarqv2di): Ditto.
25528 (aarch64_bcaxqv8hi): Ditto.
25529 * config/aarch64/aarch64-simd.md:
25530 (aarch64_crypto_sha512h<sha512_op>qv2di): New pattern.
25531 (aarch64_crypto_sha512su0qv2di): Ditto.
25532 (aarch64_crypto_sha512su1qv2di): Ditto.
25533 (aarch64_eor3qv8hi): Ditto.
25534 (aarch64_rax1qv2di): Ditto.
25535 (aarch64_xarqv2di): Ditto.
25536 (aarch64_bcaxqv8hi): Ditto.
25537 * config/aarch64/arm_neon.h (vsha512hq_u64): New intrinsic.
25538 (vsha512h2q_u64): Ditto.
25539 (vsha512su0q_u64): Ditto.
25540 (vsha512su1q_u64): Ditto.
25541 (veor3q_u16): Ditto.
25542 (vrax1q_u64): Ditto.
25543 (vxarq_u64): Ditto.
25544 (vbcaxq_u16): Ditto.
25545 * config/arm/types.md (crypto_sha512): New type attribute.
25546 (crypto_sha3): Ditto.
25547 (doc/invoke.texi): Document new sha3 option.
25549 2018-01-10 Michael Collison <michael.collison@arm.com>
25551 * config/aarch64/aarch64-builtins.c:
25552 (aarch64_types_quadopu_imm_qualifiers, TYPES_QUADOPUI): New.
25553 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
25554 (__ARM_FEATURE_SM3): Define if TARGET_SM4 is true.
25555 (__ARM_FEATURE_SM4): Define if TARGET_SM4 is true.
25556 * config/aarch64/aarch64.h (AARCH64_FL_SM4): New flags.
25557 (AARCH64_ISA_SM4): New ISA flag.
25558 (TARGET_SM4): New feature flag for sm4.
25559 * config/aarch64/aarch64-simd-builtins.def
25560 (aarch64_sm3ss1qv4si): Ditto.
25561 (aarch64_sm3tt1aq4si): Ditto.
25562 (aarch64_sm3tt1bq4si): Ditto.
25563 (aarch64_sm3tt2aq4si): Ditto.
25564 (aarch64_sm3tt2bq4si): Ditto.
25565 (aarch64_sm3partw1qv4si): Ditto.
25566 (aarch64_sm3partw2qv4si): Ditto.
25567 (aarch64_sm4eqv4si): Ditto.
25568 (aarch64_sm4ekeyqv4si): Ditto.
25569 * config/aarch64/aarch64-simd.md:
25570 (aarch64_sm3ss1qv4si): Ditto.
25571 (aarch64_sm3tt<sm3tt_op>qv4si): Ditto.
25572 (aarch64_sm3partw<sm3part_op>qv4si): Ditto.
25573 (aarch64_sm4eqv4si): Ditto.
25574 (aarch64_sm4ekeyqv4si): Ditto.
25575 * config/aarch64/iterators.md (sm3tt_op): New int iterator.
25576 (sm3part_op): Ditto.
25577 (CRYPTO_SM3TT): Ditto.
25578 (CRYPTO_SM3PART): Ditto.
25579 (UNSPEC_SM3SS1): New unspec.
25580 (UNSPEC_SM3TT1A): Ditto.
25581 (UNSPEC_SM3TT1B): Ditto.
25582 (UNSPEC_SM3TT2A): Ditto.
25583 (UNSPEC_SM3TT2B): Ditto.
25584 (UNSPEC_SM3PARTW1): Ditto.
25585 (UNSPEC_SM3PARTW2): Ditto.
25586 (UNSPEC_SM4E): Ditto.
25587 (UNSPEC_SM4EKEY): Ditto.
25588 * config/aarch64/constraints.md (Ui2): New constraint.
25589 * config/aarch64/predicates.md (aarch64_imm2): New predicate.
25590 * config/arm/types.md (crypto_sm3): New type attribute.
25591 (crypto_sm4): Ditto.
25592 * config/aarch64/arm_neon.h (vsm3ss1q_u32): New intrinsic.
25593 (vsm3tt1aq_u32): Ditto.
25594 (vsm3tt1bq_u32): Ditto.
25595 (vsm3tt2aq_u32): Ditto.
25596 (vsm3tt2bq_u32): Ditto.
25597 (vsm3partw1q_u32): Ditto.
25598 (vsm3partw2q_u32): Ditto.
25599 (vsm4eq_u32): Ditto.
25600 (vsm4ekeyq_u32): Ditto.
25601 (doc/invoke.texi): Document new sm4 option.
25603 2018-01-10 Michael Collison <michael.collison@arm.com>
25605 * config/aarch64/aarch64-arches.def (armv8.4-a): New architecture.
25606 * config/aarch64/aarch64.h (AARCH64_ISA_V8_4): New ISA flag.
25607 (AARCH64_FL_FOR_ARCH8_4): New.
25608 (AARCH64_FL_V8_4): New flag.
25609 (doc/invoke.texi): Document new armv8.4-a option.
25611 2018-01-10 Michael Collison <michael.collison@arm.com>
25613 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
25614 (__ARM_FEATURE_AES): Define if TARGET_AES is true.
25615 (__ARM_FEATURE_SHA2): Define if TARGET_SHA2 is true.
25616 * config/aarch64/aarch64-option-extension.def: Add
25617 AARCH64_OPT_EXTENSION of 'sha2'.
25618 (aes): Add AARCH64_OPT_EXTENSION of 'aes'.
25619 (crypto): Disable sha2 and aes if crypto disabled.
25620 (crypto): Enable aes and sha2 if enabled.
25621 (simd): Disable sha2 and aes if simd disabled.
25622 * config/aarch64/aarch64.h (AARCH64_FL_AES, AARCH64_FL_SHA2):
25624 (AARCH64_ISA_AES, AARCH64_ISA_SHA2): New ISA flags.
25625 (TARGET_SHA2): New feature flag for sha2.
25626 (TARGET_AES): New feature flag for aes.
25627 * config/aarch64/aarch64-simd.md:
25628 (aarch64_crypto_aes<aes_op>v16qi): Make pattern
25629 conditional on TARGET_AES.
25630 (aarch64_crypto_aes<aesmc_op>v16qi): Ditto.
25631 (aarch64_crypto_sha1hsi): Make pattern conditional
25633 (aarch64_crypto_sha1hv4si): Ditto.
25634 (aarch64_be_crypto_sha1hv4si): Ditto.
25635 (aarch64_crypto_sha1su1v4si): Ditto.
25636 (aarch64_crypto_sha1<sha1_op>v4si): Ditto.
25637 (aarch64_crypto_sha1su0v4si): Ditto.
25638 (aarch64_crypto_sha256h<sha256_op>v4si): Ditto.
25639 (aarch64_crypto_sha256su0v4si): Ditto.
25640 (aarch64_crypto_sha256su1v4si): Ditto.
25641 (doc/invoke.texi): Document new aes and sha2 options.
25643 2018-01-10 Martin Sebor <msebor@redhat.com>
25645 PR tree-optimization/83781
25646 * gimple-fold.c (get_range_strlen): Avoid treating arrays of pointers
25649 2018-01-11 Martin Sebor <msebor@gmail.com>
25650 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
25652 PR tree-optimization/83501
25653 PR tree-optimization/81703
25655 * tree-ssa-strlen.c (get_string_cst): Rename...
25656 (get_string_len): ...to this. Handle global constants.
25657 (handle_char_store): Adjust.
25659 2018-01-10 Kito Cheng <kito.cheng@gmail.com>
25660 Jim Wilson <jimw@sifive.com>
25662 * config/riscv/riscv-protos.h (riscv_output_return): New.
25663 * config/riscv/riscv.c (struct machine_function): New naked_p field.
25664 (riscv_attribute_table, riscv_output_return),
25665 (riscv_handle_fndecl_attribute, riscv_naked_function_p),
25666 (riscv_allocate_stack_slots_for_args, riscv_warn_func_return): New.
25667 (riscv_compute_frame_info): Only compute frame->mask if not a naked
25669 (riscv_expand_prologue): Add early return for naked function.
25670 (riscv_expand_epilogue): Likewise.
25671 (riscv_function_ok_for_sibcall): Return false for naked function.
25672 (riscv_set_current_function): New.
25673 (TARGET_SET_CURRENT_FUNCTION, TARGET_ALLOCATE_STACK_SLOTS_FOR_ARGS),
25674 (TARGET_ATTRIBUTE_TABLE, TARGET_WARN_FUNC_RETURN): New.
25675 * config/riscv/riscv.md (simple_return): Call riscv_output_return.
25676 * doc/extend.texi (RISC-V Function Attributes): New.
25678 2018-01-10 Michael Meissner <meissner@linux.vnet.ibm.com>
25680 * config/rs6000/rs6000.c (is_complex_IBM_long_double): Explicitly
25681 check for 128-bit long double before checking TCmode.
25682 * config/rs6000/rs6000.h (FLOAT128_IEEE_P): Explicitly check for
25683 128-bit long doubles before checking TFmode or TCmode.
25684 (FLOAT128_IBM_P): Likewise.
25686 2018-01-10 Martin Sebor <msebor@redhat.com>
25688 PR tree-optimization/83671
25689 * builtins.c (c_strlen): Unconditionally return zero for the empty
25691 Use -Warray-bounds for warnings.
25692 * gimple-fold.c (get_range_strlen): Handle non-constant lengths
25693 for non-constant array indices with COMPONENT_REF, arrays of
25694 arrays, and pointers to arrays.
25695 (gimple_fold_builtin_strlen): Determine and set length range for
25696 non-constant character arrays.
25698 2018-01-10 Aldy Hernandez <aldyh@redhat.com>
25700 PR middle-end/81897
25701 * tree-ssa-uninit.c (convert_control_dep_chain_into_preds): Skip
25704 2018-01-10 Eric Botcazou <ebotcazou@adacore.com>
25706 * dwarf2out.c (dwarf2out_var_location): Do not pass NULL to fprintf.
25708 2018-01-10 Peter Bergner <bergner@vnet.ibm.com>
25711 * config/rs6000/rs6000.c (print_operand) <'y'>: Use
25712 VECTOR_MEM_ALTIVEC_OR_VSX_P.
25713 * config/rs6000/vsx.md (*vsx_le_perm_load_<mode> for VSX_D): Use
25714 indexed_or_indirect_operand predicate.
25715 (*vsx_le_perm_load_<mode> for VSX_W): Likewise.
25716 (*vsx_le_perm_load_v8hi): Likewise.
25717 (*vsx_le_perm_load_v16qi): Likewise.
25718 (*vsx_le_perm_store_<mode> for VSX_D): Likewise.
25719 (*vsx_le_perm_store_<mode> for VSX_W): Likewise.
25720 (*vsx_le_perm_store_v8hi): Likewise.
25721 (*vsx_le_perm_store_v16qi): Likewise.
25722 (eight unnamed splitters): Likewise.
25724 2018-01-10 Peter Bergner <bergner@vnet.ibm.com>
25726 * config/rs6000/x86intrin.h: Change #warning to #error. Update message.
25727 * config/rs6000/emmintrin.h: Likewise.
25728 * config/rs6000/mmintrin.h: Likewise.
25729 * config/rs6000/xmmintrin.h: Likewise.
25731 2018-01-10 David Malcolm <dmalcolm@redhat.com>
25734 * tree-core.h: Document EXPR_LOCATION_WRAPPER_P's usage of
25736 * tree.c (tree_nop_conversion): Return true for location wrapper
25738 (maybe_wrap_with_location): New function.
25739 (selftest::check_strip_nops): New function.
25740 (selftest::test_location_wrappers): New function.
25741 (selftest::tree_c_tests): Call it.
25742 * tree.h (STRIP_ANY_LOCATION_WRAPPER): New macro.
25743 (maybe_wrap_with_location): New decl.
25744 (EXPR_LOCATION_WRAPPER_P): New macro.
25745 (location_wrapper_p): New inline function.
25746 (tree_strip_any_location_wrapper): New inline function.
25748 2018-01-10 H.J. Lu <hongjiu.lu@intel.com>
25751 * config/i386/i386.c (ix86_compute_frame_layout): Always adjust
25752 stack_realign_offset for the largest alignment of stack slot
25754 (ix86_find_max_used_stack_alignment): New function.
25755 (ix86_finalize_stack_frame_flags): Use it. Set
25756 max_used_stack_alignment if we don't realign stack.
25757 * config/i386/i386.h (machine_function): Add
25758 max_used_stack_alignment.
25760 2018-01-10 Christophe Lyon <christophe.lyon@linaro.org>
25762 * config/arm/arm.opt (-mbranch-cost): New option.
25763 * config/arm/arm.h (BRANCH_COST): Take arm_branch_cost into
25766 2018-01-10 Segher Boessenkool <segher@kernel.crashing.org>
25769 * config/rs6000/rs6000.md (load_toc_v4_PIC_2, load_toc_v4_PIC_3b,
25770 load_toc_v4_PIC_3c): Wrap const term in CONST RTL.
25772 2018-01-10 Richard Biener <rguenther@suse.de>
25775 * dwarf2out.c (gen_subprogram_die): Hoist old_die && declaration
25776 early out so it also covers the case where we have a non-NULL
25779 2018-01-10 Richard Sandiford <richard.sandiford@linaro.org>
25781 PR tree-optimization/83753
25782 * tree-vect-stmts.c (get_group_load_store_type): Use VMAT_CONTIGUOUS
25783 for non-strided grouped accesses if the number of elements is 1.
25785 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
25788 * i386.c (ix86_vectorize_builtin_gather): Check TARGET_USE_GATHER.
25789 * i386.h (TARGET_USE_GATHER): Define.
25790 * x86-tune.def (X86_TUNE_USE_GATHER): New.
25792 2018-01-10 Martin Liska <mliska@suse.cz>
25795 * basic-block.h (CLEANUP_NO_PARTITIONING): New define.
25796 * bb-reorder.c (pass_reorder_blocks::execute): Do not clean up
25798 * cfgcleanup.c (try_optimize_cfg): Fix up partitioning if
25799 CLEANUP_NO_PARTITIONING is not set.
25801 2018-01-10 Richard Sandiford <richard.sandiford@linaro.org>
25803 * doc/rtl.texi: Remove documentation of (const ...) wrappers
25804 for vectors, as a partial revert of r254296.
25805 * rtl.h (const_vec_p): Delete.
25806 (const_vec_duplicate_p): Don't test for vector CONSTs.
25807 (unwrap_const_vec_duplicate, const_vec_series_p): Likewise.
25808 * expmed.c (make_tree): Likewise.
25811 * common.md (E, F): Use CONSTANT_P instead of checking for
25813 * emit-rtl.c (gen_lowpart_common): Use const_vec_p instead of
25814 checking for CONST_VECTOR.
25816 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
25818 PR middle-end/83575
25819 * predict.c (force_edge_cold): Handle in more sane way edges
25820 with no prediction.
25822 2018-01-09 Carl Love <cel@us.ibm.com>
25824 * config/rs6002/altivec.md (p8_vmrgow): Add support for V2DI, V2DF,
25826 (p8_vmrgew): Add support for V2DI, V2DF, V4SF types.
25827 * config/rs6000/rs6000-builtin.def: Add definitions for FLOAT2_V2DF,
25828 VMRGEW_V2DI, VMRGEW_V2DF, VMRGEW_V4SF, VMRGOW_V4SI, VMRGOW_V4SF,
25829 VMRGOW_V2DI, VMRGOW_V2DF. Remove definition for VMRGOW.
25830 * config/rs6000/rs6000-c.c (VSX_BUILTIN_VEC_FLOAT2,
25831 P8V_BUILTIN_VEC_VMRGEW, P8V_BUILTIN_VEC_VMRGOW): Add definitions.
25832 * config/rs6000/rs6000-protos.h: Add extern defition for
25833 rs6000_generate_float2_double_code.
25834 * config/rs6000/rs6000.c (rs6000_generate_float2_double_code): Add
25836 * config/rs6000/vsx.md (vsx_xvcdpsp): Add define_insn.
25837 (float2_v2df): Add define_expand.
25839 2018-01-09 Uros Bizjak <ubizjak@gmail.com>
25842 * combine.c (force_int_to_mode) <case ASHIFT>: Use mode instead of
25843 op_mode in the force_to_mode call.
25845 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
25847 * config/aarch64/aarch64.c (aarch64_evpc_trn): Use d.perm.series_p
25848 instead of checking each element individually.
25849 (aarch64_evpc_uzp): Likewise.
25850 (aarch64_evpc_zip): Likewise.
25851 (aarch64_evpc_ext): Likewise.
25852 (aarch64_evpc_rev): Likewise.
25853 (aarch64_evpc_dup): Test the encoding for a single duplicated element,
25854 instead of checking each element individually. Return true without
25856 (aarch64_vectorize_vec_perm_const): Use all_from_input_p to test
25857 whether all selected elements come from the same input, instead of
25858 checking each element individually. Remove calls to gen_rtx_REG,
25859 start_sequence and end_sequence and instead assert that no rtl is
25862 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
25864 * config/aarch64/aarch64.c (aarch64_legitimate_constant_p): Fix
25865 order of HIGH and CONST checks.
25867 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
25869 * tree-vect-stmts.c (permute_vec_elements): Create a fresh variable
25870 if the destination isn't an SSA_NAME.
25872 2018-01-09 Richard Biener <rguenther@suse.de>
25874 PR tree-optimization/83668
25875 * graphite.c (canonicalize_loop_closed_ssa): Add edge argument,
25877 (canonicalize_loop_form): ... here, renamed from ...
25878 (canonicalize_loop_closed_ssa_form): ... this and amended to
25879 swap successor edges for loop exit blocks to make us use
25880 the RPO order we need for initial schedule generation.
25882 2018-01-09 Joseph Myers <joseph@codesourcery.com>
25884 PR tree-optimization/64811
25885 * match.pd: When optimizing comparisons with Inf, avoid
25886 introducing or losing exceptions from comparisons with NaN.
25888 2018-01-09 Martin Liska <mliska@suse.cz>
25891 * asan.c (shadow_mem_size): Add gcc_assert.
25893 2018-01-09 Georg-Johann Lay <avr@gjlay.de>
25895 Don't save registers in main().
25898 * doc/invoke.texi (AVR Options) [-mmain-is-OS_task]: Document it.
25899 * config/avr/avr.opt (-mmain-is-OS_task): New target option.
25900 * config/avr/avr.c (avr_set_current_function): Don't error if
25901 naked, OS_task or OS_main are specified at the same time.
25902 (avr_function_ok_for_sibcall): Don't disable sibcalls for OS_task,
25904 (avr_insert_attributes) [-mmain-is-OS_task] <main>: Add OS_task
25906 * common/config/avr/avr-common.c (avr_option_optimization_table):
25907 Switch on -mmain-is-OS_task for optimizing compilations.
25909 2018-01-09 Richard Biener <rguenther@suse.de>
25911 PR tree-optimization/83572
25912 * graphite.c: Include cfganal.h.
25913 (graphite_transform_loops): Connect infinite loops to exit
25914 and remove fake edges at the end.
25916 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
25918 * ipa-inline.c (edge_badness): Revert accidental checkin.
25920 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
25923 * ipa-comdats.c (set_comdat_group): Only set comdat group of real
25924 symbols; not inline clones.
25926 2018-01-09 Jakub Jelinek <jakub@redhat.com>
25929 * modulo-sched.c (schedule_reg_moves): Punt if we'd need to move
25930 hard registers. Formatting fixes.
25932 PR preprocessor/83722
25933 * gcc.c (try_generate_repro): Pass
25934 &temp_stderr_files[RETRY_ICE_ATTEMPTS - 1] rather than
25935 &temp_stdout_files[RETRY_ICE_ATTEMPTS - 1] as last argument to
25938 2018-01-08 Monk Chiang <sh.chiang04@gmail.com>
25939 Kito Cheng <kito.cheng@gmail.com>
25941 * config/riscv/riscv.c (machine_function::is_leaf): Remove field.
25942 (riscv_leaf_function_p): Delete.
25943 (riscv_function_ok_for_sibcall): Return false when TARGET_SAVE_RESTORE.
25945 2018-01-08 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
25947 * config/rs6000/rs6000-string.c (do_load_for_compare_from_addr): New
25949 (do_ifelse): New function.
25950 (do_isel): New function.
25951 (do_sub3): New function.
25952 (do_add3): New function.
25953 (do_load_mask_compare): New function.
25954 (do_overlap_load_compare): New function.
25955 (expand_compare_loop): New function.
25956 (expand_block_compare): Call expand_compare_loop() when appropriate.
25957 * config/rs6000/rs6000.opt (-mblock-compare-inline-limit): Change
25958 option description.
25959 (-mblock-compare-inline-loop-limit): New option.
25961 2018-01-08 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
25964 * config/rs6000/altivec.md (*altivec_vpermr_<mode>_internal):
25965 Reverse order of second and third operands in first alternative.
25966 * config/rs6000/rs6000.c (rs6000_expand_vector_set): Reverse order
25967 of first and second elements in UNSPEC_VPERMR vector.
25968 (altivec_expand_vec_perm_le): Likewise.
25970 2018-01-08 Jeff Law <law@redhat.com>
25972 PR rtl-optimizatin/81308
25973 * tree-switch-conversion.c (cfg_altered): New file scoped static.
25974 (process_switch): If group_case_labels makes a change, then set
25976 (pass_convert_switch::execute): If a switch is converted, then
25977 set cfg_altered. Return TODO_cfg_cleanup if cfg_altered is true.
25979 PR rtl-optimization/81308
25980 * recog.c (split_all_insns): Conditionally cleanup the CFG after
25983 2018-01-08 Vidya Praveen <vidyapraveen@arm.com>
25985 PR target/83663 - Revert r255946
25986 * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify code
25987 generation for cases where splatting a value is not useful.
25988 * simplify-rtx.c (simplify_ternary_operation): Simplify vec_merge
25989 across a vec_duplicate and a paradoxical subreg forming a vector
25990 mode to a vec_concat.
25992 2018-01-08 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
25994 * config/arm/t-aprofile (MULTILIB_MATCHES): Add mapping rules for
25995 -march=armv8.3-a variants.
25996 * config/arm/t-multilib: Likewise.
25997 * config/arm/t-arm-elf: Likewise. Handle dotprod extension.
25999 2018-01-08 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
26001 * config/rs6000/rs6000.md (cceq_ior_compare): Remove * so I can use it
26003 (cceq_ior_compare_complement): Give it a name so I can use it, and
26004 change boolean_or_operator predicate to boolean_operator so it can
26005 be used to generate a crand.
26006 (eqne): New code iterator.
26007 (bd/bd_neg): New code_attrs.
26008 (<bd>_<mode>): New name for ctr<mode>_internal[12] now combined into
26009 a single define_insn.
26010 (<bd>tf_<mode>): A new insn pattern for the conditional form branch
26011 decrement (bdnzt/bdnzf/bdzt/bdzf).
26012 * config/rs6000/rs6000.c (rs6000_legitimate_combined_insn): Updated
26013 with the new names of the branch decrement patterns, and added the
26014 names of the branch decrement conditional patterns.
26016 2018-01-08 Richard Biener <rguenther@suse.de>
26018 PR tree-optimization/83563
26019 * graphite.c (canonicalize_loop_closed_ssa_form): Reset the SCEV
26022 2018-01-08 Richard Biener <rguenther@suse.de>
26024 PR middle-end/83713
26025 * convert.c (do_narrow): Properly guard TYPE_OVERFLOW_WRAPS checks.
26027 2018-01-08 Richard Biener <rguenther@suse.de>
26029 PR tree-optimization/83685
26030 * tree-ssa-pre.c (create_expression_by_pieces): Do not insert
26031 references to abnormals.
26033 2018-01-08 Richard Biener <rguenther@suse.de>
26036 * dwarf2out.c (output_indirect_strings): Handle empty
26037 skeleton_debug_str_hash.
26038 (dwarf2out_early_finish): Index strings for -gsplit-dwarf.
26040 2018-01-08 Claudiu Zissulescu <claziss@synopsys.com>
26042 * config/arc/arc.c (TARGET_TRAMPOLINE_ADJUST_ADDRESS): Delete.
26043 (emit_store_direct): Likewise.
26044 (arc_trampoline_adjust_address): Likewise.
26045 (arc_asm_trampoline_template): New function.
26046 (arc_initialize_trampoline): Use asm_trampoline_template.
26047 (TARGET_ASM_TRAMPOLINE_TEMPLATE): Define.
26048 * config/arc/arc.h (TRAMPOLINE_SIZE): Adjust to 16.
26049 * config/arc/arc.md (flush_icache): Delete pattern.
26051 2018-01-08 Claudiu Zissulescu <claziss@synopsys.com>
26053 * config/arc/arc-c.def (__ARC_UNALIGNED__): New define.
26054 * config/arc/arc.h (STRICT_ALIGNMENT): Control this macro using
26057 2018-01-08 Sebastian Huber <sebastian.huber@embedded-brains.de>
26060 * config/epiphany/epiphany.h (make_pass_mode_switch_use): Guard
26061 by not USED_FOR_TARGET.
26062 (make_pass_resolve_sw_modes): Likewise.
26064 2018-01-08 Sebastian Huber <sebastian.huber@embedded-brains.de>
26066 * config/nios2/nios2.h (nios2_section_threshold): Guard by not
26069 2018-01-08 Richard Biener <rguenther@suse.de>
26071 PR middle-end/83580
26072 * tree-data-ref.c (split_constant_offset): Remove STRIP_NOPS.
26074 2018-01-08 Richard Biener <rguenther@suse.de>
26076 PR middle-end/83517
26077 * match.pd ((t * 2) / 2) -> t): Add missing :c.
26079 2018-01-06 Aldy Hernandez <aldyh@redhat.com>
26081 PR middle-end/81897
26082 * tree-ssa-uninit.c (compute_control_dep_chain): Do not bail on
26083 basic blocks with a small number of successors.
26084 (convert_control_dep_chain_into_preds): Improve handling of
26086 (dump_predicates): Split apart into...
26087 (dump_pred_chain): ...here...
26088 (dump_pred_info): ...and here.
26089 (can_one_predicate_be_invalidated_p): Add debugging printfs.
26090 (can_chain_union_be_invalidated_p): Improve check for invalidation
26092 (uninit_uses_cannot_happen): Avoid unnecessary if
26093 convert_control_dep_chain_into_preds yielded nothing.
26095 2018-01-06 Martin Sebor <msebor@redhat.com>
26097 PR tree-optimization/83640
26098 * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Avoid
26099 subtracting negative offset from size.
26100 (builtin_access::overlap): Adjust offset bounds of the access to fall
26101 within the size of the object if possible.
26103 2018-01-06 Richard Sandiford <richard.sandiford@linaro.org>
26105 PR rtl-optimization/83699
26106 * expmed.c (extract_bit_field_1): Restrict the vector usage of
26107 extract_bit_field_as_subreg to cases in which the extracted
26108 value is also a vector.
26110 * lra-constraints.c (process_alt_operands): Test for the equivalence
26111 substitutions when detecting a possible reload cycle.
26113 2018-01-06 Jakub Jelinek <jakub@redhat.com>
26116 * toplev.c (process_options): Don't enable debug_nonbind_markers_p
26117 by default if flag_selective_schedling{,2}. Formatting fixes.
26119 PR rtl-optimization/83682
26120 * rtl.h (const_vec_duplicate_p): Only return true for VEC_DUPLICATE
26121 if it has non-VECTOR_MODE element mode.
26122 (vec_duplicate_p): Likewise.
26124 PR middle-end/83694
26125 * cfgexpand.c (expand_debug_expr): Punt if mode1 is VOIDmode
26126 and bitsize might be greater than MAX_BITSIZE_MODE_ANY_INT.
26128 2018-01-05 Jakub Jelinek <jakub@redhat.com>
26131 * config/i386/i386-builtin.def
26132 (__builtin_ia32_vgf2p8affineinvqb_v64qi,
26133 __builtin_ia32_vgf2p8affineqb_v64qi, __builtin_ia32_vgf2p8mulb_v64qi):
26134 Require also OPTION_MASK_ISA_AVX512F in addition to
26135 OPTION_MASK_ISA_GFNI.
26136 (__builtin_ia32_vgf2p8affineinvqb_v16qi_mask,
26137 __builtin_ia32_vgf2p8affineqb_v16qi_mask): Require
26138 OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_SSE in addition
26139 to OPTION_MASK_ISA_GFNI.
26140 (__builtin_ia32_vgf2p8mulb_v32qi_mask): Require
26141 OPTION_MASK_ISA_AVX512VL in addition to OPTION_MASK_ISA_GFNI and
26142 OPTION_MASK_ISA_AVX512BW.
26143 (__builtin_ia32_vgf2p8mulb_v16qi_mask): Require
26144 OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_AVX512BW in
26145 addition to OPTION_MASK_ISA_GFNI.
26146 (__builtin_ia32_vgf2p8affineinvqb_v16qi,
26147 __builtin_ia32_vgf2p8affineqb_v16qi, __builtin_ia32_vgf2p8mulb_v16qi):
26148 Require OPTION_MASK_ISA_SSE2 instead of OPTION_MASK_ISA_SSE in addition
26149 to OPTION_MASK_ISA_GFNI.
26150 * config/i386/i386.c (def_builtin): Change to builtin isa/isa2 being
26151 a requirement for all ISAs rather than any of them with a few
26153 (ix86_add_new_builtins): Clear OPTION_MASK_ISA_64BIT from isa before
26155 (ix86_expand_builtin): Require all ISAs from builtin's isa and isa2
26156 bitmasks to be enabled with 3 exceptions, instead of requiring any
26157 enabled ISA with lots of exceptions.
26158 * config/i386/sse.md (vgf2p8affineinvqb_<mode><mask_name>,
26159 vgf2p8affineqb_<mode><mask_name>, vgf2p8mulb_<mode><mask_name>):
26160 Change avx512bw in isa attribute to avx512f.
26161 * config/i386/sgxintrin.h: Add license boilerplate.
26162 * config/i386/vaesintrin.h: Likewise. Fix macro spelling __AVX512F
26163 to __AVX512F__ and __AVX512VL to __AVX512VL__.
26164 (_mm256_aesdec_epi128, _mm256_aesdeclast_epi128, _mm256_aesenc_epi128,
26165 _mm256_aesenclast_epi128): Enable temporarily avx if __AVX__ is not
26167 * config/i386/gfniintrin.h (_mm_gf2p8mul_epi8,
26168 _mm_gf2p8affineinv_epi64_epi8, _mm_gf2p8affine_epi64_epi8): Enable
26169 temporarily sse2 rather than sse if not enabled already.
26172 * config/i386/sse.md (VI248_VLBW): Rename to ...
26173 (VI248_AVX512VL): ... this. Don't guard V32HI with TARGET_AVX512BW.
26174 (vpshrd_<mode><mask_name>, vpshld_<mode><mask_name>,
26175 vpshrdv_<mode>, vpshrdv_<mode>_mask, vpshrdv_<mode>_maskz,
26176 vpshrdv_<mode>_maskz_1, vpshldv_<mode>, vpshldv_<mode>_mask,
26177 vpshldv_<mode>_maskz, vpshldv_<mode>_maskz_1): Use VI248_AVX512VL
26178 mode iterator instead of VI248_VLBW.
26180 2018-01-05 Jan Hubicka <hubicka@ucw.cz>
26182 * ipa-fnsummary.c (record_modified_bb_info): Add OP.
26183 (record_modified): Skip clobbers; add debug output.
26184 (param_change_prob): Use sreal frequencies.
26186 2018-01-05 Richard Sandiford <richard.sandiford@linaro.org>
26188 * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Don't
26189 punt for user-aligned variables.
26191 2018-01-05 Richard Sandiford <richard.sandiford@linaro.org>
26193 * tree-chrec.c (chrec_contains_symbols): Return true for
26196 2018-01-05 Sudakshina Das <sudi.das@arm.com>
26199 * simplify-rtx.c (simplify_relational_operation_1): Add simplifications
26200 of (x|y) == x for BICS pattern.
26202 2018-01-05 Jakub Jelinek <jakub@redhat.com>
26204 PR tree-optimization/83605
26205 * gimple-ssa-strength-reduction.c: Include tree-eh.h.
26206 (find_candidates_dom_walker::before_dom_children): Ignore stmts that
26209 2018-01-05 Sebastian Huber <sebastian.huber@embedded-brains.de>
26211 * config.gcc (epiphany-*-elf*): Add (epiphany-*-rtems*) configuration.
26212 * config/epiphany/rtems.h: New file.
26214 2018-01-04 Jakub Jelinek <jakub@redhat.com>
26215 Uros Bizjak <ubizjak@gmail.com>
26218 * config/i386/i386.md (*<rotate_insn>hi3_1 splitter): Use
26219 QIreg_operand instead of register_operand predicate.
26220 * config/i386/i386.c (ix86_rop_should_change_byte_p,
26221 set_rop_modrm_reg_bits, ix86_mitigate_rop): Use -mmitigate-rop in
26222 comments instead of -fmitigate[-_]rop.
26224 2018-01-04 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
26227 * cgraphunit.c (symbol_table::compile): Switch to text_section
26228 before calling assembly_start debug hook.
26229 * run-rtl-passes.c (run_rtl_passes): Likewise.
26232 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
26234 * tree-vrp.c (extract_range_from_binary_expr_1): Check
26235 range_int_cst_p rather than !symbolic_range_p before calling
26236 extract_range_from_multiplicative_op_1.
26238 2018-01-04 Jeff Law <law@redhat.com>
26240 * tree-ssa-math-opts.c (execute_cse_reciprocals_1): Remove
26241 redundant test in assertion.
26243 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
26245 * doc/rtl.texi: Document machine_mode wrapper classes.
26247 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
26249 * fold-const.c (fold_ternary_loc): Check tree_fits_uhwi_p before
26250 using tree_to_uhwi.
26252 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
26254 * tree-ssa-forwprop.c (is_combined_permutation_identity): Allow
26255 the VEC_PERM_EXPR fold to fail.
26257 2018-01-04 Jakub Jelinek <jakub@redhat.com>
26260 * bb-reorder.c (insert_section_boundary_note): Set has_bb_partition
26261 to switched_sections.
26263 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
26266 * config/arm/arm.c (arm_vectorize_vec_perm_const): Fix inverted
26267 test for d.testing.
26269 2018-01-04 Peter Bergner <bergner@vnet.ibm.com>
26272 * config/rs6000/rs6000.c (rs6000_discover_homogeneous_aggregate): Do not
26273 allow arguments in FP registers if TARGET_HARD_FLOAT is false.
26275 2018-01-04 Jakub Jelinek <jakub@redhat.com>
26278 * cfgexpand.c (expand_debug_expr) <case BIT_FIELD_REF>: Punt if mode
26279 is BLKmode and bitpos not zero or mode change is needed.
26281 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
26284 * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): Require
26287 2018-01-04 Uros Bizjak <ubizjak@gmail.com>
26290 * config/alpha/alpha.md (*sadd<modesuffix>): Use ASHIFT
26291 instead of MULT rtx. Update all corresponding splitters.
26292 (*saddl_se): Ditto.
26293 (*ssub<modesuffix>): Ditto.
26294 (*ssubl_se): Ditto.
26295 (*cmp_sadd_di): Update split patterns.
26296 (*cmp_sadd_si): Ditto.
26297 (*cmp_sadd_sidi): Ditto.
26298 (*cmp_ssub_di): Ditto.
26299 (*cmp_ssub_si): Ditto.
26300 (*cmp_ssub_sidi): Ditto.
26301 * config/alpha/predicates.md (const23_operand): New predicate.
26302 * config/alpha/alpha.c (alpha_rtx_costs) [PLUS, MINUS]:
26303 Look for ASHIFT, not MULT inner operand.
26304 (alpha_split_conditional_move): Update for *sadd<modesuffix> change.
26306 2018-01-04 Martin Liska <mliska@suse.cz>
26308 PR gcov-profile/83669
26309 * gcov.c (output_intermediate_file): Add version to intermediate
26311 * doc/gcov.texi: Document new field 'version' in intermediate
26312 file format. Fix location of '-k' option of gcov command.
26314 2018-01-04 Martin Liska <mliska@suse.cz>
26317 * ipa-icf.c (sem_function::merge): Do not cross comdat boundary.
26319 2018-01-04 Jakub Jelinek <jakub@redhat.com>
26321 * gimple-ssa-sprintf.c (parse_directive): Cast second dir.len to uhwi.
26323 2018-01-03 Martin Sebor <msebor@redhat.com>
26325 PR tree-optimization/83655
26326 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call): Avoid
26327 checking calls with invalid arguments.
26329 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
26331 * tree-vect-stmts.c (vect_get_store_rhs): New function.
26332 (vectorizable_mask_load_store): Delete.
26333 (vectorizable_call): Return false for masked loads and stores.
26334 (vectorizable_store): Handle IFN_MASK_STORE. Use vect_get_store_rhs
26335 instead of gimple_assign_rhs1.
26336 (vectorizable_load): Handle IFN_MASK_LOAD.
26337 (vect_transform_stmt): Don't set is_store for call_vec_info_type.
26339 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
26341 * tree-vect-stmts.c (vect_build_gather_load_calls): New function,
26343 (vectorizable_mask_load_store): ...here.
26344 (vectorizable_load): ...and here.
26346 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
26348 * tree-vect-stmts.c (vect_build_all_ones_mask)
26349 (vect_build_zero_merge_argument): New functions, split out from...
26350 (vectorizable_load): ...here.
26352 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
26354 * tree-vect-stmts.c (vect_check_store_rhs): New function,
26356 (vectorizable_mask_load_store): ...here.
26357 (vectorizable_store): ...and here.
26359 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
26361 * tree-vect-stmts.c (vect_check_load_store_mask): New function,
26363 (vectorizable_mask_load_store): ...here.
26365 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
26367 * tree-vectorizer.h (vec_load_store_type): Moved from tree-vec-stmts.c
26368 (vect_model_store_cost): Take a vec_load_store_type instead of a
26370 * tree-vect-stmts.c (vec_load_store_type): Move to tree-vectorizer.h.
26371 (vect_model_store_cost): Take a vec_load_store_type instead of a
26373 (vectorizable_mask_load_store): Update accordingly.
26374 (vectorizable_store): Likewise.
26375 * tree-vect-slp.c (vect_analyze_slp_cost_1): Update accordingly.
26377 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
26379 * tree-vect-loop.c (vect_transform_loop): Stub out scalar
26380 IFN_MASK_LOAD calls here rather than...
26381 * tree-vect-stmts.c (vectorizable_mask_load_store): ...here.
26383 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
26384 Alan Hayward <alan.hayward@arm.com>
26385 David Sherwood <david.sherwood@arm.com>
26387 * expmed.c (extract_bit_field_1): For vector extracts,
26388 fall back to extract_bit_field_as_subreg if vec_extract
26391 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
26392 Alan Hayward <alan.hayward@arm.com>
26393 David Sherwood <david.sherwood@arm.com>
26395 * lra-spills.c (pseudo_reg_slot_compare): Sort slots by whether
26396 they are variable or constant sized.
26397 (assign_stack_slot_num_and_sort_pseudos): Don't reuse variable-sized
26398 slots for constant-sized data.
26400 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
26401 Alan Hayward <alan.hayward@arm.com>
26402 David Sherwood <david.sherwood@arm.com>
26404 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): When
26405 handling COND_EXPRs with boolean comparisons, try to find a better
26406 basis for the mask type than the boolean itself.
26408 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
26410 * doc/rtl.texi (MAX_BITSIZE_MODE_ANY_MODE): Describe how the default
26411 is calculated and how it can be overridden.
26412 * genmodes.c (max_bitsize_mode_any_mode): New variable.
26413 (create_modes): Initialize it from MAX_BITSIZE_MODE_ANY_MODE,
26415 (emit_max_int): Use it to set the output MAX_BITSIZE_MODE_ANY_MODE,
26418 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
26419 Alan Hayward <alan.hayward@arm.com>
26420 David Sherwood <david.sherwood@arm.com>
26422 * config/aarch64/aarch64-protos.h (aarch64_output_simd_mov_immediate):
26423 Remove the mode argument.
26424 (aarch64_simd_valid_immediate): Remove the mode and inverse
26426 * config/aarch64/iterators.md (bitsize): New iterator.
26427 * config/aarch64/aarch64-simd.md (*aarch64_simd_mov<mode>, and<mode>3)
26428 (ior<mode>3): Update calls to aarch64_output_simd_mov_immediate.
26429 * config/aarch64/constraints.md (Do, Db, Dn): Update calls to
26430 aarch64_simd_valid_immediate.
26431 * config/aarch64/predicates.md (aarch64_reg_or_orr_imm): Likewise.
26432 (aarch64_reg_or_bic_imm): Likewise.
26433 * config/aarch64/aarch64.c (simd_immediate_info): Replace mvn
26434 with an insn_type enum and msl with a modifier_type enum.
26435 Replace element_width with a scalar_mode. Change the shift
26436 to unsigned int. Add constructors for scalar_float_mode and
26437 scalar_int_mode elements.
26438 (aarch64_vect_float_const_representable_p): Delete.
26439 (aarch64_can_const_movi_rtx_p)
26440 (aarch64_simd_scalar_immediate_valid_for_move)
26441 (aarch64_simd_make_constant): Update call to
26442 aarch64_simd_valid_immediate.
26443 (aarch64_advsimd_valid_immediate_hs): New function.
26444 (aarch64_advsimd_valid_immediate): Likewise.
26445 (aarch64_simd_valid_immediate): Remove mode and inverse
26446 arguments. Rewrite to use the above. Use const_vec_duplicate_p
26447 to detect duplicated constants and use aarch64_float_const_zero_rtx_p
26448 and aarch64_float_const_representable_p on the result.
26449 (aarch64_output_simd_mov_immediate): Remove mode argument.
26450 Update call to aarch64_simd_valid_immediate and use of
26451 simd_immediate_info.
26452 (aarch64_output_scalar_simd_mov_immediate): Update call
26455 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
26456 Alan Hayward <alan.hayward@arm.com>
26457 David Sherwood <david.sherwood@arm.com>
26459 * machmode.h (mode_precision): Prefix with CONST_MODE_PRECISION.
26460 (mode_nunits): Likewise CONST_MODE_NUNITS.
26461 * machmode.def (ADJUST_NUNITS): Document.
26462 * genmodes.c (mode_data::need_nunits_adj): New field.
26463 (blank_mode): Update accordingly.
26464 (adj_nunits): New variable.
26465 (print_maybe_const_decl): Replace CATEGORY with a NEEDS_ADJ
26467 (emit_mode_size_inline): Set need_bytesize_adj for all modes
26468 listed in adj_nunits.
26469 (emit_mode_nunits_inline): Set need_nunits_adj for all modes
26470 listed in adj_nunits. Don't emit case statements for such modes.
26471 (emit_insn_modes_h): Emit definitions of CONST_MODE_NUNITS
26472 and CONST_MODE_PRECISION. Make CONST_MODE_SIZE expand to
26473 nothing if adj_nunits is nonnull.
26474 (emit_mode_precision, emit_mode_nunits): Use print_maybe_const_decl.
26475 (emit_mode_unit_size, emit_mode_base_align, emit_mode_ibit)
26476 (emit_mode_fbit): Update use of print_maybe_const_decl.
26477 (emit_move_size): Likewise. Treat the array as non-const
26479 (emit_mode_adjustments): Handle adj_nunits.
26481 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
26483 * machmode.def (VECTOR_MODES_WITH_PREFIX): Document.
26484 * genmodes.c (VECTOR_MODES_WITH_PREFIX): New macro.
26485 (VECTOR_MODES): Use it.
26486 (make_vector_modes): Take the prefix as an argument.
26488 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
26489 Alan Hayward <alan.hayward@arm.com>
26490 David Sherwood <david.sherwood@arm.com>
26492 * mode-classes.def (MODE_VECTOR_BOOL): New mode class.
26493 * machmode.h (INTEGRAL_MODE_P, VECTOR_MODE_P): Return true
26494 for MODE_VECTOR_BOOL.
26495 * machmode.def (VECTOR_BOOL_MODE): Document.
26496 * genmodes.c (VECTOR_BOOL_MODE): New macro.
26497 (make_vector_bool_mode): New function.
26498 (complete_mode, emit_mode_wider, emit_mode_adjustments): Handle
26500 * lto-streamer-in.c (lto_input_mode_table): Likewise.
26501 * rtx-vector-builder.c (rtx_vector_builder::find_cached_value):
26503 * stor-layout.c (int_mode_for_mode): Likewise.
26504 * tree.c (build_vector_type_for_mode): Likewise.
26505 * varasm.c (output_constant_pool_2): Likewise.
26506 * emit-rtl.c (init_emit_once): Make sure that CONST1_RTX (BImode) and
26507 CONSTM1_RTX (BImode) are the same thing. Initialize const_tiny_rtx
26508 for MODE_VECTOR_BOOL.
26509 * expr.c (expand_expr_real_1): Use VECTOR_MODE_P instead of a list
26510 of mode class checks.
26511 * tree-vect-generic.c (expand_vector_operation): Use VECTOR_MODE_P
26512 instead of a list of mode class checks.
26513 (expand_vector_scalar_condition): Likewise.
26514 (type_for_widest_vector_mode): Handle BImode as an inner mode.
26516 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
26517 Alan Hayward <alan.hayward@arm.com>
26518 David Sherwood <david.sherwood@arm.com>
26520 * machmode.h (mode_size): Change from unsigned short to
26522 (mode_to_bytes): Return a poly_uint16 rather than an unsigned short.
26523 (GET_MODE_SIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
26524 or if measurement_type is not polynomial.
26525 (fixed_size_mode::includes_p): Check for constant-sized modes.
26526 * genmodes.c (emit_mode_size_inline): Make mode_size_inline
26527 return a poly_uint16 rather than an unsigned short.
26528 (emit_mode_size): Change the type of mode_size from unsigned short
26529 to poly_uint16_pod. Use ZERO_COEFFS for the initializer.
26530 (emit_mode_adjustments): Cope with polynomial vector sizes.
26531 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
26533 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
26535 * auto-inc-dec.c (try_merge): Treat GET_MODE_SIZE as polynomial.
26536 * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Likewise.
26537 * caller-save.c (setup_save_areas): Likewise.
26538 (replace_reg_with_saved_mem): Likewise.
26539 * calls.c (emit_library_call_value_1): Likewise.
26540 * combine-stack-adj.c (combine_stack_adjustments_for_block): Likewise.
26541 * combine.c (simplify_set, make_extraction, simplify_shift_const_1)
26542 (gen_lowpart_for_combine): Likewise.
26543 * convert.c (convert_to_integer_1): Likewise.
26544 * cse.c (equiv_constant, cse_insn): Likewise.
26545 * cselib.c (autoinc_split, cselib_hash_rtx): Likewise.
26546 (cselib_subst_to_values): Likewise.
26547 * dce.c (word_dce_process_block): Likewise.
26548 * df-problems.c (df_word_lr_mark_ref): Likewise.
26549 * dwarf2cfi.c (init_one_dwarf_reg_size): Likewise.
26550 * dwarf2out.c (multiple_reg_loc_descriptor, mem_loc_descriptor)
26551 (concat_loc_descriptor, concatn_loc_descriptor, loc_descriptor)
26552 (rtl_for_decl_location): Likewise.
26553 * emit-rtl.c (gen_highpart, widen_memory_access): Likewise.
26554 * expmed.c (extract_bit_field_1, extract_integral_bit_field): Likewise.
26555 * expr.c (emit_group_load_1, clear_storage_hints): Likewise.
26556 (emit_move_complex, emit_move_multi_word, emit_push_insn): Likewise.
26557 (expand_expr_real_1): Likewise.
26558 * function.c (assign_parm_setup_block_p, assign_parm_setup_block)
26559 (pad_below): Likewise.
26560 * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
26561 * gimple-ssa-store-merging.c (rhs_valid_for_store_merging_p): Likewise.
26562 * ira.c (get_subreg_tracking_sizes): Likewise.
26563 * ira-build.c (ira_create_allocno_objects): Likewise.
26564 * ira-color.c (coalesced_pseudo_reg_slot_compare): Likewise.
26565 (ira_sort_regnos_for_alter_reg): Likewise.
26566 * ira-costs.c (record_operand_costs): Likewise.
26567 * lower-subreg.c (interesting_mode_p, simplify_gen_subreg_concatn)
26568 (resolve_simple_move): Likewise.
26569 * lra-constraints.c (get_reload_reg, operands_match_p): Likewise.
26570 (process_addr_reg, simplify_operand_subreg, curr_insn_transform)
26571 (lra_constraints): Likewise.
26572 (CONST_POOL_OK_P): Reject variable-sized modes.
26573 * lra-spills.c (slot, assign_mem_slot, pseudo_reg_slot_compare)
26574 (add_pseudo_to_slot, lra_spill): Likewise.
26575 * omp-low.c (omp_clause_aligned_alignment): Likewise.
26576 * optabs-query.c (get_best_extraction_insn): Likewise.
26577 * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
26578 * optabs.c (expand_vec_perm_var, expand_vec_cond_expr): Likewise.
26579 (expand_mult_highpart, valid_multiword_target_p): Likewise.
26580 * recog.c (offsettable_address_addr_space_p): Likewise.
26581 * regcprop.c (maybe_mode_change): Likewise.
26582 * reginfo.c (choose_hard_reg_mode, record_subregs_of_mode): Likewise.
26583 * regrename.c (build_def_use): Likewise.
26584 * regstat.c (dump_reg_info): Likewise.
26585 * reload.c (complex_word_subreg_p, push_reload, find_dummy_reload)
26586 (find_reloads, find_reloads_subreg_address): Likewise.
26587 * reload1.c (eliminate_regs_1): Likewise.
26588 * rtlanal.c (for_each_inc_dec_find_inc_dec, rtx_cost): Likewise.
26589 * simplify-rtx.c (avoid_constant_pool_reference): Likewise.
26590 (simplify_binary_operation_1, simplify_subreg): Likewise.
26591 * targhooks.c (default_function_arg_padding): Likewise.
26592 (default_hard_regno_nregs, default_class_max_nregs): Likewise.
26593 * tree-cfg.c (verify_gimple_assign_binary): Likewise.
26594 (verify_gimple_assign_ternary): Likewise.
26595 * tree-inline.c (estimate_move_cost): Likewise.
26596 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
26597 * tree-ssa-loop-ivopts.c (add_autoinc_candidates): Likewise.
26598 (get_address_cost_ainc): Likewise.
26599 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Likewise.
26600 (vect_supportable_dr_alignment): Likewise.
26601 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
26602 (vectorizable_reduction): Likewise.
26603 * tree-vect-stmts.c (vectorizable_assignment, vectorizable_shift)
26604 (vectorizable_operation, vectorizable_load): Likewise.
26605 * tree.c (build_same_sized_truth_vector_type): Likewise.
26606 * valtrack.c (cleanup_auto_inc_dec): Likewise.
26607 * var-tracking.c (emit_note_insn_var_location): Likewise.
26608 * config/arc/arc.h (ASM_OUTPUT_CASE_END): Use as_a <scalar_int_mode>.
26609 (ADDR_VEC_ALIGN): Likewise.
26611 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
26612 Alan Hayward <alan.hayward@arm.com>
26613 David Sherwood <david.sherwood@arm.com>
26615 * machmode.h (mode_to_bits): Return a poly_uint16 rather than an
26617 (GET_MODE_BITSIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
26618 or if measurement_type is polynomial.
26619 * calls.c (shift_return_value): Treat GET_MODE_BITSIZE as polynomial.
26620 * combine.c (make_extraction): Likewise.
26621 * dse.c (find_shift_sequence): Likewise.
26622 * dwarf2out.c (mem_loc_descriptor): Likewise.
26623 * expmed.c (store_integral_bit_field, extract_bit_field_1): Likewise.
26624 (extract_bit_field, extract_low_bits): Likewise.
26625 * expr.c (convert_move, convert_modes, emit_move_insn_1): Likewise.
26626 (optimize_bitfield_assignment_op, expand_assignment): Likewise.
26627 (store_expr_with_bounds, store_field, expand_expr_real_1): Likewise.
26628 * fold-const.c (optimize_bit_field_compare, merge_ranges): Likewise.
26629 * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
26630 * reload.c (find_reloads): Likewise.
26631 * reload1.c (alter_reg): Likewise.
26632 * stor-layout.c (bitwise_mode_for_mode, compute_record_mode): Likewise.
26633 * targhooks.c (default_secondary_memory_needed_mode): Likewise.
26634 * tree-if-conv.c (predicate_mem_writes): Likewise.
26635 * tree-ssa-strlen.c (handle_builtin_memcmp): Likewise.
26636 * tree-vect-patterns.c (adjust_bool_pattern): Likewise.
26637 * tree-vect-stmts.c (vectorizable_simd_clone_call): Likewise.
26638 * valtrack.c (dead_debug_insert_temp): Likewise.
26639 * varasm.c (mergeable_constant_section): Likewise.
26640 * config/sh/sh.h (LOCAL_ALIGNMENT): Use as_a <fixed_size_mode>.
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 * expr.c (expand_assignment): Cope with polynomial mode sizes
26647 when assigning to a CONCAT.
26649 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
26650 Alan Hayward <alan.hayward@arm.com>
26651 David Sherwood <david.sherwood@arm.com>
26653 * machmode.h (mode_precision): Change from unsigned short to
26655 (mode_to_precision): Return a poly_uint16 rather than an unsigned
26657 (GET_MODE_PRECISION): Return a constant if ONLY_FIXED_SIZE_MODES,
26658 or if measurement_type is not polynomial.
26659 (HWI_COMPUTABLE_MODE_P): Turn into a function. Optimize the case
26660 in which the mode is already known to be a scalar_int_mode.
26661 * genmodes.c (emit_mode_precision): Change the type of mode_precision
26662 from unsigned short to poly_uint16_pod. Use ZERO_COEFFS for the
26664 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
26665 for GET_MODE_PRECISION.
26666 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
26667 for GET_MODE_PRECISION.
26668 * combine.c (update_rsp_from_reg_equal): Treat GET_MODE_PRECISION
26670 (try_combine, find_split_point, combine_simplify_rtx): Likewise.
26671 (expand_field_assignment, make_extraction): Likewise.
26672 (make_compound_operation_int, record_dead_and_set_regs_1): Likewise.
26673 (get_last_value): Likewise.
26674 * convert.c (convert_to_integer_1): Likewise.
26675 * cse.c (cse_insn): Likewise.
26676 * expr.c (expand_expr_real_1): Likewise.
26677 * lra-constraints.c (simplify_operand_subreg): Likewise.
26678 * optabs-query.c (can_atomic_load_p): Likewise.
26679 * optabs.c (expand_atomic_load): Likewise.
26680 (expand_atomic_store): Likewise.
26681 * ree.c (combine_reaching_defs): Likewise.
26682 * rtl.h (partial_subreg_p, paradoxical_subreg_p): Likewise.
26683 * rtlanal.c (nonzero_bits1, lsb_bitfield_op_p): Likewise.
26684 * tree.h (type_has_mode_precision_p): Likewise.
26685 * ubsan.c (instrument_si_overflow): Likewise.
26687 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
26688 Alan Hayward <alan.hayward@arm.com>
26689 David Sherwood <david.sherwood@arm.com>
26691 * tree.h (TYPE_VECTOR_SUBPARTS): Turn into a function and handle
26692 polynomial numbers of units.
26693 (SET_TYPE_VECTOR_SUBPARTS): Likewise.
26694 (valid_vector_subparts_p): New function.
26695 (build_vector_type): Remove temporary shim and take the number
26696 of units as a poly_uint64 rather than an int.
26697 (build_opaque_vector_type): Take the number of units as a
26698 poly_uint64 rather than an int.
26699 * tree.c (build_vector_from_ctor): Handle polynomial
26700 TYPE_VECTOR_SUBPARTS.
26701 (type_hash_canon_hash, type_cache_hasher::equal): Likewise.
26702 (uniform_vector_p, vector_type_mode, build_vector): Likewise.
26703 (build_vector_from_val): If the number of units is variable,
26704 use build_vec_duplicate_cst for constant operands and
26705 VEC_DUPLICATE_EXPR otherwise.
26706 (make_vector_type): Remove temporary is_constant ().
26707 (build_vector_type, build_opaque_vector_type): Take the number of
26708 units as a poly_uint64 rather than an int.
26709 (check_vector_cst): Handle polynomial TYPE_VECTOR_SUBPARTS and
26711 * cfgexpand.c (expand_debug_expr): Likewise.
26712 * expr.c (count_type_elements, categorize_ctor_elements_1): Likewise.
26713 (store_constructor, expand_expr_real_1): Likewise.
26714 (const_scalar_mask_from_tree): Likewise.
26715 * fold-const-call.c (fold_const_reduction): Likewise.
26716 * fold-const.c (const_binop, const_unop, fold_convert_const): Likewise.
26717 (operand_equal_p, fold_vec_perm, fold_ternary_loc): Likewise.
26718 (native_encode_vector, vec_cst_ctor_to_array): Likewise.
26719 (fold_relational_const): Likewise.
26720 (native_interpret_vector): Likewise. Change the size from an
26721 int to an unsigned int.
26722 * gimple-fold.c (gimple_fold_stmt_to_constant_1): Handle polynomial
26723 TYPE_VECTOR_SUBPARTS.
26724 (gimple_fold_indirect_ref, gimple_build_vector): Likewise.
26725 (gimple_build_vector_from_val): Use VEC_DUPLICATE_EXPR when
26726 duplicating a non-constant operand into a variable-length vector.
26727 * hsa-brig.c (hsa_op_immed::emit_to_buffer): Handle polynomial
26728 TYPE_VECTOR_SUBPARTS and VECTOR_CST_NELTS.
26729 * ipa-icf.c (sem_variable::equals): Likewise.
26730 * match.pd: Likewise.
26731 * omp-simd-clone.c (simd_clone_subparts): Likewise.
26732 * print-tree.c (print_node): Likewise.
26733 * stor-layout.c (layout_type): Likewise.
26734 * targhooks.c (default_builtin_vectorization_cost): Likewise.
26735 * tree-cfg.c (verify_gimple_comparison): Likewise.
26736 (verify_gimple_assign_binary): Likewise.
26737 (verify_gimple_assign_ternary): Likewise.
26738 (verify_gimple_assign_single): Likewise.
26739 * tree-pretty-print.c (dump_generic_node): Likewise.
26740 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
26741 (simplify_bitfield_ref, is_combined_permutation_identity): Likewise.
26742 * tree-vect-data-refs.c (vect_permute_store_chain): Likewise.
26743 (vect_grouped_load_supported, vect_permute_load_chain): Likewise.
26744 (vect_shift_permute_load_chain): Likewise.
26745 * tree-vect-generic.c (nunits_for_known_piecewise_op): Likewise.
26746 (expand_vector_condition, optimize_vector_constructor): Likewise.
26747 (lower_vec_perm, get_compute_type): Likewise.
26748 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
26749 (get_initial_defs_for_reduction, vect_transform_loop): Likewise.
26750 * tree-vect-patterns.c (vect_recog_bool_pattern): Likewise.
26751 (vect_recog_mask_conversion_pattern): Likewise.
26752 * tree-vect-slp.c (vect_supported_load_permutation_p): Likewise.
26753 (vect_get_constant_vectors, vect_transform_slp_perm_load): Likewise.
26754 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
26755 (get_group_load_store_type, vectorizable_mask_load_store): Likewise.
26756 (vectorizable_bswap, simd_clone_subparts, vectorizable_assignment)
26757 (vectorizable_shift, vectorizable_operation, vectorizable_store)
26758 (vectorizable_load, vect_is_simple_cond, vectorizable_comparison)
26759 (supportable_widening_operation): Likewise.
26760 (supportable_narrowing_operation): Likewise.
26761 * tree-vector-builder.c (tree_vector_builder::binary_encoded_nelts):
26763 * varasm.c (output_constant): 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 * tree-vect-data-refs.c (vect_permute_store_chain): Reorganize
26770 so that both the length == 3 and length != 3 cases set up their
26771 own permute vectors. Add comments explaining why we know the
26772 number of elements is constant.
26773 (vect_permute_load_chain): Likewise.
26775 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
26776 Alan Hayward <alan.hayward@arm.com>
26777 David Sherwood <david.sherwood@arm.com>
26779 * machmode.h (mode_nunits): Change from unsigned char to
26781 (ONLY_FIXED_SIZE_MODES): New macro.
26782 (pod_mode::measurement_type, scalar_int_mode::measurement_type)
26783 (scalar_float_mode::measurement_type, scalar_mode::measurement_type)
26784 (complex_mode::measurement_type, fixed_size_mode::measurement_type):
26786 (mode_to_nunits): Return a poly_uint16 rather than an unsigned short.
26787 (GET_MODE_NUNITS): Return a constant if ONLY_FIXED_SIZE_MODES,
26788 or if measurement_type is not polynomial.
26789 * genmodes.c (ZERO_COEFFS): New macro.
26790 (emit_mode_nunits_inline): Make mode_nunits_inline return a
26792 (emit_mode_nunits): Change the type of mode_nunits to poly_uint16_pod.
26793 Use ZERO_COEFFS when emitting initializers.
26794 * data-streamer.h (bp_pack_poly_value): New function.
26795 (bp_unpack_poly_value): Likewise.
26796 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
26797 for GET_MODE_NUNITS.
26798 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
26799 for GET_MODE_NUNITS.
26800 * tree.c (make_vector_type): Remove temporary shim and make
26801 the real function take the number of units as a poly_uint64
26802 rather than an int.
26803 (build_vector_type_for_mode): Handle polynomial nunits.
26804 * dwarf2out.c (loc_descriptor, add_const_value_attribute): Likewise.
26805 * emit-rtl.c (const_vec_series_p_1): Likewise.
26806 (gen_rtx_CONST_VECTOR): Likewise.
26807 * fold-const.c (test_vec_duplicate_folding): Likewise.
26808 * genrecog.c (validate_pattern): Likewise.
26809 * optabs-query.c (can_vec_perm_var_p, can_mult_highpart_p): Likewise.
26810 * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
26811 * optabs.c (expand_vector_broadcast, expand_binop_directly): Likewise.
26812 (shift_amt_for_vec_perm_mask, expand_vec_perm_var): Likewise.
26813 (expand_vec_cond_expr, expand_mult_highpart): Likewise.
26814 * rtlanal.c (subreg_get_info): Likewise.
26815 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
26816 (vect_grouped_load_supported): Likewise.
26817 * tree-vect-generic.c (type_for_widest_vector_mode): Likewise.
26818 * tree-vect-loop.c (have_whole_vector_shift): Likewise.
26819 * simplify-rtx.c (simplify_unary_operation_1): Likewise.
26820 (simplify_const_unary_operation, simplify_binary_operation_1)
26821 (simplify_const_binary_operation, simplify_ternary_operation)
26822 (test_vector_ops_duplicate, test_vector_ops): Likewise.
26823 (simplify_immed_subreg): Use GET_MODE_NUNITS on a fixed_size_mode
26824 instead of CONST_VECTOR_NUNITS.
26825 * varasm.c (output_constant_pool_2): Likewise.
26826 * rtx-vector-builder.c (rtx_vector_builder::build): Only include the
26827 explicit-encoded elements in the XVEC for variable-length vectors.
26829 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
26831 * lra-constraints.c (curr_insn_transform): Use partial_subreg_p.
26833 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
26834 Alan Hayward <alan.hayward@arm.com>
26835 David Sherwood <david.sherwood@arm.com>
26837 * coretypes.h (fixed_size_mode): Declare.
26838 (fixed_size_mode_pod): New typedef.
26839 * builtins.h (target_builtins::x_apply_args_mode)
26840 (target_builtins::x_apply_result_mode): Change type to
26841 fixed_size_mode_pod.
26842 * builtins.c (apply_args_size, apply_result_size, result_vector)
26843 (expand_builtin_apply_args_1, expand_builtin_apply)
26844 (expand_builtin_return): Update accordingly.
26846 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
26848 * cse.c (hash_rtx_cb): Hash only the encoded elements.
26849 * cselib.c (cselib_hash_rtx): Likewise.
26850 * expmed.c (make_tree): Build VECTOR_CSTs directly from the
26851 CONST_VECTOR encoding.
26853 2018-01-03 Jakub Jelinek <jakub@redhat.com>
26854 Jeff Law <law@redhat.com>
26857 * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): For
26858 noreturn probe, use gen_pop instead of ix86_emit_restore_reg_using_pop,
26859 only set RTX_FRAME_RELATED_P on both the push and pop if cfa_reg is sp
26860 and add REG_CFA_ADJUST_CFA notes in that case to both insns.
26863 * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): Do not
26864 explicitly probe *sp in a noreturn function if there were any callee
26865 register saves or frame pointer is needed.
26867 2018-01-03 Jakub Jelinek <jakub@redhat.com>
26870 * cfgexpand.c (expand_debug_expr): Return NULL if mode is
26871 BLKmode for ternary, binary or unary expressions.
26874 * var-tracking.c (delete_vta_debug_insn): New inline function.
26875 (delete_vta_debug_insns): Add USE_CFG argument, if true, walk just
26876 insns from get_insns () to NULL instead of each bb separately.
26877 Use delete_vta_debug_insn. No longer static.
26878 (vt_debug_insns_local, variable_tracking_main_1): Adjust
26879 delete_vta_debug_insns callers.
26880 * rtl.h (delete_vta_debug_insns): Declare.
26881 * final.c (rest_of_handle_final): Call delete_vta_debug_insns
26882 instead of variable_tracking_main.
26884 2018-01-03 Martin Sebor <msebor@redhat.com>
26886 PR tree-optimization/83603
26887 * calls.c (maybe_warn_nonstring_arg): Avoid accessing function
26888 arguments past the endof the argument list in functions declared
26889 without a prototype.
26890 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call):
26891 Avoid checking when arguments are null.
26893 2018-01-03 Martin Sebor <msebor@redhat.com>
26896 * doc/extend.texi (attribute const): Fix a typo.
26897 * ipa-pure-const.c ((warn_function_const, warn_function_pure): Avoid
26898 issuing -Wsuggest-attribute for void functions.
26900 2018-01-03 Martin Sebor <msebor@redhat.com>
26902 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Use
26903 offset_int::from instead of wide_int::to_shwi.
26904 (maybe_diag_overlap): Remove assertion.
26905 Use HOST_WIDE_INT_PRINT_DEC instead of %lli.
26906 * gimple-ssa-sprintf.c (format_directive): Same.
26907 (parse_directive): Same.
26908 (sprintf_dom_walker::compute_format_length): Same.
26909 (try_substitute_return_value): Same.
26911 2018-01-03 Jeff Law <law@redhat.com>
26913 PR middle-end/83654
26914 * explow.c (anti_adjust_stack_and_probe_stack_clash): Test a
26915 non-constant residual for zero at runtime and avoid probing in
26916 that case. Reorganize code for trailing problem to mirror handling
26919 2018-01-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
26921 PR tree-optimization/83501
26922 * tree-ssa-strlen.c (get_string_cst): New.
26923 (handle_char_store): Call get_string_cst.
26925 2018-01-03 Martin Liska <mliska@suse.cz>
26927 PR tree-optimization/83593
26928 * tree-ssa-strlen.c: Include tree-cfg.h.
26929 (strlen_check_and_optimize_stmt): Add new argument cleanup_eh.
26930 (strlen_dom_walker): Add new member variable m_cleanup_cfg.
26931 (strlen_dom_walker::strlen_dom_walker): Initialize m_cleanup_cfg
26933 (strlen_dom_walker::before_dom_children): Call
26934 gimple_purge_dead_eh_edges. Dump tranformation with details
26936 (strlen_dom_walker::before_dom_children): Update call by adding
26937 new argument cleanup_eh.
26938 (pass_strlen::execute): Return TODO_cleanup_cfg if needed.
26940 2018-01-03 Martin Liska <mliska@suse.cz>
26943 * cif-code.def (VARIADIC_THUNK): New enum value.
26944 * ipa-fnsummary.c (compute_fn_summary): Do not inline variadic
26947 2018-01-03 Jan Beulich <jbeulich@suse.com>
26949 * sse.md (mov<mode>_internal): Tighten condition for when to use
26950 vmovdqu<ssescalarsize> for TI and OI modes.
26952 2018-01-03 Jakub Jelinek <jakub@redhat.com>
26954 Update copyright years.
26956 2018-01-03 Martin Liska <mliska@suse.cz>
26959 * ipa-visibility.c (function_and_variable_visibility): Skip
26960 functions with noipa attribure.
26962 2018-01-03 Jakub Jelinek <jakub@redhat.com>
26964 * gcc.c (process_command): Update copyright notice dates.
26965 * gcov-dump.c (print_version): Ditto.
26966 * gcov.c (print_version): Ditto.
26967 * gcov-tool.c (print_version): Ditto.
26968 * gengtype.c (create_file): Ditto.
26969 * doc/cpp.texi: Bump @copying's copyright year.
26970 * doc/cppinternals.texi: Ditto.
26971 * doc/gcc.texi: Ditto.
26972 * doc/gccint.texi: Ditto.
26973 * doc/gcov.texi: Ditto.
26974 * doc/install.texi: Ditto.
26975 * doc/invoke.texi: Ditto.
26977 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
26979 * vector-builder.h (vector_builder::m_full_nelts): Change from
26980 unsigned int to poly_uint64.
26981 (vector_builder::full_nelts): Update prototype accordingly.
26982 (vector_builder::new_vector): Likewise.
26983 (vector_builder::encoded_full_vector_p): Handle polynomial full_nelts.
26984 (vector_builder::operator ==): Likewise.
26985 (vector_builder::finalize): Likewise.
26986 * int-vector-builder.h (int_vector_builder::int_vector_builder):
26987 Take the number of elements as a poly_uint64 rather than an
26989 * vec-perm-indices.h (vec_perm_indices::m_nelts_per_input): Change
26990 from unsigned int to poly_uint64.
26991 (vec_perm_indices::vec_perm_indices): Update prototype accordingly.
26992 (vec_perm_indices::new_vector): Likewise.
26993 (vec_perm_indices::length): Likewise.
26994 (vec_perm_indices::nelts_per_input): Likewise.
26995 (vec_perm_indices::input_nelts): Likewise.
26996 * vec-perm-indices.c (vec_perm_indices::new_vector): Take the
26997 number of elements per input as a poly_uint64 rather than an
26998 unsigned int. Use the original encoding for variable-length
26999 vectors, rather than clamping each individual element.
27000 For the second and subsequent elements in each pattern,
27001 clamp the step and base before clamping their sum.
27002 (vec_perm_indices::series_p): Handle polynomial element counts.
27003 (vec_perm_indices::all_in_range_p): Likewise.
27004 (vec_perm_indices_to_tree): Likewise.
27005 (vec_perm_indices_to_rtx): Likewise.
27006 * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise.
27007 * tree-vector-builder.c (tree_vector_builder::new_unary_operation)
27008 (tree_vector_builder::new_binary_operation): Handle polynomial
27009 element counts. Return false if we need to know the number
27010 of elements at compile time.
27011 * fold-const.c (fold_vec_perm): Punt if the number of elements
27012 isn't known at compile time.
27014 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27016 * vec-perm-indices.h (vec_perm_builder): Change element type
27017 from HOST_WIDE_INT to poly_int64.
27018 (vec_perm_indices::element_type): Update accordingly.
27019 (vec_perm_indices::clamp): Handle polynomial element_types.
27020 * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
27021 (vec_perm_indices::all_in_range_p): Likewise.
27022 (tree_to_vec_perm_builder): Check for poly_int64 trees rather
27024 * vector-builder.h (vector_builder::stepped_sequence_p): Handle
27025 polynomial vec_perm_indices element types.
27026 * int-vector-builder.h (int_vector_builder::equal_p): Likewise.
27027 * fold-const.c (fold_vec_perm): Likewise.
27028 * optabs.c (shift_amt_for_vec_perm_mask): Likewise.
27029 * tree-vect-generic.c (lower_vec_perm): Likewise.
27030 * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
27031 * config/aarch64/aarch64.c (aarch64_evpc_tbl): Cast d->perm
27032 element type to HOST_WIDE_INT.
27034 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27035 Alan Hayward <alan.hayward@arm.com>
27036 David Sherwood <david.sherwood@arm.com>
27038 * alias.c (addr_side_effect_eval): Take the size as a poly_int64
27039 rather than an int. Use plus_constant.
27040 (memrefs_conflict_p): Take the sizes as poly_int64s rather than ints.
27041 Take the offset "c" as a poly_int64 rather than a HOST_WIDE_INT.
27043 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27044 Alan Hayward <alan.hayward@arm.com>
27045 David Sherwood <david.sherwood@arm.com>
27047 * calls.c (emit_call_1, expand_call): Change struct_value_size from
27048 a HOST_WIDE_INT to a poly_int64.
27050 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27051 Alan Hayward <alan.hayward@arm.com>
27052 David Sherwood <david.sherwood@arm.com>
27054 * calls.c (load_register_parameters): Cope with polynomial
27055 mode sizes. Require a constant size for BLKmode parameters
27056 that aren't described by a PARALLEL. If BLOCK_REG_PADDING
27057 forces a parameter to be padded at the lsb end in order to
27058 fill a complete number of words, require the parameter size
27059 to be ordered wrt UNITS_PER_WORD.
27061 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27062 Alan Hayward <alan.hayward@arm.com>
27063 David Sherwood <david.sherwood@arm.com>
27065 * reload1.c (spill_stack_slot_width): Change element type
27066 from unsigned int to poly_uint64_pod.
27067 (alter_reg): Treat mode sizes as polynomial.
27069 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27070 Alan Hayward <alan.hayward@arm.com>
27071 David Sherwood <david.sherwood@arm.com>
27073 * reload.c (complex_word_subreg_p): New function.
27074 (reload_inner_reg_of_subreg, push_reload): Use it.
27076 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27077 Alan Hayward <alan.hayward@arm.com>
27078 David Sherwood <david.sherwood@arm.com>
27080 * lra-constraints.c (process_alt_operands): Reject matched
27081 operands whose sizes aren't ordered.
27082 (match_reload): Refer to this check here.
27084 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27085 Alan Hayward <alan.hayward@arm.com>
27086 David Sherwood <david.sherwood@arm.com>
27088 * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Assert
27089 that the mode size is in the set {1, 2, 4, 8, 16}.
27091 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27092 Alan Hayward <alan.hayward@arm.com>
27093 David Sherwood <david.sherwood@arm.com>
27095 * var-tracking.c (adjust_mems): Treat mode sizes as polynomial.
27096 Use plus_constant instead of gen_rtx_PLUS.
27098 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27099 Alan Hayward <alan.hayward@arm.com>
27100 David Sherwood <david.sherwood@arm.com>
27102 * config/cr16/cr16-protos.h (cr16_push_rounding): Declare.
27103 * config/cr16/cr16.h (PUSH_ROUNDING): Move implementation to...
27104 * config/cr16/cr16.c (cr16_push_rounding): ...this new function.
27105 * config/h8300/h8300-protos.h (h8300_push_rounding): Declare.
27106 * config/h8300/h8300.h (PUSH_ROUNDING): Move implementation to...
27107 * config/h8300/h8300.c (h8300_push_rounding): ...this new function.
27108 * config/i386/i386-protos.h (ix86_push_rounding): Declare.
27109 * config/i386/i386.h (PUSH_ROUNDING): Move implementation to...
27110 * config/i386/i386.c (ix86_push_rounding): ...this new function.
27111 * config/m32c/m32c-protos.h (m32c_push_rounding): Take and return
27113 * config/m32c/m32c.c (m32c_push_rounding): Likewise.
27114 * config/m68k/m68k-protos.h (m68k_push_rounding): Declare.
27115 * config/m68k/m68k.h (PUSH_ROUNDING): Move implementation to...
27116 * config/m68k/m68k.c (m68k_push_rounding): ...this new function.
27117 * config/pdp11/pdp11-protos.h (pdp11_push_rounding): Declare.
27118 * config/pdp11/pdp11.h (PUSH_ROUNDING): Move implementation to...
27119 * config/pdp11/pdp11.c (pdp11_push_rounding): ...this new function.
27120 * config/stormy16/stormy16-protos.h (xstormy16_push_rounding): Declare.
27121 * config/stormy16/stormy16.h (PUSH_ROUNDING): Move implementation to...
27122 * config/stormy16/stormy16.c (xstormy16_push_rounding): ...this new
27124 * expr.c (emit_move_resolve_push): Treat the input and result
27125 of PUSH_ROUNDING as a poly_int64.
27126 (emit_move_complex_push, emit_single_push_insn_1): Likewise.
27127 (emit_push_insn): Likewise.
27128 * lra-eliminations.c (mark_not_eliminable): Likewise.
27129 * recog.c (push_operand): Likewise.
27130 * reload1.c (elimination_effects): Likewise.
27131 * rtlanal.c (nonzero_bits1): Likewise.
27132 * calls.c (store_one_arg): Likewise. Require the padding to be
27133 known at compile time.
27135 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27136 Alan Hayward <alan.hayward@arm.com>
27137 David Sherwood <david.sherwood@arm.com>
27139 * expr.c (emit_single_push_insn_1): Treat mode sizes as polynomial.
27140 Use plus_constant instead of gen_rtx_PLUS.
27142 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27143 Alan Hayward <alan.hayward@arm.com>
27144 David Sherwood <david.sherwood@arm.com>
27146 * auto-inc-dec.c (set_inc_state): Take the mode size as a poly_int64
27147 rather than an int.
27149 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27150 Alan Hayward <alan.hayward@arm.com>
27151 David Sherwood <david.sherwood@arm.com>
27153 * expr.c (expand_expr_real_1): Use tree_to_poly_uint64
27154 instead of int_size_in_bytes when handling VIEW_CONVERT_EXPRs
27155 via stack temporaries. Treat the mode size as polynomial too.
27157 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27158 Alan Hayward <alan.hayward@arm.com>
27159 David Sherwood <david.sherwood@arm.com>
27161 * expr.c (expand_expr_real_2): When handling conversions involving
27162 unions, apply tree_to_poly_uint64 to the TYPE_SIZE rather than
27163 multiplying int_size_in_bytes by BITS_PER_UNIT. Treat GET_MODE_BISIZE
27164 as a poly_uint64 too.
27166 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27167 Alan Hayward <alan.hayward@arm.com>
27168 David Sherwood <david.sherwood@arm.com>
27170 * rtlanal.c (subreg_get_info): Handle polynomial mode sizes.
27172 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27173 Alan Hayward <alan.hayward@arm.com>
27174 David Sherwood <david.sherwood@arm.com>
27176 * combine.c (can_change_dest_mode): Handle polynomial
27177 REGMODE_NATURAL_SIZE.
27178 * expmed.c (store_bit_field_1): Likewise.
27179 * expr.c (store_constructor): Likewise.
27180 * emit-rtl.c (validate_subreg): Operate on polynomial mode sizes
27181 and polynomial REGMODE_NATURAL_SIZE.
27182 (gen_lowpart_common): Likewise.
27183 * reginfo.c (record_subregs_of_mode): Likewise.
27184 * rtlanal.c (read_modify_subreg_p): Likewise.
27186 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27187 Alan Hayward <alan.hayward@arm.com>
27188 David Sherwood <david.sherwood@arm.com>
27190 * internal-fn.c (expand_vector_ubsan_overflow): Handle polynomial
27191 numbers of elements.
27193 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27194 Alan Hayward <alan.hayward@arm.com>
27195 David Sherwood <david.sherwood@arm.com>
27197 * match.pd: Cope with polynomial numbers of vector elements.
27199 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27200 Alan Hayward <alan.hayward@arm.com>
27201 David Sherwood <david.sherwood@arm.com>
27203 * fold-const.c (fold_indirect_ref_1): Handle polynomial offsets
27204 in a POINTER_PLUS_EXPR.
27206 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27207 Alan Hayward <alan.hayward@arm.com>
27208 David Sherwood <david.sherwood@arm.com>
27210 * omp-simd-clone.c (simd_clone_subparts): New function.
27211 (simd_clone_init_simd_arrays): Use it instead of TYPE_VECTOR_SUBPARTS.
27212 (ipa_simd_modify_function_body): Likewise.
27214 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27215 Alan Hayward <alan.hayward@arm.com>
27216 David Sherwood <david.sherwood@arm.com>
27218 * tree-vect-generic.c (nunits_for_known_piecewise_op): New function.
27219 (expand_vector_piecewise): Use it instead of TYPE_VECTOR_SUBPARTS.
27220 (expand_vector_addition, add_rshift, expand_vector_divmod): Likewise.
27221 (expand_vector_condition, vector_element): Likewise.
27222 (subparts_gt): New function.
27223 (get_compute_type): Use subparts_gt.
27224 (count_type_subparts): Delete.
27225 (expand_vector_operations_1): Use subparts_gt instead of
27226 count_type_subparts.
27228 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27229 Alan Hayward <alan.hayward@arm.com>
27230 David Sherwood <david.sherwood@arm.com>
27232 * tree-vect-data-refs.c (vect_no_alias_p): Replace with...
27233 (vect_compile_time_alias): ...this new function. Do the calculation
27234 on poly_ints rather than trees.
27235 (vect_prune_runtime_alias_test_list): Update call accordingly.
27237 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27238 Alan Hayward <alan.hayward@arm.com>
27239 David Sherwood <david.sherwood@arm.com>
27241 * tree-vect-slp.c (vect_build_slp_tree_1): Handle polynomial
27243 (vect_schedule_slp_instance): Likewise.
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 * tree-vect-slp.c (vect_get_and_check_slp_defs): Reject
27250 constant and extern definitions for variable-length vectors.
27251 (vect_get_constant_vectors): Note that the number of units
27252 is known to be constant.
27254 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27255 Alan Hayward <alan.hayward@arm.com>
27256 David Sherwood <david.sherwood@arm.com>
27258 * tree-vect-stmts.c (vectorizable_conversion): Treat the number
27259 of units as polynomial. Choose between WIDE and NARROW based
27262 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27263 Alan Hayward <alan.hayward@arm.com>
27264 David Sherwood <david.sherwood@arm.com>
27266 * tree-vect-stmts.c (simd_clone_subparts): New function.
27267 (vectorizable_simd_clone_call): Use it instead of TYPE_VECTOR_SUBPARTS.
27269 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27270 Alan Hayward <alan.hayward@arm.com>
27271 David Sherwood <david.sherwood@arm.com>
27273 * tree-vect-stmts.c (vectorizable_call): Treat the number of
27274 vectors as polynomial. Use build_index_vector for
27275 IFN_GOMP_SIMD_LANE.
27277 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27278 Alan Hayward <alan.hayward@arm.com>
27279 David Sherwood <david.sherwood@arm.com>
27281 * tree-vect-stmts.c (get_load_store_type): Treat the number of
27282 units as polynomial. Reject VMAT_ELEMENTWISE and VMAT_STRIDED_SLP
27283 for variable-length vectors.
27284 (vectorizable_mask_load_store): Treat the number of units as
27285 polynomial, asserting that it is constant if the condition has
27286 already been enforced.
27287 (vectorizable_store, vectorizable_load): Likewise.
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 * tree-vect-loop.c (vectorizable_live_operation): Treat the number
27294 of units as polynomial. Punt if we can't tell at compile time
27295 which vector contains the final result.
27297 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27298 Alan Hayward <alan.hayward@arm.com>
27299 David Sherwood <david.sherwood@arm.com>
27301 * tree-vect-loop.c (vectorizable_induction): Treat the number
27302 of units as polynomial. Punt on SLP inductions. Use an integer
27303 VEC_SERIES_EXPR for variable-length integer reductions. Use a
27304 cast of such a series for variable-length floating-point
27307 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27308 Alan Hayward <alan.hayward@arm.com>
27309 David Sherwood <david.sherwood@arm.com>
27311 * tree.h (build_index_vector): Declare.
27312 * tree.c (build_index_vector): New function.
27313 * tree-vect-loop.c (get_initial_defs_for_reduction): Treat the number
27314 of units as polynomial, forcibly converting it to a constant if
27315 vectorizable_reduction has already enforced the condition.
27316 (vect_create_epilog_for_reduction): Likewise. Use build_index_vector
27317 to create a {1,2,3,...} vector.
27318 (vectorizable_reduction): Treat the number of units as polynomial.
27319 Choose vectype_in based on the largest scalar element size rather
27320 than the smallest number of units. Enforce the restrictions
27323 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27324 Alan Hayward <alan.hayward@arm.com>
27325 David Sherwood <david.sherwood@arm.com>
27327 * tree-vect-data-refs.c (vector_alignment_reachable_p): Treat the
27328 number of units as polynomial.
27330 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27331 Alan Hayward <alan.hayward@arm.com>
27332 David Sherwood <david.sherwood@arm.com>
27334 * target.h (vector_sizes, auto_vector_sizes): New typedefs.
27335 * target.def (autovectorize_vector_sizes): Return the vector sizes
27336 by pointer, using vector_sizes rather than a bitmask.
27337 * targhooks.h (default_autovectorize_vector_sizes): Update accordingly.
27338 * targhooks.c (default_autovectorize_vector_sizes): Likewise.
27339 * config/aarch64/aarch64.c (aarch64_autovectorize_vector_sizes):
27341 * config/arc/arc.c (arc_autovectorize_vector_sizes): Likewise.
27342 * config/arm/arm.c (arm_autovectorize_vector_sizes): Likewise.
27343 * config/i386/i386.c (ix86_autovectorize_vector_sizes): Likewise.
27344 * config/mips/mips.c (mips_autovectorize_vector_sizes): Likewise.
27345 * omp-general.c (omp_max_vf): Likewise.
27346 * omp-low.c (omp_clause_aligned_alignment): Likewise.
27347 * optabs-query.c (can_vec_mask_load_store_p): Likewise.
27348 * tree-vect-loop.c (vect_analyze_loop): Likewise.
27349 * tree-vect-slp.c (vect_slp_bb): Likewise.
27350 * doc/tm.texi: Regenerate.
27351 * tree-vectorizer.h (current_vector_size): Change from an unsigned int
27353 * tree-vect-stmts.c (get_vectype_for_scalar_type_and_size): Take
27354 the vector size as a poly_uint64 rather than an unsigned int.
27355 (current_vector_size): Change from an unsigned int to a poly_uint64.
27356 (get_vectype_for_scalar_type): Update accordingly.
27357 * tree.h (build_truth_vector_type): Take the size and number of
27358 units as a poly_uint64 rather than an unsigned int.
27359 (build_vector_type): Add a temporary overload that takes
27360 the number of units as a poly_uint64 rather than an unsigned int.
27361 * tree.c (make_vector_type): Likewise.
27362 (build_truth_vector_type): Take the number of units as a poly_uint64
27363 rather than an unsigned int.
27365 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27366 Alan Hayward <alan.hayward@arm.com>
27367 David Sherwood <david.sherwood@arm.com>
27369 * target.def (get_mask_mode): Take the number of units and length
27370 as poly_uint64s rather than unsigned ints.
27371 * targhooks.h (default_get_mask_mode): Update accordingly.
27372 * targhooks.c (default_get_mask_mode): Likewise.
27373 * config/i386/i386.c (ix86_get_mask_mode): Likewise.
27374 * doc/tm.texi: Regenerate.
27376 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27377 Alan Hayward <alan.hayward@arm.com>
27378 David Sherwood <david.sherwood@arm.com>
27380 * omp-general.h (omp_max_vf): Return a poly_uint64 instead of an int.
27381 * omp-general.c (omp_max_vf): Likewise.
27382 * omp-expand.c (omp_adjust_chunk_size): Update call to omp_max_vf.
27383 (expand_omp_simd): Handle polynomial safelen.
27384 * omp-low.c (omplow_simd_context): Add a default constructor.
27385 (omplow_simd_context::max_vf): Change from int to poly_uint64.
27386 (lower_rec_simd_input_clauses): Update accordingly.
27387 (lower_rec_input_clauses): Likewise.
27389 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27390 Alan Hayward <alan.hayward@arm.com>
27391 David Sherwood <david.sherwood@arm.com>
27393 * tree-vectorizer.h (vect_nunits_for_cost): New function.
27394 * tree-vect-loop.c (vect_model_reduction_cost): Use it.
27395 * tree-vect-slp.c (vect_analyze_slp_cost_1): Likewise.
27396 (vect_analyze_slp_cost): Likewise.
27397 * tree-vect-stmts.c (vect_model_store_cost): Likewise.
27398 (vect_model_load_cost): Likewise.
27400 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27401 Alan Hayward <alan.hayward@arm.com>
27402 David Sherwood <david.sherwood@arm.com>
27404 * tree-vect-slp.c (vect_record_max_nunits, vect_build_slp_tree_1)
27405 (vect_build_slp_tree_2, vect_build_slp_tree): Change max_nunits
27406 from an unsigned int * to a poly_uint64_pod *.
27407 (calculate_unrolling_factor): New function.
27408 (vect_analyze_slp_instance): Use it. Track polynomial max_nunits.
27410 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27411 Alan Hayward <alan.hayward@arm.com>
27412 David Sherwood <david.sherwood@arm.com>
27414 * tree-vectorizer.h (_slp_instance::unrolling_factor): Change
27415 from an unsigned int to a poly_uint64.
27416 (_loop_vec_info::slp_unrolling_factor): Likewise.
27417 (_loop_vec_info::vectorization_factor): Change from an int
27419 (MAX_VECTORIZATION_FACTOR): Bump from 64 to INT_MAX.
27420 (vect_get_num_vectors): New function.
27421 (vect_update_max_nunits, vect_vf_for_cost): Likewise.
27422 (vect_get_num_copies): Use vect_get_num_vectors.
27423 (vect_analyze_data_ref_dependences): Change max_vf from an int *
27424 to an unsigned int *.
27425 (vect_analyze_data_refs): Change min_vf from an int * to a
27427 (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
27428 than an unsigned HOST_WIDE_INT.
27429 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
27430 (vect_analyze_data_ref_dependence): Change max_vf from an int *
27431 to an unsigned int *.
27432 (vect_analyze_data_ref_dependences): Likewise.
27433 (vect_compute_data_ref_alignment): Handle polynomial vf.
27434 (vect_enhance_data_refs_alignment): Likewise.
27435 (vect_prune_runtime_alias_test_list): Likewise.
27436 (vect_shift_permute_load_chain): Likewise.
27437 (vect_supportable_dr_alignment): Likewise.
27438 (dependence_distance_ge_vf): Take the vectorization factor as a
27439 poly_uint64 rather than an unsigned HOST_WIDE_INT.
27440 (vect_analyze_data_refs): Change min_vf from an int * to a
27442 * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Take
27443 vfm1 as a poly_uint64 rather than an int. Make the same change
27444 for the returned bound_scalar.
27445 (vect_gen_vector_loop_niters): Handle polynomial vf.
27446 (vect_do_peeling): Likewise. Update call to
27447 vect_gen_scalar_loop_niters and handle polynomial bound_scalars.
27448 (vect_gen_vector_loop_niters_mult_vf): Assert that the vf must
27450 * tree-vect-loop.c (vect_determine_vectorization_factor)
27451 (vect_update_vf_for_slp, vect_analyze_loop_2): Handle polynomial vf.
27452 (vect_get_known_peeling_cost): Likewise.
27453 (vect_estimate_min_profitable_iters, vectorizable_reduction): Likewise.
27454 (vect_worthwhile_without_simd_p, vectorizable_induction): Likewise.
27455 (vect_transform_loop): Likewise. Use the lowest possible VF when
27456 updating the upper bounds of the loop.
27457 (vect_min_worthwhile_factor): Make static. Return an unsigned int
27458 rather than an int.
27459 * tree-vect-slp.c (vect_attempt_slp_rearrange_stmts): Cope with
27460 polynomial unroll factors.
27461 (vect_analyze_slp_cost_1, vect_analyze_slp_instance): Likewise.
27462 (vect_make_slp_decision): Likewise.
27463 (vect_supported_load_permutation_p): Likewise, and polynomial
27465 (vect_analyze_slp_cost): Handle polynomial vf.
27466 (vect_slp_analyze_node_operations): Likewise.
27467 (vect_slp_analyze_bb_1): Likewise.
27468 (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
27469 than an unsigned HOST_WIDE_INT.
27470 * tree-vect-stmts.c (vectorizable_simd_clone_call, vectorizable_store)
27471 (vectorizable_load): Handle polynomial vf.
27472 * tree-vectorizer.c (simduid_to_vf::vf): Change from an int to
27474 (adjust_simduid_builtins, shrink_simd_arrays): Update accordingly.
27476 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27477 Alan Hayward <alan.hayward@arm.com>
27478 David Sherwood <david.sherwood@arm.com>
27480 * match.pd: Handle bit operations involving three constants
27481 and try to fold one pair.
27483 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27485 * tree-vect-loop-manip.c: Include gimple-fold.h.
27486 (slpeel_make_loop_iterate_ntimes): Add step, final_iv and
27487 niters_maybe_zero parameters. Handle other cases besides a step of 1.
27488 (vect_gen_vector_loop_niters): Add a step_vector_ptr parameter.
27489 Add a path that uses a step of VF instead of 1, but disable it
27491 (vect_do_peeling): Add step_vector, niters_vector_mult_vf_var
27492 and niters_no_overflow parameters. Update calls to
27493 slpeel_make_loop_iterate_ntimes and vect_gen_vector_loop_niters.
27494 Create a new SSA name if the latter choses to use a ste other
27495 than zero, and return it via niters_vector_mult_vf_var.
27496 * tree-vect-loop.c (vect_transform_loop): Update calls to
27497 vect_do_peeling, vect_gen_vector_loop_niters and
27498 slpeel_make_loop_iterate_ntimes.
27499 * tree-vectorizer.h (slpeel_make_loop_iterate_ntimes, vect_do_peeling)
27500 (vect_gen_vector_loop_niters): Update declarations after above changes.
27502 2018-01-02 Michael Meissner <meissner@linux.vnet.ibm.com>
27504 * config/rs6000/rs6000.md (floor<mode>2): Add support for IEEE
27505 128-bit round to integer instructions.
27506 (ceil<mode>2): Likewise.
27507 (btrunc<mode>2): Likewise.
27508 (round<mode>2): Likewise.
27510 2018-01-02 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
27512 * config/rs6000/rs6000-string.c (expand_block_move): Allow the use of
27513 unaligned VSX load/store on P8/P9.
27514 (expand_block_clear): Allow the use of unaligned VSX
27515 load/store on P8/P9.
27517 2018-01-02 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
27519 * config/rs6000/rs6000-p8swap.c (swap_feeds_both_load_and_store):
27521 (rs6000_analyze_swaps): Mark a web unoptimizable if it contains a
27522 swap associated with both a load and a store.
27524 2018-01-02 Andrew Waterman <andrew@sifive.com>
27526 * config/riscv/linux.h (ICACHE_FLUSH_FUNC): New.
27527 * config/riscv/riscv.md (clear_cache): Use it.
27529 2018-01-02 Artyom Skrobov <tyomitch@gmail.com>
27531 * web.c: Remove out-of-date comment.
27533 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
27535 * expr.c (fixup_args_size_notes): Check that any existing
27536 REG_ARGS_SIZE notes are correct, and don't try to re-add them.
27537 (emit_single_push_insn_1): Move stack_pointer_delta adjustment to...
27538 (emit_single_push_insn): ...here.
27540 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
27542 * rtl.h (CONST_VECTOR_ELT): Redefine to const_vector_elt.
27543 (const_vector_encoded_nelts): New function.
27544 (CONST_VECTOR_NUNITS): Redefine to use GET_MODE_NUNITS.
27545 (const_vector_int_elt, const_vector_elt): Declare.
27546 * emit-rtl.c (const_vector_int_elt_1): New function.
27547 (const_vector_elt): Likewise.
27548 * simplify-rtx.c (simplify_immed_subreg): Avoid taking the address
27549 of CONST_VECTOR_ELT.
27551 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
27553 * expr.c: Include rtx-vector-builder.h.
27554 (const_vector_mask_from_tree): Use rtx_vector_builder and operate
27555 directly on the tree encoding.
27556 (const_vector_from_tree): Likewise.
27557 * optabs.c: Include rtx-vector-builder.h.
27558 (expand_vec_perm_var): Use rtx_vector_builder and create a repeating
27559 sequence of "u" values.
27560 * vec-perm-indices.c: Include rtx-vector-builder.h.
27561 (vec_perm_indices_to_rtx): Use rtx_vector_builder and operate
27562 directly on the vec_perm_indices encoding.
27564 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
27566 * doc/rtl.texi (const_vector): Describe new encoding scheme.
27567 * Makefile.in (OBJS): Add rtx-vector-builder.o.
27568 * rtx-vector-builder.h: New file.
27569 * rtx-vector-builder.c: Likewise.
27570 * rtl.h (rtx_def::u2): Add a const_vector field.
27571 (CONST_VECTOR_NPATTERNS): New macro.
27572 (CONST_VECTOR_NELTS_PER_PATTERN): Likewise.
27573 (CONST_VECTOR_DUPLICATE_P): Likewise.
27574 (CONST_VECTOR_STEPPED_P): Likewise.
27575 (CONST_VECTOR_ENCODED_ELT): Likewise.
27576 (const_vec_duplicate_p): Check for a duplicated vector encoding.
27577 (unwrap_const_vec_duplicate): Likewise.
27578 (const_vec_series_p): Check for a non-duplicated vector encoding.
27579 Say that the function only returns true for integer vectors.
27580 * emit-rtl.c: Include rtx-vector-builder.h.
27581 (gen_const_vec_duplicate_1): Delete.
27582 (gen_const_vector): Call gen_const_vec_duplicate instead of
27583 gen_const_vec_duplicate_1.
27584 (const_vec_series_p_1): Operate directly on the CONST_VECTOR encoding.
27585 (gen_const_vec_duplicate): Use rtx_vector_builder.
27586 (gen_const_vec_series): Likewise.
27587 (gen_rtx_CONST_VECTOR): Likewise.
27588 * config/powerpcspe/powerpcspe.c: Include rtx-vector-builder.h.
27589 (swap_const_vector_halves): Take an rtx pointer rather than rtx.
27590 Build a new vector rather than modifying a CONST_VECTOR in-place.
27591 (handle_special_swappables): Update call accordingly.
27592 * config/rs6000/rs6000-p8swap.c: Include rtx-vector-builder.h.
27593 (swap_const_vector_halves): Take an rtx pointer rather than rtx.
27594 Build a new vector rather than modifying a CONST_VECTOR in-place.
27595 (handle_special_swappables): Update call accordingly.
27597 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
27599 * simplify-rtx.c (simplify_const_binary_operation): Use
27600 CONST_VECTOR_ELT instead of XVECEXP.
27602 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
27604 * tree-cfg.c (verify_gimple_assign_ternary): Allow the size of
27605 the selector elements to be different from the data elements
27606 if the selector is a VECTOR_CST.
27607 * tree-vect-stmts.c (vect_gen_perm_mask_any): Use a vector of
27608 ssizetype for the selector.
27610 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
27612 * optabs.c (shift_amt_for_vec_perm_mask): Try using series_p
27613 before testing each element individually.
27614 * tree-vect-generic.c (lower_vec_perm): Likewise.
27616 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
27618 * selftest.h (selftest::vec_perm_indices_c_tests): Declare.
27619 * selftest-run-tests.c (selftest::run_tests): Call it.
27620 * vector-builder.h (vector_builder::operator ==): New function.
27621 (vector_builder::operator !=): Likewise.
27622 * vec-perm-indices.h (vec_perm_indices::series_p): Declare.
27623 (vec_perm_indices::all_from_input_p): New function.
27624 * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
27625 (test_vec_perm_12, selftest::vec_perm_indices_c_tests): Likewise.
27626 * fold-const.c (fold_ternary_loc): Use tree_to_vec_perm_builder
27627 instead of reading the VECTOR_CST directly. Detect whether both
27628 vector inputs are the same before constructing the vec_perm_indices,
27629 and update the number of inputs argument accordingly. Use the
27630 utility functions added above. Only construct sel2 if we need to.
27632 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
27634 * optabs.c (expand_vec_perm_var): Use an explicit encoding for
27635 the broadcast of the low byte.
27636 (expand_mult_highpart): Use an explicit encoding for the permutes.
27637 * optabs-query.c (can_mult_highpart_p): Likewise.
27638 * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Likewise.
27639 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
27640 (vectorizable_bswap): Likewise.
27641 * tree-vect-data-refs.c (vect_grouped_store_supported): Use an
27642 explicit encoding for the power-of-2 permutes.
27643 (vect_permute_store_chain): Likewise.
27644 (vect_grouped_load_supported): Likewise.
27645 (vect_permute_load_chain): Likewise.
27647 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
27649 * vec-perm-indices.h (vec_perm_indices_to_tree): Declare.
27650 * vec-perm-indices.c (vec_perm_indices_to_tree): New function.
27651 * tree-ssa-forwprop.c (simplify_vector_constructor): Use it.
27652 * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
27653 * tree-vect-stmts.c (vectorizable_bswap): Likewise.
27654 (vect_gen_perm_mask_any): Likewise.
27656 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
27658 * int-vector-builder.h: New file.
27659 * vec-perm-indices.h: Include int-vector-builder.h.
27660 (vec_perm_indices): Redefine as an int_vector_builder.
27661 (auto_vec_perm_indices): Delete.
27662 (vec_perm_builder): Redefine as a stand-alone class.
27663 (vec_perm_indices::vec_perm_indices): New function.
27664 (vec_perm_indices::clamp): Likewise.
27665 * vec-perm-indices.c: Include fold-const.h and tree-vector-builder.h.
27666 (vec_perm_indices::new_vector): New function.
27667 (vec_perm_indices::new_expanded_vector): Update for new
27668 vec_perm_indices class.
27669 (vec_perm_indices::rotate_inputs): New function.
27670 (vec_perm_indices::all_in_range_p): Operate directly on the
27671 encoded form, without computing elided elements.
27672 (tree_to_vec_perm_builder): Operate directly on the VECTOR_CST
27673 encoding. Update for new vec_perm_indices class.
27674 * optabs.c (expand_vec_perm_const): Create a vec_perm_indices for
27675 the given vec_perm_builder.
27676 (expand_vec_perm_var): Update vec_perm_builder constructor.
27677 (expand_mult_highpart): Use vec_perm_builder instead of
27678 auto_vec_perm_indices.
27679 * optabs-query.c (can_mult_highpart_p): Use vec_perm_builder and
27680 vec_perm_indices instead of auto_vec_perm_indices. Use a single
27681 or double series encoding as appropriate.
27682 * fold-const.c (fold_ternary_loc): Use vec_perm_builder and
27683 vec_perm_indices instead of auto_vec_perm_indices.
27684 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
27685 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
27686 (vect_permute_store_chain): Likewise.
27687 (vect_grouped_load_supported): Likewise.
27688 (vect_permute_load_chain): Likewise.
27689 (vect_shift_permute_load_chain): Likewise.
27690 * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
27691 (vect_transform_slp_perm_load): Likewise.
27692 (vect_schedule_slp_instance): Likewise.
27693 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
27694 (vectorizable_mask_load_store): Likewise.
27695 (vectorizable_bswap): Likewise.
27696 (vectorizable_store): Likewise.
27697 (vectorizable_load): Likewise.
27698 * tree-vect-generic.c (lower_vec_perm): Use vec_perm_builder and
27699 vec_perm_indices instead of auto_vec_perm_indices. Use
27700 tree_to_vec_perm_builder to read the vector from a tree.
27701 * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Take a
27702 vec_perm_builder instead of a vec_perm_indices.
27703 (have_whole_vector_shift): Use vec_perm_builder and
27704 vec_perm_indices instead of auto_vec_perm_indices. Leave the
27705 truncation to calc_vec_perm_mask_for_shift.
27706 (vect_create_epilog_for_reduction): Likewise.
27707 * config/aarch64/aarch64.c (expand_vec_perm_d::perm): Change
27708 from auto_vec_perm_indices to vec_perm_indices.
27709 (aarch64_expand_vec_perm_const_1): Use rotate_inputs on d.perm
27710 instead of changing individual elements.
27711 (aarch64_vectorize_vec_perm_const): Use new_vector to install
27712 the vector in d.perm.
27713 * config/arm/arm.c (expand_vec_perm_d::perm): Change
27714 from auto_vec_perm_indices to vec_perm_indices.
27715 (arm_expand_vec_perm_const_1): Use rotate_inputs on d.perm
27716 instead of changing individual elements.
27717 (arm_vectorize_vec_perm_const): Use new_vector to install
27718 the vector in d.perm.
27719 * config/powerpcspe/powerpcspe.c (rs6000_expand_extract_even):
27720 Update vec_perm_builder constructor.
27721 (rs6000_expand_interleave): Likewise.
27722 * config/rs6000/rs6000.c (rs6000_expand_extract_even): Likewise.
27723 (rs6000_expand_interleave): Likewise.
27725 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
27727 * optabs-query.c (can_vec_perm_var_p): Check whether lowering
27728 to qimode could truncate the indices.
27729 * optabs.c (expand_vec_perm_var): Likewise.
27731 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
27733 * Makefile.in (OBJS): Add vec-perm-indices.o.
27734 * vec-perm-indices.h: New file.
27735 * vec-perm-indices.c: Likewise.
27736 * target.h (vec_perm_indices): Replace with a forward class
27738 (auto_vec_perm_indices): Move to vec-perm-indices.h.
27739 * optabs.h: Include vec-perm-indices.h.
27740 (expand_vec_perm): Delete.
27741 (selector_fits_mode_p, expand_vec_perm_var): Declare.
27742 (expand_vec_perm_const): Declare.
27743 * target.def (vec_perm_const_ok): Replace with...
27744 (vec_perm_const): ...this new hook.
27745 * doc/tm.texi.in (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Replace with...
27746 (TARGET_VECTORIZE_VEC_PERM_CONST): ...this new hook.
27747 * doc/tm.texi: Regenerate.
27748 * optabs.def (vec_perm_const): Delete.
27749 * doc/md.texi (vec_perm_const): Likewise.
27750 (vec_perm): Refer to TARGET_VECTORIZE_VEC_PERM_CONST.
27751 * expr.c (expand_expr_real_2): Use expand_vec_perm_const rather than
27752 expand_vec_perm for constant permutation vectors. Assert that
27753 the mode of variable permutation vectors is the integer equivalent
27754 of the mode that is being permuted.
27755 * optabs-query.h (selector_fits_mode_p): Declare.
27756 * optabs-query.c: Include vec-perm-indices.h.
27757 (selector_fits_mode_p): New function.
27758 (can_vec_perm_const_p): Check whether targetm.vectorize.vec_perm_const
27759 is defined, instead of checking whether the vec_perm_const_optab
27760 exists. Use targetm.vectorize.vec_perm_const instead of
27761 targetm.vectorize.vec_perm_const_ok. Check whether the indices
27762 fit in the vector mode before using a variable permute.
27763 * optabs.c (shift_amt_for_vec_perm_mask): Take a mode and a
27764 vec_perm_indices instead of an rtx.
27765 (expand_vec_perm): Replace with...
27766 (expand_vec_perm_const): ...this new function. Take the selector
27767 as a vec_perm_indices rather than an rtx. Also take the mode of
27768 the selector. Update call to shift_amt_for_vec_perm_mask.
27769 Use targetm.vectorize.vec_perm_const instead of vec_perm_const_optab.
27770 Use vec_perm_indices::new_expanded_vector to expand the original
27771 selector into bytes. Check whether the indices fit in the vector
27772 mode before using a variable permute.
27773 (expand_vec_perm_var): Make global.
27774 (expand_mult_highpart): Use expand_vec_perm_const.
27775 * fold-const.c: Includes vec-perm-indices.h.
27776 * tree-ssa-forwprop.c: Likewise.
27777 * tree-vect-data-refs.c: Likewise.
27778 * tree-vect-generic.c: Likewise.
27779 * tree-vect-loop.c: Likewise.
27780 * tree-vect-slp.c: Likewise.
27781 * tree-vect-stmts.c: Likewise.
27782 * config/aarch64/aarch64-protos.h (aarch64_expand_vec_perm_const):
27784 * config/aarch64/aarch64-simd.md (vec_perm_const<mode>): Delete.
27785 * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const)
27786 (aarch64_vectorize_vec_perm_const_ok): Fuse into...
27787 (aarch64_vectorize_vec_perm_const): ...this new function.
27788 (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
27789 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
27790 * config/arm/arm-protos.h (arm_expand_vec_perm_const): Delete.
27791 * config/arm/vec-common.md (vec_perm_const<mode>): Delete.
27792 * config/arm/arm.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
27793 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
27794 (arm_expand_vec_perm_const, arm_vectorize_vec_perm_const_ok): Merge
27796 (arm_vectorize_vec_perm_const): ...this new function. Explicitly
27797 check for NEON modes.
27798 * config/i386/i386-protos.h (ix86_expand_vec_perm_const): Delete.
27799 * config/i386/sse.md (VEC_PERM_CONST, vec_perm_const<mode>): Delete.
27800 * config/i386/i386.c (ix86_expand_vec_perm_const_1): Update comment.
27801 (ix86_expand_vec_perm_const, ix86_vectorize_vec_perm_const_ok): Merge
27803 (ix86_vectorize_vec_perm_const): ...this new function. Incorporate
27804 the old VEC_PERM_CONST conditions.
27805 * config/ia64/ia64-protos.h (ia64_expand_vec_perm_const): Delete.
27806 * config/ia64/vect.md (vec_perm_const<mode>): Delete.
27807 * config/ia64/ia64.c (ia64_expand_vec_perm_const)
27808 (ia64_vectorize_vec_perm_const_ok): Merge into...
27809 (ia64_vectorize_vec_perm_const): ...this new function.
27810 * config/mips/loongson.md (vec_perm_const<mode>): Delete.
27811 * config/mips/mips-msa.md (vec_perm_const<mode>): Delete.
27812 * config/mips/mips-ps-3d.md (vec_perm_constv2sf): Delete.
27813 * config/mips/mips-protos.h (mips_expand_vec_perm_const): Delete.
27814 * config/mips/mips.c (mips_expand_vec_perm_const)
27815 (mips_vectorize_vec_perm_const_ok): Merge into...
27816 (mips_vectorize_vec_perm_const): ...this new function.
27817 * config/powerpcspe/altivec.md (vec_perm_constv16qi): Delete.
27818 * config/powerpcspe/paired.md (vec_perm_constv2sf): Delete.
27819 * config/powerpcspe/spe.md (vec_perm_constv2si): Delete.
27820 * config/powerpcspe/vsx.md (vec_perm_const<mode>): Delete.
27821 * config/powerpcspe/powerpcspe-protos.h (altivec_expand_vec_perm_const)
27822 (rs6000_expand_vec_perm_const): Delete.
27823 * config/powerpcspe/powerpcspe.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK):
27825 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
27826 (altivec_expand_vec_perm_const_le): Take each operand individually.
27827 Operate on constant selectors rather than rtxes.
27828 (altivec_expand_vec_perm_const): Likewise. Update call to
27829 altivec_expand_vec_perm_const_le.
27830 (rs6000_expand_vec_perm_const): Delete.
27831 (rs6000_vectorize_vec_perm_const_ok): Delete.
27832 (rs6000_vectorize_vec_perm_const): New function.
27833 (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
27834 an element count and rtx array.
27835 (rs6000_expand_extract_even): Update call accordingly.
27836 (rs6000_expand_interleave): Likewise.
27837 * config/rs6000/altivec.md (vec_perm_constv16qi): Delete.
27838 * config/rs6000/paired.md (vec_perm_constv2sf): Delete.
27839 * config/rs6000/vsx.md (vec_perm_const<mode>): Delete.
27840 * config/rs6000/rs6000-protos.h (altivec_expand_vec_perm_const)
27841 (rs6000_expand_vec_perm_const): Delete.
27842 * config/rs6000/rs6000.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
27843 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
27844 (altivec_expand_vec_perm_const_le): Take each operand individually.
27845 Operate on constant selectors rather than rtxes.
27846 (altivec_expand_vec_perm_const): Likewise. Update call to
27847 altivec_expand_vec_perm_const_le.
27848 (rs6000_expand_vec_perm_const): Delete.
27849 (rs6000_vectorize_vec_perm_const_ok): Delete.
27850 (rs6000_vectorize_vec_perm_const): New function. Remove stray
27851 reference to the SPE evmerge intructions.
27852 (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
27853 an element count and rtx array.
27854 (rs6000_expand_extract_even): Update call accordingly.
27855 (rs6000_expand_interleave): Likewise.
27856 * config/sparc/sparc.md (vec_perm_constv8qi): Delete in favor of...
27857 * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): ...this
27859 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
27861 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
27863 * optabs.c (expand_vec_perm_1): Assert that SEL has an integer
27864 vector mode and that that mode matches the mode of the data
27866 (expand_vec_perm): Split handling of non-CONST_VECTOR selectors
27867 out into expand_vec_perm_var. Do all CONST_VECTOR handling here,
27868 directly using expand_vec_perm_1 when forcing selectors into
27870 (expand_vec_perm_var): New function, split out from expand_vec_perm.
27872 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
27874 * optabs-query.h (can_vec_perm_p): Delete.
27875 (can_vec_perm_var_p, can_vec_perm_const_p): Declare.
27876 * optabs-query.c (can_vec_perm_p): Split into...
27877 (can_vec_perm_var_p, can_vec_perm_const_p): ...these two functions.
27878 (can_mult_highpart_p): Use can_vec_perm_const_p to test whether a
27879 particular selector is valid.
27880 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
27881 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
27882 (vect_grouped_load_supported): Likewise.
27883 (vect_shift_permute_load_chain): Likewise.
27884 * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
27885 (vect_transform_slp_perm_load): Likewise.
27886 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
27887 (vectorizable_bswap): Likewise.
27888 (vect_gen_perm_mask_checked): Likewise.
27889 * fold-const.c (fold_ternary_loc): Likewise. Don't take
27890 implementations of variable permutation vectors into account
27891 when deciding which selector to use.
27892 * tree-vect-loop.c (have_whole_vector_shift): Don't check whether
27893 vec_perm_const_optab is supported; instead use can_vec_perm_const_p
27894 with a false third argument.
27895 * tree-vect-generic.c (lower_vec_perm): Use can_vec_perm_const_p
27896 to test whether the constant selector is valid and can_vec_perm_var_p
27897 to test whether a variable selector is valid.
27899 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
27901 * optabs-query.h (can_vec_perm_p): Take a const vec_perm_indices *.
27902 * optabs-query.c (can_vec_perm_p): Likewise.
27903 * fold-const.c (fold_vec_perm): Take a const vec_perm_indices &
27904 instead of vec_perm_indices.
27905 * tree-vectorizer.h (vect_gen_perm_mask_any): Likewise,
27906 (vect_gen_perm_mask_checked): Likewise,
27907 * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise,
27908 (vect_gen_perm_mask_checked): Likewise,
27910 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
27912 * optabs-query.h (qimode_for_vec_perm): Declare.
27913 * optabs-query.c (can_vec_perm_p): Split out qimode search to...
27914 (qimode_for_vec_perm): ...this new function.
27915 * optabs.c (expand_vec_perm): Use qimode_for_vec_perm.
27917 2018-01-02 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
27919 * rtlanal.c (canonicalize_condition): Return 0 if final rtx
27920 does not have a conditional at the top.
27922 2018-01-02 Richard Biener <rguenther@suse.de>
27924 * ipa-inline.c (big_speedup_p): Fix expression.
27926 2018-01-02 Jan Hubicka <hubicka@ucw.cz>
27929 * config/i386/x86-tune-costs.h: Increase cost of integer load costs
27932 2018-01-02 Jan Hubicka <hubicka@ucw.cz>
27936 * x86-tune-costs.h (generic_cost): Reduce cost of FDIV 20->17,
27937 cost of sqrt 20->14, DIVSS 18->13, DIVSD 32->17, SQRtSS 30->14
27938 and SQRTsD 58->18, cond_not_taken_branch_cost. 2->1. Increase
27939 cond_taken_branch_cost 3->4.
27941 2018-01-01 Jakub Jelinek <jakub@redhat.com>
27943 PR tree-optimization/83581
27944 * tree-loop-distribution.c (pass_loop_distribution::execute): Return
27945 TODO_cleanup_cfg if any changes have been made.
27947 PR middle-end/83608
27948 * expr.c (store_expr_with_bounds): Use simplify_gen_subreg instead of
27949 convert_modes if target mode has the right side, but different mode
27952 PR middle-end/83609
27953 * expr.c (expand_assignment): Fix up a typo in simplify_gen_subreg
27954 last argument when extracting from CONCAT. If either from_real or
27955 from_imag is NULL, use expansion through memory. If result is not
27956 a CONCAT and simplify_gen_subreg fails, try to simplify_gen_subreg
27957 the parts directly to inner mode, if even that fails, use expansion
27960 PR middle-end/83623
27961 * expmed.c (expand_shift_1): For 2-byte rotates by BITS_PER_UNIT,
27962 check for bswap in mode rather than HImode and use that in expand_unop
27965 Copyright (C) 2018 Free Software Foundation, Inc.
27967 Copying and distribution of this file, with or without modification,
27968 are permitted in any medium without royalty provided the copyright
27969 notice and this notice are preserved.