1 2018-10-15 Andreas Krebbel <krebbel@linux.ibm.com>
3 * config/s390/s390.c (s390_expand_vec_init): Force vector element
4 into reg if it isn't a general operand.
6 2018-10-14 H.J. Lu <hongjiu.lu@intel.com>
9 * config/i386/sse.md (*vec_dupv2di): Add register source to
12 2018-10-14 H.J. Lu <hongjiu.lu@intel.com>
15 * common/config/i386/i386-common.c (OPTION_MASK_ISA_AVX512F_UNSET):
16 Add OPTION_MASK_ISA_AVX512IFMA_UNSET,
17 OPTION_MASK_ISA_AVX5124FMAPS_UNSET and
18 OPTION_MASK_ISA_AVX5124VNNIW_UNSET.
20 2018-10-13 Eric Botcazou <ebotcazou@adacore.com>
22 * dwarf2cfi.c (struct dw_trace_info): Add args_size_defined_for_eh.
23 (notice_args_size): Set it in the current trace if no insn that can
24 throw internally has been seen yet.
25 (connect_traces): When connecting args_size between traces, allow the
26 incoming values not to match if there is an insn setting it before the
27 first insn that can throw internally; in that case, force the creation
28 of a CFI note on this latter insn.
30 2018-10-13 Jonathan Wakely <jwakely@redhat.com>
32 * opt-problem.h (opt_wrapper): Use template-argument-list when naming
33 the base class, because using the injected-class-name was not clearly
34 specified until DR 176.
36 2018-10-12 Paul Koning <ni1d@arrl.net>
38 * config/pdp11/pdp11.md (doloop_end): New expander.
39 (doloop_end_insn): renamed from "doloop_end".
40 (addqi3): New pattern.
41 (subqi3): New pattern.
42 * config/pdp11/predicates.md (incdec_operand): New predicate.
44 2018-10-12 Yury Gribov <tetra2005@gmail.com>
47 * real.c (format_helper::can_represent_integral_type_p): New function
48 * real.h (format_helper::can_represent_integral_type_p): Ditto.
49 * match.pd: New pattern.
51 2018-10-12 Alexandre Oliva <oliva@adacore.com>
53 * configure.ac: Introduce --enable-large-address-aware
54 to define MINGW_DEFAULT_LARGE_ADDR_AWARE.
55 * doc/install.texi: Document it.
56 * configure, config.in: Rebuilt.
57 * config/i386/mingw32.h (LINK_SPEC_LARGE_ADDR_AWARE): Define,
58 based on MINGW_DEFAULT_LARGE_ADDR_AWARE.
59 (LINK_SPEC): Insert it.
60 * config/i386/mingw-264.h: Likewise.
62 * cygming.h (HAVE_GAS_ALIGNED_COMM): Fallback-define.
64 2018-10-12 Peter Bergner <bergner@linux.ibm.com>
66 PR rtl-optimization/87600
67 * ira-lives (non_conflicting_reg_copy_p): Disable for non LRA targets.
69 2018-10-12 Paul Koning <ni1d@arrl.net>
71 * doc/md.texi (doloop_end): Document that the pattern code may
72 need to check operand mode.
74 2018-10-12 Wilco Dijkstra <wdijkstr@arm.com>
76 * config/aarch64/aarch64.md (zero_extendsidi2_aarch64): Add alternatives
77 to zero-extend between int and floating-point registers.
78 (load_pair_zero_extendsidi2_aarch64): Add alternative for zero-extended
79 ldp into floating-point registers. Add type and arch attributes.
80 (zero_extend<SHORT:mode><GPI:mode>2_aarch64): Add arch attribute.
81 Use f_loads for type attribute.
83 2018-10-11 Martin Sebor <msebor@redhat.com>
85 * doc/extend.texi (attribute packed): Correct typos.
87 2018-10-11 Martin Sebor <msebor@redhat.com>
89 * doc/extend.texi (attribute flatten): Mention interaction with
92 2018-10-11 Jan Hubicka <hubicka@ucw.cz>
95 * cgraphclones.c (cgraph_node::create_version_clone_with_body):
96 Set new_decl virtual flag to zero.
98 2018-10-11 Martin Sebor <msebor@redhat.com>
101 * doc/extend.texi (attribute format_arg): Discuss using multiple
102 attributes on a single function.
104 2018-10-11 Giuliano Belinassi <giuliano.belinassi@usp.br>
106 PR tree-optimization/86829
107 * match.pd (sin (atan (x))): New simplification rules.
108 (cos (atan (x))): Likewise.
109 * real.c (build_sinatan_real): New function.
110 * real.h (build_sinatan_real): Prototype.
112 2018-10-11 Will Schmidt <will_schmidt@vnet.ibm.com>
114 * config/rs6000/rs6000.c (map_to_integral_tree_type): New helper
116 (fold_mergeeo_helper): New helper function.
117 (rs6000_gimple_fold_builtin): Add hooks for vec_mergee and vec_mergeo
118 intrinsics. Correct some whitespace indentation issues.
120 2018-10-11 Wilco Dijkstra <wdijkstr@arm.com>
123 * config/aarch64/aarch64.c (aarch64_mask_and_shift_for_ubfiz_p):
124 Use HOST_WIDE_INT_1U for shift.
126 2018-10-11 Doug Rupp <rupp@adacore.com>
127 Olivier Hainque <hainque@adacore.com>
129 * config/rs6000/vxworks.h (VXWORKS_RELAX_LINK_SPEC): New macro.
130 Pass --relax to the linker for RTPs.
131 (LINK_SPEC): Append VXWORKS_RELAX_LINK_SPEC.
133 2018-10-11 Andrew Stubbs <ams@codesourcery.com>
134 Jan Hubicka <jh@suse.cz>
135 Martin Jambor <mjambor@suse.cz>
137 * print-rtl.c (print_rtx_operand_codes_E_and_V): Print how many times
138 the same elements are repeated rather than printing all of them.
139 * read-rtl.c (rtx_reader::read_rtx_operand): Recognize and expand
141 * read-rtl-function.c (test_loading_repeat): New function.
142 (read_rtl_function_c_tests): Call test_loading_repeat.
143 * rtl-tests.c (test_dumping_repeat): New function.
144 (rtl_tests_c_tests): Call test_dumping_repeat.
146 2018-10-11 Richard Biener <rguenther@suse.de>
148 * config/i386/x86-tune-costs.h (bdver?_memcpy, bdver?_memset,
149 bdver?_cost): Unify to ...
150 (bdver_memcpy, bdver_memset, bdver_cost): ... this.
151 * config/i386/i386.c (processor_cost_table): Adjust.
153 2018-10-10 Eric Botcazou <ebotcazou@adacore.com>
156 * cgraphunit.c (cgraph_node::expand_thunk): Force DECL_IGNORED_P on
157 the thunk when expanding to GIMPLE.
159 2018-10-10 Bernd Edlinger <bernd.edlinger@hotmail.de>
161 * varasm.c (mergeable_string_section): Don't try to move zero-length
162 strings to the merge section.
164 2018-10-10 Uros Bizjak <ubizjak@gmail.com>
167 * config/i386/mmx.md (const_vector 0 -> mem splitter): New splitter.
169 2018-10-10 Jakub Jelinek <jakub@redhat.com>
172 * config/i386/i386-builtin.def (IX86_BUILTIN_RDPMC): Move from args set
175 2018-10-10 Richard Biener <rguenther@suse.de>
177 * config/i386/sse.md (reduc_plus_scal_v8df, reduc_plus_scal_v4df,
178 reduc_plus_scal_v2df, reduc_plus_scal_v16sf, reduc_plus_scal_v8sf,
179 reduc_plus_scal_v4sf): Merge into pattern reducing to half width
180 and recursing and pattern terminating the recursion on SSE
181 vector width using ix86_expand_reduc.
182 (reduc_sminmax_scal_<mode>): Split into part reducing to half
183 width and recursing and SSE2 vector variant doing the final
184 reduction with ix86_expand_reduc.
185 (reduc_uminmax_scal_<mode>): Likewise for the AVX512 variants
186 with terminating the recursion at AVX level, splitting that
189 2018-10-09 David Malcolm <dmalcolm@redhat.com>
191 * genmatch.c (error_cb): Rename to...
192 (diagnostic_cb): ...this, converting int params to enums.
193 (fatal_at): Update for renaming.
194 (warning_at): Likewise.
196 * input.c (selftest::ebcdic_execution_charset::apply):
197 Update for renaming of...
198 (selftest::ebcdic_execution_charset::on_error): ...this, renaming
200 (selftest::ebcdic_execution_charset::on_diagnostic): ...this,
201 converting level and reason to enums.
202 (class selftest::lexer_error_sink): Rename to...
203 (class selftest::lexer_test_options): ...this, renaming field
204 "m_errors" to "m_diagnostics".
205 (selftest::lexer_test_options::apply): Update for renaming of...
206 (selftest::lexer_test_options::on_error): ...this, renaming to...
207 (selftest::lexer_test_options::on_diagnostic): ...this
208 converting level and reason to enums.
209 (selftest::test_lexer_string_locations_raw_string_unterminated):
210 Update for renamings.
211 * opth-gen.awk (struct cpp_reason_option_codes_t): Use enum for
214 2018-10-09 Paul A. Clarke <pc@us.ibm.com>
216 * config.gcc (powerpc*-*-*): Add pmmintrin.h to extra_headers.
217 * config/rs6000/pmmintrin.h: New file.
219 2018-10-09 Eric Botcazou <ebotcazou@adacore.com>
221 PR tree-optimization/86659
222 * gimple-match.h (gimple_match_op constructors): Initialize reverse.
224 2018-10-09 Richard Biener <rguenther@suse.de>
226 PR tree-optimization/63155
227 * tree-ssa-structalias.c: Include tree-ssa.h.
228 (get_constraint_for_ssa_var): For undefs return nothing_id.
229 (find_func_aliases): Cleanup PHI handling.
231 2018-10-09 Richard Biener <rguenther@suse.de>
233 * tree-vectorizer.c (dump_stmt_cost): Fix cut&paste missing
236 2018-10-09 Martin Liska <mliska@suse.cz>
238 * asan.c (asan_emit_stack_protection): If a stack variable
239 is located in a same file as current function, then emit
240 line info into variable definition string.
242 2018-10-08 Eric Botcazou <ebotcazou@adacore.com>
244 * print-rtl.c (rtx_writer::print_rtx_operand_code_i): Print column
247 2018-10-08 Eric Botcazou <ebotcazou@adacore.com>
249 * cgraphunit.c (cgraph_node::expand_thunk): Do not force DECL_IGNORED_P
252 2018-10-08 Eric Botcazou <ebotcazou@adacore.com>
254 PR tree-optimization/86659
255 * gimple-match.h (struct gimple_match_op): Add reverse field.
256 (gimple_match_op::set_op): New overloaded method.
257 * gimple-match-head.c (maybe_build_generic_op) <BIT_FIELD_REF>: Set
258 the REF_REVERSE_STORAGE_ORDER flag on the value.
259 (gimple_simplify) <GIMPLE_ASSIGN>: For BIT_FIELD_REF, propagate the
260 REF_REVERSE_STORAGE_ORDER flag and avoid simplifying if it is set.
262 2018-10-08 Richard Sandiford <richard.sandiford@arm.com>
265 * gimple-ssa-backprop.c (backprop::intersect_uses): Use
266 FOR_EACH_IMM_USE_FAST instead of FOR_EACH_IMM_USE_STMT.
268 2018-10-08 H.J. Lu <hongjiu.lu@intel.com>
271 * config/i386/avx512fintrin.h (_mm512_mask_fmaddsub_round_pd):
272 Defined with __builtin_ia32_vfmaddsubpd512_mask.
274 2018-10-08 Richard Biener <rguenther@suse.de>
276 * config/i386/x86-tune-costs.h (znver1_cost): Make AVX256 vector loads
277 cost the same as AVX128 ones.
279 2018-10-08 Paul Koning <ni1d@arrl.net>
281 * config/pdp11/pdp11-protos.h (output_block_move): Remove.
282 (expand_block_move): New function.
283 * config/pdp11/pdp11.c (output_block_move): Remove.
284 (expand_block_move): New function.
285 * config/pdp11/pdp11.h (MOVE_RATIO): New definition.
286 * config/pdp11/pdp11.md (movmemhi): Use expand_block_move.
287 (*movmemhi1): Remove.
289 2018-10-08 Robin Dapp <rdapp@linux.ibm.com>
291 * config/s390/2827.md: Increase latencies for some FP instructions.
293 2018-10-08 Richard Biener <rguenther@suse.de>
295 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost):
297 * tree-vectorizer.c (dump_stmt_cost): Add cost param and dump it.
298 * tree-vectorizer.h (dump_stmt_cost): Adjust.
299 (add_stmt_cost): Dump return value of the hook.
301 2018-10-08 Richard Biener <rguenther@suse.de>
303 PR tree-optimization/63155
304 * tree-ssa-propagate.c (add_ssa_edge): Do cheap check first.
305 (ssa_propagation_engine::ssa_propagate): Remove redundant
308 2018-10-05 Peter Bergner <bergner@linux.ibm.com>
310 PR rtl-optimization/86939
311 PR rtl-optimization/87479
312 * ira.h (non_conflicting_reg_copy_p): New prototype.
313 * ira-lives.c (ignore_reg_for_conflicts): New static variable.
314 (make_hard_regno_dead): Don't add conflicts for register
315 ignore_reg_for_conflicts.
316 (make_object_dead): Likewise.
317 (non_conflicting_reg_copy_p): New function.
318 (process_bb_node_lives): Set ignore_reg_for_conflicts for copies.
319 Remove special conflict handling of REAL_PIC_OFFSET_TABLE_REGNUM.
320 * lra-lives.c (ignore_reg_for_conflicts): New static variable.
321 (make_hard_regno_dead): Don't add conflicts for register
322 ignore_reg_for_conflicts. Remove special conflict handling of
323 REAL_PIC_OFFSET_TABLE_REGNUM. Remove now unused argument
324 check_pic_pseudo_p and update callers.
325 (mark_pseudo_dead): Don't add conflicts for register
326 ignore_reg_for_conflicts.
327 (process_bb_lives): Set ignore_reg_for_conflicts for copies.
329 2018-10-05 Andrew Waterman <andrew@sifive.com>
330 Jim Wilson <jimw@sifive.com>
332 * config/riscv/riscv.md (f<quiet_pattern>_quiet<ANYF:mode><X:mode>4):
333 Add define_expand. Add ! HONOR_SNANS check to current pattern. Add
334 new pattern using HONOR_SNANS that emits one extra instruction.
336 2018-10-05 Segher Boessenkool <segher@kernel.crashing.org>
338 * config/rs6000/rs6000.md (unnamed mfcr scc_comparison_operator
339 patterns): Merge SI and DI patterns to a GPR pattern.
340 (unnamed define_insn and define_split for record form of that): Merge
341 to a single define_insn_and_split pattern.
343 2018-10-05 David Malcolm <dmalcolm@redhat.com>
346 * input.c (expand_location_to_spelling_point): Add param "aspect"
347 and use rather than hardcoding LOCATION_ASPECT_CARET.
348 (get_substring_ranges_for_loc): Handle the case of a single token
349 within a macro expansion.
350 * input.h (expand_location_to_spelling_point): Add "aspect" param,
351 defaulting to LOCATION_ASPECT_CARET.
353 2018-10-05 Paul Koning <ni1d@arrl.net>
355 * config/pdp11/pdp11.c (TARGET_CXX_GUARD_TYPE): Define.
356 (TARGET_CXX_CLASS_DATA_ALWAYS_COMDAT): Define.
357 (TARGET_CXX_LIBRARY_RTTI_COMDAT): Define.
358 (pdp11_guard_type): New function.
360 2018-10-05 Paul Koning <ni1d@arrl.net>
362 * config/pdp11/pdp11.h (FLOAT_TYPE_SIZE): Always 32.
363 * config/pdp11/pdp11.opt (mfloat32): Remove.
365 * doc/invoke.texi (pdp11 -mfloat32): Remove:
366 (pdp11 -mfloat64): Remove.
368 2018-10-05 Uros Bizjak <ubizjak@gmail.com>
370 * config/i386/i386.md (*cmpxf_cc_i387): Remove pattern.
371 (*cmp<mode>_cc_i387): Ditto.
372 (*cmpu<mode>_cc_i387): Ditto.
373 (*cmp<X87MODEF:mode>_<SWI24:mode>_cc_i387): Ditto.
374 * config/i386/i386.c (ix86_expand_fp_compare): Remove
376 <case IX86_FPCMP_SAHF>: Do not generate pattern with HImode clobber.
377 Emit x86_sahf_1 pattern.
378 (ix86_expand_compare): Update call to ix86_expand_fp_compare.
379 (ix86_expand_carry_flag_compare): Ditto.
381 2018-10-05 Uros Bizjak <ubizjak@gmail.com>
383 * config/i386/i386.md (*cmpxf_i387): Change operand 2 predicate
384 to reg_or_0_operand. Add "C" constraint.
385 (*cmpxf_cc_i387): Ditto.
386 (*cmp<mode>_i387): Change operand 2 predicate
387 to nonimm_or_0_operand. Add "C" constraint.
388 (*cmp<mode>_cc_i387): Ditto.
389 (*cmp<mode>_0_i387): Remove insn pattern.
390 (*cmp<mode>_0_cc_i387): Ditto.
392 2018-10-05 Uros Bizjak <ubizjak@gmail.com>
394 * config/i386/constraints.md ("C"): Do not depend on TARGET_SSE.
395 * config/i386/predicates.md (nonimm_or_0_operand): Rename
396 from vector_move_operand. Update all uses.
398 2018-10-05 Martin Sebor <msebor@redhat.com>
400 PR tree-optimization/87490
401 * builtins.c (expand_builtin_strnlen): Handle a null data.decl
404 2018-10-05 Richard Biener <rguenther@suse.de>
406 PR tree-optimization/63155
407 * tree-ssa-ccp.c (ccp_propagate::visit_phi): Avoid excess
408 vertical space in dumpfiles.
409 * tree-ssa-propagate.h
410 (ssa_propagation_engine::process_ssa_edge_worklist): Remove.
411 * tree-ssa-propagate.c (cfg_blocks_back): New global.
412 (ssa_edge_worklist_back): Likewise.
413 (curr_order): Likewise.
414 (cfg_blocks_get): Remove abstraction.
415 (cfg_blocks_add): Likewise.
416 (cfg_blocks_empty_p): Likewise.
417 (add_ssa_edge): Add to current or next worklist based on
419 (add_control_edge): Likewise.
420 (ssa_propagation_engine::process_ssa_edge_worklist): Fold
422 (ssa_propagation_engine::ssa_propagate): ... here. Unify
423 iteration from CFG and SSA edge worklist so we process
424 everything in RPO order, prioritizing forward progress
426 (ssa_prop_init): Allocate new worklists, do not dump
428 (ssa_prop_fini): Free new worklists.
430 2018-10-05 Richard Biener <rguenther@suse.de>
432 * tree-core.h (tree_block::abstract_flag): Remove.
433 (tree_block::block_num): Make full 32bits.
434 * tree.def (BLOCK): Remove docs about BLOCK_ABSTRACT.
435 * tree.h (BLOCK_ABSTRACT): Remove.
436 * dwarf2out.c (gen_lexical_block_die): Remove dead code
437 resulting from BLOCK_ABSTRACT being always false.
438 (gen_inlined_subroutine_die): Likewise.
439 (gen_block_die): Likewise.
440 * tree.c (block_ultimate_origin): Likewise.
441 * tree-pretty-print.c (dump_block_node): Remove code dealing
443 * tree-ssa-live.c (dump_scope_block): Likewise.
444 * tree-streamer-in.c (unpack_ts_block_value_fields): Likewise.
445 * tree-streamer-out.c (pack_ts_block_value_fields): Likewise.
447 2018-10-05 Richard Biener <rguenther@suse.de>
449 * config/i386/i386.c (ix86_add_stmt_cost): When scalar cost
450 is asked for initialize mode to the component mode of the
453 2018-10-05 H.J. Lu <hongjiu.lu@intel.com>
456 * config/i386/gnu-user.h (ASM_SPEC): Don't pass -msse2avx to
458 * config/i386/gnu-user64.h (ASM_SPEC): Likewise.
460 2018-10-05 Segher Boessenkool <segher@kernel.crashing.org>
463 * config/rs6000/rs6000-builtin.def (RS6000_BUILTIN_SET_FPSCR_DRN): Use
465 * config/rs6000/rs6000.md (rs6000_set_fpscr_rn): Require the operand
466 to be DImode. When using mffscrn, force the operand to a register.
468 2018-10-04 Uros Bizjak <ubizjak@gmail.com>
470 * config/i386/i386.md (*fop_<X87MODEF:mode>_2_i387): Macroize insn
471 from *fop_<MODEF:mode>_2_i387 and *fop_xf_2_i387 using
472 X87MODEF mode iterator.
473 (*fop_<X87MODEF:mode>_3_i387): Macroize insn from
474 *fop_<MODEF:mode>_3_i387 and *fop_xf_3_i387 using
475 X87MODEF mode iterator.
477 2018-10-04 Vinay Kumar <vinay.kumar@blackfigtech.com>
479 * doc/invoke.texi (-Wno-prio-ctor-dtor): Document new warning
482 2018-10-04 David Malcolm <dmalcolm@redhat.com>
484 * Makefile.in (OBJS): Add opt-problem.o.
485 * dump-context.h: Include "selftest.h.
486 (selftest::temp_dump_context): New forward decl.
487 (class dump_context): Make friend of class
488 selftest::temp_dump_context.
489 (dump_context::dump_loc_immediate): New decl.
490 (class dump_pretty_printer): Move here from dumpfile.c.
491 (class temp_dump_context): Move to namespace selftest.
492 (temp_dump_context::temp_dump_context): Add param
493 "forcibly_enable_dumping".
494 (selftest::verify_dumped_text):
495 (ASSERT_DUMPED_TEXT_EQ): Move here from dumpfile.c.
496 (selftest::verify_item):
497 (ASSERT_IS_TEXT): Move here from dumpfile.c.
498 (ASSERT_IS_TREE): Likewise.
499 (ASSERT_IS_GIMPLE): Likewise.
500 * dumpfile.c (dump_context::dump_loc): Move immediate dumping
502 (dump_context::dump_loc_immediate): ...this new function.
503 (class dump_pretty_printer): Move to dump-context.h.
504 (dump_switch_p_1): Don't enable MSG_PRIORITY_REEMITTED.
505 (opt_info_switch_p_1): Enable MSG_PRIORITY_REEMITTED.
506 (temp_dump_context::temp_dump_context): Move to "selftest"
507 namespace. Add param "forcibly_enable_dumping", and use it to
508 conditionalize the use of m_pp;
509 (selftest::verify_dumped_text): Make non-static.
510 (ASSERT_DUMPED_TEXT_EQ): Move to dump-context.h.
511 (selftest::verify_item): Make non-static.
512 (ASSERT_IS_TEXT): Move to dump-context.h.
513 (ASSERT_IS_TREE): Likewise.
514 (ASSERT_IS_GIMPLE): Likewise.
515 (selftest::test_capture_of_dump_calls): Pass "true" for new
516 param of temp_dump_context.
517 * dumpfile.h (enum dump_flag): Add MSG_PRIORITY_REEMITTED, adding
518 it to MSG_ALL_PRIORITIES. Update values of TDF_COMPARE_DEBUG and
520 * opt-problem.cc: New file.
521 * opt-problem.h: New file.
522 * optinfo-emit-json.cc
523 (selftest::test_building_json_from_dump_calls): Pass "true" for
524 new param of temp_dump_context.
525 * optinfo.cc (optinfo_kind_to_dump_flag): New function.
526 (optinfo::emit_for_opt_problem): New function.
527 (optinfo::emit): Clarity which emit_item is used.
528 * optinfo.h (optinfo::get_dump_location): New accessor.
529 (optinfo::emit_for_opt_problem): New decl.
530 (optinfo::emit): Make const.
531 * selftest-run-tests.c (selftest::run_tests): Call
532 selftest::opt_problem_cc_tests.
533 * selftest.h (selftest::opt_problem_cc_tests): New decl.
534 * tree-data-ref.c (dr_analyze_innermost): Convert return type from
535 bool to opt_result, converting fprintf messages to
536 opt_result::failure_at calls. Add "stmt" param for use by the
538 (create_data_ref): Pass "stmt" to the dr_analyze_innermost call.
539 (runtime_alias_check_p): Convert return type from bool to
540 opt_result, converting dump_printf calls to
541 opt_result::failure_at, using the statement DDR_A for their
543 (find_data_references_in_stmt): Convert return type from bool to
544 opt_result, converting "return false" to opt_result::failure_at
546 * tree-data-ref.h: Include "opt-problem.h".
547 (dr_analyze_innermost): Convert return type from bool to opt_result,
548 and add a const gimple * param.
549 (find_data_references_in_stmt): Convert return type from bool to
551 (runtime_alias_check_p): Likewise.
552 * tree-predcom.c (find_looparound_phi): Pass "init_stmt" to
553 dr_analyze_innermost.
554 * tree-vect-data-refs.c (vect_mark_for_runtime_alias_test):
555 Convert return type from bool to opt_result, adding a message for
556 the PARAM_VECT_MAX_VERSION_FOR_ALIAS_CHECKS zero case.
557 (vect_analyze_data_ref_dependence): Convert return type from bool
558 to opt_result. Change sense of return type from "false"
559 effectively meaning "no problems" to "false" meaning a problem,
560 so that "return false" becomes "return opt_result::success".
561 Convert "return true" calls to opt_result::failure_at, using
562 the location of statement A rather than vect_location.
563 (vect_analyze_data_ref_dependences): Convert return type from bool
565 (verify_data_ref_alignment): Likewise, converting dump_printf_loc
566 calls to opt_result::failure_at, using the stmt location rather
568 (vect_verify_datarefs_alignment): Convert return type from bool
570 (vect_enhance_data_refs_alignment): Likewise. Split local "stat"
571 into multiple more-tightly-scoped copies.
572 (vect_analyze_data_refs_alignment): Convert return type from bool
574 (vect_analyze_data_ref_accesses): Likewise, converting a
575 "return false" to a "return opt_result::failure_at", adding a
577 (vect_prune_runtime_alias_test_list): Convert return type from
578 bool to opt_result, converting dump_printf_loc to
579 opt_result::failure_at. Add a %G to show the pertinent statement,
580 and use the stmt's location rather than vect_location.
581 (vect_find_stmt_data_reference): Convert return type from
582 bool to opt_result, converting dump_printf_loc to
583 opt_result::failure_at, using stmt's location.
584 (vect_analyze_data_refs): Convert return type from bool to
585 opt_result. Convert "return false" to "return
586 opt_result::failure_at", adding messages as needed.
587 * tree-vect-loop.c (vect_determine_vf_for_stmt_1): Convert return
588 type from bool to opt_result.
589 (vect_determine_vf_for_stmt): Likewise.
590 (vect_determine_vectorization_factor): Likewise, converting
591 dump_printf_loc to opt_result::failure_at, using location of phi
592 rather than vect_location.
593 (vect_analyze_loop_form_1): Convert return type from bool to
594 opt_result, converting dump_printf_loc calls, retaining the use of
596 (vect_analyze_loop_form): Convert return type from loop_vec_info
597 to opt_loop_vec_info.
598 (vect_analyze_loop_operations): Convert return type from bool to
599 opt_result, converting dump_printf_loc calls, using the location
600 of phi/stmt rather than vect_location where available. Convert
601 various "return false" to "return opt_result::failure_at" with
602 "unsupported phi" messages.
603 (vect_get_datarefs_in_loop): Convert return type from bool to
604 opt_result. Add a message for the
605 PARAM_LOOP_MAX_DATAREFS_FOR_DATADEPS failure.
606 (vect_analyze_loop_2): Convert return type from bool to
607 opt_result. Ensure "ok" is set to a opt_result::failure_at before
608 each "goto again;", adding new messages where needed.
609 Add "unsupported grouped {store|load}" messages.
610 (vect_analyze_loop): Convert return type from loop_vec_info to
612 * tree-vect-slp.c (vect_analyze_slp): Convert return type from
614 * tree-vect-stmts.c (process_use): Likewise, converting
615 dump_printf_loc call and using stmt location, rather than
617 (vect_mark_stmts_to_be_vectorized): Likeise.
618 (vect_analyze_stmt): Likewise, adding a %G.
619 (vect_get_vector_types_for_stmt): Convert return type from bool to
620 opt_result, converting dump_printf_loc calls and using stmt
621 location, rather than vect_location.
622 (vect_get_mask_type_for_stmt): Convert return type from tree to
623 opt_tree, converting dump_printf_loc calls and using stmt location.
624 * tree-vectorizer.c: Include "opt-problem.h.
625 (try_vectorize_loop_1): Flag "Analyzing loop at" dump message as
626 MSG_PRIORITY_INTERNALS. Convert local "loop_vinfo" from
627 loop_vec_info to opt_loop_vec_info. If if fails, and dumping is
628 enabled, use it to report at the top level "couldn't vectorize
629 loop" followed by the problem.
630 * tree-vectorizer.h (opt_loop_vec_info): New typedef.
631 (vect_mark_stmts_to_be_vectorized): Convert return type from bool
633 (vect_analyze_stmt): Likewise.
634 (vect_get_vector_types_for_stmt): Likewise.
635 (tree vect_get_mask_type_for_stmt): Likewise.
636 (vect_analyze_data_ref_dependences): Likewise.
637 (vect_enhance_data_refs_alignment): Likewise.
638 (vect_analyze_data_refs_alignment): Likewise.
639 (vect_verify_datarefs_alignment): Likewise.
640 (vect_analyze_data_ref_accesses): Likewise.
641 (vect_prune_runtime_alias_test_list): Likewise.
642 (vect_find_stmt_data_reference): Likewise.
643 (vect_analyze_data_refs): Likewise.
644 (vect_analyze_loop): Convert return type from loop_vec_info to
646 (vect_analyze_loop_form): Likewise.
647 (vect_analyze_slp): Convert return type from bool to opt_result.
649 2018-10-04 David Malcolm <dmalcolm@redhat.com>
651 * doc/invoke.texi (-fopt-info): Document new "internals"
653 * dump-context.h (dump_context::apply_dump_filter_p): New decl.
654 * dumpfile.c (dump_options): Update for renaming of MSG_ALL to
656 (optinfo_verbosity_options): Add "internals".
657 (kind_as_string): Update for renaming of MSG_ALL to MSG_ALL_KINDS.
658 (dump_context::apply_dump_filter_p): New member function.
659 (dump_context::dump_loc): Use apply_dump_filter_p rather than
660 explicitly masking the dump_kind.
661 (dump_context::begin_scope): Increment the scope depth first. Use
662 apply_dump_filter_p rather than explicitly masking the dump_kind.
663 (dump_context::emit_item): Use apply_dump_filter_p rather than
664 explicitly masking the dump_kind.
665 (dump_dec): Likewise.
666 (dump_hex): Likewise.
667 (dump_switch_p_1): Default to MSG_ALL_PRIORITIES.
668 (opt_info_switch_p_1): Default to MSG_PRIORITY_USER_FACING.
669 (opt_info_switch_p): Update handling of default
670 MSG_OPTIMIZED_LOCATIONS to cope with default of
671 MSG_PRIORITY_USER_FACING.
672 (dump_basic_block): Use apply_dump_filter_p rather than explicitly
673 masking the dump_kind.
674 (selftest::test_capture_of_dump_calls): Update test_dump_context
675 instances to use MSG_ALL_KINDS | MSG_PRIORITY_USER_FACING rather
676 than MSG_ALL. Generalize scope test to be run at all four
677 combinations of with/without MSG_PRIORITY_USER_FACING and
678 MSG_PRIORITY_INTERNALS, adding examples of explicit priority
679 for each of the two values.
680 * dumpfile.h (enum dump_flag): Add comment about the MSG_* flags.
681 Rename MSG_ALL to MSG_ALL_KINDS. Add MSG_PRIORITY_USER_FACING,
682 MSG_PRIORITY_INTERNALS, and MSG_ALL_PRIORITIES, updating the
683 values for TDF_COMPARE_DEBUG and TDF_ALL_VALUES.
684 (AUTO_DUMP_SCOPE): Add a note to the comment about the interaction
686 * tree-vect-loop-manip.c (vect_loop_versioning): Mark versioning
687 dump messages as MSG_PRIORITY_USER_FACING.
688 * tree-vectorizer.h (DUMP_VECT_SCOPE): Add a note to the comment
689 about the interaction with MSG_PRIORITY_*.
691 2018-10-04 Bernd Edlinger <bernd.edlinger@hotmail.de>
693 * varasm.c (output_constant): Add new parameter merge_strings.
694 Make strings properly zero terminated in merge string sections.
695 (mergeable_string_section): Don't fail if the last char is non-zero.
696 (assemble_variable_contents): Handle merge string sections.
697 (assemble_variable): Likewise.
698 (assemble_constant_contents): Likewise.
699 (output_constant_def_contents): Likewise.
700 (output_constructor_array_range,
701 output_constructor_regular_field): Adjust call to output_constant.
702 (output_object_block): Adjust call to assemble_constant_contents
703 and assemble_variable_contents.
705 2018-10-04 Martin Liska <mliska@suse.cz>
708 * cgraphunit.c (process_function_and_variable_attributes):
709 Warn about a function with alias attribute and a body.
711 2018-10-04 Martin Liska <mliska@suse.cz>
714 * multiple_target.c (redirect_to_specific_clone): New function.
715 (ipa_target_clone): Use it.
716 * tree-inline.c: Fix comment.
718 2018-10-04 David Malcolm <dmalcolm@redhat.com>
720 * dumpfile.c (gcc::dump_manager::dump_manager): Initialize new
722 (gcc::dump_manager::~dump_manager): Free m_optinfo_filename.
723 (gcc::dump_manager::register_pass): New member function, adapted
724 from loop body in gcc::pass_manager::register_pass, adding a
725 call to update_dfi_for_opt_info.
726 (gcc::dump_manager::opt_info_enable_passes): Store the
727 -fopt-info options into the new fields. Move the loop
729 (gcc::dump_manager::update_dfi_for_opt_info): ...this new member
731 * dumpfile.h (struct opt_pass): New forward decl.
732 (gcc::dump_manager::register_pass): New decl.
733 (gcc::dump_manager::update_dfi_for_opt_info): New decl.
734 (class gcc::dump_manager): Add fields "m_optgroup_flags",
735 "m_optinfo_flags", and "m_optinfo_filename".
736 * passes.c (gcc::pass_manager::register_pass): Move all of the
737 dump-handling code to gcc::dump_manager::register_pass.
739 2018-10-04 Peter Bergner <bergner@linux.ibm.com>
741 PR rtl-optimization/87466
742 * target.def (setjmp_preserves_nonvolatile_regs_p): New target hook.
743 * doc/tm.texi.in (TARGET_SETJMP_PRESERVES_NONVOLATILE_REGS_P): New hook.
744 * doc/tm.texi: Regenerate.
745 * ira-lives.c (process_bb_node_lives): Use the new target hook.
746 * lra-lives.c (process_bb_lives): Likewise.
747 * config/rs6000/rs6000.c (TARGET_SETJMP_PRESERVES_NONVOLATILE_REGS_P):
750 2018-10-04 Tamar Christina <tamar.christina@arm.com>
752 * params.c (add_params): Fix initialization.
754 2018-10-04 Martin Liska <mliska@suse.cz>
756 PR gcov-profile/84107
757 * tree-profile.c (init_ic_make_global_vars):
758 Remove ic_void_ptr_var and ic_gcov_type_ptr_var.
759 Come up with new ic_tuple* variables. Emit
760 __gcov_indirect_call{,_topn} variables.
761 (gimple_gen_ic_profiler): Access the variable
763 (gimple_gen_ic_func_profiler): Access
764 __gcov_indirect_call.callee field.
765 (gimple_init_gcov_profiler): Use ptr_type_node.
766 * value-prof.c (gimple_ic): Use ptr_type_node.
768 2018-10-04 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
770 PR tree-optimization/85787
771 * ipa-pure-const.c (malloc_candidate_p_1): Move most of malloc_candidate_p
772 into this function and add support for detecting multiple phis.
773 (DUMP_AND_RETURN): Move from malloc_candidate_p into top-level macro.
775 2018-10-04 Martin Liska <mliska@suse.cz>
778 * ipa-inline.c (inline_to_all_callers_1):
779 Call ultimate_alias_target for node being inlined.
781 2018-10-03 Jeff Law <law@redhat.com>
783 * gimple-ssa-sprintf.c (format_string): Do not hardcode size of
785 * tree.c (get_typenode_from_name): Moved from fortran/trans-types.c.
786 * tree.h (get_typenode_from_name): Prototype.
788 2018-10-03 Uros Bizjak <ubizjak@gmail.com>
790 * config/i386/i386.md (*cmp<X87MODEF:mode>_<SWI24:mode>_i387):
791 Change operand 2 predicate to nonimmediate_operand.
792 (*cmp<X87MODEF:mode>_<SWI24:mode>_cc_i387): Ditto.
794 2018-10-03 Martin Sebor <msebor@redhat.com>
795 Jeff Law <law@redhat.com>
797 * gimple-ssa-sprintf.c (struct fmtresult): Add new member and
799 (get_string_length): Detect unterminated arrays.
800 (format_string): Same.
801 (format_directive): Warn about unterminated arrays.
802 (handle_gimple_call): Mark statements with no_warning as needed.
804 2018-10-03 Jim Wilson <jimw@sifive.com>
806 * config/riscv/riscv-c.c (riscv_cpu_cpp_builtins): For ABI_ILP32E,
807 also define __riscv_abi_rve. Delete trailing white space.
809 2018-10-03 Paul Koning <ni1d@arrl.net>
811 Enable LRA register allocator for PDP11.
812 * config/pdp11/constraints.md (Q): Use define_memory_constraint.
815 * config/pdp11/pdp11.c (pdp11_lra_p): New function.
816 * config/pdp11/pdp11.opt (-mlra): New option.
817 * doc/invoke.texi (PDP-11 Options): Document -mlra.
819 2018-10-03 Uros Bizjak <ubizjak@gmail.com>
821 * config/i386/i386.md (*<absneg:code>extendsfdf2): Remove.
822 (*<absneg:code>extend<mode>xf2): Ditto.
824 2018-10-03 Aldy Hernandez <aldyh@redhat.com>
826 PR tree-optimization/87415
827 * tree-vrp.c (set_value_range_with_overflow): Special case one bit
830 2018-10-02 Jeff Law <law@redhat.com>
832 * gimple-fold.c (get_range_strlen): Only set *nonstr when
833 an unterminated string is discovered. Bubble up range
834 even for unterminated strings.
835 (gimple_fold_builtin_strlen): Do not fold if get_range_strlen
836 indicates the string was not terminated via NONSTR.
838 2018-10-03 Aldy Hernandez <aldyh@redhat.com>
840 * tree-vrp.c (extract_range_from_unary_expr): Special case all
842 Do not do anything special for anti-ranges.
844 2018-10-03 Jérôme Lambourg <lambourg@adacore.com>
846 * config/arm/vxworks.h (ARM_TARGET2_DWARF_FORMAT): Adjust to
847 DW_EH_PE_pcrel | DW_EH_PE_indirect for RTPs.
849 2018-10-03 Martin Liska <mliska@suse.cz>
851 PR gcov-profile/86109
852 * coverage.c (coverage_begin_function): Do not
853 mark lambdas as artificial.
854 * tree-core.h (struct GTY): Remove tm_clone_flag
855 and introduce new lambda_function.
856 * tree.h (DECL_LAMBDA_FUNCTION): New macro.
858 2018-10-02 Aaron Sawdey <acsawdey@linux.ibm.com>
861 * config/rs6000/rs6000-string.c (expand_strn_compare): Check that both
862 P8_VECTOR and VSX are enabled.
864 2018-10-02 Andreas Krebbel <krebbel@linux.ibm.com>
866 * config/s390/driver-native.c (s390_host_detect_local_cpu): Add
867 0x3907 as CPU model number.
869 2018-10-02 Andreas Krebbel <krebbel@linux.ibm.com>
871 * common/config/s390/s390-common.c: Rename PF_ARCH12 to PF_Z14.
872 * config/s390/s390.h (enum processor_flags): Rename PF_ARCH12 to
873 PF_Z14. Rename TARGET_CPU_ARCH12 to TARGET_CPU_Z14,
874 TARGET_CPU_ARCH12_P to TARGET_CPU_Z14_P, TARGET_ARCH12 to
875 TARGET_Z14, and TARGET_ARCH12_P to TARGET_Z14_P.
876 * config/s390/s390.md: Likewise. Rename also the cpu attribute
877 value from arch12 to z14.
879 2018-10-02 Uros Bizjak <ubizjak@gmail.com>
881 * config/i386/i386.md (fxam<mode>2_i387_with_temp): Remove.
883 (isinf<mode>2): Ditto.
885 2018-10-02 Uros Bizjak <ubizjak@gmail.com>
887 * config/i386/i386.c (ix86_emit_i387_round): Extend op1 to XFmode
888 before emitting fxam. Perform calculations in XFmode.
890 2018-10-02 Marc Glisse <marc.glisse@inria.fr>
892 * match.pd (((X /[ex] A) +- B) * A): New transformation.
894 2018-10-02 Marc Glisse <marc.glisse@inria.fr>
897 * fold-const.c (fold_plusminus_mult_expr): Handle complex and vectors.
898 * tree.c (signed_or_unsigned_type_for): Handle complex.
900 2018-10-02 Jeff Law <law@redhat.com>
902 * gimple-fold.c (get_range_strlen): Remove dead code.
904 2018-10-02 Martin Sebor <msebor@redhat.com>
905 Jeff Law <law@redhat.com>
907 * builtins.c (unterminated_array): Add new arguments.
908 If argument is not terminated, bubble up size and exact
910 (expand_builtin_strnlen): Detect, avoid expanding
911 and diagnose unterminated arrays.
912 (c_strlen): Fill in offset of start of unterminated strings.
913 * builtins.h (unterminated_array): Update prototype.
915 2018-10-02 Richard Biener <rguenther@suse.de>
917 * config/i386/sse.md (reduc_plus_scal_v4df): Avoid the use
918 of haddv4df, first reduce to SSE width and exploit the fact
919 that we only need element zero with the reduction result.
920 (reduc_plus_scal_v2df): Likewise.
922 2018-10-02 Eric Botcazou <ebotcazou@adacore.com>
924 * dojump.h (do_jump): Delete.
925 (do_jump_1): Likewise.
926 (split_comparison): Move around.
927 * dojump.c (do_jump): Make static.
928 (do_jump_1): Likewise.
929 (jumpifnot): Move around.
930 (jumpifnot_1): Likewise.
932 (jumpif_1): Likewise.
933 * expr.c (expand_expr_real_1): Call jumpif[not] instead of do_jump.
935 2018-10-02 Eric Botcazou <ebotcazou@adacore.com>
937 * reorg.c (make_return_insns): Use emit_copy_of_insn_after for the
938 insns in the delay slot and add_insn_after for the jump insn.
940 2018-10-02 Richard Biener <rguenther@suse.de>
942 * tree-inline.c (expand_call_inline): Use the location of
943 the callee declaration for the inline-entry marker.
944 * final.c (notice_source_line): Remove special-casing of
945 NOTE_INSN_INLINE_ENTRY.
947 2018-10-01 Carl Love <cel@us.ibm.com>
950 * config/rs6000/rs6000-builtin.def (__builtin_mffsl): New.
951 (__builtin_mtfsb0): New.
952 (__builtin_mtfsb1): New.
953 ( __builtin_set_fpscr_rn): New.
954 (__builtin_set_fpscr_drn): New.
955 * config/rs6000/rs6000.c (rs6000_expand_mtfsb_builtin): Add.
956 (rs6000_expand_set_fpscr_rn_builtin): Add.
957 (rs6000_expand_set_fpscr_drn_builtin): Add.
958 (rs6000_expand_builtin): Add case statement entries for
959 RS6000_BUILTIN_MTFSB0, RS6000_BUILTIN_MTFSB1,
960 RS6000_BUILTIN_SET_FPSCR_RN, RS6000_BUILTIN_SET_FPSCR_DRN,
961 RS6000_BUILTIN_MFFSL.
962 (rs6000_init_builtins): Add ftype initialization and def_builtin
963 calls for __builtin_mffsl, __builtin_mtfsb0, __builtin_mtfsb1,
964 __builtin_set_fpscr_rn, __builtin_set_fpscr_drn.
965 * config/rs6000.md (rs6000_mtfsb0, rs6000_mtfsb1, rs6000_mffscrn,
966 rs6000_mffscdrn): Add define_insn.
967 (rs6000_set_fpscr_rn, rs6000_set_fpscr_drn): Add define_expand.
968 * doc/extend.texi: Add documentation for the builtins.
970 2018-10-01 Richard Biener <rguenther@suse.de>
972 PR tree-optimization/87465
973 * tree-ssa-loop-ivcanon.c (tree_estimate_loop_size): Fix typo
974 causing branch miscounts.
976 2018-10-01 Tamar Christina <tamar.christina@arm.com>
978 * common/config/aarch64/aarch64-common.c (TARGET_OPTION_DEFAULT_PARAM,
979 aarch64_option_default_param): New.
981 (TARGET_OPTION_VALIDATE_PARAM, aarch64_option_validate_param): New.
982 * config/aarch64/aarch64.c (aarch64_override_options_internal): Simplify
983 stack-clash protection validation code.
985 2018-10-01 Tamar Christina <tamar.christina@arm.com>
987 * params.c (validate_param): New.
988 (add_params): Use it.
989 (set_param_value): Refactor param validation into validate_param.
990 (diagnostic.h): Include.
991 * diagnostic.h (diagnostic_ready_p): New.
993 2018-10-01 Tamar Christina <tamar.christina@arm.com>
995 * params.c (set_param_value):
996 Add index of parameter being validated.
997 * common/common-target.def (option_validate_param): New.
998 * common/common-targhooks.h (default_option_validate_param): New.
999 * common/common-targhooks.c (default_option_validate_param): New.
1000 * doc/tm.texi.in (TARGET_OPTION_VALIDATE_PARAM): New.
1001 * doc/tm.texi: Regenerate.
1003 2018-10-01 Tamar Christina <tamar.christina@arm.com>
1006 * config/aarch64/aarch64.c (aarch64_override_options_internal):
1007 Add validation for stack-clash parameters and set defaults.
1009 2018-10-01 Tamar Christina <tamar.christina@arm.com>
1012 * configure.ac: Add stack-clash-protection-guard-size.
1013 * doc/install.texi: Document it.
1014 * config.in (DEFAULT_STK_CLASH_GUARD_SIZE): New.
1015 * params.def: Update comment for guard-size.
1016 (PARAM_STACK_CLASH_PROTECTION_GUARD_SIZE,
1017 PARAM_STACK_CLASH_PROTECTION_PROBE_INTERVAL): Update description.
1018 * configure: Regenerate.
1020 2018-10-01 Tamar Christina <tamar.christina@arm.com>
1023 * config/aarch64/aarch64.h (STACK_CLASH_MIN_BYTES_OUTGOING_ARGS,
1024 STACK_DYNAMIC_OFFSET): New.
1025 * config/aarch64/aarch64.c (aarch64_layout_frame):
1026 Update outgoing args size.
1027 (aarch64_stack_clash_protection_alloca_probe_range,
1028 TARGET_STACK_CLASH_PROTECTION_ALLOCA_PROBE_RANGE): New.
1030 2018-10-01 Tamar Christina <tamar.christina@arm.com>
1033 * explow.c (anti_adjust_stack_and_probe_stack_clash): Support custom
1035 * target.def (stack_clash_protection_alloca_probe_range): New.
1036 (stack_clash_protection_final_dynamic_probe): Remove.
1037 * targhooks.h (default_stack_clash_protection_alloca_probe_range) New.
1038 (default_stack_clash_protection_final_dynamic_probe): Remove.
1039 * targhooks.c: Likewise.
1040 * doc/tm.texi.in (TARGET_STACK_CLASH_PROTECTION_ALLOCA_PROBE_RANGE): New.
1041 (TARGET_STACK_CLASH_PROTECTION_FINAL_DYNAMIC_PROBE): Remove.
1042 * doc/tm.texi: Regenerate.
1044 2018-10-01 Tamar Christina <tamar.christina@arm.com>
1047 * config/aarch64/aarch64-protos.h (aarch64_output_probe_sve_stack_clash): New.
1048 * config/aarch64/aarch64.c (aarch64_output_probe_sve_stack_clash,
1049 aarch64_clamp_to_uimm12_shift): New.
1050 (aarch64_allocate_and_probe_stack_space): Add SVE specific section.
1051 * config/aarch64/aarch64.md (probe_sve_stack_clash): New.
1053 2018-10-01 Tamar Christina <tamar.christina@arm.com>
1056 * config/aarch64/aarch64.c (aarch64_layout_frame): Add assert.
1058 2018-10-01 Jeff Law <law@redhat.com>
1059 Richard Sandiford <richard.sandiford@linaro.org>
1060 Tamar Christina <tamar.christina@arm.com>
1063 * config/aarch64/aarch64.md
1064 (probe_stack_range): Add k (SP) constraint.
1065 * config/aarch64/aarch64.h (STACK_CLASH_CALLER_GUARD,
1066 STACK_CLASH_MAX_UNROLL_PAGES): New.
1067 * config/aarch64/aarch64.c (aarch64_output_probe_stack_range): Emit
1068 stack probes for stack clash.
1069 (aarch64_allocate_and_probe_stack_space): New.
1070 (aarch64_expand_prologue): Use it.
1071 (aarch64_expand_epilogue): Likewise and update IP regs re-use criteria.
1072 (aarch64_sub_sp): Add emit_move_imm optional param.
1074 2018-10-01 MCC CS <deswurstes@users.noreply.github.com>
1076 PR tree-optimization/87261
1077 * match.pd: Remove trailing whitespace.
1078 Add (x & y) | ~(x | y) -> ~(x ^ y),
1079 (~x | y) ^ (x ^ y) -> x | ~y and (x ^ y) | ~(x | y) -> ~(x & y)
1081 2018-10-01 Claudiu Zissulescu <claziss@synopsys.com>
1083 * config/arc/arc.md (*add_n): Clean up pattern, update instruction
1085 (ashlsi3_insn): Update instruction constraints.
1086 (ashrsi3_insn): Likewise.
1087 (rotrsi3): Likewise.
1088 (add_shift): Likewise.
1089 * config/arc/constraints.md (Csz): New 32 bit constraint. It
1090 avoids placing in the limm field small constants which, otherwise,
1091 could end into a small instruction.
1093 2018-10-01 Claudiu Zissulescu <claziss@synopsys.com>
1095 * config/arc/arc.md (maddsidi4_split): Don't use dmac if the
1096 destination register is not odd-even.
1097 (umaddsidi4_split): Likewise.
1099 2018-10-01 Richard Biener <rguenther@suse.de>
1101 * tree-inline.c (expand_call_inline): Store origin of fn
1102 in BLOCK_ABSTRACT_ORIGIN for the inline BLOCK.
1103 * tree.c (block_ultimate_origin): Simplify and do some
1106 2018-09-30 Uros Bizjak <ubizjak@gmail.com>
1108 * config/i386/mmx.md (EMMS): New int iterator.
1109 (emms): New int attribute.
1110 (mmx_<emms>): Macroize insn from *mmx_emms and *mmx_femms using
1111 EMMS int iterator. Explicitly declare clobbers.
1112 (mmx_emms): Remove expander.
1114 * config/i386/predicates.md (emms_operation): Remove predicate.
1115 (vzeroall_pattern): New predicate.
1116 (vzeroupper_pattern): Rename from vzeroupper_operation.
1117 * config/i386/i386.c (ix86_avx_u128_mode_after): Use
1118 vzeroupper_pattern and vzeroall_pattern predicates.
1120 2018-09-30 Peter Bergner <bergner@linux.ibm.com>
1122 PR rtl-optimization/86939
1123 * ira-lives.c (make_hard_regno_born): Rename from this...
1124 (make_hard_regno_live): ... to this. Remove update to conflict
1125 information. Update function comment.
1126 (make_hard_regno_dead): Add conflict information update. Update
1128 (make_object_born): Rename from this...
1129 (make_object_live): ... to this. Remove update to conflict information.
1130 Update function comment.
1131 (make_object_dead): Add conflict information update. Update function
1133 (mark_pseudo_regno_live): Call make_object_live.
1134 (mark_pseudo_regno_subword_live): Likewise.
1135 (mark_hard_reg_dead): Update function comment.
1136 (mark_hard_reg_live): Call make_hard_regno_live.
1137 (process_bb_node_lives): Likewise.
1138 * lra-lives.c (make_hard_regno_born): Rename from this...
1139 (make_hard_regno_live): ... to this. Remove update to conflict
1140 information. Remove now uneeded check_pic_pseudo_p argument.
1141 Update function comment.
1142 (make_hard_regno_dead): Add check_pic_pseudo_p argument and add update
1143 to conflict information. Update function comment.
1144 (mark_pseudo_live): Remove update to conflict information. Update
1146 (mark_pseudo_dead): Add conflict information update.
1147 (mark_regno_live): Call make_hard_regno_live.
1148 (mark_regno_dead): Call make_hard_regno_dead with new arguement.
1149 (process_bb_lives): Call make_hard_regno_live and make_hard_regno_dead.
1151 2018-09-29 H.J. Lu <hongjiu.lu@intel.com>
1154 * config/i386/i386.c (construct_container): Use TImode for
1155 BLKmode values in 2 integer registers.
1157 2018-09-29 Jeff Law <law@redhat.com>
1159 * builtins.c (unterminated_array): Pass in c_strlen_data * to
1160 c_strlen rather than just a tree *.
1161 (c_strlen): Change NONSTR argument to a c_strlen_data pointer.
1162 Update recursive calls appropriately. If caller did not provide a
1163 suitable data pointer, create a local one. When a non-terminated
1164 string is discovered, bubble up information about the string via the
1165 c_strlen_data object.
1166 * builtins.h (c_strlen): Update prototype.
1167 (c_strlen_data): New structure.
1168 * gimple-fold.c (get_range_strlen): Update calls to c_strlen.
1169 For a type 2 call, if c_strlen indicates a non-terminated string
1170 use the length of the non-terminated string.
1171 (gimple_fold_builtin_stpcpy): Update calls to c_strlen.
1173 2018-09-29 Jakub Jelinek <jakub@redhat.com>
1176 * config/i386/avx512fintrin.h (_mm512_abs_pd, _mm512_mask_abs_pd): Use
1177 __m512d type for __A argument rather than __m512.
1179 2018-09-28 John David Anglin <danglin@gcc.gnu.org>
1181 * match.pd (simple_comparison): Don't optimize if either operand is
1182 a function pointer when target needs function pointer canonicalization.
1184 2018-09-28 Segher Boessenkool <segher@kernel.crashing.org>
1186 * config/rs6000/driver-rs6000.c (asm_names): Adjust the entries for
1187 power5 .. power9 to remove indirection.
1188 * config/rs6000/rs6000.h (ASM_CPU_POWER5_SPEC, ASM_CPU_POWER6_SPEC,
1189 ASM_CPU_POWER7_SPEC, ASM_CPU_POWER8_SPEC, ASM_CPU_POWER9_SPEC,
1190 ASM_CPU_476_SPEC): Delete.
1191 (ASM_CPU_SPEC): Adjust.
1192 (EXTRA_SPECS): Delete asm_cpu_power5, asm_cpu_power6, asm_cpu_power7,
1193 asm_cpu_power8, asm_cpu_power9, asm_cpu_476.
1195 2018-09-28 Segher Boessenkool <segher@kernel.crashing.org>
1197 * config.in: Delete HAVE_AS_DCI.
1198 * config/powerpcspe/powerpcspe.h: Treat HAVE_AS_DCI as always true.
1199 * config/rs6000/rs6000.h: Ditto.
1200 * configure.ac: Delete HAVE_AS_DCI.
1201 * configure: Regenerate.
1203 2018-09-28 Segher Boessenkool <segher@kernel.crashing.org>
1205 * config.in (HAVE_AS_LWSYNC): Delete.
1206 * config/powerpcspe/powerpcspe.h (TARGET_LWSYNC_INSTRUCTION): Delete.
1207 * config/powerpcspe/sync.md (*lwsync): Always generate lwsync, never
1209 * config/rs6000/rs6000.h (TARGET_LWSYNC_INSTRUCTION): Delete.
1210 * config/rs6000/sync.md (*lwsync): Always generate lwsync, never do it
1212 * configure.ac: Delete HAVE_AS_LWSYNC.
1213 * configure: Regenerate.
1215 2018-09-28 Eric Botcazou <ebotcazou@adacore.com>
1216 Pierre-Marie de Rodat <derodat@adacore.com>
1218 * calls.c (expand_call): Try to do a tail call for thunks at -O0 too.
1219 * cgraph.h (struct cgraph_thunk_info): Add indirect_offset.
1220 (cgraph_node::create_thunk): Add indirect_offset parameter.
1221 (thunk_adjust): Likewise.
1222 * cgraph.c (cgraph_node::create_thunk): Add indirect_offset parameter
1223 and initialize the corresponding field with it.
1224 (cgraph_node::dump): Dump indirect_offset field.
1225 * cgraphclones.c (duplicate_thunk_for_node): Deal with indirect_offset.
1226 * cgraphunit.c (cgraph_node::analyze): Be prepared for external thunks.
1227 (thunk_adjust): Add indirect_offset parameter and deal with it.
1228 (cgraph_node::expand_thunk): Deal with the indirect_offset field and
1229 pass it to thunk_adjust. Do not call the target hook if it's non-zero
1230 or if the thunk is external or local. Fix formatting. Do not chain
1231 the RESULT_DECL to BLOCK_VARS. Pass the static chain to the target,
1232 if any, in the GIMPLE representation.
1233 * ipa-icf.c (sem_function::equals_wpa): Deal with indirect_offset.
1234 * lto-cgraph.c (lto_output_node): Write indirect_offset field.
1235 (input_node): Read indirect_offset field.
1236 * tree-inline.c (expand_call_inline): Pass indirect_offset field in the
1237 call to thunk_adjust.
1238 * tree-nested.c (struct nesting_info): Add thunk_p field.
1239 (create_nesting_tree): Set it.
1240 (convert_all_function_calls): Copy static chain from targets to thunks.
1241 (finalize_nesting_tree_1): Return early for thunks.
1242 (unnest_nesting_tree_1): Do not finalize thunks.
1243 (gimplify_all_functions): Do not gimplify thunks.
1245 2018-09-28 David Malcolm <dmalcolm@redhat.com>
1247 * opt-suggestions.c (option_proposer::build_option_suggestions):
1248 Release "option_values".
1250 2018-09-28 David Malcolm <dmalcolm@redhat.com>
1252 * coverage.c (get_coverage_counts): Convert problem-reporting dump
1253 messages from MSG_OPTIMIZED_LOCATIONS to MSG_MISSED_OPTIMIZATION.
1254 * dumpfile.c (kind_as_string): New function.
1255 (dump_loc): Rather than a hardcoded prefix of "note: ", use
1256 kind_as_string to vary the prefix based on dump_kind.
1257 (selftest::test_capture_of_dump_calls): Update for above.
1259 2018-09-28 Uros Bizjak <ubizjak@gmail.com>
1261 * config/i386/i386.h (SSE_REGNO): Fix check for FIRST_REX_SSE_REG.
1262 (GET_SSE_REGNO): Rename from SSE_REGNO. Update all uses for rename.
1264 2018-09-28 Uros Bizjak <ubizjak@gmail.com>
1266 * config/i386/i386.h (CC_REGNO): Remove FPSR_REG.
1267 * config/i386/i386.c (ix86_fixed_condition_code_regs): Use
1268 INVALID_REGNUM instead of FPSR_REG.
1269 (ix86_md_asm_adjust): Do not clobber FPSR_REG.
1270 * config/i386/i386.md: Update comment of FP compares.
1271 (fldenv): Do not clobber FPSR_REG.
1273 2018-09-28 Richard Biener <rguenther@suse.de>
1275 * tree.h (BLOCK_ORIGIN): New.
1276 * omp-expand.c (grid_expand_target_grid_body): Assign
1277 BLOCK_ORIGIN to BLOCK_ABSTRACT_ORIGIN.
1278 * tree-inline.c (remap_block): Likewise.
1279 * auto-profile.c (get_function_decl_from_block): Simplify
1280 by eliding the BLOCK_ABSTRACT_ORIGIN chasing.
1281 * langhooks.c (lhd_print_error_function): Likewise.
1282 * optinfo-emit-json.cc (optrecord_json_writer::inlining_chain_to):
1284 * tree-ssa-live.c (remove_unused_scope_block_p): Likewise.
1285 * tree.c (block_nonartificial_location): Likewise.
1286 (block_ultimate_origin): Likewise.
1287 * tree-pretty-print.c (percent_K_format): Likewise. Remove
1288 no longer needed LTO case.
1290 2018-09-28 Andrew Stubbs <ams@codesourcery.com>
1291 Jan Hubicka <jh@suse.cz>
1292 Martin Jambor <mjambor@suse.cz>
1294 * simplify-rtx.c (simplify_merge_mask): New function.
1295 (simplify_ternary_operation): Use it, also see if VEC_MERGEs with the
1296 same masks are used in op1 or op2.
1297 (test_vec_merge): New function.
1298 (test_vector_ops): Call test_vec_merge.
1300 2018-09-28 Eric Botcazou <ebotcazou@adacore.com>
1302 * config/sparc/sparc-protos.h (sparc_branch_cost): Declare.
1303 * config/sparc/sparc.h (BRANCH_COST): Call sparc_branch_cost.
1304 * config/sparc/sparc.c (struct processor_costs): Add branch_cost field.
1305 (cypress_costs): Set it.
1306 (supersparc_costs): Likewise.
1307 (hypersparc_costs): Likewise.
1308 (leon_cost): Likewise.
1309 (leon3_costs): Likewise.
1310 (sparclet_costs): Likewise.
1311 (ultrasparc_costs): Likewise.
1312 (ultrasparc_costs): Likewise.
1313 (niagara_costs): Likewise.
1314 (niagara2_costs): Likewise.
1315 (niagara3_costs): Likewise.
1316 (niagara4_costs): Likewise.
1317 (niagara7_costs): Likewise.
1318 (m8_costs): Likewise.
1319 (TARGET_CAN_FOLLOW_JUMP): Define.
1320 (pass_work_around_errata::gate): Minor tweak.
1321 (sparc_option_override): Remove MASK_FSMULD mask for V7 processors.
1322 Do not set both MASK_VIS4 and MASK_VIS4B for M8 processor.
1323 Automaitcally clear MASK_FSMULD mask for V7 processors.
1324 (sparc_can_follow_jump): New static function.
1325 (output_ubranch): Deal with CROSSING_JUMP_P.
1326 (sparc_use_sched_lookahead): Rewrite using switch statement.
1327 (sparc_issue_rate): Reorder.
1328 (sparc_branch_cost): New function.
1330 2018-09-27 Martin Sebor <msebor@redhat.com>
1332 * tree.h (tree_to_shwi): Add attribute nonnull and pure.
1333 (tree_to_poly_int64, tree_to_uhwi, tree_to_poly_uint64): Same.
1334 (int_fits_type_p): Same.
1336 2018-09-27 Uros Bizjak <ubizjak@gmail.com>
1338 * config/i386/i386.md (FPCR_REG): Remove.
1339 (UNSPEC_FLDCW): Remove.
1340 (x86_fnstcw_1): Use (const_int 0) instead of FPCR_REG.
1341 (x86_fldcw_1): Remove insn pattern.
1342 (fnstenv): Do not clobber FPCR_REG.
1344 * config/i386/i386.h (FIXED_REGISTERS) Remove fpsr register.
1345 (CALL_USED_REGISTERS): Ditto.
1346 (REG_ALLOC_ORDER): Ditto.
1347 (REG_CLASS_CONTENTS): Ditto.
1348 (HI_REGISTER_NAMES): Ditto.
1349 (ADDITIONAL_REGISTER_NAMES): Use defines instead
1350 of numerical constants.
1351 * config/i386/i386.c (regclass_map): Remove fpsr register.
1352 (dbx_register_map): Ditto.
1353 (dbx64_register_map): Ditto.
1354 (svr4_dbx_register_map): Ditto.
1355 (print_reg): Do not handle FPCR_REG.
1357 2018-09-27 Segher Boessenkool <segher@kernel.crashing.org>
1360 * config.in (HAVE_AS_CMPB, HAVE_AS_DFP, HAVE_AS_FPRND, HAVE_AS_MFPGPR,
1361 HAVE_AS_POPCNTB, HAVE_AS_POPCNTD, HAVE_AS_POWER8, HAVE_AS_POWER9):
1362 Delete, always treat as true.
1363 * config/powerpcspe/powerpcspe.c (rs6000_option_override_internal):
1364 Ditto. Simplify remaining code.
1365 * config/powerpcspe/powerpcspe.h: Ditto.
1366 * config/rs6000/rs6000.c (rs6000_option_override_internal): Ditto.
1367 Simplify remaining code.
1368 (rs6000_expand_builtin): Ditto.
1369 * config/rs6000/rs6000.h: Ditto.
1370 * configure.ac: Ditto.
1371 * configure: Regenerate.
1373 2018-09-27 Martin Liska <mliska@suse.cz>
1375 * coverage.c (get_coverage_counts): Revert the formatting
1376 of missing profile opt info.
1378 2018-09-27 Richard Biener <rguenther@suse.de>
1382 * dwarf2out.c (set_block_origin_self): Do not mark outermost
1383 block as we do not output that.
1384 (gen_inlined_subroutine_die): Elide the originally outermost
1385 block, matching what we do for concrete instances.
1386 (decls_for_scope): Add parameter specifying whether to recurse
1389 2018-09-27 Andrew Stubbs <ams@codesourcery.com>
1390 Tom de Vries <tom@codesourcery.com>
1394 * expmed.c (emit_cstore): Fix handling of result_mode == BImode and
1395 STORE_FLAG_VALUE == 1.
1397 2018-09-27 Andreas Krebbel <krebbel@linux.ibm.com>
1399 * config/s390/s390.md (PPA_TX_ABORT, PPA_OOO_BARRIER): New
1400 constant definitions.
1401 ("tx_assist"): Replace magic number with PPA_TX_ABORT.
1402 ("*ppa"): Enable pattern also for -march=zEC12 -mno-htm.
1403 ("speculation_barrier"): New expander definition.
1405 2018-09-26 Indu Bhagat <indu.bhagat@oracle.com>
1407 PR gcov-profile/86957
1408 * common.opt: New warning option -Wmissing-profile.
1409 * coverage.c (get_coverage_counts): Add warning for missing .gcda file.
1410 * doc/invoke.texi: Document -Wmissing-profile.
1412 2018-09-26 Jim Wilson <jimw@sifive.com>
1414 * config/riscv/riscv.md (subsi3_extended2): Add J constraint.
1415 (negdi2, negsi2, negsi2_extended, negsi2_extended2): New.
1417 2018-09-26 Martin Sebor <msebor@redhat.com>
1419 * tree.c (zerop): Change return type to bool.
1420 (integer_zerop, integer_onep, integer_each_onep): Same.
1421 (integer_all_onesp, integer_minus_onep, integer_pow2p): Same.
1422 (integer_nonzerop, integer_truep, tree_ctz, real_zerop): Same.
1423 (real_onep, real_minus_onep, chain_index): Same.
1424 (print_type_hash_statistics, type_list_equal): Same.
1425 * tree.h (zerop): Same.
1426 (zerop, integer_zerop, integer_onep, integer_each_onep): Same.
1427 (integer_all_onesp, integer_minus_onep, integer_pow2p): Same.
1428 (integer_nonzerop, integer_truep, tree_ctz, real_zerop): Same.
1429 (real_onep, real_minus_onep, chain_index): Same.
1430 (print_type_hash_statistics, type_list_equal): Same.
1432 2018-09-26 Jim Wilson <jimw@sifive.com>
1434 * config/riscv/riscv.h (FUNCTION_ARG_REGNO_P): Fix comment.
1436 2018-09-26 Jakub Jelinek <jakub@redhat.com>
1439 * config/i386/i386.c: Include debug.h and dwarf2out.h.
1440 (output_indirect_thunk): Emit DW_CFA_def_cfa_offset after the
1443 2018-09-25 Andrew Stubbs <ams@codesourcery.com>
1445 * builtins.c (get_builtin_sync_mem): Force address mode conversion.
1447 2018-09-26 Uros Bizjak <ubizjak@gmail.com>
1449 * config/i386/i386.h (enum reg_class): Remove FP_TOP_SSE_REGS
1450 and FP_SECOND_SSE_REGS.
1451 (REG_CLASS_NAMES): Ditto.
1452 (REG_CLASS_CONTENTS): Ditto.
1453 * config/i386/i386.c (ix86_preferred_reload_class) Do not handle
1454 FP_TOP_SSE_REGS and FP_SECOND_SSE_REGS classes.
1455 (ix86_preferred_output_reload_class): Ditto.
1456 * config/i386/i386.md (fix_trunc<mode>_i387_fisttp): Change "=&1f"
1457 clobber constraint to "=&f".
1458 (fix_truncdi_i387): Ditto.
1459 (lrintxfdi2): Ditto.
1460 (fistdi2_<rounding>): Ditto.
1461 (fpremxf4_i387): Change "=u" constraint to "=f".
1462 (fprem1xf4_i387): Ditto.
1464 (fptanxf4_i387): Ditto.
1465 (fxtractxf3_i387): Ditto.
1466 (fscalexf4_i387): Ditto.
1467 (atan2xf3): Change "u" constraint to "f".
1468 (fyl2xxf3_i387): Ditto.
1469 (fyl2xp1xf3_i387): Ditto.
1471 2018-09-26 Uros Bizjak <ubizjak@gmail.com>
1474 * config/i386/i386.h (NUM_MODES_FOR_MODE_SWITCHING): Update
1475 for removed I387_MASK_PM entity.
1478 2018-09-26 Jeff Law <law@redhat.com>
1480 2018-09-26 Alexey Neyman <stilor@att.net>
1482 * graphite.h: Include <isl/id.h> and <isl/space.h>; these
1483 headers are no longer pulled in by <isl/val.h>.
1485 2018-09-26 Richard Biener <rguenther@suse.de>
1488 * dwarf2out.c (gen_lexical_block_die): Do not equate inline
1489 or concrete instance DIE to the tree. Create abstract origin
1490 attributes also for concrete instances.
1492 2018-09-26 Alexey Neyman <stilor@att.net>
1494 * graphite.h: Include <isl/id.h> and <isl/space.h>; these
1495 headers are no longer pulled in by <isl/val.h>.
1497 2018-09-26 Matthew Malcomson <matthew.malcomson@arm.com>
1499 * config/arm/arm.c (arm_split_compare_and_swap, arm_split_atomic_op):
1500 Use new helper functions.
1501 * config/arm/sync.md (atomic_load<mode>, atomic_store<mode>):
1502 Use new helper functions.
1503 * config/arm/aarch-common-protos.h (aarch_mm_needs_acquire,
1504 aarch_mm_needs_release): New declarations.
1505 * config/arm/aarch-common.c (aarch_mm_needs_acquire,
1506 aarch_mm_needs_release): New.
1508 2018-09-26 Eric Botcazou <ebotcazou@adacore.com>
1510 * config/arm/arm.c (arm_reorg): Skip Thumb reorg pass for thunks.
1511 (arm32_output_mi_thunk): Deal with long calls.
1513 2018-09-26 Richard Biener <rguenther@suse.de>
1517 * tree-inline.c (expand_call_inline): When the location
1518 of the call is UNKNOWN_LOCATION use DECL_SOURCE_LOCATION
1519 or BUILTINS_LOCATION for the BLOCK_SOURCE_LOCATION of
1520 the inserted BLOCK to make inlined_function_outer_scope_p
1522 * dwarf2out.c (add_call_src_coords_attributes): Do not add
1523 coords for reserved locations.
1525 2018-09-25 Segher Boessenkool <segher@kernel.crashing.org>
1527 * config/rs6000/rs6000.md (*movcc_internal1): Use set_attr_alternative.
1528 (*call_indirect_nonlocal_sysv<mode>): Ditto.
1529 (*call_value_indirect_nonlocal_sysv<mode>): Ditto.
1530 (*sibcall_nonlocal_sysv<mode>): Ditto.
1531 (*sibcall_value_nonlocal_sysv<mode>): Ditto.
1532 (<bd>_<mode>): Ditto.
1533 (<bd>tf_<mode>): Ditto.
1535 2018-09-25 Segher Boessenkool <segher@kernel.crashing.org>
1537 * config/rs6000/altivec.md (*altivec_mov<mode>): Write the output
1538 control string as a list of templates instead of as C code.
1539 (*altivec_movti): Ditto.
1540 * config/rs6000/darwin.md (movdf_low_di): Ditto.
1542 2018-09-25 Jim Wilson <jimw@sifive.com>
1544 * config/riscv/riscv.c (riscv_split_symbol): Mark auipc label as weak
1545 when target symbol is weak.
1547 2018-09-25 Bernd Edlinger <bernd.edlinger@hotmail.de>
1550 * builtins.c (unterminated_array): Simplify.
1551 * expr.c (string_constant): Handle SSA_NAME. Add more exceptions
1552 where pointer arithmetic is safe.
1554 2018-09-25 Segher Boessenkool <segher@kernel.crashing.org>
1557 * config/rs6000/altivec.md (altivec_vspltb): Use
1558 const_0_to_15_operand instead of u5bit_cint_operand.
1559 (*altivec_vspltb_internal): Ditto.
1560 (altivec_vspltb_direct): Ditto.
1561 (altivec_vsplth): Use const_0_to_7_operand instead of
1563 (*altivec_vsplth_internal): Ditto.
1564 (altivec_vsplth_direct): Ditto.
1565 (altivec_vspltw): Use const_0_to_3_operand instead of
1567 (*altivec_vspltw_internal): Ditto.
1568 (altivec_vspltw_direct): Ditto.
1569 (altivec_vspltsf): Ditto.
1570 (*altivec_vspltsf_internal): Ditto.
1571 * config/rs6000/rs6000.c (rs6000_expand_binop_builtin): Handle the
1572 various splats with the proper size immediate. Reorder the various
1573 cases by ascending size of immediate, and put all such together.
1575 2018-09-25 Richard Biener <rguenther@suse.de>
1578 * dwarf2out.c (add_AT_external_die_ref): Remove now redundant
1580 (maybe_create_die_with_external_ref): Do not create
1581 DW_TAG_imported_unit here.
1582 (add_abstract_origin_attribute): Handle external BLOCK refs.
1583 (dwarf2out_abstract_function): Simplify LTO case.
1584 (dwarf2out_early_finish): Create DW_TAG_imported_unit explicitely
1585 rather than using maybe_create_die_with_external_ref.
1587 2018-09-25 Uros Bizjak <ubizjak@gmail.com>
1590 * config/i386/i386.md (frndintxf2_mask_pm): Remove.
1591 (frndintxf2_mask_pm_i387): Ditto.
1592 (nearbyintxf2): Rewrite expander pattern to match rintxf2.
1593 Enable for !flag_trapping_math.
1594 (nearbyint<mode>2): Enable x87 modes for !flag_trapping_math.
1595 Enable SSE modes for TARGET_SSE4_1 and expand them with round insn.
1596 Change operand 1 predicate to nonimmediate_operand.
1597 (attr "i387_cw"): Remove mask_pm.
1598 * config/i386/i386.h (enum ix86_stack_slot): Remove SLOT_CW_MASK_PM.
1599 (enum ix86_entity): Remove I387_MASK_PM.
1600 * config/i386/i386.c (ix86_i387_mode_needed): Do not
1601 handle I387_MASK_PM.
1602 (ix86_mode_needed): Ditto.
1603 (ix86_mode_after): Ditto.
1604 (ix86_mode_entry): Ditto.
1605 (ix86_mode_exit): Ditto.
1606 (emit_i387_cw_initialization): Do not handle I387_CW_MASK_PM.
1608 2018-09-25 Jakub Jelinek <jakub@redhat.com>
1610 * vr-values.c (vr_values::vr_values): Initialize to_remove_edges and
1611 to_update_switch_stmts to vNULL instead of calling create on them
1614 2018-09-25 Richard Biener <rguenther@suse.de>
1616 PR tree-optimization/87402
1617 * tree-ssa-sccvn.c (SSA_VISITED): Remove unused function.
1618 (visit_phi): Re-instantiate handling of supposed to be VARYING
1619 but non-VARYING backedge value.
1621 2018-09-25 Richard Biener <rguenther@suse.de>
1624 * dwarf2out.c (struct sym_off_pair): New.
1625 (external_die_map): New global.
1626 (lookup_decl_die): When in LTO create DIEs lazily from the
1628 (lookup_block_die): New function, create DIEs lazily in LTO.
1629 (equate_block_to_die): New function.
1630 (dwarf2out_die_ref_for_decl): During WPA get the association
1631 from the external DIE map.
1632 (dwarf2out_register_external_die): Record mapping into the
1634 (maybe_create_die_with_external_ref): New function split out from
1635 DIE generation part of old dwarf2out_register_external_die.
1636 (add_abstract_origin_attribute): Do not return the DIE. When
1637 in LTO reference externals directly.
1638 (dwarf2out_abstract_function): When in LTO ignore calls for
1639 decls with external DIEs (already present abstract instances).
1640 (gen_call_site_die): Adjust.
1641 (add_high_low_attributes): Likewise.
1642 (gen_lexical_block_die): Likewise.
1643 (gen_inlined_subroutine_die): Likewie.
1644 (gen_block_die): Likewise.
1645 (dwarf2out_inline_entry): Likewise.
1646 (dwarf2out_early_finish): In LTRANS phase create DW_TAG_imported_unit
1649 2018-09-25 Martin Liska <mliska@suse.cz>
1651 * ipa-fnsummary.c (estimate_node_size_and_time): Scale by two
1652 integers and not by a float value.
1654 2018-09-25 Martin Liska <mliska@suse.cz>
1657 * dbgcnt.c (dbg_cnt_process_single_pair): Return false
1659 * dumpfile.c (dump_enable_all): Remove extra parenthesis.
1660 * gcov-tool.c: Declare the function with ATTRIBUTE_NORETURN.
1661 * godump.c (go_format_type): Remove extra parenthesis.
1663 2018-09-25 Martin Liska <mliska@suse.cz>
1665 * alias.c (set_dest_equal_p): Remove unused function.
1666 * config/i386/i386.c (def_builtin_pure2): Likewise.
1667 * diagnostic-show-locus.c (class layout): Remove
1669 (layout::layout): Likewise here.
1670 * dump-context.h (class temp_dump_context): Likewise.
1671 * dwarf2out.c (add_AT_fde_ref): Remove unused function.
1672 (add_AT_loclistsptr): Likewise.
1673 (add_AT_offset): Likewise.
1674 (get_AT_hi_pc): Likewise.
1675 (is_comdat_die): Likewise.
1676 (type_is_enum): Likewise.
1677 (ceiling): Likewise.
1678 (add_AT_vms_delta): Likewise.
1679 (is_class_die): Likewise.
1680 * edit-context.c (class line_event): Remove unused field.
1681 * graphite-sese-to-poly.c (tree_int_to_gmp): Remove
1683 * ipa-cp.c (ipa_get_vr_lat): Likewise.
1684 * lra-constraints.c (ok_for_index_p_nonstrict): Likewise.
1685 (ok_for_base_p_nonstrict): Likewise.
1686 * tree-chrec.c (is_not_constant_evolution): Likewise.
1687 (chrec_fold_poly_cst): Likewise.
1688 * tree-if-conv.c (has_pred_critical_p): Likewise.
1689 * tree-ssa-coalesce.c (print_exprs): Likewise.
1690 * tree-ssa-pre.c (bitmap_set_contains_expr): Likewise.
1691 * tree-ssa-uninit.c (is_and_or_or_p): Likewise.
1692 * tree-vrp.c (value_ranges_intersect_p): Likewise.
1693 (value_range_nonnegative_p): Likewise.
1695 2018-09-25 Martin Liska <mliska@suse.cz>
1697 * config/powerpcspe/powerpcspe.c (rs6000_output_function_epilogue):
1698 Do not handle "GNU Pascal".
1699 * config/rs6000/rs6000.c (rs6000_output_function_epilogue):
1701 * config/sparc/sparc.c (sparc_pass_by_reference): Remove Pascal
1702 from documentation. Likewise.
1703 * dbxout.c (dbxout_range_type): Likewise.
1704 * doc/cpp.texi: Likewise.
1705 * doc/extend.texi: Likewise.
1706 * doc/frontends.texi: Likewise.
1707 * doc/invoke.texi: Remove Pascal entry.
1708 * tree.def (CLEANUP_POINT_EXPR): Likewise.
1709 * doc/rtl.texi (MODE_FUNCTION): Remove not used entry.
1711 2018-09-25 Martin Liska <mliska@suse.cz>
1714 * doc/invoke.texi: Document all parameters and remove default
1717 2018-09-25 Ilya Leoshkevich <iii@linux.ibm.com>
1720 * rtl.c (rtx_code_size): Take into account that EQ_ATTR_ALT
1721 contains HOST_WIDE_INTs when computing its size.
1723 2018-09-24 Jim Wilson <jimw@sifive.com>
1726 * config/riscv/riscv.h (STACK_BOUNDARY): Test riscv_abi == ABI_ILP32E
1728 (ABI_STACK_BOUNDARY, MAX_ARGS_IN_REGISTERS): Likewise.
1730 2018-09-24 Andrew Pinski <apinski@marvell.com>
1732 * config/aarch64/aarch64.c (aarch_macro_fusion_pair_p): Don't
1733 access prev before checking it for NULLness in the
1734 AARCH64_FUSE_CMP_BRANCH case.
1736 2018-09-24 H.J. Lu <hongjiu.lu@intel.com>
1739 * config/i386/i386.c (rest_of_insert_endbranch): Set
1740 endbr_queued_at_entrance to true and don't insert ENDBR if
1741 x86_function_profiler will be called.
1742 (x86_function_profiler): Insert ENDBR if endbr_queued_at_entrance
1744 * config/i386/i386.h (machine_function): Add
1745 endbr_queued_at_entrance.
1747 2018-09-24 Ilya Leoshkevich <iii@linux.ibm.com>
1749 * genattrtab.c (mk_attr_alt): Use alternative_mask.
1750 (attr_rtx_1): Adjust caching to match the new EQ_ATTR_ALT field
1752 (check_attr_test): Use alternative_mask.
1753 (get_attr_value): Likewise.
1754 (compute_alternative_mask): Use alternative_mask and XWINT.
1755 (make_alternative_compare): Use alternative_mask.
1756 (attr_alt_subset_p): Use XWINT.
1757 (attr_alt_subset_of_compl_p): Likewise.
1758 (attr_alt_intersection): Use alternative_mask and XWINT.
1759 (attr_alt_union): Likewise.
1760 (attr_alt_complement): Use HOST_WIDE_INT and XWINT.
1761 (mk_attr_alt): Use alternative_mask and HOST_WIDE_INT.
1762 (simplify_test_exp): Use alternative_mask and XWINT.
1763 (write_test_expr): Use alternative_mask and XWINT, adjust bit
1764 number calculation to support 64 bits. Generate code that
1765 checks 64-bit masks.
1766 (main): Use alternative_mask.
1767 * rtl.def (EQ_ATTR_ALT): Change field types from ii to ww.
1769 2018-09-24 Ilya Leoshkevich <iii@linux.ibm.com>
1772 * config/s390/s390.c (s390_emit_epilogue): Do not use PARALLEL
1773 RETURN+USE when returning via %r14.
1775 2018-09-24 Martin Liska <mliska@suse.cz>
1777 * gcov.c (output_lines): Print colorization legend
1778 for both flag_use_colors and flag_use_hotness_colors.
1781 2018-09-24 Martin Liska <mliska@suse.cz>
1783 * coverage.c (get_coverage_counts): Use warning_at
1784 with current_function_decl location. Use %qD in warning
1787 2018-09-24 Martin Liska <mliska@suse.cz>
1789 * memory-block.h (memory_block_pool::release): Annotate with
1790 valgrind that the memory is not accessible.
1792 2018-09-24 Martin Liska <mliska@suse.cz>
1795 * asan.c: Make asan_handled_variables extern.
1797 * cfgexpand.c (expand_stack_vars): Make sure
1798 a representative is unpoison if another
1799 variable in the partition is handled by
1800 use-after-scope sanitization.
1802 2018-09-24 Richard Biener <rguenther@suse.de>
1804 PR tree-optimization/63155
1805 * tree-ssa-propagate.c (add_ssa_edge): Avoid adding PHIs to
1806 the worklist when the edge of the respective argument isn't
1809 2018-09-23 Uros Bizjak <ubizjak@gmail.com>
1811 * config/i386/i386.h (enum reg_class): Rename MASK_REGS to
1812 ALL_MASK_REGS and MASK_EVEX_REGS to MASK_REGS.
1813 (MASK_CLASS_P): Update for rename.
1814 (MAYBE_MASK_CLASS_P): Ditto.
1815 (REG_CLASS_NAMES): Update.
1816 (REG_CLASS_CONTENT): Update.
1817 * config/i386/i386.c (regclass_map): Update for MASK_REG
1818 and ALL_MASK_REGS rename.
1819 * config/i386/constraints.md (Yk): Update for rename.
1822 2018-09-23 Uros Bizjak <ubizjak@gmail.com>
1824 * config/i386/i386.h (enum reg_class): Remove
1825 EVEX_SSE_REGS and MOD4_SSE_REGS.
1826 (REG_CLASS_NAMES): Update.
1827 (REG_CLASS_CONTENT): Update.
1828 * config/i386/i386.c (regclass_map): Declare AVX-512 SSE
1829 registers as ALL_SSE_REGS.
1830 (ix86_additional_allocno_class_p): Remove.
1831 (TARGET_ADDITIONAL_ALLOCNO_CLASS_P): Remove.
1832 (ix86_register_priority): Lower priority of EVEX SSE registers.
1833 Use IN_RANGE macro where appropriate.
1834 (ix86_hard_regno_mode_ok): Merge AVX-5124FMAPS and
1835 AVX-5124VNNIW checks.
1836 (ix86_modes_tieable_p): Tie 512-bit SSE modes.
1837 * config/i386/sse.md (avx5124fmaddps_4fmaddps)
1838 (avx5124fmaddps_4fmaddps_mask, avx5124fmaddps_4fmaddps_maskz)
1839 (avx5124fmaddps_4fmaddss, avx5124fmaddps_4fmaddss_mask)
1840 (avx5124fmaddps_4fmaddss_maskz, avx5124fmaddps_4fnmaddps)
1841 (avx5124fmaddps_4fnmaddps_mask, avx5124fmaddps_4fnmaddps_maskz)
1842 (avx5124fmaddps_4fnmaddss, avx5124fmaddps_4fnmaddss_mask)
1843 (avx5124fmaddps_4fnmaddss_maskz, avx5124vnniw_vp4dpwssd)
1844 (avx5124vnniw_vp4dpwssd_mask, avx5124vnniw_vp4dpwssd_maskz)
1845 (avx5124vnniw_vp4dpwssds, avx5124vnniw_vp4dpwssds_mask)
1846 (avx5124vnniw_vp4dpwssds_maskz): Use "v" instead of "Yh" constraint.
1847 * config/i386/constraints.md (Yh): Remove.
1849 2018-09-23 Uros Bizjak <ubizjak@gmail.com>
1851 * config/i386/i386.c (regclass_map): Declare integer REX registers
1854 2018-09-23 Gerald Pfeifer <gerald@pfeifer.com>
1856 * doc/service.texi (Service): Switch the fsf.org link to https.
1858 2018-09-22 Chung-Ju Wu <jasonwucj@gmail.com>
1861 * config/nds32/nds32.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
1862 Define to speculation_safe_value_not_needed.
1864 2018-09-21 Florian Weimer <fweimer@redhat.com>
1867 * doc/extend.texi (Common Function Attributes): Mention that
1868 noreturn suppresses tail call optimization.
1870 2018-09-21 Jeff Law <law@redhat.com>
1872 * gimple-ssa-evrp.c (evrp_dom_walker::cleanup): Call
1873 vr_values::cleanup_edges_and_switches.
1874 * tree-vrp.c (to_remove_edges, to_update_switch_stmts): Moved into
1876 (identify_jump_threads): Remove EDGE_IGNORE handling.
1877 (execute_vrp): Move handling of to_remove_edges and
1878 to_update_switch_stmts into vr_values class member functions.
1879 * tree-vrp.h (switch_update, to_remove_edges): Remove declarations.
1880 (to_update_switch_stmts): Likewise.
1881 * vr-values.c: Include cfghooks.h.
1882 (vr_values::vr_values): Initialize to_remove_edges and
1883 to_update_switch_stmts.
1884 (vr_values::~vr_values): Verify to_remove_edges and
1885 to_update_switch_stmts are empty.
1886 (vr_values::simplify_switch_using_ranges): Set EDGE_IGNORE as needed.
1887 (vr_values::cleanup_edges_and_switches): New member function.
1888 * vr-values.h (vr_values): Add cleanup_edges_and_switches member
1889 function. Add new data members.
1891 2018-09-21 David Malcolm <dmalcolm@redhat.com>
1893 PR tree-optimization/87309
1894 * dumpfile.c (dump_context::begin_scope): Filter the dump_loc
1895 calls with pflags and alt_flags.
1896 (selftest::test_capture_of_dump_calls): Add test of interaction of
1897 MSG_OPTIMIZED_LOCATIONS with AUTO_DUMP_SCOPE.
1899 2018-09-21 Olivier Hainque <hainque@adacore.com>
1901 * config.gcc: Factorize and comment inclusion of vxworks-dummy.h.
1903 2018-09-21 Olivier Hainque <hainque@adacore.com>
1905 * config/vxworks.h (CLEAR_INSN_CACHE): #define to 1.
1907 2018-09-21 Olivier Hainque <hainque@adacore.com>
1909 * config/vxworks.h (VXWORKS_LIBGCC_SPEC): Remove -lc_internal.
1910 Merge block comment with the one ahead of VXWORKS_LIBS_RTP. Then:
1911 (VXWORKS_LIBS_RTP): Minor reordering.
1913 2018-09-21 Olivier Hainque <hainque@adacore.com>
1915 * config/vxworks.h (STARTFILE_PREFIX_SPEC): Define.
1916 (VXWORKS_LIBS_DIR_RTP): Remove definition and use.
1918 2018-09-21 Olivier Hainque <hainque@adacore.com>
1920 * config/vxworks.h (SIZE_TYPE): Account for TARGET_VXWORKS64.
1921 (PTRDIFF_TYPE): Likewise.
1923 2018-09-21 Olivier Hainque <hainque@adacore.com>
1925 * config.gcc: Enforce def of TARGET_VXWORKS64 to 1 from
1926 triplet, similar to support for VxWorks7.
1927 * config/vxworks-dummy.h: Provide a default definition
1928 of TARGET_VXWORKS64 to 0.
1930 2018-09-21 Olivier Hainque <hainque@adacore.com>
1932 * config/vxworks.h (TARGET_VXWORKS7): Move default definition ...
1933 * config/vxworks-dummy.h: here.
1935 2018-09-21 Olivier Hainque <hainque@adacore.com>
1937 * config.gcc: Prepend vxworks-dummy.h to tm_file for powerpc*
1939 2018-09-21 Shaokun Zhang <zhangshaokun@hisilicon.com>
1940 Bo Zhou <zbo.zhou@hisilicon.com>
1942 * config/aarch64/aarch64-cores.def (tsv110): New CPU.
1943 * config/aarch64/aarch64-tune.md: Regenerated.
1944 * doc/invoke.texi (AArch64 Options/-mtune): Add "tsv110".
1945 * config/aarch64/aarch64.c (tsv110_tunings): New tuning table.
1946 * config/aarch64/aarch64-cost-tables.h: Add "tsv110" extra costs.
1948 2018-09-21 Andrew Stubbs <ams@codesourcery.com>
1949 Julian Brown <julian@codesourcery.com>
1951 * builtins.c (get_builtin_sync_mem): Handle address spaces.
1953 2018-09-21 Eric Botcazou <ebotcazou@adacore.com>
1955 * config/rs6000/rs6000.c (rs6000_function_ok_for_sibcall): Return false
1956 if the call takes a static chain.
1958 2018-09-21 Martin Liska <mliska@suse.cz>
1960 * auto-profile.c (autofdo_source_profile::read): Do not
1962 (read_profile): Do not add working sets.
1963 (read_autofdo_file): Remove sum_all.
1964 (afdo_callsite_hot_enough_for_early_inline): Remove const
1966 * coverage.c (struct counts_entry): Remove gcov_summary.
1967 (read_counts_file): Read new GCOV_TAG_OBJECT_SUMMARY,
1968 do not support GCOV_TAG_PROGRAM_SUMMARY.
1969 (get_coverage_counts): Remove summary and expected
1971 * coverage.h (get_coverage_counts): Likewise.
1972 * doc/gcov-dump.texi: Remove -w option.
1973 * gcov-dump.c (dump_working_sets): Remove.
1974 (main): Do not support '-w' option.
1975 (print_usage): Likewise.
1976 (tag_summary): Likewise.
1977 * gcov-io.c (gcov_write_summary): Do not dump
1979 (gcov_read_summary): Likewise.
1980 (gcov_histo_index): Remove.
1981 (gcov_histogram_merge): Likewise.
1982 (compute_working_sets): Likewise.
1983 * gcov-io.h (GCOV_TAG_OBJECT_SUMMARY): Mark
1985 (GCOV_TAG_PROGRAM_SUMMARY): Mark it obsolete.
1986 (GCOV_TAG_SUMMARY_LENGTH): Adjust.
1987 (GCOV_HISTOGRAM_SIZE): Remove.
1988 (GCOV_HISTOGRAM_BITVECTOR_SIZE): Likewise.
1989 (struct gcov_summary): Simplify rapidly just
1990 to runs and sum_max fields.
1991 (gcov_histo_index): Remove.
1992 (NUM_GCOV_WORKING_SETS): Likewise.
1993 (compute_working_sets): Likewise.
1994 * gcov-tool.c (print_overlap_usage_message): Remove
1995 trailing empty line.
1996 * gcov.c (read_count_file): Read GCOV_TAG_OBJECT_SUMMARY.
1997 (output_lines): Remove program related line.
1998 * ipa-profile.c (ipa_profile): Do not consider GCOV histogram.
1999 * lto-cgraph.c (output_profile_summary): Do not stream GCOV
2001 (input_profile_summary): Do not read it.
2002 (merge_profile_summaries): And do not merge it.
2003 (input_symtab): Do not call removed function.
2004 * modulo-sched.c (sms_schedule): Do not print sum_max.
2005 * params.def (HOT_BB_COUNT_FRACTION): Reincarnate param that was
2006 removed when histogram method was invented.
2007 (HOT_BB_COUNT_WS_PERMILLE): Mention that it's used only in LTO
2009 * postreload-gcse.c (eliminate_partially_redundant_load): Fix
2011 * predict.c (get_hot_bb_threshold): Use HOT_BB_COUNT_FRACTION
2012 and dump selected value.
2013 * profile.c (add_working_set): Remove.
2014 (get_working_sets): Likewise.
2015 (find_working_set): Likewise.
2016 (get_exec_counts): Do not work with working sets.
2017 (read_profile_edge_counts): Do not inform as sum_max is removed.
2018 (compute_branch_probabilities): Likewise.
2019 (compute_value_histograms): Remove argument for call of
2020 get_coverage_counts.
2021 * profile.h: Do not make gcov_summary const.
2023 2018-09-21 Monk Chiang <sh.chiang04@gmail.com>
2025 * config.gcc (nds32*-*-*): Set TARGET_DEFAULT_TLSDESC_TRAMPOLINE=0.
2027 2018-09-21 Eric Botcazou <ebotcazou@adacore.com>
2029 PR tree-optimization/86990
2030 * gimple-ssa-store-merging.c (imm_store_chain_info:coalesce_immediate):
2031 Check that the entire merged store group is made of constants only for
2034 2018-09-20 Allan Sandfeld Jensen <allan.jensen@qt.io>
2036 * gcc.c (LINK_COMMAND_SPEC): Handle -r like -nostdlib.
2037 (VTABLE_VERIFICATION_SPEC): Likewise.
2038 (SANITIZER_EARLY_SPEC): Likewise.
2039 (SANITIZER_SPEC): Likewise.
2040 * config/darwin.h (LINK_COMMAND_SPEC): Likewise.
2041 * doc/invoke.texi (Link Options): Document -r.
2043 2018-09-20 Richard Biener <rguenther@suse.de>
2046 * gimplify.c (gimplify_expr): Retain alignment of
2047 addressable lvalue in dereference.
2049 2018-09-20 Alexandre Oliva <aoliva@redhat.com>
2052 * configure.ac: Check for .loc is_stmt support.
2053 * configure, config.in: Rebuilt.
2054 * dwarf2out.c (dwarf2out_source_line): Skip is_stmt
2057 2018-09-20 Segher Boessenkool <segher@kernel.crashing.org>
2059 * config/rs6000/rs6000.opt (misel=no, misel=yes): Delete.
2060 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -misel=yes and
2063 2018-09-20 Segher Boessenkool <segher@kernel.crashing.org>
2065 * config/rs6000/rs6000-opts.h (enum rs6000_vector): Delete
2067 * config/rs6000/rs6000.c (rs6000_debug_vector_unit): Delete
2070 2018-09-20 Marek Polacek <polacek@redhat.com>
2072 * doc/invoke.texi: Add -Wno-init-list-lifetime to C++ Language Options.
2074 2018-09-20 Richard Sandiford <richard.sandiford@arm.com>
2076 PR tree-optimization/87288
2077 * tree-vect-loop.c (vect_analyze_loop_2): Take PEELING_FOR_GAPS
2078 into account when determining PEELING_FOR_NITERS.
2080 2018-09-20 Richard Sandiford <richard.sandiford@arm.com>
2082 PR tree-optimization/86877
2083 * tree-vect-loop.c (vect_analyze_loop_2): Call
2084 vect_verify_datarefs_alignment.
2086 2018-09-19 Marek Polacek <polacek@redhat.com>
2088 * doc/invoke.texi: Document -Wclass-conversion.
2090 2018-09-19 John David Anglin <danglin@gcc.gnu.org>
2092 * config/pa/pa.c (pa_adjust_priority): Delete.
2093 (TARGET_SCHED_ADJUST_PRIORITY): Delete define.
2095 * config/pa/pa.md (atomic_storeqi): Restore deleted expander.
2096 (atomic_storehi): Likewise.
2097 (atomic_storesi): Likewise.
2098 (atomic_loaddi): Restore compare and swap exchange loop code.
2100 2018-09-19 Segher Boessenkool <segher@kernel.crashing.org>
2102 PR rtl-optimization/86902
2103 * combine.c (try_combine): When changing the CC mode used, don't change
2104 an unrelated mode in other_insn to that new CC mode.
2106 2018-09-19 David Malcolm <dmalcolm@redhat.com>
2108 * tree-data-ref.c (runtime_alias_check_p): Use formatted printing
2109 with %T in place of calls to dump_generic_expr.
2110 (prune_runtime_alias_test_list): Likewise.
2111 (create_runtime_alias_checks): Likewise.
2112 * tree-vect-data-refs.c (vect_check_nonzero_value): Likewise.
2113 (vect_analyze_data_ref_dependence): Likewise.
2114 (vect_slp_analyze_data_ref_dependence): Likewise.
2115 (vect_record_base_alignment): Likewise. Use %G in place of call
2116 to dump_gimple_stmt.
2117 (vect_compute_data_ref_alignment): Likewise.
2118 (verify_data_ref_alignment): Likewise.
2119 (vect_find_same_alignment_drs): Likewise.
2120 (vect_analyze_group_access_1): Likewise.
2121 (vect_analyze_data_ref_accesses): Likewise.
2122 (dependence_distance_ge_vf): Likewise.
2123 (dump_lower_bound): Likewise.
2124 (vect_prune_runtime_alias_test_list): Likewise.
2125 (vect_find_stmt_data_reference): Likewise.
2126 (vect_analyze_data_refs): Likewise.
2127 (vect_create_addr_base_for_vector_ref): Likewise.
2128 (vect_create_data_ref_ptr): Likewise.
2129 * tree-vect-loop-manip.c (vect_set_loop_condition): Likewise.
2130 (vect_can_advance_ivs_p): Likewise.
2131 (vect_update_ivs_after_vectorizer): Likewise.
2132 (vect_gen_prolog_loop_niters): Likewise.
2133 (vect_prepare_for_masked_peels): Likewise.
2134 * tree-vect-loop.c (vect_determine_vf_for_stmt): Likewise.
2135 (vect_determine_vectorization_factor): Likewise.
2136 (vect_is_simple_iv_evolution): Likewise.
2137 (vect_analyze_scalar_cycles_1): Likewise.
2138 (vect_analyze_loop_operations): Likewise.
2139 (report_vect_op): Likewise.
2140 (vect_is_slp_reduction): Likewise.
2141 (check_reduction_path): Likewise.
2142 (vect_is_simple_reduction): Likewise.
2143 (vect_create_epilog_for_reduction): Likewise.
2144 (vect_finalize_reduction:): Likewise.
2145 (vectorizable_induction): Likewise.
2146 (vect_transform_loop_stmt): Likewise.
2147 (vect_transform_loop): Likewise.
2148 (optimize_mask_stores): Likewise.
2149 * tree-vect-patterns.c (vect_pattern_detected): Likewise.
2150 (vect_split_statement): Likewise.
2151 (vect_recog_over_widening_pattern): Likewise.
2152 (vect_recog_average_pattern): Likewise.
2153 (vect_determine_min_output_precision_1): Likewise.
2154 (vect_determine_precisions_from_range): Likewise.
2155 (vect_determine_precisions_from_users): Likewise.
2156 (vect_mark_pattern_stmts): Likewise.
2157 (vect_pattern_recog_1): Likewise.
2158 * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
2159 (vect_record_max_nunits): Likewise.
2160 (vect_build_slp_tree_1): Likewise.
2161 (vect_build_slp_tree_2): Likewise.
2162 (vect_print_slp_tree): Likewise.
2163 (vect_analyze_slp_instance): Likewise.
2164 (vect_detect_hybrid_slp_stmts): Likewise.
2165 (vect_detect_hybrid_slp_1): Likewise.
2166 (vect_slp_analyze_operations): Likewise.
2167 (vect_slp_analyze_bb_1): Likewise.
2168 (vect_transform_slp_perm_load): Likewise.
2169 (vect_schedule_slp_instance): Likewise.
2170 * tree-vect-stmts.c (vect_mark_relevant): Likewise.
2171 (vect_mark_stmts_to_be_vectorized): Likewise.
2172 (vect_init_vector_1): Likewise.
2173 (vect_get_vec_def_for_operand): Likewise.
2174 (vect_finish_stmt_generation_1): Likewise.
2175 (vect_check_load_store_mask): Likewise.
2176 (vectorizable_call): Likewise.
2177 (vectorizable_conversion): Likewise.
2178 (vectorizable_operation): Likewise.
2179 (vectorizable_load): Likewise.
2180 (vect_analyze_stmt): Likewise.
2181 (vect_is_simple_use): Likewise.
2182 (vect_get_vector_types_for_stmt): Likewise.
2183 (vect_get_mask_type_for_stmt): Likewise.
2184 * tree-vectorizer.c (increase_alignment): Likewise.
2186 2018-09-19 Andrew Stubbs <ams@codesourcery.com>
2188 * doc/rtl.texi: Adjust vec_select description.
2189 * simplify-rtx.c (simplify_binary_operation_1): Allow VEC_SELECT to use
2190 non-constant selectors.
2192 2018-09-19 Matthew Malcomson <matthew.malcomson@arm.com>
2194 * config/aarch64/aarch64-protos.h
2195 (aarch64_offset_9bit_signed_unscaled_p): New declaration.
2196 * config/aarch64/aarch64.md (arches): New "rcpc8_4" attribute value.
2197 (arch_enabled): Add check for "rcpc8_4" attribute value of "arch".
2198 * config/aarch64/aarch64.h (AARCH64_FL_RCPC8_4): New bitfield.
2199 (AARCH64_FL_FOR_ARCH8_4): Include AARCH64_FL_RCPC8_4.
2200 (AARCH64_FL_PROFILE): Move index so flags are ordered.
2201 (AARCH64_ISA_RCPC8_4): New flag.
2202 * config/aarch64/aarch64.c (offset_9bit_signed_unscaled_p): Renamed
2203 to aarch64_offset_9bit_signed_unscaled_p.
2204 * config/aarch64/atomics.md (atomic_store<mode>): Allow offset
2206 * config/aarch64/constraints.md (Ust): New constraint.
2207 * config/aarch64/predicates.md.
2208 (aarch64_9bit_offset_memory_operand): New predicate.
2209 (aarch64_rcpc_memory_operand): New predicate.
2211 2018-09-19 Eric Botcazou <ebotcazou@adacore.com>
2213 PR rtl-optimization/87361
2214 * rtlanal.c (nonzero_bits1): Revert accidental change.
2216 2018-09-19 Richard Biener <rguenther@suse.de>
2218 PR tree-optimization/87349
2219 PR tree-optimization/87342
2220 * tree-ssa-sccvn.c (do_rpo_vn): Iterate max_rpo computation.
2222 2018-09-18 Marek Polacek <polacek@redhat.com>
2224 P1064R0 - Allowing Virtual Function Calls in Constant Expressions
2225 * gimple-fold.c (gimple_get_virt_method_for_vtable): Adjust assert.
2227 2018-09-18 Segher Boessenkool <segher@kernel.crashing.org>
2229 * config/rs6000/rs6000.md: Remove old "Cygnus sibcall" comment.
2231 2018-09-18 Segher Boessenkool <segher@kernel.crashing.org>
2233 PR rtl-optimization/86882
2234 * rtlanal.c (reg_overlap_mentioned_p): Handle CLOBBER.
2236 2018-09-18 Uros Bizjak <ubizjak@gmail.com>
2238 * config/i386/i386.md (*<code>extend<mode>xf2): Macroize insn from
2239 *<code>extendsfxf2 and *<code>extenddfxf2 using MODEF mode iterator.
2241 2018-09-18 Jonathan Wakely <jwakely@redhat.com>
2244 * doc/invoke.texi (Link Options): Fix formatting and grammar.
2246 2018-09-18 Richard Biener <rguenther@suse.de>
2249 * tree-ssa-coalesce.c (tree_int_map_hasher): Remove.
2250 (compute_samebase_partition_bases): Likewise.
2251 (coalesce_ssa_name): Always use compute_optimized_partition_bases.
2252 (gimple_can_coalesce_p): Simplify.
2254 2018-09-18 Hans-Peter Nilsson <hp@bitrange.com>
2256 Handle a library implementation of ffs calling __builtin_ffs.
2257 * config/mmix/mmix.c (TARGET_INIT_LIBFUNCS): Override with...
2258 (mmix_init_libfuncs): New function: make __builtin_ffs expand
2261 2018-09-17 David Malcolm <dmalcolm@redhat.com>
2263 * diagnostic-show-locus.c (class layout_range): Add field
2265 (layout_range::layout_range): Add "original_idx" param and use it
2266 to initialize new field.
2267 (make_range): Use 0 for original_idx.
2268 (layout::layout): Pass in index to calls to
2269 maybe_add_location_range.
2270 (layout::maybe_add_location_range): Add param "original_idx" and
2271 pass it on to layout_range.
2272 (layout::print_any_labels): Pass on range->m_original_idx to
2274 (gcc_rich_location::add_location_if_nearby): Use 0 for
2276 * gcc-rich-location.h (text_range_label::get_text): Update for new
2278 (range_label_for_type_mismatch::get_text): Likewise.
2280 2018-09-17 Uros Bizjak <ubizjak@gmail.com>
2282 * config/i386/i386.c (ix86_emit_i387_log1p): Emit fldln2 earlier.
2284 2018-09-17 David Malcolm <dmalcolm@redhat.com>
2286 * gimple-ssa-sprintf.c (fmtwarn): Update for introduction of
2287 format_string_diagnostic_t.
2288 (fmtwarn_n): Likewise.
2289 * substring-locations.c
2290 (format_string_diagnostic_t::format_string_diagnostic_t) New ctor.
2291 (format_warning_n_va): Convert to...
2292 (format_string_diagnostic_t::emit_warning_n_va): ...this.
2293 (format_warning_va): Convert to...
2294 (format_string_diagnostic_t::emit_warning_va): ...this.
2295 (format_warning_at_substring): Convert to...
2296 (format_string_diagnostic_t::emit_warning): ...this.
2297 (format_warning_at_substring_n): Convert to...
2298 (format_string_diagnostic_t::emit_warning_n): ...this.
2299 * substring-locations.h (class format_string_diagnostic_t): New
2301 (format_warning_va): Convert to
2302 format_string_diagnostic_t::emit_warning_va.
2303 (format_warning_n_va): Convert to
2304 format_string_diagnostic_t::emit_warning_n_va.
2305 (format_warning_at_substring): Convert to
2306 format_string_diagnostic_t::emit_warning.
2307 (format_warning_at_substring_n): Convert to
2308 format_string_diagnostic_t::emit_warning_n.
2310 2018-09-17 Cesar Philippidis <cesar@codesourcery.com>
2311 Bernd Schmidt <bernds_cb1@t-online.de>
2313 * config/nvptx/nvptx.md (atomic_fetch_<logic><mode>): Enable with
2316 2018-09-17 Uros Bizjak <ubizjak@gmail.com>
2318 * config/i386/i386.md (truncxf<mode>2_i387_noop_unspec): Change
2319 operand 0 predicate to nonimmediate operand.
2320 (rint<mode>2_frndint): Remove insn pattern.
2321 (rint<mode>2): Change operand 1 predicate to general_operand.
2322 Extend operand 1 to XFmode and generate rintxf2 insn.
2323 (frndintxf2_<rounding>): Rename from frndint<mode>2_<rounding>.
2324 Do not use X87MODEF mode macro.
2325 (frndintxf2_<rounding>_i387): Rename from
2326 frndint<mode>2_<rounding>_i387. Do not use X87MODEF mode macro.
2327 (<rounding_insn><mode>2): For non-SSE modes, extend operand 1
2328 to XFmode and generate significandxf3 insn.
2330 2018-09-17 Richard Biener <rguenther@suse.de>
2332 PR tree-optimization/87328
2333 * tree-ssa-sccvn.c (process_bb): Remove assertion about not
2334 visiting unexecutable backedges when not iterating.
2335 (do_rpo_vn): Mark all edges not executable even when not
2338 2018-09-17 Martin Jambor <mjambor@suse.cz>
2341 * doc/invoke.texi (Warning Options): Likewise.
2343 2018-09-17 Richard Biener <rguenther@suse.de>
2345 PR tree-optimization/87301
2346 * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_cleanup): Properly
2347 clean EH info from leftover copy assignments.
2349 2018-09-17 Martin Liska <mliska@suse.cz>
2351 PR gcov-profile/85871
2352 * gcov.c (output_intermediate_file): Fix out of bounds
2355 2018-09-17 Vineet Gupta <vgupta@synopsys.com>
2357 * config/arc/arc.c: Object attributes for core4 not reflected
2359 * config/arc/arc.h: Don't restrict DBNZ to core3 (core4 includes
2362 2018-09-17 Alexey Brodkin <abrodkin@synopsys.com>
2364 * config/arc/linux.h (LINK_EH_SPEC): Add missing space.
2366 2018-09-17 Martin Liska <mliska@suse.cz>
2368 * doc/gcov.texi: Document new option --use-hotness-colors.
2369 * gcov.c (struct source_info): Declare new field.
2370 (source_info::source_info): Set default for maximum_count.
2371 (print_usage): Add new -q option.
2372 (process_args): Process it.
2373 (accumulate_line_info): Save src->maximum_count.
2374 (output_line_beginning): Make color line number if
2375 flag_use_hotness_colors is set.
2376 (output_line_details): Pass default argument value.
2377 (output_lines): Pass src->maximum_count.
2379 2018-09-17 Martin Liska <mliska@suse.cz>
2381 * common/config/i386/i386-common.c (ix86_get_valid_option_values):
2382 Use processor_names table.
2383 * config/i386/i386.c (ix86_default_align): Use
2384 processor_cost_table for alignment values.
2385 (ix86_option_override_internal): Use processor_names.
2386 (ix86_function_specific_print): Likewise.
2387 * config/i386/i386.h (struct processor_costs):
2388 Add alignment values.
2389 (struct ptt): Remove and replace with const char *.
2390 * config/i386/x86-tune-costs.h (struct processor_costs):
2391 Declare default alignments for all costs.
2393 2018-09-17 Aldy Hernandez <aldyh@redhat.com>
2395 * tree-vrp.c (extract_range_from_unary_expr): Do not special case
2396 symbolics or VR_VARYING ranges for ABS_EXPR.
2397 * wide-int-range.cc (wide_int_range_abs): Return positive numbers
2398 when range will wrap.
2400 2018-09-15 Eric Botcazou <ebotcazou@adacore.com>
2403 * cfgexpand.c (expand_gimple_basic_block): Be prepared for a BARRIER
2404 before and after a JUMP_TABLE_DATA.
2406 2018-09-14 John David Anglin <danglin@gcc.gnu.org>
2409 * dojump.c (do_compare_and_jump): Canonicalize function pointers
2410 when one operand is a function pointer. Use POINTER_TYPE_P and
2411 FUNC_OR_METHOD_TYPE_P.
2412 * expr.c (do_store_flag): Use POINTER_TYPE_P and FUNC_OR_METHOD_TYPE_P.
2413 * fold-const.c (build_range_check): Likewise.
2414 * match.pd (simple_comparison): Likewise.
2416 2018-09-14 David Malcolm <dmalcolm@redhat.com>
2419 * spellcheck.c (get_edit_distance_cutoff): New function.
2420 (selftest::test_edit_distance_unit_test_oneway): Rename to...
2421 (selftest::test_get_edit_distance_one_way): ...this.
2422 (selftest::test_get_edit_distance_unit): Rename to...
2423 (selftest::test_get_edit_distance_both_ways): ...this.
2424 (selftest::test_edit_distances): Move tests to this new function,
2425 and test some more pairs of strings. Update for above renaming.
2426 (selftest::get_old_cutoff): New function.
2427 (selftest::test_get_edit_distance_cutoff): New function.
2428 (selftest::assert_suggested_for): New function.
2429 (ASSERT_SUGGESTED_FOR): New macro.
2430 (selftest::assert_not_suggested_for): New function.
2431 (ASSERT_NOT_SUGGESTED_FOR): New macro.
2432 (selftest::test_suggestions): New function.
2433 (selftest::spellcheck_c_tests): Move test_get_edit_distance_unit
2434 tests to selftest::test_edit_distances and call it. Add calls to
2435 selftest::test_get_edit_distance_cutoff and
2436 selftest::test_suggestions.
2437 * spellcheck.h (get_edit_distance_cutoff): New function declaration.
2438 (best_match::consider): Replace hard-coded cutoff calculation with
2440 (best_match::get_cutoff): New declaration.
2441 (best_match::get_best_meaningful_candidate): Likewise.
2443 2018-09-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
2445 * builtins.c (fold_builtin_strlen): Remove TODO comment.
2447 2018-09-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
2450 2018-07-30 Bernd Edlinger <bernd.edlinger@hotmail.de>
2452 * tree-ssa-forwprop.c (simplify_builtin_call): Don't create a not NUL
2453 terminated string literal.
2455 2018-09-14 Martin Sebor <msebor@redhat.com>
2457 * builtins.c (unterminated_array): Handle ARRAY_REF.
2458 (expand_builtin_stpcpy_1): Detect unterminated char arrays.
2459 * builtins.h (unterminated_array): Declare extern.
2460 * gimple-fold.c (gimple_fold_builtin_stpcpy): Detect unterminated
2462 (gimple_fold_builtin_sprintf): Propagate NO_WARNING to transformed
2465 2018-09-14 Martin Sebor <msebor@redhat.com>
2466 Jeff Law <law@redhat.com>
2468 * builtins.c (unterminated_array): New.
2469 (expand_builtin_strcpy): Adjust.
2470 (expand_builtin_strcpy_args): Detect unterminated arrays.
2471 * gimple-fold.c (get_maxval_strlen): Add argument. Detect
2472 unterminated arrays.
2473 * gimple-fold.h (get_maxval_strlen): Add argument.
2474 (gimple_fold_builtin_strcpy): Detec unterminated arrays.
2476 * gimple-fold.c (get_range_strlen): Add argument.
2477 (get_maxval_strlen): Adjust.
2478 * gimple-fold.h (get_range_strlen): Add argument.
2480 2018-09-14 Wei Xiao <wei3.xiao@intel.com>
2482 * config/i386/movdirintrin.h: Fix copyright year.
2484 2018-09-14 Uros Bizjak <ubizjak@gmail.com>
2486 * reg-stack.c: Include regs.h.
2487 (replace_reg): Assert that mode is MODE_FLOAT or MODE_COMPLEX_FLOAT.
2488 (emit_pop_insn): Default pop insn mode to the reg_raw_mode of
2489 FIRST_STACK_REG, not DFmode.
2490 (emit_swap_insn): Default swap insn mode to the reg_raw_mode of
2491 FIRST_STACK_REG, not XFmode. Explicitly construct swap RTX.
2492 (change stack): Default register mode to the reg_raw_mode of
2493 FIRST_STACK_REG, not DFmode.
2494 * config/i386/i386.md (*swap<mode>): Remove insn pattern.
2495 (*swapxf): Rename from swapxf.
2497 2018-09-14 Carl Love <cel@us.ibm.com>
2499 * config/rs6000/emmintrin.h: Add _MM_SHUFFLE2.
2500 * config/rs6000/xmmintrin.h: Add _MM_SHUFFLE.
2502 2018-09-14 Segher Boessenkool <segher@kernel.crashing.org>
2505 * config/rs6000/rs6000.md (*mov<mode>_hardfloat64): Add Z to the Y
2508 2018-09-14 Sam Tebbs <sam.tebbs@arm.com>
2511 * config/aarch64/aarch64.md (*aarch64_bfxilsi_uxtw): Define.
2513 2018-09-14 Jason Merrill <jason@redhat.com>
2515 Fix --enable-gather-detailed-mem-stats.
2516 * hash-table.c (hash_table_usage): Change from variable to function.
2517 * hash-table.h: Adjust.
2518 * Makefile.in: Add missing dependencies on hash-table.h.
2520 2018-09-14 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
2522 PR tree-optimization/87259
2524 (pass_cse_reciprocals::execute): Run optimize_recip_sqrt after
2525 execute_cse_reciprocals_1 has tried transforming.
2527 2018-09-14 Aldy Hernandez <aldyh@redhat.com>
2529 * tree-vrp.c (extract_range_from_binary_expr_1): Normalize
2530 VR_VARYING for PLUS/MINUS_EXPR.
2532 2018-09-14 Ilya Leoshkevich <iii@linux.ibm.com>
2534 * config/s390/s390-passes.def (INSERT_PASS_BEFORE): Improve
2537 2018-09-14 Richard Biener <rguenther@suse.de>
2540 * tree-ssa-coalesce.c (ssa_conflicts_merge): Remove conflict
2541 bits for the merged partition.
2543 2018-09-13 Martin Sebor <msebor@redhat.com>
2544 Bernd Edlinger <bernd.edlinger@hotmail.de>
2546 * builtins.h (c_srlen): Add argument.
2547 * builtins.c (warn_string_no_nul): New function.
2548 (c_strlen): Add argument and use it. Update recursive calls.
2549 Pass DECL argument to string_constant to get info on non
2550 terminated strings. Update *NONSTR as needed.
2551 (fold_builtin_strlen): Add argument to calls to c_strlen.
2552 Warn for unterminated arrays.
2553 (warn_string_no_null): Add prototype.
2554 * expr.c (string_constant): Update arguments. Update recursive
2555 calls appropriately. Detect missing NUL terminator and outermost
2556 declaration its missing in.
2557 Improve checks for arrays with nonzero lower bound or elements
2558 that are not a single byte. Simplify offset computation.
2559 Simplify checks for non-NUL terminated strings.
2560 * gimple-fold.c (get_range_strlen): Add argument to c_strlen call.
2561 * gimple-ssa-sprintf.c (get_string_length): Remove unnecessary code.
2563 2018-09-13 Bernd Edlinger <bernd.edlinger@hotmail.de>
2565 * builtins.c (c_strlen): Handle not zero terminated STRING_CSTs
2567 * fold-const.c (c_getstr): Fix function comment. Remove unused third
2568 argument. Fix range checks.
2569 * fold-const.h (c_getstr): Adjust protoype.
2570 * gimple-fold.c (gimple_fold_builtin_memory_op): Avoid folding when
2571 string is constant but contains no NUL byte.
2573 * expr.c (string_constant): Adjust function comment.
2574 Remove bogus check for zero termination.
2576 * fold-const.c (c_getstr): Clamp STRING_LENGTH to STRING_SIZE.
2578 * varasm.c (compare_constant): Compare type size of STRING_CSTs.
2579 (get_constant_size): Don't make STRING_CSTs larger than they are.
2580 (check_string_literal): New check function for STRING_CSTs.
2581 (output_constant): Use it.
2583 2018-09-13 Eric Botcazou <ebotcazou@adacore.com>
2586 * config/visium/visium.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define.
2588 2018-09-13 Richard Biener <rguenther@suse.de>
2590 PR tree-optimization/87263
2591 * tree-ssa-sccvn.c (visit_phi): Revert some earlier changes.
2592 (struct unwind_state): Add max_rpo field.
2593 (do_rpo_vn): Allow up-to-date loop state to be used when not iterating.
2594 Compute max_rpo, the max RPO number a block can be backwards reached
2595 from. Re-write non-iterating mode to a RPO ordered worklist approach,
2596 separating it from the iterating mode.
2598 2018-09-13 Vlad Lazar <vlad.lazar@arm.com>
2600 * haifa-sched.c (rank_for_schedule): Schedule by INSN_COST.
2601 (rfs_decision): New scheduling decision.
2603 2018-09-13 Richard Biener <rguenther@suse.de>
2606 * tree-ssa-sccvn.c (vn_nary_op_insert_into): Fix assert.
2607 (vn_nary_op_insert_pieces_predicated): Do not write useless
2608 valid_dominated_by_p entry outside of the allocated storage.
2610 2018-09-13 Omar Sandoval <osandov@osandov.com>
2611 Tom de Vries <tdevries@suse.de>
2614 * dwarf2out.c (is_c): New function.
2615 (add_subscript_info): Add DW_AT_count of 0 for C zero-length arrays.
2617 2018-09-13 Sam Tebbs <sam.tebbs@arm.com>
2620 * config/aarch64/aarch64.md (*aarch64_bfxil):
2622 * config/aarch64/constraints.md (Ulc): Define.
2623 * config/aarch64/aarch64-protos.h (aarch64_high_bits_all_ones_p):
2625 * config/aarch64/aarch64.c (aarch64_high_bits_all_ones_p):
2628 2018-09-13 Vlad Lazar <vlad.lazar@arm.com>
2630 * config/aarch64/aarch64.h (TARGET_COMPUTE_FRAME_LAYOUT): Define.
2631 * config/aarch64/aarch64.c (aarch64_expand_prologue): Remove
2632 aarch64_layout_frame call.
2633 (aarch64_expand_epilogue): Likewise.
2634 (aarch64_initial_elimination_offset): Likewise.
2635 (aarch64_get_separate_components): Likewise.
2636 (aarch64_use_return_insn_p): Likewise.
2637 (aarch64_layout_frame): Remove unneeded check.
2639 2018-09-13 Jakub Jelinek <jakub@redhat.com>
2641 * configure.ac: Only append
2642 " : (reconfigured) $TOPLEVEL_CONFIGURE_ARGUMENTS" to
2643 gcc_config_arguments if it was never reconfigured or last reconfigure
2644 was with different arguments.
2645 * configure: Regenerated.
2647 2018-09-13 Jakub Jelinek <jakub@redhat.com>
2648 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
2651 * expr.c (maybe_optimize_pow2p_mod_cmp): New function.
2652 (maybe_optimize_mod_cmp): Use it if integer_pow2p treeop1.
2654 2018-09-13 Jakub Jelinek <jakub@redhat.com>
2656 PR tree-optimization/87287
2657 * fold-const.c (fold_binary_loc) <case EQ_EXPR>: Move signed modulo
2658 X % C == 0 to X % (unsigned) C == 0 optimization to ...
2659 * match.pd (X % C == 0): ... here. New optimization.
2661 2018-09-12 Jakub Jelinek <jakub@redhat.com>
2664 * expr.h (maybe_optimize_mod_cmp): Declare.
2665 * expr.c (mod_inv): New function.
2666 (maybe_optimize_mod_cmp): New function.
2667 (do_store_flag): Use it.
2668 * cfgexpand.c (expand_gimple_cond): Likewise.
2670 2018-09-09 Cesar Philippidis <cesar@codesourcery.com>
2671 Julian Brown <julian@codesourcery.com>
2674 * gimplify.c (gimplify_scan_omp_clauses): Set
2675 target_firstprivatize_array_bases in OpenACC parallel and kernels
2676 region contexts. Remove GOMP_MAP_FIRSTPRIVATE_REFERENCE clauses from
2677 OpenACC data regions.
2679 2018-09-12 Uros Bizjak <ubizjak@gmail.com>
2681 * config/i386/i386.md (sqrt_extend<mode>xf3_i387): Remove.
2682 (sqrt<mode>2): Extend operand 1 to XFmode and generate sqrtxf3 insn.
2684 2018-09-12 Richard Biener <rguenther@suse.de>
2686 PR tree-optimization/87280
2687 * tree-ssa-sccvn.c (process_bb): Handle the case of executable
2688 edge but unreachable target.
2689 (do_rpo_vn): For conservatively handling a PHI only mark
2690 the backedge executable but not the block reachable.
2692 2018-09-12 Richard Biener <rguenther@suse.de>
2694 PR tree-optimization/87266
2695 * tree-ssa-sccvn.c (do_rpo_vn): Always iterate to not yet
2698 2018-09-12 Andreas Krebbel <krebbel@linux.ibm.com>
2700 * config/s390/s390.md (PFPO_RND_MODE_DFP, PFPO_RND_MODE_BFP): New
2702 ("trunc<BFP:mode><DFP_ALL:mode>2")
2703 ("trunc<DFP_ALL:mode><BFP:mode>2")
2704 ("extend<BFP:mode><DFP_ALL:mode>2")
2705 ("extend<DFP_ALL:mode><BFP:mode>2"): Set proper rounding mode
2706 according to the target operand type.
2708 2018-09-12 Jakub Jelinek <jakub@redhat.com>
2709 Andreas Krebbel <krebbel@linux.ibm.com>
2711 PR tree-optimization/86844
2712 * gimple-ssa-store-merging.c
2713 (imm_store_chain_info::coalesce_immediate): For overlapping stores, if
2714 there are any overlapping stores in between them, make sure they are
2715 also coalesced or we give up completely.
2717 2018-09-12 Jakub Jelinek <jakub@redhat.com>
2720 * fold-const.c (fold_ternary_loc) <case COND_EXPR>: Verify also that
2721 BIT_AND_EXPR's second operand is a power of two. Formatting fix.
2723 2018-09-12 Tom de Vries <tdevries@suse.de>
2725 * common.opt (gdescribe-dies): Add option.
2726 * dwarf2out.c (add_name_and_src_coords_attributes): Add description
2727 attribute for artifical and nameless decls.
2728 (dwarf2out_register_external_die): Add description attribute to
2729 external reference die.
2730 (add_desc_attribute): New functions.
2731 (gen_subprogram_die): Add description attribute to
2732 DW_TAG_call_site_parameter.
2733 * tree-pretty-print.c (print_generic_expr_to_str): New function.
2734 * tree-pretty-print.h (print_generic_expr_to_str): Declare.
2735 * doc/invoke.texi (@item Debugging Options): Add -gdescribe-dies and
2737 (@item -gdescribe-dies): Add.
2739 2018-09-12 Aldy Hernandez <aldyh@redhat.com>
2741 * tree-vrp.c (vrp_shift_undefined_p): Remove.
2742 (extract_range_from_binary_expr_1: Call
2743 wide_int_range_shift_undefined_p instead of vrp_shift_undefined_p.
2744 * wide-int-range.h (wide_int_range_shift_undefined_p): Do not
2747 2018-09-12 Aldy Hernandez <aldyh@redhat.com>
2749 * gimple-ssa-warn-alloca.c
2750 (alloca_type_and_limit::alloca_type_and_limit): Initialize limit
2751 field for ALLOCA_BOUND_*_LARGE.
2753 2018-09-11 Nathan Sidwell <nathan@acm.org>
2755 * gcc.c (load_specs, execute, run_attempt): Use %qs not '%s'.
2757 2018-09-11 Uros Bizjak <ubizjak@gmail.com>
2759 * reg-stack.c (subst_asm_stack_regs): Call replace_reg also
2760 for clobbers. Remove obsolete comment.
2762 2018-09-11 Uros Bizjak <ubizjak@gmail.com>
2764 * config/i386/i386.md (define_attr "type"): Remove mpxmov, mpxmk,
2765 mpxchk, mpxld and mpxst types.
2766 (define_attr length_immediate): Remove all processing of mpx types.
2767 (define_attr prefix_0f): Ditto.
2768 (define_attr memory): Ditto.
2770 2018-09-11 Uros Bizjak <ubizjak@gmail.com>
2772 * config/i386/i386.md (fyl2x_extend<mode>xf3_i387): Remove.
2773 (log<mode>2): Change operand 1 predicate to general_operand.
2774 Extend operand 1 to XFmode and generate logxf3 insn.
2775 (log10<mode>2): Change operand 1 predicate to general_operand.
2776 Extend operand 1 to XFmode and generate log10xf3 insn.
2777 (log2<mode>2): Change operand 1 predicate to general_operand.
2778 Extend operand 1 to XFmode and generate log2xf3 insn.
2779 (fyl2xp1_extend<mode>xf3_i387): Remove.
2780 (log1p<mode>2): Change operand 1 predicate to general_operand.
2781 Extend operand 1 to XFmode and generate log1pxf3 insn.
2782 (fxtract_extend<mode>xf3_i387): Remove.
2783 (logb<mode>2): Change operand 1 predicate to general_operand.
2784 Extend operand 1 to XFmode and generate logbxf3 insn.
2785 (ilogb<mode>2): Change operand 1 predicate to general_operand.
2786 Extend operand 1 to XFmode and generate fxtractxf3_i387 insn.
2787 (significand<mode>2): Change operand 1 predicate to general_operand.
2788 Extend operand 1 to XFmode and generate significandxf3 insn.
2790 2018-09-11 Nathan Sidwell <nathan@acm.org>
2792 * gcc.c (perror_with_name, pfatal_with_name): Delete.
2793 (load_specs): Use fatal_error.
2794 (DELETE_IF_ORDINARY, process_command): Use error.
2795 (execute, run_attempt): Use fatal_error.
2797 2018-09-11 Andrew Stubbs <ams@codesourcery.com>
2799 * diagnostic-core.h (sorry_at): New prototype.
2800 * diagnostic.c (sorry_at): New function.
2802 2018-09-11 Aldy Hernandez <aldyh@redhat.com>
2804 * tree-vrp.c (extract_range_from_binary_expr_1): Treat all divisions
2805 by zero as VR_UNDEFINED.
2807 2018-09-10 Uros Bizjak <ubizjak@gmail.com>
2809 * config/i386/i386.md (<sincos>xf2): Rename from *<sincos>xf2_i387.
2810 (*<sincos>_extend<mode>xf2_i387): Remove insn pattern.
2811 (<sincos>mode2): New expander.
2812 (sincos_extend<mode>xf3_i387): Remove insn pattern.
2813 (sincos -> sin, cos splitters): Remove splitter patterns.
2814 (sincos<mode>3): Change operand 2 predicate to general_operand.
2815 Extend operand 2 to XFmode and generate sincosxf3 insn.
2816 (fptanxf4_i387): Change mode of operands 0 and 3 to SFmode.
2817 Change operand 3 predicate to const1_operand.
2818 (fptan_extend<mode>xf4_i387): Remove insn pattern.
2819 (tanxf2): Update operands in the call to fptanxf4_i387.
2820 (tan<mode>2): Change operand 1 predicate to general_operand.
2821 Extend operand 1 to XFmode and generate tanxf3 insn.
2822 (atan2xf3): Rename from *fpatanxf3_i387.
2823 (fpatan_extend<mode>xf3_i387): Remove insn pattern.
2824 (atan2xf3): Remove expander.
2825 (atan2<mode<3): Change operand 1 and 2 predicates to general_operand.
2826 Extend operands 1 and 2 to XFmode and generate atan2xf3 insn.
2827 (atan<mode>2): Change operand 1 predicate to general_operand.
2828 Extend operand 1 to XFmode and generate atanxf3 insn.
2830 2018-09-10 Uros Bizjak <ubizjak@gmail.com>
2832 * config/i386/i386.md (x87/SSE constant load splitter): Use
2833 memory_operand instead of nonimmediate_operand for input operand
2836 2018-09-09 Uros Bizjak <ubizjak@gmail.com>
2838 * config/i386/i386.md (float partial SSE register stall splitter): Move
2839 splitter near its instruction pattern.
2840 (float_extend partial SSE register stall splitter): Ditto.
2841 (float_truncate partial SSE register stall splitter): Ditto.
2843 2018-09-09 Hans-Peter Nilsson <hp@bitrange.com>
2846 * config/mmix/mmix.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
2847 to speculation_safe_value_not_needed.
2850 * config/mmix/mmix.c (mmix_assemble_integer): Handle byte-size
2851 non-CONST_INT rtx:es using assemble_integer_with_op ".byte".
2852 (MMIX_CFUN_NEEDS_SAVED_EH_RETURN_ADDRESS): Don't call
2853 leaf_function_p, instead use has_hard_reg_initial_val.
2855 2018-09-09 Nathan Sidwell <nathan@acm.org>
2857 * gcc.h (pfatal_with_name): Don't declare here.
2858 * gcc.c (pfatal_with_name): Make static.
2860 2018-09-09 Xianmiao Qu <xianmiao_qu@c-sky.com>
2862 * config/csky/csky.md (*cskyv2_adddi3, *cskyv2_subdi3): Add
2865 2018-09-08 John David Anglin <danglin@gcc.gnu.org>
2867 PR rtl-optimization/85458
2868 * sel-sched.c (sel_target_adjust_priority): Allow backend adjust
2869 priority hook to reduce the priority of EXPR.
2871 2018-09-07 Uros Bizjak <ubizjak@gmail.com>
2873 * config/i386/i386.md (float<SWI48x:mode><MODEF:mode>2) Enable
2874 DImode for x87 on 32bit targets. Conditionally disable x87 modes
2875 with X87_ENABLE_FLOAT. Remove preparation code.
2876 (*float<SWI48:mode><MODEF:mode>2): Rename from
2877 *float<SWI48:mode><MODEF:mode>2_mixed. Handle x87, SSE and mixed
2878 math using "enabled" attribute.
2879 (*floatdi<MODEF:mode>2_i387): Rename from
2880 *float<SWI48x:mode><MODEF:mode>2_i387. Handle only DImode and
2881 enable for 32bit targets only.
2882 (floatdi<X87MODEF:mode>2_i387_with_xmm pre-reload splitter): New
2884 (floatdi<X87MODEF:mode>2_i387_with_xmm): Use register_operand
2885 as operand 1 predicate. Rewrite as define_insn_and_split.
2886 (floatdi<X87MODEF:mode>2_i387_with_xmm memory input splitter): Remove.
2888 2018-09-06 Uros Bizjak <ubizjak@gmail.com>
2890 * reg-stack.c (get_true_reg) <case FLOAT_TRUNCATE>: Reorder
2891 to fallthru to FLOAT case.
2893 2018-09-06 Will Schmidt <will_schmidt@vnet.ibm.com>
2896 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Update logic
2897 around folding of vec_sl to handle out of range shift values.
2899 2018-09-06 Uros Bizjak <ubizjak@gmail.com>
2901 * config/i386/i386.md (fix_trunc<mode>_fisttp_i387_1): Remove.
2902 Update callers to gen_fix_trunc<mode>_i387_fisttp
2903 (fix_trunc<mode>_i387_fisttp): Change operand 0 predicate to
2904 nonimmediate_operand.
2905 (fix_trunc<mode>_i387_fisttp_with_temp): Remove insn pattern
2906 and corresponding splitters.
2907 (*fix_trunc<mode>_i387_1): Always expand with fix_trunc<mode>_i387.
2908 (fix_truncdi_i387): Change operand 0 predicate to nonimmediate_operand.
2909 (fix_truncdi_i387_with_temp): Remove insn pattern
2910 and corresponding splitters.
2911 (fix_trunc<mode>_i387): Change operand 0 predicate to
2912 nonimmediate_operand.
2913 (fix_trunc<mode>_i387_with_temp): Remove insn pattern
2914 and corresponding splitters.
2915 (*fistdi2_1): Remove.
2917 (fistdi2_with_temp): Remove insn pattern and corresponding splitters.
2918 (lrintxfdi2): Remove expander. Reimplement as define_insn.
2919 (*fist<mode>2_1): Remove.
2920 (fist<mode>2): Ditto.
2921 (fist<mode>2_with_temp): Remove insn pattern and corresponding
2923 (lrintxf<mode>2): Remove expander. Reimplement as define_insn.
2924 (*fist<mode>2_<rounding>_1): Always expand with fist<mode>2_<rounding>.
2925 (fistdi2_<rounding>): Change operand 0 predicate to
2926 nonimmediate_operand.
2927 (fistdi2_<rounding>_with_temp): Remove insn pattern
2928 and corresponding splitters.
2929 (fist<mode>2_<rounding>): Change operand 0 predicate to
2930 nonimmediate_operand.
2931 (fist<mode>2_<rounding>_with_temp): Remove insn pattern
2932 and corresponding splitters.
2934 (*fixuns_trunc<mode>si2_avx512f_zext): Depend on TARGET_SSE_MATH.
2936 2018-09-06 Bernd Edlinger <bernd.edlinger@hotmail.de>
2938 * varasm.c (output_constructor_regular_field): Check TYPE_SIZE_UNIT of
2941 2018-09-06 Will Schmidt <will_schmidt@vnet.ibm.com>
2943 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add support for
2944 early gimple folding of vec_splat().
2945 * tree-vect-generic.c: Remove static from tree_vec_extract() definition.
2946 * gimple-fold.h: Add an extern define for tree_vec_extract().
2948 2018-09-06 Will Schmidt <will_schmidt@vnet.ibm.com>
2950 * config/rs6000/rs6000.c (fold_mergehl_helper): Add types_compatible_p
2951 wrappers around TREE_TYPE comparisons.
2953 2018-09-06 Ilya Leoshkevich <iii@linux.ibm.com>
2956 * config/s390/predicates.md: Add nonsym_memory_operand.
2957 * config/s390/s390.c (s390_legitimize_cs_operand): If operand
2958 contains a SYMBOL_REF, load it into an intermediate pseudo.
2959 (s390_emit_compare_and_swap): Legitimize operand.
2960 * config/s390/s390.md: Use the new nonsym_memory_operand
2961 with UNSPECV_CAS patterns.
2963 2018-09-06 Ilya Leoshkevich <iii@linux.ibm.com>
2966 * config/s390/s390-passes.def: New file.
2967 * config/s390/s390-protos.h (class rtl_opt_pass): Add forward
2969 (make_pass_s390_early_mach): Add declaration.
2970 * config/s390/s390.c (make_pass_s390_early_mach):
2971 (s390_option_override): Remove dynamic registration.
2972 * config/s390/t-s390: Add s390-passes.def.
2974 2018-09-06 Ilya Leoshkevich <iii@linux.ibm.com>
2976 * config/s390/s390.c (s390_decompose_constant_pool_ref):
2977 Remove UNSPEC_LTREL_BASE check.
2978 (annotate_constant_pool_refs): Likewise.
2979 (find_constant_pool_ref): Likewise.
2980 (find_ltrel_base): Removed.
2981 (replace_ltrel_base): Removed.
2982 (s390_mainpool_finish): Remove replace_ltrel_base call.
2983 (s390_chunkify_start): Remove pending LTREL_BASE logic.
2984 (s390_chunkify_finish): Remove replace_ltrel_base call.
2985 * config/s390/s390.md: Remove UNSPEC_LTREL_BASE.
2987 2018-09-06 Hans-Peter Nilsson <hp@axis.com>
2990 * config/cris/cris.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
2991 to speculation_safe_value_not_needed.
2993 2018-09-05 Cesar Philippidis <cesar@codesourcery.com>
2994 Bernd Schmidt <bernds_cb1@t-online.de>
2996 * config/nvptx/nvptx-opts.h: New file.
2997 * config/nvptx/nvptx.c (nvptx_file_start): Print the correct .target.
2998 * config/nvptx/nvptx.h: Include "nvptx-opts.h".
3000 (TARGET_SM35): New macro.
3001 * config/nvptx/nvptx.md (atomic_fetch_<logic><mode>): Enable with the
3003 * config/nvptx/nvptx.opt (ptx_isa, sm_30, sm_35): New enum and its
3005 (misa=): New option.
3006 * doc/invoke.texi (Nvidia PTX Options): Document -misa.
3008 2018-09-05 Uros Bizjak <ubizjak@gmail.com>
3010 * config/i386/i386.md (truncdfsf2): Remove expander.
3011 (truncdfsf2_with_temp): Ditto.
3012 (truncxf<mode>2): Ditto.
3013 (*truncdfsf_fast_mixed): Remove insn pattern.
3014 (*truncdfsf_fast_i387): Ditto.
3015 (*truncdfsf_mixed): Ditto.
3016 (*truncdfsf_i387): Ditto.
3017 (*truncdfsf2_i387_1): Ditto.
3018 (*truncxfsf2_mixed): Ditto.
3019 (*truncxfdf2_mixed): Ditto.
3020 (*truncxf<mode>2_i387_noop): Ditto. Update callers
3021 to call gen_truncxf<mode>2 instead.
3022 (*truncxf<mode>2_i387): Remove.
3023 (reg->reg splitters): Remove splitter pattern.
3024 (reg->mem splitters): Ditto.
3026 (truncdfsf2): New insn pattern.
3027 (truncxf<mode>2): Ditto.
3029 2018-09-05 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
3031 * tree-ssa-math-opts.c (is_mult_by): New function.
3032 (is_square_of): Use the above.
3033 (optimize_recip_sqrt): New function.
3034 (pass_cse_reciprocals::execute): Use the above.
3036 2018-09-05 Richard Biener <rguenther@suse.de>
3039 * tree-ssa-sccvn.c (rpo_elim::eliminate_push_avail): Make sure
3040 to zero-init the emplaced vec.
3042 2018-09-05 Martin Liska <mliska@suse.cz>
3044 PR tree-optimization/87205
3045 * tree-switch-conversion.c (pass_lower_switch::execute):
3046 Group cases for switch statements.
3048 2018-09-05 Richard Biener <rguenther@suse.de>
3050 PR tree-optimization/87217
3051 * tree-ssa-sccvn.c (vuse_valueize): New.
3052 (vn_reference_lookup_pieces): Use it.
3053 (vn_reference_lookup): Likewise.
3055 2018-09-05 Nathan Sidwell <nathan@acm.org>
3058 * stor-layout.c (place_field): Scan forwards to check last
3059 bitfield when ms_bitfield_placement is in effect.
3061 2018-09-05 Richard Biener <rguenther@suse.de>
3064 * tree-vect-stmts.c (vectorizable_simd_clone_call): Fix bogus
3067 2018-09-05 Siddhesh Poyarekar <siddhesh@sourceware.org>
3068 Kugan Vivekanandarajah <kugan.vivekanandarajah@linaro.org>
3070 * config/aarch64/falkor-tag-collision-avoidance.c: New file.
3071 * config.gcc (extra_objs): Build it.
3072 * config/aarch64/t-aarch64 (falkor-tag-collision-avoidance.o):
3074 * config/aarch64/aarch64-passes.def
3075 (pass_tag_collision_avoidance): New pass.
3076 * config/aarch64/aarch64.c (qdf24xx_tunings): Add
3077 AARCH64_EXTRA_TUNE_RENAME_LOAD_REGS to tuning_flags.
3078 (aarch64_classify_address): Remove static qualifier.
3079 (aarch64_address_info, aarch64_address_type): Move to...
3080 * config/aarch64/aarch64-protos.h: ... here.
3081 (make_pass_tag_collision_avoidance): New function.
3082 * config/aarch64/aarch64-tuning-flags.def (rename_load_regs):
3085 2018-09-05 Martin Liska <mliska@suse.cz>
3087 * doc/gcov.texi: Update documentation of humar
3089 * gcov.c (format_count): Print one decimal place, it provides
3090 more fine number of situations like '1G' vs. '1.4G'.
3092 2018-09-05 Martin Liska <mliska@suse.cz>
3095 * config/rs6000/rs6000.opt: Mark the option as Deprecated.
3096 * optc-gen.awk: Allow 'Var' for Deprecated options in order
3097 to generate a MASK value.
3099 2018-09-04 H.J. Lu <hongjiu.lu@intel.com>
3102 * dwarf2out.c (based_loc_descr): Allow hard frame pointer even
3103 if frame pointer isn't used.
3104 (compute_frame_pointer_to_fb_displacement): Likewise.
3106 2018-09-04 Jakub Jelinek <jakub@redhat.com>
3109 * common/config/i386/i386-common.c (OPTION_MASK_ISA_XSAVEOPT_SET,
3110 OPTION_MASK_ISA_XSAVES_SET, OPTION_MASK_ISA_XSAVEC_SET): Use
3111 OPTION_MASK_ISA_XSAVE_SET instead of OPTION_MASK_ISA_XSAVE.
3112 (OPTION_MASK_ISA_XSAVE_UNSET): Add OPTION_MASK_ISA_XSAVES_UNSET
3113 and OPTION_MASK_ISA_XSAVEC_UNSET.
3115 2018-09-04 Max Filippov <jcmvbkbc@gmail.com>
3117 * config/xtensa/xtensa.c (xtensa_expand_atomic): Reorder AND and
3118 XOR operations in NAND case.
3120 2018-09-04 Aldy Hernandez <aldyh@redhat.com>
3122 * wide-int-range.cc (wide_int_range_convert): New.
3123 * wide-int-range.h (wide_int_range_convert): New.
3124 * tree-vrp.c (extract_range_from_unary_expr): Abstract wide int
3125 code into wide_int_range_convert.
3126 (extract_range_into_wide_ints): Do not munge anti range constants
3127 into the entire domain. Just return the range back.
3129 2018-09-04 Martin Liska <mliska@suse.cz>
3131 * genmatch.c (output_line_directive): Add new argument
3133 (dt_simplify::gen_1): Encapsulate dump within __builtin_expect.
3135 2018-09-04 Jonathan Wakely <jwakely@redhat.com>
3137 * doc/invoke.texi (Option Summary): Add whitespace.
3139 * doc/invoke.texi (Option Summary): Add -Waligned-new.
3141 2018-09-04 Richard Biener <rguenther@suse.de>
3143 PR tree-optimization/87211
3144 * tree-ssa-sccvn.c (visit_phi): When value-numbering to a
3145 backedge value we're supposed to treat as VARYING also number
3146 the PHI to VARYING in case it got a different value-number already.
3148 2018-09-04 Aldy Hernandez <aldyh@redhat.com>
3150 * tree-vrp.c (vrp_can_optimize_bit_op): Remove.
3151 (extract_range_from_binary_expr_1): Do not call
3152 vrp_can_optimize_bit_op.
3153 * wide-int-range.cc (wide_int_range_can_optimize_bit_op): Make
3155 (wide_int_range_get_mask_and_bounds): New.
3156 (wide_int_range_optimize_bit_op): New.
3157 (wide_int_range_bit_ior): Call wide_int_range_optimize_bit_op.
3158 (wide_int_range_bit_and): Same.
3159 * wide-int-range.h (wide_int_range_can_optimize_bit_op): Remove.
3160 (wide_int_range_optimize_bit_op): New.
3161 (wide_int_range_get_mask_and_bounds): New.
3163 2018-09-04 Richard Biener <rguenther@suse.de>
3165 PR tree-optimization/87176
3166 * tree-ssa-sccvn.c (visit_phi): Remove redundant allsame
3167 variable. When value-numbering a virtual PHI node make sure
3168 to not value-number to the backedge value.
3170 2018-09-04 Jonathan Wakely <jwakely@redhat.com>
3172 * doc/extend.texi (Long Long, Hex Floats): Document support for
3173 long long and hex floats in more recent versions of ISO C++.
3175 2018-09-03 Richard Biener <rguenther@suse.de>
3177 PR tree-optimization/87177
3178 * tree-ssa-sccvn.c (vuse_ssa_val): Revert previous change, keep
3181 2018-09-03 Alexander Monakov <amonakov@ispras.ru>
3183 * bb-reorder.c (edge_order): Convert to C-qsort-style
3184 tri-state comparator.
3185 (reorder_basic_blocks_simple): Change std::stable_sort to
3188 2018-09-03 Alexander Monakov <amonakov@ispras.ru>
3190 * tree-loop-distribution.c (offset_cmp): Convert to C-qsort-style
3191 tri-state comparator.
3192 (fuse_memset_builtins): Change std::stable_sort to gcc_stablesort.
3194 2018-09-03 Alexander Monakov <amonakov@ispras.ru>
3196 * sort.cc (struct sort_ctx): New field 'nlim'. Use it...
3197 (mergesort): ... here as maximum count for using netsort.
3198 (gcc_qsort): Set nlim to 3 if stable sort is requested.
3199 (gcc_stablesort): New.
3200 * system.h (gcc_stablesort): Declare.
3202 2018-09-03 Alexander Monakov <amonakov@ispras.ru>
3204 * sort.cc (gcc_qsort) [CHECKING_P]: Call qsort_chk.
3205 * system.h (qsort): Always redirect to gcc_qsort. Update comment.
3206 * vec.c (qsort_chk): Do not call gcc_qsort. Update comment.
3208 2018-09-03 Segher Boessenkool <segher@kernel.crashing.org>
3210 * config/rs6000/rs6000.md (*mov<mode>_hardfloat32): Remove %U from the
3211 lxsdx and stxsdx alternatives.
3212 (*mov<mode>_hardfloat64): Ditto.
3213 * config/rs6000/vsx.md (*vsx_extract_<mode>_store): Ditto.
3215 2018-09-03 Richard Biener <rguenther@suse.de>
3217 PR tree-optimization/87200
3218 * tree-ssa-sccvn.c (vn_nary_build_or_lookup_1): Valueize a
3221 2018-09-03 Martin Liska <mliska@suse.cz>
3223 PR tree-optimization/87201
3224 * tree-switch-conversion.c (switch_decision_tree::balance_case_nodes):
3225 Fix parenthesis in an expression.
3227 2018-09-03 Richard Biener <rguenther@suse.de>
3229 PR tree-optimization/87197
3230 * tree-ssa-sccvn.c (vn_nary_build_or_lookup_1): Mark the new def
3231 visited. CSE the VN_INFO hashtable lookup.
3233 PR tree-optimization/87169
3234 * tree-ssa-sccvn.c (do_rpo_vn): When marking loops for not
3235 iterating make sure there's no extra backedges from irreducible
3236 regions feeding the header. Mark the destination block
3239 2018-09-03 Martin Liska <mliska@suse.cz>
3242 * common/common-target.def: Add TARGET_GET_VALID_OPTION_VALUES.
3243 * common/common-targhooks.c (default_get_valid_option_values):
3245 * common/common-targhooks.h (default_get_valid_option_values):
3247 * common/config/i386/i386-common.c: Move processor_target_table
3249 (ix86_get_valid_option_values): New function.
3250 (TARGET_GET_VALID_OPTION_VALUES): New macro.
3251 * config/i386/i386.c (struct ptt): Move to i386-common.c.
3252 (PTA_*): Move all defined masks into i386-common.c.
3253 (ix86_function_specific_restore): Use new processor_cost_table.
3254 * config/i386/i386.h (struct ptt): Moved from i386.c.
3255 (struct pta): Likewise.
3256 * doc/tm.texi: Document new TARGET_GET_VALID_OPTION_VALUES.
3257 * doc/tm.texi.in: Likewise.
3258 * opt-suggestions.c (option_proposer::suggest_option):
3259 Pass prefix to build_option_suggestions.
3260 (option_proposer::get_completions): Likewise.
3261 (option_proposer::build_option_suggestions): Use the new target
3263 * opts.c (struct option_help_tuple): New struct.
3264 (print_filtered_help): Use the new target hook.
3266 2018-09-03 Martin Liska <mliska@suse.cz>
3269 * predict.c (set_even_probabilities): Add likely_edges
3270 argument and handle cases where we have precisely one
3272 (combine_predictions_for_bb): Catch also likely_edges.
3273 (tree_predict_by_opcode): Handle gswitch statements.
3274 * tree-cfg.h (find_case_label_for_value): New declaration.
3275 (find_taken_edge_switch_expr): Likewise.
3276 * tree-switch-conversion.c (switch_decision_tree::balance_case_nodes):
3277 Find pivot in decision tree based on probabily, not by number of
3280 2018-09-02 Gerald Pfeifer <gerald@pfeifer.com>
3282 * doc/standards.texi (Standards): Update Objective-C reference.
3284 2018-09-01 Gerald Pfeifer <gerald@pfeifer.com>
3286 * doc/install.texi (Prerequisites): Update link for MPC.
3288 2018-09-01 Michael Matz <matz@suse.de>
3290 PR tree-optimization/87074
3291 * gimple-loop-jam.c (unroll_jam_possible_p): Check loop exit
3292 PHIs for outer-loop uses.
3294 2018-09-01 Gerald Pfeifer <gerald@pfeifer.com>
3296 * doc/generic.texi (OpenMP): Adjust link to openmp.org.
3297 * doc/invoke.texi (C Dialect Options): Ditto.
3299 2018-09-01 Gerald Pfeifer <gerald@pfeifer.com>
3301 * doc/install.texi (Prerequisites): Adjust link mpfr.org.
3303 2018-08-31 Richard Biener <rguenther@suse.de>
3305 PR tree-optimization/87168
3306 * tree-ssa-sccvn.c (SSA_VAL): Add visited output parameter.
3307 (rpo_elim::eliminate_avail): When OP was not visited it must
3310 2018-08-31 David Malcolm <dmalcolm@redhat.com>
3312 * tree-vrp.c (copy_value_range): Convert param "from" from
3313 "value_range *" to "const value_range *".
3314 (range_is_null): Likewise for param "vr".
3315 (range_int_cst_p): Likewise.
3316 (range_int_cst_singleton_p): Likewise.
3317 (symbolic_range_p): Likewise.
3318 (value_ranges_intersect_p): Likewise for both params.
3319 (value_range_nonnegative_p): Likewise for param "vr".
3320 (value_range_constant_singleton): Likewise.
3321 (vrp_set_zero_nonzero_bits): Likewise for param "ar".
3322 (extract_range_into_wide_ints): Likewise for param "vr".
3323 (extract_range_from_multiplicative_op): Likewise for params "vr0"
3325 (vrp_can_optimize_bit_op): Likewise.
3326 (extract_range_from_binary_expr_1): Likewise for params "vr0_" and
3328 (extract_range_from_unary_expr): Likewise.
3329 (debug_value_range): Likewise for param "vr".
3330 (value_range::dump): Add "const" qualifier.
3331 (vrp_prop::check_array_ref): Convert local "vr" from
3332 "value_range *" to "const value_range *".
3333 (vrp_prop::check_mem_ref): Likewise.
3334 (vrp_prop::visit_stmt): Likewise for local "old_vr".
3335 (vrp_intersect_ranges_1): Likewise for param "vr_1".
3336 (vrp_intersect_ranges): Likewise.
3337 (simplify_stmt_for_jump_threading): Likewise for local "vr".
3338 (vrp_prop::vrp_finalize): Likewise.
3339 * tree-vrp.h (value_range::dump): Add "const" qualifier.
3340 (vrp_intersect_ranges): Add "const" qualifier to params as above.
3341 (extract_range_from_unary_expr): Likewise.
3342 (value_range_constant_singleton): Likewise.
3343 (symbolic_range_p): Likewise.
3344 (copy_value_range): Likewise.
3345 (extract_range_from_binary_expr_1): Likewise.
3346 (range_int_cst_p): Likewise.
3347 (vrp_set_zero_nonzero_bits): Likewise.
3348 (range_int_cst_singleton_p): Likewise.
3350 2018-08-31 Vlad Lazar <vlad.lazar@arm.com>
3352 * config/aarch64/arm_neon.h (vabsd_s64): New.
3353 (vnegd_s64): Likewise.
3355 2018-08-31 Martin Jambor <mjambor@suse.cz>
3357 * ipa-cp.c (estimate_local_effects): Replace wrong MAX with MIN.
3359 2018-08-31 Martin Liska <mliska@suse.cz>
3361 * ipa-icf.c (sem_item::add_type): Use
3362 sem_item::m_type_hash_cache.
3363 * ipa-icf.h: Move the cache from sem_item_optimizer
3366 2018-08-31 Nathan Sidwell <nathan@acm.org>
3368 * doc/extend.texi (Backwards Compatibility): Remove implicit
3369 extern C leeway of () being (...).
3371 2018-08-31 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
3373 * ipa-inline.c (can_inline_edge_by_limits_p): Fix typos in comment.
3375 2018-08-31 Segher Boessenkool <segher@kernel.crashing.org>
3379 * config/rs6000/rs6000.md (lround<mode>di2): Gate on TARGET_FPRND.
3381 2018-08-31 Jakub Jelinek <jakub@redhat.com>
3384 * expmed.c (expand_mult_const): Use immed_wide_int_const instead of
3385 gen_int_mode. Formatting fixes.
3387 2018-08-30 Sandra Loosemore <sandra@codesourcery.com>
3389 * target.def (custom_function_descriptors): Improve documentation.
3390 * doc/tm.texi.in (Trampolines): Expand discussion of function
3391 descriptors and move TARGET_CUSTOM_FUNCTION_DESCRIPTORS to the
3392 beginning of the section.
3393 * doc/tm.texi: Regenerated.
3395 2018-08-30 Jose E. Marchesi <jose.marchesi@oracle.com>
3397 * cfg.h (class auto_edge_flag): Spell out the template-id of the
3398 base class in the initializer list. This is a workaround for
3399 building with older GCC.
3400 (class auto_bb_flag): Likewise.
3402 2018-08-30 Aaron Sawdey <acsawdey@linux.ibm.com>
3404 * config/rs6000/altivec.md (altivec_eq<mode>): Remove star.
3405 (altivec_vcmpequ<VI_char>_p): Remove star.
3406 * config/rs6000/rs6000-string.c (do_load_for_compare): Support
3408 (expand_strncmp_vec_sequence): New function.
3409 (emit_final_str_compare_vec): New function.
3410 (expand_strn_compare): Add support for vector strncmp.
3411 * config/rs6000/rs6000.opt (-mstring-compare-inline-limit): Change
3412 length specification to bytes.
3413 * config/rs6000/vsx.md (vsx_ld_elemrev_v16qi_internal): Remove star.
3414 (vcmpnezb_p): New pattern.
3415 * doc/invoke.texi (RS/6000 and PowerPC Options): Update documentation
3416 for option -mstring-compare-inline-limit.
3418 2018-08-30 Thiago Macieira <thiago.macieira@intel.com>
3420 * config/i386/i386.c (PTA_WESTMERE): Remove PTA_AES.
3421 (PTA_SKYLAKE): Add PTA_AES.
3422 (PTA_GOLDMONT): Likewise.
3424 2018-08-29 Jan Hubicka <jh@suse.cz>
3427 * lto-opts.c (lto_write_options): Always stream PIC/PIE mode.
3428 * lto-wrapper.c (merge_and_complain): Fix merging of PIC/PIE.
3430 2018-08-29 Jan Hubicka <jh@suse.cz>
3432 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not follow
3434 (hash_tree): Do not visit TYPE_STUB_DECL.
3435 * tree-streamer-out.c (write_ts_type_common_tree_pointers): Do not
3436 stream TYPE_STUB_DECL.
3437 * tree-streamer-in.c (lto_input_ts_type_common_tree_pointers): Likewise.
3438 * ipa-utils.h (type_with_linkage_p): Do not rely on TYPE_STUB_DECL
3439 after free_lang_data.
3440 (type_in_anonymous_namespace_p): Likewise.
3442 2018-08-29 Jan Hubicka <jh@suse.cz>
3444 * sreal.h (SREAL_PART_BITS): Change to 31; remove seemingly unnecessary
3445 comment that it has to be even number.
3446 (class sreal): Change m_sig type to int32_t.
3447 * sreal.c (sreal::dump, sreal::to_int, opreator+, operator-): Use
3448 int64_t for temporary calculations.
3449 (sreal_verify_basics): Drop one bit from minimum and maximum.
3451 2018-08-30 Richard Biener <rguenther@suse.de>
3453 PR tree-optimization/87147
3454 * tree-ssa-sccvn.c (SSA_VISITED): New function.
3455 (visit_phi): When the degenerate result is from the backedge and
3456 we didn't visit its definition yet drop to VARYING.
3457 (do_rpo_vn): Properly mark blocks with incoming backedges as executable.
3459 2018-08-29 Jan Hubicka <jh@suse.cz>
3461 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not walk
3463 (hash_tree): Likewise.
3465 2018-08-29 Jan Hubicka <jh@suse.cz>
3467 * tree.c (find_decls_types_r): Walk also TYPE_NEXT_PTR_TO
3468 and TYPE_NEXT_REF_TO.
3470 2018-08-29 Jan Hubicka <jh@suse.cz>
3472 * sreal.h (SREAL_PART_BITS): Change to 31; remove seemingly unnecessary
3473 comment that it has to be even number.
3474 (class sreal): Change m_sig type to int32_t.
3475 * sreal.c (sreal::dump, sreal::to_int, opreator+, operator-): Use
3476 int64_t for temporary calculations.
3477 (sreal_verify_basics): Drop one bit from minimum and maximum.
3479 2018-08-30 Tamar Christina <tamar.christina@arm.com>
3481 * config/aarch64/aarch64.c (aarch64_expand_movmem): Set TImode max.
3483 2018-08-30 Vlad Lazar <vlad.lazar@arm.com>
3486 * expmed.c (canonicalize_comparison): Use wi::sub instead of wi::add
3487 if to_add is negative.
3489 2018-08-29 Bernd Edlinger <bernd.edlinger@hotmail.de>
3492 * builtins.c (c_strlen): Improve range checks.
3494 2018-08-29 Martin Sebor <msebor@redhat.com>
3495 Jeff Law <law@redhat.com>
3497 PR tree-optimization/86714
3498 PR tree-optimization/86711
3499 * builtins.c (c_strlen): Add arguments to call to string_constant.
3500 * expr.c (string_constant): Add argument. Detect missing nul
3501 terminator and outermost declaration it's missing in.
3502 * expr.h (string_constant): Add argument.
3503 * fold-const.c (read_from_constant_string): Add arguments to call to
3505 (c_getstr): Likewise.
3506 * tree-ssa-forwprop.c (simplify_builtin_call): Likewise.
3508 * tree-ssa-strlen.c (get_stridx): Likewise.
3510 2018-08-29 Jan Hubicka <jh@suse.cz>
3512 * tree-streamer-in.c (lto_input_ts_function_decl_tree_pointers):
3513 Do not stream DECL_VINDEX.
3514 * tree-streamer-out.c (write_ts_function_decl_tree_pointers): Likewise.
3515 * tree.c (free_lang_data_in_decl): Clear DECL_VINDEX.
3516 (decl_function_context): Use DECL_VIRTUAL_P rather than DECL_VINDEX.
3518 2018-08-29 Richard Biener <rguenther@suse.de>
3520 * tree-ssa-sccvn.c (vuse_ssa_val): Return NULL for unvisited
3521 virtual operands that are not default defs to honor region
3523 (rpo_vn_valueize): Remove ineffective code here.
3525 2018-08-29 Richard Biener <rguenther@suse.de>
3527 PR tree-optimization/87132
3528 * tree-ssa-alias.c (get_continuation_for_phi): Do not translate
3529 when skipping defs reachable over backedges.
3531 2018-08-29 Richard Biener <rguenther@suse.de>
3533 * tree-core.h: Document use of deprecated_flag in SSA_NAME.
3534 * tree.h (SSA_NAME_POINTS_TO_READONLY_MEMORY): Define.
3535 * tree-into-ssa.c (pass_build_ssa::execute): Initialize
3536 function parameters SSA_NAME_POINTS_TO_READONLY_MEMORY from fnspec.
3537 * tree-ssa-sccvn.c (const_parms, init_const_parms): Remove.
3538 (vn_reference_lookup_3): Remove use of const_parms.
3539 (free_rpo_vn): Do not free const_parms.
3540 (do_rpo_vn): Do not call init_const_parms.
3541 * tree-ssa-alias.c (refs_may_alias_p_1): Honor
3542 SSA_NAME_POINTS_TO_READONLY_MEMORY.
3543 (call_may_clobber_ref_p_1): Likewise.
3545 2018-08-29 Alexander Monakov <amonakov@ispras.ru>
3548 * invoke.texi (Optimization Options): List -ftree-scev-cprop.
3550 (-ftree-scev-cprop): Document.
3552 2018-08-29 Jan Hubicka <jh@suse.cz>
3554 * sreal.h (normalize, normalize_up, normalize_down): Add new_sig/new_exp
3556 (sreal constructor): Update.
3557 * sreal.c (sreal:operator+, sreal:operator-, sreal:operator*,
3558 sreal:operator/): Update.
3560 2018-08-29 Martin Liska <mliska@suse.cz>
3562 * tree-switch-conversion.c (switch_conversion::expand):
3563 Strenghten assumption about gswitch statements.
3565 2018-08-29 Richard Biener <rguenther@suse.de>
3567 PR tree-optimization/87117
3568 * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_stmt): Only
3569 re-value-number released SSA VDEFs.
3571 2018-08-29 Richard Biener <rguenther@suse.de>
3573 PR tree-optimization/87126
3574 * tree-ssa-sccvn.c (vn_reference_insert): Remove assert.
3576 2018-08-28 Jim Wilson <jimw@sifive.com>
3578 * config/riscv/pic.md: Rewrite.
3579 * config/riscv/riscv.c (riscv_address_insns): Return cost of 3 for
3581 * config/riscv/riscv.md (ZERO_EXTEND_LOAD): Delete.
3582 (SOFTF, default_load, softload, softstore): New.
3584 2018-08-28 Jeff Law <law@redhat.com>
3586 * fold-const.c (fold_binary_loc): Remove recently added assert.
3588 2018-08-28 Joern Rennecke <joern.rennecke@riscy-ip.com>
3590 * genpreds.c (write_predicate_subfunction): Also add ATTRIBUTE_UNUSED
3591 to OP parmeter of generated function.
3593 2018-08-28 MCC CS <deswurstes@users.noreply.github.com>
3595 PR tree-optimization/87009
3596 * match.pd: Add boolean optimizations.
3598 2018-08-28 Martin Sebor <msebor@redhat.com>
3601 * calls.c (alloc_max_size): Treat HOST_WIDE_INT special.
3602 * gimple-ssa-warn-alloca.c (adjusted_warn_limit): New function.
3603 (pass_walloca::gate): Use it.
3604 (alloca_call_type): Same.
3605 (pass_walloca::execute): Same.
3606 * stor-layout.c (layout_decl): Treat HOST_WIDE_INT special.
3608 2018-08-28 David Malcolm <dmalcolm@redhat.com>
3610 * dumpfile.h (ATTRIBUTE_GCC_DUMP_PRINTF): Change version check on
3611 GCC_VERSION for usage of "__gcc_dump_printf__" format from
3614 2018-08-28 Richard Biener <rguenther@suse.de>
3616 PR tree-optimization/87124
3617 * tree-ssa-sccvn.c (vn_lookup_simplify_result): Guard against
3618 constants before looking up avail.
3620 2018-08-28 Jakub Jelinek <jakub@redhat.com>
3623 * calls.c (maybe_warn_nonstring_arg): Punt early if
3624 warn_stringop_overflow is zero. Don't call get_range_strlen
3625 on 3rd argument, keep iterating until lenrng[1] is INTEGER_CST.
3626 Swap comparison operands to have constants on rhs. Only use
3627 lenrng[1] if non-NULL and INTEGER_CST. Don't uselessly
3628 increment lenrng[0].
3630 2018-08-28 Richard Sandiford <richard.sandiford@arm.com>
3632 * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Fix unguarded
3633 use of tree_to_shwi. Remove duplicated test for the size being
3634 a whole number of bytes.
3636 2018-08-28 Richard Biener <rguenther@suse.de>
3638 PR tree-optimization/87117
3639 * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_cleanup):
3640 Handle removed stmt without LHS (GIMPLE_NOP).
3642 2018-08-28 Richard Biener <rguenther@suse.de>
3644 PR tree-optimization/87117
3645 * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Exclude
3646 void which is is_gimple_reg_type by checking for COMPLETE_TYPE_P.
3648 2018-08-28 Richard Biener <rguenther@suse.de>
3650 PR tree-optimization/87117
3651 * tree-ssa-pre.c (compute_avail): Do not make expressions
3652 with predicated values available.
3653 (get_expr_value_id): Assert we do not run into predicated value
3656 2018-08-28 Richard Biener <rguenther@suse.de>
3658 PR tree-optimization/87117
3659 * tree-ssa-operands.c (add_stmt_operand): STRING_CST may
3660 get virtual operands.
3661 (get_expr_operands): Handle STRING_CST like other decls.
3663 2018-08-28 Martin Liska <mliska@suse.cz>
3665 * tree.h: Update documentation of fndecl_built_in_p
3669 2018-08-27 Jeff Law <law@redhat.com>
3670 PR tree-optimization/87110
3671 * tree-ssa-dse.c (compute_trims): Handle non-constant
3674 2018-08-27 Martin Sebor <msebor@redhat.com>
3676 PR tree-optimization/86914
3677 * tree-ssa-strlen.c (maybe_set_strlen_range): Avoid MEM_REF.
3679 2018-08-27 Martin Sebor <msebor@redhat.com>
3681 PR tree-optimization/87112
3682 * builtins.c (expand_builtin_strnlen): Convert c_strlen result to
3683 the type of the bound argument.
3685 2018-08-27 Jeff Law <law@redhat.com>
3687 * tree-ssa-dse.c (compute_trims): Handle case where the reference's
3688 type does not have a TYPE_SIZE_UNIT.
3690 2018-08-27 Steve Ellcey <sellcey@cavium.com>
3692 * config/aarch64/aarch64-speculation.cc: Replace include of cfg.h
3693 with include of backend.h.
3695 2018-08-27 Richard Biener <rguenther@suse.de>
3697 PR tree-optimization/86927
3698 * tree-vect-loop.c (vect_create_epilog_for_reduction): Properly
3699 use const cond reduction code.
3701 2018-08-27 Alexander Monakov <amonakov@ispras.ru>
3703 PR tree-optimization/85758
3704 * match.pd ((X & Y) ^ Y): Add :s qualifier to inner expression.
3706 2018-08-27 David Malcolm <dmalcolm@redhat.com>
3709 * diagnostic-show-locus.c (class layout_range): Update for
3710 conversion of show_caret_p to a tri-state.
3711 (layout_range::layout_range): Likewise.
3712 (make_range): Likewise.
3713 (layout::maybe_add_location_range): Likewise.
3714 (layout::should_print_annotation_line_p): Don't show annotation
3715 lines for ranges that are SHOW_LINES_WITHOUT_RANGE.
3716 (layout::get_state_at_point): Update for conversion of
3717 show_caret_p to a tri-state. Bail out early for
3718 SHOW_LINES_WITHOUT_RANGE, so that such ranges don't affect
3719 underlining or source colorization.
3720 (gcc_rich_location::add_location_if_nearby): Update for conversion
3721 of show_caret_p to a tri-state.
3722 (selftest::test_one_liner_multiple_carets_and_ranges): Likewise.
3723 (selftest::test_one_liner_fixit_replace_equal_secondary_range):
3725 (selftest::test_one_liner_labels): Likewise.
3726 * gcc-rich-location.c (gcc_rich_location::add_expr): Update for
3727 conversion of show_caret_p to a tri-state.
3728 * pretty-print.c (text_info::set_location): Likewise.
3729 * pretty-print.h (text_info::set_location): Likewise.
3730 * substring-locations.c (format_warning_n_va): Likewise.
3731 * tree-diagnostic.c (default_tree_printer): Likewise.
3732 * tree-pretty-print.c (newline_and_indent): Likewise.
3734 2018-08-27 David Malcolm <dmalcolm@redhat.com>
3737 * diagnostic-show-locus.c (get_line_span_for_fixit_hint): Show the
3738 line above for line-insertion fix-it hints.
3739 (selftest::test_fixit_insert_containing_newline): Update the
3740 expected results, and add a test with line-numbering enabled.
3742 2018-08-27 Martin Liska <mliska@suse.cz>
3745 * sanopt.c (sanitize_rewrite_addressable_params): Ignore
3746 params with DECL_HAS_VALUE_EXPR_P.
3748 2018-08-27 Martin Liska <mliska@suse.cz>
3750 * config/i386/i386.c (ix86_expand_set_or_movmem): Dump
3751 selected expansion strategy.
3753 2018-08-27 Martin Liska <mliska@suse.cz>
3755 * builtins.h (is_builtin_fn): Remove and fndecl_built_in_p.
3756 * builtins.c (is_builtin_fn): Likewise.
3757 * attribs.c (diag_attr_exclusions): Use new function
3758 fndecl_built_in_p and remove check for FUNCTION_DECL if
3760 (builtin_mathfn_code): Likewise.
3761 (fold_builtin_expect): Likewise.
3762 (fold_call_expr): Likewise.
3763 (fold_builtin_call_array): Likewise.
3764 (fold_call_stmt): Likewise.
3765 (set_builtin_user_assembler_name): Likewise.
3766 (is_simple_builtin): Likewise.
3767 * calls.c (gimple_alloca_call_p): Likewise.
3768 (maybe_warn_nonstring_arg): Likewise.
3769 * cfgexpand.c (expand_call_stmt): Likewise.
3770 * cgraph.c (cgraph_update_edges_for_call_stmt_node): Likewise.
3771 (cgraph_edge::verify_corresponds_to_fndecl): Likewise.
3772 (cgraph_node::verify_node): Likewise.
3773 * cgraphclones.c (build_function_decl_skip_args): Likewise.
3774 (cgraph_node::create_clone): Likewise.
3775 * config/arm/arm.c (arm_insert_attributes): Likewise.
3776 * config/i386/i386.c (ix86_gimple_fold_builtin): Likewise.
3777 * dse.c (scan_insn): Likewise.
3778 * expr.c (expand_expr_real_1): Likewise.
3779 * fold-const.c (operand_equal_p): Likewise.
3780 (fold_binary_loc): Likewise.
3781 * gimple-fold.c (gimple_fold_stmt_to_constant_1): Likewise.
3782 * gimple-low.c (lower_stmt): Likewise.
3783 * gimple-pretty-print.c (dump_gimple_call): Likewise.
3784 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call):
3786 * gimple.c (gimple_build_call_from_tree): Likewise.
3787 (gimple_call_builtin_p): Likewise.
3788 (gimple_call_combined_fn): Likewise.
3789 * gimplify.c (gimplify_call_expr): Likewise.
3790 (gimple_boolify): Likewise.
3791 (gimplify_modify_expr): Likewise.
3792 (gimplify_addr_expr): Likewise.
3793 * hsa-gen.c (gen_hsa_insns_for_call): Likewise.
3794 * ipa-cp.c (determine_versionability): Likewise.
3795 * ipa-fnsummary.c (compute_fn_summary): Likewise.
3796 * ipa-param-manipulation.c (ipa_modify_formal_parameters): Likewise.
3797 * ipa-split.c (visit_bb): Likewise.
3798 (split_function): Likewise.
3799 * ipa-visibility.c (cgraph_externally_visible_p): Likewise.
3800 * lto-cgraph.c (input_node): Likewise.
3801 * lto-streamer-out.c (write_symbol): Likewise.
3802 * omp-low.c (setjmp_or_longjmp_p): Likewise.
3803 (lower_omp_1): Likewise.
3804 * predict.c (strip_predict_hints): Likewise.
3805 * print-tree.c (print_node): Likewise.
3806 * symtab.c (symtab_node::output_to_lto_symbol_table_p): Likewise.
3807 * trans-mem.c (is_tm_irrevocable): Likewise.
3808 (is_tm_load): Likewise.
3809 (is_tm_simple_load): Likewise.
3810 (is_tm_store): Likewise.
3811 (is_tm_simple_store): Likewise.
3812 (is_tm_abort): Likewise.
3813 (tm_region_init_1): Likewise.
3814 * tree-call-cdce.c (gen_shrink_wrap_conditions): Likewise.
3815 * tree-cfg.c (verify_gimple_call): Likewise.
3816 (move_stmt_r): Likewise.
3817 (stmt_can_terminate_bb_p): Likewise.
3818 * tree-eh.c (lower_eh_constructs_2): Likewise.
3819 * tree-if-conv.c (if_convertible_stmt_p): Likewise.
3820 * tree-inline.c (remap_gimple_stmt): Likewise.
3821 (copy_bb): Likewise.
3822 (estimate_num_insns): Likewise.
3823 (fold_marked_statements): Likewise.
3824 * tree-sra.c (scan_function): Likewise.
3825 * tree-ssa-ccp.c (surely_varying_stmt_p): Likewise.
3826 (optimize_stack_restore): Likewise.
3827 (pass_fold_builtins::execute): Likewise.
3828 * tree-ssa-dce.c (mark_stmt_if_obviously_necessary): Likewise.
3829 (mark_all_reaching_defs_necessary_1): Likewise.
3830 * tree-ssa-dom.c (dom_opt_dom_walker::optimize_stmt): Likewise.
3831 * tree-ssa-forwprop.c (simplify_builtin_call): Likewise.
3832 (pass_forwprop::execute): Likewise.
3833 * tree-ssa-loop-im.c (stmt_cost): Likewise.
3834 * tree-ssa-math-opts.c (pass_cse_reciprocals::execute): Likewise.
3835 * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Likewise.
3836 * tree-ssa-strlen.c (get_string_length): Likewise.
3837 * tree-ssa-structalias.c (handle_lhs_call): Likewise.
3838 (find_func_aliases_for_call): Likewise.
3839 * tree-ssa-ter.c (find_replaceable_in_bb): Likewise.
3840 * tree-stdarg.c (optimize_va_list_gpr_fpr_size): Likewise.
3841 * tree-tailcall.c (find_tail_calls): Likewise.
3842 * tree.c (need_assembler_name_p): Likewise.
3843 (free_lang_data_in_decl): Likewise.
3844 (get_call_combined_fn): Likewise.
3845 * ubsan.c (is_ubsan_builtin_p): Likewise.
3846 * varasm.c (incorporeal_function_p): Likewise.
3847 * tree.h (DECL_BUILT_IN): Remove and replace with
3849 (DECL_BUILT_IN_P): Transfort to fndecl_built_in_p.
3850 (fndecl_built_in_p): New.
3852 2018-08-27 Martin Liska <mliska@suse.cz>
3854 PR tree-optimization/86847
3855 * tree-switch-conversion.c (switch_decision_tree::dump_case_nodes):
3856 Dump also subtree probability.
3857 (switch_decision_tree::do_jump_if_equal): New function.
3858 (switch_decision_tree::emit_case_nodes): Handle special
3859 situations in balanced tree that can be emitted much simpler.
3860 Fix calculation of probabilities that happen in tree expansion.
3861 * tree-switch-conversion.h (struct cluster): Add
3863 (struct simple_cluster): Likewise.
3864 (struct case_tree_node): Add new function has_child.
3865 (do_jump_if_equal): New.
3867 2018-08-27 Martin Liska <mliska@suse.cz>
3869 * tree-switch-conversion.c (bit_test_cluster::find_bit_tests):
3870 Add new argument to bit_test_cluster constructor.
3871 (bit_test_cluster::emit): Set bits really number of values
3873 (bit_test_cluster::hoist_edge_and_branch_if_true): Add
3874 probability argument.
3875 * tree-switch-conversion.h (struct bit_test_cluster):
3876 Add m_handles_entire_switch.
3878 2018-08-27 Martin Liska <mliska@suse.cz>
3880 PR tree-optimization/86702
3881 * tree-switch-conversion.c (jump_table_cluster::emit):
3882 Make probabilities even for values in jump table
3883 according to number of cases handled.
3884 (switch_decision_tree::compute_cases_per_edge): Pass
3885 argument to reset_out_edges_aux function.
3886 (switch_decision_tree::analyze_switch_statement): Likewise.
3887 * tree-switch-conversion.h (switch_decision_tree::reset_out_edges_aux):
3890 2018-08-27 Martin Liska <mliska@suse.cz>
3892 * cfgexpand.c (expand_asm_stmt): Use label_to_block and pass
3893 cfun argument explicitly.
3894 * gimple-pretty-print.c (dump_gimple_switch): Likewise.
3895 * hsa-gen.c (gen_hsa_insns_for_switch_stmt): Use new
3896 function gimple_switch_default_bb.
3897 (convert_switch_statements):
3899 * ipa-fnsummary.c (set_switch_stmt_execution_predicate):
3900 * stmt.c (label_to_block_fn): Use label_to_block and pass
3901 cfun argument explicitly and use gimple_switch_label_bb.
3902 (expand_case): Likewise.
3903 * tree-cfg.c (lower_phi_internal_fn): Use label_to_block and pass
3904 cfun argument explicitly. Likewise.
3905 (make_edges_bb): Likewise.
3906 (make_cond_expr_edges): Likewise.
3907 (get_cases_for_edge): Likewise.
3908 (make_gimple_switch_edges): Likewise.
3909 (label_to_block_fn): Likewise.
3910 (label_to_block): Likewise.
3911 (make_goto_expr_edges): Likewise.
3912 (make_gimple_asm_edges): Likewise.
3913 (main_block_label): Likewise.
3914 (group_case_labels_stmt): Likewise.
3915 (find_taken_edge_computed_goto): Likewise.
3916 (find_taken_edge_switch_expr): Likewise.
3917 (gimple_verify_flow_info): Likewise.
3918 (gimple_redirect_edge_and_branch): Likewise.
3919 (gimple_switch_label_bb): New function.
3920 (gimple_switch_default_bb): Likewise.
3921 (gimple_switch_edge): Likewise.
3922 (gimple_switch_default_edge): Likewise.
3923 * tree-cfg.h (label_to_block_fn): Remove and replace ...
3924 (label_to_block): ... with this.
3925 (gimple_switch_label_bb): New.
3926 (gimple_switch_default_bb): Likewise.
3927 (gimple_switch_edge): Likewise.
3928 (gimple_switch_default_edge): Likewise.
3929 * tree-cfgcleanup.c (convert_single_case_switch): Use
3930 new gimple functions and pass new argument to label_to_block.
3931 (cleanup_control_flow_bb):
3932 * tree-eh.c (make_eh_dispatch_edges): Use label_to_block and pass
3933 cfun argument explicitly.
3934 (make_eh_edges): Likewise.
3935 (redirect_eh_dispatch_edge): Likewise.
3936 (lower_resx): Likewise.
3937 (lower_eh_dispatch): Likewise.
3938 (maybe_remove_unreachable_handlers): Likewise.
3939 (unsplit_eh): Likewise.
3940 (cleanup_empty_eh): Likewise.
3941 (verify_eh_edges): Likewise.
3942 (verify_eh_dispatch_edge): Likewise.
3943 * tree-ssa-dom.c (record_edge_info): Likewise.
3944 * tree-ssa-forwprop.c (simplify_gimple_switch_label_vec): Likewise.
3945 * tree-ssa-threadedge.c (thread_around_empty_blocks): Likewise.
3946 (thread_through_normal_block): Likewise.
3947 * tree-ssa-uncprop.c (associate_equivalences_with_edges): Likewise.
3948 * tree-ssa-uninit.c (convert_control_dep_chain_into_preds):
3949 * tree-switch-conversion.c (switch_conversion::collect): Use new
3951 (switch_conversion::check_final_bb): Likewise.
3952 (switch_conversion::gather_default_values): Pass new argument
3954 (switch_conversion::build_constructors): Likewise.
3955 (switch_decision_tree::compute_cases_per_edge): Use new
3956 gimple_switch_edge function.
3957 (switch_decision_tree::analyze_switch_statement): Pass new argument
3959 (switch_decision_tree::try_switch_expansion): Use
3960 gimple_switch_default_edge.
3961 * tree-vrp.c (find_switch_asserts): Pass new argument
3963 * vr-values.c (vr_values::vrp_visit_switch_stmt): Likewise.
3964 (vr_values::simplify_switch_using_ranges): Likewise.
3966 2018-08-27 Richard Biener <rguenther@suse.de>
3968 * cfganal.h (rev_post_order_and_mark_dfs_back_seme): Declare.
3969 * cfganal.c (rev_post_order_and_mark_dfs_back_seme): New function.
3971 * tree-ssa-sccvn.h (struct vn_pval): New structure.
3972 (struct vn_nary_op_s): Add unwind_to member. Add
3973 predicated_values flag and put result into a union together
3974 with a linked list of vn_pval.
3975 (struct vn_ssa_aux): Add name member to make maintaining
3976 a map of SSA name to vn_ssa_aux possible. Remove no longer
3977 needed info, dfsnum, low, visited, on_sccstack, use_processed
3978 and range_info_anti_range_p members.
3979 (run_scc_vn, vn_eliminate, free_scc_vn, vn_valueize): Remove.
3980 (do_rpo_vn, run_rpo_vn, eliminate_with_rpo_vn, free_rpo_vn):
3982 (vn_valueize): New global.
3983 (vn_context_bb): Likewise.
3984 (VN_INFO_RANGE_INFO, VN_INFO_ANTI_RANGE_P, VN_INFO_RANGE_TYPE,
3985 VN_INFO_PTR_INFO): Remove.
3986 * tree-ssa-sccvn.c: ... (rewrite)
3987 (pass_fre::execute): For -O2+ initialize loops and run
3988 RPO VN in optimistic mode (iterating). For -O1 and -Og
3989 run RPO VN in non-optimistic mode.
3990 * params.def (PARAM_SCCVN_MAX_SCC_SIZE): Remove.
3991 (PARAM_RPO_VN_MAX_LOOP_DEPTH): Add.
3992 * doc/invoke.texi (sccvn-max-scc-size): Remove.
3993 (rpo-vn-max-loop-depth): Document.
3994 * tree-ssa-alias.c (walk_non_aliased_vuses): Stop walking
3995 when valuezing the VUSE signals we walked out of the region.
3996 * tree-ssa-pre.c (phi_translate_1): Ignore predicated values.
3997 (phi_translate): Set VN context block to use for availability
3999 (compute_avail): Likewise.
4000 (pre_valueize): New function.
4001 (pass_pre::execute): Adjust to the RPO VN API.
4003 * tree-ssa-loop-ivcanon.c: Include tree-ssa-sccvn.h.
4004 (propagate_constants_for_unrolling): Remove.
4005 (tree_unroll_loops_completely): Perform value-numbering
4006 on the unrolled bodies loop parent.
4008 2018-08-27 Richard Biener <rguenther@suse.de>
4010 * tree-ssa-pre.c (compute_antic): Re-use inverted postorder
4011 for partial antic compute.
4013 2018-08-27 Jakub Jelinek <jakub@redhat.com>
4015 PR rtl-optimization/87065
4016 * combine.c (simplify_if_then_else): Formatting fix.
4017 (if_then_else_cond): Guard MULT optimization with SCALAR_INT_MODE_P
4019 (known_cond): Don't return const_true_rtx for vector modes. Use
4020 CONST0_RTX instead of const0_rtx. Formatting fixes.
4022 2018-08-27 Martin Liska <mliska@suse.cz>
4024 PR gcov-profile/87069
4025 * gcov.c (process_file): Record files already processed
4026 and warn about a file being processed multiple times.
4028 2018-08-27 Martin Liska <mliska@suse.cz>
4031 * config/aarch64/aarch64.c (aarch64_override_options_internal):
4032 Set default values for x_aarch64_*_string strings.
4033 * config/aarch64/aarch64.opt: Remove --{march,mcpu,mtune}==
4034 prefix. For -mabi do not print '=ABI' in help and use
4035 <option_value> format for -msve-vector-bits and -moverride
4038 2018-08-26 Jeff Law <law@redhat.com>
4040 * config/mips/frame-header-opt.c: Include "backend.h" rather than
4043 2018-08-26 Marek Polacek <polacek@redhat.com>
4045 PR c++/87029, Implement -Wredundant-move.
4046 * doc/invoke.texi: Document -Wredundant-move.
4048 2018-08-25 Martin Sebor <msebor@redhat.com>
4050 PR tree-optimization/87059
4051 * builtins.c (expand_builtin_strncmp): Convert MIN_EXPR operand
4052 to the same type as the other.
4053 * fold-const.c (fold_binary_loc): Assert expectation.
4055 2018-08-25 Iain Sandoe <iain@sandoe.co.uk>
4057 * config/darwin.c (machopic_legitimize_pic_address): Clean up
4058 extraneous parentheses, dead code section and formatting.
4060 2018-08-24 David Malcolm <dmalcolm@redhat.com>
4063 * diagnostic-show-locus.c (layout::layout): Ensure the margin is
4064 wide enough for jumps in the line-numbering to be visible.
4065 (layout::print_gap_in_line_numbering): New member function.
4066 (layout::calculate_line_spans): When using line numbering, merge
4067 line spans that are only 1 line apart.
4068 (diagnostic_show_locus): When printing line numbers, show gaps in
4069 line numbering directly, rather than printing headers.
4070 (selftest::test_diagnostic_show_locus_fixit_lines): Add test of
4071 line-numbering with multiple line spans.
4072 (selftest::test_fixit_insert_containing_newline_2): Add test of
4073 line-numbering, in which the spans are close enough to be merged.
4075 2018-08-24 Aldy Hernandez <aldyh@redhat.com>
4077 * gimple-ssa-evrp-analyze.c (set_ssa_range_info): Pass value_range
4078 to range_includes_zero_p. Do not special case VR_ANTI_RANGE.
4079 * tree-vrp.c (range_is_nonnull): Remove.
4080 (range_includes_zero_p): Accept value_range instead of min/max.
4081 (extract_range_from_binary_expr_1): Do not early bail on
4083 Use range_includes_zero_p instead of range_is_nonnull.
4084 (extract_range_from_unary_expr): Use range_includes_zero_p instead
4085 of range_is_nonnull.
4086 (vrp_meet_1): Pass value_range to range_includes_zero_p. Do not
4087 special case VR_ANTI_RANGE.
4088 (vrp_finalize): Same.
4089 * tree-vrp.h (range_includes_zero_p): Pass value_range as argument
4091 (range_is_nonnull): Remove.
4092 * vr-values.c (vrp_stmt_computes_nonzero): Use
4093 range_includes_zero_p instead of range_is_nonnull.
4094 (extract_range_basic): Pass value_range to range_includes_zero_p
4095 instead of range_is_nonnull.
4097 2018-08-24 Uros Bizjak <ubizjak@gmail.com>
4099 * emit-rtl.c (init_emit_once): Do not emit MODE_POINTER_BOUNDS RTXes.
4100 * emit-rtl.h (rtl_data): Remove return_bnd.
4101 * explow.c (trunc_int_for_mode): Do not handle POINTER_BOUNDS_MODE_P.
4102 * function.c (diddle_return_value): Do not handle crtl->return_bnd.
4103 * genmodes.c (complete_mode): Do not handle MODE_POINTER_BOUNDS.
4104 (POINTER_BOUNDS_MODE): Remove definition.
4105 (make_pointer_bounds_mode): Remove.
4106 (get_mode_class): Do not handle MODE_POINTER_BOUNDS.
4107 * machmode.h (POINTER_BOUNDS_MODE_P): Remove definition.
4108 (scalare_mode::includes_p): Do not handle MODE_POINTER_BOUNDS.
4109 * mode-classes.def: Do not define MODE_POINTER_BOUNDS.
4110 * stor-layout.c (int_mode_for_mode): Do not handle MODE_POINTER_BOUNDS.
4111 * tree-core.h (enum tree_index): Remove TI_POINTER_BOUNDS_TYPE.
4112 * varasm.c (output_constant_pool_2): Do not handle MODE_POINTER_BOUNDS.
4114 * config/i386/i386-modes.def (BND32, BND64): Remove.
4115 * config/i386/i386.c (dbx_register_map): Remove bound registers.
4116 (dbx64_register_map): Ditto.
4117 (svr4_dbx_register_map): Ditto.
4118 (indirect_thunk_bnd_needed): Remove.
4119 (indirect_thunks_bnd_used): Ditto.
4120 (indirect_return_bnd_needed): Ditto.
4121 (indirect_return_via_cx_bnd): Ditto.
4122 (enum indirect_thunk_prefix): Remove indirect_thunk_prefix_bnd.
4123 (indirect_thunk_name): Remove handling of indirect_thunk_prefix_bnd.
4124 (output_indirect_thunk): Ditto. Remove need_prefix argument.
4125 (output_indirect_thunk_function): Remove handling of
4126 indirect_return_bnd_needed, indirect_return_via_cx_bnd,
4127 indirect_thunk_bnd_needed and indirect_thunks_bnd_used variables.
4128 (ix86_save_reg): Remove handling of crtl->return_bnd.
4129 (ix86_legitimate_constant_p): Remove handling of POINTER_BOUNDS_MODE_P.
4130 (ix86_print_operand_address_as): Remove handling of UNSPEC_BNDMK_ADDR
4131 and UNSPEC_BNDLX_ADDR.
4132 (ix86_output_indirect_branch_via_reg): Remove handling of
4133 indirect_thunk_prefix_bnd.
4134 (ix86_output_indirect_branch_via_push): Ditto.
4135 (ix86_output_function_return): Ditto.
4136 (ix86_output_indirect_function_return): Ditto.
4137 (avoid_func_arg_motion): Do not handle UNSPEC_BNDSTX.
4138 * config/i386/i386.h (FIXED_REGISTERS): Remove bound registers.
4139 (CALL_USED_REGISTERS): Ditto.
4140 (REG_ALLOC_ORDER): Update for removal of bound registers.
4141 (HI_REGISTER_NAMES): Ditto.
4142 * config/i386/i386.md (UNSPEC_BNDMK, UNSPEC_BNDMK_ADDR, UNSPEC_BNDSTX)
4143 (UNSPEC_BNDLDX, UNSPEC_BNDLDX_ADDR, UNSPEC_BNDCL, UNSPEC_BNDCU)
4144 (UNSPEC_BNDCN, UNSPEC_MPX_FENCE): Remove.
4145 (BND0_REG, BND1_REG, BND2_REG, BND3_REG): Remove
4146 (FIRST_PSEUDO_REG): Update.
4147 (BND): Remove mode iterator.
4148 * config/i386/predicates.md (bnd_mem_operator): Remove.
4150 2018-08-24 Richard Sandiford <richard.sandiford@arm.com>
4152 * tree-vect-stmts.c (vectorizable_bswap): Handle variable-length
4155 2018-08-24 Richard Sandiford <richard.sandiford@arm.com>
4157 * tree-vect-slp.c (vect_transform_slp_perm_load): Separate out
4158 the case in which the permute needs only a single element and
4159 repeats for every vector of the result. Extend that case to
4160 handle variable-length vectors.
4161 * tree-vect-stmts.c (vectorizable_load): Update accordingly.
4163 2018-08-24 H.J. Lu <hongjiu.lu@intel.com>
4166 * dwarf2out.c (save_macinfo_strings): Call set_indirect_string
4167 on DW_MACINFO_start_file for -gsplit-dwarf -g3.
4169 2018-08-24 Richard Biener <rguenther@suse.de>
4171 * cfg.h (struct control_flow_graph): Add edge_flags_allocated and
4172 bb_flags_allocated members.
4173 (auto_flag): New RAII class for allocating flags.
4174 (auto_edge_flag): New RAII class for allocating edge flags.
4175 (auto_bb_flag): New RAII class for allocating bb flags.
4176 * cfgloop.c (verify_loop_structure): Allocate temporary edge
4178 * cfganal.c (dfs_enumerate_from): Remove use of visited sbitmap
4179 in favor of temporarily allocated BB flag.
4180 * hsa-brig.c: Re-order includes.
4181 * hsa-dump.c: Likewise.
4182 * hsa-regalloc.c: Likewise.
4183 * print-rtl.c: Likewise.
4184 * profile-count.c: Likewise.
4186 2018-08-24 Segher Boessenkool <segher@kernel.crashing.org>
4189 * config/rs6000/rs6000.c (toc_relative_expr_p): Check that the base is
4192 2018-08-24 Aldy Hernandez <aldyh@redhat.com>
4195 * wide-int-range.cc (wide_int_range_div): Do not ignore result
4196 from wide_int_range_multiplicative_op.
4198 2018-08-23 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
4200 * tree-vect-data-refs.c (vect_grouped_store_supported): Fix typo
4203 2018-08-23 Giuliano Belinassi <giuliano.belinassi@usp.br>
4205 * genmatch.c (parser::parse_operation): Fix typo 'exapnded'
4208 2018-08-23 Alexander Monakov <amonakov@ispras.ru>
4210 * tree-scalar-evolution.c (final_value_replacement_loop): Dump
4211 full GENERIC expression used for replacement.
4213 2018-08-23 Aldy Hernandez <aldyh@redhat.com>
4215 * tree-vrp.c (abs_extent_range): Remove.
4216 (extract_range_into_wide_ints): Pass wide ints by reference.
4217 (extract_range_from_binary_expr_1): Rewrite the *DIV_EXPR code.
4218 Pass wide ints by reference in all calls to
4219 extract_range_into_wide_ints.
4220 * wide-int-range.cc (wide_int_range_div): New.
4221 * wide-int-range.h (wide_int_range_div): New.
4222 (wide_int_range_includes_zero_p): New.
4223 (wide_int_range_zero_p): New.
4225 2018-08-23 Matthew Malcomson <matthew.malcomson@arm.com>
4227 * config/aarch64/aarch64.md (arches): New enum.
4228 (arch): New enum attr.
4229 (arch_enabled): New attr.
4230 (enabled): Now uses arch_enabled only.
4231 (simd, sve, fp16): Removed attribute.
4232 (fp): Attr now defined in terms of 'arch'.
4233 (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64, *movti_aarch64,
4234 *movhf_aarch64, <optab><fcvt_target><GPF:mode>2,
4235 <FCVT_F2FIXED:fcvt_fixed_insn><GPF:mode>3,
4236 <FCVT_FIXED2F:fcvt_fixed_insn><GPI:mode>3): Merge 'fp' and 'simd'
4237 attributes into 'arch'.
4238 (*movsf_aarch64, *movdf_aarch64, *movtf_aarch64, *add<mode>3_aarch64,
4239 subdi3, neg<mode>2, <optab><mode>3, one_cmpl<mode>2,
4240 *<NLOGICAL:optab>_one_cmpl<mode>3, *xor_one_cmpl<mode>3,
4241 *aarch64_ashl_sisd_or_int_<mode>3, *aarch64_lshr_sisd_or_int_<mode>3,
4242 *aarch64_ashr_sisd_or_int_<mode>3, *aarch64_sisd_ushl): Convert use of
4243 'simd' attribute into 'arch'.
4244 (load_pair_sw_<SX:mode><SX2:mode>, load_pair_dw_<DX:mode><DX2:mode>,
4245 store_pair_sw_<SX:mode><SX2:mode>, store_pair_dw_<DX:mode><DX2:mode>):
4246 Convert use of 'fp' attribute to 'arch'.
4247 * config/aarch64/aarch64-simd.md (move_lo_quad_internal_<mode>,
4248 move_lo_quad_internal_<mode>): (different modes) Merge 'fp' and 'simd'
4250 (move_lo_quad_internal_be_<mode>, move_lo_quad_internal_be_<mode>):
4251 (different modes) Merge 'fp' and 'simd' into 'arch'.
4252 (*aarch64_combinez<mode>, *aarch64_combinez_be<mode>): Merge 'fp' and
4255 2018-08-23 Segher Boessenkool <segher@kernel.crashing.org>
4257 PR rtl-optimization/87026
4258 * expmed.c (canonicalize_comparison): If we can no longer create
4259 pseudoregisters, don't.
4261 2018-08-23 Richard Earnshaw <rearnsha@arm.com>
4264 * config/arm/arm-protos.h (arm_emit_speculation_barrier): New
4266 * config/arm/arm.c (speculation_barrier_libfunc): New static
4268 (arm_init_libfuncs): Initialize it.
4269 (arm_emit_speculation_barrier): New function.
4270 * config/arm/arm.md (speculation_barrier): Call
4271 arm_emit_speculation_barrier for architectures that do not have
4273 (speculation_barrier_insn): Only match on Armv7 or later.
4275 2018-08-23 Richard Biener <rguenther@suse.de>
4278 * tree-inline.c (copy_bb): Drop unused __builtin_va_arg_pack_len
4281 2018-08-23 Richard Sandiford <richard.sandiford@arm.com>
4283 * config/aarch64/aarch64.c (aarch64_evpc_sve_tbl): Fix handling
4284 of single-vector TBLs.
4285 (aarch64_vectorize_vec_perm_const): Set one_vector_p when only
4288 2018-08-23 Richard Sandiford <richard.sandiford@arm.com>
4291 * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const_1): Fix
4292 aarch64_evpc_tbl guard.
4294 2018-08-22 Bernd Edlinger <bernd.edlinger@hotmail.de>
4296 * tree-ssa-dse.c (compute_trims): Avoid folding away undefined
4299 2018-08-22 Martin Sebor <msebor@redhat.com>
4302 * tree-pretty-print.c (pretty_print_string): Add argument.
4303 (dump_generic_node): Call to pretty_print_string with string size.
4305 2018-08-22 Segher Boessenkool <segher@kernel.crashing.org>
4307 PR rtl-optimization/86771
4308 * combine.c (try_combine): Do not allow splitting a resulting PARALLEL
4309 of two SETs into those two SETs, one to be placed at i2, if that SETs
4310 destination is modified between i2 and i3.
4312 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
4314 PR tree-optimization/86725
4315 * tree-vect-loop.c (vect_inner_phi_in_double_reduction_p): New
4317 (vect_analyze_scalar_cycles_1): Check it.
4319 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
4321 PR tree-optimization/86725
4322 * tree-vect-loop.c (vect_is_simple_reduction): When treating
4323 an outer loop phi as a double reduction, make sure that the
4324 single user of the phi result is an inner loop phi.
4326 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
4328 * tree-vect-data-refs.c (vect_analyze_group_access_1): Convert
4329 grouped stores with gaps to a strided group.
4331 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
4333 * tree-vect-stmts.c (get_group_load_store_type)
4334 (get_load_store_type): Only test STMT_VINFO_STRIDED_P for the
4335 first statement in a group.
4337 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
4339 * config/darwin.h (LINK_COMMAND_SPEC_A): Sync LTO options with
4340 the sequence used in gcc/gcc.c.
4342 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
4345 * gcc-ar.c (main): Don’t try to invoke the plug-in if we’re not
4348 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
4350 * config/darwin10.h (LINK_GCC_C_SEQUENCE_SPEC): Adjust to use the
4351 Darwin10-specific unwinder-shim.
4352 * config/darwin12.h (LINK_GCC_C_SEQUENCE_SPEC): Remove.
4353 * config/rs6000/darwin.h (DARWIN_CRT1_SPEC, DARWIN_DYLIB1_SPEC):
4354 New to cater for Darwin10 Rosetta.
4356 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
4358 * config/i386/i386.c (ix86_output_addr_diff_elt): Move the MACH-O
4359 specific test before the one for HAVE_AS_GOTOFF_IN_DATA.
4361 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
4366 * gcc/dwarf2out.c (FUNC_SECOND_SECT_LABEL): New.
4367 (dwarf2out_switch_text_section): Generate a local label for the
4368 second function sub-section and apply it as the second FDE start
4370 * gcc/final.c (final_scan_insn_1): Emit second FDE label after the
4371 second sub-section start.
4373 2018-08-22 Richard Biener <rguenther@suse.de>
4375 PR tree-optimization/86988
4376 * tree-vrp.c (vrp_prop::check_mem_ref): Bail out on VLAs.
4378 2018-08-22 Richard Biener <rguenther@suse.de>
4380 PR tree-optimization/86945
4381 * tree-cfg.c (generate_range_test): Use unsigned arithmetic.
4383 2018-08-22 Alexandre Oliva <oliva@adacore.com>
4385 * config/rs6000/rs6000.c (SMALL_DATA_RELOC, SMALL_DATA_REG): Add
4386 a comment about how uses of r2 for .sdata2 come about.
4388 2018-08-22 Alexandre Oliva <aoliva@redhat.com>
4390 * tree-ssa-reassoc.c (is_reassociable_op): Fix cut&pasto.
4392 2018-08-21 Marek Polacek <polacek@redhat.com>
4394 PR c++/86981, Implement -Wpessimizing-move.
4395 * doc/invoke.texi: Document -Wpessimizing-move.
4397 2018-08-21 Jan Hubicka <jh@suse.cz>
4399 * tree.c (find_decls_types_r): Do not check for redundant typedefs.
4400 * tree.h (is_redundant_typedef): Remove.
4401 * dwarf2out.c (is_redundant_typedef): Turn into static function.
4403 2018-08-21 Jan Hubicka <jh@suse.cz>
4405 * tree.c (free_lang_data_in_decl): Remove types from DECL_CONTEXT
4408 2018-08-21 Tamar Christina <tamar.christina@arm.com>
4410 * expmed.c (extract_low_bits): Reject invalid subregs early.
4412 2018-08-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
4415 * tree-ssa-strlen.c (adjust_last_stmt): Avoid folding away undefined
4418 2018-08-21 Rasmus Villemoes <rv@rasmusvillemoes.dk>
4420 * config/vxworks.h: Guard vxworks_asm_out_constructor and
4421 vxworks_asm_out_destructor by !HAVE_INITFINI_ARRAY_SUPPORT
4422 * config/vxworks.c: Likewise.
4424 2018-08-21 Rasmus Villemoes <rv@rasmusvillemoes.dk>
4426 * config/vxworks.c: Set targetm.have_ctors_dtors
4427 if HAVE_INITFINI_ARRAY_SUPPORT.
4428 * config/vxworks.h: Set SUPPORTS_INIT_PRIORITY
4429 if HAVE_INITFINI_ARRAY_SUPPORT.
4431 2018-08-21 Rasmus Villemoes <rv@rasmusvillemoes.dk>
4433 * config/vxworks.h: Add $(WIND_BASE)/target/h/wrn/coreip to
4434 default search path for VxWorks < 7.
4436 2018-08-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
4438 * gimple-ssa-sprintf.c (decl_constant_value): Remove.
4439 (get_format_string): Refer to c_getstr.
4441 2018-08-21 Tom de Vries <tdevries@suse.de>
4443 * cgraph.h (debuginfo_early_init, debuginfo_init, debuginfo_fini)
4444 (debuginfo_start, debuginfo_stop, debuginfo_early_start)
4445 (debuginfo_early_stop): Declare.
4446 * cgraphunit.c (debuginfo_early_init, debuginfo_init, debuginfo_fini)
4447 (debuginfo_start, debuginfo_stop, debuginfo_early_start)
4448 (debuginfo_early_stop): New function.
4449 (symbol_table::finalize_compilation_unit): Call debuginfo_early_start
4450 and debuginfo_early_stop.
4451 * dwarf2out.c (dwarf2out_finish, dwarf2out_early_finish): Dump dwarf.
4452 * toplev.c (compile_file): Call debuginfo_start and debuginfo_stop.
4453 (general_init): Call debuginfo_early_init.
4454 (finalize): Call debuginfo_fini.
4455 (do_compile): Call debuginfo_init.
4456 * doc/invoke.texi (@gccoptlist): Add -fdump-debug and
4458 (@item -fdump-debug, @item -fdump-earlydebug): Add.
4460 2018-08-21 Tom de Vries <tdevries@suse.de>
4462 * dwarf2out.c (print_dw_val, print_loc_descr, print_die): Handle
4463 flag_dump_noaddr and flag_dump_unnumbered.
4465 2018-08-21 Aldy Hernandez <aldyh@redhat.com>
4467 * wide-int-range.cc (wide_int_range_abs): New.
4468 (wide_int_range_order_set): Rename from wide_int_range_min_max.
4469 * wide-int-range.h (wide_int_range_abs): New.
4470 (wide_int_range_min_max): New.
4471 * tree-vrp.c (extract_range_from_unary_expr): Rewrite ABS_EXPR
4472 case to call wide_int_range_abs.
4473 Rewrite MIN/MAX_EXPR to call wide_int_range_min_max.
4474 (extract_range_from_abs_expr): Delete.
4476 2018-08-20 Michael Meissner <meissner@linux.ibm.com>
4479 * config/rs6000/rs6000.md (extendsi<mode>2): Change constraints
4480 from 'Y' to 'YZ' to enable the LWAX instruction to be generated
4483 2018-08-20 Nathan Sidwell <nathan@acm.org>
4484 Jeff Law <law@redhat.com>
4486 * config/s390/s390-c (s390_macro_to_expand): Use cpp_macro_p.
4487 * config/spu/spu-c.c (spu_macro_to_expand): Likewise.
4489 2018-08-20 David Malcolm <dmalcolm@redhat.com>
4492 * attribs.c (diag_attr_exclusions): Add auto_diagnostic_group instance.
4493 (decl_attributes): Likewise.
4494 * calls.c (maybe_warn_nonstring_arg): Add auto_diagnostic_group
4496 * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
4497 * diagnostic-core.h (class auto_diagnostic_group): New class.
4498 * diagnostic.c (diagnostic_initialize): Initialize the new fields.
4499 (diagnostic_report_diagnostic): Handle the first diagnostics within
4501 (emit_diagnostic): Add auto_diagnostic_group instance.
4503 (inform_n): Likewise.
4504 (warning): Likewise.
4505 (warning_at): Likewise.
4506 (warning_n): Likewise.
4507 (pedwarn): Likewise.
4508 (permerror): Likewise.
4510 (error_n): Likewise.
4511 (error_at): Likewise.
4513 (fatal_error): Likewise.
4514 (internal_error): Likewise.
4515 (internal_error_no_backtrace): Likewise.
4516 (auto_diagnostic_group::auto_diagnostic_group): New ctor.
4517 (auto_diagnostic_group::~auto_diagnostic_group): New dtor.
4518 * diagnostic.h (struct diagnostic_context): Add fields
4519 "diagnostic_group_nesting_depth",
4520 "diagnostic_group_emission_count", "begin_group_cb",
4522 * gimple-ssa-isolate-paths.c (find_implicit_erroneous_behavior):
4523 Add auto_diagnostic_group instance(s).
4524 (find_explicit_erroneous_behavior): Likewise.
4525 * gimple-ssa-warn-alloca.c (pass_walloca::execute): Likewise.
4526 * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Likewise.
4527 * gimplify.c (warn_implicit_fallthrough_r): Likewise.
4528 (gimplify_va_arg_expr): Likewise.
4529 * hsa-gen.c (HSA_SORRY_ATV): Likewise.
4530 (HSA_SORRY_AT): Likewise.
4531 * ipa-devirt.c (compare_virtual_tables): Likewise.
4532 (warn_odr): Likewise.
4533 * multiple_target.c (expand_target_clones): Likewise.
4534 * opts-common.c (cmdline_handle_error): Likewise.
4535 * reginfo.c (globalize_reg): Likewise.
4536 * substring-locations.c (format_warning_n_va): Likewise.
4537 * tree-inline.c (expand_call_inline): Likewise.
4538 * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Likewise.
4539 * tree-ssa-loop-niter.c
4540 (do_warn_aggressive_loop_optimizations): Likewise.
4541 * tree-ssa-uninit.c (warn_uninit): Likewise.
4542 * tree.c (warn_deprecated_use): Likewise.
4544 2018-08-20 H.J. Lu <hongjiu.lu@intel.com>
4547 * config/i386/i386.md (eh_return): Always update EH return
4548 address in word_mode.
4550 2018-08-20 Chung-Lin Tang <cltang@codesourcery.com>
4552 * targhooks.c (std_gimplify_va_arg_expr): Properly handle case of when
4553 TARGET_SPLIT_COMPLEX_ARG is defined.
4555 2018-08-20 Bernd Edlinger <bernd.edlinger@hotmail.de>
4557 * expr.c (store_field): Change gcc_assert to gcc_checking_assert.
4559 2018-08-20 Bernd Edlinger <bernd.edlinger@hotmail.de>
4562 * expr.c (expand_assignment): Assert that bitpos is positive.
4563 (store_field): Likewise
4564 (expand_expr_real_1): Make sure that bitpos is positive.
4565 * config/alpha/alpha.h (CONSTANT_ADDRESS_P): Avoid signed
4568 2018-08-20 Nathan Sidwell <nathan@acm.org>
4570 * Makefile.in (CPP_ID_DATA_H): Delete.
4571 (CPP_INTERNAL_H): Don't add it.
4572 (GTFILES): Replace CPP_ID_DATA_H with CPPLIB_H.
4573 * gengtype.c (open_base_files): Replace cpp-id-data.h with cpplib.h
4575 2018-08-20 Richard Biener <rguenther@suse.de>
4577 PR tree-optimization/78655
4578 * tree-vrp.c (extract_range_from_binary_expr_1): Make
4579 pointer + offset nonnull if either operand is nonnull work.
4581 2018-08-20 Tom de Vries <tdevries@suse.de>
4583 * dwarf2out.c (add_scalar_info): Don't add reference to existing die
4584 unless the referenced die describes the added property using
4585 DW_AT_location or DW_AT_const_value. Fall back to exprloc case.
4586 Otherwise, add a DW_AT_location to the referenced die.
4588 2018-08-19 Uros Bizjak <ubizjak@gmail.com>
4591 * config/i386/i386.c (ix86_rtx_costs) [case SET]: Check source for
4592 register_operand when calling ix86_set_reg_reg_cost.
4593 [case CONST_INT, case CONST, case LABEL_REF, case SYMBOL_REF]:
4594 Set *total to 0 for operands that satisfy x86_64_immediate_operand
4595 predicate and to 1 otherwise.
4597 2018-08-18 Iain Sandoe <iain@sandoe.co.uk>
4599 * config/darwin.c (darwin_override_options): If -gsplit-dwarf is set,
4600 emit a diagnostic that it is not supported and reset the option.
4601 * config/darwin.h (DRIVER_SELF_SPECS): Note that gsplit-dwarf is not
4602 supported and consume the option. (ASM_FINAL_SPEC): New.
4604 2018-08-17 Segher Boessenkool <segher@kernel.crashing.org>
4606 * doc/md.texi (Patterns): Use @ref instead of @xref in the middle of
4609 2018-08-17 Sandra Loosemore <sandra@codesourcery.com>
4611 C-SKY port: Documentation
4613 * doc/extend.texi (C-SKY Function Attributes): New section.
4614 * doc/invoke.texi (Option Summary): Add C-SKY options.
4615 (C-SKY Options): New section.
4616 * doc/md.texi (Machine Constraints): Document C-SKY constraints.
4618 2018-08-17 Jojo <jijie_rong@c-sky.com>
4619 Huibin Wang <huibin_wang@c-sky.com>
4620 Sandra Loosemore <sandra@codesourcery.com>
4621 Chung-Lin Tang <cltang@codesourcery.com>
4623 C-SKY port: Backend implementation
4625 * config/csky/*: New.
4626 * common/config/csky/*: New.
4628 2018-08-17 Jojo <jijie_rong@c-sky.com>
4629 Huibin Wang <huibin_wang@c-sky.com>
4630 Sandra Loosemore <sandra@codesourcery.com>
4631 Chung-Lin Tang <cltang@codesourcery.com>
4632 Andrew Jenner <andrew@codesourcery.com>
4634 C-SKY port: Configury
4636 * config.gcc (csky-*-*): New.
4637 * configure.ac: Add csky to targets for dwarf2 debug_line support.
4638 * configure: Regenerated.
4640 2018-08-17 David Malcolm <dmalcolm@redhat.com>
4642 * dump-context.h: Include "dumpfile.h".
4643 (dump_context::dump_printf_va): Convert final param from va_list
4644 to va_list *. Convert from ATTRIBUTE_PRINTF to
4645 ATTRIBUTE_GCC_DUMP_PRINTF.
4646 (dump_context::dump_printf_loc_va): Likewise.
4647 * dumpfile.c: Include "stringpool.h".
4648 (make_item_for_dump_printf_va): Delete.
4649 (make_item_for_dump_printf): Delete.
4650 (class dump_pretty_printer): New class.
4651 (dump_pretty_printer::dump_pretty_printer): New ctor.
4652 (dump_pretty_printer::emit_items): New member function.
4653 (dump_pretty_printer::emit_any_pending_textual_chunks): New member
4655 (dump_pretty_printer::emit_item): New member function.
4656 (dump_pretty_printer::stash_item): New member function.
4657 (dump_pretty_printer::format_decoder_cb): New member function.
4658 (dump_pretty_printer::decode_format): New member function.
4659 (dump_context::dump_printf_va): Reimplement in terms of
4660 dump_pretty_printer.
4661 (dump_context::dump_printf_loc_va): Convert final param from va_list
4663 (dump_context::begin_scope): Reimplement call to
4664 make_item_for_dump_printf.
4665 (dump_printf): Update for change to dump_printf_va.
4666 (dump_printf_loc): Likewise.
4667 (selftest::test_capture_of_dump_calls): Convert "stmt" from
4668 greturn * to gimple *. Add a test_decl. Add tests of dump_printf
4669 with %T, %E, and %G.
4670 * dumpfile.h (ATTRIBUTE_GCC_DUMP_PRINTF): New macro.
4671 (dump_printf): Replace ATTRIBUTE_PRINTF_2 with
4672 ATTRIBUTE_GCC_DUMP_PRINTF (2, 3).
4673 (dump_printf_loc): Replace ATTRIBUTE_PRINTF_3 with
4674 ATTRIBUTE_GCC_DUMP_PRINTF (3, 0).
4675 * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Convert
4676 use of HOST_WIDE_INT_PRINT_DEC on unsigned HOST_WIDE_INT "count"
4677 within a dump_printf_loc call to "%wu".
4678 (vector_alignment_reachable_p): Merge two dump_printf[_loc] calls,
4679 converting a use of HOST_WIDE_INT_PRINT_DEC to "%wd". Add a
4680 missing space after "=".
4681 * tree-vect-loop.c (vect_analyze_loop_2) Within a dump_printf
4682 call, convert use of HOST_WIDE_INT_PRINT_DEC to "%wd".
4683 * tree-vect-slp.c (vect_slp_bb): Within a dump_printf_loc call,
4684 convert use of HOST_WIDE_INT_PRINT_UNSIGNED to "%wu".
4685 * tree-vectorizer.c (try_vectorize_loop_1): Likewise. Remove
4686 duplicate "vectorized" from message.
4688 2018-08-17 Szabolcs Nagy <szabolcs.nagy@arm.com>
4690 * config/arm/arm-builtins.c (arm_init_simd_builtin_types): Clear
4691 polyNxK_t element's TYPE_STRING_FLAG.
4693 2018-08-17 Segher Boessenkool <segher@kernel.crashing.org>
4695 * config/rs6000/rs6000.md (*cbranch, *creturn): Name these patterns
4696 (they were unnamed before). Fix comments.
4698 2018-08-17 Nathan Sidwell <nathan@acm.org>
4700 * cppbuiltin.c: Include "cpplib.h", not "cpp-id-data.h".
4702 2018-08-17 Richard Biener <rguenther@suse.de>
4704 PR tree-optimization/86841
4705 * wide-int-range.cc (wide_int_range_lshift): Use to_uhwi.
4707 2018-08-17 Martin Liska <mliska@suse.cz>
4709 * common.opt: Remove Warn, Init and Report for options with
4710 Ignore/Deprecated flag. Warning is done automatically for
4712 * config/i386/i386.opt: Likewise.
4713 * config/ia64/ia64.opt: Likewise.
4714 * config/rs6000/rs6000.opt: Likewise.
4715 * cppbuiltin.c (define_builtin_macros_for_compilation_flags):
4716 Remove usage of flag_check_pointer_bounds.
4717 * lto-wrapper.c (merge_and_complain): Do not handle
4718 OPT_fcheck_pointer_bounds.
4719 (append_compiler_options): Likewise.
4720 * opt-functions.awk: Do not handle Deprecated.
4721 * optc-gen.awk: Check that Var, Report and Init are not
4722 used for an option with Ignore/Deprecated flag.
4723 * opts-common.c (decode_cmdline_option): Do not report
4725 (read_cmdline_option): Report warning for OPT_SPECIAL_deprecated
4727 * opts.h (struct cl_option): Remove cl_deprecated flag.
4728 (CL_ERR_DEPRECATED): Remove error enum value.
4730 2018-08-17 Richard Biener <rguenther@suse.de>
4733 * tree-inline.c (copy_bb): When inlining __builtin_va_arg_pack_len ()
4734 across a va-arg-pack using call adjust its return value accordingly.
4736 2018-08-16 Martin Sebor <msebor@redhat.com>
4738 PR tree-optimization/86853
4739 * gimple-ssa-sprintf.c (struct format_result): Rename member.
4740 (struct fmtresult): Add member and initialize it in ctors.
4741 (format_character): Handle %C. Extend range to NUL. Set MAYFAIL.
4742 (format_string): Handle %S the same as %ls. Set MAYFAIL.
4743 (format_directive): Set POSUNDER4K when MAYFAIL is set.
4744 (parse_directive): Handle %C same as %c.
4745 (sprintf_dom_walker::compute_format_length): Adjust.
4746 (is_call_safe): Adjust.
4748 2018-08-16 Bernd Edlinger <bernd.edlinger@hotmail.de>
4750 * builtins.c (c_strlen): Add new parameter eltsize. Use it
4751 for determining how to count the elements.
4752 * builtins.h (c_strlen): Adjust prototype.
4753 * expr.c (string_constant): Add new parameter mem_size.
4754 Set *mem_size appropriately.
4755 * expr.h (string_constant): Adjust protoype.
4756 * gimple-fold.c (get_range_strlen): Add new parameter eltsize.
4757 * gimple-fold.h (get_range_strlen): Adjust prototype.
4758 * gimple-ssa-sprintf.c (get_string_length): Add new parameter eltsize.
4759 (format_string): Call get_string_length with eltsize.
4761 2018-08-16 David Malcolm <dmalcolm@redhat.com>
4763 * diagnostic.c (default_diagnostic_start_span_fn): Call pp_string
4764 to emit the span, rather than setting it as the prefix.
4766 2018-08-16 David Malcolm <dmalcolm@redhat.com>
4768 * diagnostic-show-locus.c (layout::start_annotation_line): Add
4769 "margin_char" parameter, defaulting to space. Use it in place
4770 of pp_space for the initial part of the margin.
4771 (layout::print_leading_fixits): Use '+' when filling the margin
4772 of line-insertion fix-it hints.
4774 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
4776 * config/rs6000/rs6000.md (two unnamed define_insn and define_split):
4779 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
4781 * config/rs6000/altivec.md: Don't set length attribute to the default
4783 * config/rs6000/darwin.md: Ditto.
4784 * config/rs6000/dfp.md: Ditto.
4785 * config/rs6000/htm.md: Ditto.
4786 * config/rs6000/rs6000.md: Ditto.
4787 * config/rs6000/sync.md: Ditto.
4788 * config/rs6000/vsx.md: Ditto.
4790 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
4792 * config/rs6000/altivec.md: Don't set length attribute to the default
4793 value, for branch instructions.
4794 * config/rs6000/darwin.md: Ditto.
4795 * config/rs6000/rs6000.md: Ditto.
4797 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
4799 * config/rs6000/rs6000.md (length): Always define as const_int 4.
4800 (unnamed conditional branch define_insn): Set length to 4 or 8
4801 depending on offset.
4802 (<bd>_<mode>): Similar, for alternative 0.
4803 (<bd>tf_<mode>): Ditto.
4805 2018-08-16 Tamar Christina <tamar.christina@arm.com>
4807 * expr.c (copy_blkmode_to_reg): Perform larger copies when safe.
4809 2018-08-16 Matthew Malcomson <matthew.malcomson@arm.com>
4811 * doc/rtl.texi: Replace old RTX class names with new names.
4814 2018-08-16 Vlad Lazar <vlad.lazar@arm.com>
4816 * expmed.h (canonicalize_comparison): New declaration.
4817 * expmed.c (canonicalize_comparison, equivalent_cmp_code): New function.
4818 * expmed.c (emit_store_flag_1): Add call to canonicalize_comparison.
4819 * optabs.c (prepare_cmp_insn): Likewise.
4820 * rtl.h (unsigned_condition_p): New function which checks if a
4821 comparison operator is unsigned.
4823 2018-08-16 Nathan Sidwell <nathan@acm.org>
4825 * config/rs6000/rs6000-c.c (rs6000_macro_to_expend): Use cpp_macro_p.
4826 * config/powerpcspc/powerpcspe-c.c (rs6000_macro_to_expend): Likewise.
4828 2018-08-16 Tamar Christina <tamar.christina@arm.com>
4831 * config/arm/arm.c (arm_can_change_mode_class): Disallow subreg.
4832 * config/arm/neon.md (movv4hf, movv8hf): Refactored to..
4833 (mov<mov>): ..this and enable unconditionally.
4835 2018-08-16 Tamar Christina <tamar.christina@arm.com>
4837 * config/arm/neon.md (*neon_mov<mode>): Remove reg-to-reg alternative.
4839 2018-08-16 Sam Tebbs <sam.tebbs@arm.com>
4841 * config/aarch64/aarch64.opt (mlow-precision-recip-sqrt)
4842 (mlow-precision-sqrt, mlow-precision-div, mverbose-cost-dump): Replace
4843 "Common" with "Target".
4845 2018-08-15 Uros Bizjak <ubizjak@gmail.com>
4847 * config/i386/i386.opt (mmitigate-rop): Mark as deprecated.
4848 * doc/invoke.texi (mmitigate-rop): Remove.
4849 * config/i386/i386.c: Do not include "regrename.h".
4850 (ix86_rop_should_change_byte_p, reg_encoded_number)
4851 (ix86_get_modrm_for_rop, set_rop_modrm_reg_bits, ix86_mitigate_rop):
4853 (ix86_reorg): Remove call to ix86_mitigate_rop.
4854 * config/i386/i386.md (attr "modrm_class"): Remove.
4855 (cmp<mode>_ccno_1, mov<mode>_xor, movstrict<mode>_xor)
4856 (x86_mov<mode>cc_0_m1. x86_mov<mode>cc_0_m1_se)
4857 (x86_mov<mode>cc_0_m1_neg): Remove modrm_class attribute override.
4859 2018-08-15 Will Schmidt <will_schmidt@vnet.ibm.com>
4861 * config/rs6000/rs600.c (rs6000_gimple_fold_builtin): Add entries to
4862 allow folding of mergeh() and mergel() for the float and double types.
4863 (fold_mergehl_helper): Rework to handle building a permute tree
4866 2018-08-15 Uros Bizjak <ubizjak@gmail.com>
4868 * config/i386/i386.c (expand_vec_perm_movs): Enable V4SFmode
4871 2018-08-15 David Malcolm <dmalcolm@redhat.com>
4873 * common.opt (fdiagnostics-show-labels): New option.
4874 * diagnostic-show-locus.c (class layout_range): Add field
4876 (class layout): Add field "m_show_labels_p".
4877 (layout_range::layout_range): Add param "label" and use it to
4879 (make_range): Pass in NULL for new "label" param of layout_range's
4881 (layout::layout): Initialize m_show_labels_p.
4882 (layout::maybe_add_location_range): Pass in loc_range->m_label
4883 when constructing layout_range instances.
4884 (struct line_label): New struct.
4885 (layout::print_any_labels): New member function.
4886 (layout::print_line): Call it if label-printing is enabled.
4887 (selftest::test_one_liner_labels): New test.
4888 (selftest::test_diagnostic_show_locus_one_liner): Call it.
4889 * diagnostic.c (diagnostic_initialize): Initialize
4890 context->show_labels_p.
4891 * diagnostic.h (struct diagnostic_context): Add field
4893 * doc/invoke.texi (Diagnostic Message Formatting Options): Add
4894 -fno-diagnostics-show-labels.
4895 * dwarf2out.c (gen_producer_string): Add
4896 OPT_fdiagnostics_show_labels to the ignored options.
4897 * gcc-rich-location.c (gcc_rich_location::add_expr): Add "label"
4899 (gcc_rich_location::maybe_add_expr): Likewise.
4900 * gcc-rich-location.h (gcc_rich_location::gcc_rich_location): Add
4901 label" param, defaulting to NULL.
4902 (gcc_rich_location::add_expr): Add "label" param.
4903 (gcc_rich_location::maybe_add_expr): Likewise.
4904 (class text_range_label): New class.
4905 (class range_label_for_type_mismatch): New class.
4906 * gimple-ssa-sprintf.c (fmtwarn): Pass NULL for new label params
4907 of format_warning_va.
4908 (fmtwarn_n): Likewise for new params of format_warning_n_va.
4909 * lto-wrapper.c (merge_and_complain): Add
4910 OPT_fdiagnostics_show_labels to the "pick one setting" options.
4911 (append_compiler_options): Likewise to the dropped options.
4912 (append_diag_options): Likewise to the passed-on options.
4913 * opts.c (common_handle_option): Handle the new option.
4914 * selftest-diagnostic.c
4915 (test_diagnostic_context::test_diagnostic_context): Enable
4917 * substring-locations.c: Include "gcc-rich-location.h".
4918 (format_warning_n_va): Add "fmt_label" and "param_label" params
4919 and use them as appropriate.
4920 (format_warning_va): Add "fmt_label" and "param_label" params,
4921 passing them on to format_warning_n_va.
4922 (format_warning_at_substring): Likewise.
4923 (format_warning_at_substring_n): Likewise.
4924 * substring-locations.h (format_warning_va): Add "fmt_label" and
4925 "param_label" params.
4926 (format_warning_n_va): Likewise.
4927 (format_warning_at_substring): Likewise.
4928 (format_warning_at_substring_n): Likewise.
4929 * toplev.c (general_init): Initialize global_dc->show_labels_p.
4931 2018-08-15 Qing Zhao <qing.zhao@oracle.com>
4934 * builtins.c (expand_builtin_memcmp): Do not expand the call
4935 when overflow is detected.
4937 2018-08-15 Martin Sebor <msebor@redhat.com>
4939 PR tree-optimization/71625
4940 * config/aarch64/aarch64-builtins.c
4941 (aarch64_init_simd_builtin_types): Clear Poly8_t's TYPE_STRING_FLAG.
4943 2018-08-15 Ilya Leoshkevich <iii@linux.ibm.com>
4945 * config/s390/s390.c (s390_reorg): Remove loop.
4947 2018-08-15 Iain Sandoe <iain@sandoe.co.uk>
4950 (darwin_function_switched_text_sections): Delete.
4951 * gcc/config/darwin.h
4952 (TARGET_ASM_FUNCTION_SWITCHED_TEXT_SECTIONS): Likewise.
4954 2018-08-15 Iain Sandoe <iain@sandoe.co.uk>
4957 * config/darwin.h: (DEBUG_STR_OFFSETS_SECTION, DEBUG_LOCLISTS_SECTION,
4958 DEBUG_RNGLISTS_SECTION) new macros. (DEBUG_PUBNAMES_SECTION,
4959 DEBUG_PUBTYPES_SECTION) update to include GNU variant.
4961 2018-08-15 Martin Liska <mliska@suse.cz>
4963 PR tree-optimization/86925
4964 * predict.c (expr_expected_value_1): When taking
4965 later predictor, assign also probability.
4966 Use fold_build2_initializer_loc in order to fold
4967 the expression in -frounding-math.
4969 2018-08-14 Allan Sandfeld Jensen <allan.jensen@qt.io>
4971 * config/i386/i386.c (expand_vec_perm_movs): New method matching movs
4973 (expand_vec_perm_1): Try the new method.
4975 2018-08-14 Ilya Leoshkevich <iii@linux.ibm.com>
4978 * lra-lives.c (remove_some_program_points_and_update_live_ranges):
4979 Check whether lra_live_max_point is 0 before dividing.
4981 2018-08-14 Martin Sebor <msebor@redhat.com>
4983 PR tree-optimization/86650
4984 * tree-vrp.c (vrp_prop::check_array_ref): Print an inform message.
4985 (vrp_prop::check_mem_ref): Same.
4987 2018-08-13 Liu Hao <lh_mouse@126.com>
4989 * pretty-print.c (eat_esc_sequence): Swap the foreground and
4990 background colors if the COMMON_LVB_REVERSE_VIDEO flag is set,
4991 and clear it thereafter, as it only works for DBCS.
4993 2018-08-13 Liu Hao <lh_mouse@126.com>
4995 * pretty-print.c (mingw_ansi_fputs): Do not call _close() on the
4996 handle returned by _get_osf_handle().
4998 2018-08-13 Will Schmidt <will_schmidt@vnet.ibm.com>
5000 * gcc/config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add support
5001 for folding vec_perm.
5003 2018-08-13 Will Schmidt <will_schmidt@vnet.ibm.com>
5005 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin):
5006 Add support for gimple-folding of vec_pack() and vec_unpack()
5009 2018-08-13 Will Schmidt <will_schmidt@vnet.ibm.com>
5011 * config/rs6000/rs6000.c (rs6000_builtin_valid_without_lhs): Add
5012 vec_xst variants to the list.
5013 (rs6000_gimple_fold_builtin): Add support for folding unaligned
5014 vector loads and stores.
5016 2018-08-13 David Edelsohn <dje.gcc@gmail.com>
5018 * config.gcc (rs6000-ibm-aix4.x): Delete.
5019 (rs6000-ibm-aix5.1): Delete.
5020 (rs6000-ibm-aix5.2): Delete.
5021 (rs6000-ibm-aix5.3): Delete.
5022 * config/rs6000/aix43.h: Delete.
5023 * config/rs6000/aix51.h: Delete.
5024 * config/rs6000/aix52.h: Delete.
5025 * config/rs6000/t-aix43: Delete.
5027 2018-08-13 Ilya Leoshkevich <iii@linux.ibm.com>
5029 * config/s390/s390.c (s390_decompose_constant_pool_ref):
5031 (s390_decompose_address): Factor out constant pool ref
5034 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
5036 * config/nds32/nds32-predicates.c
5037 (nds32_can_use_bclr_p): Change return type as bool.
5038 (nds32_can_use_bset_p): Ditto.
5039 (nds32_can_use_btgl_p): Ditto.
5040 (nds32_can_use_bitci_p): Ditto.
5041 * config/nds32/nds32-protos.h
5042 (nds32_can_use_bclr_p): Change declaration.
5043 (nds32_can_use_bset_p): Ditto.
5044 (nds32_can_use_btgl_p): Ditto.
5045 (nds32_can_use_bitci_p): Ditto.
5047 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
5049 * config/nds32/nds32.c (nds32_expand_prologue, nds32_expand_epilogue):
5050 Support -msched-prolog-epilog option.
5051 * config/nds32/nds32.opt (msched-prolog-epilog): New option.
5053 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
5055 * common/config/nds32/nds32-common.c
5056 (nds32_option_optimization_table): Enalbe -malways-align.
5058 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
5060 * config.gcc (nds32*): Add nds32_isr.h and nds32_init.inc in
5062 * common/config/nds32/nds32-common.c (nds32_handle_option): Handle
5063 OPT_misr_secure_ case.
5064 * config/nds32/nds32-isr.c: Implementation of backward compatibility.
5065 * config/nds32/nds32-protos.h (nds32_isr_function_critical_p): New.
5066 * config/nds32/nds32.c (nds32_attribute_table): Add critical and
5068 * config/nds32/nds32.h (nds32_isr_nested_type): Add NDS32_CRITICAL.
5069 (nds32_isr_info): New field security_level.
5070 (TARGET_ISR_VECTOR_SIZE_4_BYTE): New macro.
5071 * config/nds32/nds32.md (return_internal): Consider critical attribute.
5072 * config/nds32/nds32.opt (misr-secure): New option.
5073 * config/nds32/nds32_init.inc: New file.
5074 * config/nds32/nds32_isr.h: New file.
5076 2018-08-11 John David Anglin <danglin@gcc.gnu.org>
5078 * config/pa/pa.md (UNSPEC_MEMORY_BARRIER): New unspec enum.
5079 Update comment for atomic instructions.
5080 (atomic_storeqi, atomic_storehi, atomic_storesi, atomic_storesf,
5081 atomic_loaddf, atomic_loaddf_1, atomic_storedf, atomic_storedf_1):
5083 (atomic_loaddi): Revise fence expansion to only emit fence prior to
5084 load for __ATOMIC_SEQ_CST model.
5085 (atomic_loaddi_1): Remove float register target.
5086 (atomic_storedi): Handle CONST_INT values.
5087 (atomic_storedi_1): Remove float register source. Add special case
5089 (memory_barrier): New expander and insn.
5091 2018-08-11 Jakub Jelinek <jakub@redhat.com>
5093 PR tree-optimization/86835
5094 * tree-ssa-math-opts.c (insert_reciprocals): Even when inserting
5095 new_stmt after def_gsi, make sure to insert new_square_stmt after
5096 that stmt, not 2 stmts before it.
5098 2018-08-10 Alexander Monakov <amonakov@ispras.ru>
5101 * config/i386/i386.md (<s>mul<mode>3_highpart): Use DWIH mode iterator
5104 2018-08-10 Martin Liska <mliska@suse.cz>
5107 * builtin-types.def (BT_FN_LONG_LONG_LONG_DOUBLE): Add new
5109 * builtins.c (expand_builtin_expect_with_probability):
5111 (expand_builtin_expect_with_probability): New function.
5112 (build_builtin_expect_predicate): Add new argumnet probability
5113 for BUILT_IN_EXPECT_WITH_PROBABILITY.
5114 (fold_builtin_expect):
5117 * builtins.def (BUILT_IN_EXPECT_WITH_PROBABILITY):
5118 * builtins.h (fold_builtin_expect): Set new argument.
5119 * doc/extend.texi: Document __builtin_expect_with_probability.
5120 * doc/invoke.texi: Likewise.
5121 * gimple-fold.c (gimple_fold_call): Pass new argument.
5122 * ipa-fnsummary.c (find_foldable_builtin_expect): Handle
5123 also BUILT_IN_EXPECT_WITH_PROBABILITY.
5124 * predict.c (get_predictor_value): New function.
5125 (expr_expected_value): Add new argument probability. Assume
5126 that predictor and probability are always non-null.
5127 (expr_expected_value_1): Likewise. For __builtin_expect and
5128 __builtin_expect_with_probability set probability. Handle
5129 combination in binary expressions.
5130 (tree_predict_by_opcode): Simplify code by simply calling
5131 get_predictor_value.
5132 (pass_strip_predict_hints::execute): Add handling of
5133 BUILT_IN_EXPECT_WITH_PROBABILITY.
5134 * predict.def (PRED_BUILTIN_EXPECT_WITH_PROBABILITY): Add
5136 * tree.h (DECL_BUILT_IN_P): New function.
5138 2018-08-10 Martin Liska <mliska@suse.cz>
5140 PR tree-optimization/85799
5141 * passes.def: Add argument for pass_strip_predict_hints.
5142 * predict.c (class pass_strip_predict_hints): Add new argument
5144 (strip_predictor_early): New function.
5145 (pass_strip_predict_hints::execute): Call the function to
5147 (strip_predict_hints): New function.
5148 * predict.def: Fix comment.
5150 2018-08-10 Thomas Preud'homme <thomas.preudhomme@linaro.org>
5152 * Makefile.in: Clarify which tm.texi to copy over to assert the
5153 right to grant a GFDL license for all.
5155 2018-08-09 Jeff Law <law@redhat.com>
5157 * config/m68k/m68k.c (m68k_adjust_decorated_operand): Remove
5160 2018-08-09 Andreas Schwab <schwab@linux-m68k.org>
5162 * config/m68k/m68k-protos.h (m68k_final_prescan_insn): Remove
5165 2018-08-09 Richard Sandiford <richard.sandiford@arm.com>
5167 * tree-vect-loop.c (vectorizable_reduction): Allow inner-loop
5168 reductions for variable-length vectors.
5170 2018-08-09 David Malcolm <dmalcolm@redhat.com>
5173 * common.opt (fdiagnostics-show-line-numbers): New option.
5174 * diagnostic-show-locus.c (class layout): Add fields
5175 "m_show_line_numbers_p" and "m_linenum_width";
5176 (num_digits): New function.
5177 (test_num_digits): New function.
5178 (layout::layout): Initialize new fields. Update m_x_offset
5179 logic to handle any left margin.
5180 (layout::print_source_line): Print line number when requested.
5181 (layout::start_annotation_line): New member function.
5182 (layout::print_annotation_line): Call it.
5183 (layout::print_leading_fixits): Likewise.
5184 (layout::print_trailing_fixits): Likewise. Update calls to
5185 move_to_column for new parameter.
5186 (layout::get_x_bound_for_row): Add "add_left_margin" param and use
5187 it to potentially call start_annotation_line.
5188 (layout::show_ruler): Call start_annotation_line.
5189 (selftest::test_line_numbers_multiline_range): New selftest.
5190 (selftest::diagnostic_show_locus_c_tests): Call test_num_digits
5191 and selftest::test_line_numbers_multiline_range.
5192 * diagnostic.c (diagnostic_initialize): Initialize
5193 show_line_numbers_p.
5194 * diagnostic.h (struct diagnostic_context): Add field
5195 "show_line_numbers_p".
5196 * doc/invoke.texi (Diagnostic Message Formatting Options): Add
5197 -fno-diagnostics-show-line-numbers.
5198 * dwarf2out.c (gen_producer_string): Add
5199 OPT_fdiagnostics_show_line_numbers to the ignored options.
5200 * lto-wrapper.c (merge_and_complain): Likewise to the "pick
5201 one setting" options.
5202 (append_compiler_options): Likewise to the dropped options.
5203 (append_diag_options): Likewise to the passed-on options.
5204 * opts.c (common_handle_option): Handle the new option.
5205 * toplev.c (general_init): Set up global_dc->show_line_numbers_p.
5207 2018-08-09 Kelvin Nilsen <kelvin@gcc.gnu.org>
5209 * doc/extend.texi (PowerPC AltiVec Built-in Functions Available on
5210 ISA 2.07): Correct spelling of bcdsub to be __builtin_bcdsub. Add
5211 third argument of type "const signed char" to descriptions of
5212 __builtin_bcdadd, __builtin_bcdadd_lt, __builtin_bcdadd_eq,
5213 __builtin_bcdadd_gt, __builtin_bcdadd_ov, __builtin_bcdsub,
5214 __builtin_bcdsub_lt, __builtin_bcdsub_eq, __builtin_bcdsub_gt,
5215 __builtin_bcdsub_ov functions.
5217 2018-08-09 Richard Sandiford <richard.sandiford@arm.com>
5219 PR tree-optimization/86858
5220 * tree-vect-loop.c (vect_is_simple_reduction): Restore
5221 flow_bb_inside_loop_p calls.
5223 2018-08-09 Richard Sandiford <richard.sandiford@arm.com>
5225 PR tree-optimization/86871
5226 * tree-vect-stmts.c (vect_transform_stmt): Use gimple_get_lhs
5227 instead of gimple_assign_lhs.
5229 2018-08-09 Richard Earnshaw <rearnsha@arm.com>
5232 * config/aarch64/aarch64.md (add<mode>3_carryinC_zero): Add missing
5233 register constraint to operand 0.
5234 (add<mode>3_carryinC): Likewise.
5235 (add<mode>3_carryinV_zero, add<mode>3_carryinV): Likewise.
5237 2018-08-09 Martin Liska <mliska@suse.cz>
5240 * common.opt: Remove extra line.
5242 2018-08-09 Martin Liska <mliska@suse.cz>
5244 * params.def (PARAM_ALIGN_LOOP_ITERATIONS): Remove double dots
5245 at the end of a line, make first letter capital and end up
5246 a sentence with a dot.
5247 (PARAM_LOOP_INTERCHANGE_STRIDE_RATIO): Likewise.
5248 (PARAM_LOOP_BLOCK_TILE_SIZE): Likewise.
5249 (PARAM_GRAPHITE_MAX_NB_SCOP_PARAMS): Likewise.
5250 (PARAM_GRAPHITE_MAX_ARRAYS_PER_SCOP): Likewise.
5251 (PARAM_MAX_ISL_OPERATIONS): Likewise.
5252 (PARAM_GRAPHITE_ALLOW_CODEGEN_ERRORS): Likewise.
5253 (PARAM_PROFILE_FUNC_INTERNAL_ID): Likewise.
5254 (PARAM_INDIR_CALL_TOPN_PROFILE): Likewise.
5255 (PARAM_SLP_MAX_INSNS_IN_BB): Likewise.
5256 (PARAM_IPA_CP_EVAL_THRESHOLD): Likewise.
5257 (PARAM_IPA_CP_RECURSION_PENALTY): Likewise.
5258 (PARAM_IPA_CP_SINGLE_CALL_PENALTY): Likewise.
5259 (PARAM_IPA_CP_LOOP_HINT_BONUS): Likewise.
5260 (PARAM_IPA_CP_ARRAY_INDEX_HINT_BONUS): Likewise.
5261 (PARAM_TREE_REASSOC_WIDTH): Likewise.
5262 (PARAM_HSA_GEN_DEBUG_STORES): Likewise.
5263 (PARAM_MAX_SPECULATIVE_DEVIRT_MAYDEFS): Likewise.
5264 (PARAM_MAX_VRP_SWITCH_ASSERTIONS): Likewise.
5266 2018-08-09 Andreas Krebbel <krebbel@linux.ibm.com>
5269 * config/s390/s390.c (s390_option_override_internal): Reduce the
5270 stack-clash-protection-probe-interval param if it would be too big
5273 2018-08-08 Andreas Schwab <schwab@linux-m68k.org>
5276 * config/m68k/m68k.h (FINAL_PRESCAN_INSN): Don't define.
5277 * config/m68k/m68k.c (handle_move_double): Don't call
5278 m68k_final_prescan_insn.
5279 (m68k_adjust_decorated_operand): Renamed from
5280 m68k_final_prescan_insn, remove first and third operand and
5282 (print_operand): Call it.
5283 (print_operand_address): Call it.
5285 2018-08-08 Nathan Sidwell <nathan@acm.org>
5287 * diagnostic.c (diagnostic_report_current_module): Use
5288 linemap_included_from & linemap_included_from_linemap.
5290 2018-08-08 Hongbo Zhang <hongbo.zhang@linaro.org>
5292 * config/aarch64/aarch64-cores.def: Add phecda core.
5293 * config/aarch64/aarch64-tune.md: Regenerate.
5294 * doc/invoke.texi: Add phecda core.
5296 2018-08-08 Andreas Krebbel <krebbel@linux.ibm.com>
5299 * config/s390/constraints.md ("NxHD0", "NxSD0"): New constraint
5301 * config/s390/s390.md ("movti"): Add more alternatives for
5302 constant to GPR copies.
5304 2018-08-08 Andreas Krebbel <krebbel@linux.ibm.com>
5306 * config/s390/s390.c: Fix whitespace damage throughout the file.
5307 * config/s390/s390.h: Likewise.
5308 * config/s390/tpf.h: Likewise.
5310 2018-08-08 Ilya Leoshkevich <iii@linux.ibm.com>
5312 * config/s390/s390.c (s390_loadrelative_operand_p):
5313 Remove TARGET_CPU_ZARCH usages.
5314 (s390_rtx_costs): Likewise.
5315 (s390_legitimate_constant_p): Likewise.
5316 (s390_cannot_force_const_mem): Likewise.
5317 (legitimate_reload_constant_p): Likewise.
5318 (s390_preferred_reload_class): Likewise.
5319 (legitimize_pic_address): Likewise.
5320 (legitimize_tls_address): Likewise.
5321 (s390_split_branches): Removed.
5322 (s390_add_execute): Removed.
5323 (s390_dump_pool): Remove TARGET_CPU_ZARCH usages.
5324 (s390_mainpool_start): Likewise.
5325 (s390_mainpool_finish): Likewise.
5326 (s390_mainpool_cancel): Removed.
5327 (s390_chunkify_start): Remove TARGET_CPU_ZARCH usages.
5328 (s390_chunkify_cancel): Likewise.
5329 (s390_return_addr_rtx): Likewise.
5330 (s390_register_info): Remove split_branches_pending_p uages.
5331 (s390_optimize_register_info): Likewise.
5332 (s390_init_frame_layout): Remove TARGET_CPU_ZARCH and
5333 split_branches_pending_p usages.
5334 (s390_can_eliminate): Remove TARGET_CPU_ZARCH usages.
5335 (s390_load_got): Likewise.
5336 (s390_expand_split_stack_prologue): Likewise.
5337 (output_asm_nops): Likewise.
5338 (s390_function_profiler): Likewise.
5339 (s390_emit_call): Likewise.
5340 (s390_conditional_register_usage): Likewise.
5341 (s390_optimize_prologue): Likewise.
5342 (s390_reorg): Remove TARGET_CPU_ZARCH and
5343 split_branches_pending_p usages.
5344 (s390_option_override_internal): Remove TARGET_CPU_ZARCH
5346 (s390_output_indirect_thunk_function): Likewise.
5347 * config/s390/s390.h (TARGET_CPU_ZARCH): Removed.
5348 (TARGET_CPU_ZARCH_P): Removed.
5349 (struct machine_function): Remove split_branches_pending_p.
5350 * config/s390/s390.md: Remove TARGET_CPU_ZARCH usages.
5352 2018-08-08 Ilya Leoshkevich <iii@linux.ibm.com>
5354 * common/config/s390/s390-common.c (processor_flags_table):
5356 * config.gcc: Remove with_arch/with_tune support.
5357 * config/s390/2064.md: Remove cpu attribute comparisons.
5358 * config/s390/driver-native.c (s390_host_detect_local_cpu):
5360 * config/s390/linux.h (ASM_SPEC):
5361 Remove -march support.
5362 * config/s390/s390-c.c (s390_cpu_cpp_builtins_internal):
5363 Use a table to get an arch level.
5364 * config/s390/s390-opts.h (enum processor_type):
5366 * config/s390/s390.c
5367 (processor_table): Remove entries, add arch_level values.
5368 (s390_issue_rate): Remove cases.
5369 (s390_option_override): Adjust
5370 s390_option_override_internal() call.
5371 (s390_option_override_internal): Remove deprecation warning.
5372 (s390_valid_target_attribute_tree): Adjust
5373 s390_option_override_internal() call.
5374 * config/s390/s390.h (struct s390_processor):
5375 Share with s390-c.c, add arch_level field.
5376 * config/s390/s390.md:
5377 Remove occurrences in cpu attribute.
5378 * config/s390/s390.opt: Remove -march/-mtune support.
5379 * config/s390/tpf.h (ASM_SPEC): Remove -march support.
5380 * doc/invoke.texi: Remove deprecation warning.
5382 2018-08-08 Luis Machado <luis.machado@linaro.org>
5384 * config/aarch64/aarch64.c (qdf24xx_vector_cost): New static
5386 (qdf24xx_tunings): Set vector cost structure to
5387 qdf24xx_vector_cost.
5389 * config/aarch64/aarch64.c (qdf24xx_addrcost_table)
5390 <register_sextend>: Set to 3.
5392 2018-08-07 Richard Sandiford <richard.sandiford@arm.com>
5395 * config/aarch64/iterators.md (FRECP, frecp_suffix): Delete.
5396 * config/aarch64/aarch64-simd.md
5397 (aarch64_frecp<FRECP:frecp_suffix><mode>): Fold FRECPE into...
5398 (@aarch64_frecpe<mode>): ...here and the move FRECPX to...
5399 (aarch64_frecpx<mode>): ...this new pattern.
5400 * config/aarch64/aarch64-simd-builtins.def: Remove comment
5401 about aarch64_frecp<FRECP:frecp_suffix><mode>.
5403 2018-08-07 Martin Liska <mliska@suse.cz>
5406 * predict.c (expr_expected_value_1): Handle DECL_IS_MALLOC,
5407 BUILT_IN_REALLOC and DECL_IS_OPERATOR_NEW.
5408 * predict.def (PRED_MALLOC_NONNULL): New predictor.
5409 * doc/extend.texi: Document that malloc attribute adds
5412 2018-08-06 John David Anglin <danglin@gcc.gnu.org>
5415 * config/pa/pa.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
5416 Define to speculation_safe_value_not_needed.
5418 2018-08-06 Jeff Law <law@redhat.com>
5420 * tree-ssa-dom.c (dom_opt_dom_walker::optimize_stmt): Pass down
5421 the vr_values instance to cprop_into_stmt.
5422 (cprop_into_stmt): Pass vr_values instance down to cprop_operand.
5423 (cprop_operand): Also query EVRP to determine if OP is a constant.
5425 2018-08-06 Nathan Sidwell <nathan@acm.org>
5427 * diagnostic.c (diagnostic_report_current_module): Reroll
5428 included-at loop. Translate text.
5430 2018-08-06 David Malcolm <dmalcolm@redhat.com>
5432 * function-tests.c (selftest::test_expansion_to_rtl): Call
5433 free_after_compilation.
5435 2018-08-06 Alan Hayward <alan.hayward@arm.com>
5437 * config/aarch64/aarch64.md: Add clobber highs to tls_desc.
5439 2018-08-06 Andreas Krebbel <krebbel@linux.ibm.com>
5441 * config/s390/s390.c (s390_loop_unroll_adjust): Prevent small
5442 loops with memory block operations from getting unrolled.
5444 2018-08-06 Ulrich Weigand <uweigand@de.ibm.com>
5447 * config/spu/spu.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
5448 Define to speculation_safe_value_not_needed.
5450 2018-08-06 Jeff Law <law@redhat.com>
5452 * reload1.c (forget_old_reloads_1): Adjust CLOBBER_HIGH
5455 2018-08-06 Jozef Lawrynowicz <jozef.l@mittosystems.com>
5458 * gcc/tree.c (build_common_tree_nodes): Initialize integer_types array
5459 with all enabled __intN types.
5461 * gcc/testsuite/gcc.target/msp430/pr86662.c: New test.
5463 2018-08-06 Alan Hayward <alan.hayward@arm.com>
5465 * alias.c (record_set): Check for clobber high.
5466 * cfgexpand.c (expand_gimple_stmt): Likewise.
5467 * combine-stack-adj.c (single_set_for_csa): Likewise.
5468 * combine.c (find_single_use_1): Likewise.
5469 (set_nonzero_bits_and_sign_copies): Likewise.
5470 (get_combine_src_dest): Likewise.
5471 (is_parallel_of_n_reg_sets): Likewise.
5472 (try_combine): Likewise.
5473 (record_dead_and_set_regs_1): Likewise.
5474 (reg_dead_at_p_1): Likewise.
5475 (reg_dead_at_p): Likewise.
5476 * dce.c (deletable_insn_p): Likewise.
5477 (mark_nonreg_stores_1): Likewise.
5478 (mark_nonreg_stores_2): Likewise.
5479 * df-scan.c (df_find_hard_reg_defs): Likewise.
5480 (df_uses_record): Likewise.
5481 (df_get_call_refs): Likewise.
5482 * dwarf2out.c (mem_loc_descriptor): Likewise.
5483 * haifa-sched.c (haifa_classify_rtx): Likewise.
5484 * ira-build.c (create_insn_allocnos): Likewise.
5485 * ira-costs.c (scan_one_insn): Likewise.
5486 * ira.c (equiv_init_movable_p): Likewise.
5487 (rtx_moveable_p): Likewise.
5488 (interesting_dest_for_shprep): Likewise.
5489 * jump.c (mark_jump_label_1): Likewise.
5490 * postreload-gcse.c (record_opr_changes): Likewise.
5491 * postreload.c (reload_cse_simplify): Likewise.
5492 (struct reg_use): Add source expr.
5493 (reload_combine): Check for clobber high.
5494 (reload_combine_note_use): Likewise.
5495 (reload_cse_move2add): Likewise.
5496 (move2add_note_store): Likewise.
5497 * print-rtl.c (print_pattern): Likewise.
5498 * recog.c (decode_asm_operands): Likewise.
5499 (store_data_bypass_p): Likewise.
5500 (if_test_bypass_p): Likewise.
5501 * regcprop.c (kill_clobbered_value): Likewise.
5502 (kill_set_value): Likewise.
5503 * reginfo.c (reg_scan_mark_refs): Likewise.
5504 * reload1.c (maybe_fix_stack_asms): Likewise.
5505 (eliminate_regs_1): Likewise.
5506 (elimination_effects): Likewise.
5507 (mark_not_eliminable): Likewise.
5508 (scan_paradoxical_subregs): Likewise.
5509 (forget_old_reloads_1): Likewise.
5510 * reorg.c (find_end_label): Likewise.
5511 (try_merge_delay_insns): Likewise.
5512 (redundant_insn): Likewise.
5513 (own_thread_p): Likewise.
5514 (fill_simple_delay_slots): Likewise.
5515 (fill_slots_from_thread): Likewise.
5516 (dbr_schedule): Likewise.
5517 * resource.c (update_live_status): Likewise.
5518 (mark_referenced_resources): Likewise.
5519 (mark_set_resources): Likewise.
5520 * rtl.c (copy_rtx): Likewise.
5521 * rtlanal.c (reg_referenced_p): Likewise.
5522 (single_set_2): Likewise.
5523 (noop_move_p): Likewise.
5524 (note_stores): Likewise.
5525 * sched-deps.c (sched_analyze_reg): Likewise.
5526 (sched_analyze_insn): Likewise.
5528 2018-08-06 Alan Hayward <alan.hayward@arm.com>
5530 * cse.c (invalidate_reg): New function extracted from...
5531 (invalidate): ...here.
5532 (canonicalize_insn): Check for clobber high.
5533 (invalidate_from_clobbers): invalidate clobber highs.
5534 (invalidate_from_sets_and_clobbers): Likewise.
5535 (count_reg_usage): Check for clobber high.
5536 (insn_live_p): Likewise.
5537 * cselib.c (cselib_expand_value_rtx_1):Likewise.
5538 (cselib_invalidate_regno): Check for clobber in setter.
5539 (cselib_invalidate_rtx): Pass through setter.
5540 (cselib_invalidate_rtx_note_stores):
5541 (cselib_process_insn): Check for clobber high.
5542 * cselib.h (cselib_invalidate_rtx): Add operand.
5544 2018-08-06 Alan Hayward <alan.hayward@arm.com>
5546 * lra-eliminations.c (lra_eliminate_regs_1): Check for clobber high.
5547 (mark_not_eliminable): Likewise.
5548 * lra-int.h (struct lra_insn_reg): Add clobber high marker.
5549 * lra-lives.c (process_bb_lives): Check for clobber high.
5550 * lra.c (new_insn_reg): Remember clobber highs.
5551 (collect_non_operand_hard_regs): Check for clobber high.
5552 (lra_set_insn_recog_data): Likewise.
5553 (add_regs_to_insn_regno_info): Likewise.
5554 (lra_update_insn_regno_info): Likewise.
5556 2018-08-06 Alan Hayward <alan.hayward@arm.com>
5558 * rtl.h (reg_is_clobbered_by_clobber_high): Add declarations.
5559 * rtlanal.c (reg_is_clobbered_by_clobber_high): Add function.
5561 2018-08-06 Alan Hayward <alan.hayward@arm.com>
5563 * emit-rtl.c (verify_rtx_sharing): Check for CLOBBER_HIGH.
5564 (copy_insn_1): Likewise.
5565 (gen_hard_reg_clobber_high): New gen function.
5566 * genconfig.c (walk_insn_part): Check for CLOBBER_HIGH.
5567 * genemit.c (gen_exp): Likewise.
5568 (gen_emit_seq): Pass through info.
5569 (gen_insn): Check for CLOBBER_HIGH.
5570 (gen_expand): Pass through info.
5571 (gen_split): Likewise.
5572 (output_add_clobbers): Likewise.
5573 * genrecog.c (validate_pattern): Check for CLOBBER_HIGH.
5574 (remove_clobbers): Likewise.
5575 * rtl.h (gen_hard_reg_clobber_high): New declaration.
5577 2018-08-06 Alan Hayward <alan.hayward@arm.com>
5579 * doc/rtl.texi (clobber_high): Add.
5580 (parallel): Add in clobber high
5581 * rtl.c (rtl_check_failed_code3): Add function.
5582 * rtl.def (CLOBBER_HIGH): Add expression.
5583 * rtl.h (RTL_CHECKC3): Add macro.
5584 (rtl_check_failed_code3): Add declaration.
5585 (XC3EXP): Add macro.
5587 2018-08-05 H.J. Lu <hongjiu.lu@intel.com>
5590 * config/i386/i386.c (ix86_finalize_stack_frame_flags): Set
5591 cfun->machine->max_used_stack_alignment if needed.
5593 2018-08-04 Martin Sebor <msebor@redhat.com>
5595 PR tree-optimization/86571
5596 * gimple-ssa-sprintf.c (format_floating): Extend upper bound of
5599 2018-08-03 Sandra Loosemore <sandra@codesourcery.com>
5602 * config/nios2/nios2.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
5605 2018-08-03 Jeff Law <law@redhat.com>
5608 * config/mn10300/mn10300.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
5609 Define to speculation_safe_value_not_needed.
5611 2018-08-03 David Malcolm <dmalcolm@redhat.com>
5613 * doc/gcov.texi (-x): Remove duplicate "to".
5614 * doc/invoke.texi (-Wnoexcept-type): Remove duplicate "calls".
5615 (-Wif-not-aligned): Remove duplicate "is".
5616 (-flto): Remove duplicate "the".
5617 (MicroBlaze Options): In examples of "-mcpu=cpu-type", remove
5618 duplicate "v5.00.b".
5619 (MSP430 Options): Remove duplicate "and" from the description
5620 of "-mgprel-sec=regexp".
5621 (x86 Options): Remove duplicate copies of "vmldLog102" and
5622 vmlsLog104 from description of "-mveclibabi=type".
5624 2018-08-03 Richard Sandiford <richard.sandiford@arm.com>
5626 * internal-fn.h (first_commutative_argument): Declare.
5627 * internal-fn.c (first_commutative_argument): New function.
5628 * tree-vect-slp.c (vect_get_and_check_slp_defs): Remove extra
5629 restrictions for pattern statements. Use first_commutative_argument
5630 to look for commutative operands in calls to internal functions.
5632 2018-08-03 Aldy Hernandez <aldyh@redhat.com>
5634 * Makefile.in (wide-int-range.o): New.
5635 * tree-vrp.c: Move all the wide_int_* functions to...
5636 * wide-int-range.cc: ...here.
5637 * tree-vrp.h: Move all the wide_int_* prototypes to...
5638 * wide-int-range.h: ...here.
5640 2018-08-03 Tom de Vries <tdevries@suse.de>
5642 * common/config/nvptx/nvptx-common.c (nvptx_except_unwind_info): Return
5644 * config/nvptx/nvptx.c (TARGET_ASM_BYTE_OP): Remove define.
5645 * except.c (output_function_exception_table): Do early exit if
5646 targetm_common.except_unwind_info (&global_options) == UI_NONE.
5648 2018-08-03 Martin Liska <mliska@suse.cz>
5650 * predict.c (dump_prediction): Change to 2 digits
5653 2018-08-03 Siddhesh Poyarekar <siddhesh@sourceware.org>
5655 * config/aarch64/falkor.md (falkor_am_1_vxvy_vxvy): Move
5657 (falkor_am_1_gtov_gtov): ... a new insn reservation.
5659 2018-07-19 Ilya Leoshkevich <iii@linux.ibm.com>
5661 * config/nds32/nds32.c (nds32_hard_regno_mode_ok): Replace > with >=.
5662 * df-problems.c (df_remove_dead_eq_notes): Replace > with >=.
5663 * dwarf2out.c (mem_loc_descriptor): Replace > with >=.
5664 * lra-constraints.c (spill_hard_reg_in_range): Replace <= with <.
5665 * lra-remat.c (call_used_input_regno_present_p): Replace <= with <.
5667 2018-08-02 David Malcolm <dmalcolm@redhat.com>
5669 * diagnostic-show-locus.c (diagnostic_show_locus): Use
5670 pp_take_prefix when saving the existing prefix.
5671 * diagnostic.c (diagnostic_append_note): Likewise.
5672 * langhooks.c (lhd_print_error_function): Likewise.
5673 * pretty-print.c (pp_set_prefix): Drop the "const" from "prefix"
5674 param's type. Free the existing prefix.
5675 (pp_take_prefix): New function.
5676 (pretty_printer::pretty_printer): Drop the prefix parameter.
5677 Rename the length parameter to match the comment.
5678 (pretty_printer::~pretty_printer): Free the prefix.
5679 * pretty-print.h (pretty_printer::pretty_printer): Drop the prefix
5681 (struct pretty_printer): Drop the "const" from "prefix" field's
5682 type and clarify memory management.
5683 (pp_set_prefix): Drop the "const" from the 2nd param.
5684 (pp_take_prefix): New decl.
5686 2018-08-02 Aaron Sawdey <acsawdey@linux.ibm.com>
5688 * config/rs6000/rs6000-string.c (select_block_compare_mode): Move test
5689 for word_mode_ok here instead of passing as argument.
5690 (expand_block_compare): Change select_block_compare_mode() call.
5691 (expand_strncmp_gpr_sequence): New function.
5692 (expand_strn_compare): Make use of expand_strncmp_gpr_sequence.
5694 2018-08-02 Jeff Law <law@redhat.com>
5697 * config/m68k/m68k.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
5698 Define to speculation_safe_value_not_needed.
5701 * config/h8300/h8300.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
5702 Define to speculation_safe_value_not_needed.
5704 2018-08-02 Tom de Vries <tdevries@suse.de>
5707 * common/config/nvptx/nvptx-common.c (nvptx_except_unwind_info): New
5708 function. Return UI_TARGET unconditionally.
5709 (TARGET_EXCEPT_UNWIND_INFO): Redefine to nvptx_except_unwind_info.
5710 * config/nvptx/nvptx.c (TARGET_ASM_BYTE_OP): Emit commented out '.byte'.
5712 2018-08-02 Richard Sandiford <richard.sandiford@arm.com>
5714 * genemit.c (print_overload_test): Fix typo.
5716 2018-08-02 Richard Biener <rguenther@suse.de>
5718 PR tree-optimization/86816
5719 * tree-ssa-tail-merge.c (tail_merge_valueize): New function
5720 which checks for value availability before querying it.
5721 (gvn_uses_equal): Use it.
5722 (same_succ_hash): Likewise.
5723 (gimple_equal_p): Likewise.
5725 2018-08-02 Nick Clifton <nickc@redhat.com>
5728 * config/stormy16/stormy16.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
5729 Define to speculation_safe_value_not_needed.
5732 * config/v850/v850.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
5733 Define to speculation_safe_value_not_needed.
5736 * config/v850/v850.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
5737 Define to speculation_safe_value_not_needed.
5740 * config/rx/rx.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
5741 Define to speculation_safe_value_not_needed.
5744 * config/msp430/msp430.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
5745 Define to speculation_safe_value_not_needed.
5748 * config/mcore/mcore.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
5749 Define to speculation_safe_value_not_needed.
5752 * config/m32r/m32r.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
5753 Define to speculation_safe_value_not_needed.
5756 * config/iq2000/iq2000.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
5757 Define to speculation_safe_value_not_needed.
5760 * config/frv/frv.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define to
5761 speculation_safe_value_not_needed.
5764 * config/fr30/fr30.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define
5765 to speculation_safe_value_not_needed.
5767 2018-08-02 Richard Sandiford <richard.sandiford@arm.com>
5769 * doc/md.texi: Expand the documentation of instruction names
5770 to mention port-local uses. Document '@' in pattern names.
5771 * read-md.h (overloaded_instance, overloaded_name): New structs.
5773 (md_reader::handle_overloaded_name): New member function.
5774 (md_reader::get_overloads): Likewise.
5775 (md_reader::m_first_overload): New member variable.
5776 (md_reader::m_next_overload_ptr): Likewise.
5777 (md_reader::m_overloads_htab): Likewise.
5778 * read-md.c (md_reader::md_reader): Initialize m_first_overload,
5779 m_next_overload_ptr and m_overloads_htab.
5780 * read-rtl.c (iterator_group): Add "type" and "get_c_token" fields.
5781 (get_mode_token, get_code_token, get_int_token): New functions.
5782 (map_attr_string): Add an optional argument that passes back
5783 the associated iterator.
5784 (overloaded_name_hash, overloaded_name_eq_p, named_rtx_p):
5785 (md_reader::handle_overloaded_name, add_overload_instance): New
5787 (apply_iterators): Handle '@' names. Report an error if '@'
5788 is used without iterators.
5789 (initialize_iterators): Initialize the new iterator_group fields.
5790 * genopinit.c (handle_overloaded_code_for)
5791 (handle_overloaded_gen): New functions.
5792 (main): Use them to print declarations of maybe_code_for_* and
5793 maybe_gen_* functions, and inline definitions of code_for_* and gen_*.
5794 * genemit.c (print_overload_arguments, print_overload_test)
5795 (handle_overloaded_code_for, handle_overloaded_gen): New functions.
5796 (main): Use it to print definitions of maybe_code_for_* and
5797 maybe_gen_* functions.
5798 * config/aarch64/aarch64.c (aarch64_split_128bit_move): Use
5799 gen_aarch64_mov{low,high}_di and gen_aarch64_movdi_{low,high}
5800 instead of explicit mode checks.
5801 (aarch64_split_simd_combine): Likewise gen_aarch64_simd_combine.
5802 (aarch64_split_simd_move): Likewise gen_aarch64_split_simd_mov.
5803 (aarch64_emit_load_exclusive): Likewise gen_aarch64_load_exclusive.
5804 (aarch64_emit_store_exclusive): Likewise gen_aarch64_store_exclusive.
5805 (aarch64_expand_compare_and_swap): Likewise
5806 gen_aarch64_compare_and_swap and gen_aarch64_compare_and_swap_lse
5807 (aarch64_gen_atomic_cas): Likewise gen_aarch64_atomic_cas.
5808 (aarch64_emit_atomic_swap): Likewise gen_aarch64_atomic_swp.
5809 (aarch64_constant_pool_reload_icode): Delete.
5810 (aarch64_secondary_reload): Use code_for_aarch64_reload_movcp
5811 instead of aarch64_constant_pool_reload_icode. Use
5812 code_for_aarch64_reload_mov instead of explicit mode checks.
5813 (rsqrte_type, get_rsqrte_type, rsqrts_type, get_rsqrts_type): Delete.
5814 (aarch64_emit_approx_sqrt): Use gen_aarch64_rsqrte instead of
5815 get_rsqrte_type and gen_aarch64_rsqrts instead of gen_rqrts_type.
5816 (recpe_type, get_recpe_type, recps_type, get_recps_type): Delete.
5817 (aarch64_emit_approx_div): Use gen_aarch64_frecpe instead of
5818 get_recpe_type and gen_aarch64_frecps instead of get_recps_type.
5819 (aarch64_atomic_load_op_code): Delete.
5820 (aarch64_emit_atomic_load_op): Likewise.
5821 (aarch64_gen_atomic_ldop): Use UNSPECV_ATOMIC_* instead of
5822 aarch64_atomic_load_op_code. Use gen_aarch64_atomic_load
5823 instead of aarch64_emit_atomic_load_op.
5824 * config/aarch64/aarch64.md (aarch64_reload_movcp<GPF_TF:mode><P:mode>)
5825 (aarch64_reload_movcp<VALL:mode><P:mode>, aarch64_reload_mov<mode>)
5826 (aarch64_movdi_<mode>low, aarch64_movdi_<mode>high)
5827 (aarch64_mov<mode>high_di, aarch64_mov<mode>low_di): Add a '@'
5828 character before the pattern name.
5829 * config/aarch64/aarch64-simd.md (aarch64_split_simd_mov<mode>)
5830 (aarch64_rsqrte<mode>, aarch64_rsqrts<mode>)
5831 (aarch64_simd_combine<mode>, aarch64_frecpe<mode>)
5832 (aarch64_frecps<mode>): Likewise.
5833 * config/aarch64/atomics.md (atomic_compare_and_swap<mode>)
5834 (aarch64_compare_and_swap<mode>, aarch64_compare_and_swap<mode>_lse)
5835 (aarch64_load_exclusive<mode>, aarch64_store_exclusive<mode>)
5836 (aarch64_atomic_swp<mode>, aarch64_atomic_cas<mode>)
5837 (aarch64_atomic_load<atomic_ldop><mode>): Likewise.
5839 2018-08-02 Richard Sandiford <richard.sandiford@arm.com>
5841 * config/aarch64/aarch64.c (aarch64_float_const_representable_p):
5842 Allow HFmode constants if TARGET_FP_F16INST.
5844 2018-08-02 Jackson Woodruff <jackson.woodruff@arm.com>
5847 * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp):
5848 No longer check last store for clobber of address register.
5850 2018-08-02 Martin Liska <mliska@suse.cz>
5852 PR gcov-profile/86817
5853 * gcov.c (process_all_functions): New function.
5855 (process_file): Move functions processing to
5856 process_all_functions.
5858 2018-08-02 David Malcolm <dmalcolm@redhat.com>
5860 * dumpfile.c (dump_user_location_t::dump_user_location_t): Add
5861 "const" to the "gimple *" and "rtx_insn *" parameters.
5862 * dumpfile.h (dump_user_location_t::dump_user_location_t):
5864 (dump_location_t::dump_location_t): Likewise.
5866 2018-08-01 Martin Sebor <msebor@redhat.com>
5868 PR tree-optimization/86650
5869 * gimple-pretty-print.c (percent_G_format): Accept a "gimple *"
5870 rather than a "gcall *". Directly pass the data of interest
5871 to percent_K_format, rather than building a temporary CALL_EXPR
5873 * gimple-fold.c (gimple_fold_builtin_strncpy): Adjust.
5874 (gimple_fold_builtin_strncat): Adjust.
5875 * gimple-ssa-warn-restrict.h (check_bounds_or_overlap): Replace
5876 gcall* argument with gimple*.
5877 * gimple-ssa-warn-restrict.c (check_call): Same.
5878 (wrestrict_dom_walker::before_dom_children): Same.
5879 (builtin_access::builtin_access): Same.
5880 (check_bounds_or_overlap): Same
5881 (maybe_diag_overlap): Same.
5882 (maybe_diag_offset_bounds): Same.
5883 * tree-diagnostic.c (default_tree_printer): Move usage of
5884 EXPR_LOCATION (t) and TREE_BLOCK (t) from within percent_K_format
5886 * tree-pretty-print.c (percent_K_format): Add argument.
5887 * tree-pretty-print.h: Add argument.
5888 * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Adjust.
5889 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Adjust.
5890 (maybe_diag_stxncpy_trunc): Same.
5891 (handle_builtin_stxncpy): Same.
5892 (handle_builtin_strcat): Same.
5894 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
5896 * match.pd: Optimise pointer range checks.
5898 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
5900 PR tree-optimization/86758
5901 * tree-vect-stmts.c (vectorizable_simd_clone_call): Don't try
5902 to remove pattern statements.
5904 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
5906 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Use the
5907 result of dfs_enumerate_from when constructing stmt_vec_infos,
5908 instead of additionally calling get_loop_body.
5910 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
5912 * tree-vectorizer.h (vect_create_data_ref_ptr): Remove inv_p
5914 * tree-vect-data-refs.c (vect_create_data_ref_ptr): Likewise.
5915 When creating an iv, assert that the step is not known to be zero.
5916 (vect_setup_realignment): Update call accordingly.
5917 * tree-vect-stmts.c (vectorizable_store): Likewise.
5918 (vectorizable_load): Likewise. Handle VMAT_INVARIANT separately.
5920 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
5922 * tree-vectorizer.h (vect_stmt_to_vectorize): New function.
5923 * tree-vect-loop.c (vect_update_vf_for_slp): Use it.
5924 (vectorizable_reduction): Likewise.
5925 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
5926 (vect_detect_hybrid_slp_stmts): Likewise.
5927 * tree-vect-stmts.c (vect_is_simple_use): Likewise.
5929 2018-08-01 Aldy Hernandez <aldyh@redhat.com>
5931 * tree-vrp (zero_nonzero_bits_from_bounds): Rename to...
5932 (wide_int_set_zero_nonzero_bits): ...this.
5933 (zero_nonzero_bits_from_vr): Rename to...
5934 (vrp_set_zero_nonzero_bits): ...this.
5935 (extract_range_from_multiplicative_op_1): Abstract wide int
5937 (wide_int_range_multiplicative_op): ...here.
5938 (extract_range_from_binary_expr_1): Extract wide int binary
5939 operations into their own functions.
5940 (wide_int_range_lshift): New.
5941 (wide_int_range_can_optimize_bit_op): New.
5942 (wide_int_range_shift_undefined_p): New.
5943 (wide_int_range_bit_xor): New.
5944 (wide_int_range_bit_ior): New.
5945 (wide_int_range_bit_and): New.
5946 (wide_int_range_trunc_mod): New.
5947 (extract_range_into_wide_ints): New.
5948 (vrp_shift_undefined_p): New.
5949 (extract_range_from_multiplicative_op): New.
5950 (vrp_can_optimize_bit_op): New.
5951 * tree-vrp.h (value_range::dump): New.
5952 (wide_int_range_multiplicative_op): New.
5953 (wide_int_range_lshift):New.
5954 (wide_int_range_shift_undefined_p): New.
5955 (wide_int_range_bit_xor): New.
5956 (wide_int_range_bit_ior): New.
5957 (wide_int_range_bit_and): New.
5958 (wide_int_range_trunc_mod): New.
5959 (zero_nonzero_bits_from_bounds): Rename to...
5960 (wide_int_set_zero_nonzero_bits): ...this.
5961 (zero_nonzero_bits_from_vr): Rename to...
5962 (vrp_set_zero_nonzero_bits): ...this.
5963 (range_easy_mask_min_max): Rename to...
5964 (wide_int_range_can_optimize_bit_op): this.
5965 * vr-values.c (simplify_bit_ops_using_ranges): Rename
5966 zero_nonzero_bits_from_vr into vrp_set_zero_nonzero_bits.
5968 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
5970 * tree-vectorizer.h (vect_orig_stmt): New function.
5971 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Use it.
5972 * tree-vect-loop.c (vect_model_reduction_cost): Likewise.
5973 (vect_create_epilog_for_reduction): Likewise.
5974 (vectorizable_live_operation): Likewise.
5975 * tree-vect-slp.c (vect_find_last_scalar_stmt_in_slp): Likewise.
5976 (vect_detect_hybrid_slp_stmts, vect_schedule_slp): Likewise.
5977 * tree-vect-stmts.c (vectorizable_call): Likewise.
5978 (vectorizable_simd_clone_call, vect_remove_stores): Likewise.
5980 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
5982 * tree-vectorizer.h (vect_transform_stmt): Remove grouped_store
5984 * tree-vect-stmts.c (vect_transform_stmt): Likewise.
5985 * tree-vect-loop.c (vect_transform_loop_stmt): Update call accordingly.
5986 (vect_transform_loop): Likewise.
5987 * tree-vect-slp.c (vect_schedule_slp_instance): Likewise.
5989 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
5991 * tree-vectorizer.h (vect_schedule_slp): Return void.
5992 * tree-vect-slp.c (vect_schedule_slp_instance): Likewise.
5993 (vect_schedule_slp): Likewise.
5995 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
5997 * tree-vect-loop.c (vect_transform_loop_stmt): Remove slp_scheduled
5999 (vect_transform_loop): Update calls accordingly. Schedule SLP
6000 instances before the main loop, if any exist.
6002 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
6004 PR tree-optimization/86749
6005 * tree-vect-patterns.c (vect_determine_min_output_precision_1):
6006 If the lhs is used in a COND_EXPR, check that it is being used
6007 as the "then" or "else" value.
6009 2018-08-01 Tom de Vries <tdevries@suse.de>
6012 * config/nvptx/nvptx.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define to
6013 speculation_safe_value_not_needed.
6015 2018-08-01 Richard Biener <rguenther@suse.de>
6017 * tree-ssa-sccvn.c (visit_phi): Compare invariant addresses
6020 2018-08-01 Martin Liska <mliska@suse.cz>
6022 * value-prof.c (gimple_divmod_fixed_value_transform): Unify
6023 format how successful transformation is dumped.
6024 (gimple_mod_pow2_value_transform): Likewise.
6025 (gimple_mod_subtract_transform): Likewise.
6026 (gimple_stringops_transform): Likewise.
6028 2018-08-01 Martin Liska <mliska@suse.cz>
6031 * value-prof.c (interesting_stringop_to_profile_p):
6032 Simplify the code and add BUILT_IN_MEMMOVE.
6033 (gimple_stringops_transform): Likewise.
6035 2018-08-01 Sam Tebbs <sam.tebbs@arm.com>
6037 * config/aarch64/aarch64-simd.md
6038 (*aarch64_get_lane_zero_extendsi<mode>): Rename to...
6039 (*aarch64_get_lane_zero_extend<GPI:mode><VDQQH:mode>): ... This and
6040 use GPI iterator instead of SI mode.
6042 2018-08-01 Richard Earnshaw <rearnsha@arm.com>
6044 * config/rs6000/rs6000.md (speculation_barrier): Renamed from
6045 rs6000_speculation_barrier.
6046 * config/rs6000/rs6000.c (rs6000_expand_builtin): Adjust for
6047 new barrier pattern name.
6049 2018-08-01 Richard Earnshaw <rearnsha@arm.com>
6051 * config/i386/i386.md (unspecv): Add UNSPECV_SPECULATION_BARRIER.
6052 (speculation_barrier): New insn.
6054 2018-08-01 Richard Biener <rguenther@suse.de>
6057 * graphite.h: Include isl/id.h and isl/space.h to allow build
6060 2018-08-01 Jan Willem Jagersma <jwjagersma@gmail.com>
6063 * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
6064 mode for COFF targets.
6065 * defaults.h (TARGET_COFF): Define.
6066 * config/i386/djgpp.h (TARGET_ASM_LTO_START, TARGET_ASM_LTO_END,
6067 TARGET_COFF): Define.
6068 (i386_djgpp_asm_lto_start, i386_djgpp_asm_lto_end): Declare.
6069 * config/i386/djgpp.c (saved_debug_info_level): New static variable.
6070 (i386_djgpp_asm_lto_start, i386_djgpp_asm_lto_end): New functions.
6072 2018-07-31 Alexandre Oliva <oliva@adacore.com>
6074 * gimple-streamer-in.c (input_bb): Restore BB discriminator.
6075 * gimple-streamer-out.c (output_bb): Save it.
6076 * lto-streamer-in.c (input_struct_function_base): Restore
6077 instance discriminator if available. Create map on demand.
6078 * lto-streamer-out.c (output_struct_function_base): Save it if
6080 * final.c (decl_to_instance_map): Document LTO strategy.
6082 2018-07-31 Alexandre Oliva <oliva@adacore.com>
6083 Olivier Hainque <hainque@adacore.com>
6085 * debug.h (decl_to_instance_map_t): New type.
6086 (decl_to_instance_map): Declare.
6087 (maybe_create_decl_to_instance_map): New inline function.
6088 * final.c (bb_discriminator, last_bb_discriminator): New statics,
6089 to track basic block discriminators.
6090 (final_start_function_1): Initialize them.
6091 (final_scan_insn_1): On NOTE_INSN_BASIC_BLOCK, track
6093 (decl_to_instance_map): New variable.
6094 (map_decl_to_instance, maybe_set_discriminator): New functions.
6095 (notice_source_line): Set discriminator.
6097 2018-07-31 Ian Lance Taylor <iant@golang.org>
6099 * targhooks.c (default_have_speculation_safe_value): Add
6102 2018-07-31 David Malcolm <dmalcolm@redhat.com>
6104 * dump-context.h: Include "pretty-print.h".
6105 (dump_context::refresh_dumps_are_enabled): New decl.
6106 (dump_context::emit_item): New decl.
6107 (class dump_context): Add fields "m_test_pp" and
6109 (temp_dump_context::temp_dump_context): Add param "test_pp_flags".
6110 (temp_dump_context::get_dumped_text): New decl.
6111 (class temp_dump_context): Add field "m_pp".
6112 * dumpfile.c (refresh_dumps_are_enabled): Convert to...
6113 (dump_context::refresh_dumps_are_enabled): ...and add a test for
6115 (set_dump_file): Update for above change.
6116 (set_alt_dump_file): Likewise.
6117 (dump_loc): New overload, taking a pretty_printer *.
6118 (dump_context::dump_loc): Call end_any_optinfo. Dump the location
6119 to any test pretty-printer.
6120 (make_item_for_dump_gimple_stmt): New function, adapted from
6121 optinfo::add_gimple_stmt.
6122 (dump_context::dump_gimple_stmt): Call it, and use the result,
6123 eliminating the direct usage of dump_file and alt_dump_file in
6124 favor of indirectly using them via emit_item.
6125 (make_item_for_dump_gimple_expr): New function, adapted from
6126 optinfo::add_gimple_expr.
6127 (dump_context::dump_gimple_expr): Call it, and use the result,
6128 eliminating the direct usage of dump_file and alt_dump_file in
6129 favor of indirectly using them via emit_item.
6130 (make_item_for_dump_generic_expr): New function, adapted from
6132 (dump_context::dump_generic_expr): Call it, and use the result,
6133 eliminating the direct usage of dump_file and alt_dump_file in
6134 favor of indirectly using them via emit_item.
6135 (make_item_for_dump_printf_va): New function, adapted from
6136 optinfo::add_printf_va.
6137 (make_item_for_dump_printf): New function.
6138 (dump_context::dump_printf_va): Call make_item_for_dump_printf_va,
6139 and use the result, eliminating the direct usage of dump_file and
6140 alt_dump_file in favor of indirectly using them via emit_item.
6141 (make_item_for_dump_dec): New function.
6142 (dump_context::dump_dec): Call it, and use the result,
6143 eliminating the direct usage of dump_file and alt_dump_file in
6144 favor of indirectly using them via emit_item.
6145 (make_item_for_dump_symtab_node): New function, adapted from
6146 optinfo::add_symtab_node.
6147 (dump_context::dump_symtab_node): Call it, and use the result,
6148 eliminating the direct usage of dump_file and alt_dump_file in
6149 favor of indirectly using them via emit_item.
6150 (dump_context::begin_scope): Reimplement, avoiding direct usage
6151 of dump_file and alt_dump_file in favor of indirectly using them
6153 (dump_context::emit_item): New member function.
6154 (temp_dump_context::temp_dump_context): Add param "test_pp_flags".
6155 Set up test pretty-printer on the underlying context. Call
6156 refresh_dumps_are_enabled.
6157 (temp_dump_context::~temp_dump_context): Call
6158 refresh_dumps_are_enabled.
6159 (temp_dump_context::get_dumped_text): New member function.
6160 (selftest::verify_dumped_text): New function.
6161 (ASSERT_DUMPED_TEXT_EQ): New macro.
6162 (selftest::test_capture_of_dump_calls): Run all tests twice, with
6163 and then without optinfo enabled. Add uses of
6164 ASSERT_DUMPED_TEXT_EQ to all tests. Add test of nested scopes.
6165 * dumpfile.h: Update comment for the dump_* API.
6166 * optinfo-emit-json.cc
6167 (selftest::test_building_json_from_dump_calls): Update for new
6168 param for temp_dump_context ctor.
6169 * optinfo.cc (optinfo_item::optinfo_item): Remove "owned" param
6170 and "m_owned" field.
6171 (optinfo_item::~optinfo_item): Likewise.
6172 (optinfo::add_item): New member function.
6173 (optinfo::emit): Update comment.
6174 (optinfo::add_string): Delete.
6175 (optinfo::add_printf): Delete.
6176 (optinfo::add_printf_va): Delete.
6177 (optinfo::add_gimple_stmt): Delete.
6178 (optinfo::add_gimple_expr): Delete.
6179 (optinfo::add_tree): Delete.
6180 (optinfo::add_symtab_node): Delete.
6181 (optinfo::add_dec): Delete.
6182 * optinfo.h (class dump_context): New forward decl.
6183 (optinfo::add_item): New decl.
6184 (optinfo::add_string): Delete.
6185 (optinfo::add_printf): Delete.
6186 (optinfo::add_printf_va): Delete.
6187 (optinfo::add_gimple_stmt): Delete.
6188 (optinfo::add_gimple_expr): Delete.
6189 (optinfo::add_tree): Delete.
6190 (optinfo::add_symtab_node): Delete.
6191 (optinfo::add_dec): Delete.
6192 (optinfo::add_poly_int): Delete.
6193 (optinfo_item::optinfo_item): Remove "owned" param.
6194 (class optinfo_item): Remove field "m_owned".
6196 2018-07-31 Jozef Lawrynowicz <jozef.l@mittosystems.com>
6199 * gcc/cfgexpand.c (set_parm_rtl): Use the alignment of Pmode when
6200 MAX_SUPPORTED_STACK_ALIGNMENT would otherwise be exceeded by the
6201 requested variable alignment.
6202 (expand_one_ssa_partition): Likewise.
6203 (expand_one_var): Likewise.
6205 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
6207 * config/pdp11/pdp11.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
6208 to speculation_safe_value_not_needed.
6210 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
6212 * targhooks.h (speculation_safe_value_not_needed): New prototype.
6213 * targhooks.c (speculation_safe_value_not_needed): New function.
6214 * target.def (have_speculation_safe_value): Update documentation.
6215 * doc/tm.texi: Regenerated.
6217 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
6219 * config/aarch64/iterators.md (ALLI_TI): New iterator.
6220 * config/aarch64/aarch64.md (despeculate_copy<ALLI_TI:mode>): New
6222 (despeculate_copy<ALLI:mode>_insn): New insn.
6223 (despeculate_copyti_insn): New insn.
6224 (despeculate_simple<ALLI:mode>): New insn
6225 (despeculate_simpleti): New insn.
6226 * config/aarch64/aarch64.c (aarch64_speculation_safe_value): New
6228 (TARGET_SPECULATION_SAFE_VALUE): Redefine to
6229 aarch64_speculation_safe_value.
6230 (aarch64_print_operand): Handle const0_rtx in modifier 'H'.
6232 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
6234 * config/aarch64/aarch64-speculation.cc: New file.
6235 * config/aarch64/aarch64-passes.def (pass_track_speculation): Add
6236 before pass_reorder_blocks.
6237 * config/aarch64/aarch64-protos.h (make_pass_track_speculation): Add
6239 * config/aarch64/aarch64.c (aarch64_conditional_register_usage): Fix
6240 X14 and X15 when tracking speculation.
6241 * config/aarch64/aarch64.md (register name constants): Add
6242 SPECULATION_TRACKER_REGNUM and SPECULATION_SCRATCH_REGNUM.
6243 (unspec): Add UNSPEC_SPECULATION_TRACKER.
6244 (speculation_barrier): New insn attribute.
6245 (cmp<mode>): Allow SP in comparisons.
6246 (speculation_tracker): New insn.
6247 (speculation_barrier): Add speculation_barrier attribute.
6248 * config/aarch64/t-aarch64: Add make rule for aarch64-speculation.o.
6249 * config.gcc (aarch64*-*-*): Add aarch64-speculation.o to extra_objs.
6250 * doc/invoke.texi (AArch64 Options): Document -mtrack-speculation.
6252 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
6254 * config/aarch64/aarch64.md (cb<optab><mode>1): Disable when
6255 aarch64_track_speculation is true.
6256 (tb<optab><mode>1): Likewise.
6257 * config/aarch64/aarch64.c (aarch64_split_compare_regs): Do not
6258 generate CB[N]Z when tracking speculation.
6259 (aarch64_split_compare_and_swap): Likewise.
6260 (aarch64_split_atomic_op): Likewise.
6262 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
6264 * config/aarch64/aarch64.opt (mtrack-speculation): New target option.
6266 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
6268 * config/aarch64.md (unspecv): Add UNSPECV_SPECULAION_BARRIER.
6269 (speculation_barrier): New insn.
6271 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
6273 * config/arm/unspecs.md (unspecv): Add VUNSPEC_SPECULATION_BARRIER.
6274 * config/arm/arm.md (speculation_barrier): New expand.
6275 (speculation_barrier_insn): New pattern.
6277 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
6279 * builtin-types.def (BT_FN_PTR_PTR_VAR): New function type.
6280 (BT_FN_I1_I1_VAR, BT_FN_I2_I2_VAR, BT_FN_I4_I4_VAR): Likewise.
6281 (BT_FN_I8_I8_VAR, BT_FN_I16_I16_VAR): Likewise.
6282 * builtin-attrs.def (ATTR_NOVOPS_NOTHROW_LEAF_LIST): New attribute
6284 * builtins.def (BUILT_IN_SPECULATION_SAFE_VALUE_N): New builtin.
6285 (BUILT_IN_SPECULATION_SAFE_VALUE_PTR): New internal builtin.
6286 (BUILT_IN_SPECULATION_SAFE_VALUE_1): Likewise.
6287 (BUILT_IN_SPECULATION_SAFE_VALUE_2): Likewise.
6288 (BUILT_IN_SPECULATION_SAFE_VALUE_4): Likewise.
6289 (BUILT_IN_SPECULATION_SAFE_VALUE_8): Likewise.
6290 (BUILT_IN_SPECULATION_SAFE_VALUE_16): Likewise.
6291 * builtins.c (expand_speculation_safe_value): New function.
6292 (expand_builtin): Call it.
6293 * doc/cpp.texi: Document predefine __HAVE_SPECULATION_SAFE_VALUE.
6294 * doc/extend.texi: Document __builtin_speculation_safe_value.
6295 * doc/md.texi: Document "speculation_barrier" pattern.
6296 * doc/tm.texi.in: Pull in TARGET_SPECULATION_SAFE_VALUE and
6297 TARGET_HAVE_SPECULATION_SAFE_VALUE.
6298 * doc/tm.texi: Regenerated.
6299 * target.def (have_speculation_safe_value, speculation_safe_value): New
6301 * targhooks.c (default_have_speculation_safe_value): New function.
6302 (default_speculation_safe_value): New function.
6303 * targhooks.h (default_have_speculation_safe_value): Add prototype.
6304 (default_speculation_safe_value): Add prototype.
6306 2018-07-31 David Malcolm <dmalcolm@redhat.com>
6308 * dump-context.h (dump_context::dump_loc): New decl.
6309 * dumpfile.c (dump_context::dump_loc): New member function.
6310 (dump_context::dump_gimple_stmt_loc): Reimplement using dump_loc
6311 and dump_gimple_stmt.
6312 (dump_context::dump_gimple_expr_loc): Likewise, using
6314 (dump_context::dump_generic_expr_loc): Likewise, using
6316 (dump_context::dump_printf_loc_va): Likewise, using
6318 (dump_context::begin_scope): Explicitly using the global function
6319 "dump_loc", rather than the member function.
6321 2018-07-31 Martin Sebor <msebor@redhat.com>
6323 PR tree-optimization/86741
6324 * tree-vrp.c (vrp_prop::check_mem_ref): Avoid incomplete types.
6326 2018-07-31 Andreas Krebbel <krebbel@linux.ibm.com>
6328 * config/s390/s390.c (s390_expand_setmem): Make the unrolling to
6329 depend on whether prefetch instructions will be emitted or not.
6330 Use TARGET_SETMEM_PFD for checking whether prefetch instructions
6331 will be emitted or not.
6332 * config/s390/s390.h (TARGET_SETMEM_PREFETCH_DISTANCE)
6333 (TARGET_SETMEM_PFD): New macros.
6335 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
6337 * tree-vectorizer.h (stmt_vec_info): Turn back into a typedef.
6338 (NULL_STMT_VEC_INFO): Delete.
6339 (stmt_vec_info::operator*): Likewise.
6340 (stmt_vec_info::operator gimple *): Likewise.
6341 * tree-vect-loop.c (vectorizable_reduction): Use NULL instead
6342 of NULL_STMT_VEC_INFO.
6343 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
6344 (vect_reassociating_reduction_p): Likewise.
6345 * tree-vect-stmts.c (vect_build_gather_load_calls): Likewise.
6346 (vectorizable_store): Likewise.
6347 * tree-vectorizer.c (vec_info::set_vinfo_for_stmt): Likewise.
6348 (vec_info::free_stmt_vec_infos): Likewise.
6350 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
6352 * tree-vectorizer.h (vect_stmt_in_region_p): Delete.
6353 * tree-vectorizer.c (vect_stmt_in_region_p): Likewise.
6355 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
6357 * tree-vectorizer.h (vec_info::new_vinfo_for_stmt)
6358 (vec_info::set_vinfo_for_stmt, vec_info::free_stmt_vec_infos)
6359 (vec_info::free_stmt_vec_info): New private member functions.
6360 (set_stmt_vec_info_vec, free_stmt_vec_infos, vinfo_for_stmt)
6361 (set_vinfo_for_stmt, new_stmt_vec_info, free_stmt_vec_info): Delete.
6362 * tree-parloops.c (gather_scalar_reductions): Remove calls to
6363 set_stmt_vec_info_vec and free_stmt_vec_infos.
6364 * tree-vect-loop.c (_loop_vec_info): Remove call to
6365 set_stmt_vec_info_vec.
6366 * tree-vect-stmts.c (new_stmt_vec_info, set_stmt_vec_info_vec)
6367 (free_stmt_vec_infos, free_stmt_vec_info): Delete in favor of...
6368 * tree-vectorizer.c (vec_info::new_stmt_vec_info)
6369 (vec_info::set_vinfo_for_stmt, vec_info::free_stmt_vec_infos)
6370 (vec_info::free_stmt_vec_info): ...these new functions. Remove
6371 assignments in {vec_info::,}new_stmt_vec_info that are redundant
6372 with the clearing in the xcalloc.
6373 (stmt_vec_info_vec): Delete.
6374 (vec_info::vec_info): Don't call set_stmt_vec_info_vec.
6375 (vectorize_loops): Likewise.
6376 (vec_info::~vec_info): Remove argument from call to
6377 free_stmt_vec_infos.
6378 (vec_info::add_stmt): Remove vinfo argument from call to
6381 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
6383 * tree-vectorizer.h (free_stmt_vec_info): Take a stmt_vec_info
6384 rather than a gimple stmt.
6385 * tree-vect-stmts.c (free_stmt_vec_info): Likewise. Don't free
6386 information for pattern statements when passed the original
6387 statement; instead wait to be passed the pattern statement itself.
6388 Don't call set_vinfo_for_stmt here.
6389 (free_stmt_vec_infos): Update call to free_stmt_vec_info.
6390 * tree-vect-loop.c (_loop_vec_info::~loop_vec_info): Don't free
6391 stmt_vec_infos here.
6392 * tree-vect-slp.c (_bb_vec_info::~bb_vec_info): Likewise.
6393 * tree-vectorizer.c (vec_info::remove_stmt): Nullify the statement's
6394 stmt_vec_infos entry.
6396 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
6398 * tree-vectorizer.h (vec_info::replace_stmt): Declare.
6399 * tree-vectorizer.c (vec_info::replace_stmt): New function.
6400 * tree-vect-slp.c (vect_remove_slp_scalar_calls): Use it.
6401 * tree-vect-stmts.c (vectorizable_call): Likewise.
6402 (vectorizable_simd_clone_call): Likewise.
6404 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
6406 * tree-vectorizer.h (vec_info::remove_stmt): Declare.
6407 * tree-vectorizer.c (vec_info::remove_stmt): New function.
6408 * tree-vect-loop-manip.c (vect_set_loop_condition): Use it.
6409 * tree-vect-loop.c (vect_transform_loop): Likewise.
6410 * tree-vect-slp.c (vect_schedule_slp): Likewise.
6411 * tree-vect-stmts.c (vect_remove_stores): Likewise.
6413 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
6415 * tree-vectorizer.h (vec_info::lookup_dr): New member function.
6416 (vect_dr_stmt): Delete.
6417 * tree-vectorizer.c (vec_info::lookup_dr): New function.
6418 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Use it instead
6420 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
6421 (vect_analyze_data_ref_dependence, vect_record_base_alignments)
6422 (vect_verify_datarefs_alignment, vect_peeling_supportable)
6423 (vect_analyze_data_ref_accesses, vect_prune_runtime_alias_test_list)
6424 (vect_analyze_data_refs): Likewise.
6425 (vect_slp_analyze_data_ref_dependence): Likewise. Take a vec_info
6427 (vect_find_same_alignment_drs): Likewise.
6428 (vect_slp_analyze_node_dependences): Update calls accordingly.
6429 (vect_analyze_data_refs_alignment): Likewise. Use vec_info::lookup_dr
6430 instead of DR_VECT_AUX.
6431 (vect_get_peeling_costs_all_drs): Take a loop_vec_info instead
6432 of a vector data references. Use vec_info::lookup_dr instead of
6434 (vect_peeling_hash_get_lowest_cost): Update calls accordingly.
6435 (vect_enhance_data_refs_alignment): Likewise. Use vec_info::lookup_dr
6436 instead of DR_VECT_AUX.
6438 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
6440 * tree-vectorizer.h (_loop_vec_info::unaligned_dr): Change to
6442 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Update
6444 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
6445 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
6446 (vect_gen_prolog_loop_niters): Likewise.
6448 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
6450 * tree-vectorizer.h (set_dr_misalignment, dr_misalignment)
6451 (DR_TARGET_ALIGNMENT, aligned_access_p, known_alignment_for_access_p)
6452 (vect_known_alignment_in_bytes, vect_dr_behavior)
6453 (vect_get_scalar_dr_size): Take references as dr_vec_infos
6454 instead of data_references. Update calls to other routines for
6455 which the same change has been made.
6456 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Take
6457 dr_vec_infos instead of stmt_vec_infos.
6458 (vect_analyze_data_ref_dependence): Update call accordingly.
6459 (vect_slp_analyze_data_ref_dependence)
6460 (vect_record_base_alignments): Use DR_VECT_AUX.
6461 (vect_calculate_target_alignment, vect_compute_data_ref_alignment)
6462 (vect_update_misalignment_for_peel, verify_data_ref_alignment)
6463 (vector_alignment_reachable_p, vect_get_data_access_cost)
6464 (vect_peeling_supportable, vect_analyze_group_access_1)
6465 (vect_analyze_group_access, vect_analyze_data_ref_access)
6466 (vect_vfa_segment_size, vect_vfa_access_size, vect_vfa_align)
6467 (vect_compile_time_alias, vect_small_gap_p)
6468 (vectorizable_with_step_bound_p, vect_duplicate_ssa_name_ptr_info):
6469 (vect_supportable_dr_alignment): Take references as dr_vec_infos
6470 instead of data_references. Update calls to other routines for
6471 which the same change has been made.
6472 (vect_verify_datarefs_alignment, vect_get_peeling_costs_all_drs)
6473 (vect_find_same_alignment_drs, vect_analyze_data_refs_alignment)
6474 (vect_slp_analyze_and_verify_node_alignment)
6475 (vect_analyze_data_ref_accesses, vect_prune_runtime_alias_test_list)
6476 (vect_create_addr_base_for_vector_ref, vect_create_data_ref_ptr)
6477 (vect_setup_realignment): Use dr_vec_infos. Update calls after
6479 (_vect_peel_info::dr): Replace with...
6480 (_vect_peel_info::dr_info): ...this new field.
6481 (vect_peeling_hash_get_most_frequent)
6482 (vect_peeling_hash_choose_best_peeling): Update accordingly.
6483 (vect_peeling_hash_get_lowest_cost):
6484 (vect_enhance_data_refs_alignment): Likewise. Update calls to other
6485 routines for which the same change has been made.
6486 (vect_peeling_hash_insert): Likewise. Take a dr_vec_info instead of a
6488 * tree-vect-loop-manip.c (get_misalign_in_elems)
6489 (vect_gen_prolog_loop_niters): Use dr_vec_infos. Update calls after
6491 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
6492 * tree-vect-stmts.c (vect_get_store_cost, vect_get_load_cost)
6493 (vect_truncate_gather_scatter_offset, compare_step_with_zero)
6494 (get_group_load_store_type, get_negative_load_store_type)
6495 (vect_get_data_ptr_increment, vectorizable_store)
6496 (vectorizable_load): Likewise.
6497 (ensure_base_align): Take a dr_vec_info instead of a data_reference.
6498 Update calls to other routines for which the same change has been made.
6500 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
6502 * tree-vectorizer.h (vec_info::move_dr): New member function.
6503 (dataref_aux): Rename to...
6504 (dr_vec_info): ...this and add "dr" and "stmt" fields.
6505 (_stmt_vec_info::dr_aux): Update accordingly.
6506 (_stmt_vec_info::data_ref_info): Delete.
6507 (STMT_VINFO_GROUPED_ACCESS, DR_GROUP_FIRST_ELEMENT)
6508 (DR_GROUP_NEXT_ELEMENT, DR_GROUP_SIZE, DR_GROUP_STORE_COUNT)
6509 (DR_GROUP_GAP, DR_GROUP_SAME_DR_STMT, REDUC_GROUP_FIRST_ELEMENT):
6510 (REDUC_GROUP_NEXT_ELEMENT, REDUC_GROUP_SIZE): Use dr_aux.dr instead
6512 (STMT_VINFO_DATA_REF): Likewise. Turn into an lvalue.
6513 (STMT_VINFO_DR_INFO): New macro.
6514 (DR_VECT_AUX): Use STMT_VINFO_DR_INKFO and vect_dr_stmt.
6515 (set_dr_misalignment): Update after rename of dataref_aux.
6516 (vect_dr_stmt): Move earlier in file. Return dr_aux.stmt.
6517 * tree-vect-stmts.c (new_stmt_vec_info): Remove redundant
6518 initialization of STMT_VINFO_DATA_REF.
6519 * tree-vectorizer.c (vec_info::move_dr): New function.
6520 * tree-vect-patterns.c (vect_recog_bool_pattern)
6521 (vect_recog_mask_conversion_pattern)
6522 (vect_recog_gather_scatter_pattern): Use it.
6523 * tree-vect-data-refs.c (vect_analyze_data_refs): Initialize
6524 the "dr" and "stmt" fields of dr_vec_info instead of
6525 STMT_VINFO_DATA_REF.
6527 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
6529 * tree-vectorizer.h (_stmt_vec_info::pattern_stmt_p): New field.
6530 (is_pattern_stmt_p): Use it.
6531 * tree-vect-patterns.c (vect_init_pattern_stmt): Set pattern_stmt_p
6532 on pattern statements.
6534 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
6536 * tree-vect-patterns.c (vect_mark_pattern_stmts): Take the
6537 original stmt as a stmt_vec_info rather than a gimple stmt.
6538 (vect_pattern_recog_1): Take the statement directly as a
6539 stmt_vec_info, rather than via a gimple_stmt_iterator.
6540 Update call to vect_mark_pattern_stmts.
6541 (vect_pattern_recog): Update calls accordingly.
6543 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
6545 * tree-vectorizer.h (vect_get_vec_defs_for_stmt_copy)
6546 (vect_get_vec_def_for_stmt_copy): Take a vec_info rather than
6547 a vect_def_type for the first argument.
6548 * tree-vect-stmts.c (vect_get_vec_defs_for_stmt_copy): Likewise.
6549 (vect_get_vec_def_for_stmt_copy): Likewise. Return the original
6550 operand if it isn't defined by a vectorized statement.
6551 (vect_build_gather_load_calls): Remove the mask_dt argument and
6552 update calls to vect_get_vec_def_for_stmt_copy.
6553 (vectorizable_bswap): Likewise the dt argument.
6554 (vectorizable_call): Update calls to vectorizable_bswap and
6555 vect_get_vec_def_for_stmt_copy.
6556 (vectorizable_simd_clone_call, vectorizable_assignment)
6557 (vectorizable_shift, vectorizable_operation, vectorizable_condition)
6558 (vectorizable_comparison): Update calls to
6559 vect_get_vec_def_for_stmt_copy.
6560 (vectorizable_store): Likewise. Remove now-unnecessary calls to
6562 (vect_get_loop_based_defs): Remove dt argument and update call
6563 to vect_get_vec_def_for_stmt_copy.
6564 (vectorizable_conversion): Update calls to vect_get_loop_based_defs
6565 and vect_get_vec_def_for_stmt_copy.
6566 (vectorizable_load): Update calls to vect_build_gather_load_calls
6567 and vect_get_vec_def_for_stmt_copy.
6568 * tree-vect-loop.c (vect_create_epilog_for_reduction)
6569 (vectorizable_reduction, vectorizable_live_operation): Update calls
6570 to vect_get_vec_def_for_stmt_copy.
6572 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
6574 * tree-vect-data-refs.c (vect_record_base_alignment): Replace vec_info
6575 and gimple stmt arguments with a stmt_vec_info.
6576 (vect_record_base_alignments): Update calls accordingly.
6577 * tree-vect-slp.c (vect_record_max_nunits): Replace vec_info
6578 and gimple stmt arguments with a stmt_vec_info.
6579 (vect_build_slp_tree_1): Remove vinfo argument and update call
6580 to vect_record_max_nunits.
6581 (vect_build_slp_tree_2): Update calls to vect_build_slp_tree_1
6582 and vect_record_max_nunits.
6584 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
6586 * tree-vectorizer.h (nested_in_vect_loop_p): Move further down
6587 file and take a stmt_vec_info instead of a gimple stmt.
6588 (supportable_widening_operation, vect_finish_replace_stmt)
6589 (vect_finish_stmt_generation, vect_get_store_rhs)
6590 (vect_get_vec_def_for_operand_1, vect_get_vec_def_for_operand)
6591 (vect_get_vec_defs, vect_init_vector, vect_transform_stmt)
6592 (vect_remove_stores, vect_analyze_stmt, vectorizable_condition)
6593 (vect_get_smallest_scalar_type, vect_check_gather_scatter)
6594 (vect_create_data_ref_ptr, bump_vector_ptr)
6595 (vect_permute_store_chain, vect_setup_realignment)
6596 (vect_transform_grouped_load, vect_record_grouped_load_vectors)
6597 (vect_create_addr_base_for_vector_ref, vectorizable_live_operation)
6598 (vectorizable_reduction, vectorizable_induction)
6599 (get_initial_def_for_reduction, is_simple_and_all_uses_invariant)
6600 (vect_get_place_in_interleaving_chain): Take stmt_vec_infos rather
6601 than gimple stmts as arguments.
6602 * tree-vect-data-refs.c (vect_get_smallest_scalar_type)
6603 (vect_preserves_scalar_order_p, vect_slp_analyze_node_dependences)
6604 (can_group_stmts_p, vect_check_gather_scatter)
6605 (vect_create_addr_base_for_vector_ref, vect_create_data_ref_ptr)
6606 (bump_vector_ptr, vect_permute_store_chain, vect_setup_realignment)
6607 (vect_permute_load_chain, vect_shift_permute_load_chain)
6608 (vect_transform_grouped_load)
6609 (vect_record_grouped_load_vectors): Likewise.
6610 * tree-vect-loop.c (vect_fixup_reduc_chain)
6611 (get_initial_def_for_reduction, vect_create_epilog_for_reduction)
6612 (vectorize_fold_left_reduction, is_nonwrapping_integer_induction)
6613 (vectorizable_reduction, vectorizable_induction)
6614 (vectorizable_live_operation, vect_loop_kill_debug_uses): Likewise.
6615 * tree-vect-patterns.c (type_conversion_p, adjust_bool_stmts)
6616 (vect_get_load_store_mask): Likewise.
6617 * tree-vect-slp.c (vect_get_place_in_interleaving_chain)
6618 (vect_analyze_slp_instance, vect_mask_constant_operand_p): Likewise.
6619 * tree-vect-stmts.c (vect_mark_relevant)
6620 (is_simple_and_all_uses_invariant)
6621 (exist_non_indexing_operands_for_use_p, process_use)
6622 (vect_init_vector_1, vect_init_vector, vect_get_vec_def_for_operand_1)
6623 (vect_get_vec_def_for_operand, vect_get_vec_defs)
6624 (vect_finish_stmt_generation_1, vect_finish_replace_stmt)
6625 (vect_finish_stmt_generation, vect_truncate_gather_scatter_offset)
6626 (compare_step_with_zero, vect_get_store_rhs, get_group_load_store_type)
6627 (get_negative_load_store_type, get_load_store_type)
6628 (vect_check_load_store_mask, vect_check_store_rhs)
6629 (vect_build_gather_load_calls, vect_get_strided_load_store_ops)
6630 (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
6631 (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
6632 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
6633 (get_group_alias_ptr_type, vectorizable_store, hoist_defs_of_uses)
6634 (vectorizable_load, vectorizable_condition, vectorizable_comparison)
6635 (vect_analyze_stmt, vect_transform_stmt, vect_remove_stores)
6636 (supportable_widening_operation): Likewise.
6638 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
6640 * tree-vect-data-refs.c (vect_describe_gather_scatter_call): Take
6641 a stmt_vec_info instead of a gcall.
6642 (vect_check_gather_scatter): Update call accordingly.
6643 * tree-vect-loop-manip.c (iv_phi_p): Take a stmt_vec_info instead
6645 (vect_can_advance_ivs_p, vect_update_ivs_after_vectorizer)
6646 (slpeel_update_phi_nodes_for_loops):): Update calls accordingly.
6647 * tree-vect-loop.c (vect_transform_loop_stmt): Take a stmt_vec_info
6648 instead of a gimple stmt.
6649 (vect_transform_loop): Update calls accordingly.
6650 * tree-vect-slp.c (vect_split_slp_store_group): Take and return
6651 stmt_vec_infos instead of gimple stmts.
6652 (vect_analyze_slp_instance): Update use accordingly.
6653 * tree-vect-stmts.c (read_vector_array, write_vector_array)
6654 (vect_clobber_variable, vect_stmt_relevant_p, permute_vec_elements)
6655 (vect_use_strided_gather_scatters_p, vect_build_all_ones_mask)
6656 (vect_build_zero_merge_argument, vect_get_gather_scatter_ops)
6657 (vect_gen_widened_results_half, vect_get_loop_based_defs)
6658 (vect_create_vectorized_promotion_stmts, can_vectorize_live_stmts):
6659 Take a stmt_vec_info instead of a gimple stmt and pass stmt_vec_infos
6660 down to subroutines.
6662 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
6664 * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Change the type
6665 of the worklist from a vector of gimple stmts to a vector of
6667 * tree-vect-stmts.c (vect_mark_relevant, process_use)
6668 (vect_mark_stmts_to_be_vectorized): Likewise
6670 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
6672 * tree-vect-loop.c (vect_analyze_loop_operations): Look up the
6673 statement before passing it to vect_analyze_stmt.
6674 (vect_create_epilog_for_reduction): Use a stmt_vec_info to walk
6675 the chain of phi vector definitions. Track the exit phi via its
6677 (vectorizable_reduction): Set cond_stmt_vinfo directly from the
6678 STMT_VINFO_REDUC_DEF.
6679 * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Use
6680 stmt_vec_infos to handle the statement chains.
6681 (vect_get_slp_defs): Record the first statement in the node
6682 using a stmt_vec_info.
6683 * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Look up
6684 statements here and pass their stmt_vec_info down to subroutines.
6685 (vect_init_vector_1): Hoist call to vinfo_for_stmt and pass it
6686 down to vect_finish_stmt_generation.
6687 (vect_init_vector, vect_get_vec_defs, vect_finish_replace_stmt)
6688 (vect_finish_stmt_generation): Call vinfo_for_stmt and pass
6689 stmt_vec_infos to subroutines.
6690 (vect_remove_stores): Use stmt_vec_infos to handle the statement
6693 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
6695 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences):
6696 (vect_check_gather_scatter, vect_create_data_ref_ptr, bump_vector_ptr)
6697 (vect_permute_store_chain, vect_setup_realignment)
6698 (vect_permute_load_chain, vect_shift_permute_load_chain)
6699 (vect_transform_grouped_load): Use stmt_vec_info rather than gimple
6700 stmts internally, and when passing values to other vectorizer routines.
6701 * tree-vect-loop-manip.c (vect_can_advance_ivs_p): Likewise.
6702 * tree-vect-loop.c (vect_analyze_scalar_cycles_1)
6703 (vect_analyze_loop_operations, get_initial_def_for_reduction)
6704 (vect_create_epilog_for_reduction, vectorize_fold_left_reduction)
6705 (vectorizable_reduction, vectorizable_induction)
6706 (vectorizable_live_operation, vect_transform_loop_stmt)
6707 (vect_transform_loop): Likewise.
6708 * tree-vect-patterns.c (vect_reassociating_reduction_p)
6709 (vect_recog_widen_op_pattern, vect_recog_mixed_size_cond_pattern)
6710 (vect_recog_bool_pattern, vect_recog_gather_scatter_pattern): Likewise.
6711 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
6712 (vect_slp_analyze_node_operations_1): Likewise.
6713 * tree-vect-stmts.c (vect_mark_relevant, process_use)
6714 (exist_non_indexing_operands_for_use_p, vect_init_vector_1)
6715 (vect_mark_stmts_to_be_vectorized, vect_get_vec_def_for_operand)
6716 (vect_finish_stmt_generation_1, get_group_load_store_type)
6717 (get_load_store_type, vect_build_gather_load_calls)
6718 (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
6719 (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
6720 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
6721 (vectorizable_store, vectorizable_load, vectorizable_condition)
6722 (vectorizable_comparison, vect_analyze_stmt, vect_transform_stmt)
6723 (supportable_widening_operation): Likewise.
6724 (vect_get_vector_types_for_stmt): Likewise.
6725 * tree-vectorizer.h (vect_dr_behavior): Likewise.
6727 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
6729 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
6730 (vect_slp_analyze_node_dependences, vect_analyze_data_ref_accesses)
6731 (vect_permute_store_chain, vect_permute_load_chain)
6732 (vect_shift_permute_load_chain, vect_transform_grouped_load): Avoid
6733 repeated stmt_vec_info lookups.
6734 * tree-vect-loop-manip.c (vect_can_advance_ivs_p): Likewise.
6735 (vect_update_ivs_after_vectorizer): Likewise.
6736 * tree-vect-loop.c (vect_is_simple_reduction): Likewise.
6737 (vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
6738 * tree-vect-patterns.c (adjust_bool_stmts): Likewise.
6739 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
6740 (vect_bb_slp_scalar_cost): Likewise.
6741 * tree-vect-stmts.c (get_group_alias_ptr_type): Likewise.
6743 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
6745 * tree-vect-data-refs.c (vect_check_gather_scatter): Pass the
6746 gcall rather than the generic gimple stmt to gimple_call_internal_fn.
6747 (vect_get_smallest_scalar_type, can_group_stmts_p): Use dyn_cast
6748 to get gassigns and gcalls, rather than operating on generc gimple
6750 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p)
6751 (vect_mark_stmts_to_be_vectorized, vectorizable_store)
6752 (vectorizable_load, vect_analyze_stmt): Likewise.
6753 * tree-vect-loop.c (vectorizable_reduction): Likewise gphi.
6755 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
6757 * tree-vectorizer.h (get_earlier_stmt, get_later_stmt): Take and
6758 return stmt_vec_infos rather than gimple stmts. Do not accept
6760 (vect_find_last_scalar_stmt_in_slp): Return a stmt_vec_info instead
6762 * tree-vect-slp.c (vect_find_last_scalar_stmt_in_slp): Likewise.
6763 Update use of get_later_stmt.
6764 (vect_get_constant_vectors): Update call accordingly.
6765 (vect_schedule_slp_instance): Likewise
6766 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Likewise.
6767 (vect_slp_analyze_instance_dependence): Likewise.
6768 (vect_preserves_scalar_order_p): Update use of get_earlier_stmt.
6770 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
6772 * tree-vectorizer.h (stmt_info_for_cost::stmt): Replace with...
6773 (stmt_info_for_cost::stmt_info): ...this new field.
6774 (add_stmt_costs): Update accordingly.
6775 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
6776 (vect_get_known_peeling_cost): Likewise.
6777 (vect_estimate_min_profitable_iters): Likewise.
6778 * tree-vect-stmts.c (record_stmt_cost): Likewise.
6780 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
6782 * tree-vectorizer.h (_loop_vec_info::may_misalign_stmts): Change
6783 from an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
6784 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Update
6786 * tree-vect-loop-manip.c (vect_create_cond_for_align_checks): Likewise.
6788 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
6790 * tree-vectorizer.h (_stmt_vec_info::same_dr_stmt): Change from
6791 a gimple stmt to a stmt_vec_info.
6792 * tree-vect-stmts.c (vectorizable_load): Update accordingly.
6794 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
6796 * tree-vectorizer.h (vec_info::grouped_stores): Change from
6797 an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
6798 (_loop_vec_info::reduction_chains): Likewise.
6799 * tree-vect-loop.c (vect_fixup_scalar_cycles_with_patterns): Update
6801 * tree-vect-slp.c (vect_analyze_slp): Likewise.
6803 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
6805 * tree-vectorizer.h (_stmt_vec_info::first_element): Change from
6806 a gimple stmt to a stmt_vec_info.
6807 (_stmt_vec_info::next_element): Likewise.
6808 * tree-vect-data-refs.c (vect_update_misalignment_for_peel)
6809 (vect_slp_analyze_and_verify_node_alignment)
6810 (vect_analyze_group_access_1, vect_analyze_group_access)
6811 (vect_small_gap_p, vect_prune_runtime_alias_test_list)
6812 (vect_create_data_ref_ptr, vect_record_grouped_load_vectors)
6813 (vect_supportable_dr_alignment): Update accordingly.
6814 * tree-vect-loop.c (vect_fixup_reduc_chain): Likewise.
6815 (vect_fixup_scalar_cycles_with_patterns, vect_is_slp_reduction)
6816 (vect_is_simple_reduction, vectorizable_reduction): Likewise.
6817 * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
6818 * tree-vect-slp.c (vect_build_slp_tree_1)
6819 (vect_attempt_slp_rearrange_stmts, vect_supported_load_permutation_p)
6820 (vect_split_slp_store_group, vect_analyze_slp_instance)
6821 (vect_analyze_slp, vect_transform_slp_perm_load): Likewise.
6822 * tree-vect-stmts.c (vect_model_store_cost, vect_model_load_cost)
6823 (get_group_load_store_type, get_load_store_type)
6824 (get_group_alias_ptr_type, vectorizable_store, vectorizable_load)
6825 (vect_transform_stmt, vect_remove_stores): Likewise.
6827 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
6829 * tree-vectorizer.h (vect_dr_stmt): Return a stmt_vec_info rather
6831 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
6832 (vect_slp_analyze_data_ref_dependence, vect_record_base_alignments)
6833 (vect_calculate_target_alignmentm, vect_compute_data_ref_alignment)
6834 (vect_update_misalignment_for_peel, vect_verify_datarefs_alignment)
6835 (vector_alignment_reachable_p, vect_get_data_access_cost)
6836 (vect_get_peeling_costs_all_drs, vect_peeling_hash_get_lowest_cost)
6837 (vect_peeling_supportable, vect_enhance_data_refs_alignment)
6838 (vect_find_same_alignment_drs, vect_analyze_data_refs_alignment)
6839 (vect_analyze_group_access_1, vect_analyze_group_access)
6840 (vect_analyze_data_ref_access, vect_analyze_data_ref_accesses)
6841 (vect_vfa_access_size, vect_small_gap_p, vect_analyze_data_refs)
6842 (vect_supportable_dr_alignment): Remove vinfo_for_stmt from the
6843 result of vect_dr_stmt and use the stmt_vec_info instead of
6844 the associated gimple stmt.
6845 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
6846 (vect_gen_prolog_loop_niters): Likewise.
6847 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
6849 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
6851 * tree-vectorizer.h (_slp_tree::stmts): Change from a vec<gimple *>
6852 to a vec<stmt_vec_info>.
6853 * tree-vect-slp.c (vect_free_slp_tree): Update accordingly.
6854 (vect_create_new_slp_node): Take a vec<gimple *> instead of a
6856 (_slp_oprnd_info::def_stmts): Change from a vec<gimple *>
6857 to a vec<stmt_vec_info>.
6858 (bst_traits::value_type, bst_traits::value_type): Likewise.
6859 (bst_traits::hash): Update accordingly.
6860 (vect_get_and_check_slp_defs): Change the stmts parameter from
6861 a vec<gimple *> to a vec<stmt_vec_info>.
6862 (vect_two_operations_perm_ok_p, vect_build_slp_tree_1): Likewise.
6863 (vect_build_slp_tree): Likewise.
6864 (vect_build_slp_tree_2): Likewise. Update uses of
6865 SLP_TREE_SCALAR_STMTS.
6866 (vect_print_slp_tree): Update uses of SLP_TREE_SCALAR_STMTS.
6867 (vect_mark_slp_stmts, vect_mark_slp_stmts_relevant)
6868 (vect_slp_rearrange_stmts, vect_attempt_slp_rearrange_stmts)
6869 (vect_supported_load_permutation_p, vect_find_last_scalar_stmt_in_slp)
6870 (vect_detect_hybrid_slp_stmts, vect_slp_analyze_node_operations_1)
6871 (vect_slp_analyze_node_operations, vect_slp_analyze_operations)
6872 (vect_bb_slp_scalar_cost, vect_slp_analyze_bb_1)
6873 (vect_get_constant_vectors, vect_get_slp_defs)
6874 (vect_transform_slp_perm_load, vect_schedule_slp_instance)
6875 (vect_remove_slp_scalar_calls, vect_schedule_slp): Likewise.
6876 (vect_analyze_slp_instance): Build up a vec of stmt_vec_infos
6877 instead of gimple stmts.
6878 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Change
6879 the stores parameter for a vec<gimple *> to a vec<stmt_vec_info>.
6880 (vect_slp_analyze_instance_dependence): Update uses of
6881 SLP_TREE_SCALAR_STMTS.
6882 (vect_slp_analyze_and_verify_node_alignment): Likewise.
6883 (vect_slp_analyze_and_verify_instance_alignment): Likewise.
6884 * tree-vect-loop.c (neutral_op_for_slp_reduction): Likewise.
6885 (get_initial_defs_for_reduction): Likewise.
6886 (vect_create_epilog_for_reduction): Likewise.
6887 (vectorize_fold_left_reduction): Likewise.
6888 * tree-vect-stmts.c (vect_prologue_cost_for_slp_op): Likewise.
6889 (vect_model_simple_cost, vectorizable_shift, vectorizable_load)
6890 (can_vectorize_live_stmts): Likewise.
6892 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
6894 * tree-vectorizer.h (_loop_vec_info::reductions): Change from an
6895 auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
6896 (vect_force_simple_reduction): Take and return stmt_vec_infos rather
6898 * tree-parloops.c (valid_reduction_p): Take a stmt_vec_info instead
6900 (gather_scalar_reductions): Update after above interface changes.
6901 * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Likewise.
6902 (vect_is_simple_reduction): Take and return stmt_vec_infos rather
6904 (vect_force_simple_reduction): Likewise.
6905 * tree-vect-patterns.c (vect_pattern_recog_1): Update use of
6906 LOOP_VINFO_REDUCTIONS.
6907 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
6909 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
6911 * tree-vectorizer.h (_stmt_vec_info::reduc_def): Change from
6912 a gimple stmt to a stmt_vec_info.
6913 * tree-vect-loop.c (vect_active_double_reduction_p)
6914 (vect_force_simple_reduction, vectorizable_reduction): Update
6917 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
6919 * tree-vectorizer.h (_slp_tree::vec_stmts): Change from a
6920 vec<gimple *> to a vec<stmt_vec_info>.
6921 * tree-vect-loop.c (vect_create_epilog_for_reduction): Change
6922 the reduction_phis argument from a vec<gimple *> to a
6924 (vectorizable_reduction): Likewise the phis local variable that
6925 is passed to vect_create_epilog_for_reduction. Update for new type
6926 of SLP_TREE_VEC_STMTS.
6927 (vectorizable_induction): Update for new type of SLP_TREE_VEC_STMTS.
6928 (vectorizable_live_operation): Likewise.
6929 * tree-vect-slp.c (vect_get_slp_vect_defs): Likewise.
6930 (vect_transform_slp_perm_load, vect_schedule_slp_instance): Likewise.
6932 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
6934 * tree-vectorizer.h (_stmt_vec_info::vectorized_stmt): Change from
6935 a gimple stmt to a stmt_vec_info.
6936 (vectorizable_condition, vectorizable_live_operation)
6937 (vectorizable_reduction, vectorizable_induction): Pass back the
6938 vectorized statement as a stmt_vec_info.
6939 * tree-vect-data-refs.c (vect_record_grouped_load_vectors): Update
6940 use of STMT_VINFO_VEC_STMT.
6941 * tree-vect-loop.c (vect_create_epilog_for_reduction): Likewise,
6942 accumulating the inner phis that feed the STMT_VINFO_VEC_STMT
6943 as stmt_vec_infos rather than gimple stmts.
6944 (vectorize_fold_left_reduction): Change vec_stmt from a gimple stmt
6946 (vectorizable_live_operation): Likewise.
6947 (vectorizable_reduction, vectorizable_induction): Likewise,
6948 updating use of STMT_VINFO_VEC_STMT.
6949 * tree-vect-stmts.c (vect_get_vec_def_for_operand_1): Update use
6950 of STMT_VINFO_VEC_STMT.
6951 (vect_build_gather_load_calls, vectorizable_bswap, vectorizable_call)
6952 (vectorizable_simd_clone_call, vectorizable_conversion)
6953 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
6954 (vectorizable_store, vectorizable_load, vectorizable_condition)
6955 (vectorizable_comparison, can_vectorize_live_stmts): Change vec_stmt
6956 from a gimple stmt to a stmt_vec_info.
6957 (vect_transform_stmt): Update use of STMT_VINFO_VEC_STMT. Pass a
6958 pointer to a stmt_vec_info to the vectorizable_* routines.
6960 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
6962 * tree-vectorizer.h (_stmt_vec_info::related_stmt): Change from
6963 a gimple stmt to a stmt_vec_info.
6964 (is_pattern_stmt_p): Update accordingly.
6965 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Likewise.
6966 (vect_record_grouped_load_vectors): Likewise.
6967 * tree-vect-loop.c (vect_determine_vf_for_stmt): Likewise.
6968 (vect_fixup_reduc_chain, vect_update_vf_for_slp): Likewise.
6969 (vect_model_reduction_cost): Likewise.
6970 (vect_create_epilog_for_reduction): Likewise.
6971 (vectorizable_reduction, vectorizable_induction): Likewise.
6972 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
6973 Return the stmt_vec_info for the pattern statement.
6974 (vect_set_pattern_stmt): Update use of STMT_VINFO_RELATED_STMT.
6975 (vect_split_statement, vect_mark_pattern_stmts): Likewise.
6976 * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
6977 (vect_detect_hybrid_slp, vect_get_slp_defs): Likewise.
6978 * tree-vect-stmts.c (vect_mark_relevant): Likewise.
6979 (vect_get_vec_def_for_operand_1, vectorizable_call): Likewise.
6980 (vectorizable_simd_clone_call, vect_analyze_stmt, new_stmt_vec_info)
6981 (free_stmt_vec_info, vect_is_simple_use): Likewise.
6983 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
6985 * tree-vectorizer.h (vect_finish_replace_stmt): Return a stmt_vec_info
6986 (vect_finish_stmt_generation): Likewise.
6987 * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
6988 (vect_finish_replace_stmt, vect_finish_stmt_generation): Likewise.
6989 (vect_build_gather_load_calls): Use the return value of the above
6990 functions instead of a separate call to vinfo_for_stmt. Use narrow
6991 scopes for the input gimple stmt and wider scopes for the associated
6992 stmt_vec_info. Use vec_info::lookup_def when setting these
6993 stmt_vec_infos from an SSA_NAME definition.
6994 (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
6995 (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
6996 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
6997 (vectorizable_store, vectorizable_load, vectorizable_condition)
6998 (vectorizable_comparison): Likewise.
6999 * tree-vect-loop.c (vectorize_fold_left_reduction): Likewise.
7000 (vectorizable_reduction): Likewise.
7002 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
7004 * tree-vectorizer.h (vect_is_simple_use): Add an optional
7005 stmt_vec_info * parameter before the optional gimple **.
7006 * tree-vect-stmts.c (vect_is_simple_use): Likewise.
7007 (process_use, vect_get_vec_def_for_operand_1): Update callers.
7008 (vect_get_vec_def_for_operand, vectorizable_shift): Likewise.
7009 * tree-vect-loop.c (vectorizable_reduction): Likewise.
7010 (vectorizable_live_operation): Likewise.
7011 * tree-vect-patterns.c (type_conversion_p): Likewise.
7012 (vect_look_through_possible_promotion): Likewise.
7013 (vect_recog_rotate_pattern): Likewise.
7014 * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
7016 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
7018 * tree-vectorizer.h (stmt_vec_info): Temporarily change from
7019 a typedef to a wrapper class.
7020 (NULL_STMT_VEC_INFO): New macro.
7021 (vec_info::stmt_infos): Change to vec<stmt_vec_info>.
7022 (stmt_vec_info::operator*): New function.
7023 (stmt_vec_info::operator gimple *): Likewise.
7024 (set_vinfo_for_stmt): Use NULL_STMT_VEC_INFO.
7025 (add_stmt_costs): Likewise.
7026 * tree-vect-loop-manip.c (iv_phi_p): Likewise.
7027 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
7028 (vect_get_known_peeling_cost): Likewise.
7029 (vect_estimate_min_profitable_iters): Likewise.
7030 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
7031 * tree-vect-slp.c (vect_remove_slp_scalar_calls): Likewise.
7032 * tree-vect-stmts.c (vect_build_gather_load_calls): Likewise.
7033 (vectorizable_store, free_stmt_vec_infos): Likewise.
7034 (new_stmt_vec_info): Change return type of xcalloc to
7037 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
7039 * tree-vectorizer.h (vec_info::lookup_single_use): Declare.
7040 * tree-vectorizer.c (vec_info::lookup_single_use): New function.
7041 * tree-vect-loop.c (vectorizable_reduction): Use it instead of
7042 a single_imm_use-based sequence.
7043 * tree-vect-stmts.c (supportable_widening_operation): Likewise.
7045 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
7047 * tree-vectorizer.h (vec_info::lookup_def): Declare.
7048 * tree-vectorizer.c (vec_info::lookup_def): New function.
7049 * tree-vect-patterns.c (vect_get_internal_def): Use it.
7050 (vect_widened_op_tree): Likewise.
7051 * tree-vect-stmts.c (vect_is_simple_use): Likewise.
7052 * tree-vect-loop.c (vect_analyze_loop_operations): Likewise.
7053 (vectorizable_reduction): Likewise.
7054 (vect_valid_reduction_input_p): Take a stmt_vec_info instead
7056 (vect_is_slp_reduction): Update calls accordingly. Use
7057 vec_info::lookup_def.
7058 (vect_is_simple_reduction): Likewise
7059 * tree-vect-slp.c (vect_detect_hybrid_slp_1): Use vec_info::lookup_def.
7061 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
7063 * tree-vectorizer.h (vec_info::lookup_stmt): Declare.
7064 * tree-vectorizer.c (vec_info::lookup_stmt): New function.
7065 * tree-vect-loop.c (vect_determine_vf_for_stmt): Use it instead
7067 (vect_determine_vectorization_factor, vect_analyze_scalar_cycles_1)
7068 (vect_compute_single_scalar_iteration_cost, vect_analyze_loop_form)
7069 (vect_update_vf_for_slp, vect_analyze_loop_operations)
7070 (vect_is_slp_reduction, vectorizable_induction)
7071 (vect_transform_loop_stmt, vect_transform_loop): Likewise.
7072 * tree-vect-patterns.c (vect_init_pattern_stmt):
7073 (vect_determine_min_output_precision_1, vect_determine_precisions)
7074 (vect_pattern_recog): Likewise.
7075 * tree-vect-stmts.c (vect_analyze_stmt, vect_transform_stmt): Likewise.
7076 * config/powerpcspe/powerpcspe.c (rs6000_density_test): Likewise.
7077 * config/rs6000/rs6000.c (rs6000_density_test): Likewise.
7078 * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
7079 (vect_detect_hybrid_slp_1, vect_detect_hybrid_slp_2)
7080 (vect_detect_hybrid_slp): Likewise. Change the walk_stmt_info
7081 info field from a loop to a loop_vec_info.
7083 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
7085 * tree-vectorizer.h (stmt_vec_info): Move typedef earlier in file.
7086 (vec_info::add_stmt): Declare.
7087 * tree-vectorizer.c (vec_info::add_stmt): New function.
7088 * tree-vect-data-refs.c (vect_create_data_ref_ptr): Use it.
7089 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Likewise.
7090 (vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
7091 (vectorizable_induction): Likewise.
7092 * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Likewise.
7093 * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
7094 (vectorizable_simd_clone_call, vectorizable_store): Likewise.
7095 (vectorizable_load): Likewise.
7096 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
7097 (vect_recog_bool_pattern, vect_recog_mask_conversion_pattern)
7098 (vect_recog_gather_scatter_pattern): Likewise.
7099 (append_pattern_def_seq): Likewise. Remove a check that is
7100 performed by add_stmt itself.
7102 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
7104 * tree-vect-loop.c (vectorizable_reduction): Fix an instance in
7105 which make_ssa_name was called with new_stmt before new_stmt
7108 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
7110 * tree-vect-loop.c (vect_valid_reduction_input_p): New function,
7112 (vect_is_slp_reduction): ...here...
7113 (vect_is_simple_reduction): ...and here. Remove repetition of tests
7114 that are already known to be false.
7116 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
7118 * tree-vectorizer.h (vect_free_slp_instance): Add a final_p parameter.
7119 * tree-vect-slp.c (vect_free_slp_tree): Likewise. Don't update
7120 STMT_VINFO_NUM_SLP_USES when it's true.
7121 (vect_free_slp_instance): Add a final_p parameter and pass it to
7123 (vect_build_slp_tree_2): Update call to vect_free_slp_instance.
7124 (vect_analyze_slp_instance): Likewise.
7125 (vect_slp_analyze_operations): Likewise.
7126 (vect_slp_analyze_bb_1): Likewise.
7127 * tree-vectorizer.c (vec_info): Likewise.
7128 * tree-vect-loop.c (vect_transform_loop): Likewise.
7130 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
7132 * tree-vect-loop.c (vectorizable_reduction): Assert that the
7133 function is not called for second and subsequent members of
7136 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
7138 * tree-vect-loop.c (get_initial_def_for_reduction): Move special
7139 cases for nested loops from here to ...
7140 (vect_create_epilog_for_reduction): ...here. Only call
7141 vect_is_simple_use for inner-loop reductions.
7143 2018-07-31 Martin Liska <mliska@suse.cz>
7145 PR gcov-profile/85338
7146 PR gcov-profile/85350
7147 PR gcov-profile/85372
7148 * profile.c (struct location_triplet): New.
7149 (struct location_triplet_hash): Likewise.
7150 (output_location): Do not output a BB that
7151 is already recorded for a line.
7152 (branch_prob): Use streamed_locations.
7154 2018-07-31 Martin Liska <mliska@suse.cz>
7156 PR gcov-profile/85370
7157 * coverage.c (coverage_begin_function): Do not mark target
7158 clones as artificial functions.
7160 2018-07-31 Martin Liska <mliska@suse.cz>
7162 PR gcov-profile/83813
7163 PR gcov-profile/84758
7164 PR gcov-profile/85217
7165 PR gcov-profile/85332
7166 * profile.c (branch_prob): Do not record GOTO expressions
7167 for GIMPLE statements which locations are already streamed.
7169 2018-07-31 Olivier Hainque <hainque@adacore.com>
7171 * gcc.c (handle_spec_function): Accept a soft_matched_part
7172 argument, as do_spec_1. Pass it down to ...
7173 (eval_spec_function): Accept a soft_matched_part argument,
7174 and pass it down to ...
7175 (do_spec_2): Accept a soft_matched_part argument, and pass
7176 it down to do_spec_1.
7177 (do_spec_1): Pass soft_matched_part to handle_spec_function.
7178 (handle_braces): Update call to handle_spec_function.
7179 (driver::set_up_specs): Update calls to do_spec_2.
7180 (compare_debug_dump_opt_spec_function): Likewise.
7181 (compare_debug_self_opt_spec_function): Likewise.
7183 2018-07-31 Olivier Hainque <hainque@adacore.com>
7185 * common.opt (nolibc): New option.
7186 * doc/invoke.texi (Link Options): Document it.
7187 * gcc.c (LINK_GCC_C_SEQUENCE_SPEC): Honor nolibc.
7188 * config/alpha/linux.h: Likewise.
7189 * config/arc/elf.h: Likewise.
7190 * config/arm/uclinux-elf.h: Likewise.
7191 * config/arm/unknown-elf.h: Likewise.
7192 * config/avr/avrlibc.h: Likewise.
7193 * config/bfin/bfin.h: Likewise.
7194 * config/bfin/linux.h: Likewise.
7195 * config/bfin/uclinux.h: Likewise.
7196 * config/darwin.h: Likewise.
7197 * config/darwin10.h: Likewise.
7198 * config/darwin12.h: Likewise.
7199 * config/gnu-user.h: Likewise.
7200 * config/lm32/uclinux-elf.h: Likewise.
7201 * config/pa/pa-hpux11.h: Likewise.
7202 * config/pa/pa64-hpux.h: Likewise.
7203 * config/sparc/sparc.h: Likewise.
7205 2018-07-31 Olivier Hainque <hainque@adacore.com>
7207 * gcc.c (getenv_spec_function): Prepend '/' to value for allowed
7208 undefined variables.
7210 2018-07-30 Segher Boessenkool <segher@kernel.crashing.org>
7213 * config/arm/arm.c (arm_block_set_aligned_vect): Use gen_int_mode
7216 2018-07-30 Bernd Edlinger <bernd.edlinger@hotmail.de>
7218 * tree-ssa-forwprop.c (simplify_builtin_call): Don't create a not NUL
7219 terminated string literal.
7221 2018-07-30 Segher Boessenkool <segher@kernel.crashing.org>
7223 PR rtl-optimization/85160
7224 * combine.c (is_just_move): New function.
7225 (try_combine): Allow combining two instructions into two if neither of
7226 the original instructions was a move.
7228 2018-07-30 Alexander Monakov <amonakov@ispras.ru>
7231 * doc/extend.texi (Global Register Variables): Discourage use of type
7233 (Local Register Variables): Likewise.
7235 2018-07-30 Richard Sandiford <richard.sandiford@arm.com>
7237 PR tree-optimization/86506
7238 * hwint.h (ceil_log2): Resync with hwint.c implementation.
7240 2018-07-30 Ilya Leoshkevich <iii@linux.ibm.com>
7243 * lra-constraints.c (spill_hard_reg_in_range): When selecting the
7244 hard_regno, make sure no insn between `from` and `to` clobbers it.
7246 2018-07-30 Cesar Philippidis <cesar@codesourcery.com>
7247 Tom de Vries <tdevries@suse.de>
7249 * config/nvptx/nvptx.c (PTX_GANG_DEFAULT): Rename to ...
7250 (PTX_DEFAULT_RUNTIME_DIM): ... this.
7251 (nvptx_goacc_validate_dims): Set default worker and gang dims to
7252 PTX_DEFAULT_RUNTIME_DIM.
7253 (nvptx_dim_limit): Ignore GOMP_DIM_WORKER.
7255 2018-07-29 John David Anglin <danglin@gcc.gnu.org>
7257 * config/pa/pa.c (pa_output_addr_vec): Align address table.
7258 * config/pa/pa.h (JUMP_TABLES_IN_TEXT_SECTION): Revise comment.
7259 * config/pa/pa32-linux.h (JUMP_TABLES_IN_TEXT_SECTION): Define.
7261 2018-07-27 Michael Meissner <meissner@linux.ibm.com>
7263 * config/rs6000/constraints.md (wG constraint): Delete, no longer
7265 * config/rs6000/predicates.md (p9_fusion_reg_operand): Rename
7266 predicate to reflect toc fusion has been deleted.
7267 (toc_fusion_mem_raw): Delete, no longer used.
7268 (toc_fusion_mem_wrapped): Likewise.
7269 * config/rs6000/rs6000-cpus.def (POWERPC_MASKS): Delete toc
7271 * config/rs6000/rs6000-protos.h (fusion_wrap_memory_address):
7272 Delete, no longer used.
7273 * config/rs6000/rs6000.c (struct rs6000_reg_addr): Delete fields
7274 meant to be used for toc fusion.
7275 (rs6000_debug_print_mode): Delete toc fusion debugging.
7276 (rs6000_debug_reg_global): Likewise.
7277 (rs6000_init_hard_regno_mode_ok): Delete setting up fields for toc
7278 fusion and secondary reload support that were never used.
7279 (rs6000_option_override_internal): Delete TOC fusion, that was only
7280 partially defined, and it did not work unless you also used the
7282 (rs6000_legitimate_address_p): Delete TOC fusion support.
7283 (rs6000_opt_masks): Likewise.
7284 (fusion_wrap_memory_address): Delete function, no longer used.
7285 (fusion_split_address); Delete TOC fusion support.
7286 * config/rs6000/rs6000.h (TARGET_TOC_FUSION_INT): Delete, no
7287 longer used with toc fusion being deleted.
7288 (TARGET_TOC_FUSION_FP): Likewise.
7289 * config/rs6000/rs6000.md (UNSPEC_FUSION_ADDIS): Delete TOC fusion
7291 (toc fusion spliter): Delete TOC fusion support.
7292 (toc_fusionload_<mode>): Likewise.
7293 (toc_fusionload_di): Likewise.
7294 (fusion_gpr_load_<mode>): Delete generator function, this insn no
7295 longer needs to be named. Rename predicate to delete TOC fusion.
7296 (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
7297 (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
7298 (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
7299 (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
7300 (p9 fusion peephole2s): Rename predicate to delete TOC fusion.
7302 2018-07-27 Kelvin Nilsen <kelvin@gcc.gnu.org>
7304 * doc/extend.texi (Basic PowerPC Built-in Functions Available on
7305 ISA 2.05): Replace __uint128_t with __uint128 and __int128_t with
7306 __int128 in built-in function prototypes.
7307 (PowerPC AltiVec Built-in Functions on ISA 2.07): Likewise.
7308 (PowerPC AltiVec Built-in Functions on ISA 3.0): Likewise.
7310 2018-07-27 Martin Sebor <msebor@redhat.com>
7312 PR tree-optimization/86696
7313 * tree-ssa-strlen.c (get_min_string_length): Handle all integer
7314 types, including enums.
7315 (handle_char_store): Be prepared for the above function to fail.
7317 2018-07-26 Qing Zhao <qing.zhao@oracle.com>
7319 * builtins.c (inline_expand_builtin_string_cmp): Disable inlining
7320 when optimization level is lower than 2 or optimize for size.
7322 2018-07-26 Martin Sebor <msebor@redhat.com>
7324 PR tree-optimization/86043
7325 PR tree-optimization/86042
7326 * tree-ssa-strlen.c (handle_builtin_memcpy): Handle strict overlaps.
7327 (get_string_cst_length): Rename...
7328 (get_min_string_length): ...to this. Add argument.
7329 (handle_char_store): Extend to handle multi-character stores by
7331 * tree.c (initializer_zerop): Use new argument. Handle MEM_REF.
7332 * tree.h (initializer_zerop): Add argument.
7334 2018-07-26 Jakub Jelinek <jakub@redhat.com>
7337 * omp-low.c (scan_sharing_clauses): Don't ignore map clauses for
7338 declare target to variables if they have always,{to,from,tofrom} map
7341 2018-07-26 Martin Liska <mliska@suse.cz>
7344 * lto-wrapper.c: Add linker_output as prefix
7345 for ltrans_output_file.
7347 2018-07-26 Segher Boessenkool <segher@kernel.crashing.org>
7349 PR rtl-optimization/85805
7350 * combine.c (reg_nonzero_bits_for_combine): Only use the last set
7351 value for hard registers if that was written in the same mode.
7353 2018-07-26 Martin Liska <mliska@suse.cz>
7355 PR gcov-profile/86536
7356 * gcov.c (format_gcov): Use printf format %.*f directly
7357 and do not handle special values.
7359 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
7361 * common/config/arc/arc-common.c (arc_option_optimization_table):
7362 Update default optimizations for size.
7364 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
7366 * config/arc/arc.md (movsf_insn): Add short instruction selection.
7367 * config/arc/constraints.md (CfZ): New constraint.
7368 * config/arc/fpu.md (addssf3_fpu): Use CfZ constraint.
7369 (subsf3_fpu): Likewise.
7370 (cmpsf_fpu): Likewise.
7371 (cmpsf_fpu_uneq): Likewise.
7373 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
7375 * config/arc/arc.c (compact_memory_operand_p): Check for uncached
7377 (arc_is_uncached_mem_p): uncached applies to both the variable and
7380 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
7382 * config/arc/arc.h (ADDITIONAL_REGISTER_NAMES): Add additional
7385 2018-07-25 David Malcolm <dmalcolm@redhat.com>
7387 * optinfo-emit-json.cc (class optrecord_json_writer): Convert
7388 field "m_scopes" from vec to auto_vec.
7390 2018-07-25 Martin Liska <mliska@suse.cz>
7392 * config/powerpcspe/powerpcspe-protos.h (rs6000_loop_align): Fix
7395 2018-07-25 Richard Biener <rguenther@suse.de>
7398 * dwarf2out.c (dwarf2out_decl): Do not handle nested functions
7399 special wrt context_die late.
7400 (gen_subprogram_die): Re-use DIEs in local scope.
7402 2018-07-25 Richard Sandiford <richard.sandiford@arm.com>
7404 PR tree-optimization/86644
7405 * hwint.c (ceil_log2): Fix comment. Return 0 for 0.
7407 2018-07-25 Martin Liska <mliska@suse.cz>
7410 * dumpfile.c: And excluded values with TDF_ALL_VALUES.
7411 * dumpfile.h (enum dump_flag): Defince TDF_ALL_VALUES.
7413 2018-07-25 Martin Liska <mliska@suse.cz>
7416 * params.def: Explain ASan abbreviation and provide
7417 a documentation link.
7419 2018-07-24 Martin Sebor <msebor@redhat.com>
7421 PR tree-optimization/86622
7422 PR tree-optimization/86532
7423 * builtins.h (string_length): Declare.
7424 * builtins.c (c_strlen): Correct handling of non-constant offsets.
7425 (check_access): Be prepared for non-constant length ranges.
7426 (string_length): Make extern.
7427 * expr.c (string_constant): Only handle the minor non-constant
7428 array index. Use string_constant to compute the length of
7429 a generic string constant.
7431 2018-07-24 Richard Sandiford <richard.sandiford@arm.com>
7433 PR tree-optimization/86618
7434 * tree-vect-stmts.c (vectorizable_call): Don't take the address
7435 of LOOP_VINFO_MASKS (loop_vinfo) when loop_vinfo is null.
7437 2018-07-24 David Malcolm <dmalcolm@redhat.com>
7439 PR tree-optimization/86636
7440 * json.cc (json::object::set): Fix comment. Add assertions.
7441 (json::array::append): Move here from json.h. Add comment and an
7443 (json::string::string): Likewise.
7444 * json.h (json::array::append): Move to json.cc.
7445 (json::string::string): Likewise.
7446 * optinfo-emit-json.cc
7447 (optrecord_json_writer::impl_location_to_json): Assert that we
7448 aren't attempting to write out UNKNOWN_LOCATION, or an ad-hoc
7449 wrapper around it. Expand the location once, rather than three
7451 (optrecord_json_writer::inlining_chain_to_json): Fix the check for
7452 UNKNOWN_LOCATION, to use LOCATION_LOCUS to look through ad-hoc
7454 (optrecord_json_writer::optinfo_to_json): Likewise, in four
7455 places. Fix some overlong lines.
7457 2018-07-24 Matthew Malcomson <matthew.malcomson@arm.com>
7459 * config/aarch64/aarch64-simd.md
7460 (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>): Split into...
7461 (aarch64_<ANY_EXTEND:su>subw<mode>): ... This...
7462 (aarch64_<ANY_EXTEND:su>addw<mode>): ... And this.
7463 (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>_internal): Split into...
7464 (aarch64_<ANY_EXTEND:su>subw<mode>_internal): ... This...
7465 (aarch64_<ANY_EXTEND:su>addw<mode>_internal): ... And this.
7466 (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w2<mode>_internal): Split into...
7467 (aarch64_<ANY_EXTEND:su>subw2<mode>_internal): ... This...
7468 (aarch64_<ANY_EXTEND:su>addw2<mode>_internal): ... And this.
7470 2018-07-24 Jakub Jelinek <jakub@redhat.com>
7473 * expmed.c (expand_divmod): Punt if d == HOST_WIDE_INT_MIN
7474 and size > HOST_BITS_PER_WIDE_INT. For size > HOST_BITS_PER_WIDE_INT
7475 and abs_d == d, do the power of two handling if profitable.
7477 2018-07-24 Richard Biener <rguenther@suse.de>
7479 * match.pd: Add BIT_FIELD_REF canonicalizations.
7481 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
7484 * genmatch.c (dt_operand::gen_match_op): Avoid folding volatile values.
7486 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
7488 * gimple-fold.c (gimple_fold_builtin_printf): Don't create a not NUL
7489 terminated STRING_CST object.
7491 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
7493 hsa-dump.c (dump_hsa_symbol): Avoid out of scope access to buf.
7495 2018-07-23 Segher Boessenkool <segher@kernel.crashing.org>
7497 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Adjust.
7498 * config/rs6000/rs6000-protos.h (rs6000_split_v4si_init): Delete.
7499 * config/rs6000/rs6000.c (rs6000_expand_vector_init): Always force
7500 the elements into a register.
7501 (rs6000_split_v4si_init_di_reg): Delete.
7502 (rs6000_split_v4si_init): Delete.
7503 * config/rs6000/vsx.md (unspec): Delete UNSPEC_VSX_VEC_INIT.
7504 (vsx_init_v4si): Rewrite as a define_expand.
7506 2018-07-23 Segher Boessenkool <segher@kernel.crashing.org>
7508 * config/rs6000/rs6000.md (splitters for rldimi and rlwimi with the
7509 zero_extend argument from memory): New.
7511 2018-07-22 Martin Sebor <msebor@redhat.com>
7514 * gimple-ssa-warn-alloca.c (alloca_call_type_by_arg): Avoid
7515 diagnosing calls with unknown arguments unless -Walloca-larger-than
7516 is restricted to less than PTRDIFF_MAX bytes.
7518 2018-07-22 Gerald Pfeifer <gerald@pfeifer.com>
7520 * doc/gcov.texi (Invoking Gcov): Editorial changes.
7522 2018-07-20 David Malcolm <dmalcolm@redhat.com>
7524 * pretty-print.c (text_info::set_location): Remove redundant
7525 "line_table" parameter from call to rich_location::set_range.
7527 2018-07-20 Martin Sebor <msebor@redhat.com>
7530 * builtins.c (expand_builtin_alloca): Adjust.
7531 * calls.c (alloc_max_size): Simplify.
7532 * cgraphunit.c (cgraph_node::expand): Adjust.
7533 * common.opt (larger_than_size, warn_frame_larger_than): Remove
7535 (frame_larger_than_size): Same.
7536 (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Change options
7537 to take a HOST_WIDE_INT argument and accept a byte-size suffix.
7539 * doc/invoke.texi (GCC Command Options): Document option arguments.
7540 Explain byte-size arguments and suffixes.
7541 (-Wvla-larger-than, -Wno-alloc-size-larger-than): Update.
7542 (-Wno-alloca-larger-than, -Wno-vla-larger-than): Same.
7543 (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Same.
7544 * doc/options.texi (UInteger): Expand.
7545 (Host_Wide_Int, ByteSize): Document new properties.
7546 * final.c (final_start_function_1): Include sizes in an error message.
7547 * function.c (frame_offset_overflow): Same.
7548 * gimple-ssa-warn-alloca.c (pass_walloca::gate): Adjust.
7549 (alloca_call_type_by_arg): Change function argument to HOST_WIDE_INT.
7550 Diagnose unbounded alloca calls only for limits of less than
7552 (alloca_call_type): Adjust. Diagnose possibly out-of-bounds alloca
7553 calls and VLA size only for limits of less than PTRDIFF_MAX. Same
7555 (pass_walloca::execute): Adjust. Diagnose alloca calls in loops
7556 only for limits of less than PTRDIFF_MAX.
7557 * langhooks-def.h (lhd_handle_option): Change function argument
7559 * langhooks.c (lhd_handle_option): Same.
7560 * langhooks.h (handle_option): Same.
7561 * opt-functions.awk (switch_bit_fields): Handle Host_Wide_Int and
7563 (var_type, var_type_struct): Same.
7564 (var_set): Handle ByteSize flag.
7565 * optc-gen.awk: Add comments to output to ease debugging. Make
7566 use of HOST_WIDE_INT where appropriate.
7567 * opts-gen-save.awk: Use %lx to format unsigned long.
7568 * opth-gen.awk: Change function argument to HOST_WIDE_INT.
7569 * opts-common.c (integral_argument): Return HOST_WIDE_INT and add
7570 arguments. Parse bytes-size suffixes.
7571 (enum_arg_to_value): Change function argument to HOST_WIDE_INT.
7572 (enum_value_to_arg): Same.
7573 (decode_cmdline_option): Handle cl_host_wide_int. Adjust.
7574 (handle_option): Adjust.
7575 (generate_option): Change function argument to HOST_WIDE_INT.
7576 (cmdline_handle_error): Adjust.
7577 (read_cmdline_option): Change function argument to HOST_WIDE_INT.
7578 (set_option): Change function argument to HOST_WIDE_INT.
7579 (option_enabled): Handle cl_host_wide_int.
7580 (get_option_state): Handle CLVC_SIZE.
7581 (control_warning_option): Same.
7582 * opts.c (common_handle_option): Change function argument to
7583 HOST_WIDE_INT. Remove handling of OPT_Walloca_larger_than_ and
7584 OPT_Wvla_larger_than_.
7585 * opts.h (enum cl_var_type): Add an enumerator.
7586 * stor-layout.c (layout_decl): Print a more meaningful warning.
7587 * toplev.c (output_stack_usage): Adjust.
7589 2018-07-20 Qing Zhao <qing.zhao@oracle.com>
7591 * builtins.c (expand_builtin_memcmp): Delete the last parameter for
7592 call to inline_expand_builtin_string_cmp.
7593 (expand_builtin_strcmp): Likewise.
7594 (expand_builtin_strncmp): Likewise.
7595 (inline_string_cmp): Delete the last parameter, change char_type_node
7596 to unsigned_char_type_node for strcmp/strncmp, add conversions to the
7598 (inline_expand_builtin_string_cmp): Delete the last parameter, give up
7599 the inlining expansion on target where the type of the call has same or
7600 narrower precision than unsigned char.
7602 2018-07-20 David Malcolm <dmalcolm@redhat.com>
7604 * Makefile.in (OBJS): Add json.o and optinfo-emit-json.o.
7605 (CFLAGS-optinfo-emit-json.o): Define TARGET_NAME.
7606 * common.opt (fsave-optimization-record): New option.
7607 * coretypes.h (struct kv_pair): Move here from dumpfile.c.
7608 * doc/invoke.texi (-fsave-optimization-record): New option.
7609 * dumpfile.c: Include "optinfo-emit-json.h".
7610 (struct kv_pair): Move to coretypes.h.
7611 (optgroup_options): Make non-static.
7612 (dump_context::end_scope): Call
7613 optimization_records_maybe_pop_dump_scope.
7614 * dumpfile.h (optgroup_options): New decl.
7615 * json.cc: New file.
7617 * optinfo-emit-json.cc: New file.
7618 * optinfo-emit-json.h: New file.
7619 * optinfo.cc: Include "optinfo-emit-json.h".
7620 (optinfo::emit): Call optimization_records_maybe_record_optinfo.
7621 (optinfo_enabled_p): Check optimization_records_enabled_p.
7622 (optinfo_wants_inlining_info_p): Likewise.
7623 * optinfo.h: Update comment.
7624 * profile-count.c (profile_quality_as_string): New function.
7625 * profile-count.h (profile_quality_as_string): New decl.
7626 (profile_count::quality): New accessor.
7627 * selftest-run-tests.c (selftest::run_tests): Call json_cc_tests
7628 and optinfo_emit_json_cc_tests.
7629 * selftest.h (selftest::json_cc_tests): New decl.
7630 (selftest::optinfo_emit_json_cc_tests): New decl.
7631 * toplev.c: Include "optinfo-emit-json.h".
7632 (compile_file): Call optimization_records_finish.
7633 (do_compile): Call optimization_records_start.
7634 * tree-ssa-live.c: Include optinfo.h.
7635 (remove_unused_scope_block_p): Retain inlining information if
7636 optinfo_wants_inlining_info_p returns true.
7638 2018-07-20 Richard Biener <rguenther@suse.de>
7641 * dwarf2out.c (dwarf2out_die_ref_for_decl): Test in_lto_p
7642 to cover -flto-partition=none.
7644 2018-07-20 Martin Liska <mliska@suse.cz>
7646 * tree.h (DECL_LOCATION_RANGE): Remove unused macro.
7647 (get_decl_source_range): Remove unused function.
7649 2018-07-20 Richard Biener <rguenther@suse.de>
7651 * tree-ssa-sccvn.h (struct vn_nary_op_s): Add next member.
7652 (struct vn_phi_s): Likewise.
7653 (struct vn_reference_s): Likewise.
7654 * tree-ssa-sccvn.c (vn_nary_op_hasher::equal): Add shortcut
7655 for searching the slot of an entry known to be in the hash itself.
7656 (vn_phi_hasher::equal): Likewise.
7657 (vn_reference_hasher::equal): Likewise.
7658 (last_inserted_ref, last_inserted_phi, last_inserted_nary): New
7660 (optimistic_info, current_info): Remove, keeping only valid_info.
7661 (vn_reference_lookup_1): Remove fallback lookup.
7662 (vn_reference_lookup_2): Likewise.
7663 (vn_nary_op_lookup_1): Likewise.
7664 (vn_phi_lookup): Likewise.
7665 (vn_nary_build_or_lookup_1): Make sure to not chain the built
7667 (vn_reference_insert): Adjust, chain the inserted hash element
7668 at last_inserted_ref.
7669 (vn_reference_insert_pieces): Likewise.
7670 (visit_reference_op_call): Likewise.
7671 (vn_nary_op_insert_into): Chain the inserted hash element at
7673 (vn_nary_op_insert_pieces): Adjust.
7674 (vn_nary_op_insert): Likewise.
7675 (vn_nary_op_insert_stmt): Likewise.
7676 (vn_phi_insert): Adjust, chain the inserted hash element at
7678 (process_scc): Remove clearing and copying the optimistic
7679 table. Instead remove elements inserted during an optimistic
7680 iteration from the single table we maintain.
7681 (init_scc_vn): Adjust.
7682 (free_scc_vn): Likewise.
7683 (sccvn_dom_walker::record_cond): Likewise.
7684 (sccvn_dom_walker::after_dom_children): Likewise.
7686 2018-07-19 Martin Sebor <msebor@redhat.com>
7688 PR tree-optimization/84047
7689 PR tree-optimization/83776
7690 * tree-vrp.c (vrp_prop::check_mem_ref): New function.
7691 (check_array_bounds): Call it.
7693 2018-07-19 Martin Sebor <msebor@redhat.com>
7695 * align.h (align_flags): Use member initialization.
7697 2018-07-19 David Malcolm <dmalcolm@redhat.com>
7699 * Makefile.in (OBJS): Add optinfo.o.
7700 * coretypes.h (class symtab_node): New forward decl.
7701 (struct cgraph_node): New forward decl.
7702 (class varpool_node): New forward decl.
7703 * dump-context.h: New file.
7704 * dumpfile.c: Include "optinfo.h", "dump-context.h", "cgraph.h",
7706 (refresh_dumps_are_enabled): Use optinfo_enabled_p.
7707 (set_dump_file): Call dumpfile_ensure_any_optinfo_are_flushed.
7708 (set_alt_dump_file): Likewise.
7709 (dump_context::~dump_context): New dtor.
7710 (dump_gimple_stmt): Move implementation to...
7711 (dump_context::dump_gimple_stmt): ...this new member function.
7712 Add the stmt to any pending optinfo, creating one if need be.
7713 (dump_gimple_stmt_loc): Move implementation to...
7714 (dump_context::dump_gimple_stmt_loc): ...this new member function.
7715 Start a new optinfo and add the stmt to it.
7716 (dump_gimple_expr): Move implementation to...
7717 (dump_context::dump_gimple_expr): ...this new member function.
7718 Add the stmt to any pending optinfo, creating one if need be.
7719 (dump_gimple_expr_loc): Move implementation to...
7720 (dump_context::dump_gimple_expr_loc): ...this new member function.
7721 Start a new optinfo and add the stmt to it.
7722 (dump_generic_expr): Move implementation to...
7723 (dump_context::dump_generic_expr): ...this new member function.
7724 Add the tree to any pending optinfo, creating one if need be.
7725 (dump_generic_expr_loc): Move implementation to...
7726 (dump_context::dump_generic_expr_loc): ...this new member
7727 function. Add the tree to any pending optinfo, creating one if
7729 (dump_printf): Move implementation to...
7730 (dump_context::dump_printf_va): ...this new member function. Add
7731 the text to any pending optinfo, creating one if need be.
7732 (dump_printf_loc): Move implementation to...
7733 (dump_context::dump_printf_loc_va): ...this new member function.
7734 Start a new optinfo and add the stmt to it.
7735 (dump_dec): Move implementation to...
7736 (dump_context::dump_dec): ...this new member function. Add the
7737 value to any pending optinfo, creating one if need be.
7738 (dump_context::dump_symtab_node): New member function.
7739 (dump_context::get_scope_depth): New member function.
7740 (dump_context::begin_scope): New member function.
7741 (dump_context::end_scope): New member function.
7742 (dump_context::ensure_pending_optinfo): New member function.
7743 (dump_context::begin_next_optinfo): New member function.
7744 (dump_context::end_any_optinfo): New member function.
7745 (dump_context::s_current): New global.
7746 (dump_context::s_default): New global.
7747 (dump_scope_depth): Delete global.
7748 (dumpfile_ensure_any_optinfo_are_flushed): New function.
7749 (dump_symtab_node): New function.
7750 (get_dump_scope_depth): Reimplement in terms of dump_context.
7751 (dump_begin_scope): Likewise.
7752 (dump_end_scope): Likewise.
7753 (selftest::temp_dump_context::temp_dump_context): New ctor.
7754 (selftest::temp_dump_context::~temp_dump_context): New dtor.
7755 (selftest::verify_item): New function.
7756 (ASSERT_IS_TEXT): New macro.
7757 (ASSERT_IS_TREE): New macro.
7758 (ASSERT_IS_GIMPLE): New macro.
7759 (selftest::test_capture_of_dump_calls): New test.
7760 (selftest::dumpfile_c_tests): Call it.
7761 * dumpfile.h (dump_printf, dump_printf_loc, dump_basic_block)
7762 (dump_generic_expr_loc, dump_generic_expr, dump_gimple_stmt_loc)
7763 (dump_gimple_stmt, dump_dec): Gather these related decls and add a
7764 descriptive comment.
7765 (dump_function, print_combine_total_stats, enable_rtl_dump_file)
7766 (dump_node, dump_bb): Move these unrelated decls.
7767 (class dump_manager): Add leading comment.
7768 * optinfo.cc: New file.
7769 * optinfo.h: New file.
7771 2018-07-19 Michael Collison <michael.collison@arm.com>
7772 Richard Henderson <rth@redhat.com>
7774 * config/aarch64/aarch64.md (subv<GPI>4, usubv<GPI>4): New patterns.
7775 (subti): Handle op1 zero.
7776 (subvti4, usub4ti4): New.
7777 (*sub<GPI>3_compare1_imm): New.
7778 (sub<GPI>3_carryinCV): New.
7779 (*sub<GPI>3_carryinCV_z1_z2, *sub<GPI>3_carryinCV_z1): New.
7780 (*sub<GPI>3_carryinCV_z2, *sub<GPI>3_carryinCV): New.
7782 2018-07-19 Michael Collison <michael.collison@arm.com>
7783 Richard Henderson <rth@redhat.com>
7785 * config/aarch64/aarch64.md: (addv<GPI>4, uaddv<GPI>4): New.
7786 (addti3): Create simpler code if low part is already known to be 0.
7787 (addvti4, uaddvti4): New.
7788 (*add<GPI>3_compareC_cconly_imm): New.
7789 (*add<GPI>3_compareC_cconly): New.
7790 (*add<GPI>3_compareC_imm): New.
7791 (*add<GPI>3_compareC): Rename from add<GPI>3_compare1; do not
7792 handle constants within this pattern..
7793 (*add<GPI>3_compareV_cconly_imm): New.
7794 (*add<GPI>3_compareV_cconly): New.
7795 (*add<GPI>3_compareV_imm): New.
7796 (add<GPI>3_compareV): New.
7797 (add<GPI>3_carryinC, add<GPI>3_carryinV): New.
7798 (*add<GPI>3_carryinC_zero, *add<GPI>3_carryinV_zero): New.
7799 (*add<GPI>3_carryinC, *add<GPI>3_carryinV): New.
7800 ((*add<GPI>3_compareC_cconly_imm): Replace 'ne' operator
7801 with 'comparison' operator.
7802 (*add<GPI>3_compareV_cconly_imm): Ditto.
7803 (*add<GPI>3_compareV_cconly): Ditto.
7804 (*add<GPI>3_compareV_imm): Ditto.
7805 (add<GPI>3_compareV): Ditto.
7806 (add<mode>3_carryinC): Ditto.
7807 (*add<mode>3_carryinC_zero): Ditto.
7808 (*add<mode>3_carryinC): Ditto.
7809 (add<mode>3_carryinV): Ditto.
7810 (*add<mode>3_carryinV_zero): Ditto.
7811 (*add<mode>3_carryinV): Ditto.
7813 2018-07-19 Michael Collison <michael.collison@arm.com>
7814 Richard Henderson <rth@redhat.com>
7816 * config/aarch64/aarch64-modes.def (CC_V): New.
7817 * config/aarch64/aarch64-protos.h
7818 (aarch64_addti_scratch_regs): Declare
7819 (aarch64_subvti_scratch_regs): Declare.
7820 (aarch64_expand_subvti): Declare.
7821 (aarch64_gen_unlikely_cbranch): Declare
7822 * config/aarch64/aarch64.c (aarch64_select_cc_mode): Test
7823 for signed overflow using CC_Vmode.
7824 (aarch64_get_condition_code_1): Handle CC_Vmode.
7825 (aarch64_gen_unlikely_cbranch): New function.
7826 (aarch64_addti_scratch_regs): New function.
7827 (aarch64_subvti_scratch_regs): New function.
7828 (aarch64_expand_subvti): New function.
7830 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
7832 * config/aarch64/aarch64-option-extensions.def: New entry for profile
7834 * config/aarch64/aarch64.h (AARCH64_FL_PROFILE): New.
7835 * doc/invoke.texi (aarch64-feature-modifiers): New entry for profile
7838 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
7841 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
7842 address check not strict.
7844 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
7846 * config/aarch64/aarch64-simd.md (aarch64_simd_mov<VQ:mode>): Replace
7848 (store_pair_lanes<mode>): Likewise.
7849 * config/aarch64/aarch64-protos.h (aarch64_addr_query_type): Add new
7850 enum value 'ADDR_QUERY_LDP_STP_N'.
7851 * config/aarch64/aarch64.c (aarch64_addr_query_type): Likewise.
7852 (aarch64_print_address_internal): Add declaration.
7853 (aarch64_print_ldpstp_address): Remove.
7854 (aarch64_classify_address): Adapt mode for 'ADDR_QUERY_LDP_STP_N'.
7855 (aarch64_print_operand): Change printing of 'y'.
7856 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Use
7857 new enum value 'ADDR_QUERY_LDP_STP_N', don't hardcode mode and use
7858 'true' rather than '1'.
7859 * config/aarch64/constraints.md (Uml): Likewise.
7860 (Uml): Rename to Umn.
7863 2018-07-19 Richard Biener <rguenther@suse.de>
7865 * tree-ssa-sccvn.h (struct vn_phi_s): Make phiargs member
7867 * tree-ssa-sccvn.c: Remove alloc-pool.h use.
7868 (vn_phi_hasher): Derive from nofree_ptr_hash and remove remove method.
7869 (vn_reference_hasher): Likewise.
7870 (struct vn_tables_s): Remove obstack and alloc-pool members.
7871 (vn_tables_obstack, vn_tables_insert_obstack): New global obstacks.
7872 (vn_nary_build_or_lookup_1): Manually build in vn_tables_insert_obstack.
7873 (vn_reference_insert): Allocate from obstack instead of from alloc-pool.
7874 (vn_reference_insert_pieces): Likewise.
7875 (alloc_vn_nary_op_noinit): Adjust.
7876 (vn_nary_op_insert_stmt): Allocate phiargs in-place.
7877 (vn_phi_eq): Adjust.
7878 (shared_lookup_phiargs): Remove.
7879 (vn_phi_lookup): Allocate temporary vn_phi_s on the stack.
7880 (vn_phi_insert): Allocate from obstack instead of from alloc-pool.
7881 (visit_reference_op_call): Likewise.
7882 (copy_nary, copy_phi, copy_reference): Remove.
7883 (process_scc): Rewind the obstack when iterating. Do not
7884 copy the elements to valid_info but just move them from one
7885 hashtable to the other.
7886 (allocate_vn_table): Adjust.
7887 (free_vn_table): Likewise.
7888 (init_scc_vn): Likewise.
7889 (free_scc_vn): Likewise.
7891 2018-07-19 H.J. Lu <hongjiu.lu@intel.com>
7894 * config/i386/i386.c (rest_of_insert_endbranch): Lookup
7895 indirect_return as function type attribute.
7896 (ix86_attribute_table): Change indirect_return to function
7898 * doc/extend.texi: Update indirect_return attribute.
7900 2018-07-19 Aldy Hernandez <aldyh@redhat.com>
7902 * wide-int.h (widest2_int): New.
7903 * gimple-fold.c (arith_overflowed_p): Use it.
7904 * tree.h (widest2_int_cst): New.
7905 * tree-vrp.c (wide_int_binop_overflow): Rename from
7906 vrp_int_const_binop.
7907 Rewrite to work on trees.
7908 (extract_range_from_multiplicative_op_1): Abstract code to...
7909 (wide_int_range_min_max): ...here.
7910 (wide_int_range_cross_product): ...and here.
7911 (extract_range_from_binary_expr_1): Abstract overflow code to...
7912 (wide_int_range_mult_wrapping): ...here.
7913 * tree-vrp.h (wide_int_range_cross_product): New.
7914 (wide_int_range_mult_wrapping): New.
7916 2018-07-19 Andrew Senkevich <andrew.senkevich@intel.com>
7917 Julia Koval <julia.koval@intel.com>
7919 * config/i386/x86-tune-costs.h (skylake_memcpy,
7920 skylake_memset): Replace rep_prefix with unrolling for size 512.
7922 2018-07-18 Kugan Vivekanandarajah <kuganv@linaro.org>
7925 * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): Handle
7926 comparision with EQ_EXPR in last stmt.
7928 2018-07-18 Kelvin Nilsen <kelvin@gcc.gnu.org>
7930 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Rename
7931 this subsection to "PowerPC AltiVec/VSX Built-in Functions".
7932 (PowerPC AltiVec/VSX Built-in Functions): New name for subsection
7933 previously known as "PowerPC AltiVec Built-in Functions". Move
7934 some material to new subsubsections "PowerPC AltiVec Built-in
7935 Functions on ISA 2.06" and "PowerPC AltiVec Built-in Functions on
7937 (PowerPC Altivec Built-in Functions on ISA 2.05): New subsubsection.
7938 (PowerPC Altivec Built-in Functions on ISA 2.06): Likewise.
7939 (PowerPC Altivec Built-in Functions on ISA 2.07): Likewise.
7940 (PowerPC Altivec Built-in Functions on ISA 3.0): Likewise.
7942 2018-07-18 Richard Biener <rguenther@suse.de>
7944 PR tree-optimization/86557
7945 * tree-vect-patterns.c (vect_recog_divmod_pattern): Also handle
7948 2018-07-18 Ilya Leoshkevich <iii@linux.ibm.com>
7950 * config/s390/s390.c (s390_function_profiler): Generate CFI.
7952 2018-07-17 Jeff Law <law@redhat.com>
7954 * config/arm/arm.c (get_label_padding): Update for recent
7955 changes to label_to_alignment.
7957 PR tree-optimization/86010
7958 * tree-ssa-dse.c (compute_trims): Fix typo/thinko.
7960 * config/mips/mips.c (vr4130_align_insns): Update for recent
7961 changes to label_to_alignment.
7963 * config/frv/frv.c (frv_label_align): Update for recent changes
7964 to label_to_alignment.
7966 * config/nios2/nios2.c (nios2_label_align): Update for recent
7967 changes which dropped ALIGN_LABELS_LOG.
7969 2018-07-17 Andreas Schwab <schwab@linux-m68k.org>
7971 * config/m68k/m68k.md (umulsi3_highpart+1, const_umulsi3_highpart)
7972 (smulsi3_highpart+1, const_smulsi3_highpart): Add CC_STATUS_INIT.
7974 2018-07-17 Claudiu Zissulescu <claziss@synopsys.com>
7976 * config/arc/arc.c (arc_label_align): Use align_labels instead of
7977 deprecated align_labels_log.
7979 2018-07-17 Richard Biener <rguenther@suse.de>
7982 * dwarf2out.c (init_sections_and_labels): Always generate
7983 a debug_line_str_section for early LTO debug.
7984 (dwarf2out_finish): Reset debug_line_str_hash output early.
7985 Bump counter for extra dwarf5 .debug_loc labels to not conflict
7987 (dwarf2out_early_finish): Output debug_line_str.
7989 2018-07-17 Robin Dapp <rdapp@linux.ibm.com>
7991 * config/s390/s390.c (preferred_la_operand_p): Do not use LA with
7992 index register on z196 or later.
7994 2018-07-17 Robin Dapp <rdapp@linux.ibm.com>
7996 * config/s390/s390.c (s390_default_align): Set default function
7998 (s390_override_options_after_change): Call s390_default align.
7999 (s390_option_override_internal): Call s390_default_align.
8000 (TARGET_OVERRIDE_OPTIONS_AFTER_CHANGE): Define.
8002 2018-07-17 Jakub Jelinek <jakub@redhat.com>
8005 * omp-low.c (create_task_copyfn): Copy over also fields corresponding
8006 to _looptemp_ clauses, other than the first two.
8008 2018-07-17 Martin Liska <mliska@suse.cz>
8010 * opts.c: Do not enable OPT_falign_* for -Os.
8012 2018-07-17 Martin Liska <mliska@suse.cz>
8014 * align.h (MAX_CODE_ALIGN): New.
8015 (MAX_CODE_ALIGN_VALUE): New.
8016 * common/config/i386/i386-common.c (ix86_handle_option):
8017 (MAX_CODE_ALIGN): Moved to align.h.
8018 * final.c (MAX_CODE_ALIGN): Likewise.
8019 * opts.c (parse_and_check_align_values):
8020 (MAX_CODE_ALIGN): Likewise.
8021 (MAX_CODE_ALIGN_VALUE): Likewise.
8023 2018-07-17 Martin Liska <mliska@suse.cz>
8025 * config/i386/att.h (ASM_OUTPUT_ALIGN): Fix spacing
8026 in order to fulfil coding style.
8027 * config/i386/cygming.h (ASM_OUTPUT_ALIGN): Likewise.
8028 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
8029 * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
8030 * config/iq2000/iq2000.h (ASM_OUTPUT_ALIGN): Likewise.
8031 * config/pa/pa.h (ASM_OUTPUT_ALIGN): Likewise.
8032 * config/sparc/sol2.h (ASM_OUTPUT_ALIGN_WITH_NOP): Likewise.
8033 * config/sparc/sparc.h (ASM_OUTPUT_ALIGN): Likewise.
8034 * config/visium/visium.h (ASM_OUTPUT_ALIGN): Likewise.
8035 (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
8037 2018-07-17 Martin Liska <mliska@suse.cz>
8039 * align.h: New file.
8040 * config/alpha/alpha.c (alpha_align_insns_1): Use align_functions
8042 * config/i386/i386.c (ix86_avoid_jump_mispredicts): Use new return type
8043 align_flags of label_to_alignment.
8044 * config/m32r/m32r.h (LOOP_ALIGN): Wrap returned values into
8046 * config/m68k/m68k.c: Do not use removed align_labels_value and
8048 * config/nds32/nds32.h (JUMP_ALIGN): Wrap result into align_flags class.
8049 (LOOP_ALIGN): Likewise.
8050 (LABEL_ALIGN): Likewise.
8051 * config/powerpcspe/powerpcspe.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
8052 Remove not used macro.
8053 (rs6000_loop_align): Change return type to align_flags.
8054 (rs6000_loop_align_max_skip): Remove.
8055 * config/rs6000/rs6000-protos.h (rs6000_loop_align):
8056 Change return type to align_flags.
8057 * config/rs6000/rs6000.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
8058 Remove not used macro.
8059 (rs6000_loop_align): Change return type to align_flags.
8060 (rs6000_loop_align_max_skip): Remove.
8061 * config/rx/rx.h (JUMP_ALIGN): Wrap integer values
8062 * config/rx/rx-protos.h (rx_align_for_label): Make it
8064 * config/rx/rx.c (rx_align_for_label): Change return type
8066 (rx_max_skip_for_label): Remove TARGET_ASM_*_ALIGN_MAX_SKIP
8068 into align_flags class.
8069 (LABEL_ALIGN): Likewise.
8070 (LOOP_ALIGN): Likewise.
8071 * config/s390/s390.c (s390_label_align): Use align_flags
8073 (s390_asm_output_function_label): Likewise.
8074 * config/sh/sh.c (sh_override_options_after_change):
8075 Use align_flags class directly without macros.
8076 (find_barrier): Likewise.
8077 (barrier_align): Likewise.
8078 (sh_loop_align): Likewise.
8079 * config/spu/spu.c (spu_option_override):
8080 Use align_flags_tuple::get_value instead of removed macros.
8081 (spu_sched_init): Likewise.
8082 * config/spu/spu.h (GTY): Likewise.
8083 * config/visium/visium.c (visium_option_override):
8084 Set "8" as default secondary alignment.
8085 * config/visium/visium.h (SUBALIGN_LOG): Define to 3
8086 in order to guarantee secondary alignment of 8.
8087 * coretypes.h: Include align.h header file.
8088 * doc/tm.texi: Remove TARGET_ASM_JUMP_ALIGN_MAX_SKIP,
8089 TARGET_ASM_LOOP_ALIGN_MAX_SKIP, TARGET_ASM_LABEL_ALIGN_MAX_SKIP
8090 and TARGET_ASM_LABEL_ALIGN_AFTER_BARRIER_MAX_SKIP macros.
8091 * doc/tm.texi.in: Likewise.
8092 * final.c (struct label_alignment): Remove not used structure.
8093 (LABEL_ALIGN): Change type to align_flags.
8094 (LOOP_ALIGN): Likewise.
8095 (JUMP_ALIGN): Likewise.
8096 (default_loop_align_max_skip): Remove.
8097 (default_label_align_max_skip): Likewise.
8098 (default_jump_align_max_skip): Likewise.
8099 (default_label_align_after_barrier_max_skip):
8100 (LABEL_TO_ALIGNMENT): Change to access label_align vector.
8101 (LABEL_TO_MAX_SKIP): Remove.
8102 (label_to_alignment): Return align_flags type instead of integer.
8103 (label_to_max_skip): Remove.
8104 (align_fuzz): Use align_flags type.
8105 (compute_alignments): Use align_flags type and use align_flags::max
8106 to combine multiple alignments.
8107 (grow_label_align): Grow vec instead of C array.
8108 (update_alignments): Assign just LABEL_TO_ALIGNMENT.
8109 (shorten_branches): Use align_flags type and use align_flags::max
8110 to combine multiple alignments.
8111 (final_scan_insn_1): Remove usage of secondary alignment that comes
8112 from label alignment, but instead use proper secondary alignment
8113 which is computed in grow_label_align.
8114 * flags.h (struct align_flags_tuple): Move to align.h.
8115 (struct align_flags): Likewise.
8116 (state_align_loops): Rename to align_loops.
8117 (state_align_jumps): Rename to align_jumps.
8118 (state_align_labels): Rename to align_labels.
8119 (state_align_functions): Rename to align_functions.
8120 (align_loops_log): Remove.
8121 (align_jumps_log): Remove.
8122 (align_labels_log): Remove.
8123 (align_functions_log): Remove.
8124 (align_loops_max_skip): Remove.
8125 (align_jumps_max_skip): Remove.
8126 (align_labels_max_skip): Remove.
8127 (align_functions_max_skip): Remove.
8128 (align_loops_value): Remove.
8129 (align_jumps_value): Remove.
8130 (align_labels_value): Remove.
8131 (align_functions_value): Remove.
8132 * output.h (label_to_alignment): Change return type to align_flags.
8133 (label_to_max_skip): Remove.
8134 * target.def: Remove loop_align_max_skip, label_align_max_skip,
8135 jump_align_max_skip macros.
8136 * targhooks.h (default_loop_align_max_skip): Remove.
8137 (default_label_align_max_skip): Likewise.
8138 (default_jump_align_max_skip): Likewise.
8139 (default_label_align_after_barrier_max_skip): Remove.
8140 * toplev.c (read_log_maxskip): Use ::normalize function.
8141 (parse_N_M): Remove not used argument and also call ::normalize.
8142 (parse_alignment_opts): Do not pass unused arguments.
8143 * varasm.c (assemble_start_function): Use directly align_functions
8144 instead of removed macros.
8145 * system.h: Do not poison removed macros.
8147 2018-07-17 Jakub Jelinek <jakub@redhat.com>
8150 * gimplify.c (gimplify_omp_for): Ensure taskloop firstprivatized init
8151 and cond temporaries don't have reference type if iterator has
8152 pointer type. For init use &for_pre_body instead of pre_p if
8153 for_pre_body is non-empty.
8155 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
8157 * config/rs6000/rs6000.md (trunc<mode>sf2): Expand truncates of
8158 double-double modes to SFmode directly directly.
8159 (trunc<mode>sf2_fprs): Delete.
8161 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
8163 * config/rs6000/rs6000.c (init_float128_ibm): Use the correct names
8164 for conversions between IFmode and the decimal floating point modes.
8165 (init_float128_ieee): Use the correct names for conversions between
8166 KFmode and the decimal floating point modes.
8168 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
8170 * config/rs6000/rs6000.c (init_float128_ibm): Use more correct names
8171 for the conversions between TDmode and IFmode.
8172 (init_float128_ieee): Use more correct names for the conversions
8173 between TDmode and KFmode.
8175 2018-07-16 Jakub Jelinek <jakub@redhat.com>
8177 PR tree-optimization/86526
8178 * builtins.c (expand_builtin_memcmp): Formatting fixes.
8179 (inline_expand_builtin_string_cmp): Likewise.
8180 (inline_string_cmp): Likewise. Use c_readstr instead of
8181 builtin_memcpy_read_str. Add unit_mode temporary.
8183 2018-07-16 Bernd Edlinger <bernd.edlinger@hotmail.de>
8186 * builtins.c (check_access): Bail out if range[0] is no INTEGER_CST.
8187 * expr.c (string_constant): Fix the element size of ARRAY_TYPE.
8189 2018-07-16 Kelvin Nilsen <kelvin@gcc.gnu.org>
8191 * doc/extend.texi (PowerPC AltiVec Built-in Functions):
8192 Alphabetize prototypes of built-in functions, separating out
8193 built-in functions that are listed in this section but should be
8194 described elsewhere.
8196 2018-07-16 Uros Bizjak <ubizjak@gmail.com>
8199 * expmed.c (emit_store_flag): Do not emit setcc followed by a
8200 conditional move when trapping comparison was split to a
8201 non-trapping one (and vice versa).
8203 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
8205 * config/s390/s390.c (s390_function_profiler): Generate nops
8206 instead of profiler call sequences.
8207 * config/s390/s390.opt: Add the new option.
8209 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
8211 * config/s390/s390.c (s390_function_profiler): Generate
8212 __mcount_loc section.
8213 * config/s390/s390.opt: Add the new option.
8215 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
8217 * common.opt: Add the new warning.
8218 * config/s390/s390.c (s390_function_profiler): Emit "brasl
8219 %r0,__fentry__" when -mfentry is specified.
8220 (s390_option_override_internal): Disallow -mfentry for 31-bit
8222 * config/s390/s390.opt: Add the new option.
8224 2018-07-16 Richard Biener <rguenther@suse.de>
8227 * dwarf2out.c (dwarf2out_register_external_die): Assign DIE parents
8228 for function-local FUNCTION_DECL and RESULT_DECL immediately.
8230 2018-07-16 Martin Liska <mliska@suse.cz>
8233 * ipa-pure-const.c (malloc_candidate_p): Revert ::get
8236 2017-07-16 Claudiu Zissulescu <claziss@synopsys.com>
8238 * config/arc/arcHS.md: Update ARCHS scheduling rules.
8240 2017-07-16 Claudiu Zissulescu <claziss@synopsys.com>
8242 * config/arc/arc-arch.h (arc_tune_attr): Add new tune parameters
8244 * config/arc/arc-cpus.def (hs4x): New cpu.
8246 * config/arc/arc-tables.opt: Regenerate.
8247 * config/arc/arc.c (arc_sched_issue_rate): New function.
8248 (TARGET_SCHED_ISSUE_RATE): Define.
8249 (TARGET_SCHED_EXPOSED_PIPELINE): Likewise.
8250 * config/arc/arc.md (attr type): Add fpu_fuse, fpu_sdiv, fpu_ddiv,
8252 (attr tune): Add ARCHS4x tune values.
8253 (attr tune_dspmpy): Define.
8254 (*tst): Correct instruction type.
8255 * config/arc/arcHS.md: Don't use this automaton for ARCHS4x cpus.
8256 * config/arc/arcHS4x.md: New file.
8257 * config/arc/fpu.md: Update instruction type attributes.
8258 * config/arc/t-multilib: Regenerate.
8260 2018-07-16 Tom de Vries <tdevries@suse.de>
8263 * var-tracking.c (vt_initialize): Fix pre_dec handling.
8265 2018-07-16 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
8267 * config/aarch64/atomics.md (aarch64_store_execlusive<mode>): Add
8270 2018-07-16 Eric Botcazou <ebotcazou@adacore.com>
8272 PR tree-optimization/86514
8273 * tree-ssa-reassoc.c (init_range_entry) <CASE_CONVERT>: Return for a
8274 conversion to a boolean type from a type with greater precision.
8276 2018-07-16 Tom de Vries <tdevries@suse.de>
8278 * var-tracking.c (vt_initialize): Print adjusted insn slim if
8279 dump_flags request TDF_SLIM.
8281 2018-07-16 Aldy Hernandez <aldyh@redhat.com>
8283 * fold-const.c (int_const_binop_1): Abstract...
8284 (wide_int_binop): ...wide int code here.
8285 (poly_int_binop): ...poly int code here.
8286 Abstract the rest of int_const_binop_1 into int_const_binop.
8287 * fold-const.h (wide_int_binop): New.
8288 * tree-vrp.c (vrp_int_const_binop): Call wide_int_binop.
8289 Remove useless PLUS/MINUS_EXPR case.
8290 (zero_nonzero_bits_from_vr): Move wide int code...
8291 (zero_nonzero_bits_from_bounds): ...here.
8292 (extract_range_from_binary_expr_1): Move mask optimization code...
8293 (range_easy_mask_min_max): ...here.
8294 * tree-vrp.h (zero_nonzero_bits_from_bounds): New.
8295 (range_easy_mask_min_max): New.
8297 2018-07-15 Jeff Law <law@redhat.com>
8300 * config/sh/sh.c (output_mi_thunk): Remove dead conditional
8303 2018-07-14 Jim Wilson <jimw@sifive.com>
8305 * config/riscv/linux.h (TARGET_ASM_FILE_END): New.
8307 2018-07-14 Paul Koning <ni1d@arrl.net>
8309 * config/pdp11/pdp11.c (pdp11_rtx_costs): Bugfixes.
8311 2018-07-13 Jan Hubicka <hubicka@ucw.cz>
8313 * lto-streamer-out.c (copy_function_or_variable): Dump info about
8316 2018-07-13 Bill Schmidt <wschmidt@linux.ibm.com>
8317 Steve Munroe <munroesj52@gmail.com>
8319 * config/rs6000/emmintrin.h (_mm_and_si128): New function.
8320 (_mm_andnot_si128): Likewise.
8321 (_mm_or_si128): Likewise.
8322 (_mm_xor_si128): Likewise.
8324 2018-07-13 Qing Zhao <qing.zhao@oracle.com>
8327 * builtins.c (expand_builtin_memcmp): Inline the calls first
8328 when result_eq is false.
8329 (expand_builtin_strcmp): Inline the calls first.
8330 (expand_builtin_strncmp): Likewise.
8331 (inline_string_cmp): New routine. Expand a string compare
8332 call by using a sequence of char comparison.
8333 (inline_expand_builtin_string_cmp): New routine. Inline expansion
8334 a call to str(n)cmp/memcmp.
8335 * doc/invoke.texi (--param builtin-string-cmp-inline-length):
8337 * params.def (BUILTIN_STRING_CMP_INLINE_LENGTH): New.
8339 2018-07-13 Richard Earnshaw <rearnsha@arm.com>
8341 * config/arm/driver-arm.c: Include arm-native.h.
8342 (host_detect_local_cpu): Use auto-generated data tables.
8343 (vendors, arm_cpu_table): Delete. Move part information to ...
8344 * config/arm/arm-cpus.in: ... here.
8345 * config/arm/parsecpu.awk (gen_native): New function.
8346 (vendor, part): New CPU fields.
8347 (END): Add support for building the native CPU detection tables.
8348 * config/arm/t-arm (arm-native.h): Add build rule.
8349 (driver-arm.o): Add dependency on arm-native.h.
8351 2018-07-13 Richard Biener <rguenther@suse.de>
8354 * match.pd (addr1 - addr2): Allow either of the operand to
8357 2018-07-13 Tom de Vries <tdevries@suse.de>
8359 * tree-inline.c (remap_ssa_name): Save and reuse debug exprs generated
8362 2018-07-13 Jackson Woodruff <jackson.woodruff@arm.com>
8364 * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp): Use
8365 arrays instead of numbered variables.
8367 2018-07-13 Eric Botcazou <ebotcazou@adacore.com>
8369 * config/sparc/sparc-protos.h (sparc_compute_frame_size): Delete.
8370 * config/sparc/sparc.c (sparc_compute_frame_size): Make static.
8372 2018-07-13 Richard Biener <rguenther@suse.de>
8375 * dwarf2out.c (gen_type_die_with_usage): Use scope_die_for
8376 instead of get_context_die.
8378 2018-07-13 Kugan Vivekanandarajah <kuganv@linaro.org>
8379 Richard Biener <rguenther@suse.de>
8382 * tree-ssa-loop-niter.c (number_of_iterations_popcount): Check
8383 that the loop latch destination where phi is defined.
8385 2018-07-12 Kito Cheng <kito.cheng@gmail.com>
8387 * config/riscv/riscv.c (enum riscv_privilege_levels): Add UNKNOWN_MODE.
8388 (riscv_expand_epilogue): Add assertion to check interrupt mode.
8389 (riscv_set_current_function): Extract getting interrupt type to new
8391 (riscv_get_interrupt_type): New function.
8392 (riscv_merge_decl_attributes): New function, checking interrupt type is
8394 (TARGET_MERGE_DECL_ATTRIBUTES): Define.
8396 2018-07-12 Paul Koning <ni1d@arrl.net>
8398 * config/pdp11/pdp11.c (pdp11_output_def): Fix typo in .set
8401 2018-07-12 Paul Koning <ni1d@arrl.net>
8403 * doc/rtl.texi (REG_NONNEG): Remove decrement and branch until
8404 zero reference, add doloop_end instead.
8405 * doc/md.texi (decrement_and_branch_until_zero): Remove.
8406 (Looping patterns): Remove decrement_and_branch_until_zero. Add
8407 detail for doloop_end.
8409 2018-07-12 Martin Sebor <msebor@redhat.com>
8412 * attribs.c (decl_attributes): Reject conflicting attributes before
8413 calling attribute handlers.
8415 2018-07-12 Jan Hubicka <hubicka@ucw.cz>
8417 * dumpfile.c (gcc::dump_manager::get_dump_file_name): Add PART
8419 (gcc::dump_manager::get_dump_file_name): likewise.
8420 (dump_begin): Likewise.
8421 * dumpfile.h (dump_begin): Update prototype.
8422 (gcc::dump_manager::get_dump_file_name,
8423 gcc::dump_manager::get_dump_file_name): Update prototype.
8425 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
8427 * internal-fn.h (vectorizable_internal_fn_p): New function.
8428 * tree-vect-slp.c (compatible_calls_p): Likewise.
8429 (vect_build_slp_tree_1): Remove nops argument. Handle calls
8430 to internal functions.
8431 (vect_build_slp_tree_2): Update call to vect_build_slp_tree_1.
8433 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
8435 * fold-const.h (inverse_conditions_p): Declare.
8436 * fold-const.c (inverse_conditions_p): New function.
8437 * match.pd: Use inverse_conditions_p. Add folds of view_converts
8438 that test the inverse condition of a conditional internal function.
8439 * internal-fn.h (vectorized_internal_fn_supported_p): Declare.
8440 * internal-fn.c (internal_fn_mask_index): Handle conditional
8442 (vectorized_internal_fn_supported_p): New function.
8443 * tree-if-conv.c: Include internal-fn.h and fold-const.h.
8444 (any_pred_load_store): Replace with...
8445 (need_to_predicate): ...this new variable.
8446 (redundant_ssa_names): New variable.
8447 (ifcvt_can_use_mask_load_store): Move initial checks to...
8448 (ifcvt_can_predicate): ...this new function. Handle tree codes
8449 for which a conditional internal function exists.
8450 (if_convertible_gimple_assign_stmt_p): Use ifcvt_can_predicate
8451 instead of ifcvt_can_use_mask_load_store. Update after variable
8453 (predicate_load_or_store): New function, split out from
8454 predicate_mem_writes.
8455 (check_redundant_cond_expr): New function.
8456 (value_available_p): Likewise.
8457 (predicate_rhs_code): Likewise.
8458 (predicate_mem_writes): Rename to...
8459 (predicate_statements): ...this. Use predicate_load_or_store
8460 and predicate_rhs_code.
8461 (combine_blocks, tree_if_conversion): Update after above name changes.
8462 (ifcvt_local_dce): Handle redundant_ssa_names.
8463 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): Handle
8464 general conditional functions.
8465 * tree-vect-stmts.c (vectorizable_call): Likewise.
8467 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
8468 Alan Hayward <alan.hayward@arm.com>
8469 David Sherwood <david.sherwood@arm.com>
8471 * internal-fn.h (can_interpret_as_conditional_op_p): Declare.
8472 * internal-fn.c (can_interpret_as_conditional_op_p): New function.
8473 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Handle conditional
8474 plus and minus and convert them into IFN_COND_FMA-based sequences.
8475 (convert_mult_to_fma): Handle conditional plus and minus.
8477 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
8479 * doc/md.texi (cond_fma, cond_fms, cond_fnma, cond_fnms): Document.
8480 * optabs.def (cond_fma_optab, cond_fms_optab, cond_fnma_optab)
8481 (cond_fnms_optab): New optabs.
8482 * internal-fn.def (COND_FMA, COND_FMS, COND_FNMA, COND_FNMS): New
8484 (FMA): Use DEF_INTERNAL_FLT_FN rather than DEF_INTERNAL_FLT_FLOATN_FN.
8485 * internal-fn.h (get_conditional_internal_fn): Declare.
8486 (get_unconditional_internal_fn): Likewise.
8487 * internal-fn.c (cond_ternary_direct): New macro.
8488 (expand_cond_ternary_optab_fn): Likewise.
8489 (direct_cond_ternary_optab_supported_p): Likewise.
8490 (FOR_EACH_COND_FN_PAIR): Likewise.
8491 (get_conditional_internal_fn): New function.
8492 (get_unconditional_internal_fn): Likewise.
8493 * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 5.
8494 (gimple_match_op::gimple_match_op): Add a new overload for 5
8496 (gimple_match_op::set_op): Likewise.
8497 (gimple_resimplify5): Declare.
8498 * genmatch.c (decision_tree::gen): Generate simplifications for
8500 * gimple-match-head.c (gimple_simplify): Define an overload for
8501 5 operands. Handle calls with 5 arguments in the top-level overload.
8502 (convert_conditional_op): Handle conversions from unconditional
8503 internal functions to conditional ones.
8504 (gimple_resimplify5): New function.
8505 (build_call_internal): Pass a fifth operand.
8506 (maybe_push_res_to_seq): Likewise.
8507 (try_conditional_simplification): Try converting conditional
8508 internal functions to unconditional internal functions.
8509 Handle 3-operand unconditional forms.
8510 * match.pd (UNCOND_TERNARY, COND_TERNARY): Operator lists.
8511 Define ternary equivalents of the current rules for binary conditional
8513 * config/aarch64/aarch64.c (aarch64_preferred_else_value): Handle
8515 * config/aarch64/iterators.md (UNSPEC_COND_FMLA, UNSPEC_COND_FMLS)
8516 (UNSPEC_COND_FNMLA, UNSPEC_COND_FNMLS): New unspecs.
8517 (optab): Handle them.
8518 (SVE_COND_FP_TERNARY): New int iterator.
8519 (sve_fmla_op, sve_fmad_op): New int attributes.
8520 * config/aarch64/aarch64-sve.md (cond_<optab><mode>)
8521 (*cond_<optab><mode>_2, *cond_<optab><mode_4)
8522 (*cond_<optab><mode>_any): New SVE_COND_FP_TERNARY patterns.
8524 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
8526 * target.def (preferred_else_value): New target hook.
8527 * doc/tm.texi.in (TARGET_PREFERRED_ELSE_VALUE): New hook.
8528 * doc/tm.texi: Regenerate.
8529 * targhooks.h (default_preferred_else_value): Declare.
8530 * targhooks.c (default_preferred_else_value): New function.
8531 * internal-fn.h (conditional_internal_fn_code): Declare.
8532 * internal-fn.c (FOR_EACH_CODE_MAPPING): New macro.
8533 (get_conditional_internal_fn): Use it.
8534 (conditional_internal_fn_code): New function.
8535 * gimple-match.h (gimple_match_cond): New struct.
8536 (gimple_match_op): Add a cond member function.
8537 (gimple_match_op::gimple_match_op): Update all forms to take a
8539 * genmatch.c (expr::gen_transform): Use the same condition as res_op
8540 for the suboperation, but don't specify a particular else_value.
8541 * tree-ssa-sccvn.c (vn_nary_simplify, vn_reference_lookup_3)
8542 (visit_nary_op, visit_reference_op_load): Pass
8543 gimple_match_cond::UNCOND to the gimple_match_op constructor.
8544 * gimple-match-head.c: Include tree-eh.h
8545 (convert_conditional_op): New function.
8546 (maybe_resimplify_conditional_op): Likewise.
8547 (gimple_resimplify1): Call maybe_resimplify_conditional_op.
8548 (gimple_resimplify2): Likewise.
8549 (gimple_resimplify3): Likewise.
8550 (gimple_resimplify4): Likewise.
8551 (maybe_push_res_to_seq): Return null for conditional operations.
8552 (try_conditional_simplification): New function.
8553 (gimple_simplify): Call it. Pass conditions to the gimple_match_op
8555 * match.pd: Fold VEC_COND_EXPRs of an IFN_COND_* call to a new
8557 * config/aarch64/aarch64.c (aarch64_preferred_else_value): New
8559 (TARGET_PREFERRED_ELSE_VALUE): Redefine.
8561 2018-07-12 Jan Hubicka <hubicka@ucw.cz>
8563 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
8565 (hash_tree): Do not hash DECL_FCONTEXT
8566 * tree-streamer-in.c (lto_input_ts_field_decl_tree_pointers):
8567 Do not stream DECL_FCONTEXT.
8568 * tree-streamer-out.c (write_ts_field_decl_tree_pointers): Likewise.
8569 * tree.c (free_lang_data_in_decl): Free DECL_FCONTEXT.
8571 2018-07-12 Richard Biener <rguenther@suse.de>
8574 * dwarf2out.c (gen_block_die): Only output blocks when they have
8575 at least one !DECL_IGNORED_P variable.
8577 2018-07-12 Richard Biener <rguenther@suse.de>
8580 * config/gnu-user.h (GNU_USER_TARGET_NO_PTHREADS_LIB_SPEC):
8581 Remove -mieee-fp handling.
8583 2018-07-12 Richard Biener <rguenther@suse.de>
8585 * tree-ssa-sccvn.c (vn_lookup_simplify_result): Remove bogus
8586 left-over from last patch.
8588 2018-07-12 Jakub Jelinek <jakub@redhat.com>
8590 PR tree-optimization/86492
8591 * gimple-ssa-store-merging.c
8592 (imm_store_chain_info::coalesce_immediate_stores): Call
8593 check_no_overlap even for the merge_overlapping case. Formatting fix.
8595 2018-07-12 Richard Biener <rguenther@suse.de>
8598 * fold-const.c (fold_binary_op_with_conditional_arg): Do not
8599 move possibly trapping operations into the conditional.
8601 2018-07-12 Richard Biener <rguenther@suse.de>
8603 * tree-ssa-sccvn.c (mprts_hook_cnt): Remove.
8604 (vn_lookup_simplify_result): Remove recursion limit applied
8606 (vn_nary_build_or_lookup_1): Adjust.
8607 (try_to_simplify): Likewise.
8608 * gimple-match-head.c (gimple_resimplify1): Instead apply one
8610 (gimple_resimplify2): Likewise.
8611 (gimple_resimplify3): Likewise.
8612 (gimple_resimplify4): Likewise.
8614 2018-07-11 Jakub Jelinek <jakub@redhat.com>
8616 * config/i386/avx512bitalgintrin.h (_mm512_mask_bitshuffle_epi64_mask):
8617 Use __mmask64 type instead of __mmask8 for __M argument.
8618 * config/i386/avx512fintrin.h (_mm512_mask_xor_epi64,
8619 _mm512_maskz_xor_epi64): Use __mmask8 type instead of __mmask16 for
8621 (_mm512_mask_cmpneq_epi64_mask): Use __mmask8 type instead of
8622 __mmask16 for __M argument.
8623 (_mm512_maskz_insertf32x4, _mm512_maskz_inserti32x4,
8624 _mm512_mask_insertf32x4, _mm512_mask_inserti32x4): Cast last argument
8625 to __mmask16 instead of __mmask8.
8626 * config/i386/avx512vlintrin.h (_mm_mask_add_ps, _mm_maskz_add_ps,
8627 _mm256_mask_add_ps, _mm256_maskz_add_ps, _mm_mask_sub_ps,
8628 _mm_maskz_sub_ps, _mm256_mask_sub_ps, _mm256_maskz_sub_ps,
8629 _mm256_maskz_cvtepi32_ps, _mm_maskz_cvtepi32_ps): Use __mmask8 type
8630 instead of __mmask16 for __U argument.
8631 * config/i386/avx512vlbwintrin.h (_mm_mask_cmp_epi8_mask): Use
8632 __mmask16 instead of __mmask8 for __U argument.
8633 (_mm256_mask_cmp_epi8_mask): Use __mmask32 instead of __mmask16 for
8635 (_mm256_cmp_epi8_mask): Use __mmask32 return type instead of
8637 (_mm_mask_cmp_epu8_mask): Use __mmask16 instead of __mmask8 for __U
8639 (_mm256_mask_cmp_epu8_mask): Use __mmask32 instead of __mmask16 for
8641 (_mm256_cmp_epu8_mask): Use __mmask32 return type instead of
8643 (_mm_mask_cmp_epi16_mask): Cast last argument to __mmask8 instead
8645 (_mm256_mask_cvtepi8_epi16): Use __mmask16 instead of __mmask32 for
8647 (_mm_mask_cvtepi8_epi16): Use __mmask8 instead of __mmask32 for
8649 (_mm256_mask_cvtepu8_epi16): Use __mmask16 instead of __mmask32 for
8651 (_mm_mask_cvtepu8_epi16): Use __mmask8 instead of __mmask32 for
8653 (_mm256_mask_cmpneq_epu8_mask, _mm256_mask_cmplt_epu8_mask,
8654 _mm256_mask_cmpge_epu8_mask, _mm256_mask_cmple_epu8_mask): Change
8655 return type as well as __M argument type and all casts from __mmask8
8657 (_mm256_mask_cmpneq_epu16_mask, _mm256_mask_cmplt_epu16_mask,
8658 _mm256_mask_cmpge_epu16_mask, _mm256_mask_cmple_epu16_mask): Change
8659 return type as well as __M argument type and all casts from __mmask8
8661 (_mm256_mask_cmpneq_epi8_mask, _mm256_mask_cmplt_epi8_mask,
8662 _mm256_mask_cmpge_epi8_mask, _mm256_mask_cmple_epi8_mask): Change
8663 return type as well as __M argument type and all casts from __mmask8
8665 (_mm256_mask_cmpneq_epi16_mask, _mm256_mask_cmplt_epi16_mask,
8666 _mm256_mask_cmpge_epi16_mask, _mm256_mask_cmple_epi16_mask): Change
8667 return type as well as __M argument type and all casts from __mmask8
8669 * config/i386/avx512vbmi2vlintrin.h (_mm_mask_shrdi_epi32,
8670 _mm_mask_shldi_epi32): Cast last argument to __mmask8 instead of
8673 2018-07-11 Grazvydas Ignotas <notasas@gmail.com>
8675 * config/i386/avx512bwintrin.h: (_mm512_mask_cmp_epi8_mask,
8676 _mm512_mask_cmp_epu8_mask): Use __mmask64 type instead of __mmask32
8679 2018-07-11 Paul Koning <ni1d@arrl.net>
8681 * doc/md.texi (define_subst): Document how multiple occurrences of
8682 the same argument in the replacement pattern are handled.
8684 2018-07-11 Paul Koning <ni1d@arrl.net>
8686 * doc/extend.texi (Common Variable Attributes): Move "mode" into
8688 (Common Type Attributes): Add "mode" attribute.
8690 2018-07-11 Jan Hubicka <hubicka@ucw.cz>
8692 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not
8693 stream DECL_ORIGINAL_TYPE.
8694 (DFS::DFS_write_tree_body): Drop hack handling local external decls.
8695 (hash_tree): Do not walk DECL_ORIGINAL_TYPE.
8696 * tree-streamer-in.c (lto_input_ts_decl_non_common_tree_pointers):
8697 Do not walk original type.
8698 * tree-streamer-out.c (streamer_write_chain): Drop hack handling
8700 (write_ts_decl_non_common_tree_pointers): Do not stream
8702 * tree.c (free_lang_data_in_decl): Clear DECL_ORIGINAL_TYPE.
8703 (find_decls_types_r): Do not walk DEC_ORIGINAL_TYPE.
8705 2018-07-11 Aldy Hernandez <aldyh@redhat.com>
8707 * tree-ssa-threadupdate.c (thread_through_all_blocks): Do not jump
8708 thread twice from the same starting edge.
8710 2018-07-11 Aldy Hernandez <aldyh@redhat.com>
8712 * vr-values.c (gimple_stmt_nonzero_p): Abstract common code to...
8713 * gimple.c (gimple_call_nonnull_result_p): ...here...
8714 (gimple_call_nonnull_arg): ...and here.
8715 * gimple.h (gimple_call_nonnull_result_p): New.
8716 (gimple_call_nonnull_arg): New.
8718 2018-07-11 Richard Earnshaw <rearnsha@arm.com>
8720 * config/arm/arm-cpus.in: Move information from fpu field of each
8721 cpu definition to the isa field.
8722 * config/arm/parsecpu.awk (fpu): Delete match rule.
8723 (gen_comm_data): Don't add bits from the CPU's FPU entry.
8725 2018-07-11 Richard Biener <rguenther@suse.de>
8728 * dwarf2out.c (init_sections_and_labels): Use
8729 output_asm_line_debug_info consistently.
8730 (dwarf2out_early_finish): Likewise.
8731 (dwarf2out_finish): Remove DW_AT_stmt_list from early generated
8734 2018-07-11 Richard Biener <rguenther@suse.de>
8736 * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1):
8737 Rework father_bb setting in a way to avoid propagating constants
8738 multiple times on a loop body.
8740 2018-07-10 Mark Wielaard <mark@klomp.org>
8743 * dwarf2out.c (output_macinfo_op): Fix dwarf_FORM typo in gcc_assert.
8745 2018-07-10 Richard Biener <rguenther@suse.de>
8747 * hash-map.h (hash_map::iterator::operator*): Return
8748 references to key and value.
8750 2018-07-10 Jakub Jelinek <jakub@redhat.com>
8753 * gimplify.c (find_combined_omp_for): Add DATA argument, in addition
8754 to finding the inner OMP_FOR/OMP_SIMD stmt find non-trivial wrappers,
8755 BLOCKs with BLOCK_VARs, OMP_PARALLEL in between, OMP_FOR in between.
8756 (gimplify_omp_for): For composite loops, move outer
8757 OMP_{DISTRIBUTE,TASKLOOP,FOR,PARALLEL} right around innermost
8758 OMP_FOR/OMP_SIMD if there are any non-trivial wrappers. For class
8759 iterators add any needed clauses. Allow OMP_FOR_ORIG_DECLS to contain
8760 TREE_LIST for both the original class iterator and the "last" helper
8761 var. Gimplify OMP_FOR_PRE_BODY before the outermost composite
8762 loop, remember has_decl_expr from outer composite loops for the
8763 innermost OMP_SIMD in TREE_PRIVATE bit on OMP_FOR_INIT.
8765 2018-07-09 Martin Sebor <msebor@redhat.com>
8769 * builtins.c (c_strlen): Avoid out-of-bounds warnings when
8770 accessing implicitly initialized array elements.
8771 * expr.c (string_constant): Handle string initializers of
8772 character arrays within aggregates.
8773 * gimple-fold.c (fold_array_ctor_reference): Add argument.
8774 Store element offset. As a special case, handle zero size.
8775 (fold_nonarray_ctor_reference): Same.
8776 (fold_ctor_reference): Add argument. Store subobject offset.
8777 * gimple-fold.h (fold_ctor_reference): Add argument.
8779 2018-07-09 Paul Koning <ni1d@arrl.net>
8781 * config/pdp11/pdp11.c (pdp11_addr_cost): New function.
8782 (pdp11_insn_cost): New function.
8783 (pdp11_md_asm_adjust): New function.
8784 (TARGET_INVALID_WITHIN_DOLOOP): Define.
8785 (pdp11_rtx_costs): Update to match machine better.
8786 (output_addr_const_pdp11): Correct format mismatch warnings.
8787 * config/pdp11/pdp11.h (SLOW_BYTE_ACCESS): Correct definition.
8788 * config/pdp11/pdp11.md: General change to add base_cost and/or
8789 length attributes for use by new pdp11_insn_cost function.
8790 (MIN_BRANCH): Correct definition.
8792 (doloop_end): Use standard pattern name for looping pattern.
8793 (doloop_end_nocc): New.
8794 (movsf): Add another constraint alternative.
8795 (zero_extendqihi2): Add constraint alternatives for not in place
8797 (zero_extendhisi2): Remove.
8798 (shift patterns): Add CC handling variants.
8802 (define_peephole2): New peephole to recognize mov that sets CC for
8805 2018-07-09 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
8807 * config/sparc/sparc.c (sparc_fold_builtin) <SPARC_BUILTIN_PDIST,
8808 SPARC_BUILTIN_PDISTN>: Adapt for signature change of wi::neg,
8811 2018-07-09 Jakub Jelinek <jakub@redhat.com>
8814 * real.c (real_nextafter): Return true if result is denormal.
8816 2018-07-09 Martin Liska <mliska@suse.cz>
8818 * common.opt: Add back wrongly removed attribute.
8820 2018-07-09 Richard Biener <rguenther@suse.de>
8823 * dwarf2out.c (gen_block_die): For an early generated DIE
8824 always output high/low PC attributes.
8826 2018-07-09 Tom de Vries <tdevries@suse.de>
8828 * cfgexpand.c (expand_debug_source_expr): Handle VAR_DECL.
8829 * tree-inline.c (remap_ssa_name): Handle default def ssa_name mapping
8830 onto VAR_DECL with abstract origin.
8832 2018-07-07 Jim Wilson <jimw@sifive.com>
8834 * config/riscv/riscv.c (TARGET_CUSTOM_FUNCTION_DESCRIPTORS): New.
8836 2018-07-07 Tom de Vries <tdevries@suse.de>
8838 * tree-dfa.c (dump_enumerated_decls): Handle cfun->cfg == NULL.
8840 2018-07-07 Aldy Hernandez <aldyh@redhat.com>
8842 * tree-vrp.c (vrp_int_const_binop): Change overflow type to
8844 (combine_bound): Use wide-int overflow calculation instead of
8846 * calls.c (maybe_warn_alloc_args_overflow): Change overflow type to
8848 * fold-const.c (int_const_binop_2): Same.
8849 (extract_muldiv_1): Same.
8850 (fold_div_compare): Same.
8851 (fold_abs_const): Same.
8853 * poly-int.h (add): Same.
8857 * predict.c (predict_iv_comparison): Same.
8858 * profile-count.c (slow_safe_scale_64bit): Same.
8859 * simplify-rtx.c (simplify_const_binary_operation): Same.
8860 * tree-chrec.c (tree_fold_binomial): Same.
8861 * tree-data-ref.c (split_constant_offset_1): Same.
8862 * tree-if-conv.c (idx_within_array_bound): Same.
8863 * tree-scalar-evolution.c (iv_can_overflow_p): Same.
8864 * tree-ssa-phiopt.c (minmax_replacement): Same.
8865 * tree-vect-loop.c (is_nonwrapping_integer_induction): Same.
8866 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Same.
8867 * vr-values.c (vr_values::adjust_range_with_scev): Same.
8868 * wide-int.cc (wi::add_large): Same.
8869 (wi::mul_internal): Same.
8870 (wi::sub_large): Same.
8871 (wi::divmod_internal): Same.
8872 * wide-int.h: Change overflow type to overflow_type for neg, add,
8873 mul, smul, umul, div_trunc, div_floor, div_ceil, div_round,
8874 mod_trunc, mod_ceil, mod_round, add_large, sub_large,
8875 mul_internal, divmod_internal.
8876 (overflow_type): New enum.
8877 (accumulate_overflow): New.
8879 2018-07-06 Kugan Vivekanandarajah <kugan.vivekanandarajah@linaro.org>
8881 * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): New.
8882 (tree_ssa_phiopt_worker): Call cond_removal_in_popcount_pattern.
8884 2018-07-06 Kugan Vivekanandarajah <kuganv@linaro.org>
8886 * tree-ssa-loop-niter.c (number_of_iterations_popcount): If popcount
8887 argument is checked for zero before entering loop, avoid checking again.
8889 2018-07-06 Kugan Vivekanandarajah <kuganv@linaro.org>
8891 * gimplify.h (generic_expr_could_trap_p): Set as global function.
8892 * gimplify.h (generic_expr_could_trap_p): Likwise.
8893 * tree-scalar-evolution.c (expression_expensive_p): Handle COND_EXPR.
8895 2018-07-06 Jakub Jelinek <jakub@redhat.com>
8897 PR tree-optimization/86401
8898 * fold-const.c (fold_binary_loc) <case BIT_AND_EXPR>: Move the
8899 ((A & N) + B) & M -> (A + B) & M etc. optimization into ...
8900 (fold_bit_and_mask): ... here. New helper function for match.pd.
8901 * fold-const.h (fold_bit_and_mask): Declare.
8902 * match.pd (((A & N) + B) & M -> (A + B) & M): New optimization.
8904 2018-07-06 Peter Bergner <bergner@linux.ibm.com>
8907 * target.def (translate_mode_attribute): New hook.
8908 * targhooks.h (default_translate_mode_attribute): Declare.
8909 * targhooks.c (default_translate_mode_attribute): New function.
8910 * doc/tm.texi.in (TARGET_TRANSLATE_MODE_ATTRIBUTE): New hook.
8911 * doc/tm.texi: Regenerate.
8912 * config/rs6000/rs6000.c (TARGET_TRANSLATE_MODE_ATTRIBUTE): Define.
8913 (rs6000_translate_mode_attribute): New function.
8915 2018-07-06 Paul Koning <ni1d@arrl.net>
8917 * doc/md.texi (define_split): Document DONE and FAIL.
8918 (define_peephole2): Ditto.
8920 2018-07-05 Jeff Law <law@redhat.com>
8922 PR tree-optimization/86010
8923 * tree-ssa-dse.c (compute_trims): More aggressively trim at
8924 both the head and tail of mem* and str* calls.
8926 2018-07-05 Jim Wilson <jimw@sifive.com>
8928 * config.gcc (riscv*-*-*): When setting xlen, handle riscv-*.
8930 2018-07-05 Indu Bhagat <indu.bhagat@oracle.com>
8932 * config/aarch64/aarch64-simd.md: correct flags text for
8933 MIN_EXPR replacement.
8935 2018-07-05 James Clarke <jrtc27@jrtc27.com>
8937 * configure: Regenerated.
8939 2018-07-05 Carl Love <cel@us.ibm.com>
8941 * config/rs6000/rs6000-c.c: Map ALTIVEC_BUILTIN_VEC_UNPACKH for
8942 float argument to VSX_BUILTIN_DOUBLEH_V4SF.
8943 Map ALTIVEC_BUILTIN_VEC_UNPACKL for float argument to
8944 VSX_BUILTIN_DOUBLEL_V4SF.
8946 2018-07-05 Martin Sebor <msebor@redhat.com>
8949 * tree-ssa-strlen.c (maybe_set_strlen_range): Use type size rather
8950 than its domain to compute its the upper bound of a char array.
8952 2018-07-05 Nathan Sidwell <nathan@acm.org>
8954 Replace NO_IMPLICIT_EXTERN_C with SYSTEM_IMPLICIT_EXTERN_C.
8955 * doc/cpp.texi: Update comment.
8956 * doc/tm.texi: Rebuilt.
8957 * doc/tm.texi.in (NO_IMPLICIT_EXTERN_C): Replace with ...
8958 (SYSTEM_IMPLICIT_EXTERN_C): ... this, opposite sense.
8959 * doc/extend.texi (Backwards Compatibility): Clarify it is system
8960 headers affected by extern "C".
8961 * system.h: Poison NO_IMPLICIT_EXTERN_C.
8962 * config/alpha/alpha.h, config/arm/uclinux-elf.h,
8963 config/bfin/elf.h, config/cris/cris.h, config/darwin.h,
8964 config/dragonfly.h, config/freebsd.h, config/gnu-user.h,
8965 config/i386/cygming.h, config/i386/djgpp.h, config/i386/nto.h,
8966 config/ia64/hpux.h, config/lm32/lm32.h, config/lm32/uclinux-elf.h,
8967 config/lynx.h, config/mips/elf.h, config/mmix/mmix.h,
8968 config/netbsd.h, config/pa/pa-hpux.h, config/powerpcspe/sysv4.h,
8969 config/riscv/elf.h, config/rs6000/sysv4.h, config/rtems.h,
8970 config/s390/tpf.h, config/sh/newlib.h, config/sol2.h,
8971 config/sparc/openbsd64.h, config/sparc/sp-elf.h,
8972 config/sparc/sp64-elf.h, config/spu/spu.h,
8973 config/stormy16/stormy16.h, config/v850/v850.h,
8974 config/visium/visium.h, config/vx-common.h, config/xtensa/elf.h: Don't
8975 define NO_IMPLICIT_EXTERN_C.
8976 * config/rs6000/aix.h: Set SYSTEM_IMPLICIT_EXTERN_C.
8978 2018-07-05 Tamar Christina <tamar.christina@arm.com>
8981 * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
8982 instead of GET_MODE_SIZE when comparing Units.
8984 2018-07-05 Tamar Christina <tamar.christina@arm.com>
8987 * rtlanal.c (set_noop_p): Constrain on mode change,
8988 include hard-reg-set.h
8990 2018-07-05 Tamar Christina <tamar.christina@arm.com>
8992 * config/aarch64/aarch64.c (aarch64_expand_movmem): Fix mode size.
8994 2018-07-05 Jakub Jelinek <jakub@redhat.com>
8997 2018-07-04 Maxim Ostapenko <m.ostapenko@samsung.com>
9000 * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
9002 * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
9004 2018-07-04 Maxim Ostapenko <m.ostapenko@samsung.com>
9007 * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
9009 * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
9011 2018-07-04 Eric Botcazou <ebotcazou@adacore.com>
9014 * expmed.c (choose_multiplier): Fix incorrect comparison with mask.
9016 2018-07-04 Aldy Hernandez <aldyh@redhat.com>
9018 * tree-vrp.c (extract_range_from_binary_expr_1): Initialize
9019 neg_*_op* variables.
9021 2018-07-04 Martin Liska <mliska@suse.cz>
9023 * tree-switch-conversion.c: Define
9024 max_ratio_for_speed and max_ratio_for_size constants.
9026 2018-07-04 Denys Vlasenko <dvlasenk@redhat.com>
9027 Martin Liska <mliska@suse.cz>
9032 * common.opt: Rename align options with 'str_' prefix.
9033 * common/config/i386/i386-common.c (set_malign_value): New
9035 (ix86_handle_option): Use it to set -falign-* options/
9036 * config/aarch64/aarch64-protos.h (struct tune_params): Change
9037 type from int to string.
9038 * config/aarch64/aarch64.c: Update default values from int
9040 * config/alpha/alpha.c (alpha_override_options_after_change):
9042 * config/arm/arm.c (arm_override_options_after_change_1): Likewise.
9043 * config/i386/dragonfly.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
9044 max skip conditionally.
9045 * config/i386/freebsd.h (SUBALIGN_LOG): New.
9046 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
9047 max skip conditionally.
9048 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
9049 max skip conditionally.
9050 * config/i386/gnu-user.h (SUBALIGN_LOG): New.
9051 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
9052 max skip conditionally.
9053 * config/i386/i386.c (struct ptt): Change type from int to
9055 (ix86_default_align): Set default values.
9056 * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Print
9057 max skip conditionally.
9058 * config/i386/iamcu.h (SUBALIGN_LOG): New.
9059 (ASM_OUTPUT_MAX_SKIP_ALIGN):
9060 * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN):
9061 * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
9062 max skip conditionally.
9063 * config/i386/openbsdelf.h (SUBALIGN_LOG): New.
9064 (ASM_OUTPUT_MAX_SKIP_ALIGN) Print max skip conditionally.:
9065 * config/i386/x86-64.h (SUBALIGN_LOG): New.
9066 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
9067 max skip conditionally.
9068 (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
9069 * config/ia64/ia64.c (ia64_option_override): Set default values
9070 for alignment options.
9071 * config/m68k/m68k.c: Handle new str_align_* options.
9072 * config/mips/mips.c (mips_set_compression_mode): Change
9074 (mips_option_override): Set default values for options.
9075 * config/powerpcspe/powerpcspe.c (rs6000_option_override_internal):
9077 * config/rs6000/rs6000.c (rs6000_option_override_internal):
9079 * config/rx/rx.c (rx_option_override): Likewise.
9080 * config/rx/rx.h (JUMP_ALIGN): Use align_jumps_log.
9081 (LABEL_ALIGN): Use align_labels_log.
9082 (LOOP_ALIGN): Use align_loops_align.
9083 * config/s390/s390.c (s390_asm_output_function_label): Use new
9085 * config/sh/sh.c (sh_override_options_after_change):
9086 Change type of constants.
9087 * config/spu/spu.c (spu_sched_init): Likewise.
9088 * config/sparc/sparc.c (sparc_option_override): Set default
9090 * config/visium/visium.c (visium_option_override): Likewise.
9091 * config/visium/visium.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Do not
9092 emit p2align format with last argument if it's not needed.
9093 * doc/invoke.texi: Document extended format of -falign-*.
9094 * final.c: Use align_labels alignment.
9095 * flags.h (struct target_flag_state): Change type to use
9097 (struct align_flags_tuple): New.
9098 (struct align_flags): Likewise.
9099 (align_loops_log): Redefine macro to use new types.
9100 (align_loops_max_skip): Redefine macro to use new types.
9101 (align_jumps_log): Redefine macro to use new types.
9102 (align_jumps_max_skip): Redefine macro to use new types.
9103 (align_labels_log): Redefine macro to use new types.
9104 (align_labels_max_skip): Redefine macro to use new types.
9105 (align_functions_log): Redefine macro to use new types.
9106 (align_loops): Redefine macro to use new types.
9107 (align_jumps): Redefine macro to use new types.
9108 (align_labels): Redefine macro to use new types.
9109 (align_functions): Redefine macro to use new types.
9110 (align_functions_max_skip): Redefine macro to use new types.
9111 (align_loops_value): New macro.
9112 (align_jumps_value): New macro.
9113 (align_labels_value): New macro.
9114 (align_functions_value): New macro.
9115 * function.c (invoke_set_current_function_hook): Propagate
9116 alignment values from flags to global variables default in
9118 * ipa-icf.c (sem_function::equals_wpa): Use
9119 cl_optimization_option_eq instead of memcmp.
9120 * lto-streamer.h (cl_optimization_stream_out): Support streaming
9122 (cl_optimization_stream_in): Likewise.
9123 * optc-save-gen.awk: Support strings in cl_optimization.
9124 * opth-gen.awk: Likewise.
9125 * opts.c (finish_options): Remove error checking of invalid
9127 (MAX_CODE_ALIGN): Remove.
9128 (MAX_CODE_ALIGN_VALUE): Likewise.
9129 (parse_and_check_align_values): New function.
9130 (check_alignment_argument): Likewise.
9131 (common_handle_option): Use check_alignment_argument.
9132 * opts.h (parse_and_check_align_values): Declare.
9133 * toplev.c (init_alignments): Remove.
9134 (read_log_maxskip): New.
9135 (parse_N_M): Likewise.
9136 (parse_alignment_opts): Likewise.
9137 (backend_init_target): Remove usage of init_alignments.
9138 * toplev.h (parse_alignment_opts): Declare.
9139 * tree-streamer-in.c (streamer_read_tree_bitfields): Add new
9141 * tree-streamer-out.c (streamer_write_tree_bitfields): Likewise.
9142 * tree.c (cl_option_hasher::equal): New.
9143 * varasm.c: Use new global macros.
9145 2018-07-04 Denys Vlasenko <dvlasenk@redhat.com>
9147 * config/i386/dragonfly.h: (ASM_OUTPUT_MAX_SKIP_ALIGN):
9148 Use a simpler align directive also if MAXSKIP = ALIGN-1.
9149 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
9150 * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
9151 * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
9152 * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
9153 * config/i386/freebsd.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Remove "If N
9154 is large, do at least 8 byte alignment" code. Add SUBALIGN_LOG
9155 define. Use a simpler align directive also if MAXSKIP = ALIGN-1.
9156 * config/i386/gnu-user.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
9157 * config/i386/iamcu.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
9158 * config/i386/openbsdelf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
9159 * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
9161 2018-07-04 Martin Liska <mliska@suse.cz>
9162 Jonathan Wakely <jwakely@redhat.com>
9164 * coverage.c: Use correct type.
9165 * doc/invoke.texi: Language correction.
9167 2018-07-03 H.J. Lu <hongjiu.lu@intel.com>
9170 * config/i386/i386.c (rest_of_insert_endbranch): Also generate
9171 ENDBRANCH for non-tail call which may return via indirect branch.
9172 * doc/extend.texi: Document indirect_return attribute.
9174 2018-07-03 Martin Sebor <msebor@redhat.com>
9176 PR tree-optimization/86274
9177 * gimple-ssa-sprintf.c (fmtresult::type_max_digits): Verify
9179 (format_floating): Correct handling of infinities and NaNs.
9181 2018-07-03 Martin Sebor <msebor@redhat.com>
9183 * print-tree.c (print_real_cst): New function.
9184 (print_node_brief): Call it.
9185 (print_node): Ditto.
9187 2018-07-03 Jeff Law <law@redhat.com>
9189 * config/h8300/h8300.md (logical<mode>3_sn, logical<mode>3): Merge
9190 into a single pattern.
9192 * config/h8300/h8300.md (ors code_iterator): New.
9193 (bsetqi_msx, bnotqi_msx patterns and splitters): Consolidate into
9194 a single pattern and single splitter.
9195 (bsethi_msx, bnothi_msx patterns): Consolidate into a single pattern.
9196 (iorqi3_1, xorqi3_1): Likewise.
9197 (iorqi3, xorqi3 expanders): Similarly.
9199 * config/h8300/h8300.md (movmd_internal_normal): Consolidated with
9200 (movmd_internal) into a single pattern using the P mode iterator.
9201 (movmd splitters): Similarly.
9202 (stpcpy_internal_normal, stpcpy_internal): Similarly for thes patterns.
9203 (movsd splitters): Similarly.
9205 * config/h8300/h8300.c (h8300_insn_length_from_table): Consolidate
9206 ADDB, ADDW and ADDL into a single ADD attribute which selects the
9207 right table based on the size of the operand.
9208 * config/h8300/h8300.md (length_table): Corresponding changes. All
9209 references to "addb", "addw" and "addl" changed to "add".
9210 (btst patterns): Merge two variants into a single pattern.
9211 (tstqi, tsthi): Likewise.
9212 (addhi3_incdec, addsi3_incdec): Likewise.
9213 (subhi3_h8300hs, subsi3_h8300hs): Likewise.
9214 (mulhi3, mulsi3): Likewise.
9215 (udivhi3, udivsi3): Likewise.
9216 (divhi3, divsi3): Likewise.
9217 (andorqi3, andorhi3, andorsi3): Likewise.
9219 2018-07-03 Uros Bizjak <ubizjak@gmail.com>
9222 * config/i386/sse.md (uavg<mode>3_ceil): New expander.
9223 (<sse2_avx2>_uavg<mode>3<mask_name>): Simplify expander.
9225 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
9227 PR tree-optimization/85694
9228 * config/aarch64/iterators.md (HADD, RHADD): New int iterators.
9229 (u): Handle UNSPEC_SHADD, UNSPEC_UHADD, UNSPEC_SRHADD and
9231 * config/aarch64/aarch64-simd.md (<u>avg<mode>3_floor)
9232 (<u>avg<mode>3_ceil): New patterns.
9234 2018-07-03 David Malcolm <dmalcolm@redhat.com>
9236 * gcc.dg/vect/slp-perm-1.c: Remove "note: " prefix from
9237 scan-tree-dump directive.
9238 * gcc.dg/vect/slp-perm-2.c: Likewise.
9239 * gcc.dg/vect/slp-perm-3.c: Likewise.
9240 * gcc.dg/vect/slp-perm-5.c: Likewise.
9241 * gcc.dg/vect/slp-perm-6.c: Likewise.
9242 * gcc.dg/vect/slp-perm-7.c: Likewise.
9243 * gcc.dg/vect/slp-perm-8.c: Likewise.
9245 2018-07-03 Marek Polacek <polacek@redhat.com>
9248 * gimple-fold.c (size_must_be_zero_p): Check the type of the size.
9250 2018-07-03 Richard Biener <rguenther@suse.de>
9253 * tree-ssa-structalias.c (find_func_clobbers): Properly
9254 handle indirect calls.
9256 2018-07-03 Jeff Law <law@redhat.com>
9258 * config/h8300/h8300.md (HSI, QHSI, QHSIF): New mode iterators.
9259 (shifts): New code iterator.
9260 (movqi, movhi, movsi, movsf expanders): Consolidate into a single
9261 expander. Fix HImode handling on H8/SX.
9262 (addqi3, addhi3, addsi3 expanders): Consolidate into a single expander.
9263 (subqi3, subhi3, subsi3 expanders): Likewise.
9264 (andqi3, andhi3, andsi3 expanders): Likewise.
9265 (iorqi3, iorhi3, iorsi3 expanders): Likewise.
9266 (xorqi3, xorhi3, xorsi3 expanders): Likewise.
9267 (negqi2, neghi2, negsi2, negsf2 expanders): Likewise.
9268 (one_cmplqi2, one_cmplhi2, one_cmplsi2): Likewise.
9269 (zero_extendqihi2, zero_extendqisi2): Likewise.
9270 (extendqihi2, extendqisi2): Likewise.
9271 (rotlqi3, rotlhi3, rotlsi3): Likewise.
9272 (neghi2_h8300, negsi2_h8300): Likewise for these patterns.
9273 (rotlqi3_1, rotlhi3_1): Likewise.
9274 (logicalhi3_sn, logicalsi3_sn): Likewise.
9275 (logicalhi3, logicalsi3): Likewise.
9277 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
9279 * tree-vect-patterns.c (vect_recog_rotate_pattern)
9280 (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
9281 (vect_recog_mixed_size_cond_pattern, adjust_bool_pattern_cast)
9282 (adjust_bool_pattern, vect_recog_bool_pattern): Pass the vector
9283 type to append_pattern_def_seq instead of creating a stmt_vec_info
9285 (build_mask_conversion): Likewise. Remove vinfo argument.
9286 (vect_add_conversion_to_patterm): Likewise, renaming to...
9287 (vect_add_conversion_to_pattern): ...this.
9288 (vect_recog_mask_conversion_pattern): Update call to
9289 build_mask_conversion. Pass the vector type to
9290 append_pattern_def_seq here too.
9291 (vect_recog_gather_scatter_pattern): Update call to
9292 vect_add_conversion_to_pattern.
9294 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
9296 * tree-vect-patterns.c (new_pattern_def_seq): Delete.
9297 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
9298 (vect_recog_widen_op_pattern, vect_recog_over_widening_pattern)
9299 (vect_recog_rotate_pattern, vect_synth_mult_by_constant): Don't set
9300 STMT_VINFO_PATTERN_DEF_SEQ to null here.
9301 (vect_recog_pow_pattern, vect_recog_vector_vector_shift_pattern)
9302 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern): Use
9303 append_pattern_def_seq instead of new_pattern_def_seq.
9304 (vect_recog_divmod_pattern): Do both of the above.
9305 (vect_pattern_recog_1): Assert that STMT_VINO_PATTERN_DEF_SEQ
9308 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
9310 * tree-vect-patterns.c (vect_recog_dot_prod_pattern):
9311 (vect_recog_sad_pattern, vect_recog_widen_op_pattern)
9312 (vect_recog_widen_mult_pattern, vect_recog_pow_pattern):
9313 (vect_recog_widen_sum_pattern, vect_recog_over_widening_pattern)
9314 (vect_recog_average_pattern, vect_recog_cast_forwprop_pattern)
9315 (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
9316 (vect_recog_vector_vector_shift_pattern, vect_synth_mult_by_constant)
9317 (vect_recog_mult_pattern, vect_recog_divmod_pattern)
9318 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
9319 (vect_recog_mask_conversion_pattern): Replace vec<gimple *>
9320 parameter with a single stmt_vec_info.
9321 (vect_recog_func_ptr): Likewise.
9322 (vect_recog_gather_scatter_pattern): Likewise, folding in...
9323 (vect_try_gather_scatter_pattern): ...this.
9324 (vect_pattern_recog_1): Remove stmts_to_replace and just pass
9325 the stmt_vec_info of the statement to be matched. Don't clear
9326 STMT_VINFO_RELATED_STMT.
9327 (vect_pattern_recog): Update call accordingly.
9329 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
9331 PR tree-optimization/85694
9332 * doc/md.texi (avgM3_floor, uavgM3_floor, avgM3_ceil)
9333 (uavgM3_ceil): Document new optabs.
9334 * doc/sourcebuild.texi (vect_avg_qi): Document new target selector.
9335 * internal-fn.def (IFN_AVG_FLOOR, IFN_AVG_CEIL): New internal
9337 * optabs.def (savg_floor_optab, uavg_floor_optab, savg_ceil_optab)
9338 (savg_ceil_optab): New optabs.
9339 * tree-vect-patterns.c (vect_recog_average_pattern): New function.
9340 (vect_vect_recog_func_ptrs): Add it.
9341 * tree-vect-stmts.c (vectorizable_call): Get the type of the zero
9342 constant directly from the associated lhs.
9344 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
9346 * tree-vect-patterns.c (vect_split_statement): New function.
9347 (vect_convert_input): Use it to try to split an existing cast.
9349 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
9351 * poly-int.h (print_hex): New function.
9352 * dumpfile.h (dump_dec, dump_hex): Declare.
9353 * dumpfile.c (dump_dec, dump_hex): New poly_wide_int functions.
9354 * tree-vectorizer.h (_stmt_vec_info): Add min_output_precision,
9355 min_input_precision, operation_precision and operation_sign.
9356 * tree-vect-patterns.c (vect_get_range_info): New function.
9357 (vect_same_loop_or_bb_p, vect_single_imm_use)
9358 (vect_operation_fits_smaller_type): Delete.
9359 (vect_look_through_possible_promotion): Add an optional
9360 single_use_p parameter.
9361 (vect_recog_over_widening_pattern): Rewrite to use new
9362 stmt_vec_info infomration. Handle one operation at a time.
9363 (vect_recog_cast_forwprop_pattern, vect_narrowable_type_p)
9364 (vect_truncatable_operation_p, vect_set_operation_type)
9365 (vect_set_min_input_precision): New functions.
9366 (vect_determine_min_output_precision_1): Likewise.
9367 (vect_determine_min_output_precision): Likewise.
9368 (vect_determine_precisions_from_range): Likewise.
9369 (vect_determine_precisions_from_users): Likewise.
9370 (vect_determine_stmt_precisions, vect_determine_precisions): Likewise.
9371 (vect_vect_recog_func_ptrs): Put over_widening first.
9373 (vect_pattern_recog): Call vect_determine_precisions.
9375 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
9377 * tree-vect-patterns.c (vect_mark_pattern_stmts): Remove pattern
9378 statements that have been replaced by further pattern statements.
9379 (vect_pattern_recog_1): Clear STMT_VINFO_PATTERN_DEF_SEQ on failure.
9381 2018-07-03 Richard Biener <rguenther@suse.de>
9383 * tree-vect-stmts.c (vect_is_simple_use): Consolidate dumping,
9384 always set *dt. Dump vectype in vectype overload.
9385 * dumpfile.h (dump_gimple_expr): New function.
9386 (dump_gimple_expr_loc): Likewise.
9387 * dumpfile.c (dump_gimple_expr): New function.
9388 (dump_gimple_expr_loc): Likewise.
9390 2018-07-02 Jeff Law <law@redhat.com>
9392 * config/h8300/h8300.md (movqi_h8300, movqi_h8300hs): Consolidate
9393 the H8/300, H8/300H and H8/S variants into a single pattern.
9394 (movhi_h8300, movqi_h8300hs): Similarly.
9395 (pushqi_h8300hs, pushhi_h8300hs): Consolidate into a single pattern.
9396 (QHI mode iterator): New.
9398 * config/h8300/h8300.md: Remove trailing whitespace.
9400 2018-07-02 Jim Wilson <jimw@sifive.com>
9402 * config/riscv/riscv.c (riscv_expand_epilogue): Use emit_jump_insn
9403 instead of emit_insn for interrupt returns.
9404 * config/riscv/riscv.md (riscv_met): Add (return) to rtl.
9405 (riscv_sret, riscv_uret): Likewise.
9407 2018-07-02 David Malcolm <dmalcolm@redhat.com>
9409 * pretty-print.c (selftest::test_pp_format): Move save and restore
9410 of quotes to class auto_fix_quotes, and add an instance.
9411 * selftest.c: Include "intl.h".
9412 (selftest::auto_fix_quotes::auto_fix_quotes): New ctor.
9413 (selftest::auto_fix_quotes::~auto_fix_quotes): New dtor.
9414 * selftest.h (selftest::auto_fix_quotes): New class.
9416 2018-07-02 Richard Henderson <richard.henderson@linaro.org>
9418 * config/aarch64/aarch64-protos.h, config/aarch64/aarch64.c
9419 (aarch64_sve_prepare_conditional_op): Remove.
9420 * config/aarch64/aarch64-sve.md (cond_<SVE_INT_BINARY><SVE_I>):
9421 Allow aarch64_simd_reg_or_zero as select operand; remove
9422 the aarch64_sve_prepare_conditional_op call.
9423 (cond_<SVE_INT_BINARY_SD><SVE_SDI>): Likewise.
9424 (cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
9425 (*cond_<SVE_INT_BINARY><SVE_I>_z): New pattern.
9426 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_z): New pattern.
9427 (*cond_<SVE_COND_FP_BINARY><SVE_F>_z): New pattern.
9428 (*cond_<SVE_INT_BINARY><SVE_I>_any): New pattern.
9429 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_any): New pattern.
9430 (*cond_<SVE_COND_FP_BINARY><SVE_F>_any): New pattern
9431 and a splitters to match all of the *_any patterns.
9432 * config/aarch64/predicates.md (aarch64_sve_any_binary_operator): New.
9434 * config/aarch64/iterators.md (SVE_INT_BINARY_REV): Remove.
9435 (SVE_COND_FP_BINARY_REV): Remove.
9436 (sve_int_op_rev, sve_fp_op_rev): New.
9437 * config/aarch64/aarch64-sve.md (*cond_<SVE_INT_BINARY><SVE_I>_0): New.
9438 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_0): New.
9439 (*cond_<SVE_COND_FP_BINARY><SVE_F>_0): New.
9440 (*cond_<SVE_INT_BINARY><SVE_I>_2): Rename, add movprfx alternative.
9441 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_2): Similarly.
9442 (*cond_<SVE_COND_FP_BINARY><SVE_F>_2): Similarly.
9443 (*cond_<SVE_INT_BINARY><SVE_I>_3): Similarly; use sve_int_op_rev.
9444 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_3): Similarly.
9445 (*cond_<SVE_COND_FP_BINARY><SVE_F>_3): Similarly; use sve_fp_op_rev.
9447 * config/aarch64/aarch64-sve.md (cond_<SVE_COND_FP_BINARY><SVE_F>):
9448 Remove match_dup 1 from the inner unspec.
9449 (*cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
9451 * config/aarch64/aarch64.md (movprfx): New attr.
9452 (length): Default movprfx to 8.
9453 * config/aarch64/aarch64-sve.md (*mul<SVE_I>3): Add movprfx alt.
9454 (*madd<SVE_I>, *msub<SVE_I): Likewise.
9455 (*<su>mul<SVE_I>3_highpart): Likewise.
9456 (*<SVE_INT_BINARY_SD><SVE_SDI>3): Likewise.
9457 (*v<ASHIFT><SVE_I>3): Likewise.
9458 (*<su><MAXMIN><SVE_I>3): Likewise.
9459 (*<su><MAXMIN><SVE_F>3): Likewise.
9460 (*fma<SVE_F>4, *fnma<SVE_F>4): Likewise.
9461 (*fms<SVE_F>4, *fnms<SVE_F>4): Likewise.
9462 (*div<SVE_F>4): Likewise.
9464 2018-07-02 Richard Sandiford <richard.sandiford@arm.com>
9466 * tree-vect-patterns.c (vect_recog_widen_shift_pattern): Fix typo
9469 2018-07-02 Richard Biener <rguenther@suse.de>
9471 PR tree-optimization/86363
9472 * tree-ssa-sccvn.c (vn_reference_lookup_3): Check the
9473 memset argument refers to a non-variable address.
9475 2018-07-02 Aldy Hernandez <aldyh@redhat.com>
9477 * tree-vrp.c (extract_range_from_binary_expr_1): Abstract a lot of the
9478 {PLUS,MINUS}_EXPR code to...
9479 (adjust_symbolic_bound): ...here,
9480 (combine_bound): ...here,
9481 (set_value_range_with_overflow): ...and here.
9483 2018-07-02 Aldy Hernandez <aldyh@redhat.com>
9485 * tree-vrp.c (extract_range_from_unary_expr): Abstract ABS_EXPR
9487 (extract_range_from_abs_expr): ...here.
9489 2018-07-02 Eric Botcazou <ebotcazou@adacore.com>
9491 * config/i386/i386.c (ix86_finalize_stack_frame_flags): Do not overrule
9492 -fno-omit-frame-pointer when not optimizing.
9494 2018-07-02 Martin Liska <mliska@suse.cz>
9497 * ipa-pure-const.c (malloc_candidate_p): Revert usage of ::get.
9498 (propagate_nothrow): Likewise.
9500 2018-07-02 Martin Liska <mliska@suse.cz>
9503 * ipa-inline.c (early_inliner): Revert wrongly added ::get call.
9505 2018-07-02 David Malcolm <dmalcolm@redhat.com>
9507 * dumpfile.c (dump_generic_expr_loc): Undo removal of this
9508 function in r262149, changing "loc" param from source_location to
9509 const dump_location_t &.
9510 * dumpfile.h (dump_generic_expr_loc): Undo removal of this
9511 declaration, as above.
9513 2018-07-01 Paul Koning <ni1d@arrl.net>
9515 * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
9516 -munit-asm, -mgnu-asm, -mdec-asm.
9517 * config/pdp11/pdp11-protos.h (pdp11_gen_int_label): New.
9518 (pdp11_output_labelref): New.
9519 (pdp11_output_def): New.
9520 (pdp11_output_addr_vec_elt): New.
9521 * config/pdp11/pdp11.c: Use tab between opcode and operands. Use
9522 %# and %@ format codes.
9523 (pdp11_option_override): New.
9524 (TARGET_ASM_FILE_START_FILE_DIRECTIVE): Define.
9525 (pdp11_output_ident): New.
9526 (pdp11_asm_named_section): New.
9527 (pdp11_asm_init_sections): New.
9528 (pdp11_file_start): New.
9529 (pdp11_file_end): New.
9530 (output_ascii): Use .ascii/.asciz for -mdec-asm.
9531 (pdp11_asm_print_operand): Update %# and %$ for -mdec-asm. Add
9532 %o, like %c but octal.
9533 (pdp11_option_override): New.
9534 * config/pdp11/pdp11.h (TEXT_SECTION_ASM_OP): Update for
9536 (DATA_SECTION_ASM_OP): Ditto.
9537 (READONLY_DATA_SECTION_ASM_OP): New.
9538 (IS_ASM_LOGICAL_LINE_SEPARATOR): New.
9539 (ASM_GENERATE_INTERNAL_LABEL): Use new function.
9540 (ASM_OUTPUT_LABELREF): Ditto.
9541 (ASM_OUTPUT_DEF): Ditto.
9542 (ASM_OUTPUT_EXTERNAL): New.
9543 (ASM_OUTPUT_SOURCE_FILENAME): New.
9544 (ASM_OUTPUT_ADDR_VEC_ELT): Use new function.
9545 (ASM_OUTPUT_SKIP): Update for -mdec-asm.
9546 * config/pdp11/pdp11.md: Use tab between opcode and operands. Use
9547 %# and %@ format codes.
9548 * config/pdp11/pdp11.opt (mgnu-asm): New.
9549 (mdec-asm): Conflicts with -mgnu-asm and -munix-asm.
9550 (munix-asm): Conflicts with -mdec-asm and -mgnu-asm.
9551 * doc/invoke.txt (PDP-11 Options): Add -mgnu-asm.
9553 2018-07-01 Aldy Hernandez <aldyh@redhat.com>
9555 * tree-ssa-threadupdate.c (mark_threaded_blocks): Avoid
9556 dereferencing path[] beyond its length.
9558 (debug_all_paths): New.
9559 (rewire_first_differing_edge): New.
9560 (adjust_paths_after_duplication): New.
9561 (duplicate_thread_path): Call adjust_paths_after_duplication.
9563 (thread_through_all_blocks): Add new argument to
9564 duplicate_thread_path.
9566 2018-06-30 Jim Wilson <jimw@sifive.com>
9568 * config/riscv/predicates.md (p2m1_shift_operand): New.
9569 (high_mask_shift_operand): New.
9570 * config/riscv/riscv.md (lshrsi3_zero_extend_3+1): New combiner
9571 pattern using p2m1_shift_operand.
9572 (lshsi3_zero_extend_3+2): New combiner pattern using
9573 high_mask_shift_operand.
9575 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
9577 * tree-vect-patterns.c (vect_get_external_def_edge): New function,
9579 (vect_recog_rotate_pattern): ...here.
9580 (vect_convert_input): Try to insert casts of invariants in the
9582 * tree-vect-loop-manip.c (vect_loop_versioning): Don't require the
9583 preheader to be empty.
9585 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
9587 * tree-vect-patterns.c (append_pattern_def_seq): Take an optional
9588 vector type. If given, install it in the new statement's
9590 (vect_element_precision): New function.
9591 (vect_unpromoted_value): New struct.
9592 (vect_unpromoted_value::vect_unpromoted_value): New function.
9593 (vect_unpromoted_value::set_op): Likewise.
9594 (vect_look_through_possible_promotion): Likewise.
9595 (vect_joust_widened_integer, vect_joust_widened_type): Likewise.
9596 (vect_widened_op_tree, vect_convert_input): Likewise.
9597 (vect_convert_inputs, vect_convert_output): Likewise.
9598 (vect_recog_dot_prod_pattern): Use vect_look_through_possible_promotion
9599 to handle the optional cast of the multiplication result and
9600 vect_widened_op_tree to detect the widened multiplication itself.
9601 Do not require the input and output of promotion casts to have
9602 the same sign, but base the signedness of the operation on the
9603 input rather than the result. If the pattern includes two
9604 promotions, check that those promotions have the same sign.
9605 Do not restrict the MULT_EXPR handling to a double-width result;
9606 handle quadruple-width results and wider. Use vect_convert_inputs
9607 to convert the inputs to the common type.
9608 (vect_recog_sad_pattern): Use vect_look_through_possible_promotion
9609 to handle the optional cast of the ABS result. Also allow a sign
9610 change or a sign extension between the ABS and MINUS.
9611 Use vect_widened_op_tree to detect the widened subtraction and use
9612 vect_convert_inputs to convert the inputs to the common type.
9613 (vect_handle_widen_op_by_const): Delete.
9614 (vect_recog_widen_op_pattern): New function.
9615 (vect_recog_widen_mult_pattern): Use it.
9616 (vect_recog_widen_shift_pattern): Likewise.
9617 (vect_recog_widen_sum_pattern): Use
9618 vect_look_through_possible_promotion to handle the promoted
9621 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
9623 * gimple-iterator.c (gsi_for_stmt): Add a new overload that takes
9624 the containing gimple_seq *.
9625 * gimple-iterator.h (gsi_for_stmt): Declare it.
9626 * tree-vect-patterns.c (vect_recog_dot_prod_pattern)
9627 (vect_recog_sad_pattern, vect_recog_widen_sum_pattern)
9628 (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
9629 (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
9630 (vect_recog_mask_conversion_pattern): Remove STMT_VINFO_IN_PATTERN_P
9632 (vect_init_pattern_stmt, vect_set_pattern_stmt): New functions,
9634 (vect_mark_pattern_stmts): ...here. Handle cases in which the
9635 statement being replaced is part of an existing pattern
9636 definition sequence, inserting the new pattern statements before
9638 (vect_pattern_recog_1): Don't return a bool. If the statement
9639 is already part of a pattern, instead apply pattern matching
9640 to the pattern definition statements. Don't clear the
9641 STMT_VINFO_RELATED_STMT if is_pattern_stmt_p.
9642 (vect_pattern_recog): Don't break after the first match;
9643 continue processing the pattern definition statements instead.
9644 Don't bail out for STMT_VINFO_IN_PATTERN_P here.
9646 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
9648 * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
9649 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
9650 (vect_recog_widen_sum_pattern): Use it.
9652 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
9654 * tree-vect-loop.c (vectorizable_reduction): Assert that the
9655 phi is not a pattern statement and has not been replaced by
9656 a pattern statement.
9657 * tree-vect-patterns.c (type_conversion_p): Don't check
9658 STMT_VINFO_IN_PATTERN_P.
9659 (vect_recog_vector_vector_shift_pattern): Likewise.
9660 (vect_recog_dot_prod_pattern): Expect vect_is_simple_use to return
9661 the pattern statement rather than the original statement; check
9662 directly for a WIDEN_MULT_EXPR here.
9663 * tree-vect-slp.c (vect_get_and_check_slp_defs): Expect
9664 vect_is_simple_use to return the pattern statement rather
9665 than the original statement; use is_pattern_stmt_p to check
9666 for such a pattern statement.
9667 * tree-vect-stmts.c (process_use): Expect vect_is_simple_use
9668 to return the pattern statement rather than the original statement;
9669 don't do the same transformation here.
9670 (vect_is_simple_use): If the defining statement has been replaced
9671 by a pattern statement, return the pattern statement instead.
9672 Remove the corresponding (local) transformation from the vectype
9675 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
9677 * tree-vectorizer.h (vect_is_simple_use): Move the gimple ** to the
9678 end and default to null.
9679 * tree-vect-loop.c (vect_create_epilog_for_reduction)
9680 (vectorizable_reduction): Update calls accordingly, dropping the
9681 gimple ** argument if the passed-back statement isn't needed.
9682 * tree-vect-patterns.c (vect_get_internal_def, type_conversion_p)
9683 (vect_recog_rotate_pattern): Likewise.
9684 (vect_recog_mask_conversion_pattern): Likewise.
9685 * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
9686 (vect_mask_constant_operand_p): Likewise.
9687 * tree-vect-stmts.c (is_simple_and_all_uses_invariant, process_use):
9688 (vect_model_simple_cost, vect_get_vec_def_for_operand): Likewise.
9689 (get_group_load_store_type, get_load_store_type): Likewise.
9690 (vect_check_load_store_mask, vect_check_store_rhs): Likewise.
9691 (vectorizable_call, vectorizable_simd_clone_call): Likewise.
9692 (vectorizable_conversion, vectorizable_assignment): Likewise.
9693 (vectorizable_shift, vectorizable_operation): Likewise.
9694 (vectorizable_store, vect_is_simple_cond): Likewise.
9695 (vectorizable_condition, vectorizable_comparison): Likewise.
9696 (get_same_sized_vectype, vect_get_mask_type_for_stmt): Likewise.
9697 (vect_is_simple_use): Rename the def_stmt argument to def_stmt_out
9698 and move it to the end. Cope with null def_stmt_outs.
9700 2018-06-30 Bernd Edlinger <bernd.edlinger@hotmail.de>
9702 * Makefile.in (FLAGS_TO_PASS): Add RANLIB_FOR_TARGET.
9704 2018-06-29 Jeff Law <law@redhat.com>
9706 * config/v850/v850.c (v850_legitimate_address_p): Handle large
9707 displacements for TARGET_V850E2V3 and newer.
9708 (TARGET_LRA_P): Remove. Defaults to LRA now.
9709 * config/v850/v850.md (sign23byte_load): Remove.
9710 (unsign23byte_load, sign23hword_load, unsign23hword_load): Likewise.
9711 (23word_load, 23byte_store, 23hword_store, 23word_store): Likewise.
9713 2018-06-29 Martin Liska <mliska@suse.cz>
9716 * coverage.c (coverage_init): Mangle full path name.
9717 * doc/invoke.texi: Document the change.
9718 * gcov-io.c (mangle_path): New.
9719 * gcov-io.h (mangle_path): Likewise.
9720 * gcov.c (mangle_name): Use mangle_path for path mangling.
9722 2018-06-29 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
9724 * config/arm/arm.c (output_move_double): Don't allow STRD instructions
9725 if starting source register is not even.
9727 2018-06-29 Martin Liska <mliska@suse.cz>
9729 PR tree-optimization/86263
9730 * tree-switch-conversion.c (switch_decision_tree::try_switch_expansion):
9731 Make edge redirection.
9733 2018-06-29 David Malcolm <dmalcolm@redhat.com>
9735 * dumpfile.c (dump_loc): Add indentation based on scope depth.
9736 (dump_scope_depth): New variable.
9737 (get_dump_scope_depth): New function.
9738 (dump_begin_scope): New function.
9739 (dump_end_scope): New function.
9740 * dumpfile.h (get_dump_scope_depth): New declaration.
9741 (dump_begin_scope): New declaration.
9742 (dump_end_scope): New declaration.
9743 (class auto_dump_scope): New class.
9744 (AUTO_DUMP_SCOPE): New macro.
9745 * tree-vectorizer.h (DUMP_VECT_SCOPE): Reimplement in terms of
9748 2018-06-29 Richard Biener <rguenther@suse.de>
9750 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences): Assert
9751 compute_all_dependences succeeds.
9752 * tree-vect-loop.c (vect_get_datarefs_in_loop): Fail early if we
9753 exceed --param loop-max-datarefs-for-datadeps.
9755 2018-06-29 Jakub Jelinek <jakub@redhat.com>
9757 * config/rs6000/t-rs6000: Append rs6000-modes.h to TM_H.
9759 2018-06-28 Uros Bizjak <ubizjak@gmail.com>
9762 * config/i386/sse.md (*vec_extractv4si_0_zext_sse4): Use
9763 alternative 0 in preferred_for_speed attribute.
9765 2018-06-28 Paul Koning <ni1d@arrl.net>
9767 * config/pdp11/pdp11-protos.h (pdp11_shift_length): New function.
9768 * config/pdp11/pdp11.c (pdp11_shift_length): New function.
9769 * config/pdp11/pdp11.h (ADJUST_INSN_LENGTH): Remove.
9770 * config/pdp11/pdp11.md: Correct "length" attribute calculation
9771 for shift insn patterns.
9773 2018-06-28 David Malcolm <dmalcolm@redhat.com>
9775 * cgraph.c (cgraph_node::get_body): Replace assignments to
9776 "dump_file" with calls to set_dump_file.
9777 * dumpfile.c (alt_dump_file): Make static, and group with...
9778 (alt_flags): ...this definition.
9779 (dumps_are_enabled): New variable.
9780 (refresh_dumps_are_enabled): New function.
9781 (set_dump_file): New function.
9782 (set_alt_dump_file): New function.
9783 (gcc::dump_manager::dump_start): Replace assignments to
9784 "dump_file" and "alt_dump_file" with calls to set_dump_file and
9786 (gcc::dump_manager::dump_finish): Likewise.
9787 * dumpfile.h (alt_dump_file): Delete decl.
9788 (dumps_are_enabled): New variable decl.
9789 (set_dump_file): New function decl.
9790 (dump_enabled_p): Rewrite in terms of new "dumps_are_enabled"
9792 * tree-nested.c (lower_nested_functions): Replace assignments to
9793 "dump_file" with calls to set_dump_file.
9795 2018-06-28 Eric Botcazou <ebotcazou@adacore.com>
9797 * tree-cfg.c (verify_gimple_in_cfg): Call verify_location on the
9798 goto_locus of each outgoing edge of each basic block.
9800 2018-06-28 Richard Biener <rguenther@suse.de>
9802 * dwarf2out.c (decl_scope_table): Remove.
9803 (push_decl_scope): Likewise.
9804 (pop_decl_scope): Likewise.
9805 (gen_type_die_for_member): Do not call push/pop_decl_scope.
9806 (gen_struct_or_union_type_die): Likewise.
9807 (gen_tagged_type_die): Likewise.
9808 (dwarf2out_init): Do not initialize decl_scope_table.
9809 (dwarf2out_c_finalize): Do not free it.
9811 2018-06-28 Richard Biener <rguenther@suse.de>
9813 * dwarf2out.c (gen_subprogram_die): Use is_unit_die when
9814 deciding whether to not re-use a DIE.
9816 2018-06-28 Richard Biener <rguenther@suse.de>
9818 * dwarf2out.c (gen_subprogram_die): Always re-use DIEs with an
9819 DW_AT_abstract_origin attribute.
9821 2018-06-28 Martin Liska <mliska@suse.cz>
9823 * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
9824 Use newly introduced constants.
9825 * tree-switch-conversion.h (struct jump_table_cluster):
9826 Define max_ratio_for_size and max_ratio_for_speed.
9828 2018-06-28 Martin Liska <mliska@suse.cz>
9830 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
9831 Add new checking assert to catch invalid state.
9832 (jump_table_cluster::can_be_handled): Handle single case
9834 (jump_table_cluster::is_beneficial): Bail out for such case.
9835 (bit_test_cluster::find_bit_tests):
9836 Add new checking assert to catch invalid state.
9837 (bit_test_cluster::can_be_handled): Handle single case
9839 (bit_test_cluster::is_beneficial): Bail out for such case.
9840 (switch_decision_tree::analyze_switch_statement):
9843 2018-06-28 Martin Liska <mliska@suse.cz>
9845 * common.opt: Introduce -completion option.
9846 * gcc.c (driver_handle_option): Handle it.
9847 (driver::main): Print completions if completion
9849 * opt-suggestions.c (option_proposer::get_completions):
9851 (option_proposer::suggest_completion): Likewise.
9852 (option_proposer::find_param_completions): Likewise.
9853 (verify_autocompletions): Likewise.
9854 (test_completion_valid_options): Likewise.
9855 (test_completion_valid_params): Likewise.
9856 (in_completion_p): Likewise.
9857 (empty_completion_p): Likewise.
9858 (test_completion_partial_match): Likewise.
9859 (test_completion_garbage): Likewise.
9860 (opt_proposer_c_tests): Likewise.
9861 * opt-suggestions.h: Declare new functions.
9862 * opts.c (common_handle_option): Handle OPT__completion_.
9863 * selftest-run-tests.c (selftest::run_tests): Add
9864 opt_proposer_c_tests.
9865 * selftest.c (assert_str_startswith): New.
9866 * selftest.h (assert_str_startswith): Likewise.
9867 (opt_proposer_c_tests): New.
9868 (ASSERT_STR_STARTSWITH): Likewise.
9870 2018-06-28 Martin Liska <mliska@suse.cz>
9872 * Makefile.in: Add opt-suggestions.o.
9873 * gcc-main.c: Include opt-suggestions.h.
9874 * gcc.c (driver::driver): Likewise.
9875 (driver::~driver): Remove m_option_suggestions.
9876 (driver::build_option_suggestions): Moved to option_proposer.
9877 (driver::suggest_option): Likewise.
9878 (driver::handle_unrecognized_options): Use option_proposer.
9879 * gcc.h (class driver): Add new memver m_option_proposer.
9880 * opt-suggestions.c: New file.
9881 * opt-suggestions.h: New file.
9883 2018-06-28 Martin Liska <mliska@suse.cz>
9885 * vec.h (class auto_string_vec): New (moved from auto_argvec).
9886 (auto_string_vec::~auto_string_vec): Likewise.
9888 2018-06-28 Eric Botcazou <ebotcazou@adacore.com>
9890 * tree-inline.h (struct copy_body_data): Move remapping_type_depth and
9891 prevent_decl_creation_for_types fields up and add reset_location field.
9892 * tree-inline.c (remap_gimple_stmt): Force input_location on the new
9893 statement if id->reset_location is true.
9894 (copy_edges_for_bb): Do not set goto_locus on the new edges if
9895 id->reset_location is true.
9896 (copy_phis_for_bb): Force input_location on the arguments if
9897 id->reset_location is true.
9898 (expand_call_inline): Set id->reset_location if DECL_IGNORED_P
9899 is set on the function to be inlined.
9901 2018-06-27 Stephan Bergmann <sbergman@redhat.com>
9903 * doc/invoke.texi (Debugging Options): Add -gsplit-dwarf.
9905 2018-06-27 Dimitar Dimitrov <dimitar@dinux.eu>
9907 * lra-eliminations.c (update_reg_eliminate): Mark all spanning hard
9908 registers for Pmode.
9909 * lra-lives.c (check_pseudos_live_through_calls): Mark all spanning
9910 hard registers for the clobbered pseudo.
9912 2018-06-27 Paul Koning <ni1d@arrl.net>
9914 * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
9915 mutually exclusive options.
9916 * config/pdp11/constraints.md (h): New constraint.
9917 (O): Update definition to match shift code generation.
9918 (D): New constraint.
9919 * config/pdp11/pdp11-modes.def (CCNZ): Define mode.
9921 * config/pdp11/pdp11-protos.h (int_no_side_effect_operand): New
9923 (output_jump): Change arguments.
9924 (pdp11_fixed_cc_regs): New function.
9925 (pdp11_cc_mode): Ditto.
9926 (pdp11_expand_shift): Ditto.
9927 (pdp11_assemble_shift): Ditto.
9928 (pdp11_small_shift): Ditto.
9929 (pdp11_branch_cost): Remove.
9930 * config/pdp11/pdp11.c (pdp11_assemble_integer): Remove comments
9932 (pdp11_register_move_cost): Update for CC registers.
9933 (pdp11_rtx_costs): Add case for LSHIFTRT.
9934 (pdp11_output_jump): Add CCNZ mode conditional branches.
9935 (notice_update_cc_on_set): Remove.
9936 (pdp11_cc_mode): New function.
9937 (simple_memory_operand): Correct pre/post decrement case.
9938 (no_side_effect_operand): New function.
9939 (pdp11_regno_reg_class): Add CC_REGS class.
9940 (pdp11_fixed_cc_regs): New function.
9941 (pdp11_small_shift): New function.
9942 (pdp11_expand_shift): New function to expand shift insns.
9943 (pdp11_assemble_shift): New function to output shifts.
9944 (pdp11_branch_cost): Remove.
9945 (pdp11_modes_tieable_p): Make QI/HI modes tieable.
9946 * config/pdp11/pdp11.h (SIZE_TYPE): Ensure 16-bit type.
9947 (WCHAR_TYPE): Ditto.
9948 (PTRDIFF_TYPE): Ditto.
9949 (ADJUST_INSN_LENGTH): New macro.
9950 (FIXED_REGISTERS): Add CC registers.
9951 (CALL_USED_REGISTERS): Ditto.
9953 (REG_CLASS_NAMES): Ditto.
9954 (REG_CLASS_CONTENTS): Ditto.
9955 (SELECT_CC_MODE): Use new function.
9956 (TARGET_FLAGS_REGNUM): New macro.
9957 (TARGET_FIXED_CONDITION_CODE_REGS): Ditto.
9958 (cc0_reg_rtx): Remove.
9959 (CC_STATUS_MDEP): Remove.
9960 (CC_STATUS_MDEFP_INIT): Remove.
9961 (CC_IN_FPU): Remove.
9962 (NOTICE_UPDATE_CC): Remove.
9963 (REGISTER_NAMES): Add CC registers.
9964 (BRANCH_COST): Change to constant 1.
9965 * config/pdp11/pdp11.md: Rewrite for CCmode condition code
9967 * config/pdp11/pdp11.opt (mbcopy): Remove.
9968 (mbcopy-builtin): Remove.
9969 (mbranch-cheap): Remove.
9970 (mbranch-expensive): Remove.
9971 * config/pdp11/predicates.md (expand_shift_operand): Update to
9972 match shift code generation.
9973 (ccnz_operator): New predicate.
9974 * doc/invoke.texi (PDP-11 Options): Remove deleted options
9975 -mbcopy, -mbcopy-builtin, -mbranch-cheap, -mbranch-expensive.
9976 Remove non-existent option -mabshi, -mno-abshi. Document mutually
9978 * doc/md.texi (PDP-11): Document new D and h constraints. Update
9979 description of O constraint.
9981 2018-06-27 Jeff Law <law@redhat.com>
9982 Austin Law <austinklaw@gmail.com>
9984 * config/v850/v850.md (addsi3_set_flags): New pattern.
9985 (subsi3_set_flags, negsi2_set_flags, andsi3_set_flags): Likewise.
9986 (iorsi3_set_flags, xorsi3_set_flags, one_cmplsi2_set_flags): Likewise.
9987 (zero_extendhisi2_v850_set_flags): Likewise.
9988 (zero_extendqisi2_v850_set_flags): Likewise.
9989 (ashlsi3_set_flags, ashlsi3_v850e2_set_flags): Likewise.
9990 (lshrsi3_set_flags, lshrsi3_v850e2_set_flags): Likewise.
9991 (ashrsi3_set_flags, ashrsi3_v850e2_set_flags): Likewise.
9993 * config/v850/v850-protos.h (notice_update_cc): Remove.
9994 * config/v850/v850.c (v850_compare_op0, v850_compare_op1): Remove.
9995 (v850_print_operand): Handle 'D' and "d".
9996 (v850_select_cc_mode): Remove ATTRIBUTE_UNUSED for last argument.
9997 Add handling of arithmetic/logical operations compared against zero.
9998 (v850_gen_float_compare): Remove ATTRIBUTE_UNUSED for last argument.
9999 Do not look at v850_compare_op, instead get mode from last argument.
10000 (v850_gen_compare): Remove
10001 (increment_stack): Use addsi3_clobber_flags to avoid splitting failure
10002 after reload for prologue insns.
10003 (expand_prologue): Account for CLOBBER of CC_REGNUM in various
10005 (construct_save_jarl): Likewise.
10006 (TARGET_FLAGS_REGNUM): Define.
10007 * config/v850/v850.h (v850_compare_op0, v850_compare_op1): Remove.
10008 (NOTICE_UPDATE_CC): Remove.
10009 * config/v850/v850.md (v850_tst1): Use (reg:CCZ CC_REGNUM) rather
10010 than cc0. Conditionalize on reload_completed.
10011 (cmpsi_insn, setfcc_insn): Likewise.
10012 (tst1 splitter): Turn into define_and_split which sets the flags
10014 (cstoresi4, cbranchsf4, cbranchdf4, cbranchsi4_insn): Likewise.
10015 (cbranchsi4, branch_normal, branch_invert): Do not expose cc0 here.
10016 (cstoresf4, cstoredf4): Clobber the flags.
10017 (cmpsi, cmpsf, cmpdf): Remove expanders.
10018 (setf_insn): Remove pattern.
10019 (addsi3): Turn into define_and_split which clobbers the flags after
10020 reload and a suitable pattern (addsi3_clobber_flags) for use after
10022 (subsi3, negsi2, andsi3, iorsi3, xorsi3, one_cmplsi2) Likewise.
10023 (ashlsi3, ashlsi3_v850e2, lshrsi3, lsh4si3_v850e2): Likewise.
10024 (ashrsi3, ashrsi3_v850e2): Likewise.
10025 (bins): Clobber the flags.
10026 (movsicc_normal_cc, movsicc_normal, movsicc_tst1): Likewise.
10027 (movsicc_tst1_revesed, sasf, swap and rotate patterns): Likewise.
10028 (fix_loop_counter, call_internal_short, call_internal_long): Likewise.
10029 (call_value_internal_short, call_value_internal_long): Likewise.
10030 (callt_save_interrupt, callt_return_interrupt): Likewise.
10031 (save_interrupt, return_interrupt): Likewise.
10032 (callt_save_all_interrupt, save_all_interrupt): Likewise.
10033 (_save_all_interrupt, callt_restore_all_interrupt): Likewise.
10034 (restore_all_interrupt, _restore_all_interrupt): Likewise.
10035 (All FP comparisons): Only allow after reload has completed.
10037 (divh, divhu): Tweak output template.
10038 (branch_z_normal, branch_z_invert): Remove
10039 (branch_nz_normal, branch_nz_invert): Likewise.
10040 (extendhisi_insn, extendqisi_insn): Do not clobber flags.
10042 * config/v850/v850-modes.def (CCZ, CCNZ): Add new modes.
10043 * config/v850/v850.c (notice_update_cc): Remove.
10044 * config/v850/v850.h (CC_OVERFLOW_UNUSABLE): Remove
10045 (CC_NO_CARRY): Likewise.
10046 (NOTICE_UPDATE_CC): Define to nothing.
10047 * config/v850/v850.md: Remove block comment on cc0 handling
10048 Remove "cc" attribute from all patterns. Remove cc_status handling
10049 from all patterns. Minor formatting fixes.
10051 2018-06-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
10053 * config/aarch64/aarch64-cores.def (cortex-a76): New entry.
10054 (cortex-a76.cortex-a55): Likewise.
10055 * config/aarch64/aarch64-tune.md: Regenerate.
10056 * doc/invoke.texi (AArch64 Options): Document cortex-a76 and
10057 cortex-a76.cortex-a55.
10059 2018-06-27 Jeff Law <law@redhat.com>
10061 * config/v850/t-v850 (MULTILIB_OPTIONS): Remove 8byte-align.
10062 (MULTILIB_DIRNAMES): Similarly.
10064 2018-06-27 Eric Botcazou <ebotcazou@adacore.com>
10066 * gimple.h (gimple_return_retbnd): Delete.
10067 (gimple_return_set_retbnd): Likewise.
10068 * cgraphunit.c (cgraph_node::expand_thunk): Remove call to
10069 gimple_return_set_retbnd.
10070 * gimple-pretty-print.c (dump_gimple_return): Remove call to
10071 gimple_return_retbnd and adjust.
10072 * tree-inline.h (struct copy_body_data): Remove retbnd field.
10073 * tree-inline.c (remap_gimple_stmt): Remove handling of retbnd.
10074 Explicitly return NULL in a couple more cases. Move assertion
10075 on debug statements and remove unreachable code.
10076 (reset_debug_binding): Do not test id->retbnd.
10077 (expand_call_inline): Do not set it.
10079 2018-06-27 Rasmus Villemoes <rv@rasmusvillemoes.dk>
10081 * configure.ac: Add --disable-gcov option.
10082 * configure: Regenerate.
10083 * Makefile.in: Honour @enable_gcov@.
10084 * doc/install.texi: Document --disable-gcov.
10086 2018-06-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
10088 * config/arm/arm-cpus.in (cortex-a76): New entry.
10089 (cortex-a76.cortex-a55): Likewise.
10090 * config/arm/arm-tables.opt: Regenerate.
10091 * config/arm/arm-tune.md: Likewise.
10092 * config/arm/driver-arm.c (arm_cpu_table): Add Cortex-A76 entry.
10093 * doc/invoke.texi (ARM Options): Document cortex-a76 and
10094 cortex-a76.cortex-a55.
10096 2018-06-27 Tamar Christina <tamar.christina@arm.com>
10099 * config/aarch64/aarch64.md (*movhf_aarch64): Add dup v0.4h pattern.
10101 2018-06-27 Siddhesh Poyarekar <siddhesh@sourceware.org>
10103 * config/aarch64/aarch64.h (CALL_USE_REGISTERS): Fix obsolete
10105 (EPILOGUE_USES): Likewise.
10107 2018-06-26 Eric Botcazou <ebotcazou@adacore.com>
10109 * tree-inline.c (remap_location): New function extracted from...
10110 (copy_edges_for_bb): Add ID parameter. Remap goto_locus.
10111 (copy_phis_for_bb): ...here. Call remap_location.
10112 (copy_cfg_body): Adjust call to copy_edges_for_bb.
10114 2018-06-26 Aaron Sawdey <acsawdey@linux.ibm.com>
10116 * config/rs6000/rs6000-string.c (expand_block_clear): Don't use
10117 unaligned vsx for 16B memset.
10119 2018-06-26 Segher Boessenkool <segher@kernel.crashing.org>
10122 * config/rs6000/rs6000.c (rs6000_init_builtins): Do not set
10123 ieee128_float_type_node to long_double_type_node unless
10124 TARGET_LONG_DOUBLE_128 is set.
10126 2018-06-26 David Malcolm <dmalcolm@redhat.com>
10128 * cfgloop.c (get_loop_location): Convert return type from
10129 location_t to dump_user_location_t, replacing INSN_LOCATION lookups
10130 by implicit construction from rtx_insn *, and using
10131 dump_user_location_t::from_function_decl for the fallback case.
10132 * cfgloop.h (get_loop_location): Convert return type from
10133 location_t to dump_user_location_t.
10134 * cgraphunit.c (walk_polymorphic_call_targets): Update call to
10135 dump_printf_loc to pass in a dump_location_t rather than a
10136 location_t, via the gimple stmt.
10137 * coverage.c (get_coverage_counts): Update calls to
10138 dump_printf_loc to pass in dump_location_t rather than a
10140 * doc/optinfo.texi (Dump types): Convert example of
10141 dump_printf_loc from taking "locus" to taking "insn". Update
10142 description of the "_loc" calls to cover dump_location_t.
10143 * dumpfile.c: Include "backend.h", "gimple.h", "rtl.h", and
10145 (dump_user_location_t::dump_user_location_t): New constructors,
10146 from gimple *stmt and rtx_insn *.
10147 (dump_user_location_t::from_function_decl): New function.
10148 (dump_loc): Make static.
10149 (dump_gimple_stmt_loc): Convert param "loc" from location_t to
10150 const dump_location_t &.
10151 (dump_generic_expr_loc): Delete.
10152 (dump_printf_loc): Convert param "loc" from location_t to
10153 const dump_location_t &.
10154 (selftest::test_impl_location): New function.
10155 (selftest::dumpfile_c_tests): New function.
10156 * dumpfile.h: Include "profile-count.h".
10157 (class dump_user_location_t): New class.
10158 (struct dump_impl_location_t): New struct.
10159 (class dump_location_t): New class.
10160 (dump_printf_loc): Convert 2nd param from source_location to
10161 const dump_location_t &.
10162 (dump_generic_expr_loc): Delete.
10163 (dump_gimple_stmt_loc): Convert 2nd param from source_location to
10164 const dump_location_t &.
10165 * gimple-fold.c (fold_gimple_assign): Update call to
10166 dump_printf_loc to pass in a dump_location_t rather than a
10167 location_t, via the gimple stmt.
10168 (gimple_fold_call): Likewise.
10169 * gimple-loop-interchange.cc
10170 (loop_cand::analyze_iloop_reduction_var): Update for change to
10171 check_reduction_path.
10172 (tree_loop_interchange::interchange): Update for change to
10173 find_loop_location.
10174 * graphite-isl-ast-to-gimple.c (scop_to_isl_ast): Update for
10175 change in return-type of find_loop_location.
10176 (graphite_regenerate_ast_isl): Likewise.
10177 * graphite-optimize-isl.c (optimize_isl): Likewise.
10178 * graphite.c (graphite_transform_loops): Likewise.
10179 * ipa-devirt.c (ipa_devirt): Update call to dump_printf_loc to
10180 pass in a dump_location_t rather than a location_t, via the
10182 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
10183 * ipa.c (walk_polymorphic_call_targets): Likewise.
10184 * loop-unroll.c (report_unroll): Convert "locus" param from
10185 location_t to dump_location_t.
10186 (decide_unrolling): Update for change to get_loop_location's
10188 * omp-grid.c (struct grid_prop): Convert field "target_loc" from
10189 location_t to dump_user_location_t.
10190 (grid_find_single_omp_among_assignments_1): Updates calls to
10191 dump_printf_loc to pass in a dump_location_t rather than a
10192 location_t, via the gimple stmt.
10193 (grid_parallel_clauses_gridifiable): Convert "tloc" from
10194 location_t to dump_location_t. Updates calls to dump_printf_loc
10195 to pass in a dump_location_t rather than a location_t, via the
10197 (grid_inner_loop_gridifiable_p): Likewise.
10198 (grid_dist_follows_simple_pattern): Likewise.
10199 (grid_gfor_follows_tiling_pattern): Likewise.
10200 (grid_target_follows_gridifiable_pattern): Likewise.
10201 (grid_attempt_target_gridification): Convert initialization
10202 of local "grid" from memset to zero-initialization; FIXME: does
10203 this require C++11? Update call to dump_printf_loc to pass in a
10204 optinfo_location rather than a location_t, via the gimple stmt.
10205 * profile.c (read_profile_edge_counts): Updates call to
10206 dump_printf_loc to pass in a dump_location_t rather than a
10208 (compute_branch_probabilities): Likewise.
10209 * selftest-run-tests.c (selftest::run_tests): Call
10211 * selftest.h (dumpfile_c_tests): New decl.
10212 * tree-loop-distribution.c (pass_loop_distribution::execute):
10213 Update for change in return type of find_loop_location.
10214 * tree-parloops.c (parallelize_loops): Likewise.
10215 * tree-ssa-loop-ivcanon.c (try_unroll_loop_completely): Convert
10216 "locus" from location_t to dump_user_location_t.
10217 (canonicalize_loop_induction_variables): Likewise.
10218 * tree-ssa-loop-ivopts.c (tree_ssa_iv_optimize_loop): Update
10219 for change in return type of find_loop_location.
10220 * tree-ssa-loop-niter.c (number_of_iterations_exit): Update call
10221 to dump_printf_loc to pass in a dump_location_t rather than a
10222 location_t, via the stmt.
10223 * tree-ssa-sccvn.c (eliminate_dom_walker::before_dom_children):
10225 * tree-vect-loop-manip.c (find_loop_location): Convert return
10226 type from source_location to dump_user_location_t.
10227 (vect_do_peeling): Update for above change.
10228 (vect_loop_versioning): Update for change in type of
10230 * tree-vect-loop.c (check_reduction_path): Convert "loc" param
10231 from location_t to dump_user_location_t.
10232 (vect_estimate_min_profitable_iters): Update for change in type
10234 * tree-vect-slp.c (vect_print_slp_tree): Convert param "loc" from
10235 location_t to dump_location_t.
10236 (vect_slp_bb): Update for change in type of vect_location.
10237 * tree-vectorizer.c (vect_location): Convert from source_location
10238 to dump_user_location_t.
10239 (try_vectorize_loop_1): Update for change in vect_location's type.
10240 (vectorize_loops): Likewise.
10241 (increase_alignment): Likewise.
10242 * tree-vectorizer.h (vect_location): Convert from source_location
10243 to dump_user_location_t.
10244 (find_loop_location): Convert return type from source_location to
10245 dump_user_location_t.
10246 (check_reduction_path): Convert 1st param from location_t to
10247 dump_user_location_t.
10248 * value-prof.c (check_counter): Update call to dump_printf_loc to
10249 pass in a dump_user_location_t rather than a location_t; update
10250 call to error_at for change in type of "locus".
10251 (check_ic_target): Update call to dump_printf_loc to
10252 pass in a dump_user_location_t rather than a location_t, via the
10255 2018-06-26 Robin Dapp <rdapp@linux.vnet.ibm.com>
10257 * config/s390/s390.h (enum processor_flags): Do not use
10258 default tune parameter when -march was specified.
10260 2018-06-26 Jakub Jelinek <jakub@redhat.com>
10263 * config/i386/i386.md (setcc + movzbl to xor + setcc peephole2s):
10264 Check reg_overlap_mentioned_p in addition to reg_set_p with the same
10267 2018-06-26 Richard Biener <rguenther@suse.de>
10269 PR tree-optimization/86287
10271 * tree-vect-loop.c (vect_transform_loop_stmt): Fix read-after-free.
10272 (vect_analyze_loop): Initialize n_stmts.
10274 2018-06-26 Richard Biener <rguenther@suse.de>
10276 PR middle-end/86271
10277 * fold-const.c (fold_convertible_p): Pointer extension
10280 2018-06-26 Alexandre Oliva <aoliva@redhat.com>
10283 * dwarf2out.c (loc_list_has_views): Adjust comments.
10284 (dw_loc_list): Split single cross-partition range with
10287 2018-06-25 Jeff Law <law@redhat.com>
10289 * common/config/v850/v850-common.c (TARGET_DEFAULT_TARGET_FLAGS): Turn
10290 on -mbig-switch by default.
10292 * config/v850/predicates.md (const_float_1_operand): Fix match_code
10294 (const_float_0_operand): Remove unused predicate.
10295 * config/v850/v850.md (define_constants): Remove UNSPEC_LOOP.
10296 (define_c_enum unspec): Add LOOP, RCP and RSQRT constants.
10297 (recipsf2): New expander. Original pattern now called
10299 (recipdf2, recipdf2_insn): Similarly.
10300 (rsqrtsf2, rsqrtsf2_insn): Similarly
10301 (rsqrtdf2, rsqrtdf2_insn): Similarly
10303 2018-06-26 Gerald Pfeifer <gerald@pfeifer.com>
10305 * ginclude/stddef.h: Remove an obsolete comment on FreeBSD 5.
10306 Simplify logic for FreeBSD (twice).
10308 2018-06-25 Martin Sebor <msebor@redhat.com>
10310 PR tree-optimization/86204
10311 * tree-ssa-strlen.c (handle_builtin_strlen): Avoid storing
10312 a strnlen result if it's less than the length of the string.
10314 2018-06-25 Martin Sebor <msebor@redhat.com>
10316 PR tree-optimization/85700
10317 * gimple-fold.c (gimple_fold_builtin_strncat): Adjust comment.
10318 * tree-ssa-strlen.c (is_strlen_related_p): Handle integer subtraction.
10319 (maybe_diag_stxncpy_trunc): Distinguish strncat from strncpy.
10321 2018-06-25 Martin Sebor <msebor@redhat.com>
10323 * doc/extend.texi (Zero-length arrays): Update and clarify.
10325 2018-06-25 Michael Meissner <meissner@linux.ibm.com>
10327 * config.gcc (powerpc64le*): Revert January 16th, 2018 patch that
10328 added IEEE/IBM long double multilib support on PowerPC little
10329 endian Linux systems.
10330 * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Likewise.
10331 (MULTILIB_DEFAULTS): Likewise.
10332 * config/rs6000/rs6000.c (rs6000_option_override_internal):
10334 * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Likewise.
10335 * config/rs6000/t-ldouble-linux64le-ibm: Delete, no longer used.
10336 * config/rs6000/t-ldouble-linux64le-ieee: Delete, no longer used.
10338 2018-06-25 Alexander Monakov <amonakov@ispras.ru>
10340 PR middle-end/86311
10341 * sort.cc (REORDER_23): Avoid memcpy with same destination and source.
10342 (REORDER_45): Likewise.
10344 2018-06-25 Jeff Law <law@redhat.com>
10346 * config/v850/v850.md (divmodhi4): Make sure to sign extend the
10347 dividend to 32 bits. Adjust length.
10348 (udivmodhi4): Cleanup output template. Fix length.
10350 2018-06-25 Carl Love <cel@us.ibm.com>
10352 * config/rs6000/vsx.md: Change word selector to prefered location.
10354 2018-06-25 Richard Biener <rguenther@suse.de>
10356 PR tree-optimization/86304
10357 * tree-vectorizer.c (vectorize_loops): Walk over new possibly
10358 epilogue-if-converted loops as well.
10360 2018-06-25 Jan Hubicka <hubicka@ucw.cz>
10362 * lto-section-out.c (lto_begin_section): Do not print section
10363 name for noaddr and unnumbered dumps.
10365 2018-06-25 Richard Biener <rguenther@suse.de>
10367 * tree-vectorizer.h (struct vec_info_shared): New structure
10368 with parts split out from struct vec_info and loop_nest from
10369 struct _loop_vec_info.
10370 (struct vec_info): Adjust accordingly.
10371 (struct _loop_vec_info): Likewise.
10372 (LOOP_VINFO_LOOP_NEST): Adjust.
10373 (LOOP_VINFO_DATAREFS): Likewise.
10374 (LOOP_VINFO_DDRS): Likewise.
10375 (struct _bb_vec_info): Likewise.
10376 (BB_VINFO_DATAREFS): Likewise.
10377 (BB_VINFO_DDRS): Likewise.
10378 (struct _stmt_vec_info): Add dr_aux member.
10379 (DR_VECT_AUX): Adjust to refer to member of DR_STMTs vinfo.
10380 (DR_MISALIGNMENT_UNINITIALIZED): New.
10381 (set_dr_misalignment): Adjust.
10382 (dr_misalignment): Assert misalign isn't DR_MISALIGNMENT_UNINITIALIZED.
10383 (vect_analyze_loop): Adjust prototype.
10384 (vect_analyze_loop_form): Likewise.
10385 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
10386 Compute dependences lazily.
10387 (vect_record_base_alignments): Use shared datarefs/ddrs.
10388 (vect_verify_datarefs_alignment): Likewise.
10389 (vect_analyze_data_refs_alignment): Likewise.
10390 (vect_analyze_data_ref_accesses): Likewise.
10391 (vect_analyze_data_refs): Likewise.
10392 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Add
10393 constructor parameter for shared part.
10394 (vect_analyze_loop_form): Pass in shared part and adjust.
10395 (vect_analyze_loop_2): Pass in storage for the number of
10396 stmts. Move loop nest finding to the caller. Compute
10398 (vect_analyze_loop): Pass in shared part.
10399 (vect_transform_loop): Verify shared datarefs are unchanged.
10400 * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Add
10401 constructor parameter for shared part.
10402 (vect_slp_analyze_bb_1): Pass in shared part and adjust.
10403 (vect_slp_bb): Verify shared datarefs are unchanged before
10405 * tree-vect-stmts.c (ensure_base_align): Adjust for DR_AUX
10407 (new_stmt_vec_info): Initialize DR_AUX misalignment to
10408 DR_MISALIGNMENT_UNINITIALIZED.
10409 * tree-vectorizer.c (vec_info::vec_info): Add constructor
10410 parameter for shared part.
10411 (vec_info::~vec_info): Adjust.
10412 (vec_info_shared::vec_info_shared): New.
10413 (vec_info_shared::~vec_info_shared): Likewise.
10414 (vec_info_shared::save_datarefs): Likewise.
10415 (vec_info_shared::check_datarefs): Likewise.
10416 (try_vectorize_loop_1): Construct shared part live for analyses
10417 of a single loop for multiple vector sizes.
10418 * tree-parloops.c (gather_scalar_reductions): Adjust.
10420 2018-06-25 Richard Biener <rguenther@suse.de>
10422 * tree-vect-data-refs.c (vect_find_stmt_data_reference): Modify
10423 DR for SIMD lane accesses here and mark DR with (void *)-1 aux.
10424 (vect_analyze_data_refs): Remove similar code from here and
10425 simplify accordingly.
10427 2018-06-25 Richard Biener <rguenther@suse.de>
10429 * tree-vect-data-refs.c (vect_check_gather_scatter): Fail
10430 for reverse storage order accesses rather than asserting
10431 they cannot happen here.
10433 2018-06-25 Tom de Vries <tdevries@suse.de>
10436 * config/i386/i386.md (define_insn "*tls_global_dynamic_64_<mode>"):
10437 Use data16 instead of .byte for insn prefix.
10439 2018-06-25 Andreas Krebbel <krebbel@linux.ibm.com>
10442 * parser.c (make_char_string_pack): Pass this literal chars
10443 through cpp_interpret_string.
10444 (cp_parser_userdef_numeric_literal): Check the result of
10445 make_char_string_pack.
10447 2018-06-24 Maya Rashish <coypu@sdf.org>
10449 * ginclude/stddef.h: Simplify conditions around avoiding
10450 re-definition of __size_t.
10452 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
10454 * lto-streamer-out.c (tree_is_indexable): Make LABEL_DECL nonindexable
10455 unless it is forced or nonlocal; assert that we stream no IMPORTED_DECL.
10457 2018-06-22 Maya Rashish <coypu@sdf.org>
10459 * doc/invoke.texi (mno-fancy-math-387): Update for changes
10460 made to OpenBSD and NetBSD through the years.
10462 2018-06-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
10464 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
10465 behavior of vec_pack (vector double, vector double) to match
10466 behavior of vec_float2 (vector double, vector double).
10468 2018-06-22 Olivier Hainque <hainque@adacore.com>
10470 * gimplify.c (gimplify_function_tree): Prevent creation
10471 of a trampoline for the address of the current function
10472 passed to entry/exit instrumentation hooks.
10474 2018-06-22 Aaron Sawdey <acsawdey@linux.ibm.com>
10477 * config/rs6000/rs6000-string.c (expand_strn_compare): Handle -m32
10480 2018-06-22 Martin Liska <mliska@suse.cz>
10482 PR tree-optimization/86263
10483 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
10484 Bail out if is_enabled is false.
10485 * tree-switch-conversion.h (jump_table_cluster::is_enabled):
10487 (jump_table_cluster::is_enabled): New function.
10489 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
10491 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
10492 BINFO_BASE_ACCESSES and BINFO_VPTR_FIELD.
10493 * tree-streamer-in.c (streamer_read_tree_bitfields): Likewise.
10494 (lto_input_ts_binfo_tree_pointers): Likewise.
10495 * tree-streamer-out.c (streamer_write_tree_bitfields,
10496 write_ts_binfo_tree_pointers): Likewise.
10497 * tree.c (free_lang_data_in_binfo): Clear BINFO_VPTR_FIELD.
10499 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
10501 * tree.c (free_lang_data_in_type): Free all TYPE_VFIELDs.
10503 2018-06-22 Martin Liska <mliska@suse.cz>
10505 * symbol-summary.h (get): Make it pure and inline move
10506 functionality from ::get function.
10507 (get): Remove and inline into ::get and ::get_create.
10508 (get_create): Move code from ::get function.
10510 2018-06-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
10513 * config/i386/sol2.h (CPP_SPEC): Don't pass -P for
10514 -x assembler-with-cpp.
10516 2018-06-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
10518 * config/sol2.h (TARGET_OS_CPP_BUILTINS): Define
10519 _FILE_OFFSET_BITS=64 for C++.
10521 2018-06-21 Michael Meissner <meissner@linux.ibm.com>
10523 * config/rs6000/rs6000.md (extendtfif2): Add missing 128-bit
10524 conversion insn that shows up when pr85657-3.c is compiled using
10525 IEEE 128-bit long double.
10526 (neg<mode>2_internal): Use the correct mode to check whether the
10527 mode is IBM extended.
10528 * config/rs6000/rs6000.c (init_float128_ieee): Prevent complex
10529 multiply and divide external functions from being created more
10532 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
10534 * cfgrtl.c (fixup_reorder_chain): Do not emit NOPs in DECL_IGNORED_P
10536 (rtl_merge_blocks): Likewise. Do not emit a NOP if the location of
10537 the edge can be forwarded.
10538 (cfg_layout_merge_blocks): Likewise.
10540 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
10542 * except.c (finish_eh_generation): Commit edge insertions only after
10543 the EH edges have been redirected from post-landing to landing pads.
10545 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
10547 * tree-nested.c (get_frame_type): Use create_tmp_var_raw instead of
10548 create_tmp_var_for to create the FRAME decl.
10549 (finalize_nesting_tree_1): Do not unchain the FRAME decl.
10551 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
10553 * tree-inline.c (copy_edges_for_bb): Minor tweak.
10554 (maybe_move_debug_stmts_to_successors): Also reset the locus of the
10555 debug statement when resetting its value.
10556 (expand_call_inline): Copy the locus of the call onto the assignment
10557 of the return value, if any. Use local variable in more cases.
10559 2018-06-21 Martin Liska <mliska@suse.cz>
10561 * ipa-pure-const.c (propagate_nothrow): Use
10562 funct_state_summaries->get.
10563 (dump_malloc_lattice): Likewise.
10564 (propagate_malloc): Likewise.
10566 2018-06-21 Richard Biener <rguenther@suse.de>
10568 * lto-streamer-out.c (DFS::DFS_write_tree_body): Update outdated
10569 comment. Follow BLOCK_ABSTRACT_ORIGIN unconditionally.
10570 * tree-streamer-in.c (lto_input_ts_block_tree_pointers): Update
10572 * tree-streamer-out.c (write_ts_block_tree_pointers): Stream
10573 BLOCK_ABSTRACT_ORIGIN unconditionally.
10575 2018-06-21 David Malcolm <dmalcolm@redhat.com>
10577 * ipa-cp.c (ipcp_driver): Set edge_clone_summaries to NULL after
10579 * ipa-reference.c (ipa_reference_c_finalize): Delete
10580 ipa_ref_opt_sum_summaries and set it to NULL.
10582 2018-06-21 Tom de Vries <tdevries@suse.de>
10584 PR tree-optimization/85859
10585 * tree-ssa-tail-merge.c (stmt_local_def): Copy gimple_is_call
10586 test with comment from bb_no_side_effects_p.
10588 2018-06-21 Richard Biener <rguenther@suse.de>
10590 PR tree-optimization/86232
10591 * tree-ssa-loop-niter.c (number_of_iterations_popcount): Adjust
10592 max for constant niter.
10594 2018-06-21 Andre Vieira <andre.simoesdiasvieira@arm.com>
10596 * config/aarch64/aarch64-simd.md
10597 (*aarch64_crypto_aes<aes_op>v16qi_xor_combine): New.
10599 2018-06-21 Andre Vieira <andre.simoesdiasvieira@arm.com>
10601 * config/aarch64/aarch64-simd.md (aarch64_crypto_aes<aes_op>v16qi):
10602 Make opernads of the unspec commutative.
10604 2018-06-21 Richard Biener <rguenther@suse.de>
10606 * tree-data-ref.c (dr_step_indicator): Handle NULL DR_STEP.
10607 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr):
10608 Avoid calling vect_mark_for_runtime_alias_test with gathers or scatters.
10609 (vect_analyze_data_ref_dependence): Re-order checks to deal with
10611 (vect_record_base_alignments): Do not record base alignment
10612 for gathers or scatters.
10613 (vect_compute_data_ref_alignment): Drop return value that is always
10614 true. Bail out early for gathers or scatters.
10615 (vect_enhance_data_refs_alignment): Bail out early for gathers
10617 (vect_find_same_alignment_drs): Likewise.
10618 (vect_analyze_data_refs_alignment): Remove dead code.
10619 (vect_slp_analyze_and_verify_node_alignment): Likewise.
10620 (vect_analyze_data_refs): For possible gathers or scatters do
10621 not create an alternate DR, just check their possible validity
10622 and mark them. Adjust DECL_NONALIASED handling to not rely
10623 on DR_BASE_ADDRESS.
10624 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Do not
10625 update inits of gathers or scatters.
10626 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern):
10627 Also copy gather/scatter flag to pattern vinfo.
10629 2018-06-20 Kelvin Nilsen <kelvin@gcc.gnu.org>
10631 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
10632 behavior of vec_packsu (vector unsigned long long, vector unsigned
10633 long long) to match behavior of vec_packs with same signature.
10635 2018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
10636 Thomas Schwinge <thomas@codesourcery.com>
10637 Cesar Philippidis <cesar@codesourcery.com>
10639 * gimplify.c (gimplify_scan_omp_clauses): Add support for
10640 OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
10641 (gimplify_adjust_omp_clauses): Likewise.
10642 (gimplify_oacc_declare_1): Add support for GOMP_MAP_RELEASE, remove
10643 support for GOMP_MAP_FORCE_{ALLOC,TO,FROM,TOFROM}.
10644 (gimplify_omp_target_update): Update handling of acc update and
10646 * omp-low.c (install_var_field): Remove unused parameter
10647 base_pointers_restrict.
10648 (scan_sharing_clauses): Remove base_pointers_restrict parameter.
10649 Update call to install_var_field. Handle OMP_CLAUSE_{IF_PRESENT,
10651 (omp_target_base_pointers_restrict_p): Delete.
10652 (scan_omp_target): Update call to scan_sharing_clauses.
10653 * tree-core.h (enum omp_clause_code): Add OMP_CLAUSE_{IF_PRESENT,
10655 * tree-nested.c (convert_nonlocal_omp_clauses): Handle
10656 OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
10657 (convert_local_omp_clauses): Likewise.
10658 * tree-pretty-print.c (dump_omp_clause): Likewise.
10659 * tree.c (omp_clause_num_ops): Add entries for OMP_CLAUSE_{IF_PRESENT,
10661 (omp_clause_code_name): Likewise.
10663 2018-06-20 Jakub Jelinek <jakub@redhat.com>
10666 * var-tracking.c (use_narrower_mode_test): Check if shift amount can
10669 PR tree-optimization/86231
10670 * tree-vrp.c (union_ranges): For ( [ ) ] or ( )[ ] range and
10671 anti-range don't overwrite *vr0min before using it to compute *vr0max.
10673 2018-06-20 Tom de Vries <tdevries@suse.de>
10675 PR tree-optimization/86097
10676 * tree-ssa-loop-manip.c (canonicalize_loop_ivs): Also convert *nit to
10677 iv type if signedness of iv type is not the same as that of *nit.
10679 2018-06-20 Jakub Jelinek <jakub@redhat.com>
10681 * cfgrtl.c (rtl_verify_edges): Formatting fix. If bb->preds has any
10682 EDGE_EH edges, verify they are all EDGE_EH.
10684 2018-06-20 Maya Rashish <coypu@sdf.org>
10686 * ginclude/stddef.h: Limit #include <machine/ansi.h> to NetBSD.
10688 2018-06-20 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
10690 * config/aarch64/aarch64-tuning-flags.def (no_ldp_stp_qregs): New.
10691 * config/aarch64/aarch64.c (xgene1_tunings): Add
10692 AARCH64_EXTRA_TUNE_NO_LDP_STP_QREGS to tune_flags.
10693 (aarch64_mode_valid_for_sched_fusion_p):
10694 Allow 16-byte modes.
10695 (aarch64_classify_address): Allow 16-byte modes for load_store_pair_p.
10696 * config/aarch64/aarch64-ldpstp.md: Add peepholes for LDP STP of
10698 * config/aarch64/aarch64-simd.md (load_pair<VQ:mode><VQ2:mode>):
10700 (vec_store_pair<VQ:mode><VQ2:mode>): Likewise.
10701 * config/aarch64/iterators.md (VQ2): New mode iterator.
10703 2018-06-20 Martin Liska <mliska@suse.cz>
10705 * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
10706 Change default ratio from 10 to 8.
10708 2018-06-20 Martin Liska <mliska@suse.cz>
10710 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
10712 (bit_test_cluster::find_bit_tests): Likewise.
10713 (switch_decision_tree::analyze_switch_statement): Find clusters.
10714 * tree-switch-conversion.h (struct jump_table_cluster): Document
10717 2018-06-20 Martin Liska <mliska@suse.cz>
10719 * tree-switch-conversion.c (switch_conversion::collect):
10720 Record m_uniq property.
10721 (switch_conversion::expand): Bail out for special conditions.
10722 (group_cluster::~group_cluster): New.
10723 (group_cluster::group_cluster): Likewise.
10724 (group_cluster::dump): Likewise.
10725 (jump_table_cluster::emit): New.
10726 (switch_decision_tree::fix_phi_operands_for_edges): New.
10727 (struct case_node): Remove struct.
10728 (jump_table_cluster::can_be_handled): New.
10729 (case_values_threshold): Moved to header.
10730 (reset_out_edges_aux): Likewise.
10731 (jump_table_cluster::is_beneficial): New.
10732 (bit_test_cluster::can_be_handled): Likewise.
10733 (add_case_node): Remove.
10734 (bit_test_cluster::is_beneficial): New.
10735 (case_bit_test::cmp): New.
10736 (bit_test_cluster::emit): New.
10737 (expand_switch_as_decision_tree_p): Remove.
10738 (bit_test_cluster::hoist_edge_and_branch_if_true): New.
10739 (fix_phi_operands_for_edge): Likewise.
10740 (switch_decision_tree::analyze_switch_statement): New.
10741 (compute_cases_per_edge): Move ...
10742 (switch_decision_tree::compute_cases_per_edge): ... here.
10743 (try_switch_expansion): Likewise.
10744 (switch_decision_tree::try_switch_expansion): Likewise.
10745 (record_phi_operand_mapping): Likewise.
10746 (switch_decision_tree::record_phi_operand_mapping): Likewise.
10747 (emit_case_decision_tree): Likewise.
10748 (switch_decision_tree::emit): Likewise.
10749 (balance_case_nodes): Likewise.
10750 (switch_decision_tree::balance_case_nodes): Likewise.
10751 (dump_case_nodes): Likewise.
10752 (switch_decision_tree::dump_case_nodes): Likewise.
10753 (emit_jump): Likewise.
10754 (switch_decision_tree::emit_jump): Likewise.
10755 (emit_cmp_and_jump_insns): Likewise.
10756 (switch_decision_tree::emit_cmp_and_jump_insns): Likewise.
10757 (emit_case_nodes): Likewise.
10758 (switch_decision_tree::emit_case_nodes): Likewise.
10759 (conditional_probability): Remove.
10760 * tree-switch-conversion.h (enum cluster_type): New.
10762 (struct cluster): Likewise.
10763 (cluster::cluster): Likewise.
10764 (struct simple_cluster): Likewise.
10765 (simple_cluster::simple_cluster): Likewise.
10766 (struct group_cluster): Likewise.
10767 (struct jump_table_cluster): Likewise.
10768 (struct bit_test_cluster): Likewise.
10769 (struct min_cluster_item): Likewise.
10770 (struct case_tree_node): Likewise.
10771 (case_tree_node::case_tree_node): Likewise.
10772 (jump_table_cluster::case_values_threshold): Likewise.
10773 (struct case_bit_test): Likewise.
10774 (struct switch_decision_tree): Likewise.
10775 (struct switch_conversion): Likewise.
10776 (switch_decision_tree::reset_out_edges_aux): Likewise.
10778 2018-06-20 Martin Liska <mliska@suse.cz>
10780 * tree-switch-conversion.c (MAX_CASE_BIT_TESTS): Remove.
10781 (hoist_edge_and_branch_if_true): Likewise.
10782 (expand_switch_using_bit_tests_p): Likewise.
10783 (struct case_bit_test): Likewise.
10784 (case_bit_test_cmp): Likewise.
10785 (emit_case_bit_tests): Likewise.
10786 (switch_conversion::switch_conversion): New class.
10787 (struct switch_conv_info): Remove old struct.
10788 (collect_switch_conv_info): More to ...
10789 (switch_conversion::collect): ... this.
10790 (check_range): Likewise.
10791 (switch_conversion::check_range): Likewise.
10792 (check_all_empty_except_final): Likewise.
10793 (switch_conversion::check_all_empty_except_final): Likewise.
10794 (check_final_bb): Likewise.
10795 (switch_conversion::check_final_bb): Likewise.
10796 (create_temp_arrays): Likewise.
10797 (switch_conversion::create_temp_arrays): Likewise.
10798 (free_temp_arrays): Likewise.
10799 (gather_default_values): Likewise.
10800 (switch_conversion::gather_default_values): Likewise.
10801 (build_constructors): Likewise.
10802 (switch_conversion::build_constructors): Likewise.
10803 (constructor_contains_same_values_p): Likewise.
10804 (switch_conversion::contains_same_values_p): Likewise.
10805 (array_value_type): Likewise.
10806 (switch_conversion::array_value_type): Likewise.
10807 (build_one_array): Likewise.
10808 (switch_conversion::build_one_array): Likewise.
10809 (build_arrays): Likewise.
10810 (switch_conversion::build_arrays): Likewise.
10811 (gen_def_assigns): Likewise.
10812 (switch_conversion::gen_def_assigns): Likewise.
10813 (prune_bbs): Likewise.
10814 (switch_conversion::prune_bbs): Likewise.
10815 (fix_phi_nodes): Likewise.
10816 (switch_conversion::fix_phi_nodes): Likewise.
10817 (gen_inbound_check): Likewise.
10818 (switch_conversion::gen_inbound_check): Likewise.
10819 (process_switch): Use the newly created class.
10820 (switch_conversion::expand): New.
10821 (switch_conversion::~switch_conversion): New.
10822 * tree-switch-conversion.h: New file.
10824 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
10826 * tree-vectorizer.h (NUM_PATTERNS, vect_recog_func_ptr): Move to
10827 tree-vect-patterns.c.
10828 * tree-vect-patterns.c (vect_supportable_direct_optab_p): New function.
10829 (vect_recog_dot_prod_pattern): Use it. Remove the type_in argument.
10830 (vect_recog_sad_pattern): Likewise.
10831 (vect_recog_widen_sum_pattern): Likewise.
10832 (vect_recog_pow_pattern): Likewise. Check for a null vectype.
10833 (vect_recog_widen_shift_pattern): Remove the type_in argument.
10834 (vect_recog_rotate_pattern): Likewise.
10835 (vect_recog_mult_pattern): Likewise.
10836 (vect_recog_vector_vector_shift_pattern): Likewise.
10837 (vect_recog_divmod_pattern): Likewise.
10838 (vect_recog_mixed_size_cond_pattern): Likewise.
10839 (vect_recog_bool_pattern): Likewise.
10840 (vect_recog_mask_conversion_pattern): Likewise.
10841 (vect_try_gather_scatter_pattern): Likewise.
10842 (vect_recog_widen_mult_pattern): Likewise. Check for a null vectype.
10843 (vect_recog_over_widening_pattern): Likewise.
10844 (vect_recog_gather_scatter_pattern): Likewise.
10845 (vect_recog_func_ptr): Move from tree-vectorizer.h
10846 (vect_vect_recog_func_ptrs): Move further down the file.
10847 (vect_recog_func): Likewise. Remove the third argument.
10848 (NUM_PATTERNS): Define based on vect_vect_recog_func_ptrs.
10849 (vect_pattern_recog_1): Expect the pattern function to do any
10850 necessary target tests. Also expect it to provide a vector type.
10851 Remove the type_in handling.
10853 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
10855 * tree-vect-patterns.c (vect_pattern_detected): New function.
10856 (vect_recog_dot_prod_patternm, vect_recog_sad_pattern)
10857 (vect_recog_widen_mult_pattern, vect_recog_widen_sum_pattern)
10858 (vect_recog_over_widening_pattern, vect_recog_widen_shift_pattern
10859 (vect_recog_rotate_pattern, vect_recog_vector_vector_shift_pattern)
10860 (vect_recog_mult_pattern, vect_recog_divmod_pattern)
10861 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
10862 (vect_recog_mask_conversion_pattern)
10863 (vect_try_gather_scatter_pattern): Likewise.
10865 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
10867 * tree-vect-patterns.c (vect_get_internal_def): New function.
10868 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
10869 (vect_recog_vector_vector_shift_pattern, check_bool_pattern)
10870 (search_type_for_mask_1): Use it.
10872 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
10874 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
10875 redundant WIDEN_SUM_EXPR handling.
10876 (vect_recog_sad_pattern): Likewise.
10878 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
10880 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
10881 redundant check that the types of a PLUS_EXPR or MULT_EXPR agree.
10882 (vect_recog_sad_pattern): Likewise PLUS_EXPR, ABS_EXPR and MINUS_EXPR.
10883 (vect_recog_widen_mult_pattern): Likewise MULT_EXPR.
10884 (vect_recog_widen_sum_pattern): Likewise PLUS_EXPR.
10886 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
10888 * tree-vect-stmts.c (vectorizable_call): Make sure that we
10889 use the stmt_vec_info of the original bb statement for the
10890 new zero assignment, even if the call is part of a pattern.
10892 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
10894 * tree-vectorizer.h (_stmt_vec_info): Note above pattern_def_seq
10895 that the sequence is attached to the original statement rather
10896 than the pattern statement.
10897 * tree-vect-loop.c (vect_determine_vf_for_stmt): Take the
10898 PATTERN_DEF_SEQ from the original statement rather than
10899 the main pattern statement.
10900 * tree-vect-stmts.c (free_stmt_vec_info): Likewise.
10901 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Likewise.
10902 (vect_mark_pattern_stmts): Don't copy the PATTERN_DEF_SEQ.
10904 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
10906 * tree-vect-stmts.c (vect_analyze_stmt): Move the handling of pattern
10907 definition statements before the early exit for statements that aren't
10909 * tree-vect-loop.c (vect_transform_loop_stmt): New function,
10911 (vect_transform_loop): ...here. Process pattern definition
10912 statements without first checking whether the main pattern
10913 statement is live or relevant.
10915 2018-06-19 Eric Botcazou <ebotcazou@adacore.com>
10917 * tree-cfgcleanup.c (tree_forwarder_block_p): Do not return false at
10918 -O0 if the locus represent UNKNOWN_LOCATION but have different values.
10920 2018-06-19 Aaron Sawdey <acsawdey@linux.ibm.com>
10922 * config/rs6000/rs6000-string.c (select_block_compare_mode): Check
10923 TARGET_EFFICIENT_OVERLAPPING_UNALIGNED here instead of in caller.
10924 (do_and3, do_and3_mask, do_compb3, do_rotl3): New functions.
10925 (expand_block_compare): Change select_block_compare_mode call.
10926 (expand_strncmp_align_check): Use new functions, fix comment.
10927 (emit_final_str_compare_gpr): New function.
10928 (expand_strn_compare): Refactor and clean up code.
10929 * config/rs6000/vsx.md (vsx_mov<mode>_64bit): Remove *.
10931 2018-06-19 Tony Reix <tony.reix@atos.com>
10932 Damien Bergamini <damien.bergamini@atos.com>
10933 David Edelsohn <dje.gcc@gmail.com>
10935 * collect2.c (static_obj): New variable.
10936 (static_libs): New variable.
10937 (is_in_list): Uncomment declaration.
10938 (main): Track AIX libraries linked statically.
10939 (is_in_list): Uncomment definition.
10940 (scan_prog_file): Don't add AIX shared libraries initializer
10941 to constructor list if linking statically.
10943 2018-06-19 Max Filippov <jcmvbkbc@gmail.com>
10945 * config/xtensa/xtensa.md (UNSPEC_FRAME_BLOCKAGE): New unspec
10947 (allocate_stack, frame_blockage, *frame_blockage): New patterns.
10949 2018-06-19 Jan Hubicka <hubicka@ucw.cz>
10951 * tree.c (find_decls_types_r): Remove all non-VAR_DECLs from
10954 2018-06-19 Martin Liska <mliska@suse.cz>
10956 * config/i386/i386.c (ix86_can_inline_p): Do not use
10957 ipa_fn_summaries::get_create.
10958 * ipa-cp.c (ipcp_cloning_candidate_p): Replace get_create with
10960 (devirtualization_time_bonus): Likewise.
10961 (ipcp_propagate_stage): Likewise.
10962 * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
10963 (edge_set_predicate): Likewise.
10964 (evaluate_conditions_for_known_args): Likewise.
10965 (evaluate_properties_for_edge): Likewise.
10966 (ipa_call_summary::reset): Tranform to ...
10967 (ipa_call_summary::~ipa_call_summary): ... this.
10968 (ipa_fn_summary::reset): Transform to ...
10969 (ipa_fn_summary::~ipa_fn_summary): ... this.
10970 (ipa_fn_summary_t::remove): Rename to ...
10971 (ipa_fn_summary_t::remove_callees): ... this.
10972 (ipa_fn_summary_t::duplicate): Use placement new
10973 instead of memory copy.
10974 (ipa_call_summary_t::duplicate): Likewise.
10975 (ipa_call_summary_t::remove): Remove.
10976 (dump_ipa_call_summary): Change get_create to get.
10977 (ipa_dump_fn_summary): Dump only when summary exists.
10978 (analyze_function_body): Use symbol_summary::get instead
10980 (compute_fn_summary): Likewise.
10981 (estimate_edge_devirt_benefit): Likewise.
10982 (estimate_edge_size_and_time): Likewise.
10983 (inline_update_callee_summaries): Likewise.
10984 (remap_edge_change_prob): Likewise.
10985 (remap_edge_summaries): Likewise.
10986 (ipa_merge_fn_summary_after_inlining): Likewise.
10987 (write_ipa_call_summary): Likewise.
10988 (ipa_fn_summary_write): Likewise.
10989 (ipa_free_fn_summary): Likewise.
10990 * ipa-fnsummary.h (struct GTY): Add new ctor and copy ctor.
10991 (struct ipa_call_summary): Likewise.
10992 * ipa-icf.c (sem_function::merge): Use symbol_summary::get instead
10994 * ipa-inline-analysis.c (do_estimate_edge_time): Likewise.
10995 (estimate_size_after_inlining): Likewise.
10996 (estimate_growth): Likewise.
10997 (growth_likely_positive): Likewise.
10998 * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
10999 (inline_call): Likewise.
11000 * ipa-inline.c (caller_growth_limits): Likewise.
11001 (can_inline_edge_p): Likewise.
11002 (can_inline_edge_by_limits_p): Likewise.
11003 (compute_uninlined_call_time): Likewise.
11004 (compute_inlined_call_time): Likewise.
11005 (want_inline_small_function_p): Likewise.
11006 (edge_badness): Likewise.
11007 (update_caller_keys): Likewise.
11008 (update_callee_keys): Likewise.
11009 (inline_small_functions): Likewise.
11010 (inline_to_all_callers_1): Likewise.
11011 (dump_overall_stats): Likewise.
11012 (early_inline_small_functions): Likewise.
11013 (early_inliner): Likewise.
11014 * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
11015 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
11016 * ipa-pure-const.c (malloc_candidate_p): Likewise.
11017 * ipa-split.c (execute_split_functions): Likewise.
11018 * symbol-summary.h: Likewise.
11019 * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
11021 2018-06-19 Richard Biener <rguenther@suse.de>
11023 * tree-vectorizer.c (try_vectorize_loop_1): Split out of ...
11024 (vectorize_loops): ... here. Fix dbgcnt handling.
11025 (try_vectorize_loop): Wrap try_vectorize_loop_1.
11027 2018-06-19 Segher Boessenkool <segher@kernel.crashing.org>
11030 * config/rs6000/rs6000.md (rs6000_discover_homogeneous_aggregate): An
11031 ieee128 argument takes up only one (vector) register, not two (floating
11034 2018-06-19 Eric Botcazou <ebotcazou@adacore.com>
11036 * gimplify.c (gimplify_init_constructor): Really never clear for an
11037 incomplete constructor if CONSTRUCTOR_NO_CLEARING is set.
11039 2018-06-19 Richard Biener <rguenther@suse.de>
11041 PR tree-optimization/86179
11042 * tree-vect-patterns.c (vect_pattern_recog_1): Clean up
11043 after failed recognition.
11045 2018-06-18 Martin Sebor <msebor@redhat.com>
11047 PR middle-end/85602
11048 * calls.c (maybe_warn_nonstring_arg): Handle strncat.
11049 * tree-ssa-strlen.c (is_strlen_related_p): Make extern.
11050 Handle integer subtraction.
11051 (maybe_diag_stxncpy_trunc): Handle nonstring source arguments.
11052 * tree-ssa-strlen.h (is_strlen_related_p): Declare.
11054 2018-06-18 David Malcolm <dmalcolm@redhat.com>
11056 * config/frv/frv-protos.h (frv_ifcvt_modify_insn): Strengthen 3rd
11057 param from rtx to rtx_insn *.
11058 * config/frv/frv.c (frv_ifcvt_add_insn): Likewise for "insn"
11060 (frv_ifcvt_modify_insn): Likwise.
11061 (frv_ifcvt_modify_final): Likwise for local "existing_insn",
11062 adding an as_a <rtx_insn *> cast. Likewise for local "insn".
11063 * config/mips/mips.c (r10k_insert_cache_barriers): Add an
11064 as_a <rtx_insn *> cast to local "unprotected_region" once
11065 it's been established that it's not NULL or pc_rtx.
11066 * config/nds32/nds32-relax-opt.c (nds32_group_insns): Strengthen
11067 param "sethi" from rtx to rtx_insn *.
11068 (nds32_group_float_insns): Likewise for param "insn".
11069 * config/vax/vax-protos.h (vax_output_int_add): Likewise for 1st
11071 (vax_output_int_subtract): Likewise.
11072 * config/vax/vax.c (vax_output_int_add): Likewise for param
11074 (vax_output_int_subtract): Likewise.
11075 * emit-rtl.c (set_insn_deleted): Likewise, removing cast.
11076 (emit_pattern_after): Likewise for param "after".
11077 (emit_insn_after): Likewise.
11078 (emit_jump_insn_after): Likewise.
11079 (emit_call_insn_after): Likewise.
11080 (emit_debug_insn_after): Likewise.
11081 (emit_pattern_before): Likewise for param "before".
11082 (emit_insn_before): Likewise.
11083 (emit_jump_insn_before): Likewise.
11084 * final.c (get_insn_template): Likewise for param "insn", removing
11086 * output.h (get_insn_template): Likewise for 2nd param.
11087 * rtl.h (emit_insn_before): Likewise.
11088 (emit_jump_insn_before): Likewise.
11089 (emit_debug_insn_before_noloc): Likewise.
11090 (emit_insn_after): Likewise.
11091 (emit_jump_insn_after): Likewise.
11092 (emit_call_insn_after): Likewise.
11093 (emit_debug_insn_after): Likewise.
11094 (set_insn_deleted): Likewise for param.
11096 2018-06-18 Michael Meissner <meissner@linux.ibm.com>
11099 * config/rs6000/rs6000-modes.def (toplevel): Rework the 128-bit
11100 floating point modes, so that IFmode is numerically greater than
11101 TFmode, which is greater than KFmode using FRACTIONAL_FLOAT_MODE
11102 to declare the ordering. This prevents IFmode from being
11103 converted to TFmode when long double is IEEE 128-bit on an ISA 3.0
11104 machine. Include rs6000-modes.h to share the fractional values
11105 between genmodes* and the rest of the compiler.
11106 (IFmode): Likewise.
11107 (KFmode): Likewise.
11108 (TFmode): Likewise.
11109 * config/rs6000/rs6000-modes.h: New file.
11110 * config/rs6000/rs6000.c (rs6000_debug_reg_global): Change the
11111 meaning of rs6000_long_double_size so that 126..128 selects an
11112 appropriate 128-bit floating point type.
11113 (rs6000_option_override_internal): Likewise.
11114 * config/rs6000/rs6000.h (toplevel): Include rs6000-modes.h.
11115 (TARGET_LONG_DOUBLE_128): Change the meaning of
11116 rs6000_long_double_size so that 126..128 selects an appropriate
11117 128-bit floating point type.
11118 (LONG_DOUBLE_TYPE_SIZE): Update comment.
11119 * config/rs6000/rs6000.md (trunciftf2): Correct the modes of the
11120 source and destination to match the standard usage.
11121 (truncifkf2): Likewise.
11122 (copysign<mode>3, IEEE iterator): Rework copysign of float128 on
11123 ISA 2.07 to use an explicit clobber, instead of passing in a
11125 (copysign<mode>3_soft): Likewise.
11127 2018-06-18 David Malcolm <dmalcolm@redhat.com>
11129 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
11130 Replace dump_printf_loc call with DUMP_VECT_SCOPE.
11131 (vect_slp_analyze_instance_dependence): Likewise.
11132 (vect_enhance_data_refs_alignment): Likewise.
11133 (vect_analyze_data_refs_alignment): Likewise.
11134 (vect_slp_analyze_and_verify_instance_alignment
11135 (vect_analyze_data_ref_accesses): Likewise.
11136 (vect_prune_runtime_alias_test_list): Likewise.
11137 (vect_analyze_data_refs): Likewise.
11138 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Likewise.
11139 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
11140 (vect_analyze_scalar_cycles_1): Likewise.
11141 (vect_get_loop_niters): Likewise.
11142 (vect_analyze_loop_form_1): Likewise.
11143 (vect_update_vf_for_slp): Likewise.
11144 (vect_analyze_loop_operations): Likewise.
11145 (vect_analyze_loop): Likewise.
11146 (vectorizable_induction): Likewise.
11147 (vect_transform_loop): Likewise.
11148 * tree-vect-patterns.c (vect_pattern_recog): Likewise.
11149 * tree-vect-slp.c (vect_analyze_slp): Likewise.
11150 (vect_make_slp_decision): Likewise.
11151 (vect_detect_hybrid_slp): Likewise.
11152 (vect_slp_analyze_operations): Likewise.
11153 (vect_slp_bb): Likewise.
11154 * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Likewise.
11155 (vectorizable_bswap): Likewise.
11156 (vectorizable_call): Likewise.
11157 (vectorizable_simd_clone_call): Likewise.
11158 (vectorizable_conversion): Likewise.
11159 (vectorizable_assignment): Likewise.
11160 (vectorizable_shift): Likewise.
11161 (vectorizable_operation): Likewise.
11162 * tree-vectorizer.h (DUMP_VECT_SCOPE): New macro.
11164 2018-06-18 Martin Sebor <msebor@redhat.com>
11166 PR tree-optimization/81384
11167 * builtin-types.def (BT_FN_SIZE_CONST_STRING_SIZE): New.
11168 * builtins.c (expand_builtin_strnlen): New function.
11169 (expand_builtin): Call it.
11170 (fold_builtin_n): Avoid setting TREE_NO_WARNING.
11171 * builtins.def (BUILT_IN_STRNLEN): New.
11172 * calls.c (maybe_warn_nonstring_arg): Handle BUILT_IN_STRNLEN.
11173 Warn for bounds in excess of maximum object size.
11174 * tree-ssa-strlen.c (maybe_set_strlen_range): Return tree representing
11175 single-value ranges. Handle strnlen.
11176 (handle_builtin_strlen): Handle strnlen.
11177 (strlen_check_and_optimize_stmt): Same.
11178 * doc/extend.texi (Other Builtins): Document strnlen.
11180 2018-06-18 Maya Rashish <coypu@sdf.org>
11182 * config/alpha/openbsd.h (TARGET_DEFAULT): Define.
11183 (LINK_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): Likewise.
11184 (INTMAX_TYPE, UINTMAX_TYPE, WINT_TYPE): Likewise.
11186 * config/alpha/elf.h (STARTFILE_SPEC, ENDFILE_SPEC): Move from
11188 * config/alpha/linux.h (STARTFILE_SPEC, ENDFILE_SPEC): Here.
11190 2018-06-18 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
11192 * tree.c (escaped_string::escape): Replace cast to char * by
11193 const_cast<char *> (unescaped).
11195 2018-06-18 Nick Clifton <nickc@redhat.com>
11198 * tree.c (escaped_string): New class. Converts an unescaped
11199 string into its escaped equivalent.
11200 (warn_deprecated_use): Use the new class to convert the
11201 deprecation message, if present.
11202 (test_escaped_strings): New self test.
11203 (test_c_tests): Add test_escaped_strings.
11204 * doc/extend.texi (deprecated): Add a note that the
11205 deprecation message is affected by the -fmessage-length
11206 option, and that control characters will be escaped.
11207 (#pragma GCC error): Document this pragma.
11208 (#pragma GCC warning): Likewise.
11209 * doc/invoke.texi (-fmessage-length): Document this option's
11210 effect on the #warning and #error preprocessor directives and
11211 the deprecated attribute.
11213 2018-06-18 Eric Botcazou <ebotcazou@adacore.com>
11215 * tree.c (decl_value_expr_lookup): Revert latest change.
11216 (decl_value_expr_insert): Likewise.
11218 2018-06-17 Eric Botcazou <ebotcazou@adacore.com>
11220 * gimplify.c (nonlocal_vlas): Delete.
11221 (nonlocal_vla_vars): Likewise.
11222 (gimplify_var_or_parm_decl): Do not add debug VAR_DECLs for non-local
11224 (gimplify_body): Do not create and destroy nonlocal_vlas.
11225 * tree-nested.c: Include diagnostic.h.
11226 (use_pointer_in_frame): Tweak.
11227 (lookup_field_for_decl): Add assertion and declare the transformation.
11228 (convert_nonlocal_reference_op) <PARM_DECL>: Rework and issue an
11229 internal error when the reference is in a wrong context. Do not
11230 create a debug decl by default.
11231 (note_nonlocal_block_vlas): Delete.
11232 (convert_nonlocal_reference_stmt) <GIMPLE_BIND>: Do not call it.
11233 (convert_local_reference_op) <PARM_DECL>: Skip the frame decl. Do not
11234 create a debug decl by default.
11235 (convert_gimple_call) <GIMPLE_CALL>: Issue an internal error when the
11236 call is in a wrong context.
11237 (fixup_vla_decls): New function.
11238 (finalize_nesting_tree_1): Adjust comment. Call fixup_vla_decls if no
11239 debug variables were created.
11240 * tree.c (decl_value_expr_lookup): Add checking assertion.
11241 (decl_value_expr_insert): Likewise.
11243 2018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
11245 PR middle-end/82479
11246 * ipa-fnsummary.c (will_be_nonconstant_expr_predicate): Handle CALL_EXPR.
11247 * tree-scalar-evolution.c (interpret_expr): Likewise.
11248 (expression_expensive_p): Likewise.
11249 * tree-ssa-loop-ivopts.c (contains_abnormal_ssa_name_p): Likewise.
11250 * tree-ssa-loop-niter.c (number_of_iterations_popcount): New.
11251 (number_of_iterations_exit_assumptions): Use number_of_iterations_popcount.
11252 (ssa_defined_by_minus_one_stmt_p): New.
11254 2018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
11256 PR middle-end/64946
11257 * cfgexpand.c (expand_debug_expr): Hande ABSU_EXPR.
11258 * config/i386/i386.c (ix86_add_stmt_cost): Likewise.
11259 * dojump.c (do_jump): Likewise.
11260 * expr.c (expand_expr_real_2): Check operand type's sign.
11261 * fold-const.c (const_unop): Handle ABSU_EXPR.
11262 (fold_abs_const): Likewise.
11263 * gimple-pretty-print.c (dump_unary_rhs): Likewise.
11264 * gimple-ssa-backprop.c (backprop::process_assign_use): Likesie.
11265 (strip_sign_op_1): Likesise.
11266 * match.pd: Add new pattern to generate ABSU_EXPR.
11267 * optabs-tree.c (optab_for_tree_code): Handle ABSU_EXPR.
11268 * tree-cfg.c (verify_gimple_assign_unary): Likewise.
11269 * tree-eh.c (operation_could_trap_helper_p): Likewise.
11270 * tree-inline.c (estimate_operator_cost): Likewise.
11271 * tree-pretty-print.c (dump_generic_node): Likewise.
11272 * tree-vect-patterns.c (vect_recog_sad_pattern): Likewise.
11273 * tree.def (ABSU_EXPR): New.
11275 2018-06-16 Jakub Jelinek <jakub@redhat.com>
11277 PR middle-end/86095
11278 * common.opt (Wunsafe-loop-optimizations): Add Ignore, remove Var,
11279 documented as preserved for backward compatibility only.
11280 * doc/invoke.texi: Remove -Wunsafe-loop-optimizations documentation.
11282 PR rtl-optimization/86108
11283 * bb-reorder.c (create_forwarder_block): Renamed to ...
11284 (create_eh_forwarder_block): ... this. Split OLD_BB after labels and
11285 jump from new landing pad to the second part.
11286 (sjlj_fix_up_crossing_landing_pad, dw2_fix_up_crossing_landing_pad):
11289 2018-06-15 Jakub Jelinek <jakub@redhat.com>
11291 PR middle-end/85878
11292 * expr.c (expand_assignment): Remove now redundant COMPLEX_MODE_P
11293 check from first store_expr, use to_mode instead of GET_MODE (to_rtx).
11294 Only call store_expr for halves if the mode is the same.
11296 PR middle-end/86123
11297 * match.pd ((X / Y) == 0 -> X < Y): Don't transform complex divisions.
11298 Fix up comment formatting.
11300 2018-06-15 Bernd Edlinger <bernd.edlinger@hotmail.de>
11302 * typed-splay-tree.h (typed_splay_tree::remove): New function.
11303 (typed_splay_tree::closure,
11304 typed_splay_tree::inner_foreach_fn, typed_splay_tree::m_inner): Deleted.
11305 (typed_splay_tree::typed_splay_tree,
11306 typed_splay_tree::operator =): Declared private.
11307 (typed_splay_tree::splay_tree_key, typed_splay_tree::splay_tree_value,
11308 typed_splay_tree::splay_tree_node_s, typed_splay_tree::KDEL,
11309 typed_splay_tree::VDEL, typed_splay_tree::splay_tree_delete_helper,
11310 typed_splay_tree::rotate_left, typed_splay_tree::rotate_right,
11311 typed_splay_tree::splay_tree_splay,
11312 typed_splay_tree::splay_tree_foreach_helper,
11313 typed_splay_tree::splay_tree_insert,
11314 typed_splay_tree::splay_tree_remove,
11315 typed_splay_tree::splay_tree_lookup,
11316 typed_splay_tree::splay_tree_predecessor,
11317 typed_splay_tree::splay_tree_successor,
11318 typed_splay_tree::splay_tree_min,
11319 typed_splay_tree::splay_tree_max): Took over from splay-tree.c/.h.
11320 (typed_splay_tree::root, typed_splay_tree::comp,
11321 typed_splay_tree::delete_key,
11322 typed_splay_tree::delete_value): New data members.
11323 * typed-splay-tree.c (selftest::test_str_to_int): Add a test for
11324 typed_splay_tree::remove.
11326 2018-06-15 Matthew Fortune <matthew.fortune@mips.com>
11328 * config/mips/mips.h (ASM_SPEC): Pass through -mcrc, -mno-crc,
11329 -mginv and -mno-ginv to the assembler.
11330 * config/mips/mips.opt (-mcrc): New option.
11331 (-mginv): Likewise.
11332 * doc/invoke.text (-mcrc): Document.
11333 (-mginv): Likewise.
11335 2018-06-15 Nick Clifton <nickc@redhat.com>
11338 * tree.c (escaped_string): New class. Converts an unescaped
11339 string into its escaped equivalent.
11340 (warn_deprecated_use): Use the new class to convert the
11341 deprecation message, if present.
11342 (test_escaped_strings): New self test.
11343 (test_c_tests): Add test_escaped_strings.
11344 * doc/extend.texi (deprecated): Add a note that the
11345 deprecation message is affected by the -fmessage-length
11346 option, and that control characters will be escaped.
11347 (#pragma GCC error): Document this pragma.
11348 (#pragma GCC warning): Likewise.
11349 * doc/invoke.texi (-fmessage-length): Document this option's
11350 effect on the #warning and #error preprocessor directives and
11351 the deprecated attribute.
11353 2018-06-15 Richard Biener <rguenther@suse.de>
11355 * tree-vect-slp.c (vect_slp_bb): Dump MSG_OPTIMIZED_LOCATIONS
11356 here, also noting vector size used.
11357 * tree-vectorizer.c (vectorize_loops): Adjust. Note vector
11358 size used in MSG_OPTIMIZED_LOCATIONS dump.
11359 (pass_slp_vectorize::execute): Adjust.
11361 2018-06-15 Claudiu Zissulescu <claziss@synopsys.com>
11364 * config/arc/arc.c (arc_return_address_register): Fix
11367 2018-06-15 Richard Biener <rguenther@suse.de>
11369 PR middle-end/86159
11370 * tree-cfg.c (gimplify_build3): Do not strip sign conversions,
11371 leave useless conversion stripping to force_gimple_operand_gsi.
11372 (gimplify_build2): Likewise.
11373 (gimplify_build1): Likewise.
11375 2018-06-15 Richard Biener <rguenther@suse.de>
11377 PR middle-end/86076
11378 * tree-cfg.c (move_stmt_op): unshare invariant addresses
11379 before adjusting their block.
11381 2018-06-15 Sebastian Huber <sebastian.huber@embedded-brains.de>
11383 * config.gcc (riscv*-*-elf* | riscv*-*-rtems*): Use custom
11384 multilibs for *-*-rtems*.
11385 * config/riscv/t-rtems: New file.
11387 2018-06-14 Jakub Jelinek <jakub@redhat.com>
11389 PR middle-end/86122
11390 * match.pd ((A +- CST1) +- CST2): Punt if last resort
11391 unsigned_type_for returns NULL.
11394 * lower-subreg.c (find_decomposable_subregs): Don't decompose float
11395 subregs of multi-word pseudos unless the float mode has word size.
11397 2018-06-14 Richard Biener <rguenther@suse.de>
11399 PR middle-end/86139
11400 * tree-vect-generic.c (build_word_mode_vector_type): Remove
11401 duplicate and harmful type_hash_canon.
11402 * tree.c (type_hash_canon): Assert we didn't find ourselves.
11404 2018-06-14 Richard Biener <rguenther@suse.de>
11407 * tree-ssa-struct-alias.c (create_variable_info_for): Handle
11410 2018-06-14 Sebastian Huber <sebastian.huber@embedded-brains.de>
11412 * config/rtems.h (STDINT_LONG32): Define.
11414 2018-06-13 Matthew Fortune <matthew.fortune@mips.com>
11415 Prachi Godbole <prachi.godbole@imgtec.com>
11417 * config/mips/mips-cpus.def: Define P6600.
11418 * config/mips/mips-tables.opt: Regenerate.
11419 * config/mips/mips.c (mips_ucbranch_type): New enum.
11420 (mips_rtx_cost_data): Add support for P6600.
11421 (mips_issue_rate): Likewise.
11422 (mips_multipass_dfa_lookahead): Likewise.
11423 (mips_avoid_hazard): Likewise.
11424 (mips_reorg_process_insns): Likewise.
11425 (mips_classify_branch_p6600): New function.
11426 * config/mips/mips.h (TUNE_P6600): New define.
11427 (MIPS_ISA_LEVEL_SPEC): Infer mips64r6 from p6600.
11428 (ENABLE_LD_ST_PAIRS): Enable load/store bonding for p6600.
11429 * config/mips/mips.md: Include p6600.md.
11430 (processor): Add p6600.
11431 * config/mips/p6600.md: New file.
11432 * doc/invoke.texi: Add p6600 to supported architectures.
11434 2018-06-13 Martin Sebor <msebor@redhat.com>
11436 PR tree-optimization/86114
11437 * gimple-fold.c (gimple_fold_builtin_strlen): Only handle LHS
11439 * tree-ssa-strlen.c (maybe_set_strlen_range): Same.
11441 2018-06-13 Richard Biener <rguenther@suse.de>
11443 * tree-vect-patterns.c (vect_recog_vector_vector_shift_pattern):
11444 Properly set vector type of the intermediate stmt.
11445 * tree-vect-stmts.c (vectorizable_operation): The destination
11446 var always has vectype_out type.
11448 2018-06-13 Jeff Law <law@redhat.com>
11450 * config/rl78/rl78.c (move_elim_pass): Use TDF_NONE rather than
11451 integer 0 for argument to print_rtl_with_bb.
11452 (rl78_reorg): Likewise.
11454 2018-06-13 David Malcolm <dmalcolm@redhat.com>
11456 * config/arc/arc.c (hwloop_optimize): Strengthen local "end_label"
11457 from rtx to rtx_insn *.
11458 * config/bfin/bfin.c (hwloop_optimize): Likewise for local
11460 (add_sched_insns_for_speculation): Likewise for local "target",
11461 converting usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
11462 * config/c6x/c6x.c (reorg_split_calls): Strengthen param "call_labels"
11463 from rtx_insn ** to rtx_code_label **.
11464 (reorg_emit_nops): Likewise.
11465 (c6x_reorg): Likewise for local "call_labels".
11466 * config/sh/sh-protos.h (get_dest_uid): Strengthen 1st param from
11468 * config/sh/sh.c (dump_table): Strengthen local "lab" from rtx to
11469 rtx_code_label *, adding safe_as_a <rtx_code_label *> casts to
11470 the loops over LABEL_REFS.
11471 (fixup_addr_diff_vecs): Add as_a <rtx_insn *> to usage of
11473 (barrier_align): Convert usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
11474 (get_dest_uid): Strengthen param "label" from rtx to rtx_insn *.
11475 (split_branches): Strengthen local "olabel" from rtx to
11476 rtx_insn *, adding a safe_as_a cast.
11477 * emit-rtl.c (next_real_insn): Strengthen param from "rtx"
11479 (add_insn_after): Likewise for first two params.
11480 (add_insn_before): Likewise.
11481 (remove_insn): Likewise for param.
11482 (emit_pattern_before_noloc): Likewise for second and third params.
11483 (emit_jump_insn_before_noloc): Convert NULL_RTX to NULL.
11484 (emit_call_insn_before_noloc): Likewise.
11485 (emit_debug_insn_before_noloc): Strengthen "before" param from "rtx"
11487 (emit_barrier_before): Likewise.
11488 (emit_label_before): Strengthen "label" param from "rtx" to
11489 "rtx_code_label *". Strengthen "before" param from "rtx" to
11491 (emit_insn_after_1): Strengthen "after" param from "rtx" to
11493 (emit_pattern_after_noloc): Likewise.
11494 (emit_insn_after_noloc): Likewise.
11495 (emit_jump_insn_after_noloc): Likewise.
11496 (emit_call_insn_after_noloc): Likewise.
11497 (emit_debug_insn_after_noloc): Likewise.
11498 (emit_barrier_after): Likewise.
11499 (emit_label_after): Likewise for both params.
11500 (emit_pattern_after_setloc): Likewise for "after" param. Convert
11501 "loc" param from "int" to "location_t".
11502 (emit_insn_after_setloc): Likewise.
11503 (emit_jump_insn_after_setloc): Likewise.
11504 (emit_call_insn_after_setloc): Likewise.
11505 (emit_debug_insn_after_setloc): Likewise.
11506 (emit_pattern_before_setloc): Likewise for "before" param. Convert
11507 "loc" param from "int" to "location_t".
11508 (emit_pattern_before): Convert NULL_RTX to NULL.
11509 (emit_insn_before_setloc): Convert "loc" param from "int" to
11511 (emit_jump_insn_before_setloc): Likewise.
11512 (emit_call_insn_before_setloc): Likewise.
11513 (emit_debug_insn_before_setloc): Strengthen "before" param from rtx to
11514 rtx_insn *. Convert "loc" param from "int" to "location_t".
11515 * rtl.h (emit_insn_before_setloc, emit_jump_insn_before_setloc,
11516 emit_call_insn_before_setloc, emit_debug_insn_before_setloc):
11517 Convert 3rd param from "int" to "location_t".
11518 (emit_barrier_before, emit_barrier_after, next_real_insn):
11519 Strengthen param from rtx to rtx_insn *.
11520 (emit_label_before): Strengthen 1st param from "rtx" to
11521 "rtx_code_label *". Strengthen 2nd param from "rtx" to
11523 (emit_insn_after_noloc, emit_jump_insn_after_noloc,
11524 emit_call_insn_after_noloc, emit_debug_insn_after_noloc):
11525 Strengthen 2nd param from "rtx" to "rtx_insn *".
11526 (emit_insn_after_setloc, emit_jump_insn_after_setloc)
11527 emit_call_insn_after_setloc, emit_debug_insn_after_setloc):
11528 Likewise. Convert 3rd param from "int" to "location_t".
11529 (emit_label_after): Strengthen 1st param from "rtx" to
11530 "rtx_code_label *".
11531 (next_real_insn, remove_insn): Strengthen param from "rtx" to
11533 (add_insn_before, add_insn_after): Strengthen 1st and 2nd params
11534 from "rtx" to "rtx_insn *".
11536 2018-06-13 Jan Hubicka <hubicka@gcc.gnu.org>
11538 * cgraph.c (cgraph_node::get_untransformed_body): Dump function
11539 bodies streamed in with -Q.
11540 * dumpfile.c (dump_files): Add lto-stream-out dump file.
11541 * dumpfile.h (tree_dump_index): Add lto_stream_out.
11542 * gimple-streamer-out.c: Include gimple-pretty-print.h
11543 (output_bb): Dump stmts streamed.
11544 * lto-section-out.c: Include print-tree.h
11545 (lto_begin_section): Dump sections created.
11546 (lto_output_decl_index): Dump decl encoded.
11547 * lto-streamer-out.c: Include print-tree.h
11548 (create_output_block): Dump output block created.
11549 (DFS::DFS_write_tree_body): Dump DFS SCCs streamed.
11550 (output_function): Dump function output.
11551 (output_constructor): Dump constructor streamed.
11552 (write_global_stream): Output indexes encoded.
11553 (produce_asm_for_decls): Dump streams encoded.
11554 * lto-streamer.c (streamer_dump_file): New global var.
11555 * lto-streamer.h (streamer_dump_file): Declare.
11556 * passes.c (ipa_write_summaries): Initialize streamer dump.
11557 * varpool.c (varpool_node::get_constructor): Dump constructors streamed
11560 2018-06-13 Eric Botcazou <ebotcazou@adacore.com>
11563 * config/i386/winnt.c (i386_pe_seh_cold_init): Do not emit negative
11564 offsets for register save directives. Emit a second batch of save
11565 directives, if need be, when the function accesses prior frames.
11567 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
11569 * config/arc/fpu.md (fmasf4): Force operand to register.
11570 (fnmasf4): Likewise.
11572 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
11574 * config/arc/arc-protos.h (arc_pad_return): Remove.
11575 * config/arc/arc.c (machine_function): Remove force_short_suffix
11577 (arc_print_operand): Adjust printing of '&'.
11578 (arc_verify_short): Remove conditional printing of short suffix.
11579 (arc_final_prescan_insn): Remove reference to size_reason.
11580 (pad_return): New function.
11581 (arc_reorg): Call pad_return.
11582 (arc_pad_return): Remove.
11583 (arc_init_machine_status): Remove reference to force_short_suffix.
11584 * config/arc/arc.md (vunspec): Add VUNSPEC_ARC_BLOCKAGE.
11585 (attr length): When attribute iscompact is true force to 2
11586 regardless; in the case of maybe check if we want to force the
11587 instruction to have 4 bytes length.
11588 (nopv): Change it to generate 4 byte long nop as well.
11589 (blockage): New pattern.
11590 (simple_return): Remove call to arc_pad_return.
11591 (p_return_i): Likewise.
11593 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
11595 * config/arc/elf.h (LINK_GCC_C_SEQUENCE_SPEC): Define.
11597 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
11599 * config/arc/builtins.def (SYNC): SYNC instruction is valid on all
11602 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
11604 * config/arc/arc.c (atomic_exchangesi): EX instruction is default
11605 for ARC700 and ARCv2.
11607 2018-06-13 Chenghua Xu <paul.hua.gm@gmail.com>
11610 * config/mips/loongson.md (vec_setv4hi): Gen_lowpart for
11611 operands[2] instead of operands[1].
11614 2018-06-12 Richard Sandiford <richard.sandiford@linaro.org>
11616 * lra-constraints.c (simplify_operand_subreg): In the paradoxical
11617 case, check whether the outer register overlaps an unallocatable
11618 register, not just whether it fits the required class.
11620 2018-06-12 Richard Sandiford <richard.sandiford@linaro.org>
11622 * poly-int.h (can_div_trunc_p): Add new overload in which all values
11624 * alias.c (get_addr): Extend CONST_INT handling to poly_int_rtx_p.
11625 (memrefs_conflict_p): Likewise.
11626 (init_alias_analysis): Likewise.
11627 * cfgexpand.c (expand_debug_expr): Likewise.
11628 * combine.c (combine_simplify_rtx, force_int_to_mode): Likewise.
11629 * cse.c (fold_rtx): Likewise.
11630 * explow.c (adjust_stack, anti_adjust_stack): Likewise.
11631 * expr.c (emit_block_move_hints): Likewise.
11632 (clear_storage_hints, push_block, emit_push_insn): Likewise.
11633 (store_expr_with_bounds, reduce_to_bit_field_precision): Likewise.
11634 (emit_group_load_1): Use rtx_to_poly_int64 for group offsets.
11635 (emit_group_store): Likewise.
11636 (find_args_size_adjust): Use strip_offset. Use rtx_to_poly_int64
11637 to read the PRE/POST_MODIFY increment.
11638 * calls.c (store_one_arg): Use strip_offset.
11639 * rtlanal.c (rtx_addr_can_trap_p_1): Extend CONST_INT handling to
11641 (set_noop_p): Use rtx_to_poly_int64 for the elements selected
11643 * simplify-rtx.c (avoid_constant_pool_reference): Use strip_offset.
11644 (simplify_binary_operation_1): Extend CONST_INT handling to
11646 * var-tracking.c (compute_cfa_pointer): Take a poly_int64 rather
11647 than a HOST_WIDE_INT.
11648 (hard_frame_pointer_adjustment): Change from HOST_WIDE_INT to
11650 (adjust_mems, add_stores): Update accodingly.
11651 (vt_canonicalize_addr): Track polynomial offsets.
11652 (emit_note_insn_var_location): Likewise.
11653 (vt_add_function_parameter): Likewise.
11654 (vt_initialize): Likewise.
11656 2018-06-12 Jeff Law <law@redhat.com>
11658 * config.gcc (alpha*-*-freebsd*): Remove.
11659 * config/alpha/freebsd.h: Remove.
11661 2018-06-12 David Malcolm <dmalcolm@redhat.com>
11664 * spellcheck-tree.c (levenshtein_distance): Rename to...
11665 (get_edit_distance): ...this, and update for underlying renaming.
11666 * spellcheck-tree.h (levenshtein_distance): Rename to...
11667 (get_edit_distance): ...this.
11668 * spellcheck.c (levenshtein_distance): Rename to...
11669 (get_edit_distance): ...this. Convert from Levenshtein distance
11670 to Damerau-Levenshtein distance by supporting transpositions of
11671 adjacent characters. Rename "v1" to "v_next" and "v0" to
11673 (selftest::levenshtein_distance_unit_test_oneway): Rename to...
11674 (selftest::test_edit_distance_unit_test_oneway): ...this, and
11675 update for underlying renaming.
11676 (selftest::levenshtein_distance_unit_test): Rename to...
11677 (selftest::test_get_edit_distance_unit): ...this, and update for
11678 underlying renaming.
11679 (selftest::test_find_closest_string): Add example from PR 69968
11680 where transposition helps
11681 (selftest::test_metric_conditions): Update for renaming.
11682 (selftest::test_metric_conditions): Likewise.
11683 (selftest::spellcheck_c_tests): Likewise.
11684 * spellcheck.h (levenshtein_distance): Rename both overloads to...
11685 (get_edit_distance): ...this.
11686 (best_match::consider): Update for renaming.
11688 2018-06-12 Martin Sebor <msebor@redhat.com>
11690 PR tree-optimization/85259
11691 * builtins.c (compute_objsize): Handle constant offsets.
11692 * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Return
11693 true iff a warning has been issued.
11694 * gimple.h (gimple_nonartificial_location): New function.
11695 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Call
11696 gimple_nonartificial_location and handle -Wno-system-headers.
11697 (handle_builtin_stxncpy): Same.
11699 2018-06-12 Martin Sebor <msebor@redhat.com>
11702 * fold-const.c (operand_equal_p): Handle SAVE_EXPR.
11704 2018-06-12 Will Schmidt <will_schmidt@vnet.ibm.com>
11706 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add
11707 BUILTIN_VEC_XST entries for pointer to double and long long.
11709 2018-06-12 H.J. Lu <hongjiu.lu@intel.com>
11712 * config/i386/gnu-user.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
11714 * config/i386/gnu-user64.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
11717 2018-06-12 Martin Liska <mliska@suse.cz>
11719 * doc/options.texi: Document IntegerRange.
11721 2018-06-12 Martin Liska <mliska@suse.cz>
11723 * config/i386/i386.opt: Make MPX-related options as Deprecated.
11724 * opt-functions.awk: Handle Deprecated flag.
11725 * opts-common.c (decode_cmdline_option): Handle cl_deprecated
11727 (read_cmdline_option): Report warning for a deprecated option.
11728 * opts.h (struct cl_option): Add new field cl_deprecated.
11729 (CL_ERR_DEPRECATED): New.
11731 2018-06-12 Martin Liska <mliska@suse.cz>
11733 * doc/options.texi: Document Deprecated option flag.
11735 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
11737 * config/arc/arc-arch.h (arc_extras): New enum.
11738 (arc_cpu_t):Add field extra.
11739 (arc_cpu_types): Consider the extras.
11740 * config/arc/arc-cpus.def: Add extras info.
11741 * config/arc/arc-opts.h (processor_type): Consider extra field.
11742 * config/arc/arc.c (arc_override_options): Handle extra field.
11744 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
11746 * config/arc/arc-arch.h: Update ARC_OPTX macro.
11747 * config/arc/arc-options.def (ARC_OPTX): Introduce a new doc
11749 * config/arc/arc.c (arc_init): Update pic warning.
11750 (irq_range): Update irq range parsing warnings.
11751 (arc_override_options): Update various warning messages.
11752 (arc_handle_aux_attribute): Likewise.
11754 2018-06-12 Robert Suchanek <robert.suchanek@mips.com>
11756 * config/mips/i6400.md (i6400_fpu_fadd): Remove frint.
11758 2018-06-12 Jozef Lawrynowicz <jozef.l@mittosystems.com>
11760 * doc/sourcebuild.texi: Document usage of line number 0 in verify
11761 compiler messages directives.
11763 2018-06-12 Matthew Fortune <mfortune@gmail.com>
11765 * config/mips/mips-cpus.def: New MIPS_CPU for i6500.
11766 * config/mips/mips-tables.opt: Regenerate.
11767 * config/mips/mips.h (MIPS_ISA_LEVEL_SPEC): Mark i6500 as
11769 * doc/invoke.texi: Document -march=i6500.
11771 2018-06-12 Prachi Godbole <prachi.godbole@imgtec.com>
11773 * config/mips/i6400.md (i6400_gpmuldiv): Remove cpu_unit.
11774 (i6400_gpmul): Add cpu_unit.
11775 (i6400_gpdiv): Likewise.
11776 (i6400_msa_add_d): Update reservations.
11777 (i6400_msa_int_add) Likewise.
11778 (i6400_msa_short_logic3) Likewise.
11779 (i6400_msa_short_logic2) Likewise.
11780 (i6400_msa_short_logic) Likewise.
11781 (i6400_msa_move) Likewise.
11782 (i6400_msa_cmp) Likewise.
11783 (i6400_msa_short_float2) Likewise.
11784 (i6400_msa_div_d) Likewise.
11785 (i6400_msa_long_logic1) Likewise.
11786 (i6400_msa_long_logic2) Likewise.
11787 (i6400_msa_mult) Likewise.
11788 (i6400_msa_long_float2) Likewise.
11789 (i6400_msa_long_float4) Likewise.
11790 (i6400_msa_long_float5) Likewise.
11791 (i6400_msa_long_float8) Likewise.
11792 (i6400_fpu_fadd): Include frint type.
11793 (i6400_fpu_store): New define_insn_reservation.
11794 (i6400_fpu_load): Likewise.
11795 (i6400_fpu_move): Likewise.
11796 (i6400_fpu_fcmp): Likewise.
11797 (i6400_fpu_fmadd): Likewise.
11798 (i6400_int_mult): Include imul3nc type and update reservation.
11799 (i6400_int_div): Include idiv3 type and update reservation.
11800 (i6400_int_load): Update to check type not move_type.
11801 (i6400_int_store): Likewise.
11802 (i6400_int_prefetch): Set zero latency.
11804 2018-06-12 Eric Botcazou <ebotcazou@adacore.com>
11806 * gcc.c: Document new %@{...} sequence.
11807 (LINK_COMMAND_SPEC): Use it for the -L switches.
11808 (cpp_unique_options): Use it for the -I switches.
11809 (at_file_argbuf): New global variable.
11810 (in_at_file): Likewise.
11811 (alloc_args): Create at_file_argbuf.
11812 (clear_args): Truncate at_file_argbuf.
11813 (store_arg): If in_at_file, push the argument onto at_file_argbuf.
11814 (open_at_file): New function.
11815 (close_at_file): Likewise.
11816 (create_at_file): Delete.
11817 (do_spec_1) <'i'>: Use open_at_file/close_at_file.
11820 (validate_switches_from_spec): Deal with %@{...} sequence.
11821 (validate_switches): Likewise.
11822 (driver::finalize): Call clear_args.
11824 2018-06-11 Rasmus Villemoes <rasmus.villemoes@prevas.dk>
11826 * config/vx-common.h (USE_TM_CLONE_REGISTRY): #define to 0.
11828 2018-06-11 Martin Sebor <msebor@redhat.com>
11830 * doc/invoke.texi (-Wall): List -Wc++17-compat.
11831 (Wno-class-memaccess): Add @opindex.
11832 (Wno-templates, Wno-multiple-inheritance): Same.
11833 (Wno-virtual-inheritance, Wno-namespaces): Same.
11834 (Wno-pedantic, Wno-chkp, Wcoverage-mismatch): Same.
11835 (Wno-format-overflow, Wno-format-truncation): Same.
11836 (Wno-unused-local-typedefs, Walloc-size-larger-than): Same.
11837 (Wno-alloc-size-larger-than, Wframe-larger-than): Same
11838 (Wno-stack-usage, Wno-c++-compat, Wno-c++11-compat): Same.
11839 (Wno-c++14-compat, Wno-c++17-compat, Wno-openmp-simd): Same.
11840 (Wno-unsuffixed-float-constants, Wno-addr-space-convert): Same.
11841 (Wno-misspelled-isr): Same.
11843 2018-06-11 Martin Sebor <msebor@redhat.com>
11845 * PR tree-optimization/86083
11846 * tree-ssa-strlen.c (handle_char_store): Use tree_expr_nonzero_p.
11848 2018-06-11 Zhouyi Zhou <zhouzhouyi@gmail.com>
11850 * tree-eh.c (lower_eh_constructs_2): Add a comma to comment.
11852 2018-06-11 Segher Boessenkool <segher@kernel.crashing.org>
11855 * config/rs6000/rs6000.md (*movdi_internal32): Put constraint modifiers
11856 on the correct operand.
11857 (*movdi_internal64): Ditto.
11859 2018-06-11 Martin Liska <mliska@suse.cz>
11861 PR tree-optimization/86089
11862 * tree-ssa-strlen.c (get_string_length): Move back removed hunk.
11864 2018-06-11 Julia Koval <julia.koval@intel.com>
11866 * config/i386/vaesintrin.h (_mm_aesdec_epi128, _mm_aesdeclast_epi128)
11867 _mm_aesenc_epi128, _mm_aesenclast_epi128: Remove.
11868 * config/i386/vpclmulqdqintrin.h (_mm_clmulepi64_epi128): Remove.
11870 2018-06-11 Olivier Hainque <hainque@adacore.com>
11872 * dwarf2out.c (gen_compile_unit_die): Fallout to DW_LANG_Ada83
11873 for Ada with strict dwarf2.
11875 2018-06-08 Peter Bergner <bergner@vnet.ibm.com>
11878 * config/rs6000/rs6000.c (mem_operand_gpr): Enable PRE_INC and PRE_DEC
11881 2018-06-08 Jan Hubicka <hubicka@ucw.cz>
11883 * dumpfile.c (FIRST_ME_AUTO_NUMBERED_DUMP): Bump to 4.
11885 2018-06-08 David Edelsohn <dje.gcc@gmail.com>
11887 * config/rs6000/rs6000.c (rs6000_passes_ieee128): Protect with #if
11890 2018-06-08 Martin Liska <mliska@suse.cz>
11892 * tree-cfg.h (debug_function): Fix argument type to match
11895 2018-06-08 Martin Liska <mliska@suse.cz>
11897 * config/powerpcspe/powerpcspe.c (rs6000_xcoff_visibility):
11898 Remove usage of MPX-related (and removed) fields.
11899 * config/rs6000/rs6000.c (rs6000_xcoff_visibility): Likewise.
11901 2018-06-08 David Malcolm <dmalcolm@redhat.com>
11903 * cfg.c (debug): Use TDF_NONE rather than 0.
11904 * cfghooks.c (debug): Likewise.
11905 * dumpfile.c (DUMP_FILE_INFO): Likewise; also for OPTGROUP.
11906 (struct dump_option_value_info): Convert to...
11907 (struct kv_pair): ...this template type.
11908 (dump_options): Convert to kv_pair<dump_flags_t>; use TDF_NONE
11910 (optinfo_verbosity_options): Likewise.
11911 (optgroup_options): Convert to kv_pair<optgroup_flags_t>; use
11913 (gcc::dump_manager::dump_register): Use optgroup_flags_t rather
11914 than int for "optgroup_flags" param.
11915 (dump_generic_expr_loc): Use dump_flags_t rather than int for
11917 (dump_dec): Likewise.
11918 (dump_finish): Use TDF_NONE rather than 0.
11919 (gcc::dump_manager::opt_info_enable_passes): Use optgroup_flags_t
11920 rather than int for "optgroup_flags" param. Use TDF_NONE rather
11921 than 0. Update for change to option_ptr.
11922 (opt_info_switch_p_1): Convert "optgroup_flags" param from int *
11923 to optgroup_flags_t *. Use TDF_NONE and OPTGROUP_NONE rather than
11924 0. Update for changes to optinfo_verbosity_options and
11926 (opt_info_switch_p): Convert optgroup_flags from int to
11928 (dump_basic_block): Use dump_flags_t rather than int
11929 for "dump_kind" param.
11930 * dumpfile.h (TDF_ADDRESS, TDF_SLIM, TDF_RAW, TDF_DETAILS,
11931 TDF_STATS, TDF_BLOCKS, TDF_VOPS, TDF_LINENO, TDF_UID)
11932 TDF_STMTADDR, TDF_GRAPH, TDF_MEMSYMS, TDF_RHS_ONLY, TDF_ASMNAME,
11933 TDF_EH, TDF_NOUID, TDF_ALIAS, TDF_ENUMERATE_LOCALS, TDF_CSELIB,
11934 TDF_SCEV, TDF_GIMPLE, TDF_FOLDING, MSG_OPTIMIZED_LOCATIONS,
11935 MSG_MISSED_OPTIMIZATION, MSG_NOTE, MSG_ALL, TDF_COMPARE_DEBUG,
11936 TDF_NONE): Convert from macros to...
11937 (enum dump_flag): ...this new enum.
11938 (dump_flags_t): Update to use enum.
11939 (operator|, operator&, operator~, operator|=, operator&=):
11940 Implement for dump_flags_t.
11941 (OPTGROUP_NONE, OPTGROUP_IPA, OPTGROUP_LOOP, OPTGROUP_INLINE,
11942 OPTGROUP_OMP, OPTGROUP_VEC, OPTGROUP_OTHER, OPTGROUP_ALL):
11943 Convert from macros to...
11944 (enum optgroup_flag): ...this new enum.
11945 (optgroup_flags_t): New typedef.
11946 (operator|, operator|=): Implement for optgroup_flags_t.
11947 (struct dump_file_info): Convert field "alt_flags" to
11948 dump_flags_t. Convert field "optgroup_flags" to
11950 (dump_basic_block): Use dump_flags_t rather than int for param.
11951 (dump_generic_expr_loc): Likewise.
11952 (dump_dec): Likewise.
11953 (dump_register): Convert param "optgroup_flags" to
11955 (opt_info_enable_passes): Likewise.
11956 * early-remat.c (early_remat::dump_edge_list): Use TDF_NONE rather
11958 * gimple-pretty-print.c (debug): Likewise.
11959 * gimple-ssa-store-merging.c (bswap_replace): Likewise.
11960 (merged_store_group::apply_stores): Likewise.
11961 * gimple-ssa-strength-reduction.c (insert_initializers): Likewise.
11962 * gimple.c (verify_gimple_pp): Likewise.
11963 * graphite-poly.c (print_pbb_body): Likewise.
11964 * passes.c (pass_manager::register_one_dump_file): Convert
11965 local "optgroup_flags" to optgroup_flags_t.
11966 * print-tree.c (print_node): Use TDF_NONE rather than 0.
11968 (debug_body): Likewise.
11969 * tree-pass.h (struct pass_data): Convert field "optgroup_flags"
11970 to optgroup_flags_t.
11971 * tree-pretty-print.c (print_struct_decl): Use TDF_NONE rather
11973 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Likewise.
11974 (convert_mult_to_fma): Likewise.
11975 * tree-ssa-reassoc.c (undistribute_ops_list): Likewise.
11976 * tree-ssa-sccvn.c (vn_eliminate): Likewise.
11977 * tree-vect-data-refs.c (dump_lower_bound): Convert param
11978 "dump_kind" to dump_flags_t.
11980 2018-06-08 Segher Boessenkool <segher@kernel.crashing.org>
11982 * config/rs6000/rs6000.c (min, max): Delete.
11984 2018-06-08 Segher Boessenkool <segher@kernel.crashing.org>
11986 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete mention of
11987 -mabi=spe and -mabi=no-spe.
11989 2018-06-08 Martin Liska <mliska@suse.cz>
11991 * ipa-pure-const.c (propagate_pure_const): Use ::get at places
11992 where we expect an existing summary.
11994 2018-06-08 Martin Liska <mliska@suse.cz>
11996 * ipa-inline-analysis.c (simple_edge_hints): Use ::get method.
11997 * ipa-inline.h (estimate_edge_growth): Likewise.
11999 2018-06-08 Martin Liska <mliska@suse.cz>
12001 * cgraph.c (function_version_hasher::hash): Use
12002 cgraph_node::get_uid ().
12003 (function_version_hasher::equal):
12004 * cgraph.h (cgraph_node::get_uid): New method.
12005 * ipa-inline.c (update_caller_keys): Use
12006 cgraph_node::get_uid ().
12007 (update_callee_keys): Likewise.
12008 * ipa-utils.c (searchc): Likewise.
12009 (ipa_reduced_postorder): Likewise.
12010 * lto-cgraph.c (input_node): Likewise.
12011 * passes.c (is_pass_explicitly_enabled_or_disabled): Likewise.
12012 * symbol-summary.h (symtab_insertion): Likewise.
12013 (symtab_removal): Likewise.
12014 (symtab_duplication): Likewise.
12015 * tree-pretty-print.c (dump_function_header): Likewise.
12016 * tree-sra.c (convert_callers_for_node): Likewise.
12018 2018-06-08 Martin Liska <mliska@suse.cz>
12020 * cgraph.c (symbol_table::create_edge): Always assign a new
12022 (symbol_table::free_edge): Do not recycle numbers.
12023 * cgraph.h (cgraph_edge::get): New method.
12024 * symbol-summary.h (symtab_removal): Use it.
12025 (symtab_duplication): Likewise.
12026 (call_summary::hashable_uid): Remove.
12028 2018-06-08 Martin Liska <mliska@suse.cz>
12030 * ipa-inline-analysis.c (inline_edge_removal_hook): Remove.
12031 (initialize_growth_caches): Remove.
12032 (free_growth_caches): Likewise.
12033 (do_estimate_edge_time): Use edge_growth_cache.
12034 (do_estimate_edge_size): Likewise.
12035 (do_estimate_edge_hints): Likewise.
12036 * ipa-inline.c (reset_edge_caches): Likewise.
12037 (recursive_inlining): Likewise.
12038 (inline_small_functions): Likewise.
12039 * ipa-inline.h (initialize_growth_caches): Remove.
12040 (estimate_edge_size): Likewise.
12041 (estimate_edge_time): Likewise.
12042 (estimate_edge_hints): Likewise.
12043 (reset_edge_growth_cache): Likewise.
12044 * symbol-summary.h (call_summary::remove): New method.
12046 2018-06-08 Martin Liska <mliska@suse.cz>
12048 * ipa-cp.c (class edge_clone_summary): New summary.
12049 (grow_edge_clone_vectors): Remove.
12050 (ipcp_edge_duplication_hook): Remove.
12051 (class edge_clone_summary_t): New call_summary class.
12052 (ipcp_edge_removal_hook): Remove.
12053 (edge_clone_summary_t::duplicate): New function.
12054 (get_next_cgraph_edge_clone): Use edge_clone_summaries.
12055 (create_specialized_node): Likewise.
12056 (ipcp_driver): Initialize edge_clone_summaries and do not
12059 2018-06-08 Martin Liska <mliska@suse.cz>
12061 * symbol-summary.h (get): New function.
12062 (call_summary::m_initialize_when_cloning): New class member.
12064 2018-06-08 Martin Liska <mliska@suse.cz>
12066 * cgraph.c (cgraph_node::remove): Do not recycle uid.
12067 * cgraph.h (symbol_table::release_symbol): Do not pass uid.
12068 (symbol_table::allocate_cgraph_symbol): Do not set uid.
12069 * passes.c (uid_hash_t): Record removed_nodes by their uids.
12070 (remove_cgraph_node_from_order): Use the removed_nodes set.
12071 (do_per_function_toporder): Likwise.
12072 * symbol-summary.h (symtab_insertion): Use cgraph_node::uid
12073 instead of summary_uid.
12074 (symtab_removal): Likewise.
12075 (symtab_duplication): Likewise.
12077 2018-06-08 Martin Liska <mliska@suse.cz>
12079 * ipa-cp.c (ipcp_store_bits_results): Use
12080 ipcp_transformation_sum.
12081 (ipcp_store_vr_results): Likewise.
12082 * ipa-prop.c (ipcp_grow_transformations_if_necessary): Renamed
12084 (ipcp_transformation_initialize): ... this.
12085 (ipa_set_node_agg_value_chain):
12086 (ipa_node_params_t::duplicate): Use ipcp_transformation_sum.
12087 (write_ipcp_transformation_info): Likewise.
12088 (read_ipcp_transformation_info): Likewise.
12089 (ipcp_update_bits): Likewise.
12090 (ipcp_update_vr): Likewise.
12091 (ipcp_transform_function): Likewise.
12092 * ipa-prop.h: Rename ipcp_transformation_summary to
12093 ipcp_transformation.
12094 (class ipcp_transformation_t): New function summary.
12095 (ipcp_get_transformation_summary): Use ipcp_transformation_sum.
12096 (ipa_get_agg_replacements_for_node): Likewise.
12098 2018-06-08 Martin Liska <mliska@suse.cz>
12100 * ipa-pure-const.c (struct funct_state_d): Do it class instead
12102 (class funct_state_summary_t): New function_summary class.
12103 (has_function_state): Remove.
12104 (get_function_state): Likewise.
12105 (set_function_state): Likewise.
12106 (add_new_function): Likewise.
12107 (funct_state_summary_t::insert): New function.
12108 (duplicate_node_data): Remove.
12109 (remove_node_data): Remove.
12110 (funct_state_summary_t::duplicate): New function.
12111 (register_hooks): Create new funct_state_summaries.
12112 (pure_const_generate_summary): Use it.
12113 (pure_const_write_summary): Likewise.
12114 (pure_const_read_summary): Likewise.
12115 (propagate_pure_const): Likewise.
12116 (propagate_nothrow): Likewise.
12117 (dump_malloc_lattice): Likewise.
12118 (propagate_malloc): Likewise.
12119 (execute): Do not register hooks, just remove summary
12121 (pass_ipa_pure_const::pass_ipa_pure_const): Simplify
12124 2018-06-08 Martin Liska <mliska@suse.cz>
12126 * ipa-reference.c (remove_node_data): Remove.
12127 (duplicate_node_data): Likewise.
12128 (class ipa_ref_var_info_summary_t): New class.
12129 (class ipa_ref_opt_summary_t): Likewise.
12130 (get_reference_vars_info): Use ipa_ref_var_info_summaries.
12131 (get_reference_optimization_summary): Use
12132 ipa_ref_opt_sum_summaries.
12133 (set_reference_vars_info): Remove.
12134 (set_reference_optimization_summary): Likewise.
12135 (ipa_init): Create summaries.
12136 (init_function_info): Use function summary.
12137 (ipa_ref_opt_summary_t::duplicate): New function.
12138 (ipa_ref_opt_summary_t::remove): New function.
12139 (get_read_write_all_from_node): Fix GNU coding style.
12140 (propagate): Use function summary.
12141 (write_node_summary_p): Fix GNU coding style.
12142 (stream_out_bitmap): Likewise.
12143 (ipa_reference_read_optimization_summary): Use function summary.
12144 (ipa_reference_c_finalize): Do not release hooks.
12146 2018-06-08 Martin Liska <mliska@suse.cz>
12148 * ipa-fnsummary.c (dump_ipa_call_summary): Use ::get method.
12149 (analyze_function_body): Extract multiple calls of get_create.
12150 * ipa-inline-analysis.c (simple_edge_hints): Likewise.
12151 * ipa-inline.c (recursive_inlining): Use ::get method.
12152 * ipa-inline.h (estimate_edge_growth): Likewise.
12154 2018-06-08 Martin Liska <mliska@suse.cz>
12156 * hsa-common.h (enum hsa_function_kind): Rename HSA_NONE to
12158 (hsa_function_summary::hsa_function_summary): Use the new enum
12160 (hsa_gpu_implementation_p): Use hsa_summaries::get.
12161 * hsa-gen.c (hsa_get_host_function): Likewise.
12162 (get_brig_function_name): Likewise.
12163 * ipa-hsa.c (process_hsa_functions): Likewise.
12164 (ipa_hsa_write_summary): Likewise.
12165 * symbol-summary.h (symtab_duplication): Use ::get function/
12166 (get): New function.
12168 2018-06-08 Martin Liska <mliska@suse.cz>
12170 * config/i386/i386.c (ix86_can_inline_p): Use get_create instead
12172 * hsa-common.c (hsa_summary_t::link_functions): Likewise.
12173 (hsa_register_kernel): Likewise.
12174 * hsa-common.h (hsa_gpu_implementation_p): Likewise.
12175 * hsa-gen.c (hsa_get_host_function): Likewise.
12176 (get_brig_function_name): Likewise.
12177 (generate_hsa): Likewise.
12178 (pass_gen_hsail::execute): Likewise.
12179 * ipa-cp.c (ipcp_cloning_candidate_p): Likewise.
12180 (devirtualization_time_bonus): Likewise.
12181 (ipcp_propagate_stage): Likewise.
12182 * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
12183 (edge_set_predicate): Likewise.
12184 (evaluate_conditions_for_known_args): Likewise.
12185 (evaluate_properties_for_edge): Likewise.
12186 (ipa_fn_summary::reset): Likewise.
12187 (ipa_fn_summary_t::duplicate): Likewise.
12188 (dump_ipa_call_summary): Likewise.
12189 (ipa_dump_fn_summary): Likewise.
12190 (analyze_function_body): Likewise.
12191 (compute_fn_summary): Likewise.
12192 (estimate_edge_devirt_benefit): Likewise.
12193 (estimate_edge_size_and_time): Likewise.
12194 (estimate_calls_size_and_time): Likewise.
12195 (estimate_node_size_and_time): Likewise.
12196 (inline_update_callee_summaries): Likewise.
12197 (remap_edge_change_prob): Likewise.
12198 (remap_edge_summaries): Likewise.
12199 (ipa_merge_fn_summary_after_inlining): Likewise.
12200 (ipa_update_overall_fn_summary): Likewise.
12201 (read_ipa_call_summary): Likewise.
12202 (inline_read_section): Likewise.
12203 (write_ipa_call_summary): Likewise.
12204 (ipa_fn_summary_write): Likewise.
12205 (ipa_free_fn_summary): Likewise.
12206 * ipa-hsa.c (process_hsa_functions): Likewise.
12207 (ipa_hsa_write_summary): Likewise.
12208 (ipa_hsa_read_section): Likewise.
12209 * ipa-icf.c (sem_function::merge): Likewise.
12210 * ipa-inline-analysis.c (simple_edge_hints): Likewise.
12211 (do_estimate_edge_time): Likewise.
12212 (estimate_size_after_inlining): Likewise.
12213 (estimate_growth): Likewise.
12214 (growth_likely_positive): Likewise.
12215 * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
12216 (inline_call): Likewise.
12217 * ipa-inline.c (caller_growth_limits): Likewise.
12218 (can_inline_edge_p): Likewise.
12219 (can_inline_edge_by_limits_p): Likewise.
12220 (compute_uninlined_call_time): Likewise.
12221 (compute_inlined_call_time): Likewise.
12222 (want_inline_small_function_p): Likewise.
12223 (edge_badness): Likewise.
12224 (update_caller_keys): Likewise.
12225 (update_callee_keys): Likewise.
12226 (recursive_inlining): Likewise.
12227 (inline_small_functions): Likewise.
12228 (inline_to_all_callers_1): Likewise.
12229 (dump_overall_stats): Likewise.
12230 (early_inline_small_functions): Likewise.
12231 (early_inliner): Likewise.
12232 * ipa-inline.h (estimate_edge_growth): Likewise.
12233 * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
12234 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
12235 * ipa-prop.h (IPA_NODE_REF): Likewise.
12236 (IPA_EDGE_REF): Likewise.
12237 * ipa-pure-const.c (malloc_candidate_p): Likewise.
12238 (propagate_malloc): Likewise.
12239 * ipa-split.c (execute_split_functions): Likewise.
12240 * symbol-summary.h: Rename get to get_create.
12242 (get_create): Likewise.
12243 * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
12245 2018-06-08 Martin Liska <mliska@suse.cz>
12247 * symbol-summary.h (release): Move definition out of class
12249 (symtab_removal): Likewise.
12250 (symtab_duplication): Likewise.
12252 2018-06-08 Martin Liska <mliska@suse.cz>
12254 * symbol-summary.h (function_summary): Move constructor
12255 implementation out of class declaration.
12256 (release): Likewise.
12257 (symtab_insertion): Likewise.
12258 (symtab_removal): Likewise.
12259 (symtab_duplication): Likewise.
12262 2018-06-08 Martin Liska <mliska@suse.cz>
12264 * Makefile.in: Remove support for MPX (macros, related functions,
12265 fields in cgraph_node, ...).
12266 * builtin-types.def (BT_BND): Likewise.
12267 (BT_FN_BND_CONST_PTR): Likewise.
12268 (BT_FN_CONST_PTR_BND): Likewise.
12269 (BT_FN_VOID_PTR_BND): Likewise.
12270 (BT_FN_BND_CONST_PTR_SIZE): Likewise.
12271 (BT_FN_VOID_CONST_PTR_BND_CONST_PTR): Likewise.
12272 * builtins.c (expand_builtin_memcpy_with_bounds): Likewise.
12273 (expand_builtin_mempcpy_with_bounds): Likewise.
12274 (expand_builtin_memset_with_bounds): Likewise.
12275 (expand_builtin_memset_args): Likewise.
12276 (std_expand_builtin_va_start): Likewise.
12277 (expand_builtin): Likewise.
12278 (expand_builtin_with_bounds): Likewise.
12279 * builtins.def (DEF_BUILTIN_CHKP): Likewise.
12280 (DEF_LIB_BUILTIN_CHKP): Likewise.
12281 (DEF_EXT_LIB_BUILTIN_CHKP): Likewise.
12282 (DEF_CHKP_BUILTIN): Likewise.
12283 (BUILT_IN_MEMCPY): Likewise.
12284 (BUILT_IN_MEMMOVE): Likewise.
12285 (BUILT_IN_MEMPCPY): Likewise.
12286 (BUILT_IN_MEMSET): Likewise.
12287 (BUILT_IN_STPCPY): Likewise.
12288 (BUILT_IN_STRCAT): Likewise.
12289 (BUILT_IN_STRCHR): Likewise.
12290 (BUILT_IN_STRCPY): Likewise.
12291 (BUILT_IN_STRLEN): Likewise.
12292 (BUILT_IN_MEMCPY_CHK): Likewise.
12293 (BUILT_IN_MEMMOVE_CHK): Likewise.
12294 (BUILT_IN_MEMPCPY_CHK): Likewise.
12295 (BUILT_IN_MEMSET_CHK): Likewise.
12296 (BUILT_IN_STPCPY_CHK): Likewise.
12297 (BUILT_IN_STRCAT_CHK): Likewise.
12298 (BUILT_IN_STRCPY_CHK): Likewise.
12299 * calls.c (store_bounds): Likewise.
12300 (emit_call_1): Likewise.
12301 (special_function_p): Likewise.
12302 (maybe_warn_nonstring_arg): Likewise.
12303 (initialize_argument_information): Likewise.
12304 (finalize_must_preallocate): Likewise.
12305 (compute_argument_addresses): Likewise.
12306 (expand_call): Likewise.
12307 * cfgexpand.c (expand_call_stmt): Likewise.
12308 (expand_return): Likewise.
12309 (expand_gimple_stmt_1): Likewise.
12310 (pass_expand::execute): Likewise.
12311 * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Likewise.
12312 (cgraph_node::remove): Likewise.
12313 (cgraph_node::dump): Likewise.
12314 (cgraph_node::verify_node): Likewise.
12315 * cgraph.h (chkp_function_instrumented_p): Likewise.
12316 (symtab_node::get_alias_target): Likewise.
12317 (cgraph_node::can_remove_if_no_direct_calls_and_refs_p): Likewise.
12318 (cgraph_local_p): Likewise.
12319 * cgraphbuild.c (cgraph_edge::rebuild_edges): Likewise.
12320 (cgraph_edge::rebuild_references): Likewise.
12321 * cgraphunit.c (varpool_node::finalize_decl): Likewise.
12322 (walk_polymorphic_call_targets): Likewise.
12323 (cgraph_node::expand_thunk): Likewise.
12324 (symbol_table::output_weakrefs): Likewise.
12325 * common/config/i386/i386-common.c (OPTION_MASK_ISA2_GENERAL_REGS_ONLY_UNSET): Likewise.
12326 (ix86_handle_option): Likewise.
12327 * config/i386/constraints.md: Likewise.
12328 * config/i386/i386-builtin-types.def (BND): Likewise.
12332 * config/i386/i386-builtin.def (BDESC_END): Likewise.
12333 (BDESC_FIRST): Likewise.
12335 * config/i386/i386-c.c (ix86_target_macros_internal): Likewise.
12336 * config/i386/i386-protos.h (ix86_bnd_prefixed_insn_p): Likewise.
12337 * config/i386/i386.c (enum reg_class): Likewise.
12338 (ix86_target_string): Likewise.
12339 (ix86_option_override_internal): Likewise.
12340 (ix86_conditional_register_usage): Likewise.
12341 (ix86_valid_target_attribute_inner_p): Likewise.
12342 (ix86_set_indirect_branch_type): Likewise.
12343 (ix86_set_current_function): Likewise.
12344 (ix86_function_arg_regno_p): Likewise.
12345 (init_cumulative_args): Likewise.
12346 (ix86_function_arg_advance): Likewise.
12347 (ix86_function_arg): Likewise.
12348 (ix86_pass_by_reference): Likewise.
12349 (ix86_function_value_regno_p): Likewise.
12350 (ix86_function_value_1): Likewise.
12351 (ix86_function_value_bounds): Likewise.
12352 (ix86_return_in_memory): Likewise.
12353 (ix86_setup_incoming_vararg_bounds): Likewise.
12354 (ix86_va_start): Likewise.
12355 (indirect_thunk_need_prefix): Likewise.
12356 (print_reg): Likewise.
12357 (ix86_print_operand): Likewise.
12358 (ix86_expand_call): Likewise.
12359 (ix86_output_function_return): Likewise.
12360 (reg_encoded_number): Likewise.
12361 (BDESC_VERIFYS): Likewise.
12362 (ix86_init_mpx_builtins): Likewise.
12363 (ix86_init_builtins): Likewise.
12364 (ix86_emit_cmove): Likewise.
12365 (ix86_emit_move_max): Likewise.
12366 (ix86_expand_builtin): Likewise.
12367 (ix86_builtin_mpx_function): Likewise.
12368 (ix86_get_arg_address_for_bt): Likewise.
12369 (ix86_load_bounds): Likewise.
12370 (ix86_store_bounds): Likewise.
12371 (ix86_load_returned_bounds): Likewise.
12372 (ix86_store_returned_bounds): Likewise.
12373 (ix86_class_likely_spilled_p): Likewise.
12374 (ix86_hard_regno_mode_ok): Likewise.
12375 (x86_order_regs_for_local_alloc): Likewise.
12376 (ix86_mitigate_rop): Likewise.
12377 (ix86_bnd_prefixed_insn_p): Likewise.
12378 (ix86_mpx_bound_mode): Likewise.
12379 (ix86_make_bounds_constant): Likewise.
12380 (ix86_initialize_bounds): Likewise.
12381 (TARGET_LOAD_BOUNDS_FOR_ARG): Likewise.
12382 (TARGET_STORE_BOUNDS_FOR_ARG): Likewise.
12383 (TARGET_LOAD_RETURNED_BOUNDS): Likewise.
12384 (TARGET_STORE_RETURNED_BOUNDS): Likewise.
12385 (TARGET_CHKP_BOUND_MODE): Likewise.
12386 (TARGET_BUILTIN_CHKP_FUNCTION): Likewise.
12387 (TARGET_CHKP_FUNCTION_VALUE_BOUNDS): Likewise.
12388 (TARGET_CHKP_MAKE_BOUNDS_CONSTANT): Likewise.
12389 (TARGET_CHKP_INITIALIZE_BOUNDS): Likewise.
12390 * config/i386/i386.h (TARGET_MPX): Likewise.
12391 (TARGET_MPX_P): Likewise.
12392 (VALID_BND_REG_MODE): Likewise.
12393 (FIRST_BND_REG): Likewise.
12394 (LAST_BND_REG): Likewise.
12395 (enum reg_class): Likewise.
12396 (BND_REG_P): Likewise.
12397 (BND_REGNO_P): Likewise.
12398 (BNDmode): Likewise.
12399 (ADJUST_INSN_LENGTH): Likewise.
12400 * config/i386/i386.md: Likewise.
12401 * config/i386/i386.opt: Likewise.
12402 * config/i386/linux-common.h (LIBMPX_LIBS): Likewise.
12403 (defined): Likewise.
12404 (LINK_MPX): Likewise.
12405 (MPX_SPEC): Likewise.
12406 (LIBMPX_SPEC): Likewise.
12407 (LIBMPXWRAPPERS_SPEC): Likewise.
12408 (CHKP_SPEC): Likewise.
12409 * config/i386/predicates.md: Likewise.
12410 * dbxout.c (dbxout_type): Likewise.
12411 * doc/extend.texi: Likewise.
12412 * doc/invoke.texi: Likewise.
12413 * doc/md.texi: Likewise.
12414 * doc/tm.texi: Likewise.
12415 * doc/tm.texi.in: Likewise.
12416 * dwarf2out.c (is_base_type): Likewise.
12417 (gen_formal_types_die): Likewise.
12418 (gen_subprogram_die): Likewise.
12419 (gen_type_die_with_usage): Likewise.
12420 (gen_decl_die): Likewise.
12421 (dwarf2out_late_global_decl): Likewise.
12422 * expr.c (expand_assignment): Likewise.
12423 (emit_storent_insn): Likewise.
12424 (store_expr_with_bounds): Likewise.
12425 (store_expr): Likewise.
12426 (expand_expr_real_1): Likewise.
12427 * expr.h (store_expr_with_bounds): Likewise.
12428 * function.c (use_register_for_decl): Likewise.
12429 (struct bounds_parm_data): Likewise.
12430 (assign_parms_augmented_arg_list): Likewise.
12431 (assign_parm_find_entry_rtl): Likewise.
12432 (assign_parm_is_stack_parm): Likewise.
12433 (assign_parm_load_bounds): Likewise.
12434 (assign_bounds): Likewise.
12435 (assign_parms): Likewise.
12436 (expand_function_start): Likewise.
12437 * gcc.c (CHKP_SPEC): Likewise.
12438 * gimple-fold.c (gimple_fold_builtin_memory_op): Likewise.
12439 * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Likewise.
12440 (wrestrict_dom_walker::check_call): Likewise.
12441 * gimple.c (gimple_build_call_from_tree): Likewise.
12442 * gimple.h (enum gf_mask): Likewise.
12443 (gimple_call_with_bounds_p): Likewise.
12444 (gimple_call_set_with_bounds): Likewise.
12445 * gimplify.c (gimplify_init_constructor): Likewise.
12446 * ipa-cp.c (initialize_node_lattices): Likewise.
12447 (propagate_constants_across_call): Likewise.
12448 (find_more_scalar_values_for_callers_subset): Likewise.
12449 * ipa-hsa.c (process_hsa_functions): Likewise.
12450 * ipa-icf-gimple.c (func_checker::compare_gimple_call): Likewise.
12451 * ipa-icf.c (sem_function::merge): Likewise.
12452 * ipa-inline.c (early_inliner): Likewise.
12453 * ipa-pure-const.c (warn_function_noreturn): Likewise.
12454 (warn_function_cold): Likewise.
12455 (propagate_pure_const): Likewise.
12456 * ipa-ref.h (enum GTY): Likewise.
12457 * ipa-split.c (find_retbnd): Likewise.
12458 (consider_split): Likewise.
12459 (split_function): Likewise.
12460 * ipa-visibility.c (cgraph_externally_visible_p): Likewise.
12461 * ipa.c (walk_polymorphic_call_targets): Likewise.
12462 (symbol_table::remove_unreachable_nodes): Likewise.
12463 (process_references): Likewise.
12464 (cgraph_build_static_cdtor_1): Likewise.
12465 * lto-cgraph.c (lto_output_node): Likewise.
12466 (output_refs): Likewise.
12467 (compute_ltrans_boundary): Likewise.
12468 (input_overwrite_node): Likewise.
12469 (input_node): Likewise.
12470 (input_cgraph_1): Likewise.
12471 * params.def (PARAM_CHKP_MAX_CTOR_SIZE): Likewise.
12472 * passes.c (pass_manager::execute_early_local_passes): Likewise.
12473 (class pass_chkp_instrumentation_passes): Likewise.
12474 (make_pass_chkp_instrumentation_passes): Likewise.
12475 * passes.def: Likewise.
12476 * rtl.h (struct GTY): Likewise.
12477 (CALL_EXPR_WITH_BOUNDS_P): Likewise.
12478 * stor-layout.c (layout_type): Likewise.
12479 * symtab.c: Likewise.
12480 * target.def: Likewise.
12481 * targhooks.c (default_chkp_bound_type): Likewise.
12482 (default_chkp_bound_mode): Likewise.
12483 (default_builtin_chkp_function): Likewise.
12484 (default_chkp_function_value_bounds): Likewise.
12485 (default_chkp_make_bounds_constant): Likewise.
12486 (default_chkp_initialize_bounds): Likewise.
12487 * targhooks.h (default_chkp_bound_type): Likewise.
12488 (default_chkp_bound_mode): Likewise.
12489 (default_builtin_chkp_function): Likewise.
12490 (default_chkp_function_value_bounds): Likewise.
12491 (default_chkp_make_bounds_constant): Likewise.
12492 (default_chkp_initialize_bounds): Likewise.
12493 * toplev.c (compile_file): Likewise.
12494 (process_options): Likewise.
12495 * tree-core.h (DEF_BUILTIN): Likewise.
12496 (DEF_BUILTIN_CHKP): Likewise.
12497 * tree-inline.c (declare_return_variable): Likewise.
12498 (remap_gimple_stmt): Likewise.
12499 (copy_bb): Likewise.
12500 (initialize_inlined_parameters): Likewise.
12501 (expand_call_inline): Likewise.
12502 * tree-pass.h (make_pass_ipa_chkp_versioning): Likewise.
12503 (make_pass_ipa_chkp_early_produce_thunks): Likewise.
12504 (make_pass_ipa_chkp_produce_thunks): Likewise.
12505 (make_pass_chkp): Likewise.
12506 (make_pass_chkp_opt): Likewise.
12507 (make_pass_chkp_instrumentation_passes): Likewise.
12508 * tree-pretty-print.c (dump_generic_node): Likewise.
12509 * tree-ssa-ccp.c (insert_clobber_before_stack_restore): Likewise.
12510 * tree-ssa-dce.c (propagate_necessity): Likewise.
12511 (eliminate_unnecessary_stmts): Likewise.
12512 * tree-ssa-pre.c (create_expression_by_pieces): Likewise.
12513 * tree-ssa-sccvn.c (copy_reference_ops_from_call): Likewise.
12514 * tree-ssa-sccvn.h: Likewise.
12515 * tree-ssa-strlen.c (get_string_length): Likewise.
12516 (valid_builtin_call): Likewise.
12517 (adjust_last_stmt): Likewise.
12518 (handle_builtin_strchr): Likewise.
12519 (handle_builtin_strcpy): Likewise.
12520 (handle_builtin_stxncpy): Likewise.
12521 (handle_builtin_memcpy): Likewise.
12522 (handle_builtin_strcat): Likewise.
12523 (strlen_check_and_optimize_stmt): Likewise.
12524 * tree-stdarg.c (expand_ifn_va_arg_1): Likewise.
12525 * tree-streamer-in.c: Likewise.
12526 * tree-streamer.c (record_common_node): Likewise.
12527 * tree.c (tree_code_size): Likewise.
12528 (wide_int_to_tree_1): Likewise.
12529 (type_contains_placeholder_1): Likewise.
12530 (build_common_tree_nodes): Likewise.
12531 * tree.def (POINTER_BOUNDS_TYPE): Likewise.
12532 * tree.h (POINTER_BOUNDS_TYPE_P): Likewise.
12533 (POINTER_BOUNDS_P): Likewise.
12534 (BOUNDED_TYPE_P): Likewise.
12535 (BOUNDED_P): Likewise.
12536 (CALL_WITH_BOUNDS_P): Likewise.
12537 (pointer_bounds_type_node): Likewise.
12538 * value-prof.c (gimple_ic): Likewise.
12539 * var-tracking.c (vt_add_function_parameters): Likewise.
12540 * varasm.c (make_decl_rtl): Likewise.
12541 (assemble_start_function): Likewise.
12542 (output_constant): Likewise.
12543 (maybe_assemble_visibility): Likewise.
12544 * varpool.c (ctor_for_folding): Likewise.
12545 * chkp-builtins.def: Remove.
12546 * ipa-chkp.c: Remove.
12547 * ipa-chkp.h: Remove.
12548 * rtl-chkp.c: Remove.
12549 * rtl-chkp.h: Remove.
12550 * tree-chkp-opt.c: Remove.
12551 * tree-chkp.c: Remove.
12552 * tree-chkp.h: Remove.
12554 2018-06-07 Carl Love <cel@us.ibm.com>
12556 * config/rs6000/vsx.md (vextract_fp_from_shorth,
12557 vextract_fp_from_shortl): Add BE support.
12559 2018-06-07 Paul Koning <ni1d@arrl.net>
12561 * compare-elim.c (try_merge_compare): Don't merge compare if
12562 address contains a side effect.
12563 (try_eliminate_compare): Likewise.
12565 2018-06-07 Olga Makhotina <olga.makhotina@intel.com>
12567 * config.gcc: Support "tremont".
12568 * config/i386/driver-i386.c (host_detect_local_cpu): Detect "tremont".
12569 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
12571 * config/i386/i386.c (m_TREMONT): Define.
12572 (processor_target_table): Add "tremont".
12573 (PTA_TREMONT): Define.
12574 (ix86_lea_outperforms): Add TARGET_TREMONT.
12575 (get_builtin_code_for_version): Handle PROCESSOR_TREMONT.
12576 (fold_builtin_cpu): Add M_INTEL_TREMONT, replace M_INTEL_GOLDMONT
12577 and M_INTEL_GOLDMONT_PLUS.
12578 (fold_builtin_cpu): Add "tremont".
12579 (ix86_add_stmt_cost): Add TARGET_TREMONT.
12580 (ix86_option_override_internal): Add "tremont".
12581 * config/i386/i386.h (processor_costs): Define TARGET_TREMONT.
12582 (processor_type): Add PROCESSOR_TREMONT.
12583 * config/i386/x86-tune.def: Add m_TREMONT.
12584 * doc/invoke.texi: Add tremont as x86 -march=/-mtune= CPU type.
12586 2018-06-07 Jozef Lawrynowicz <jozef.l@mittosystems.com>
12588 * config/msp430/msp430.c (msp430_mcu_name): Set the "i" in the
12589 symbol defined for msp430i* devices to be lower case.
12591 2018-06-07 Richard Biener <rguenther@suse.de>
12593 * graphite-sese-to-poly.c (extract_affine): Avoid unneded
12594 wrapping. Properly wrap the result of a BIT_NOT_EXPR.
12595 Properly wrap signed arithmetic if overflow wraps.
12597 2018-06-07 Jakub Jelinek <jakub@redhat.com>
12599 PR tree-optimization/69615
12600 * tree-ssa-reassoc.c (optimize_range_tests_var_bound): If rhs2 is lhs
12601 of a cast from a same precision integral SSA_NAME in a bb dominated
12602 by first_bb, retry with rhs2 set to the rhs1 of the cast. Don't emit
12603 cast to utype if rhs2 has already a compatible type.
12605 2018-06-07 Richard Biener <rguenther@suse.de>
12607 PR tree-optimization/85935
12608 * graphite-scop-detection.c (find_params_in_bb): Analyze
12609 condition operands with respect to the correct loop. Assert
12610 the analysis doesn't fail.
12612 2018-06-04 Carl Love <cel@us.ibm.com>
12614 * config/rs6000/vsx.md (first_match_index_<mode>): Calculate index
12615 using natural element order. Use gen_lshrsi3 instead of gen_ashrsi3
12616 as it is slightly cheaper.
12617 (first_match_or_eos_index_<mode>):
12618 Calculate index using natural element order.
12619 (first_match_index_<mode>):
12620 Calculate index using natural element order.
12621 (first_match_or_eos_index_<mode>):
12622 Calculate index using natural order.
12623 (define_insn vclzlsbb): Change to define_insn vclzlsbb_<mode>.
12624 for BE and LE modes.
12625 * config/rs6000/rs6000-c.c: Rename P9V_BUILTIN_VCLZLSBB,
12626 P9V_BUILTIN_VCLZLSBB_V16QI.
12627 * config/rs6000/rs6000-builtin.def: Make VCLZLSBB mode
12630 2018-06-06 Kelvin Nilsen <kelvin@gcc.gnu.org>
12632 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Adjust
12633 indentation and line wrap for many prototypes. Add missing
12634 @smallexample directives around block of prototypes for vec_xl and
12637 2018-06-05 Michael Meissner <meissner@linux.ibm.com>
12639 * config/rs6000/rs6000.c (rs6000_passes_ieee128): New boolean to
12640 track if we pass or return IEEE 128-bit floating point.
12641 (ieee128_mangling_gcc_8_1): New boolean to say whether to generate
12642 C++ mangling that is compatible with GCC 8.1.
12643 (TARGET_ASM_GLOBALIZE_DECL_NAME): Override target hook.
12644 (init_cumulative_args): Note if we pass or return IEEE 128-bit
12645 floating point types.
12646 (rs6000_function_arg_advance_1): Likewise.
12647 (rs6000_mangle_type): Optionally generate mangled names that match
12648 what GCC 8.1 generated for IEEE 128-bit floating point types.
12649 (rs6000_globalize_decl_name): If we have an external function that
12650 passes or returns IEEE 128-bit types, generate a weak reference
12651 from the mangled name used in GCC 8.1 to the current mangled
12653 (rs6000_init_builtins): Make __ibm128 use the long double type if
12654 long double is IBM extended double. Make __float128 use the long
12655 double type if long double is IEEE 128-bit.
12658 * config/rs6000/rs6000-builtin.def (BU_IBM128_2): New helper
12659 macro for __ibm128 built-in functions.
12660 (PACK_IF): Add __ibm128 pack/unpack functions.
12661 (UNPACK_IF): Likewise.
12662 * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Do not
12663 enable long double built-in functions if long double is IEEE
12664 128-bit floating point.
12665 (rs6000_invalid_builtin): Update long double built-in function
12667 (rs6000_expand_builtin): For PACK_IF and UNPACK_IF built-in
12668 functions, adjust the built-in function to use the long double
12669 built-in function if __ibm128 and long double are the same type.
12670 * doc/extend.texi (PowerPC builtins): Update documention for
12671 __builtin_{,un}pack_longdouble. Add documentation for
12672 __builtin_{,un}pack_ibm128.
12674 2018-06-06 Jim Wilson <jimw@sifive.com>
12676 * config/riscv/riscv.c (enum riscv_privilege_levels): New.
12677 (struct machine_function): New field interrupt_mode.
12678 (riscv_handle_type_attribute): New function. Add forward declaration.
12679 (riscv_attribute_table) <interrupt>: Use riscv_handle_type_attribute.
12680 (riscv_expand_epilogue): Check interrupt_mode field.
12681 (riscv_set_current_function): Check interrupt attribute args and
12682 set interrupt_mode field.
12683 * config/riscv/riscv.md (UNSPECV_SRET, UNSPECV_URET): New.
12684 (riscv_sret, riscv_uret): New.
12685 * doc/extend.texi (RISC-V Function Attributes) <interrupt>: Document
12686 new arguments to interrupt attribute.
12688 2018-06-06 Peter Bergner <bergner@vnet.ibm.com>
12691 * /config/rs6000/rs6000.h (ASM_CPU_SPEC): Add support for -mpower9.
12692 Don't handle -mcpu=power8 if -mpower9-vector is also used.
12694 2018-06-06 Kelvin Nilsen <kelvin@gcc.gnu.org>
12696 * config/rs6000/rs6000-builtin.def (VSX_BUILTIN_VEC_LD,
12697 VSX_BUILTIN_VEC_ST): Add comment to explain non-traditional uses.
12698 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
12699 several redundant entries.
12701 2018-06-06 David Malcolm <dmalcolm@redhat.com>
12703 * config/i386/i386-protos.h (ix86_expand_call): Strengthen return
12704 type from "rtx" to "rtx_insn *".
12705 * config/i386/i386.c (ix86_expand_split_stack_prologue): Likewise
12706 for local "call_insn", removing cast.
12707 (ix86_expand_call): Likewise, introducing a "call_insn" local.
12709 2018-06-06 Eric Botcazou <ebotcazou@adacore.com>
12711 PR tree-optimization/86066
12712 * gimple-ssa-store-merging.c (process_store): Do not bypass BIT_NOT_EXPR
12713 for BIT_INSERT_EXPR stores.
12715 2018-06-06 Richard Biener <rguenther@suse.de>
12717 PR tree-optimization/86062
12718 * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
12719 component refs ontop
12720 of to be offsetted base.
12722 2018-06-06 Jozef Lawrynowicz <jozef.l@mittosystems.com>
12724 * config/msp430/msp430.c (msp430_attr): Allow interrupt handlers
12725 to be static and remove check on interrupt attribute name.
12727 2018-06-05 Kelvin Nilsen <kelvin@gcc.gnu.org>
12729 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
12730 volatile qualifier from vec_lvsl and vec_lvsr argument prototypes.
12732 2018-06-05 Steve Ellcey <sellcey@cavium.com>
12735 * config/aarch64/aarch64-protos.h (aarch64_err_no_fpadvsimd): Remove
12737 * config/aarch64/aarch64-protos..c (aarch64_err_no_fpadvsimd):
12738 Remove second argument, change how error is called.
12739 (aarch64_layout_arg): Remove second argument from
12740 aarch64_err_no_fpadvsimd call.
12741 (aarch64_init_cumulative_args): Ditto.
12742 (aarch64_gimplify_va_arg_expr): Ditto.
12743 * config/aarch64/aarch64.md (mov<mode>): Ditto.
12745 2018-06-05 Uros Bizjak <ubizjak@gmail.com>
12747 * config/i386/i386.md (simple_return_indirect_internal): New expander.
12748 (*simple_return_indirect_internal<mode>): Rename from
12749 simple_return_indirect_internal. Use W mode iterator.
12750 (rstorssp): New expander.
12751 (*rstorssp<mode>): Rename from rstorssp. Use P mode iterator.
12752 (clrssbsy): New expander.
12753 (*clrssbsy<mode>): Rename from clrssbsy. Use P mode iterator.
12755 2018-06-05 Andre Vieira <andre.simoesdiasvieira@arm.com>
12757 * config/arm/arm_cmse.h (cmse_nsfptr_create): Change typeof to
12759 (cmse_check_pointed_object): Likewise.
12761 2018-06-05 Martin Liska <mliska@suse.cz>
12763 PR gcov-profile/47618
12764 * doc/invoke.texi: Document how -fprofile-dir format
12767 2018-06-05 Richard Biener <rguenther@suse.de>
12769 * tree-cfgcleanup.c (cleanup_control_flow_pre): For edge
12770 removal pretend DOM info isn't available so we do not update
12771 it and only remove edges, not dominated blocks. Actually free
12772 DOM info in case we removed something. Remove unreachable blocks.
12773 (mfb_keep_latches): Work with either DOM info or marked backedges.
12774 (cleanup_tree_cfg_noloop): Do not remove unreachable blocks
12775 first. Mark backedges if DOM info isn't available.
12776 (Re-)compute DOM info after cleanup_control_flow_pre.
12778 2018-06-05 Richard Biener <rguenther@suse.de>
12780 * tree-cfg.c (struct locus_discrim_map): Store line, not location.
12781 (locus_discrim_hasher::hash): Adjust.
12782 (locus_discrim_hasher::equal): Likewise.
12783 (next_discriminator_for_locus): Work on line directly.
12784 (same_line_p): Pass in expanded locus1 as well.
12785 (assign_discriminators): Avoid redundant location expansions.
12787 2018-06-05 Richard Biener <rguenther@suse.de>
12789 PR tree-optimization/86046
12790 * tree-ssa.c (maybe_optimize_var): Clear DECL_GIMPLE_REG_P
12791 if required after clearing TREE_ADDRESSABLE.
12793 2018-06-05 Richard Biener <rguenther@suse.de>
12795 PR tree-optimization/86047
12796 * tree-ssa-loop.c (for_each_index): Glob handling of all
12797 decls and constants and really handle all of them.
12799 2018-06-05 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
12802 * config/arm/arm-builtins.c (arm_type_qualifiers): Add
12803 qualifier_void_pointer and qualifier_const_void_pointer.
12804 (arm_ldc_qualifiers, arm_stc_qualifiers): Use the above.
12805 (arm_init_builtins): Handle the above.
12806 * config/arm/arm_acle.h (__arm_cdp, __arm_ldc, __arm_ldcl, __arm_stc,
12807 __arm_stcl, __arm_mcr, __arm_cdp2, __arm_ldc2, __arm_ldcl2, __arm_stc2,
12808 __arm_stcl2,__arm_mcr2, __arm_mcrr, __arm_mcrr2): Remove return for
12811 2018-06-05 Martin Liska <mliska@suse.cz>
12813 * auto-profile.c (read_autofdo_file): Do not use
12814 gcov_ctr_summary struct.
12815 (afdo_callsite_hot_enough_for_early_inline): Likewise.
12816 * coverage.c (struct counts_entry): Likewise.
12817 (read_counts_file): Read just single summary entry.
12818 (get_coverage_counts): Use gcov_summary struct.
12819 * coverage.h (get_coverage_counts): Likewise.
12820 * gcov-dump.c (dump_working_sets): Likewise.
12821 (tag_summary): Dump just single summary.
12822 * gcov-io.c (gcov_write_summary): Write just histogram
12824 (gcov_read_summary): Read just single summary.
12825 (compute_working_sets): Use gcov_summary struct.
12826 * gcov-io.h (GCOV_TAG_SUMMARY_LENGTH): Remove usage
12827 of GCOV_COUNTERS_SUMMABLE.
12828 (GCOV_COUNTERS_SUMMABLE): Remove.
12829 (GCOV_FIRST_VALUE_COUNTER): Replace with
12830 GCOV_COUNTER_V_INTERVAL.
12831 (struct gcov_ctr_summary): Remove.
12832 (struct gcov_summary): Directly use fields of former
12834 (compute_working_sets): Use gcov_summary struct.
12835 * gcov.c (read_count_file): Do not use ctrs fields.
12836 * lto-cgraph.c (merge_profile_summaries): Use gcov_summary
12838 * lto-streamer.h (struct GTY): Make profile_info gcov_summary
12840 * profile.c: Likewise.
12841 * profile.h: Likewise.
12843 2018-06-05 Martin Liska <mliska@suse.cz>
12845 PR gcov-profile/84846
12846 * gcov.c (output_lines): Print working directory only
12847 in intermediate format.
12849 2018-06-05 Andreas Krebbel <krebbel@linux.ibm.com>
12851 * config/s390/s390-builtin-types.def: Add void function type.
12852 * config/s390/s390-builtins.def: Use the function type for the
12855 2018-06-04 Jim Wilson <jimw@sifive.com>
12857 * config/riscv/riscv-protos.h (riscv_expand_epilogue): Change bool arg
12859 * config/riscv/riscv.c (riscv_for_each_saved_reg): New args epilogue
12860 and maybe_eh_return. Change regno to unsigned int. Use new args to
12861 handle EH_RETURN_DATA_REGNO registers properly.
12862 (riscv_expand_prologue): Pass new args to riscv_for_each_saved_reg.
12863 (riscv_expand_epilogue): Update comment. Change argument name and
12864 type. Update code to use new name and type. Pass new args to
12865 riscv_for_each_saved_reg. Only use EH_RETURN_STACKADJ_RTX when
12867 * config/riscv/riscv.md (NORMAL_RETURN): New.
12868 (SIBCALL_RETURN, EXCEPTION_RETURN): New.
12869 (epilogue, sibcall_epilogue): Update riscv_expand_epilogue arg.
12870 (eh_return): Call gen_eh_return_internal and emit barrier.
12871 (eh_return_internal): Call riscv_expand_epilogue.
12873 2018-06-04 Eric Botcazou <ebotcazou@adacore.com>
12875 * gimple-ssa-store-merging.c (struct merged_store_group): Move up
12876 bit_insertion field and declare can_be_merged_into method.
12877 (merged_store_group::can_be_merged_into): New method.
12878 (imm_store_chain_info::coalesce_immediate): Call it to decide whether
12879 consecutive non-overlapping stores can be merged. Turn MEM_REF stores
12880 into BIT_INSERT_EXPR stores if the group contains a non-MEM_REF store.
12882 2018-06-04 Richard Biener <rguenther@suse.de>
12884 PR tree-optimization/85955
12885 * builtins.c (fold_builtin_sincos): Convert pointers to
12886 destination to appropriate type before dereferencing.
12888 2018-06-04 Segher Boessenkool <segher@kernel.crashing.org>
12890 * config/rs6000/rs6000.md (abs<mode>2 for FLOAT128): Handle IFmode.
12892 2018-06-04 Richard Sandiford <richard.sandiford@linaro.org>
12894 * expr.c (expand_expr_real_1): Force the operand into memory if
12895 its TYPE_MODE is BLKmode and if there is no integer mode for
12896 the number of bits being extracted.
12898 2018-06-04 Jakub Jelinek <jakub@redhat.com>
12902 * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
12903 Use vptestnm rather than vptestm in (=Yc,v,C) variant.
12905 2018-06-04 Richard Biener <rguenther@suse.de>
12907 * tree-cfgcleanup.c (cleanup_tree_cfg_1): Fold into...
12908 (cleanup_tree_cfg_noloop): ... single caller. Do
12909 start_recording_case_labels later.
12911 2018-06-04 Sebastian Peryt <sebastian.peryt@intel.com>
12913 * config/i386/cldemoteintrin.h: Change define from _X86INTRIN_H_INCLUDED
12914 to _IMMINTRIN_H_INCLUDED.
12915 * config/i386/pconfigintrin.h: Ditto.
12916 * config/i386/waitpkgintrin.h: Ditto.
12917 * config/i386/immintrin.h: Add includes for sgxintrin.h,
12918 pconfigintrin.h, waitpkgintrin.h and cldemoteintrin.h.
12919 * config/i386/x86intrin.h: Remove includes for mintrin.h, xmmintrin.h,
12920 emmintrin.h, pmmintrin.h, tmmintrin.h, smmintrin.h, wmmintrin.h,
12921 bmiintrin.h, bmi2intrin.h, lzcntintrin.h, sgxintrin.h, pconfigintrin.h,
12922 waitpkgintrin.h and cldemoteintrin.h.
12924 2018-06-04 Richard Biener <rguenther@suse.de>
12926 PR tree-optimization/86038
12927 * tracer.c (find_best_successor): Check probability for
12928 being initialized, bail out if not.
12930 2018-06-04 Richard Earnshaw <rearnsha@arm.com>
12933 * config/arm/arm-cpus.in (ALL_QUIRKS): Add xscale feature to the list
12934 of bits to ignore when comparing architectures.
12936 2018-06-04 Jakub Jelinek <jakub@redhat.com>
12938 PR tree-optimization/69615
12939 * fold-const.c (merge_ranges): If range1 is - [x, x] and x is the
12940 maximum or minimum of the type, try to merge it also as if
12941 range1 is + [-, x - 1] or + [x + 1, -].
12944 * tree.c (inchash::add_expr): Handle IDENTIFIER_NODE.
12946 2018-06-03 Eric Botcazou <ebotcazou@adacore.com>
12948 PR tree-optimization/86034
12949 * gimple-ssa-store-merging.c (output_merged_store): Convert the RHS to
12950 the unsigned bitfield type in a bit insertion sequence if it does not
12951 have a larger precision than the bitfield size.
12952 (process_store): Also bypass widening conversions for BIT_INSERT_EXPR.
12954 2018-06-03 Kito Cheng <kito.cheng@gmail.com>
12956 * config/nds32/nds32-peephole2.md: Add new patterns for code size.
12958 2018-06-03 Chung-Ju Wu <jasonwucj@gmail.com>
12960 * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3J.
12961 * config/nds32/nds32.c (nds32_option_override): Consider ARCH_V3J.
12962 * config/nds32/nds32.h (TARGET_ISA_V3): Add ARCH_V3J checking.
12963 * config/nds32/nds32.opt (march): Add enum value Value(ARCH_V3J).
12965 2018-06-03 Chung-Ju Wu <jasonwucj@gmail.com>
12967 * common/config/nds32/nds32-common.c (nds32_option_optimization_table):
12968 Disable -fdelete-null-pointer-checks for ELF toolchain.
12970 2018-06-02 Chung-Ju Wu <jasonwucj@gmail.com>
12971 Kito Cheng <kito.cheng@gmail.com>
12973 * config.gcc (nds32*): Use nds32-linux.opt and nds32-elf.opt.
12974 (nds32le-*-*, nds32be-*-*): Integrate checking process.
12975 (nds32*-*-*): Add glibc and uclibc conditions.
12976 * common/config/nds32/nds32-common.c (nds32_except_unwind_info): New.
12977 (TARGET_EXCEPT_UNWIND_INFO): Define.
12978 * config/nds32/elf.h: New file.
12979 * config/nds32/linux.h: New file.
12980 * config/nds32/nds32-elf.opt: New file.
12981 * config/nds32/nds32-linux.opt: New file.
12982 * config/nds32/nds32-fp-as-gp.c
12983 (pass_nds32_fp_as_gp::gate): Consider TARGET_LINUX_ABI.
12984 * config/nds32/nds32.c (nds32_conditional_register_usage): Consider
12986 (nds32_asm_file_end): Ditto.
12987 (nds32_print_operand): Ditto.
12988 (nds32_insert_attributes): Ditto.
12989 (nds32_init_libfuncs): New function.
12990 (TARGET_HAVE_TLS): Define.
12991 (TARGET_INIT_LIBFUNCS): Define.
12992 * config/nds32/nds32.h (TARGET_DEFAULT_RELAX): Apply different relax
12994 (TARGET_ELF): Apply different mcmodel setting.
12995 (LINK_SPEC, LIB_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): The content has
12996 been migrated into elf.h and linux.h files.
12997 * config/nds32/nds32.md (add_pc): Consider TARGET_LINUX_ABI.
12998 * config/nds32/nds32.opt (mvh): Consider TARGET_LINUX_ABI.
12999 (mcmodel): The content has been migrated into nds32-elf.opt and
13000 nds32-linux.opt files.
13001 * config/nds32/t-elf: New file.
13002 * config/nds32/t-linux: New file.
13004 2018-06-02 Chung-Ju Wu <jasonwucj@gmail.com>
13005 Shiva Chen <shiva0217@gmail.com>
13007 * config/nds32/constants.md (unspec_volatile_element): Add
13008 UNSPEC_VOLATILE_OMIT_FP_BEGIN and UNSPEC_VOLATILE_OMIT_FP_END.
13009 * config/nds32/nds32-fp-as-gp.c: New implementation of fp_as_gp
13011 * config/nds32/nds32-protos.h (nds32_naked_function_p): Declare.
13012 (make_pass_nds32_fp_as_gp): Declare.
13013 * config/nds32/nds32.c (nds32_register_passes): Add fp_as_gp as one
13015 (nds32_asm_function_end_prologue): Remove unused asm output.
13016 (nds32_asm_function_begin_epilogue): Remove unused asm output.
13017 (nds32_asm_file_start): Output necessary fp_as_gp information.
13018 (nds32_option_override): Adjust register usage.
13019 (nds32_expand_prologue): Consider fp_as_gp situation.
13020 (nds32_expand_prologue_v3push): Consider fp_as_gp situation.
13021 * config/nds32/nds32.md (prologue): Check fp_as_gp_p and naked_p.
13024 (simple_return): Ditto.
13025 (omit_fp_begin): Output special directive for fp_as_gp.
13026 (omit_fp_end): Output special directive for fp_as_gp.
13027 * config/nds32/nds32.opt (mfp-as-gp, mno-fp-as-gp, mforce-fp-as-gp,
13028 mforbid-fp-as-gp): New options.
13030 2018-06-01 Mark Wielaard <mark@klomp.org>
13032 * dwarf2out.c (dwarf2out_finish): Remove generation of
13033 DW_AT_loclists_base.
13035 2018-06-01 Eric Botcazou <ebotcazou@adacore.com>
13037 * gimple-ssa-store-merging.c: Include gimple-fold.h.
13038 (struct store_immediate_info): Document BIT_INSERT_EXPR stores.
13039 (struct merged_store_group): Add bit_insertion field.
13040 (dump_char_array): Use standard hexadecimal format.
13041 (merged_store_group::merged_store_group): Set bit_insertion to false.
13042 (merged_store_group::apply_stores): Use optimal buffer size. Deal
13043 with BIT_INSERT_EXPR stores. Move up code updating the mask and
13044 also print the mask in the dump file.
13045 (pass_store_merging::gate): Minor tweak.
13046 (imm_store_chain_info::coalesce_immediate): Fix wrong association
13047 of stores with groups in dump. Allow coalescing of BIT_INSERT_EXPR
13048 stores with INTEGER_CST stores.
13049 (count_multiple_uses) <BIT_INSERT_EXPR>: New case.
13050 (imm_store_chain_info::output_merged_store): Add try_bitpos variable
13051 and use it throughout. Generate bit insertion sequences if need be.
13052 (pass_store_merging::process_store): Remove redundant condition.
13053 Record stores from a SSA name to a bit-field with BIT_INSERT_EXPR.
13055 2018-06-01 Segher Boessenkool <segher@kernel.crashing.org>
13057 * config/rs6000/rs6000.c (rs6000_mangle_type): Change the mangling of
13058 the 128-bit floating point types. Fix function comment.
13060 2018-06-01 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
13062 * config/aarch64/aarch64-simd.md
13063 (aarch64_simd_vec_unpack<su>_lo_<mode>): Use UXTL and SXTL assembler
13065 (aarch64_simd_vec_unpack<su>_hi_<mode>): Use UXTL2 and SXTL2 assembler
13068 2018-06-01 Richard Sandiford <richard.sandiford@linaro.org>
13070 PR tree-optimization/85989
13071 * gimple-ssa-backprop.c (backprop::m_visited_phis): New member
13073 (backprop::intersect_uses): Check it when deciding whether this
13074 is a backedge reference.
13075 (backprop::process_block): Add each phi to m_visited_phis
13076 after visiting it, then clear it at the end.
13078 2018-06-01 Richard Biener <rguenther@suse.de>
13080 * tree-vectorizer.h (vect_dr_stmt): New function.
13081 (vect_get_load_cost): Adjust.
13082 (vect_get_store_cost): Likewise.
13083 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence):
13084 Use vect_dr_stmt instead of DR_SMTT.
13085 (vect_record_base_alignments): Likewise.
13086 (vect_calculate_target_alignment): Likewise.
13087 (vect_compute_data_ref_alignment): Likewise and make static.
13088 (vect_update_misalignment_for_peel): Likewise.
13089 (vect_verify_datarefs_alignment): Likewise.
13090 (vector_alignment_reachable_p): Likewise.
13091 (vect_get_data_access_cost): Likewise. Pass down
13092 vinfo to vect_get_load_cost/vect_get_store_cost instead of DR.
13093 (vect_get_peeling_costs_all_drs): Likewise.
13094 (vect_peeling_hash_get_lowest_cost): Likewise.
13095 (vect_enhance_data_refs_alignment): Likewise.
13096 (vect_find_same_alignment_drs): Likewise.
13097 (vect_analyze_data_refs_alignment): Likewise.
13098 (vect_analyze_group_access_1): Likewise.
13099 (vect_analyze_group_access): Likewise.
13100 (vect_analyze_data_ref_access): Likewise.
13101 (vect_analyze_data_ref_accesses): Likewise.
13102 (vect_vfa_segment_size): Likewise.
13103 (vect_small_gap_p): Likewise.
13104 (vectorizable_with_step_bound_p): Likewise.
13105 (vect_prune_runtime_alias_test_list): Likewise.
13106 (vect_analyze_data_refs): Likewise.
13107 (vect_supportable_dr_alignment): Likewise.
13108 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
13109 (vect_gen_prolog_loop_niters): Likewise.
13110 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
13111 * tree-vect-patterns.c (vect_recog_bool_pattern): Do not
13113 (vect_recog_mask_conversion_pattern): Likewise.
13114 (vect_try_gather_scatter_pattern): Likewise.
13115 * tree-vect-stmts.c (vect_model_store_cost): Pass stmt_info
13116 to vect_get_store_cost.
13117 (vect_get_store_cost): Get stmt_info instead of DR.
13118 (vect_model_load_cost): Pass stmt_info to vect_get_load_cost.
13119 (vect_get_load_cost): Get stmt_info instead of DR.
13121 2018-06-01 Richard Biener <rguenther@suse.de>
13123 PR middle-end/86017
13124 * gimple-fold.c (var_decl_component_p): Also allow offsetted
13125 vars wrapped in MEM_REFs.
13127 2018-06-01 Richard Sandiford <richard.sandiford@linaro.org>
13129 * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
13130 Fix subreg tests so that we only return a choice between
13131 GENERAL_REGS and FP_REGS if the original classes included both.
13133 2018-06-01 Richard Biener <rguenther@suse.de>
13136 * tree-ssa-structalias.c (get_function_part_constraint):
13137 Handle NULL fi->decl.
13138 (find_func_aliases_for_call): Properly handle indirect
13139 fi from direct call.
13140 (find_func_clobbers): Likewise.
13141 (ipa_pta_execute): Likewise.
13142 (create_variable_info_for): For functions that are ifunc_resolver
13143 resolve to a varinfo that contains the result of the resolver call.
13144 (associate_varinfo_to_alias): Do not treat ifunc resolvers as
13147 2018-05-31 Michael Collison <michael.collison@arm.com>
13149 * config/aarch64/aarch64.md:
13150 (*fix_to_zero_extenddfdi2): New pattern.
13151 * gcc.target/aarch64/fix_extend1.c: New testcase.
13153 2018-05-31 Qing Zhao <qing.zhao@oracle.com>
13155 PR middle-end/78809
13156 PR middle-end/83026
13157 * builtins.c (expand_builtin): Add the handling of BUILT_IN_STRCMP_EQ
13158 and BUILT_IN_STRNCMP_EQ.
13159 * builtins.def: Add new builtins BUILT_IN_STRCMP_EQ and
13160 BUILT_IN_STRNCMP_EQ.
13161 * gimple-fold.c (gimple_fold_builtin_string_compare): Add the
13162 handling of BUILTIN_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
13163 (gimple_fold_builtin): Likewise.
13164 * tree-ssa-strlen.c (compute_string_length): New function.
13165 (determine_min_obsize): New function.
13166 (handle_builtin_string_cmp): New function to handle calls to
13167 string compare functions.
13168 (strlen_optimize_stmt): Add handling to builtin string compare
13170 * tree-ssa-structalias.c (find_func_aliases_for_builtin_call):
13171 Add the handling of BUILT_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
13172 * tree.c (build_common_builtin_nodes): Add new defines of
13173 BUILT_IN_STRNCMP_EQ and BUILT_IN_STRCMP_EQ.
13175 2018-05-31 Jakub Jelinek <jakub@redhat.com>
13178 * bb-reorder.c (pass_partition_blocks::gate): Return false for
13179 functions with naked attribute.
13181 2018-05-31 Uros Bizjak <ubizjak@gmail.com>
13183 * config/i386/sse.md (avx_vec_concat<mode>):
13184 Substitute concat_tg_mode mode attribute with xtg_mode.
13185 (<mask_codefor>avx512dq_broadcast<mode><mask_name>_1): Ditto.
13186 (concat_tg_mode): Remove mode attribute.
13188 2018-05-31 Martin Sebor <msebor@redhat.com>
13191 * calls.c (alloc_max_size): Correct a logic error/typo.
13192 Treat excessive arguments as infinite. Warn for invalid arguments.
13193 * doc/invoke.texi (-Walloc-size-larger-than): Update.
13195 2018-05-31 H.J. Lu <hongjiu.lu@intel.com>
13198 * config/i386/x86-tune.def: Re-enable partial_reg_dependency
13199 and movx for Haswell.
13201 2018-05-31 Chung-Lin Tang <cltang@codesourcery.com>
13202 Cesar Philippidis <cesar@codesourcery.com>
13204 PR middle-end/85879
13205 * gimplify.c (gimplify_adjust_omp_clauses): Add 'remove = true'
13206 when emitting error on private/firstprivate reductions.
13207 * omp-low.c (lower_omp_target): Avoid reference-type processing
13208 on pointers for firstprivate clause.
13210 2018-05-31 Sameera Deshpande <sameera.deshpande@linaro.org>
13212 * config/aarch64/aarch64-simd-builtins.def (ld1x3): New.
13215 * config/aarch64/aarch64-simd.md
13216 (aarch64_ld1x3<VALLDIF:mode>): New pattern.
13217 (aarch64_ld1_x3_<mode>): Likewise
13218 (aarch64_st1x2<VALLDIF:mode>): Likewise
13219 (aarch64_st1_x2_<mode>): Likewise
13220 (aarch64_st1x3<VALLDIF:mode>): Likewise
13221 (aarch64_st1_x3_<mode>): Likewise
13222 * config/aarch64/arm_neon.h (vld1_u8_x3): New function.
13223 (vld1_s8_x3): Likewise.
13224 (vld1_u16_x3): Likewise.
13225 (vld1_s16_x3): Likewise.
13226 (vld1_u32_x3): Likewise.
13227 (vld1_s32_x3): Likewise.
13228 (vld1_u64_x3): Likewise.
13229 (vld1_s64_x3): Likewise.
13230 (vld1_f16_x3): Likewise.
13231 (vld1_f32_x3): Likewise.
13232 (vld1_f64_x3): Likewise.
13233 (vld1_p8_x3): Likewise.
13234 (vld1_p16_x3): Likewise.
13235 (vld1_p64_x3): Likewise.
13236 (vld1q_u8_x3): Likewise.
13237 (vld1q_s8_x3): Likewise.
13238 (vld1q_u16_x3): Likewise.
13239 (vld1q_s16_x3): Likewise.
13240 (vld1q_u32_x3): Likewise.
13241 (vld1q_s32_x3): Likewise.
13242 (vld1q_u64_x3): Likewise.
13243 (vld1q_s64_x3): Likewise.
13244 (vld1q_f16_x3): Likewise.
13245 (vld1q_f32_x3): Likewise.
13246 (vld1q_f64_x3): Likewise.
13247 (vld1q_p8_x3): Likewise.
13248 (vld1q_p16_x3): Likewise.
13249 (vld1q_p64_x3): Likewise.
13250 (vst1_s64_x2): Likewise.
13251 (vst1_u64_x2): Likewise.
13252 (vst1_f64_x2): Likewise.
13253 (vst1_s8_x2): Likewise.
13254 (vst1_p8_x2): Likewise.
13255 (vst1_s16_x2): Likewise.
13256 (vst1_p16_x2): Likewise.
13257 (vst1_s32_x2): Likewise.
13258 (vst1_u8_x2): Likewise.
13259 (vst1_u16_x2): Likewise.
13260 (vst1_u32_x2): Likewise.
13261 (vst1_f16_x2): Likewise.
13262 (vst1_f32_x2): Likewise.
13263 (vst1_p64_x2): Likewise.
13264 (vst1q_s8_x2): Likewise.
13265 (vst1q_p8_x2): Likewise.
13266 (vst1q_s16_x2): Likewise.
13267 (vst1q_p16_x2): Likewise.
13268 (vst1q_s32_x2): Likewise.
13269 (vst1q_s64_x2): Likewise.
13270 (vst1q_u8_x2): Likewise.
13271 (vst1q_u16_x2): Likewise.
13272 (vst1q_u32_x2): Likewise.
13273 (vst1q_u64_x2): Likewise.
13274 (vst1q_f16_x2): Likewise.
13275 (vst1q_f32_x2): Likewise.
13276 (vst1q_f64_x2): Likewise.
13277 (vst1q_p64_x2): Likewise.
13278 (vst1_s64_x3): Likewise.
13279 (vst1_u64_x3): Likewise.
13280 (vst1_f64_x3): Likewise.
13281 (vst1_s8_x3): Likewise.
13282 (vst1_p8_x3): Likewise.
13283 (vst1_s16_x3): Likewise.
13284 (vst1_p16_x3): Likewise.
13285 (vst1_s32_x3): Likewise.
13286 (vst1_u8_x3): Likewise.
13287 (vst1_u16_x3): Likewise.
13288 (vst1_u32_x3): Likewise.
13289 (vst1_f16_x3): Likewise.
13290 (vst1_f32_x3): Likewise.
13291 (vst1_p64_x3): Likewise.
13292 (vst1q_s8_x3): Likewise.
13293 (vst1q_p8_x3): Likewise.
13294 (vst1q_s16_x3): Likewise.
13295 (vst1q_p16_x3): Likewise.
13296 (vst1q_s32_x3): Likewise.
13297 (vst1q_s64_x3): Likewise.
13298 (vst1q_u8_x3): Likewise.
13299 (vst1q_u16_x3): Likewise.
13300 (vst1q_u32_x3): Likewise.
13301 (vst1q_u64_x3): Likewise.
13302 (vst1q_f16_x3): Likewise.
13303 (vst1q_f32_x3): Likewise.
13304 (vst1q_f64_x3): Likewise.
13305 (vst1q_p64_x3): Likewise.
13307 2018-05-30 Jozef Lawrynowicz <jozef.l@mittosystems.com>
13309 * config/msp430/msp430.c (msp430_output_labelref): Prepend
13310 user_label_prefix to name.
13312 * tree-core.h: Update comment about the format of NAME string
13313 passed to handler in attribute_spec.
13315 * config/msp430/msp430.md: Remove erroneous subreg expression from
13316 zero_extendqisi2 insn pattern. Remove msp430x ISA restriction on
13317 zero_extend{q,h}isi2.
13319 2018-05-30 Borislav Petkov <bp@suse.de>
13321 * doc/extend.texi: Document some architecture specific
13322 constraints and sort entries.
13324 2018-05-30 Martin Sebor <msebor@redhat.com>
13326 PR middle-end/85369
13327 * builtins.c (expand_builtin_stpcpy_1): New function.
13328 (expand_builtin_stpcpy): Call it, and call maybe_warn_nonstring_arg
13329 only if the former succeeds.
13331 2018-05-31 Sameera Deshpande <sameera.deshpande@linaro.org>
13333 * config/aarch64/aarch64-cores.def (saphira) : Add support for ARMv8.4
13336 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
13338 * doc/invoke.texi (-flinker-output): Document
13340 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
13342 * passes.c (ipa_write_summaries): Only modify statements if body
13344 * cgraphunit.c (ipa_passes): Also produce intermeidate code when
13345 incrementally linking.
13346 (ipa_passes): Likewise.
13347 * lto-cgraph.c (lto_output_node): When incrementally linking do not
13348 pass down resolution info.
13349 * common.opt (flag_incremental_link): Update info.
13350 * gcc.c (plugin specs): Turn flinker-output=* to
13351 -plugin-opt=-linker-output-known
13352 * toplev.c (compile_file): Also cut compilation when doing incremental
13354 * flag-types. (enum lto_partition_model): Add
13355 LTO_LINKER_OUTPUT_NOLTOREL.
13356 (invoke.texi): Add -flinker-output docs.
13357 * ipa.c (symbol_table::remove_unreachable_nodes): Handle LTO incremental
13358 link same way as WPA; do not stream in dead initializers.
13360 * dwarf2out.c (dwarf2out_die_ref_for_decl,
13361 darf2out_register_external_decl): Support incremental link.
13363 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
13365 * lto-opts.c (lto_write_options): Skip OPT_dumpdir, OPT_fresolution_.
13367 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
13369 * lto-wrapper.c (debug_objcopy): Add rename parameter; pass
13370 it down to simple_object_copy_lto_debug_sections.
13371 (run_gcc): Determine incremental LTO link time and configure
13372 lto1 into non-wpa mode, disable renaming of debug sections.
13374 2018-05-30 Kelvin Nilsen <kelvin@gcc.gnu.org>
13376 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
13377 descriptions of various incorrectly documented functions.
13379 2018-05-30 Andre Vieira <andre.simoesdiasvieira@arm.com>
13382 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
13383 address check not strict.
13385 2018-05-30 Richard Biener <rguenther@suse.de>
13387 PR tree-optimization/85964
13388 * tracer.c (better_p): Drop initialized count check, we only
13389 call the function with initialized counts now.
13390 (find_best_successor): Do find a best edge if one
13391 has uninitialized count.
13392 (find_best_predecessor): Likewise. Do BB frequency check only
13393 if count is initialized.
13395 2017-05-30 Jackson Woodruff <jackson.woodruff@arm.com>
13397 * config/aarch64/aarch64.c (aarch64_host_wide_int_compare): New.
13398 (aarch64_ldrstr_offset_compare): New.
13399 (aarch64_operands_adjust_ok_for_ldpstp): Update to consider all
13400 load/store orderings.
13401 (aarch64_gen_adjusted_ldpstp): Likewise.
13403 2018-05-30 Wilco Dijkstra <wdijkstr@arm.com>
13405 * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
13406 Check for subset of GENERAL_REGS and FP_REGS.
13407 * config/aarch64/aarch64-simd.md (aarch64_get_lane): Increase cost of
13410 2018-05-30 Richard Sandiford <richard.sandiford@linaro.org>
13412 * alias.c (adjust_offset_for_component_ref): Use poly_int_tree_p
13413 and wi::to_poly_offset. Add the current offset and then check
13414 whether the sum fits, rather than using an unchecked addition of
13415 a checked term. Check for a shwi rather than a uhwi.
13416 * expr.c (get_bit_range): Use tree_to_poly_uint64.
13417 (store_constructor): Use poly_int_tree_p.
13418 (expand_expr_real_1): Likewise.
13419 * function.c (assign_temp): Likewise.
13420 * fold-const.c (const_binop): Use poly_int_tree_p and
13421 wi::to_poly_offset.
13422 (fold_indirect_ref_1): Likewise. Use multiple_p to attempt an exact
13424 * ipa-icf-gimple.c (func_checker::compare_operand): Use
13425 to_poly_offset for MEM offsets.
13426 * ipa-icf.c (sem_variable::equals): Likewise.
13427 * stor-layout.c (compute_record_mode): Use poly_int_tree_p.
13428 * tree-ssa-sccvn.c (ao_ref_init_from_vn_reference): Use
13429 wi::to_poly_offset for BIT_FIELD_REF offsets.
13430 (vn_reference_maybe_forwprop_address): Use poly_int_tree_p and
13431 wi::to_poly_offset.
13432 * var-tracking.c (emit_note_insn_var_location): Use
13433 tree_to_poly_uint64.
13435 2018-05-29 Jim Wilson <jimw@sifive.com>
13437 * config/riscv/riscv.c (riscv_interrupt_type): Fix comment typo.
13439 2018-05-29 Uros Bizjak <ubizjak@gmail.com>
13442 * config/i386/i386.md (l<rounding_insn><MODEF:mode><SWI48:mode>2):
13443 Enable for TARGET_SSE4_1 and generate rounds{s,d} and cvtts{s,d}2si{,q}
13445 (sse4_1_round<mode>2): Use nonimmediate_operand
13446 for operand 1 predicate.
13448 2018-05-29 Martin Sebor <msebor@redhat.com>
13449 Richard Biener <rguenther@suse.de>
13452 * calls.c (get_size_range): Call determine_value_range instead
13453 of get_value_range..
13454 * tree-vrp.h (determine_value_range): Declared new function.
13455 * tree-vrp.c (determine_value_range_1, determine_value_range): New.
13457 2018-05-29 Richard Biener <rguenther@suse.de>
13459 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Make
13460 sure to use non-pattern stmts for get_earlier_stmt arguments.
13461 * tree-vectorizer.h (get_earlier_stmt): Assert we do not get
13462 called on pattern stmts.
13463 (get_later_stmt): Likewise.
13465 2018-05-29 Martin Liska <mliska@suse.cz>
13467 PR gcov-profile/85759
13468 * doc/gcov.texi: Document GCOV_ERROR_FILE and GCOV_EXIT_AT_ERROR
13471 2018-05-29 Jakub Jelinek <jakub@redhat.com>
13473 * tree-cfg.c (verify_gimple_assign_unary): Add checking for
13475 (verify_gimple_assign_binary): Check TYPE_VECTOR_SUBPARTS for
13479 * tree.def (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
13480 VEC_PACK_FLOAT_EXPR): New tree codes.
13481 * tree-pretty-print.c (op_code_prio): Handle
13482 VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR.
13483 (dump_generic_node): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
13484 VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
13485 * tree-inline.c (estimate_operator_cost): Likewise.
13486 * gimple-pretty-print.c (dump_binary_rhs): Handle VEC_PACK_FLOAT_EXPR.
13487 * fold-const.c (const_binop): Likewise.
13488 (const_unop): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR and
13489 VEC_UNPACK_FIX_TRUNC_LO_EXPR.
13490 * tree-cfg.c (verify_gimple_assign_unary): Likewise.
13491 (verify_gimple_assign_binary): Handle VEC_PACK_FLOAT_EXPR.
13492 * cfgexpand.c (expand_debug_expr): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
13493 VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
13494 * expr.c (expand_expr_real_2): Likewise.
13495 * optabs.def (vec_packs_float_optab, vec_packu_float_optab,
13496 vec_unpack_sfix_trunc_hi_optab, vec_unpack_sfix_trunc_lo_optab,
13497 vec_unpack_ufix_trunc_hi_optab, vec_unpack_ufix_trunc_lo_optab): New
13499 * optabs.c (expand_widen_pattern_expr): For
13500 VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR use
13501 sign from result type rather than operand's type.
13502 (expand_binop_directly): For vec_packu_float_optab and
13503 vec_packs_float_optab allow result type to be different from operand's
13505 * optabs-tree.c (optab_for_tree_code): Handle
13506 VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
13507 VEC_PACK_FLOAT_EXPR. Formatting fixes.
13508 * tree-vect-generic.c (expand_vector_operations_1): Handle
13509 VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
13510 VEC_PACK_FLOAT_EXPR.
13511 * tree-vect-stmts.c (supportable_widening_operation): Handle
13513 (supportable_narrowing_operation): Handle FLOAT_EXPR.
13514 * config/i386/i386.md (fixprefix, floatprefix): New code attributes.
13515 * config/i386/sse.md (*float<floatunssuffix>v2div2sf2): Rename to ...
13516 (float<floatunssuffix>v2div2sf2): ... this. Formatting fix.
13517 (vpckfloat_concat_mode, vpckfloat_temp_mode, vpckfloat_op_mode): New
13519 (vec_pack<floatprefix>_float_<mode>): New expander.
13520 (vunpckfixt_mode, vunpckfixt_model, vunpckfixt_extract_mode): New mode
13522 (vec_unpack_<fixprefix>fix_trunc_lo_<mode>,
13523 vec_unpack_<fixprefix>fix_trunc_hi_<mode>): New expanders.
13524 * doc/md.texi (vec_packs_float_@var{m}, vec_packu_float_@var{m},
13525 vec_unpack_sfix_trunc_hi_@var{m}, vec_unpack_sfix_trunc_lo_@var{m},
13526 vec_unpack_ufix_trunc_hi_@var{m}, vec_unpack_ufix_trunc_lo_@var{m}):
13528 * doc/generic.texi (VEC_UNPACK_FLOAT_HI_EXPR,
13529 VEC_UNPACK_FLOAT_LO_EXPR): Fix pasto in description.
13530 (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
13531 VEC_PACK_FLOAT_EXPR): Document.
13533 2018-05-29 Richard Biener <rguenther@suse.de>
13535 * tree-vectorizer.h (struct vec_info): Add stmt_vec_infos
13537 (stmt_vec_info_vec): Make pointer.
13538 (init_stmt_vec_info_vec): Remove.
13539 (free_stmt_vec_info_vec): Likewise.
13540 (set_stmt_vec_info_vec): New function.
13541 (free_stmt_vec_infos): Likewise.
13542 (vinfo_for_stmt): Adjust for stmt_vec_info_vec indirection.
13543 (set_vinfo_for_stmt): Likewise.
13544 (get_earlier_stmt): Likewise.
13545 (get_later_stmt): Likewise.
13546 * tree-vectorizer.c (stmt_vec_info_vec): Make pointer.
13547 (vec_info::vec_info): Allocate stmt_vec_infos and set the global.
13548 (vec_info::~vec_info): Free stmt_vec_infos.
13549 (vectorize_loops): Set the global stmt_vec_info_vec to NULL.
13550 Remove old init_stmt_vec_info_vec/free_stmt_vec_info_vec calls.
13551 (pass_slp_vectorize::execute): Likewise.
13552 * tree-vect-stmts.c (init_stmt_vec_info_vec): Remove.
13553 (free_stmt_vec_info_vec): Likewise.
13554 (set_stmt_vec_info_vec): New function.
13555 (free_stmt_vec_infos): Likewise.
13556 * tree-vect-loop.c (_loop_vec_info::~_loop_vec_info): Set
13557 the global stmt_vec_info_vec.
13558 * tree-parloops.c (gather_scalar_reductions): Use
13559 set_stmt_vec_info_vec/free_stmt_vec_infos and maintain a local
13562 2018-05-29 Richard Biener <rguenther@suse.de>
13564 * dominance.c (iterate_fix_dominators): Push/pop TV_DOMINANCE.
13566 2018-05-29 Martin Liska <mliska@suse.cz>
13567 David Malcolm <dmalcolm@redhat.com>
13569 * vec.c (test_reverse): New.
13570 (vec_c_tests): Add new test.
13571 * vec.h (vl_ptr>::reverse): New function.
13573 2018-05-29 Gerald Pfeifer <gerald@pfeifer.com>
13575 * config.gcc: Identify FreeBSD 3.x and 4.x as unsupported.
13577 * config/freebsd-spec.h (FBSD_LIB_SPEC): Only consider FreeBSD 5
13580 2018-05-28 Bernd Edlinger <bernd.edlinger@hotmail.de>
13582 * tree-dump.c (dump_node): Use splay_tree_delete_pointers.
13584 2018-05-28 Richard Biener <rguenther@suse.de>
13586 PR tree-optimization/85933
13587 * tree-vect-data-refs.c (vect_record_base_alignments): Only
13588 look at stmts marked as vectorizable.
13590 2018-05-28 Richard Biener <rguenther@suse.de>
13592 PR tree-optimization/85934
13593 * tree-vect-generic.c (expand_vector_operations_1): Hoist
13594 vector boolean check before scalar optimization.
13596 2018-05-28 Jakub Jelinek <jakub@redhat.com>
13598 * doc/invoke.texi (ARM Options): Use @item instead of @itemx
13601 2018-05-28 Mark Wielaard <mark@klomp.org>
13603 * dwarf2asm.c (dw2_asm_output_delta_uleb128): Add brackets around lab2
13604 if it is an expression containing a minus sign.
13606 2018-05-27 John David Anglin <danglin@gcc.gnu.org>
13608 * config/pa/pa-linux.h (NEED_INDICATE_EXEC_STACK): Define to 0.
13610 2018-05-27 Paul Koning <ni1d@arrl.net>
13612 * config/pdp11/pdp11.md (truncsihi2): Remove.
13614 2018-05-27 Monk Chiang <sh.chiang04@gmail.com>
13615 Chung-Ju Wu <jasonwucj@gmail.com>
13617 * config/nds32/nds32-intrinsic.md (unaligned_storedi): Modify patterns
13619 (unaligned_store_dw): Ditto.
13620 * config/nds32/nds32-memory-manipulation.c
13621 (nds32_expand_movmemsi_loop_known_size): Refactoring implementation.
13622 (nds32_gen_dup_4_byte_to_word_value): Rename to ...
13623 (nds32_gen_dup_4_byte_to_word_value_aux): ... this.
13624 (emit_setmem_word_loop): Rename to ...
13625 (emit_setmem_doubleword_loop): ... this.
13626 (nds32_gen_dup_4_byte_to_word_value): New function.
13627 (nds32_gen_dup_8_byte_to_double_word_value): New function.
13628 (nds32_expand_setmem_loop): Refine implementation.
13629 (nds32_expand_setmem_loop_v3m): Ditto.
13630 * config/nds32/nds32-multiple.md (unaligned_store_update_base_dw): New
13633 2018-05-27 Chung-Ju Wu <jasonwucj@gmail.com>
13635 * config/nds32/nds32.md (bswapsi2, bswaphi2): New patterns.
13637 2018-05-27 Chung-Ju Wu <jasonwucj@gmail.com>
13639 * config/nds32/nds32.c (nds32_attribute_table): Add "no_prologue".
13640 (nds32_init_machine_status): Initialize machine->attr_naked_p and
13641 machine->attr_no_prologue_p.
13642 (nds32_compute_stack_frame): Check "naked" and "no_prologue" attributes.
13643 (nds32_naked_function_p): Handle "naked" and "no_prologue" attributes.
13644 (nds32_expand_epilogue): Consider attr_naked_p.
13645 (nds32_expand_epilogue_v3pop): Likewise.
13646 (nds32_can_use_return_insn): Likewise.
13647 * config/nds32/nds32.h (machine_function): Add attr_naked_p and
13648 attr_no_prologue_p fields.
13649 * config/nds32/nds32.opt (mret-in-naked-func): New option.
13651 2018-05-27 Jakub Jelinek <jakub@redhat.com>
13654 * config/i386/i386.md (fixunssuffix, floatunssuffix): New code
13656 * config/i386/sse.md
13657 (<floatsuffix>float<sseintvecmodelower><mode>2<mask_name><round_name>):
13659 (float<floatunssuffix><sseintvecmodelower><mode>2<mask_name><round_name>):
13661 (<floatsuffix>float<sselongvecmodelower><mode>2<mask_name><round_name>):
13663 (float<floatunssuffix><sselongvecmodelower><mode>2<mask_name><round_name>):
13665 (*<floatsuffix>floatv2div2sf2): Rename to ...
13666 (*float<floatunssuffix>v2div2sf2): ... this.
13667 (<floatsuffix>floatv2div2sf2_mask): Rename to ...
13668 (float<floatunssuffix>v2div2sf2_mask): ... this.
13669 (*<floatsuffix>floatv2div2sf2_mask_1): Rename to ...
13670 (*float<floatunssuffix>v2div2sf2_mask_1): ... this.
13671 (<fixsuffix>fix_truncv8dfv8si2<mask_name><round_saeonly_name>): Rename
13673 (fix<fixunssuffix>_truncv8dfv8si2<mask_name><round_saeonly_name>):
13675 (<fixsuffix>fix_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
13677 (fix<fixunssuffix>_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
13679 (<fixsuffix>fix_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
13681 (fix<fixunssuffix>_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
13683 (<fixsuffix>fix_truncv2sfv2di2<mask_name>): Rename to ...
13684 (fix<fixunssuffix>_truncv2sfv2di2<mask_name>): ... this.
13685 (vec_pack_ufix_trunc_<mode>): Use gen_fixuns_truncv8dfv8si2 instead of
13686 gen_ufix_truncv8dfv8si2.
13687 * config/i386/i386-builtin.def (__builtin_ia32_cvttpd2uqq256_mask,
13688 __builtin_ia32_cvttpd2uqq128_mask, __builtin_ia32_cvttps2uqq256_mask,
13689 __builtin_ia32_cvttps2uqq128_mask, __builtin_ia32_cvtuqq2ps256_mask,
13690 __builtin_ia32_cvtuqq2ps128_mask, __builtin_ia32_cvtuqq2pd256_mask,
13691 __builtin_ia32_cvtuqq2pd128_mask, __builtin_ia32_cvttpd2udq512_mask,
13692 __builtin_ia32_cvtuqq2ps512_mask, __builtin_ia32_cvtuqq2pd512_mask,
13693 __builtin_ia32_cvttps2uqq512_mask, __builtin_ia32_cvttpd2uqq512_mask):
13694 Use fixuns instead ufix or floatuns instead ufloat in CODE_FOR_ names.
13696 2018-05-24 H.J. Lu <hongjiu.lu@intel.com>
13700 * varasm.c (assemble_alias): Lookup ifunc attribute on error.
13702 2018-05-25 Jim Wilson <jimw@sifive.com>
13704 * config/riscv/riscv-protos.h (riscv_epilogue_uses): New.
13705 * config/riscv/riscv.c (struct machine_function): Add
13706 interrupt_handler_p and attribute_checked_p fields.
13707 (riscv_attribute_table): Add interrupt.
13708 (riscv_interrupt_type_p): New.
13709 (riscv_save_reg_p): Save extra regs for interrupt handler.
13710 (riscv_use_save_libcall): Return false for interrupt handler.
13711 (riscv_first_stack_step): Add forward declaration.
13712 (riscv_compute_frame_info): New local interrupt_save_t1. Set it
13713 for interrupt handler with large frame. Use it for saved reg list.
13714 (riscv_expand_prologue): Move flag_stack_usage_info support to
13715 eliminate duplication.
13716 (riscv_expand_epilogue): Generate mret for interrupt handler.
13717 (riscv_epilogue_uses): New.
13718 (riscv_can_use_return_insn): Return false for interrupt handler.
13719 (riscv_function_ok_for_sibcall): Likewise.
13720 (riscv_set_current_function): Add interrupt handler support.
13721 * config/riscv/riscv.h (EPILOGUE_USES): Call riscv_epilogue_uses.
13722 * config/riscv/riscv.md (UNSPECV_MRET): New.
13724 (riscv_frflags, riscv_fsflags): Use tab after opcode.
13726 * doc/extend.texi (RISC-V Function Attributes) <interrupt>: New.
13728 2018-05-25 Bill Schmidt <wschmidt@linux.ibm.com>
13730 PR tree-optimization/85712
13731 * gimple-ssa-strength-reduction.c (replace_one_candidate): Skip if
13732 this candidate has already been replaced in-situ by a copy.
13734 2018-05-25 Jason Merrill <jason@redhat.com>
13736 PR c++/80485 - inline function non-zero address.
13737 * symtab.c (nonzero_address): Check DECL_COMDAT.
13739 2018-05-25 Uros Bizjak <ubizjak@gmail.com>
13742 * config/alpha/alpha.md (ashlsi3): New insn pattern.
13743 (*ashlsi_se): Rename from *ashldi_se. Define as sign
13744 extension of SImode operation. Use const123_operand predicate.
13745 (*saddsi_1): Remove.
13746 (*saddl_se_1): Ditto.
13747 (*ssubsi_1): Ditto.
13748 (*ssubl_se_1): Ditto.
13749 * config/alpha/predicates.md (const123_operand): New predicate.
13750 * config/alpha/constraints.md (P): Use IN_RANGE.
13752 2018-05-25 Richard Biener <rguenther@suse.de>
13754 * tree-ssa-alias.h (refs_may_alias_p): Add tbaa_p bool parameter,
13756 (ref_maybe_used_by_stmt_p): Likewise.
13757 (stmt_may_clobber_ref_p): Likewise.
13758 (stmt_may_clobber_ref_p_1): Likewise.
13759 * tree-ssa-alias.c (refs_may_alias_p): Add tbaa_p bool parameter
13761 (ref_maybe_used_by_stmt_p): Likewise.
13762 (stmt_may_clobber_ref_p): Likewise.
13763 (stmt_may_clobber_ref_p_1): Likewise.
13764 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Use
13765 the alias oracle to disambiguate DRs with stmts DR analysis
13767 (vect_analyze_data_refs): Do not give up on not analyzable
13768 DRs for BB vectorization. Remove code truncating the dataref
13771 2018-05-25 Jakub Jelinek <jakub@redhat.com>
13774 * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
13775 Add (=Yk,v,C) variant using vptestm insn. Use TARGET_AVX512BW
13776 in test instead of TARGET_AVX512F for VI12_AVX512VL iterator.
13778 2018-05-25 Richard Biener <rguenther@suse.de>
13780 * tree-vect-data-refs.c (vect_find_stmt_data_reference): New
13781 function, combining stmt data ref gathering and fatal analysis
13783 (vect_analyze_data_refs): Remove now redudnant code and simplify.
13784 * tree-vect-loop.c (vect_get_datarefs_in_loop): Factor out from
13785 vect_analyze_loop_2 and use vect_find_stmt_data_reference.
13786 * tree-vect-slp.c (vect_slp_bb): Use vect_find_stmt_data_reference.
13787 * tree-vectorizer.h (vect_find_stmt_data_reference): Declare.
13789 2018-05-25 Bin Cheng <bin.cheng@arm.com>
13791 PR tree-optimization/85720
13792 * tree-loop-distribution.c (break_alias_scc_partitions): Don't merge
13793 SCC if all partitions are builtins.
13794 (version_loop_by_alias_check): New parameter. Generate cancelable
13795 runtime alias check if all partitions are builtins.
13796 (distribute_loop): Update call to above function.
13798 2018-05-25 Bin Cheng <bin.cheng@arm.com>
13800 * tree-outof-ssa.c (tree-ssa.h, tree-dfa.h): Include header files.
13801 (create_default_def, for_all_parms): Moved from tree-ssa-coalesce.c.
13802 (parm_default_def_partition_arg): Ditto.
13803 (set_parm_default_def_partition): Ditto.
13804 (get_parm_default_def_partitions): Ditto and make it static.
13805 (get_undefined_value_partitions): Ditto and make it static.
13806 (remove_ssa_form): Refactor call to init_var_map here.
13807 * tree-ssa-coalesce.c (build_ssa_conflict_graph): Support live range
13808 computation for loop region.
13809 (coalesce_partitions, compute_optimized_partition_bases): Ditto.
13810 (register_default_def): Delete.
13811 (for_all_parms, create_default_def): Move to tree-outof-ssa.c.
13812 (parm_default_def_partition_arg): Ditto.
13813 (set_parm_default_def_partition): Ditto.
13814 (get_parm_default_def_partitions): Ditto and make it static.
13815 (get_undefined_value_partitions): Ditto and make it static.
13816 (coalesce_with_default, coalesce_with_default): Update comment.
13817 (create_coalesce_list_for_region): New func factored out from
13818 create_outofssa_var_map.
13819 (populate_coalesce_list_for_outofssa): New func factored out from
13820 create_outofssa_var_map and coalesce_ssa_name.
13821 (create_outofssa_var_map): Delete.
13822 (coalesce_ssa_name): Refactor to support live range computation.
13823 * tree-ssa-coalesce.h (coalesce_ssa_name): Change decl.
13824 (get_parm_default_def_partitions): Delete.
13825 (get_undefined_value_partitions): Ditto.
13826 * tree-ssa-live.c (init_var_map, delete_var_map): Support live range
13827 computation for loop region.
13828 (new_tree_live_info, loe_visit_block): Ditto.
13829 (live_worklist, set_var_live_on_entry): Ditto.
13830 (calculate_live_on_exit, verify_live_on_entry): Ditto.
13831 * tree-ssa-live.h (struct _var_map): New fields.
13832 (init_var_map): Change decl.
13833 (region_contains_p): New.
13835 2018-05-25 Bin Cheng <bin.cheng@arm.com>
13837 * tree-ssa-live.h (live_merge_and_clear): Delete.
13839 2018-05-25 Richard Biener <rguenther@suse.de>
13842 * tree-dump.c (dequeue_and_dump): Remove access to removed
13843 operand 2 of a SWITCH_EXPR.
13845 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
13847 * doc/sourcebuild.texi (vect_double_cond_arith): Include
13848 multiplication and division.
13849 * doc/md.texi (cond_mul@var{m}, cond_div@var{m}, cond_mod@var{m})
13850 (cond_udiv@var{m}, cond_umod@var{m}): Document.
13851 * optabs.def (cond_smul_optab, cond_sdiv_optab, cond_smod_optab)
13852 (cond_udiv_optab, cond_umod_optab): New optabs.
13853 * internal-fn.def (IFN_COND_MUL, IFN_COND_DIV, IFN_COND_MOD)
13854 (IFN_COND_RDIV): New internal functions.
13855 * internal-fn.c (get_conditional_internal_fn): Handle TRUNC_DIV_EXPR,
13856 TRUNC_MOD_EXPR and RDIV_EXPR.
13857 * match.pd (UNCOND_BINARY, COND_BINARY): Handle them.
13858 * config/aarch64/iterators.md (UNSPEC_COND_MUL, UNSPEC_COND_DIV):
13860 (SVE_INT_BINARY): Include mult.
13861 (SVE_COND_FP_BINARY): Include UNSPEC_MUL and UNSPEC_DIV.
13862 (optab, sve_int_op): Handle mult.
13863 (optab, sve_fp_op, commutative): Handle UNSPEC_COND_MUL and
13865 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New pattern
13866 for SVE_INT_BINARY_SD.
13868 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
13870 * config/aarch64/iterators.md (SVE_INT_BINARY_SD): New code iterator.
13871 (optab, sve_int_op): Handle div and udiv.
13872 * config/aarch64/aarch64-sve.md (<optab><mode>3): New expander
13873 for SVE_INT_BINARY_SD.
13874 (*<optab><mode>3): New insn for the same.
13876 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
13878 * tree-vect-patterns.c: Include predict.h.
13879 (vect_recog_divmod_pattern): Restrict check for division support
13880 to when optimizing for size.
13882 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
13884 * doc/sourcebuild.texi (vect_double_cond_arith: Document.
13885 * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 4.
13886 (gimple_match_op::gimple_match_op): Add an overload for 4 operands.
13887 (gimple_match_op::set_op): Likewise.
13888 (gimple_resimplify4): Declare.
13889 * genmatch.c (get_operand_type): Handle CFN_COND_* functions.
13890 (expr::gen_transform): Likewise.
13891 (decision_tree::gen): Generate a simplification routine for 4 operands.
13892 * gimple-match-head.c (gimple_simplify): Add an overload for
13893 4 operands. In the top-level function, handle up to 4 call
13894 arguments and call gimple_resimplify4.
13895 (gimple_resimplify4): New function.
13896 (build_call_internal): Pass a fourth operand.
13897 (maybe_push_to_seq): Likewise.
13898 * match.pd (UNCOND_BINARY, COND_BINARY): New operator lists.
13899 Fold VEC_COND_EXPRs of an operation and a default value into
13900 an IFN_COND_* function if possible.
13901 * config/aarch64/iterators.md (UNSPEC_COND_MAX, UNSPEC_COND_MIN):
13903 (SVE_COND_FP_BINARY): Include them.
13904 (optab, sve_fp_op): Handle them.
13905 (SVE_INT_BINARY_REV): New code iterator.
13906 (SVE_COND_FP_BINARY_REV): New int iterator.
13907 (commutative): New int attribute.
13908 * config/aarch64/aarch64-protos.h (aarch64_sve_prepare_conditional_op):
13910 * config/aarch64/aarch64.c (aarch64_sve_prepare_conditional_op): New
13912 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Use it.
13913 (*cond_<optab><mode>): New patterns for reversed operands.
13915 2018-05-25 Richard Biener <rguenther@suse.de>
13917 * tree-vectorizer.h (STMT_VINFO_GROUP_*, GROUP_*): Remove.
13918 (DR_GROUP_*): New, assert we have non-NULL ->data_ref_info.
13919 (REDUC_GROUP_*): New, assert we have NULL ->data_ref_info.
13920 (STMT_VINFO_GROUPED_ACCESS): Adjust.
13921 * tree-vect-data-refs.c (everywhere): Adjust users.
13922 * tree-vect-loop.c (everywhere): Likewise.
13923 * tree-vect-slp.c (everywhere): Likewise.
13924 * tree-vect-stmts.c (everywhere): Likewise.
13925 * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
13927 2018-05-25 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
13929 * configure.ac (gcc_cv_as_section_has_e): Move to common section.
13931 (gcc_cv_as_section_exclude): ... this.
13932 Try Solaris as #exclude syntax.
13933 * configure: Regenerate.
13934 * config.in: Regenerate.
13935 * config/i386/i386.c (i386_solaris_elf_named_section): Handle
13937 * config/sparc/sparc.c (sparc_solaris_elf_asm_named_section)
13938 [HAVE_GAS_SECTION_EXCLUDE]: Handle SECTION_EXCLUDE.
13940 * varasm.c (default_elf_asm_named_section): Don't check if
13941 HAVE_GAS_SECTION_EXCLUDE is defined.
13943 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
13945 * doc/md.texi: Update the documentation of the cond_* optabs
13946 to mention the new final operand. Fix GET_MODE_NUNITS call.
13947 Describe the scalar case too.
13948 * internal-fn.def (IFN_EXTRACT_LAST): Change type to fold_left.
13949 * internal-fn.c (expand_cond_unary_optab_fn): Expect 3 operands
13951 (expand_cond_binary_optab_fn): Expect 4 operands instead of 3.
13952 (get_conditional_internal_fn): Update comment.
13953 * tree-vect-loop.c (vectorizable_reduction): Pass the original
13954 accumulator value as a final argument to conditional functions.
13955 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Turn into
13956 a define_expand and add an "else" operand. Assert for now that
13957 the else operand is equal to operand 2. Use SVE_INT_BINARY and
13958 SVE_COND_FP_BINARY instead of SVE_COND_INT_OP and SVE_COND_FP_OP.
13959 (*cond_<optab><mode>): New patterns.
13960 * config/aarch64/iterators.md (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX)
13961 (UNSPEC_COND_SMIN, UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
13962 (UNSPEC_COND_EOR): Delete.
13963 (optab): Remove associated mappings.
13964 (SVE_INT_BINARY): New code iterator.
13965 (sve_int_op): Remove int attribute and add "minus" to the code
13967 (SVE_COND_INT_OP): Delete.
13968 (SVE_COND_FP_OP): Rename to...
13969 (SVE_COND_FP_BINARY): ...this.
13971 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
13973 * optabs.c (can_reuse_operands_p): New function.
13974 (maybe_legitimize_operands): Try to reuse the results for
13977 2018-05-24 Uros Bizjak <ubizjak@gmail.com>
13979 * config/i386/sse.md (cvtusi2<ssescalarmodesuffix>64<round_name>):
13980 Add {q} suffix to insn mnemonic.
13982 2018-05-23 Jozef Lawrynowicz <jozef.l@mittosystems.com>
13984 * config/msp430/msp430.c (TARGET_WARN_FUNC_RETURN): Define.
13985 (msp430_warn_func_return): New.
13987 2018-05-24 Roger Sayle <roger@nextmovesoftware.com>
13989 * fold-const.c (tree_nonzero_bits): New function.
13990 * fold-const.h (tree_nonzero_bits): Likewise.
13991 * match.pd (POPCOUNT): New patterns to fold BUILTIN_POPCOUNT and
13992 friends. POPCOUNT(x&1) => x&1, POPCOUNT(x)==0 => x==0, etc.
13994 2018-05-24 H.J. Lu <hongjiu.lu@intel.com>
13998 * varasm.c (assemble_alias): Check ifunc_resolver only on
14001 2018-05-24 Uros Bizjak <ubizjak@gmail.com>
14004 * config/i386/sse.md (movdi_to_sse): Do not generate pseudo
14005 when memory input operand is handled.
14007 2018-05-24 Luis Machado <luis.machado@linaro.org>
14009 * config/aarch64/aarch64.c (qdf24xx_addrcost_table): New static
14011 (qdf24xx_tunings) <addr_costs>: Set to qdf24xx_addrcost_table.
14013 2018-05-24 Richard Sandiford <richard.sandiford@linaro.org>
14015 * match.pd: Delay FMA folds until after vectorization.
14017 2018-05-24 Andre Vieira <andre.simoesdiasvieira@arm.com>
14020 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
14021 address check not strict.
14023 2018-05-24 Richard Sandiford <richard.sandiford@linaro.org>
14025 * gimple-match.h (gimple_match_op): New class.
14026 (mprts_hook): Replace parameters with a gimple_match_op *.
14027 (maybe_build_generic_op): Likewise.
14028 (gimple_simplified_result_is_gimple_val): Replace parameters with
14029 a const gimple_match_op *.
14030 (gimple_simplify): Replace code_helper * and tree * parameters with
14031 a gimple_match_op * parameter.
14032 (gimple_resimplify1): Replace code_helper *, tree and tree *
14033 parameters with a gimple_match_op * parameter.
14034 (gimple_resimplify2): Likewise.
14035 (gimple_resimplify3): Likewise.
14036 (maybe_push_res_to_seq): Replace code_helper, tree and tree *
14037 parameters with a gimple_match_op * parameter.
14038 * gimple-match-head.c (gimple_simplify): Change prototypes of
14039 auto-generated functions to take a gimple_match_op * instead of
14040 separate code_helper * and tree * parameters. Make the same
14041 change in the top-level overload and update calls to the
14042 gimple_resimplify routines. Update calls to the auto-generated
14043 functions and to maybe_push_res_to_seq in the publicly-facing
14044 operation-specific gimple_simplify overloads.
14045 (gimple_match_op::MAX_NUM_OPS): Define.
14046 (gimple_resimplify1): Replace rcode and ops with a single res_op
14047 parameter. Update call to gimple_simplify.
14048 (gimple_resimplify2): Likewise.
14049 (gimple_resimplify3): Likewise.
14050 (mprts_hook): Replace parameters with a gimple_match_op *.
14051 (maybe_build_generic_op): Likewise.
14052 (build_call_internal): Replace type, nargs and ops with
14053 a gimple_match_op *.
14054 (maybe_push_res_to_seq): Replace res_code, type and ops parameters
14055 with a single gimple_match_op *. Update calls to mprts_hook,
14056 build_call_internal and gimple_simplified_result_is_gimple_val.
14057 Factor out code that is common to the tree_code and combined_fn cases.
14058 * genmatch.c (expr::gen_transform): Replace tem_code and
14059 tem_ops with a gimple_match_op called tem_op. Update calls
14060 to the gimple_resimplify functions and maybe_push_res_to_seq.
14061 (dt_simplify::gen_1): Manipulate res_op instead of res_code and
14062 res_ops. Update call to the gimple_resimplify functions.
14063 (dt_simplify::gen): Pass res_op instead of res_code and res_ops.
14064 (decision_tree::gen): Make the functions take a gimple_match_op *
14065 called res_op instead of separate res_code and res_ops parameters.
14066 Update call accordingly.
14067 * gimple-fold.c (replace_stmt_with_simplification): Replace rcode
14068 and ops with a single res_op parameter. Update calls to
14069 maybe_build_generic_op and maybe_push_res_to_seq.
14070 (fold_stmt_1): Update calls to gimple_simplify and
14071 replace_stmt_with_simplification.
14072 (gimple_fold_stmt_to_constant_1): Update calls to gimple_simplify
14073 and gimple_simplified_result_is_gimple_val.
14074 * tree-cfgcleanup.c (cleanup_control_expr_graph): Update call to
14076 * tree-ssa-sccvn.c (vn_lookup_simplify_result): Replace parameters
14077 with a gimple_match_op *.
14078 (vn_nary_build_or_lookup): Likewise. Update call to
14079 vn_nary_build_or_lookup_1.
14080 (vn_nary_build_or_lookup_1): Replace rcode, type and ops with a
14081 gimple_match_op *. Update calls to the gimple_resimplify routines
14082 and to gimple_simplified_result_is_gimple_val.
14083 (vn_nary_simplify): Update call to vn_nary_build_or_lookup_1.
14084 Use gimple_match_op::MAX_NUM_OPS instead of a hard-coded 3.
14085 (vn_reference_lookup_3): Update call to vn_nary_build_or_lookup.
14086 (visit_nary_op): Likewise.
14087 (visit_reference_op_load): Likewise.
14089 2018-05-23 Luis Machado <luis.machado@linaro.org>
14091 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Use correct type
14092 modifier for printing the step amount.
14094 2018-05-23 Jozef Lawrynowicz <jozef.l@somniumtech.com>
14097 * tree.c (build_common_tree_nodes): Dont set TYPE_SIZE for __intN
14100 2018-05-23 Segher Boessenkool <segher@kernel.crashing.org>
14102 * doc/sourcebuild.texi (Endianness): New subsubsection.
14104 2018-05-23 Luis Machado <luis.machado@linaro.org>
14106 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
14107 <prefetch_dynamic_strides>: New const bool field.
14108 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
14109 prefetch_dynamic_strides.
14110 (exynosm1_prefetch_tune): Likewise.
14111 (thunderxt88_prefetch_tune): Likewise.
14112 (thunderx_prefetch_tune): Likewise.
14113 (thunderx2t99_prefetch_tune): Likewise.
14114 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides to
14116 (aarch64_override_options_internal): Update to set
14117 PARAM_PREFETCH_DYNAMIC_STRIDES.
14118 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
14119 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
14120 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
14121 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
14122 prefetch-dynamic-strides setting.
14124 2018-05-23 Luis Machado <luis.machado@linaro.org>
14126 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
14127 <minimum_stride>: New const int field.
14128 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
14129 minimum_stride field defaulting to -1.
14130 (exynosm1_prefetch_tune): Likewise.
14131 (thunderxt88_prefetch_tune): Likewise.
14132 (thunderx_prefetch_tune): Likewise.
14133 (thunderx2t99_prefetch_tune): Likewise.
14134 (qdf24xx_prefetch_tune) <minimum_stride>: Set to 2048.
14135 <default_opt_level>: Set to 3.
14136 (aarch64_override_options_internal): Update to set
14137 PARAM_PREFETCH_MINIMUM_STRIDE.
14138 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
14139 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
14140 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
14141 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
14142 stride is constant and is below the minimum stride threshold.
14144 2018-05-23 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
14146 * config/arm/arm-cpus.in (mode26): Delete.
14147 (armv4): Delete mode26 reference.
14148 * config/arm/arm.c (arm_configure_build_target): Delete use of
14151 2018-05-23 Uros Bizjak <ubizjak@gmail.com>
14153 * config/i386/i386.md (*floatuns<SWI48:mode><MODEF:mode>2_avx512):
14155 (floatunssi<mode>2): Also enable for AVX512F and TARGET_SSE_MATH.
14156 Rewrite expander pattern. Emit gen_floatunssi<mode>2_i387_with_xmm
14158 (floatunsdisf2): Rewrite expander pattern. Hanlde TARGET_AVX512F.
14159 (floatunsdidf2): Ditto.
14161 2018-05-23 Uros Bizjak <ubizjak@gmail.com>
14163 * config/i386/i386.md (fixuns_trunc<mode>di2): New insn pattern.
14164 (fixuns_trunc<mode>si2_avx512f): Ditto.
14165 (*fixuns_trunc<mode>si2_avx512f_zext): Ditto.
14166 (fixuns_trunc<mode>si2): Also enable for AVX512F and TARGET_SSE_MATH.
14167 Emit fixuns_trunc<mode>si2_avx512f for AVX512F targets.
14169 2018-05-23 Alexander Monakov <amonakov@ispras.ru>
14171 PR rtl-optimization/79985
14172 * df-scan.c (df_insn_refs_collect): Remove special case for
14173 global registers and asm statements.
14175 2018-05-23 Alexander Monakov <amonakov@ispras.ru>
14177 * extend.texi (Global Register Variables): Rewrite the bullet list.
14178 Note that the register is available for allocation. Note that access
14179 via inline asm must use constraints. Add note about async-signal
14180 handlers. Remove paragraph about automagic register selection.
14182 2018-05-23 Richard Biener <rguenther@suse.de>
14184 * tree-ssa-sccvn.c (vn_reference_lookup_3): Remove restriction
14185 of fixed offset from memset VN.
14187 2018-05-23 Bill Schmidt <wschmidt@linux.ibm.com>
14189 * gimple-ssa-strength-reduction.c (struct slsr_cand_d): Add
14190 first_interp field.
14191 (alloc_cand_and_find_basis): Initialize first_interp field.
14192 (slsr_process_mul): Modify first_interp field.
14193 (slsr_process_add): Likewise.
14194 (slsr_process_cast): Modify first_interp field for each new
14196 (slsr_process_copy): Likewise.
14197 (dump_candidate): Dump first_interp field.
14198 (replace_mult_candidate): Process all interpretations, not just
14200 (replace_rhs_if_not_dup): Likewise.
14201 (replace_one_candidate): Likewise.
14203 2018-05-23 Wilco Dijkstra <wdijkstr@arm.com>
14205 * config/aarch64/aarch64.c (aarch64_use_frame_pointer):
14207 (aarch64_needs_frame_chain): New function.
14208 (aarch64_parse_override_string): Set aarch64_use_frame_pointer.
14210 2018-05-23 Sudakshina Das <sudi.das@arm.com>
14213 * common/config/aarch64/aarch64-common.c (aarch64_handle_option):
14214 Check val before adding MASK_STRICT_ALIGN to opts->x_target_flags.
14215 * config/aarch64/aarch64.opt (mstrict-align): Remove RejectNegative.
14216 * config/aarch64/aarch64.c (aarch64_attributes): Mark allow_neg
14217 as true for strict-align.
14218 (aarch64_can_inline_p): Perform checks even when callee has no
14219 attributes to check for strict alignment.
14220 * doc/extend.texi (AArch64 Function Attributes): Document
14222 * doc/invoke.texi: (AArch64 Options): Likewise.
14224 2018-05-23 Richard Sandiford <richard.sandiford@linaro.org>
14226 PR tree-optimization/85853
14227 * tree-vect-slp.c (vect_slp_analyze_node_operations): Split out
14228 the handling of the root of the node to...
14229 (vect_slp_analyze_node_operations_1): ...this new function,
14230 and run the whole thing with the child nodes' def types
14231 set according to their SLP node's def type.
14233 2018-05-23 Richard Biener <rguenther@suse.de>
14235 PR middle-end/85874
14236 * tree-data-ref.c (create_runtime_alias_checks): Defer
14237 and ignore overflow warnings.
14239 2018-05-23 Yury Gribov <tetra2005@gmail.com>
14241 PR tree-optimization/85822
14242 * tree-vrp.c (is_masked_range_test): Fix handling of negative
14245 2018-05-23 Richard Biener <rguenther@suse.de>
14247 * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
14248 memset constants via native_interpret_expr.
14250 2018-05-22 H.J. Lu <hongjiu.lu@intel.com>
14253 * cgraph.h (cgraph_node::create): Set ifunc_resolver for ifunc
14255 (cgraph_node::create_alias): Likewise.
14256 (cgraph_node::get_availability): Check ifunc_resolver instead
14257 of looking up ifunc attribute.
14258 * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
14259 * varasm.c (do_assemble_alias): Likewise.
14260 (assemble_alias): Likewise.
14261 (default_binds_local_p_3): Likewise.
14262 * cgraph.h (cgraph_node): Add ifunc_resolver.
14263 (cgraph_node::only_called_directly_or_aliased_p): Return false
14264 for IFUNC resolver.
14265 * lto-cgraph.c (input_node): Set ifunc_resolver for ifunc
14267 * symtab.c (symtab_node::verify_base): Verify that ifunc_resolver
14268 is equivalent to lookup_attribute ("ifunc", DECL_ATTRIBUTES (decl)).
14269 (symtab_node::binds_to_current_def_p): Check ifunc_resolver
14270 instead of looking up ifunc attribute.
14272 2018-05-22 Luis Machado <luis.machado@linaro.org>
14274 * config/aarch64/aarch64.md (*ashift<mode>_extv_bfiz): New pattern.
14276 2018-05-22 Martin Sebor <msebor@redhat.com>
14278 PR middle-end/85359
14279 * builtins.c (expand_builtin_strcpy): Call maybe_warn_nonstring_arg
14280 only when expasion succeeds.
14281 (expand_builtin_strcmp): Same.
14282 (expand_builtin_strncmp): Same.
14284 2018-05-22 Martin Sebor <msebor@redhat.com>
14286 * calls.c (maybe_warn_nonstring_arg): Fix a typo in a comment.
14288 2018-05-22 Jackson Woodruff <jackson.woodruff@arm.com>
14289 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
14291 * config/aarch64/aarch64-ldpstp.md: Replace uses of
14292 aarch64_mem_pair_operand with memory_operand and delete operand swapping
14294 * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
14295 Add check for legitimate_address.
14296 (aarch64_gen_adjusted_ldpstp): Swap operands where appropriate.
14297 (aarch64_swap_ldrstr_operands): New.
14298 * config/aarch64/aarch64-protos.h (aarch64_swap_ldrstr_operands):
14301 2018-05-22 Jackson Woodruff <jackson.woodruff@arm.com>
14302 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
14304 * config/aarch64/aarch64.md: New patterns to generate stp
14306 (store_pair_sw, store_pair_dw): New patterns to generate stp for
14307 single words and double words.
14308 (load_pair_sw, load_pair_dw): Likewise.
14309 (store_pair_sf, store_pair_df, store_pair_si, store_pair_di):
14311 (load_pair_sf, load_pair_df, load_pair_si, load_pair_di):
14313 * config/aarch64/aarch64-ldpstp.md: Modify peephole
14314 for different mode ldpstp and add peephole for merged zero stores.
14315 Likewise for loads.
14316 * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
14318 (aarch64_gen_store_pair): Rename calls to match new patterns.
14319 (aarch64_gen_load_pair): Rename calls to match new patterns.
14320 * config/aarch64/aarch64-simd.md (load_pair<mode>): Rename to...
14321 (load_pair<DREG:mode><DREG2:mode>): ... This.
14322 (store_pair<mode>): Rename to...
14323 (vec_store_pair<DREG:mode><DREG2:mode>): ... This.
14324 * config/aarch64/iterators.md (DREG, DREG2, DX2, SX, SX2, DSX):
14325 New mode iterators.
14326 (V_INT_EQUIV): Handle SImode.
14327 * config/aarch64/predicates.md (aarch64_reg_zero_or_fp_zero):
14330 2018-05-22 Martin Sebor <msebor@redhat.com>
14333 * calls.c (maybe_warn_nonstring_arg): Use string length to set
14334 or ajust the presumed bound on an operation to avoid unnecessary
14337 2018-05-22 Martin Sebor <msebor@redhat.com>
14339 PR tree-optimization/85826
14340 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Avoid
14341 assuming that a DECL necesarily has a constant size.
14343 2018-05-22 Richard Sandiford <richard.sandiford@linaro.org>
14345 PR middle-end/85862
14346 * internal-fn.c (expand_direct_optab_fn): Cope with a null lhs.
14348 2018-05-22 Richard Biener <rguenther@suse.de>
14350 PR tree-optimization/85834
14351 * tree-ssa-sccvn.c (vn_reference_lookup_3): Properly handle
14352 non-constant and non-zero memset arguments.
14354 2018-05-22 Martin Liska <mliska@suse.cz>
14357 * ipa-icf.c (sem_item::add_type): Do not ICE for incomplete types.
14359 2018-05-22 Richard Biener <rguenther@suse.de>
14361 PR tree-optimization/85863
14362 * tree-vect-stmts.c (vect_is_simple_cond): Only widen invariant
14363 comparisons when vectype is specified.
14364 (vectorizable_condition): Do not specify vectype for
14365 vect_is_simple_cond when SLP vectorizing.
14367 2018-05-21 Michael Meissner <meissner@linux.ibm.com>
14370 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Do not
14371 define __ibm128 as long double.
14372 * config/rs6000/rs6000.c (rs6000_init_builtins): Create __ibm128
14373 as a distinct type when IEEE 128-bit support is enabled.
14374 (init_float128_ieee): Fix up conversions between IFmode and IEEE
14375 128-bit types to use the correct functions.
14376 (rs6000_expand_float128_convert): Use explicit FLOAT_EXTEND to
14377 convert between 128-bit floating point types that have different
14378 modes but the same representation, instead of using gen_lowpart to
14380 * config/rs6000/rs6000.md (IFKF): New iterator for IFmode and
14382 (IFKF_reg): New attributes to give the register constraints for
14384 (extend<mode>tf2_internal): New insns to mark an explicit
14385 conversion between 128-bit floating point types that have a
14386 different mode but share the same representation.
14388 2018-05-21 Richard Sandiford <richard.sandiford@linaro.org>
14390 PR tree-optimization/85814
14391 * tree-ssa-strlen.c (get_stridx_plus_constant): Cope with
14392 a null return from get_strinfo when unsharing the next
14393 strinfo in the chain.
14395 2018-05-21 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
14398 * varasm.c (weak_finish): Clean up weak_decls.
14400 2018-05-21 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
14402 * config/aarch64/aarch64.md ("unspec"): Define UNSPEC_SABAL,
14403 UNSPEC_SABDL2, UNSPEC_SADALP, UNSPEC_UABAL, UNSPEC_UABDL2,
14404 UNSPEC_UADALP values.
14405 * config/aarch64/iterators.md (ABAL): New int iterator.
14408 (sur): Add mappings for the above.
14409 * config/aarch64/aarch64-simd.md (aarch64_<sur>abdl2<mode>_3):
14411 (aarch64_<sur>abal<mode>_4): Likewise.
14412 (aarch64_<sur>adalp<mode>_3): Likewise.
14413 (<sur>sadv16qi): New define_expand.
14415 2018-05-21 Alexander Nesterovskiy <alexander.nesterovskiy@intel.com>
14417 * config/i386/i386.md (*movsf_internal): AVX falsedep fix.
14418 (*movdf_internal): Ditto.
14419 (*rcpsf2_sse): Ditto.
14420 (*rsqrtsf2_sse): Ditto.
14421 (*sqrt<mode>2_sse): Ditto.
14423 2018-05-21 Tamar Christina <tamar.christina@arm.com>
14425 * config/aarch64/aarch64-simd.md (aarch64_eor3qv8hi): Change to
14427 (aarch64_bcaxqv8hi): Change to bcaxq<mode>4.
14428 * config/aarch64/aarch64-simd-builtins.def (veor3q_u8, veor3q_u32,
14429 veor3q_u64, veor3q_s8, veor3q_s16, veor3q_s32, veor3q_s64, vbcaxq_u8,
14430 vbcaxq_u32, vbcaxq_u64, vbcaxq_s8, vbcaxq_s16, vbcaxq_s32,
14432 * config/aarch64/arm_neon.h: Likewise.
14433 * config/aarch64/iterators.md (VQ_I): New.
14435 2018-05-21 Alexey Brodkin <abrodkin@synopsys.com>
14437 * config.gcc: Add arc/t-multilib-linux to tmake_file for
14439 * config/arc/t-multilib-linux: Specify MULTILIB_OPTIONS and
14442 2018-05-20 Chung-Ju Wu <jasonwucj@gmail.com>
14444 * config/nds32/constraints.md (S): New constraint.
14445 * config/nds32/nds32.md (call_internal): Use constraint S.
14446 (call_value_internal): Likewise.
14447 (sibcall_internal): Likewise.
14448 (sibcall_value_internal): Likewise.
14450 2018-05-20 Kito Cheng <kito.cheng@gmail.com>
14451 Chung-Ju Wu <jasonwucj@gmail.com>
14453 * config/nds32/nds32.c (nds32_register_move_cost): Take garywolf cpu
14454 into consideration.
14456 2018-05-20 Kito Cheng <kito.cheng@gmail.com>
14457 Chung-Ju Wu <jasonwucj@gmail.com>
14459 * config/nds32/nds32-cost.c (rtx_cost_model_t): New structure.
14460 (insn_size_16bit, insn_size_32bit): New variables for cost evaluation.
14461 (nds32_rtx_costs_impl): Simplify.
14462 (nds32_address_cost_impl): Simplify.
14463 (nds32_init_rtx_costs): New function.
14464 (nds32_rtx_costs_speed_prefer): Likewise.
14465 (nds32_rtx_costs_size_prefer): Likewise.
14466 (nds32_address_cost_speed_prefer): Likewise.
14467 (nds32_address_cost_speed_fwprop): Likewise.
14468 (nds32_address_cost_size_prefer): Likewise.
14469 * config/nds32/nds32-protos.h (nds32_init_rtx_costs): Declare.
14470 * config/nds32/nds32.c (nds32_option_override): Use
14471 nds32_init_rtx_costs function.
14473 2018-05-20 Chung-Ju Wu <jasonwucj@gmail.com>
14475 * config/nds32/nds32.c (nds32_asm_file_start): Output pipeline model.
14476 * config/nds32/nds32.h (TARGET_PIPELINE_N7): Define.
14477 (TARGET_PIPELINE_N8): Likewise.
14478 (TARGET_PIPELINE_N10): Likewise.
14479 (TARGET_PIPELINE_N13): Likewise.
14480 (TARGET_PIPELINE_GRAYWOLF): Likewise.
14482 2018-05-19 Monk Chiang <sh.chiang04@gmail.com>
14484 * config/nds32/nds32-fpu.md: Update copyright year.
14486 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
14488 * config/nds32/nds32.h (ASM_SPEC): Adjust spec rule.
14490 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
14492 * config/nds32/nds32.c
14493 (nds32_md_asm_adjust): Consider flag_inline_asm_r15 variable.
14494 * config/nds32/nds32.opt (minline-asm-r15): New option.
14496 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
14498 * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS): Add
14500 * config/nds32/nds32.md (abssi2): New pattern.
14502 2018-05-19 Uros Bizjak <ubizjak@gmail.com>
14504 * config/i386/i386.md (rex64namesuffix): New mode attribute.
14505 * config/i386/sse.md (sse_cvtsi2ss<rex64namesuffix><round_name>):
14506 Merge insn pattern from sse_cvtsi2ss<round_name> and
14507 sse_cvtsi2ssq<round_name> using SWI48 mode iterator.
14508 (sse_cvtss2si<rex64namesuffix><round_name>): Merge insn pattern
14509 from sse_cvtss2si<round_name> and sse_cvtss2siq<round_name>
14510 using SWI48 mode iterator.
14511 (sse_cvtss2si<rex64namesuffix>_2): Merge insn pattern from
14512 sse_cvtss2si_2 and sse_cvtss2siq_2 using SWI48 mode iterator.
14513 (sse_cvttss2si<rex64namesuffix><round_saeonly_name>): Merge insn
14514 pattern from sse_cvttss2si<round_saeonly_name>
14515 and sse_cvttss2siq<round_saeonly_name> using SWI48 mode iterator.
14516 (avx512f_vcvtss2usi<rex64namesuffix><round_name>): Merge insn pattern
14517 from avx512f_vcvtss2usi<round_name> and avx512f_vcvtss2usiq<round_name>
14518 using SWI48 mode iterator.
14519 (avx512f_vcvttss2usi<rex64namesuffix><round_saeonly_name>): Merge
14520 insn pattern from avx512f_vcvttss2usi<round_saeonly_name> and
14521 avx512f_vcvttss2usiq<round_saeonly_name> using SWI48 mode iterator.
14522 (avx512f_vcvtsd2usi<rex64namesuffix><round_name>): Merge insn pattern
14523 from avx512f_vcvtsd2usi<round_name> and avx512f_vcvtsd2usiq<round_name>
14524 using SWI48 mode iterator.
14525 (avx512f_vcvttsd2usi<rex64namesuffix><round_saeonly_name>): Merge
14526 insn pattern from avx512f_vcvttsd2usi<round_saeonly_name> and
14527 avx512f_vcvttsd2usiq<round_saeonly_name> using SWI48 mode iterator.
14528 (sse2_cvtsd2si<rex64namesuffix><round_name>): Merge insn pattern from
14529 sse2_cvtsd2si<round_name> and sse2_cvtsd2siq<round_name> using
14530 SWI48 mode iterator.
14531 (sse2_cvtsd2si<rex64namesuffix>_2): Merge insn pattern from
14532 sse2_cvtsd2si_2 and sse2_cvtsd2siq_2 using SWI48 mode iterator.
14533 (sse_cvttsd2si<rex64namesuffix><round_saeonly_name>): Merge insn
14534 pattern from sse_cvttsd2si<round_saeonly_name>
14535 and sse_cvttsd2siq<round_saeonly_name> using SWI48 mode iterator.
14537 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
14539 * config/nds32/nds32-md-auxiliary.c
14540 (nds32_valid_smw_lwm_base_p): Refine.
14541 (nds32_output_smw_single_word): Refine.
14542 (nds32_output_smw_double_word): New.
14543 * config/nds32/nds32-protos.h (nds32_output_smw_double_word): New.
14545 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
14547 * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push): Refine.
14548 (nds32_output_stack_pop): Refine.
14549 (nds32_expand_unaligned_load): Refine.
14550 (nds32_expand_unaligned_store): Refine.
14552 2018-05-19 Kuan-Lin Chen <kuanlinchentw@gmail.com>
14553 Chung-Ju Wu <jasonwucj@gmail.com>
14555 * config/nds32/constants.md: Add TP_REGNUM constant.
14556 (unspec_element): Add UNSPEC_GOTINIT, UNSPEC_GOT, UNSPEC_GOTOFF,
14557 UNSPEC_PLT, UNSPEC_TLSGD, UNSPEC_TLSLD, UNSPEC_TLSIE, UNSPEC_TLSLE and
14559 * config/nds32/nds32-doubleword.md: Consider flag_pic.
14560 * config/nds32/nds32-dspext.md (mov<mode>): Expand TLS and PIC cases.
14561 * config/nds32/nds32-predicates.c (nds32_const_unspec_p): New.
14562 * config/nds32/nds32-md-auxiliary.c: Implementation that support TLS
14563 and PIC code generation.
14564 * config/nds32/nds32-protos.h: Declarations that support TLS and PIC
14566 * config/nds32/nds32-relax-opt.c: Consider TLS and PIC for relax
14568 * config/nds32/nds32.md: Support TLS and PIC.
14569 * config/nds32/nds32.c: Support TLS and PIC.
14570 * config/nds32/nds32.h (nds32_relax_insn_type): New enum type.
14571 * config/nds32/predicates.md (nds32_nonunspec_symbolic_operand): New
14574 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
14576 * config/nds32/nds32-predicates.c (const_vector_to_hwint): Use machine
14577 mode with E_ prefix.
14579 2018-05-19 Kuan-Lin Chen <kuanlinchentw@gmail.com>
14580 Chung-Ju Wu <jasonwucj@gmail.com>
14582 * config/nds32/constants.md (unspec_element): Add UNSPEC_ICT.
14583 * config/nds32/nds32-md-auxiliary.c
14584 (symbolic_reference_mentioned_p): New.
14585 (nds32_legitimize_ict_address): New.
14586 (nds32_expand_ict_move): New.
14587 (nds32_indirect_call_referenced_p): New.
14588 (nds32_symbol_binds_local_p): Delete.
14589 (nds32_long_call_p): Modify.
14590 * config/nds32/nds32-opts.h (nds32_ict_model_type): New enum type.
14591 * config/nds32/nds32-protos.h
14592 (symbolic_reference_mentioned_p): Declare.
14593 (nds32_legitimize_ict_address): Declare.
14594 (nds32_expand_ict_move): Declare.
14595 (nds32_indirect_call_referenced_p): Declare.
14596 * config/nds32/nds32-relax-opt.c (nds32_ict_const_p): New.
14597 (nds32_relax_group): Use nds32_ict_const_p as condition.
14598 * config/nds32/nds32.c (nds32_attribute_table): Add "indirect_call".
14599 (nds32_asm_file_start): Output ict_model directive in asm code.
14600 (nds32_legitimate_address_p): Consider indirect call.
14601 (nds32_print_operand): Consider indirect call.
14602 (nds32_print_operand_address): Consider indirect call.
14603 (nds32_insert_attributes): Handle "indirect_call" attribute.
14604 (TARGET_LEGITIMATE_ADDRESS_P): Define.
14605 (TARGET_LEGITIMATE_CONSTANT_P): Define.
14606 (TARGET_CANNOT_FORCE_CONST_MEM): Define.
14607 (TARGET_DELEGITIMIZE_ADDRESS): Define.
14608 (TARGET_ASM_OUTPUT_ADDR_CONST_EXTRA): Define.
14609 * config/nds32/nds32.h (SYMBOLIC_CONST_P): Define.
14610 (TARGET_ICT_MODEL_SMALL): Define.
14611 (TARGET_ICT_MODEL_LARGE): Define.
14612 * config/nds32/nds32.md (movsi): Consider ict model.
14613 (call, call_value): Consider ict model.
14614 (sibcall, sibcall_value): Consider ict model.
14615 * config/nds32/nds32.opt (mict-model): New option.
14616 * config/nds32/predicates.md (nds32_symbolic_operand): Consider ict
14619 2018-05-18 Kito Cheng <kito.cheng@gmail.com>
14620 Monk Chiang <sh.chiang04@gmail.com>
14621 Jim Wilson <jimw@sifive.com>
14623 * common/config/riscv/riscv-common.c (riscv_parse_arch_string):
14624 Add support to parse rv32e*. Clear MASK_RVE for rv32i and rv64i.
14625 * config.gcc (riscv*-*-*): Add support for rv32e* and ilp32e.
14626 * config/riscv/riscv-c.c (riscv_cpu_cpp_builtins): Define
14627 __riscv_32e when TARGET_RVE. Handle ABI_ILP32E as soft-float ABI.
14628 * config/riscv/riscv-opts.h (riscv_abi_type): Add ABI_ILP32E.
14629 * config/riscv/riscv.c (riscv_compute_frame_info): When TARGET_RVE,
14630 compute save_libcall_adjustment properly.
14631 (riscv_option_override): Call error if TARGET_RVE and not ABI_ILP32E.
14632 (riscv_conditional_register_usage): Handle TARGET_RVE and ABI_ILP32E.
14633 * config/riscv/riscv.h (UNITS_PER_FP_ARG): Handle ABI_ILP32E.
14634 (STACK_BOUNDARY, ABI_STACK_BOUNDARY): Handle TARGET_RVE.
14635 (GP_REG_LAST, MAX_ARGS_IN_REGISTERS): Likewise.
14636 (ABI_SPEC): Handle mabi=ilp32e.
14637 * config/riscv/riscv.opt (abi_type): Add ABI_ILP32E.
14638 (RVE): Add RVE mask.
14639 * doc/invoke.texi (RISC-V options) <-mabi>: Add ilp32e info.
14640 <-march>: Add rv32e as an example.
14642 2018-05-18 Marc Glisse <marc.glisse@inria.fr>
14645 * tree-ssa-structalias.c (create_variable_info_for_1): Extra argument.
14646 (intra_create_variable_infos): Handle C++ constructors.
14648 2018-05-18 Martin Liska <mliska@suse.cz>
14650 * passes.def: Remove a redundant pass.
14652 2018-05-18 Eric Botcazou <ebotcazou@adacore.com>
14655 * config/sparc/sparc.c (sparc_expand_builtin): Always initialize op[0].
14657 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
14659 * config/arm/arm-cpus.in (armv3m, mode32): Delete features.
14661 (ARMv2, ARMv3, ARMv3m): Delete fgroups.
14663 (armv2, armv2a, armv3, armv3m): Delete architectures.
14664 (arm2, arm250, arm3, arm6, arm60, arm600, arm610, arm620,
14665 arm7, arm7d, arm7di, arm70, arm700, arm700i, arm710, arm720,
14666 arm710c, arm7100, arm7500, arm7500fe, arm7m, arm7dm, arm7dmi):
14668 * config/arm/arm.md (maddsidi4): Remove check for arm_arch3m.
14669 (*mulsidi3adddi): Likewise.
14670 (mulsidi3): Likewise.
14671 (*mulsidi3_nov6): Likewise.
14672 (umulsidi3): Likewise.
14673 (umulsidi3_nov6): Likewise.
14674 (umaddsidi4): Likewise.
14675 (*umulsidi3adddi): Likewise.
14676 (smulsi3_highpart): Likewise.
14677 (*smulsi3_highpart_nov6): Likewise.
14678 (umulsi3_highpart): Likewise.
14679 (*umulsi3_highpart_nov6): Likewise.
14680 * config/arm/arm.h (arm_arch3m): Delete.
14681 * config/arm/arm.c (arm_arch3m): Delete.
14682 (arm_option_override_internal): Update armv3-related comment.
14683 (arm_configure_build_target): Delete use of isa_bit_mode32.
14684 (arm_option_reconfigure_globals): Delete set of arm_ach3m.
14685 (arm_rtx_costs_internal): Delete check of arm_arch3m.
14686 * config/arm/arm-fixed.md (mulsq3): Delete check for arm_arch3m.
14687 (mulsa3): Likewise.
14688 (mulusa3): Likewise.
14689 * config/arm/arm-protos.h (arm_arch3m): Delete.
14690 * config/arm/arm-tables.opt: Regenerate.
14691 * config/arm/arm-tune.md: Likewise.
14692 * config/arm/t-arm-elf (all_early_nofp): Delete mentions of
14693 deleted architectures.
14695 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
14697 * config/arm/arm-cpus.in (armv5, armv5e): Delete features.
14698 (armv5t, armv5te): New features.
14699 (ARMv5, ARMv5e): Delete fgroups.
14700 (ARMv5t, ARMv5te): Adjust for above changes.
14701 (ARMv6m): Likewise.
14702 (armv5, armv5e): Delete arches.
14703 * config/arm/arm.md (*call_reg_armv5): Use arm_arch5t instead of
14705 (*call_reg_arm): Likewise.
14706 (*call_value_reg_armv5): Likewise.
14707 (*call_value_reg_arm): Likewise.
14708 (*call_symbol): Likewise.
14709 (*call_value_symbol): Likewise.
14710 (*sibcall_insn): Likewise.
14711 (*sibcall_value_insn): Likewise.
14712 (clzsi2): Likewise.
14713 (prefetch): Likewise.
14714 (define_split and define_peephole2 dependent on arm_arch5):
14716 * config/arm/arm.h (TARGET_LDRD): Use arm_arch5te instead of
14718 (TARGET_ARM_QBIT): Likewise.
14719 (TARGET_DSP_MULTIPLY): Likewise.
14720 (enum base_architecture): Delete BASE_ARCH_5, BASE_ARCH_5E.
14721 (arm_arch5, arm_arch5e): Delete.
14722 (arm_arch5t, arm_arch5te): Declare.
14723 * config/arm/arm.c (arm_arch5, arm_arch5e): Delete.
14724 (arm_arch5t): Declare.
14725 (arm_option_reconfigure_globals): Update for the above.
14726 (arm_options_perform_arch_sanity_checks): Update comment, replace
14727 use of arm_arch5 with arm_arch5t.
14728 (use_return_insn): Likewise.
14729 (arm_emit_call_insn): Likewise.
14730 (output_return_instruction): Likewise.
14731 (arm_final_prescan_insn): Likewise.
14732 (arm_coproc_builtin_available): Likewise.
14733 * config/arm/arm-c.c (arm_cpu_builtins): Replace arm_arch5 and
14734 arm_arch5e with arm_arch5t and arm_arch5te.
14735 * config/arm/arm-protos.h (arm_arch5, arm_arch5e): Delete.
14736 (arm_arch5t, arm_arch5te): Declare.
14737 * config/arm/arm-tables.opt: Regenerate.
14738 * config/arm/t-arm-elf: Remove references to armv5, armv5e.
14739 * config/arm/t-multilib: Likewise.
14740 * config/arm/thumb1.md (*call_reg_thumb1_v5): Check arm_arch5t
14741 instead of arm_arch5.
14742 (*call_reg_thumb1): Likewise.
14743 (*call_value_reg_thumb1_v5): Likewise.
14744 (*call_value_reg_thumb1): Likewise.
14745 * config/arm/vxworks.h (TARGET_OS_CPP_BUILTINS): Remove now
14747 * doc/invoke.texi (ARM Options): Remove references to armv5, armv5e.
14749 2018-05-18 Martin Liska <mliska@suse.cz>
14751 PR gcov-profile/84846
14752 * doc/gcov.texi: Document -t option of gcov tool.
14754 2018-05-18 Martin Liska <mliska@suse.cz>
14756 PR gcov-profile/84846
14757 * gcov.c (print_usage): Add new -t option.
14758 (process_args): Handle the option.
14759 (generate_results): Use stdout as output when requested by
14762 2018-05-18 Martin Liska <mliska@suse.cz>
14764 PR gcov-profile/84846
14765 * coverage.c (coverage_init): Write PWD to .gcno file.
14766 * doc/gcov.texi: Document how working directory is printed.
14767 * gcov-dump.c (dump_gcov_file): Print PWD.
14768 * gcov.c (output_intermediate_file): Likewise.
14769 (read_graph_file): Read PWD string.
14770 (output_lines): Print PWD.
14772 2018-05-18 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
14774 PR middle-end/85817
14775 * ipa-pure-const.c (malloc_candidate_p): Remove the check integer_zerop
14776 for retval and return false if all args to phi are zero.
14778 2018-05-18 Richard Biener <rguenther@suse.de>
14780 * gimple-ssa-evrp.c (class evrp_folder): Add simplify_stmt_using_ranges
14782 (evrp_dom_walker::before_dom_children): Call it.
14784 2018-05-18 Richard Biener <rguenther@suse.de>
14786 * tree-dfa.c (get_ref_base_and_extent): Use range-info to refine
14787 results when processing array refs with variable index.
14789 2018-05-18 Toon Moene <toon@moene.org>
14791 * doc/invoke.texi: Move -floop-unroll-and-jam documentation
14792 directly after that of -floop-interchange. Indicate that both
14793 options are enabled by default when specifying -O3.
14795 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
14797 * config/aarch64/aarch64-simd.md (vec_set<mode>): Use VALL_F16 mode
14798 iterator. Delete separate integer-mode vec_set<mode> expander.
14799 (aarch64_simd_vec_setv2di): Delete.
14800 (vec_setv2di): Delete.
14801 (aarch64_simd_vec_set<mode>): Delete all other patterns with that name.
14802 Use VALL_F16 mode iterator. Add LD1 alternative and use vwcore for
14803 the "w, r" alternative.
14805 2018-05-18 Martin Liska <mliska@suse.cz>
14807 * passes.def: Add pass_lower_switch and pass_lower_switch_O0.
14808 * tree-pass.h (make_pass_lower_switch_O0): New function.
14809 * tree-switch-conversion.c (node_has_low_bound): Remove.
14810 (node_has_high_bound): Likewise.
14811 (node_is_bounded): Likewise.
14812 (class pass_lower_switch): Make it a template type and create
14814 (pass_lower_switch::execute): Add template argument.
14815 (make_pass_lower_switch): New function.
14816 (make_pass_lower_switch_O0): New function.
14817 (do_jump_if_equal): Remove.
14818 (emit_case_nodes): Simplify to just handle all 3 cases and leave
14819 all the hard work to tree optimization passes.
14821 2018-05-18 Martin Liska <mliska@suse.cz>
14823 * dbgcnt.c (limit_low): Renamed from limit.
14824 (limit_high): New variable.
14825 (dbg_cnt_is_enabled): Check for upper limit.
14826 (dbg_cnt): Adjust dumping.
14827 (dbg_cnt_set_limit_by_index): Add new argument for high
14829 (dbg_cnt_set_limit_by_name): Likewise.
14830 (dbg_cnt_process_single_pair): Parse new format.
14831 (dbg_cnt_process_opt): Use strtok.
14832 (dbg_cnt_list_all_counters): Remove 'value' and add
14834 * doc/invoke.texi: Document changes.
14836 2018-05-18 Richard Sandiford <richard.sandiford@linaro.org>
14838 * doc/sourcebuild.texi (scalar_all_fma): Document.
14839 * tree.def (FMA_EXPR): Delete.
14840 * internal-fn.def (FMA, FMS, FNMA, FNMS): New internal functions.
14841 * internal-fn.c (ternary_direct): New macro.
14842 (expand_ternary_optab_fn): Likewise.
14843 (direct_ternary_optab_supported_p): Likewise.
14844 * Makefile.in (build/genmatch.o): Depend on case-fn-macros.h.
14845 * builtins.c (fold_builtin_fma): Delete.
14846 (fold_builtin_3): Don't call it.
14847 * cfgexpand.c (expand_debug_expr): Remove FMA_EXPR handling.
14848 * expr.c (expand_expr_real_2): Likewise.
14849 * fold-const.c (operand_equal_p): Likewise.
14850 (fold_ternary_loc): Likewise.
14851 * gimple-pretty-print.c (dump_ternary_rhs): Likewise.
14852 * gimple.c (DEFTREECODE): Likewise.
14853 * gimplify.c (gimplify_expr): Likewise.
14854 * optabs-tree.c (optab_for_tree_code): Likewise.
14855 * tree-cfg.c (verify_gimple_assign_ternary): Likewise.
14856 * tree-eh.c (operation_could_trap_p): Likewise.
14857 (stmt_could_throw_1_p): Likewise.
14858 * tree-inline.c (estimate_operator_cost): Likewise.
14859 * tree-pretty-print.c (dump_generic_node): Likewise.
14860 (op_code_prio): Likewise.
14861 * tree-ssa-loop-im.c (stmt_cost): Likewise.
14862 * tree-ssa-operands.c (get_expr_operands): Likewise.
14863 * tree.c (commutative_ternary_tree_code, add_expr): Likewise.
14864 * fold-const-call.h (fold_fma): Delete.
14865 * fold-const-call.c (fold_const_call_ssss): Handle CFN_FMS,
14866 CFN_FNMA and CFN_FNMS.
14867 (fold_fma): Delete.
14868 * genmatch.c (combined_fn): New enum.
14869 (commutative_ternary_tree_code): Remove FMA_EXPR handling.
14870 (commutative_op): New function.
14871 (commutate): Use it. Handle more than 2 operands.
14872 (dt_operand::gen_gimple_expr): Use commutative_op.
14873 (parser::parse_expr): Allow :c to be used with non-binary
14874 operators if the commutative operand is known.
14875 * gimple-ssa-backprop.c (backprop::process_builtin_call_use): Handle
14876 CFN_FMS, CFN_FNMA and CFN_FNMS.
14877 (backprop::process_assign_use): Remove FMA_EXPR handling.
14878 * hsa-gen.c (gen_hsa_insns_for_operation_assignment): Likewise.
14879 (gen_hsa_fma): New function.
14880 (gen_hsa_insn_for_internal_fn_call): Use it for IFN_FMA, IFN_FMS,
14881 IFN_FNMA and IFN_FNMS.
14882 * match.pd: Add folds for IFN_FMS, IFN_FNMA and IFN_FNMS.
14883 * gimple-fold.h (follow_all_ssa_edges): Declare.
14884 * gimple-fold.c (follow_all_ssa_edges): New function.
14885 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Use the
14886 gimple_build interface and use follow_all_ssa_edges to fold the result.
14887 (convert_mult_to_fma): Use direct_internal_fn_suppoerted_p
14888 instead of checking for optabs directly.
14889 * config/i386/i386.c (ix86_add_stmt_cost): Recognize FMAs as calls
14890 rather than FMA_EXPRs.
14891 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Create a
14892 call to IFN_FMA instead of an FMA_EXPR.
14894 2018-05-17 Jim Wilson <jimw@sifive.com>
14896 * expr.c (do_tablejump): When converting index to Pmode, if we have a
14897 sign extended promoted subreg, and the range does not have the sign bit
14898 set, then do a sign extend.
14900 * config/riscv/riscv.c (riscv_extend_comparands): In unsigned QImode
14901 test, check for sign extended subreg and/or constant operands, and
14902 do a sign extend in that case.
14904 2018-05-17 Steve Ellcey <sellcey@cavium.com>
14906 * config/aarch64/thunderx2t99.md (thunderx2t99_ls_both): Delete.
14907 (thunderx2t99_multiple): Delete psuedo-units from used cpus.
14909 (thunderx2t99_alu_shift): Remove alu_shift_reg, alus_shift_reg.
14910 Change logics_shift_reg to logics_shift_imm.
14911 (thunderx2t99_fp_loadpair_basic): Delete.
14912 (thunderx2t99_fp_storepair_basic): Delete.
14913 (thunderx2t99_asimd_int): Add neon_sub and neon_sub_q types.
14914 (thunderx2t99_asimd_polynomial): Delete.
14915 (thunderx2t99_asimd_fp_simple): Add neon_fp_mul_s_scalar_q
14916 and neon_fp_mul_d_scalar_q.
14917 (thunderx2t99_asimd_fp_conv): Add *int_to_fp* types.
14918 (thunderx2t99_asimd_misc): Delete neon_dup and neon_dup_q.
14919 (thunderx2t99_asimd_recip_step): Add missing *sqrt* types.
14920 (thunderx2t99_asimd_lut): Add missing tbl types.
14921 (thunderx2t99_asimd_ext): Delete.
14922 (thunderx2t99_asimd_load1_1_mult): Delete.
14923 (thunderx2t99_asimd_load1_2_mult): Delete.
14924 (thunderx2t99_asimd_load1_ldp): New.
14925 (thunderx2t99_asimd_load1): New.
14926 (thunderx2t99_asimd_load2): Add missing *load2* types.
14927 (thunderx2t99_asimd_load3): New.
14928 (thunderx2t99_asimd_load4): New.
14929 (thunderx2t99_asimd_store1_1_mult): Delete.
14930 (thunderx2t99_asimd_store1_2_mult): Delete.
14931 (thunderx2t99_asimd_store2_mult): Delete.
14932 (thunderx2t99_asimd_store2_onelane): Delete.
14933 (thunderx2t99_asimd_store_stp): New.
14934 (thunderx2t99_asimd_store1): New.
14935 (thunderx2t99_asimd_store2): New.
14936 (thunderx2t99_asimd_store3): New.
14937 (thunderx2t99_asimd_store4): New.
14939 2018-05-17 Jerome Lambourg <lambourg@adacore.com>
14941 * config/arm/arm_cmse.h (cmse_nsfptr_create, cmse_is_nsfptr): Remove
14942 #include <stdint.h>. Replace intptr_t with __INTPTR_TYPE__.
14944 2018-05-17 Pat Haugen <pthaugen@us.ibm.com>
14945 Segher Boessenkool <segher@kernel.crashing.org>
14948 * config/rs6000/rs6000.c (rs6000_output_move_128bit): Check dest
14951 2018-05-17 Richard Biener <rguenther@suse.de>
14953 * tree-ssa-dse.c (dse_classify_store): Fix iterator increment
14954 for pruning loop and prune defs feeding only already visited PHIs.
14956 2018-05-17 Richard Biener <rguenther@suse.de>
14958 * tree-ssa-sccvn.c (vn_reference_lookup_3): Improve memset handling.
14960 2018-05-17 Bin Cheng <bin.cheng@arm.com>
14961 Richard Biener <rguenther@suse.de>
14963 PR tree-optimization/85793
14964 * tree-vect-stmts.c (vectorizable_load): Handle 1 element-wise load
14965 for VMAT_ELEMENTWISE.
14967 2018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
14969 * internal-fn.h (lookup_internal_fn): Declare
14970 * internal-fn.c (lookup_internal_fn): New function.
14971 * gimple.c (gimple_build_call_from_tree): Handle calls to
14972 internal functions.
14973 * gimple-pretty-print.c (dump_gimple_call): Print "." before
14974 internal function names.
14975 * tree-pretty-print.c (dump_generic_node): Likewise.
14976 * tree-ssa-scopedtables.c (expr_hash_elt::print): Likewise.
14978 2018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
14980 * gimple-fold.h (gimple_build): Make the function forms take
14981 combined_fn rather than built_in_function.
14982 (gimple_simplify): Likewise.
14983 * gimple-match-head.c (gimple_simplify): Likewise.
14984 * gimple-fold.c (gimple_build): Likewise.
14985 * tree-vect-loop.c (get_initial_def_for_reduction): Use gimple_build
14986 rather than gimple_build_call_internal.
14987 (get_initial_defs_for_reduction): Likewise.
14988 (vect_create_epilog_for_reduction): Likewise.
14989 (vectorizable_live_operation): Likewise.
14991 2018-05-17 Martin Liska <mliska@suse.cz>
14993 * gimple-ssa-sprintf.c (format_directive): Do not use
14994 space in between 'G_' and '('.
14996 2018-05-17 Jakub Jelinek <jakub@redhat.com>
14999 * config/i386/i386.c (ix86_fold_builtin): Handle masked shifts
15000 even if the mask is not all ones.
15003 * config/i386/i386.c (ix86_fold_builtin): Fold shift builtins by
15005 (ix86_gimple_fold_builtin): Likewise.
15008 * config/i386/i386.c: Include tree-vector-builder.h.
15009 (ix86_vector_shift_count): New function.
15010 (ix86_fold_builtin): Fold shift builtins by scalar count.
15011 (ix86_gimple_fold_builtin): Likewise.
15013 * config/i386/avx512fintrin.h (_mm512_set_epi16, _mm512_set_epi8,
15014 _mm512_setzero): New intrinsics.
15016 2018-05-17 James Greenhalgh <james.greenhalgh@arm.com>
15017 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
15019 * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify
15020 code generation for cases where splatting a value is not useful.
15021 * simplify-rtx.c (simplify_ternary_operation): Simplify
15022 vec_merge across a vec_duplicate and a paradoxical subreg forming
15023 a vector mode to a vec_concat.
15025 2018-05-17 Olga Makhotina <olga.makhotina@intel.com>
15027 * config.gcc: Support "goldmont-plus".
15028 * config/i386/driver-i386.c (host_detect_local_cpu): Detect
15030 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
15031 PROCESSOR_GOLDMONT_PLUS.
15032 * config/i386/i386.c (m_GOLDMONT_PLUS): Define.
15033 (processor_target_table): Add "goldmont-plus".
15034 (PTA_GOLDMONT_PLUS): Define.
15035 (ix86_lea_outperforms): Add TARGET_GOLDMONT_PLUS.
15036 (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT_PLUS.
15037 (fold_builtin_cpu): Add M_INTEL_GOLDMONT_PLUS.
15038 (fold_builtin_cpu): Add "goldmont-plus".
15039 (ix86_add_stmt_cost): Add TARGET_GOLDMONT_PLUS.
15040 (ix86_option_override_internal): Add "goldmont-plus".
15041 * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT_PLUS.
15042 (processor_type): Add PROCESSOR_GOLDMONT_PLUS.
15043 * config/i386/x86-tune.def: Add m_GOLDMONT_PLUS.
15044 * doc/invoke.texi: Add goldmont-plus as x86 -march=/-mtune= CPU type.
15046 2018-05-17 Richard Biener <rguenther@suse.de>
15048 PR tree-optimization/85757
15049 * tree-ssa-dse.c (dse_classify_store): Record a PHI def and
15050 remove defs that only feed that PHI from further processing.
15052 2018-05-16 Jim Wilson <jimw@sifive.com>
15054 * config/riscv/riscv.md (<optab>si3_mask, <optab>si3_mask_1): Prepend
15056 (<optab>di3_mask, <optab>di3_mask_1): Likewise.
15058 2018-05-16 Mark Wielaard <mark@klomp.org>
15060 * dwarf2out.c (count_index_strings): New function.
15061 (output_indirect_strings): Call count_index_strings and generate
15062 header for dwarf_version >= 5.
15064 2018-05-16 Mark Wielaard <mark@klomp.org>
15066 * dwarf2out.c (dwarf_FORM): New function.
15067 (set_indirect_string): Use dwarf_FORM.
15068 (reset_indirect_string): Likewise.
15069 (size_of_die): Likewise.
15070 (value_format): Likewise.
15071 (output_die): Likewise.
15072 (add_skeleton_AT_string): Likewise.
15073 (output_macinfo_op): Likewise.
15074 (index_string): Likewise.
15075 (output_index_string_offset): Likewise.
15076 (output_index_string): Likewise.
15077 (count_index_strings): Likewise.
15079 2018-05-16 Carl Love <cel@us.ibm.com>
15081 * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
15082 dcbt and dcbtstt with TH=16 if operands[2] is 0 and Power 8 or newer.
15084 2018-05-16 Martin Jambor <mjambor@suse.cz>
15086 * ipa-prop.c (ipa_free_all_edge_args): Remove.
15087 * ipa-prop.h (ipa_free_all_edge_args): Likewise.
15089 2018-05-16 Wilco Dijkstra <wdijkstr@arm.com>
15091 * config/aarch64/aarch64.md (fma<mode>4): Change into expand pattern.
15092 (fnma<mode>4): Likewise.
15093 (fms<mode>4): Likewise.
15094 (fnms<mode>4): Likewise.
15095 (aarch64_fma<mode>4): Rename insn, reorder accumulator operand.
15096 (aarch64_fnma<mode>4): Likewise.
15097 (aarch64_fms<mode>4): Likewise.
15098 (aarch64_fnms<mode>4): Likewise.
15099 (aarch64_fnmadd<mode>4): Likewise.
15101 2018-05-16 Jason Merrill <jason@redhat.com>
15103 * tree.c (warn_deprecated_use): Return bool. Simplify logic.
15105 2018-05-16 Richard Biener <rguenther@suse.de>
15107 * tree-vectorizer.h (struct stmt_info_for_cost): Add where member.
15108 (dump_stmt_cost): Declare.
15109 (add_stmt_cost): Dump cost we add.
15110 (add_stmt_costs): New function.
15111 (vect_model_simple_cost, vect_model_store_cost, vect_model_load_cost):
15112 No longer exported.
15113 (vect_analyze_stmt): Adjust prototype.
15114 (vectorizable_condition): Likewise.
15115 (vectorizable_live_operation): Likewise.
15116 (vectorizable_reduction): Likewise.
15117 (vectorizable_induction): Likewise.
15118 * tree-vect-loop.c (vect_analyze_loop_operations): Create local
15119 cost vector to pass to vectorizable_ and record afterwards.
15120 (vect_model_reduction_cost): Take cost vector argument and adjust.
15121 (vect_model_induction_cost): Likewise.
15122 (vectorizable_reduction): Likewise.
15123 (vectorizable_induction): Likewise.
15124 (vectorizable_live_operation): Likewise.
15125 * tree-vect-slp.c (vect_create_new_slp_node): Initialize
15126 SLP_TREE_NUMBER_OF_VEC_STMTS.
15127 (vect_analyze_slp_cost_1): Remove.
15128 (vect_analyze_slp_cost): Likewise.
15129 (vect_slp_analyze_node_operations): Take visited args and
15130 a target cost vector. Avoid processing already visited stmt sets.
15131 (vect_slp_analyze_operations): Use a local cost vector to gather
15132 costs and register those of non-discarded instances.
15133 (vect_bb_vectorization_profitable_p): Use add_stmt_costs.
15134 (vect_schedule_slp_instance): Remove copying of
15135 SLP_TREE_NUMBER_OF_VEC_STMTS. Instead assert that it is not
15137 * tree-vect-stmts.c (record_stmt_cost): Remove path directly
15138 adding cost. Record cost entry location.
15139 (vect_prologue_cost_for_slp_op): Function to compute cost of
15140 a constant or invariant generated for SLP vect in the prologue,
15141 split out from vect_analyze_slp_cost_1.
15142 (vect_model_simple_cost): Make static. Adjust for SLP costing.
15143 (vect_model_promotion_demotion_cost): Likewise.
15144 (vect_model_store_cost): Likewise, make static.
15145 (vect_model_load_cost): Likewise.
15146 (vectorizable_bswap): Add cost vector arg and adjust.
15147 (vectorizable_call): Likewise.
15148 (vectorizable_simd_clone_call): Likewise.
15149 (vectorizable_conversion): Likewise.
15150 (vectorizable_assignment): Likewise.
15151 (vectorizable_shift): Likewise.
15152 (vectorizable_operation): Likewise.
15153 (vectorizable_store): Likewise.
15154 (vectorizable_load): Likewise.
15155 (vectorizable_condition): Likewise.
15156 (vectorizable_comparison): Likewise.
15157 (can_vectorize_live_stmts): Likewise.
15158 (vect_analyze_stmt): Likewise.
15159 (vect_transform_stmt): Adjust calls to vectorizable_*.
15160 * tree-vectorizer.c: Include gimple-pretty-print.h.
15161 (dump_stmt_cost): New function.
15163 2018-05-16 Richard Biener <rguenther@suse.de>
15165 * params.def (PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE): New param.
15166 * doc/invoke.texi (dse-max-alias-queries-per-store): Document.
15167 * tree-ssa-dse.c: Include tree-ssa-loop.h.
15168 (check_name): New callback.
15169 (dse_classify_store): Track cycles via a visited bitmap of PHI
15170 defs and simplify handling of in-loop and across loop dead stores
15171 and properly fail for loop-variant refs. Handle byte-tracking with
15172 multiple defs. Use PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE for
15175 2018-05-16 Richard Sandiford <richard.sandiford@linaro.org>
15177 * tree-vectorizer.h (vect_get_vector_types_for_stmt): Declare.
15178 (vect_get_mask_type_for_stmt): Likewise.
15179 * tree-vect-slp.c (vect_two_operations_perm_ok_p): New function,
15181 (vect_build_slp_tree_1): ...here. Use vect_get_vector_types_for_stmt
15182 to determine the statement's vector type and the vector type that
15183 should be used for calculating nunits. Deal with cases in which
15184 the type has to be deferred.
15185 (vect_slp_analyze_node_operations): Use vect_get_vector_types_for_stmt
15186 and vect_get_mask_type_for_stmt to calculate STMT_VINFO_VECTYPE.
15187 * tree-vect-loop.c (vect_determine_vf_for_stmt_1)
15188 (vect_determine_vf_for_stmt): New functions, split out from...
15189 (vect_determine_vectorization_factor): ...here.
15190 * tree-vect-stmts.c (vect_get_vector_types_for_stmt)
15191 (vect_get_mask_type_for_stmt): New functions, split out from
15192 vect_determine_vectorization_factor.
15194 2018-05-16 Richard Biener <rguenther@suse.de>
15196 * tree-cfg.c (verify_gimple_assign_ternary): Properly
15197 verify the [VEC_]COND_EXPR embedded comparison.
15199 2018-05-15 Martin Sebor <msebor@redhat.com>
15201 PR tree-optimization/85753
15202 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Handle
15203 RECORD_TYPE in addition to ARRAY_TYPE.
15205 2018-05-15 Martin Sebor <msebor@redhat.com>
15207 PR middle-end/85643
15208 * calls.c (get_attr_nonstring_decl): Handle MEM_REF.
15210 2018-05-15 Richard Biener <rguenther@suse.de>
15212 * tree-ssa-dse.c (dse_classify_store): Remove use_stmt parameter,
15213 add by_clobber_p one. Change algorithm to collect all defs
15214 representing uses we need to walk and try reducing them to
15215 a single one before failing.
15216 (dse_dom_walker::dse_optimize_stmt): Adjust.
15218 2018-05-13 Mark Wielaard <mark@klomp.org>
15220 * dwarf2out.c (dwarf_OP): Handle DW_OP_addrx and DW_OP_constx.
15221 (size_of_loc_descr): Likewise.
15222 (output_loc_operands): Likewise.
15223 (output_loc_operands_raw): Likewise.
15224 (dw_addr_op): Use dwarf_OP () for DW_OP_constx and DW_OP_addrx.
15225 (resolve_addr_in_expr): Handle DW_OP_addrx and DW_OP_constx.
15226 (hash_loc_operands): Likewise.
15227 (compare_loc_operands): Likewise.
15229 2018-05-14 Mark Wielaard <mark@klomp.org>
15231 * dwarf2out.c (count_index_addrs): New function.
15232 (dwarf2out_finish): Use count_index_addrs to calculate addrs_length.
15234 2018-05-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
15236 PR tree-optimization/83648
15237 * ipa-pure-const.c (malloc_candidate_p): Allow function with NULL
15238 return value as malloc candidate.
15240 2018-05-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
15243 * ipa-pure-const.c (warn_function_malloc): Pass value of known_finite
15244 param as true in call to suggest_attribute.
15246 2018-05-14 Segher Boessenkool <segher@kernel.crashing.org>
15248 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete @itemx for
15249 -mreadonly-in-sdata.
15251 2018-05-14 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
15253 * config/aarch64/aarch64-simd.md (*aarch64_crypto_aese_fused):
15255 (aarch64_crypto_aesd_fused): Likewise.
15257 2018-05-14 Wilco Dijkstra <wdijkstr@arm.com>
15259 * config/aarch64/aarch64.md (mov<mode>): Remove '*' in alternatives.
15260 (movsi_aarch64): Likewise.
15261 (load_pairsi): Likewise.
15262 (load_pairdi): Likewise.
15263 (store_pairsi): Likewise.
15264 (store_pairdi): Likewise.
15265 (load_pairsf): Likewise.
15266 (load_pairdf): Likewise.
15267 (store_pairsf): Likewise.
15268 (store_pairdf): Likewise.
15269 (zero_extend): Likewise.
15270 (trunc): Swap alternatives.
15271 (fcvt_target): Add '?' to prefer w over r.
15273 2018-05-14 Jakub Jelinek <jakub@redhat.com>
15276 * config/i386/i386.md: Disallow non-commutative arithmetics in
15277 last twpeephole for mem {+,-,&,|,^}= x; mem != 0 after cmpelim
15278 optimization. Use COMMUTATIVE_ARITH_P test rather than != MINUS
15279 in the peephole2 before it.
15281 2018-05-14 Sebastian Peryt <sebastian.peryt@intel.com>
15283 * common/config/i386/i386-common.c (OPTION_MASK_ISA_CLDEMOTE_SET,
15284 OPTION_MASK_ISA_CLDEMOTE_UNSET): New defines.
15285 (ix86_handle_option): Handle -mcldemote.
15286 * config.gcc: New header.
15287 * config/i386/cldemoteintrin.h: New file.
15288 * config/i386/cpuid.h (bit_CLDEMOTE): New bit.
15289 * config/i386/driver-i386.c (host_detect_local_cpu): Detect
15291 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
15292 OPTION_MASK_ISA_CLDEMOTE.
15293 * config/i386/i386.c (ix86_target_string): Add -mcldemote.
15294 (ix86_valid_target_attribute_inner_p): Ditto.
15295 (enum ix86_builtins): Add IX86_BUILTIN_CLDEMOTE.
15296 (ix86_init_mmx_sse_builtins): Define __builtin_ia32_cldemote.
15297 (ix86_expand_builtin): Expand IX86_BUILTIN_CLDEMOTE.
15298 * config/i386/i386.h (TARGET_CLDEMOTE, TARGET_CLDEMOTE_P): New.
15299 * config/i386/i386.md (UNSPECV_CLDEMOTE): New.
15301 * config/i386/i386.opt: Add -mcldemote.
15302 * config/i386/x86intrin.h: New header.
15303 * doc/invoke.texi: Add -mcldemote.
15305 2018-05-14 Richard Biener <rguenther@suse.de>
15307 * doc/match-and-simplify.texi: Adjust :s documentation.
15309 2018-05-14 Alexander Monakov <amonakov@ispras.ru>
15311 * sort.cc (REORDER_23): Pass the type for the temporaries instead of
15312 intended memcpy size.
15313 (REORDER_45): Likewise.
15315 2018-05-13 Alexander Monakov <amonakov@ispras.ru>
15317 * sort.cc: New file.
15318 * system.h [!CHECKING_P] (qsort): Redirect to gcc_qsort.
15319 * vec.c (qsort_chk): Use gcc_qsort.
15320 * Makefile.in (OBJS-libcommon): Add sort.o.
15321 (build/sort.o): New target. Use it...
15322 (BUILD_RTL): ... here, and...
15323 (build/gencfn-macros): ... here, and...
15324 (build/genmatch): ... here.
15326 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
15327 Chung-Ju Wu <jasonwucj@gmail.com>
15329 * config.gcc (nds32*-*-*): Check that n15 is valid to --with-cpu.
15330 * config/nds32/nds32-graywolf.md: New file.
15331 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_GRAYWOLF.
15332 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n15
15334 * config/nds32/nds32-protos.h: More declarations for n15 pipeline.
15335 * config/nds32/nds32-utils.c: More implementations for n15 pipeline.
15336 * config/nds32/nds32.md (pipeline_model): Add graywolf.
15337 * config/nds32/nds32.opt (mcpu): Support n15 pipeline cpus.
15338 * config/nds32/pipelines.md: Include n15 settings.
15340 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
15341 Chung-Ju Wu <jasonwucj@gmail.com>
15343 * config.gcc (nds32*-*-*): Check that n12/n13 are valid to --with-cpu.
15344 * config/nds32/nds32-n13.md: New file.
15345 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N12 and CPU_N13.
15346 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n12/n13
15348 * config/nds32/nds32-protos.h: More declarations for n12/n13 pipeline.
15349 * config/nds32/nds32.md (pipeline_model): Add n13.
15350 * config/nds32/nds32.opt (mcpu): Support n12/n13 pipeline cpus.
15351 * config/nds32/pipelines.md: Include n13 settings.
15353 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
15354 Chung-Ju Wu <jasonwucj@gmail.com>
15356 * config.gcc (nds32*-*-*): Check that n10/d10 are valid to --with-cpu.
15357 * config/nds32/nds32-n10.md: New file.
15358 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N10.
15359 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n10
15361 * config/nds32/nds32-protos.h: More declarations for n10 pipeline.
15362 * config/nds32/nds32-utils.c: More implementations for n10 pipeline.
15363 * config/nds32/nds32.md (pipeline_model): Add n10.
15364 * config/nds32/nds32.opt (mcpu): Support n10 pipeline cpus.
15365 * config/nds32/pipelines.md: Include n10 settings.
15367 2018-05-13 Monk Chiang <sh.chiang04@gmail.com>
15368 Kito Cheng <kito.cheng@gmail.com>
15369 Chung-Ju Wu <jasonwucj@gmail.com>
15371 * config.gcc (nds32be-*-*): Handle --with-ext-dsp.
15372 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
15373 Add enum values for DSP extension instructions.
15374 * config/nds32/constraints.md (Iu06, IU06, CVp5, CVs5, CVs2, CVhi):
15376 * config/nds32/iterators.md (shifts, shiftrt, sat_plus, all_plus,
15377 sat_minus, all_minus, plus_minus, extend, sumax, sumin, sumin_max):
15378 New code iterators.
15379 (su, zs, uk, opcode, add_rsub, add_sub): New code attributes.
15380 * config/nds32/nds32-dspext.md: New file for DSP implementation.
15381 * config/nds32/nds32-intrinsic.c: Implementation of DSP extension.
15382 * config/nds32/nds32-intrinsic.md: Likewise.
15383 * config/nds32/nds32_intrinsic.h: Likewise.
15384 * config/nds32/nds32-md-auxiliary.c: Likewise.
15385 * config/nds32/nds32-memory-manipulation.c: Consider DSP extension.
15386 * config/nds32/nds32-predicates.c (const_vector_to_hwint): New.
15387 (nds32_valid_CVp5_p, nds32_valid_CVs5_p): New.
15388 (nds32_valid_CVs2_p, nds32_valid_CVhi_p): New.
15389 * config/nds32/nds32-protos.h: New declarations for DSP extension.
15390 * config/nds32/nds32-utils.c (extract_mac_non_acc_rtx): New case
15391 TYPE_DMAC in switch statement.
15392 * config/nds32/nds32.c: New checking and implementation for DSP
15393 extension instructions.
15394 * config/nds32/nds32.h: Likewise.
15395 * config/nds32/nds32.md: Likewise.
15396 * config/nds32/nds32.opt (mhw-abs, mext-dsp): New options.
15397 * config/nds32/predicates.md: Implement new predicates for DSP
15400 2018-05-11 Michael Meissner <meissner@linux.vnet.ibm.com>
15402 * config/rs6000/rs6000.md (mov<mode>_softfloat, FMOVE32):
15403 Reformat alternatives and attributes so it is easier to identify
15404 which constraints/attributes go with which instruction.
15405 (mov<mode>_hardfloat32, FMOVE64): Likewise.
15406 (mov<mode>_softfloat32, FMOVE64): Likewise.
15407 (mov<mode>_hardfloat64, FMOVE64): Likewise.
15408 (mov<mode>_softfloat64, FMOVE64): Likewise.
15410 2018-05-11 Kelvin Nilsen <kelvin@gcc.gnu.org>
15412 * doc/extend.texi (PowerPC Built-in Functions): Rename this
15414 (Basic PowerPC Built-in Functions): The new name of the
15415 subsection previously known as "PowerPC Built-in Functions".
15416 (Basic PowerPC Built-in Functions Available on all Configurations):
15418 (Basic PowerPC Built-in Functions Available on ISA 2.05): Likewise.
15419 (Basic PowerPC Built-in Functions Available on ISA 2.06): Likewise.
15420 (Basic PowerPC Built-in Functions Available on ISA 2.07): Likewise.
15421 (Basic PowerPC Built-in Functions Available on ISA 3.0): Likewise.
15423 2018-05-11 Martin Jambor <mjambor@suse.cz>
15426 * ipa-cp.c (intersect_with_plats): Check that the lattice contains
15429 2018-05-11 Richard Earnshaw <rearnsha@arm.com>
15432 * config/arm/arm-cpus.in (fgroup ARMv6m): Add be8 feature.
15434 2018-05-11 Sebastian Peryt <sebastian.peryt@intel.com>
15436 * common/config/i386/i386-common.c (OPTION_MASK_ISA_WAITPKG_SET,
15437 OPTION_MASK_ISA_WAITPKG_UNSET): New defines.
15438 (ix86_handle_option): Handle -mwaitpkg.
15439 * config.gcc: New header.
15440 * config/i386/cpuid.h (bit_WAITPKG): New bit.
15441 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mwaitpkg.
15442 * config/i386/i386-builtin-types.def ((UINT8, UNSIGNED, UINT64)): New
15444 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
15445 OPTION_MASK_ISA_WAITPKG.
15446 * config/i386/i386.c (ix86_target_string): Add -mwaitpkg.
15447 (ix86_option_override_internal): Add PTA_WAITPKG.
15448 (ix86_valid_target_attribute_inner_p): Add -mwaitpkg.
15449 (enum ix86_builtins): Add IX86_BUILTIN_UMONITOR, IX86_BUILTIN_UMWAIT,
15450 IX86_BUILTIN_TPAUSE.
15451 (ix86_init_mmx_sse_builtins): Define __builtin_ia32_umonitor,
15452 __builtin_ia32_umwait and __builtin_ia32_tpause.
15453 (ix86_expand_builtin): Expand IX86_BUILTIN_UMONITOR,
15454 IX86_BUILTIN_UMWAIT, IX86_BUILTIN_TPAUSE.
15455 * config/i386/i386.h (TARGET_WAITPKG, TARGET_WAITPKG_P): New.
15456 * config/i386/i386.md (UNSPECV_UMWAIT, UNSPECV_UMONITOR,
15457 UNSPECV_TPAUSE): New.
15458 (umwait, umwait_rex64, umonitor_<mode>, tpause, tpause_rex64): New.
15459 * config/i386/i386.opt: Add -mwaitpkg.
15460 * config/i386/waitpkgintrin.h: New file.
15461 * config/i386/x86intrin.h: New header.
15462 * doc/invoke.texi: Add -mwaitpkg.
15464 2018-05-11 Richard Earnshaw <rearnsha@arm.com>
15467 * config/arm/arm-cpus.in: Add comment that ARMv6-m and ARMv6S-m are now
15469 (cortex-m0): Use armv6s-m isa.
15470 (cortex-m0plus): Likewise.
15471 (cortex-m1): Likewise.
15472 (cortex-m0.small-multiply): Likewise.
15473 (cortex-m0plus.small-multiply): Likewise.
15474 (cortex-m1.small-multiply): Likewise.
15476 2018-05-11 Allan Sandfeld Jensen <allan.jensen@qt.io>
15477 Jakub Jelinek <jakub@redhat.com>
15479 PR tree-optimization/85692
15480 * tree-ssa-forwprop.c (simplify_vector_constructor): Try two
15481 source permute as well.
15483 2018-05-11 Martin Liska <mliska@suse.cz>
15486 * doc/extend.texi: Document LLVM style format for no_sanitize
15489 2018-05-10 Michael Meissner <meissner@linux.vnet.ibm.com>
15491 * config/rs6000/rs6000.c (mode_supports_dq_form): Rename
15492 mode_supports_vsx_dform_quad to mode_supports_dq_form.
15493 (mode_supports_vsx_dform_quad): Likewise.
15494 (mode_supports_vmx_dform): Move these functions to be next to the
15495 other mode_supports functions.
15496 (mode_supports_dq_form): Likewise.
15497 (quad_address_p): Change calls of mode_supports_vsx_dform_quad to
15498 mode_supports_dq_form.
15499 (reg_offset_addressing_ok_p): Likewise.
15500 (offsettable_ok_by_alignment): Likewise.
15501 (rs6000_legitimate_offset_address_p): Likewise.
15502 (legitimate_lo_sum_address_p): Likewise.
15503 (rs6000_legitimize_address): Likewise.
15504 (rs6000_legitimize_reload_address): Likewise.
15505 (rs6000_secondary_reload_inner): Likewise.
15506 (rs6000_preferred_reload_class): Likewise.
15507 (rs6000_output_move_128bit): Likewise.
15509 2018-05-10 Uros Bizjak <ubizjak@gmail.com>
15511 * config/i386/i386.c (ix86_expand_builtin) <case IX86_BUILTIN_RDPID>:
15512 Generate SImode target register for null target.
15513 <case IX86_BUILTIN_XGETBV>: Ditto.
15514 <case IX86_BUILTIN_XSETBV>: Optimize LSHIFTRT generation.
15515 * config/i386/xsaveintrin.h (_xgetbv): Add missing return.
15517 2018-05-10 Carl Love <cel@us.ibm.com>
15519 * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
15520 dcbtt and dcbtstt if operands[2] is 0.
15522 2018-05-10 Uros Bizjak <ubizjak@gmail.com>
15525 * config/i386/sse.md (usadv64qi): New expander.
15527 2018-05-10 Segher Boessenkool <segher@kernel.crashing.org>
15529 * config/rs6000/altivec.md (altivec_vmrghb, altivec_vmrghh,
15530 altivec_vmrghw, altivec_vmrglb, altivec_vmrglh, altivec_vmrglw): Remove
15531 -maltivec=be support.
15532 (vec_widen_umult_even_v16qi, vec_widen_smult_even_v16qi,
15533 vec_widen_umult_even_v8hi, vec_widen_smult_even_v8hi,
15534 vec_widen_umult_even_v4si, vec_widen_smult_even_v4si,
15535 vec_widen_umult_odd_v16qi, vec_widen_smult_odd_v16qi,
15536 vec_widen_umult_odd_v8hi, vec_widen_smult_odd_v8hi,
15537 vec_widen_umult_odd_v4si, vec_widen_smult_odd_v4si, altivec_vpkpx,
15538 altivec_vpks<VI_char>ss, altivec_vpks<VI_char>us,
15539 altivec_vpku<VI_char>us, altivec_vpku<VI_char>um, altivec_vsum2sws,
15540 altivec_vsumsws): Adjust.
15541 (altivec_vspltb *altivec_vspltb_internal, altivec_vsplth,
15542 *altivec_vsplth_internal, altivec_vspltw, *altivec_vspltw_internal,
15543 altivec_vspltsf, *altivec_vspltsf_internal): Remove -maltivec=be
15545 (altivec_vperm_<mode>, altivec_vperm_<mode>_uns,
15546 altivec_vupkhs<VU_char>, altivec_vupkls<VU_char>, altivec_vupkhpx,
15547 altivec_vupklpx, altivec_lvsl, altivec_lvsr): Adjust.
15548 (altivec_lve<VI_char>x): Delete expand.
15549 (*altivec_lve<VI_char>x_internal): Rename to...
15550 (altivec_lve<VI_char>x): ... this.
15551 (altivec_lvxl_<mode>): Delete expand.
15552 (*altivec_lvxl_<mode>_internal): Rename to ...
15553 (altivec_lvxl_<mode>): ... this.
15554 (altivec_stvxl_<mode>): Delete expand.
15555 (*altivec_stvxl_<mode>_internal): Rename to ...
15556 (altivec_stvxl_<mode>): ... this.
15557 (altivec_stve<VI_char>x): Delete expand.
15558 (*altivec_stve<VI_char>x_internal): Rename to ...
15559 (altivec_stve<VI_char>x): ... this.
15560 (doublee<mode>2, unsdoubleev4si2, doubleo<mode>2, unsdoubleov4si2,
15561 doubleh<mode>2, unsdoublehv4si2, doublel<mode>2, unsdoublelv4si2,
15562 reduc_plus_scal_<mode>): Adjust.
15563 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Adjust
15565 (rs6000_cpu_cpp_builtins): Adjust.
15566 (altivec_resolve_overloaded_builtin): Remove -maltivec=be support.
15567 * config/rs6000/rs6000-protos.h (altivec_expand_lvx_be,
15568 altivec_expand_stvx_be, altivec_expand_stvex_be): Delete.
15569 * config/rs6000/rs6000.c (rs6000_option_override_internal): Remove
15570 -maltivec=be support.
15571 (rs6000_split_vec_extract_var): Adjust.
15572 (rs6000_split_v4si_init): Adjust.
15573 (swap_selector_for_mode): Delete.
15574 (altivec_expand_lvx_be, altivec_expand_stvx_be,
15575 altivec_expand_stvex_be): Delete.
15576 (altivec_expand_lv_builtin, altivec_expand_stv_builtin): Remove
15577 -maltivec=be support.
15578 (rs6000_gimple_fold_builtin): Ditto.
15579 (rs6000_generate_float2_double_code, rs6000_generate_float2_code):
15581 * config/rs6000/rs6000.h (VECTOR_ELT_ORDER_BIG): Delete.
15582 (TARGET_DIRECT_MOVE_64BIT): Adjust.
15583 * config/rs6000/rs6000.md (split for extendsidi2 for vectors): Adjust.
15584 * config/rs6000/rs6000.opt (maltivec=le, maltivec=be): Delete.
15585 * config/rs6000/vsx.md (floate<mode>, unsfloatev2di, floato<mode>,
15586 unsfloatov2di, vsignedo_v2df, vsignede_v2df, vunsignedo_v2df,
15587 vunsignede_v2df, vsx_extract_<mode>_p9, *vsx_extract_si,
15588 *vsx_extract_<mode>_p8, *vsx_extract_si_<uns>float_df,
15589 *vsx_extract_si_<uns>float_<mode>, vsx_set_<mode>_p9, vsx_set_v4sf_p9,
15590 *vsx_insert_extract_v4sf_p9, *vsx_insert_extract_v4sf_p9_2, and an
15591 anonymous split): Adjust.
15592 (vsx_mergel_<mode>, vsx_mergeh_<mode>): Remove -maltivec=be support.
15593 (vsx_xxspltd_<mode>, extract4b, insert4b): Adjust.
15595 2018-05-10 Eric Botcazou <ebotcazou@adacore.com>
15597 * configure.ac (gcc_gxx_include_dir_add_sysroot): Set it to 1 only
15598 when --with-gxx-include-dir is also specified.
15599 * configure: Regenerate.
15601 2018-05-09 Jim Wilson <jimw@sifive.com>
15604 * config.gcc (riscv*-*-*): Handle --with-multilib-list.
15605 * config/riscv/t-withmultilib: New.
15606 * config/riscv/withmultilib.h: New.
15607 * doc/install.texi: Document RISC-V --with-multilib-list support.
15609 2018-05-09 Richard Biener <rguenther@suse.de>
15611 * tree-vect-slp.c (vect_bb_slp_scalar_cost): Fill a cost
15613 (vect_bb_vectorization_profitable_p): Adjust. Compute
15614 actual scalar cost using the cost vector and the add_stmt_cost
15617 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
15619 PR rtl-optimization/85645
15620 * config/rs6000/rs6000.c (rs6000_emit_prologue_components): Put a SET
15621 in the REG_CFA_REGISTER note for LR, don't leave it empty.
15623 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
15625 PR rtl-optimization/85645
15626 * shrink-wrap.c (spread_components): Return a boolean saying if
15627 anything was changed.
15628 (try_shrink_wrapping_separate): Iterate spread_components until
15629 nothing changes anymore.
15631 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
15633 PR rtl-optimization/85645
15634 * regrename.c (build_def_use): Also kill the chains that include the
15635 destination of a REG_CFA_REGISTER note.
15637 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
15639 PR rtl-optimization/85645
15640 * regcprop.c (copyprop_hardreg_forward_1): Don't propagate into an
15641 insn that has a REG_CFA_REGISTER note.
15643 2018-05-09 Richard Sandiford <richard.sandiford@linaro.org>
15645 * cfgexpand.c (expand_clobber): New function.
15646 (expand_gimple_stmt_1): Use it.
15647 * tree-vect-stmts.c (vect_clobber_variable): New function,
15649 (vectorizable_simd_clone_call): ...here.
15650 (vectorizable_store): Emit a clobber either side of an
15651 IFN_STORE_LANES sequence.
15652 (vectorizable_load): Emit a clobber after an IFN_LOAD_LANES sequence.
15654 2018-05-09 Tom de Vries <tom@codesourcery.com>
15657 * config/nvptx/nvptx.md (define_insn "trap", define_insn "trap_if_true")
15658 (define_insn "trap_if_false"): Add exit after trap.
15660 2018-05-09 Eric Botcazou <ebotcazou@adacore.com>
15662 PR rtl-optimization/85638
15663 * bb-reorder.c: Include common/common-target.h.
15664 (create_forwarder_block): New function extracted from...
15665 (fix_up_crossing_landing_pad): ...here. Rename into...
15666 (dw2_fix_up_crossing_landing_pad): ...this.
15667 (sjlj_fix_up_crossing_landing_pad): New function.
15668 (find_rarely_executed_basic_blocks_and_crossing_edges): In SJLJ mode,
15669 call sjlj_fix_up_crossing_landing_pad if there are incoming EH edges
15670 from both partitions and exit the loop after one iteration.
15672 2018-05-08 Kelvin Nilsen <kelvin@gcc.gnu.org>
15675 * doc/extend.texi (PowerPC Built-in Functions): Rename this
15677 (Basic PowerPC Built-in Functions): The new name of the
15678 subsection previously known as "PowerPC Built-in Functions".
15679 (Basic PowerPC Built-in Functions Available on all Configurations):
15681 (Basic PowerPC Built-in Functions Available on ISA 2.05): New
15683 (Basic PowerPC Built-in Functions Available on ISA 2.06): New
15685 (Basic PowerPC Built-in Functions Available on ISA 2.07): New
15687 (Basic PowerPC Built-in Functions Available on ISA 3.0): New
15690 2018-05-08 Jim Wilson <jimw@sifive.com>
15692 * config/riscv/linux.h (MUSL_ABI_SUFFIX): Delete unnecessary backslash.
15693 (LD_EMUL_SUFFIX): New.
15694 (LINK_SPEC): Use it.
15696 2018-05-08 Kelvin Nilsen <kelvin@gcc.gnu.org>
15698 * doc/extend.texi (PowerPC Built-in Functions): Rename this
15700 (Basic PowerPC Built-in Functions): The new name of the
15701 subsection previously known as "PowerPC Built-in Functions".
15702 (Basic PowerPC Built-in Functions Available on all Configurations):
15704 (Basic PowerPC Built-in Functions Available on ISA 2.05): New
15706 (Basic PowerPC Built-in Functions Available on ISA 2.06): New
15708 (Basic PowerPC Built-in Functions Available on ISA 2.07): New
15710 (Basic PowerPC Built-in Functions Available on ISA 3.0): New
15713 2018-05-08 Jakub Jelinek <jakub@redhat.com>
15716 * config/i386/i386.md: Add peepholes for mem {+,-,&,|,^}= x; mem != 0
15717 after cmpelim optimization.
15719 2018-05-08 Olga Makhotina <olga.makhotina@intel.com>
15721 * config.gcc: Support "goldmont".
15722 * config/i386/driver-i386.c (host_detect_local_cpu): Detect "goldmont".
15723 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
15724 PROCESSOR_GOLDMONT.
15725 * config/i386/i386.c (m_GOLDMONT): Define.
15726 (processor_target_table): Add "goldmont".
15727 (PTA_GOLDMONT): Define.
15728 (ix86_lea_outperforms): Add TARGET_GOLDMONT.
15729 (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT.
15730 (fold_builtin_cpu): Add M_INTEL_GOLDMONT.
15731 (fold_builtin_cpu): Add "goldmont".
15732 (ix86_add_stmt_cost): Add TARGET_GOLDMONT.
15733 (ix86_option_override_internal): Add "goldmont".
15734 * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT.
15735 (processor_type): Add PROCESSOR_GOLDMONT.
15736 * config/i386/i386.md: Add CPU "glm".
15737 * config/i386/glm.md: New file.
15738 * config/i386/x86-tune.def: Add m_GOLDMONT.
15739 * doc/invoke.texi: Add goldmont as x86 -march=/-mtune= CPU type.
15741 2018-05-08 Jakub Jelinek <jakub@redhat.com>
15744 * config/i386/i386.c (ix86_expand_sse2_abs): Handle E_V2DImode and
15746 * config/i386/sse.md (abs<mode>2): Use VI_AVX2 iterator instead of
15747 VI1248_AVX512VL_AVX512BW. Handle V2DImode and V4DImode if not
15748 TARGET_AVX512VL using ix86_expand_sse2_abs. Formatting fixes.
15751 * config/i386/i386.c (ix86_fold_builtin): Handle
15752 IX86_BUILTIN_{,P}MOVMSK{PS,PD,B}{,128,256}.
15755 * config/i386/sse.md (ssequaterinsnmode): New mode attribute.
15756 (*<extract_type>_vinsert<shuffletype><extract_suf>_0): New pattern.
15758 2018-05-08 Richard Earnshaw <rearnsha@arm.com>
15761 * config/arm/parsecpu.awk (check_cpu): Fix operator precedence.
15762 (check_arch): Likewise.
15763 (check_fpu): Return the result rather than printing it.
15764 (end arch): Fix operator precedence.
15765 (end cpu): Likewise.
15766 (END): Print the result from check_fpu.
15768 2018-05-08 Richard Sandiford <richard.sandiford@linaro.org>
15769 Alan Hayward <alan.hayward@arm.com>
15770 David Sherwood <david.sherwood@arm.com>
15772 * config/aarch64/aarch64-sve.md (*pred_cmp<cmp_op><mode>_combine)
15773 (*pred_cmp<cmp_op><mode>, *fcm<cmp_op><mode>_and_combine)
15774 (*fcmuo<mode>_and_combine, *fcm<cmp_op><mode>_and)
15775 (*fcmuo<mode>_and): New patterns.
15777 2018-05-08 Richard Sandiford <richard.sandiford@linaro.org>
15779 * config/aarch64/iterators.md (UNSPEC_COND_LO, UNSPEC_COND_LS)
15780 (UNSPEC_COND_HI, UNSPEC_COND_HS, UNSPEC_COND_UO): Delete.
15781 (SVE_INT_CMP, SVE_FP_CMP): New code iterators.
15782 (cmp_op, sve_imm_con): New code attributes.
15783 (SVE_COND_INT_CMP, imm_con): Delete.
15784 (cmp_op): Remove above unspecs from int attribute.
15785 * config/aarch64/aarch64-sve.md (*vec_cmp<cmp_op>_<mode>): Rename
15787 (*cmp<cmp_op><mode>): ...this. Use UNSPEC_MERGE_PTRUE instead of
15788 comparison-specific unspecs.
15789 (*vec_cmp<cmp_op>_<mode>_ptest): Rename to...
15790 (*cmp<cmp_op><mode>_ptest): ...this and adjust likewise.
15791 (*vec_cmp<cmp_op>_<mode>_cc): Rename to...
15792 (*cmp<cmp_op><mode>_cc): ...this and adjust likewise.
15793 (*vec_fcm<cmp_op><mode>): Rename to...
15794 (*fcm<cmp_op><mode>): ...this and adjust likewise.
15795 (*vec_fcmuo<mode>): Rename to...
15796 (*fcmuo<mode>): ...this and adjust likewise.
15797 (*pred_fcm<cmp_op><mode>): New pattern.
15798 * config/aarch64/aarch64.c (aarch64_emit_unop, aarch64_emit_binop)
15799 (aarch64_emit_sve_ptrue_op, aarch64_emit_sve_ptrue_op_cc): New
15801 (aarch64_unspec_cond_code): Remove handling of LTU, GTU, LEU, GEU
15803 (aarch64_gen_unspec_cond, aarch64_emit_unspec_cond): Delete.
15804 (aarch64_emit_sve_predicated_cond): New function.
15805 (aarch64_expand_sve_vec_cmp_int): Use aarch64_emit_sve_ptrue_op_cc.
15806 (aarch64_emit_unspec_cond_or): Replace with...
15807 (aarch64_emit_sve_or_conds): ...this new function. Use
15808 aarch64_emit_sve_ptrue_op for the individual comparisons and
15809 aarch64_emit_binop to OR them together.
15810 (aarch64_emit_inverted_unspec_cond): Replace with...
15811 (aarch64_emit_sve_inverted_cond): ...this new function. Use
15812 aarch64_emit_sve_ptrue_op for the comparison and
15813 aarch64_emit_unop to invert the result.
15814 (aarch64_expand_sve_vec_cmp_float): Update after the above
15815 changes. Use aarch64_emit_sve_ptrue_op for native comparisons.
15817 2018-05-07 Nathan Sidwell <nathan@acm.org>
15819 * doc/invoke.texi (C++ Dialect Options): Remove -ffor-scope.
15820 * doc/extend.texi (Deprecated Features): Remove -fno-for-scope
15821 (Backwards Compatibility): Likewise.
15823 2018-05-07 Luis Machado <luis.machado@linaro.org>
15827 2018-05-07 Luis Machado <luis.machado@linaro.org>
15829 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
15830 <prefetch_dynamic_strides>: New const bool field.
15831 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
15832 prefetch_dynamic_strides.
15833 (exynosm1_prefetch_tune): Likewise.
15834 (thunderxt88_prefetch_tune): Likewise.
15835 (thunderx_prefetch_tune): Likewise.
15836 (thunderx2t99_prefetch_tune): Likewise.
15837 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
15839 (aarch64_override_options_internal): Update to set
15840 PARAM_PREFETCH_DYNAMIC_STRIDES.
15841 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
15842 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
15843 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
15844 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
15845 prefetch-dynamic-strides setting.
15847 2018-05-07 Luis Machado <luis.machado@linaro.org>
15849 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
15850 <minimum_stride>: New const int field.
15851 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
15852 minimum_stride field.
15853 (exynosm1_prefetch_tune): Likewise.
15854 (thunderxt88_prefetch_tune): Likewise.
15855 (thunderx_prefetch_tune): Likewise.
15856 (thunderx2t99_prefetch_tune): Likewise.
15857 (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
15858 (aarch64_override_options_internal): Update to set
15859 PARAM_PREFETCH_MINIMUM_STRIDE.
15860 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
15861 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
15862 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
15863 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
15864 stride is constant and is below the minimum stride threshold.
15866 2018-05-07 Luis Machado <luis.machado@linaro.org>
15868 * config/aarch64/aarch64.c (qdf24xx_prefetch_tune) <l2_cache_size>: Set
15871 2018-05-07 Luis Machado <luis.machado@linaro.org>
15873 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
15874 <prefetch_dynamic_strides>: New const bool field.
15875 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
15876 prefetch_dynamic_strides.
15877 (exynosm1_prefetch_tune): Likewise.
15878 (thunderxt88_prefetch_tune): Likewise.
15879 (thunderx_prefetch_tune): Likewise.
15880 (thunderx2t99_prefetch_tune): Likewise.
15881 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
15883 (aarch64_override_options_internal): Update to set
15884 PARAM_PREFETCH_DYNAMIC_STRIDES.
15885 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
15886 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
15887 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
15888 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
15889 prefetch-dynamic-strides setting.
15891 2018-05-07 Luis Machado <luis.machado@linaro.org>
15893 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
15894 <minimum_stride>: New const int field.
15895 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
15896 minimum_stride field.
15897 (exynosm1_prefetch_tune): Likewise.
15898 (thunderxt88_prefetch_tune): Likewise.
15899 (thunderx_prefetch_tune): Likewise.
15900 (thunderx2t99_prefetch_tune): Likewise.
15901 (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
15902 (aarch64_override_options_internal): Update to set
15903 PARAM_PREFETCH_MINIMUM_STRIDE.
15904 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
15905 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
15906 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
15907 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
15908 stride is constant and is below the minimum stride threshold.
15910 2018-05-06 Jakub Jelinek <jakub@redhat.com>
15913 * cfgexpand.c (expand_asm_stmt): Don't create a temporary if
15914 the type is addressable. Don't force op into register if it has
15917 2018-05-05 Roland McGrath <mcgrathr@google.com>
15920 * varasm.c (default_section_type_flags): Set SECTION_NOTYPE for
15921 any section for which we don't know a specific type it should have,
15922 regardless of name. Previously this was done only for the exact
15923 names ".init_array", ".fini_array", and ".preinit_array".
15924 (default_elf_asm_named_section): Add comment about
15925 relationship with default_section_type_flags and SECTION_NOTYPE.
15926 (get_section): Don't consider it a type conflict if one side has
15927 SECTION_NOTYPE and the other doesn't, as long as neither has the
15928 SECTION_BSS et al used in the default_section_type_flags logic.
15930 2018-05-05 Tom de Vries <tom@codesourcery.com>
15933 * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_3): Define.
15934 (workaround_barsyncs): New function.
15935 (nvptx_reorg): Use workaround_barsyncs.
15936 * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
15937 (define_expand "nvptx_membar_cta"): New define_expand.
15938 (define_insn "*nvptx_membar_cta"): New insn.
15940 2018-05-04 Pekka Jääskeläinen <pekka.jaaskelainen@parmance.com>
15942 * brig-builtins.def: Add consts to ptrs etc. in BRIG builtin defs.
15943 To improve optimization opportunities.
15944 * builtin-types.def: The new needed builtin types for the above.
15946 2018-05-04 Richard Biener <rguenther@suse.de>
15948 * bb-reorder.c (sanitize_hot_paths): Release hot_bbs_to_check.
15949 * gimple-ssa-store-merging.c
15950 (imm_store_chain_info::output_merged_store): Remove redundant create,
15951 release split_store vector contents on failure.
15952 * tree-vect-slp.c (vect_schedule_slp_instance): Avoid leaking
15953 scalar stmt vector on cache hit.
15955 2018-05-04 Segher Boessenkool <segher@kernel.crashing.org>
15957 * common/config/rs6000/rs6000-common.c (rs6000_handle_option): Remove
15959 * config.gcc (powerpc-xilinx-eabi*): Remove.
15960 * config/rs6000/predicates.md (easy_fp_constant): Remove Xilinx FP
15962 (fusion_addis_mem_combo_load): Ditto.
15963 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Remove Xilinx
15965 (rs6000_cpu_cpp_builtins): Ditto.
15966 * config/rs6000/rs6000-linux.c
15967 (rs6000_linux_float_exceptions_rounding_supported_p): Ditto.
15968 * config/rs6000/rs6000-opts.h (enum fpu_type_t): Delete.
15969 * config/rs6000/rs6000.c (rs6000_debug_reg_global): Remove Xilinx FP
15971 (rs6000_setup_reg_addr_masks): Ditto.
15972 (rs6000_init_hard_regno_mode_ok): Ditto.
15973 (rs6000_option_override_internal): Ditto.
15974 (legitimate_lo_sum_address_p): Ditto.
15975 (rs6000_legitimize_address): Ditto.
15976 (rs6000_legitimize_reload_address): Ditto.
15977 (rs6000_legitimate_address_p): Ditto.
15978 (abi_v4_pass_in_fpr): Ditto.
15979 (setup_incoming_varargs): Ditto.
15980 (rs6000_gimplify_va_arg): Ditto.
15981 (rs6000_split_multireg_move): Ditto.
15982 (rs6000_savres_strategy): Ditto.
15983 (rs6000_emit_prologue_components): Ditto.
15984 (rs6000_emit_epilogue_components): Ditto.
15985 (rs6000_emit_prologue): Ditto.
15986 (rs6000_emit_epilogue): Ditto.
15987 (rs6000_elf_file_end): Ditto.
15988 (rs6000_function_value): Ditto.
15989 (rs6000_libcall_value): Ditto.
15990 * config/rs6000/rs6000.h: Ditto.
15991 (TARGET_MINMAX_SF, TARGET_MINMAX_DF): Delete, merge to ...
15992 (TARGET_MINMAX): ... this. New.
15993 (TARGET_SF_FPR, TARGET_DF_FPR, TARGET_SF_INSN, TARGET_DF_INSN): Delete.
15994 * config/rs6000/rs6000.md: Remove Xilinx FP support.
15995 (*movsi_internal1_single): Delete.
15996 * config/rs6000/rs6000.opt (msingle-float, mdouble-float, msimple-fpu,
15997 mfpu=, mxilinx-fpu): Delete.
15998 * config/rs6000/singlefp.h: Delete.
15999 * config/rs6000/sysv4.h: Remove Xilinx FP support.
16000 * config/rs6000/t-rs6000: Ditto.
16001 * config/rs6000/t-xilinx: Delete.
16002 * config/rs6000/titan.md: Adjust for fp_type removal.
16003 * config/rs6000/vsx.md: Remove Xilinx FP support.
16004 (VStype_simple): Delete.
16005 (VSfptype_simple, VSfptype_mul, VSfptype_div, VSfptype_sqrt): Delete.
16006 * config/rs6000/xfpu.h: Delete.
16007 * config/rs6000/xfpu.md: Delete.
16008 * config/rs6000/xilinx.h: Delete.
16009 * config/rs6000/xilinx.opt: Delete.
16010 * doc/invoke.texi (RS/6000 and PowerPC Options): Remove
16011 -msingle-float, -mdouble-float, -msimple-fpu, -mfpu=, and -mxilinx-fpu.
16013 2018-05-04 Tom de Vries <tom@codesourcery.com>
16016 * builtins.c (expand_builtin_goacc_parlevel_id_size): Handle null target
16019 2018-05-04 Richard Biener <rguenther@suse.de>
16021 PR middle-end/85627
16022 * tree-complex.c (update_complex_assignment): We are always in SSA form.
16023 (expand_complex_div_wide): Likewise.
16024 (expand_complex_operations_1): Likewise.
16025 (expand_complex_libcall): Preserve EH info of the original stmt.
16026 (tree_lower_complex): Handle removed blocks.
16027 * tree.c (build_common_builtin_nodes): Do not set ECF_NOTRHOW
16028 on complex multiplication and division libcall builtins.
16030 2018-05-04 Richard Biener <rguenther@suse.de>
16032 PR middle-end/85574
16033 * fold-const.c (negate_expr_p): Restrict negation of operand
16034 zero of a division to when we know that can happen without
16036 (fold_negate_expr_1): Likewise.
16038 2018-05-04 Jakub Jelinek <jakub@redhat.com>
16041 * real.h (real_nextafter): Declare.
16042 * real.c (real_nextafter): New function.
16043 * fold-const-call.c (fold_const_nextafter): New function.
16044 (fold_const_call_sss): Call it for CASE_CFN_NEXTAFTER and
16045 CASE_CFN_NEXTTOWARD.
16046 (fold_const_call_1): For CASE_CFN_NEXTTOWARD call fold_const_call_sss
16047 even when arg1_mode is different from arg0_mode.
16049 2018-05-03 Nathan Sidwell <nathan@acm.org>
16051 * doc/extend.texi (Deprecated Features): Remove
16052 -ffriend-injection.
16053 (Backwards Compatibility): Likewise.
16054 * doc/invoke.texi (C++ Language Options): Likewise.
16055 (C++ Dialect Options): Likewise.
16057 2018-05-03 Jakub Jelinek <jakub@redhat.com>
16060 * config/i386/avx512fintrin.h (_mm512_mullox_epi64,
16061 _mm512_mask_mullox_epi64): New intrinsics.
16063 2018-05-03 Tom de Vries <tom@codesourcery.com>
16066 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
16067 dump files): Add offload-tree.
16069 2018-05-03 Richard Biener <rguenther@suse.de>
16071 PR tree-optimization/85615
16072 * tree-ssa-threadupdate.c (thread_block_1): Only allow exits
16073 to loops not nested in BBs loop father to avoid creating multi-entry
16076 2018-05-03 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
16078 PR tree-optimization/70291
16079 * tree-complex.c (expand_complex_libcall): Add type, inplace_p
16080 arguments. Change return type to tree. Emit libcall as a new
16081 statement rather than replacing existing one when inplace_p is true.
16082 (expand_complex_multiplication_components): New function.
16083 (expand_complex_multiplication): Expand floating-point complex
16084 multiplication using the above.
16085 (expand_complex_division): Rename inner_type parameter to type.
16086 Update expand_complex_libcall call-site.
16087 (expand_complex_operations_1): Update expand_complex_multiplication
16088 and expand_complex_division call-sites.
16090 2018-05-02 Jakub Jelinek <jakub@redhat.com>
16093 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
16094 *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
16095 *<shift_insn><dwi>3_doubleword_mask_1): In condition require that
16096 the highest significant bit of the shift count mask is clear. In
16097 check whether and[sq]i3 is needed verify that all significant bits
16098 of the shift count other than the highest are set.
16100 2018-05-02 Tom de Vries <tom@codesourcery.com>
16103 * builtins.def (DEF_GOACC_BUILTIN_ONLY): Define.
16104 * omp-builtins.def (BUILT_IN_GOACC_PARLEVEL_ID)
16105 (BUILT_IN_GOACC_PARLEVEL_SIZE): New builtin.
16106 * builtins.c (expand_builtin_goacc_parlevel_id_size): New function.
16107 (expand_builtin): Call expand_builtin_goacc_parlevel_id_size.
16108 * doc/extend.texi (Other Builtins): Add __builtin_goacc_parlevel_id and
16109 __builtin_goacc_parlevel_size.
16111 2018-05-02 Richard Biener <rguenther@suse.de>
16113 PR tree-optimization/85597
16114 * tree-vect-stmts.c (vectorizable_operation): For ternary SLP
16115 do not use split vect_get_vec_defs call but call vect_get_slp_defs
16118 2018-05-02 Tom de Vries <tom@codesourcery.com>
16121 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
16122 dump files): Add ltrans-tree.
16124 2018-05-02 Tom de Vries <tom@codesourcery.com>
16127 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
16128 dump files): Add wpa-ipa.
16130 2018-05-02 Segher Boessenkool <segher@kernel.crashing.org>
16132 * config.gcc (powerpc*-*-*): Remove paired.h. Unsupport the
16133 powerpc*-*-linux*paired* target.
16134 * config/rs6000/750cl.h: Delete.
16135 * config/rs6000/paired.h: Delete.
16136 * config/rs6000/paired.md: Delete.
16137 * config/rs6000/predicates.md (easy_vector_constant): Remove paired
16139 * config/rs6000/rs6000-builtin.def: Remove paired float support.
16140 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Update
16141 comment. Remove paired float support.
16142 * config/rs6000/rs6000-modes.def: Remove V2SF and V2SI.
16143 * config/rs6000/rs6000-opts.h (enum rs6000_vector): Delete
16145 * config/rs6000/rs6000-protos.h (paired_expand_vector_init,
16146 paired_emit_vector_cond_expr, paired_expand_vector_move): Delete
16148 * config/rs6000/rs6000.c: Remove paired float support.
16149 (paired_expand_vector_init, paired_expand_vector_move,
16150 paired_emit_vector_compare, paired_emit_vector_cond_expr,
16151 (paired_expand_lv_builtin, paired_expand_stv_builtin,
16152 paired_expand_builtin, paired_expand_predicate_builtin,
16153 paired_init_builtins): Delete.
16154 * config/rs6000/rs6000.h: Remove paired float support.
16155 * config/rs6000/rs6000.md: Remove paired float support.
16156 (move_from_CR_ov_bit): Delete.
16157 * config/rs6000/rs6000.opt (mpaired): Delete.
16158 * config/rs6000/t-rs6000: Remove paired.md from MD_INCLUDES.
16159 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mpaired.
16161 2018-05-02 Richard Biener <rguenther@suse.de>
16163 PR middle-end/85567
16164 * gimplify.c (gimplify_save_expr): When in SSA form allow
16165 SAVE_EXPRs to compute to SSA vars.
16167 2018-05-02 Jakub Jelinek <jakub@redhat.com>
16170 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
16171 *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
16172 *<shift_insn><dwi>3_doubleword_mask_1): If and[sq]i3 is needed, don't
16173 clobber operands[2], instead use a new pseudo. Formatting fixes.
16175 2018-05-02 Richard Sandiford <richard.sandiford@linaro.org>
16177 PR tree-optimization/85586
16178 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence): Only
16179 exit early for statements in the same group if the accesses are
16182 2018-05-02 Tom de Vries <tom@codesourcery.com>
16185 * lto-wrapper.c (compile_offload_image): Add "could not find mkoffload"
16188 2018-05-01 Marc Glisse <marc.glisse@inria.fr>
16190 PR tree-optimization/85143
16191 * match.pd (A<B&A<C): Extend to BIT_IOR_EXPR.
16193 2018-05-01 Tom de Vries <tom@codesourcery.com>
16196 * config/nvptx/mkoffload.c (main): Suggest using -B in "offload compiler
16197 not found" error message.
16199 2018-05-01 Tom de Vries <tom@codesourcery.com>
16202 * vec.h (VEC_ORDERED_REMOVE_IF, VEC_ORDERED_REMOVE_IF_FROM_TO): Define.
16203 * vec.c (test_ordered_remove_if): New function.
16204 (vec_c_tests): Call test_ordered_remove_if.
16205 * dwarf2cfi.c (connect_traces): Use VEC_ORDERED_REMOVE_IF_FROM_TO.
16206 * lto-streamer-out.c (prune_offload_funcs): Use VEC_ORDERED_REMOVE_IF.
16207 * tree-vect-patterns.c (vect_pattern_recog_1): Use
16208 VEC_ORDERED_REMOVE_IF.
16210 2018-05-01 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
16212 PR tree-optimization/82665
16213 * vr-values.c (vr_values::extract_range_from_binary_expr): Handle
16214 pointer subtraction where arguments come from a memchr call.
16216 2018-05-01 Jakub Jelinek <jakub@redhat.com>
16218 * configure.ac (LD_AS_NEEDED_OPTION, LD_NO_AS_NEEDED_OPTION): Use
16219 --push-state --as-needed and --pop-state instead of --as-needed and
16220 --no-as-needed if ld supports it.
16221 * configure: Regenerated.
16224 * doc/install.texi2html: Replace _002d with - and _002a with * in
16225 generated html files using sed.
16227 2018-04-30 David Malcolm <dmalcolm@redhat.com>
16230 * gcc-rich-location.c (blank_line_before_p): New function.
16231 (use_new_line): New function.
16232 (gcc_rich_location::add_fixit_insert_formatted): New function.
16233 * gcc-rich-location.h
16234 (gcc_rich_location::add_fixit_insert_formatted): New function.
16236 2018-04-30 David Malcolm <dmalcolm@redhat.com>
16238 * selftest.c (assert_streq): Rename "expected" and "actual" to
16239 "val1" and "val2". Extend NULL-handling to cover both inputs
16240 symmetrically, while still requiring both to be non-NULL for a pass.
16241 * selftest.h (assert_streq): Rename "expected" and "actual" to
16243 (ASSERT_EQ): Likewise.
16244 (ASSERT_EQ_AT): Likewise.
16245 (ASSERT_KNOWN_EQ): Likewise.
16246 (ASSERT_KNOWN_EQ_AT): Likewise.
16247 (ASSERT_NE): Likewise.
16248 (ASSERT_MAYBE_NE): Likewise.
16249 (ASSERT_MAYBE_NE_AT): Likewise.
16250 (ASSERT_STREQ): Likewise. Clarify that both must be non-NULL for
16251 the assertion to pass.
16252 (ASSERT_STREQ_AT): Likewise.
16254 2018-04-30 Jonathan Wakely <jwakely@redhat.com>
16256 * doc/invoke.texi (-fpie, -fPIE): Fix grammar and clarify
16257 interaction with -pie.
16259 2018-04-30 David Malcolm <dmalcolm@redhat.com>
16261 * selftest.h: Fix alphabetization of per-source-file selftest
16264 2018-04-30 Jason Merrill <jason@redhat.com>
16266 PR c++/61982 - dead stores to destroyed objects.
16267 * gimplify.c (gimplify_modify_expr): Simplify complex lvalue on LHS
16270 2018-04-30 Jason Merrill <jason@redhat.com>
16272 * tree.c (build_clobber): New.
16273 * tree.h: Declare it.
16274 * gimplify.c (gimplify_bind_expr, gimplify_target_expr): Use it.
16276 2018-04-30 David Malcolm <dmalcolm@redhat.com>
16278 * diagnostic-show-locus.c (layout::layout): Update for
16279 location_get_source_line returning a char_span.
16280 (struct char_span): Move to input.h.
16281 (struct correction): Update for fields in char_span becoming
16283 (struct source_line): Update for location_get_source_line
16284 returning a char_span.
16285 (layout::print_line): Likewise.
16286 * edit-context.c (edited_file::print_content): Likewise.
16287 (edited_file::print_diff_hunk): Likewise.
16288 (edited_file::print_run_of_changed_lines): Likewise.
16289 (edited_file::get_num_lines): Likewise.
16290 (edited_line::edited_line): Likewise.
16291 * final.c (asm_show_source): Likewise.
16292 * input.c (location_get_source_line): Convert return type
16293 from const char * to char_span, losing the final "line_len"
16295 (dump_location_info): Update for the above.
16296 (get_substring_ranges_for_loc): Likewise. Use a char_span
16297 when handling the literal within the line.
16298 (test_reading_source_line): Update for location_get_source_line
16299 returning a char_span.
16300 * input.h (class char_span): Move here from
16301 diagnostic-show-locus.c, converting from a struct to a class.
16302 Make data members private.
16303 (char_span::operator bool): New.
16304 (char_span::length): New.
16305 (char_span::get_buffer): New.
16306 (char_span::operator[]): New.
16307 (char_span::subspan): Make const.
16308 (char_span::xstrdup): New.
16309 (location_get_source_line): Convert return type from const char *
16310 to char_span, losing the final "line_size" param.
16312 2018-04-30 Jan Hubicka <jh@suse.cz>
16314 * lto-wrapper.c (ltrans_priorities): New static var.
16315 (cmp_priority): New.
16316 (run_gcc): Read priorities and if doing parallel build order
16317 the Makefile by them.
16319 2018-04-30 David Malcolm <dmalcolm@redhat.com>
16321 * input.h (builtins_location_check): Convert to a STATIC_ASSERT.
16323 2018-04-30 Richard Biener <rguenther@suse.de>
16325 * tree-cfg.c (verify_address): Remove base argument, add
16326 flag whether to check TREE_ADDRESSABLE and do that.
16327 (verify_expr): Remove.
16328 (verify_types_in_gimple_reference): Add pieces from verify_expr.
16329 (verify_gimple_assign_single): Likewise.
16330 (verify_gimple_switch): Likewise.
16331 (verify_expr_location_1): Dereference tp once. Add (disabled)
16332 piece from verify_expr.
16333 (verify_gimple_in_cfg): Do not call verify_expr on all ops.
16335 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
16337 * config/arc/linux.h (CLEAR_INSN_CACHE): Define.
16339 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
16341 * config/arc/arc-protos.h (prepare_extend_operands): Remove.
16342 (small_data_pattern): Likewise.
16343 (arc_rewrite_small_data): Likewise.
16344 * config/arc/arc.c (LEGITIMATE_SMALL_DATA_OFFSET_P): Remove.
16345 (LEGITIMATE_SMALL_DATA_ADDRESS_P): Likewise.
16346 (get_symbol_alignment): New function.
16347 (legitimate_small_data_address_p): Likewise.
16348 (legitimate_scaled_address): Update, call
16349 legitimate_small_data_address_p.
16350 (output_sdata): New static variable.
16351 (arc_print_operand): Update how we handle small data operands.
16352 (arc_print_operand_address): Likewise.
16353 (arc_legitimate_address_p): Update, use
16354 legitimate_small_data_address_p.
16355 (arc_rewrite_small_data_p): Remove.
16356 (arc_rewrite_small_data_1): Likewise.
16357 (arc_rewrite_small_data): Likewise.
16358 (small_data_pattern): Likewise.
16359 (compact_sda_memory_operand): Update to use
16360 legitimate_small_data_address_p and get_symbol_alignment.
16361 (prepare_move_operands): Don't rewite sdata pattern.
16362 (prepare_extend_operands): Remove.
16363 * config/arc/arc.md (zero_extendqihi2): Don't rewrite sdata
16365 (zero_extendqisi2): Likewise.
16366 (zero_extendhisi2): Likewise.
16367 (extendqihi2): Likewise.
16368 (extendqisi2): Likewise.
16369 (extendhisi2): Likewise.
16370 (addsi3): Likewise.
16371 (subsi3): Likewise.
16372 (andsi3): Likewise.
16373 * config/arc/constraints.md (Usd): Change it to memory constraint.
16375 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
16377 * config/arc/arc.c (arc_split_move): Allow signed 6-bit constants
16378 as source of std instructions.
16379 * config/arc/arc.md (movsi_insn): Update pattern predicate to
16380 allow 6-bit constants as source for store instructions.
16381 (movdi_insn): Update instruction pattern to allow 6-bit constants
16382 as source for store instructions.
16384 2018-04-30 Jonathan Wakely <jwakely@redhat.com>
16386 * doc/invoke.texi (-fdebug-types-section): Fix grammar.
16388 2018-04-30 Nathan Sidwell <nathan@acm.org>
16389 Sandra Loosemore <sandra@codesourcery.com>
16391 * dumpfile.c (dump_open): Allow '-' for stdout.
16392 * doc/invoke.texi (Developer Options): Document dump filename
16393 determination early. Document stdin/stdout selection.
16395 2018-04-30 Andrew Sadek <andrew.sadek.se@gmail.com>
16397 Microblaze Target: PIC data text relative
16399 * config/microblaze/microblaze.opt: add new option -mpic-data-text-rel.
16400 * config/microblaze/microblaze-protos.h (microblaze_constant_address_p):
16402 * config/microblaze/microblaze.h (microblaze_constant_address_p):
16403 CONSTANT_ADDRESS_P definition to microblaze_constant_address_p.
16404 * config/microblaze/microblaze.c (TARGET_PIC_DATA_TEXT_REL):
16405 New addressing mode for data-text relative position indepenedent code.
16406 (microblaze_classify_unspec): add 'UNSPEC_TEXT' case ->
16407 'ADDRESS_SYMBOLIC_TXT_REL'.
16408 (microblaze_classify_address): Add handling for UNSPEC + CONST_INT.
16409 (microblaze_legitimate_pic_operand): Exclude function calls from
16410 pic operands in case of TARGET_PIC_DATA_TEXT_REL option.
16411 (microblaze_legitimize_address): Generate 'UNSPEC_TEXT' for all possible
16413 (microblaze_address_insns): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
16414 (print_operand): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
16415 (print_operand_address): Add 'ADDRESS_SYMBOLIC_TXT_REL' case + handling
16416 for 'address + offset'.
16417 (microblaze_expand_prologue): Add new function prologue call for
16419 (microblaze_asm_generate_pic_addr_dif_vec): Override new target hook
16420 'TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC' to disable address diff vector
16421 table in case of TARGET_PIC_DATA_TEXT_REL.
16422 (expand_pic_symbol_ref): Add handling for 'UNSPEC_TEXT'.
16423 * config/microblaze/microblaze.md (TARGET_PIC_DATA_TEXT_REL):
16424 Add new macros 'UNSPEC_TEXT',
16425 'UNSPEC_SET_TEXT' + add rule for setting r20 in function prologue
16426 + exclude function calls from 'UNSPEC_PLT' in case of data text
16428 * doc/tm.texi.in (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
16429 new target hook for generating address diff vector tables in case of
16431 * doc/tm.texi : Regenerate.
16432 * stmt.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Append new condition
16433 'targetm.asm_out.generate_pic_addr_diff_vec' to flag_pic in case
16434 of addr diff vector generation.
16435 * target.def (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
16436 target hook definition.
16437 * targhooks.h, targhooks.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC):
16438 Add default function for generate_pic_addr_diff_vec -> flag_pic.
16439 * doc/invoke.texi (Add new pic option): Add new microblaze pic
16440 option for data text relative.
16442 2018-04-30 Richard Biener <rguenther@suse.de>
16444 * tree-chrec.h (evolution_function_is_constant_p): Remove
16446 * tree-cfg.c (tree_node_can_be_shared): Re-order checks.
16448 2018-04-30 Richard Biener <rguenther@suse.de>
16451 * dwarf2out.c (gen_producer_string): Ignore -fchecking[=].
16453 2018-04-30 Richard Biener <rguenther@suse.de>
16455 PR tree-optimization/28364
16456 PR tree-optimization/85275
16457 * tree-ssa-loop-ch.c (ch_base::copy_headers): Stop after
16458 copying first exit test.
16460 2018-04-28 Mark Wielaard <mark@klomp.org>
16462 * dwarf2out.c (dwarf2out_finish): Add .debug_addr table header for
16463 dwarf_version >= 5.
16464 (dwarf_AT): Handle DW_AT_addr_base.
16465 (add_top_level_skeleton_die_attrs): Use dwarf_AT for DW_AT_addr_base.
16467 2018-04-28 Uros Bizjak <ubizjak@gmail.com>
16470 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask): New pattern.
16471 (*ashl<dwi>3_doubleword_mask_1): Ditto.
16472 (*<shift_insn><dwi>3_doubleword_mask): Ditto.
16473 (*<shift_insn><dwi>3_doubleword_mask_1): Ditto.
16475 2018-04-28 Richard Biener <rguenther@suse.de>
16477 * tree-cfg.c (verify_gimple_phi): Take a gphi * argument.
16478 (verify_gimple_in_cfg): Rename visited_stmts to visited_throwing_stmts
16479 to reflect use. Only add interesting stmts.
16481 2018-04-27 Martin Jambor <mjambor@suse.cz>
16484 * ipa-cp.c (find_aggregate_values_for_callers_subset): Make sure
16485 the jump function allows for passing through aggregate values.
16487 2018-04-27 David Malcolm <dmalcolm@redhat.com>
16489 * input.h (in_system_header_at): Convert from macro to inline
16491 (from_macro_expansion_at): Likewise.
16492 (from_macro_definition_at): Likewise.
16494 2018-04-27 Jeff Law <law@redhat.com>
16496 * config.gcc: Mark tile* targets as deprecated/obsolete.
16498 2018-04-27 Richard Biener <rguenther@suse.de>
16500 * config/aarch64/aarch64.c: Simplify ap.__stack advance and
16503 2018-04-27 Richard Biener <rguenther@suse.de>
16505 * tree-cfg.c (verify_expr): Make dead code hit gcc_unreachable.
16507 2018-04-27 Uros Bizjak <ubizjak@gmail.com>
16509 * config/i386/i386.md (*movti_internal): Substitute Ye constraint
16510 with Yd constraint. Set "preferred_for_speed" attribute from
16511 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for alternatives
16512 with Yd constraint.
16513 (*movdi_internal): Ditto.
16514 (movti_interunit splitters): Remove
16515 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC from insn condition.
16516 (movdi_interunit splitters): Ditto.
16517 * config/i386/constraints.md (Ye): Remove.
16518 (Yd): Do not depend on TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC.
16520 2018-04-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
16523 * config/aarch64/constraints.md (Usg): Limit to 31.
16524 (Usj): Limit to 63.
16526 2018-04-27 Jakub Jelinek <jakub@redhat.com>
16528 PR tree-optimization/85529
16529 * tree-ssa-reassoc.c (optimize_range_tests_var_bound): Add FIRST_BB
16530 argument. Don't call get_nonzero_bits if opcode is ERROR_MARK_NODE,
16531 rhs2 def stmt's bb is dominated by first_bb and it isn't an obvious
16532 zero extension or masking of the MSB bit.
16533 (optimize_range_tests): Add FIRST_BB argument, pass it through
16534 to optimize_range_tests_var_bound.
16535 (maybe_optimize_range_tests, reassociate_bb): Adjust
16536 optimize_range_tests callers.
16538 2018-04-26 Richard Biener <rguenther@suse.de>
16539 Jakub Jelinek <jakub@redhat.com>
16541 * cgraph.h (symbol_table): Just declare debug method here.
16542 * symtab.c (symbol_table::debug): Define.
16544 2018-04-26 Eric Botcazou <ebotcazou@adacore.com>
16546 * loop-invariant.c (may_assign_reg_p): Return false for frame pointer.
16548 2018-04-26 Uros Bizjak <ubizjak@gmail.com>
16550 * config/i386/i386.md ("isa" attribute): Add x64_sse2.
16551 ("enabled" attribute): Handle x64_sse2 "isa" attribute.
16552 (*movdi_internal): Substitute Yi and Yj constraint with x
16553 and Ym and Yn constraint with y constraint. Update "isa"
16554 attribute and set "preferred_for_speed" attribute from
16555 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for updated alternatives.
16556 (*movsi_internal): Ditto.
16557 (*movdf_internal): Ditto.
16558 (*movsf_internal): Ditto.
16559 (*zero_extendsidi2): Ditto.
16560 * config/i386/sse.md (vec_set<mode>_0): Ditto.
16561 (sse2_loadld): Ditto.
16562 (*vec_extract<ssevecmodelower>_0): Ditto.
16563 (*vec_extractv4si_0_zext_sse4): Ditto.
16564 (vec_concatv2di): Ditto.
16565 (*vec_dup<mode>): Ditto.
16566 * config/i386/mmx.md (*mov<mode>_internal): Ditto.
16567 * config/i386/constraints.md (Yi): Remove.
16572 2018-04-26 Nathan Sidwell <nathan@acm.org>
16574 * dumpfile.c (dump_open): New.
16575 (dump_open_alternate_stream, dump_start, dump_begin): Call it.
16576 (dump_finish): Detect stdio/stderr by value not name.
16578 2018-04-26 Jonathan Wakely <jwakely@redhat.com>
16580 * doc/invoke.texi (-Wreturn-type): Document default status for C++.
16582 2018-04-26 Tom de Vries <tom@codesourcery.com>
16585 * config/nvptx/nvptx.c (verify_neutering_jumps)
16586 (verify_neutering_labels): New function
16587 (nvptx_single): Use verify_neutering_jumps and verify_neutering_labels.
16589 2018-04-26 Tom de Vries <tom@codesourcery.com>
16592 * config/nvptx/nvptx.c (needs_neutering_p): New function.
16593 (nvptx_single): Use needs_neutering_p to skip over insns that do not
16596 2018-04-26 Richard Biener <rguenther@suse.de>
16597 Tom de Vries <tom@codesourcery.com>
16600 * lto-streamer-out.c (output_function): Fixup loops if required to match
16601 discovery done in the reader.
16603 2018-04-26 Richard Biener <rguenther@suse.de>
16605 PR tree-optimization/85116
16606 * tree-ssa-loop-ch.c (do_while_loop_p): A do-while loop should
16607 have a loop exit from the single latch predecessor. Remove
16608 case of header with just condition.
16609 (ch_base::copy_headers): Exclude infinite loops from any
16611 (pass_ch::execute): Record exits.
16613 2018-04-26 Richard Biener <rguenther@suse.de>
16615 * tree-vect-data-refs.c (vect_get_data_access_cost): Get
16616 prologue cost vector and pass it to vect_get_load_cost.
16617 (vect_get_peeling_costs_all_drs): Likewise.
16618 (vect_peeling_hash_get_lowest_cost): Likewise.
16619 (vect_enhance_data_refs_alignment): Likewise.
16621 2018-04-26 Richard Biener <rguenther@suse.de>
16623 PR middle-end/85450
16624 * tree-cfg.c (verify_gimple_assign_unary): Restore proper
16625 checking of integer<->pointer conversions.
16626 * omp-expand.c (expand_omp_for_static_nochunk): Avoid
16627 sign-/zero-extending pointer types.
16628 (expand_omp_for_static_chunk): Likewise.
16630 2018-03-22 Hans-Peter Nilsson <hp@axis.com>
16631 Jean Lee <xiaoyur347@gmail.com>
16633 * config/mips/mips.c (mips_asan_shadow_offset): New function.
16634 (TARGET_ASAN_SHADOW_OFFSET): Define.
16635 * config/mips/mips.h (FRAME_GROWS_DOWNWARD): Augment to also be
16636 true for -fsanitize=address.
16638 2018-04-25 Mark Wielaard <mark@klomp.org>
16640 * dwarf2out.c (file_info_cmp): Sort longer dir prefixes before
16643 2018-04-25 Jakub Jelinek <jakub@redhat.com>
16645 * config/i386/i386.md (*x86_mov<mode>cc_0_m1): Use type "alu1" rather
16646 than "alu", remove explicit "memory" and "imm_disp" attributes.
16647 (*x86_mov<mode>cc_0_m1_se, *x86_mov<mode>cc_0_m1_neg): Likewise.
16649 PR middle-end/85414
16650 * simplify-rtx.c (simplify_unary_operation_1) <case SIGN_EXTEND,
16651 case ZERO_EXTEND>: Pass SUBREG_REG (op) rather than op to
16652 gen_lowpart_no_emit.
16654 2018-04-25 Sebastian Peryt <sebastian.peryt@intel.com>
16657 * config/i386/i386.c (ix86_expand_builtin): Change memory
16658 operand to XI, extend p0 to Pmode.
16659 * config/i386/i386.md: Change unspec volatile and operand
16660 1 mode to XI, change operand 0 mode to P.
16662 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
16664 * config/nds32/nds32-predicates.c (nds32_can_use_bclr_p): Mask with
16665 GET_MODE_MASK before any checking.
16666 (nds32_can_use_bset_p): Likewise.
16667 (nds32_can_use_btgl_p): Likewise.
16669 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
16671 * config/nds32/nds32-doubleword.md: New define_split pattern for
16672 illegal register number.
16674 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
16676 * config/nds32/nds32.c (nds32_print_operand): Set op_value ealier.
16678 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
16680 * config/nds32/nds32.h (ASM_APP_ON): Add missing newline character.
16682 2018-04-25 Richard Biener <rguenther@suse.de>
16684 * lto-streamer.h (LTO_major_version): Bump to 8.
16686 2018-04-25 Jakub Jelinek <jakub@redhat.com>
16688 * BASE-VER: Set to 9.0.0.
16690 2018-04-24 Segher Boessenkool <segher@kernel.crashing.org>
16692 * config/rs6000/rs6000.c (init_float128_ieee): Fix spelling mistakes
16693 in __abskf2 and __powikf2.
16695 2018-04-24 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
16698 * config/aarch64/constraints.md (Usg, Usj): New constraints.
16699 * config/aarch64/iterators.md (cmode_simd): New mode attribute.
16700 * config/aarch64/aarch64.md (*aarch64_ashr_sisd_or_int_<mode>3):
16701 Use the above on operand 2. Reindent.
16702 (*aarch64_lshr_sisd_or_int_<mode>3): Likewise.
16704 2018-04-24 H.J. Lu <hongjiu.lu@intel.com>
16707 * common/config/i386/i386-common.c (ix86_handle_option): Don't
16709 * config/i386/i386.opt (mcet): Removed.
16710 * doc/install.texi: Remove -mcet documentation.
16711 * doc/invoke.texi: Likewise.
16713 2018-04-24 H.J. Lu <hongjiu.lu@intel.com>
16716 * doc/install.texi: Remove -mcet from bootstrap-cet.
16718 2018-04-24 Jakub Jelinek <jakub@redhat.com>
16721 * config/i386/i386.c (ix86_init_mmx_sse_builtins): Don't define
16722 __builtin_ia32_readeflags_u32 and __builtin_ia32_writeeflags_u32
16726 * config/rs6000/rs6000-p8swap.c (const_load_sequence_p): Punt if
16727 const_vector is not CONST_VECTOR or SYMBOL_REF for a constant pool
16728 containing a CONST_VECTOR.
16730 2018-04-24 Cesar Philippidis <cesar@codesourcery.com>
16732 * doc/install.texi: Update newlib dependency for nvptx.
16734 2018-04-24 Jakub Jelinek <jakub@redhat.com>
16737 * config/i386/i386.c (ix86_expand_vector_init_one_var): Use UINTVAL
16738 instead of INTVAL when shifting x left.
16740 2018-04-24 Andreas Krebbel <krebbel@linux.ibm.com>
16742 PR tree-optimization/85478
16743 * tree-vect-loop.c (vect_analyze_loop_2): Do not call
16744 vect_grouped_store_supported for single element vectors.
16746 2018-04-24 Richard Biener <rguenther@suse.de>
16749 * config/i386/i386.c (ix86_add_stmt_cost): Restrict strided
16750 load cost increase to the case of non-constant step.
16752 2018-04-24 Jakub Jelinek <jakub@redhat.com>
16755 * reg-stack.c (move_for_stack_reg): Don't fail assertion about dead
16756 destination if any_malformed_asm.
16758 2018-04-23 Eric Botcazou <ebotcazou@adacore.com>
16760 PR middle-end/85496
16761 * expr.c (store_field): In the bitfield case, if the value comes from
16762 a function call and is returned in registers by means of a PARALLEL,
16763 do not change the mode of the temporary unless BLKmode and VOIDmode.
16765 2018-04-23 Andrey Belevantsev <abel@ispras.ru>
16767 PR rtl-optimization/85423
16768 * sel-sched-ir.c (has_dependence_note_mem_dep): Only discard
16769 dependencies to debug insns when the previous insn is non-debug.
16771 2018-04-23 Claudiu Zissulescu <claziss@synopsys.com>
16773 * config/arc/arc.md ("vunspec"): Delete it, unify all the unspec
16774 enums into a single definition.
16775 (fls): Fix predicates and printing.
16778 2018-04-23 Claudiu Zissulescu <claziss@synopsys.com>
16780 * config/arc/arc-protos.h (check_if_valid_sleep_operand): Remove.
16781 * config/arc/arc.c (arc_expand_builtin): Sleep accepts registers
16782 and short u6 immediate.
16783 (check_if_valid_sleep_operand): Remove.
16784 * config/arc/arc.md (Sleep): Accepts registers and u6 immediates.
16786 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
16788 * config/nds32/nds32.c (nds32_compute_stack_frame): Consider
16789 flag_always_save_lp condition.
16790 * config/nds32/nds32.opt (malways-save-lp): New option.
16792 2018-04-22 Shiva Chen <shiva0217@gmail.com>
16794 * config/nds32/nds32-protos.h (nds32_use_load_post_increment): Declare.
16795 * config/nds32/nds32.c (nds32_use_load_post_increment): New.
16796 * config/nds32/nds32.h
16797 (USE_LOAD_POST_INCREMENT, USE_LOAD_POST_DECREMENT): Define.
16798 (USE_STORE_POST_INCREMENT, USE_STORE_POST_DECREMENT): Define.
16800 2018-04-22 Shiva Chen <shiva0217@gmail.com>
16802 * config/nds32/nds32-protos.h (nds32_ls_333_p): Remove.
16803 * config/nds32/nds32.c (nds32_ls_333_p): Remove.
16805 2018-04-22 Shiva Chen <shiva0217@gmail.com>
16806 Chung-Ju Wu <jasonwucj@gmail.com>
16808 * config/nds32/nds32-protos.h (nds32_case_vector_shorten_mode):
16810 * config/nds32/nds32.c (nds32_case_vector_shorten_mode): New function.
16811 * config/nds32/nds32.h (CASE_VECTOR_SHORTEN_MODE): Modify.
16813 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
16815 * config/nds32/nds32.c (nds32_compute_stack_frame): Fix wrong value.
16817 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
16819 * config/nds32/nds32-protos.h (nds32_data_alignment,
16820 nds32_local_alignment): Declare.
16821 * config/nds32/nds32.c (nds32_data_alignment, nds32_constant_alignment,
16822 nds32_local_alignment): New functions.
16823 (TARGET_CONSTANT_ALIGNMENT): Define.
16824 * config/nds32/nds32.h (DATA_ALIGNMENT, LOCAL_ALIGNMENT): Define.
16826 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
16828 * config/nds32/nds32.c
16829 (TARGET_HARD_REGNO_MODE_OK): Move to the bottom of file.
16830 (TARGET_MODES_TIEABLE_P): Likewise.
16832 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
16834 * config/nds32/nds32.c (nds32_asm_file_start): Display optimization
16835 level Ofast and Og.
16837 2018-04-22 Monk Chiang <sh.chiang04@gmail.com>
16838 Chung-Ju Wu <jasonwucj@gmail.com>
16840 * config/nds32/constants.md (unspec_volatile_element): Add enum values
16841 for unaligned access.
16842 * config/nds32/nds32-intrinsic.c: Implementation of expanding
16844 * config/nds32/nds32-intrinsic.md: Likewise.
16845 * config/nds32/nds32_intrinsic.h: Likewise.
16846 * config/nds32/nds32.h (nds32_builtins): Likewise.
16847 * config/nds32/nds32.opt (munaligned-access): New option.
16848 * config/nds32/nds32.c (nds32_asm_file_start): Display
16849 flag_unaligned_access status.
16851 2018-04-20 Kito Cheng <kito.cheng@gmail.com>
16853 * config/riscv/elf.h (LINK_SPEC): Pass --no-relax if
16854 -mno-relax is present.
16855 * config/riscv/linux.h (LINK_SPEC): Ditto.
16857 2018-04-20 Martin Sebor <msebor@redhat.com>
16860 * gimple-fold.c (gimple_fold_builtin_strcpy): Suppress -Wrestrict
16862 (gimple_fold_builtin_stxcpy_chk): Same.
16863 * gimple-ssa-warn-restrict.c (check_bounds_or_overlap): Same.
16865 2018-04-20 Michael Meissner <meissner@linux.ibm.com>
16868 * config/rs6000/rs6000.c (init_float128_ieee): Add support to call
16869 __powikf2 when long double is IEEE 128-bit.
16871 2018-04-20 Kito Cheng <kito.cheng@gmail.com>
16873 * config/riscv/riscv.c (riscv_first_stack_step): Round up min
16874 step to make sure stack always aligned.
16876 2018-04-20 Carl Love <cel@us.ibm.com>
16879 * config/rs6000/rs6000-c.c (rs6000_gimple_fold_builtin): Add
16880 size check for arg0.
16882 2018-04-20 Nathan Sidwell <nathan@codesourcery.com>
16883 Tom de Vries <tom@codesourcery.com>
16886 * config/nvptx/nvptx.c (nvptx_emit_forking, nvptx_emit_joining):
16887 Emit insns for calls too.
16888 (nvptx_find_par): Always look for worker-level predecessor insn.
16889 (nvptx_propagate): Add is_call parm, return bool. Copy frame for
16891 (nvptx_vpropagate, nvptx_wpropagate): Adjust.
16892 (nvptx_process_pars): Propagate frames for calls.
16894 2018-04-20 H.J. Lu <hongjiu.lu@intel.com>
16897 * common/config/i386/i386-common.c (OPTION_MASK_ISA_IBT_SET):
16899 (OPTION_MASK_ISA_IBT_UNSET): Likewise.
16900 (ix86_handle_option): Don't handle OPT_mibt.
16901 * config/i386/cet.h: Check __CET__ instead of __IBT__ and
16903 * config/i386/driver-i386.c (host_detect_local_cpu): Remove
16905 * config/i386/i386-c.c (ix86_target_macros_internal): Don't
16906 check OPTION_MASK_ISA_IBT nor flag_cf_protection.
16907 (ix86_target_macros): Define __CET__ with flag_cf_protection
16908 for -fcf-protection.
16909 * config/i386/i386.c (isa2_opts): Remove -mibt.
16910 * config/i386/i386.h (TARGET_IBT): Removed.
16911 (TARGET_IBT_P): Likewise.
16912 (ix86_valid_target_attribute_inner_p): Don't check OPT_mibt.
16913 * config/i386/i386.md (nop_endbr): Don't check TARGET_IBT.
16914 * config/i386/i386.opt (mcet): Update help message.
16915 (mshstk): Likewise.
16917 * doc/invoke.texi: Remove -mibt. Document __CET__. Document
16918 -mcet as an alias for -mshstk.
16920 2018-04-20 Richard Biener <rguenther@suse.de>
16922 PR middle-end/85475
16923 * match.pd ((X * CST) * Y -> (X * Y) * CST): Avoid exponential
16924 complexity by forcing a single use of the multiply operand.
16926 2018-04-20 Martin Jambor <mjambor@suse.cz>
16929 * ipa-cp.c (cgraph_edge_brings_value_p): Move check for self-feeding
16930 recursion dependency to only apply to non-clones.
16932 2018-04-20 Martin Jambor <mjambor@suse.cz>
16935 * ipa-cp.c (create_specialized_node): Check that clones of
16936 self-recursive edges exist during IPA-CP.
16938 2018-04-19 Toon Moene <toon@moene.org>
16940 * doc/invoke.texi: Add -floop-unroll-and-jam to options enabled
16943 2018-04-19 Jakub Jelinek <jakub@redhat.com>
16945 PR tree-optimization/85467
16946 * fold-const.c (fold_ternary_loc) <case BIT_FIELD_REF>: Use
16947 VECTOR_TYPE_P macro. If type is vector type, VIEW_CONVERT_EXPR the
16948 VECTOR_CST element to type.
16950 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
16953 * config/i386/i386.h (STACK_SAVEAREA_MODE): New.
16954 * config/i386/i386.md (builtin_setjmp_setup): Removed.
16955 (builtin_longjmp): Likewise.
16956 (save_stack_nonlocal): New pattern.
16957 (restore_stack_nonlocal): Likewise.
16959 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
16962 * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
16963 Replace ASM_OUTPUT_LABEL with fprintf.
16965 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
16968 * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
16969 Check flag_cf_protection instead of TARGET_IBT and TARGET_SHSTK.
16970 * config/i386/i386-c.c (ix86_target_macros_internal): Also
16971 define __IBT__ and __SHSTK__ for -fcf-protection.
16972 * config/i386/i386.c (pass_insert_endbranch::gate): Don't check
16974 (ix86_trampoline_init): Likewise.
16975 (x86_output_mi_thunk): Likewise.
16976 (ix86_notrack_prefixed_insn_p): Likewise.
16977 (ix86_option_override_internal): Don't disallow -fcf-protection.
16978 * config/i386/i386.md (rdssp<mode>): Also enable for
16980 (incssp<mode>): Likewise.
16981 (nop_endbr): Likewise.
16982 * config/i386/i386.opt (mcet): Change help message to built-in
16985 (mshstk): Likewise.
16986 * doc/invoke.texi: Remove -mcet, -mibt and -mshstk condition
16987 on -fcf-protection. Change -mcet, -mibt and -mshstk to only
16988 enable CET built-in functions.
16990 2018-04-19 Sebastian Peryt <sebastian.peryt@intel.com>
16992 * common/config/i386/i386-common.c
16993 (OPTION_MASK_ISA_MOVDIRI_SET, OPTION_MASK_ISA_MOVDIR64B_SET,
16994 OPTION_MASK_ISA_MOVDIRI_UNSET,
16995 OPTION_MASK_ISA_MOVDIR64B_UNSET): New defines.
16996 (ix86_handle_option): Handle -mmovdiri and -mmovdir64b.
16997 * config.gcc (movdirintrin.h): New header.
16998 * config/i386/cpuid.h (bit_MOVDIRI,
16999 bit_MOVDIR64B): New bits.
17000 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mmovdiri
17002 * config/i386/i386-builtin-types.def ((VOID, PUNSIGNED, UNSIGNED),
17003 (VOID, PVOID, PCVOID)): New function types.
17004 * config/i386/i386-builtin.def (__builtin_ia32_directstoreu_u32,
17005 __builtin_ia32_directstoreu_u64,
17006 __builtin_ia32_movdir64b): New builtins.
17007 * config/i386/i386-c.c (__MOVDIRI__, __MOVDIR64B__): New.
17008 * config/i386/i386.c (ix86_target_string): Added -mmovdir64b
17010 (ix86_valid_target_attribute_inner_p): Ditto.
17011 (ix86_expand_special_args_builtin): Added VOID_FTYPE_PUNSIGNED_UNSIGNED
17012 and VOID_FTYPE_PUNSIGNED_UNSIGNED.
17013 (ix86_expand_builtin): Expand IX86_BUILTIN_MOVDIR64B.
17014 * config/i386/i386.h (TARGET_MOVDIRI, TARGET_MOVDIRI_P,
17015 TARGET_MOVDIR64B, TARGET_MOVDIR64B_P): New.
17016 * config/i386/i386.md (UNSPECV_MOVDIRI, UNSPECV_MOVDIR64B): New.
17017 (movdiri<mode>, movdir64b_<mode>): New.
17018 * config/i386/i386.opt: Add -mmovdiri and -mmovdir64b.
17019 * config/i386/immintrin.h: Include movdirintrin.h.
17020 * config/i386/movdirintrin.h: New file.
17021 * doc/invoke.texi: Added -mmovdiri and -mmovdir64b.
17023 2018-04-19 Richard Biener <rguenther@suse.de>
17025 PR middle-end/85455
17026 * cfg.c (clear_bb_flags): When loop state says we have
17027 marked irreducible regions also preserve BB_IRREDUCIBLE_LOOP.
17029 2018-04-19 Richard Biener <rguenther@suse.de>
17031 PR tree-optimization/84737
17032 * tree-vect-data-refs.c (vect_copy_ref_info): New function
17033 copying restrict info.
17034 (vect_setup_realignment): Use it.
17035 * tree-vectorizer.h (vect_copy_ref_info): Declare.
17036 * tree-vect-stmts.c (vectorizable_store): Copy ref info from
17037 the first DR to all generated stores.
17038 (vectorizable_load): Likewise for loads.
17040 2018-04-19 Jakub Jelinek <jakub@redhat.com>
17042 PR tree-optimization/85446
17043 * match.pd ((intptr_t) x eq/ne CST to x eq/ne (typeof x) cst): Require
17044 the integral and pointer types to have the same precision.
17046 * doc/install.texi: Document --disable-cet being the default and
17049 2018-04-18 Martin Liska <mliska@suse.cz>
17051 * ipa-devirt.c (odr_subtypes_equivalent_p): Fix GNU coding
17054 2018-04-18 Martin Liska <mliska@suse.cz>
17057 2018-03-02 Eric Botcazou <ebotcazou@adacore.com>
17060 * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
17061 arguments if they are comparable.
17063 2018-04-18 Martin Liska <mliska@suse.cz>
17066 2018-03-13 Eric Botcazou <ebotcazou@adacore.com>
17069 * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
17072 2018-04-18 H.J. Lu <hongjiu.lu@intel.com>
17075 * config/i386/i386.c (ix86_expand_split_stack_prologue): Insert
17076 ENDBR after calling __morestack.
17078 2018-04-18 David Malcolm <dmalcolm@redhat.com>
17081 * configure.ac (gcc-driver-name.h): Honor --with-gcc-major-version
17082 by using gcc_base_ver to generate a gcc_driver_version, and use
17083 it when generating GCC_DRIVER_NAME.
17084 * configure: Regenerate.
17086 2018-04-18 Jakub Jelinek <jakub@redhat.com>
17089 * config.gcc: Obsolete powerpc*-*-*spe*.
17091 2018-04-17 Jakub Jelinek <jakub@redhat.com>
17094 * dbxout.c (dbxout_int): Perform negation in unsigned int type.
17095 (stabstr_D): Change type of unum from unsigned int to
17096 unsigned HOST_WIDE_INT. Perform negation in unsigned HOST_WIDE_INT
17099 2018-04-17 Jim Wilson <jimw@sifive.com>
17102 * config/riscv/riscv.c (riscv_compute_frame_info): Add calls to
17103 RISCV_STACK_ALIGN when using outgoing_args_size and pretend_args_size.
17104 Set arg_pointer_offset after using pretend_args_size.
17106 2018-04-17 Jakub Jelinek <jakub@redhat.com>
17108 PR rtl-optimization/85431
17109 * dse.c (record_store): Ignore zero width stores.
17112 * asan.c (handle_builtin_stack_restore): Adjust comment. Emit
17113 __asan_allocas_unpoison call and last_alloca_addr = new_sp before
17114 __builtin_stack_restore rather than after it.
17115 * builtins.c (expand_asan_emit_allocas_unpoison): Pass
17116 arg1 + (virtual_dynamic_stack_rtx - stack_pointer_rtx) as second
17117 argument instead of virtual_dynamic_stack_rtx.
17119 2018-04-17 Kelvin Nilsen <kelvin@gcc.gnu.org>
17121 * config/rs6000/rs6000-protos.h (rs6000_builtin_is_supported_p):
17123 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
17124 Add note to error message to explain internal mapping of overloaded
17125 built-in function name to non-overloaded built-in function name.
17126 * config/rs6000/rs6000.c (rs6000_builtin_is_supported_p): New
17129 2018-04-17 Michael Meissner <meissner@linux.vnet.ibm.com>
17132 * config/rs6000/rs6000.md (pack<mode>): Do not try handle a pack
17133 where the inputs overlap with the output.
17135 2018-04-17 Jakub Jelinek <jakub@redhat.com>
17137 * config/i386/sse.md (vec_extract_lo_<mode><mask_name>): Add
17138 (=v, v) alternative and explicit "memory" attribute.
17139 (vec_extract_lo_<mode><mask_name>): Likewise. Also add
17140 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
17142 (vec_extract_lo_<mode><mask_name>): Add (=v, v) alternative and use
17143 "sselog1" type instead of "sselog".
17144 (vec_extract_hi_<mode><mask_name>): Use "sselog1" type instead of
17145 "sselog". Remove explicit "memory" attribute.
17146 (vec_extract_lo_v32hi): Add (=v, v) alternative and explicit "memory",
17147 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
17149 (vec_extract_hi_v32hi): Merge all alternatives into one, use
17150 "sselog1" type instead of "sselog". Remove explicit "memory"
17152 (vec_extract_hi_v16hi): Merge each pair of alternatives into one,
17153 use "sselog1" type instead of "sselog". Remove explicit "memory"
17155 (vec_extract_lo_v64qi): Add (=v, v) alternative and explicit "memory",
17156 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
17158 (vec_extract_hi_v64qi): Merge all alternatives into one, use
17159 "sselog1" type instead of "sselog". Remove explicit "memory"
17161 (vec_extract_hi_v32qi): Merge each pair of alternatives into one,
17162 use "sselog1" type instead of "sselog". Remove explicit "memory"
17166 * config/i386/i386.md (*ashlqi3_1_slp): Use alu1 type instead of alu.
17168 PR middle-end/85414
17169 * rtlhooks.c (gen_lowpart_if_possible): Don't call gen_lowpart_SUBREG
17172 2018-04-17 Martin Jambor <mjambor@suse.cz>
17175 * ipa-cp.c (create_specialized_node): Call
17176 expand_all_artificial_thunks if necessary.
17178 2018-04-17 Martin Liska <mliska@suse.cz>
17181 * ipa-devirt.c (odr_types_equivalent_p): Remove trailing
17182 in message, remote space in between '_G' and '('.
17184 2018-04-17 Jakub Jelinek <jakub@redhat.com>
17187 * config/i386/sse.md (reduces<mode><mask_scalar_name>,
17188 avx512f_vmcmp<mode>3<round_saeonly_name>,
17189 avx512f_vmcmp<mode>3_mask<round_saeonly_name>,
17190 avx512f_sgetexp<mode><mask_scalar_name><round_saeonly_scalar_name>,
17191 avx512f_rndscale<mode><round_saeonly_name>,
17192 avx512dq_ranges<mode><mask_scalar_name><round_saeonly_scalar_name>,
17193 avx512f_vgetmant<mode><mask_scalar_name><round_saeonly_scalar_name>):
17194 Use %<iptr>2 instead of %2 for -masm=intel.
17195 (avx512f_vcvtss2usi<round_name>, avx512f_vcvtss2usiq<round_name>,
17196 avx512f_vcvttss2usi<round_saeonly_name>,
17197 avx512f_vcvttss2usiq<round_saeonly_name>): Use %k1 instead of %1 for
17199 (avx512f_vcvtsd2usi<round_name>, avx512f_vcvtsd2usiq<round_name>,
17200 avx512f_vcvttsd2usi<round_saeonly_name>,
17201 avx512f_vcvttsd2usiq<round_saeonly_name>, ufloatv2siv2df2<mask_name>):
17202 Use %q1 instead of %1 for -masm=intel.
17203 (avx512f_sfixupimm<mode><sd_maskz_name><round_saeonly_name>,
17204 avx512f_sfixupimm<mode>_mask<round_saeonly_name>): Use %<iptr>3 instead
17205 of %3 for -masm=intel.
17206 (sse2_shufpd_v2df_mask): Fix a typo, change %{6%} to %{%6%} for
17208 (*avx512vl_<code>v2div2qi2_store): Use %w0 instead of %0 for
17210 (*avx512vl_<code><mode>v4qi2_store): Use %k0 instead of %0 for
17212 (avx512vl_<code><mode>v4qi2_mask_store): Use a single pattern with
17213 %k0 and %1 for -masm=intel rather than two patterns, one with %0 and
17215 (*avx512vl_<code><mode>v8qi2_store): Use %q0 instead of %0 for
17217 (avx512vl_<code><mode>v8qi2_mask_store): Use a single pattern with
17218 %q0 and %1 for -masm=intel rather than two patterns, one with %0 and
17219 %g1 and one with %0 and %1.
17220 (avx512er_vmrcp28<mode><round_saeonly_name>,
17221 avx512er_vmrsqrt28<mode><round_saeonly_name>): Use %<iptr>1 instead of
17222 %1 for -masm=intel.
17223 (avx5124fmaddps_4fmaddps_mask, avx5124fmaddps_4fmaddss_mask,
17224 avx5124fmaddps_4fnmaddps_mask, avx5124fmaddps_4fnmaddss_mask,
17225 avx5124vnniw_vp4dpwssd_mask, avx5124vnniw_vp4dpwssds_mask): Swap order
17226 of %0 and %{%4%} for -masm=intel.
17227 (avx5124fmaddps_4fmaddps_maskz, avx5124fmaddps_4fmaddss_maskz,
17228 avx5124fmaddps_4fnmaddps_maskz, avx5124fmaddps_4fnmaddss_maskz,
17229 avx5124vnniw_vp4dpwssd_maskz, avx5124vnniw_vp4dpwssds_maskz): Swap
17230 order of %0 and %{%5%}%{z%} for -masm=intel.
17232 2018-04-17 Jan Hubicka <jh@suse.cz>
17235 * ipa-devirt.c (odr_types_equivalent_p): Handle bit fields.
17237 2018-04-17 Martin Liska <mliska@suse.cz>
17240 * multiple_target.c (create_dispatcher_calls): Set apostrophes
17241 for target_clone error message. Make default implementation
17242 clone to be a local declaration.
17243 (separate_attrs): Add new argument and check for an empty
17245 (expand_target_clones): Handle it.
17246 (ipa_target_clone): Make redirection just for target_clones
17249 2018-04-16 Cesar Philippidis <cesar@codesourcery.com>
17250 Tom de Vries <tom@codesourcery.com>
17252 PR middle-end/84955
17253 * omp-expand.c (expand_oacc_for): Add dummy false branch for
17254 tiled basic blocks without omp continue statements.
17256 2018-04-16 Aaron Sawdey <acsawdey@linux.ibm.com>
17259 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Mark
17260 vec_extract expression as having side effects to make sure it gets
17263 2018-04-16 H.J. Lu <hongjiu.lu@intel.com>
17266 * config/i386/i386.c (get_builtin_code_for_version): Check
17269 2018-04-16 Olga Makhotina <olga.makhotina@intel.com>
17272 * config.gcc: Support "skylake".
17273 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
17275 * config/i386/i386.c (m_SKYLAKE): Define.
17276 (processor_target_table): Add "skylake".
17277 (ix86_option_override_internal): Add "skylake".
17278 (get_builtin_code_for_version): Handle PROCESSOR_SKYLAKE,
17279 PROCESSOR_CANNONLAKE.
17280 (get_builtin_code_for_version): Fix priority for
17281 PROCESSOR_ICELAKE_CLIENT, PROCESSOR_ICELAKE_SERVER,
17282 PROCESSOR_SKYLAKE-AVX512.
17283 * config/i386/i386.h (processor_costs): Define TARGET_SKYLAKE.
17284 (processor_type): Add PROCESSOR_SKYLAKE.
17286 2018-04-16 Paolo Carlini <paolo.carlini@oracle.com>
17287 Jason Merrill <jason@redhat.com>
17290 * convert.c (convert_to_integer_1): Use direct recursion for
17291 enumeral types and types with a precision less than the number
17292 of bits in their mode.
17294 2018-04-16 Julia Koval <julia.koval@intel.com>
17297 * config/i386/x86-tune.def (X86_TUNE_SSE_UNALIGNED_LOAD_OPTIMAL,
17298 X86_TUNE_SSE_UNALIGNED_STORE_OPTIMAL): Add m_SKYLAKE_AVX512
17300 2018-04-14 Segher Boessenkool <segher@kernel.crashing.org>
17303 * config/rs6000/rs6000.opt (mdirect-move): Make deprecated.
17304 * doc/invoke.texi (RS/6000 and PowerPC Options): Remove -mdirect-move
17305 and -mno-direct-move.
17307 2018-04-13 Paul A. Clarke <pc@us.ibm.com>
17310 * config/rs6000/emmintrin.h (_mm_slli_epi{16,32,64}):
17311 Ensure that vec_splat_s32 is only called with 0 <= shift < 16.
17312 Ensure negative shifts result in {0}.
17314 2018-04-13 Vladimir Makarov <vmakarov@redhat.com>
17316 PR rtl-optimization/79916
17317 * config/rs6000/rs6000.c (rs6000_emit_move): Use assigned hard
17318 regs (if any) to define how to gnerate SD moves when LRA is in
17321 2018-04-13 Jakub Jelinek <jakub@redhat.com>
17323 PR rtl-optimization/85393
17324 * except.h (expand_dw2_landing_pad_for_region): Remove declaration.
17325 * except.c (expand_dw2_landing_pad_for_region): Make static.
17326 * bb-reorder.c (fix_up_crossing_landing_pad): In new_bb emit just
17327 a label and unconditional jump to old_bb, rather than
17328 expand_dw2_landing_pad_for_region insn(s) and jump to single_succ
17331 PR rtl-optimization/85376
17332 * simplify-rtx.c (simplify_const_unary_operation): For CLZ and CTZ and
17333 zero op0, if C?Z_DEFINED_VALUE_AT_ZERO is false, return NULL_RTX
17334 instead of a specific value.
17336 2018-04-13 Jan Hubicka <hubicka@ucw.cz>
17337 Bin Cheng <bin.cheng@arm.com>
17339 PR tree-optimization/82965
17340 PR tree-optimization/83991
17341 * cfgloopanal.c (expected_loop_iterations_unbounded): Add
17342 by_profile_only parameter.
17343 * cfgloopmanip.c (scale_loop_profile): Further scale loop's profile
17344 information if the loop was predicted to iterate too many times.
17345 * cfgloop.h (expected_loop_iterations_unbounded): Update prototype
17347 2018-04-13 Jan Hubicka <hubicka@ucw.cz>
17350 * config/i386/i386.c (ix86_can_inline_p): Allow safe transitions for
17353 2018-04-13 Martin Liska <mliska@suse.cz>
17354 Jakub Jelinek <jakub@redhat.com>
17356 PR middle-end/81657
17357 * expr.h (enum block_op_methods): Add BLOCK_OP_NO_LIBCALL_RET.
17358 * expr.c (emit_block_move_hints): Handle BLOCK_OP_NO_LIBCALL_RET.
17359 * builtins.c (expand_builtin_memory_copy_args): Use
17360 BLOCK_OP_NO_LIBCALL_RET method for mempcpy with non-ignored target,
17361 handle dest_addr == pc_rtx.
17363 2018-04-12 Segher Boessenkool <segher@kernel.crashing.org>
17366 * config/rs6000/rs6000.md (fix_trunc<mode>si2): Use legacy code if
17367 asked to not generate direct moves.
17368 (fix_trunc<mode>si2_stfiwx): Similar.
17369 (fix_trunc<mode>si2_internal): Similar.
17371 2018-04-12 Jakub Jelinek <jakub@redhat.com>
17374 * var-tracking.c (add_stores): Handle STRICT_LOW_PART SET_DEST.
17375 * cselib.c (cselib_record_sets): For STRICT_LOW_PART dest,
17376 lookup if dest in some wider mode is known to be const0_rtx and
17377 if so, record permanent equivalence for it to be ZERO_EXTEND of
17378 the narrower mode destination.
17380 2018-04-12 Cesar Philippidis <cesar@codesourcery.com>
17382 * lto-streamer-out.c (output_function): Revert 259346.
17383 * omp-expand.c (expand_oacc_for): Likewise.
17385 2018-04-12 Alexander Monakov <amonakov@ispras.ru>
17387 PR rtl-optimization/85354
17388 * sel-sched-ir.c (sel_init_pipelining): Move cfg_cleanup call...
17389 * sel-sched.c (sel_global_init): ... here.
17391 2018-04-12 Eric Botcazou <ebotcazou@adacore.com>
17394 * lto-wrapper.c (debug_objcopy): Open the files in binary mode.
17395 * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
17396 mode for PE-COFF targets.
17397 * config/i386/i386-protos.h (i386_pe_asm_lto_start): Declare.
17398 (i386_pe_asm_lto_end): Likewise.
17399 * config/i386/cygming.h (TARGET_ASM_LTO_START): Define.
17400 (TARGET_ASM_LTO_END): Likewise.
17401 * config/i386/winnt.c (saved_debug_info_level): New static variable.
17402 (i386_pe_asm_lto_start): New function.
17403 (i386_pe_asm_lto_end): Likewise.
17405 2018-04-12 Cesar Philippidis <cesar@codesourcery.com>
17406 Richard Biener <rguenther@suse.de>
17408 PR middle-end/84955
17409 * lto-streamer-out.c (output_function): Fix CFG loop state before
17411 * omp-expand.c (expand_oacc_for): Handle calls to internal
17412 functions like regular functions.
17414 2018-04-12 Richard Biener <rguenther@suse.de>
17417 * dwarf2out.c (init_sections_and_labels): Use debug_line_section[_label]
17418 for the early LTO debug to properly generate references to it
17419 during DIE emission. Do not re-use that for the skeleton for
17421 (dwarf2out_early_finish): Likewise.
17423 2018-04-12 Jakub Jelinek <jakub@redhat.com>
17426 * config/i386/sse.md
17427 (<mask_codefor>avx512dq_vextract<shuffletype>64x2_1<mask_name> split,
17428 <mask_codefor>avx512f_vextract<shuffletype>32x4_1<mask_name> split,
17429 vec_extract_lo_<mode><mask_name> split, vec_extract_lo_v32hi,
17430 vec_extract_lo_v64qi): For non-AVX512VL if input is xmm16+ reg
17431 and output is a reg, avoid creating invalid lowpart subreg, but
17432 instead split into a 512-bit move. Don't split if not AVX512VL,
17433 input is xmm16+ reg and output is a mem.
17434 (vec_extract_lo_<mode><mask_name>, vec_extract_lo_v32hi,
17435 vec_extract_lo_v64qi): Don't require split if not AVX512VL, input is
17436 xmm16+ reg and output is a mem.
17438 2018-04-12 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
17440 * config/s390/s390.c (s390_output_indirect_thunk_function): Check
17441 also for flag_dwarf2_cfi_asm.
17443 2018-04-12 Jakub Jelinek <jakub@redhat.com>
17445 PR rtl-optimization/85342
17446 * regcprop.c (copyprop_hardreg_forward_1): Remove replaced array, use
17447 a bool scalar var inside of the loop instead. Don't try to update
17448 recog_data.operand after failed apply_change_group.
17450 2018-04-12 Tom de Vries <tom@codesourcery.com>
17453 * config/nvptx/nvptx.c (flexible_array_member_type_p): New function.
17454 (nvptx_assemble_decl_begin): Add undefined param. Declare undefined
17455 array with flexible array member as array without given dimension.
17456 (nvptx_assemble_undefined_decl): Set nvptx_assemble_decl_begin call
17457 argument for undefined param to true.
17459 2018-04-11 Aaron Sawdey <acsawdey@linux.ibm.com>
17462 * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
17463 -mcall- and -mtraceback=. Remove options -mabi=spe and -mabi=no-spe
17464 from PowerPC section.
17465 * config/rs6000/sysv4.opt (mcall-): Improve help text.
17466 * config/rs6000/rs6000.opt (mblock-compare-inline-limit=): Trim
17467 help text that is too long.
17468 * config/rs6000/rs6000.opt (mblock-compare-inline-loop-limit=): Trim
17469 help text that is too long.
17470 * config/rs6000/rs6000.opt (mstring-compare-inline-limit=): Trim
17471 help text that is too long.
17473 2018-04-11 Uros Bizjak <ubizjak@gmail.com>
17475 * config/alpha/alpha.md (stack_probe_internal): Rename
17476 from "probe_stack". Update all callers.
17478 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
17480 PR rtl-optimization/84566
17481 * sched-deps.c (sched_analyze_insn): Check deps->readonly when invoking
17482 sched_macro_fuse_insns.
17484 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
17487 * sched-rgn.c (add_branch_dependences): Move sel_sched_p check here...
17488 (compute_block_dependences): ... from here.
17490 2018-04-11 Jakub Jelinek <jakub@redhat.com>
17492 PR tree-optimization/85331
17493 * vec-perm-indices.h (vec_perm_indices::clamp): Change input type
17494 from int to HOST_WIDE_INT.
17496 2018-04-11 Martin Jambor <mjambor@suse.cz>
17499 * ipa-cp.c (propagate_vals_across_pass_through): Expand comment.
17500 (cgraph_edge_brings_value_p): New parameter dest_val, check if it is
17501 not the same as the source val.
17502 (cgraph_edge_brings_value_p): New parameter.
17503 (gather_edges_for_value): Pass destination value to
17504 cgraph_edge_brings_value_p.
17505 (perhaps_add_new_callers): Likewise.
17506 (get_info_about_necessary_edges): Likewise and exclude values brought
17507 only by self-recursive edges.
17508 (create_specialized_node): Redirect only clones of self-calling edges.
17509 (+self_recursive_pass_through_p): New function.
17510 (find_more_scalar_values_for_callers_subset): Use it.
17511 (find_aggregate_values_for_callers_subset): Likewise.
17512 (known_aggs_to_agg_replacement_list): Removed.
17513 (decide_whether_version_node): Re-calculate known constants for all
17514 remaining context clones.
17516 2018-04-11 Richard Biener <rguenther@suse.de>
17519 * dwarf2out.c (dwarf2out_finish): Remove DW_AT_stmt_list attribute
17520 from early DWARF output.
17521 (dwarf2out_early_finish): Output line info unconditionally into
17522 early DWARF and add reference to it.
17524 2018-04-11 Jakub Jelinek <jakub@redhat.com>
17527 * config/i386/sse.md (iptr): Add V16SFmode and V8DFmode cases.
17528 (<avx512>_vec_dup<mode><mask_name>): Use a single pattern for modes
17529 other than V2DFmode using iptr mode attribute.
17530 (<avx512>_vec_dup<mode><mask_name>): Use iptr mode attribute.
17532 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
17534 PR rtl-optimization/84659
17535 * sel-sched-ir.c (sel_init_pipelining): Invoke cleanup_cfg.
17537 2018-04-11 Jakub Jelinek <jakub@redhat.com>
17540 * dwarf2out.c (skip_loc_list_entry): Don't call size_of_locs if
17542 (output_loc_list): Pass address of a dummy size variable even in the
17543 locview handling loop.
17544 (index_location_lists): Add comment on why skip_loc_list_entry can't
17547 2018-04-11 Thomas Preud'homme <thomas.preudhomme@arm.com>
17550 * config/arm/arm-builtins.c (arm_expand_builtin): Force input operand
17553 2018-04-10 Aaron Sawdey <acsawdey@linux.ibm.com>
17556 * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
17557 -mblock-compare-inline-limit, -mblock-compare-inline-loop-limit,
17558 and -mstring-compare-inline-limit.
17560 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
17563 * config/rs6000/rs6000.md (allocate_stack): Put the residual size
17564 for stack clash protection in a register whenever we need it to be in
17567 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
17569 * common/config/rs6000/rs6000-common.c (rs6000_option_init_struct):
17570 Enable -fasynchronous-unwind-tables by default if OBJECT_FORMAT_ELF.
17572 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
17575 * config/rs6000/rs6000.opt (mtraceback=): Show the allowed values in
17577 (mlong-double-): Ditto.
17578 * config/rs6000/sysv4.opt (msdata=): Ditto.
17579 (mtls-size=): Ditto.
17581 2018-04-10 Kelvin Nilsen <kelvin@gcc.gnu.org>
17583 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
17584 erroneous entries for
17585 "vector int vec_ldl (int, long int *)", and
17586 "vector unsigned int vec_ldl (int, unsigned long int *)".
17587 Add comments and entries for
17588 "vector bool char vec_ldl (int, bool char *)",
17589 "vector bool short vec_ldl (int, bool short *)",
17590 "vector bool int vec_ldl (int, bool int *)",
17591 "vector bool long long vec_ldl (int, bool long long *)",
17592 "vector pixel vec_ldl (int, pixel *)",
17593 "vector long long vec_ldl (int, long long *)",
17594 "vector unsigned long long vec_ldl (int, unsigned long long *)".
17595 * config/rs6000/rs6000.c (rs6000_init_builtins): Initialize new
17596 type tree bool_long_long_type_node and correct definition of
17597 bool_V2DI_type_node to make reference to this new type tree.
17598 (rs6000_mangle_type): Replace erroneous reference to
17599 bool_long_type_node with bool_long_long_type_node.
17600 * config/rs6000/rs6000.h (enum rs6000_builtin_type_index): Add
17601 comments to emphasize sign distinctions for char and int types and
17602 replace RS6000_BTI_bool_long constant with
17603 RS6000_BTI_bool_long_long constant. Also add comment to restrict
17604 use of RS6000_BTI_pixel.
17605 (bool_long_type_node): Remove this macro definition.
17606 (bool_long_long_type_node): New macro definition
17608 2018-04-10 Jakub Jelinek <jakub@redhat.com>
17610 PR rtl-optimization/85300
17611 * combine.c (subst): Handle subst of CONST_SCALAR_INT_P new_rtx also
17612 into FLOAT and UNSIGNED_FLOAT like ZERO_EXTEND, return a CLOBBER if
17613 simplify_unary_operation fails.
17615 2018-04-10 Martin Liska <mliska@suse.cz>
17617 * gdbhooks.py: Add pretty-printers for varpool_node, symtab_node,
17618 cgraph_edge and ipa_ref.
17620 2018-04-10 Jakub Jelinek <jakub@redhat.com>
17624 * config/i386/sse.md
17625 (<extract_type>_vinsert<shuffletype><extract_suf>_mask): Fix
17626 computation of the VEC_MERGE selector from mask.
17627 (<extract_type>_vinsert<shuffletype><extract_suf>_1<mask_name>):
17628 Fix decoding of the VEC_MERGE selector into mask.
17630 2018-04-10 Richard Sandiford <richard.sandiford@linaro.org>
17632 PR tree-optimization/85286
17633 * tree-vect-data-refs.c (vect_get_smallest_scalar_type):
17635 2018-04-10 Richard Sandiford <richard.sandiford@linaro.org>
17637 * final.c (final_1): Set insn_last_address as well as
17638 insn_current_address.
17640 2018-04-10 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
17643 * explow.c (emit_stack_probe): Call validize_mem on memory location
17644 before passing it to gen_probe_stack. Create address operand and
17645 legitimize it for the probe_stack_address case.
17647 2018-04-09 Jan Hubicka <jh@suse.cz>
17650 * ipa-devirt.c (rebuild_type_inheritance-hash): New.
17651 * ipa-utils.h (rebuild_type_inheritance-hash): Declare.
17652 * tree.c (free_lang_data_in_type): Fix handling of binfos;
17654 (free_lang_data): Rebuild type inheritance graph.
17656 2018-04-09 Martin Sebor <msebor@redhat.com>
17658 * invoke.texi (-finline-small-functions): Mention other optimization
17660 (-findirect-inlining, -fpartial-inlining): Same.
17661 (-finline-functions-called-once): Same.
17662 (-freorder-blocks-and-partition): Same.
17664 2018-04-09 Jan Hubicka <jh@suse.cz>
17667 * cfgcleanup.c (try_forward_edges): Do not give up on crossing
17668 jumps; choose last target that matches the criteria (i.e.
17669 no partition changes for non-crossing jumps).
17670 * cfgrtl.c (cfg_layout_redirect_edge_and_branch): Add basic
17671 support for redirecting crossing jumps to non-crossing.
17673 2018-04-09 Alexey Brodkin <abrodkin@synopsys.com>
17675 * config/arc/arc.c (arc_expand_prologue): Set stack usage info
17676 also for naked functions.
17678 2018-04-09 Claudiu Zissulescu <claziss@synopsys.com>
17680 * config/arc/arc.md (add_shift): New pattern.
17681 (add_shift2): Likewise.
17682 (sub_shift): Likewise.
17683 (sub_shift_cmp0_noout): Likewise.
17684 (compare_si_ashiftsi): Likewise.
17685 (xbfu_cmp0_noout): New combine pattern.
17686 (xbfu_cmp0"): Likewise.
17687 (movsi_set_cc_insn): Place the predicable variant first.
17688 (commutative_binary_cmp0_noout): Remove clobber.
17689 (commutative_binary_cmp0): New pattern.
17690 (noncommutative_binary_cmp0): Likewise.
17691 (noncommutative_binary_cmp0_noout): Likewise.
17692 (noncommutative_binary_comparison_result_used): Removed.
17693 (rsub_cmp0): New pattern.
17694 (rsub_cmp0_noout): Likewise.
17695 (extzvsi): Changed, keep only meaningful variants.
17696 (SQH, SEZ): New iterators.
17697 (SQH_postfix): New mode attribute.
17698 (SEZ_prefix): New code attribute.
17699 (<SEZ_prefix>xt<SQH_postfix>_cmp0_noout): New instruction pattern.
17700 (<SEZ_prefix>xt<SQH_postfix>_cmp0): Likewise.
17701 * config/arc/predicates.md (cc_set_register): Use CC_REG instead
17702 of numerical value.
17703 (noncommutative_operator): Check the availability of barrel
17706 2018-04-09 Richard Biener <rguenther@suse.de>
17708 PR tree-optimization/85284
17709 * tree-ssa-loop-niter.c (number_of_iterations_exit_assumptions):
17710 Only use the niter constraining form of simple_iv when the exit
17711 is always executed.
17713 2018-04-09 Tom de Vries <tom@codesourcery.com>
17716 * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
17717 (define_expand "*memory_barrier"): New define_expand.
17718 (define_insn "memory_barrier"): New insn.
17720 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
17722 PR rtl-optimization/80463
17723 PR rtl-optimization/83972
17724 PR rtl-optimization/83480
17726 * sel-sched-ir.c (has_dependence_note_mem_dep): Take into account the
17727 correct producer for the insn.
17728 (tidy_control_flow): Fixup seqnos in case of debug insns.
17730 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
17732 PR rtl-optimization/83913
17734 * sel-sched-ir.c (merge_expr_data): Choose the middle between two
17735 different sched-times when merging exprs.
17737 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
17739 PR rtl-optimization/83962
17741 * sel-sched-ir.c (tidy_control_flow): Correct the order in which we call
17742 tidy_fallthru_edge and tidy_control_flow.
17744 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
17746 PR rtl-optimization/83530
17748 * sel-sched.c (force_next_insn): New global variable.
17749 (remove_insn_for_debug): When force_next_insn is true, also leave only
17750 next insn in the ready list.
17751 (sel_sched_region): When the region wasn't scheduled, make another pass
17752 over it with force_next_insn set to 1.
17754 2018-04-08 Monk Chiang <sh.chiang04@gmail.com>
17756 * config.gcc (nds32le-*-*, nds32be-*-*): Add nds32/nds32_intrinsic.h
17758 * config/nds32/constants.md (unspec_volatile_element): Add enum values
17759 for interrupt control.
17760 * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
17761 functions for interrupt control.
17762 * config/nds32/nds32-intrinsic.md: Likewise.
17763 * config/nds32/nds32_intrinsic.h: Likewise.
17764 * config/nds32/nds32.h (nds32_builtins): Likewise.
17766 2018-04-08 Chung-Ju Wu <jasonwucj@gmail.com>
17768 * config/nds32/nds32.c (nds32_init_machine_status,
17769 nds32_legitimate_index_p, nds32_legitimate_address_p): Consider
17770 strict_aligned_p field.
17771 (nds32_expand_to_rtl_hook): New function.
17772 (TARGET_EXPAND_TO_RTL_HOOK): Define.
17773 * config/nds32/nds32.h (machine_function): Add strict_aligned_p field.
17775 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
17776 Chung-Ju Wu <jasonwucj@gmail.com>
17778 * config.gcc (nds32*-*-*): Check that n7 is valid to --with-cpu.
17779 * config/nds32/nds32-n7.md: New file.
17780 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N7.
17781 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n7
17783 * config/nds32/nds32-protos.h: More declarations for n7 pipeline.
17784 * config/nds32/nds32.md (pipeline_model): Add n7.
17785 * config/nds32/nds32.opt (mcpu): Support n7 pipeline cpus.
17786 * config/nds32/pipelines.md: Include n7 settings.
17788 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
17789 Chung-Ju Wu <jasonwucj@gmail.com>
17791 * config.gcc (nds32*-*-*): Check that e8 is valid to --with-cpu.
17792 * config/nds32/nds32-e8.md: New file.
17793 * config/nds32/nds32-opts.h (nds32-cpu_type): Add CPU_E8.
17794 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for e8
17796 * config/nds32/nds32-protos.h: More declarations for e8 pipeline.
17797 * config/nds32/nds32.md (pipeline_model): Add e8.
17798 * config/nds32/nds32.opt (mcpu): Support e8 pipeline cpus.
17799 * config/nds32/pipelines.md: Include e8 settings.
17801 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
17802 Chung-Ju Wu <jasonwucj@gmail.com>
17804 * config.gcc (nds32*-*-*): Check that n6/n8/s8 are valid to --with-cpu.
17805 * config/nds32/nds32-n8.md: New file.
17806 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N6 and CPU_N8.
17807 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n8
17809 * config/nds32/nds32-protos.h: More declarations for n8 pipeline.
17810 * config/nds32/nds32-utils.c: More implementations for n8 pipeline.
17811 * config/nds32/nds32.md (pipeline_model): Add n8.
17812 * config/nds32/nds32.opt (mcpu): Support n8 pipeline cpus.
17813 * config/nds32/pipelines.md: Include n8 settings.
17815 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
17816 Chung-Ju Wu <jasonwucj@gmail.com>
17818 * config.gcc (nds32*): Add nds32-utils.o into extra_objs.
17819 * config/nds32/nds32-n9-2r1w.md: New file.
17820 * config/nds32/nds32-n9-3r2w.md: New file.
17821 * config/nds32/nds32-opts.h (nds32_cpu_type, nds32_mul_type,
17822 nds32_register_ports): New or modify for cpu n9.
17823 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n9
17825 * config/nds32/nds32-protos.h: More declarations for n9 pipeline.
17826 * config/nds32/nds32-utils.c: New file.
17827 * config/nds32/nds32.h (TARGET_PIPELINE_N9, TARGET_PIPELINE_SIMPLE,
17828 TARGET_MUL_SLOW): Define.
17829 * config/nds32/nds32.md (pipeline_model): New attribute.
17830 * config/nds32/nds32.opt (mcpu, mconfig-mul, mconfig-register-ports):
17831 New options that support cpu n9.
17832 * config/nds32/pipelines.md: Include n9 settings.
17833 * config/nds32/t-nds32 (nds32-utils.o): Add dependency.
17835 2018-04-08 Chung-Ju Wu <jasonwucj@gmail.com>
17837 * config/nds32/nds32-md-auxiliary.c (output_cond_branch): Output align
17838 information if necessary.
17839 (output_cond_branch_compare_zero): Likewise.
17840 * config/nds32/nds32.c (nds32_adjust_insn_length): Consider align case.
17841 (nds32_target_alignment): Refine for alignment.
17842 * config/nds32/nds32.h (NDS32_ALIGN_P): Define.
17843 (FUNCTION_BOUNDARY): Modify.
17844 * config/nds32/nds32.md (call_internal, call_value_internal): Consider
17846 * config/nds32/nds32.opt (malways-align, malign-functions): New.
17848 2018-04-08 Monk Chiang <sh.chiang04@gmail.com>
17850 * config/nds32/constants.md (unspec_volatile_element): Add values for
17851 TLB operation and data prefetch.
17852 * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
17853 functions for TLB operation and data prefetch.
17854 * config/nds32/nds32-intrinsic.md: Likewise.
17855 * config/nds32/nds32_intrinsic.h: Likewise.
17856 * config/nds32/nds32.c (nds32_dpref_names): Likewise.
17857 (nds32_print_operand): Likewise.
17858 * config/nds32/nds32.h (nds32_builtins): Likewise.
17860 2018-04-07 Thomas Koenig <tkoenig@gcc.gnu.org>
17861 Andrew Pinski <pinsika@gcc.gnu.org>
17863 PR middle-end/82976
17864 * match.pd: Use constant_boolean_node of correct type instead of
17865 boolean_true_node or boolean_false_node for simplifying
17866 pointer comparisons to zero.
17868 2018-04-07 Jakub Jelinek <jakub@redhat.com>
17870 PR tree-optimization/80021
17871 * tree.c (verify_type_variant): Make error call in verify_variant_match
17872 translatable and remove final full stop.
17874 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
17876 * config/nds32/constants.md (unspec_volatile_element): Add
17877 UNSPEC_VOLATILE_EH_RETURN.
17878 * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push,
17879 nds32_output_stack_pop): Support dwarf exception handling process.
17880 * config/nds32/nds32-protos.h (nds32_dynamic_chain_address): Declare.
17881 * config/nds32/nds32.c (nds32_init_machine_status): Support dwarf
17882 exception handling process.
17883 (nds32_compute_stack_frame): Likewise.
17884 (nds32_return_addr_rtx): Likewise.
17885 (nds32_initial_elimination_offset): Likewise.
17886 (nds32_expand_prologue): Likewise.
17887 (nds32_expand_epilogue): Likewise.
17888 (nds32_dynamic_chain_address): New function.
17889 * config/nds32/nds32.h (machine_function): Add fields for dwarf
17890 exception handling.
17891 (DYNAMIC_CHAIN_ADDRESS): Define.
17892 (EH_RETURN_DATA_REGNO): Define.
17893 (EH_RETURN_STACKADJ_RTX): Define.
17894 * config/nds32/nds32.md (eh_return, nds32_eh_return): Implement
17895 patterns for dwarf exception handling.
17897 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
17899 * config/nds32/nds32.h: Clean up obsolete macros.
17901 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
17903 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
17904 Add enum values for particular instructions.
17905 * config/nds32/nds32-intrinsic.c: Implementation of expanding
17906 particular intrinsic functions.
17907 * config/nds32/nds32-intrinsic.md: Likewise.
17908 * config/nds32/nds32_intrinsic.h: Likewise.
17909 * config/nds32/nds32.h (nds32_builtins): Likewise.
17910 * config/nds32/nds32.md (type): Add pbsad and pbsada.
17911 (btst, ave): New patterns for particular instructions.
17913 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
17915 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
17916 Add enum values for atomic load/store and memory sync.
17917 * config/nds32/nds32-intrinsic.c: Implementation for atomic load/store
17919 * config/nds32/nds32-intrinsic.md: Likewise.
17920 * config/nds32/nds32_intrinsic.h: Likewise.
17921 * config/nds32/nds32.h (nds32_builtins): Likewise.
17923 2018-04-07 Jakub Jelinek <jakub@redhat.com>
17925 PR tree-optimization/85257
17926 * fold-const.c (native_encode_vector): If not all elts could fit
17927 and off is -1, return 0 rather than offset.
17928 * tree-ssa-sccvn.c (vn_reference_lookup_3): Pass
17929 (offseti - offset2) / BITS_PER_UNIT as 4th argument to
17930 native_encode_expr. Verify len * BITS_PER_UNIT >= maxsizei. Don't
17931 adjust buffer in native_interpret_expr call.
17933 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
17935 * config/nds32/constants.md (unspec_volatile_element): Add cache
17936 control enum values.
17937 * config/nds32/nds32-intrinsic.c: Add cache control expand functions.
17938 * config/nds32/nds32-intrinsic.md: Add cache control patterns.
17939 * config/nds32/nds32.c (nds32_cctl_names): New.
17940 (nds32_print_operand): Handle cache control register names.
17941 * config/nds32/nds32.h (nds32_builtins): New enum values.
17942 * config/nds32/nds32_intrinsic.h: Add cache control enum types and
17944 * config/nds32/nds32.md (type): Add mmu.
17945 * config/nds32/pipelines.md (simple_insn): Add mmu.
17947 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
17949 * config/nds32/nds32.md (type): Remove call.
17950 * config/nds32/pipelines.md (simple_insn): Likewise.
17952 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
17954 * config/nds32/constants.md (unspec_volatile_element): Add
17955 UNSPEC_VOLATILE_FMFCSR, UNSPEC_VOLATILE_FMTCSR and
17956 UNSPEC_VOLATILE_FMFCFG.
17957 * config/nds32/nds32-intrinsic.c (bdesc_noarg): New builtin
17958 description for fmfcfg and fmfcsr.
17959 (bdesc_1arg): Add fmtcsr.
17960 (bdesc_2arg): Add fcpynss, fcpyss, fcpynsd and fcpysd.
17961 (nds32_expand_builtin_impl): Deal with FPU intrinsic functions.
17962 * config/nds32/nds32-intrinsic.md (unspec_fcpynsd, unspec_fcpysd,
17963 unspec_fcpynss, unspec_fcpysd, unspec_fcpyss, unspec_fmfcsr,
17964 unspec_fmfcfg): New patterns.
17965 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FMFCFG,
17966 NDS32_BUILTIN_FMFCSR, NDS32_BUILTIN_FMTCSR, NDS32_BUILTIN_FCPYNSS,
17967 NDS32_BUILTIN_FCPYSS,NDS32_BUILTIN_FCPYNSD and NDS32_BUILTIN_FCPYSD.
17968 * config/nds32/nds32_intrinsic.h (__nds32__fcpynsd, __nds32__fcpynss,
17969 __nds32__fcpysd, __nds32__fcpyss, __nds32__fmfcsr, __nds32__fmtcsr,
17970 __nds32__fmfcfg): Define.
17972 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
17974 * config/nds32/nds32.c (nds32_intrinsic_register_names): Add more
17975 intrinsic register names.
17976 * config/nds32/nds32_intrinsic.h (nds32_intrinsic_registers): Add more
17977 intrinsic register enum values and macros.
17979 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
17981 * config/nds32/nds32.c (nds32_legitimate_index_p): Modify condition
17982 for load/store addressing form.
17983 (nds32_print_operand_address): Likewise.
17985 2018-04-06 Eric Botcazou <ebotcazou@adacore.com>
17988 * config/sparc/sparc.c (sparc_expand_move): Deal with symbolic operands
17989 based on LABEL_REF. Remove useless assertion.
17990 (pic_address_needs_scratch): Fix formatting.
17991 (sparc_legitimize_pic_address): Minor tweaks.
17992 (sparc_delegitimize_address): Adjust assertion accordingly.
17993 * config/sparc/sparc.md (movsi_pic_label_ref): Change label_ref_operand
17994 into symbolic_operand.
17995 (movsi_high_pic_label_ref): Likewise.
17996 (movsi_lo_sum_pic_label_ref): Likewise.
17997 (movdi_pic_label_ref): Likewise.
17998 (movdi_high_pic_label_ref): Likewise.
17999 (movdi_lo_sum_pic_label_ref): Likewise.
18001 2018-04-06 Amaan Cheval <amaan.cheval@gmail.com>
18003 * config.gcc (x86_64-*-rtems*): Add rtems.h to tm_file for
18004 custom LIB_SPEC setup.
18006 2018-04-06 Ruslan Bukin <br@bsdpad.com>
18007 Kito Cheng <kito.cheng@gmail.com>
18009 * config.gcc (riscv*-*-freebsd*): Add RISC-V FreeBSD support.
18010 * config/riscv/freebsd.h: New.
18012 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
18014 * config/nds32/nds32.c (nds32_adjust_insn_length): Refine.
18015 * config/nds32/nds32.h (ADJUST_INSN_LENGTH): Change the location in
18018 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
18019 Kito Cheng <kito.cheng@gmail.com>
18021 * config/nds32/nds32-md-auxiliary.c (nds32_output_return,
18022 nds32_output_call, nds32_symbol_binds_local_p): New functions.
18023 * config/nds32/nds32-protos.h (nds32_output_call,
18024 nds32_output_return): Declare.
18025 * config/nds32/nds32.md: Refine all the call and return patterns.
18027 2018-04-06 Jakub Jelinek <jakub@redhat.com>
18030 * dwarf2out.c (rtl_for_decl_init): For STRING_CST initializer only
18031 build CONST_STRING if TYPE_MAX_VALUE is non-NULL and is INTEGER_CST.
18033 PR rtl-optimization/84872
18034 * cfgloopmanip.c (create_preheader): Use make_forwarder_block even if
18035 nentry == 1 when CP_FALLTHRU_PREHEADERS and single_entry is
18036 EDGE_CROSSING edge.
18038 2018-04-06 Tamar Christina <tamar.christina@arm.com>
18040 * expr.c (copy_blkmode_to_reg): Revert 254862.
18041 * doc/sourcebuild.texi (word_mode_no_slow_unalign): Likewise.
18043 2018-04-06 Richard Biener <rguenther@suse.de>
18045 PR middle-end/85244
18046 * tree-dfa.c (get_ref_base_and_extent): Reset seen_variable_array_ref
18047 after seeing a component reference with an adjacent field. Treat
18048 refs to arrays at struct end of external decls similar to
18049 refs to unconstrained commons.
18051 2018-04-06 Jakub Jelinek <jakub@redhat.com>
18054 * fold-const.c (twoval_comparison_p): Remove SAVE_P argument and don't
18055 look through SAVE_EXPRs with non-side-effects argument. Adjust
18057 (fold_comparison): Adjust twoval_comparison_p caller, don't handle
18060 2018-04-06 Richard Biener <rguenther@suse.de>
18062 PR middle-end/85180
18063 * alias.c (find_base_term): New wrapper around find_base_term
18064 unwinding CSELIB_VAL_PTR changes.
18065 (find_base_term): Do not restore CSELIB_VAL_PTR during the
18068 2018-04-06 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
18070 * config/s390/s390.c (s390_z10_optimize_cmp): Expand dedicated NOP
18072 * config/s390/s390.md (UNSPECV_NOP_LR_0, UNSPECV_NOP_LR_1): New
18073 constant definitions.
18074 ("nop"): lr 0,0 -> nopr r0
18075 ("nop_lr0", "nop_lr1"): New insn definitions.
18077 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
18079 * config/nds32/nds32.md (*stack_push, *stack_pop): Use
18080 NDS32_V3PUSH_AVAILABLE_P macro.
18082 2018-04-06 Monk Chiang <sh.chiang04@gmail.com>
18083 Chung-Ju Wu <jasonwucj@gmail.com>
18085 * config.gcc (nds32*-*-*): Add v2j v3f v3s checking.
18086 (nds32*-*-*): Add float and fpu_config into supported_defaults.
18087 * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS):
18088 Include TARGET_DEFAULT_FPU_ISA and TARGET_DEFAULT_FPU_FMA.
18089 * config/nds32/constants.md (unspec_element): Add UNSPEC_COPYSIGN,
18090 UNSPEC_FCPYNSD, UNSPEC_FCPYNSS, UNSPEC_FCPYSD and UNSPEC_FCPYSS.
18091 * config/nds32/constraints.md: New constraints and checking for hard
18092 float configuration.
18093 * config/nds32/iterators.md: New mode iterator and attribute for hard
18094 float configuration.
18095 * config/nds32/nds32-doubleword.md: Use hard float alternatives and
18097 * config/nds32/nds32-fpu.md: New file.
18098 * config/nds32/nds32-md-auxiliary.c: New functions and checkings to
18099 deal with hard float code generation.
18100 * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3F and
18102 (abi_type, float_reg_number): New enum type.
18103 * config/nds32/nds32-predicates.c: New predicates for hard float.
18104 * config/nds32/nds32-protos.h: Declare functions for hard float.
18105 * config/nds32/nds32.c: Implementation for hard float configuration.
18106 * config/nds32/nds32.h: Definitions for hard float configuration.
18107 * config/nds32/nds32.md: Include hard float machine description and
18108 modify patterns for hard float configuration.
18109 * config/nds32/nds32.opt: New options for hard float configuration.
18110 * config/nds32/predicates.md: New predicates for hard float
18113 2018-04-06 Kuan-Lin Chen <kuanlinchentw@gmail.com>
18115 * common/config/nds32/nds32-common.c
18116 (nds32_option_optimization_table): Enable -mreleax-hint by default.
18118 2018-04-05 Jakub Jelinek <jakub@redhat.com>
18120 PR middle-end/85195
18121 * match.pd (BIT_FIELD_REF CONSTRUCTOR@0 @1 @2): Use view_convert around
18122 CONSTRUCTOR_ELT (ctor, ...)->value.
18124 2018-04-05 Uros Bizjak <ubizjak@gmail.com>
18127 * config/i386/i386.md (define_attr "memory"): Handle rotate1 type.
18129 2018-04-05 Tom de Vries <tom@codesourcery.com>
18132 * config/nvptx/nvptx.c (nvptx_single): Fix neutering of bb with only
18135 2018-04-05 Shiva Chen <shiva0217@gmail.com>
18136 Kito Cheng <kito.cheng@gmail.com>
18138 * config/nds32/constraints.md (U33): Fine-tune checking condition.
18139 * config/nds32/nds32-md-auxiliary.c (nds32_mem_format): Ditto.
18140 * config/nds32/nds32.h (nds32_16bit_address_type): Add
18141 ADDRESS_POST_MODIFY_LO_REG_IMM3U.
18143 2018-04-05 Shiva Chen <shiva0217@gmail.com>
18144 Kito Cheng <kito.cheng@gmail.com>
18146 * config/nds32/constraints.md (Ufe): New memory constraint.
18147 * config/nds32/nds32-md-auxiliary.c (nds32_mem_format,
18148 nds32_output_16bit_load): Consider r8 register for lwi45.fe format.
18149 * config/nds32/nds32.c (nds32_print_operand): Output lwi45.fe
18151 * config/nds32/nds32.h (nds32_16bit_address_type): Add ADDRESS_R8_IMM7U.
18152 * config/nds32/nds32.md (*mov<mode>): Adjust pattern.
18154 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
18156 * config/nds32/nds32.md: Use optimize_size in the condition for
18157 alu-shift instructions.
18159 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
18161 * config/nds32/nds32.md (divsi4, udivsi4): New patterns.
18163 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
18165 * config/nds32/nds32.md (negsi2): Refine pattern.
18167 2018-04-05 Kito Cheng <kito.cheng@gmail.com>
18168 Chung-Ju Wu <jasonwucj@gmail.com>
18170 * config/nds32/iterators.md (shift_rotate): New code iterator.
18171 (shift): New code attribute.
18172 * config/nds32/nds32-md-auxiliary.c (nds32_expand_constant): New.
18173 * config/nds32/nds32-protos.h (nds32_expand_constant): Declare.
18174 * config/nds32/nds32.c (nds32_print_operand): Deal with more cases.
18175 * config/nds32/nds32.md (addsi3, *add_srli): Refine implementation for
18176 bit-wise operations.
18177 (andsi3, *andsi3): Ditto.
18178 (iorsi3, *iorsi3, *or_slli, *or_srli): Ditto.
18179 (xorsi3, *xorsi3, *xor_slli, *xor_srli): Ditto.
18180 (<shift>si3, *ashlsi3, *ashrsi3, *lshrsi3, *rotrsi3): Ditto.
18181 * config/nds32/predicates.md (nds32_rimm5u_operand, nds32_and_operand,
18182 nds32_ior_operand, nds32_xor_operand): New predicates.
18184 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
18186 * config/nds32/nds32.md (add<mode>3, sub<mode>3): Rename to ...
18187 (addsi3, subsi3): ... this.
18189 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
18191 * config/nds32/nds32.md (*sub_srli, *and_slli): Fine-tune predicator.
18193 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
18195 * config/nds32/nds32.md: Adjust indention.
18197 2018-04-05 Kito Cheng <kito.cheng@gmail.com>
18199 * config/nds32/nds32.md (feature): New attribute.
18201 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
18203 * config/nds32/nds32.md (subtype): New attribute.
18205 2018-04-04 Thomas Preud'homme <thomas.preudhomme@arm.com>
18208 * config/arm/arm-builtins.c (arm_expand_builtin): Change
18209 expansion to perform a bitwise AND of the argument followed by a
18210 boolean negation of the result.
18212 2018-04-04 Peter Bergner <bergner@vnet.ibm.com>
18214 PR rtl-optimization/84878
18215 * ddg.c (add_cross_iteration_register_deps): Use DF_REF_BB to determine
18216 the basic block. Assert the use reference is not artificial and that
18217 it has an associated insn.
18219 2018-04-04 Michael Matz <matz@suse.de>
18221 * builtins.c (compute_objsize): Pass correct operand
18222 to array_at_struct_end_p.
18224 2018-04-04 Richard Biener <rguenther@suse.de>
18227 * dwarf2out.c (dwarf2out_register_external_die): Peel namespaces
18228 from contexts for DINFO_LEVEL_TERSE and below.
18230 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
18232 * config/nds32/nds32-doubleword.md (move_<mode>): Require
18233 resiter_operand condition.
18234 * config/nds32/nds32.md (*move<mode>): Ditto.
18236 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
18237 Monk Chiang <sh.chiang04@gmail.com>
18239 * config/nds32/nds32.md (movmisalign<mode>): New pattern.
18241 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
18243 * config/nds32/nds32.md (movqi, movhi): Merge into mov<mode>.
18245 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
18246 Kito Cheng <kito.cheng@gmail.com>
18248 * config/nds32/nds32-md-auxiliary.c (nds32_inverse_cond_code,
18249 nds32_cond_code_str, output_cond_branch,
18250 output_cond_branch_compare_zero, nds32_expand_cbranch,
18251 nds32_expand_cstore, nds32_expand_movcc,
18252 nds32_output_cbranchsi4_equality_zero,
18253 nds32_output_cbranchsi4_equality_reg,
18254 nds32_output_cbranchsi4_equality_reg_or_const_int,
18255 nds32_output_cbranchsi4_greater_less_zero: New functions.
18256 * config/nds32/nds32-protos.h (nds32_expand_cbranch,
18257 nds32_expand_cstore, nds32_expand_movcc,
18258 nds32_output_cbranchsi4_equality_zero,
18259 nds32_output_cbranchsi4_equality_reg,
18260 nds32_output_cbranchsi4_equality_reg_or_const_int,
18261 nds32_output_cbranchsi4_greater_less_zero): Declare.
18262 * config/nds32/predicates.md (nds32_movecc_comparison_operator,
18263 nds32_rimm11s_operand): New predicates.
18264 * config/nds32/nds32.h (nds32_expand_result_type): New enum type.
18265 * config/nds32/nds32.md: Rewrite all the branch and conditional move
18268 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
18270 * config/nds32/nds32-doubleword.md: Refine all the instruction type.
18271 * config/nds32/nds32.md: Ditto.
18272 * config/nds32/pipelines.md: Ditto.
18274 2018-04-04 Richard Biener <rguenther@suse.de>
18276 PR tree-optimization/85168
18277 * tree-ssa-sccvn.c (vn_reference_maybe_forwprop_address): Avoid
18278 propagating abnormals.
18280 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
18282 * config/nds32/nds32.md (enabled): Use yes/no for this attribute.
18284 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
18285 Kito Cheng <kito.cheng@gmail.com>
18287 * config/nds32/nds32-md-auxiliary.c (nds32_long_call_p): New function.
18288 * config/nds32/nds32-protos.h (nds32_long_call_p): Declare.
18289 * config/nds32/nds32.c (nds32_function_ok_for_sibcall): New function.
18290 (TARGET_FUNCTION_OK_FOR_SIBCALL): Define.
18291 * config/nds32/nds32.md (sibcall_internal): New.
18292 (sibcall_register): Remove.
18293 (sibcall_immediate): Remove.
18294 (sibcall_value_internal): New.
18295 (sibcall_value_register): Remove.
18296 (sibcall_value_immediate): Remove.
18297 * config/nds32/predicates.md (nds32_general_register_operand): New.
18298 (nds32_call_address_operand): New.
18300 2018-04-03 Jakub Jelinek <jakub@redhat.com>
18302 PR rtl-optimization/85167
18303 * shrink-wrap.c (move_insn_for_shrink_wrap): Don't set bb_uses and
18304 bb_defs if *split_p, instead preinitialize it to NULL.
18306 PR tree-optimization/85156
18307 * builtins.c (fold_builtin_expect): Use save_expr on arg1 to avoid
18308 evaluating the argument multiple times.
18310 2018-04-03 Bill Schmidt <wschmidt@linux.ibm.com>
18312 * config/rs6000/emmintrin.h (_mm_cvtpd_epi32): Use __vector rather
18314 (_mm_cvtpd_ps): Likewise.
18315 (_mm_cvttpd_epi32): Likewise.
18316 * config/rs6000/mmintrin.h (_mm_unpacklo_pi8): Likewise.
18317 * config/rs6000/xmmintrin.h: For strict-ANSI C++ or C11, undefine
18318 vector, pixel, and bool following altivec.h include.
18320 2018-04-03 Martin Sebor <msebor@redhat.com>
18322 * doc/extend.texi (Common Function Attributes): Clarify.
18323 (const attribute): Likewise.
18324 (pure attribute): Likewise.
18326 2018-04-03 Jakub Jelinek <jakub@redhat.com>
18329 * config/i386/i386.c (ix86_expand_vector_set): Use
18330 HOST_WIDE_INT_1U << elt instead of 1 << elt. Formatting fix.
18332 2018-04-03 Uros Bizjak <ubizjak@gmail.com>
18334 * config/i386/i386.c (emit_i387_cw_initialization): Always use logic
18335 instructions when changing rounding bits to preserve precision bits
18336 in the x87 control word.
18338 2018-04-03 Martin Liska <mliska@suse.cz>
18340 PR tree-optimization/82491
18341 * rtl.h (strip_offset_and_add): Replace += suboffset with
18342 poly_uint64 () + suboffset.
18344 2018-03-29 Martin Liska <mliska@suse.cz>
18345 Martin Jambor <mjambor@suse.cz>
18348 * ipa-cp.c (propagate_bits_across_jump_function): Bail out if
18349 param_type is not an integral or pointer type.
18351 2018-04-03 Richard Biener <rguenther@suse.de>
18353 * sese.h (recompute_all_dominators): Remove.
18355 2018-04-02 Martin Sebor <msebor@redhat.com>
18357 * doc/invoke.texi (-Wrestrict): Fix typos.
18359 2018-04-02 Jim Wilson <jimw@sifive.com>
18361 * config/riscv/riscv.h (SHIFT_COUNT_TRUNCATED): Set to zero.
18362 * config/riscv/riscv.md (<optab>si3): Use QImode shift count.
18363 (<optab>di3, <optab>si3_extend): Likewise.
18364 (<optab>si3_mask, <optab>si3_mask_1): New.
18365 (<optab>di3_mask, <optab>di3_mask_1): New.
18366 (<optab>si3_extend_mask, <optab>si3_extend_mask_1): New.
18367 (lshrsi3_zero_extend_1): Use VOIDmode shift count.
18368 * config/riscv/sync.md (atomic_test_and_set): Emit QImode shift count.
18370 2018-04-02 Gerald Pfeifer <gerald@pfeifer.com>
18372 * doc/cpp.texi (Variadic Macros): Fix line continuation in an
18375 2018-04-02 Chung-Ju Wu <jasonwucj@gmail.com>
18377 * config/nds32/nds32.c (TARGET_CANONICALIZE_COMPARISON): Define.
18378 (nds32_canonicalize_comparison): New function.
18380 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
18381 Kito Cheng <kito.cheng@gmail.com>
18382 Kuan-Lin Chen <kuanlinchentw@gmail.com>
18384 * config.gcc (nds32): Add nds32-relax-opt.o into extra_objs.
18385 * config/nds32/constants.md (unspec_volatile_element): Add
18386 UNSPEC_VOLATILE_RELAX_GROUP.
18387 * config/nds32/nds32-relax-opt.c: New file.
18388 * config/nds32/nds32-predicates.c
18389 (nds32_symbol_load_store_p): New function.
18390 * config/nds32/nds32-protos.h
18391 (nds32_symbol_load_store_p): Declare function.
18392 (make_pass_nds32_relax_opt): Declare new rtl pass function.
18393 * config/nds32/nds32.c
18394 (nds32_register_pass): New function to register pass.
18395 (nds32_register_passes): New function to register passes.
18396 * config/nds32/nds32.md (relax_group): New pattern.
18397 * config/nds32/nds32.opt (mrelax-hint): New option.
18398 * config/nds32/t-nds32 (nds32-relax-opt.o): New dependency.
18400 2018-04-01 Kito Cheng <kito.cheng@gmail.com>
18402 * config/nds32/t-nds32: Modify files dependency.
18404 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
18406 * config/nds32/nds32.h (FUNCTION_PROFILER): Output newline character.
18407 (PROFILE_HOOK): Define its implementation.
18409 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
18411 * config/nds32/nds32.h (WCHAR_TYPE, WCHAR_TYPE_SIZE): Use unsigned int
18412 type and 32-bit size.
18414 2018-04-01 Jakub Jelinek <jakub@redhat.com>
18416 PR middle-end/85090
18417 * config/i386/sse.md (V): Add V64QI and V32HI for TARGET_AVX512F.
18418 (V_128_256): New mode iterator.
18419 (*avx512dq_vextract<shuffletype>64x2_1 splitter): New define_split.
18420 (*avx512f_vextract<shuffletype>32x4_1 splitter): Likewise.
18421 (xop_pcmov_<mode><avxsizesuffix>): Use V_128_256 mode iterator instead
18423 * config/i386/i386.c (ix86_expand_vector_set): Improve V32HImode and
18424 V64QImode expansion for !TARGET_AVX512BW && TARGET_AVX512F.
18426 2018-03-31 Segher Boessenkool <segher@kernel.crashing.org>
18429 * config/rs6000/xmmintrin.h (_mm_set_ps, _mm_max_ps): Handle (quiet)
18430 NaN inputs correctly.
18432 2018-03-30 Peter Bergner <bergner@vnet.ibm.com>
18435 * config/rs6000/vsx.md (??r): New mode attribute.
18436 (*vsx_mov<mode>_64bit): Use it.
18437 (*vsx_mov<mode>_32bit): Likewise.
18439 2018-03-30 Martin Sebor <msebor@redhat.com>
18441 PR tree-optimization/84818
18442 * builtins.c (check_access): Use warning_n.
18444 2018-03-30 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
18447 * config/rs6000/rs6000-string.c (expand_compare_loop): Fix redundant
18449 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Fix redundant
18452 2018-03-30 Julia Koval <julia.koval@intel.com>
18455 * x86-tune.def (movx, partial_reg_dependency): Enable for
18458 2018-03-29 Vladimir Makarov <vmakarov@redhat.com>
18460 PR inline-asm/84985
18461 * lra-constraints.c (process_alt_operands): Move setting
18462 this_alternative_matches below.
18464 2018-03-29 Martin Liska <mliska@suse.cz>
18467 * doc/invoke.texi: Document how LTO works with debug info.
18468 Describe auto-load support of binutils. Mention 'x86-64'
18469 as valid option value of -march option.
18471 2018-03-29 Jakub Jelinek <jakub@redhat.com>
18473 * config/i386/sse.md (<avx512>_blendm<mode>): Use <sseintprefix>.
18476 * fold-const.c (operand_equal_p): Handle DEBUG_BEGIN_STMT.
18477 For STATEMENT_LIST, pass down OEP_LEXICOGRAPHIC and maybe
18478 OEP_NO_HASH_CHECK for recursive call, to avoid exponential
18481 2018-03-28 Peter Bergner <bergner@vnet.ibm.com>
18484 * config/rs6000/rs6000.h (RS6000_BTM_POWERPC64): New define.
18485 (RS6000_BTM_COMMON): Add RS6000_BTM_POWERPC64.
18486 * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Add support
18487 for RS6000_BTM_POWERPC64.
18488 (rs6000_invalid_builtin): Add handling for RS6000_BTM_POWERPC64
18489 (rs6000_builtin_mask_names): Add RS6000_BTM_POWERPC64.
18490 * config/rs6000/rs6000-builtin.def (BU_P7_POWERPC64_MISC_2): New macro
18493 (DIVDEU): Likewise.
18495 2018-03-28 Carl Love <cel@us.ibm.com>
18498 2017-09-27 Carl Love <cel@us.ibm.com>
18500 * config/rs6000/rs6000-builtin.def (BU_FP_1MISC_1): Add define macro.
18501 (FCTID, FCTIW): Add BU_FP_MISC_1 macro expansion for builtins.
18502 * config/rs6000/rs6000.md (lrintsfsi2): Add define_insn for the
18505 2018-03-28 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
18507 * config/rs6000/xmmintrin.h (_mm_max_pi16): Use __vector __bool
18508 instead of __vector bool.
18509 (_mm_max_pu8): Likewise.
18510 (_mm_min_pi16): Likewise.
18512 2018-03-28 Peter Bergner <bergner@vnet.ibm.com>
18515 * config/rs6000/rs6000-builtin.def (DIVWEO): Delete macro expansion.
18516 (DIVWEUO): Likewise.
18517 (DIVDEO): Likewise.
18518 (DIVDEUO): Likewise.
18519 * config/rs6000/rs6000.c (builtin_function_type): Remove support for
18520 DIVWEUO and DIVDEUO.
18521 * config/rs6000/rs6000.md (UNSPEC_DIVEO, UNSPEC_DIVEUO): Delete unspecs.
18522 (UNSPEC_DIV_EXTEND): Remove deleted unspecs.
18523 (div_extend): Likewise.
18524 * doc/extend.texi (__builtin_divweo): Remove documentation for deleted
18526 (__builtin_divweuo): Likewise.
18527 (__builtin_divdeo): Likewise.
18528 (__builtin_divdeuo): Likewise.
18530 2018-03-28 Jakub Jelinek <jakub@redhat.com>
18533 * config/i386/i386.md (*add<mode>3_carry_0, *addsi3_carry_zext_0,
18534 *sub<mode>3_carry_0, *subsi3_carry_zext_0): New patterns.
18536 PR tree-optimization/82004
18537 * gimple-match-head.c (optimize_pow_to_exp): New function.
18538 * match.pd (pow(C,x) -> exp(log(C)*x)): Wrap with #if GIMPLE.
18539 Don't fold to exp if optimize_pow_to_exp is false.
18541 2018-03-28 Martin Liska <mliska@suse.cz>
18544 * calls.c (initialize_argument_information): Fix trailing space.
18545 * common.opt: Fix typo and provide better explanation for
18546 -fsanitize-coverage option.
18547 * config/i386/i386.opt: Fix typo.
18549 2018-03-28 Jakub Jelinek <jakub@redhat.com>
18550 Martin Liska <mliska@suse.cz>
18553 * gimplify.c (asan_poison_variable): Don't do the check for
18554 gimplify_omp_ctxp here.
18555 (gimplify_decl_expr): Do it here.
18556 (gimplify_target_expr): Likewise.
18558 2018-03-28 Martin Liska <mliska@suse.cz>
18561 * config/i386/i386.c (ix86_function_arg_advance): Do not call
18562 chkp_type_bounds_count if MPX is not enabled.
18564 2018-03-27 Chung-Ju Wu <jasonwucj@gmail.com>
18566 * config/nds32/nds32.h (BRANCH_COST): Adjust cost.
18568 2018-03-27 Michael Meissner <meissner@linux.vnet.ibm.com>
18571 * config/rs6000/rs6000.c (create_complex_muldiv): New helper
18572 function to create the function decl for complex long double
18573 multiply and divide for -mabi=ieeelongdouble.
18574 (init_float128_ieee): Call it.
18576 2018-03-27 H.J. Lu <hongjiu.lu@intel.com>
18579 * config/i386/i386.c (ix86_trampoline_init): Insert ENDBR for
18580 -fcf-protection=branch -mibt.
18581 * config/i386/i386.h (TRAMPOLINE_SIZE): Increased by 4 bytes.
18583 2018-03-27 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
18586 * config/arm/arm.c (arm_valid_symbolic_address): Handle
18587 arm_word_relocations.
18589 2018-03-27 Cesar Philippidis <cesar@codesourcery.com>
18592 * config/nvptx/nvptx.c (nvptx_assemble_decl_begin): Add '[]' to
18593 extern array declarations.
18595 2018-03-27 Richard Biener <rguenther@suse.de>
18597 PR middle-end/84067
18598 * match.pd ((A * C) +- (B * C) -> (A+-B) * C): Guard with
18599 explicit single_use checks.
18601 2018-03-27 Richard Biener <rguenther@suse.de>
18603 PR tree-optimization/85082
18604 * tree-ssa-sccvn.c (vn_reference_lookup_or_insert_for_pieces):
18607 2018-03-27 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
18609 * config.gcc (aarch64*-*-linux*): New TARGET_DEFAULT_ASYNC_UNWIND_TABLES
18610 * common/config/aarch64/aarch64-common.c (aarch64_optimization_table[]):
18611 Turn on fasynchronous-unwind-tables and funwind-tables.
18613 2018-03-26 Uros Bizjak <ubizjak@gmail.com>
18616 * config/i386/i386.md (*bmi_blsr_<mode>_cmp): New insn pattern.
18617 (*bmi_blsr_<mode>_ccz): Ditto.
18619 2018-03-26 Tom de Vries <tom@codesourcery.com>
18621 PR tree-optimization/85063
18622 * omp-general.c (offloading_function_p): New function. Factor out
18624 * omp-offload.c (pass_omp_target_link::gate): ... here.
18625 * omp-general.h (offloading_function_p): Declare.
18626 * tree-switch-conversion.c (build_one_array): Mark CSWTCH.x variable
18627 with attribute omp declare target for offloading functions.
18629 2018-03-24 Richard Sandiford <richard.sandiford@linaro.org>
18631 PR tree-optimization/84005
18632 * tree-data-ref.h (get_base_for_alignment): Declare.
18633 * tree-data-ref.c (get_base_for_alignment_1): New function.
18634 (get_base_for_alignment): Likewise.
18635 * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Use
18636 get_base_for_alignment to find a suitable base object, instead
18637 of always using drb->base_address.
18639 2018-03-23 Jakub Jelinek <jakub@redhat.com>
18641 PR inline-asm/85022
18642 * emit-rtl.c (init_emit_regs): Indicate that VOIDmode MEMs don't have
18643 known size by default.
18645 2018-03-23 Vladimir Makarov <vmakarov@redhat.com>
18647 PR inline-asm/85030
18648 * lra-constraints.c (process_alt_operands): Don't match BLKmode
18649 and non BLKmode operands.
18651 2018-03-23 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
18654 * config/arm/arm.md (unaligned_loadhis): Remove first alternative.
18655 Clean up attributes.
18657 2018-03-23 Richard Biener <rguenther@suse.de>
18660 * dwarf2out.c (rtl_for_decl_location): Do not generate RTL early when
18661 we are going to emit early debug for LTO.
18663 2018-03-23 Jakub Jelinek <jakub@redhat.com>
18665 PR inline-asm/85034
18666 * function.c (match_asm_constraints_1): Don't optimize if input
18667 doesn't satisfy general_operand predicate for output's mode.
18669 PR inline-asm/85022
18670 * alias.c (write_dependence_p): Don't require for x_canonicalized
18671 non-VOIDmode if x has VOIDmode.
18674 * sanopt.c (maybe_optimize_ubsan_ptr_ifn): If DECL_REGISTER (base),
18675 just don't try to optimize it rather than assert it never happens.
18677 2018-03-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
18679 * config/rs6000/rs6000-builtin.def: Remove various BU_ALTIVEC_X
18680 macro expansions for definition of ST_INTERNAL_<mode> and
18681 LD_INTERNAL_<mode> builtins.
18682 * config/rs6000/rs6000-protos.h (rs6000_address_for_altivec):
18684 * config/rs6000/rs6000.c (altivec_expand_ld_builtin): Delete this
18686 (altivec_expand_st_builtin): Likewise.
18687 (altivec_expand_builtin): Remove calls to deleted functions.
18688 (rs6000_address_for_altivec): Delete this function.
18689 * config/rs6000/vector.md: Remove expands for
18690 vector_altivec_load_<mode> and vector_altivec_store_<mode>.
18692 2018-03-22 Sudakshina Das <sudi.das@arm.com>
18695 * config/arm/arm.h (machine_function): Add static_chain_stack_bytes.
18696 * config/arm/arm.c (arm_compute_static_chain_stack_bytes): Avoid
18697 re-computing once computed.
18698 (arm_expand_prologue): Compute machine->static_chain_stack_bytes.
18699 (arm_init_machine_status): Initialize
18700 machine->static_chain_stack_bytes.
18702 2018-03-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
18705 * doc/extend.texi: Add four new prototypes for vec_ld.
18706 * config/rs6000/rs6000-builtin.def (LVX_V1TI): Reorder symbol
18707 definitions for more logical presentation.
18708 * config/rs6000/rs6000-c.c: (altivec_overloaded_builtins): Add
18709 entries for V1TI variants of __builtin_altivec_ld builtin.
18710 * config/rs6000/rs6000.c: (altivec_expand_lv_builtin): Add test and
18711 handling of V1TI variant of LVX icode pattern.
18712 (altivec_expand_builtin): Add case for ALTIVEC_BUILTIN_LVX_V1TI.
18713 (rs6000_gimple_fold_builtin): Likewise.
18714 (altivec_init_builtins): Add code to define
18715 __builtin_altivec_lvx_v1ti function.
18717 2018-03-22 Jakub Jelinek <jakub@redhat.com>
18719 PR inline-asm/84941
18720 * function.c (match_asm_constraints_1): Don't do the optimization
18721 if input isn't a REG, SUBREG, MEM or constant.
18723 2018-03-22 Tom de Vries <tom@codesourcery.com>
18725 PR tree-optimization/84956
18726 * tree-ssa-tail-merge.c (find_clusters_1): Skip bbs with
18727 bb_has_abnormal_pred.
18729 2018-03-22 Jakub Jelinek <jakub@redhat.com>
18732 * dwarf2asm.c (dw2_output_indirect_constant_1): Set
18733 DECL_INITIAL (decl) to decl at the end.
18734 * varasm.c (use_blocks_for_decl_p): Revert the 2018-03-20 change,
18735 adjust the comment.
18737 2018-03-21 Joseph Myers <joseph@codesourcery.com>
18739 * doc/extend.texi (__builtin_tgmath): Document when complex
18740 integer types are treated as _Complex _Float64.
18742 2018-03-21 Tom de Vries <tom@codesourcery.com>
18744 * doc/extend.texi (__builtin_extend_pointer): Remove pasto.
18746 2018-03-21 Jakub Jelinek <jakub@redhat.com>
18748 PR tree-optimization/84960
18749 * tree-cfg.c (remove_bb): Don't move forced labels into bb->prev_bb
18750 if it is ENTRY block, move them into single succ of ENTRY in that case.
18752 2018-03-21 Richard Sandiford <richard.sandiford@linaro.org>
18754 PR tree-optimization/84811
18755 * poly-int.h (poly_span_traits): Remove the T3 parameter and
18756 promote HOST_WIDE_INT T2 - T1 results to unsigned HOST_WIDE_INT.
18757 (maybe_in_range_p, known_in_range_p, ranges_known_overlap_p):
18758 (known_subrange_p): Update accordingly. Cast each value involved
18759 in the size comparison, rather than casting the result of the
18762 2018-03-21 Jakub Jelinek <jakub@redhat.com>
18764 PR tree-optimization/84982
18765 * gimple-ssa-store-merging.c (invert_op): Handle boolean inversion
18766 by flipping the least significant bit rather than all bits from
18767 bitpos to bitpos + bitsize - 1.
18769 2018-03-21 Nathan Sidwell <nathan@acm.org>
18771 * doc/extend.texi (Deprecated Features): Remove mention of
18772 long-deleted deprecations.
18774 2018-03-21 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
18777 * configure.ac (gcc_cv_ld_soname) <*-*-solaris2*>: Set.
18778 * configure: Regenerate.
18780 2018-03-21 Tom de Vries <tom@codesourcery.com>
18782 PR tree-optimization/83126
18783 * tree-parloops.c (num_phis): New function.
18784 (gen_parallel_loop): Detect and handle canonicalize_loop_ivs failure.
18786 2018-03-21 Nathan Sidwell <nathan@acm.org>
18788 * doc/extend.texi (Deprecated Features): Update deprecated flags,
18789 mention anon-struct/union members and trailing attributes.
18791 2018-03-21 Bin Cheng <bin.cheng@arm.com>
18793 PR tree-optimization/84969
18794 * tree-loop-distribution.c (fuse_memset_builtins): Don't reorder
18795 builtin memset partitions if they set different rhs values.
18797 2018-03-21 Jakub Jelinek <jakub@redhat.com>
18799 PR rtl-optimization/84989
18800 * simplify-rtx.c (simplify_unary_operation_1): Don't try to simplify
18801 VEC_DUPLICATE with scalar result mode.
18803 2018-03-21 Martin Liska <mliska@suse.cz>
18806 * ipa-icf.c (sem_item_optimizer::fixup_points_to_sets): Remove
18807 not intended return statement.
18809 2018-03-21 Martin Liska <mliska@suse.cz>
18812 * tree-chkp.c (CHKP_ARRAY_MAX_CHECK_STEPS): Define a new macro.
18813 (chkp_find_bound_slots_1): Limit number of iterations.
18815 2018-03-20 David H. Gutteridge <dhgutteridge@sympatico.ca>
18818 * Minor grammar fixes for x86 options.
18820 2018-03-20 Jakub Jelinek <jakub@redhat.com>
18823 * dce.c (delete_unmarked_insns): Don't remove frame related noop moves
18824 holding REG_CFA_RESTORE notes, instead turn them into a USE.
18826 2018-03-20 Peter Bergner <bergner@vnet.ibm.com>
18829 * config/rs6000/altivec.md (altivec_lvx_<mode>_2op): Delete define_insn.
18830 (altivec_lvx_<mode>_1op): Likewise.
18831 (altivec_stvx_<mode>_2op): Likewise.
18832 (altivec_stvx_<mode>_1op): Likewise.
18833 (altivec_lvx_<VM2:mode>): New define_expand.
18834 (altivec_stvx_<VM2:mode>): Likewise.
18835 (altivec_lvx_<VM2:mode>_2op_<P:mptrsize>): New define_insn.
18836 (altivec_lvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
18837 (altivec_stvx_<VM2:mode>_2op_<P:mptrsize>): Likewise.
18838 (altivec_stvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
18839 * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Use new expanders.
18840 (rs6000_gen_lvx): Likewise.
18841 * config/rs6000/rs6000.c (altivec_expand_lv_builtin): Likewise.
18842 (altivec_expand_stv_builtin): Likewise.
18843 (altivec_expand_builtin): Likewise.
18844 * config/rs6000/vector.md: Likewise.
18846 2018-03-20 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
18849 * config/arm/arm.c (arm_array_mode_supported_p): Return false for
18852 2018-03-20 Richard Biener <rguenther@suse.de>
18855 * config/i386/i386.c (ix86_add_stmt_cost): Only cost
18856 sign-conversions as zero, fall back to standard scalar_stmt
18859 2018-03-20 Martin Liska <mliska@suse.cz>
18862 * predict.c (rebuild_frequencies): Handle case when we have
18863 PROFILE_ABSENT, but flag_guess_branch_prob is false.
18865 2018-03-20 Jakub Jelinek <jakub@redhat.com>
18868 * dwarf2asm.c (dw2_output_indirect_constant_1): Temporarily turn off
18869 flag_section_anchors.
18870 * varasm.c (use_blocks_for_decl_p): Remove hack for
18871 dw2_force_const_mem.
18874 * config/aarch64/aarch64.md (*aarch64_reg_<mode>3_neg_mask2): Rename
18876 (*aarch64_<optab>_reg_<mode>3_neg_mask2): ... this. If pseudos can't
18877 be created, use lowpart_subreg of operands[0] rather than operands[0]
18879 (*aarch64_reg_<mode>3_minus_mask): Rename to ...
18880 (*aarch64_ashl_reg_<mode>3_minus_mask): ... this.
18881 (*aarch64_<optab>_reg_di3_mask2): Use const_int_operand predicate
18882 and n constraint instead of aarch64_shift_imm_di and Usd.
18883 (*aarch64_reg_<optab>_minus<mode>3): Rename to ...
18884 (*aarch64_<optab>_reg_minus<mode>3): ... this.
18886 2018-03-20 Sudakshina Das <sudi.das@arm.com>
18889 * config/arm/neon.md (ashldi3_neon): Update ?s for constraints
18890 to favor GPR over NEON registers.
18891 (<shift>di3_neon): Likewise.
18893 2018-03-20 Tom de Vries <tom@codesourcery.com>
18896 * config/nvptx/nvptx.c (nvptx_single): Don't neuter bar.sync.
18897 (nvptx_process_pars): Emit bar.sync asap and alap.
18899 2018-03-20 Tom de Vries <tom@codesourcery.com>
18902 * config/nvptx/nvptx.c (prevent_branch_around_nothing): Also update
18903 seen_label if seen_label is already set.
18905 2018-03-20 Jakub Jelinek <jakub@redhat.com>
18908 * config/i386/i386.c (fold_builtin_cpu): For features above 31
18909 use __cpu_features2 variable instead of __cpu_model.__cpu_features[0].
18910 Use 1U instead of 1. Formatting fixes.
18913 * builtins.c (fold_builtin_strpbrk): For strpbrk(x, "") use type
18914 instead of TREE_TYPE (s1) for the return value.
18916 2018-03-19 Jakub Jelinek <jakub@redhat.com>
18918 PR tree-optimization/84946
18919 * gimple-ssa-store-merging.c (mem_valid_for_store_merging): Compute
18920 bitsize + bitsize in poly_uint64 rather than poly_int64.
18923 * dwarf2asm.c: Include fold-const.c.
18924 (dw2_output_indirect_constant_1): Set DECL_INITIAL (decl) to ADDR_EXPR
18925 of decl rather than decl itself.
18927 PR rtl-optimization/84643
18928 * memmodel.h (enum memmodel): Add MEMMODEL_MAX enumerator.
18930 2018-03-19 Maxim Ostapenko <m.ostapenko@samsung.com>
18933 * dwarf2asm.c (dw2_output_indirect_constant_1): Disable ASan before
18934 calling assemble_variable.
18936 2018-03-19 Sudakshina Das <sudi.das@arm.com>
18939 * config/aarch64/aarch64-simd.md (vec_cmp<mode><v_int_equiv>): Modify
18940 instructions for UNLT, UNLE, UNGT, UNGE, UNEQ, UNORDERED and ORDERED.
18942 2018-03-19 Jim Wilson <jimw@sifive.com>
18945 * config/riscv/riscv.c (riscv_function_arg_boundary): Use
18946 PREFERRED_STACK_BOUNDARY instead of STACK_BOUNDARY.
18947 (riscv_first_stack_step): Likewise.
18948 (riscv_option_override): Use STACK_BOUNDARY instead of
18949 MIN_STACK_BOUNDARY.
18950 * config/riscv/riscv.h (STACK_BOUNDARY): Renamed from
18951 MIN_STACK_BOUNDARY.
18952 (BIGGEST_ALIGNMENT): Set to 128.
18953 (PREFERRED_STACK_BOUNDARY): Renamed from STACK_BOUNDARY.
18954 (RISCV_STACK_ALIGN): Use PREFERRED_STACK_BOUNDARY instead of
18957 2018-03-19 Richard Biener <rguenther@suse.de>
18959 PR tree-optimization/84933
18960 * tree-vrp.c (set_and_canonicalize_value_range): Treat out-of-bound
18961 values as -INF/INF when canonicalizing an ANTI_RANGE to a RANGE.
18963 2018-03-19 Richard Biener <rguenther@suse.de>
18965 PR tree-optimization/84859
18966 * tree-ssa-phiopt.c (single_trailing_store_in_bb): New function.
18967 (cond_if_else_store_replacement): Perform sinking operation on
18968 single-store BBs regardless of MAX_STORES_TO_SINK setting.
18969 Generalize what a BB with a single eligible store is.
18971 2018-03-19 Richard Biener <rguenther@suse.de>
18973 PR tree-optimization/84929
18974 * tree-data-ref.c (analyze_siv_subscript_cst_affine): Guard
18975 chrec_is_positive against non-chrec arg.
18977 2018-03-19 Tamar Christina <tamar.christina@arm.com>
18980 * config/arm/arm.c (arm_can_change_mode_class): revert r258554.
18982 2018-03-18 Martin Liska <mliska@suse.cz>
18984 PR rtl-optimization/84635
18985 * regrename.c (build_def_use): Use matches_mode only when
18988 2018-03-18 Richard Sandiford <richard.sandiford@linaro.org>
18990 PR tree-optimization/84913
18991 * tree-vect-loop.c (vectorizable_reduction): Don't try to
18992 vectorize chains of COND_EXPRs.
18994 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
18996 * config/nds32/nds32.h (MAX_REGS_PER_ADDRESS): Fix the value.
18998 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
19000 * config/nds32/nds32.h (LOGICAL_OP_NON_SHORT_CIRCUIT): Define.
19002 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
19004 * config/nds32/nds32.h (CLZ_DEFINED_VALUE_AT_ZERO): Define.
19006 2018-03-17 Chung-Ju Wu <jasonwucj@gmail.com>
19007 Kito Cheng <kito.cheng@gmail.com>
19009 * config/nds32/nds32-protos.h (nds32_adjust_reg_alloc_order): Declare.
19010 * config/nds32/nds32.c (nds32_reg_alloc_order_for_speed): New array.
19011 (nds32_adjust_reg_alloc_order): New function.
19012 * config/nds32/nds32.h (ADJUST_REG_ALLOC_ORDER): Define.
19014 2018-03-17 Kito Cheng <kito.cheng@gmail.com>
19016 * config/nds32/nds32.c (nds32_asm_output_mi_thunk,
19017 nds32_print_operand, nds32_print_operand_address): Use
19018 HOST_WIDE_INT_PRINT_DEC instead.
19020 2018-03-17 Chung-Ju Wu <jasonwucj@gmail.com>
19022 * config/nds32/nds32.c (nds32_register_priority): Modify cost.
19024 2018-03-17 Jakub Jelinek <jakub@redhat.com>
19027 * config/i386/i386.c (initial_ix86_tune_features,
19028 initial_ix86_arch_features): Use unsigned HOST_WIDE_INT rather than
19029 unsigned long long.
19030 (set_ix86_tune_features): Change ix86_tune_mask from unsigned int
19031 to unsigned HOST_WIDE_INT, initialize to HOST_WIDE_INT_1U << ix86_tune
19032 rather than 1u << ix86_tune. Formatting fix.
19033 (ix86_option_override_internal): Change ix86_arch_mask from
19034 unsigned int to unsigned HOST_WIDE_INT, initialize to
19035 HOST_WIDE_INT_1U << ix86_arch rather than 1u << ix86_arch.
19036 (ix86_function_specific_restore): Likewise.
19038 2018-03-16 Jakub Jelinek <jakub@redhat.com>
19041 * postreload.c (reload_combine_recognize_pattern): Perform
19042 INTVAL addition in unsigned HOST_WIDE_INT type to avoid UB and
19043 truncate_int_for_mode the result for the destination's mode.
19046 * hsa-gen.c (mem_type_for_type): Fix comment typo.
19047 * tree-vect-loop-manip.c (vect_create_cond_for_niters_checks):
19049 * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
19052 2018-03-16 Vladimir Makarov <vmakarov@redhat.com>
19055 * lra-assigns.c (lra_split_hard_reg_for): Don't use
19056 regno_allocno_class_array and sorted_pseudos.
19057 * lra-constraints.c (spill_hard_reg_in_range): Ignore hard regs in
19058 insns where regno is used.
19060 2018-03-16 Martin Liska <mliska@suse.cz>
19063 * multiple_target.c (create_dispatcher_calls): Redirect
19064 reference in the symbol table.
19066 2018-03-16 Martin Liska <mliska@suse.cz>
19069 * multiple_target.c (create_dispatcher_calls): Redirect also
19072 2018-03-16 Jakub Jelinek <jakub@redhat.com>
19076 * tree.h (TARGET_EXPR_NO_ELIDE): Define.
19077 * gimplify.c (gimplify_modify_expr_rhs): Don't elide TARGET_EXPRs with
19078 TARGET_EXPR_NO_ELIDE flag set unless *expr_p is INIT_EXPR.
19080 2018-03-16 Julia Koval <julia.koval@intel.com>
19082 * doc/invoke.texi (Skylake Server): Add CLWB.
19083 Cannonlake): Remove CLWB.
19085 2018-03-16 Jakub Jelinek <jakub@redhat.com>
19087 PR tree-optimization/84841
19088 * tree-ssa-reassoc.c (INTEGER_CONST_TYPE): Change to 1 << 4 from
19090 (FLOAT_ONE_CONST_TYPE): Define.
19091 (constant_type): Return FLOAT_ONE_CONST_TYPE for -1.0 and 1.0.
19092 (sort_by_operand_rank): Put entries with higher constant_type last
19093 rather than first to match comments.
19095 2018-03-15 Sandra Loosemore <sandra@codesourcery.com>
19097 * config/nios2/nios2.md (movsi_internal): Fix thinko in
19100 2018-03-15 Jakub Jelinek <jakub@redhat.com>
19103 * calls.c (expand_call): For TREE_ADDRESSABLE rettype ignore alignment
19104 check and use address of target always.
19106 2018-03-15 H.J. Lu <hongjiu.lu@intel.com>
19109 * config/i386/i386.c (indirect_thunk_needed): Update comments.
19110 (indirect_thunk_bnd_needed): Likewise.
19111 (indirect_thunks_used): Likewise.
19112 (indirect_thunks_bnd_used): Likewise.
19113 (indirect_return_needed): New.
19114 (indirect_return_bnd_needed): Likewise.
19115 (output_indirect_thunk_function): Add a bool argument for
19117 (output_indirect_thunk_function): Don't generate alias for
19118 function return thunk.
19119 (ix86_code_end): Call output_indirect_thunk_function to generate
19120 function return thunks.
19121 (ix86_output_function_return): Set indirect_return_bnd_needed
19122 and indirect_return_needed instead of indirect_thunk_bnd_needed
19123 and indirect_thunk_needed.
19125 2018-03-15 Olga Makhotina <olga.makhotina@intel.com>
19127 * config/i386/sgxintrin.h (_enclv_u32): New intrinsic.
19128 (__enclv_bc, __enclv_cd, __enclv_generic): New definitions.
19129 (ERDINFO, ETRACKC, ELDBC, ELDUC): New leaves.
19131 2018-03-15 David Malcolm <dmalcolm@redhat.com>
19132 Paul Hua <paul.hua.gm@gmail.com>
19135 * gcc.dg/fixits-pr84852-1.c: Fix filename in dg-regexp.
19137 2018-03-15 Segher Boessenkool <segher@kernel.crashing.org>
19139 * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add back the
19140 TARGET_DOUBLE_FLOAT and TARGET_SINGLE_FLOAT conditions on the DFmode
19141 resp. SFmode cases.
19143 2018-03-15 Tamar Christina <tamar.christina@arm.com>
19146 * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
19147 instead of GET_MODE_SIZE when comparing Units.
19149 2018-03-15 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
19152 * varasm.c (hash_section): Return an unchangeble hash value
19153 * config/aarch64/aarch64.c (aarch64_use_blocks_for_constant_p):
19154 Return !aarch64_can_use_per_function_literal_pools_p ().
19156 2018-03-15 Jakub Jelinek <jakub@redhat.com>
19159 * optabs.c (emit_conditional_move): Pass address of cmode's copy
19160 rather than address of cmode as last argument to prepare_cmp_insn.
19162 2018-03-15 Julia Koval <julia.koval@intel.com>
19164 * config/i386/i386.c (F_AVX512VBMI2, F_GFNI, F_VPCLMULQDQ,
19165 F_AVX512VNNI, F_AVX512BITALG): New.
19167 2018-03-14 John David Anglin <danglin@gcc.gnu.org>
19170 * config/pa/pa.c (pa_emit_move_sequence): Always emit secondary reload
19171 insn for floating-point loads and stores.
19173 2018-03-14 Carl Love <cel@us.ibm.com>
19175 * config/rs6000/rs6000-c.c: Add macro definitions for
19176 ALTIVEC_BUILTIN_VEC_PERMXOR.
19177 * config/rs6000/rs6000.h: Add #define for vec_permxor builtin.
19178 * config/rs6000/rs6000-builtin.def: Add macro expansions for VPERMXOR.
19179 * config/rs6000/altivec.md (altivec_vpermxor): New define expand.
19180 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Add case
19182 * config/doc/extend.texi: Add prototypes for vec_permxor.
19184 2018-03-14 David Malcolm <dmalcolm@redhat.com>
19187 * diagnostic-show-locus.c (class layout_point): Convert m_line
19188 from int to linenum_type.
19189 (line_span::comparator): Use linenum "compare" function when
19190 comparing line numbers.
19191 (test_line_span): New function.
19192 (layout_range::contains_point): Convert param "row" from int to
19194 (layout_range::intersects_line_p): Likewise.
19195 (layout::will_show_line_p): Likewise.
19196 (layout::print_source_line): Likewise.
19197 (layout::should_print_annotation_line_p): Likewise.
19198 (layout::print_annotation_line): Likewise.
19199 (layout::print_leading_fixits): Likewise.
19200 (layout::annotation_line_showed_range_p): Likewise.
19201 (struct line_corrections): Likewise for field m_row.
19202 (line_corrections::line_corrections): Likewise for param "row".
19203 (layout::print_trailing_fixits): Likewise.
19204 (layout::get_state_at_point): Likewise.
19205 (layout::get_x_bound_for_row): Likewise.
19206 (layout::print_line): Likewise.
19207 (diagnostic_show_locus): Likewise for locals "last_line" and "row".
19208 (selftest::diagnostic_show_locus_c_tests): Call test_line_span.
19209 * input.c (selftest::test_linenum_comparisons): New function.
19210 (selftest::input_c_tests): Call it.
19211 * selftest.c (selftest::test_assertions): Test ASSERT_GT,
19212 ASSERT_GT_AT, ASSERT_LT, and ASSERT_LT_AT.
19213 * selftest.h (ASSERT_GT): New macro.
19214 (ASSERT_GT_AT): New macro.
19215 (ASSERT_LT): New macro.
19216 (ASSERT_LT_AT): New macro.
19218 2018-03-14 Segher Boessenkool <segher@kernel.crashing.org>
19220 PR rtl-optimization/84780
19221 * combine.c (distribute_links): Don't make a link based on pc_rtx.
19223 2018-03-14 Martin Liska <mliska@suse.cz>
19225 * tree.c (record_node_allocation_statistics): Use
19226 get_stats_node_kind.
19227 (get_stats_node_kind): New function extracted from
19228 record_node_allocation_statistics.
19229 (free_node): Use get_stats_node_kind.
19231 2018-03-14 Richard Biener <rguenther@suse.de>
19233 * tree-ssa-pre.c (compute_antic_aux): Remove code that asserts
19234 that the value-set of ANTIC_IN doesn't grow.
19237 * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
19239 (BB_VISITED_WITH_VISITED_SUCCS): New define.
19240 (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
19242 2018-03-14 Julia Koval <julia.koval@intel.com>
19244 * config.gcc (icelake-client, icelake-server): New.
19246 * config/i386/i386.c (initial_ix86_tune_features): Extend to 64 bit.
19247 (initial_ix86_arch_features): Ditto.
19248 (PTA_SKYLAKE): Add SGX.
19249 (PTA_ICELAKE): Remove.
19250 (PTA_ICELAKE_CLIENT): New.
19251 (PTA_ICELAKE_SERVER): New.
19252 (ix86_option_override_internal): Split up icelake on icelake client and
19254 (get_builtin_code_for_version): Ditto.
19255 (fold_builtin_cpu): Ditto.
19256 * config/i386/driver-i386.c (config/i386/driver-i386.c): Ditto.
19257 * config/i386/i386-c.c (ix86_target_macros_internal): Ditto
19258 * config/i386/i386.h (processor_type): Ditto.
19259 * doc/invoke.texi: Ditto.
19261 2018-03-14 Jakub Jelinek <jakub@redhat.com>
19264 * sanopt.c (maybe_optimize_ubsan_ptr_ifn): Handle also
19265 INTEGER_CST offset, add it together with bitpos / 8 and
19266 sign extend based on POINTER_SIZE.
19270 2017-04-20 Uros Bizjak <ubizjak@gmail.com>
19273 * config/i386/constraints.md (Yc): New register constraint.
19274 * config/i386/i386.md (*float<SWI48:mode><MODEF:mode>2_mixed):
19275 Use Yc constraint for alternative 2 of operand 0. Remove
19276 preferred_for_speed attribute.
19278 2018-03-14 Richard Biener <rguenther@suse.de>
19280 PR tree-optimization/84830
19281 * tree-ssa-pre.c (compute_antic_aux): Intersect the new ANTIC_IN
19282 with the old one to avoid oscillations.
19284 2018-03-13 Vladimir Makarov <vmakarov@redhat.com>
19287 * lra-assigns.c (find_all_spills_for): Ignore uninteresting
19289 (assign_by_spills): Return a flag of reload assignment failure.
19290 Do not process the reload assignment failures. Do not spill other
19291 reload pseudos if they has the same reg class. Update n if
19293 (lra_assign): Add a return arg. Set up from the result of
19294 assign_by_spills call.
19295 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
19296 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
19297 usage_insns if it is not NULL.
19298 (spill_hard_reg_in_range): New function.
19299 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
19300 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
19301 function prototypes.
19302 (lra_assign): Change prototype.
19303 * lra.c (lra): Add code to deal with fails by splitting hard reg
19306 2018-03-01 Palmer Dabbelt <palmer@sifive.com>
19308 * config/riscv/riscv.opt (mrelax): New option.
19309 * config/riscv/riscv.c (riscv_file_start): Emit ".option
19310 "norelax" when riscv_mrelax is disabled.
19311 * doc/invoke.texi (RISC-V): Document "-mrelax" and "-mno-relax".
19313 2018-03-13 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
19316 * config/rs6000/rs6000.c (rs6000_reassociation_width): Disable parallel
19317 reassociation for int modes.
19319 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
19321 * tree-vect-loop-manip.c (vect_maybe_permute_loop_masks):
19322 Reverse the choice between VEC_UNPACK_LO_EXPR and VEC_UNPACK_HI_EXPR
19324 * config/aarch64/iterators.md (hi_lanes_optab): New int attribute.
19325 * config/aarch64/aarch64-sve.md
19326 (*aarch64_sve_<perm_insn><perm_hilo><mode>): Rename to...
19327 (aarch64_sve_<perm_insn><perm_hilo><mode>): ...this.
19328 (*extend<mode><Vwide>2): Rename to...
19329 (aarch64_sve_extend<mode><Vwide>2): ...this.
19330 (vec_unpack<su>_<perm_hilo>_<mode>): Turn into a define_expand,
19331 renaming the old pattern to...
19332 (aarch64_sve_punpk<perm_hilo>_<mode>): ...this. Only define
19334 (vec_unpack<su>_<perm_hilo>_<SVE_BHSI:mode>): Turn into a
19335 define_expand, renaming the old pattern to...
19336 (aarch64_sve_<su>unpk<perm_hilo>_<SVE_BHSI:mode>): ...this.
19337 (*vec_unpacku_<perm_hilo>_<mode>_no_convert): Delete.
19338 (vec_unpacks_<perm_hilo>_<mode>): Take BYTES_BIG_ENDIAN into
19339 account when deciding which SVE instruction the optab should use.
19340 (vec_unpack<su_optab>_float_<perm_hilo>_vnx4si): Likewise.
19342 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
19344 * config/aarch64/aarch64.md (V4_REGNUM, V8_REGNUM, V12_REGNUM)
19345 (V20_REGNUM, V24_REGNUM, V28_REGNUM, P1_REGNUM, P2_REGNUM, P3_REGNUM)
19346 (P4_REGNUM, P5_REGNUM, P6_REGNUM, P8_REGNUM, P9_REGNUM, P10_REGNUM)
19347 (P11_REGNUM, P12_REGNUM, P13_REGNUM, P14_REGNUM): New define_constants.
19348 (tlsdesc_small_<mode>): Turn a define_expand and use
19349 tlsdesc_small_sve_<mode> for SVE. Rename original define_insn to...
19350 (tlsdesc_small_advsimd_<mode>): ...this.
19351 (tlsdesc_small_sve_<mode>): New pattern.
19353 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
19355 * config/aarch64/iterators.md (UNSPEC_SMUL_HIGHPART)
19356 (UNSPEC_UMUL_HIGHPART): New constants.
19357 (MUL_HIGHPART): New int iteraor.
19358 (su): Handle UNSPEC_SMUL_HIGHPART and UNSPEC_UMUL_HIGHPART.
19359 * config/aarch64/aarch64-sve.md (<su>mul<mode>3_highpart): New
19361 (*<su>mul<mode>3_highpart): New define_insn.
19363 2018-03-13 Eric Botcazou <ebotcazou@adacore.com>
19366 * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
19369 2018-03-13 Martin Liska <mliska@suse.cz>
19372 * (sem_item_optimizer::sem_item_optimizer): Initialize new
19374 (sem_item_optimizer::~sem_item_optimizer): Release it.
19375 (sem_item_optimizer::merge_classes): Register variable aliases.
19376 (sem_item_optimizer::fixup_pt_set): New function.
19377 (sem_item_optimizer::fixup_points_to_sets): Likewise.
19378 * ipa-icf.h: Declare new variables and functions.
19380 2018-03-13 Jakub Jelinek <jakub@redhat.com>
19382 PR middle-end/84834
19383 * match.pd ((A & C) != 0 ? D : 0): Use INTEGER_CST@2 instead of
19384 integer_pow2p@2 and test integer_pow2p in condition.
19385 (A < 0 ? C : 0): Similarly for @1.
19387 PR middle-end/84831
19388 * stmt.c (parse_output_constraint): If the CONSTRAINT_LEN (*p, p)
19389 characters starting at p contain '\0' character, don't look beyond
19393 * config/i386/i386.md (round<mode>2): For 387 fancy math, disable
19394 pattern if -ftrapping-math -fno-fp-int-builtin-inexact.
19397 * reg-stack.c (change_stack): Change update_end var from int to
19398 rtx_insn *, if non-NULL don't update just BB_END (current_block), but
19399 also call set_block_for_insn on the newly added insns and rescan.
19402 * config/i386/sse.md (sse2_loadhpd): Use Yv constraint rather than v
19403 on the last operand.
19406 * tree.c (stabilize_reference_1): Return save_expr (e) for
19407 STATEMENT_LIST even if it doesn't have side-effects.
19409 2018-03-12 Jonathan Wakely <jwakely@redhat.com>
19411 * doc/invoke.texi (-mclflushopt): Fix spelling of option.
19413 2018-03-12 Renlin Li <renlin.li@arm.com>
19415 * config/aarch64/aarch64.md (movhf_aarch64): Fix mode argument to
19416 aarch64_output_scalar_simd_mov_immediate.
19418 2018-03-12 Martin Sebor <msebor@redhat.com>
19420 PR tree-optimization/83456
19421 * gimple-fold.c (gimple_fold_builtin_memory_op): Avoid warning
19422 for perfectly overlapping calls to memcpy.
19423 (gimple_fold_builtin_memory_chk): Same.
19424 (gimple_fold_builtin_strcpy): Handle no-warning.
19425 (gimple_fold_builtin_stxcpy_chk): Same.
19426 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Handle no-warning.
19428 2018-03-12 Segher Boessenkool <segher@kernel.crashing.org>
19430 * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add bool "named"
19431 parameter. Use it for SFmode.
19432 (rs6000_function_arg_advance_1): Adjust.
19433 (rs6000_function_arg): Adjust.
19434 (rs6000_gimplify_va_arg): Pass false for that new parameter.
19436 2018-03-12 Segher Boessenkool <segher@kernel.crashing.org>
19438 PR rtl-optimization/84169
19439 PR rtl-optimization/84780
19440 * combine.c (can_combine_p): Check for a 2-insn combination whether
19441 the destination register is used between the two insns, too.
19443 2018-03-12 Richard Biener <rguenther@suse.de>
19445 PR tree-optimization/84803
19446 * tree-if-conv.c (ifcvt_memrefs_wont_trap): Don't do anything
19447 for refs DR analysis didn't process.
19449 2018-03-12 Richard Biener <rguenther@suse.de>
19451 PR tree-optimization/84777
19452 * tree-ssa-loop-ch.c (should_duplicate_loop_header_p): For
19453 force-vectorize loops ignore whether we are optimizing for size.
19455 2018-03-12 Chung-Ju Wu <jasonwucj@gmail.com>
19457 * config/nds32/nds32.c (nds32_md_asm_adjust): New function.
19458 (TARGET_MD_ASM_ADJUST): Define.
19460 2018-03-12 Monk Chiang <sh.chiang04@gmail.com>
19461 Kito Cheng <kito.cheng@gmail.com>
19462 Chung-Ju Wu <jasonwucj@gmail.com>
19464 * config/nds32/nds32.c (nds32_compute_stack_frame,
19465 nds32_emit_stack_push_multiple, nds32_emit_stack_pop_multiple,
19466 nds32_emit_stack_v3push, nds32_emit_stack_v3pop,
19467 nds32_emit_adjust_frame, nds32_expand_prologue, nds32_expand_epilogue,
19468 nds32_expand_prologue_v3push, nds32_expand_epilogue_v3pop): Refine.
19469 * config/nds32/nds32.h (NDS32_FIRST_CALLEE_SAVE_GPR_REGNUM,
19470 NDS32_LAST_CALLEE_SAVE_GPR_REGNUM, NDS32_V3PUSH_AVAILABLE_P): New.
19471 * config/nds32/nds32.md (prologue, epilogue): Use macro
19472 NDS32_V3PUSH_AVAILABLE_P to do checking.
19474 2018-03-11 Jakub Jelinek <jakub@redhat.com>
19477 * dwarf2out.c (gen_enumeration_type_die): Don't guard adding
19478 DW_AT_declaration for ENUM_IS_OPAQUE on -gdwarf-4 or -gno-strict-dwarf,
19479 but on TYPE_SIZE. Don't do anything for ENUM_IS_OPAQUE if not creating
19480 a new die. Don't set TREE_ASM_WRITTEN if ENUM_IS_OPAQUE. Guard
19481 addition of most attributes on !orig_type_die or the attribute not
19482 being present already. Assert TYPE_VALUES is NULL for ENUM_IS_OPAQUE.
19484 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
19485 Chung-Ju Wu <jasonwucj@gmail.com>
19487 * config/nds32/nds32.c (nds32_cpu_cpp_builtins): Modify to define
19488 __NDS32_VH__ macro.
19489 * config/nds32/nds32.opt (mvh): New option.
19491 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
19492 Chung-Ju Wu <jasonwucj@gmail.com>
19494 * config/nds32/nds32-protos.h (nds32_cpu_cpp_builtins): Declare
19496 * config/nds32/nds32.c (nds32_cpu_cpp_builtins): New function.
19497 * config/nds32/nds32.h (TARGET_CPU_CPP_BUILTINS): Modify its
19500 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
19501 Chung-Ju Wu <jasonwucj@gmail.com>
19503 * config/nds32/nds32-memory-manipulation.c (nds32_expand_strlen): New
19505 * config/nds32/nds32-multiple.md (strlensi): New pattern.
19506 * config/nds32/nds32-protos.h (nds32_expand_strlen): Declare function.
19508 2018-03-11 Monk Chiang <sh.chiang04@gmail.com>
19509 Kito Cheng <kito.cheng@gmail.com>
19510 Chung-Ju Wu <jasonwucj@gmail.com>
19512 * config/nds32/constants.md (unspec_element): Add UNSPEC_FFB,
19513 UNSPEC_FFMISM and UNSPEC_FLMISM.
19514 * config/nds32/nds32-intrinsic.c (bdesc_2arg): Add builtin description
19515 for ffb, ffmism and flmism.
19516 * config/nds32/nds32-intrinsic.md (unspec_ffb): Define new pattern.
19517 (unspec_ffmism): Ditto.
19518 (unspec_flmism): Ditto.
19519 (nds32_expand_builtin_impl): Check if string extension is available.
19520 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FFB,
19521 NDS32_BUILTIN_FFMISM and NDS32_BUILTIN_FLMISM.
19523 2018-03-10 Vladimir Makarov <vmakarov@redhat.com>
19526 2018-03-09 Vladimir Makarov <vmakarov@redhat.com>
19529 * lra-assigns.c (assign_by_spills): Return a flag of reload
19530 assignment failure. Do not process the reload assignment
19531 failures. Do not spill other reload pseudos if they has the same
19533 (lra_assign): Add a return arg. Set up from the result of
19534 assign_by_spills call.
19535 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
19536 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
19537 usage_insns if it is not NULL.
19538 (spill_hard_reg_in_range): New function.
19539 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
19540 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
19541 function prototypes.
19542 (lra_assign): Change prototype.
19543 * lra.c (lra): Add code to deal with fails by splitting hard reg
19546 2018-03-10 H.J. Lu <hongjiu.lu@intel.com>
19549 * config/i386/i386.opt: Replace Enforcment with Enforcement.
19551 2018-03-10 Alexandre Oliva <aoliva@redhat.com>
19554 * dwarf2out.h (dw_val_class): Add dw_val_class_symview.
19555 (dw_val_node): Add val_symbolic_view.
19556 * dwarf2out.c (dw_line_info_table): Add symviews_since_reset.
19557 (symview_upper_bound): New.
19558 (new_line_info_table): Initialize symviews_since_reset.
19559 (dwarf2out_source_line): Count symviews_since_reset and set
19560 symview_upper_bound.
19561 (dw_val_equal_p): Handle symview.
19562 (add_AT_symview): New.
19563 (print_dw_val): Handle symview.
19564 (attr_checksum, attr_checksum_ordered): Likewise.
19565 (same_dw_val_p, size_of_die): Likewise.
19566 (value_format, output_die): Likewise.
19567 (add_high_low_attributes): Use add_AT_symview for entry_view.
19568 (dwarf2out_finish): Reset symview_upper_bound, clear
19571 2018-03-09 Peter Bergner <bergner@vnet.ibm.com>
19574 * config/rs6000/rs6000.c (rs6000_offsettable_memref_p): New prototype.
19575 Add strict argument and use it.
19576 (rs6000_split_multireg_move): Update for new strict argument.
19577 (mem_operand_gpr): Disallow all non-offsettable addresses.
19578 * config/rs6000/rs6000.md (*movdi_internal64): Use YZ constraint.
19580 2018-03-09 Jakub Jelinek <jakub@redhat.com>
19583 * config/rs6000/rs6000.c (rs6000_gimplify_va_arg): Mark va_arg_tmp
19584 temporary TREE_ADDRESSABLE before gimplification of BUILT_IN_MEMCPY.
19585 * config/powerpcspe/powerpcspe.c (rs6000_gimplify_va_arg): Likewise.
19588 * tree-inline.c (copy_tree_body_r): For INDIRECT_REF of a remapped
19589 decl, use remap_type if we want to use the type.
19591 2018-03-09 Martin Sebor <msebor@redhat.com>
19593 PR tree-optimization/84526
19594 * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
19596 (builtin_access::generic_overlap): Be prepared to handle non-array
19599 2018-03-09 Alexandre Oliva <aoliva@redhat.com>
19601 PR rtl-optimization/84682
19602 * lra-constraints.c (process_address_1): Check is_address flag
19603 for address constraints.
19604 (process_alt_operands): Likewise.
19605 * lra.c (lra_set_insn_recog_data): Pass asm operand locs to
19606 preprocess_constraints.
19607 * recog.h (preprocess_constraints): Add oploc parameter.
19609 * recog.c (preprocess_constraints): Test address_operand for
19610 CT_ADDRESS constraints.
19612 2018-03-09 Vladimir Makarov <vmakarov@redhat.com>
19615 * lra-assigns.c (assign_by_spills): Return a flag of reload
19616 assignment failure. Do not process the reload assignment
19617 failures. Do not spill other reload pseudos if they has the same
19619 (lra_assign): Add a return arg. Set up from the result of
19620 assign_by_spills call.
19621 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
19622 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
19623 usage_insns if it is not NULL.
19624 (spill_hard_reg_in_range): New function.
19625 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
19626 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
19627 function prototypes.
19628 (lra_assign): Change prototype.
19629 * lra.c (lra): Add code to deal with fails by splitting hard reg
19632 2018-03-09 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
19635 * common/config/arm/arm-common.c (arm_parse_arch_option_name):
19636 Accept complain bool parameter. Only emit errors if it is true.
19637 (arm_parse_cpu_option_name): Likewise.
19638 (arm_target_thumb_only): Adjust callers of the above.
19639 * config/arm/arm-protos.h (arm_parse_cpu_option_name): Adjust
19640 prototype to take a default true bool parameter.
19641 (arm_parse_arch_option_name): Likewise.
19643 2018-03-09 David Malcolm <dmalcolm@redhat.com>
19644 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
19648 * Makefile.in (LD_VERSION_SCRIPT_OPTION, LD_SONAME_OPTION): New.
19649 * configure: Regenerate.
19650 * configure.ac ("linker --version-script option"): New.
19651 ("linker soname option"): New.
19653 2018-03-09 Richard Biener <rguenther@suse.de>
19655 PR tree-optimization/84775
19656 * tree-if-conv.c (add_bb_predicate_gimplified_stmts): Delink
19657 immediate uses of predicate stmts and mark them modified.
19660 PR tree-optimization/84178
19661 * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
19663 (version_loop_for_if_conversion): Delay update_ssa call.
19664 (tree_if_conversion): Delay update_ssa until after predicate
19667 2018-03-09 Eric Botcazou <ebotcazou@adacore.com>
19670 * config/i386/winnt.c (i386_pe_seh_cold_init): Use small pre-allocation
19671 when the function accesses prior frames.
19673 2018-03-08 Jakub Jelinek <jakub@redhat.com>
19676 * dwarf2out.c (dw_loc_list): If list && loc_list->first->next, call
19677 gen_llsym, otherwise call maybe_gen_llsym.
19679 PR inline-asm/84742
19680 * recog.c (asm_operand_ok): Return 0 if multi-character constraint
19681 has ',' character inside of it.
19683 2018-03-08 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
19686 * config/aarch64/aarch64.md (*compare_cstore<mode>_insn): Mark pattern
19687 as clobbering CC_REGNUM.
19689 2018-03-08 Richard Biener <rguenther@suse.de>
19691 PR middle-end/84552
19692 * tree-scalar-evolution.c: Include tree-into-ssa.h.
19693 (follow_copies_to_constant): Do not follow SSA names registered
19696 2018-03-08 Richard Biener <rguenther@suse.de>
19698 PR tree-optimization/84178
19699 * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
19701 (version_loop_for_if_conversion): Delay update_ssa call.
19702 (tree_if_conversion): Delay update_ssa until after predicate
19705 2018-03-08 David Malcolm <dmalcolm@redhat.com>
19707 PR tree-optimization/84178
19708 * tree-if-conv.c (release_bb_predicate): Remove the
19709 the assertion that the stmts have NULL use_ops.
19710 Discard the statements, asserting that they haven't
19711 yet been added to a BB.
19713 2018-03-08 Richard Biener <rguenther@suse.de>
19715 PR tree-optimization/84746
19716 * tree-ssa-pre.c (find_leader_in_sets): Deal with SET1 being NULL.
19717 (phi_translate): Pass in destination ANTIC_OUT set.
19718 (phi_translate_1): Likewise. For a simplified result lookup
19719 a leader in ANTIC_OUT and AVAIL_OUT, not the ANTIC_IN sets.
19720 (phi_translate_set): Adjust.
19721 (do_pre_regular_insertion): Likewise.
19722 (do_pre_partial_partial_insertion): Likewise.
19724 2018-03-08 Martin Liska <mliska@suse.cz>
19726 PR gcov-profile/84735
19727 * doc/gcov.texi: Document usage of profile files.
19728 * gcov-io.h: Document changes in the format.
19730 2018-03-08 Alexandre Oliva <aoliva@redhat.com>
19734 * dwarf2out.c (struct dw_line_info_table): Update comments for
19736 (FORCE_RESET_NEXT_VIEW): New.
19737 (FORCE_RESETTING_VIEW_P): New.
19738 (RESETTING_VIEW_P): Check for -1 too.
19739 (ZERO_VIEW_P): Likewise.
19740 (new_line_info_table): Force-reset next view.
19741 (dwarf2out_begin_function): Likewise.
19742 (dwarf2out_source_line): Simplify zero_view_p initialization.
19743 Test FORCE_RESETTING_VIEW_P and RESETTING_VIEW_P instead of
19744 view directly. Omit view when omitting .loc at line 0.
19746 2018-03-08 Jakub Jelinek <jakub@redhat.com>
19748 PR tree-optimization/84740
19749 * tree-switch-conversion.c (process_switch): Call build_constructors
19750 only if info.phi_count is non-zero.
19752 PR tree-optimization/84739
19753 * tree-tailcall.c (find_tail_calls): Check call arguments against
19754 DECL_ARGUMENTS (current_function_decl) rather than
19755 DECL_ARGUMENTS (func) when checking for tail recursion.
19757 2018-03-07 Jakub Jelinek <jakub@redhat.com>
19759 * doc/contrib.texi: Add entries for Martin Liska, David Malcolm,
19760 Marek Polacek, extend Vladimir Makarov's, Jonathan Wakely's and
19761 Volker Reichelt's entry and add entries for people that perform
19762 GCC fuzzy testing and report numerous bugs.
19764 2018-03-07 Segher Boessenkool <segher@kernel.crashing.org>
19767 * config/rs6000/rs6000.c (rs6000_elf_in_small_data_p): Don't put
19768 readonly data in sdata, if that is disabled.
19769 * config/rs6000/sysv4.opt (mreadonly-in-sdata): New option.
19770 * doc/invoke.texi (RS/6000 and PowerPC Options): Document
19771 -mreadonly-in-sdata option.
19773 2018-03-07 Martin Sebor <msebor@redhat.com>
19775 PR tree-optimization/84468
19776 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Consider successor
19777 basic block when looking for nul assignment.
19779 2018-03-07 Eric Botcazou <ebotcazou@adacore.com>
19782 * except.h (output_function_exception_table): Adjust prototype.
19783 * except.c (output_function_exception_table): Remove FNNAME parameter
19784 and add SECTION parameter. Ouput one part of the table at a time.
19785 * final.c (final_scan_insn_1) <NOTE_INSN_SWITCH_TEXT_SECTIONS>: Output
19786 the first part of the exception table and emit unwind directives.
19787 * config/i386/i386-protos.h (i386_pe_end_cold_function): Declare.
19788 (i386_pe_seh_cold_init): Likewise.
19789 * config/i386/cygming.h (ASM_DECLARE_COLD_FUNCTION_NAME): New macro.
19790 (ASM_DECLARE_COLD_FUNCTION_SIZE): Likewise.
19791 * config/i386/i386.c (x86_expand_epilogue): Fix wording in comment.
19792 (ix86_output_call_insn): Emit a nop in one more case for SEH.
19793 * config/i386/winnt.c: Include except.h.
19794 (struct seh_frame_state): Add reg_offset, after_prologue and
19795 in_cold_section fields.
19796 (i386_pe_seh_end_prologue): Set seh->after_prologue.
19797 (i386_pe_seh_cold_init): New function.
19798 (i386_pe_seh_fini): Add COLD parameter and bail out if it is not equal
19799 to seh->in_cold_section.
19800 (seh_emit_push): Record the offset of the push.
19801 (seh_emit_save): Record the offet of the save.
19802 (i386_pe_seh_unwind_emit): Deal with NOTE_INSN_SWITCH_TEXT_SECTIONS.
19803 Test seh->after_prologue to disregard the epilogue.
19804 (i386_pe_end_function): Pass FALSE to i386_pe_seh_fini.
19805 (i386_pe_end_cold_function): New function.
19807 2018-03-07 Jakub Jelinek <jakub@redhat.com>
19810 * config/aarch64/predicates.md (aarch64_simd_reg_or_zero): Use
19811 aarch64_simd_or_scalar_imm_zero rather than aarch64_simd_imm_zero.
19814 * gimple-expr.c (create_tmp_var_raw): Set DECL_NAMELESS flag
19816 * tree-pretty-print.c (dump_decl_name): For TDF_COMPARE_DEBUG,
19817 don't print names of DECL_NAMELESS DECL_IGNORED_P decls.
19819 PR middle-end/84723
19820 * multiple_target.c: Include tree-inline.h and intl.h.
19821 (expand_target_clones): Diagnose and fail if node->definition and
19822 !tree_versionable_function_p (node->decl).
19824 2018-03-06 John David Anglin <danglin@gcc.gnu.org>
19826 * config/pa/pa.h (ASM_GENERATE_INTERNAL_LABEL): Revise to use
19828 (ASM_OUTPUT_ADDR_VEC_ELT): Revise for above change.
19829 (ASM_OUTPUT_ADDR_DIFF_ELT): Likewise.
19830 * config/pa/pa64-hpux.h (ASM_GENERATE_INTERNAL_LABEL): Revise as above.
19832 2018-03-06 Jakub Jelinek <jakub@redhat.com>
19835 * combine.c (try_combine): Use reg_or_subregno instead of handling
19836 just paradoxical SUBREGs and REGs.
19838 2018-03-06 Claudiu Zissulescu <claziss@synopsys.com>
19840 * config/arc/arc.c (arc_finalize_pic): Remove function.
19841 (arc_must_save_register): We use single base PIC register, remove
19842 checks to save/restore the PIC register.
19843 (arc_expand_prologue): Likewise.
19844 * config/arc/arc-protos.h (arc_set_default_type_attributes):
19846 (arc_verify_short): Likewise.
19847 (arc_attr_type): Likewise.
19848 * config/arc/arc.c (arc_set_default_type_attributes): Remove.
19849 (walk_stores): Likewise.
19850 (arc_address_cost): Make it static.
19851 (arc_verify_short): Likewise.
19852 (branch_dest): Likewise.
19853 (arc_attr_type): Likewise.
19854 * config/arc/arc.c (TARGET_ADJUST_INSN_LENGTH): Remove.
19855 (TARGET_INSN_LENGTH_PARAMETERS): Likewise.
19856 (arc_final_prescan_insn): Remove inserting the nops due to
19857 hardware hazards. It is done in reorg step.
19858 (insn_length_variant_t): Remove.
19859 (insn_length_parameters_t): Likewise.
19860 (arc_insn_length_parameters): Likewise.
19861 (arc_get_insn_variants): Likewise.
19862 * config/arc/arc.h (TARGET_UPSIZE_DBR): Remove.
19864 2018-03-06 Jakub Jelinek <jakub@redhat.com>
19866 PR inline-asm/84683
19867 * reg-stack.c (move_for_stack_reg): If any_malformed_asm, avoid
19870 PR tree-optimization/84687
19871 * omp-simd-clone.c (simd_clone_create): Clear DECL_BUILT_IN_CLASS
19873 * match.pd (pow(C,x)*expN(y) -> expN(logN(C)*x+y)): New optimization.
19875 2018-03-05 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
19877 * config/rs6000/rs6000-builtin.def (rs6000_speculation_barrier):
19878 Rename to ppc_speculation_barrier.
19879 * config/rs6000/rs6000.c (rs6000_init_builtins): Rename builtin to
19880 __builtin_ppc_speculation_barrier.
19882 2018-03-05 Jakub Jelinek <jakub@redhat.com>
19885 * combine.c (combine_simplify_rtx): Don't try to simplify if
19886 if_then_else_cond returned non-NULL, but either true_rtx or false_rtx
19889 2018-03-05 Segher Boessenkool <segher@kernel.crashing.org>
19891 * config/rs6000/rs6000.c (rs6000_loop_align): Don't align tiny loops
19892 to 32 bytes when compiling for POWER9.
19894 2018-03-05 Jakub Jelinek <jakub@redhat.com>
19897 * config/i386/i386.c (ix86_function_ok_for_sibcall): Check for
19898 regparm >= 3 with no arg reg available also for calls with
19899 flag_force_indirect_call. Pass decl to ix86_function_regparm.
19902 * config/i386/sse.md (*<code><mode>3): Replace <mask_prefix3> with
19904 (*<plusminus_insn><mode>3): Likewise. Remove <mask_operand3> uses.
19906 2018-03-05 Peter Bergner <bergner@vnet.ibm.com>
19909 * config/rs6000/vector.md (mov<mode>): Disallow altivec memory operands.
19911 2018-03-05 Richard Biener <rguenther@suse.de>
19913 PR tree-optimization/84486
19914 * tree-ssa-pre.c (create_expression_by_pieces): Remove dead code.
19915 When inserting a __builtin_assume_aligned call set the LHS
19916 SSA name alignment info accordingly.
19918 2018-03-05 Wilco Dijkstra <wdijkstr@arm.com>
19920 PR tree-optimization/84114
19921 * config/aarch64/aarch64.c (aarch64_reassociation_width)
19922 Avoid reassociation of FLOAT_MODE addition.
19924 2018-03-05 Olga Makhotina <olga.makhotina@intel.com>
19926 * common/config/i386/i386-common.c (OPTION_MASK_ISA_PCONFIG_SET,
19927 OPTION_MASK_ISA_PCONFIG_UNSET, OPTION_MASK_ISA_WBNOINVD_SET,
19928 OPTION_MASK_ISA_WBNOINVD_UNSET): New definitions.
19929 (ix86_handle_option): Handle -mpconfig and -mwbnoinvd.
19930 * config.gcc (pconfigintrin.h, wbnoinvdintrin.h) : Add headers.
19931 * config/i386/cpuid.h (bit_PCONFIG, bit_WBNOINVD): New.
19932 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mpconfig
19934 * config/i386/i386-builtin.def (__builtin_ia32_wbnoinvd,
19935 __builtin_ia32_wbinvd): New builtins.
19936 (SPECIAL_ARGS2): New.
19937 * config/i386/i386-c.c (__WBNOINVD__, __PCONFIG__): New.
19938 (SPECIAL_ARGS2): New.
19939 * config/i386/i386.c (ix86_target_string): Add -mpconfig and -mwbnoinvd.
19940 (ix86_valid_target_attribute_inner_p): Ditto.
19941 (ix86_init_mmx_sse_builtins): Add special_args2.
19942 * config/i386/i386.h (TARGET_PCONFIG, TARGET_PCONFIG_P, TARGET_WBNOINVD,
19943 TARGET_WBNOINVD_P): New.
19944 * config/i386/i386.md (UNSPECV_WBINVD, UNSPECV_WBNOINVD): New.
19945 (define_insn "wbinvd", define_insn "wbnoinvd"): New.
19946 * config/i386/i386.opt: Add -mpconfig and -mwbnoinvd.
19947 * config/i386/immintrin.h (_wbinvd): New intrinsic.
19948 * config/i386/pconfigintrin.h: New file.
19949 * config/i386/wbnoinvdintrin.h: Ditto.
19950 * config/i386/x86intrin.h: Add headers pconfigintrin.h and
19952 * doc/invoke.texi (-mpconfig, -mwbnoinvd): New.
19954 2018-03-05 Richard Biener <rguenther@suse.de>
19956 PR tree-optimization/84670
19957 * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
19959 (BB_VISITED_WITH_VISITED_SUCCS): New define.
19960 (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
19961 (compute_antic_aux): Only assert the number of values in ANTIC_IN
19962 doesn't grow if all successors (recursively) were visited at least
19965 2018-03-05 Richard Biener <rguenther@suse.de>
19967 PR tree-optimization/84650
19968 * tree-ssa-loop-im.c (pass_lim::execute): Reset the SCEV cache
19969 if executed in the loop pipeline.
19971 2018-03-05 Sandra Loosemore <sandra@codesourcery.com>
19973 * doc/configfiles.texi (Configuration Files): Move info about
19974 conditionalizing $target-protos.h to...
19975 * doc/sourcebuild.texi (Back End): Here. Explain how $target.h
19976 differs from $target-protos.h.
19978 2018-03-05 Kito Cheng <kito.cheng@gmail.com>
19979 Chung-Ju Wu <jasonwucj@gmail.com>
19981 * config/nds32/nds32-protos.h (nds32_expand_setmem): Declare.
19982 * config/nds32/nds32-multiple.md (setmemsi): Define.
19983 * config/nds32/nds32-memory-manipulation.c
19984 (nds32_gen_dup_4_byte_to_word_value): New.
19985 (emit_setmem_word_loop): New.
19986 (emit_setmem_byte_loop): New.
19987 (nds32_expand_setmem_loop): New.
19988 (nds32_expand_setmem_loop_v3m): New.
19989 (nds32_expand_setmem_unroll): New.
19990 (nds32_expand_setmem): New.
19992 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
19993 Chung-Ju Wu <jasonwucj@gmail.com>
19995 * config/nds32/nds32-memory-manipulation.c
19996 (nds32_emit_load_store): New.
19997 (nds32_emit_post_inc_load_store): New.
19998 (nds32_emit_mem_move): New.
19999 (nds32_emit_mem_move_block): New.
20000 (nds32_expand_movmemsi_loop_unknown_size): New.
20001 (nds32_expand_movmemsi_loop_known_size): New.
20002 (nds32_expand_movmemsi_loop): New.
20003 (nds32_expand_movmemsi_unroll): New.
20004 (nds32_expand_movmemqi): Rename ...
20005 (nds32_expand_movmemsi): ... to this.
20006 * config/nds32/nds32-multiple.md (movmemqi): Rename ...
20007 (movmemsi): ... to this.
20008 * config/nds32/nds32-protos.h (nds32_expand_movmemqi): Rename ...
20009 (nds32_expand_movmemsi): ... to this.
20011 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
20012 Monk Chiang <sh.chiang04@gmail.com>
20013 Chung-Ju Wu <jasonwucj@gmail.com>
20015 * config/nds32/nds32-protos.h
20016 (nds32_expand_load_multiple): New arguments.
20017 (nds32_expand_store_multiple): Ditto.
20018 (nds32_valid_multiple_load_store): Rename ...
20019 (nds32_valid_multiple_load_store_p): ... to this.
20020 * config/nds32/nds32-memory-manipulation.c
20021 (nds32_expand_load_multiple): Refine implementation.
20022 (nds32_expand_store_multiple): Ditto.
20023 * config/nds32/nds32-multiple.md
20024 (load_multiple): Update nds32_expand_load_multiple interface.
20025 (store_multiple): Update nds32_expand_store_multiple interface.
20026 * config/nds32/nds32-predicates.c
20027 (nds32_valid_multiple_load_store): Rename ...
20028 (nds32_valid_multiple_load_store_p): ... to this and refine
20030 * config/nds32/predicates.md
20031 (nds32_load_multiple_and_update_address_operation): New predicate.
20032 (nds32_store_multiple_and_update_address_operation): New predicate.
20034 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
20035 Chung-Ju Wu <jasonwucj@gmail.com>
20037 * config/nds32/nds32.md (type): Add load_multiple and store_multiple.
20038 (combo): New attribute.
20039 * config/nds32/nds32-multiple.md: Refine patterns with new attributes.
20041 2018-03-03 Chung-Ju Wu <jasonwucj@gmail.com>
20043 * config/nds32/nds32.opt: Change -mcmodel= default value.
20045 2018-03-03 Kito Cheng <kito.cheng@gmail.com>
20046 Monk Chiang <sh.chiang04@gmail.com>
20047 Chung-Ju Wu <jasonwucj@gmail.com>
20049 * config/nds32/constants.md (unspec_element): New enum.
20050 * config/nds32/constraints.md (Umw): New constraint.
20051 * config/nds32/nds32-intrinsic.c: Add more builtin functions.
20052 * config/nds32/nds32-intrinsic.md: Likewise.
20053 * config/nds32/nds32-md-auxiliary.c (nds32_regno_to_enable4): New.
20054 (nds32_valid_smw_lwm_base_p): New.
20055 (nds32_output_smw_single_word): New.
20056 (nds32_output_lmw_single_word): New.
20057 (nds32_expand_unaligned_load): New.
20058 (nds32_expand_unaligned_store): New.
20059 * config/nds32/nds32-protos.h (nds32_valid_smw_lwm_base_p): Declare.
20060 (nds32_output_smw_single_word): Declare.
20061 (nds32_output_lmw_single_word): Declare.
20062 (nds32_expand_unaligned_load): Declare.
20063 (nds32_expand_unaligned_store): Declare.
20064 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_UALOAD_HW,
20065 NDS32_BUILTIN_UALOAD_W, NDS32_BUILTIN_UALOAD_DW,
20066 NDS32_BUILTIN_UASTORE_HW, NDS32_BUILTIN_UASTORE_W,
20067 NDS32_BUILTIN_UASTORE_DW.
20068 * config/nds32/predicates.md (nds32_lmw_smw_base_operand): New
20071 2018-03-03 Monk Chiang <sh.chiang04@gmail.com>
20072 Kito Cheng <kito.cheng@gmail.com>
20073 Chung-Ju Wu <jasonwucj@gmail.com>
20075 * config/nds32/nds32-intrinsic.c
20076 (nds32_expand_builtin_null_ftype_reg): Delete.
20077 (nds32_expand_builtin_reg_ftype_imm): Ditto.
20078 (nds32_expand_builtin_null_ftype_reg_imm): Ditto.
20079 (nds32_read_argument): New.
20080 (nds32_legitimize_target): Ditto.
20081 (nds32_legitimize_argument): Ditto.
20082 (nds32_check_constant_argument): Ditto.
20083 (nds32_expand_unop_builtin): Ditto.
20084 (nds32_expand_unopimm_builtin): Ditto.
20085 (nds32_expand_binop_builtin): Ditto.
20086 (nds32_builtin_decl_impl): Ditto.
20087 (builtin_description): Ditto.
20088 (nds32_expand_builtin_impl): Rewrite with new infrastructure.
20089 (nds32_init_builtins_impl): Ditto.
20090 * config/nds32/nds32.c (TARGET_BUILTIN_DECL): Define.
20091 (nds32_builtin_decl): New.
20092 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_COUNT.
20093 * config/nds32/nds32-protos.h (nds32_builtin_decl_impl): Declare.
20095 2018-03-02 Jeff Law <law@redhat.com>
20097 * reorg.c (stop_search_p): Handle DEBUG_INSN.
20098 (redundant_insn, fill_simple_delay_slots): Likewise.
20099 (fill_slots_from_thread): Likewise.
20100 * resource.c (mark_referenced_resources): Likewise.
20101 (mark_set_resources, find_dead_or_set_registers): Likewise.
20103 2018-03-02 Jakub Jelinek <jakub@redhat.com>
20105 * substring-locations.h (format_warning_va): Formatting fix for
20106 ATTRIBUTE_GCC_DIAG.
20107 (format_warning_at_substring): Fix up ATTRIBUTE_GCC_DIAG second
20109 (format_warning_n_va, format_warning_at_substring_n): New prototypes.
20110 * substring-locations.c: Include intl.h.
20111 (format_warning_va): Turned into small wrapper around
20112 format_warning_n_va, renamed to ...
20113 (format_warning_n_va): ... this, add N and PLURAL_GMSGID arguments,
20114 rename GMSGID to SINGULAR_GMSGID, if SINGULAR_GMSGID != PLURAL_GMSGID,
20116 (format_warning_at_substring_n): New function.
20117 * gimple-ssa-sprintf.c: Remove GCC diagnostic ignored pragma.
20118 (fmtwarn): Add ATTRIBUTE_GCC_DIAG. Turn into a copy of
20119 format_warning_at_substring with just a shorter name instead of
20120 const function pointer.
20121 (fmtwarn_n): New function.
20122 (maybe_warn, format_directive, parse_directive): Use fmtwarn_n where
20123 appropriate, get rid of all the fmtstr temporaries, move conditionals
20124 with G_() wrapped string literals directly into fmtwarn arguments,
20125 cast dir.len to (int), formatting fixes.
20127 2018-03-02 Thomas Schwinge <thomas@codesourcery.com>
20129 * doc/invoke.texi: Remove "Cilk Plus" references.
20131 2018-03-02 Jakub Jelinek <jakub@redhat.com>
20132 Richard Biener <rguenther@suse.de>
20135 * expr.c (expand_expr_real_1) <case CALL_EXPR>: Don't emit diagnostics
20136 for error or warning attributes if CALL_FROM_THUNK_P is set.
20139 2018-03-02 Jakub Jelinek <jakub@redhat.com>
20142 * config/pa/pa.h (TARGET_CPU_CPP_BUILTINS): Predefine
20143 __SIZEOF_128__ macro if HPUX_LONG_DOUBLE_LIBRARY.
20146 * config/ia64/ia64.h (TARGET_CPU_CPP_BUILTINS): Predefine
20147 __SIZEOF_{FPREG,FLOAT{80,128}}__ macros.
20149 * predict.c (test_prediction_value_range): Use PROB_UNINITIALIZED
20150 instead of -1U in last predictors element's probability member.
20152 2018-03-02 Eric Botcazou <ebotcazou@adacore.com>
20155 * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
20156 arguments if they are comparable.
20158 2018-03-02 Richard Sandiford <richard.sandiford@linaro.org>
20160 PR tree-optimization/84634
20161 * tree-vect-stmts.c (vectorizable_store, vectorizable_load): Replace
20162 masks and masked_loop_p with a single loop_masks, making sure it's
20163 null for bb vectorization.
20165 2018-03-02 Richard Sandiford <richard.sandiford@linaro.org>
20167 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
20168 (vect_analyze_data_ref_access): Use loop->safe_len rather than
20169 loop->force_vectorize to check whether there is no alias.
20171 2018-03-02 Jakub Jelinek <jakub@redhat.com>
20174 * rtl.h (prev_real_nondebug_insn, next_real_nondebug_insn): New
20176 * emit-rtl.c (next_real_insn, prev_real_insn): Fix up function
20178 (next_real_nondebug_insn, prev_real_nondebug_insn): New functions.
20179 * cfgcleanup.c (try_head_merge_bb): Use prev_real_nondebug_insn
20180 instead of a loop around prev_real_insn.
20181 * combine.c (move_deaths): Use prev_real_nondebug_insn instead of
20184 PR inline-asm/84625
20185 * config/i386/i386.c (ix86_print_operand): Use conditional
20186 output_operand_lossage instead of gcc_assert if CONST_VECTOR is not
20189 2018-03-02 Richard Biener <rguenther@suse.de>
20191 PR tree-optimization/84427
20192 * tree-ssa-pre.c (bitmap_remove_expr_from_set): Remove.
20193 (bitmap_set_subtract_values): Rewrite to handle multiple
20196 (prune_clobbered_mems): Likewise.
20197 (phi_translate): Take edge instead of pred/phiblock.
20198 (phi_translate_1): Likewise.
20199 (phi_translate_set): Likewise. Insert all translated
20200 exprs for a value into the set, keeping possibly multiple
20201 expressions per value.
20202 (compute_antic_aux): Adjust for phi_translate changes.
20203 When intersecting union the expressions and prune those
20204 not in the final value set, keeping possibly multiple
20205 expressions per value. Do not use value-insertion
20206 for unioning ANTIC_OUT U EXP_GEN - TMP_GEN but merge
20207 all expressions. Add verification that the value-sets
20208 only shrink during iteration.
20209 (compute_partial_antic_aux): Adjust for the phi_translate changes.
20210 (do_pre_regular_insertion): Likewise.
20211 (do_pre_partial_partial_insertion): Likewise.
20213 2018-03-02 Richard Biener <rguenther@suse.de>
20216 * config/darwin.c (saved_debug_info_level): New static global.
20217 (darwin_asm_lto_start): Disable debug info generation for LTO out.
20218 (darwin_asm_lto_end): Restore debug info generation settings.
20220 2018-03-01 Martin Liska <mliska@suse.cz>
20223 * sanopt.c (sanitize_rewrite_addressable_params): Do not handle
20224 volatile arguments.
20226 2018-03-01 Richard Biener <rguenther@suse.de>
20229 * dwarf2out.c (gen_variable_die): Properly handle late VLA
20230 type annotation with LTO when debug was disabled at compile-time.
20232 2018-03-01 Matthew Fortune <mfortune@gmail.com>
20234 * config/mips/mips.c (mips_final_prescan_insn): Fix incorrect
20236 (mips_final_postscan_insn): Likewise.
20238 2018-03-01 Richard Sandiford <richard.sandiford@linaro.org>
20240 PR rtl-optimization/84528
20241 * alias.c (init_alias_target): Add commentary.
20242 (init_alias_analysis): Only give HARD_FRAME_POINTER_REGNUM
20243 a unique base value if the frame pointer is not eliminated
20244 to the stack pointer.
20246 2018-03-01 Tom de Vries <tom@codesourcery.com>
20248 PR rtl-optimization/83327
20249 * lra-int.h (hard_regs_spilled_into): Declare.
20250 * lra.c (hard_regs_spilled_into): Define.
20251 (init_reg_info): Init hard_regs_spilled_into.
20252 * lra-spills.c (assign_spill_hard_regs): Update hard_regs_spilled_into.
20253 * lra-lives.c (make_hard_regno_born, make_hard_regno_dead)
20254 (process_bb_lives): Handle hard_regs_spilled_into.
20255 (lra_create_live_ranges_1): Before doing liveness propagation, clear
20256 regs in all_hard_regs_bitmap if set in hard_regs_spilled_into.
20258 2018-02-28 David Edelsohn <dje.gcc@gmail.com>
20260 * config.gcc (powerpc-ibm-aix7.1.*): New stanza.
20261 (powerpc-ibm-aix[789]*): Default to AIX 7.2.
20262 * config/rs6000/aix71.h (TARGET_DEFAULT): Revert to Power4 ISA.
20263 * config/rs6000/aix72.h: New file.
20265 2018-02-28 Jakub Jelinek <jakub@redhat.com>
20267 * gimple-ssa-warn-restrict.c (maybe_diag_overlap): Use warning_n
20268 instead of warning_at with conditional singular and plural messages
20272 * stor-layout.c (update_alignment_for_field): For
20273 targetm.ms_bitfield_layout_p (rli->t), if !is_bitfield
20274 && !DECL_PACKED (field), do the alignment update, just use
20275 only desired_align instead of MAX (type_align, desired_align)
20277 (place_field): Don't do known_align < desired_align handling
20278 early if targetm.ms_bitfield_layout_p (rli->t) and rli->prev_field
20279 is non-NULL, instead do it after rli->prev_field handling and
20280 only if not within a bitfield word. For DECL_PACKED (field)
20281 use type_align of BITS_PER_UNIT.
20283 2018-02-28 Eric Botcazou <ebotcazou@adacore.com>
20285 * config/aarch64/aarch64.c (aarch64_emit_probe_stack_range): Remove
20286 superfluous parentheses and trailing spaces.
20288 2018-02-28 Richard Biener <rguenther@suse.de>
20290 PR tree-optimization/84584
20291 * graphite-scop-detection.c (scop_detection::add_scop): Discard
20292 SCoPs with fake exit edge.
20294 2018-02-28 Martin Liska <mliska@suse.cz>
20297 * timevar.c (timer::print): Fix format to properly print 100%
20300 2018-02-28 Richard Biener <rguenther@suse.de>
20302 PR middle-end/84607
20303 * genmatch.c (capture_info::walk_match): Do not mark
20304 captured expressions without operands as expr_p given
20305 they act more like predicates and should be subject to
20306 "lost tail" side-effect preserving.
20308 2018-02-28 Alexandre Oliva <aoliva@redhat.com>
20310 PR rtl-optimization/81611
20311 * auto-inc-dec.c (attempt_change): Move dead note from
20312 mem_insn if it's the next use of regno
20313 (find_address): Take address use of reg holding
20314 non-incremented value. Add parm to limit search to the named
20316 (merge_in_block): Attempt to use a mem insn that is the next
20317 use of the original regno.
20319 2018-02-27 Martin Sebor <msebor@redhat.com>
20322 * doc/invoke.texi (-Wmissing-attributes): New option.
20323 * print-tree.c (print_node): Handle DECL_UNINLINABLE.
20325 2018-02-27 Martin Sebor <msebor@redhat.com>
20327 PR translation/84207
20328 * diagnostic-core.h (warning_n, error_n, inform_n): Change
20329 n argument to unsigned HOST_WIDE_INT.
20330 * diagnostic.c (warning_n, error_n, inform_n): Ditto.
20331 (diagnostic_n_impl): Ditto. Handle arguments in excess of LONG_MAX.
20332 * gimple-ssa-sprintf.c (format_directive): Simplify inform_n call.
20333 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Use warning_n.
20335 2018-02-27 Richard Biener <rguenther@suse.de>
20337 PR tree-optimization/84512
20338 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost):
20339 Do not use the estimate returned from record_stmt_cost for
20340 the scalar iteration cost but sum properly using add_stmt_cost.
20342 2018-02-27 Richard Biener <rguenther@suse.de>
20344 PR tree-optimization/84466
20345 * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
20346 Adjust last change to less strictly validate use operands.
20348 2018-02-27 Martin Liska <mliska@suse.cz>
20350 PR gcov-profile/84548
20351 * gcov.c (process_file): Allow partial overlap and consider it
20352 also as group functions.
20353 (output_lines): Properly calculate range of lines for a group.
20355 2018-02-27 Martin Liska <mliska@suse.cz>
20357 * timevar.c (timer::print_row): Remove 'usr', 'sys', 'wall' and
20358 'ggc' suffixes. Change first column width.
20359 (timer::print): Fix formatting of the column.
20361 2018-02-27 Alexandre Oliva <aoliva@redhat.com>
20363 * tree-ssa-live.c (remove_unused_scope_block_p): Do not
20364 preserve inline entry blocks for the sake of debug inline
20365 entry point markers alone.
20366 (remove_unused_locals): Suggest in comments a better place to
20367 force the preservation of inline entry blocks that are
20368 otherwise unused, but do not preserve them.
20370 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
20372 * config/i386/i386.c (ix86_output_indirect_jmp): Update comments.
20374 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
20377 * config/i386/constraints.md (Bs): Replace
20378 ix86_indirect_branch_register with
20379 TARGET_INDIRECT_BRANCH_REGISTER.
20381 * config/i386/i386.md (indirect_jump): Likewise.
20382 (tablejump): Likewise.
20383 (*sibcall_memory): Likewise.
20384 (*sibcall_value_memory): Likewise.
20385 Peepholes of indirect call and jump via memory: Likewise.
20386 (*sibcall_GOT_32): Disallowed for TARGET_INDIRECT_BRANCH_REGISTER.
20387 (*sibcall_value_GOT_32): Likewise.
20388 * config/i386/predicates.md (indirect_branch_operand): Likewise.
20389 (GOT_memory_operand): Likewise.
20390 (call_insn_operand): Likewise.
20391 (sibcall_insn_operand): Likewise.
20392 (GOT32_symbol_operand): Likewise.
20393 * config/i386/i386.h (TARGET_INDIRECT_BRANCH_REGISTER): New.
20395 2018-02-26 Eric Botcazou <ebotcazou@adacore.com>
20397 PR rtl-optimization/83496
20398 * reorg.c (steal_delay_list_from_target): Change REDUNDANT array from
20399 booleans to RTXes. Call fix_reg_dead_note on every non-null element.
20400 (steal_delay_list_from_fallthrough): Call fix_reg_dead_note on a
20401 redundant insn, if any.
20402 (relax_delay_slots): Likewise.
20403 (update_reg_unused_notes): Rename REDUNDANT_INSN to OTHER_INSN.
20405 2018-02-26 Richard Sandiford <richard.sandiford@linaro.org>
20407 PR tree-optimization/83965
20408 * tree-vect-patterns.c (vect_reassociating_reduction_p): Assume
20409 that grouped statements are part of a reduction chain. Return
20410 true if the statement is not marked as a reduction itself but
20411 is part of a group.
20412 (vect_recog_dot_prod_pattern): Don't check whether the statement
20413 is part of a group here.
20414 (vect_recog_sad_pattern): Likewise.
20415 (vect_recog_widen_sum_pattern): Likewise.
20417 2018-02-26 Eric Botcazou <ebotcazou@adacore.com>
20420 * final.c (rest_of_clean_state): Also look for calls inside sequences.
20422 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
20425 * config/i386/i386-protos.h (ix86_output_indirect_jmp): Remove
20427 (ix86_output_indirect_function_return): New prototype.
20428 (ix86_split_simple_return_pop_internal): Likewise.
20429 * config/i386/i386.c (indirect_return_via_cx): New.
20430 (indirect_return_via_cx_bnd): Likewise.
20431 (indirect_thunk_name): Handle return va CX_REG.
20432 (output_indirect_thunk_function): Create alias for
20433 __x86_return_thunk_[re]cx and __x86_return_thunk_[re]cx_bnd.
20434 (ix86_output_indirect_jmp): Remove the bool argument.
20435 (ix86_output_indirect_function_return): New function.
20436 (ix86_split_simple_return_pop_internal): Likewise.
20437 * config/i386/i386.md (*indirect_jump): Don't pass false
20438 to ix86_output_indirect_jmp.
20439 (*tablejump_1): Likewise.
20440 (simple_return_pop_internal): Change it to define_insn_and_split.
20441 Call ix86_split_simple_return_pop_internal to split it for
20442 -mfunction-return=.
20443 (simple_return_indirect_internal): Call
20444 ix86_output_indirect_function_return instead of
20445 ix86_output_indirect_jmp.
20447 2018-02-26 Jakub Jelinek <jakub@redhat.com>
20450 * vec.h (vec_default_construct): For BROKEN_VALUE_INITIALIZATION use
20451 memset and value initialization afterwards.
20453 2018-02-26 Christophe Lyon <christophe.lyon@linaro.org>
20455 * Makefile.in (lto-wrapper): Use ALL_LINKERFLAGS.
20457 2018-02-26 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
20460 * common/config/aarch64/aarch64-common.c
20461 (aarch_option_optimization_table[]): Switch
20462 off fomit-frame-pointer
20464 2018-02-26 Kito Cheng <kito.cheng@gmail.com>
20465 Chung-Ju Wu <jasonwucj@gmail.com>
20467 * config/nds32/nds32-multiple.md (load_multiple): Disallow
20469 (store_multiple): Ditto.
20471 2018-02-26 Kito Cheng <kito.cheng@gmail.com>
20473 * config.gcc: Add --with-cpu support for nds32 target.
20474 * config/nds32/nds32-opts.h (nds32_cpu_type): New.
20475 * config/nds32/nds32.opt: Add -mcpu= option.
20477 2018-02-25 Segher Boessenkool <segher@kernel.crashing.org>
20479 * config/rs6000/rs6000.opt (mvrsave=no, mvrsave=yes, isel=no,
20480 isel=yes): Warn for these deprecated options.
20482 2018-02-23 David Edelsohn <dje.gcc@gmail.com>
20484 * config/rs6000/aix71.h (TARGET_DEFAULT): Change to
20485 ISA_2_5_MASKS_EMBEDDED.
20487 2018-02-23 Jakub Jelinek <jakub@redhat.com>
20489 * ipa-prop.c (ipa_vr_ggc_hash_traits::hash): Hash p->min and
20490 p->max as pointers rather than using iterative_hash_expr.
20492 2018-02-23 Carl Love <cel@us.ibm.com>
20494 * config/rs6000/rs6000-builtin.def: Change VSIGNED2 and VUNSIGNED2
20495 macro expansions from BU_VSX_2 to BU_P8V_VSX_2 and BU_VSX_OVERLOAD_2 to
20497 * config/rs6000/rs6000-c.c: Change VSX_BUILTIN_VEC_VSIGNED2 to
20498 P8V_BUILTIN_VEC_VSIGNED2. Change VSX_BUILTIN_VEC_VUNSIGNED2 to
20499 P8V_BUILTIN_VEC_VUNSIGNED2.
20501 2018-02-22 Vladimir Makarov <vmakarov@redhat.com>
20504 * lra-int.h (LRA_UNKNOWN_ALT, LRA_NON_CLOBBERED_ALT): New macros.
20505 * lra.c (lra_set_insn_recog_data, lra_update_insn_recog_data): Use
20507 * lra-constraints.c (curr_insn_transform): Set up
20508 LRA_NON_CLOBBERED_ALT for moves processed on the fast path. Use
20510 (remove_inheritance_pseudos): Use LRA_UNKNOWN_ALT.
20511 * lra-eliminations.c (spill_pseudos): Ditto.
20512 (process_insn_for_elimination): Ditto.
20513 * lra-lives.c (reg_early_clobber_p): Use the new macros.
20514 * lra-spills.c (spill_pseudos): Use LRA_UNKNOWN_ALT and
20515 LRA_NON_CLOBBERED_ALT.
20517 2018-02-22 Martin Sebor <msebor@redhat.com>
20519 PR tree-optimization/84480
20520 * gimple-fold.c (gimple_fold_builtin_strcpy): Move warnings
20521 to maybe_diag_stxncpy_trunc. Call it.
20522 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Integrate warnings
20523 from gimple_fold_builtin_strcpy. Print inlining stack.
20524 (handle_builtin_stxncpy): Print inlining stack.
20525 * tree-ssa-strlen.h (maybe_diag_stxncpy_trunc): Declare.
20527 2018-02-22 H.J. Lu <hongjiu.lu@intel.com>
20530 * config/i386/i386.c (ix86_set_indirect_branch_type): Issue an
20531 error when -mindirect-branch=thunk-extern, -fcf-protection=branch
20532 and -fcheck-pointer-bounds are used together.
20533 (indirect_thunk_prefix): New enum.
20534 (indirect_thunk_need_prefix): New function.
20535 (indirect_thunk_name): Replace need_bnd_p with need_prefix. Use
20536 "_nt" instead of "_bnd" for NOTRACK prefix.
20537 (output_indirect_thunk): Replace need_bnd_p with need_prefix.
20538 (output_indirect_thunk_function): Likewise.
20540 (ix86_code_end): Update output_indirect_thunk_function calls.
20541 (ix86_output_indirect_branch_via_reg): Replace
20542 ix86_bnd_prefixed_insn_p with indirect_thunk_need_prefix.
20543 (ix86_output_indirect_branch_via_push): Likewise.
20544 (ix86_output_function_return): Likewise.
20545 * doc/invoke.texi: Document -mindirect-branch=thunk-extern is
20546 incompatible with -fcf-protection=branch and
20547 -fcheck-pointer-bounds.
20549 2018-02-22 Steve Ellcey <sellcey@cavium.com>
20552 * config/aarch64/aarch64.c (aarch64_print_address_internal):
20553 Change gcc_assert call to output_operand_lossage.
20555 2018-02-22 Steve Ellcey <sellcey@cavium.com>
20557 * doc/extend.texi (__builtin_extend_pointer): Document builtin.
20559 2018-02-22 DJ Delorie <dj@redhat.com>
20560 Sebastian Perta <sebastian.perta@renesas.com>
20561 Oleg Endo <olegendo@gcc.gnu.org>
20563 * config/rx/rx.c (rx_rtx_costs): New function.
20564 (TARGET_RTX_COSTS): Override to use rx_rtx_costs.
20566 2018-02-22 Thomas Preud'homme <thomas.preudhomme@arm.com>
20568 * config/arm/t-multilib: Map Armv8-R to Armv7 multilibs.
20570 2018-02-22 Martin Liska <mliska@suse.cz>
20573 * common/config/arm/arm-common.c (arm_print_hint_for_cpu_option):
20574 Add "native" as a possible value.
20576 2018-02-22 Martin Liska <mliska@suse.cz>
20579 * config/i386/i386.c (ix86_option_override_internal):
20580 Add "native" as a possible value for -march and -mtune.
20582 2018-02-22 Jakub Jelinek <jakub@redhat.com>
20585 * stor-layout.c (finalize_type_size): Propagate TYPE_EMPTY_P flag
20586 to all type variants.
20588 PR tree-optimization/84503
20589 * gimple-ssa-store-merging.c (merged_store_group::merge_into): Compute
20590 width as info->bitpos + info->bitsize - start.
20591 (merged_store_group::merge_overlapping): Simplify width computation.
20592 (check_no_overlap): New function.
20593 (imm_store_chain_info::try_coalesce_bswap): Compute expected
20594 start + width and last_order of the group, fail if check_no_overlap
20596 (imm_store_chain_info::coalesce_immediate_stores): Don't merge info
20597 to group if check_no_overlap fails.
20599 2018-02-21 Segher Boessenkool <segher@kernel.crashing.org>
20601 * config/rs6000/altivec.md: Delete contraint arguments to
20602 define_expand, define_split, and define_peephole2, and in
20603 define_insn_and_split if always unused.
20604 * config/rs6000/darwin.md: Ditto.
20605 * config/rs6000/dfp.md: Ditto.
20606 * config/rs6000/rs6000.md: Ditto.
20607 * config/rs6000/sync.md: Ditto.
20608 * config/rs6000/vector.md: Ditto.
20609 * config/rs6000/vsx.md: Ditto.
20611 2018-02-21 Segher Boessenkool <segher@kernel.crashing.org>
20613 * config/rs6000/altivec.md: Write output control strings as braced
20614 blocks instead of double-quoted strings.
20615 * config/rs6000/darwin.md: Ditto.
20616 * config/rs6000/rs6000.md: Ditto.
20617 * config/rs6000/vector.md: Ditto.
20618 * config/rs6000/vsx.md: Ditto.
20620 2018-02-21 Jason Merrill <jason@redhat.com>
20622 PR c++/84314 - ICE with templates and fastcall attribute.
20623 * attribs.c (build_type_attribute_qual_variant): Remove assert.
20625 2018-02-21 Jan Hubicka <hubicka@ucw.cz>
20627 * ipa-cp.c (determine_versionability): Fix comment typos.
20629 2018-02-21 Jan Hubicka <hubicka@ucw.cz>
20632 * ipa-cp.c (determine_versionability): Do not version functions caling
20635 2018-02-21 Martin Liska <mliska@suse.cz>
20638 * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch):
20639 Add "native" as a possible value.
20640 * config/aarch64/aarch64.h (HAVE_LOCAL_CPU_DETECT): Define
20641 the macro when native cpu detection is available.
20643 2018-02-21 Martin Liska <mliska@suse.cz>
20646 * common/config/arm/arm-common.c (arm_print_hint_for_arch_option):
20647 Add "native" as a possible value.
20648 * config/arm/arm.h (HAVE_LOCAL_CPU_DETECT): Define the macro
20649 when native cpu detection is available.
20651 2018-02-21 Jakub Jelinek <jakub@redhat.com>
20652 Martin Sebor <msebor@redhat.com>
20654 PR tree-optimization/84478
20655 * gimple-fold.h (get_range_strlen): Add a bool argument defaulted to
20657 * gimple-fold.c (get_range_strlen): Make minlen const and assume it
20658 can't be NULL. Change FUZZY from bool to int, for 1 add PHI/COND_EXPR
20659 support which is conservatively correct, for 2 only stay conservative
20660 for maxlen. Formatting and comment capitalization fixes. Add STRICT
20661 argument to the 2 argument get_range_strlen, adjust 6 arg
20662 get_range_strlen caller and clear minmaxlen[0] and [1] if it returned
20664 (get_maxval_strlen): Adjust 6 arg get_range_strlen caller.
20665 (gimple_fold_builtin_strlen): Pass true as last argument to
20668 2018-02-20 Martin Sebor <msebor@redhat.com>
20670 PR middle-end/84095
20671 * gimple-ssa-warn-restrict.c (builtin_memref::extend_offset_range): New.
20672 (builtin_memref::set_base_and_offset): Same. Handle inner references.
20673 (builtin_memref::builtin_memref): Factor out parts into
20674 set_base_and_offset and call it.
20676 2018-02-20 Richard Sandiford <richard.sandiford@linaro.org>
20678 PR middle-end/84406
20679 * optabs-query.c (find_widening_optab_handler_and_mode): If from_mode
20680 is a scalar_int_mode, assert that to_mode is a scalar_int_mode with
20681 greater precision. If to_mode is a MODE_PARTIAL_INT, stop the
20682 search at the associated MODE_INT.
20684 2018-02-20 Jeff Law <law@redhat.com>
20686 PR middle-end/82123
20687 PR tree-optimization/81592
20688 PR middle-end/79257
20689 * gimple-ssa-sprintf.c (format_integer): Query EVRP range analyzer
20690 for range data rather than using global data.
20691 * gimple-ssa-sprintf.c (get_int_range): Query EVRP range analyzer for
20692 range data rather than using global data.
20693 * gimple-ssa-sprintf.c (get_int_range): Accept vr_values parameter
20694 pass it to children as needed.
20695 (struct directive::fmtresult): Similarly.
20696 (struct directive::set_width): Similarly.
20697 (struct directive::set_precision): Similarly.
20698 (format_integer, format_directive, parse_directive): Similarly.
20699 (format_none): Accept unnamed vr_values parameter.
20700 (format_percent, format_floating, format_character): Similarly.
20701 (format_string, format_plain): Similarly.
20702 * gimple-ssa-sprintf.c (sprintf_dom_walker::handle_gimple_call): Query
20703 the EVRP range analyzer for range data rather than using global data.
20704 * gimple-ssa-sprintf.c: Include alloc-pool.h, vr-values.h and
20705 gimple-ssa-evrp-analyze.h
20706 (class sprintf_dom_walker): Add after_dom_children member function.
20707 Add evrp_range_analyzer member.
20708 (sprintf_dom_walker::before_dom_children): Call into the EVRP
20709 range analyzer as needed.
20710 (sprintf_dom_walker::after_dom_children): New member function.
20711 * gimple-ssa-evrp-analyze.c (evrp_range_analyzer::enter): Do nothing
20713 (evrp_range_analyzer::record_ranges_from_stmt): Likewise.
20714 (evrp_range_analyzer::pop_to_marker): Likewise.
20716 2018-02-20 Richard Sandiford <richard.sandiford@linaro.org>
20718 PR tree-optimization/84419
20719 * internal-fn.c (expand_call_mem_ref): Create a TARGET_MEM_REF
20720 with the required type if its current type is compatible but
20723 2018-02-20 Jakub Jelinek <jakub@redhat.com>
20725 PR middle-end/82004
20726 * match.pd (pow(C,x) -> exp(log(C)*x)): Delay all folding until
20727 after vectorization.
20729 2018-02-20 Martin Liska <mliska@suse.cz>
20732 * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch): Print
20733 possible values if we don't have a hint.
20735 2018-02-20 Martin Liska <mliska@suse.cz>
20739 * final.c (shorten_branches): Build align_tab array with one
20741 * opts.c (finish_options): Add alignment option limit check.
20742 (MAX_CODE_ALIGN): Likewise.
20743 (MAX_CODE_ALIGN_VALUE): Likewise.
20744 * doc/invoke.texi: Document maximum allowed option value for
20745 all -falign-* options.
20747 2018-02-19 Jakub Jelinek <jakub@redhat.com>
20750 * reg-notes.def (REG_CALL_ARG_LOCATION): New reg note.
20751 * insn-notes.def (NOTE_INSN_CALL_ARG_LOCATION): Remove.
20752 * var-tracking.c (emit_note_insn_var_location): Remove all references
20753 to NOTE_INSN_CALL_ARG_LOCATION.
20754 (emit_notes_in_bb): Emit arguments as REG_CALL_ARG_LOCATION note on
20755 the CALL_INSN rather than separate NOTE_INSN_CALL_ARG_LOCATION note.
20756 Use copy_rtx_if_shared.
20757 * dwarf2out.c (gen_subprogram_die): Use XEXP with 0 instead of
20758 NOTE_VAR_LOCATION on ca_loc->call_arg_loc_note.
20759 (dwarf2out_var_location): Remove handling of
20760 NOTE_INSN_CALL_ARG_LOCATION, instead handle REG_CALL_ARG_LOCATION note
20762 * final.c (final_scan_insn): Remove all references to
20763 NOTE_INSN_CALL_ARG_LOCATION.
20764 (rest_of_clean_state): Likewise. Remove REG_CALL_ARG_LOCATION notes
20765 before dumping final insns.
20766 * except.c (emit_note_eh_region_end): Remove all references to
20767 NOTE_INSN_CALL_ARG_LOCATION.
20768 * config/alpha/alpha.c (alpha_pad_function_end): Likewise.
20769 * config/c6x/c6x.c (c6x_gen_bundles): Likewise.
20770 * config/arc/arc.c (hwloop_optimize): Likewise.
20771 * config/arm/arm.c (create_fix_barrier): Likewise.
20772 * config/s390/s390.c (s390_chunkify_start): Likewise.
20773 * config/sh/sh.c (find_barrier): Likewise.
20774 * config/i386/i386.c (rest_of_insert_endbranch,
20775 ix86_seh_fixup_eh_fallthru): Likewise.
20776 * config/xtensa/xtensa.c (hwloop_optimize): Likewise.
20777 * config/iq2000/iq2000.c (final_prescan_insn): Likewise.
20778 * config/frv/frv.c (frv_function_prologue): Likewise.
20779 * emit-rtl.c (try_split): Likewise. Copy over REG_CALL_ARG_LOCATION
20781 (note_outside_basic_block_p): Remove all references to
20782 NOTE_INSN_CALL_ARG_LOCATION.
20783 * gengtype.c (adjust_field_rtx_def): Likewise.
20784 * print-rtl.c (rtx_writer::print_rtx_operand_code_0, print_insn):
20786 * jump.c (cleanup_barriers, delete_related_insns): Likewise.
20787 * cfgrtl.c (force_nonfallthru_and_redirect): Likewise.
20790 * builtins.c (builtin_mathfn_code): Don't check if CALL_EXPR_FN (t)
20793 PR tree-optimization/84452
20794 * tree-vect-patterns.c (vect_recog_pow_pattern): Don't call
20795 expand_simd_clones if targetm.simd_clone.compute_vecsize_and_simdlen
20798 2018-02-19 Martin Liska <mliska@suse.cz>
20801 * passes.def: Put pass_sancov_O0 before pass_lower_switch with -O0.
20803 2018-02-19 Martin Liska <mliska@suse.cz>
20804 Richard Sandiford <richard.sandiford@linaro.org>
20806 PR tree-optimization/82491
20807 * gimple-fold.c (get_base_constructor): Make earlier bail out
20810 2018-02-19 Carl Love <cel@us.ibm.com>
20812 * config/rs6000/rs6000-builtin.def: Change NEG macro expansions from
20813 BU_ALTIVEC_A to BU_P8V_AV_1 and BU_ALTIVEC_OVERLOAD_1 to
20815 * config/rs6000/rs6000-c.c: Change ALTIVEC_BUILTIN_VEC_NEG to
20816 P8V_BUILTIN_VEC_NEG.
20818 2018-02-19 Sebastian Perta <sebastian.perta@renesas.com>
20820 * config/rl78/rl78.md (movdf): New define expand.
20822 2018-02-19 Martin Liska <mliska@suse.cz>
20825 * doc/invoke.texi: Fix typo.
20826 * params.def (PARAM_MAX_LOOP_HEADER_INSNS): Likewise.
20828 2018-02-18 Segher Boessenkool <segher@kernel.crashing.org>
20830 * config/rs6000/rs6000.c (rs6000_option_override_internal): Don't
20831 handle rs6000_single_float and rs6000_double_float specially for
20834 2018-02-16 Jeff Law <law@redhat.com>
20836 * config/rx/rx.c (add_pop_cfi_notes): New function.;
20837 (pop_regs): Use it.
20839 2018-02-16 Jakub Jelinek <jakub@redhat.com>
20842 * ipa-inline.c (inline_small_functions): Fix a typo.
20844 2018-02-16 Nathan Sidwell <nathan@acm.org>
20846 * doc/extend.texi (Backwards Compatibility): Americanize 'behaviour'.
20848 2018-02-16 Carl Love <cel@us.ibm.com>
20850 * config/rs6000/rs6000-builtin.def: Add BU_P8V_VSX_2 macro definition.
20851 Change FLOAT2 expansions from BU_VSX_2 to BU_P8V_VSX_2 and
20852 from BU_VSX_OVERLOAD_2 to BU_P8V_OVERLOAD_2.
20853 * config/rs6000/rs6000-c.c: Changed macro VSX_BUILTIN_VEC_FLOAT2
20854 expansion to P8V_BUILTIN_VEC_FLOAT2.
20856 2018-02-16 Vladimir Makarov <vmakarov@redhat.com>
20858 PR rtl-optimization/70023
20859 * lra-constraints.c (inherit_in_ebb): Take hard reg mode of
20860 src_regno into account.
20862 2018-02-16 Carl Love <cel@us.ibm.com>
20864 * config/rs6000/altivec.h: Remove vec_vextract4b and vec_vinsert4b.
20865 * config/rs6000/rs6000-builtin.def: Remove macro expansion for
20866 VEXTRACT4B, VINSERT4B, VINSERT4B_DI and VEXTRACT4B.
20867 * config/rs6000/rs6000.c: Remove case statements for
20868 P9V_BUILTIN_VEXTRACT4B, P9V_BUILTIN_VEC_VEXTRACT4B,
20869 P9V_BUILTIN_VINSERT4B, P9V_BUILTIN_VINSERT4B_DI,
20870 and P9V_BUILTIN_VEC_VINSERT4B.
20871 * config/rs6000/rs6000-c.c (altivec_expand_builtin): Remove entries for
20872 P9V_BUILTIN_VEC_VEXTRACT4B and P9V_BUILTIN_VEC_VINSERT4B.
20873 * config/rs6000/vsx.md:
20874 * doc/extend.texi: Remove vec_vextract4b, non ABI definitions for
20877 2018-02-16 Carl Love <cel@us.ibm.com>
20879 * config/rs6000/altivec.h: Add builtin names vec_extract4b
20881 * config/rs6000/rs6000-builtin.def: Add INSERT4B and EXTRACT4B
20883 * config/rs6000/rs6000-c.c: Add the definitions for
20884 P9V_BUILTIN_VEC_EXTRACT4B and P9V_BUILTIN_VEC_INSERT4B.
20885 * config/rs6000/rs6000.c (altivec_expand_builtin): Add
20886 P9V_BUILTIN_EXTRACT4B and P9V_BUILTIN_INSERT4B case statements.
20887 * config/rs6000/vsx.md: Add define_insn extract4b. Add define_expand
20888 definition for insert4b and define insn *insert3b_internal.
20889 * doc/extend.texi: Add documentation for vec_extract4b.
20891 2018-02-16 Nathan Sidwell <nathan@acm.org>
20893 * doc/extend.texi (Backwards Compatibility): Mention friend
20894 injection. Note for-scope is deprecated.
20895 * doc/invoke.texi (-ffriend-injection): Deprecate.
20897 2018-02-16 Segher Boessenkool <segher@kernel.crashing.org>
20899 * combine.c (try_combine): When adjusting LOG_LINKS for the destination
20900 that moved to I2, also allow destinations that are a paradoxical
20901 subreg (instead of a normal reg).
20903 2018-02-16 Oleg Endo <olegendo@gcc.gnu.org>
20906 * config/rx/rx.c (rx_fuse_in_memory_bitop): Convert shift operand
20909 2018-02-16 Richard Biener <rguenther@suse.de>
20911 PR tree-optimization/84037
20912 PR tree-optimization/84016
20914 * config/i386/i386.c (ix86_builtin_vectorization_cost):
20915 Adjust vec_construct for the fact we need additional higher latency
20916 128bit inserts for AVX256 and AVX512 vector builds.
20917 (ix86_add_stmt_cost): Scale vector construction cost for
20920 2018-02-16 Richard Biener <rguenther@suse.de>
20922 PR tree-optimization/84417
20923 * tree-ssa.c (non_rewritable_mem_ref_base): Properly constrain
20924 the MEM_REF offset when conversion to BIT_FIELD_REF is desired.
20925 (non_rewritable_lvalue_p): Likewise, use poly-ints.
20927 2018-02-16 Martin Liska <mliska@suse.cz>
20930 * internal-fn.def (ASAN_CHECK): Set proper flags.
20931 (ASAN_MARK): Likewise.
20933 2018-02-16 Julia Koval <julia.koval@intel.com>
20935 * config/i386/i386.c (ix86_option_override_internal): Remove PTA_CLWB
20936 from PTA_CANNONLAKE.
20938 2018-02-16 Jakub Jelinek <jakub@redhat.com>
20941 * config/aarch64/cortex-a57-fma-steering.c (fma_forest::merge_forest):
20942 Use ++iter rather than iter++ for std::list iterators.
20943 (func_fma_steering::dfs): Likewise. Don't delete nodes right away,
20944 defer deleting them until all nodes in the forest are processed. Do
20945 free even leaf nodes. Change to_process into auto_vec.
20948 * system.h (BROKEN_VALUE_INITIALIZATION): Define for GCC < 4.3.
20949 * vec.h (vec_default_construct): Use memset instead of placement new
20950 if BROKEN_VALUE_INITIALIZATION is defined.
20951 * hash-table.h (hash_table<Descriptor, Allocator>::empty_slow): Use
20952 memset instead of value initialization if BROKEN_VALUE_INITIALIZATION
20955 PR rtl-optimization/83723
20956 * lra-int.h (lra_substitute_pseudo): Add DEBUG_P argument.
20957 * lra.c (lra_substitute_pseudo): Likewise. If true, use
20958 gen_rtx_raw_SUBREG instead of gen_rtx_SUBREG. Pass DEBUG_P to
20960 (lra_substitute_pseudo_within_insn): Adjust lra_substitute_pseudo
20962 * lra-constraints.c (inherit_reload_reg, split_reg): Likewise.
20964 2018-02-16 Eric Botcazou <ebotcazou@adacore.com>
20966 PR rtl-optimization/81443
20967 * rtlanal.c (num_sign_bit_copies1) <SUBREG>: Do not propagate results
20968 from inner REGs to paradoxical SUBREGs.
20970 2018-02-16 Richard Biener <rguenther@suse.de>
20972 PR tree-optimization/84399
20973 * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
20974 For operands we can analyze at their definition make sure we can
20975 analyze them at each use as well.
20977 2018-02-16 Richard Biener <rguenther@suse.de>
20979 PR tree-optimization/84190
20980 * tree-ssa.c (non_rewritable_mem_ref_base): Do not touch
20981 volatile accesses if the decl isn't volatile.
20983 2018-02-15 Jason Merrill <jason@redhat.com>
20985 PR c++/84314 - ICE with templates and fastcall attribute.
20986 * attribs.c (build_type_attribute_qual_variant): Don't clobber
20987 TYPE_CANONICAL on an existing type.
20989 2018-02-15 Jakub Jelinek <jakub@redhat.com>
20991 PR tree-optimization/84383
20992 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Don't look at
20993 dstoff nor call operand_equal_p if dstbase is NULL.
20995 PR tree-optimization/84334
20996 * match.pd ((A +- CST1) +- CST2 -> A + CST3): If A is
20997 also a CONSTANT_CLASS_P, punt.
20999 2018-02-14 Jim Wilson <jimw@sifive.com>
21001 * config/riscv/riscv.c (riscv_first_stack_step): Move locals after
21002 first SMALL_OPERAND check. New local min_second_step. Move assert
21003 to where locals are set. Add TARGET_RVC support.
21004 * config/riscv/riscv.h (C_SxSP_BITS, SWSP_REACH, SDSP_REACH): New.
21006 2018-02-14 Indu Bhagat <indu.bhagat@oracle.com>
21008 * doc/invoke.texi: Correct -Wformat-overflow code sample.
21010 2018-02-14 Martin Sebor <msebor@redhat.com>
21012 PR tree-optimization/83698
21013 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For
21014 arrays constrain the offset range to their bounds.
21015 (builtin_access::strcat_overlap): Adjust the bounds of overlap offset.
21016 (builtin_access::overlap): Avoid setting the size of overlap if it's
21018 (maybe_diag_overlap): Also consider arrays when deciding what values
21019 of offsets to include in diagnostics.
21021 2018-02-14 Martin Sebor <msebor@redhat.com>
21024 * attribs.c (diag_attr_exclusions): Consider the exclusion(s)
21025 that correspond to the kind of a declaration.
21027 2018-02-14 John David Anglin <danglin@gcc.gnu.org>
21030 * config/pa/pa.md: Load address of PIC label using the linkage table
21031 if the label is nonlocal.
21033 2018-02-14 Kelvin Nilsen <kelvin@gcc.gnu.org>
21035 * config/rs6000/rs6000.c (rs6000_option_override_internal): Issue
21036 warning message if user requests -maltivec=be.
21037 * doc/invoke.texi: Document deprecation of -maltivec=be.
21039 2018-02-14 Will Schmidt <will_schmidt@vnet.ibm.com>
21042 * config/rs6000/rs6000-c.c: Update definitions for
21043 ALTIVEC_BUILTIN_VEC_SLD, ALTIVEC_BUILTIN_VEC_SLDW,
21044 VEC_XXSLDWI and ALTIVEC_BUILTIN_VEC_XXPERMDI builtins.
21046 2018-02-14 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
21049 * config/i386/cetintrin.h: Remove _rdssp[d|q] and
21050 add _get_ssp intrinsics. Remove argument from
21051 __builtin_ia32_rdssp[d|q].
21052 * config/i386/i386-builtin-types.def: Add UINT_FTYPE_VOID.
21053 * config/i386/i386-builtin.def: Remove argument from
21054 __builtin_ia32_rdssp[d|q].
21055 * config/i386/i386.c: Use UINT_FTYPE_VOID. Use
21056 ix86_expand_special_args_builtin for _rdssp[d|q].
21057 * config/i386/i386.md: Remove argument from rdssp[si|di] insn.
21058 Clear register before usage.
21059 * doc/extend.texi: Remove argument from __builtin_ia32_rdssp[d|q].
21060 Add documentation for new _get_ssp and _inc_ssp intrinsics.
21062 2018-02-14 Richard Sandiford <richard.sandiford@linaro.org>
21064 PR tree-optimization/84357
21065 * tree-data-ref.c (object_address_invariant_in_loop_p): Check
21066 operand 1 of an ARRAY_REF too.
21068 2018-02-14 Oleg Endo <olegendo@gcc.gnu.org>
21071 * config/rx/rx-protos.h (rx_reg_dead_or_unused_after_insn,
21072 rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
21074 (set_of_reg): New struct.
21075 (rx_find_set_of_reg, rx_find_use_of_reg): New functions.
21076 * config/rx/rx.c (rx_reg_dead_or_unused_after_insn,
21077 rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
21079 * config/rx/rx.md (andsi3, iorsi3, xorsi3): Convert to insn_and_split.
21080 Split into bitclr, bitset, bitinvert patterns if appropriate.
21081 (*bitset, *bitinvert, *bitclr): Convert to named insn_and_split and
21082 use rx_fuse_in_memory_bitop.
21083 (*bitset_in_memory, *bitinvert_in_memory, *bitclr_in_memory): Convert
21084 to named insn, correct maximum insn length.
21086 2018-02-14 Jozef Lawrynowicz <jozefl.gcc@gmail.com>
21089 * machmode.def: Define a complex mode for PARTIAL_INT.
21090 * genmodes.c (complex_class): Return MODE_COMPLEX_INT for
21092 * doc/rtl.texi: Document CSPImode.
21093 * config/msp430/msp430.c (msp430_hard_regno_nregs): Add CPSImode
21095 (msp430_hard_regno_nregs_with_padding): Likewise.
21097 2018-02-13 Peter Bergner <bergner@vnet.ibm.com>
21100 * config/rs6000/rs6000.c (mem_operand_gpr): Disallow altivec addresses.
21102 2018-02-13 Segher Boessenkool <segher@kernel.crashing.org>
21104 PR rtl-optimization/84169
21105 * combine.c (try_combine): New variable split_i2i3. Set it to true if
21106 we generated a parallel as new i3 and we split that to new i2 and i3
21107 instructions. Handle split_i2i3 similar to swap_i2i3: scan the
21108 LOG_LINKs of i3 to see which of those need to link to i2 now. Link
21109 those to i2, not i1. Partially rewrite this scan code.
21111 2018-02-13 Jakub Jelinek <jakub@redhat.com>
21114 * stor-layout.c (place_field): For variable length fields, adjust
21115 offset_align afterwards not just based on the field's alignment,
21116 but also on the size.
21118 PR middle-end/84309
21119 * match.pd (pow(C,x) -> exp(log(C)*x)): Use exp2s and log2s instead
21120 of exps and logs in the use_exp2 case.
21122 2018-02-13 Jeff Law <law@redhat.com>
21124 * config/rl/rl78.c (rl78_attribute_table): Fix terminator and
21125 entry for "vector".
21127 * config/rl78/rl78.c (rl78_handle_func_attribute): Mark
21130 2018-02-13 Alexandre Oliva <aoliva@redhat.com>
21134 * common.opt (gas-loc-support, gas-locview-support): New.
21135 (ginline-points, ginternal-reset-location-views): New.
21136 * doc/invoke.texi: Document them. Use @itemx where intended.
21137 (gvariable-location-views): Adjust.
21138 * target.def (reset_location_view): New.
21139 * doc/tm.texi.in (DWARF2_ASM_VIEW_DEBUG_INFO): New.
21140 (TARGET_RESET_LOCATION_VIEW): New.
21141 * doc/tm.texi: Rebuilt.
21142 * dwarf2out.c (dwarf2out_default_as_loc_support): New.
21143 (dwarf2out_default_as_locview_support): New.
21144 (output_asm_line_debug_info): Use option variables.
21145 (dwarf2out_maybe_output_loclist_view_pair): Likewise.
21146 (output_loc_list): Likewise.
21147 (add_high_low_attributes): Check option variables.
21148 Don't output entry view attribute in strict mode.
21149 (gen_inlined_subroutine_die): Check option variables.
21150 (dwarf2out_inline_entry): Likewise.
21151 (init_sections_and_labels): Likewise.
21152 (dwarf2out_early_finish): Likewise.
21153 (maybe_reset_location_view): New, from...
21154 (dwarf2out_var_location): ... here. Call it.
21155 * debug.h (dwarf2out_default_as_loc_support): Declare.
21156 (dwarf2out_default_as_locview_support): Declare.
21157 * hooks.c (hook_int_rtx_insn_0): New.
21158 * hooks.h (hook_int_rtx_insn_0): Declare.
21159 * toplev.c (process_options): Take -gas-loc-support and
21160 -gas-locview-support from dwarf2out. Enable
21161 -gvariable-location-views by default only with locview
21162 assembler support. Enable -ginternal-reset-location-views by
21163 default only if the target defines the corresponding hook.
21164 Enable -ginline-points by default if location views are
21165 enabled; force it disabled if statement frontiers are
21167 * tree-inline.c (expand_call_inline): Check option variables.
21168 * tree-ssa-live.c (remove_unused_scope_block_p): Likewise.
21170 2018-02-13 Richard Sandiford <richard.sandiford@linaro.org>
21172 PR tree-optimization/84321
21173 * tree-vrp.c (intersect_range_with_nonzero_bits): Fix VR_ANTI_RANGE
21174 handling. Also check whether the anti-range contains any values
21175 that satisfy the mask; switch to a VR_RANGE if not.
21177 2018-02-13 Paolo Bonzini <bonzini@gnu.org>
21180 * internal-fn.def (ASAN_CHECK, ASAN_MARK): Revert changes to fnspec.
21182 2018-02-13 Martin Jambor <mjambor@suse.cz>
21185 * ipa-param-manipulation.c (ipa_modify_call_arguments): Use location
21186 of call statements, also set location of a load to a temporary.
21188 2018-02-13 Sebastian Perta <sebastian.perta@renesas.com>
21190 * config/rl78/rl78.c (add_vector_labels): New function.
21191 * config/rl78/rl78.c (rl78_handle_vector_attribute): New function.
21192 * config/rl78/rl78.c (rl78_start_function): Call add_vector_labels.
21193 * config/rl78/rl78.c (rl78_handle_func_attribute): Removed the assert
21194 which checks that no arguments are passed.
21195 * config/rl78/rl78.c (rl78_attribute_table): Add "vector" attribute.
21196 * doc/extend.texi: Documentation for the new attribute.
21198 2018-02-13 Andreas Schwab <schwab@suse.de>
21200 * config/riscv/linux.h (CPP_SPEC): Define.
21202 2018-02-13 Jakub Jelinek <jakub@redhat.com>
21205 * config/i386/i386.c (ix86_init_mmx_sse_builtins): Pass
21206 OPTION_MASK_ISA_AES | OPTION_MASK_ISA_SSE2 instead of
21207 OPTION_MASK_ISA_AES as first argument to def_builtin_const
21208 for AES builtins. Pass OPTION_MASK_ISA_PCLMUL | OPTION_MASK_ISA_SSE2
21209 instead of OPTION_MASK_ISA_PCLMUL as first argument to
21210 def_builtin_const for __builtin_ia32_pclmulqdq128 builtin.
21211 * config/i386/wmmintrin.h: If __SSE2__ is not defined, enable it
21212 temporarily for AES and PCLMUL builtins.
21214 PR tree-optimization/84339
21215 * gimple-fold.c (get_range_strlen): Set *FLEXP to true when handling
21216 ARRAY_REF where first operand is array_at_struct_end_p COMPONENT_REF.
21219 PR middle-end/84309
21220 * match.pd (pow(C,x) -> exp(log(C)*x)): Optimize instead into
21221 exp2(log2(C)*x) if C is a power of 2 and c99 runtime is available.
21222 * generic-match-head.c (canonicalize_math_after_vectorization_p): New
21224 * gimple-match-head.c (canonicalize_math_after_vectorization_p): New
21226 * omp-simd-clone.h: New file.
21227 * omp-simd-clone.c: Include omp-simd-clone.h.
21228 (expand_simd_clones): No longer static.
21229 * tree-vect-patterns.c: Include fold-const-call.h, attribs.h,
21230 cgraph.h and omp-simd-clone.h.
21231 (vect_recog_pow_pattern): Optimize pow(C,x) to exp(log(C)*x).
21232 (vect_recog_widen_shift_pattern): Formatting fix.
21233 (vect_pattern_recog_1): Don't check optab for calls.
21236 * config/i386/sse.md (<avx512>_vpermi2var<mode>3_mask): Force
21237 operands[2] into a REG before using gen_lowpart on it.
21239 2018-02-12 Jeff Law <law@redhat.com>
21242 * config/sh/sh.c (find_barrier): Consider a sibling call
21245 * cse.c (try_back_substitute_reg): Move any REG_ARGS_SIZE note when
21246 successfully back substituting a reg.
21248 2018-02-12 Richard Biener <rguenther@suse.de>
21250 PR tree-optimization/84037
21251 * tree-vect-slp.c (vect_analyze_slp_cost): Add visited
21252 parameter, move visited init to caller.
21253 (vect_slp_analyze_operations): Separate cost from validity
21254 check, initialize visited once for all instances.
21255 (vect_schedule_slp): Analyze map to CSE vectorized nodes once
21257 * tree-vect-stmts.c (vect_model_simple_cost): Make early
21259 (vect_model_promotion_demotion_cost): Likewise.
21260 (vectorizable_bswap): Guard cost modeling with !slp_node
21261 instead of !PURE_SLP_STMT to avoid double-counting on hybrid
21263 (vectorizable_call): Likewise.
21264 (vectorizable_conversion): Likewise.
21265 (vectorizable_assignment): Likewise.
21266 (vectorizable_shift): Likewise.
21267 (vectorizable_operation): Likewise.
21268 (vectorizable_store): Likewise.
21269 (vectorizable_load): Likewise.
21270 (vectorizable_condition): Likewise.
21271 (vectorizable_comparison): Likewise.
21273 2018-02-12 Paolo Bonzini <bonzini@gnu.org>
21276 * internal-fn.def (ASAN_CHECK): Fix fnspec to account for return value.
21277 (ASAN_MARK): Fix fnspec to account for return value, change pointer
21278 argument from 'R' to 'W' so that the pointed-to datum is clobbered.
21280 2018-02-08 Jan Hubicka <hubicka@ucw.cz>
21282 PR middle-end/83665
21283 * params.def (inline-min-speedup): Increase from 8 to 15.
21284 (max-inline-insns-auto): Decrease from 40 to 30.
21285 * ipa-split.c (consider_split): Add some buffer for function to
21286 be considered inlining candidate.
21287 * invoke.texi (max-inline-insns-auto, inline-min-speedup): UPdate
21290 2018-02-12 Richard Biener <rguenther@suse.de>
21292 PR tree-optimization/84037
21293 * tree-vect-slp.c (vect_build_slp_tree_2): Try swapping the
21294 matched stmts if we cannot swap the non-matched ones.
21296 2018-02-12 Olga Makhotina <olga.makhotina@intel.com>
21298 * config/i386/avx512fintrin.h (_mm_mask_scalef_round_sd,
21299 _mm_maskz_scalef_round_sd, _mm_mask_scalef_round_ss,
21300 _mm_maskz_scalef_round_ss): New intrinsics.
21301 (__builtin_ia32_scalefsd_round, __builtin_ia32_scalefss_round): Fix.
21302 * config/i386/i386-builtin.def (__builtin_ia32_scalefsd_round,
21303 __builtin_ia32_scalefss_round): Remove.
21304 (__builtin_ia32_scalefsd_mask_round,
21305 __builtin_ia32_scalefss_mask_round): New intrinsics.
21306 * config/i386/sse.md (vmscalef<mode><round_name>): Renamed to ...
21307 (vmscalef<mode><mask_scalar_name><round_scalar_name>): ... this.
21308 ((match_operand:VF_128 2 "<round_nimm_predicate>"
21309 "<round_constraint>")): Changed to ...
21310 ((match_operand:VF_128 2 "<round_scalar_nimm_predicate>"
21311 "<round_scalar_constraint>")): ... this.
21312 ("vscalef<ssescalarmodesuffix>\t{<round_op3>%2, %1, %0|
21313 %0, %1, %2<round_op3>}"): Changed to ...
21314 ("vscalef<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%2, %1,
21315 %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %1,
21316 %2<round_scalar_mask_op3>}"): ... this.
21317 * config/i386/subst.md (round_scalar_nimm_predicate): New.
21319 2018-02-12 Olga Makhotina <olga.makhotina@intel.com>
21321 * config/i386/avx512fintrin.h (_mm_mask_sqrt_round_sd)
21322 (_mm_maskz_sqrt_round_sd, _mm_mask_sqrt_round_ss)
21323 (_mm_maskz_sqrt_round_ss): New intrinsics.
21324 (__builtin_ia32_sqrtsd_round, __builtin_ia32_sqrtss_round): Remove.
21325 (__builtin_ia32_sqrtsd_mask_round)
21326 (__builtin_ia32_sqrtss_mask_round): New builtins.
21327 * config/i386/i386-builtin.def (__builtin_ia32_sqrtsd_round)
21328 (__builtin_ia32_sqrtss_round): Remove.
21329 (__builtin_ia32_sqrtsd_mask_round)
21330 (__builtin_ia32_sqrtss_mask_round): New builtins.
21331 * config/i386/sse.md (vmsqrt<mode>2<round_name>): Renamed to ...
21332 (vmsqrt<mode>2<mask_scalar_name><round_scalar_name>): ... this.
21333 ((match_operand:VF_128 1 "vector_operand"
21334 "xBm,<round_constraint>")): Changed to ...
21335 ((match_operand:VF_128 1 "vector_operand"
21336 "xBm,<round_scalar_constraint>")): ... this.
21337 (vsqrt<ssescalarmodesuffix>\t{<round_op3>%1, %2, %0|
21338 %0, %2, %<iptr>1<round_op3>}): Changed to ...
21339 (vsqrt<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%1, %2,
21340 %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %2,
21341 %<iptr>1<round_scalar_mask_op3>}): ... this.
21342 ((set_attr "prefix" "<round_prefix>")): Changed to ...
21343 ((set_attr "prefix" "<round_scalar_prefix>")): ... this.
21345 2018-02-11 Steven Munroe <munroesj@gcc.gnu.org>
21348 * config/rs6000/mmintrin.h (_mm_cmpeq_pi32 [_ARCH_PWR9]):
21349 Cast vec_cmpeq result to correct type.
21350 * config/rs6000/mmintrin.h (_mm_cmpgt_pi32 [_ARCH_PWR9]):
21351 Cast vec_cmpgt result to correct type.
21353 2018-02-11 Alexandre Oliva <aoliva@redhat.com>
21355 * final.c (final_scan_insn_1): Renamed from...
21356 (final_scan_insn): ... this. New wrapper, to recover
21357 seen from the outermost call in recursive ones.
21358 * config/sparc/sparc.c (output_return): Drop seen from call.
21359 (output_sibcall): Likewise.
21360 * config/visium/visium.c (output_branch): Likewise.
21362 2018-02-10 John David Anglin <danglin@gcc.gnu.org>
21364 * config/pa/pa.c (hppa_profile_hook): Mark SYMBOL_REF for _mcount as
21367 2018-02-10 Alan Modra <amodra@gmail.com>
21370 * config/rs6000/rs6000.md (split_stack_return): Remove (use ..).
21371 Specify LR as an input.
21373 2018-02-10 Jakub Jelinek <jakub@redhat.com>
21376 * omp-low.c (maybe_remove_omp_member_access_dummy_vars,
21377 remove_member_access_dummy_vars): New functions.
21378 (lower_omp_for, lower_omp_taskreg, lower_omp_target,
21379 lower_omp_1, execute_lower_omp): Use them.
21381 PR rtl-optimization/84308
21382 * shrink-wrap.c (spread_components): Release todo vector.
21384 2018-02-09 Vladimir Makarov <vmakarov@redhat.com>
21386 PR rtl-optimization/57193
21387 * ira-color.c (struct allocno_color_data): Add member
21388 conflict_allocno_hard_prefs.
21389 (update_conflict_allocno_hard_prefs): New.
21390 (bucket_allocno_compare_func): Add a preference based on
21391 conflict_allocno_hard_prefs.
21392 (push_allocno_to_stack): Update conflict_allocno_hard_prefs.
21393 (color_allocnos): Remove a dead code. Initiate
21394 conflict_allocno_hard_prefs. Call update_costs_from_prefs.
21396 2018-02-09 Jakub Jelinek <jakub@redhat.com>
21399 * config/rs6000/vsx.md (p9_xxbrq_v16qi): Change input operand
21400 constraint from =wa to wa. Avoid a subreg on the output operand,
21401 instead use a pseudo and subreg it in a move.
21402 (p9_xxbrd_<mode>): Changed to ...
21403 (p9_xxbrd_v2di): ... this insn, without VSX_D iterator.
21404 (p9_xxbrd_v2df): New expander.
21405 (p9_xxbrw_<mode>): Changed to ...
21406 (p9_xxbrw_v4si): ... this insn, without VSX_W iterator.
21407 (p9_xxbrw_v4sf): New expander.
21409 2018-02-09 Sebastian Perta <sebastian.perta@renesas.com>
21411 * config/rx/rx.md (movsicc): Update expander to be matched by GCC.
21413 2018-02-09 Peter Bergner <bergner@vnet.ibm.com>
21416 * config/rs6000/vsx.md (vsx_mul_v2di): Handle generating a 64-bit
21417 multiply in 32-bit mode.
21418 (vsx_div_v2di): Handle generating a 64-bit signed divide in 32-bit mode.
21419 (vsx_udiv_v2di): Handle generating a 64-bit unsigned divide in 32-bit
21422 2018-02-09 Sebastian Perta <sebastian.perta@renesas.com>
21424 * config/rx/constraints.md (CALL_OP_SYMBOL_REF): Added new constraint
21425 to allow or block "symbol_ref" depending on the value of TARGET_JSR.
21426 * config/rx/rx.md (call_internal): Use CALL_OP_SYMBOL_REF.
21427 * config/rx/rx.md (call_value_internal): Use CALL_OP_SYMBOL_REF.
21429 2018-02-09 Pierre-Marie de Rodat <derodat@adacore.com>
21432 * dwarf2out.c (is_trivial_indirect_ref): New function.
21433 (dwarf2out_late_global_decl): Do not generate a location
21434 attribute for variables that have a non-trivial DECL_VALUE_EXPR
21435 and that are not defined in the current unit.
21437 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
21439 * optabs.c (prepare_cmp_insn): Try harder to emit a direct comparison
21440 instead of a libcall for UNORDERED.
21442 2018-02-09 Tamar Christina <tamar.christina@arm.com>
21445 * config/arm/arm-c.c (arm_cpu_builtins): Un-define __ARM_FEATURE_LDREX,
21446 __ARM_ARCH_PROFILE, __ARM_ARCH_ISA_THUMB, __ARM_FP and __ARM_NEON_FP.
21448 2018-02-09 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
21451 * config/s390/s390.c (s390_set_current_function): Invoke
21452 s390_indirect_branch_settings also if fndecl didn't change.
21454 2018-02-09 Alexandre Oliva <aoliva@redhat.com>
21456 * config/rs6000/rs6000.md (blockage): Set length to zero.
21458 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
21460 * expr.c (optimize_bitfield_assignment_op): Remove obsolete assertion.
21462 2018-02-09 Jakub Jelinek <jakub@redhat.com>
21465 * gcc.c (STATIC_LIBASAN_LIBS, STATIC_LIBTSAN_LIBS,
21466 STATIC_LIBLSAN_LIBS, STATIC_LIBUBSAN_LIBS): Handle -static like
21470 * var-tracking.c (vt_add_function_parameter): Punt for non-onepart
21471 PARALLEL incoming that failed vt_get_decl_and_offset check.
21473 PR middle-end/84237
21474 * output.h (bss_initializer_p): Add NAMED argument, defaulted to false.
21475 * varasm.c (bss_initializer_p): Add NAMED argument, if true, ignore
21477 (get_variable_section): For decls in named .bss* sections pass true as
21478 second argument to bss_initializer_p.
21480 2018-02-09 Marek Polacek <polacek@redhat.com>
21481 Jakub Jelinek <jakub@redhat.com>
21484 * fold-const.c (fold_indirect_ref_1): Use VECTOR_TYPE_P macro.
21485 Formatting fixes. Verify first that tree_fits_poly_int64_p (op01).
21486 Sync some changes from cxx_fold_indirect_ref.
21488 2018-02-09 Alexandre Oliva <aoliva@redhat.com>
21490 * cfgexpand.c (expand_gimple_basic_block): Handle inline entry
21492 * dwarf2out.c (dwarf2_debug_hooks): Enable inline_entry hook.
21493 (BLOCK_INLINE_ENTRY_LABEL): New.
21494 (dwarf2out_var_location): Disregard inline entry markers.
21495 (inline_entry_data): New struct.
21496 (inline_entry_data_hasher): New hashtable type.
21497 (inline_entry_data_hasher::hash): New.
21498 (inline_entry_data_hasher::equal): New.
21499 (inline_entry_data_table): New variable.
21500 (add_high_low_attributes): Add DW_AT_entry_pc and
21501 DW_AT_GNU_entry_view attributes if a pending entry is found
21502 in inline_entry_data_table. Add old entry_pc attribute only
21503 if debug nonbinding markers are disabled.
21504 (gen_inlined_subroutine_die): Set BLOCK_DIE if nonbinding
21505 markers are enabled.
21506 (block_within_block_p, dwarf2out_inline_entry): New.
21507 (dwarf2out_finish): Check that no entries remained in
21508 inline_entry_data_table.
21509 * final.c (reemit_insn_block_notes): Handle inline entry notes.
21510 (final_scan_insn, notice_source_line): Likewise.
21511 (rest_of_clean_state): Skip inline entry markers.
21512 * gimple-pretty-print.c (dump_gimple_debug): Handle inline entry
21514 * gimple.c (gimple_build_debug_inline_entry): New.
21515 * gimple.h (enum gimple_debug_subcode): Add
21516 GIMPLE_DEBUG_INLINE_ENTRY.
21517 (gimple_build_debug_inline_entry): Declare.
21518 (gimple_debug_inline_entry_p): New.
21519 (gimple_debug_nonbind_marker_p): Adjust.
21520 * insn-notes.def (INLINE_ENTRY): New.
21521 * print-rtl.c (rtx_writer::print_rtx_operand_code_0): Handle
21522 inline entry marker notes.
21523 (print_insn): Likewise.
21524 * rtl.h (NOTE_MARKER_P): Add INLINE_ENTRY support.
21525 (INSN_DEBUG_MARKER_KIND): Likewise.
21526 (GEN_RTX_DEBUG_MARKER_INLINE_ENTRY_PAT): New.
21527 * tree-inline.c (expand_call_inline): Build and insert
21528 debug_inline_entry stmt.
21529 * tree-ssa-live.c (remove_unused_scope_block_p): Preserve
21530 inline entry blocks early, if nonbind markers are enabled.
21531 (dump_scope_block): Dump fragment info.
21532 * var-tracking.c (reemit_marker_as_note): Handle inline entry note.
21533 * doc/gimple.texi (gimple_debug_inline_entry_p): New.
21534 (gimple_build_debug_inline_entry): New.
21535 * doc/invoke.texi (gstatement-frontiers, gno-statement-frontiers):
21536 Enable/disable inline entry points too.
21537 * doc/rtl.texi (NOTE_INSN_INLINE_ENTRY): New.
21538 (DEBUG_INSN): Describe inline entry markers.
21540 * common.opt (gvariable-location-views): New.
21541 (gvariable-location-views=incompat5): New.
21542 * config.in: Rebuilt.
21543 * configure: Rebuilt.
21544 * configure.ac: Test assembler for view support.
21545 * dwarf2asm.c (dw2_asm_output_symname_uleb128): New.
21546 * dwarf2asm.h (dw2_asm_output_symname_uleb128): Declare.
21547 * dwarf2out.c (var_loc_view): New typedef.
21548 (struct dw_loc_list_struct): Add vl_symbol, vbegin, vend.
21549 (dwarf2out_locviews_in_attribute): New.
21550 (dwarf2out_locviews_in_loclist): New.
21551 (dw_val_equal_p): Compare val_view_list of dw_val_class_view_lists.
21552 (enum dw_line_info_opcode): Add LI_adv_address.
21553 (struct dw_line_info_table): Add view.
21554 (RESET_NEXT_VIEW, RESETTING_VIEW_P): New macros.
21555 (DWARF2_ASM_VIEW_DEBUG_INFO): Define default.
21556 (zero_view_p): New variable.
21557 (ZERO_VIEW_P): New macro.
21558 (output_asm_line_debug_info): New.
21559 (struct var_loc_node): Add view.
21560 (add_AT_view_list, AT_loc_list): New.
21561 (add_var_loc_to_decl): Add view param. Test it against last.
21562 (new_loc_list): Add view params. Record them.
21563 (AT_loc_list_ptr): Handle loc and view lists.
21564 (view_list_to_loc_list_val_node): New.
21565 (print_dw_val): Handle dw_val_class_view_list.
21566 (size_of_die): Likewise.
21567 (value_format): Likewise.
21568 (loc_list_has_views): New.
21569 (gen_llsym): Set vl_symbol too.
21570 (maybe_gen_llsym, skip_loc_list_entry): New.
21571 (dwarf2out_maybe_output_loclist_view_pair): New.
21572 (output_loc_list): Output view list or entries too.
21573 (output_view_list_offset): New.
21574 (output_die): Handle dw_val_class_view_list.
21575 (output_dwarf_version): New.
21576 (output_compilation_unit_header): Use it.
21577 (output_skeleton_debug_sections): Likewise.
21578 (output_rnglists, output_line_info): Likewise.
21579 (output_pubnames, output_aranges): Update version comments.
21580 (output_one_line_info_table): Output view numbers in asm comments.
21581 (dw_loc_list): Determine current endview, pass it to new_loc_list.
21582 Call maybe_gen_llsym.
21583 (loc_list_from_tree_1): Adjust.
21584 (add_AT_location_description): Create view list attribute if
21585 needed, check it's absent otherwise.
21586 (convert_cfa_to_fb_loc_list): Adjust.
21587 (maybe_emit_file): Call output_asm_line_debug_info for test.
21588 (dwarf2out_var_location): Reset views as needed. Precompute
21589 add_var_loc_to_decl args. Call get_attr_min_length only if we have the
21590 attribute. Set view.
21591 (new_line_info_table): Reset next view.
21592 (set_cur_line_info_table): Call output_asm_line_debug_info for test.
21593 (dwarf2out_source_line): Likewise. Output view resets and labels to
21594 the assembler, or select appropriate line info opcodes.
21595 (prune_unused_types_walk_attribs): Handle dw_val_class_view_list.
21596 (optimize_string_length): Catch it. Adjust.
21597 (resolve_addr): Copy vl_symbol along with ll_symbol. Handle
21598 dw_val_class_view_list, and remove it if no longer needed.
21599 (hash_loc_list): Hash view numbers.
21600 (loc_list_hasher::equal): Compare them.
21601 (optimize_location_lists): Check whether a view list symbol is
21602 needed, and whether the locview attribute is present, and
21603 whether they match. Remove the locview attribute if no longer
21605 (index_location_lists): Call skip_loc_list_entry for test.
21606 (dwarf2out_finish): Call output_asm_line_debug_info for test.
21607 Use output_dwarf_version.
21608 * dwarf2out.h (enum dw_val_class): Add dw_val_class_view_list.
21609 (struct dw_val_node): Add val_view_list.
21610 * final.c (SEEN_NEXT_VIEW): New.
21611 (set_next_view_needed): New.
21612 (clear_next_view_needed): New.
21613 (maybe_output_next_view): New.
21614 (final_start_function): Rename to...
21615 (final_start_function_1): ... this. Take pointer to FIRST,
21616 add SEEN parameter. Emit param bindings in the initial view.
21617 (final_start_function): Reintroduce SEEN-less interface.
21618 (final): Rename to...
21619 (final_1): ... this. Take SEEN parameter. Output final pending
21620 next view at the end.
21621 (final): Reintroduce seen-less interface.
21622 (final_scan_insn): Output pending next view before switching
21623 sections or ending a block. Mark the next view as needed when
21624 outputting variable locations. Notify debug backend of section
21625 changes, and of location view changes.
21626 (rest_of_handle_final): Adjust.
21627 * toplev.c (process_options): Autodetect value for debug variable
21628 location views option. Warn on incompat5 without -gdwarf-5.
21629 * doc/invoke.texi (gvariable-location-views): New.
21630 (gvariable-location-views=incompat5): New.
21631 (gno-variable-location-views): New.
21633 2018-02-08 David Malcolm <dmalcolm@redhat.com>
21635 PR tree-optimization/84136
21636 * tree-cfg.c (find_taken_edge_computed_goto): Remove assertion
21637 that the result of find_edge is non-NULL.
21639 2018-02-08 Sergey Shalnov <sergey.shalnov@intel.com>
21642 * config/i386/x86-tune-costs.h (skylake_cost): Fix cost of
21643 storing integer register in SImode. Fix cost of 256 and 512
21644 byte aligned SSE register store.
21646 2018-02-08 Sergey Shalnov <sergey.shalnov@intel.com>
21648 * config/i386/i386.c (ix86_multiplication_cost): Fix
21649 multiplication cost for TARGET_AVX512DQ.
21651 2018-02-08 Marek Polacek <polacek@redhat.com>
21653 PR tree-optimization/84238
21654 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Verify the result of
21657 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
21659 PR tree-optimization/84265
21660 * tree-vect-stmts.c (vectorizable_store): Don't treat
21661 VMAT_CONTIGUOUS accesses as grouped.
21662 (vectorizable_load): Likewise.
21664 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
21666 PR tree-optimization/81635
21667 * wide-int.h (wi::round_down_for_mask, wi::round_up_for_mask): Declare.
21668 * wide-int.cc (wi::round_down_for_mask, wi::round_up_for_mask)
21669 (test_round_for_mask): New functions.
21670 (wide_int_cc_tests): Call test_round_for_mask.
21671 * tree-vrp.h (intersect_range_with_nonzero_bits): Declare.
21672 * tree-vrp.c (intersect_range_with_nonzero_bits): New function.
21673 * tree-data-ref.c (split_constant_offset_1): Use it to refine the
21674 range returned by get_range_info.
21676 2018-02-08 Jan Hubicka <hubicka@ucw.cz>
21679 * cgraph.h (symtab_node::output_to_lto_symbol_table_p): Declare
21680 * symtab.c: Include builtins.h
21681 (symtab_node::output_to_lto_symbol_table_p): Move here
21682 from lto-streamer-out.c:output_symbol_p.
21683 * lto-streamer-out.c (write_symbol): Turn early exit to assert.
21684 (output_symbol_p): Move all logic to symtab.c
21685 (produce_symtab): Update.
21687 2018-02-08 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
21689 * config/s390/s390-opts.h (enum indirect_branch): Define.
21690 * config/s390/s390-protos.h (s390_return_addr_from_memory)
21691 (s390_indirect_branch_via_thunk)
21692 (s390_indirect_branch_via_inline_thunk): Add function prototypes.
21693 (enum s390_indirect_branch_type): Define.
21694 * config/s390/s390.c (struct s390_frame_layout, struct
21695 machine_function): Remove.
21696 (indirect_branch_prez10thunk_mask, indirect_branch_z10thunk_mask)
21697 (indirect_branch_table_label_no, indirect_branch_table_name):
21699 (INDIRECT_BRANCH_NUM_OPTIONS): Define macro.
21700 (enum s390_indirect_branch_option): Define.
21701 (s390_return_addr_from_memory): New function.
21702 (s390_handle_string_attribute): New function.
21703 (s390_attribute_table): Add new attribute handler.
21704 (s390_execute_label): Handle UNSPEC_EXECUTE_JUMP patterns.
21705 (s390_indirect_branch_via_thunk): New function.
21706 (s390_indirect_branch_via_inline_thunk): New function.
21707 (s390_function_ok_for_sibcall): When jumping via thunk disallow
21708 sibling call optimization for non z10 compiles.
21709 (s390_emit_call): Force indirect branch target to be a single
21710 register. Add r1 clobber for non-z10 compiles.
21711 (s390_emit_epilogue): Emit return jump via return_use expander.
21712 (s390_reorg): Handle JUMP_INSNs as execute targets.
21713 (s390_option_override_internal): Perform validity checks for the
21714 new command line options.
21715 (s390_indirect_branch_attrvalue): New function.
21716 (s390_indirect_branch_settings): New function.
21717 (s390_set_current_function): Invoke s390_indirect_branch_settings.
21718 (s390_output_indirect_thunk_function): New function.
21719 (s390_code_end): Implement target hook.
21720 (s390_case_values_threshold): Implement target hook.
21721 (TARGET_ASM_CODE_END, TARGET_CASE_VALUES_THRESHOLD): Define target
21723 * config/s390/s390.h (struct s390_frame_layout)
21724 (struct machine_function): Move here from s390.c.
21725 (TARGET_INDIRECT_BRANCH_NOBP_RET)
21726 (TARGET_INDIRECT_BRANCH_NOBP_JUMP)
21727 (TARGET_INDIRECT_BRANCH_NOBP_JUMP_THUNK)
21728 (TARGET_INDIRECT_BRANCH_NOBP_JUMP_INLINE_THUNK)
21729 (TARGET_INDIRECT_BRANCH_NOBP_CALL)
21730 (TARGET_DEFAULT_INDIRECT_BRANCH_TABLE)
21731 (TARGET_INDIRECT_BRANCH_THUNK_NAME_EXRL)
21732 (TARGET_INDIRECT_BRANCH_THUNK_NAME_EX)
21733 (TARGET_INDIRECT_BRANCH_TABLE): Define macros.
21734 * config/s390/s390.md (UNSPEC_EXECUTE_JUMP)
21735 (INDIRECT_BRANCH_THUNK_REGNUM): Define constants.
21736 (mnemonic attribute): Add values which aren't recognized
21738 ("*cjump_long", "*icjump_long", "*basr", "*basr_r"): Disable
21739 pattern for branch conversion. Fix mnemonic attribute.
21740 ("*c<code>", "*sibcall_br", "*sibcall_value_br", "*return"): Emit
21741 indirect branch via thunk if requested.
21742 ("indirect_jump", "<code>"): Expand patterns for branch conversion.
21743 ("*indirect_jump"): Disable for branch conversion using out of
21745 ("indirect_jump_via_thunk<mode>_z10")
21746 ("indirect_jump_via_thunk<mode>")
21747 ("indirect_jump_via_inlinethunk<mode>_z10")
21748 ("indirect_jump_via_inlinethunk<mode>", "*casesi_jump")
21749 ("casesi_jump_via_thunk<mode>_z10", "casesi_jump_via_thunk<mode>")
21750 ("casesi_jump_via_inlinethunk<mode>_z10")
21751 ("casesi_jump_via_inlinethunk<mode>", "*basr_via_thunk<mode>_z10")
21752 ("*basr_via_thunk<mode>", "*basr_r_via_thunk_z10")
21753 ("*basr_r_via_thunk", "return<mode>_prez10"): New pattern.
21754 ("*indirect2_jump"): Disable for branch conversion.
21755 ("casesi_jump"): Turn into expander and expand patterns for branch
21757 ("return_use"): New expander.
21758 ("*return"): Emit return via thunk and rename it to ...
21759 ("*return<mode>"): ... this one.
21760 * config/s390/s390.opt: Add new options and and enum for the
21763 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
21765 * lra-constraints.c (match_reload): Unconditionally use
21766 gen_lowpart_SUBREG, rather than selecting between that
21767 and equivalent gen_rtx_SUBREG code.
21769 2018-02-08 Richard Biener <rguenther@suse.de>
21771 PR tree-optimization/84233
21772 * tree-ssa-phiprop.c (propagate_with_phi): Use separate
21773 changed flag instead of boguously re-using phi_inserted.
21775 2018-02-08 Martin Jambor <mjambor@suse.cz>
21777 * hsa-gen.c (get_symbol_for_decl): Set program allocation for
21778 static local variables.
21780 2018-02-08 Richard Biener <rguenther@suse.de>
21782 PR tree-optimization/84278
21783 * tree-vect-stmts.c (vectorizable_store): When looking for
21784 smaller vector types to perform grouped strided loads/stores
21785 make sure the mode is supported by the target.
21786 (vectorizable_load): Likewise.
21788 2018-02-08 Wilco Dijkstra <wdijkstr@arm.com>
21790 * config/aarch64/aarch64.c (aarch64_components_for_bb):
21791 Increase LDP/STP opportunities by adding adjacent callee-saves.
21793 2018-02-08 Wilco Dijkstra <wdijkstr@arm.com>
21795 PR rtl-optimization/84068
21796 PR rtl-optimization/83459
21797 * haifa-sched.c (rank_for_schedule): Fix SCHED_PRESSURE_MODEL sorting.
21799 2018-02-08 Aldy Hernandez <aldyh@redhat.com>
21801 PR tree-optimization/84224
21802 * gimple-ssa-warn-alloca.c (pass_walloca::execute): Remove assert.
21803 * calls.c (gimple_alloca_call_p): Only return TRUE when we have
21804 non-zero arguments.
21806 2018-02-07 Iain Sandoe <iain@codesourcery.com>
21809 * config/rs6000/altivec.md (*restore_world): Remove LR use.
21810 * config/rs6000/predicates.md (restore_world_operation): Adjust op
21811 count, remove one USE.
21813 2018-02-07 Michael Meissner <meissner@linux.vnet.ibm.com>
21815 * doc/install.texi (Configuration): Document the
21816 --with-long-double-format={ibm,ieee} PowerPC configuration
21820 * config/rs6000/rs6000.md (fix_trunc<SFDF:mode><QHI:mode>2):
21821 Convert from define_expand to be define_insn_and_split. Rework
21822 float/double/_Float128 conversions to QI/HI/SImode to work with
21823 both ISA 2.07 (power8) or ISA 3.0 (power9). Fix regression where
21824 conversions to QI/HImode types did a store and then a load to
21825 truncate the value. For conversions to VSX registers, don't split
21826 the insn, instead emit the code directly. Use the code iterator
21827 any_fix to combine signed and unsigned conversions.
21828 (fix<uns>_trunc<SFDF:mode>si2_p8): Likewise.
21829 (fixuns_trunc<SFDF:mode><QHI:mode>2): Likewise.
21830 (fix_trunc<IEEE128:mode><QHI:mode>2): Likewise.
21831 (fix<uns>_trunc<SFDF:mode><QHI:mode>2): Likewise.
21832 (fix_<mode>di2_hw): Likewise.
21833 (fixuns_<mode>di2_hw): Likewise.
21834 (fix_<mode>si2_hw): Likewise.
21835 (fixuns_<mode>si2_hw): Likewise.
21836 (fix<uns>_<IEEE128:mode><SDI:mode>2_hw): Likewise.
21837 (fix<uns>_trunc<IEEE128:mode><QHI:mode>2): Likewise.
21838 (fctiw<u>z_<mode>_smallint): Rename fctiw<u>z_<mode>_smallint to
21839 fix<uns>_trunc<SFDF:mode>si2_p8.
21840 (fix_trunc<SFDF:mode><QHI:mode>2_internal): Delete, no longer used.
21841 (fixuns_trunc<SFDF:mode><QHI:mode>2_internal): Likewise.
21842 (fix<uns>_<mode>_mem): Likewise.
21843 (fctiw<u>z_<mode>_mem): Likewise.
21844 (fix<uns>_<mode>_mem): Likewise.
21845 (fix<uns>_trunc<SFDF:mode><QHSI:mode>2_mem): On ISA 3.0, prevent
21846 the register allocator from doing a direct move to the GPRs to do
21847 a store, and instead use the ISA 3.0 store byte/half-word from
21848 vector register instruction. For IEEE 128-bit floating point,
21849 also optimize stores of 32-bit ints.
21850 (fix<uns>_trunc<IEEE128:mode><QHSI:mode>2_mem): Likewise.
21852 2018-02-07 Alan Hayward <alan.hayward@arm.com>
21854 * genextract.c (push_pathstr_operand): New function to support
21856 (walk_rtx): Call push_pathstr_operand.
21857 (print_path): Support [a-zA-Z].
21859 2018-02-07 Richard Biener <rguenther@suse.de>
21861 PR tree-optimization/84037
21862 * tree-vectorizer.h (struct _loop_vec_info): Add ivexpr_map member.
21863 (cse_and_gimplify_to_preheader): Declare.
21864 (vect_get_place_in_interleaving_chain): Likewise.
21865 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
21867 (_loop_vec_info::~_loop_vec_info): Delete it.
21868 (cse_and_gimplify_to_preheader): New function.
21869 * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Export.
21870 * tree-vect-stmts.c (vectorizable_store): CSE base and steps.
21871 (vectorizable_load): Likewise. For grouped stores always base
21872 the IV on the first element.
21873 * tree-vect-loop-manip.c (vect_loop_versioning): Unshare versioning
21874 condition before gimplifying.
21876 2018-02-07 Jakub Jelinek <jakub@redhat.com>
21878 * tree-eh.c (operation_could_trap_helper_p): Ignore honor_trapv for
21879 *DIV_EXPR and *MOD_EXPR.
21881 2018-02-07 H.J. Lu <hongjiu.lu@intel.com>
21884 * config/i386/i386.c (ix86_option_override_internal): Mask out
21885 the CF_SET bit when checking -fcf-protection.
21887 2018-02-07 Tom de Vries <tom@codesourcery.com>
21890 * omp-expand.c (expand_oacc_collapse_init): Ensure diff_type is large
21893 2018-02-07 Richard Biener <rguenther@suse.de>
21895 PR tree-optimization/84204
21896 * tree-chrec.c (chrec_fold_plus_1): Remove size limiting in
21899 PR tree-optimization/84205
21900 * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Also
21901 special-case isl_ast_op_zdiv_r.
21903 PR tree-optimization/84223
21904 * graphite-scop-detection.c (gather_bbs::before_dom_children):
21905 Only add conditions from within the region.
21906 (gather_bbs::after_dom_children): Adjust.
21908 2018-02-07 Georg-Johann Lay <avr@gjlay.de>
21911 * config/avr/avr.h (GENERAL_REGNO_P, GENERAL_REG_P): New macros.
21912 * config/avr/avr.md: Only post-reload split REG-REG moves if
21913 either register is GENERAL_REG_P.
21915 2018-02-07 Jakub Jelinek <jakub@redhat.com>
21917 PR tree-optimization/84235
21918 * tree-ssa-scopedtables.c
21919 (avail_exprs_stack::simplify_binary_operation): Fir MINUS_EXPR, punt
21920 if the subtraction is performed in floating point type where NaNs are
21921 honored. For *DIV_EXPR, punt for ALL_FRACT_MODE_Ps where we can't
21922 build 1. Formatting fix.
21924 2018-02-06 Jakub Jelinek <jakub@redhat.com>
21927 * config/i386/i386.c (rest_of_insert_endbranch): Only skip
21928 NOTE_INSN_CALL_ARG_LOCATION after a call, not anything else,
21929 and skip it regardless of bb boundaries. Use CALL_P macro,
21930 don't test INSN_P (insn) together with CALL_P or JUMP_P check
21931 unnecessarily, formatting fix.
21933 2018-02-06 Michael Collison <michael.collison@arm.com>
21935 * config/arm/thumb2.md:
21936 (*thumb2_mov_negscc): Split only if TARGET_THUMB2 && !arm_restrict_it.
21937 (*thumb_mov_notscc): Ditto.
21939 2018-02-06 Michael Meissner <meissner@linux.vnet.ibm.com>
21942 * config/rs6000/rs6000.md (su code attribute): Use "u" for
21943 unsigned_fix, not "s".
21945 2018-02-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
21947 * configure.ac (gcc_fn_eh_frame_ro): New function.
21948 (gcc_cv_as_cfi_directive): Check both 32 and 64-bit assembler for
21949 correct .eh_frame permissions.
21950 * configure: Regenerate.
21952 2018-02-06 Andrew Jenner <andrew@codeourcery.com>
21954 * doc/invoke.texi: Add section for the PowerPC SPE backend. Remove
21955 irrelevant options.
21957 2018-02-06 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
21959 * config/rs6000/rs6000.c (rs6000_option_override_internal):
21960 Display warning message for -mno-speculate-indirect-jumps.
21962 2018-02-06 Andrew Jenner <andrew@codesourcery.com>
21964 * config/powerpcspe/powerpcspe.opt: (msimple-fpu, mfpu) Add
21966 * config/powerpcspe/sysv4.opt (mbit-align): Likewise.
21968 2018-02-06 Aldy Hernandez <aldyh@redhat.com>
21970 PR tree-optimization/84225
21971 * tree-eh.c (find_trapping_overflow): Only call
21972 operation_no_trapping_overflow when ANY_INTEGRAL_TYPE_P.
21974 2018-02-06 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
21977 * config/i386/i386.c: Reimplement the check of possible options
21978 -mibt/-mshstk conbination. Change error messages.
21979 * doc/invoke.texi: Fix a typo: remove extra '='.
21981 2018-02-06 Marek Polacek <polacek@redhat.com>
21983 PR tree-optimization/84228
21984 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Skip debug statements.
21986 2018-02-06 Tamar Christina <tamar.christina@arm.com>
21989 * config/arm/arm.c (arm_print_asm_arch_directives): Record already
21990 emitted arch directives.
21991 * config/arm/arm-c.c (arm_cpu_builtins): Undefine __ARM_ARCH and
21992 __ARM_FEATURE_COPROC before changing architectures.
21994 2018-02-06 Richard Biener <rguenther@suse.de>
21996 * config/i386/i386.c (print_reg): Fix typo.
21997 (ix86_loop_unroll_adjust): Do not unroll beyond the original nunroll.
21999 2018-02-06 Eric Botcazou <ebotcazou@adacore.com>
22001 * configure: Regenerate.
22003 2018-02-05 Martin Sebor <msebor@redhat.com>
22005 PR tree-optimization/83369
22006 * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Use %G to print
22009 2018-02-05 Martin Liska <mliska@suse.cz>
22011 * doc/invoke.texi: Cherry-pick upstream r323995.
22013 2018-02-05 Richard Sandiford <richard.sandiford@linaro.org>
22015 * ira.c (ira_init_register_move_cost): Adjust comment.
22017 2018-02-05 Martin Liska <mliska@suse.cz>
22019 PR gcov-profile/84137
22020 * doc/gcov.texi: Fix typo in documentation.
22022 2018-02-05 Martin Liska <mliska@suse.cz>
22024 PR gcov-profile/83879
22025 * doc/gcov.texi: Document necessity of --dynamic-list-data when
22026 using dlopen functionality.
22028 2018-02-05 Olga Makhotina <olga.makhotina@intel.com>
22030 * config/i386/avx512dqintrin.h (_mm_mask_range_sd, _mm_maskz_range_sd,
22031 _mm_mask_range_round_sd, _mm_maskz_range_round_sd, _mm_mask_range_ss,
22032 _mm_maskz_range_ss, _mm_mask_range_round_ss,
22033 _mm_maskz_range_round_ss): New intrinsics.
22034 (__builtin_ia32_rangesd128_round)
22035 (__builtin_ia32_rangess128_round): Remove.
22036 (__builtin_ia32_rangesd128_mask_round,
22037 __builtin_ia32_rangess128_mask_round): New builtins.
22038 * config/i386/i386-builtin.def (__builtin_ia32_rangesd128_round,
22039 __builtin_ia32_rangess128_round): Remove.
22040 (__builtin_ia32_rangesd128_mask_round,
22041 __builtin_ia32_rangess128_mask_round): New builtins.
22042 * config/i386/sse.md (ranges<mode><round_saeonly_name>): Renamed to ...
22043 (ranges<mode><mask_scalar_name><round_saeonly_scalar_name>): ... this.
22044 ((match_operand:VF_128 2 "<round_saeonly_nimm_predicate>"
22045 "<round_saeonly_constraint>")): Changed to ...
22046 ((match_operand:VF_128 2 "<round_saeonly_scalar_nimm_predicate>"
22047 "<round_saeonly_scalar_constraint>")): ... this.
22048 ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_op4>%2, %1, %0|
22049 %0, %1, %2<round_saeonly_op4>, %3}"): Changed to ...
22050 ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_scalar_mask_op4>%2,
22051 %1, %0<mask_scalar_operand4>|%0<mask_scalar_operand4>, %1,
22052 %2<round_saeonly_scalar_mask_op4>, %3}"): ... this.
22054 2018-02-02 Andrew Jenner <andrew@codesourcery.com>
22056 * config/powerpcspe/powerpcspe.opt: Add Undocumented to irrelevant
22058 * config/powerpcspe/powerpcspe-tables.opt (rs6000_cpu_opt_value):
22059 Remove all values except native, 8540 and 8548.
22061 2018-02-02 H.J. Lu <hongjiu.lu@intel.com>
22063 * config/i386/i386.c (ix86_output_function_return): Pass
22064 INVALID_REGNUM, instead of -1, as invalid register number to
22065 indirect_thunk_name and output_indirect_thunk.
22067 2018-02-02 Julia Koval <julia.koval@intel.com>
22069 * config.gcc: Add -march=icelake.
22070 * config/i386/driver-i386.c (host_detect_local_cpu): Detect icelake.
22071 * config/i386/i386-c.c (ix86_target_macros_internal): Handle icelake.
22072 * config/i386/i386.c (processor_costs): Add m_ICELAKE.
22073 (PTA_ICELAKE, PTA_AVX512VNNI, PTA_GFNI, PTA_VAES, PTA_AVX512VBMI2,
22074 PTA_VPCLMULQDQ, PTA_RDPID, PTA_AVX512BITALG): New.
22075 (processor_target_table): Add icelake.
22076 (ix86_option_override_internal): Handle new PTAs.
22077 (get_builtin_code_for_version): Handle icelake.
22078 (M_INTEL_COREI7_ICELAKE): New.
22079 (fold_builtin_cpu): Handle icelake.
22080 * config/i386/i386.h (TARGET_ICELAKE, PROCESSOR_ICELAKE): New.
22081 * doc/invoke.texi: Add -march=icelake.
22083 2018-02-02 Julia Koval <julia.koval@intel.com>
22085 * config/i386/i386.c (ix86_option_override_internal): Change flags type
22086 to wide_int_bitmask.
22087 * wide-int-bitmask.h: New.
22089 2018-02-02 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
22092 * config/i386/i386.md: Replace Pmode with word_mode in
22093 builtin_setjmp_setup and builtin_longjmp to support x32.
22095 2018-02-01 Peter Bergner <bergner@vnet.ibm.com>
22099 * config/rs6000/driver-rs6000.c: #include "diagnostic.h".
22101 (rs6000_supported_cpu_names): New static variable.
22102 (linux_cpu_translation_table): Likewise.
22103 (elf_platform) <cpu>: Define new static variable and use it.
22104 Translate kernel AT_PLATFORM name to canonical name if needed.
22105 Error if platform name is unknown.
22107 2018-02-01 Aldy Hernandez <aldyh@redhat.com>
22110 * config/pa/predicates.md (base14_operand): Handle E_VOIDmode.
22112 2018-02-01 Jeff Law <law@redhat.com>
22115 * config/i386/i386.c (release_scratch_register_on_entry): Add new
22116 OFFSET and RELEASE_VIA_POP arguments. Use SP+OFFSET to restore
22117 the scratch if RELEASE_VIA_POP is false.
22118 (ix86_adjust_stack_and_probe_stack_clash): Un-constify SIZE.
22119 If we have to save a temporary register, decrement SIZE appropriately.
22120 Pass new arguments to release_scratch_register_on_entry.
22121 (ix86_adjust_stack_and_probe): Likewise.
22122 (ix86_emit_probe_stack_range): Pass new arguments to
22123 release_scratch_register_on_entry.
22125 2018-02-01 Uros Bizjak <ubizjak@gmail.com>
22127 PR rtl-optimization/84157
22128 * combine.c (change_zero_ext): Use REG_P predicate in
22129 front of HARD_REGISTER_P predicate.
22131 2018-02-01 Georg-Johann Lay <avr@gjlay.de>
22133 * config/avr/avr.c (avr_option_override): Move disabling of
22134 -fdelete-null-pointer-checks to...
22135 * common/config/avr/avr-common.c (avr_option_optimization_table):
22138 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
22140 PR tree-optimization/81635
22141 * tree-data-ref.c (split_constant_offset_1): For types that
22142 wrap on overflow, try to use range info to prove that wrapping
22145 2018-02-01 Renlin Li <renlin.li@arm.com>
22148 * config/aarch64/aarch64.c (aarch64_class_max_nregs): Handle
22149 TAILCALL_ADDR_REGS.
22150 (aarch64_register_move_cost): Likewise.
22151 * config/aarch64/aarch64.h (reg_class): Rename CALLER_SAVE_REGS to
22152 TAILCALL_ADDR_REGS.
22153 (REG_CLASS_NAMES): Likewise.
22154 (REG_CLASS_CONTENTS): Rename CALLER_SAVE_REGS to
22155 TAILCALL_ADDR_REGS. Remove IP registers.
22156 * config/aarch64/aarch64.md (Ucs): Update register constraint.
22158 2018-02-01 Richard Biener <rguenther@suse.de>
22160 * domwalk.h (dom_walker::dom_walker): Add additional constructor
22161 for specifying RPO order and allow NULL for that.
22162 * domwalk.c (dom_walker::dom_walker): Likewise.
22163 (dom_walker::walk): Handle NULL RPO order.
22164 * tree-into-ssa.c (rewrite_dom_walker): Do not walk dom children
22166 (rewrite_update_dom_walker): Likewise.
22167 (mark_def_dom_walker): Likewise.
22169 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
22171 * config/aarch64/aarch64-protos.h (aarch64_split_sve_subreg_move)
22172 (aarch64_maybe_expand_sve_subreg_move): Declare.
22173 * config/aarch64/aarch64.md (UNSPEC_REV_SUBREG): New unspec.
22174 * config/aarch64/predicates.md (aarch64_any_register_operand): New
22176 * config/aarch64/aarch64-sve.md (mov<mode>): Optimize subreg moves
22177 that are semantically a reverse operation.
22178 (*aarch64_sve_mov<mode>_subreg_be): New pattern.
22179 * config/aarch64/aarch64.c (aarch64_maybe_expand_sve_subreg_move):
22180 (aarch64_replace_reg_mode, aarch64_split_sve_subreg_move): New
22182 (aarch64_can_change_mode_class): For big-endian, forbid changes
22183 between two SVE modes if they have different element sizes.
22185 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
22187 * config/aarch64/aarch64.c (aarch64_expand_sve_const_vector): Prefer
22188 the TImode handling for big-endian targets.
22190 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
22192 * config/aarch64/aarch64-sve.md (sve_ld1rq): Replace with...
22193 (*sve_ld1rq<Vesize>): ... this new pattern. Handle all element sizes,
22195 * config/aarch64/aarch64.c (aarch64_expand_sve_widened_duplicate):
22196 Remove BSWAP handing for big-endian targets and use the form of
22197 LD1RQ appropariate for the mode.
22199 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
22201 * config/aarch64/aarch64.c (aarch64_simd_valid_immediate): Handle
22202 all CONST_VECTOR_DUPLICATE_P vectors, not just those with a single
22203 duplicated element.
22205 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
22208 * config/aarch64/aarch64.c (aarch64_secondary_reload): Tighten
22209 check for operands that need to go through aarch64_sve_reload_be.
22211 2018-02-01 Jakub Jelinek <jakub@redhat.com>
22213 PR tree-optimization/81661
22214 PR tree-optimization/84117
22215 * tree-eh.h (rewrite_to_non_trapping_overflow): Declare.
22216 * tree-eh.c: Include gimplify.h.
22217 (find_trapping_overflow, replace_trapping_overflow,
22218 rewrite_to_non_trapping_overflow): New functions.
22219 * tree-vect-loop.c: Include tree-eh.h.
22220 (vect_get_loop_niters): Use rewrite_to_non_trapping_overflow.
22221 * tree-data-ref.c: Include tree-eh.h.
22222 (get_segment_min_max): Use rewrite_to_non_trapping_overflow.
22224 2018-01-31 Uros Bizjak <ubizjak@gmail.com>
22226 PR rtl-optimization/84123
22227 * combine.c (change_zero_ext): Check if hard register satisfies
22228 can_change_dest_mode before calling gen_lowpart_SUBREG.
22230 2018-01-31 Vladimir Makarov <vmakarov@redhat.com>
22233 * ira.c (ira_init_register_move_cost): Remove assert.
22235 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
22237 PR rtl-optimization/84071
22238 * doc/tm.texi.in (WORD_REGISTER_OPERATIONS): Add explicit case.
22239 * doc/tm.texi: Regenerate.
22241 2018-01-31 Richard Biener <rguenther@suse.de>
22243 PR tree-optimization/84132
22244 * tree-data-ref.c (analyze_miv_subscript): Properly
22245 check whether evolution_function_is_affine_multivariate_p
22246 before calling gcd_of_steps_may_divide_p.
22248 2018-01-31 Julia Koval <julia.koval@intel.com>
22251 * config/i386/i386.c (ix86_expand_builtin): Handle IX86_BUILTIN_RDPID.
22252 * config/i386/i386.md (rdpid_rex64) New.
22253 (rdpid): Make 32bit only.
22255 2018-01-29 Aldy Hernandez <aldyh@redhat.com>
22258 * tree-pretty-print.c (dump_generic_node): Handle a TYPE_NAME with
22259 an IDENTIFIER_NODE for FUNCTION_TYPE's.
22261 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
22264 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
22266 * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
22268 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
22270 PR rtl-optimization/84071
22271 * combine.c (record_dead_and_set_regs_1): Record the source unmodified
22272 for a paradoxical SUBREG on a WORD_REGISTER_OPERATIONS target.
22274 2018-01-31 Claudiu Zissulescu <claziss@synopsys.com>
22276 * config/arc/arc.c (arc_handle_aux_attribute): New function.
22277 (arc_attribute_table): Add 'aux' attribute.
22278 (arc_in_small_data_p): Consider aux like variables.
22279 (arc_is_aux_reg_p): New function.
22280 (arc_asm_output_aligned_decl_local): Ignore 'aux' like variables.
22281 (arc_get_aux_arg): New function.
22282 (prepare_move_operands): Handle aux-register access.
22283 (arc_handle_aux_attribute): New function.
22284 * doc/extend.texi (ARC Variable attributes): Add subsection.
22286 2018-01-31 Claudiu Zissulescu <claziss@synopsys.com>
22288 * config/arc/arc-protos.h (arc_is_uncached_mem_p): Function proto.
22289 * config/arc/arc.c (arc_handle_uncached_attribute): New function.
22290 (arc_attribute_table): Add 'uncached' attribute.
22291 (arc_print_operand): Print '.di' flag for uncached memory
22293 (arc_in_small_data_p): Do not consider for small data the uncached
22295 (arc_is_uncached_mem_p): New function.
22296 * config/arc/predicates.md (compact_store_memory_operand): Check
22297 for uncached memory accesses.
22298 (nonvol_nonimm_operand): Likewise.
22299 * doc/extend.texi (ARC Type Attribute): New subsection.
22301 2018-01-31 Jakub Jelinek <jakub@redhat.com>
22304 * common.opt (falign-functions=, falign-jumps=, falign-labels=,
22305 falign-loops=): Add Optimization flag.
22307 2018-01-30 Jeff Law <law@redhat.com>
22310 * i386.c (ix86_adjust_stack_and_probe_stack_clash): New argument
22311 INT_REGISTERS_SAVED. Check it prior to calling
22312 get_scratch_register_on_entry.
22313 (ix86_adjust_stack_and_probe): Similarly.
22314 (ix86_emit_probe_stack_range): Similarly.
22315 (ix86_expand_prologue): Corresponding changes.
22317 2018-01-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
22320 * config/sol2.h (STARTFILE_ARCH_SPEC): Use -std=c*,
22321 -std=iso9899:199409 instead of -pedantic to select values-Xc.o.
22323 2018-01-30 Vladimir Makarov <vmakarov@redhat.com>
22326 * lra-constraints.c (curr_insn_transform): Process AND in the
22329 2018-01-30 Jakub Jelinek <jakub@redhat.com>
22331 PR rtl-optimization/83986
22332 * sched-deps.c (sched_analyze_insn): For frame related insns, add anti
22333 dependence against last_pending_memory_flush in addition to
22334 pending_jump_insns.
22336 2018-01-30 Alexandre Oliva <aoliva@redhat.com>
22338 PR tree-optimization/81611
22339 * tree-ssa-dom.c (simple_iv_increment_p): Skip intervening
22342 2018-01-30 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
22345 * config/rs6000/rs6000.c (rs6000_internal_arg_pointer): Only return
22348 2018-01-30 Richard Biener <rguenther@suse.de>
22349 Jakub Jelinek <jakub@redhat.com>
22351 PR tree-optimization/84111
22352 * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1): Skip
22353 inner loops added during recursion, as they don't have up-to-date
22356 2018-01-30 Jan Hubicka <hubicka@ucw.cz>
22359 * ipa-inline.c (can_inline_edge_p): Break out late tests to...
22360 (can_inline_edge_by_limits_p): ... here.
22361 (can_early_inline_edge_p, check_callers,
22362 update_caller_keys, update_callee_keys, recursive_inlining,
22363 add_new_edges_to_heap, speculation_useful_p,
22364 inline_small_functions,
22365 inline_small_functions, flatten_function,
22366 inline_to_all_callers_1): Update.
22368 2018-01-30 Jan Hubicka <hubicka@ucw.cz>
22370 * profile-count.c (profile_count::combine_with_ipa_count): Handle
22373 2018-01-30 Richard Biener <rguenther@suse.de>
22375 PR tree-optimization/83008
22376 * tree-vect-slp.c (vect_analyze_slp_cost_1): Properly cost
22377 invariant and constant vector uses in stmts when they need
22378 more than one stmt.
22380 2018-01-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
22383 * configure.ac (gcc_cv_as_shf_merge): Disable on Solaris 10/x86.
22384 * configure: Regenerate.
22386 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
22388 * config/aarch64/aarch64-sve.md (*vec_extract<mode><Vel>_0): New
22390 (*vec_extract<mode><Vel>_v128): Require a nonzero lane number.
22391 Use gen_rtx_REG rather than gen_lowpart.
22393 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
22395 * lra-constraints.c (match_reload): Use subreg_lowpart_offset
22396 rather than 0 when creating partial subregs.
22398 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
22400 * vec-perm-indices.c (vec_perm_indices::series_p): Give examples
22403 2018-01-29 Michael Meissner <meissner@linux.vnet.ibm.com>
22406 * config/rs6000/rs6000.c (rs6000_setup_reg_addr_masks): If DFmode
22407 and SFmode can go in Altivec registers (-mcpu=power7 for DFmode,
22408 -mcpu=power8 for SFmode) don't set the PRE_INCDEC or PRE_MODIFY
22409 flags. This restores the settings used before the 2017-07-24.
22410 Turning off pre increment/decrement/modify allows IVOPTS to
22411 optimize DF/SF loops where the index is an int.
22413 2018-01-29 Richard Biener <rguenther@suse.de>
22414 Kelvin Nilsen <kelvin@gcc.gnu.org>
22417 * tree-vect-stmts.c (vectorizable_call): Don't call
22418 targetm.vectorize_builtin_md_vectorized_function if callee is
22421 2018-01-22 Carl Love <cel@us.ibm.com>
22423 * doc/extend.tex: Fix typo in second arg in
22424 __builtin_bcdadd_{lt|eq|gt|ov} and __builtin_bcdsub_{lt|eq|gt|ov}.
22426 2018-01-29 Richard Biener <rguenther@suse.de>
22428 PR tree-optimization/84086
22429 * tree-ssanames.c: Include cfgloop.h and tree-scalar-evolution.h.
22430 (flush_ssaname_freelist): When SSA names were released reset
22431 the SCEV hash table.
22433 2018-01-29 Richard Biener <rguenther@suse.de>
22435 PR tree-optimization/84057
22436 * tree-ssa-loop-ivcanon.c (unloop_loops): Deal with already
22437 removed paths when removing edges.
22439 2018-01-27 H.J. Lu <hongjiu.lu@intel.com>
22441 * doc/invoke.texi: Replace -mfunction-return==@var{choice} with
22442 -mfunction-return=@var{choice}.
22444 2018-01-27 Bernd Edlinger <bernd.edlinger@hotmail.de>
22446 PR diagnostic/84034
22447 * diagnostic-show-locus.c (get_line_width_without_trailing_whitespace):
22448 Handle CR like TAB.
22449 (layout::print_source_line): Likewise.
22450 (test_get_line_width_without_trailing_whitespace): Add test cases.
22452 2018-01-27 Jakub Jelinek <jakub@redhat.com>
22454 PR middle-end/84040
22455 * sched-deps.c (sched_macro_fuse_insns): Return immediately for
22458 2018-01-26 Jim Wilson <jimw@sifive.com>
22460 * config/riscv/riscv.h (MAX_FIXED_MODE_SIZE): New.
22462 * config/riscv/elf.h (LIB_SPEC): Don't include -lgloss when nosys.specs
22465 2018-01-26 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
22467 * config/aarch64/aarch64.md: Add peepholes for CMP + SUB -> SUBS
22468 and CMP + SUB-immediate -> SUBS.
22470 2018-01-26 Martin Sebor <msebor@redhat.com>
22472 PR tree-optimization/83896
22473 * tree-ssa-strlen.c (get_string_len): Rename...
22474 (get_string_cst_length): ...to this. Return HOST_WIDE_INT.
22475 Avoid assuming length is constant.
22476 (handle_char_store): Use HOST_WIDE_INT for string length.
22478 2018-01-26 Uros Bizjak <ubizjak@gmail.com>
22481 * config/i386/i386.md (*andndi3_doubleword): Add earlyclobber
22482 to (=&r,r,rm) alternative. Add (=r,0,rm) and (=r,r,0) alternatives.
22484 2018-01-26 Richard Biener <rguenther@suse.de>
22486 PR rtl-optimization/84003
22487 * dse.c (record_store): Only record redundant stores when
22488 the earlier store aliases at least all accesses the later one does.
22490 2018-01-26 Jakub Jelinek <jakub@redhat.com>
22492 PR rtl-optimization/83985
22493 * dce.c (deletable_insn_p): Return false for separate shrink wrapping
22494 REG_CFA_RESTORE insns.
22495 (delete_unmarked_insns): Don't ignore separate shrink wrapping
22496 REG_CFA_RESTORE insns here.
22499 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Don't
22500 use SSA_NAME_VAR as base for SSA_NAMEs with non-NULL SSA_NAME_VAR.
22502 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
22504 * config/arc/arc-arch.h (arc_tune_attr): Add ARC_TUNE_CORE_3.
22505 * config/arc/arc.c (arc_sched_issue_rate): Use ARC_TUNE_... .
22506 (arc_init): Likewise.
22507 (arc_override_options): Likewise.
22508 (arc_file_start): Choose Tag_ARC_CPU_variation based on arc_tune
22510 (hwloop_fail): Use TARGET_DBNZ when we want to check for dbnz insn
22512 * config/arc/arc.h (TARGET_DBNZ): Define.
22513 * config/arc/arc.md (attr tune): Add core_3, use ARC_TUNE_... to
22514 properly set the tune attribute.
22515 (dbnz): Use TARGET_DBNZ guard.
22516 * config/arc/arc.opt (mtune): Add core3 option.
22518 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
22520 * config/arc/arc.c (arc_delegitimize_address_0): Refactored to
22521 recognize new pic like addresses.
22522 (arc_delegitimize_address): Clean up.
22524 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
22526 * config/arc/arc-arches.def: Option mrf16 valid for all
22528 * config/arc/arc-c.def (__ARC_RF16__): New predefined macro.
22529 * config/arc/arc-cpus.def (em_mini): New cpu with rf16 on.
22530 * config/arc/arc-options.def (FL_RF16): Add mrf16 option.
22531 * config/arc/arc-tables.opt: Regenerate.
22532 * config/arc/arc.c (arc_conditional_register_usage): Handle
22533 reduced register file case.
22534 (arc_file_start): Set must have build attributes.
22535 * config/arc/arc.h (MAX_ARC_PARM_REGS): Conditional define using
22536 mrf16 option value.
22537 * config/arc/arc.opt (mrf16): Add new option.
22538 * config/arc/elf.h (ATTRIBUTE_PCS): Define.
22539 * config/arc/genmultilib.awk: Handle new mrf16 option.
22540 * config/arc/linux.h (ATTRIBUTE_PCS): Define.
22541 * config/arc/t-multilib: Regenerate.
22542 * doc/invoke.texi (ARC Options): Document mrf16 option.
22544 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
22546 * config/arc/arc-protos.h: Add arc_is_secure_call_p proto.
22547 * config/arc/arc.c (arc_handle_secure_attribute): New function.
22548 (arc_attribute_table): Add 'secure_call' attribute.
22549 (arc_print_operand): Print secure call operand.
22550 (arc_function_ok_for_sibcall): Don't optimize tail calls when
22552 (arc_is_secure_call_p): New function. * config/arc/arc.md
22553 (call_i): Add support for sjli instruction.
22554 (call_value_i): Likewise.
22555 * config/arc/constraints.md (Csc): New constraint.
22557 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
22558 John Eric Martin <John.Martin@emmicro-us.com>
22560 * config/arc/arc-protos.h: Add arc_is_jli_call_p proto.
22561 * config/arc/arc.c (_arc_jli_section): New struct.
22562 (arc_jli_section): New type.
22563 (rc_jli_sections): New static variable.
22564 (arc_handle_jli_attribute): New function.
22565 (arc_attribute_table): Add jli_always and jli_fixed attribute.
22566 (arc_file_end): New function.
22567 (TARGET_ASM_FILE_END): Define.
22568 (arc_print_operand): Reuse 'S' letter for JLI output instruction.
22569 (arc_add_jli_section): New function.
22570 (jli_call_scan): Likewise.
22571 (arc_reorg): Call jli_call_scan.
22572 (arc_output_addsi): Remove 'S' from printing asm operand.
22573 (arc_is_jli_call_p): New function.
22574 * config/arc/arc.md (movqi_insn): Remove 'S' from printing asm
22576 (movhi_insn): Likewise.
22577 (movsi_insn): Likewise.
22578 (movsi_set_cc_insn): Likewise.
22579 (loadqi_update): Likewise.
22580 (load_zeroextendqisi_update): Likewise.
22581 (load_signextendqisi_update): Likewise.
22582 (loadhi_update): Likewise.
22583 (load_zeroextendhisi_update): Likewise.
22584 (load_signextendhisi_update): Likewise.
22585 (loadsi_update): Likewise.
22586 (loadsf_update): Likewise.
22587 (movsicc_insn): Likewise.
22588 (bset_insn): Likewise.
22589 (bxor_insn): Likewise.
22590 (bclr_insn): Likewise.
22591 (bmsk_insn): Likewise.
22592 (bicsi3_insn): Likewise.
22593 (cmpsi_cc_c_insn): Likewise.
22594 (movsi_ne): Likewise.
22595 (movsi_cond_exec): Likewise.
22596 (clrsbsi2): Likewise.
22597 (norm_f): Likewise.
22607 (call_i): Remove 'S' asm letter, add jli instruction.
22608 (call_value_i): Likewise.
22609 * config/arc/arc.op (mjli-always): New option.
22610 * config/arc/constraints.md (Cji): New constraint.
22611 * config/arc/fpx.md (addsf3_fpx): Remove 'S' from printing asm
22613 (subsf3_fpx): Likewise.
22614 (mulsf3_fpx): Likewise.
22615 * config/arc/simdext.md (vendrec_insn): Remove 'S' from printing
22617 * doc/extend.texi (ARC): Document 'jli-always' and 'jli-fixed'
22618 function attrbutes.
22619 * doc/invoke.texi (ARC): Document mjli-always option.
22621 2018-01-26 Sebastian Perta <sebastian.perta@renesas.com>
22623 * config/rl78/rl78.c (rl78_addsi3_internal): If operand 2 is const
22624 avoid addition with 0 and use incw and decw where possible.
22626 2018-01-26 Richard Biener <rguenther@suse.de>
22628 PR tree-optimization/81082
22629 * fold-const.c (fold_plusminus_mult_expr): Do not perform the
22630 association if it requires casting to unsigned.
22631 * match.pd ((A * C) +- (B * C) -> (A+-B)): New patterns derived
22632 from fold_plusminus_mult_expr to catch important cases late when
22633 range info is available.
22635 2018-01-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
22637 * config/i386/sol2.h (USE_HIDDEN_LINKONCE): Remove.
22638 * configure.ac (hidden_linkonce): New test.
22639 * configure: Regenerate.
22640 * config.in: Regenerate.
22642 2018-01-26 Julia Koval <julia.koval@intel.com>
22644 * config/i386/avx512bitalgintrin.h (_mm512_bitshuffle_epi64_mask,
22645 _mm512_mask_bitshuffle_epi64_mask, _mm256_bitshuffle_epi64_mask,
22646 _mm256_mask_bitshuffle_epi64_mask, _mm_bitshuffle_epi64_mask,
22647 _mm_mask_bitshuffle_epi64_mask): Fix type.
22648 * config/i386/i386-builtin-types.def (UHI_FTYPE_V2DI_V2DI_UHI,
22649 USI_FTYPE_V4DI_V4DI_USI): Remove.
22650 * config/i386/i386-builtin.def (__builtin_ia32_vpshufbitqmb512_mask,
22651 __builtin_ia32_vpshufbitqmb256_mask,
22652 __builtin_ia32_vpshufbitqmb128_mask): Fix types.
22653 * config/i386/i386.c (ix86_expand_args_builtin): Remove old types.
22654 * config/i386/sse.md (VI1_AVX512VLBW): Change types.
22656 2018-01-26 Alan Modra <amodra@gmail.com>
22659 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Exclude
22660 UNSPEC_VBPERMQ. Sort other unspecs.
22662 2018-01-25 David Edelsohn <dje.gcc@gmail.com>
22664 * doc/invoke.texi (PowerPC Options): Document 'native' cpu type.
22666 2018-01-25 Jan Hubicka <hubicka@ucw.cz>
22668 PR middle-end/83055
22669 * predict.c (drop_profile): Do not push/pop cfun; update also
22671 (handle_missing_profiles): Fix logic looking for zero profiles.
22673 2018-01-25 Jakub Jelinek <jakub@redhat.com>
22675 PR middle-end/83977
22676 * ipa-fnsummary.c (compute_fn_summary): Clear can_change_signature
22677 on functions with #pragma omp declare simd or functions with simd
22679 * omp-simd-clone.c (expand_simd_clones): Revert 2018-01-24 change.
22680 * config/i386/i386.c (ix86_simd_clone_compute_vecsize_and_simdlen):
22681 Remove trailing \n from warning_at calls.
22683 2018-01-25 Tom de Vries <tom@codesourcery.com>
22686 * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
22687 for neutered workers.
22689 2018-01-24 Joseph Myers <joseph@codesourcery.com>
22692 * config/m68k/m68k.c (m68k_promote_function_mode): New function.
22693 (TARGET_PROMOTE_FUNCTION_MODE): New macro.
22695 2018-01-24 Jeff Law <law@redhat.com>
22698 * i386.c (get_probe_interval): Move to earlier point.
22699 (ix86_compute_frame_layout): If -fstack-clash-protection and
22700 the frame is larger than the probe interval, then use pushes
22701 to save registers rather than reg->mem moves.
22702 (ix86_expand_prologue): Remove conditional for int_registers_saved
22705 2018-01-24 Vladimir Makarov <vmakarov@redhat.com>
22708 * ira-build.c (setup_min_max_allocno_live_range_point): Set up
22709 min/max for never referenced object.
22711 2018-01-24 Jakub Jelinek <jakub@redhat.com>
22713 PR middle-end/83977
22714 * tree.c (free_lang_data_in_decl): Don't clear DECL_ABSTRACT_ORIGIN
22716 * omp-low.c (create_omp_child_function): Remove "omp declare simd"
22717 attributes from DECL_ATTRIBUTES (decl) without affecting
22718 DECL_ATTRIBUTES (current_function_decl).
22719 * omp-simd-clone.c (expand_simd_clones): Ignore DECL_ARTIFICIAL
22720 functions with non-NULL DECL_ABSTRACT_ORIGIN.
22722 2018-01-24 Richard Sandiford <richard.sandiford@linaro.org>
22724 PR tree-optimization/83979
22725 * fold-const.c (fold_comparison): Use constant_boolean_node
22726 instead of boolean_{true,false}_node.
22728 2018-01-24 Jan Hubicka <hubicka@ucw.cz>
22730 * ipa-profile.c (ipa_propagate_frequency_1): Fix logic skipping calls
22733 2018-01-24 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
22735 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
22736 Simplify the clause that sets the length attribute.
22737 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
22738 (*sibcall_nonlocal_sysv<mode>): Clean up code block; simplify the
22739 clause that sets the length attribute.
22740 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
22742 2018-01-24 Tom de Vries <tom@codesourcery.com>
22745 * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_2): Define to 1.
22746 (nvptx_pc_set, nvptx_condjump_label): New function. Copy from jump.c.
22747 Add strict parameter.
22748 (prevent_branch_around_nothing): Insert dummy insn between branch to
22749 label and label with no ptx insn inbetween.
22750 * config/nvptx/nvptx.md (define_insn "fake_nop"): New insn.
22752 2018-01-24 Tom de Vries <tom@codesourcery.com>
22755 * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
22756 for neutered threads in warp.
22757 * config/nvptx/nvptx.md (define_insn "exit"): New insn.
22759 2018-01-24 Richard Biener <rguenther@suse.de>
22761 PR tree-optimization/83176
22762 * tree-chrec.c (chrec_fold_plus_1): Handle (signed T){(T) .. }
22765 2018-01-24 Richard Biener <rguenther@suse.de>
22767 PR tree-optimization/82819
22768 * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Avoid
22769 code generating pluses that are no-ops in the target precision.
22771 2018-01-24 Richard Biener <rguenther@suse.de>
22773 PR middle-end/84000
22774 * tree-cfg.c (replace_loop_annotate): Handle annot_expr_parallel_kind.
22776 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
22778 * cfgcleanup.c (try_crossjump_to_edge): Use combine_with_count
22779 to merge probabilities.
22780 * predict.c (probably_never_executed): Also mark as cold functions
22781 with global 0 profile and guessed local profile.
22782 * profile-count.c (profile_probability::combine_with_count): New
22784 * profile-count.h (profile_probability::operator*,
22785 profile_probability::operator*=, profile_probability::operator/,
22786 profile_probability::operator/=): Reduce precision to adjusted
22787 and set value to guessed on contradictory divisions.
22788 (profile_probability::combine_with_freq): Remove.
22789 (profile_probability::combine_wiht_count): Declare.
22790 (profile_count::force_nonzero):: Set to adjusted.
22791 (profile_count::probability_in):: Set quality to adjusted.
22792 * tree-ssa-tail-merge.c (replace_block_by): Use
22793 combine_with_count.
22795 2018-01-23 Andrew Waterman <andrew@sifive.com>
22796 Jim Wilson <jimw@sifive.com>
22798 * config/riscv/riscv.c (riscv_stack_boundary): New.
22799 (riscv_option_override): Set riscv_stack_boundary. Handle
22800 riscv_preferred_stack_boundary_arg.
22801 * config/riscv/riscv.h (MIN_STACK_BOUNDARY, ABI_STACK_BOUNDARY): New.
22802 (BIGGEST_ALIGNMENT): Set to STACK_BOUNDARY.
22803 (STACK_BOUNDARY): Set to riscv_stack_boundary.
22804 (RISCV_STACK_ALIGN): Use STACK_BOUNDARY.
22805 * config/riscv/riscv.opt (mpreferred-stack-boundary): New.
22806 * doc/invoke.tex (RISC-V Options): Add -mpreferred-stack-boundary.
22808 2018-01-23 H.J. Lu <hongjiu.lu@intel.com>
22811 * config/i386/i386.c (ix86_expand_prologue): Use cost reference
22812 of struct ix86_frame.
22813 (ix86_expand_epilogue): Likewise. Add a local variable for
22814 the reg_save_offset field in struct ix86_frame.
22816 2018-01-23 Bin Cheng <bin.cheng@arm.com>
22818 PR tree-optimization/82604
22819 * tree-loop-distribution.c (enum partition_kind): New enum item
22820 PKIND_PARTIAL_MEMSET.
22821 (partition_builtin_p): Support above new enum item.
22822 (generate_code_for_partition): Ditto.
22823 (compute_access_range): Differentiate cases that equality can be
22824 proven at all loops, the innermost loops or no loops.
22825 (classify_builtin_st, classify_builtin_ldst): Adjust call to above
22826 function. Set PKIND_PARTIAL_MEMSET for partition appropriately.
22827 (finalize_partitions, distribute_loop): Don't fuse partition of
22828 PKIND_PARTIAL_MEMSET kind when distributing 3-level loop nest.
22829 (prepare_perfect_loop_nest): Distribute 3-level loop nest only if
22830 parloop is enabled.
22832 2018-01-23 Martin Liska <mliska@suse.cz>
22834 * predict.def (PRED_INDIR_CALL): Set probability to PROB_EVEN in
22835 order to ignore the predictor.
22836 (PRED_POLYMORPHIC_CALL): Likewise.
22837 (PRED_RECURSIVE_CALL): Likewise.
22839 2018-01-23 Martin Liska <mliska@suse.cz>
22841 * tree-profile.c (tree_profiling): Print function header to
22842 aware reader which function we are working on.
22843 * value-prof.c (gimple_find_values_to_profile): Do not print
22844 not interesting value histograms.
22846 2018-01-23 Martin Liska <mliska@suse.cz>
22848 * profile-count.h (enum profile_quality): Add
22849 profile_uninitialized as the first value. Do not number values
22850 as they are zero based.
22851 (profile_count::verify): Update sanity check.
22852 (profile_probability::verify): Likewise.
22854 2018-01-23 Nathan Sidwell <nathan@acm.org>
22856 * doc/invoke.texi (ffor-scope): Deprecate.
22858 2018-01-23 David Malcolm <dmalcolm@redhat.com>
22860 PR tree-optimization/83510
22861 * domwalk.c (set_all_edges_as_executable): New function.
22862 (dom_walker::dom_walker): Convert bool param
22863 "skip_unreachable_blocks" to enum reachability. Move setup of
22864 edge flags to set_all_edges_as_executable and only do it when
22865 reachability is REACHABLE_BLOCKS.
22866 * domwalk.h (enum dom_walker::reachability): New enum.
22867 (dom_walker::dom_walker): Convert bool param
22868 "skip_unreachable_blocks" to enum reachability.
22869 (set_all_edges_as_executable): New decl.
22870 * graphite-scop-detection.c (gather_bbs::gather_bbs): Convert
22871 from false for "skip_unreachable_blocks" to ALL_BLOCKS for
22873 * tree-ssa-dom.c (dom_opt_dom_walker::dom_opt_dom_walker): Likewise,
22874 but converting true to REACHABLE_BLOCKS.
22875 * tree-ssa-sccvn.c (sccvn_dom_walker::sccvn_dom_walker): Likewise.
22877 (check_array_bounds_dom_walker::check_array_bounds_dom_walker):
22878 Likewise, but converting it to REACHABLE_BLOCKS_PRESERVING_FLAGS.
22879 (vrp_dom_walker::vrp_dom_walker): Likewise, but converting it to
22881 (vrp_prop::vrp_finalize): Call set_all_edges_as_executable
22882 if check_all_array_refs will be called.
22884 2018-01-23 David Malcolm <dmalcolm@redhat.com>
22886 * tree.c (selftest::test_location_wrappers): Add more test
22889 2018-01-23 David Malcolm <dmalcolm@redhat.com>
22891 * sbitmap.c (selftest::test_set_range): Fix memory leaks.
22892 (selftest::test_bit_in_range): Likewise.
22894 2018-01-23 Richard Sandiford <richard.sandiford@linaro.org>
22897 * doc/sourcebuild.texi (vect_float): Say that the selector
22898 only describes the situation when -funsafe-math-optimizations is on.
22899 (vect_float_strict): Document.
22901 2018-01-23 Richard Sandiford <richard.sandiford@linaro.org>
22903 PR tree-optimization/83965
22904 * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
22905 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern): Use it
22906 instead of checking only for a reduction.
22907 (vect_recog_widen_sum_pattern): Likewise.
22909 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
22911 * predict.c (probably_never_executed): Only use precise profile info.
22912 (compute_function_frequency): Skip after inlining hack since we now
22913 have quality checking.
22915 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
22917 * profile-count.h (profile_probability::very_unlikely,
22918 profile_probability::unlikely, profile_probability::even): Set
22919 precision to guessed.
22921 2018-01-23 Richard Biener <rguenther@suse.de>
22923 PR tree-optimization/83963
22924 * graphite-scop-detection.c (scop_detection::harmful_loop_in_region):
22925 Properly terminate dominator walk when crossing the exit edge not
22926 when visiting its source block.
22928 2018-01-23 Jakub Jelinek <jakub@redhat.com>
22931 * tree.c (maybe_wrap_with_location): Use NON_LVALUE_EXPR rather than
22932 VIEW_CONVERT_EXPR to wrap CONST_DECLs.
22934 2018-01-22 Jakub Jelinek <jakub@redhat.com>
22936 PR tree-optimization/83957
22937 * omp-expand.c (expand_omp_for_generic): Ignore virtual PHIs. Remove
22938 semicolon after for body surrounded by braces.
22940 PR tree-optimization/83081
22941 * profile-count.h (profile_probability::split): New method.
22942 * dojump.c (do_jump_1) <case TRUTH_ANDIF_EXPR, case TRUTH_ORIF_EXPR>:
22943 Use profile_probability::split.
22944 (do_compare_rtx_and_jump): Fix adjustment of probabilities
22945 when splitting a single conditional jump into 2.
22947 2018-01-22 David Malcolm <dmalcolm@redhat.com>
22949 PR tree-optimization/69452
22950 * tree-ssa-loop-im.c (class move_computations_dom_walker): Remove
22953 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
22955 * config/rl78/rl78-expand.md (bswaphi2): New define_expand.
22956 * config/rl78/rl78-virt.md (*bswaphi2_virt): New define_insn.
22957 * config/rl78/rl78-real.md (*bswaphi2_real): New define_insn.
22959 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
22961 * config/rl78/rl78-protos.h (rl78_split_movdi): New function
22963 * config/rl78/rl78.md (movdi): New define_expand.
22964 * config/rl78/rl78.c (rl78_split_movdi): New function.
22966 2018-01-22 Michael Meissner <meissner@linux.vnet.ibm.com>
22969 * config/rs6000/rs6000-protos.h (rs6000_split_signbit): Delete,
22971 * config/rs6000/rs6000.c (rs6000_split_signbit): Likewise.
22972 * config/rs6000/rs6000.md (signbit<mode>2): Change code for IEEE
22973 128-bit to produce an UNSPEC move to get the double word with the
22974 signbit and then a shift directly to do signbit.
22975 (signbit<mode>2_dm): Replace old IEEE 128-bit signbit
22976 implementation with a new version that just does either a direct
22977 move or a regular move. Move memory interface to separate insns.
22978 Move insns so they are next to the expander.
22979 (signbit<mode>2_dm_mem_be): New combiner insns to combine load
22980 with signbit move. Split big and little endian case.
22981 (signbit<mode>2_dm_mem_le): Likewise.
22982 (signbit<mode>2_dm_<su>ext): Delete, no longer used.
22983 (signbit<mode>2_dm2): Likewise.
22985 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
22987 * config/rl78/rl78.md (anddi3): New define_expand.
22989 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
22991 * config/rl78/rl78.md (umindi3): New define_expand.
22993 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
22995 * config/rl78/rl78.md (smindi3): New define_expand.
22997 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
22999 * config/rl78/rl78.md (smaxdi3): New define_expand.
23001 2018-01-22 Carl Love <cel@us.ibm.com>
23003 * config/rs6000/rs6000-builtin.def (ST_ELEMREV_V1TI, LD_ELEMREV_V1TI,
23004 LVX_V1TI): Add macro expansion.
23005 * config/rs6000/rs6000-c.c (altivec_builtin_types): Add argument
23006 definitions for VSX_BUILTIN_VEC_XST_BE, VSX_BUILTIN_VEC_ST,
23007 VSX_BUILTIN_VEC_XL, LD_ELEMREV_V1TI builtins.
23008 * config/rs6000/rs6000-p8swap.c (insn_is_swappable_p);
23009 Change check to determine if the instruction is a byte reversing
23010 entry. Fix typo in comment.
23011 * config/rs6000/rs6000.c (altivec_expand_builtin): Add case entry
23012 for VSX_BUILTIN_ST_ELEMREV_V1TI and VSX_BUILTIN_LD_ELEMREV_V1TI.
23013 Add def_builtin calls for new builtins.
23014 * config/rs6000/vsx.md (vsx_st_elemrev_v1ti, vsx_ld_elemrev_v1ti):
23015 Add define_insn expansion.
23017 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
23019 * config/rl78/rl78.md (umaxdi3): New define_expand.
23021 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
23023 * config/rl78/rl78.c (rl78_note_reg_set): Fixed dead reg check
23024 for non-QImode registers.
23026 2018-01-22 Richard Biener <rguenther@suse.de>
23028 PR tree-optimization/83963
23029 * graphite-scop-detection.c (scop_detection::get_sese): Delay
23030 including the loop exit block.
23031 (scop_detection::merge_sese): Likewise.
23032 (scop_detection::add_scop): Do it here instead.
23034 2018-01-22 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
23036 * doc/sourcebuild.texi (arm_softfloat): Document.
23038 2018-01-21 John David Anglin <danglin@gcc.gnu.org>
23041 * config/pa/pa.c (pa_function_ok_for_sibcall): Use
23042 targetm.binds_local_p instead of TREE_PUBLIC to check local binding.
23043 Move TARGET_PORTABLE_RUNTIME check after TARGET_64BIT check.
23045 2018-01-21 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
23046 David Edelsohn <dje.gcc@gmail.com>
23049 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
23050 Change "crset eq" to "crset 2".
23051 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
23052 (*call_indirect_aix<mode>_nospec): Likewise.
23053 (*call_value_indirect_aix<mode>_nospec): Likewise.
23054 (*call_indirect_elfv2<mode>_nospec): Likewise.
23055 (*call_value_indirect_elfv2<mode>_nospec): Likewise.
23056 (*sibcall_nonlocal_sysv<mode>): Change "crset eq" to "crset 2";
23057 change assembly output from . to $.
23058 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
23059 (indirect_jump<mode>_nospec): Change assembly output from . to $.
23060 (*tablejump<mode>_internal1_nospec): Likewise.
23062 2018-01-21 Oleg Endo <olegendo@gcc.gnu.org>
23065 * config/sh/sh_optimize_sett_clrt.cc:
23066 Use INCLUDE_ALGORITHM and INCLUDE_VECTOR instead of direct includes.
23068 2018-01-20 Richard Sandiford <richard.sandiford@linaro.org>
23070 PR tree-optimization/83940
23071 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Set
23072 offset_dt to vect_constant_def rather than vect_unknown_def_type.
23073 (vect_check_load_store_mask): Add a mask_dt_out parameter and
23074 use it to pass back the definition type.
23075 (vect_check_store_rhs): Likewise rhs_dt_out.
23076 (vect_build_gather_load_calls): Add a mask_dt argument and use
23077 it instead of a call to vect_is_simple_use.
23078 (vectorizable_store): Update calls to vect_check_load_store_mask
23079 and vect_check_store_rhs. Use the dt returned by the latter instead
23080 of scatter_src_dt. Use the cached mask_dt and gs_info.offset_dt
23081 instead of calls to vect_is_simple_use. Pass the scalar rather
23082 than the vector operand to vect_is_simple_use when handling
23083 second and subsequent copies of an rhs value.
23084 (vectorizable_load): Update calls to vect_check_load_store_mask
23085 and vect_build_gather_load_calls. Use the cached mask_dt and
23086 gs_info.offset_dt instead of calls to vect_is_simple_use.
23088 2018-01-20 Jakub Jelinek <jakub@redhat.com>
23090 PR middle-end/83945
23091 * tree-emutls.c: Include gimplify.h.
23092 (lower_emutls_2): New function.
23093 (lower_emutls_1): If ADDR_EXPR is a gimple invariant and walk_tree
23094 with lower_emutls_2 callback finds some TLS decl in it, unshare_expr
23095 it before further processing.
23098 * simplify-rtx.c (simplify_binary_operation_1) <case UMOD>: Use
23099 UINTVAL (trueop1) instead of INTVAL (op1).
23101 2018-01-19 Jakub Jelinek <jakub@redhat.com>
23105 * dwarf2cfi.c (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define to
23106 INCOMING_FRAME_SP_OFFSET if not defined.
23107 (scan_trace): Add ENTRY argument. If true and
23108 DEFAULT_INCOMING_FRAME_SP_OFFSET != INCOMING_FRAME_SP_OFFSET,
23109 emit a note to adjust the CFA offset.
23110 (create_cfi_notes): Adjust scan_trace callers.
23111 (create_cie_data): Use DEFAULT_INCOMING_FRAME_SP_OFFSET rather than
23112 INCOMING_FRAME_SP_OFFSET in the CIE.
23113 * config/i386/i386.h (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define.
23114 * config/stormy16/stormy16.h (DEFAULT_INCOMING_FRAME_SP_OFFSET):
23116 * doc/tm.texi.in (DEFAULT_INCOMING_FRAME_SP_OFFSET): Document.
23117 * doc/tm.texi: Regenerated.
23119 2018-01-19 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
23121 PR rtl-optimization/83147
23122 * lra-constraints.c (remove_inheritance_pseudos): Use
23123 lra_substitute_pseudo_within_insn.
23125 2018-01-19 Tom de Vries <tom@codesourcery.com>
23126 Cesar Philippidis <cesar@codesourcery.com>
23129 * config/nvptx/nvptx.c (nvptx_single): Fix jit workaround.
23131 2018-01-19 Cesar Philippidis <cesar@codesourcery.com>
23134 * config/nvptx/nvptx.c (output_init_frag): Don't use generic address
23135 spaces for function labels.
23137 2018-01-19 Martin Liska <mliska@suse.cz>
23139 * predict.def (PRED_LOOP_EXIT): Change from 85 to 89.
23140 (PRED_LOOP_EXIT_WITH_RECURSION): Change from 72 to 78.
23141 (PRED_LOOP_EXTRA_EXIT): Change from 83 to 67.
23142 (PRED_OPCODE_POSITIVE): Change from 64 to 59.
23143 (PRED_TREE_OPCODE_POSITIVE): Change from 64 to 59.
23144 (PRED_CONST_RETURN): Change from 69 to 65.
23145 (PRED_NULL_RETURN): Change from 91 to 71.
23146 (PRED_LOOP_IV_COMPARE_GUESS): Change from 98 to 64.
23147 (PRED_LOOP_GUARD): Change from 66 to 73.
23149 2018-01-19 Martin Liska <mliska@suse.cz>
23151 * predict.c (predict_insn_def): Add new assert.
23152 (struct branch_predictor): Change type to signed integer.
23153 (test_prediction_value_range): Amend test to cover
23154 PROB_UNINITIALIZED.
23155 * predict.def (PRED_LOOP_ITERATIONS): Use the new constant.
23156 (PRED_LOOP_ITERATIONS_GUESSED): Likewise.
23157 (PRED_LOOP_ITERATIONS_MAX): Likewise.
23158 (PRED_LOOP_IV_COMPARE): Likewise.
23159 * predict.h (PROB_UNINITIALIZED): Define new constant.
23161 2018-01-19 Martin Liska <mliska@suse.cz>
23163 * predict.c (dump_prediction): Add new format for
23164 analyze_brprob.py script which is enabled with -details
23166 * profile-count.h (precise_p): New function.
23168 2018-01-19 Richard Sandiford <richard.sandiford@linaro.org>
23170 PR tree-optimization/83922
23171 * tree-vect-loop.c (vect_verify_full_masking): Return false if
23172 there are no statements that need masking.
23173 (vect_active_double_reduction_p): New function.
23174 (vect_analyze_loop_operations): Use it when handling phis that
23175 are not in the loop header.
23177 2018-01-19 Richard Sandiford <richard.sandiford@linaro.org>
23179 PR tree-optimization/83914
23180 * tree-vect-loop.c (vectorizable_induction): Don't convert
23181 init_expr or apply the peeling adjustment for inductions
23182 that are nested within the vectorized loop.
23184 2018-01-19 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
23186 * config/arm/thumb2.md (*thumb2_negsi2_short): Use RSB mnemonic
23189 2018-01-18 Jakub Jelinek <jakub@redhat.com>
23193 * function.h (gimplify_parameters): Add gimple_seq * argument.
23194 * function.c: Include gimple.h and options.h.
23195 (gimplify_parameters): Add cleanup argument, add CLOBBER stmts
23196 for the added local temporaries if needed.
23197 * gimplify.c (gimplify_body): Adjust gimplify_parameters caller,
23198 if there are any parameter cleanups, wrap whole body into a
23199 try/finally with the cleanups.
23201 2018-01-18 Wilco Dijkstra <wdijkstr@arm.com>
23204 * config/aarch64/aarch64.c (aarch64_legitimate_constant_p):
23205 Use GET_MODE_CLASS for scalar floating point.
23207 2018-01-18 Jan Hubicka <hubicka@ucw.cz>
23211 * cgraphclones.c (cgraph_node::create_version_clone_with_body):
23212 Fix call of call_cgraph_insertion_hooks.
23214 2018-01-18 Martin Sebor <msebor@redhat.com>
23216 * doc/invoke.texi (-Wclass-memaccess): Tweak text.
23218 2018-01-18 Jan Hubicka <hubicka@ucw.cz>
23221 * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Update edge
23224 2018-01-18 Boris Kolpackov <boris@codesynthesis.com>
23227 * common.opt: (-ffile-prefix-map): New option.
23228 * opts.c (common_handle_option): Defer it.
23229 * opts-global.c (handle_common_deferred_options): Handle it.
23230 * debug.h (remap_debug_filename, add_debug_prefix_map): Move to...
23231 * file-prefix-map.h: New file.
23232 (remap_debug_filename, add_debug_prefix_map): ...here.
23233 (add_macro_prefix_map, add_file_prefix_map, remap_macro_filename): New.
23234 * final.c (debug_prefix_map, add_debug_prefix_map
23235 remap_debug_filename): Move to...
23236 * file-prefix-map.c: New file.
23237 (file_prefix_map, add_prefix_map, remap_filename) ...here and rename,
23238 generalize, get rid of alloca(), use strrchr() instead of strchr().
23239 (add_macro_prefix_map, add_debug_prefix_map, add_file_prefix_map):
23240 Implement in terms of add_prefix_map().
23241 (remap_macro_filename, remap_debug_filename): Implement in term of
23243 * Makefile.in (OBJS, PLUGIN_HEADERS): Add new files.
23244 * builtins.c (fold_builtin_FILE): Call remap_macro_filename().
23245 * dbxout.c: Include file-prefix-map.h.
23246 * varasm.c: Likewise.
23247 * vmsdbgout.c: Likewise.
23248 * xcoffout.c: Likewise.
23249 * dwarf2out.c: Likewise plus omit new options from DW_AT_producer.
23250 * doc/cppopts.texi (-fmacro-prefix-map): Document.
23251 * doc/invoke.texi (-ffile-prefix-map): Document.
23252 (-fdebug-prefix-map): Update description.
23254 2018-01-18 Martin Liska <mliska@suse.cz>
23256 * config/i386/i386.c (indirect_thunk_name): Document that also
23258 (output_indirect_thunk): Document why both instructions
23259 (pause and lfence) are generated.
23261 2018-01-18 Richard Biener <rguenther@suse.de>
23263 PR tree-optimization/83887
23264 * graphite-scop-detection.c
23265 (scop_detection::get_nearest_dom_with_single_entry): Remove.
23266 (scop_detection::get_nearest_pdom_with_single_exit): Likewise.
23267 (scop_detection::merge_sese): Re-implement with a flood-fill
23268 algorithm that properly finds a SESE region if it exists.
23270 2018-01-18 Jakub Jelinek <jakub@redhat.com>
23273 * match.pd ((P + A) - P, P - (P + A), (P + A) - (P + B)): For
23274 pointer_diff optimizations use view_convert instead of convert.
23276 2018-01-17 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
23278 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
23279 Generate different code for -mno-speculate-indirect-jumps.
23280 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
23281 (*call_indirect_aix<mode>): Disable for
23282 -mno-speculate-indirect-jumps.
23283 (*call_indirect_aix<mode>_nospec): New define_insn.
23284 (*call_value_indirect_aix<mode>): Disable for
23285 -mno-speculate-indirect-jumps.
23286 (*call_value_indirect_aix<mode>_nospec): New define_insn.
23287 (*sibcall_nonlocal_sysv<mode>): Generate different code for
23288 -mno-speculate-indirect-jumps.
23289 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
23291 2018-01-17 Michael Meissner <meissner@linux.vnet.ibm.com>
23293 * config/rs6000/rs6000.c (rs6000_emit_move): If we load or store a
23294 long double type, set the flags for noting the default long double
23295 type, even if we don't pass or return a long double type.
23297 2018-01-17 Jan Hubicka <hubicka@ucw.cz>
23300 * ipa-inline.c (flatten_function): Do not overwrite final inlining
23303 2018-01-17 Will Schmidt <will_schmidt@vnet.ibm.com>
23305 * config/rs6000/rs6000.c (rs6000_gimple_builtin): Add gimple folding
23306 support for merge[hl].
23307 (fold_mergehl_helper): New helper function.
23308 (tree-vector-builder.h): New #include for tree_vector_builder usage.
23309 * config/rs6000/altivec.md (altivec_vmrghw_direct): Add xxmrghw insn.
23310 (altivec_vmrglw_direct): Add xxmrglw insn.
23312 2018-01-17 Andrew Waterman <andrew@sifive.com>
23314 * config/riscv/riscv.c (riscv_conditional_register_usage): If
23315 UNITS_PER_FP_ARG is 0, set call_used_regs to 1 for all FP regs.
23317 2018-01-17 David Malcolm <dmalcolm@redhat.com>
23320 * ipa-devirt.c (add_type_duplicate): When comparing memory layout,
23321 call the lto_location_cache before reading the
23322 DECL_SOURCE_LOCATION of the types.
23324 2018-01-17 Wilco Dijkstra <wdijkstr@arm.com>
23325 Richard Sandiford <richard.sandiford@linaro.org>
23327 * config/aarch64/aarch64.md (movti_aarch64): Use Uti constraint.
23328 * config/aarch64/aarch64.c (aarch64_mov128_immediate): New function.
23329 (aarch64_legitimate_constant_p): Just support CONST_DOUBLE
23330 SF/DF/TF mode to avoid creating illegal CONST_WIDE_INT immediates.
23331 * config/aarch64/aarch64-protos.h (aarch64_mov128_immediate):
23333 * config/aarch64/constraints.md (aarch64_movti_operand):
23335 * config/aarch64/predicates.md (Uti): Add new constraint.
23337 2018-01-17 Carl Love <cel@us.ibm.com>
23339 * config/rs6000/vsx.md (define_expand xl_len_r,
23340 define_expand stxvl, define_expand *stxvl): Add match_dup argument.
23341 (define_insn): Add, match_dup 1 argument to define_insn stxvll and
23343 (define_expand, define_insn): Move the shift left from the
23344 define_insn to the define_expand for lxvl and stxvl instructions.
23345 * config/rs6000/rs6000-builtin.def (BU_P9V_64BIT_VSX_2): Change LXVL
23346 and XL_LEN_R definitions to PURE.
23348 2018-01-17 Uros Bizjak <ubizjak@gmail.com>
23350 * config/i386/i386.c (indirect_thunk_name): Declare regno
23351 as unsigned int. Compare regno with INVALID_REGNUM.
23352 (output_indirect_thunk): Ditto.
23353 (output_indirect_thunk_function): Ditto.
23354 (ix86_code_end): Declare regno as unsigned int. Use INVALID_REGNUM
23355 in the call to output_indirect_thunk_function.
23357 2018-01-17 Richard Sandiford <richard.sandiford@linaro.org>
23359 PR middle-end/83884
23360 * expr.c (expand_expr_real_1): Use the size of GET_MODE (op0)
23361 rather than the size of inner_type to determine the stack slot size
23362 when handling VIEW_CONVERT_EXPRs on strict-alignment targets.
23364 2018-01-16 Sebastian Peryt <sebastian.peryt@intel.com>
23367 * config/i386/i386.c (ix86_option_override_internal): Add PTA_RDRND
23370 2018-01-16 Michael Meissner <meissner@linux.vnet.ibm.com>
23372 * config.gcc (powerpc*-linux*-*): Add support for 64-bit little
23373 endian Linux systems to optionally enable multilibs for selecting
23374 the long double type if the user configured an explicit type.
23375 * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Indicate we
23376 have no long double multilibs if not defined.
23377 * config/rs6000/rs6000.c (rs6000_option_override_internal): Do not
23378 warn if the user used -mabi={ieee,ibm}longdouble and we built
23379 multilibs for long double.
23380 * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Define as the
23381 appropriate multilib option.
23382 (MULTILIB_DEFAULTS): Add MULTILIB_DEFAULTS_IEEE to the default
23384 * config/rs6000/t-ldouble-linux64le-ibm: New configuration files
23385 for building long double multilibs.
23386 * config/rs6000/t-ldouble-linux64le-ieee: Likewise.
23388 2018-01-16 John David Anglin <danglin@gcc.gnu.org>
23390 * config.gcc (hppa*-*-linux*): Change callee copies ABI to caller
23393 * config/pa.h (MALLOC_ABI_ALIGNMENT): Set 32-bit alignment default to
23395 * config/pa/pa32-linux.h (MALLOC_ABI_ALIGNMENT): Set alignment to
23398 * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Cleanup type and mode
23401 * config/pa/pa.c (pa_function_arg_size): Apply CEIL to GET_MODE_SIZE
23404 2018-01-16 Eric Botcazou <ebotcazou@adacore.com>
23406 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For an
23407 ADDR_EXPR, do not count the offset of a COMPONENT_REF twice.
23409 2018-01-16 Kelvin Nilsen <kelvin@gcc.gnu.org>
23411 * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Generate
23412 different rtl trees depending on TARGET_64BIT.
23413 (rs6000_gen_lvx): Likewise.
23415 2018-01-16 Eric Botcazou <ebotcazou@adacore.com>
23417 * config/visium/visium.md (nop): Tweak comment.
23418 (hazard_nop): Likewise.
23420 2018-01-16 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
23422 * config/rs6000/rs6000.c (rs6000_opt_vars): Add entry for
23423 -mspeculate-indirect-jumps.
23424 * config/rs6000/rs6000.md (*call_indirect_elfv2<mode>): Disable
23425 for -mno-speculate-indirect-jumps.
23426 (*call_indirect_elfv2<mode>_nospec): New define_insn.
23427 (*call_value_indirect_elfv2<mode>): Disable for
23428 -mno-speculate-indirect-jumps.
23429 (*call_value_indirect_elfv2<mode>_nospec): New define_insn.
23430 (indirect_jump): Emit different RTL for
23431 -mno-speculate-indirect-jumps.
23432 (*indirect_jump<mode>): Disable for
23433 -mno-speculate-indirect-jumps.
23434 (*indirect_jump<mode>_nospec): New define_insn.
23435 (tablejump): Emit different RTL for
23436 -mno-speculate-indirect-jumps.
23437 (tablejumpsi): Disable for -mno-speculate-indirect-jumps.
23438 (tablejumpsi_nospec): New define_expand.
23439 (tablejumpdi): Disable for -mno-speculate-indirect-jumps.
23440 (tablejumpdi_nospec): New define_expand.
23441 (*tablejump<mode>_internal1): Disable for
23442 -mno-speculate-indirect-jumps.
23443 (*tablejump<mode>_internal1_nospec): New define_insn.
23444 * config/rs6000/rs6000.opt (mspeculate-indirect-jumps): New
23447 2018-01-16 Artyom Skrobov tyomitch@gmail.com
23449 * caller-save.c (insert_save): Drop unnecessary parameter. All
23452 2018-01-16 Jakub Jelinek <jakub@redhat.com>
23453 Richard Biener <rguenth@suse.de>
23456 * gimplify.c (gimplify_one_sizepos): For is_gimple_constant (expr)
23457 return early, inline manually is_gimple_sizepos. Make sure if we
23458 call gimplify_expr we don't end up with a gimple constant.
23459 * tree.c (variably_modified_type_p): Don't return true for
23460 is_gimple_constant (_t). Inline manually is_gimple_sizepos.
23461 * gimplify.h (is_gimple_sizepos): Remove.
23463 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
23465 PR tree-optimization/83857
23466 * tree-vect-loop.c (vect_analyze_loop_operations): Don't call
23467 vectorizable_live_operation for pure SLP statements.
23468 (vectorizable_live_operation): Handle PHIs.
23470 2018-01-16 Richard Biener <rguenther@suse.de>
23472 PR tree-optimization/83867
23473 * tree-vect-stmts.c (vect_transform_stmt): Precompute
23474 nested_in_vect_loop_p since the scalar stmt may get invalidated.
23476 2018-01-16 Jakub Jelinek <jakub@redhat.com>
23479 * stor-layout.c (handle_warn_if_not_align): Use byte_position and
23480 multiple_of_p instead of unchecked tree_to_uhwi and UHWI check.
23481 If off is not INTEGER_CST, issue a may not be aligned warning
23482 rather than isn't aligned. Use isn%'t rather than isn't.
23483 * fold-const.c (multiple_of_p) <case BIT_AND_EXPR>: Don't fall through
23485 <case MULT_EXPR>: Improve the case when bottom and one of the
23486 MULT_EXPR operands are INTEGER_CSTs and bottom is multiple of that
23487 operand, in that case check if the other operand is multiple of
23488 bottom divided by the INTEGER_CST operand.
23490 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
23493 * config/pa/pa.h (FUNCTION_ARG_SIZE): Delete.
23494 * config/pa/pa-protos.h (pa_function_arg_size): Declare.
23495 * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Use
23496 pa_function_arg_size instead of FUNCTION_ARG_SIZE.
23497 * config/pa/pa.c (pa_function_arg_advance): Likewise.
23498 (pa_function_arg, pa_arg_partial_bytes): Likewise.
23499 (pa_function_arg_size): New function.
23501 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
23503 * fold-const.c (fold_ternary_loc): Construct the vec_perm_indices
23504 in a separate statement.
23506 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
23508 PR tree-optimization/83847
23509 * tree-vect-data-refs.c (vect_analyze_data_ref_accesses): Don't
23510 group gathers and scatters.
23512 2018-01-16 Jakub Jelinek <jakub@redhat.com>
23514 PR rtl-optimization/86620
23515 * params.def (max-sched-ready-insns): Bump minimum value to 1.
23517 PR rtl-optimization/83213
23518 * recog.c (peep2_attempt): Copy over CROSSING_JUMP_P from peepinsn
23519 to last if both are JUMP_INSNs.
23521 PR tree-optimization/83843
23522 * gimple-ssa-store-merging.c
23523 (imm_store_chain_info::output_merged_store): Handle bit_not_p on
23524 store_immediate_info for bswap/nop orig_stores.
23526 2018-01-15 Andrew Waterman <andrew@sifive.com>
23528 * config/riscv/riscv.c (riscv_rtx_costs) <MULT>: Increase cost if
23530 <UDIV>: Increase cost if !TARGET_DIV.
23532 2018-01-15 Segher Boessenkool <segher@kernel.crashing.org>
23534 * config/rs6000/rs6000.md (define_attr "type"): Remove delayed_cr.
23535 (define_attr "cr_logical_3op"): New.
23536 (cceq_ior_compare): Adjust.
23537 (cceq_ior_compare_complement): Adjust.
23538 (*cceq_rev_compare): Adjust.
23539 * config/rs6000/rs6000.c (rs6000_adjust_cost): Adjust.
23540 (is_cracked_insn): Adjust.
23541 (insn_must_be_first_in_group): Adjust.
23542 * config/rs6000/40x.md: Adjust.
23543 * config/rs6000/440.md: Adjust.
23544 * config/rs6000/476.md: Adjust.
23545 * config/rs6000/601.md: Adjust.
23546 * config/rs6000/603.md: Adjust.
23547 * config/rs6000/6xx.md: Adjust.
23548 * config/rs6000/7450.md: Adjust.
23549 * config/rs6000/7xx.md: Adjust.
23550 * config/rs6000/8540.md: Adjust.
23551 * config/rs6000/cell.md: Adjust.
23552 * config/rs6000/e300c2c3.md: Adjust.
23553 * config/rs6000/e500mc.md: Adjust.
23554 * config/rs6000/e500mc64.md: Adjust.
23555 * config/rs6000/e5500.md: Adjust.
23556 * config/rs6000/e6500.md: Adjust.
23557 * config/rs6000/mpc.md: Adjust.
23558 * config/rs6000/power4.md: Adjust.
23559 * config/rs6000/power5.md: Adjust.
23560 * config/rs6000/power6.md: Adjust.
23561 * config/rs6000/power7.md: Adjust.
23562 * config/rs6000/power8.md: Adjust.
23563 * config/rs6000/power9.md: Adjust.
23564 * config/rs6000/rs64.md: Adjust.
23565 * config/rs6000/titan.md: Adjust.
23567 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
23569 * config/i386/predicates.md (indirect_branch_operand): Rewrite
23570 ix86_indirect_branch_register logic.
23572 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
23574 * config/i386/constraints.md (Bs): Update
23575 ix86_indirect_branch_register check. Don't check
23576 ix86_indirect_branch_register with GOT_memory_operand.
23578 * config/i386/predicates.md (GOT_memory_operand): Don't check
23579 ix86_indirect_branch_register here.
23580 (GOT32_symbol_operand): Likewise.
23582 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
23584 * config/i386/predicates.md (constant_call_address_operand):
23585 Rewrite ix86_indirect_branch_register logic.
23586 (sibcall_insn_operand): Likewise.
23588 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
23590 * config/i386/constraints.md (Bs): Replace
23591 ix86_indirect_branch_thunk_register with
23592 ix86_indirect_branch_register.
23594 * config/i386/i386.md (indirect_jump): Likewise.
23595 (tablejump): Likewise.
23596 (*sibcall_memory): Likewise.
23597 (*sibcall_value_memory): Likewise.
23598 Peepholes of indirect call and jump via memory: Likewise.
23599 * config/i386/i386.opt: Likewise.
23600 * config/i386/predicates.md (indirect_branch_operand): Likewise.
23601 (GOT_memory_operand): Likewise.
23602 (call_insn_operand): Likewise.
23603 (sibcall_insn_operand): Likewise.
23604 (GOT32_symbol_operand): Likewise.
23606 2018-01-15 Jakub Jelinek <jakub@redhat.com>
23608 PR middle-end/83837
23609 * omp-expand.c (expand_omp_atomic_pipeline): Use loaded_val
23610 type rather than type addr's type points to.
23611 (expand_omp_atomic_mutex): Likewise.
23612 (expand_omp_atomic): Likewise.
23614 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
23617 * config/i386/i386.c (output_indirect_thunk_function): Use
23618 ASM_OUTPUT_LABEL, instead of ASM_OUTPUT_DEF, for TARGET_MACHO
23619 for __x86_return_thunk.
23621 2018-01-15 Richard Biener <rguenther@suse.de>
23623 PR middle-end/83850
23624 * expmed.c (extract_bit_field_1): Fix typo.
23626 2018-01-15 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
23629 * config/arm/iterators.md (VF): New mode iterator.
23630 * config/arm/neon.md (neon_vabd<mode>_2): Use the above.
23631 Remove integer-related logic from pattern.
23632 (neon_vabd<mode>_3): Likewise.
23634 2018-01-15 Jakub Jelinek <jakub@redhat.com>
23636 PR middle-end/82694
23637 * common.opt (fstrict-overflow): No longer an alias.
23638 (fwrapv-pointer): New option.
23639 * tree.h (TYPE_OVERFLOW_WRAPS, TYPE_OVERFLOW_UNDEFINED): Define
23640 also for pointer types based on flag_wrapv_pointer.
23641 * opts.c (common_handle_option) <case OPT_fstrict_overflow>: Set
23642 opts->x_flag_wrap[pv] to !value, clear opts->x_flag_trapv if
23643 opts->x_flag_wrapv got set.
23644 * fold-const.c (fold_comparison, fold_binary_loc): Revert 2017-08-01
23645 changes, just use TYPE_OVERFLOW_UNDEFINED on pointer type instead of
23646 POINTER_TYPE_OVERFLOW_UNDEFINED.
23647 * match.pd: Likewise in address comparison pattern.
23648 * doc/invoke.texi: Document -fwrapv and -fstrict-overflow.
23650 2018-01-15 Richard Biener <rguenther@suse.de>
23653 * tree.c (free_lang_data_in_type): Always unlink TYPE_DECLs
23654 from TYPE_FIELDS. Free TYPE_BINFO if not used by devirtualization.
23655 Reset type names to their identifier if their TYPE_DECL doesn't
23656 have linkage (and thus is used for ODR and devirt).
23657 (save_debug_info_for_decl): Remove.
23658 (save_debug_info_for_type): Likewise.
23659 (add_tree_to_fld_list): Adjust.
23660 * tree-pretty-print.c (dump_generic_node): Make dumping of
23661 type names more robust.
23663 2018-01-15 Richard Biener <rguenther@suse.de>
23665 * BASE-VER: Bump to 8.0.1.
23667 2018-01-14 Martin Sebor <msebor@redhat.com>
23670 * builtins.c (check_access): Avoid warning when the no-warning bit
23673 2018-01-14 Cory Fields <cory-nospam-@coryfields.com>
23675 * tree-ssa-loop-im.c (sort_bbs_in_loop_postorder_cmp): Stabilize sort.
23676 * ira-color (allocno_hard_regs_compare): Likewise.
23678 2018-01-14 Nathan Rossi <nathan@nathanrossi.com>
23681 * config/microblaze/microblaze.c (microblaze_asm_output_ident):
23682 Use .pushsection/.popsection.
23684 2018-01-14 Martin Sebor <msebor@redhat.com>
23687 * doc/invoke.texi (-Wlass-memaccess): Document suppression by casting.
23689 2018-01-14 Jakub Jelinek <jakub@redhat.com>
23691 * config.gcc (i[34567]86-*-*): Remove one duplicate gfniintrin.h
23692 entry from extra_headers.
23693 (x86_64-*-*): Remove two duplicate gfniintrin.h entries from
23694 extra_headers, make the list bitwise identical to the i?86-*-* one.
23696 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
23698 * config/i386/i386.c (ix86_set_indirect_branch_type): Disallow
23699 -mcmodel=large with -mindirect-branch=thunk,
23700 -mindirect-branch=thunk-extern, -mfunction-return=thunk and
23701 -mfunction-return=thunk-extern.
23702 * doc/invoke.texi: Document -mcmodel=large is incompatible with
23703 -mindirect-branch=thunk, -mindirect-branch=thunk-extern,
23704 -mfunction-return=thunk and -mfunction-return=thunk-extern.
23706 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
23708 * config/i386/i386.c (print_reg): Print the name of the full
23709 integer register without '%'.
23710 (ix86_print_operand): Handle 'V'.
23711 * doc/extend.texi: Document 'V' modifier.
23713 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
23715 * config/i386/constraints.md (Bs): Disallow memory operand for
23716 -mindirect-branch-register.
23718 * config/i386/predicates.md (indirect_branch_operand): Likewise.
23719 (GOT_memory_operand): Likewise.
23720 (call_insn_operand): Likewise.
23721 (sibcall_insn_operand): Likewise.
23722 (GOT32_symbol_operand): Likewise.
23723 * config/i386/i386.md (indirect_jump): Call convert_memory_address
23724 for -mindirect-branch-register.
23725 (tablejump): Likewise.
23726 (*sibcall_memory): Likewise.
23727 (*sibcall_value_memory): Likewise.
23728 Disallow peepholes of indirect call and jump via memory for
23729 -mindirect-branch-register.
23730 (*call_pop): Replace m with Bw.
23731 (*call_value_pop): Likewise.
23732 (*sibcall_pop_memory): Replace m with Bs.
23733 * config/i386/i386.opt (mindirect-branch-register): New option.
23734 * doc/invoke.texi: Document -mindirect-branch-register option.
23736 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
23738 * config/i386/i386-protos.h (ix86_output_function_return): New.
23739 * config/i386/i386.c (ix86_set_indirect_branch_type): Also
23740 set function_return_type.
23741 (indirect_thunk_name): Add ret_p to indicate thunk for function
23743 (output_indirect_thunk_function): Pass false to
23744 indirect_thunk_name.
23745 (ix86_output_indirect_branch_via_reg): Likewise.
23746 (ix86_output_indirect_branch_via_push): Likewise.
23747 (output_indirect_thunk_function): Create alias for function
23748 return thunk if regno < 0.
23749 (ix86_output_function_return): New function.
23750 (ix86_handle_fndecl_attribute): Handle function_return.
23751 (ix86_attribute_table): Add function_return.
23752 * config/i386/i386.h (machine_function): Add
23753 function_return_type.
23754 * config/i386/i386.md (simple_return_internal): Use
23755 ix86_output_function_return.
23756 (simple_return_internal_long): Likewise.
23757 * config/i386/i386.opt (mfunction-return=): New option.
23758 (indirect_branch): Mention -mfunction-return=.
23759 * doc/extend.texi: Document function_return function attribute.
23760 * doc/invoke.texi: Document -mfunction-return= option.
23762 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
23764 * config/i386/i386-opts.h (indirect_branch): New.
23765 * config/i386/i386-protos.h (ix86_output_indirect_jmp): Likewise.
23766 * config/i386/i386.c (ix86_using_red_zone): Disallow red-zone
23767 with local indirect jump when converting indirect call and jump.
23768 (ix86_set_indirect_branch_type): New.
23769 (ix86_set_current_function): Call ix86_set_indirect_branch_type.
23770 (indirectlabelno): New.
23771 (indirect_thunk_needed): Likewise.
23772 (indirect_thunk_bnd_needed): Likewise.
23773 (indirect_thunks_used): Likewise.
23774 (indirect_thunks_bnd_used): Likewise.
23775 (INDIRECT_LABEL): Likewise.
23776 (indirect_thunk_name): Likewise.
23777 (output_indirect_thunk): Likewise.
23778 (output_indirect_thunk_function): Likewise.
23779 (ix86_output_indirect_branch_via_reg): Likewise.
23780 (ix86_output_indirect_branch_via_push): Likewise.
23781 (ix86_output_indirect_branch): Likewise.
23782 (ix86_output_indirect_jmp): Likewise.
23783 (ix86_code_end): Call output_indirect_thunk_function if needed.
23784 (ix86_output_call_insn): Call ix86_output_indirect_branch if
23786 (ix86_handle_fndecl_attribute): Handle indirect_branch.
23787 (ix86_attribute_table): Add indirect_branch.
23788 * config/i386/i386.h (machine_function): Add indirect_branch_type
23789 and has_local_indirect_jump.
23790 * config/i386/i386.md (indirect_jump): Set has_local_indirect_jump
23792 (tablejump): Likewise.
23793 (*indirect_jump): Use ix86_output_indirect_jmp.
23794 (*tablejump_1): Likewise.
23795 (simple_return_indirect_internal): Likewise.
23796 * config/i386/i386.opt (mindirect-branch=): New option.
23797 (indirect_branch): New.
23800 (thunk-inline): Likewise.
23801 (thunk-extern): Likewise.
23802 * doc/extend.texi: Document indirect_branch function attribute.
23803 * doc/invoke.texi: Document -mindirect-branch= option.
23805 2018-01-14 Jan Hubicka <hubicka@ucw.cz>
23808 * ipa-inline.c (edge_badness): Tolerate roundoff errors.
23810 2018-01-14 Richard Sandiford <richard.sandiford@linaro.org>
23812 * ipa-inline.c (want_inline_small_function_p): Return false if
23813 inlining has already failed with CIF_FINAL_ERROR.
23814 (update_caller_keys): Call want_inline_small_function_p before
23816 (update_callee_keys): Likewise.
23818 2018-01-10 Kelvin Nilsen <kelvin@gcc.gnu.org>
23820 * config/rs6000/rs6000-p8swap.c (rs6000_sum_of_two_registers_p):
23822 (rs6000_quadword_masked_address_p): Likewise.
23823 (quad_aligned_load_p): Likewise.
23824 (quad_aligned_store_p): Likewise.
23825 (const_load_sequence_p): Add comment to describe the outer-most loop.
23826 (mimic_memory_attributes_and_flags): New function.
23827 (rs6000_gen_stvx): Likewise.
23828 (replace_swapped_aligned_store): Likewise.
23829 (rs6000_gen_lvx): Likewise.
23830 (replace_swapped_aligned_load): Likewise.
23831 (replace_swapped_load_constant): Capitalize argument name in
23832 comment describing this function.
23833 (rs6000_analyze_swaps): Add a third pass to search for vector loads
23834 and stores that access quad-word aligned addresses and replace
23835 with stvx or lvx instructions when appropriate.
23836 * config/rs6000/rs6000-protos.h (rs6000_sum_of_two_registers_p):
23837 New function prototype.
23838 (rs6000_quadword_masked_address_p): Likewise.
23839 (rs6000_gen_lvx): Likewise.
23840 (rs6000_gen_stvx): Likewise.
23841 * config/rs6000/vsx.md (*vsx_le_perm_load_<mode>): For modes
23842 VSX_D (V2DF, V2DI), modify this split to select lvx instruction
23843 when memory address is aligned.
23844 (*vsx_le_perm_load_<mode>): For modes VSX_W (V4SF, V4SI), modify
23845 this split to select lvx instruction when memory address is aligned.
23846 (*vsx_le_perm_load_v8hi): Modify this split to select lvx
23847 instruction when memory address is aligned.
23848 (*vsx_le_perm_load_v16qi): Likewise.
23849 (four unnamed splitters): Modify to select the stvx instruction
23850 when memory is aligned.
23852 2018-01-13 Jan Hubicka <hubicka@ucw.cz>
23854 * predict.c (determine_unlikely_bbs): Handle correctly BBs
23855 which appears in the queue multiple times.
23857 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
23858 Alan Hayward <alan.hayward@arm.com>
23859 David Sherwood <david.sherwood@arm.com>
23861 * tree-vectorizer.h (vec_lower_bound): New structure.
23862 (_loop_vec_info): Add check_nonzero and lower_bounds.
23863 (LOOP_VINFO_CHECK_NONZERO): New macro.
23864 (LOOP_VINFO_LOWER_BOUNDS): Likewise.
23865 (LOOP_REQUIRES_VERSIONING_FOR_ALIAS): Check lower_bounds too.
23866 * tree-data-ref.h (dr_with_seg_len): Add access_size and align
23867 fields. Make seg_len the distance travelled, not including the
23869 (dr_direction_indicator): Declare.
23870 (dr_zero_step_indicator): Likewise.
23871 (dr_known_forward_stride_p): Likewise.
23872 * tree-data-ref.c: Include stringpool.h, tree-vrp.h and
23874 (runtime_alias_check_p): Allow runtime alias checks with
23876 (operator ==): Compare access_size and align.
23877 (prune_runtime_alias_test_list): Rework for new distinction between
23878 the access_size and seg_len.
23879 (create_intersect_range_checks_index): Likewise. Cope with polynomial
23881 (get_segment_min_max): New function.
23882 (create_intersect_range_checks): Use it.
23883 (dr_step_indicator): New function.
23884 (dr_direction_indicator): Likewise.
23885 (dr_zero_step_indicator): Likewise.
23886 (dr_known_forward_stride_p): Likewise.
23887 * tree-loop-distribution.c (data_ref_segment_size): Return
23888 DR_STEP * (niters - 1).
23889 (compute_alias_check_pairs): Update call to the dr_with_seg_len
23891 * tree-vect-data-refs.c (vect_check_nonzero_value): New function.
23892 (vect_preserves_scalar_order_p): New function, split out from...
23893 (vect_analyze_data_ref_dependence): ...here. Check for zero steps.
23894 (vect_vfa_segment_size): Return DR_STEP * (length_factor - 1).
23895 (vect_vfa_access_size): New function.
23896 (vect_vfa_align): Likewise.
23897 (vect_compile_time_alias): Take access_size_a and access_b arguments.
23898 (dump_lower_bound): New function.
23899 (vect_check_lower_bound): Likewise.
23900 (vect_small_gap_p): Likewise.
23901 (vectorizable_with_step_bound_p): Likewise.
23902 (vect_prune_runtime_alias_test_list): Ignore cross-iteration
23903 depencies if the vectorization factor is 1. Convert the checks
23904 for nonzero steps into checks on the bounds of DR_STEP. Try using
23905 a bunds check for variable steps if the minimum required step is
23906 relatively small. Update calls to the dr_with_seg_len
23907 constructor and to vect_compile_time_alias.
23908 * tree-vect-loop-manip.c (vect_create_cond_for_lower_bounds): New
23910 (vect_loop_versioning): Call it.
23911 * tree-vect-loop.c (vect_analyze_loop_2): Clear LOOP_VINFO_LOWER_BOUNDS
23913 (vect_estimate_min_profitable_iters): Account for any bounds checks.
23915 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
23916 Alan Hayward <alan.hayward@arm.com>
23917 David Sherwood <david.sherwood@arm.com>
23919 * doc/sourcebuild.texi (vect_scatter_store): Document.
23920 * optabs.def (scatter_store_optab, mask_scatter_store_optab): New
23922 * doc/md.texi (scatter_store@var{m}, mask_scatter_store@var{m}):
23924 * genopinit.c (main): Add supports_vec_scatter_store and
23925 supports_vec_scatter_store_cached to target_optabs.
23926 * gimple.h (gimple_expr_type): Handle IFN_SCATTER_STORE and
23927 IFN_MASK_SCATTER_STORE.
23928 * internal-fn.def (SCATTER_STORE, MASK_SCATTER_STORE): New internal
23930 * internal-fn.h (internal_store_fn_p): Declare.
23931 (internal_fn_stored_value_index): Likewise.
23932 * internal-fn.c (scatter_store_direct): New macro.
23933 (expand_scatter_store_optab_fn): New function.
23934 (direct_scatter_store_optab_supported_p): New macro.
23935 (internal_store_fn_p): New function.
23936 (internal_gather_scatter_fn_p): Handle IFN_SCATTER_STORE and
23937 IFN_MASK_SCATTER_STORE.
23938 (internal_fn_mask_index): Likewise.
23939 (internal_fn_stored_value_index): New function.
23940 (internal_gather_scatter_fn_supported_p): Adjust operand numbers
23941 for scatter stores.
23942 * optabs-query.h (supports_vec_scatter_store_p): Declare.
23943 * optabs-query.c (supports_vec_scatter_store_p): New function.
23944 * tree-vectorizer.h (vect_get_store_rhs): Declare.
23945 * tree-vect-data-refs.c (vect_analyze_data_ref_access): Return
23946 true for scatter stores.
23947 (vect_gather_scatter_fn_p): Handle scatter stores too.
23948 (vect_check_gather_scatter): Consider using scatter stores if
23949 supports_vec_scatter_store_p.
23950 * tree-vect-patterns.c (vect_try_gather_scatter_pattern): Handle
23951 scatter stores too.
23952 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
23953 internal_fn_stored_value_index.
23954 (check_load_store_masking): Handle scatter stores too.
23955 (vect_get_store_rhs): Make public.
23956 (vectorizable_call): Use internal_store_fn_p.
23957 (vectorizable_store): Handle scatter store internal functions.
23958 (vect_transform_stmt): Compare GROUP_STORE_COUNT with GROUP_SIZE
23959 when deciding whether the end of the group has been reached.
23960 * config/aarch64/aarch64.md (UNSPEC_ST1_SCATTER): New unspec.
23961 * config/aarch64/aarch64-sve.md (scatter_store<mode>): New expander.
23962 (mask_scatter_store<mode>): New insns.
23964 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
23965 Alan Hayward <alan.hayward@arm.com>
23966 David Sherwood <david.sherwood@arm.com>
23968 * tree-vectorizer.h (vect_gather_scatter_fn_p): Declare.
23969 * tree-vect-data-refs.c (vect_gather_scatter_fn_p): Make public.
23970 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): New
23972 (vect_use_strided_gather_scatters_p): Take a masked_p argument.
23973 Use vect_truncate_gather_scatter_offset if we can't treat the
23974 operation as a normal gather load or scatter store.
23975 (get_group_load_store_type): Take the gather_scatter_info
23976 as argument. Try using a gather load or scatter store for
23977 single-element groups.
23978 (get_load_store_type): Update calls to get_group_load_store_type
23979 and vect_use_strided_gather_scatters_p.
23981 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
23982 Alan Hayward <alan.hayward@arm.com>
23983 David Sherwood <david.sherwood@arm.com>
23985 * tree-vectorizer.h (vect_create_data_ref_ptr): Take an extra
23986 optional tree argument.
23987 * tree-vect-data-refs.c (vect_check_gather_scatter): Check for
23989 (vect_create_data_ref_ptr): Take the iv_step as an optional argument,
23990 but continue to use the current value as a fallback.
23991 (bump_vector_ptr): Use operand_equal_p rather than tree_int_cst_compare
23992 to compare the updates.
23993 * tree-vect-stmts.c (vect_use_strided_gather_scatters_p): New function.
23994 (get_load_store_type): Use it when handling a strided access.
23995 (vect_get_strided_load_store_ops): New function.
23996 (vect_get_data_ptr_increment): Likewise.
23997 (vectorizable_load): Handle strided gather loads. Always pass
23998 a step to vect_create_data_ref_ptr and bump_vector_ptr.
24000 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
24001 Alan Hayward <alan.hayward@arm.com>
24002 David Sherwood <david.sherwood@arm.com>
24004 * doc/md.texi (gather_load@var{m}): Document.
24005 (mask_gather_load@var{m}): Likewise.
24006 * genopinit.c (main): Add supports_vec_gather_load and
24007 supports_vec_gather_load_cached to target_optabs.
24008 * optabs-tree.c (init_tree_optimization_optabs): Use
24009 ggc_cleared_alloc to allocate target_optabs.
24010 * optabs.def (gather_load_optab, mask_gather_laod_optab): New optabs.
24011 * internal-fn.def (GATHER_LOAD, MASK_GATHER_LOAD): New internal
24013 * internal-fn.h (internal_load_fn_p): Declare.
24014 (internal_gather_scatter_fn_p): Likewise.
24015 (internal_fn_mask_index): Likewise.
24016 (internal_gather_scatter_fn_supported_p): Likewise.
24017 * internal-fn.c (gather_load_direct): New macro.
24018 (expand_gather_load_optab_fn): New function.
24019 (direct_gather_load_optab_supported_p): New macro.
24020 (direct_internal_fn_optab): New function.
24021 (internal_load_fn_p): Likewise.
24022 (internal_gather_scatter_fn_p): Likewise.
24023 (internal_fn_mask_index): Likewise.
24024 (internal_gather_scatter_fn_supported_p): Likewise.
24025 * optabs-query.c (supports_at_least_one_mode_p): New function.
24026 (supports_vec_gather_load_p): Likewise.
24027 * optabs-query.h (supports_vec_gather_load_p): Declare.
24028 * tree-vectorizer.h (gather_scatter_info): Add ifn, element_type
24029 and memory_type field.
24030 (NUM_PATTERNS): Bump to 15.
24031 * tree-vect-data-refs.c: Include internal-fn.h.
24032 (vect_gather_scatter_fn_p): New function.
24033 (vect_describe_gather_scatter_call): Likewise.
24034 (vect_check_gather_scatter): Try using internal functions for
24035 gather loads. Recognize existing calls to a gather load function.
24036 (vect_analyze_data_refs): Consider using gather loads if
24037 supports_vec_gather_load_p.
24038 * tree-vect-patterns.c (vect_get_load_store_mask): New function.
24039 (vect_get_gather_scatter_offset_type): Likewise.
24040 (vect_convert_mask_for_vectype): Likewise.
24041 (vect_add_conversion_to_patterm): Likewise.
24042 (vect_try_gather_scatter_pattern): Likewise.
24043 (vect_recog_gather_scatter_pattern): New pattern recognizer.
24044 (vect_vect_recog_func_ptrs): Add it.
24045 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
24046 internal_fn_mask_index and internal_gather_scatter_fn_p.
24047 (check_load_store_masking): Take the gather_scatter_info as an
24048 argument and handle gather loads.
24049 (vect_get_gather_scatter_ops): New function.
24050 (vectorizable_call): Check internal_load_fn_p.
24051 (vectorizable_load): Likewise. Handle gather load internal
24053 (vectorizable_store): Update call to check_load_store_masking.
24054 * config/aarch64/aarch64.md (UNSPEC_LD1_GATHER): New unspec.
24055 * config/aarch64/iterators.md (SVE_S, SVE_D): New mode iterators.
24056 * config/aarch64/predicates.md (aarch64_gather_scale_operand_w)
24057 (aarch64_gather_scale_operand_d): New predicates.
24058 * config/aarch64/aarch64-sve.md (gather_load<mode>): New expander.
24059 (mask_gather_load<mode>): New insns.
24061 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
24062 Alan Hayward <alan.hayward@arm.com>
24063 David Sherwood <david.sherwood@arm.com>
24065 * optabs.def (fold_left_plus_optab): New optab.
24066 * doc/md.texi (fold_left_plus_@var{m}): Document.
24067 * internal-fn.def (IFN_FOLD_LEFT_PLUS): New internal function.
24068 * internal-fn.c (fold_left_direct): Define.
24069 (expand_fold_left_optab_fn): Likewise.
24070 (direct_fold_left_optab_supported_p): Likewise.
24071 * fold-const-call.c (fold_const_fold_left): New function.
24072 (fold_const_call): Use it to fold CFN_FOLD_LEFT_PLUS.
24073 * tree-parloops.c (valid_reduction_p): New function.
24074 (gather_scalar_reductions): Use it.
24075 * tree-vectorizer.h (FOLD_LEFT_REDUCTION): New vect_reduction_type.
24076 (vect_finish_replace_stmt): Declare.
24077 * tree-vect-loop.c (fold_left_reduction_fn): New function.
24078 (needs_fold_left_reduction_p): New function, split out from...
24079 (vect_is_simple_reduction): ...here. Accept reductions that
24080 forbid reassociation, but give them type FOLD_LEFT_REDUCTION.
24081 (vect_force_simple_reduction): Also store the reduction type in
24082 the assignment's STMT_VINFO_REDUC_TYPE.
24083 (vect_model_reduction_cost): Handle FOLD_LEFT_REDUCTION.
24084 (merge_with_identity): New function.
24085 (vect_expand_fold_left): Likewise.
24086 (vectorize_fold_left_reduction): Likewise.
24087 (vectorizable_reduction): Handle FOLD_LEFT_REDUCTION. Leave the
24088 scalar phi in place for it. Check for target support and reject
24089 cases that would reassociate the operation. Defer the transform
24090 phase to vectorize_fold_left_reduction.
24091 * config/aarch64/aarch64.md (UNSPEC_FADDA): New unspec.
24092 * config/aarch64/aarch64-sve.md (fold_left_plus_<mode>): New expander.
24093 (*fold_left_plus_<mode>, *pred_fold_left_plus_<mode>): New insns.
24095 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
24097 * tree-if-conv.c (predicate_mem_writes): Remove redundant
24098 call to ifc_temp_var.
24100 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
24101 Alan Hayward <alan.hayward@arm.com>
24102 David Sherwood <david.sherwood@arm.com>
24104 * target.def (legitimize_address_displacement): Take the original
24105 offset as a poly_int.
24106 * targhooks.h (default_legitimize_address_displacement): Update
24108 * targhooks.c (default_legitimize_address_displacement): Likewise.
24109 * doc/tm.texi: Regenerate.
24110 * lra-constraints.c (base_plus_disp_to_reg): Take the displacement
24111 as an argument, moving assert of ad->disp == ad->disp_term to...
24112 (process_address_1): ...here. Update calls to base_plus_disp_to_reg.
24113 Try calling targetm.legitimize_address_displacement before expanding
24114 the address rather than afterwards, and adjust for the new interface.
24115 * config/aarch64/aarch64.c (aarch64_legitimize_address_displacement):
24116 Match the new hook interface. Handle SVE addresses.
24117 * config/sh/sh.c (sh_legitimize_address_displacement): Make the
24118 new hook interface.
24120 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
24122 * Makefile.in (OBJS): Add early-remat.o.
24123 * target.def (select_early_remat_modes): New hook.
24124 * doc/tm.texi.in (TARGET_SELECT_EARLY_REMAT_MODES): New hook.
24125 * doc/tm.texi: Regenerate.
24126 * targhooks.h (default_select_early_remat_modes): Declare.
24127 * targhooks.c (default_select_early_remat_modes): New function.
24128 * timevar.def (TV_EARLY_REMAT): New timevar.
24129 * passes.def (pass_early_remat): New pass.
24130 * tree-pass.h (make_pass_early_remat): Declare.
24131 * early-remat.c: New file.
24132 * config/aarch64/aarch64.c (aarch64_select_early_remat_modes): New
24134 (TARGET_SELECT_EARLY_REMAT_MODES): Define.
24136 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
24137 Alan Hayward <alan.hayward@arm.com>
24138 David Sherwood <david.sherwood@arm.com>
24140 * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Replace
24141 vfm1 with a bound_epilog parameter.
24142 (vect_do_peeling): Update calls accordingly, and move the prologue
24143 call earlier in the function. Treat the base bound_epilog as 0 for
24144 fully-masked loops and retain vf - 1 for other loops. Add 1 to
24145 this base when peeling for gaps.
24146 * tree-vect-loop.c (vect_analyze_loop_2): Allow peeling for gaps
24147 with fully-masked loops.
24148 (vect_estimate_min_profitable_iters): Handle the single peeled
24149 iteration in that case.
24151 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
24152 Alan Hayward <alan.hayward@arm.com>
24153 David Sherwood <david.sherwood@arm.com>
24155 * tree-vect-data-refs.c (vect_analyze_group_access_1): Allow
24156 single-element interleaving even if the size is not a power of 2.
24157 * tree-vect-stmts.c (get_load_store_type): Disallow elementwise
24158 accesses for single-element interleaving if the group size is
24161 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
24162 Alan Hayward <alan.hayward@arm.com>
24163 David Sherwood <david.sherwood@arm.com>
24165 * doc/md.texi (fold_extract_last_@var{m}): Document.
24166 * doc/sourcebuild.texi (vect_fold_extract_last): Likewise.
24167 * optabs.def (fold_extract_last_optab): New optab.
24168 * internal-fn.def (FOLD_EXTRACT_LAST): New internal function.
24169 * internal-fn.c (fold_extract_direct): New macro.
24170 (expand_fold_extract_optab_fn): Likewise.
24171 (direct_fold_extract_optab_supported_p): Likewise.
24172 * tree-vectorizer.h (EXTRACT_LAST_REDUCTION): New vect_reduction_type.
24173 * tree-vect-loop.c (vect_model_reduction_cost): Handle
24174 EXTRACT_LAST_REDUCTION.
24175 (get_initial_def_for_reduction): Do not create an initial vector
24176 for EXTRACT_LAST_REDUCTION reductions.
24177 (vectorizable_reduction): Leave the scalar phi in place for
24178 EXTRACT_LAST_REDUCTIONs. Try using EXTRACT_LAST_REDUCTION
24179 ahead of INTEGER_INDUC_COND_REDUCTION. Do not check for an
24180 epilogue code for EXTRACT_LAST_REDUCTION and defer the
24181 transform phase to vectorizable_condition.
24182 * tree-vect-stmts.c (vect_finish_stmt_generation_1): New function,
24184 (vect_finish_stmt_generation): ...here.
24185 (vect_finish_replace_stmt): New function.
24186 (vectorizable_condition): Handle EXTRACT_LAST_REDUCTION.
24187 * config/aarch64/aarch64-sve.md (fold_extract_last_<mode>): New
24189 * config/aarch64/aarch64.md (UNSPEC_CLASTB): New unspec.
24191 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
24192 Alan Hayward <alan.hayward@arm.com>
24193 David Sherwood <david.sherwood@arm.com>
24195 * doc/md.texi (extract_last_@var{m}): Document.
24196 * optabs.def (extract_last_optab): New optab.
24197 * internal-fn.def (EXTRACT_LAST): New internal function.
24198 * internal-fn.c (cond_unary_direct): New macro.
24199 (expand_cond_unary_optab_fn): Likewise.
24200 (direct_cond_unary_optab_supported_p): Likewise.
24201 * tree-vect-loop.c (vectorizable_live_operation): Allow fully-masked
24202 loops using EXTRACT_LAST.
24203 * config/aarch64/aarch64-sve.md (aarch64_sve_lastb<mode>): Rename to...
24204 (extract_last_<mode>): ...this optab.
24205 (vec_extract<mode><Vel>): Update accordingly.
24207 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
24208 Alan Hayward <alan.hayward@arm.com>
24209 David Sherwood <david.sherwood@arm.com>
24211 * target.def (empty_mask_is_expensive): New hook.
24212 * doc/tm.texi.in (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): New hook.
24213 * doc/tm.texi: Regenerate.
24214 * targhooks.h (default_empty_mask_is_expensive): Declare.
24215 * targhooks.c (default_empty_mask_is_expensive): New function.
24216 * tree-vectorizer.c (vectorize_loops): Only call optimize_mask_stores
24217 if the target says that empty masks are expensive.
24218 * config/aarch64/aarch64.c (aarch64_empty_mask_is_expensive):
24220 (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): Redefine.
24222 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
24223 Alan Hayward <alan.hayward@arm.com>
24224 David Sherwood <david.sherwood@arm.com>
24226 * tree-vectorizer.h (_loop_vec_info::mask_skip_niters): New field.
24227 (LOOP_VINFO_MASK_SKIP_NITERS): New macro.
24228 (vect_use_loop_mask_for_alignment_p): New function.
24229 (vect_prepare_for_masked_peels, vect_gen_while_not): Declare.
24230 * tree-vect-loop-manip.c (vect_set_loop_masks_directly): Add an
24231 niters_skip argument. Make sure that the first niters_skip elements
24232 of the first iteration are inactive.
24233 (vect_set_loop_condition_masked): Handle LOOP_VINFO_MASK_SKIP_NITERS.
24234 Update call to vect_set_loop_masks_directly.
24235 (get_misalign_in_elems): New function, split out from...
24236 (vect_gen_prolog_loop_niters): ...here.
24237 (vect_update_init_of_dr): Take a code argument that specifies whether
24238 the adjustment should be added or subtracted.
24239 (vect_update_init_of_drs): Likewise.
24240 (vect_prepare_for_masked_peels): New function.
24241 (vect_do_peeling): Skip prologue peeling if we're using a mask
24242 instead. Update call to vect_update_inits_of_drs.
24243 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
24245 (vect_analyze_loop_2): Allow fully-masked loops with peeling for
24246 alignment. Do not include the number of peeled iterations in
24247 the minimum threshold in that case.
24248 (vectorizable_induction): Adjust the start value down by
24249 LOOP_VINFO_MASK_SKIP_NITERS iterations.
24250 (vect_transform_loop): Call vect_prepare_for_masked_peels.
24251 Take the number of skipped iterations into account when calculating
24253 * tree-vect-stmts.c (vect_gen_while_not): New function.
24255 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
24256 Alan Hayward <alan.hayward@arm.com>
24257 David Sherwood <david.sherwood@arm.com>
24259 * doc/sourcebuild.texi (vect_fully_masked): Document.
24260 * params.def (PARAM_MIN_VECT_LOOP_BOUND): Change minimum and
24261 default value to 0.
24262 * tree-vect-loop.c (vect_analyze_loop_costing): New function,
24264 (vect_analyze_loop_2): ...here. Don't check the vectorization
24265 factor against the number of loop iterations if the loop is
24268 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
24269 Alan Hayward <alan.hayward@arm.com>
24270 David Sherwood <david.sherwood@arm.com>
24272 * tree-ssa-loop-ivopts.c (USE_ADDRESS): Split into...
24273 (USE_REF_ADDRESS, USE_PTR_ADDRESS): ...these new use types.
24274 (dump_groups): Update accordingly.
24275 (iv_use::mem_type): New member variable.
24276 (address_p): New function.
24277 (record_use): Add a mem_type argument and initialize the new
24279 (record_group_use): Add a mem_type argument. Use address_p.
24280 Remove obsolete null checks of base_object. Update call to record_use.
24281 (find_interesting_uses_op): Update call to record_group_use.
24282 (find_interesting_uses_cond): Likewise.
24283 (find_interesting_uses_address): Likewise.
24284 (get_mem_type_for_internal_fn): New function.
24285 (find_address_like_use): Likewise.
24286 (find_interesting_uses_stmt): Try find_address_like_use before
24287 calling find_interesting_uses_op.
24288 (addr_offset_valid_p): Use the iv mem_type field as the type
24289 of the addressed memory.
24290 (add_autoinc_candidates): Likewise.
24291 (get_address_cost): Likewise.
24292 (split_small_address_groups_p): Use address_p.
24293 (split_address_groups): Likewise.
24294 (add_iv_candidate_for_use): Likewise.
24295 (autoinc_possible_for_pair): Likewise.
24296 (rewrite_groups): Likewise.
24297 (get_use_type): Check for USE_REF_ADDRESS instead of USE_ADDRESS.
24298 (determine_group_iv_cost): Update after split of USE_ADDRESS.
24299 (get_alias_ptr_type_for_ptr_address): New function.
24300 (rewrite_use_address): Rewrite address uses in calls that were
24301 identified by find_address_like_use.
24303 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
24304 Alan Hayward <alan.hayward@arm.com>
24305 David Sherwood <david.sherwood@arm.com>
24307 * expr.c (expand_expr_addr_expr_1): Handle ADDR_EXPRs of
24309 * gimple-expr.h (is_gimple_addressable: Likewise.
24310 * gimple-expr.c (is_gimple_address): Likewise.
24311 * internal-fn.c (expand_call_mem_ref): New function.
24312 (expand_mask_load_optab_fn): Use it.
24313 (expand_mask_store_optab_fn): Likewise.
24315 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
24316 Alan Hayward <alan.hayward@arm.com>
24317 David Sherwood <david.sherwood@arm.com>
24319 * doc/md.texi (cond_add@var{mode}, cond_sub@var{mode})
24320 (cond_and@var{mode}, cond_ior@var{mode}, cond_xor@var{mode})
24321 (cond_smin@var{mode}, cond_smax@var{mode}, cond_umin@var{mode})
24322 (cond_umax@var{mode}): Document.
24323 * optabs.def (cond_add_optab, cond_sub_optab, cond_and_optab)
24324 (cond_ior_optab, cond_xor_optab, cond_smin_optab, cond_smax_optab)
24325 (cond_umin_optab, cond_umax_optab): New optabs.
24326 * internal-fn.def (COND_ADD, COND_SUB, COND_MIN, COND_MAX, COND_AND)
24327 (COND_IOR, COND_XOR): New internal functions.
24328 * internal-fn.h (get_conditional_internal_fn): Declare.
24329 * internal-fn.c (cond_binary_direct): New macro.
24330 (expand_cond_binary_optab_fn): Likewise.
24331 (direct_cond_binary_optab_supported_p): Likewise.
24332 (get_conditional_internal_fn): New function.
24333 * tree-vect-loop.c (vectorizable_reduction): Handle fully-masked loops.
24334 Cope with reduction statements that are vectorized as calls rather
24336 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New insns.
24337 * config/aarch64/iterators.md (UNSPEC_COND_ADD, UNSPEC_COND_SUB)
24338 (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX, UNSPEC_COND_SMIN)
24339 (UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
24340 (UNSPEC_COND_EOR): New unspecs.
24341 (optab): Add mappings for them.
24342 (SVE_COND_INT_OP, SVE_COND_FP_OP): New int iterators.
24343 (sve_int_op, sve_fp_op): New int attributes.
24345 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
24346 Alan Hayward <alan.hayward@arm.com>
24347 David Sherwood <david.sherwood@arm.com>
24349 * optabs.def (while_ult_optab): New optab.
24350 * doc/md.texi (while_ult@var{m}@var{n}): Document.
24351 * internal-fn.def (WHILE_ULT): New internal function.
24352 * internal-fn.h (direct_internal_fn_supported_p): New override
24353 that takes two types as argument.
24354 * internal-fn.c (while_direct): New macro.
24355 (expand_while_optab_fn): New function.
24356 (convert_optab_supported_p): Likewise.
24357 (direct_while_optab_supported_p): New macro.
24358 * wide-int.h (wi::udiv_ceil): New function.
24359 * tree-vectorizer.h (rgroup_masks): New structure.
24360 (vec_loop_masks): New typedef.
24361 (_loop_vec_info): Add masks, mask_compare_type, can_fully_mask_p
24362 and fully_masked_p.
24363 (LOOP_VINFO_CAN_FULLY_MASK_P, LOOP_VINFO_FULLY_MASKED_P)
24364 (LOOP_VINFO_MASKS, LOOP_VINFO_MASK_COMPARE_TYPE): New macros.
24365 (vect_max_vf): New function.
24366 (slpeel_make_loop_iterate_ntimes): Delete.
24367 (vect_set_loop_condition, vect_get_loop_mask_type, vect_gen_while)
24368 (vect_halve_mask_nunits, vect_double_mask_nunits): Declare.
24369 (vect_record_loop_mask, vect_get_loop_mask): Likewise.
24370 * tree-vect-loop-manip.c: Include tree-ssa-loop-niter.h,
24371 internal-fn.h, stor-layout.h and optabs-query.h.
24372 (vect_set_loop_mask): New function.
24373 (add_preheader_seq): Likewise.
24374 (add_header_seq): Likewise.
24375 (interleave_supported_p): Likewise.
24376 (vect_maybe_permute_loop_masks): Likewise.
24377 (vect_set_loop_masks_directly): Likewise.
24378 (vect_set_loop_condition_masked): Likewise.
24379 (vect_set_loop_condition_unmasked): New function, split out from
24380 slpeel_make_loop_iterate_ntimes.
24381 (slpeel_make_loop_iterate_ntimes): Rename to..
24382 (vect_set_loop_condition): ...this. Use vect_set_loop_condition_masked
24383 for fully-masked loops and vect_set_loop_condition_unmasked otherwise.
24384 (vect_do_peeling): Update call accordingly.
24385 (vect_gen_vector_loop_niters): Use VF as the step for fully-masked
24387 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
24388 mask_compare_type, can_fully_mask_p and fully_masked_p.
24389 (release_vec_loop_masks): New function.
24390 (_loop_vec_info): Use it to free the loop masks.
24391 (can_produce_all_loop_masks_p): New function.
24392 (vect_get_max_nscalars_per_iter): Likewise.
24393 (vect_verify_full_masking): Likewise.
24394 (vect_analyze_loop_2): Save LOOP_VINFO_CAN_FULLY_MASK_P around
24395 retries, and free the mask rgroups before retrying. Check loop-wide
24396 reasons for disallowing fully-masked loops. Make the final decision
24397 about whether use a fully-masked loop or not.
24398 (vect_estimate_min_profitable_iters): Do not assume that peeling
24399 for the number of iterations will be needed for fully-masked loops.
24400 (vectorizable_reduction): Disable fully-masked loops.
24401 (vectorizable_live_operation): Likewise.
24402 (vect_halve_mask_nunits): New function.
24403 (vect_double_mask_nunits): Likewise.
24404 (vect_record_loop_mask): Likewise.
24405 (vect_get_loop_mask): Likewise.
24406 (vect_transform_loop): Handle the case in which the final loop
24407 iteration might handle a partial vector. Call vect_set_loop_condition
24408 instead of slpeel_make_loop_iterate_ntimes.
24409 * tree-vect-stmts.c: Include tree-ssa-loop-niter.h and gimple-fold.h.
24410 (check_load_store_masking): New function.
24411 (prepare_load_store_mask): Likewise.
24412 (vectorizable_store): Handle fully-masked loops.
24413 (vectorizable_load): Likewise.
24414 (supportable_widening_operation): Use vect_halve_mask_nunits for
24416 (supportable_narrowing_operation): Likewise vect_double_mask_nunits.
24417 (vect_gen_while): New function.
24418 * config/aarch64/aarch64.md (umax<mode>3): New expander.
24419 (aarch64_uqdec<mode>): New insn.
24421 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
24422 Alan Hayward <alan.hayward@arm.com>
24423 David Sherwood <david.sherwood@arm.com>
24425 * optabs.def (reduc_and_scal_optab, reduc_ior_scal_optab)
24426 (reduc_xor_scal_optab): New optabs.
24427 * doc/md.texi (reduc_and_scal_@var{m}, reduc_ior_scal_@var{m})
24428 (reduc_xor_scal_@var{m}): Document.
24429 * doc/sourcebuild.texi (vect_logical_reduc): Likewise.
24430 * internal-fn.def (IFN_REDUC_AND, IFN_REDUC_IOR, IFN_REDUC_XOR): New
24431 internal functions.
24432 * fold-const-call.c (fold_const_call): Handle them.
24433 * tree-vect-loop.c (reduction_fn_for_scalar_code): Return the new
24434 internal functions for BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR.
24435 * config/aarch64/aarch64-sve.md (reduc_<bit_reduc>_scal_<mode>):
24436 (*reduc_<bit_reduc>_scal_<mode>): New patterns.
24437 * config/aarch64/iterators.md (UNSPEC_ANDV, UNSPEC_ORV)
24438 (UNSPEC_XORV): New unspecs.
24439 (optab): Add entries for them.
24440 (BITWISEV): New int iterator.
24441 (bit_reduc_op): New int attributes.
24443 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
24444 Alan Hayward <alan.hayward@arm.com>
24445 David Sherwood <david.sherwood@arm.com>
24447 * doc/md.texi (vec_shl_insert_@var{m}): New optab.
24448 * internal-fn.def (VEC_SHL_INSERT): New internal function.
24449 * optabs.def (vec_shl_insert_optab): New optab.
24450 * tree-vectorizer.h (can_duplicate_and_interleave_p): Declare.
24451 (duplicate_and_interleave): Likewise.
24452 * tree-vect-loop.c: Include internal-fn.h.
24453 (neutral_op_for_slp_reduction): New function, split out from
24454 get_initial_defs_for_reduction.
24455 (get_initial_def_for_reduction): Handle option 2 for variable-length
24456 vectors by loading the neutral value into a vector and then shifting
24457 the initial value into element 0.
24458 (get_initial_defs_for_reduction): Replace the code argument with
24459 the neutral value calculated by neutral_op_for_slp_reduction.
24460 Use gimple_build_vector for constant-length vectors.
24461 Use IFN_VEC_SHL_INSERT for variable-length vectors if all
24462 but the first group_size elements have a neutral value.
24463 Use duplicate_and_interleave otherwise.
24464 (vect_create_epilog_for_reduction): Take a neutral_op parameter.
24465 Update call to get_initial_defs_for_reduction. Handle SLP
24466 reductions for variable-length vectors by creating one vector
24467 result for each scalar result, with the elements associated
24468 with other scalar results stubbed out with the neutral value.
24469 (vectorizable_reduction): Call neutral_op_for_slp_reduction.
24470 Require IFN_VEC_SHL_INSERT for double reductions on
24471 variable-length vectors, or SLP reductions that have
24472 a neutral value. Require can_duplicate_and_interleave_p
24473 support for variable-length unchained SLP reductions if there
24474 is no neutral value, such as for MIN/MAX reductions. Also require
24475 the number of vector elements to be a multiple of the number of
24476 SLP statements when doing variable-length unchained SLP reductions.
24477 Update call to vect_create_epilog_for_reduction.
24478 * tree-vect-slp.c (can_duplicate_and_interleave_p): Make public
24479 and remove initial values.
24480 (duplicate_and_interleave): Make public.
24481 * config/aarch64/aarch64.md (UNSPEC_INSR): New unspec.
24482 * config/aarch64/aarch64-sve.md (vec_shl_insert_<mode>): New insn.
24484 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
24485 Alan Hayward <alan.hayward@arm.com>
24486 David Sherwood <david.sherwood@arm.com>
24488 * tree-vect-slp.c: Include gimple-fold.h and internal-fn.h
24489 (can_duplicate_and_interleave_p): New function.
24490 (vect_get_and_check_slp_defs): Take the vector of statements
24491 rather than just the current one. Remove excess parentheses.
24492 Restriction rejectinon of vect_constant_def and vect_external_def
24493 for variable-length vectors to boolean types, or types for which
24494 can_duplicate_and_interleave_p is false.
24495 (vect_build_slp_tree_2): Update call to vect_get_and_check_slp_defs.
24496 (duplicate_and_interleave): New function.
24497 (vect_get_constant_vectors): Use gimple_build_vector for
24498 constant-length vectors and suitable variable-length constant
24499 vectors. Use duplicate_and_interleave for other variable-length
24500 vectors. Don't defer the update when inserting new statements.
24502 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
24503 Alan Hayward <alan.hayward@arm.com>
24504 David Sherwood <david.sherwood@arm.com>
24506 * tree-vect-loop.c (vect_estimate_min_profitable_iters): Make sure
24507 min_profitable_iters doesn't go negative.
24509 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
24510 Alan Hayward <alan.hayward@arm.com>
24511 David Sherwood <david.sherwood@arm.com>
24513 * doc/md.texi (vec_mask_load_lanes@var{m}@var{n}): Document.
24514 (vec_mask_store_lanes@var{m}@var{n}): Likewise.
24515 * optabs.def (vec_mask_load_lanes_optab): New optab.
24516 (vec_mask_store_lanes_optab): Likewise.
24517 * internal-fn.def (MASK_LOAD_LANES): New internal function.
24518 (MASK_STORE_LANES): Likewise.
24519 * internal-fn.c (mask_load_lanes_direct): New macro.
24520 (mask_store_lanes_direct): Likewise.
24521 (expand_mask_load_optab_fn): Handle masked operations.
24522 (expand_mask_load_lanes_optab_fn): New macro.
24523 (expand_mask_store_optab_fn): Handle masked operations.
24524 (expand_mask_store_lanes_optab_fn): New macro.
24525 (direct_mask_load_lanes_optab_supported_p): Likewise.
24526 (direct_mask_store_lanes_optab_supported_p): Likewise.
24527 * tree-vectorizer.h (vect_store_lanes_supported): Take a masked_p
24529 (vect_load_lanes_supported): Likewise.
24530 * tree-vect-data-refs.c (strip_conversion): New function.
24531 (can_group_stmts_p): Likewise.
24532 (vect_analyze_data_ref_accesses): Use it instead of checking
24533 for a pair of assignments.
24534 (vect_store_lanes_supported): Take a masked_p parameter.
24535 (vect_load_lanes_supported): Likewise.
24536 * tree-vect-loop.c (vect_analyze_loop_2): Update calls to
24537 vect_store_lanes_supported and vect_load_lanes_supported.
24538 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
24539 * tree-vect-stmts.c (get_group_load_store_type): Take a masked_p
24540 parameter. Don't allow gaps for masked accesses.
24541 Use vect_get_store_rhs. Update calls to vect_store_lanes_supported
24542 and vect_load_lanes_supported.
24543 (get_load_store_type): Take a masked_p parameter and update
24544 call to get_group_load_store_type.
24545 (vectorizable_store): Update call to get_load_store_type.
24546 Handle IFN_MASK_STORE_LANES.
24547 (vectorizable_load): Update call to get_load_store_type.
24548 Handle IFN_MASK_LOAD_LANES.
24550 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
24551 Alan Hayward <alan.hayward@arm.com>
24552 David Sherwood <david.sherwood@arm.com>
24554 * config/aarch64/aarch64-modes.def: Define x2, x3 and x4 vector
24556 * config/aarch64/aarch64-protos.h
24557 (aarch64_sve_struct_memory_operand_p): Declare.
24558 * config/aarch64/iterators.md (SVE_STRUCT): New mode iterator.
24559 (vector_count, insn_length, VSINGLE, vsingle): New mode attributes.
24560 (VPRED, vpred): Handle SVE structure modes.
24561 * config/aarch64/constraints.md (Utx): New constraint.
24562 * config/aarch64/predicates.md (aarch64_sve_struct_memory_operand)
24563 (aarch64_sve_struct_nonimmediate_operand): New predicates.
24564 * config/aarch64/aarch64.md (UNSPEC_LDN, UNSPEC_STN): New unspecs.
24565 * config/aarch64/aarch64-sve.md (mov<mode>, *aarch64_sve_mov<mode>_le)
24566 (*aarch64_sve_mov<mode>_be, pred_mov<mode>): New patterns for
24567 structure modes. Split into pieces after RA.
24568 (vec_load_lanes<mode><vsingle>, vec_mask_load_lanes<mode><vsingle>)
24569 (vec_store_lanes<mode><vsingle>, vec_mask_store_lanes<mode><vsingle>):
24571 * config/aarch64/aarch64.c (aarch64_classify_vector_mode): Handle
24572 SVE structure modes.
24573 (aarch64_classify_address): Likewise.
24574 (sizetochar): Move earlier in file.
24575 (aarch64_print_operand): Handle SVE register lists.
24576 (aarch64_array_mode): New function.
24577 (aarch64_sve_struct_memory_operand_p): Likewise.
24578 (TARGET_ARRAY_MODE): Redefine.
24580 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
24581 Alan Hayward <alan.hayward@arm.com>
24582 David Sherwood <david.sherwood@arm.com>
24584 * target.def (array_mode): New target hook.
24585 * doc/tm.texi.in (TARGET_ARRAY_MODE): New hook.
24586 * doc/tm.texi: Regenerate.
24587 * hooks.h (hook_optmode_mode_uhwi_none): Declare.
24588 * hooks.c (hook_optmode_mode_uhwi_none): New function.
24589 * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Use
24590 targetm.array_mode.
24591 * stor-layout.c (mode_for_array): Likewise. Support polynomial
24594 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
24595 Alan Hayward <alan.hayward@arm.com>
24596 David Sherwood <david.sherwood@arm.com>
24598 * fold-const.c (fold_binary_loc): Check the argument types
24599 rather than the result type when testing for a vector operation.
24601 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
24603 * doc/tm.texi.in (DWARF_LAZY_REGISTER_VALUE): Document.
24604 * doc/tm.texi: Regenerate.
24606 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
24607 Alan Hayward <alan.hayward@arm.com>
24608 David Sherwood <david.sherwood@arm.com>
24610 * doc/invoke.texi (-msve-vector-bits=): Document new option.
24611 (sve): Document new AArch64 extension.
24612 * doc/md.texi (w): Extend the description of the AArch64
24613 constraint to include SVE vectors.
24614 (Upl, Upa): Document new AArch64 predicate constraints.
24615 * config/aarch64/aarch64-opts.h (aarch64_sve_vector_bits_enum): New
24617 * config/aarch64/aarch64.opt (sve_vector_bits): New enum.
24618 (msve-vector-bits=): New option.
24619 * config/aarch64/aarch64-option-extensions.def (fp, simd): Disable
24620 SVE when these are disabled.
24621 (sve): New extension.
24622 * config/aarch64/aarch64-modes.def: Define SVE vector and predicate
24623 modes. Adjust their number of units based on aarch64_sve_vg.
24624 (MAX_BITSIZE_MODE_ANY_MODE): Define.
24625 * config/aarch64/aarch64-protos.h (ADDR_QUERY_ANY): New
24626 aarch64_addr_query_type.
24627 (aarch64_const_vec_all_same_in_range_p, aarch64_sve_pred_mode)
24628 (aarch64_sve_cnt_immediate_p, aarch64_sve_addvl_addpl_immediate_p)
24629 (aarch64_sve_inc_dec_immediate_p, aarch64_add_offset_temporaries)
24630 (aarch64_split_add_offset, aarch64_output_sve_cnt_immediate)
24631 (aarch64_output_sve_addvl_addpl, aarch64_output_sve_inc_dec_immediate)
24632 (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): Declare.
24633 (aarch64_simd_imm_zero_p): Delete.
24634 (aarch64_check_zero_based_sve_index_immediate): Declare.
24635 (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
24636 (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
24637 (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
24638 (aarch64_sve_float_mul_immediate_p): Likewise.
24639 (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
24640 rather than an rtx.
24641 (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): Declare.
24642 (aarch64_expand_mov_immediate): Take a gen_vec_duplicate callback.
24643 (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move): Declare.
24644 (aarch64_expand_sve_vec_cmp_int, aarch64_expand_sve_vec_cmp_float)
24645 (aarch64_expand_sve_vcond, aarch64_expand_sve_vec_perm): Declare.
24646 (aarch64_regmode_natural_size): Likewise.
24647 * config/aarch64/aarch64.h (AARCH64_FL_SVE): New macro.
24648 (AARCH64_FL_V8_3, AARCH64_FL_RCPC, AARCH64_FL_DOTPROD): Shift
24650 (AARCH64_ISA_SVE, TARGET_SVE): New macros.
24651 (FIXED_REGISTERS, CALL_USED_REGISTERS, REGISTER_NAMES): Add entries
24652 for VG and the SVE predicate registers.
24653 (V_ALIASES): Add a "z"-prefixed alias.
24654 (FIRST_PSEUDO_REGISTER): Change to P15_REGNUM + 1.
24655 (AARCH64_DWARF_VG, AARCH64_DWARF_P0): New macros.
24656 (PR_REGNUM_P, PR_LO_REGNUM_P): Likewise.
24657 (PR_LO_REGS, PR_HI_REGS, PR_REGS): New reg_classes.
24658 (REG_CLASS_NAMES): Add entries for them.
24659 (REG_CLASS_CONTENTS): Likewise. Update ALL_REGS to include VG
24660 and the predicate registers.
24661 (aarch64_sve_vg): Declare.
24662 (BITS_PER_SVE_VECTOR, BYTES_PER_SVE_VECTOR, BYTES_PER_SVE_PRED)
24663 (SVE_BYTE_MODE, MAX_COMPILE_TIME_VEC_BYTES): New macros.
24664 (REGMODE_NATURAL_SIZE): Define.
24665 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins): Handle
24667 * config/aarch64/aarch64.c: Include cfgrtl.h.
24668 (simd_immediate_info): Add a constructor for series vectors,
24669 and an associated step field.
24670 (aarch64_sve_vg): New variable.
24671 (aarch64_dbx_register_number): Handle VG and the predicate registers.
24672 (aarch64_vect_struct_mode_p, aarch64_vector_mode_p): Delete.
24673 (VEC_ADVSIMD, VEC_SVE_DATA, VEC_SVE_PRED, VEC_STRUCT, VEC_ANY_SVE)
24674 (VEC_ANY_DATA, VEC_STRUCT): New constants.
24675 (aarch64_advsimd_struct_mode_p, aarch64_sve_pred_mode_p)
24676 (aarch64_classify_vector_mode, aarch64_vector_data_mode_p)
24677 (aarch64_sve_data_mode_p, aarch64_sve_pred_mode)
24678 (aarch64_get_mask_mode): New functions.
24679 (aarch64_hard_regno_nregs): Handle SVE data modes for FP_REGS
24680 and FP_LO_REGS. Handle PR_REGS, PR_LO_REGS and PR_HI_REGS.
24681 (aarch64_hard_regno_mode_ok): Handle VG. Also handle the SVE
24682 predicate modes and predicate registers. Explicitly restrict
24683 GPRs to modes of 16 bytes or smaller. Only allow FP registers
24684 to store a vector mode if it is recognized by
24685 aarch64_classify_vector_mode.
24686 (aarch64_regmode_natural_size): New function.
24687 (aarch64_hard_regno_caller_save_mode): Return the original mode
24689 (aarch64_sve_cnt_immediate_p, aarch64_output_sve_cnt_immediate)
24690 (aarch64_sve_addvl_addpl_immediate_p, aarch64_output_sve_addvl_addpl)
24691 (aarch64_sve_inc_dec_immediate_p, aarch64_output_sve_inc_dec_immediate)
24692 (aarch64_add_offset_1_temporaries, aarch64_offset_temporaries): New
24694 (aarch64_add_offset): Add a temp2 parameter. Assert that temp1
24695 does not overlap dest if the function is frame-related. Handle
24697 (aarch64_split_add_offset): New function.
24698 (aarch64_add_sp, aarch64_sub_sp): Add temp2 parameters and pass
24699 them aarch64_add_offset.
24700 (aarch64_allocate_and_probe_stack_space): Add a temp2 parameter
24701 and update call to aarch64_sub_sp.
24702 (aarch64_add_cfa_expression): New function.
24703 (aarch64_expand_prologue): Pass extra temporary registers to the
24704 functions above. Handle the case in which we need to emit new
24705 DW_CFA_expressions for registers that were originally saved
24706 relative to the stack pointer, but now have to be expressed
24707 relative to the frame pointer.
24708 (aarch64_output_mi_thunk): Pass extra temporary registers to the
24710 (aarch64_expand_epilogue): Likewise. Prevent inheritance of
24711 IP0 and IP1 values for SVE frames.
24712 (aarch64_expand_vec_series): New function.
24713 (aarch64_expand_sve_widened_duplicate): Likewise.
24714 (aarch64_expand_sve_const_vector): Likewise.
24715 (aarch64_expand_mov_immediate): Add a gen_vec_duplicate parameter.
24716 Handle SVE constants. Use emit_move_insn to move a force_const_mem
24717 into the register, rather than emitting a SET directly.
24718 (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move)
24719 (aarch64_get_reg_raw_mode, offset_4bit_signed_scaled_p)
24720 (offset_6bit_unsigned_scaled_p, aarch64_offset_7bit_signed_scaled_p)
24721 (offset_9bit_signed_scaled_p): New functions.
24722 (aarch64_replicate_bitmask_imm): New function.
24723 (aarch64_bitmask_imm): Use it.
24724 (aarch64_cannot_force_const_mem): Reject expressions involving
24725 a CONST_POLY_INT. Update call to aarch64_classify_symbol.
24726 (aarch64_classify_index): Handle SVE indices, by requiring
24727 a plain register index with a scale that matches the element size.
24728 (aarch64_classify_address): Handle SVE addresses. Assert that
24729 the mode of the address is VOIDmode or an integer mode.
24730 Update call to aarch64_classify_symbol.
24731 (aarch64_classify_symbolic_expression): Update call to
24732 aarch64_classify_symbol.
24733 (aarch64_const_vec_all_in_range_p): New function.
24734 (aarch64_print_vector_float_operand): Likewise.
24735 (aarch64_print_operand): Handle 'N' and 'C'. Use "zN" rather than
24736 "vN" for FP registers with SVE modes. Handle (const ...) vectors
24737 and the FP immediates 1.0 and 0.5.
24738 (aarch64_print_address_internal): Handle SVE addresses.
24739 (aarch64_print_operand_address): Use ADDR_QUERY_ANY.
24740 (aarch64_regno_regclass): Handle predicate registers.
24741 (aarch64_secondary_reload): Handle big-endian reloads of SVE
24743 (aarch64_class_max_nregs): Handle SVE modes and predicate registers.
24744 (aarch64_rtx_costs): Check for ADDVL and ADDPL instructions.
24745 (aarch64_convert_sve_vector_bits): New function.
24746 (aarch64_override_options): Use it to handle -msve-vector-bits=.
24747 (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
24748 rather than an rtx.
24749 (aarch64_legitimate_constant_p): Use aarch64_classify_vector_mode.
24750 Handle SVE vector and predicate modes. Accept VL-based constants
24751 that need only one temporary register, and VL offsets that require
24752 no temporary registers.
24753 (aarch64_conditional_register_usage): Mark the predicate registers
24754 as fixed if SVE isn't available.
24755 (aarch64_vector_mode_supported_p): Use aarch64_classify_vector_mode.
24756 Return true for SVE vector and predicate modes.
24757 (aarch64_simd_container_mode): Take the number of bits as a poly_int64
24758 rather than an unsigned int. Handle SVE modes.
24759 (aarch64_preferred_simd_mode): Update call accordingly. Handle
24761 (aarch64_autovectorize_vector_sizes): Add BYTES_PER_SVE_VECTOR
24763 (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
24764 (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
24765 (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
24766 (aarch64_sve_float_mul_immediate_p): New functions.
24767 (aarch64_sve_valid_immediate): New function.
24768 (aarch64_simd_valid_immediate): Use it as the fallback for SVE vectors.
24769 Explicitly reject structure modes. Check for INDEX constants.
24770 Handle PTRUE and PFALSE constants.
24771 (aarch64_check_zero_based_sve_index_immediate): New function.
24772 (aarch64_simd_imm_zero_p): Delete.
24773 (aarch64_mov_operand_p): Use aarch64_simd_valid_immediate for
24774 vector modes. Accept constants in the range of CNT[BHWD].
24775 (aarch64_simd_scalar_immediate_valid_for_move): Explicitly
24776 ask for an Advanced SIMD mode.
24777 (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): New functions.
24778 (aarch64_simd_vector_alignment): Handle SVE predicates.
24779 (aarch64_vectorize_preferred_vector_alignment): New function.
24780 (aarch64_simd_vector_alignment_reachable): Use it instead of
24782 (aarch64_shift_truncation_mask): Use aarch64_vector_data_mode_p.
24783 (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): New
24785 (MAX_VECT_LEN): Delete.
24786 (expand_vec_perm_d): Add a vec_flags field.
24787 (emit_unspec2, aarch64_expand_sve_vec_perm): New functions.
24788 (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_zip)
24789 (aarch64_evpc_ext): Don't apply a big-endian lane correction
24791 (aarch64_evpc_rev): Rename to...
24792 (aarch64_evpc_rev_local): ...this. Use a predicated operation for SVE.
24793 (aarch64_evpc_rev_global): New function.
24794 (aarch64_evpc_dup): Enforce a 64-byte range for SVE DUP.
24795 (aarch64_evpc_tbl): Use MAX_COMPILE_TIME_VEC_BYTES instead of
24797 (aarch64_evpc_sve_tbl): New function.
24798 (aarch64_expand_vec_perm_const_1): Update after rename of
24799 aarch64_evpc_rev. Handle SVE permutes too, trying
24800 aarch64_evpc_rev_global and using aarch64_evpc_sve_tbl rather
24801 than aarch64_evpc_tbl.
24802 (aarch64_vectorize_vec_perm_const): Initialize vec_flags.
24803 (aarch64_sve_cmp_operand_p, aarch64_unspec_cond_code)
24804 (aarch64_gen_unspec_cond, aarch64_expand_sve_vec_cmp_int)
24805 (aarch64_emit_unspec_cond, aarch64_emit_unspec_cond_or)
24806 (aarch64_emit_inverted_unspec_cond, aarch64_expand_sve_vec_cmp_float)
24807 (aarch64_expand_sve_vcond): New functions.
24808 (aarch64_modes_tieable_p): Use aarch64_vector_data_mode_p instead
24809 of aarch64_vector_mode_p.
24810 (aarch64_dwarf_poly_indeterminate_value): New function.
24811 (aarch64_compute_pressure_classes): Likewise.
24812 (aarch64_can_change_mode_class): Likewise.
24813 (TARGET_GET_RAW_RESULT_MODE, TARGET_GET_RAW_ARG_MODE): Redefine.
24814 (TARGET_VECTORIZE_PREFERRED_VECTOR_ALIGNMENT): Likewise.
24815 (TARGET_VECTORIZE_GET_MASK_MODE): Likewise.
24816 (TARGET_DWARF_POLY_INDETERMINATE_VALUE): Likewise.
24817 (TARGET_COMPUTE_PRESSURE_CLASSES): Likewise.
24818 (TARGET_CAN_CHANGE_MODE_CLASS): Likewise.
24819 * config/aarch64/constraints.md (Upa, Upl, Uav, Uat, Usv, Usi, Utr)
24820 (Uty, Dm, vsa, vsc, vsd, vsi, vsn, vsl, vsm, vsA, vsM, vsN): New
24822 (Dn, Dl, Dr): Accept const as well as const_vector.
24823 (Dz): Likewise. Compare against CONST0_RTX.
24824 * config/aarch64/iterators.md: Refer to "Advanced SIMD" instead
24825 of "vector" where appropriate.
24826 (SVE_ALL, SVE_BH, SVE_BHS, SVE_BHSI, SVE_HSDI, SVE_HSF, SVE_SD)
24827 (SVE_SDI, SVE_I, SVE_F, PRED_ALL, PRED_BHS): New mode iterators.
24828 (UNSPEC_SEL, UNSPEC_ANDF, UNSPEC_IORF, UNSPEC_XORF, UNSPEC_COND_LT)
24829 (UNSPEC_COND_LE, UNSPEC_COND_EQ, UNSPEC_COND_NE, UNSPEC_COND_GE)
24830 (UNSPEC_COND_GT, UNSPEC_COND_LO, UNSPEC_COND_LS, UNSPEC_COND_HS)
24831 (UNSPEC_COND_HI, UNSPEC_COND_UO): New unspecs.
24832 (Vetype, VEL, Vel, VWIDE, Vwide, vw, vwcore, V_INT_EQUIV)
24833 (v_int_equiv): Extend to SVE modes.
24834 (Vesize, V128, v128, Vewtype, V_FP_EQUIV, v_fp_equiv, VPRED): New
24836 (LOGICAL_OR, SVE_INT_UNARY, SVE_FP_UNARY): New code iterators.
24837 (optab): Handle popcount, smin, smax, umin, umax, abs and sqrt.
24838 (logical_nn, lr, sve_int_op, sve_fp_op): New code attributs.
24839 (LOGICALF, OPTAB_PERMUTE, UNPACK, UNPACK_UNSIGNED, SVE_COND_INT_CMP)
24840 (SVE_COND_FP_CMP): New int iterators.
24841 (perm_hilo): Handle the new unpack unspecs.
24842 (optab, logicalf_op, su, perm_optab, cmp_op, imm_con): New int
24844 * config/aarch64/predicates.md (aarch64_sve_cnt_immediate)
24845 (aarch64_sve_addvl_addpl_immediate, aarch64_split_add_offset_immediate)
24846 (aarch64_pluslong_or_poly_operand, aarch64_nonmemory_operand)
24847 (aarch64_equality_operator, aarch64_constant_vector_operand)
24848 (aarch64_sve_ld1r_operand, aarch64_sve_ldr_operand): New predicates.
24849 (aarch64_sve_nonimmediate_operand): Likewise.
24850 (aarch64_sve_general_operand): Likewise.
24851 (aarch64_sve_dup_operand, aarch64_sve_arith_immediate): Likewise.
24852 (aarch64_sve_sub_arith_immediate, aarch64_sve_inc_dec_immediate)
24853 (aarch64_sve_logical_immediate, aarch64_sve_mul_immediate): Likewise.
24854 (aarch64_sve_dup_immediate, aarch64_sve_cmp_vsc_immediate): Likewise.
24855 (aarch64_sve_cmp_vsd_immediate, aarch64_sve_index_immediate): Likewise.
24856 (aarch64_sve_float_arith_immediate): Likewise.
24857 (aarch64_sve_float_arith_with_sub_immediate): Likewise.
24858 (aarch64_sve_float_mul_immediate, aarch64_sve_arith_operand): Likewise.
24859 (aarch64_sve_add_operand, aarch64_sve_logical_operand): Likewise.
24860 (aarch64_sve_lshift_operand, aarch64_sve_rshift_operand): Likewise.
24861 (aarch64_sve_mul_operand, aarch64_sve_cmp_vsc_operand): Likewise.
24862 (aarch64_sve_cmp_vsd_operand, aarch64_sve_index_operand): Likewise.
24863 (aarch64_sve_float_arith_operand): Likewise.
24864 (aarch64_sve_float_arith_with_sub_operand): Likewise.
24865 (aarch64_sve_float_mul_operand): Likewise.
24866 (aarch64_sve_vec_perm_operand): Likewise.
24867 (aarch64_pluslong_operand): Include aarch64_sve_addvl_addpl_immediate.
24868 (aarch64_mov_operand): Accept const_poly_int and const_vector.
24869 (aarch64_simd_lshift_imm, aarch64_simd_rshift_imm): Accept const
24870 as well as const_vector.
24871 (aarch64_simd_imm_zero, aarch64_simd_imm_minus_one): Move earlier
24872 in file. Use CONST0_RTX and CONSTM1_RTX.
24873 (aarch64_simd_or_scalar_imm_zero): Likewise. Add match_codes.
24874 (aarch64_simd_reg_or_zero): Accept const as well as const_vector.
24875 Use aarch64_simd_imm_zero.
24876 * config/aarch64/aarch64-sve.md: New file.
24877 * config/aarch64/aarch64.md: Include it.
24878 (VG_REGNUM, P0_REGNUM, P7_REGNUM, P15_REGNUM): New register numbers.
24879 (UNSPEC_REV, UNSPEC_LD1_SVE, UNSPEC_ST1_SVE, UNSPEC_MERGE_PTRUE)
24880 (UNSPEC_PTEST_PTRUE, UNSPEC_UNPACKSHI, UNSPEC_UNPACKUHI)
24881 (UNSPEC_UNPACKSLO, UNSPEC_UNPACKULO, UNSPEC_PACK)
24882 (UNSPEC_FLOAT_CONVERT, UNSPEC_WHILE_LO): New unspec constants.
24883 (sve): New attribute.
24884 (enabled): Disable instructions with the sve attribute unless
24886 (movqi, movhi): Pass CONST_POLY_INT operaneds through
24887 aarch64_expand_mov_immediate.
24888 (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64): Handle
24889 CNT[BHSD] immediates.
24890 (movti): Split CONST_POLY_INT moves into two halves.
24891 (add<mode>3): Accept aarch64_pluslong_or_poly_operand.
24892 Split additions that need a temporary here if the destination
24893 is the stack pointer.
24894 (*add<mode>3_aarch64): Handle ADDVL and ADDPL immediates.
24895 (*add<mode>3_poly_1): New instruction.
24896 (set_clobber_cc): New expander.
24898 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
24900 * simplify-rtx.c (simplify_immed_subreg): Add an inner_bytes
24901 parameter and use it instead of GET_MODE_SIZE (innermode). Use
24902 inner_bytes * BITS_PER_UNIT instead of GET_MODE_BITSIZE (innermode).
24903 Use CEIL (inner_bytes, GET_MODE_UNIT_SIZE (innermode)) instead of
24904 GET_MODE_NUNITS (innermode). Also add a first_elem parameter.
24905 Change innermode from fixed_mode_size to machine_mode.
24906 (simplify_subreg): Update call accordingly. Handle a constant-sized
24907 subreg of a variable-length CONST_VECTOR.
24909 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
24910 Alan Hayward <alan.hayward@arm.com>
24911 David Sherwood <david.sherwood@arm.com>
24913 * tree-ssa-address.c (mem_ref_valid_without_offset_p): New function.
24914 (add_offset_to_base): New function, split out from...
24915 (create_mem_ref): ...here. When handling a scale other than 1,
24916 check first whether the address is valid without the offset.
24917 Add it into the base if so, leaving the index and scale as-is.
24919 2018-01-12 Jakub Jelinek <jakub@redhat.com>
24922 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Call
24923 fold_for_warn before checking if arg2 is INTEGER_CST.
24925 2018-01-12 Segher Boessenkool <segher@kernel.crashing.org>
24927 * config/rs6000/predicates.md (load_multiple_operation): Delete.
24928 (store_multiple_operation): Delete.
24929 * config/rs6000/rs6000-cpus.def (601): Remove MASK_STRING.
24930 * config/rs6000/rs6000-protos.h (rs6000_output_load_multiple): Delete.
24931 * config/rs6000/rs6000-string.c (expand_block_move): Delete everything
24932 guarded by TARGET_STRING.
24933 (rs6000_output_load_multiple): Delete.
24934 * config/rs6000/rs6000.c (rs6000_option_override_internal): Delete
24935 OPTION_MASK_STRING / TARGET_STRING handling.
24936 (print_operand) <'N', 'O'>: Add comment that these are unused now.
24937 (const rs6000_opt_masks) <"string">: Change mask to 0.
24938 * config/rs6000/rs6000.h (TARGET_DEFAULT): Remove MASK_STRING.
24939 (MASK_STRING): Delete.
24940 * config/rs6000/rs6000.md (*mov<mode>_string): Delete TARGET_STRING
24942 (load_multiple): Delete.
24949 (store_multiple): Delete.
24956 (movmemsi_8reg): Delete.
24957 (corresponding unnamed define_insn): Delete.
24958 (movmemsi_6reg): Delete.
24959 (corresponding unnamed define_insn): Delete.
24960 (movmemsi_4reg): Delete.
24961 (corresponding unnamed define_insn): Delete.
24962 (movmemsi_2reg): Delete.
24963 (corresponding unnamed define_insn): Delete.
24964 (movmemsi_1reg): Delete.
24965 (corresponding unnamed define_insn): Delete.
24966 * config/rs6000/rs6000.opt (mno-string): New.
24967 (mstring): Replace by deprecation warning stub.
24968 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mstring.
24970 2018-01-12 Jakub Jelinek <jakub@redhat.com>
24972 * regrename.c (regrename_do_replace): If replacing the same
24973 reg multiple times, try to reuse last created gen_raw_REG.
24976 * bb-reorder.c (pass_partition_blocks::gate): In lto don't partition
24977 main to workaround a bug in GDB.
24979 2018-01-12 Tom de Vries <tom@codesourcery.com>
24982 * config.gcc (nvptx*-*-*): Set use_gcc_stdint=wrap.
24984 2018-01-12 Vladimir Makarov <vmakarov@redhat.com>
24986 PR rtl-optimization/80481
24987 * ira-color.c (get_cap_member): New function.
24988 (allocnos_conflict_by_live_ranges_p): Use it.
24989 (slot_coalesced_allocno_live_ranges_intersect_p): Add assert.
24990 (setup_slot_coalesced_allocno_live_ranges): Ditto.
24992 2018-01-12 Uros Bizjak <ubizjak@gmail.com>
24995 * config/alpha/alpha.md (*saddsi_1): New insn_ans_split pattern.
24996 (*saddl_se_1): Ditto.
24997 (*ssubsi_1): Ditto.
24998 (*ssubl_se_1): Ditto.
25000 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
25002 * tree-predcom.c (aff_combination_dr_offset): Use wi::to_poly_widest
25003 rather than wi::to_widest for DR_INITs.
25004 * tree-vect-data-refs.c (vect_find_same_alignment_drs): Use
25005 wi::to_poly_offset rather than wi::to_offset for DR_INIT.
25006 (vect_analyze_data_ref_accesses): Require both DR_INITs to be
25008 (vect_analyze_group_access_1): Note that here.
25010 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
25012 * tree-vectorizer.c (get_vec_alignment_for_array_type): Handle
25013 polynomial type sizes.
25015 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
25017 * gimplify.c (gimple_add_tmp_var_fn): Allow variables to have a
25018 poly_uint64 size, rather than requiring an unsigned HOST_WIDE_INT size.
25019 (gimple_add_tmp_var): Likewise.
25021 2018-01-12 Martin Liska <mliska@suse.cz>
25023 * gimple.c (gimple_alloc_counts): Use uint64_t instead of int.
25024 (gimple_alloc_sizes): Likewise.
25025 (dump_gimple_statistics): Use PRIu64 in printf format.
25026 * gimple.h: Change uint64_t to int.
25028 2018-01-12 Martin Liska <mliska@suse.cz>
25030 * tree-core.h: Use uint64_t instead of int.
25031 * tree.c (tree_node_counts): Likewise.
25032 (tree_node_sizes): Likewise.
25033 (dump_tree_statistics): Use PRIu64 in printf format.
25035 2018-01-12 Martin Liska <mliska@suse.cz>
25037 * Makefile.in: As qsort_chk is implemented in vec.c, add
25038 vec.o to linkage of gencfn-macros.
25039 * tree.c (build_new_poly_int_cst): Add CXX_MEM_STAT_INFO as it's
25040 passing the info to record_node_allocation_statistics.
25041 (test_vector_cst_patterns): Add CXX_MEM_STAT_INFO to declaration
25043 * ggc-common.c (struct ggc_usage): Add operator== and use
25044 it in operator< and compare function.
25045 * mem-stats.h (struct mem_usage): Likewise.
25046 * vec.c (struct vec_usage): Remove operator< and compare
25047 function. Can be simply inherited.
25049 2018-01-12 Martin Jambor <mjambor@suse.cz>
25052 * params.def: New parameter PARAM_AVOID_FMA_MAX_BITS.
25053 * tree-ssa-math-opts.c: Include domwalk.h.
25054 (convert_mult_to_fma_1): New function.
25055 (fma_transformation_info): New type.
25056 (fma_deferring_state): Likewise.
25057 (cancel_fma_deferring): New function.
25058 (result_of_phi): Likewise.
25059 (last_fma_candidate_feeds_initial_phi): Likewise.
25060 (convert_mult_to_fma): Added deferring logic, split actual
25061 transformation to convert_mult_to_fma_1.
25062 (math_opts_dom_walker): New type.
25063 (math_opts_dom_walker::after_dom_children): New method, body moved
25064 here from pass_optimize_widening_mul::execute, added deferring logic
25066 (pass_optimize_widening_mul::execute): Moved most of code to
25067 math_opts_dom_walker::after_dom_children.
25068 * config/i386/x86-tune.def (X86_TUNE_AVOID_128FMA_CHAINS): New.
25069 * config/i386/i386.c (ix86_option_override_internal): Added
25070 maybe_setting of PARAM_AVOID_FMA_MAX_BITS.
25072 2018-01-12 Richard Biener <rguenther@suse.de>
25075 * dwarf2out.c (gen_variable_die): Do not reset old_die for
25076 inline instance vars.
25078 2018-01-12 Oleg Endo <olegendo@gcc.gnu.org>
25081 * config/rx/rx.c (rx_is_restricted_memory_address):
25082 Handle SUBREG case.
25084 2018-01-12 Richard Biener <rguenther@suse.de>
25086 PR tree-optimization/80846
25087 * target.def (split_reduction): New target hook.
25088 * targhooks.c (default_split_reduction): New function.
25089 * targhooks.h (default_split_reduction): Declare.
25090 * tree-vect-loop.c (vect_create_epilog_for_reduction): If the
25091 target requests first reduce vectors by combining low and high
25093 * tree-vect-stmts.c (vect_gen_perm_mask_any): Adjust.
25094 (get_vectype_for_scalar_type_and_size): Export.
25095 * tree-vectorizer.h (get_vectype_for_scalar_type_and_size): Declare.
25096 * doc/tm.texi.in (TARGET_VECTORIZE_SPLIT_REDUCTION): Document.
25097 * doc/tm.texi: Regenerate.
25098 * config/i386/i386.c (ix86_split_reduction): Implement
25099 TARGET_VECTORIZE_SPLIT_REDUCTION.
25101 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
25104 * config/sparc/sparc.h (PIC_OFFSET_TABLE_REGNUM): Set to INVALID_REGNUM
25105 in PIC mode except for TARGET_VXWORKS_RTP.
25106 * config/sparc/sparc.c: Include cfgrtl.h.
25107 (TARGET_INIT_PIC_REG): Define.
25108 (TARGET_USE_PSEUDO_PIC_REG): Likewise.
25109 (sparc_pic_register_p): New predicate.
25110 (sparc_legitimate_address_p): Use it.
25111 (sparc_legitimize_pic_address): Likewise.
25112 (sparc_delegitimize_address): Likewise.
25113 (sparc_mode_dependent_address_p): Likewise.
25114 (gen_load_pcrel_sym): Remove 4th parameter.
25115 (load_got_register): Adjust call to above. Remove obsolete stuff.
25116 (sparc_expand_prologue): Do not call load_got_register here.
25117 (sparc_flat_expand_prologue): Likewise.
25118 (sparc_output_mi_thunk): Set the pic_offset_table_rtx object.
25119 (sparc_use_pseudo_pic_reg): New function.
25120 (sparc_init_pic_reg): Likewise.
25121 * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
25122 (builtin_setjmp_receiver): Enable only for TARGET_VXWORKS_RTP.
25124 2018-01-12 Christophe Lyon <christophe.lyon@linaro.org>
25126 * doc/sourcebuild.texi (Effective-Target Keywords, Other attributes):
25127 Add item for branch_cost.
25129 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
25131 PR rtl-optimization/83565
25132 * rtlanal.c (nonzero_bits1): On WORD_REGISTER_OPERATIONS machines, do
25133 not extend the result to a larger mode for rotate operations.
25134 (num_sign_bit_copies1): Likewise.
25136 2018-01-12 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
25139 * config/sol2.h (STARTFILE_ARCH_SPEC): Don't use with -shared or
25141 Use values-Xc.o for -pedantic.
25142 Link with values-xpg4.o for C90, values-xpg6.o otherwise.
25144 2018-01-12 Martin Liska <mliska@suse.cz>
25147 * ipa-devirt.c (final_warning_record::grow_type_warnings):
25149 (possible_polymorphic_call_targets): Use it.
25150 (ipa_devirt): Likewise.
25152 2018-01-12 Martin Liska <mliska@suse.cz>
25154 * profile-count.h (enum profile_quality): Use 0 as invalid
25155 enum value of profile_quality.
25157 2018-01-12 Chung-Ju Wu <jasonwucj@gmail.com>
25159 * doc/invoke.texi (NDS32 Options): Add -mext-perf, -mext-perf2 and
25160 -mext-string options.
25162 2018-01-12 Richard Biener <rguenther@suse.de>
25164 * lto-streamer-out.c (DFS::DFS_write_tree_body): Process
25165 DECL_DEBUG_EXPR conditional on DECL_HAS_DEBUG_EXPR_P.
25166 * tree-streamer-in.c (lto_input_ts_decl_common_tree_pointers):
25168 * tree-streamer-out.c (write_ts_decl_common_tree_pointers): Likewise.
25170 2018-01-11 Michael Meissner <meissner@linux.vnet.ibm.com>
25172 * configure.ac (--with-long-double-format): Add support for the
25173 configuration option to change the default long double format on
25175 * config.gcc (powerpc*-linux*-*): Likewise.
25176 * configure: Regenerate.
25177 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): If long
25178 double is IEEE, define __KC__ and __KF__ to allow floatn.h to be
25179 used without modification.
25181 2018-01-11 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
25183 * config/rs6000/rs6000-builtin.def (BU_P7_MISC_X): New #define.
25184 (SPEC_BARRIER): New instantiation of BU_P7_MISC_X.
25185 * config/rs6000/rs6000.c (rs6000_expand_builtin): Handle
25186 MISC_BUILTIN_SPEC_BARRIER.
25187 (rs6000_init_builtins): Likewise.
25188 * config/rs6000/rs6000.md (UNSPECV_SPEC_BARRIER): New UNSPECV
25190 (speculation_barrier): New define_insn.
25191 * doc/extend.texi: Document __builtin_speculation_barrier.
25193 2018-01-11 Jakub Jelinek <jakub@redhat.com>
25196 * config/i386/i386.c (ix86_expand_vector_init_one_nonzero): If one_var
25197 is 0, for V{8,16}S[IF] and V[48]D[IF]mode use gen_vec_set<mode>_0.
25198 * config/i386/sse.md (VI8_AVX_AVX512F, VI4F_256_512): New mode
25200 (ssescalarmodesuffix): Add 512-bit vectors. Use "d" or "q" for
25201 integral modes instead of "ss" and "sd".
25202 (vec_set<mode>_0): New define_insns for 256-bit and 512-bit
25203 vectors with 32-bit and 64-bit elements.
25204 (vecdupssescalarmodesuffix): New mode attribute.
25205 (vec_dup<mode>): Use it.
25207 2018-01-11 H.J. Lu <hongjiu.lu@intel.com>
25210 * config/i386/i386.c (ix86_compute_frame_layout): Align stack
25211 frame if argument is passed on stack.
25213 2018-01-11 Jakub Jelinek <jakub@redhat.com>
25216 * ree.c (combine_reaching_defs): Optimize also
25217 reg2=exp; reg1=reg2; reg2=any_extend(reg1); into
25218 reg2=any_extend(exp); reg1=reg2;, formatting fix.
25220 2018-01-11 Jan Hubicka <hubicka@ucw.cz>
25222 PR middle-end/83189
25223 * gimple-ssa-isolate-paths.c (isolate_path): Fix profile update.
25225 2018-01-11 Jan Hubicka <hubicka@ucw.cz>
25227 PR middle-end/83718
25228 * tree-inline.c (copy_cfg_body): Adjust num&den for scaling
25229 after they are computed.
25231 2018-01-11 Bin Cheng <bin.cheng@arm.com>
25233 PR tree-optimization/83695
25234 * gimple-loop-linterchange.cc
25235 (tree_loop_interchange::interchange_loops): Call scev_reset_htab to
25236 reset cached scev information after interchange.
25237 (pass_linterchange::execute): Remove call to scev_reset_htab.
25239 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
25241 * config/arm/arm_neon.h (vfmlal_lane_low_u32, vfmlal_lane_high_u32,
25242 vfmlalq_laneq_low_u32, vfmlalq_lane_low_u32, vfmlal_laneq_low_u32,
25243 vfmlalq_laneq_high_u32, vfmlalq_lane_high_u32, vfmlal_laneq_high_u32,
25244 vfmlsl_lane_low_u32, vfmlsl_lane_high_u32, vfmlslq_laneq_low_u32,
25245 vfmlslq_lane_low_u32, vfmlsl_laneq_low_u32, vfmlslq_laneq_high_u32,
25246 vfmlslq_lane_high_u32, vfmlsl_laneq_high_u32): Define.
25247 * config/arm/arm_neon_builtins.def (vfmal_lane_low,
25248 vfmal_lane_lowv4hf, vfmal_lane_lowv8hf, vfmal_lane_high,
25249 vfmal_lane_highv4hf, vfmal_lane_highv8hf, vfmsl_lane_low,
25250 vfmsl_lane_lowv4hf, vfmsl_lane_lowv8hf, vfmsl_lane_high,
25251 vfmsl_lane_highv4hf, vfmsl_lane_highv8hf): New sets of builtins.
25252 * config/arm/iterators.md (VFMLSEL2, vfmlsel2): New mode attributes.
25253 (V_lane_reg): Likewise.
25254 * config/arm/neon.md (neon_vfm<vfml_op>l_lane_<vfml_half><VCVTF:mode>):
25256 (neon_vfm<vfml_op>l_lane_<vfml_half><vfmlsel2><mode>): Likewise.
25257 (vfmal_lane_low<mode>_intrinsic,
25258 vfmal_lane_low<vfmlsel2><mode>_intrinsic,
25259 vfmal_lane_high<vfmlsel2><mode>_intrinsic,
25260 vfmal_lane_high<mode>_intrinsic, vfmsl_lane_low<mode>_intrinsic,
25261 vfmsl_lane_low<vfmlsel2><mode>_intrinsic,
25262 vfmsl_lane_high<vfmlsel2><mode>_intrinsic,
25263 vfmsl_lane_high<mode>_intrinsic): New define_insns.
25265 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
25267 * config/arm/arm-cpus.in (fp16fml): New feature.
25268 (ALL_SIMD): Add fp16fml.
25269 (armv8.2-a): Add fp16fml as an option.
25270 (armv8.3-a): Likewise.
25271 (armv8.4-a): Add fp16fml as part of fp16.
25272 * config/arm/arm.h (TARGET_FP16FML): Define.
25273 * config/arm/arm-c.c (arm_cpu_builtins): Define __ARM_FEATURE_FP16_FML
25275 * config/arm/arm-modes.def (V2HF): Define.
25276 * config/arm/arm_neon.h (vfmlal_low_u32, vfmlsl_low_u32,
25277 vfmlal_high_u32, vfmlsl_high_u32, vfmlalq_low_u32,
25278 vfmlslq_low_u32, vfmlalq_high_u32, vfmlslq_high_u32): Define.
25279 * config/arm/arm_neon_builtins.def (vfmal_low, vfmal_high,
25280 vfmsl_low, vfmsl_high): New set of builtins.
25281 * config/arm/iterators.md (PLUSMINUS): New code iterator.
25282 (vfml_op): New code attribute.
25283 (VFMLHALVES): New int iterator.
25284 (VFML, VFMLSEL): New mode attributes.
25285 (V_reg): Define mapping for V2HF.
25286 (V_hi, V_lo): New mode attributes.
25287 (VF_constraint): Likewise.
25288 (vfml_half, vfml_half_selector): New int attributes.
25289 * config/arm/neon.md (neon_vfm<vfml_op>l_<vfml_half><mode>): New
25291 (vfmal_low<mode>_intrinsic, vfmsl_high<mode>_intrinsic,
25292 vfmal_high<mode>_intrinsic, vfmsl_low<mode>_intrinsic):
25294 * config/arm/t-arm-elf (v8_fps): Add fp16fml.
25295 * config/arm/t-multilib (v8_2_a_simd_variants): Add fp16fml.
25296 * config/arm/unspecs.md (UNSPEC_VFML_LO, UNSPEC_VFML_HI): New unspecs.
25297 * doc/invoke.texi (ARM Options): Document fp16fml. Update armv8.4-a
25299 * doc/sourcebuild.texi (arm_fp16fml_neon_ok, arm_fp16fml_neon):
25300 Document new effective target and option set.
25302 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
25304 * config/arm/arm-cpus.in (armv8_4): New feature.
25305 (ARMv8_4a): New fgroup.
25306 (armv8.4-a): New arch.
25307 * config/arm/arm-tables.opt: Regenerate.
25308 * config/arm/t-aprofile: Add matching rules for -march=armv8.4-a.
25309 * config/arm/t-arm-elf (all_v8_archs): Add armv8.4-a.
25310 * config/arm/t-multilib (v8_4_a_simd_variants): New variable.
25311 Add matching rules for -march=armv8.4-a and extensions.
25312 * doc/invoke.texi (ARM Options): Document -march=armv8.4-a.
25314 2018-01-11 Oleg Endo <olegendo@gcc.gnu.org>
25317 * config/rx/rx.md (BW): New mode attribute.
25318 (sync_lock_test_and_setsi): Add mode suffix to insn output.
25320 2018-01-11 Richard Biener <rguenther@suse.de>
25322 PR tree-optimization/83435
25323 * graphite.c (canonicalize_loop_form): Ignore fake loop exit edges.
25324 * graphite-scop-detection.c (scop_detection::get_sese): Likewise.
25325 * tree-vrp.c (add_assert_info): Drop TREE_OVERFLOW if they appear.
25327 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
25328 Alan Hayward <alan.hayward@arm.com>
25329 David Sherwood <david.sherwood@arm.com>
25331 * config/aarch64/aarch64.c (aarch64_address_info): Add a const_offset
25333 (aarch64_classify_address): Initialize it. Track polynomial offsets.
25334 (aarch64_print_address_internal): Use it to check for a zero offset.
25336 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
25337 Alan Hayward <alan.hayward@arm.com>
25338 David Sherwood <david.sherwood@arm.com>
25340 * config/aarch64/aarch64-modes.def (NUM_POLY_INT_COEFFS): Set to 2.
25341 * config/aarch64/aarch64-protos.h (aarch64_initial_elimination_offset):
25342 Return a poly_int64 rather than a HOST_WIDE_INT.
25343 (aarch64_offset_7bit_signed_scaled_p): Take the offset as a poly_int64
25344 rather than a HOST_WIDE_INT.
25345 * config/aarch64/aarch64.h (aarch64_frame): Protect with
25346 HAVE_POLY_INT_H rather than HOST_WIDE_INT. Change locals_offset,
25347 hard_fp_offset, frame_size, initial_adjust, callee_offset and
25348 final_offset from HOST_WIDE_INT to poly_int64.
25349 * config/aarch64/aarch64-builtins.c (aarch64_simd_expand_args): Use
25350 to_constant when getting the number of units in an Advanced SIMD
25352 (aarch64_builtin_vectorized_function): Check for a constant number
25354 * config/aarch64/aarch64-simd.md (mov<mode>): Handle polynomial
25356 (aarch64_ld<VSTRUCT:nregs>_lane<VALLDIF:mode>): Use the nunits
25357 attribute instead of GET_MODE_NUNITS.
25358 * config/aarch64/aarch64.c (aarch64_hard_regno_nregs)
25359 (aarch64_class_max_nregs): Use the constant_lowest_bound of the
25360 GET_MODE_SIZE for fixed-size registers.
25361 (aarch64_const_vec_all_same_in_range_p): Use const_vec_duplicate_p.
25362 (aarch64_hard_regno_call_part_clobbered, aarch64_classify_index)
25363 (aarch64_mode_valid_for_sched_fusion_p, aarch64_classify_address)
25364 (aarch64_legitimize_address_displacement, aarch64_secondary_reload)
25365 (aarch64_print_operand, aarch64_print_address_internal)
25366 (aarch64_address_cost, aarch64_rtx_costs, aarch64_register_move_cost)
25367 (aarch64_short_vector_p, aapcs_vfp_sub_candidate)
25368 (aarch64_simd_attr_length_rglist, aarch64_operands_ok_for_ldpstp):
25369 Handle polynomial GET_MODE_SIZE.
25370 (aarch64_hard_regno_caller_save_mode): Likewise. Return modes
25371 wider than SImode without modification.
25372 (tls_symbolic_operand_type): Use strip_offset instead of split_const.
25373 (aarch64_pass_by_reference, aarch64_layout_arg, aarch64_pad_reg_upward)
25374 (aarch64_gimplify_va_arg_expr): Assert that we don't yet handle
25375 passing and returning SVE modes.
25376 (aarch64_function_value, aarch64_layout_arg): Use gen_int_mode
25377 rather than GEN_INT.
25378 (aarch64_emit_probe_stack_range): Take the size as a poly_int64
25379 rather than a HOST_WIDE_INT, but call sorry if it isn't constant.
25380 (aarch64_allocate_and_probe_stack_space): Likewise.
25381 (aarch64_layout_frame): Cope with polynomial offsets.
25382 (aarch64_save_callee_saves, aarch64_restore_callee_saves): Take the
25383 start_offset as a poly_int64 rather than a HOST_WIDE_INT. Track
25384 polynomial offsets.
25385 (offset_9bit_signed_unscaled_p, offset_12bit_unsigned_scaled_p)
25386 (aarch64_offset_7bit_signed_scaled_p): Take the offset as a
25387 poly_int64 rather than a HOST_WIDE_INT.
25388 (aarch64_get_separate_components, aarch64_process_components)
25389 (aarch64_expand_prologue, aarch64_expand_epilogue)
25390 (aarch64_use_return_insn_p): Handle polynomial frame offsets.
25391 (aarch64_anchor_offset): New function, split out from...
25392 (aarch64_legitimize_address): ...here.
25393 (aarch64_builtin_vectorization_cost): Handle polynomial
25394 TYPE_VECTOR_SUBPARTS.
25395 (aarch64_simd_check_vect_par_cnst_half): Handle polynomial
25397 (aarch64_simd_make_constant, aarch64_expand_vector_init): Get the
25398 number of elements from the PARALLEL rather than the mode.
25399 (aarch64_shift_truncation_mask): Use GET_MODE_UNIT_BITSIZE
25400 rather than GET_MODE_BITSIZE.
25401 (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_ext)
25402 (aarch64_evpc_rev, aarch64_evpc_dup, aarch64_evpc_zip)
25403 (aarch64_expand_vec_perm_const_1): Handle polynomial
25404 d->perm.length () and d->perm elements.
25405 (aarch64_evpc_tbl): Likewise. Use nelt rather than GET_MODE_NUNITS.
25406 Apply to_constant to d->perm elements.
25407 (aarch64_simd_valid_immediate, aarch64_vec_fpconst_pow_of_2): Handle
25408 polynomial CONST_VECTOR_NUNITS.
25409 (aarch64_move_pointer): Take amount as a poly_int64 rather
25411 (aarch64_progress_pointer): Avoid temporary variable.
25412 * config/aarch64/aarch64.md (aarch64_<crc_variant>): Use
25413 the mode attribute instead of GET_MODE.
25415 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
25416 Alan Hayward <alan.hayward@arm.com>
25417 David Sherwood <david.sherwood@arm.com>
25419 * config/aarch64/aarch64.c (aarch64_force_temporary): Assert that
25420 x exists before using it.
25421 (aarch64_add_constant_internal): Rename to...
25422 (aarch64_add_offset_1): ...this. Replace regnum with separate
25423 src and dest rtxes. Handle the case in which they're different,
25424 including when the offset is zero. Replace scratchreg with an rtx.
25425 Use 2 additions if there is no spare register into which we can
25426 move a 16-bit constant.
25427 (aarch64_add_constant): Delete.
25428 (aarch64_add_offset): Replace reg with separate src and dest
25429 rtxes. Take a poly_int64 offset instead of a HOST_WIDE_INT.
25430 Use aarch64_add_offset_1.
25431 (aarch64_add_sp, aarch64_sub_sp): Take the scratch register as
25432 an rtx rather than an int. Take the delta as a poly_int64
25433 rather than a HOST_WIDE_INT. Use aarch64_add_offset.
25434 (aarch64_expand_mov_immediate): Update uses of aarch64_add_offset.
25435 (aarch64_expand_prologue): Update calls to aarch64_sub_sp,
25436 aarch64_allocate_and_probe_stack_space and aarch64_add_offset.
25437 (aarch64_expand_epilogue): Update calls to aarch64_add_offset
25438 and aarch64_add_sp.
25439 (aarch64_output_mi_thunk): Use aarch64_add_offset rather than
25440 aarch64_add_constant.
25442 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
25444 * config/aarch64/aarch64.c (aarch64_reinterpret_float_as_int):
25445 Use scalar_float_mode.
25447 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
25449 * config/aarch64/aarch64-simd.md
25450 (aarch64_fml<f16mac1>l<f16quad>_low<mode>): Avoid GET_MODE_NUNITS.
25451 (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Likewise.
25452 (aarch64_fml<f16mac1>l_lane_lowv2sf): Likewise.
25453 (aarch64_fml<f16mac1>l_lane_highv2sf): Likewise.
25454 (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Likewise.
25455 (aarch64_fml<f16mac1>lq_laneq_highv4sf): Likewise.
25456 (aarch64_fml<f16mac1>l_laneq_lowv2sf): Likewise.
25457 (aarch64_fml<f16mac1>l_laneq_highv2sf): Likewise.
25458 (aarch64_fml<f16mac1>lq_lane_lowv4sf): Likewise.
25459 (aarch64_fml<f16mac1>lq_lane_highv4sf): Likewise.
25461 2018-01-11 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
25464 * config/arm/arm.c (arm_declare_function_name): Set arch_to_print if
25465 targ_options->x_arm_arch_string is non NULL.
25467 2018-01-11 Tamar Christina <tamar.christina@arm.com>
25469 * config/aarch64/aarch64.h
25470 (AARCH64_FL_FOR_ARCH8_4): Add AARCH64_FL_DOTPROD.
25472 2018-01-11 Sudakshina Das <sudi.das@arm.com>
25475 * expmed.c (emit_store_flag_force): Swap if const op0
25476 and change VOIDmode to mode of op0.
25478 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
25480 PR rtl-optimization/83761
25481 * caller-save.c (replace_reg_with_saved_mem): Pass bits rather
25482 than bytes to mode_for_size.
25484 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
25486 PR middle-end/83189
25487 * gfortran.fortran-torture/compile/pr83189.f90: New testcase.
25488 * tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): Handle zero
25491 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
25493 PR middle-end/83575
25494 * cfgrtl.c (rtl_verify_edges): Only verify fixability of partition
25495 when in layout mode.
25496 (cfg_layout_finalize): Do not verify cfg before we are out of layout.
25497 * cfgcleanup.c (try_optimize_cfg): Only verify flow info when doing
25500 2018-01-10 Michael Collison <michael.collison@arm.com>
25502 * config/aarch64/aarch64-modes.def (V2HF): New VECTOR_MODE.
25503 * config/aarch64/aarch64-option-extension.def: Add
25504 AARCH64_OPT_EXTENSION of 'fp16fml'.
25505 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
25506 (__ARM_FEATURE_FP16_FML): Define if TARGET_F16FML is true.
25507 * config/aarch64/predicates.md (aarch64_lane_imm3): New predicate.
25508 * config/aarch64/constraints.md (Ui7): New constraint.
25509 * config/aarch64/iterators.md (VFMLA_W): New mode iterator.
25510 (VFMLA_SEL_W): Ditto.
25513 (VFMLA16_LOW): New int iterator.
25514 (VFMLA16_HIGH): Ditto.
25515 (UNSPEC_FMLAL): New unspec.
25516 (UNSPEC_FMLSL): Ditto.
25517 (UNSPEC_FMLAL2): Ditto.
25518 (UNSPEC_FMLSL2): Ditto.
25519 (f16mac): New code attribute.
25520 * config/aarch64/aarch64-simd-builtins.def
25521 (aarch64_fmlal_lowv2sf): Ditto.
25522 (aarch64_fmlsl_lowv2sf): Ditto.
25523 (aarch64_fmlalq_lowv4sf): Ditto.
25524 (aarch64_fmlslq_lowv4sf): Ditto.
25525 (aarch64_fmlal_highv2sf): Ditto.
25526 (aarch64_fmlsl_highv2sf): Ditto.
25527 (aarch64_fmlalq_highv4sf): Ditto.
25528 (aarch64_fmlslq_highv4sf): Ditto.
25529 (aarch64_fmlal_lane_lowv2sf): Ditto.
25530 (aarch64_fmlsl_lane_lowv2sf): Ditto.
25531 (aarch64_fmlal_laneq_lowv2sf): Ditto.
25532 (aarch64_fmlsl_laneq_lowv2sf): Ditto.
25533 (aarch64_fmlalq_lane_lowv4sf): Ditto.
25534 (aarch64_fmlsl_lane_lowv4sf): Ditto.
25535 (aarch64_fmlalq_laneq_lowv4sf): Ditto.
25536 (aarch64_fmlsl_laneq_lowv4sf): Ditto.
25537 (aarch64_fmlal_lane_highv2sf): Ditto.
25538 (aarch64_fmlsl_lane_highv2sf): Ditto.
25539 (aarch64_fmlal_laneq_highv2sf): Ditto.
25540 (aarch64_fmlsl_laneq_highv2sf): Ditto.
25541 (aarch64_fmlalq_lane_highv4sf): Ditto.
25542 (aarch64_fmlsl_lane_highv4sf): Ditto.
25543 (aarch64_fmlalq_laneq_highv4sf): Ditto.
25544 (aarch64_fmlsl_laneq_highv4sf): Ditto.
25545 * config/aarch64/aarch64-simd.md:
25546 (aarch64_fml<f16mac1>l<f16quad>_low<mode>): New pattern.
25547 (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
25548 (aarch64_simd_fml<f16mac1>l<f16quad>_low<mode>): Ditto.
25549 (aarch64_simd_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
25550 (aarch64_fml<f16mac1>l_lane_lowv2sf): Ditto.
25551 (aarch64_fml<f16mac1>l_lane_highv2sf): Ditto.
25552 (aarch64_simd_fml<f16mac>l_lane_lowv2sf): Ditto.
25553 (aarch64_simd_fml<f16mac>l_lane_highv2sf): Ditto.
25554 (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Ditto.
25555 (aarch64_fml<f16mac1>lq_laneq_highv4sf): Ditto.
25556 (aarch64_simd_fml<f16mac>lq_laneq_lowv4sf): Ditto.
25557 (aarch64_simd_fml<f16mac>lq_laneq_highv4sf): Ditto.
25558 (aarch64_fml<f16mac1>l_laneq_lowv2sf): Ditto.
25559 (aarch64_fml<f16mac1>l_laneq_highv2sf): Ditto.
25560 (aarch64_simd_fml<f16mac>l_laneq_lowv2sf): Ditto.
25561 (aarch64_simd_fml<f16mac>l_laneq_highv2sf): Ditto.
25562 (aarch64_fml<f16mac1>lq_lane_lowv4sf): Ditto.
25563 (aarch64_fml<f16mac1>lq_lane_highv4sf): Ditto.
25564 (aarch64_simd_fml<f16mac>lq_lane_lowv4sf): Ditto.
25565 (aarch64_simd_fml<f16mac>lq_lane_highv4sf): Ditto.
25566 * config/aarch64/arm_neon.h (vfmlal_low_u32): New intrinsic.
25567 (vfmlsl_low_u32): Ditto.
25568 (vfmlalq_low_u32): Ditto.
25569 (vfmlslq_low_u32): Ditto.
25570 (vfmlal_high_u32): Ditto.
25571 (vfmlsl_high_u32): Ditto.
25572 (vfmlalq_high_u32): Ditto.
25573 (vfmlslq_high_u32): Ditto.
25574 (vfmlal_lane_low_u32): Ditto.
25575 (vfmlsl_lane_low_u32): Ditto.
25576 (vfmlal_laneq_low_u32): Ditto.
25577 (vfmlsl_laneq_low_u32): Ditto.
25578 (vfmlalq_lane_low_u32): Ditto.
25579 (vfmlslq_lane_low_u32): Ditto.
25580 (vfmlalq_laneq_low_u32): Ditto.
25581 (vfmlslq_laneq_low_u32): Ditto.
25582 (vfmlal_lane_high_u32): Ditto.
25583 (vfmlsl_lane_high_u32): Ditto.
25584 (vfmlal_laneq_high_u32): Ditto.
25585 (vfmlsl_laneq_high_u32): Ditto.
25586 (vfmlalq_lane_high_u32): Ditto.
25587 (vfmlslq_lane_high_u32): Ditto.
25588 (vfmlalq_laneq_high_u32): Ditto.
25589 (vfmlslq_laneq_high_u32): Ditto.
25590 * config/aarch64/aarch64.h (AARCH64_FL_F16SML): New flag.
25591 (AARCH64_FL_FOR_ARCH8_4): New.
25592 (AARCH64_ISA_F16FML): New ISA flag.
25593 (TARGET_F16FML): New feature flag for fp16fml.
25594 (doc/invoke.texi): Document new fp16fml option.
25596 2018-01-10 Michael Collison <michael.collison@arm.com>
25598 * config/aarch64/aarch64-builtins.c:
25599 (aarch64_types_ternopu_imm_qualifiers, TYPES_TERNOPUI): New.
25600 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
25601 (__ARM_FEATURE_SHA3): Define if TARGET_SHA3 is true.
25602 * config/aarch64/aarch64.h (AARCH64_FL_SHA3): New flags.
25603 (AARCH64_ISA_SHA3): New ISA flag.
25604 (TARGET_SHA3): New feature flag for sha3.
25605 * config/aarch64/iterators.md (sha512_op): New int attribute.
25606 (CRYPTO_SHA512): New int iterator.
25607 (UNSPEC_SHA512H): New unspec.
25608 (UNSPEC_SHA512H2): Ditto.
25609 (UNSPEC_SHA512SU0): Ditto.
25610 (UNSPEC_SHA512SU1): Ditto.
25611 * config/aarch64/aarch64-simd-builtins.def
25612 (aarch64_crypto_sha512hqv2di): New builtin.
25613 (aarch64_crypto_sha512h2qv2di): Ditto.
25614 (aarch64_crypto_sha512su0qv2di): Ditto.
25615 (aarch64_crypto_sha512su1qv2di): Ditto.
25616 (aarch64_eor3qv8hi): Ditto.
25617 (aarch64_rax1qv2di): Ditto.
25618 (aarch64_xarqv2di): Ditto.
25619 (aarch64_bcaxqv8hi): Ditto.
25620 * config/aarch64/aarch64-simd.md:
25621 (aarch64_crypto_sha512h<sha512_op>qv2di): New pattern.
25622 (aarch64_crypto_sha512su0qv2di): Ditto.
25623 (aarch64_crypto_sha512su1qv2di): Ditto.
25624 (aarch64_eor3qv8hi): Ditto.
25625 (aarch64_rax1qv2di): Ditto.
25626 (aarch64_xarqv2di): Ditto.
25627 (aarch64_bcaxqv8hi): Ditto.
25628 * config/aarch64/arm_neon.h (vsha512hq_u64): New intrinsic.
25629 (vsha512h2q_u64): Ditto.
25630 (vsha512su0q_u64): Ditto.
25631 (vsha512su1q_u64): Ditto.
25632 (veor3q_u16): Ditto.
25633 (vrax1q_u64): Ditto.
25634 (vxarq_u64): Ditto.
25635 (vbcaxq_u16): Ditto.
25636 * config/arm/types.md (crypto_sha512): New type attribute.
25637 (crypto_sha3): Ditto.
25638 (doc/invoke.texi): Document new sha3 option.
25640 2018-01-10 Michael Collison <michael.collison@arm.com>
25642 * config/aarch64/aarch64-builtins.c:
25643 (aarch64_types_quadopu_imm_qualifiers, TYPES_QUADOPUI): New.
25644 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
25645 (__ARM_FEATURE_SM3): Define if TARGET_SM4 is true.
25646 (__ARM_FEATURE_SM4): Define if TARGET_SM4 is true.
25647 * config/aarch64/aarch64.h (AARCH64_FL_SM4): New flags.
25648 (AARCH64_ISA_SM4): New ISA flag.
25649 (TARGET_SM4): New feature flag for sm4.
25650 * config/aarch64/aarch64-simd-builtins.def
25651 (aarch64_sm3ss1qv4si): Ditto.
25652 (aarch64_sm3tt1aq4si): Ditto.
25653 (aarch64_sm3tt1bq4si): Ditto.
25654 (aarch64_sm3tt2aq4si): Ditto.
25655 (aarch64_sm3tt2bq4si): Ditto.
25656 (aarch64_sm3partw1qv4si): Ditto.
25657 (aarch64_sm3partw2qv4si): Ditto.
25658 (aarch64_sm4eqv4si): Ditto.
25659 (aarch64_sm4ekeyqv4si): Ditto.
25660 * config/aarch64/aarch64-simd.md:
25661 (aarch64_sm3ss1qv4si): Ditto.
25662 (aarch64_sm3tt<sm3tt_op>qv4si): Ditto.
25663 (aarch64_sm3partw<sm3part_op>qv4si): Ditto.
25664 (aarch64_sm4eqv4si): Ditto.
25665 (aarch64_sm4ekeyqv4si): Ditto.
25666 * config/aarch64/iterators.md (sm3tt_op): New int iterator.
25667 (sm3part_op): Ditto.
25668 (CRYPTO_SM3TT): Ditto.
25669 (CRYPTO_SM3PART): Ditto.
25670 (UNSPEC_SM3SS1): New unspec.
25671 (UNSPEC_SM3TT1A): Ditto.
25672 (UNSPEC_SM3TT1B): Ditto.
25673 (UNSPEC_SM3TT2A): Ditto.
25674 (UNSPEC_SM3TT2B): Ditto.
25675 (UNSPEC_SM3PARTW1): Ditto.
25676 (UNSPEC_SM3PARTW2): Ditto.
25677 (UNSPEC_SM4E): Ditto.
25678 (UNSPEC_SM4EKEY): Ditto.
25679 * config/aarch64/constraints.md (Ui2): New constraint.
25680 * config/aarch64/predicates.md (aarch64_imm2): New predicate.
25681 * config/arm/types.md (crypto_sm3): New type attribute.
25682 (crypto_sm4): Ditto.
25683 * config/aarch64/arm_neon.h (vsm3ss1q_u32): New intrinsic.
25684 (vsm3tt1aq_u32): Ditto.
25685 (vsm3tt1bq_u32): Ditto.
25686 (vsm3tt2aq_u32): Ditto.
25687 (vsm3tt2bq_u32): Ditto.
25688 (vsm3partw1q_u32): Ditto.
25689 (vsm3partw2q_u32): Ditto.
25690 (vsm4eq_u32): Ditto.
25691 (vsm4ekeyq_u32): Ditto.
25692 (doc/invoke.texi): Document new sm4 option.
25694 2018-01-10 Michael Collison <michael.collison@arm.com>
25696 * config/aarch64/aarch64-arches.def (armv8.4-a): New architecture.
25697 * config/aarch64/aarch64.h (AARCH64_ISA_V8_4): New ISA flag.
25698 (AARCH64_FL_FOR_ARCH8_4): New.
25699 (AARCH64_FL_V8_4): New flag.
25700 (doc/invoke.texi): Document new armv8.4-a option.
25702 2018-01-10 Michael Collison <michael.collison@arm.com>
25704 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
25705 (__ARM_FEATURE_AES): Define if TARGET_AES is true.
25706 (__ARM_FEATURE_SHA2): Define if TARGET_SHA2 is true.
25707 * config/aarch64/aarch64-option-extension.def: Add
25708 AARCH64_OPT_EXTENSION of 'sha2'.
25709 (aes): Add AARCH64_OPT_EXTENSION of 'aes'.
25710 (crypto): Disable sha2 and aes if crypto disabled.
25711 (crypto): Enable aes and sha2 if enabled.
25712 (simd): Disable sha2 and aes if simd disabled.
25713 * config/aarch64/aarch64.h (AARCH64_FL_AES, AARCH64_FL_SHA2):
25715 (AARCH64_ISA_AES, AARCH64_ISA_SHA2): New ISA flags.
25716 (TARGET_SHA2): New feature flag for sha2.
25717 (TARGET_AES): New feature flag for aes.
25718 * config/aarch64/aarch64-simd.md:
25719 (aarch64_crypto_aes<aes_op>v16qi): Make pattern
25720 conditional on TARGET_AES.
25721 (aarch64_crypto_aes<aesmc_op>v16qi): Ditto.
25722 (aarch64_crypto_sha1hsi): Make pattern conditional
25724 (aarch64_crypto_sha1hv4si): Ditto.
25725 (aarch64_be_crypto_sha1hv4si): Ditto.
25726 (aarch64_crypto_sha1su1v4si): Ditto.
25727 (aarch64_crypto_sha1<sha1_op>v4si): Ditto.
25728 (aarch64_crypto_sha1su0v4si): Ditto.
25729 (aarch64_crypto_sha256h<sha256_op>v4si): Ditto.
25730 (aarch64_crypto_sha256su0v4si): Ditto.
25731 (aarch64_crypto_sha256su1v4si): Ditto.
25732 (doc/invoke.texi): Document new aes and sha2 options.
25734 2018-01-10 Martin Sebor <msebor@redhat.com>
25736 PR tree-optimization/83781
25737 * gimple-fold.c (get_range_strlen): Avoid treating arrays of pointers
25740 2018-01-11 Martin Sebor <msebor@gmail.com>
25741 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
25743 PR tree-optimization/83501
25744 PR tree-optimization/81703
25746 * tree-ssa-strlen.c (get_string_cst): Rename...
25747 (get_string_len): ...to this. Handle global constants.
25748 (handle_char_store): Adjust.
25750 2018-01-10 Kito Cheng <kito.cheng@gmail.com>
25751 Jim Wilson <jimw@sifive.com>
25753 * config/riscv/riscv-protos.h (riscv_output_return): New.
25754 * config/riscv/riscv.c (struct machine_function): New naked_p field.
25755 (riscv_attribute_table, riscv_output_return),
25756 (riscv_handle_fndecl_attribute, riscv_naked_function_p),
25757 (riscv_allocate_stack_slots_for_args, riscv_warn_func_return): New.
25758 (riscv_compute_frame_info): Only compute frame->mask if not a naked
25760 (riscv_expand_prologue): Add early return for naked function.
25761 (riscv_expand_epilogue): Likewise.
25762 (riscv_function_ok_for_sibcall): Return false for naked function.
25763 (riscv_set_current_function): New.
25764 (TARGET_SET_CURRENT_FUNCTION, TARGET_ALLOCATE_STACK_SLOTS_FOR_ARGS),
25765 (TARGET_ATTRIBUTE_TABLE, TARGET_WARN_FUNC_RETURN): New.
25766 * config/riscv/riscv.md (simple_return): Call riscv_output_return.
25767 * doc/extend.texi (RISC-V Function Attributes): New.
25769 2018-01-10 Michael Meissner <meissner@linux.vnet.ibm.com>
25771 * config/rs6000/rs6000.c (is_complex_IBM_long_double): Explicitly
25772 check for 128-bit long double before checking TCmode.
25773 * config/rs6000/rs6000.h (FLOAT128_IEEE_P): Explicitly check for
25774 128-bit long doubles before checking TFmode or TCmode.
25775 (FLOAT128_IBM_P): Likewise.
25777 2018-01-10 Martin Sebor <msebor@redhat.com>
25779 PR tree-optimization/83671
25780 * builtins.c (c_strlen): Unconditionally return zero for the empty
25782 Use -Warray-bounds for warnings.
25783 * gimple-fold.c (get_range_strlen): Handle non-constant lengths
25784 for non-constant array indices with COMPONENT_REF, arrays of
25785 arrays, and pointers to arrays.
25786 (gimple_fold_builtin_strlen): Determine and set length range for
25787 non-constant character arrays.
25789 2018-01-10 Aldy Hernandez <aldyh@redhat.com>
25791 PR middle-end/81897
25792 * tree-ssa-uninit.c (convert_control_dep_chain_into_preds): Skip
25795 2018-01-10 Eric Botcazou <ebotcazou@adacore.com>
25797 * dwarf2out.c (dwarf2out_var_location): Do not pass NULL to fprintf.
25799 2018-01-10 Peter Bergner <bergner@vnet.ibm.com>
25802 * config/rs6000/rs6000.c (print_operand) <'y'>: Use
25803 VECTOR_MEM_ALTIVEC_OR_VSX_P.
25804 * config/rs6000/vsx.md (*vsx_le_perm_load_<mode> for VSX_D): Use
25805 indexed_or_indirect_operand predicate.
25806 (*vsx_le_perm_load_<mode> for VSX_W): Likewise.
25807 (*vsx_le_perm_load_v8hi): Likewise.
25808 (*vsx_le_perm_load_v16qi): Likewise.
25809 (*vsx_le_perm_store_<mode> for VSX_D): Likewise.
25810 (*vsx_le_perm_store_<mode> for VSX_W): Likewise.
25811 (*vsx_le_perm_store_v8hi): Likewise.
25812 (*vsx_le_perm_store_v16qi): Likewise.
25813 (eight unnamed splitters): Likewise.
25815 2018-01-10 Peter Bergner <bergner@vnet.ibm.com>
25817 * config/rs6000/x86intrin.h: Change #warning to #error. Update message.
25818 * config/rs6000/emmintrin.h: Likewise.
25819 * config/rs6000/mmintrin.h: Likewise.
25820 * config/rs6000/xmmintrin.h: Likewise.
25822 2018-01-10 David Malcolm <dmalcolm@redhat.com>
25825 * tree-core.h: Document EXPR_LOCATION_WRAPPER_P's usage of
25827 * tree.c (tree_nop_conversion): Return true for location wrapper
25829 (maybe_wrap_with_location): New function.
25830 (selftest::check_strip_nops): New function.
25831 (selftest::test_location_wrappers): New function.
25832 (selftest::tree_c_tests): Call it.
25833 * tree.h (STRIP_ANY_LOCATION_WRAPPER): New macro.
25834 (maybe_wrap_with_location): New decl.
25835 (EXPR_LOCATION_WRAPPER_P): New macro.
25836 (location_wrapper_p): New inline function.
25837 (tree_strip_any_location_wrapper): New inline function.
25839 2018-01-10 H.J. Lu <hongjiu.lu@intel.com>
25842 * config/i386/i386.c (ix86_compute_frame_layout): Always adjust
25843 stack_realign_offset for the largest alignment of stack slot
25845 (ix86_find_max_used_stack_alignment): New function.
25846 (ix86_finalize_stack_frame_flags): Use it. Set
25847 max_used_stack_alignment if we don't realign stack.
25848 * config/i386/i386.h (machine_function): Add
25849 max_used_stack_alignment.
25851 2018-01-10 Christophe Lyon <christophe.lyon@linaro.org>
25853 * config/arm/arm.opt (-mbranch-cost): New option.
25854 * config/arm/arm.h (BRANCH_COST): Take arm_branch_cost into
25857 2018-01-10 Segher Boessenkool <segher@kernel.crashing.org>
25860 * config/rs6000/rs6000.md (load_toc_v4_PIC_2, load_toc_v4_PIC_3b,
25861 load_toc_v4_PIC_3c): Wrap const term in CONST RTL.
25863 2018-01-10 Richard Biener <rguenther@suse.de>
25866 * dwarf2out.c (gen_subprogram_die): Hoist old_die && declaration
25867 early out so it also covers the case where we have a non-NULL
25870 2018-01-10 Richard Sandiford <richard.sandiford@linaro.org>
25872 PR tree-optimization/83753
25873 * tree-vect-stmts.c (get_group_load_store_type): Use VMAT_CONTIGUOUS
25874 for non-strided grouped accesses if the number of elements is 1.
25876 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
25879 * i386.c (ix86_vectorize_builtin_gather): Check TARGET_USE_GATHER.
25880 * i386.h (TARGET_USE_GATHER): Define.
25881 * x86-tune.def (X86_TUNE_USE_GATHER): New.
25883 2018-01-10 Martin Liska <mliska@suse.cz>
25886 * basic-block.h (CLEANUP_NO_PARTITIONING): New define.
25887 * bb-reorder.c (pass_reorder_blocks::execute): Do not clean up
25889 * cfgcleanup.c (try_optimize_cfg): Fix up partitioning if
25890 CLEANUP_NO_PARTITIONING is not set.
25892 2018-01-10 Richard Sandiford <richard.sandiford@linaro.org>
25894 * doc/rtl.texi: Remove documentation of (const ...) wrappers
25895 for vectors, as a partial revert of r254296.
25896 * rtl.h (const_vec_p): Delete.
25897 (const_vec_duplicate_p): Don't test for vector CONSTs.
25898 (unwrap_const_vec_duplicate, const_vec_series_p): Likewise.
25899 * expmed.c (make_tree): Likewise.
25902 * common.md (E, F): Use CONSTANT_P instead of checking for
25904 * emit-rtl.c (gen_lowpart_common): Use const_vec_p instead of
25905 checking for CONST_VECTOR.
25907 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
25909 PR middle-end/83575
25910 * predict.c (force_edge_cold): Handle in more sane way edges
25911 with no prediction.
25913 2018-01-09 Carl Love <cel@us.ibm.com>
25915 * config/rs6002/altivec.md (p8_vmrgow): Add support for V2DI, V2DF,
25917 (p8_vmrgew): Add support for V2DI, V2DF, V4SF types.
25918 * config/rs6000/rs6000-builtin.def: Add definitions for FLOAT2_V2DF,
25919 VMRGEW_V2DI, VMRGEW_V2DF, VMRGEW_V4SF, VMRGOW_V4SI, VMRGOW_V4SF,
25920 VMRGOW_V2DI, VMRGOW_V2DF. Remove definition for VMRGOW.
25921 * config/rs6000/rs6000-c.c (VSX_BUILTIN_VEC_FLOAT2,
25922 P8V_BUILTIN_VEC_VMRGEW, P8V_BUILTIN_VEC_VMRGOW): Add definitions.
25923 * config/rs6000/rs6000-protos.h: Add extern defition for
25924 rs6000_generate_float2_double_code.
25925 * config/rs6000/rs6000.c (rs6000_generate_float2_double_code): Add
25927 * config/rs6000/vsx.md (vsx_xvcdpsp): Add define_insn.
25928 (float2_v2df): Add define_expand.
25930 2018-01-09 Uros Bizjak <ubizjak@gmail.com>
25933 * combine.c (force_int_to_mode) <case ASHIFT>: Use mode instead of
25934 op_mode in the force_to_mode call.
25936 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
25938 * config/aarch64/aarch64.c (aarch64_evpc_trn): Use d.perm.series_p
25939 instead of checking each element individually.
25940 (aarch64_evpc_uzp): Likewise.
25941 (aarch64_evpc_zip): Likewise.
25942 (aarch64_evpc_ext): Likewise.
25943 (aarch64_evpc_rev): Likewise.
25944 (aarch64_evpc_dup): Test the encoding for a single duplicated element,
25945 instead of checking each element individually. Return true without
25947 (aarch64_vectorize_vec_perm_const): Use all_from_input_p to test
25948 whether all selected elements come from the same input, instead of
25949 checking each element individually. Remove calls to gen_rtx_REG,
25950 start_sequence and end_sequence and instead assert that no rtl is
25953 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
25955 * config/aarch64/aarch64.c (aarch64_legitimate_constant_p): Fix
25956 order of HIGH and CONST checks.
25958 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
25960 * tree-vect-stmts.c (permute_vec_elements): Create a fresh variable
25961 if the destination isn't an SSA_NAME.
25963 2018-01-09 Richard Biener <rguenther@suse.de>
25965 PR tree-optimization/83668
25966 * graphite.c (canonicalize_loop_closed_ssa): Add edge argument,
25968 (canonicalize_loop_form): ... here, renamed from ...
25969 (canonicalize_loop_closed_ssa_form): ... this and amended to
25970 swap successor edges for loop exit blocks to make us use
25971 the RPO order we need for initial schedule generation.
25973 2018-01-09 Joseph Myers <joseph@codesourcery.com>
25975 PR tree-optimization/64811
25976 * match.pd: When optimizing comparisons with Inf, avoid
25977 introducing or losing exceptions from comparisons with NaN.
25979 2018-01-09 Martin Liska <mliska@suse.cz>
25982 * asan.c (shadow_mem_size): Add gcc_assert.
25984 2018-01-09 Georg-Johann Lay <avr@gjlay.de>
25986 Don't save registers in main().
25989 * doc/invoke.texi (AVR Options) [-mmain-is-OS_task]: Document it.
25990 * config/avr/avr.opt (-mmain-is-OS_task): New target option.
25991 * config/avr/avr.c (avr_set_current_function): Don't error if
25992 naked, OS_task or OS_main are specified at the same time.
25993 (avr_function_ok_for_sibcall): Don't disable sibcalls for OS_task,
25995 (avr_insert_attributes) [-mmain-is-OS_task] <main>: Add OS_task
25997 * common/config/avr/avr-common.c (avr_option_optimization_table):
25998 Switch on -mmain-is-OS_task for optimizing compilations.
26000 2018-01-09 Richard Biener <rguenther@suse.de>
26002 PR tree-optimization/83572
26003 * graphite.c: Include cfganal.h.
26004 (graphite_transform_loops): Connect infinite loops to exit
26005 and remove fake edges at the end.
26007 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
26009 * ipa-inline.c (edge_badness): Revert accidental checkin.
26011 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
26014 * ipa-comdats.c (set_comdat_group): Only set comdat group of real
26015 symbols; not inline clones.
26017 2018-01-09 Jakub Jelinek <jakub@redhat.com>
26020 * modulo-sched.c (schedule_reg_moves): Punt if we'd need to move
26021 hard registers. Formatting fixes.
26023 PR preprocessor/83722
26024 * gcc.c (try_generate_repro): Pass
26025 &temp_stderr_files[RETRY_ICE_ATTEMPTS - 1] rather than
26026 &temp_stdout_files[RETRY_ICE_ATTEMPTS - 1] as last argument to
26029 2018-01-08 Monk Chiang <sh.chiang04@gmail.com>
26030 Kito Cheng <kito.cheng@gmail.com>
26032 * config/riscv/riscv.c (machine_function::is_leaf): Remove field.
26033 (riscv_leaf_function_p): Delete.
26034 (riscv_function_ok_for_sibcall): Return false when TARGET_SAVE_RESTORE.
26036 2018-01-08 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
26038 * config/rs6000/rs6000-string.c (do_load_for_compare_from_addr): New
26040 (do_ifelse): New function.
26041 (do_isel): New function.
26042 (do_sub3): New function.
26043 (do_add3): New function.
26044 (do_load_mask_compare): New function.
26045 (do_overlap_load_compare): New function.
26046 (expand_compare_loop): New function.
26047 (expand_block_compare): Call expand_compare_loop() when appropriate.
26048 * config/rs6000/rs6000.opt (-mblock-compare-inline-limit): Change
26049 option description.
26050 (-mblock-compare-inline-loop-limit): New option.
26052 2018-01-08 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
26055 * config/rs6000/altivec.md (*altivec_vpermr_<mode>_internal):
26056 Reverse order of second and third operands in first alternative.
26057 * config/rs6000/rs6000.c (rs6000_expand_vector_set): Reverse order
26058 of first and second elements in UNSPEC_VPERMR vector.
26059 (altivec_expand_vec_perm_le): Likewise.
26061 2018-01-08 Jeff Law <law@redhat.com>
26063 PR rtl-optimizatin/81308
26064 * tree-switch-conversion.c (cfg_altered): New file scoped static.
26065 (process_switch): If group_case_labels makes a change, then set
26067 (pass_convert_switch::execute): If a switch is converted, then
26068 set cfg_altered. Return TODO_cfg_cleanup if cfg_altered is true.
26070 PR rtl-optimization/81308
26071 * recog.c (split_all_insns): Conditionally cleanup the CFG after
26074 2018-01-08 Vidya Praveen <vidyapraveen@arm.com>
26076 PR target/83663 - Revert r255946
26077 * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify code
26078 generation for cases where splatting a value is not useful.
26079 * simplify-rtx.c (simplify_ternary_operation): Simplify vec_merge
26080 across a vec_duplicate and a paradoxical subreg forming a vector
26081 mode to a vec_concat.
26083 2018-01-08 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
26085 * config/arm/t-aprofile (MULTILIB_MATCHES): Add mapping rules for
26086 -march=armv8.3-a variants.
26087 * config/arm/t-multilib: Likewise.
26088 * config/arm/t-arm-elf: Likewise. Handle dotprod extension.
26090 2018-01-08 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
26092 * config/rs6000/rs6000.md (cceq_ior_compare): Remove * so I can use it
26094 (cceq_ior_compare_complement): Give it a name so I can use it, and
26095 change boolean_or_operator predicate to boolean_operator so it can
26096 be used to generate a crand.
26097 (eqne): New code iterator.
26098 (bd/bd_neg): New code_attrs.
26099 (<bd>_<mode>): New name for ctr<mode>_internal[12] now combined into
26100 a single define_insn.
26101 (<bd>tf_<mode>): A new insn pattern for the conditional form branch
26102 decrement (bdnzt/bdnzf/bdzt/bdzf).
26103 * config/rs6000/rs6000.c (rs6000_legitimate_combined_insn): Updated
26104 with the new names of the branch decrement patterns, and added the
26105 names of the branch decrement conditional patterns.
26107 2018-01-08 Richard Biener <rguenther@suse.de>
26109 PR tree-optimization/83563
26110 * graphite.c (canonicalize_loop_closed_ssa_form): Reset the SCEV
26113 2018-01-08 Richard Biener <rguenther@suse.de>
26115 PR middle-end/83713
26116 * convert.c (do_narrow): Properly guard TYPE_OVERFLOW_WRAPS checks.
26118 2018-01-08 Richard Biener <rguenther@suse.de>
26120 PR tree-optimization/83685
26121 * tree-ssa-pre.c (create_expression_by_pieces): Do not insert
26122 references to abnormals.
26124 2018-01-08 Richard Biener <rguenther@suse.de>
26127 * dwarf2out.c (output_indirect_strings): Handle empty
26128 skeleton_debug_str_hash.
26129 (dwarf2out_early_finish): Index strings for -gsplit-dwarf.
26131 2018-01-08 Claudiu Zissulescu <claziss@synopsys.com>
26133 * config/arc/arc.c (TARGET_TRAMPOLINE_ADJUST_ADDRESS): Delete.
26134 (emit_store_direct): Likewise.
26135 (arc_trampoline_adjust_address): Likewise.
26136 (arc_asm_trampoline_template): New function.
26137 (arc_initialize_trampoline): Use asm_trampoline_template.
26138 (TARGET_ASM_TRAMPOLINE_TEMPLATE): Define.
26139 * config/arc/arc.h (TRAMPOLINE_SIZE): Adjust to 16.
26140 * config/arc/arc.md (flush_icache): Delete pattern.
26142 2018-01-08 Claudiu Zissulescu <claziss@synopsys.com>
26144 * config/arc/arc-c.def (__ARC_UNALIGNED__): New define.
26145 * config/arc/arc.h (STRICT_ALIGNMENT): Control this macro using
26148 2018-01-08 Sebastian Huber <sebastian.huber@embedded-brains.de>
26151 * config/epiphany/epiphany.h (make_pass_mode_switch_use): Guard
26152 by not USED_FOR_TARGET.
26153 (make_pass_resolve_sw_modes): Likewise.
26155 2018-01-08 Sebastian Huber <sebastian.huber@embedded-brains.de>
26157 * config/nios2/nios2.h (nios2_section_threshold): Guard by not
26160 2018-01-08 Richard Biener <rguenther@suse.de>
26162 PR middle-end/83580
26163 * tree-data-ref.c (split_constant_offset): Remove STRIP_NOPS.
26165 2018-01-08 Richard Biener <rguenther@suse.de>
26167 PR middle-end/83517
26168 * match.pd ((t * 2) / 2) -> t): Add missing :c.
26170 2018-01-06 Aldy Hernandez <aldyh@redhat.com>
26172 PR middle-end/81897
26173 * tree-ssa-uninit.c (compute_control_dep_chain): Do not bail on
26174 basic blocks with a small number of successors.
26175 (convert_control_dep_chain_into_preds): Improve handling of
26177 (dump_predicates): Split apart into...
26178 (dump_pred_chain): ...here...
26179 (dump_pred_info): ...and here.
26180 (can_one_predicate_be_invalidated_p): Add debugging printfs.
26181 (can_chain_union_be_invalidated_p): Improve check for invalidation
26183 (uninit_uses_cannot_happen): Avoid unnecessary if
26184 convert_control_dep_chain_into_preds yielded nothing.
26186 2018-01-06 Martin Sebor <msebor@redhat.com>
26188 PR tree-optimization/83640
26189 * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Avoid
26190 subtracting negative offset from size.
26191 (builtin_access::overlap): Adjust offset bounds of the access to fall
26192 within the size of the object if possible.
26194 2018-01-06 Richard Sandiford <richard.sandiford@linaro.org>
26196 PR rtl-optimization/83699
26197 * expmed.c (extract_bit_field_1): Restrict the vector usage of
26198 extract_bit_field_as_subreg to cases in which the extracted
26199 value is also a vector.
26201 * lra-constraints.c (process_alt_operands): Test for the equivalence
26202 substitutions when detecting a possible reload cycle.
26204 2018-01-06 Jakub Jelinek <jakub@redhat.com>
26207 * toplev.c (process_options): Don't enable debug_nonbind_markers_p
26208 by default if flag_selective_schedling{,2}. Formatting fixes.
26210 PR rtl-optimization/83682
26211 * rtl.h (const_vec_duplicate_p): Only return true for VEC_DUPLICATE
26212 if it has non-VECTOR_MODE element mode.
26213 (vec_duplicate_p): Likewise.
26215 PR middle-end/83694
26216 * cfgexpand.c (expand_debug_expr): Punt if mode1 is VOIDmode
26217 and bitsize might be greater than MAX_BITSIZE_MODE_ANY_INT.
26219 2018-01-05 Jakub Jelinek <jakub@redhat.com>
26222 * config/i386/i386-builtin.def
26223 (__builtin_ia32_vgf2p8affineinvqb_v64qi,
26224 __builtin_ia32_vgf2p8affineqb_v64qi, __builtin_ia32_vgf2p8mulb_v64qi):
26225 Require also OPTION_MASK_ISA_AVX512F in addition to
26226 OPTION_MASK_ISA_GFNI.
26227 (__builtin_ia32_vgf2p8affineinvqb_v16qi_mask,
26228 __builtin_ia32_vgf2p8affineqb_v16qi_mask): Require
26229 OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_SSE in addition
26230 to OPTION_MASK_ISA_GFNI.
26231 (__builtin_ia32_vgf2p8mulb_v32qi_mask): Require
26232 OPTION_MASK_ISA_AVX512VL in addition to OPTION_MASK_ISA_GFNI and
26233 OPTION_MASK_ISA_AVX512BW.
26234 (__builtin_ia32_vgf2p8mulb_v16qi_mask): Require
26235 OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_AVX512BW in
26236 addition to OPTION_MASK_ISA_GFNI.
26237 (__builtin_ia32_vgf2p8affineinvqb_v16qi,
26238 __builtin_ia32_vgf2p8affineqb_v16qi, __builtin_ia32_vgf2p8mulb_v16qi):
26239 Require OPTION_MASK_ISA_SSE2 instead of OPTION_MASK_ISA_SSE in addition
26240 to OPTION_MASK_ISA_GFNI.
26241 * config/i386/i386.c (def_builtin): Change to builtin isa/isa2 being
26242 a requirement for all ISAs rather than any of them with a few
26244 (ix86_add_new_builtins): Clear OPTION_MASK_ISA_64BIT from isa before
26246 (ix86_expand_builtin): Require all ISAs from builtin's isa and isa2
26247 bitmasks to be enabled with 3 exceptions, instead of requiring any
26248 enabled ISA with lots of exceptions.
26249 * config/i386/sse.md (vgf2p8affineinvqb_<mode><mask_name>,
26250 vgf2p8affineqb_<mode><mask_name>, vgf2p8mulb_<mode><mask_name>):
26251 Change avx512bw in isa attribute to avx512f.
26252 * config/i386/sgxintrin.h: Add license boilerplate.
26253 * config/i386/vaesintrin.h: Likewise. Fix macro spelling __AVX512F
26254 to __AVX512F__ and __AVX512VL to __AVX512VL__.
26255 (_mm256_aesdec_epi128, _mm256_aesdeclast_epi128, _mm256_aesenc_epi128,
26256 _mm256_aesenclast_epi128): Enable temporarily avx if __AVX__ is not
26258 * config/i386/gfniintrin.h (_mm_gf2p8mul_epi8,
26259 _mm_gf2p8affineinv_epi64_epi8, _mm_gf2p8affine_epi64_epi8): Enable
26260 temporarily sse2 rather than sse if not enabled already.
26263 * config/i386/sse.md (VI248_VLBW): Rename to ...
26264 (VI248_AVX512VL): ... this. Don't guard V32HI with TARGET_AVX512BW.
26265 (vpshrd_<mode><mask_name>, vpshld_<mode><mask_name>,
26266 vpshrdv_<mode>, vpshrdv_<mode>_mask, vpshrdv_<mode>_maskz,
26267 vpshrdv_<mode>_maskz_1, vpshldv_<mode>, vpshldv_<mode>_mask,
26268 vpshldv_<mode>_maskz, vpshldv_<mode>_maskz_1): Use VI248_AVX512VL
26269 mode iterator instead of VI248_VLBW.
26271 2018-01-05 Jan Hubicka <hubicka@ucw.cz>
26273 * ipa-fnsummary.c (record_modified_bb_info): Add OP.
26274 (record_modified): Skip clobbers; add debug output.
26275 (param_change_prob): Use sreal frequencies.
26277 2018-01-05 Richard Sandiford <richard.sandiford@linaro.org>
26279 * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Don't
26280 punt for user-aligned variables.
26282 2018-01-05 Richard Sandiford <richard.sandiford@linaro.org>
26284 * tree-chrec.c (chrec_contains_symbols): Return true for
26287 2018-01-05 Sudakshina Das <sudi.das@arm.com>
26290 * simplify-rtx.c (simplify_relational_operation_1): Add simplifications
26291 of (x|y) == x for BICS pattern.
26293 2018-01-05 Jakub Jelinek <jakub@redhat.com>
26295 PR tree-optimization/83605
26296 * gimple-ssa-strength-reduction.c: Include tree-eh.h.
26297 (find_candidates_dom_walker::before_dom_children): Ignore stmts that
26300 2018-01-05 Sebastian Huber <sebastian.huber@embedded-brains.de>
26302 * config.gcc (epiphany-*-elf*): Add (epiphany-*-rtems*) configuration.
26303 * config/epiphany/rtems.h: New file.
26305 2018-01-04 Jakub Jelinek <jakub@redhat.com>
26306 Uros Bizjak <ubizjak@gmail.com>
26309 * config/i386/i386.md (*<rotate_insn>hi3_1 splitter): Use
26310 QIreg_operand instead of register_operand predicate.
26311 * config/i386/i386.c (ix86_rop_should_change_byte_p,
26312 set_rop_modrm_reg_bits, ix86_mitigate_rop): Use -mmitigate-rop in
26313 comments instead of -fmitigate[-_]rop.
26315 2018-01-04 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
26318 * cgraphunit.c (symbol_table::compile): Switch to text_section
26319 before calling assembly_start debug hook.
26320 * run-rtl-passes.c (run_rtl_passes): Likewise.
26323 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
26325 * tree-vrp.c (extract_range_from_binary_expr_1): Check
26326 range_int_cst_p rather than !symbolic_range_p before calling
26327 extract_range_from_multiplicative_op_1.
26329 2018-01-04 Jeff Law <law@redhat.com>
26331 * tree-ssa-math-opts.c (execute_cse_reciprocals_1): Remove
26332 redundant test in assertion.
26334 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
26336 * doc/rtl.texi: Document machine_mode wrapper classes.
26338 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
26340 * fold-const.c (fold_ternary_loc): Check tree_fits_uhwi_p before
26341 using tree_to_uhwi.
26343 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
26345 * tree-ssa-forwprop.c (is_combined_permutation_identity): Allow
26346 the VEC_PERM_EXPR fold to fail.
26348 2018-01-04 Jakub Jelinek <jakub@redhat.com>
26351 * bb-reorder.c (insert_section_boundary_note): Set has_bb_partition
26352 to switched_sections.
26354 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
26357 * config/arm/arm.c (arm_vectorize_vec_perm_const): Fix inverted
26358 test for d.testing.
26360 2018-01-04 Peter Bergner <bergner@vnet.ibm.com>
26363 * config/rs6000/rs6000.c (rs6000_discover_homogeneous_aggregate): Do not
26364 allow arguments in FP registers if TARGET_HARD_FLOAT is false.
26366 2018-01-04 Jakub Jelinek <jakub@redhat.com>
26369 * cfgexpand.c (expand_debug_expr) <case BIT_FIELD_REF>: Punt if mode
26370 is BLKmode and bitpos not zero or mode change is needed.
26372 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
26375 * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): Require
26378 2018-01-04 Uros Bizjak <ubizjak@gmail.com>
26381 * config/alpha/alpha.md (*sadd<modesuffix>): Use ASHIFT
26382 instead of MULT rtx. Update all corresponding splitters.
26383 (*saddl_se): Ditto.
26384 (*ssub<modesuffix>): Ditto.
26385 (*ssubl_se): Ditto.
26386 (*cmp_sadd_di): Update split patterns.
26387 (*cmp_sadd_si): Ditto.
26388 (*cmp_sadd_sidi): Ditto.
26389 (*cmp_ssub_di): Ditto.
26390 (*cmp_ssub_si): Ditto.
26391 (*cmp_ssub_sidi): Ditto.
26392 * config/alpha/predicates.md (const23_operand): New predicate.
26393 * config/alpha/alpha.c (alpha_rtx_costs) [PLUS, MINUS]:
26394 Look for ASHIFT, not MULT inner operand.
26395 (alpha_split_conditional_move): Update for *sadd<modesuffix> change.
26397 2018-01-04 Martin Liska <mliska@suse.cz>
26399 PR gcov-profile/83669
26400 * gcov.c (output_intermediate_file): Add version to intermediate
26402 * doc/gcov.texi: Document new field 'version' in intermediate
26403 file format. Fix location of '-k' option of gcov command.
26405 2018-01-04 Martin Liska <mliska@suse.cz>
26408 * ipa-icf.c (sem_function::merge): Do not cross comdat boundary.
26410 2018-01-04 Jakub Jelinek <jakub@redhat.com>
26412 * gimple-ssa-sprintf.c (parse_directive): Cast second dir.len to uhwi.
26414 2018-01-03 Martin Sebor <msebor@redhat.com>
26416 PR tree-optimization/83655
26417 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call): Avoid
26418 checking calls with invalid arguments.
26420 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
26422 * tree-vect-stmts.c (vect_get_store_rhs): New function.
26423 (vectorizable_mask_load_store): Delete.
26424 (vectorizable_call): Return false for masked loads and stores.
26425 (vectorizable_store): Handle IFN_MASK_STORE. Use vect_get_store_rhs
26426 instead of gimple_assign_rhs1.
26427 (vectorizable_load): Handle IFN_MASK_LOAD.
26428 (vect_transform_stmt): Don't set is_store for call_vec_info_type.
26430 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
26432 * tree-vect-stmts.c (vect_build_gather_load_calls): New function,
26434 (vectorizable_mask_load_store): ...here.
26435 (vectorizable_load): ...and here.
26437 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
26439 * tree-vect-stmts.c (vect_build_all_ones_mask)
26440 (vect_build_zero_merge_argument): New functions, split out from...
26441 (vectorizable_load): ...here.
26443 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
26445 * tree-vect-stmts.c (vect_check_store_rhs): New function,
26447 (vectorizable_mask_load_store): ...here.
26448 (vectorizable_store): ...and here.
26450 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
26452 * tree-vect-stmts.c (vect_check_load_store_mask): New function,
26454 (vectorizable_mask_load_store): ...here.
26456 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
26458 * tree-vectorizer.h (vec_load_store_type): Moved from tree-vec-stmts.c
26459 (vect_model_store_cost): Take a vec_load_store_type instead of a
26461 * tree-vect-stmts.c (vec_load_store_type): Move to tree-vectorizer.h.
26462 (vect_model_store_cost): Take a vec_load_store_type instead of a
26464 (vectorizable_mask_load_store): Update accordingly.
26465 (vectorizable_store): Likewise.
26466 * tree-vect-slp.c (vect_analyze_slp_cost_1): Update accordingly.
26468 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
26470 * tree-vect-loop.c (vect_transform_loop): Stub out scalar
26471 IFN_MASK_LOAD calls here rather than...
26472 * tree-vect-stmts.c (vectorizable_mask_load_store): ...here.
26474 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
26475 Alan Hayward <alan.hayward@arm.com>
26476 David Sherwood <david.sherwood@arm.com>
26478 * expmed.c (extract_bit_field_1): For vector extracts,
26479 fall back to extract_bit_field_as_subreg if vec_extract
26482 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
26483 Alan Hayward <alan.hayward@arm.com>
26484 David Sherwood <david.sherwood@arm.com>
26486 * lra-spills.c (pseudo_reg_slot_compare): Sort slots by whether
26487 they are variable or constant sized.
26488 (assign_stack_slot_num_and_sort_pseudos): Don't reuse variable-sized
26489 slots for constant-sized data.
26491 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
26492 Alan Hayward <alan.hayward@arm.com>
26493 David Sherwood <david.sherwood@arm.com>
26495 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): When
26496 handling COND_EXPRs with boolean comparisons, try to find a better
26497 basis for the mask type than the boolean itself.
26499 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
26501 * doc/rtl.texi (MAX_BITSIZE_MODE_ANY_MODE): Describe how the default
26502 is calculated and how it can be overridden.
26503 * genmodes.c (max_bitsize_mode_any_mode): New variable.
26504 (create_modes): Initialize it from MAX_BITSIZE_MODE_ANY_MODE,
26506 (emit_max_int): Use it to set the output MAX_BITSIZE_MODE_ANY_MODE,
26509 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
26510 Alan Hayward <alan.hayward@arm.com>
26511 David Sherwood <david.sherwood@arm.com>
26513 * config/aarch64/aarch64-protos.h (aarch64_output_simd_mov_immediate):
26514 Remove the mode argument.
26515 (aarch64_simd_valid_immediate): Remove the mode and inverse
26517 * config/aarch64/iterators.md (bitsize): New iterator.
26518 * config/aarch64/aarch64-simd.md (*aarch64_simd_mov<mode>, and<mode>3)
26519 (ior<mode>3): Update calls to aarch64_output_simd_mov_immediate.
26520 * config/aarch64/constraints.md (Do, Db, Dn): Update calls to
26521 aarch64_simd_valid_immediate.
26522 * config/aarch64/predicates.md (aarch64_reg_or_orr_imm): Likewise.
26523 (aarch64_reg_or_bic_imm): Likewise.
26524 * config/aarch64/aarch64.c (simd_immediate_info): Replace mvn
26525 with an insn_type enum and msl with a modifier_type enum.
26526 Replace element_width with a scalar_mode. Change the shift
26527 to unsigned int. Add constructors for scalar_float_mode and
26528 scalar_int_mode elements.
26529 (aarch64_vect_float_const_representable_p): Delete.
26530 (aarch64_can_const_movi_rtx_p)
26531 (aarch64_simd_scalar_immediate_valid_for_move)
26532 (aarch64_simd_make_constant): Update call to
26533 aarch64_simd_valid_immediate.
26534 (aarch64_advsimd_valid_immediate_hs): New function.
26535 (aarch64_advsimd_valid_immediate): Likewise.
26536 (aarch64_simd_valid_immediate): Remove mode and inverse
26537 arguments. Rewrite to use the above. Use const_vec_duplicate_p
26538 to detect duplicated constants and use aarch64_float_const_zero_rtx_p
26539 and aarch64_float_const_representable_p on the result.
26540 (aarch64_output_simd_mov_immediate): Remove mode argument.
26541 Update call to aarch64_simd_valid_immediate and use of
26542 simd_immediate_info.
26543 (aarch64_output_scalar_simd_mov_immediate): Update call
26546 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
26547 Alan Hayward <alan.hayward@arm.com>
26548 David Sherwood <david.sherwood@arm.com>
26550 * machmode.h (mode_precision): Prefix with CONST_MODE_PRECISION.
26551 (mode_nunits): Likewise CONST_MODE_NUNITS.
26552 * machmode.def (ADJUST_NUNITS): Document.
26553 * genmodes.c (mode_data::need_nunits_adj): New field.
26554 (blank_mode): Update accordingly.
26555 (adj_nunits): New variable.
26556 (print_maybe_const_decl): Replace CATEGORY with a NEEDS_ADJ
26558 (emit_mode_size_inline): Set need_bytesize_adj for all modes
26559 listed in adj_nunits.
26560 (emit_mode_nunits_inline): Set need_nunits_adj for all modes
26561 listed in adj_nunits. Don't emit case statements for such modes.
26562 (emit_insn_modes_h): Emit definitions of CONST_MODE_NUNITS
26563 and CONST_MODE_PRECISION. Make CONST_MODE_SIZE expand to
26564 nothing if adj_nunits is nonnull.
26565 (emit_mode_precision, emit_mode_nunits): Use print_maybe_const_decl.
26566 (emit_mode_unit_size, emit_mode_base_align, emit_mode_ibit)
26567 (emit_mode_fbit): Update use of print_maybe_const_decl.
26568 (emit_move_size): Likewise. Treat the array as non-const
26570 (emit_mode_adjustments): Handle adj_nunits.
26572 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
26574 * machmode.def (VECTOR_MODES_WITH_PREFIX): Document.
26575 * genmodes.c (VECTOR_MODES_WITH_PREFIX): New macro.
26576 (VECTOR_MODES): Use it.
26577 (make_vector_modes): Take the prefix as an argument.
26579 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
26580 Alan Hayward <alan.hayward@arm.com>
26581 David Sherwood <david.sherwood@arm.com>
26583 * mode-classes.def (MODE_VECTOR_BOOL): New mode class.
26584 * machmode.h (INTEGRAL_MODE_P, VECTOR_MODE_P): Return true
26585 for MODE_VECTOR_BOOL.
26586 * machmode.def (VECTOR_BOOL_MODE): Document.
26587 * genmodes.c (VECTOR_BOOL_MODE): New macro.
26588 (make_vector_bool_mode): New function.
26589 (complete_mode, emit_mode_wider, emit_mode_adjustments): Handle
26591 * lto-streamer-in.c (lto_input_mode_table): Likewise.
26592 * rtx-vector-builder.c (rtx_vector_builder::find_cached_value):
26594 * stor-layout.c (int_mode_for_mode): Likewise.
26595 * tree.c (build_vector_type_for_mode): Likewise.
26596 * varasm.c (output_constant_pool_2): Likewise.
26597 * emit-rtl.c (init_emit_once): Make sure that CONST1_RTX (BImode) and
26598 CONSTM1_RTX (BImode) are the same thing. Initialize const_tiny_rtx
26599 for MODE_VECTOR_BOOL.
26600 * expr.c (expand_expr_real_1): Use VECTOR_MODE_P instead of a list
26601 of mode class checks.
26602 * tree-vect-generic.c (expand_vector_operation): Use VECTOR_MODE_P
26603 instead of a list of mode class checks.
26604 (expand_vector_scalar_condition): Likewise.
26605 (type_for_widest_vector_mode): Handle BImode as an inner mode.
26607 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
26608 Alan Hayward <alan.hayward@arm.com>
26609 David Sherwood <david.sherwood@arm.com>
26611 * machmode.h (mode_size): Change from unsigned short to
26613 (mode_to_bytes): Return a poly_uint16 rather than an unsigned short.
26614 (GET_MODE_SIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
26615 or if measurement_type is not polynomial.
26616 (fixed_size_mode::includes_p): Check for constant-sized modes.
26617 * genmodes.c (emit_mode_size_inline): Make mode_size_inline
26618 return a poly_uint16 rather than an unsigned short.
26619 (emit_mode_size): Change the type of mode_size from unsigned short
26620 to poly_uint16_pod. Use ZERO_COEFFS for the initializer.
26621 (emit_mode_adjustments): Cope with polynomial vector sizes.
26622 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
26624 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
26626 * auto-inc-dec.c (try_merge): Treat GET_MODE_SIZE as polynomial.
26627 * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Likewise.
26628 * caller-save.c (setup_save_areas): Likewise.
26629 (replace_reg_with_saved_mem): Likewise.
26630 * calls.c (emit_library_call_value_1): Likewise.
26631 * combine-stack-adj.c (combine_stack_adjustments_for_block): Likewise.
26632 * combine.c (simplify_set, make_extraction, simplify_shift_const_1)
26633 (gen_lowpart_for_combine): Likewise.
26634 * convert.c (convert_to_integer_1): Likewise.
26635 * cse.c (equiv_constant, cse_insn): Likewise.
26636 * cselib.c (autoinc_split, cselib_hash_rtx): Likewise.
26637 (cselib_subst_to_values): Likewise.
26638 * dce.c (word_dce_process_block): Likewise.
26639 * df-problems.c (df_word_lr_mark_ref): Likewise.
26640 * dwarf2cfi.c (init_one_dwarf_reg_size): Likewise.
26641 * dwarf2out.c (multiple_reg_loc_descriptor, mem_loc_descriptor)
26642 (concat_loc_descriptor, concatn_loc_descriptor, loc_descriptor)
26643 (rtl_for_decl_location): Likewise.
26644 * emit-rtl.c (gen_highpart, widen_memory_access): Likewise.
26645 * expmed.c (extract_bit_field_1, extract_integral_bit_field): Likewise.
26646 * expr.c (emit_group_load_1, clear_storage_hints): Likewise.
26647 (emit_move_complex, emit_move_multi_word, emit_push_insn): Likewise.
26648 (expand_expr_real_1): Likewise.
26649 * function.c (assign_parm_setup_block_p, assign_parm_setup_block)
26650 (pad_below): Likewise.
26651 * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
26652 * gimple-ssa-store-merging.c (rhs_valid_for_store_merging_p): Likewise.
26653 * ira.c (get_subreg_tracking_sizes): Likewise.
26654 * ira-build.c (ira_create_allocno_objects): Likewise.
26655 * ira-color.c (coalesced_pseudo_reg_slot_compare): Likewise.
26656 (ira_sort_regnos_for_alter_reg): Likewise.
26657 * ira-costs.c (record_operand_costs): Likewise.
26658 * lower-subreg.c (interesting_mode_p, simplify_gen_subreg_concatn)
26659 (resolve_simple_move): Likewise.
26660 * lra-constraints.c (get_reload_reg, operands_match_p): Likewise.
26661 (process_addr_reg, simplify_operand_subreg, curr_insn_transform)
26662 (lra_constraints): Likewise.
26663 (CONST_POOL_OK_P): Reject variable-sized modes.
26664 * lra-spills.c (slot, assign_mem_slot, pseudo_reg_slot_compare)
26665 (add_pseudo_to_slot, lra_spill): Likewise.
26666 * omp-low.c (omp_clause_aligned_alignment): Likewise.
26667 * optabs-query.c (get_best_extraction_insn): Likewise.
26668 * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
26669 * optabs.c (expand_vec_perm_var, expand_vec_cond_expr): Likewise.
26670 (expand_mult_highpart, valid_multiword_target_p): Likewise.
26671 * recog.c (offsettable_address_addr_space_p): Likewise.
26672 * regcprop.c (maybe_mode_change): Likewise.
26673 * reginfo.c (choose_hard_reg_mode, record_subregs_of_mode): Likewise.
26674 * regrename.c (build_def_use): Likewise.
26675 * regstat.c (dump_reg_info): Likewise.
26676 * reload.c (complex_word_subreg_p, push_reload, find_dummy_reload)
26677 (find_reloads, find_reloads_subreg_address): Likewise.
26678 * reload1.c (eliminate_regs_1): Likewise.
26679 * rtlanal.c (for_each_inc_dec_find_inc_dec, rtx_cost): Likewise.
26680 * simplify-rtx.c (avoid_constant_pool_reference): Likewise.
26681 (simplify_binary_operation_1, simplify_subreg): Likewise.
26682 * targhooks.c (default_function_arg_padding): Likewise.
26683 (default_hard_regno_nregs, default_class_max_nregs): Likewise.
26684 * tree-cfg.c (verify_gimple_assign_binary): Likewise.
26685 (verify_gimple_assign_ternary): Likewise.
26686 * tree-inline.c (estimate_move_cost): Likewise.
26687 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
26688 * tree-ssa-loop-ivopts.c (add_autoinc_candidates): Likewise.
26689 (get_address_cost_ainc): Likewise.
26690 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Likewise.
26691 (vect_supportable_dr_alignment): Likewise.
26692 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
26693 (vectorizable_reduction): Likewise.
26694 * tree-vect-stmts.c (vectorizable_assignment, vectorizable_shift)
26695 (vectorizable_operation, vectorizable_load): Likewise.
26696 * tree.c (build_same_sized_truth_vector_type): Likewise.
26697 * valtrack.c (cleanup_auto_inc_dec): Likewise.
26698 * var-tracking.c (emit_note_insn_var_location): Likewise.
26699 * config/arc/arc.h (ASM_OUTPUT_CASE_END): Use as_a <scalar_int_mode>.
26700 (ADDR_VEC_ALIGN): Likewise.
26702 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
26703 Alan Hayward <alan.hayward@arm.com>
26704 David Sherwood <david.sherwood@arm.com>
26706 * machmode.h (mode_to_bits): Return a poly_uint16 rather than an
26708 (GET_MODE_BITSIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
26709 or if measurement_type is polynomial.
26710 * calls.c (shift_return_value): Treat GET_MODE_BITSIZE as polynomial.
26711 * combine.c (make_extraction): Likewise.
26712 * dse.c (find_shift_sequence): Likewise.
26713 * dwarf2out.c (mem_loc_descriptor): Likewise.
26714 * expmed.c (store_integral_bit_field, extract_bit_field_1): Likewise.
26715 (extract_bit_field, extract_low_bits): Likewise.
26716 * expr.c (convert_move, convert_modes, emit_move_insn_1): Likewise.
26717 (optimize_bitfield_assignment_op, expand_assignment): Likewise.
26718 (store_expr_with_bounds, store_field, expand_expr_real_1): Likewise.
26719 * fold-const.c (optimize_bit_field_compare, merge_ranges): Likewise.
26720 * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
26721 * reload.c (find_reloads): Likewise.
26722 * reload1.c (alter_reg): Likewise.
26723 * stor-layout.c (bitwise_mode_for_mode, compute_record_mode): Likewise.
26724 * targhooks.c (default_secondary_memory_needed_mode): Likewise.
26725 * tree-if-conv.c (predicate_mem_writes): Likewise.
26726 * tree-ssa-strlen.c (handle_builtin_memcmp): Likewise.
26727 * tree-vect-patterns.c (adjust_bool_pattern): Likewise.
26728 * tree-vect-stmts.c (vectorizable_simd_clone_call): Likewise.
26729 * valtrack.c (dead_debug_insert_temp): Likewise.
26730 * varasm.c (mergeable_constant_section): Likewise.
26731 * config/sh/sh.h (LOCAL_ALIGNMENT): Use as_a <fixed_size_mode>.
26733 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
26734 Alan Hayward <alan.hayward@arm.com>
26735 David Sherwood <david.sherwood@arm.com>
26737 * expr.c (expand_assignment): Cope with polynomial mode sizes
26738 when assigning to a CONCAT.
26740 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
26741 Alan Hayward <alan.hayward@arm.com>
26742 David Sherwood <david.sherwood@arm.com>
26744 * machmode.h (mode_precision): Change from unsigned short to
26746 (mode_to_precision): Return a poly_uint16 rather than an unsigned
26748 (GET_MODE_PRECISION): Return a constant if ONLY_FIXED_SIZE_MODES,
26749 or if measurement_type is not polynomial.
26750 (HWI_COMPUTABLE_MODE_P): Turn into a function. Optimize the case
26751 in which the mode is already known to be a scalar_int_mode.
26752 * genmodes.c (emit_mode_precision): Change the type of mode_precision
26753 from unsigned short to poly_uint16_pod. Use ZERO_COEFFS for the
26755 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
26756 for GET_MODE_PRECISION.
26757 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
26758 for GET_MODE_PRECISION.
26759 * combine.c (update_rsp_from_reg_equal): Treat GET_MODE_PRECISION
26761 (try_combine, find_split_point, combine_simplify_rtx): Likewise.
26762 (expand_field_assignment, make_extraction): Likewise.
26763 (make_compound_operation_int, record_dead_and_set_regs_1): Likewise.
26764 (get_last_value): Likewise.
26765 * convert.c (convert_to_integer_1): Likewise.
26766 * cse.c (cse_insn): Likewise.
26767 * expr.c (expand_expr_real_1): Likewise.
26768 * lra-constraints.c (simplify_operand_subreg): Likewise.
26769 * optabs-query.c (can_atomic_load_p): Likewise.
26770 * optabs.c (expand_atomic_load): Likewise.
26771 (expand_atomic_store): Likewise.
26772 * ree.c (combine_reaching_defs): Likewise.
26773 * rtl.h (partial_subreg_p, paradoxical_subreg_p): Likewise.
26774 * rtlanal.c (nonzero_bits1, lsb_bitfield_op_p): Likewise.
26775 * tree.h (type_has_mode_precision_p): Likewise.
26776 * ubsan.c (instrument_si_overflow): Likewise.
26778 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
26779 Alan Hayward <alan.hayward@arm.com>
26780 David Sherwood <david.sherwood@arm.com>
26782 * tree.h (TYPE_VECTOR_SUBPARTS): Turn into a function and handle
26783 polynomial numbers of units.
26784 (SET_TYPE_VECTOR_SUBPARTS): Likewise.
26785 (valid_vector_subparts_p): New function.
26786 (build_vector_type): Remove temporary shim and take the number
26787 of units as a poly_uint64 rather than an int.
26788 (build_opaque_vector_type): Take the number of units as a
26789 poly_uint64 rather than an int.
26790 * tree.c (build_vector_from_ctor): Handle polynomial
26791 TYPE_VECTOR_SUBPARTS.
26792 (type_hash_canon_hash, type_cache_hasher::equal): Likewise.
26793 (uniform_vector_p, vector_type_mode, build_vector): Likewise.
26794 (build_vector_from_val): If the number of units is variable,
26795 use build_vec_duplicate_cst for constant operands and
26796 VEC_DUPLICATE_EXPR otherwise.
26797 (make_vector_type): Remove temporary is_constant ().
26798 (build_vector_type, build_opaque_vector_type): Take the number of
26799 units as a poly_uint64 rather than an int.
26800 (check_vector_cst): Handle polynomial TYPE_VECTOR_SUBPARTS and
26802 * cfgexpand.c (expand_debug_expr): Likewise.
26803 * expr.c (count_type_elements, categorize_ctor_elements_1): Likewise.
26804 (store_constructor, expand_expr_real_1): Likewise.
26805 (const_scalar_mask_from_tree): Likewise.
26806 * fold-const-call.c (fold_const_reduction): Likewise.
26807 * fold-const.c (const_binop, const_unop, fold_convert_const): Likewise.
26808 (operand_equal_p, fold_vec_perm, fold_ternary_loc): Likewise.
26809 (native_encode_vector, vec_cst_ctor_to_array): Likewise.
26810 (fold_relational_const): Likewise.
26811 (native_interpret_vector): Likewise. Change the size from an
26812 int to an unsigned int.
26813 * gimple-fold.c (gimple_fold_stmt_to_constant_1): Handle polynomial
26814 TYPE_VECTOR_SUBPARTS.
26815 (gimple_fold_indirect_ref, gimple_build_vector): Likewise.
26816 (gimple_build_vector_from_val): Use VEC_DUPLICATE_EXPR when
26817 duplicating a non-constant operand into a variable-length vector.
26818 * hsa-brig.c (hsa_op_immed::emit_to_buffer): Handle polynomial
26819 TYPE_VECTOR_SUBPARTS and VECTOR_CST_NELTS.
26820 * ipa-icf.c (sem_variable::equals): Likewise.
26821 * match.pd: Likewise.
26822 * omp-simd-clone.c (simd_clone_subparts): Likewise.
26823 * print-tree.c (print_node): Likewise.
26824 * stor-layout.c (layout_type): Likewise.
26825 * targhooks.c (default_builtin_vectorization_cost): Likewise.
26826 * tree-cfg.c (verify_gimple_comparison): Likewise.
26827 (verify_gimple_assign_binary): Likewise.
26828 (verify_gimple_assign_ternary): Likewise.
26829 (verify_gimple_assign_single): Likewise.
26830 * tree-pretty-print.c (dump_generic_node): Likewise.
26831 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
26832 (simplify_bitfield_ref, is_combined_permutation_identity): Likewise.
26833 * tree-vect-data-refs.c (vect_permute_store_chain): Likewise.
26834 (vect_grouped_load_supported, vect_permute_load_chain): Likewise.
26835 (vect_shift_permute_load_chain): Likewise.
26836 * tree-vect-generic.c (nunits_for_known_piecewise_op): Likewise.
26837 (expand_vector_condition, optimize_vector_constructor): Likewise.
26838 (lower_vec_perm, get_compute_type): Likewise.
26839 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
26840 (get_initial_defs_for_reduction, vect_transform_loop): Likewise.
26841 * tree-vect-patterns.c (vect_recog_bool_pattern): Likewise.
26842 (vect_recog_mask_conversion_pattern): Likewise.
26843 * tree-vect-slp.c (vect_supported_load_permutation_p): Likewise.
26844 (vect_get_constant_vectors, vect_transform_slp_perm_load): Likewise.
26845 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
26846 (get_group_load_store_type, vectorizable_mask_load_store): Likewise.
26847 (vectorizable_bswap, simd_clone_subparts, vectorizable_assignment)
26848 (vectorizable_shift, vectorizable_operation, vectorizable_store)
26849 (vectorizable_load, vect_is_simple_cond, vectorizable_comparison)
26850 (supportable_widening_operation): Likewise.
26851 (supportable_narrowing_operation): Likewise.
26852 * tree-vector-builder.c (tree_vector_builder::binary_encoded_nelts):
26854 * varasm.c (output_constant): Likewise.
26856 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
26857 Alan Hayward <alan.hayward@arm.com>
26858 David Sherwood <david.sherwood@arm.com>
26860 * tree-vect-data-refs.c (vect_permute_store_chain): Reorganize
26861 so that both the length == 3 and length != 3 cases set up their
26862 own permute vectors. Add comments explaining why we know the
26863 number of elements is constant.
26864 (vect_permute_load_chain): Likewise.
26866 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
26867 Alan Hayward <alan.hayward@arm.com>
26868 David Sherwood <david.sherwood@arm.com>
26870 * machmode.h (mode_nunits): Change from unsigned char to
26872 (ONLY_FIXED_SIZE_MODES): New macro.
26873 (pod_mode::measurement_type, scalar_int_mode::measurement_type)
26874 (scalar_float_mode::measurement_type, scalar_mode::measurement_type)
26875 (complex_mode::measurement_type, fixed_size_mode::measurement_type):
26877 (mode_to_nunits): Return a poly_uint16 rather than an unsigned short.
26878 (GET_MODE_NUNITS): Return a constant if ONLY_FIXED_SIZE_MODES,
26879 or if measurement_type is not polynomial.
26880 * genmodes.c (ZERO_COEFFS): New macro.
26881 (emit_mode_nunits_inline): Make mode_nunits_inline return a
26883 (emit_mode_nunits): Change the type of mode_nunits to poly_uint16_pod.
26884 Use ZERO_COEFFS when emitting initializers.
26885 * data-streamer.h (bp_pack_poly_value): New function.
26886 (bp_unpack_poly_value): Likewise.
26887 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
26888 for GET_MODE_NUNITS.
26889 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
26890 for GET_MODE_NUNITS.
26891 * tree.c (make_vector_type): Remove temporary shim and make
26892 the real function take the number of units as a poly_uint64
26893 rather than an int.
26894 (build_vector_type_for_mode): Handle polynomial nunits.
26895 * dwarf2out.c (loc_descriptor, add_const_value_attribute): Likewise.
26896 * emit-rtl.c (const_vec_series_p_1): Likewise.
26897 (gen_rtx_CONST_VECTOR): Likewise.
26898 * fold-const.c (test_vec_duplicate_folding): Likewise.
26899 * genrecog.c (validate_pattern): Likewise.
26900 * optabs-query.c (can_vec_perm_var_p, can_mult_highpart_p): Likewise.
26901 * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
26902 * optabs.c (expand_vector_broadcast, expand_binop_directly): Likewise.
26903 (shift_amt_for_vec_perm_mask, expand_vec_perm_var): Likewise.
26904 (expand_vec_cond_expr, expand_mult_highpart): Likewise.
26905 * rtlanal.c (subreg_get_info): Likewise.
26906 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
26907 (vect_grouped_load_supported): Likewise.
26908 * tree-vect-generic.c (type_for_widest_vector_mode): Likewise.
26909 * tree-vect-loop.c (have_whole_vector_shift): Likewise.
26910 * simplify-rtx.c (simplify_unary_operation_1): Likewise.
26911 (simplify_const_unary_operation, simplify_binary_operation_1)
26912 (simplify_const_binary_operation, simplify_ternary_operation)
26913 (test_vector_ops_duplicate, test_vector_ops): Likewise.
26914 (simplify_immed_subreg): Use GET_MODE_NUNITS on a fixed_size_mode
26915 instead of CONST_VECTOR_NUNITS.
26916 * varasm.c (output_constant_pool_2): Likewise.
26917 * rtx-vector-builder.c (rtx_vector_builder::build): Only include the
26918 explicit-encoded elements in the XVEC for variable-length vectors.
26920 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
26922 * lra-constraints.c (curr_insn_transform): Use partial_subreg_p.
26924 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
26925 Alan Hayward <alan.hayward@arm.com>
26926 David Sherwood <david.sherwood@arm.com>
26928 * coretypes.h (fixed_size_mode): Declare.
26929 (fixed_size_mode_pod): New typedef.
26930 * builtins.h (target_builtins::x_apply_args_mode)
26931 (target_builtins::x_apply_result_mode): Change type to
26932 fixed_size_mode_pod.
26933 * builtins.c (apply_args_size, apply_result_size, result_vector)
26934 (expand_builtin_apply_args_1, expand_builtin_apply)
26935 (expand_builtin_return): Update accordingly.
26937 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
26939 * cse.c (hash_rtx_cb): Hash only the encoded elements.
26940 * cselib.c (cselib_hash_rtx): Likewise.
26941 * expmed.c (make_tree): Build VECTOR_CSTs directly from the
26942 CONST_VECTOR encoding.
26944 2018-01-03 Jakub Jelinek <jakub@redhat.com>
26945 Jeff Law <law@redhat.com>
26948 * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): For
26949 noreturn probe, use gen_pop instead of ix86_emit_restore_reg_using_pop,
26950 only set RTX_FRAME_RELATED_P on both the push and pop if cfa_reg is sp
26951 and add REG_CFA_ADJUST_CFA notes in that case to both insns.
26954 * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): Do not
26955 explicitly probe *sp in a noreturn function if there were any callee
26956 register saves or frame pointer is needed.
26958 2018-01-03 Jakub Jelinek <jakub@redhat.com>
26961 * cfgexpand.c (expand_debug_expr): Return NULL if mode is
26962 BLKmode for ternary, binary or unary expressions.
26965 * var-tracking.c (delete_vta_debug_insn): New inline function.
26966 (delete_vta_debug_insns): Add USE_CFG argument, if true, walk just
26967 insns from get_insns () to NULL instead of each bb separately.
26968 Use delete_vta_debug_insn. No longer static.
26969 (vt_debug_insns_local, variable_tracking_main_1): Adjust
26970 delete_vta_debug_insns callers.
26971 * rtl.h (delete_vta_debug_insns): Declare.
26972 * final.c (rest_of_handle_final): Call delete_vta_debug_insns
26973 instead of variable_tracking_main.
26975 2018-01-03 Martin Sebor <msebor@redhat.com>
26977 PR tree-optimization/83603
26978 * calls.c (maybe_warn_nonstring_arg): Avoid accessing function
26979 arguments past the endof the argument list in functions declared
26980 without a prototype.
26981 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call):
26982 Avoid checking when arguments are null.
26984 2018-01-03 Martin Sebor <msebor@redhat.com>
26987 * doc/extend.texi (attribute const): Fix a typo.
26988 * ipa-pure-const.c ((warn_function_const, warn_function_pure): Avoid
26989 issuing -Wsuggest-attribute for void functions.
26991 2018-01-03 Martin Sebor <msebor@redhat.com>
26993 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Use
26994 offset_int::from instead of wide_int::to_shwi.
26995 (maybe_diag_overlap): Remove assertion.
26996 Use HOST_WIDE_INT_PRINT_DEC instead of %lli.
26997 * gimple-ssa-sprintf.c (format_directive): Same.
26998 (parse_directive): Same.
26999 (sprintf_dom_walker::compute_format_length): Same.
27000 (try_substitute_return_value): Same.
27002 2018-01-03 Jeff Law <law@redhat.com>
27004 PR middle-end/83654
27005 * explow.c (anti_adjust_stack_and_probe_stack_clash): Test a
27006 non-constant residual for zero at runtime and avoid probing in
27007 that case. Reorganize code for trailing problem to mirror handling
27010 2018-01-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
27012 PR tree-optimization/83501
27013 * tree-ssa-strlen.c (get_string_cst): New.
27014 (handle_char_store): Call get_string_cst.
27016 2018-01-03 Martin Liska <mliska@suse.cz>
27018 PR tree-optimization/83593
27019 * tree-ssa-strlen.c: Include tree-cfg.h.
27020 (strlen_check_and_optimize_stmt): Add new argument cleanup_eh.
27021 (strlen_dom_walker): Add new member variable m_cleanup_cfg.
27022 (strlen_dom_walker::strlen_dom_walker): Initialize m_cleanup_cfg
27024 (strlen_dom_walker::before_dom_children): Call
27025 gimple_purge_dead_eh_edges. Dump tranformation with details
27027 (strlen_dom_walker::before_dom_children): Update call by adding
27028 new argument cleanup_eh.
27029 (pass_strlen::execute): Return TODO_cleanup_cfg if needed.
27031 2018-01-03 Martin Liska <mliska@suse.cz>
27034 * cif-code.def (VARIADIC_THUNK): New enum value.
27035 * ipa-fnsummary.c (compute_fn_summary): Do not inline variadic
27038 2018-01-03 Jan Beulich <jbeulich@suse.com>
27040 * sse.md (mov<mode>_internal): Tighten condition for when to use
27041 vmovdqu<ssescalarsize> for TI and OI modes.
27043 2018-01-03 Jakub Jelinek <jakub@redhat.com>
27045 Update copyright years.
27047 2018-01-03 Martin Liska <mliska@suse.cz>
27050 * ipa-visibility.c (function_and_variable_visibility): Skip
27051 functions with noipa attribure.
27053 2018-01-03 Jakub Jelinek <jakub@redhat.com>
27055 * gcc.c (process_command): Update copyright notice dates.
27056 * gcov-dump.c (print_version): Ditto.
27057 * gcov.c (print_version): Ditto.
27058 * gcov-tool.c (print_version): Ditto.
27059 * gengtype.c (create_file): Ditto.
27060 * doc/cpp.texi: Bump @copying's copyright year.
27061 * doc/cppinternals.texi: Ditto.
27062 * doc/gcc.texi: Ditto.
27063 * doc/gccint.texi: Ditto.
27064 * doc/gcov.texi: Ditto.
27065 * doc/install.texi: Ditto.
27066 * doc/invoke.texi: Ditto.
27068 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27070 * vector-builder.h (vector_builder::m_full_nelts): Change from
27071 unsigned int to poly_uint64.
27072 (vector_builder::full_nelts): Update prototype accordingly.
27073 (vector_builder::new_vector): Likewise.
27074 (vector_builder::encoded_full_vector_p): Handle polynomial full_nelts.
27075 (vector_builder::operator ==): Likewise.
27076 (vector_builder::finalize): Likewise.
27077 * int-vector-builder.h (int_vector_builder::int_vector_builder):
27078 Take the number of elements as a poly_uint64 rather than an
27080 * vec-perm-indices.h (vec_perm_indices::m_nelts_per_input): Change
27081 from unsigned int to poly_uint64.
27082 (vec_perm_indices::vec_perm_indices): Update prototype accordingly.
27083 (vec_perm_indices::new_vector): Likewise.
27084 (vec_perm_indices::length): Likewise.
27085 (vec_perm_indices::nelts_per_input): Likewise.
27086 (vec_perm_indices::input_nelts): Likewise.
27087 * vec-perm-indices.c (vec_perm_indices::new_vector): Take the
27088 number of elements per input as a poly_uint64 rather than an
27089 unsigned int. Use the original encoding for variable-length
27090 vectors, rather than clamping each individual element.
27091 For the second and subsequent elements in each pattern,
27092 clamp the step and base before clamping their sum.
27093 (vec_perm_indices::series_p): Handle polynomial element counts.
27094 (vec_perm_indices::all_in_range_p): Likewise.
27095 (vec_perm_indices_to_tree): Likewise.
27096 (vec_perm_indices_to_rtx): Likewise.
27097 * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise.
27098 * tree-vector-builder.c (tree_vector_builder::new_unary_operation)
27099 (tree_vector_builder::new_binary_operation): Handle polynomial
27100 element counts. Return false if we need to know the number
27101 of elements at compile time.
27102 * fold-const.c (fold_vec_perm): Punt if the number of elements
27103 isn't known at compile time.
27105 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27107 * vec-perm-indices.h (vec_perm_builder): Change element type
27108 from HOST_WIDE_INT to poly_int64.
27109 (vec_perm_indices::element_type): Update accordingly.
27110 (vec_perm_indices::clamp): Handle polynomial element_types.
27111 * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
27112 (vec_perm_indices::all_in_range_p): Likewise.
27113 (tree_to_vec_perm_builder): Check for poly_int64 trees rather
27115 * vector-builder.h (vector_builder::stepped_sequence_p): Handle
27116 polynomial vec_perm_indices element types.
27117 * int-vector-builder.h (int_vector_builder::equal_p): Likewise.
27118 * fold-const.c (fold_vec_perm): Likewise.
27119 * optabs.c (shift_amt_for_vec_perm_mask): Likewise.
27120 * tree-vect-generic.c (lower_vec_perm): Likewise.
27121 * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
27122 * config/aarch64/aarch64.c (aarch64_evpc_tbl): Cast d->perm
27123 element type to HOST_WIDE_INT.
27125 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27126 Alan Hayward <alan.hayward@arm.com>
27127 David Sherwood <david.sherwood@arm.com>
27129 * alias.c (addr_side_effect_eval): Take the size as a poly_int64
27130 rather than an int. Use plus_constant.
27131 (memrefs_conflict_p): Take the sizes as poly_int64s rather than ints.
27132 Take the offset "c" as a poly_int64 rather than a HOST_WIDE_INT.
27134 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27135 Alan Hayward <alan.hayward@arm.com>
27136 David Sherwood <david.sherwood@arm.com>
27138 * calls.c (emit_call_1, expand_call): Change struct_value_size from
27139 a HOST_WIDE_INT to a poly_int64.
27141 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27142 Alan Hayward <alan.hayward@arm.com>
27143 David Sherwood <david.sherwood@arm.com>
27145 * calls.c (load_register_parameters): Cope with polynomial
27146 mode sizes. Require a constant size for BLKmode parameters
27147 that aren't described by a PARALLEL. If BLOCK_REG_PADDING
27148 forces a parameter to be padded at the lsb end in order to
27149 fill a complete number of words, require the parameter size
27150 to be ordered wrt UNITS_PER_WORD.
27152 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27153 Alan Hayward <alan.hayward@arm.com>
27154 David Sherwood <david.sherwood@arm.com>
27156 * reload1.c (spill_stack_slot_width): Change element type
27157 from unsigned int to poly_uint64_pod.
27158 (alter_reg): Treat mode sizes as polynomial.
27160 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27161 Alan Hayward <alan.hayward@arm.com>
27162 David Sherwood <david.sherwood@arm.com>
27164 * reload.c (complex_word_subreg_p): New function.
27165 (reload_inner_reg_of_subreg, push_reload): Use it.
27167 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27168 Alan Hayward <alan.hayward@arm.com>
27169 David Sherwood <david.sherwood@arm.com>
27171 * lra-constraints.c (process_alt_operands): Reject matched
27172 operands whose sizes aren't ordered.
27173 (match_reload): Refer to this check here.
27175 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27176 Alan Hayward <alan.hayward@arm.com>
27177 David Sherwood <david.sherwood@arm.com>
27179 * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Assert
27180 that the mode size is in the set {1, 2, 4, 8, 16}.
27182 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27183 Alan Hayward <alan.hayward@arm.com>
27184 David Sherwood <david.sherwood@arm.com>
27186 * var-tracking.c (adjust_mems): Treat mode sizes as polynomial.
27187 Use plus_constant instead of gen_rtx_PLUS.
27189 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27190 Alan Hayward <alan.hayward@arm.com>
27191 David Sherwood <david.sherwood@arm.com>
27193 * config/cr16/cr16-protos.h (cr16_push_rounding): Declare.
27194 * config/cr16/cr16.h (PUSH_ROUNDING): Move implementation to...
27195 * config/cr16/cr16.c (cr16_push_rounding): ...this new function.
27196 * config/h8300/h8300-protos.h (h8300_push_rounding): Declare.
27197 * config/h8300/h8300.h (PUSH_ROUNDING): Move implementation to...
27198 * config/h8300/h8300.c (h8300_push_rounding): ...this new function.
27199 * config/i386/i386-protos.h (ix86_push_rounding): Declare.
27200 * config/i386/i386.h (PUSH_ROUNDING): Move implementation to...
27201 * config/i386/i386.c (ix86_push_rounding): ...this new function.
27202 * config/m32c/m32c-protos.h (m32c_push_rounding): Take and return
27204 * config/m32c/m32c.c (m32c_push_rounding): Likewise.
27205 * config/m68k/m68k-protos.h (m68k_push_rounding): Declare.
27206 * config/m68k/m68k.h (PUSH_ROUNDING): Move implementation to...
27207 * config/m68k/m68k.c (m68k_push_rounding): ...this new function.
27208 * config/pdp11/pdp11-protos.h (pdp11_push_rounding): Declare.
27209 * config/pdp11/pdp11.h (PUSH_ROUNDING): Move implementation to...
27210 * config/pdp11/pdp11.c (pdp11_push_rounding): ...this new function.
27211 * config/stormy16/stormy16-protos.h (xstormy16_push_rounding): Declare.
27212 * config/stormy16/stormy16.h (PUSH_ROUNDING): Move implementation to...
27213 * config/stormy16/stormy16.c (xstormy16_push_rounding): ...this new
27215 * expr.c (emit_move_resolve_push): Treat the input and result
27216 of PUSH_ROUNDING as a poly_int64.
27217 (emit_move_complex_push, emit_single_push_insn_1): Likewise.
27218 (emit_push_insn): Likewise.
27219 * lra-eliminations.c (mark_not_eliminable): Likewise.
27220 * recog.c (push_operand): Likewise.
27221 * reload1.c (elimination_effects): Likewise.
27222 * rtlanal.c (nonzero_bits1): Likewise.
27223 * calls.c (store_one_arg): Likewise. Require the padding to be
27224 known at compile time.
27226 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27227 Alan Hayward <alan.hayward@arm.com>
27228 David Sherwood <david.sherwood@arm.com>
27230 * expr.c (emit_single_push_insn_1): Treat mode sizes as polynomial.
27231 Use plus_constant instead of gen_rtx_PLUS.
27233 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27234 Alan Hayward <alan.hayward@arm.com>
27235 David Sherwood <david.sherwood@arm.com>
27237 * auto-inc-dec.c (set_inc_state): Take the mode size as a poly_int64
27238 rather than an int.
27240 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27241 Alan Hayward <alan.hayward@arm.com>
27242 David Sherwood <david.sherwood@arm.com>
27244 * expr.c (expand_expr_real_1): Use tree_to_poly_uint64
27245 instead of int_size_in_bytes when handling VIEW_CONVERT_EXPRs
27246 via stack temporaries. Treat the mode size as polynomial too.
27248 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27249 Alan Hayward <alan.hayward@arm.com>
27250 David Sherwood <david.sherwood@arm.com>
27252 * expr.c (expand_expr_real_2): When handling conversions involving
27253 unions, apply tree_to_poly_uint64 to the TYPE_SIZE rather than
27254 multiplying int_size_in_bytes by BITS_PER_UNIT. Treat GET_MODE_BISIZE
27255 as a poly_uint64 too.
27257 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27258 Alan Hayward <alan.hayward@arm.com>
27259 David Sherwood <david.sherwood@arm.com>
27261 * rtlanal.c (subreg_get_info): Handle polynomial mode sizes.
27263 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27264 Alan Hayward <alan.hayward@arm.com>
27265 David Sherwood <david.sherwood@arm.com>
27267 * combine.c (can_change_dest_mode): Handle polynomial
27268 REGMODE_NATURAL_SIZE.
27269 * expmed.c (store_bit_field_1): Likewise.
27270 * expr.c (store_constructor): Likewise.
27271 * emit-rtl.c (validate_subreg): Operate on polynomial mode sizes
27272 and polynomial REGMODE_NATURAL_SIZE.
27273 (gen_lowpart_common): Likewise.
27274 * reginfo.c (record_subregs_of_mode): Likewise.
27275 * rtlanal.c (read_modify_subreg_p): Likewise.
27277 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27278 Alan Hayward <alan.hayward@arm.com>
27279 David Sherwood <david.sherwood@arm.com>
27281 * internal-fn.c (expand_vector_ubsan_overflow): Handle polynomial
27282 numbers of elements.
27284 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27285 Alan Hayward <alan.hayward@arm.com>
27286 David Sherwood <david.sherwood@arm.com>
27288 * match.pd: Cope with polynomial numbers of vector elements.
27290 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27291 Alan Hayward <alan.hayward@arm.com>
27292 David Sherwood <david.sherwood@arm.com>
27294 * fold-const.c (fold_indirect_ref_1): Handle polynomial offsets
27295 in a POINTER_PLUS_EXPR.
27297 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27298 Alan Hayward <alan.hayward@arm.com>
27299 David Sherwood <david.sherwood@arm.com>
27301 * omp-simd-clone.c (simd_clone_subparts): New function.
27302 (simd_clone_init_simd_arrays): Use it instead of TYPE_VECTOR_SUBPARTS.
27303 (ipa_simd_modify_function_body): Likewise.
27305 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27306 Alan Hayward <alan.hayward@arm.com>
27307 David Sherwood <david.sherwood@arm.com>
27309 * tree-vect-generic.c (nunits_for_known_piecewise_op): New function.
27310 (expand_vector_piecewise): Use it instead of TYPE_VECTOR_SUBPARTS.
27311 (expand_vector_addition, add_rshift, expand_vector_divmod): Likewise.
27312 (expand_vector_condition, vector_element): Likewise.
27313 (subparts_gt): New function.
27314 (get_compute_type): Use subparts_gt.
27315 (count_type_subparts): Delete.
27316 (expand_vector_operations_1): Use subparts_gt instead of
27317 count_type_subparts.
27319 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27320 Alan Hayward <alan.hayward@arm.com>
27321 David Sherwood <david.sherwood@arm.com>
27323 * tree-vect-data-refs.c (vect_no_alias_p): Replace with...
27324 (vect_compile_time_alias): ...this new function. Do the calculation
27325 on poly_ints rather than trees.
27326 (vect_prune_runtime_alias_test_list): Update call accordingly.
27328 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27329 Alan Hayward <alan.hayward@arm.com>
27330 David Sherwood <david.sherwood@arm.com>
27332 * tree-vect-slp.c (vect_build_slp_tree_1): Handle polynomial
27334 (vect_schedule_slp_instance): Likewise.
27336 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27337 Alan Hayward <alan.hayward@arm.com>
27338 David Sherwood <david.sherwood@arm.com>
27340 * tree-vect-slp.c (vect_get_and_check_slp_defs): Reject
27341 constant and extern definitions for variable-length vectors.
27342 (vect_get_constant_vectors): Note that the number of units
27343 is known to be constant.
27345 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27346 Alan Hayward <alan.hayward@arm.com>
27347 David Sherwood <david.sherwood@arm.com>
27349 * tree-vect-stmts.c (vectorizable_conversion): Treat the number
27350 of units as polynomial. Choose between WIDE and NARROW based
27353 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27354 Alan Hayward <alan.hayward@arm.com>
27355 David Sherwood <david.sherwood@arm.com>
27357 * tree-vect-stmts.c (simd_clone_subparts): New function.
27358 (vectorizable_simd_clone_call): Use it instead of TYPE_VECTOR_SUBPARTS.
27360 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27361 Alan Hayward <alan.hayward@arm.com>
27362 David Sherwood <david.sherwood@arm.com>
27364 * tree-vect-stmts.c (vectorizable_call): Treat the number of
27365 vectors as polynomial. Use build_index_vector for
27366 IFN_GOMP_SIMD_LANE.
27368 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27369 Alan Hayward <alan.hayward@arm.com>
27370 David Sherwood <david.sherwood@arm.com>
27372 * tree-vect-stmts.c (get_load_store_type): Treat the number of
27373 units as polynomial. Reject VMAT_ELEMENTWISE and VMAT_STRIDED_SLP
27374 for variable-length vectors.
27375 (vectorizable_mask_load_store): Treat the number of units as
27376 polynomial, asserting that it is constant if the condition has
27377 already been enforced.
27378 (vectorizable_store, vectorizable_load): Likewise.
27380 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27381 Alan Hayward <alan.hayward@arm.com>
27382 David Sherwood <david.sherwood@arm.com>
27384 * tree-vect-loop.c (vectorizable_live_operation): Treat the number
27385 of units as polynomial. Punt if we can't tell at compile time
27386 which vector contains the final result.
27388 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27389 Alan Hayward <alan.hayward@arm.com>
27390 David Sherwood <david.sherwood@arm.com>
27392 * tree-vect-loop.c (vectorizable_induction): Treat the number
27393 of units as polynomial. Punt on SLP inductions. Use an integer
27394 VEC_SERIES_EXPR for variable-length integer reductions. Use a
27395 cast of such a series for variable-length floating-point
27398 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27399 Alan Hayward <alan.hayward@arm.com>
27400 David Sherwood <david.sherwood@arm.com>
27402 * tree.h (build_index_vector): Declare.
27403 * tree.c (build_index_vector): New function.
27404 * tree-vect-loop.c (get_initial_defs_for_reduction): Treat the number
27405 of units as polynomial, forcibly converting it to a constant if
27406 vectorizable_reduction has already enforced the condition.
27407 (vect_create_epilog_for_reduction): Likewise. Use build_index_vector
27408 to create a {1,2,3,...} vector.
27409 (vectorizable_reduction): Treat the number of units as polynomial.
27410 Choose vectype_in based on the largest scalar element size rather
27411 than the smallest number of units. Enforce the restrictions
27414 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27415 Alan Hayward <alan.hayward@arm.com>
27416 David Sherwood <david.sherwood@arm.com>
27418 * tree-vect-data-refs.c (vector_alignment_reachable_p): Treat the
27419 number of units as polynomial.
27421 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27422 Alan Hayward <alan.hayward@arm.com>
27423 David Sherwood <david.sherwood@arm.com>
27425 * target.h (vector_sizes, auto_vector_sizes): New typedefs.
27426 * target.def (autovectorize_vector_sizes): Return the vector sizes
27427 by pointer, using vector_sizes rather than a bitmask.
27428 * targhooks.h (default_autovectorize_vector_sizes): Update accordingly.
27429 * targhooks.c (default_autovectorize_vector_sizes): Likewise.
27430 * config/aarch64/aarch64.c (aarch64_autovectorize_vector_sizes):
27432 * config/arc/arc.c (arc_autovectorize_vector_sizes): Likewise.
27433 * config/arm/arm.c (arm_autovectorize_vector_sizes): Likewise.
27434 * config/i386/i386.c (ix86_autovectorize_vector_sizes): Likewise.
27435 * config/mips/mips.c (mips_autovectorize_vector_sizes): Likewise.
27436 * omp-general.c (omp_max_vf): Likewise.
27437 * omp-low.c (omp_clause_aligned_alignment): Likewise.
27438 * optabs-query.c (can_vec_mask_load_store_p): Likewise.
27439 * tree-vect-loop.c (vect_analyze_loop): Likewise.
27440 * tree-vect-slp.c (vect_slp_bb): Likewise.
27441 * doc/tm.texi: Regenerate.
27442 * tree-vectorizer.h (current_vector_size): Change from an unsigned int
27444 * tree-vect-stmts.c (get_vectype_for_scalar_type_and_size): Take
27445 the vector size as a poly_uint64 rather than an unsigned int.
27446 (current_vector_size): Change from an unsigned int to a poly_uint64.
27447 (get_vectype_for_scalar_type): Update accordingly.
27448 * tree.h (build_truth_vector_type): Take the size and number of
27449 units as a poly_uint64 rather than an unsigned int.
27450 (build_vector_type): Add a temporary overload that takes
27451 the number of units as a poly_uint64 rather than an unsigned int.
27452 * tree.c (make_vector_type): Likewise.
27453 (build_truth_vector_type): Take the number of units as a poly_uint64
27454 rather than an unsigned int.
27456 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27457 Alan Hayward <alan.hayward@arm.com>
27458 David Sherwood <david.sherwood@arm.com>
27460 * target.def (get_mask_mode): Take the number of units and length
27461 as poly_uint64s rather than unsigned ints.
27462 * targhooks.h (default_get_mask_mode): Update accordingly.
27463 * targhooks.c (default_get_mask_mode): Likewise.
27464 * config/i386/i386.c (ix86_get_mask_mode): Likewise.
27465 * doc/tm.texi: Regenerate.
27467 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27468 Alan Hayward <alan.hayward@arm.com>
27469 David Sherwood <david.sherwood@arm.com>
27471 * omp-general.h (omp_max_vf): Return a poly_uint64 instead of an int.
27472 * omp-general.c (omp_max_vf): Likewise.
27473 * omp-expand.c (omp_adjust_chunk_size): Update call to omp_max_vf.
27474 (expand_omp_simd): Handle polynomial safelen.
27475 * omp-low.c (omplow_simd_context): Add a default constructor.
27476 (omplow_simd_context::max_vf): Change from int to poly_uint64.
27477 (lower_rec_simd_input_clauses): Update accordingly.
27478 (lower_rec_input_clauses): Likewise.
27480 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27481 Alan Hayward <alan.hayward@arm.com>
27482 David Sherwood <david.sherwood@arm.com>
27484 * tree-vectorizer.h (vect_nunits_for_cost): New function.
27485 * tree-vect-loop.c (vect_model_reduction_cost): Use it.
27486 * tree-vect-slp.c (vect_analyze_slp_cost_1): Likewise.
27487 (vect_analyze_slp_cost): Likewise.
27488 * tree-vect-stmts.c (vect_model_store_cost): Likewise.
27489 (vect_model_load_cost): Likewise.
27491 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27492 Alan Hayward <alan.hayward@arm.com>
27493 David Sherwood <david.sherwood@arm.com>
27495 * tree-vect-slp.c (vect_record_max_nunits, vect_build_slp_tree_1)
27496 (vect_build_slp_tree_2, vect_build_slp_tree): Change max_nunits
27497 from an unsigned int * to a poly_uint64_pod *.
27498 (calculate_unrolling_factor): New function.
27499 (vect_analyze_slp_instance): Use it. Track polynomial max_nunits.
27501 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27502 Alan Hayward <alan.hayward@arm.com>
27503 David Sherwood <david.sherwood@arm.com>
27505 * tree-vectorizer.h (_slp_instance::unrolling_factor): Change
27506 from an unsigned int to a poly_uint64.
27507 (_loop_vec_info::slp_unrolling_factor): Likewise.
27508 (_loop_vec_info::vectorization_factor): Change from an int
27510 (MAX_VECTORIZATION_FACTOR): Bump from 64 to INT_MAX.
27511 (vect_get_num_vectors): New function.
27512 (vect_update_max_nunits, vect_vf_for_cost): Likewise.
27513 (vect_get_num_copies): Use vect_get_num_vectors.
27514 (vect_analyze_data_ref_dependences): Change max_vf from an int *
27515 to an unsigned int *.
27516 (vect_analyze_data_refs): Change min_vf from an int * to a
27518 (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
27519 than an unsigned HOST_WIDE_INT.
27520 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
27521 (vect_analyze_data_ref_dependence): Change max_vf from an int *
27522 to an unsigned int *.
27523 (vect_analyze_data_ref_dependences): Likewise.
27524 (vect_compute_data_ref_alignment): Handle polynomial vf.
27525 (vect_enhance_data_refs_alignment): Likewise.
27526 (vect_prune_runtime_alias_test_list): Likewise.
27527 (vect_shift_permute_load_chain): Likewise.
27528 (vect_supportable_dr_alignment): Likewise.
27529 (dependence_distance_ge_vf): Take the vectorization factor as a
27530 poly_uint64 rather than an unsigned HOST_WIDE_INT.
27531 (vect_analyze_data_refs): Change min_vf from an int * to a
27533 * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Take
27534 vfm1 as a poly_uint64 rather than an int. Make the same change
27535 for the returned bound_scalar.
27536 (vect_gen_vector_loop_niters): Handle polynomial vf.
27537 (vect_do_peeling): Likewise. Update call to
27538 vect_gen_scalar_loop_niters and handle polynomial bound_scalars.
27539 (vect_gen_vector_loop_niters_mult_vf): Assert that the vf must
27541 * tree-vect-loop.c (vect_determine_vectorization_factor)
27542 (vect_update_vf_for_slp, vect_analyze_loop_2): Handle polynomial vf.
27543 (vect_get_known_peeling_cost): Likewise.
27544 (vect_estimate_min_profitable_iters, vectorizable_reduction): Likewise.
27545 (vect_worthwhile_without_simd_p, vectorizable_induction): Likewise.
27546 (vect_transform_loop): Likewise. Use the lowest possible VF when
27547 updating the upper bounds of the loop.
27548 (vect_min_worthwhile_factor): Make static. Return an unsigned int
27549 rather than an int.
27550 * tree-vect-slp.c (vect_attempt_slp_rearrange_stmts): Cope with
27551 polynomial unroll factors.
27552 (vect_analyze_slp_cost_1, vect_analyze_slp_instance): Likewise.
27553 (vect_make_slp_decision): Likewise.
27554 (vect_supported_load_permutation_p): Likewise, and polynomial
27556 (vect_analyze_slp_cost): Handle polynomial vf.
27557 (vect_slp_analyze_node_operations): Likewise.
27558 (vect_slp_analyze_bb_1): Likewise.
27559 (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
27560 than an unsigned HOST_WIDE_INT.
27561 * tree-vect-stmts.c (vectorizable_simd_clone_call, vectorizable_store)
27562 (vectorizable_load): Handle polynomial vf.
27563 * tree-vectorizer.c (simduid_to_vf::vf): Change from an int to
27565 (adjust_simduid_builtins, shrink_simd_arrays): Update accordingly.
27567 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27568 Alan Hayward <alan.hayward@arm.com>
27569 David Sherwood <david.sherwood@arm.com>
27571 * match.pd: Handle bit operations involving three constants
27572 and try to fold one pair.
27574 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
27576 * tree-vect-loop-manip.c: Include gimple-fold.h.
27577 (slpeel_make_loop_iterate_ntimes): Add step, final_iv and
27578 niters_maybe_zero parameters. Handle other cases besides a step of 1.
27579 (vect_gen_vector_loop_niters): Add a step_vector_ptr parameter.
27580 Add a path that uses a step of VF instead of 1, but disable it
27582 (vect_do_peeling): Add step_vector, niters_vector_mult_vf_var
27583 and niters_no_overflow parameters. Update calls to
27584 slpeel_make_loop_iterate_ntimes and vect_gen_vector_loop_niters.
27585 Create a new SSA name if the latter choses to use a ste other
27586 than zero, and return it via niters_vector_mult_vf_var.
27587 * tree-vect-loop.c (vect_transform_loop): Update calls to
27588 vect_do_peeling, vect_gen_vector_loop_niters and
27589 slpeel_make_loop_iterate_ntimes.
27590 * tree-vectorizer.h (slpeel_make_loop_iterate_ntimes, vect_do_peeling)
27591 (vect_gen_vector_loop_niters): Update declarations after above changes.
27593 2018-01-02 Michael Meissner <meissner@linux.vnet.ibm.com>
27595 * config/rs6000/rs6000.md (floor<mode>2): Add support for IEEE
27596 128-bit round to integer instructions.
27597 (ceil<mode>2): Likewise.
27598 (btrunc<mode>2): Likewise.
27599 (round<mode>2): Likewise.
27601 2018-01-02 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
27603 * config/rs6000/rs6000-string.c (expand_block_move): Allow the use of
27604 unaligned VSX load/store on P8/P9.
27605 (expand_block_clear): Allow the use of unaligned VSX
27606 load/store on P8/P9.
27608 2018-01-02 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
27610 * config/rs6000/rs6000-p8swap.c (swap_feeds_both_load_and_store):
27612 (rs6000_analyze_swaps): Mark a web unoptimizable if it contains a
27613 swap associated with both a load and a store.
27615 2018-01-02 Andrew Waterman <andrew@sifive.com>
27617 * config/riscv/linux.h (ICACHE_FLUSH_FUNC): New.
27618 * config/riscv/riscv.md (clear_cache): Use it.
27620 2018-01-02 Artyom Skrobov <tyomitch@gmail.com>
27622 * web.c: Remove out-of-date comment.
27624 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
27626 * expr.c (fixup_args_size_notes): Check that any existing
27627 REG_ARGS_SIZE notes are correct, and don't try to re-add them.
27628 (emit_single_push_insn_1): Move stack_pointer_delta adjustment to...
27629 (emit_single_push_insn): ...here.
27631 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
27633 * rtl.h (CONST_VECTOR_ELT): Redefine to const_vector_elt.
27634 (const_vector_encoded_nelts): New function.
27635 (CONST_VECTOR_NUNITS): Redefine to use GET_MODE_NUNITS.
27636 (const_vector_int_elt, const_vector_elt): Declare.
27637 * emit-rtl.c (const_vector_int_elt_1): New function.
27638 (const_vector_elt): Likewise.
27639 * simplify-rtx.c (simplify_immed_subreg): Avoid taking the address
27640 of CONST_VECTOR_ELT.
27642 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
27644 * expr.c: Include rtx-vector-builder.h.
27645 (const_vector_mask_from_tree): Use rtx_vector_builder and operate
27646 directly on the tree encoding.
27647 (const_vector_from_tree): Likewise.
27648 * optabs.c: Include rtx-vector-builder.h.
27649 (expand_vec_perm_var): Use rtx_vector_builder and create a repeating
27650 sequence of "u" values.
27651 * vec-perm-indices.c: Include rtx-vector-builder.h.
27652 (vec_perm_indices_to_rtx): Use rtx_vector_builder and operate
27653 directly on the vec_perm_indices encoding.
27655 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
27657 * doc/rtl.texi (const_vector): Describe new encoding scheme.
27658 * Makefile.in (OBJS): Add rtx-vector-builder.o.
27659 * rtx-vector-builder.h: New file.
27660 * rtx-vector-builder.c: Likewise.
27661 * rtl.h (rtx_def::u2): Add a const_vector field.
27662 (CONST_VECTOR_NPATTERNS): New macro.
27663 (CONST_VECTOR_NELTS_PER_PATTERN): Likewise.
27664 (CONST_VECTOR_DUPLICATE_P): Likewise.
27665 (CONST_VECTOR_STEPPED_P): Likewise.
27666 (CONST_VECTOR_ENCODED_ELT): Likewise.
27667 (const_vec_duplicate_p): Check for a duplicated vector encoding.
27668 (unwrap_const_vec_duplicate): Likewise.
27669 (const_vec_series_p): Check for a non-duplicated vector encoding.
27670 Say that the function only returns true for integer vectors.
27671 * emit-rtl.c: Include rtx-vector-builder.h.
27672 (gen_const_vec_duplicate_1): Delete.
27673 (gen_const_vector): Call gen_const_vec_duplicate instead of
27674 gen_const_vec_duplicate_1.
27675 (const_vec_series_p_1): Operate directly on the CONST_VECTOR encoding.
27676 (gen_const_vec_duplicate): Use rtx_vector_builder.
27677 (gen_const_vec_series): Likewise.
27678 (gen_rtx_CONST_VECTOR): Likewise.
27679 * config/powerpcspe/powerpcspe.c: Include rtx-vector-builder.h.
27680 (swap_const_vector_halves): Take an rtx pointer rather than rtx.
27681 Build a new vector rather than modifying a CONST_VECTOR in-place.
27682 (handle_special_swappables): Update call accordingly.
27683 * config/rs6000/rs6000-p8swap.c: Include rtx-vector-builder.h.
27684 (swap_const_vector_halves): Take an rtx pointer rather than rtx.
27685 Build a new vector rather than modifying a CONST_VECTOR in-place.
27686 (handle_special_swappables): Update call accordingly.
27688 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
27690 * simplify-rtx.c (simplify_const_binary_operation): Use
27691 CONST_VECTOR_ELT instead of XVECEXP.
27693 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
27695 * tree-cfg.c (verify_gimple_assign_ternary): Allow the size of
27696 the selector elements to be different from the data elements
27697 if the selector is a VECTOR_CST.
27698 * tree-vect-stmts.c (vect_gen_perm_mask_any): Use a vector of
27699 ssizetype for the selector.
27701 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
27703 * optabs.c (shift_amt_for_vec_perm_mask): Try using series_p
27704 before testing each element individually.
27705 * tree-vect-generic.c (lower_vec_perm): Likewise.
27707 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
27709 * selftest.h (selftest::vec_perm_indices_c_tests): Declare.
27710 * selftest-run-tests.c (selftest::run_tests): Call it.
27711 * vector-builder.h (vector_builder::operator ==): New function.
27712 (vector_builder::operator !=): Likewise.
27713 * vec-perm-indices.h (vec_perm_indices::series_p): Declare.
27714 (vec_perm_indices::all_from_input_p): New function.
27715 * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
27716 (test_vec_perm_12, selftest::vec_perm_indices_c_tests): Likewise.
27717 * fold-const.c (fold_ternary_loc): Use tree_to_vec_perm_builder
27718 instead of reading the VECTOR_CST directly. Detect whether both
27719 vector inputs are the same before constructing the vec_perm_indices,
27720 and update the number of inputs argument accordingly. Use the
27721 utility functions added above. Only construct sel2 if we need to.
27723 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
27725 * optabs.c (expand_vec_perm_var): Use an explicit encoding for
27726 the broadcast of the low byte.
27727 (expand_mult_highpart): Use an explicit encoding for the permutes.
27728 * optabs-query.c (can_mult_highpart_p): Likewise.
27729 * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Likewise.
27730 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
27731 (vectorizable_bswap): Likewise.
27732 * tree-vect-data-refs.c (vect_grouped_store_supported): Use an
27733 explicit encoding for the power-of-2 permutes.
27734 (vect_permute_store_chain): Likewise.
27735 (vect_grouped_load_supported): Likewise.
27736 (vect_permute_load_chain): Likewise.
27738 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
27740 * vec-perm-indices.h (vec_perm_indices_to_tree): Declare.
27741 * vec-perm-indices.c (vec_perm_indices_to_tree): New function.
27742 * tree-ssa-forwprop.c (simplify_vector_constructor): Use it.
27743 * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
27744 * tree-vect-stmts.c (vectorizable_bswap): Likewise.
27745 (vect_gen_perm_mask_any): Likewise.
27747 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
27749 * int-vector-builder.h: New file.
27750 * vec-perm-indices.h: Include int-vector-builder.h.
27751 (vec_perm_indices): Redefine as an int_vector_builder.
27752 (auto_vec_perm_indices): Delete.
27753 (vec_perm_builder): Redefine as a stand-alone class.
27754 (vec_perm_indices::vec_perm_indices): New function.
27755 (vec_perm_indices::clamp): Likewise.
27756 * vec-perm-indices.c: Include fold-const.h and tree-vector-builder.h.
27757 (vec_perm_indices::new_vector): New function.
27758 (vec_perm_indices::new_expanded_vector): Update for new
27759 vec_perm_indices class.
27760 (vec_perm_indices::rotate_inputs): New function.
27761 (vec_perm_indices::all_in_range_p): Operate directly on the
27762 encoded form, without computing elided elements.
27763 (tree_to_vec_perm_builder): Operate directly on the VECTOR_CST
27764 encoding. Update for new vec_perm_indices class.
27765 * optabs.c (expand_vec_perm_const): Create a vec_perm_indices for
27766 the given vec_perm_builder.
27767 (expand_vec_perm_var): Update vec_perm_builder constructor.
27768 (expand_mult_highpart): Use vec_perm_builder instead of
27769 auto_vec_perm_indices.
27770 * optabs-query.c (can_mult_highpart_p): Use vec_perm_builder and
27771 vec_perm_indices instead of auto_vec_perm_indices. Use a single
27772 or double series encoding as appropriate.
27773 * fold-const.c (fold_ternary_loc): Use vec_perm_builder and
27774 vec_perm_indices instead of auto_vec_perm_indices.
27775 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
27776 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
27777 (vect_permute_store_chain): Likewise.
27778 (vect_grouped_load_supported): Likewise.
27779 (vect_permute_load_chain): Likewise.
27780 (vect_shift_permute_load_chain): Likewise.
27781 * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
27782 (vect_transform_slp_perm_load): Likewise.
27783 (vect_schedule_slp_instance): Likewise.
27784 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
27785 (vectorizable_mask_load_store): Likewise.
27786 (vectorizable_bswap): Likewise.
27787 (vectorizable_store): Likewise.
27788 (vectorizable_load): Likewise.
27789 * tree-vect-generic.c (lower_vec_perm): Use vec_perm_builder and
27790 vec_perm_indices instead of auto_vec_perm_indices. Use
27791 tree_to_vec_perm_builder to read the vector from a tree.
27792 * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Take a
27793 vec_perm_builder instead of a vec_perm_indices.
27794 (have_whole_vector_shift): Use vec_perm_builder and
27795 vec_perm_indices instead of auto_vec_perm_indices. Leave the
27796 truncation to calc_vec_perm_mask_for_shift.
27797 (vect_create_epilog_for_reduction): Likewise.
27798 * config/aarch64/aarch64.c (expand_vec_perm_d::perm): Change
27799 from auto_vec_perm_indices to vec_perm_indices.
27800 (aarch64_expand_vec_perm_const_1): Use rotate_inputs on d.perm
27801 instead of changing individual elements.
27802 (aarch64_vectorize_vec_perm_const): Use new_vector to install
27803 the vector in d.perm.
27804 * config/arm/arm.c (expand_vec_perm_d::perm): Change
27805 from auto_vec_perm_indices to vec_perm_indices.
27806 (arm_expand_vec_perm_const_1): Use rotate_inputs on d.perm
27807 instead of changing individual elements.
27808 (arm_vectorize_vec_perm_const): Use new_vector to install
27809 the vector in d.perm.
27810 * config/powerpcspe/powerpcspe.c (rs6000_expand_extract_even):
27811 Update vec_perm_builder constructor.
27812 (rs6000_expand_interleave): Likewise.
27813 * config/rs6000/rs6000.c (rs6000_expand_extract_even): Likewise.
27814 (rs6000_expand_interleave): Likewise.
27816 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
27818 * optabs-query.c (can_vec_perm_var_p): Check whether lowering
27819 to qimode could truncate the indices.
27820 * optabs.c (expand_vec_perm_var): Likewise.
27822 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
27824 * Makefile.in (OBJS): Add vec-perm-indices.o.
27825 * vec-perm-indices.h: New file.
27826 * vec-perm-indices.c: Likewise.
27827 * target.h (vec_perm_indices): Replace with a forward class
27829 (auto_vec_perm_indices): Move to vec-perm-indices.h.
27830 * optabs.h: Include vec-perm-indices.h.
27831 (expand_vec_perm): Delete.
27832 (selector_fits_mode_p, expand_vec_perm_var): Declare.
27833 (expand_vec_perm_const): Declare.
27834 * target.def (vec_perm_const_ok): Replace with...
27835 (vec_perm_const): ...this new hook.
27836 * doc/tm.texi.in (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Replace with...
27837 (TARGET_VECTORIZE_VEC_PERM_CONST): ...this new hook.
27838 * doc/tm.texi: Regenerate.
27839 * optabs.def (vec_perm_const): Delete.
27840 * doc/md.texi (vec_perm_const): Likewise.
27841 (vec_perm): Refer to TARGET_VECTORIZE_VEC_PERM_CONST.
27842 * expr.c (expand_expr_real_2): Use expand_vec_perm_const rather than
27843 expand_vec_perm for constant permutation vectors. Assert that
27844 the mode of variable permutation vectors is the integer equivalent
27845 of the mode that is being permuted.
27846 * optabs-query.h (selector_fits_mode_p): Declare.
27847 * optabs-query.c: Include vec-perm-indices.h.
27848 (selector_fits_mode_p): New function.
27849 (can_vec_perm_const_p): Check whether targetm.vectorize.vec_perm_const
27850 is defined, instead of checking whether the vec_perm_const_optab
27851 exists. Use targetm.vectorize.vec_perm_const instead of
27852 targetm.vectorize.vec_perm_const_ok. Check whether the indices
27853 fit in the vector mode before using a variable permute.
27854 * optabs.c (shift_amt_for_vec_perm_mask): Take a mode and a
27855 vec_perm_indices instead of an rtx.
27856 (expand_vec_perm): Replace with...
27857 (expand_vec_perm_const): ...this new function. Take the selector
27858 as a vec_perm_indices rather than an rtx. Also take the mode of
27859 the selector. Update call to shift_amt_for_vec_perm_mask.
27860 Use targetm.vectorize.vec_perm_const instead of vec_perm_const_optab.
27861 Use vec_perm_indices::new_expanded_vector to expand the original
27862 selector into bytes. Check whether the indices fit in the vector
27863 mode before using a variable permute.
27864 (expand_vec_perm_var): Make global.
27865 (expand_mult_highpart): Use expand_vec_perm_const.
27866 * fold-const.c: Includes vec-perm-indices.h.
27867 * tree-ssa-forwprop.c: Likewise.
27868 * tree-vect-data-refs.c: Likewise.
27869 * tree-vect-generic.c: Likewise.
27870 * tree-vect-loop.c: Likewise.
27871 * tree-vect-slp.c: Likewise.
27872 * tree-vect-stmts.c: Likewise.
27873 * config/aarch64/aarch64-protos.h (aarch64_expand_vec_perm_const):
27875 * config/aarch64/aarch64-simd.md (vec_perm_const<mode>): Delete.
27876 * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const)
27877 (aarch64_vectorize_vec_perm_const_ok): Fuse into...
27878 (aarch64_vectorize_vec_perm_const): ...this new function.
27879 (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
27880 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
27881 * config/arm/arm-protos.h (arm_expand_vec_perm_const): Delete.
27882 * config/arm/vec-common.md (vec_perm_const<mode>): Delete.
27883 * config/arm/arm.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
27884 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
27885 (arm_expand_vec_perm_const, arm_vectorize_vec_perm_const_ok): Merge
27887 (arm_vectorize_vec_perm_const): ...this new function. Explicitly
27888 check for NEON modes.
27889 * config/i386/i386-protos.h (ix86_expand_vec_perm_const): Delete.
27890 * config/i386/sse.md (VEC_PERM_CONST, vec_perm_const<mode>): Delete.
27891 * config/i386/i386.c (ix86_expand_vec_perm_const_1): Update comment.
27892 (ix86_expand_vec_perm_const, ix86_vectorize_vec_perm_const_ok): Merge
27894 (ix86_vectorize_vec_perm_const): ...this new function. Incorporate
27895 the old VEC_PERM_CONST conditions.
27896 * config/ia64/ia64-protos.h (ia64_expand_vec_perm_const): Delete.
27897 * config/ia64/vect.md (vec_perm_const<mode>): Delete.
27898 * config/ia64/ia64.c (ia64_expand_vec_perm_const)
27899 (ia64_vectorize_vec_perm_const_ok): Merge into...
27900 (ia64_vectorize_vec_perm_const): ...this new function.
27901 * config/mips/loongson.md (vec_perm_const<mode>): Delete.
27902 * config/mips/mips-msa.md (vec_perm_const<mode>): Delete.
27903 * config/mips/mips-ps-3d.md (vec_perm_constv2sf): Delete.
27904 * config/mips/mips-protos.h (mips_expand_vec_perm_const): Delete.
27905 * config/mips/mips.c (mips_expand_vec_perm_const)
27906 (mips_vectorize_vec_perm_const_ok): Merge into...
27907 (mips_vectorize_vec_perm_const): ...this new function.
27908 * config/powerpcspe/altivec.md (vec_perm_constv16qi): Delete.
27909 * config/powerpcspe/paired.md (vec_perm_constv2sf): Delete.
27910 * config/powerpcspe/spe.md (vec_perm_constv2si): Delete.
27911 * config/powerpcspe/vsx.md (vec_perm_const<mode>): Delete.
27912 * config/powerpcspe/powerpcspe-protos.h (altivec_expand_vec_perm_const)
27913 (rs6000_expand_vec_perm_const): Delete.
27914 * config/powerpcspe/powerpcspe.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK):
27916 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
27917 (altivec_expand_vec_perm_const_le): Take each operand individually.
27918 Operate on constant selectors rather than rtxes.
27919 (altivec_expand_vec_perm_const): Likewise. Update call to
27920 altivec_expand_vec_perm_const_le.
27921 (rs6000_expand_vec_perm_const): Delete.
27922 (rs6000_vectorize_vec_perm_const_ok): Delete.
27923 (rs6000_vectorize_vec_perm_const): New function.
27924 (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
27925 an element count and rtx array.
27926 (rs6000_expand_extract_even): Update call accordingly.
27927 (rs6000_expand_interleave): Likewise.
27928 * config/rs6000/altivec.md (vec_perm_constv16qi): Delete.
27929 * config/rs6000/paired.md (vec_perm_constv2sf): Delete.
27930 * config/rs6000/vsx.md (vec_perm_const<mode>): Delete.
27931 * config/rs6000/rs6000-protos.h (altivec_expand_vec_perm_const)
27932 (rs6000_expand_vec_perm_const): Delete.
27933 * config/rs6000/rs6000.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
27934 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
27935 (altivec_expand_vec_perm_const_le): Take each operand individually.
27936 Operate on constant selectors rather than rtxes.
27937 (altivec_expand_vec_perm_const): Likewise. Update call to
27938 altivec_expand_vec_perm_const_le.
27939 (rs6000_expand_vec_perm_const): Delete.
27940 (rs6000_vectorize_vec_perm_const_ok): Delete.
27941 (rs6000_vectorize_vec_perm_const): New function. Remove stray
27942 reference to the SPE evmerge intructions.
27943 (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
27944 an element count and rtx array.
27945 (rs6000_expand_extract_even): Update call accordingly.
27946 (rs6000_expand_interleave): Likewise.
27947 * config/sparc/sparc.md (vec_perm_constv8qi): Delete in favor of...
27948 * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): ...this
27950 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
27952 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
27954 * optabs.c (expand_vec_perm_1): Assert that SEL has an integer
27955 vector mode and that that mode matches the mode of the data
27957 (expand_vec_perm): Split handling of non-CONST_VECTOR selectors
27958 out into expand_vec_perm_var. Do all CONST_VECTOR handling here,
27959 directly using expand_vec_perm_1 when forcing selectors into
27961 (expand_vec_perm_var): New function, split out from expand_vec_perm.
27963 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
27965 * optabs-query.h (can_vec_perm_p): Delete.
27966 (can_vec_perm_var_p, can_vec_perm_const_p): Declare.
27967 * optabs-query.c (can_vec_perm_p): Split into...
27968 (can_vec_perm_var_p, can_vec_perm_const_p): ...these two functions.
27969 (can_mult_highpart_p): Use can_vec_perm_const_p to test whether a
27970 particular selector is valid.
27971 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
27972 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
27973 (vect_grouped_load_supported): Likewise.
27974 (vect_shift_permute_load_chain): Likewise.
27975 * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
27976 (vect_transform_slp_perm_load): Likewise.
27977 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
27978 (vectorizable_bswap): Likewise.
27979 (vect_gen_perm_mask_checked): Likewise.
27980 * fold-const.c (fold_ternary_loc): Likewise. Don't take
27981 implementations of variable permutation vectors into account
27982 when deciding which selector to use.
27983 * tree-vect-loop.c (have_whole_vector_shift): Don't check whether
27984 vec_perm_const_optab is supported; instead use can_vec_perm_const_p
27985 with a false third argument.
27986 * tree-vect-generic.c (lower_vec_perm): Use can_vec_perm_const_p
27987 to test whether the constant selector is valid and can_vec_perm_var_p
27988 to test whether a variable selector is valid.
27990 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
27992 * optabs-query.h (can_vec_perm_p): Take a const vec_perm_indices *.
27993 * optabs-query.c (can_vec_perm_p): Likewise.
27994 * fold-const.c (fold_vec_perm): Take a const vec_perm_indices &
27995 instead of vec_perm_indices.
27996 * tree-vectorizer.h (vect_gen_perm_mask_any): Likewise,
27997 (vect_gen_perm_mask_checked): Likewise,
27998 * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise,
27999 (vect_gen_perm_mask_checked): Likewise,
28001 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
28003 * optabs-query.h (qimode_for_vec_perm): Declare.
28004 * optabs-query.c (can_vec_perm_p): Split out qimode search to...
28005 (qimode_for_vec_perm): ...this new function.
28006 * optabs.c (expand_vec_perm): Use qimode_for_vec_perm.
28008 2018-01-02 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
28010 * rtlanal.c (canonicalize_condition): Return 0 if final rtx
28011 does not have a conditional at the top.
28013 2018-01-02 Richard Biener <rguenther@suse.de>
28015 * ipa-inline.c (big_speedup_p): Fix expression.
28017 2018-01-02 Jan Hubicka <hubicka@ucw.cz>
28020 * config/i386/x86-tune-costs.h: Increase cost of integer load costs
28023 2018-01-02 Jan Hubicka <hubicka@ucw.cz>
28027 * x86-tune-costs.h (generic_cost): Reduce cost of FDIV 20->17,
28028 cost of sqrt 20->14, DIVSS 18->13, DIVSD 32->17, SQRtSS 30->14
28029 and SQRTsD 58->18, cond_not_taken_branch_cost. 2->1. Increase
28030 cond_taken_branch_cost 3->4.
28032 2018-01-01 Jakub Jelinek <jakub@redhat.com>
28034 PR tree-optimization/83581
28035 * tree-loop-distribution.c (pass_loop_distribution::execute): Return
28036 TODO_cleanup_cfg if any changes have been made.
28038 PR middle-end/83608
28039 * expr.c (store_expr_with_bounds): Use simplify_gen_subreg instead of
28040 convert_modes if target mode has the right side, but different mode
28043 PR middle-end/83609
28044 * expr.c (expand_assignment): Fix up a typo in simplify_gen_subreg
28045 last argument when extracting from CONCAT. If either from_real or
28046 from_imag is NULL, use expansion through memory. If result is not
28047 a CONCAT and simplify_gen_subreg fails, try to simplify_gen_subreg
28048 the parts directly to inner mode, if even that fails, use expansion
28051 PR middle-end/83623
28052 * expmed.c (expand_shift_1): For 2-byte rotates by BITS_PER_UNIT,
28053 check for bswap in mode rather than HImode and use that in expand_unop
28056 Copyright (C) 2018 Free Software Foundation, Inc.
28058 Copying and distribution of this file, with or without modification,
28059 are permitted in any medium without royalty provided the copyright
28060 notice and this notice are preserved.