1 2018-10-09 Eric Botcazou <ebotcazou@adacore.com>
3 PR tree-optimization/86659
4 * gimple-match.h (gimple_match_op constructors): Initialize reverse.
6 2018-10-09 Richard Biener <rguenther@suse.de>
8 PR tree-optimization/63155
9 * tree-ssa-structalias.c: Include tree-ssa.h.
10 (get_constraint_for_ssa_var): For undefs return nothing_id.
11 (find_func_aliases): Cleanup PHI handling.
13 2018-10-09 Richard Biener <rguenther@suse.de>
15 * tree-vectorizer.c (dump_stmt_cost): Fix cut&paste missing
18 2018-10-09 Martin Liska <mliska@suse.cz>
20 * asan.c (asan_emit_stack_protection): If a stack variable
21 is located in a same file as current function, then emit
22 line info into variable definition string.
24 2018-10-08 Eric Botcazou <ebotcazou@adacore.com>
26 * print-rtl.c (rtx_writer::print_rtx_operand_code_i): Print column
29 2018-10-08 Eric Botcazou <ebotcazou@adacore.com>
31 * cgraphunit.c (cgraph_node::expand_thunk): Do not force DECL_IGNORED_P
34 2018-10-08 Eric Botcazou <ebotcazou@adacore.com>
36 PR tree-optimization/86659
37 * gimple-match.h (struct gimple_match_op): Add reverse field.
38 (gimple_match_op::set_op): New overloaded method.
39 * gimple-match-head.c (maybe_build_generic_op) <BIT_FIELD_REF>: Set
40 the REF_REVERSE_STORAGE_ORDER flag on the value.
41 (gimple_simplify) <GIMPLE_ASSIGN>: For BIT_FIELD_REF, propagate the
42 REF_REVERSE_STORAGE_ORDER flag and avoid simplifying if it is set.
44 2018-10-08 Richard Sandiford <richard.sandiford@arm.com>
47 * gimple-ssa-backprop.c (backprop::intersect_uses): Use
48 FOR_EACH_IMM_USE_FAST instead of FOR_EACH_IMM_USE_STMT.
50 2018-10-08 H.J. Lu <hongjiu.lu@intel.com>
53 * config/i386/avx512fintrin.h (_mm512_mask_fmaddsub_round_pd):
54 Defined with __builtin_ia32_vfmaddsubpd512_mask.
56 2018-10-08 Richard Biener <rguenther@suse.de>
58 * config/i386/x86-tune-costs.h (znver1_cost): Make AVX256 vector loads
59 cost the same as AVX128 ones.
61 2018-10-08 Paul Koning <ni1d@arrl.net>
63 * config/pdp11/pdp11-protos.h (output_block_move): Remove.
64 (expand_block_move): New function.
65 * config/pdp11/pdp11.c (output_block_move): Remove.
66 (expand_block_move): New function.
67 * config/pdp11/pdp11.h (MOVE_RATIO): New definition.
68 * config/pdp11/pdp11.md (movmemhi): Use expand_block_move.
71 2018-10-08 Robin Dapp <rdapp@linux.ibm.com>
73 * config/s390/2827.md: Increase latencies for some FP instructions.
75 2018-10-08 Richard Biener <rguenther@suse.de>
77 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost):
79 * tree-vectorizer.c (dump_stmt_cost): Add cost param and dump it.
80 * tree-vectorizer.h (dump_stmt_cost): Adjust.
81 (add_stmt_cost): Dump return value of the hook.
83 2018-10-08 Richard Biener <rguenther@suse.de>
85 PR tree-optimization/63155
86 * tree-ssa-propagate.c (add_ssa_edge): Do cheap check first.
87 (ssa_propagation_engine::ssa_propagate): Remove redundant
90 2018-10-05 Peter Bergner <bergner@linux.ibm.com>
92 PR rtl-optimization/86939
93 PR rtl-optimization/87479
94 * ira.h (non_conflicting_reg_copy_p): New prototype.
95 * ira-lives.c (ignore_reg_for_conflicts): New static variable.
96 (make_hard_regno_dead): Don't add conflicts for register
97 ignore_reg_for_conflicts.
98 (make_object_dead): Likewise.
99 (non_conflicting_reg_copy_p): New function.
100 (process_bb_node_lives): Set ignore_reg_for_conflicts for copies.
101 Remove special conflict handling of REAL_PIC_OFFSET_TABLE_REGNUM.
102 * lra-lives.c (ignore_reg_for_conflicts): New static variable.
103 (make_hard_regno_dead): Don't add conflicts for register
104 ignore_reg_for_conflicts. Remove special conflict handling of
105 REAL_PIC_OFFSET_TABLE_REGNUM. Remove now unused argument
106 check_pic_pseudo_p and update callers.
107 (mark_pseudo_dead): Don't add conflicts for register
108 ignore_reg_for_conflicts.
109 (process_bb_lives): Set ignore_reg_for_conflicts for copies.
111 2018-10-05 Andrew Waterman <andrew@sifive.com>
112 Jim Wilson <jimw@sifive.com>
114 * config/riscv/riscv.md (f<quiet_pattern>_quiet<ANYF:mode><X:mode>4):
115 Add define_expand. Add ! HONOR_SNANS check to current pattern. Add
116 new pattern using HONOR_SNANS that emits one extra instruction.
118 2018-10-05 Segher Boessenkool <segher@kernel.crashing.org>
120 * config/rs6000/rs6000.md (unnamed mfcr scc_comparison_operator
121 patterns): Merge SI and DI patterns to a GPR pattern.
122 (unnamed define_insn and define_split for record form of that): Merge
123 to a single define_insn_and_split pattern.
125 2018-10-05 David Malcolm <dmalcolm@redhat.com>
128 * input.c (expand_location_to_spelling_point): Add param "aspect"
129 and use rather than hardcoding LOCATION_ASPECT_CARET.
130 (get_substring_ranges_for_loc): Handle the case of a single token
131 within a macro expansion.
132 * input.h (expand_location_to_spelling_point): Add "aspect" param,
133 defaulting to LOCATION_ASPECT_CARET.
135 2018-10-05 Paul Koning <ni1d@arrl.net>
137 * config/pdp11/pdp11.c (TARGET_CXX_GUARD_TYPE): Define.
138 (TARGET_CXX_CLASS_DATA_ALWAYS_COMDAT): Define.
139 (TARGET_CXX_LIBRARY_RTTI_COMDAT): Define.
140 (pdp11_guard_type): New function.
142 2018-10-05 Paul Koning <ni1d@arrl.net>
144 * config/pdp11/pdp11.h (FLOAT_TYPE_SIZE): Always 32.
145 * config/pdp11/pdp11.opt (mfloat32): Remove.
147 * doc/invoke.texi (pdp11 -mfloat32): Remove:
148 (pdp11 -mfloat64): Remove.
150 2018-10-05 Uros Bizjak <ubizjak@gmail.com>
152 * config/i386/i386.md (*cmpxf_cc_i387): Remove pattern.
153 (*cmp<mode>_cc_i387): Ditto.
154 (*cmpu<mode>_cc_i387): Ditto.
155 (*cmp<X87MODEF:mode>_<SWI24:mode>_cc_i387): Ditto.
156 * config/i386/i386.c (ix86_expand_fp_compare): Remove
158 <case IX86_FPCMP_SAHF>: Do not generate pattern with HImode clobber.
159 Emit x86_sahf_1 pattern.
160 (ix86_expand_compare): Update call to ix86_expand_fp_compare.
161 (ix86_expand_carry_flag_compare): Ditto.
163 2018-10-05 Uros Bizjak <ubizjak@gmail.com>
165 * config/i386/i386.md (*cmpxf_i387): Change operand 2 predicate
166 to reg_or_0_operand. Add "C" constraint.
167 (*cmpxf_cc_i387): Ditto.
168 (*cmp<mode>_i387): Change operand 2 predicate
169 to nonimm_or_0_operand. Add "C" constraint.
170 (*cmp<mode>_cc_i387): Ditto.
171 (*cmp<mode>_0_i387): Remove insn pattern.
172 (*cmp<mode>_0_cc_i387): Ditto.
174 2018-10-05 Uros Bizjak <ubizjak@gmail.com>
176 * config/i386/constraints.md ("C"): Do not depend on TARGET_SSE.
177 * config/i386/predicates.md (nonimm_or_0_operand): Rename
178 from vector_move_operand. Update all uses.
180 2018-10-05 Martin Sebor <msebor@redhat.com>
182 PR tree-optimization/87490
183 * builtins.c (expand_builtin_strnlen): Handle a null data.decl
186 2018-10-05 Richard Biener <rguenther@suse.de>
188 PR tree-optimization/63155
189 * tree-ssa-ccp.c (ccp_propagate::visit_phi): Avoid excess
190 vertical space in dumpfiles.
191 * tree-ssa-propagate.h
192 (ssa_propagation_engine::process_ssa_edge_worklist): Remove.
193 * tree-ssa-propagate.c (cfg_blocks_back): New global.
194 (ssa_edge_worklist_back): Likewise.
195 (curr_order): Likewise.
196 (cfg_blocks_get): Remove abstraction.
197 (cfg_blocks_add): Likewise.
198 (cfg_blocks_empty_p): Likewise.
199 (add_ssa_edge): Add to current or next worklist based on
201 (add_control_edge): Likewise.
202 (ssa_propagation_engine::process_ssa_edge_worklist): Fold
204 (ssa_propagation_engine::ssa_propagate): ... here. Unify
205 iteration from CFG and SSA edge worklist so we process
206 everything in RPO order, prioritizing forward progress
208 (ssa_prop_init): Allocate new worklists, do not dump
210 (ssa_prop_fini): Free new worklists.
212 2018-10-05 Richard Biener <rguenther@suse.de>
214 * tree-core.h (tree_block::abstract_flag): Remove.
215 (tree_block::block_num): Make full 32bits.
216 * tree.def (BLOCK): Remove docs about BLOCK_ABSTRACT.
217 * tree.h (BLOCK_ABSTRACT): Remove.
218 * dwarf2out.c (gen_lexical_block_die): Remove dead code
219 resulting from BLOCK_ABSTRACT being always false.
220 (gen_inlined_subroutine_die): Likewise.
221 (gen_block_die): Likewise.
222 * tree.c (block_ultimate_origin): Likewise.
223 * tree-pretty-print.c (dump_block_node): Remove code dealing
225 * tree-ssa-live.c (dump_scope_block): Likewise.
226 * tree-streamer-in.c (unpack_ts_block_value_fields): Likewise.
227 * tree-streamer-out.c (pack_ts_block_value_fields): Likewise.
229 2018-10-05 Richard Biener <rguenther@suse.de>
231 * config/i386/i386.c (ix86_add_stmt_cost): When scalar cost
232 is asked for initialize mode to the component mode of the
235 2018-10-05 H.J. Lu <hongjiu.lu@intel.com>
238 * config/i386/gnu-user.h (ASM_SPEC): Don't pass -msse2avx to
240 * config/i386/gnu-user64.h (ASM_SPEC): Likewise.
242 2018-10-05 Segher Boessenkool <segher@kernel.crashing.org>
245 * config/rs6000/rs6000-builtin.def (RS6000_BUILTIN_SET_FPSCR_DRN): Use
247 * config/rs6000/rs6000.md (rs6000_set_fpscr_rn): Require the operand
248 to be DImode. When using mffscrn, force the operand to a register.
250 2018-10-04 Uros Bizjak <ubizjak@gmail.com>
252 * config/i386/i386.md (*fop_<X87MODEF:mode>_2_i387): Macroize insn
253 from *fop_<MODEF:mode>_2_i387 and *fop_xf_2_i387 using
254 X87MODEF mode iterator.
255 (*fop_<X87MODEF:mode>_3_i387): Macroize insn from
256 *fop_<MODEF:mode>_3_i387 and *fop_xf_3_i387 using
257 X87MODEF mode iterator.
259 2018-10-04 Vinay Kumar <vinay.kumar@blackfigtech.com>
261 * doc/invoke.texi (-Wno-prio-ctor-dtor): Document new warning
264 2018-10-04 David Malcolm <dmalcolm@redhat.com>
266 * Makefile.in (OBJS): Add opt-problem.o.
267 * dump-context.h: Include "selftest.h.
268 (selftest::temp_dump_context): New forward decl.
269 (class dump_context): Make friend of class
270 selftest::temp_dump_context.
271 (dump_context::dump_loc_immediate): New decl.
272 (class dump_pretty_printer): Move here from dumpfile.c.
273 (class temp_dump_context): Move to namespace selftest.
274 (temp_dump_context::temp_dump_context): Add param
275 "forcibly_enable_dumping".
276 (selftest::verify_dumped_text):
277 (ASSERT_DUMPED_TEXT_EQ): Move here from dumpfile.c.
278 (selftest::verify_item):
279 (ASSERT_IS_TEXT): Move here from dumpfile.c.
280 (ASSERT_IS_TREE): Likewise.
281 (ASSERT_IS_GIMPLE): Likewise.
282 * dumpfile.c (dump_context::dump_loc): Move immediate dumping
284 (dump_context::dump_loc_immediate): ...this new function.
285 (class dump_pretty_printer): Move to dump-context.h.
286 (dump_switch_p_1): Don't enable MSG_PRIORITY_REEMITTED.
287 (opt_info_switch_p_1): Enable MSG_PRIORITY_REEMITTED.
288 (temp_dump_context::temp_dump_context): Move to "selftest"
289 namespace. Add param "forcibly_enable_dumping", and use it to
290 conditionalize the use of m_pp;
291 (selftest::verify_dumped_text): Make non-static.
292 (ASSERT_DUMPED_TEXT_EQ): Move to dump-context.h.
293 (selftest::verify_item): Make non-static.
294 (ASSERT_IS_TEXT): Move to dump-context.h.
295 (ASSERT_IS_TREE): Likewise.
296 (ASSERT_IS_GIMPLE): Likewise.
297 (selftest::test_capture_of_dump_calls): Pass "true" for new
298 param of temp_dump_context.
299 * dumpfile.h (enum dump_flag): Add MSG_PRIORITY_REEMITTED, adding
300 it to MSG_ALL_PRIORITIES. Update values of TDF_COMPARE_DEBUG and
302 * opt-problem.cc: New file.
303 * opt-problem.h: New file.
304 * optinfo-emit-json.cc
305 (selftest::test_building_json_from_dump_calls): Pass "true" for
306 new param of temp_dump_context.
307 * optinfo.cc (optinfo_kind_to_dump_flag): New function.
308 (optinfo::emit_for_opt_problem): New function.
309 (optinfo::emit): Clarity which emit_item is used.
310 * optinfo.h (optinfo::get_dump_location): New accessor.
311 (optinfo::emit_for_opt_problem): New decl.
312 (optinfo::emit): Make const.
313 * selftest-run-tests.c (selftest::run_tests): Call
314 selftest::opt_problem_cc_tests.
315 * selftest.h (selftest::opt_problem_cc_tests): New decl.
316 * tree-data-ref.c (dr_analyze_innermost): Convert return type from
317 bool to opt_result, converting fprintf messages to
318 opt_result::failure_at calls. Add "stmt" param for use by the
320 (create_data_ref): Pass "stmt" to the dr_analyze_innermost call.
321 (runtime_alias_check_p): Convert return type from bool to
322 opt_result, converting dump_printf calls to
323 opt_result::failure_at, using the statement DDR_A for their
325 (find_data_references_in_stmt): Convert return type from bool to
326 opt_result, converting "return false" to opt_result::failure_at
328 * tree-data-ref.h: Include "opt-problem.h".
329 (dr_analyze_innermost): Convert return type from bool to opt_result,
330 and add a const gimple * param.
331 (find_data_references_in_stmt): Convert return type from bool to
333 (runtime_alias_check_p): Likewise.
334 * tree-predcom.c (find_looparound_phi): Pass "init_stmt" to
335 dr_analyze_innermost.
336 * tree-vect-data-refs.c (vect_mark_for_runtime_alias_test):
337 Convert return type from bool to opt_result, adding a message for
338 the PARAM_VECT_MAX_VERSION_FOR_ALIAS_CHECKS zero case.
339 (vect_analyze_data_ref_dependence): Convert return type from bool
340 to opt_result. Change sense of return type from "false"
341 effectively meaning "no problems" to "false" meaning a problem,
342 so that "return false" becomes "return opt_result::success".
343 Convert "return true" calls to opt_result::failure_at, using
344 the location of statement A rather than vect_location.
345 (vect_analyze_data_ref_dependences): Convert return type from bool
347 (verify_data_ref_alignment): Likewise, converting dump_printf_loc
348 calls to opt_result::failure_at, using the stmt location rather
350 (vect_verify_datarefs_alignment): Convert return type from bool
352 (vect_enhance_data_refs_alignment): Likewise. Split local "stat"
353 into multiple more-tightly-scoped copies.
354 (vect_analyze_data_refs_alignment): Convert return type from bool
356 (vect_analyze_data_ref_accesses): Likewise, converting a
357 "return false" to a "return opt_result::failure_at", adding a
359 (vect_prune_runtime_alias_test_list): Convert return type from
360 bool to opt_result, converting dump_printf_loc to
361 opt_result::failure_at. Add a %G to show the pertinent statement,
362 and use the stmt's location rather than vect_location.
363 (vect_find_stmt_data_reference): Convert return type from
364 bool to opt_result, converting dump_printf_loc to
365 opt_result::failure_at, using stmt's location.
366 (vect_analyze_data_refs): Convert return type from bool to
367 opt_result. Convert "return false" to "return
368 opt_result::failure_at", adding messages as needed.
369 * tree-vect-loop.c (vect_determine_vf_for_stmt_1): Convert return
370 type from bool to opt_result.
371 (vect_determine_vf_for_stmt): Likewise.
372 (vect_determine_vectorization_factor): Likewise, converting
373 dump_printf_loc to opt_result::failure_at, using location of phi
374 rather than vect_location.
375 (vect_analyze_loop_form_1): Convert return type from bool to
376 opt_result, converting dump_printf_loc calls, retaining the use of
378 (vect_analyze_loop_form): Convert return type from loop_vec_info
379 to opt_loop_vec_info.
380 (vect_analyze_loop_operations): Convert return type from bool to
381 opt_result, converting dump_printf_loc calls, using the location
382 of phi/stmt rather than vect_location where available. Convert
383 various "return false" to "return opt_result::failure_at" with
384 "unsupported phi" messages.
385 (vect_get_datarefs_in_loop): Convert return type from bool to
386 opt_result. Add a message for the
387 PARAM_LOOP_MAX_DATAREFS_FOR_DATADEPS failure.
388 (vect_analyze_loop_2): Convert return type from bool to
389 opt_result. Ensure "ok" is set to a opt_result::failure_at before
390 each "goto again;", adding new messages where needed.
391 Add "unsupported grouped {store|load}" messages.
392 (vect_analyze_loop): Convert return type from loop_vec_info to
394 * tree-vect-slp.c (vect_analyze_slp): Convert return type from
396 * tree-vect-stmts.c (process_use): Likewise, converting
397 dump_printf_loc call and using stmt location, rather than
399 (vect_mark_stmts_to_be_vectorized): Likeise.
400 (vect_analyze_stmt): Likewise, adding a %G.
401 (vect_get_vector_types_for_stmt): Convert return type from bool to
402 opt_result, converting dump_printf_loc calls and using stmt
403 location, rather than vect_location.
404 (vect_get_mask_type_for_stmt): Convert return type from tree to
405 opt_tree, converting dump_printf_loc calls and using stmt location.
406 * tree-vectorizer.c: Include "opt-problem.h.
407 (try_vectorize_loop_1): Flag "Analyzing loop at" dump message as
408 MSG_PRIORITY_INTERNALS. Convert local "loop_vinfo" from
409 loop_vec_info to opt_loop_vec_info. If if fails, and dumping is
410 enabled, use it to report at the top level "couldn't vectorize
411 loop" followed by the problem.
412 * tree-vectorizer.h (opt_loop_vec_info): New typedef.
413 (vect_mark_stmts_to_be_vectorized): Convert return type from bool
415 (vect_analyze_stmt): Likewise.
416 (vect_get_vector_types_for_stmt): Likewise.
417 (tree vect_get_mask_type_for_stmt): Likewise.
418 (vect_analyze_data_ref_dependences): Likewise.
419 (vect_enhance_data_refs_alignment): Likewise.
420 (vect_analyze_data_refs_alignment): Likewise.
421 (vect_verify_datarefs_alignment): Likewise.
422 (vect_analyze_data_ref_accesses): Likewise.
423 (vect_prune_runtime_alias_test_list): Likewise.
424 (vect_find_stmt_data_reference): Likewise.
425 (vect_analyze_data_refs): Likewise.
426 (vect_analyze_loop): Convert return type from loop_vec_info to
428 (vect_analyze_loop_form): Likewise.
429 (vect_analyze_slp): Convert return type from bool to opt_result.
431 2018-10-04 David Malcolm <dmalcolm@redhat.com>
433 * doc/invoke.texi (-fopt-info): Document new "internals"
435 * dump-context.h (dump_context::apply_dump_filter_p): New decl.
436 * dumpfile.c (dump_options): Update for renaming of MSG_ALL to
438 (optinfo_verbosity_options): Add "internals".
439 (kind_as_string): Update for renaming of MSG_ALL to MSG_ALL_KINDS.
440 (dump_context::apply_dump_filter_p): New member function.
441 (dump_context::dump_loc): Use apply_dump_filter_p rather than
442 explicitly masking the dump_kind.
443 (dump_context::begin_scope): Increment the scope depth first. Use
444 apply_dump_filter_p rather than explicitly masking the dump_kind.
445 (dump_context::emit_item): Use apply_dump_filter_p rather than
446 explicitly masking the dump_kind.
447 (dump_dec): Likewise.
448 (dump_hex): Likewise.
449 (dump_switch_p_1): Default to MSG_ALL_PRIORITIES.
450 (opt_info_switch_p_1): Default to MSG_PRIORITY_USER_FACING.
451 (opt_info_switch_p): Update handling of default
452 MSG_OPTIMIZED_LOCATIONS to cope with default of
453 MSG_PRIORITY_USER_FACING.
454 (dump_basic_block): Use apply_dump_filter_p rather than explicitly
455 masking the dump_kind.
456 (selftest::test_capture_of_dump_calls): Update test_dump_context
457 instances to use MSG_ALL_KINDS | MSG_PRIORITY_USER_FACING rather
458 than MSG_ALL. Generalize scope test to be run at all four
459 combinations of with/without MSG_PRIORITY_USER_FACING and
460 MSG_PRIORITY_INTERNALS, adding examples of explicit priority
461 for each of the two values.
462 * dumpfile.h (enum dump_flag): Add comment about the MSG_* flags.
463 Rename MSG_ALL to MSG_ALL_KINDS. Add MSG_PRIORITY_USER_FACING,
464 MSG_PRIORITY_INTERNALS, and MSG_ALL_PRIORITIES, updating the
465 values for TDF_COMPARE_DEBUG and TDF_ALL_VALUES.
466 (AUTO_DUMP_SCOPE): Add a note to the comment about the interaction
468 * tree-vect-loop-manip.c (vect_loop_versioning): Mark versioning
469 dump messages as MSG_PRIORITY_USER_FACING.
470 * tree-vectorizer.h (DUMP_VECT_SCOPE): Add a note to the comment
471 about the interaction with MSG_PRIORITY_*.
473 2018-10-04 Bernd Edlinger <bernd.edlinger@hotmail.de>
475 * varasm.c (output_constant): Add new parameter merge_strings.
476 Make strings properly zero terminated in merge string sections.
477 (mergeable_string_section): Don't fail if the last char is non-zero.
478 (assemble_variable_contents): Handle merge string sections.
479 (assemble_variable): Likewise.
480 (assemble_constant_contents): Likewise.
481 (output_constant_def_contents): Likewise.
482 (output_constructor_array_range,
483 output_constructor_regular_field): Adjust call to output_constant.
484 (output_object_block): Adjust call to assemble_constant_contents
485 and assemble_variable_contents.
487 2018-10-04 Martin Liska <mliska@suse.cz>
490 * cgraphunit.c (process_function_and_variable_attributes):
491 Warn about a function with alias attribute and a body.
493 2018-10-04 Martin Liska <mliska@suse.cz>
496 * multiple_target.c (redirect_to_specific_clone): New function.
497 (ipa_target_clone): Use it.
498 * tree-inline.c: Fix comment.
500 2018-10-04 David Malcolm <dmalcolm@redhat.com>
502 * dumpfile.c (gcc::dump_manager::dump_manager): Initialize new
504 (gcc::dump_manager::~dump_manager): Free m_optinfo_filename.
505 (gcc::dump_manager::register_pass): New member function, adapted
506 from loop body in gcc::pass_manager::register_pass, adding a
507 call to update_dfi_for_opt_info.
508 (gcc::dump_manager::opt_info_enable_passes): Store the
509 -fopt-info options into the new fields. Move the loop
511 (gcc::dump_manager::update_dfi_for_opt_info): ...this new member
513 * dumpfile.h (struct opt_pass): New forward decl.
514 (gcc::dump_manager::register_pass): New decl.
515 (gcc::dump_manager::update_dfi_for_opt_info): New decl.
516 (class gcc::dump_manager): Add fields "m_optgroup_flags",
517 "m_optinfo_flags", and "m_optinfo_filename".
518 * passes.c (gcc::pass_manager::register_pass): Move all of the
519 dump-handling code to gcc::dump_manager::register_pass.
521 2018-10-04 Peter Bergner <bergner@linux.ibm.com>
523 PR rtl-optimization/87466
524 * target.def (setjmp_preserves_nonvolatile_regs_p): New target hook.
525 * doc/tm.texi.in (TARGET_SETJMP_PRESERVES_NONVOLATILE_REGS_P): New hook.
526 * doc/tm.texi: Regenerate.
527 * ira-lives.c (process_bb_node_lives): Use the new target hook.
528 * lra-lives.c (process_bb_lives): Likewise.
529 * config/rs6000/rs6000.c (TARGET_SETJMP_PRESERVES_NONVOLATILE_REGS_P):
532 2018-10-04 Tamar Christina <tamar.christina@arm.com>
534 * params.c (add_params): Fix initialization.
536 2018-10-04 Martin Liska <mliska@suse.cz>
538 PR gcov-profile/84107
539 * tree-profile.c (init_ic_make_global_vars):
540 Remove ic_void_ptr_var and ic_gcov_type_ptr_var.
541 Come up with new ic_tuple* variables. Emit
542 __gcov_indirect_call{,_topn} variables.
543 (gimple_gen_ic_profiler): Access the variable
545 (gimple_gen_ic_func_profiler): Access
546 __gcov_indirect_call.callee field.
547 (gimple_init_gcov_profiler): Use ptr_type_node.
548 * value-prof.c (gimple_ic): Use ptr_type_node.
550 2018-10-04 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
552 PR tree-optimization/85787
553 * ipa-pure-const.c (malloc_candidate_p_1): Move most of malloc_candidate_p
554 into this function and add support for detecting multiple phis.
555 (DUMP_AND_RETURN): Move from malloc_candidate_p into top-level macro.
557 2018-10-04 Martin Liska <mliska@suse.cz>
560 * ipa-inline.c (inline_to_all_callers_1):
561 Call ultimate_alias_target for node being inlined.
563 2018-10-03 Jeff Law <law@redhat.com>
565 * gimple-ssa-sprintf.c (format_string): Do not hardcode size of
567 * tree.c (get_typenode_from_name): Moved from fortran/trans-types.c.
568 * tree.h (get_typenode_from_name): Prototype.
570 2018-10-03 Uros Bizjak <ubizjak@gmail.com>
572 * config/i386/i386.md (*cmp<X87MODEF:mode>_<SWI24:mode>_i387):
573 Change operand 2 predicate to nonimmediate_operand.
574 (*cmp<X87MODEF:mode>_<SWI24:mode>_cc_i387): Ditto.
576 2018-10-03 Martin Sebor <msebor@redhat.com>
577 Jeff Law <law@redhat.com>
579 * gimple-ssa-sprintf.c (struct fmtresult): Add new member and
581 (get_string_length): Detect unterminated arrays.
582 (format_string): Same.
583 (format_directive): Warn about unterminated arrays.
584 (handle_gimple_call): Mark statements with no_warning as needed.
586 2018-10-03 Jim Wilson <jimw@sifive.com>
588 * config/riscv/riscv-c.c (riscv_cpu_cpp_builtins): For ABI_ILP32E,
589 also define __riscv_abi_rve. Delete trailing white space.
591 2018-10-03 Paul Koning <ni1d@arrl.net>
593 Enable LRA register allocator for PDP11.
594 * config/pdp11/constraints.md (Q): Use define_memory_constraint.
597 * config/pdp11/pdp11.c (pdp11_lra_p): New function.
598 * config/pdp11/pdp11.opt (-mlra): New option.
599 * doc/invoke.texi (PDP-11 Options): Document -mlra.
601 2018-10-03 Uros Bizjak <ubizjak@gmail.com>
603 * config/i386/i386.md (*<absneg:code>extendsfdf2): Remove.
604 (*<absneg:code>extend<mode>xf2): Ditto.
606 2018-10-03 Aldy Hernandez <aldyh@redhat.com>
608 PR tree-optimization/87415
609 * tree-vrp.c (set_value_range_with_overflow): Special case one bit
612 2018-10-02 Jeff Law <law@redhat.com>
614 * gimple-fold.c (get_range_strlen): Only set *nonstr when
615 an unterminated string is discovered. Bubble up range
616 even for unterminated strings.
617 (gimple_fold_builtin_strlen): Do not fold if get_range_strlen
618 indicates the string was not terminated via NONSTR.
620 2018-10-03 Aldy Hernandez <aldyh@redhat.com>
622 * tree-vrp.c (extract_range_from_unary_expr): Special case all
624 Do not do anything special for anti-ranges.
626 2018-10-03 Jérôme Lambourg <lambourg@adacore.com>
628 * config/arm/vxworks.h (ARM_TARGET2_DWARF_FORMAT): Adjust to
629 DW_EH_PE_pcrel | DW_EH_PE_indirect for RTPs.
631 2018-10-03 Martin Liska <mliska@suse.cz>
633 PR gcov-profile/86109
634 * coverage.c (coverage_begin_function): Do not
635 mark lambdas as artificial.
636 * tree-core.h (struct GTY): Remove tm_clone_flag
637 and introduce new lambda_function.
638 * tree.h (DECL_LAMBDA_FUNCTION): New macro.
640 2018-10-02 Aaron Sawdey <acsawdey@linux.ibm.com>
643 * config/rs6000/rs6000-string.c (expand_strn_compare): Check that both
644 P8_VECTOR and VSX are enabled.
646 2018-10-02 Andreas Krebbel <krebbel@linux.ibm.com>
648 * config/s390/driver-native.c (s390_host_detect_local_cpu): Add
649 0x3907 as CPU model number.
651 2018-10-02 Andreas Krebbel <krebbel@linux.ibm.com>
653 * common/config/s390/s390-common.c: Rename PF_ARCH12 to PF_Z14.
654 * config/s390/s390.h (enum processor_flags): Rename PF_ARCH12 to
655 PF_Z14. Rename TARGET_CPU_ARCH12 to TARGET_CPU_Z14,
656 TARGET_CPU_ARCH12_P to TARGET_CPU_Z14_P, TARGET_ARCH12 to
657 TARGET_Z14, and TARGET_ARCH12_P to TARGET_Z14_P.
658 * config/s390/s390.md: Likewise. Rename also the cpu attribute
659 value from arch12 to z14.
661 2018-10-02 Uros Bizjak <ubizjak@gmail.com>
663 * config/i386/i386.md (fxam<mode>2_i387_with_temp): Remove.
665 (isinf<mode>2): Ditto.
667 2018-10-02 Uros Bizjak <ubizjak@gmail.com>
669 * config/i386/i386.c (ix86_emit_i387_round): Extend op1 to XFmode
670 before emitting fxam. Perform calculations in XFmode.
672 2018-10-02 Marc Glisse <marc.glisse@inria.fr>
674 * match.pd (((X /[ex] A) +- B) * A): New transformation.
676 2018-10-02 Marc Glisse <marc.glisse@inria.fr>
679 * fold-const.c (fold_plusminus_mult_expr): Handle complex and vectors.
680 * tree.c (signed_or_unsigned_type_for): Handle complex.
682 2018-10-02 Jeff Law <law@redhat.com>
684 * gimple-fold.c (get_range_strlen): Remove dead code.
686 2018-10-02 Martin Sebor <msebor@redhat.com>
687 Jeff Law <law@redhat.com>
689 * builtins.c (unterminated_array): Add new arguments.
690 If argument is not terminated, bubble up size and exact
692 (expand_builtin_strnlen): Detect, avoid expanding
693 and diagnose unterminated arrays.
694 (c_strlen): Fill in offset of start of unterminated strings.
695 * builtins.h (unterminated_array): Update prototype.
697 2018-10-02 Richard Biener <rguenther@suse.de>
699 * config/i386/sse.md (reduc_plus_scal_v4df): Avoid the use
700 of haddv4df, first reduce to SSE width and exploit the fact
701 that we only need element zero with the reduction result.
702 (reduc_plus_scal_v2df): Likewise.
704 2018-10-02 Eric Botcazou <ebotcazou@adacore.com>
706 * dojump.h (do_jump): Delete.
707 (do_jump_1): Likewise.
708 (split_comparison): Move around.
709 * dojump.c (do_jump): Make static.
710 (do_jump_1): Likewise.
711 (jumpifnot): Move around.
712 (jumpifnot_1): Likewise.
714 (jumpif_1): Likewise.
715 * expr.c (expand_expr_real_1): Call jumpif[not] instead of do_jump.
717 2018-10-02 Eric Botcazou <ebotcazou@adacore.com>
719 * reorg.c (make_return_insns): Use emit_copy_of_insn_after for the
720 insns in the delay slot and add_insn_after for the jump insn.
722 2018-10-02 Richard Biener <rguenther@suse.de>
724 * tree-inline.c (expand_call_inline): Use the location of
725 the callee declaration for the inline-entry marker.
726 * final.c (notice_source_line): Remove special-casing of
727 NOTE_INSN_INLINE_ENTRY.
729 2018-10-01 Carl Love <cel@us.ibm.com>
732 * config/rs6000/rs6000-builtin.def (__builtin_mffsl): New.
733 (__builtin_mtfsb0): New.
734 (__builtin_mtfsb1): New.
735 ( __builtin_set_fpscr_rn): New.
736 (__builtin_set_fpscr_drn): New.
737 * config/rs6000/rs6000.c (rs6000_expand_mtfsb_builtin): Add.
738 (rs6000_expand_set_fpscr_rn_builtin): Add.
739 (rs6000_expand_set_fpscr_drn_builtin): Add.
740 (rs6000_expand_builtin): Add case statement entries for
741 RS6000_BUILTIN_MTFSB0, RS6000_BUILTIN_MTFSB1,
742 RS6000_BUILTIN_SET_FPSCR_RN, RS6000_BUILTIN_SET_FPSCR_DRN,
743 RS6000_BUILTIN_MFFSL.
744 (rs6000_init_builtins): Add ftype initialization and def_builtin
745 calls for __builtin_mffsl, __builtin_mtfsb0, __builtin_mtfsb1,
746 __builtin_set_fpscr_rn, __builtin_set_fpscr_drn.
747 * config/rs6000.md (rs6000_mtfsb0, rs6000_mtfsb1, rs6000_mffscrn,
748 rs6000_mffscdrn): Add define_insn.
749 (rs6000_set_fpscr_rn, rs6000_set_fpscr_drn): Add define_expand.
750 * doc/extend.texi: Add documentation for the builtins.
752 2018-10-01 Richard Biener <rguenther@suse.de>
754 PR tree-optimization/87465
755 * tree-ssa-loop-ivcanon.c (tree_estimate_loop_size): Fix typo
756 causing branch miscounts.
758 2018-10-01 Tamar Christina <tamar.christina@arm.com>
760 * common/config/aarch64/aarch64-common.c (TARGET_OPTION_DEFAULT_PARAM,
761 aarch64_option_default_param): New.
763 (TARGET_OPTION_VALIDATE_PARAM, aarch64_option_validate_param): New.
764 * config/aarch64/aarch64.c (aarch64_override_options_internal): Simplify
765 stack-clash protection validation code.
767 2018-10-01 Tamar Christina <tamar.christina@arm.com>
769 * params.c (validate_param): New.
770 (add_params): Use it.
771 (set_param_value): Refactor param validation into validate_param.
772 (diagnostic.h): Include.
773 * diagnostic.h (diagnostic_ready_p): New.
775 2018-10-01 Tamar Christina <tamar.christina@arm.com>
777 * params.c (set_param_value):
778 Add index of parameter being validated.
779 * common/common-target.def (option_validate_param): New.
780 * common/common-targhooks.h (default_option_validate_param): New.
781 * common/common-targhooks.c (default_option_validate_param): New.
782 * doc/tm.texi.in (TARGET_OPTION_VALIDATE_PARAM): New.
783 * doc/tm.texi: Regenerate.
785 2018-10-01 Tamar Christina <tamar.christina@arm.com>
788 * config/aarch64/aarch64.c (aarch64_override_options_internal):
789 Add validation for stack-clash parameters and set defaults.
791 2018-10-01 Tamar Christina <tamar.christina@arm.com>
794 * configure.ac: Add stack-clash-protection-guard-size.
795 * doc/install.texi: Document it.
796 * config.in (DEFAULT_STK_CLASH_GUARD_SIZE): New.
797 * params.def: Update comment for guard-size.
798 (PARAM_STACK_CLASH_PROTECTION_GUARD_SIZE,
799 PARAM_STACK_CLASH_PROTECTION_PROBE_INTERVAL): Update description.
800 * configure: Regenerate.
802 2018-10-01 Tamar Christina <tamar.christina@arm.com>
805 * config/aarch64/aarch64.h (STACK_CLASH_MIN_BYTES_OUTGOING_ARGS,
806 STACK_DYNAMIC_OFFSET): New.
807 * config/aarch64/aarch64.c (aarch64_layout_frame):
808 Update outgoing args size.
809 (aarch64_stack_clash_protection_alloca_probe_range,
810 TARGET_STACK_CLASH_PROTECTION_ALLOCA_PROBE_RANGE): New.
812 2018-10-01 Tamar Christina <tamar.christina@arm.com>
815 * explow.c (anti_adjust_stack_and_probe_stack_clash): Support custom
817 * target.def (stack_clash_protection_alloca_probe_range): New.
818 (stack_clash_protection_final_dynamic_probe): Remove.
819 * targhooks.h (default_stack_clash_protection_alloca_probe_range) New.
820 (default_stack_clash_protection_final_dynamic_probe): Remove.
821 * targhooks.c: Likewise.
822 * doc/tm.texi.in (TARGET_STACK_CLASH_PROTECTION_ALLOCA_PROBE_RANGE): New.
823 (TARGET_STACK_CLASH_PROTECTION_FINAL_DYNAMIC_PROBE): Remove.
824 * doc/tm.texi: Regenerate.
826 2018-10-01 Tamar Christina <tamar.christina@arm.com>
829 * config/aarch64/aarch64-protos.h (aarch64_output_probe_sve_stack_clash): New.
830 * config/aarch64/aarch64.c (aarch64_output_probe_sve_stack_clash,
831 aarch64_clamp_to_uimm12_shift): New.
832 (aarch64_allocate_and_probe_stack_space): Add SVE specific section.
833 * config/aarch64/aarch64.md (probe_sve_stack_clash): New.
835 2018-10-01 Tamar Christina <tamar.christina@arm.com>
838 * config/aarch64/aarch64.c (aarch64_layout_frame): Add assert.
840 2018-10-01 Jeff Law <law@redhat.com>
841 Richard Sandiford <richard.sandiford@linaro.org>
842 Tamar Christina <tamar.christina@arm.com>
845 * config/aarch64/aarch64.md
846 (probe_stack_range): Add k (SP) constraint.
847 * config/aarch64/aarch64.h (STACK_CLASH_CALLER_GUARD,
848 STACK_CLASH_MAX_UNROLL_PAGES): New.
849 * config/aarch64/aarch64.c (aarch64_output_probe_stack_range): Emit
850 stack probes for stack clash.
851 (aarch64_allocate_and_probe_stack_space): New.
852 (aarch64_expand_prologue): Use it.
853 (aarch64_expand_epilogue): Likewise and update IP regs re-use criteria.
854 (aarch64_sub_sp): Add emit_move_imm optional param.
856 2018-10-01 MCC CS <deswurstes@users.noreply.github.com>
858 PR tree-optimization/87261
859 * match.pd: Remove trailing whitespace.
860 Add (x & y) | ~(x | y) -> ~(x ^ y),
861 (~x | y) ^ (x ^ y) -> x | ~y and (x ^ y) | ~(x | y) -> ~(x & y)
863 2018-10-01 Claudiu Zissulescu <claziss@synopsys.com>
865 * config/arc/arc.md (*add_n): Clean up pattern, update instruction
867 (ashlsi3_insn): Update instruction constraints.
868 (ashrsi3_insn): Likewise.
870 (add_shift): Likewise.
871 * config/arc/constraints.md (Csz): New 32 bit constraint. It
872 avoids placing in the limm field small constants which, otherwise,
873 could end into a small instruction.
875 2018-10-01 Claudiu Zissulescu <claziss@synopsys.com>
877 * config/arc/arc.md (maddsidi4_split): Don't use dmac if the
878 destination register is not odd-even.
879 (umaddsidi4_split): Likewise.
881 2018-10-01 Richard Biener <rguenther@suse.de>
883 * tree-inline.c (expand_call_inline): Store origin of fn
884 in BLOCK_ABSTRACT_ORIGIN for the inline BLOCK.
885 * tree.c (block_ultimate_origin): Simplify and do some
888 2018-09-30 Uros Bizjak <ubizjak@gmail.com>
890 * config/i386/mmx.md (EMMS): New int iterator.
891 (emms): New int attribute.
892 (mmx_<emms>): Macroize insn from *mmx_emms and *mmx_femms using
893 EMMS int iterator. Explicitly declare clobbers.
894 (mmx_emms): Remove expander.
896 * config/i386/predicates.md (emms_operation): Remove predicate.
897 (vzeroall_pattern): New predicate.
898 (vzeroupper_pattern): Rename from vzeroupper_operation.
899 * config/i386/i386.c (ix86_avx_u128_mode_after): Use
900 vzeroupper_pattern and vzeroall_pattern predicates.
902 2018-09-30 Peter Bergner <bergner@linux.ibm.com>
904 PR rtl-optimization/86939
905 * ira-lives.c (make_hard_regno_born): Rename from this...
906 (make_hard_regno_live): ... to this. Remove update to conflict
907 information. Update function comment.
908 (make_hard_regno_dead): Add conflict information update. Update
910 (make_object_born): Rename from this...
911 (make_object_live): ... to this. Remove update to conflict information.
912 Update function comment.
913 (make_object_dead): Add conflict information update. Update function
915 (mark_pseudo_regno_live): Call make_object_live.
916 (mark_pseudo_regno_subword_live): Likewise.
917 (mark_hard_reg_dead): Update function comment.
918 (mark_hard_reg_live): Call make_hard_regno_live.
919 (process_bb_node_lives): Likewise.
920 * lra-lives.c (make_hard_regno_born): Rename from this...
921 (make_hard_regno_live): ... to this. Remove update to conflict
922 information. Remove now uneeded check_pic_pseudo_p argument.
923 Update function comment.
924 (make_hard_regno_dead): Add check_pic_pseudo_p argument and add update
925 to conflict information. Update function comment.
926 (mark_pseudo_live): Remove update to conflict information. Update
928 (mark_pseudo_dead): Add conflict information update.
929 (mark_regno_live): Call make_hard_regno_live.
930 (mark_regno_dead): Call make_hard_regno_dead with new arguement.
931 (process_bb_lives): Call make_hard_regno_live and make_hard_regno_dead.
933 2018-09-29 H.J. Lu <hongjiu.lu@intel.com>
936 * config/i386/i386.c (construct_container): Use TImode for
937 BLKmode values in 2 integer registers.
939 2018-09-29 Jeff Law <law@redhat.com>
941 * builtins.c (unterminated_array): Pass in c_strlen_data * to
942 c_strlen rather than just a tree *.
943 (c_strlen): Change NONSTR argument to a c_strlen_data pointer.
944 Update recursive calls appropriately. If caller did not provide a
945 suitable data pointer, create a local one. When a non-terminated
946 string is discovered, bubble up information about the string via the
947 c_strlen_data object.
948 * builtins.h (c_strlen): Update prototype.
949 (c_strlen_data): New structure.
950 * gimple-fold.c (get_range_strlen): Update calls to c_strlen.
951 For a type 2 call, if c_strlen indicates a non-terminated string
952 use the length of the non-terminated string.
953 (gimple_fold_builtin_stpcpy): Update calls to c_strlen.
955 2018-09-29 Jakub Jelinek <jakub@redhat.com>
958 * config/i386/avx512fintrin.h (_mm512_abs_pd, _mm512_mask_abs_pd): Use
959 __m512d type for __A argument rather than __m512.
961 2018-09-28 John David Anglin <danglin@gcc.gnu.org>
963 * match.pd (simple_comparison): Don't optimize if either operand is
964 a function pointer when target needs function pointer canonicalization.
966 2018-09-28 Segher Boessenkool <segher@kernel.crashing.org>
968 * config/rs6000/driver-rs6000.c (asm_names): Adjust the entries for
969 power5 .. power9 to remove indirection.
970 * config/rs6000/rs6000.h (ASM_CPU_POWER5_SPEC, ASM_CPU_POWER6_SPEC,
971 ASM_CPU_POWER7_SPEC, ASM_CPU_POWER8_SPEC, ASM_CPU_POWER9_SPEC,
972 ASM_CPU_476_SPEC): Delete.
973 (ASM_CPU_SPEC): Adjust.
974 (EXTRA_SPECS): Delete asm_cpu_power5, asm_cpu_power6, asm_cpu_power7,
975 asm_cpu_power8, asm_cpu_power9, asm_cpu_476.
977 2018-09-28 Segher Boessenkool <segher@kernel.crashing.org>
979 * config.in: Delete HAVE_AS_DCI.
980 * config/powerpcspe/powerpcspe.h: Treat HAVE_AS_DCI as always true.
981 * config/rs6000/rs6000.h: Ditto.
982 * configure.ac: Delete HAVE_AS_DCI.
983 * configure: Regenerate.
985 2018-09-28 Segher Boessenkool <segher@kernel.crashing.org>
987 * config.in (HAVE_AS_LWSYNC): Delete.
988 * config/powerpcspe/powerpcspe.h (TARGET_LWSYNC_INSTRUCTION): Delete.
989 * config/powerpcspe/sync.md (*lwsync): Always generate lwsync, never
991 * config/rs6000/rs6000.h (TARGET_LWSYNC_INSTRUCTION): Delete.
992 * config/rs6000/sync.md (*lwsync): Always generate lwsync, never do it
994 * configure.ac: Delete HAVE_AS_LWSYNC.
995 * configure: Regenerate.
997 2018-09-28 Eric Botcazou <ebotcazou@adacore.com>
998 Pierre-Marie de Rodat <derodat@adacore.com>
1000 * calls.c (expand_call): Try to do a tail call for thunks at -O0 too.
1001 * cgraph.h (struct cgraph_thunk_info): Add indirect_offset.
1002 (cgraph_node::create_thunk): Add indirect_offset parameter.
1003 (thunk_adjust): Likewise.
1004 * cgraph.c (cgraph_node::create_thunk): Add indirect_offset parameter
1005 and initialize the corresponding field with it.
1006 (cgraph_node::dump): Dump indirect_offset field.
1007 * cgraphclones.c (duplicate_thunk_for_node): Deal with indirect_offset.
1008 * cgraphunit.c (cgraph_node::analyze): Be prepared for external thunks.
1009 (thunk_adjust): Add indirect_offset parameter and deal with it.
1010 (cgraph_node::expand_thunk): Deal with the indirect_offset field and
1011 pass it to thunk_adjust. Do not call the target hook if it's non-zero
1012 or if the thunk is external or local. Fix formatting. Do not chain
1013 the RESULT_DECL to BLOCK_VARS. Pass the static chain to the target,
1014 if any, in the GIMPLE representation.
1015 * ipa-icf.c (sem_function::equals_wpa): Deal with indirect_offset.
1016 * lto-cgraph.c (lto_output_node): Write indirect_offset field.
1017 (input_node): Read indirect_offset field.
1018 * tree-inline.c (expand_call_inline): Pass indirect_offset field in the
1019 call to thunk_adjust.
1020 * tree-nested.c (struct nesting_info): Add thunk_p field.
1021 (create_nesting_tree): Set it.
1022 (convert_all_function_calls): Copy static chain from targets to thunks.
1023 (finalize_nesting_tree_1): Return early for thunks.
1024 (unnest_nesting_tree_1): Do not finalize thunks.
1025 (gimplify_all_functions): Do not gimplify thunks.
1027 2018-09-28 David Malcolm <dmalcolm@redhat.com>
1029 * opt-suggestions.c (option_proposer::build_option_suggestions):
1030 Release "option_values".
1032 2018-09-28 David Malcolm <dmalcolm@redhat.com>
1034 * coverage.c (get_coverage_counts): Convert problem-reporting dump
1035 messages from MSG_OPTIMIZED_LOCATIONS to MSG_MISSED_OPTIMIZATION.
1036 * dumpfile.c (kind_as_string): New function.
1037 (dump_loc): Rather than a hardcoded prefix of "note: ", use
1038 kind_as_string to vary the prefix based on dump_kind.
1039 (selftest::test_capture_of_dump_calls): Update for above.
1041 2018-09-28 Uros Bizjak <ubizjak@gmail.com>
1043 * config/i386/i386.h (SSE_REGNO): Fix check for FIRST_REX_SSE_REG.
1044 (GET_SSE_REGNO): Rename from SSE_REGNO. Update all uses for rename.
1046 2018-09-28 Uros Bizjak <ubizjak@gmail.com>
1048 * config/i386/i386.h (CC_REGNO): Remove FPSR_REG.
1049 * config/i386/i386.c (ix86_fixed_condition_code_regs): Use
1050 INVALID_REGNUM instead of FPSR_REG.
1051 (ix86_md_asm_adjust): Do not clobber FPSR_REG.
1052 * config/i386/i386.md: Update comment of FP compares.
1053 (fldenv): Do not clobber FPSR_REG.
1055 2018-09-28 Richard Biener <rguenther@suse.de>
1057 * tree.h (BLOCK_ORIGIN): New.
1058 * omp-expand.c (grid_expand_target_grid_body): Assign
1059 BLOCK_ORIGIN to BLOCK_ABSTRACT_ORIGIN.
1060 * tree-inline.c (remap_block): Likewise.
1061 * auto-profile.c (get_function_decl_from_block): Simplify
1062 by eliding the BLOCK_ABSTRACT_ORIGIN chasing.
1063 * langhooks.c (lhd_print_error_function): Likewise.
1064 * optinfo-emit-json.cc (optrecord_json_writer::inlining_chain_to):
1066 * tree-ssa-live.c (remove_unused_scope_block_p): Likewise.
1067 * tree.c (block_nonartificial_location): Likewise.
1068 (block_ultimate_origin): Likewise.
1069 * tree-pretty-print.c (percent_K_format): Likewise. Remove
1070 no longer needed LTO case.
1072 2018-09-28 Andrew Stubbs <ams@codesourcery.com>
1073 Jan Hubicka <jh@suse.cz>
1074 Martin Jambor <mjambor@suse.cz>
1076 * simplify-rtx.c (simplify_merge_mask): New function.
1077 (simplify_ternary_operation): Use it, also see if VEC_MERGEs with the
1078 same masks are used in op1 or op2.
1079 (test_vec_merge): New function.
1080 (test_vector_ops): Call test_vec_merge.
1082 2018-09-28 Eric Botcazou <ebotcazou@adacore.com>
1084 * config/sparc/sparc-protos.h (sparc_branch_cost): Declare.
1085 * config/sparc/sparc.h (BRANCH_COST): Call sparc_branch_cost.
1086 * config/sparc/sparc.c (struct processor_costs): Add branch_cost field.
1087 (cypress_costs): Set it.
1088 (supersparc_costs): Likewise.
1089 (hypersparc_costs): Likewise.
1090 (leon_cost): Likewise.
1091 (leon3_costs): Likewise.
1092 (sparclet_costs): Likewise.
1093 (ultrasparc_costs): Likewise.
1094 (ultrasparc_costs): Likewise.
1095 (niagara_costs): Likewise.
1096 (niagara2_costs): Likewise.
1097 (niagara3_costs): Likewise.
1098 (niagara4_costs): Likewise.
1099 (niagara7_costs): Likewise.
1100 (m8_costs): Likewise.
1101 (TARGET_CAN_FOLLOW_JUMP): Define.
1102 (pass_work_around_errata::gate): Minor tweak.
1103 (sparc_option_override): Remove MASK_FSMULD mask for V7 processors.
1104 Do not set both MASK_VIS4 and MASK_VIS4B for M8 processor.
1105 Automaitcally clear MASK_FSMULD mask for V7 processors.
1106 (sparc_can_follow_jump): New static function.
1107 (output_ubranch): Deal with CROSSING_JUMP_P.
1108 (sparc_use_sched_lookahead): Rewrite using switch statement.
1109 (sparc_issue_rate): Reorder.
1110 (sparc_branch_cost): New function.
1112 2018-09-27 Martin Sebor <msebor@redhat.com>
1114 * tree.h (tree_to_shwi): Add attribute nonnull and pure.
1115 (tree_to_poly_int64, tree_to_uhwi, tree_to_poly_uint64): Same.
1116 (int_fits_type_p): Same.
1118 2018-09-27 Uros Bizjak <ubizjak@gmail.com>
1120 * config/i386/i386.md (FPCR_REG): Remove.
1121 (UNSPEC_FLDCW): Remove.
1122 (x86_fnstcw_1): Use (const_int 0) instead of FPCR_REG.
1123 (x86_fldcw_1): Remove insn pattern.
1124 (fnstenv): Do not clobber FPCR_REG.
1126 * config/i386/i386.h (FIXED_REGISTERS) Remove fpsr register.
1127 (CALL_USED_REGISTERS): Ditto.
1128 (REG_ALLOC_ORDER): Ditto.
1129 (REG_CLASS_CONTENTS): Ditto.
1130 (HI_REGISTER_NAMES): Ditto.
1131 (ADDITIONAL_REGISTER_NAMES): Use defines instead
1132 of numerical constants.
1133 * config/i386/i386.c (regclass_map): Remove fpsr register.
1134 (dbx_register_map): Ditto.
1135 (dbx64_register_map): Ditto.
1136 (svr4_dbx_register_map): Ditto.
1137 (print_reg): Do not handle FPCR_REG.
1139 2018-09-27 Segher Boessenkool <segher@kernel.crashing.org>
1142 * config.in (HAVE_AS_CMPB, HAVE_AS_DFP, HAVE_AS_FPRND, HAVE_AS_MFPGPR,
1143 HAVE_AS_POPCNTB, HAVE_AS_POPCNTD, HAVE_AS_POWER8, HAVE_AS_POWER9):
1144 Delete, always treat as true.
1145 * config/powerpcspe/powerpcspe.c (rs6000_option_override_internal):
1146 Ditto. Simplify remaining code.
1147 * config/powerpcspe/powerpcspe.h: Ditto.
1148 * config/rs6000/rs6000.c (rs6000_option_override_internal): Ditto.
1149 Simplify remaining code.
1150 (rs6000_expand_builtin): Ditto.
1151 * config/rs6000/rs6000.h: Ditto.
1152 * configure.ac: Ditto.
1153 * configure: Regenerate.
1155 2018-09-27 Martin Liska <mliska@suse.cz>
1157 * coverage.c (get_coverage_counts): Revert the formatting
1158 of missing profile opt info.
1160 2018-09-27 Richard Biener <rguenther@suse.de>
1164 * dwarf2out.c (set_block_origin_self): Do not mark outermost
1165 block as we do not output that.
1166 (gen_inlined_subroutine_die): Elide the originally outermost
1167 block, matching what we do for concrete instances.
1168 (decls_for_scope): Add parameter specifying whether to recurse
1171 2018-09-27 Andrew Stubbs <ams@codesourcery.com>
1172 Tom de Vries <tom@codesourcery.com>
1176 * expmed.c (emit_cstore): Fix handling of result_mode == BImode and
1177 STORE_FLAG_VALUE == 1.
1179 2018-09-27 Andreas Krebbel <krebbel@linux.ibm.com>
1181 * config/s390/s390.md (PPA_TX_ABORT, PPA_OOO_BARRIER): New
1182 constant definitions.
1183 ("tx_assist"): Replace magic number with PPA_TX_ABORT.
1184 ("*ppa"): Enable pattern also for -march=zEC12 -mno-htm.
1185 ("speculation_barrier"): New expander definition.
1187 2018-09-26 Indu Bhagat <indu.bhagat@oracle.com>
1189 PR gcov-profile/86957
1190 * common.opt: New warning option -Wmissing-profile.
1191 * coverage.c (get_coverage_counts): Add warning for missing .gcda file.
1192 * doc/invoke.texi: Document -Wmissing-profile.
1194 2018-09-26 Jim Wilson <jimw@sifive.com>
1196 * config/riscv/riscv.md (subsi3_extended2): Add J constraint.
1197 (negdi2, negsi2, negsi2_extended, negsi2_extended2): New.
1199 2018-09-26 Martin Sebor <msebor@redhat.com>
1201 * tree.c (zerop): Change return type to bool.
1202 (integer_zerop, integer_onep, integer_each_onep): Same.
1203 (integer_all_onesp, integer_minus_onep, integer_pow2p): Same.
1204 (integer_nonzerop, integer_truep, tree_ctz, real_zerop): Same.
1205 (real_onep, real_minus_onep, chain_index): Same.
1206 (print_type_hash_statistics, type_list_equal): Same.
1207 * tree.h (zerop): Same.
1208 (zerop, integer_zerop, integer_onep, integer_each_onep): Same.
1209 (integer_all_onesp, integer_minus_onep, integer_pow2p): Same.
1210 (integer_nonzerop, integer_truep, tree_ctz, real_zerop): Same.
1211 (real_onep, real_minus_onep, chain_index): Same.
1212 (print_type_hash_statistics, type_list_equal): Same.
1214 2018-09-26 Jim Wilson <jimw@sifive.com>
1216 * config/riscv/riscv.h (FUNCTION_ARG_REGNO_P): Fix comment.
1218 2018-09-26 Jakub Jelinek <jakub@redhat.com>
1221 * config/i386/i386.c: Include debug.h and dwarf2out.h.
1222 (output_indirect_thunk): Emit DW_CFA_def_cfa_offset after the
1225 2018-09-25 Andrew Stubbs <ams@codesourcery.com>
1227 * builtins.c (get_builtin_sync_mem): Force address mode conversion.
1229 2018-09-26 Uros Bizjak <ubizjak@gmail.com>
1231 * config/i386/i386.h (enum reg_class): Remove FP_TOP_SSE_REGS
1232 and FP_SECOND_SSE_REGS.
1233 (REG_CLASS_NAMES): Ditto.
1234 (REG_CLASS_CONTENTS): Ditto.
1235 * config/i386/i386.c (ix86_preferred_reload_class) Do not handle
1236 FP_TOP_SSE_REGS and FP_SECOND_SSE_REGS classes.
1237 (ix86_preferred_output_reload_class): Ditto.
1238 * config/i386/i386.md (fix_trunc<mode>_i387_fisttp): Change "=&1f"
1239 clobber constraint to "=&f".
1240 (fix_truncdi_i387): Ditto.
1241 (lrintxfdi2): Ditto.
1242 (fistdi2_<rounding>): Ditto.
1243 (fpremxf4_i387): Change "=u" constraint to "=f".
1244 (fprem1xf4_i387): Ditto.
1246 (fptanxf4_i387): Ditto.
1247 (fxtractxf3_i387): Ditto.
1248 (fscalexf4_i387): Ditto.
1249 (atan2xf3): Change "u" constraint to "f".
1250 (fyl2xxf3_i387): Ditto.
1251 (fyl2xp1xf3_i387): Ditto.
1253 2018-09-26 Uros Bizjak <ubizjak@gmail.com>
1256 * config/i386/i386.h (NUM_MODES_FOR_MODE_SWITCHING): Update
1257 for removed I387_MASK_PM entity.
1260 2018-09-26 Jeff Law <law@redhat.com>
1262 2018-09-26 Alexey Neyman <stilor@att.net>
1264 * graphite.h: Include <isl/id.h> and <isl/space.h>; these
1265 headers are no longer pulled in by <isl/val.h>.
1267 2018-09-26 Richard Biener <rguenther@suse.de>
1270 * dwarf2out.c (gen_lexical_block_die): Do not equate inline
1271 or concrete instance DIE to the tree. Create abstract origin
1272 attributes also for concrete instances.
1274 2018-09-26 Alexey Neyman <stilor@att.net>
1276 * graphite.h: Include <isl/id.h> and <isl/space.h>; these
1277 headers are no longer pulled in by <isl/val.h>.
1279 2018-09-26 Matthew Malcomson <matthew.malcomson@arm.com>
1281 * config/arm/arm.c (arm_split_compare_and_swap, arm_split_atomic_op):
1282 Use new helper functions.
1283 * config/arm/sync.md (atomic_load<mode>, atomic_store<mode>):
1284 Use new helper functions.
1285 * config/arm/aarch-common-protos.h (aarch_mm_needs_acquire,
1286 aarch_mm_needs_release): New declarations.
1287 * config/arm/aarch-common.c (aarch_mm_needs_acquire,
1288 aarch_mm_needs_release): New.
1290 2018-09-26 Eric Botcazou <ebotcazou@adacore.com>
1292 * config/arm/arm.c (arm_reorg): Skip Thumb reorg pass for thunks.
1293 (arm32_output_mi_thunk): Deal with long calls.
1295 2018-09-26 Richard Biener <rguenther@suse.de>
1299 * tree-inline.c (expand_call_inline): When the location
1300 of the call is UNKNOWN_LOCATION use DECL_SOURCE_LOCATION
1301 or BUILTINS_LOCATION for the BLOCK_SOURCE_LOCATION of
1302 the inserted BLOCK to make inlined_function_outer_scope_p
1304 * dwarf2out.c (add_call_src_coords_attributes): Do not add
1305 coords for reserved locations.
1307 2018-09-25 Segher Boessenkool <segher@kernel.crashing.org>
1309 * config/rs6000/rs6000.md (*movcc_internal1): Use set_attr_alternative.
1310 (*call_indirect_nonlocal_sysv<mode>): Ditto.
1311 (*call_value_indirect_nonlocal_sysv<mode>): Ditto.
1312 (*sibcall_nonlocal_sysv<mode>): Ditto.
1313 (*sibcall_value_nonlocal_sysv<mode>): Ditto.
1314 (<bd>_<mode>): Ditto.
1315 (<bd>tf_<mode>): Ditto.
1317 2018-09-25 Segher Boessenkool <segher@kernel.crashing.org>
1319 * config/rs6000/altivec.md (*altivec_mov<mode>): Write the output
1320 control string as a list of templates instead of as C code.
1321 (*altivec_movti): Ditto.
1322 * config/rs6000/darwin.md (movdf_low_di): Ditto.
1324 2018-09-25 Jim Wilson <jimw@sifive.com>
1326 * config/riscv/riscv.c (riscv_split_symbol): Mark auipc label as weak
1327 when target symbol is weak.
1329 2018-09-25 Bernd Edlinger <bernd.edlinger@hotmail.de>
1332 * builtins.c (unterminated_array): Simplify.
1333 * expr.c (string_constant): Handle SSA_NAME. Add more exceptions
1334 where pointer arithmetic is safe.
1336 2018-09-25 Segher Boessenkool <segher@kernel.crashing.org>
1339 * config/rs6000/altivec.md (altivec_vspltb): Use
1340 const_0_to_15_operand instead of u5bit_cint_operand.
1341 (*altivec_vspltb_internal): Ditto.
1342 (altivec_vspltb_direct): Ditto.
1343 (altivec_vsplth): Use const_0_to_7_operand instead of
1345 (*altivec_vsplth_internal): Ditto.
1346 (altivec_vsplth_direct): Ditto.
1347 (altivec_vspltw): Use const_0_to_3_operand instead of
1349 (*altivec_vspltw_internal): Ditto.
1350 (altivec_vspltw_direct): Ditto.
1351 (altivec_vspltsf): Ditto.
1352 (*altivec_vspltsf_internal): Ditto.
1353 * config/rs6000/rs6000.c (rs6000_expand_binop_builtin): Handle the
1354 various splats with the proper size immediate. Reorder the various
1355 cases by ascending size of immediate, and put all such together.
1357 2018-09-25 Richard Biener <rguenther@suse.de>
1360 * dwarf2out.c (add_AT_external_die_ref): Remove now redundant
1362 (maybe_create_die_with_external_ref): Do not create
1363 DW_TAG_imported_unit here.
1364 (add_abstract_origin_attribute): Handle external BLOCK refs.
1365 (dwarf2out_abstract_function): Simplify LTO case.
1366 (dwarf2out_early_finish): Create DW_TAG_imported_unit explicitely
1367 rather than using maybe_create_die_with_external_ref.
1369 2018-09-25 Uros Bizjak <ubizjak@gmail.com>
1372 * config/i386/i386.md (frndintxf2_mask_pm): Remove.
1373 (frndintxf2_mask_pm_i387): Ditto.
1374 (nearbyintxf2): Rewrite expander pattern to match rintxf2.
1375 Enable for !flag_trapping_math.
1376 (nearbyint<mode>2): Enable x87 modes for !flag_trapping_math.
1377 Enable SSE modes for TARGET_SSE4_1 and expand them with round insn.
1378 Change operand 1 predicate to nonimmediate_operand.
1379 (attr "i387_cw"): Remove mask_pm.
1380 * config/i386/i386.h (enum ix86_stack_slot): Remove SLOT_CW_MASK_PM.
1381 (enum ix86_entity): Remove I387_MASK_PM.
1382 * config/i386/i386.c (ix86_i387_mode_needed): Do not
1383 handle I387_MASK_PM.
1384 (ix86_mode_needed): Ditto.
1385 (ix86_mode_after): Ditto.
1386 (ix86_mode_entry): Ditto.
1387 (ix86_mode_exit): Ditto.
1388 (emit_i387_cw_initialization): Do not handle I387_CW_MASK_PM.
1390 2018-09-25 Jakub Jelinek <jakub@redhat.com>
1392 * vr-values.c (vr_values::vr_values): Initialize to_remove_edges and
1393 to_update_switch_stmts to vNULL instead of calling create on them
1396 2018-09-25 Richard Biener <rguenther@suse.de>
1398 PR tree-optimization/87402
1399 * tree-ssa-sccvn.c (SSA_VISITED): Remove unused function.
1400 (visit_phi): Re-instantiate handling of supposed to be VARYING
1401 but non-VARYING backedge value.
1403 2018-09-25 Richard Biener <rguenther@suse.de>
1406 * dwarf2out.c (struct sym_off_pair): New.
1407 (external_die_map): New global.
1408 (lookup_decl_die): When in LTO create DIEs lazily from the
1410 (lookup_block_die): New function, create DIEs lazily in LTO.
1411 (equate_block_to_die): New function.
1412 (dwarf2out_die_ref_for_decl): During WPA get the association
1413 from the external DIE map.
1414 (dwarf2out_register_external_die): Record mapping into the
1416 (maybe_create_die_with_external_ref): New function split out from
1417 DIE generation part of old dwarf2out_register_external_die.
1418 (add_abstract_origin_attribute): Do not return the DIE. When
1419 in LTO reference externals directly.
1420 (dwarf2out_abstract_function): When in LTO ignore calls for
1421 decls with external DIEs (already present abstract instances).
1422 (gen_call_site_die): Adjust.
1423 (add_high_low_attributes): Likewise.
1424 (gen_lexical_block_die): Likewise.
1425 (gen_inlined_subroutine_die): Likewie.
1426 (gen_block_die): Likewise.
1427 (dwarf2out_inline_entry): Likewise.
1428 (dwarf2out_early_finish): In LTRANS phase create DW_TAG_imported_unit
1431 2018-09-25 Martin Liska <mliska@suse.cz>
1433 * ipa-fnsummary.c (estimate_node_size_and_time): Scale by two
1434 integers and not by a float value.
1436 2018-09-25 Martin Liska <mliska@suse.cz>
1439 * dbgcnt.c (dbg_cnt_process_single_pair): Return false
1441 * dumpfile.c (dump_enable_all): Remove extra parenthesis.
1442 * gcov-tool.c: Declare the function with ATTRIBUTE_NORETURN.
1443 * godump.c (go_format_type): Remove extra parenthesis.
1445 2018-09-25 Martin Liska <mliska@suse.cz>
1447 * alias.c (set_dest_equal_p): Remove unused function.
1448 * config/i386/i386.c (def_builtin_pure2): Likewise.
1449 * diagnostic-show-locus.c (class layout): Remove
1451 (layout::layout): Likewise here.
1452 * dump-context.h (class temp_dump_context): Likewise.
1453 * dwarf2out.c (add_AT_fde_ref): Remove unused function.
1454 (add_AT_loclistsptr): Likewise.
1455 (add_AT_offset): Likewise.
1456 (get_AT_hi_pc): Likewise.
1457 (is_comdat_die): Likewise.
1458 (type_is_enum): Likewise.
1459 (ceiling): Likewise.
1460 (add_AT_vms_delta): Likewise.
1461 (is_class_die): Likewise.
1462 * edit-context.c (class line_event): Remove unused field.
1463 * graphite-sese-to-poly.c (tree_int_to_gmp): Remove
1465 * ipa-cp.c (ipa_get_vr_lat): Likewise.
1466 * lra-constraints.c (ok_for_index_p_nonstrict): Likewise.
1467 (ok_for_base_p_nonstrict): Likewise.
1468 * tree-chrec.c (is_not_constant_evolution): Likewise.
1469 (chrec_fold_poly_cst): Likewise.
1470 * tree-if-conv.c (has_pred_critical_p): Likewise.
1471 * tree-ssa-coalesce.c (print_exprs): Likewise.
1472 * tree-ssa-pre.c (bitmap_set_contains_expr): Likewise.
1473 * tree-ssa-uninit.c (is_and_or_or_p): Likewise.
1474 * tree-vrp.c (value_ranges_intersect_p): Likewise.
1475 (value_range_nonnegative_p): Likewise.
1477 2018-09-25 Martin Liska <mliska@suse.cz>
1479 * config/powerpcspe/powerpcspe.c (rs6000_output_function_epilogue):
1480 Do not handle "GNU Pascal".
1481 * config/rs6000/rs6000.c (rs6000_output_function_epilogue):
1483 * config/sparc/sparc.c (sparc_pass_by_reference): Remove Pascal
1484 from documentation. Likewise.
1485 * dbxout.c (dbxout_range_type): Likewise.
1486 * doc/cpp.texi: Likewise.
1487 * doc/extend.texi: Likewise.
1488 * doc/frontends.texi: Likewise.
1489 * doc/invoke.texi: Remove Pascal entry.
1490 * tree.def (CLEANUP_POINT_EXPR): Likewise.
1491 * doc/rtl.texi (MODE_FUNCTION): Remove not used entry.
1493 2018-09-25 Martin Liska <mliska@suse.cz>
1496 * doc/invoke.texi: Document all parameters and remove default
1499 2018-09-25 Ilya Leoshkevich <iii@linux.ibm.com>
1502 * rtl.c (rtx_code_size): Take into account that EQ_ATTR_ALT
1503 contains HOST_WIDE_INTs when computing its size.
1505 2018-09-24 Jim Wilson <jimw@sifive.com>
1508 * config/riscv/riscv.h (STACK_BOUNDARY): Test riscv_abi == ABI_ILP32E
1510 (ABI_STACK_BOUNDARY, MAX_ARGS_IN_REGISTERS): Likewise.
1512 2018-09-24 Andrew Pinski <apinski@marvell.com>
1514 * config/aarch64/aarch64.c (aarch_macro_fusion_pair_p): Don't
1515 access prev before checking it for NULLness in the
1516 AARCH64_FUSE_CMP_BRANCH case.
1518 2018-09-24 H.J. Lu <hongjiu.lu@intel.com>
1521 * config/i386/i386.c (rest_of_insert_endbranch): Set
1522 endbr_queued_at_entrance to true and don't insert ENDBR if
1523 x86_function_profiler will be called.
1524 (x86_function_profiler): Insert ENDBR if endbr_queued_at_entrance
1526 * config/i386/i386.h (machine_function): Add
1527 endbr_queued_at_entrance.
1529 2018-09-24 Ilya Leoshkevich <iii@linux.ibm.com>
1531 * genattrtab.c (mk_attr_alt): Use alternative_mask.
1532 (attr_rtx_1): Adjust caching to match the new EQ_ATTR_ALT field
1534 (check_attr_test): Use alternative_mask.
1535 (get_attr_value): Likewise.
1536 (compute_alternative_mask): Use alternative_mask and XWINT.
1537 (make_alternative_compare): Use alternative_mask.
1538 (attr_alt_subset_p): Use XWINT.
1539 (attr_alt_subset_of_compl_p): Likewise.
1540 (attr_alt_intersection): Use alternative_mask and XWINT.
1541 (attr_alt_union): Likewise.
1542 (attr_alt_complement): Use HOST_WIDE_INT and XWINT.
1543 (mk_attr_alt): Use alternative_mask and HOST_WIDE_INT.
1544 (simplify_test_exp): Use alternative_mask and XWINT.
1545 (write_test_expr): Use alternative_mask and XWINT, adjust bit
1546 number calculation to support 64 bits. Generate code that
1547 checks 64-bit masks.
1548 (main): Use alternative_mask.
1549 * rtl.def (EQ_ATTR_ALT): Change field types from ii to ww.
1551 2018-09-24 Ilya Leoshkevich <iii@linux.ibm.com>
1554 * config/s390/s390.c (s390_emit_epilogue): Do not use PARALLEL
1555 RETURN+USE when returning via %r14.
1557 2018-09-24 Martin Liska <mliska@suse.cz>
1559 * gcov.c (output_lines): Print colorization legend
1560 for both flag_use_colors and flag_use_hotness_colors.
1563 2018-09-24 Martin Liska <mliska@suse.cz>
1565 * coverage.c (get_coverage_counts): Use warning_at
1566 with current_function_decl location. Use %qD in warning
1569 2018-09-24 Martin Liska <mliska@suse.cz>
1571 * memory-block.h (memory_block_pool::release): Annotate with
1572 valgrind that the memory is not accessible.
1574 2018-09-24 Martin Liska <mliska@suse.cz>
1577 * asan.c: Make asan_handled_variables extern.
1579 * cfgexpand.c (expand_stack_vars): Make sure
1580 a representative is unpoison if another
1581 variable in the partition is handled by
1582 use-after-scope sanitization.
1584 2018-09-24 Richard Biener <rguenther@suse.de>
1586 PR tree-optimization/63155
1587 * tree-ssa-propagate.c (add_ssa_edge): Avoid adding PHIs to
1588 the worklist when the edge of the respective argument isn't
1591 2018-09-23 Uros Bizjak <ubizjak@gmail.com>
1593 * config/i386/i386.h (enum reg_class): Rename MASK_REGS to
1594 ALL_MASK_REGS and MASK_EVEX_REGS to MASK_REGS.
1595 (MASK_CLASS_P): Update for rename.
1596 (MAYBE_MASK_CLASS_P): Ditto.
1597 (REG_CLASS_NAMES): Update.
1598 (REG_CLASS_CONTENT): Update.
1599 * config/i386/i386.c (regclass_map): Update for MASK_REG
1600 and ALL_MASK_REGS rename.
1601 * config/i386/constraints.md (Yk): Update for rename.
1604 2018-09-23 Uros Bizjak <ubizjak@gmail.com>
1606 * config/i386/i386.h (enum reg_class): Remove
1607 EVEX_SSE_REGS and MOD4_SSE_REGS.
1608 (REG_CLASS_NAMES): Update.
1609 (REG_CLASS_CONTENT): Update.
1610 * config/i386/i386.c (regclass_map): Declare AVX-512 SSE
1611 registers as ALL_SSE_REGS.
1612 (ix86_additional_allocno_class_p): Remove.
1613 (TARGET_ADDITIONAL_ALLOCNO_CLASS_P): Remove.
1614 (ix86_register_priority): Lower priority of EVEX SSE registers.
1615 Use IN_RANGE macro where appropriate.
1616 (ix86_hard_regno_mode_ok): Merge AVX-5124FMAPS and
1617 AVX-5124VNNIW checks.
1618 (ix86_modes_tieable_p): Tie 512-bit SSE modes.
1619 * config/i386/sse.md (avx5124fmaddps_4fmaddps)
1620 (avx5124fmaddps_4fmaddps_mask, avx5124fmaddps_4fmaddps_maskz)
1621 (avx5124fmaddps_4fmaddss, avx5124fmaddps_4fmaddss_mask)
1622 (avx5124fmaddps_4fmaddss_maskz, avx5124fmaddps_4fnmaddps)
1623 (avx5124fmaddps_4fnmaddps_mask, avx5124fmaddps_4fnmaddps_maskz)
1624 (avx5124fmaddps_4fnmaddss, avx5124fmaddps_4fnmaddss_mask)
1625 (avx5124fmaddps_4fnmaddss_maskz, avx5124vnniw_vp4dpwssd)
1626 (avx5124vnniw_vp4dpwssd_mask, avx5124vnniw_vp4dpwssd_maskz)
1627 (avx5124vnniw_vp4dpwssds, avx5124vnniw_vp4dpwssds_mask)
1628 (avx5124vnniw_vp4dpwssds_maskz): Use "v" instead of "Yh" constraint.
1629 * config/i386/constraints.md (Yh): Remove.
1631 2018-09-23 Uros Bizjak <ubizjak@gmail.com>
1633 * config/i386/i386.c (regclass_map): Declare integer REX registers
1636 2018-09-23 Gerald Pfeifer <gerald@pfeifer.com>
1638 * doc/service.texi (Service): Switch the fsf.org link to https.
1640 2018-09-22 Chung-Ju Wu <jasonwucj@gmail.com>
1643 * config/nds32/nds32.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
1644 Define to speculation_safe_value_not_needed.
1646 2018-09-21 Florian Weimer <fweimer@redhat.com>
1649 * doc/extend.texi (Common Function Attributes): Mention that
1650 noreturn suppresses tail call optimization.
1652 2018-09-21 Jeff Law <law@redhat.com>
1654 * gimple-ssa-evrp.c (evrp_dom_walker::cleanup): Call
1655 vr_values::cleanup_edges_and_switches.
1656 * tree-vrp.c (to_remove_edges, to_update_switch_stmts): Moved into
1658 (identify_jump_threads): Remove EDGE_IGNORE handling.
1659 (execute_vrp): Move handling of to_remove_edges and
1660 to_update_switch_stmts into vr_values class member functions.
1661 * tree-vrp.h (switch_update, to_remove_edges): Remove declarations.
1662 (to_update_switch_stmts): Likewise.
1663 * vr-values.c: Include cfghooks.h.
1664 (vr_values::vr_values): Initialize to_remove_edges and
1665 to_update_switch_stmts.
1666 (vr_values::~vr_values): Verify to_remove_edges and
1667 to_update_switch_stmts are empty.
1668 (vr_values::simplify_switch_using_ranges): Set EDGE_IGNORE as needed.
1669 (vr_values::cleanup_edges_and_switches): New member function.
1670 * vr-values.h (vr_values): Add cleanup_edges_and_switches member
1671 function. Add new data members.
1673 2018-09-21 David Malcolm <dmalcolm@redhat.com>
1675 PR tree-optimization/87309
1676 * dumpfile.c (dump_context::begin_scope): Filter the dump_loc
1677 calls with pflags and alt_flags.
1678 (selftest::test_capture_of_dump_calls): Add test of interaction of
1679 MSG_OPTIMIZED_LOCATIONS with AUTO_DUMP_SCOPE.
1681 2018-09-21 Olivier Hainque <hainque@adacore.com>
1683 * config.gcc: Factorize and comment inclusion of vxworks-dummy.h.
1685 2018-09-21 Olivier Hainque <hainque@adacore.com>
1687 * config/vxworks.h (CLEAR_INSN_CACHE): #define to 1.
1689 2018-09-21 Olivier Hainque <hainque@adacore.com>
1691 * config/vxworks.h (VXWORKS_LIBGCC_SPEC): Remove -lc_internal.
1692 Merge block comment with the one ahead of VXWORKS_LIBS_RTP. Then:
1693 (VXWORKS_LIBS_RTP): Minor reordering.
1695 2018-09-21 Olivier Hainque <hainque@adacore.com>
1697 * config/vxworks.h (STARTFILE_PREFIX_SPEC): Define.
1698 (VXWORKS_LIBS_DIR_RTP): Remove definition and use.
1700 2018-09-21 Olivier Hainque <hainque@adacore.com>
1702 * config/vxworks.h (SIZE_TYPE): Account for TARGET_VXWORKS64.
1703 (PTRDIFF_TYPE): Likewise.
1705 2018-09-21 Olivier Hainque <hainque@adacore.com>
1707 * config.gcc: Enforce def of TARGET_VXWORKS64 to 1 from
1708 triplet, similar to support for VxWorks7.
1709 * config/vxworks-dummy.h: Provide a default definition
1710 of TARGET_VXWORKS64 to 0.
1712 2018-09-21 Olivier Hainque <hainque@adacore.com>
1714 * config/vxworks.h (TARGET_VXWORKS7): Move default definition ...
1715 * config/vxworks-dummy.h: here.
1717 2018-09-21 Olivier Hainque <hainque@adacore.com>
1719 * config.gcc: Prepend vxworks-dummy.h to tm_file for powerpc*
1721 2018-09-21 Shaokun Zhang <zhangshaokun@hisilicon.com>
1722 Bo Zhou <zbo.zhou@hisilicon.com>
1724 * config/aarch64/aarch64-cores.def (tsv110): New CPU.
1725 * config/aarch64/aarch64-tune.md: Regenerated.
1726 * doc/invoke.texi (AArch64 Options/-mtune): Add "tsv110".
1727 * config/aarch64/aarch64.c (tsv110_tunings): New tuning table.
1728 * config/aarch64/aarch64-cost-tables.h: Add "tsv110" extra costs.
1730 2018-09-21 Andrew Stubbs <ams@codesourcery.com>
1731 Julian Brown <julian@codesourcery.com>
1733 * builtins.c (get_builtin_sync_mem): Handle address spaces.
1735 2018-09-21 Eric Botcazou <ebotcazou@adacore.com>
1737 * config/rs6000/rs6000.c (rs6000_function_ok_for_sibcall): Return false
1738 if the call takes a static chain.
1740 2018-09-21 Martin Liska <mliska@suse.cz>
1742 * auto-profile.c (autofdo_source_profile::read): Do not
1744 (read_profile): Do not add working sets.
1745 (read_autofdo_file): Remove sum_all.
1746 (afdo_callsite_hot_enough_for_early_inline): Remove const
1748 * coverage.c (struct counts_entry): Remove gcov_summary.
1749 (read_counts_file): Read new GCOV_TAG_OBJECT_SUMMARY,
1750 do not support GCOV_TAG_PROGRAM_SUMMARY.
1751 (get_coverage_counts): Remove summary and expected
1753 * coverage.h (get_coverage_counts): Likewise.
1754 * doc/gcov-dump.texi: Remove -w option.
1755 * gcov-dump.c (dump_working_sets): Remove.
1756 (main): Do not support '-w' option.
1757 (print_usage): Likewise.
1758 (tag_summary): Likewise.
1759 * gcov-io.c (gcov_write_summary): Do not dump
1761 (gcov_read_summary): Likewise.
1762 (gcov_histo_index): Remove.
1763 (gcov_histogram_merge): Likewise.
1764 (compute_working_sets): Likewise.
1765 * gcov-io.h (GCOV_TAG_OBJECT_SUMMARY): Mark
1767 (GCOV_TAG_PROGRAM_SUMMARY): Mark it obsolete.
1768 (GCOV_TAG_SUMMARY_LENGTH): Adjust.
1769 (GCOV_HISTOGRAM_SIZE): Remove.
1770 (GCOV_HISTOGRAM_BITVECTOR_SIZE): Likewise.
1771 (struct gcov_summary): Simplify rapidly just
1772 to runs and sum_max fields.
1773 (gcov_histo_index): Remove.
1774 (NUM_GCOV_WORKING_SETS): Likewise.
1775 (compute_working_sets): Likewise.
1776 * gcov-tool.c (print_overlap_usage_message): Remove
1777 trailing empty line.
1778 * gcov.c (read_count_file): Read GCOV_TAG_OBJECT_SUMMARY.
1779 (output_lines): Remove program related line.
1780 * ipa-profile.c (ipa_profile): Do not consider GCOV histogram.
1781 * lto-cgraph.c (output_profile_summary): Do not stream GCOV
1783 (input_profile_summary): Do not read it.
1784 (merge_profile_summaries): And do not merge it.
1785 (input_symtab): Do not call removed function.
1786 * modulo-sched.c (sms_schedule): Do not print sum_max.
1787 * params.def (HOT_BB_COUNT_FRACTION): Reincarnate param that was
1788 removed when histogram method was invented.
1789 (HOT_BB_COUNT_WS_PERMILLE): Mention that it's used only in LTO
1791 * postreload-gcse.c (eliminate_partially_redundant_load): Fix
1793 * predict.c (get_hot_bb_threshold): Use HOT_BB_COUNT_FRACTION
1794 and dump selected value.
1795 * profile.c (add_working_set): Remove.
1796 (get_working_sets): Likewise.
1797 (find_working_set): Likewise.
1798 (get_exec_counts): Do not work with working sets.
1799 (read_profile_edge_counts): Do not inform as sum_max is removed.
1800 (compute_branch_probabilities): Likewise.
1801 (compute_value_histograms): Remove argument for call of
1802 get_coverage_counts.
1803 * profile.h: Do not make gcov_summary const.
1805 2018-09-21 Monk Chiang <sh.chiang04@gmail.com>
1807 * config.gcc (nds32*-*-*): Set TARGET_DEFAULT_TLSDESC_TRAMPOLINE=0.
1809 2018-09-21 Eric Botcazou <ebotcazou@adacore.com>
1811 PR tree-optimization/86990
1812 * gimple-ssa-store-merging.c (imm_store_chain_info:coalesce_immediate):
1813 Check that the entire merged store group is made of constants only for
1816 2018-09-20 Allan Sandfeld Jensen <allan.jensen@qt.io>
1818 * gcc.c (LINK_COMMAND_SPEC): Handle -r like -nostdlib.
1819 (VTABLE_VERIFICATION_SPEC): Likewise.
1820 (SANITIZER_EARLY_SPEC): Likewise.
1821 (SANITIZER_SPEC): Likewise.
1822 * config/darwin.h (LINK_COMMAND_SPEC): Likewise.
1823 * doc/invoke.texi (Link Options): Document -r.
1825 2018-09-20 Richard Biener <rguenther@suse.de>
1828 * gimplify.c (gimplify_expr): Retain alignment of
1829 addressable lvalue in dereference.
1831 2018-09-20 Alexandre Oliva <aoliva@redhat.com>
1834 * configure.ac: Check for .loc is_stmt support.
1835 * configure, config.in: Rebuilt.
1836 * dwarf2out.c (dwarf2out_source_line): Skip is_stmt
1839 2018-09-20 Segher Boessenkool <segher@kernel.crashing.org>
1841 * config/rs6000/rs6000.opt (misel=no, misel=yes): Delete.
1842 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -misel=yes and
1845 2018-09-20 Segher Boessenkool <segher@kernel.crashing.org>
1847 * config/rs6000/rs6000-opts.h (enum rs6000_vector): Delete
1849 * config/rs6000/rs6000.c (rs6000_debug_vector_unit): Delete
1852 2018-09-20 Marek Polacek <polacek@redhat.com>
1854 * doc/invoke.texi: Add -Wno-init-list-lifetime to C++ Language Options.
1856 2018-09-20 Richard Sandiford <richard.sandiford@arm.com>
1858 PR tree-optimization/87288
1859 * tree-vect-loop.c (vect_analyze_loop_2): Take PEELING_FOR_GAPS
1860 into account when determining PEELING_FOR_NITERS.
1862 2018-09-20 Richard Sandiford <richard.sandiford@arm.com>
1864 PR tree-optimization/86877
1865 * tree-vect-loop.c (vect_analyze_loop_2): Call
1866 vect_verify_datarefs_alignment.
1868 2018-09-19 Marek Polacek <polacek@redhat.com>
1870 * doc/invoke.texi: Document -Wclass-conversion.
1872 2018-09-19 John David Anglin <danglin@gcc.gnu.org>
1874 * config/pa/pa.c (pa_adjust_priority): Delete.
1875 (TARGET_SCHED_ADJUST_PRIORITY): Delete define.
1877 * config/pa/pa.md (atomic_storeqi): Restore deleted expander.
1878 (atomic_storehi): Likewise.
1879 (atomic_storesi): Likewise.
1880 (atomic_loaddi): Restore compare and swap exchange loop code.
1882 2018-09-19 Segher Boessenkool <segher@kernel.crashing.org>
1884 PR rtl-optimization/86902
1885 * combine.c (try_combine): When changing the CC mode used, don't change
1886 an unrelated mode in other_insn to that new CC mode.
1888 2018-09-19 David Malcolm <dmalcolm@redhat.com>
1890 * tree-data-ref.c (runtime_alias_check_p): Use formatted printing
1891 with %T in place of calls to dump_generic_expr.
1892 (prune_runtime_alias_test_list): Likewise.
1893 (create_runtime_alias_checks): Likewise.
1894 * tree-vect-data-refs.c (vect_check_nonzero_value): Likewise.
1895 (vect_analyze_data_ref_dependence): Likewise.
1896 (vect_slp_analyze_data_ref_dependence): Likewise.
1897 (vect_record_base_alignment): Likewise. Use %G in place of call
1898 to dump_gimple_stmt.
1899 (vect_compute_data_ref_alignment): Likewise.
1900 (verify_data_ref_alignment): Likewise.
1901 (vect_find_same_alignment_drs): Likewise.
1902 (vect_analyze_group_access_1): Likewise.
1903 (vect_analyze_data_ref_accesses): Likewise.
1904 (dependence_distance_ge_vf): Likewise.
1905 (dump_lower_bound): Likewise.
1906 (vect_prune_runtime_alias_test_list): Likewise.
1907 (vect_find_stmt_data_reference): Likewise.
1908 (vect_analyze_data_refs): Likewise.
1909 (vect_create_addr_base_for_vector_ref): Likewise.
1910 (vect_create_data_ref_ptr): Likewise.
1911 * tree-vect-loop-manip.c (vect_set_loop_condition): Likewise.
1912 (vect_can_advance_ivs_p): Likewise.
1913 (vect_update_ivs_after_vectorizer): Likewise.
1914 (vect_gen_prolog_loop_niters): Likewise.
1915 (vect_prepare_for_masked_peels): Likewise.
1916 * tree-vect-loop.c (vect_determine_vf_for_stmt): Likewise.
1917 (vect_determine_vectorization_factor): Likewise.
1918 (vect_is_simple_iv_evolution): Likewise.
1919 (vect_analyze_scalar_cycles_1): Likewise.
1920 (vect_analyze_loop_operations): Likewise.
1921 (report_vect_op): Likewise.
1922 (vect_is_slp_reduction): Likewise.
1923 (check_reduction_path): Likewise.
1924 (vect_is_simple_reduction): Likewise.
1925 (vect_create_epilog_for_reduction): Likewise.
1926 (vect_finalize_reduction:): Likewise.
1927 (vectorizable_induction): Likewise.
1928 (vect_transform_loop_stmt): Likewise.
1929 (vect_transform_loop): Likewise.
1930 (optimize_mask_stores): Likewise.
1931 * tree-vect-patterns.c (vect_pattern_detected): Likewise.
1932 (vect_split_statement): Likewise.
1933 (vect_recog_over_widening_pattern): Likewise.
1934 (vect_recog_average_pattern): Likewise.
1935 (vect_determine_min_output_precision_1): Likewise.
1936 (vect_determine_precisions_from_range): Likewise.
1937 (vect_determine_precisions_from_users): Likewise.
1938 (vect_mark_pattern_stmts): Likewise.
1939 (vect_pattern_recog_1): Likewise.
1940 * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
1941 (vect_record_max_nunits): Likewise.
1942 (vect_build_slp_tree_1): Likewise.
1943 (vect_build_slp_tree_2): Likewise.
1944 (vect_print_slp_tree): Likewise.
1945 (vect_analyze_slp_instance): Likewise.
1946 (vect_detect_hybrid_slp_stmts): Likewise.
1947 (vect_detect_hybrid_slp_1): Likewise.
1948 (vect_slp_analyze_operations): Likewise.
1949 (vect_slp_analyze_bb_1): Likewise.
1950 (vect_transform_slp_perm_load): Likewise.
1951 (vect_schedule_slp_instance): Likewise.
1952 * tree-vect-stmts.c (vect_mark_relevant): Likewise.
1953 (vect_mark_stmts_to_be_vectorized): Likewise.
1954 (vect_init_vector_1): Likewise.
1955 (vect_get_vec_def_for_operand): Likewise.
1956 (vect_finish_stmt_generation_1): Likewise.
1957 (vect_check_load_store_mask): Likewise.
1958 (vectorizable_call): Likewise.
1959 (vectorizable_conversion): Likewise.
1960 (vectorizable_operation): Likewise.
1961 (vectorizable_load): Likewise.
1962 (vect_analyze_stmt): Likewise.
1963 (vect_is_simple_use): Likewise.
1964 (vect_get_vector_types_for_stmt): Likewise.
1965 (vect_get_mask_type_for_stmt): Likewise.
1966 * tree-vectorizer.c (increase_alignment): Likewise.
1968 2018-09-19 Andrew Stubbs <ams@codesourcery.com>
1970 * doc/rtl.texi: Adjust vec_select description.
1971 * simplify-rtx.c (simplify_binary_operation_1): Allow VEC_SELECT to use
1972 non-constant selectors.
1974 2018-09-19 Matthew Malcomson <matthew.malcomson@arm.com>
1976 * config/aarch64/aarch64-protos.h
1977 (aarch64_offset_9bit_signed_unscaled_p): New declaration.
1978 * config/aarch64/aarch64.md (arches): New "rcpc8_4" attribute value.
1979 (arch_enabled): Add check for "rcpc8_4" attribute value of "arch".
1980 * config/aarch64/aarch64.h (AARCH64_FL_RCPC8_4): New bitfield.
1981 (AARCH64_FL_FOR_ARCH8_4): Include AARCH64_FL_RCPC8_4.
1982 (AARCH64_FL_PROFILE): Move index so flags are ordered.
1983 (AARCH64_ISA_RCPC8_4): New flag.
1984 * config/aarch64/aarch64.c (offset_9bit_signed_unscaled_p): Renamed
1985 to aarch64_offset_9bit_signed_unscaled_p.
1986 * config/aarch64/atomics.md (atomic_store<mode>): Allow offset
1988 * config/aarch64/constraints.md (Ust): New constraint.
1989 * config/aarch64/predicates.md.
1990 (aarch64_9bit_offset_memory_operand): New predicate.
1991 (aarch64_rcpc_memory_operand): New predicate.
1993 2018-09-19 Eric Botcazou <ebotcazou@adacore.com>
1995 PR rtl-optimization/87361
1996 * rtlanal.c (nonzero_bits1): Revert accidental change.
1998 2018-09-19 Richard Biener <rguenther@suse.de>
2000 PR tree-optimization/87349
2001 PR tree-optimization/87342
2002 * tree-ssa-sccvn.c (do_rpo_vn): Iterate max_rpo computation.
2004 2018-09-18 Marek Polacek <polacek@redhat.com>
2006 P1064R0 - Allowing Virtual Function Calls in Constant Expressions
2007 * gimple-fold.c (gimple_get_virt_method_for_vtable): Adjust assert.
2009 2018-09-18 Segher Boessenkool <segher@kernel.crashing.org>
2011 * config/rs6000/rs6000.md: Remove old "Cygnus sibcall" comment.
2013 2018-09-18 Segher Boessenkool <segher@kernel.crashing.org>
2015 PR rtl-optimization/86882
2016 * rtlanal.c (reg_overlap_mentioned_p): Handle CLOBBER.
2018 2018-09-18 Uros Bizjak <ubizjak@gmail.com>
2020 * config/i386/i386.md (*<code>extend<mode>xf2): Macroize insn from
2021 *<code>extendsfxf2 and *<code>extenddfxf2 using MODEF mode iterator.
2023 2018-09-18 Jonathan Wakely <jwakely@redhat.com>
2026 * doc/invoke.texi (Link Options): Fix formatting and grammar.
2028 2018-09-18 Richard Biener <rguenther@suse.de>
2031 * tree-ssa-coalesce.c (tree_int_map_hasher): Remove.
2032 (compute_samebase_partition_bases): Likewise.
2033 (coalesce_ssa_name): Always use compute_optimized_partition_bases.
2034 (gimple_can_coalesce_p): Simplify.
2036 2018-09-18 Hans-Peter Nilsson <hp@bitrange.com>
2038 Handle a library implementation of ffs calling __builtin_ffs.
2039 * config/mmix/mmix.c (TARGET_INIT_LIBFUNCS): Override with...
2040 (mmix_init_libfuncs): New function: make __builtin_ffs expand
2043 2018-09-17 David Malcolm <dmalcolm@redhat.com>
2045 * diagnostic-show-locus.c (class layout_range): Add field
2047 (layout_range::layout_range): Add "original_idx" param and use it
2048 to initialize new field.
2049 (make_range): Use 0 for original_idx.
2050 (layout::layout): Pass in index to calls to
2051 maybe_add_location_range.
2052 (layout::maybe_add_location_range): Add param "original_idx" and
2053 pass it on to layout_range.
2054 (layout::print_any_labels): Pass on range->m_original_idx to
2056 (gcc_rich_location::add_location_if_nearby): Use 0 for
2058 * gcc-rich-location.h (text_range_label::get_text): Update for new
2060 (range_label_for_type_mismatch::get_text): Likewise.
2062 2018-09-17 Uros Bizjak <ubizjak@gmail.com>
2064 * config/i386/i386.c (ix86_emit_i387_log1p): Emit fldln2 earlier.
2066 2018-09-17 David Malcolm <dmalcolm@redhat.com>
2068 * gimple-ssa-sprintf.c (fmtwarn): Update for introduction of
2069 format_string_diagnostic_t.
2070 (fmtwarn_n): Likewise.
2071 * substring-locations.c
2072 (format_string_diagnostic_t::format_string_diagnostic_t) New ctor.
2073 (format_warning_n_va): Convert to...
2074 (format_string_diagnostic_t::emit_warning_n_va): ...this.
2075 (format_warning_va): Convert to...
2076 (format_string_diagnostic_t::emit_warning_va): ...this.
2077 (format_warning_at_substring): Convert to...
2078 (format_string_diagnostic_t::emit_warning): ...this.
2079 (format_warning_at_substring_n): Convert to...
2080 (format_string_diagnostic_t::emit_warning_n): ...this.
2081 * substring-locations.h (class format_string_diagnostic_t): New
2083 (format_warning_va): Convert to
2084 format_string_diagnostic_t::emit_warning_va.
2085 (format_warning_n_va): Convert to
2086 format_string_diagnostic_t::emit_warning_n_va.
2087 (format_warning_at_substring): Convert to
2088 format_string_diagnostic_t::emit_warning.
2089 (format_warning_at_substring_n): Convert to
2090 format_string_diagnostic_t::emit_warning_n.
2092 2018-09-17 Cesar Philippidis <cesar@codesourcery.com>
2093 Bernd Schmidt <bernds_cb1@t-online.de>
2095 * config/nvptx/nvptx.md (atomic_fetch_<logic><mode>): Enable with
2098 2018-09-17 Uros Bizjak <ubizjak@gmail.com>
2100 * config/i386/i386.md (truncxf<mode>2_i387_noop_unspec): Change
2101 operand 0 predicate to nonimmediate operand.
2102 (rint<mode>2_frndint): Remove insn pattern.
2103 (rint<mode>2): Change operand 1 predicate to general_operand.
2104 Extend operand 1 to XFmode and generate rintxf2 insn.
2105 (frndintxf2_<rounding>): Rename from frndint<mode>2_<rounding>.
2106 Do not use X87MODEF mode macro.
2107 (frndintxf2_<rounding>_i387): Rename from
2108 frndint<mode>2_<rounding>_i387. Do not use X87MODEF mode macro.
2109 (<rounding_insn><mode>2): For non-SSE modes, extend operand 1
2110 to XFmode and generate significandxf3 insn.
2112 2018-09-17 Richard Biener <rguenther@suse.de>
2114 PR tree-optimization/87328
2115 * tree-ssa-sccvn.c (process_bb): Remove assertion about not
2116 visiting unexecutable backedges when not iterating.
2117 (do_rpo_vn): Mark all edges not executable even when not
2120 2018-09-17 Martin Jambor <mjambor@suse.cz>
2123 * doc/invoke.texi (Warning Options): Likewise.
2125 2018-09-17 Richard Biener <rguenther@suse.de>
2127 PR tree-optimization/87301
2128 * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_cleanup): Properly
2129 clean EH info from leftover copy assignments.
2131 2018-09-17 Martin Liska <mliska@suse.cz>
2133 PR gcov-profile/85871
2134 * gcov.c (output_intermediate_file): Fix out of bounds
2137 2018-09-17 Vineet Gupta <vgupta@synopsys.com>
2139 * config/arc/arc.c: Object attributes for core4 not reflected
2141 * config/arc/arc.h: Don't restrict DBNZ to core3 (core4 includes
2144 2018-09-17 Alexey Brodkin <abrodkin@synopsys.com>
2146 * config/arc/linux.h (LINK_EH_SPEC): Add missing space.
2148 2018-09-17 Martin Liska <mliska@suse.cz>
2150 * doc/gcov.texi: Document new option --use-hotness-colors.
2151 * gcov.c (struct source_info): Declare new field.
2152 (source_info::source_info): Set default for maximum_count.
2153 (print_usage): Add new -q option.
2154 (process_args): Process it.
2155 (accumulate_line_info): Save src->maximum_count.
2156 (output_line_beginning): Make color line number if
2157 flag_use_hotness_colors is set.
2158 (output_line_details): Pass default argument value.
2159 (output_lines): Pass src->maximum_count.
2161 2018-09-17 Martin Liska <mliska@suse.cz>
2163 * common/config/i386/i386-common.c (ix86_get_valid_option_values):
2164 Use processor_names table.
2165 * config/i386/i386.c (ix86_default_align): Use
2166 processor_cost_table for alignment values.
2167 (ix86_option_override_internal): Use processor_names.
2168 (ix86_function_specific_print): Likewise.
2169 * config/i386/i386.h (struct processor_costs):
2170 Add alignment values.
2171 (struct ptt): Remove and replace with const char *.
2172 * config/i386/x86-tune-costs.h (struct processor_costs):
2173 Declare default alignments for all costs.
2175 2018-09-17 Aldy Hernandez <aldyh@redhat.com>
2177 * tree-vrp.c (extract_range_from_unary_expr): Do not special case
2178 symbolics or VR_VARYING ranges for ABS_EXPR.
2179 * wide-int-range.cc (wide_int_range_abs): Return positive numbers
2180 when range will wrap.
2182 2018-09-15 Eric Botcazou <ebotcazou@adacore.com>
2185 * cfgexpand.c (expand_gimple_basic_block): Be prepared for a BARRIER
2186 before and after a JUMP_TABLE_DATA.
2188 2018-09-14 John David Anglin <danglin@gcc.gnu.org>
2191 * dojump.c (do_compare_and_jump): Canonicalize function pointers
2192 when one operand is a function pointer. Use POINTER_TYPE_P and
2193 FUNC_OR_METHOD_TYPE_P.
2194 * expr.c (do_store_flag): Use POINTER_TYPE_P and FUNC_OR_METHOD_TYPE_P.
2195 * fold-const.c (build_range_check): Likewise.
2196 * match.pd (simple_comparison): Likewise.
2198 2018-09-14 David Malcolm <dmalcolm@redhat.com>
2201 * spellcheck.c (get_edit_distance_cutoff): New function.
2202 (selftest::test_edit_distance_unit_test_oneway): Rename to...
2203 (selftest::test_get_edit_distance_one_way): ...this.
2204 (selftest::test_get_edit_distance_unit): Rename to...
2205 (selftest::test_get_edit_distance_both_ways): ...this.
2206 (selftest::test_edit_distances): Move tests to this new function,
2207 and test some more pairs of strings. Update for above renaming.
2208 (selftest::get_old_cutoff): New function.
2209 (selftest::test_get_edit_distance_cutoff): New function.
2210 (selftest::assert_suggested_for): New function.
2211 (ASSERT_SUGGESTED_FOR): New macro.
2212 (selftest::assert_not_suggested_for): New function.
2213 (ASSERT_NOT_SUGGESTED_FOR): New macro.
2214 (selftest::test_suggestions): New function.
2215 (selftest::spellcheck_c_tests): Move test_get_edit_distance_unit
2216 tests to selftest::test_edit_distances and call it. Add calls to
2217 selftest::test_get_edit_distance_cutoff and
2218 selftest::test_suggestions.
2219 * spellcheck.h (get_edit_distance_cutoff): New function declaration.
2220 (best_match::consider): Replace hard-coded cutoff calculation with
2222 (best_match::get_cutoff): New declaration.
2223 (best_match::get_best_meaningful_candidate): Likewise.
2225 2018-09-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
2227 * builtins.c (fold_builtin_strlen): Remove TODO comment.
2229 2018-09-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
2232 2018-07-30 Bernd Edlinger <bernd.edlinger@hotmail.de>
2234 * tree-ssa-forwprop.c (simplify_builtin_call): Don't create a not NUL
2235 terminated string literal.
2237 2018-09-14 Martin Sebor <msebor@redhat.com>
2239 * builtins.c (unterminated_array): Handle ARRAY_REF.
2240 (expand_builtin_stpcpy_1): Detect unterminated char arrays.
2241 * builtins.h (unterminated_array): Declare extern.
2242 * gimple-fold.c (gimple_fold_builtin_stpcpy): Detect unterminated
2244 (gimple_fold_builtin_sprintf): Propagate NO_WARNING to transformed
2247 2018-09-14 Martin Sebor <msebor@redhat.com>
2248 Jeff Law <law@redhat.com>
2250 * builtins.c (unterminated_array): New.
2251 (expand_builtin_strcpy): Adjust.
2252 (expand_builtin_strcpy_args): Detect unterminated arrays.
2253 * gimple-fold.c (get_maxval_strlen): Add argument. Detect
2254 unterminated arrays.
2255 * gimple-fold.h (get_maxval_strlen): Add argument.
2256 (gimple_fold_builtin_strcpy): Detec unterminated arrays.
2258 * gimple-fold.c (get_range_strlen): Add argument.
2259 (get_maxval_strlen): Adjust.
2260 * gimple-fold.h (get_range_strlen): Add argument.
2262 2018-09-14 Wei Xiao <wei3.xiao@intel.com>
2264 * config/i386/movdirintrin.h: Fix copyright year.
2266 2018-09-14 Uros Bizjak <ubizjak@gmail.com>
2268 * reg-stack.c: Include regs.h.
2269 (replace_reg): Assert that mode is MODE_FLOAT or MODE_COMPLEX_FLOAT.
2270 (emit_pop_insn): Default pop insn mode to the reg_raw_mode of
2271 FIRST_STACK_REG, not DFmode.
2272 (emit_swap_insn): Default swap insn mode to the reg_raw_mode of
2273 FIRST_STACK_REG, not XFmode. Explicitly construct swap RTX.
2274 (change stack): Default register mode to the reg_raw_mode of
2275 FIRST_STACK_REG, not DFmode.
2276 * config/i386/i386.md (*swap<mode>): Remove insn pattern.
2277 (*swapxf): Rename from swapxf.
2279 2018-09-14 Carl Love <cel@us.ibm.com>
2281 * config/rs6000/emmintrin.h: Add _MM_SHUFFLE2.
2282 * config/rs6000/xmmintrin.h: Add _MM_SHUFFLE.
2284 2018-09-14 Segher Boessenkool <segher@kernel.crashing.org>
2287 * config/rs6000/rs6000.md (*mov<mode>_hardfloat64): Add Z to the Y
2290 2018-09-14 Sam Tebbs <sam.tebbs@arm.com>
2293 * config/aarch64/aarch64.md (*aarch64_bfxilsi_uxtw): Define.
2295 2018-09-14 Jason Merrill <jason@redhat.com>
2297 Fix --enable-gather-detailed-mem-stats.
2298 * hash-table.c (hash_table_usage): Change from variable to function.
2299 * hash-table.h: Adjust.
2300 * Makefile.in: Add missing dependencies on hash-table.h.
2302 2018-09-14 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
2304 PR tree-optimization/87259
2306 (pass_cse_reciprocals::execute): Run optimize_recip_sqrt after
2307 execute_cse_reciprocals_1 has tried transforming.
2309 2018-09-14 Aldy Hernandez <aldyh@redhat.com>
2311 * tree-vrp.c (extract_range_from_binary_expr_1): Normalize
2312 VR_VARYING for PLUS/MINUS_EXPR.
2314 2018-09-14 Ilya Leoshkevich <iii@linux.ibm.com>
2316 * config/s390/s390-passes.def (INSERT_PASS_BEFORE): Improve
2319 2018-09-14 Richard Biener <rguenther@suse.de>
2322 * tree-ssa-coalesce.c (ssa_conflicts_merge): Remove conflict
2323 bits for the merged partition.
2325 2018-09-13 Martin Sebor <msebor@redhat.com>
2326 Bernd Edlinger <bernd.edlinger@hotmail.de>
2328 * builtins.h (c_srlen): Add argument.
2329 * builtins.c (warn_string_no_nul): New function.
2330 (c_strlen): Add argument and use it. Update recursive calls.
2331 Pass DECL argument to string_constant to get info on non
2332 terminated strings. Update *NONSTR as needed.
2333 (fold_builtin_strlen): Add argument to calls to c_strlen.
2334 Warn for unterminated arrays.
2335 (warn_string_no_null): Add prototype.
2336 * expr.c (string_constant): Update arguments. Update recursive
2337 calls appropriately. Detect missing NUL terminator and outermost
2338 declaration its missing in.
2339 Improve checks for arrays with nonzero lower bound or elements
2340 that are not a single byte. Simplify offset computation.
2341 Simplify checks for non-NUL terminated strings.
2342 * gimple-fold.c (get_range_strlen): Add argument to c_strlen call.
2343 * gimple-ssa-sprintf.c (get_string_length): Remove unnecessary code.
2345 2018-09-13 Bernd Edlinger <bernd.edlinger@hotmail.de>
2347 * builtins.c (c_strlen): Handle not zero terminated STRING_CSTs
2349 * fold-const.c (c_getstr): Fix function comment. Remove unused third
2350 argument. Fix range checks.
2351 * fold-const.h (c_getstr): Adjust protoype.
2352 * gimple-fold.c (gimple_fold_builtin_memory_op): Avoid folding when
2353 string is constant but contains no NUL byte.
2355 * expr.c (string_constant): Adjust function comment.
2356 Remove bogus check for zero termination.
2358 * fold-const.c (c_getstr): Clamp STRING_LENGTH to STRING_SIZE.
2360 * varasm.c (compare_constant): Compare type size of STRING_CSTs.
2361 (get_constant_size): Don't make STRING_CSTs larger than they are.
2362 (check_string_literal): New check function for STRING_CSTs.
2363 (output_constant): Use it.
2365 2018-09-13 Eric Botcazou <ebotcazou@adacore.com>
2368 * config/visium/visium.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define.
2370 2018-09-13 Richard Biener <rguenther@suse.de>
2372 PR tree-optimization/87263
2373 * tree-ssa-sccvn.c (visit_phi): Revert some earlier changes.
2374 (struct unwind_state): Add max_rpo field.
2375 (do_rpo_vn): Allow up-to-date loop state to be used when not iterating.
2376 Compute max_rpo, the max RPO number a block can be backwards reached
2377 from. Re-write non-iterating mode to a RPO ordered worklist approach,
2378 separating it from the iterating mode.
2380 2018-09-13 Vlad Lazar <vlad.lazar@arm.com>
2382 * haifa-sched.c (rank_for_schedule): Schedule by INSN_COST.
2383 (rfs_decision): New scheduling decision.
2385 2018-09-13 Richard Biener <rguenther@suse.de>
2388 * tree-ssa-sccvn.c (vn_nary_op_insert_into): Fix assert.
2389 (vn_nary_op_insert_pieces_predicated): Do not write useless
2390 valid_dominated_by_p entry outside of the allocated storage.
2392 2018-09-13 Omar Sandoval <osandov@osandov.com>
2393 Tom de Vries <tdevries@suse.de>
2396 * dwarf2out.c (is_c): New function.
2397 (add_subscript_info): Add DW_AT_count of 0 for C zero-length arrays.
2399 2018-09-13 Sam Tebbs <sam.tebbs@arm.com>
2402 * config/aarch64/aarch64.md (*aarch64_bfxil):
2404 * config/aarch64/constraints.md (Ulc): Define.
2405 * config/aarch64/aarch64-protos.h (aarch64_high_bits_all_ones_p):
2407 * config/aarch64/aarch64.c (aarch64_high_bits_all_ones_p):
2410 2018-09-13 Vlad Lazar <vlad.lazar@arm.com>
2412 * config/aarch64/aarch64.h (TARGET_COMPUTE_FRAME_LAYOUT): Define.
2413 * config/aarch64/aarch64.c (aarch64_expand_prologue): Remove
2414 aarch64_layout_frame call.
2415 (aarch64_expand_epilogue): Likewise.
2416 (aarch64_initial_elimination_offset): Likewise.
2417 (aarch64_get_separate_components): Likewise.
2418 (aarch64_use_return_insn_p): Likewise.
2419 (aarch64_layout_frame): Remove unneeded check.
2421 2018-09-13 Jakub Jelinek <jakub@redhat.com>
2423 * configure.ac: Only append
2424 " : (reconfigured) $TOPLEVEL_CONFIGURE_ARGUMENTS" to
2425 gcc_config_arguments if it was never reconfigured or last reconfigure
2426 was with different arguments.
2427 * configure: Regenerated.
2429 2018-09-13 Jakub Jelinek <jakub@redhat.com>
2430 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
2433 * expr.c (maybe_optimize_pow2p_mod_cmp): New function.
2434 (maybe_optimize_mod_cmp): Use it if integer_pow2p treeop1.
2436 2018-09-13 Jakub Jelinek <jakub@redhat.com>
2438 PR tree-optimization/87287
2439 * fold-const.c (fold_binary_loc) <case EQ_EXPR>: Move signed modulo
2440 X % C == 0 to X % (unsigned) C == 0 optimization to ...
2441 * match.pd (X % C == 0): ... here. New optimization.
2443 2018-09-12 Jakub Jelinek <jakub@redhat.com>
2446 * expr.h (maybe_optimize_mod_cmp): Declare.
2447 * expr.c (mod_inv): New function.
2448 (maybe_optimize_mod_cmp): New function.
2449 (do_store_flag): Use it.
2450 * cfgexpand.c (expand_gimple_cond): Likewise.
2452 2018-09-09 Cesar Philippidis <cesar@codesourcery.com>
2453 Julian Brown <julian@codesourcery.com>
2456 * gimplify.c (gimplify_scan_omp_clauses): Set
2457 target_firstprivatize_array_bases in OpenACC parallel and kernels
2458 region contexts. Remove GOMP_MAP_FIRSTPRIVATE_REFERENCE clauses from
2459 OpenACC data regions.
2461 2018-09-12 Uros Bizjak <ubizjak@gmail.com>
2463 * config/i386/i386.md (sqrt_extend<mode>xf3_i387): Remove.
2464 (sqrt<mode>2): Extend operand 1 to XFmode and generate sqrtxf3 insn.
2466 2018-09-12 Richard Biener <rguenther@suse.de>
2468 PR tree-optimization/87280
2469 * tree-ssa-sccvn.c (process_bb): Handle the case of executable
2470 edge but unreachable target.
2471 (do_rpo_vn): For conservatively handling a PHI only mark
2472 the backedge executable but not the block reachable.
2474 2018-09-12 Richard Biener <rguenther@suse.de>
2476 PR tree-optimization/87266
2477 * tree-ssa-sccvn.c (do_rpo_vn): Always iterate to not yet
2480 2018-09-12 Andreas Krebbel <krebbel@linux.ibm.com>
2482 * config/s390/s390.md (PFPO_RND_MODE_DFP, PFPO_RND_MODE_BFP): New
2484 ("trunc<BFP:mode><DFP_ALL:mode>2")
2485 ("trunc<DFP_ALL:mode><BFP:mode>2")
2486 ("extend<BFP:mode><DFP_ALL:mode>2")
2487 ("extend<DFP_ALL:mode><BFP:mode>2"): Set proper rounding mode
2488 according to the target operand type.
2490 2018-09-12 Jakub Jelinek <jakub@redhat.com>
2491 Andreas Krebbel <krebbel@linux.ibm.com>
2493 PR tree-optimization/86844
2494 * gimple-ssa-store-merging.c
2495 (imm_store_chain_info::coalesce_immediate): For overlapping stores, if
2496 there are any overlapping stores in between them, make sure they are
2497 also coalesced or we give up completely.
2499 2018-09-12 Jakub Jelinek <jakub@redhat.com>
2502 * fold-const.c (fold_ternary_loc) <case COND_EXPR>: Verify also that
2503 BIT_AND_EXPR's second operand is a power of two. Formatting fix.
2505 2018-09-12 Tom de Vries <tdevries@suse.de>
2507 * common.opt (gdescribe-dies): Add option.
2508 * dwarf2out.c (add_name_and_src_coords_attributes): Add description
2509 attribute for artifical and nameless decls.
2510 (dwarf2out_register_external_die): Add description attribute to
2511 external reference die.
2512 (add_desc_attribute): New functions.
2513 (gen_subprogram_die): Add description attribute to
2514 DW_TAG_call_site_parameter.
2515 * tree-pretty-print.c (print_generic_expr_to_str): New function.
2516 * tree-pretty-print.h (print_generic_expr_to_str): Declare.
2517 * doc/invoke.texi (@item Debugging Options): Add -gdescribe-dies and
2519 (@item -gdescribe-dies): Add.
2521 2018-09-12 Aldy Hernandez <aldyh@redhat.com>
2523 * tree-vrp.c (vrp_shift_undefined_p): Remove.
2524 (extract_range_from_binary_expr_1: Call
2525 wide_int_range_shift_undefined_p instead of vrp_shift_undefined_p.
2526 * wide-int-range.h (wide_int_range_shift_undefined_p): Do not
2529 2018-09-12 Aldy Hernandez <aldyh@redhat.com>
2531 * gimple-ssa-warn-alloca.c
2532 (alloca_type_and_limit::alloca_type_and_limit): Initialize limit
2533 field for ALLOCA_BOUND_*_LARGE.
2535 2018-09-11 Nathan Sidwell <nathan@acm.org>
2537 * gcc.c (load_specs, execute, run_attempt): Use %qs not '%s'.
2539 2018-09-11 Uros Bizjak <ubizjak@gmail.com>
2541 * reg-stack.c (subst_asm_stack_regs): Call replace_reg also
2542 for clobbers. Remove obsolete comment.
2544 2018-09-11 Uros Bizjak <ubizjak@gmail.com>
2546 * config/i386/i386.md (define_attr "type"): Remove mpxmov, mpxmk,
2547 mpxchk, mpxld and mpxst types.
2548 (define_attr length_immediate): Remove all processing of mpx types.
2549 (define_attr prefix_0f): Ditto.
2550 (define_attr memory): Ditto.
2552 2018-09-11 Uros Bizjak <ubizjak@gmail.com>
2554 * config/i386/i386.md (fyl2x_extend<mode>xf3_i387): Remove.
2555 (log<mode>2): Change operand 1 predicate to general_operand.
2556 Extend operand 1 to XFmode and generate logxf3 insn.
2557 (log10<mode>2): Change operand 1 predicate to general_operand.
2558 Extend operand 1 to XFmode and generate log10xf3 insn.
2559 (log2<mode>2): Change operand 1 predicate to general_operand.
2560 Extend operand 1 to XFmode and generate log2xf3 insn.
2561 (fyl2xp1_extend<mode>xf3_i387): Remove.
2562 (log1p<mode>2): Change operand 1 predicate to general_operand.
2563 Extend operand 1 to XFmode and generate log1pxf3 insn.
2564 (fxtract_extend<mode>xf3_i387): Remove.
2565 (logb<mode>2): Change operand 1 predicate to general_operand.
2566 Extend operand 1 to XFmode and generate logbxf3 insn.
2567 (ilogb<mode>2): Change operand 1 predicate to general_operand.
2568 Extend operand 1 to XFmode and generate fxtractxf3_i387 insn.
2569 (significand<mode>2): Change operand 1 predicate to general_operand.
2570 Extend operand 1 to XFmode and generate significandxf3 insn.
2572 2018-09-11 Nathan Sidwell <nathan@acm.org>
2574 * gcc.c (perror_with_name, pfatal_with_name): Delete.
2575 (load_specs): Use fatal_error.
2576 (DELETE_IF_ORDINARY, process_command): Use error.
2577 (execute, run_attempt): Use fatal_error.
2579 2018-09-11 Andrew Stubbs <ams@codesourcery.com>
2581 * diagnostic-core.h (sorry_at): New prototype.
2582 * diagnostic.c (sorry_at): New function.
2584 2018-09-11 Aldy Hernandez <aldyh@redhat.com>
2586 * tree-vrp.c (extract_range_from_binary_expr_1): Treat all divisions
2587 by zero as VR_UNDEFINED.
2589 2018-09-10 Uros Bizjak <ubizjak@gmail.com>
2591 * config/i386/i386.md (<sincos>xf2): Rename from *<sincos>xf2_i387.
2592 (*<sincos>_extend<mode>xf2_i387): Remove insn pattern.
2593 (<sincos>mode2): New expander.
2594 (sincos_extend<mode>xf3_i387): Remove insn pattern.
2595 (sincos -> sin, cos splitters): Remove splitter patterns.
2596 (sincos<mode>3): Change operand 2 predicate to general_operand.
2597 Extend operand 2 to XFmode and generate sincosxf3 insn.
2598 (fptanxf4_i387): Change mode of operands 0 and 3 to SFmode.
2599 Change operand 3 predicate to const1_operand.
2600 (fptan_extend<mode>xf4_i387): Remove insn pattern.
2601 (tanxf2): Update operands in the call to fptanxf4_i387.
2602 (tan<mode>2): Change operand 1 predicate to general_operand.
2603 Extend operand 1 to XFmode and generate tanxf3 insn.
2604 (atan2xf3): Rename from *fpatanxf3_i387.
2605 (fpatan_extend<mode>xf3_i387): Remove insn pattern.
2606 (atan2xf3): Remove expander.
2607 (atan2<mode<3): Change operand 1 and 2 predicates to general_operand.
2608 Extend operands 1 and 2 to XFmode and generate atan2xf3 insn.
2609 (atan<mode>2): Change operand 1 predicate to general_operand.
2610 Extend operand 1 to XFmode and generate atanxf3 insn.
2612 2018-09-10 Uros Bizjak <ubizjak@gmail.com>
2614 * config/i386/i386.md (x87/SSE constant load splitter): Use
2615 memory_operand instead of nonimmediate_operand for input operand
2618 2018-09-09 Uros Bizjak <ubizjak@gmail.com>
2620 * config/i386/i386.md (float partial SSE register stall splitter): Move
2621 splitter near its instruction pattern.
2622 (float_extend partial SSE register stall splitter): Ditto.
2623 (float_truncate partial SSE register stall splitter): Ditto.
2625 2018-09-09 Hans-Peter Nilsson <hp@bitrange.com>
2628 * config/mmix/mmix.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
2629 to speculation_safe_value_not_needed.
2632 * config/mmix/mmix.c (mmix_assemble_integer): Handle byte-size
2633 non-CONST_INT rtx:es using assemble_integer_with_op ".byte".
2634 (MMIX_CFUN_NEEDS_SAVED_EH_RETURN_ADDRESS): Don't call
2635 leaf_function_p, instead use has_hard_reg_initial_val.
2637 2018-09-09 Nathan Sidwell <nathan@acm.org>
2639 * gcc.h (pfatal_with_name): Don't declare here.
2640 * gcc.c (pfatal_with_name): Make static.
2642 2018-09-09 Xianmiao Qu <xianmiao_qu@c-sky.com>
2644 * config/csky/csky.md (*cskyv2_adddi3, *cskyv2_subdi3): Add
2647 2018-09-08 John David Anglin <danglin@gcc.gnu.org>
2649 PR rtl-optimization/85458
2650 * sel-sched.c (sel_target_adjust_priority): Allow backend adjust
2651 priority hook to reduce the priority of EXPR.
2653 2018-09-07 Uros Bizjak <ubizjak@gmail.com>
2655 * config/i386/i386.md (float<SWI48x:mode><MODEF:mode>2) Enable
2656 DImode for x87 on 32bit targets. Conditionally disable x87 modes
2657 with X87_ENABLE_FLOAT. Remove preparation code.
2658 (*float<SWI48:mode><MODEF:mode>2): Rename from
2659 *float<SWI48:mode><MODEF:mode>2_mixed. Handle x87, SSE and mixed
2660 math using "enabled" attribute.
2661 (*floatdi<MODEF:mode>2_i387): Rename from
2662 *float<SWI48x:mode><MODEF:mode>2_i387. Handle only DImode and
2663 enable for 32bit targets only.
2664 (floatdi<X87MODEF:mode>2_i387_with_xmm pre-reload splitter): New
2666 (floatdi<X87MODEF:mode>2_i387_with_xmm): Use register_operand
2667 as operand 1 predicate. Rewrite as define_insn_and_split.
2668 (floatdi<X87MODEF:mode>2_i387_with_xmm memory input splitter): Remove.
2670 2018-09-06 Uros Bizjak <ubizjak@gmail.com>
2672 * reg-stack.c (get_true_reg) <case FLOAT_TRUNCATE>: Reorder
2673 to fallthru to FLOAT case.
2675 2018-09-06 Will Schmidt <will_schmidt@vnet.ibm.com>
2678 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Update logic
2679 around folding of vec_sl to handle out of range shift values.
2681 2018-09-06 Uros Bizjak <ubizjak@gmail.com>
2683 * config/i386/i386.md (fix_trunc<mode>_fisttp_i387_1): Remove.
2684 Update callers to gen_fix_trunc<mode>_i387_fisttp
2685 (fix_trunc<mode>_i387_fisttp): Change operand 0 predicate to
2686 nonimmediate_operand.
2687 (fix_trunc<mode>_i387_fisttp_with_temp): Remove insn pattern
2688 and corresponding splitters.
2689 (*fix_trunc<mode>_i387_1): Always expand with fix_trunc<mode>_i387.
2690 (fix_truncdi_i387): Change operand 0 predicate to nonimmediate_operand.
2691 (fix_truncdi_i387_with_temp): Remove insn pattern
2692 and corresponding splitters.
2693 (fix_trunc<mode>_i387): Change operand 0 predicate to
2694 nonimmediate_operand.
2695 (fix_trunc<mode>_i387_with_temp): Remove insn pattern
2696 and corresponding splitters.
2697 (*fistdi2_1): Remove.
2699 (fistdi2_with_temp): Remove insn pattern and corresponding splitters.
2700 (lrintxfdi2): Remove expander. Reimplement as define_insn.
2701 (*fist<mode>2_1): Remove.
2702 (fist<mode>2): Ditto.
2703 (fist<mode>2_with_temp): Remove insn pattern and corresponding
2705 (lrintxf<mode>2): Remove expander. Reimplement as define_insn.
2706 (*fist<mode>2_<rounding>_1): Always expand with fist<mode>2_<rounding>.
2707 (fistdi2_<rounding>): Change operand 0 predicate to
2708 nonimmediate_operand.
2709 (fistdi2_<rounding>_with_temp): Remove insn pattern
2710 and corresponding splitters.
2711 (fist<mode>2_<rounding>): Change operand 0 predicate to
2712 nonimmediate_operand.
2713 (fist<mode>2_<rounding>_with_temp): Remove insn pattern
2714 and corresponding splitters.
2716 (*fixuns_trunc<mode>si2_avx512f_zext): Depend on TARGET_SSE_MATH.
2718 2018-09-06 Bernd Edlinger <bernd.edlinger@hotmail.de>
2720 * varasm.c (output_constructor_regular_field): Check TYPE_SIZE_UNIT of
2723 2018-09-06 Will Schmidt <will_schmidt@vnet.ibm.com>
2725 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add support for
2726 early gimple folding of vec_splat().
2727 * tree-vect-generic.c: Remove static from tree_vec_extract() definition.
2728 * gimple-fold.h: Add an extern define for tree_vec_extract().
2730 2018-09-06 Will Schmidt <will_schmidt@vnet.ibm.com>
2732 * config/rs6000/rs6000.c (fold_mergehl_helper): Add types_compatible_p
2733 wrappers around TREE_TYPE comparisons.
2735 2018-09-06 Ilya Leoshkevich <iii@linux.ibm.com>
2738 * config/s390/predicates.md: Add nonsym_memory_operand.
2739 * config/s390/s390.c (s390_legitimize_cs_operand): If operand
2740 contains a SYMBOL_REF, load it into an intermediate pseudo.
2741 (s390_emit_compare_and_swap): Legitimize operand.
2742 * config/s390/s390.md: Use the new nonsym_memory_operand
2743 with UNSPECV_CAS patterns.
2745 2018-09-06 Ilya Leoshkevich <iii@linux.ibm.com>
2748 * config/s390/s390-passes.def: New file.
2749 * config/s390/s390-protos.h (class rtl_opt_pass): Add forward
2751 (make_pass_s390_early_mach): Add declaration.
2752 * config/s390/s390.c (make_pass_s390_early_mach):
2753 (s390_option_override): Remove dynamic registration.
2754 * config/s390/t-s390: Add s390-passes.def.
2756 2018-09-06 Ilya Leoshkevich <iii@linux.ibm.com>
2758 * config/s390/s390.c (s390_decompose_constant_pool_ref):
2759 Remove UNSPEC_LTREL_BASE check.
2760 (annotate_constant_pool_refs): Likewise.
2761 (find_constant_pool_ref): Likewise.
2762 (find_ltrel_base): Removed.
2763 (replace_ltrel_base): Removed.
2764 (s390_mainpool_finish): Remove replace_ltrel_base call.
2765 (s390_chunkify_start): Remove pending LTREL_BASE logic.
2766 (s390_chunkify_finish): Remove replace_ltrel_base call.
2767 * config/s390/s390.md: Remove UNSPEC_LTREL_BASE.
2769 2018-09-06 Hans-Peter Nilsson <hp@axis.com>
2772 * config/cris/cris.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
2773 to speculation_safe_value_not_needed.
2775 2018-09-05 Cesar Philippidis <cesar@codesourcery.com>
2776 Bernd Schmidt <bernds_cb1@t-online.de>
2778 * config/nvptx/nvptx-opts.h: New file.
2779 * config/nvptx/nvptx.c (nvptx_file_start): Print the correct .target.
2780 * config/nvptx/nvptx.h: Include "nvptx-opts.h".
2782 (TARGET_SM35): New macro.
2783 * config/nvptx/nvptx.md (atomic_fetch_<logic><mode>): Enable with the
2785 * config/nvptx/nvptx.opt (ptx_isa, sm_30, sm_35): New enum and its
2787 (misa=): New option.
2788 * doc/invoke.texi (Nvidia PTX Options): Document -misa.
2790 2018-09-05 Uros Bizjak <ubizjak@gmail.com>
2792 * config/i386/i386.md (truncdfsf2): Remove expander.
2793 (truncdfsf2_with_temp): Ditto.
2794 (truncxf<mode>2): Ditto.
2795 (*truncdfsf_fast_mixed): Remove insn pattern.
2796 (*truncdfsf_fast_i387): Ditto.
2797 (*truncdfsf_mixed): Ditto.
2798 (*truncdfsf_i387): Ditto.
2799 (*truncdfsf2_i387_1): Ditto.
2800 (*truncxfsf2_mixed): Ditto.
2801 (*truncxfdf2_mixed): Ditto.
2802 (*truncxf<mode>2_i387_noop): Ditto. Update callers
2803 to call gen_truncxf<mode>2 instead.
2804 (*truncxf<mode>2_i387): Remove.
2805 (reg->reg splitters): Remove splitter pattern.
2806 (reg->mem splitters): Ditto.
2808 (truncdfsf2): New insn pattern.
2809 (truncxf<mode>2): Ditto.
2811 2018-09-05 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
2813 * tree-ssa-math-opts.c (is_mult_by): New function.
2814 (is_square_of): Use the above.
2815 (optimize_recip_sqrt): New function.
2816 (pass_cse_reciprocals::execute): Use the above.
2818 2018-09-05 Richard Biener <rguenther@suse.de>
2821 * tree-ssa-sccvn.c (rpo_elim::eliminate_push_avail): Make sure
2822 to zero-init the emplaced vec.
2824 2018-09-05 Martin Liska <mliska@suse.cz>
2826 PR tree-optimization/87205
2827 * tree-switch-conversion.c (pass_lower_switch::execute):
2828 Group cases for switch statements.
2830 2018-09-05 Richard Biener <rguenther@suse.de>
2832 PR tree-optimization/87217
2833 * tree-ssa-sccvn.c (vuse_valueize): New.
2834 (vn_reference_lookup_pieces): Use it.
2835 (vn_reference_lookup): Likewise.
2837 2018-09-05 Nathan Sidwell <nathan@acm.org>
2840 * stor-layout.c (place_field): Scan forwards to check last
2841 bitfield when ms_bitfield_placement is in effect.
2843 2018-09-05 Richard Biener <rguenther@suse.de>
2846 * tree-vect-stmts.c (vectorizable_simd_clone_call): Fix bogus
2849 2018-09-05 Siddhesh Poyarekar <siddhesh@sourceware.org>
2850 Kugan Vivekanandarajah <kugan.vivekanandarajah@linaro.org>
2852 * config/aarch64/falkor-tag-collision-avoidance.c: New file.
2853 * config.gcc (extra_objs): Build it.
2854 * config/aarch64/t-aarch64 (falkor-tag-collision-avoidance.o):
2856 * config/aarch64/aarch64-passes.def
2857 (pass_tag_collision_avoidance): New pass.
2858 * config/aarch64/aarch64.c (qdf24xx_tunings): Add
2859 AARCH64_EXTRA_TUNE_RENAME_LOAD_REGS to tuning_flags.
2860 (aarch64_classify_address): Remove static qualifier.
2861 (aarch64_address_info, aarch64_address_type): Move to...
2862 * config/aarch64/aarch64-protos.h: ... here.
2863 (make_pass_tag_collision_avoidance): New function.
2864 * config/aarch64/aarch64-tuning-flags.def (rename_load_regs):
2867 2018-09-05 Martin Liska <mliska@suse.cz>
2869 * doc/gcov.texi: Update documentation of humar
2871 * gcov.c (format_count): Print one decimal place, it provides
2872 more fine number of situations like '1G' vs. '1.4G'.
2874 2018-09-05 Martin Liska <mliska@suse.cz>
2877 * config/rs6000/rs6000.opt: Mark the option as Deprecated.
2878 * optc-gen.awk: Allow 'Var' for Deprecated options in order
2879 to generate a MASK value.
2881 2018-09-04 H.J. Lu <hongjiu.lu@intel.com>
2884 * dwarf2out.c (based_loc_descr): Allow hard frame pointer even
2885 if frame pointer isn't used.
2886 (compute_frame_pointer_to_fb_displacement): Likewise.
2888 2018-09-04 Jakub Jelinek <jakub@redhat.com>
2891 * common/config/i386/i386-common.c (OPTION_MASK_ISA_XSAVEOPT_SET,
2892 OPTION_MASK_ISA_XSAVES_SET, OPTION_MASK_ISA_XSAVEC_SET): Use
2893 OPTION_MASK_ISA_XSAVE_SET instead of OPTION_MASK_ISA_XSAVE.
2894 (OPTION_MASK_ISA_XSAVE_UNSET): Add OPTION_MASK_ISA_XSAVES_UNSET
2895 and OPTION_MASK_ISA_XSAVEC_UNSET.
2897 2018-09-04 Max Filippov <jcmvbkbc@gmail.com>
2899 * config/xtensa/xtensa.c (xtensa_expand_atomic): Reorder AND and
2900 XOR operations in NAND case.
2902 2018-09-04 Aldy Hernandez <aldyh@redhat.com>
2904 * wide-int-range.cc (wide_int_range_convert): New.
2905 * wide-int-range.h (wide_int_range_convert): New.
2906 * tree-vrp.c (extract_range_from_unary_expr): Abstract wide int
2907 code into wide_int_range_convert.
2908 (extract_range_into_wide_ints): Do not munge anti range constants
2909 into the entire domain. Just return the range back.
2911 2018-09-04 Martin Liska <mliska@suse.cz>
2913 * genmatch.c (output_line_directive): Add new argument
2915 (dt_simplify::gen_1): Encapsulate dump within __builtin_expect.
2917 2018-09-04 Jonathan Wakely <jwakely@redhat.com>
2919 * doc/invoke.texi (Option Summary): Add whitespace.
2921 * doc/invoke.texi (Option Summary): Add -Waligned-new.
2923 2018-09-04 Richard Biener <rguenther@suse.de>
2925 PR tree-optimization/87211
2926 * tree-ssa-sccvn.c (visit_phi): When value-numbering to a
2927 backedge value we're supposed to treat as VARYING also number
2928 the PHI to VARYING in case it got a different value-number already.
2930 2018-09-04 Aldy Hernandez <aldyh@redhat.com>
2932 * tree-vrp.c (vrp_can_optimize_bit_op): Remove.
2933 (extract_range_from_binary_expr_1): Do not call
2934 vrp_can_optimize_bit_op.
2935 * wide-int-range.cc (wide_int_range_can_optimize_bit_op): Make
2937 (wide_int_range_get_mask_and_bounds): New.
2938 (wide_int_range_optimize_bit_op): New.
2939 (wide_int_range_bit_ior): Call wide_int_range_optimize_bit_op.
2940 (wide_int_range_bit_and): Same.
2941 * wide-int-range.h (wide_int_range_can_optimize_bit_op): Remove.
2942 (wide_int_range_optimize_bit_op): New.
2943 (wide_int_range_get_mask_and_bounds): New.
2945 2018-09-04 Richard Biener <rguenther@suse.de>
2947 PR tree-optimization/87176
2948 * tree-ssa-sccvn.c (visit_phi): Remove redundant allsame
2949 variable. When value-numbering a virtual PHI node make sure
2950 to not value-number to the backedge value.
2952 2018-09-04 Jonathan Wakely <jwakely@redhat.com>
2954 * doc/extend.texi (Long Long, Hex Floats): Document support for
2955 long long and hex floats in more recent versions of ISO C++.
2957 2018-09-03 Richard Biener <rguenther@suse.de>
2959 PR tree-optimization/87177
2960 * tree-ssa-sccvn.c (vuse_ssa_val): Revert previous change, keep
2963 2018-09-03 Alexander Monakov <amonakov@ispras.ru>
2965 * bb-reorder.c (edge_order): Convert to C-qsort-style
2966 tri-state comparator.
2967 (reorder_basic_blocks_simple): Change std::stable_sort to
2970 2018-09-03 Alexander Monakov <amonakov@ispras.ru>
2972 * tree-loop-distribution.c (offset_cmp): Convert to C-qsort-style
2973 tri-state comparator.
2974 (fuse_memset_builtins): Change std::stable_sort to gcc_stablesort.
2976 2018-09-03 Alexander Monakov <amonakov@ispras.ru>
2978 * sort.cc (struct sort_ctx): New field 'nlim'. Use it...
2979 (mergesort): ... here as maximum count for using netsort.
2980 (gcc_qsort): Set nlim to 3 if stable sort is requested.
2981 (gcc_stablesort): New.
2982 * system.h (gcc_stablesort): Declare.
2984 2018-09-03 Alexander Monakov <amonakov@ispras.ru>
2986 * sort.cc (gcc_qsort) [CHECKING_P]: Call qsort_chk.
2987 * system.h (qsort): Always redirect to gcc_qsort. Update comment.
2988 * vec.c (qsort_chk): Do not call gcc_qsort. Update comment.
2990 2018-09-03 Segher Boessenkool <segher@kernel.crashing.org>
2992 * config/rs6000/rs6000.md (*mov<mode>_hardfloat32): Remove %U from the
2993 lxsdx and stxsdx alternatives.
2994 (*mov<mode>_hardfloat64): Ditto.
2995 * config/rs6000/vsx.md (*vsx_extract_<mode>_store): Ditto.
2997 2018-09-03 Richard Biener <rguenther@suse.de>
2999 PR tree-optimization/87200
3000 * tree-ssa-sccvn.c (vn_nary_build_or_lookup_1): Valueize a
3003 2018-09-03 Martin Liska <mliska@suse.cz>
3005 PR tree-optimization/87201
3006 * tree-switch-conversion.c (switch_decision_tree::balance_case_nodes):
3007 Fix parenthesis in an expression.
3009 2018-09-03 Richard Biener <rguenther@suse.de>
3011 PR tree-optimization/87197
3012 * tree-ssa-sccvn.c (vn_nary_build_or_lookup_1): Mark the new def
3013 visited. CSE the VN_INFO hashtable lookup.
3015 PR tree-optimization/87169
3016 * tree-ssa-sccvn.c (do_rpo_vn): When marking loops for not
3017 iterating make sure there's no extra backedges from irreducible
3018 regions feeding the header. Mark the destination block
3021 2018-09-03 Martin Liska <mliska@suse.cz>
3024 * common/common-target.def: Add TARGET_GET_VALID_OPTION_VALUES.
3025 * common/common-targhooks.c (default_get_valid_option_values):
3027 * common/common-targhooks.h (default_get_valid_option_values):
3029 * common/config/i386/i386-common.c: Move processor_target_table
3031 (ix86_get_valid_option_values): New function.
3032 (TARGET_GET_VALID_OPTION_VALUES): New macro.
3033 * config/i386/i386.c (struct ptt): Move to i386-common.c.
3034 (PTA_*): Move all defined masks into i386-common.c.
3035 (ix86_function_specific_restore): Use new processor_cost_table.
3036 * config/i386/i386.h (struct ptt): Moved from i386.c.
3037 (struct pta): Likewise.
3038 * doc/tm.texi: Document new TARGET_GET_VALID_OPTION_VALUES.
3039 * doc/tm.texi.in: Likewise.
3040 * opt-suggestions.c (option_proposer::suggest_option):
3041 Pass prefix to build_option_suggestions.
3042 (option_proposer::get_completions): Likewise.
3043 (option_proposer::build_option_suggestions): Use the new target
3045 * opts.c (struct option_help_tuple): New struct.
3046 (print_filtered_help): Use the new target hook.
3048 2018-09-03 Martin Liska <mliska@suse.cz>
3051 * predict.c (set_even_probabilities): Add likely_edges
3052 argument and handle cases where we have precisely one
3054 (combine_predictions_for_bb): Catch also likely_edges.
3055 (tree_predict_by_opcode): Handle gswitch statements.
3056 * tree-cfg.h (find_case_label_for_value): New declaration.
3057 (find_taken_edge_switch_expr): Likewise.
3058 * tree-switch-conversion.c (switch_decision_tree::balance_case_nodes):
3059 Find pivot in decision tree based on probabily, not by number of
3062 2018-09-02 Gerald Pfeifer <gerald@pfeifer.com>
3064 * doc/standards.texi (Standards): Update Objective-C reference.
3066 2018-09-01 Gerald Pfeifer <gerald@pfeifer.com>
3068 * doc/install.texi (Prerequisites): Update link for MPC.
3070 2018-09-01 Michael Matz <matz@suse.de>
3072 PR tree-optimization/87074
3073 * gimple-loop-jam.c (unroll_jam_possible_p): Check loop exit
3074 PHIs for outer-loop uses.
3076 2018-09-01 Gerald Pfeifer <gerald@pfeifer.com>
3078 * doc/generic.texi (OpenMP): Adjust link to openmp.org.
3079 * doc/invoke.texi (C Dialect Options): Ditto.
3081 2018-09-01 Gerald Pfeifer <gerald@pfeifer.com>
3083 * doc/install.texi (Prerequisites): Adjust link mpfr.org.
3085 2018-08-31 Richard Biener <rguenther@suse.de>
3087 PR tree-optimization/87168
3088 * tree-ssa-sccvn.c (SSA_VAL): Add visited output parameter.
3089 (rpo_elim::eliminate_avail): When OP was not visited it must
3092 2018-08-31 David Malcolm <dmalcolm@redhat.com>
3094 * tree-vrp.c (copy_value_range): Convert param "from" from
3095 "value_range *" to "const value_range *".
3096 (range_is_null): Likewise for param "vr".
3097 (range_int_cst_p): Likewise.
3098 (range_int_cst_singleton_p): Likewise.
3099 (symbolic_range_p): Likewise.
3100 (value_ranges_intersect_p): Likewise for both params.
3101 (value_range_nonnegative_p): Likewise for param "vr".
3102 (value_range_constant_singleton): Likewise.
3103 (vrp_set_zero_nonzero_bits): Likewise for param "ar".
3104 (extract_range_into_wide_ints): Likewise for param "vr".
3105 (extract_range_from_multiplicative_op): Likewise for params "vr0"
3107 (vrp_can_optimize_bit_op): Likewise.
3108 (extract_range_from_binary_expr_1): Likewise for params "vr0_" and
3110 (extract_range_from_unary_expr): Likewise.
3111 (debug_value_range): Likewise for param "vr".
3112 (value_range::dump): Add "const" qualifier.
3113 (vrp_prop::check_array_ref): Convert local "vr" from
3114 "value_range *" to "const value_range *".
3115 (vrp_prop::check_mem_ref): Likewise.
3116 (vrp_prop::visit_stmt): Likewise for local "old_vr".
3117 (vrp_intersect_ranges_1): Likewise for param "vr_1".
3118 (vrp_intersect_ranges): Likewise.
3119 (simplify_stmt_for_jump_threading): Likewise for local "vr".
3120 (vrp_prop::vrp_finalize): Likewise.
3121 * tree-vrp.h (value_range::dump): Add "const" qualifier.
3122 (vrp_intersect_ranges): Add "const" qualifier to params as above.
3123 (extract_range_from_unary_expr): Likewise.
3124 (value_range_constant_singleton): Likewise.
3125 (symbolic_range_p): Likewise.
3126 (copy_value_range): Likewise.
3127 (extract_range_from_binary_expr_1): Likewise.
3128 (range_int_cst_p): Likewise.
3129 (vrp_set_zero_nonzero_bits): Likewise.
3130 (range_int_cst_singleton_p): Likewise.
3132 2018-08-31 Vlad Lazar <vlad.lazar@arm.com>
3134 * config/aarch64/arm_neon.h (vabsd_s64): New.
3135 (vnegd_s64): Likewise.
3137 2018-08-31 Martin Jambor <mjambor@suse.cz>
3139 * ipa-cp.c (estimate_local_effects): Replace wrong MAX with MIN.
3141 2018-08-31 Martin Liska <mliska@suse.cz>
3143 * ipa-icf.c (sem_item::add_type): Use
3144 sem_item::m_type_hash_cache.
3145 * ipa-icf.h: Move the cache from sem_item_optimizer
3148 2018-08-31 Nathan Sidwell <nathan@acm.org>
3150 * doc/extend.texi (Backwards Compatibility): Remove implicit
3151 extern C leeway of () being (...).
3153 2018-08-31 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
3155 * ipa-inline.c (can_inline_edge_by_limits_p): Fix typos in comment.
3157 2018-08-31 Segher Boessenkool <segher@kernel.crashing.org>
3161 * config/rs6000/rs6000.md (lround<mode>di2): Gate on TARGET_FPRND.
3163 2018-08-31 Jakub Jelinek <jakub@redhat.com>
3166 * expmed.c (expand_mult_const): Use immed_wide_int_const instead of
3167 gen_int_mode. Formatting fixes.
3169 2018-08-30 Sandra Loosemore <sandra@codesourcery.com>
3171 * target.def (custom_function_descriptors): Improve documentation.
3172 * doc/tm.texi.in (Trampolines): Expand discussion of function
3173 descriptors and move TARGET_CUSTOM_FUNCTION_DESCRIPTORS to the
3174 beginning of the section.
3175 * doc/tm.texi: Regenerated.
3177 2018-08-30 Jose E. Marchesi <jose.marchesi@oracle.com>
3179 * cfg.h (class auto_edge_flag): Spell out the template-id of the
3180 base class in the initializer list. This is a workaround for
3181 building with older GCC.
3182 (class auto_bb_flag): Likewise.
3184 2018-08-30 Aaron Sawdey <acsawdey@linux.ibm.com>
3186 * config/rs6000/altivec.md (altivec_eq<mode>): Remove star.
3187 (altivec_vcmpequ<VI_char>_p): Remove star.
3188 * config/rs6000/rs6000-string.c (do_load_for_compare): Support
3190 (expand_strncmp_vec_sequence): New function.
3191 (emit_final_str_compare_vec): New function.
3192 (expand_strn_compare): Add support for vector strncmp.
3193 * config/rs6000/rs6000.opt (-mstring-compare-inline-limit): Change
3194 length specification to bytes.
3195 * config/rs6000/vsx.md (vsx_ld_elemrev_v16qi_internal): Remove star.
3196 (vcmpnezb_p): New pattern.
3197 * doc/invoke.texi (RS/6000 and PowerPC Options): Update documentation
3198 for option -mstring-compare-inline-limit.
3200 2018-08-30 Thiago Macieira <thiago.macieira@intel.com>
3202 * config/i386/i386.c (PTA_WESTMERE): Remove PTA_AES.
3203 (PTA_SKYLAKE): Add PTA_AES.
3204 (PTA_GOLDMONT): Likewise.
3206 2018-08-29 Jan Hubicka <jh@suse.cz>
3209 * lto-opts.c (lto_write_options): Always stream PIC/PIE mode.
3210 * lto-wrapper.c (merge_and_complain): Fix merging of PIC/PIE.
3212 2018-08-29 Jan Hubicka <jh@suse.cz>
3214 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not follow
3216 (hash_tree): Do not visit TYPE_STUB_DECL.
3217 * tree-streamer-out.c (write_ts_type_common_tree_pointers): Do not
3218 stream TYPE_STUB_DECL.
3219 * tree-streamer-in.c (lto_input_ts_type_common_tree_pointers): Likewise.
3220 * ipa-utils.h (type_with_linkage_p): Do not rely on TYPE_STUB_DECL
3221 after free_lang_data.
3222 (type_in_anonymous_namespace_p): Likewise.
3224 2018-08-29 Jan Hubicka <jh@suse.cz>
3226 * sreal.h (SREAL_PART_BITS): Change to 31; remove seemingly unnecessary
3227 comment that it has to be even number.
3228 (class sreal): Change m_sig type to int32_t.
3229 * sreal.c (sreal::dump, sreal::to_int, opreator+, operator-): Use
3230 int64_t for temporary calculations.
3231 (sreal_verify_basics): Drop one bit from minimum and maximum.
3233 2018-08-30 Richard Biener <rguenther@suse.de>
3235 PR tree-optimization/87147
3236 * tree-ssa-sccvn.c (SSA_VISITED): New function.
3237 (visit_phi): When the degenerate result is from the backedge and
3238 we didn't visit its definition yet drop to VARYING.
3239 (do_rpo_vn): Properly mark blocks with incoming backedges as executable.
3241 2018-08-29 Jan Hubicka <jh@suse.cz>
3243 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not walk
3245 (hash_tree): Likewise.
3247 2018-08-29 Jan Hubicka <jh@suse.cz>
3249 * tree.c (find_decls_types_r): Walk also TYPE_NEXT_PTR_TO
3250 and TYPE_NEXT_REF_TO.
3252 2018-08-29 Jan Hubicka <jh@suse.cz>
3254 * sreal.h (SREAL_PART_BITS): Change to 31; remove seemingly unnecessary
3255 comment that it has to be even number.
3256 (class sreal): Change m_sig type to int32_t.
3257 * sreal.c (sreal::dump, sreal::to_int, opreator+, operator-): Use
3258 int64_t for temporary calculations.
3259 (sreal_verify_basics): Drop one bit from minimum and maximum.
3261 2018-08-30 Tamar Christina <tamar.christina@arm.com>
3263 * config/aarch64/aarch64.c (aarch64_expand_movmem): Set TImode max.
3265 2018-08-30 Vlad Lazar <vlad.lazar@arm.com>
3268 * expmed.c (canonicalize_comparison): Use wi::sub instead of wi::add
3269 if to_add is negative.
3271 2018-08-29 Bernd Edlinger <bernd.edlinger@hotmail.de>
3274 * builtins.c (c_strlen): Improve range checks.
3276 2018-08-29 Martin Sebor <msebor@redhat.com>
3277 Jeff Law <law@redhat.com>
3279 PR tree-optimization/86714
3280 PR tree-optimization/86711
3281 * builtins.c (c_strlen): Add arguments to call to string_constant.
3282 * expr.c (string_constant): Add argument. Detect missing nul
3283 terminator and outermost declaration it's missing in.
3284 * expr.h (string_constant): Add argument.
3285 * fold-const.c (read_from_constant_string): Add arguments to call to
3287 (c_getstr): Likewise.
3288 * tree-ssa-forwprop.c (simplify_builtin_call): Likewise.
3290 * tree-ssa-strlen.c (get_stridx): Likewise.
3292 2018-08-29 Jan Hubicka <jh@suse.cz>
3294 * tree-streamer-in.c (lto_input_ts_function_decl_tree_pointers):
3295 Do not stream DECL_VINDEX.
3296 * tree-streamer-out.c (write_ts_function_decl_tree_pointers): Likewise.
3297 * tree.c (free_lang_data_in_decl): Clear DECL_VINDEX.
3298 (decl_function_context): Use DECL_VIRTUAL_P rather than DECL_VINDEX.
3300 2018-08-29 Richard Biener <rguenther@suse.de>
3302 * tree-ssa-sccvn.c (vuse_ssa_val): Return NULL for unvisited
3303 virtual operands that are not default defs to honor region
3305 (rpo_vn_valueize): Remove ineffective code here.
3307 2018-08-29 Richard Biener <rguenther@suse.de>
3309 PR tree-optimization/87132
3310 * tree-ssa-alias.c (get_continuation_for_phi): Do not translate
3311 when skipping defs reachable over backedges.
3313 2018-08-29 Richard Biener <rguenther@suse.de>
3315 * tree-core.h: Document use of deprecated_flag in SSA_NAME.
3316 * tree.h (SSA_NAME_POINTS_TO_READONLY_MEMORY): Define.
3317 * tree-into-ssa.c (pass_build_ssa::execute): Initialize
3318 function parameters SSA_NAME_POINTS_TO_READONLY_MEMORY from fnspec.
3319 * tree-ssa-sccvn.c (const_parms, init_const_parms): Remove.
3320 (vn_reference_lookup_3): Remove use of const_parms.
3321 (free_rpo_vn): Do not free const_parms.
3322 (do_rpo_vn): Do not call init_const_parms.
3323 * tree-ssa-alias.c (refs_may_alias_p_1): Honor
3324 SSA_NAME_POINTS_TO_READONLY_MEMORY.
3325 (call_may_clobber_ref_p_1): Likewise.
3327 2018-08-29 Alexander Monakov <amonakov@ispras.ru>
3330 * invoke.texi (Optimization Options): List -ftree-scev-cprop.
3332 (-ftree-scev-cprop): Document.
3334 2018-08-29 Jan Hubicka <jh@suse.cz>
3336 * sreal.h (normalize, normalize_up, normalize_down): Add new_sig/new_exp
3338 (sreal constructor): Update.
3339 * sreal.c (sreal:operator+, sreal:operator-, sreal:operator*,
3340 sreal:operator/): Update.
3342 2018-08-29 Martin Liska <mliska@suse.cz>
3344 * tree-switch-conversion.c (switch_conversion::expand):
3345 Strenghten assumption about gswitch statements.
3347 2018-08-29 Richard Biener <rguenther@suse.de>
3349 PR tree-optimization/87117
3350 * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_stmt): Only
3351 re-value-number released SSA VDEFs.
3353 2018-08-29 Richard Biener <rguenther@suse.de>
3355 PR tree-optimization/87126
3356 * tree-ssa-sccvn.c (vn_reference_insert): Remove assert.
3358 2018-08-28 Jim Wilson <jimw@sifive.com>
3360 * config/riscv/pic.md: Rewrite.
3361 * config/riscv/riscv.c (riscv_address_insns): Return cost of 3 for
3363 * config/riscv/riscv.md (ZERO_EXTEND_LOAD): Delete.
3364 (SOFTF, default_load, softload, softstore): New.
3366 2018-08-28 Jeff Law <law@redhat.com>
3368 * fold-const.c (fold_binary_loc): Remove recently added assert.
3370 2018-08-28 Joern Rennecke <joern.rennecke@riscy-ip.com>
3372 * genpreds.c (write_predicate_subfunction): Also add ATTRIBUTE_UNUSED
3373 to OP parmeter of generated function.
3375 2018-08-28 MCC CS <deswurstes@users.noreply.github.com>
3377 PR tree-optimization/87009
3378 * match.pd: Add boolean optimizations.
3380 2018-08-28 Martin Sebor <msebor@redhat.com>
3383 * calls.c (alloc_max_size): Treat HOST_WIDE_INT special.
3384 * gimple-ssa-warn-alloca.c (adjusted_warn_limit): New function.
3385 (pass_walloca::gate): Use it.
3386 (alloca_call_type): Same.
3387 (pass_walloca::execute): Same.
3388 * stor-layout.c (layout_decl): Treat HOST_WIDE_INT special.
3390 2018-08-28 David Malcolm <dmalcolm@redhat.com>
3392 * dumpfile.h (ATTRIBUTE_GCC_DUMP_PRINTF): Change version check on
3393 GCC_VERSION for usage of "__gcc_dump_printf__" format from
3396 2018-08-28 Richard Biener <rguenther@suse.de>
3398 PR tree-optimization/87124
3399 * tree-ssa-sccvn.c (vn_lookup_simplify_result): Guard against
3400 constants before looking up avail.
3402 2018-08-28 Jakub Jelinek <jakub@redhat.com>
3405 * calls.c (maybe_warn_nonstring_arg): Punt early if
3406 warn_stringop_overflow is zero. Don't call get_range_strlen
3407 on 3rd argument, keep iterating until lenrng[1] is INTEGER_CST.
3408 Swap comparison operands to have constants on rhs. Only use
3409 lenrng[1] if non-NULL and INTEGER_CST. Don't uselessly
3410 increment lenrng[0].
3412 2018-08-28 Richard Sandiford <richard.sandiford@arm.com>
3414 * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Fix unguarded
3415 use of tree_to_shwi. Remove duplicated test for the size being
3416 a whole number of bytes.
3418 2018-08-28 Richard Biener <rguenther@suse.de>
3420 PR tree-optimization/87117
3421 * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_cleanup):
3422 Handle removed stmt without LHS (GIMPLE_NOP).
3424 2018-08-28 Richard Biener <rguenther@suse.de>
3426 PR tree-optimization/87117
3427 * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Exclude
3428 void which is is_gimple_reg_type by checking for COMPLETE_TYPE_P.
3430 2018-08-28 Richard Biener <rguenther@suse.de>
3432 PR tree-optimization/87117
3433 * tree-ssa-pre.c (compute_avail): Do not make expressions
3434 with predicated values available.
3435 (get_expr_value_id): Assert we do not run into predicated value
3438 2018-08-28 Richard Biener <rguenther@suse.de>
3440 PR tree-optimization/87117
3441 * tree-ssa-operands.c (add_stmt_operand): STRING_CST may
3442 get virtual operands.
3443 (get_expr_operands): Handle STRING_CST like other decls.
3445 2018-08-28 Martin Liska <mliska@suse.cz>
3447 * tree.h: Update documentation of fndecl_built_in_p
3451 2018-08-27 Jeff Law <law@redhat.com>
3452 PR tree-optimization/87110
3453 * tree-ssa-dse.c (compute_trims): Handle non-constant
3456 2018-08-27 Martin Sebor <msebor@redhat.com>
3458 PR tree-optimization/86914
3459 * tree-ssa-strlen.c (maybe_set_strlen_range): Avoid MEM_REF.
3461 2018-08-27 Martin Sebor <msebor@redhat.com>
3463 PR tree-optimization/87112
3464 * builtins.c (expand_builtin_strnlen): Convert c_strlen result to
3465 the type of the bound argument.
3467 2018-08-27 Jeff Law <law@redhat.com>
3469 * tree-ssa-dse.c (compute_trims): Handle case where the reference's
3470 type does not have a TYPE_SIZE_UNIT.
3472 2018-08-27 Steve Ellcey <sellcey@cavium.com>
3474 * config/aarch64/aarch64-speculation.cc: Replace include of cfg.h
3475 with include of backend.h.
3477 2018-08-27 Richard Biener <rguenther@suse.de>
3479 PR tree-optimization/86927
3480 * tree-vect-loop.c (vect_create_epilog_for_reduction): Properly
3481 use const cond reduction code.
3483 2018-08-27 Alexander Monakov <amonakov@ispras.ru>
3485 PR tree-optimization/85758
3486 * match.pd ((X & Y) ^ Y): Add :s qualifier to inner expression.
3488 2018-08-27 David Malcolm <dmalcolm@redhat.com>
3491 * diagnostic-show-locus.c (class layout_range): Update for
3492 conversion of show_caret_p to a tri-state.
3493 (layout_range::layout_range): Likewise.
3494 (make_range): Likewise.
3495 (layout::maybe_add_location_range): Likewise.
3496 (layout::should_print_annotation_line_p): Don't show annotation
3497 lines for ranges that are SHOW_LINES_WITHOUT_RANGE.
3498 (layout::get_state_at_point): Update for conversion of
3499 show_caret_p to a tri-state. Bail out early for
3500 SHOW_LINES_WITHOUT_RANGE, so that such ranges don't affect
3501 underlining or source colorization.
3502 (gcc_rich_location::add_location_if_nearby): Update for conversion
3503 of show_caret_p to a tri-state.
3504 (selftest::test_one_liner_multiple_carets_and_ranges): Likewise.
3505 (selftest::test_one_liner_fixit_replace_equal_secondary_range):
3507 (selftest::test_one_liner_labels): Likewise.
3508 * gcc-rich-location.c (gcc_rich_location::add_expr): Update for
3509 conversion of show_caret_p to a tri-state.
3510 * pretty-print.c (text_info::set_location): Likewise.
3511 * pretty-print.h (text_info::set_location): Likewise.
3512 * substring-locations.c (format_warning_n_va): Likewise.
3513 * tree-diagnostic.c (default_tree_printer): Likewise.
3514 * tree-pretty-print.c (newline_and_indent): Likewise.
3516 2018-08-27 David Malcolm <dmalcolm@redhat.com>
3519 * diagnostic-show-locus.c (get_line_span_for_fixit_hint): Show the
3520 line above for line-insertion fix-it hints.
3521 (selftest::test_fixit_insert_containing_newline): Update the
3522 expected results, and add a test with line-numbering enabled.
3524 2018-08-27 Martin Liska <mliska@suse.cz>
3527 * sanopt.c (sanitize_rewrite_addressable_params): Ignore
3528 params with DECL_HAS_VALUE_EXPR_P.
3530 2018-08-27 Martin Liska <mliska@suse.cz>
3532 * config/i386/i386.c (ix86_expand_set_or_movmem): Dump
3533 selected expansion strategy.
3535 2018-08-27 Martin Liska <mliska@suse.cz>
3537 * builtins.h (is_builtin_fn): Remove and fndecl_built_in_p.
3538 * builtins.c (is_builtin_fn): Likewise.
3539 * attribs.c (diag_attr_exclusions): Use new function
3540 fndecl_built_in_p and remove check for FUNCTION_DECL if
3542 (builtin_mathfn_code): Likewise.
3543 (fold_builtin_expect): Likewise.
3544 (fold_call_expr): Likewise.
3545 (fold_builtin_call_array): Likewise.
3546 (fold_call_stmt): Likewise.
3547 (set_builtin_user_assembler_name): Likewise.
3548 (is_simple_builtin): Likewise.
3549 * calls.c (gimple_alloca_call_p): Likewise.
3550 (maybe_warn_nonstring_arg): Likewise.
3551 * cfgexpand.c (expand_call_stmt): Likewise.
3552 * cgraph.c (cgraph_update_edges_for_call_stmt_node): Likewise.
3553 (cgraph_edge::verify_corresponds_to_fndecl): Likewise.
3554 (cgraph_node::verify_node): Likewise.
3555 * cgraphclones.c (build_function_decl_skip_args): Likewise.
3556 (cgraph_node::create_clone): Likewise.
3557 * config/arm/arm.c (arm_insert_attributes): Likewise.
3558 * config/i386/i386.c (ix86_gimple_fold_builtin): Likewise.
3559 * dse.c (scan_insn): Likewise.
3560 * expr.c (expand_expr_real_1): Likewise.
3561 * fold-const.c (operand_equal_p): Likewise.
3562 (fold_binary_loc): Likewise.
3563 * gimple-fold.c (gimple_fold_stmt_to_constant_1): Likewise.
3564 * gimple-low.c (lower_stmt): Likewise.
3565 * gimple-pretty-print.c (dump_gimple_call): Likewise.
3566 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call):
3568 * gimple.c (gimple_build_call_from_tree): Likewise.
3569 (gimple_call_builtin_p): Likewise.
3570 (gimple_call_combined_fn): Likewise.
3571 * gimplify.c (gimplify_call_expr): Likewise.
3572 (gimple_boolify): Likewise.
3573 (gimplify_modify_expr): Likewise.
3574 (gimplify_addr_expr): Likewise.
3575 * hsa-gen.c (gen_hsa_insns_for_call): Likewise.
3576 * ipa-cp.c (determine_versionability): Likewise.
3577 * ipa-fnsummary.c (compute_fn_summary): Likewise.
3578 * ipa-param-manipulation.c (ipa_modify_formal_parameters): Likewise.
3579 * ipa-split.c (visit_bb): Likewise.
3580 (split_function): Likewise.
3581 * ipa-visibility.c (cgraph_externally_visible_p): Likewise.
3582 * lto-cgraph.c (input_node): Likewise.
3583 * lto-streamer-out.c (write_symbol): Likewise.
3584 * omp-low.c (setjmp_or_longjmp_p): Likewise.
3585 (lower_omp_1): Likewise.
3586 * predict.c (strip_predict_hints): Likewise.
3587 * print-tree.c (print_node): Likewise.
3588 * symtab.c (symtab_node::output_to_lto_symbol_table_p): Likewise.
3589 * trans-mem.c (is_tm_irrevocable): Likewise.
3590 (is_tm_load): Likewise.
3591 (is_tm_simple_load): Likewise.
3592 (is_tm_store): Likewise.
3593 (is_tm_simple_store): Likewise.
3594 (is_tm_abort): Likewise.
3595 (tm_region_init_1): Likewise.
3596 * tree-call-cdce.c (gen_shrink_wrap_conditions): Likewise.
3597 * tree-cfg.c (verify_gimple_call): Likewise.
3598 (move_stmt_r): Likewise.
3599 (stmt_can_terminate_bb_p): Likewise.
3600 * tree-eh.c (lower_eh_constructs_2): Likewise.
3601 * tree-if-conv.c (if_convertible_stmt_p): Likewise.
3602 * tree-inline.c (remap_gimple_stmt): Likewise.
3603 (copy_bb): Likewise.
3604 (estimate_num_insns): Likewise.
3605 (fold_marked_statements): Likewise.
3606 * tree-sra.c (scan_function): Likewise.
3607 * tree-ssa-ccp.c (surely_varying_stmt_p): Likewise.
3608 (optimize_stack_restore): Likewise.
3609 (pass_fold_builtins::execute): Likewise.
3610 * tree-ssa-dce.c (mark_stmt_if_obviously_necessary): Likewise.
3611 (mark_all_reaching_defs_necessary_1): Likewise.
3612 * tree-ssa-dom.c (dom_opt_dom_walker::optimize_stmt): Likewise.
3613 * tree-ssa-forwprop.c (simplify_builtin_call): Likewise.
3614 (pass_forwprop::execute): Likewise.
3615 * tree-ssa-loop-im.c (stmt_cost): Likewise.
3616 * tree-ssa-math-opts.c (pass_cse_reciprocals::execute): Likewise.
3617 * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Likewise.
3618 * tree-ssa-strlen.c (get_string_length): Likewise.
3619 * tree-ssa-structalias.c (handle_lhs_call): Likewise.
3620 (find_func_aliases_for_call): Likewise.
3621 * tree-ssa-ter.c (find_replaceable_in_bb): Likewise.
3622 * tree-stdarg.c (optimize_va_list_gpr_fpr_size): Likewise.
3623 * tree-tailcall.c (find_tail_calls): Likewise.
3624 * tree.c (need_assembler_name_p): Likewise.
3625 (free_lang_data_in_decl): Likewise.
3626 (get_call_combined_fn): Likewise.
3627 * ubsan.c (is_ubsan_builtin_p): Likewise.
3628 * varasm.c (incorporeal_function_p): Likewise.
3629 * tree.h (DECL_BUILT_IN): Remove and replace with
3631 (DECL_BUILT_IN_P): Transfort to fndecl_built_in_p.
3632 (fndecl_built_in_p): New.
3634 2018-08-27 Martin Liska <mliska@suse.cz>
3636 PR tree-optimization/86847
3637 * tree-switch-conversion.c (switch_decision_tree::dump_case_nodes):
3638 Dump also subtree probability.
3639 (switch_decision_tree::do_jump_if_equal): New function.
3640 (switch_decision_tree::emit_case_nodes): Handle special
3641 situations in balanced tree that can be emitted much simpler.
3642 Fix calculation of probabilities that happen in tree expansion.
3643 * tree-switch-conversion.h (struct cluster): Add
3645 (struct simple_cluster): Likewise.
3646 (struct case_tree_node): Add new function has_child.
3647 (do_jump_if_equal): New.
3649 2018-08-27 Martin Liska <mliska@suse.cz>
3651 * tree-switch-conversion.c (bit_test_cluster::find_bit_tests):
3652 Add new argument to bit_test_cluster constructor.
3653 (bit_test_cluster::emit): Set bits really number of values
3655 (bit_test_cluster::hoist_edge_and_branch_if_true): Add
3656 probability argument.
3657 * tree-switch-conversion.h (struct bit_test_cluster):
3658 Add m_handles_entire_switch.
3660 2018-08-27 Martin Liska <mliska@suse.cz>
3662 PR tree-optimization/86702
3663 * tree-switch-conversion.c (jump_table_cluster::emit):
3664 Make probabilities even for values in jump table
3665 according to number of cases handled.
3666 (switch_decision_tree::compute_cases_per_edge): Pass
3667 argument to reset_out_edges_aux function.
3668 (switch_decision_tree::analyze_switch_statement): Likewise.
3669 * tree-switch-conversion.h (switch_decision_tree::reset_out_edges_aux):
3672 2018-08-27 Martin Liska <mliska@suse.cz>
3674 * cfgexpand.c (expand_asm_stmt): Use label_to_block and pass
3675 cfun argument explicitly.
3676 * gimple-pretty-print.c (dump_gimple_switch): Likewise.
3677 * hsa-gen.c (gen_hsa_insns_for_switch_stmt): Use new
3678 function gimple_switch_default_bb.
3679 (convert_switch_statements):
3681 * ipa-fnsummary.c (set_switch_stmt_execution_predicate):
3682 * stmt.c (label_to_block_fn): Use label_to_block and pass
3683 cfun argument explicitly and use gimple_switch_label_bb.
3684 (expand_case): Likewise.
3685 * tree-cfg.c (lower_phi_internal_fn): Use label_to_block and pass
3686 cfun argument explicitly. Likewise.
3687 (make_edges_bb): Likewise.
3688 (make_cond_expr_edges): Likewise.
3689 (get_cases_for_edge): Likewise.
3690 (make_gimple_switch_edges): Likewise.
3691 (label_to_block_fn): Likewise.
3692 (label_to_block): Likewise.
3693 (make_goto_expr_edges): Likewise.
3694 (make_gimple_asm_edges): Likewise.
3695 (main_block_label): Likewise.
3696 (group_case_labels_stmt): Likewise.
3697 (find_taken_edge_computed_goto): Likewise.
3698 (find_taken_edge_switch_expr): Likewise.
3699 (gimple_verify_flow_info): Likewise.
3700 (gimple_redirect_edge_and_branch): Likewise.
3701 (gimple_switch_label_bb): New function.
3702 (gimple_switch_default_bb): Likewise.
3703 (gimple_switch_edge): Likewise.
3704 (gimple_switch_default_edge): Likewise.
3705 * tree-cfg.h (label_to_block_fn): Remove and replace ...
3706 (label_to_block): ... with this.
3707 (gimple_switch_label_bb): New.
3708 (gimple_switch_default_bb): Likewise.
3709 (gimple_switch_edge): Likewise.
3710 (gimple_switch_default_edge): Likewise.
3711 * tree-cfgcleanup.c (convert_single_case_switch): Use
3712 new gimple functions and pass new argument to label_to_block.
3713 (cleanup_control_flow_bb):
3714 * tree-eh.c (make_eh_dispatch_edges): Use label_to_block and pass
3715 cfun argument explicitly.
3716 (make_eh_edges): Likewise.
3717 (redirect_eh_dispatch_edge): Likewise.
3718 (lower_resx): Likewise.
3719 (lower_eh_dispatch): Likewise.
3720 (maybe_remove_unreachable_handlers): Likewise.
3721 (unsplit_eh): Likewise.
3722 (cleanup_empty_eh): Likewise.
3723 (verify_eh_edges): Likewise.
3724 (verify_eh_dispatch_edge): Likewise.
3725 * tree-ssa-dom.c (record_edge_info): Likewise.
3726 * tree-ssa-forwprop.c (simplify_gimple_switch_label_vec): Likewise.
3727 * tree-ssa-threadedge.c (thread_around_empty_blocks): Likewise.
3728 (thread_through_normal_block): Likewise.
3729 * tree-ssa-uncprop.c (associate_equivalences_with_edges): Likewise.
3730 * tree-ssa-uninit.c (convert_control_dep_chain_into_preds):
3731 * tree-switch-conversion.c (switch_conversion::collect): Use new
3733 (switch_conversion::check_final_bb): Likewise.
3734 (switch_conversion::gather_default_values): Pass new argument
3736 (switch_conversion::build_constructors): Likewise.
3737 (switch_decision_tree::compute_cases_per_edge): Use new
3738 gimple_switch_edge function.
3739 (switch_decision_tree::analyze_switch_statement): Pass new argument
3741 (switch_decision_tree::try_switch_expansion): Use
3742 gimple_switch_default_edge.
3743 * tree-vrp.c (find_switch_asserts): Pass new argument
3745 * vr-values.c (vr_values::vrp_visit_switch_stmt): Likewise.
3746 (vr_values::simplify_switch_using_ranges): Likewise.
3748 2018-08-27 Richard Biener <rguenther@suse.de>
3750 * cfganal.h (rev_post_order_and_mark_dfs_back_seme): Declare.
3751 * cfganal.c (rev_post_order_and_mark_dfs_back_seme): New function.
3753 * tree-ssa-sccvn.h (struct vn_pval): New structure.
3754 (struct vn_nary_op_s): Add unwind_to member. Add
3755 predicated_values flag and put result into a union together
3756 with a linked list of vn_pval.
3757 (struct vn_ssa_aux): Add name member to make maintaining
3758 a map of SSA name to vn_ssa_aux possible. Remove no longer
3759 needed info, dfsnum, low, visited, on_sccstack, use_processed
3760 and range_info_anti_range_p members.
3761 (run_scc_vn, vn_eliminate, free_scc_vn, vn_valueize): Remove.
3762 (do_rpo_vn, run_rpo_vn, eliminate_with_rpo_vn, free_rpo_vn):
3764 (vn_valueize): New global.
3765 (vn_context_bb): Likewise.
3766 (VN_INFO_RANGE_INFO, VN_INFO_ANTI_RANGE_P, VN_INFO_RANGE_TYPE,
3767 VN_INFO_PTR_INFO): Remove.
3768 * tree-ssa-sccvn.c: ... (rewrite)
3769 (pass_fre::execute): For -O2+ initialize loops and run
3770 RPO VN in optimistic mode (iterating). For -O1 and -Og
3771 run RPO VN in non-optimistic mode.
3772 * params.def (PARAM_SCCVN_MAX_SCC_SIZE): Remove.
3773 (PARAM_RPO_VN_MAX_LOOP_DEPTH): Add.
3774 * doc/invoke.texi (sccvn-max-scc-size): Remove.
3775 (rpo-vn-max-loop-depth): Document.
3776 * tree-ssa-alias.c (walk_non_aliased_vuses): Stop walking
3777 when valuezing the VUSE signals we walked out of the region.
3778 * tree-ssa-pre.c (phi_translate_1): Ignore predicated values.
3779 (phi_translate): Set VN context block to use for availability
3781 (compute_avail): Likewise.
3782 (pre_valueize): New function.
3783 (pass_pre::execute): Adjust to the RPO VN API.
3785 * tree-ssa-loop-ivcanon.c: Include tree-ssa-sccvn.h.
3786 (propagate_constants_for_unrolling): Remove.
3787 (tree_unroll_loops_completely): Perform value-numbering
3788 on the unrolled bodies loop parent.
3790 2018-08-27 Richard Biener <rguenther@suse.de>
3792 * tree-ssa-pre.c (compute_antic): Re-use inverted postorder
3793 for partial antic compute.
3795 2018-08-27 Jakub Jelinek <jakub@redhat.com>
3797 PR rtl-optimization/87065
3798 * combine.c (simplify_if_then_else): Formatting fix.
3799 (if_then_else_cond): Guard MULT optimization with SCALAR_INT_MODE_P
3801 (known_cond): Don't return const_true_rtx for vector modes. Use
3802 CONST0_RTX instead of const0_rtx. Formatting fixes.
3804 2018-08-27 Martin Liska <mliska@suse.cz>
3806 PR gcov-profile/87069
3807 * gcov.c (process_file): Record files already processed
3808 and warn about a file being processed multiple times.
3810 2018-08-27 Martin Liska <mliska@suse.cz>
3813 * config/aarch64/aarch64.c (aarch64_override_options_internal):
3814 Set default values for x_aarch64_*_string strings.
3815 * config/aarch64/aarch64.opt: Remove --{march,mcpu,mtune}==
3816 prefix. For -mabi do not print '=ABI' in help and use
3817 <option_value> format for -msve-vector-bits and -moverride
3820 2018-08-26 Jeff Law <law@redhat.com>
3822 * config/mips/frame-header-opt.c: Include "backend.h" rather than
3825 2018-08-26 Marek Polacek <polacek@redhat.com>
3827 PR c++/87029, Implement -Wredundant-move.
3828 * doc/invoke.texi: Document -Wredundant-move.
3830 2018-08-25 Martin Sebor <msebor@redhat.com>
3832 PR tree-optimization/87059
3833 * builtins.c (expand_builtin_strncmp): Convert MIN_EXPR operand
3834 to the same type as the other.
3835 * fold-const.c (fold_binary_loc): Assert expectation.
3837 2018-08-25 Iain Sandoe <iain@sandoe.co.uk>
3839 * config/darwin.c (machopic_legitimize_pic_address): Clean up
3840 extraneous parentheses, dead code section and formatting.
3842 2018-08-24 David Malcolm <dmalcolm@redhat.com>
3845 * diagnostic-show-locus.c (layout::layout): Ensure the margin is
3846 wide enough for jumps in the line-numbering to be visible.
3847 (layout::print_gap_in_line_numbering): New member function.
3848 (layout::calculate_line_spans): When using line numbering, merge
3849 line spans that are only 1 line apart.
3850 (diagnostic_show_locus): When printing line numbers, show gaps in
3851 line numbering directly, rather than printing headers.
3852 (selftest::test_diagnostic_show_locus_fixit_lines): Add test of
3853 line-numbering with multiple line spans.
3854 (selftest::test_fixit_insert_containing_newline_2): Add test of
3855 line-numbering, in which the spans are close enough to be merged.
3857 2018-08-24 Aldy Hernandez <aldyh@redhat.com>
3859 * gimple-ssa-evrp-analyze.c (set_ssa_range_info): Pass value_range
3860 to range_includes_zero_p. Do not special case VR_ANTI_RANGE.
3861 * tree-vrp.c (range_is_nonnull): Remove.
3862 (range_includes_zero_p): Accept value_range instead of min/max.
3863 (extract_range_from_binary_expr_1): Do not early bail on
3865 Use range_includes_zero_p instead of range_is_nonnull.
3866 (extract_range_from_unary_expr): Use range_includes_zero_p instead
3867 of range_is_nonnull.
3868 (vrp_meet_1): Pass value_range to range_includes_zero_p. Do not
3869 special case VR_ANTI_RANGE.
3870 (vrp_finalize): Same.
3871 * tree-vrp.h (range_includes_zero_p): Pass value_range as argument
3873 (range_is_nonnull): Remove.
3874 * vr-values.c (vrp_stmt_computes_nonzero): Use
3875 range_includes_zero_p instead of range_is_nonnull.
3876 (extract_range_basic): Pass value_range to range_includes_zero_p
3877 instead of range_is_nonnull.
3879 2018-08-24 Uros Bizjak <ubizjak@gmail.com>
3881 * emit-rtl.c (init_emit_once): Do not emit MODE_POINTER_BOUNDS RTXes.
3882 * emit-rtl.h (rtl_data): Remove return_bnd.
3883 * explow.c (trunc_int_for_mode): Do not handle POINTER_BOUNDS_MODE_P.
3884 * function.c (diddle_return_value): Do not handle crtl->return_bnd.
3885 * genmodes.c (complete_mode): Do not handle MODE_POINTER_BOUNDS.
3886 (POINTER_BOUNDS_MODE): Remove definition.
3887 (make_pointer_bounds_mode): Remove.
3888 (get_mode_class): Do not handle MODE_POINTER_BOUNDS.
3889 * machmode.h (POINTER_BOUNDS_MODE_P): Remove definition.
3890 (scalare_mode::includes_p): Do not handle MODE_POINTER_BOUNDS.
3891 * mode-classes.def: Do not define MODE_POINTER_BOUNDS.
3892 * stor-layout.c (int_mode_for_mode): Do not handle MODE_POINTER_BOUNDS.
3893 * tree-core.h (enum tree_index): Remove TI_POINTER_BOUNDS_TYPE.
3894 * varasm.c (output_constant_pool_2): Do not handle MODE_POINTER_BOUNDS.
3896 * config/i386/i386-modes.def (BND32, BND64): Remove.
3897 * config/i386/i386.c (dbx_register_map): Remove bound registers.
3898 (dbx64_register_map): Ditto.
3899 (svr4_dbx_register_map): Ditto.
3900 (indirect_thunk_bnd_needed): Remove.
3901 (indirect_thunks_bnd_used): Ditto.
3902 (indirect_return_bnd_needed): Ditto.
3903 (indirect_return_via_cx_bnd): Ditto.
3904 (enum indirect_thunk_prefix): Remove indirect_thunk_prefix_bnd.
3905 (indirect_thunk_name): Remove handling of indirect_thunk_prefix_bnd.
3906 (output_indirect_thunk): Ditto. Remove need_prefix argument.
3907 (output_indirect_thunk_function): Remove handling of
3908 indirect_return_bnd_needed, indirect_return_via_cx_bnd,
3909 indirect_thunk_bnd_needed and indirect_thunks_bnd_used variables.
3910 (ix86_save_reg): Remove handling of crtl->return_bnd.
3911 (ix86_legitimate_constant_p): Remove handling of POINTER_BOUNDS_MODE_P.
3912 (ix86_print_operand_address_as): Remove handling of UNSPEC_BNDMK_ADDR
3913 and UNSPEC_BNDLX_ADDR.
3914 (ix86_output_indirect_branch_via_reg): Remove handling of
3915 indirect_thunk_prefix_bnd.
3916 (ix86_output_indirect_branch_via_push): Ditto.
3917 (ix86_output_function_return): Ditto.
3918 (ix86_output_indirect_function_return): Ditto.
3919 (avoid_func_arg_motion): Do not handle UNSPEC_BNDSTX.
3920 * config/i386/i386.h (FIXED_REGISTERS): Remove bound registers.
3921 (CALL_USED_REGISTERS): Ditto.
3922 (REG_ALLOC_ORDER): Update for removal of bound registers.
3923 (HI_REGISTER_NAMES): Ditto.
3924 * config/i386/i386.md (UNSPEC_BNDMK, UNSPEC_BNDMK_ADDR, UNSPEC_BNDSTX)
3925 (UNSPEC_BNDLDX, UNSPEC_BNDLDX_ADDR, UNSPEC_BNDCL, UNSPEC_BNDCU)
3926 (UNSPEC_BNDCN, UNSPEC_MPX_FENCE): Remove.
3927 (BND0_REG, BND1_REG, BND2_REG, BND3_REG): Remove
3928 (FIRST_PSEUDO_REG): Update.
3929 (BND): Remove mode iterator.
3930 * config/i386/predicates.md (bnd_mem_operator): Remove.
3932 2018-08-24 Richard Sandiford <richard.sandiford@arm.com>
3934 * tree-vect-stmts.c (vectorizable_bswap): Handle variable-length
3937 2018-08-24 Richard Sandiford <richard.sandiford@arm.com>
3939 * tree-vect-slp.c (vect_transform_slp_perm_load): Separate out
3940 the case in which the permute needs only a single element and
3941 repeats for every vector of the result. Extend that case to
3942 handle variable-length vectors.
3943 * tree-vect-stmts.c (vectorizable_load): Update accordingly.
3945 2018-08-24 H.J. Lu <hongjiu.lu@intel.com>
3948 * dwarf2out.c (save_macinfo_strings): Call set_indirect_string
3949 on DW_MACINFO_start_file for -gsplit-dwarf -g3.
3951 2018-08-24 Richard Biener <rguenther@suse.de>
3953 * cfg.h (struct control_flow_graph): Add edge_flags_allocated and
3954 bb_flags_allocated members.
3955 (auto_flag): New RAII class for allocating flags.
3956 (auto_edge_flag): New RAII class for allocating edge flags.
3957 (auto_bb_flag): New RAII class for allocating bb flags.
3958 * cfgloop.c (verify_loop_structure): Allocate temporary edge
3960 * cfganal.c (dfs_enumerate_from): Remove use of visited sbitmap
3961 in favor of temporarily allocated BB flag.
3962 * hsa-brig.c: Re-order includes.
3963 * hsa-dump.c: Likewise.
3964 * hsa-regalloc.c: Likewise.
3965 * print-rtl.c: Likewise.
3966 * profile-count.c: Likewise.
3968 2018-08-24 Segher Boessenkool <segher@kernel.crashing.org>
3971 * config/rs6000/rs6000.c (toc_relative_expr_p): Check that the base is
3974 2018-08-24 Aldy Hernandez <aldyh@redhat.com>
3977 * wide-int-range.cc (wide_int_range_div): Do not ignore result
3978 from wide_int_range_multiplicative_op.
3980 2018-08-23 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3982 * tree-vect-data-refs.c (vect_grouped_store_supported): Fix typo
3985 2018-08-23 Giuliano Belinassi <giuliano.belinassi@usp.br>
3987 * genmatch.c (parser::parse_operation): Fix typo 'exapnded'
3990 2018-08-23 Alexander Monakov <amonakov@ispras.ru>
3992 * tree-scalar-evolution.c (final_value_replacement_loop): Dump
3993 full GENERIC expression used for replacement.
3995 2018-08-23 Aldy Hernandez <aldyh@redhat.com>
3997 * tree-vrp.c (abs_extent_range): Remove.
3998 (extract_range_into_wide_ints): Pass wide ints by reference.
3999 (extract_range_from_binary_expr_1): Rewrite the *DIV_EXPR code.
4000 Pass wide ints by reference in all calls to
4001 extract_range_into_wide_ints.
4002 * wide-int-range.cc (wide_int_range_div): New.
4003 * wide-int-range.h (wide_int_range_div): New.
4004 (wide_int_range_includes_zero_p): New.
4005 (wide_int_range_zero_p): New.
4007 2018-08-23 Matthew Malcomson <matthew.malcomson@arm.com>
4009 * config/aarch64/aarch64.md (arches): New enum.
4010 (arch): New enum attr.
4011 (arch_enabled): New attr.
4012 (enabled): Now uses arch_enabled only.
4013 (simd, sve, fp16): Removed attribute.
4014 (fp): Attr now defined in terms of 'arch'.
4015 (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64, *movti_aarch64,
4016 *movhf_aarch64, <optab><fcvt_target><GPF:mode>2,
4017 <FCVT_F2FIXED:fcvt_fixed_insn><GPF:mode>3,
4018 <FCVT_FIXED2F:fcvt_fixed_insn><GPI:mode>3): Merge 'fp' and 'simd'
4019 attributes into 'arch'.
4020 (*movsf_aarch64, *movdf_aarch64, *movtf_aarch64, *add<mode>3_aarch64,
4021 subdi3, neg<mode>2, <optab><mode>3, one_cmpl<mode>2,
4022 *<NLOGICAL:optab>_one_cmpl<mode>3, *xor_one_cmpl<mode>3,
4023 *aarch64_ashl_sisd_or_int_<mode>3, *aarch64_lshr_sisd_or_int_<mode>3,
4024 *aarch64_ashr_sisd_or_int_<mode>3, *aarch64_sisd_ushl): Convert use of
4025 'simd' attribute into 'arch'.
4026 (load_pair_sw_<SX:mode><SX2:mode>, load_pair_dw_<DX:mode><DX2:mode>,
4027 store_pair_sw_<SX:mode><SX2:mode>, store_pair_dw_<DX:mode><DX2:mode>):
4028 Convert use of 'fp' attribute to 'arch'.
4029 * config/aarch64/aarch64-simd.md (move_lo_quad_internal_<mode>,
4030 move_lo_quad_internal_<mode>): (different modes) Merge 'fp' and 'simd'
4032 (move_lo_quad_internal_be_<mode>, move_lo_quad_internal_be_<mode>):
4033 (different modes) Merge 'fp' and 'simd' into 'arch'.
4034 (*aarch64_combinez<mode>, *aarch64_combinez_be<mode>): Merge 'fp' and
4037 2018-08-23 Segher Boessenkool <segher@kernel.crashing.org>
4039 PR rtl-optimization/87026
4040 * expmed.c (canonicalize_comparison): If we can no longer create
4041 pseudoregisters, don't.
4043 2018-08-23 Richard Earnshaw <rearnsha@arm.com>
4046 * config/arm/arm-protos.h (arm_emit_speculation_barrier): New
4048 * config/arm/arm.c (speculation_barrier_libfunc): New static
4050 (arm_init_libfuncs): Initialize it.
4051 (arm_emit_speculation_barrier): New function.
4052 * config/arm/arm.md (speculation_barrier): Call
4053 arm_emit_speculation_barrier for architectures that do not have
4055 (speculation_barrier_insn): Only match on Armv7 or later.
4057 2018-08-23 Richard Biener <rguenther@suse.de>
4060 * tree-inline.c (copy_bb): Drop unused __builtin_va_arg_pack_len
4063 2018-08-23 Richard Sandiford <richard.sandiford@arm.com>
4065 * config/aarch64/aarch64.c (aarch64_evpc_sve_tbl): Fix handling
4066 of single-vector TBLs.
4067 (aarch64_vectorize_vec_perm_const): Set one_vector_p when only
4070 2018-08-23 Richard Sandiford <richard.sandiford@arm.com>
4073 * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const_1): Fix
4074 aarch64_evpc_tbl guard.
4076 2018-08-22 Bernd Edlinger <bernd.edlinger@hotmail.de>
4078 * tree-ssa-dse.c (compute_trims): Avoid folding away undefined
4081 2018-08-22 Martin Sebor <msebor@redhat.com>
4084 * tree-pretty-print.c (pretty_print_string): Add argument.
4085 (dump_generic_node): Call to pretty_print_string with string size.
4087 2018-08-22 Segher Boessenkool <segher@kernel.crashing.org>
4089 PR rtl-optimization/86771
4090 * combine.c (try_combine): Do not allow splitting a resulting PARALLEL
4091 of two SETs into those two SETs, one to be placed at i2, if that SETs
4092 destination is modified between i2 and i3.
4094 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
4096 PR tree-optimization/86725
4097 * tree-vect-loop.c (vect_inner_phi_in_double_reduction_p): New
4099 (vect_analyze_scalar_cycles_1): Check it.
4101 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
4103 PR tree-optimization/86725
4104 * tree-vect-loop.c (vect_is_simple_reduction): When treating
4105 an outer loop phi as a double reduction, make sure that the
4106 single user of the phi result is an inner loop phi.
4108 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
4110 * tree-vect-data-refs.c (vect_analyze_group_access_1): Convert
4111 grouped stores with gaps to a strided group.
4113 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
4115 * tree-vect-stmts.c (get_group_load_store_type)
4116 (get_load_store_type): Only test STMT_VINFO_STRIDED_P for the
4117 first statement in a group.
4119 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
4121 * config/darwin.h (LINK_COMMAND_SPEC_A): Sync LTO options with
4122 the sequence used in gcc/gcc.c.
4124 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
4127 * gcc-ar.c (main): Don’t try to invoke the plug-in if we’re not
4130 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
4132 * config/darwin10.h (LINK_GCC_C_SEQUENCE_SPEC): Adjust to use the
4133 Darwin10-specific unwinder-shim.
4134 * config/darwin12.h (LINK_GCC_C_SEQUENCE_SPEC): Remove.
4135 * config/rs6000/darwin.h (DARWIN_CRT1_SPEC, DARWIN_DYLIB1_SPEC):
4136 New to cater for Darwin10 Rosetta.
4138 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
4140 * config/i386/i386.c (ix86_output_addr_diff_elt): Move the MACH-O
4141 specific test before the one for HAVE_AS_GOTOFF_IN_DATA.
4143 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
4148 * gcc/dwarf2out.c (FUNC_SECOND_SECT_LABEL): New.
4149 (dwarf2out_switch_text_section): Generate a local label for the
4150 second function sub-section and apply it as the second FDE start
4152 * gcc/final.c (final_scan_insn_1): Emit second FDE label after the
4153 second sub-section start.
4155 2018-08-22 Richard Biener <rguenther@suse.de>
4157 PR tree-optimization/86988
4158 * tree-vrp.c (vrp_prop::check_mem_ref): Bail out on VLAs.
4160 2018-08-22 Richard Biener <rguenther@suse.de>
4162 PR tree-optimization/86945
4163 * tree-cfg.c (generate_range_test): Use unsigned arithmetic.
4165 2018-08-22 Alexandre Oliva <oliva@adacore.com>
4167 * config/rs6000/rs6000.c (SMALL_DATA_RELOC, SMALL_DATA_REG): Add
4168 a comment about how uses of r2 for .sdata2 come about.
4170 2018-08-22 Alexandre Oliva <aoliva@redhat.com>
4172 * tree-ssa-reassoc.c (is_reassociable_op): Fix cut&pasto.
4174 2018-08-21 Marek Polacek <polacek@redhat.com>
4176 PR c++/86981, Implement -Wpessimizing-move.
4177 * doc/invoke.texi: Document -Wpessimizing-move.
4179 2018-08-21 Jan Hubicka <jh@suse.cz>
4181 * tree.c (find_decls_types_r): Do not check for redundant typedefs.
4182 * tree.h (is_redundant_typedef): Remove.
4183 * dwarf2out.c (is_redundant_typedef): Turn into static function.
4185 2018-08-21 Jan Hubicka <jh@suse.cz>
4187 * tree.c (free_lang_data_in_decl): Remove types from DECL_CONTEXT
4190 2018-08-21 Tamar Christina <tamar.christina@arm.com>
4192 * expmed.c (extract_low_bits): Reject invalid subregs early.
4194 2018-08-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
4197 * tree-ssa-strlen.c (adjust_last_stmt): Avoid folding away undefined
4200 2018-08-21 Rasmus Villemoes <rv@rasmusvillemoes.dk>
4202 * config/vxworks.h: Guard vxworks_asm_out_constructor and
4203 vxworks_asm_out_destructor by !HAVE_INITFINI_ARRAY_SUPPORT
4204 * config/vxworks.c: Likewise.
4206 2018-08-21 Rasmus Villemoes <rv@rasmusvillemoes.dk>
4208 * config/vxworks.c: Set targetm.have_ctors_dtors
4209 if HAVE_INITFINI_ARRAY_SUPPORT.
4210 * config/vxworks.h: Set SUPPORTS_INIT_PRIORITY
4211 if HAVE_INITFINI_ARRAY_SUPPORT.
4213 2018-08-21 Rasmus Villemoes <rv@rasmusvillemoes.dk>
4215 * config/vxworks.h: Add $(WIND_BASE)/target/h/wrn/coreip to
4216 default search path for VxWorks < 7.
4218 2018-08-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
4220 * gimple-ssa-sprintf.c (decl_constant_value): Remove.
4221 (get_format_string): Refer to c_getstr.
4223 2018-08-21 Tom de Vries <tdevries@suse.de>
4225 * cgraph.h (debuginfo_early_init, debuginfo_init, debuginfo_fini)
4226 (debuginfo_start, debuginfo_stop, debuginfo_early_start)
4227 (debuginfo_early_stop): Declare.
4228 * cgraphunit.c (debuginfo_early_init, debuginfo_init, debuginfo_fini)
4229 (debuginfo_start, debuginfo_stop, debuginfo_early_start)
4230 (debuginfo_early_stop): New function.
4231 (symbol_table::finalize_compilation_unit): Call debuginfo_early_start
4232 and debuginfo_early_stop.
4233 * dwarf2out.c (dwarf2out_finish, dwarf2out_early_finish): Dump dwarf.
4234 * toplev.c (compile_file): Call debuginfo_start and debuginfo_stop.
4235 (general_init): Call debuginfo_early_init.
4236 (finalize): Call debuginfo_fini.
4237 (do_compile): Call debuginfo_init.
4238 * doc/invoke.texi (@gccoptlist): Add -fdump-debug and
4240 (@item -fdump-debug, @item -fdump-earlydebug): Add.
4242 2018-08-21 Tom de Vries <tdevries@suse.de>
4244 * dwarf2out.c (print_dw_val, print_loc_descr, print_die): Handle
4245 flag_dump_noaddr and flag_dump_unnumbered.
4247 2018-08-21 Aldy Hernandez <aldyh@redhat.com>
4249 * wide-int-range.cc (wide_int_range_abs): New.
4250 (wide_int_range_order_set): Rename from wide_int_range_min_max.
4251 * wide-int-range.h (wide_int_range_abs): New.
4252 (wide_int_range_min_max): New.
4253 * tree-vrp.c (extract_range_from_unary_expr): Rewrite ABS_EXPR
4254 case to call wide_int_range_abs.
4255 Rewrite MIN/MAX_EXPR to call wide_int_range_min_max.
4256 (extract_range_from_abs_expr): Delete.
4258 2018-08-20 Michael Meissner <meissner@linux.ibm.com>
4261 * config/rs6000/rs6000.md (extendsi<mode>2): Change constraints
4262 from 'Y' to 'YZ' to enable the LWAX instruction to be generated
4265 2018-08-20 Nathan Sidwell <nathan@acm.org>
4266 Jeff Law <law@redhat.com>
4268 * config/s390/s390-c (s390_macro_to_expand): Use cpp_macro_p.
4269 * config/spu/spu-c.c (spu_macro_to_expand): Likewise.
4271 2018-08-20 David Malcolm <dmalcolm@redhat.com>
4274 * attribs.c (diag_attr_exclusions): Add auto_diagnostic_group instance.
4275 (decl_attributes): Likewise.
4276 * calls.c (maybe_warn_nonstring_arg): Add auto_diagnostic_group
4278 * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
4279 * diagnostic-core.h (class auto_diagnostic_group): New class.
4280 * diagnostic.c (diagnostic_initialize): Initialize the new fields.
4281 (diagnostic_report_diagnostic): Handle the first diagnostics within
4283 (emit_diagnostic): Add auto_diagnostic_group instance.
4285 (inform_n): Likewise.
4286 (warning): Likewise.
4287 (warning_at): Likewise.
4288 (warning_n): Likewise.
4289 (pedwarn): Likewise.
4290 (permerror): Likewise.
4292 (error_n): Likewise.
4293 (error_at): Likewise.
4295 (fatal_error): Likewise.
4296 (internal_error): Likewise.
4297 (internal_error_no_backtrace): Likewise.
4298 (auto_diagnostic_group::auto_diagnostic_group): New ctor.
4299 (auto_diagnostic_group::~auto_diagnostic_group): New dtor.
4300 * diagnostic.h (struct diagnostic_context): Add fields
4301 "diagnostic_group_nesting_depth",
4302 "diagnostic_group_emission_count", "begin_group_cb",
4304 * gimple-ssa-isolate-paths.c (find_implicit_erroneous_behavior):
4305 Add auto_diagnostic_group instance(s).
4306 (find_explicit_erroneous_behavior): Likewise.
4307 * gimple-ssa-warn-alloca.c (pass_walloca::execute): Likewise.
4308 * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Likewise.
4309 * gimplify.c (warn_implicit_fallthrough_r): Likewise.
4310 (gimplify_va_arg_expr): Likewise.
4311 * hsa-gen.c (HSA_SORRY_ATV): Likewise.
4312 (HSA_SORRY_AT): Likewise.
4313 * ipa-devirt.c (compare_virtual_tables): Likewise.
4314 (warn_odr): Likewise.
4315 * multiple_target.c (expand_target_clones): Likewise.
4316 * opts-common.c (cmdline_handle_error): Likewise.
4317 * reginfo.c (globalize_reg): Likewise.
4318 * substring-locations.c (format_warning_n_va): Likewise.
4319 * tree-inline.c (expand_call_inline): Likewise.
4320 * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Likewise.
4321 * tree-ssa-loop-niter.c
4322 (do_warn_aggressive_loop_optimizations): Likewise.
4323 * tree-ssa-uninit.c (warn_uninit): Likewise.
4324 * tree.c (warn_deprecated_use): Likewise.
4326 2018-08-20 H.J. Lu <hongjiu.lu@intel.com>
4329 * config/i386/i386.md (eh_return): Always update EH return
4330 address in word_mode.
4332 2018-08-20 Chung-Lin Tang <cltang@codesourcery.com>
4334 * targhooks.c (std_gimplify_va_arg_expr): Properly handle case of when
4335 TARGET_SPLIT_COMPLEX_ARG is defined.
4337 2018-08-20 Bernd Edlinger <bernd.edlinger@hotmail.de>
4339 * expr.c (store_field): Change gcc_assert to gcc_checking_assert.
4341 2018-08-20 Bernd Edlinger <bernd.edlinger@hotmail.de>
4344 * expr.c (expand_assignment): Assert that bitpos is positive.
4345 (store_field): Likewise
4346 (expand_expr_real_1): Make sure that bitpos is positive.
4347 * config/alpha/alpha.h (CONSTANT_ADDRESS_P): Avoid signed
4350 2018-08-20 Nathan Sidwell <nathan@acm.org>
4352 * Makefile.in (CPP_ID_DATA_H): Delete.
4353 (CPP_INTERNAL_H): Don't add it.
4354 (GTFILES): Replace CPP_ID_DATA_H with CPPLIB_H.
4355 * gengtype.c (open_base_files): Replace cpp-id-data.h with cpplib.h
4357 2018-08-20 Richard Biener <rguenther@suse.de>
4359 PR tree-optimization/78655
4360 * tree-vrp.c (extract_range_from_binary_expr_1): Make
4361 pointer + offset nonnull if either operand is nonnull work.
4363 2018-08-20 Tom de Vries <tdevries@suse.de>
4365 * dwarf2out.c (add_scalar_info): Don't add reference to existing die
4366 unless the referenced die describes the added property using
4367 DW_AT_location or DW_AT_const_value. Fall back to exprloc case.
4368 Otherwise, add a DW_AT_location to the referenced die.
4370 2018-08-19 Uros Bizjak <ubizjak@gmail.com>
4373 * config/i386/i386.c (ix86_rtx_costs) [case SET]: Check source for
4374 register_operand when calling ix86_set_reg_reg_cost.
4375 [case CONST_INT, case CONST, case LABEL_REF, case SYMBOL_REF]:
4376 Set *total to 0 for operands that satisfy x86_64_immediate_operand
4377 predicate and to 1 otherwise.
4379 2018-08-18 Iain Sandoe <iain@sandoe.co.uk>
4381 * config/darwin.c (darwin_override_options): If -gsplit-dwarf is set,
4382 emit a diagnostic that it is not supported and reset the option.
4383 * config/darwin.h (DRIVER_SELF_SPECS): Note that gsplit-dwarf is not
4384 supported and consume the option. (ASM_FINAL_SPEC): New.
4386 2018-08-17 Segher Boessenkool <segher@kernel.crashing.org>
4388 * doc/md.texi (Patterns): Use @ref instead of @xref in the middle of
4391 2018-08-17 Sandra Loosemore <sandra@codesourcery.com>
4393 C-SKY port: Documentation
4395 * doc/extend.texi (C-SKY Function Attributes): New section.
4396 * doc/invoke.texi (Option Summary): Add C-SKY options.
4397 (C-SKY Options): New section.
4398 * doc/md.texi (Machine Constraints): Document C-SKY constraints.
4400 2018-08-17 Jojo <jijie_rong@c-sky.com>
4401 Huibin Wang <huibin_wang@c-sky.com>
4402 Sandra Loosemore <sandra@codesourcery.com>
4403 Chung-Lin Tang <cltang@codesourcery.com>
4405 C-SKY port: Backend implementation
4407 * config/csky/*: New.
4408 * common/config/csky/*: New.
4410 2018-08-17 Jojo <jijie_rong@c-sky.com>
4411 Huibin Wang <huibin_wang@c-sky.com>
4412 Sandra Loosemore <sandra@codesourcery.com>
4413 Chung-Lin Tang <cltang@codesourcery.com>
4414 Andrew Jenner <andrew@codesourcery.com>
4416 C-SKY port: Configury
4418 * config.gcc (csky-*-*): New.
4419 * configure.ac: Add csky to targets for dwarf2 debug_line support.
4420 * configure: Regenerated.
4422 2018-08-17 David Malcolm <dmalcolm@redhat.com>
4424 * dump-context.h: Include "dumpfile.h".
4425 (dump_context::dump_printf_va): Convert final param from va_list
4426 to va_list *. Convert from ATTRIBUTE_PRINTF to
4427 ATTRIBUTE_GCC_DUMP_PRINTF.
4428 (dump_context::dump_printf_loc_va): Likewise.
4429 * dumpfile.c: Include "stringpool.h".
4430 (make_item_for_dump_printf_va): Delete.
4431 (make_item_for_dump_printf): Delete.
4432 (class dump_pretty_printer): New class.
4433 (dump_pretty_printer::dump_pretty_printer): New ctor.
4434 (dump_pretty_printer::emit_items): New member function.
4435 (dump_pretty_printer::emit_any_pending_textual_chunks): New member
4437 (dump_pretty_printer::emit_item): New member function.
4438 (dump_pretty_printer::stash_item): New member function.
4439 (dump_pretty_printer::format_decoder_cb): New member function.
4440 (dump_pretty_printer::decode_format): New member function.
4441 (dump_context::dump_printf_va): Reimplement in terms of
4442 dump_pretty_printer.
4443 (dump_context::dump_printf_loc_va): Convert final param from va_list
4445 (dump_context::begin_scope): Reimplement call to
4446 make_item_for_dump_printf.
4447 (dump_printf): Update for change to dump_printf_va.
4448 (dump_printf_loc): Likewise.
4449 (selftest::test_capture_of_dump_calls): Convert "stmt" from
4450 greturn * to gimple *. Add a test_decl. Add tests of dump_printf
4451 with %T, %E, and %G.
4452 * dumpfile.h (ATTRIBUTE_GCC_DUMP_PRINTF): New macro.
4453 (dump_printf): Replace ATTRIBUTE_PRINTF_2 with
4454 ATTRIBUTE_GCC_DUMP_PRINTF (2, 3).
4455 (dump_printf_loc): Replace ATTRIBUTE_PRINTF_3 with
4456 ATTRIBUTE_GCC_DUMP_PRINTF (3, 0).
4457 * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Convert
4458 use of HOST_WIDE_INT_PRINT_DEC on unsigned HOST_WIDE_INT "count"
4459 within a dump_printf_loc call to "%wu".
4460 (vector_alignment_reachable_p): Merge two dump_printf[_loc] calls,
4461 converting a use of HOST_WIDE_INT_PRINT_DEC to "%wd". Add a
4462 missing space after "=".
4463 * tree-vect-loop.c (vect_analyze_loop_2) Within a dump_printf
4464 call, convert use of HOST_WIDE_INT_PRINT_DEC to "%wd".
4465 * tree-vect-slp.c (vect_slp_bb): Within a dump_printf_loc call,
4466 convert use of HOST_WIDE_INT_PRINT_UNSIGNED to "%wu".
4467 * tree-vectorizer.c (try_vectorize_loop_1): Likewise. Remove
4468 duplicate "vectorized" from message.
4470 2018-08-17 Szabolcs Nagy <szabolcs.nagy@arm.com>
4472 * config/arm/arm-builtins.c (arm_init_simd_builtin_types): Clear
4473 polyNxK_t element's TYPE_STRING_FLAG.
4475 2018-08-17 Segher Boessenkool <segher@kernel.crashing.org>
4477 * config/rs6000/rs6000.md (*cbranch, *creturn): Name these patterns
4478 (they were unnamed before). Fix comments.
4480 2018-08-17 Nathan Sidwell <nathan@acm.org>
4482 * cppbuiltin.c: Include "cpplib.h", not "cpp-id-data.h".
4484 2018-08-17 Richard Biener <rguenther@suse.de>
4486 PR tree-optimization/86841
4487 * wide-int-range.cc (wide_int_range_lshift): Use to_uhwi.
4489 2018-08-17 Martin Liska <mliska@suse.cz>
4491 * common.opt: Remove Warn, Init and Report for options with
4492 Ignore/Deprecated flag. Warning is done automatically for
4494 * config/i386/i386.opt: Likewise.
4495 * config/ia64/ia64.opt: Likewise.
4496 * config/rs6000/rs6000.opt: Likewise.
4497 * cppbuiltin.c (define_builtin_macros_for_compilation_flags):
4498 Remove usage of flag_check_pointer_bounds.
4499 * lto-wrapper.c (merge_and_complain): Do not handle
4500 OPT_fcheck_pointer_bounds.
4501 (append_compiler_options): Likewise.
4502 * opt-functions.awk: Do not handle Deprecated.
4503 * optc-gen.awk: Check that Var, Report and Init are not
4504 used for an option with Ignore/Deprecated flag.
4505 * opts-common.c (decode_cmdline_option): Do not report
4507 (read_cmdline_option): Report warning for OPT_SPECIAL_deprecated
4509 * opts.h (struct cl_option): Remove cl_deprecated flag.
4510 (CL_ERR_DEPRECATED): Remove error enum value.
4512 2018-08-17 Richard Biener <rguenther@suse.de>
4515 * tree-inline.c (copy_bb): When inlining __builtin_va_arg_pack_len ()
4516 across a va-arg-pack using call adjust its return value accordingly.
4518 2018-08-16 Martin Sebor <msebor@redhat.com>
4520 PR tree-optimization/86853
4521 * gimple-ssa-sprintf.c (struct format_result): Rename member.
4522 (struct fmtresult): Add member and initialize it in ctors.
4523 (format_character): Handle %C. Extend range to NUL. Set MAYFAIL.
4524 (format_string): Handle %S the same as %ls. Set MAYFAIL.
4525 (format_directive): Set POSUNDER4K when MAYFAIL is set.
4526 (parse_directive): Handle %C same as %c.
4527 (sprintf_dom_walker::compute_format_length): Adjust.
4528 (is_call_safe): Adjust.
4530 2018-08-16 Bernd Edlinger <bernd.edlinger@hotmail.de>
4532 * builtins.c (c_strlen): Add new parameter eltsize. Use it
4533 for determining how to count the elements.
4534 * builtins.h (c_strlen): Adjust prototype.
4535 * expr.c (string_constant): Add new parameter mem_size.
4536 Set *mem_size appropriately.
4537 * expr.h (string_constant): Adjust protoype.
4538 * gimple-fold.c (get_range_strlen): Add new parameter eltsize.
4539 * gimple-fold.h (get_range_strlen): Adjust prototype.
4540 * gimple-ssa-sprintf.c (get_string_length): Add new parameter eltsize.
4541 (format_string): Call get_string_length with eltsize.
4543 2018-08-16 David Malcolm <dmalcolm@redhat.com>
4545 * diagnostic.c (default_diagnostic_start_span_fn): Call pp_string
4546 to emit the span, rather than setting it as the prefix.
4548 2018-08-16 David Malcolm <dmalcolm@redhat.com>
4550 * diagnostic-show-locus.c (layout::start_annotation_line): Add
4551 "margin_char" parameter, defaulting to space. Use it in place
4552 of pp_space for the initial part of the margin.
4553 (layout::print_leading_fixits): Use '+' when filling the margin
4554 of line-insertion fix-it hints.
4556 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
4558 * config/rs6000/rs6000.md (two unnamed define_insn and define_split):
4561 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
4563 * config/rs6000/altivec.md: Don't set length attribute to the default
4565 * config/rs6000/darwin.md: Ditto.
4566 * config/rs6000/dfp.md: Ditto.
4567 * config/rs6000/htm.md: Ditto.
4568 * config/rs6000/rs6000.md: Ditto.
4569 * config/rs6000/sync.md: Ditto.
4570 * config/rs6000/vsx.md: Ditto.
4572 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
4574 * config/rs6000/altivec.md: Don't set length attribute to the default
4575 value, for branch instructions.
4576 * config/rs6000/darwin.md: Ditto.
4577 * config/rs6000/rs6000.md: Ditto.
4579 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
4581 * config/rs6000/rs6000.md (length): Always define as const_int 4.
4582 (unnamed conditional branch define_insn): Set length to 4 or 8
4583 depending on offset.
4584 (<bd>_<mode>): Similar, for alternative 0.
4585 (<bd>tf_<mode>): Ditto.
4587 2018-08-16 Tamar Christina <tamar.christina@arm.com>
4589 * expr.c (copy_blkmode_to_reg): Perform larger copies when safe.
4591 2018-08-16 Matthew Malcomson <matthew.malcomson@arm.com>
4593 * doc/rtl.texi: Replace old RTX class names with new names.
4596 2018-08-16 Vlad Lazar <vlad.lazar@arm.com>
4598 * expmed.h (canonicalize_comparison): New declaration.
4599 * expmed.c (canonicalize_comparison, equivalent_cmp_code): New function.
4600 * expmed.c (emit_store_flag_1): Add call to canonicalize_comparison.
4601 * optabs.c (prepare_cmp_insn): Likewise.
4602 * rtl.h (unsigned_condition_p): New function which checks if a
4603 comparison operator is unsigned.
4605 2018-08-16 Nathan Sidwell <nathan@acm.org>
4607 * config/rs6000/rs6000-c.c (rs6000_macro_to_expend): Use cpp_macro_p.
4608 * config/powerpcspc/powerpcspe-c.c (rs6000_macro_to_expend): Likewise.
4610 2018-08-16 Tamar Christina <tamar.christina@arm.com>
4613 * config/arm/arm.c (arm_can_change_mode_class): Disallow subreg.
4614 * config/arm/neon.md (movv4hf, movv8hf): Refactored to..
4615 (mov<mov>): ..this and enable unconditionally.
4617 2018-08-16 Tamar Christina <tamar.christina@arm.com>
4619 * config/arm/neon.md (*neon_mov<mode>): Remove reg-to-reg alternative.
4621 2018-08-16 Sam Tebbs <sam.tebbs@arm.com>
4623 * config/aarch64/aarch64.opt (mlow-precision-recip-sqrt)
4624 (mlow-precision-sqrt, mlow-precision-div, mverbose-cost-dump): Replace
4625 "Common" with "Target".
4627 2018-08-15 Uros Bizjak <ubizjak@gmail.com>
4629 * config/i386/i386.opt (mmitigate-rop): Mark as deprecated.
4630 * doc/invoke.texi (mmitigate-rop): Remove.
4631 * config/i386/i386.c: Do not include "regrename.h".
4632 (ix86_rop_should_change_byte_p, reg_encoded_number)
4633 (ix86_get_modrm_for_rop, set_rop_modrm_reg_bits, ix86_mitigate_rop):
4635 (ix86_reorg): Remove call to ix86_mitigate_rop.
4636 * config/i386/i386.md (attr "modrm_class"): Remove.
4637 (cmp<mode>_ccno_1, mov<mode>_xor, movstrict<mode>_xor)
4638 (x86_mov<mode>cc_0_m1. x86_mov<mode>cc_0_m1_se)
4639 (x86_mov<mode>cc_0_m1_neg): Remove modrm_class attribute override.
4641 2018-08-15 Will Schmidt <will_schmidt@vnet.ibm.com>
4643 * config/rs6000/rs600.c (rs6000_gimple_fold_builtin): Add entries to
4644 allow folding of mergeh() and mergel() for the float and double types.
4645 (fold_mergehl_helper): Rework to handle building a permute tree
4648 2018-08-15 Uros Bizjak <ubizjak@gmail.com>
4650 * config/i386/i386.c (expand_vec_perm_movs): Enable V4SFmode
4653 2018-08-15 David Malcolm <dmalcolm@redhat.com>
4655 * common.opt (fdiagnostics-show-labels): New option.
4656 * diagnostic-show-locus.c (class layout_range): Add field
4658 (class layout): Add field "m_show_labels_p".
4659 (layout_range::layout_range): Add param "label" and use it to
4661 (make_range): Pass in NULL for new "label" param of layout_range's
4663 (layout::layout): Initialize m_show_labels_p.
4664 (layout::maybe_add_location_range): Pass in loc_range->m_label
4665 when constructing layout_range instances.
4666 (struct line_label): New struct.
4667 (layout::print_any_labels): New member function.
4668 (layout::print_line): Call it if label-printing is enabled.
4669 (selftest::test_one_liner_labels): New test.
4670 (selftest::test_diagnostic_show_locus_one_liner): Call it.
4671 * diagnostic.c (diagnostic_initialize): Initialize
4672 context->show_labels_p.
4673 * diagnostic.h (struct diagnostic_context): Add field
4675 * doc/invoke.texi (Diagnostic Message Formatting Options): Add
4676 -fno-diagnostics-show-labels.
4677 * dwarf2out.c (gen_producer_string): Add
4678 OPT_fdiagnostics_show_labels to the ignored options.
4679 * gcc-rich-location.c (gcc_rich_location::add_expr): Add "label"
4681 (gcc_rich_location::maybe_add_expr): Likewise.
4682 * gcc-rich-location.h (gcc_rich_location::gcc_rich_location): Add
4683 label" param, defaulting to NULL.
4684 (gcc_rich_location::add_expr): Add "label" param.
4685 (gcc_rich_location::maybe_add_expr): Likewise.
4686 (class text_range_label): New class.
4687 (class range_label_for_type_mismatch): New class.
4688 * gimple-ssa-sprintf.c (fmtwarn): Pass NULL for new label params
4689 of format_warning_va.
4690 (fmtwarn_n): Likewise for new params of format_warning_n_va.
4691 * lto-wrapper.c (merge_and_complain): Add
4692 OPT_fdiagnostics_show_labels to the "pick one setting" options.
4693 (append_compiler_options): Likewise to the dropped options.
4694 (append_diag_options): Likewise to the passed-on options.
4695 * opts.c (common_handle_option): Handle the new option.
4696 * selftest-diagnostic.c
4697 (test_diagnostic_context::test_diagnostic_context): Enable
4699 * substring-locations.c: Include "gcc-rich-location.h".
4700 (format_warning_n_va): Add "fmt_label" and "param_label" params
4701 and use them as appropriate.
4702 (format_warning_va): Add "fmt_label" and "param_label" params,
4703 passing them on to format_warning_n_va.
4704 (format_warning_at_substring): Likewise.
4705 (format_warning_at_substring_n): Likewise.
4706 * substring-locations.h (format_warning_va): Add "fmt_label" and
4707 "param_label" params.
4708 (format_warning_n_va): Likewise.
4709 (format_warning_at_substring): Likewise.
4710 (format_warning_at_substring_n): Likewise.
4711 * toplev.c (general_init): Initialize global_dc->show_labels_p.
4713 2018-08-15 Qing Zhao <qing.zhao@oracle.com>
4716 * builtins.c (expand_builtin_memcmp): Do not expand the call
4717 when overflow is detected.
4719 2018-08-15 Martin Sebor <msebor@redhat.com>
4721 PR tree-optimization/71625
4722 * config/aarch64/aarch64-builtins.c
4723 (aarch64_init_simd_builtin_types): Clear Poly8_t's TYPE_STRING_FLAG.
4725 2018-08-15 Ilya Leoshkevich <iii@linux.ibm.com>
4727 * config/s390/s390.c (s390_reorg): Remove loop.
4729 2018-08-15 Iain Sandoe <iain@sandoe.co.uk>
4732 (darwin_function_switched_text_sections): Delete.
4733 * gcc/config/darwin.h
4734 (TARGET_ASM_FUNCTION_SWITCHED_TEXT_SECTIONS): Likewise.
4736 2018-08-15 Iain Sandoe <iain@sandoe.co.uk>
4739 * config/darwin.h: (DEBUG_STR_OFFSETS_SECTION, DEBUG_LOCLISTS_SECTION,
4740 DEBUG_RNGLISTS_SECTION) new macros. (DEBUG_PUBNAMES_SECTION,
4741 DEBUG_PUBTYPES_SECTION) update to include GNU variant.
4743 2018-08-15 Martin Liska <mliska@suse.cz>
4745 PR tree-optimization/86925
4746 * predict.c (expr_expected_value_1): When taking
4747 later predictor, assign also probability.
4748 Use fold_build2_initializer_loc in order to fold
4749 the expression in -frounding-math.
4751 2018-08-14 Allan Sandfeld Jensen <allan.jensen@qt.io>
4753 * config/i386/i386.c (expand_vec_perm_movs): New method matching movs
4755 (expand_vec_perm_1): Try the new method.
4757 2018-08-14 Ilya Leoshkevich <iii@linux.ibm.com>
4760 * lra-lives.c (remove_some_program_points_and_update_live_ranges):
4761 Check whether lra_live_max_point is 0 before dividing.
4763 2018-08-14 Martin Sebor <msebor@redhat.com>
4765 PR tree-optimization/86650
4766 * tree-vrp.c (vrp_prop::check_array_ref): Print an inform message.
4767 (vrp_prop::check_mem_ref): Same.
4769 2018-08-13 Liu Hao <lh_mouse@126.com>
4771 * pretty-print.c (eat_esc_sequence): Swap the foreground and
4772 background colors if the COMMON_LVB_REVERSE_VIDEO flag is set,
4773 and clear it thereafter, as it only works for DBCS.
4775 2018-08-13 Liu Hao <lh_mouse@126.com>
4777 * pretty-print.c (mingw_ansi_fputs): Do not call _close() on the
4778 handle returned by _get_osf_handle().
4780 2018-08-13 Will Schmidt <will_schmidt@vnet.ibm.com>
4782 * gcc/config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add support
4783 for folding vec_perm.
4785 2018-08-13 Will Schmidt <will_schmidt@vnet.ibm.com>
4787 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin):
4788 Add support for gimple-folding of vec_pack() and vec_unpack()
4791 2018-08-13 Will Schmidt <will_schmidt@vnet.ibm.com>
4793 * config/rs6000/rs6000.c (rs6000_builtin_valid_without_lhs): Add
4794 vec_xst variants to the list.
4795 (rs6000_gimple_fold_builtin): Add support for folding unaligned
4796 vector loads and stores.
4798 2018-08-13 David Edelsohn <dje.gcc@gmail.com>
4800 * config.gcc (rs6000-ibm-aix4.x): Delete.
4801 (rs6000-ibm-aix5.1): Delete.
4802 (rs6000-ibm-aix5.2): Delete.
4803 (rs6000-ibm-aix5.3): Delete.
4804 * config/rs6000/aix43.h: Delete.
4805 * config/rs6000/aix51.h: Delete.
4806 * config/rs6000/aix52.h: Delete.
4807 * config/rs6000/t-aix43: Delete.
4809 2018-08-13 Ilya Leoshkevich <iii@linux.ibm.com>
4811 * config/s390/s390.c (s390_decompose_constant_pool_ref):
4813 (s390_decompose_address): Factor out constant pool ref
4816 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
4818 * config/nds32/nds32-predicates.c
4819 (nds32_can_use_bclr_p): Change return type as bool.
4820 (nds32_can_use_bset_p): Ditto.
4821 (nds32_can_use_btgl_p): Ditto.
4822 (nds32_can_use_bitci_p): Ditto.
4823 * config/nds32/nds32-protos.h
4824 (nds32_can_use_bclr_p): Change declaration.
4825 (nds32_can_use_bset_p): Ditto.
4826 (nds32_can_use_btgl_p): Ditto.
4827 (nds32_can_use_bitci_p): Ditto.
4829 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
4831 * config/nds32/nds32.c (nds32_expand_prologue, nds32_expand_epilogue):
4832 Support -msched-prolog-epilog option.
4833 * config/nds32/nds32.opt (msched-prolog-epilog): New option.
4835 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
4837 * common/config/nds32/nds32-common.c
4838 (nds32_option_optimization_table): Enalbe -malways-align.
4840 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
4842 * config.gcc (nds32*): Add nds32_isr.h and nds32_init.inc in
4844 * common/config/nds32/nds32-common.c (nds32_handle_option): Handle
4845 OPT_misr_secure_ case.
4846 * config/nds32/nds32-isr.c: Implementation of backward compatibility.
4847 * config/nds32/nds32-protos.h (nds32_isr_function_critical_p): New.
4848 * config/nds32/nds32.c (nds32_attribute_table): Add critical and
4850 * config/nds32/nds32.h (nds32_isr_nested_type): Add NDS32_CRITICAL.
4851 (nds32_isr_info): New field security_level.
4852 (TARGET_ISR_VECTOR_SIZE_4_BYTE): New macro.
4853 * config/nds32/nds32.md (return_internal): Consider critical attribute.
4854 * config/nds32/nds32.opt (misr-secure): New option.
4855 * config/nds32/nds32_init.inc: New file.
4856 * config/nds32/nds32_isr.h: New file.
4858 2018-08-11 John David Anglin <danglin@gcc.gnu.org>
4860 * config/pa/pa.md (UNSPEC_MEMORY_BARRIER): New unspec enum.
4861 Update comment for atomic instructions.
4862 (atomic_storeqi, atomic_storehi, atomic_storesi, atomic_storesf,
4863 atomic_loaddf, atomic_loaddf_1, atomic_storedf, atomic_storedf_1):
4865 (atomic_loaddi): Revise fence expansion to only emit fence prior to
4866 load for __ATOMIC_SEQ_CST model.
4867 (atomic_loaddi_1): Remove float register target.
4868 (atomic_storedi): Handle CONST_INT values.
4869 (atomic_storedi_1): Remove float register source. Add special case
4871 (memory_barrier): New expander and insn.
4873 2018-08-11 Jakub Jelinek <jakub@redhat.com>
4875 PR tree-optimization/86835
4876 * tree-ssa-math-opts.c (insert_reciprocals): Even when inserting
4877 new_stmt after def_gsi, make sure to insert new_square_stmt after
4878 that stmt, not 2 stmts before it.
4880 2018-08-10 Alexander Monakov <amonakov@ispras.ru>
4883 * config/i386/i386.md (<s>mul<mode>3_highpart): Use DWIH mode iterator
4886 2018-08-10 Martin Liska <mliska@suse.cz>
4889 * builtin-types.def (BT_FN_LONG_LONG_LONG_DOUBLE): Add new
4891 * builtins.c (expand_builtin_expect_with_probability):
4893 (expand_builtin_expect_with_probability): New function.
4894 (build_builtin_expect_predicate): Add new argumnet probability
4895 for BUILT_IN_EXPECT_WITH_PROBABILITY.
4896 (fold_builtin_expect):
4899 * builtins.def (BUILT_IN_EXPECT_WITH_PROBABILITY):
4900 * builtins.h (fold_builtin_expect): Set new argument.
4901 * doc/extend.texi: Document __builtin_expect_with_probability.
4902 * doc/invoke.texi: Likewise.
4903 * gimple-fold.c (gimple_fold_call): Pass new argument.
4904 * ipa-fnsummary.c (find_foldable_builtin_expect): Handle
4905 also BUILT_IN_EXPECT_WITH_PROBABILITY.
4906 * predict.c (get_predictor_value): New function.
4907 (expr_expected_value): Add new argument probability. Assume
4908 that predictor and probability are always non-null.
4909 (expr_expected_value_1): Likewise. For __builtin_expect and
4910 __builtin_expect_with_probability set probability. Handle
4911 combination in binary expressions.
4912 (tree_predict_by_opcode): Simplify code by simply calling
4913 get_predictor_value.
4914 (pass_strip_predict_hints::execute): Add handling of
4915 BUILT_IN_EXPECT_WITH_PROBABILITY.
4916 * predict.def (PRED_BUILTIN_EXPECT_WITH_PROBABILITY): Add
4918 * tree.h (DECL_BUILT_IN_P): New function.
4920 2018-08-10 Martin Liska <mliska@suse.cz>
4922 PR tree-optimization/85799
4923 * passes.def: Add argument for pass_strip_predict_hints.
4924 * predict.c (class pass_strip_predict_hints): Add new argument
4926 (strip_predictor_early): New function.
4927 (pass_strip_predict_hints::execute): Call the function to
4929 (strip_predict_hints): New function.
4930 * predict.def: Fix comment.
4932 2018-08-10 Thomas Preud'homme <thomas.preudhomme@linaro.org>
4934 * Makefile.in: Clarify which tm.texi to copy over to assert the
4935 right to grant a GFDL license for all.
4937 2018-08-09 Jeff Law <law@redhat.com>
4939 * config/m68k/m68k.c (m68k_adjust_decorated_operand): Remove
4942 2018-08-09 Andreas Schwab <schwab@linux-m68k.org>
4944 * config/m68k/m68k-protos.h (m68k_final_prescan_insn): Remove
4947 2018-08-09 Richard Sandiford <richard.sandiford@arm.com>
4949 * tree-vect-loop.c (vectorizable_reduction): Allow inner-loop
4950 reductions for variable-length vectors.
4952 2018-08-09 David Malcolm <dmalcolm@redhat.com>
4955 * common.opt (fdiagnostics-show-line-numbers): New option.
4956 * diagnostic-show-locus.c (class layout): Add fields
4957 "m_show_line_numbers_p" and "m_linenum_width";
4958 (num_digits): New function.
4959 (test_num_digits): New function.
4960 (layout::layout): Initialize new fields. Update m_x_offset
4961 logic to handle any left margin.
4962 (layout::print_source_line): Print line number when requested.
4963 (layout::start_annotation_line): New member function.
4964 (layout::print_annotation_line): Call it.
4965 (layout::print_leading_fixits): Likewise.
4966 (layout::print_trailing_fixits): Likewise. Update calls to
4967 move_to_column for new parameter.
4968 (layout::get_x_bound_for_row): Add "add_left_margin" param and use
4969 it to potentially call start_annotation_line.
4970 (layout::show_ruler): Call start_annotation_line.
4971 (selftest::test_line_numbers_multiline_range): New selftest.
4972 (selftest::diagnostic_show_locus_c_tests): Call test_num_digits
4973 and selftest::test_line_numbers_multiline_range.
4974 * diagnostic.c (diagnostic_initialize): Initialize
4975 show_line_numbers_p.
4976 * diagnostic.h (struct diagnostic_context): Add field
4977 "show_line_numbers_p".
4978 * doc/invoke.texi (Diagnostic Message Formatting Options): Add
4979 -fno-diagnostics-show-line-numbers.
4980 * dwarf2out.c (gen_producer_string): Add
4981 OPT_fdiagnostics_show_line_numbers to the ignored options.
4982 * lto-wrapper.c (merge_and_complain): Likewise to the "pick
4983 one setting" options.
4984 (append_compiler_options): Likewise to the dropped options.
4985 (append_diag_options): Likewise to the passed-on options.
4986 * opts.c (common_handle_option): Handle the new option.
4987 * toplev.c (general_init): Set up global_dc->show_line_numbers_p.
4989 2018-08-09 Kelvin Nilsen <kelvin@gcc.gnu.org>
4991 * doc/extend.texi (PowerPC AltiVec Built-in Functions Available on
4992 ISA 2.07): Correct spelling of bcdsub to be __builtin_bcdsub. Add
4993 third argument of type "const signed char" to descriptions of
4994 __builtin_bcdadd, __builtin_bcdadd_lt, __builtin_bcdadd_eq,
4995 __builtin_bcdadd_gt, __builtin_bcdadd_ov, __builtin_bcdsub,
4996 __builtin_bcdsub_lt, __builtin_bcdsub_eq, __builtin_bcdsub_gt,
4997 __builtin_bcdsub_ov functions.
4999 2018-08-09 Richard Sandiford <richard.sandiford@arm.com>
5001 PR tree-optimization/86858
5002 * tree-vect-loop.c (vect_is_simple_reduction): Restore
5003 flow_bb_inside_loop_p calls.
5005 2018-08-09 Richard Sandiford <richard.sandiford@arm.com>
5007 PR tree-optimization/86871
5008 * tree-vect-stmts.c (vect_transform_stmt): Use gimple_get_lhs
5009 instead of gimple_assign_lhs.
5011 2018-08-09 Richard Earnshaw <rearnsha@arm.com>
5014 * config/aarch64/aarch64.md (add<mode>3_carryinC_zero): Add missing
5015 register constraint to operand 0.
5016 (add<mode>3_carryinC): Likewise.
5017 (add<mode>3_carryinV_zero, add<mode>3_carryinV): Likewise.
5019 2018-08-09 Martin Liska <mliska@suse.cz>
5022 * common.opt: Remove extra line.
5024 2018-08-09 Martin Liska <mliska@suse.cz>
5026 * params.def (PARAM_ALIGN_LOOP_ITERATIONS): Remove double dots
5027 at the end of a line, make first letter capital and end up
5028 a sentence with a dot.
5029 (PARAM_LOOP_INTERCHANGE_STRIDE_RATIO): Likewise.
5030 (PARAM_LOOP_BLOCK_TILE_SIZE): Likewise.
5031 (PARAM_GRAPHITE_MAX_NB_SCOP_PARAMS): Likewise.
5032 (PARAM_GRAPHITE_MAX_ARRAYS_PER_SCOP): Likewise.
5033 (PARAM_MAX_ISL_OPERATIONS): Likewise.
5034 (PARAM_GRAPHITE_ALLOW_CODEGEN_ERRORS): Likewise.
5035 (PARAM_PROFILE_FUNC_INTERNAL_ID): Likewise.
5036 (PARAM_INDIR_CALL_TOPN_PROFILE): Likewise.
5037 (PARAM_SLP_MAX_INSNS_IN_BB): Likewise.
5038 (PARAM_IPA_CP_EVAL_THRESHOLD): Likewise.
5039 (PARAM_IPA_CP_RECURSION_PENALTY): Likewise.
5040 (PARAM_IPA_CP_SINGLE_CALL_PENALTY): Likewise.
5041 (PARAM_IPA_CP_LOOP_HINT_BONUS): Likewise.
5042 (PARAM_IPA_CP_ARRAY_INDEX_HINT_BONUS): Likewise.
5043 (PARAM_TREE_REASSOC_WIDTH): Likewise.
5044 (PARAM_HSA_GEN_DEBUG_STORES): Likewise.
5045 (PARAM_MAX_SPECULATIVE_DEVIRT_MAYDEFS): Likewise.
5046 (PARAM_MAX_VRP_SWITCH_ASSERTIONS): Likewise.
5048 2018-08-09 Andreas Krebbel <krebbel@linux.ibm.com>
5051 * config/s390/s390.c (s390_option_override_internal): Reduce the
5052 stack-clash-protection-probe-interval param if it would be too big
5055 2018-08-08 Andreas Schwab <schwab@linux-m68k.org>
5058 * config/m68k/m68k.h (FINAL_PRESCAN_INSN): Don't define.
5059 * config/m68k/m68k.c (handle_move_double): Don't call
5060 m68k_final_prescan_insn.
5061 (m68k_adjust_decorated_operand): Renamed from
5062 m68k_final_prescan_insn, remove first and third operand and
5064 (print_operand): Call it.
5065 (print_operand_address): Call it.
5067 2018-08-08 Nathan Sidwell <nathan@acm.org>
5069 * diagnostic.c (diagnostic_report_current_module): Use
5070 linemap_included_from & linemap_included_from_linemap.
5072 2018-08-08 Hongbo Zhang <hongbo.zhang@linaro.org>
5074 * config/aarch64/aarch64-cores.def: Add phecda core.
5075 * config/aarch64/aarch64-tune.md: Regenerate.
5076 * doc/invoke.texi: Add phecda core.
5078 2018-08-08 Andreas Krebbel <krebbel@linux.ibm.com>
5081 * config/s390/constraints.md ("NxHD0", "NxSD0"): New constraint
5083 * config/s390/s390.md ("movti"): Add more alternatives for
5084 constant to GPR copies.
5086 2018-08-08 Andreas Krebbel <krebbel@linux.ibm.com>
5088 * config/s390/s390.c: Fix whitespace damage throughout the file.
5089 * config/s390/s390.h: Likewise.
5090 * config/s390/tpf.h: Likewise.
5092 2018-08-08 Ilya Leoshkevich <iii@linux.ibm.com>
5094 * config/s390/s390.c (s390_loadrelative_operand_p):
5095 Remove TARGET_CPU_ZARCH usages.
5096 (s390_rtx_costs): Likewise.
5097 (s390_legitimate_constant_p): Likewise.
5098 (s390_cannot_force_const_mem): Likewise.
5099 (legitimate_reload_constant_p): Likewise.
5100 (s390_preferred_reload_class): Likewise.
5101 (legitimize_pic_address): Likewise.
5102 (legitimize_tls_address): Likewise.
5103 (s390_split_branches): Removed.
5104 (s390_add_execute): Removed.
5105 (s390_dump_pool): Remove TARGET_CPU_ZARCH usages.
5106 (s390_mainpool_start): Likewise.
5107 (s390_mainpool_finish): Likewise.
5108 (s390_mainpool_cancel): Removed.
5109 (s390_chunkify_start): Remove TARGET_CPU_ZARCH usages.
5110 (s390_chunkify_cancel): Likewise.
5111 (s390_return_addr_rtx): Likewise.
5112 (s390_register_info): Remove split_branches_pending_p uages.
5113 (s390_optimize_register_info): Likewise.
5114 (s390_init_frame_layout): Remove TARGET_CPU_ZARCH and
5115 split_branches_pending_p usages.
5116 (s390_can_eliminate): Remove TARGET_CPU_ZARCH usages.
5117 (s390_load_got): Likewise.
5118 (s390_expand_split_stack_prologue): Likewise.
5119 (output_asm_nops): Likewise.
5120 (s390_function_profiler): Likewise.
5121 (s390_emit_call): Likewise.
5122 (s390_conditional_register_usage): Likewise.
5123 (s390_optimize_prologue): Likewise.
5124 (s390_reorg): Remove TARGET_CPU_ZARCH and
5125 split_branches_pending_p usages.
5126 (s390_option_override_internal): Remove TARGET_CPU_ZARCH
5128 (s390_output_indirect_thunk_function): Likewise.
5129 * config/s390/s390.h (TARGET_CPU_ZARCH): Removed.
5130 (TARGET_CPU_ZARCH_P): Removed.
5131 (struct machine_function): Remove split_branches_pending_p.
5132 * config/s390/s390.md: Remove TARGET_CPU_ZARCH usages.
5134 2018-08-08 Ilya Leoshkevich <iii@linux.ibm.com>
5136 * common/config/s390/s390-common.c (processor_flags_table):
5138 * config.gcc: Remove with_arch/with_tune support.
5139 * config/s390/2064.md: Remove cpu attribute comparisons.
5140 * config/s390/driver-native.c (s390_host_detect_local_cpu):
5142 * config/s390/linux.h (ASM_SPEC):
5143 Remove -march support.
5144 * config/s390/s390-c.c (s390_cpu_cpp_builtins_internal):
5145 Use a table to get an arch level.
5146 * config/s390/s390-opts.h (enum processor_type):
5148 * config/s390/s390.c
5149 (processor_table): Remove entries, add arch_level values.
5150 (s390_issue_rate): Remove cases.
5151 (s390_option_override): Adjust
5152 s390_option_override_internal() call.
5153 (s390_option_override_internal): Remove deprecation warning.
5154 (s390_valid_target_attribute_tree): Adjust
5155 s390_option_override_internal() call.
5156 * config/s390/s390.h (struct s390_processor):
5157 Share with s390-c.c, add arch_level field.
5158 * config/s390/s390.md:
5159 Remove occurrences in cpu attribute.
5160 * config/s390/s390.opt: Remove -march/-mtune support.
5161 * config/s390/tpf.h (ASM_SPEC): Remove -march support.
5162 * doc/invoke.texi: Remove deprecation warning.
5164 2018-08-08 Luis Machado <luis.machado@linaro.org>
5166 * config/aarch64/aarch64.c (qdf24xx_vector_cost): New static
5168 (qdf24xx_tunings): Set vector cost structure to
5169 qdf24xx_vector_cost.
5171 * config/aarch64/aarch64.c (qdf24xx_addrcost_table)
5172 <register_sextend>: Set to 3.
5174 2018-08-07 Richard Sandiford <richard.sandiford@arm.com>
5177 * config/aarch64/iterators.md (FRECP, frecp_suffix): Delete.
5178 * config/aarch64/aarch64-simd.md
5179 (aarch64_frecp<FRECP:frecp_suffix><mode>): Fold FRECPE into...
5180 (@aarch64_frecpe<mode>): ...here and the move FRECPX to...
5181 (aarch64_frecpx<mode>): ...this new pattern.
5182 * config/aarch64/aarch64-simd-builtins.def: Remove comment
5183 about aarch64_frecp<FRECP:frecp_suffix><mode>.
5185 2018-08-07 Martin Liska <mliska@suse.cz>
5188 * predict.c (expr_expected_value_1): Handle DECL_IS_MALLOC,
5189 BUILT_IN_REALLOC and DECL_IS_OPERATOR_NEW.
5190 * predict.def (PRED_MALLOC_NONNULL): New predictor.
5191 * doc/extend.texi: Document that malloc attribute adds
5194 2018-08-06 John David Anglin <danglin@gcc.gnu.org>
5197 * config/pa/pa.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
5198 Define to speculation_safe_value_not_needed.
5200 2018-08-06 Jeff Law <law@redhat.com>
5202 * tree-ssa-dom.c (dom_opt_dom_walker::optimize_stmt): Pass down
5203 the vr_values instance to cprop_into_stmt.
5204 (cprop_into_stmt): Pass vr_values instance down to cprop_operand.
5205 (cprop_operand): Also query EVRP to determine if OP is a constant.
5207 2018-08-06 Nathan Sidwell <nathan@acm.org>
5209 * diagnostic.c (diagnostic_report_current_module): Reroll
5210 included-at loop. Translate text.
5212 2018-08-06 David Malcolm <dmalcolm@redhat.com>
5214 * function-tests.c (selftest::test_expansion_to_rtl): Call
5215 free_after_compilation.
5217 2018-08-06 Alan Hayward <alan.hayward@arm.com>
5219 * config/aarch64/aarch64.md: Add clobber highs to tls_desc.
5221 2018-08-06 Andreas Krebbel <krebbel@linux.ibm.com>
5223 * config/s390/s390.c (s390_loop_unroll_adjust): Prevent small
5224 loops with memory block operations from getting unrolled.
5226 2018-08-06 Ulrich Weigand <uweigand@de.ibm.com>
5229 * config/spu/spu.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
5230 Define to speculation_safe_value_not_needed.
5232 2018-08-06 Jeff Law <law@redhat.com>
5234 * reload1.c (forget_old_reloads_1): Adjust CLOBBER_HIGH
5237 2018-08-06 Jozef Lawrynowicz <jozef.l@mittosystems.com>
5240 * gcc/tree.c (build_common_tree_nodes): Initialize integer_types array
5241 with all enabled __intN types.
5243 * gcc/testsuite/gcc.target/msp430/pr86662.c: New test.
5245 2018-08-06 Alan Hayward <alan.hayward@arm.com>
5247 * alias.c (record_set): Check for clobber high.
5248 * cfgexpand.c (expand_gimple_stmt): Likewise.
5249 * combine-stack-adj.c (single_set_for_csa): Likewise.
5250 * combine.c (find_single_use_1): Likewise.
5251 (set_nonzero_bits_and_sign_copies): Likewise.
5252 (get_combine_src_dest): Likewise.
5253 (is_parallel_of_n_reg_sets): Likewise.
5254 (try_combine): Likewise.
5255 (record_dead_and_set_regs_1): Likewise.
5256 (reg_dead_at_p_1): Likewise.
5257 (reg_dead_at_p): Likewise.
5258 * dce.c (deletable_insn_p): Likewise.
5259 (mark_nonreg_stores_1): Likewise.
5260 (mark_nonreg_stores_2): Likewise.
5261 * df-scan.c (df_find_hard_reg_defs): Likewise.
5262 (df_uses_record): Likewise.
5263 (df_get_call_refs): Likewise.
5264 * dwarf2out.c (mem_loc_descriptor): Likewise.
5265 * haifa-sched.c (haifa_classify_rtx): Likewise.
5266 * ira-build.c (create_insn_allocnos): Likewise.
5267 * ira-costs.c (scan_one_insn): Likewise.
5268 * ira.c (equiv_init_movable_p): Likewise.
5269 (rtx_moveable_p): Likewise.
5270 (interesting_dest_for_shprep): Likewise.
5271 * jump.c (mark_jump_label_1): Likewise.
5272 * postreload-gcse.c (record_opr_changes): Likewise.
5273 * postreload.c (reload_cse_simplify): Likewise.
5274 (struct reg_use): Add source expr.
5275 (reload_combine): Check for clobber high.
5276 (reload_combine_note_use): Likewise.
5277 (reload_cse_move2add): Likewise.
5278 (move2add_note_store): Likewise.
5279 * print-rtl.c (print_pattern): Likewise.
5280 * recog.c (decode_asm_operands): Likewise.
5281 (store_data_bypass_p): Likewise.
5282 (if_test_bypass_p): Likewise.
5283 * regcprop.c (kill_clobbered_value): Likewise.
5284 (kill_set_value): Likewise.
5285 * reginfo.c (reg_scan_mark_refs): Likewise.
5286 * reload1.c (maybe_fix_stack_asms): Likewise.
5287 (eliminate_regs_1): Likewise.
5288 (elimination_effects): Likewise.
5289 (mark_not_eliminable): Likewise.
5290 (scan_paradoxical_subregs): Likewise.
5291 (forget_old_reloads_1): Likewise.
5292 * reorg.c (find_end_label): Likewise.
5293 (try_merge_delay_insns): Likewise.
5294 (redundant_insn): Likewise.
5295 (own_thread_p): Likewise.
5296 (fill_simple_delay_slots): Likewise.
5297 (fill_slots_from_thread): Likewise.
5298 (dbr_schedule): Likewise.
5299 * resource.c (update_live_status): Likewise.
5300 (mark_referenced_resources): Likewise.
5301 (mark_set_resources): Likewise.
5302 * rtl.c (copy_rtx): Likewise.
5303 * rtlanal.c (reg_referenced_p): Likewise.
5304 (single_set_2): Likewise.
5305 (noop_move_p): Likewise.
5306 (note_stores): Likewise.
5307 * sched-deps.c (sched_analyze_reg): Likewise.
5308 (sched_analyze_insn): Likewise.
5310 2018-08-06 Alan Hayward <alan.hayward@arm.com>
5312 * cse.c (invalidate_reg): New function extracted from...
5313 (invalidate): ...here.
5314 (canonicalize_insn): Check for clobber high.
5315 (invalidate_from_clobbers): invalidate clobber highs.
5316 (invalidate_from_sets_and_clobbers): Likewise.
5317 (count_reg_usage): Check for clobber high.
5318 (insn_live_p): Likewise.
5319 * cselib.c (cselib_expand_value_rtx_1):Likewise.
5320 (cselib_invalidate_regno): Check for clobber in setter.
5321 (cselib_invalidate_rtx): Pass through setter.
5322 (cselib_invalidate_rtx_note_stores):
5323 (cselib_process_insn): Check for clobber high.
5324 * cselib.h (cselib_invalidate_rtx): Add operand.
5326 2018-08-06 Alan Hayward <alan.hayward@arm.com>
5328 * lra-eliminations.c (lra_eliminate_regs_1): Check for clobber high.
5329 (mark_not_eliminable): Likewise.
5330 * lra-int.h (struct lra_insn_reg): Add clobber high marker.
5331 * lra-lives.c (process_bb_lives): Check for clobber high.
5332 * lra.c (new_insn_reg): Remember clobber highs.
5333 (collect_non_operand_hard_regs): Check for clobber high.
5334 (lra_set_insn_recog_data): Likewise.
5335 (add_regs_to_insn_regno_info): Likewise.
5336 (lra_update_insn_regno_info): Likewise.
5338 2018-08-06 Alan Hayward <alan.hayward@arm.com>
5340 * rtl.h (reg_is_clobbered_by_clobber_high): Add declarations.
5341 * rtlanal.c (reg_is_clobbered_by_clobber_high): Add function.
5343 2018-08-06 Alan Hayward <alan.hayward@arm.com>
5345 * emit-rtl.c (verify_rtx_sharing): Check for CLOBBER_HIGH.
5346 (copy_insn_1): Likewise.
5347 (gen_hard_reg_clobber_high): New gen function.
5348 * genconfig.c (walk_insn_part): Check for CLOBBER_HIGH.
5349 * genemit.c (gen_exp): Likewise.
5350 (gen_emit_seq): Pass through info.
5351 (gen_insn): Check for CLOBBER_HIGH.
5352 (gen_expand): Pass through info.
5353 (gen_split): Likewise.
5354 (output_add_clobbers): Likewise.
5355 * genrecog.c (validate_pattern): Check for CLOBBER_HIGH.
5356 (remove_clobbers): Likewise.
5357 * rtl.h (gen_hard_reg_clobber_high): New declaration.
5359 2018-08-06 Alan Hayward <alan.hayward@arm.com>
5361 * doc/rtl.texi (clobber_high): Add.
5362 (parallel): Add in clobber high
5363 * rtl.c (rtl_check_failed_code3): Add function.
5364 * rtl.def (CLOBBER_HIGH): Add expression.
5365 * rtl.h (RTL_CHECKC3): Add macro.
5366 (rtl_check_failed_code3): Add declaration.
5367 (XC3EXP): Add macro.
5369 2018-08-05 H.J. Lu <hongjiu.lu@intel.com>
5372 * config/i386/i386.c (ix86_finalize_stack_frame_flags): Set
5373 cfun->machine->max_used_stack_alignment if needed.
5375 2018-08-04 Martin Sebor <msebor@redhat.com>
5377 PR tree-optimization/86571
5378 * gimple-ssa-sprintf.c (format_floating): Extend upper bound of
5381 2018-08-03 Sandra Loosemore <sandra@codesourcery.com>
5384 * config/nios2/nios2.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
5387 2018-08-03 Jeff Law <law@redhat.com>
5390 * config/mn10300/mn10300.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
5391 Define to speculation_safe_value_not_needed.
5393 2018-08-03 David Malcolm <dmalcolm@redhat.com>
5395 * doc/gcov.texi (-x): Remove duplicate "to".
5396 * doc/invoke.texi (-Wnoexcept-type): Remove duplicate "calls".
5397 (-Wif-not-aligned): Remove duplicate "is".
5398 (-flto): Remove duplicate "the".
5399 (MicroBlaze Options): In examples of "-mcpu=cpu-type", remove
5400 duplicate "v5.00.b".
5401 (MSP430 Options): Remove duplicate "and" from the description
5402 of "-mgprel-sec=regexp".
5403 (x86 Options): Remove duplicate copies of "vmldLog102" and
5404 vmlsLog104 from description of "-mveclibabi=type".
5406 2018-08-03 Richard Sandiford <richard.sandiford@arm.com>
5408 * internal-fn.h (first_commutative_argument): Declare.
5409 * internal-fn.c (first_commutative_argument): New function.
5410 * tree-vect-slp.c (vect_get_and_check_slp_defs): Remove extra
5411 restrictions for pattern statements. Use first_commutative_argument
5412 to look for commutative operands in calls to internal functions.
5414 2018-08-03 Aldy Hernandez <aldyh@redhat.com>
5416 * Makefile.in (wide-int-range.o): New.
5417 * tree-vrp.c: Move all the wide_int_* functions to...
5418 * wide-int-range.cc: ...here.
5419 * tree-vrp.h: Move all the wide_int_* prototypes to...
5420 * wide-int-range.h: ...here.
5422 2018-08-03 Tom de Vries <tdevries@suse.de>
5424 * common/config/nvptx/nvptx-common.c (nvptx_except_unwind_info): Return
5426 * config/nvptx/nvptx.c (TARGET_ASM_BYTE_OP): Remove define.
5427 * except.c (output_function_exception_table): Do early exit if
5428 targetm_common.except_unwind_info (&global_options) == UI_NONE.
5430 2018-08-03 Martin Liska <mliska@suse.cz>
5432 * predict.c (dump_prediction): Change to 2 digits
5435 2018-08-03 Siddhesh Poyarekar <siddhesh@sourceware.org>
5437 * config/aarch64/falkor.md (falkor_am_1_vxvy_vxvy): Move
5439 (falkor_am_1_gtov_gtov): ... a new insn reservation.
5441 2018-07-19 Ilya Leoshkevich <iii@linux.ibm.com>
5443 * config/nds32/nds32.c (nds32_hard_regno_mode_ok): Replace > with >=.
5444 * df-problems.c (df_remove_dead_eq_notes): Replace > with >=.
5445 * dwarf2out.c (mem_loc_descriptor): Replace > with >=.
5446 * lra-constraints.c (spill_hard_reg_in_range): Replace <= with <.
5447 * lra-remat.c (call_used_input_regno_present_p): Replace <= with <.
5449 2018-08-02 David Malcolm <dmalcolm@redhat.com>
5451 * diagnostic-show-locus.c (diagnostic_show_locus): Use
5452 pp_take_prefix when saving the existing prefix.
5453 * diagnostic.c (diagnostic_append_note): Likewise.
5454 * langhooks.c (lhd_print_error_function): Likewise.
5455 * pretty-print.c (pp_set_prefix): Drop the "const" from "prefix"
5456 param's type. Free the existing prefix.
5457 (pp_take_prefix): New function.
5458 (pretty_printer::pretty_printer): Drop the prefix parameter.
5459 Rename the length parameter to match the comment.
5460 (pretty_printer::~pretty_printer): Free the prefix.
5461 * pretty-print.h (pretty_printer::pretty_printer): Drop the prefix
5463 (struct pretty_printer): Drop the "const" from "prefix" field's
5464 type and clarify memory management.
5465 (pp_set_prefix): Drop the "const" from the 2nd param.
5466 (pp_take_prefix): New decl.
5468 2018-08-02 Aaron Sawdey <acsawdey@linux.ibm.com>
5470 * config/rs6000/rs6000-string.c (select_block_compare_mode): Move test
5471 for word_mode_ok here instead of passing as argument.
5472 (expand_block_compare): Change select_block_compare_mode() call.
5473 (expand_strncmp_gpr_sequence): New function.
5474 (expand_strn_compare): Make use of expand_strncmp_gpr_sequence.
5476 2018-08-02 Jeff Law <law@redhat.com>
5479 * config/m68k/m68k.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
5480 Define to speculation_safe_value_not_needed.
5483 * config/h8300/h8300.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
5484 Define to speculation_safe_value_not_needed.
5486 2018-08-02 Tom de Vries <tdevries@suse.de>
5489 * common/config/nvptx/nvptx-common.c (nvptx_except_unwind_info): New
5490 function. Return UI_TARGET unconditionally.
5491 (TARGET_EXCEPT_UNWIND_INFO): Redefine to nvptx_except_unwind_info.
5492 * config/nvptx/nvptx.c (TARGET_ASM_BYTE_OP): Emit commented out '.byte'.
5494 2018-08-02 Richard Sandiford <richard.sandiford@arm.com>
5496 * genemit.c (print_overload_test): Fix typo.
5498 2018-08-02 Richard Biener <rguenther@suse.de>
5500 PR tree-optimization/86816
5501 * tree-ssa-tail-merge.c (tail_merge_valueize): New function
5502 which checks for value availability before querying it.
5503 (gvn_uses_equal): Use it.
5504 (same_succ_hash): Likewise.
5505 (gimple_equal_p): Likewise.
5507 2018-08-02 Nick Clifton <nickc@redhat.com>
5510 * config/stormy16/stormy16.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
5511 Define to speculation_safe_value_not_needed.
5514 * config/v850/v850.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
5515 Define to speculation_safe_value_not_needed.
5518 * config/v850/v850.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
5519 Define to speculation_safe_value_not_needed.
5522 * config/rx/rx.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
5523 Define to speculation_safe_value_not_needed.
5526 * config/msp430/msp430.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
5527 Define to speculation_safe_value_not_needed.
5530 * config/mcore/mcore.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
5531 Define to speculation_safe_value_not_needed.
5534 * config/m32r/m32r.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
5535 Define to speculation_safe_value_not_needed.
5538 * config/iq2000/iq2000.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
5539 Define to speculation_safe_value_not_needed.
5542 * config/frv/frv.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define to
5543 speculation_safe_value_not_needed.
5546 * config/fr30/fr30.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define
5547 to speculation_safe_value_not_needed.
5549 2018-08-02 Richard Sandiford <richard.sandiford@arm.com>
5551 * doc/md.texi: Expand the documentation of instruction names
5552 to mention port-local uses. Document '@' in pattern names.
5553 * read-md.h (overloaded_instance, overloaded_name): New structs.
5555 (md_reader::handle_overloaded_name): New member function.
5556 (md_reader::get_overloads): Likewise.
5557 (md_reader::m_first_overload): New member variable.
5558 (md_reader::m_next_overload_ptr): Likewise.
5559 (md_reader::m_overloads_htab): Likewise.
5560 * read-md.c (md_reader::md_reader): Initialize m_first_overload,
5561 m_next_overload_ptr and m_overloads_htab.
5562 * read-rtl.c (iterator_group): Add "type" and "get_c_token" fields.
5563 (get_mode_token, get_code_token, get_int_token): New functions.
5564 (map_attr_string): Add an optional argument that passes back
5565 the associated iterator.
5566 (overloaded_name_hash, overloaded_name_eq_p, named_rtx_p):
5567 (md_reader::handle_overloaded_name, add_overload_instance): New
5569 (apply_iterators): Handle '@' names. Report an error if '@'
5570 is used without iterators.
5571 (initialize_iterators): Initialize the new iterator_group fields.
5572 * genopinit.c (handle_overloaded_code_for)
5573 (handle_overloaded_gen): New functions.
5574 (main): Use them to print declarations of maybe_code_for_* and
5575 maybe_gen_* functions, and inline definitions of code_for_* and gen_*.
5576 * genemit.c (print_overload_arguments, print_overload_test)
5577 (handle_overloaded_code_for, handle_overloaded_gen): New functions.
5578 (main): Use it to print definitions of maybe_code_for_* and
5579 maybe_gen_* functions.
5580 * config/aarch64/aarch64.c (aarch64_split_128bit_move): Use
5581 gen_aarch64_mov{low,high}_di and gen_aarch64_movdi_{low,high}
5582 instead of explicit mode checks.
5583 (aarch64_split_simd_combine): Likewise gen_aarch64_simd_combine.
5584 (aarch64_split_simd_move): Likewise gen_aarch64_split_simd_mov.
5585 (aarch64_emit_load_exclusive): Likewise gen_aarch64_load_exclusive.
5586 (aarch64_emit_store_exclusive): Likewise gen_aarch64_store_exclusive.
5587 (aarch64_expand_compare_and_swap): Likewise
5588 gen_aarch64_compare_and_swap and gen_aarch64_compare_and_swap_lse
5589 (aarch64_gen_atomic_cas): Likewise gen_aarch64_atomic_cas.
5590 (aarch64_emit_atomic_swap): Likewise gen_aarch64_atomic_swp.
5591 (aarch64_constant_pool_reload_icode): Delete.
5592 (aarch64_secondary_reload): Use code_for_aarch64_reload_movcp
5593 instead of aarch64_constant_pool_reload_icode. Use
5594 code_for_aarch64_reload_mov instead of explicit mode checks.
5595 (rsqrte_type, get_rsqrte_type, rsqrts_type, get_rsqrts_type): Delete.
5596 (aarch64_emit_approx_sqrt): Use gen_aarch64_rsqrte instead of
5597 get_rsqrte_type and gen_aarch64_rsqrts instead of gen_rqrts_type.
5598 (recpe_type, get_recpe_type, recps_type, get_recps_type): Delete.
5599 (aarch64_emit_approx_div): Use gen_aarch64_frecpe instead of
5600 get_recpe_type and gen_aarch64_frecps instead of get_recps_type.
5601 (aarch64_atomic_load_op_code): Delete.
5602 (aarch64_emit_atomic_load_op): Likewise.
5603 (aarch64_gen_atomic_ldop): Use UNSPECV_ATOMIC_* instead of
5604 aarch64_atomic_load_op_code. Use gen_aarch64_atomic_load
5605 instead of aarch64_emit_atomic_load_op.
5606 * config/aarch64/aarch64.md (aarch64_reload_movcp<GPF_TF:mode><P:mode>)
5607 (aarch64_reload_movcp<VALL:mode><P:mode>, aarch64_reload_mov<mode>)
5608 (aarch64_movdi_<mode>low, aarch64_movdi_<mode>high)
5609 (aarch64_mov<mode>high_di, aarch64_mov<mode>low_di): Add a '@'
5610 character before the pattern name.
5611 * config/aarch64/aarch64-simd.md (aarch64_split_simd_mov<mode>)
5612 (aarch64_rsqrte<mode>, aarch64_rsqrts<mode>)
5613 (aarch64_simd_combine<mode>, aarch64_frecpe<mode>)
5614 (aarch64_frecps<mode>): Likewise.
5615 * config/aarch64/atomics.md (atomic_compare_and_swap<mode>)
5616 (aarch64_compare_and_swap<mode>, aarch64_compare_and_swap<mode>_lse)
5617 (aarch64_load_exclusive<mode>, aarch64_store_exclusive<mode>)
5618 (aarch64_atomic_swp<mode>, aarch64_atomic_cas<mode>)
5619 (aarch64_atomic_load<atomic_ldop><mode>): Likewise.
5621 2018-08-02 Richard Sandiford <richard.sandiford@arm.com>
5623 * config/aarch64/aarch64.c (aarch64_float_const_representable_p):
5624 Allow HFmode constants if TARGET_FP_F16INST.
5626 2018-08-02 Jackson Woodruff <jackson.woodruff@arm.com>
5629 * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp):
5630 No longer check last store for clobber of address register.
5632 2018-08-02 Martin Liska <mliska@suse.cz>
5634 PR gcov-profile/86817
5635 * gcov.c (process_all_functions): New function.
5637 (process_file): Move functions processing to
5638 process_all_functions.
5640 2018-08-02 David Malcolm <dmalcolm@redhat.com>
5642 * dumpfile.c (dump_user_location_t::dump_user_location_t): Add
5643 "const" to the "gimple *" and "rtx_insn *" parameters.
5644 * dumpfile.h (dump_user_location_t::dump_user_location_t):
5646 (dump_location_t::dump_location_t): Likewise.
5648 2018-08-01 Martin Sebor <msebor@redhat.com>
5650 PR tree-optimization/86650
5651 * gimple-pretty-print.c (percent_G_format): Accept a "gimple *"
5652 rather than a "gcall *". Directly pass the data of interest
5653 to percent_K_format, rather than building a temporary CALL_EXPR
5655 * gimple-fold.c (gimple_fold_builtin_strncpy): Adjust.
5656 (gimple_fold_builtin_strncat): Adjust.
5657 * gimple-ssa-warn-restrict.h (check_bounds_or_overlap): Replace
5658 gcall* argument with gimple*.
5659 * gimple-ssa-warn-restrict.c (check_call): Same.
5660 (wrestrict_dom_walker::before_dom_children): Same.
5661 (builtin_access::builtin_access): Same.
5662 (check_bounds_or_overlap): Same
5663 (maybe_diag_overlap): Same.
5664 (maybe_diag_offset_bounds): Same.
5665 * tree-diagnostic.c (default_tree_printer): Move usage of
5666 EXPR_LOCATION (t) and TREE_BLOCK (t) from within percent_K_format
5668 * tree-pretty-print.c (percent_K_format): Add argument.
5669 * tree-pretty-print.h: Add argument.
5670 * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Adjust.
5671 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Adjust.
5672 (maybe_diag_stxncpy_trunc): Same.
5673 (handle_builtin_stxncpy): Same.
5674 (handle_builtin_strcat): Same.
5676 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
5678 * match.pd: Optimise pointer range checks.
5680 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
5682 PR tree-optimization/86758
5683 * tree-vect-stmts.c (vectorizable_simd_clone_call): Don't try
5684 to remove pattern statements.
5686 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
5688 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Use the
5689 result of dfs_enumerate_from when constructing stmt_vec_infos,
5690 instead of additionally calling get_loop_body.
5692 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
5694 * tree-vectorizer.h (vect_create_data_ref_ptr): Remove inv_p
5696 * tree-vect-data-refs.c (vect_create_data_ref_ptr): Likewise.
5697 When creating an iv, assert that the step is not known to be zero.
5698 (vect_setup_realignment): Update call accordingly.
5699 * tree-vect-stmts.c (vectorizable_store): Likewise.
5700 (vectorizable_load): Likewise. Handle VMAT_INVARIANT separately.
5702 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
5704 * tree-vectorizer.h (vect_stmt_to_vectorize): New function.
5705 * tree-vect-loop.c (vect_update_vf_for_slp): Use it.
5706 (vectorizable_reduction): Likewise.
5707 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
5708 (vect_detect_hybrid_slp_stmts): Likewise.
5709 * tree-vect-stmts.c (vect_is_simple_use): Likewise.
5711 2018-08-01 Aldy Hernandez <aldyh@redhat.com>
5713 * tree-vrp (zero_nonzero_bits_from_bounds): Rename to...
5714 (wide_int_set_zero_nonzero_bits): ...this.
5715 (zero_nonzero_bits_from_vr): Rename to...
5716 (vrp_set_zero_nonzero_bits): ...this.
5717 (extract_range_from_multiplicative_op_1): Abstract wide int
5719 (wide_int_range_multiplicative_op): ...here.
5720 (extract_range_from_binary_expr_1): Extract wide int binary
5721 operations into their own functions.
5722 (wide_int_range_lshift): New.
5723 (wide_int_range_can_optimize_bit_op): New.
5724 (wide_int_range_shift_undefined_p): New.
5725 (wide_int_range_bit_xor): New.
5726 (wide_int_range_bit_ior): New.
5727 (wide_int_range_bit_and): New.
5728 (wide_int_range_trunc_mod): New.
5729 (extract_range_into_wide_ints): New.
5730 (vrp_shift_undefined_p): New.
5731 (extract_range_from_multiplicative_op): New.
5732 (vrp_can_optimize_bit_op): New.
5733 * tree-vrp.h (value_range::dump): New.
5734 (wide_int_range_multiplicative_op): New.
5735 (wide_int_range_lshift):New.
5736 (wide_int_range_shift_undefined_p): New.
5737 (wide_int_range_bit_xor): New.
5738 (wide_int_range_bit_ior): New.
5739 (wide_int_range_bit_and): New.
5740 (wide_int_range_trunc_mod): New.
5741 (zero_nonzero_bits_from_bounds): Rename to...
5742 (wide_int_set_zero_nonzero_bits): ...this.
5743 (zero_nonzero_bits_from_vr): Rename to...
5744 (vrp_set_zero_nonzero_bits): ...this.
5745 (range_easy_mask_min_max): Rename to...
5746 (wide_int_range_can_optimize_bit_op): this.
5747 * vr-values.c (simplify_bit_ops_using_ranges): Rename
5748 zero_nonzero_bits_from_vr into vrp_set_zero_nonzero_bits.
5750 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
5752 * tree-vectorizer.h (vect_orig_stmt): New function.
5753 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Use it.
5754 * tree-vect-loop.c (vect_model_reduction_cost): Likewise.
5755 (vect_create_epilog_for_reduction): Likewise.
5756 (vectorizable_live_operation): Likewise.
5757 * tree-vect-slp.c (vect_find_last_scalar_stmt_in_slp): Likewise.
5758 (vect_detect_hybrid_slp_stmts, vect_schedule_slp): Likewise.
5759 * tree-vect-stmts.c (vectorizable_call): Likewise.
5760 (vectorizable_simd_clone_call, vect_remove_stores): Likewise.
5762 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
5764 * tree-vectorizer.h (vect_transform_stmt): Remove grouped_store
5766 * tree-vect-stmts.c (vect_transform_stmt): Likewise.
5767 * tree-vect-loop.c (vect_transform_loop_stmt): Update call accordingly.
5768 (vect_transform_loop): Likewise.
5769 * tree-vect-slp.c (vect_schedule_slp_instance): Likewise.
5771 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
5773 * tree-vectorizer.h (vect_schedule_slp): Return void.
5774 * tree-vect-slp.c (vect_schedule_slp_instance): Likewise.
5775 (vect_schedule_slp): Likewise.
5777 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
5779 * tree-vect-loop.c (vect_transform_loop_stmt): Remove slp_scheduled
5781 (vect_transform_loop): Update calls accordingly. Schedule SLP
5782 instances before the main loop, if any exist.
5784 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
5786 PR tree-optimization/86749
5787 * tree-vect-patterns.c (vect_determine_min_output_precision_1):
5788 If the lhs is used in a COND_EXPR, check that it is being used
5789 as the "then" or "else" value.
5791 2018-08-01 Tom de Vries <tdevries@suse.de>
5794 * config/nvptx/nvptx.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define to
5795 speculation_safe_value_not_needed.
5797 2018-08-01 Richard Biener <rguenther@suse.de>
5799 * tree-ssa-sccvn.c (visit_phi): Compare invariant addresses
5802 2018-08-01 Martin Liska <mliska@suse.cz>
5804 * value-prof.c (gimple_divmod_fixed_value_transform): Unify
5805 format how successful transformation is dumped.
5806 (gimple_mod_pow2_value_transform): Likewise.
5807 (gimple_mod_subtract_transform): Likewise.
5808 (gimple_stringops_transform): Likewise.
5810 2018-08-01 Martin Liska <mliska@suse.cz>
5813 * value-prof.c (interesting_stringop_to_profile_p):
5814 Simplify the code and add BUILT_IN_MEMMOVE.
5815 (gimple_stringops_transform): Likewise.
5817 2018-08-01 Sam Tebbs <sam.tebbs@arm.com>
5819 * config/aarch64/aarch64-simd.md
5820 (*aarch64_get_lane_zero_extendsi<mode>): Rename to...
5821 (*aarch64_get_lane_zero_extend<GPI:mode><VDQQH:mode>): ... This and
5822 use GPI iterator instead of SI mode.
5824 2018-08-01 Richard Earnshaw <rearnsha@arm.com>
5826 * config/rs6000/rs6000.md (speculation_barrier): Renamed from
5827 rs6000_speculation_barrier.
5828 * config/rs6000/rs6000.c (rs6000_expand_builtin): Adjust for
5829 new barrier pattern name.
5831 2018-08-01 Richard Earnshaw <rearnsha@arm.com>
5833 * config/i386/i386.md (unspecv): Add UNSPECV_SPECULATION_BARRIER.
5834 (speculation_barrier): New insn.
5836 2018-08-01 Richard Biener <rguenther@suse.de>
5839 * graphite.h: Include isl/id.h and isl/space.h to allow build
5842 2018-08-01 Jan Willem Jagersma <jwjagersma@gmail.com>
5845 * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
5846 mode for COFF targets.
5847 * defaults.h (TARGET_COFF): Define.
5848 * config/i386/djgpp.h (TARGET_ASM_LTO_START, TARGET_ASM_LTO_END,
5849 TARGET_COFF): Define.
5850 (i386_djgpp_asm_lto_start, i386_djgpp_asm_lto_end): Declare.
5851 * config/i386/djgpp.c (saved_debug_info_level): New static variable.
5852 (i386_djgpp_asm_lto_start, i386_djgpp_asm_lto_end): New functions.
5854 2018-07-31 Alexandre Oliva <oliva@adacore.com>
5856 * gimple-streamer-in.c (input_bb): Restore BB discriminator.
5857 * gimple-streamer-out.c (output_bb): Save it.
5858 * lto-streamer-in.c (input_struct_function_base): Restore
5859 instance discriminator if available. Create map on demand.
5860 * lto-streamer-out.c (output_struct_function_base): Save it if
5862 * final.c (decl_to_instance_map): Document LTO strategy.
5864 2018-07-31 Alexandre Oliva <oliva@adacore.com>
5865 Olivier Hainque <hainque@adacore.com>
5867 * debug.h (decl_to_instance_map_t): New type.
5868 (decl_to_instance_map): Declare.
5869 (maybe_create_decl_to_instance_map): New inline function.
5870 * final.c (bb_discriminator, last_bb_discriminator): New statics,
5871 to track basic block discriminators.
5872 (final_start_function_1): Initialize them.
5873 (final_scan_insn_1): On NOTE_INSN_BASIC_BLOCK, track
5875 (decl_to_instance_map): New variable.
5876 (map_decl_to_instance, maybe_set_discriminator): New functions.
5877 (notice_source_line): Set discriminator.
5879 2018-07-31 Ian Lance Taylor <iant@golang.org>
5881 * targhooks.c (default_have_speculation_safe_value): Add
5884 2018-07-31 David Malcolm <dmalcolm@redhat.com>
5886 * dump-context.h: Include "pretty-print.h".
5887 (dump_context::refresh_dumps_are_enabled): New decl.
5888 (dump_context::emit_item): New decl.
5889 (class dump_context): Add fields "m_test_pp" and
5891 (temp_dump_context::temp_dump_context): Add param "test_pp_flags".
5892 (temp_dump_context::get_dumped_text): New decl.
5893 (class temp_dump_context): Add field "m_pp".
5894 * dumpfile.c (refresh_dumps_are_enabled): Convert to...
5895 (dump_context::refresh_dumps_are_enabled): ...and add a test for
5897 (set_dump_file): Update for above change.
5898 (set_alt_dump_file): Likewise.
5899 (dump_loc): New overload, taking a pretty_printer *.
5900 (dump_context::dump_loc): Call end_any_optinfo. Dump the location
5901 to any test pretty-printer.
5902 (make_item_for_dump_gimple_stmt): New function, adapted from
5903 optinfo::add_gimple_stmt.
5904 (dump_context::dump_gimple_stmt): Call it, and use the result,
5905 eliminating the direct usage of dump_file and alt_dump_file in
5906 favor of indirectly using them via emit_item.
5907 (make_item_for_dump_gimple_expr): New function, adapted from
5908 optinfo::add_gimple_expr.
5909 (dump_context::dump_gimple_expr): Call it, and use the result,
5910 eliminating the direct usage of dump_file and alt_dump_file in
5911 favor of indirectly using them via emit_item.
5912 (make_item_for_dump_generic_expr): New function, adapted from
5914 (dump_context::dump_generic_expr): Call it, and use the result,
5915 eliminating the direct usage of dump_file and alt_dump_file in
5916 favor of indirectly using them via emit_item.
5917 (make_item_for_dump_printf_va): New function, adapted from
5918 optinfo::add_printf_va.
5919 (make_item_for_dump_printf): New function.
5920 (dump_context::dump_printf_va): Call make_item_for_dump_printf_va,
5921 and use the result, eliminating the direct usage of dump_file and
5922 alt_dump_file in favor of indirectly using them via emit_item.
5923 (make_item_for_dump_dec): New function.
5924 (dump_context::dump_dec): Call it, and use the result,
5925 eliminating the direct usage of dump_file and alt_dump_file in
5926 favor of indirectly using them via emit_item.
5927 (make_item_for_dump_symtab_node): New function, adapted from
5928 optinfo::add_symtab_node.
5929 (dump_context::dump_symtab_node): Call it, and use the result,
5930 eliminating the direct usage of dump_file and alt_dump_file in
5931 favor of indirectly using them via emit_item.
5932 (dump_context::begin_scope): Reimplement, avoiding direct usage
5933 of dump_file and alt_dump_file in favor of indirectly using them
5935 (dump_context::emit_item): New member function.
5936 (temp_dump_context::temp_dump_context): Add param "test_pp_flags".
5937 Set up test pretty-printer on the underlying context. Call
5938 refresh_dumps_are_enabled.
5939 (temp_dump_context::~temp_dump_context): Call
5940 refresh_dumps_are_enabled.
5941 (temp_dump_context::get_dumped_text): New member function.
5942 (selftest::verify_dumped_text): New function.
5943 (ASSERT_DUMPED_TEXT_EQ): New macro.
5944 (selftest::test_capture_of_dump_calls): Run all tests twice, with
5945 and then without optinfo enabled. Add uses of
5946 ASSERT_DUMPED_TEXT_EQ to all tests. Add test of nested scopes.
5947 * dumpfile.h: Update comment for the dump_* API.
5948 * optinfo-emit-json.cc
5949 (selftest::test_building_json_from_dump_calls): Update for new
5950 param for temp_dump_context ctor.
5951 * optinfo.cc (optinfo_item::optinfo_item): Remove "owned" param
5952 and "m_owned" field.
5953 (optinfo_item::~optinfo_item): Likewise.
5954 (optinfo::add_item): New member function.
5955 (optinfo::emit): Update comment.
5956 (optinfo::add_string): Delete.
5957 (optinfo::add_printf): Delete.
5958 (optinfo::add_printf_va): Delete.
5959 (optinfo::add_gimple_stmt): Delete.
5960 (optinfo::add_gimple_expr): Delete.
5961 (optinfo::add_tree): Delete.
5962 (optinfo::add_symtab_node): Delete.
5963 (optinfo::add_dec): Delete.
5964 * optinfo.h (class dump_context): New forward decl.
5965 (optinfo::add_item): New decl.
5966 (optinfo::add_string): Delete.
5967 (optinfo::add_printf): Delete.
5968 (optinfo::add_printf_va): Delete.
5969 (optinfo::add_gimple_stmt): Delete.
5970 (optinfo::add_gimple_expr): Delete.
5971 (optinfo::add_tree): Delete.
5972 (optinfo::add_symtab_node): Delete.
5973 (optinfo::add_dec): Delete.
5974 (optinfo::add_poly_int): Delete.
5975 (optinfo_item::optinfo_item): Remove "owned" param.
5976 (class optinfo_item): Remove field "m_owned".
5978 2018-07-31 Jozef Lawrynowicz <jozef.l@mittosystems.com>
5981 * gcc/cfgexpand.c (set_parm_rtl): Use the alignment of Pmode when
5982 MAX_SUPPORTED_STACK_ALIGNMENT would otherwise be exceeded by the
5983 requested variable alignment.
5984 (expand_one_ssa_partition): Likewise.
5985 (expand_one_var): Likewise.
5987 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
5989 * config/pdp11/pdp11.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
5990 to speculation_safe_value_not_needed.
5992 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
5994 * targhooks.h (speculation_safe_value_not_needed): New prototype.
5995 * targhooks.c (speculation_safe_value_not_needed): New function.
5996 * target.def (have_speculation_safe_value): Update documentation.
5997 * doc/tm.texi: Regenerated.
5999 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
6001 * config/aarch64/iterators.md (ALLI_TI): New iterator.
6002 * config/aarch64/aarch64.md (despeculate_copy<ALLI_TI:mode>): New
6004 (despeculate_copy<ALLI:mode>_insn): New insn.
6005 (despeculate_copyti_insn): New insn.
6006 (despeculate_simple<ALLI:mode>): New insn
6007 (despeculate_simpleti): New insn.
6008 * config/aarch64/aarch64.c (aarch64_speculation_safe_value): New
6010 (TARGET_SPECULATION_SAFE_VALUE): Redefine to
6011 aarch64_speculation_safe_value.
6012 (aarch64_print_operand): Handle const0_rtx in modifier 'H'.
6014 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
6016 * config/aarch64/aarch64-speculation.cc: New file.
6017 * config/aarch64/aarch64-passes.def (pass_track_speculation): Add
6018 before pass_reorder_blocks.
6019 * config/aarch64/aarch64-protos.h (make_pass_track_speculation): Add
6021 * config/aarch64/aarch64.c (aarch64_conditional_register_usage): Fix
6022 X14 and X15 when tracking speculation.
6023 * config/aarch64/aarch64.md (register name constants): Add
6024 SPECULATION_TRACKER_REGNUM and SPECULATION_SCRATCH_REGNUM.
6025 (unspec): Add UNSPEC_SPECULATION_TRACKER.
6026 (speculation_barrier): New insn attribute.
6027 (cmp<mode>): Allow SP in comparisons.
6028 (speculation_tracker): New insn.
6029 (speculation_barrier): Add speculation_barrier attribute.
6030 * config/aarch64/t-aarch64: Add make rule for aarch64-speculation.o.
6031 * config.gcc (aarch64*-*-*): Add aarch64-speculation.o to extra_objs.
6032 * doc/invoke.texi (AArch64 Options): Document -mtrack-speculation.
6034 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
6036 * config/aarch64/aarch64.md (cb<optab><mode>1): Disable when
6037 aarch64_track_speculation is true.
6038 (tb<optab><mode>1): Likewise.
6039 * config/aarch64/aarch64.c (aarch64_split_compare_regs): Do not
6040 generate CB[N]Z when tracking speculation.
6041 (aarch64_split_compare_and_swap): Likewise.
6042 (aarch64_split_atomic_op): Likewise.
6044 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
6046 * config/aarch64/aarch64.opt (mtrack-speculation): New target option.
6048 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
6050 * config/aarch64.md (unspecv): Add UNSPECV_SPECULAION_BARRIER.
6051 (speculation_barrier): New insn.
6053 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
6055 * config/arm/unspecs.md (unspecv): Add VUNSPEC_SPECULATION_BARRIER.
6056 * config/arm/arm.md (speculation_barrier): New expand.
6057 (speculation_barrier_insn): New pattern.
6059 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
6061 * builtin-types.def (BT_FN_PTR_PTR_VAR): New function type.
6062 (BT_FN_I1_I1_VAR, BT_FN_I2_I2_VAR, BT_FN_I4_I4_VAR): Likewise.
6063 (BT_FN_I8_I8_VAR, BT_FN_I16_I16_VAR): Likewise.
6064 * builtin-attrs.def (ATTR_NOVOPS_NOTHROW_LEAF_LIST): New attribute
6066 * builtins.def (BUILT_IN_SPECULATION_SAFE_VALUE_N): New builtin.
6067 (BUILT_IN_SPECULATION_SAFE_VALUE_PTR): New internal builtin.
6068 (BUILT_IN_SPECULATION_SAFE_VALUE_1): Likewise.
6069 (BUILT_IN_SPECULATION_SAFE_VALUE_2): Likewise.
6070 (BUILT_IN_SPECULATION_SAFE_VALUE_4): Likewise.
6071 (BUILT_IN_SPECULATION_SAFE_VALUE_8): Likewise.
6072 (BUILT_IN_SPECULATION_SAFE_VALUE_16): Likewise.
6073 * builtins.c (expand_speculation_safe_value): New function.
6074 (expand_builtin): Call it.
6075 * doc/cpp.texi: Document predefine __HAVE_SPECULATION_SAFE_VALUE.
6076 * doc/extend.texi: Document __builtin_speculation_safe_value.
6077 * doc/md.texi: Document "speculation_barrier" pattern.
6078 * doc/tm.texi.in: Pull in TARGET_SPECULATION_SAFE_VALUE and
6079 TARGET_HAVE_SPECULATION_SAFE_VALUE.
6080 * doc/tm.texi: Regenerated.
6081 * target.def (have_speculation_safe_value, speculation_safe_value): New
6083 * targhooks.c (default_have_speculation_safe_value): New function.
6084 (default_speculation_safe_value): New function.
6085 * targhooks.h (default_have_speculation_safe_value): Add prototype.
6086 (default_speculation_safe_value): Add prototype.
6088 2018-07-31 David Malcolm <dmalcolm@redhat.com>
6090 * dump-context.h (dump_context::dump_loc): New decl.
6091 * dumpfile.c (dump_context::dump_loc): New member function.
6092 (dump_context::dump_gimple_stmt_loc): Reimplement using dump_loc
6093 and dump_gimple_stmt.
6094 (dump_context::dump_gimple_expr_loc): Likewise, using
6096 (dump_context::dump_generic_expr_loc): Likewise, using
6098 (dump_context::dump_printf_loc_va): Likewise, using
6100 (dump_context::begin_scope): Explicitly using the global function
6101 "dump_loc", rather than the member function.
6103 2018-07-31 Martin Sebor <msebor@redhat.com>
6105 PR tree-optimization/86741
6106 * tree-vrp.c (vrp_prop::check_mem_ref): Avoid incomplete types.
6108 2018-07-31 Andreas Krebbel <krebbel@linux.ibm.com>
6110 * config/s390/s390.c (s390_expand_setmem): Make the unrolling to
6111 depend on whether prefetch instructions will be emitted or not.
6112 Use TARGET_SETMEM_PFD for checking whether prefetch instructions
6113 will be emitted or not.
6114 * config/s390/s390.h (TARGET_SETMEM_PREFETCH_DISTANCE)
6115 (TARGET_SETMEM_PFD): New macros.
6117 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
6119 * tree-vectorizer.h (stmt_vec_info): Turn back into a typedef.
6120 (NULL_STMT_VEC_INFO): Delete.
6121 (stmt_vec_info::operator*): Likewise.
6122 (stmt_vec_info::operator gimple *): Likewise.
6123 * tree-vect-loop.c (vectorizable_reduction): Use NULL instead
6124 of NULL_STMT_VEC_INFO.
6125 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
6126 (vect_reassociating_reduction_p): Likewise.
6127 * tree-vect-stmts.c (vect_build_gather_load_calls): Likewise.
6128 (vectorizable_store): Likewise.
6129 * tree-vectorizer.c (vec_info::set_vinfo_for_stmt): Likewise.
6130 (vec_info::free_stmt_vec_infos): Likewise.
6132 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
6134 * tree-vectorizer.h (vect_stmt_in_region_p): Delete.
6135 * tree-vectorizer.c (vect_stmt_in_region_p): Likewise.
6137 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
6139 * tree-vectorizer.h (vec_info::new_vinfo_for_stmt)
6140 (vec_info::set_vinfo_for_stmt, vec_info::free_stmt_vec_infos)
6141 (vec_info::free_stmt_vec_info): New private member functions.
6142 (set_stmt_vec_info_vec, free_stmt_vec_infos, vinfo_for_stmt)
6143 (set_vinfo_for_stmt, new_stmt_vec_info, free_stmt_vec_info): Delete.
6144 * tree-parloops.c (gather_scalar_reductions): Remove calls to
6145 set_stmt_vec_info_vec and free_stmt_vec_infos.
6146 * tree-vect-loop.c (_loop_vec_info): Remove call to
6147 set_stmt_vec_info_vec.
6148 * tree-vect-stmts.c (new_stmt_vec_info, set_stmt_vec_info_vec)
6149 (free_stmt_vec_infos, free_stmt_vec_info): Delete in favor of...
6150 * tree-vectorizer.c (vec_info::new_stmt_vec_info)
6151 (vec_info::set_vinfo_for_stmt, vec_info::free_stmt_vec_infos)
6152 (vec_info::free_stmt_vec_info): ...these new functions. Remove
6153 assignments in {vec_info::,}new_stmt_vec_info that are redundant
6154 with the clearing in the xcalloc.
6155 (stmt_vec_info_vec): Delete.
6156 (vec_info::vec_info): Don't call set_stmt_vec_info_vec.
6157 (vectorize_loops): Likewise.
6158 (vec_info::~vec_info): Remove argument from call to
6159 free_stmt_vec_infos.
6160 (vec_info::add_stmt): Remove vinfo argument from call to
6163 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
6165 * tree-vectorizer.h (free_stmt_vec_info): Take a stmt_vec_info
6166 rather than a gimple stmt.
6167 * tree-vect-stmts.c (free_stmt_vec_info): Likewise. Don't free
6168 information for pattern statements when passed the original
6169 statement; instead wait to be passed the pattern statement itself.
6170 Don't call set_vinfo_for_stmt here.
6171 (free_stmt_vec_infos): Update call to free_stmt_vec_info.
6172 * tree-vect-loop.c (_loop_vec_info::~loop_vec_info): Don't free
6173 stmt_vec_infos here.
6174 * tree-vect-slp.c (_bb_vec_info::~bb_vec_info): Likewise.
6175 * tree-vectorizer.c (vec_info::remove_stmt): Nullify the statement's
6176 stmt_vec_infos entry.
6178 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
6180 * tree-vectorizer.h (vec_info::replace_stmt): Declare.
6181 * tree-vectorizer.c (vec_info::replace_stmt): New function.
6182 * tree-vect-slp.c (vect_remove_slp_scalar_calls): Use it.
6183 * tree-vect-stmts.c (vectorizable_call): Likewise.
6184 (vectorizable_simd_clone_call): Likewise.
6186 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
6188 * tree-vectorizer.h (vec_info::remove_stmt): Declare.
6189 * tree-vectorizer.c (vec_info::remove_stmt): New function.
6190 * tree-vect-loop-manip.c (vect_set_loop_condition): Use it.
6191 * tree-vect-loop.c (vect_transform_loop): Likewise.
6192 * tree-vect-slp.c (vect_schedule_slp): Likewise.
6193 * tree-vect-stmts.c (vect_remove_stores): Likewise.
6195 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
6197 * tree-vectorizer.h (vec_info::lookup_dr): New member function.
6198 (vect_dr_stmt): Delete.
6199 * tree-vectorizer.c (vec_info::lookup_dr): New function.
6200 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Use it instead
6202 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
6203 (vect_analyze_data_ref_dependence, vect_record_base_alignments)
6204 (vect_verify_datarefs_alignment, vect_peeling_supportable)
6205 (vect_analyze_data_ref_accesses, vect_prune_runtime_alias_test_list)
6206 (vect_analyze_data_refs): Likewise.
6207 (vect_slp_analyze_data_ref_dependence): Likewise. Take a vec_info
6209 (vect_find_same_alignment_drs): Likewise.
6210 (vect_slp_analyze_node_dependences): Update calls accordingly.
6211 (vect_analyze_data_refs_alignment): Likewise. Use vec_info::lookup_dr
6212 instead of DR_VECT_AUX.
6213 (vect_get_peeling_costs_all_drs): Take a loop_vec_info instead
6214 of a vector data references. Use vec_info::lookup_dr instead of
6216 (vect_peeling_hash_get_lowest_cost): Update calls accordingly.
6217 (vect_enhance_data_refs_alignment): Likewise. Use vec_info::lookup_dr
6218 instead of DR_VECT_AUX.
6220 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
6222 * tree-vectorizer.h (_loop_vec_info::unaligned_dr): Change to
6224 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Update
6226 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
6227 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
6228 (vect_gen_prolog_loop_niters): Likewise.
6230 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
6232 * tree-vectorizer.h (set_dr_misalignment, dr_misalignment)
6233 (DR_TARGET_ALIGNMENT, aligned_access_p, known_alignment_for_access_p)
6234 (vect_known_alignment_in_bytes, vect_dr_behavior)
6235 (vect_get_scalar_dr_size): Take references as dr_vec_infos
6236 instead of data_references. Update calls to other routines for
6237 which the same change has been made.
6238 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Take
6239 dr_vec_infos instead of stmt_vec_infos.
6240 (vect_analyze_data_ref_dependence): Update call accordingly.
6241 (vect_slp_analyze_data_ref_dependence)
6242 (vect_record_base_alignments): Use DR_VECT_AUX.
6243 (vect_calculate_target_alignment, vect_compute_data_ref_alignment)
6244 (vect_update_misalignment_for_peel, verify_data_ref_alignment)
6245 (vector_alignment_reachable_p, vect_get_data_access_cost)
6246 (vect_peeling_supportable, vect_analyze_group_access_1)
6247 (vect_analyze_group_access, vect_analyze_data_ref_access)
6248 (vect_vfa_segment_size, vect_vfa_access_size, vect_vfa_align)
6249 (vect_compile_time_alias, vect_small_gap_p)
6250 (vectorizable_with_step_bound_p, vect_duplicate_ssa_name_ptr_info):
6251 (vect_supportable_dr_alignment): Take references as dr_vec_infos
6252 instead of data_references. Update calls to other routines for
6253 which the same change has been made.
6254 (vect_verify_datarefs_alignment, vect_get_peeling_costs_all_drs)
6255 (vect_find_same_alignment_drs, vect_analyze_data_refs_alignment)
6256 (vect_slp_analyze_and_verify_node_alignment)
6257 (vect_analyze_data_ref_accesses, vect_prune_runtime_alias_test_list)
6258 (vect_create_addr_base_for_vector_ref, vect_create_data_ref_ptr)
6259 (vect_setup_realignment): Use dr_vec_infos. Update calls after
6261 (_vect_peel_info::dr): Replace with...
6262 (_vect_peel_info::dr_info): ...this new field.
6263 (vect_peeling_hash_get_most_frequent)
6264 (vect_peeling_hash_choose_best_peeling): Update accordingly.
6265 (vect_peeling_hash_get_lowest_cost):
6266 (vect_enhance_data_refs_alignment): Likewise. Update calls to other
6267 routines for which the same change has been made.
6268 (vect_peeling_hash_insert): Likewise. Take a dr_vec_info instead of a
6270 * tree-vect-loop-manip.c (get_misalign_in_elems)
6271 (vect_gen_prolog_loop_niters): Use dr_vec_infos. Update calls after
6273 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
6274 * tree-vect-stmts.c (vect_get_store_cost, vect_get_load_cost)
6275 (vect_truncate_gather_scatter_offset, compare_step_with_zero)
6276 (get_group_load_store_type, get_negative_load_store_type)
6277 (vect_get_data_ptr_increment, vectorizable_store)
6278 (vectorizable_load): Likewise.
6279 (ensure_base_align): Take a dr_vec_info instead of a data_reference.
6280 Update calls to other routines for which the same change has been made.
6282 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
6284 * tree-vectorizer.h (vec_info::move_dr): New member function.
6285 (dataref_aux): Rename to...
6286 (dr_vec_info): ...this and add "dr" and "stmt" fields.
6287 (_stmt_vec_info::dr_aux): Update accordingly.
6288 (_stmt_vec_info::data_ref_info): Delete.
6289 (STMT_VINFO_GROUPED_ACCESS, DR_GROUP_FIRST_ELEMENT)
6290 (DR_GROUP_NEXT_ELEMENT, DR_GROUP_SIZE, DR_GROUP_STORE_COUNT)
6291 (DR_GROUP_GAP, DR_GROUP_SAME_DR_STMT, REDUC_GROUP_FIRST_ELEMENT):
6292 (REDUC_GROUP_NEXT_ELEMENT, REDUC_GROUP_SIZE): Use dr_aux.dr instead
6294 (STMT_VINFO_DATA_REF): Likewise. Turn into an lvalue.
6295 (STMT_VINFO_DR_INFO): New macro.
6296 (DR_VECT_AUX): Use STMT_VINFO_DR_INKFO and vect_dr_stmt.
6297 (set_dr_misalignment): Update after rename of dataref_aux.
6298 (vect_dr_stmt): Move earlier in file. Return dr_aux.stmt.
6299 * tree-vect-stmts.c (new_stmt_vec_info): Remove redundant
6300 initialization of STMT_VINFO_DATA_REF.
6301 * tree-vectorizer.c (vec_info::move_dr): New function.
6302 * tree-vect-patterns.c (vect_recog_bool_pattern)
6303 (vect_recog_mask_conversion_pattern)
6304 (vect_recog_gather_scatter_pattern): Use it.
6305 * tree-vect-data-refs.c (vect_analyze_data_refs): Initialize
6306 the "dr" and "stmt" fields of dr_vec_info instead of
6307 STMT_VINFO_DATA_REF.
6309 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
6311 * tree-vectorizer.h (_stmt_vec_info::pattern_stmt_p): New field.
6312 (is_pattern_stmt_p): Use it.
6313 * tree-vect-patterns.c (vect_init_pattern_stmt): Set pattern_stmt_p
6314 on pattern statements.
6316 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
6318 * tree-vect-patterns.c (vect_mark_pattern_stmts): Take the
6319 original stmt as a stmt_vec_info rather than a gimple stmt.
6320 (vect_pattern_recog_1): Take the statement directly as a
6321 stmt_vec_info, rather than via a gimple_stmt_iterator.
6322 Update call to vect_mark_pattern_stmts.
6323 (vect_pattern_recog): Update calls accordingly.
6325 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
6327 * tree-vectorizer.h (vect_get_vec_defs_for_stmt_copy)
6328 (vect_get_vec_def_for_stmt_copy): Take a vec_info rather than
6329 a vect_def_type for the first argument.
6330 * tree-vect-stmts.c (vect_get_vec_defs_for_stmt_copy): Likewise.
6331 (vect_get_vec_def_for_stmt_copy): Likewise. Return the original
6332 operand if it isn't defined by a vectorized statement.
6333 (vect_build_gather_load_calls): Remove the mask_dt argument and
6334 update calls to vect_get_vec_def_for_stmt_copy.
6335 (vectorizable_bswap): Likewise the dt argument.
6336 (vectorizable_call): Update calls to vectorizable_bswap and
6337 vect_get_vec_def_for_stmt_copy.
6338 (vectorizable_simd_clone_call, vectorizable_assignment)
6339 (vectorizable_shift, vectorizable_operation, vectorizable_condition)
6340 (vectorizable_comparison): Update calls to
6341 vect_get_vec_def_for_stmt_copy.
6342 (vectorizable_store): Likewise. Remove now-unnecessary calls to
6344 (vect_get_loop_based_defs): Remove dt argument and update call
6345 to vect_get_vec_def_for_stmt_copy.
6346 (vectorizable_conversion): Update calls to vect_get_loop_based_defs
6347 and vect_get_vec_def_for_stmt_copy.
6348 (vectorizable_load): Update calls to vect_build_gather_load_calls
6349 and vect_get_vec_def_for_stmt_copy.
6350 * tree-vect-loop.c (vect_create_epilog_for_reduction)
6351 (vectorizable_reduction, vectorizable_live_operation): Update calls
6352 to vect_get_vec_def_for_stmt_copy.
6354 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
6356 * tree-vect-data-refs.c (vect_record_base_alignment): Replace vec_info
6357 and gimple stmt arguments with a stmt_vec_info.
6358 (vect_record_base_alignments): Update calls accordingly.
6359 * tree-vect-slp.c (vect_record_max_nunits): Replace vec_info
6360 and gimple stmt arguments with a stmt_vec_info.
6361 (vect_build_slp_tree_1): Remove vinfo argument and update call
6362 to vect_record_max_nunits.
6363 (vect_build_slp_tree_2): Update calls to vect_build_slp_tree_1
6364 and vect_record_max_nunits.
6366 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
6368 * tree-vectorizer.h (nested_in_vect_loop_p): Move further down
6369 file and take a stmt_vec_info instead of a gimple stmt.
6370 (supportable_widening_operation, vect_finish_replace_stmt)
6371 (vect_finish_stmt_generation, vect_get_store_rhs)
6372 (vect_get_vec_def_for_operand_1, vect_get_vec_def_for_operand)
6373 (vect_get_vec_defs, vect_init_vector, vect_transform_stmt)
6374 (vect_remove_stores, vect_analyze_stmt, vectorizable_condition)
6375 (vect_get_smallest_scalar_type, vect_check_gather_scatter)
6376 (vect_create_data_ref_ptr, bump_vector_ptr)
6377 (vect_permute_store_chain, vect_setup_realignment)
6378 (vect_transform_grouped_load, vect_record_grouped_load_vectors)
6379 (vect_create_addr_base_for_vector_ref, vectorizable_live_operation)
6380 (vectorizable_reduction, vectorizable_induction)
6381 (get_initial_def_for_reduction, is_simple_and_all_uses_invariant)
6382 (vect_get_place_in_interleaving_chain): Take stmt_vec_infos rather
6383 than gimple stmts as arguments.
6384 * tree-vect-data-refs.c (vect_get_smallest_scalar_type)
6385 (vect_preserves_scalar_order_p, vect_slp_analyze_node_dependences)
6386 (can_group_stmts_p, vect_check_gather_scatter)
6387 (vect_create_addr_base_for_vector_ref, vect_create_data_ref_ptr)
6388 (bump_vector_ptr, vect_permute_store_chain, vect_setup_realignment)
6389 (vect_permute_load_chain, vect_shift_permute_load_chain)
6390 (vect_transform_grouped_load)
6391 (vect_record_grouped_load_vectors): Likewise.
6392 * tree-vect-loop.c (vect_fixup_reduc_chain)
6393 (get_initial_def_for_reduction, vect_create_epilog_for_reduction)
6394 (vectorize_fold_left_reduction, is_nonwrapping_integer_induction)
6395 (vectorizable_reduction, vectorizable_induction)
6396 (vectorizable_live_operation, vect_loop_kill_debug_uses): Likewise.
6397 * tree-vect-patterns.c (type_conversion_p, adjust_bool_stmts)
6398 (vect_get_load_store_mask): Likewise.
6399 * tree-vect-slp.c (vect_get_place_in_interleaving_chain)
6400 (vect_analyze_slp_instance, vect_mask_constant_operand_p): Likewise.
6401 * tree-vect-stmts.c (vect_mark_relevant)
6402 (is_simple_and_all_uses_invariant)
6403 (exist_non_indexing_operands_for_use_p, process_use)
6404 (vect_init_vector_1, vect_init_vector, vect_get_vec_def_for_operand_1)
6405 (vect_get_vec_def_for_operand, vect_get_vec_defs)
6406 (vect_finish_stmt_generation_1, vect_finish_replace_stmt)
6407 (vect_finish_stmt_generation, vect_truncate_gather_scatter_offset)
6408 (compare_step_with_zero, vect_get_store_rhs, get_group_load_store_type)
6409 (get_negative_load_store_type, get_load_store_type)
6410 (vect_check_load_store_mask, vect_check_store_rhs)
6411 (vect_build_gather_load_calls, vect_get_strided_load_store_ops)
6412 (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
6413 (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
6414 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
6415 (get_group_alias_ptr_type, vectorizable_store, hoist_defs_of_uses)
6416 (vectorizable_load, vectorizable_condition, vectorizable_comparison)
6417 (vect_analyze_stmt, vect_transform_stmt, vect_remove_stores)
6418 (supportable_widening_operation): Likewise.
6420 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
6422 * tree-vect-data-refs.c (vect_describe_gather_scatter_call): Take
6423 a stmt_vec_info instead of a gcall.
6424 (vect_check_gather_scatter): Update call accordingly.
6425 * tree-vect-loop-manip.c (iv_phi_p): Take a stmt_vec_info instead
6427 (vect_can_advance_ivs_p, vect_update_ivs_after_vectorizer)
6428 (slpeel_update_phi_nodes_for_loops):): Update calls accordingly.
6429 * tree-vect-loop.c (vect_transform_loop_stmt): Take a stmt_vec_info
6430 instead of a gimple stmt.
6431 (vect_transform_loop): Update calls accordingly.
6432 * tree-vect-slp.c (vect_split_slp_store_group): Take and return
6433 stmt_vec_infos instead of gimple stmts.
6434 (vect_analyze_slp_instance): Update use accordingly.
6435 * tree-vect-stmts.c (read_vector_array, write_vector_array)
6436 (vect_clobber_variable, vect_stmt_relevant_p, permute_vec_elements)
6437 (vect_use_strided_gather_scatters_p, vect_build_all_ones_mask)
6438 (vect_build_zero_merge_argument, vect_get_gather_scatter_ops)
6439 (vect_gen_widened_results_half, vect_get_loop_based_defs)
6440 (vect_create_vectorized_promotion_stmts, can_vectorize_live_stmts):
6441 Take a stmt_vec_info instead of a gimple stmt and pass stmt_vec_infos
6442 down to subroutines.
6444 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
6446 * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Change the type
6447 of the worklist from a vector of gimple stmts to a vector of
6449 * tree-vect-stmts.c (vect_mark_relevant, process_use)
6450 (vect_mark_stmts_to_be_vectorized): Likewise
6452 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
6454 * tree-vect-loop.c (vect_analyze_loop_operations): Look up the
6455 statement before passing it to vect_analyze_stmt.
6456 (vect_create_epilog_for_reduction): Use a stmt_vec_info to walk
6457 the chain of phi vector definitions. Track the exit phi via its
6459 (vectorizable_reduction): Set cond_stmt_vinfo directly from the
6460 STMT_VINFO_REDUC_DEF.
6461 * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Use
6462 stmt_vec_infos to handle the statement chains.
6463 (vect_get_slp_defs): Record the first statement in the node
6464 using a stmt_vec_info.
6465 * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Look up
6466 statements here and pass their stmt_vec_info down to subroutines.
6467 (vect_init_vector_1): Hoist call to vinfo_for_stmt and pass it
6468 down to vect_finish_stmt_generation.
6469 (vect_init_vector, vect_get_vec_defs, vect_finish_replace_stmt)
6470 (vect_finish_stmt_generation): Call vinfo_for_stmt and pass
6471 stmt_vec_infos to subroutines.
6472 (vect_remove_stores): Use stmt_vec_infos to handle the statement
6475 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
6477 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences):
6478 (vect_check_gather_scatter, vect_create_data_ref_ptr, bump_vector_ptr)
6479 (vect_permute_store_chain, vect_setup_realignment)
6480 (vect_permute_load_chain, vect_shift_permute_load_chain)
6481 (vect_transform_grouped_load): Use stmt_vec_info rather than gimple
6482 stmts internally, and when passing values to other vectorizer routines.
6483 * tree-vect-loop-manip.c (vect_can_advance_ivs_p): Likewise.
6484 * tree-vect-loop.c (vect_analyze_scalar_cycles_1)
6485 (vect_analyze_loop_operations, get_initial_def_for_reduction)
6486 (vect_create_epilog_for_reduction, vectorize_fold_left_reduction)
6487 (vectorizable_reduction, vectorizable_induction)
6488 (vectorizable_live_operation, vect_transform_loop_stmt)
6489 (vect_transform_loop): Likewise.
6490 * tree-vect-patterns.c (vect_reassociating_reduction_p)
6491 (vect_recog_widen_op_pattern, vect_recog_mixed_size_cond_pattern)
6492 (vect_recog_bool_pattern, vect_recog_gather_scatter_pattern): Likewise.
6493 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
6494 (vect_slp_analyze_node_operations_1): Likewise.
6495 * tree-vect-stmts.c (vect_mark_relevant, process_use)
6496 (exist_non_indexing_operands_for_use_p, vect_init_vector_1)
6497 (vect_mark_stmts_to_be_vectorized, vect_get_vec_def_for_operand)
6498 (vect_finish_stmt_generation_1, get_group_load_store_type)
6499 (get_load_store_type, vect_build_gather_load_calls)
6500 (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
6501 (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
6502 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
6503 (vectorizable_store, vectorizable_load, vectorizable_condition)
6504 (vectorizable_comparison, vect_analyze_stmt, vect_transform_stmt)
6505 (supportable_widening_operation): Likewise.
6506 (vect_get_vector_types_for_stmt): Likewise.
6507 * tree-vectorizer.h (vect_dr_behavior): Likewise.
6509 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
6511 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
6512 (vect_slp_analyze_node_dependences, vect_analyze_data_ref_accesses)
6513 (vect_permute_store_chain, vect_permute_load_chain)
6514 (vect_shift_permute_load_chain, vect_transform_grouped_load): Avoid
6515 repeated stmt_vec_info lookups.
6516 * tree-vect-loop-manip.c (vect_can_advance_ivs_p): Likewise.
6517 (vect_update_ivs_after_vectorizer): Likewise.
6518 * tree-vect-loop.c (vect_is_simple_reduction): Likewise.
6519 (vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
6520 * tree-vect-patterns.c (adjust_bool_stmts): Likewise.
6521 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
6522 (vect_bb_slp_scalar_cost): Likewise.
6523 * tree-vect-stmts.c (get_group_alias_ptr_type): Likewise.
6525 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
6527 * tree-vect-data-refs.c (vect_check_gather_scatter): Pass the
6528 gcall rather than the generic gimple stmt to gimple_call_internal_fn.
6529 (vect_get_smallest_scalar_type, can_group_stmts_p): Use dyn_cast
6530 to get gassigns and gcalls, rather than operating on generc gimple
6532 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p)
6533 (vect_mark_stmts_to_be_vectorized, vectorizable_store)
6534 (vectorizable_load, vect_analyze_stmt): Likewise.
6535 * tree-vect-loop.c (vectorizable_reduction): Likewise gphi.
6537 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
6539 * tree-vectorizer.h (get_earlier_stmt, get_later_stmt): Take and
6540 return stmt_vec_infos rather than gimple stmts. Do not accept
6542 (vect_find_last_scalar_stmt_in_slp): Return a stmt_vec_info instead
6544 * tree-vect-slp.c (vect_find_last_scalar_stmt_in_slp): Likewise.
6545 Update use of get_later_stmt.
6546 (vect_get_constant_vectors): Update call accordingly.
6547 (vect_schedule_slp_instance): Likewise
6548 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Likewise.
6549 (vect_slp_analyze_instance_dependence): Likewise.
6550 (vect_preserves_scalar_order_p): Update use of get_earlier_stmt.
6552 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
6554 * tree-vectorizer.h (stmt_info_for_cost::stmt): Replace with...
6555 (stmt_info_for_cost::stmt_info): ...this new field.
6556 (add_stmt_costs): Update accordingly.
6557 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
6558 (vect_get_known_peeling_cost): Likewise.
6559 (vect_estimate_min_profitable_iters): Likewise.
6560 * tree-vect-stmts.c (record_stmt_cost): Likewise.
6562 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
6564 * tree-vectorizer.h (_loop_vec_info::may_misalign_stmts): Change
6565 from an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
6566 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Update
6568 * tree-vect-loop-manip.c (vect_create_cond_for_align_checks): Likewise.
6570 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
6572 * tree-vectorizer.h (_stmt_vec_info::same_dr_stmt): Change from
6573 a gimple stmt to a stmt_vec_info.
6574 * tree-vect-stmts.c (vectorizable_load): Update accordingly.
6576 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
6578 * tree-vectorizer.h (vec_info::grouped_stores): Change from
6579 an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
6580 (_loop_vec_info::reduction_chains): Likewise.
6581 * tree-vect-loop.c (vect_fixup_scalar_cycles_with_patterns): Update
6583 * tree-vect-slp.c (vect_analyze_slp): Likewise.
6585 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
6587 * tree-vectorizer.h (_stmt_vec_info::first_element): Change from
6588 a gimple stmt to a stmt_vec_info.
6589 (_stmt_vec_info::next_element): Likewise.
6590 * tree-vect-data-refs.c (vect_update_misalignment_for_peel)
6591 (vect_slp_analyze_and_verify_node_alignment)
6592 (vect_analyze_group_access_1, vect_analyze_group_access)
6593 (vect_small_gap_p, vect_prune_runtime_alias_test_list)
6594 (vect_create_data_ref_ptr, vect_record_grouped_load_vectors)
6595 (vect_supportable_dr_alignment): Update accordingly.
6596 * tree-vect-loop.c (vect_fixup_reduc_chain): Likewise.
6597 (vect_fixup_scalar_cycles_with_patterns, vect_is_slp_reduction)
6598 (vect_is_simple_reduction, vectorizable_reduction): Likewise.
6599 * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
6600 * tree-vect-slp.c (vect_build_slp_tree_1)
6601 (vect_attempt_slp_rearrange_stmts, vect_supported_load_permutation_p)
6602 (vect_split_slp_store_group, vect_analyze_slp_instance)
6603 (vect_analyze_slp, vect_transform_slp_perm_load): Likewise.
6604 * tree-vect-stmts.c (vect_model_store_cost, vect_model_load_cost)
6605 (get_group_load_store_type, get_load_store_type)
6606 (get_group_alias_ptr_type, vectorizable_store, vectorizable_load)
6607 (vect_transform_stmt, vect_remove_stores): Likewise.
6609 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
6611 * tree-vectorizer.h (vect_dr_stmt): Return a stmt_vec_info rather
6613 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
6614 (vect_slp_analyze_data_ref_dependence, vect_record_base_alignments)
6615 (vect_calculate_target_alignmentm, vect_compute_data_ref_alignment)
6616 (vect_update_misalignment_for_peel, vect_verify_datarefs_alignment)
6617 (vector_alignment_reachable_p, vect_get_data_access_cost)
6618 (vect_get_peeling_costs_all_drs, vect_peeling_hash_get_lowest_cost)
6619 (vect_peeling_supportable, vect_enhance_data_refs_alignment)
6620 (vect_find_same_alignment_drs, vect_analyze_data_refs_alignment)
6621 (vect_analyze_group_access_1, vect_analyze_group_access)
6622 (vect_analyze_data_ref_access, vect_analyze_data_ref_accesses)
6623 (vect_vfa_access_size, vect_small_gap_p, vect_analyze_data_refs)
6624 (vect_supportable_dr_alignment): Remove vinfo_for_stmt from the
6625 result of vect_dr_stmt and use the stmt_vec_info instead of
6626 the associated gimple stmt.
6627 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
6628 (vect_gen_prolog_loop_niters): Likewise.
6629 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
6631 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
6633 * tree-vectorizer.h (_slp_tree::stmts): Change from a vec<gimple *>
6634 to a vec<stmt_vec_info>.
6635 * tree-vect-slp.c (vect_free_slp_tree): Update accordingly.
6636 (vect_create_new_slp_node): Take a vec<gimple *> instead of a
6638 (_slp_oprnd_info::def_stmts): Change from a vec<gimple *>
6639 to a vec<stmt_vec_info>.
6640 (bst_traits::value_type, bst_traits::value_type): Likewise.
6641 (bst_traits::hash): Update accordingly.
6642 (vect_get_and_check_slp_defs): Change the stmts parameter from
6643 a vec<gimple *> to a vec<stmt_vec_info>.
6644 (vect_two_operations_perm_ok_p, vect_build_slp_tree_1): Likewise.
6645 (vect_build_slp_tree): Likewise.
6646 (vect_build_slp_tree_2): Likewise. Update uses of
6647 SLP_TREE_SCALAR_STMTS.
6648 (vect_print_slp_tree): Update uses of SLP_TREE_SCALAR_STMTS.
6649 (vect_mark_slp_stmts, vect_mark_slp_stmts_relevant)
6650 (vect_slp_rearrange_stmts, vect_attempt_slp_rearrange_stmts)
6651 (vect_supported_load_permutation_p, vect_find_last_scalar_stmt_in_slp)
6652 (vect_detect_hybrid_slp_stmts, vect_slp_analyze_node_operations_1)
6653 (vect_slp_analyze_node_operations, vect_slp_analyze_operations)
6654 (vect_bb_slp_scalar_cost, vect_slp_analyze_bb_1)
6655 (vect_get_constant_vectors, vect_get_slp_defs)
6656 (vect_transform_slp_perm_load, vect_schedule_slp_instance)
6657 (vect_remove_slp_scalar_calls, vect_schedule_slp): Likewise.
6658 (vect_analyze_slp_instance): Build up a vec of stmt_vec_infos
6659 instead of gimple stmts.
6660 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Change
6661 the stores parameter for a vec<gimple *> to a vec<stmt_vec_info>.
6662 (vect_slp_analyze_instance_dependence): Update uses of
6663 SLP_TREE_SCALAR_STMTS.
6664 (vect_slp_analyze_and_verify_node_alignment): Likewise.
6665 (vect_slp_analyze_and_verify_instance_alignment): Likewise.
6666 * tree-vect-loop.c (neutral_op_for_slp_reduction): Likewise.
6667 (get_initial_defs_for_reduction): Likewise.
6668 (vect_create_epilog_for_reduction): Likewise.
6669 (vectorize_fold_left_reduction): Likewise.
6670 * tree-vect-stmts.c (vect_prologue_cost_for_slp_op): Likewise.
6671 (vect_model_simple_cost, vectorizable_shift, vectorizable_load)
6672 (can_vectorize_live_stmts): Likewise.
6674 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
6676 * tree-vectorizer.h (_loop_vec_info::reductions): Change from an
6677 auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
6678 (vect_force_simple_reduction): Take and return stmt_vec_infos rather
6680 * tree-parloops.c (valid_reduction_p): Take a stmt_vec_info instead
6682 (gather_scalar_reductions): Update after above interface changes.
6683 * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Likewise.
6684 (vect_is_simple_reduction): Take and return stmt_vec_infos rather
6686 (vect_force_simple_reduction): Likewise.
6687 * tree-vect-patterns.c (vect_pattern_recog_1): Update use of
6688 LOOP_VINFO_REDUCTIONS.
6689 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
6691 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
6693 * tree-vectorizer.h (_stmt_vec_info::reduc_def): Change from
6694 a gimple stmt to a stmt_vec_info.
6695 * tree-vect-loop.c (vect_active_double_reduction_p)
6696 (vect_force_simple_reduction, vectorizable_reduction): Update
6699 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
6701 * tree-vectorizer.h (_slp_tree::vec_stmts): Change from a
6702 vec<gimple *> to a vec<stmt_vec_info>.
6703 * tree-vect-loop.c (vect_create_epilog_for_reduction): Change
6704 the reduction_phis argument from a vec<gimple *> to a
6706 (vectorizable_reduction): Likewise the phis local variable that
6707 is passed to vect_create_epilog_for_reduction. Update for new type
6708 of SLP_TREE_VEC_STMTS.
6709 (vectorizable_induction): Update for new type of SLP_TREE_VEC_STMTS.
6710 (vectorizable_live_operation): Likewise.
6711 * tree-vect-slp.c (vect_get_slp_vect_defs): Likewise.
6712 (vect_transform_slp_perm_load, vect_schedule_slp_instance): Likewise.
6714 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
6716 * tree-vectorizer.h (_stmt_vec_info::vectorized_stmt): Change from
6717 a gimple stmt to a stmt_vec_info.
6718 (vectorizable_condition, vectorizable_live_operation)
6719 (vectorizable_reduction, vectorizable_induction): Pass back the
6720 vectorized statement as a stmt_vec_info.
6721 * tree-vect-data-refs.c (vect_record_grouped_load_vectors): Update
6722 use of STMT_VINFO_VEC_STMT.
6723 * tree-vect-loop.c (vect_create_epilog_for_reduction): Likewise,
6724 accumulating the inner phis that feed the STMT_VINFO_VEC_STMT
6725 as stmt_vec_infos rather than gimple stmts.
6726 (vectorize_fold_left_reduction): Change vec_stmt from a gimple stmt
6728 (vectorizable_live_operation): Likewise.
6729 (vectorizable_reduction, vectorizable_induction): Likewise,
6730 updating use of STMT_VINFO_VEC_STMT.
6731 * tree-vect-stmts.c (vect_get_vec_def_for_operand_1): Update use
6732 of STMT_VINFO_VEC_STMT.
6733 (vect_build_gather_load_calls, vectorizable_bswap, vectorizable_call)
6734 (vectorizable_simd_clone_call, vectorizable_conversion)
6735 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
6736 (vectorizable_store, vectorizable_load, vectorizable_condition)
6737 (vectorizable_comparison, can_vectorize_live_stmts): Change vec_stmt
6738 from a gimple stmt to a stmt_vec_info.
6739 (vect_transform_stmt): Update use of STMT_VINFO_VEC_STMT. Pass a
6740 pointer to a stmt_vec_info to the vectorizable_* routines.
6742 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
6744 * tree-vectorizer.h (_stmt_vec_info::related_stmt): Change from
6745 a gimple stmt to a stmt_vec_info.
6746 (is_pattern_stmt_p): Update accordingly.
6747 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Likewise.
6748 (vect_record_grouped_load_vectors): Likewise.
6749 * tree-vect-loop.c (vect_determine_vf_for_stmt): Likewise.
6750 (vect_fixup_reduc_chain, vect_update_vf_for_slp): Likewise.
6751 (vect_model_reduction_cost): Likewise.
6752 (vect_create_epilog_for_reduction): Likewise.
6753 (vectorizable_reduction, vectorizable_induction): Likewise.
6754 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
6755 Return the stmt_vec_info for the pattern statement.
6756 (vect_set_pattern_stmt): Update use of STMT_VINFO_RELATED_STMT.
6757 (vect_split_statement, vect_mark_pattern_stmts): Likewise.
6758 * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
6759 (vect_detect_hybrid_slp, vect_get_slp_defs): Likewise.
6760 * tree-vect-stmts.c (vect_mark_relevant): Likewise.
6761 (vect_get_vec_def_for_operand_1, vectorizable_call): Likewise.
6762 (vectorizable_simd_clone_call, vect_analyze_stmt, new_stmt_vec_info)
6763 (free_stmt_vec_info, vect_is_simple_use): Likewise.
6765 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
6767 * tree-vectorizer.h (vect_finish_replace_stmt): Return a stmt_vec_info
6768 (vect_finish_stmt_generation): Likewise.
6769 * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
6770 (vect_finish_replace_stmt, vect_finish_stmt_generation): Likewise.
6771 (vect_build_gather_load_calls): Use the return value of the above
6772 functions instead of a separate call to vinfo_for_stmt. Use narrow
6773 scopes for the input gimple stmt and wider scopes for the associated
6774 stmt_vec_info. Use vec_info::lookup_def when setting these
6775 stmt_vec_infos from an SSA_NAME definition.
6776 (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
6777 (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
6778 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
6779 (vectorizable_store, vectorizable_load, vectorizable_condition)
6780 (vectorizable_comparison): Likewise.
6781 * tree-vect-loop.c (vectorize_fold_left_reduction): Likewise.
6782 (vectorizable_reduction): Likewise.
6784 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
6786 * tree-vectorizer.h (vect_is_simple_use): Add an optional
6787 stmt_vec_info * parameter before the optional gimple **.
6788 * tree-vect-stmts.c (vect_is_simple_use): Likewise.
6789 (process_use, vect_get_vec_def_for_operand_1): Update callers.
6790 (vect_get_vec_def_for_operand, vectorizable_shift): Likewise.
6791 * tree-vect-loop.c (vectorizable_reduction): Likewise.
6792 (vectorizable_live_operation): Likewise.
6793 * tree-vect-patterns.c (type_conversion_p): Likewise.
6794 (vect_look_through_possible_promotion): Likewise.
6795 (vect_recog_rotate_pattern): Likewise.
6796 * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
6798 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
6800 * tree-vectorizer.h (stmt_vec_info): Temporarily change from
6801 a typedef to a wrapper class.
6802 (NULL_STMT_VEC_INFO): New macro.
6803 (vec_info::stmt_infos): Change to vec<stmt_vec_info>.
6804 (stmt_vec_info::operator*): New function.
6805 (stmt_vec_info::operator gimple *): Likewise.
6806 (set_vinfo_for_stmt): Use NULL_STMT_VEC_INFO.
6807 (add_stmt_costs): Likewise.
6808 * tree-vect-loop-manip.c (iv_phi_p): Likewise.
6809 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
6810 (vect_get_known_peeling_cost): Likewise.
6811 (vect_estimate_min_profitable_iters): Likewise.
6812 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
6813 * tree-vect-slp.c (vect_remove_slp_scalar_calls): Likewise.
6814 * tree-vect-stmts.c (vect_build_gather_load_calls): Likewise.
6815 (vectorizable_store, free_stmt_vec_infos): Likewise.
6816 (new_stmt_vec_info): Change return type of xcalloc to
6819 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
6821 * tree-vectorizer.h (vec_info::lookup_single_use): Declare.
6822 * tree-vectorizer.c (vec_info::lookup_single_use): New function.
6823 * tree-vect-loop.c (vectorizable_reduction): Use it instead of
6824 a single_imm_use-based sequence.
6825 * tree-vect-stmts.c (supportable_widening_operation): Likewise.
6827 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
6829 * tree-vectorizer.h (vec_info::lookup_def): Declare.
6830 * tree-vectorizer.c (vec_info::lookup_def): New function.
6831 * tree-vect-patterns.c (vect_get_internal_def): Use it.
6832 (vect_widened_op_tree): Likewise.
6833 * tree-vect-stmts.c (vect_is_simple_use): Likewise.
6834 * tree-vect-loop.c (vect_analyze_loop_operations): Likewise.
6835 (vectorizable_reduction): Likewise.
6836 (vect_valid_reduction_input_p): Take a stmt_vec_info instead
6838 (vect_is_slp_reduction): Update calls accordingly. Use
6839 vec_info::lookup_def.
6840 (vect_is_simple_reduction): Likewise
6841 * tree-vect-slp.c (vect_detect_hybrid_slp_1): Use vec_info::lookup_def.
6843 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
6845 * tree-vectorizer.h (vec_info::lookup_stmt): Declare.
6846 * tree-vectorizer.c (vec_info::lookup_stmt): New function.
6847 * tree-vect-loop.c (vect_determine_vf_for_stmt): Use it instead
6849 (vect_determine_vectorization_factor, vect_analyze_scalar_cycles_1)
6850 (vect_compute_single_scalar_iteration_cost, vect_analyze_loop_form)
6851 (vect_update_vf_for_slp, vect_analyze_loop_operations)
6852 (vect_is_slp_reduction, vectorizable_induction)
6853 (vect_transform_loop_stmt, vect_transform_loop): Likewise.
6854 * tree-vect-patterns.c (vect_init_pattern_stmt):
6855 (vect_determine_min_output_precision_1, vect_determine_precisions)
6856 (vect_pattern_recog): Likewise.
6857 * tree-vect-stmts.c (vect_analyze_stmt, vect_transform_stmt): Likewise.
6858 * config/powerpcspe/powerpcspe.c (rs6000_density_test): Likewise.
6859 * config/rs6000/rs6000.c (rs6000_density_test): Likewise.
6860 * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
6861 (vect_detect_hybrid_slp_1, vect_detect_hybrid_slp_2)
6862 (vect_detect_hybrid_slp): Likewise. Change the walk_stmt_info
6863 info field from a loop to a loop_vec_info.
6865 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
6867 * tree-vectorizer.h (stmt_vec_info): Move typedef earlier in file.
6868 (vec_info::add_stmt): Declare.
6869 * tree-vectorizer.c (vec_info::add_stmt): New function.
6870 * tree-vect-data-refs.c (vect_create_data_ref_ptr): Use it.
6871 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Likewise.
6872 (vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
6873 (vectorizable_induction): Likewise.
6874 * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Likewise.
6875 * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
6876 (vectorizable_simd_clone_call, vectorizable_store): Likewise.
6877 (vectorizable_load): Likewise.
6878 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
6879 (vect_recog_bool_pattern, vect_recog_mask_conversion_pattern)
6880 (vect_recog_gather_scatter_pattern): Likewise.
6881 (append_pattern_def_seq): Likewise. Remove a check that is
6882 performed by add_stmt itself.
6884 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
6886 * tree-vect-loop.c (vectorizable_reduction): Fix an instance in
6887 which make_ssa_name was called with new_stmt before new_stmt
6890 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
6892 * tree-vect-loop.c (vect_valid_reduction_input_p): New function,
6894 (vect_is_slp_reduction): ...here...
6895 (vect_is_simple_reduction): ...and here. Remove repetition of tests
6896 that are already known to be false.
6898 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
6900 * tree-vectorizer.h (vect_free_slp_instance): Add a final_p parameter.
6901 * tree-vect-slp.c (vect_free_slp_tree): Likewise. Don't update
6902 STMT_VINFO_NUM_SLP_USES when it's true.
6903 (vect_free_slp_instance): Add a final_p parameter and pass it to
6905 (vect_build_slp_tree_2): Update call to vect_free_slp_instance.
6906 (vect_analyze_slp_instance): Likewise.
6907 (vect_slp_analyze_operations): Likewise.
6908 (vect_slp_analyze_bb_1): Likewise.
6909 * tree-vectorizer.c (vec_info): Likewise.
6910 * tree-vect-loop.c (vect_transform_loop): Likewise.
6912 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
6914 * tree-vect-loop.c (vectorizable_reduction): Assert that the
6915 function is not called for second and subsequent members of
6918 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
6920 * tree-vect-loop.c (get_initial_def_for_reduction): Move special
6921 cases for nested loops from here to ...
6922 (vect_create_epilog_for_reduction): ...here. Only call
6923 vect_is_simple_use for inner-loop reductions.
6925 2018-07-31 Martin Liska <mliska@suse.cz>
6927 PR gcov-profile/85338
6928 PR gcov-profile/85350
6929 PR gcov-profile/85372
6930 * profile.c (struct location_triplet): New.
6931 (struct location_triplet_hash): Likewise.
6932 (output_location): Do not output a BB that
6933 is already recorded for a line.
6934 (branch_prob): Use streamed_locations.
6936 2018-07-31 Martin Liska <mliska@suse.cz>
6938 PR gcov-profile/85370
6939 * coverage.c (coverage_begin_function): Do not mark target
6940 clones as artificial functions.
6942 2018-07-31 Martin Liska <mliska@suse.cz>
6944 PR gcov-profile/83813
6945 PR gcov-profile/84758
6946 PR gcov-profile/85217
6947 PR gcov-profile/85332
6948 * profile.c (branch_prob): Do not record GOTO expressions
6949 for GIMPLE statements which locations are already streamed.
6951 2018-07-31 Olivier Hainque <hainque@adacore.com>
6953 * gcc.c (handle_spec_function): Accept a soft_matched_part
6954 argument, as do_spec_1. Pass it down to ...
6955 (eval_spec_function): Accept a soft_matched_part argument,
6956 and pass it down to ...
6957 (do_spec_2): Accept a soft_matched_part argument, and pass
6958 it down to do_spec_1.
6959 (do_spec_1): Pass soft_matched_part to handle_spec_function.
6960 (handle_braces): Update call to handle_spec_function.
6961 (driver::set_up_specs): Update calls to do_spec_2.
6962 (compare_debug_dump_opt_spec_function): Likewise.
6963 (compare_debug_self_opt_spec_function): Likewise.
6965 2018-07-31 Olivier Hainque <hainque@adacore.com>
6967 * common.opt (nolibc): New option.
6968 * doc/invoke.texi (Link Options): Document it.
6969 * gcc.c (LINK_GCC_C_SEQUENCE_SPEC): Honor nolibc.
6970 * config/alpha/linux.h: Likewise.
6971 * config/arc/elf.h: Likewise.
6972 * config/arm/uclinux-elf.h: Likewise.
6973 * config/arm/unknown-elf.h: Likewise.
6974 * config/avr/avrlibc.h: Likewise.
6975 * config/bfin/bfin.h: Likewise.
6976 * config/bfin/linux.h: Likewise.
6977 * config/bfin/uclinux.h: Likewise.
6978 * config/darwin.h: Likewise.
6979 * config/darwin10.h: Likewise.
6980 * config/darwin12.h: Likewise.
6981 * config/gnu-user.h: Likewise.
6982 * config/lm32/uclinux-elf.h: Likewise.
6983 * config/pa/pa-hpux11.h: Likewise.
6984 * config/pa/pa64-hpux.h: Likewise.
6985 * config/sparc/sparc.h: Likewise.
6987 2018-07-31 Olivier Hainque <hainque@adacore.com>
6989 * gcc.c (getenv_spec_function): Prepend '/' to value for allowed
6990 undefined variables.
6992 2018-07-30 Segher Boessenkool <segher@kernel.crashing.org>
6995 * config/arm/arm.c (arm_block_set_aligned_vect): Use gen_int_mode
6998 2018-07-30 Bernd Edlinger <bernd.edlinger@hotmail.de>
7000 * tree-ssa-forwprop.c (simplify_builtin_call): Don't create a not NUL
7001 terminated string literal.
7003 2018-07-30 Segher Boessenkool <segher@kernel.crashing.org>
7005 PR rtl-optimization/85160
7006 * combine.c (is_just_move): New function.
7007 (try_combine): Allow combining two instructions into two if neither of
7008 the original instructions was a move.
7010 2018-07-30 Alexander Monakov <amonakov@ispras.ru>
7013 * doc/extend.texi (Global Register Variables): Discourage use of type
7015 (Local Register Variables): Likewise.
7017 2018-07-30 Richard Sandiford <richard.sandiford@arm.com>
7019 PR tree-optimization/86506
7020 * hwint.h (ceil_log2): Resync with hwint.c implementation.
7022 2018-07-30 Ilya Leoshkevich <iii@linux.ibm.com>
7025 * lra-constraints.c (spill_hard_reg_in_range): When selecting the
7026 hard_regno, make sure no insn between `from` and `to` clobbers it.
7028 2018-07-30 Cesar Philippidis <cesar@codesourcery.com>
7029 Tom de Vries <tdevries@suse.de>
7031 * config/nvptx/nvptx.c (PTX_GANG_DEFAULT): Rename to ...
7032 (PTX_DEFAULT_RUNTIME_DIM): ... this.
7033 (nvptx_goacc_validate_dims): Set default worker and gang dims to
7034 PTX_DEFAULT_RUNTIME_DIM.
7035 (nvptx_dim_limit): Ignore GOMP_DIM_WORKER.
7037 2018-07-29 John David Anglin <danglin@gcc.gnu.org>
7039 * config/pa/pa.c (pa_output_addr_vec): Align address table.
7040 * config/pa/pa.h (JUMP_TABLES_IN_TEXT_SECTION): Revise comment.
7041 * config/pa/pa32-linux.h (JUMP_TABLES_IN_TEXT_SECTION): Define.
7043 2018-07-27 Michael Meissner <meissner@linux.ibm.com>
7045 * config/rs6000/constraints.md (wG constraint): Delete, no longer
7047 * config/rs6000/predicates.md (p9_fusion_reg_operand): Rename
7048 predicate to reflect toc fusion has been deleted.
7049 (toc_fusion_mem_raw): Delete, no longer used.
7050 (toc_fusion_mem_wrapped): Likewise.
7051 * config/rs6000/rs6000-cpus.def (POWERPC_MASKS): Delete toc
7053 * config/rs6000/rs6000-protos.h (fusion_wrap_memory_address):
7054 Delete, no longer used.
7055 * config/rs6000/rs6000.c (struct rs6000_reg_addr): Delete fields
7056 meant to be used for toc fusion.
7057 (rs6000_debug_print_mode): Delete toc fusion debugging.
7058 (rs6000_debug_reg_global): Likewise.
7059 (rs6000_init_hard_regno_mode_ok): Delete setting up fields for toc
7060 fusion and secondary reload support that were never used.
7061 (rs6000_option_override_internal): Delete TOC fusion, that was only
7062 partially defined, and it did not work unless you also used the
7064 (rs6000_legitimate_address_p): Delete TOC fusion support.
7065 (rs6000_opt_masks): Likewise.
7066 (fusion_wrap_memory_address): Delete function, no longer used.
7067 (fusion_split_address); Delete TOC fusion support.
7068 * config/rs6000/rs6000.h (TARGET_TOC_FUSION_INT): Delete, no
7069 longer used with toc fusion being deleted.
7070 (TARGET_TOC_FUSION_FP): Likewise.
7071 * config/rs6000/rs6000.md (UNSPEC_FUSION_ADDIS): Delete TOC fusion
7073 (toc fusion spliter): Delete TOC fusion support.
7074 (toc_fusionload_<mode>): Likewise.
7075 (toc_fusionload_di): Likewise.
7076 (fusion_gpr_load_<mode>): Delete generator function, this insn no
7077 longer needs to be named. Rename predicate to delete TOC fusion.
7078 (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
7079 (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
7080 (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
7081 (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
7082 (p9 fusion peephole2s): Rename predicate to delete TOC fusion.
7084 2018-07-27 Kelvin Nilsen <kelvin@gcc.gnu.org>
7086 * doc/extend.texi (Basic PowerPC Built-in Functions Available on
7087 ISA 2.05): Replace __uint128_t with __uint128 and __int128_t with
7088 __int128 in built-in function prototypes.
7089 (PowerPC AltiVec Built-in Functions on ISA 2.07): Likewise.
7090 (PowerPC AltiVec Built-in Functions on ISA 3.0): Likewise.
7092 2018-07-27 Martin Sebor <msebor@redhat.com>
7094 PR tree-optimization/86696
7095 * tree-ssa-strlen.c (get_min_string_length): Handle all integer
7096 types, including enums.
7097 (handle_char_store): Be prepared for the above function to fail.
7099 2018-07-26 Qing Zhao <qing.zhao@oracle.com>
7101 * builtins.c (inline_expand_builtin_string_cmp): Disable inlining
7102 when optimization level is lower than 2 or optimize for size.
7104 2018-07-26 Martin Sebor <msebor@redhat.com>
7106 PR tree-optimization/86043
7107 PR tree-optimization/86042
7108 * tree-ssa-strlen.c (handle_builtin_memcpy): Handle strict overlaps.
7109 (get_string_cst_length): Rename...
7110 (get_min_string_length): ...to this. Add argument.
7111 (handle_char_store): Extend to handle multi-character stores by
7113 * tree.c (initializer_zerop): Use new argument. Handle MEM_REF.
7114 * tree.h (initializer_zerop): Add argument.
7116 2018-07-26 Jakub Jelinek <jakub@redhat.com>
7119 * omp-low.c (scan_sharing_clauses): Don't ignore map clauses for
7120 declare target to variables if they have always,{to,from,tofrom} map
7123 2018-07-26 Martin Liska <mliska@suse.cz>
7126 * lto-wrapper.c: Add linker_output as prefix
7127 for ltrans_output_file.
7129 2018-07-26 Segher Boessenkool <segher@kernel.crashing.org>
7131 PR rtl-optimization/85805
7132 * combine.c (reg_nonzero_bits_for_combine): Only use the last set
7133 value for hard registers if that was written in the same mode.
7135 2018-07-26 Martin Liska <mliska@suse.cz>
7137 PR gcov-profile/86536
7138 * gcov.c (format_gcov): Use printf format %.*f directly
7139 and do not handle special values.
7141 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
7143 * common/config/arc/arc-common.c (arc_option_optimization_table):
7144 Update default optimizations for size.
7146 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
7148 * config/arc/arc.md (movsf_insn): Add short instruction selection.
7149 * config/arc/constraints.md (CfZ): New constraint.
7150 * config/arc/fpu.md (addssf3_fpu): Use CfZ constraint.
7151 (subsf3_fpu): Likewise.
7152 (cmpsf_fpu): Likewise.
7153 (cmpsf_fpu_uneq): Likewise.
7155 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
7157 * config/arc/arc.c (compact_memory_operand_p): Check for uncached
7159 (arc_is_uncached_mem_p): uncached applies to both the variable and
7162 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
7164 * config/arc/arc.h (ADDITIONAL_REGISTER_NAMES): Add additional
7167 2018-07-25 David Malcolm <dmalcolm@redhat.com>
7169 * optinfo-emit-json.cc (class optrecord_json_writer): Convert
7170 field "m_scopes" from vec to auto_vec.
7172 2018-07-25 Martin Liska <mliska@suse.cz>
7174 * config/powerpcspe/powerpcspe-protos.h (rs6000_loop_align): Fix
7177 2018-07-25 Richard Biener <rguenther@suse.de>
7180 * dwarf2out.c (dwarf2out_decl): Do not handle nested functions
7181 special wrt context_die late.
7182 (gen_subprogram_die): Re-use DIEs in local scope.
7184 2018-07-25 Richard Sandiford <richard.sandiford@arm.com>
7186 PR tree-optimization/86644
7187 * hwint.c (ceil_log2): Fix comment. Return 0 for 0.
7189 2018-07-25 Martin Liska <mliska@suse.cz>
7192 * dumpfile.c: And excluded values with TDF_ALL_VALUES.
7193 * dumpfile.h (enum dump_flag): Defince TDF_ALL_VALUES.
7195 2018-07-25 Martin Liska <mliska@suse.cz>
7198 * params.def: Explain ASan abbreviation and provide
7199 a documentation link.
7201 2018-07-24 Martin Sebor <msebor@redhat.com>
7203 PR tree-optimization/86622
7204 PR tree-optimization/86532
7205 * builtins.h (string_length): Declare.
7206 * builtins.c (c_strlen): Correct handling of non-constant offsets.
7207 (check_access): Be prepared for non-constant length ranges.
7208 (string_length): Make extern.
7209 * expr.c (string_constant): Only handle the minor non-constant
7210 array index. Use string_constant to compute the length of
7211 a generic string constant.
7213 2018-07-24 Richard Sandiford <richard.sandiford@arm.com>
7215 PR tree-optimization/86618
7216 * tree-vect-stmts.c (vectorizable_call): Don't take the address
7217 of LOOP_VINFO_MASKS (loop_vinfo) when loop_vinfo is null.
7219 2018-07-24 David Malcolm <dmalcolm@redhat.com>
7221 PR tree-optimization/86636
7222 * json.cc (json::object::set): Fix comment. Add assertions.
7223 (json::array::append): Move here from json.h. Add comment and an
7225 (json::string::string): Likewise.
7226 * json.h (json::array::append): Move to json.cc.
7227 (json::string::string): Likewise.
7228 * optinfo-emit-json.cc
7229 (optrecord_json_writer::impl_location_to_json): Assert that we
7230 aren't attempting to write out UNKNOWN_LOCATION, or an ad-hoc
7231 wrapper around it. Expand the location once, rather than three
7233 (optrecord_json_writer::inlining_chain_to_json): Fix the check for
7234 UNKNOWN_LOCATION, to use LOCATION_LOCUS to look through ad-hoc
7236 (optrecord_json_writer::optinfo_to_json): Likewise, in four
7237 places. Fix some overlong lines.
7239 2018-07-24 Matthew Malcomson <matthew.malcomson@arm.com>
7241 * config/aarch64/aarch64-simd.md
7242 (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>): Split into...
7243 (aarch64_<ANY_EXTEND:su>subw<mode>): ... This...
7244 (aarch64_<ANY_EXTEND:su>addw<mode>): ... And this.
7245 (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>_internal): Split into...
7246 (aarch64_<ANY_EXTEND:su>subw<mode>_internal): ... This...
7247 (aarch64_<ANY_EXTEND:su>addw<mode>_internal): ... And this.
7248 (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w2<mode>_internal): Split into...
7249 (aarch64_<ANY_EXTEND:su>subw2<mode>_internal): ... This...
7250 (aarch64_<ANY_EXTEND:su>addw2<mode>_internal): ... And this.
7252 2018-07-24 Jakub Jelinek <jakub@redhat.com>
7255 * expmed.c (expand_divmod): Punt if d == HOST_WIDE_INT_MIN
7256 and size > HOST_BITS_PER_WIDE_INT. For size > HOST_BITS_PER_WIDE_INT
7257 and abs_d == d, do the power of two handling if profitable.
7259 2018-07-24 Richard Biener <rguenther@suse.de>
7261 * match.pd: Add BIT_FIELD_REF canonicalizations.
7263 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
7266 * genmatch.c (dt_operand::gen_match_op): Avoid folding volatile values.
7268 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
7270 * gimple-fold.c (gimple_fold_builtin_printf): Don't create a not NUL
7271 terminated STRING_CST object.
7273 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
7275 hsa-dump.c (dump_hsa_symbol): Avoid out of scope access to buf.
7277 2018-07-23 Segher Boessenkool <segher@kernel.crashing.org>
7279 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Adjust.
7280 * config/rs6000/rs6000-protos.h (rs6000_split_v4si_init): Delete.
7281 * config/rs6000/rs6000.c (rs6000_expand_vector_init): Always force
7282 the elements into a register.
7283 (rs6000_split_v4si_init_di_reg): Delete.
7284 (rs6000_split_v4si_init): Delete.
7285 * config/rs6000/vsx.md (unspec): Delete UNSPEC_VSX_VEC_INIT.
7286 (vsx_init_v4si): Rewrite as a define_expand.
7288 2018-07-23 Segher Boessenkool <segher@kernel.crashing.org>
7290 * config/rs6000/rs6000.md (splitters for rldimi and rlwimi with the
7291 zero_extend argument from memory): New.
7293 2018-07-22 Martin Sebor <msebor@redhat.com>
7296 * gimple-ssa-warn-alloca.c (alloca_call_type_by_arg): Avoid
7297 diagnosing calls with unknown arguments unless -Walloca-larger-than
7298 is restricted to less than PTRDIFF_MAX bytes.
7300 2018-07-22 Gerald Pfeifer <gerald@pfeifer.com>
7302 * doc/gcov.texi (Invoking Gcov): Editorial changes.
7304 2018-07-20 David Malcolm <dmalcolm@redhat.com>
7306 * pretty-print.c (text_info::set_location): Remove redundant
7307 "line_table" parameter from call to rich_location::set_range.
7309 2018-07-20 Martin Sebor <msebor@redhat.com>
7312 * builtins.c (expand_builtin_alloca): Adjust.
7313 * calls.c (alloc_max_size): Simplify.
7314 * cgraphunit.c (cgraph_node::expand): Adjust.
7315 * common.opt (larger_than_size, warn_frame_larger_than): Remove
7317 (frame_larger_than_size): Same.
7318 (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Change options
7319 to take a HOST_WIDE_INT argument and accept a byte-size suffix.
7321 * doc/invoke.texi (GCC Command Options): Document option arguments.
7322 Explain byte-size arguments and suffixes.
7323 (-Wvla-larger-than, -Wno-alloc-size-larger-than): Update.
7324 (-Wno-alloca-larger-than, -Wno-vla-larger-than): Same.
7325 (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Same.
7326 * doc/options.texi (UInteger): Expand.
7327 (Host_Wide_Int, ByteSize): Document new properties.
7328 * final.c (final_start_function_1): Include sizes in an error message.
7329 * function.c (frame_offset_overflow): Same.
7330 * gimple-ssa-warn-alloca.c (pass_walloca::gate): Adjust.
7331 (alloca_call_type_by_arg): Change function argument to HOST_WIDE_INT.
7332 Diagnose unbounded alloca calls only for limits of less than
7334 (alloca_call_type): Adjust. Diagnose possibly out-of-bounds alloca
7335 calls and VLA size only for limits of less than PTRDIFF_MAX. Same
7337 (pass_walloca::execute): Adjust. Diagnose alloca calls in loops
7338 only for limits of less than PTRDIFF_MAX.
7339 * langhooks-def.h (lhd_handle_option): Change function argument
7341 * langhooks.c (lhd_handle_option): Same.
7342 * langhooks.h (handle_option): Same.
7343 * opt-functions.awk (switch_bit_fields): Handle Host_Wide_Int and
7345 (var_type, var_type_struct): Same.
7346 (var_set): Handle ByteSize flag.
7347 * optc-gen.awk: Add comments to output to ease debugging. Make
7348 use of HOST_WIDE_INT where appropriate.
7349 * opts-gen-save.awk: Use %lx to format unsigned long.
7350 * opth-gen.awk: Change function argument to HOST_WIDE_INT.
7351 * opts-common.c (integral_argument): Return HOST_WIDE_INT and add
7352 arguments. Parse bytes-size suffixes.
7353 (enum_arg_to_value): Change function argument to HOST_WIDE_INT.
7354 (enum_value_to_arg): Same.
7355 (decode_cmdline_option): Handle cl_host_wide_int. Adjust.
7356 (handle_option): Adjust.
7357 (generate_option): Change function argument to HOST_WIDE_INT.
7358 (cmdline_handle_error): Adjust.
7359 (read_cmdline_option): Change function argument to HOST_WIDE_INT.
7360 (set_option): Change function argument to HOST_WIDE_INT.
7361 (option_enabled): Handle cl_host_wide_int.
7362 (get_option_state): Handle CLVC_SIZE.
7363 (control_warning_option): Same.
7364 * opts.c (common_handle_option): Change function argument to
7365 HOST_WIDE_INT. Remove handling of OPT_Walloca_larger_than_ and
7366 OPT_Wvla_larger_than_.
7367 * opts.h (enum cl_var_type): Add an enumerator.
7368 * stor-layout.c (layout_decl): Print a more meaningful warning.
7369 * toplev.c (output_stack_usage): Adjust.
7371 2018-07-20 Qing Zhao <qing.zhao@oracle.com>
7373 * builtins.c (expand_builtin_memcmp): Delete the last parameter for
7374 call to inline_expand_builtin_string_cmp.
7375 (expand_builtin_strcmp): Likewise.
7376 (expand_builtin_strncmp): Likewise.
7377 (inline_string_cmp): Delete the last parameter, change char_type_node
7378 to unsigned_char_type_node for strcmp/strncmp, add conversions to the
7380 (inline_expand_builtin_string_cmp): Delete the last parameter, give up
7381 the inlining expansion on target where the type of the call has same or
7382 narrower precision than unsigned char.
7384 2018-07-20 David Malcolm <dmalcolm@redhat.com>
7386 * Makefile.in (OBJS): Add json.o and optinfo-emit-json.o.
7387 (CFLAGS-optinfo-emit-json.o): Define TARGET_NAME.
7388 * common.opt (fsave-optimization-record): New option.
7389 * coretypes.h (struct kv_pair): Move here from dumpfile.c.
7390 * doc/invoke.texi (-fsave-optimization-record): New option.
7391 * dumpfile.c: Include "optinfo-emit-json.h".
7392 (struct kv_pair): Move to coretypes.h.
7393 (optgroup_options): Make non-static.
7394 (dump_context::end_scope): Call
7395 optimization_records_maybe_pop_dump_scope.
7396 * dumpfile.h (optgroup_options): New decl.
7397 * json.cc: New file.
7399 * optinfo-emit-json.cc: New file.
7400 * optinfo-emit-json.h: New file.
7401 * optinfo.cc: Include "optinfo-emit-json.h".
7402 (optinfo::emit): Call optimization_records_maybe_record_optinfo.
7403 (optinfo_enabled_p): Check optimization_records_enabled_p.
7404 (optinfo_wants_inlining_info_p): Likewise.
7405 * optinfo.h: Update comment.
7406 * profile-count.c (profile_quality_as_string): New function.
7407 * profile-count.h (profile_quality_as_string): New decl.
7408 (profile_count::quality): New accessor.
7409 * selftest-run-tests.c (selftest::run_tests): Call json_cc_tests
7410 and optinfo_emit_json_cc_tests.
7411 * selftest.h (selftest::json_cc_tests): New decl.
7412 (selftest::optinfo_emit_json_cc_tests): New decl.
7413 * toplev.c: Include "optinfo-emit-json.h".
7414 (compile_file): Call optimization_records_finish.
7415 (do_compile): Call optimization_records_start.
7416 * tree-ssa-live.c: Include optinfo.h.
7417 (remove_unused_scope_block_p): Retain inlining information if
7418 optinfo_wants_inlining_info_p returns true.
7420 2018-07-20 Richard Biener <rguenther@suse.de>
7423 * dwarf2out.c (dwarf2out_die_ref_for_decl): Test in_lto_p
7424 to cover -flto-partition=none.
7426 2018-07-20 Martin Liska <mliska@suse.cz>
7428 * tree.h (DECL_LOCATION_RANGE): Remove unused macro.
7429 (get_decl_source_range): Remove unused function.
7431 2018-07-20 Richard Biener <rguenther@suse.de>
7433 * tree-ssa-sccvn.h (struct vn_nary_op_s): Add next member.
7434 (struct vn_phi_s): Likewise.
7435 (struct vn_reference_s): Likewise.
7436 * tree-ssa-sccvn.c (vn_nary_op_hasher::equal): Add shortcut
7437 for searching the slot of an entry known to be in the hash itself.
7438 (vn_phi_hasher::equal): Likewise.
7439 (vn_reference_hasher::equal): Likewise.
7440 (last_inserted_ref, last_inserted_phi, last_inserted_nary): New
7442 (optimistic_info, current_info): Remove, keeping only valid_info.
7443 (vn_reference_lookup_1): Remove fallback lookup.
7444 (vn_reference_lookup_2): Likewise.
7445 (vn_nary_op_lookup_1): Likewise.
7446 (vn_phi_lookup): Likewise.
7447 (vn_nary_build_or_lookup_1): Make sure to not chain the built
7449 (vn_reference_insert): Adjust, chain the inserted hash element
7450 at last_inserted_ref.
7451 (vn_reference_insert_pieces): Likewise.
7452 (visit_reference_op_call): Likewise.
7453 (vn_nary_op_insert_into): Chain the inserted hash element at
7455 (vn_nary_op_insert_pieces): Adjust.
7456 (vn_nary_op_insert): Likewise.
7457 (vn_nary_op_insert_stmt): Likewise.
7458 (vn_phi_insert): Adjust, chain the inserted hash element at
7460 (process_scc): Remove clearing and copying the optimistic
7461 table. Instead remove elements inserted during an optimistic
7462 iteration from the single table we maintain.
7463 (init_scc_vn): Adjust.
7464 (free_scc_vn): Likewise.
7465 (sccvn_dom_walker::record_cond): Likewise.
7466 (sccvn_dom_walker::after_dom_children): Likewise.
7468 2018-07-19 Martin Sebor <msebor@redhat.com>
7470 PR tree-optimization/84047
7471 PR tree-optimization/83776
7472 * tree-vrp.c (vrp_prop::check_mem_ref): New function.
7473 (check_array_bounds): Call it.
7475 2018-07-19 Martin Sebor <msebor@redhat.com>
7477 * align.h (align_flags): Use member initialization.
7479 2018-07-19 David Malcolm <dmalcolm@redhat.com>
7481 * Makefile.in (OBJS): Add optinfo.o.
7482 * coretypes.h (class symtab_node): New forward decl.
7483 (struct cgraph_node): New forward decl.
7484 (class varpool_node): New forward decl.
7485 * dump-context.h: New file.
7486 * dumpfile.c: Include "optinfo.h", "dump-context.h", "cgraph.h",
7488 (refresh_dumps_are_enabled): Use optinfo_enabled_p.
7489 (set_dump_file): Call dumpfile_ensure_any_optinfo_are_flushed.
7490 (set_alt_dump_file): Likewise.
7491 (dump_context::~dump_context): New dtor.
7492 (dump_gimple_stmt): Move implementation to...
7493 (dump_context::dump_gimple_stmt): ...this new member function.
7494 Add the stmt to any pending optinfo, creating one if need be.
7495 (dump_gimple_stmt_loc): Move implementation to...
7496 (dump_context::dump_gimple_stmt_loc): ...this new member function.
7497 Start a new optinfo and add the stmt to it.
7498 (dump_gimple_expr): Move implementation to...
7499 (dump_context::dump_gimple_expr): ...this new member function.
7500 Add the stmt to any pending optinfo, creating one if need be.
7501 (dump_gimple_expr_loc): Move implementation to...
7502 (dump_context::dump_gimple_expr_loc): ...this new member function.
7503 Start a new optinfo and add the stmt to it.
7504 (dump_generic_expr): Move implementation to...
7505 (dump_context::dump_generic_expr): ...this new member function.
7506 Add the tree to any pending optinfo, creating one if need be.
7507 (dump_generic_expr_loc): Move implementation to...
7508 (dump_context::dump_generic_expr_loc): ...this new member
7509 function. Add the tree to any pending optinfo, creating one if
7511 (dump_printf): Move implementation to...
7512 (dump_context::dump_printf_va): ...this new member function. Add
7513 the text to any pending optinfo, creating one if need be.
7514 (dump_printf_loc): Move implementation to...
7515 (dump_context::dump_printf_loc_va): ...this new member function.
7516 Start a new optinfo and add the stmt to it.
7517 (dump_dec): Move implementation to...
7518 (dump_context::dump_dec): ...this new member function. Add the
7519 value to any pending optinfo, creating one if need be.
7520 (dump_context::dump_symtab_node): New member function.
7521 (dump_context::get_scope_depth): New member function.
7522 (dump_context::begin_scope): New member function.
7523 (dump_context::end_scope): New member function.
7524 (dump_context::ensure_pending_optinfo): New member function.
7525 (dump_context::begin_next_optinfo): New member function.
7526 (dump_context::end_any_optinfo): New member function.
7527 (dump_context::s_current): New global.
7528 (dump_context::s_default): New global.
7529 (dump_scope_depth): Delete global.
7530 (dumpfile_ensure_any_optinfo_are_flushed): New function.
7531 (dump_symtab_node): New function.
7532 (get_dump_scope_depth): Reimplement in terms of dump_context.
7533 (dump_begin_scope): Likewise.
7534 (dump_end_scope): Likewise.
7535 (selftest::temp_dump_context::temp_dump_context): New ctor.
7536 (selftest::temp_dump_context::~temp_dump_context): New dtor.
7537 (selftest::verify_item): New function.
7538 (ASSERT_IS_TEXT): New macro.
7539 (ASSERT_IS_TREE): New macro.
7540 (ASSERT_IS_GIMPLE): New macro.
7541 (selftest::test_capture_of_dump_calls): New test.
7542 (selftest::dumpfile_c_tests): Call it.
7543 * dumpfile.h (dump_printf, dump_printf_loc, dump_basic_block)
7544 (dump_generic_expr_loc, dump_generic_expr, dump_gimple_stmt_loc)
7545 (dump_gimple_stmt, dump_dec): Gather these related decls and add a
7546 descriptive comment.
7547 (dump_function, print_combine_total_stats, enable_rtl_dump_file)
7548 (dump_node, dump_bb): Move these unrelated decls.
7549 (class dump_manager): Add leading comment.
7550 * optinfo.cc: New file.
7551 * optinfo.h: New file.
7553 2018-07-19 Michael Collison <michael.collison@arm.com>
7554 Richard Henderson <rth@redhat.com>
7556 * config/aarch64/aarch64.md (subv<GPI>4, usubv<GPI>4): New patterns.
7557 (subti): Handle op1 zero.
7558 (subvti4, usub4ti4): New.
7559 (*sub<GPI>3_compare1_imm): New.
7560 (sub<GPI>3_carryinCV): New.
7561 (*sub<GPI>3_carryinCV_z1_z2, *sub<GPI>3_carryinCV_z1): New.
7562 (*sub<GPI>3_carryinCV_z2, *sub<GPI>3_carryinCV): New.
7564 2018-07-19 Michael Collison <michael.collison@arm.com>
7565 Richard Henderson <rth@redhat.com>
7567 * config/aarch64/aarch64.md: (addv<GPI>4, uaddv<GPI>4): New.
7568 (addti3): Create simpler code if low part is already known to be 0.
7569 (addvti4, uaddvti4): New.
7570 (*add<GPI>3_compareC_cconly_imm): New.
7571 (*add<GPI>3_compareC_cconly): New.
7572 (*add<GPI>3_compareC_imm): New.
7573 (*add<GPI>3_compareC): Rename from add<GPI>3_compare1; do not
7574 handle constants within this pattern..
7575 (*add<GPI>3_compareV_cconly_imm): New.
7576 (*add<GPI>3_compareV_cconly): New.
7577 (*add<GPI>3_compareV_imm): New.
7578 (add<GPI>3_compareV): New.
7579 (add<GPI>3_carryinC, add<GPI>3_carryinV): New.
7580 (*add<GPI>3_carryinC_zero, *add<GPI>3_carryinV_zero): New.
7581 (*add<GPI>3_carryinC, *add<GPI>3_carryinV): New.
7582 ((*add<GPI>3_compareC_cconly_imm): Replace 'ne' operator
7583 with 'comparison' operator.
7584 (*add<GPI>3_compareV_cconly_imm): Ditto.
7585 (*add<GPI>3_compareV_cconly): Ditto.
7586 (*add<GPI>3_compareV_imm): Ditto.
7587 (add<GPI>3_compareV): Ditto.
7588 (add<mode>3_carryinC): Ditto.
7589 (*add<mode>3_carryinC_zero): Ditto.
7590 (*add<mode>3_carryinC): Ditto.
7591 (add<mode>3_carryinV): Ditto.
7592 (*add<mode>3_carryinV_zero): Ditto.
7593 (*add<mode>3_carryinV): Ditto.
7595 2018-07-19 Michael Collison <michael.collison@arm.com>
7596 Richard Henderson <rth@redhat.com>
7598 * config/aarch64/aarch64-modes.def (CC_V): New.
7599 * config/aarch64/aarch64-protos.h
7600 (aarch64_addti_scratch_regs): Declare
7601 (aarch64_subvti_scratch_regs): Declare.
7602 (aarch64_expand_subvti): Declare.
7603 (aarch64_gen_unlikely_cbranch): Declare
7604 * config/aarch64/aarch64.c (aarch64_select_cc_mode): Test
7605 for signed overflow using CC_Vmode.
7606 (aarch64_get_condition_code_1): Handle CC_Vmode.
7607 (aarch64_gen_unlikely_cbranch): New function.
7608 (aarch64_addti_scratch_regs): New function.
7609 (aarch64_subvti_scratch_regs): New function.
7610 (aarch64_expand_subvti): New function.
7612 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
7614 * config/aarch64/aarch64-option-extensions.def: New entry for profile
7616 * config/aarch64/aarch64.h (AARCH64_FL_PROFILE): New.
7617 * doc/invoke.texi (aarch64-feature-modifiers): New entry for profile
7620 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
7623 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
7624 address check not strict.
7626 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
7628 * config/aarch64/aarch64-simd.md (aarch64_simd_mov<VQ:mode>): Replace
7630 (store_pair_lanes<mode>): Likewise.
7631 * config/aarch64/aarch64-protos.h (aarch64_addr_query_type): Add new
7632 enum value 'ADDR_QUERY_LDP_STP_N'.
7633 * config/aarch64/aarch64.c (aarch64_addr_query_type): Likewise.
7634 (aarch64_print_address_internal): Add declaration.
7635 (aarch64_print_ldpstp_address): Remove.
7636 (aarch64_classify_address): Adapt mode for 'ADDR_QUERY_LDP_STP_N'.
7637 (aarch64_print_operand): Change printing of 'y'.
7638 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Use
7639 new enum value 'ADDR_QUERY_LDP_STP_N', don't hardcode mode and use
7640 'true' rather than '1'.
7641 * config/aarch64/constraints.md (Uml): Likewise.
7642 (Uml): Rename to Umn.
7645 2018-07-19 Richard Biener <rguenther@suse.de>
7647 * tree-ssa-sccvn.h (struct vn_phi_s): Make phiargs member
7649 * tree-ssa-sccvn.c: Remove alloc-pool.h use.
7650 (vn_phi_hasher): Derive from nofree_ptr_hash and remove remove method.
7651 (vn_reference_hasher): Likewise.
7652 (struct vn_tables_s): Remove obstack and alloc-pool members.
7653 (vn_tables_obstack, vn_tables_insert_obstack): New global obstacks.
7654 (vn_nary_build_or_lookup_1): Manually build in vn_tables_insert_obstack.
7655 (vn_reference_insert): Allocate from obstack instead of from alloc-pool.
7656 (vn_reference_insert_pieces): Likewise.
7657 (alloc_vn_nary_op_noinit): Adjust.
7658 (vn_nary_op_insert_stmt): Allocate phiargs in-place.
7659 (vn_phi_eq): Adjust.
7660 (shared_lookup_phiargs): Remove.
7661 (vn_phi_lookup): Allocate temporary vn_phi_s on the stack.
7662 (vn_phi_insert): Allocate from obstack instead of from alloc-pool.
7663 (visit_reference_op_call): Likewise.
7664 (copy_nary, copy_phi, copy_reference): Remove.
7665 (process_scc): Rewind the obstack when iterating. Do not
7666 copy the elements to valid_info but just move them from one
7667 hashtable to the other.
7668 (allocate_vn_table): Adjust.
7669 (free_vn_table): Likewise.
7670 (init_scc_vn): Likewise.
7671 (free_scc_vn): Likewise.
7673 2018-07-19 H.J. Lu <hongjiu.lu@intel.com>
7676 * config/i386/i386.c (rest_of_insert_endbranch): Lookup
7677 indirect_return as function type attribute.
7678 (ix86_attribute_table): Change indirect_return to function
7680 * doc/extend.texi: Update indirect_return attribute.
7682 2018-07-19 Aldy Hernandez <aldyh@redhat.com>
7684 * wide-int.h (widest2_int): New.
7685 * gimple-fold.c (arith_overflowed_p): Use it.
7686 * tree.h (widest2_int_cst): New.
7687 * tree-vrp.c (wide_int_binop_overflow): Rename from
7688 vrp_int_const_binop.
7689 Rewrite to work on trees.
7690 (extract_range_from_multiplicative_op_1): Abstract code to...
7691 (wide_int_range_min_max): ...here.
7692 (wide_int_range_cross_product): ...and here.
7693 (extract_range_from_binary_expr_1): Abstract overflow code to...
7694 (wide_int_range_mult_wrapping): ...here.
7695 * tree-vrp.h (wide_int_range_cross_product): New.
7696 (wide_int_range_mult_wrapping): New.
7698 2018-07-19 Andrew Senkevich <andrew.senkevich@intel.com>
7699 Julia Koval <julia.koval@intel.com>
7701 * config/i386/x86-tune-costs.h (skylake_memcpy,
7702 skylake_memset): Replace rep_prefix with unrolling for size 512.
7704 2018-07-18 Kugan Vivekanandarajah <kuganv@linaro.org>
7707 * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): Handle
7708 comparision with EQ_EXPR in last stmt.
7710 2018-07-18 Kelvin Nilsen <kelvin@gcc.gnu.org>
7712 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Rename
7713 this subsection to "PowerPC AltiVec/VSX Built-in Functions".
7714 (PowerPC AltiVec/VSX Built-in Functions): New name for subsection
7715 previously known as "PowerPC AltiVec Built-in Functions". Move
7716 some material to new subsubsections "PowerPC AltiVec Built-in
7717 Functions on ISA 2.06" and "PowerPC AltiVec Built-in Functions on
7719 (PowerPC Altivec Built-in Functions on ISA 2.05): New subsubsection.
7720 (PowerPC Altivec Built-in Functions on ISA 2.06): Likewise.
7721 (PowerPC Altivec Built-in Functions on ISA 2.07): Likewise.
7722 (PowerPC Altivec Built-in Functions on ISA 3.0): Likewise.
7724 2018-07-18 Richard Biener <rguenther@suse.de>
7726 PR tree-optimization/86557
7727 * tree-vect-patterns.c (vect_recog_divmod_pattern): Also handle
7730 2018-07-18 Ilya Leoshkevich <iii@linux.ibm.com>
7732 * config/s390/s390.c (s390_function_profiler): Generate CFI.
7734 2018-07-17 Jeff Law <law@redhat.com>
7736 * config/arm/arm.c (get_label_padding): Update for recent
7737 changes to label_to_alignment.
7739 PR tree-optimization/86010
7740 * tree-ssa-dse.c (compute_trims): Fix typo/thinko.
7742 * config/mips/mips.c (vr4130_align_insns): Update for recent
7743 changes to label_to_alignment.
7745 * config/frv/frv.c (frv_label_align): Update for recent changes
7746 to label_to_alignment.
7748 * config/nios2/nios2.c (nios2_label_align): Update for recent
7749 changes which dropped ALIGN_LABELS_LOG.
7751 2018-07-17 Andreas Schwab <schwab@linux-m68k.org>
7753 * config/m68k/m68k.md (umulsi3_highpart+1, const_umulsi3_highpart)
7754 (smulsi3_highpart+1, const_smulsi3_highpart): Add CC_STATUS_INIT.
7756 2018-07-17 Claudiu Zissulescu <claziss@synopsys.com>
7758 * config/arc/arc.c (arc_label_align): Use align_labels instead of
7759 deprecated align_labels_log.
7761 2018-07-17 Richard Biener <rguenther@suse.de>
7764 * dwarf2out.c (init_sections_and_labels): Always generate
7765 a debug_line_str_section for early LTO debug.
7766 (dwarf2out_finish): Reset debug_line_str_hash output early.
7767 Bump counter for extra dwarf5 .debug_loc labels to not conflict
7769 (dwarf2out_early_finish): Output debug_line_str.
7771 2018-07-17 Robin Dapp <rdapp@linux.ibm.com>
7773 * config/s390/s390.c (preferred_la_operand_p): Do not use LA with
7774 index register on z196 or later.
7776 2018-07-17 Robin Dapp <rdapp@linux.ibm.com>
7778 * config/s390/s390.c (s390_default_align): Set default function
7780 (s390_override_options_after_change): Call s390_default align.
7781 (s390_option_override_internal): Call s390_default_align.
7782 (TARGET_OVERRIDE_OPTIONS_AFTER_CHANGE): Define.
7784 2018-07-17 Jakub Jelinek <jakub@redhat.com>
7787 * omp-low.c (create_task_copyfn): Copy over also fields corresponding
7788 to _looptemp_ clauses, other than the first two.
7790 2018-07-17 Martin Liska <mliska@suse.cz>
7792 * opts.c: Do not enable OPT_falign_* for -Os.
7794 2018-07-17 Martin Liska <mliska@suse.cz>
7796 * align.h (MAX_CODE_ALIGN): New.
7797 (MAX_CODE_ALIGN_VALUE): New.
7798 * common/config/i386/i386-common.c (ix86_handle_option):
7799 (MAX_CODE_ALIGN): Moved to align.h.
7800 * final.c (MAX_CODE_ALIGN): Likewise.
7801 * opts.c (parse_and_check_align_values):
7802 (MAX_CODE_ALIGN): Likewise.
7803 (MAX_CODE_ALIGN_VALUE): Likewise.
7805 2018-07-17 Martin Liska <mliska@suse.cz>
7807 * config/i386/att.h (ASM_OUTPUT_ALIGN): Fix spacing
7808 in order to fulfil coding style.
7809 * config/i386/cygming.h (ASM_OUTPUT_ALIGN): Likewise.
7810 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
7811 * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
7812 * config/iq2000/iq2000.h (ASM_OUTPUT_ALIGN): Likewise.
7813 * config/pa/pa.h (ASM_OUTPUT_ALIGN): Likewise.
7814 * config/sparc/sol2.h (ASM_OUTPUT_ALIGN_WITH_NOP): Likewise.
7815 * config/sparc/sparc.h (ASM_OUTPUT_ALIGN): Likewise.
7816 * config/visium/visium.h (ASM_OUTPUT_ALIGN): Likewise.
7817 (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
7819 2018-07-17 Martin Liska <mliska@suse.cz>
7821 * align.h: New file.
7822 * config/alpha/alpha.c (alpha_align_insns_1): Use align_functions
7824 * config/i386/i386.c (ix86_avoid_jump_mispredicts): Use new return type
7825 align_flags of label_to_alignment.
7826 * config/m32r/m32r.h (LOOP_ALIGN): Wrap returned values into
7828 * config/m68k/m68k.c: Do not use removed align_labels_value and
7830 * config/nds32/nds32.h (JUMP_ALIGN): Wrap result into align_flags class.
7831 (LOOP_ALIGN): Likewise.
7832 (LABEL_ALIGN): Likewise.
7833 * config/powerpcspe/powerpcspe.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
7834 Remove not used macro.
7835 (rs6000_loop_align): Change return type to align_flags.
7836 (rs6000_loop_align_max_skip): Remove.
7837 * config/rs6000/rs6000-protos.h (rs6000_loop_align):
7838 Change return type to align_flags.
7839 * config/rs6000/rs6000.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
7840 Remove not used macro.
7841 (rs6000_loop_align): Change return type to align_flags.
7842 (rs6000_loop_align_max_skip): Remove.
7843 * config/rx/rx.h (JUMP_ALIGN): Wrap integer values
7844 * config/rx/rx-protos.h (rx_align_for_label): Make it
7846 * config/rx/rx.c (rx_align_for_label): Change return type
7848 (rx_max_skip_for_label): Remove TARGET_ASM_*_ALIGN_MAX_SKIP
7850 into align_flags class.
7851 (LABEL_ALIGN): Likewise.
7852 (LOOP_ALIGN): Likewise.
7853 * config/s390/s390.c (s390_label_align): Use align_flags
7855 (s390_asm_output_function_label): Likewise.
7856 * config/sh/sh.c (sh_override_options_after_change):
7857 Use align_flags class directly without macros.
7858 (find_barrier): Likewise.
7859 (barrier_align): Likewise.
7860 (sh_loop_align): Likewise.
7861 * config/spu/spu.c (spu_option_override):
7862 Use align_flags_tuple::get_value instead of removed macros.
7863 (spu_sched_init): Likewise.
7864 * config/spu/spu.h (GTY): Likewise.
7865 * config/visium/visium.c (visium_option_override):
7866 Set "8" as default secondary alignment.
7867 * config/visium/visium.h (SUBALIGN_LOG): Define to 3
7868 in order to guarantee secondary alignment of 8.
7869 * coretypes.h: Include align.h header file.
7870 * doc/tm.texi: Remove TARGET_ASM_JUMP_ALIGN_MAX_SKIP,
7871 TARGET_ASM_LOOP_ALIGN_MAX_SKIP, TARGET_ASM_LABEL_ALIGN_MAX_SKIP
7872 and TARGET_ASM_LABEL_ALIGN_AFTER_BARRIER_MAX_SKIP macros.
7873 * doc/tm.texi.in: Likewise.
7874 * final.c (struct label_alignment): Remove not used structure.
7875 (LABEL_ALIGN): Change type to align_flags.
7876 (LOOP_ALIGN): Likewise.
7877 (JUMP_ALIGN): Likewise.
7878 (default_loop_align_max_skip): Remove.
7879 (default_label_align_max_skip): Likewise.
7880 (default_jump_align_max_skip): Likewise.
7881 (default_label_align_after_barrier_max_skip):
7882 (LABEL_TO_ALIGNMENT): Change to access label_align vector.
7883 (LABEL_TO_MAX_SKIP): Remove.
7884 (label_to_alignment): Return align_flags type instead of integer.
7885 (label_to_max_skip): Remove.
7886 (align_fuzz): Use align_flags type.
7887 (compute_alignments): Use align_flags type and use align_flags::max
7888 to combine multiple alignments.
7889 (grow_label_align): Grow vec instead of C array.
7890 (update_alignments): Assign just LABEL_TO_ALIGNMENT.
7891 (shorten_branches): Use align_flags type and use align_flags::max
7892 to combine multiple alignments.
7893 (final_scan_insn_1): Remove usage of secondary alignment that comes
7894 from label alignment, but instead use proper secondary alignment
7895 which is computed in grow_label_align.
7896 * flags.h (struct align_flags_tuple): Move to align.h.
7897 (struct align_flags): Likewise.
7898 (state_align_loops): Rename to align_loops.
7899 (state_align_jumps): Rename to align_jumps.
7900 (state_align_labels): Rename to align_labels.
7901 (state_align_functions): Rename to align_functions.
7902 (align_loops_log): Remove.
7903 (align_jumps_log): Remove.
7904 (align_labels_log): Remove.
7905 (align_functions_log): Remove.
7906 (align_loops_max_skip): Remove.
7907 (align_jumps_max_skip): Remove.
7908 (align_labels_max_skip): Remove.
7909 (align_functions_max_skip): Remove.
7910 (align_loops_value): Remove.
7911 (align_jumps_value): Remove.
7912 (align_labels_value): Remove.
7913 (align_functions_value): Remove.
7914 * output.h (label_to_alignment): Change return type to align_flags.
7915 (label_to_max_skip): Remove.
7916 * target.def: Remove loop_align_max_skip, label_align_max_skip,
7917 jump_align_max_skip macros.
7918 * targhooks.h (default_loop_align_max_skip): Remove.
7919 (default_label_align_max_skip): Likewise.
7920 (default_jump_align_max_skip): Likewise.
7921 (default_label_align_after_barrier_max_skip): Remove.
7922 * toplev.c (read_log_maxskip): Use ::normalize function.
7923 (parse_N_M): Remove not used argument and also call ::normalize.
7924 (parse_alignment_opts): Do not pass unused arguments.
7925 * varasm.c (assemble_start_function): Use directly align_functions
7926 instead of removed macros.
7927 * system.h: Do not poison removed macros.
7929 2018-07-17 Jakub Jelinek <jakub@redhat.com>
7932 * gimplify.c (gimplify_omp_for): Ensure taskloop firstprivatized init
7933 and cond temporaries don't have reference type if iterator has
7934 pointer type. For init use &for_pre_body instead of pre_p if
7935 for_pre_body is non-empty.
7937 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
7939 * config/rs6000/rs6000.md (trunc<mode>sf2): Expand truncates of
7940 double-double modes to SFmode directly directly.
7941 (trunc<mode>sf2_fprs): Delete.
7943 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
7945 * config/rs6000/rs6000.c (init_float128_ibm): Use the correct names
7946 for conversions between IFmode and the decimal floating point modes.
7947 (init_float128_ieee): Use the correct names for conversions between
7948 KFmode and the decimal floating point modes.
7950 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
7952 * config/rs6000/rs6000.c (init_float128_ibm): Use more correct names
7953 for the conversions between TDmode and IFmode.
7954 (init_float128_ieee): Use more correct names for the conversions
7955 between TDmode and KFmode.
7957 2018-07-16 Jakub Jelinek <jakub@redhat.com>
7959 PR tree-optimization/86526
7960 * builtins.c (expand_builtin_memcmp): Formatting fixes.
7961 (inline_expand_builtin_string_cmp): Likewise.
7962 (inline_string_cmp): Likewise. Use c_readstr instead of
7963 builtin_memcpy_read_str. Add unit_mode temporary.
7965 2018-07-16 Bernd Edlinger <bernd.edlinger@hotmail.de>
7968 * builtins.c (check_access): Bail out if range[0] is no INTEGER_CST.
7969 * expr.c (string_constant): Fix the element size of ARRAY_TYPE.
7971 2018-07-16 Kelvin Nilsen <kelvin@gcc.gnu.org>
7973 * doc/extend.texi (PowerPC AltiVec Built-in Functions):
7974 Alphabetize prototypes of built-in functions, separating out
7975 built-in functions that are listed in this section but should be
7976 described elsewhere.
7978 2018-07-16 Uros Bizjak <ubizjak@gmail.com>
7981 * expmed.c (emit_store_flag): Do not emit setcc followed by a
7982 conditional move when trapping comparison was split to a
7983 non-trapping one (and vice versa).
7985 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
7987 * config/s390/s390.c (s390_function_profiler): Generate nops
7988 instead of profiler call sequences.
7989 * config/s390/s390.opt: Add the new option.
7991 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
7993 * config/s390/s390.c (s390_function_profiler): Generate
7994 __mcount_loc section.
7995 * config/s390/s390.opt: Add the new option.
7997 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
7999 * common.opt: Add the new warning.
8000 * config/s390/s390.c (s390_function_profiler): Emit "brasl
8001 %r0,__fentry__" when -mfentry is specified.
8002 (s390_option_override_internal): Disallow -mfentry for 31-bit
8004 * config/s390/s390.opt: Add the new option.
8006 2018-07-16 Richard Biener <rguenther@suse.de>
8009 * dwarf2out.c (dwarf2out_register_external_die): Assign DIE parents
8010 for function-local FUNCTION_DECL and RESULT_DECL immediately.
8012 2018-07-16 Martin Liska <mliska@suse.cz>
8015 * ipa-pure-const.c (malloc_candidate_p): Revert ::get
8018 2017-07-16 Claudiu Zissulescu <claziss@synopsys.com>
8020 * config/arc/arcHS.md: Update ARCHS scheduling rules.
8022 2017-07-16 Claudiu Zissulescu <claziss@synopsys.com>
8024 * config/arc/arc-arch.h (arc_tune_attr): Add new tune parameters
8026 * config/arc/arc-cpus.def (hs4x): New cpu.
8028 * config/arc/arc-tables.opt: Regenerate.
8029 * config/arc/arc.c (arc_sched_issue_rate): New function.
8030 (TARGET_SCHED_ISSUE_RATE): Define.
8031 (TARGET_SCHED_EXPOSED_PIPELINE): Likewise.
8032 * config/arc/arc.md (attr type): Add fpu_fuse, fpu_sdiv, fpu_ddiv,
8034 (attr tune): Add ARCHS4x tune values.
8035 (attr tune_dspmpy): Define.
8036 (*tst): Correct instruction type.
8037 * config/arc/arcHS.md: Don't use this automaton for ARCHS4x cpus.
8038 * config/arc/arcHS4x.md: New file.
8039 * config/arc/fpu.md: Update instruction type attributes.
8040 * config/arc/t-multilib: Regenerate.
8042 2018-07-16 Tom de Vries <tdevries@suse.de>
8045 * var-tracking.c (vt_initialize): Fix pre_dec handling.
8047 2018-07-16 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
8049 * config/aarch64/atomics.md (aarch64_store_execlusive<mode>): Add
8052 2018-07-16 Eric Botcazou <ebotcazou@adacore.com>
8054 PR tree-optimization/86514
8055 * tree-ssa-reassoc.c (init_range_entry) <CASE_CONVERT>: Return for a
8056 conversion to a boolean type from a type with greater precision.
8058 2018-07-16 Tom de Vries <tdevries@suse.de>
8060 * var-tracking.c (vt_initialize): Print adjusted insn slim if
8061 dump_flags request TDF_SLIM.
8063 2018-07-16 Aldy Hernandez <aldyh@redhat.com>
8065 * fold-const.c (int_const_binop_1): Abstract...
8066 (wide_int_binop): ...wide int code here.
8067 (poly_int_binop): ...poly int code here.
8068 Abstract the rest of int_const_binop_1 into int_const_binop.
8069 * fold-const.h (wide_int_binop): New.
8070 * tree-vrp.c (vrp_int_const_binop): Call wide_int_binop.
8071 Remove useless PLUS/MINUS_EXPR case.
8072 (zero_nonzero_bits_from_vr): Move wide int code...
8073 (zero_nonzero_bits_from_bounds): ...here.
8074 (extract_range_from_binary_expr_1): Move mask optimization code...
8075 (range_easy_mask_min_max): ...here.
8076 * tree-vrp.h (zero_nonzero_bits_from_bounds): New.
8077 (range_easy_mask_min_max): New.
8079 2018-07-15 Jeff Law <law@redhat.com>
8082 * config/sh/sh.c (output_mi_thunk): Remove dead conditional
8085 2018-07-14 Jim Wilson <jimw@sifive.com>
8087 * config/riscv/linux.h (TARGET_ASM_FILE_END): New.
8089 2018-07-14 Paul Koning <ni1d@arrl.net>
8091 * config/pdp11/pdp11.c (pdp11_rtx_costs): Bugfixes.
8093 2018-07-13 Jan Hubicka <hubicka@ucw.cz>
8095 * lto-streamer-out.c (copy_function_or_variable): Dump info about
8098 2018-07-13 Bill Schmidt <wschmidt@linux.ibm.com>
8099 Steve Munroe <munroesj52@gmail.com>
8101 * config/rs6000/emmintrin.h (_mm_and_si128): New function.
8102 (_mm_andnot_si128): Likewise.
8103 (_mm_or_si128): Likewise.
8104 (_mm_xor_si128): Likewise.
8106 2018-07-13 Qing Zhao <qing.zhao@oracle.com>
8109 * builtins.c (expand_builtin_memcmp): Inline the calls first
8110 when result_eq is false.
8111 (expand_builtin_strcmp): Inline the calls first.
8112 (expand_builtin_strncmp): Likewise.
8113 (inline_string_cmp): New routine. Expand a string compare
8114 call by using a sequence of char comparison.
8115 (inline_expand_builtin_string_cmp): New routine. Inline expansion
8116 a call to str(n)cmp/memcmp.
8117 * doc/invoke.texi (--param builtin-string-cmp-inline-length):
8119 * params.def (BUILTIN_STRING_CMP_INLINE_LENGTH): New.
8121 2018-07-13 Richard Earnshaw <rearnsha@arm.com>
8123 * config/arm/driver-arm.c: Include arm-native.h.
8124 (host_detect_local_cpu): Use auto-generated data tables.
8125 (vendors, arm_cpu_table): Delete. Move part information to ...
8126 * config/arm/arm-cpus.in: ... here.
8127 * config/arm/parsecpu.awk (gen_native): New function.
8128 (vendor, part): New CPU fields.
8129 (END): Add support for building the native CPU detection tables.
8130 * config/arm/t-arm (arm-native.h): Add build rule.
8131 (driver-arm.o): Add dependency on arm-native.h.
8133 2018-07-13 Richard Biener <rguenther@suse.de>
8136 * match.pd (addr1 - addr2): Allow either of the operand to
8139 2018-07-13 Tom de Vries <tdevries@suse.de>
8141 * tree-inline.c (remap_ssa_name): Save and reuse debug exprs generated
8144 2018-07-13 Jackson Woodruff <jackson.woodruff@arm.com>
8146 * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp): Use
8147 arrays instead of numbered variables.
8149 2018-07-13 Eric Botcazou <ebotcazou@adacore.com>
8151 * config/sparc/sparc-protos.h (sparc_compute_frame_size): Delete.
8152 * config/sparc/sparc.c (sparc_compute_frame_size): Make static.
8154 2018-07-13 Richard Biener <rguenther@suse.de>
8157 * dwarf2out.c (gen_type_die_with_usage): Use scope_die_for
8158 instead of get_context_die.
8160 2018-07-13 Kugan Vivekanandarajah <kuganv@linaro.org>
8161 Richard Biener <rguenther@suse.de>
8164 * tree-ssa-loop-niter.c (number_of_iterations_popcount): Check
8165 that the loop latch destination where phi is defined.
8167 2018-07-12 Kito Cheng <kito.cheng@gmail.com>
8169 * config/riscv/riscv.c (enum riscv_privilege_levels): Add UNKNOWN_MODE.
8170 (riscv_expand_epilogue): Add assertion to check interrupt mode.
8171 (riscv_set_current_function): Extract getting interrupt type to new
8173 (riscv_get_interrupt_type): New function.
8174 (riscv_merge_decl_attributes): New function, checking interrupt type is
8176 (TARGET_MERGE_DECL_ATTRIBUTES): Define.
8178 2018-07-12 Paul Koning <ni1d@arrl.net>
8180 * config/pdp11/pdp11.c (pdp11_output_def): Fix typo in .set
8183 2018-07-12 Paul Koning <ni1d@arrl.net>
8185 * doc/rtl.texi (REG_NONNEG): Remove decrement and branch until
8186 zero reference, add doloop_end instead.
8187 * doc/md.texi (decrement_and_branch_until_zero): Remove.
8188 (Looping patterns): Remove decrement_and_branch_until_zero. Add
8189 detail for doloop_end.
8191 2018-07-12 Martin Sebor <msebor@redhat.com>
8194 * attribs.c (decl_attributes): Reject conflicting attributes before
8195 calling attribute handlers.
8197 2018-07-12 Jan Hubicka <hubicka@ucw.cz>
8199 * dumpfile.c (gcc::dump_manager::get_dump_file_name): Add PART
8201 (gcc::dump_manager::get_dump_file_name): likewise.
8202 (dump_begin): Likewise.
8203 * dumpfile.h (dump_begin): Update prototype.
8204 (gcc::dump_manager::get_dump_file_name,
8205 gcc::dump_manager::get_dump_file_name): Update prototype.
8207 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
8209 * internal-fn.h (vectorizable_internal_fn_p): New function.
8210 * tree-vect-slp.c (compatible_calls_p): Likewise.
8211 (vect_build_slp_tree_1): Remove nops argument. Handle calls
8212 to internal functions.
8213 (vect_build_slp_tree_2): Update call to vect_build_slp_tree_1.
8215 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
8217 * fold-const.h (inverse_conditions_p): Declare.
8218 * fold-const.c (inverse_conditions_p): New function.
8219 * match.pd: Use inverse_conditions_p. Add folds of view_converts
8220 that test the inverse condition of a conditional internal function.
8221 * internal-fn.h (vectorized_internal_fn_supported_p): Declare.
8222 * internal-fn.c (internal_fn_mask_index): Handle conditional
8224 (vectorized_internal_fn_supported_p): New function.
8225 * tree-if-conv.c: Include internal-fn.h and fold-const.h.
8226 (any_pred_load_store): Replace with...
8227 (need_to_predicate): ...this new variable.
8228 (redundant_ssa_names): New variable.
8229 (ifcvt_can_use_mask_load_store): Move initial checks to...
8230 (ifcvt_can_predicate): ...this new function. Handle tree codes
8231 for which a conditional internal function exists.
8232 (if_convertible_gimple_assign_stmt_p): Use ifcvt_can_predicate
8233 instead of ifcvt_can_use_mask_load_store. Update after variable
8235 (predicate_load_or_store): New function, split out from
8236 predicate_mem_writes.
8237 (check_redundant_cond_expr): New function.
8238 (value_available_p): Likewise.
8239 (predicate_rhs_code): Likewise.
8240 (predicate_mem_writes): Rename to...
8241 (predicate_statements): ...this. Use predicate_load_or_store
8242 and predicate_rhs_code.
8243 (combine_blocks, tree_if_conversion): Update after above name changes.
8244 (ifcvt_local_dce): Handle redundant_ssa_names.
8245 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): Handle
8246 general conditional functions.
8247 * tree-vect-stmts.c (vectorizable_call): Likewise.
8249 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
8250 Alan Hayward <alan.hayward@arm.com>
8251 David Sherwood <david.sherwood@arm.com>
8253 * internal-fn.h (can_interpret_as_conditional_op_p): Declare.
8254 * internal-fn.c (can_interpret_as_conditional_op_p): New function.
8255 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Handle conditional
8256 plus and minus and convert them into IFN_COND_FMA-based sequences.
8257 (convert_mult_to_fma): Handle conditional plus and minus.
8259 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
8261 * doc/md.texi (cond_fma, cond_fms, cond_fnma, cond_fnms): Document.
8262 * optabs.def (cond_fma_optab, cond_fms_optab, cond_fnma_optab)
8263 (cond_fnms_optab): New optabs.
8264 * internal-fn.def (COND_FMA, COND_FMS, COND_FNMA, COND_FNMS): New
8266 (FMA): Use DEF_INTERNAL_FLT_FN rather than DEF_INTERNAL_FLT_FLOATN_FN.
8267 * internal-fn.h (get_conditional_internal_fn): Declare.
8268 (get_unconditional_internal_fn): Likewise.
8269 * internal-fn.c (cond_ternary_direct): New macro.
8270 (expand_cond_ternary_optab_fn): Likewise.
8271 (direct_cond_ternary_optab_supported_p): Likewise.
8272 (FOR_EACH_COND_FN_PAIR): Likewise.
8273 (get_conditional_internal_fn): New function.
8274 (get_unconditional_internal_fn): Likewise.
8275 * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 5.
8276 (gimple_match_op::gimple_match_op): Add a new overload for 5
8278 (gimple_match_op::set_op): Likewise.
8279 (gimple_resimplify5): Declare.
8280 * genmatch.c (decision_tree::gen): Generate simplifications for
8282 * gimple-match-head.c (gimple_simplify): Define an overload for
8283 5 operands. Handle calls with 5 arguments in the top-level overload.
8284 (convert_conditional_op): Handle conversions from unconditional
8285 internal functions to conditional ones.
8286 (gimple_resimplify5): New function.
8287 (build_call_internal): Pass a fifth operand.
8288 (maybe_push_res_to_seq): Likewise.
8289 (try_conditional_simplification): Try converting conditional
8290 internal functions to unconditional internal functions.
8291 Handle 3-operand unconditional forms.
8292 * match.pd (UNCOND_TERNARY, COND_TERNARY): Operator lists.
8293 Define ternary equivalents of the current rules for binary conditional
8295 * config/aarch64/aarch64.c (aarch64_preferred_else_value): Handle
8297 * config/aarch64/iterators.md (UNSPEC_COND_FMLA, UNSPEC_COND_FMLS)
8298 (UNSPEC_COND_FNMLA, UNSPEC_COND_FNMLS): New unspecs.
8299 (optab): Handle them.
8300 (SVE_COND_FP_TERNARY): New int iterator.
8301 (sve_fmla_op, sve_fmad_op): New int attributes.
8302 * config/aarch64/aarch64-sve.md (cond_<optab><mode>)
8303 (*cond_<optab><mode>_2, *cond_<optab><mode_4)
8304 (*cond_<optab><mode>_any): New SVE_COND_FP_TERNARY patterns.
8306 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
8308 * target.def (preferred_else_value): New target hook.
8309 * doc/tm.texi.in (TARGET_PREFERRED_ELSE_VALUE): New hook.
8310 * doc/tm.texi: Regenerate.
8311 * targhooks.h (default_preferred_else_value): Declare.
8312 * targhooks.c (default_preferred_else_value): New function.
8313 * internal-fn.h (conditional_internal_fn_code): Declare.
8314 * internal-fn.c (FOR_EACH_CODE_MAPPING): New macro.
8315 (get_conditional_internal_fn): Use it.
8316 (conditional_internal_fn_code): New function.
8317 * gimple-match.h (gimple_match_cond): New struct.
8318 (gimple_match_op): Add a cond member function.
8319 (gimple_match_op::gimple_match_op): Update all forms to take a
8321 * genmatch.c (expr::gen_transform): Use the same condition as res_op
8322 for the suboperation, but don't specify a particular else_value.
8323 * tree-ssa-sccvn.c (vn_nary_simplify, vn_reference_lookup_3)
8324 (visit_nary_op, visit_reference_op_load): Pass
8325 gimple_match_cond::UNCOND to the gimple_match_op constructor.
8326 * gimple-match-head.c: Include tree-eh.h
8327 (convert_conditional_op): New function.
8328 (maybe_resimplify_conditional_op): Likewise.
8329 (gimple_resimplify1): Call maybe_resimplify_conditional_op.
8330 (gimple_resimplify2): Likewise.
8331 (gimple_resimplify3): Likewise.
8332 (gimple_resimplify4): Likewise.
8333 (maybe_push_res_to_seq): Return null for conditional operations.
8334 (try_conditional_simplification): New function.
8335 (gimple_simplify): Call it. Pass conditions to the gimple_match_op
8337 * match.pd: Fold VEC_COND_EXPRs of an IFN_COND_* call to a new
8339 * config/aarch64/aarch64.c (aarch64_preferred_else_value): New
8341 (TARGET_PREFERRED_ELSE_VALUE): Redefine.
8343 2018-07-12 Jan Hubicka <hubicka@ucw.cz>
8345 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
8347 (hash_tree): Do not hash DECL_FCONTEXT
8348 * tree-streamer-in.c (lto_input_ts_field_decl_tree_pointers):
8349 Do not stream DECL_FCONTEXT.
8350 * tree-streamer-out.c (write_ts_field_decl_tree_pointers): Likewise.
8351 * tree.c (free_lang_data_in_decl): Free DECL_FCONTEXT.
8353 2018-07-12 Richard Biener <rguenther@suse.de>
8356 * dwarf2out.c (gen_block_die): Only output blocks when they have
8357 at least one !DECL_IGNORED_P variable.
8359 2018-07-12 Richard Biener <rguenther@suse.de>
8362 * config/gnu-user.h (GNU_USER_TARGET_NO_PTHREADS_LIB_SPEC):
8363 Remove -mieee-fp handling.
8365 2018-07-12 Richard Biener <rguenther@suse.de>
8367 * tree-ssa-sccvn.c (vn_lookup_simplify_result): Remove bogus
8368 left-over from last patch.
8370 2018-07-12 Jakub Jelinek <jakub@redhat.com>
8372 PR tree-optimization/86492
8373 * gimple-ssa-store-merging.c
8374 (imm_store_chain_info::coalesce_immediate_stores): Call
8375 check_no_overlap even for the merge_overlapping case. Formatting fix.
8377 2018-07-12 Richard Biener <rguenther@suse.de>
8380 * fold-const.c (fold_binary_op_with_conditional_arg): Do not
8381 move possibly trapping operations into the conditional.
8383 2018-07-12 Richard Biener <rguenther@suse.de>
8385 * tree-ssa-sccvn.c (mprts_hook_cnt): Remove.
8386 (vn_lookup_simplify_result): Remove recursion limit applied
8388 (vn_nary_build_or_lookup_1): Adjust.
8389 (try_to_simplify): Likewise.
8390 * gimple-match-head.c (gimple_resimplify1): Instead apply one
8392 (gimple_resimplify2): Likewise.
8393 (gimple_resimplify3): Likewise.
8394 (gimple_resimplify4): Likewise.
8396 2018-07-11 Jakub Jelinek <jakub@redhat.com>
8398 * config/i386/avx512bitalgintrin.h (_mm512_mask_bitshuffle_epi64_mask):
8399 Use __mmask64 type instead of __mmask8 for __M argument.
8400 * config/i386/avx512fintrin.h (_mm512_mask_xor_epi64,
8401 _mm512_maskz_xor_epi64): Use __mmask8 type instead of __mmask16 for
8403 (_mm512_mask_cmpneq_epi64_mask): Use __mmask8 type instead of
8404 __mmask16 for __M argument.
8405 (_mm512_maskz_insertf32x4, _mm512_maskz_inserti32x4,
8406 _mm512_mask_insertf32x4, _mm512_mask_inserti32x4): Cast last argument
8407 to __mmask16 instead of __mmask8.
8408 * config/i386/avx512vlintrin.h (_mm_mask_add_ps, _mm_maskz_add_ps,
8409 _mm256_mask_add_ps, _mm256_maskz_add_ps, _mm_mask_sub_ps,
8410 _mm_maskz_sub_ps, _mm256_mask_sub_ps, _mm256_maskz_sub_ps,
8411 _mm256_maskz_cvtepi32_ps, _mm_maskz_cvtepi32_ps): Use __mmask8 type
8412 instead of __mmask16 for __U argument.
8413 * config/i386/avx512vlbwintrin.h (_mm_mask_cmp_epi8_mask): Use
8414 __mmask16 instead of __mmask8 for __U argument.
8415 (_mm256_mask_cmp_epi8_mask): Use __mmask32 instead of __mmask16 for
8417 (_mm256_cmp_epi8_mask): Use __mmask32 return type instead of
8419 (_mm_mask_cmp_epu8_mask): Use __mmask16 instead of __mmask8 for __U
8421 (_mm256_mask_cmp_epu8_mask): Use __mmask32 instead of __mmask16 for
8423 (_mm256_cmp_epu8_mask): Use __mmask32 return type instead of
8425 (_mm_mask_cmp_epi16_mask): Cast last argument to __mmask8 instead
8427 (_mm256_mask_cvtepi8_epi16): Use __mmask16 instead of __mmask32 for
8429 (_mm_mask_cvtepi8_epi16): Use __mmask8 instead of __mmask32 for
8431 (_mm256_mask_cvtepu8_epi16): Use __mmask16 instead of __mmask32 for
8433 (_mm_mask_cvtepu8_epi16): Use __mmask8 instead of __mmask32 for
8435 (_mm256_mask_cmpneq_epu8_mask, _mm256_mask_cmplt_epu8_mask,
8436 _mm256_mask_cmpge_epu8_mask, _mm256_mask_cmple_epu8_mask): Change
8437 return type as well as __M argument type and all casts from __mmask8
8439 (_mm256_mask_cmpneq_epu16_mask, _mm256_mask_cmplt_epu16_mask,
8440 _mm256_mask_cmpge_epu16_mask, _mm256_mask_cmple_epu16_mask): Change
8441 return type as well as __M argument type and all casts from __mmask8
8443 (_mm256_mask_cmpneq_epi8_mask, _mm256_mask_cmplt_epi8_mask,
8444 _mm256_mask_cmpge_epi8_mask, _mm256_mask_cmple_epi8_mask): Change
8445 return type as well as __M argument type and all casts from __mmask8
8447 (_mm256_mask_cmpneq_epi16_mask, _mm256_mask_cmplt_epi16_mask,
8448 _mm256_mask_cmpge_epi16_mask, _mm256_mask_cmple_epi16_mask): Change
8449 return type as well as __M argument type and all casts from __mmask8
8451 * config/i386/avx512vbmi2vlintrin.h (_mm_mask_shrdi_epi32,
8452 _mm_mask_shldi_epi32): Cast last argument to __mmask8 instead of
8455 2018-07-11 Grazvydas Ignotas <notasas@gmail.com>
8457 * config/i386/avx512bwintrin.h: (_mm512_mask_cmp_epi8_mask,
8458 _mm512_mask_cmp_epu8_mask): Use __mmask64 type instead of __mmask32
8461 2018-07-11 Paul Koning <ni1d@arrl.net>
8463 * doc/md.texi (define_subst): Document how multiple occurrences of
8464 the same argument in the replacement pattern are handled.
8466 2018-07-11 Paul Koning <ni1d@arrl.net>
8468 * doc/extend.texi (Common Variable Attributes): Move "mode" into
8470 (Common Type Attributes): Add "mode" attribute.
8472 2018-07-11 Jan Hubicka <hubicka@ucw.cz>
8474 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not
8475 stream DECL_ORIGINAL_TYPE.
8476 (DFS::DFS_write_tree_body): Drop hack handling local external decls.
8477 (hash_tree): Do not walk DECL_ORIGINAL_TYPE.
8478 * tree-streamer-in.c (lto_input_ts_decl_non_common_tree_pointers):
8479 Do not walk original type.
8480 * tree-streamer-out.c (streamer_write_chain): Drop hack handling
8482 (write_ts_decl_non_common_tree_pointers): Do not stream
8484 * tree.c (free_lang_data_in_decl): Clear DECL_ORIGINAL_TYPE.
8485 (find_decls_types_r): Do not walk DEC_ORIGINAL_TYPE.
8487 2018-07-11 Aldy Hernandez <aldyh@redhat.com>
8489 * tree-ssa-threadupdate.c (thread_through_all_blocks): Do not jump
8490 thread twice from the same starting edge.
8492 2018-07-11 Aldy Hernandez <aldyh@redhat.com>
8494 * vr-values.c (gimple_stmt_nonzero_p): Abstract common code to...
8495 * gimple.c (gimple_call_nonnull_result_p): ...here...
8496 (gimple_call_nonnull_arg): ...and here.
8497 * gimple.h (gimple_call_nonnull_result_p): New.
8498 (gimple_call_nonnull_arg): New.
8500 2018-07-11 Richard Earnshaw <rearnsha@arm.com>
8502 * config/arm/arm-cpus.in: Move information from fpu field of each
8503 cpu definition to the isa field.
8504 * config/arm/parsecpu.awk (fpu): Delete match rule.
8505 (gen_comm_data): Don't add bits from the CPU's FPU entry.
8507 2018-07-11 Richard Biener <rguenther@suse.de>
8510 * dwarf2out.c (init_sections_and_labels): Use
8511 output_asm_line_debug_info consistently.
8512 (dwarf2out_early_finish): Likewise.
8513 (dwarf2out_finish): Remove DW_AT_stmt_list from early generated
8516 2018-07-11 Richard Biener <rguenther@suse.de>
8518 * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1):
8519 Rework father_bb setting in a way to avoid propagating constants
8520 multiple times on a loop body.
8522 2018-07-10 Mark Wielaard <mark@klomp.org>
8525 * dwarf2out.c (output_macinfo_op): Fix dwarf_FORM typo in gcc_assert.
8527 2018-07-10 Richard Biener <rguenther@suse.de>
8529 * hash-map.h (hash_map::iterator::operator*): Return
8530 references to key and value.
8532 2018-07-10 Jakub Jelinek <jakub@redhat.com>
8535 * gimplify.c (find_combined_omp_for): Add DATA argument, in addition
8536 to finding the inner OMP_FOR/OMP_SIMD stmt find non-trivial wrappers,
8537 BLOCKs with BLOCK_VARs, OMP_PARALLEL in between, OMP_FOR in between.
8538 (gimplify_omp_for): For composite loops, move outer
8539 OMP_{DISTRIBUTE,TASKLOOP,FOR,PARALLEL} right around innermost
8540 OMP_FOR/OMP_SIMD if there are any non-trivial wrappers. For class
8541 iterators add any needed clauses. Allow OMP_FOR_ORIG_DECLS to contain
8542 TREE_LIST for both the original class iterator and the "last" helper
8543 var. Gimplify OMP_FOR_PRE_BODY before the outermost composite
8544 loop, remember has_decl_expr from outer composite loops for the
8545 innermost OMP_SIMD in TREE_PRIVATE bit on OMP_FOR_INIT.
8547 2018-07-09 Martin Sebor <msebor@redhat.com>
8551 * builtins.c (c_strlen): Avoid out-of-bounds warnings when
8552 accessing implicitly initialized array elements.
8553 * expr.c (string_constant): Handle string initializers of
8554 character arrays within aggregates.
8555 * gimple-fold.c (fold_array_ctor_reference): Add argument.
8556 Store element offset. As a special case, handle zero size.
8557 (fold_nonarray_ctor_reference): Same.
8558 (fold_ctor_reference): Add argument. Store subobject offset.
8559 * gimple-fold.h (fold_ctor_reference): Add argument.
8561 2018-07-09 Paul Koning <ni1d@arrl.net>
8563 * config/pdp11/pdp11.c (pdp11_addr_cost): New function.
8564 (pdp11_insn_cost): New function.
8565 (pdp11_md_asm_adjust): New function.
8566 (TARGET_INVALID_WITHIN_DOLOOP): Define.
8567 (pdp11_rtx_costs): Update to match machine better.
8568 (output_addr_const_pdp11): Correct format mismatch warnings.
8569 * config/pdp11/pdp11.h (SLOW_BYTE_ACCESS): Correct definition.
8570 * config/pdp11/pdp11.md: General change to add base_cost and/or
8571 length attributes for use by new pdp11_insn_cost function.
8572 (MIN_BRANCH): Correct definition.
8574 (doloop_end): Use standard pattern name for looping pattern.
8575 (doloop_end_nocc): New.
8576 (movsf): Add another constraint alternative.
8577 (zero_extendqihi2): Add constraint alternatives for not in place
8579 (zero_extendhisi2): Remove.
8580 (shift patterns): Add CC handling variants.
8584 (define_peephole2): New peephole to recognize mov that sets CC for
8587 2018-07-09 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
8589 * config/sparc/sparc.c (sparc_fold_builtin) <SPARC_BUILTIN_PDIST,
8590 SPARC_BUILTIN_PDISTN>: Adapt for signature change of wi::neg,
8593 2018-07-09 Jakub Jelinek <jakub@redhat.com>
8596 * real.c (real_nextafter): Return true if result is denormal.
8598 2018-07-09 Martin Liska <mliska@suse.cz>
8600 * common.opt: Add back wrongly removed attribute.
8602 2018-07-09 Richard Biener <rguenther@suse.de>
8605 * dwarf2out.c (gen_block_die): For an early generated DIE
8606 always output high/low PC attributes.
8608 2018-07-09 Tom de Vries <tdevries@suse.de>
8610 * cfgexpand.c (expand_debug_source_expr): Handle VAR_DECL.
8611 * tree-inline.c (remap_ssa_name): Handle default def ssa_name mapping
8612 onto VAR_DECL with abstract origin.
8614 2018-07-07 Jim Wilson <jimw@sifive.com>
8616 * config/riscv/riscv.c (TARGET_CUSTOM_FUNCTION_DESCRIPTORS): New.
8618 2018-07-07 Tom de Vries <tdevries@suse.de>
8620 * tree-dfa.c (dump_enumerated_decls): Handle cfun->cfg == NULL.
8622 2018-07-07 Aldy Hernandez <aldyh@redhat.com>
8624 * tree-vrp.c (vrp_int_const_binop): Change overflow type to
8626 (combine_bound): Use wide-int overflow calculation instead of
8628 * calls.c (maybe_warn_alloc_args_overflow): Change overflow type to
8630 * fold-const.c (int_const_binop_2): Same.
8631 (extract_muldiv_1): Same.
8632 (fold_div_compare): Same.
8633 (fold_abs_const): Same.
8635 * poly-int.h (add): Same.
8639 * predict.c (predict_iv_comparison): Same.
8640 * profile-count.c (slow_safe_scale_64bit): Same.
8641 * simplify-rtx.c (simplify_const_binary_operation): Same.
8642 * tree-chrec.c (tree_fold_binomial): Same.
8643 * tree-data-ref.c (split_constant_offset_1): Same.
8644 * tree-if-conv.c (idx_within_array_bound): Same.
8645 * tree-scalar-evolution.c (iv_can_overflow_p): Same.
8646 * tree-ssa-phiopt.c (minmax_replacement): Same.
8647 * tree-vect-loop.c (is_nonwrapping_integer_induction): Same.
8648 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Same.
8649 * vr-values.c (vr_values::adjust_range_with_scev): Same.
8650 * wide-int.cc (wi::add_large): Same.
8651 (wi::mul_internal): Same.
8652 (wi::sub_large): Same.
8653 (wi::divmod_internal): Same.
8654 * wide-int.h: Change overflow type to overflow_type for neg, add,
8655 mul, smul, umul, div_trunc, div_floor, div_ceil, div_round,
8656 mod_trunc, mod_ceil, mod_round, add_large, sub_large,
8657 mul_internal, divmod_internal.
8658 (overflow_type): New enum.
8659 (accumulate_overflow): New.
8661 2018-07-06 Kugan Vivekanandarajah <kugan.vivekanandarajah@linaro.org>
8663 * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): New.
8664 (tree_ssa_phiopt_worker): Call cond_removal_in_popcount_pattern.
8666 2018-07-06 Kugan Vivekanandarajah <kuganv@linaro.org>
8668 * tree-ssa-loop-niter.c (number_of_iterations_popcount): If popcount
8669 argument is checked for zero before entering loop, avoid checking again.
8671 2018-07-06 Kugan Vivekanandarajah <kuganv@linaro.org>
8673 * gimplify.h (generic_expr_could_trap_p): Set as global function.
8674 * gimplify.h (generic_expr_could_trap_p): Likwise.
8675 * tree-scalar-evolution.c (expression_expensive_p): Handle COND_EXPR.
8677 2018-07-06 Jakub Jelinek <jakub@redhat.com>
8679 PR tree-optimization/86401
8680 * fold-const.c (fold_binary_loc) <case BIT_AND_EXPR>: Move the
8681 ((A & N) + B) & M -> (A + B) & M etc. optimization into ...
8682 (fold_bit_and_mask): ... here. New helper function for match.pd.
8683 * fold-const.h (fold_bit_and_mask): Declare.
8684 * match.pd (((A & N) + B) & M -> (A + B) & M): New optimization.
8686 2018-07-06 Peter Bergner <bergner@linux.ibm.com>
8689 * target.def (translate_mode_attribute): New hook.
8690 * targhooks.h (default_translate_mode_attribute): Declare.
8691 * targhooks.c (default_translate_mode_attribute): New function.
8692 * doc/tm.texi.in (TARGET_TRANSLATE_MODE_ATTRIBUTE): New hook.
8693 * doc/tm.texi: Regenerate.
8694 * config/rs6000/rs6000.c (TARGET_TRANSLATE_MODE_ATTRIBUTE): Define.
8695 (rs6000_translate_mode_attribute): New function.
8697 2018-07-06 Paul Koning <ni1d@arrl.net>
8699 * doc/md.texi (define_split): Document DONE and FAIL.
8700 (define_peephole2): Ditto.
8702 2018-07-05 Jeff Law <law@redhat.com>
8704 PR tree-optimization/86010
8705 * tree-ssa-dse.c (compute_trims): More aggressively trim at
8706 both the head and tail of mem* and str* calls.
8708 2018-07-05 Jim Wilson <jimw@sifive.com>
8710 * config.gcc (riscv*-*-*): When setting xlen, handle riscv-*.
8712 2018-07-05 Indu Bhagat <indu.bhagat@oracle.com>
8714 * config/aarch64/aarch64-simd.md: correct flags text for
8715 MIN_EXPR replacement.
8717 2018-07-05 James Clarke <jrtc27@jrtc27.com>
8719 * configure: Regenerated.
8721 2018-07-05 Carl Love <cel@us.ibm.com>
8723 * config/rs6000/rs6000-c.c: Map ALTIVEC_BUILTIN_VEC_UNPACKH for
8724 float argument to VSX_BUILTIN_DOUBLEH_V4SF.
8725 Map ALTIVEC_BUILTIN_VEC_UNPACKL for float argument to
8726 VSX_BUILTIN_DOUBLEL_V4SF.
8728 2018-07-05 Martin Sebor <msebor@redhat.com>
8731 * tree-ssa-strlen.c (maybe_set_strlen_range): Use type size rather
8732 than its domain to compute its the upper bound of a char array.
8734 2018-07-05 Nathan Sidwell <nathan@acm.org>
8736 Replace NO_IMPLICIT_EXTERN_C with SYSTEM_IMPLICIT_EXTERN_C.
8737 * doc/cpp.texi: Update comment.
8738 * doc/tm.texi: Rebuilt.
8739 * doc/tm.texi.in (NO_IMPLICIT_EXTERN_C): Replace with ...
8740 (SYSTEM_IMPLICIT_EXTERN_C): ... this, opposite sense.
8741 * doc/extend.texi (Backwards Compatibility): Clarify it is system
8742 headers affected by extern "C".
8743 * system.h: Poison NO_IMPLICIT_EXTERN_C.
8744 * config/alpha/alpha.h, config/arm/uclinux-elf.h,
8745 config/bfin/elf.h, config/cris/cris.h, config/darwin.h,
8746 config/dragonfly.h, config/freebsd.h, config/gnu-user.h,
8747 config/i386/cygming.h, config/i386/djgpp.h, config/i386/nto.h,
8748 config/ia64/hpux.h, config/lm32/lm32.h, config/lm32/uclinux-elf.h,
8749 config/lynx.h, config/mips/elf.h, config/mmix/mmix.h,
8750 config/netbsd.h, config/pa/pa-hpux.h, config/powerpcspe/sysv4.h,
8751 config/riscv/elf.h, config/rs6000/sysv4.h, config/rtems.h,
8752 config/s390/tpf.h, config/sh/newlib.h, config/sol2.h,
8753 config/sparc/openbsd64.h, config/sparc/sp-elf.h,
8754 config/sparc/sp64-elf.h, config/spu/spu.h,
8755 config/stormy16/stormy16.h, config/v850/v850.h,
8756 config/visium/visium.h, config/vx-common.h, config/xtensa/elf.h: Don't
8757 define NO_IMPLICIT_EXTERN_C.
8758 * config/rs6000/aix.h: Set SYSTEM_IMPLICIT_EXTERN_C.
8760 2018-07-05 Tamar Christina <tamar.christina@arm.com>
8763 * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
8764 instead of GET_MODE_SIZE when comparing Units.
8766 2018-07-05 Tamar Christina <tamar.christina@arm.com>
8769 * rtlanal.c (set_noop_p): Constrain on mode change,
8770 include hard-reg-set.h
8772 2018-07-05 Tamar Christina <tamar.christina@arm.com>
8774 * config/aarch64/aarch64.c (aarch64_expand_movmem): Fix mode size.
8776 2018-07-05 Jakub Jelinek <jakub@redhat.com>
8779 2018-07-04 Maxim Ostapenko <m.ostapenko@samsung.com>
8782 * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
8784 * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
8786 2018-07-04 Maxim Ostapenko <m.ostapenko@samsung.com>
8789 * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
8791 * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
8793 2018-07-04 Eric Botcazou <ebotcazou@adacore.com>
8796 * expmed.c (choose_multiplier): Fix incorrect comparison with mask.
8798 2018-07-04 Aldy Hernandez <aldyh@redhat.com>
8800 * tree-vrp.c (extract_range_from_binary_expr_1): Initialize
8801 neg_*_op* variables.
8803 2018-07-04 Martin Liska <mliska@suse.cz>
8805 * tree-switch-conversion.c: Define
8806 max_ratio_for_speed and max_ratio_for_size constants.
8808 2018-07-04 Denys Vlasenko <dvlasenk@redhat.com>
8809 Martin Liska <mliska@suse.cz>
8814 * common.opt: Rename align options with 'str_' prefix.
8815 * common/config/i386/i386-common.c (set_malign_value): New
8817 (ix86_handle_option): Use it to set -falign-* options/
8818 * config/aarch64/aarch64-protos.h (struct tune_params): Change
8819 type from int to string.
8820 * config/aarch64/aarch64.c: Update default values from int
8822 * config/alpha/alpha.c (alpha_override_options_after_change):
8824 * config/arm/arm.c (arm_override_options_after_change_1): Likewise.
8825 * config/i386/dragonfly.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
8826 max skip conditionally.
8827 * config/i386/freebsd.h (SUBALIGN_LOG): New.
8828 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
8829 max skip conditionally.
8830 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
8831 max skip conditionally.
8832 * config/i386/gnu-user.h (SUBALIGN_LOG): New.
8833 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
8834 max skip conditionally.
8835 * config/i386/i386.c (struct ptt): Change type from int to
8837 (ix86_default_align): Set default values.
8838 * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Print
8839 max skip conditionally.
8840 * config/i386/iamcu.h (SUBALIGN_LOG): New.
8841 (ASM_OUTPUT_MAX_SKIP_ALIGN):
8842 * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN):
8843 * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
8844 max skip conditionally.
8845 * config/i386/openbsdelf.h (SUBALIGN_LOG): New.
8846 (ASM_OUTPUT_MAX_SKIP_ALIGN) Print max skip conditionally.:
8847 * config/i386/x86-64.h (SUBALIGN_LOG): New.
8848 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
8849 max skip conditionally.
8850 (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
8851 * config/ia64/ia64.c (ia64_option_override): Set default values
8852 for alignment options.
8853 * config/m68k/m68k.c: Handle new str_align_* options.
8854 * config/mips/mips.c (mips_set_compression_mode): Change
8856 (mips_option_override): Set default values for options.
8857 * config/powerpcspe/powerpcspe.c (rs6000_option_override_internal):
8859 * config/rs6000/rs6000.c (rs6000_option_override_internal):
8861 * config/rx/rx.c (rx_option_override): Likewise.
8862 * config/rx/rx.h (JUMP_ALIGN): Use align_jumps_log.
8863 (LABEL_ALIGN): Use align_labels_log.
8864 (LOOP_ALIGN): Use align_loops_align.
8865 * config/s390/s390.c (s390_asm_output_function_label): Use new
8867 * config/sh/sh.c (sh_override_options_after_change):
8868 Change type of constants.
8869 * config/spu/spu.c (spu_sched_init): Likewise.
8870 * config/sparc/sparc.c (sparc_option_override): Set default
8872 * config/visium/visium.c (visium_option_override): Likewise.
8873 * config/visium/visium.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Do not
8874 emit p2align format with last argument if it's not needed.
8875 * doc/invoke.texi: Document extended format of -falign-*.
8876 * final.c: Use align_labels alignment.
8877 * flags.h (struct target_flag_state): Change type to use
8879 (struct align_flags_tuple): New.
8880 (struct align_flags): Likewise.
8881 (align_loops_log): Redefine macro to use new types.
8882 (align_loops_max_skip): Redefine macro to use new types.
8883 (align_jumps_log): Redefine macro to use new types.
8884 (align_jumps_max_skip): Redefine macro to use new types.
8885 (align_labels_log): Redefine macro to use new types.
8886 (align_labels_max_skip): Redefine macro to use new types.
8887 (align_functions_log): Redefine macro to use new types.
8888 (align_loops): Redefine macro to use new types.
8889 (align_jumps): Redefine macro to use new types.
8890 (align_labels): Redefine macro to use new types.
8891 (align_functions): Redefine macro to use new types.
8892 (align_functions_max_skip): Redefine macro to use new types.
8893 (align_loops_value): New macro.
8894 (align_jumps_value): New macro.
8895 (align_labels_value): New macro.
8896 (align_functions_value): New macro.
8897 * function.c (invoke_set_current_function_hook): Propagate
8898 alignment values from flags to global variables default in
8900 * ipa-icf.c (sem_function::equals_wpa): Use
8901 cl_optimization_option_eq instead of memcmp.
8902 * lto-streamer.h (cl_optimization_stream_out): Support streaming
8904 (cl_optimization_stream_in): Likewise.
8905 * optc-save-gen.awk: Support strings in cl_optimization.
8906 * opth-gen.awk: Likewise.
8907 * opts.c (finish_options): Remove error checking of invalid
8909 (MAX_CODE_ALIGN): Remove.
8910 (MAX_CODE_ALIGN_VALUE): Likewise.
8911 (parse_and_check_align_values): New function.
8912 (check_alignment_argument): Likewise.
8913 (common_handle_option): Use check_alignment_argument.
8914 * opts.h (parse_and_check_align_values): Declare.
8915 * toplev.c (init_alignments): Remove.
8916 (read_log_maxskip): New.
8917 (parse_N_M): Likewise.
8918 (parse_alignment_opts): Likewise.
8919 (backend_init_target): Remove usage of init_alignments.
8920 * toplev.h (parse_alignment_opts): Declare.
8921 * tree-streamer-in.c (streamer_read_tree_bitfields): Add new
8923 * tree-streamer-out.c (streamer_write_tree_bitfields): Likewise.
8924 * tree.c (cl_option_hasher::equal): New.
8925 * varasm.c: Use new global macros.
8927 2018-07-04 Denys Vlasenko <dvlasenk@redhat.com>
8929 * config/i386/dragonfly.h: (ASM_OUTPUT_MAX_SKIP_ALIGN):
8930 Use a simpler align directive also if MAXSKIP = ALIGN-1.
8931 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
8932 * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
8933 * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
8934 * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
8935 * config/i386/freebsd.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Remove "If N
8936 is large, do at least 8 byte alignment" code. Add SUBALIGN_LOG
8937 define. Use a simpler align directive also if MAXSKIP = ALIGN-1.
8938 * config/i386/gnu-user.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
8939 * config/i386/iamcu.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
8940 * config/i386/openbsdelf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
8941 * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
8943 2018-07-04 Martin Liska <mliska@suse.cz>
8944 Jonathan Wakely <jwakely@redhat.com>
8946 * coverage.c: Use correct type.
8947 * doc/invoke.texi: Language correction.
8949 2018-07-03 H.J. Lu <hongjiu.lu@intel.com>
8952 * config/i386/i386.c (rest_of_insert_endbranch): Also generate
8953 ENDBRANCH for non-tail call which may return via indirect branch.
8954 * doc/extend.texi: Document indirect_return attribute.
8956 2018-07-03 Martin Sebor <msebor@redhat.com>
8958 PR tree-optimization/86274
8959 * gimple-ssa-sprintf.c (fmtresult::type_max_digits): Verify
8961 (format_floating): Correct handling of infinities and NaNs.
8963 2018-07-03 Martin Sebor <msebor@redhat.com>
8965 * print-tree.c (print_real_cst): New function.
8966 (print_node_brief): Call it.
8967 (print_node): Ditto.
8969 2018-07-03 Jeff Law <law@redhat.com>
8971 * config/h8300/h8300.md (logical<mode>3_sn, logical<mode>3): Merge
8972 into a single pattern.
8974 * config/h8300/h8300.md (ors code_iterator): New.
8975 (bsetqi_msx, bnotqi_msx patterns and splitters): Consolidate into
8976 a single pattern and single splitter.
8977 (bsethi_msx, bnothi_msx patterns): Consolidate into a single pattern.
8978 (iorqi3_1, xorqi3_1): Likewise.
8979 (iorqi3, xorqi3 expanders): Similarly.
8981 * config/h8300/h8300.md (movmd_internal_normal): Consolidated with
8982 (movmd_internal) into a single pattern using the P mode iterator.
8983 (movmd splitters): Similarly.
8984 (stpcpy_internal_normal, stpcpy_internal): Similarly for thes patterns.
8985 (movsd splitters): Similarly.
8987 * config/h8300/h8300.c (h8300_insn_length_from_table): Consolidate
8988 ADDB, ADDW and ADDL into a single ADD attribute which selects the
8989 right table based on the size of the operand.
8990 * config/h8300/h8300.md (length_table): Corresponding changes. All
8991 references to "addb", "addw" and "addl" changed to "add".
8992 (btst patterns): Merge two variants into a single pattern.
8993 (tstqi, tsthi): Likewise.
8994 (addhi3_incdec, addsi3_incdec): Likewise.
8995 (subhi3_h8300hs, subsi3_h8300hs): Likewise.
8996 (mulhi3, mulsi3): Likewise.
8997 (udivhi3, udivsi3): Likewise.
8998 (divhi3, divsi3): Likewise.
8999 (andorqi3, andorhi3, andorsi3): Likewise.
9001 2018-07-03 Uros Bizjak <ubizjak@gmail.com>
9004 * config/i386/sse.md (uavg<mode>3_ceil): New expander.
9005 (<sse2_avx2>_uavg<mode>3<mask_name>): Simplify expander.
9007 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
9009 PR tree-optimization/85694
9010 * config/aarch64/iterators.md (HADD, RHADD): New int iterators.
9011 (u): Handle UNSPEC_SHADD, UNSPEC_UHADD, UNSPEC_SRHADD and
9013 * config/aarch64/aarch64-simd.md (<u>avg<mode>3_floor)
9014 (<u>avg<mode>3_ceil): New patterns.
9016 2018-07-03 David Malcolm <dmalcolm@redhat.com>
9018 * gcc.dg/vect/slp-perm-1.c: Remove "note: " prefix from
9019 scan-tree-dump directive.
9020 * gcc.dg/vect/slp-perm-2.c: Likewise.
9021 * gcc.dg/vect/slp-perm-3.c: Likewise.
9022 * gcc.dg/vect/slp-perm-5.c: Likewise.
9023 * gcc.dg/vect/slp-perm-6.c: Likewise.
9024 * gcc.dg/vect/slp-perm-7.c: Likewise.
9025 * gcc.dg/vect/slp-perm-8.c: Likewise.
9027 2018-07-03 Marek Polacek <polacek@redhat.com>
9030 * gimple-fold.c (size_must_be_zero_p): Check the type of the size.
9032 2018-07-03 Richard Biener <rguenther@suse.de>
9035 * tree-ssa-structalias.c (find_func_clobbers): Properly
9036 handle indirect calls.
9038 2018-07-03 Jeff Law <law@redhat.com>
9040 * config/h8300/h8300.md (HSI, QHSI, QHSIF): New mode iterators.
9041 (shifts): New code iterator.
9042 (movqi, movhi, movsi, movsf expanders): Consolidate into a single
9043 expander. Fix HImode handling on H8/SX.
9044 (addqi3, addhi3, addsi3 expanders): Consolidate into a single expander.
9045 (subqi3, subhi3, subsi3 expanders): Likewise.
9046 (andqi3, andhi3, andsi3 expanders): Likewise.
9047 (iorqi3, iorhi3, iorsi3 expanders): Likewise.
9048 (xorqi3, xorhi3, xorsi3 expanders): Likewise.
9049 (negqi2, neghi2, negsi2, negsf2 expanders): Likewise.
9050 (one_cmplqi2, one_cmplhi2, one_cmplsi2): Likewise.
9051 (zero_extendqihi2, zero_extendqisi2): Likewise.
9052 (extendqihi2, extendqisi2): Likewise.
9053 (rotlqi3, rotlhi3, rotlsi3): Likewise.
9054 (neghi2_h8300, negsi2_h8300): Likewise for these patterns.
9055 (rotlqi3_1, rotlhi3_1): Likewise.
9056 (logicalhi3_sn, logicalsi3_sn): Likewise.
9057 (logicalhi3, logicalsi3): Likewise.
9059 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
9061 * tree-vect-patterns.c (vect_recog_rotate_pattern)
9062 (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
9063 (vect_recog_mixed_size_cond_pattern, adjust_bool_pattern_cast)
9064 (adjust_bool_pattern, vect_recog_bool_pattern): Pass the vector
9065 type to append_pattern_def_seq instead of creating a stmt_vec_info
9067 (build_mask_conversion): Likewise. Remove vinfo argument.
9068 (vect_add_conversion_to_patterm): Likewise, renaming to...
9069 (vect_add_conversion_to_pattern): ...this.
9070 (vect_recog_mask_conversion_pattern): Update call to
9071 build_mask_conversion. Pass the vector type to
9072 append_pattern_def_seq here too.
9073 (vect_recog_gather_scatter_pattern): Update call to
9074 vect_add_conversion_to_pattern.
9076 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
9078 * tree-vect-patterns.c (new_pattern_def_seq): Delete.
9079 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
9080 (vect_recog_widen_op_pattern, vect_recog_over_widening_pattern)
9081 (vect_recog_rotate_pattern, vect_synth_mult_by_constant): Don't set
9082 STMT_VINFO_PATTERN_DEF_SEQ to null here.
9083 (vect_recog_pow_pattern, vect_recog_vector_vector_shift_pattern)
9084 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern): Use
9085 append_pattern_def_seq instead of new_pattern_def_seq.
9086 (vect_recog_divmod_pattern): Do both of the above.
9087 (vect_pattern_recog_1): Assert that STMT_VINO_PATTERN_DEF_SEQ
9090 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
9092 * tree-vect-patterns.c (vect_recog_dot_prod_pattern):
9093 (vect_recog_sad_pattern, vect_recog_widen_op_pattern)
9094 (vect_recog_widen_mult_pattern, vect_recog_pow_pattern):
9095 (vect_recog_widen_sum_pattern, vect_recog_over_widening_pattern)
9096 (vect_recog_average_pattern, vect_recog_cast_forwprop_pattern)
9097 (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
9098 (vect_recog_vector_vector_shift_pattern, vect_synth_mult_by_constant)
9099 (vect_recog_mult_pattern, vect_recog_divmod_pattern)
9100 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
9101 (vect_recog_mask_conversion_pattern): Replace vec<gimple *>
9102 parameter with a single stmt_vec_info.
9103 (vect_recog_func_ptr): Likewise.
9104 (vect_recog_gather_scatter_pattern): Likewise, folding in...
9105 (vect_try_gather_scatter_pattern): ...this.
9106 (vect_pattern_recog_1): Remove stmts_to_replace and just pass
9107 the stmt_vec_info of the statement to be matched. Don't clear
9108 STMT_VINFO_RELATED_STMT.
9109 (vect_pattern_recog): Update call accordingly.
9111 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
9113 PR tree-optimization/85694
9114 * doc/md.texi (avgM3_floor, uavgM3_floor, avgM3_ceil)
9115 (uavgM3_ceil): Document new optabs.
9116 * doc/sourcebuild.texi (vect_avg_qi): Document new target selector.
9117 * internal-fn.def (IFN_AVG_FLOOR, IFN_AVG_CEIL): New internal
9119 * optabs.def (savg_floor_optab, uavg_floor_optab, savg_ceil_optab)
9120 (savg_ceil_optab): New optabs.
9121 * tree-vect-patterns.c (vect_recog_average_pattern): New function.
9122 (vect_vect_recog_func_ptrs): Add it.
9123 * tree-vect-stmts.c (vectorizable_call): Get the type of the zero
9124 constant directly from the associated lhs.
9126 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
9128 * tree-vect-patterns.c (vect_split_statement): New function.
9129 (vect_convert_input): Use it to try to split an existing cast.
9131 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
9133 * poly-int.h (print_hex): New function.
9134 * dumpfile.h (dump_dec, dump_hex): Declare.
9135 * dumpfile.c (dump_dec, dump_hex): New poly_wide_int functions.
9136 * tree-vectorizer.h (_stmt_vec_info): Add min_output_precision,
9137 min_input_precision, operation_precision and operation_sign.
9138 * tree-vect-patterns.c (vect_get_range_info): New function.
9139 (vect_same_loop_or_bb_p, vect_single_imm_use)
9140 (vect_operation_fits_smaller_type): Delete.
9141 (vect_look_through_possible_promotion): Add an optional
9142 single_use_p parameter.
9143 (vect_recog_over_widening_pattern): Rewrite to use new
9144 stmt_vec_info infomration. Handle one operation at a time.
9145 (vect_recog_cast_forwprop_pattern, vect_narrowable_type_p)
9146 (vect_truncatable_operation_p, vect_set_operation_type)
9147 (vect_set_min_input_precision): New functions.
9148 (vect_determine_min_output_precision_1): Likewise.
9149 (vect_determine_min_output_precision): Likewise.
9150 (vect_determine_precisions_from_range): Likewise.
9151 (vect_determine_precisions_from_users): Likewise.
9152 (vect_determine_stmt_precisions, vect_determine_precisions): Likewise.
9153 (vect_vect_recog_func_ptrs): Put over_widening first.
9155 (vect_pattern_recog): Call vect_determine_precisions.
9157 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
9159 * tree-vect-patterns.c (vect_mark_pattern_stmts): Remove pattern
9160 statements that have been replaced by further pattern statements.
9161 (vect_pattern_recog_1): Clear STMT_VINFO_PATTERN_DEF_SEQ on failure.
9163 2018-07-03 Richard Biener <rguenther@suse.de>
9165 * tree-vect-stmts.c (vect_is_simple_use): Consolidate dumping,
9166 always set *dt. Dump vectype in vectype overload.
9167 * dumpfile.h (dump_gimple_expr): New function.
9168 (dump_gimple_expr_loc): Likewise.
9169 * dumpfile.c (dump_gimple_expr): New function.
9170 (dump_gimple_expr_loc): Likewise.
9172 2018-07-02 Jeff Law <law@redhat.com>
9174 * config/h8300/h8300.md (movqi_h8300, movqi_h8300hs): Consolidate
9175 the H8/300, H8/300H and H8/S variants into a single pattern.
9176 (movhi_h8300, movqi_h8300hs): Similarly.
9177 (pushqi_h8300hs, pushhi_h8300hs): Consolidate into a single pattern.
9178 (QHI mode iterator): New.
9180 * config/h8300/h8300.md: Remove trailing whitespace.
9182 2018-07-02 Jim Wilson <jimw@sifive.com>
9184 * config/riscv/riscv.c (riscv_expand_epilogue): Use emit_jump_insn
9185 instead of emit_insn for interrupt returns.
9186 * config/riscv/riscv.md (riscv_met): Add (return) to rtl.
9187 (riscv_sret, riscv_uret): Likewise.
9189 2018-07-02 David Malcolm <dmalcolm@redhat.com>
9191 * pretty-print.c (selftest::test_pp_format): Move save and restore
9192 of quotes to class auto_fix_quotes, and add an instance.
9193 * selftest.c: Include "intl.h".
9194 (selftest::auto_fix_quotes::auto_fix_quotes): New ctor.
9195 (selftest::auto_fix_quotes::~auto_fix_quotes): New dtor.
9196 * selftest.h (selftest::auto_fix_quotes): New class.
9198 2018-07-02 Richard Henderson <richard.henderson@linaro.org>
9200 * config/aarch64/aarch64-protos.h, config/aarch64/aarch64.c
9201 (aarch64_sve_prepare_conditional_op): Remove.
9202 * config/aarch64/aarch64-sve.md (cond_<SVE_INT_BINARY><SVE_I>):
9203 Allow aarch64_simd_reg_or_zero as select operand; remove
9204 the aarch64_sve_prepare_conditional_op call.
9205 (cond_<SVE_INT_BINARY_SD><SVE_SDI>): Likewise.
9206 (cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
9207 (*cond_<SVE_INT_BINARY><SVE_I>_z): New pattern.
9208 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_z): New pattern.
9209 (*cond_<SVE_COND_FP_BINARY><SVE_F>_z): New pattern.
9210 (*cond_<SVE_INT_BINARY><SVE_I>_any): New pattern.
9211 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_any): New pattern.
9212 (*cond_<SVE_COND_FP_BINARY><SVE_F>_any): New pattern
9213 and a splitters to match all of the *_any patterns.
9214 * config/aarch64/predicates.md (aarch64_sve_any_binary_operator): New.
9216 * config/aarch64/iterators.md (SVE_INT_BINARY_REV): Remove.
9217 (SVE_COND_FP_BINARY_REV): Remove.
9218 (sve_int_op_rev, sve_fp_op_rev): New.
9219 * config/aarch64/aarch64-sve.md (*cond_<SVE_INT_BINARY><SVE_I>_0): New.
9220 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_0): New.
9221 (*cond_<SVE_COND_FP_BINARY><SVE_F>_0): New.
9222 (*cond_<SVE_INT_BINARY><SVE_I>_2): Rename, add movprfx alternative.
9223 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_2): Similarly.
9224 (*cond_<SVE_COND_FP_BINARY><SVE_F>_2): Similarly.
9225 (*cond_<SVE_INT_BINARY><SVE_I>_3): Similarly; use sve_int_op_rev.
9226 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_3): Similarly.
9227 (*cond_<SVE_COND_FP_BINARY><SVE_F>_3): Similarly; use sve_fp_op_rev.
9229 * config/aarch64/aarch64-sve.md (cond_<SVE_COND_FP_BINARY><SVE_F>):
9230 Remove match_dup 1 from the inner unspec.
9231 (*cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
9233 * config/aarch64/aarch64.md (movprfx): New attr.
9234 (length): Default movprfx to 8.
9235 * config/aarch64/aarch64-sve.md (*mul<SVE_I>3): Add movprfx alt.
9236 (*madd<SVE_I>, *msub<SVE_I): Likewise.
9237 (*<su>mul<SVE_I>3_highpart): Likewise.
9238 (*<SVE_INT_BINARY_SD><SVE_SDI>3): Likewise.
9239 (*v<ASHIFT><SVE_I>3): Likewise.
9240 (*<su><MAXMIN><SVE_I>3): Likewise.
9241 (*<su><MAXMIN><SVE_F>3): Likewise.
9242 (*fma<SVE_F>4, *fnma<SVE_F>4): Likewise.
9243 (*fms<SVE_F>4, *fnms<SVE_F>4): Likewise.
9244 (*div<SVE_F>4): Likewise.
9246 2018-07-02 Richard Sandiford <richard.sandiford@arm.com>
9248 * tree-vect-patterns.c (vect_recog_widen_shift_pattern): Fix typo
9251 2018-07-02 Richard Biener <rguenther@suse.de>
9253 PR tree-optimization/86363
9254 * tree-ssa-sccvn.c (vn_reference_lookup_3): Check the
9255 memset argument refers to a non-variable address.
9257 2018-07-02 Aldy Hernandez <aldyh@redhat.com>
9259 * tree-vrp.c (extract_range_from_binary_expr_1): Abstract a lot of the
9260 {PLUS,MINUS}_EXPR code to...
9261 (adjust_symbolic_bound): ...here,
9262 (combine_bound): ...here,
9263 (set_value_range_with_overflow): ...and here.
9265 2018-07-02 Aldy Hernandez <aldyh@redhat.com>
9267 * tree-vrp.c (extract_range_from_unary_expr): Abstract ABS_EXPR
9269 (extract_range_from_abs_expr): ...here.
9271 2018-07-02 Eric Botcazou <ebotcazou@adacore.com>
9273 * config/i386/i386.c (ix86_finalize_stack_frame_flags): Do not overrule
9274 -fno-omit-frame-pointer when not optimizing.
9276 2018-07-02 Martin Liska <mliska@suse.cz>
9279 * ipa-pure-const.c (malloc_candidate_p): Revert usage of ::get.
9280 (propagate_nothrow): Likewise.
9282 2018-07-02 Martin Liska <mliska@suse.cz>
9285 * ipa-inline.c (early_inliner): Revert wrongly added ::get call.
9287 2018-07-02 David Malcolm <dmalcolm@redhat.com>
9289 * dumpfile.c (dump_generic_expr_loc): Undo removal of this
9290 function in r262149, changing "loc" param from source_location to
9291 const dump_location_t &.
9292 * dumpfile.h (dump_generic_expr_loc): Undo removal of this
9293 declaration, as above.
9295 2018-07-01 Paul Koning <ni1d@arrl.net>
9297 * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
9298 -munit-asm, -mgnu-asm, -mdec-asm.
9299 * config/pdp11/pdp11-protos.h (pdp11_gen_int_label): New.
9300 (pdp11_output_labelref): New.
9301 (pdp11_output_def): New.
9302 (pdp11_output_addr_vec_elt): New.
9303 * config/pdp11/pdp11.c: Use tab between opcode and operands. Use
9304 %# and %@ format codes.
9305 (pdp11_option_override): New.
9306 (TARGET_ASM_FILE_START_FILE_DIRECTIVE): Define.
9307 (pdp11_output_ident): New.
9308 (pdp11_asm_named_section): New.
9309 (pdp11_asm_init_sections): New.
9310 (pdp11_file_start): New.
9311 (pdp11_file_end): New.
9312 (output_ascii): Use .ascii/.asciz for -mdec-asm.
9313 (pdp11_asm_print_operand): Update %# and %$ for -mdec-asm. Add
9314 %o, like %c but octal.
9315 (pdp11_option_override): New.
9316 * config/pdp11/pdp11.h (TEXT_SECTION_ASM_OP): Update for
9318 (DATA_SECTION_ASM_OP): Ditto.
9319 (READONLY_DATA_SECTION_ASM_OP): New.
9320 (IS_ASM_LOGICAL_LINE_SEPARATOR): New.
9321 (ASM_GENERATE_INTERNAL_LABEL): Use new function.
9322 (ASM_OUTPUT_LABELREF): Ditto.
9323 (ASM_OUTPUT_DEF): Ditto.
9324 (ASM_OUTPUT_EXTERNAL): New.
9325 (ASM_OUTPUT_SOURCE_FILENAME): New.
9326 (ASM_OUTPUT_ADDR_VEC_ELT): Use new function.
9327 (ASM_OUTPUT_SKIP): Update for -mdec-asm.
9328 * config/pdp11/pdp11.md: Use tab between opcode and operands. Use
9329 %# and %@ format codes.
9330 * config/pdp11/pdp11.opt (mgnu-asm): New.
9331 (mdec-asm): Conflicts with -mgnu-asm and -munix-asm.
9332 (munix-asm): Conflicts with -mdec-asm and -mgnu-asm.
9333 * doc/invoke.txt (PDP-11 Options): Add -mgnu-asm.
9335 2018-07-01 Aldy Hernandez <aldyh@redhat.com>
9337 * tree-ssa-threadupdate.c (mark_threaded_blocks): Avoid
9338 dereferencing path[] beyond its length.
9340 (debug_all_paths): New.
9341 (rewire_first_differing_edge): New.
9342 (adjust_paths_after_duplication): New.
9343 (duplicate_thread_path): Call adjust_paths_after_duplication.
9345 (thread_through_all_blocks): Add new argument to
9346 duplicate_thread_path.
9348 2018-06-30 Jim Wilson <jimw@sifive.com>
9350 * config/riscv/predicates.md (p2m1_shift_operand): New.
9351 (high_mask_shift_operand): New.
9352 * config/riscv/riscv.md (lshrsi3_zero_extend_3+1): New combiner
9353 pattern using p2m1_shift_operand.
9354 (lshsi3_zero_extend_3+2): New combiner pattern using
9355 high_mask_shift_operand.
9357 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
9359 * tree-vect-patterns.c (vect_get_external_def_edge): New function,
9361 (vect_recog_rotate_pattern): ...here.
9362 (vect_convert_input): Try to insert casts of invariants in the
9364 * tree-vect-loop-manip.c (vect_loop_versioning): Don't require the
9365 preheader to be empty.
9367 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
9369 * tree-vect-patterns.c (append_pattern_def_seq): Take an optional
9370 vector type. If given, install it in the new statement's
9372 (vect_element_precision): New function.
9373 (vect_unpromoted_value): New struct.
9374 (vect_unpromoted_value::vect_unpromoted_value): New function.
9375 (vect_unpromoted_value::set_op): Likewise.
9376 (vect_look_through_possible_promotion): Likewise.
9377 (vect_joust_widened_integer, vect_joust_widened_type): Likewise.
9378 (vect_widened_op_tree, vect_convert_input): Likewise.
9379 (vect_convert_inputs, vect_convert_output): Likewise.
9380 (vect_recog_dot_prod_pattern): Use vect_look_through_possible_promotion
9381 to handle the optional cast of the multiplication result and
9382 vect_widened_op_tree to detect the widened multiplication itself.
9383 Do not require the input and output of promotion casts to have
9384 the same sign, but base the signedness of the operation on the
9385 input rather than the result. If the pattern includes two
9386 promotions, check that those promotions have the same sign.
9387 Do not restrict the MULT_EXPR handling to a double-width result;
9388 handle quadruple-width results and wider. Use vect_convert_inputs
9389 to convert the inputs to the common type.
9390 (vect_recog_sad_pattern): Use vect_look_through_possible_promotion
9391 to handle the optional cast of the ABS result. Also allow a sign
9392 change or a sign extension between the ABS and MINUS.
9393 Use vect_widened_op_tree to detect the widened subtraction and use
9394 vect_convert_inputs to convert the inputs to the common type.
9395 (vect_handle_widen_op_by_const): Delete.
9396 (vect_recog_widen_op_pattern): New function.
9397 (vect_recog_widen_mult_pattern): Use it.
9398 (vect_recog_widen_shift_pattern): Likewise.
9399 (vect_recog_widen_sum_pattern): Use
9400 vect_look_through_possible_promotion to handle the promoted
9403 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
9405 * gimple-iterator.c (gsi_for_stmt): Add a new overload that takes
9406 the containing gimple_seq *.
9407 * gimple-iterator.h (gsi_for_stmt): Declare it.
9408 * tree-vect-patterns.c (vect_recog_dot_prod_pattern)
9409 (vect_recog_sad_pattern, vect_recog_widen_sum_pattern)
9410 (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
9411 (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
9412 (vect_recog_mask_conversion_pattern): Remove STMT_VINFO_IN_PATTERN_P
9414 (vect_init_pattern_stmt, vect_set_pattern_stmt): New functions,
9416 (vect_mark_pattern_stmts): ...here. Handle cases in which the
9417 statement being replaced is part of an existing pattern
9418 definition sequence, inserting the new pattern statements before
9420 (vect_pattern_recog_1): Don't return a bool. If the statement
9421 is already part of a pattern, instead apply pattern matching
9422 to the pattern definition statements. Don't clear the
9423 STMT_VINFO_RELATED_STMT if is_pattern_stmt_p.
9424 (vect_pattern_recog): Don't break after the first match;
9425 continue processing the pattern definition statements instead.
9426 Don't bail out for STMT_VINFO_IN_PATTERN_P here.
9428 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
9430 * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
9431 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
9432 (vect_recog_widen_sum_pattern): Use it.
9434 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
9436 * tree-vect-loop.c (vectorizable_reduction): Assert that the
9437 phi is not a pattern statement and has not been replaced by
9438 a pattern statement.
9439 * tree-vect-patterns.c (type_conversion_p): Don't check
9440 STMT_VINFO_IN_PATTERN_P.
9441 (vect_recog_vector_vector_shift_pattern): Likewise.
9442 (vect_recog_dot_prod_pattern): Expect vect_is_simple_use to return
9443 the pattern statement rather than the original statement; check
9444 directly for a WIDEN_MULT_EXPR here.
9445 * tree-vect-slp.c (vect_get_and_check_slp_defs): Expect
9446 vect_is_simple_use to return the pattern statement rather
9447 than the original statement; use is_pattern_stmt_p to check
9448 for such a pattern statement.
9449 * tree-vect-stmts.c (process_use): Expect vect_is_simple_use
9450 to return the pattern statement rather than the original statement;
9451 don't do the same transformation here.
9452 (vect_is_simple_use): If the defining statement has been replaced
9453 by a pattern statement, return the pattern statement instead.
9454 Remove the corresponding (local) transformation from the vectype
9457 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
9459 * tree-vectorizer.h (vect_is_simple_use): Move the gimple ** to the
9460 end and default to null.
9461 * tree-vect-loop.c (vect_create_epilog_for_reduction)
9462 (vectorizable_reduction): Update calls accordingly, dropping the
9463 gimple ** argument if the passed-back statement isn't needed.
9464 * tree-vect-patterns.c (vect_get_internal_def, type_conversion_p)
9465 (vect_recog_rotate_pattern): Likewise.
9466 (vect_recog_mask_conversion_pattern): Likewise.
9467 * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
9468 (vect_mask_constant_operand_p): Likewise.
9469 * tree-vect-stmts.c (is_simple_and_all_uses_invariant, process_use):
9470 (vect_model_simple_cost, vect_get_vec_def_for_operand): Likewise.
9471 (get_group_load_store_type, get_load_store_type): Likewise.
9472 (vect_check_load_store_mask, vect_check_store_rhs): Likewise.
9473 (vectorizable_call, vectorizable_simd_clone_call): Likewise.
9474 (vectorizable_conversion, vectorizable_assignment): Likewise.
9475 (vectorizable_shift, vectorizable_operation): Likewise.
9476 (vectorizable_store, vect_is_simple_cond): Likewise.
9477 (vectorizable_condition, vectorizable_comparison): Likewise.
9478 (get_same_sized_vectype, vect_get_mask_type_for_stmt): Likewise.
9479 (vect_is_simple_use): Rename the def_stmt argument to def_stmt_out
9480 and move it to the end. Cope with null def_stmt_outs.
9482 2018-06-30 Bernd Edlinger <bernd.edlinger@hotmail.de>
9484 * Makefile.in (FLAGS_TO_PASS): Add RANLIB_FOR_TARGET.
9486 2018-06-29 Jeff Law <law@redhat.com>
9488 * config/v850/v850.c (v850_legitimate_address_p): Handle large
9489 displacements for TARGET_V850E2V3 and newer.
9490 (TARGET_LRA_P): Remove. Defaults to LRA now.
9491 * config/v850/v850.md (sign23byte_load): Remove.
9492 (unsign23byte_load, sign23hword_load, unsign23hword_load): Likewise.
9493 (23word_load, 23byte_store, 23hword_store, 23word_store): Likewise.
9495 2018-06-29 Martin Liska <mliska@suse.cz>
9498 * coverage.c (coverage_init): Mangle full path name.
9499 * doc/invoke.texi: Document the change.
9500 * gcov-io.c (mangle_path): New.
9501 * gcov-io.h (mangle_path): Likewise.
9502 * gcov.c (mangle_name): Use mangle_path for path mangling.
9504 2018-06-29 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
9506 * config/arm/arm.c (output_move_double): Don't allow STRD instructions
9507 if starting source register is not even.
9509 2018-06-29 Martin Liska <mliska@suse.cz>
9511 PR tree-optimization/86263
9512 * tree-switch-conversion.c (switch_decision_tree::try_switch_expansion):
9513 Make edge redirection.
9515 2018-06-29 David Malcolm <dmalcolm@redhat.com>
9517 * dumpfile.c (dump_loc): Add indentation based on scope depth.
9518 (dump_scope_depth): New variable.
9519 (get_dump_scope_depth): New function.
9520 (dump_begin_scope): New function.
9521 (dump_end_scope): New function.
9522 * dumpfile.h (get_dump_scope_depth): New declaration.
9523 (dump_begin_scope): New declaration.
9524 (dump_end_scope): New declaration.
9525 (class auto_dump_scope): New class.
9526 (AUTO_DUMP_SCOPE): New macro.
9527 * tree-vectorizer.h (DUMP_VECT_SCOPE): Reimplement in terms of
9530 2018-06-29 Richard Biener <rguenther@suse.de>
9532 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences): Assert
9533 compute_all_dependences succeeds.
9534 * tree-vect-loop.c (vect_get_datarefs_in_loop): Fail early if we
9535 exceed --param loop-max-datarefs-for-datadeps.
9537 2018-06-29 Jakub Jelinek <jakub@redhat.com>
9539 * config/rs6000/t-rs6000: Append rs6000-modes.h to TM_H.
9541 2018-06-28 Uros Bizjak <ubizjak@gmail.com>
9544 * config/i386/sse.md (*vec_extractv4si_0_zext_sse4): Use
9545 alternative 0 in preferred_for_speed attribute.
9547 2018-06-28 Paul Koning <ni1d@arrl.net>
9549 * config/pdp11/pdp11-protos.h (pdp11_shift_length): New function.
9550 * config/pdp11/pdp11.c (pdp11_shift_length): New function.
9551 * config/pdp11/pdp11.h (ADJUST_INSN_LENGTH): Remove.
9552 * config/pdp11/pdp11.md: Correct "length" attribute calculation
9553 for shift insn patterns.
9555 2018-06-28 David Malcolm <dmalcolm@redhat.com>
9557 * cgraph.c (cgraph_node::get_body): Replace assignments to
9558 "dump_file" with calls to set_dump_file.
9559 * dumpfile.c (alt_dump_file): Make static, and group with...
9560 (alt_flags): ...this definition.
9561 (dumps_are_enabled): New variable.
9562 (refresh_dumps_are_enabled): New function.
9563 (set_dump_file): New function.
9564 (set_alt_dump_file): New function.
9565 (gcc::dump_manager::dump_start): Replace assignments to
9566 "dump_file" and "alt_dump_file" with calls to set_dump_file and
9568 (gcc::dump_manager::dump_finish): Likewise.
9569 * dumpfile.h (alt_dump_file): Delete decl.
9570 (dumps_are_enabled): New variable decl.
9571 (set_dump_file): New function decl.
9572 (dump_enabled_p): Rewrite in terms of new "dumps_are_enabled"
9574 * tree-nested.c (lower_nested_functions): Replace assignments to
9575 "dump_file" with calls to set_dump_file.
9577 2018-06-28 Eric Botcazou <ebotcazou@adacore.com>
9579 * tree-cfg.c (verify_gimple_in_cfg): Call verify_location on the
9580 goto_locus of each outgoing edge of each basic block.
9582 2018-06-28 Richard Biener <rguenther@suse.de>
9584 * dwarf2out.c (decl_scope_table): Remove.
9585 (push_decl_scope): Likewise.
9586 (pop_decl_scope): Likewise.
9587 (gen_type_die_for_member): Do not call push/pop_decl_scope.
9588 (gen_struct_or_union_type_die): Likewise.
9589 (gen_tagged_type_die): Likewise.
9590 (dwarf2out_init): Do not initialize decl_scope_table.
9591 (dwarf2out_c_finalize): Do not free it.
9593 2018-06-28 Richard Biener <rguenther@suse.de>
9595 * dwarf2out.c (gen_subprogram_die): Use is_unit_die when
9596 deciding whether to not re-use a DIE.
9598 2018-06-28 Richard Biener <rguenther@suse.de>
9600 * dwarf2out.c (gen_subprogram_die): Always re-use DIEs with an
9601 DW_AT_abstract_origin attribute.
9603 2018-06-28 Martin Liska <mliska@suse.cz>
9605 * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
9606 Use newly introduced constants.
9607 * tree-switch-conversion.h (struct jump_table_cluster):
9608 Define max_ratio_for_size and max_ratio_for_speed.
9610 2018-06-28 Martin Liska <mliska@suse.cz>
9612 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
9613 Add new checking assert to catch invalid state.
9614 (jump_table_cluster::can_be_handled): Handle single case
9616 (jump_table_cluster::is_beneficial): Bail out for such case.
9617 (bit_test_cluster::find_bit_tests):
9618 Add new checking assert to catch invalid state.
9619 (bit_test_cluster::can_be_handled): Handle single case
9621 (bit_test_cluster::is_beneficial): Bail out for such case.
9622 (switch_decision_tree::analyze_switch_statement):
9625 2018-06-28 Martin Liska <mliska@suse.cz>
9627 * common.opt: Introduce -completion option.
9628 * gcc.c (driver_handle_option): Handle it.
9629 (driver::main): Print completions if completion
9631 * opt-suggestions.c (option_proposer::get_completions):
9633 (option_proposer::suggest_completion): Likewise.
9634 (option_proposer::find_param_completions): Likewise.
9635 (verify_autocompletions): Likewise.
9636 (test_completion_valid_options): Likewise.
9637 (test_completion_valid_params): Likewise.
9638 (in_completion_p): Likewise.
9639 (empty_completion_p): Likewise.
9640 (test_completion_partial_match): Likewise.
9641 (test_completion_garbage): Likewise.
9642 (opt_proposer_c_tests): Likewise.
9643 * opt-suggestions.h: Declare new functions.
9644 * opts.c (common_handle_option): Handle OPT__completion_.
9645 * selftest-run-tests.c (selftest::run_tests): Add
9646 opt_proposer_c_tests.
9647 * selftest.c (assert_str_startswith): New.
9648 * selftest.h (assert_str_startswith): Likewise.
9649 (opt_proposer_c_tests): New.
9650 (ASSERT_STR_STARTSWITH): Likewise.
9652 2018-06-28 Martin Liska <mliska@suse.cz>
9654 * Makefile.in: Add opt-suggestions.o.
9655 * gcc-main.c: Include opt-suggestions.h.
9656 * gcc.c (driver::driver): Likewise.
9657 (driver::~driver): Remove m_option_suggestions.
9658 (driver::build_option_suggestions): Moved to option_proposer.
9659 (driver::suggest_option): Likewise.
9660 (driver::handle_unrecognized_options): Use option_proposer.
9661 * gcc.h (class driver): Add new memver m_option_proposer.
9662 * opt-suggestions.c: New file.
9663 * opt-suggestions.h: New file.
9665 2018-06-28 Martin Liska <mliska@suse.cz>
9667 * vec.h (class auto_string_vec): New (moved from auto_argvec).
9668 (auto_string_vec::~auto_string_vec): Likewise.
9670 2018-06-28 Eric Botcazou <ebotcazou@adacore.com>
9672 * tree-inline.h (struct copy_body_data): Move remapping_type_depth and
9673 prevent_decl_creation_for_types fields up and add reset_location field.
9674 * tree-inline.c (remap_gimple_stmt): Force input_location on the new
9675 statement if id->reset_location is true.
9676 (copy_edges_for_bb): Do not set goto_locus on the new edges if
9677 id->reset_location is true.
9678 (copy_phis_for_bb): Force input_location on the arguments if
9679 id->reset_location is true.
9680 (expand_call_inline): Set id->reset_location if DECL_IGNORED_P
9681 is set on the function to be inlined.
9683 2018-06-27 Stephan Bergmann <sbergman@redhat.com>
9685 * doc/invoke.texi (Debugging Options): Add -gsplit-dwarf.
9687 2018-06-27 Dimitar Dimitrov <dimitar@dinux.eu>
9689 * lra-eliminations.c (update_reg_eliminate): Mark all spanning hard
9690 registers for Pmode.
9691 * lra-lives.c (check_pseudos_live_through_calls): Mark all spanning
9692 hard registers for the clobbered pseudo.
9694 2018-06-27 Paul Koning <ni1d@arrl.net>
9696 * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
9697 mutually exclusive options.
9698 * config/pdp11/constraints.md (h): New constraint.
9699 (O): Update definition to match shift code generation.
9700 (D): New constraint.
9701 * config/pdp11/pdp11-modes.def (CCNZ): Define mode.
9703 * config/pdp11/pdp11-protos.h (int_no_side_effect_operand): New
9705 (output_jump): Change arguments.
9706 (pdp11_fixed_cc_regs): New function.
9707 (pdp11_cc_mode): Ditto.
9708 (pdp11_expand_shift): Ditto.
9709 (pdp11_assemble_shift): Ditto.
9710 (pdp11_small_shift): Ditto.
9711 (pdp11_branch_cost): Remove.
9712 * config/pdp11/pdp11.c (pdp11_assemble_integer): Remove comments
9714 (pdp11_register_move_cost): Update for CC registers.
9715 (pdp11_rtx_costs): Add case for LSHIFTRT.
9716 (pdp11_output_jump): Add CCNZ mode conditional branches.
9717 (notice_update_cc_on_set): Remove.
9718 (pdp11_cc_mode): New function.
9719 (simple_memory_operand): Correct pre/post decrement case.
9720 (no_side_effect_operand): New function.
9721 (pdp11_regno_reg_class): Add CC_REGS class.
9722 (pdp11_fixed_cc_regs): New function.
9723 (pdp11_small_shift): New function.
9724 (pdp11_expand_shift): New function to expand shift insns.
9725 (pdp11_assemble_shift): New function to output shifts.
9726 (pdp11_branch_cost): Remove.
9727 (pdp11_modes_tieable_p): Make QI/HI modes tieable.
9728 * config/pdp11/pdp11.h (SIZE_TYPE): Ensure 16-bit type.
9729 (WCHAR_TYPE): Ditto.
9730 (PTRDIFF_TYPE): Ditto.
9731 (ADJUST_INSN_LENGTH): New macro.
9732 (FIXED_REGISTERS): Add CC registers.
9733 (CALL_USED_REGISTERS): Ditto.
9735 (REG_CLASS_NAMES): Ditto.
9736 (REG_CLASS_CONTENTS): Ditto.
9737 (SELECT_CC_MODE): Use new function.
9738 (TARGET_FLAGS_REGNUM): New macro.
9739 (TARGET_FIXED_CONDITION_CODE_REGS): Ditto.
9740 (cc0_reg_rtx): Remove.
9741 (CC_STATUS_MDEP): Remove.
9742 (CC_STATUS_MDEFP_INIT): Remove.
9743 (CC_IN_FPU): Remove.
9744 (NOTICE_UPDATE_CC): Remove.
9745 (REGISTER_NAMES): Add CC registers.
9746 (BRANCH_COST): Change to constant 1.
9747 * config/pdp11/pdp11.md: Rewrite for CCmode condition code
9749 * config/pdp11/pdp11.opt (mbcopy): Remove.
9750 (mbcopy-builtin): Remove.
9751 (mbranch-cheap): Remove.
9752 (mbranch-expensive): Remove.
9753 * config/pdp11/predicates.md (expand_shift_operand): Update to
9754 match shift code generation.
9755 (ccnz_operator): New predicate.
9756 * doc/invoke.texi (PDP-11 Options): Remove deleted options
9757 -mbcopy, -mbcopy-builtin, -mbranch-cheap, -mbranch-expensive.
9758 Remove non-existent option -mabshi, -mno-abshi. Document mutually
9760 * doc/md.texi (PDP-11): Document new D and h constraints. Update
9761 description of O constraint.
9763 2018-06-27 Jeff Law <law@redhat.com>
9764 Austin Law <austinklaw@gmail.com>
9766 * config/v850/v850.md (addsi3_set_flags): New pattern.
9767 (subsi3_set_flags, negsi2_set_flags, andsi3_set_flags): Likewise.
9768 (iorsi3_set_flags, xorsi3_set_flags, one_cmplsi2_set_flags): Likewise.
9769 (zero_extendhisi2_v850_set_flags): Likewise.
9770 (zero_extendqisi2_v850_set_flags): Likewise.
9771 (ashlsi3_set_flags, ashlsi3_v850e2_set_flags): Likewise.
9772 (lshrsi3_set_flags, lshrsi3_v850e2_set_flags): Likewise.
9773 (ashrsi3_set_flags, ashrsi3_v850e2_set_flags): Likewise.
9775 * config/v850/v850-protos.h (notice_update_cc): Remove.
9776 * config/v850/v850.c (v850_compare_op0, v850_compare_op1): Remove.
9777 (v850_print_operand): Handle 'D' and "d".
9778 (v850_select_cc_mode): Remove ATTRIBUTE_UNUSED for last argument.
9779 Add handling of arithmetic/logical operations compared against zero.
9780 (v850_gen_float_compare): Remove ATTRIBUTE_UNUSED for last argument.
9781 Do not look at v850_compare_op, instead get mode from last argument.
9782 (v850_gen_compare): Remove
9783 (increment_stack): Use addsi3_clobber_flags to avoid splitting failure
9784 after reload for prologue insns.
9785 (expand_prologue): Account for CLOBBER of CC_REGNUM in various
9787 (construct_save_jarl): Likewise.
9788 (TARGET_FLAGS_REGNUM): Define.
9789 * config/v850/v850.h (v850_compare_op0, v850_compare_op1): Remove.
9790 (NOTICE_UPDATE_CC): Remove.
9791 * config/v850/v850.md (v850_tst1): Use (reg:CCZ CC_REGNUM) rather
9792 than cc0. Conditionalize on reload_completed.
9793 (cmpsi_insn, setfcc_insn): Likewise.
9794 (tst1 splitter): Turn into define_and_split which sets the flags
9796 (cstoresi4, cbranchsf4, cbranchdf4, cbranchsi4_insn): Likewise.
9797 (cbranchsi4, branch_normal, branch_invert): Do not expose cc0 here.
9798 (cstoresf4, cstoredf4): Clobber the flags.
9799 (cmpsi, cmpsf, cmpdf): Remove expanders.
9800 (setf_insn): Remove pattern.
9801 (addsi3): Turn into define_and_split which clobbers the flags after
9802 reload and a suitable pattern (addsi3_clobber_flags) for use after
9804 (subsi3, negsi2, andsi3, iorsi3, xorsi3, one_cmplsi2) Likewise.
9805 (ashlsi3, ashlsi3_v850e2, lshrsi3, lsh4si3_v850e2): Likewise.
9806 (ashrsi3, ashrsi3_v850e2): Likewise.
9807 (bins): Clobber the flags.
9808 (movsicc_normal_cc, movsicc_normal, movsicc_tst1): Likewise.
9809 (movsicc_tst1_revesed, sasf, swap and rotate patterns): Likewise.
9810 (fix_loop_counter, call_internal_short, call_internal_long): Likewise.
9811 (call_value_internal_short, call_value_internal_long): Likewise.
9812 (callt_save_interrupt, callt_return_interrupt): Likewise.
9813 (save_interrupt, return_interrupt): Likewise.
9814 (callt_save_all_interrupt, save_all_interrupt): Likewise.
9815 (_save_all_interrupt, callt_restore_all_interrupt): Likewise.
9816 (restore_all_interrupt, _restore_all_interrupt): Likewise.
9817 (All FP comparisons): Only allow after reload has completed.
9819 (divh, divhu): Tweak output template.
9820 (branch_z_normal, branch_z_invert): Remove
9821 (branch_nz_normal, branch_nz_invert): Likewise.
9822 (extendhisi_insn, extendqisi_insn): Do not clobber flags.
9824 * config/v850/v850-modes.def (CCZ, CCNZ): Add new modes.
9825 * config/v850/v850.c (notice_update_cc): Remove.
9826 * config/v850/v850.h (CC_OVERFLOW_UNUSABLE): Remove
9827 (CC_NO_CARRY): Likewise.
9828 (NOTICE_UPDATE_CC): Define to nothing.
9829 * config/v850/v850.md: Remove block comment on cc0 handling
9830 Remove "cc" attribute from all patterns. Remove cc_status handling
9831 from all patterns. Minor formatting fixes.
9833 2018-06-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
9835 * config/aarch64/aarch64-cores.def (cortex-a76): New entry.
9836 (cortex-a76.cortex-a55): Likewise.
9837 * config/aarch64/aarch64-tune.md: Regenerate.
9838 * doc/invoke.texi (AArch64 Options): Document cortex-a76 and
9839 cortex-a76.cortex-a55.
9841 2018-06-27 Jeff Law <law@redhat.com>
9843 * config/v850/t-v850 (MULTILIB_OPTIONS): Remove 8byte-align.
9844 (MULTILIB_DIRNAMES): Similarly.
9846 2018-06-27 Eric Botcazou <ebotcazou@adacore.com>
9848 * gimple.h (gimple_return_retbnd): Delete.
9849 (gimple_return_set_retbnd): Likewise.
9850 * cgraphunit.c (cgraph_node::expand_thunk): Remove call to
9851 gimple_return_set_retbnd.
9852 * gimple-pretty-print.c (dump_gimple_return): Remove call to
9853 gimple_return_retbnd and adjust.
9854 * tree-inline.h (struct copy_body_data): Remove retbnd field.
9855 * tree-inline.c (remap_gimple_stmt): Remove handling of retbnd.
9856 Explicitly return NULL in a couple more cases. Move assertion
9857 on debug statements and remove unreachable code.
9858 (reset_debug_binding): Do not test id->retbnd.
9859 (expand_call_inline): Do not set it.
9861 2018-06-27 Rasmus Villemoes <rv@rasmusvillemoes.dk>
9863 * configure.ac: Add --disable-gcov option.
9864 * configure: Regenerate.
9865 * Makefile.in: Honour @enable_gcov@.
9866 * doc/install.texi: Document --disable-gcov.
9868 2018-06-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
9870 * config/arm/arm-cpus.in (cortex-a76): New entry.
9871 (cortex-a76.cortex-a55): Likewise.
9872 * config/arm/arm-tables.opt: Regenerate.
9873 * config/arm/arm-tune.md: Likewise.
9874 * config/arm/driver-arm.c (arm_cpu_table): Add Cortex-A76 entry.
9875 * doc/invoke.texi (ARM Options): Document cortex-a76 and
9876 cortex-a76.cortex-a55.
9878 2018-06-27 Tamar Christina <tamar.christina@arm.com>
9881 * config/aarch64/aarch64.md (*movhf_aarch64): Add dup v0.4h pattern.
9883 2018-06-27 Siddhesh Poyarekar <siddhesh@sourceware.org>
9885 * config/aarch64/aarch64.h (CALL_USE_REGISTERS): Fix obsolete
9887 (EPILOGUE_USES): Likewise.
9889 2018-06-26 Eric Botcazou <ebotcazou@adacore.com>
9891 * tree-inline.c (remap_location): New function extracted from...
9892 (copy_edges_for_bb): Add ID parameter. Remap goto_locus.
9893 (copy_phis_for_bb): ...here. Call remap_location.
9894 (copy_cfg_body): Adjust call to copy_edges_for_bb.
9896 2018-06-26 Aaron Sawdey <acsawdey@linux.ibm.com>
9898 * config/rs6000/rs6000-string.c (expand_block_clear): Don't use
9899 unaligned vsx for 16B memset.
9901 2018-06-26 Segher Boessenkool <segher@kernel.crashing.org>
9904 * config/rs6000/rs6000.c (rs6000_init_builtins): Do not set
9905 ieee128_float_type_node to long_double_type_node unless
9906 TARGET_LONG_DOUBLE_128 is set.
9908 2018-06-26 David Malcolm <dmalcolm@redhat.com>
9910 * cfgloop.c (get_loop_location): Convert return type from
9911 location_t to dump_user_location_t, replacing INSN_LOCATION lookups
9912 by implicit construction from rtx_insn *, and using
9913 dump_user_location_t::from_function_decl for the fallback case.
9914 * cfgloop.h (get_loop_location): Convert return type from
9915 location_t to dump_user_location_t.
9916 * cgraphunit.c (walk_polymorphic_call_targets): Update call to
9917 dump_printf_loc to pass in a dump_location_t rather than a
9918 location_t, via the gimple stmt.
9919 * coverage.c (get_coverage_counts): Update calls to
9920 dump_printf_loc to pass in dump_location_t rather than a
9922 * doc/optinfo.texi (Dump types): Convert example of
9923 dump_printf_loc from taking "locus" to taking "insn". Update
9924 description of the "_loc" calls to cover dump_location_t.
9925 * dumpfile.c: Include "backend.h", "gimple.h", "rtl.h", and
9927 (dump_user_location_t::dump_user_location_t): New constructors,
9928 from gimple *stmt and rtx_insn *.
9929 (dump_user_location_t::from_function_decl): New function.
9930 (dump_loc): Make static.
9931 (dump_gimple_stmt_loc): Convert param "loc" from location_t to
9932 const dump_location_t &.
9933 (dump_generic_expr_loc): Delete.
9934 (dump_printf_loc): Convert param "loc" from location_t to
9935 const dump_location_t &.
9936 (selftest::test_impl_location): New function.
9937 (selftest::dumpfile_c_tests): New function.
9938 * dumpfile.h: Include "profile-count.h".
9939 (class dump_user_location_t): New class.
9940 (struct dump_impl_location_t): New struct.
9941 (class dump_location_t): New class.
9942 (dump_printf_loc): Convert 2nd param from source_location to
9943 const dump_location_t &.
9944 (dump_generic_expr_loc): Delete.
9945 (dump_gimple_stmt_loc): Convert 2nd param from source_location to
9946 const dump_location_t &.
9947 * gimple-fold.c (fold_gimple_assign): Update call to
9948 dump_printf_loc to pass in a dump_location_t rather than a
9949 location_t, via the gimple stmt.
9950 (gimple_fold_call): Likewise.
9951 * gimple-loop-interchange.cc
9952 (loop_cand::analyze_iloop_reduction_var): Update for change to
9953 check_reduction_path.
9954 (tree_loop_interchange::interchange): Update for change to
9956 * graphite-isl-ast-to-gimple.c (scop_to_isl_ast): Update for
9957 change in return-type of find_loop_location.
9958 (graphite_regenerate_ast_isl): Likewise.
9959 * graphite-optimize-isl.c (optimize_isl): Likewise.
9960 * graphite.c (graphite_transform_loops): Likewise.
9961 * ipa-devirt.c (ipa_devirt): Update call to dump_printf_loc to
9962 pass in a dump_location_t rather than a location_t, via the
9964 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
9965 * ipa.c (walk_polymorphic_call_targets): Likewise.
9966 * loop-unroll.c (report_unroll): Convert "locus" param from
9967 location_t to dump_location_t.
9968 (decide_unrolling): Update for change to get_loop_location's
9970 * omp-grid.c (struct grid_prop): Convert field "target_loc" from
9971 location_t to dump_user_location_t.
9972 (grid_find_single_omp_among_assignments_1): Updates calls to
9973 dump_printf_loc to pass in a dump_location_t rather than a
9974 location_t, via the gimple stmt.
9975 (grid_parallel_clauses_gridifiable): Convert "tloc" from
9976 location_t to dump_location_t. Updates calls to dump_printf_loc
9977 to pass in a dump_location_t rather than a location_t, via the
9979 (grid_inner_loop_gridifiable_p): Likewise.
9980 (grid_dist_follows_simple_pattern): Likewise.
9981 (grid_gfor_follows_tiling_pattern): Likewise.
9982 (grid_target_follows_gridifiable_pattern): Likewise.
9983 (grid_attempt_target_gridification): Convert initialization
9984 of local "grid" from memset to zero-initialization; FIXME: does
9985 this require C++11? Update call to dump_printf_loc to pass in a
9986 optinfo_location rather than a location_t, via the gimple stmt.
9987 * profile.c (read_profile_edge_counts): Updates call to
9988 dump_printf_loc to pass in a dump_location_t rather than a
9990 (compute_branch_probabilities): Likewise.
9991 * selftest-run-tests.c (selftest::run_tests): Call
9993 * selftest.h (dumpfile_c_tests): New decl.
9994 * tree-loop-distribution.c (pass_loop_distribution::execute):
9995 Update for change in return type of find_loop_location.
9996 * tree-parloops.c (parallelize_loops): Likewise.
9997 * tree-ssa-loop-ivcanon.c (try_unroll_loop_completely): Convert
9998 "locus" from location_t to dump_user_location_t.
9999 (canonicalize_loop_induction_variables): Likewise.
10000 * tree-ssa-loop-ivopts.c (tree_ssa_iv_optimize_loop): Update
10001 for change in return type of find_loop_location.
10002 * tree-ssa-loop-niter.c (number_of_iterations_exit): Update call
10003 to dump_printf_loc to pass in a dump_location_t rather than a
10004 location_t, via the stmt.
10005 * tree-ssa-sccvn.c (eliminate_dom_walker::before_dom_children):
10007 * tree-vect-loop-manip.c (find_loop_location): Convert return
10008 type from source_location to dump_user_location_t.
10009 (vect_do_peeling): Update for above change.
10010 (vect_loop_versioning): Update for change in type of
10012 * tree-vect-loop.c (check_reduction_path): Convert "loc" param
10013 from location_t to dump_user_location_t.
10014 (vect_estimate_min_profitable_iters): Update for change in type
10016 * tree-vect-slp.c (vect_print_slp_tree): Convert param "loc" from
10017 location_t to dump_location_t.
10018 (vect_slp_bb): Update for change in type of vect_location.
10019 * tree-vectorizer.c (vect_location): Convert from source_location
10020 to dump_user_location_t.
10021 (try_vectorize_loop_1): Update for change in vect_location's type.
10022 (vectorize_loops): Likewise.
10023 (increase_alignment): Likewise.
10024 * tree-vectorizer.h (vect_location): Convert from source_location
10025 to dump_user_location_t.
10026 (find_loop_location): Convert return type from source_location to
10027 dump_user_location_t.
10028 (check_reduction_path): Convert 1st param from location_t to
10029 dump_user_location_t.
10030 * value-prof.c (check_counter): Update call to dump_printf_loc to
10031 pass in a dump_user_location_t rather than a location_t; update
10032 call to error_at for change in type of "locus".
10033 (check_ic_target): Update call to dump_printf_loc to
10034 pass in a dump_user_location_t rather than a location_t, via the
10037 2018-06-26 Robin Dapp <rdapp@linux.vnet.ibm.com>
10039 * config/s390/s390.h (enum processor_flags): Do not use
10040 default tune parameter when -march was specified.
10042 2018-06-26 Jakub Jelinek <jakub@redhat.com>
10045 * config/i386/i386.md (setcc + movzbl to xor + setcc peephole2s):
10046 Check reg_overlap_mentioned_p in addition to reg_set_p with the same
10049 2018-06-26 Richard Biener <rguenther@suse.de>
10051 PR tree-optimization/86287
10053 * tree-vect-loop.c (vect_transform_loop_stmt): Fix read-after-free.
10054 (vect_analyze_loop): Initialize n_stmts.
10056 2018-06-26 Richard Biener <rguenther@suse.de>
10058 PR middle-end/86271
10059 * fold-const.c (fold_convertible_p): Pointer extension
10062 2018-06-26 Alexandre Oliva <aoliva@redhat.com>
10065 * dwarf2out.c (loc_list_has_views): Adjust comments.
10066 (dw_loc_list): Split single cross-partition range with
10069 2018-06-25 Jeff Law <law@redhat.com>
10071 * common/config/v850/v850-common.c (TARGET_DEFAULT_TARGET_FLAGS): Turn
10072 on -mbig-switch by default.
10074 * config/v850/predicates.md (const_float_1_operand): Fix match_code
10076 (const_float_0_operand): Remove unused predicate.
10077 * config/v850/v850.md (define_constants): Remove UNSPEC_LOOP.
10078 (define_c_enum unspec): Add LOOP, RCP and RSQRT constants.
10079 (recipsf2): New expander. Original pattern now called
10081 (recipdf2, recipdf2_insn): Similarly.
10082 (rsqrtsf2, rsqrtsf2_insn): Similarly
10083 (rsqrtdf2, rsqrtdf2_insn): Similarly
10085 2018-06-26 Gerald Pfeifer <gerald@pfeifer.com>
10087 * ginclude/stddef.h: Remove an obsolete comment on FreeBSD 5.
10088 Simplify logic for FreeBSD (twice).
10090 2018-06-25 Martin Sebor <msebor@redhat.com>
10092 PR tree-optimization/86204
10093 * tree-ssa-strlen.c (handle_builtin_strlen): Avoid storing
10094 a strnlen result if it's less than the length of the string.
10096 2018-06-25 Martin Sebor <msebor@redhat.com>
10098 PR tree-optimization/85700
10099 * gimple-fold.c (gimple_fold_builtin_strncat): Adjust comment.
10100 * tree-ssa-strlen.c (is_strlen_related_p): Handle integer subtraction.
10101 (maybe_diag_stxncpy_trunc): Distinguish strncat from strncpy.
10103 2018-06-25 Martin Sebor <msebor@redhat.com>
10105 * doc/extend.texi (Zero-length arrays): Update and clarify.
10107 2018-06-25 Michael Meissner <meissner@linux.ibm.com>
10109 * config.gcc (powerpc64le*): Revert January 16th, 2018 patch that
10110 added IEEE/IBM long double multilib support on PowerPC little
10111 endian Linux systems.
10112 * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Likewise.
10113 (MULTILIB_DEFAULTS): Likewise.
10114 * config/rs6000/rs6000.c (rs6000_option_override_internal):
10116 * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Likewise.
10117 * config/rs6000/t-ldouble-linux64le-ibm: Delete, no longer used.
10118 * config/rs6000/t-ldouble-linux64le-ieee: Delete, no longer used.
10120 2018-06-25 Alexander Monakov <amonakov@ispras.ru>
10122 PR middle-end/86311
10123 * sort.cc (REORDER_23): Avoid memcpy with same destination and source.
10124 (REORDER_45): Likewise.
10126 2018-06-25 Jeff Law <law@redhat.com>
10128 * config/v850/v850.md (divmodhi4): Make sure to sign extend the
10129 dividend to 32 bits. Adjust length.
10130 (udivmodhi4): Cleanup output template. Fix length.
10132 2018-06-25 Carl Love <cel@us.ibm.com>
10134 * config/rs6000/vsx.md: Change word selector to prefered location.
10136 2018-06-25 Richard Biener <rguenther@suse.de>
10138 PR tree-optimization/86304
10139 * tree-vectorizer.c (vectorize_loops): Walk over new possibly
10140 epilogue-if-converted loops as well.
10142 2018-06-25 Jan Hubicka <hubicka@ucw.cz>
10144 * lto-section-out.c (lto_begin_section): Do not print section
10145 name for noaddr and unnumbered dumps.
10147 2018-06-25 Richard Biener <rguenther@suse.de>
10149 * tree-vectorizer.h (struct vec_info_shared): New structure
10150 with parts split out from struct vec_info and loop_nest from
10151 struct _loop_vec_info.
10152 (struct vec_info): Adjust accordingly.
10153 (struct _loop_vec_info): Likewise.
10154 (LOOP_VINFO_LOOP_NEST): Adjust.
10155 (LOOP_VINFO_DATAREFS): Likewise.
10156 (LOOP_VINFO_DDRS): Likewise.
10157 (struct _bb_vec_info): Likewise.
10158 (BB_VINFO_DATAREFS): Likewise.
10159 (BB_VINFO_DDRS): Likewise.
10160 (struct _stmt_vec_info): Add dr_aux member.
10161 (DR_VECT_AUX): Adjust to refer to member of DR_STMTs vinfo.
10162 (DR_MISALIGNMENT_UNINITIALIZED): New.
10163 (set_dr_misalignment): Adjust.
10164 (dr_misalignment): Assert misalign isn't DR_MISALIGNMENT_UNINITIALIZED.
10165 (vect_analyze_loop): Adjust prototype.
10166 (vect_analyze_loop_form): Likewise.
10167 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
10168 Compute dependences lazily.
10169 (vect_record_base_alignments): Use shared datarefs/ddrs.
10170 (vect_verify_datarefs_alignment): Likewise.
10171 (vect_analyze_data_refs_alignment): Likewise.
10172 (vect_analyze_data_ref_accesses): Likewise.
10173 (vect_analyze_data_refs): Likewise.
10174 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Add
10175 constructor parameter for shared part.
10176 (vect_analyze_loop_form): Pass in shared part and adjust.
10177 (vect_analyze_loop_2): Pass in storage for the number of
10178 stmts. Move loop nest finding to the caller. Compute
10180 (vect_analyze_loop): Pass in shared part.
10181 (vect_transform_loop): Verify shared datarefs are unchanged.
10182 * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Add
10183 constructor parameter for shared part.
10184 (vect_slp_analyze_bb_1): Pass in shared part and adjust.
10185 (vect_slp_bb): Verify shared datarefs are unchanged before
10187 * tree-vect-stmts.c (ensure_base_align): Adjust for DR_AUX
10189 (new_stmt_vec_info): Initialize DR_AUX misalignment to
10190 DR_MISALIGNMENT_UNINITIALIZED.
10191 * tree-vectorizer.c (vec_info::vec_info): Add constructor
10192 parameter for shared part.
10193 (vec_info::~vec_info): Adjust.
10194 (vec_info_shared::vec_info_shared): New.
10195 (vec_info_shared::~vec_info_shared): Likewise.
10196 (vec_info_shared::save_datarefs): Likewise.
10197 (vec_info_shared::check_datarefs): Likewise.
10198 (try_vectorize_loop_1): Construct shared part live for analyses
10199 of a single loop for multiple vector sizes.
10200 * tree-parloops.c (gather_scalar_reductions): Adjust.
10202 2018-06-25 Richard Biener <rguenther@suse.de>
10204 * tree-vect-data-refs.c (vect_find_stmt_data_reference): Modify
10205 DR for SIMD lane accesses here and mark DR with (void *)-1 aux.
10206 (vect_analyze_data_refs): Remove similar code from here and
10207 simplify accordingly.
10209 2018-06-25 Richard Biener <rguenther@suse.de>
10211 * tree-vect-data-refs.c (vect_check_gather_scatter): Fail
10212 for reverse storage order accesses rather than asserting
10213 they cannot happen here.
10215 2018-06-25 Tom de Vries <tdevries@suse.de>
10218 * config/i386/i386.md (define_insn "*tls_global_dynamic_64_<mode>"):
10219 Use data16 instead of .byte for insn prefix.
10221 2018-06-25 Andreas Krebbel <krebbel@linux.ibm.com>
10224 * parser.c (make_char_string_pack): Pass this literal chars
10225 through cpp_interpret_string.
10226 (cp_parser_userdef_numeric_literal): Check the result of
10227 make_char_string_pack.
10229 2018-06-24 Maya Rashish <coypu@sdf.org>
10231 * ginclude/stddef.h: Simplify conditions around avoiding
10232 re-definition of __size_t.
10234 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
10236 * lto-streamer-out.c (tree_is_indexable): Make LABEL_DECL nonindexable
10237 unless it is forced or nonlocal; assert that we stream no IMPORTED_DECL.
10239 2018-06-22 Maya Rashish <coypu@sdf.org>
10241 * doc/invoke.texi (mno-fancy-math-387): Update for changes
10242 made to OpenBSD and NetBSD through the years.
10244 2018-06-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
10246 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
10247 behavior of vec_pack (vector double, vector double) to match
10248 behavior of vec_float2 (vector double, vector double).
10250 2018-06-22 Olivier Hainque <hainque@adacore.com>
10252 * gimplify.c (gimplify_function_tree): Prevent creation
10253 of a trampoline for the address of the current function
10254 passed to entry/exit instrumentation hooks.
10256 2018-06-22 Aaron Sawdey <acsawdey@linux.ibm.com>
10259 * config/rs6000/rs6000-string.c (expand_strn_compare): Handle -m32
10262 2018-06-22 Martin Liska <mliska@suse.cz>
10264 PR tree-optimization/86263
10265 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
10266 Bail out if is_enabled is false.
10267 * tree-switch-conversion.h (jump_table_cluster::is_enabled):
10269 (jump_table_cluster::is_enabled): New function.
10271 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
10273 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
10274 BINFO_BASE_ACCESSES and BINFO_VPTR_FIELD.
10275 * tree-streamer-in.c (streamer_read_tree_bitfields): Likewise.
10276 (lto_input_ts_binfo_tree_pointers): Likewise.
10277 * tree-streamer-out.c (streamer_write_tree_bitfields,
10278 write_ts_binfo_tree_pointers): Likewise.
10279 * tree.c (free_lang_data_in_binfo): Clear BINFO_VPTR_FIELD.
10281 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
10283 * tree.c (free_lang_data_in_type): Free all TYPE_VFIELDs.
10285 2018-06-22 Martin Liska <mliska@suse.cz>
10287 * symbol-summary.h (get): Make it pure and inline move
10288 functionality from ::get function.
10289 (get): Remove and inline into ::get and ::get_create.
10290 (get_create): Move code from ::get function.
10292 2018-06-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
10295 * config/i386/sol2.h (CPP_SPEC): Don't pass -P for
10296 -x assembler-with-cpp.
10298 2018-06-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
10300 * config/sol2.h (TARGET_OS_CPP_BUILTINS): Define
10301 _FILE_OFFSET_BITS=64 for C++.
10303 2018-06-21 Michael Meissner <meissner@linux.ibm.com>
10305 * config/rs6000/rs6000.md (extendtfif2): Add missing 128-bit
10306 conversion insn that shows up when pr85657-3.c is compiled using
10307 IEEE 128-bit long double.
10308 (neg<mode>2_internal): Use the correct mode to check whether the
10309 mode is IBM extended.
10310 * config/rs6000/rs6000.c (init_float128_ieee): Prevent complex
10311 multiply and divide external functions from being created more
10314 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
10316 * cfgrtl.c (fixup_reorder_chain): Do not emit NOPs in DECL_IGNORED_P
10318 (rtl_merge_blocks): Likewise. Do not emit a NOP if the location of
10319 the edge can be forwarded.
10320 (cfg_layout_merge_blocks): Likewise.
10322 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
10324 * except.c (finish_eh_generation): Commit edge insertions only after
10325 the EH edges have been redirected from post-landing to landing pads.
10327 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
10329 * tree-nested.c (get_frame_type): Use create_tmp_var_raw instead of
10330 create_tmp_var_for to create the FRAME decl.
10331 (finalize_nesting_tree_1): Do not unchain the FRAME decl.
10333 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
10335 * tree-inline.c (copy_edges_for_bb): Minor tweak.
10336 (maybe_move_debug_stmts_to_successors): Also reset the locus of the
10337 debug statement when resetting its value.
10338 (expand_call_inline): Copy the locus of the call onto the assignment
10339 of the return value, if any. Use local variable in more cases.
10341 2018-06-21 Martin Liska <mliska@suse.cz>
10343 * ipa-pure-const.c (propagate_nothrow): Use
10344 funct_state_summaries->get.
10345 (dump_malloc_lattice): Likewise.
10346 (propagate_malloc): Likewise.
10348 2018-06-21 Richard Biener <rguenther@suse.de>
10350 * lto-streamer-out.c (DFS::DFS_write_tree_body): Update outdated
10351 comment. Follow BLOCK_ABSTRACT_ORIGIN unconditionally.
10352 * tree-streamer-in.c (lto_input_ts_block_tree_pointers): Update
10354 * tree-streamer-out.c (write_ts_block_tree_pointers): Stream
10355 BLOCK_ABSTRACT_ORIGIN unconditionally.
10357 2018-06-21 David Malcolm <dmalcolm@redhat.com>
10359 * ipa-cp.c (ipcp_driver): Set edge_clone_summaries to NULL after
10361 * ipa-reference.c (ipa_reference_c_finalize): Delete
10362 ipa_ref_opt_sum_summaries and set it to NULL.
10364 2018-06-21 Tom de Vries <tdevries@suse.de>
10366 PR tree-optimization/85859
10367 * tree-ssa-tail-merge.c (stmt_local_def): Copy gimple_is_call
10368 test with comment from bb_no_side_effects_p.
10370 2018-06-21 Richard Biener <rguenther@suse.de>
10372 PR tree-optimization/86232
10373 * tree-ssa-loop-niter.c (number_of_iterations_popcount): Adjust
10374 max for constant niter.
10376 2018-06-21 Andre Vieira <andre.simoesdiasvieira@arm.com>
10378 * config/aarch64/aarch64-simd.md
10379 (*aarch64_crypto_aes<aes_op>v16qi_xor_combine): New.
10381 2018-06-21 Andre Vieira <andre.simoesdiasvieira@arm.com>
10383 * config/aarch64/aarch64-simd.md (aarch64_crypto_aes<aes_op>v16qi):
10384 Make opernads of the unspec commutative.
10386 2018-06-21 Richard Biener <rguenther@suse.de>
10388 * tree-data-ref.c (dr_step_indicator): Handle NULL DR_STEP.
10389 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr):
10390 Avoid calling vect_mark_for_runtime_alias_test with gathers or scatters.
10391 (vect_analyze_data_ref_dependence): Re-order checks to deal with
10393 (vect_record_base_alignments): Do not record base alignment
10394 for gathers or scatters.
10395 (vect_compute_data_ref_alignment): Drop return value that is always
10396 true. Bail out early for gathers or scatters.
10397 (vect_enhance_data_refs_alignment): Bail out early for gathers
10399 (vect_find_same_alignment_drs): Likewise.
10400 (vect_analyze_data_refs_alignment): Remove dead code.
10401 (vect_slp_analyze_and_verify_node_alignment): Likewise.
10402 (vect_analyze_data_refs): For possible gathers or scatters do
10403 not create an alternate DR, just check their possible validity
10404 and mark them. Adjust DECL_NONALIASED handling to not rely
10405 on DR_BASE_ADDRESS.
10406 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Do not
10407 update inits of gathers or scatters.
10408 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern):
10409 Also copy gather/scatter flag to pattern vinfo.
10411 2018-06-20 Kelvin Nilsen <kelvin@gcc.gnu.org>
10413 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
10414 behavior of vec_packsu (vector unsigned long long, vector unsigned
10415 long long) to match behavior of vec_packs with same signature.
10417 2018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
10418 Thomas Schwinge <thomas@codesourcery.com>
10419 Cesar Philippidis <cesar@codesourcery.com>
10421 * gimplify.c (gimplify_scan_omp_clauses): Add support for
10422 OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
10423 (gimplify_adjust_omp_clauses): Likewise.
10424 (gimplify_oacc_declare_1): Add support for GOMP_MAP_RELEASE, remove
10425 support for GOMP_MAP_FORCE_{ALLOC,TO,FROM,TOFROM}.
10426 (gimplify_omp_target_update): Update handling of acc update and
10428 * omp-low.c (install_var_field): Remove unused parameter
10429 base_pointers_restrict.
10430 (scan_sharing_clauses): Remove base_pointers_restrict parameter.
10431 Update call to install_var_field. Handle OMP_CLAUSE_{IF_PRESENT,
10433 (omp_target_base_pointers_restrict_p): Delete.
10434 (scan_omp_target): Update call to scan_sharing_clauses.
10435 * tree-core.h (enum omp_clause_code): Add OMP_CLAUSE_{IF_PRESENT,
10437 * tree-nested.c (convert_nonlocal_omp_clauses): Handle
10438 OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
10439 (convert_local_omp_clauses): Likewise.
10440 * tree-pretty-print.c (dump_omp_clause): Likewise.
10441 * tree.c (omp_clause_num_ops): Add entries for OMP_CLAUSE_{IF_PRESENT,
10443 (omp_clause_code_name): Likewise.
10445 2018-06-20 Jakub Jelinek <jakub@redhat.com>
10448 * var-tracking.c (use_narrower_mode_test): Check if shift amount can
10451 PR tree-optimization/86231
10452 * tree-vrp.c (union_ranges): For ( [ ) ] or ( )[ ] range and
10453 anti-range don't overwrite *vr0min before using it to compute *vr0max.
10455 2018-06-20 Tom de Vries <tdevries@suse.de>
10457 PR tree-optimization/86097
10458 * tree-ssa-loop-manip.c (canonicalize_loop_ivs): Also convert *nit to
10459 iv type if signedness of iv type is not the same as that of *nit.
10461 2018-06-20 Jakub Jelinek <jakub@redhat.com>
10463 * cfgrtl.c (rtl_verify_edges): Formatting fix. If bb->preds has any
10464 EDGE_EH edges, verify they are all EDGE_EH.
10466 2018-06-20 Maya Rashish <coypu@sdf.org>
10468 * ginclude/stddef.h: Limit #include <machine/ansi.h> to NetBSD.
10470 2018-06-20 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
10472 * config/aarch64/aarch64-tuning-flags.def (no_ldp_stp_qregs): New.
10473 * config/aarch64/aarch64.c (xgene1_tunings): Add
10474 AARCH64_EXTRA_TUNE_NO_LDP_STP_QREGS to tune_flags.
10475 (aarch64_mode_valid_for_sched_fusion_p):
10476 Allow 16-byte modes.
10477 (aarch64_classify_address): Allow 16-byte modes for load_store_pair_p.
10478 * config/aarch64/aarch64-ldpstp.md: Add peepholes for LDP STP of
10480 * config/aarch64/aarch64-simd.md (load_pair<VQ:mode><VQ2:mode>):
10482 (vec_store_pair<VQ:mode><VQ2:mode>): Likewise.
10483 * config/aarch64/iterators.md (VQ2): New mode iterator.
10485 2018-06-20 Martin Liska <mliska@suse.cz>
10487 * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
10488 Change default ratio from 10 to 8.
10490 2018-06-20 Martin Liska <mliska@suse.cz>
10492 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
10494 (bit_test_cluster::find_bit_tests): Likewise.
10495 (switch_decision_tree::analyze_switch_statement): Find clusters.
10496 * tree-switch-conversion.h (struct jump_table_cluster): Document
10499 2018-06-20 Martin Liska <mliska@suse.cz>
10501 * tree-switch-conversion.c (switch_conversion::collect):
10502 Record m_uniq property.
10503 (switch_conversion::expand): Bail out for special conditions.
10504 (group_cluster::~group_cluster): New.
10505 (group_cluster::group_cluster): Likewise.
10506 (group_cluster::dump): Likewise.
10507 (jump_table_cluster::emit): New.
10508 (switch_decision_tree::fix_phi_operands_for_edges): New.
10509 (struct case_node): Remove struct.
10510 (jump_table_cluster::can_be_handled): New.
10511 (case_values_threshold): Moved to header.
10512 (reset_out_edges_aux): Likewise.
10513 (jump_table_cluster::is_beneficial): New.
10514 (bit_test_cluster::can_be_handled): Likewise.
10515 (add_case_node): Remove.
10516 (bit_test_cluster::is_beneficial): New.
10517 (case_bit_test::cmp): New.
10518 (bit_test_cluster::emit): New.
10519 (expand_switch_as_decision_tree_p): Remove.
10520 (bit_test_cluster::hoist_edge_and_branch_if_true): New.
10521 (fix_phi_operands_for_edge): Likewise.
10522 (switch_decision_tree::analyze_switch_statement): New.
10523 (compute_cases_per_edge): Move ...
10524 (switch_decision_tree::compute_cases_per_edge): ... here.
10525 (try_switch_expansion): Likewise.
10526 (switch_decision_tree::try_switch_expansion): Likewise.
10527 (record_phi_operand_mapping): Likewise.
10528 (switch_decision_tree::record_phi_operand_mapping): Likewise.
10529 (emit_case_decision_tree): Likewise.
10530 (switch_decision_tree::emit): Likewise.
10531 (balance_case_nodes): Likewise.
10532 (switch_decision_tree::balance_case_nodes): Likewise.
10533 (dump_case_nodes): Likewise.
10534 (switch_decision_tree::dump_case_nodes): Likewise.
10535 (emit_jump): Likewise.
10536 (switch_decision_tree::emit_jump): Likewise.
10537 (emit_cmp_and_jump_insns): Likewise.
10538 (switch_decision_tree::emit_cmp_and_jump_insns): Likewise.
10539 (emit_case_nodes): Likewise.
10540 (switch_decision_tree::emit_case_nodes): Likewise.
10541 (conditional_probability): Remove.
10542 * tree-switch-conversion.h (enum cluster_type): New.
10544 (struct cluster): Likewise.
10545 (cluster::cluster): Likewise.
10546 (struct simple_cluster): Likewise.
10547 (simple_cluster::simple_cluster): Likewise.
10548 (struct group_cluster): Likewise.
10549 (struct jump_table_cluster): Likewise.
10550 (struct bit_test_cluster): Likewise.
10551 (struct min_cluster_item): Likewise.
10552 (struct case_tree_node): Likewise.
10553 (case_tree_node::case_tree_node): Likewise.
10554 (jump_table_cluster::case_values_threshold): Likewise.
10555 (struct case_bit_test): Likewise.
10556 (struct switch_decision_tree): Likewise.
10557 (struct switch_conversion): Likewise.
10558 (switch_decision_tree::reset_out_edges_aux): Likewise.
10560 2018-06-20 Martin Liska <mliska@suse.cz>
10562 * tree-switch-conversion.c (MAX_CASE_BIT_TESTS): Remove.
10563 (hoist_edge_and_branch_if_true): Likewise.
10564 (expand_switch_using_bit_tests_p): Likewise.
10565 (struct case_bit_test): Likewise.
10566 (case_bit_test_cmp): Likewise.
10567 (emit_case_bit_tests): Likewise.
10568 (switch_conversion::switch_conversion): New class.
10569 (struct switch_conv_info): Remove old struct.
10570 (collect_switch_conv_info): More to ...
10571 (switch_conversion::collect): ... this.
10572 (check_range): Likewise.
10573 (switch_conversion::check_range): Likewise.
10574 (check_all_empty_except_final): Likewise.
10575 (switch_conversion::check_all_empty_except_final): Likewise.
10576 (check_final_bb): Likewise.
10577 (switch_conversion::check_final_bb): Likewise.
10578 (create_temp_arrays): Likewise.
10579 (switch_conversion::create_temp_arrays): Likewise.
10580 (free_temp_arrays): Likewise.
10581 (gather_default_values): Likewise.
10582 (switch_conversion::gather_default_values): Likewise.
10583 (build_constructors): Likewise.
10584 (switch_conversion::build_constructors): Likewise.
10585 (constructor_contains_same_values_p): Likewise.
10586 (switch_conversion::contains_same_values_p): Likewise.
10587 (array_value_type): Likewise.
10588 (switch_conversion::array_value_type): Likewise.
10589 (build_one_array): Likewise.
10590 (switch_conversion::build_one_array): Likewise.
10591 (build_arrays): Likewise.
10592 (switch_conversion::build_arrays): Likewise.
10593 (gen_def_assigns): Likewise.
10594 (switch_conversion::gen_def_assigns): Likewise.
10595 (prune_bbs): Likewise.
10596 (switch_conversion::prune_bbs): Likewise.
10597 (fix_phi_nodes): Likewise.
10598 (switch_conversion::fix_phi_nodes): Likewise.
10599 (gen_inbound_check): Likewise.
10600 (switch_conversion::gen_inbound_check): Likewise.
10601 (process_switch): Use the newly created class.
10602 (switch_conversion::expand): New.
10603 (switch_conversion::~switch_conversion): New.
10604 * tree-switch-conversion.h: New file.
10606 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
10608 * tree-vectorizer.h (NUM_PATTERNS, vect_recog_func_ptr): Move to
10609 tree-vect-patterns.c.
10610 * tree-vect-patterns.c (vect_supportable_direct_optab_p): New function.
10611 (vect_recog_dot_prod_pattern): Use it. Remove the type_in argument.
10612 (vect_recog_sad_pattern): Likewise.
10613 (vect_recog_widen_sum_pattern): Likewise.
10614 (vect_recog_pow_pattern): Likewise. Check for a null vectype.
10615 (vect_recog_widen_shift_pattern): Remove the type_in argument.
10616 (vect_recog_rotate_pattern): Likewise.
10617 (vect_recog_mult_pattern): Likewise.
10618 (vect_recog_vector_vector_shift_pattern): Likewise.
10619 (vect_recog_divmod_pattern): Likewise.
10620 (vect_recog_mixed_size_cond_pattern): Likewise.
10621 (vect_recog_bool_pattern): Likewise.
10622 (vect_recog_mask_conversion_pattern): Likewise.
10623 (vect_try_gather_scatter_pattern): Likewise.
10624 (vect_recog_widen_mult_pattern): Likewise. Check for a null vectype.
10625 (vect_recog_over_widening_pattern): Likewise.
10626 (vect_recog_gather_scatter_pattern): Likewise.
10627 (vect_recog_func_ptr): Move from tree-vectorizer.h
10628 (vect_vect_recog_func_ptrs): Move further down the file.
10629 (vect_recog_func): Likewise. Remove the third argument.
10630 (NUM_PATTERNS): Define based on vect_vect_recog_func_ptrs.
10631 (vect_pattern_recog_1): Expect the pattern function to do any
10632 necessary target tests. Also expect it to provide a vector type.
10633 Remove the type_in handling.
10635 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
10637 * tree-vect-patterns.c (vect_pattern_detected): New function.
10638 (vect_recog_dot_prod_patternm, vect_recog_sad_pattern)
10639 (vect_recog_widen_mult_pattern, vect_recog_widen_sum_pattern)
10640 (vect_recog_over_widening_pattern, vect_recog_widen_shift_pattern
10641 (vect_recog_rotate_pattern, vect_recog_vector_vector_shift_pattern)
10642 (vect_recog_mult_pattern, vect_recog_divmod_pattern)
10643 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
10644 (vect_recog_mask_conversion_pattern)
10645 (vect_try_gather_scatter_pattern): Likewise.
10647 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
10649 * tree-vect-patterns.c (vect_get_internal_def): New function.
10650 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
10651 (vect_recog_vector_vector_shift_pattern, check_bool_pattern)
10652 (search_type_for_mask_1): Use it.
10654 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
10656 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
10657 redundant WIDEN_SUM_EXPR handling.
10658 (vect_recog_sad_pattern): Likewise.
10660 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
10662 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
10663 redundant check that the types of a PLUS_EXPR or MULT_EXPR agree.
10664 (vect_recog_sad_pattern): Likewise PLUS_EXPR, ABS_EXPR and MINUS_EXPR.
10665 (vect_recog_widen_mult_pattern): Likewise MULT_EXPR.
10666 (vect_recog_widen_sum_pattern): Likewise PLUS_EXPR.
10668 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
10670 * tree-vect-stmts.c (vectorizable_call): Make sure that we
10671 use the stmt_vec_info of the original bb statement for the
10672 new zero assignment, even if the call is part of a pattern.
10674 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
10676 * tree-vectorizer.h (_stmt_vec_info): Note above pattern_def_seq
10677 that the sequence is attached to the original statement rather
10678 than the pattern statement.
10679 * tree-vect-loop.c (vect_determine_vf_for_stmt): Take the
10680 PATTERN_DEF_SEQ from the original statement rather than
10681 the main pattern statement.
10682 * tree-vect-stmts.c (free_stmt_vec_info): Likewise.
10683 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Likewise.
10684 (vect_mark_pattern_stmts): Don't copy the PATTERN_DEF_SEQ.
10686 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
10688 * tree-vect-stmts.c (vect_analyze_stmt): Move the handling of pattern
10689 definition statements before the early exit for statements that aren't
10691 * tree-vect-loop.c (vect_transform_loop_stmt): New function,
10693 (vect_transform_loop): ...here. Process pattern definition
10694 statements without first checking whether the main pattern
10695 statement is live or relevant.
10697 2018-06-19 Eric Botcazou <ebotcazou@adacore.com>
10699 * tree-cfgcleanup.c (tree_forwarder_block_p): Do not return false at
10700 -O0 if the locus represent UNKNOWN_LOCATION but have different values.
10702 2018-06-19 Aaron Sawdey <acsawdey@linux.ibm.com>
10704 * config/rs6000/rs6000-string.c (select_block_compare_mode): Check
10705 TARGET_EFFICIENT_OVERLAPPING_UNALIGNED here instead of in caller.
10706 (do_and3, do_and3_mask, do_compb3, do_rotl3): New functions.
10707 (expand_block_compare): Change select_block_compare_mode call.
10708 (expand_strncmp_align_check): Use new functions, fix comment.
10709 (emit_final_str_compare_gpr): New function.
10710 (expand_strn_compare): Refactor and clean up code.
10711 * config/rs6000/vsx.md (vsx_mov<mode>_64bit): Remove *.
10713 2018-06-19 Tony Reix <tony.reix@atos.com>
10714 Damien Bergamini <damien.bergamini@atos.com>
10715 David Edelsohn <dje.gcc@gmail.com>
10717 * collect2.c (static_obj): New variable.
10718 (static_libs): New variable.
10719 (is_in_list): Uncomment declaration.
10720 (main): Track AIX libraries linked statically.
10721 (is_in_list): Uncomment definition.
10722 (scan_prog_file): Don't add AIX shared libraries initializer
10723 to constructor list if linking statically.
10725 2018-06-19 Max Filippov <jcmvbkbc@gmail.com>
10727 * config/xtensa/xtensa.md (UNSPEC_FRAME_BLOCKAGE): New unspec
10729 (allocate_stack, frame_blockage, *frame_blockage): New patterns.
10731 2018-06-19 Jan Hubicka <hubicka@ucw.cz>
10733 * tree.c (find_decls_types_r): Remove all non-VAR_DECLs from
10736 2018-06-19 Martin Liska <mliska@suse.cz>
10738 * config/i386/i386.c (ix86_can_inline_p): Do not use
10739 ipa_fn_summaries::get_create.
10740 * ipa-cp.c (ipcp_cloning_candidate_p): Replace get_create with
10742 (devirtualization_time_bonus): Likewise.
10743 (ipcp_propagate_stage): Likewise.
10744 * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
10745 (edge_set_predicate): Likewise.
10746 (evaluate_conditions_for_known_args): Likewise.
10747 (evaluate_properties_for_edge): Likewise.
10748 (ipa_call_summary::reset): Tranform to ...
10749 (ipa_call_summary::~ipa_call_summary): ... this.
10750 (ipa_fn_summary::reset): Transform to ...
10751 (ipa_fn_summary::~ipa_fn_summary): ... this.
10752 (ipa_fn_summary_t::remove): Rename to ...
10753 (ipa_fn_summary_t::remove_callees): ... this.
10754 (ipa_fn_summary_t::duplicate): Use placement new
10755 instead of memory copy.
10756 (ipa_call_summary_t::duplicate): Likewise.
10757 (ipa_call_summary_t::remove): Remove.
10758 (dump_ipa_call_summary): Change get_create to get.
10759 (ipa_dump_fn_summary): Dump only when summary exists.
10760 (analyze_function_body): Use symbol_summary::get instead
10762 (compute_fn_summary): Likewise.
10763 (estimate_edge_devirt_benefit): Likewise.
10764 (estimate_edge_size_and_time): Likewise.
10765 (inline_update_callee_summaries): Likewise.
10766 (remap_edge_change_prob): Likewise.
10767 (remap_edge_summaries): Likewise.
10768 (ipa_merge_fn_summary_after_inlining): Likewise.
10769 (write_ipa_call_summary): Likewise.
10770 (ipa_fn_summary_write): Likewise.
10771 (ipa_free_fn_summary): Likewise.
10772 * ipa-fnsummary.h (struct GTY): Add new ctor and copy ctor.
10773 (struct ipa_call_summary): Likewise.
10774 * ipa-icf.c (sem_function::merge): Use symbol_summary::get instead
10776 * ipa-inline-analysis.c (do_estimate_edge_time): Likewise.
10777 (estimate_size_after_inlining): Likewise.
10778 (estimate_growth): Likewise.
10779 (growth_likely_positive): Likewise.
10780 * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
10781 (inline_call): Likewise.
10782 * ipa-inline.c (caller_growth_limits): Likewise.
10783 (can_inline_edge_p): Likewise.
10784 (can_inline_edge_by_limits_p): Likewise.
10785 (compute_uninlined_call_time): Likewise.
10786 (compute_inlined_call_time): Likewise.
10787 (want_inline_small_function_p): Likewise.
10788 (edge_badness): Likewise.
10789 (update_caller_keys): Likewise.
10790 (update_callee_keys): Likewise.
10791 (inline_small_functions): Likewise.
10792 (inline_to_all_callers_1): Likewise.
10793 (dump_overall_stats): Likewise.
10794 (early_inline_small_functions): Likewise.
10795 (early_inliner): Likewise.
10796 * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
10797 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
10798 * ipa-pure-const.c (malloc_candidate_p): Likewise.
10799 * ipa-split.c (execute_split_functions): Likewise.
10800 * symbol-summary.h: Likewise.
10801 * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
10803 2018-06-19 Richard Biener <rguenther@suse.de>
10805 * tree-vectorizer.c (try_vectorize_loop_1): Split out of ...
10806 (vectorize_loops): ... here. Fix dbgcnt handling.
10807 (try_vectorize_loop): Wrap try_vectorize_loop_1.
10809 2018-06-19 Segher Boessenkool <segher@kernel.crashing.org>
10812 * config/rs6000/rs6000.md (rs6000_discover_homogeneous_aggregate): An
10813 ieee128 argument takes up only one (vector) register, not two (floating
10816 2018-06-19 Eric Botcazou <ebotcazou@adacore.com>
10818 * gimplify.c (gimplify_init_constructor): Really never clear for an
10819 incomplete constructor if CONSTRUCTOR_NO_CLEARING is set.
10821 2018-06-19 Richard Biener <rguenther@suse.de>
10823 PR tree-optimization/86179
10824 * tree-vect-patterns.c (vect_pattern_recog_1): Clean up
10825 after failed recognition.
10827 2018-06-18 Martin Sebor <msebor@redhat.com>
10829 PR middle-end/85602
10830 * calls.c (maybe_warn_nonstring_arg): Handle strncat.
10831 * tree-ssa-strlen.c (is_strlen_related_p): Make extern.
10832 Handle integer subtraction.
10833 (maybe_diag_stxncpy_trunc): Handle nonstring source arguments.
10834 * tree-ssa-strlen.h (is_strlen_related_p): Declare.
10836 2018-06-18 David Malcolm <dmalcolm@redhat.com>
10838 * config/frv/frv-protos.h (frv_ifcvt_modify_insn): Strengthen 3rd
10839 param from rtx to rtx_insn *.
10840 * config/frv/frv.c (frv_ifcvt_add_insn): Likewise for "insn"
10842 (frv_ifcvt_modify_insn): Likwise.
10843 (frv_ifcvt_modify_final): Likwise for local "existing_insn",
10844 adding an as_a <rtx_insn *> cast. Likewise for local "insn".
10845 * config/mips/mips.c (r10k_insert_cache_barriers): Add an
10846 as_a <rtx_insn *> cast to local "unprotected_region" once
10847 it's been established that it's not NULL or pc_rtx.
10848 * config/nds32/nds32-relax-opt.c (nds32_group_insns): Strengthen
10849 param "sethi" from rtx to rtx_insn *.
10850 (nds32_group_float_insns): Likewise for param "insn".
10851 * config/vax/vax-protos.h (vax_output_int_add): Likewise for 1st
10853 (vax_output_int_subtract): Likewise.
10854 * config/vax/vax.c (vax_output_int_add): Likewise for param
10856 (vax_output_int_subtract): Likewise.
10857 * emit-rtl.c (set_insn_deleted): Likewise, removing cast.
10858 (emit_pattern_after): Likewise for param "after".
10859 (emit_insn_after): Likewise.
10860 (emit_jump_insn_after): Likewise.
10861 (emit_call_insn_after): Likewise.
10862 (emit_debug_insn_after): Likewise.
10863 (emit_pattern_before): Likewise for param "before".
10864 (emit_insn_before): Likewise.
10865 (emit_jump_insn_before): Likewise.
10866 * final.c (get_insn_template): Likewise for param "insn", removing
10868 * output.h (get_insn_template): Likewise for 2nd param.
10869 * rtl.h (emit_insn_before): Likewise.
10870 (emit_jump_insn_before): Likewise.
10871 (emit_debug_insn_before_noloc): Likewise.
10872 (emit_insn_after): Likewise.
10873 (emit_jump_insn_after): Likewise.
10874 (emit_call_insn_after): Likewise.
10875 (emit_debug_insn_after): Likewise.
10876 (set_insn_deleted): Likewise for param.
10878 2018-06-18 Michael Meissner <meissner@linux.ibm.com>
10881 * config/rs6000/rs6000-modes.def (toplevel): Rework the 128-bit
10882 floating point modes, so that IFmode is numerically greater than
10883 TFmode, which is greater than KFmode using FRACTIONAL_FLOAT_MODE
10884 to declare the ordering. This prevents IFmode from being
10885 converted to TFmode when long double is IEEE 128-bit on an ISA 3.0
10886 machine. Include rs6000-modes.h to share the fractional values
10887 between genmodes* and the rest of the compiler.
10888 (IFmode): Likewise.
10889 (KFmode): Likewise.
10890 (TFmode): Likewise.
10891 * config/rs6000/rs6000-modes.h: New file.
10892 * config/rs6000/rs6000.c (rs6000_debug_reg_global): Change the
10893 meaning of rs6000_long_double_size so that 126..128 selects an
10894 appropriate 128-bit floating point type.
10895 (rs6000_option_override_internal): Likewise.
10896 * config/rs6000/rs6000.h (toplevel): Include rs6000-modes.h.
10897 (TARGET_LONG_DOUBLE_128): Change the meaning of
10898 rs6000_long_double_size so that 126..128 selects an appropriate
10899 128-bit floating point type.
10900 (LONG_DOUBLE_TYPE_SIZE): Update comment.
10901 * config/rs6000/rs6000.md (trunciftf2): Correct the modes of the
10902 source and destination to match the standard usage.
10903 (truncifkf2): Likewise.
10904 (copysign<mode>3, IEEE iterator): Rework copysign of float128 on
10905 ISA 2.07 to use an explicit clobber, instead of passing in a
10907 (copysign<mode>3_soft): Likewise.
10909 2018-06-18 David Malcolm <dmalcolm@redhat.com>
10911 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
10912 Replace dump_printf_loc call with DUMP_VECT_SCOPE.
10913 (vect_slp_analyze_instance_dependence): Likewise.
10914 (vect_enhance_data_refs_alignment): Likewise.
10915 (vect_analyze_data_refs_alignment): Likewise.
10916 (vect_slp_analyze_and_verify_instance_alignment
10917 (vect_analyze_data_ref_accesses): Likewise.
10918 (vect_prune_runtime_alias_test_list): Likewise.
10919 (vect_analyze_data_refs): Likewise.
10920 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Likewise.
10921 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
10922 (vect_analyze_scalar_cycles_1): Likewise.
10923 (vect_get_loop_niters): Likewise.
10924 (vect_analyze_loop_form_1): Likewise.
10925 (vect_update_vf_for_slp): Likewise.
10926 (vect_analyze_loop_operations): Likewise.
10927 (vect_analyze_loop): Likewise.
10928 (vectorizable_induction): Likewise.
10929 (vect_transform_loop): Likewise.
10930 * tree-vect-patterns.c (vect_pattern_recog): Likewise.
10931 * tree-vect-slp.c (vect_analyze_slp): Likewise.
10932 (vect_make_slp_decision): Likewise.
10933 (vect_detect_hybrid_slp): Likewise.
10934 (vect_slp_analyze_operations): Likewise.
10935 (vect_slp_bb): Likewise.
10936 * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Likewise.
10937 (vectorizable_bswap): Likewise.
10938 (vectorizable_call): Likewise.
10939 (vectorizable_simd_clone_call): Likewise.
10940 (vectorizable_conversion): Likewise.
10941 (vectorizable_assignment): Likewise.
10942 (vectorizable_shift): Likewise.
10943 (vectorizable_operation): Likewise.
10944 * tree-vectorizer.h (DUMP_VECT_SCOPE): New macro.
10946 2018-06-18 Martin Sebor <msebor@redhat.com>
10948 PR tree-optimization/81384
10949 * builtin-types.def (BT_FN_SIZE_CONST_STRING_SIZE): New.
10950 * builtins.c (expand_builtin_strnlen): New function.
10951 (expand_builtin): Call it.
10952 (fold_builtin_n): Avoid setting TREE_NO_WARNING.
10953 * builtins.def (BUILT_IN_STRNLEN): New.
10954 * calls.c (maybe_warn_nonstring_arg): Handle BUILT_IN_STRNLEN.
10955 Warn for bounds in excess of maximum object size.
10956 * tree-ssa-strlen.c (maybe_set_strlen_range): Return tree representing
10957 single-value ranges. Handle strnlen.
10958 (handle_builtin_strlen): Handle strnlen.
10959 (strlen_check_and_optimize_stmt): Same.
10960 * doc/extend.texi (Other Builtins): Document strnlen.
10962 2018-06-18 Maya Rashish <coypu@sdf.org>
10964 * config/alpha/openbsd.h (TARGET_DEFAULT): Define.
10965 (LINK_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): Likewise.
10966 (INTMAX_TYPE, UINTMAX_TYPE, WINT_TYPE): Likewise.
10968 * config/alpha/elf.h (STARTFILE_SPEC, ENDFILE_SPEC): Move from
10970 * config/alpha/linux.h (STARTFILE_SPEC, ENDFILE_SPEC): Here.
10972 2018-06-18 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
10974 * tree.c (escaped_string::escape): Replace cast to char * by
10975 const_cast<char *> (unescaped).
10977 2018-06-18 Nick Clifton <nickc@redhat.com>
10980 * tree.c (escaped_string): New class. Converts an unescaped
10981 string into its escaped equivalent.
10982 (warn_deprecated_use): Use the new class to convert the
10983 deprecation message, if present.
10984 (test_escaped_strings): New self test.
10985 (test_c_tests): Add test_escaped_strings.
10986 * doc/extend.texi (deprecated): Add a note that the
10987 deprecation message is affected by the -fmessage-length
10988 option, and that control characters will be escaped.
10989 (#pragma GCC error): Document this pragma.
10990 (#pragma GCC warning): Likewise.
10991 * doc/invoke.texi (-fmessage-length): Document this option's
10992 effect on the #warning and #error preprocessor directives and
10993 the deprecated attribute.
10995 2018-06-18 Eric Botcazou <ebotcazou@adacore.com>
10997 * tree.c (decl_value_expr_lookup): Revert latest change.
10998 (decl_value_expr_insert): Likewise.
11000 2018-06-17 Eric Botcazou <ebotcazou@adacore.com>
11002 * gimplify.c (nonlocal_vlas): Delete.
11003 (nonlocal_vla_vars): Likewise.
11004 (gimplify_var_or_parm_decl): Do not add debug VAR_DECLs for non-local
11006 (gimplify_body): Do not create and destroy nonlocal_vlas.
11007 * tree-nested.c: Include diagnostic.h.
11008 (use_pointer_in_frame): Tweak.
11009 (lookup_field_for_decl): Add assertion and declare the transformation.
11010 (convert_nonlocal_reference_op) <PARM_DECL>: Rework and issue an
11011 internal error when the reference is in a wrong context. Do not
11012 create a debug decl by default.
11013 (note_nonlocal_block_vlas): Delete.
11014 (convert_nonlocal_reference_stmt) <GIMPLE_BIND>: Do not call it.
11015 (convert_local_reference_op) <PARM_DECL>: Skip the frame decl. Do not
11016 create a debug decl by default.
11017 (convert_gimple_call) <GIMPLE_CALL>: Issue an internal error when the
11018 call is in a wrong context.
11019 (fixup_vla_decls): New function.
11020 (finalize_nesting_tree_1): Adjust comment. Call fixup_vla_decls if no
11021 debug variables were created.
11022 * tree.c (decl_value_expr_lookup): Add checking assertion.
11023 (decl_value_expr_insert): Likewise.
11025 2018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
11027 PR middle-end/82479
11028 * ipa-fnsummary.c (will_be_nonconstant_expr_predicate): Handle CALL_EXPR.
11029 * tree-scalar-evolution.c (interpret_expr): Likewise.
11030 (expression_expensive_p): Likewise.
11031 * tree-ssa-loop-ivopts.c (contains_abnormal_ssa_name_p): Likewise.
11032 * tree-ssa-loop-niter.c (number_of_iterations_popcount): New.
11033 (number_of_iterations_exit_assumptions): Use number_of_iterations_popcount.
11034 (ssa_defined_by_minus_one_stmt_p): New.
11036 2018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
11038 PR middle-end/64946
11039 * cfgexpand.c (expand_debug_expr): Hande ABSU_EXPR.
11040 * config/i386/i386.c (ix86_add_stmt_cost): Likewise.
11041 * dojump.c (do_jump): Likewise.
11042 * expr.c (expand_expr_real_2): Check operand type's sign.
11043 * fold-const.c (const_unop): Handle ABSU_EXPR.
11044 (fold_abs_const): Likewise.
11045 * gimple-pretty-print.c (dump_unary_rhs): Likewise.
11046 * gimple-ssa-backprop.c (backprop::process_assign_use): Likesie.
11047 (strip_sign_op_1): Likesise.
11048 * match.pd: Add new pattern to generate ABSU_EXPR.
11049 * optabs-tree.c (optab_for_tree_code): Handle ABSU_EXPR.
11050 * tree-cfg.c (verify_gimple_assign_unary): Likewise.
11051 * tree-eh.c (operation_could_trap_helper_p): Likewise.
11052 * tree-inline.c (estimate_operator_cost): Likewise.
11053 * tree-pretty-print.c (dump_generic_node): Likewise.
11054 * tree-vect-patterns.c (vect_recog_sad_pattern): Likewise.
11055 * tree.def (ABSU_EXPR): New.
11057 2018-06-16 Jakub Jelinek <jakub@redhat.com>
11059 PR middle-end/86095
11060 * common.opt (Wunsafe-loop-optimizations): Add Ignore, remove Var,
11061 documented as preserved for backward compatibility only.
11062 * doc/invoke.texi: Remove -Wunsafe-loop-optimizations documentation.
11064 PR rtl-optimization/86108
11065 * bb-reorder.c (create_forwarder_block): Renamed to ...
11066 (create_eh_forwarder_block): ... this. Split OLD_BB after labels and
11067 jump from new landing pad to the second part.
11068 (sjlj_fix_up_crossing_landing_pad, dw2_fix_up_crossing_landing_pad):
11071 2018-06-15 Jakub Jelinek <jakub@redhat.com>
11073 PR middle-end/85878
11074 * expr.c (expand_assignment): Remove now redundant COMPLEX_MODE_P
11075 check from first store_expr, use to_mode instead of GET_MODE (to_rtx).
11076 Only call store_expr for halves if the mode is the same.
11078 PR middle-end/86123
11079 * match.pd ((X / Y) == 0 -> X < Y): Don't transform complex divisions.
11080 Fix up comment formatting.
11082 2018-06-15 Bernd Edlinger <bernd.edlinger@hotmail.de>
11084 * typed-splay-tree.h (typed_splay_tree::remove): New function.
11085 (typed_splay_tree::closure,
11086 typed_splay_tree::inner_foreach_fn, typed_splay_tree::m_inner): Deleted.
11087 (typed_splay_tree::typed_splay_tree,
11088 typed_splay_tree::operator =): Declared private.
11089 (typed_splay_tree::splay_tree_key, typed_splay_tree::splay_tree_value,
11090 typed_splay_tree::splay_tree_node_s, typed_splay_tree::KDEL,
11091 typed_splay_tree::VDEL, typed_splay_tree::splay_tree_delete_helper,
11092 typed_splay_tree::rotate_left, typed_splay_tree::rotate_right,
11093 typed_splay_tree::splay_tree_splay,
11094 typed_splay_tree::splay_tree_foreach_helper,
11095 typed_splay_tree::splay_tree_insert,
11096 typed_splay_tree::splay_tree_remove,
11097 typed_splay_tree::splay_tree_lookup,
11098 typed_splay_tree::splay_tree_predecessor,
11099 typed_splay_tree::splay_tree_successor,
11100 typed_splay_tree::splay_tree_min,
11101 typed_splay_tree::splay_tree_max): Took over from splay-tree.c/.h.
11102 (typed_splay_tree::root, typed_splay_tree::comp,
11103 typed_splay_tree::delete_key,
11104 typed_splay_tree::delete_value): New data members.
11105 * typed-splay-tree.c (selftest::test_str_to_int): Add a test for
11106 typed_splay_tree::remove.
11108 2018-06-15 Matthew Fortune <matthew.fortune@mips.com>
11110 * config/mips/mips.h (ASM_SPEC): Pass through -mcrc, -mno-crc,
11111 -mginv and -mno-ginv to the assembler.
11112 * config/mips/mips.opt (-mcrc): New option.
11113 (-mginv): Likewise.
11114 * doc/invoke.text (-mcrc): Document.
11115 (-mginv): Likewise.
11117 2018-06-15 Nick Clifton <nickc@redhat.com>
11120 * tree.c (escaped_string): New class. Converts an unescaped
11121 string into its escaped equivalent.
11122 (warn_deprecated_use): Use the new class to convert the
11123 deprecation message, if present.
11124 (test_escaped_strings): New self test.
11125 (test_c_tests): Add test_escaped_strings.
11126 * doc/extend.texi (deprecated): Add a note that the
11127 deprecation message is affected by the -fmessage-length
11128 option, and that control characters will be escaped.
11129 (#pragma GCC error): Document this pragma.
11130 (#pragma GCC warning): Likewise.
11131 * doc/invoke.texi (-fmessage-length): Document this option's
11132 effect on the #warning and #error preprocessor directives and
11133 the deprecated attribute.
11135 2018-06-15 Richard Biener <rguenther@suse.de>
11137 * tree-vect-slp.c (vect_slp_bb): Dump MSG_OPTIMIZED_LOCATIONS
11138 here, also noting vector size used.
11139 * tree-vectorizer.c (vectorize_loops): Adjust. Note vector
11140 size used in MSG_OPTIMIZED_LOCATIONS dump.
11141 (pass_slp_vectorize::execute): Adjust.
11143 2018-06-15 Claudiu Zissulescu <claziss@synopsys.com>
11146 * config/arc/arc.c (arc_return_address_register): Fix
11149 2018-06-15 Richard Biener <rguenther@suse.de>
11151 PR middle-end/86159
11152 * tree-cfg.c (gimplify_build3): Do not strip sign conversions,
11153 leave useless conversion stripping to force_gimple_operand_gsi.
11154 (gimplify_build2): Likewise.
11155 (gimplify_build1): Likewise.
11157 2018-06-15 Richard Biener <rguenther@suse.de>
11159 PR middle-end/86076
11160 * tree-cfg.c (move_stmt_op): unshare invariant addresses
11161 before adjusting their block.
11163 2018-06-15 Sebastian Huber <sebastian.huber@embedded-brains.de>
11165 * config.gcc (riscv*-*-elf* | riscv*-*-rtems*): Use custom
11166 multilibs for *-*-rtems*.
11167 * config/riscv/t-rtems: New file.
11169 2018-06-14 Jakub Jelinek <jakub@redhat.com>
11171 PR middle-end/86122
11172 * match.pd ((A +- CST1) +- CST2): Punt if last resort
11173 unsigned_type_for returns NULL.
11176 * lower-subreg.c (find_decomposable_subregs): Don't decompose float
11177 subregs of multi-word pseudos unless the float mode has word size.
11179 2018-06-14 Richard Biener <rguenther@suse.de>
11181 PR middle-end/86139
11182 * tree-vect-generic.c (build_word_mode_vector_type): Remove
11183 duplicate and harmful type_hash_canon.
11184 * tree.c (type_hash_canon): Assert we didn't find ourselves.
11186 2018-06-14 Richard Biener <rguenther@suse.de>
11189 * tree-ssa-struct-alias.c (create_variable_info_for): Handle
11192 2018-06-14 Sebastian Huber <sebastian.huber@embedded-brains.de>
11194 * config/rtems.h (STDINT_LONG32): Define.
11196 2018-06-13 Matthew Fortune <matthew.fortune@mips.com>
11197 Prachi Godbole <prachi.godbole@imgtec.com>
11199 * config/mips/mips-cpus.def: Define P6600.
11200 * config/mips/mips-tables.opt: Regenerate.
11201 * config/mips/mips.c (mips_ucbranch_type): New enum.
11202 (mips_rtx_cost_data): Add support for P6600.
11203 (mips_issue_rate): Likewise.
11204 (mips_multipass_dfa_lookahead): Likewise.
11205 (mips_avoid_hazard): Likewise.
11206 (mips_reorg_process_insns): Likewise.
11207 (mips_classify_branch_p6600): New function.
11208 * config/mips/mips.h (TUNE_P6600): New define.
11209 (MIPS_ISA_LEVEL_SPEC): Infer mips64r6 from p6600.
11210 (ENABLE_LD_ST_PAIRS): Enable load/store bonding for p6600.
11211 * config/mips/mips.md: Include p6600.md.
11212 (processor): Add p6600.
11213 * config/mips/p6600.md: New file.
11214 * doc/invoke.texi: Add p6600 to supported architectures.
11216 2018-06-13 Martin Sebor <msebor@redhat.com>
11218 PR tree-optimization/86114
11219 * gimple-fold.c (gimple_fold_builtin_strlen): Only handle LHS
11221 * tree-ssa-strlen.c (maybe_set_strlen_range): Same.
11223 2018-06-13 Richard Biener <rguenther@suse.de>
11225 * tree-vect-patterns.c (vect_recog_vector_vector_shift_pattern):
11226 Properly set vector type of the intermediate stmt.
11227 * tree-vect-stmts.c (vectorizable_operation): The destination
11228 var always has vectype_out type.
11230 2018-06-13 Jeff Law <law@redhat.com>
11232 * config/rl78/rl78.c (move_elim_pass): Use TDF_NONE rather than
11233 integer 0 for argument to print_rtl_with_bb.
11234 (rl78_reorg): Likewise.
11236 2018-06-13 David Malcolm <dmalcolm@redhat.com>
11238 * config/arc/arc.c (hwloop_optimize): Strengthen local "end_label"
11239 from rtx to rtx_insn *.
11240 * config/bfin/bfin.c (hwloop_optimize): Likewise for local
11242 (add_sched_insns_for_speculation): Likewise for local "target",
11243 converting usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
11244 * config/c6x/c6x.c (reorg_split_calls): Strengthen param "call_labels"
11245 from rtx_insn ** to rtx_code_label **.
11246 (reorg_emit_nops): Likewise.
11247 (c6x_reorg): Likewise for local "call_labels".
11248 * config/sh/sh-protos.h (get_dest_uid): Strengthen 1st param from
11250 * config/sh/sh.c (dump_table): Strengthen local "lab" from rtx to
11251 rtx_code_label *, adding safe_as_a <rtx_code_label *> casts to
11252 the loops over LABEL_REFS.
11253 (fixup_addr_diff_vecs): Add as_a <rtx_insn *> to usage of
11255 (barrier_align): Convert usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
11256 (get_dest_uid): Strengthen param "label" from rtx to rtx_insn *.
11257 (split_branches): Strengthen local "olabel" from rtx to
11258 rtx_insn *, adding a safe_as_a cast.
11259 * emit-rtl.c (next_real_insn): Strengthen param from "rtx"
11261 (add_insn_after): Likewise for first two params.
11262 (add_insn_before): Likewise.
11263 (remove_insn): Likewise for param.
11264 (emit_pattern_before_noloc): Likewise for second and third params.
11265 (emit_jump_insn_before_noloc): Convert NULL_RTX to NULL.
11266 (emit_call_insn_before_noloc): Likewise.
11267 (emit_debug_insn_before_noloc): Strengthen "before" param from "rtx"
11269 (emit_barrier_before): Likewise.
11270 (emit_label_before): Strengthen "label" param from "rtx" to
11271 "rtx_code_label *". Strengthen "before" param from "rtx" to
11273 (emit_insn_after_1): Strengthen "after" param from "rtx" to
11275 (emit_pattern_after_noloc): Likewise.
11276 (emit_insn_after_noloc): Likewise.
11277 (emit_jump_insn_after_noloc): Likewise.
11278 (emit_call_insn_after_noloc): Likewise.
11279 (emit_debug_insn_after_noloc): Likewise.
11280 (emit_barrier_after): Likewise.
11281 (emit_label_after): Likewise for both params.
11282 (emit_pattern_after_setloc): Likewise for "after" param. Convert
11283 "loc" param from "int" to "location_t".
11284 (emit_insn_after_setloc): Likewise.
11285 (emit_jump_insn_after_setloc): Likewise.
11286 (emit_call_insn_after_setloc): Likewise.
11287 (emit_debug_insn_after_setloc): Likewise.
11288 (emit_pattern_before_setloc): Likewise for "before" param. Convert
11289 "loc" param from "int" to "location_t".
11290 (emit_pattern_before): Convert NULL_RTX to NULL.
11291 (emit_insn_before_setloc): Convert "loc" param from "int" to
11293 (emit_jump_insn_before_setloc): Likewise.
11294 (emit_call_insn_before_setloc): Likewise.
11295 (emit_debug_insn_before_setloc): Strengthen "before" param from rtx to
11296 rtx_insn *. Convert "loc" param from "int" to "location_t".
11297 * rtl.h (emit_insn_before_setloc, emit_jump_insn_before_setloc,
11298 emit_call_insn_before_setloc, emit_debug_insn_before_setloc):
11299 Convert 3rd param from "int" to "location_t".
11300 (emit_barrier_before, emit_barrier_after, next_real_insn):
11301 Strengthen param from rtx to rtx_insn *.
11302 (emit_label_before): Strengthen 1st param from "rtx" to
11303 "rtx_code_label *". Strengthen 2nd param from "rtx" to
11305 (emit_insn_after_noloc, emit_jump_insn_after_noloc,
11306 emit_call_insn_after_noloc, emit_debug_insn_after_noloc):
11307 Strengthen 2nd param from "rtx" to "rtx_insn *".
11308 (emit_insn_after_setloc, emit_jump_insn_after_setloc)
11309 emit_call_insn_after_setloc, emit_debug_insn_after_setloc):
11310 Likewise. Convert 3rd param from "int" to "location_t".
11311 (emit_label_after): Strengthen 1st param from "rtx" to
11312 "rtx_code_label *".
11313 (next_real_insn, remove_insn): Strengthen param from "rtx" to
11315 (add_insn_before, add_insn_after): Strengthen 1st and 2nd params
11316 from "rtx" to "rtx_insn *".
11318 2018-06-13 Jan Hubicka <hubicka@gcc.gnu.org>
11320 * cgraph.c (cgraph_node::get_untransformed_body): Dump function
11321 bodies streamed in with -Q.
11322 * dumpfile.c (dump_files): Add lto-stream-out dump file.
11323 * dumpfile.h (tree_dump_index): Add lto_stream_out.
11324 * gimple-streamer-out.c: Include gimple-pretty-print.h
11325 (output_bb): Dump stmts streamed.
11326 * lto-section-out.c: Include print-tree.h
11327 (lto_begin_section): Dump sections created.
11328 (lto_output_decl_index): Dump decl encoded.
11329 * lto-streamer-out.c: Include print-tree.h
11330 (create_output_block): Dump output block created.
11331 (DFS::DFS_write_tree_body): Dump DFS SCCs streamed.
11332 (output_function): Dump function output.
11333 (output_constructor): Dump constructor streamed.
11334 (write_global_stream): Output indexes encoded.
11335 (produce_asm_for_decls): Dump streams encoded.
11336 * lto-streamer.c (streamer_dump_file): New global var.
11337 * lto-streamer.h (streamer_dump_file): Declare.
11338 * passes.c (ipa_write_summaries): Initialize streamer dump.
11339 * varpool.c (varpool_node::get_constructor): Dump constructors streamed
11342 2018-06-13 Eric Botcazou <ebotcazou@adacore.com>
11345 * config/i386/winnt.c (i386_pe_seh_cold_init): Do not emit negative
11346 offsets for register save directives. Emit a second batch of save
11347 directives, if need be, when the function accesses prior frames.
11349 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
11351 * config/arc/fpu.md (fmasf4): Force operand to register.
11352 (fnmasf4): Likewise.
11354 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
11356 * config/arc/arc-protos.h (arc_pad_return): Remove.
11357 * config/arc/arc.c (machine_function): Remove force_short_suffix
11359 (arc_print_operand): Adjust printing of '&'.
11360 (arc_verify_short): Remove conditional printing of short suffix.
11361 (arc_final_prescan_insn): Remove reference to size_reason.
11362 (pad_return): New function.
11363 (arc_reorg): Call pad_return.
11364 (arc_pad_return): Remove.
11365 (arc_init_machine_status): Remove reference to force_short_suffix.
11366 * config/arc/arc.md (vunspec): Add VUNSPEC_ARC_BLOCKAGE.
11367 (attr length): When attribute iscompact is true force to 2
11368 regardless; in the case of maybe check if we want to force the
11369 instruction to have 4 bytes length.
11370 (nopv): Change it to generate 4 byte long nop as well.
11371 (blockage): New pattern.
11372 (simple_return): Remove call to arc_pad_return.
11373 (p_return_i): Likewise.
11375 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
11377 * config/arc/elf.h (LINK_GCC_C_SEQUENCE_SPEC): Define.
11379 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
11381 * config/arc/builtins.def (SYNC): SYNC instruction is valid on all
11384 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
11386 * config/arc/arc.c (atomic_exchangesi): EX instruction is default
11387 for ARC700 and ARCv2.
11389 2018-06-13 Chenghua Xu <paul.hua.gm@gmail.com>
11392 * config/mips/loongson.md (vec_setv4hi): Gen_lowpart for
11393 operands[2] instead of operands[1].
11396 2018-06-12 Richard Sandiford <richard.sandiford@linaro.org>
11398 * lra-constraints.c (simplify_operand_subreg): In the paradoxical
11399 case, check whether the outer register overlaps an unallocatable
11400 register, not just whether it fits the required class.
11402 2018-06-12 Richard Sandiford <richard.sandiford@linaro.org>
11404 * poly-int.h (can_div_trunc_p): Add new overload in which all values
11406 * alias.c (get_addr): Extend CONST_INT handling to poly_int_rtx_p.
11407 (memrefs_conflict_p): Likewise.
11408 (init_alias_analysis): Likewise.
11409 * cfgexpand.c (expand_debug_expr): Likewise.
11410 * combine.c (combine_simplify_rtx, force_int_to_mode): Likewise.
11411 * cse.c (fold_rtx): Likewise.
11412 * explow.c (adjust_stack, anti_adjust_stack): Likewise.
11413 * expr.c (emit_block_move_hints): Likewise.
11414 (clear_storage_hints, push_block, emit_push_insn): Likewise.
11415 (store_expr_with_bounds, reduce_to_bit_field_precision): Likewise.
11416 (emit_group_load_1): Use rtx_to_poly_int64 for group offsets.
11417 (emit_group_store): Likewise.
11418 (find_args_size_adjust): Use strip_offset. Use rtx_to_poly_int64
11419 to read the PRE/POST_MODIFY increment.
11420 * calls.c (store_one_arg): Use strip_offset.
11421 * rtlanal.c (rtx_addr_can_trap_p_1): Extend CONST_INT handling to
11423 (set_noop_p): Use rtx_to_poly_int64 for the elements selected
11425 * simplify-rtx.c (avoid_constant_pool_reference): Use strip_offset.
11426 (simplify_binary_operation_1): Extend CONST_INT handling to
11428 * var-tracking.c (compute_cfa_pointer): Take a poly_int64 rather
11429 than a HOST_WIDE_INT.
11430 (hard_frame_pointer_adjustment): Change from HOST_WIDE_INT to
11432 (adjust_mems, add_stores): Update accodingly.
11433 (vt_canonicalize_addr): Track polynomial offsets.
11434 (emit_note_insn_var_location): Likewise.
11435 (vt_add_function_parameter): Likewise.
11436 (vt_initialize): Likewise.
11438 2018-06-12 Jeff Law <law@redhat.com>
11440 * config.gcc (alpha*-*-freebsd*): Remove.
11441 * config/alpha/freebsd.h: Remove.
11443 2018-06-12 David Malcolm <dmalcolm@redhat.com>
11446 * spellcheck-tree.c (levenshtein_distance): Rename to...
11447 (get_edit_distance): ...this, and update for underlying renaming.
11448 * spellcheck-tree.h (levenshtein_distance): Rename to...
11449 (get_edit_distance): ...this.
11450 * spellcheck.c (levenshtein_distance): Rename to...
11451 (get_edit_distance): ...this. Convert from Levenshtein distance
11452 to Damerau-Levenshtein distance by supporting transpositions of
11453 adjacent characters. Rename "v1" to "v_next" and "v0" to
11455 (selftest::levenshtein_distance_unit_test_oneway): Rename to...
11456 (selftest::test_edit_distance_unit_test_oneway): ...this, and
11457 update for underlying renaming.
11458 (selftest::levenshtein_distance_unit_test): Rename to...
11459 (selftest::test_get_edit_distance_unit): ...this, and update for
11460 underlying renaming.
11461 (selftest::test_find_closest_string): Add example from PR 69968
11462 where transposition helps
11463 (selftest::test_metric_conditions): Update for renaming.
11464 (selftest::test_metric_conditions): Likewise.
11465 (selftest::spellcheck_c_tests): Likewise.
11466 * spellcheck.h (levenshtein_distance): Rename both overloads to...
11467 (get_edit_distance): ...this.
11468 (best_match::consider): Update for renaming.
11470 2018-06-12 Martin Sebor <msebor@redhat.com>
11472 PR tree-optimization/85259
11473 * builtins.c (compute_objsize): Handle constant offsets.
11474 * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Return
11475 true iff a warning has been issued.
11476 * gimple.h (gimple_nonartificial_location): New function.
11477 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Call
11478 gimple_nonartificial_location and handle -Wno-system-headers.
11479 (handle_builtin_stxncpy): Same.
11481 2018-06-12 Martin Sebor <msebor@redhat.com>
11484 * fold-const.c (operand_equal_p): Handle SAVE_EXPR.
11486 2018-06-12 Will Schmidt <will_schmidt@vnet.ibm.com>
11488 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add
11489 BUILTIN_VEC_XST entries for pointer to double and long long.
11491 2018-06-12 H.J. Lu <hongjiu.lu@intel.com>
11494 * config/i386/gnu-user.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
11496 * config/i386/gnu-user64.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
11499 2018-06-12 Martin Liska <mliska@suse.cz>
11501 * doc/options.texi: Document IntegerRange.
11503 2018-06-12 Martin Liska <mliska@suse.cz>
11505 * config/i386/i386.opt: Make MPX-related options as Deprecated.
11506 * opt-functions.awk: Handle Deprecated flag.
11507 * opts-common.c (decode_cmdline_option): Handle cl_deprecated
11509 (read_cmdline_option): Report warning for a deprecated option.
11510 * opts.h (struct cl_option): Add new field cl_deprecated.
11511 (CL_ERR_DEPRECATED): New.
11513 2018-06-12 Martin Liska <mliska@suse.cz>
11515 * doc/options.texi: Document Deprecated option flag.
11517 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
11519 * config/arc/arc-arch.h (arc_extras): New enum.
11520 (arc_cpu_t):Add field extra.
11521 (arc_cpu_types): Consider the extras.
11522 * config/arc/arc-cpus.def: Add extras info.
11523 * config/arc/arc-opts.h (processor_type): Consider extra field.
11524 * config/arc/arc.c (arc_override_options): Handle extra field.
11526 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
11528 * config/arc/arc-arch.h: Update ARC_OPTX macro.
11529 * config/arc/arc-options.def (ARC_OPTX): Introduce a new doc
11531 * config/arc/arc.c (arc_init): Update pic warning.
11532 (irq_range): Update irq range parsing warnings.
11533 (arc_override_options): Update various warning messages.
11534 (arc_handle_aux_attribute): Likewise.
11536 2018-06-12 Robert Suchanek <robert.suchanek@mips.com>
11538 * config/mips/i6400.md (i6400_fpu_fadd): Remove frint.
11540 2018-06-12 Jozef Lawrynowicz <jozef.l@mittosystems.com>
11542 * doc/sourcebuild.texi: Document usage of line number 0 in verify
11543 compiler messages directives.
11545 2018-06-12 Matthew Fortune <mfortune@gmail.com>
11547 * config/mips/mips-cpus.def: New MIPS_CPU for i6500.
11548 * config/mips/mips-tables.opt: Regenerate.
11549 * config/mips/mips.h (MIPS_ISA_LEVEL_SPEC): Mark i6500 as
11551 * doc/invoke.texi: Document -march=i6500.
11553 2018-06-12 Prachi Godbole <prachi.godbole@imgtec.com>
11555 * config/mips/i6400.md (i6400_gpmuldiv): Remove cpu_unit.
11556 (i6400_gpmul): Add cpu_unit.
11557 (i6400_gpdiv): Likewise.
11558 (i6400_msa_add_d): Update reservations.
11559 (i6400_msa_int_add) Likewise.
11560 (i6400_msa_short_logic3) Likewise.
11561 (i6400_msa_short_logic2) Likewise.
11562 (i6400_msa_short_logic) Likewise.
11563 (i6400_msa_move) Likewise.
11564 (i6400_msa_cmp) Likewise.
11565 (i6400_msa_short_float2) Likewise.
11566 (i6400_msa_div_d) Likewise.
11567 (i6400_msa_long_logic1) Likewise.
11568 (i6400_msa_long_logic2) Likewise.
11569 (i6400_msa_mult) Likewise.
11570 (i6400_msa_long_float2) Likewise.
11571 (i6400_msa_long_float4) Likewise.
11572 (i6400_msa_long_float5) Likewise.
11573 (i6400_msa_long_float8) Likewise.
11574 (i6400_fpu_fadd): Include frint type.
11575 (i6400_fpu_store): New define_insn_reservation.
11576 (i6400_fpu_load): Likewise.
11577 (i6400_fpu_move): Likewise.
11578 (i6400_fpu_fcmp): Likewise.
11579 (i6400_fpu_fmadd): Likewise.
11580 (i6400_int_mult): Include imul3nc type and update reservation.
11581 (i6400_int_div): Include idiv3 type and update reservation.
11582 (i6400_int_load): Update to check type not move_type.
11583 (i6400_int_store): Likewise.
11584 (i6400_int_prefetch): Set zero latency.
11586 2018-06-12 Eric Botcazou <ebotcazou@adacore.com>
11588 * gcc.c: Document new %@{...} sequence.
11589 (LINK_COMMAND_SPEC): Use it for the -L switches.
11590 (cpp_unique_options): Use it for the -I switches.
11591 (at_file_argbuf): New global variable.
11592 (in_at_file): Likewise.
11593 (alloc_args): Create at_file_argbuf.
11594 (clear_args): Truncate at_file_argbuf.
11595 (store_arg): If in_at_file, push the argument onto at_file_argbuf.
11596 (open_at_file): New function.
11597 (close_at_file): Likewise.
11598 (create_at_file): Delete.
11599 (do_spec_1) <'i'>: Use open_at_file/close_at_file.
11602 (validate_switches_from_spec): Deal with %@{...} sequence.
11603 (validate_switches): Likewise.
11604 (driver::finalize): Call clear_args.
11606 2018-06-11 Rasmus Villemoes <rasmus.villemoes@prevas.dk>
11608 * config/vx-common.h (USE_TM_CLONE_REGISTRY): #define to 0.
11610 2018-06-11 Martin Sebor <msebor@redhat.com>
11612 * doc/invoke.texi (-Wall): List -Wc++17-compat.
11613 (Wno-class-memaccess): Add @opindex.
11614 (Wno-templates, Wno-multiple-inheritance): Same.
11615 (Wno-virtual-inheritance, Wno-namespaces): Same.
11616 (Wno-pedantic, Wno-chkp, Wcoverage-mismatch): Same.
11617 (Wno-format-overflow, Wno-format-truncation): Same.
11618 (Wno-unused-local-typedefs, Walloc-size-larger-than): Same.
11619 (Wno-alloc-size-larger-than, Wframe-larger-than): Same
11620 (Wno-stack-usage, Wno-c++-compat, Wno-c++11-compat): Same.
11621 (Wno-c++14-compat, Wno-c++17-compat, Wno-openmp-simd): Same.
11622 (Wno-unsuffixed-float-constants, Wno-addr-space-convert): Same.
11623 (Wno-misspelled-isr): Same.
11625 2018-06-11 Martin Sebor <msebor@redhat.com>
11627 * PR tree-optimization/86083
11628 * tree-ssa-strlen.c (handle_char_store): Use tree_expr_nonzero_p.
11630 2018-06-11 Zhouyi Zhou <zhouzhouyi@gmail.com>
11632 * tree-eh.c (lower_eh_constructs_2): Add a comma to comment.
11634 2018-06-11 Segher Boessenkool <segher@kernel.crashing.org>
11637 * config/rs6000/rs6000.md (*movdi_internal32): Put constraint modifiers
11638 on the correct operand.
11639 (*movdi_internal64): Ditto.
11641 2018-06-11 Martin Liska <mliska@suse.cz>
11643 PR tree-optimization/86089
11644 * tree-ssa-strlen.c (get_string_length): Move back removed hunk.
11646 2018-06-11 Julia Koval <julia.koval@intel.com>
11648 * config/i386/vaesintrin.h (_mm_aesdec_epi128, _mm_aesdeclast_epi128)
11649 _mm_aesenc_epi128, _mm_aesenclast_epi128: Remove.
11650 * config/i386/vpclmulqdqintrin.h (_mm_clmulepi64_epi128): Remove.
11652 2018-06-11 Olivier Hainque <hainque@adacore.com>
11654 * dwarf2out.c (gen_compile_unit_die): Fallout to DW_LANG_Ada83
11655 for Ada with strict dwarf2.
11657 2018-06-08 Peter Bergner <bergner@vnet.ibm.com>
11660 * config/rs6000/rs6000.c (mem_operand_gpr): Enable PRE_INC and PRE_DEC
11663 2018-06-08 Jan Hubicka <hubicka@ucw.cz>
11665 * dumpfile.c (FIRST_ME_AUTO_NUMBERED_DUMP): Bump to 4.
11667 2018-06-08 David Edelsohn <dje.gcc@gmail.com>
11669 * config/rs6000/rs6000.c (rs6000_passes_ieee128): Protect with #if
11672 2018-06-08 Martin Liska <mliska@suse.cz>
11674 * tree-cfg.h (debug_function): Fix argument type to match
11677 2018-06-08 Martin Liska <mliska@suse.cz>
11679 * config/powerpcspe/powerpcspe.c (rs6000_xcoff_visibility):
11680 Remove usage of MPX-related (and removed) fields.
11681 * config/rs6000/rs6000.c (rs6000_xcoff_visibility): Likewise.
11683 2018-06-08 David Malcolm <dmalcolm@redhat.com>
11685 * cfg.c (debug): Use TDF_NONE rather than 0.
11686 * cfghooks.c (debug): Likewise.
11687 * dumpfile.c (DUMP_FILE_INFO): Likewise; also for OPTGROUP.
11688 (struct dump_option_value_info): Convert to...
11689 (struct kv_pair): ...this template type.
11690 (dump_options): Convert to kv_pair<dump_flags_t>; use TDF_NONE
11692 (optinfo_verbosity_options): Likewise.
11693 (optgroup_options): Convert to kv_pair<optgroup_flags_t>; use
11695 (gcc::dump_manager::dump_register): Use optgroup_flags_t rather
11696 than int for "optgroup_flags" param.
11697 (dump_generic_expr_loc): Use dump_flags_t rather than int for
11699 (dump_dec): Likewise.
11700 (dump_finish): Use TDF_NONE rather than 0.
11701 (gcc::dump_manager::opt_info_enable_passes): Use optgroup_flags_t
11702 rather than int for "optgroup_flags" param. Use TDF_NONE rather
11703 than 0. Update for change to option_ptr.
11704 (opt_info_switch_p_1): Convert "optgroup_flags" param from int *
11705 to optgroup_flags_t *. Use TDF_NONE and OPTGROUP_NONE rather than
11706 0. Update for changes to optinfo_verbosity_options and
11708 (opt_info_switch_p): Convert optgroup_flags from int to
11710 (dump_basic_block): Use dump_flags_t rather than int
11711 for "dump_kind" param.
11712 * dumpfile.h (TDF_ADDRESS, TDF_SLIM, TDF_RAW, TDF_DETAILS,
11713 TDF_STATS, TDF_BLOCKS, TDF_VOPS, TDF_LINENO, TDF_UID)
11714 TDF_STMTADDR, TDF_GRAPH, TDF_MEMSYMS, TDF_RHS_ONLY, TDF_ASMNAME,
11715 TDF_EH, TDF_NOUID, TDF_ALIAS, TDF_ENUMERATE_LOCALS, TDF_CSELIB,
11716 TDF_SCEV, TDF_GIMPLE, TDF_FOLDING, MSG_OPTIMIZED_LOCATIONS,
11717 MSG_MISSED_OPTIMIZATION, MSG_NOTE, MSG_ALL, TDF_COMPARE_DEBUG,
11718 TDF_NONE): Convert from macros to...
11719 (enum dump_flag): ...this new enum.
11720 (dump_flags_t): Update to use enum.
11721 (operator|, operator&, operator~, operator|=, operator&=):
11722 Implement for dump_flags_t.
11723 (OPTGROUP_NONE, OPTGROUP_IPA, OPTGROUP_LOOP, OPTGROUP_INLINE,
11724 OPTGROUP_OMP, OPTGROUP_VEC, OPTGROUP_OTHER, OPTGROUP_ALL):
11725 Convert from macros to...
11726 (enum optgroup_flag): ...this new enum.
11727 (optgroup_flags_t): New typedef.
11728 (operator|, operator|=): Implement for optgroup_flags_t.
11729 (struct dump_file_info): Convert field "alt_flags" to
11730 dump_flags_t. Convert field "optgroup_flags" to
11732 (dump_basic_block): Use dump_flags_t rather than int for param.
11733 (dump_generic_expr_loc): Likewise.
11734 (dump_dec): Likewise.
11735 (dump_register): Convert param "optgroup_flags" to
11737 (opt_info_enable_passes): Likewise.
11738 * early-remat.c (early_remat::dump_edge_list): Use TDF_NONE rather
11740 * gimple-pretty-print.c (debug): Likewise.
11741 * gimple-ssa-store-merging.c (bswap_replace): Likewise.
11742 (merged_store_group::apply_stores): Likewise.
11743 * gimple-ssa-strength-reduction.c (insert_initializers): Likewise.
11744 * gimple.c (verify_gimple_pp): Likewise.
11745 * graphite-poly.c (print_pbb_body): Likewise.
11746 * passes.c (pass_manager::register_one_dump_file): Convert
11747 local "optgroup_flags" to optgroup_flags_t.
11748 * print-tree.c (print_node): Use TDF_NONE rather than 0.
11750 (debug_body): Likewise.
11751 * tree-pass.h (struct pass_data): Convert field "optgroup_flags"
11752 to optgroup_flags_t.
11753 * tree-pretty-print.c (print_struct_decl): Use TDF_NONE rather
11755 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Likewise.
11756 (convert_mult_to_fma): Likewise.
11757 * tree-ssa-reassoc.c (undistribute_ops_list): Likewise.
11758 * tree-ssa-sccvn.c (vn_eliminate): Likewise.
11759 * tree-vect-data-refs.c (dump_lower_bound): Convert param
11760 "dump_kind" to dump_flags_t.
11762 2018-06-08 Segher Boessenkool <segher@kernel.crashing.org>
11764 * config/rs6000/rs6000.c (min, max): Delete.
11766 2018-06-08 Segher Boessenkool <segher@kernel.crashing.org>
11768 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete mention of
11769 -mabi=spe and -mabi=no-spe.
11771 2018-06-08 Martin Liska <mliska@suse.cz>
11773 * ipa-pure-const.c (propagate_pure_const): Use ::get at places
11774 where we expect an existing summary.
11776 2018-06-08 Martin Liska <mliska@suse.cz>
11778 * ipa-inline-analysis.c (simple_edge_hints): Use ::get method.
11779 * ipa-inline.h (estimate_edge_growth): Likewise.
11781 2018-06-08 Martin Liska <mliska@suse.cz>
11783 * cgraph.c (function_version_hasher::hash): Use
11784 cgraph_node::get_uid ().
11785 (function_version_hasher::equal):
11786 * cgraph.h (cgraph_node::get_uid): New method.
11787 * ipa-inline.c (update_caller_keys): Use
11788 cgraph_node::get_uid ().
11789 (update_callee_keys): Likewise.
11790 * ipa-utils.c (searchc): Likewise.
11791 (ipa_reduced_postorder): Likewise.
11792 * lto-cgraph.c (input_node): Likewise.
11793 * passes.c (is_pass_explicitly_enabled_or_disabled): Likewise.
11794 * symbol-summary.h (symtab_insertion): Likewise.
11795 (symtab_removal): Likewise.
11796 (symtab_duplication): Likewise.
11797 * tree-pretty-print.c (dump_function_header): Likewise.
11798 * tree-sra.c (convert_callers_for_node): Likewise.
11800 2018-06-08 Martin Liska <mliska@suse.cz>
11802 * cgraph.c (symbol_table::create_edge): Always assign a new
11804 (symbol_table::free_edge): Do not recycle numbers.
11805 * cgraph.h (cgraph_edge::get): New method.
11806 * symbol-summary.h (symtab_removal): Use it.
11807 (symtab_duplication): Likewise.
11808 (call_summary::hashable_uid): Remove.
11810 2018-06-08 Martin Liska <mliska@suse.cz>
11812 * ipa-inline-analysis.c (inline_edge_removal_hook): Remove.
11813 (initialize_growth_caches): Remove.
11814 (free_growth_caches): Likewise.
11815 (do_estimate_edge_time): Use edge_growth_cache.
11816 (do_estimate_edge_size): Likewise.
11817 (do_estimate_edge_hints): Likewise.
11818 * ipa-inline.c (reset_edge_caches): Likewise.
11819 (recursive_inlining): Likewise.
11820 (inline_small_functions): Likewise.
11821 * ipa-inline.h (initialize_growth_caches): Remove.
11822 (estimate_edge_size): Likewise.
11823 (estimate_edge_time): Likewise.
11824 (estimate_edge_hints): Likewise.
11825 (reset_edge_growth_cache): Likewise.
11826 * symbol-summary.h (call_summary::remove): New method.
11828 2018-06-08 Martin Liska <mliska@suse.cz>
11830 * ipa-cp.c (class edge_clone_summary): New summary.
11831 (grow_edge_clone_vectors): Remove.
11832 (ipcp_edge_duplication_hook): Remove.
11833 (class edge_clone_summary_t): New call_summary class.
11834 (ipcp_edge_removal_hook): Remove.
11835 (edge_clone_summary_t::duplicate): New function.
11836 (get_next_cgraph_edge_clone): Use edge_clone_summaries.
11837 (create_specialized_node): Likewise.
11838 (ipcp_driver): Initialize edge_clone_summaries and do not
11841 2018-06-08 Martin Liska <mliska@suse.cz>
11843 * symbol-summary.h (get): New function.
11844 (call_summary::m_initialize_when_cloning): New class member.
11846 2018-06-08 Martin Liska <mliska@suse.cz>
11848 * cgraph.c (cgraph_node::remove): Do not recycle uid.
11849 * cgraph.h (symbol_table::release_symbol): Do not pass uid.
11850 (symbol_table::allocate_cgraph_symbol): Do not set uid.
11851 * passes.c (uid_hash_t): Record removed_nodes by their uids.
11852 (remove_cgraph_node_from_order): Use the removed_nodes set.
11853 (do_per_function_toporder): Likwise.
11854 * symbol-summary.h (symtab_insertion): Use cgraph_node::uid
11855 instead of summary_uid.
11856 (symtab_removal): Likewise.
11857 (symtab_duplication): Likewise.
11859 2018-06-08 Martin Liska <mliska@suse.cz>
11861 * ipa-cp.c (ipcp_store_bits_results): Use
11862 ipcp_transformation_sum.
11863 (ipcp_store_vr_results): Likewise.
11864 * ipa-prop.c (ipcp_grow_transformations_if_necessary): Renamed
11866 (ipcp_transformation_initialize): ... this.
11867 (ipa_set_node_agg_value_chain):
11868 (ipa_node_params_t::duplicate): Use ipcp_transformation_sum.
11869 (write_ipcp_transformation_info): Likewise.
11870 (read_ipcp_transformation_info): Likewise.
11871 (ipcp_update_bits): Likewise.
11872 (ipcp_update_vr): Likewise.
11873 (ipcp_transform_function): Likewise.
11874 * ipa-prop.h: Rename ipcp_transformation_summary to
11875 ipcp_transformation.
11876 (class ipcp_transformation_t): New function summary.
11877 (ipcp_get_transformation_summary): Use ipcp_transformation_sum.
11878 (ipa_get_agg_replacements_for_node): Likewise.
11880 2018-06-08 Martin Liska <mliska@suse.cz>
11882 * ipa-pure-const.c (struct funct_state_d): Do it class instead
11884 (class funct_state_summary_t): New function_summary class.
11885 (has_function_state): Remove.
11886 (get_function_state): Likewise.
11887 (set_function_state): Likewise.
11888 (add_new_function): Likewise.
11889 (funct_state_summary_t::insert): New function.
11890 (duplicate_node_data): Remove.
11891 (remove_node_data): Remove.
11892 (funct_state_summary_t::duplicate): New function.
11893 (register_hooks): Create new funct_state_summaries.
11894 (pure_const_generate_summary): Use it.
11895 (pure_const_write_summary): Likewise.
11896 (pure_const_read_summary): Likewise.
11897 (propagate_pure_const): Likewise.
11898 (propagate_nothrow): Likewise.
11899 (dump_malloc_lattice): Likewise.
11900 (propagate_malloc): Likewise.
11901 (execute): Do not register hooks, just remove summary
11903 (pass_ipa_pure_const::pass_ipa_pure_const): Simplify
11906 2018-06-08 Martin Liska <mliska@suse.cz>
11908 * ipa-reference.c (remove_node_data): Remove.
11909 (duplicate_node_data): Likewise.
11910 (class ipa_ref_var_info_summary_t): New class.
11911 (class ipa_ref_opt_summary_t): Likewise.
11912 (get_reference_vars_info): Use ipa_ref_var_info_summaries.
11913 (get_reference_optimization_summary): Use
11914 ipa_ref_opt_sum_summaries.
11915 (set_reference_vars_info): Remove.
11916 (set_reference_optimization_summary): Likewise.
11917 (ipa_init): Create summaries.
11918 (init_function_info): Use function summary.
11919 (ipa_ref_opt_summary_t::duplicate): New function.
11920 (ipa_ref_opt_summary_t::remove): New function.
11921 (get_read_write_all_from_node): Fix GNU coding style.
11922 (propagate): Use function summary.
11923 (write_node_summary_p): Fix GNU coding style.
11924 (stream_out_bitmap): Likewise.
11925 (ipa_reference_read_optimization_summary): Use function summary.
11926 (ipa_reference_c_finalize): Do not release hooks.
11928 2018-06-08 Martin Liska <mliska@suse.cz>
11930 * ipa-fnsummary.c (dump_ipa_call_summary): Use ::get method.
11931 (analyze_function_body): Extract multiple calls of get_create.
11932 * ipa-inline-analysis.c (simple_edge_hints): Likewise.
11933 * ipa-inline.c (recursive_inlining): Use ::get method.
11934 * ipa-inline.h (estimate_edge_growth): Likewise.
11936 2018-06-08 Martin Liska <mliska@suse.cz>
11938 * hsa-common.h (enum hsa_function_kind): Rename HSA_NONE to
11940 (hsa_function_summary::hsa_function_summary): Use the new enum
11942 (hsa_gpu_implementation_p): Use hsa_summaries::get.
11943 * hsa-gen.c (hsa_get_host_function): Likewise.
11944 (get_brig_function_name): Likewise.
11945 * ipa-hsa.c (process_hsa_functions): Likewise.
11946 (ipa_hsa_write_summary): Likewise.
11947 * symbol-summary.h (symtab_duplication): Use ::get function/
11948 (get): New function.
11950 2018-06-08 Martin Liska <mliska@suse.cz>
11952 * config/i386/i386.c (ix86_can_inline_p): Use get_create instead
11954 * hsa-common.c (hsa_summary_t::link_functions): Likewise.
11955 (hsa_register_kernel): Likewise.
11956 * hsa-common.h (hsa_gpu_implementation_p): Likewise.
11957 * hsa-gen.c (hsa_get_host_function): Likewise.
11958 (get_brig_function_name): Likewise.
11959 (generate_hsa): Likewise.
11960 (pass_gen_hsail::execute): Likewise.
11961 * ipa-cp.c (ipcp_cloning_candidate_p): Likewise.
11962 (devirtualization_time_bonus): Likewise.
11963 (ipcp_propagate_stage): Likewise.
11964 * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
11965 (edge_set_predicate): Likewise.
11966 (evaluate_conditions_for_known_args): Likewise.
11967 (evaluate_properties_for_edge): Likewise.
11968 (ipa_fn_summary::reset): Likewise.
11969 (ipa_fn_summary_t::duplicate): Likewise.
11970 (dump_ipa_call_summary): Likewise.
11971 (ipa_dump_fn_summary): Likewise.
11972 (analyze_function_body): Likewise.
11973 (compute_fn_summary): Likewise.
11974 (estimate_edge_devirt_benefit): Likewise.
11975 (estimate_edge_size_and_time): Likewise.
11976 (estimate_calls_size_and_time): Likewise.
11977 (estimate_node_size_and_time): Likewise.
11978 (inline_update_callee_summaries): Likewise.
11979 (remap_edge_change_prob): Likewise.
11980 (remap_edge_summaries): Likewise.
11981 (ipa_merge_fn_summary_after_inlining): Likewise.
11982 (ipa_update_overall_fn_summary): Likewise.
11983 (read_ipa_call_summary): Likewise.
11984 (inline_read_section): Likewise.
11985 (write_ipa_call_summary): Likewise.
11986 (ipa_fn_summary_write): Likewise.
11987 (ipa_free_fn_summary): Likewise.
11988 * ipa-hsa.c (process_hsa_functions): Likewise.
11989 (ipa_hsa_write_summary): Likewise.
11990 (ipa_hsa_read_section): Likewise.
11991 * ipa-icf.c (sem_function::merge): Likewise.
11992 * ipa-inline-analysis.c (simple_edge_hints): Likewise.
11993 (do_estimate_edge_time): Likewise.
11994 (estimate_size_after_inlining): Likewise.
11995 (estimate_growth): Likewise.
11996 (growth_likely_positive): Likewise.
11997 * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
11998 (inline_call): Likewise.
11999 * ipa-inline.c (caller_growth_limits): Likewise.
12000 (can_inline_edge_p): Likewise.
12001 (can_inline_edge_by_limits_p): Likewise.
12002 (compute_uninlined_call_time): Likewise.
12003 (compute_inlined_call_time): Likewise.
12004 (want_inline_small_function_p): Likewise.
12005 (edge_badness): Likewise.
12006 (update_caller_keys): Likewise.
12007 (update_callee_keys): Likewise.
12008 (recursive_inlining): Likewise.
12009 (inline_small_functions): Likewise.
12010 (inline_to_all_callers_1): Likewise.
12011 (dump_overall_stats): Likewise.
12012 (early_inline_small_functions): Likewise.
12013 (early_inliner): Likewise.
12014 * ipa-inline.h (estimate_edge_growth): Likewise.
12015 * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
12016 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
12017 * ipa-prop.h (IPA_NODE_REF): Likewise.
12018 (IPA_EDGE_REF): Likewise.
12019 * ipa-pure-const.c (malloc_candidate_p): Likewise.
12020 (propagate_malloc): Likewise.
12021 * ipa-split.c (execute_split_functions): Likewise.
12022 * symbol-summary.h: Rename get to get_create.
12024 (get_create): Likewise.
12025 * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
12027 2018-06-08 Martin Liska <mliska@suse.cz>
12029 * symbol-summary.h (release): Move definition out of class
12031 (symtab_removal): Likewise.
12032 (symtab_duplication): Likewise.
12034 2018-06-08 Martin Liska <mliska@suse.cz>
12036 * symbol-summary.h (function_summary): Move constructor
12037 implementation out of class declaration.
12038 (release): Likewise.
12039 (symtab_insertion): Likewise.
12040 (symtab_removal): Likewise.
12041 (symtab_duplication): Likewise.
12044 2018-06-08 Martin Liska <mliska@suse.cz>
12046 * Makefile.in: Remove support for MPX (macros, related functions,
12047 fields in cgraph_node, ...).
12048 * builtin-types.def (BT_BND): Likewise.
12049 (BT_FN_BND_CONST_PTR): Likewise.
12050 (BT_FN_CONST_PTR_BND): Likewise.
12051 (BT_FN_VOID_PTR_BND): Likewise.
12052 (BT_FN_BND_CONST_PTR_SIZE): Likewise.
12053 (BT_FN_VOID_CONST_PTR_BND_CONST_PTR): Likewise.
12054 * builtins.c (expand_builtin_memcpy_with_bounds): Likewise.
12055 (expand_builtin_mempcpy_with_bounds): Likewise.
12056 (expand_builtin_memset_with_bounds): Likewise.
12057 (expand_builtin_memset_args): Likewise.
12058 (std_expand_builtin_va_start): Likewise.
12059 (expand_builtin): Likewise.
12060 (expand_builtin_with_bounds): Likewise.
12061 * builtins.def (DEF_BUILTIN_CHKP): Likewise.
12062 (DEF_LIB_BUILTIN_CHKP): Likewise.
12063 (DEF_EXT_LIB_BUILTIN_CHKP): Likewise.
12064 (DEF_CHKP_BUILTIN): Likewise.
12065 (BUILT_IN_MEMCPY): Likewise.
12066 (BUILT_IN_MEMMOVE): Likewise.
12067 (BUILT_IN_MEMPCPY): Likewise.
12068 (BUILT_IN_MEMSET): Likewise.
12069 (BUILT_IN_STPCPY): Likewise.
12070 (BUILT_IN_STRCAT): Likewise.
12071 (BUILT_IN_STRCHR): Likewise.
12072 (BUILT_IN_STRCPY): Likewise.
12073 (BUILT_IN_STRLEN): Likewise.
12074 (BUILT_IN_MEMCPY_CHK): Likewise.
12075 (BUILT_IN_MEMMOVE_CHK): Likewise.
12076 (BUILT_IN_MEMPCPY_CHK): Likewise.
12077 (BUILT_IN_MEMSET_CHK): Likewise.
12078 (BUILT_IN_STPCPY_CHK): Likewise.
12079 (BUILT_IN_STRCAT_CHK): Likewise.
12080 (BUILT_IN_STRCPY_CHK): Likewise.
12081 * calls.c (store_bounds): Likewise.
12082 (emit_call_1): Likewise.
12083 (special_function_p): Likewise.
12084 (maybe_warn_nonstring_arg): Likewise.
12085 (initialize_argument_information): Likewise.
12086 (finalize_must_preallocate): Likewise.
12087 (compute_argument_addresses): Likewise.
12088 (expand_call): Likewise.
12089 * cfgexpand.c (expand_call_stmt): Likewise.
12090 (expand_return): Likewise.
12091 (expand_gimple_stmt_1): Likewise.
12092 (pass_expand::execute): Likewise.
12093 * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Likewise.
12094 (cgraph_node::remove): Likewise.
12095 (cgraph_node::dump): Likewise.
12096 (cgraph_node::verify_node): Likewise.
12097 * cgraph.h (chkp_function_instrumented_p): Likewise.
12098 (symtab_node::get_alias_target): Likewise.
12099 (cgraph_node::can_remove_if_no_direct_calls_and_refs_p): Likewise.
12100 (cgraph_local_p): Likewise.
12101 * cgraphbuild.c (cgraph_edge::rebuild_edges): Likewise.
12102 (cgraph_edge::rebuild_references): Likewise.
12103 * cgraphunit.c (varpool_node::finalize_decl): Likewise.
12104 (walk_polymorphic_call_targets): Likewise.
12105 (cgraph_node::expand_thunk): Likewise.
12106 (symbol_table::output_weakrefs): Likewise.
12107 * common/config/i386/i386-common.c (OPTION_MASK_ISA2_GENERAL_REGS_ONLY_UNSET): Likewise.
12108 (ix86_handle_option): Likewise.
12109 * config/i386/constraints.md: Likewise.
12110 * config/i386/i386-builtin-types.def (BND): Likewise.
12114 * config/i386/i386-builtin.def (BDESC_END): Likewise.
12115 (BDESC_FIRST): Likewise.
12117 * config/i386/i386-c.c (ix86_target_macros_internal): Likewise.
12118 * config/i386/i386-protos.h (ix86_bnd_prefixed_insn_p): Likewise.
12119 * config/i386/i386.c (enum reg_class): Likewise.
12120 (ix86_target_string): Likewise.
12121 (ix86_option_override_internal): Likewise.
12122 (ix86_conditional_register_usage): Likewise.
12123 (ix86_valid_target_attribute_inner_p): Likewise.
12124 (ix86_set_indirect_branch_type): Likewise.
12125 (ix86_set_current_function): Likewise.
12126 (ix86_function_arg_regno_p): Likewise.
12127 (init_cumulative_args): Likewise.
12128 (ix86_function_arg_advance): Likewise.
12129 (ix86_function_arg): Likewise.
12130 (ix86_pass_by_reference): Likewise.
12131 (ix86_function_value_regno_p): Likewise.
12132 (ix86_function_value_1): Likewise.
12133 (ix86_function_value_bounds): Likewise.
12134 (ix86_return_in_memory): Likewise.
12135 (ix86_setup_incoming_vararg_bounds): Likewise.
12136 (ix86_va_start): Likewise.
12137 (indirect_thunk_need_prefix): Likewise.
12138 (print_reg): Likewise.
12139 (ix86_print_operand): Likewise.
12140 (ix86_expand_call): Likewise.
12141 (ix86_output_function_return): Likewise.
12142 (reg_encoded_number): Likewise.
12143 (BDESC_VERIFYS): Likewise.
12144 (ix86_init_mpx_builtins): Likewise.
12145 (ix86_init_builtins): Likewise.
12146 (ix86_emit_cmove): Likewise.
12147 (ix86_emit_move_max): Likewise.
12148 (ix86_expand_builtin): Likewise.
12149 (ix86_builtin_mpx_function): Likewise.
12150 (ix86_get_arg_address_for_bt): Likewise.
12151 (ix86_load_bounds): Likewise.
12152 (ix86_store_bounds): Likewise.
12153 (ix86_load_returned_bounds): Likewise.
12154 (ix86_store_returned_bounds): Likewise.
12155 (ix86_class_likely_spilled_p): Likewise.
12156 (ix86_hard_regno_mode_ok): Likewise.
12157 (x86_order_regs_for_local_alloc): Likewise.
12158 (ix86_mitigate_rop): Likewise.
12159 (ix86_bnd_prefixed_insn_p): Likewise.
12160 (ix86_mpx_bound_mode): Likewise.
12161 (ix86_make_bounds_constant): Likewise.
12162 (ix86_initialize_bounds): Likewise.
12163 (TARGET_LOAD_BOUNDS_FOR_ARG): Likewise.
12164 (TARGET_STORE_BOUNDS_FOR_ARG): Likewise.
12165 (TARGET_LOAD_RETURNED_BOUNDS): Likewise.
12166 (TARGET_STORE_RETURNED_BOUNDS): Likewise.
12167 (TARGET_CHKP_BOUND_MODE): Likewise.
12168 (TARGET_BUILTIN_CHKP_FUNCTION): Likewise.
12169 (TARGET_CHKP_FUNCTION_VALUE_BOUNDS): Likewise.
12170 (TARGET_CHKP_MAKE_BOUNDS_CONSTANT): Likewise.
12171 (TARGET_CHKP_INITIALIZE_BOUNDS): Likewise.
12172 * config/i386/i386.h (TARGET_MPX): Likewise.
12173 (TARGET_MPX_P): Likewise.
12174 (VALID_BND_REG_MODE): Likewise.
12175 (FIRST_BND_REG): Likewise.
12176 (LAST_BND_REG): Likewise.
12177 (enum reg_class): Likewise.
12178 (BND_REG_P): Likewise.
12179 (BND_REGNO_P): Likewise.
12180 (BNDmode): Likewise.
12181 (ADJUST_INSN_LENGTH): Likewise.
12182 * config/i386/i386.md: Likewise.
12183 * config/i386/i386.opt: Likewise.
12184 * config/i386/linux-common.h (LIBMPX_LIBS): Likewise.
12185 (defined): Likewise.
12186 (LINK_MPX): Likewise.
12187 (MPX_SPEC): Likewise.
12188 (LIBMPX_SPEC): Likewise.
12189 (LIBMPXWRAPPERS_SPEC): Likewise.
12190 (CHKP_SPEC): Likewise.
12191 * config/i386/predicates.md: Likewise.
12192 * dbxout.c (dbxout_type): Likewise.
12193 * doc/extend.texi: Likewise.
12194 * doc/invoke.texi: Likewise.
12195 * doc/md.texi: Likewise.
12196 * doc/tm.texi: Likewise.
12197 * doc/tm.texi.in: Likewise.
12198 * dwarf2out.c (is_base_type): Likewise.
12199 (gen_formal_types_die): Likewise.
12200 (gen_subprogram_die): Likewise.
12201 (gen_type_die_with_usage): Likewise.
12202 (gen_decl_die): Likewise.
12203 (dwarf2out_late_global_decl): Likewise.
12204 * expr.c (expand_assignment): Likewise.
12205 (emit_storent_insn): Likewise.
12206 (store_expr_with_bounds): Likewise.
12207 (store_expr): Likewise.
12208 (expand_expr_real_1): Likewise.
12209 * expr.h (store_expr_with_bounds): Likewise.
12210 * function.c (use_register_for_decl): Likewise.
12211 (struct bounds_parm_data): Likewise.
12212 (assign_parms_augmented_arg_list): Likewise.
12213 (assign_parm_find_entry_rtl): Likewise.
12214 (assign_parm_is_stack_parm): Likewise.
12215 (assign_parm_load_bounds): Likewise.
12216 (assign_bounds): Likewise.
12217 (assign_parms): Likewise.
12218 (expand_function_start): Likewise.
12219 * gcc.c (CHKP_SPEC): Likewise.
12220 * gimple-fold.c (gimple_fold_builtin_memory_op): Likewise.
12221 * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Likewise.
12222 (wrestrict_dom_walker::check_call): Likewise.
12223 * gimple.c (gimple_build_call_from_tree): Likewise.
12224 * gimple.h (enum gf_mask): Likewise.
12225 (gimple_call_with_bounds_p): Likewise.
12226 (gimple_call_set_with_bounds): Likewise.
12227 * gimplify.c (gimplify_init_constructor): Likewise.
12228 * ipa-cp.c (initialize_node_lattices): Likewise.
12229 (propagate_constants_across_call): Likewise.
12230 (find_more_scalar_values_for_callers_subset): Likewise.
12231 * ipa-hsa.c (process_hsa_functions): Likewise.
12232 * ipa-icf-gimple.c (func_checker::compare_gimple_call): Likewise.
12233 * ipa-icf.c (sem_function::merge): Likewise.
12234 * ipa-inline.c (early_inliner): Likewise.
12235 * ipa-pure-const.c (warn_function_noreturn): Likewise.
12236 (warn_function_cold): Likewise.
12237 (propagate_pure_const): Likewise.
12238 * ipa-ref.h (enum GTY): Likewise.
12239 * ipa-split.c (find_retbnd): Likewise.
12240 (consider_split): Likewise.
12241 (split_function): Likewise.
12242 * ipa-visibility.c (cgraph_externally_visible_p): Likewise.
12243 * ipa.c (walk_polymorphic_call_targets): Likewise.
12244 (symbol_table::remove_unreachable_nodes): Likewise.
12245 (process_references): Likewise.
12246 (cgraph_build_static_cdtor_1): Likewise.
12247 * lto-cgraph.c (lto_output_node): Likewise.
12248 (output_refs): Likewise.
12249 (compute_ltrans_boundary): Likewise.
12250 (input_overwrite_node): Likewise.
12251 (input_node): Likewise.
12252 (input_cgraph_1): Likewise.
12253 * params.def (PARAM_CHKP_MAX_CTOR_SIZE): Likewise.
12254 * passes.c (pass_manager::execute_early_local_passes): Likewise.
12255 (class pass_chkp_instrumentation_passes): Likewise.
12256 (make_pass_chkp_instrumentation_passes): Likewise.
12257 * passes.def: Likewise.
12258 * rtl.h (struct GTY): Likewise.
12259 (CALL_EXPR_WITH_BOUNDS_P): Likewise.
12260 * stor-layout.c (layout_type): Likewise.
12261 * symtab.c: Likewise.
12262 * target.def: Likewise.
12263 * targhooks.c (default_chkp_bound_type): Likewise.
12264 (default_chkp_bound_mode): Likewise.
12265 (default_builtin_chkp_function): Likewise.
12266 (default_chkp_function_value_bounds): Likewise.
12267 (default_chkp_make_bounds_constant): Likewise.
12268 (default_chkp_initialize_bounds): Likewise.
12269 * targhooks.h (default_chkp_bound_type): Likewise.
12270 (default_chkp_bound_mode): Likewise.
12271 (default_builtin_chkp_function): Likewise.
12272 (default_chkp_function_value_bounds): Likewise.
12273 (default_chkp_make_bounds_constant): Likewise.
12274 (default_chkp_initialize_bounds): Likewise.
12275 * toplev.c (compile_file): Likewise.
12276 (process_options): Likewise.
12277 * tree-core.h (DEF_BUILTIN): Likewise.
12278 (DEF_BUILTIN_CHKP): Likewise.
12279 * tree-inline.c (declare_return_variable): Likewise.
12280 (remap_gimple_stmt): Likewise.
12281 (copy_bb): Likewise.
12282 (initialize_inlined_parameters): Likewise.
12283 (expand_call_inline): Likewise.
12284 * tree-pass.h (make_pass_ipa_chkp_versioning): Likewise.
12285 (make_pass_ipa_chkp_early_produce_thunks): Likewise.
12286 (make_pass_ipa_chkp_produce_thunks): Likewise.
12287 (make_pass_chkp): Likewise.
12288 (make_pass_chkp_opt): Likewise.
12289 (make_pass_chkp_instrumentation_passes): Likewise.
12290 * tree-pretty-print.c (dump_generic_node): Likewise.
12291 * tree-ssa-ccp.c (insert_clobber_before_stack_restore): Likewise.
12292 * tree-ssa-dce.c (propagate_necessity): Likewise.
12293 (eliminate_unnecessary_stmts): Likewise.
12294 * tree-ssa-pre.c (create_expression_by_pieces): Likewise.
12295 * tree-ssa-sccvn.c (copy_reference_ops_from_call): Likewise.
12296 * tree-ssa-sccvn.h: Likewise.
12297 * tree-ssa-strlen.c (get_string_length): Likewise.
12298 (valid_builtin_call): Likewise.
12299 (adjust_last_stmt): Likewise.
12300 (handle_builtin_strchr): Likewise.
12301 (handle_builtin_strcpy): Likewise.
12302 (handle_builtin_stxncpy): Likewise.
12303 (handle_builtin_memcpy): Likewise.
12304 (handle_builtin_strcat): Likewise.
12305 (strlen_check_and_optimize_stmt): Likewise.
12306 * tree-stdarg.c (expand_ifn_va_arg_1): Likewise.
12307 * tree-streamer-in.c: Likewise.
12308 * tree-streamer.c (record_common_node): Likewise.
12309 * tree.c (tree_code_size): Likewise.
12310 (wide_int_to_tree_1): Likewise.
12311 (type_contains_placeholder_1): Likewise.
12312 (build_common_tree_nodes): Likewise.
12313 * tree.def (POINTER_BOUNDS_TYPE): Likewise.
12314 * tree.h (POINTER_BOUNDS_TYPE_P): Likewise.
12315 (POINTER_BOUNDS_P): Likewise.
12316 (BOUNDED_TYPE_P): Likewise.
12317 (BOUNDED_P): Likewise.
12318 (CALL_WITH_BOUNDS_P): Likewise.
12319 (pointer_bounds_type_node): Likewise.
12320 * value-prof.c (gimple_ic): Likewise.
12321 * var-tracking.c (vt_add_function_parameters): Likewise.
12322 * varasm.c (make_decl_rtl): Likewise.
12323 (assemble_start_function): Likewise.
12324 (output_constant): Likewise.
12325 (maybe_assemble_visibility): Likewise.
12326 * varpool.c (ctor_for_folding): Likewise.
12327 * chkp-builtins.def: Remove.
12328 * ipa-chkp.c: Remove.
12329 * ipa-chkp.h: Remove.
12330 * rtl-chkp.c: Remove.
12331 * rtl-chkp.h: Remove.
12332 * tree-chkp-opt.c: Remove.
12333 * tree-chkp.c: Remove.
12334 * tree-chkp.h: Remove.
12336 2018-06-07 Carl Love <cel@us.ibm.com>
12338 * config/rs6000/vsx.md (vextract_fp_from_shorth,
12339 vextract_fp_from_shortl): Add BE support.
12341 2018-06-07 Paul Koning <ni1d@arrl.net>
12343 * compare-elim.c (try_merge_compare): Don't merge compare if
12344 address contains a side effect.
12345 (try_eliminate_compare): Likewise.
12347 2018-06-07 Olga Makhotina <olga.makhotina@intel.com>
12349 * config.gcc: Support "tremont".
12350 * config/i386/driver-i386.c (host_detect_local_cpu): Detect "tremont".
12351 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
12353 * config/i386/i386.c (m_TREMONT): Define.
12354 (processor_target_table): Add "tremont".
12355 (PTA_TREMONT): Define.
12356 (ix86_lea_outperforms): Add TARGET_TREMONT.
12357 (get_builtin_code_for_version): Handle PROCESSOR_TREMONT.
12358 (fold_builtin_cpu): Add M_INTEL_TREMONT, replace M_INTEL_GOLDMONT
12359 and M_INTEL_GOLDMONT_PLUS.
12360 (fold_builtin_cpu): Add "tremont".
12361 (ix86_add_stmt_cost): Add TARGET_TREMONT.
12362 (ix86_option_override_internal): Add "tremont".
12363 * config/i386/i386.h (processor_costs): Define TARGET_TREMONT.
12364 (processor_type): Add PROCESSOR_TREMONT.
12365 * config/i386/x86-tune.def: Add m_TREMONT.
12366 * doc/invoke.texi: Add tremont as x86 -march=/-mtune= CPU type.
12368 2018-06-07 Jozef Lawrynowicz <jozef.l@mittosystems.com>
12370 * config/msp430/msp430.c (msp430_mcu_name): Set the "i" in the
12371 symbol defined for msp430i* devices to be lower case.
12373 2018-06-07 Richard Biener <rguenther@suse.de>
12375 * graphite-sese-to-poly.c (extract_affine): Avoid unneded
12376 wrapping. Properly wrap the result of a BIT_NOT_EXPR.
12377 Properly wrap signed arithmetic if overflow wraps.
12379 2018-06-07 Jakub Jelinek <jakub@redhat.com>
12381 PR tree-optimization/69615
12382 * tree-ssa-reassoc.c (optimize_range_tests_var_bound): If rhs2 is lhs
12383 of a cast from a same precision integral SSA_NAME in a bb dominated
12384 by first_bb, retry with rhs2 set to the rhs1 of the cast. Don't emit
12385 cast to utype if rhs2 has already a compatible type.
12387 2018-06-07 Richard Biener <rguenther@suse.de>
12389 PR tree-optimization/85935
12390 * graphite-scop-detection.c (find_params_in_bb): Analyze
12391 condition operands with respect to the correct loop. Assert
12392 the analysis doesn't fail.
12394 2018-06-04 Carl Love <cel@us.ibm.com>
12396 * config/rs6000/vsx.md (first_match_index_<mode>): Calculate index
12397 using natural element order. Use gen_lshrsi3 instead of gen_ashrsi3
12398 as it is slightly cheaper.
12399 (first_match_or_eos_index_<mode>):
12400 Calculate index using natural element order.
12401 (first_match_index_<mode>):
12402 Calculate index using natural element order.
12403 (first_match_or_eos_index_<mode>):
12404 Calculate index using natural order.
12405 (define_insn vclzlsbb): Change to define_insn vclzlsbb_<mode>.
12406 for BE and LE modes.
12407 * config/rs6000/rs6000-c.c: Rename P9V_BUILTIN_VCLZLSBB,
12408 P9V_BUILTIN_VCLZLSBB_V16QI.
12409 * config/rs6000/rs6000-builtin.def: Make VCLZLSBB mode
12412 2018-06-06 Kelvin Nilsen <kelvin@gcc.gnu.org>
12414 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Adjust
12415 indentation and line wrap for many prototypes. Add missing
12416 @smallexample directives around block of prototypes for vec_xl and
12419 2018-06-05 Michael Meissner <meissner@linux.ibm.com>
12421 * config/rs6000/rs6000.c (rs6000_passes_ieee128): New boolean to
12422 track if we pass or return IEEE 128-bit floating point.
12423 (ieee128_mangling_gcc_8_1): New boolean to say whether to generate
12424 C++ mangling that is compatible with GCC 8.1.
12425 (TARGET_ASM_GLOBALIZE_DECL_NAME): Override target hook.
12426 (init_cumulative_args): Note if we pass or return IEEE 128-bit
12427 floating point types.
12428 (rs6000_function_arg_advance_1): Likewise.
12429 (rs6000_mangle_type): Optionally generate mangled names that match
12430 what GCC 8.1 generated for IEEE 128-bit floating point types.
12431 (rs6000_globalize_decl_name): If we have an external function that
12432 passes or returns IEEE 128-bit types, generate a weak reference
12433 from the mangled name used in GCC 8.1 to the current mangled
12435 (rs6000_init_builtins): Make __ibm128 use the long double type if
12436 long double is IBM extended double. Make __float128 use the long
12437 double type if long double is IEEE 128-bit.
12440 * config/rs6000/rs6000-builtin.def (BU_IBM128_2): New helper
12441 macro for __ibm128 built-in functions.
12442 (PACK_IF): Add __ibm128 pack/unpack functions.
12443 (UNPACK_IF): Likewise.
12444 * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Do not
12445 enable long double built-in functions if long double is IEEE
12446 128-bit floating point.
12447 (rs6000_invalid_builtin): Update long double built-in function
12449 (rs6000_expand_builtin): For PACK_IF and UNPACK_IF built-in
12450 functions, adjust the built-in function to use the long double
12451 built-in function if __ibm128 and long double are the same type.
12452 * doc/extend.texi (PowerPC builtins): Update documention for
12453 __builtin_{,un}pack_longdouble. Add documentation for
12454 __builtin_{,un}pack_ibm128.
12456 2018-06-06 Jim Wilson <jimw@sifive.com>
12458 * config/riscv/riscv.c (enum riscv_privilege_levels): New.
12459 (struct machine_function): New field interrupt_mode.
12460 (riscv_handle_type_attribute): New function. Add forward declaration.
12461 (riscv_attribute_table) <interrupt>: Use riscv_handle_type_attribute.
12462 (riscv_expand_epilogue): Check interrupt_mode field.
12463 (riscv_set_current_function): Check interrupt attribute args and
12464 set interrupt_mode field.
12465 * config/riscv/riscv.md (UNSPECV_SRET, UNSPECV_URET): New.
12466 (riscv_sret, riscv_uret): New.
12467 * doc/extend.texi (RISC-V Function Attributes) <interrupt>: Document
12468 new arguments to interrupt attribute.
12470 2018-06-06 Peter Bergner <bergner@vnet.ibm.com>
12473 * /config/rs6000/rs6000.h (ASM_CPU_SPEC): Add support for -mpower9.
12474 Don't handle -mcpu=power8 if -mpower9-vector is also used.
12476 2018-06-06 Kelvin Nilsen <kelvin@gcc.gnu.org>
12478 * config/rs6000/rs6000-builtin.def (VSX_BUILTIN_VEC_LD,
12479 VSX_BUILTIN_VEC_ST): Add comment to explain non-traditional uses.
12480 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
12481 several redundant entries.
12483 2018-06-06 David Malcolm <dmalcolm@redhat.com>
12485 * config/i386/i386-protos.h (ix86_expand_call): Strengthen return
12486 type from "rtx" to "rtx_insn *".
12487 * config/i386/i386.c (ix86_expand_split_stack_prologue): Likewise
12488 for local "call_insn", removing cast.
12489 (ix86_expand_call): Likewise, introducing a "call_insn" local.
12491 2018-06-06 Eric Botcazou <ebotcazou@adacore.com>
12493 PR tree-optimization/86066
12494 * gimple-ssa-store-merging.c (process_store): Do not bypass BIT_NOT_EXPR
12495 for BIT_INSERT_EXPR stores.
12497 2018-06-06 Richard Biener <rguenther@suse.de>
12499 PR tree-optimization/86062
12500 * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
12501 component refs ontop
12502 of to be offsetted base.
12504 2018-06-06 Jozef Lawrynowicz <jozef.l@mittosystems.com>
12506 * config/msp430/msp430.c (msp430_attr): Allow interrupt handlers
12507 to be static and remove check on interrupt attribute name.
12509 2018-06-05 Kelvin Nilsen <kelvin@gcc.gnu.org>
12511 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
12512 volatile qualifier from vec_lvsl and vec_lvsr argument prototypes.
12514 2018-06-05 Steve Ellcey <sellcey@cavium.com>
12517 * config/aarch64/aarch64-protos.h (aarch64_err_no_fpadvsimd): Remove
12519 * config/aarch64/aarch64-protos..c (aarch64_err_no_fpadvsimd):
12520 Remove second argument, change how error is called.
12521 (aarch64_layout_arg): Remove second argument from
12522 aarch64_err_no_fpadvsimd call.
12523 (aarch64_init_cumulative_args): Ditto.
12524 (aarch64_gimplify_va_arg_expr): Ditto.
12525 * config/aarch64/aarch64.md (mov<mode>): Ditto.
12527 2018-06-05 Uros Bizjak <ubizjak@gmail.com>
12529 * config/i386/i386.md (simple_return_indirect_internal): New expander.
12530 (*simple_return_indirect_internal<mode>): Rename from
12531 simple_return_indirect_internal. Use W mode iterator.
12532 (rstorssp): New expander.
12533 (*rstorssp<mode>): Rename from rstorssp. Use P mode iterator.
12534 (clrssbsy): New expander.
12535 (*clrssbsy<mode>): Rename from clrssbsy. Use P mode iterator.
12537 2018-06-05 Andre Vieira <andre.simoesdiasvieira@arm.com>
12539 * config/arm/arm_cmse.h (cmse_nsfptr_create): Change typeof to
12541 (cmse_check_pointed_object): Likewise.
12543 2018-06-05 Martin Liska <mliska@suse.cz>
12545 PR gcov-profile/47618
12546 * doc/invoke.texi: Document how -fprofile-dir format
12549 2018-06-05 Richard Biener <rguenther@suse.de>
12551 * tree-cfgcleanup.c (cleanup_control_flow_pre): For edge
12552 removal pretend DOM info isn't available so we do not update
12553 it and only remove edges, not dominated blocks. Actually free
12554 DOM info in case we removed something. Remove unreachable blocks.
12555 (mfb_keep_latches): Work with either DOM info or marked backedges.
12556 (cleanup_tree_cfg_noloop): Do not remove unreachable blocks
12557 first. Mark backedges if DOM info isn't available.
12558 (Re-)compute DOM info after cleanup_control_flow_pre.
12560 2018-06-05 Richard Biener <rguenther@suse.de>
12562 * tree-cfg.c (struct locus_discrim_map): Store line, not location.
12563 (locus_discrim_hasher::hash): Adjust.
12564 (locus_discrim_hasher::equal): Likewise.
12565 (next_discriminator_for_locus): Work on line directly.
12566 (same_line_p): Pass in expanded locus1 as well.
12567 (assign_discriminators): Avoid redundant location expansions.
12569 2018-06-05 Richard Biener <rguenther@suse.de>
12571 PR tree-optimization/86046
12572 * tree-ssa.c (maybe_optimize_var): Clear DECL_GIMPLE_REG_P
12573 if required after clearing TREE_ADDRESSABLE.
12575 2018-06-05 Richard Biener <rguenther@suse.de>
12577 PR tree-optimization/86047
12578 * tree-ssa-loop.c (for_each_index): Glob handling of all
12579 decls and constants and really handle all of them.
12581 2018-06-05 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
12584 * config/arm/arm-builtins.c (arm_type_qualifiers): Add
12585 qualifier_void_pointer and qualifier_const_void_pointer.
12586 (arm_ldc_qualifiers, arm_stc_qualifiers): Use the above.
12587 (arm_init_builtins): Handle the above.
12588 * config/arm/arm_acle.h (__arm_cdp, __arm_ldc, __arm_ldcl, __arm_stc,
12589 __arm_stcl, __arm_mcr, __arm_cdp2, __arm_ldc2, __arm_ldcl2, __arm_stc2,
12590 __arm_stcl2,__arm_mcr2, __arm_mcrr, __arm_mcrr2): Remove return for
12593 2018-06-05 Martin Liska <mliska@suse.cz>
12595 * auto-profile.c (read_autofdo_file): Do not use
12596 gcov_ctr_summary struct.
12597 (afdo_callsite_hot_enough_for_early_inline): Likewise.
12598 * coverage.c (struct counts_entry): Likewise.
12599 (read_counts_file): Read just single summary entry.
12600 (get_coverage_counts): Use gcov_summary struct.
12601 * coverage.h (get_coverage_counts): Likewise.
12602 * gcov-dump.c (dump_working_sets): Likewise.
12603 (tag_summary): Dump just single summary.
12604 * gcov-io.c (gcov_write_summary): Write just histogram
12606 (gcov_read_summary): Read just single summary.
12607 (compute_working_sets): Use gcov_summary struct.
12608 * gcov-io.h (GCOV_TAG_SUMMARY_LENGTH): Remove usage
12609 of GCOV_COUNTERS_SUMMABLE.
12610 (GCOV_COUNTERS_SUMMABLE): Remove.
12611 (GCOV_FIRST_VALUE_COUNTER): Replace with
12612 GCOV_COUNTER_V_INTERVAL.
12613 (struct gcov_ctr_summary): Remove.
12614 (struct gcov_summary): Directly use fields of former
12616 (compute_working_sets): Use gcov_summary struct.
12617 * gcov.c (read_count_file): Do not use ctrs fields.
12618 * lto-cgraph.c (merge_profile_summaries): Use gcov_summary
12620 * lto-streamer.h (struct GTY): Make profile_info gcov_summary
12622 * profile.c: Likewise.
12623 * profile.h: Likewise.
12625 2018-06-05 Martin Liska <mliska@suse.cz>
12627 PR gcov-profile/84846
12628 * gcov.c (output_lines): Print working directory only
12629 in intermediate format.
12631 2018-06-05 Andreas Krebbel <krebbel@linux.ibm.com>
12633 * config/s390/s390-builtin-types.def: Add void function type.
12634 * config/s390/s390-builtins.def: Use the function type for the
12637 2018-06-04 Jim Wilson <jimw@sifive.com>
12639 * config/riscv/riscv-protos.h (riscv_expand_epilogue): Change bool arg
12641 * config/riscv/riscv.c (riscv_for_each_saved_reg): New args epilogue
12642 and maybe_eh_return. Change regno to unsigned int. Use new args to
12643 handle EH_RETURN_DATA_REGNO registers properly.
12644 (riscv_expand_prologue): Pass new args to riscv_for_each_saved_reg.
12645 (riscv_expand_epilogue): Update comment. Change argument name and
12646 type. Update code to use new name and type. Pass new args to
12647 riscv_for_each_saved_reg. Only use EH_RETURN_STACKADJ_RTX when
12649 * config/riscv/riscv.md (NORMAL_RETURN): New.
12650 (SIBCALL_RETURN, EXCEPTION_RETURN): New.
12651 (epilogue, sibcall_epilogue): Update riscv_expand_epilogue arg.
12652 (eh_return): Call gen_eh_return_internal and emit barrier.
12653 (eh_return_internal): Call riscv_expand_epilogue.
12655 2018-06-04 Eric Botcazou <ebotcazou@adacore.com>
12657 * gimple-ssa-store-merging.c (struct merged_store_group): Move up
12658 bit_insertion field and declare can_be_merged_into method.
12659 (merged_store_group::can_be_merged_into): New method.
12660 (imm_store_chain_info::coalesce_immediate): Call it to decide whether
12661 consecutive non-overlapping stores can be merged. Turn MEM_REF stores
12662 into BIT_INSERT_EXPR stores if the group contains a non-MEM_REF store.
12664 2018-06-04 Richard Biener <rguenther@suse.de>
12666 PR tree-optimization/85955
12667 * builtins.c (fold_builtin_sincos): Convert pointers to
12668 destination to appropriate type before dereferencing.
12670 2018-06-04 Segher Boessenkool <segher@kernel.crashing.org>
12672 * config/rs6000/rs6000.md (abs<mode>2 for FLOAT128): Handle IFmode.
12674 2018-06-04 Richard Sandiford <richard.sandiford@linaro.org>
12676 * expr.c (expand_expr_real_1): Force the operand into memory if
12677 its TYPE_MODE is BLKmode and if there is no integer mode for
12678 the number of bits being extracted.
12680 2018-06-04 Jakub Jelinek <jakub@redhat.com>
12684 * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
12685 Use vptestnm rather than vptestm in (=Yc,v,C) variant.
12687 2018-06-04 Richard Biener <rguenther@suse.de>
12689 * tree-cfgcleanup.c (cleanup_tree_cfg_1): Fold into...
12690 (cleanup_tree_cfg_noloop): ... single caller. Do
12691 start_recording_case_labels later.
12693 2018-06-04 Sebastian Peryt <sebastian.peryt@intel.com>
12695 * config/i386/cldemoteintrin.h: Change define from _X86INTRIN_H_INCLUDED
12696 to _IMMINTRIN_H_INCLUDED.
12697 * config/i386/pconfigintrin.h: Ditto.
12698 * config/i386/waitpkgintrin.h: Ditto.
12699 * config/i386/immintrin.h: Add includes for sgxintrin.h,
12700 pconfigintrin.h, waitpkgintrin.h and cldemoteintrin.h.
12701 * config/i386/x86intrin.h: Remove includes for mintrin.h, xmmintrin.h,
12702 emmintrin.h, pmmintrin.h, tmmintrin.h, smmintrin.h, wmmintrin.h,
12703 bmiintrin.h, bmi2intrin.h, lzcntintrin.h, sgxintrin.h, pconfigintrin.h,
12704 waitpkgintrin.h and cldemoteintrin.h.
12706 2018-06-04 Richard Biener <rguenther@suse.de>
12708 PR tree-optimization/86038
12709 * tracer.c (find_best_successor): Check probability for
12710 being initialized, bail out if not.
12712 2018-06-04 Richard Earnshaw <rearnsha@arm.com>
12715 * config/arm/arm-cpus.in (ALL_QUIRKS): Add xscale feature to the list
12716 of bits to ignore when comparing architectures.
12718 2018-06-04 Jakub Jelinek <jakub@redhat.com>
12720 PR tree-optimization/69615
12721 * fold-const.c (merge_ranges): If range1 is - [x, x] and x is the
12722 maximum or minimum of the type, try to merge it also as if
12723 range1 is + [-, x - 1] or + [x + 1, -].
12726 * tree.c (inchash::add_expr): Handle IDENTIFIER_NODE.
12728 2018-06-03 Eric Botcazou <ebotcazou@adacore.com>
12730 PR tree-optimization/86034
12731 * gimple-ssa-store-merging.c (output_merged_store): Convert the RHS to
12732 the unsigned bitfield type in a bit insertion sequence if it does not
12733 have a larger precision than the bitfield size.
12734 (process_store): Also bypass widening conversions for BIT_INSERT_EXPR.
12736 2018-06-03 Kito Cheng <kito.cheng@gmail.com>
12738 * config/nds32/nds32-peephole2.md: Add new patterns for code size.
12740 2018-06-03 Chung-Ju Wu <jasonwucj@gmail.com>
12742 * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3J.
12743 * config/nds32/nds32.c (nds32_option_override): Consider ARCH_V3J.
12744 * config/nds32/nds32.h (TARGET_ISA_V3): Add ARCH_V3J checking.
12745 * config/nds32/nds32.opt (march): Add enum value Value(ARCH_V3J).
12747 2018-06-03 Chung-Ju Wu <jasonwucj@gmail.com>
12749 * common/config/nds32/nds32-common.c (nds32_option_optimization_table):
12750 Disable -fdelete-null-pointer-checks for ELF toolchain.
12752 2018-06-02 Chung-Ju Wu <jasonwucj@gmail.com>
12753 Kito Cheng <kito.cheng@gmail.com>
12755 * config.gcc (nds32*): Use nds32-linux.opt and nds32-elf.opt.
12756 (nds32le-*-*, nds32be-*-*): Integrate checking process.
12757 (nds32*-*-*): Add glibc and uclibc conditions.
12758 * common/config/nds32/nds32-common.c (nds32_except_unwind_info): New.
12759 (TARGET_EXCEPT_UNWIND_INFO): Define.
12760 * config/nds32/elf.h: New file.
12761 * config/nds32/linux.h: New file.
12762 * config/nds32/nds32-elf.opt: New file.
12763 * config/nds32/nds32-linux.opt: New file.
12764 * config/nds32/nds32-fp-as-gp.c
12765 (pass_nds32_fp_as_gp::gate): Consider TARGET_LINUX_ABI.
12766 * config/nds32/nds32.c (nds32_conditional_register_usage): Consider
12768 (nds32_asm_file_end): Ditto.
12769 (nds32_print_operand): Ditto.
12770 (nds32_insert_attributes): Ditto.
12771 (nds32_init_libfuncs): New function.
12772 (TARGET_HAVE_TLS): Define.
12773 (TARGET_INIT_LIBFUNCS): Define.
12774 * config/nds32/nds32.h (TARGET_DEFAULT_RELAX): Apply different relax
12776 (TARGET_ELF): Apply different mcmodel setting.
12777 (LINK_SPEC, LIB_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): The content has
12778 been migrated into elf.h and linux.h files.
12779 * config/nds32/nds32.md (add_pc): Consider TARGET_LINUX_ABI.
12780 * config/nds32/nds32.opt (mvh): Consider TARGET_LINUX_ABI.
12781 (mcmodel): The content has been migrated into nds32-elf.opt and
12782 nds32-linux.opt files.
12783 * config/nds32/t-elf: New file.
12784 * config/nds32/t-linux: New file.
12786 2018-06-02 Chung-Ju Wu <jasonwucj@gmail.com>
12787 Shiva Chen <shiva0217@gmail.com>
12789 * config/nds32/constants.md (unspec_volatile_element): Add
12790 UNSPEC_VOLATILE_OMIT_FP_BEGIN and UNSPEC_VOLATILE_OMIT_FP_END.
12791 * config/nds32/nds32-fp-as-gp.c: New implementation of fp_as_gp
12793 * config/nds32/nds32-protos.h (nds32_naked_function_p): Declare.
12794 (make_pass_nds32_fp_as_gp): Declare.
12795 * config/nds32/nds32.c (nds32_register_passes): Add fp_as_gp as one
12797 (nds32_asm_function_end_prologue): Remove unused asm output.
12798 (nds32_asm_function_begin_epilogue): Remove unused asm output.
12799 (nds32_asm_file_start): Output necessary fp_as_gp information.
12800 (nds32_option_override): Adjust register usage.
12801 (nds32_expand_prologue): Consider fp_as_gp situation.
12802 (nds32_expand_prologue_v3push): Consider fp_as_gp situation.
12803 * config/nds32/nds32.md (prologue): Check fp_as_gp_p and naked_p.
12806 (simple_return): Ditto.
12807 (omit_fp_begin): Output special directive for fp_as_gp.
12808 (omit_fp_end): Output special directive for fp_as_gp.
12809 * config/nds32/nds32.opt (mfp-as-gp, mno-fp-as-gp, mforce-fp-as-gp,
12810 mforbid-fp-as-gp): New options.
12812 2018-06-01 Mark Wielaard <mark@klomp.org>
12814 * dwarf2out.c (dwarf2out_finish): Remove generation of
12815 DW_AT_loclists_base.
12817 2018-06-01 Eric Botcazou <ebotcazou@adacore.com>
12819 * gimple-ssa-store-merging.c: Include gimple-fold.h.
12820 (struct store_immediate_info): Document BIT_INSERT_EXPR stores.
12821 (struct merged_store_group): Add bit_insertion field.
12822 (dump_char_array): Use standard hexadecimal format.
12823 (merged_store_group::merged_store_group): Set bit_insertion to false.
12824 (merged_store_group::apply_stores): Use optimal buffer size. Deal
12825 with BIT_INSERT_EXPR stores. Move up code updating the mask and
12826 also print the mask in the dump file.
12827 (pass_store_merging::gate): Minor tweak.
12828 (imm_store_chain_info::coalesce_immediate): Fix wrong association
12829 of stores with groups in dump. Allow coalescing of BIT_INSERT_EXPR
12830 stores with INTEGER_CST stores.
12831 (count_multiple_uses) <BIT_INSERT_EXPR>: New case.
12832 (imm_store_chain_info::output_merged_store): Add try_bitpos variable
12833 and use it throughout. Generate bit insertion sequences if need be.
12834 (pass_store_merging::process_store): Remove redundant condition.
12835 Record stores from a SSA name to a bit-field with BIT_INSERT_EXPR.
12837 2018-06-01 Segher Boessenkool <segher@kernel.crashing.org>
12839 * config/rs6000/rs6000.c (rs6000_mangle_type): Change the mangling of
12840 the 128-bit floating point types. Fix function comment.
12842 2018-06-01 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
12844 * config/aarch64/aarch64-simd.md
12845 (aarch64_simd_vec_unpack<su>_lo_<mode>): Use UXTL and SXTL assembler
12847 (aarch64_simd_vec_unpack<su>_hi_<mode>): Use UXTL2 and SXTL2 assembler
12850 2018-06-01 Richard Sandiford <richard.sandiford@linaro.org>
12852 PR tree-optimization/85989
12853 * gimple-ssa-backprop.c (backprop::m_visited_phis): New member
12855 (backprop::intersect_uses): Check it when deciding whether this
12856 is a backedge reference.
12857 (backprop::process_block): Add each phi to m_visited_phis
12858 after visiting it, then clear it at the end.
12860 2018-06-01 Richard Biener <rguenther@suse.de>
12862 * tree-vectorizer.h (vect_dr_stmt): New function.
12863 (vect_get_load_cost): Adjust.
12864 (vect_get_store_cost): Likewise.
12865 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence):
12866 Use vect_dr_stmt instead of DR_SMTT.
12867 (vect_record_base_alignments): Likewise.
12868 (vect_calculate_target_alignment): Likewise.
12869 (vect_compute_data_ref_alignment): Likewise and make static.
12870 (vect_update_misalignment_for_peel): Likewise.
12871 (vect_verify_datarefs_alignment): Likewise.
12872 (vector_alignment_reachable_p): Likewise.
12873 (vect_get_data_access_cost): Likewise. Pass down
12874 vinfo to vect_get_load_cost/vect_get_store_cost instead of DR.
12875 (vect_get_peeling_costs_all_drs): Likewise.
12876 (vect_peeling_hash_get_lowest_cost): Likewise.
12877 (vect_enhance_data_refs_alignment): Likewise.
12878 (vect_find_same_alignment_drs): Likewise.
12879 (vect_analyze_data_refs_alignment): Likewise.
12880 (vect_analyze_group_access_1): Likewise.
12881 (vect_analyze_group_access): Likewise.
12882 (vect_analyze_data_ref_access): Likewise.
12883 (vect_analyze_data_ref_accesses): Likewise.
12884 (vect_vfa_segment_size): Likewise.
12885 (vect_small_gap_p): Likewise.
12886 (vectorizable_with_step_bound_p): Likewise.
12887 (vect_prune_runtime_alias_test_list): Likewise.
12888 (vect_analyze_data_refs): Likewise.
12889 (vect_supportable_dr_alignment): Likewise.
12890 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
12891 (vect_gen_prolog_loop_niters): Likewise.
12892 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
12893 * tree-vect-patterns.c (vect_recog_bool_pattern): Do not
12895 (vect_recog_mask_conversion_pattern): Likewise.
12896 (vect_try_gather_scatter_pattern): Likewise.
12897 * tree-vect-stmts.c (vect_model_store_cost): Pass stmt_info
12898 to vect_get_store_cost.
12899 (vect_get_store_cost): Get stmt_info instead of DR.
12900 (vect_model_load_cost): Pass stmt_info to vect_get_load_cost.
12901 (vect_get_load_cost): Get stmt_info instead of DR.
12903 2018-06-01 Richard Biener <rguenther@suse.de>
12905 PR middle-end/86017
12906 * gimple-fold.c (var_decl_component_p): Also allow offsetted
12907 vars wrapped in MEM_REFs.
12909 2018-06-01 Richard Sandiford <richard.sandiford@linaro.org>
12911 * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
12912 Fix subreg tests so that we only return a choice between
12913 GENERAL_REGS and FP_REGS if the original classes included both.
12915 2018-06-01 Richard Biener <rguenther@suse.de>
12918 * tree-ssa-structalias.c (get_function_part_constraint):
12919 Handle NULL fi->decl.
12920 (find_func_aliases_for_call): Properly handle indirect
12921 fi from direct call.
12922 (find_func_clobbers): Likewise.
12923 (ipa_pta_execute): Likewise.
12924 (create_variable_info_for): For functions that are ifunc_resolver
12925 resolve to a varinfo that contains the result of the resolver call.
12926 (associate_varinfo_to_alias): Do not treat ifunc resolvers as
12929 2018-05-31 Michael Collison <michael.collison@arm.com>
12931 * config/aarch64/aarch64.md:
12932 (*fix_to_zero_extenddfdi2): New pattern.
12933 * gcc.target/aarch64/fix_extend1.c: New testcase.
12935 2018-05-31 Qing Zhao <qing.zhao@oracle.com>
12937 PR middle-end/78809
12938 PR middle-end/83026
12939 * builtins.c (expand_builtin): Add the handling of BUILT_IN_STRCMP_EQ
12940 and BUILT_IN_STRNCMP_EQ.
12941 * builtins.def: Add new builtins BUILT_IN_STRCMP_EQ and
12942 BUILT_IN_STRNCMP_EQ.
12943 * gimple-fold.c (gimple_fold_builtin_string_compare): Add the
12944 handling of BUILTIN_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
12945 (gimple_fold_builtin): Likewise.
12946 * tree-ssa-strlen.c (compute_string_length): New function.
12947 (determine_min_obsize): New function.
12948 (handle_builtin_string_cmp): New function to handle calls to
12949 string compare functions.
12950 (strlen_optimize_stmt): Add handling to builtin string compare
12952 * tree-ssa-structalias.c (find_func_aliases_for_builtin_call):
12953 Add the handling of BUILT_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
12954 * tree.c (build_common_builtin_nodes): Add new defines of
12955 BUILT_IN_STRNCMP_EQ and BUILT_IN_STRCMP_EQ.
12957 2018-05-31 Jakub Jelinek <jakub@redhat.com>
12960 * bb-reorder.c (pass_partition_blocks::gate): Return false for
12961 functions with naked attribute.
12963 2018-05-31 Uros Bizjak <ubizjak@gmail.com>
12965 * config/i386/sse.md (avx_vec_concat<mode>):
12966 Substitute concat_tg_mode mode attribute with xtg_mode.
12967 (<mask_codefor>avx512dq_broadcast<mode><mask_name>_1): Ditto.
12968 (concat_tg_mode): Remove mode attribute.
12970 2018-05-31 Martin Sebor <msebor@redhat.com>
12973 * calls.c (alloc_max_size): Correct a logic error/typo.
12974 Treat excessive arguments as infinite. Warn for invalid arguments.
12975 * doc/invoke.texi (-Walloc-size-larger-than): Update.
12977 2018-05-31 H.J. Lu <hongjiu.lu@intel.com>
12980 * config/i386/x86-tune.def: Re-enable partial_reg_dependency
12981 and movx for Haswell.
12983 2018-05-31 Chung-Lin Tang <cltang@codesourcery.com>
12984 Cesar Philippidis <cesar@codesourcery.com>
12986 PR middle-end/85879
12987 * gimplify.c (gimplify_adjust_omp_clauses): Add 'remove = true'
12988 when emitting error on private/firstprivate reductions.
12989 * omp-low.c (lower_omp_target): Avoid reference-type processing
12990 on pointers for firstprivate clause.
12992 2018-05-31 Sameera Deshpande <sameera.deshpande@linaro.org>
12994 * config/aarch64/aarch64-simd-builtins.def (ld1x3): New.
12997 * config/aarch64/aarch64-simd.md
12998 (aarch64_ld1x3<VALLDIF:mode>): New pattern.
12999 (aarch64_ld1_x3_<mode>): Likewise
13000 (aarch64_st1x2<VALLDIF:mode>): Likewise
13001 (aarch64_st1_x2_<mode>): Likewise
13002 (aarch64_st1x3<VALLDIF:mode>): Likewise
13003 (aarch64_st1_x3_<mode>): Likewise
13004 * config/aarch64/arm_neon.h (vld1_u8_x3): New function.
13005 (vld1_s8_x3): Likewise.
13006 (vld1_u16_x3): Likewise.
13007 (vld1_s16_x3): Likewise.
13008 (vld1_u32_x3): Likewise.
13009 (vld1_s32_x3): Likewise.
13010 (vld1_u64_x3): Likewise.
13011 (vld1_s64_x3): Likewise.
13012 (vld1_f16_x3): Likewise.
13013 (vld1_f32_x3): Likewise.
13014 (vld1_f64_x3): Likewise.
13015 (vld1_p8_x3): Likewise.
13016 (vld1_p16_x3): Likewise.
13017 (vld1_p64_x3): Likewise.
13018 (vld1q_u8_x3): Likewise.
13019 (vld1q_s8_x3): Likewise.
13020 (vld1q_u16_x3): Likewise.
13021 (vld1q_s16_x3): Likewise.
13022 (vld1q_u32_x3): Likewise.
13023 (vld1q_s32_x3): Likewise.
13024 (vld1q_u64_x3): Likewise.
13025 (vld1q_s64_x3): Likewise.
13026 (vld1q_f16_x3): Likewise.
13027 (vld1q_f32_x3): Likewise.
13028 (vld1q_f64_x3): Likewise.
13029 (vld1q_p8_x3): Likewise.
13030 (vld1q_p16_x3): Likewise.
13031 (vld1q_p64_x3): Likewise.
13032 (vst1_s64_x2): Likewise.
13033 (vst1_u64_x2): Likewise.
13034 (vst1_f64_x2): Likewise.
13035 (vst1_s8_x2): Likewise.
13036 (vst1_p8_x2): Likewise.
13037 (vst1_s16_x2): Likewise.
13038 (vst1_p16_x2): Likewise.
13039 (vst1_s32_x2): Likewise.
13040 (vst1_u8_x2): Likewise.
13041 (vst1_u16_x2): Likewise.
13042 (vst1_u32_x2): Likewise.
13043 (vst1_f16_x2): Likewise.
13044 (vst1_f32_x2): Likewise.
13045 (vst1_p64_x2): Likewise.
13046 (vst1q_s8_x2): Likewise.
13047 (vst1q_p8_x2): Likewise.
13048 (vst1q_s16_x2): Likewise.
13049 (vst1q_p16_x2): Likewise.
13050 (vst1q_s32_x2): Likewise.
13051 (vst1q_s64_x2): Likewise.
13052 (vst1q_u8_x2): Likewise.
13053 (vst1q_u16_x2): Likewise.
13054 (vst1q_u32_x2): Likewise.
13055 (vst1q_u64_x2): Likewise.
13056 (vst1q_f16_x2): Likewise.
13057 (vst1q_f32_x2): Likewise.
13058 (vst1q_f64_x2): Likewise.
13059 (vst1q_p64_x2): Likewise.
13060 (vst1_s64_x3): Likewise.
13061 (vst1_u64_x3): Likewise.
13062 (vst1_f64_x3): Likewise.
13063 (vst1_s8_x3): Likewise.
13064 (vst1_p8_x3): Likewise.
13065 (vst1_s16_x3): Likewise.
13066 (vst1_p16_x3): Likewise.
13067 (vst1_s32_x3): Likewise.
13068 (vst1_u8_x3): Likewise.
13069 (vst1_u16_x3): Likewise.
13070 (vst1_u32_x3): Likewise.
13071 (vst1_f16_x3): Likewise.
13072 (vst1_f32_x3): Likewise.
13073 (vst1_p64_x3): Likewise.
13074 (vst1q_s8_x3): Likewise.
13075 (vst1q_p8_x3): Likewise.
13076 (vst1q_s16_x3): Likewise.
13077 (vst1q_p16_x3): Likewise.
13078 (vst1q_s32_x3): Likewise.
13079 (vst1q_s64_x3): Likewise.
13080 (vst1q_u8_x3): Likewise.
13081 (vst1q_u16_x3): Likewise.
13082 (vst1q_u32_x3): Likewise.
13083 (vst1q_u64_x3): Likewise.
13084 (vst1q_f16_x3): Likewise.
13085 (vst1q_f32_x3): Likewise.
13086 (vst1q_f64_x3): Likewise.
13087 (vst1q_p64_x3): Likewise.
13089 2018-05-30 Jozef Lawrynowicz <jozef.l@mittosystems.com>
13091 * config/msp430/msp430.c (msp430_output_labelref): Prepend
13092 user_label_prefix to name.
13094 * tree-core.h: Update comment about the format of NAME string
13095 passed to handler in attribute_spec.
13097 * config/msp430/msp430.md: Remove erroneous subreg expression from
13098 zero_extendqisi2 insn pattern. Remove msp430x ISA restriction on
13099 zero_extend{q,h}isi2.
13101 2018-05-30 Borislav Petkov <bp@suse.de>
13103 * doc/extend.texi: Document some architecture specific
13104 constraints and sort entries.
13106 2018-05-30 Martin Sebor <msebor@redhat.com>
13108 PR middle-end/85369
13109 * builtins.c (expand_builtin_stpcpy_1): New function.
13110 (expand_builtin_stpcpy): Call it, and call maybe_warn_nonstring_arg
13111 only if the former succeeds.
13113 2018-05-31 Sameera Deshpande <sameera.deshpande@linaro.org>
13115 * config/aarch64/aarch64-cores.def (saphira) : Add support for ARMv8.4
13118 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
13120 * doc/invoke.texi (-flinker-output): Document
13122 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
13124 * passes.c (ipa_write_summaries): Only modify statements if body
13126 * cgraphunit.c (ipa_passes): Also produce intermeidate code when
13127 incrementally linking.
13128 (ipa_passes): Likewise.
13129 * lto-cgraph.c (lto_output_node): When incrementally linking do not
13130 pass down resolution info.
13131 * common.opt (flag_incremental_link): Update info.
13132 * gcc.c (plugin specs): Turn flinker-output=* to
13133 -plugin-opt=-linker-output-known
13134 * toplev.c (compile_file): Also cut compilation when doing incremental
13136 * flag-types. (enum lto_partition_model): Add
13137 LTO_LINKER_OUTPUT_NOLTOREL.
13138 (invoke.texi): Add -flinker-output docs.
13139 * ipa.c (symbol_table::remove_unreachable_nodes): Handle LTO incremental
13140 link same way as WPA; do not stream in dead initializers.
13142 * dwarf2out.c (dwarf2out_die_ref_for_decl,
13143 darf2out_register_external_decl): Support incremental link.
13145 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
13147 * lto-opts.c (lto_write_options): Skip OPT_dumpdir, OPT_fresolution_.
13149 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
13151 * lto-wrapper.c (debug_objcopy): Add rename parameter; pass
13152 it down to simple_object_copy_lto_debug_sections.
13153 (run_gcc): Determine incremental LTO link time and configure
13154 lto1 into non-wpa mode, disable renaming of debug sections.
13156 2018-05-30 Kelvin Nilsen <kelvin@gcc.gnu.org>
13158 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
13159 descriptions of various incorrectly documented functions.
13161 2018-05-30 Andre Vieira <andre.simoesdiasvieira@arm.com>
13164 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
13165 address check not strict.
13167 2018-05-30 Richard Biener <rguenther@suse.de>
13169 PR tree-optimization/85964
13170 * tracer.c (better_p): Drop initialized count check, we only
13171 call the function with initialized counts now.
13172 (find_best_successor): Do find a best edge if one
13173 has uninitialized count.
13174 (find_best_predecessor): Likewise. Do BB frequency check only
13175 if count is initialized.
13177 2017-05-30 Jackson Woodruff <jackson.woodruff@arm.com>
13179 * config/aarch64/aarch64.c (aarch64_host_wide_int_compare): New.
13180 (aarch64_ldrstr_offset_compare): New.
13181 (aarch64_operands_adjust_ok_for_ldpstp): Update to consider all
13182 load/store orderings.
13183 (aarch64_gen_adjusted_ldpstp): Likewise.
13185 2018-05-30 Wilco Dijkstra <wdijkstr@arm.com>
13187 * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
13188 Check for subset of GENERAL_REGS and FP_REGS.
13189 * config/aarch64/aarch64-simd.md (aarch64_get_lane): Increase cost of
13192 2018-05-30 Richard Sandiford <richard.sandiford@linaro.org>
13194 * alias.c (adjust_offset_for_component_ref): Use poly_int_tree_p
13195 and wi::to_poly_offset. Add the current offset and then check
13196 whether the sum fits, rather than using an unchecked addition of
13197 a checked term. Check for a shwi rather than a uhwi.
13198 * expr.c (get_bit_range): Use tree_to_poly_uint64.
13199 (store_constructor): Use poly_int_tree_p.
13200 (expand_expr_real_1): Likewise.
13201 * function.c (assign_temp): Likewise.
13202 * fold-const.c (const_binop): Use poly_int_tree_p and
13203 wi::to_poly_offset.
13204 (fold_indirect_ref_1): Likewise. Use multiple_p to attempt an exact
13206 * ipa-icf-gimple.c (func_checker::compare_operand): Use
13207 to_poly_offset for MEM offsets.
13208 * ipa-icf.c (sem_variable::equals): Likewise.
13209 * stor-layout.c (compute_record_mode): Use poly_int_tree_p.
13210 * tree-ssa-sccvn.c (ao_ref_init_from_vn_reference): Use
13211 wi::to_poly_offset for BIT_FIELD_REF offsets.
13212 (vn_reference_maybe_forwprop_address): Use poly_int_tree_p and
13213 wi::to_poly_offset.
13214 * var-tracking.c (emit_note_insn_var_location): Use
13215 tree_to_poly_uint64.
13217 2018-05-29 Jim Wilson <jimw@sifive.com>
13219 * config/riscv/riscv.c (riscv_interrupt_type): Fix comment typo.
13221 2018-05-29 Uros Bizjak <ubizjak@gmail.com>
13224 * config/i386/i386.md (l<rounding_insn><MODEF:mode><SWI48:mode>2):
13225 Enable for TARGET_SSE4_1 and generate rounds{s,d} and cvtts{s,d}2si{,q}
13227 (sse4_1_round<mode>2): Use nonimmediate_operand
13228 for operand 1 predicate.
13230 2018-05-29 Martin Sebor <msebor@redhat.com>
13231 Richard Biener <rguenther@suse.de>
13234 * calls.c (get_size_range): Call determine_value_range instead
13235 of get_value_range..
13236 * tree-vrp.h (determine_value_range): Declared new function.
13237 * tree-vrp.c (determine_value_range_1, determine_value_range): New.
13239 2018-05-29 Richard Biener <rguenther@suse.de>
13241 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Make
13242 sure to use non-pattern stmts for get_earlier_stmt arguments.
13243 * tree-vectorizer.h (get_earlier_stmt): Assert we do not get
13244 called on pattern stmts.
13245 (get_later_stmt): Likewise.
13247 2018-05-29 Martin Liska <mliska@suse.cz>
13249 PR gcov-profile/85759
13250 * doc/gcov.texi: Document GCOV_ERROR_FILE and GCOV_EXIT_AT_ERROR
13253 2018-05-29 Jakub Jelinek <jakub@redhat.com>
13255 * tree-cfg.c (verify_gimple_assign_unary): Add checking for
13257 (verify_gimple_assign_binary): Check TYPE_VECTOR_SUBPARTS for
13261 * tree.def (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
13262 VEC_PACK_FLOAT_EXPR): New tree codes.
13263 * tree-pretty-print.c (op_code_prio): Handle
13264 VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR.
13265 (dump_generic_node): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
13266 VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
13267 * tree-inline.c (estimate_operator_cost): Likewise.
13268 * gimple-pretty-print.c (dump_binary_rhs): Handle VEC_PACK_FLOAT_EXPR.
13269 * fold-const.c (const_binop): Likewise.
13270 (const_unop): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR and
13271 VEC_UNPACK_FIX_TRUNC_LO_EXPR.
13272 * tree-cfg.c (verify_gimple_assign_unary): Likewise.
13273 (verify_gimple_assign_binary): Handle VEC_PACK_FLOAT_EXPR.
13274 * cfgexpand.c (expand_debug_expr): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
13275 VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
13276 * expr.c (expand_expr_real_2): Likewise.
13277 * optabs.def (vec_packs_float_optab, vec_packu_float_optab,
13278 vec_unpack_sfix_trunc_hi_optab, vec_unpack_sfix_trunc_lo_optab,
13279 vec_unpack_ufix_trunc_hi_optab, vec_unpack_ufix_trunc_lo_optab): New
13281 * optabs.c (expand_widen_pattern_expr): For
13282 VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR use
13283 sign from result type rather than operand's type.
13284 (expand_binop_directly): For vec_packu_float_optab and
13285 vec_packs_float_optab allow result type to be different from operand's
13287 * optabs-tree.c (optab_for_tree_code): Handle
13288 VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
13289 VEC_PACK_FLOAT_EXPR. Formatting fixes.
13290 * tree-vect-generic.c (expand_vector_operations_1): Handle
13291 VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
13292 VEC_PACK_FLOAT_EXPR.
13293 * tree-vect-stmts.c (supportable_widening_operation): Handle
13295 (supportable_narrowing_operation): Handle FLOAT_EXPR.
13296 * config/i386/i386.md (fixprefix, floatprefix): New code attributes.
13297 * config/i386/sse.md (*float<floatunssuffix>v2div2sf2): Rename to ...
13298 (float<floatunssuffix>v2div2sf2): ... this. Formatting fix.
13299 (vpckfloat_concat_mode, vpckfloat_temp_mode, vpckfloat_op_mode): New
13301 (vec_pack<floatprefix>_float_<mode>): New expander.
13302 (vunpckfixt_mode, vunpckfixt_model, vunpckfixt_extract_mode): New mode
13304 (vec_unpack_<fixprefix>fix_trunc_lo_<mode>,
13305 vec_unpack_<fixprefix>fix_trunc_hi_<mode>): New expanders.
13306 * doc/md.texi (vec_packs_float_@var{m}, vec_packu_float_@var{m},
13307 vec_unpack_sfix_trunc_hi_@var{m}, vec_unpack_sfix_trunc_lo_@var{m},
13308 vec_unpack_ufix_trunc_hi_@var{m}, vec_unpack_ufix_trunc_lo_@var{m}):
13310 * doc/generic.texi (VEC_UNPACK_FLOAT_HI_EXPR,
13311 VEC_UNPACK_FLOAT_LO_EXPR): Fix pasto in description.
13312 (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
13313 VEC_PACK_FLOAT_EXPR): Document.
13315 2018-05-29 Richard Biener <rguenther@suse.de>
13317 * tree-vectorizer.h (struct vec_info): Add stmt_vec_infos
13319 (stmt_vec_info_vec): Make pointer.
13320 (init_stmt_vec_info_vec): Remove.
13321 (free_stmt_vec_info_vec): Likewise.
13322 (set_stmt_vec_info_vec): New function.
13323 (free_stmt_vec_infos): Likewise.
13324 (vinfo_for_stmt): Adjust for stmt_vec_info_vec indirection.
13325 (set_vinfo_for_stmt): Likewise.
13326 (get_earlier_stmt): Likewise.
13327 (get_later_stmt): Likewise.
13328 * tree-vectorizer.c (stmt_vec_info_vec): Make pointer.
13329 (vec_info::vec_info): Allocate stmt_vec_infos and set the global.
13330 (vec_info::~vec_info): Free stmt_vec_infos.
13331 (vectorize_loops): Set the global stmt_vec_info_vec to NULL.
13332 Remove old init_stmt_vec_info_vec/free_stmt_vec_info_vec calls.
13333 (pass_slp_vectorize::execute): Likewise.
13334 * tree-vect-stmts.c (init_stmt_vec_info_vec): Remove.
13335 (free_stmt_vec_info_vec): Likewise.
13336 (set_stmt_vec_info_vec): New function.
13337 (free_stmt_vec_infos): Likewise.
13338 * tree-vect-loop.c (_loop_vec_info::~_loop_vec_info): Set
13339 the global stmt_vec_info_vec.
13340 * tree-parloops.c (gather_scalar_reductions): Use
13341 set_stmt_vec_info_vec/free_stmt_vec_infos and maintain a local
13344 2018-05-29 Richard Biener <rguenther@suse.de>
13346 * dominance.c (iterate_fix_dominators): Push/pop TV_DOMINANCE.
13348 2018-05-29 Martin Liska <mliska@suse.cz>
13349 David Malcolm <dmalcolm@redhat.com>
13351 * vec.c (test_reverse): New.
13352 (vec_c_tests): Add new test.
13353 * vec.h (vl_ptr>::reverse): New function.
13355 2018-05-29 Gerald Pfeifer <gerald@pfeifer.com>
13357 * config.gcc: Identify FreeBSD 3.x and 4.x as unsupported.
13359 * config/freebsd-spec.h (FBSD_LIB_SPEC): Only consider FreeBSD 5
13362 2018-05-28 Bernd Edlinger <bernd.edlinger@hotmail.de>
13364 * tree-dump.c (dump_node): Use splay_tree_delete_pointers.
13366 2018-05-28 Richard Biener <rguenther@suse.de>
13368 PR tree-optimization/85933
13369 * tree-vect-data-refs.c (vect_record_base_alignments): Only
13370 look at stmts marked as vectorizable.
13372 2018-05-28 Richard Biener <rguenther@suse.de>
13374 PR tree-optimization/85934
13375 * tree-vect-generic.c (expand_vector_operations_1): Hoist
13376 vector boolean check before scalar optimization.
13378 2018-05-28 Jakub Jelinek <jakub@redhat.com>
13380 * doc/invoke.texi (ARM Options): Use @item instead of @itemx
13383 2018-05-28 Mark Wielaard <mark@klomp.org>
13385 * dwarf2asm.c (dw2_asm_output_delta_uleb128): Add brackets around lab2
13386 if it is an expression containing a minus sign.
13388 2018-05-27 John David Anglin <danglin@gcc.gnu.org>
13390 * config/pa/pa-linux.h (NEED_INDICATE_EXEC_STACK): Define to 0.
13392 2018-05-27 Paul Koning <ni1d@arrl.net>
13394 * config/pdp11/pdp11.md (truncsihi2): Remove.
13396 2018-05-27 Monk Chiang <sh.chiang04@gmail.com>
13397 Chung-Ju Wu <jasonwucj@gmail.com>
13399 * config/nds32/nds32-intrinsic.md (unaligned_storedi): Modify patterns
13401 (unaligned_store_dw): Ditto.
13402 * config/nds32/nds32-memory-manipulation.c
13403 (nds32_expand_movmemsi_loop_known_size): Refactoring implementation.
13404 (nds32_gen_dup_4_byte_to_word_value): Rename to ...
13405 (nds32_gen_dup_4_byte_to_word_value_aux): ... this.
13406 (emit_setmem_word_loop): Rename to ...
13407 (emit_setmem_doubleword_loop): ... this.
13408 (nds32_gen_dup_4_byte_to_word_value): New function.
13409 (nds32_gen_dup_8_byte_to_double_word_value): New function.
13410 (nds32_expand_setmem_loop): Refine implementation.
13411 (nds32_expand_setmem_loop_v3m): Ditto.
13412 * config/nds32/nds32-multiple.md (unaligned_store_update_base_dw): New
13415 2018-05-27 Chung-Ju Wu <jasonwucj@gmail.com>
13417 * config/nds32/nds32.md (bswapsi2, bswaphi2): New patterns.
13419 2018-05-27 Chung-Ju Wu <jasonwucj@gmail.com>
13421 * config/nds32/nds32.c (nds32_attribute_table): Add "no_prologue".
13422 (nds32_init_machine_status): Initialize machine->attr_naked_p and
13423 machine->attr_no_prologue_p.
13424 (nds32_compute_stack_frame): Check "naked" and "no_prologue" attributes.
13425 (nds32_naked_function_p): Handle "naked" and "no_prologue" attributes.
13426 (nds32_expand_epilogue): Consider attr_naked_p.
13427 (nds32_expand_epilogue_v3pop): Likewise.
13428 (nds32_can_use_return_insn): Likewise.
13429 * config/nds32/nds32.h (machine_function): Add attr_naked_p and
13430 attr_no_prologue_p fields.
13431 * config/nds32/nds32.opt (mret-in-naked-func): New option.
13433 2018-05-27 Jakub Jelinek <jakub@redhat.com>
13436 * config/i386/i386.md (fixunssuffix, floatunssuffix): New code
13438 * config/i386/sse.md
13439 (<floatsuffix>float<sseintvecmodelower><mode>2<mask_name><round_name>):
13441 (float<floatunssuffix><sseintvecmodelower><mode>2<mask_name><round_name>):
13443 (<floatsuffix>float<sselongvecmodelower><mode>2<mask_name><round_name>):
13445 (float<floatunssuffix><sselongvecmodelower><mode>2<mask_name><round_name>):
13447 (*<floatsuffix>floatv2div2sf2): Rename to ...
13448 (*float<floatunssuffix>v2div2sf2): ... this.
13449 (<floatsuffix>floatv2div2sf2_mask): Rename to ...
13450 (float<floatunssuffix>v2div2sf2_mask): ... this.
13451 (*<floatsuffix>floatv2div2sf2_mask_1): Rename to ...
13452 (*float<floatunssuffix>v2div2sf2_mask_1): ... this.
13453 (<fixsuffix>fix_truncv8dfv8si2<mask_name><round_saeonly_name>): Rename
13455 (fix<fixunssuffix>_truncv8dfv8si2<mask_name><round_saeonly_name>):
13457 (<fixsuffix>fix_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
13459 (fix<fixunssuffix>_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
13461 (<fixsuffix>fix_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
13463 (fix<fixunssuffix>_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
13465 (<fixsuffix>fix_truncv2sfv2di2<mask_name>): Rename to ...
13466 (fix<fixunssuffix>_truncv2sfv2di2<mask_name>): ... this.
13467 (vec_pack_ufix_trunc_<mode>): Use gen_fixuns_truncv8dfv8si2 instead of
13468 gen_ufix_truncv8dfv8si2.
13469 * config/i386/i386-builtin.def (__builtin_ia32_cvttpd2uqq256_mask,
13470 __builtin_ia32_cvttpd2uqq128_mask, __builtin_ia32_cvttps2uqq256_mask,
13471 __builtin_ia32_cvttps2uqq128_mask, __builtin_ia32_cvtuqq2ps256_mask,
13472 __builtin_ia32_cvtuqq2ps128_mask, __builtin_ia32_cvtuqq2pd256_mask,
13473 __builtin_ia32_cvtuqq2pd128_mask, __builtin_ia32_cvttpd2udq512_mask,
13474 __builtin_ia32_cvtuqq2ps512_mask, __builtin_ia32_cvtuqq2pd512_mask,
13475 __builtin_ia32_cvttps2uqq512_mask, __builtin_ia32_cvttpd2uqq512_mask):
13476 Use fixuns instead ufix or floatuns instead ufloat in CODE_FOR_ names.
13478 2018-05-24 H.J. Lu <hongjiu.lu@intel.com>
13482 * varasm.c (assemble_alias): Lookup ifunc attribute on error.
13484 2018-05-25 Jim Wilson <jimw@sifive.com>
13486 * config/riscv/riscv-protos.h (riscv_epilogue_uses): New.
13487 * config/riscv/riscv.c (struct machine_function): Add
13488 interrupt_handler_p and attribute_checked_p fields.
13489 (riscv_attribute_table): Add interrupt.
13490 (riscv_interrupt_type_p): New.
13491 (riscv_save_reg_p): Save extra regs for interrupt handler.
13492 (riscv_use_save_libcall): Return false for interrupt handler.
13493 (riscv_first_stack_step): Add forward declaration.
13494 (riscv_compute_frame_info): New local interrupt_save_t1. Set it
13495 for interrupt handler with large frame. Use it for saved reg list.
13496 (riscv_expand_prologue): Move flag_stack_usage_info support to
13497 eliminate duplication.
13498 (riscv_expand_epilogue): Generate mret for interrupt handler.
13499 (riscv_epilogue_uses): New.
13500 (riscv_can_use_return_insn): Return false for interrupt handler.
13501 (riscv_function_ok_for_sibcall): Likewise.
13502 (riscv_set_current_function): Add interrupt handler support.
13503 * config/riscv/riscv.h (EPILOGUE_USES): Call riscv_epilogue_uses.
13504 * config/riscv/riscv.md (UNSPECV_MRET): New.
13506 (riscv_frflags, riscv_fsflags): Use tab after opcode.
13508 * doc/extend.texi (RISC-V Function Attributes) <interrupt>: New.
13510 2018-05-25 Bill Schmidt <wschmidt@linux.ibm.com>
13512 PR tree-optimization/85712
13513 * gimple-ssa-strength-reduction.c (replace_one_candidate): Skip if
13514 this candidate has already been replaced in-situ by a copy.
13516 2018-05-25 Jason Merrill <jason@redhat.com>
13518 PR c++/80485 - inline function non-zero address.
13519 * symtab.c (nonzero_address): Check DECL_COMDAT.
13521 2018-05-25 Uros Bizjak <ubizjak@gmail.com>
13524 * config/alpha/alpha.md (ashlsi3): New insn pattern.
13525 (*ashlsi_se): Rename from *ashldi_se. Define as sign
13526 extension of SImode operation. Use const123_operand predicate.
13527 (*saddsi_1): Remove.
13528 (*saddl_se_1): Ditto.
13529 (*ssubsi_1): Ditto.
13530 (*ssubl_se_1): Ditto.
13531 * config/alpha/predicates.md (const123_operand): New predicate.
13532 * config/alpha/constraints.md (P): Use IN_RANGE.
13534 2018-05-25 Richard Biener <rguenther@suse.de>
13536 * tree-ssa-alias.h (refs_may_alias_p): Add tbaa_p bool parameter,
13538 (ref_maybe_used_by_stmt_p): Likewise.
13539 (stmt_may_clobber_ref_p): Likewise.
13540 (stmt_may_clobber_ref_p_1): Likewise.
13541 * tree-ssa-alias.c (refs_may_alias_p): Add tbaa_p bool parameter
13543 (ref_maybe_used_by_stmt_p): Likewise.
13544 (stmt_may_clobber_ref_p): Likewise.
13545 (stmt_may_clobber_ref_p_1): Likewise.
13546 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Use
13547 the alias oracle to disambiguate DRs with stmts DR analysis
13549 (vect_analyze_data_refs): Do not give up on not analyzable
13550 DRs for BB vectorization. Remove code truncating the dataref
13553 2018-05-25 Jakub Jelinek <jakub@redhat.com>
13556 * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
13557 Add (=Yk,v,C) variant using vptestm insn. Use TARGET_AVX512BW
13558 in test instead of TARGET_AVX512F for VI12_AVX512VL iterator.
13560 2018-05-25 Richard Biener <rguenther@suse.de>
13562 * tree-vect-data-refs.c (vect_find_stmt_data_reference): New
13563 function, combining stmt data ref gathering and fatal analysis
13565 (vect_analyze_data_refs): Remove now redudnant code and simplify.
13566 * tree-vect-loop.c (vect_get_datarefs_in_loop): Factor out from
13567 vect_analyze_loop_2 and use vect_find_stmt_data_reference.
13568 * tree-vect-slp.c (vect_slp_bb): Use vect_find_stmt_data_reference.
13569 * tree-vectorizer.h (vect_find_stmt_data_reference): Declare.
13571 2018-05-25 Bin Cheng <bin.cheng@arm.com>
13573 PR tree-optimization/85720
13574 * tree-loop-distribution.c (break_alias_scc_partitions): Don't merge
13575 SCC if all partitions are builtins.
13576 (version_loop_by_alias_check): New parameter. Generate cancelable
13577 runtime alias check if all partitions are builtins.
13578 (distribute_loop): Update call to above function.
13580 2018-05-25 Bin Cheng <bin.cheng@arm.com>
13582 * tree-outof-ssa.c (tree-ssa.h, tree-dfa.h): Include header files.
13583 (create_default_def, for_all_parms): Moved from tree-ssa-coalesce.c.
13584 (parm_default_def_partition_arg): Ditto.
13585 (set_parm_default_def_partition): Ditto.
13586 (get_parm_default_def_partitions): Ditto and make it static.
13587 (get_undefined_value_partitions): Ditto and make it static.
13588 (remove_ssa_form): Refactor call to init_var_map here.
13589 * tree-ssa-coalesce.c (build_ssa_conflict_graph): Support live range
13590 computation for loop region.
13591 (coalesce_partitions, compute_optimized_partition_bases): Ditto.
13592 (register_default_def): Delete.
13593 (for_all_parms, create_default_def): Move to tree-outof-ssa.c.
13594 (parm_default_def_partition_arg): Ditto.
13595 (set_parm_default_def_partition): Ditto.
13596 (get_parm_default_def_partitions): Ditto and make it static.
13597 (get_undefined_value_partitions): Ditto and make it static.
13598 (coalesce_with_default, coalesce_with_default): Update comment.
13599 (create_coalesce_list_for_region): New func factored out from
13600 create_outofssa_var_map.
13601 (populate_coalesce_list_for_outofssa): New func factored out from
13602 create_outofssa_var_map and coalesce_ssa_name.
13603 (create_outofssa_var_map): Delete.
13604 (coalesce_ssa_name): Refactor to support live range computation.
13605 * tree-ssa-coalesce.h (coalesce_ssa_name): Change decl.
13606 (get_parm_default_def_partitions): Delete.
13607 (get_undefined_value_partitions): Ditto.
13608 * tree-ssa-live.c (init_var_map, delete_var_map): Support live range
13609 computation for loop region.
13610 (new_tree_live_info, loe_visit_block): Ditto.
13611 (live_worklist, set_var_live_on_entry): Ditto.
13612 (calculate_live_on_exit, verify_live_on_entry): Ditto.
13613 * tree-ssa-live.h (struct _var_map): New fields.
13614 (init_var_map): Change decl.
13615 (region_contains_p): New.
13617 2018-05-25 Bin Cheng <bin.cheng@arm.com>
13619 * tree-ssa-live.h (live_merge_and_clear): Delete.
13621 2018-05-25 Richard Biener <rguenther@suse.de>
13624 * tree-dump.c (dequeue_and_dump): Remove access to removed
13625 operand 2 of a SWITCH_EXPR.
13627 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
13629 * doc/sourcebuild.texi (vect_double_cond_arith): Include
13630 multiplication and division.
13631 * doc/md.texi (cond_mul@var{m}, cond_div@var{m}, cond_mod@var{m})
13632 (cond_udiv@var{m}, cond_umod@var{m}): Document.
13633 * optabs.def (cond_smul_optab, cond_sdiv_optab, cond_smod_optab)
13634 (cond_udiv_optab, cond_umod_optab): New optabs.
13635 * internal-fn.def (IFN_COND_MUL, IFN_COND_DIV, IFN_COND_MOD)
13636 (IFN_COND_RDIV): New internal functions.
13637 * internal-fn.c (get_conditional_internal_fn): Handle TRUNC_DIV_EXPR,
13638 TRUNC_MOD_EXPR and RDIV_EXPR.
13639 * match.pd (UNCOND_BINARY, COND_BINARY): Handle them.
13640 * config/aarch64/iterators.md (UNSPEC_COND_MUL, UNSPEC_COND_DIV):
13642 (SVE_INT_BINARY): Include mult.
13643 (SVE_COND_FP_BINARY): Include UNSPEC_MUL and UNSPEC_DIV.
13644 (optab, sve_int_op): Handle mult.
13645 (optab, sve_fp_op, commutative): Handle UNSPEC_COND_MUL and
13647 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New pattern
13648 for SVE_INT_BINARY_SD.
13650 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
13652 * config/aarch64/iterators.md (SVE_INT_BINARY_SD): New code iterator.
13653 (optab, sve_int_op): Handle div and udiv.
13654 * config/aarch64/aarch64-sve.md (<optab><mode>3): New expander
13655 for SVE_INT_BINARY_SD.
13656 (*<optab><mode>3): New insn for the same.
13658 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
13660 * tree-vect-patterns.c: Include predict.h.
13661 (vect_recog_divmod_pattern): Restrict check for division support
13662 to when optimizing for size.
13664 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
13666 * doc/sourcebuild.texi (vect_double_cond_arith: Document.
13667 * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 4.
13668 (gimple_match_op::gimple_match_op): Add an overload for 4 operands.
13669 (gimple_match_op::set_op): Likewise.
13670 (gimple_resimplify4): Declare.
13671 * genmatch.c (get_operand_type): Handle CFN_COND_* functions.
13672 (expr::gen_transform): Likewise.
13673 (decision_tree::gen): Generate a simplification routine for 4 operands.
13674 * gimple-match-head.c (gimple_simplify): Add an overload for
13675 4 operands. In the top-level function, handle up to 4 call
13676 arguments and call gimple_resimplify4.
13677 (gimple_resimplify4): New function.
13678 (build_call_internal): Pass a fourth operand.
13679 (maybe_push_to_seq): Likewise.
13680 * match.pd (UNCOND_BINARY, COND_BINARY): New operator lists.
13681 Fold VEC_COND_EXPRs of an operation and a default value into
13682 an IFN_COND_* function if possible.
13683 * config/aarch64/iterators.md (UNSPEC_COND_MAX, UNSPEC_COND_MIN):
13685 (SVE_COND_FP_BINARY): Include them.
13686 (optab, sve_fp_op): Handle them.
13687 (SVE_INT_BINARY_REV): New code iterator.
13688 (SVE_COND_FP_BINARY_REV): New int iterator.
13689 (commutative): New int attribute.
13690 * config/aarch64/aarch64-protos.h (aarch64_sve_prepare_conditional_op):
13692 * config/aarch64/aarch64.c (aarch64_sve_prepare_conditional_op): New
13694 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Use it.
13695 (*cond_<optab><mode>): New patterns for reversed operands.
13697 2018-05-25 Richard Biener <rguenther@suse.de>
13699 * tree-vectorizer.h (STMT_VINFO_GROUP_*, GROUP_*): Remove.
13700 (DR_GROUP_*): New, assert we have non-NULL ->data_ref_info.
13701 (REDUC_GROUP_*): New, assert we have NULL ->data_ref_info.
13702 (STMT_VINFO_GROUPED_ACCESS): Adjust.
13703 * tree-vect-data-refs.c (everywhere): Adjust users.
13704 * tree-vect-loop.c (everywhere): Likewise.
13705 * tree-vect-slp.c (everywhere): Likewise.
13706 * tree-vect-stmts.c (everywhere): Likewise.
13707 * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
13709 2018-05-25 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
13711 * configure.ac (gcc_cv_as_section_has_e): Move to common section.
13713 (gcc_cv_as_section_exclude): ... this.
13714 Try Solaris as #exclude syntax.
13715 * configure: Regenerate.
13716 * config.in: Regenerate.
13717 * config/i386/i386.c (i386_solaris_elf_named_section): Handle
13719 * config/sparc/sparc.c (sparc_solaris_elf_asm_named_section)
13720 [HAVE_GAS_SECTION_EXCLUDE]: Handle SECTION_EXCLUDE.
13722 * varasm.c (default_elf_asm_named_section): Don't check if
13723 HAVE_GAS_SECTION_EXCLUDE is defined.
13725 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
13727 * doc/md.texi: Update the documentation of the cond_* optabs
13728 to mention the new final operand. Fix GET_MODE_NUNITS call.
13729 Describe the scalar case too.
13730 * internal-fn.def (IFN_EXTRACT_LAST): Change type to fold_left.
13731 * internal-fn.c (expand_cond_unary_optab_fn): Expect 3 operands
13733 (expand_cond_binary_optab_fn): Expect 4 operands instead of 3.
13734 (get_conditional_internal_fn): Update comment.
13735 * tree-vect-loop.c (vectorizable_reduction): Pass the original
13736 accumulator value as a final argument to conditional functions.
13737 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Turn into
13738 a define_expand and add an "else" operand. Assert for now that
13739 the else operand is equal to operand 2. Use SVE_INT_BINARY and
13740 SVE_COND_FP_BINARY instead of SVE_COND_INT_OP and SVE_COND_FP_OP.
13741 (*cond_<optab><mode>): New patterns.
13742 * config/aarch64/iterators.md (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX)
13743 (UNSPEC_COND_SMIN, UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
13744 (UNSPEC_COND_EOR): Delete.
13745 (optab): Remove associated mappings.
13746 (SVE_INT_BINARY): New code iterator.
13747 (sve_int_op): Remove int attribute and add "minus" to the code
13749 (SVE_COND_INT_OP): Delete.
13750 (SVE_COND_FP_OP): Rename to...
13751 (SVE_COND_FP_BINARY): ...this.
13753 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
13755 * optabs.c (can_reuse_operands_p): New function.
13756 (maybe_legitimize_operands): Try to reuse the results for
13759 2018-05-24 Uros Bizjak <ubizjak@gmail.com>
13761 * config/i386/sse.md (cvtusi2<ssescalarmodesuffix>64<round_name>):
13762 Add {q} suffix to insn mnemonic.
13764 2018-05-23 Jozef Lawrynowicz <jozef.l@mittosystems.com>
13766 * config/msp430/msp430.c (TARGET_WARN_FUNC_RETURN): Define.
13767 (msp430_warn_func_return): New.
13769 2018-05-24 Roger Sayle <roger@nextmovesoftware.com>
13771 * fold-const.c (tree_nonzero_bits): New function.
13772 * fold-const.h (tree_nonzero_bits): Likewise.
13773 * match.pd (POPCOUNT): New patterns to fold BUILTIN_POPCOUNT and
13774 friends. POPCOUNT(x&1) => x&1, POPCOUNT(x)==0 => x==0, etc.
13776 2018-05-24 H.J. Lu <hongjiu.lu@intel.com>
13780 * varasm.c (assemble_alias): Check ifunc_resolver only on
13783 2018-05-24 Uros Bizjak <ubizjak@gmail.com>
13786 * config/i386/sse.md (movdi_to_sse): Do not generate pseudo
13787 when memory input operand is handled.
13789 2018-05-24 Luis Machado <luis.machado@linaro.org>
13791 * config/aarch64/aarch64.c (qdf24xx_addrcost_table): New static
13793 (qdf24xx_tunings) <addr_costs>: Set to qdf24xx_addrcost_table.
13795 2018-05-24 Richard Sandiford <richard.sandiford@linaro.org>
13797 * match.pd: Delay FMA folds until after vectorization.
13799 2018-05-24 Andre Vieira <andre.simoesdiasvieira@arm.com>
13802 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
13803 address check not strict.
13805 2018-05-24 Richard Sandiford <richard.sandiford@linaro.org>
13807 * gimple-match.h (gimple_match_op): New class.
13808 (mprts_hook): Replace parameters with a gimple_match_op *.
13809 (maybe_build_generic_op): Likewise.
13810 (gimple_simplified_result_is_gimple_val): Replace parameters with
13811 a const gimple_match_op *.
13812 (gimple_simplify): Replace code_helper * and tree * parameters with
13813 a gimple_match_op * parameter.
13814 (gimple_resimplify1): Replace code_helper *, tree and tree *
13815 parameters with a gimple_match_op * parameter.
13816 (gimple_resimplify2): Likewise.
13817 (gimple_resimplify3): Likewise.
13818 (maybe_push_res_to_seq): Replace code_helper, tree and tree *
13819 parameters with a gimple_match_op * parameter.
13820 * gimple-match-head.c (gimple_simplify): Change prototypes of
13821 auto-generated functions to take a gimple_match_op * instead of
13822 separate code_helper * and tree * parameters. Make the same
13823 change in the top-level overload and update calls to the
13824 gimple_resimplify routines. Update calls to the auto-generated
13825 functions and to maybe_push_res_to_seq in the publicly-facing
13826 operation-specific gimple_simplify overloads.
13827 (gimple_match_op::MAX_NUM_OPS): Define.
13828 (gimple_resimplify1): Replace rcode and ops with a single res_op
13829 parameter. Update call to gimple_simplify.
13830 (gimple_resimplify2): Likewise.
13831 (gimple_resimplify3): Likewise.
13832 (mprts_hook): Replace parameters with a gimple_match_op *.
13833 (maybe_build_generic_op): Likewise.
13834 (build_call_internal): Replace type, nargs and ops with
13835 a gimple_match_op *.
13836 (maybe_push_res_to_seq): Replace res_code, type and ops parameters
13837 with a single gimple_match_op *. Update calls to mprts_hook,
13838 build_call_internal and gimple_simplified_result_is_gimple_val.
13839 Factor out code that is common to the tree_code and combined_fn cases.
13840 * genmatch.c (expr::gen_transform): Replace tem_code and
13841 tem_ops with a gimple_match_op called tem_op. Update calls
13842 to the gimple_resimplify functions and maybe_push_res_to_seq.
13843 (dt_simplify::gen_1): Manipulate res_op instead of res_code and
13844 res_ops. Update call to the gimple_resimplify functions.
13845 (dt_simplify::gen): Pass res_op instead of res_code and res_ops.
13846 (decision_tree::gen): Make the functions take a gimple_match_op *
13847 called res_op instead of separate res_code and res_ops parameters.
13848 Update call accordingly.
13849 * gimple-fold.c (replace_stmt_with_simplification): Replace rcode
13850 and ops with a single res_op parameter. Update calls to
13851 maybe_build_generic_op and maybe_push_res_to_seq.
13852 (fold_stmt_1): Update calls to gimple_simplify and
13853 replace_stmt_with_simplification.
13854 (gimple_fold_stmt_to_constant_1): Update calls to gimple_simplify
13855 and gimple_simplified_result_is_gimple_val.
13856 * tree-cfgcleanup.c (cleanup_control_expr_graph): Update call to
13858 * tree-ssa-sccvn.c (vn_lookup_simplify_result): Replace parameters
13859 with a gimple_match_op *.
13860 (vn_nary_build_or_lookup): Likewise. Update call to
13861 vn_nary_build_or_lookup_1.
13862 (vn_nary_build_or_lookup_1): Replace rcode, type and ops with a
13863 gimple_match_op *. Update calls to the gimple_resimplify routines
13864 and to gimple_simplified_result_is_gimple_val.
13865 (vn_nary_simplify): Update call to vn_nary_build_or_lookup_1.
13866 Use gimple_match_op::MAX_NUM_OPS instead of a hard-coded 3.
13867 (vn_reference_lookup_3): Update call to vn_nary_build_or_lookup.
13868 (visit_nary_op): Likewise.
13869 (visit_reference_op_load): Likewise.
13871 2018-05-23 Luis Machado <luis.machado@linaro.org>
13873 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Use correct type
13874 modifier for printing the step amount.
13876 2018-05-23 Jozef Lawrynowicz <jozef.l@somniumtech.com>
13879 * tree.c (build_common_tree_nodes): Dont set TYPE_SIZE for __intN
13882 2018-05-23 Segher Boessenkool <segher@kernel.crashing.org>
13884 * doc/sourcebuild.texi (Endianness): New subsubsection.
13886 2018-05-23 Luis Machado <luis.machado@linaro.org>
13888 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
13889 <prefetch_dynamic_strides>: New const bool field.
13890 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
13891 prefetch_dynamic_strides.
13892 (exynosm1_prefetch_tune): Likewise.
13893 (thunderxt88_prefetch_tune): Likewise.
13894 (thunderx_prefetch_tune): Likewise.
13895 (thunderx2t99_prefetch_tune): Likewise.
13896 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides to
13898 (aarch64_override_options_internal): Update to set
13899 PARAM_PREFETCH_DYNAMIC_STRIDES.
13900 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
13901 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
13902 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
13903 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
13904 prefetch-dynamic-strides setting.
13906 2018-05-23 Luis Machado <luis.machado@linaro.org>
13908 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
13909 <minimum_stride>: New const int field.
13910 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
13911 minimum_stride field defaulting to -1.
13912 (exynosm1_prefetch_tune): Likewise.
13913 (thunderxt88_prefetch_tune): Likewise.
13914 (thunderx_prefetch_tune): Likewise.
13915 (thunderx2t99_prefetch_tune): Likewise.
13916 (qdf24xx_prefetch_tune) <minimum_stride>: Set to 2048.
13917 <default_opt_level>: Set to 3.
13918 (aarch64_override_options_internal): Update to set
13919 PARAM_PREFETCH_MINIMUM_STRIDE.
13920 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
13921 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
13922 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
13923 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
13924 stride is constant and is below the minimum stride threshold.
13926 2018-05-23 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
13928 * config/arm/arm-cpus.in (mode26): Delete.
13929 (armv4): Delete mode26 reference.
13930 * config/arm/arm.c (arm_configure_build_target): Delete use of
13933 2018-05-23 Uros Bizjak <ubizjak@gmail.com>
13935 * config/i386/i386.md (*floatuns<SWI48:mode><MODEF:mode>2_avx512):
13937 (floatunssi<mode>2): Also enable for AVX512F and TARGET_SSE_MATH.
13938 Rewrite expander pattern. Emit gen_floatunssi<mode>2_i387_with_xmm
13940 (floatunsdisf2): Rewrite expander pattern. Hanlde TARGET_AVX512F.
13941 (floatunsdidf2): Ditto.
13943 2018-05-23 Uros Bizjak <ubizjak@gmail.com>
13945 * config/i386/i386.md (fixuns_trunc<mode>di2): New insn pattern.
13946 (fixuns_trunc<mode>si2_avx512f): Ditto.
13947 (*fixuns_trunc<mode>si2_avx512f_zext): Ditto.
13948 (fixuns_trunc<mode>si2): Also enable for AVX512F and TARGET_SSE_MATH.
13949 Emit fixuns_trunc<mode>si2_avx512f for AVX512F targets.
13951 2018-05-23 Alexander Monakov <amonakov@ispras.ru>
13953 PR rtl-optimization/79985
13954 * df-scan.c (df_insn_refs_collect): Remove special case for
13955 global registers and asm statements.
13957 2018-05-23 Alexander Monakov <amonakov@ispras.ru>
13959 * extend.texi (Global Register Variables): Rewrite the bullet list.
13960 Note that the register is available for allocation. Note that access
13961 via inline asm must use constraints. Add note about async-signal
13962 handlers. Remove paragraph about automagic register selection.
13964 2018-05-23 Richard Biener <rguenther@suse.de>
13966 * tree-ssa-sccvn.c (vn_reference_lookup_3): Remove restriction
13967 of fixed offset from memset VN.
13969 2018-05-23 Bill Schmidt <wschmidt@linux.ibm.com>
13971 * gimple-ssa-strength-reduction.c (struct slsr_cand_d): Add
13972 first_interp field.
13973 (alloc_cand_and_find_basis): Initialize first_interp field.
13974 (slsr_process_mul): Modify first_interp field.
13975 (slsr_process_add): Likewise.
13976 (slsr_process_cast): Modify first_interp field for each new
13978 (slsr_process_copy): Likewise.
13979 (dump_candidate): Dump first_interp field.
13980 (replace_mult_candidate): Process all interpretations, not just
13982 (replace_rhs_if_not_dup): Likewise.
13983 (replace_one_candidate): Likewise.
13985 2018-05-23 Wilco Dijkstra <wdijkstr@arm.com>
13987 * config/aarch64/aarch64.c (aarch64_use_frame_pointer):
13989 (aarch64_needs_frame_chain): New function.
13990 (aarch64_parse_override_string): Set aarch64_use_frame_pointer.
13992 2018-05-23 Sudakshina Das <sudi.das@arm.com>
13995 * common/config/aarch64/aarch64-common.c (aarch64_handle_option):
13996 Check val before adding MASK_STRICT_ALIGN to opts->x_target_flags.
13997 * config/aarch64/aarch64.opt (mstrict-align): Remove RejectNegative.
13998 * config/aarch64/aarch64.c (aarch64_attributes): Mark allow_neg
13999 as true for strict-align.
14000 (aarch64_can_inline_p): Perform checks even when callee has no
14001 attributes to check for strict alignment.
14002 * doc/extend.texi (AArch64 Function Attributes): Document
14004 * doc/invoke.texi: (AArch64 Options): Likewise.
14006 2018-05-23 Richard Sandiford <richard.sandiford@linaro.org>
14008 PR tree-optimization/85853
14009 * tree-vect-slp.c (vect_slp_analyze_node_operations): Split out
14010 the handling of the root of the node to...
14011 (vect_slp_analyze_node_operations_1): ...this new function,
14012 and run the whole thing with the child nodes' def types
14013 set according to their SLP node's def type.
14015 2018-05-23 Richard Biener <rguenther@suse.de>
14017 PR middle-end/85874
14018 * tree-data-ref.c (create_runtime_alias_checks): Defer
14019 and ignore overflow warnings.
14021 2018-05-23 Yury Gribov <tetra2005@gmail.com>
14023 PR tree-optimization/85822
14024 * tree-vrp.c (is_masked_range_test): Fix handling of negative
14027 2018-05-23 Richard Biener <rguenther@suse.de>
14029 * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
14030 memset constants via native_interpret_expr.
14032 2018-05-22 H.J. Lu <hongjiu.lu@intel.com>
14035 * cgraph.h (cgraph_node::create): Set ifunc_resolver for ifunc
14037 (cgraph_node::create_alias): Likewise.
14038 (cgraph_node::get_availability): Check ifunc_resolver instead
14039 of looking up ifunc attribute.
14040 * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
14041 * varasm.c (do_assemble_alias): Likewise.
14042 (assemble_alias): Likewise.
14043 (default_binds_local_p_3): Likewise.
14044 * cgraph.h (cgraph_node): Add ifunc_resolver.
14045 (cgraph_node::only_called_directly_or_aliased_p): Return false
14046 for IFUNC resolver.
14047 * lto-cgraph.c (input_node): Set ifunc_resolver for ifunc
14049 * symtab.c (symtab_node::verify_base): Verify that ifunc_resolver
14050 is equivalent to lookup_attribute ("ifunc", DECL_ATTRIBUTES (decl)).
14051 (symtab_node::binds_to_current_def_p): Check ifunc_resolver
14052 instead of looking up ifunc attribute.
14054 2018-05-22 Luis Machado <luis.machado@linaro.org>
14056 * config/aarch64/aarch64.md (*ashift<mode>_extv_bfiz): New pattern.
14058 2018-05-22 Martin Sebor <msebor@redhat.com>
14060 PR middle-end/85359
14061 * builtins.c (expand_builtin_strcpy): Call maybe_warn_nonstring_arg
14062 only when expasion succeeds.
14063 (expand_builtin_strcmp): Same.
14064 (expand_builtin_strncmp): Same.
14066 2018-05-22 Martin Sebor <msebor@redhat.com>
14068 * calls.c (maybe_warn_nonstring_arg): Fix a typo in a comment.
14070 2018-05-22 Jackson Woodruff <jackson.woodruff@arm.com>
14071 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
14073 * config/aarch64/aarch64-ldpstp.md: Replace uses of
14074 aarch64_mem_pair_operand with memory_operand and delete operand swapping
14076 * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
14077 Add check for legitimate_address.
14078 (aarch64_gen_adjusted_ldpstp): Swap operands where appropriate.
14079 (aarch64_swap_ldrstr_operands): New.
14080 * config/aarch64/aarch64-protos.h (aarch64_swap_ldrstr_operands):
14083 2018-05-22 Jackson Woodruff <jackson.woodruff@arm.com>
14084 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
14086 * config/aarch64/aarch64.md: New patterns to generate stp
14088 (store_pair_sw, store_pair_dw): New patterns to generate stp for
14089 single words and double words.
14090 (load_pair_sw, load_pair_dw): Likewise.
14091 (store_pair_sf, store_pair_df, store_pair_si, store_pair_di):
14093 (load_pair_sf, load_pair_df, load_pair_si, load_pair_di):
14095 * config/aarch64/aarch64-ldpstp.md: Modify peephole
14096 for different mode ldpstp and add peephole for merged zero stores.
14097 Likewise for loads.
14098 * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
14100 (aarch64_gen_store_pair): Rename calls to match new patterns.
14101 (aarch64_gen_load_pair): Rename calls to match new patterns.
14102 * config/aarch64/aarch64-simd.md (load_pair<mode>): Rename to...
14103 (load_pair<DREG:mode><DREG2:mode>): ... This.
14104 (store_pair<mode>): Rename to...
14105 (vec_store_pair<DREG:mode><DREG2:mode>): ... This.
14106 * config/aarch64/iterators.md (DREG, DREG2, DX2, SX, SX2, DSX):
14107 New mode iterators.
14108 (V_INT_EQUIV): Handle SImode.
14109 * config/aarch64/predicates.md (aarch64_reg_zero_or_fp_zero):
14112 2018-05-22 Martin Sebor <msebor@redhat.com>
14115 * calls.c (maybe_warn_nonstring_arg): Use string length to set
14116 or ajust the presumed bound on an operation to avoid unnecessary
14119 2018-05-22 Martin Sebor <msebor@redhat.com>
14121 PR tree-optimization/85826
14122 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Avoid
14123 assuming that a DECL necesarily has a constant size.
14125 2018-05-22 Richard Sandiford <richard.sandiford@linaro.org>
14127 PR middle-end/85862
14128 * internal-fn.c (expand_direct_optab_fn): Cope with a null lhs.
14130 2018-05-22 Richard Biener <rguenther@suse.de>
14132 PR tree-optimization/85834
14133 * tree-ssa-sccvn.c (vn_reference_lookup_3): Properly handle
14134 non-constant and non-zero memset arguments.
14136 2018-05-22 Martin Liska <mliska@suse.cz>
14139 * ipa-icf.c (sem_item::add_type): Do not ICE for incomplete types.
14141 2018-05-22 Richard Biener <rguenther@suse.de>
14143 PR tree-optimization/85863
14144 * tree-vect-stmts.c (vect_is_simple_cond): Only widen invariant
14145 comparisons when vectype is specified.
14146 (vectorizable_condition): Do not specify vectype for
14147 vect_is_simple_cond when SLP vectorizing.
14149 2018-05-21 Michael Meissner <meissner@linux.ibm.com>
14152 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Do not
14153 define __ibm128 as long double.
14154 * config/rs6000/rs6000.c (rs6000_init_builtins): Create __ibm128
14155 as a distinct type when IEEE 128-bit support is enabled.
14156 (init_float128_ieee): Fix up conversions between IFmode and IEEE
14157 128-bit types to use the correct functions.
14158 (rs6000_expand_float128_convert): Use explicit FLOAT_EXTEND to
14159 convert between 128-bit floating point types that have different
14160 modes but the same representation, instead of using gen_lowpart to
14162 * config/rs6000/rs6000.md (IFKF): New iterator for IFmode and
14164 (IFKF_reg): New attributes to give the register constraints for
14166 (extend<mode>tf2_internal): New insns to mark an explicit
14167 conversion between 128-bit floating point types that have a
14168 different mode but share the same representation.
14170 2018-05-21 Richard Sandiford <richard.sandiford@linaro.org>
14172 PR tree-optimization/85814
14173 * tree-ssa-strlen.c (get_stridx_plus_constant): Cope with
14174 a null return from get_strinfo when unsharing the next
14175 strinfo in the chain.
14177 2018-05-21 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
14180 * varasm.c (weak_finish): Clean up weak_decls.
14182 2018-05-21 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
14184 * config/aarch64/aarch64.md ("unspec"): Define UNSPEC_SABAL,
14185 UNSPEC_SABDL2, UNSPEC_SADALP, UNSPEC_UABAL, UNSPEC_UABDL2,
14186 UNSPEC_UADALP values.
14187 * config/aarch64/iterators.md (ABAL): New int iterator.
14190 (sur): Add mappings for the above.
14191 * config/aarch64/aarch64-simd.md (aarch64_<sur>abdl2<mode>_3):
14193 (aarch64_<sur>abal<mode>_4): Likewise.
14194 (aarch64_<sur>adalp<mode>_3): Likewise.
14195 (<sur>sadv16qi): New define_expand.
14197 2018-05-21 Alexander Nesterovskiy <alexander.nesterovskiy@intel.com>
14199 * config/i386/i386.md (*movsf_internal): AVX falsedep fix.
14200 (*movdf_internal): Ditto.
14201 (*rcpsf2_sse): Ditto.
14202 (*rsqrtsf2_sse): Ditto.
14203 (*sqrt<mode>2_sse): Ditto.
14205 2018-05-21 Tamar Christina <tamar.christina@arm.com>
14207 * config/aarch64/aarch64-simd.md (aarch64_eor3qv8hi): Change to
14209 (aarch64_bcaxqv8hi): Change to bcaxq<mode>4.
14210 * config/aarch64/aarch64-simd-builtins.def (veor3q_u8, veor3q_u32,
14211 veor3q_u64, veor3q_s8, veor3q_s16, veor3q_s32, veor3q_s64, vbcaxq_u8,
14212 vbcaxq_u32, vbcaxq_u64, vbcaxq_s8, vbcaxq_s16, vbcaxq_s32,
14214 * config/aarch64/arm_neon.h: Likewise.
14215 * config/aarch64/iterators.md (VQ_I): New.
14217 2018-05-21 Alexey Brodkin <abrodkin@synopsys.com>
14219 * config.gcc: Add arc/t-multilib-linux to tmake_file for
14221 * config/arc/t-multilib-linux: Specify MULTILIB_OPTIONS and
14224 2018-05-20 Chung-Ju Wu <jasonwucj@gmail.com>
14226 * config/nds32/constraints.md (S): New constraint.
14227 * config/nds32/nds32.md (call_internal): Use constraint S.
14228 (call_value_internal): Likewise.
14229 (sibcall_internal): Likewise.
14230 (sibcall_value_internal): Likewise.
14232 2018-05-20 Kito Cheng <kito.cheng@gmail.com>
14233 Chung-Ju Wu <jasonwucj@gmail.com>
14235 * config/nds32/nds32.c (nds32_register_move_cost): Take garywolf cpu
14236 into consideration.
14238 2018-05-20 Kito Cheng <kito.cheng@gmail.com>
14239 Chung-Ju Wu <jasonwucj@gmail.com>
14241 * config/nds32/nds32-cost.c (rtx_cost_model_t): New structure.
14242 (insn_size_16bit, insn_size_32bit): New variables for cost evaluation.
14243 (nds32_rtx_costs_impl): Simplify.
14244 (nds32_address_cost_impl): Simplify.
14245 (nds32_init_rtx_costs): New function.
14246 (nds32_rtx_costs_speed_prefer): Likewise.
14247 (nds32_rtx_costs_size_prefer): Likewise.
14248 (nds32_address_cost_speed_prefer): Likewise.
14249 (nds32_address_cost_speed_fwprop): Likewise.
14250 (nds32_address_cost_size_prefer): Likewise.
14251 * config/nds32/nds32-protos.h (nds32_init_rtx_costs): Declare.
14252 * config/nds32/nds32.c (nds32_option_override): Use
14253 nds32_init_rtx_costs function.
14255 2018-05-20 Chung-Ju Wu <jasonwucj@gmail.com>
14257 * config/nds32/nds32.c (nds32_asm_file_start): Output pipeline model.
14258 * config/nds32/nds32.h (TARGET_PIPELINE_N7): Define.
14259 (TARGET_PIPELINE_N8): Likewise.
14260 (TARGET_PIPELINE_N10): Likewise.
14261 (TARGET_PIPELINE_N13): Likewise.
14262 (TARGET_PIPELINE_GRAYWOLF): Likewise.
14264 2018-05-19 Monk Chiang <sh.chiang04@gmail.com>
14266 * config/nds32/nds32-fpu.md: Update copyright year.
14268 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
14270 * config/nds32/nds32.h (ASM_SPEC): Adjust spec rule.
14272 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
14274 * config/nds32/nds32.c
14275 (nds32_md_asm_adjust): Consider flag_inline_asm_r15 variable.
14276 * config/nds32/nds32.opt (minline-asm-r15): New option.
14278 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
14280 * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS): Add
14282 * config/nds32/nds32.md (abssi2): New pattern.
14284 2018-05-19 Uros Bizjak <ubizjak@gmail.com>
14286 * config/i386/i386.md (rex64namesuffix): New mode attribute.
14287 * config/i386/sse.md (sse_cvtsi2ss<rex64namesuffix><round_name>):
14288 Merge insn pattern from sse_cvtsi2ss<round_name> and
14289 sse_cvtsi2ssq<round_name> using SWI48 mode iterator.
14290 (sse_cvtss2si<rex64namesuffix><round_name>): Merge insn pattern
14291 from sse_cvtss2si<round_name> and sse_cvtss2siq<round_name>
14292 using SWI48 mode iterator.
14293 (sse_cvtss2si<rex64namesuffix>_2): Merge insn pattern from
14294 sse_cvtss2si_2 and sse_cvtss2siq_2 using SWI48 mode iterator.
14295 (sse_cvttss2si<rex64namesuffix><round_saeonly_name>): Merge insn
14296 pattern from sse_cvttss2si<round_saeonly_name>
14297 and sse_cvttss2siq<round_saeonly_name> using SWI48 mode iterator.
14298 (avx512f_vcvtss2usi<rex64namesuffix><round_name>): Merge insn pattern
14299 from avx512f_vcvtss2usi<round_name> and avx512f_vcvtss2usiq<round_name>
14300 using SWI48 mode iterator.
14301 (avx512f_vcvttss2usi<rex64namesuffix><round_saeonly_name>): Merge
14302 insn pattern from avx512f_vcvttss2usi<round_saeonly_name> and
14303 avx512f_vcvttss2usiq<round_saeonly_name> using SWI48 mode iterator.
14304 (avx512f_vcvtsd2usi<rex64namesuffix><round_name>): Merge insn pattern
14305 from avx512f_vcvtsd2usi<round_name> and avx512f_vcvtsd2usiq<round_name>
14306 using SWI48 mode iterator.
14307 (avx512f_vcvttsd2usi<rex64namesuffix><round_saeonly_name>): Merge
14308 insn pattern from avx512f_vcvttsd2usi<round_saeonly_name> and
14309 avx512f_vcvttsd2usiq<round_saeonly_name> using SWI48 mode iterator.
14310 (sse2_cvtsd2si<rex64namesuffix><round_name>): Merge insn pattern from
14311 sse2_cvtsd2si<round_name> and sse2_cvtsd2siq<round_name> using
14312 SWI48 mode iterator.
14313 (sse2_cvtsd2si<rex64namesuffix>_2): Merge insn pattern from
14314 sse2_cvtsd2si_2 and sse2_cvtsd2siq_2 using SWI48 mode iterator.
14315 (sse_cvttsd2si<rex64namesuffix><round_saeonly_name>): Merge insn
14316 pattern from sse_cvttsd2si<round_saeonly_name>
14317 and sse_cvttsd2siq<round_saeonly_name> using SWI48 mode iterator.
14319 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
14321 * config/nds32/nds32-md-auxiliary.c
14322 (nds32_valid_smw_lwm_base_p): Refine.
14323 (nds32_output_smw_single_word): Refine.
14324 (nds32_output_smw_double_word): New.
14325 * config/nds32/nds32-protos.h (nds32_output_smw_double_word): New.
14327 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
14329 * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push): Refine.
14330 (nds32_output_stack_pop): Refine.
14331 (nds32_expand_unaligned_load): Refine.
14332 (nds32_expand_unaligned_store): Refine.
14334 2018-05-19 Kuan-Lin Chen <kuanlinchentw@gmail.com>
14335 Chung-Ju Wu <jasonwucj@gmail.com>
14337 * config/nds32/constants.md: Add TP_REGNUM constant.
14338 (unspec_element): Add UNSPEC_GOTINIT, UNSPEC_GOT, UNSPEC_GOTOFF,
14339 UNSPEC_PLT, UNSPEC_TLSGD, UNSPEC_TLSLD, UNSPEC_TLSIE, UNSPEC_TLSLE and
14341 * config/nds32/nds32-doubleword.md: Consider flag_pic.
14342 * config/nds32/nds32-dspext.md (mov<mode>): Expand TLS and PIC cases.
14343 * config/nds32/nds32-predicates.c (nds32_const_unspec_p): New.
14344 * config/nds32/nds32-md-auxiliary.c: Implementation that support TLS
14345 and PIC code generation.
14346 * config/nds32/nds32-protos.h: Declarations that support TLS and PIC
14348 * config/nds32/nds32-relax-opt.c: Consider TLS and PIC for relax
14350 * config/nds32/nds32.md: Support TLS and PIC.
14351 * config/nds32/nds32.c: Support TLS and PIC.
14352 * config/nds32/nds32.h (nds32_relax_insn_type): New enum type.
14353 * config/nds32/predicates.md (nds32_nonunspec_symbolic_operand): New
14356 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
14358 * config/nds32/nds32-predicates.c (const_vector_to_hwint): Use machine
14359 mode with E_ prefix.
14361 2018-05-19 Kuan-Lin Chen <kuanlinchentw@gmail.com>
14362 Chung-Ju Wu <jasonwucj@gmail.com>
14364 * config/nds32/constants.md (unspec_element): Add UNSPEC_ICT.
14365 * config/nds32/nds32-md-auxiliary.c
14366 (symbolic_reference_mentioned_p): New.
14367 (nds32_legitimize_ict_address): New.
14368 (nds32_expand_ict_move): New.
14369 (nds32_indirect_call_referenced_p): New.
14370 (nds32_symbol_binds_local_p): Delete.
14371 (nds32_long_call_p): Modify.
14372 * config/nds32/nds32-opts.h (nds32_ict_model_type): New enum type.
14373 * config/nds32/nds32-protos.h
14374 (symbolic_reference_mentioned_p): Declare.
14375 (nds32_legitimize_ict_address): Declare.
14376 (nds32_expand_ict_move): Declare.
14377 (nds32_indirect_call_referenced_p): Declare.
14378 * config/nds32/nds32-relax-opt.c (nds32_ict_const_p): New.
14379 (nds32_relax_group): Use nds32_ict_const_p as condition.
14380 * config/nds32/nds32.c (nds32_attribute_table): Add "indirect_call".
14381 (nds32_asm_file_start): Output ict_model directive in asm code.
14382 (nds32_legitimate_address_p): Consider indirect call.
14383 (nds32_print_operand): Consider indirect call.
14384 (nds32_print_operand_address): Consider indirect call.
14385 (nds32_insert_attributes): Handle "indirect_call" attribute.
14386 (TARGET_LEGITIMATE_ADDRESS_P): Define.
14387 (TARGET_LEGITIMATE_CONSTANT_P): Define.
14388 (TARGET_CANNOT_FORCE_CONST_MEM): Define.
14389 (TARGET_DELEGITIMIZE_ADDRESS): Define.
14390 (TARGET_ASM_OUTPUT_ADDR_CONST_EXTRA): Define.
14391 * config/nds32/nds32.h (SYMBOLIC_CONST_P): Define.
14392 (TARGET_ICT_MODEL_SMALL): Define.
14393 (TARGET_ICT_MODEL_LARGE): Define.
14394 * config/nds32/nds32.md (movsi): Consider ict model.
14395 (call, call_value): Consider ict model.
14396 (sibcall, sibcall_value): Consider ict model.
14397 * config/nds32/nds32.opt (mict-model): New option.
14398 * config/nds32/predicates.md (nds32_symbolic_operand): Consider ict
14401 2018-05-18 Kito Cheng <kito.cheng@gmail.com>
14402 Monk Chiang <sh.chiang04@gmail.com>
14403 Jim Wilson <jimw@sifive.com>
14405 * common/config/riscv/riscv-common.c (riscv_parse_arch_string):
14406 Add support to parse rv32e*. Clear MASK_RVE for rv32i and rv64i.
14407 * config.gcc (riscv*-*-*): Add support for rv32e* and ilp32e.
14408 * config/riscv/riscv-c.c (riscv_cpu_cpp_builtins): Define
14409 __riscv_32e when TARGET_RVE. Handle ABI_ILP32E as soft-float ABI.
14410 * config/riscv/riscv-opts.h (riscv_abi_type): Add ABI_ILP32E.
14411 * config/riscv/riscv.c (riscv_compute_frame_info): When TARGET_RVE,
14412 compute save_libcall_adjustment properly.
14413 (riscv_option_override): Call error if TARGET_RVE and not ABI_ILP32E.
14414 (riscv_conditional_register_usage): Handle TARGET_RVE and ABI_ILP32E.
14415 * config/riscv/riscv.h (UNITS_PER_FP_ARG): Handle ABI_ILP32E.
14416 (STACK_BOUNDARY, ABI_STACK_BOUNDARY): Handle TARGET_RVE.
14417 (GP_REG_LAST, MAX_ARGS_IN_REGISTERS): Likewise.
14418 (ABI_SPEC): Handle mabi=ilp32e.
14419 * config/riscv/riscv.opt (abi_type): Add ABI_ILP32E.
14420 (RVE): Add RVE mask.
14421 * doc/invoke.texi (RISC-V options) <-mabi>: Add ilp32e info.
14422 <-march>: Add rv32e as an example.
14424 2018-05-18 Marc Glisse <marc.glisse@inria.fr>
14427 * tree-ssa-structalias.c (create_variable_info_for_1): Extra argument.
14428 (intra_create_variable_infos): Handle C++ constructors.
14430 2018-05-18 Martin Liska <mliska@suse.cz>
14432 * passes.def: Remove a redundant pass.
14434 2018-05-18 Eric Botcazou <ebotcazou@adacore.com>
14437 * config/sparc/sparc.c (sparc_expand_builtin): Always initialize op[0].
14439 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
14441 * config/arm/arm-cpus.in (armv3m, mode32): Delete features.
14443 (ARMv2, ARMv3, ARMv3m): Delete fgroups.
14445 (armv2, armv2a, armv3, armv3m): Delete architectures.
14446 (arm2, arm250, arm3, arm6, arm60, arm600, arm610, arm620,
14447 arm7, arm7d, arm7di, arm70, arm700, arm700i, arm710, arm720,
14448 arm710c, arm7100, arm7500, arm7500fe, arm7m, arm7dm, arm7dmi):
14450 * config/arm/arm.md (maddsidi4): Remove check for arm_arch3m.
14451 (*mulsidi3adddi): Likewise.
14452 (mulsidi3): Likewise.
14453 (*mulsidi3_nov6): Likewise.
14454 (umulsidi3): Likewise.
14455 (umulsidi3_nov6): Likewise.
14456 (umaddsidi4): Likewise.
14457 (*umulsidi3adddi): Likewise.
14458 (smulsi3_highpart): Likewise.
14459 (*smulsi3_highpart_nov6): Likewise.
14460 (umulsi3_highpart): Likewise.
14461 (*umulsi3_highpart_nov6): Likewise.
14462 * config/arm/arm.h (arm_arch3m): Delete.
14463 * config/arm/arm.c (arm_arch3m): Delete.
14464 (arm_option_override_internal): Update armv3-related comment.
14465 (arm_configure_build_target): Delete use of isa_bit_mode32.
14466 (arm_option_reconfigure_globals): Delete set of arm_ach3m.
14467 (arm_rtx_costs_internal): Delete check of arm_arch3m.
14468 * config/arm/arm-fixed.md (mulsq3): Delete check for arm_arch3m.
14469 (mulsa3): Likewise.
14470 (mulusa3): Likewise.
14471 * config/arm/arm-protos.h (arm_arch3m): Delete.
14472 * config/arm/arm-tables.opt: Regenerate.
14473 * config/arm/arm-tune.md: Likewise.
14474 * config/arm/t-arm-elf (all_early_nofp): Delete mentions of
14475 deleted architectures.
14477 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
14479 * config/arm/arm-cpus.in (armv5, armv5e): Delete features.
14480 (armv5t, armv5te): New features.
14481 (ARMv5, ARMv5e): Delete fgroups.
14482 (ARMv5t, ARMv5te): Adjust for above changes.
14483 (ARMv6m): Likewise.
14484 (armv5, armv5e): Delete arches.
14485 * config/arm/arm.md (*call_reg_armv5): Use arm_arch5t instead of
14487 (*call_reg_arm): Likewise.
14488 (*call_value_reg_armv5): Likewise.
14489 (*call_value_reg_arm): Likewise.
14490 (*call_symbol): Likewise.
14491 (*call_value_symbol): Likewise.
14492 (*sibcall_insn): Likewise.
14493 (*sibcall_value_insn): Likewise.
14494 (clzsi2): Likewise.
14495 (prefetch): Likewise.
14496 (define_split and define_peephole2 dependent on arm_arch5):
14498 * config/arm/arm.h (TARGET_LDRD): Use arm_arch5te instead of
14500 (TARGET_ARM_QBIT): Likewise.
14501 (TARGET_DSP_MULTIPLY): Likewise.
14502 (enum base_architecture): Delete BASE_ARCH_5, BASE_ARCH_5E.
14503 (arm_arch5, arm_arch5e): Delete.
14504 (arm_arch5t, arm_arch5te): Declare.
14505 * config/arm/arm.c (arm_arch5, arm_arch5e): Delete.
14506 (arm_arch5t): Declare.
14507 (arm_option_reconfigure_globals): Update for the above.
14508 (arm_options_perform_arch_sanity_checks): Update comment, replace
14509 use of arm_arch5 with arm_arch5t.
14510 (use_return_insn): Likewise.
14511 (arm_emit_call_insn): Likewise.
14512 (output_return_instruction): Likewise.
14513 (arm_final_prescan_insn): Likewise.
14514 (arm_coproc_builtin_available): Likewise.
14515 * config/arm/arm-c.c (arm_cpu_builtins): Replace arm_arch5 and
14516 arm_arch5e with arm_arch5t and arm_arch5te.
14517 * config/arm/arm-protos.h (arm_arch5, arm_arch5e): Delete.
14518 (arm_arch5t, arm_arch5te): Declare.
14519 * config/arm/arm-tables.opt: Regenerate.
14520 * config/arm/t-arm-elf: Remove references to armv5, armv5e.
14521 * config/arm/t-multilib: Likewise.
14522 * config/arm/thumb1.md (*call_reg_thumb1_v5): Check arm_arch5t
14523 instead of arm_arch5.
14524 (*call_reg_thumb1): Likewise.
14525 (*call_value_reg_thumb1_v5): Likewise.
14526 (*call_value_reg_thumb1): Likewise.
14527 * config/arm/vxworks.h (TARGET_OS_CPP_BUILTINS): Remove now
14529 * doc/invoke.texi (ARM Options): Remove references to armv5, armv5e.
14531 2018-05-18 Martin Liska <mliska@suse.cz>
14533 PR gcov-profile/84846
14534 * doc/gcov.texi: Document -t option of gcov tool.
14536 2018-05-18 Martin Liska <mliska@suse.cz>
14538 PR gcov-profile/84846
14539 * gcov.c (print_usage): Add new -t option.
14540 (process_args): Handle the option.
14541 (generate_results): Use stdout as output when requested by
14544 2018-05-18 Martin Liska <mliska@suse.cz>
14546 PR gcov-profile/84846
14547 * coverage.c (coverage_init): Write PWD to .gcno file.
14548 * doc/gcov.texi: Document how working directory is printed.
14549 * gcov-dump.c (dump_gcov_file): Print PWD.
14550 * gcov.c (output_intermediate_file): Likewise.
14551 (read_graph_file): Read PWD string.
14552 (output_lines): Print PWD.
14554 2018-05-18 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
14556 PR middle-end/85817
14557 * ipa-pure-const.c (malloc_candidate_p): Remove the check integer_zerop
14558 for retval and return false if all args to phi are zero.
14560 2018-05-18 Richard Biener <rguenther@suse.de>
14562 * gimple-ssa-evrp.c (class evrp_folder): Add simplify_stmt_using_ranges
14564 (evrp_dom_walker::before_dom_children): Call it.
14566 2018-05-18 Richard Biener <rguenther@suse.de>
14568 * tree-dfa.c (get_ref_base_and_extent): Use range-info to refine
14569 results when processing array refs with variable index.
14571 2018-05-18 Toon Moene <toon@moene.org>
14573 * doc/invoke.texi: Move -floop-unroll-and-jam documentation
14574 directly after that of -floop-interchange. Indicate that both
14575 options are enabled by default when specifying -O3.
14577 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
14579 * config/aarch64/aarch64-simd.md (vec_set<mode>): Use VALL_F16 mode
14580 iterator. Delete separate integer-mode vec_set<mode> expander.
14581 (aarch64_simd_vec_setv2di): Delete.
14582 (vec_setv2di): Delete.
14583 (aarch64_simd_vec_set<mode>): Delete all other patterns with that name.
14584 Use VALL_F16 mode iterator. Add LD1 alternative and use vwcore for
14585 the "w, r" alternative.
14587 2018-05-18 Martin Liska <mliska@suse.cz>
14589 * passes.def: Add pass_lower_switch and pass_lower_switch_O0.
14590 * tree-pass.h (make_pass_lower_switch_O0): New function.
14591 * tree-switch-conversion.c (node_has_low_bound): Remove.
14592 (node_has_high_bound): Likewise.
14593 (node_is_bounded): Likewise.
14594 (class pass_lower_switch): Make it a template type and create
14596 (pass_lower_switch::execute): Add template argument.
14597 (make_pass_lower_switch): New function.
14598 (make_pass_lower_switch_O0): New function.
14599 (do_jump_if_equal): Remove.
14600 (emit_case_nodes): Simplify to just handle all 3 cases and leave
14601 all the hard work to tree optimization passes.
14603 2018-05-18 Martin Liska <mliska@suse.cz>
14605 * dbgcnt.c (limit_low): Renamed from limit.
14606 (limit_high): New variable.
14607 (dbg_cnt_is_enabled): Check for upper limit.
14608 (dbg_cnt): Adjust dumping.
14609 (dbg_cnt_set_limit_by_index): Add new argument for high
14611 (dbg_cnt_set_limit_by_name): Likewise.
14612 (dbg_cnt_process_single_pair): Parse new format.
14613 (dbg_cnt_process_opt): Use strtok.
14614 (dbg_cnt_list_all_counters): Remove 'value' and add
14616 * doc/invoke.texi: Document changes.
14618 2018-05-18 Richard Sandiford <richard.sandiford@linaro.org>
14620 * doc/sourcebuild.texi (scalar_all_fma): Document.
14621 * tree.def (FMA_EXPR): Delete.
14622 * internal-fn.def (FMA, FMS, FNMA, FNMS): New internal functions.
14623 * internal-fn.c (ternary_direct): New macro.
14624 (expand_ternary_optab_fn): Likewise.
14625 (direct_ternary_optab_supported_p): Likewise.
14626 * Makefile.in (build/genmatch.o): Depend on case-fn-macros.h.
14627 * builtins.c (fold_builtin_fma): Delete.
14628 (fold_builtin_3): Don't call it.
14629 * cfgexpand.c (expand_debug_expr): Remove FMA_EXPR handling.
14630 * expr.c (expand_expr_real_2): Likewise.
14631 * fold-const.c (operand_equal_p): Likewise.
14632 (fold_ternary_loc): Likewise.
14633 * gimple-pretty-print.c (dump_ternary_rhs): Likewise.
14634 * gimple.c (DEFTREECODE): Likewise.
14635 * gimplify.c (gimplify_expr): Likewise.
14636 * optabs-tree.c (optab_for_tree_code): Likewise.
14637 * tree-cfg.c (verify_gimple_assign_ternary): Likewise.
14638 * tree-eh.c (operation_could_trap_p): Likewise.
14639 (stmt_could_throw_1_p): Likewise.
14640 * tree-inline.c (estimate_operator_cost): Likewise.
14641 * tree-pretty-print.c (dump_generic_node): Likewise.
14642 (op_code_prio): Likewise.
14643 * tree-ssa-loop-im.c (stmt_cost): Likewise.
14644 * tree-ssa-operands.c (get_expr_operands): Likewise.
14645 * tree.c (commutative_ternary_tree_code, add_expr): Likewise.
14646 * fold-const-call.h (fold_fma): Delete.
14647 * fold-const-call.c (fold_const_call_ssss): Handle CFN_FMS,
14648 CFN_FNMA and CFN_FNMS.
14649 (fold_fma): Delete.
14650 * genmatch.c (combined_fn): New enum.
14651 (commutative_ternary_tree_code): Remove FMA_EXPR handling.
14652 (commutative_op): New function.
14653 (commutate): Use it. Handle more than 2 operands.
14654 (dt_operand::gen_gimple_expr): Use commutative_op.
14655 (parser::parse_expr): Allow :c to be used with non-binary
14656 operators if the commutative operand is known.
14657 * gimple-ssa-backprop.c (backprop::process_builtin_call_use): Handle
14658 CFN_FMS, CFN_FNMA and CFN_FNMS.
14659 (backprop::process_assign_use): Remove FMA_EXPR handling.
14660 * hsa-gen.c (gen_hsa_insns_for_operation_assignment): Likewise.
14661 (gen_hsa_fma): New function.
14662 (gen_hsa_insn_for_internal_fn_call): Use it for IFN_FMA, IFN_FMS,
14663 IFN_FNMA and IFN_FNMS.
14664 * match.pd: Add folds for IFN_FMS, IFN_FNMA and IFN_FNMS.
14665 * gimple-fold.h (follow_all_ssa_edges): Declare.
14666 * gimple-fold.c (follow_all_ssa_edges): New function.
14667 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Use the
14668 gimple_build interface and use follow_all_ssa_edges to fold the result.
14669 (convert_mult_to_fma): Use direct_internal_fn_suppoerted_p
14670 instead of checking for optabs directly.
14671 * config/i386/i386.c (ix86_add_stmt_cost): Recognize FMAs as calls
14672 rather than FMA_EXPRs.
14673 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Create a
14674 call to IFN_FMA instead of an FMA_EXPR.
14676 2018-05-17 Jim Wilson <jimw@sifive.com>
14678 * expr.c (do_tablejump): When converting index to Pmode, if we have a
14679 sign extended promoted subreg, and the range does not have the sign bit
14680 set, then do a sign extend.
14682 * config/riscv/riscv.c (riscv_extend_comparands): In unsigned QImode
14683 test, check for sign extended subreg and/or constant operands, and
14684 do a sign extend in that case.
14686 2018-05-17 Steve Ellcey <sellcey@cavium.com>
14688 * config/aarch64/thunderx2t99.md (thunderx2t99_ls_both): Delete.
14689 (thunderx2t99_multiple): Delete psuedo-units from used cpus.
14691 (thunderx2t99_alu_shift): Remove alu_shift_reg, alus_shift_reg.
14692 Change logics_shift_reg to logics_shift_imm.
14693 (thunderx2t99_fp_loadpair_basic): Delete.
14694 (thunderx2t99_fp_storepair_basic): Delete.
14695 (thunderx2t99_asimd_int): Add neon_sub and neon_sub_q types.
14696 (thunderx2t99_asimd_polynomial): Delete.
14697 (thunderx2t99_asimd_fp_simple): Add neon_fp_mul_s_scalar_q
14698 and neon_fp_mul_d_scalar_q.
14699 (thunderx2t99_asimd_fp_conv): Add *int_to_fp* types.
14700 (thunderx2t99_asimd_misc): Delete neon_dup and neon_dup_q.
14701 (thunderx2t99_asimd_recip_step): Add missing *sqrt* types.
14702 (thunderx2t99_asimd_lut): Add missing tbl types.
14703 (thunderx2t99_asimd_ext): Delete.
14704 (thunderx2t99_asimd_load1_1_mult): Delete.
14705 (thunderx2t99_asimd_load1_2_mult): Delete.
14706 (thunderx2t99_asimd_load1_ldp): New.
14707 (thunderx2t99_asimd_load1): New.
14708 (thunderx2t99_asimd_load2): Add missing *load2* types.
14709 (thunderx2t99_asimd_load3): New.
14710 (thunderx2t99_asimd_load4): New.
14711 (thunderx2t99_asimd_store1_1_mult): Delete.
14712 (thunderx2t99_asimd_store1_2_mult): Delete.
14713 (thunderx2t99_asimd_store2_mult): Delete.
14714 (thunderx2t99_asimd_store2_onelane): Delete.
14715 (thunderx2t99_asimd_store_stp): New.
14716 (thunderx2t99_asimd_store1): New.
14717 (thunderx2t99_asimd_store2): New.
14718 (thunderx2t99_asimd_store3): New.
14719 (thunderx2t99_asimd_store4): New.
14721 2018-05-17 Jerome Lambourg <lambourg@adacore.com>
14723 * config/arm/arm_cmse.h (cmse_nsfptr_create, cmse_is_nsfptr): Remove
14724 #include <stdint.h>. Replace intptr_t with __INTPTR_TYPE__.
14726 2018-05-17 Pat Haugen <pthaugen@us.ibm.com>
14727 Segher Boessenkool <segher@kernel.crashing.org>
14730 * config/rs6000/rs6000.c (rs6000_output_move_128bit): Check dest
14733 2018-05-17 Richard Biener <rguenther@suse.de>
14735 * tree-ssa-dse.c (dse_classify_store): Fix iterator increment
14736 for pruning loop and prune defs feeding only already visited PHIs.
14738 2018-05-17 Richard Biener <rguenther@suse.de>
14740 * tree-ssa-sccvn.c (vn_reference_lookup_3): Improve memset handling.
14742 2018-05-17 Bin Cheng <bin.cheng@arm.com>
14743 Richard Biener <rguenther@suse.de>
14745 PR tree-optimization/85793
14746 * tree-vect-stmts.c (vectorizable_load): Handle 1 element-wise load
14747 for VMAT_ELEMENTWISE.
14749 2018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
14751 * internal-fn.h (lookup_internal_fn): Declare
14752 * internal-fn.c (lookup_internal_fn): New function.
14753 * gimple.c (gimple_build_call_from_tree): Handle calls to
14754 internal functions.
14755 * gimple-pretty-print.c (dump_gimple_call): Print "." before
14756 internal function names.
14757 * tree-pretty-print.c (dump_generic_node): Likewise.
14758 * tree-ssa-scopedtables.c (expr_hash_elt::print): Likewise.
14760 2018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
14762 * gimple-fold.h (gimple_build): Make the function forms take
14763 combined_fn rather than built_in_function.
14764 (gimple_simplify): Likewise.
14765 * gimple-match-head.c (gimple_simplify): Likewise.
14766 * gimple-fold.c (gimple_build): Likewise.
14767 * tree-vect-loop.c (get_initial_def_for_reduction): Use gimple_build
14768 rather than gimple_build_call_internal.
14769 (get_initial_defs_for_reduction): Likewise.
14770 (vect_create_epilog_for_reduction): Likewise.
14771 (vectorizable_live_operation): Likewise.
14773 2018-05-17 Martin Liska <mliska@suse.cz>
14775 * gimple-ssa-sprintf.c (format_directive): Do not use
14776 space in between 'G_' and '('.
14778 2018-05-17 Jakub Jelinek <jakub@redhat.com>
14781 * config/i386/i386.c (ix86_fold_builtin): Handle masked shifts
14782 even if the mask is not all ones.
14785 * config/i386/i386.c (ix86_fold_builtin): Fold shift builtins by
14787 (ix86_gimple_fold_builtin): Likewise.
14790 * config/i386/i386.c: Include tree-vector-builder.h.
14791 (ix86_vector_shift_count): New function.
14792 (ix86_fold_builtin): Fold shift builtins by scalar count.
14793 (ix86_gimple_fold_builtin): Likewise.
14795 * config/i386/avx512fintrin.h (_mm512_set_epi16, _mm512_set_epi8,
14796 _mm512_setzero): New intrinsics.
14798 2018-05-17 James Greenhalgh <james.greenhalgh@arm.com>
14799 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
14801 * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify
14802 code generation for cases where splatting a value is not useful.
14803 * simplify-rtx.c (simplify_ternary_operation): Simplify
14804 vec_merge across a vec_duplicate and a paradoxical subreg forming
14805 a vector mode to a vec_concat.
14807 2018-05-17 Olga Makhotina <olga.makhotina@intel.com>
14809 * config.gcc: Support "goldmont-plus".
14810 * config/i386/driver-i386.c (host_detect_local_cpu): Detect
14812 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
14813 PROCESSOR_GOLDMONT_PLUS.
14814 * config/i386/i386.c (m_GOLDMONT_PLUS): Define.
14815 (processor_target_table): Add "goldmont-plus".
14816 (PTA_GOLDMONT_PLUS): Define.
14817 (ix86_lea_outperforms): Add TARGET_GOLDMONT_PLUS.
14818 (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT_PLUS.
14819 (fold_builtin_cpu): Add M_INTEL_GOLDMONT_PLUS.
14820 (fold_builtin_cpu): Add "goldmont-plus".
14821 (ix86_add_stmt_cost): Add TARGET_GOLDMONT_PLUS.
14822 (ix86_option_override_internal): Add "goldmont-plus".
14823 * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT_PLUS.
14824 (processor_type): Add PROCESSOR_GOLDMONT_PLUS.
14825 * config/i386/x86-tune.def: Add m_GOLDMONT_PLUS.
14826 * doc/invoke.texi: Add goldmont-plus as x86 -march=/-mtune= CPU type.
14828 2018-05-17 Richard Biener <rguenther@suse.de>
14830 PR tree-optimization/85757
14831 * tree-ssa-dse.c (dse_classify_store): Record a PHI def and
14832 remove defs that only feed that PHI from further processing.
14834 2018-05-16 Jim Wilson <jimw@sifive.com>
14836 * config/riscv/riscv.md (<optab>si3_mask, <optab>si3_mask_1): Prepend
14838 (<optab>di3_mask, <optab>di3_mask_1): Likewise.
14840 2018-05-16 Mark Wielaard <mark@klomp.org>
14842 * dwarf2out.c (count_index_strings): New function.
14843 (output_indirect_strings): Call count_index_strings and generate
14844 header for dwarf_version >= 5.
14846 2018-05-16 Mark Wielaard <mark@klomp.org>
14848 * dwarf2out.c (dwarf_FORM): New function.
14849 (set_indirect_string): Use dwarf_FORM.
14850 (reset_indirect_string): Likewise.
14851 (size_of_die): Likewise.
14852 (value_format): Likewise.
14853 (output_die): Likewise.
14854 (add_skeleton_AT_string): Likewise.
14855 (output_macinfo_op): Likewise.
14856 (index_string): Likewise.
14857 (output_index_string_offset): Likewise.
14858 (output_index_string): Likewise.
14859 (count_index_strings): Likewise.
14861 2018-05-16 Carl Love <cel@us.ibm.com>
14863 * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
14864 dcbt and dcbtstt with TH=16 if operands[2] is 0 and Power 8 or newer.
14866 2018-05-16 Martin Jambor <mjambor@suse.cz>
14868 * ipa-prop.c (ipa_free_all_edge_args): Remove.
14869 * ipa-prop.h (ipa_free_all_edge_args): Likewise.
14871 2018-05-16 Wilco Dijkstra <wdijkstr@arm.com>
14873 * config/aarch64/aarch64.md (fma<mode>4): Change into expand pattern.
14874 (fnma<mode>4): Likewise.
14875 (fms<mode>4): Likewise.
14876 (fnms<mode>4): Likewise.
14877 (aarch64_fma<mode>4): Rename insn, reorder accumulator operand.
14878 (aarch64_fnma<mode>4): Likewise.
14879 (aarch64_fms<mode>4): Likewise.
14880 (aarch64_fnms<mode>4): Likewise.
14881 (aarch64_fnmadd<mode>4): Likewise.
14883 2018-05-16 Jason Merrill <jason@redhat.com>
14885 * tree.c (warn_deprecated_use): Return bool. Simplify logic.
14887 2018-05-16 Richard Biener <rguenther@suse.de>
14889 * tree-vectorizer.h (struct stmt_info_for_cost): Add where member.
14890 (dump_stmt_cost): Declare.
14891 (add_stmt_cost): Dump cost we add.
14892 (add_stmt_costs): New function.
14893 (vect_model_simple_cost, vect_model_store_cost, vect_model_load_cost):
14894 No longer exported.
14895 (vect_analyze_stmt): Adjust prototype.
14896 (vectorizable_condition): Likewise.
14897 (vectorizable_live_operation): Likewise.
14898 (vectorizable_reduction): Likewise.
14899 (vectorizable_induction): Likewise.
14900 * tree-vect-loop.c (vect_analyze_loop_operations): Create local
14901 cost vector to pass to vectorizable_ and record afterwards.
14902 (vect_model_reduction_cost): Take cost vector argument and adjust.
14903 (vect_model_induction_cost): Likewise.
14904 (vectorizable_reduction): Likewise.
14905 (vectorizable_induction): Likewise.
14906 (vectorizable_live_operation): Likewise.
14907 * tree-vect-slp.c (vect_create_new_slp_node): Initialize
14908 SLP_TREE_NUMBER_OF_VEC_STMTS.
14909 (vect_analyze_slp_cost_1): Remove.
14910 (vect_analyze_slp_cost): Likewise.
14911 (vect_slp_analyze_node_operations): Take visited args and
14912 a target cost vector. Avoid processing already visited stmt sets.
14913 (vect_slp_analyze_operations): Use a local cost vector to gather
14914 costs and register those of non-discarded instances.
14915 (vect_bb_vectorization_profitable_p): Use add_stmt_costs.
14916 (vect_schedule_slp_instance): Remove copying of
14917 SLP_TREE_NUMBER_OF_VEC_STMTS. Instead assert that it is not
14919 * tree-vect-stmts.c (record_stmt_cost): Remove path directly
14920 adding cost. Record cost entry location.
14921 (vect_prologue_cost_for_slp_op): Function to compute cost of
14922 a constant or invariant generated for SLP vect in the prologue,
14923 split out from vect_analyze_slp_cost_1.
14924 (vect_model_simple_cost): Make static. Adjust for SLP costing.
14925 (vect_model_promotion_demotion_cost): Likewise.
14926 (vect_model_store_cost): Likewise, make static.
14927 (vect_model_load_cost): Likewise.
14928 (vectorizable_bswap): Add cost vector arg and adjust.
14929 (vectorizable_call): Likewise.
14930 (vectorizable_simd_clone_call): Likewise.
14931 (vectorizable_conversion): Likewise.
14932 (vectorizable_assignment): Likewise.
14933 (vectorizable_shift): Likewise.
14934 (vectorizable_operation): Likewise.
14935 (vectorizable_store): Likewise.
14936 (vectorizable_load): Likewise.
14937 (vectorizable_condition): Likewise.
14938 (vectorizable_comparison): Likewise.
14939 (can_vectorize_live_stmts): Likewise.
14940 (vect_analyze_stmt): Likewise.
14941 (vect_transform_stmt): Adjust calls to vectorizable_*.
14942 * tree-vectorizer.c: Include gimple-pretty-print.h.
14943 (dump_stmt_cost): New function.
14945 2018-05-16 Richard Biener <rguenther@suse.de>
14947 * params.def (PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE): New param.
14948 * doc/invoke.texi (dse-max-alias-queries-per-store): Document.
14949 * tree-ssa-dse.c: Include tree-ssa-loop.h.
14950 (check_name): New callback.
14951 (dse_classify_store): Track cycles via a visited bitmap of PHI
14952 defs and simplify handling of in-loop and across loop dead stores
14953 and properly fail for loop-variant refs. Handle byte-tracking with
14954 multiple defs. Use PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE for
14957 2018-05-16 Richard Sandiford <richard.sandiford@linaro.org>
14959 * tree-vectorizer.h (vect_get_vector_types_for_stmt): Declare.
14960 (vect_get_mask_type_for_stmt): Likewise.
14961 * tree-vect-slp.c (vect_two_operations_perm_ok_p): New function,
14963 (vect_build_slp_tree_1): ...here. Use vect_get_vector_types_for_stmt
14964 to determine the statement's vector type and the vector type that
14965 should be used for calculating nunits. Deal with cases in which
14966 the type has to be deferred.
14967 (vect_slp_analyze_node_operations): Use vect_get_vector_types_for_stmt
14968 and vect_get_mask_type_for_stmt to calculate STMT_VINFO_VECTYPE.
14969 * tree-vect-loop.c (vect_determine_vf_for_stmt_1)
14970 (vect_determine_vf_for_stmt): New functions, split out from...
14971 (vect_determine_vectorization_factor): ...here.
14972 * tree-vect-stmts.c (vect_get_vector_types_for_stmt)
14973 (vect_get_mask_type_for_stmt): New functions, split out from
14974 vect_determine_vectorization_factor.
14976 2018-05-16 Richard Biener <rguenther@suse.de>
14978 * tree-cfg.c (verify_gimple_assign_ternary): Properly
14979 verify the [VEC_]COND_EXPR embedded comparison.
14981 2018-05-15 Martin Sebor <msebor@redhat.com>
14983 PR tree-optimization/85753
14984 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Handle
14985 RECORD_TYPE in addition to ARRAY_TYPE.
14987 2018-05-15 Martin Sebor <msebor@redhat.com>
14989 PR middle-end/85643
14990 * calls.c (get_attr_nonstring_decl): Handle MEM_REF.
14992 2018-05-15 Richard Biener <rguenther@suse.de>
14994 * tree-ssa-dse.c (dse_classify_store): Remove use_stmt parameter,
14995 add by_clobber_p one. Change algorithm to collect all defs
14996 representing uses we need to walk and try reducing them to
14997 a single one before failing.
14998 (dse_dom_walker::dse_optimize_stmt): Adjust.
15000 2018-05-13 Mark Wielaard <mark@klomp.org>
15002 * dwarf2out.c (dwarf_OP): Handle DW_OP_addrx and DW_OP_constx.
15003 (size_of_loc_descr): Likewise.
15004 (output_loc_operands): Likewise.
15005 (output_loc_operands_raw): Likewise.
15006 (dw_addr_op): Use dwarf_OP () for DW_OP_constx and DW_OP_addrx.
15007 (resolve_addr_in_expr): Handle DW_OP_addrx and DW_OP_constx.
15008 (hash_loc_operands): Likewise.
15009 (compare_loc_operands): Likewise.
15011 2018-05-14 Mark Wielaard <mark@klomp.org>
15013 * dwarf2out.c (count_index_addrs): New function.
15014 (dwarf2out_finish): Use count_index_addrs to calculate addrs_length.
15016 2018-05-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
15018 PR tree-optimization/83648
15019 * ipa-pure-const.c (malloc_candidate_p): Allow function with NULL
15020 return value as malloc candidate.
15022 2018-05-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
15025 * ipa-pure-const.c (warn_function_malloc): Pass value of known_finite
15026 param as true in call to suggest_attribute.
15028 2018-05-14 Segher Boessenkool <segher@kernel.crashing.org>
15030 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete @itemx for
15031 -mreadonly-in-sdata.
15033 2018-05-14 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
15035 * config/aarch64/aarch64-simd.md (*aarch64_crypto_aese_fused):
15037 (aarch64_crypto_aesd_fused): Likewise.
15039 2018-05-14 Wilco Dijkstra <wdijkstr@arm.com>
15041 * config/aarch64/aarch64.md (mov<mode>): Remove '*' in alternatives.
15042 (movsi_aarch64): Likewise.
15043 (load_pairsi): Likewise.
15044 (load_pairdi): Likewise.
15045 (store_pairsi): Likewise.
15046 (store_pairdi): Likewise.
15047 (load_pairsf): Likewise.
15048 (load_pairdf): Likewise.
15049 (store_pairsf): Likewise.
15050 (store_pairdf): Likewise.
15051 (zero_extend): Likewise.
15052 (trunc): Swap alternatives.
15053 (fcvt_target): Add '?' to prefer w over r.
15055 2018-05-14 Jakub Jelinek <jakub@redhat.com>
15058 * config/i386/i386.md: Disallow non-commutative arithmetics in
15059 last twpeephole for mem {+,-,&,|,^}= x; mem != 0 after cmpelim
15060 optimization. Use COMMUTATIVE_ARITH_P test rather than != MINUS
15061 in the peephole2 before it.
15063 2018-05-14 Sebastian Peryt <sebastian.peryt@intel.com>
15065 * common/config/i386/i386-common.c (OPTION_MASK_ISA_CLDEMOTE_SET,
15066 OPTION_MASK_ISA_CLDEMOTE_UNSET): New defines.
15067 (ix86_handle_option): Handle -mcldemote.
15068 * config.gcc: New header.
15069 * config/i386/cldemoteintrin.h: New file.
15070 * config/i386/cpuid.h (bit_CLDEMOTE): New bit.
15071 * config/i386/driver-i386.c (host_detect_local_cpu): Detect
15073 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
15074 OPTION_MASK_ISA_CLDEMOTE.
15075 * config/i386/i386.c (ix86_target_string): Add -mcldemote.
15076 (ix86_valid_target_attribute_inner_p): Ditto.
15077 (enum ix86_builtins): Add IX86_BUILTIN_CLDEMOTE.
15078 (ix86_init_mmx_sse_builtins): Define __builtin_ia32_cldemote.
15079 (ix86_expand_builtin): Expand IX86_BUILTIN_CLDEMOTE.
15080 * config/i386/i386.h (TARGET_CLDEMOTE, TARGET_CLDEMOTE_P): New.
15081 * config/i386/i386.md (UNSPECV_CLDEMOTE): New.
15083 * config/i386/i386.opt: Add -mcldemote.
15084 * config/i386/x86intrin.h: New header.
15085 * doc/invoke.texi: Add -mcldemote.
15087 2018-05-14 Richard Biener <rguenther@suse.de>
15089 * doc/match-and-simplify.texi: Adjust :s documentation.
15091 2018-05-14 Alexander Monakov <amonakov@ispras.ru>
15093 * sort.cc (REORDER_23): Pass the type for the temporaries instead of
15094 intended memcpy size.
15095 (REORDER_45): Likewise.
15097 2018-05-13 Alexander Monakov <amonakov@ispras.ru>
15099 * sort.cc: New file.
15100 * system.h [!CHECKING_P] (qsort): Redirect to gcc_qsort.
15101 * vec.c (qsort_chk): Use gcc_qsort.
15102 * Makefile.in (OBJS-libcommon): Add sort.o.
15103 (build/sort.o): New target. Use it...
15104 (BUILD_RTL): ... here, and...
15105 (build/gencfn-macros): ... here, and...
15106 (build/genmatch): ... here.
15108 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
15109 Chung-Ju Wu <jasonwucj@gmail.com>
15111 * config.gcc (nds32*-*-*): Check that n15 is valid to --with-cpu.
15112 * config/nds32/nds32-graywolf.md: New file.
15113 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_GRAYWOLF.
15114 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n15
15116 * config/nds32/nds32-protos.h: More declarations for n15 pipeline.
15117 * config/nds32/nds32-utils.c: More implementations for n15 pipeline.
15118 * config/nds32/nds32.md (pipeline_model): Add graywolf.
15119 * config/nds32/nds32.opt (mcpu): Support n15 pipeline cpus.
15120 * config/nds32/pipelines.md: Include n15 settings.
15122 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
15123 Chung-Ju Wu <jasonwucj@gmail.com>
15125 * config.gcc (nds32*-*-*): Check that n12/n13 are valid to --with-cpu.
15126 * config/nds32/nds32-n13.md: New file.
15127 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N12 and CPU_N13.
15128 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n12/n13
15130 * config/nds32/nds32-protos.h: More declarations for n12/n13 pipeline.
15131 * config/nds32/nds32.md (pipeline_model): Add n13.
15132 * config/nds32/nds32.opt (mcpu): Support n12/n13 pipeline cpus.
15133 * config/nds32/pipelines.md: Include n13 settings.
15135 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
15136 Chung-Ju Wu <jasonwucj@gmail.com>
15138 * config.gcc (nds32*-*-*): Check that n10/d10 are valid to --with-cpu.
15139 * config/nds32/nds32-n10.md: New file.
15140 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N10.
15141 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n10
15143 * config/nds32/nds32-protos.h: More declarations for n10 pipeline.
15144 * config/nds32/nds32-utils.c: More implementations for n10 pipeline.
15145 * config/nds32/nds32.md (pipeline_model): Add n10.
15146 * config/nds32/nds32.opt (mcpu): Support n10 pipeline cpus.
15147 * config/nds32/pipelines.md: Include n10 settings.
15149 2018-05-13 Monk Chiang <sh.chiang04@gmail.com>
15150 Kito Cheng <kito.cheng@gmail.com>
15151 Chung-Ju Wu <jasonwucj@gmail.com>
15153 * config.gcc (nds32be-*-*): Handle --with-ext-dsp.
15154 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
15155 Add enum values for DSP extension instructions.
15156 * config/nds32/constraints.md (Iu06, IU06, CVp5, CVs5, CVs2, CVhi):
15158 * config/nds32/iterators.md (shifts, shiftrt, sat_plus, all_plus,
15159 sat_minus, all_minus, plus_minus, extend, sumax, sumin, sumin_max):
15160 New code iterators.
15161 (su, zs, uk, opcode, add_rsub, add_sub): New code attributes.
15162 * config/nds32/nds32-dspext.md: New file for DSP implementation.
15163 * config/nds32/nds32-intrinsic.c: Implementation of DSP extension.
15164 * config/nds32/nds32-intrinsic.md: Likewise.
15165 * config/nds32/nds32_intrinsic.h: Likewise.
15166 * config/nds32/nds32-md-auxiliary.c: Likewise.
15167 * config/nds32/nds32-memory-manipulation.c: Consider DSP extension.
15168 * config/nds32/nds32-predicates.c (const_vector_to_hwint): New.
15169 (nds32_valid_CVp5_p, nds32_valid_CVs5_p): New.
15170 (nds32_valid_CVs2_p, nds32_valid_CVhi_p): New.
15171 * config/nds32/nds32-protos.h: New declarations for DSP extension.
15172 * config/nds32/nds32-utils.c (extract_mac_non_acc_rtx): New case
15173 TYPE_DMAC in switch statement.
15174 * config/nds32/nds32.c: New checking and implementation for DSP
15175 extension instructions.
15176 * config/nds32/nds32.h: Likewise.
15177 * config/nds32/nds32.md: Likewise.
15178 * config/nds32/nds32.opt (mhw-abs, mext-dsp): New options.
15179 * config/nds32/predicates.md: Implement new predicates for DSP
15182 2018-05-11 Michael Meissner <meissner@linux.vnet.ibm.com>
15184 * config/rs6000/rs6000.md (mov<mode>_softfloat, FMOVE32):
15185 Reformat alternatives and attributes so it is easier to identify
15186 which constraints/attributes go with which instruction.
15187 (mov<mode>_hardfloat32, FMOVE64): Likewise.
15188 (mov<mode>_softfloat32, FMOVE64): Likewise.
15189 (mov<mode>_hardfloat64, FMOVE64): Likewise.
15190 (mov<mode>_softfloat64, FMOVE64): Likewise.
15192 2018-05-11 Kelvin Nilsen <kelvin@gcc.gnu.org>
15194 * doc/extend.texi (PowerPC Built-in Functions): Rename this
15196 (Basic PowerPC Built-in Functions): The new name of the
15197 subsection previously known as "PowerPC Built-in Functions".
15198 (Basic PowerPC Built-in Functions Available on all Configurations):
15200 (Basic PowerPC Built-in Functions Available on ISA 2.05): Likewise.
15201 (Basic PowerPC Built-in Functions Available on ISA 2.06): Likewise.
15202 (Basic PowerPC Built-in Functions Available on ISA 2.07): Likewise.
15203 (Basic PowerPC Built-in Functions Available on ISA 3.0): Likewise.
15205 2018-05-11 Martin Jambor <mjambor@suse.cz>
15208 * ipa-cp.c (intersect_with_plats): Check that the lattice contains
15211 2018-05-11 Richard Earnshaw <rearnsha@arm.com>
15214 * config/arm/arm-cpus.in (fgroup ARMv6m): Add be8 feature.
15216 2018-05-11 Sebastian Peryt <sebastian.peryt@intel.com>
15218 * common/config/i386/i386-common.c (OPTION_MASK_ISA_WAITPKG_SET,
15219 OPTION_MASK_ISA_WAITPKG_UNSET): New defines.
15220 (ix86_handle_option): Handle -mwaitpkg.
15221 * config.gcc: New header.
15222 * config/i386/cpuid.h (bit_WAITPKG): New bit.
15223 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mwaitpkg.
15224 * config/i386/i386-builtin-types.def ((UINT8, UNSIGNED, UINT64)): New
15226 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
15227 OPTION_MASK_ISA_WAITPKG.
15228 * config/i386/i386.c (ix86_target_string): Add -mwaitpkg.
15229 (ix86_option_override_internal): Add PTA_WAITPKG.
15230 (ix86_valid_target_attribute_inner_p): Add -mwaitpkg.
15231 (enum ix86_builtins): Add IX86_BUILTIN_UMONITOR, IX86_BUILTIN_UMWAIT,
15232 IX86_BUILTIN_TPAUSE.
15233 (ix86_init_mmx_sse_builtins): Define __builtin_ia32_umonitor,
15234 __builtin_ia32_umwait and __builtin_ia32_tpause.
15235 (ix86_expand_builtin): Expand IX86_BUILTIN_UMONITOR,
15236 IX86_BUILTIN_UMWAIT, IX86_BUILTIN_TPAUSE.
15237 * config/i386/i386.h (TARGET_WAITPKG, TARGET_WAITPKG_P): New.
15238 * config/i386/i386.md (UNSPECV_UMWAIT, UNSPECV_UMONITOR,
15239 UNSPECV_TPAUSE): New.
15240 (umwait, umwait_rex64, umonitor_<mode>, tpause, tpause_rex64): New.
15241 * config/i386/i386.opt: Add -mwaitpkg.
15242 * config/i386/waitpkgintrin.h: New file.
15243 * config/i386/x86intrin.h: New header.
15244 * doc/invoke.texi: Add -mwaitpkg.
15246 2018-05-11 Richard Earnshaw <rearnsha@arm.com>
15249 * config/arm/arm-cpus.in: Add comment that ARMv6-m and ARMv6S-m are now
15251 (cortex-m0): Use armv6s-m isa.
15252 (cortex-m0plus): Likewise.
15253 (cortex-m1): Likewise.
15254 (cortex-m0.small-multiply): Likewise.
15255 (cortex-m0plus.small-multiply): Likewise.
15256 (cortex-m1.small-multiply): Likewise.
15258 2018-05-11 Allan Sandfeld Jensen <allan.jensen@qt.io>
15259 Jakub Jelinek <jakub@redhat.com>
15261 PR tree-optimization/85692
15262 * tree-ssa-forwprop.c (simplify_vector_constructor): Try two
15263 source permute as well.
15265 2018-05-11 Martin Liska <mliska@suse.cz>
15268 * doc/extend.texi: Document LLVM style format for no_sanitize
15271 2018-05-10 Michael Meissner <meissner@linux.vnet.ibm.com>
15273 * config/rs6000/rs6000.c (mode_supports_dq_form): Rename
15274 mode_supports_vsx_dform_quad to mode_supports_dq_form.
15275 (mode_supports_vsx_dform_quad): Likewise.
15276 (mode_supports_vmx_dform): Move these functions to be next to the
15277 other mode_supports functions.
15278 (mode_supports_dq_form): Likewise.
15279 (quad_address_p): Change calls of mode_supports_vsx_dform_quad to
15280 mode_supports_dq_form.
15281 (reg_offset_addressing_ok_p): Likewise.
15282 (offsettable_ok_by_alignment): Likewise.
15283 (rs6000_legitimate_offset_address_p): Likewise.
15284 (legitimate_lo_sum_address_p): Likewise.
15285 (rs6000_legitimize_address): Likewise.
15286 (rs6000_legitimize_reload_address): Likewise.
15287 (rs6000_secondary_reload_inner): Likewise.
15288 (rs6000_preferred_reload_class): Likewise.
15289 (rs6000_output_move_128bit): Likewise.
15291 2018-05-10 Uros Bizjak <ubizjak@gmail.com>
15293 * config/i386/i386.c (ix86_expand_builtin) <case IX86_BUILTIN_RDPID>:
15294 Generate SImode target register for null target.
15295 <case IX86_BUILTIN_XGETBV>: Ditto.
15296 <case IX86_BUILTIN_XSETBV>: Optimize LSHIFTRT generation.
15297 * config/i386/xsaveintrin.h (_xgetbv): Add missing return.
15299 2018-05-10 Carl Love <cel@us.ibm.com>
15301 * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
15302 dcbtt and dcbtstt if operands[2] is 0.
15304 2018-05-10 Uros Bizjak <ubizjak@gmail.com>
15307 * config/i386/sse.md (usadv64qi): New expander.
15309 2018-05-10 Segher Boessenkool <segher@kernel.crashing.org>
15311 * config/rs6000/altivec.md (altivec_vmrghb, altivec_vmrghh,
15312 altivec_vmrghw, altivec_vmrglb, altivec_vmrglh, altivec_vmrglw): Remove
15313 -maltivec=be support.
15314 (vec_widen_umult_even_v16qi, vec_widen_smult_even_v16qi,
15315 vec_widen_umult_even_v8hi, vec_widen_smult_even_v8hi,
15316 vec_widen_umult_even_v4si, vec_widen_smult_even_v4si,
15317 vec_widen_umult_odd_v16qi, vec_widen_smult_odd_v16qi,
15318 vec_widen_umult_odd_v8hi, vec_widen_smult_odd_v8hi,
15319 vec_widen_umult_odd_v4si, vec_widen_smult_odd_v4si, altivec_vpkpx,
15320 altivec_vpks<VI_char>ss, altivec_vpks<VI_char>us,
15321 altivec_vpku<VI_char>us, altivec_vpku<VI_char>um, altivec_vsum2sws,
15322 altivec_vsumsws): Adjust.
15323 (altivec_vspltb *altivec_vspltb_internal, altivec_vsplth,
15324 *altivec_vsplth_internal, altivec_vspltw, *altivec_vspltw_internal,
15325 altivec_vspltsf, *altivec_vspltsf_internal): Remove -maltivec=be
15327 (altivec_vperm_<mode>, altivec_vperm_<mode>_uns,
15328 altivec_vupkhs<VU_char>, altivec_vupkls<VU_char>, altivec_vupkhpx,
15329 altivec_vupklpx, altivec_lvsl, altivec_lvsr): Adjust.
15330 (altivec_lve<VI_char>x): Delete expand.
15331 (*altivec_lve<VI_char>x_internal): Rename to...
15332 (altivec_lve<VI_char>x): ... this.
15333 (altivec_lvxl_<mode>): Delete expand.
15334 (*altivec_lvxl_<mode>_internal): Rename to ...
15335 (altivec_lvxl_<mode>): ... this.
15336 (altivec_stvxl_<mode>): Delete expand.
15337 (*altivec_stvxl_<mode>_internal): Rename to ...
15338 (altivec_stvxl_<mode>): ... this.
15339 (altivec_stve<VI_char>x): Delete expand.
15340 (*altivec_stve<VI_char>x_internal): Rename to ...
15341 (altivec_stve<VI_char>x): ... this.
15342 (doublee<mode>2, unsdoubleev4si2, doubleo<mode>2, unsdoubleov4si2,
15343 doubleh<mode>2, unsdoublehv4si2, doublel<mode>2, unsdoublelv4si2,
15344 reduc_plus_scal_<mode>): Adjust.
15345 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Adjust
15347 (rs6000_cpu_cpp_builtins): Adjust.
15348 (altivec_resolve_overloaded_builtin): Remove -maltivec=be support.
15349 * config/rs6000/rs6000-protos.h (altivec_expand_lvx_be,
15350 altivec_expand_stvx_be, altivec_expand_stvex_be): Delete.
15351 * config/rs6000/rs6000.c (rs6000_option_override_internal): Remove
15352 -maltivec=be support.
15353 (rs6000_split_vec_extract_var): Adjust.
15354 (rs6000_split_v4si_init): Adjust.
15355 (swap_selector_for_mode): Delete.
15356 (altivec_expand_lvx_be, altivec_expand_stvx_be,
15357 altivec_expand_stvex_be): Delete.
15358 (altivec_expand_lv_builtin, altivec_expand_stv_builtin): Remove
15359 -maltivec=be support.
15360 (rs6000_gimple_fold_builtin): Ditto.
15361 (rs6000_generate_float2_double_code, rs6000_generate_float2_code):
15363 * config/rs6000/rs6000.h (VECTOR_ELT_ORDER_BIG): Delete.
15364 (TARGET_DIRECT_MOVE_64BIT): Adjust.
15365 * config/rs6000/rs6000.md (split for extendsidi2 for vectors): Adjust.
15366 * config/rs6000/rs6000.opt (maltivec=le, maltivec=be): Delete.
15367 * config/rs6000/vsx.md (floate<mode>, unsfloatev2di, floato<mode>,
15368 unsfloatov2di, vsignedo_v2df, vsignede_v2df, vunsignedo_v2df,
15369 vunsignede_v2df, vsx_extract_<mode>_p9, *vsx_extract_si,
15370 *vsx_extract_<mode>_p8, *vsx_extract_si_<uns>float_df,
15371 *vsx_extract_si_<uns>float_<mode>, vsx_set_<mode>_p9, vsx_set_v4sf_p9,
15372 *vsx_insert_extract_v4sf_p9, *vsx_insert_extract_v4sf_p9_2, and an
15373 anonymous split): Adjust.
15374 (vsx_mergel_<mode>, vsx_mergeh_<mode>): Remove -maltivec=be support.
15375 (vsx_xxspltd_<mode>, extract4b, insert4b): Adjust.
15377 2018-05-10 Eric Botcazou <ebotcazou@adacore.com>
15379 * configure.ac (gcc_gxx_include_dir_add_sysroot): Set it to 1 only
15380 when --with-gxx-include-dir is also specified.
15381 * configure: Regenerate.
15383 2018-05-09 Jim Wilson <jimw@sifive.com>
15386 * config.gcc (riscv*-*-*): Handle --with-multilib-list.
15387 * config/riscv/t-withmultilib: New.
15388 * config/riscv/withmultilib.h: New.
15389 * doc/install.texi: Document RISC-V --with-multilib-list support.
15391 2018-05-09 Richard Biener <rguenther@suse.de>
15393 * tree-vect-slp.c (vect_bb_slp_scalar_cost): Fill a cost
15395 (vect_bb_vectorization_profitable_p): Adjust. Compute
15396 actual scalar cost using the cost vector and the add_stmt_cost
15399 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
15401 PR rtl-optimization/85645
15402 * config/rs6000/rs6000.c (rs6000_emit_prologue_components): Put a SET
15403 in the REG_CFA_REGISTER note for LR, don't leave it empty.
15405 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
15407 PR rtl-optimization/85645
15408 * shrink-wrap.c (spread_components): Return a boolean saying if
15409 anything was changed.
15410 (try_shrink_wrapping_separate): Iterate spread_components until
15411 nothing changes anymore.
15413 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
15415 PR rtl-optimization/85645
15416 * regrename.c (build_def_use): Also kill the chains that include the
15417 destination of a REG_CFA_REGISTER note.
15419 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
15421 PR rtl-optimization/85645
15422 * regcprop.c (copyprop_hardreg_forward_1): Don't propagate into an
15423 insn that has a REG_CFA_REGISTER note.
15425 2018-05-09 Richard Sandiford <richard.sandiford@linaro.org>
15427 * cfgexpand.c (expand_clobber): New function.
15428 (expand_gimple_stmt_1): Use it.
15429 * tree-vect-stmts.c (vect_clobber_variable): New function,
15431 (vectorizable_simd_clone_call): ...here.
15432 (vectorizable_store): Emit a clobber either side of an
15433 IFN_STORE_LANES sequence.
15434 (vectorizable_load): Emit a clobber after an IFN_LOAD_LANES sequence.
15436 2018-05-09 Tom de Vries <tom@codesourcery.com>
15439 * config/nvptx/nvptx.md (define_insn "trap", define_insn "trap_if_true")
15440 (define_insn "trap_if_false"): Add exit after trap.
15442 2018-05-09 Eric Botcazou <ebotcazou@adacore.com>
15444 PR rtl-optimization/85638
15445 * bb-reorder.c: Include common/common-target.h.
15446 (create_forwarder_block): New function extracted from...
15447 (fix_up_crossing_landing_pad): ...here. Rename into...
15448 (dw2_fix_up_crossing_landing_pad): ...this.
15449 (sjlj_fix_up_crossing_landing_pad): New function.
15450 (find_rarely_executed_basic_blocks_and_crossing_edges): In SJLJ mode,
15451 call sjlj_fix_up_crossing_landing_pad if there are incoming EH edges
15452 from both partitions and exit the loop after one iteration.
15454 2018-05-08 Kelvin Nilsen <kelvin@gcc.gnu.org>
15457 * doc/extend.texi (PowerPC Built-in Functions): Rename this
15459 (Basic PowerPC Built-in Functions): The new name of the
15460 subsection previously known as "PowerPC Built-in Functions".
15461 (Basic PowerPC Built-in Functions Available on all Configurations):
15463 (Basic PowerPC Built-in Functions Available on ISA 2.05): New
15465 (Basic PowerPC Built-in Functions Available on ISA 2.06): New
15467 (Basic PowerPC Built-in Functions Available on ISA 2.07): New
15469 (Basic PowerPC Built-in Functions Available on ISA 3.0): New
15472 2018-05-08 Jim Wilson <jimw@sifive.com>
15474 * config/riscv/linux.h (MUSL_ABI_SUFFIX): Delete unnecessary backslash.
15475 (LD_EMUL_SUFFIX): New.
15476 (LINK_SPEC): Use it.
15478 2018-05-08 Kelvin Nilsen <kelvin@gcc.gnu.org>
15480 * doc/extend.texi (PowerPC Built-in Functions): Rename this
15482 (Basic PowerPC Built-in Functions): The new name of the
15483 subsection previously known as "PowerPC Built-in Functions".
15484 (Basic PowerPC Built-in Functions Available on all Configurations):
15486 (Basic PowerPC Built-in Functions Available on ISA 2.05): New
15488 (Basic PowerPC Built-in Functions Available on ISA 2.06): New
15490 (Basic PowerPC Built-in Functions Available on ISA 2.07): New
15492 (Basic PowerPC Built-in Functions Available on ISA 3.0): New
15495 2018-05-08 Jakub Jelinek <jakub@redhat.com>
15498 * config/i386/i386.md: Add peepholes for mem {+,-,&,|,^}= x; mem != 0
15499 after cmpelim optimization.
15501 2018-05-08 Olga Makhotina <olga.makhotina@intel.com>
15503 * config.gcc: Support "goldmont".
15504 * config/i386/driver-i386.c (host_detect_local_cpu): Detect "goldmont".
15505 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
15506 PROCESSOR_GOLDMONT.
15507 * config/i386/i386.c (m_GOLDMONT): Define.
15508 (processor_target_table): Add "goldmont".
15509 (PTA_GOLDMONT): Define.
15510 (ix86_lea_outperforms): Add TARGET_GOLDMONT.
15511 (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT.
15512 (fold_builtin_cpu): Add M_INTEL_GOLDMONT.
15513 (fold_builtin_cpu): Add "goldmont".
15514 (ix86_add_stmt_cost): Add TARGET_GOLDMONT.
15515 (ix86_option_override_internal): Add "goldmont".
15516 * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT.
15517 (processor_type): Add PROCESSOR_GOLDMONT.
15518 * config/i386/i386.md: Add CPU "glm".
15519 * config/i386/glm.md: New file.
15520 * config/i386/x86-tune.def: Add m_GOLDMONT.
15521 * doc/invoke.texi: Add goldmont as x86 -march=/-mtune= CPU type.
15523 2018-05-08 Jakub Jelinek <jakub@redhat.com>
15526 * config/i386/i386.c (ix86_expand_sse2_abs): Handle E_V2DImode and
15528 * config/i386/sse.md (abs<mode>2): Use VI_AVX2 iterator instead of
15529 VI1248_AVX512VL_AVX512BW. Handle V2DImode and V4DImode if not
15530 TARGET_AVX512VL using ix86_expand_sse2_abs. Formatting fixes.
15533 * config/i386/i386.c (ix86_fold_builtin): Handle
15534 IX86_BUILTIN_{,P}MOVMSK{PS,PD,B}{,128,256}.
15537 * config/i386/sse.md (ssequaterinsnmode): New mode attribute.
15538 (*<extract_type>_vinsert<shuffletype><extract_suf>_0): New pattern.
15540 2018-05-08 Richard Earnshaw <rearnsha@arm.com>
15543 * config/arm/parsecpu.awk (check_cpu): Fix operator precedence.
15544 (check_arch): Likewise.
15545 (check_fpu): Return the result rather than printing it.
15546 (end arch): Fix operator precedence.
15547 (end cpu): Likewise.
15548 (END): Print the result from check_fpu.
15550 2018-05-08 Richard Sandiford <richard.sandiford@linaro.org>
15551 Alan Hayward <alan.hayward@arm.com>
15552 David Sherwood <david.sherwood@arm.com>
15554 * config/aarch64/aarch64-sve.md (*pred_cmp<cmp_op><mode>_combine)
15555 (*pred_cmp<cmp_op><mode>, *fcm<cmp_op><mode>_and_combine)
15556 (*fcmuo<mode>_and_combine, *fcm<cmp_op><mode>_and)
15557 (*fcmuo<mode>_and): New patterns.
15559 2018-05-08 Richard Sandiford <richard.sandiford@linaro.org>
15561 * config/aarch64/iterators.md (UNSPEC_COND_LO, UNSPEC_COND_LS)
15562 (UNSPEC_COND_HI, UNSPEC_COND_HS, UNSPEC_COND_UO): Delete.
15563 (SVE_INT_CMP, SVE_FP_CMP): New code iterators.
15564 (cmp_op, sve_imm_con): New code attributes.
15565 (SVE_COND_INT_CMP, imm_con): Delete.
15566 (cmp_op): Remove above unspecs from int attribute.
15567 * config/aarch64/aarch64-sve.md (*vec_cmp<cmp_op>_<mode>): Rename
15569 (*cmp<cmp_op><mode>): ...this. Use UNSPEC_MERGE_PTRUE instead of
15570 comparison-specific unspecs.
15571 (*vec_cmp<cmp_op>_<mode>_ptest): Rename to...
15572 (*cmp<cmp_op><mode>_ptest): ...this and adjust likewise.
15573 (*vec_cmp<cmp_op>_<mode>_cc): Rename to...
15574 (*cmp<cmp_op><mode>_cc): ...this and adjust likewise.
15575 (*vec_fcm<cmp_op><mode>): Rename to...
15576 (*fcm<cmp_op><mode>): ...this and adjust likewise.
15577 (*vec_fcmuo<mode>): Rename to...
15578 (*fcmuo<mode>): ...this and adjust likewise.
15579 (*pred_fcm<cmp_op><mode>): New pattern.
15580 * config/aarch64/aarch64.c (aarch64_emit_unop, aarch64_emit_binop)
15581 (aarch64_emit_sve_ptrue_op, aarch64_emit_sve_ptrue_op_cc): New
15583 (aarch64_unspec_cond_code): Remove handling of LTU, GTU, LEU, GEU
15585 (aarch64_gen_unspec_cond, aarch64_emit_unspec_cond): Delete.
15586 (aarch64_emit_sve_predicated_cond): New function.
15587 (aarch64_expand_sve_vec_cmp_int): Use aarch64_emit_sve_ptrue_op_cc.
15588 (aarch64_emit_unspec_cond_or): Replace with...
15589 (aarch64_emit_sve_or_conds): ...this new function. Use
15590 aarch64_emit_sve_ptrue_op for the individual comparisons and
15591 aarch64_emit_binop to OR them together.
15592 (aarch64_emit_inverted_unspec_cond): Replace with...
15593 (aarch64_emit_sve_inverted_cond): ...this new function. Use
15594 aarch64_emit_sve_ptrue_op for the comparison and
15595 aarch64_emit_unop to invert the result.
15596 (aarch64_expand_sve_vec_cmp_float): Update after the above
15597 changes. Use aarch64_emit_sve_ptrue_op for native comparisons.
15599 2018-05-07 Nathan Sidwell <nathan@acm.org>
15601 * doc/invoke.texi (C++ Dialect Options): Remove -ffor-scope.
15602 * doc/extend.texi (Deprecated Features): Remove -fno-for-scope
15603 (Backwards Compatibility): Likewise.
15605 2018-05-07 Luis Machado <luis.machado@linaro.org>
15609 2018-05-07 Luis Machado <luis.machado@linaro.org>
15611 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
15612 <prefetch_dynamic_strides>: New const bool field.
15613 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
15614 prefetch_dynamic_strides.
15615 (exynosm1_prefetch_tune): Likewise.
15616 (thunderxt88_prefetch_tune): Likewise.
15617 (thunderx_prefetch_tune): Likewise.
15618 (thunderx2t99_prefetch_tune): Likewise.
15619 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
15621 (aarch64_override_options_internal): Update to set
15622 PARAM_PREFETCH_DYNAMIC_STRIDES.
15623 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
15624 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
15625 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
15626 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
15627 prefetch-dynamic-strides setting.
15629 2018-05-07 Luis Machado <luis.machado@linaro.org>
15631 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
15632 <minimum_stride>: New const int field.
15633 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
15634 minimum_stride field.
15635 (exynosm1_prefetch_tune): Likewise.
15636 (thunderxt88_prefetch_tune): Likewise.
15637 (thunderx_prefetch_tune): Likewise.
15638 (thunderx2t99_prefetch_tune): Likewise.
15639 (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
15640 (aarch64_override_options_internal): Update to set
15641 PARAM_PREFETCH_MINIMUM_STRIDE.
15642 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
15643 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
15644 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
15645 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
15646 stride is constant and is below the minimum stride threshold.
15648 2018-05-07 Luis Machado <luis.machado@linaro.org>
15650 * config/aarch64/aarch64.c (qdf24xx_prefetch_tune) <l2_cache_size>: Set
15653 2018-05-07 Luis Machado <luis.machado@linaro.org>
15655 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
15656 <prefetch_dynamic_strides>: New const bool field.
15657 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
15658 prefetch_dynamic_strides.
15659 (exynosm1_prefetch_tune): Likewise.
15660 (thunderxt88_prefetch_tune): Likewise.
15661 (thunderx_prefetch_tune): Likewise.
15662 (thunderx2t99_prefetch_tune): Likewise.
15663 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
15665 (aarch64_override_options_internal): Update to set
15666 PARAM_PREFETCH_DYNAMIC_STRIDES.
15667 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
15668 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
15669 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
15670 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
15671 prefetch-dynamic-strides setting.
15673 2018-05-07 Luis Machado <luis.machado@linaro.org>
15675 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
15676 <minimum_stride>: New const int field.
15677 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
15678 minimum_stride field.
15679 (exynosm1_prefetch_tune): Likewise.
15680 (thunderxt88_prefetch_tune): Likewise.
15681 (thunderx_prefetch_tune): Likewise.
15682 (thunderx2t99_prefetch_tune): Likewise.
15683 (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
15684 (aarch64_override_options_internal): Update to set
15685 PARAM_PREFETCH_MINIMUM_STRIDE.
15686 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
15687 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
15688 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
15689 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
15690 stride is constant and is below the minimum stride threshold.
15692 2018-05-06 Jakub Jelinek <jakub@redhat.com>
15695 * cfgexpand.c (expand_asm_stmt): Don't create a temporary if
15696 the type is addressable. Don't force op into register if it has
15699 2018-05-05 Roland McGrath <mcgrathr@google.com>
15702 * varasm.c (default_section_type_flags): Set SECTION_NOTYPE for
15703 any section for which we don't know a specific type it should have,
15704 regardless of name. Previously this was done only for the exact
15705 names ".init_array", ".fini_array", and ".preinit_array".
15706 (default_elf_asm_named_section): Add comment about
15707 relationship with default_section_type_flags and SECTION_NOTYPE.
15708 (get_section): Don't consider it a type conflict if one side has
15709 SECTION_NOTYPE and the other doesn't, as long as neither has the
15710 SECTION_BSS et al used in the default_section_type_flags logic.
15712 2018-05-05 Tom de Vries <tom@codesourcery.com>
15715 * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_3): Define.
15716 (workaround_barsyncs): New function.
15717 (nvptx_reorg): Use workaround_barsyncs.
15718 * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
15719 (define_expand "nvptx_membar_cta"): New define_expand.
15720 (define_insn "*nvptx_membar_cta"): New insn.
15722 2018-05-04 Pekka Jääskeläinen <pekka.jaaskelainen@parmance.com>
15724 * brig-builtins.def: Add consts to ptrs etc. in BRIG builtin defs.
15725 To improve optimization opportunities.
15726 * builtin-types.def: The new needed builtin types for the above.
15728 2018-05-04 Richard Biener <rguenther@suse.de>
15730 * bb-reorder.c (sanitize_hot_paths): Release hot_bbs_to_check.
15731 * gimple-ssa-store-merging.c
15732 (imm_store_chain_info::output_merged_store): Remove redundant create,
15733 release split_store vector contents on failure.
15734 * tree-vect-slp.c (vect_schedule_slp_instance): Avoid leaking
15735 scalar stmt vector on cache hit.
15737 2018-05-04 Segher Boessenkool <segher@kernel.crashing.org>
15739 * common/config/rs6000/rs6000-common.c (rs6000_handle_option): Remove
15741 * config.gcc (powerpc-xilinx-eabi*): Remove.
15742 * config/rs6000/predicates.md (easy_fp_constant): Remove Xilinx FP
15744 (fusion_addis_mem_combo_load): Ditto.
15745 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Remove Xilinx
15747 (rs6000_cpu_cpp_builtins): Ditto.
15748 * config/rs6000/rs6000-linux.c
15749 (rs6000_linux_float_exceptions_rounding_supported_p): Ditto.
15750 * config/rs6000/rs6000-opts.h (enum fpu_type_t): Delete.
15751 * config/rs6000/rs6000.c (rs6000_debug_reg_global): Remove Xilinx FP
15753 (rs6000_setup_reg_addr_masks): Ditto.
15754 (rs6000_init_hard_regno_mode_ok): Ditto.
15755 (rs6000_option_override_internal): Ditto.
15756 (legitimate_lo_sum_address_p): Ditto.
15757 (rs6000_legitimize_address): Ditto.
15758 (rs6000_legitimize_reload_address): Ditto.
15759 (rs6000_legitimate_address_p): Ditto.
15760 (abi_v4_pass_in_fpr): Ditto.
15761 (setup_incoming_varargs): Ditto.
15762 (rs6000_gimplify_va_arg): Ditto.
15763 (rs6000_split_multireg_move): Ditto.
15764 (rs6000_savres_strategy): Ditto.
15765 (rs6000_emit_prologue_components): Ditto.
15766 (rs6000_emit_epilogue_components): Ditto.
15767 (rs6000_emit_prologue): Ditto.
15768 (rs6000_emit_epilogue): Ditto.
15769 (rs6000_elf_file_end): Ditto.
15770 (rs6000_function_value): Ditto.
15771 (rs6000_libcall_value): Ditto.
15772 * config/rs6000/rs6000.h: Ditto.
15773 (TARGET_MINMAX_SF, TARGET_MINMAX_DF): Delete, merge to ...
15774 (TARGET_MINMAX): ... this. New.
15775 (TARGET_SF_FPR, TARGET_DF_FPR, TARGET_SF_INSN, TARGET_DF_INSN): Delete.
15776 * config/rs6000/rs6000.md: Remove Xilinx FP support.
15777 (*movsi_internal1_single): Delete.
15778 * config/rs6000/rs6000.opt (msingle-float, mdouble-float, msimple-fpu,
15779 mfpu=, mxilinx-fpu): Delete.
15780 * config/rs6000/singlefp.h: Delete.
15781 * config/rs6000/sysv4.h: Remove Xilinx FP support.
15782 * config/rs6000/t-rs6000: Ditto.
15783 * config/rs6000/t-xilinx: Delete.
15784 * config/rs6000/titan.md: Adjust for fp_type removal.
15785 * config/rs6000/vsx.md: Remove Xilinx FP support.
15786 (VStype_simple): Delete.
15787 (VSfptype_simple, VSfptype_mul, VSfptype_div, VSfptype_sqrt): Delete.
15788 * config/rs6000/xfpu.h: Delete.
15789 * config/rs6000/xfpu.md: Delete.
15790 * config/rs6000/xilinx.h: Delete.
15791 * config/rs6000/xilinx.opt: Delete.
15792 * doc/invoke.texi (RS/6000 and PowerPC Options): Remove
15793 -msingle-float, -mdouble-float, -msimple-fpu, -mfpu=, and -mxilinx-fpu.
15795 2018-05-04 Tom de Vries <tom@codesourcery.com>
15798 * builtins.c (expand_builtin_goacc_parlevel_id_size): Handle null target
15801 2018-05-04 Richard Biener <rguenther@suse.de>
15803 PR middle-end/85627
15804 * tree-complex.c (update_complex_assignment): We are always in SSA form.
15805 (expand_complex_div_wide): Likewise.
15806 (expand_complex_operations_1): Likewise.
15807 (expand_complex_libcall): Preserve EH info of the original stmt.
15808 (tree_lower_complex): Handle removed blocks.
15809 * tree.c (build_common_builtin_nodes): Do not set ECF_NOTRHOW
15810 on complex multiplication and division libcall builtins.
15812 2018-05-04 Richard Biener <rguenther@suse.de>
15814 PR middle-end/85574
15815 * fold-const.c (negate_expr_p): Restrict negation of operand
15816 zero of a division to when we know that can happen without
15818 (fold_negate_expr_1): Likewise.
15820 2018-05-04 Jakub Jelinek <jakub@redhat.com>
15823 * real.h (real_nextafter): Declare.
15824 * real.c (real_nextafter): New function.
15825 * fold-const-call.c (fold_const_nextafter): New function.
15826 (fold_const_call_sss): Call it for CASE_CFN_NEXTAFTER and
15827 CASE_CFN_NEXTTOWARD.
15828 (fold_const_call_1): For CASE_CFN_NEXTTOWARD call fold_const_call_sss
15829 even when arg1_mode is different from arg0_mode.
15831 2018-05-03 Nathan Sidwell <nathan@acm.org>
15833 * doc/extend.texi (Deprecated Features): Remove
15834 -ffriend-injection.
15835 (Backwards Compatibility): Likewise.
15836 * doc/invoke.texi (C++ Language Options): Likewise.
15837 (C++ Dialect Options): Likewise.
15839 2018-05-03 Jakub Jelinek <jakub@redhat.com>
15842 * config/i386/avx512fintrin.h (_mm512_mullox_epi64,
15843 _mm512_mask_mullox_epi64): New intrinsics.
15845 2018-05-03 Tom de Vries <tom@codesourcery.com>
15848 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
15849 dump files): Add offload-tree.
15851 2018-05-03 Richard Biener <rguenther@suse.de>
15853 PR tree-optimization/85615
15854 * tree-ssa-threadupdate.c (thread_block_1): Only allow exits
15855 to loops not nested in BBs loop father to avoid creating multi-entry
15858 2018-05-03 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
15860 PR tree-optimization/70291
15861 * tree-complex.c (expand_complex_libcall): Add type, inplace_p
15862 arguments. Change return type to tree. Emit libcall as a new
15863 statement rather than replacing existing one when inplace_p is true.
15864 (expand_complex_multiplication_components): New function.
15865 (expand_complex_multiplication): Expand floating-point complex
15866 multiplication using the above.
15867 (expand_complex_division): Rename inner_type parameter to type.
15868 Update expand_complex_libcall call-site.
15869 (expand_complex_operations_1): Update expand_complex_multiplication
15870 and expand_complex_division call-sites.
15872 2018-05-02 Jakub Jelinek <jakub@redhat.com>
15875 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
15876 *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
15877 *<shift_insn><dwi>3_doubleword_mask_1): In condition require that
15878 the highest significant bit of the shift count mask is clear. In
15879 check whether and[sq]i3 is needed verify that all significant bits
15880 of the shift count other than the highest are set.
15882 2018-05-02 Tom de Vries <tom@codesourcery.com>
15885 * builtins.def (DEF_GOACC_BUILTIN_ONLY): Define.
15886 * omp-builtins.def (BUILT_IN_GOACC_PARLEVEL_ID)
15887 (BUILT_IN_GOACC_PARLEVEL_SIZE): New builtin.
15888 * builtins.c (expand_builtin_goacc_parlevel_id_size): New function.
15889 (expand_builtin): Call expand_builtin_goacc_parlevel_id_size.
15890 * doc/extend.texi (Other Builtins): Add __builtin_goacc_parlevel_id and
15891 __builtin_goacc_parlevel_size.
15893 2018-05-02 Richard Biener <rguenther@suse.de>
15895 PR tree-optimization/85597
15896 * tree-vect-stmts.c (vectorizable_operation): For ternary SLP
15897 do not use split vect_get_vec_defs call but call vect_get_slp_defs
15900 2018-05-02 Tom de Vries <tom@codesourcery.com>
15903 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
15904 dump files): Add ltrans-tree.
15906 2018-05-02 Tom de Vries <tom@codesourcery.com>
15909 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
15910 dump files): Add wpa-ipa.
15912 2018-05-02 Segher Boessenkool <segher@kernel.crashing.org>
15914 * config.gcc (powerpc*-*-*): Remove paired.h. Unsupport the
15915 powerpc*-*-linux*paired* target.
15916 * config/rs6000/750cl.h: Delete.
15917 * config/rs6000/paired.h: Delete.
15918 * config/rs6000/paired.md: Delete.
15919 * config/rs6000/predicates.md (easy_vector_constant): Remove paired
15921 * config/rs6000/rs6000-builtin.def: Remove paired float support.
15922 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Update
15923 comment. Remove paired float support.
15924 * config/rs6000/rs6000-modes.def: Remove V2SF and V2SI.
15925 * config/rs6000/rs6000-opts.h (enum rs6000_vector): Delete
15927 * config/rs6000/rs6000-protos.h (paired_expand_vector_init,
15928 paired_emit_vector_cond_expr, paired_expand_vector_move): Delete
15930 * config/rs6000/rs6000.c: Remove paired float support.
15931 (paired_expand_vector_init, paired_expand_vector_move,
15932 paired_emit_vector_compare, paired_emit_vector_cond_expr,
15933 (paired_expand_lv_builtin, paired_expand_stv_builtin,
15934 paired_expand_builtin, paired_expand_predicate_builtin,
15935 paired_init_builtins): Delete.
15936 * config/rs6000/rs6000.h: Remove paired float support.
15937 * config/rs6000/rs6000.md: Remove paired float support.
15938 (move_from_CR_ov_bit): Delete.
15939 * config/rs6000/rs6000.opt (mpaired): Delete.
15940 * config/rs6000/t-rs6000: Remove paired.md from MD_INCLUDES.
15941 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mpaired.
15943 2018-05-02 Richard Biener <rguenther@suse.de>
15945 PR middle-end/85567
15946 * gimplify.c (gimplify_save_expr): When in SSA form allow
15947 SAVE_EXPRs to compute to SSA vars.
15949 2018-05-02 Jakub Jelinek <jakub@redhat.com>
15952 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
15953 *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
15954 *<shift_insn><dwi>3_doubleword_mask_1): If and[sq]i3 is needed, don't
15955 clobber operands[2], instead use a new pseudo. Formatting fixes.
15957 2018-05-02 Richard Sandiford <richard.sandiford@linaro.org>
15959 PR tree-optimization/85586
15960 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence): Only
15961 exit early for statements in the same group if the accesses are
15964 2018-05-02 Tom de Vries <tom@codesourcery.com>
15967 * lto-wrapper.c (compile_offload_image): Add "could not find mkoffload"
15970 2018-05-01 Marc Glisse <marc.glisse@inria.fr>
15972 PR tree-optimization/85143
15973 * match.pd (A<B&A<C): Extend to BIT_IOR_EXPR.
15975 2018-05-01 Tom de Vries <tom@codesourcery.com>
15978 * config/nvptx/mkoffload.c (main): Suggest using -B in "offload compiler
15979 not found" error message.
15981 2018-05-01 Tom de Vries <tom@codesourcery.com>
15984 * vec.h (VEC_ORDERED_REMOVE_IF, VEC_ORDERED_REMOVE_IF_FROM_TO): Define.
15985 * vec.c (test_ordered_remove_if): New function.
15986 (vec_c_tests): Call test_ordered_remove_if.
15987 * dwarf2cfi.c (connect_traces): Use VEC_ORDERED_REMOVE_IF_FROM_TO.
15988 * lto-streamer-out.c (prune_offload_funcs): Use VEC_ORDERED_REMOVE_IF.
15989 * tree-vect-patterns.c (vect_pattern_recog_1): Use
15990 VEC_ORDERED_REMOVE_IF.
15992 2018-05-01 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
15994 PR tree-optimization/82665
15995 * vr-values.c (vr_values::extract_range_from_binary_expr): Handle
15996 pointer subtraction where arguments come from a memchr call.
15998 2018-05-01 Jakub Jelinek <jakub@redhat.com>
16000 * configure.ac (LD_AS_NEEDED_OPTION, LD_NO_AS_NEEDED_OPTION): Use
16001 --push-state --as-needed and --pop-state instead of --as-needed and
16002 --no-as-needed if ld supports it.
16003 * configure: Regenerated.
16006 * doc/install.texi2html: Replace _002d with - and _002a with * in
16007 generated html files using sed.
16009 2018-04-30 David Malcolm <dmalcolm@redhat.com>
16012 * gcc-rich-location.c (blank_line_before_p): New function.
16013 (use_new_line): New function.
16014 (gcc_rich_location::add_fixit_insert_formatted): New function.
16015 * gcc-rich-location.h
16016 (gcc_rich_location::add_fixit_insert_formatted): New function.
16018 2018-04-30 David Malcolm <dmalcolm@redhat.com>
16020 * selftest.c (assert_streq): Rename "expected" and "actual" to
16021 "val1" and "val2". Extend NULL-handling to cover both inputs
16022 symmetrically, while still requiring both to be non-NULL for a pass.
16023 * selftest.h (assert_streq): Rename "expected" and "actual" to
16025 (ASSERT_EQ): Likewise.
16026 (ASSERT_EQ_AT): Likewise.
16027 (ASSERT_KNOWN_EQ): Likewise.
16028 (ASSERT_KNOWN_EQ_AT): Likewise.
16029 (ASSERT_NE): Likewise.
16030 (ASSERT_MAYBE_NE): Likewise.
16031 (ASSERT_MAYBE_NE_AT): Likewise.
16032 (ASSERT_STREQ): Likewise. Clarify that both must be non-NULL for
16033 the assertion to pass.
16034 (ASSERT_STREQ_AT): Likewise.
16036 2018-04-30 Jonathan Wakely <jwakely@redhat.com>
16038 * doc/invoke.texi (-fpie, -fPIE): Fix grammar and clarify
16039 interaction with -pie.
16041 2018-04-30 David Malcolm <dmalcolm@redhat.com>
16043 * selftest.h: Fix alphabetization of per-source-file selftest
16046 2018-04-30 Jason Merrill <jason@redhat.com>
16048 PR c++/61982 - dead stores to destroyed objects.
16049 * gimplify.c (gimplify_modify_expr): Simplify complex lvalue on LHS
16052 2018-04-30 Jason Merrill <jason@redhat.com>
16054 * tree.c (build_clobber): New.
16055 * tree.h: Declare it.
16056 * gimplify.c (gimplify_bind_expr, gimplify_target_expr): Use it.
16058 2018-04-30 David Malcolm <dmalcolm@redhat.com>
16060 * diagnostic-show-locus.c (layout::layout): Update for
16061 location_get_source_line returning a char_span.
16062 (struct char_span): Move to input.h.
16063 (struct correction): Update for fields in char_span becoming
16065 (struct source_line): Update for location_get_source_line
16066 returning a char_span.
16067 (layout::print_line): Likewise.
16068 * edit-context.c (edited_file::print_content): Likewise.
16069 (edited_file::print_diff_hunk): Likewise.
16070 (edited_file::print_run_of_changed_lines): Likewise.
16071 (edited_file::get_num_lines): Likewise.
16072 (edited_line::edited_line): Likewise.
16073 * final.c (asm_show_source): Likewise.
16074 * input.c (location_get_source_line): Convert return type
16075 from const char * to char_span, losing the final "line_len"
16077 (dump_location_info): Update for the above.
16078 (get_substring_ranges_for_loc): Likewise. Use a char_span
16079 when handling the literal within the line.
16080 (test_reading_source_line): Update for location_get_source_line
16081 returning a char_span.
16082 * input.h (class char_span): Move here from
16083 diagnostic-show-locus.c, converting from a struct to a class.
16084 Make data members private.
16085 (char_span::operator bool): New.
16086 (char_span::length): New.
16087 (char_span::get_buffer): New.
16088 (char_span::operator[]): New.
16089 (char_span::subspan): Make const.
16090 (char_span::xstrdup): New.
16091 (location_get_source_line): Convert return type from const char *
16092 to char_span, losing the final "line_size" param.
16094 2018-04-30 Jan Hubicka <jh@suse.cz>
16096 * lto-wrapper.c (ltrans_priorities): New static var.
16097 (cmp_priority): New.
16098 (run_gcc): Read priorities and if doing parallel build order
16099 the Makefile by them.
16101 2018-04-30 David Malcolm <dmalcolm@redhat.com>
16103 * input.h (builtins_location_check): Convert to a STATIC_ASSERT.
16105 2018-04-30 Richard Biener <rguenther@suse.de>
16107 * tree-cfg.c (verify_address): Remove base argument, add
16108 flag whether to check TREE_ADDRESSABLE and do that.
16109 (verify_expr): Remove.
16110 (verify_types_in_gimple_reference): Add pieces from verify_expr.
16111 (verify_gimple_assign_single): Likewise.
16112 (verify_gimple_switch): Likewise.
16113 (verify_expr_location_1): Dereference tp once. Add (disabled)
16114 piece from verify_expr.
16115 (verify_gimple_in_cfg): Do not call verify_expr on all ops.
16117 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
16119 * config/arc/linux.h (CLEAR_INSN_CACHE): Define.
16121 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
16123 * config/arc/arc-protos.h (prepare_extend_operands): Remove.
16124 (small_data_pattern): Likewise.
16125 (arc_rewrite_small_data): Likewise.
16126 * config/arc/arc.c (LEGITIMATE_SMALL_DATA_OFFSET_P): Remove.
16127 (LEGITIMATE_SMALL_DATA_ADDRESS_P): Likewise.
16128 (get_symbol_alignment): New function.
16129 (legitimate_small_data_address_p): Likewise.
16130 (legitimate_scaled_address): Update, call
16131 legitimate_small_data_address_p.
16132 (output_sdata): New static variable.
16133 (arc_print_operand): Update how we handle small data operands.
16134 (arc_print_operand_address): Likewise.
16135 (arc_legitimate_address_p): Update, use
16136 legitimate_small_data_address_p.
16137 (arc_rewrite_small_data_p): Remove.
16138 (arc_rewrite_small_data_1): Likewise.
16139 (arc_rewrite_small_data): Likewise.
16140 (small_data_pattern): Likewise.
16141 (compact_sda_memory_operand): Update to use
16142 legitimate_small_data_address_p and get_symbol_alignment.
16143 (prepare_move_operands): Don't rewite sdata pattern.
16144 (prepare_extend_operands): Remove.
16145 * config/arc/arc.md (zero_extendqihi2): Don't rewrite sdata
16147 (zero_extendqisi2): Likewise.
16148 (zero_extendhisi2): Likewise.
16149 (extendqihi2): Likewise.
16150 (extendqisi2): Likewise.
16151 (extendhisi2): Likewise.
16152 (addsi3): Likewise.
16153 (subsi3): Likewise.
16154 (andsi3): Likewise.
16155 * config/arc/constraints.md (Usd): Change it to memory constraint.
16157 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
16159 * config/arc/arc.c (arc_split_move): Allow signed 6-bit constants
16160 as source of std instructions.
16161 * config/arc/arc.md (movsi_insn): Update pattern predicate to
16162 allow 6-bit constants as source for store instructions.
16163 (movdi_insn): Update instruction pattern to allow 6-bit constants
16164 as source for store instructions.
16166 2018-04-30 Jonathan Wakely <jwakely@redhat.com>
16168 * doc/invoke.texi (-fdebug-types-section): Fix grammar.
16170 2018-04-30 Nathan Sidwell <nathan@acm.org>
16171 Sandra Loosemore <sandra@codesourcery.com>
16173 * dumpfile.c (dump_open): Allow '-' for stdout.
16174 * doc/invoke.texi (Developer Options): Document dump filename
16175 determination early. Document stdin/stdout selection.
16177 2018-04-30 Andrew Sadek <andrew.sadek.se@gmail.com>
16179 Microblaze Target: PIC data text relative
16181 * config/microblaze/microblaze.opt: add new option -mpic-data-text-rel.
16182 * config/microblaze/microblaze-protos.h (microblaze_constant_address_p):
16184 * config/microblaze/microblaze.h (microblaze_constant_address_p):
16185 CONSTANT_ADDRESS_P definition to microblaze_constant_address_p.
16186 * config/microblaze/microblaze.c (TARGET_PIC_DATA_TEXT_REL):
16187 New addressing mode for data-text relative position indepenedent code.
16188 (microblaze_classify_unspec): add 'UNSPEC_TEXT' case ->
16189 'ADDRESS_SYMBOLIC_TXT_REL'.
16190 (microblaze_classify_address): Add handling for UNSPEC + CONST_INT.
16191 (microblaze_legitimate_pic_operand): Exclude function calls from
16192 pic operands in case of TARGET_PIC_DATA_TEXT_REL option.
16193 (microblaze_legitimize_address): Generate 'UNSPEC_TEXT' for all possible
16195 (microblaze_address_insns): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
16196 (print_operand): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
16197 (print_operand_address): Add 'ADDRESS_SYMBOLIC_TXT_REL' case + handling
16198 for 'address + offset'.
16199 (microblaze_expand_prologue): Add new function prologue call for
16201 (microblaze_asm_generate_pic_addr_dif_vec): Override new target hook
16202 'TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC' to disable address diff vector
16203 table in case of TARGET_PIC_DATA_TEXT_REL.
16204 (expand_pic_symbol_ref): Add handling for 'UNSPEC_TEXT'.
16205 * config/microblaze/microblaze.md (TARGET_PIC_DATA_TEXT_REL):
16206 Add new macros 'UNSPEC_TEXT',
16207 'UNSPEC_SET_TEXT' + add rule for setting r20 in function prologue
16208 + exclude function calls from 'UNSPEC_PLT' in case of data text
16210 * doc/tm.texi.in (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
16211 new target hook for generating address diff vector tables in case of
16213 * doc/tm.texi : Regenerate.
16214 * stmt.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Append new condition
16215 'targetm.asm_out.generate_pic_addr_diff_vec' to flag_pic in case
16216 of addr diff vector generation.
16217 * target.def (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
16218 target hook definition.
16219 * targhooks.h, targhooks.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC):
16220 Add default function for generate_pic_addr_diff_vec -> flag_pic.
16221 * doc/invoke.texi (Add new pic option): Add new microblaze pic
16222 option for data text relative.
16224 2018-04-30 Richard Biener <rguenther@suse.de>
16226 * tree-chrec.h (evolution_function_is_constant_p): Remove
16228 * tree-cfg.c (tree_node_can_be_shared): Re-order checks.
16230 2018-04-30 Richard Biener <rguenther@suse.de>
16233 * dwarf2out.c (gen_producer_string): Ignore -fchecking[=].
16235 2018-04-30 Richard Biener <rguenther@suse.de>
16237 PR tree-optimization/28364
16238 PR tree-optimization/85275
16239 * tree-ssa-loop-ch.c (ch_base::copy_headers): Stop after
16240 copying first exit test.
16242 2018-04-28 Mark Wielaard <mark@klomp.org>
16244 * dwarf2out.c (dwarf2out_finish): Add .debug_addr table header for
16245 dwarf_version >= 5.
16246 (dwarf_AT): Handle DW_AT_addr_base.
16247 (add_top_level_skeleton_die_attrs): Use dwarf_AT for DW_AT_addr_base.
16249 2018-04-28 Uros Bizjak <ubizjak@gmail.com>
16252 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask): New pattern.
16253 (*ashl<dwi>3_doubleword_mask_1): Ditto.
16254 (*<shift_insn><dwi>3_doubleword_mask): Ditto.
16255 (*<shift_insn><dwi>3_doubleword_mask_1): Ditto.
16257 2018-04-28 Richard Biener <rguenther@suse.de>
16259 * tree-cfg.c (verify_gimple_phi): Take a gphi * argument.
16260 (verify_gimple_in_cfg): Rename visited_stmts to visited_throwing_stmts
16261 to reflect use. Only add interesting stmts.
16263 2018-04-27 Martin Jambor <mjambor@suse.cz>
16266 * ipa-cp.c (find_aggregate_values_for_callers_subset): Make sure
16267 the jump function allows for passing through aggregate values.
16269 2018-04-27 David Malcolm <dmalcolm@redhat.com>
16271 * input.h (in_system_header_at): Convert from macro to inline
16273 (from_macro_expansion_at): Likewise.
16274 (from_macro_definition_at): Likewise.
16276 2018-04-27 Jeff Law <law@redhat.com>
16278 * config.gcc: Mark tile* targets as deprecated/obsolete.
16280 2018-04-27 Richard Biener <rguenther@suse.de>
16282 * config/aarch64/aarch64.c: Simplify ap.__stack advance and
16285 2018-04-27 Richard Biener <rguenther@suse.de>
16287 * tree-cfg.c (verify_expr): Make dead code hit gcc_unreachable.
16289 2018-04-27 Uros Bizjak <ubizjak@gmail.com>
16291 * config/i386/i386.md (*movti_internal): Substitute Ye constraint
16292 with Yd constraint. Set "preferred_for_speed" attribute from
16293 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for alternatives
16294 with Yd constraint.
16295 (*movdi_internal): Ditto.
16296 (movti_interunit splitters): Remove
16297 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC from insn condition.
16298 (movdi_interunit splitters): Ditto.
16299 * config/i386/constraints.md (Ye): Remove.
16300 (Yd): Do not depend on TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC.
16302 2018-04-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
16305 * config/aarch64/constraints.md (Usg): Limit to 31.
16306 (Usj): Limit to 63.
16308 2018-04-27 Jakub Jelinek <jakub@redhat.com>
16310 PR tree-optimization/85529
16311 * tree-ssa-reassoc.c (optimize_range_tests_var_bound): Add FIRST_BB
16312 argument. Don't call get_nonzero_bits if opcode is ERROR_MARK_NODE,
16313 rhs2 def stmt's bb is dominated by first_bb and it isn't an obvious
16314 zero extension or masking of the MSB bit.
16315 (optimize_range_tests): Add FIRST_BB argument, pass it through
16316 to optimize_range_tests_var_bound.
16317 (maybe_optimize_range_tests, reassociate_bb): Adjust
16318 optimize_range_tests callers.
16320 2018-04-26 Richard Biener <rguenther@suse.de>
16321 Jakub Jelinek <jakub@redhat.com>
16323 * cgraph.h (symbol_table): Just declare debug method here.
16324 * symtab.c (symbol_table::debug): Define.
16326 2018-04-26 Eric Botcazou <ebotcazou@adacore.com>
16328 * loop-invariant.c (may_assign_reg_p): Return false for frame pointer.
16330 2018-04-26 Uros Bizjak <ubizjak@gmail.com>
16332 * config/i386/i386.md ("isa" attribute): Add x64_sse2.
16333 ("enabled" attribute): Handle x64_sse2 "isa" attribute.
16334 (*movdi_internal): Substitute Yi and Yj constraint with x
16335 and Ym and Yn constraint with y constraint. Update "isa"
16336 attribute and set "preferred_for_speed" attribute from
16337 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for updated alternatives.
16338 (*movsi_internal): Ditto.
16339 (*movdf_internal): Ditto.
16340 (*movsf_internal): Ditto.
16341 (*zero_extendsidi2): Ditto.
16342 * config/i386/sse.md (vec_set<mode>_0): Ditto.
16343 (sse2_loadld): Ditto.
16344 (*vec_extract<ssevecmodelower>_0): Ditto.
16345 (*vec_extractv4si_0_zext_sse4): Ditto.
16346 (vec_concatv2di): Ditto.
16347 (*vec_dup<mode>): Ditto.
16348 * config/i386/mmx.md (*mov<mode>_internal): Ditto.
16349 * config/i386/constraints.md (Yi): Remove.
16354 2018-04-26 Nathan Sidwell <nathan@acm.org>
16356 * dumpfile.c (dump_open): New.
16357 (dump_open_alternate_stream, dump_start, dump_begin): Call it.
16358 (dump_finish): Detect stdio/stderr by value not name.
16360 2018-04-26 Jonathan Wakely <jwakely@redhat.com>
16362 * doc/invoke.texi (-Wreturn-type): Document default status for C++.
16364 2018-04-26 Tom de Vries <tom@codesourcery.com>
16367 * config/nvptx/nvptx.c (verify_neutering_jumps)
16368 (verify_neutering_labels): New function
16369 (nvptx_single): Use verify_neutering_jumps and verify_neutering_labels.
16371 2018-04-26 Tom de Vries <tom@codesourcery.com>
16374 * config/nvptx/nvptx.c (needs_neutering_p): New function.
16375 (nvptx_single): Use needs_neutering_p to skip over insns that do not
16378 2018-04-26 Richard Biener <rguenther@suse.de>
16379 Tom de Vries <tom@codesourcery.com>
16382 * lto-streamer-out.c (output_function): Fixup loops if required to match
16383 discovery done in the reader.
16385 2018-04-26 Richard Biener <rguenther@suse.de>
16387 PR tree-optimization/85116
16388 * tree-ssa-loop-ch.c (do_while_loop_p): A do-while loop should
16389 have a loop exit from the single latch predecessor. Remove
16390 case of header with just condition.
16391 (ch_base::copy_headers): Exclude infinite loops from any
16393 (pass_ch::execute): Record exits.
16395 2018-04-26 Richard Biener <rguenther@suse.de>
16397 * tree-vect-data-refs.c (vect_get_data_access_cost): Get
16398 prologue cost vector and pass it to vect_get_load_cost.
16399 (vect_get_peeling_costs_all_drs): Likewise.
16400 (vect_peeling_hash_get_lowest_cost): Likewise.
16401 (vect_enhance_data_refs_alignment): Likewise.
16403 2018-04-26 Richard Biener <rguenther@suse.de>
16405 PR middle-end/85450
16406 * tree-cfg.c (verify_gimple_assign_unary): Restore proper
16407 checking of integer<->pointer conversions.
16408 * omp-expand.c (expand_omp_for_static_nochunk): Avoid
16409 sign-/zero-extending pointer types.
16410 (expand_omp_for_static_chunk): Likewise.
16412 2018-03-22 Hans-Peter Nilsson <hp@axis.com>
16413 Jean Lee <xiaoyur347@gmail.com>
16415 * config/mips/mips.c (mips_asan_shadow_offset): New function.
16416 (TARGET_ASAN_SHADOW_OFFSET): Define.
16417 * config/mips/mips.h (FRAME_GROWS_DOWNWARD): Augment to also be
16418 true for -fsanitize=address.
16420 2018-04-25 Mark Wielaard <mark@klomp.org>
16422 * dwarf2out.c (file_info_cmp): Sort longer dir prefixes before
16425 2018-04-25 Jakub Jelinek <jakub@redhat.com>
16427 * config/i386/i386.md (*x86_mov<mode>cc_0_m1): Use type "alu1" rather
16428 than "alu", remove explicit "memory" and "imm_disp" attributes.
16429 (*x86_mov<mode>cc_0_m1_se, *x86_mov<mode>cc_0_m1_neg): Likewise.
16431 PR middle-end/85414
16432 * simplify-rtx.c (simplify_unary_operation_1) <case SIGN_EXTEND,
16433 case ZERO_EXTEND>: Pass SUBREG_REG (op) rather than op to
16434 gen_lowpart_no_emit.
16436 2018-04-25 Sebastian Peryt <sebastian.peryt@intel.com>
16439 * config/i386/i386.c (ix86_expand_builtin): Change memory
16440 operand to XI, extend p0 to Pmode.
16441 * config/i386/i386.md: Change unspec volatile and operand
16442 1 mode to XI, change operand 0 mode to P.
16444 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
16446 * config/nds32/nds32-predicates.c (nds32_can_use_bclr_p): Mask with
16447 GET_MODE_MASK before any checking.
16448 (nds32_can_use_bset_p): Likewise.
16449 (nds32_can_use_btgl_p): Likewise.
16451 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
16453 * config/nds32/nds32-doubleword.md: New define_split pattern for
16454 illegal register number.
16456 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
16458 * config/nds32/nds32.c (nds32_print_operand): Set op_value ealier.
16460 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
16462 * config/nds32/nds32.h (ASM_APP_ON): Add missing newline character.
16464 2018-04-25 Richard Biener <rguenther@suse.de>
16466 * lto-streamer.h (LTO_major_version): Bump to 8.
16468 2018-04-25 Jakub Jelinek <jakub@redhat.com>
16470 * BASE-VER: Set to 9.0.0.
16472 2018-04-24 Segher Boessenkool <segher@kernel.crashing.org>
16474 * config/rs6000/rs6000.c (init_float128_ieee): Fix spelling mistakes
16475 in __abskf2 and __powikf2.
16477 2018-04-24 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
16480 * config/aarch64/constraints.md (Usg, Usj): New constraints.
16481 * config/aarch64/iterators.md (cmode_simd): New mode attribute.
16482 * config/aarch64/aarch64.md (*aarch64_ashr_sisd_or_int_<mode>3):
16483 Use the above on operand 2. Reindent.
16484 (*aarch64_lshr_sisd_or_int_<mode>3): Likewise.
16486 2018-04-24 H.J. Lu <hongjiu.lu@intel.com>
16489 * common/config/i386/i386-common.c (ix86_handle_option): Don't
16491 * config/i386/i386.opt (mcet): Removed.
16492 * doc/install.texi: Remove -mcet documentation.
16493 * doc/invoke.texi: Likewise.
16495 2018-04-24 H.J. Lu <hongjiu.lu@intel.com>
16498 * doc/install.texi: Remove -mcet from bootstrap-cet.
16500 2018-04-24 Jakub Jelinek <jakub@redhat.com>
16503 * config/i386/i386.c (ix86_init_mmx_sse_builtins): Don't define
16504 __builtin_ia32_readeflags_u32 and __builtin_ia32_writeeflags_u32
16508 * config/rs6000/rs6000-p8swap.c (const_load_sequence_p): Punt if
16509 const_vector is not CONST_VECTOR or SYMBOL_REF for a constant pool
16510 containing a CONST_VECTOR.
16512 2018-04-24 Cesar Philippidis <cesar@codesourcery.com>
16514 * doc/install.texi: Update newlib dependency for nvptx.
16516 2018-04-24 Jakub Jelinek <jakub@redhat.com>
16519 * config/i386/i386.c (ix86_expand_vector_init_one_var): Use UINTVAL
16520 instead of INTVAL when shifting x left.
16522 2018-04-24 Andreas Krebbel <krebbel@linux.ibm.com>
16524 PR tree-optimization/85478
16525 * tree-vect-loop.c (vect_analyze_loop_2): Do not call
16526 vect_grouped_store_supported for single element vectors.
16528 2018-04-24 Richard Biener <rguenther@suse.de>
16531 * config/i386/i386.c (ix86_add_stmt_cost): Restrict strided
16532 load cost increase to the case of non-constant step.
16534 2018-04-24 Jakub Jelinek <jakub@redhat.com>
16537 * reg-stack.c (move_for_stack_reg): Don't fail assertion about dead
16538 destination if any_malformed_asm.
16540 2018-04-23 Eric Botcazou <ebotcazou@adacore.com>
16542 PR middle-end/85496
16543 * expr.c (store_field): In the bitfield case, if the value comes from
16544 a function call and is returned in registers by means of a PARALLEL,
16545 do not change the mode of the temporary unless BLKmode and VOIDmode.
16547 2018-04-23 Andrey Belevantsev <abel@ispras.ru>
16549 PR rtl-optimization/85423
16550 * sel-sched-ir.c (has_dependence_note_mem_dep): Only discard
16551 dependencies to debug insns when the previous insn is non-debug.
16553 2018-04-23 Claudiu Zissulescu <claziss@synopsys.com>
16555 * config/arc/arc.md ("vunspec"): Delete it, unify all the unspec
16556 enums into a single definition.
16557 (fls): Fix predicates and printing.
16560 2018-04-23 Claudiu Zissulescu <claziss@synopsys.com>
16562 * config/arc/arc-protos.h (check_if_valid_sleep_operand): Remove.
16563 * config/arc/arc.c (arc_expand_builtin): Sleep accepts registers
16564 and short u6 immediate.
16565 (check_if_valid_sleep_operand): Remove.
16566 * config/arc/arc.md (Sleep): Accepts registers and u6 immediates.
16568 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
16570 * config/nds32/nds32.c (nds32_compute_stack_frame): Consider
16571 flag_always_save_lp condition.
16572 * config/nds32/nds32.opt (malways-save-lp): New option.
16574 2018-04-22 Shiva Chen <shiva0217@gmail.com>
16576 * config/nds32/nds32-protos.h (nds32_use_load_post_increment): Declare.
16577 * config/nds32/nds32.c (nds32_use_load_post_increment): New.
16578 * config/nds32/nds32.h
16579 (USE_LOAD_POST_INCREMENT, USE_LOAD_POST_DECREMENT): Define.
16580 (USE_STORE_POST_INCREMENT, USE_STORE_POST_DECREMENT): Define.
16582 2018-04-22 Shiva Chen <shiva0217@gmail.com>
16584 * config/nds32/nds32-protos.h (nds32_ls_333_p): Remove.
16585 * config/nds32/nds32.c (nds32_ls_333_p): Remove.
16587 2018-04-22 Shiva Chen <shiva0217@gmail.com>
16588 Chung-Ju Wu <jasonwucj@gmail.com>
16590 * config/nds32/nds32-protos.h (nds32_case_vector_shorten_mode):
16592 * config/nds32/nds32.c (nds32_case_vector_shorten_mode): New function.
16593 * config/nds32/nds32.h (CASE_VECTOR_SHORTEN_MODE): Modify.
16595 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
16597 * config/nds32/nds32.c (nds32_compute_stack_frame): Fix wrong value.
16599 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
16601 * config/nds32/nds32-protos.h (nds32_data_alignment,
16602 nds32_local_alignment): Declare.
16603 * config/nds32/nds32.c (nds32_data_alignment, nds32_constant_alignment,
16604 nds32_local_alignment): New functions.
16605 (TARGET_CONSTANT_ALIGNMENT): Define.
16606 * config/nds32/nds32.h (DATA_ALIGNMENT, LOCAL_ALIGNMENT): Define.
16608 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
16610 * config/nds32/nds32.c
16611 (TARGET_HARD_REGNO_MODE_OK): Move to the bottom of file.
16612 (TARGET_MODES_TIEABLE_P): Likewise.
16614 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
16616 * config/nds32/nds32.c (nds32_asm_file_start): Display optimization
16617 level Ofast and Og.
16619 2018-04-22 Monk Chiang <sh.chiang04@gmail.com>
16620 Chung-Ju Wu <jasonwucj@gmail.com>
16622 * config/nds32/constants.md (unspec_volatile_element): Add enum values
16623 for unaligned access.
16624 * config/nds32/nds32-intrinsic.c: Implementation of expanding
16626 * config/nds32/nds32-intrinsic.md: Likewise.
16627 * config/nds32/nds32_intrinsic.h: Likewise.
16628 * config/nds32/nds32.h (nds32_builtins): Likewise.
16629 * config/nds32/nds32.opt (munaligned-access): New option.
16630 * config/nds32/nds32.c (nds32_asm_file_start): Display
16631 flag_unaligned_access status.
16633 2018-04-20 Kito Cheng <kito.cheng@gmail.com>
16635 * config/riscv/elf.h (LINK_SPEC): Pass --no-relax if
16636 -mno-relax is present.
16637 * config/riscv/linux.h (LINK_SPEC): Ditto.
16639 2018-04-20 Martin Sebor <msebor@redhat.com>
16642 * gimple-fold.c (gimple_fold_builtin_strcpy): Suppress -Wrestrict
16644 (gimple_fold_builtin_stxcpy_chk): Same.
16645 * gimple-ssa-warn-restrict.c (check_bounds_or_overlap): Same.
16647 2018-04-20 Michael Meissner <meissner@linux.ibm.com>
16650 * config/rs6000/rs6000.c (init_float128_ieee): Add support to call
16651 __powikf2 when long double is IEEE 128-bit.
16653 2018-04-20 Kito Cheng <kito.cheng@gmail.com>
16655 * config/riscv/riscv.c (riscv_first_stack_step): Round up min
16656 step to make sure stack always aligned.
16658 2018-04-20 Carl Love <cel@us.ibm.com>
16661 * config/rs6000/rs6000-c.c (rs6000_gimple_fold_builtin): Add
16662 size check for arg0.
16664 2018-04-20 Nathan Sidwell <nathan@codesourcery.com>
16665 Tom de Vries <tom@codesourcery.com>
16668 * config/nvptx/nvptx.c (nvptx_emit_forking, nvptx_emit_joining):
16669 Emit insns for calls too.
16670 (nvptx_find_par): Always look for worker-level predecessor insn.
16671 (nvptx_propagate): Add is_call parm, return bool. Copy frame for
16673 (nvptx_vpropagate, nvptx_wpropagate): Adjust.
16674 (nvptx_process_pars): Propagate frames for calls.
16676 2018-04-20 H.J. Lu <hongjiu.lu@intel.com>
16679 * common/config/i386/i386-common.c (OPTION_MASK_ISA_IBT_SET):
16681 (OPTION_MASK_ISA_IBT_UNSET): Likewise.
16682 (ix86_handle_option): Don't handle OPT_mibt.
16683 * config/i386/cet.h: Check __CET__ instead of __IBT__ and
16685 * config/i386/driver-i386.c (host_detect_local_cpu): Remove
16687 * config/i386/i386-c.c (ix86_target_macros_internal): Don't
16688 check OPTION_MASK_ISA_IBT nor flag_cf_protection.
16689 (ix86_target_macros): Define __CET__ with flag_cf_protection
16690 for -fcf-protection.
16691 * config/i386/i386.c (isa2_opts): Remove -mibt.
16692 * config/i386/i386.h (TARGET_IBT): Removed.
16693 (TARGET_IBT_P): Likewise.
16694 (ix86_valid_target_attribute_inner_p): Don't check OPT_mibt.
16695 * config/i386/i386.md (nop_endbr): Don't check TARGET_IBT.
16696 * config/i386/i386.opt (mcet): Update help message.
16697 (mshstk): Likewise.
16699 * doc/invoke.texi: Remove -mibt. Document __CET__. Document
16700 -mcet as an alias for -mshstk.
16702 2018-04-20 Richard Biener <rguenther@suse.de>
16704 PR middle-end/85475
16705 * match.pd ((X * CST) * Y -> (X * Y) * CST): Avoid exponential
16706 complexity by forcing a single use of the multiply operand.
16708 2018-04-20 Martin Jambor <mjambor@suse.cz>
16711 * ipa-cp.c (cgraph_edge_brings_value_p): Move check for self-feeding
16712 recursion dependency to only apply to non-clones.
16714 2018-04-20 Martin Jambor <mjambor@suse.cz>
16717 * ipa-cp.c (create_specialized_node): Check that clones of
16718 self-recursive edges exist during IPA-CP.
16720 2018-04-19 Toon Moene <toon@moene.org>
16722 * doc/invoke.texi: Add -floop-unroll-and-jam to options enabled
16725 2018-04-19 Jakub Jelinek <jakub@redhat.com>
16727 PR tree-optimization/85467
16728 * fold-const.c (fold_ternary_loc) <case BIT_FIELD_REF>: Use
16729 VECTOR_TYPE_P macro. If type is vector type, VIEW_CONVERT_EXPR the
16730 VECTOR_CST element to type.
16732 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
16735 * config/i386/i386.h (STACK_SAVEAREA_MODE): New.
16736 * config/i386/i386.md (builtin_setjmp_setup): Removed.
16737 (builtin_longjmp): Likewise.
16738 (save_stack_nonlocal): New pattern.
16739 (restore_stack_nonlocal): Likewise.
16741 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
16744 * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
16745 Replace ASM_OUTPUT_LABEL with fprintf.
16747 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
16750 * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
16751 Check flag_cf_protection instead of TARGET_IBT and TARGET_SHSTK.
16752 * config/i386/i386-c.c (ix86_target_macros_internal): Also
16753 define __IBT__ and __SHSTK__ for -fcf-protection.
16754 * config/i386/i386.c (pass_insert_endbranch::gate): Don't check
16756 (ix86_trampoline_init): Likewise.
16757 (x86_output_mi_thunk): Likewise.
16758 (ix86_notrack_prefixed_insn_p): Likewise.
16759 (ix86_option_override_internal): Don't disallow -fcf-protection.
16760 * config/i386/i386.md (rdssp<mode>): Also enable for
16762 (incssp<mode>): Likewise.
16763 (nop_endbr): Likewise.
16764 * config/i386/i386.opt (mcet): Change help message to built-in
16767 (mshstk): Likewise.
16768 * doc/invoke.texi: Remove -mcet, -mibt and -mshstk condition
16769 on -fcf-protection. Change -mcet, -mibt and -mshstk to only
16770 enable CET built-in functions.
16772 2018-04-19 Sebastian Peryt <sebastian.peryt@intel.com>
16774 * common/config/i386/i386-common.c
16775 (OPTION_MASK_ISA_MOVDIRI_SET, OPTION_MASK_ISA_MOVDIR64B_SET,
16776 OPTION_MASK_ISA_MOVDIRI_UNSET,
16777 OPTION_MASK_ISA_MOVDIR64B_UNSET): New defines.
16778 (ix86_handle_option): Handle -mmovdiri and -mmovdir64b.
16779 * config.gcc (movdirintrin.h): New header.
16780 * config/i386/cpuid.h (bit_MOVDIRI,
16781 bit_MOVDIR64B): New bits.
16782 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mmovdiri
16784 * config/i386/i386-builtin-types.def ((VOID, PUNSIGNED, UNSIGNED),
16785 (VOID, PVOID, PCVOID)): New function types.
16786 * config/i386/i386-builtin.def (__builtin_ia32_directstoreu_u32,
16787 __builtin_ia32_directstoreu_u64,
16788 __builtin_ia32_movdir64b): New builtins.
16789 * config/i386/i386-c.c (__MOVDIRI__, __MOVDIR64B__): New.
16790 * config/i386/i386.c (ix86_target_string): Added -mmovdir64b
16792 (ix86_valid_target_attribute_inner_p): Ditto.
16793 (ix86_expand_special_args_builtin): Added VOID_FTYPE_PUNSIGNED_UNSIGNED
16794 and VOID_FTYPE_PUNSIGNED_UNSIGNED.
16795 (ix86_expand_builtin): Expand IX86_BUILTIN_MOVDIR64B.
16796 * config/i386/i386.h (TARGET_MOVDIRI, TARGET_MOVDIRI_P,
16797 TARGET_MOVDIR64B, TARGET_MOVDIR64B_P): New.
16798 * config/i386/i386.md (UNSPECV_MOVDIRI, UNSPECV_MOVDIR64B): New.
16799 (movdiri<mode>, movdir64b_<mode>): New.
16800 * config/i386/i386.opt: Add -mmovdiri and -mmovdir64b.
16801 * config/i386/immintrin.h: Include movdirintrin.h.
16802 * config/i386/movdirintrin.h: New file.
16803 * doc/invoke.texi: Added -mmovdiri and -mmovdir64b.
16805 2018-04-19 Richard Biener <rguenther@suse.de>
16807 PR middle-end/85455
16808 * cfg.c (clear_bb_flags): When loop state says we have
16809 marked irreducible regions also preserve BB_IRREDUCIBLE_LOOP.
16811 2018-04-19 Richard Biener <rguenther@suse.de>
16813 PR tree-optimization/84737
16814 * tree-vect-data-refs.c (vect_copy_ref_info): New function
16815 copying restrict info.
16816 (vect_setup_realignment): Use it.
16817 * tree-vectorizer.h (vect_copy_ref_info): Declare.
16818 * tree-vect-stmts.c (vectorizable_store): Copy ref info from
16819 the first DR to all generated stores.
16820 (vectorizable_load): Likewise for loads.
16822 2018-04-19 Jakub Jelinek <jakub@redhat.com>
16824 PR tree-optimization/85446
16825 * match.pd ((intptr_t) x eq/ne CST to x eq/ne (typeof x) cst): Require
16826 the integral and pointer types to have the same precision.
16828 * doc/install.texi: Document --disable-cet being the default and
16831 2018-04-18 Martin Liska <mliska@suse.cz>
16833 * ipa-devirt.c (odr_subtypes_equivalent_p): Fix GNU coding
16836 2018-04-18 Martin Liska <mliska@suse.cz>
16839 2018-03-02 Eric Botcazou <ebotcazou@adacore.com>
16842 * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
16843 arguments if they are comparable.
16845 2018-04-18 Martin Liska <mliska@suse.cz>
16848 2018-03-13 Eric Botcazou <ebotcazou@adacore.com>
16851 * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
16854 2018-04-18 H.J. Lu <hongjiu.lu@intel.com>
16857 * config/i386/i386.c (ix86_expand_split_stack_prologue): Insert
16858 ENDBR after calling __morestack.
16860 2018-04-18 David Malcolm <dmalcolm@redhat.com>
16863 * configure.ac (gcc-driver-name.h): Honor --with-gcc-major-version
16864 by using gcc_base_ver to generate a gcc_driver_version, and use
16865 it when generating GCC_DRIVER_NAME.
16866 * configure: Regenerate.
16868 2018-04-18 Jakub Jelinek <jakub@redhat.com>
16871 * config.gcc: Obsolete powerpc*-*-*spe*.
16873 2018-04-17 Jakub Jelinek <jakub@redhat.com>
16876 * dbxout.c (dbxout_int): Perform negation in unsigned int type.
16877 (stabstr_D): Change type of unum from unsigned int to
16878 unsigned HOST_WIDE_INT. Perform negation in unsigned HOST_WIDE_INT
16881 2018-04-17 Jim Wilson <jimw@sifive.com>
16884 * config/riscv/riscv.c (riscv_compute_frame_info): Add calls to
16885 RISCV_STACK_ALIGN when using outgoing_args_size and pretend_args_size.
16886 Set arg_pointer_offset after using pretend_args_size.
16888 2018-04-17 Jakub Jelinek <jakub@redhat.com>
16890 PR rtl-optimization/85431
16891 * dse.c (record_store): Ignore zero width stores.
16894 * asan.c (handle_builtin_stack_restore): Adjust comment. Emit
16895 __asan_allocas_unpoison call and last_alloca_addr = new_sp before
16896 __builtin_stack_restore rather than after it.
16897 * builtins.c (expand_asan_emit_allocas_unpoison): Pass
16898 arg1 + (virtual_dynamic_stack_rtx - stack_pointer_rtx) as second
16899 argument instead of virtual_dynamic_stack_rtx.
16901 2018-04-17 Kelvin Nilsen <kelvin@gcc.gnu.org>
16903 * config/rs6000/rs6000-protos.h (rs6000_builtin_is_supported_p):
16905 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
16906 Add note to error message to explain internal mapping of overloaded
16907 built-in function name to non-overloaded built-in function name.
16908 * config/rs6000/rs6000.c (rs6000_builtin_is_supported_p): New
16911 2018-04-17 Michael Meissner <meissner@linux.vnet.ibm.com>
16914 * config/rs6000/rs6000.md (pack<mode>): Do not try handle a pack
16915 where the inputs overlap with the output.
16917 2018-04-17 Jakub Jelinek <jakub@redhat.com>
16919 * config/i386/sse.md (vec_extract_lo_<mode><mask_name>): Add
16920 (=v, v) alternative and explicit "memory" attribute.
16921 (vec_extract_lo_<mode><mask_name>): Likewise. Also add
16922 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
16924 (vec_extract_lo_<mode><mask_name>): Add (=v, v) alternative and use
16925 "sselog1" type instead of "sselog".
16926 (vec_extract_hi_<mode><mask_name>): Use "sselog1" type instead of
16927 "sselog". Remove explicit "memory" attribute.
16928 (vec_extract_lo_v32hi): Add (=v, v) alternative and explicit "memory",
16929 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
16931 (vec_extract_hi_v32hi): Merge all alternatives into one, use
16932 "sselog1" type instead of "sselog". Remove explicit "memory"
16934 (vec_extract_hi_v16hi): Merge each pair of alternatives into one,
16935 use "sselog1" type instead of "sselog". Remove explicit "memory"
16937 (vec_extract_lo_v64qi): Add (=v, v) alternative and explicit "memory",
16938 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
16940 (vec_extract_hi_v64qi): Merge all alternatives into one, use
16941 "sselog1" type instead of "sselog". Remove explicit "memory"
16943 (vec_extract_hi_v32qi): Merge each pair of alternatives into one,
16944 use "sselog1" type instead of "sselog". Remove explicit "memory"
16948 * config/i386/i386.md (*ashlqi3_1_slp): Use alu1 type instead of alu.
16950 PR middle-end/85414
16951 * rtlhooks.c (gen_lowpart_if_possible): Don't call gen_lowpart_SUBREG
16954 2018-04-17 Martin Jambor <mjambor@suse.cz>
16957 * ipa-cp.c (create_specialized_node): Call
16958 expand_all_artificial_thunks if necessary.
16960 2018-04-17 Martin Liska <mliska@suse.cz>
16963 * ipa-devirt.c (odr_types_equivalent_p): Remove trailing
16964 in message, remote space in between '_G' and '('.
16966 2018-04-17 Jakub Jelinek <jakub@redhat.com>
16969 * config/i386/sse.md (reduces<mode><mask_scalar_name>,
16970 avx512f_vmcmp<mode>3<round_saeonly_name>,
16971 avx512f_vmcmp<mode>3_mask<round_saeonly_name>,
16972 avx512f_sgetexp<mode><mask_scalar_name><round_saeonly_scalar_name>,
16973 avx512f_rndscale<mode><round_saeonly_name>,
16974 avx512dq_ranges<mode><mask_scalar_name><round_saeonly_scalar_name>,
16975 avx512f_vgetmant<mode><mask_scalar_name><round_saeonly_scalar_name>):
16976 Use %<iptr>2 instead of %2 for -masm=intel.
16977 (avx512f_vcvtss2usi<round_name>, avx512f_vcvtss2usiq<round_name>,
16978 avx512f_vcvttss2usi<round_saeonly_name>,
16979 avx512f_vcvttss2usiq<round_saeonly_name>): Use %k1 instead of %1 for
16981 (avx512f_vcvtsd2usi<round_name>, avx512f_vcvtsd2usiq<round_name>,
16982 avx512f_vcvttsd2usi<round_saeonly_name>,
16983 avx512f_vcvttsd2usiq<round_saeonly_name>, ufloatv2siv2df2<mask_name>):
16984 Use %q1 instead of %1 for -masm=intel.
16985 (avx512f_sfixupimm<mode><sd_maskz_name><round_saeonly_name>,
16986 avx512f_sfixupimm<mode>_mask<round_saeonly_name>): Use %<iptr>3 instead
16987 of %3 for -masm=intel.
16988 (sse2_shufpd_v2df_mask): Fix a typo, change %{6%} to %{%6%} for
16990 (*avx512vl_<code>v2div2qi2_store): Use %w0 instead of %0 for
16992 (*avx512vl_<code><mode>v4qi2_store): Use %k0 instead of %0 for
16994 (avx512vl_<code><mode>v4qi2_mask_store): Use a single pattern with
16995 %k0 and %1 for -masm=intel rather than two patterns, one with %0 and
16997 (*avx512vl_<code><mode>v8qi2_store): Use %q0 instead of %0 for
16999 (avx512vl_<code><mode>v8qi2_mask_store): Use a single pattern with
17000 %q0 and %1 for -masm=intel rather than two patterns, one with %0 and
17001 %g1 and one with %0 and %1.
17002 (avx512er_vmrcp28<mode><round_saeonly_name>,
17003 avx512er_vmrsqrt28<mode><round_saeonly_name>): Use %<iptr>1 instead of
17004 %1 for -masm=intel.
17005 (avx5124fmaddps_4fmaddps_mask, avx5124fmaddps_4fmaddss_mask,
17006 avx5124fmaddps_4fnmaddps_mask, avx5124fmaddps_4fnmaddss_mask,
17007 avx5124vnniw_vp4dpwssd_mask, avx5124vnniw_vp4dpwssds_mask): Swap order
17008 of %0 and %{%4%} for -masm=intel.
17009 (avx5124fmaddps_4fmaddps_maskz, avx5124fmaddps_4fmaddss_maskz,
17010 avx5124fmaddps_4fnmaddps_maskz, avx5124fmaddps_4fnmaddss_maskz,
17011 avx5124vnniw_vp4dpwssd_maskz, avx5124vnniw_vp4dpwssds_maskz): Swap
17012 order of %0 and %{%5%}%{z%} for -masm=intel.
17014 2018-04-17 Jan Hubicka <jh@suse.cz>
17017 * ipa-devirt.c (odr_types_equivalent_p): Handle bit fields.
17019 2018-04-17 Martin Liska <mliska@suse.cz>
17022 * multiple_target.c (create_dispatcher_calls): Set apostrophes
17023 for target_clone error message. Make default implementation
17024 clone to be a local declaration.
17025 (separate_attrs): Add new argument and check for an empty
17027 (expand_target_clones): Handle it.
17028 (ipa_target_clone): Make redirection just for target_clones
17031 2018-04-16 Cesar Philippidis <cesar@codesourcery.com>
17032 Tom de Vries <tom@codesourcery.com>
17034 PR middle-end/84955
17035 * omp-expand.c (expand_oacc_for): Add dummy false branch for
17036 tiled basic blocks without omp continue statements.
17038 2018-04-16 Aaron Sawdey <acsawdey@linux.ibm.com>
17041 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Mark
17042 vec_extract expression as having side effects to make sure it gets
17045 2018-04-16 H.J. Lu <hongjiu.lu@intel.com>
17048 * config/i386/i386.c (get_builtin_code_for_version): Check
17051 2018-04-16 Olga Makhotina <olga.makhotina@intel.com>
17054 * config.gcc: Support "skylake".
17055 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
17057 * config/i386/i386.c (m_SKYLAKE): Define.
17058 (processor_target_table): Add "skylake".
17059 (ix86_option_override_internal): Add "skylake".
17060 (get_builtin_code_for_version): Handle PROCESSOR_SKYLAKE,
17061 PROCESSOR_CANNONLAKE.
17062 (get_builtin_code_for_version): Fix priority for
17063 PROCESSOR_ICELAKE_CLIENT, PROCESSOR_ICELAKE_SERVER,
17064 PROCESSOR_SKYLAKE-AVX512.
17065 * config/i386/i386.h (processor_costs): Define TARGET_SKYLAKE.
17066 (processor_type): Add PROCESSOR_SKYLAKE.
17068 2018-04-16 Paolo Carlini <paolo.carlini@oracle.com>
17069 Jason Merrill <jason@redhat.com>
17072 * convert.c (convert_to_integer_1): Use direct recursion for
17073 enumeral types and types with a precision less than the number
17074 of bits in their mode.
17076 2018-04-16 Julia Koval <julia.koval@intel.com>
17079 * config/i386/x86-tune.def (X86_TUNE_SSE_UNALIGNED_LOAD_OPTIMAL,
17080 X86_TUNE_SSE_UNALIGNED_STORE_OPTIMAL): Add m_SKYLAKE_AVX512
17082 2018-04-14 Segher Boessenkool <segher@kernel.crashing.org>
17085 * config/rs6000/rs6000.opt (mdirect-move): Make deprecated.
17086 * doc/invoke.texi (RS/6000 and PowerPC Options): Remove -mdirect-move
17087 and -mno-direct-move.
17089 2018-04-13 Paul A. Clarke <pc@us.ibm.com>
17092 * config/rs6000/emmintrin.h (_mm_slli_epi{16,32,64}):
17093 Ensure that vec_splat_s32 is only called with 0 <= shift < 16.
17094 Ensure negative shifts result in {0}.
17096 2018-04-13 Vladimir Makarov <vmakarov@redhat.com>
17098 PR rtl-optimization/79916
17099 * config/rs6000/rs6000.c (rs6000_emit_move): Use assigned hard
17100 regs (if any) to define how to gnerate SD moves when LRA is in
17103 2018-04-13 Jakub Jelinek <jakub@redhat.com>
17105 PR rtl-optimization/85393
17106 * except.h (expand_dw2_landing_pad_for_region): Remove declaration.
17107 * except.c (expand_dw2_landing_pad_for_region): Make static.
17108 * bb-reorder.c (fix_up_crossing_landing_pad): In new_bb emit just
17109 a label and unconditional jump to old_bb, rather than
17110 expand_dw2_landing_pad_for_region insn(s) and jump to single_succ
17113 PR rtl-optimization/85376
17114 * simplify-rtx.c (simplify_const_unary_operation): For CLZ and CTZ and
17115 zero op0, if C?Z_DEFINED_VALUE_AT_ZERO is false, return NULL_RTX
17116 instead of a specific value.
17118 2018-04-13 Jan Hubicka <hubicka@ucw.cz>
17119 Bin Cheng <bin.cheng@arm.com>
17121 PR tree-optimization/82965
17122 PR tree-optimization/83991
17123 * cfgloopanal.c (expected_loop_iterations_unbounded): Add
17124 by_profile_only parameter.
17125 * cfgloopmanip.c (scale_loop_profile): Further scale loop's profile
17126 information if the loop was predicted to iterate too many times.
17127 * cfgloop.h (expected_loop_iterations_unbounded): Update prototype
17129 2018-04-13 Jan Hubicka <hubicka@ucw.cz>
17132 * config/i386/i386.c (ix86_can_inline_p): Allow safe transitions for
17135 2018-04-13 Martin Liska <mliska@suse.cz>
17136 Jakub Jelinek <jakub@redhat.com>
17138 PR middle-end/81657
17139 * expr.h (enum block_op_methods): Add BLOCK_OP_NO_LIBCALL_RET.
17140 * expr.c (emit_block_move_hints): Handle BLOCK_OP_NO_LIBCALL_RET.
17141 * builtins.c (expand_builtin_memory_copy_args): Use
17142 BLOCK_OP_NO_LIBCALL_RET method for mempcpy with non-ignored target,
17143 handle dest_addr == pc_rtx.
17145 2018-04-12 Segher Boessenkool <segher@kernel.crashing.org>
17148 * config/rs6000/rs6000.md (fix_trunc<mode>si2): Use legacy code if
17149 asked to not generate direct moves.
17150 (fix_trunc<mode>si2_stfiwx): Similar.
17151 (fix_trunc<mode>si2_internal): Similar.
17153 2018-04-12 Jakub Jelinek <jakub@redhat.com>
17156 * var-tracking.c (add_stores): Handle STRICT_LOW_PART SET_DEST.
17157 * cselib.c (cselib_record_sets): For STRICT_LOW_PART dest,
17158 lookup if dest in some wider mode is known to be const0_rtx and
17159 if so, record permanent equivalence for it to be ZERO_EXTEND of
17160 the narrower mode destination.
17162 2018-04-12 Cesar Philippidis <cesar@codesourcery.com>
17164 * lto-streamer-out.c (output_function): Revert 259346.
17165 * omp-expand.c (expand_oacc_for): Likewise.
17167 2018-04-12 Alexander Monakov <amonakov@ispras.ru>
17169 PR rtl-optimization/85354
17170 * sel-sched-ir.c (sel_init_pipelining): Move cfg_cleanup call...
17171 * sel-sched.c (sel_global_init): ... here.
17173 2018-04-12 Eric Botcazou <ebotcazou@adacore.com>
17176 * lto-wrapper.c (debug_objcopy): Open the files in binary mode.
17177 * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
17178 mode for PE-COFF targets.
17179 * config/i386/i386-protos.h (i386_pe_asm_lto_start): Declare.
17180 (i386_pe_asm_lto_end): Likewise.
17181 * config/i386/cygming.h (TARGET_ASM_LTO_START): Define.
17182 (TARGET_ASM_LTO_END): Likewise.
17183 * config/i386/winnt.c (saved_debug_info_level): New static variable.
17184 (i386_pe_asm_lto_start): New function.
17185 (i386_pe_asm_lto_end): Likewise.
17187 2018-04-12 Cesar Philippidis <cesar@codesourcery.com>
17188 Richard Biener <rguenther@suse.de>
17190 PR middle-end/84955
17191 * lto-streamer-out.c (output_function): Fix CFG loop state before
17193 * omp-expand.c (expand_oacc_for): Handle calls to internal
17194 functions like regular functions.
17196 2018-04-12 Richard Biener <rguenther@suse.de>
17199 * dwarf2out.c (init_sections_and_labels): Use debug_line_section[_label]
17200 for the early LTO debug to properly generate references to it
17201 during DIE emission. Do not re-use that for the skeleton for
17203 (dwarf2out_early_finish): Likewise.
17205 2018-04-12 Jakub Jelinek <jakub@redhat.com>
17208 * config/i386/sse.md
17209 (<mask_codefor>avx512dq_vextract<shuffletype>64x2_1<mask_name> split,
17210 <mask_codefor>avx512f_vextract<shuffletype>32x4_1<mask_name> split,
17211 vec_extract_lo_<mode><mask_name> split, vec_extract_lo_v32hi,
17212 vec_extract_lo_v64qi): For non-AVX512VL if input is xmm16+ reg
17213 and output is a reg, avoid creating invalid lowpart subreg, but
17214 instead split into a 512-bit move. Don't split if not AVX512VL,
17215 input is xmm16+ reg and output is a mem.
17216 (vec_extract_lo_<mode><mask_name>, vec_extract_lo_v32hi,
17217 vec_extract_lo_v64qi): Don't require split if not AVX512VL, input is
17218 xmm16+ reg and output is a mem.
17220 2018-04-12 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
17222 * config/s390/s390.c (s390_output_indirect_thunk_function): Check
17223 also for flag_dwarf2_cfi_asm.
17225 2018-04-12 Jakub Jelinek <jakub@redhat.com>
17227 PR rtl-optimization/85342
17228 * regcprop.c (copyprop_hardreg_forward_1): Remove replaced array, use
17229 a bool scalar var inside of the loop instead. Don't try to update
17230 recog_data.operand after failed apply_change_group.
17232 2018-04-12 Tom de Vries <tom@codesourcery.com>
17235 * config/nvptx/nvptx.c (flexible_array_member_type_p): New function.
17236 (nvptx_assemble_decl_begin): Add undefined param. Declare undefined
17237 array with flexible array member as array without given dimension.
17238 (nvptx_assemble_undefined_decl): Set nvptx_assemble_decl_begin call
17239 argument for undefined param to true.
17241 2018-04-11 Aaron Sawdey <acsawdey@linux.ibm.com>
17244 * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
17245 -mcall- and -mtraceback=. Remove options -mabi=spe and -mabi=no-spe
17246 from PowerPC section.
17247 * config/rs6000/sysv4.opt (mcall-): Improve help text.
17248 * config/rs6000/rs6000.opt (mblock-compare-inline-limit=): Trim
17249 help text that is too long.
17250 * config/rs6000/rs6000.opt (mblock-compare-inline-loop-limit=): Trim
17251 help text that is too long.
17252 * config/rs6000/rs6000.opt (mstring-compare-inline-limit=): Trim
17253 help text that is too long.
17255 2018-04-11 Uros Bizjak <ubizjak@gmail.com>
17257 * config/alpha/alpha.md (stack_probe_internal): Rename
17258 from "probe_stack". Update all callers.
17260 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
17262 PR rtl-optimization/84566
17263 * sched-deps.c (sched_analyze_insn): Check deps->readonly when invoking
17264 sched_macro_fuse_insns.
17266 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
17269 * sched-rgn.c (add_branch_dependences): Move sel_sched_p check here...
17270 (compute_block_dependences): ... from here.
17272 2018-04-11 Jakub Jelinek <jakub@redhat.com>
17274 PR tree-optimization/85331
17275 * vec-perm-indices.h (vec_perm_indices::clamp): Change input type
17276 from int to HOST_WIDE_INT.
17278 2018-04-11 Martin Jambor <mjambor@suse.cz>
17281 * ipa-cp.c (propagate_vals_across_pass_through): Expand comment.
17282 (cgraph_edge_brings_value_p): New parameter dest_val, check if it is
17283 not the same as the source val.
17284 (cgraph_edge_brings_value_p): New parameter.
17285 (gather_edges_for_value): Pass destination value to
17286 cgraph_edge_brings_value_p.
17287 (perhaps_add_new_callers): Likewise.
17288 (get_info_about_necessary_edges): Likewise and exclude values brought
17289 only by self-recursive edges.
17290 (create_specialized_node): Redirect only clones of self-calling edges.
17291 (+self_recursive_pass_through_p): New function.
17292 (find_more_scalar_values_for_callers_subset): Use it.
17293 (find_aggregate_values_for_callers_subset): Likewise.
17294 (known_aggs_to_agg_replacement_list): Removed.
17295 (decide_whether_version_node): Re-calculate known constants for all
17296 remaining context clones.
17298 2018-04-11 Richard Biener <rguenther@suse.de>
17301 * dwarf2out.c (dwarf2out_finish): Remove DW_AT_stmt_list attribute
17302 from early DWARF output.
17303 (dwarf2out_early_finish): Output line info unconditionally into
17304 early DWARF and add reference to it.
17306 2018-04-11 Jakub Jelinek <jakub@redhat.com>
17309 * config/i386/sse.md (iptr): Add V16SFmode and V8DFmode cases.
17310 (<avx512>_vec_dup<mode><mask_name>): Use a single pattern for modes
17311 other than V2DFmode using iptr mode attribute.
17312 (<avx512>_vec_dup<mode><mask_name>): Use iptr mode attribute.
17314 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
17316 PR rtl-optimization/84659
17317 * sel-sched-ir.c (sel_init_pipelining): Invoke cleanup_cfg.
17319 2018-04-11 Jakub Jelinek <jakub@redhat.com>
17322 * dwarf2out.c (skip_loc_list_entry): Don't call size_of_locs if
17324 (output_loc_list): Pass address of a dummy size variable even in the
17325 locview handling loop.
17326 (index_location_lists): Add comment on why skip_loc_list_entry can't
17329 2018-04-11 Thomas Preud'homme <thomas.preudhomme@arm.com>
17332 * config/arm/arm-builtins.c (arm_expand_builtin): Force input operand
17335 2018-04-10 Aaron Sawdey <acsawdey@linux.ibm.com>
17338 * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
17339 -mblock-compare-inline-limit, -mblock-compare-inline-loop-limit,
17340 and -mstring-compare-inline-limit.
17342 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
17345 * config/rs6000/rs6000.md (allocate_stack): Put the residual size
17346 for stack clash protection in a register whenever we need it to be in
17349 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
17351 * common/config/rs6000/rs6000-common.c (rs6000_option_init_struct):
17352 Enable -fasynchronous-unwind-tables by default if OBJECT_FORMAT_ELF.
17354 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
17357 * config/rs6000/rs6000.opt (mtraceback=): Show the allowed values in
17359 (mlong-double-): Ditto.
17360 * config/rs6000/sysv4.opt (msdata=): Ditto.
17361 (mtls-size=): Ditto.
17363 2018-04-10 Kelvin Nilsen <kelvin@gcc.gnu.org>
17365 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
17366 erroneous entries for
17367 "vector int vec_ldl (int, long int *)", and
17368 "vector unsigned int vec_ldl (int, unsigned long int *)".
17369 Add comments and entries for
17370 "vector bool char vec_ldl (int, bool char *)",
17371 "vector bool short vec_ldl (int, bool short *)",
17372 "vector bool int vec_ldl (int, bool int *)",
17373 "vector bool long long vec_ldl (int, bool long long *)",
17374 "vector pixel vec_ldl (int, pixel *)",
17375 "vector long long vec_ldl (int, long long *)",
17376 "vector unsigned long long vec_ldl (int, unsigned long long *)".
17377 * config/rs6000/rs6000.c (rs6000_init_builtins): Initialize new
17378 type tree bool_long_long_type_node and correct definition of
17379 bool_V2DI_type_node to make reference to this new type tree.
17380 (rs6000_mangle_type): Replace erroneous reference to
17381 bool_long_type_node with bool_long_long_type_node.
17382 * config/rs6000/rs6000.h (enum rs6000_builtin_type_index): Add
17383 comments to emphasize sign distinctions for char and int types and
17384 replace RS6000_BTI_bool_long constant with
17385 RS6000_BTI_bool_long_long constant. Also add comment to restrict
17386 use of RS6000_BTI_pixel.
17387 (bool_long_type_node): Remove this macro definition.
17388 (bool_long_long_type_node): New macro definition
17390 2018-04-10 Jakub Jelinek <jakub@redhat.com>
17392 PR rtl-optimization/85300
17393 * combine.c (subst): Handle subst of CONST_SCALAR_INT_P new_rtx also
17394 into FLOAT and UNSIGNED_FLOAT like ZERO_EXTEND, return a CLOBBER if
17395 simplify_unary_operation fails.
17397 2018-04-10 Martin Liska <mliska@suse.cz>
17399 * gdbhooks.py: Add pretty-printers for varpool_node, symtab_node,
17400 cgraph_edge and ipa_ref.
17402 2018-04-10 Jakub Jelinek <jakub@redhat.com>
17406 * config/i386/sse.md
17407 (<extract_type>_vinsert<shuffletype><extract_suf>_mask): Fix
17408 computation of the VEC_MERGE selector from mask.
17409 (<extract_type>_vinsert<shuffletype><extract_suf>_1<mask_name>):
17410 Fix decoding of the VEC_MERGE selector into mask.
17412 2018-04-10 Richard Sandiford <richard.sandiford@linaro.org>
17414 PR tree-optimization/85286
17415 * tree-vect-data-refs.c (vect_get_smallest_scalar_type):
17417 2018-04-10 Richard Sandiford <richard.sandiford@linaro.org>
17419 * final.c (final_1): Set insn_last_address as well as
17420 insn_current_address.
17422 2018-04-10 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
17425 * explow.c (emit_stack_probe): Call validize_mem on memory location
17426 before passing it to gen_probe_stack. Create address operand and
17427 legitimize it for the probe_stack_address case.
17429 2018-04-09 Jan Hubicka <jh@suse.cz>
17432 * ipa-devirt.c (rebuild_type_inheritance-hash): New.
17433 * ipa-utils.h (rebuild_type_inheritance-hash): Declare.
17434 * tree.c (free_lang_data_in_type): Fix handling of binfos;
17436 (free_lang_data): Rebuild type inheritance graph.
17438 2018-04-09 Martin Sebor <msebor@redhat.com>
17440 * invoke.texi (-finline-small-functions): Mention other optimization
17442 (-findirect-inlining, -fpartial-inlining): Same.
17443 (-finline-functions-called-once): Same.
17444 (-freorder-blocks-and-partition): Same.
17446 2018-04-09 Jan Hubicka <jh@suse.cz>
17449 * cfgcleanup.c (try_forward_edges): Do not give up on crossing
17450 jumps; choose last target that matches the criteria (i.e.
17451 no partition changes for non-crossing jumps).
17452 * cfgrtl.c (cfg_layout_redirect_edge_and_branch): Add basic
17453 support for redirecting crossing jumps to non-crossing.
17455 2018-04-09 Alexey Brodkin <abrodkin@synopsys.com>
17457 * config/arc/arc.c (arc_expand_prologue): Set stack usage info
17458 also for naked functions.
17460 2018-04-09 Claudiu Zissulescu <claziss@synopsys.com>
17462 * config/arc/arc.md (add_shift): New pattern.
17463 (add_shift2): Likewise.
17464 (sub_shift): Likewise.
17465 (sub_shift_cmp0_noout): Likewise.
17466 (compare_si_ashiftsi): Likewise.
17467 (xbfu_cmp0_noout): New combine pattern.
17468 (xbfu_cmp0"): Likewise.
17469 (movsi_set_cc_insn): Place the predicable variant first.
17470 (commutative_binary_cmp0_noout): Remove clobber.
17471 (commutative_binary_cmp0): New pattern.
17472 (noncommutative_binary_cmp0): Likewise.
17473 (noncommutative_binary_cmp0_noout): Likewise.
17474 (noncommutative_binary_comparison_result_used): Removed.
17475 (rsub_cmp0): New pattern.
17476 (rsub_cmp0_noout): Likewise.
17477 (extzvsi): Changed, keep only meaningful variants.
17478 (SQH, SEZ): New iterators.
17479 (SQH_postfix): New mode attribute.
17480 (SEZ_prefix): New code attribute.
17481 (<SEZ_prefix>xt<SQH_postfix>_cmp0_noout): New instruction pattern.
17482 (<SEZ_prefix>xt<SQH_postfix>_cmp0): Likewise.
17483 * config/arc/predicates.md (cc_set_register): Use CC_REG instead
17484 of numerical value.
17485 (noncommutative_operator): Check the availability of barrel
17488 2018-04-09 Richard Biener <rguenther@suse.de>
17490 PR tree-optimization/85284
17491 * tree-ssa-loop-niter.c (number_of_iterations_exit_assumptions):
17492 Only use the niter constraining form of simple_iv when the exit
17493 is always executed.
17495 2018-04-09 Tom de Vries <tom@codesourcery.com>
17498 * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
17499 (define_expand "*memory_barrier"): New define_expand.
17500 (define_insn "memory_barrier"): New insn.
17502 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
17504 PR rtl-optimization/80463
17505 PR rtl-optimization/83972
17506 PR rtl-optimization/83480
17508 * sel-sched-ir.c (has_dependence_note_mem_dep): Take into account the
17509 correct producer for the insn.
17510 (tidy_control_flow): Fixup seqnos in case of debug insns.
17512 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
17514 PR rtl-optimization/83913
17516 * sel-sched-ir.c (merge_expr_data): Choose the middle between two
17517 different sched-times when merging exprs.
17519 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
17521 PR rtl-optimization/83962
17523 * sel-sched-ir.c (tidy_control_flow): Correct the order in which we call
17524 tidy_fallthru_edge and tidy_control_flow.
17526 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
17528 PR rtl-optimization/83530
17530 * sel-sched.c (force_next_insn): New global variable.
17531 (remove_insn_for_debug): When force_next_insn is true, also leave only
17532 next insn in the ready list.
17533 (sel_sched_region): When the region wasn't scheduled, make another pass
17534 over it with force_next_insn set to 1.
17536 2018-04-08 Monk Chiang <sh.chiang04@gmail.com>
17538 * config.gcc (nds32le-*-*, nds32be-*-*): Add nds32/nds32_intrinsic.h
17540 * config/nds32/constants.md (unspec_volatile_element): Add enum values
17541 for interrupt control.
17542 * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
17543 functions for interrupt control.
17544 * config/nds32/nds32-intrinsic.md: Likewise.
17545 * config/nds32/nds32_intrinsic.h: Likewise.
17546 * config/nds32/nds32.h (nds32_builtins): Likewise.
17548 2018-04-08 Chung-Ju Wu <jasonwucj@gmail.com>
17550 * config/nds32/nds32.c (nds32_init_machine_status,
17551 nds32_legitimate_index_p, nds32_legitimate_address_p): Consider
17552 strict_aligned_p field.
17553 (nds32_expand_to_rtl_hook): New function.
17554 (TARGET_EXPAND_TO_RTL_HOOK): Define.
17555 * config/nds32/nds32.h (machine_function): Add strict_aligned_p field.
17557 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
17558 Chung-Ju Wu <jasonwucj@gmail.com>
17560 * config.gcc (nds32*-*-*): Check that n7 is valid to --with-cpu.
17561 * config/nds32/nds32-n7.md: New file.
17562 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N7.
17563 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n7
17565 * config/nds32/nds32-protos.h: More declarations for n7 pipeline.
17566 * config/nds32/nds32.md (pipeline_model): Add n7.
17567 * config/nds32/nds32.opt (mcpu): Support n7 pipeline cpus.
17568 * config/nds32/pipelines.md: Include n7 settings.
17570 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
17571 Chung-Ju Wu <jasonwucj@gmail.com>
17573 * config.gcc (nds32*-*-*): Check that e8 is valid to --with-cpu.
17574 * config/nds32/nds32-e8.md: New file.
17575 * config/nds32/nds32-opts.h (nds32-cpu_type): Add CPU_E8.
17576 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for e8
17578 * config/nds32/nds32-protos.h: More declarations for e8 pipeline.
17579 * config/nds32/nds32.md (pipeline_model): Add e8.
17580 * config/nds32/nds32.opt (mcpu): Support e8 pipeline cpus.
17581 * config/nds32/pipelines.md: Include e8 settings.
17583 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
17584 Chung-Ju Wu <jasonwucj@gmail.com>
17586 * config.gcc (nds32*-*-*): Check that n6/n8/s8 are valid to --with-cpu.
17587 * config/nds32/nds32-n8.md: New file.
17588 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N6 and CPU_N8.
17589 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n8
17591 * config/nds32/nds32-protos.h: More declarations for n8 pipeline.
17592 * config/nds32/nds32-utils.c: More implementations for n8 pipeline.
17593 * config/nds32/nds32.md (pipeline_model): Add n8.
17594 * config/nds32/nds32.opt (mcpu): Support n8 pipeline cpus.
17595 * config/nds32/pipelines.md: Include n8 settings.
17597 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
17598 Chung-Ju Wu <jasonwucj@gmail.com>
17600 * config.gcc (nds32*): Add nds32-utils.o into extra_objs.
17601 * config/nds32/nds32-n9-2r1w.md: New file.
17602 * config/nds32/nds32-n9-3r2w.md: New file.
17603 * config/nds32/nds32-opts.h (nds32_cpu_type, nds32_mul_type,
17604 nds32_register_ports): New or modify for cpu n9.
17605 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n9
17607 * config/nds32/nds32-protos.h: More declarations for n9 pipeline.
17608 * config/nds32/nds32-utils.c: New file.
17609 * config/nds32/nds32.h (TARGET_PIPELINE_N9, TARGET_PIPELINE_SIMPLE,
17610 TARGET_MUL_SLOW): Define.
17611 * config/nds32/nds32.md (pipeline_model): New attribute.
17612 * config/nds32/nds32.opt (mcpu, mconfig-mul, mconfig-register-ports):
17613 New options that support cpu n9.
17614 * config/nds32/pipelines.md: Include n9 settings.
17615 * config/nds32/t-nds32 (nds32-utils.o): Add dependency.
17617 2018-04-08 Chung-Ju Wu <jasonwucj@gmail.com>
17619 * config/nds32/nds32-md-auxiliary.c (output_cond_branch): Output align
17620 information if necessary.
17621 (output_cond_branch_compare_zero): Likewise.
17622 * config/nds32/nds32.c (nds32_adjust_insn_length): Consider align case.
17623 (nds32_target_alignment): Refine for alignment.
17624 * config/nds32/nds32.h (NDS32_ALIGN_P): Define.
17625 (FUNCTION_BOUNDARY): Modify.
17626 * config/nds32/nds32.md (call_internal, call_value_internal): Consider
17628 * config/nds32/nds32.opt (malways-align, malign-functions): New.
17630 2018-04-08 Monk Chiang <sh.chiang04@gmail.com>
17632 * config/nds32/constants.md (unspec_volatile_element): Add values for
17633 TLB operation and data prefetch.
17634 * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
17635 functions for TLB operation and data prefetch.
17636 * config/nds32/nds32-intrinsic.md: Likewise.
17637 * config/nds32/nds32_intrinsic.h: Likewise.
17638 * config/nds32/nds32.c (nds32_dpref_names): Likewise.
17639 (nds32_print_operand): Likewise.
17640 * config/nds32/nds32.h (nds32_builtins): Likewise.
17642 2018-04-07 Thomas Koenig <tkoenig@gcc.gnu.org>
17643 Andrew Pinski <pinsika@gcc.gnu.org>
17645 PR middle-end/82976
17646 * match.pd: Use constant_boolean_node of correct type instead of
17647 boolean_true_node or boolean_false_node for simplifying
17648 pointer comparisons to zero.
17650 2018-04-07 Jakub Jelinek <jakub@redhat.com>
17652 PR tree-optimization/80021
17653 * tree.c (verify_type_variant): Make error call in verify_variant_match
17654 translatable and remove final full stop.
17656 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
17658 * config/nds32/constants.md (unspec_volatile_element): Add
17659 UNSPEC_VOLATILE_EH_RETURN.
17660 * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push,
17661 nds32_output_stack_pop): Support dwarf exception handling process.
17662 * config/nds32/nds32-protos.h (nds32_dynamic_chain_address): Declare.
17663 * config/nds32/nds32.c (nds32_init_machine_status): Support dwarf
17664 exception handling process.
17665 (nds32_compute_stack_frame): Likewise.
17666 (nds32_return_addr_rtx): Likewise.
17667 (nds32_initial_elimination_offset): Likewise.
17668 (nds32_expand_prologue): Likewise.
17669 (nds32_expand_epilogue): Likewise.
17670 (nds32_dynamic_chain_address): New function.
17671 * config/nds32/nds32.h (machine_function): Add fields for dwarf
17672 exception handling.
17673 (DYNAMIC_CHAIN_ADDRESS): Define.
17674 (EH_RETURN_DATA_REGNO): Define.
17675 (EH_RETURN_STACKADJ_RTX): Define.
17676 * config/nds32/nds32.md (eh_return, nds32_eh_return): Implement
17677 patterns for dwarf exception handling.
17679 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
17681 * config/nds32/nds32.h: Clean up obsolete macros.
17683 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
17685 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
17686 Add enum values for particular instructions.
17687 * config/nds32/nds32-intrinsic.c: Implementation of expanding
17688 particular intrinsic functions.
17689 * config/nds32/nds32-intrinsic.md: Likewise.
17690 * config/nds32/nds32_intrinsic.h: Likewise.
17691 * config/nds32/nds32.h (nds32_builtins): Likewise.
17692 * config/nds32/nds32.md (type): Add pbsad and pbsada.
17693 (btst, ave): New patterns for particular instructions.
17695 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
17697 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
17698 Add enum values for atomic load/store and memory sync.
17699 * config/nds32/nds32-intrinsic.c: Implementation for atomic load/store
17701 * config/nds32/nds32-intrinsic.md: Likewise.
17702 * config/nds32/nds32_intrinsic.h: Likewise.
17703 * config/nds32/nds32.h (nds32_builtins): Likewise.
17705 2018-04-07 Jakub Jelinek <jakub@redhat.com>
17707 PR tree-optimization/85257
17708 * fold-const.c (native_encode_vector): If not all elts could fit
17709 and off is -1, return 0 rather than offset.
17710 * tree-ssa-sccvn.c (vn_reference_lookup_3): Pass
17711 (offseti - offset2) / BITS_PER_UNIT as 4th argument to
17712 native_encode_expr. Verify len * BITS_PER_UNIT >= maxsizei. Don't
17713 adjust buffer in native_interpret_expr call.
17715 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
17717 * config/nds32/constants.md (unspec_volatile_element): Add cache
17718 control enum values.
17719 * config/nds32/nds32-intrinsic.c: Add cache control expand functions.
17720 * config/nds32/nds32-intrinsic.md: Add cache control patterns.
17721 * config/nds32/nds32.c (nds32_cctl_names): New.
17722 (nds32_print_operand): Handle cache control register names.
17723 * config/nds32/nds32.h (nds32_builtins): New enum values.
17724 * config/nds32/nds32_intrinsic.h: Add cache control enum types and
17726 * config/nds32/nds32.md (type): Add mmu.
17727 * config/nds32/pipelines.md (simple_insn): Add mmu.
17729 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
17731 * config/nds32/nds32.md (type): Remove call.
17732 * config/nds32/pipelines.md (simple_insn): Likewise.
17734 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
17736 * config/nds32/constants.md (unspec_volatile_element): Add
17737 UNSPEC_VOLATILE_FMFCSR, UNSPEC_VOLATILE_FMTCSR and
17738 UNSPEC_VOLATILE_FMFCFG.
17739 * config/nds32/nds32-intrinsic.c (bdesc_noarg): New builtin
17740 description for fmfcfg and fmfcsr.
17741 (bdesc_1arg): Add fmtcsr.
17742 (bdesc_2arg): Add fcpynss, fcpyss, fcpynsd and fcpysd.
17743 (nds32_expand_builtin_impl): Deal with FPU intrinsic functions.
17744 * config/nds32/nds32-intrinsic.md (unspec_fcpynsd, unspec_fcpysd,
17745 unspec_fcpynss, unspec_fcpysd, unspec_fcpyss, unspec_fmfcsr,
17746 unspec_fmfcfg): New patterns.
17747 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FMFCFG,
17748 NDS32_BUILTIN_FMFCSR, NDS32_BUILTIN_FMTCSR, NDS32_BUILTIN_FCPYNSS,
17749 NDS32_BUILTIN_FCPYSS,NDS32_BUILTIN_FCPYNSD and NDS32_BUILTIN_FCPYSD.
17750 * config/nds32/nds32_intrinsic.h (__nds32__fcpynsd, __nds32__fcpynss,
17751 __nds32__fcpysd, __nds32__fcpyss, __nds32__fmfcsr, __nds32__fmtcsr,
17752 __nds32__fmfcfg): Define.
17754 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
17756 * config/nds32/nds32.c (nds32_intrinsic_register_names): Add more
17757 intrinsic register names.
17758 * config/nds32/nds32_intrinsic.h (nds32_intrinsic_registers): Add more
17759 intrinsic register enum values and macros.
17761 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
17763 * config/nds32/nds32.c (nds32_legitimate_index_p): Modify condition
17764 for load/store addressing form.
17765 (nds32_print_operand_address): Likewise.
17767 2018-04-06 Eric Botcazou <ebotcazou@adacore.com>
17770 * config/sparc/sparc.c (sparc_expand_move): Deal with symbolic operands
17771 based on LABEL_REF. Remove useless assertion.
17772 (pic_address_needs_scratch): Fix formatting.
17773 (sparc_legitimize_pic_address): Minor tweaks.
17774 (sparc_delegitimize_address): Adjust assertion accordingly.
17775 * config/sparc/sparc.md (movsi_pic_label_ref): Change label_ref_operand
17776 into symbolic_operand.
17777 (movsi_high_pic_label_ref): Likewise.
17778 (movsi_lo_sum_pic_label_ref): Likewise.
17779 (movdi_pic_label_ref): Likewise.
17780 (movdi_high_pic_label_ref): Likewise.
17781 (movdi_lo_sum_pic_label_ref): Likewise.
17783 2018-04-06 Amaan Cheval <amaan.cheval@gmail.com>
17785 * config.gcc (x86_64-*-rtems*): Add rtems.h to tm_file for
17786 custom LIB_SPEC setup.
17788 2018-04-06 Ruslan Bukin <br@bsdpad.com>
17789 Kito Cheng <kito.cheng@gmail.com>
17791 * config.gcc (riscv*-*-freebsd*): Add RISC-V FreeBSD support.
17792 * config/riscv/freebsd.h: New.
17794 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
17796 * config/nds32/nds32.c (nds32_adjust_insn_length): Refine.
17797 * config/nds32/nds32.h (ADJUST_INSN_LENGTH): Change the location in
17800 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
17801 Kito Cheng <kito.cheng@gmail.com>
17803 * config/nds32/nds32-md-auxiliary.c (nds32_output_return,
17804 nds32_output_call, nds32_symbol_binds_local_p): New functions.
17805 * config/nds32/nds32-protos.h (nds32_output_call,
17806 nds32_output_return): Declare.
17807 * config/nds32/nds32.md: Refine all the call and return patterns.
17809 2018-04-06 Jakub Jelinek <jakub@redhat.com>
17812 * dwarf2out.c (rtl_for_decl_init): For STRING_CST initializer only
17813 build CONST_STRING if TYPE_MAX_VALUE is non-NULL and is INTEGER_CST.
17815 PR rtl-optimization/84872
17816 * cfgloopmanip.c (create_preheader): Use make_forwarder_block even if
17817 nentry == 1 when CP_FALLTHRU_PREHEADERS and single_entry is
17818 EDGE_CROSSING edge.
17820 2018-04-06 Tamar Christina <tamar.christina@arm.com>
17822 * expr.c (copy_blkmode_to_reg): Revert 254862.
17823 * doc/sourcebuild.texi (word_mode_no_slow_unalign): Likewise.
17825 2018-04-06 Richard Biener <rguenther@suse.de>
17827 PR middle-end/85244
17828 * tree-dfa.c (get_ref_base_and_extent): Reset seen_variable_array_ref
17829 after seeing a component reference with an adjacent field. Treat
17830 refs to arrays at struct end of external decls similar to
17831 refs to unconstrained commons.
17833 2018-04-06 Jakub Jelinek <jakub@redhat.com>
17836 * fold-const.c (twoval_comparison_p): Remove SAVE_P argument and don't
17837 look through SAVE_EXPRs with non-side-effects argument. Adjust
17839 (fold_comparison): Adjust twoval_comparison_p caller, don't handle
17842 2018-04-06 Richard Biener <rguenther@suse.de>
17844 PR middle-end/85180
17845 * alias.c (find_base_term): New wrapper around find_base_term
17846 unwinding CSELIB_VAL_PTR changes.
17847 (find_base_term): Do not restore CSELIB_VAL_PTR during the
17850 2018-04-06 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
17852 * config/s390/s390.c (s390_z10_optimize_cmp): Expand dedicated NOP
17854 * config/s390/s390.md (UNSPECV_NOP_LR_0, UNSPECV_NOP_LR_1): New
17855 constant definitions.
17856 ("nop"): lr 0,0 -> nopr r0
17857 ("nop_lr0", "nop_lr1"): New insn definitions.
17859 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
17861 * config/nds32/nds32.md (*stack_push, *stack_pop): Use
17862 NDS32_V3PUSH_AVAILABLE_P macro.
17864 2018-04-06 Monk Chiang <sh.chiang04@gmail.com>
17865 Chung-Ju Wu <jasonwucj@gmail.com>
17867 * config.gcc (nds32*-*-*): Add v2j v3f v3s checking.
17868 (nds32*-*-*): Add float and fpu_config into supported_defaults.
17869 * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS):
17870 Include TARGET_DEFAULT_FPU_ISA and TARGET_DEFAULT_FPU_FMA.
17871 * config/nds32/constants.md (unspec_element): Add UNSPEC_COPYSIGN,
17872 UNSPEC_FCPYNSD, UNSPEC_FCPYNSS, UNSPEC_FCPYSD and UNSPEC_FCPYSS.
17873 * config/nds32/constraints.md: New constraints and checking for hard
17874 float configuration.
17875 * config/nds32/iterators.md: New mode iterator and attribute for hard
17876 float configuration.
17877 * config/nds32/nds32-doubleword.md: Use hard float alternatives and
17879 * config/nds32/nds32-fpu.md: New file.
17880 * config/nds32/nds32-md-auxiliary.c: New functions and checkings to
17881 deal with hard float code generation.
17882 * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3F and
17884 (abi_type, float_reg_number): New enum type.
17885 * config/nds32/nds32-predicates.c: New predicates for hard float.
17886 * config/nds32/nds32-protos.h: Declare functions for hard float.
17887 * config/nds32/nds32.c: Implementation for hard float configuration.
17888 * config/nds32/nds32.h: Definitions for hard float configuration.
17889 * config/nds32/nds32.md: Include hard float machine description and
17890 modify patterns for hard float configuration.
17891 * config/nds32/nds32.opt: New options for hard float configuration.
17892 * config/nds32/predicates.md: New predicates for hard float
17895 2018-04-06 Kuan-Lin Chen <kuanlinchentw@gmail.com>
17897 * common/config/nds32/nds32-common.c
17898 (nds32_option_optimization_table): Enable -mreleax-hint by default.
17900 2018-04-05 Jakub Jelinek <jakub@redhat.com>
17902 PR middle-end/85195
17903 * match.pd (BIT_FIELD_REF CONSTRUCTOR@0 @1 @2): Use view_convert around
17904 CONSTRUCTOR_ELT (ctor, ...)->value.
17906 2018-04-05 Uros Bizjak <ubizjak@gmail.com>
17909 * config/i386/i386.md (define_attr "memory"): Handle rotate1 type.
17911 2018-04-05 Tom de Vries <tom@codesourcery.com>
17914 * config/nvptx/nvptx.c (nvptx_single): Fix neutering of bb with only
17917 2018-04-05 Shiva Chen <shiva0217@gmail.com>
17918 Kito Cheng <kito.cheng@gmail.com>
17920 * config/nds32/constraints.md (U33): Fine-tune checking condition.
17921 * config/nds32/nds32-md-auxiliary.c (nds32_mem_format): Ditto.
17922 * config/nds32/nds32.h (nds32_16bit_address_type): Add
17923 ADDRESS_POST_MODIFY_LO_REG_IMM3U.
17925 2018-04-05 Shiva Chen <shiva0217@gmail.com>
17926 Kito Cheng <kito.cheng@gmail.com>
17928 * config/nds32/constraints.md (Ufe): New memory constraint.
17929 * config/nds32/nds32-md-auxiliary.c (nds32_mem_format,
17930 nds32_output_16bit_load): Consider r8 register for lwi45.fe format.
17931 * config/nds32/nds32.c (nds32_print_operand): Output lwi45.fe
17933 * config/nds32/nds32.h (nds32_16bit_address_type): Add ADDRESS_R8_IMM7U.
17934 * config/nds32/nds32.md (*mov<mode>): Adjust pattern.
17936 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
17938 * config/nds32/nds32.md: Use optimize_size in the condition for
17939 alu-shift instructions.
17941 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
17943 * config/nds32/nds32.md (divsi4, udivsi4): New patterns.
17945 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
17947 * config/nds32/nds32.md (negsi2): Refine pattern.
17949 2018-04-05 Kito Cheng <kito.cheng@gmail.com>
17950 Chung-Ju Wu <jasonwucj@gmail.com>
17952 * config/nds32/iterators.md (shift_rotate): New code iterator.
17953 (shift): New code attribute.
17954 * config/nds32/nds32-md-auxiliary.c (nds32_expand_constant): New.
17955 * config/nds32/nds32-protos.h (nds32_expand_constant): Declare.
17956 * config/nds32/nds32.c (nds32_print_operand): Deal with more cases.
17957 * config/nds32/nds32.md (addsi3, *add_srli): Refine implementation for
17958 bit-wise operations.
17959 (andsi3, *andsi3): Ditto.
17960 (iorsi3, *iorsi3, *or_slli, *or_srli): Ditto.
17961 (xorsi3, *xorsi3, *xor_slli, *xor_srli): Ditto.
17962 (<shift>si3, *ashlsi3, *ashrsi3, *lshrsi3, *rotrsi3): Ditto.
17963 * config/nds32/predicates.md (nds32_rimm5u_operand, nds32_and_operand,
17964 nds32_ior_operand, nds32_xor_operand): New predicates.
17966 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
17968 * config/nds32/nds32.md (add<mode>3, sub<mode>3): Rename to ...
17969 (addsi3, subsi3): ... this.
17971 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
17973 * config/nds32/nds32.md (*sub_srli, *and_slli): Fine-tune predicator.
17975 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
17977 * config/nds32/nds32.md: Adjust indention.
17979 2018-04-05 Kito Cheng <kito.cheng@gmail.com>
17981 * config/nds32/nds32.md (feature): New attribute.
17983 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
17985 * config/nds32/nds32.md (subtype): New attribute.
17987 2018-04-04 Thomas Preud'homme <thomas.preudhomme@arm.com>
17990 * config/arm/arm-builtins.c (arm_expand_builtin): Change
17991 expansion to perform a bitwise AND of the argument followed by a
17992 boolean negation of the result.
17994 2018-04-04 Peter Bergner <bergner@vnet.ibm.com>
17996 PR rtl-optimization/84878
17997 * ddg.c (add_cross_iteration_register_deps): Use DF_REF_BB to determine
17998 the basic block. Assert the use reference is not artificial and that
17999 it has an associated insn.
18001 2018-04-04 Michael Matz <matz@suse.de>
18003 * builtins.c (compute_objsize): Pass correct operand
18004 to array_at_struct_end_p.
18006 2018-04-04 Richard Biener <rguenther@suse.de>
18009 * dwarf2out.c (dwarf2out_register_external_die): Peel namespaces
18010 from contexts for DINFO_LEVEL_TERSE and below.
18012 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
18014 * config/nds32/nds32-doubleword.md (move_<mode>): Require
18015 resiter_operand condition.
18016 * config/nds32/nds32.md (*move<mode>): Ditto.
18018 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
18019 Monk Chiang <sh.chiang04@gmail.com>
18021 * config/nds32/nds32.md (movmisalign<mode>): New pattern.
18023 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
18025 * config/nds32/nds32.md (movqi, movhi): Merge into mov<mode>.
18027 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
18028 Kito Cheng <kito.cheng@gmail.com>
18030 * config/nds32/nds32-md-auxiliary.c (nds32_inverse_cond_code,
18031 nds32_cond_code_str, output_cond_branch,
18032 output_cond_branch_compare_zero, nds32_expand_cbranch,
18033 nds32_expand_cstore, nds32_expand_movcc,
18034 nds32_output_cbranchsi4_equality_zero,
18035 nds32_output_cbranchsi4_equality_reg,
18036 nds32_output_cbranchsi4_equality_reg_or_const_int,
18037 nds32_output_cbranchsi4_greater_less_zero: New functions.
18038 * config/nds32/nds32-protos.h (nds32_expand_cbranch,
18039 nds32_expand_cstore, nds32_expand_movcc,
18040 nds32_output_cbranchsi4_equality_zero,
18041 nds32_output_cbranchsi4_equality_reg,
18042 nds32_output_cbranchsi4_equality_reg_or_const_int,
18043 nds32_output_cbranchsi4_greater_less_zero): Declare.
18044 * config/nds32/predicates.md (nds32_movecc_comparison_operator,
18045 nds32_rimm11s_operand): New predicates.
18046 * config/nds32/nds32.h (nds32_expand_result_type): New enum type.
18047 * config/nds32/nds32.md: Rewrite all the branch and conditional move
18050 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
18052 * config/nds32/nds32-doubleword.md: Refine all the instruction type.
18053 * config/nds32/nds32.md: Ditto.
18054 * config/nds32/pipelines.md: Ditto.
18056 2018-04-04 Richard Biener <rguenther@suse.de>
18058 PR tree-optimization/85168
18059 * tree-ssa-sccvn.c (vn_reference_maybe_forwprop_address): Avoid
18060 propagating abnormals.
18062 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
18064 * config/nds32/nds32.md (enabled): Use yes/no for this attribute.
18066 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
18067 Kito Cheng <kito.cheng@gmail.com>
18069 * config/nds32/nds32-md-auxiliary.c (nds32_long_call_p): New function.
18070 * config/nds32/nds32-protos.h (nds32_long_call_p): Declare.
18071 * config/nds32/nds32.c (nds32_function_ok_for_sibcall): New function.
18072 (TARGET_FUNCTION_OK_FOR_SIBCALL): Define.
18073 * config/nds32/nds32.md (sibcall_internal): New.
18074 (sibcall_register): Remove.
18075 (sibcall_immediate): Remove.
18076 (sibcall_value_internal): New.
18077 (sibcall_value_register): Remove.
18078 (sibcall_value_immediate): Remove.
18079 * config/nds32/predicates.md (nds32_general_register_operand): New.
18080 (nds32_call_address_operand): New.
18082 2018-04-03 Jakub Jelinek <jakub@redhat.com>
18084 PR rtl-optimization/85167
18085 * shrink-wrap.c (move_insn_for_shrink_wrap): Don't set bb_uses and
18086 bb_defs if *split_p, instead preinitialize it to NULL.
18088 PR tree-optimization/85156
18089 * builtins.c (fold_builtin_expect): Use save_expr on arg1 to avoid
18090 evaluating the argument multiple times.
18092 2018-04-03 Bill Schmidt <wschmidt@linux.ibm.com>
18094 * config/rs6000/emmintrin.h (_mm_cvtpd_epi32): Use __vector rather
18096 (_mm_cvtpd_ps): Likewise.
18097 (_mm_cvttpd_epi32): Likewise.
18098 * config/rs6000/mmintrin.h (_mm_unpacklo_pi8): Likewise.
18099 * config/rs6000/xmmintrin.h: For strict-ANSI C++ or C11, undefine
18100 vector, pixel, and bool following altivec.h include.
18102 2018-04-03 Martin Sebor <msebor@redhat.com>
18104 * doc/extend.texi (Common Function Attributes): Clarify.
18105 (const attribute): Likewise.
18106 (pure attribute): Likewise.
18108 2018-04-03 Jakub Jelinek <jakub@redhat.com>
18111 * config/i386/i386.c (ix86_expand_vector_set): Use
18112 HOST_WIDE_INT_1U << elt instead of 1 << elt. Formatting fix.
18114 2018-04-03 Uros Bizjak <ubizjak@gmail.com>
18116 * config/i386/i386.c (emit_i387_cw_initialization): Always use logic
18117 instructions when changing rounding bits to preserve precision bits
18118 in the x87 control word.
18120 2018-04-03 Martin Liska <mliska@suse.cz>
18122 PR tree-optimization/82491
18123 * rtl.h (strip_offset_and_add): Replace += suboffset with
18124 poly_uint64 () + suboffset.
18126 2018-03-29 Martin Liska <mliska@suse.cz>
18127 Martin Jambor <mjambor@suse.cz>
18130 * ipa-cp.c (propagate_bits_across_jump_function): Bail out if
18131 param_type is not an integral or pointer type.
18133 2018-04-03 Richard Biener <rguenther@suse.de>
18135 * sese.h (recompute_all_dominators): Remove.
18137 2018-04-02 Martin Sebor <msebor@redhat.com>
18139 * doc/invoke.texi (-Wrestrict): Fix typos.
18141 2018-04-02 Jim Wilson <jimw@sifive.com>
18143 * config/riscv/riscv.h (SHIFT_COUNT_TRUNCATED): Set to zero.
18144 * config/riscv/riscv.md (<optab>si3): Use QImode shift count.
18145 (<optab>di3, <optab>si3_extend): Likewise.
18146 (<optab>si3_mask, <optab>si3_mask_1): New.
18147 (<optab>di3_mask, <optab>di3_mask_1): New.
18148 (<optab>si3_extend_mask, <optab>si3_extend_mask_1): New.
18149 (lshrsi3_zero_extend_1): Use VOIDmode shift count.
18150 * config/riscv/sync.md (atomic_test_and_set): Emit QImode shift count.
18152 2018-04-02 Gerald Pfeifer <gerald@pfeifer.com>
18154 * doc/cpp.texi (Variadic Macros): Fix line continuation in an
18157 2018-04-02 Chung-Ju Wu <jasonwucj@gmail.com>
18159 * config/nds32/nds32.c (TARGET_CANONICALIZE_COMPARISON): Define.
18160 (nds32_canonicalize_comparison): New function.
18162 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
18163 Kito Cheng <kito.cheng@gmail.com>
18164 Kuan-Lin Chen <kuanlinchentw@gmail.com>
18166 * config.gcc (nds32): Add nds32-relax-opt.o into extra_objs.
18167 * config/nds32/constants.md (unspec_volatile_element): Add
18168 UNSPEC_VOLATILE_RELAX_GROUP.
18169 * config/nds32/nds32-relax-opt.c: New file.
18170 * config/nds32/nds32-predicates.c
18171 (nds32_symbol_load_store_p): New function.
18172 * config/nds32/nds32-protos.h
18173 (nds32_symbol_load_store_p): Declare function.
18174 (make_pass_nds32_relax_opt): Declare new rtl pass function.
18175 * config/nds32/nds32.c
18176 (nds32_register_pass): New function to register pass.
18177 (nds32_register_passes): New function to register passes.
18178 * config/nds32/nds32.md (relax_group): New pattern.
18179 * config/nds32/nds32.opt (mrelax-hint): New option.
18180 * config/nds32/t-nds32 (nds32-relax-opt.o): New dependency.
18182 2018-04-01 Kito Cheng <kito.cheng@gmail.com>
18184 * config/nds32/t-nds32: Modify files dependency.
18186 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
18188 * config/nds32/nds32.h (FUNCTION_PROFILER): Output newline character.
18189 (PROFILE_HOOK): Define its implementation.
18191 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
18193 * config/nds32/nds32.h (WCHAR_TYPE, WCHAR_TYPE_SIZE): Use unsigned int
18194 type and 32-bit size.
18196 2018-04-01 Jakub Jelinek <jakub@redhat.com>
18198 PR middle-end/85090
18199 * config/i386/sse.md (V): Add V64QI and V32HI for TARGET_AVX512F.
18200 (V_128_256): New mode iterator.
18201 (*avx512dq_vextract<shuffletype>64x2_1 splitter): New define_split.
18202 (*avx512f_vextract<shuffletype>32x4_1 splitter): Likewise.
18203 (xop_pcmov_<mode><avxsizesuffix>): Use V_128_256 mode iterator instead
18205 * config/i386/i386.c (ix86_expand_vector_set): Improve V32HImode and
18206 V64QImode expansion for !TARGET_AVX512BW && TARGET_AVX512F.
18208 2018-03-31 Segher Boessenkool <segher@kernel.crashing.org>
18211 * config/rs6000/xmmintrin.h (_mm_set_ps, _mm_max_ps): Handle (quiet)
18212 NaN inputs correctly.
18214 2018-03-30 Peter Bergner <bergner@vnet.ibm.com>
18217 * config/rs6000/vsx.md (??r): New mode attribute.
18218 (*vsx_mov<mode>_64bit): Use it.
18219 (*vsx_mov<mode>_32bit): Likewise.
18221 2018-03-30 Martin Sebor <msebor@redhat.com>
18223 PR tree-optimization/84818
18224 * builtins.c (check_access): Use warning_n.
18226 2018-03-30 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
18229 * config/rs6000/rs6000-string.c (expand_compare_loop): Fix redundant
18231 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Fix redundant
18234 2018-03-30 Julia Koval <julia.koval@intel.com>
18237 * x86-tune.def (movx, partial_reg_dependency): Enable for
18240 2018-03-29 Vladimir Makarov <vmakarov@redhat.com>
18242 PR inline-asm/84985
18243 * lra-constraints.c (process_alt_operands): Move setting
18244 this_alternative_matches below.
18246 2018-03-29 Martin Liska <mliska@suse.cz>
18249 * doc/invoke.texi: Document how LTO works with debug info.
18250 Describe auto-load support of binutils. Mention 'x86-64'
18251 as valid option value of -march option.
18253 2018-03-29 Jakub Jelinek <jakub@redhat.com>
18255 * config/i386/sse.md (<avx512>_blendm<mode>): Use <sseintprefix>.
18258 * fold-const.c (operand_equal_p): Handle DEBUG_BEGIN_STMT.
18259 For STATEMENT_LIST, pass down OEP_LEXICOGRAPHIC and maybe
18260 OEP_NO_HASH_CHECK for recursive call, to avoid exponential
18263 2018-03-28 Peter Bergner <bergner@vnet.ibm.com>
18266 * config/rs6000/rs6000.h (RS6000_BTM_POWERPC64): New define.
18267 (RS6000_BTM_COMMON): Add RS6000_BTM_POWERPC64.
18268 * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Add support
18269 for RS6000_BTM_POWERPC64.
18270 (rs6000_invalid_builtin): Add handling for RS6000_BTM_POWERPC64
18271 (rs6000_builtin_mask_names): Add RS6000_BTM_POWERPC64.
18272 * config/rs6000/rs6000-builtin.def (BU_P7_POWERPC64_MISC_2): New macro
18275 (DIVDEU): Likewise.
18277 2018-03-28 Carl Love <cel@us.ibm.com>
18280 2017-09-27 Carl Love <cel@us.ibm.com>
18282 * config/rs6000/rs6000-builtin.def (BU_FP_1MISC_1): Add define macro.
18283 (FCTID, FCTIW): Add BU_FP_MISC_1 macro expansion for builtins.
18284 * config/rs6000/rs6000.md (lrintsfsi2): Add define_insn for the
18287 2018-03-28 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
18289 * config/rs6000/xmmintrin.h (_mm_max_pi16): Use __vector __bool
18290 instead of __vector bool.
18291 (_mm_max_pu8): Likewise.
18292 (_mm_min_pi16): Likewise.
18294 2018-03-28 Peter Bergner <bergner@vnet.ibm.com>
18297 * config/rs6000/rs6000-builtin.def (DIVWEO): Delete macro expansion.
18298 (DIVWEUO): Likewise.
18299 (DIVDEO): Likewise.
18300 (DIVDEUO): Likewise.
18301 * config/rs6000/rs6000.c (builtin_function_type): Remove support for
18302 DIVWEUO and DIVDEUO.
18303 * config/rs6000/rs6000.md (UNSPEC_DIVEO, UNSPEC_DIVEUO): Delete unspecs.
18304 (UNSPEC_DIV_EXTEND): Remove deleted unspecs.
18305 (div_extend): Likewise.
18306 * doc/extend.texi (__builtin_divweo): Remove documentation for deleted
18308 (__builtin_divweuo): Likewise.
18309 (__builtin_divdeo): Likewise.
18310 (__builtin_divdeuo): Likewise.
18312 2018-03-28 Jakub Jelinek <jakub@redhat.com>
18315 * config/i386/i386.md (*add<mode>3_carry_0, *addsi3_carry_zext_0,
18316 *sub<mode>3_carry_0, *subsi3_carry_zext_0): New patterns.
18318 PR tree-optimization/82004
18319 * gimple-match-head.c (optimize_pow_to_exp): New function.
18320 * match.pd (pow(C,x) -> exp(log(C)*x)): Wrap with #if GIMPLE.
18321 Don't fold to exp if optimize_pow_to_exp is false.
18323 2018-03-28 Martin Liska <mliska@suse.cz>
18326 * calls.c (initialize_argument_information): Fix trailing space.
18327 * common.opt: Fix typo and provide better explanation for
18328 -fsanitize-coverage option.
18329 * config/i386/i386.opt: Fix typo.
18331 2018-03-28 Jakub Jelinek <jakub@redhat.com>
18332 Martin Liska <mliska@suse.cz>
18335 * gimplify.c (asan_poison_variable): Don't do the check for
18336 gimplify_omp_ctxp here.
18337 (gimplify_decl_expr): Do it here.
18338 (gimplify_target_expr): Likewise.
18340 2018-03-28 Martin Liska <mliska@suse.cz>
18343 * config/i386/i386.c (ix86_function_arg_advance): Do not call
18344 chkp_type_bounds_count if MPX is not enabled.
18346 2018-03-27 Chung-Ju Wu <jasonwucj@gmail.com>
18348 * config/nds32/nds32.h (BRANCH_COST): Adjust cost.
18350 2018-03-27 Michael Meissner <meissner@linux.vnet.ibm.com>
18353 * config/rs6000/rs6000.c (create_complex_muldiv): New helper
18354 function to create the function decl for complex long double
18355 multiply and divide for -mabi=ieeelongdouble.
18356 (init_float128_ieee): Call it.
18358 2018-03-27 H.J. Lu <hongjiu.lu@intel.com>
18361 * config/i386/i386.c (ix86_trampoline_init): Insert ENDBR for
18362 -fcf-protection=branch -mibt.
18363 * config/i386/i386.h (TRAMPOLINE_SIZE): Increased by 4 bytes.
18365 2018-03-27 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
18368 * config/arm/arm.c (arm_valid_symbolic_address): Handle
18369 arm_word_relocations.
18371 2018-03-27 Cesar Philippidis <cesar@codesourcery.com>
18374 * config/nvptx/nvptx.c (nvptx_assemble_decl_begin): Add '[]' to
18375 extern array declarations.
18377 2018-03-27 Richard Biener <rguenther@suse.de>
18379 PR middle-end/84067
18380 * match.pd ((A * C) +- (B * C) -> (A+-B) * C): Guard with
18381 explicit single_use checks.
18383 2018-03-27 Richard Biener <rguenther@suse.de>
18385 PR tree-optimization/85082
18386 * tree-ssa-sccvn.c (vn_reference_lookup_or_insert_for_pieces):
18389 2018-03-27 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
18391 * config.gcc (aarch64*-*-linux*): New TARGET_DEFAULT_ASYNC_UNWIND_TABLES
18392 * common/config/aarch64/aarch64-common.c (aarch64_optimization_table[]):
18393 Turn on fasynchronous-unwind-tables and funwind-tables.
18395 2018-03-26 Uros Bizjak <ubizjak@gmail.com>
18398 * config/i386/i386.md (*bmi_blsr_<mode>_cmp): New insn pattern.
18399 (*bmi_blsr_<mode>_ccz): Ditto.
18401 2018-03-26 Tom de Vries <tom@codesourcery.com>
18403 PR tree-optimization/85063
18404 * omp-general.c (offloading_function_p): New function. Factor out
18406 * omp-offload.c (pass_omp_target_link::gate): ... here.
18407 * omp-general.h (offloading_function_p): Declare.
18408 * tree-switch-conversion.c (build_one_array): Mark CSWTCH.x variable
18409 with attribute omp declare target for offloading functions.
18411 2018-03-24 Richard Sandiford <richard.sandiford@linaro.org>
18413 PR tree-optimization/84005
18414 * tree-data-ref.h (get_base_for_alignment): Declare.
18415 * tree-data-ref.c (get_base_for_alignment_1): New function.
18416 (get_base_for_alignment): Likewise.
18417 * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Use
18418 get_base_for_alignment to find a suitable base object, instead
18419 of always using drb->base_address.
18421 2018-03-23 Jakub Jelinek <jakub@redhat.com>
18423 PR inline-asm/85022
18424 * emit-rtl.c (init_emit_regs): Indicate that VOIDmode MEMs don't have
18425 known size by default.
18427 2018-03-23 Vladimir Makarov <vmakarov@redhat.com>
18429 PR inline-asm/85030
18430 * lra-constraints.c (process_alt_operands): Don't match BLKmode
18431 and non BLKmode operands.
18433 2018-03-23 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
18436 * config/arm/arm.md (unaligned_loadhis): Remove first alternative.
18437 Clean up attributes.
18439 2018-03-23 Richard Biener <rguenther@suse.de>
18442 * dwarf2out.c (rtl_for_decl_location): Do not generate RTL early when
18443 we are going to emit early debug for LTO.
18445 2018-03-23 Jakub Jelinek <jakub@redhat.com>
18447 PR inline-asm/85034
18448 * function.c (match_asm_constraints_1): Don't optimize if input
18449 doesn't satisfy general_operand predicate for output's mode.
18451 PR inline-asm/85022
18452 * alias.c (write_dependence_p): Don't require for x_canonicalized
18453 non-VOIDmode if x has VOIDmode.
18456 * sanopt.c (maybe_optimize_ubsan_ptr_ifn): If DECL_REGISTER (base),
18457 just don't try to optimize it rather than assert it never happens.
18459 2018-03-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
18461 * config/rs6000/rs6000-builtin.def: Remove various BU_ALTIVEC_X
18462 macro expansions for definition of ST_INTERNAL_<mode> and
18463 LD_INTERNAL_<mode> builtins.
18464 * config/rs6000/rs6000-protos.h (rs6000_address_for_altivec):
18466 * config/rs6000/rs6000.c (altivec_expand_ld_builtin): Delete this
18468 (altivec_expand_st_builtin): Likewise.
18469 (altivec_expand_builtin): Remove calls to deleted functions.
18470 (rs6000_address_for_altivec): Delete this function.
18471 * config/rs6000/vector.md: Remove expands for
18472 vector_altivec_load_<mode> and vector_altivec_store_<mode>.
18474 2018-03-22 Sudakshina Das <sudi.das@arm.com>
18477 * config/arm/arm.h (machine_function): Add static_chain_stack_bytes.
18478 * config/arm/arm.c (arm_compute_static_chain_stack_bytes): Avoid
18479 re-computing once computed.
18480 (arm_expand_prologue): Compute machine->static_chain_stack_bytes.
18481 (arm_init_machine_status): Initialize
18482 machine->static_chain_stack_bytes.
18484 2018-03-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
18487 * doc/extend.texi: Add four new prototypes for vec_ld.
18488 * config/rs6000/rs6000-builtin.def (LVX_V1TI): Reorder symbol
18489 definitions for more logical presentation.
18490 * config/rs6000/rs6000-c.c: (altivec_overloaded_builtins): Add
18491 entries for V1TI variants of __builtin_altivec_ld builtin.
18492 * config/rs6000/rs6000.c: (altivec_expand_lv_builtin): Add test and
18493 handling of V1TI variant of LVX icode pattern.
18494 (altivec_expand_builtin): Add case for ALTIVEC_BUILTIN_LVX_V1TI.
18495 (rs6000_gimple_fold_builtin): Likewise.
18496 (altivec_init_builtins): Add code to define
18497 __builtin_altivec_lvx_v1ti function.
18499 2018-03-22 Jakub Jelinek <jakub@redhat.com>
18501 PR inline-asm/84941
18502 * function.c (match_asm_constraints_1): Don't do the optimization
18503 if input isn't a REG, SUBREG, MEM or constant.
18505 2018-03-22 Tom de Vries <tom@codesourcery.com>
18507 PR tree-optimization/84956
18508 * tree-ssa-tail-merge.c (find_clusters_1): Skip bbs with
18509 bb_has_abnormal_pred.
18511 2018-03-22 Jakub Jelinek <jakub@redhat.com>
18514 * dwarf2asm.c (dw2_output_indirect_constant_1): Set
18515 DECL_INITIAL (decl) to decl at the end.
18516 * varasm.c (use_blocks_for_decl_p): Revert the 2018-03-20 change,
18517 adjust the comment.
18519 2018-03-21 Joseph Myers <joseph@codesourcery.com>
18521 * doc/extend.texi (__builtin_tgmath): Document when complex
18522 integer types are treated as _Complex _Float64.
18524 2018-03-21 Tom de Vries <tom@codesourcery.com>
18526 * doc/extend.texi (__builtin_extend_pointer): Remove pasto.
18528 2018-03-21 Jakub Jelinek <jakub@redhat.com>
18530 PR tree-optimization/84960
18531 * tree-cfg.c (remove_bb): Don't move forced labels into bb->prev_bb
18532 if it is ENTRY block, move them into single succ of ENTRY in that case.
18534 2018-03-21 Richard Sandiford <richard.sandiford@linaro.org>
18536 PR tree-optimization/84811
18537 * poly-int.h (poly_span_traits): Remove the T3 parameter and
18538 promote HOST_WIDE_INT T2 - T1 results to unsigned HOST_WIDE_INT.
18539 (maybe_in_range_p, known_in_range_p, ranges_known_overlap_p):
18540 (known_subrange_p): Update accordingly. Cast each value involved
18541 in the size comparison, rather than casting the result of the
18544 2018-03-21 Jakub Jelinek <jakub@redhat.com>
18546 PR tree-optimization/84982
18547 * gimple-ssa-store-merging.c (invert_op): Handle boolean inversion
18548 by flipping the least significant bit rather than all bits from
18549 bitpos to bitpos + bitsize - 1.
18551 2018-03-21 Nathan Sidwell <nathan@acm.org>
18553 * doc/extend.texi (Deprecated Features): Remove mention of
18554 long-deleted deprecations.
18556 2018-03-21 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
18559 * configure.ac (gcc_cv_ld_soname) <*-*-solaris2*>: Set.
18560 * configure: Regenerate.
18562 2018-03-21 Tom de Vries <tom@codesourcery.com>
18564 PR tree-optimization/83126
18565 * tree-parloops.c (num_phis): New function.
18566 (gen_parallel_loop): Detect and handle canonicalize_loop_ivs failure.
18568 2018-03-21 Nathan Sidwell <nathan@acm.org>
18570 * doc/extend.texi (Deprecated Features): Update deprecated flags,
18571 mention anon-struct/union members and trailing attributes.
18573 2018-03-21 Bin Cheng <bin.cheng@arm.com>
18575 PR tree-optimization/84969
18576 * tree-loop-distribution.c (fuse_memset_builtins): Don't reorder
18577 builtin memset partitions if they set different rhs values.
18579 2018-03-21 Jakub Jelinek <jakub@redhat.com>
18581 PR rtl-optimization/84989
18582 * simplify-rtx.c (simplify_unary_operation_1): Don't try to simplify
18583 VEC_DUPLICATE with scalar result mode.
18585 2018-03-21 Martin Liska <mliska@suse.cz>
18588 * ipa-icf.c (sem_item_optimizer::fixup_points_to_sets): Remove
18589 not intended return statement.
18591 2018-03-21 Martin Liska <mliska@suse.cz>
18594 * tree-chkp.c (CHKP_ARRAY_MAX_CHECK_STEPS): Define a new macro.
18595 (chkp_find_bound_slots_1): Limit number of iterations.
18597 2018-03-20 David H. Gutteridge <dhgutteridge@sympatico.ca>
18600 * Minor grammar fixes for x86 options.
18602 2018-03-20 Jakub Jelinek <jakub@redhat.com>
18605 * dce.c (delete_unmarked_insns): Don't remove frame related noop moves
18606 holding REG_CFA_RESTORE notes, instead turn them into a USE.
18608 2018-03-20 Peter Bergner <bergner@vnet.ibm.com>
18611 * config/rs6000/altivec.md (altivec_lvx_<mode>_2op): Delete define_insn.
18612 (altivec_lvx_<mode>_1op): Likewise.
18613 (altivec_stvx_<mode>_2op): Likewise.
18614 (altivec_stvx_<mode>_1op): Likewise.
18615 (altivec_lvx_<VM2:mode>): New define_expand.
18616 (altivec_stvx_<VM2:mode>): Likewise.
18617 (altivec_lvx_<VM2:mode>_2op_<P:mptrsize>): New define_insn.
18618 (altivec_lvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
18619 (altivec_stvx_<VM2:mode>_2op_<P:mptrsize>): Likewise.
18620 (altivec_stvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
18621 * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Use new expanders.
18622 (rs6000_gen_lvx): Likewise.
18623 * config/rs6000/rs6000.c (altivec_expand_lv_builtin): Likewise.
18624 (altivec_expand_stv_builtin): Likewise.
18625 (altivec_expand_builtin): Likewise.
18626 * config/rs6000/vector.md: Likewise.
18628 2018-03-20 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
18631 * config/arm/arm.c (arm_array_mode_supported_p): Return false for
18634 2018-03-20 Richard Biener <rguenther@suse.de>
18637 * config/i386/i386.c (ix86_add_stmt_cost): Only cost
18638 sign-conversions as zero, fall back to standard scalar_stmt
18641 2018-03-20 Martin Liska <mliska@suse.cz>
18644 * predict.c (rebuild_frequencies): Handle case when we have
18645 PROFILE_ABSENT, but flag_guess_branch_prob is false.
18647 2018-03-20 Jakub Jelinek <jakub@redhat.com>
18650 * dwarf2asm.c (dw2_output_indirect_constant_1): Temporarily turn off
18651 flag_section_anchors.
18652 * varasm.c (use_blocks_for_decl_p): Remove hack for
18653 dw2_force_const_mem.
18656 * config/aarch64/aarch64.md (*aarch64_reg_<mode>3_neg_mask2): Rename
18658 (*aarch64_<optab>_reg_<mode>3_neg_mask2): ... this. If pseudos can't
18659 be created, use lowpart_subreg of operands[0] rather than operands[0]
18661 (*aarch64_reg_<mode>3_minus_mask): Rename to ...
18662 (*aarch64_ashl_reg_<mode>3_minus_mask): ... this.
18663 (*aarch64_<optab>_reg_di3_mask2): Use const_int_operand predicate
18664 and n constraint instead of aarch64_shift_imm_di and Usd.
18665 (*aarch64_reg_<optab>_minus<mode>3): Rename to ...
18666 (*aarch64_<optab>_reg_minus<mode>3): ... this.
18668 2018-03-20 Sudakshina Das <sudi.das@arm.com>
18671 * config/arm/neon.md (ashldi3_neon): Update ?s for constraints
18672 to favor GPR over NEON registers.
18673 (<shift>di3_neon): Likewise.
18675 2018-03-20 Tom de Vries <tom@codesourcery.com>
18678 * config/nvptx/nvptx.c (nvptx_single): Don't neuter bar.sync.
18679 (nvptx_process_pars): Emit bar.sync asap and alap.
18681 2018-03-20 Tom de Vries <tom@codesourcery.com>
18684 * config/nvptx/nvptx.c (prevent_branch_around_nothing): Also update
18685 seen_label if seen_label is already set.
18687 2018-03-20 Jakub Jelinek <jakub@redhat.com>
18690 * config/i386/i386.c (fold_builtin_cpu): For features above 31
18691 use __cpu_features2 variable instead of __cpu_model.__cpu_features[0].
18692 Use 1U instead of 1. Formatting fixes.
18695 * builtins.c (fold_builtin_strpbrk): For strpbrk(x, "") use type
18696 instead of TREE_TYPE (s1) for the return value.
18698 2018-03-19 Jakub Jelinek <jakub@redhat.com>
18700 PR tree-optimization/84946
18701 * gimple-ssa-store-merging.c (mem_valid_for_store_merging): Compute
18702 bitsize + bitsize in poly_uint64 rather than poly_int64.
18705 * dwarf2asm.c: Include fold-const.c.
18706 (dw2_output_indirect_constant_1): Set DECL_INITIAL (decl) to ADDR_EXPR
18707 of decl rather than decl itself.
18709 PR rtl-optimization/84643
18710 * memmodel.h (enum memmodel): Add MEMMODEL_MAX enumerator.
18712 2018-03-19 Maxim Ostapenko <m.ostapenko@samsung.com>
18715 * dwarf2asm.c (dw2_output_indirect_constant_1): Disable ASan before
18716 calling assemble_variable.
18718 2018-03-19 Sudakshina Das <sudi.das@arm.com>
18721 * config/aarch64/aarch64-simd.md (vec_cmp<mode><v_int_equiv>): Modify
18722 instructions for UNLT, UNLE, UNGT, UNGE, UNEQ, UNORDERED and ORDERED.
18724 2018-03-19 Jim Wilson <jimw@sifive.com>
18727 * config/riscv/riscv.c (riscv_function_arg_boundary): Use
18728 PREFERRED_STACK_BOUNDARY instead of STACK_BOUNDARY.
18729 (riscv_first_stack_step): Likewise.
18730 (riscv_option_override): Use STACK_BOUNDARY instead of
18731 MIN_STACK_BOUNDARY.
18732 * config/riscv/riscv.h (STACK_BOUNDARY): Renamed from
18733 MIN_STACK_BOUNDARY.
18734 (BIGGEST_ALIGNMENT): Set to 128.
18735 (PREFERRED_STACK_BOUNDARY): Renamed from STACK_BOUNDARY.
18736 (RISCV_STACK_ALIGN): Use PREFERRED_STACK_BOUNDARY instead of
18739 2018-03-19 Richard Biener <rguenther@suse.de>
18741 PR tree-optimization/84933
18742 * tree-vrp.c (set_and_canonicalize_value_range): Treat out-of-bound
18743 values as -INF/INF when canonicalizing an ANTI_RANGE to a RANGE.
18745 2018-03-19 Richard Biener <rguenther@suse.de>
18747 PR tree-optimization/84859
18748 * tree-ssa-phiopt.c (single_trailing_store_in_bb): New function.
18749 (cond_if_else_store_replacement): Perform sinking operation on
18750 single-store BBs regardless of MAX_STORES_TO_SINK setting.
18751 Generalize what a BB with a single eligible store is.
18753 2018-03-19 Richard Biener <rguenther@suse.de>
18755 PR tree-optimization/84929
18756 * tree-data-ref.c (analyze_siv_subscript_cst_affine): Guard
18757 chrec_is_positive against non-chrec arg.
18759 2018-03-19 Tamar Christina <tamar.christina@arm.com>
18762 * config/arm/arm.c (arm_can_change_mode_class): revert r258554.
18764 2018-03-18 Martin Liska <mliska@suse.cz>
18766 PR rtl-optimization/84635
18767 * regrename.c (build_def_use): Use matches_mode only when
18770 2018-03-18 Richard Sandiford <richard.sandiford@linaro.org>
18772 PR tree-optimization/84913
18773 * tree-vect-loop.c (vectorizable_reduction): Don't try to
18774 vectorize chains of COND_EXPRs.
18776 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
18778 * config/nds32/nds32.h (MAX_REGS_PER_ADDRESS): Fix the value.
18780 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
18782 * config/nds32/nds32.h (LOGICAL_OP_NON_SHORT_CIRCUIT): Define.
18784 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
18786 * config/nds32/nds32.h (CLZ_DEFINED_VALUE_AT_ZERO): Define.
18788 2018-03-17 Chung-Ju Wu <jasonwucj@gmail.com>
18789 Kito Cheng <kito.cheng@gmail.com>
18791 * config/nds32/nds32-protos.h (nds32_adjust_reg_alloc_order): Declare.
18792 * config/nds32/nds32.c (nds32_reg_alloc_order_for_speed): New array.
18793 (nds32_adjust_reg_alloc_order): New function.
18794 * config/nds32/nds32.h (ADJUST_REG_ALLOC_ORDER): Define.
18796 2018-03-17 Kito Cheng <kito.cheng@gmail.com>
18798 * config/nds32/nds32.c (nds32_asm_output_mi_thunk,
18799 nds32_print_operand, nds32_print_operand_address): Use
18800 HOST_WIDE_INT_PRINT_DEC instead.
18802 2018-03-17 Chung-Ju Wu <jasonwucj@gmail.com>
18804 * config/nds32/nds32.c (nds32_register_priority): Modify cost.
18806 2018-03-17 Jakub Jelinek <jakub@redhat.com>
18809 * config/i386/i386.c (initial_ix86_tune_features,
18810 initial_ix86_arch_features): Use unsigned HOST_WIDE_INT rather than
18811 unsigned long long.
18812 (set_ix86_tune_features): Change ix86_tune_mask from unsigned int
18813 to unsigned HOST_WIDE_INT, initialize to HOST_WIDE_INT_1U << ix86_tune
18814 rather than 1u << ix86_tune. Formatting fix.
18815 (ix86_option_override_internal): Change ix86_arch_mask from
18816 unsigned int to unsigned HOST_WIDE_INT, initialize to
18817 HOST_WIDE_INT_1U << ix86_arch rather than 1u << ix86_arch.
18818 (ix86_function_specific_restore): Likewise.
18820 2018-03-16 Jakub Jelinek <jakub@redhat.com>
18823 * postreload.c (reload_combine_recognize_pattern): Perform
18824 INTVAL addition in unsigned HOST_WIDE_INT type to avoid UB and
18825 truncate_int_for_mode the result for the destination's mode.
18828 * hsa-gen.c (mem_type_for_type): Fix comment typo.
18829 * tree-vect-loop-manip.c (vect_create_cond_for_niters_checks):
18831 * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
18834 2018-03-16 Vladimir Makarov <vmakarov@redhat.com>
18837 * lra-assigns.c (lra_split_hard_reg_for): Don't use
18838 regno_allocno_class_array and sorted_pseudos.
18839 * lra-constraints.c (spill_hard_reg_in_range): Ignore hard regs in
18840 insns where regno is used.
18842 2018-03-16 Martin Liska <mliska@suse.cz>
18845 * multiple_target.c (create_dispatcher_calls): Redirect
18846 reference in the symbol table.
18848 2018-03-16 Martin Liska <mliska@suse.cz>
18851 * multiple_target.c (create_dispatcher_calls): Redirect also
18854 2018-03-16 Jakub Jelinek <jakub@redhat.com>
18858 * tree.h (TARGET_EXPR_NO_ELIDE): Define.
18859 * gimplify.c (gimplify_modify_expr_rhs): Don't elide TARGET_EXPRs with
18860 TARGET_EXPR_NO_ELIDE flag set unless *expr_p is INIT_EXPR.
18862 2018-03-16 Julia Koval <julia.koval@intel.com>
18864 * doc/invoke.texi (Skylake Server): Add CLWB.
18865 Cannonlake): Remove CLWB.
18867 2018-03-16 Jakub Jelinek <jakub@redhat.com>
18869 PR tree-optimization/84841
18870 * tree-ssa-reassoc.c (INTEGER_CONST_TYPE): Change to 1 << 4 from
18872 (FLOAT_ONE_CONST_TYPE): Define.
18873 (constant_type): Return FLOAT_ONE_CONST_TYPE for -1.0 and 1.0.
18874 (sort_by_operand_rank): Put entries with higher constant_type last
18875 rather than first to match comments.
18877 2018-03-15 Sandra Loosemore <sandra@codesourcery.com>
18879 * config/nios2/nios2.md (movsi_internal): Fix thinko in
18882 2018-03-15 Jakub Jelinek <jakub@redhat.com>
18885 * calls.c (expand_call): For TREE_ADDRESSABLE rettype ignore alignment
18886 check and use address of target always.
18888 2018-03-15 H.J. Lu <hongjiu.lu@intel.com>
18891 * config/i386/i386.c (indirect_thunk_needed): Update comments.
18892 (indirect_thunk_bnd_needed): Likewise.
18893 (indirect_thunks_used): Likewise.
18894 (indirect_thunks_bnd_used): Likewise.
18895 (indirect_return_needed): New.
18896 (indirect_return_bnd_needed): Likewise.
18897 (output_indirect_thunk_function): Add a bool argument for
18899 (output_indirect_thunk_function): Don't generate alias for
18900 function return thunk.
18901 (ix86_code_end): Call output_indirect_thunk_function to generate
18902 function return thunks.
18903 (ix86_output_function_return): Set indirect_return_bnd_needed
18904 and indirect_return_needed instead of indirect_thunk_bnd_needed
18905 and indirect_thunk_needed.
18907 2018-03-15 Olga Makhotina <olga.makhotina@intel.com>
18909 * config/i386/sgxintrin.h (_enclv_u32): New intrinsic.
18910 (__enclv_bc, __enclv_cd, __enclv_generic): New definitions.
18911 (ERDINFO, ETRACKC, ELDBC, ELDUC): New leaves.
18913 2018-03-15 David Malcolm <dmalcolm@redhat.com>
18914 Paul Hua <paul.hua.gm@gmail.com>
18917 * gcc.dg/fixits-pr84852-1.c: Fix filename in dg-regexp.
18919 2018-03-15 Segher Boessenkool <segher@kernel.crashing.org>
18921 * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add back the
18922 TARGET_DOUBLE_FLOAT and TARGET_SINGLE_FLOAT conditions on the DFmode
18923 resp. SFmode cases.
18925 2018-03-15 Tamar Christina <tamar.christina@arm.com>
18928 * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
18929 instead of GET_MODE_SIZE when comparing Units.
18931 2018-03-15 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
18934 * varasm.c (hash_section): Return an unchangeble hash value
18935 * config/aarch64/aarch64.c (aarch64_use_blocks_for_constant_p):
18936 Return !aarch64_can_use_per_function_literal_pools_p ().
18938 2018-03-15 Jakub Jelinek <jakub@redhat.com>
18941 * optabs.c (emit_conditional_move): Pass address of cmode's copy
18942 rather than address of cmode as last argument to prepare_cmp_insn.
18944 2018-03-15 Julia Koval <julia.koval@intel.com>
18946 * config/i386/i386.c (F_AVX512VBMI2, F_GFNI, F_VPCLMULQDQ,
18947 F_AVX512VNNI, F_AVX512BITALG): New.
18949 2018-03-14 John David Anglin <danglin@gcc.gnu.org>
18952 * config/pa/pa.c (pa_emit_move_sequence): Always emit secondary reload
18953 insn for floating-point loads and stores.
18955 2018-03-14 Carl Love <cel@us.ibm.com>
18957 * config/rs6000/rs6000-c.c: Add macro definitions for
18958 ALTIVEC_BUILTIN_VEC_PERMXOR.
18959 * config/rs6000/rs6000.h: Add #define for vec_permxor builtin.
18960 * config/rs6000/rs6000-builtin.def: Add macro expansions for VPERMXOR.
18961 * config/rs6000/altivec.md (altivec_vpermxor): New define expand.
18962 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Add case
18964 * config/doc/extend.texi: Add prototypes for vec_permxor.
18966 2018-03-14 David Malcolm <dmalcolm@redhat.com>
18969 * diagnostic-show-locus.c (class layout_point): Convert m_line
18970 from int to linenum_type.
18971 (line_span::comparator): Use linenum "compare" function when
18972 comparing line numbers.
18973 (test_line_span): New function.
18974 (layout_range::contains_point): Convert param "row" from int to
18976 (layout_range::intersects_line_p): Likewise.
18977 (layout::will_show_line_p): Likewise.
18978 (layout::print_source_line): Likewise.
18979 (layout::should_print_annotation_line_p): Likewise.
18980 (layout::print_annotation_line): Likewise.
18981 (layout::print_leading_fixits): Likewise.
18982 (layout::annotation_line_showed_range_p): Likewise.
18983 (struct line_corrections): Likewise for field m_row.
18984 (line_corrections::line_corrections): Likewise for param "row".
18985 (layout::print_trailing_fixits): Likewise.
18986 (layout::get_state_at_point): Likewise.
18987 (layout::get_x_bound_for_row): Likewise.
18988 (layout::print_line): Likewise.
18989 (diagnostic_show_locus): Likewise for locals "last_line" and "row".
18990 (selftest::diagnostic_show_locus_c_tests): Call test_line_span.
18991 * input.c (selftest::test_linenum_comparisons): New function.
18992 (selftest::input_c_tests): Call it.
18993 * selftest.c (selftest::test_assertions): Test ASSERT_GT,
18994 ASSERT_GT_AT, ASSERT_LT, and ASSERT_LT_AT.
18995 * selftest.h (ASSERT_GT): New macro.
18996 (ASSERT_GT_AT): New macro.
18997 (ASSERT_LT): New macro.
18998 (ASSERT_LT_AT): New macro.
19000 2018-03-14 Segher Boessenkool <segher@kernel.crashing.org>
19002 PR rtl-optimization/84780
19003 * combine.c (distribute_links): Don't make a link based on pc_rtx.
19005 2018-03-14 Martin Liska <mliska@suse.cz>
19007 * tree.c (record_node_allocation_statistics): Use
19008 get_stats_node_kind.
19009 (get_stats_node_kind): New function extracted from
19010 record_node_allocation_statistics.
19011 (free_node): Use get_stats_node_kind.
19013 2018-03-14 Richard Biener <rguenther@suse.de>
19015 * tree-ssa-pre.c (compute_antic_aux): Remove code that asserts
19016 that the value-set of ANTIC_IN doesn't grow.
19019 * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
19021 (BB_VISITED_WITH_VISITED_SUCCS): New define.
19022 (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
19024 2018-03-14 Julia Koval <julia.koval@intel.com>
19026 * config.gcc (icelake-client, icelake-server): New.
19028 * config/i386/i386.c (initial_ix86_tune_features): Extend to 64 bit.
19029 (initial_ix86_arch_features): Ditto.
19030 (PTA_SKYLAKE): Add SGX.
19031 (PTA_ICELAKE): Remove.
19032 (PTA_ICELAKE_CLIENT): New.
19033 (PTA_ICELAKE_SERVER): New.
19034 (ix86_option_override_internal): Split up icelake on icelake client and
19036 (get_builtin_code_for_version): Ditto.
19037 (fold_builtin_cpu): Ditto.
19038 * config/i386/driver-i386.c (config/i386/driver-i386.c): Ditto.
19039 * config/i386/i386-c.c (ix86_target_macros_internal): Ditto
19040 * config/i386/i386.h (processor_type): Ditto.
19041 * doc/invoke.texi: Ditto.
19043 2018-03-14 Jakub Jelinek <jakub@redhat.com>
19046 * sanopt.c (maybe_optimize_ubsan_ptr_ifn): Handle also
19047 INTEGER_CST offset, add it together with bitpos / 8 and
19048 sign extend based on POINTER_SIZE.
19052 2017-04-20 Uros Bizjak <ubizjak@gmail.com>
19055 * config/i386/constraints.md (Yc): New register constraint.
19056 * config/i386/i386.md (*float<SWI48:mode><MODEF:mode>2_mixed):
19057 Use Yc constraint for alternative 2 of operand 0. Remove
19058 preferred_for_speed attribute.
19060 2018-03-14 Richard Biener <rguenther@suse.de>
19062 PR tree-optimization/84830
19063 * tree-ssa-pre.c (compute_antic_aux): Intersect the new ANTIC_IN
19064 with the old one to avoid oscillations.
19066 2018-03-13 Vladimir Makarov <vmakarov@redhat.com>
19069 * lra-assigns.c (find_all_spills_for): Ignore uninteresting
19071 (assign_by_spills): Return a flag of reload assignment failure.
19072 Do not process the reload assignment failures. Do not spill other
19073 reload pseudos if they has the same reg class. Update n if
19075 (lra_assign): Add a return arg. Set up from the result of
19076 assign_by_spills call.
19077 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
19078 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
19079 usage_insns if it is not NULL.
19080 (spill_hard_reg_in_range): New function.
19081 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
19082 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
19083 function prototypes.
19084 (lra_assign): Change prototype.
19085 * lra.c (lra): Add code to deal with fails by splitting hard reg
19088 2018-03-01 Palmer Dabbelt <palmer@sifive.com>
19090 * config/riscv/riscv.opt (mrelax): New option.
19091 * config/riscv/riscv.c (riscv_file_start): Emit ".option
19092 "norelax" when riscv_mrelax is disabled.
19093 * doc/invoke.texi (RISC-V): Document "-mrelax" and "-mno-relax".
19095 2018-03-13 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
19098 * config/rs6000/rs6000.c (rs6000_reassociation_width): Disable parallel
19099 reassociation for int modes.
19101 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
19103 * tree-vect-loop-manip.c (vect_maybe_permute_loop_masks):
19104 Reverse the choice between VEC_UNPACK_LO_EXPR and VEC_UNPACK_HI_EXPR
19106 * config/aarch64/iterators.md (hi_lanes_optab): New int attribute.
19107 * config/aarch64/aarch64-sve.md
19108 (*aarch64_sve_<perm_insn><perm_hilo><mode>): Rename to...
19109 (aarch64_sve_<perm_insn><perm_hilo><mode>): ...this.
19110 (*extend<mode><Vwide>2): Rename to...
19111 (aarch64_sve_extend<mode><Vwide>2): ...this.
19112 (vec_unpack<su>_<perm_hilo>_<mode>): Turn into a define_expand,
19113 renaming the old pattern to...
19114 (aarch64_sve_punpk<perm_hilo>_<mode>): ...this. Only define
19116 (vec_unpack<su>_<perm_hilo>_<SVE_BHSI:mode>): Turn into a
19117 define_expand, renaming the old pattern to...
19118 (aarch64_sve_<su>unpk<perm_hilo>_<SVE_BHSI:mode>): ...this.
19119 (*vec_unpacku_<perm_hilo>_<mode>_no_convert): Delete.
19120 (vec_unpacks_<perm_hilo>_<mode>): Take BYTES_BIG_ENDIAN into
19121 account when deciding which SVE instruction the optab should use.
19122 (vec_unpack<su_optab>_float_<perm_hilo>_vnx4si): Likewise.
19124 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
19126 * config/aarch64/aarch64.md (V4_REGNUM, V8_REGNUM, V12_REGNUM)
19127 (V20_REGNUM, V24_REGNUM, V28_REGNUM, P1_REGNUM, P2_REGNUM, P3_REGNUM)
19128 (P4_REGNUM, P5_REGNUM, P6_REGNUM, P8_REGNUM, P9_REGNUM, P10_REGNUM)
19129 (P11_REGNUM, P12_REGNUM, P13_REGNUM, P14_REGNUM): New define_constants.
19130 (tlsdesc_small_<mode>): Turn a define_expand and use
19131 tlsdesc_small_sve_<mode> for SVE. Rename original define_insn to...
19132 (tlsdesc_small_advsimd_<mode>): ...this.
19133 (tlsdesc_small_sve_<mode>): New pattern.
19135 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
19137 * config/aarch64/iterators.md (UNSPEC_SMUL_HIGHPART)
19138 (UNSPEC_UMUL_HIGHPART): New constants.
19139 (MUL_HIGHPART): New int iteraor.
19140 (su): Handle UNSPEC_SMUL_HIGHPART and UNSPEC_UMUL_HIGHPART.
19141 * config/aarch64/aarch64-sve.md (<su>mul<mode>3_highpart): New
19143 (*<su>mul<mode>3_highpart): New define_insn.
19145 2018-03-13 Eric Botcazou <ebotcazou@adacore.com>
19148 * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
19151 2018-03-13 Martin Liska <mliska@suse.cz>
19154 * (sem_item_optimizer::sem_item_optimizer): Initialize new
19156 (sem_item_optimizer::~sem_item_optimizer): Release it.
19157 (sem_item_optimizer::merge_classes): Register variable aliases.
19158 (sem_item_optimizer::fixup_pt_set): New function.
19159 (sem_item_optimizer::fixup_points_to_sets): Likewise.
19160 * ipa-icf.h: Declare new variables and functions.
19162 2018-03-13 Jakub Jelinek <jakub@redhat.com>
19164 PR middle-end/84834
19165 * match.pd ((A & C) != 0 ? D : 0): Use INTEGER_CST@2 instead of
19166 integer_pow2p@2 and test integer_pow2p in condition.
19167 (A < 0 ? C : 0): Similarly for @1.
19169 PR middle-end/84831
19170 * stmt.c (parse_output_constraint): If the CONSTRAINT_LEN (*p, p)
19171 characters starting at p contain '\0' character, don't look beyond
19175 * config/i386/i386.md (round<mode>2): For 387 fancy math, disable
19176 pattern if -ftrapping-math -fno-fp-int-builtin-inexact.
19179 * reg-stack.c (change_stack): Change update_end var from int to
19180 rtx_insn *, if non-NULL don't update just BB_END (current_block), but
19181 also call set_block_for_insn on the newly added insns and rescan.
19184 * config/i386/sse.md (sse2_loadhpd): Use Yv constraint rather than v
19185 on the last operand.
19188 * tree.c (stabilize_reference_1): Return save_expr (e) for
19189 STATEMENT_LIST even if it doesn't have side-effects.
19191 2018-03-12 Jonathan Wakely <jwakely@redhat.com>
19193 * doc/invoke.texi (-mclflushopt): Fix spelling of option.
19195 2018-03-12 Renlin Li <renlin.li@arm.com>
19197 * config/aarch64/aarch64.md (movhf_aarch64): Fix mode argument to
19198 aarch64_output_scalar_simd_mov_immediate.
19200 2018-03-12 Martin Sebor <msebor@redhat.com>
19202 PR tree-optimization/83456
19203 * gimple-fold.c (gimple_fold_builtin_memory_op): Avoid warning
19204 for perfectly overlapping calls to memcpy.
19205 (gimple_fold_builtin_memory_chk): Same.
19206 (gimple_fold_builtin_strcpy): Handle no-warning.
19207 (gimple_fold_builtin_stxcpy_chk): Same.
19208 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Handle no-warning.
19210 2018-03-12 Segher Boessenkool <segher@kernel.crashing.org>
19212 * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add bool "named"
19213 parameter. Use it for SFmode.
19214 (rs6000_function_arg_advance_1): Adjust.
19215 (rs6000_function_arg): Adjust.
19216 (rs6000_gimplify_va_arg): Pass false for that new parameter.
19218 2018-03-12 Segher Boessenkool <segher@kernel.crashing.org>
19220 PR rtl-optimization/84169
19221 PR rtl-optimization/84780
19222 * combine.c (can_combine_p): Check for a 2-insn combination whether
19223 the destination register is used between the two insns, too.
19225 2018-03-12 Richard Biener <rguenther@suse.de>
19227 PR tree-optimization/84803
19228 * tree-if-conv.c (ifcvt_memrefs_wont_trap): Don't do anything
19229 for refs DR analysis didn't process.
19231 2018-03-12 Richard Biener <rguenther@suse.de>
19233 PR tree-optimization/84777
19234 * tree-ssa-loop-ch.c (should_duplicate_loop_header_p): For
19235 force-vectorize loops ignore whether we are optimizing for size.
19237 2018-03-12 Chung-Ju Wu <jasonwucj@gmail.com>
19239 * config/nds32/nds32.c (nds32_md_asm_adjust): New function.
19240 (TARGET_MD_ASM_ADJUST): Define.
19242 2018-03-12 Monk Chiang <sh.chiang04@gmail.com>
19243 Kito Cheng <kito.cheng@gmail.com>
19244 Chung-Ju Wu <jasonwucj@gmail.com>
19246 * config/nds32/nds32.c (nds32_compute_stack_frame,
19247 nds32_emit_stack_push_multiple, nds32_emit_stack_pop_multiple,
19248 nds32_emit_stack_v3push, nds32_emit_stack_v3pop,
19249 nds32_emit_adjust_frame, nds32_expand_prologue, nds32_expand_epilogue,
19250 nds32_expand_prologue_v3push, nds32_expand_epilogue_v3pop): Refine.
19251 * config/nds32/nds32.h (NDS32_FIRST_CALLEE_SAVE_GPR_REGNUM,
19252 NDS32_LAST_CALLEE_SAVE_GPR_REGNUM, NDS32_V3PUSH_AVAILABLE_P): New.
19253 * config/nds32/nds32.md (prologue, epilogue): Use macro
19254 NDS32_V3PUSH_AVAILABLE_P to do checking.
19256 2018-03-11 Jakub Jelinek <jakub@redhat.com>
19259 * dwarf2out.c (gen_enumeration_type_die): Don't guard adding
19260 DW_AT_declaration for ENUM_IS_OPAQUE on -gdwarf-4 or -gno-strict-dwarf,
19261 but on TYPE_SIZE. Don't do anything for ENUM_IS_OPAQUE if not creating
19262 a new die. Don't set TREE_ASM_WRITTEN if ENUM_IS_OPAQUE. Guard
19263 addition of most attributes on !orig_type_die or the attribute not
19264 being present already. Assert TYPE_VALUES is NULL for ENUM_IS_OPAQUE.
19266 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
19267 Chung-Ju Wu <jasonwucj@gmail.com>
19269 * config/nds32/nds32.c (nds32_cpu_cpp_builtins): Modify to define
19270 __NDS32_VH__ macro.
19271 * config/nds32/nds32.opt (mvh): New option.
19273 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
19274 Chung-Ju Wu <jasonwucj@gmail.com>
19276 * config/nds32/nds32-protos.h (nds32_cpu_cpp_builtins): Declare
19278 * config/nds32/nds32.c (nds32_cpu_cpp_builtins): New function.
19279 * config/nds32/nds32.h (TARGET_CPU_CPP_BUILTINS): Modify its
19282 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
19283 Chung-Ju Wu <jasonwucj@gmail.com>
19285 * config/nds32/nds32-memory-manipulation.c (nds32_expand_strlen): New
19287 * config/nds32/nds32-multiple.md (strlensi): New pattern.
19288 * config/nds32/nds32-protos.h (nds32_expand_strlen): Declare function.
19290 2018-03-11 Monk Chiang <sh.chiang04@gmail.com>
19291 Kito Cheng <kito.cheng@gmail.com>
19292 Chung-Ju Wu <jasonwucj@gmail.com>
19294 * config/nds32/constants.md (unspec_element): Add UNSPEC_FFB,
19295 UNSPEC_FFMISM and UNSPEC_FLMISM.
19296 * config/nds32/nds32-intrinsic.c (bdesc_2arg): Add builtin description
19297 for ffb, ffmism and flmism.
19298 * config/nds32/nds32-intrinsic.md (unspec_ffb): Define new pattern.
19299 (unspec_ffmism): Ditto.
19300 (unspec_flmism): Ditto.
19301 (nds32_expand_builtin_impl): Check if string extension is available.
19302 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FFB,
19303 NDS32_BUILTIN_FFMISM and NDS32_BUILTIN_FLMISM.
19305 2018-03-10 Vladimir Makarov <vmakarov@redhat.com>
19308 2018-03-09 Vladimir Makarov <vmakarov@redhat.com>
19311 * lra-assigns.c (assign_by_spills): Return a flag of reload
19312 assignment failure. Do not process the reload assignment
19313 failures. Do not spill other reload pseudos if they has the same
19315 (lra_assign): Add a return arg. Set up from the result of
19316 assign_by_spills call.
19317 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
19318 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
19319 usage_insns if it is not NULL.
19320 (spill_hard_reg_in_range): New function.
19321 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
19322 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
19323 function prototypes.
19324 (lra_assign): Change prototype.
19325 * lra.c (lra): Add code to deal with fails by splitting hard reg
19328 2018-03-10 H.J. Lu <hongjiu.lu@intel.com>
19331 * config/i386/i386.opt: Replace Enforcment with Enforcement.
19333 2018-03-10 Alexandre Oliva <aoliva@redhat.com>
19336 * dwarf2out.h (dw_val_class): Add dw_val_class_symview.
19337 (dw_val_node): Add val_symbolic_view.
19338 * dwarf2out.c (dw_line_info_table): Add symviews_since_reset.
19339 (symview_upper_bound): New.
19340 (new_line_info_table): Initialize symviews_since_reset.
19341 (dwarf2out_source_line): Count symviews_since_reset and set
19342 symview_upper_bound.
19343 (dw_val_equal_p): Handle symview.
19344 (add_AT_symview): New.
19345 (print_dw_val): Handle symview.
19346 (attr_checksum, attr_checksum_ordered): Likewise.
19347 (same_dw_val_p, size_of_die): Likewise.
19348 (value_format, output_die): Likewise.
19349 (add_high_low_attributes): Use add_AT_symview for entry_view.
19350 (dwarf2out_finish): Reset symview_upper_bound, clear
19353 2018-03-09 Peter Bergner <bergner@vnet.ibm.com>
19356 * config/rs6000/rs6000.c (rs6000_offsettable_memref_p): New prototype.
19357 Add strict argument and use it.
19358 (rs6000_split_multireg_move): Update for new strict argument.
19359 (mem_operand_gpr): Disallow all non-offsettable addresses.
19360 * config/rs6000/rs6000.md (*movdi_internal64): Use YZ constraint.
19362 2018-03-09 Jakub Jelinek <jakub@redhat.com>
19365 * config/rs6000/rs6000.c (rs6000_gimplify_va_arg): Mark va_arg_tmp
19366 temporary TREE_ADDRESSABLE before gimplification of BUILT_IN_MEMCPY.
19367 * config/powerpcspe/powerpcspe.c (rs6000_gimplify_va_arg): Likewise.
19370 * tree-inline.c (copy_tree_body_r): For INDIRECT_REF of a remapped
19371 decl, use remap_type if we want to use the type.
19373 2018-03-09 Martin Sebor <msebor@redhat.com>
19375 PR tree-optimization/84526
19376 * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
19378 (builtin_access::generic_overlap): Be prepared to handle non-array
19381 2018-03-09 Alexandre Oliva <aoliva@redhat.com>
19383 PR rtl-optimization/84682
19384 * lra-constraints.c (process_address_1): Check is_address flag
19385 for address constraints.
19386 (process_alt_operands): Likewise.
19387 * lra.c (lra_set_insn_recog_data): Pass asm operand locs to
19388 preprocess_constraints.
19389 * recog.h (preprocess_constraints): Add oploc parameter.
19391 * recog.c (preprocess_constraints): Test address_operand for
19392 CT_ADDRESS constraints.
19394 2018-03-09 Vladimir Makarov <vmakarov@redhat.com>
19397 * lra-assigns.c (assign_by_spills): Return a flag of reload
19398 assignment failure. Do not process the reload assignment
19399 failures. Do not spill other reload pseudos if they has the same
19401 (lra_assign): Add a return arg. Set up from the result of
19402 assign_by_spills call.
19403 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
19404 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
19405 usage_insns if it is not NULL.
19406 (spill_hard_reg_in_range): New function.
19407 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
19408 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
19409 function prototypes.
19410 (lra_assign): Change prototype.
19411 * lra.c (lra): Add code to deal with fails by splitting hard reg
19414 2018-03-09 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
19417 * common/config/arm/arm-common.c (arm_parse_arch_option_name):
19418 Accept complain bool parameter. Only emit errors if it is true.
19419 (arm_parse_cpu_option_name): Likewise.
19420 (arm_target_thumb_only): Adjust callers of the above.
19421 * config/arm/arm-protos.h (arm_parse_cpu_option_name): Adjust
19422 prototype to take a default true bool parameter.
19423 (arm_parse_arch_option_name): Likewise.
19425 2018-03-09 David Malcolm <dmalcolm@redhat.com>
19426 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
19430 * Makefile.in (LD_VERSION_SCRIPT_OPTION, LD_SONAME_OPTION): New.
19431 * configure: Regenerate.
19432 * configure.ac ("linker --version-script option"): New.
19433 ("linker soname option"): New.
19435 2018-03-09 Richard Biener <rguenther@suse.de>
19437 PR tree-optimization/84775
19438 * tree-if-conv.c (add_bb_predicate_gimplified_stmts): Delink
19439 immediate uses of predicate stmts and mark them modified.
19442 PR tree-optimization/84178
19443 * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
19445 (version_loop_for_if_conversion): Delay update_ssa call.
19446 (tree_if_conversion): Delay update_ssa until after predicate
19449 2018-03-09 Eric Botcazou <ebotcazou@adacore.com>
19452 * config/i386/winnt.c (i386_pe_seh_cold_init): Use small pre-allocation
19453 when the function accesses prior frames.
19455 2018-03-08 Jakub Jelinek <jakub@redhat.com>
19458 * dwarf2out.c (dw_loc_list): If list && loc_list->first->next, call
19459 gen_llsym, otherwise call maybe_gen_llsym.
19461 PR inline-asm/84742
19462 * recog.c (asm_operand_ok): Return 0 if multi-character constraint
19463 has ',' character inside of it.
19465 2018-03-08 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
19468 * config/aarch64/aarch64.md (*compare_cstore<mode>_insn): Mark pattern
19469 as clobbering CC_REGNUM.
19471 2018-03-08 Richard Biener <rguenther@suse.de>
19473 PR middle-end/84552
19474 * tree-scalar-evolution.c: Include tree-into-ssa.h.
19475 (follow_copies_to_constant): Do not follow SSA names registered
19478 2018-03-08 Richard Biener <rguenther@suse.de>
19480 PR tree-optimization/84178
19481 * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
19483 (version_loop_for_if_conversion): Delay update_ssa call.
19484 (tree_if_conversion): Delay update_ssa until after predicate
19487 2018-03-08 David Malcolm <dmalcolm@redhat.com>
19489 PR tree-optimization/84178
19490 * tree-if-conv.c (release_bb_predicate): Remove the
19491 the assertion that the stmts have NULL use_ops.
19492 Discard the statements, asserting that they haven't
19493 yet been added to a BB.
19495 2018-03-08 Richard Biener <rguenther@suse.de>
19497 PR tree-optimization/84746
19498 * tree-ssa-pre.c (find_leader_in_sets): Deal with SET1 being NULL.
19499 (phi_translate): Pass in destination ANTIC_OUT set.
19500 (phi_translate_1): Likewise. For a simplified result lookup
19501 a leader in ANTIC_OUT and AVAIL_OUT, not the ANTIC_IN sets.
19502 (phi_translate_set): Adjust.
19503 (do_pre_regular_insertion): Likewise.
19504 (do_pre_partial_partial_insertion): Likewise.
19506 2018-03-08 Martin Liska <mliska@suse.cz>
19508 PR gcov-profile/84735
19509 * doc/gcov.texi: Document usage of profile files.
19510 * gcov-io.h: Document changes in the format.
19512 2018-03-08 Alexandre Oliva <aoliva@redhat.com>
19516 * dwarf2out.c (struct dw_line_info_table): Update comments for
19518 (FORCE_RESET_NEXT_VIEW): New.
19519 (FORCE_RESETTING_VIEW_P): New.
19520 (RESETTING_VIEW_P): Check for -1 too.
19521 (ZERO_VIEW_P): Likewise.
19522 (new_line_info_table): Force-reset next view.
19523 (dwarf2out_begin_function): Likewise.
19524 (dwarf2out_source_line): Simplify zero_view_p initialization.
19525 Test FORCE_RESETTING_VIEW_P and RESETTING_VIEW_P instead of
19526 view directly. Omit view when omitting .loc at line 0.
19528 2018-03-08 Jakub Jelinek <jakub@redhat.com>
19530 PR tree-optimization/84740
19531 * tree-switch-conversion.c (process_switch): Call build_constructors
19532 only if info.phi_count is non-zero.
19534 PR tree-optimization/84739
19535 * tree-tailcall.c (find_tail_calls): Check call arguments against
19536 DECL_ARGUMENTS (current_function_decl) rather than
19537 DECL_ARGUMENTS (func) when checking for tail recursion.
19539 2018-03-07 Jakub Jelinek <jakub@redhat.com>
19541 * doc/contrib.texi: Add entries for Martin Liska, David Malcolm,
19542 Marek Polacek, extend Vladimir Makarov's, Jonathan Wakely's and
19543 Volker Reichelt's entry and add entries for people that perform
19544 GCC fuzzy testing and report numerous bugs.
19546 2018-03-07 Segher Boessenkool <segher@kernel.crashing.org>
19549 * config/rs6000/rs6000.c (rs6000_elf_in_small_data_p): Don't put
19550 readonly data in sdata, if that is disabled.
19551 * config/rs6000/sysv4.opt (mreadonly-in-sdata): New option.
19552 * doc/invoke.texi (RS/6000 and PowerPC Options): Document
19553 -mreadonly-in-sdata option.
19555 2018-03-07 Martin Sebor <msebor@redhat.com>
19557 PR tree-optimization/84468
19558 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Consider successor
19559 basic block when looking for nul assignment.
19561 2018-03-07 Eric Botcazou <ebotcazou@adacore.com>
19564 * except.h (output_function_exception_table): Adjust prototype.
19565 * except.c (output_function_exception_table): Remove FNNAME parameter
19566 and add SECTION parameter. Ouput one part of the table at a time.
19567 * final.c (final_scan_insn_1) <NOTE_INSN_SWITCH_TEXT_SECTIONS>: Output
19568 the first part of the exception table and emit unwind directives.
19569 * config/i386/i386-protos.h (i386_pe_end_cold_function): Declare.
19570 (i386_pe_seh_cold_init): Likewise.
19571 * config/i386/cygming.h (ASM_DECLARE_COLD_FUNCTION_NAME): New macro.
19572 (ASM_DECLARE_COLD_FUNCTION_SIZE): Likewise.
19573 * config/i386/i386.c (x86_expand_epilogue): Fix wording in comment.
19574 (ix86_output_call_insn): Emit a nop in one more case for SEH.
19575 * config/i386/winnt.c: Include except.h.
19576 (struct seh_frame_state): Add reg_offset, after_prologue and
19577 in_cold_section fields.
19578 (i386_pe_seh_end_prologue): Set seh->after_prologue.
19579 (i386_pe_seh_cold_init): New function.
19580 (i386_pe_seh_fini): Add COLD parameter and bail out if it is not equal
19581 to seh->in_cold_section.
19582 (seh_emit_push): Record the offset of the push.
19583 (seh_emit_save): Record the offet of the save.
19584 (i386_pe_seh_unwind_emit): Deal with NOTE_INSN_SWITCH_TEXT_SECTIONS.
19585 Test seh->after_prologue to disregard the epilogue.
19586 (i386_pe_end_function): Pass FALSE to i386_pe_seh_fini.
19587 (i386_pe_end_cold_function): New function.
19589 2018-03-07 Jakub Jelinek <jakub@redhat.com>
19592 * config/aarch64/predicates.md (aarch64_simd_reg_or_zero): Use
19593 aarch64_simd_or_scalar_imm_zero rather than aarch64_simd_imm_zero.
19596 * gimple-expr.c (create_tmp_var_raw): Set DECL_NAMELESS flag
19598 * tree-pretty-print.c (dump_decl_name): For TDF_COMPARE_DEBUG,
19599 don't print names of DECL_NAMELESS DECL_IGNORED_P decls.
19601 PR middle-end/84723
19602 * multiple_target.c: Include tree-inline.h and intl.h.
19603 (expand_target_clones): Diagnose and fail if node->definition and
19604 !tree_versionable_function_p (node->decl).
19606 2018-03-06 John David Anglin <danglin@gcc.gnu.org>
19608 * config/pa/pa.h (ASM_GENERATE_INTERNAL_LABEL): Revise to use
19610 (ASM_OUTPUT_ADDR_VEC_ELT): Revise for above change.
19611 (ASM_OUTPUT_ADDR_DIFF_ELT): Likewise.
19612 * config/pa/pa64-hpux.h (ASM_GENERATE_INTERNAL_LABEL): Revise as above.
19614 2018-03-06 Jakub Jelinek <jakub@redhat.com>
19617 * combine.c (try_combine): Use reg_or_subregno instead of handling
19618 just paradoxical SUBREGs and REGs.
19620 2018-03-06 Claudiu Zissulescu <claziss@synopsys.com>
19622 * config/arc/arc.c (arc_finalize_pic): Remove function.
19623 (arc_must_save_register): We use single base PIC register, remove
19624 checks to save/restore the PIC register.
19625 (arc_expand_prologue): Likewise.
19626 * config/arc/arc-protos.h (arc_set_default_type_attributes):
19628 (arc_verify_short): Likewise.
19629 (arc_attr_type): Likewise.
19630 * config/arc/arc.c (arc_set_default_type_attributes): Remove.
19631 (walk_stores): Likewise.
19632 (arc_address_cost): Make it static.
19633 (arc_verify_short): Likewise.
19634 (branch_dest): Likewise.
19635 (arc_attr_type): Likewise.
19636 * config/arc/arc.c (TARGET_ADJUST_INSN_LENGTH): Remove.
19637 (TARGET_INSN_LENGTH_PARAMETERS): Likewise.
19638 (arc_final_prescan_insn): Remove inserting the nops due to
19639 hardware hazards. It is done in reorg step.
19640 (insn_length_variant_t): Remove.
19641 (insn_length_parameters_t): Likewise.
19642 (arc_insn_length_parameters): Likewise.
19643 (arc_get_insn_variants): Likewise.
19644 * config/arc/arc.h (TARGET_UPSIZE_DBR): Remove.
19646 2018-03-06 Jakub Jelinek <jakub@redhat.com>
19648 PR inline-asm/84683
19649 * reg-stack.c (move_for_stack_reg): If any_malformed_asm, avoid
19652 PR tree-optimization/84687
19653 * omp-simd-clone.c (simd_clone_create): Clear DECL_BUILT_IN_CLASS
19655 * match.pd (pow(C,x)*expN(y) -> expN(logN(C)*x+y)): New optimization.
19657 2018-03-05 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
19659 * config/rs6000/rs6000-builtin.def (rs6000_speculation_barrier):
19660 Rename to ppc_speculation_barrier.
19661 * config/rs6000/rs6000.c (rs6000_init_builtins): Rename builtin to
19662 __builtin_ppc_speculation_barrier.
19664 2018-03-05 Jakub Jelinek <jakub@redhat.com>
19667 * combine.c (combine_simplify_rtx): Don't try to simplify if
19668 if_then_else_cond returned non-NULL, but either true_rtx or false_rtx
19671 2018-03-05 Segher Boessenkool <segher@kernel.crashing.org>
19673 * config/rs6000/rs6000.c (rs6000_loop_align): Don't align tiny loops
19674 to 32 bytes when compiling for POWER9.
19676 2018-03-05 Jakub Jelinek <jakub@redhat.com>
19679 * config/i386/i386.c (ix86_function_ok_for_sibcall): Check for
19680 regparm >= 3 with no arg reg available also for calls with
19681 flag_force_indirect_call. Pass decl to ix86_function_regparm.
19684 * config/i386/sse.md (*<code><mode>3): Replace <mask_prefix3> with
19686 (*<plusminus_insn><mode>3): Likewise. Remove <mask_operand3> uses.
19688 2018-03-05 Peter Bergner <bergner@vnet.ibm.com>
19691 * config/rs6000/vector.md (mov<mode>): Disallow altivec memory operands.
19693 2018-03-05 Richard Biener <rguenther@suse.de>
19695 PR tree-optimization/84486
19696 * tree-ssa-pre.c (create_expression_by_pieces): Remove dead code.
19697 When inserting a __builtin_assume_aligned call set the LHS
19698 SSA name alignment info accordingly.
19700 2018-03-05 Wilco Dijkstra <wdijkstr@arm.com>
19702 PR tree-optimization/84114
19703 * config/aarch64/aarch64.c (aarch64_reassociation_width)
19704 Avoid reassociation of FLOAT_MODE addition.
19706 2018-03-05 Olga Makhotina <olga.makhotina@intel.com>
19708 * common/config/i386/i386-common.c (OPTION_MASK_ISA_PCONFIG_SET,
19709 OPTION_MASK_ISA_PCONFIG_UNSET, OPTION_MASK_ISA_WBNOINVD_SET,
19710 OPTION_MASK_ISA_WBNOINVD_UNSET): New definitions.
19711 (ix86_handle_option): Handle -mpconfig and -mwbnoinvd.
19712 * config.gcc (pconfigintrin.h, wbnoinvdintrin.h) : Add headers.
19713 * config/i386/cpuid.h (bit_PCONFIG, bit_WBNOINVD): New.
19714 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mpconfig
19716 * config/i386/i386-builtin.def (__builtin_ia32_wbnoinvd,
19717 __builtin_ia32_wbinvd): New builtins.
19718 (SPECIAL_ARGS2): New.
19719 * config/i386/i386-c.c (__WBNOINVD__, __PCONFIG__): New.
19720 (SPECIAL_ARGS2): New.
19721 * config/i386/i386.c (ix86_target_string): Add -mpconfig and -mwbnoinvd.
19722 (ix86_valid_target_attribute_inner_p): Ditto.
19723 (ix86_init_mmx_sse_builtins): Add special_args2.
19724 * config/i386/i386.h (TARGET_PCONFIG, TARGET_PCONFIG_P, TARGET_WBNOINVD,
19725 TARGET_WBNOINVD_P): New.
19726 * config/i386/i386.md (UNSPECV_WBINVD, UNSPECV_WBNOINVD): New.
19727 (define_insn "wbinvd", define_insn "wbnoinvd"): New.
19728 * config/i386/i386.opt: Add -mpconfig and -mwbnoinvd.
19729 * config/i386/immintrin.h (_wbinvd): New intrinsic.
19730 * config/i386/pconfigintrin.h: New file.
19731 * config/i386/wbnoinvdintrin.h: Ditto.
19732 * config/i386/x86intrin.h: Add headers pconfigintrin.h and
19734 * doc/invoke.texi (-mpconfig, -mwbnoinvd): New.
19736 2018-03-05 Richard Biener <rguenther@suse.de>
19738 PR tree-optimization/84670
19739 * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
19741 (BB_VISITED_WITH_VISITED_SUCCS): New define.
19742 (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
19743 (compute_antic_aux): Only assert the number of values in ANTIC_IN
19744 doesn't grow if all successors (recursively) were visited at least
19747 2018-03-05 Richard Biener <rguenther@suse.de>
19749 PR tree-optimization/84650
19750 * tree-ssa-loop-im.c (pass_lim::execute): Reset the SCEV cache
19751 if executed in the loop pipeline.
19753 2018-03-05 Sandra Loosemore <sandra@codesourcery.com>
19755 * doc/configfiles.texi (Configuration Files): Move info about
19756 conditionalizing $target-protos.h to...
19757 * doc/sourcebuild.texi (Back End): Here. Explain how $target.h
19758 differs from $target-protos.h.
19760 2018-03-05 Kito Cheng <kito.cheng@gmail.com>
19761 Chung-Ju Wu <jasonwucj@gmail.com>
19763 * config/nds32/nds32-protos.h (nds32_expand_setmem): Declare.
19764 * config/nds32/nds32-multiple.md (setmemsi): Define.
19765 * config/nds32/nds32-memory-manipulation.c
19766 (nds32_gen_dup_4_byte_to_word_value): New.
19767 (emit_setmem_word_loop): New.
19768 (emit_setmem_byte_loop): New.
19769 (nds32_expand_setmem_loop): New.
19770 (nds32_expand_setmem_loop_v3m): New.
19771 (nds32_expand_setmem_unroll): New.
19772 (nds32_expand_setmem): New.
19774 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
19775 Chung-Ju Wu <jasonwucj@gmail.com>
19777 * config/nds32/nds32-memory-manipulation.c
19778 (nds32_emit_load_store): New.
19779 (nds32_emit_post_inc_load_store): New.
19780 (nds32_emit_mem_move): New.
19781 (nds32_emit_mem_move_block): New.
19782 (nds32_expand_movmemsi_loop_unknown_size): New.
19783 (nds32_expand_movmemsi_loop_known_size): New.
19784 (nds32_expand_movmemsi_loop): New.
19785 (nds32_expand_movmemsi_unroll): New.
19786 (nds32_expand_movmemqi): Rename ...
19787 (nds32_expand_movmemsi): ... to this.
19788 * config/nds32/nds32-multiple.md (movmemqi): Rename ...
19789 (movmemsi): ... to this.
19790 * config/nds32/nds32-protos.h (nds32_expand_movmemqi): Rename ...
19791 (nds32_expand_movmemsi): ... to this.
19793 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
19794 Monk Chiang <sh.chiang04@gmail.com>
19795 Chung-Ju Wu <jasonwucj@gmail.com>
19797 * config/nds32/nds32-protos.h
19798 (nds32_expand_load_multiple): New arguments.
19799 (nds32_expand_store_multiple): Ditto.
19800 (nds32_valid_multiple_load_store): Rename ...
19801 (nds32_valid_multiple_load_store_p): ... to this.
19802 * config/nds32/nds32-memory-manipulation.c
19803 (nds32_expand_load_multiple): Refine implementation.
19804 (nds32_expand_store_multiple): Ditto.
19805 * config/nds32/nds32-multiple.md
19806 (load_multiple): Update nds32_expand_load_multiple interface.
19807 (store_multiple): Update nds32_expand_store_multiple interface.
19808 * config/nds32/nds32-predicates.c
19809 (nds32_valid_multiple_load_store): Rename ...
19810 (nds32_valid_multiple_load_store_p): ... to this and refine
19812 * config/nds32/predicates.md
19813 (nds32_load_multiple_and_update_address_operation): New predicate.
19814 (nds32_store_multiple_and_update_address_operation): New predicate.
19816 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
19817 Chung-Ju Wu <jasonwucj@gmail.com>
19819 * config/nds32/nds32.md (type): Add load_multiple and store_multiple.
19820 (combo): New attribute.
19821 * config/nds32/nds32-multiple.md: Refine patterns with new attributes.
19823 2018-03-03 Chung-Ju Wu <jasonwucj@gmail.com>
19825 * config/nds32/nds32.opt: Change -mcmodel= default value.
19827 2018-03-03 Kito Cheng <kito.cheng@gmail.com>
19828 Monk Chiang <sh.chiang04@gmail.com>
19829 Chung-Ju Wu <jasonwucj@gmail.com>
19831 * config/nds32/constants.md (unspec_element): New enum.
19832 * config/nds32/constraints.md (Umw): New constraint.
19833 * config/nds32/nds32-intrinsic.c: Add more builtin functions.
19834 * config/nds32/nds32-intrinsic.md: Likewise.
19835 * config/nds32/nds32-md-auxiliary.c (nds32_regno_to_enable4): New.
19836 (nds32_valid_smw_lwm_base_p): New.
19837 (nds32_output_smw_single_word): New.
19838 (nds32_output_lmw_single_word): New.
19839 (nds32_expand_unaligned_load): New.
19840 (nds32_expand_unaligned_store): New.
19841 * config/nds32/nds32-protos.h (nds32_valid_smw_lwm_base_p): Declare.
19842 (nds32_output_smw_single_word): Declare.
19843 (nds32_output_lmw_single_word): Declare.
19844 (nds32_expand_unaligned_load): Declare.
19845 (nds32_expand_unaligned_store): Declare.
19846 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_UALOAD_HW,
19847 NDS32_BUILTIN_UALOAD_W, NDS32_BUILTIN_UALOAD_DW,
19848 NDS32_BUILTIN_UASTORE_HW, NDS32_BUILTIN_UASTORE_W,
19849 NDS32_BUILTIN_UASTORE_DW.
19850 * config/nds32/predicates.md (nds32_lmw_smw_base_operand): New
19853 2018-03-03 Monk Chiang <sh.chiang04@gmail.com>
19854 Kito Cheng <kito.cheng@gmail.com>
19855 Chung-Ju Wu <jasonwucj@gmail.com>
19857 * config/nds32/nds32-intrinsic.c
19858 (nds32_expand_builtin_null_ftype_reg): Delete.
19859 (nds32_expand_builtin_reg_ftype_imm): Ditto.
19860 (nds32_expand_builtin_null_ftype_reg_imm): Ditto.
19861 (nds32_read_argument): New.
19862 (nds32_legitimize_target): Ditto.
19863 (nds32_legitimize_argument): Ditto.
19864 (nds32_check_constant_argument): Ditto.
19865 (nds32_expand_unop_builtin): Ditto.
19866 (nds32_expand_unopimm_builtin): Ditto.
19867 (nds32_expand_binop_builtin): Ditto.
19868 (nds32_builtin_decl_impl): Ditto.
19869 (builtin_description): Ditto.
19870 (nds32_expand_builtin_impl): Rewrite with new infrastructure.
19871 (nds32_init_builtins_impl): Ditto.
19872 * config/nds32/nds32.c (TARGET_BUILTIN_DECL): Define.
19873 (nds32_builtin_decl): New.
19874 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_COUNT.
19875 * config/nds32/nds32-protos.h (nds32_builtin_decl_impl): Declare.
19877 2018-03-02 Jeff Law <law@redhat.com>
19879 * reorg.c (stop_search_p): Handle DEBUG_INSN.
19880 (redundant_insn, fill_simple_delay_slots): Likewise.
19881 (fill_slots_from_thread): Likewise.
19882 * resource.c (mark_referenced_resources): Likewise.
19883 (mark_set_resources, find_dead_or_set_registers): Likewise.
19885 2018-03-02 Jakub Jelinek <jakub@redhat.com>
19887 * substring-locations.h (format_warning_va): Formatting fix for
19888 ATTRIBUTE_GCC_DIAG.
19889 (format_warning_at_substring): Fix up ATTRIBUTE_GCC_DIAG second
19891 (format_warning_n_va, format_warning_at_substring_n): New prototypes.
19892 * substring-locations.c: Include intl.h.
19893 (format_warning_va): Turned into small wrapper around
19894 format_warning_n_va, renamed to ...
19895 (format_warning_n_va): ... this, add N and PLURAL_GMSGID arguments,
19896 rename GMSGID to SINGULAR_GMSGID, if SINGULAR_GMSGID != PLURAL_GMSGID,
19898 (format_warning_at_substring_n): New function.
19899 * gimple-ssa-sprintf.c: Remove GCC diagnostic ignored pragma.
19900 (fmtwarn): Add ATTRIBUTE_GCC_DIAG. Turn into a copy of
19901 format_warning_at_substring with just a shorter name instead of
19902 const function pointer.
19903 (fmtwarn_n): New function.
19904 (maybe_warn, format_directive, parse_directive): Use fmtwarn_n where
19905 appropriate, get rid of all the fmtstr temporaries, move conditionals
19906 with G_() wrapped string literals directly into fmtwarn arguments,
19907 cast dir.len to (int), formatting fixes.
19909 2018-03-02 Thomas Schwinge <thomas@codesourcery.com>
19911 * doc/invoke.texi: Remove "Cilk Plus" references.
19913 2018-03-02 Jakub Jelinek <jakub@redhat.com>
19914 Richard Biener <rguenther@suse.de>
19917 * expr.c (expand_expr_real_1) <case CALL_EXPR>: Don't emit diagnostics
19918 for error or warning attributes if CALL_FROM_THUNK_P is set.
19921 2018-03-02 Jakub Jelinek <jakub@redhat.com>
19924 * config/pa/pa.h (TARGET_CPU_CPP_BUILTINS): Predefine
19925 __SIZEOF_128__ macro if HPUX_LONG_DOUBLE_LIBRARY.
19928 * config/ia64/ia64.h (TARGET_CPU_CPP_BUILTINS): Predefine
19929 __SIZEOF_{FPREG,FLOAT{80,128}}__ macros.
19931 * predict.c (test_prediction_value_range): Use PROB_UNINITIALIZED
19932 instead of -1U in last predictors element's probability member.
19934 2018-03-02 Eric Botcazou <ebotcazou@adacore.com>
19937 * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
19938 arguments if they are comparable.
19940 2018-03-02 Richard Sandiford <richard.sandiford@linaro.org>
19942 PR tree-optimization/84634
19943 * tree-vect-stmts.c (vectorizable_store, vectorizable_load): Replace
19944 masks and masked_loop_p with a single loop_masks, making sure it's
19945 null for bb vectorization.
19947 2018-03-02 Richard Sandiford <richard.sandiford@linaro.org>
19949 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
19950 (vect_analyze_data_ref_access): Use loop->safe_len rather than
19951 loop->force_vectorize to check whether there is no alias.
19953 2018-03-02 Jakub Jelinek <jakub@redhat.com>
19956 * rtl.h (prev_real_nondebug_insn, next_real_nondebug_insn): New
19958 * emit-rtl.c (next_real_insn, prev_real_insn): Fix up function
19960 (next_real_nondebug_insn, prev_real_nondebug_insn): New functions.
19961 * cfgcleanup.c (try_head_merge_bb): Use prev_real_nondebug_insn
19962 instead of a loop around prev_real_insn.
19963 * combine.c (move_deaths): Use prev_real_nondebug_insn instead of
19966 PR inline-asm/84625
19967 * config/i386/i386.c (ix86_print_operand): Use conditional
19968 output_operand_lossage instead of gcc_assert if CONST_VECTOR is not
19971 2018-03-02 Richard Biener <rguenther@suse.de>
19973 PR tree-optimization/84427
19974 * tree-ssa-pre.c (bitmap_remove_expr_from_set): Remove.
19975 (bitmap_set_subtract_values): Rewrite to handle multiple
19978 (prune_clobbered_mems): Likewise.
19979 (phi_translate): Take edge instead of pred/phiblock.
19980 (phi_translate_1): Likewise.
19981 (phi_translate_set): Likewise. Insert all translated
19982 exprs for a value into the set, keeping possibly multiple
19983 expressions per value.
19984 (compute_antic_aux): Adjust for phi_translate changes.
19985 When intersecting union the expressions and prune those
19986 not in the final value set, keeping possibly multiple
19987 expressions per value. Do not use value-insertion
19988 for unioning ANTIC_OUT U EXP_GEN - TMP_GEN but merge
19989 all expressions. Add verification that the value-sets
19990 only shrink during iteration.
19991 (compute_partial_antic_aux): Adjust for the phi_translate changes.
19992 (do_pre_regular_insertion): Likewise.
19993 (do_pre_partial_partial_insertion): Likewise.
19995 2018-03-02 Richard Biener <rguenther@suse.de>
19998 * config/darwin.c (saved_debug_info_level): New static global.
19999 (darwin_asm_lto_start): Disable debug info generation for LTO out.
20000 (darwin_asm_lto_end): Restore debug info generation settings.
20002 2018-03-01 Martin Liska <mliska@suse.cz>
20005 * sanopt.c (sanitize_rewrite_addressable_params): Do not handle
20006 volatile arguments.
20008 2018-03-01 Richard Biener <rguenther@suse.de>
20011 * dwarf2out.c (gen_variable_die): Properly handle late VLA
20012 type annotation with LTO when debug was disabled at compile-time.
20014 2018-03-01 Matthew Fortune <mfortune@gmail.com>
20016 * config/mips/mips.c (mips_final_prescan_insn): Fix incorrect
20018 (mips_final_postscan_insn): Likewise.
20020 2018-03-01 Richard Sandiford <richard.sandiford@linaro.org>
20022 PR rtl-optimization/84528
20023 * alias.c (init_alias_target): Add commentary.
20024 (init_alias_analysis): Only give HARD_FRAME_POINTER_REGNUM
20025 a unique base value if the frame pointer is not eliminated
20026 to the stack pointer.
20028 2018-03-01 Tom de Vries <tom@codesourcery.com>
20030 PR rtl-optimization/83327
20031 * lra-int.h (hard_regs_spilled_into): Declare.
20032 * lra.c (hard_regs_spilled_into): Define.
20033 (init_reg_info): Init hard_regs_spilled_into.
20034 * lra-spills.c (assign_spill_hard_regs): Update hard_regs_spilled_into.
20035 * lra-lives.c (make_hard_regno_born, make_hard_regno_dead)
20036 (process_bb_lives): Handle hard_regs_spilled_into.
20037 (lra_create_live_ranges_1): Before doing liveness propagation, clear
20038 regs in all_hard_regs_bitmap if set in hard_regs_spilled_into.
20040 2018-02-28 David Edelsohn <dje.gcc@gmail.com>
20042 * config.gcc (powerpc-ibm-aix7.1.*): New stanza.
20043 (powerpc-ibm-aix[789]*): Default to AIX 7.2.
20044 * config/rs6000/aix71.h (TARGET_DEFAULT): Revert to Power4 ISA.
20045 * config/rs6000/aix72.h: New file.
20047 2018-02-28 Jakub Jelinek <jakub@redhat.com>
20049 * gimple-ssa-warn-restrict.c (maybe_diag_overlap): Use warning_n
20050 instead of warning_at with conditional singular and plural messages
20054 * stor-layout.c (update_alignment_for_field): For
20055 targetm.ms_bitfield_layout_p (rli->t), if !is_bitfield
20056 && !DECL_PACKED (field), do the alignment update, just use
20057 only desired_align instead of MAX (type_align, desired_align)
20059 (place_field): Don't do known_align < desired_align handling
20060 early if targetm.ms_bitfield_layout_p (rli->t) and rli->prev_field
20061 is non-NULL, instead do it after rli->prev_field handling and
20062 only if not within a bitfield word. For DECL_PACKED (field)
20063 use type_align of BITS_PER_UNIT.
20065 2018-02-28 Eric Botcazou <ebotcazou@adacore.com>
20067 * config/aarch64/aarch64.c (aarch64_emit_probe_stack_range): Remove
20068 superfluous parentheses and trailing spaces.
20070 2018-02-28 Richard Biener <rguenther@suse.de>
20072 PR tree-optimization/84584
20073 * graphite-scop-detection.c (scop_detection::add_scop): Discard
20074 SCoPs with fake exit edge.
20076 2018-02-28 Martin Liska <mliska@suse.cz>
20079 * timevar.c (timer::print): Fix format to properly print 100%
20082 2018-02-28 Richard Biener <rguenther@suse.de>
20084 PR middle-end/84607
20085 * genmatch.c (capture_info::walk_match): Do not mark
20086 captured expressions without operands as expr_p given
20087 they act more like predicates and should be subject to
20088 "lost tail" side-effect preserving.
20090 2018-02-28 Alexandre Oliva <aoliva@redhat.com>
20092 PR rtl-optimization/81611
20093 * auto-inc-dec.c (attempt_change): Move dead note from
20094 mem_insn if it's the next use of regno
20095 (find_address): Take address use of reg holding
20096 non-incremented value. Add parm to limit search to the named
20098 (merge_in_block): Attempt to use a mem insn that is the next
20099 use of the original regno.
20101 2018-02-27 Martin Sebor <msebor@redhat.com>
20104 * doc/invoke.texi (-Wmissing-attributes): New option.
20105 * print-tree.c (print_node): Handle DECL_UNINLINABLE.
20107 2018-02-27 Martin Sebor <msebor@redhat.com>
20109 PR translation/84207
20110 * diagnostic-core.h (warning_n, error_n, inform_n): Change
20111 n argument to unsigned HOST_WIDE_INT.
20112 * diagnostic.c (warning_n, error_n, inform_n): Ditto.
20113 (diagnostic_n_impl): Ditto. Handle arguments in excess of LONG_MAX.
20114 * gimple-ssa-sprintf.c (format_directive): Simplify inform_n call.
20115 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Use warning_n.
20117 2018-02-27 Richard Biener <rguenther@suse.de>
20119 PR tree-optimization/84512
20120 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost):
20121 Do not use the estimate returned from record_stmt_cost for
20122 the scalar iteration cost but sum properly using add_stmt_cost.
20124 2018-02-27 Richard Biener <rguenther@suse.de>
20126 PR tree-optimization/84466
20127 * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
20128 Adjust last change to less strictly validate use operands.
20130 2018-02-27 Martin Liska <mliska@suse.cz>
20132 PR gcov-profile/84548
20133 * gcov.c (process_file): Allow partial overlap and consider it
20134 also as group functions.
20135 (output_lines): Properly calculate range of lines for a group.
20137 2018-02-27 Martin Liska <mliska@suse.cz>
20139 * timevar.c (timer::print_row): Remove 'usr', 'sys', 'wall' and
20140 'ggc' suffixes. Change first column width.
20141 (timer::print): Fix formatting of the column.
20143 2018-02-27 Alexandre Oliva <aoliva@redhat.com>
20145 * tree-ssa-live.c (remove_unused_scope_block_p): Do not
20146 preserve inline entry blocks for the sake of debug inline
20147 entry point markers alone.
20148 (remove_unused_locals): Suggest in comments a better place to
20149 force the preservation of inline entry blocks that are
20150 otherwise unused, but do not preserve them.
20152 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
20154 * config/i386/i386.c (ix86_output_indirect_jmp): Update comments.
20156 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
20159 * config/i386/constraints.md (Bs): Replace
20160 ix86_indirect_branch_register with
20161 TARGET_INDIRECT_BRANCH_REGISTER.
20163 * config/i386/i386.md (indirect_jump): Likewise.
20164 (tablejump): Likewise.
20165 (*sibcall_memory): Likewise.
20166 (*sibcall_value_memory): Likewise.
20167 Peepholes of indirect call and jump via memory: Likewise.
20168 (*sibcall_GOT_32): Disallowed for TARGET_INDIRECT_BRANCH_REGISTER.
20169 (*sibcall_value_GOT_32): Likewise.
20170 * config/i386/predicates.md (indirect_branch_operand): Likewise.
20171 (GOT_memory_operand): Likewise.
20172 (call_insn_operand): Likewise.
20173 (sibcall_insn_operand): Likewise.
20174 (GOT32_symbol_operand): Likewise.
20175 * config/i386/i386.h (TARGET_INDIRECT_BRANCH_REGISTER): New.
20177 2018-02-26 Eric Botcazou <ebotcazou@adacore.com>
20179 PR rtl-optimization/83496
20180 * reorg.c (steal_delay_list_from_target): Change REDUNDANT array from
20181 booleans to RTXes. Call fix_reg_dead_note on every non-null element.
20182 (steal_delay_list_from_fallthrough): Call fix_reg_dead_note on a
20183 redundant insn, if any.
20184 (relax_delay_slots): Likewise.
20185 (update_reg_unused_notes): Rename REDUNDANT_INSN to OTHER_INSN.
20187 2018-02-26 Richard Sandiford <richard.sandiford@linaro.org>
20189 PR tree-optimization/83965
20190 * tree-vect-patterns.c (vect_reassociating_reduction_p): Assume
20191 that grouped statements are part of a reduction chain. Return
20192 true if the statement is not marked as a reduction itself but
20193 is part of a group.
20194 (vect_recog_dot_prod_pattern): Don't check whether the statement
20195 is part of a group here.
20196 (vect_recog_sad_pattern): Likewise.
20197 (vect_recog_widen_sum_pattern): Likewise.
20199 2018-02-26 Eric Botcazou <ebotcazou@adacore.com>
20202 * final.c (rest_of_clean_state): Also look for calls inside sequences.
20204 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
20207 * config/i386/i386-protos.h (ix86_output_indirect_jmp): Remove
20209 (ix86_output_indirect_function_return): New prototype.
20210 (ix86_split_simple_return_pop_internal): Likewise.
20211 * config/i386/i386.c (indirect_return_via_cx): New.
20212 (indirect_return_via_cx_bnd): Likewise.
20213 (indirect_thunk_name): Handle return va CX_REG.
20214 (output_indirect_thunk_function): Create alias for
20215 __x86_return_thunk_[re]cx and __x86_return_thunk_[re]cx_bnd.
20216 (ix86_output_indirect_jmp): Remove the bool argument.
20217 (ix86_output_indirect_function_return): New function.
20218 (ix86_split_simple_return_pop_internal): Likewise.
20219 * config/i386/i386.md (*indirect_jump): Don't pass false
20220 to ix86_output_indirect_jmp.
20221 (*tablejump_1): Likewise.
20222 (simple_return_pop_internal): Change it to define_insn_and_split.
20223 Call ix86_split_simple_return_pop_internal to split it for
20224 -mfunction-return=.
20225 (simple_return_indirect_internal): Call
20226 ix86_output_indirect_function_return instead of
20227 ix86_output_indirect_jmp.
20229 2018-02-26 Jakub Jelinek <jakub@redhat.com>
20232 * vec.h (vec_default_construct): For BROKEN_VALUE_INITIALIZATION use
20233 memset and value initialization afterwards.
20235 2018-02-26 Christophe Lyon <christophe.lyon@linaro.org>
20237 * Makefile.in (lto-wrapper): Use ALL_LINKERFLAGS.
20239 2018-02-26 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
20242 * common/config/aarch64/aarch64-common.c
20243 (aarch_option_optimization_table[]): Switch
20244 off fomit-frame-pointer
20246 2018-02-26 Kito Cheng <kito.cheng@gmail.com>
20247 Chung-Ju Wu <jasonwucj@gmail.com>
20249 * config/nds32/nds32-multiple.md (load_multiple): Disallow
20251 (store_multiple): Ditto.
20253 2018-02-26 Kito Cheng <kito.cheng@gmail.com>
20255 * config.gcc: Add --with-cpu support for nds32 target.
20256 * config/nds32/nds32-opts.h (nds32_cpu_type): New.
20257 * config/nds32/nds32.opt: Add -mcpu= option.
20259 2018-02-25 Segher Boessenkool <segher@kernel.crashing.org>
20261 * config/rs6000/rs6000.opt (mvrsave=no, mvrsave=yes, isel=no,
20262 isel=yes): Warn for these deprecated options.
20264 2018-02-23 David Edelsohn <dje.gcc@gmail.com>
20266 * config/rs6000/aix71.h (TARGET_DEFAULT): Change to
20267 ISA_2_5_MASKS_EMBEDDED.
20269 2018-02-23 Jakub Jelinek <jakub@redhat.com>
20271 * ipa-prop.c (ipa_vr_ggc_hash_traits::hash): Hash p->min and
20272 p->max as pointers rather than using iterative_hash_expr.
20274 2018-02-23 Carl Love <cel@us.ibm.com>
20276 * config/rs6000/rs6000-builtin.def: Change VSIGNED2 and VUNSIGNED2
20277 macro expansions from BU_VSX_2 to BU_P8V_VSX_2 and BU_VSX_OVERLOAD_2 to
20279 * config/rs6000/rs6000-c.c: Change VSX_BUILTIN_VEC_VSIGNED2 to
20280 P8V_BUILTIN_VEC_VSIGNED2. Change VSX_BUILTIN_VEC_VUNSIGNED2 to
20281 P8V_BUILTIN_VEC_VUNSIGNED2.
20283 2018-02-22 Vladimir Makarov <vmakarov@redhat.com>
20286 * lra-int.h (LRA_UNKNOWN_ALT, LRA_NON_CLOBBERED_ALT): New macros.
20287 * lra.c (lra_set_insn_recog_data, lra_update_insn_recog_data): Use
20289 * lra-constraints.c (curr_insn_transform): Set up
20290 LRA_NON_CLOBBERED_ALT for moves processed on the fast path. Use
20292 (remove_inheritance_pseudos): Use LRA_UNKNOWN_ALT.
20293 * lra-eliminations.c (spill_pseudos): Ditto.
20294 (process_insn_for_elimination): Ditto.
20295 * lra-lives.c (reg_early_clobber_p): Use the new macros.
20296 * lra-spills.c (spill_pseudos): Use LRA_UNKNOWN_ALT and
20297 LRA_NON_CLOBBERED_ALT.
20299 2018-02-22 Martin Sebor <msebor@redhat.com>
20301 PR tree-optimization/84480
20302 * gimple-fold.c (gimple_fold_builtin_strcpy): Move warnings
20303 to maybe_diag_stxncpy_trunc. Call it.
20304 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Integrate warnings
20305 from gimple_fold_builtin_strcpy. Print inlining stack.
20306 (handle_builtin_stxncpy): Print inlining stack.
20307 * tree-ssa-strlen.h (maybe_diag_stxncpy_trunc): Declare.
20309 2018-02-22 H.J. Lu <hongjiu.lu@intel.com>
20312 * config/i386/i386.c (ix86_set_indirect_branch_type): Issue an
20313 error when -mindirect-branch=thunk-extern, -fcf-protection=branch
20314 and -fcheck-pointer-bounds are used together.
20315 (indirect_thunk_prefix): New enum.
20316 (indirect_thunk_need_prefix): New function.
20317 (indirect_thunk_name): Replace need_bnd_p with need_prefix. Use
20318 "_nt" instead of "_bnd" for NOTRACK prefix.
20319 (output_indirect_thunk): Replace need_bnd_p with need_prefix.
20320 (output_indirect_thunk_function): Likewise.
20322 (ix86_code_end): Update output_indirect_thunk_function calls.
20323 (ix86_output_indirect_branch_via_reg): Replace
20324 ix86_bnd_prefixed_insn_p with indirect_thunk_need_prefix.
20325 (ix86_output_indirect_branch_via_push): Likewise.
20326 (ix86_output_function_return): Likewise.
20327 * doc/invoke.texi: Document -mindirect-branch=thunk-extern is
20328 incompatible with -fcf-protection=branch and
20329 -fcheck-pointer-bounds.
20331 2018-02-22 Steve Ellcey <sellcey@cavium.com>
20334 * config/aarch64/aarch64.c (aarch64_print_address_internal):
20335 Change gcc_assert call to output_operand_lossage.
20337 2018-02-22 Steve Ellcey <sellcey@cavium.com>
20339 * doc/extend.texi (__builtin_extend_pointer): Document builtin.
20341 2018-02-22 DJ Delorie <dj@redhat.com>
20342 Sebastian Perta <sebastian.perta@renesas.com>
20343 Oleg Endo <olegendo@gcc.gnu.org>
20345 * config/rx/rx.c (rx_rtx_costs): New function.
20346 (TARGET_RTX_COSTS): Override to use rx_rtx_costs.
20348 2018-02-22 Thomas Preud'homme <thomas.preudhomme@arm.com>
20350 * config/arm/t-multilib: Map Armv8-R to Armv7 multilibs.
20352 2018-02-22 Martin Liska <mliska@suse.cz>
20355 * common/config/arm/arm-common.c (arm_print_hint_for_cpu_option):
20356 Add "native" as a possible value.
20358 2018-02-22 Martin Liska <mliska@suse.cz>
20361 * config/i386/i386.c (ix86_option_override_internal):
20362 Add "native" as a possible value for -march and -mtune.
20364 2018-02-22 Jakub Jelinek <jakub@redhat.com>
20367 * stor-layout.c (finalize_type_size): Propagate TYPE_EMPTY_P flag
20368 to all type variants.
20370 PR tree-optimization/84503
20371 * gimple-ssa-store-merging.c (merged_store_group::merge_into): Compute
20372 width as info->bitpos + info->bitsize - start.
20373 (merged_store_group::merge_overlapping): Simplify width computation.
20374 (check_no_overlap): New function.
20375 (imm_store_chain_info::try_coalesce_bswap): Compute expected
20376 start + width and last_order of the group, fail if check_no_overlap
20378 (imm_store_chain_info::coalesce_immediate_stores): Don't merge info
20379 to group if check_no_overlap fails.
20381 2018-02-21 Segher Boessenkool <segher@kernel.crashing.org>
20383 * config/rs6000/altivec.md: Delete contraint arguments to
20384 define_expand, define_split, and define_peephole2, and in
20385 define_insn_and_split if always unused.
20386 * config/rs6000/darwin.md: Ditto.
20387 * config/rs6000/dfp.md: Ditto.
20388 * config/rs6000/rs6000.md: Ditto.
20389 * config/rs6000/sync.md: Ditto.
20390 * config/rs6000/vector.md: Ditto.
20391 * config/rs6000/vsx.md: Ditto.
20393 2018-02-21 Segher Boessenkool <segher@kernel.crashing.org>
20395 * config/rs6000/altivec.md: Write output control strings as braced
20396 blocks instead of double-quoted strings.
20397 * config/rs6000/darwin.md: Ditto.
20398 * config/rs6000/rs6000.md: Ditto.
20399 * config/rs6000/vector.md: Ditto.
20400 * config/rs6000/vsx.md: Ditto.
20402 2018-02-21 Jason Merrill <jason@redhat.com>
20404 PR c++/84314 - ICE with templates and fastcall attribute.
20405 * attribs.c (build_type_attribute_qual_variant): Remove assert.
20407 2018-02-21 Jan Hubicka <hubicka@ucw.cz>
20409 * ipa-cp.c (determine_versionability): Fix comment typos.
20411 2018-02-21 Jan Hubicka <hubicka@ucw.cz>
20414 * ipa-cp.c (determine_versionability): Do not version functions caling
20417 2018-02-21 Martin Liska <mliska@suse.cz>
20420 * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch):
20421 Add "native" as a possible value.
20422 * config/aarch64/aarch64.h (HAVE_LOCAL_CPU_DETECT): Define
20423 the macro when native cpu detection is available.
20425 2018-02-21 Martin Liska <mliska@suse.cz>
20428 * common/config/arm/arm-common.c (arm_print_hint_for_arch_option):
20429 Add "native" as a possible value.
20430 * config/arm/arm.h (HAVE_LOCAL_CPU_DETECT): Define the macro
20431 when native cpu detection is available.
20433 2018-02-21 Jakub Jelinek <jakub@redhat.com>
20434 Martin Sebor <msebor@redhat.com>
20436 PR tree-optimization/84478
20437 * gimple-fold.h (get_range_strlen): Add a bool argument defaulted to
20439 * gimple-fold.c (get_range_strlen): Make minlen const and assume it
20440 can't be NULL. Change FUZZY from bool to int, for 1 add PHI/COND_EXPR
20441 support which is conservatively correct, for 2 only stay conservative
20442 for maxlen. Formatting and comment capitalization fixes. Add STRICT
20443 argument to the 2 argument get_range_strlen, adjust 6 arg
20444 get_range_strlen caller and clear minmaxlen[0] and [1] if it returned
20446 (get_maxval_strlen): Adjust 6 arg get_range_strlen caller.
20447 (gimple_fold_builtin_strlen): Pass true as last argument to
20450 2018-02-20 Martin Sebor <msebor@redhat.com>
20452 PR middle-end/84095
20453 * gimple-ssa-warn-restrict.c (builtin_memref::extend_offset_range): New.
20454 (builtin_memref::set_base_and_offset): Same. Handle inner references.
20455 (builtin_memref::builtin_memref): Factor out parts into
20456 set_base_and_offset and call it.
20458 2018-02-20 Richard Sandiford <richard.sandiford@linaro.org>
20460 PR middle-end/84406
20461 * optabs-query.c (find_widening_optab_handler_and_mode): If from_mode
20462 is a scalar_int_mode, assert that to_mode is a scalar_int_mode with
20463 greater precision. If to_mode is a MODE_PARTIAL_INT, stop the
20464 search at the associated MODE_INT.
20466 2018-02-20 Jeff Law <law@redhat.com>
20468 PR middle-end/82123
20469 PR tree-optimization/81592
20470 PR middle-end/79257
20471 * gimple-ssa-sprintf.c (format_integer): Query EVRP range analyzer
20472 for range data rather than using global data.
20473 * gimple-ssa-sprintf.c (get_int_range): Query EVRP range analyzer for
20474 range data rather than using global data.
20475 * gimple-ssa-sprintf.c (get_int_range): Accept vr_values parameter
20476 pass it to children as needed.
20477 (struct directive::fmtresult): Similarly.
20478 (struct directive::set_width): Similarly.
20479 (struct directive::set_precision): Similarly.
20480 (format_integer, format_directive, parse_directive): Similarly.
20481 (format_none): Accept unnamed vr_values parameter.
20482 (format_percent, format_floating, format_character): Similarly.
20483 (format_string, format_plain): Similarly.
20484 * gimple-ssa-sprintf.c (sprintf_dom_walker::handle_gimple_call): Query
20485 the EVRP range analyzer for range data rather than using global data.
20486 * gimple-ssa-sprintf.c: Include alloc-pool.h, vr-values.h and
20487 gimple-ssa-evrp-analyze.h
20488 (class sprintf_dom_walker): Add after_dom_children member function.
20489 Add evrp_range_analyzer member.
20490 (sprintf_dom_walker::before_dom_children): Call into the EVRP
20491 range analyzer as needed.
20492 (sprintf_dom_walker::after_dom_children): New member function.
20493 * gimple-ssa-evrp-analyze.c (evrp_range_analyzer::enter): Do nothing
20495 (evrp_range_analyzer::record_ranges_from_stmt): Likewise.
20496 (evrp_range_analyzer::pop_to_marker): Likewise.
20498 2018-02-20 Richard Sandiford <richard.sandiford@linaro.org>
20500 PR tree-optimization/84419
20501 * internal-fn.c (expand_call_mem_ref): Create a TARGET_MEM_REF
20502 with the required type if its current type is compatible but
20505 2018-02-20 Jakub Jelinek <jakub@redhat.com>
20507 PR middle-end/82004
20508 * match.pd (pow(C,x) -> exp(log(C)*x)): Delay all folding until
20509 after vectorization.
20511 2018-02-20 Martin Liska <mliska@suse.cz>
20514 * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch): Print
20515 possible values if we don't have a hint.
20517 2018-02-20 Martin Liska <mliska@suse.cz>
20521 * final.c (shorten_branches): Build align_tab array with one
20523 * opts.c (finish_options): Add alignment option limit check.
20524 (MAX_CODE_ALIGN): Likewise.
20525 (MAX_CODE_ALIGN_VALUE): Likewise.
20526 * doc/invoke.texi: Document maximum allowed option value for
20527 all -falign-* options.
20529 2018-02-19 Jakub Jelinek <jakub@redhat.com>
20532 * reg-notes.def (REG_CALL_ARG_LOCATION): New reg note.
20533 * insn-notes.def (NOTE_INSN_CALL_ARG_LOCATION): Remove.
20534 * var-tracking.c (emit_note_insn_var_location): Remove all references
20535 to NOTE_INSN_CALL_ARG_LOCATION.
20536 (emit_notes_in_bb): Emit arguments as REG_CALL_ARG_LOCATION note on
20537 the CALL_INSN rather than separate NOTE_INSN_CALL_ARG_LOCATION note.
20538 Use copy_rtx_if_shared.
20539 * dwarf2out.c (gen_subprogram_die): Use XEXP with 0 instead of
20540 NOTE_VAR_LOCATION on ca_loc->call_arg_loc_note.
20541 (dwarf2out_var_location): Remove handling of
20542 NOTE_INSN_CALL_ARG_LOCATION, instead handle REG_CALL_ARG_LOCATION note
20544 * final.c (final_scan_insn): Remove all references to
20545 NOTE_INSN_CALL_ARG_LOCATION.
20546 (rest_of_clean_state): Likewise. Remove REG_CALL_ARG_LOCATION notes
20547 before dumping final insns.
20548 * except.c (emit_note_eh_region_end): Remove all references to
20549 NOTE_INSN_CALL_ARG_LOCATION.
20550 * config/alpha/alpha.c (alpha_pad_function_end): Likewise.
20551 * config/c6x/c6x.c (c6x_gen_bundles): Likewise.
20552 * config/arc/arc.c (hwloop_optimize): Likewise.
20553 * config/arm/arm.c (create_fix_barrier): Likewise.
20554 * config/s390/s390.c (s390_chunkify_start): Likewise.
20555 * config/sh/sh.c (find_barrier): Likewise.
20556 * config/i386/i386.c (rest_of_insert_endbranch,
20557 ix86_seh_fixup_eh_fallthru): Likewise.
20558 * config/xtensa/xtensa.c (hwloop_optimize): Likewise.
20559 * config/iq2000/iq2000.c (final_prescan_insn): Likewise.
20560 * config/frv/frv.c (frv_function_prologue): Likewise.
20561 * emit-rtl.c (try_split): Likewise. Copy over REG_CALL_ARG_LOCATION
20563 (note_outside_basic_block_p): Remove all references to
20564 NOTE_INSN_CALL_ARG_LOCATION.
20565 * gengtype.c (adjust_field_rtx_def): Likewise.
20566 * print-rtl.c (rtx_writer::print_rtx_operand_code_0, print_insn):
20568 * jump.c (cleanup_barriers, delete_related_insns): Likewise.
20569 * cfgrtl.c (force_nonfallthru_and_redirect): Likewise.
20572 * builtins.c (builtin_mathfn_code): Don't check if CALL_EXPR_FN (t)
20575 PR tree-optimization/84452
20576 * tree-vect-patterns.c (vect_recog_pow_pattern): Don't call
20577 expand_simd_clones if targetm.simd_clone.compute_vecsize_and_simdlen
20580 2018-02-19 Martin Liska <mliska@suse.cz>
20583 * passes.def: Put pass_sancov_O0 before pass_lower_switch with -O0.
20585 2018-02-19 Martin Liska <mliska@suse.cz>
20586 Richard Sandiford <richard.sandiford@linaro.org>
20588 PR tree-optimization/82491
20589 * gimple-fold.c (get_base_constructor): Make earlier bail out
20592 2018-02-19 Carl Love <cel@us.ibm.com>
20594 * config/rs6000/rs6000-builtin.def: Change NEG macro expansions from
20595 BU_ALTIVEC_A to BU_P8V_AV_1 and BU_ALTIVEC_OVERLOAD_1 to
20597 * config/rs6000/rs6000-c.c: Change ALTIVEC_BUILTIN_VEC_NEG to
20598 P8V_BUILTIN_VEC_NEG.
20600 2018-02-19 Sebastian Perta <sebastian.perta@renesas.com>
20602 * config/rl78/rl78.md (movdf): New define expand.
20604 2018-02-19 Martin Liska <mliska@suse.cz>
20607 * doc/invoke.texi: Fix typo.
20608 * params.def (PARAM_MAX_LOOP_HEADER_INSNS): Likewise.
20610 2018-02-18 Segher Boessenkool <segher@kernel.crashing.org>
20612 * config/rs6000/rs6000.c (rs6000_option_override_internal): Don't
20613 handle rs6000_single_float and rs6000_double_float specially for
20616 2018-02-16 Jeff Law <law@redhat.com>
20618 * config/rx/rx.c (add_pop_cfi_notes): New function.;
20619 (pop_regs): Use it.
20621 2018-02-16 Jakub Jelinek <jakub@redhat.com>
20624 * ipa-inline.c (inline_small_functions): Fix a typo.
20626 2018-02-16 Nathan Sidwell <nathan@acm.org>
20628 * doc/extend.texi (Backwards Compatibility): Americanize 'behaviour'.
20630 2018-02-16 Carl Love <cel@us.ibm.com>
20632 * config/rs6000/rs6000-builtin.def: Add BU_P8V_VSX_2 macro definition.
20633 Change FLOAT2 expansions from BU_VSX_2 to BU_P8V_VSX_2 and
20634 from BU_VSX_OVERLOAD_2 to BU_P8V_OVERLOAD_2.
20635 * config/rs6000/rs6000-c.c: Changed macro VSX_BUILTIN_VEC_FLOAT2
20636 expansion to P8V_BUILTIN_VEC_FLOAT2.
20638 2018-02-16 Vladimir Makarov <vmakarov@redhat.com>
20640 PR rtl-optimization/70023
20641 * lra-constraints.c (inherit_in_ebb): Take hard reg mode of
20642 src_regno into account.
20644 2018-02-16 Carl Love <cel@us.ibm.com>
20646 * config/rs6000/altivec.h: Remove vec_vextract4b and vec_vinsert4b.
20647 * config/rs6000/rs6000-builtin.def: Remove macro expansion for
20648 VEXTRACT4B, VINSERT4B, VINSERT4B_DI and VEXTRACT4B.
20649 * config/rs6000/rs6000.c: Remove case statements for
20650 P9V_BUILTIN_VEXTRACT4B, P9V_BUILTIN_VEC_VEXTRACT4B,
20651 P9V_BUILTIN_VINSERT4B, P9V_BUILTIN_VINSERT4B_DI,
20652 and P9V_BUILTIN_VEC_VINSERT4B.
20653 * config/rs6000/rs6000-c.c (altivec_expand_builtin): Remove entries for
20654 P9V_BUILTIN_VEC_VEXTRACT4B and P9V_BUILTIN_VEC_VINSERT4B.
20655 * config/rs6000/vsx.md:
20656 * doc/extend.texi: Remove vec_vextract4b, non ABI definitions for
20659 2018-02-16 Carl Love <cel@us.ibm.com>
20661 * config/rs6000/altivec.h: Add builtin names vec_extract4b
20663 * config/rs6000/rs6000-builtin.def: Add INSERT4B and EXTRACT4B
20665 * config/rs6000/rs6000-c.c: Add the definitions for
20666 P9V_BUILTIN_VEC_EXTRACT4B and P9V_BUILTIN_VEC_INSERT4B.
20667 * config/rs6000/rs6000.c (altivec_expand_builtin): Add
20668 P9V_BUILTIN_EXTRACT4B and P9V_BUILTIN_INSERT4B case statements.
20669 * config/rs6000/vsx.md: Add define_insn extract4b. Add define_expand
20670 definition for insert4b and define insn *insert3b_internal.
20671 * doc/extend.texi: Add documentation for vec_extract4b.
20673 2018-02-16 Nathan Sidwell <nathan@acm.org>
20675 * doc/extend.texi (Backwards Compatibility): Mention friend
20676 injection. Note for-scope is deprecated.
20677 * doc/invoke.texi (-ffriend-injection): Deprecate.
20679 2018-02-16 Segher Boessenkool <segher@kernel.crashing.org>
20681 * combine.c (try_combine): When adjusting LOG_LINKS for the destination
20682 that moved to I2, also allow destinations that are a paradoxical
20683 subreg (instead of a normal reg).
20685 2018-02-16 Oleg Endo <olegendo@gcc.gnu.org>
20688 * config/rx/rx.c (rx_fuse_in_memory_bitop): Convert shift operand
20691 2018-02-16 Richard Biener <rguenther@suse.de>
20693 PR tree-optimization/84037
20694 PR tree-optimization/84016
20696 * config/i386/i386.c (ix86_builtin_vectorization_cost):
20697 Adjust vec_construct for the fact we need additional higher latency
20698 128bit inserts for AVX256 and AVX512 vector builds.
20699 (ix86_add_stmt_cost): Scale vector construction cost for
20702 2018-02-16 Richard Biener <rguenther@suse.de>
20704 PR tree-optimization/84417
20705 * tree-ssa.c (non_rewritable_mem_ref_base): Properly constrain
20706 the MEM_REF offset when conversion to BIT_FIELD_REF is desired.
20707 (non_rewritable_lvalue_p): Likewise, use poly-ints.
20709 2018-02-16 Martin Liska <mliska@suse.cz>
20712 * internal-fn.def (ASAN_CHECK): Set proper flags.
20713 (ASAN_MARK): Likewise.
20715 2018-02-16 Julia Koval <julia.koval@intel.com>
20717 * config/i386/i386.c (ix86_option_override_internal): Remove PTA_CLWB
20718 from PTA_CANNONLAKE.
20720 2018-02-16 Jakub Jelinek <jakub@redhat.com>
20723 * config/aarch64/cortex-a57-fma-steering.c (fma_forest::merge_forest):
20724 Use ++iter rather than iter++ for std::list iterators.
20725 (func_fma_steering::dfs): Likewise. Don't delete nodes right away,
20726 defer deleting them until all nodes in the forest are processed. Do
20727 free even leaf nodes. Change to_process into auto_vec.
20730 * system.h (BROKEN_VALUE_INITIALIZATION): Define for GCC < 4.3.
20731 * vec.h (vec_default_construct): Use memset instead of placement new
20732 if BROKEN_VALUE_INITIALIZATION is defined.
20733 * hash-table.h (hash_table<Descriptor, Allocator>::empty_slow): Use
20734 memset instead of value initialization if BROKEN_VALUE_INITIALIZATION
20737 PR rtl-optimization/83723
20738 * lra-int.h (lra_substitute_pseudo): Add DEBUG_P argument.
20739 * lra.c (lra_substitute_pseudo): Likewise. If true, use
20740 gen_rtx_raw_SUBREG instead of gen_rtx_SUBREG. Pass DEBUG_P to
20742 (lra_substitute_pseudo_within_insn): Adjust lra_substitute_pseudo
20744 * lra-constraints.c (inherit_reload_reg, split_reg): Likewise.
20746 2018-02-16 Eric Botcazou <ebotcazou@adacore.com>
20748 PR rtl-optimization/81443
20749 * rtlanal.c (num_sign_bit_copies1) <SUBREG>: Do not propagate results
20750 from inner REGs to paradoxical SUBREGs.
20752 2018-02-16 Richard Biener <rguenther@suse.de>
20754 PR tree-optimization/84399
20755 * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
20756 For operands we can analyze at their definition make sure we can
20757 analyze them at each use as well.
20759 2018-02-16 Richard Biener <rguenther@suse.de>
20761 PR tree-optimization/84190
20762 * tree-ssa.c (non_rewritable_mem_ref_base): Do not touch
20763 volatile accesses if the decl isn't volatile.
20765 2018-02-15 Jason Merrill <jason@redhat.com>
20767 PR c++/84314 - ICE with templates and fastcall attribute.
20768 * attribs.c (build_type_attribute_qual_variant): Don't clobber
20769 TYPE_CANONICAL on an existing type.
20771 2018-02-15 Jakub Jelinek <jakub@redhat.com>
20773 PR tree-optimization/84383
20774 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Don't look at
20775 dstoff nor call operand_equal_p if dstbase is NULL.
20777 PR tree-optimization/84334
20778 * match.pd ((A +- CST1) +- CST2 -> A + CST3): If A is
20779 also a CONSTANT_CLASS_P, punt.
20781 2018-02-14 Jim Wilson <jimw@sifive.com>
20783 * config/riscv/riscv.c (riscv_first_stack_step): Move locals after
20784 first SMALL_OPERAND check. New local min_second_step. Move assert
20785 to where locals are set. Add TARGET_RVC support.
20786 * config/riscv/riscv.h (C_SxSP_BITS, SWSP_REACH, SDSP_REACH): New.
20788 2018-02-14 Indu Bhagat <indu.bhagat@oracle.com>
20790 * doc/invoke.texi: Correct -Wformat-overflow code sample.
20792 2018-02-14 Martin Sebor <msebor@redhat.com>
20794 PR tree-optimization/83698
20795 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For
20796 arrays constrain the offset range to their bounds.
20797 (builtin_access::strcat_overlap): Adjust the bounds of overlap offset.
20798 (builtin_access::overlap): Avoid setting the size of overlap if it's
20800 (maybe_diag_overlap): Also consider arrays when deciding what values
20801 of offsets to include in diagnostics.
20803 2018-02-14 Martin Sebor <msebor@redhat.com>
20806 * attribs.c (diag_attr_exclusions): Consider the exclusion(s)
20807 that correspond to the kind of a declaration.
20809 2018-02-14 John David Anglin <danglin@gcc.gnu.org>
20812 * config/pa/pa.md: Load address of PIC label using the linkage table
20813 if the label is nonlocal.
20815 2018-02-14 Kelvin Nilsen <kelvin@gcc.gnu.org>
20817 * config/rs6000/rs6000.c (rs6000_option_override_internal): Issue
20818 warning message if user requests -maltivec=be.
20819 * doc/invoke.texi: Document deprecation of -maltivec=be.
20821 2018-02-14 Will Schmidt <will_schmidt@vnet.ibm.com>
20824 * config/rs6000/rs6000-c.c: Update definitions for
20825 ALTIVEC_BUILTIN_VEC_SLD, ALTIVEC_BUILTIN_VEC_SLDW,
20826 VEC_XXSLDWI and ALTIVEC_BUILTIN_VEC_XXPERMDI builtins.
20828 2018-02-14 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
20831 * config/i386/cetintrin.h: Remove _rdssp[d|q] and
20832 add _get_ssp intrinsics. Remove argument from
20833 __builtin_ia32_rdssp[d|q].
20834 * config/i386/i386-builtin-types.def: Add UINT_FTYPE_VOID.
20835 * config/i386/i386-builtin.def: Remove argument from
20836 __builtin_ia32_rdssp[d|q].
20837 * config/i386/i386.c: Use UINT_FTYPE_VOID. Use
20838 ix86_expand_special_args_builtin for _rdssp[d|q].
20839 * config/i386/i386.md: Remove argument from rdssp[si|di] insn.
20840 Clear register before usage.
20841 * doc/extend.texi: Remove argument from __builtin_ia32_rdssp[d|q].
20842 Add documentation for new _get_ssp and _inc_ssp intrinsics.
20844 2018-02-14 Richard Sandiford <richard.sandiford@linaro.org>
20846 PR tree-optimization/84357
20847 * tree-data-ref.c (object_address_invariant_in_loop_p): Check
20848 operand 1 of an ARRAY_REF too.
20850 2018-02-14 Oleg Endo <olegendo@gcc.gnu.org>
20853 * config/rx/rx-protos.h (rx_reg_dead_or_unused_after_insn,
20854 rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
20856 (set_of_reg): New struct.
20857 (rx_find_set_of_reg, rx_find_use_of_reg): New functions.
20858 * config/rx/rx.c (rx_reg_dead_or_unused_after_insn,
20859 rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
20861 * config/rx/rx.md (andsi3, iorsi3, xorsi3): Convert to insn_and_split.
20862 Split into bitclr, bitset, bitinvert patterns if appropriate.
20863 (*bitset, *bitinvert, *bitclr): Convert to named insn_and_split and
20864 use rx_fuse_in_memory_bitop.
20865 (*bitset_in_memory, *bitinvert_in_memory, *bitclr_in_memory): Convert
20866 to named insn, correct maximum insn length.
20868 2018-02-14 Jozef Lawrynowicz <jozefl.gcc@gmail.com>
20871 * machmode.def: Define a complex mode for PARTIAL_INT.
20872 * genmodes.c (complex_class): Return MODE_COMPLEX_INT for
20874 * doc/rtl.texi: Document CSPImode.
20875 * config/msp430/msp430.c (msp430_hard_regno_nregs): Add CPSImode
20877 (msp430_hard_regno_nregs_with_padding): Likewise.
20879 2018-02-13 Peter Bergner <bergner@vnet.ibm.com>
20882 * config/rs6000/rs6000.c (mem_operand_gpr): Disallow altivec addresses.
20884 2018-02-13 Segher Boessenkool <segher@kernel.crashing.org>
20886 PR rtl-optimization/84169
20887 * combine.c (try_combine): New variable split_i2i3. Set it to true if
20888 we generated a parallel as new i3 and we split that to new i2 and i3
20889 instructions. Handle split_i2i3 similar to swap_i2i3: scan the
20890 LOG_LINKs of i3 to see which of those need to link to i2 now. Link
20891 those to i2, not i1. Partially rewrite this scan code.
20893 2018-02-13 Jakub Jelinek <jakub@redhat.com>
20896 * stor-layout.c (place_field): For variable length fields, adjust
20897 offset_align afterwards not just based on the field's alignment,
20898 but also on the size.
20900 PR middle-end/84309
20901 * match.pd (pow(C,x) -> exp(log(C)*x)): Use exp2s and log2s instead
20902 of exps and logs in the use_exp2 case.
20904 2018-02-13 Jeff Law <law@redhat.com>
20906 * config/rl/rl78.c (rl78_attribute_table): Fix terminator and
20907 entry for "vector".
20909 * config/rl78/rl78.c (rl78_handle_func_attribute): Mark
20912 2018-02-13 Alexandre Oliva <aoliva@redhat.com>
20916 * common.opt (gas-loc-support, gas-locview-support): New.
20917 (ginline-points, ginternal-reset-location-views): New.
20918 * doc/invoke.texi: Document them. Use @itemx where intended.
20919 (gvariable-location-views): Adjust.
20920 * target.def (reset_location_view): New.
20921 * doc/tm.texi.in (DWARF2_ASM_VIEW_DEBUG_INFO): New.
20922 (TARGET_RESET_LOCATION_VIEW): New.
20923 * doc/tm.texi: Rebuilt.
20924 * dwarf2out.c (dwarf2out_default_as_loc_support): New.
20925 (dwarf2out_default_as_locview_support): New.
20926 (output_asm_line_debug_info): Use option variables.
20927 (dwarf2out_maybe_output_loclist_view_pair): Likewise.
20928 (output_loc_list): Likewise.
20929 (add_high_low_attributes): Check option variables.
20930 Don't output entry view attribute in strict mode.
20931 (gen_inlined_subroutine_die): Check option variables.
20932 (dwarf2out_inline_entry): Likewise.
20933 (init_sections_and_labels): Likewise.
20934 (dwarf2out_early_finish): Likewise.
20935 (maybe_reset_location_view): New, from...
20936 (dwarf2out_var_location): ... here. Call it.
20937 * debug.h (dwarf2out_default_as_loc_support): Declare.
20938 (dwarf2out_default_as_locview_support): Declare.
20939 * hooks.c (hook_int_rtx_insn_0): New.
20940 * hooks.h (hook_int_rtx_insn_0): Declare.
20941 * toplev.c (process_options): Take -gas-loc-support and
20942 -gas-locview-support from dwarf2out. Enable
20943 -gvariable-location-views by default only with locview
20944 assembler support. Enable -ginternal-reset-location-views by
20945 default only if the target defines the corresponding hook.
20946 Enable -ginline-points by default if location views are
20947 enabled; force it disabled if statement frontiers are
20949 * tree-inline.c (expand_call_inline): Check option variables.
20950 * tree-ssa-live.c (remove_unused_scope_block_p): Likewise.
20952 2018-02-13 Richard Sandiford <richard.sandiford@linaro.org>
20954 PR tree-optimization/84321
20955 * tree-vrp.c (intersect_range_with_nonzero_bits): Fix VR_ANTI_RANGE
20956 handling. Also check whether the anti-range contains any values
20957 that satisfy the mask; switch to a VR_RANGE if not.
20959 2018-02-13 Paolo Bonzini <bonzini@gnu.org>
20962 * internal-fn.def (ASAN_CHECK, ASAN_MARK): Revert changes to fnspec.
20964 2018-02-13 Martin Jambor <mjambor@suse.cz>
20967 * ipa-param-manipulation.c (ipa_modify_call_arguments): Use location
20968 of call statements, also set location of a load to a temporary.
20970 2018-02-13 Sebastian Perta <sebastian.perta@renesas.com>
20972 * config/rl78/rl78.c (add_vector_labels): New function.
20973 * config/rl78/rl78.c (rl78_handle_vector_attribute): New function.
20974 * config/rl78/rl78.c (rl78_start_function): Call add_vector_labels.
20975 * config/rl78/rl78.c (rl78_handle_func_attribute): Removed the assert
20976 which checks that no arguments are passed.
20977 * config/rl78/rl78.c (rl78_attribute_table): Add "vector" attribute.
20978 * doc/extend.texi: Documentation for the new attribute.
20980 2018-02-13 Andreas Schwab <schwab@suse.de>
20982 * config/riscv/linux.h (CPP_SPEC): Define.
20984 2018-02-13 Jakub Jelinek <jakub@redhat.com>
20987 * config/i386/i386.c (ix86_init_mmx_sse_builtins): Pass
20988 OPTION_MASK_ISA_AES | OPTION_MASK_ISA_SSE2 instead of
20989 OPTION_MASK_ISA_AES as first argument to def_builtin_const
20990 for AES builtins. Pass OPTION_MASK_ISA_PCLMUL | OPTION_MASK_ISA_SSE2
20991 instead of OPTION_MASK_ISA_PCLMUL as first argument to
20992 def_builtin_const for __builtin_ia32_pclmulqdq128 builtin.
20993 * config/i386/wmmintrin.h: If __SSE2__ is not defined, enable it
20994 temporarily for AES and PCLMUL builtins.
20996 PR tree-optimization/84339
20997 * gimple-fold.c (get_range_strlen): Set *FLEXP to true when handling
20998 ARRAY_REF where first operand is array_at_struct_end_p COMPONENT_REF.
21001 PR middle-end/84309
21002 * match.pd (pow(C,x) -> exp(log(C)*x)): Optimize instead into
21003 exp2(log2(C)*x) if C is a power of 2 and c99 runtime is available.
21004 * generic-match-head.c (canonicalize_math_after_vectorization_p): New
21006 * gimple-match-head.c (canonicalize_math_after_vectorization_p): New
21008 * omp-simd-clone.h: New file.
21009 * omp-simd-clone.c: Include omp-simd-clone.h.
21010 (expand_simd_clones): No longer static.
21011 * tree-vect-patterns.c: Include fold-const-call.h, attribs.h,
21012 cgraph.h and omp-simd-clone.h.
21013 (vect_recog_pow_pattern): Optimize pow(C,x) to exp(log(C)*x).
21014 (vect_recog_widen_shift_pattern): Formatting fix.
21015 (vect_pattern_recog_1): Don't check optab for calls.
21018 * config/i386/sse.md (<avx512>_vpermi2var<mode>3_mask): Force
21019 operands[2] into a REG before using gen_lowpart on it.
21021 2018-02-12 Jeff Law <law@redhat.com>
21024 * config/sh/sh.c (find_barrier): Consider a sibling call
21027 * cse.c (try_back_substitute_reg): Move any REG_ARGS_SIZE note when
21028 successfully back substituting a reg.
21030 2018-02-12 Richard Biener <rguenther@suse.de>
21032 PR tree-optimization/84037
21033 * tree-vect-slp.c (vect_analyze_slp_cost): Add visited
21034 parameter, move visited init to caller.
21035 (vect_slp_analyze_operations): Separate cost from validity
21036 check, initialize visited once for all instances.
21037 (vect_schedule_slp): Analyze map to CSE vectorized nodes once
21039 * tree-vect-stmts.c (vect_model_simple_cost): Make early
21041 (vect_model_promotion_demotion_cost): Likewise.
21042 (vectorizable_bswap): Guard cost modeling with !slp_node
21043 instead of !PURE_SLP_STMT to avoid double-counting on hybrid
21045 (vectorizable_call): Likewise.
21046 (vectorizable_conversion): Likewise.
21047 (vectorizable_assignment): Likewise.
21048 (vectorizable_shift): Likewise.
21049 (vectorizable_operation): Likewise.
21050 (vectorizable_store): Likewise.
21051 (vectorizable_load): Likewise.
21052 (vectorizable_condition): Likewise.
21053 (vectorizable_comparison): Likewise.
21055 2018-02-12 Paolo Bonzini <bonzini@gnu.org>
21058 * internal-fn.def (ASAN_CHECK): Fix fnspec to account for return value.
21059 (ASAN_MARK): Fix fnspec to account for return value, change pointer
21060 argument from 'R' to 'W' so that the pointed-to datum is clobbered.
21062 2018-02-08 Jan Hubicka <hubicka@ucw.cz>
21064 PR middle-end/83665
21065 * params.def (inline-min-speedup): Increase from 8 to 15.
21066 (max-inline-insns-auto): Decrease from 40 to 30.
21067 * ipa-split.c (consider_split): Add some buffer for function to
21068 be considered inlining candidate.
21069 * invoke.texi (max-inline-insns-auto, inline-min-speedup): UPdate
21072 2018-02-12 Richard Biener <rguenther@suse.de>
21074 PR tree-optimization/84037
21075 * tree-vect-slp.c (vect_build_slp_tree_2): Try swapping the
21076 matched stmts if we cannot swap the non-matched ones.
21078 2018-02-12 Olga Makhotina <olga.makhotina@intel.com>
21080 * config/i386/avx512fintrin.h (_mm_mask_scalef_round_sd,
21081 _mm_maskz_scalef_round_sd, _mm_mask_scalef_round_ss,
21082 _mm_maskz_scalef_round_ss): New intrinsics.
21083 (__builtin_ia32_scalefsd_round, __builtin_ia32_scalefss_round): Fix.
21084 * config/i386/i386-builtin.def (__builtin_ia32_scalefsd_round,
21085 __builtin_ia32_scalefss_round): Remove.
21086 (__builtin_ia32_scalefsd_mask_round,
21087 __builtin_ia32_scalefss_mask_round): New intrinsics.
21088 * config/i386/sse.md (vmscalef<mode><round_name>): Renamed to ...
21089 (vmscalef<mode><mask_scalar_name><round_scalar_name>): ... this.
21090 ((match_operand:VF_128 2 "<round_nimm_predicate>"
21091 "<round_constraint>")): Changed to ...
21092 ((match_operand:VF_128 2 "<round_scalar_nimm_predicate>"
21093 "<round_scalar_constraint>")): ... this.
21094 ("vscalef<ssescalarmodesuffix>\t{<round_op3>%2, %1, %0|
21095 %0, %1, %2<round_op3>}"): Changed to ...
21096 ("vscalef<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%2, %1,
21097 %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %1,
21098 %2<round_scalar_mask_op3>}"): ... this.
21099 * config/i386/subst.md (round_scalar_nimm_predicate): New.
21101 2018-02-12 Olga Makhotina <olga.makhotina@intel.com>
21103 * config/i386/avx512fintrin.h (_mm_mask_sqrt_round_sd)
21104 (_mm_maskz_sqrt_round_sd, _mm_mask_sqrt_round_ss)
21105 (_mm_maskz_sqrt_round_ss): New intrinsics.
21106 (__builtin_ia32_sqrtsd_round, __builtin_ia32_sqrtss_round): Remove.
21107 (__builtin_ia32_sqrtsd_mask_round)
21108 (__builtin_ia32_sqrtss_mask_round): New builtins.
21109 * config/i386/i386-builtin.def (__builtin_ia32_sqrtsd_round)
21110 (__builtin_ia32_sqrtss_round): Remove.
21111 (__builtin_ia32_sqrtsd_mask_round)
21112 (__builtin_ia32_sqrtss_mask_round): New builtins.
21113 * config/i386/sse.md (vmsqrt<mode>2<round_name>): Renamed to ...
21114 (vmsqrt<mode>2<mask_scalar_name><round_scalar_name>): ... this.
21115 ((match_operand:VF_128 1 "vector_operand"
21116 "xBm,<round_constraint>")): Changed to ...
21117 ((match_operand:VF_128 1 "vector_operand"
21118 "xBm,<round_scalar_constraint>")): ... this.
21119 (vsqrt<ssescalarmodesuffix>\t{<round_op3>%1, %2, %0|
21120 %0, %2, %<iptr>1<round_op3>}): Changed to ...
21121 (vsqrt<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%1, %2,
21122 %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %2,
21123 %<iptr>1<round_scalar_mask_op3>}): ... this.
21124 ((set_attr "prefix" "<round_prefix>")): Changed to ...
21125 ((set_attr "prefix" "<round_scalar_prefix>")): ... this.
21127 2018-02-11 Steven Munroe <munroesj@gcc.gnu.org>
21130 * config/rs6000/mmintrin.h (_mm_cmpeq_pi32 [_ARCH_PWR9]):
21131 Cast vec_cmpeq result to correct type.
21132 * config/rs6000/mmintrin.h (_mm_cmpgt_pi32 [_ARCH_PWR9]):
21133 Cast vec_cmpgt result to correct type.
21135 2018-02-11 Alexandre Oliva <aoliva@redhat.com>
21137 * final.c (final_scan_insn_1): Renamed from...
21138 (final_scan_insn): ... this. New wrapper, to recover
21139 seen from the outermost call in recursive ones.
21140 * config/sparc/sparc.c (output_return): Drop seen from call.
21141 (output_sibcall): Likewise.
21142 * config/visium/visium.c (output_branch): Likewise.
21144 2018-02-10 John David Anglin <danglin@gcc.gnu.org>
21146 * config/pa/pa.c (hppa_profile_hook): Mark SYMBOL_REF for _mcount as
21149 2018-02-10 Alan Modra <amodra@gmail.com>
21152 * config/rs6000/rs6000.md (split_stack_return): Remove (use ..).
21153 Specify LR as an input.
21155 2018-02-10 Jakub Jelinek <jakub@redhat.com>
21158 * omp-low.c (maybe_remove_omp_member_access_dummy_vars,
21159 remove_member_access_dummy_vars): New functions.
21160 (lower_omp_for, lower_omp_taskreg, lower_omp_target,
21161 lower_omp_1, execute_lower_omp): Use them.
21163 PR rtl-optimization/84308
21164 * shrink-wrap.c (spread_components): Release todo vector.
21166 2018-02-09 Vladimir Makarov <vmakarov@redhat.com>
21168 PR rtl-optimization/57193
21169 * ira-color.c (struct allocno_color_data): Add member
21170 conflict_allocno_hard_prefs.
21171 (update_conflict_allocno_hard_prefs): New.
21172 (bucket_allocno_compare_func): Add a preference based on
21173 conflict_allocno_hard_prefs.
21174 (push_allocno_to_stack): Update conflict_allocno_hard_prefs.
21175 (color_allocnos): Remove a dead code. Initiate
21176 conflict_allocno_hard_prefs. Call update_costs_from_prefs.
21178 2018-02-09 Jakub Jelinek <jakub@redhat.com>
21181 * config/rs6000/vsx.md (p9_xxbrq_v16qi): Change input operand
21182 constraint from =wa to wa. Avoid a subreg on the output operand,
21183 instead use a pseudo and subreg it in a move.
21184 (p9_xxbrd_<mode>): Changed to ...
21185 (p9_xxbrd_v2di): ... this insn, without VSX_D iterator.
21186 (p9_xxbrd_v2df): New expander.
21187 (p9_xxbrw_<mode>): Changed to ...
21188 (p9_xxbrw_v4si): ... this insn, without VSX_W iterator.
21189 (p9_xxbrw_v4sf): New expander.
21191 2018-02-09 Sebastian Perta <sebastian.perta@renesas.com>
21193 * config/rx/rx.md (movsicc): Update expander to be matched by GCC.
21195 2018-02-09 Peter Bergner <bergner@vnet.ibm.com>
21198 * config/rs6000/vsx.md (vsx_mul_v2di): Handle generating a 64-bit
21199 multiply in 32-bit mode.
21200 (vsx_div_v2di): Handle generating a 64-bit signed divide in 32-bit mode.
21201 (vsx_udiv_v2di): Handle generating a 64-bit unsigned divide in 32-bit
21204 2018-02-09 Sebastian Perta <sebastian.perta@renesas.com>
21206 * config/rx/constraints.md (CALL_OP_SYMBOL_REF): Added new constraint
21207 to allow or block "symbol_ref" depending on the value of TARGET_JSR.
21208 * config/rx/rx.md (call_internal): Use CALL_OP_SYMBOL_REF.
21209 * config/rx/rx.md (call_value_internal): Use CALL_OP_SYMBOL_REF.
21211 2018-02-09 Pierre-Marie de Rodat <derodat@adacore.com>
21214 * dwarf2out.c (is_trivial_indirect_ref): New function.
21215 (dwarf2out_late_global_decl): Do not generate a location
21216 attribute for variables that have a non-trivial DECL_VALUE_EXPR
21217 and that are not defined in the current unit.
21219 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
21221 * optabs.c (prepare_cmp_insn): Try harder to emit a direct comparison
21222 instead of a libcall for UNORDERED.
21224 2018-02-09 Tamar Christina <tamar.christina@arm.com>
21227 * config/arm/arm-c.c (arm_cpu_builtins): Un-define __ARM_FEATURE_LDREX,
21228 __ARM_ARCH_PROFILE, __ARM_ARCH_ISA_THUMB, __ARM_FP and __ARM_NEON_FP.
21230 2018-02-09 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
21233 * config/s390/s390.c (s390_set_current_function): Invoke
21234 s390_indirect_branch_settings also if fndecl didn't change.
21236 2018-02-09 Alexandre Oliva <aoliva@redhat.com>
21238 * config/rs6000/rs6000.md (blockage): Set length to zero.
21240 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
21242 * expr.c (optimize_bitfield_assignment_op): Remove obsolete assertion.
21244 2018-02-09 Jakub Jelinek <jakub@redhat.com>
21247 * gcc.c (STATIC_LIBASAN_LIBS, STATIC_LIBTSAN_LIBS,
21248 STATIC_LIBLSAN_LIBS, STATIC_LIBUBSAN_LIBS): Handle -static like
21252 * var-tracking.c (vt_add_function_parameter): Punt for non-onepart
21253 PARALLEL incoming that failed vt_get_decl_and_offset check.
21255 PR middle-end/84237
21256 * output.h (bss_initializer_p): Add NAMED argument, defaulted to false.
21257 * varasm.c (bss_initializer_p): Add NAMED argument, if true, ignore
21259 (get_variable_section): For decls in named .bss* sections pass true as
21260 second argument to bss_initializer_p.
21262 2018-02-09 Marek Polacek <polacek@redhat.com>
21263 Jakub Jelinek <jakub@redhat.com>
21266 * fold-const.c (fold_indirect_ref_1): Use VECTOR_TYPE_P macro.
21267 Formatting fixes. Verify first that tree_fits_poly_int64_p (op01).
21268 Sync some changes from cxx_fold_indirect_ref.
21270 2018-02-09 Alexandre Oliva <aoliva@redhat.com>
21272 * cfgexpand.c (expand_gimple_basic_block): Handle inline entry
21274 * dwarf2out.c (dwarf2_debug_hooks): Enable inline_entry hook.
21275 (BLOCK_INLINE_ENTRY_LABEL): New.
21276 (dwarf2out_var_location): Disregard inline entry markers.
21277 (inline_entry_data): New struct.
21278 (inline_entry_data_hasher): New hashtable type.
21279 (inline_entry_data_hasher::hash): New.
21280 (inline_entry_data_hasher::equal): New.
21281 (inline_entry_data_table): New variable.
21282 (add_high_low_attributes): Add DW_AT_entry_pc and
21283 DW_AT_GNU_entry_view attributes if a pending entry is found
21284 in inline_entry_data_table. Add old entry_pc attribute only
21285 if debug nonbinding markers are disabled.
21286 (gen_inlined_subroutine_die): Set BLOCK_DIE if nonbinding
21287 markers are enabled.
21288 (block_within_block_p, dwarf2out_inline_entry): New.
21289 (dwarf2out_finish): Check that no entries remained in
21290 inline_entry_data_table.
21291 * final.c (reemit_insn_block_notes): Handle inline entry notes.
21292 (final_scan_insn, notice_source_line): Likewise.
21293 (rest_of_clean_state): Skip inline entry markers.
21294 * gimple-pretty-print.c (dump_gimple_debug): Handle inline entry
21296 * gimple.c (gimple_build_debug_inline_entry): New.
21297 * gimple.h (enum gimple_debug_subcode): Add
21298 GIMPLE_DEBUG_INLINE_ENTRY.
21299 (gimple_build_debug_inline_entry): Declare.
21300 (gimple_debug_inline_entry_p): New.
21301 (gimple_debug_nonbind_marker_p): Adjust.
21302 * insn-notes.def (INLINE_ENTRY): New.
21303 * print-rtl.c (rtx_writer::print_rtx_operand_code_0): Handle
21304 inline entry marker notes.
21305 (print_insn): Likewise.
21306 * rtl.h (NOTE_MARKER_P): Add INLINE_ENTRY support.
21307 (INSN_DEBUG_MARKER_KIND): Likewise.
21308 (GEN_RTX_DEBUG_MARKER_INLINE_ENTRY_PAT): New.
21309 * tree-inline.c (expand_call_inline): Build and insert
21310 debug_inline_entry stmt.
21311 * tree-ssa-live.c (remove_unused_scope_block_p): Preserve
21312 inline entry blocks early, if nonbind markers are enabled.
21313 (dump_scope_block): Dump fragment info.
21314 * var-tracking.c (reemit_marker_as_note): Handle inline entry note.
21315 * doc/gimple.texi (gimple_debug_inline_entry_p): New.
21316 (gimple_build_debug_inline_entry): New.
21317 * doc/invoke.texi (gstatement-frontiers, gno-statement-frontiers):
21318 Enable/disable inline entry points too.
21319 * doc/rtl.texi (NOTE_INSN_INLINE_ENTRY): New.
21320 (DEBUG_INSN): Describe inline entry markers.
21322 * common.opt (gvariable-location-views): New.
21323 (gvariable-location-views=incompat5): New.
21324 * config.in: Rebuilt.
21325 * configure: Rebuilt.
21326 * configure.ac: Test assembler for view support.
21327 * dwarf2asm.c (dw2_asm_output_symname_uleb128): New.
21328 * dwarf2asm.h (dw2_asm_output_symname_uleb128): Declare.
21329 * dwarf2out.c (var_loc_view): New typedef.
21330 (struct dw_loc_list_struct): Add vl_symbol, vbegin, vend.
21331 (dwarf2out_locviews_in_attribute): New.
21332 (dwarf2out_locviews_in_loclist): New.
21333 (dw_val_equal_p): Compare val_view_list of dw_val_class_view_lists.
21334 (enum dw_line_info_opcode): Add LI_adv_address.
21335 (struct dw_line_info_table): Add view.
21336 (RESET_NEXT_VIEW, RESETTING_VIEW_P): New macros.
21337 (DWARF2_ASM_VIEW_DEBUG_INFO): Define default.
21338 (zero_view_p): New variable.
21339 (ZERO_VIEW_P): New macro.
21340 (output_asm_line_debug_info): New.
21341 (struct var_loc_node): Add view.
21342 (add_AT_view_list, AT_loc_list): New.
21343 (add_var_loc_to_decl): Add view param. Test it against last.
21344 (new_loc_list): Add view params. Record them.
21345 (AT_loc_list_ptr): Handle loc and view lists.
21346 (view_list_to_loc_list_val_node): New.
21347 (print_dw_val): Handle dw_val_class_view_list.
21348 (size_of_die): Likewise.
21349 (value_format): Likewise.
21350 (loc_list_has_views): New.
21351 (gen_llsym): Set vl_symbol too.
21352 (maybe_gen_llsym, skip_loc_list_entry): New.
21353 (dwarf2out_maybe_output_loclist_view_pair): New.
21354 (output_loc_list): Output view list or entries too.
21355 (output_view_list_offset): New.
21356 (output_die): Handle dw_val_class_view_list.
21357 (output_dwarf_version): New.
21358 (output_compilation_unit_header): Use it.
21359 (output_skeleton_debug_sections): Likewise.
21360 (output_rnglists, output_line_info): Likewise.
21361 (output_pubnames, output_aranges): Update version comments.
21362 (output_one_line_info_table): Output view numbers in asm comments.
21363 (dw_loc_list): Determine current endview, pass it to new_loc_list.
21364 Call maybe_gen_llsym.
21365 (loc_list_from_tree_1): Adjust.
21366 (add_AT_location_description): Create view list attribute if
21367 needed, check it's absent otherwise.
21368 (convert_cfa_to_fb_loc_list): Adjust.
21369 (maybe_emit_file): Call output_asm_line_debug_info for test.
21370 (dwarf2out_var_location): Reset views as needed. Precompute
21371 add_var_loc_to_decl args. Call get_attr_min_length only if we have the
21372 attribute. Set view.
21373 (new_line_info_table): Reset next view.
21374 (set_cur_line_info_table): Call output_asm_line_debug_info for test.
21375 (dwarf2out_source_line): Likewise. Output view resets and labels to
21376 the assembler, or select appropriate line info opcodes.
21377 (prune_unused_types_walk_attribs): Handle dw_val_class_view_list.
21378 (optimize_string_length): Catch it. Adjust.
21379 (resolve_addr): Copy vl_symbol along with ll_symbol. Handle
21380 dw_val_class_view_list, and remove it if no longer needed.
21381 (hash_loc_list): Hash view numbers.
21382 (loc_list_hasher::equal): Compare them.
21383 (optimize_location_lists): Check whether a view list symbol is
21384 needed, and whether the locview attribute is present, and
21385 whether they match. Remove the locview attribute if no longer
21387 (index_location_lists): Call skip_loc_list_entry for test.
21388 (dwarf2out_finish): Call output_asm_line_debug_info for test.
21389 Use output_dwarf_version.
21390 * dwarf2out.h (enum dw_val_class): Add dw_val_class_view_list.
21391 (struct dw_val_node): Add val_view_list.
21392 * final.c (SEEN_NEXT_VIEW): New.
21393 (set_next_view_needed): New.
21394 (clear_next_view_needed): New.
21395 (maybe_output_next_view): New.
21396 (final_start_function): Rename to...
21397 (final_start_function_1): ... this. Take pointer to FIRST,
21398 add SEEN parameter. Emit param bindings in the initial view.
21399 (final_start_function): Reintroduce SEEN-less interface.
21400 (final): Rename to...
21401 (final_1): ... this. Take SEEN parameter. Output final pending
21402 next view at the end.
21403 (final): Reintroduce seen-less interface.
21404 (final_scan_insn): Output pending next view before switching
21405 sections or ending a block. Mark the next view as needed when
21406 outputting variable locations. Notify debug backend of section
21407 changes, and of location view changes.
21408 (rest_of_handle_final): Adjust.
21409 * toplev.c (process_options): Autodetect value for debug variable
21410 location views option. Warn on incompat5 without -gdwarf-5.
21411 * doc/invoke.texi (gvariable-location-views): New.
21412 (gvariable-location-views=incompat5): New.
21413 (gno-variable-location-views): New.
21415 2018-02-08 David Malcolm <dmalcolm@redhat.com>
21417 PR tree-optimization/84136
21418 * tree-cfg.c (find_taken_edge_computed_goto): Remove assertion
21419 that the result of find_edge is non-NULL.
21421 2018-02-08 Sergey Shalnov <sergey.shalnov@intel.com>
21424 * config/i386/x86-tune-costs.h (skylake_cost): Fix cost of
21425 storing integer register in SImode. Fix cost of 256 and 512
21426 byte aligned SSE register store.
21428 2018-02-08 Sergey Shalnov <sergey.shalnov@intel.com>
21430 * config/i386/i386.c (ix86_multiplication_cost): Fix
21431 multiplication cost for TARGET_AVX512DQ.
21433 2018-02-08 Marek Polacek <polacek@redhat.com>
21435 PR tree-optimization/84238
21436 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Verify the result of
21439 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
21441 PR tree-optimization/84265
21442 * tree-vect-stmts.c (vectorizable_store): Don't treat
21443 VMAT_CONTIGUOUS accesses as grouped.
21444 (vectorizable_load): Likewise.
21446 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
21448 PR tree-optimization/81635
21449 * wide-int.h (wi::round_down_for_mask, wi::round_up_for_mask): Declare.
21450 * wide-int.cc (wi::round_down_for_mask, wi::round_up_for_mask)
21451 (test_round_for_mask): New functions.
21452 (wide_int_cc_tests): Call test_round_for_mask.
21453 * tree-vrp.h (intersect_range_with_nonzero_bits): Declare.
21454 * tree-vrp.c (intersect_range_with_nonzero_bits): New function.
21455 * tree-data-ref.c (split_constant_offset_1): Use it to refine the
21456 range returned by get_range_info.
21458 2018-02-08 Jan Hubicka <hubicka@ucw.cz>
21461 * cgraph.h (symtab_node::output_to_lto_symbol_table_p): Declare
21462 * symtab.c: Include builtins.h
21463 (symtab_node::output_to_lto_symbol_table_p): Move here
21464 from lto-streamer-out.c:output_symbol_p.
21465 * lto-streamer-out.c (write_symbol): Turn early exit to assert.
21466 (output_symbol_p): Move all logic to symtab.c
21467 (produce_symtab): Update.
21469 2018-02-08 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
21471 * config/s390/s390-opts.h (enum indirect_branch): Define.
21472 * config/s390/s390-protos.h (s390_return_addr_from_memory)
21473 (s390_indirect_branch_via_thunk)
21474 (s390_indirect_branch_via_inline_thunk): Add function prototypes.
21475 (enum s390_indirect_branch_type): Define.
21476 * config/s390/s390.c (struct s390_frame_layout, struct
21477 machine_function): Remove.
21478 (indirect_branch_prez10thunk_mask, indirect_branch_z10thunk_mask)
21479 (indirect_branch_table_label_no, indirect_branch_table_name):
21481 (INDIRECT_BRANCH_NUM_OPTIONS): Define macro.
21482 (enum s390_indirect_branch_option): Define.
21483 (s390_return_addr_from_memory): New function.
21484 (s390_handle_string_attribute): New function.
21485 (s390_attribute_table): Add new attribute handler.
21486 (s390_execute_label): Handle UNSPEC_EXECUTE_JUMP patterns.
21487 (s390_indirect_branch_via_thunk): New function.
21488 (s390_indirect_branch_via_inline_thunk): New function.
21489 (s390_function_ok_for_sibcall): When jumping via thunk disallow
21490 sibling call optimization for non z10 compiles.
21491 (s390_emit_call): Force indirect branch target to be a single
21492 register. Add r1 clobber for non-z10 compiles.
21493 (s390_emit_epilogue): Emit return jump via return_use expander.
21494 (s390_reorg): Handle JUMP_INSNs as execute targets.
21495 (s390_option_override_internal): Perform validity checks for the
21496 new command line options.
21497 (s390_indirect_branch_attrvalue): New function.
21498 (s390_indirect_branch_settings): New function.
21499 (s390_set_current_function): Invoke s390_indirect_branch_settings.
21500 (s390_output_indirect_thunk_function): New function.
21501 (s390_code_end): Implement target hook.
21502 (s390_case_values_threshold): Implement target hook.
21503 (TARGET_ASM_CODE_END, TARGET_CASE_VALUES_THRESHOLD): Define target
21505 * config/s390/s390.h (struct s390_frame_layout)
21506 (struct machine_function): Move here from s390.c.
21507 (TARGET_INDIRECT_BRANCH_NOBP_RET)
21508 (TARGET_INDIRECT_BRANCH_NOBP_JUMP)
21509 (TARGET_INDIRECT_BRANCH_NOBP_JUMP_THUNK)
21510 (TARGET_INDIRECT_BRANCH_NOBP_JUMP_INLINE_THUNK)
21511 (TARGET_INDIRECT_BRANCH_NOBP_CALL)
21512 (TARGET_DEFAULT_INDIRECT_BRANCH_TABLE)
21513 (TARGET_INDIRECT_BRANCH_THUNK_NAME_EXRL)
21514 (TARGET_INDIRECT_BRANCH_THUNK_NAME_EX)
21515 (TARGET_INDIRECT_BRANCH_TABLE): Define macros.
21516 * config/s390/s390.md (UNSPEC_EXECUTE_JUMP)
21517 (INDIRECT_BRANCH_THUNK_REGNUM): Define constants.
21518 (mnemonic attribute): Add values which aren't recognized
21520 ("*cjump_long", "*icjump_long", "*basr", "*basr_r"): Disable
21521 pattern for branch conversion. Fix mnemonic attribute.
21522 ("*c<code>", "*sibcall_br", "*sibcall_value_br", "*return"): Emit
21523 indirect branch via thunk if requested.
21524 ("indirect_jump", "<code>"): Expand patterns for branch conversion.
21525 ("*indirect_jump"): Disable for branch conversion using out of
21527 ("indirect_jump_via_thunk<mode>_z10")
21528 ("indirect_jump_via_thunk<mode>")
21529 ("indirect_jump_via_inlinethunk<mode>_z10")
21530 ("indirect_jump_via_inlinethunk<mode>", "*casesi_jump")
21531 ("casesi_jump_via_thunk<mode>_z10", "casesi_jump_via_thunk<mode>")
21532 ("casesi_jump_via_inlinethunk<mode>_z10")
21533 ("casesi_jump_via_inlinethunk<mode>", "*basr_via_thunk<mode>_z10")
21534 ("*basr_via_thunk<mode>", "*basr_r_via_thunk_z10")
21535 ("*basr_r_via_thunk", "return<mode>_prez10"): New pattern.
21536 ("*indirect2_jump"): Disable for branch conversion.
21537 ("casesi_jump"): Turn into expander and expand patterns for branch
21539 ("return_use"): New expander.
21540 ("*return"): Emit return via thunk and rename it to ...
21541 ("*return<mode>"): ... this one.
21542 * config/s390/s390.opt: Add new options and and enum for the
21545 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
21547 * lra-constraints.c (match_reload): Unconditionally use
21548 gen_lowpart_SUBREG, rather than selecting between that
21549 and equivalent gen_rtx_SUBREG code.
21551 2018-02-08 Richard Biener <rguenther@suse.de>
21553 PR tree-optimization/84233
21554 * tree-ssa-phiprop.c (propagate_with_phi): Use separate
21555 changed flag instead of boguously re-using phi_inserted.
21557 2018-02-08 Martin Jambor <mjambor@suse.cz>
21559 * hsa-gen.c (get_symbol_for_decl): Set program allocation for
21560 static local variables.
21562 2018-02-08 Richard Biener <rguenther@suse.de>
21564 PR tree-optimization/84278
21565 * tree-vect-stmts.c (vectorizable_store): When looking for
21566 smaller vector types to perform grouped strided loads/stores
21567 make sure the mode is supported by the target.
21568 (vectorizable_load): Likewise.
21570 2018-02-08 Wilco Dijkstra <wdijkstr@arm.com>
21572 * config/aarch64/aarch64.c (aarch64_components_for_bb):
21573 Increase LDP/STP opportunities by adding adjacent callee-saves.
21575 2018-02-08 Wilco Dijkstra <wdijkstr@arm.com>
21577 PR rtl-optimization/84068
21578 PR rtl-optimization/83459
21579 * haifa-sched.c (rank_for_schedule): Fix SCHED_PRESSURE_MODEL sorting.
21581 2018-02-08 Aldy Hernandez <aldyh@redhat.com>
21583 PR tree-optimization/84224
21584 * gimple-ssa-warn-alloca.c (pass_walloca::execute): Remove assert.
21585 * calls.c (gimple_alloca_call_p): Only return TRUE when we have
21586 non-zero arguments.
21588 2018-02-07 Iain Sandoe <iain@codesourcery.com>
21591 * config/rs6000/altivec.md (*restore_world): Remove LR use.
21592 * config/rs6000/predicates.md (restore_world_operation): Adjust op
21593 count, remove one USE.
21595 2018-02-07 Michael Meissner <meissner@linux.vnet.ibm.com>
21597 * doc/install.texi (Configuration): Document the
21598 --with-long-double-format={ibm,ieee} PowerPC configuration
21602 * config/rs6000/rs6000.md (fix_trunc<SFDF:mode><QHI:mode>2):
21603 Convert from define_expand to be define_insn_and_split. Rework
21604 float/double/_Float128 conversions to QI/HI/SImode to work with
21605 both ISA 2.07 (power8) or ISA 3.0 (power9). Fix regression where
21606 conversions to QI/HImode types did a store and then a load to
21607 truncate the value. For conversions to VSX registers, don't split
21608 the insn, instead emit the code directly. Use the code iterator
21609 any_fix to combine signed and unsigned conversions.
21610 (fix<uns>_trunc<SFDF:mode>si2_p8): Likewise.
21611 (fixuns_trunc<SFDF:mode><QHI:mode>2): Likewise.
21612 (fix_trunc<IEEE128:mode><QHI:mode>2): Likewise.
21613 (fix<uns>_trunc<SFDF:mode><QHI:mode>2): Likewise.
21614 (fix_<mode>di2_hw): Likewise.
21615 (fixuns_<mode>di2_hw): Likewise.
21616 (fix_<mode>si2_hw): Likewise.
21617 (fixuns_<mode>si2_hw): Likewise.
21618 (fix<uns>_<IEEE128:mode><SDI:mode>2_hw): Likewise.
21619 (fix<uns>_trunc<IEEE128:mode><QHI:mode>2): Likewise.
21620 (fctiw<u>z_<mode>_smallint): Rename fctiw<u>z_<mode>_smallint to
21621 fix<uns>_trunc<SFDF:mode>si2_p8.
21622 (fix_trunc<SFDF:mode><QHI:mode>2_internal): Delete, no longer used.
21623 (fixuns_trunc<SFDF:mode><QHI:mode>2_internal): Likewise.
21624 (fix<uns>_<mode>_mem): Likewise.
21625 (fctiw<u>z_<mode>_mem): Likewise.
21626 (fix<uns>_<mode>_mem): Likewise.
21627 (fix<uns>_trunc<SFDF:mode><QHSI:mode>2_mem): On ISA 3.0, prevent
21628 the register allocator from doing a direct move to the GPRs to do
21629 a store, and instead use the ISA 3.0 store byte/half-word from
21630 vector register instruction. For IEEE 128-bit floating point,
21631 also optimize stores of 32-bit ints.
21632 (fix<uns>_trunc<IEEE128:mode><QHSI:mode>2_mem): Likewise.
21634 2018-02-07 Alan Hayward <alan.hayward@arm.com>
21636 * genextract.c (push_pathstr_operand): New function to support
21638 (walk_rtx): Call push_pathstr_operand.
21639 (print_path): Support [a-zA-Z].
21641 2018-02-07 Richard Biener <rguenther@suse.de>
21643 PR tree-optimization/84037
21644 * tree-vectorizer.h (struct _loop_vec_info): Add ivexpr_map member.
21645 (cse_and_gimplify_to_preheader): Declare.
21646 (vect_get_place_in_interleaving_chain): Likewise.
21647 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
21649 (_loop_vec_info::~_loop_vec_info): Delete it.
21650 (cse_and_gimplify_to_preheader): New function.
21651 * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Export.
21652 * tree-vect-stmts.c (vectorizable_store): CSE base and steps.
21653 (vectorizable_load): Likewise. For grouped stores always base
21654 the IV on the first element.
21655 * tree-vect-loop-manip.c (vect_loop_versioning): Unshare versioning
21656 condition before gimplifying.
21658 2018-02-07 Jakub Jelinek <jakub@redhat.com>
21660 * tree-eh.c (operation_could_trap_helper_p): Ignore honor_trapv for
21661 *DIV_EXPR and *MOD_EXPR.
21663 2018-02-07 H.J. Lu <hongjiu.lu@intel.com>
21666 * config/i386/i386.c (ix86_option_override_internal): Mask out
21667 the CF_SET bit when checking -fcf-protection.
21669 2018-02-07 Tom de Vries <tom@codesourcery.com>
21672 * omp-expand.c (expand_oacc_collapse_init): Ensure diff_type is large
21675 2018-02-07 Richard Biener <rguenther@suse.de>
21677 PR tree-optimization/84204
21678 * tree-chrec.c (chrec_fold_plus_1): Remove size limiting in
21681 PR tree-optimization/84205
21682 * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Also
21683 special-case isl_ast_op_zdiv_r.
21685 PR tree-optimization/84223
21686 * graphite-scop-detection.c (gather_bbs::before_dom_children):
21687 Only add conditions from within the region.
21688 (gather_bbs::after_dom_children): Adjust.
21690 2018-02-07 Georg-Johann Lay <avr@gjlay.de>
21693 * config/avr/avr.h (GENERAL_REGNO_P, GENERAL_REG_P): New macros.
21694 * config/avr/avr.md: Only post-reload split REG-REG moves if
21695 either register is GENERAL_REG_P.
21697 2018-02-07 Jakub Jelinek <jakub@redhat.com>
21699 PR tree-optimization/84235
21700 * tree-ssa-scopedtables.c
21701 (avail_exprs_stack::simplify_binary_operation): Fir MINUS_EXPR, punt
21702 if the subtraction is performed in floating point type where NaNs are
21703 honored. For *DIV_EXPR, punt for ALL_FRACT_MODE_Ps where we can't
21704 build 1. Formatting fix.
21706 2018-02-06 Jakub Jelinek <jakub@redhat.com>
21709 * config/i386/i386.c (rest_of_insert_endbranch): Only skip
21710 NOTE_INSN_CALL_ARG_LOCATION after a call, not anything else,
21711 and skip it regardless of bb boundaries. Use CALL_P macro,
21712 don't test INSN_P (insn) together with CALL_P or JUMP_P check
21713 unnecessarily, formatting fix.
21715 2018-02-06 Michael Collison <michael.collison@arm.com>
21717 * config/arm/thumb2.md:
21718 (*thumb2_mov_negscc): Split only if TARGET_THUMB2 && !arm_restrict_it.
21719 (*thumb_mov_notscc): Ditto.
21721 2018-02-06 Michael Meissner <meissner@linux.vnet.ibm.com>
21724 * config/rs6000/rs6000.md (su code attribute): Use "u" for
21725 unsigned_fix, not "s".
21727 2018-02-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
21729 * configure.ac (gcc_fn_eh_frame_ro): New function.
21730 (gcc_cv_as_cfi_directive): Check both 32 and 64-bit assembler for
21731 correct .eh_frame permissions.
21732 * configure: Regenerate.
21734 2018-02-06 Andrew Jenner <andrew@codeourcery.com>
21736 * doc/invoke.texi: Add section for the PowerPC SPE backend. Remove
21737 irrelevant options.
21739 2018-02-06 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
21741 * config/rs6000/rs6000.c (rs6000_option_override_internal):
21742 Display warning message for -mno-speculate-indirect-jumps.
21744 2018-02-06 Andrew Jenner <andrew@codesourcery.com>
21746 * config/powerpcspe/powerpcspe.opt: (msimple-fpu, mfpu) Add
21748 * config/powerpcspe/sysv4.opt (mbit-align): Likewise.
21750 2018-02-06 Aldy Hernandez <aldyh@redhat.com>
21752 PR tree-optimization/84225
21753 * tree-eh.c (find_trapping_overflow): Only call
21754 operation_no_trapping_overflow when ANY_INTEGRAL_TYPE_P.
21756 2018-02-06 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
21759 * config/i386/i386.c: Reimplement the check of possible options
21760 -mibt/-mshstk conbination. Change error messages.
21761 * doc/invoke.texi: Fix a typo: remove extra '='.
21763 2018-02-06 Marek Polacek <polacek@redhat.com>
21765 PR tree-optimization/84228
21766 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Skip debug statements.
21768 2018-02-06 Tamar Christina <tamar.christina@arm.com>
21771 * config/arm/arm.c (arm_print_asm_arch_directives): Record already
21772 emitted arch directives.
21773 * config/arm/arm-c.c (arm_cpu_builtins): Undefine __ARM_ARCH and
21774 __ARM_FEATURE_COPROC before changing architectures.
21776 2018-02-06 Richard Biener <rguenther@suse.de>
21778 * config/i386/i386.c (print_reg): Fix typo.
21779 (ix86_loop_unroll_adjust): Do not unroll beyond the original nunroll.
21781 2018-02-06 Eric Botcazou <ebotcazou@adacore.com>
21783 * configure: Regenerate.
21785 2018-02-05 Martin Sebor <msebor@redhat.com>
21787 PR tree-optimization/83369
21788 * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Use %G to print
21791 2018-02-05 Martin Liska <mliska@suse.cz>
21793 * doc/invoke.texi: Cherry-pick upstream r323995.
21795 2018-02-05 Richard Sandiford <richard.sandiford@linaro.org>
21797 * ira.c (ira_init_register_move_cost): Adjust comment.
21799 2018-02-05 Martin Liska <mliska@suse.cz>
21801 PR gcov-profile/84137
21802 * doc/gcov.texi: Fix typo in documentation.
21804 2018-02-05 Martin Liska <mliska@suse.cz>
21806 PR gcov-profile/83879
21807 * doc/gcov.texi: Document necessity of --dynamic-list-data when
21808 using dlopen functionality.
21810 2018-02-05 Olga Makhotina <olga.makhotina@intel.com>
21812 * config/i386/avx512dqintrin.h (_mm_mask_range_sd, _mm_maskz_range_sd,
21813 _mm_mask_range_round_sd, _mm_maskz_range_round_sd, _mm_mask_range_ss,
21814 _mm_maskz_range_ss, _mm_mask_range_round_ss,
21815 _mm_maskz_range_round_ss): New intrinsics.
21816 (__builtin_ia32_rangesd128_round)
21817 (__builtin_ia32_rangess128_round): Remove.
21818 (__builtin_ia32_rangesd128_mask_round,
21819 __builtin_ia32_rangess128_mask_round): New builtins.
21820 * config/i386/i386-builtin.def (__builtin_ia32_rangesd128_round,
21821 __builtin_ia32_rangess128_round): Remove.
21822 (__builtin_ia32_rangesd128_mask_round,
21823 __builtin_ia32_rangess128_mask_round): New builtins.
21824 * config/i386/sse.md (ranges<mode><round_saeonly_name>): Renamed to ...
21825 (ranges<mode><mask_scalar_name><round_saeonly_scalar_name>): ... this.
21826 ((match_operand:VF_128 2 "<round_saeonly_nimm_predicate>"
21827 "<round_saeonly_constraint>")): Changed to ...
21828 ((match_operand:VF_128 2 "<round_saeonly_scalar_nimm_predicate>"
21829 "<round_saeonly_scalar_constraint>")): ... this.
21830 ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_op4>%2, %1, %0|
21831 %0, %1, %2<round_saeonly_op4>, %3}"): Changed to ...
21832 ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_scalar_mask_op4>%2,
21833 %1, %0<mask_scalar_operand4>|%0<mask_scalar_operand4>, %1,
21834 %2<round_saeonly_scalar_mask_op4>, %3}"): ... this.
21836 2018-02-02 Andrew Jenner <andrew@codesourcery.com>
21838 * config/powerpcspe/powerpcspe.opt: Add Undocumented to irrelevant
21840 * config/powerpcspe/powerpcspe-tables.opt (rs6000_cpu_opt_value):
21841 Remove all values except native, 8540 and 8548.
21843 2018-02-02 H.J. Lu <hongjiu.lu@intel.com>
21845 * config/i386/i386.c (ix86_output_function_return): Pass
21846 INVALID_REGNUM, instead of -1, as invalid register number to
21847 indirect_thunk_name and output_indirect_thunk.
21849 2018-02-02 Julia Koval <julia.koval@intel.com>
21851 * config.gcc: Add -march=icelake.
21852 * config/i386/driver-i386.c (host_detect_local_cpu): Detect icelake.
21853 * config/i386/i386-c.c (ix86_target_macros_internal): Handle icelake.
21854 * config/i386/i386.c (processor_costs): Add m_ICELAKE.
21855 (PTA_ICELAKE, PTA_AVX512VNNI, PTA_GFNI, PTA_VAES, PTA_AVX512VBMI2,
21856 PTA_VPCLMULQDQ, PTA_RDPID, PTA_AVX512BITALG): New.
21857 (processor_target_table): Add icelake.
21858 (ix86_option_override_internal): Handle new PTAs.
21859 (get_builtin_code_for_version): Handle icelake.
21860 (M_INTEL_COREI7_ICELAKE): New.
21861 (fold_builtin_cpu): Handle icelake.
21862 * config/i386/i386.h (TARGET_ICELAKE, PROCESSOR_ICELAKE): New.
21863 * doc/invoke.texi: Add -march=icelake.
21865 2018-02-02 Julia Koval <julia.koval@intel.com>
21867 * config/i386/i386.c (ix86_option_override_internal): Change flags type
21868 to wide_int_bitmask.
21869 * wide-int-bitmask.h: New.
21871 2018-02-02 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
21874 * config/i386/i386.md: Replace Pmode with word_mode in
21875 builtin_setjmp_setup and builtin_longjmp to support x32.
21877 2018-02-01 Peter Bergner <bergner@vnet.ibm.com>
21881 * config/rs6000/driver-rs6000.c: #include "diagnostic.h".
21883 (rs6000_supported_cpu_names): New static variable.
21884 (linux_cpu_translation_table): Likewise.
21885 (elf_platform) <cpu>: Define new static variable and use it.
21886 Translate kernel AT_PLATFORM name to canonical name if needed.
21887 Error if platform name is unknown.
21889 2018-02-01 Aldy Hernandez <aldyh@redhat.com>
21892 * config/pa/predicates.md (base14_operand): Handle E_VOIDmode.
21894 2018-02-01 Jeff Law <law@redhat.com>
21897 * config/i386/i386.c (release_scratch_register_on_entry): Add new
21898 OFFSET and RELEASE_VIA_POP arguments. Use SP+OFFSET to restore
21899 the scratch if RELEASE_VIA_POP is false.
21900 (ix86_adjust_stack_and_probe_stack_clash): Un-constify SIZE.
21901 If we have to save a temporary register, decrement SIZE appropriately.
21902 Pass new arguments to release_scratch_register_on_entry.
21903 (ix86_adjust_stack_and_probe): Likewise.
21904 (ix86_emit_probe_stack_range): Pass new arguments to
21905 release_scratch_register_on_entry.
21907 2018-02-01 Uros Bizjak <ubizjak@gmail.com>
21909 PR rtl-optimization/84157
21910 * combine.c (change_zero_ext): Use REG_P predicate in
21911 front of HARD_REGISTER_P predicate.
21913 2018-02-01 Georg-Johann Lay <avr@gjlay.de>
21915 * config/avr/avr.c (avr_option_override): Move disabling of
21916 -fdelete-null-pointer-checks to...
21917 * common/config/avr/avr-common.c (avr_option_optimization_table):
21920 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
21922 PR tree-optimization/81635
21923 * tree-data-ref.c (split_constant_offset_1): For types that
21924 wrap on overflow, try to use range info to prove that wrapping
21927 2018-02-01 Renlin Li <renlin.li@arm.com>
21930 * config/aarch64/aarch64.c (aarch64_class_max_nregs): Handle
21931 TAILCALL_ADDR_REGS.
21932 (aarch64_register_move_cost): Likewise.
21933 * config/aarch64/aarch64.h (reg_class): Rename CALLER_SAVE_REGS to
21934 TAILCALL_ADDR_REGS.
21935 (REG_CLASS_NAMES): Likewise.
21936 (REG_CLASS_CONTENTS): Rename CALLER_SAVE_REGS to
21937 TAILCALL_ADDR_REGS. Remove IP registers.
21938 * config/aarch64/aarch64.md (Ucs): Update register constraint.
21940 2018-02-01 Richard Biener <rguenther@suse.de>
21942 * domwalk.h (dom_walker::dom_walker): Add additional constructor
21943 for specifying RPO order and allow NULL for that.
21944 * domwalk.c (dom_walker::dom_walker): Likewise.
21945 (dom_walker::walk): Handle NULL RPO order.
21946 * tree-into-ssa.c (rewrite_dom_walker): Do not walk dom children
21948 (rewrite_update_dom_walker): Likewise.
21949 (mark_def_dom_walker): Likewise.
21951 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
21953 * config/aarch64/aarch64-protos.h (aarch64_split_sve_subreg_move)
21954 (aarch64_maybe_expand_sve_subreg_move): Declare.
21955 * config/aarch64/aarch64.md (UNSPEC_REV_SUBREG): New unspec.
21956 * config/aarch64/predicates.md (aarch64_any_register_operand): New
21958 * config/aarch64/aarch64-sve.md (mov<mode>): Optimize subreg moves
21959 that are semantically a reverse operation.
21960 (*aarch64_sve_mov<mode>_subreg_be): New pattern.
21961 * config/aarch64/aarch64.c (aarch64_maybe_expand_sve_subreg_move):
21962 (aarch64_replace_reg_mode, aarch64_split_sve_subreg_move): New
21964 (aarch64_can_change_mode_class): For big-endian, forbid changes
21965 between two SVE modes if they have different element sizes.
21967 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
21969 * config/aarch64/aarch64.c (aarch64_expand_sve_const_vector): Prefer
21970 the TImode handling for big-endian targets.
21972 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
21974 * config/aarch64/aarch64-sve.md (sve_ld1rq): Replace with...
21975 (*sve_ld1rq<Vesize>): ... this new pattern. Handle all element sizes,
21977 * config/aarch64/aarch64.c (aarch64_expand_sve_widened_duplicate):
21978 Remove BSWAP handing for big-endian targets and use the form of
21979 LD1RQ appropariate for the mode.
21981 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
21983 * config/aarch64/aarch64.c (aarch64_simd_valid_immediate): Handle
21984 all CONST_VECTOR_DUPLICATE_P vectors, not just those with a single
21985 duplicated element.
21987 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
21990 * config/aarch64/aarch64.c (aarch64_secondary_reload): Tighten
21991 check for operands that need to go through aarch64_sve_reload_be.
21993 2018-02-01 Jakub Jelinek <jakub@redhat.com>
21995 PR tree-optimization/81661
21996 PR tree-optimization/84117
21997 * tree-eh.h (rewrite_to_non_trapping_overflow): Declare.
21998 * tree-eh.c: Include gimplify.h.
21999 (find_trapping_overflow, replace_trapping_overflow,
22000 rewrite_to_non_trapping_overflow): New functions.
22001 * tree-vect-loop.c: Include tree-eh.h.
22002 (vect_get_loop_niters): Use rewrite_to_non_trapping_overflow.
22003 * tree-data-ref.c: Include tree-eh.h.
22004 (get_segment_min_max): Use rewrite_to_non_trapping_overflow.
22006 2018-01-31 Uros Bizjak <ubizjak@gmail.com>
22008 PR rtl-optimization/84123
22009 * combine.c (change_zero_ext): Check if hard register satisfies
22010 can_change_dest_mode before calling gen_lowpart_SUBREG.
22012 2018-01-31 Vladimir Makarov <vmakarov@redhat.com>
22015 * ira.c (ira_init_register_move_cost): Remove assert.
22017 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
22019 PR rtl-optimization/84071
22020 * doc/tm.texi.in (WORD_REGISTER_OPERATIONS): Add explicit case.
22021 * doc/tm.texi: Regenerate.
22023 2018-01-31 Richard Biener <rguenther@suse.de>
22025 PR tree-optimization/84132
22026 * tree-data-ref.c (analyze_miv_subscript): Properly
22027 check whether evolution_function_is_affine_multivariate_p
22028 before calling gcd_of_steps_may_divide_p.
22030 2018-01-31 Julia Koval <julia.koval@intel.com>
22033 * config/i386/i386.c (ix86_expand_builtin): Handle IX86_BUILTIN_RDPID.
22034 * config/i386/i386.md (rdpid_rex64) New.
22035 (rdpid): Make 32bit only.
22037 2018-01-29 Aldy Hernandez <aldyh@redhat.com>
22040 * tree-pretty-print.c (dump_generic_node): Handle a TYPE_NAME with
22041 an IDENTIFIER_NODE for FUNCTION_TYPE's.
22043 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
22046 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
22048 * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
22050 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
22052 PR rtl-optimization/84071
22053 * combine.c (record_dead_and_set_regs_1): Record the source unmodified
22054 for a paradoxical SUBREG on a WORD_REGISTER_OPERATIONS target.
22056 2018-01-31 Claudiu Zissulescu <claziss@synopsys.com>
22058 * config/arc/arc.c (arc_handle_aux_attribute): New function.
22059 (arc_attribute_table): Add 'aux' attribute.
22060 (arc_in_small_data_p): Consider aux like variables.
22061 (arc_is_aux_reg_p): New function.
22062 (arc_asm_output_aligned_decl_local): Ignore 'aux' like variables.
22063 (arc_get_aux_arg): New function.
22064 (prepare_move_operands): Handle aux-register access.
22065 (arc_handle_aux_attribute): New function.
22066 * doc/extend.texi (ARC Variable attributes): Add subsection.
22068 2018-01-31 Claudiu Zissulescu <claziss@synopsys.com>
22070 * config/arc/arc-protos.h (arc_is_uncached_mem_p): Function proto.
22071 * config/arc/arc.c (arc_handle_uncached_attribute): New function.
22072 (arc_attribute_table): Add 'uncached' attribute.
22073 (arc_print_operand): Print '.di' flag for uncached memory
22075 (arc_in_small_data_p): Do not consider for small data the uncached
22077 (arc_is_uncached_mem_p): New function.
22078 * config/arc/predicates.md (compact_store_memory_operand): Check
22079 for uncached memory accesses.
22080 (nonvol_nonimm_operand): Likewise.
22081 * doc/extend.texi (ARC Type Attribute): New subsection.
22083 2018-01-31 Jakub Jelinek <jakub@redhat.com>
22086 * common.opt (falign-functions=, falign-jumps=, falign-labels=,
22087 falign-loops=): Add Optimization flag.
22089 2018-01-30 Jeff Law <law@redhat.com>
22092 * i386.c (ix86_adjust_stack_and_probe_stack_clash): New argument
22093 INT_REGISTERS_SAVED. Check it prior to calling
22094 get_scratch_register_on_entry.
22095 (ix86_adjust_stack_and_probe): Similarly.
22096 (ix86_emit_probe_stack_range): Similarly.
22097 (ix86_expand_prologue): Corresponding changes.
22099 2018-01-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
22102 * config/sol2.h (STARTFILE_ARCH_SPEC): Use -std=c*,
22103 -std=iso9899:199409 instead of -pedantic to select values-Xc.o.
22105 2018-01-30 Vladimir Makarov <vmakarov@redhat.com>
22108 * lra-constraints.c (curr_insn_transform): Process AND in the
22111 2018-01-30 Jakub Jelinek <jakub@redhat.com>
22113 PR rtl-optimization/83986
22114 * sched-deps.c (sched_analyze_insn): For frame related insns, add anti
22115 dependence against last_pending_memory_flush in addition to
22116 pending_jump_insns.
22118 2018-01-30 Alexandre Oliva <aoliva@redhat.com>
22120 PR tree-optimization/81611
22121 * tree-ssa-dom.c (simple_iv_increment_p): Skip intervening
22124 2018-01-30 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
22127 * config/rs6000/rs6000.c (rs6000_internal_arg_pointer): Only return
22130 2018-01-30 Richard Biener <rguenther@suse.de>
22131 Jakub Jelinek <jakub@redhat.com>
22133 PR tree-optimization/84111
22134 * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1): Skip
22135 inner loops added during recursion, as they don't have up-to-date
22138 2018-01-30 Jan Hubicka <hubicka@ucw.cz>
22141 * ipa-inline.c (can_inline_edge_p): Break out late tests to...
22142 (can_inline_edge_by_limits_p): ... here.
22143 (can_early_inline_edge_p, check_callers,
22144 update_caller_keys, update_callee_keys, recursive_inlining,
22145 add_new_edges_to_heap, speculation_useful_p,
22146 inline_small_functions,
22147 inline_small_functions, flatten_function,
22148 inline_to_all_callers_1): Update.
22150 2018-01-30 Jan Hubicka <hubicka@ucw.cz>
22152 * profile-count.c (profile_count::combine_with_ipa_count): Handle
22155 2018-01-30 Richard Biener <rguenther@suse.de>
22157 PR tree-optimization/83008
22158 * tree-vect-slp.c (vect_analyze_slp_cost_1): Properly cost
22159 invariant and constant vector uses in stmts when they need
22160 more than one stmt.
22162 2018-01-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
22165 * configure.ac (gcc_cv_as_shf_merge): Disable on Solaris 10/x86.
22166 * configure: Regenerate.
22168 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
22170 * config/aarch64/aarch64-sve.md (*vec_extract<mode><Vel>_0): New
22172 (*vec_extract<mode><Vel>_v128): Require a nonzero lane number.
22173 Use gen_rtx_REG rather than gen_lowpart.
22175 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
22177 * lra-constraints.c (match_reload): Use subreg_lowpart_offset
22178 rather than 0 when creating partial subregs.
22180 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
22182 * vec-perm-indices.c (vec_perm_indices::series_p): Give examples
22185 2018-01-29 Michael Meissner <meissner@linux.vnet.ibm.com>
22188 * config/rs6000/rs6000.c (rs6000_setup_reg_addr_masks): If DFmode
22189 and SFmode can go in Altivec registers (-mcpu=power7 for DFmode,
22190 -mcpu=power8 for SFmode) don't set the PRE_INCDEC or PRE_MODIFY
22191 flags. This restores the settings used before the 2017-07-24.
22192 Turning off pre increment/decrement/modify allows IVOPTS to
22193 optimize DF/SF loops where the index is an int.
22195 2018-01-29 Richard Biener <rguenther@suse.de>
22196 Kelvin Nilsen <kelvin@gcc.gnu.org>
22199 * tree-vect-stmts.c (vectorizable_call): Don't call
22200 targetm.vectorize_builtin_md_vectorized_function if callee is
22203 2018-01-22 Carl Love <cel@us.ibm.com>
22205 * doc/extend.tex: Fix typo in second arg in
22206 __builtin_bcdadd_{lt|eq|gt|ov} and __builtin_bcdsub_{lt|eq|gt|ov}.
22208 2018-01-29 Richard Biener <rguenther@suse.de>
22210 PR tree-optimization/84086
22211 * tree-ssanames.c: Include cfgloop.h and tree-scalar-evolution.h.
22212 (flush_ssaname_freelist): When SSA names were released reset
22213 the SCEV hash table.
22215 2018-01-29 Richard Biener <rguenther@suse.de>
22217 PR tree-optimization/84057
22218 * tree-ssa-loop-ivcanon.c (unloop_loops): Deal with already
22219 removed paths when removing edges.
22221 2018-01-27 H.J. Lu <hongjiu.lu@intel.com>
22223 * doc/invoke.texi: Replace -mfunction-return==@var{choice} with
22224 -mfunction-return=@var{choice}.
22226 2018-01-27 Bernd Edlinger <bernd.edlinger@hotmail.de>
22228 PR diagnostic/84034
22229 * diagnostic-show-locus.c (get_line_width_without_trailing_whitespace):
22230 Handle CR like TAB.
22231 (layout::print_source_line): Likewise.
22232 (test_get_line_width_without_trailing_whitespace): Add test cases.
22234 2018-01-27 Jakub Jelinek <jakub@redhat.com>
22236 PR middle-end/84040
22237 * sched-deps.c (sched_macro_fuse_insns): Return immediately for
22240 2018-01-26 Jim Wilson <jimw@sifive.com>
22242 * config/riscv/riscv.h (MAX_FIXED_MODE_SIZE): New.
22244 * config/riscv/elf.h (LIB_SPEC): Don't include -lgloss when nosys.specs
22247 2018-01-26 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
22249 * config/aarch64/aarch64.md: Add peepholes for CMP + SUB -> SUBS
22250 and CMP + SUB-immediate -> SUBS.
22252 2018-01-26 Martin Sebor <msebor@redhat.com>
22254 PR tree-optimization/83896
22255 * tree-ssa-strlen.c (get_string_len): Rename...
22256 (get_string_cst_length): ...to this. Return HOST_WIDE_INT.
22257 Avoid assuming length is constant.
22258 (handle_char_store): Use HOST_WIDE_INT for string length.
22260 2018-01-26 Uros Bizjak <ubizjak@gmail.com>
22263 * config/i386/i386.md (*andndi3_doubleword): Add earlyclobber
22264 to (=&r,r,rm) alternative. Add (=r,0,rm) and (=r,r,0) alternatives.
22266 2018-01-26 Richard Biener <rguenther@suse.de>
22268 PR rtl-optimization/84003
22269 * dse.c (record_store): Only record redundant stores when
22270 the earlier store aliases at least all accesses the later one does.
22272 2018-01-26 Jakub Jelinek <jakub@redhat.com>
22274 PR rtl-optimization/83985
22275 * dce.c (deletable_insn_p): Return false for separate shrink wrapping
22276 REG_CFA_RESTORE insns.
22277 (delete_unmarked_insns): Don't ignore separate shrink wrapping
22278 REG_CFA_RESTORE insns here.
22281 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Don't
22282 use SSA_NAME_VAR as base for SSA_NAMEs with non-NULL SSA_NAME_VAR.
22284 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
22286 * config/arc/arc-arch.h (arc_tune_attr): Add ARC_TUNE_CORE_3.
22287 * config/arc/arc.c (arc_sched_issue_rate): Use ARC_TUNE_... .
22288 (arc_init): Likewise.
22289 (arc_override_options): Likewise.
22290 (arc_file_start): Choose Tag_ARC_CPU_variation based on arc_tune
22292 (hwloop_fail): Use TARGET_DBNZ when we want to check for dbnz insn
22294 * config/arc/arc.h (TARGET_DBNZ): Define.
22295 * config/arc/arc.md (attr tune): Add core_3, use ARC_TUNE_... to
22296 properly set the tune attribute.
22297 (dbnz): Use TARGET_DBNZ guard.
22298 * config/arc/arc.opt (mtune): Add core3 option.
22300 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
22302 * config/arc/arc.c (arc_delegitimize_address_0): Refactored to
22303 recognize new pic like addresses.
22304 (arc_delegitimize_address): Clean up.
22306 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
22308 * config/arc/arc-arches.def: Option mrf16 valid for all
22310 * config/arc/arc-c.def (__ARC_RF16__): New predefined macro.
22311 * config/arc/arc-cpus.def (em_mini): New cpu with rf16 on.
22312 * config/arc/arc-options.def (FL_RF16): Add mrf16 option.
22313 * config/arc/arc-tables.opt: Regenerate.
22314 * config/arc/arc.c (arc_conditional_register_usage): Handle
22315 reduced register file case.
22316 (arc_file_start): Set must have build attributes.
22317 * config/arc/arc.h (MAX_ARC_PARM_REGS): Conditional define using
22318 mrf16 option value.
22319 * config/arc/arc.opt (mrf16): Add new option.
22320 * config/arc/elf.h (ATTRIBUTE_PCS): Define.
22321 * config/arc/genmultilib.awk: Handle new mrf16 option.
22322 * config/arc/linux.h (ATTRIBUTE_PCS): Define.
22323 * config/arc/t-multilib: Regenerate.
22324 * doc/invoke.texi (ARC Options): Document mrf16 option.
22326 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
22328 * config/arc/arc-protos.h: Add arc_is_secure_call_p proto.
22329 * config/arc/arc.c (arc_handle_secure_attribute): New function.
22330 (arc_attribute_table): Add 'secure_call' attribute.
22331 (arc_print_operand): Print secure call operand.
22332 (arc_function_ok_for_sibcall): Don't optimize tail calls when
22334 (arc_is_secure_call_p): New function. * config/arc/arc.md
22335 (call_i): Add support for sjli instruction.
22336 (call_value_i): Likewise.
22337 * config/arc/constraints.md (Csc): New constraint.
22339 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
22340 John Eric Martin <John.Martin@emmicro-us.com>
22342 * config/arc/arc-protos.h: Add arc_is_jli_call_p proto.
22343 * config/arc/arc.c (_arc_jli_section): New struct.
22344 (arc_jli_section): New type.
22345 (rc_jli_sections): New static variable.
22346 (arc_handle_jli_attribute): New function.
22347 (arc_attribute_table): Add jli_always and jli_fixed attribute.
22348 (arc_file_end): New function.
22349 (TARGET_ASM_FILE_END): Define.
22350 (arc_print_operand): Reuse 'S' letter for JLI output instruction.
22351 (arc_add_jli_section): New function.
22352 (jli_call_scan): Likewise.
22353 (arc_reorg): Call jli_call_scan.
22354 (arc_output_addsi): Remove 'S' from printing asm operand.
22355 (arc_is_jli_call_p): New function.
22356 * config/arc/arc.md (movqi_insn): Remove 'S' from printing asm
22358 (movhi_insn): Likewise.
22359 (movsi_insn): Likewise.
22360 (movsi_set_cc_insn): Likewise.
22361 (loadqi_update): Likewise.
22362 (load_zeroextendqisi_update): Likewise.
22363 (load_signextendqisi_update): Likewise.
22364 (loadhi_update): Likewise.
22365 (load_zeroextendhisi_update): Likewise.
22366 (load_signextendhisi_update): Likewise.
22367 (loadsi_update): Likewise.
22368 (loadsf_update): Likewise.
22369 (movsicc_insn): Likewise.
22370 (bset_insn): Likewise.
22371 (bxor_insn): Likewise.
22372 (bclr_insn): Likewise.
22373 (bmsk_insn): Likewise.
22374 (bicsi3_insn): Likewise.
22375 (cmpsi_cc_c_insn): Likewise.
22376 (movsi_ne): Likewise.
22377 (movsi_cond_exec): Likewise.
22378 (clrsbsi2): Likewise.
22379 (norm_f): Likewise.
22389 (call_i): Remove 'S' asm letter, add jli instruction.
22390 (call_value_i): Likewise.
22391 * config/arc/arc.op (mjli-always): New option.
22392 * config/arc/constraints.md (Cji): New constraint.
22393 * config/arc/fpx.md (addsf3_fpx): Remove 'S' from printing asm
22395 (subsf3_fpx): Likewise.
22396 (mulsf3_fpx): Likewise.
22397 * config/arc/simdext.md (vendrec_insn): Remove 'S' from printing
22399 * doc/extend.texi (ARC): Document 'jli-always' and 'jli-fixed'
22400 function attrbutes.
22401 * doc/invoke.texi (ARC): Document mjli-always option.
22403 2018-01-26 Sebastian Perta <sebastian.perta@renesas.com>
22405 * config/rl78/rl78.c (rl78_addsi3_internal): If operand 2 is const
22406 avoid addition with 0 and use incw and decw where possible.
22408 2018-01-26 Richard Biener <rguenther@suse.de>
22410 PR tree-optimization/81082
22411 * fold-const.c (fold_plusminus_mult_expr): Do not perform the
22412 association if it requires casting to unsigned.
22413 * match.pd ((A * C) +- (B * C) -> (A+-B)): New patterns derived
22414 from fold_plusminus_mult_expr to catch important cases late when
22415 range info is available.
22417 2018-01-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
22419 * config/i386/sol2.h (USE_HIDDEN_LINKONCE): Remove.
22420 * configure.ac (hidden_linkonce): New test.
22421 * configure: Regenerate.
22422 * config.in: Regenerate.
22424 2018-01-26 Julia Koval <julia.koval@intel.com>
22426 * config/i386/avx512bitalgintrin.h (_mm512_bitshuffle_epi64_mask,
22427 _mm512_mask_bitshuffle_epi64_mask, _mm256_bitshuffle_epi64_mask,
22428 _mm256_mask_bitshuffle_epi64_mask, _mm_bitshuffle_epi64_mask,
22429 _mm_mask_bitshuffle_epi64_mask): Fix type.
22430 * config/i386/i386-builtin-types.def (UHI_FTYPE_V2DI_V2DI_UHI,
22431 USI_FTYPE_V4DI_V4DI_USI): Remove.
22432 * config/i386/i386-builtin.def (__builtin_ia32_vpshufbitqmb512_mask,
22433 __builtin_ia32_vpshufbitqmb256_mask,
22434 __builtin_ia32_vpshufbitqmb128_mask): Fix types.
22435 * config/i386/i386.c (ix86_expand_args_builtin): Remove old types.
22436 * config/i386/sse.md (VI1_AVX512VLBW): Change types.
22438 2018-01-26 Alan Modra <amodra@gmail.com>
22441 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Exclude
22442 UNSPEC_VBPERMQ. Sort other unspecs.
22444 2018-01-25 David Edelsohn <dje.gcc@gmail.com>
22446 * doc/invoke.texi (PowerPC Options): Document 'native' cpu type.
22448 2018-01-25 Jan Hubicka <hubicka@ucw.cz>
22450 PR middle-end/83055
22451 * predict.c (drop_profile): Do not push/pop cfun; update also
22453 (handle_missing_profiles): Fix logic looking for zero profiles.
22455 2018-01-25 Jakub Jelinek <jakub@redhat.com>
22457 PR middle-end/83977
22458 * ipa-fnsummary.c (compute_fn_summary): Clear can_change_signature
22459 on functions with #pragma omp declare simd or functions with simd
22461 * omp-simd-clone.c (expand_simd_clones): Revert 2018-01-24 change.
22462 * config/i386/i386.c (ix86_simd_clone_compute_vecsize_and_simdlen):
22463 Remove trailing \n from warning_at calls.
22465 2018-01-25 Tom de Vries <tom@codesourcery.com>
22468 * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
22469 for neutered workers.
22471 2018-01-24 Joseph Myers <joseph@codesourcery.com>
22474 * config/m68k/m68k.c (m68k_promote_function_mode): New function.
22475 (TARGET_PROMOTE_FUNCTION_MODE): New macro.
22477 2018-01-24 Jeff Law <law@redhat.com>
22480 * i386.c (get_probe_interval): Move to earlier point.
22481 (ix86_compute_frame_layout): If -fstack-clash-protection and
22482 the frame is larger than the probe interval, then use pushes
22483 to save registers rather than reg->mem moves.
22484 (ix86_expand_prologue): Remove conditional for int_registers_saved
22487 2018-01-24 Vladimir Makarov <vmakarov@redhat.com>
22490 * ira-build.c (setup_min_max_allocno_live_range_point): Set up
22491 min/max for never referenced object.
22493 2018-01-24 Jakub Jelinek <jakub@redhat.com>
22495 PR middle-end/83977
22496 * tree.c (free_lang_data_in_decl): Don't clear DECL_ABSTRACT_ORIGIN
22498 * omp-low.c (create_omp_child_function): Remove "omp declare simd"
22499 attributes from DECL_ATTRIBUTES (decl) without affecting
22500 DECL_ATTRIBUTES (current_function_decl).
22501 * omp-simd-clone.c (expand_simd_clones): Ignore DECL_ARTIFICIAL
22502 functions with non-NULL DECL_ABSTRACT_ORIGIN.
22504 2018-01-24 Richard Sandiford <richard.sandiford@linaro.org>
22506 PR tree-optimization/83979
22507 * fold-const.c (fold_comparison): Use constant_boolean_node
22508 instead of boolean_{true,false}_node.
22510 2018-01-24 Jan Hubicka <hubicka@ucw.cz>
22512 * ipa-profile.c (ipa_propagate_frequency_1): Fix logic skipping calls
22515 2018-01-24 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
22517 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
22518 Simplify the clause that sets the length attribute.
22519 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
22520 (*sibcall_nonlocal_sysv<mode>): Clean up code block; simplify the
22521 clause that sets the length attribute.
22522 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
22524 2018-01-24 Tom de Vries <tom@codesourcery.com>
22527 * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_2): Define to 1.
22528 (nvptx_pc_set, nvptx_condjump_label): New function. Copy from jump.c.
22529 Add strict parameter.
22530 (prevent_branch_around_nothing): Insert dummy insn between branch to
22531 label and label with no ptx insn inbetween.
22532 * config/nvptx/nvptx.md (define_insn "fake_nop"): New insn.
22534 2018-01-24 Tom de Vries <tom@codesourcery.com>
22537 * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
22538 for neutered threads in warp.
22539 * config/nvptx/nvptx.md (define_insn "exit"): New insn.
22541 2018-01-24 Richard Biener <rguenther@suse.de>
22543 PR tree-optimization/83176
22544 * tree-chrec.c (chrec_fold_plus_1): Handle (signed T){(T) .. }
22547 2018-01-24 Richard Biener <rguenther@suse.de>
22549 PR tree-optimization/82819
22550 * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Avoid
22551 code generating pluses that are no-ops in the target precision.
22553 2018-01-24 Richard Biener <rguenther@suse.de>
22555 PR middle-end/84000
22556 * tree-cfg.c (replace_loop_annotate): Handle annot_expr_parallel_kind.
22558 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
22560 * cfgcleanup.c (try_crossjump_to_edge): Use combine_with_count
22561 to merge probabilities.
22562 * predict.c (probably_never_executed): Also mark as cold functions
22563 with global 0 profile and guessed local profile.
22564 * profile-count.c (profile_probability::combine_with_count): New
22566 * profile-count.h (profile_probability::operator*,
22567 profile_probability::operator*=, profile_probability::operator/,
22568 profile_probability::operator/=): Reduce precision to adjusted
22569 and set value to guessed on contradictory divisions.
22570 (profile_probability::combine_with_freq): Remove.
22571 (profile_probability::combine_wiht_count): Declare.
22572 (profile_count::force_nonzero):: Set to adjusted.
22573 (profile_count::probability_in):: Set quality to adjusted.
22574 * tree-ssa-tail-merge.c (replace_block_by): Use
22575 combine_with_count.
22577 2018-01-23 Andrew Waterman <andrew@sifive.com>
22578 Jim Wilson <jimw@sifive.com>
22580 * config/riscv/riscv.c (riscv_stack_boundary): New.
22581 (riscv_option_override): Set riscv_stack_boundary. Handle
22582 riscv_preferred_stack_boundary_arg.
22583 * config/riscv/riscv.h (MIN_STACK_BOUNDARY, ABI_STACK_BOUNDARY): New.
22584 (BIGGEST_ALIGNMENT): Set to STACK_BOUNDARY.
22585 (STACK_BOUNDARY): Set to riscv_stack_boundary.
22586 (RISCV_STACK_ALIGN): Use STACK_BOUNDARY.
22587 * config/riscv/riscv.opt (mpreferred-stack-boundary): New.
22588 * doc/invoke.tex (RISC-V Options): Add -mpreferred-stack-boundary.
22590 2018-01-23 H.J. Lu <hongjiu.lu@intel.com>
22593 * config/i386/i386.c (ix86_expand_prologue): Use cost reference
22594 of struct ix86_frame.
22595 (ix86_expand_epilogue): Likewise. Add a local variable for
22596 the reg_save_offset field in struct ix86_frame.
22598 2018-01-23 Bin Cheng <bin.cheng@arm.com>
22600 PR tree-optimization/82604
22601 * tree-loop-distribution.c (enum partition_kind): New enum item
22602 PKIND_PARTIAL_MEMSET.
22603 (partition_builtin_p): Support above new enum item.
22604 (generate_code_for_partition): Ditto.
22605 (compute_access_range): Differentiate cases that equality can be
22606 proven at all loops, the innermost loops or no loops.
22607 (classify_builtin_st, classify_builtin_ldst): Adjust call to above
22608 function. Set PKIND_PARTIAL_MEMSET for partition appropriately.
22609 (finalize_partitions, distribute_loop): Don't fuse partition of
22610 PKIND_PARTIAL_MEMSET kind when distributing 3-level loop nest.
22611 (prepare_perfect_loop_nest): Distribute 3-level loop nest only if
22612 parloop is enabled.
22614 2018-01-23 Martin Liska <mliska@suse.cz>
22616 * predict.def (PRED_INDIR_CALL): Set probability to PROB_EVEN in
22617 order to ignore the predictor.
22618 (PRED_POLYMORPHIC_CALL): Likewise.
22619 (PRED_RECURSIVE_CALL): Likewise.
22621 2018-01-23 Martin Liska <mliska@suse.cz>
22623 * tree-profile.c (tree_profiling): Print function header to
22624 aware reader which function we are working on.
22625 * value-prof.c (gimple_find_values_to_profile): Do not print
22626 not interesting value histograms.
22628 2018-01-23 Martin Liska <mliska@suse.cz>
22630 * profile-count.h (enum profile_quality): Add
22631 profile_uninitialized as the first value. Do not number values
22632 as they are zero based.
22633 (profile_count::verify): Update sanity check.
22634 (profile_probability::verify): Likewise.
22636 2018-01-23 Nathan Sidwell <nathan@acm.org>
22638 * doc/invoke.texi (ffor-scope): Deprecate.
22640 2018-01-23 David Malcolm <dmalcolm@redhat.com>
22642 PR tree-optimization/83510
22643 * domwalk.c (set_all_edges_as_executable): New function.
22644 (dom_walker::dom_walker): Convert bool param
22645 "skip_unreachable_blocks" to enum reachability. Move setup of
22646 edge flags to set_all_edges_as_executable and only do it when
22647 reachability is REACHABLE_BLOCKS.
22648 * domwalk.h (enum dom_walker::reachability): New enum.
22649 (dom_walker::dom_walker): Convert bool param
22650 "skip_unreachable_blocks" to enum reachability.
22651 (set_all_edges_as_executable): New decl.
22652 * graphite-scop-detection.c (gather_bbs::gather_bbs): Convert
22653 from false for "skip_unreachable_blocks" to ALL_BLOCKS for
22655 * tree-ssa-dom.c (dom_opt_dom_walker::dom_opt_dom_walker): Likewise,
22656 but converting true to REACHABLE_BLOCKS.
22657 * tree-ssa-sccvn.c (sccvn_dom_walker::sccvn_dom_walker): Likewise.
22659 (check_array_bounds_dom_walker::check_array_bounds_dom_walker):
22660 Likewise, but converting it to REACHABLE_BLOCKS_PRESERVING_FLAGS.
22661 (vrp_dom_walker::vrp_dom_walker): Likewise, but converting it to
22663 (vrp_prop::vrp_finalize): Call set_all_edges_as_executable
22664 if check_all_array_refs will be called.
22666 2018-01-23 David Malcolm <dmalcolm@redhat.com>
22668 * tree.c (selftest::test_location_wrappers): Add more test
22671 2018-01-23 David Malcolm <dmalcolm@redhat.com>
22673 * sbitmap.c (selftest::test_set_range): Fix memory leaks.
22674 (selftest::test_bit_in_range): Likewise.
22676 2018-01-23 Richard Sandiford <richard.sandiford@linaro.org>
22679 * doc/sourcebuild.texi (vect_float): Say that the selector
22680 only describes the situation when -funsafe-math-optimizations is on.
22681 (vect_float_strict): Document.
22683 2018-01-23 Richard Sandiford <richard.sandiford@linaro.org>
22685 PR tree-optimization/83965
22686 * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
22687 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern): Use it
22688 instead of checking only for a reduction.
22689 (vect_recog_widen_sum_pattern): Likewise.
22691 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
22693 * predict.c (probably_never_executed): Only use precise profile info.
22694 (compute_function_frequency): Skip after inlining hack since we now
22695 have quality checking.
22697 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
22699 * profile-count.h (profile_probability::very_unlikely,
22700 profile_probability::unlikely, profile_probability::even): Set
22701 precision to guessed.
22703 2018-01-23 Richard Biener <rguenther@suse.de>
22705 PR tree-optimization/83963
22706 * graphite-scop-detection.c (scop_detection::harmful_loop_in_region):
22707 Properly terminate dominator walk when crossing the exit edge not
22708 when visiting its source block.
22710 2018-01-23 Jakub Jelinek <jakub@redhat.com>
22713 * tree.c (maybe_wrap_with_location): Use NON_LVALUE_EXPR rather than
22714 VIEW_CONVERT_EXPR to wrap CONST_DECLs.
22716 2018-01-22 Jakub Jelinek <jakub@redhat.com>
22718 PR tree-optimization/83957
22719 * omp-expand.c (expand_omp_for_generic): Ignore virtual PHIs. Remove
22720 semicolon after for body surrounded by braces.
22722 PR tree-optimization/83081
22723 * profile-count.h (profile_probability::split): New method.
22724 * dojump.c (do_jump_1) <case TRUTH_ANDIF_EXPR, case TRUTH_ORIF_EXPR>:
22725 Use profile_probability::split.
22726 (do_compare_rtx_and_jump): Fix adjustment of probabilities
22727 when splitting a single conditional jump into 2.
22729 2018-01-22 David Malcolm <dmalcolm@redhat.com>
22731 PR tree-optimization/69452
22732 * tree-ssa-loop-im.c (class move_computations_dom_walker): Remove
22735 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
22737 * config/rl78/rl78-expand.md (bswaphi2): New define_expand.
22738 * config/rl78/rl78-virt.md (*bswaphi2_virt): New define_insn.
22739 * config/rl78/rl78-real.md (*bswaphi2_real): New define_insn.
22741 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
22743 * config/rl78/rl78-protos.h (rl78_split_movdi): New function
22745 * config/rl78/rl78.md (movdi): New define_expand.
22746 * config/rl78/rl78.c (rl78_split_movdi): New function.
22748 2018-01-22 Michael Meissner <meissner@linux.vnet.ibm.com>
22751 * config/rs6000/rs6000-protos.h (rs6000_split_signbit): Delete,
22753 * config/rs6000/rs6000.c (rs6000_split_signbit): Likewise.
22754 * config/rs6000/rs6000.md (signbit<mode>2): Change code for IEEE
22755 128-bit to produce an UNSPEC move to get the double word with the
22756 signbit and then a shift directly to do signbit.
22757 (signbit<mode>2_dm): Replace old IEEE 128-bit signbit
22758 implementation with a new version that just does either a direct
22759 move or a regular move. Move memory interface to separate insns.
22760 Move insns so they are next to the expander.
22761 (signbit<mode>2_dm_mem_be): New combiner insns to combine load
22762 with signbit move. Split big and little endian case.
22763 (signbit<mode>2_dm_mem_le): Likewise.
22764 (signbit<mode>2_dm_<su>ext): Delete, no longer used.
22765 (signbit<mode>2_dm2): Likewise.
22767 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
22769 * config/rl78/rl78.md (anddi3): New define_expand.
22771 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
22773 * config/rl78/rl78.md (umindi3): New define_expand.
22775 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
22777 * config/rl78/rl78.md (smindi3): New define_expand.
22779 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
22781 * config/rl78/rl78.md (smaxdi3): New define_expand.
22783 2018-01-22 Carl Love <cel@us.ibm.com>
22785 * config/rs6000/rs6000-builtin.def (ST_ELEMREV_V1TI, LD_ELEMREV_V1TI,
22786 LVX_V1TI): Add macro expansion.
22787 * config/rs6000/rs6000-c.c (altivec_builtin_types): Add argument
22788 definitions for VSX_BUILTIN_VEC_XST_BE, VSX_BUILTIN_VEC_ST,
22789 VSX_BUILTIN_VEC_XL, LD_ELEMREV_V1TI builtins.
22790 * config/rs6000/rs6000-p8swap.c (insn_is_swappable_p);
22791 Change check to determine if the instruction is a byte reversing
22792 entry. Fix typo in comment.
22793 * config/rs6000/rs6000.c (altivec_expand_builtin): Add case entry
22794 for VSX_BUILTIN_ST_ELEMREV_V1TI and VSX_BUILTIN_LD_ELEMREV_V1TI.
22795 Add def_builtin calls for new builtins.
22796 * config/rs6000/vsx.md (vsx_st_elemrev_v1ti, vsx_ld_elemrev_v1ti):
22797 Add define_insn expansion.
22799 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
22801 * config/rl78/rl78.md (umaxdi3): New define_expand.
22803 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
22805 * config/rl78/rl78.c (rl78_note_reg_set): Fixed dead reg check
22806 for non-QImode registers.
22808 2018-01-22 Richard Biener <rguenther@suse.de>
22810 PR tree-optimization/83963
22811 * graphite-scop-detection.c (scop_detection::get_sese): Delay
22812 including the loop exit block.
22813 (scop_detection::merge_sese): Likewise.
22814 (scop_detection::add_scop): Do it here instead.
22816 2018-01-22 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
22818 * doc/sourcebuild.texi (arm_softfloat): Document.
22820 2018-01-21 John David Anglin <danglin@gcc.gnu.org>
22823 * config/pa/pa.c (pa_function_ok_for_sibcall): Use
22824 targetm.binds_local_p instead of TREE_PUBLIC to check local binding.
22825 Move TARGET_PORTABLE_RUNTIME check after TARGET_64BIT check.
22827 2018-01-21 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
22828 David Edelsohn <dje.gcc@gmail.com>
22831 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
22832 Change "crset eq" to "crset 2".
22833 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
22834 (*call_indirect_aix<mode>_nospec): Likewise.
22835 (*call_value_indirect_aix<mode>_nospec): Likewise.
22836 (*call_indirect_elfv2<mode>_nospec): Likewise.
22837 (*call_value_indirect_elfv2<mode>_nospec): Likewise.
22838 (*sibcall_nonlocal_sysv<mode>): Change "crset eq" to "crset 2";
22839 change assembly output from . to $.
22840 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
22841 (indirect_jump<mode>_nospec): Change assembly output from . to $.
22842 (*tablejump<mode>_internal1_nospec): Likewise.
22844 2018-01-21 Oleg Endo <olegendo@gcc.gnu.org>
22847 * config/sh/sh_optimize_sett_clrt.cc:
22848 Use INCLUDE_ALGORITHM and INCLUDE_VECTOR instead of direct includes.
22850 2018-01-20 Richard Sandiford <richard.sandiford@linaro.org>
22852 PR tree-optimization/83940
22853 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Set
22854 offset_dt to vect_constant_def rather than vect_unknown_def_type.
22855 (vect_check_load_store_mask): Add a mask_dt_out parameter and
22856 use it to pass back the definition type.
22857 (vect_check_store_rhs): Likewise rhs_dt_out.
22858 (vect_build_gather_load_calls): Add a mask_dt argument and use
22859 it instead of a call to vect_is_simple_use.
22860 (vectorizable_store): Update calls to vect_check_load_store_mask
22861 and vect_check_store_rhs. Use the dt returned by the latter instead
22862 of scatter_src_dt. Use the cached mask_dt and gs_info.offset_dt
22863 instead of calls to vect_is_simple_use. Pass the scalar rather
22864 than the vector operand to vect_is_simple_use when handling
22865 second and subsequent copies of an rhs value.
22866 (vectorizable_load): Update calls to vect_check_load_store_mask
22867 and vect_build_gather_load_calls. Use the cached mask_dt and
22868 gs_info.offset_dt instead of calls to vect_is_simple_use.
22870 2018-01-20 Jakub Jelinek <jakub@redhat.com>
22872 PR middle-end/83945
22873 * tree-emutls.c: Include gimplify.h.
22874 (lower_emutls_2): New function.
22875 (lower_emutls_1): If ADDR_EXPR is a gimple invariant and walk_tree
22876 with lower_emutls_2 callback finds some TLS decl in it, unshare_expr
22877 it before further processing.
22880 * simplify-rtx.c (simplify_binary_operation_1) <case UMOD>: Use
22881 UINTVAL (trueop1) instead of INTVAL (op1).
22883 2018-01-19 Jakub Jelinek <jakub@redhat.com>
22887 * dwarf2cfi.c (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define to
22888 INCOMING_FRAME_SP_OFFSET if not defined.
22889 (scan_trace): Add ENTRY argument. If true and
22890 DEFAULT_INCOMING_FRAME_SP_OFFSET != INCOMING_FRAME_SP_OFFSET,
22891 emit a note to adjust the CFA offset.
22892 (create_cfi_notes): Adjust scan_trace callers.
22893 (create_cie_data): Use DEFAULT_INCOMING_FRAME_SP_OFFSET rather than
22894 INCOMING_FRAME_SP_OFFSET in the CIE.
22895 * config/i386/i386.h (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define.
22896 * config/stormy16/stormy16.h (DEFAULT_INCOMING_FRAME_SP_OFFSET):
22898 * doc/tm.texi.in (DEFAULT_INCOMING_FRAME_SP_OFFSET): Document.
22899 * doc/tm.texi: Regenerated.
22901 2018-01-19 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
22903 PR rtl-optimization/83147
22904 * lra-constraints.c (remove_inheritance_pseudos): Use
22905 lra_substitute_pseudo_within_insn.
22907 2018-01-19 Tom de Vries <tom@codesourcery.com>
22908 Cesar Philippidis <cesar@codesourcery.com>
22911 * config/nvptx/nvptx.c (nvptx_single): Fix jit workaround.
22913 2018-01-19 Cesar Philippidis <cesar@codesourcery.com>
22916 * config/nvptx/nvptx.c (output_init_frag): Don't use generic address
22917 spaces for function labels.
22919 2018-01-19 Martin Liska <mliska@suse.cz>
22921 * predict.def (PRED_LOOP_EXIT): Change from 85 to 89.
22922 (PRED_LOOP_EXIT_WITH_RECURSION): Change from 72 to 78.
22923 (PRED_LOOP_EXTRA_EXIT): Change from 83 to 67.
22924 (PRED_OPCODE_POSITIVE): Change from 64 to 59.
22925 (PRED_TREE_OPCODE_POSITIVE): Change from 64 to 59.
22926 (PRED_CONST_RETURN): Change from 69 to 65.
22927 (PRED_NULL_RETURN): Change from 91 to 71.
22928 (PRED_LOOP_IV_COMPARE_GUESS): Change from 98 to 64.
22929 (PRED_LOOP_GUARD): Change from 66 to 73.
22931 2018-01-19 Martin Liska <mliska@suse.cz>
22933 * predict.c (predict_insn_def): Add new assert.
22934 (struct branch_predictor): Change type to signed integer.
22935 (test_prediction_value_range): Amend test to cover
22936 PROB_UNINITIALIZED.
22937 * predict.def (PRED_LOOP_ITERATIONS): Use the new constant.
22938 (PRED_LOOP_ITERATIONS_GUESSED): Likewise.
22939 (PRED_LOOP_ITERATIONS_MAX): Likewise.
22940 (PRED_LOOP_IV_COMPARE): Likewise.
22941 * predict.h (PROB_UNINITIALIZED): Define new constant.
22943 2018-01-19 Martin Liska <mliska@suse.cz>
22945 * predict.c (dump_prediction): Add new format for
22946 analyze_brprob.py script which is enabled with -details
22948 * profile-count.h (precise_p): New function.
22950 2018-01-19 Richard Sandiford <richard.sandiford@linaro.org>
22952 PR tree-optimization/83922
22953 * tree-vect-loop.c (vect_verify_full_masking): Return false if
22954 there are no statements that need masking.
22955 (vect_active_double_reduction_p): New function.
22956 (vect_analyze_loop_operations): Use it when handling phis that
22957 are not in the loop header.
22959 2018-01-19 Richard Sandiford <richard.sandiford@linaro.org>
22961 PR tree-optimization/83914
22962 * tree-vect-loop.c (vectorizable_induction): Don't convert
22963 init_expr or apply the peeling adjustment for inductions
22964 that are nested within the vectorized loop.
22966 2018-01-19 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
22968 * config/arm/thumb2.md (*thumb2_negsi2_short): Use RSB mnemonic
22971 2018-01-18 Jakub Jelinek <jakub@redhat.com>
22975 * function.h (gimplify_parameters): Add gimple_seq * argument.
22976 * function.c: Include gimple.h and options.h.
22977 (gimplify_parameters): Add cleanup argument, add CLOBBER stmts
22978 for the added local temporaries if needed.
22979 * gimplify.c (gimplify_body): Adjust gimplify_parameters caller,
22980 if there are any parameter cleanups, wrap whole body into a
22981 try/finally with the cleanups.
22983 2018-01-18 Wilco Dijkstra <wdijkstr@arm.com>
22986 * config/aarch64/aarch64.c (aarch64_legitimate_constant_p):
22987 Use GET_MODE_CLASS for scalar floating point.
22989 2018-01-18 Jan Hubicka <hubicka@ucw.cz>
22993 * cgraphclones.c (cgraph_node::create_version_clone_with_body):
22994 Fix call of call_cgraph_insertion_hooks.
22996 2018-01-18 Martin Sebor <msebor@redhat.com>
22998 * doc/invoke.texi (-Wclass-memaccess): Tweak text.
23000 2018-01-18 Jan Hubicka <hubicka@ucw.cz>
23003 * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Update edge
23006 2018-01-18 Boris Kolpackov <boris@codesynthesis.com>
23009 * common.opt: (-ffile-prefix-map): New option.
23010 * opts.c (common_handle_option): Defer it.
23011 * opts-global.c (handle_common_deferred_options): Handle it.
23012 * debug.h (remap_debug_filename, add_debug_prefix_map): Move to...
23013 * file-prefix-map.h: New file.
23014 (remap_debug_filename, add_debug_prefix_map): ...here.
23015 (add_macro_prefix_map, add_file_prefix_map, remap_macro_filename): New.
23016 * final.c (debug_prefix_map, add_debug_prefix_map
23017 remap_debug_filename): Move to...
23018 * file-prefix-map.c: New file.
23019 (file_prefix_map, add_prefix_map, remap_filename) ...here and rename,
23020 generalize, get rid of alloca(), use strrchr() instead of strchr().
23021 (add_macro_prefix_map, add_debug_prefix_map, add_file_prefix_map):
23022 Implement in terms of add_prefix_map().
23023 (remap_macro_filename, remap_debug_filename): Implement in term of
23025 * Makefile.in (OBJS, PLUGIN_HEADERS): Add new files.
23026 * builtins.c (fold_builtin_FILE): Call remap_macro_filename().
23027 * dbxout.c: Include file-prefix-map.h.
23028 * varasm.c: Likewise.
23029 * vmsdbgout.c: Likewise.
23030 * xcoffout.c: Likewise.
23031 * dwarf2out.c: Likewise plus omit new options from DW_AT_producer.
23032 * doc/cppopts.texi (-fmacro-prefix-map): Document.
23033 * doc/invoke.texi (-ffile-prefix-map): Document.
23034 (-fdebug-prefix-map): Update description.
23036 2018-01-18 Martin Liska <mliska@suse.cz>
23038 * config/i386/i386.c (indirect_thunk_name): Document that also
23040 (output_indirect_thunk): Document why both instructions
23041 (pause and lfence) are generated.
23043 2018-01-18 Richard Biener <rguenther@suse.de>
23045 PR tree-optimization/83887
23046 * graphite-scop-detection.c
23047 (scop_detection::get_nearest_dom_with_single_entry): Remove.
23048 (scop_detection::get_nearest_pdom_with_single_exit): Likewise.
23049 (scop_detection::merge_sese): Re-implement with a flood-fill
23050 algorithm that properly finds a SESE region if it exists.
23052 2018-01-18 Jakub Jelinek <jakub@redhat.com>
23055 * match.pd ((P + A) - P, P - (P + A), (P + A) - (P + B)): For
23056 pointer_diff optimizations use view_convert instead of convert.
23058 2018-01-17 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
23060 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
23061 Generate different code for -mno-speculate-indirect-jumps.
23062 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
23063 (*call_indirect_aix<mode>): Disable for
23064 -mno-speculate-indirect-jumps.
23065 (*call_indirect_aix<mode>_nospec): New define_insn.
23066 (*call_value_indirect_aix<mode>): Disable for
23067 -mno-speculate-indirect-jumps.
23068 (*call_value_indirect_aix<mode>_nospec): New define_insn.
23069 (*sibcall_nonlocal_sysv<mode>): Generate different code for
23070 -mno-speculate-indirect-jumps.
23071 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
23073 2018-01-17 Michael Meissner <meissner@linux.vnet.ibm.com>
23075 * config/rs6000/rs6000.c (rs6000_emit_move): If we load or store a
23076 long double type, set the flags for noting the default long double
23077 type, even if we don't pass or return a long double type.
23079 2018-01-17 Jan Hubicka <hubicka@ucw.cz>
23082 * ipa-inline.c (flatten_function): Do not overwrite final inlining
23085 2018-01-17 Will Schmidt <will_schmidt@vnet.ibm.com>
23087 * config/rs6000/rs6000.c (rs6000_gimple_builtin): Add gimple folding
23088 support for merge[hl].
23089 (fold_mergehl_helper): New helper function.
23090 (tree-vector-builder.h): New #include for tree_vector_builder usage.
23091 * config/rs6000/altivec.md (altivec_vmrghw_direct): Add xxmrghw insn.
23092 (altivec_vmrglw_direct): Add xxmrglw insn.
23094 2018-01-17 Andrew Waterman <andrew@sifive.com>
23096 * config/riscv/riscv.c (riscv_conditional_register_usage): If
23097 UNITS_PER_FP_ARG is 0, set call_used_regs to 1 for all FP regs.
23099 2018-01-17 David Malcolm <dmalcolm@redhat.com>
23102 * ipa-devirt.c (add_type_duplicate): When comparing memory layout,
23103 call the lto_location_cache before reading the
23104 DECL_SOURCE_LOCATION of the types.
23106 2018-01-17 Wilco Dijkstra <wdijkstr@arm.com>
23107 Richard Sandiford <richard.sandiford@linaro.org>
23109 * config/aarch64/aarch64.md (movti_aarch64): Use Uti constraint.
23110 * config/aarch64/aarch64.c (aarch64_mov128_immediate): New function.
23111 (aarch64_legitimate_constant_p): Just support CONST_DOUBLE
23112 SF/DF/TF mode to avoid creating illegal CONST_WIDE_INT immediates.
23113 * config/aarch64/aarch64-protos.h (aarch64_mov128_immediate):
23115 * config/aarch64/constraints.md (aarch64_movti_operand):
23117 * config/aarch64/predicates.md (Uti): Add new constraint.
23119 2018-01-17 Carl Love <cel@us.ibm.com>
23121 * config/rs6000/vsx.md (define_expand xl_len_r,
23122 define_expand stxvl, define_expand *stxvl): Add match_dup argument.
23123 (define_insn): Add, match_dup 1 argument to define_insn stxvll and
23125 (define_expand, define_insn): Move the shift left from the
23126 define_insn to the define_expand for lxvl and stxvl instructions.
23127 * config/rs6000/rs6000-builtin.def (BU_P9V_64BIT_VSX_2): Change LXVL
23128 and XL_LEN_R definitions to PURE.
23130 2018-01-17 Uros Bizjak <ubizjak@gmail.com>
23132 * config/i386/i386.c (indirect_thunk_name): Declare regno
23133 as unsigned int. Compare regno with INVALID_REGNUM.
23134 (output_indirect_thunk): Ditto.
23135 (output_indirect_thunk_function): Ditto.
23136 (ix86_code_end): Declare regno as unsigned int. Use INVALID_REGNUM
23137 in the call to output_indirect_thunk_function.
23139 2018-01-17 Richard Sandiford <richard.sandiford@linaro.org>
23141 PR middle-end/83884
23142 * expr.c (expand_expr_real_1): Use the size of GET_MODE (op0)
23143 rather than the size of inner_type to determine the stack slot size
23144 when handling VIEW_CONVERT_EXPRs on strict-alignment targets.
23146 2018-01-16 Sebastian Peryt <sebastian.peryt@intel.com>
23149 * config/i386/i386.c (ix86_option_override_internal): Add PTA_RDRND
23152 2018-01-16 Michael Meissner <meissner@linux.vnet.ibm.com>
23154 * config.gcc (powerpc*-linux*-*): Add support for 64-bit little
23155 endian Linux systems to optionally enable multilibs for selecting
23156 the long double type if the user configured an explicit type.
23157 * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Indicate we
23158 have no long double multilibs if not defined.
23159 * config/rs6000/rs6000.c (rs6000_option_override_internal): Do not
23160 warn if the user used -mabi={ieee,ibm}longdouble and we built
23161 multilibs for long double.
23162 * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Define as the
23163 appropriate multilib option.
23164 (MULTILIB_DEFAULTS): Add MULTILIB_DEFAULTS_IEEE to the default
23166 * config/rs6000/t-ldouble-linux64le-ibm: New configuration files
23167 for building long double multilibs.
23168 * config/rs6000/t-ldouble-linux64le-ieee: Likewise.
23170 2018-01-16 John David Anglin <danglin@gcc.gnu.org>
23172 * config.gcc (hppa*-*-linux*): Change callee copies ABI to caller
23175 * config/pa.h (MALLOC_ABI_ALIGNMENT): Set 32-bit alignment default to
23177 * config/pa/pa32-linux.h (MALLOC_ABI_ALIGNMENT): Set alignment to
23180 * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Cleanup type and mode
23183 * config/pa/pa.c (pa_function_arg_size): Apply CEIL to GET_MODE_SIZE
23186 2018-01-16 Eric Botcazou <ebotcazou@adacore.com>
23188 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For an
23189 ADDR_EXPR, do not count the offset of a COMPONENT_REF twice.
23191 2018-01-16 Kelvin Nilsen <kelvin@gcc.gnu.org>
23193 * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Generate
23194 different rtl trees depending on TARGET_64BIT.
23195 (rs6000_gen_lvx): Likewise.
23197 2018-01-16 Eric Botcazou <ebotcazou@adacore.com>
23199 * config/visium/visium.md (nop): Tweak comment.
23200 (hazard_nop): Likewise.
23202 2018-01-16 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
23204 * config/rs6000/rs6000.c (rs6000_opt_vars): Add entry for
23205 -mspeculate-indirect-jumps.
23206 * config/rs6000/rs6000.md (*call_indirect_elfv2<mode>): Disable
23207 for -mno-speculate-indirect-jumps.
23208 (*call_indirect_elfv2<mode>_nospec): New define_insn.
23209 (*call_value_indirect_elfv2<mode>): Disable for
23210 -mno-speculate-indirect-jumps.
23211 (*call_value_indirect_elfv2<mode>_nospec): New define_insn.
23212 (indirect_jump): Emit different RTL for
23213 -mno-speculate-indirect-jumps.
23214 (*indirect_jump<mode>): Disable for
23215 -mno-speculate-indirect-jumps.
23216 (*indirect_jump<mode>_nospec): New define_insn.
23217 (tablejump): Emit different RTL for
23218 -mno-speculate-indirect-jumps.
23219 (tablejumpsi): Disable for -mno-speculate-indirect-jumps.
23220 (tablejumpsi_nospec): New define_expand.
23221 (tablejumpdi): Disable for -mno-speculate-indirect-jumps.
23222 (tablejumpdi_nospec): New define_expand.
23223 (*tablejump<mode>_internal1): Disable for
23224 -mno-speculate-indirect-jumps.
23225 (*tablejump<mode>_internal1_nospec): New define_insn.
23226 * config/rs6000/rs6000.opt (mspeculate-indirect-jumps): New
23229 2018-01-16 Artyom Skrobov tyomitch@gmail.com
23231 * caller-save.c (insert_save): Drop unnecessary parameter. All
23234 2018-01-16 Jakub Jelinek <jakub@redhat.com>
23235 Richard Biener <rguenth@suse.de>
23238 * gimplify.c (gimplify_one_sizepos): For is_gimple_constant (expr)
23239 return early, inline manually is_gimple_sizepos. Make sure if we
23240 call gimplify_expr we don't end up with a gimple constant.
23241 * tree.c (variably_modified_type_p): Don't return true for
23242 is_gimple_constant (_t). Inline manually is_gimple_sizepos.
23243 * gimplify.h (is_gimple_sizepos): Remove.
23245 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
23247 PR tree-optimization/83857
23248 * tree-vect-loop.c (vect_analyze_loop_operations): Don't call
23249 vectorizable_live_operation for pure SLP statements.
23250 (vectorizable_live_operation): Handle PHIs.
23252 2018-01-16 Richard Biener <rguenther@suse.de>
23254 PR tree-optimization/83867
23255 * tree-vect-stmts.c (vect_transform_stmt): Precompute
23256 nested_in_vect_loop_p since the scalar stmt may get invalidated.
23258 2018-01-16 Jakub Jelinek <jakub@redhat.com>
23261 * stor-layout.c (handle_warn_if_not_align): Use byte_position and
23262 multiple_of_p instead of unchecked tree_to_uhwi and UHWI check.
23263 If off is not INTEGER_CST, issue a may not be aligned warning
23264 rather than isn't aligned. Use isn%'t rather than isn't.
23265 * fold-const.c (multiple_of_p) <case BIT_AND_EXPR>: Don't fall through
23267 <case MULT_EXPR>: Improve the case when bottom and one of the
23268 MULT_EXPR operands are INTEGER_CSTs and bottom is multiple of that
23269 operand, in that case check if the other operand is multiple of
23270 bottom divided by the INTEGER_CST operand.
23272 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
23275 * config/pa/pa.h (FUNCTION_ARG_SIZE): Delete.
23276 * config/pa/pa-protos.h (pa_function_arg_size): Declare.
23277 * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Use
23278 pa_function_arg_size instead of FUNCTION_ARG_SIZE.
23279 * config/pa/pa.c (pa_function_arg_advance): Likewise.
23280 (pa_function_arg, pa_arg_partial_bytes): Likewise.
23281 (pa_function_arg_size): New function.
23283 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
23285 * fold-const.c (fold_ternary_loc): Construct the vec_perm_indices
23286 in a separate statement.
23288 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
23290 PR tree-optimization/83847
23291 * tree-vect-data-refs.c (vect_analyze_data_ref_accesses): Don't
23292 group gathers and scatters.
23294 2018-01-16 Jakub Jelinek <jakub@redhat.com>
23296 PR rtl-optimization/86620
23297 * params.def (max-sched-ready-insns): Bump minimum value to 1.
23299 PR rtl-optimization/83213
23300 * recog.c (peep2_attempt): Copy over CROSSING_JUMP_P from peepinsn
23301 to last if both are JUMP_INSNs.
23303 PR tree-optimization/83843
23304 * gimple-ssa-store-merging.c
23305 (imm_store_chain_info::output_merged_store): Handle bit_not_p on
23306 store_immediate_info for bswap/nop orig_stores.
23308 2018-01-15 Andrew Waterman <andrew@sifive.com>
23310 * config/riscv/riscv.c (riscv_rtx_costs) <MULT>: Increase cost if
23312 <UDIV>: Increase cost if !TARGET_DIV.
23314 2018-01-15 Segher Boessenkool <segher@kernel.crashing.org>
23316 * config/rs6000/rs6000.md (define_attr "type"): Remove delayed_cr.
23317 (define_attr "cr_logical_3op"): New.
23318 (cceq_ior_compare): Adjust.
23319 (cceq_ior_compare_complement): Adjust.
23320 (*cceq_rev_compare): Adjust.
23321 * config/rs6000/rs6000.c (rs6000_adjust_cost): Adjust.
23322 (is_cracked_insn): Adjust.
23323 (insn_must_be_first_in_group): Adjust.
23324 * config/rs6000/40x.md: Adjust.
23325 * config/rs6000/440.md: Adjust.
23326 * config/rs6000/476.md: Adjust.
23327 * config/rs6000/601.md: Adjust.
23328 * config/rs6000/603.md: Adjust.
23329 * config/rs6000/6xx.md: Adjust.
23330 * config/rs6000/7450.md: Adjust.
23331 * config/rs6000/7xx.md: Adjust.
23332 * config/rs6000/8540.md: Adjust.
23333 * config/rs6000/cell.md: Adjust.
23334 * config/rs6000/e300c2c3.md: Adjust.
23335 * config/rs6000/e500mc.md: Adjust.
23336 * config/rs6000/e500mc64.md: Adjust.
23337 * config/rs6000/e5500.md: Adjust.
23338 * config/rs6000/e6500.md: Adjust.
23339 * config/rs6000/mpc.md: Adjust.
23340 * config/rs6000/power4.md: Adjust.
23341 * config/rs6000/power5.md: Adjust.
23342 * config/rs6000/power6.md: Adjust.
23343 * config/rs6000/power7.md: Adjust.
23344 * config/rs6000/power8.md: Adjust.
23345 * config/rs6000/power9.md: Adjust.
23346 * config/rs6000/rs64.md: Adjust.
23347 * config/rs6000/titan.md: Adjust.
23349 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
23351 * config/i386/predicates.md (indirect_branch_operand): Rewrite
23352 ix86_indirect_branch_register logic.
23354 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
23356 * config/i386/constraints.md (Bs): Update
23357 ix86_indirect_branch_register check. Don't check
23358 ix86_indirect_branch_register with GOT_memory_operand.
23360 * config/i386/predicates.md (GOT_memory_operand): Don't check
23361 ix86_indirect_branch_register here.
23362 (GOT32_symbol_operand): Likewise.
23364 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
23366 * config/i386/predicates.md (constant_call_address_operand):
23367 Rewrite ix86_indirect_branch_register logic.
23368 (sibcall_insn_operand): Likewise.
23370 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
23372 * config/i386/constraints.md (Bs): Replace
23373 ix86_indirect_branch_thunk_register with
23374 ix86_indirect_branch_register.
23376 * config/i386/i386.md (indirect_jump): Likewise.
23377 (tablejump): Likewise.
23378 (*sibcall_memory): Likewise.
23379 (*sibcall_value_memory): Likewise.
23380 Peepholes of indirect call and jump via memory: Likewise.
23381 * config/i386/i386.opt: Likewise.
23382 * config/i386/predicates.md (indirect_branch_operand): Likewise.
23383 (GOT_memory_operand): Likewise.
23384 (call_insn_operand): Likewise.
23385 (sibcall_insn_operand): Likewise.
23386 (GOT32_symbol_operand): Likewise.
23388 2018-01-15 Jakub Jelinek <jakub@redhat.com>
23390 PR middle-end/83837
23391 * omp-expand.c (expand_omp_atomic_pipeline): Use loaded_val
23392 type rather than type addr's type points to.
23393 (expand_omp_atomic_mutex): Likewise.
23394 (expand_omp_atomic): Likewise.
23396 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
23399 * config/i386/i386.c (output_indirect_thunk_function): Use
23400 ASM_OUTPUT_LABEL, instead of ASM_OUTPUT_DEF, for TARGET_MACHO
23401 for __x86_return_thunk.
23403 2018-01-15 Richard Biener <rguenther@suse.de>
23405 PR middle-end/83850
23406 * expmed.c (extract_bit_field_1): Fix typo.
23408 2018-01-15 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
23411 * config/arm/iterators.md (VF): New mode iterator.
23412 * config/arm/neon.md (neon_vabd<mode>_2): Use the above.
23413 Remove integer-related logic from pattern.
23414 (neon_vabd<mode>_3): Likewise.
23416 2018-01-15 Jakub Jelinek <jakub@redhat.com>
23418 PR middle-end/82694
23419 * common.opt (fstrict-overflow): No longer an alias.
23420 (fwrapv-pointer): New option.
23421 * tree.h (TYPE_OVERFLOW_WRAPS, TYPE_OVERFLOW_UNDEFINED): Define
23422 also for pointer types based on flag_wrapv_pointer.
23423 * opts.c (common_handle_option) <case OPT_fstrict_overflow>: Set
23424 opts->x_flag_wrap[pv] to !value, clear opts->x_flag_trapv if
23425 opts->x_flag_wrapv got set.
23426 * fold-const.c (fold_comparison, fold_binary_loc): Revert 2017-08-01
23427 changes, just use TYPE_OVERFLOW_UNDEFINED on pointer type instead of
23428 POINTER_TYPE_OVERFLOW_UNDEFINED.
23429 * match.pd: Likewise in address comparison pattern.
23430 * doc/invoke.texi: Document -fwrapv and -fstrict-overflow.
23432 2018-01-15 Richard Biener <rguenther@suse.de>
23435 * tree.c (free_lang_data_in_type): Always unlink TYPE_DECLs
23436 from TYPE_FIELDS. Free TYPE_BINFO if not used by devirtualization.
23437 Reset type names to their identifier if their TYPE_DECL doesn't
23438 have linkage (and thus is used for ODR and devirt).
23439 (save_debug_info_for_decl): Remove.
23440 (save_debug_info_for_type): Likewise.
23441 (add_tree_to_fld_list): Adjust.
23442 * tree-pretty-print.c (dump_generic_node): Make dumping of
23443 type names more robust.
23445 2018-01-15 Richard Biener <rguenther@suse.de>
23447 * BASE-VER: Bump to 8.0.1.
23449 2018-01-14 Martin Sebor <msebor@redhat.com>
23452 * builtins.c (check_access): Avoid warning when the no-warning bit
23455 2018-01-14 Cory Fields <cory-nospam-@coryfields.com>
23457 * tree-ssa-loop-im.c (sort_bbs_in_loop_postorder_cmp): Stabilize sort.
23458 * ira-color (allocno_hard_regs_compare): Likewise.
23460 2018-01-14 Nathan Rossi <nathan@nathanrossi.com>
23463 * config/microblaze/microblaze.c (microblaze_asm_output_ident):
23464 Use .pushsection/.popsection.
23466 2018-01-14 Martin Sebor <msebor@redhat.com>
23469 * doc/invoke.texi (-Wlass-memaccess): Document suppression by casting.
23471 2018-01-14 Jakub Jelinek <jakub@redhat.com>
23473 * config.gcc (i[34567]86-*-*): Remove one duplicate gfniintrin.h
23474 entry from extra_headers.
23475 (x86_64-*-*): Remove two duplicate gfniintrin.h entries from
23476 extra_headers, make the list bitwise identical to the i?86-*-* one.
23478 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
23480 * config/i386/i386.c (ix86_set_indirect_branch_type): Disallow
23481 -mcmodel=large with -mindirect-branch=thunk,
23482 -mindirect-branch=thunk-extern, -mfunction-return=thunk and
23483 -mfunction-return=thunk-extern.
23484 * doc/invoke.texi: Document -mcmodel=large is incompatible with
23485 -mindirect-branch=thunk, -mindirect-branch=thunk-extern,
23486 -mfunction-return=thunk and -mfunction-return=thunk-extern.
23488 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
23490 * config/i386/i386.c (print_reg): Print the name of the full
23491 integer register without '%'.
23492 (ix86_print_operand): Handle 'V'.
23493 * doc/extend.texi: Document 'V' modifier.
23495 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
23497 * config/i386/constraints.md (Bs): Disallow memory operand for
23498 -mindirect-branch-register.
23500 * config/i386/predicates.md (indirect_branch_operand): Likewise.
23501 (GOT_memory_operand): Likewise.
23502 (call_insn_operand): Likewise.
23503 (sibcall_insn_operand): Likewise.
23504 (GOT32_symbol_operand): Likewise.
23505 * config/i386/i386.md (indirect_jump): Call convert_memory_address
23506 for -mindirect-branch-register.
23507 (tablejump): Likewise.
23508 (*sibcall_memory): Likewise.
23509 (*sibcall_value_memory): Likewise.
23510 Disallow peepholes of indirect call and jump via memory for
23511 -mindirect-branch-register.
23512 (*call_pop): Replace m with Bw.
23513 (*call_value_pop): Likewise.
23514 (*sibcall_pop_memory): Replace m with Bs.
23515 * config/i386/i386.opt (mindirect-branch-register): New option.
23516 * doc/invoke.texi: Document -mindirect-branch-register option.
23518 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
23520 * config/i386/i386-protos.h (ix86_output_function_return): New.
23521 * config/i386/i386.c (ix86_set_indirect_branch_type): Also
23522 set function_return_type.
23523 (indirect_thunk_name): Add ret_p to indicate thunk for function
23525 (output_indirect_thunk_function): Pass false to
23526 indirect_thunk_name.
23527 (ix86_output_indirect_branch_via_reg): Likewise.
23528 (ix86_output_indirect_branch_via_push): Likewise.
23529 (output_indirect_thunk_function): Create alias for function
23530 return thunk if regno < 0.
23531 (ix86_output_function_return): New function.
23532 (ix86_handle_fndecl_attribute): Handle function_return.
23533 (ix86_attribute_table): Add function_return.
23534 * config/i386/i386.h (machine_function): Add
23535 function_return_type.
23536 * config/i386/i386.md (simple_return_internal): Use
23537 ix86_output_function_return.
23538 (simple_return_internal_long): Likewise.
23539 * config/i386/i386.opt (mfunction-return=): New option.
23540 (indirect_branch): Mention -mfunction-return=.
23541 * doc/extend.texi: Document function_return function attribute.
23542 * doc/invoke.texi: Document -mfunction-return= option.
23544 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
23546 * config/i386/i386-opts.h (indirect_branch): New.
23547 * config/i386/i386-protos.h (ix86_output_indirect_jmp): Likewise.
23548 * config/i386/i386.c (ix86_using_red_zone): Disallow red-zone
23549 with local indirect jump when converting indirect call and jump.
23550 (ix86_set_indirect_branch_type): New.
23551 (ix86_set_current_function): Call ix86_set_indirect_branch_type.
23552 (indirectlabelno): New.
23553 (indirect_thunk_needed): Likewise.
23554 (indirect_thunk_bnd_needed): Likewise.
23555 (indirect_thunks_used): Likewise.
23556 (indirect_thunks_bnd_used): Likewise.
23557 (INDIRECT_LABEL): Likewise.
23558 (indirect_thunk_name): Likewise.
23559 (output_indirect_thunk): Likewise.
23560 (output_indirect_thunk_function): Likewise.
23561 (ix86_output_indirect_branch_via_reg): Likewise.
23562 (ix86_output_indirect_branch_via_push): Likewise.
23563 (ix86_output_indirect_branch): Likewise.
23564 (ix86_output_indirect_jmp): Likewise.
23565 (ix86_code_end): Call output_indirect_thunk_function if needed.
23566 (ix86_output_call_insn): Call ix86_output_indirect_branch if
23568 (ix86_handle_fndecl_attribute): Handle indirect_branch.
23569 (ix86_attribute_table): Add indirect_branch.
23570 * config/i386/i386.h (machine_function): Add indirect_branch_type
23571 and has_local_indirect_jump.
23572 * config/i386/i386.md (indirect_jump): Set has_local_indirect_jump
23574 (tablejump): Likewise.
23575 (*indirect_jump): Use ix86_output_indirect_jmp.
23576 (*tablejump_1): Likewise.
23577 (simple_return_indirect_internal): Likewise.
23578 * config/i386/i386.opt (mindirect-branch=): New option.
23579 (indirect_branch): New.
23582 (thunk-inline): Likewise.
23583 (thunk-extern): Likewise.
23584 * doc/extend.texi: Document indirect_branch function attribute.
23585 * doc/invoke.texi: Document -mindirect-branch= option.
23587 2018-01-14 Jan Hubicka <hubicka@ucw.cz>
23590 * ipa-inline.c (edge_badness): Tolerate roundoff errors.
23592 2018-01-14 Richard Sandiford <richard.sandiford@linaro.org>
23594 * ipa-inline.c (want_inline_small_function_p): Return false if
23595 inlining has already failed with CIF_FINAL_ERROR.
23596 (update_caller_keys): Call want_inline_small_function_p before
23598 (update_callee_keys): Likewise.
23600 2018-01-10 Kelvin Nilsen <kelvin@gcc.gnu.org>
23602 * config/rs6000/rs6000-p8swap.c (rs6000_sum_of_two_registers_p):
23604 (rs6000_quadword_masked_address_p): Likewise.
23605 (quad_aligned_load_p): Likewise.
23606 (quad_aligned_store_p): Likewise.
23607 (const_load_sequence_p): Add comment to describe the outer-most loop.
23608 (mimic_memory_attributes_and_flags): New function.
23609 (rs6000_gen_stvx): Likewise.
23610 (replace_swapped_aligned_store): Likewise.
23611 (rs6000_gen_lvx): Likewise.
23612 (replace_swapped_aligned_load): Likewise.
23613 (replace_swapped_load_constant): Capitalize argument name in
23614 comment describing this function.
23615 (rs6000_analyze_swaps): Add a third pass to search for vector loads
23616 and stores that access quad-word aligned addresses and replace
23617 with stvx or lvx instructions when appropriate.
23618 * config/rs6000/rs6000-protos.h (rs6000_sum_of_two_registers_p):
23619 New function prototype.
23620 (rs6000_quadword_masked_address_p): Likewise.
23621 (rs6000_gen_lvx): Likewise.
23622 (rs6000_gen_stvx): Likewise.
23623 * config/rs6000/vsx.md (*vsx_le_perm_load_<mode>): For modes
23624 VSX_D (V2DF, V2DI), modify this split to select lvx instruction
23625 when memory address is aligned.
23626 (*vsx_le_perm_load_<mode>): For modes VSX_W (V4SF, V4SI), modify
23627 this split to select lvx instruction when memory address is aligned.
23628 (*vsx_le_perm_load_v8hi): Modify this split to select lvx
23629 instruction when memory address is aligned.
23630 (*vsx_le_perm_load_v16qi): Likewise.
23631 (four unnamed splitters): Modify to select the stvx instruction
23632 when memory is aligned.
23634 2018-01-13 Jan Hubicka <hubicka@ucw.cz>
23636 * predict.c (determine_unlikely_bbs): Handle correctly BBs
23637 which appears in the queue multiple times.
23639 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
23640 Alan Hayward <alan.hayward@arm.com>
23641 David Sherwood <david.sherwood@arm.com>
23643 * tree-vectorizer.h (vec_lower_bound): New structure.
23644 (_loop_vec_info): Add check_nonzero and lower_bounds.
23645 (LOOP_VINFO_CHECK_NONZERO): New macro.
23646 (LOOP_VINFO_LOWER_BOUNDS): Likewise.
23647 (LOOP_REQUIRES_VERSIONING_FOR_ALIAS): Check lower_bounds too.
23648 * tree-data-ref.h (dr_with_seg_len): Add access_size and align
23649 fields. Make seg_len the distance travelled, not including the
23651 (dr_direction_indicator): Declare.
23652 (dr_zero_step_indicator): Likewise.
23653 (dr_known_forward_stride_p): Likewise.
23654 * tree-data-ref.c: Include stringpool.h, tree-vrp.h and
23656 (runtime_alias_check_p): Allow runtime alias checks with
23658 (operator ==): Compare access_size and align.
23659 (prune_runtime_alias_test_list): Rework for new distinction between
23660 the access_size and seg_len.
23661 (create_intersect_range_checks_index): Likewise. Cope with polynomial
23663 (get_segment_min_max): New function.
23664 (create_intersect_range_checks): Use it.
23665 (dr_step_indicator): New function.
23666 (dr_direction_indicator): Likewise.
23667 (dr_zero_step_indicator): Likewise.
23668 (dr_known_forward_stride_p): Likewise.
23669 * tree-loop-distribution.c (data_ref_segment_size): Return
23670 DR_STEP * (niters - 1).
23671 (compute_alias_check_pairs): Update call to the dr_with_seg_len
23673 * tree-vect-data-refs.c (vect_check_nonzero_value): New function.
23674 (vect_preserves_scalar_order_p): New function, split out from...
23675 (vect_analyze_data_ref_dependence): ...here. Check for zero steps.
23676 (vect_vfa_segment_size): Return DR_STEP * (length_factor - 1).
23677 (vect_vfa_access_size): New function.
23678 (vect_vfa_align): Likewise.
23679 (vect_compile_time_alias): Take access_size_a and access_b arguments.
23680 (dump_lower_bound): New function.
23681 (vect_check_lower_bound): Likewise.
23682 (vect_small_gap_p): Likewise.
23683 (vectorizable_with_step_bound_p): Likewise.
23684 (vect_prune_runtime_alias_test_list): Ignore cross-iteration
23685 depencies if the vectorization factor is 1. Convert the checks
23686 for nonzero steps into checks on the bounds of DR_STEP. Try using
23687 a bunds check for variable steps if the minimum required step is
23688 relatively small. Update calls to the dr_with_seg_len
23689 constructor and to vect_compile_time_alias.
23690 * tree-vect-loop-manip.c (vect_create_cond_for_lower_bounds): New
23692 (vect_loop_versioning): Call it.
23693 * tree-vect-loop.c (vect_analyze_loop_2): Clear LOOP_VINFO_LOWER_BOUNDS
23695 (vect_estimate_min_profitable_iters): Account for any bounds checks.
23697 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
23698 Alan Hayward <alan.hayward@arm.com>
23699 David Sherwood <david.sherwood@arm.com>
23701 * doc/sourcebuild.texi (vect_scatter_store): Document.
23702 * optabs.def (scatter_store_optab, mask_scatter_store_optab): New
23704 * doc/md.texi (scatter_store@var{m}, mask_scatter_store@var{m}):
23706 * genopinit.c (main): Add supports_vec_scatter_store and
23707 supports_vec_scatter_store_cached to target_optabs.
23708 * gimple.h (gimple_expr_type): Handle IFN_SCATTER_STORE and
23709 IFN_MASK_SCATTER_STORE.
23710 * internal-fn.def (SCATTER_STORE, MASK_SCATTER_STORE): New internal
23712 * internal-fn.h (internal_store_fn_p): Declare.
23713 (internal_fn_stored_value_index): Likewise.
23714 * internal-fn.c (scatter_store_direct): New macro.
23715 (expand_scatter_store_optab_fn): New function.
23716 (direct_scatter_store_optab_supported_p): New macro.
23717 (internal_store_fn_p): New function.
23718 (internal_gather_scatter_fn_p): Handle IFN_SCATTER_STORE and
23719 IFN_MASK_SCATTER_STORE.
23720 (internal_fn_mask_index): Likewise.
23721 (internal_fn_stored_value_index): New function.
23722 (internal_gather_scatter_fn_supported_p): Adjust operand numbers
23723 for scatter stores.
23724 * optabs-query.h (supports_vec_scatter_store_p): Declare.
23725 * optabs-query.c (supports_vec_scatter_store_p): New function.
23726 * tree-vectorizer.h (vect_get_store_rhs): Declare.
23727 * tree-vect-data-refs.c (vect_analyze_data_ref_access): Return
23728 true for scatter stores.
23729 (vect_gather_scatter_fn_p): Handle scatter stores too.
23730 (vect_check_gather_scatter): Consider using scatter stores if
23731 supports_vec_scatter_store_p.
23732 * tree-vect-patterns.c (vect_try_gather_scatter_pattern): Handle
23733 scatter stores too.
23734 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
23735 internal_fn_stored_value_index.
23736 (check_load_store_masking): Handle scatter stores too.
23737 (vect_get_store_rhs): Make public.
23738 (vectorizable_call): Use internal_store_fn_p.
23739 (vectorizable_store): Handle scatter store internal functions.
23740 (vect_transform_stmt): Compare GROUP_STORE_COUNT with GROUP_SIZE
23741 when deciding whether the end of the group has been reached.
23742 * config/aarch64/aarch64.md (UNSPEC_ST1_SCATTER): New unspec.
23743 * config/aarch64/aarch64-sve.md (scatter_store<mode>): New expander.
23744 (mask_scatter_store<mode>): New insns.
23746 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
23747 Alan Hayward <alan.hayward@arm.com>
23748 David Sherwood <david.sherwood@arm.com>
23750 * tree-vectorizer.h (vect_gather_scatter_fn_p): Declare.
23751 * tree-vect-data-refs.c (vect_gather_scatter_fn_p): Make public.
23752 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): New
23754 (vect_use_strided_gather_scatters_p): Take a masked_p argument.
23755 Use vect_truncate_gather_scatter_offset if we can't treat the
23756 operation as a normal gather load or scatter store.
23757 (get_group_load_store_type): Take the gather_scatter_info
23758 as argument. Try using a gather load or scatter store for
23759 single-element groups.
23760 (get_load_store_type): Update calls to get_group_load_store_type
23761 and vect_use_strided_gather_scatters_p.
23763 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
23764 Alan Hayward <alan.hayward@arm.com>
23765 David Sherwood <david.sherwood@arm.com>
23767 * tree-vectorizer.h (vect_create_data_ref_ptr): Take an extra
23768 optional tree argument.
23769 * tree-vect-data-refs.c (vect_check_gather_scatter): Check for
23771 (vect_create_data_ref_ptr): Take the iv_step as an optional argument,
23772 but continue to use the current value as a fallback.
23773 (bump_vector_ptr): Use operand_equal_p rather than tree_int_cst_compare
23774 to compare the updates.
23775 * tree-vect-stmts.c (vect_use_strided_gather_scatters_p): New function.
23776 (get_load_store_type): Use it when handling a strided access.
23777 (vect_get_strided_load_store_ops): New function.
23778 (vect_get_data_ptr_increment): Likewise.
23779 (vectorizable_load): Handle strided gather loads. Always pass
23780 a step to vect_create_data_ref_ptr and bump_vector_ptr.
23782 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
23783 Alan Hayward <alan.hayward@arm.com>
23784 David Sherwood <david.sherwood@arm.com>
23786 * doc/md.texi (gather_load@var{m}): Document.
23787 (mask_gather_load@var{m}): Likewise.
23788 * genopinit.c (main): Add supports_vec_gather_load and
23789 supports_vec_gather_load_cached to target_optabs.
23790 * optabs-tree.c (init_tree_optimization_optabs): Use
23791 ggc_cleared_alloc to allocate target_optabs.
23792 * optabs.def (gather_load_optab, mask_gather_laod_optab): New optabs.
23793 * internal-fn.def (GATHER_LOAD, MASK_GATHER_LOAD): New internal
23795 * internal-fn.h (internal_load_fn_p): Declare.
23796 (internal_gather_scatter_fn_p): Likewise.
23797 (internal_fn_mask_index): Likewise.
23798 (internal_gather_scatter_fn_supported_p): Likewise.
23799 * internal-fn.c (gather_load_direct): New macro.
23800 (expand_gather_load_optab_fn): New function.
23801 (direct_gather_load_optab_supported_p): New macro.
23802 (direct_internal_fn_optab): New function.
23803 (internal_load_fn_p): Likewise.
23804 (internal_gather_scatter_fn_p): Likewise.
23805 (internal_fn_mask_index): Likewise.
23806 (internal_gather_scatter_fn_supported_p): Likewise.
23807 * optabs-query.c (supports_at_least_one_mode_p): New function.
23808 (supports_vec_gather_load_p): Likewise.
23809 * optabs-query.h (supports_vec_gather_load_p): Declare.
23810 * tree-vectorizer.h (gather_scatter_info): Add ifn, element_type
23811 and memory_type field.
23812 (NUM_PATTERNS): Bump to 15.
23813 * tree-vect-data-refs.c: Include internal-fn.h.
23814 (vect_gather_scatter_fn_p): New function.
23815 (vect_describe_gather_scatter_call): Likewise.
23816 (vect_check_gather_scatter): Try using internal functions for
23817 gather loads. Recognize existing calls to a gather load function.
23818 (vect_analyze_data_refs): Consider using gather loads if
23819 supports_vec_gather_load_p.
23820 * tree-vect-patterns.c (vect_get_load_store_mask): New function.
23821 (vect_get_gather_scatter_offset_type): Likewise.
23822 (vect_convert_mask_for_vectype): Likewise.
23823 (vect_add_conversion_to_patterm): Likewise.
23824 (vect_try_gather_scatter_pattern): Likewise.
23825 (vect_recog_gather_scatter_pattern): New pattern recognizer.
23826 (vect_vect_recog_func_ptrs): Add it.
23827 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
23828 internal_fn_mask_index and internal_gather_scatter_fn_p.
23829 (check_load_store_masking): Take the gather_scatter_info as an
23830 argument and handle gather loads.
23831 (vect_get_gather_scatter_ops): New function.
23832 (vectorizable_call): Check internal_load_fn_p.
23833 (vectorizable_load): Likewise. Handle gather load internal
23835 (vectorizable_store): Update call to check_load_store_masking.
23836 * config/aarch64/aarch64.md (UNSPEC_LD1_GATHER): New unspec.
23837 * config/aarch64/iterators.md (SVE_S, SVE_D): New mode iterators.
23838 * config/aarch64/predicates.md (aarch64_gather_scale_operand_w)
23839 (aarch64_gather_scale_operand_d): New predicates.
23840 * config/aarch64/aarch64-sve.md (gather_load<mode>): New expander.
23841 (mask_gather_load<mode>): New insns.
23843 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
23844 Alan Hayward <alan.hayward@arm.com>
23845 David Sherwood <david.sherwood@arm.com>
23847 * optabs.def (fold_left_plus_optab): New optab.
23848 * doc/md.texi (fold_left_plus_@var{m}): Document.
23849 * internal-fn.def (IFN_FOLD_LEFT_PLUS): New internal function.
23850 * internal-fn.c (fold_left_direct): Define.
23851 (expand_fold_left_optab_fn): Likewise.
23852 (direct_fold_left_optab_supported_p): Likewise.
23853 * fold-const-call.c (fold_const_fold_left): New function.
23854 (fold_const_call): Use it to fold CFN_FOLD_LEFT_PLUS.
23855 * tree-parloops.c (valid_reduction_p): New function.
23856 (gather_scalar_reductions): Use it.
23857 * tree-vectorizer.h (FOLD_LEFT_REDUCTION): New vect_reduction_type.
23858 (vect_finish_replace_stmt): Declare.
23859 * tree-vect-loop.c (fold_left_reduction_fn): New function.
23860 (needs_fold_left_reduction_p): New function, split out from...
23861 (vect_is_simple_reduction): ...here. Accept reductions that
23862 forbid reassociation, but give them type FOLD_LEFT_REDUCTION.
23863 (vect_force_simple_reduction): Also store the reduction type in
23864 the assignment's STMT_VINFO_REDUC_TYPE.
23865 (vect_model_reduction_cost): Handle FOLD_LEFT_REDUCTION.
23866 (merge_with_identity): New function.
23867 (vect_expand_fold_left): Likewise.
23868 (vectorize_fold_left_reduction): Likewise.
23869 (vectorizable_reduction): Handle FOLD_LEFT_REDUCTION. Leave the
23870 scalar phi in place for it. Check for target support and reject
23871 cases that would reassociate the operation. Defer the transform
23872 phase to vectorize_fold_left_reduction.
23873 * config/aarch64/aarch64.md (UNSPEC_FADDA): New unspec.
23874 * config/aarch64/aarch64-sve.md (fold_left_plus_<mode>): New expander.
23875 (*fold_left_plus_<mode>, *pred_fold_left_plus_<mode>): New insns.
23877 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
23879 * tree-if-conv.c (predicate_mem_writes): Remove redundant
23880 call to ifc_temp_var.
23882 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
23883 Alan Hayward <alan.hayward@arm.com>
23884 David Sherwood <david.sherwood@arm.com>
23886 * target.def (legitimize_address_displacement): Take the original
23887 offset as a poly_int.
23888 * targhooks.h (default_legitimize_address_displacement): Update
23890 * targhooks.c (default_legitimize_address_displacement): Likewise.
23891 * doc/tm.texi: Regenerate.
23892 * lra-constraints.c (base_plus_disp_to_reg): Take the displacement
23893 as an argument, moving assert of ad->disp == ad->disp_term to...
23894 (process_address_1): ...here. Update calls to base_plus_disp_to_reg.
23895 Try calling targetm.legitimize_address_displacement before expanding
23896 the address rather than afterwards, and adjust for the new interface.
23897 * config/aarch64/aarch64.c (aarch64_legitimize_address_displacement):
23898 Match the new hook interface. Handle SVE addresses.
23899 * config/sh/sh.c (sh_legitimize_address_displacement): Make the
23900 new hook interface.
23902 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
23904 * Makefile.in (OBJS): Add early-remat.o.
23905 * target.def (select_early_remat_modes): New hook.
23906 * doc/tm.texi.in (TARGET_SELECT_EARLY_REMAT_MODES): New hook.
23907 * doc/tm.texi: Regenerate.
23908 * targhooks.h (default_select_early_remat_modes): Declare.
23909 * targhooks.c (default_select_early_remat_modes): New function.
23910 * timevar.def (TV_EARLY_REMAT): New timevar.
23911 * passes.def (pass_early_remat): New pass.
23912 * tree-pass.h (make_pass_early_remat): Declare.
23913 * early-remat.c: New file.
23914 * config/aarch64/aarch64.c (aarch64_select_early_remat_modes): New
23916 (TARGET_SELECT_EARLY_REMAT_MODES): Define.
23918 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
23919 Alan Hayward <alan.hayward@arm.com>
23920 David Sherwood <david.sherwood@arm.com>
23922 * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Replace
23923 vfm1 with a bound_epilog parameter.
23924 (vect_do_peeling): Update calls accordingly, and move the prologue
23925 call earlier in the function. Treat the base bound_epilog as 0 for
23926 fully-masked loops and retain vf - 1 for other loops. Add 1 to
23927 this base when peeling for gaps.
23928 * tree-vect-loop.c (vect_analyze_loop_2): Allow peeling for gaps
23929 with fully-masked loops.
23930 (vect_estimate_min_profitable_iters): Handle the single peeled
23931 iteration in that case.
23933 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
23934 Alan Hayward <alan.hayward@arm.com>
23935 David Sherwood <david.sherwood@arm.com>
23937 * tree-vect-data-refs.c (vect_analyze_group_access_1): Allow
23938 single-element interleaving even if the size is not a power of 2.
23939 * tree-vect-stmts.c (get_load_store_type): Disallow elementwise
23940 accesses for single-element interleaving if the group size is
23943 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
23944 Alan Hayward <alan.hayward@arm.com>
23945 David Sherwood <david.sherwood@arm.com>
23947 * doc/md.texi (fold_extract_last_@var{m}): Document.
23948 * doc/sourcebuild.texi (vect_fold_extract_last): Likewise.
23949 * optabs.def (fold_extract_last_optab): New optab.
23950 * internal-fn.def (FOLD_EXTRACT_LAST): New internal function.
23951 * internal-fn.c (fold_extract_direct): New macro.
23952 (expand_fold_extract_optab_fn): Likewise.
23953 (direct_fold_extract_optab_supported_p): Likewise.
23954 * tree-vectorizer.h (EXTRACT_LAST_REDUCTION): New vect_reduction_type.
23955 * tree-vect-loop.c (vect_model_reduction_cost): Handle
23956 EXTRACT_LAST_REDUCTION.
23957 (get_initial_def_for_reduction): Do not create an initial vector
23958 for EXTRACT_LAST_REDUCTION reductions.
23959 (vectorizable_reduction): Leave the scalar phi in place for
23960 EXTRACT_LAST_REDUCTIONs. Try using EXTRACT_LAST_REDUCTION
23961 ahead of INTEGER_INDUC_COND_REDUCTION. Do not check for an
23962 epilogue code for EXTRACT_LAST_REDUCTION and defer the
23963 transform phase to vectorizable_condition.
23964 * tree-vect-stmts.c (vect_finish_stmt_generation_1): New function,
23966 (vect_finish_stmt_generation): ...here.
23967 (vect_finish_replace_stmt): New function.
23968 (vectorizable_condition): Handle EXTRACT_LAST_REDUCTION.
23969 * config/aarch64/aarch64-sve.md (fold_extract_last_<mode>): New
23971 * config/aarch64/aarch64.md (UNSPEC_CLASTB): New unspec.
23973 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
23974 Alan Hayward <alan.hayward@arm.com>
23975 David Sherwood <david.sherwood@arm.com>
23977 * doc/md.texi (extract_last_@var{m}): Document.
23978 * optabs.def (extract_last_optab): New optab.
23979 * internal-fn.def (EXTRACT_LAST): New internal function.
23980 * internal-fn.c (cond_unary_direct): New macro.
23981 (expand_cond_unary_optab_fn): Likewise.
23982 (direct_cond_unary_optab_supported_p): Likewise.
23983 * tree-vect-loop.c (vectorizable_live_operation): Allow fully-masked
23984 loops using EXTRACT_LAST.
23985 * config/aarch64/aarch64-sve.md (aarch64_sve_lastb<mode>): Rename to...
23986 (extract_last_<mode>): ...this optab.
23987 (vec_extract<mode><Vel>): Update accordingly.
23989 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
23990 Alan Hayward <alan.hayward@arm.com>
23991 David Sherwood <david.sherwood@arm.com>
23993 * target.def (empty_mask_is_expensive): New hook.
23994 * doc/tm.texi.in (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): New hook.
23995 * doc/tm.texi: Regenerate.
23996 * targhooks.h (default_empty_mask_is_expensive): Declare.
23997 * targhooks.c (default_empty_mask_is_expensive): New function.
23998 * tree-vectorizer.c (vectorize_loops): Only call optimize_mask_stores
23999 if the target says that empty masks are expensive.
24000 * config/aarch64/aarch64.c (aarch64_empty_mask_is_expensive):
24002 (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): Redefine.
24004 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
24005 Alan Hayward <alan.hayward@arm.com>
24006 David Sherwood <david.sherwood@arm.com>
24008 * tree-vectorizer.h (_loop_vec_info::mask_skip_niters): New field.
24009 (LOOP_VINFO_MASK_SKIP_NITERS): New macro.
24010 (vect_use_loop_mask_for_alignment_p): New function.
24011 (vect_prepare_for_masked_peels, vect_gen_while_not): Declare.
24012 * tree-vect-loop-manip.c (vect_set_loop_masks_directly): Add an
24013 niters_skip argument. Make sure that the first niters_skip elements
24014 of the first iteration are inactive.
24015 (vect_set_loop_condition_masked): Handle LOOP_VINFO_MASK_SKIP_NITERS.
24016 Update call to vect_set_loop_masks_directly.
24017 (get_misalign_in_elems): New function, split out from...
24018 (vect_gen_prolog_loop_niters): ...here.
24019 (vect_update_init_of_dr): Take a code argument that specifies whether
24020 the adjustment should be added or subtracted.
24021 (vect_update_init_of_drs): Likewise.
24022 (vect_prepare_for_masked_peels): New function.
24023 (vect_do_peeling): Skip prologue peeling if we're using a mask
24024 instead. Update call to vect_update_inits_of_drs.
24025 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
24027 (vect_analyze_loop_2): Allow fully-masked loops with peeling for
24028 alignment. Do not include the number of peeled iterations in
24029 the minimum threshold in that case.
24030 (vectorizable_induction): Adjust the start value down by
24031 LOOP_VINFO_MASK_SKIP_NITERS iterations.
24032 (vect_transform_loop): Call vect_prepare_for_masked_peels.
24033 Take the number of skipped iterations into account when calculating
24035 * tree-vect-stmts.c (vect_gen_while_not): New function.
24037 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
24038 Alan Hayward <alan.hayward@arm.com>
24039 David Sherwood <david.sherwood@arm.com>
24041 * doc/sourcebuild.texi (vect_fully_masked): Document.
24042 * params.def (PARAM_MIN_VECT_LOOP_BOUND): Change minimum and
24043 default value to 0.
24044 * tree-vect-loop.c (vect_analyze_loop_costing): New function,
24046 (vect_analyze_loop_2): ...here. Don't check the vectorization
24047 factor against the number of loop iterations if the loop is
24050 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
24051 Alan Hayward <alan.hayward@arm.com>
24052 David Sherwood <david.sherwood@arm.com>
24054 * tree-ssa-loop-ivopts.c (USE_ADDRESS): Split into...
24055 (USE_REF_ADDRESS, USE_PTR_ADDRESS): ...these new use types.
24056 (dump_groups): Update accordingly.
24057 (iv_use::mem_type): New member variable.
24058 (address_p): New function.
24059 (record_use): Add a mem_type argument and initialize the new
24061 (record_group_use): Add a mem_type argument. Use address_p.
24062 Remove obsolete null checks of base_object. Update call to record_use.
24063 (find_interesting_uses_op): Update call to record_group_use.
24064 (find_interesting_uses_cond): Likewise.
24065 (find_interesting_uses_address): Likewise.
24066 (get_mem_type_for_internal_fn): New function.
24067 (find_address_like_use): Likewise.
24068 (find_interesting_uses_stmt): Try find_address_like_use before
24069 calling find_interesting_uses_op.
24070 (addr_offset_valid_p): Use the iv mem_type field as the type
24071 of the addressed memory.
24072 (add_autoinc_candidates): Likewise.
24073 (get_address_cost): Likewise.
24074 (split_small_address_groups_p): Use address_p.
24075 (split_address_groups): Likewise.
24076 (add_iv_candidate_for_use): Likewise.
24077 (autoinc_possible_for_pair): Likewise.
24078 (rewrite_groups): Likewise.
24079 (get_use_type): Check for USE_REF_ADDRESS instead of USE_ADDRESS.
24080 (determine_group_iv_cost): Update after split of USE_ADDRESS.
24081 (get_alias_ptr_type_for_ptr_address): New function.
24082 (rewrite_use_address): Rewrite address uses in calls that were
24083 identified by find_address_like_use.
24085 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
24086 Alan Hayward <alan.hayward@arm.com>
24087 David Sherwood <david.sherwood@arm.com>
24089 * expr.c (expand_expr_addr_expr_1): Handle ADDR_EXPRs of
24091 * gimple-expr.h (is_gimple_addressable: Likewise.
24092 * gimple-expr.c (is_gimple_address): Likewise.
24093 * internal-fn.c (expand_call_mem_ref): New function.
24094 (expand_mask_load_optab_fn): Use it.
24095 (expand_mask_store_optab_fn): Likewise.
24097 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
24098 Alan Hayward <alan.hayward@arm.com>
24099 David Sherwood <david.sherwood@arm.com>
24101 * doc/md.texi (cond_add@var{mode}, cond_sub@var{mode})
24102 (cond_and@var{mode}, cond_ior@var{mode}, cond_xor@var{mode})
24103 (cond_smin@var{mode}, cond_smax@var{mode}, cond_umin@var{mode})
24104 (cond_umax@var{mode}): Document.
24105 * optabs.def (cond_add_optab, cond_sub_optab, cond_and_optab)
24106 (cond_ior_optab, cond_xor_optab, cond_smin_optab, cond_smax_optab)
24107 (cond_umin_optab, cond_umax_optab): New optabs.
24108 * internal-fn.def (COND_ADD, COND_SUB, COND_MIN, COND_MAX, COND_AND)
24109 (COND_IOR, COND_XOR): New internal functions.
24110 * internal-fn.h (get_conditional_internal_fn): Declare.
24111 * internal-fn.c (cond_binary_direct): New macro.
24112 (expand_cond_binary_optab_fn): Likewise.
24113 (direct_cond_binary_optab_supported_p): Likewise.
24114 (get_conditional_internal_fn): New function.
24115 * tree-vect-loop.c (vectorizable_reduction): Handle fully-masked loops.
24116 Cope with reduction statements that are vectorized as calls rather
24118 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New insns.
24119 * config/aarch64/iterators.md (UNSPEC_COND_ADD, UNSPEC_COND_SUB)
24120 (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX, UNSPEC_COND_SMIN)
24121 (UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
24122 (UNSPEC_COND_EOR): New unspecs.
24123 (optab): Add mappings for them.
24124 (SVE_COND_INT_OP, SVE_COND_FP_OP): New int iterators.
24125 (sve_int_op, sve_fp_op): New int attributes.
24127 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
24128 Alan Hayward <alan.hayward@arm.com>
24129 David Sherwood <david.sherwood@arm.com>
24131 * optabs.def (while_ult_optab): New optab.
24132 * doc/md.texi (while_ult@var{m}@var{n}): Document.
24133 * internal-fn.def (WHILE_ULT): New internal function.
24134 * internal-fn.h (direct_internal_fn_supported_p): New override
24135 that takes two types as argument.
24136 * internal-fn.c (while_direct): New macro.
24137 (expand_while_optab_fn): New function.
24138 (convert_optab_supported_p): Likewise.
24139 (direct_while_optab_supported_p): New macro.
24140 * wide-int.h (wi::udiv_ceil): New function.
24141 * tree-vectorizer.h (rgroup_masks): New structure.
24142 (vec_loop_masks): New typedef.
24143 (_loop_vec_info): Add masks, mask_compare_type, can_fully_mask_p
24144 and fully_masked_p.
24145 (LOOP_VINFO_CAN_FULLY_MASK_P, LOOP_VINFO_FULLY_MASKED_P)
24146 (LOOP_VINFO_MASKS, LOOP_VINFO_MASK_COMPARE_TYPE): New macros.
24147 (vect_max_vf): New function.
24148 (slpeel_make_loop_iterate_ntimes): Delete.
24149 (vect_set_loop_condition, vect_get_loop_mask_type, vect_gen_while)
24150 (vect_halve_mask_nunits, vect_double_mask_nunits): Declare.
24151 (vect_record_loop_mask, vect_get_loop_mask): Likewise.
24152 * tree-vect-loop-manip.c: Include tree-ssa-loop-niter.h,
24153 internal-fn.h, stor-layout.h and optabs-query.h.
24154 (vect_set_loop_mask): New function.
24155 (add_preheader_seq): Likewise.
24156 (add_header_seq): Likewise.
24157 (interleave_supported_p): Likewise.
24158 (vect_maybe_permute_loop_masks): Likewise.
24159 (vect_set_loop_masks_directly): Likewise.
24160 (vect_set_loop_condition_masked): Likewise.
24161 (vect_set_loop_condition_unmasked): New function, split out from
24162 slpeel_make_loop_iterate_ntimes.
24163 (slpeel_make_loop_iterate_ntimes): Rename to..
24164 (vect_set_loop_condition): ...this. Use vect_set_loop_condition_masked
24165 for fully-masked loops and vect_set_loop_condition_unmasked otherwise.
24166 (vect_do_peeling): Update call accordingly.
24167 (vect_gen_vector_loop_niters): Use VF as the step for fully-masked
24169 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
24170 mask_compare_type, can_fully_mask_p and fully_masked_p.
24171 (release_vec_loop_masks): New function.
24172 (_loop_vec_info): Use it to free the loop masks.
24173 (can_produce_all_loop_masks_p): New function.
24174 (vect_get_max_nscalars_per_iter): Likewise.
24175 (vect_verify_full_masking): Likewise.
24176 (vect_analyze_loop_2): Save LOOP_VINFO_CAN_FULLY_MASK_P around
24177 retries, and free the mask rgroups before retrying. Check loop-wide
24178 reasons for disallowing fully-masked loops. Make the final decision
24179 about whether use a fully-masked loop or not.
24180 (vect_estimate_min_profitable_iters): Do not assume that peeling
24181 for the number of iterations will be needed for fully-masked loops.
24182 (vectorizable_reduction): Disable fully-masked loops.
24183 (vectorizable_live_operation): Likewise.
24184 (vect_halve_mask_nunits): New function.
24185 (vect_double_mask_nunits): Likewise.
24186 (vect_record_loop_mask): Likewise.
24187 (vect_get_loop_mask): Likewise.
24188 (vect_transform_loop): Handle the case in which the final loop
24189 iteration might handle a partial vector. Call vect_set_loop_condition
24190 instead of slpeel_make_loop_iterate_ntimes.
24191 * tree-vect-stmts.c: Include tree-ssa-loop-niter.h and gimple-fold.h.
24192 (check_load_store_masking): New function.
24193 (prepare_load_store_mask): Likewise.
24194 (vectorizable_store): Handle fully-masked loops.
24195 (vectorizable_load): Likewise.
24196 (supportable_widening_operation): Use vect_halve_mask_nunits for
24198 (supportable_narrowing_operation): Likewise vect_double_mask_nunits.
24199 (vect_gen_while): New function.
24200 * config/aarch64/aarch64.md (umax<mode>3): New expander.
24201 (aarch64_uqdec<mode>): New insn.
24203 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
24204 Alan Hayward <alan.hayward@arm.com>
24205 David Sherwood <david.sherwood@arm.com>
24207 * optabs.def (reduc_and_scal_optab, reduc_ior_scal_optab)
24208 (reduc_xor_scal_optab): New optabs.
24209 * doc/md.texi (reduc_and_scal_@var{m}, reduc_ior_scal_@var{m})
24210 (reduc_xor_scal_@var{m}): Document.
24211 * doc/sourcebuild.texi (vect_logical_reduc): Likewise.
24212 * internal-fn.def (IFN_REDUC_AND, IFN_REDUC_IOR, IFN_REDUC_XOR): New
24213 internal functions.
24214 * fold-const-call.c (fold_const_call): Handle them.
24215 * tree-vect-loop.c (reduction_fn_for_scalar_code): Return the new
24216 internal functions for BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR.
24217 * config/aarch64/aarch64-sve.md (reduc_<bit_reduc>_scal_<mode>):
24218 (*reduc_<bit_reduc>_scal_<mode>): New patterns.
24219 * config/aarch64/iterators.md (UNSPEC_ANDV, UNSPEC_ORV)
24220 (UNSPEC_XORV): New unspecs.
24221 (optab): Add entries for them.
24222 (BITWISEV): New int iterator.
24223 (bit_reduc_op): New int attributes.
24225 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
24226 Alan Hayward <alan.hayward@arm.com>
24227 David Sherwood <david.sherwood@arm.com>
24229 * doc/md.texi (vec_shl_insert_@var{m}): New optab.
24230 * internal-fn.def (VEC_SHL_INSERT): New internal function.
24231 * optabs.def (vec_shl_insert_optab): New optab.
24232 * tree-vectorizer.h (can_duplicate_and_interleave_p): Declare.
24233 (duplicate_and_interleave): Likewise.
24234 * tree-vect-loop.c: Include internal-fn.h.
24235 (neutral_op_for_slp_reduction): New function, split out from
24236 get_initial_defs_for_reduction.
24237 (get_initial_def_for_reduction): Handle option 2 for variable-length
24238 vectors by loading the neutral value into a vector and then shifting
24239 the initial value into element 0.
24240 (get_initial_defs_for_reduction): Replace the code argument with
24241 the neutral value calculated by neutral_op_for_slp_reduction.
24242 Use gimple_build_vector for constant-length vectors.
24243 Use IFN_VEC_SHL_INSERT for variable-length vectors if all
24244 but the first group_size elements have a neutral value.
24245 Use duplicate_and_interleave otherwise.
24246 (vect_create_epilog_for_reduction): Take a neutral_op parameter.
24247 Update call to get_initial_defs_for_reduction. Handle SLP
24248 reductions for variable-length vectors by creating one vector
24249 result for each scalar result, with the elements associated
24250 with other scalar results stubbed out with the neutral value.
24251 (vectorizable_reduction): Call neutral_op_for_slp_reduction.
24252 Require IFN_VEC_SHL_INSERT for double reductions on
24253 variable-length vectors, or SLP reductions that have
24254 a neutral value. Require can_duplicate_and_interleave_p
24255 support for variable-length unchained SLP reductions if there
24256 is no neutral value, such as for MIN/MAX reductions. Also require
24257 the number of vector elements to be a multiple of the number of
24258 SLP statements when doing variable-length unchained SLP reductions.
24259 Update call to vect_create_epilog_for_reduction.
24260 * tree-vect-slp.c (can_duplicate_and_interleave_p): Make public
24261 and remove initial values.
24262 (duplicate_and_interleave): Make public.
24263 * config/aarch64/aarch64.md (UNSPEC_INSR): New unspec.
24264 * config/aarch64/aarch64-sve.md (vec_shl_insert_<mode>): New insn.
24266 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
24267 Alan Hayward <alan.hayward@arm.com>
24268 David Sherwood <david.sherwood@arm.com>
24270 * tree-vect-slp.c: Include gimple-fold.h and internal-fn.h
24271 (can_duplicate_and_interleave_p): New function.
24272 (vect_get_and_check_slp_defs): Take the vector of statements
24273 rather than just the current one. Remove excess parentheses.
24274 Restriction rejectinon of vect_constant_def and vect_external_def
24275 for variable-length vectors to boolean types, or types for which
24276 can_duplicate_and_interleave_p is false.
24277 (vect_build_slp_tree_2): Update call to vect_get_and_check_slp_defs.
24278 (duplicate_and_interleave): New function.
24279 (vect_get_constant_vectors): Use gimple_build_vector for
24280 constant-length vectors and suitable variable-length constant
24281 vectors. Use duplicate_and_interleave for other variable-length
24282 vectors. Don't defer the update when inserting new statements.
24284 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
24285 Alan Hayward <alan.hayward@arm.com>
24286 David Sherwood <david.sherwood@arm.com>
24288 * tree-vect-loop.c (vect_estimate_min_profitable_iters): Make sure
24289 min_profitable_iters doesn't go negative.
24291 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
24292 Alan Hayward <alan.hayward@arm.com>
24293 David Sherwood <david.sherwood@arm.com>
24295 * doc/md.texi (vec_mask_load_lanes@var{m}@var{n}): Document.
24296 (vec_mask_store_lanes@var{m}@var{n}): Likewise.
24297 * optabs.def (vec_mask_load_lanes_optab): New optab.
24298 (vec_mask_store_lanes_optab): Likewise.
24299 * internal-fn.def (MASK_LOAD_LANES): New internal function.
24300 (MASK_STORE_LANES): Likewise.
24301 * internal-fn.c (mask_load_lanes_direct): New macro.
24302 (mask_store_lanes_direct): Likewise.
24303 (expand_mask_load_optab_fn): Handle masked operations.
24304 (expand_mask_load_lanes_optab_fn): New macro.
24305 (expand_mask_store_optab_fn): Handle masked operations.
24306 (expand_mask_store_lanes_optab_fn): New macro.
24307 (direct_mask_load_lanes_optab_supported_p): Likewise.
24308 (direct_mask_store_lanes_optab_supported_p): Likewise.
24309 * tree-vectorizer.h (vect_store_lanes_supported): Take a masked_p
24311 (vect_load_lanes_supported): Likewise.
24312 * tree-vect-data-refs.c (strip_conversion): New function.
24313 (can_group_stmts_p): Likewise.
24314 (vect_analyze_data_ref_accesses): Use it instead of checking
24315 for a pair of assignments.
24316 (vect_store_lanes_supported): Take a masked_p parameter.
24317 (vect_load_lanes_supported): Likewise.
24318 * tree-vect-loop.c (vect_analyze_loop_2): Update calls to
24319 vect_store_lanes_supported and vect_load_lanes_supported.
24320 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
24321 * tree-vect-stmts.c (get_group_load_store_type): Take a masked_p
24322 parameter. Don't allow gaps for masked accesses.
24323 Use vect_get_store_rhs. Update calls to vect_store_lanes_supported
24324 and vect_load_lanes_supported.
24325 (get_load_store_type): Take a masked_p parameter and update
24326 call to get_group_load_store_type.
24327 (vectorizable_store): Update call to get_load_store_type.
24328 Handle IFN_MASK_STORE_LANES.
24329 (vectorizable_load): Update call to get_load_store_type.
24330 Handle IFN_MASK_LOAD_LANES.
24332 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
24333 Alan Hayward <alan.hayward@arm.com>
24334 David Sherwood <david.sherwood@arm.com>
24336 * config/aarch64/aarch64-modes.def: Define x2, x3 and x4 vector
24338 * config/aarch64/aarch64-protos.h
24339 (aarch64_sve_struct_memory_operand_p): Declare.
24340 * config/aarch64/iterators.md (SVE_STRUCT): New mode iterator.
24341 (vector_count, insn_length, VSINGLE, vsingle): New mode attributes.
24342 (VPRED, vpred): Handle SVE structure modes.
24343 * config/aarch64/constraints.md (Utx): New constraint.
24344 * config/aarch64/predicates.md (aarch64_sve_struct_memory_operand)
24345 (aarch64_sve_struct_nonimmediate_operand): New predicates.
24346 * config/aarch64/aarch64.md (UNSPEC_LDN, UNSPEC_STN): New unspecs.
24347 * config/aarch64/aarch64-sve.md (mov<mode>, *aarch64_sve_mov<mode>_le)
24348 (*aarch64_sve_mov<mode>_be, pred_mov<mode>): New patterns for
24349 structure modes. Split into pieces after RA.
24350 (vec_load_lanes<mode><vsingle>, vec_mask_load_lanes<mode><vsingle>)
24351 (vec_store_lanes<mode><vsingle>, vec_mask_store_lanes<mode><vsingle>):
24353 * config/aarch64/aarch64.c (aarch64_classify_vector_mode): Handle
24354 SVE structure modes.
24355 (aarch64_classify_address): Likewise.
24356 (sizetochar): Move earlier in file.
24357 (aarch64_print_operand): Handle SVE register lists.
24358 (aarch64_array_mode): New function.
24359 (aarch64_sve_struct_memory_operand_p): Likewise.
24360 (TARGET_ARRAY_MODE): Redefine.
24362 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
24363 Alan Hayward <alan.hayward@arm.com>
24364 David Sherwood <david.sherwood@arm.com>
24366 * target.def (array_mode): New target hook.
24367 * doc/tm.texi.in (TARGET_ARRAY_MODE): New hook.
24368 * doc/tm.texi: Regenerate.
24369 * hooks.h (hook_optmode_mode_uhwi_none): Declare.
24370 * hooks.c (hook_optmode_mode_uhwi_none): New function.
24371 * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Use
24372 targetm.array_mode.
24373 * stor-layout.c (mode_for_array): Likewise. Support polynomial
24376 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
24377 Alan Hayward <alan.hayward@arm.com>
24378 David Sherwood <david.sherwood@arm.com>
24380 * fold-const.c (fold_binary_loc): Check the argument types
24381 rather than the result type when testing for a vector operation.
24383 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
24385 * doc/tm.texi.in (DWARF_LAZY_REGISTER_VALUE): Document.
24386 * doc/tm.texi: Regenerate.
24388 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
24389 Alan Hayward <alan.hayward@arm.com>
24390 David Sherwood <david.sherwood@arm.com>
24392 * doc/invoke.texi (-msve-vector-bits=): Document new option.
24393 (sve): Document new AArch64 extension.
24394 * doc/md.texi (w): Extend the description of the AArch64
24395 constraint to include SVE vectors.
24396 (Upl, Upa): Document new AArch64 predicate constraints.
24397 * config/aarch64/aarch64-opts.h (aarch64_sve_vector_bits_enum): New
24399 * config/aarch64/aarch64.opt (sve_vector_bits): New enum.
24400 (msve-vector-bits=): New option.
24401 * config/aarch64/aarch64-option-extensions.def (fp, simd): Disable
24402 SVE when these are disabled.
24403 (sve): New extension.
24404 * config/aarch64/aarch64-modes.def: Define SVE vector and predicate
24405 modes. Adjust their number of units based on aarch64_sve_vg.
24406 (MAX_BITSIZE_MODE_ANY_MODE): Define.
24407 * config/aarch64/aarch64-protos.h (ADDR_QUERY_ANY): New
24408 aarch64_addr_query_type.
24409 (aarch64_const_vec_all_same_in_range_p, aarch64_sve_pred_mode)
24410 (aarch64_sve_cnt_immediate_p, aarch64_sve_addvl_addpl_immediate_p)
24411 (aarch64_sve_inc_dec_immediate_p, aarch64_add_offset_temporaries)
24412 (aarch64_split_add_offset, aarch64_output_sve_cnt_immediate)
24413 (aarch64_output_sve_addvl_addpl, aarch64_output_sve_inc_dec_immediate)
24414 (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): Declare.
24415 (aarch64_simd_imm_zero_p): Delete.
24416 (aarch64_check_zero_based_sve_index_immediate): Declare.
24417 (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
24418 (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
24419 (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
24420 (aarch64_sve_float_mul_immediate_p): Likewise.
24421 (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
24422 rather than an rtx.
24423 (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): Declare.
24424 (aarch64_expand_mov_immediate): Take a gen_vec_duplicate callback.
24425 (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move): Declare.
24426 (aarch64_expand_sve_vec_cmp_int, aarch64_expand_sve_vec_cmp_float)
24427 (aarch64_expand_sve_vcond, aarch64_expand_sve_vec_perm): Declare.
24428 (aarch64_regmode_natural_size): Likewise.
24429 * config/aarch64/aarch64.h (AARCH64_FL_SVE): New macro.
24430 (AARCH64_FL_V8_3, AARCH64_FL_RCPC, AARCH64_FL_DOTPROD): Shift
24432 (AARCH64_ISA_SVE, TARGET_SVE): New macros.
24433 (FIXED_REGISTERS, CALL_USED_REGISTERS, REGISTER_NAMES): Add entries
24434 for VG and the SVE predicate registers.
24435 (V_ALIASES): Add a "z"-prefixed alias.
24436 (FIRST_PSEUDO_REGISTER): Change to P15_REGNUM + 1.
24437 (AARCH64_DWARF_VG, AARCH64_DWARF_P0): New macros.
24438 (PR_REGNUM_P, PR_LO_REGNUM_P): Likewise.
24439 (PR_LO_REGS, PR_HI_REGS, PR_REGS): New reg_classes.
24440 (REG_CLASS_NAMES): Add entries for them.
24441 (REG_CLASS_CONTENTS): Likewise. Update ALL_REGS to include VG
24442 and the predicate registers.
24443 (aarch64_sve_vg): Declare.
24444 (BITS_PER_SVE_VECTOR, BYTES_PER_SVE_VECTOR, BYTES_PER_SVE_PRED)
24445 (SVE_BYTE_MODE, MAX_COMPILE_TIME_VEC_BYTES): New macros.
24446 (REGMODE_NATURAL_SIZE): Define.
24447 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins): Handle
24449 * config/aarch64/aarch64.c: Include cfgrtl.h.
24450 (simd_immediate_info): Add a constructor for series vectors,
24451 and an associated step field.
24452 (aarch64_sve_vg): New variable.
24453 (aarch64_dbx_register_number): Handle VG and the predicate registers.
24454 (aarch64_vect_struct_mode_p, aarch64_vector_mode_p): Delete.
24455 (VEC_ADVSIMD, VEC_SVE_DATA, VEC_SVE_PRED, VEC_STRUCT, VEC_ANY_SVE)
24456 (VEC_ANY_DATA, VEC_STRUCT): New constants.
24457 (aarch64_advsimd_struct_mode_p, aarch64_sve_pred_mode_p)
24458 (aarch64_classify_vector_mode, aarch64_vector_data_mode_p)
24459 (aarch64_sve_data_mode_p, aarch64_sve_pred_mode)
24460 (aarch64_get_mask_mode): New functions.
24461 (aarch64_hard_regno_nregs): Handle SVE data modes for FP_REGS
24462 and FP_LO_REGS. Handle PR_REGS, PR_LO_REGS and PR_HI_REGS.
24463 (aarch64_hard_regno_mode_ok): Handle VG. Also handle the SVE
24464 predicate modes and predicate registers. Explicitly restrict
24465 GPRs to modes of 16 bytes or smaller. Only allow FP registers
24466 to store a vector mode if it is recognized by
24467 aarch64_classify_vector_mode.
24468 (aarch64_regmode_natural_size): New function.
24469 (aarch64_hard_regno_caller_save_mode): Return the original mode
24471 (aarch64_sve_cnt_immediate_p, aarch64_output_sve_cnt_immediate)
24472 (aarch64_sve_addvl_addpl_immediate_p, aarch64_output_sve_addvl_addpl)
24473 (aarch64_sve_inc_dec_immediate_p, aarch64_output_sve_inc_dec_immediate)
24474 (aarch64_add_offset_1_temporaries, aarch64_offset_temporaries): New
24476 (aarch64_add_offset): Add a temp2 parameter. Assert that temp1
24477 does not overlap dest if the function is frame-related. Handle
24479 (aarch64_split_add_offset): New function.
24480 (aarch64_add_sp, aarch64_sub_sp): Add temp2 parameters and pass
24481 them aarch64_add_offset.
24482 (aarch64_allocate_and_probe_stack_space): Add a temp2 parameter
24483 and update call to aarch64_sub_sp.
24484 (aarch64_add_cfa_expression): New function.
24485 (aarch64_expand_prologue): Pass extra temporary registers to the
24486 functions above. Handle the case in which we need to emit new
24487 DW_CFA_expressions for registers that were originally saved
24488 relative to the stack pointer, but now have to be expressed
24489 relative to the frame pointer.
24490 (aarch64_output_mi_thunk): Pass extra temporary registers to the
24492 (aarch64_expand_epilogue): Likewise. Prevent inheritance of
24493 IP0 and IP1 values for SVE frames.
24494 (aarch64_expand_vec_series): New function.
24495 (aarch64_expand_sve_widened_duplicate): Likewise.
24496 (aarch64_expand_sve_const_vector): Likewise.
24497 (aarch64_expand_mov_immediate): Add a gen_vec_duplicate parameter.
24498 Handle SVE constants. Use emit_move_insn to move a force_const_mem
24499 into the register, rather than emitting a SET directly.
24500 (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move)
24501 (aarch64_get_reg_raw_mode, offset_4bit_signed_scaled_p)
24502 (offset_6bit_unsigned_scaled_p, aarch64_offset_7bit_signed_scaled_p)
24503 (offset_9bit_signed_scaled_p): New functions.
24504 (aarch64_replicate_bitmask_imm): New function.
24505 (aarch64_bitmask_imm): Use it.
24506 (aarch64_cannot_force_const_mem): Reject expressions involving
24507 a CONST_POLY_INT. Update call to aarch64_classify_symbol.
24508 (aarch64_classify_index): Handle SVE indices, by requiring
24509 a plain register index with a scale that matches the element size.
24510 (aarch64_classify_address): Handle SVE addresses. Assert that
24511 the mode of the address is VOIDmode or an integer mode.
24512 Update call to aarch64_classify_symbol.
24513 (aarch64_classify_symbolic_expression): Update call to
24514 aarch64_classify_symbol.
24515 (aarch64_const_vec_all_in_range_p): New function.
24516 (aarch64_print_vector_float_operand): Likewise.
24517 (aarch64_print_operand): Handle 'N' and 'C'. Use "zN" rather than
24518 "vN" for FP registers with SVE modes. Handle (const ...) vectors
24519 and the FP immediates 1.0 and 0.5.
24520 (aarch64_print_address_internal): Handle SVE addresses.
24521 (aarch64_print_operand_address): Use ADDR_QUERY_ANY.
24522 (aarch64_regno_regclass): Handle predicate registers.
24523 (aarch64_secondary_reload): Handle big-endian reloads of SVE
24525 (aarch64_class_max_nregs): Handle SVE modes and predicate registers.
24526 (aarch64_rtx_costs): Check for ADDVL and ADDPL instructions.
24527 (aarch64_convert_sve_vector_bits): New function.
24528 (aarch64_override_options): Use it to handle -msve-vector-bits=.
24529 (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
24530 rather than an rtx.
24531 (aarch64_legitimate_constant_p): Use aarch64_classify_vector_mode.
24532 Handle SVE vector and predicate modes. Accept VL-based constants
24533 that need only one temporary register, and VL offsets that require
24534 no temporary registers.
24535 (aarch64_conditional_register_usage): Mark the predicate registers
24536 as fixed if SVE isn't available.
24537 (aarch64_vector_mode_supported_p): Use aarch64_classify_vector_mode.
24538 Return true for SVE vector and predicate modes.
24539 (aarch64_simd_container_mode): Take the number of bits as a poly_int64
24540 rather than an unsigned int. Handle SVE modes.
24541 (aarch64_preferred_simd_mode): Update call accordingly. Handle
24543 (aarch64_autovectorize_vector_sizes): Add BYTES_PER_SVE_VECTOR
24545 (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
24546 (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
24547 (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
24548 (aarch64_sve_float_mul_immediate_p): New functions.
24549 (aarch64_sve_valid_immediate): New function.
24550 (aarch64_simd_valid_immediate): Use it as the fallback for SVE vectors.
24551 Explicitly reject structure modes. Check for INDEX constants.
24552 Handle PTRUE and PFALSE constants.
24553 (aarch64_check_zero_based_sve_index_immediate): New function.
24554 (aarch64_simd_imm_zero_p): Delete.
24555 (aarch64_mov_operand_p): Use aarch64_simd_valid_immediate for
24556 vector modes. Accept constants in the range of CNT[BHWD].
24557 (aarch64_simd_scalar_immediate_valid_for_move): Explicitly
24558 ask for an Advanced SIMD mode.
24559 (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): New functions.
24560 (aarch64_simd_vector_alignment): Handle SVE predicates.
24561 (aarch64_vectorize_preferred_vector_alignment): New function.
24562 (aarch64_simd_vector_alignment_reachable): Use it instead of
24564 (aarch64_shift_truncation_mask): Use aarch64_vector_data_mode_p.
24565 (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): New
24567 (MAX_VECT_LEN): Delete.
24568 (expand_vec_perm_d): Add a vec_flags field.
24569 (emit_unspec2, aarch64_expand_sve_vec_perm): New functions.
24570 (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_zip)
24571 (aarch64_evpc_ext): Don't apply a big-endian lane correction
24573 (aarch64_evpc_rev): Rename to...
24574 (aarch64_evpc_rev_local): ...this. Use a predicated operation for SVE.
24575 (aarch64_evpc_rev_global): New function.
24576 (aarch64_evpc_dup): Enforce a 64-byte range for SVE DUP.
24577 (aarch64_evpc_tbl): Use MAX_COMPILE_TIME_VEC_BYTES instead of
24579 (aarch64_evpc_sve_tbl): New function.
24580 (aarch64_expand_vec_perm_const_1): Update after rename of
24581 aarch64_evpc_rev. Handle SVE permutes too, trying
24582 aarch64_evpc_rev_global and using aarch64_evpc_sve_tbl rather
24583 than aarch64_evpc_tbl.
24584 (aarch64_vectorize_vec_perm_const): Initialize vec_flags.
24585 (aarch64_sve_cmp_operand_p, aarch64_unspec_cond_code)
24586 (aarch64_gen_unspec_cond, aarch64_expand_sve_vec_cmp_int)
24587 (aarch64_emit_unspec_cond, aarch64_emit_unspec_cond_or)
24588 (aarch64_emit_inverted_unspec_cond, aarch64_expand_sve_vec_cmp_float)
24589 (aarch64_expand_sve_vcond): New functions.
24590 (aarch64_modes_tieable_p): Use aarch64_vector_data_mode_p instead
24591 of aarch64_vector_mode_p.
24592 (aarch64_dwarf_poly_indeterminate_value): New function.
24593 (aarch64_compute_pressure_classes): Likewise.
24594 (aarch64_can_change_mode_class): Likewise.
24595 (TARGET_GET_RAW_RESULT_MODE, TARGET_GET_RAW_ARG_MODE): Redefine.
24596 (TARGET_VECTORIZE_PREFERRED_VECTOR_ALIGNMENT): Likewise.
24597 (TARGET_VECTORIZE_GET_MASK_MODE): Likewise.
24598 (TARGET_DWARF_POLY_INDETERMINATE_VALUE): Likewise.
24599 (TARGET_COMPUTE_PRESSURE_CLASSES): Likewise.
24600 (TARGET_CAN_CHANGE_MODE_CLASS): Likewise.
24601 * config/aarch64/constraints.md (Upa, Upl, Uav, Uat, Usv, Usi, Utr)
24602 (Uty, Dm, vsa, vsc, vsd, vsi, vsn, vsl, vsm, vsA, vsM, vsN): New
24604 (Dn, Dl, Dr): Accept const as well as const_vector.
24605 (Dz): Likewise. Compare against CONST0_RTX.
24606 * config/aarch64/iterators.md: Refer to "Advanced SIMD" instead
24607 of "vector" where appropriate.
24608 (SVE_ALL, SVE_BH, SVE_BHS, SVE_BHSI, SVE_HSDI, SVE_HSF, SVE_SD)
24609 (SVE_SDI, SVE_I, SVE_F, PRED_ALL, PRED_BHS): New mode iterators.
24610 (UNSPEC_SEL, UNSPEC_ANDF, UNSPEC_IORF, UNSPEC_XORF, UNSPEC_COND_LT)
24611 (UNSPEC_COND_LE, UNSPEC_COND_EQ, UNSPEC_COND_NE, UNSPEC_COND_GE)
24612 (UNSPEC_COND_GT, UNSPEC_COND_LO, UNSPEC_COND_LS, UNSPEC_COND_HS)
24613 (UNSPEC_COND_HI, UNSPEC_COND_UO): New unspecs.
24614 (Vetype, VEL, Vel, VWIDE, Vwide, vw, vwcore, V_INT_EQUIV)
24615 (v_int_equiv): Extend to SVE modes.
24616 (Vesize, V128, v128, Vewtype, V_FP_EQUIV, v_fp_equiv, VPRED): New
24618 (LOGICAL_OR, SVE_INT_UNARY, SVE_FP_UNARY): New code iterators.
24619 (optab): Handle popcount, smin, smax, umin, umax, abs and sqrt.
24620 (logical_nn, lr, sve_int_op, sve_fp_op): New code attributs.
24621 (LOGICALF, OPTAB_PERMUTE, UNPACK, UNPACK_UNSIGNED, SVE_COND_INT_CMP)
24622 (SVE_COND_FP_CMP): New int iterators.
24623 (perm_hilo): Handle the new unpack unspecs.
24624 (optab, logicalf_op, su, perm_optab, cmp_op, imm_con): New int
24626 * config/aarch64/predicates.md (aarch64_sve_cnt_immediate)
24627 (aarch64_sve_addvl_addpl_immediate, aarch64_split_add_offset_immediate)
24628 (aarch64_pluslong_or_poly_operand, aarch64_nonmemory_operand)
24629 (aarch64_equality_operator, aarch64_constant_vector_operand)
24630 (aarch64_sve_ld1r_operand, aarch64_sve_ldr_operand): New predicates.
24631 (aarch64_sve_nonimmediate_operand): Likewise.
24632 (aarch64_sve_general_operand): Likewise.
24633 (aarch64_sve_dup_operand, aarch64_sve_arith_immediate): Likewise.
24634 (aarch64_sve_sub_arith_immediate, aarch64_sve_inc_dec_immediate)
24635 (aarch64_sve_logical_immediate, aarch64_sve_mul_immediate): Likewise.
24636 (aarch64_sve_dup_immediate, aarch64_sve_cmp_vsc_immediate): Likewise.
24637 (aarch64_sve_cmp_vsd_immediate, aarch64_sve_index_immediate): Likewise.
24638 (aarch64_sve_float_arith_immediate): Likewise.
24639 (aarch64_sve_float_arith_with_sub_immediate): Likewise.
24640 (aarch64_sve_float_mul_immediate, aarch64_sve_arith_operand): Likewise.
24641 (aarch64_sve_add_operand, aarch64_sve_logical_operand): Likewise.
24642 (aarch64_sve_lshift_operand, aarch64_sve_rshift_operand): Likewise.
24643 (aarch64_sve_mul_operand, aarch64_sve_cmp_vsc_operand): Likewise.
24644 (aarch64_sve_cmp_vsd_operand, aarch64_sve_index_operand): Likewise.
24645 (aarch64_sve_float_arith_operand): Likewise.
24646 (aarch64_sve_float_arith_with_sub_operand): Likewise.
24647 (aarch64_sve_float_mul_operand): Likewise.
24648 (aarch64_sve_vec_perm_operand): Likewise.
24649 (aarch64_pluslong_operand): Include aarch64_sve_addvl_addpl_immediate.
24650 (aarch64_mov_operand): Accept const_poly_int and const_vector.
24651 (aarch64_simd_lshift_imm, aarch64_simd_rshift_imm): Accept const
24652 as well as const_vector.
24653 (aarch64_simd_imm_zero, aarch64_simd_imm_minus_one): Move earlier
24654 in file. Use CONST0_RTX and CONSTM1_RTX.
24655 (aarch64_simd_or_scalar_imm_zero): Likewise. Add match_codes.
24656 (aarch64_simd_reg_or_zero): Accept const as well as const_vector.
24657 Use aarch64_simd_imm_zero.
24658 * config/aarch64/aarch64-sve.md: New file.
24659 * config/aarch64/aarch64.md: Include it.
24660 (VG_REGNUM, P0_REGNUM, P7_REGNUM, P15_REGNUM): New register numbers.
24661 (UNSPEC_REV, UNSPEC_LD1_SVE, UNSPEC_ST1_SVE, UNSPEC_MERGE_PTRUE)
24662 (UNSPEC_PTEST_PTRUE, UNSPEC_UNPACKSHI, UNSPEC_UNPACKUHI)
24663 (UNSPEC_UNPACKSLO, UNSPEC_UNPACKULO, UNSPEC_PACK)
24664 (UNSPEC_FLOAT_CONVERT, UNSPEC_WHILE_LO): New unspec constants.
24665 (sve): New attribute.
24666 (enabled): Disable instructions with the sve attribute unless
24668 (movqi, movhi): Pass CONST_POLY_INT operaneds through
24669 aarch64_expand_mov_immediate.
24670 (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64): Handle
24671 CNT[BHSD] immediates.
24672 (movti): Split CONST_POLY_INT moves into two halves.
24673 (add<mode>3): Accept aarch64_pluslong_or_poly_operand.
24674 Split additions that need a temporary here if the destination
24675 is the stack pointer.
24676 (*add<mode>3_aarch64): Handle ADDVL and ADDPL immediates.
24677 (*add<mode>3_poly_1): New instruction.
24678 (set_clobber_cc): New expander.
24680 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
24682 * simplify-rtx.c (simplify_immed_subreg): Add an inner_bytes
24683 parameter and use it instead of GET_MODE_SIZE (innermode). Use
24684 inner_bytes * BITS_PER_UNIT instead of GET_MODE_BITSIZE (innermode).
24685 Use CEIL (inner_bytes, GET_MODE_UNIT_SIZE (innermode)) instead of
24686 GET_MODE_NUNITS (innermode). Also add a first_elem parameter.
24687 Change innermode from fixed_mode_size to machine_mode.
24688 (simplify_subreg): Update call accordingly. Handle a constant-sized
24689 subreg of a variable-length CONST_VECTOR.
24691 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
24692 Alan Hayward <alan.hayward@arm.com>
24693 David Sherwood <david.sherwood@arm.com>
24695 * tree-ssa-address.c (mem_ref_valid_without_offset_p): New function.
24696 (add_offset_to_base): New function, split out from...
24697 (create_mem_ref): ...here. When handling a scale other than 1,
24698 check first whether the address is valid without the offset.
24699 Add it into the base if so, leaving the index and scale as-is.
24701 2018-01-12 Jakub Jelinek <jakub@redhat.com>
24704 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Call
24705 fold_for_warn before checking if arg2 is INTEGER_CST.
24707 2018-01-12 Segher Boessenkool <segher@kernel.crashing.org>
24709 * config/rs6000/predicates.md (load_multiple_operation): Delete.
24710 (store_multiple_operation): Delete.
24711 * config/rs6000/rs6000-cpus.def (601): Remove MASK_STRING.
24712 * config/rs6000/rs6000-protos.h (rs6000_output_load_multiple): Delete.
24713 * config/rs6000/rs6000-string.c (expand_block_move): Delete everything
24714 guarded by TARGET_STRING.
24715 (rs6000_output_load_multiple): Delete.
24716 * config/rs6000/rs6000.c (rs6000_option_override_internal): Delete
24717 OPTION_MASK_STRING / TARGET_STRING handling.
24718 (print_operand) <'N', 'O'>: Add comment that these are unused now.
24719 (const rs6000_opt_masks) <"string">: Change mask to 0.
24720 * config/rs6000/rs6000.h (TARGET_DEFAULT): Remove MASK_STRING.
24721 (MASK_STRING): Delete.
24722 * config/rs6000/rs6000.md (*mov<mode>_string): Delete TARGET_STRING
24724 (load_multiple): Delete.
24731 (store_multiple): Delete.
24738 (movmemsi_8reg): Delete.
24739 (corresponding unnamed define_insn): Delete.
24740 (movmemsi_6reg): Delete.
24741 (corresponding unnamed define_insn): Delete.
24742 (movmemsi_4reg): Delete.
24743 (corresponding unnamed define_insn): Delete.
24744 (movmemsi_2reg): Delete.
24745 (corresponding unnamed define_insn): Delete.
24746 (movmemsi_1reg): Delete.
24747 (corresponding unnamed define_insn): Delete.
24748 * config/rs6000/rs6000.opt (mno-string): New.
24749 (mstring): Replace by deprecation warning stub.
24750 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mstring.
24752 2018-01-12 Jakub Jelinek <jakub@redhat.com>
24754 * regrename.c (regrename_do_replace): If replacing the same
24755 reg multiple times, try to reuse last created gen_raw_REG.
24758 * bb-reorder.c (pass_partition_blocks::gate): In lto don't partition
24759 main to workaround a bug in GDB.
24761 2018-01-12 Tom de Vries <tom@codesourcery.com>
24764 * config.gcc (nvptx*-*-*): Set use_gcc_stdint=wrap.
24766 2018-01-12 Vladimir Makarov <vmakarov@redhat.com>
24768 PR rtl-optimization/80481
24769 * ira-color.c (get_cap_member): New function.
24770 (allocnos_conflict_by_live_ranges_p): Use it.
24771 (slot_coalesced_allocno_live_ranges_intersect_p): Add assert.
24772 (setup_slot_coalesced_allocno_live_ranges): Ditto.
24774 2018-01-12 Uros Bizjak <ubizjak@gmail.com>
24777 * config/alpha/alpha.md (*saddsi_1): New insn_ans_split pattern.
24778 (*saddl_se_1): Ditto.
24779 (*ssubsi_1): Ditto.
24780 (*ssubl_se_1): Ditto.
24782 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
24784 * tree-predcom.c (aff_combination_dr_offset): Use wi::to_poly_widest
24785 rather than wi::to_widest for DR_INITs.
24786 * tree-vect-data-refs.c (vect_find_same_alignment_drs): Use
24787 wi::to_poly_offset rather than wi::to_offset for DR_INIT.
24788 (vect_analyze_data_ref_accesses): Require both DR_INITs to be
24790 (vect_analyze_group_access_1): Note that here.
24792 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
24794 * tree-vectorizer.c (get_vec_alignment_for_array_type): Handle
24795 polynomial type sizes.
24797 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
24799 * gimplify.c (gimple_add_tmp_var_fn): Allow variables to have a
24800 poly_uint64 size, rather than requiring an unsigned HOST_WIDE_INT size.
24801 (gimple_add_tmp_var): Likewise.
24803 2018-01-12 Martin Liska <mliska@suse.cz>
24805 * gimple.c (gimple_alloc_counts): Use uint64_t instead of int.
24806 (gimple_alloc_sizes): Likewise.
24807 (dump_gimple_statistics): Use PRIu64 in printf format.
24808 * gimple.h: Change uint64_t to int.
24810 2018-01-12 Martin Liska <mliska@suse.cz>
24812 * tree-core.h: Use uint64_t instead of int.
24813 * tree.c (tree_node_counts): Likewise.
24814 (tree_node_sizes): Likewise.
24815 (dump_tree_statistics): Use PRIu64 in printf format.
24817 2018-01-12 Martin Liska <mliska@suse.cz>
24819 * Makefile.in: As qsort_chk is implemented in vec.c, add
24820 vec.o to linkage of gencfn-macros.
24821 * tree.c (build_new_poly_int_cst): Add CXX_MEM_STAT_INFO as it's
24822 passing the info to record_node_allocation_statistics.
24823 (test_vector_cst_patterns): Add CXX_MEM_STAT_INFO to declaration
24825 * ggc-common.c (struct ggc_usage): Add operator== and use
24826 it in operator< and compare function.
24827 * mem-stats.h (struct mem_usage): Likewise.
24828 * vec.c (struct vec_usage): Remove operator< and compare
24829 function. Can be simply inherited.
24831 2018-01-12 Martin Jambor <mjambor@suse.cz>
24834 * params.def: New parameter PARAM_AVOID_FMA_MAX_BITS.
24835 * tree-ssa-math-opts.c: Include domwalk.h.
24836 (convert_mult_to_fma_1): New function.
24837 (fma_transformation_info): New type.
24838 (fma_deferring_state): Likewise.
24839 (cancel_fma_deferring): New function.
24840 (result_of_phi): Likewise.
24841 (last_fma_candidate_feeds_initial_phi): Likewise.
24842 (convert_mult_to_fma): Added deferring logic, split actual
24843 transformation to convert_mult_to_fma_1.
24844 (math_opts_dom_walker): New type.
24845 (math_opts_dom_walker::after_dom_children): New method, body moved
24846 here from pass_optimize_widening_mul::execute, added deferring logic
24848 (pass_optimize_widening_mul::execute): Moved most of code to
24849 math_opts_dom_walker::after_dom_children.
24850 * config/i386/x86-tune.def (X86_TUNE_AVOID_128FMA_CHAINS): New.
24851 * config/i386/i386.c (ix86_option_override_internal): Added
24852 maybe_setting of PARAM_AVOID_FMA_MAX_BITS.
24854 2018-01-12 Richard Biener <rguenther@suse.de>
24857 * dwarf2out.c (gen_variable_die): Do not reset old_die for
24858 inline instance vars.
24860 2018-01-12 Oleg Endo <olegendo@gcc.gnu.org>
24863 * config/rx/rx.c (rx_is_restricted_memory_address):
24864 Handle SUBREG case.
24866 2018-01-12 Richard Biener <rguenther@suse.de>
24868 PR tree-optimization/80846
24869 * target.def (split_reduction): New target hook.
24870 * targhooks.c (default_split_reduction): New function.
24871 * targhooks.h (default_split_reduction): Declare.
24872 * tree-vect-loop.c (vect_create_epilog_for_reduction): If the
24873 target requests first reduce vectors by combining low and high
24875 * tree-vect-stmts.c (vect_gen_perm_mask_any): Adjust.
24876 (get_vectype_for_scalar_type_and_size): Export.
24877 * tree-vectorizer.h (get_vectype_for_scalar_type_and_size): Declare.
24878 * doc/tm.texi.in (TARGET_VECTORIZE_SPLIT_REDUCTION): Document.
24879 * doc/tm.texi: Regenerate.
24880 * config/i386/i386.c (ix86_split_reduction): Implement
24881 TARGET_VECTORIZE_SPLIT_REDUCTION.
24883 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
24886 * config/sparc/sparc.h (PIC_OFFSET_TABLE_REGNUM): Set to INVALID_REGNUM
24887 in PIC mode except for TARGET_VXWORKS_RTP.
24888 * config/sparc/sparc.c: Include cfgrtl.h.
24889 (TARGET_INIT_PIC_REG): Define.
24890 (TARGET_USE_PSEUDO_PIC_REG): Likewise.
24891 (sparc_pic_register_p): New predicate.
24892 (sparc_legitimate_address_p): Use it.
24893 (sparc_legitimize_pic_address): Likewise.
24894 (sparc_delegitimize_address): Likewise.
24895 (sparc_mode_dependent_address_p): Likewise.
24896 (gen_load_pcrel_sym): Remove 4th parameter.
24897 (load_got_register): Adjust call to above. Remove obsolete stuff.
24898 (sparc_expand_prologue): Do not call load_got_register here.
24899 (sparc_flat_expand_prologue): Likewise.
24900 (sparc_output_mi_thunk): Set the pic_offset_table_rtx object.
24901 (sparc_use_pseudo_pic_reg): New function.
24902 (sparc_init_pic_reg): Likewise.
24903 * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
24904 (builtin_setjmp_receiver): Enable only for TARGET_VXWORKS_RTP.
24906 2018-01-12 Christophe Lyon <christophe.lyon@linaro.org>
24908 * doc/sourcebuild.texi (Effective-Target Keywords, Other attributes):
24909 Add item for branch_cost.
24911 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
24913 PR rtl-optimization/83565
24914 * rtlanal.c (nonzero_bits1): On WORD_REGISTER_OPERATIONS machines, do
24915 not extend the result to a larger mode for rotate operations.
24916 (num_sign_bit_copies1): Likewise.
24918 2018-01-12 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
24921 * config/sol2.h (STARTFILE_ARCH_SPEC): Don't use with -shared or
24923 Use values-Xc.o for -pedantic.
24924 Link with values-xpg4.o for C90, values-xpg6.o otherwise.
24926 2018-01-12 Martin Liska <mliska@suse.cz>
24929 * ipa-devirt.c (final_warning_record::grow_type_warnings):
24931 (possible_polymorphic_call_targets): Use it.
24932 (ipa_devirt): Likewise.
24934 2018-01-12 Martin Liska <mliska@suse.cz>
24936 * profile-count.h (enum profile_quality): Use 0 as invalid
24937 enum value of profile_quality.
24939 2018-01-12 Chung-Ju Wu <jasonwucj@gmail.com>
24941 * doc/invoke.texi (NDS32 Options): Add -mext-perf, -mext-perf2 and
24942 -mext-string options.
24944 2018-01-12 Richard Biener <rguenther@suse.de>
24946 * lto-streamer-out.c (DFS::DFS_write_tree_body): Process
24947 DECL_DEBUG_EXPR conditional on DECL_HAS_DEBUG_EXPR_P.
24948 * tree-streamer-in.c (lto_input_ts_decl_common_tree_pointers):
24950 * tree-streamer-out.c (write_ts_decl_common_tree_pointers): Likewise.
24952 2018-01-11 Michael Meissner <meissner@linux.vnet.ibm.com>
24954 * configure.ac (--with-long-double-format): Add support for the
24955 configuration option to change the default long double format on
24957 * config.gcc (powerpc*-linux*-*): Likewise.
24958 * configure: Regenerate.
24959 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): If long
24960 double is IEEE, define __KC__ and __KF__ to allow floatn.h to be
24961 used without modification.
24963 2018-01-11 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
24965 * config/rs6000/rs6000-builtin.def (BU_P7_MISC_X): New #define.
24966 (SPEC_BARRIER): New instantiation of BU_P7_MISC_X.
24967 * config/rs6000/rs6000.c (rs6000_expand_builtin): Handle
24968 MISC_BUILTIN_SPEC_BARRIER.
24969 (rs6000_init_builtins): Likewise.
24970 * config/rs6000/rs6000.md (UNSPECV_SPEC_BARRIER): New UNSPECV
24972 (speculation_barrier): New define_insn.
24973 * doc/extend.texi: Document __builtin_speculation_barrier.
24975 2018-01-11 Jakub Jelinek <jakub@redhat.com>
24978 * config/i386/i386.c (ix86_expand_vector_init_one_nonzero): If one_var
24979 is 0, for V{8,16}S[IF] and V[48]D[IF]mode use gen_vec_set<mode>_0.
24980 * config/i386/sse.md (VI8_AVX_AVX512F, VI4F_256_512): New mode
24982 (ssescalarmodesuffix): Add 512-bit vectors. Use "d" or "q" for
24983 integral modes instead of "ss" and "sd".
24984 (vec_set<mode>_0): New define_insns for 256-bit and 512-bit
24985 vectors with 32-bit and 64-bit elements.
24986 (vecdupssescalarmodesuffix): New mode attribute.
24987 (vec_dup<mode>): Use it.
24989 2018-01-11 H.J. Lu <hongjiu.lu@intel.com>
24992 * config/i386/i386.c (ix86_compute_frame_layout): Align stack
24993 frame if argument is passed on stack.
24995 2018-01-11 Jakub Jelinek <jakub@redhat.com>
24998 * ree.c (combine_reaching_defs): Optimize also
24999 reg2=exp; reg1=reg2; reg2=any_extend(reg1); into
25000 reg2=any_extend(exp); reg1=reg2;, formatting fix.
25002 2018-01-11 Jan Hubicka <hubicka@ucw.cz>
25004 PR middle-end/83189
25005 * gimple-ssa-isolate-paths.c (isolate_path): Fix profile update.
25007 2018-01-11 Jan Hubicka <hubicka@ucw.cz>
25009 PR middle-end/83718
25010 * tree-inline.c (copy_cfg_body): Adjust num&den for scaling
25011 after they are computed.
25013 2018-01-11 Bin Cheng <bin.cheng@arm.com>
25015 PR tree-optimization/83695
25016 * gimple-loop-linterchange.cc
25017 (tree_loop_interchange::interchange_loops): Call scev_reset_htab to
25018 reset cached scev information after interchange.
25019 (pass_linterchange::execute): Remove call to scev_reset_htab.
25021 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
25023 * config/arm/arm_neon.h (vfmlal_lane_low_u32, vfmlal_lane_high_u32,
25024 vfmlalq_laneq_low_u32, vfmlalq_lane_low_u32, vfmlal_laneq_low_u32,
25025 vfmlalq_laneq_high_u32, vfmlalq_lane_high_u32, vfmlal_laneq_high_u32,
25026 vfmlsl_lane_low_u32, vfmlsl_lane_high_u32, vfmlslq_laneq_low_u32,
25027 vfmlslq_lane_low_u32, vfmlsl_laneq_low_u32, vfmlslq_laneq_high_u32,
25028 vfmlslq_lane_high_u32, vfmlsl_laneq_high_u32): Define.
25029 * config/arm/arm_neon_builtins.def (vfmal_lane_low,
25030 vfmal_lane_lowv4hf, vfmal_lane_lowv8hf, vfmal_lane_high,
25031 vfmal_lane_highv4hf, vfmal_lane_highv8hf, vfmsl_lane_low,
25032 vfmsl_lane_lowv4hf, vfmsl_lane_lowv8hf, vfmsl_lane_high,
25033 vfmsl_lane_highv4hf, vfmsl_lane_highv8hf): New sets of builtins.
25034 * config/arm/iterators.md (VFMLSEL2, vfmlsel2): New mode attributes.
25035 (V_lane_reg): Likewise.
25036 * config/arm/neon.md (neon_vfm<vfml_op>l_lane_<vfml_half><VCVTF:mode>):
25038 (neon_vfm<vfml_op>l_lane_<vfml_half><vfmlsel2><mode>): Likewise.
25039 (vfmal_lane_low<mode>_intrinsic,
25040 vfmal_lane_low<vfmlsel2><mode>_intrinsic,
25041 vfmal_lane_high<vfmlsel2><mode>_intrinsic,
25042 vfmal_lane_high<mode>_intrinsic, vfmsl_lane_low<mode>_intrinsic,
25043 vfmsl_lane_low<vfmlsel2><mode>_intrinsic,
25044 vfmsl_lane_high<vfmlsel2><mode>_intrinsic,
25045 vfmsl_lane_high<mode>_intrinsic): New define_insns.
25047 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
25049 * config/arm/arm-cpus.in (fp16fml): New feature.
25050 (ALL_SIMD): Add fp16fml.
25051 (armv8.2-a): Add fp16fml as an option.
25052 (armv8.3-a): Likewise.
25053 (armv8.4-a): Add fp16fml as part of fp16.
25054 * config/arm/arm.h (TARGET_FP16FML): Define.
25055 * config/arm/arm-c.c (arm_cpu_builtins): Define __ARM_FEATURE_FP16_FML
25057 * config/arm/arm-modes.def (V2HF): Define.
25058 * config/arm/arm_neon.h (vfmlal_low_u32, vfmlsl_low_u32,
25059 vfmlal_high_u32, vfmlsl_high_u32, vfmlalq_low_u32,
25060 vfmlslq_low_u32, vfmlalq_high_u32, vfmlslq_high_u32): Define.
25061 * config/arm/arm_neon_builtins.def (vfmal_low, vfmal_high,
25062 vfmsl_low, vfmsl_high): New set of builtins.
25063 * config/arm/iterators.md (PLUSMINUS): New code iterator.
25064 (vfml_op): New code attribute.
25065 (VFMLHALVES): New int iterator.
25066 (VFML, VFMLSEL): New mode attributes.
25067 (V_reg): Define mapping for V2HF.
25068 (V_hi, V_lo): New mode attributes.
25069 (VF_constraint): Likewise.
25070 (vfml_half, vfml_half_selector): New int attributes.
25071 * config/arm/neon.md (neon_vfm<vfml_op>l_<vfml_half><mode>): New
25073 (vfmal_low<mode>_intrinsic, vfmsl_high<mode>_intrinsic,
25074 vfmal_high<mode>_intrinsic, vfmsl_low<mode>_intrinsic):
25076 * config/arm/t-arm-elf (v8_fps): Add fp16fml.
25077 * config/arm/t-multilib (v8_2_a_simd_variants): Add fp16fml.
25078 * config/arm/unspecs.md (UNSPEC_VFML_LO, UNSPEC_VFML_HI): New unspecs.
25079 * doc/invoke.texi (ARM Options): Document fp16fml. Update armv8.4-a
25081 * doc/sourcebuild.texi (arm_fp16fml_neon_ok, arm_fp16fml_neon):
25082 Document new effective target and option set.
25084 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
25086 * config/arm/arm-cpus.in (armv8_4): New feature.
25087 (ARMv8_4a): New fgroup.
25088 (armv8.4-a): New arch.
25089 * config/arm/arm-tables.opt: Regenerate.
25090 * config/arm/t-aprofile: Add matching rules for -march=armv8.4-a.
25091 * config/arm/t-arm-elf (all_v8_archs): Add armv8.4-a.
25092 * config/arm/t-multilib (v8_4_a_simd_variants): New variable.
25093 Add matching rules for -march=armv8.4-a and extensions.
25094 * doc/invoke.texi (ARM Options): Document -march=armv8.4-a.
25096 2018-01-11 Oleg Endo <olegendo@gcc.gnu.org>
25099 * config/rx/rx.md (BW): New mode attribute.
25100 (sync_lock_test_and_setsi): Add mode suffix to insn output.
25102 2018-01-11 Richard Biener <rguenther@suse.de>
25104 PR tree-optimization/83435
25105 * graphite.c (canonicalize_loop_form): Ignore fake loop exit edges.
25106 * graphite-scop-detection.c (scop_detection::get_sese): Likewise.
25107 * tree-vrp.c (add_assert_info): Drop TREE_OVERFLOW if they appear.
25109 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
25110 Alan Hayward <alan.hayward@arm.com>
25111 David Sherwood <david.sherwood@arm.com>
25113 * config/aarch64/aarch64.c (aarch64_address_info): Add a const_offset
25115 (aarch64_classify_address): Initialize it. Track polynomial offsets.
25116 (aarch64_print_address_internal): Use it to check for a zero offset.
25118 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
25119 Alan Hayward <alan.hayward@arm.com>
25120 David Sherwood <david.sherwood@arm.com>
25122 * config/aarch64/aarch64-modes.def (NUM_POLY_INT_COEFFS): Set to 2.
25123 * config/aarch64/aarch64-protos.h (aarch64_initial_elimination_offset):
25124 Return a poly_int64 rather than a HOST_WIDE_INT.
25125 (aarch64_offset_7bit_signed_scaled_p): Take the offset as a poly_int64
25126 rather than a HOST_WIDE_INT.
25127 * config/aarch64/aarch64.h (aarch64_frame): Protect with
25128 HAVE_POLY_INT_H rather than HOST_WIDE_INT. Change locals_offset,
25129 hard_fp_offset, frame_size, initial_adjust, callee_offset and
25130 final_offset from HOST_WIDE_INT to poly_int64.
25131 * config/aarch64/aarch64-builtins.c (aarch64_simd_expand_args): Use
25132 to_constant when getting the number of units in an Advanced SIMD
25134 (aarch64_builtin_vectorized_function): Check for a constant number
25136 * config/aarch64/aarch64-simd.md (mov<mode>): Handle polynomial
25138 (aarch64_ld<VSTRUCT:nregs>_lane<VALLDIF:mode>): Use the nunits
25139 attribute instead of GET_MODE_NUNITS.
25140 * config/aarch64/aarch64.c (aarch64_hard_regno_nregs)
25141 (aarch64_class_max_nregs): Use the constant_lowest_bound of the
25142 GET_MODE_SIZE for fixed-size registers.
25143 (aarch64_const_vec_all_same_in_range_p): Use const_vec_duplicate_p.
25144 (aarch64_hard_regno_call_part_clobbered, aarch64_classify_index)
25145 (aarch64_mode_valid_for_sched_fusion_p, aarch64_classify_address)
25146 (aarch64_legitimize_address_displacement, aarch64_secondary_reload)
25147 (aarch64_print_operand, aarch64_print_address_internal)
25148 (aarch64_address_cost, aarch64_rtx_costs, aarch64_register_move_cost)
25149 (aarch64_short_vector_p, aapcs_vfp_sub_candidate)
25150 (aarch64_simd_attr_length_rglist, aarch64_operands_ok_for_ldpstp):
25151 Handle polynomial GET_MODE_SIZE.
25152 (aarch64_hard_regno_caller_save_mode): Likewise. Return modes
25153 wider than SImode without modification.
25154 (tls_symbolic_operand_type): Use strip_offset instead of split_const.
25155 (aarch64_pass_by_reference, aarch64_layout_arg, aarch64_pad_reg_upward)
25156 (aarch64_gimplify_va_arg_expr): Assert that we don't yet handle
25157 passing and returning SVE modes.
25158 (aarch64_function_value, aarch64_layout_arg): Use gen_int_mode
25159 rather than GEN_INT.
25160 (aarch64_emit_probe_stack_range): Take the size as a poly_int64
25161 rather than a HOST_WIDE_INT, but call sorry if it isn't constant.
25162 (aarch64_allocate_and_probe_stack_space): Likewise.
25163 (aarch64_layout_frame): Cope with polynomial offsets.
25164 (aarch64_save_callee_saves, aarch64_restore_callee_saves): Take the
25165 start_offset as a poly_int64 rather than a HOST_WIDE_INT. Track
25166 polynomial offsets.
25167 (offset_9bit_signed_unscaled_p, offset_12bit_unsigned_scaled_p)
25168 (aarch64_offset_7bit_signed_scaled_p): Take the offset as a
25169 poly_int64 rather than a HOST_WIDE_INT.
25170 (aarch64_get_separate_components, aarch64_process_components)
25171 (aarch64_expand_prologue, aarch64_expand_epilogue)
25172 (aarch64_use_return_insn_p): Handle polynomial frame offsets.
25173 (aarch64_anchor_offset): New function, split out from...
25174 (aarch64_legitimize_address): ...here.
25175 (aarch64_builtin_vectorization_cost): Handle polynomial
25176 TYPE_VECTOR_SUBPARTS.
25177 (aarch64_simd_check_vect_par_cnst_half): Handle polynomial
25179 (aarch64_simd_make_constant, aarch64_expand_vector_init): Get the
25180 number of elements from the PARALLEL rather than the mode.
25181 (aarch64_shift_truncation_mask): Use GET_MODE_UNIT_BITSIZE
25182 rather than GET_MODE_BITSIZE.
25183 (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_ext)
25184 (aarch64_evpc_rev, aarch64_evpc_dup, aarch64_evpc_zip)
25185 (aarch64_expand_vec_perm_const_1): Handle polynomial
25186 d->perm.length () and d->perm elements.
25187 (aarch64_evpc_tbl): Likewise. Use nelt rather than GET_MODE_NUNITS.
25188 Apply to_constant to d->perm elements.
25189 (aarch64_simd_valid_immediate, aarch64_vec_fpconst_pow_of_2): Handle
25190 polynomial CONST_VECTOR_NUNITS.
25191 (aarch64_move_pointer): Take amount as a poly_int64 rather
25193 (aarch64_progress_pointer): Avoid temporary variable.
25194 * config/aarch64/aarch64.md (aarch64_<crc_variant>): Use
25195 the mode attribute instead of GET_MODE.
25197 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
25198 Alan Hayward <alan.hayward@arm.com>
25199 David Sherwood <david.sherwood@arm.com>
25201 * config/aarch64/aarch64.c (aarch64_force_temporary): Assert that
25202 x exists before using it.
25203 (aarch64_add_constant_internal): Rename to...
25204 (aarch64_add_offset_1): ...this. Replace regnum with separate
25205 src and dest rtxes. Handle the case in which they're different,
25206 including when the offset is zero. Replace scratchreg with an rtx.
25207 Use 2 additions if there is no spare register into which we can
25208 move a 16-bit constant.
25209 (aarch64_add_constant): Delete.
25210 (aarch64_add_offset): Replace reg with separate src and dest
25211 rtxes. Take a poly_int64 offset instead of a HOST_WIDE_INT.
25212 Use aarch64_add_offset_1.
25213 (aarch64_add_sp, aarch64_sub_sp): Take the scratch register as
25214 an rtx rather than an int. Take the delta as a poly_int64
25215 rather than a HOST_WIDE_INT. Use aarch64_add_offset.
25216 (aarch64_expand_mov_immediate): Update uses of aarch64_add_offset.
25217 (aarch64_expand_prologue): Update calls to aarch64_sub_sp,
25218 aarch64_allocate_and_probe_stack_space and aarch64_add_offset.
25219 (aarch64_expand_epilogue): Update calls to aarch64_add_offset
25220 and aarch64_add_sp.
25221 (aarch64_output_mi_thunk): Use aarch64_add_offset rather than
25222 aarch64_add_constant.
25224 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
25226 * config/aarch64/aarch64.c (aarch64_reinterpret_float_as_int):
25227 Use scalar_float_mode.
25229 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
25231 * config/aarch64/aarch64-simd.md
25232 (aarch64_fml<f16mac1>l<f16quad>_low<mode>): Avoid GET_MODE_NUNITS.
25233 (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Likewise.
25234 (aarch64_fml<f16mac1>l_lane_lowv2sf): Likewise.
25235 (aarch64_fml<f16mac1>l_lane_highv2sf): Likewise.
25236 (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Likewise.
25237 (aarch64_fml<f16mac1>lq_laneq_highv4sf): Likewise.
25238 (aarch64_fml<f16mac1>l_laneq_lowv2sf): Likewise.
25239 (aarch64_fml<f16mac1>l_laneq_highv2sf): Likewise.
25240 (aarch64_fml<f16mac1>lq_lane_lowv4sf): Likewise.
25241 (aarch64_fml<f16mac1>lq_lane_highv4sf): Likewise.
25243 2018-01-11 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
25246 * config/arm/arm.c (arm_declare_function_name): Set arch_to_print if
25247 targ_options->x_arm_arch_string is non NULL.
25249 2018-01-11 Tamar Christina <tamar.christina@arm.com>
25251 * config/aarch64/aarch64.h
25252 (AARCH64_FL_FOR_ARCH8_4): Add AARCH64_FL_DOTPROD.
25254 2018-01-11 Sudakshina Das <sudi.das@arm.com>
25257 * expmed.c (emit_store_flag_force): Swap if const op0
25258 and change VOIDmode to mode of op0.
25260 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
25262 PR rtl-optimization/83761
25263 * caller-save.c (replace_reg_with_saved_mem): Pass bits rather
25264 than bytes to mode_for_size.
25266 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
25268 PR middle-end/83189
25269 * gfortran.fortran-torture/compile/pr83189.f90: New testcase.
25270 * tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): Handle zero
25273 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
25275 PR middle-end/83575
25276 * cfgrtl.c (rtl_verify_edges): Only verify fixability of partition
25277 when in layout mode.
25278 (cfg_layout_finalize): Do not verify cfg before we are out of layout.
25279 * cfgcleanup.c (try_optimize_cfg): Only verify flow info when doing
25282 2018-01-10 Michael Collison <michael.collison@arm.com>
25284 * config/aarch64/aarch64-modes.def (V2HF): New VECTOR_MODE.
25285 * config/aarch64/aarch64-option-extension.def: Add
25286 AARCH64_OPT_EXTENSION of 'fp16fml'.
25287 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
25288 (__ARM_FEATURE_FP16_FML): Define if TARGET_F16FML is true.
25289 * config/aarch64/predicates.md (aarch64_lane_imm3): New predicate.
25290 * config/aarch64/constraints.md (Ui7): New constraint.
25291 * config/aarch64/iterators.md (VFMLA_W): New mode iterator.
25292 (VFMLA_SEL_W): Ditto.
25295 (VFMLA16_LOW): New int iterator.
25296 (VFMLA16_HIGH): Ditto.
25297 (UNSPEC_FMLAL): New unspec.
25298 (UNSPEC_FMLSL): Ditto.
25299 (UNSPEC_FMLAL2): Ditto.
25300 (UNSPEC_FMLSL2): Ditto.
25301 (f16mac): New code attribute.
25302 * config/aarch64/aarch64-simd-builtins.def
25303 (aarch64_fmlal_lowv2sf): Ditto.
25304 (aarch64_fmlsl_lowv2sf): Ditto.
25305 (aarch64_fmlalq_lowv4sf): Ditto.
25306 (aarch64_fmlslq_lowv4sf): Ditto.
25307 (aarch64_fmlal_highv2sf): Ditto.
25308 (aarch64_fmlsl_highv2sf): Ditto.
25309 (aarch64_fmlalq_highv4sf): Ditto.
25310 (aarch64_fmlslq_highv4sf): Ditto.
25311 (aarch64_fmlal_lane_lowv2sf): Ditto.
25312 (aarch64_fmlsl_lane_lowv2sf): Ditto.
25313 (aarch64_fmlal_laneq_lowv2sf): Ditto.
25314 (aarch64_fmlsl_laneq_lowv2sf): Ditto.
25315 (aarch64_fmlalq_lane_lowv4sf): Ditto.
25316 (aarch64_fmlsl_lane_lowv4sf): Ditto.
25317 (aarch64_fmlalq_laneq_lowv4sf): Ditto.
25318 (aarch64_fmlsl_laneq_lowv4sf): Ditto.
25319 (aarch64_fmlal_lane_highv2sf): Ditto.
25320 (aarch64_fmlsl_lane_highv2sf): Ditto.
25321 (aarch64_fmlal_laneq_highv2sf): Ditto.
25322 (aarch64_fmlsl_laneq_highv2sf): Ditto.
25323 (aarch64_fmlalq_lane_highv4sf): Ditto.
25324 (aarch64_fmlsl_lane_highv4sf): Ditto.
25325 (aarch64_fmlalq_laneq_highv4sf): Ditto.
25326 (aarch64_fmlsl_laneq_highv4sf): Ditto.
25327 * config/aarch64/aarch64-simd.md:
25328 (aarch64_fml<f16mac1>l<f16quad>_low<mode>): New pattern.
25329 (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
25330 (aarch64_simd_fml<f16mac1>l<f16quad>_low<mode>): Ditto.
25331 (aarch64_simd_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
25332 (aarch64_fml<f16mac1>l_lane_lowv2sf): Ditto.
25333 (aarch64_fml<f16mac1>l_lane_highv2sf): Ditto.
25334 (aarch64_simd_fml<f16mac>l_lane_lowv2sf): Ditto.
25335 (aarch64_simd_fml<f16mac>l_lane_highv2sf): Ditto.
25336 (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Ditto.
25337 (aarch64_fml<f16mac1>lq_laneq_highv4sf): Ditto.
25338 (aarch64_simd_fml<f16mac>lq_laneq_lowv4sf): Ditto.
25339 (aarch64_simd_fml<f16mac>lq_laneq_highv4sf): Ditto.
25340 (aarch64_fml<f16mac1>l_laneq_lowv2sf): Ditto.
25341 (aarch64_fml<f16mac1>l_laneq_highv2sf): Ditto.
25342 (aarch64_simd_fml<f16mac>l_laneq_lowv2sf): Ditto.
25343 (aarch64_simd_fml<f16mac>l_laneq_highv2sf): Ditto.
25344 (aarch64_fml<f16mac1>lq_lane_lowv4sf): Ditto.
25345 (aarch64_fml<f16mac1>lq_lane_highv4sf): Ditto.
25346 (aarch64_simd_fml<f16mac>lq_lane_lowv4sf): Ditto.
25347 (aarch64_simd_fml<f16mac>lq_lane_highv4sf): Ditto.
25348 * config/aarch64/arm_neon.h (vfmlal_low_u32): New intrinsic.
25349 (vfmlsl_low_u32): Ditto.
25350 (vfmlalq_low_u32): Ditto.
25351 (vfmlslq_low_u32): Ditto.
25352 (vfmlal_high_u32): Ditto.
25353 (vfmlsl_high_u32): Ditto.
25354 (vfmlalq_high_u32): Ditto.
25355 (vfmlslq_high_u32): Ditto.
25356 (vfmlal_lane_low_u32): Ditto.
25357 (vfmlsl_lane_low_u32): Ditto.
25358 (vfmlal_laneq_low_u32): Ditto.
25359 (vfmlsl_laneq_low_u32): Ditto.
25360 (vfmlalq_lane_low_u32): Ditto.
25361 (vfmlslq_lane_low_u32): Ditto.
25362 (vfmlalq_laneq_low_u32): Ditto.
25363 (vfmlslq_laneq_low_u32): Ditto.
25364 (vfmlal_lane_high_u32): Ditto.
25365 (vfmlsl_lane_high_u32): Ditto.
25366 (vfmlal_laneq_high_u32): Ditto.
25367 (vfmlsl_laneq_high_u32): Ditto.
25368 (vfmlalq_lane_high_u32): Ditto.
25369 (vfmlslq_lane_high_u32): Ditto.
25370 (vfmlalq_laneq_high_u32): Ditto.
25371 (vfmlslq_laneq_high_u32): Ditto.
25372 * config/aarch64/aarch64.h (AARCH64_FL_F16SML): New flag.
25373 (AARCH64_FL_FOR_ARCH8_4): New.
25374 (AARCH64_ISA_F16FML): New ISA flag.
25375 (TARGET_F16FML): New feature flag for fp16fml.
25376 (doc/invoke.texi): Document new fp16fml option.
25378 2018-01-10 Michael Collison <michael.collison@arm.com>
25380 * config/aarch64/aarch64-builtins.c:
25381 (aarch64_types_ternopu_imm_qualifiers, TYPES_TERNOPUI): New.
25382 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
25383 (__ARM_FEATURE_SHA3): Define if TARGET_SHA3 is true.
25384 * config/aarch64/aarch64.h (AARCH64_FL_SHA3): New flags.
25385 (AARCH64_ISA_SHA3): New ISA flag.
25386 (TARGET_SHA3): New feature flag for sha3.
25387 * config/aarch64/iterators.md (sha512_op): New int attribute.
25388 (CRYPTO_SHA512): New int iterator.
25389 (UNSPEC_SHA512H): New unspec.
25390 (UNSPEC_SHA512H2): Ditto.
25391 (UNSPEC_SHA512SU0): Ditto.
25392 (UNSPEC_SHA512SU1): Ditto.
25393 * config/aarch64/aarch64-simd-builtins.def
25394 (aarch64_crypto_sha512hqv2di): New builtin.
25395 (aarch64_crypto_sha512h2qv2di): Ditto.
25396 (aarch64_crypto_sha512su0qv2di): Ditto.
25397 (aarch64_crypto_sha512su1qv2di): Ditto.
25398 (aarch64_eor3qv8hi): Ditto.
25399 (aarch64_rax1qv2di): Ditto.
25400 (aarch64_xarqv2di): Ditto.
25401 (aarch64_bcaxqv8hi): Ditto.
25402 * config/aarch64/aarch64-simd.md:
25403 (aarch64_crypto_sha512h<sha512_op>qv2di): New pattern.
25404 (aarch64_crypto_sha512su0qv2di): Ditto.
25405 (aarch64_crypto_sha512su1qv2di): Ditto.
25406 (aarch64_eor3qv8hi): Ditto.
25407 (aarch64_rax1qv2di): Ditto.
25408 (aarch64_xarqv2di): Ditto.
25409 (aarch64_bcaxqv8hi): Ditto.
25410 * config/aarch64/arm_neon.h (vsha512hq_u64): New intrinsic.
25411 (vsha512h2q_u64): Ditto.
25412 (vsha512su0q_u64): Ditto.
25413 (vsha512su1q_u64): Ditto.
25414 (veor3q_u16): Ditto.
25415 (vrax1q_u64): Ditto.
25416 (vxarq_u64): Ditto.
25417 (vbcaxq_u16): Ditto.
25418 * config/arm/types.md (crypto_sha512): New type attribute.
25419 (crypto_sha3): Ditto.
25420 (doc/invoke.texi): Document new sha3 option.
25422 2018-01-10 Michael Collison <michael.collison@arm.com>
25424 * config/aarch64/aarch64-builtins.c:
25425 (aarch64_types_quadopu_imm_qualifiers, TYPES_QUADOPUI): New.
25426 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
25427 (__ARM_FEATURE_SM3): Define if TARGET_SM4 is true.
25428 (__ARM_FEATURE_SM4): Define if TARGET_SM4 is true.
25429 * config/aarch64/aarch64.h (AARCH64_FL_SM4): New flags.
25430 (AARCH64_ISA_SM4): New ISA flag.
25431 (TARGET_SM4): New feature flag for sm4.
25432 * config/aarch64/aarch64-simd-builtins.def
25433 (aarch64_sm3ss1qv4si): Ditto.
25434 (aarch64_sm3tt1aq4si): Ditto.
25435 (aarch64_sm3tt1bq4si): Ditto.
25436 (aarch64_sm3tt2aq4si): Ditto.
25437 (aarch64_sm3tt2bq4si): Ditto.
25438 (aarch64_sm3partw1qv4si): Ditto.
25439 (aarch64_sm3partw2qv4si): Ditto.
25440 (aarch64_sm4eqv4si): Ditto.
25441 (aarch64_sm4ekeyqv4si): Ditto.
25442 * config/aarch64/aarch64-simd.md:
25443 (aarch64_sm3ss1qv4si): Ditto.
25444 (aarch64_sm3tt<sm3tt_op>qv4si): Ditto.
25445 (aarch64_sm3partw<sm3part_op>qv4si): Ditto.
25446 (aarch64_sm4eqv4si): Ditto.
25447 (aarch64_sm4ekeyqv4si): Ditto.
25448 * config/aarch64/iterators.md (sm3tt_op): New int iterator.
25449 (sm3part_op): Ditto.
25450 (CRYPTO_SM3TT): Ditto.
25451 (CRYPTO_SM3PART): Ditto.
25452 (UNSPEC_SM3SS1): New unspec.
25453 (UNSPEC_SM3TT1A): Ditto.
25454 (UNSPEC_SM3TT1B): Ditto.
25455 (UNSPEC_SM3TT2A): Ditto.
25456 (UNSPEC_SM3TT2B): Ditto.
25457 (UNSPEC_SM3PARTW1): Ditto.
25458 (UNSPEC_SM3PARTW2): Ditto.
25459 (UNSPEC_SM4E): Ditto.
25460 (UNSPEC_SM4EKEY): Ditto.
25461 * config/aarch64/constraints.md (Ui2): New constraint.
25462 * config/aarch64/predicates.md (aarch64_imm2): New predicate.
25463 * config/arm/types.md (crypto_sm3): New type attribute.
25464 (crypto_sm4): Ditto.
25465 * config/aarch64/arm_neon.h (vsm3ss1q_u32): New intrinsic.
25466 (vsm3tt1aq_u32): Ditto.
25467 (vsm3tt1bq_u32): Ditto.
25468 (vsm3tt2aq_u32): Ditto.
25469 (vsm3tt2bq_u32): Ditto.
25470 (vsm3partw1q_u32): Ditto.
25471 (vsm3partw2q_u32): Ditto.
25472 (vsm4eq_u32): Ditto.
25473 (vsm4ekeyq_u32): Ditto.
25474 (doc/invoke.texi): Document new sm4 option.
25476 2018-01-10 Michael Collison <michael.collison@arm.com>
25478 * config/aarch64/aarch64-arches.def (armv8.4-a): New architecture.
25479 * config/aarch64/aarch64.h (AARCH64_ISA_V8_4): New ISA flag.
25480 (AARCH64_FL_FOR_ARCH8_4): New.
25481 (AARCH64_FL_V8_4): New flag.
25482 (doc/invoke.texi): Document new armv8.4-a option.
25484 2018-01-10 Michael Collison <michael.collison@arm.com>
25486 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
25487 (__ARM_FEATURE_AES): Define if TARGET_AES is true.
25488 (__ARM_FEATURE_SHA2): Define if TARGET_SHA2 is true.
25489 * config/aarch64/aarch64-option-extension.def: Add
25490 AARCH64_OPT_EXTENSION of 'sha2'.
25491 (aes): Add AARCH64_OPT_EXTENSION of 'aes'.
25492 (crypto): Disable sha2 and aes if crypto disabled.
25493 (crypto): Enable aes and sha2 if enabled.
25494 (simd): Disable sha2 and aes if simd disabled.
25495 * config/aarch64/aarch64.h (AARCH64_FL_AES, AARCH64_FL_SHA2):
25497 (AARCH64_ISA_AES, AARCH64_ISA_SHA2): New ISA flags.
25498 (TARGET_SHA2): New feature flag for sha2.
25499 (TARGET_AES): New feature flag for aes.
25500 * config/aarch64/aarch64-simd.md:
25501 (aarch64_crypto_aes<aes_op>v16qi): Make pattern
25502 conditional on TARGET_AES.
25503 (aarch64_crypto_aes<aesmc_op>v16qi): Ditto.
25504 (aarch64_crypto_sha1hsi): Make pattern conditional
25506 (aarch64_crypto_sha1hv4si): Ditto.
25507 (aarch64_be_crypto_sha1hv4si): Ditto.
25508 (aarch64_crypto_sha1su1v4si): Ditto.
25509 (aarch64_crypto_sha1<sha1_op>v4si): Ditto.
25510 (aarch64_crypto_sha1su0v4si): Ditto.
25511 (aarch64_crypto_sha256h<sha256_op>v4si): Ditto.
25512 (aarch64_crypto_sha256su0v4si): Ditto.
25513 (aarch64_crypto_sha256su1v4si): Ditto.
25514 (doc/invoke.texi): Document new aes and sha2 options.
25516 2018-01-10 Martin Sebor <msebor@redhat.com>
25518 PR tree-optimization/83781
25519 * gimple-fold.c (get_range_strlen): Avoid treating arrays of pointers
25522 2018-01-11 Martin Sebor <msebor@gmail.com>
25523 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
25525 PR tree-optimization/83501
25526 PR tree-optimization/81703
25528 * tree-ssa-strlen.c (get_string_cst): Rename...
25529 (get_string_len): ...to this. Handle global constants.
25530 (handle_char_store): Adjust.
25532 2018-01-10 Kito Cheng <kito.cheng@gmail.com>
25533 Jim Wilson <jimw@sifive.com>
25535 * config/riscv/riscv-protos.h (riscv_output_return): New.
25536 * config/riscv/riscv.c (struct machine_function): New naked_p field.
25537 (riscv_attribute_table, riscv_output_return),
25538 (riscv_handle_fndecl_attribute, riscv_naked_function_p),
25539 (riscv_allocate_stack_slots_for_args, riscv_warn_func_return): New.
25540 (riscv_compute_frame_info): Only compute frame->mask if not a naked
25542 (riscv_expand_prologue): Add early return for naked function.
25543 (riscv_expand_epilogue): Likewise.
25544 (riscv_function_ok_for_sibcall): Return false for naked function.
25545 (riscv_set_current_function): New.
25546 (TARGET_SET_CURRENT_FUNCTION, TARGET_ALLOCATE_STACK_SLOTS_FOR_ARGS),
25547 (TARGET_ATTRIBUTE_TABLE, TARGET_WARN_FUNC_RETURN): New.
25548 * config/riscv/riscv.md (simple_return): Call riscv_output_return.
25549 * doc/extend.texi (RISC-V Function Attributes): New.
25551 2018-01-10 Michael Meissner <meissner@linux.vnet.ibm.com>
25553 * config/rs6000/rs6000.c (is_complex_IBM_long_double): Explicitly
25554 check for 128-bit long double before checking TCmode.
25555 * config/rs6000/rs6000.h (FLOAT128_IEEE_P): Explicitly check for
25556 128-bit long doubles before checking TFmode or TCmode.
25557 (FLOAT128_IBM_P): Likewise.
25559 2018-01-10 Martin Sebor <msebor@redhat.com>
25561 PR tree-optimization/83671
25562 * builtins.c (c_strlen): Unconditionally return zero for the empty
25564 Use -Warray-bounds for warnings.
25565 * gimple-fold.c (get_range_strlen): Handle non-constant lengths
25566 for non-constant array indices with COMPONENT_REF, arrays of
25567 arrays, and pointers to arrays.
25568 (gimple_fold_builtin_strlen): Determine and set length range for
25569 non-constant character arrays.
25571 2018-01-10 Aldy Hernandez <aldyh@redhat.com>
25573 PR middle-end/81897
25574 * tree-ssa-uninit.c (convert_control_dep_chain_into_preds): Skip
25577 2018-01-10 Eric Botcazou <ebotcazou@adacore.com>
25579 * dwarf2out.c (dwarf2out_var_location): Do not pass NULL to fprintf.
25581 2018-01-10 Peter Bergner <bergner@vnet.ibm.com>
25584 * config/rs6000/rs6000.c (print_operand) <'y'>: Use
25585 VECTOR_MEM_ALTIVEC_OR_VSX_P.
25586 * config/rs6000/vsx.md (*vsx_le_perm_load_<mode> for VSX_D): Use
25587 indexed_or_indirect_operand predicate.
25588 (*vsx_le_perm_load_<mode> for VSX_W): Likewise.
25589 (*vsx_le_perm_load_v8hi): Likewise.
25590 (*vsx_le_perm_load_v16qi): Likewise.
25591 (*vsx_le_perm_store_<mode> for VSX_D): Likewise.
25592 (*vsx_le_perm_store_<mode> for VSX_W): Likewise.
25593 (*vsx_le_perm_store_v8hi): Likewise.
25594 (*vsx_le_perm_store_v16qi): Likewise.
25595 (eight unnamed splitters): Likewise.
25597 2018-01-10 Peter Bergner <bergner@vnet.ibm.com>
25599 * config/rs6000/x86intrin.h: Change #warning to #error. Update message.
25600 * config/rs6000/emmintrin.h: Likewise.
25601 * config/rs6000/mmintrin.h: Likewise.
25602 * config/rs6000/xmmintrin.h: Likewise.
25604 2018-01-10 David Malcolm <dmalcolm@redhat.com>
25607 * tree-core.h: Document EXPR_LOCATION_WRAPPER_P's usage of
25609 * tree.c (tree_nop_conversion): Return true for location wrapper
25611 (maybe_wrap_with_location): New function.
25612 (selftest::check_strip_nops): New function.
25613 (selftest::test_location_wrappers): New function.
25614 (selftest::tree_c_tests): Call it.
25615 * tree.h (STRIP_ANY_LOCATION_WRAPPER): New macro.
25616 (maybe_wrap_with_location): New decl.
25617 (EXPR_LOCATION_WRAPPER_P): New macro.
25618 (location_wrapper_p): New inline function.
25619 (tree_strip_any_location_wrapper): New inline function.
25621 2018-01-10 H.J. Lu <hongjiu.lu@intel.com>
25624 * config/i386/i386.c (ix86_compute_frame_layout): Always adjust
25625 stack_realign_offset for the largest alignment of stack slot
25627 (ix86_find_max_used_stack_alignment): New function.
25628 (ix86_finalize_stack_frame_flags): Use it. Set
25629 max_used_stack_alignment if we don't realign stack.
25630 * config/i386/i386.h (machine_function): Add
25631 max_used_stack_alignment.
25633 2018-01-10 Christophe Lyon <christophe.lyon@linaro.org>
25635 * config/arm/arm.opt (-mbranch-cost): New option.
25636 * config/arm/arm.h (BRANCH_COST): Take arm_branch_cost into
25639 2018-01-10 Segher Boessenkool <segher@kernel.crashing.org>
25642 * config/rs6000/rs6000.md (load_toc_v4_PIC_2, load_toc_v4_PIC_3b,
25643 load_toc_v4_PIC_3c): Wrap const term in CONST RTL.
25645 2018-01-10 Richard Biener <rguenther@suse.de>
25648 * dwarf2out.c (gen_subprogram_die): Hoist old_die && declaration
25649 early out so it also covers the case where we have a non-NULL
25652 2018-01-10 Richard Sandiford <richard.sandiford@linaro.org>
25654 PR tree-optimization/83753
25655 * tree-vect-stmts.c (get_group_load_store_type): Use VMAT_CONTIGUOUS
25656 for non-strided grouped accesses if the number of elements is 1.
25658 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
25661 * i386.c (ix86_vectorize_builtin_gather): Check TARGET_USE_GATHER.
25662 * i386.h (TARGET_USE_GATHER): Define.
25663 * x86-tune.def (X86_TUNE_USE_GATHER): New.
25665 2018-01-10 Martin Liska <mliska@suse.cz>
25668 * basic-block.h (CLEANUP_NO_PARTITIONING): New define.
25669 * bb-reorder.c (pass_reorder_blocks::execute): Do not clean up
25671 * cfgcleanup.c (try_optimize_cfg): Fix up partitioning if
25672 CLEANUP_NO_PARTITIONING is not set.
25674 2018-01-10 Richard Sandiford <richard.sandiford@linaro.org>
25676 * doc/rtl.texi: Remove documentation of (const ...) wrappers
25677 for vectors, as a partial revert of r254296.
25678 * rtl.h (const_vec_p): Delete.
25679 (const_vec_duplicate_p): Don't test for vector CONSTs.
25680 (unwrap_const_vec_duplicate, const_vec_series_p): Likewise.
25681 * expmed.c (make_tree): Likewise.
25684 * common.md (E, F): Use CONSTANT_P instead of checking for
25686 * emit-rtl.c (gen_lowpart_common): Use const_vec_p instead of
25687 checking for CONST_VECTOR.
25689 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
25691 PR middle-end/83575
25692 * predict.c (force_edge_cold): Handle in more sane way edges
25693 with no prediction.
25695 2018-01-09 Carl Love <cel@us.ibm.com>
25697 * config/rs6002/altivec.md (p8_vmrgow): Add support for V2DI, V2DF,
25699 (p8_vmrgew): Add support for V2DI, V2DF, V4SF types.
25700 * config/rs6000/rs6000-builtin.def: Add definitions for FLOAT2_V2DF,
25701 VMRGEW_V2DI, VMRGEW_V2DF, VMRGEW_V4SF, VMRGOW_V4SI, VMRGOW_V4SF,
25702 VMRGOW_V2DI, VMRGOW_V2DF. Remove definition for VMRGOW.
25703 * config/rs6000/rs6000-c.c (VSX_BUILTIN_VEC_FLOAT2,
25704 P8V_BUILTIN_VEC_VMRGEW, P8V_BUILTIN_VEC_VMRGOW): Add definitions.
25705 * config/rs6000/rs6000-protos.h: Add extern defition for
25706 rs6000_generate_float2_double_code.
25707 * config/rs6000/rs6000.c (rs6000_generate_float2_double_code): Add
25709 * config/rs6000/vsx.md (vsx_xvcdpsp): Add define_insn.
25710 (float2_v2df): Add define_expand.
25712 2018-01-09 Uros Bizjak <ubizjak@gmail.com>
25715 * combine.c (force_int_to_mode) <case ASHIFT>: Use mode instead of
25716 op_mode in the force_to_mode call.
25718 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
25720 * config/aarch64/aarch64.c (aarch64_evpc_trn): Use d.perm.series_p
25721 instead of checking each element individually.
25722 (aarch64_evpc_uzp): Likewise.
25723 (aarch64_evpc_zip): Likewise.
25724 (aarch64_evpc_ext): Likewise.
25725 (aarch64_evpc_rev): Likewise.
25726 (aarch64_evpc_dup): Test the encoding for a single duplicated element,
25727 instead of checking each element individually. Return true without
25729 (aarch64_vectorize_vec_perm_const): Use all_from_input_p to test
25730 whether all selected elements come from the same input, instead of
25731 checking each element individually. Remove calls to gen_rtx_REG,
25732 start_sequence and end_sequence and instead assert that no rtl is
25735 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
25737 * config/aarch64/aarch64.c (aarch64_legitimate_constant_p): Fix
25738 order of HIGH and CONST checks.
25740 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
25742 * tree-vect-stmts.c (permute_vec_elements): Create a fresh variable
25743 if the destination isn't an SSA_NAME.
25745 2018-01-09 Richard Biener <rguenther@suse.de>
25747 PR tree-optimization/83668
25748 * graphite.c (canonicalize_loop_closed_ssa): Add edge argument,
25750 (canonicalize_loop_form): ... here, renamed from ...
25751 (canonicalize_loop_closed_ssa_form): ... this and amended to
25752 swap successor edges for loop exit blocks to make us use
25753 the RPO order we need for initial schedule generation.
25755 2018-01-09 Joseph Myers <joseph@codesourcery.com>
25757 PR tree-optimization/64811
25758 * match.pd: When optimizing comparisons with Inf, avoid
25759 introducing or losing exceptions from comparisons with NaN.
25761 2018-01-09 Martin Liska <mliska@suse.cz>
25764 * asan.c (shadow_mem_size): Add gcc_assert.
25766 2018-01-09 Georg-Johann Lay <avr@gjlay.de>
25768 Don't save registers in main().
25771 * doc/invoke.texi (AVR Options) [-mmain-is-OS_task]: Document it.
25772 * config/avr/avr.opt (-mmain-is-OS_task): New target option.
25773 * config/avr/avr.c (avr_set_current_function): Don't error if
25774 naked, OS_task or OS_main are specified at the same time.
25775 (avr_function_ok_for_sibcall): Don't disable sibcalls for OS_task,
25777 (avr_insert_attributes) [-mmain-is-OS_task] <main>: Add OS_task
25779 * common/config/avr/avr-common.c (avr_option_optimization_table):
25780 Switch on -mmain-is-OS_task for optimizing compilations.
25782 2018-01-09 Richard Biener <rguenther@suse.de>
25784 PR tree-optimization/83572
25785 * graphite.c: Include cfganal.h.
25786 (graphite_transform_loops): Connect infinite loops to exit
25787 and remove fake edges at the end.
25789 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
25791 * ipa-inline.c (edge_badness): Revert accidental checkin.
25793 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
25796 * ipa-comdats.c (set_comdat_group): Only set comdat group of real
25797 symbols; not inline clones.
25799 2018-01-09 Jakub Jelinek <jakub@redhat.com>
25802 * modulo-sched.c (schedule_reg_moves): Punt if we'd need to move
25803 hard registers. Formatting fixes.
25805 PR preprocessor/83722
25806 * gcc.c (try_generate_repro): Pass
25807 &temp_stderr_files[RETRY_ICE_ATTEMPTS - 1] rather than
25808 &temp_stdout_files[RETRY_ICE_ATTEMPTS - 1] as last argument to
25811 2018-01-08 Monk Chiang <sh.chiang04@gmail.com>
25812 Kito Cheng <kito.cheng@gmail.com>
25814 * config/riscv/riscv.c (machine_function::is_leaf): Remove field.
25815 (riscv_leaf_function_p): Delete.
25816 (riscv_function_ok_for_sibcall): Return false when TARGET_SAVE_RESTORE.
25818 2018-01-08 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
25820 * config/rs6000/rs6000-string.c (do_load_for_compare_from_addr): New
25822 (do_ifelse): New function.
25823 (do_isel): New function.
25824 (do_sub3): New function.
25825 (do_add3): New function.
25826 (do_load_mask_compare): New function.
25827 (do_overlap_load_compare): New function.
25828 (expand_compare_loop): New function.
25829 (expand_block_compare): Call expand_compare_loop() when appropriate.
25830 * config/rs6000/rs6000.opt (-mblock-compare-inline-limit): Change
25831 option description.
25832 (-mblock-compare-inline-loop-limit): New option.
25834 2018-01-08 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
25837 * config/rs6000/altivec.md (*altivec_vpermr_<mode>_internal):
25838 Reverse order of second and third operands in first alternative.
25839 * config/rs6000/rs6000.c (rs6000_expand_vector_set): Reverse order
25840 of first and second elements in UNSPEC_VPERMR vector.
25841 (altivec_expand_vec_perm_le): Likewise.
25843 2018-01-08 Jeff Law <law@redhat.com>
25845 PR rtl-optimizatin/81308
25846 * tree-switch-conversion.c (cfg_altered): New file scoped static.
25847 (process_switch): If group_case_labels makes a change, then set
25849 (pass_convert_switch::execute): If a switch is converted, then
25850 set cfg_altered. Return TODO_cfg_cleanup if cfg_altered is true.
25852 PR rtl-optimization/81308
25853 * recog.c (split_all_insns): Conditionally cleanup the CFG after
25856 2018-01-08 Vidya Praveen <vidyapraveen@arm.com>
25858 PR target/83663 - Revert r255946
25859 * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify code
25860 generation for cases where splatting a value is not useful.
25861 * simplify-rtx.c (simplify_ternary_operation): Simplify vec_merge
25862 across a vec_duplicate and a paradoxical subreg forming a vector
25863 mode to a vec_concat.
25865 2018-01-08 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
25867 * config/arm/t-aprofile (MULTILIB_MATCHES): Add mapping rules for
25868 -march=armv8.3-a variants.
25869 * config/arm/t-multilib: Likewise.
25870 * config/arm/t-arm-elf: Likewise. Handle dotprod extension.
25872 2018-01-08 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
25874 * config/rs6000/rs6000.md (cceq_ior_compare): Remove * so I can use it
25876 (cceq_ior_compare_complement): Give it a name so I can use it, and
25877 change boolean_or_operator predicate to boolean_operator so it can
25878 be used to generate a crand.
25879 (eqne): New code iterator.
25880 (bd/bd_neg): New code_attrs.
25881 (<bd>_<mode>): New name for ctr<mode>_internal[12] now combined into
25882 a single define_insn.
25883 (<bd>tf_<mode>): A new insn pattern for the conditional form branch
25884 decrement (bdnzt/bdnzf/bdzt/bdzf).
25885 * config/rs6000/rs6000.c (rs6000_legitimate_combined_insn): Updated
25886 with the new names of the branch decrement patterns, and added the
25887 names of the branch decrement conditional patterns.
25889 2018-01-08 Richard Biener <rguenther@suse.de>
25891 PR tree-optimization/83563
25892 * graphite.c (canonicalize_loop_closed_ssa_form): Reset the SCEV
25895 2018-01-08 Richard Biener <rguenther@suse.de>
25897 PR middle-end/83713
25898 * convert.c (do_narrow): Properly guard TYPE_OVERFLOW_WRAPS checks.
25900 2018-01-08 Richard Biener <rguenther@suse.de>
25902 PR tree-optimization/83685
25903 * tree-ssa-pre.c (create_expression_by_pieces): Do not insert
25904 references to abnormals.
25906 2018-01-08 Richard Biener <rguenther@suse.de>
25909 * dwarf2out.c (output_indirect_strings): Handle empty
25910 skeleton_debug_str_hash.
25911 (dwarf2out_early_finish): Index strings for -gsplit-dwarf.
25913 2018-01-08 Claudiu Zissulescu <claziss@synopsys.com>
25915 * config/arc/arc.c (TARGET_TRAMPOLINE_ADJUST_ADDRESS): Delete.
25916 (emit_store_direct): Likewise.
25917 (arc_trampoline_adjust_address): Likewise.
25918 (arc_asm_trampoline_template): New function.
25919 (arc_initialize_trampoline): Use asm_trampoline_template.
25920 (TARGET_ASM_TRAMPOLINE_TEMPLATE): Define.
25921 * config/arc/arc.h (TRAMPOLINE_SIZE): Adjust to 16.
25922 * config/arc/arc.md (flush_icache): Delete pattern.
25924 2018-01-08 Claudiu Zissulescu <claziss@synopsys.com>
25926 * config/arc/arc-c.def (__ARC_UNALIGNED__): New define.
25927 * config/arc/arc.h (STRICT_ALIGNMENT): Control this macro using
25930 2018-01-08 Sebastian Huber <sebastian.huber@embedded-brains.de>
25933 * config/epiphany/epiphany.h (make_pass_mode_switch_use): Guard
25934 by not USED_FOR_TARGET.
25935 (make_pass_resolve_sw_modes): Likewise.
25937 2018-01-08 Sebastian Huber <sebastian.huber@embedded-brains.de>
25939 * config/nios2/nios2.h (nios2_section_threshold): Guard by not
25942 2018-01-08 Richard Biener <rguenther@suse.de>
25944 PR middle-end/83580
25945 * tree-data-ref.c (split_constant_offset): Remove STRIP_NOPS.
25947 2018-01-08 Richard Biener <rguenther@suse.de>
25949 PR middle-end/83517
25950 * match.pd ((t * 2) / 2) -> t): Add missing :c.
25952 2018-01-06 Aldy Hernandez <aldyh@redhat.com>
25954 PR middle-end/81897
25955 * tree-ssa-uninit.c (compute_control_dep_chain): Do not bail on
25956 basic blocks with a small number of successors.
25957 (convert_control_dep_chain_into_preds): Improve handling of
25959 (dump_predicates): Split apart into...
25960 (dump_pred_chain): ...here...
25961 (dump_pred_info): ...and here.
25962 (can_one_predicate_be_invalidated_p): Add debugging printfs.
25963 (can_chain_union_be_invalidated_p): Improve check for invalidation
25965 (uninit_uses_cannot_happen): Avoid unnecessary if
25966 convert_control_dep_chain_into_preds yielded nothing.
25968 2018-01-06 Martin Sebor <msebor@redhat.com>
25970 PR tree-optimization/83640
25971 * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Avoid
25972 subtracting negative offset from size.
25973 (builtin_access::overlap): Adjust offset bounds of the access to fall
25974 within the size of the object if possible.
25976 2018-01-06 Richard Sandiford <richard.sandiford@linaro.org>
25978 PR rtl-optimization/83699
25979 * expmed.c (extract_bit_field_1): Restrict the vector usage of
25980 extract_bit_field_as_subreg to cases in which the extracted
25981 value is also a vector.
25983 * lra-constraints.c (process_alt_operands): Test for the equivalence
25984 substitutions when detecting a possible reload cycle.
25986 2018-01-06 Jakub Jelinek <jakub@redhat.com>
25989 * toplev.c (process_options): Don't enable debug_nonbind_markers_p
25990 by default if flag_selective_schedling{,2}. Formatting fixes.
25992 PR rtl-optimization/83682
25993 * rtl.h (const_vec_duplicate_p): Only return true for VEC_DUPLICATE
25994 if it has non-VECTOR_MODE element mode.
25995 (vec_duplicate_p): Likewise.
25997 PR middle-end/83694
25998 * cfgexpand.c (expand_debug_expr): Punt if mode1 is VOIDmode
25999 and bitsize might be greater than MAX_BITSIZE_MODE_ANY_INT.
26001 2018-01-05 Jakub Jelinek <jakub@redhat.com>
26004 * config/i386/i386-builtin.def
26005 (__builtin_ia32_vgf2p8affineinvqb_v64qi,
26006 __builtin_ia32_vgf2p8affineqb_v64qi, __builtin_ia32_vgf2p8mulb_v64qi):
26007 Require also OPTION_MASK_ISA_AVX512F in addition to
26008 OPTION_MASK_ISA_GFNI.
26009 (__builtin_ia32_vgf2p8affineinvqb_v16qi_mask,
26010 __builtin_ia32_vgf2p8affineqb_v16qi_mask): Require
26011 OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_SSE in addition
26012 to OPTION_MASK_ISA_GFNI.
26013 (__builtin_ia32_vgf2p8mulb_v32qi_mask): Require
26014 OPTION_MASK_ISA_AVX512VL in addition to OPTION_MASK_ISA_GFNI and
26015 OPTION_MASK_ISA_AVX512BW.
26016 (__builtin_ia32_vgf2p8mulb_v16qi_mask): Require
26017 OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_AVX512BW in
26018 addition to OPTION_MASK_ISA_GFNI.
26019 (__builtin_ia32_vgf2p8affineinvqb_v16qi,
26020 __builtin_ia32_vgf2p8affineqb_v16qi, __builtin_ia32_vgf2p8mulb_v16qi):
26021 Require OPTION_MASK_ISA_SSE2 instead of OPTION_MASK_ISA_SSE in addition
26022 to OPTION_MASK_ISA_GFNI.
26023 * config/i386/i386.c (def_builtin): Change to builtin isa/isa2 being
26024 a requirement for all ISAs rather than any of them with a few
26026 (ix86_add_new_builtins): Clear OPTION_MASK_ISA_64BIT from isa before
26028 (ix86_expand_builtin): Require all ISAs from builtin's isa and isa2
26029 bitmasks to be enabled with 3 exceptions, instead of requiring any
26030 enabled ISA with lots of exceptions.
26031 * config/i386/sse.md (vgf2p8affineinvqb_<mode><mask_name>,
26032 vgf2p8affineqb_<mode><mask_name>, vgf2p8mulb_<mode><mask_name>):
26033 Change avx512bw in isa attribute to avx512f.
26034 * config/i386/sgxintrin.h: Add license boilerplate.
26035 * config/i386/vaesintrin.h: Likewise. Fix macro spelling __AVX512F
26036 to __AVX512F__ and __AVX512VL to __AVX512VL__.
26037 (_mm256_aesdec_epi128, _mm256_aesdeclast_epi128, _mm256_aesenc_epi128,
26038 _mm256_aesenclast_epi128): Enable temporarily avx if __AVX__ is not
26040 * config/i386/gfniintrin.h (_mm_gf2p8mul_epi8,
26041 _mm_gf2p8affineinv_epi64_epi8, _mm_gf2p8affine_epi64_epi8): Enable
26042 temporarily sse2 rather than sse if not enabled already.
26045 * config/i386/sse.md (VI248_VLBW): Rename to ...
26046 (VI248_AVX512VL): ... this. Don't guard V32HI with TARGET_AVX512BW.
26047 (vpshrd_<mode><mask_name>, vpshld_<mode><mask_name>,
26048 vpshrdv_<mode>, vpshrdv_<mode>_mask, vpshrdv_<mode>_maskz,
26049 vpshrdv_<mode>_maskz_1, vpshldv_<mode>, vpshldv_<mode>_mask,
26050 vpshldv_<mode>_maskz, vpshldv_<mode>_maskz_1): Use VI248_AVX512VL
26051 mode iterator instead of VI248_VLBW.
26053 2018-01-05 Jan Hubicka <hubicka@ucw.cz>
26055 * ipa-fnsummary.c (record_modified_bb_info): Add OP.
26056 (record_modified): Skip clobbers; add debug output.
26057 (param_change_prob): Use sreal frequencies.
26059 2018-01-05 Richard Sandiford <richard.sandiford@linaro.org>
26061 * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Don't
26062 punt for user-aligned variables.
26064 2018-01-05 Richard Sandiford <richard.sandiford@linaro.org>
26066 * tree-chrec.c (chrec_contains_symbols): Return true for
26069 2018-01-05 Sudakshina Das <sudi.das@arm.com>
26072 * simplify-rtx.c (simplify_relational_operation_1): Add simplifications
26073 of (x|y) == x for BICS pattern.
26075 2018-01-05 Jakub Jelinek <jakub@redhat.com>
26077 PR tree-optimization/83605
26078 * gimple-ssa-strength-reduction.c: Include tree-eh.h.
26079 (find_candidates_dom_walker::before_dom_children): Ignore stmts that
26082 2018-01-05 Sebastian Huber <sebastian.huber@embedded-brains.de>
26084 * config.gcc (epiphany-*-elf*): Add (epiphany-*-rtems*) configuration.
26085 * config/epiphany/rtems.h: New file.
26087 2018-01-04 Jakub Jelinek <jakub@redhat.com>
26088 Uros Bizjak <ubizjak@gmail.com>
26091 * config/i386/i386.md (*<rotate_insn>hi3_1 splitter): Use
26092 QIreg_operand instead of register_operand predicate.
26093 * config/i386/i386.c (ix86_rop_should_change_byte_p,
26094 set_rop_modrm_reg_bits, ix86_mitigate_rop): Use -mmitigate-rop in
26095 comments instead of -fmitigate[-_]rop.
26097 2018-01-04 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
26100 * cgraphunit.c (symbol_table::compile): Switch to text_section
26101 before calling assembly_start debug hook.
26102 * run-rtl-passes.c (run_rtl_passes): Likewise.
26105 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
26107 * tree-vrp.c (extract_range_from_binary_expr_1): Check
26108 range_int_cst_p rather than !symbolic_range_p before calling
26109 extract_range_from_multiplicative_op_1.
26111 2018-01-04 Jeff Law <law@redhat.com>
26113 * tree-ssa-math-opts.c (execute_cse_reciprocals_1): Remove
26114 redundant test in assertion.
26116 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
26118 * doc/rtl.texi: Document machine_mode wrapper classes.
26120 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
26122 * fold-const.c (fold_ternary_loc): Check tree_fits_uhwi_p before
26123 using tree_to_uhwi.
26125 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
26127 * tree-ssa-forwprop.c (is_combined_permutation_identity): Allow
26128 the VEC_PERM_EXPR fold to fail.
26130 2018-01-04 Jakub Jelinek <jakub@redhat.com>
26133 * bb-reorder.c (insert_section_boundary_note): Set has_bb_partition
26134 to switched_sections.
26136 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
26139 * config/arm/arm.c (arm_vectorize_vec_perm_const): Fix inverted
26140 test for d.testing.
26142 2018-01-04 Peter Bergner <bergner@vnet.ibm.com>
26145 * config/rs6000/rs6000.c (rs6000_discover_homogeneous_aggregate): Do not
26146 allow arguments in FP registers if TARGET_HARD_FLOAT is false.
26148 2018-01-04 Jakub Jelinek <jakub@redhat.com>
26151 * cfgexpand.c (expand_debug_expr) <case BIT_FIELD_REF>: Punt if mode
26152 is BLKmode and bitpos not zero or mode change is needed.
26154 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
26157 * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): Require
26160 2018-01-04 Uros Bizjak <ubizjak@gmail.com>
26163 * config/alpha/alpha.md (*sadd<modesuffix>): Use ASHIFT
26164 instead of MULT rtx. Update all corresponding splitters.
26165 (*saddl_se): Ditto.
26166 (*ssub<modesuffix>): Ditto.
26167 (*ssubl_se): Ditto.
26168 (*cmp_sadd_di): Update split patterns.
26169 (*cmp_sadd_si): Ditto.
26170 (*cmp_sadd_sidi): Ditto.
26171 (*cmp_ssub_di): Ditto.
26172 (*cmp_ssub_si): Ditto.
26173 (*cmp_ssub_sidi): Ditto.
26174 * config/alpha/predicates.md (const23_operand): New predicate.
26175 * config/alpha/alpha.c (alpha_rtx_costs) [PLUS, MINUS]:
26176 Look for ASHIFT, not MULT inner operand.
26177 (alpha_split_conditional_move): Update for *sadd<modesuffix> change.
26179 2018-01-04 Martin Liska <mliska@suse.cz>
26181 PR gcov-profile/83669
26182 * gcov.c (output_intermediate_file): Add version to intermediate
26184 * doc/gcov.texi: Document new field 'version' in intermediate
26185 file format. Fix location of '-k' option of gcov command.
26187 2018-01-04 Martin Liska <mliska@suse.cz>
26190 * ipa-icf.c (sem_function::merge): Do not cross comdat boundary.
26192 2018-01-04 Jakub Jelinek <jakub@redhat.com>
26194 * gimple-ssa-sprintf.c (parse_directive): Cast second dir.len to uhwi.
26196 2018-01-03 Martin Sebor <msebor@redhat.com>
26198 PR tree-optimization/83655
26199 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call): Avoid
26200 checking calls with invalid arguments.
26202 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
26204 * tree-vect-stmts.c (vect_get_store_rhs): New function.
26205 (vectorizable_mask_load_store): Delete.
26206 (vectorizable_call): Return false for masked loads and stores.
26207 (vectorizable_store): Handle IFN_MASK_STORE. Use vect_get_store_rhs
26208 instead of gimple_assign_rhs1.
26209 (vectorizable_load): Handle IFN_MASK_LOAD.
26210 (vect_transform_stmt): Don't set is_store for call_vec_info_type.
26212 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
26214 * tree-vect-stmts.c (vect_build_gather_load_calls): New function,
26216 (vectorizable_mask_load_store): ...here.
26217 (vectorizable_load): ...and here.
26219 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
26221 * tree-vect-stmts.c (vect_build_all_ones_mask)
26222 (vect_build_zero_merge_argument): New functions, split out from...
26223 (vectorizable_load): ...here.
26225 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
26227 * tree-vect-stmts.c (vect_check_store_rhs): New function,
26229 (vectorizable_mask_load_store): ...here.
26230 (vectorizable_store): ...and here.
26232 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
26234 * tree-vect-stmts.c (vect_check_load_store_mask): New function,
26236 (vectorizable_mask_load_store): ...here.
26238 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
26240 * tree-vectorizer.h (vec_load_store_type): Moved from tree-vec-stmts.c
26241 (vect_model_store_cost): Take a vec_load_store_type instead of a
26243 * tree-vect-stmts.c (vec_load_store_type): Move to tree-vectorizer.h.
26244 (vect_model_store_cost): Take a vec_load_store_type instead of a
26246 (vectorizable_mask_load_store): Update accordingly.
26247 (vectorizable_store): Likewise.
26248 * tree-vect-slp.c (vect_analyze_slp_cost_1): Update accordingly.
26250 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
26252 * tree-vect-loop.c (vect_transform_loop): Stub out scalar
26253 IFN_MASK_LOAD calls here rather than...
26254 * tree-vect-stmts.c (vectorizable_mask_load_store): ...here.
26256 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
26257 Alan Hayward <alan.hayward@arm.com>
26258 David Sherwood <david.sherwood@arm.com>
26260 * expmed.c (extract_bit_field_1): For vector extracts,
26261 fall back to extract_bit_field_as_subreg if vec_extract
26264 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
26265 Alan Hayward <alan.hayward@arm.com>
26266 David Sherwood <david.sherwood@arm.com>
26268 * lra-spills.c (pseudo_reg_slot_compare): Sort slots by whether
26269 they are variable or constant sized.
26270 (assign_stack_slot_num_and_sort_pseudos): Don't reuse variable-sized
26271 slots for constant-sized data.
26273 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
26274 Alan Hayward <alan.hayward@arm.com>
26275 David Sherwood <david.sherwood@arm.com>
26277 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): When
26278 handling COND_EXPRs with boolean comparisons, try to find a better
26279 basis for the mask type than the boolean itself.
26281 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
26283 * doc/rtl.texi (MAX_BITSIZE_MODE_ANY_MODE): Describe how the default
26284 is calculated and how it can be overridden.
26285 * genmodes.c (max_bitsize_mode_any_mode): New variable.
26286 (create_modes): Initialize it from MAX_BITSIZE_MODE_ANY_MODE,
26288 (emit_max_int): Use it to set the output MAX_BITSIZE_MODE_ANY_MODE,
26291 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
26292 Alan Hayward <alan.hayward@arm.com>
26293 David Sherwood <david.sherwood@arm.com>
26295 * config/aarch64/aarch64-protos.h (aarch64_output_simd_mov_immediate):
26296 Remove the mode argument.
26297 (aarch64_simd_valid_immediate): Remove the mode and inverse
26299 * config/aarch64/iterators.md (bitsize): New iterator.
26300 * config/aarch64/aarch64-simd.md (*aarch64_simd_mov<mode>, and<mode>3)
26301 (ior<mode>3): Update calls to aarch64_output_simd_mov_immediate.
26302 * config/aarch64/constraints.md (Do, Db, Dn): Update calls to
26303 aarch64_simd_valid_immediate.
26304 * config/aarch64/predicates.md (aarch64_reg_or_orr_imm): Likewise.
26305 (aarch64_reg_or_bic_imm): Likewise.
26306 * config/aarch64/aarch64.c (simd_immediate_info): Replace mvn
26307 with an insn_type enum and msl with a modifier_type enum.
26308 Replace element_width with a scalar_mode. Change the shift
26309 to unsigned int. Add constructors for scalar_float_mode and
26310 scalar_int_mode elements.
26311 (aarch64_vect_float_const_representable_p): Delete.
26312 (aarch64_can_const_movi_rtx_p)
26313 (aarch64_simd_scalar_immediate_valid_for_move)
26314 (aarch64_simd_make_constant): Update call to
26315 aarch64_simd_valid_immediate.
26316 (aarch64_advsimd_valid_immediate_hs): New function.
26317 (aarch64_advsimd_valid_immediate): Likewise.
26318 (aarch64_simd_valid_immediate): Remove mode and inverse
26319 arguments. Rewrite to use the above. Use const_vec_duplicate_p
26320 to detect duplicated constants and use aarch64_float_const_zero_rtx_p
26321 and aarch64_float_const_representable_p on the result.
26322 (aarch64_output_simd_mov_immediate): Remove mode argument.
26323 Update call to aarch64_simd_valid_immediate and use of
26324 simd_immediate_info.
26325 (aarch64_output_scalar_simd_mov_immediate): Update call
26328 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
26329 Alan Hayward <alan.hayward@arm.com>
26330 David Sherwood <david.sherwood@arm.com>
26332 * machmode.h (mode_precision): Prefix with CONST_MODE_PRECISION.
26333 (mode_nunits): Likewise CONST_MODE_NUNITS.
26334 * machmode.def (ADJUST_NUNITS): Document.
26335 * genmodes.c (mode_data::need_nunits_adj): New field.
26336 (blank_mode): Update accordingly.
26337 (adj_nunits): New variable.
26338 (print_maybe_const_decl): Replace CATEGORY with a NEEDS_ADJ
26340 (emit_mode_size_inline): Set need_bytesize_adj for all modes
26341 listed in adj_nunits.
26342 (emit_mode_nunits_inline): Set need_nunits_adj for all modes
26343 listed in adj_nunits. Don't emit case statements for such modes.
26344 (emit_insn_modes_h): Emit definitions of CONST_MODE_NUNITS
26345 and CONST_MODE_PRECISION. Make CONST_MODE_SIZE expand to
26346 nothing if adj_nunits is nonnull.
26347 (emit_mode_precision, emit_mode_nunits): Use print_maybe_const_decl.
26348 (emit_mode_unit_size, emit_mode_base_align, emit_mode_ibit)
26349 (emit_mode_fbit): Update use of print_maybe_const_decl.
26350 (emit_move_size): Likewise. Treat the array as non-const
26352 (emit_mode_adjustments): Handle adj_nunits.
26354 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
26356 * machmode.def (VECTOR_MODES_WITH_PREFIX): Document.
26357 * genmodes.c (VECTOR_MODES_WITH_PREFIX): New macro.
26358 (VECTOR_MODES): Use it.
26359 (make_vector_modes): Take the prefix as an argument.
26361 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
26362 Alan Hayward <alan.hayward@arm.com>
26363 David Sherwood <david.sherwood@arm.com>
26365 * mode-classes.def (MODE_VECTOR_BOOL): New mode class.
26366 * machmode.h (INTEGRAL_MODE_P, VECTOR_MODE_P): Return true
26367 for MODE_VECTOR_BOOL.
26368 * machmode.def (VECTOR_BOOL_MODE): Document.
26369 * genmodes.c (VECTOR_BOOL_MODE): New macro.
26370 (make_vector_bool_mode): New function.
26371 (complete_mode, emit_mode_wider, emit_mode_adjustments): Handle
26373 * lto-streamer-in.c (lto_input_mode_table): Likewise.
26374 * rtx-vector-builder.c (rtx_vector_builder::find_cached_value):
26376 * stor-layout.c (int_mode_for_mode): Likewise.
26377 * tree.c (build_vector_type_for_mode): Likewise.
26378 * varasm.c (output_constant_pool_2): Likewise.
26379 * emit-rtl.c (init_emit_once): Make sure that CONST1_RTX (BImode) and
26380 CONSTM1_RTX (BImode) are the same thing. Initialize const_tiny_rtx
26381 for MODE_VECTOR_BOOL.
26382 * expr.c (expand_expr_real_1): Use VECTOR_MODE_P instead of a list
26383 of mode class checks.
26384 * tree-vect-generic.c (expand_vector_operation): Use VECTOR_MODE_P
26385 instead of a list of mode class checks.
26386 (expand_vector_scalar_condition): Likewise.
26387 (type_for_widest_vector_mode): Handle BImode as an inner mode.
26389 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
26390 Alan Hayward <alan.hayward@arm.com>
26391 David Sherwood <david.sherwood@arm.com>
26393 * machmode.h (mode_size): Change from unsigned short to
26395 (mode_to_bytes): Return a poly_uint16 rather than an unsigned short.
26396 (GET_MODE_SIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
26397 or if measurement_type is not polynomial.
26398 (fixed_size_mode::includes_p): Check for constant-sized modes.
26399 * genmodes.c (emit_mode_size_inline): Make mode_size_inline
26400 return a poly_uint16 rather than an unsigned short.
26401 (emit_mode_size): Change the type of mode_size from unsigned short
26402 to poly_uint16_pod. Use ZERO_COEFFS for the initializer.
26403 (emit_mode_adjustments): Cope with polynomial vector sizes.
26404 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
26406 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
26408 * auto-inc-dec.c (try_merge): Treat GET_MODE_SIZE as polynomial.
26409 * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Likewise.
26410 * caller-save.c (setup_save_areas): Likewise.
26411 (replace_reg_with_saved_mem): Likewise.
26412 * calls.c (emit_library_call_value_1): Likewise.
26413 * combine-stack-adj.c (combine_stack_adjustments_for_block): Likewise.
26414 * combine.c (simplify_set, make_extraction, simplify_shift_const_1)
26415 (gen_lowpart_for_combine): Likewise.
26416 * convert.c (convert_to_integer_1): Likewise.
26417 * cse.c (equiv_constant, cse_insn): Likewise.
26418 * cselib.c (autoinc_split, cselib_hash_rtx): Likewise.
26419 (cselib_subst_to_values): Likewise.
26420 * dce.c (word_dce_process_block): Likewise.
26421 * df-problems.c (df_word_lr_mark_ref): Likewise.
26422 * dwarf2cfi.c (init_one_dwarf_reg_size): Likewise.
26423 * dwarf2out.c (multiple_reg_loc_descriptor, mem_loc_descriptor)
26424 (concat_loc_descriptor, concatn_loc_descriptor, loc_descriptor)
26425 (rtl_for_decl_location): Likewise.
26426 * emit-rtl.c (gen_highpart, widen_memory_access): Likewise.
26427 * expmed.c (extract_bit_field_1, extract_integral_bit_field): Likewise.
26428 * expr.c (emit_group_load_1, clear_storage_hints): Likewise.
26429 (emit_move_complex, emit_move_multi_word, emit_push_insn): Likewise.
26430 (expand_expr_real_1): Likewise.
26431 * function.c (assign_parm_setup_block_p, assign_parm_setup_block)
26432 (pad_below): Likewise.
26433 * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
26434 * gimple-ssa-store-merging.c (rhs_valid_for_store_merging_p): Likewise.
26435 * ira.c (get_subreg_tracking_sizes): Likewise.
26436 * ira-build.c (ira_create_allocno_objects): Likewise.
26437 * ira-color.c (coalesced_pseudo_reg_slot_compare): Likewise.
26438 (ira_sort_regnos_for_alter_reg): Likewise.
26439 * ira-costs.c (record_operand_costs): Likewise.
26440 * lower-subreg.c (interesting_mode_p, simplify_gen_subreg_concatn)
26441 (resolve_simple_move): Likewise.
26442 * lra-constraints.c (get_reload_reg, operands_match_p): Likewise.
26443 (process_addr_reg, simplify_operand_subreg, curr_insn_transform)
26444 (lra_constraints): Likewise.
26445 (CONST_POOL_OK_P): Reject variable-sized modes.
26446 * lra-spills.c (slot, assign_mem_slot, pseudo_reg_slot_compare)
26447 (add_pseudo_to_slot, lra_spill): Likewise.
26448 * omp-low.c (omp_clause_aligned_alignment): Likewise.
26449 * optabs-query.c (get_best_extraction_insn): Likewise.
26450 * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
26451 * optabs.c (expand_vec_perm_var, expand_vec_cond_expr): Likewise.
26452 (expand_mult_highpart, valid_multiword_target_p): Likewise.
26453 * recog.c (offsettable_address_addr_space_p): Likewise.
26454 * regcprop.c (maybe_mode_change): Likewise.
26455 * reginfo.c (choose_hard_reg_mode, record_subregs_of_mode): Likewise.
26456 * regrename.c (build_def_use): Likewise.
26457 * regstat.c (dump_reg_info): Likewise.
26458 * reload.c (complex_word_subreg_p, push_reload, find_dummy_reload)
26459 (find_reloads, find_reloads_subreg_address): Likewise.
26460 * reload1.c (eliminate_regs_1): Likewise.
26461 * rtlanal.c (for_each_inc_dec_find_inc_dec, rtx_cost): Likewise.
26462 * simplify-rtx.c (avoid_constant_pool_reference): Likewise.
26463 (simplify_binary_operation_1, simplify_subreg): Likewise.
26464 * targhooks.c (default_function_arg_padding): Likewise.
26465 (default_hard_regno_nregs, default_class_max_nregs): Likewise.
26466 * tree-cfg.c (verify_gimple_assign_binary): Likewise.
26467 (verify_gimple_assign_ternary): Likewise.
26468 * tree-inline.c (estimate_move_cost): Likewise.
26469 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
26470 * tree-ssa-loop-ivopts.c (add_autoinc_candidates): Likewise.
26471 (get_address_cost_ainc): Likewise.
26472 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Likewise.
26473 (vect_supportable_dr_alignment): Likewise.
26474 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
26475 (vectorizable_reduction): Likewise.
26476 * tree-vect-stmts.c (vectorizable_assignment, vectorizable_shift)
26477 (vectorizable_operation, vectorizable_load): Likewise.
26478 * tree.c (build_same_sized_truth_vector_type): Likewise.
26479 * valtrack.c (cleanup_auto_inc_dec): Likewise.
26480 * var-tracking.c (emit_note_insn_var_location): Likewise.
26481 * config/arc/arc.h (ASM_OUTPUT_CASE_END): Use as_a <scalar_int_mode>.
26482 (ADDR_VEC_ALIGN): Likewise.
26484 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
26485 Alan Hayward <alan.hayward@arm.com>
26486 David Sherwood <david.sherwood@arm.com>
26488 * machmode.h (mode_to_bits): Return a poly_uint16 rather than an
26490 (GET_MODE_BITSIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
26491 or if measurement_type is polynomial.
26492 * calls.c (shift_return_value): Treat GET_MODE_BITSIZE as polynomial.
26493 * combine.c (make_extraction): Likewise.
26494 * dse.c (find_shift_sequence): Likewise.
26495 * dwarf2out.c (mem_loc_descriptor): Likewise.
26496 * expmed.c (store_integral_bit_field, extract_bit_field_1): Likewise.
26497 (extract_bit_field, extract_low_bits): Likewise.
26498 * expr.c (convert_move, convert_modes, emit_move_insn_1): Likewise.
26499 (optimize_bitfield_assignment_op, expand_assignment): Likewise.
26500 (store_expr_with_bounds, store_field, expand_expr_real_1): Likewise.
26501 * fold-const.c (optimize_bit_field_compare, merge_ranges): Likewise.
26502 * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
26503 * reload.c (find_reloads): Likewise.
26504 * reload1.c (alter_reg): Likewise.
26505 * stor-layout.c (bitwise_mode_for_mode, compute_record_mode): Likewise.
26506 * targhooks.c (default_secondary_memory_needed_mode): Likewise.
26507 * tree-if-conv.c (predicate_mem_writes): Likewise.
26508 * tree-ssa-strlen.c (handle_builtin_memcmp): Likewise.
26509 * tree-vect-patterns.c (adjust_bool_pattern): Likewise.
26510 * tree-vect-stmts.c (vectorizable_simd_clone_call): Likewise.
26511 * valtrack.c (dead_debug_insert_temp): Likewise.
26512 * varasm.c (mergeable_constant_section): Likewise.
26513 * config/sh/sh.h (LOCAL_ALIGNMENT): Use as_a <fixed_size_mode>.
26515 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
26516 Alan Hayward <alan.hayward@arm.com>
26517 David Sherwood <david.sherwood@arm.com>
26519 * expr.c (expand_assignment): Cope with polynomial mode sizes
26520 when assigning to a CONCAT.
26522 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
26523 Alan Hayward <alan.hayward@arm.com>
26524 David Sherwood <david.sherwood@arm.com>
26526 * machmode.h (mode_precision): Change from unsigned short to
26528 (mode_to_precision): Return a poly_uint16 rather than an unsigned
26530 (GET_MODE_PRECISION): Return a constant if ONLY_FIXED_SIZE_MODES,
26531 or if measurement_type is not polynomial.
26532 (HWI_COMPUTABLE_MODE_P): Turn into a function. Optimize the case
26533 in which the mode is already known to be a scalar_int_mode.
26534 * genmodes.c (emit_mode_precision): Change the type of mode_precision
26535 from unsigned short to poly_uint16_pod. Use ZERO_COEFFS for the
26537 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
26538 for GET_MODE_PRECISION.
26539 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
26540 for GET_MODE_PRECISION.
26541 * combine.c (update_rsp_from_reg_equal): Treat GET_MODE_PRECISION
26543 (try_combine, find_split_point, combine_simplify_rtx): Likewise.
26544 (expand_field_assignment, make_extraction): Likewise.
26545 (make_compound_operation_int, record_dead_and_set_regs_1): Likewise.
26546 (get_last_value): Likewise.
26547 * convert.c (convert_to_integer_1): Likewise.
26548 * cse.c (cse_insn): Likewise.
26549 * expr.c (expand_expr_real_1): Likewise.
26550 * lra-constraints.c (simplify_operand_subreg): Likewise.
26551 * optabs-query.c (can_atomic_load_p): Likewise.
26552 * optabs.c (expand_atomic_load): Likewise.
26553 (expand_atomic_store): Likewise.
26554 * ree.c (combine_reaching_defs): Likewise.
26555 * rtl.h (partial_subreg_p, paradoxical_subreg_p): Likewise.
26556 * rtlanal.c (nonzero_bits1, lsb_bitfield_op_p): Likewise.
26557 * tree.h (type_has_mode_precision_p): Likewise.
26558 * ubsan.c (instrument_si_overflow): Likewise.
26560 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
26561 Alan Hayward <alan.hayward@arm.com>
26562 David Sherwood <david.sherwood@arm.com>
26564 * tree.h (TYPE_VECTOR_SUBPARTS): Turn into a function and handle
26565 polynomial numbers of units.
26566 (SET_TYPE_VECTOR_SUBPARTS): Likewise.
26567 (valid_vector_subparts_p): New function.
26568 (build_vector_type): Remove temporary shim and take the number
26569 of units as a poly_uint64 rather than an int.
26570 (build_opaque_vector_type): Take the number of units as a
26571 poly_uint64 rather than an int.
26572 * tree.c (build_vector_from_ctor): Handle polynomial
26573 TYPE_VECTOR_SUBPARTS.
26574 (type_hash_canon_hash, type_cache_hasher::equal): Likewise.
26575 (uniform_vector_p, vector_type_mode, build_vector): Likewise.
26576 (build_vector_from_val): If the number of units is variable,
26577 use build_vec_duplicate_cst for constant operands and
26578 VEC_DUPLICATE_EXPR otherwise.
26579 (make_vector_type): Remove temporary is_constant ().
26580 (build_vector_type, build_opaque_vector_type): Take the number of
26581 units as a poly_uint64 rather than an int.
26582 (check_vector_cst): Handle polynomial TYPE_VECTOR_SUBPARTS and
26584 * cfgexpand.c (expand_debug_expr): Likewise.
26585 * expr.c (count_type_elements, categorize_ctor_elements_1): Likewise.
26586 (store_constructor, expand_expr_real_1): Likewise.
26587 (const_scalar_mask_from_tree): Likewise.
26588 * fold-const-call.c (fold_const_reduction): Likewise.
26589 * fold-const.c (const_binop, const_unop, fold_convert_const): Likewise.
26590 (operand_equal_p, fold_vec_perm, fold_ternary_loc): Likewise.
26591 (native_encode_vector, vec_cst_ctor_to_array): Likewise.
26592 (fold_relational_const): Likewise.
26593 (native_interpret_vector): Likewise. Change the size from an
26594 int to an unsigned int.
26595 * gimple-fold.c (gimple_fold_stmt_to_constant_1): Handle polynomial
26596 TYPE_VECTOR_SUBPARTS.
26597 (gimple_fold_indirect_ref, gimple_build_vector): Likewise.
26598 (gimple_build_vector_from_val): Use VEC_DUPLICATE_EXPR when
26599 duplicating a non-constant operand into a variable-length vector.
26600 * hsa-brig.c (hsa_op_immed::emit_to_buffer): Handle polynomial
26601 TYPE_VECTOR_SUBPARTS and VECTOR_CST_NELTS.
26602 * ipa-icf.c (sem_variable::equals): Likewise.
26603 * match.pd: Likewise.
26604 * omp-simd-clone.c (simd_clone_subparts): Likewise.
26605 * print-tree.c (print_node): Likewise.
26606 * stor-layout.c (layout_type): Likewise.
26607 * targhooks.c (default_builtin_vectorization_cost): Likewise.
26608 * tree-cfg.c (verify_gimple_comparison): Likewise.
26609 (verify_gimple_assign_binary): Likewise.
26610 (verify_gimple_assign_ternary): Likewise.
26611 (verify_gimple_assign_single): Likewise.
26612 * tree-pretty-print.c (dump_generic_node): Likewise.
26613 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
26614 (simplify_bitfield_ref, is_combined_permutation_identity): Likewise.
26615 * tree-vect-data-refs.c (vect_permute_store_chain): Likewise.
26616 (vect_grouped_load_supported, vect_permute_load_chain): Likewise.
26617 (vect_shift_permute_load_chain): Likewise.
26618 * tree-vect-generic.c (nunits_for_known_piecewise_op): Likewise.
26619 (expand_vector_condition, optimize_vector_constructor): Likewise.
26620 (lower_vec_perm, get_compute_type): Likewise.
26621 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
26622 (get_initial_defs_for_reduction, vect_transform_loop): Likewise.
26623 * tree-vect-patterns.c (vect_recog_bool_pattern): Likewise.
26624 (vect_recog_mask_conversion_pattern): Likewise.
26625 * tree-vect-slp.c (vect_supported_load_permutation_p): Likewise.
26626 (vect_get_constant_vectors, vect_transform_slp_perm_load): Likewise.
26627 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
26628 (get_group_load_store_type, vectorizable_mask_load_store): Likewise.
26629 (vectorizable_bswap, simd_clone_subparts, vectorizable_assignment)
26630 (vectorizable_shift, vectorizable_operation, vectorizable_store)
26631 (vectorizable_load, vect_is_simple_cond, vectorizable_comparison)
26632 (supportable_widening_operation): Likewise.
26633 (supportable_narrowing_operation): Likewise.
26634 * tree-vector-builder.c (tree_vector_builder::binary_encoded_nelts):
26636 * varasm.c (output_constant): Likewise.
26638 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
26639 Alan Hayward <alan.hayward@arm.com>
26640 David Sherwood <david.sherwood@arm.com>
26642 * tree-vect-data-refs.c (vect_permute_store_chain): Reorganize
26643 so that both the length == 3 and length != 3 cases set up their
26644 own permute vectors. Add comments explaining why we know the
26645 number of elements is constant.
26646 (vect_permute_load_chain): Likewise.
26648 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
26649 Alan Hayward <alan.hayward@arm.com>
26650 David Sherwood <david.sherwood@arm.com>
26652 * machmode.h (mode_nunits): Change from unsigned char to
26654 (ONLY_FIXED_SIZE_MODES): New macro.
26655 (pod_mode::measurement_type, scalar_int_mode::measurement_type)
26656 (scalar_float_mode::measurement_type, scalar_mode::measurement_type)
26657 (complex_mode::measurement_type, fixed_size_mode::measurement_type):
26659 (mode_to_nunits): Return a poly_uint16 rather than an unsigned short.
26660 (GET_MODE_NUNITS): Return a constant if ONLY_FIXED_SIZE_MODES,
26661 or if measurement_type is not polynomial.
26662 * genmodes.c (ZERO_COEFFS): New macro.
26663 (emit_mode_nunits_inline): Make mode_nunits_inline return a
26665 (emit_mode_nunits): Change the type of mode_nunits to poly_uint16_pod.
26666 Use ZERO_COEFFS when emitting initializers.
26667 * data-streamer.h (bp_pack_poly_value): New function.
26668 (bp_unpack_poly_value): Likewise.
26669 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
26670 for GET_MODE_NUNITS.
26671 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
26672 for GET_MODE_NUNITS.
26673 * tree.c (make_vector_type): Remove temporary shim and make
26674 the real function take the number of units as a poly_uint64
26675 rather than an int.
26676 (build_vector_type_for_mode): Handle polynomial nunits.
26677 * dwarf2out.c (loc_descriptor, add_const_value_attribute): Likewise.
26678 * emit-rtl.c (const_vec_series_p_1): Likewise.
26679 (gen_rtx_CONST_VECTOR): Likewise.
26680 * fold-const.c (test_vec_duplicate_folding): Likewise.
26681 * genrecog.c (validate_pattern): Likewise.
26682 * optabs-query.c (can_vec_perm_var_p, can_mult_highpart_p): Likewise.
26683 * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
26684 * optabs.c (expand_vector_broadcast, expand_binop_directly): Likewise.
26685 (shift_amt_for_vec_perm_mask, expand_vec_perm_var): Likewise.
26686 (expand_vec_cond_expr, expand_mult_highpart): Likewise.
26687 * rtlanal.c (subreg_get_info): Likewise.
26688 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
26689 (vect_grouped_load_supported): Likewise.
26690 * tree-vect-generic.c (type_for_widest_vector_mode): Likewise.
26691 * tree-vect-loop.c (have_whole_vector_shift): Likewise.
26692 * simplify-rtx.c (simplify_unary_operation_1): Likewise.
26693 (simplify_const_unary_operation, simplify_binary_operation_1)
26694 (simplify_const_binary_operation, simplify_ternary_operation)
26695 (test_vector_ops_duplicate, test_vector_ops): Likewise.
26696 (simplify_immed_subreg): Use GET_MODE_NUNITS on a fixed_size_mode
26697 instead of CONST_VECTOR_NUNITS.
26698 * varasm.c (output_constant_pool_2): Likewise.
26699 * rtx-vector-builder.c (rtx_vector_builder::build): Only include the
26700 explicit-encoded elements in the XVEC for variable-length vectors.
26702 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
26704 * lra-constraints.c (curr_insn_transform): Use partial_subreg_p.
26706 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
26707 Alan Hayward <alan.hayward@arm.com>
26708 David Sherwood <david.sherwood@arm.com>
26710 * coretypes.h (fixed_size_mode): Declare.
26711 (fixed_size_mode_pod): New typedef.
26712 * builtins.h (target_builtins::x_apply_args_mode)
26713 (target_builtins::x_apply_result_mode): Change type to
26714 fixed_size_mode_pod.
26715 * builtins.c (apply_args_size, apply_result_size, result_vector)
26716 (expand_builtin_apply_args_1, expand_builtin_apply)
26717 (expand_builtin_return): Update accordingly.
26719 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
26721 * cse.c (hash_rtx_cb): Hash only the encoded elements.
26722 * cselib.c (cselib_hash_rtx): Likewise.
26723 * expmed.c (make_tree): Build VECTOR_CSTs directly from the
26724 CONST_VECTOR encoding.
26726 2018-01-03 Jakub Jelinek <jakub@redhat.com>
26727 Jeff Law <law@redhat.com>
26730 * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): For
26731 noreturn probe, use gen_pop instead of ix86_emit_restore_reg_using_pop,
26732 only set RTX_FRAME_RELATED_P on both the push and pop if cfa_reg is sp
26733 and add REG_CFA_ADJUST_CFA notes in that case to both insns.
26736 * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): Do not
26737 explicitly probe *sp in a noreturn function if there were any callee
26738 register saves or frame pointer is needed.
26740 2018-01-03 Jakub Jelinek <jakub@redhat.com>
26743 * cfgexpand.c (expand_debug_expr): Return NULL if mode is
26744 BLKmode for ternary, binary or unary expressions.
26747 * var-tracking.c (delete_vta_debug_insn): New inline function.
26748 (delete_vta_debug_insns): Add USE_CFG argument, if true, walk just
26749 insns from get_insns () to NULL instead of each bb separately.
26750 Use delete_vta_debug_insn. No longer static.
26751 (vt_debug_insns_local, variable_tracking_main_1): Adjust
26752 delete_vta_debug_insns callers.
26753 * rtl.h (delete_vta_debug_insns): Declare.
26754 * final.c (rest_of_handle_final): Call delete_vta_debug_insns
26755 instead of variable_tracking_main.
26757 2018-01-03 Martin Sebor <msebor@redhat.com>
26759 PR tree-optimization/83603
26760 * calls.c (maybe_warn_nonstring_arg): Avoid accessing function
26761 arguments past the endof the argument list in functions declared
26762 without a prototype.
26763 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call):
26764 Avoid checking when arguments are null.
26766 2018-01-03 Martin Sebor <msebor@redhat.com>
26769 * doc/extend.texi (attribute const): Fix a typo.
26770 * ipa-pure-const.c ((warn_function_const, warn_function_pure): Avoid
26771 issuing -Wsuggest-attribute for void functions.
26773 2018-01-03 Martin Sebor <msebor@redhat.com>
26775 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Use
26776 offset_int::from instead of wide_int::to_shwi.
26777 (maybe_diag_overlap): Remove assertion.
26778 Use HOST_WIDE_INT_PRINT_DEC instead of %lli.
26779 * gimple-ssa-sprintf.c (format_directive): Same.
26780 (parse_directive): Same.
26781 (sprintf_dom_walker::compute_format_length): Same.
26782 (try_substitute_return_value): Same.
26784 2018-01-03 Jeff Law <law@redhat.com>
26786 PR middle-end/83654
26787 * explow.c (anti_adjust_stack_and_probe_stack_clash): Test a
26788 non-constant residual for zero at runtime and avoid probing in
26789 that case. Reorganize code for trailing problem to mirror handling
26792 2018-01-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
26794 PR tree-optimization/83501
26795 * tree-ssa-strlen.c (get_string_cst): New.
26796 (handle_char_store): Call get_string_cst.
26798 2018-01-03 Martin Liska <mliska@suse.cz>
26800 PR tree-optimization/83593
26801 * tree-ssa-strlen.c: Include tree-cfg.h.
26802 (strlen_check_and_optimize_stmt): Add new argument cleanup_eh.
26803 (strlen_dom_walker): Add new member variable m_cleanup_cfg.
26804 (strlen_dom_walker::strlen_dom_walker): Initialize m_cleanup_cfg
26806 (strlen_dom_walker::before_dom_children): Call
26807 gimple_purge_dead_eh_edges. Dump tranformation with details
26809 (strlen_dom_walker::before_dom_children): Update call by adding
26810 new argument cleanup_eh.
26811 (pass_strlen::execute): Return TODO_cleanup_cfg if needed.
26813 2018-01-03 Martin Liska <mliska@suse.cz>
26816 * cif-code.def (VARIADIC_THUNK): New enum value.
26817 * ipa-fnsummary.c (compute_fn_summary): Do not inline variadic
26820 2018-01-03 Jan Beulich <jbeulich@suse.com>
26822 * sse.md (mov<mode>_internal): Tighten condition for when to use
26823 vmovdqu<ssescalarsize> for TI and OI modes.
26825 2018-01-03 Jakub Jelinek <jakub@redhat.com>
26827 Update copyright years.
26829 2018-01-03 Martin Liska <mliska@suse.cz>
26832 * ipa-visibility.c (function_and_variable_visibility): Skip
26833 functions with noipa attribure.
26835 2018-01-03 Jakub Jelinek <jakub@redhat.com>
26837 * gcc.c (process_command): Update copyright notice dates.
26838 * gcov-dump.c (print_version): Ditto.
26839 * gcov.c (print_version): Ditto.
26840 * gcov-tool.c (print_version): Ditto.
26841 * gengtype.c (create_file): Ditto.
26842 * doc/cpp.texi: Bump @copying's copyright year.
26843 * doc/cppinternals.texi: Ditto.
26844 * doc/gcc.texi: Ditto.
26845 * doc/gccint.texi: Ditto.
26846 * doc/gcov.texi: Ditto.
26847 * doc/install.texi: Ditto.
26848 * doc/invoke.texi: Ditto.
26850 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
26852 * vector-builder.h (vector_builder::m_full_nelts): Change from
26853 unsigned int to poly_uint64.
26854 (vector_builder::full_nelts): Update prototype accordingly.
26855 (vector_builder::new_vector): Likewise.
26856 (vector_builder::encoded_full_vector_p): Handle polynomial full_nelts.
26857 (vector_builder::operator ==): Likewise.
26858 (vector_builder::finalize): Likewise.
26859 * int-vector-builder.h (int_vector_builder::int_vector_builder):
26860 Take the number of elements as a poly_uint64 rather than an
26862 * vec-perm-indices.h (vec_perm_indices::m_nelts_per_input): Change
26863 from unsigned int to poly_uint64.
26864 (vec_perm_indices::vec_perm_indices): Update prototype accordingly.
26865 (vec_perm_indices::new_vector): Likewise.
26866 (vec_perm_indices::length): Likewise.
26867 (vec_perm_indices::nelts_per_input): Likewise.
26868 (vec_perm_indices::input_nelts): Likewise.
26869 * vec-perm-indices.c (vec_perm_indices::new_vector): Take the
26870 number of elements per input as a poly_uint64 rather than an
26871 unsigned int. Use the original encoding for variable-length
26872 vectors, rather than clamping each individual element.
26873 For the second and subsequent elements in each pattern,
26874 clamp the step and base before clamping their sum.
26875 (vec_perm_indices::series_p): Handle polynomial element counts.
26876 (vec_perm_indices::all_in_range_p): Likewise.
26877 (vec_perm_indices_to_tree): Likewise.
26878 (vec_perm_indices_to_rtx): Likewise.
26879 * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise.
26880 * tree-vector-builder.c (tree_vector_builder::new_unary_operation)
26881 (tree_vector_builder::new_binary_operation): Handle polynomial
26882 element counts. Return false if we need to know the number
26883 of elements at compile time.
26884 * fold-const.c (fold_vec_perm): Punt if the number of elements
26885 isn't known at compile time.
26887 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
26889 * vec-perm-indices.h (vec_perm_builder): Change element type
26890 from HOST_WIDE_INT to poly_int64.
26891 (vec_perm_indices::element_type): Update accordingly.
26892 (vec_perm_indices::clamp): Handle polynomial element_types.
26893 * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
26894 (vec_perm_indices::all_in_range_p): Likewise.
26895 (tree_to_vec_perm_builder): Check for poly_int64 trees rather
26897 * vector-builder.h (vector_builder::stepped_sequence_p): Handle
26898 polynomial vec_perm_indices element types.
26899 * int-vector-builder.h (int_vector_builder::equal_p): Likewise.
26900 * fold-const.c (fold_vec_perm): Likewise.
26901 * optabs.c (shift_amt_for_vec_perm_mask): Likewise.
26902 * tree-vect-generic.c (lower_vec_perm): Likewise.
26903 * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
26904 * config/aarch64/aarch64.c (aarch64_evpc_tbl): Cast d->perm
26905 element type to HOST_WIDE_INT.
26907 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
26908 Alan Hayward <alan.hayward@arm.com>
26909 David Sherwood <david.sherwood@arm.com>
26911 * alias.c (addr_side_effect_eval): Take the size as a poly_int64
26912 rather than an int. Use plus_constant.
26913 (memrefs_conflict_p): Take the sizes as poly_int64s rather than ints.
26914 Take the offset "c" as a poly_int64 rather than a HOST_WIDE_INT.
26916 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
26917 Alan Hayward <alan.hayward@arm.com>
26918 David Sherwood <david.sherwood@arm.com>
26920 * calls.c (emit_call_1, expand_call): Change struct_value_size from
26921 a HOST_WIDE_INT to a poly_int64.
26923 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
26924 Alan Hayward <alan.hayward@arm.com>
26925 David Sherwood <david.sherwood@arm.com>
26927 * calls.c (load_register_parameters): Cope with polynomial
26928 mode sizes. Require a constant size for BLKmode parameters
26929 that aren't described by a PARALLEL. If BLOCK_REG_PADDING
26930 forces a parameter to be padded at the lsb end in order to
26931 fill a complete number of words, require the parameter size
26932 to be ordered wrt UNITS_PER_WORD.
26934 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
26935 Alan Hayward <alan.hayward@arm.com>
26936 David Sherwood <david.sherwood@arm.com>
26938 * reload1.c (spill_stack_slot_width): Change element type
26939 from unsigned int to poly_uint64_pod.
26940 (alter_reg): Treat mode sizes as polynomial.
26942 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
26943 Alan Hayward <alan.hayward@arm.com>
26944 David Sherwood <david.sherwood@arm.com>
26946 * reload.c (complex_word_subreg_p): New function.
26947 (reload_inner_reg_of_subreg, push_reload): Use it.
26949 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
26950 Alan Hayward <alan.hayward@arm.com>
26951 David Sherwood <david.sherwood@arm.com>
26953 * lra-constraints.c (process_alt_operands): Reject matched
26954 operands whose sizes aren't ordered.
26955 (match_reload): Refer to this check here.
26957 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
26958 Alan Hayward <alan.hayward@arm.com>
26959 David Sherwood <david.sherwood@arm.com>
26961 * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Assert
26962 that the mode size is in the set {1, 2, 4, 8, 16}.
26964 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
26965 Alan Hayward <alan.hayward@arm.com>
26966 David Sherwood <david.sherwood@arm.com>
26968 * var-tracking.c (adjust_mems): Treat mode sizes as polynomial.
26969 Use plus_constant instead of gen_rtx_PLUS.
26971 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
26972 Alan Hayward <alan.hayward@arm.com>
26973 David Sherwood <david.sherwood@arm.com>
26975 * config/cr16/cr16-protos.h (cr16_push_rounding): Declare.
26976 * config/cr16/cr16.h (PUSH_ROUNDING): Move implementation to...
26977 * config/cr16/cr16.c (cr16_push_rounding): ...this new function.
26978 * config/h8300/h8300-protos.h (h8300_push_rounding): Declare.
26979 * config/h8300/h8300.h (PUSH_ROUNDING): Move implementation to...
26980 * config/h8300/h8300.c (h8300_push_rounding): ...this new function.
26981 * config/i386/i386-protos.h (ix86_push_rounding): Declare.
26982 * config/i386/i386.h (PUSH_ROUNDING): Move implementation to...
26983 * config/i386/i386.c (ix86_push_rounding): ...this new function.
26984 * config/m32c/m32c-protos.h (m32c_push_rounding): Take and return
26986 * config/m32c/m32c.c (m32c_push_rounding): Likewise.
26987 * config/m68k/m68k-protos.h (m68k_push_rounding): Declare.
26988 * config/m68k/m68k.h (PUSH_ROUNDING): Move implementation to...
26989 * config/m68k/m68k.c (m68k_push_rounding): ...this new function.
26990 * config/pdp11/pdp11-protos.h (pdp11_push_rounding): Declare.
26991 * config/pdp11/pdp11.h (PUSH_ROUNDING): Move implementation to...
26992 * config/pdp11/pdp11.c (pdp11_push_rounding): ...this new function.
26993 * config/stormy16/stormy16-protos.h (xstormy16_push_rounding): Declare.
26994 * config/stormy16/stormy16.h (PUSH_ROUNDING): Move implementation to...
26995 * config/stormy16/stormy16.c (xstormy16_push_rounding): ...this new
26997 * expr.c (emit_move_resolve_push): Treat the input and result
26998 of PUSH_ROUNDING as a poly_int64.
26999 (emit_move_complex_push, emit_single_push_insn_1): Likewise.
27000 (emit_push_insn): Likewise.
27001 * lra-eliminations.c (mark_not_eliminable): Likewise.
27002 * recog.c (push_operand): Likewise.
27003 * reload1.c (elimination_effects): Likewise.
27004 * rtlanal.c (nonzero_bits1): Likewise.
27005 * calls.c (store_one_arg): Likewise. Require the padding to be
27006 known at compile time.
27008 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27009 Alan Hayward <alan.hayward@arm.com>
27010 David Sherwood <david.sherwood@arm.com>
27012 * expr.c (emit_single_push_insn_1): Treat mode sizes as polynomial.
27013 Use plus_constant instead of gen_rtx_PLUS.
27015 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27016 Alan Hayward <alan.hayward@arm.com>
27017 David Sherwood <david.sherwood@arm.com>
27019 * auto-inc-dec.c (set_inc_state): Take the mode size as a poly_int64
27020 rather than an int.
27022 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27023 Alan Hayward <alan.hayward@arm.com>
27024 David Sherwood <david.sherwood@arm.com>
27026 * expr.c (expand_expr_real_1): Use tree_to_poly_uint64
27027 instead of int_size_in_bytes when handling VIEW_CONVERT_EXPRs
27028 via stack temporaries. Treat the mode size as polynomial too.
27030 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27031 Alan Hayward <alan.hayward@arm.com>
27032 David Sherwood <david.sherwood@arm.com>
27034 * expr.c (expand_expr_real_2): When handling conversions involving
27035 unions, apply tree_to_poly_uint64 to the TYPE_SIZE rather than
27036 multiplying int_size_in_bytes by BITS_PER_UNIT. Treat GET_MODE_BISIZE
27037 as a poly_uint64 too.
27039 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27040 Alan Hayward <alan.hayward@arm.com>
27041 David Sherwood <david.sherwood@arm.com>
27043 * rtlanal.c (subreg_get_info): Handle polynomial mode sizes.
27045 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27046 Alan Hayward <alan.hayward@arm.com>
27047 David Sherwood <david.sherwood@arm.com>
27049 * combine.c (can_change_dest_mode): Handle polynomial
27050 REGMODE_NATURAL_SIZE.
27051 * expmed.c (store_bit_field_1): Likewise.
27052 * expr.c (store_constructor): Likewise.
27053 * emit-rtl.c (validate_subreg): Operate on polynomial mode sizes
27054 and polynomial REGMODE_NATURAL_SIZE.
27055 (gen_lowpart_common): Likewise.
27056 * reginfo.c (record_subregs_of_mode): Likewise.
27057 * rtlanal.c (read_modify_subreg_p): Likewise.
27059 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27060 Alan Hayward <alan.hayward@arm.com>
27061 David Sherwood <david.sherwood@arm.com>
27063 * internal-fn.c (expand_vector_ubsan_overflow): Handle polynomial
27064 numbers of elements.
27066 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27067 Alan Hayward <alan.hayward@arm.com>
27068 David Sherwood <david.sherwood@arm.com>
27070 * match.pd: Cope with polynomial numbers of vector elements.
27072 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27073 Alan Hayward <alan.hayward@arm.com>
27074 David Sherwood <david.sherwood@arm.com>
27076 * fold-const.c (fold_indirect_ref_1): Handle polynomial offsets
27077 in a POINTER_PLUS_EXPR.
27079 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27080 Alan Hayward <alan.hayward@arm.com>
27081 David Sherwood <david.sherwood@arm.com>
27083 * omp-simd-clone.c (simd_clone_subparts): New function.
27084 (simd_clone_init_simd_arrays): Use it instead of TYPE_VECTOR_SUBPARTS.
27085 (ipa_simd_modify_function_body): Likewise.
27087 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27088 Alan Hayward <alan.hayward@arm.com>
27089 David Sherwood <david.sherwood@arm.com>
27091 * tree-vect-generic.c (nunits_for_known_piecewise_op): New function.
27092 (expand_vector_piecewise): Use it instead of TYPE_VECTOR_SUBPARTS.
27093 (expand_vector_addition, add_rshift, expand_vector_divmod): Likewise.
27094 (expand_vector_condition, vector_element): Likewise.
27095 (subparts_gt): New function.
27096 (get_compute_type): Use subparts_gt.
27097 (count_type_subparts): Delete.
27098 (expand_vector_operations_1): Use subparts_gt instead of
27099 count_type_subparts.
27101 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27102 Alan Hayward <alan.hayward@arm.com>
27103 David Sherwood <david.sherwood@arm.com>
27105 * tree-vect-data-refs.c (vect_no_alias_p): Replace with...
27106 (vect_compile_time_alias): ...this new function. Do the calculation
27107 on poly_ints rather than trees.
27108 (vect_prune_runtime_alias_test_list): Update call accordingly.
27110 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27111 Alan Hayward <alan.hayward@arm.com>
27112 David Sherwood <david.sherwood@arm.com>
27114 * tree-vect-slp.c (vect_build_slp_tree_1): Handle polynomial
27116 (vect_schedule_slp_instance): Likewise.
27118 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27119 Alan Hayward <alan.hayward@arm.com>
27120 David Sherwood <david.sherwood@arm.com>
27122 * tree-vect-slp.c (vect_get_and_check_slp_defs): Reject
27123 constant and extern definitions for variable-length vectors.
27124 (vect_get_constant_vectors): Note that the number of units
27125 is known to be constant.
27127 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27128 Alan Hayward <alan.hayward@arm.com>
27129 David Sherwood <david.sherwood@arm.com>
27131 * tree-vect-stmts.c (vectorizable_conversion): Treat the number
27132 of units as polynomial. Choose between WIDE and NARROW based
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 * tree-vect-stmts.c (simd_clone_subparts): New function.
27140 (vectorizable_simd_clone_call): Use it instead of TYPE_VECTOR_SUBPARTS.
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 * tree-vect-stmts.c (vectorizable_call): Treat the number of
27147 vectors as polynomial. Use build_index_vector for
27148 IFN_GOMP_SIMD_LANE.
27150 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27151 Alan Hayward <alan.hayward@arm.com>
27152 David Sherwood <david.sherwood@arm.com>
27154 * tree-vect-stmts.c (get_load_store_type): Treat the number of
27155 units as polynomial. Reject VMAT_ELEMENTWISE and VMAT_STRIDED_SLP
27156 for variable-length vectors.
27157 (vectorizable_mask_load_store): Treat the number of units as
27158 polynomial, asserting that it is constant if the condition has
27159 already been enforced.
27160 (vectorizable_store, vectorizable_load): Likewise.
27162 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27163 Alan Hayward <alan.hayward@arm.com>
27164 David Sherwood <david.sherwood@arm.com>
27166 * tree-vect-loop.c (vectorizable_live_operation): Treat the number
27167 of units as polynomial. Punt if we can't tell at compile time
27168 which vector contains the final result.
27170 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27171 Alan Hayward <alan.hayward@arm.com>
27172 David Sherwood <david.sherwood@arm.com>
27174 * tree-vect-loop.c (vectorizable_induction): Treat the number
27175 of units as polynomial. Punt on SLP inductions. Use an integer
27176 VEC_SERIES_EXPR for variable-length integer reductions. Use a
27177 cast of such a series for variable-length floating-point
27180 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27181 Alan Hayward <alan.hayward@arm.com>
27182 David Sherwood <david.sherwood@arm.com>
27184 * tree.h (build_index_vector): Declare.
27185 * tree.c (build_index_vector): New function.
27186 * tree-vect-loop.c (get_initial_defs_for_reduction): Treat the number
27187 of units as polynomial, forcibly converting it to a constant if
27188 vectorizable_reduction has already enforced the condition.
27189 (vect_create_epilog_for_reduction): Likewise. Use build_index_vector
27190 to create a {1,2,3,...} vector.
27191 (vectorizable_reduction): Treat the number of units as polynomial.
27192 Choose vectype_in based on the largest scalar element size rather
27193 than the smallest number of units. Enforce the restrictions
27196 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27197 Alan Hayward <alan.hayward@arm.com>
27198 David Sherwood <david.sherwood@arm.com>
27200 * tree-vect-data-refs.c (vector_alignment_reachable_p): Treat the
27201 number of units as polynomial.
27203 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27204 Alan Hayward <alan.hayward@arm.com>
27205 David Sherwood <david.sherwood@arm.com>
27207 * target.h (vector_sizes, auto_vector_sizes): New typedefs.
27208 * target.def (autovectorize_vector_sizes): Return the vector sizes
27209 by pointer, using vector_sizes rather than a bitmask.
27210 * targhooks.h (default_autovectorize_vector_sizes): Update accordingly.
27211 * targhooks.c (default_autovectorize_vector_sizes): Likewise.
27212 * config/aarch64/aarch64.c (aarch64_autovectorize_vector_sizes):
27214 * config/arc/arc.c (arc_autovectorize_vector_sizes): Likewise.
27215 * config/arm/arm.c (arm_autovectorize_vector_sizes): Likewise.
27216 * config/i386/i386.c (ix86_autovectorize_vector_sizes): Likewise.
27217 * config/mips/mips.c (mips_autovectorize_vector_sizes): Likewise.
27218 * omp-general.c (omp_max_vf): Likewise.
27219 * omp-low.c (omp_clause_aligned_alignment): Likewise.
27220 * optabs-query.c (can_vec_mask_load_store_p): Likewise.
27221 * tree-vect-loop.c (vect_analyze_loop): Likewise.
27222 * tree-vect-slp.c (vect_slp_bb): Likewise.
27223 * doc/tm.texi: Regenerate.
27224 * tree-vectorizer.h (current_vector_size): Change from an unsigned int
27226 * tree-vect-stmts.c (get_vectype_for_scalar_type_and_size): Take
27227 the vector size as a poly_uint64 rather than an unsigned int.
27228 (current_vector_size): Change from an unsigned int to a poly_uint64.
27229 (get_vectype_for_scalar_type): Update accordingly.
27230 * tree.h (build_truth_vector_type): Take the size and number of
27231 units as a poly_uint64 rather than an unsigned int.
27232 (build_vector_type): Add a temporary overload that takes
27233 the number of units as a poly_uint64 rather than an unsigned int.
27234 * tree.c (make_vector_type): Likewise.
27235 (build_truth_vector_type): Take the number of units as a poly_uint64
27236 rather than an unsigned int.
27238 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27239 Alan Hayward <alan.hayward@arm.com>
27240 David Sherwood <david.sherwood@arm.com>
27242 * target.def (get_mask_mode): Take the number of units and length
27243 as poly_uint64s rather than unsigned ints.
27244 * targhooks.h (default_get_mask_mode): Update accordingly.
27245 * targhooks.c (default_get_mask_mode): Likewise.
27246 * config/i386/i386.c (ix86_get_mask_mode): Likewise.
27247 * doc/tm.texi: Regenerate.
27249 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27250 Alan Hayward <alan.hayward@arm.com>
27251 David Sherwood <david.sherwood@arm.com>
27253 * omp-general.h (omp_max_vf): Return a poly_uint64 instead of an int.
27254 * omp-general.c (omp_max_vf): Likewise.
27255 * omp-expand.c (omp_adjust_chunk_size): Update call to omp_max_vf.
27256 (expand_omp_simd): Handle polynomial safelen.
27257 * omp-low.c (omplow_simd_context): Add a default constructor.
27258 (omplow_simd_context::max_vf): Change from int to poly_uint64.
27259 (lower_rec_simd_input_clauses): Update accordingly.
27260 (lower_rec_input_clauses): Likewise.
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-vectorizer.h (vect_nunits_for_cost): New function.
27267 * tree-vect-loop.c (vect_model_reduction_cost): Use it.
27268 * tree-vect-slp.c (vect_analyze_slp_cost_1): Likewise.
27269 (vect_analyze_slp_cost): Likewise.
27270 * tree-vect-stmts.c (vect_model_store_cost): Likewise.
27271 (vect_model_load_cost): Likewise.
27273 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27274 Alan Hayward <alan.hayward@arm.com>
27275 David Sherwood <david.sherwood@arm.com>
27277 * tree-vect-slp.c (vect_record_max_nunits, vect_build_slp_tree_1)
27278 (vect_build_slp_tree_2, vect_build_slp_tree): Change max_nunits
27279 from an unsigned int * to a poly_uint64_pod *.
27280 (calculate_unrolling_factor): New function.
27281 (vect_analyze_slp_instance): Use it. Track polynomial max_nunits.
27283 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27284 Alan Hayward <alan.hayward@arm.com>
27285 David Sherwood <david.sherwood@arm.com>
27287 * tree-vectorizer.h (_slp_instance::unrolling_factor): Change
27288 from an unsigned int to a poly_uint64.
27289 (_loop_vec_info::slp_unrolling_factor): Likewise.
27290 (_loop_vec_info::vectorization_factor): Change from an int
27292 (MAX_VECTORIZATION_FACTOR): Bump from 64 to INT_MAX.
27293 (vect_get_num_vectors): New function.
27294 (vect_update_max_nunits, vect_vf_for_cost): Likewise.
27295 (vect_get_num_copies): Use vect_get_num_vectors.
27296 (vect_analyze_data_ref_dependences): Change max_vf from an int *
27297 to an unsigned int *.
27298 (vect_analyze_data_refs): Change min_vf from an int * to a
27300 (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
27301 than an unsigned HOST_WIDE_INT.
27302 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
27303 (vect_analyze_data_ref_dependence): Change max_vf from an int *
27304 to an unsigned int *.
27305 (vect_analyze_data_ref_dependences): Likewise.
27306 (vect_compute_data_ref_alignment): Handle polynomial vf.
27307 (vect_enhance_data_refs_alignment): Likewise.
27308 (vect_prune_runtime_alias_test_list): Likewise.
27309 (vect_shift_permute_load_chain): Likewise.
27310 (vect_supportable_dr_alignment): Likewise.
27311 (dependence_distance_ge_vf): Take the vectorization factor as a
27312 poly_uint64 rather than an unsigned HOST_WIDE_INT.
27313 (vect_analyze_data_refs): Change min_vf from an int * to a
27315 * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Take
27316 vfm1 as a poly_uint64 rather than an int. Make the same change
27317 for the returned bound_scalar.
27318 (vect_gen_vector_loop_niters): Handle polynomial vf.
27319 (vect_do_peeling): Likewise. Update call to
27320 vect_gen_scalar_loop_niters and handle polynomial bound_scalars.
27321 (vect_gen_vector_loop_niters_mult_vf): Assert that the vf must
27323 * tree-vect-loop.c (vect_determine_vectorization_factor)
27324 (vect_update_vf_for_slp, vect_analyze_loop_2): Handle polynomial vf.
27325 (vect_get_known_peeling_cost): Likewise.
27326 (vect_estimate_min_profitable_iters, vectorizable_reduction): Likewise.
27327 (vect_worthwhile_without_simd_p, vectorizable_induction): Likewise.
27328 (vect_transform_loop): Likewise. Use the lowest possible VF when
27329 updating the upper bounds of the loop.
27330 (vect_min_worthwhile_factor): Make static. Return an unsigned int
27331 rather than an int.
27332 * tree-vect-slp.c (vect_attempt_slp_rearrange_stmts): Cope with
27333 polynomial unroll factors.
27334 (vect_analyze_slp_cost_1, vect_analyze_slp_instance): Likewise.
27335 (vect_make_slp_decision): Likewise.
27336 (vect_supported_load_permutation_p): Likewise, and polynomial
27338 (vect_analyze_slp_cost): Handle polynomial vf.
27339 (vect_slp_analyze_node_operations): Likewise.
27340 (vect_slp_analyze_bb_1): Likewise.
27341 (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
27342 than an unsigned HOST_WIDE_INT.
27343 * tree-vect-stmts.c (vectorizable_simd_clone_call, vectorizable_store)
27344 (vectorizable_load): Handle polynomial vf.
27345 * tree-vectorizer.c (simduid_to_vf::vf): Change from an int to
27347 (adjust_simduid_builtins, shrink_simd_arrays): Update accordingly.
27349 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27350 Alan Hayward <alan.hayward@arm.com>
27351 David Sherwood <david.sherwood@arm.com>
27353 * match.pd: Handle bit operations involving three constants
27354 and try to fold one pair.
27356 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27358 * tree-vect-loop-manip.c: Include gimple-fold.h.
27359 (slpeel_make_loop_iterate_ntimes): Add step, final_iv and
27360 niters_maybe_zero parameters. Handle other cases besides a step of 1.
27361 (vect_gen_vector_loop_niters): Add a step_vector_ptr parameter.
27362 Add a path that uses a step of VF instead of 1, but disable it
27364 (vect_do_peeling): Add step_vector, niters_vector_mult_vf_var
27365 and niters_no_overflow parameters. Update calls to
27366 slpeel_make_loop_iterate_ntimes and vect_gen_vector_loop_niters.
27367 Create a new SSA name if the latter choses to use a ste other
27368 than zero, and return it via niters_vector_mult_vf_var.
27369 * tree-vect-loop.c (vect_transform_loop): Update calls to
27370 vect_do_peeling, vect_gen_vector_loop_niters and
27371 slpeel_make_loop_iterate_ntimes.
27372 * tree-vectorizer.h (slpeel_make_loop_iterate_ntimes, vect_do_peeling)
27373 (vect_gen_vector_loop_niters): Update declarations after above changes.
27375 2018-01-02 Michael Meissner <meissner@linux.vnet.ibm.com>
27377 * config/rs6000/rs6000.md (floor<mode>2): Add support for IEEE
27378 128-bit round to integer instructions.
27379 (ceil<mode>2): Likewise.
27380 (btrunc<mode>2): Likewise.
27381 (round<mode>2): Likewise.
27383 2018-01-02 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
27385 * config/rs6000/rs6000-string.c (expand_block_move): Allow the use of
27386 unaligned VSX load/store on P8/P9.
27387 (expand_block_clear): Allow the use of unaligned VSX
27388 load/store on P8/P9.
27390 2018-01-02 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
27392 * config/rs6000/rs6000-p8swap.c (swap_feeds_both_load_and_store):
27394 (rs6000_analyze_swaps): Mark a web unoptimizable if it contains a
27395 swap associated with both a load and a store.
27397 2018-01-02 Andrew Waterman <andrew@sifive.com>
27399 * config/riscv/linux.h (ICACHE_FLUSH_FUNC): New.
27400 * config/riscv/riscv.md (clear_cache): Use it.
27402 2018-01-02 Artyom Skrobov <tyomitch@gmail.com>
27404 * web.c: Remove out-of-date comment.
27406 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
27408 * expr.c (fixup_args_size_notes): Check that any existing
27409 REG_ARGS_SIZE notes are correct, and don't try to re-add them.
27410 (emit_single_push_insn_1): Move stack_pointer_delta adjustment to...
27411 (emit_single_push_insn): ...here.
27413 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
27415 * rtl.h (CONST_VECTOR_ELT): Redefine to const_vector_elt.
27416 (const_vector_encoded_nelts): New function.
27417 (CONST_VECTOR_NUNITS): Redefine to use GET_MODE_NUNITS.
27418 (const_vector_int_elt, const_vector_elt): Declare.
27419 * emit-rtl.c (const_vector_int_elt_1): New function.
27420 (const_vector_elt): Likewise.
27421 * simplify-rtx.c (simplify_immed_subreg): Avoid taking the address
27422 of CONST_VECTOR_ELT.
27424 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
27426 * expr.c: Include rtx-vector-builder.h.
27427 (const_vector_mask_from_tree): Use rtx_vector_builder and operate
27428 directly on the tree encoding.
27429 (const_vector_from_tree): Likewise.
27430 * optabs.c: Include rtx-vector-builder.h.
27431 (expand_vec_perm_var): Use rtx_vector_builder and create a repeating
27432 sequence of "u" values.
27433 * vec-perm-indices.c: Include rtx-vector-builder.h.
27434 (vec_perm_indices_to_rtx): Use rtx_vector_builder and operate
27435 directly on the vec_perm_indices encoding.
27437 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
27439 * doc/rtl.texi (const_vector): Describe new encoding scheme.
27440 * Makefile.in (OBJS): Add rtx-vector-builder.o.
27441 * rtx-vector-builder.h: New file.
27442 * rtx-vector-builder.c: Likewise.
27443 * rtl.h (rtx_def::u2): Add a const_vector field.
27444 (CONST_VECTOR_NPATTERNS): New macro.
27445 (CONST_VECTOR_NELTS_PER_PATTERN): Likewise.
27446 (CONST_VECTOR_DUPLICATE_P): Likewise.
27447 (CONST_VECTOR_STEPPED_P): Likewise.
27448 (CONST_VECTOR_ENCODED_ELT): Likewise.
27449 (const_vec_duplicate_p): Check for a duplicated vector encoding.
27450 (unwrap_const_vec_duplicate): Likewise.
27451 (const_vec_series_p): Check for a non-duplicated vector encoding.
27452 Say that the function only returns true for integer vectors.
27453 * emit-rtl.c: Include rtx-vector-builder.h.
27454 (gen_const_vec_duplicate_1): Delete.
27455 (gen_const_vector): Call gen_const_vec_duplicate instead of
27456 gen_const_vec_duplicate_1.
27457 (const_vec_series_p_1): Operate directly on the CONST_VECTOR encoding.
27458 (gen_const_vec_duplicate): Use rtx_vector_builder.
27459 (gen_const_vec_series): Likewise.
27460 (gen_rtx_CONST_VECTOR): Likewise.
27461 * config/powerpcspe/powerpcspe.c: Include rtx-vector-builder.h.
27462 (swap_const_vector_halves): Take an rtx pointer rather than rtx.
27463 Build a new vector rather than modifying a CONST_VECTOR in-place.
27464 (handle_special_swappables): Update call accordingly.
27465 * config/rs6000/rs6000-p8swap.c: Include rtx-vector-builder.h.
27466 (swap_const_vector_halves): Take an rtx pointer rather than rtx.
27467 Build a new vector rather than modifying a CONST_VECTOR in-place.
27468 (handle_special_swappables): Update call accordingly.
27470 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
27472 * simplify-rtx.c (simplify_const_binary_operation): Use
27473 CONST_VECTOR_ELT instead of XVECEXP.
27475 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
27477 * tree-cfg.c (verify_gimple_assign_ternary): Allow the size of
27478 the selector elements to be different from the data elements
27479 if the selector is a VECTOR_CST.
27480 * tree-vect-stmts.c (vect_gen_perm_mask_any): Use a vector of
27481 ssizetype for the selector.
27483 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
27485 * optabs.c (shift_amt_for_vec_perm_mask): Try using series_p
27486 before testing each element individually.
27487 * tree-vect-generic.c (lower_vec_perm): Likewise.
27489 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
27491 * selftest.h (selftest::vec_perm_indices_c_tests): Declare.
27492 * selftest-run-tests.c (selftest::run_tests): Call it.
27493 * vector-builder.h (vector_builder::operator ==): New function.
27494 (vector_builder::operator !=): Likewise.
27495 * vec-perm-indices.h (vec_perm_indices::series_p): Declare.
27496 (vec_perm_indices::all_from_input_p): New function.
27497 * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
27498 (test_vec_perm_12, selftest::vec_perm_indices_c_tests): Likewise.
27499 * fold-const.c (fold_ternary_loc): Use tree_to_vec_perm_builder
27500 instead of reading the VECTOR_CST directly. Detect whether both
27501 vector inputs are the same before constructing the vec_perm_indices,
27502 and update the number of inputs argument accordingly. Use the
27503 utility functions added above. Only construct sel2 if we need to.
27505 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
27507 * optabs.c (expand_vec_perm_var): Use an explicit encoding for
27508 the broadcast of the low byte.
27509 (expand_mult_highpart): Use an explicit encoding for the permutes.
27510 * optabs-query.c (can_mult_highpart_p): Likewise.
27511 * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Likewise.
27512 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
27513 (vectorizable_bswap): Likewise.
27514 * tree-vect-data-refs.c (vect_grouped_store_supported): Use an
27515 explicit encoding for the power-of-2 permutes.
27516 (vect_permute_store_chain): Likewise.
27517 (vect_grouped_load_supported): Likewise.
27518 (vect_permute_load_chain): Likewise.
27520 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
27522 * vec-perm-indices.h (vec_perm_indices_to_tree): Declare.
27523 * vec-perm-indices.c (vec_perm_indices_to_tree): New function.
27524 * tree-ssa-forwprop.c (simplify_vector_constructor): Use it.
27525 * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
27526 * tree-vect-stmts.c (vectorizable_bswap): Likewise.
27527 (vect_gen_perm_mask_any): Likewise.
27529 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
27531 * int-vector-builder.h: New file.
27532 * vec-perm-indices.h: Include int-vector-builder.h.
27533 (vec_perm_indices): Redefine as an int_vector_builder.
27534 (auto_vec_perm_indices): Delete.
27535 (vec_perm_builder): Redefine as a stand-alone class.
27536 (vec_perm_indices::vec_perm_indices): New function.
27537 (vec_perm_indices::clamp): Likewise.
27538 * vec-perm-indices.c: Include fold-const.h and tree-vector-builder.h.
27539 (vec_perm_indices::new_vector): New function.
27540 (vec_perm_indices::new_expanded_vector): Update for new
27541 vec_perm_indices class.
27542 (vec_perm_indices::rotate_inputs): New function.
27543 (vec_perm_indices::all_in_range_p): Operate directly on the
27544 encoded form, without computing elided elements.
27545 (tree_to_vec_perm_builder): Operate directly on the VECTOR_CST
27546 encoding. Update for new vec_perm_indices class.
27547 * optabs.c (expand_vec_perm_const): Create a vec_perm_indices for
27548 the given vec_perm_builder.
27549 (expand_vec_perm_var): Update vec_perm_builder constructor.
27550 (expand_mult_highpart): Use vec_perm_builder instead of
27551 auto_vec_perm_indices.
27552 * optabs-query.c (can_mult_highpart_p): Use vec_perm_builder and
27553 vec_perm_indices instead of auto_vec_perm_indices. Use a single
27554 or double series encoding as appropriate.
27555 * fold-const.c (fold_ternary_loc): Use vec_perm_builder and
27556 vec_perm_indices instead of auto_vec_perm_indices.
27557 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
27558 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
27559 (vect_permute_store_chain): Likewise.
27560 (vect_grouped_load_supported): Likewise.
27561 (vect_permute_load_chain): Likewise.
27562 (vect_shift_permute_load_chain): Likewise.
27563 * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
27564 (vect_transform_slp_perm_load): Likewise.
27565 (vect_schedule_slp_instance): Likewise.
27566 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
27567 (vectorizable_mask_load_store): Likewise.
27568 (vectorizable_bswap): Likewise.
27569 (vectorizable_store): Likewise.
27570 (vectorizable_load): Likewise.
27571 * tree-vect-generic.c (lower_vec_perm): Use vec_perm_builder and
27572 vec_perm_indices instead of auto_vec_perm_indices. Use
27573 tree_to_vec_perm_builder to read the vector from a tree.
27574 * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Take a
27575 vec_perm_builder instead of a vec_perm_indices.
27576 (have_whole_vector_shift): Use vec_perm_builder and
27577 vec_perm_indices instead of auto_vec_perm_indices. Leave the
27578 truncation to calc_vec_perm_mask_for_shift.
27579 (vect_create_epilog_for_reduction): Likewise.
27580 * config/aarch64/aarch64.c (expand_vec_perm_d::perm): Change
27581 from auto_vec_perm_indices to vec_perm_indices.
27582 (aarch64_expand_vec_perm_const_1): Use rotate_inputs on d.perm
27583 instead of changing individual elements.
27584 (aarch64_vectorize_vec_perm_const): Use new_vector to install
27585 the vector in d.perm.
27586 * config/arm/arm.c (expand_vec_perm_d::perm): Change
27587 from auto_vec_perm_indices to vec_perm_indices.
27588 (arm_expand_vec_perm_const_1): Use rotate_inputs on d.perm
27589 instead of changing individual elements.
27590 (arm_vectorize_vec_perm_const): Use new_vector to install
27591 the vector in d.perm.
27592 * config/powerpcspe/powerpcspe.c (rs6000_expand_extract_even):
27593 Update vec_perm_builder constructor.
27594 (rs6000_expand_interleave): Likewise.
27595 * config/rs6000/rs6000.c (rs6000_expand_extract_even): Likewise.
27596 (rs6000_expand_interleave): Likewise.
27598 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
27600 * optabs-query.c (can_vec_perm_var_p): Check whether lowering
27601 to qimode could truncate the indices.
27602 * optabs.c (expand_vec_perm_var): Likewise.
27604 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
27606 * Makefile.in (OBJS): Add vec-perm-indices.o.
27607 * vec-perm-indices.h: New file.
27608 * vec-perm-indices.c: Likewise.
27609 * target.h (vec_perm_indices): Replace with a forward class
27611 (auto_vec_perm_indices): Move to vec-perm-indices.h.
27612 * optabs.h: Include vec-perm-indices.h.
27613 (expand_vec_perm): Delete.
27614 (selector_fits_mode_p, expand_vec_perm_var): Declare.
27615 (expand_vec_perm_const): Declare.
27616 * target.def (vec_perm_const_ok): Replace with...
27617 (vec_perm_const): ...this new hook.
27618 * doc/tm.texi.in (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Replace with...
27619 (TARGET_VECTORIZE_VEC_PERM_CONST): ...this new hook.
27620 * doc/tm.texi: Regenerate.
27621 * optabs.def (vec_perm_const): Delete.
27622 * doc/md.texi (vec_perm_const): Likewise.
27623 (vec_perm): Refer to TARGET_VECTORIZE_VEC_PERM_CONST.
27624 * expr.c (expand_expr_real_2): Use expand_vec_perm_const rather than
27625 expand_vec_perm for constant permutation vectors. Assert that
27626 the mode of variable permutation vectors is the integer equivalent
27627 of the mode that is being permuted.
27628 * optabs-query.h (selector_fits_mode_p): Declare.
27629 * optabs-query.c: Include vec-perm-indices.h.
27630 (selector_fits_mode_p): New function.
27631 (can_vec_perm_const_p): Check whether targetm.vectorize.vec_perm_const
27632 is defined, instead of checking whether the vec_perm_const_optab
27633 exists. Use targetm.vectorize.vec_perm_const instead of
27634 targetm.vectorize.vec_perm_const_ok. Check whether the indices
27635 fit in the vector mode before using a variable permute.
27636 * optabs.c (shift_amt_for_vec_perm_mask): Take a mode and a
27637 vec_perm_indices instead of an rtx.
27638 (expand_vec_perm): Replace with...
27639 (expand_vec_perm_const): ...this new function. Take the selector
27640 as a vec_perm_indices rather than an rtx. Also take the mode of
27641 the selector. Update call to shift_amt_for_vec_perm_mask.
27642 Use targetm.vectorize.vec_perm_const instead of vec_perm_const_optab.
27643 Use vec_perm_indices::new_expanded_vector to expand the original
27644 selector into bytes. Check whether the indices fit in the vector
27645 mode before using a variable permute.
27646 (expand_vec_perm_var): Make global.
27647 (expand_mult_highpart): Use expand_vec_perm_const.
27648 * fold-const.c: Includes vec-perm-indices.h.
27649 * tree-ssa-forwprop.c: Likewise.
27650 * tree-vect-data-refs.c: Likewise.
27651 * tree-vect-generic.c: Likewise.
27652 * tree-vect-loop.c: Likewise.
27653 * tree-vect-slp.c: Likewise.
27654 * tree-vect-stmts.c: Likewise.
27655 * config/aarch64/aarch64-protos.h (aarch64_expand_vec_perm_const):
27657 * config/aarch64/aarch64-simd.md (vec_perm_const<mode>): Delete.
27658 * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const)
27659 (aarch64_vectorize_vec_perm_const_ok): Fuse into...
27660 (aarch64_vectorize_vec_perm_const): ...this new function.
27661 (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
27662 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
27663 * config/arm/arm-protos.h (arm_expand_vec_perm_const): Delete.
27664 * config/arm/vec-common.md (vec_perm_const<mode>): Delete.
27665 * config/arm/arm.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
27666 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
27667 (arm_expand_vec_perm_const, arm_vectorize_vec_perm_const_ok): Merge
27669 (arm_vectorize_vec_perm_const): ...this new function. Explicitly
27670 check for NEON modes.
27671 * config/i386/i386-protos.h (ix86_expand_vec_perm_const): Delete.
27672 * config/i386/sse.md (VEC_PERM_CONST, vec_perm_const<mode>): Delete.
27673 * config/i386/i386.c (ix86_expand_vec_perm_const_1): Update comment.
27674 (ix86_expand_vec_perm_const, ix86_vectorize_vec_perm_const_ok): Merge
27676 (ix86_vectorize_vec_perm_const): ...this new function. Incorporate
27677 the old VEC_PERM_CONST conditions.
27678 * config/ia64/ia64-protos.h (ia64_expand_vec_perm_const): Delete.
27679 * config/ia64/vect.md (vec_perm_const<mode>): Delete.
27680 * config/ia64/ia64.c (ia64_expand_vec_perm_const)
27681 (ia64_vectorize_vec_perm_const_ok): Merge into...
27682 (ia64_vectorize_vec_perm_const): ...this new function.
27683 * config/mips/loongson.md (vec_perm_const<mode>): Delete.
27684 * config/mips/mips-msa.md (vec_perm_const<mode>): Delete.
27685 * config/mips/mips-ps-3d.md (vec_perm_constv2sf): Delete.
27686 * config/mips/mips-protos.h (mips_expand_vec_perm_const): Delete.
27687 * config/mips/mips.c (mips_expand_vec_perm_const)
27688 (mips_vectorize_vec_perm_const_ok): Merge into...
27689 (mips_vectorize_vec_perm_const): ...this new function.
27690 * config/powerpcspe/altivec.md (vec_perm_constv16qi): Delete.
27691 * config/powerpcspe/paired.md (vec_perm_constv2sf): Delete.
27692 * config/powerpcspe/spe.md (vec_perm_constv2si): Delete.
27693 * config/powerpcspe/vsx.md (vec_perm_const<mode>): Delete.
27694 * config/powerpcspe/powerpcspe-protos.h (altivec_expand_vec_perm_const)
27695 (rs6000_expand_vec_perm_const): Delete.
27696 * config/powerpcspe/powerpcspe.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK):
27698 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
27699 (altivec_expand_vec_perm_const_le): Take each operand individually.
27700 Operate on constant selectors rather than rtxes.
27701 (altivec_expand_vec_perm_const): Likewise. Update call to
27702 altivec_expand_vec_perm_const_le.
27703 (rs6000_expand_vec_perm_const): Delete.
27704 (rs6000_vectorize_vec_perm_const_ok): Delete.
27705 (rs6000_vectorize_vec_perm_const): New function.
27706 (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
27707 an element count and rtx array.
27708 (rs6000_expand_extract_even): Update call accordingly.
27709 (rs6000_expand_interleave): Likewise.
27710 * config/rs6000/altivec.md (vec_perm_constv16qi): Delete.
27711 * config/rs6000/paired.md (vec_perm_constv2sf): Delete.
27712 * config/rs6000/vsx.md (vec_perm_const<mode>): Delete.
27713 * config/rs6000/rs6000-protos.h (altivec_expand_vec_perm_const)
27714 (rs6000_expand_vec_perm_const): Delete.
27715 * config/rs6000/rs6000.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
27716 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
27717 (altivec_expand_vec_perm_const_le): Take each operand individually.
27718 Operate on constant selectors rather than rtxes.
27719 (altivec_expand_vec_perm_const): Likewise. Update call to
27720 altivec_expand_vec_perm_const_le.
27721 (rs6000_expand_vec_perm_const): Delete.
27722 (rs6000_vectorize_vec_perm_const_ok): Delete.
27723 (rs6000_vectorize_vec_perm_const): New function. Remove stray
27724 reference to the SPE evmerge intructions.
27725 (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
27726 an element count and rtx array.
27727 (rs6000_expand_extract_even): Update call accordingly.
27728 (rs6000_expand_interleave): Likewise.
27729 * config/sparc/sparc.md (vec_perm_constv8qi): Delete in favor of...
27730 * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): ...this
27732 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
27734 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
27736 * optabs.c (expand_vec_perm_1): Assert that SEL has an integer
27737 vector mode and that that mode matches the mode of the data
27739 (expand_vec_perm): Split handling of non-CONST_VECTOR selectors
27740 out into expand_vec_perm_var. Do all CONST_VECTOR handling here,
27741 directly using expand_vec_perm_1 when forcing selectors into
27743 (expand_vec_perm_var): New function, split out from expand_vec_perm.
27745 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
27747 * optabs-query.h (can_vec_perm_p): Delete.
27748 (can_vec_perm_var_p, can_vec_perm_const_p): Declare.
27749 * optabs-query.c (can_vec_perm_p): Split into...
27750 (can_vec_perm_var_p, can_vec_perm_const_p): ...these two functions.
27751 (can_mult_highpart_p): Use can_vec_perm_const_p to test whether a
27752 particular selector is valid.
27753 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
27754 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
27755 (vect_grouped_load_supported): Likewise.
27756 (vect_shift_permute_load_chain): Likewise.
27757 * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
27758 (vect_transform_slp_perm_load): Likewise.
27759 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
27760 (vectorizable_bswap): Likewise.
27761 (vect_gen_perm_mask_checked): Likewise.
27762 * fold-const.c (fold_ternary_loc): Likewise. Don't take
27763 implementations of variable permutation vectors into account
27764 when deciding which selector to use.
27765 * tree-vect-loop.c (have_whole_vector_shift): Don't check whether
27766 vec_perm_const_optab is supported; instead use can_vec_perm_const_p
27767 with a false third argument.
27768 * tree-vect-generic.c (lower_vec_perm): Use can_vec_perm_const_p
27769 to test whether the constant selector is valid and can_vec_perm_var_p
27770 to test whether a variable selector is valid.
27772 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
27774 * optabs-query.h (can_vec_perm_p): Take a const vec_perm_indices *.
27775 * optabs-query.c (can_vec_perm_p): Likewise.
27776 * fold-const.c (fold_vec_perm): Take a const vec_perm_indices &
27777 instead of vec_perm_indices.
27778 * tree-vectorizer.h (vect_gen_perm_mask_any): Likewise,
27779 (vect_gen_perm_mask_checked): Likewise,
27780 * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise,
27781 (vect_gen_perm_mask_checked): Likewise,
27783 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
27785 * optabs-query.h (qimode_for_vec_perm): Declare.
27786 * optabs-query.c (can_vec_perm_p): Split out qimode search to...
27787 (qimode_for_vec_perm): ...this new function.
27788 * optabs.c (expand_vec_perm): Use qimode_for_vec_perm.
27790 2018-01-02 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
27792 * rtlanal.c (canonicalize_condition): Return 0 if final rtx
27793 does not have a conditional at the top.
27795 2018-01-02 Richard Biener <rguenther@suse.de>
27797 * ipa-inline.c (big_speedup_p): Fix expression.
27799 2018-01-02 Jan Hubicka <hubicka@ucw.cz>
27802 * config/i386/x86-tune-costs.h: Increase cost of integer load costs
27805 2018-01-02 Jan Hubicka <hubicka@ucw.cz>
27809 * x86-tune-costs.h (generic_cost): Reduce cost of FDIV 20->17,
27810 cost of sqrt 20->14, DIVSS 18->13, DIVSD 32->17, SQRtSS 30->14
27811 and SQRTsD 58->18, cond_not_taken_branch_cost. 2->1. Increase
27812 cond_taken_branch_cost 3->4.
27814 2018-01-01 Jakub Jelinek <jakub@redhat.com>
27816 PR tree-optimization/83581
27817 * tree-loop-distribution.c (pass_loop_distribution::execute): Return
27818 TODO_cleanup_cfg if any changes have been made.
27820 PR middle-end/83608
27821 * expr.c (store_expr_with_bounds): Use simplify_gen_subreg instead of
27822 convert_modes if target mode has the right side, but different mode
27825 PR middle-end/83609
27826 * expr.c (expand_assignment): Fix up a typo in simplify_gen_subreg
27827 last argument when extracting from CONCAT. If either from_real or
27828 from_imag is NULL, use expansion through memory. If result is not
27829 a CONCAT and simplify_gen_subreg fails, try to simplify_gen_subreg
27830 the parts directly to inner mode, if even that fails, use expansion
27833 PR middle-end/83623
27834 * expmed.c (expand_shift_1): For 2-byte rotates by BITS_PER_UNIT,
27835 check for bswap in mode rather than HImode and use that in expand_unop
27838 Copyright (C) 2018 Free Software Foundation, Inc.
27840 Copying and distribution of this file, with or without modification,
27841 are permitted in any medium without royalty provided the copyright
27842 notice and this notice are preserved.